From 845578323c1b50e08661af320ce41b969284e258 Mon Sep 17 00:00:00 2001 From: Flax Date: Tue, 19 Sep 2023 21:38:54 +0200 Subject: [PATCH] Updated to latest SMT32CubeIDE revisions. Added basic MQTT test program. --- STM32_Nucleo207ZG/.cproject | 1 + STM32_Nucleo207ZG/.mxproject | 68 +- .../com.st.stm32cube.ide.mcu.sfrview.prefs | 2 + .../.settings/language.settings.xml | 48 +- .../.settings/stm32cubeide.project.prefs | 4 +- STM32_Nucleo207ZG/Core/Inc/main.h | 278 +- .../Core/Inc/stm32f2xx_hal_conf.h | 824 +- STM32_Nucleo207ZG/Core/Inc/stm32f2xx_it.h | 134 +- STM32_Nucleo207ZG/Core/Src/main.c | 1364 +- .../Core/Src/stm32f2xx_hal_msp.c | 776 +- STM32_Nucleo207ZG/Core/Src/stm32f2xx_it.c | 435 +- STM32_Nucleo207ZG/Debug/Core/Src/subdir.mk | 48 +- .../Debug/Core/Startup/subdir.mk | 48 +- .../STM32F2xx_HAL_Driver/Src/subdir.mk | 48 +- STM32_Nucleo207ZG/Debug/LWIP/App/subdir.mk | 48 +- STM32_Nucleo207ZG/Debug/LWIP/Target/subdir.mk | 48 +- .../Debug/LightControlConvi_Nucleo207ZG.list | 96455 +++++++++------- .../Debug/LightControlConvi_Nucleo207ZG.map | 45150 ++++---- .../Third_Party/LwIP/src/api/subdir.mk | 48 +- .../Third_Party/LwIP/src/apps/mqtt/subdir.mk | 48 +- .../Third_Party/LwIP/src/core/ipv4/subdir.mk | 48 +- .../Third_Party/LwIP/src/core/ipv6/subdir.mk | 48 +- .../Third_Party/LwIP/src/core/subdir.mk | 48 +- .../Third_Party/LwIP/src/netif/ppp/subdir.mk | 48 +- .../Third_Party/LwIP/src/netif/subdir.mk | 48 +- STM32_Nucleo207ZG/Debug/makefile | 212 +- STM32_Nucleo207ZG/Debug/objects.list | 198 +- STM32_Nucleo207ZG/Debug/objects.mk | 18 +- STM32_Nucleo207ZG/Debug/sources.mk | 68 +- .../Drivers/CMSIS/Include/cmsis_armcc.h | 1730 +- .../Drivers/CMSIS/Include/cmsis_armclang.h | 3738 +- .../Drivers/CMSIS/Include/cmsis_compiler.h | 532 +- .../Drivers/CMSIS/Include/cmsis_gcc.h | 4170 +- .../Drivers/CMSIS/Include/cmsis_iccarm.h | 1870 +- .../Drivers/CMSIS/Include/cmsis_version.h | 78 +- .../Drivers/CMSIS/Include/core_armv8mbl.h | 3836 +- .../Drivers/CMSIS/Include/core_armv8mml.h | 5854 +- .../Drivers/CMSIS/Include/core_cm0.h | 1898 +- .../Drivers/CMSIS/Include/core_cm0plus.h | 2166 +- .../Drivers/CMSIS/Include/core_cm1.h | 1952 +- .../Drivers/CMSIS/Include/core_cm23.h | 3986 +- .../Drivers/CMSIS/Include/core_cm3.h | 3882 +- .../Drivers/CMSIS/Include/core_cm33.h | 6004 +- .../Drivers/CMSIS/Include/core_cm4.h | 4258 +- .../Drivers/CMSIS/Include/core_cm7.h | 5342 +- .../Drivers/CMSIS/Include/core_sc000.h | 2044 +- .../Drivers/CMSIS/Include/core_sc300.h | 3830 +- .../Drivers/CMSIS/Include/mpu_armv7.h | 540 +- .../Drivers/CMSIS/Include/mpu_armv8.h | 666 +- .../Drivers/CMSIS/Include/tz_context.h | 140 +- STM32_Nucleo207ZG/Drivers/CMSIS/LICENSE.txt | 402 +- STM32_Nucleo207ZG/LWIP/App/lwip.c | 412 +- STM32_Nucleo207ZG/LWIP/App/lwip.h | 158 +- STM32_Nucleo207ZG/LWIP/Target/ethernetif.c | 1484 +- STM32_Nucleo207ZG/LWIP/Target/ethernetif.h | 94 +- STM32_Nucleo207ZG/LWIP/Target/lwipopts.h | 220 +- .../LightControlConvi_Nucleo207ZG.ioc | 766 +- .../LightControlConvi_Nucleo207ZG.launch | 83 + .../Third_Party/LwIP/src/api/api_lib.c | 2020 +- .../Third_Party/LwIP/src/api/api_msg.c | 3906 +- .../Third_Party/LwIP/src/api/err.c | 230 +- .../Third_Party/LwIP/src/api/netbuf.c | 492 +- .../Third_Party/LwIP/src/api/netdb.c | 826 +- .../Third_Party/LwIP/src/api/netifapi.c | 442 +- .../Third_Party/LwIP/src/api/sockets.c | 5654 +- .../Third_Party/LwIP/src/api/tcpip.c | 1036 +- .../Third_Party/LwIP/src/apps/mqtt/mqtt.c | 2684 +- .../Third_Party/LwIP/src/core/def.c | 444 +- .../Third_Party/LwIP/src/core/dns.c | 3146 +- .../Third_Party/LwIP/src/core/inet_chksum.c | 1218 +- .../Third_Party/LwIP/src/core/init.c | 770 +- .../Third_Party/LwIP/src/core/ip.c | 248 +- .../Third_Party/LwIP/src/core/ipv4/autoip.c | 1054 +- .../Third_Party/LwIP/src/core/ipv4/dhcp.c | 3902 +- .../Third_Party/LwIP/src/core/ipv4/etharp.c | 2412 +- .../Third_Party/LwIP/src/core/ipv4/icmp.c | 794 +- .../Third_Party/LwIP/src/core/ipv4/igmp.c | 1600 +- .../Third_Party/LwIP/src/core/ipv4/ip4.c | 2172 +- .../Third_Party/LwIP/src/core/ipv4/ip4_addr.c | 662 +- .../Third_Party/LwIP/src/core/ipv4/ip4_frag.c | 1728 +- .../Third_Party/LwIP/src/core/ipv6/dhcp6.c | 100 +- .../Third_Party/LwIP/src/core/ipv6/ethip6.c | 236 +- .../Third_Party/LwIP/src/core/ipv6/icmp6.c | 700 +- .../Third_Party/LwIP/src/core/ipv6/inet6.c | 106 +- .../Third_Party/LwIP/src/core/ipv6/ip6.c | 2244 +- .../Third_Party/LwIP/src/core/ipv6/ip6_addr.c | 584 +- .../Third_Party/LwIP/src/core/ipv6/ip6_frag.c | 1610 +- .../Third_Party/LwIP/src/core/ipv6/mld6.c | 1176 +- .../Third_Party/LwIP/src/core/ipv6/nd6.c | 4204 +- .../Third_Party/LwIP/src/core/mem.c | 1554 +- .../Third_Party/LwIP/src/core/memp.c | 992 +- .../Third_Party/LwIP/src/core/netif.c | 2534 +- .../Third_Party/LwIP/src/core/pbuf.c | 2884 +- .../Third_Party/LwIP/src/core/raw.c | 1042 +- .../Third_Party/LwIP/src/core/stats.c | 338 +- .../Third_Party/LwIP/src/core/sys.c | 212 +- .../Third_Party/LwIP/src/core/tcp.c | 4338 +- .../Third_Party/LwIP/src/core/tcp_in.c | 3674 +- .../Third_Party/LwIP/src/core/tcp_out.c | 3342 +- .../Third_Party/LwIP/src/core/timeouts.c | 866 +- .../Third_Party/LwIP/src/core/udp.c | 2382 +- .../Third_Party/LwIP/src/include/lwip/api.h | 800 +- .../LwIP/src/include/lwip/apps/fs.h | 206 +- .../LwIP/src/include/lwip/apps/httpd.h | 472 +- .../LwIP/src/include/lwip/apps/httpd_opts.h | 644 +- .../LwIP/src/include/lwip/apps/lwiperf.h | 168 +- .../LwIP/src/include/lwip/apps/mdns.h | 138 +- .../LwIP/src/include/lwip/apps/mdns_opts.h | 148 +- .../LwIP/src/include/lwip/apps/mdns_priv.h | 132 +- .../LwIP/src/include/lwip/apps/mqtt.h | 488 +- .../LwIP/src/include/lwip/apps/mqtt_opts.h | 206 +- .../LwIP/src/include/lwip/apps/netbiosns.h | 86 +- .../src/include/lwip/apps/netbiosns_opts.h | 118 +- .../LwIP/src/include/lwip/apps/snmp.h | 256 +- .../LwIP/src/include/lwip/apps/snmp_core.h | 728 +- .../LwIP/src/include/lwip/apps/snmp_mib2.h | 156 +- .../LwIP/src/include/lwip/apps/snmp_opts.h | 586 +- .../LwIP/src/include/lwip/apps/snmp_scalar.h | 226 +- .../LwIP/src/include/lwip/apps/snmp_table.h | 268 +- .../src/include/lwip/apps/snmp_threadsync.h | 228 +- .../LwIP/src/include/lwip/apps/snmpv3.h | 180 +- .../LwIP/src/include/lwip/apps/sntp.h | 152 +- .../LwIP/src/include/lwip/apps/sntp_opts.h | 346 +- .../LwIP/src/include/lwip/apps/tftp_opts.h | 210 +- .../LwIP/src/include/lwip/apps/tftp_server.h | 188 +- .../Third_Party/LwIP/src/include/lwip/arch.h | 638 +- .../LwIP/src/include/lwip/autoip.h | 198 +- .../Third_Party/LwIP/src/include/lwip/debug.h | 334 +- .../Third_Party/LwIP/src/include/lwip/def.h | 282 +- .../Third_Party/LwIP/src/include/lwip/dhcp.h | 286 +- .../Third_Party/LwIP/src/include/lwip/dhcp6.h | 116 +- .../Third_Party/LwIP/src/include/lwip/dns.h | 260 +- .../Third_Party/LwIP/src/include/lwip/err.h | 238 +- .../Third_Party/LwIP/src/include/lwip/errno.h | 386 +- .../LwIP/src/include/lwip/etharp.h | 212 +- .../LwIP/src/include/lwip/ethip6.h | 136 +- .../Third_Party/LwIP/src/include/lwip/icmp.h | 220 +- .../Third_Party/LwIP/src/include/lwip/icmp6.h | 140 +- .../Third_Party/LwIP/src/include/lwip/igmp.h | 230 +- .../Third_Party/LwIP/src/include/lwip/inet.h | 344 +- .../LwIP/src/include/lwip/inet_chksum.h | 210 +- .../Third_Party/LwIP/src/include/lwip/init.h | 200 +- .../Third_Party/LwIP/src/include/lwip/ip.h | 638 +- .../Third_Party/LwIP/src/include/lwip/ip4.h | 222 +- .../LwIP/src/include/lwip/ip4_addr.h | 454 +- .../LwIP/src/include/lwip/ip4_frag.h | 200 +- .../Third_Party/LwIP/src/include/lwip/ip6.h | 186 +- .../LwIP/src/include/lwip/ip6_addr.h | 570 +- .../LwIP/src/include/lwip/ip6_frag.h | 240 +- .../LwIP/src/include/lwip/ip_addr.h | 814 +- .../Third_Party/LwIP/src/include/lwip/mem.h | 164 +- .../Third_Party/LwIP/src/include/lwip/memp.h | 310 +- .../Third_Party/LwIP/src/include/lwip/mld6.h | 198 +- .../Third_Party/LwIP/src/include/lwip/nd6.h | 168 +- .../LwIP/src/include/lwip/netbuf.h | 236 +- .../Third_Party/LwIP/src/include/lwip/netdb.h | 300 +- .../Third_Party/LwIP/src/include/lwip/netif.h | 948 +- .../LwIP/src/include/lwip/netifapi.h | 280 +- .../Third_Party/LwIP/src/include/lwip/opt.h | 5752 +- .../Third_Party/LwIP/src/include/lwip/pbuf.h | 526 +- .../LwIP/src/include/lwip/priv/api_msg.h | 432 +- .../LwIP/src/include/lwip/priv/memp_priv.h | 366 +- .../LwIP/src/include/lwip/priv/memp_std.h | 292 +- .../LwIP/src/include/lwip/priv/nd6_priv.h | 288 +- .../LwIP/src/include/lwip/priv/tcp_priv.h | 1014 +- .../LwIP/src/include/lwip/priv/tcpip_priv.h | 320 +- .../LwIP/src/include/lwip/prot/autoip.h | 156 +- .../LwIP/src/include/lwip/prot/dhcp.h | 366 +- .../LwIP/src/include/lwip/prot/dns.h | 280 +- .../LwIP/src/include/lwip/prot/etharp.h | 182 +- .../LwIP/src/include/lwip/prot/ethernet.h | 340 +- .../LwIP/src/include/lwip/prot/icmp.h | 182 +- .../LwIP/src/include/lwip/prot/icmp6.h | 340 +- .../LwIP/src/include/lwip/prot/igmp.h | 180 +- .../LwIP/src/include/lwip/prot/ip.h | 102 +- .../LwIP/src/include/lwip/prot/ip4.h | 254 +- .../LwIP/src/include/lwip/prot/ip6.h | 338 +- .../LwIP/src/include/lwip/prot/mld6.h | 140 +- .../LwIP/src/include/lwip/prot/nd6.h | 554 +- .../LwIP/src/include/lwip/prot/tcp.h | 194 +- .../LwIP/src/include/lwip/prot/udp.h | 136 +- .../Third_Party/LwIP/src/include/lwip/raw.h | 236 +- .../Third_Party/LwIP/src/include/lwip/sio.h | 284 +- .../Third_Party/LwIP/src/include/lwip/snmp.h | 426 +- .../LwIP/src/include/lwip/sockets.h | 1186 +- .../Third_Party/LwIP/src/include/lwip/stats.h | 982 +- .../Third_Party/LwIP/src/include/lwip/sys.h | 910 +- .../Third_Party/LwIP/src/include/lwip/tcp.h | 866 +- .../Third_Party/LwIP/src/include/lwip/tcpip.h | 212 +- .../LwIP/src/include/lwip/timeouts.h | 242 +- .../Third_Party/LwIP/src/include/lwip/udp.h | 364 +- .../LwIP/src/include/netif/etharp.h | 6 +- .../LwIP/src/include/netif/ethernet.h | 154 +- .../LwIP/src/include/netif/lowpan6.h | 172 +- .../LwIP/src/include/netif/lowpan6_opts.h | 140 +- .../LwIP/src/include/netif/ppp/ccp.h | 312 +- .../LwIP/src/include/netif/ppp/chap-md5.h | 72 +- .../LwIP/src/include/netif/ppp/chap-new.h | 384 +- .../LwIP/src/include/netif/ppp/chap_ms.h | 88 +- .../LwIP/src/include/netif/ppp/eap.h | 338 +- .../LwIP/src/include/netif/ppp/ecp.h | 100 +- .../LwIP/src/include/netif/ppp/eui64.h | 188 +- .../LwIP/src/include/netif/ppp/fsm.h | 350 +- .../LwIP/src/include/netif/ppp/ipcp.h | 252 +- .../LwIP/src/include/netif/ppp/ipv6cp.h | 366 +- .../LwIP/src/include/netif/ppp/lcp.h | 342 +- .../LwIP/src/include/netif/ppp/magic.h | 244 +- .../LwIP/src/include/netif/ppp/mppe.h | 346 +- .../LwIP/src/include/netif/ppp/ppp.h | 1380 +- .../LwIP/src/include/netif/ppp/ppp_impl.h | 1258 +- .../LwIP/src/include/netif/ppp/ppp_opts.h | 1186 +- .../LwIP/src/include/netif/ppp/pppapi.h | 274 +- .../LwIP/src/include/netif/ppp/pppcrypt.h | 272 +- .../LwIP/src/include/netif/ppp/pppdebug.h | 160 +- .../LwIP/src/include/netif/ppp/pppoe.h | 358 +- .../LwIP/src/include/netif/ppp/pppol2tp.h | 402 +- .../LwIP/src/include/netif/ppp/pppos.h | 236 +- .../LwIP/src/include/netif/ppp/upap.h | 246 +- .../LwIP/src/include/netif/ppp/vj.h | 322 +- .../LwIP/src/include/netif/slipif.h | 174 +- .../LwIP/src/include/posix/errno.h | 66 +- .../LwIP/src/include/posix/netdb.h | 66 +- .../LwIP/src/include/posix/sys/socket.h | 66 +- .../Third_Party/LwIP/src/netif/ethernet.c | 628 +- .../Third_Party/LwIP/src/netif/lowpan6.c | 2386 +- .../Third_Party/LwIP/src/netif/ppp/auth.c | 5020 +- .../Third_Party/LwIP/src/netif/ppp/ccp.c | 3480 +- .../Third_Party/LwIP/src/netif/ppp/chap-md5.c | 252 +- .../Third_Party/LwIP/src/netif/ppp/chap-new.c | 1354 +- .../Third_Party/LwIP/src/netif/ppp/chap_ms.c | 1924 +- .../Third_Party/LwIP/src/netif/ppp/demand.c | 930 +- .../Third_Party/LwIP/src/netif/ppp/eap.c | 4846 +- .../Third_Party/LwIP/src/netif/ppp/ecp.c | 382 +- .../Third_Party/LwIP/src/netif/ppp/eui64.c | 112 +- .../Third_Party/LwIP/src/netif/ppp/fsm.c | 1598 +- .../Third_Party/LwIP/src/netif/ppp/ipcp.c | 4836 +- .../Third_Party/LwIP/src/netif/ppp/ipv6cp.c | 3066 +- .../Third_Party/LwIP/src/netif/ppp/lcp.c | 5580 +- .../Third_Party/LwIP/src/netif/ppp/magic.c | 588 +- .../Third_Party/LwIP/src/netif/ppp/mppe.c | 824 +- .../LwIP/src/netif/ppp/multilink.c | 1218 +- .../Third_Party/LwIP/src/netif/ppp/ppp.c | 3294 +- .../Third_Party/LwIP/src/netif/ppp/pppapi.c | 854 +- .../Third_Party/LwIP/src/netif/ppp/pppcrypt.c | 132 +- .../Third_Party/LwIP/src/netif/ppp/pppoe.c | 2442 +- .../Third_Party/LwIP/src/netif/ppp/pppol2tp.c | 2358 +- .../Third_Party/LwIP/src/netif/ppp/pppos.c | 1750 +- .../Third_Party/LwIP/src/netif/ppp/upap.c | 1354 +- .../Third_Party/LwIP/src/netif/ppp/utils.c | 1918 +- .../Third_Party/LwIP/src/netif/ppp/vj.c | 1390 +- .../Third_Party/LwIP/src/netif/slipif.c | 1110 +- .../Third_Party/LwIP/system/arch/bpstruct.h | 72 +- .../Third_Party/LwIP/system/arch/cc.h | 176 +- .../Third_Party/LwIP/system/arch/cpu.h | 78 +- .../Third_Party/LwIP/system/arch/epstruct.h | 72 +- .../Third_Party/LwIP/system/arch/init.h | 88 +- .../Third_Party/LwIP/system/arch/lib.h | 76 +- .../Third_Party/LwIP/system/arch/perf.h | 76 +- .../Third_Party/LwIP/system/arch/sys_arch.h | 144 +- 259 files changed, 196333 insertions(+), 187629 deletions(-) create mode 100644 STM32_Nucleo207ZG/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs create mode 100644 STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.launch diff --git a/STM32_Nucleo207ZG/.cproject b/STM32_Nucleo207ZG/.cproject index 13c0fd6..7ebbfd9 100644 --- a/STM32_Nucleo207ZG/.cproject +++ b/STM32_Nucleo207ZG/.cproject @@ -270,4 +270,5 @@ + \ No newline at end of file diff --git a/STM32_Nucleo207ZG/.mxproject b/STM32_Nucleo207ZG/.mxproject index 719bbc4..668357e 100644 --- a/STM32_Nucleo207ZG/.mxproject +++ b/STM32_Nucleo207ZG/.mxproject @@ -1,34 +1,34 @@ -[PreviousLibFiles] -LibFiles=Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_eth.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_def.h;Drivers\STM32F2xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_bus.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_system.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_utils.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_uart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usb.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ccp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap_ms.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-md5.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-new.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eui64.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\fsm.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipv6cp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\lcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\magic.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\mppe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_impl.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppapi.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppcrypt.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppdebug.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppoe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppol2tp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppos.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\upap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\vj.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ecp.h;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_eth.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_cortex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_gpio.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_exti.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_uart.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_ll_usb.c;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_eth.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_def.h;Drivers\STM32F2xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_bus.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_system.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_utils.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_uart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usb.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ccp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap_ms.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-md5.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-new.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eui64.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\fsm.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipv6cp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\lcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\magic.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\mppe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_impl.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppapi.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppcrypt.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppdebug.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppoe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppol2tp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppos.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\upap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\vj.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ecp.h;Drivers\CMSIS\Device\ST\STM32F2xx\Include\stm32f207xx.h;Drivers\CMSIS\Device\ST\STM32F2xx\Include\stm32f2xx.h;Drivers\CMSIS\Device\ST\STM32F2xx\Include\system_stm32f2xx.h;Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c;Middlewares\Third_Party\LwIP\src\include\lwip\api.h;Middlewares\Third_Party\LwIP\src\include\lwip\arch.h;Middlewares\Third_Party\LwIP\src\include\lwip\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\debug.h;Middlewares\Third_Party\LwIP\src\include\lwip\def.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\err.h;Middlewares\Third_Party\LwIP\src\include\lwip\errno.h;Middlewares\Third_Party\LwIP\src\include\lwip\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\ethip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet_chksum.h;Middlewares\Third_Party\LwIP\src\include\lwip\init.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\mem.h;Middlewares\Third_Party\LwIP\src\include\lwip\memp.h;Middlewares\Third_Party\LwIP\src\include\lwip\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\netbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\netdb.h;Middlewares\Third_Party\LwIP\src\include\lwip\netif.h;Middlewares\Third_Party\LwIP\src\include\lwip\netifapi.h;Middlewares\Third_Party\LwIP\src\include\lwip\opt.h;Middlewares\Third_Party\LwIP\src\include\lwip\pbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\raw.h;Middlewares\Third_Party\LwIP\src\include\lwip\sio.h;Middlewares\Third_Party\LwIP\src\include\lwip\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\sockets.h;Middlewares\Third_Party\LwIP\src\include\lwip\stats.h;Middlewares\Third_Party\LwIP\src\include\lwip\sys.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcpip.h;Middlewares\Third_Party\LwIP\src\include\lwip\timeouts.h;Middlewares\Third_Party\LwIP\src\include\lwip\udp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\fs.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\lwiperf.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmpv3.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_core.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_mib2.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_scalar.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_table.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_threadsync.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_server.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\api_msg.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_std.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\nd6_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcpip_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ethernet.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\udp.h;Middlewares\Third_Party\LwIP\src\include\netif\etharp.h;Middlewares\Third_Party\LwIP\src\include\netif\ethernet.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\slipif.h;Middlewares\Third_Party\LwIP\src\include\posix\errno.h;Middlewares\Third_Party\LwIP\src\include\posix\netdb.h;Middlewares\Third_Party\LwIP\src\include\posix\sys\socket.h;Middlewares\Third_Party\LwIP\system\arch\bpstruct.h;Middlewares\Third_Party\LwIP\system\arch\cc.h;Middlewares\Third_Party\LwIP\system\arch\cpu.h;Middlewares\Third_Party\LwIP\system\arch\epstruct.h;Middlewares\Third_Party\LwIP\system\arch\init.h;Middlewares\Third_Party\LwIP\system\arch\lib.h;Middlewares\Third_Party\LwIP\system\arch\perf.h;Middlewares\Third_Party\LwIP\system\arch\sys_arch.h;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c;Middlewares\Third_Party\LwIP\src\include\lwip\api.h;Middlewares\Third_Party\LwIP\src\include\lwip\arch.h;Middlewares\Third_Party\LwIP\src\include\lwip\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\debug.h;Middlewares\Third_Party\LwIP\src\include\lwip\def.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\err.h;Middlewares\Third_Party\LwIP\src\include\lwip\errno.h;Middlewares\Third_Party\LwIP\src\include\lwip\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\ethip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet_chksum.h;Middlewares\Third_Party\LwIP\src\include\lwip\init.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\mem.h;Middlewares\Third_Party\LwIP\src\include\lwip\memp.h;Middlewares\Third_Party\LwIP\src\include\lwip\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\netbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\netdb.h;Middlewares\Third_Party\LwIP\src\include\lwip\netif.h;Middlewares\Third_Party\LwIP\src\include\lwip\netifapi.h;Middlewares\Third_Party\LwIP\src\include\lwip\opt.h;Middlewares\Third_Party\LwIP\src\include\lwip\pbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\raw.h;Middlewares\Third_Party\LwIP\src\include\lwip\sio.h;Middlewares\Third_Party\LwIP\src\include\lwip\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\sockets.h;Middlewares\Third_Party\LwIP\src\include\lwip\stats.h;Middlewares\Third_Party\LwIP\src\include\lwip\sys.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcpip.h;Middlewares\Third_Party\LwIP\src\include\lwip\timeouts.h;Middlewares\Third_Party\LwIP\src\include\lwip\udp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\fs.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\lwiperf.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmpv3.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_core.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_mib2.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_scalar.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_table.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_threadsync.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_server.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\api_msg.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_std.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\nd6_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcpip_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ethernet.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\udp.h;Middlewares\Third_Party\LwIP\src\include\netif\etharp.h;Middlewares\Third_Party\LwIP\src\include\netif\ethernet.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\slipif.h;Middlewares\Third_Party\LwIP\src\include\posix\errno.h;Middlewares\Third_Party\LwIP\src\include\posix\netdb.h;Middlewares\Third_Party\LwIP\src\include\posix\sys\socket.h;Middlewares\Third_Party\LwIP\system\arch\bpstruct.h;Middlewares\Third_Party\LwIP\system\arch\cc.h;Middlewares\Third_Party\LwIP\system\arch\cpu.h;Middlewares\Third_Party\LwIP\system\arch\epstruct.h;Middlewares\Third_Party\LwIP\system\arch\init.h;Middlewares\Third_Party\LwIP\system\arch\lib.h;Middlewares\Third_Party\LwIP\system\arch\perf.h;Middlewares\Third_Party\LwIP\system\arch\sys_arch.h;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h; - -[PreviousUsedCubeIDEFiles] -SourceFiles=Core\Src\main.c;LWIP\App\lwip.c;LWIP\Target\ethernetif.c;Core\Src\stm32f2xx_it.c;Core\Src\stm32f2xx_hal_msp.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_eth.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_cortex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_gpio.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_exti.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_uart.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_ll_usb.c;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c;Core\Src\system_stm32f2xx.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_eth.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_cortex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_gpio.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_exti.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_uart.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_ll_usb.c;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c;Core\Src\system_stm32f2xx.c;;;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c; -HeaderPath=Middlewares\Third_Party\LwIP\src\include;Middlewares\Third_Party\LwIP\system;Middlewares\Third_Party\LwIP\src\include;Middlewares\Third_Party\LwIP\system;Drivers\STM32F2xx_HAL_Driver\Inc;Drivers\STM32F2xx_HAL_Driver\Inc\Legacy;Middlewares\Third_Party\LwIP\src\include\netif\ppp;Drivers\CMSIS\Device\ST\STM32F2xx\Include;Middlewares\Third_Party\LwIP\src\include\lwip;Middlewares\Third_Party\LwIP\src\include\lwip\apps;Middlewares\Third_Party\LwIP\src\include\lwip\priv;Middlewares\Third_Party\LwIP\src\include\lwip\prot;Middlewares\Third_Party\LwIP\src\include\netif;Middlewares\Third_Party\LwIP\src\include\posix;Middlewares\Third_Party\LwIP\src\include\posix\sys;Middlewares\Third_Party\LwIP\system\arch;Drivers\CMSIS\Include;LWIP\App;LWIP\Target;Core\Inc; -CDefines=USE_HAL_DRIVER;STM32F207xx;USE_HAL_DRIVER;USE_HAL_DRIVER; - -[PreviousGenFiles] -AdvancedFolderStructure=true -HeaderFileListSize=6 -HeaderFiles#0=..\LWIP\App\lwip.h -HeaderFiles#1=..\LWIP\Target\lwipopts.h -HeaderFiles#2=..\LWIP\Target\ethernetif.h -HeaderFiles#3=..\Core\Inc\stm32f2xx_it.h -HeaderFiles#4=..\Core\Inc\stm32f2xx_hal_conf.h -HeaderFiles#5=..\Core\Inc\main.h -HeaderFolderListSize=3 -HeaderPath#0=..\LWIP\App -HeaderPath#1=..\LWIP\Target -HeaderPath#2=..\Core\Inc -HeaderFiles=; -SourceFileListSize=5 -SourceFiles#0=..\LWIP\App\lwip.c -SourceFiles#1=..\LWIP\Target\ethernetif.c -SourceFiles#2=..\Core\Src\stm32f2xx_it.c -SourceFiles#3=..\Core\Src\stm32f2xx_hal_msp.c -SourceFiles#4=..\Core\Src\main.c -SourceFolderListSize=3 -SourcePath#0=..\LWIP\App -SourcePath#1=..\LWIP\Target -SourcePath#2=..\Core\Src -SourceFiles=; - +[PreviousLibFiles] +LibFiles=Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_eth.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_def.h;Drivers\STM32F2xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_bus.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_system.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_utils.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_uart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usb.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ccp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap_ms.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-md5.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-new.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eui64.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\fsm.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipv6cp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\lcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\magic.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\mppe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_impl.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppapi.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppcrypt.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppdebug.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppoe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppol2tp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppos.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\upap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\vj.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ecp.h;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_eth.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_cortex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_gpio.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_exti.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_uart.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_ll_usb.c;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_eth.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_def.h;Drivers\STM32F2xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_rcc_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_bus.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_rcc.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_system.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_utils.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_cortex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_flash_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pwr_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_pwr.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_gpio_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_gpio.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_dma_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_dma.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_exti.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_tim_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_tim.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_uart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usart.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd_ex.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_hal_pcd.h;Drivers\STM32F2xx_HAL_Driver\Inc\stm32f2xx_ll_usb.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ccp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap_ms.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-md5.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\chap-new.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\eui64.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\fsm.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ipv6cp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\lcp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\magic.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\mppe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_impl.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ppp_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppapi.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppcrypt.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppdebug.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppoe.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppol2tp.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\pppos.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\upap.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\vj.h;Middlewares\Third_Party\LwIP\src\include\netif\ppp\ecp.h;Drivers\CMSIS\Device\ST\STM32F2xx\Include\stm32f207xx.h;Drivers\CMSIS\Device\ST\STM32F2xx\Include\stm32f2xx.h;Drivers\CMSIS\Device\ST\STM32F2xx\Include\system_stm32f2xx.h;Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c;Middlewares\Third_Party\LwIP\src\include\lwip\api.h;Middlewares\Third_Party\LwIP\src\include\lwip\arch.h;Middlewares\Third_Party\LwIP\src\include\lwip\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\debug.h;Middlewares\Third_Party\LwIP\src\include\lwip\def.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\err.h;Middlewares\Third_Party\LwIP\src\include\lwip\errno.h;Middlewares\Third_Party\LwIP\src\include\lwip\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\ethip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet_chksum.h;Middlewares\Third_Party\LwIP\src\include\lwip\init.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\mem.h;Middlewares\Third_Party\LwIP\src\include\lwip\memp.h;Middlewares\Third_Party\LwIP\src\include\lwip\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\netbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\netdb.h;Middlewares\Third_Party\LwIP\src\include\lwip\netif.h;Middlewares\Third_Party\LwIP\src\include\lwip\netifapi.h;Middlewares\Third_Party\LwIP\src\include\lwip\opt.h;Middlewares\Third_Party\LwIP\src\include\lwip\pbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\raw.h;Middlewares\Third_Party\LwIP\src\include\lwip\sio.h;Middlewares\Third_Party\LwIP\src\include\lwip\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\sockets.h;Middlewares\Third_Party\LwIP\src\include\lwip\stats.h;Middlewares\Third_Party\LwIP\src\include\lwip\sys.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcpip.h;Middlewares\Third_Party\LwIP\src\include\lwip\timeouts.h;Middlewares\Third_Party\LwIP\src\include\lwip\udp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\fs.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\lwiperf.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmpv3.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_core.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_mib2.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_scalar.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_table.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_threadsync.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_server.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\api_msg.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_std.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\nd6_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcpip_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ethernet.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\udp.h;Middlewares\Third_Party\LwIP\src\include\netif\etharp.h;Middlewares\Third_Party\LwIP\src\include\netif\ethernet.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\slipif.h;Middlewares\Third_Party\LwIP\src\include\posix\errno.h;Middlewares\Third_Party\LwIP\src\include\posix\netdb.h;Middlewares\Third_Party\LwIP\src\include\posix\sys\socket.h;Middlewares\Third_Party\LwIP\system\arch\bpstruct.h;Middlewares\Third_Party\LwIP\system\arch\cc.h;Middlewares\Third_Party\LwIP\system\arch\cpu.h;Middlewares\Third_Party\LwIP\system\arch\epstruct.h;Middlewares\Third_Party\LwIP\system\arch\init.h;Middlewares\Third_Party\LwIP\system\arch\lib.h;Middlewares\Third_Party\LwIP\system\arch\perf.h;Middlewares\Third_Party\LwIP\system\arch\sys_arch.h;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c;Middlewares\Third_Party\LwIP\src\include\lwip\api.h;Middlewares\Third_Party\LwIP\src\include\lwip\arch.h;Middlewares\Third_Party\LwIP\src\include\lwip\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\debug.h;Middlewares\Third_Party\LwIP\src\include\lwip\def.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\dhcp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\err.h;Middlewares\Third_Party\LwIP\src\include\lwip\errno.h;Middlewares\Third_Party\LwIP\src\include\lwip\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\ethip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet.h;Middlewares\Third_Party\LwIP\src\include\lwip\inet_chksum.h;Middlewares\Third_Party\LwIP\src\include\lwip\init.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip4_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip6_frag.h;Middlewares\Third_Party\LwIP\src\include\lwip\ip_addr.h;Middlewares\Third_Party\LwIP\src\include\lwip\mem.h;Middlewares\Third_Party\LwIP\src\include\lwip\memp.h;Middlewares\Third_Party\LwIP\src\include\lwip\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\netbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\netdb.h;Middlewares\Third_Party\LwIP\src\include\lwip\netif.h;Middlewares\Third_Party\LwIP\src\include\lwip\netifapi.h;Middlewares\Third_Party\LwIP\src\include\lwip\opt.h;Middlewares\Third_Party\LwIP\src\include\lwip\pbuf.h;Middlewares\Third_Party\LwIP\src\include\lwip\raw.h;Middlewares\Third_Party\LwIP\src\include\lwip\sio.h;Middlewares\Third_Party\LwIP\src\include\lwip\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\sockets.h;Middlewares\Third_Party\LwIP\src\include\lwip\stats.h;Middlewares\Third_Party\LwIP\src\include\lwip\sys.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\tcpip.h;Middlewares\Third_Party\LwIP\src\include\lwip\timeouts.h;Middlewares\Third_Party\LwIP\src\include\lwip\udp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\fs.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\httpd_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\lwiperf.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mdns_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\mqtt_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\netbiosns_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmpv3.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_core.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_mib2.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_scalar.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_table.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\snmp_threadsync.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\sntp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_opts.h;Middlewares\Third_Party\LwIP\src\include\lwip\apps\tftp_server.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\api_msg.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\memp_std.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\nd6_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcpip_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\priv\tcp_priv.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\autoip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dhcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\dns.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\etharp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ethernet.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\icmp6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\igmp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip4.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\ip6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\mld6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\nd6.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\tcp.h;Middlewares\Third_Party\LwIP\src\include\lwip\prot\udp.h;Middlewares\Third_Party\LwIP\src\include\netif\etharp.h;Middlewares\Third_Party\LwIP\src\include\netif\ethernet.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6.h;Middlewares\Third_Party\LwIP\src\include\netif\lowpan6_opts.h;Middlewares\Third_Party\LwIP\src\include\netif\slipif.h;Middlewares\Third_Party\LwIP\src\include\posix\errno.h;Middlewares\Third_Party\LwIP\src\include\posix\netdb.h;Middlewares\Third_Party\LwIP\src\include\posix\sys\socket.h;Middlewares\Third_Party\LwIP\system\arch\bpstruct.h;Middlewares\Third_Party\LwIP\system\arch\cc.h;Middlewares\Third_Party\LwIP\system\arch\cpu.h;Middlewares\Third_Party\LwIP\system\arch\epstruct.h;Middlewares\Third_Party\LwIP\system\arch\init.h;Middlewares\Third_Party\LwIP\system\arch\lib.h;Middlewares\Third_Party\LwIP\system\arch\perf.h;Middlewares\Third_Party\LwIP\system\arch\sys_arch.h;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h; + +[PreviousUsedCubeIDEFiles] +SourceFiles=Core\Src\main.c;LWIP\App\lwip.c;LWIP\Target\ethernetif.c;Core\Src\stm32f2xx_it.c;Core\Src\stm32f2xx_hal_msp.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_eth.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_cortex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_gpio.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_exti.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_uart.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_ll_usb.c;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c;Core\Src\system_stm32f2xx.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_eth.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_rcc_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_cortex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_flash_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pwr_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_gpio.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_dma_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_exti.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_tim_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_uart.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd_ex.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_hal_pcd.c;Drivers\STM32F2xx_HAL_Driver\Src\stm32f2xx_ll_usb.c;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c;Core\Src\system_stm32f2xx.c;;;Middlewares\Third_Party\LwIP\src\netif\ppp\auth.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ccp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap_ms.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-md5.c;Middlewares\Third_Party\LwIP\src\netif\ppp\chap-new.c;Middlewares\Third_Party\LwIP\src\netif\ppp\demand.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\eui64.c;Middlewares\Third_Party\LwIP\src\netif\ppp\fsm.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ipv6cp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\lcp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\magic.c;Middlewares\Third_Party\LwIP\src\netif\ppp\mppe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\multilink.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ppp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppapi.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppcrypt.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppoe.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppol2tp.c;Middlewares\Third_Party\LwIP\src\netif\ppp\pppos.c;Middlewares\Third_Party\LwIP\src\netif\ppp\upap.c;Middlewares\Third_Party\LwIP\src\netif\ppp\utils.c;Middlewares\Third_Party\LwIP\src\netif\ppp\vj.c;Middlewares\Third_Party\LwIP\src\netif\ethernet.c;Middlewares\Third_Party\LwIP\src\netif\slipif.c;Middlewares\Third_Party\LwIP\src\netif\lowpan6.c;Middlewares\Third_Party\LwIP\src\netif\ppp\ecp.c;Middlewares\Third_Party\LwIP\src\api\api_lib.c;Middlewares\Third_Party\LwIP\src\api\api_msg.c;Middlewares\Third_Party\LwIP\src\api\err.c;Middlewares\Third_Party\LwIP\src\api\netbuf.c;Middlewares\Third_Party\LwIP\src\api\netdb.c;Middlewares\Third_Party\LwIP\src\api\netifapi.c;Middlewares\Third_Party\LwIP\src\api\sockets.c;Middlewares\Third_Party\LwIP\src\api\tcpip.c;Middlewares\Third_Party\LwIP\src\core\def.c;Middlewares\Third_Party\LwIP\src\core\dns.c;Middlewares\Third_Party\LwIP\src\core\inet_chksum.c;Middlewares\Third_Party\LwIP\src\core\init.c;Middlewares\Third_Party\LwIP\src\core\ip.c;Middlewares\Third_Party\LwIP\src\core\mem.c;Middlewares\Third_Party\LwIP\src\core\memp.c;Middlewares\Third_Party\LwIP\src\core\netif.c;Middlewares\Third_Party\LwIP\src\core\pbuf.c;Middlewares\Third_Party\LwIP\src\core\raw.c;Middlewares\Third_Party\LwIP\src\core\stats.c;Middlewares\Third_Party\LwIP\src\core\sys.c;Middlewares\Third_Party\LwIP\src\core\tcp.c;Middlewares\Third_Party\LwIP\src\core\tcp_in.c;Middlewares\Third_Party\LwIP\src\core\tcp_out.c;Middlewares\Third_Party\LwIP\src\core\timeouts.c;Middlewares\Third_Party\LwIP\src\core\udp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\autoip.c;Middlewares\Third_Party\LwIP\src\core\ipv4\dhcp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\etharp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\icmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\igmp.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv4\ip4_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\dhcp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ethip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\icmp6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\inet6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_addr.c;Middlewares\Third_Party\LwIP\src\core\ipv6\ip6_frag.c;Middlewares\Third_Party\LwIP\src\core\ipv6\mld6.c;Middlewares\Third_Party\LwIP\src\core\ipv6\nd6.c;Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c; +HeaderPath=Middlewares\Third_Party\LwIP\src\include;Middlewares\Third_Party\LwIP\system;Middlewares\Third_Party\LwIP\src\include;Middlewares\Third_Party\LwIP\system;Drivers\STM32F2xx_HAL_Driver\Inc;Drivers\STM32F2xx_HAL_Driver\Inc\Legacy;Middlewares\Third_Party\LwIP\src\include\netif\ppp;Drivers\CMSIS\Device\ST\STM32F2xx\Include;Middlewares\Third_Party\LwIP\src\include\lwip;Middlewares\Third_Party\LwIP\src\include\lwip\apps;Middlewares\Third_Party\LwIP\src\include\lwip\priv;Middlewares\Third_Party\LwIP\src\include\lwip\prot;Middlewares\Third_Party\LwIP\src\include\netif;Middlewares\Third_Party\LwIP\src\include\posix;Middlewares\Third_Party\LwIP\src\include\posix\sys;Middlewares\Third_Party\LwIP\system\arch;Drivers\CMSIS\Include;LWIP\App;LWIP\Target;Core\Inc; +CDefines=USE_HAL_DRIVER;STM32F207xx;USE_HAL_DRIVER;USE_HAL_DRIVER; + +[PreviousGenFiles] +AdvancedFolderStructure=true +HeaderFileListSize=6 +HeaderFiles#0=..\LWIP\App\lwip.h +HeaderFiles#1=..\LWIP\Target\lwipopts.h +HeaderFiles#2=..\LWIP\Target\ethernetif.h +HeaderFiles#3=..\Core\Inc\stm32f2xx_it.h +HeaderFiles#4=..\Core\Inc\stm32f2xx_hal_conf.h +HeaderFiles#5=..\Core\Inc\main.h +HeaderFolderListSize=3 +HeaderPath#0=..\LWIP\App +HeaderPath#1=..\LWIP\Target +HeaderPath#2=..\Core\Inc +HeaderFiles=; +SourceFileListSize=5 +SourceFiles#0=..\LWIP\App\lwip.c +SourceFiles#1=..\LWIP\Target\ethernetif.c +SourceFiles#2=..\Core\Src\stm32f2xx_it.c +SourceFiles#3=..\Core\Src\stm32f2xx_hal_msp.c +SourceFiles#4=..\Core\Src\main.c +SourceFolderListSize=3 +SourcePath#0=..\LWIP\App +SourcePath#1=..\LWIP\Target +SourcePath#2=..\Core\Src +SourceFiles=; + diff --git a/STM32_Nucleo207ZG/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs b/STM32_Nucleo207ZG/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs new file mode 100644 index 0000000..9a16796 --- /dev/null +++ b/STM32_Nucleo207ZG/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}} diff --git a/STM32_Nucleo207ZG/.settings/language.settings.xml b/STM32_Nucleo207ZG/.settings/language.settings.xml index ec9e5d6..80e9c59 100644 --- a/STM32_Nucleo207ZG/.settings/language.settings.xml +++ b/STM32_Nucleo207ZG/.settings/language.settings.xml @@ -1,25 +1,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/STM32_Nucleo207ZG/.settings/stm32cubeide.project.prefs b/STM32_Nucleo207ZG/.settings/stm32cubeide.project.prefs index 1f541e9..b2dba1f 100644 --- a/STM32_Nucleo207ZG/.settings/stm32cubeide.project.prefs +++ b/STM32_Nucleo207ZG/.settings/stm32cubeide.project.prefs @@ -1,5 +1,5 @@ 635E684B79701B039C64EA45C3F84D30=69A4CAFBC9798F89E7360B5951139754 66BE74F758C12D739921AEA421D593D3=2 -8DF89ED150041C4CBC7CB9A9CAA90856=0B032E6CA2DA44DC3729688931594854 -DC22A860405A8BF2F2C095E5B6529F12=0B032E6CA2DA44DC3729688931594854 +8DF89ED150041C4CBC7CB9A9CAA90856=3E53B9C9452EF7B1B30296F9087A7B52 +DC22A860405A8BF2F2C095E5B6529F12=3E53B9C9452EF7B1B30296F9087A7B52 eclipse.preferences.version=1 diff --git a/STM32_Nucleo207ZG/Core/Inc/main.h b/STM32_Nucleo207ZG/Core/Inc/main.h index f54f2b8..fc6a885 100644 --- a/STM32_Nucleo207ZG/Core/Inc/main.h +++ b/STM32_Nucleo207ZG/Core/Inc/main.h @@ -1,139 +1,139 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - * Copyright (c) 2022 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f2xx_hal.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Exported types ------------------------------------------------------------*/ -/* USER CODE BEGIN ET */ - -/* USER CODE END ET */ - -/* Exported constants --------------------------------------------------------*/ -/* USER CODE BEGIN EC */ - -/* USER CODE END EC */ - -/* Exported macro ------------------------------------------------------------*/ -/* USER CODE BEGIN EM */ - -/* USER CODE END EM */ - -void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); - -/* Exported functions prototypes ---------------------------------------------*/ -void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define USER_Btn_Pin GPIO_PIN_13 -#define USER_Btn_GPIO_Port GPIOC -#define MCO_Pin GPIO_PIN_0 -#define MCO_GPIO_Port GPIOH -#define RMII_MDC_Pin GPIO_PIN_1 -#define RMII_MDC_GPIO_Port GPIOC -#define RMII_REF_CLK_Pin GPIO_PIN_1 -#define RMII_REF_CLK_GPIO_Port GPIOA -#define RMII_MDIO_Pin GPIO_PIN_2 -#define RMII_MDIO_GPIO_Port GPIOA -#define PWM5_Pin GPIO_PIN_6 -#define PWM5_GPIO_Port GPIOA -#define RMII_CRS_DV_Pin GPIO_PIN_7 -#define RMII_CRS_DV_GPIO_Port GPIOA -#define RMII_RXD0_Pin GPIO_PIN_4 -#define RMII_RXD0_GPIO_Port GPIOC -#define RMII_RXD1_Pin GPIO_PIN_5 -#define RMII_RXD1_GPIO_Port GPIOC -#define LD1_Pin GPIO_PIN_0 -#define LD1_GPIO_Port GPIOB -#define PWM6_Pin GPIO_PIN_1 -#define PWM6_GPIO_Port GPIOB -#define PWM1_Pin GPIO_PIN_9 -#define PWM1_GPIO_Port GPIOE -#define PWM2_Pin GPIO_PIN_11 -#define PWM2_GPIO_Port GPIOE -#define PWM3_Pin GPIO_PIN_13 -#define PWM3_GPIO_Port GPIOE -#define PWM4_Pin GPIO_PIN_14 -#define PWM4_GPIO_Port GPIOE -#define RMII_TXD1_Pin GPIO_PIN_13 -#define RMII_TXD1_GPIO_Port GPIOB -#define LD3_Pin GPIO_PIN_14 -#define LD3_GPIO_Port GPIOB -#define STLK_RX_Pin GPIO_PIN_8 -#define STLK_RX_GPIO_Port GPIOD -#define STLK_TX_Pin GPIO_PIN_9 -#define STLK_TX_GPIO_Port GPIOD -#define USB_PowerSwitchOn_Pin GPIO_PIN_6 -#define USB_PowerSwitchOn_GPIO_Port GPIOG -#define USB_OverCurrent_Pin GPIO_PIN_7 -#define USB_OverCurrent_GPIO_Port GPIOG -#define PWM7_Pin GPIO_PIN_7 -#define PWM7_GPIO_Port GPIOC -#define PWM8_Pin GPIO_PIN_8 -#define PWM8_GPIO_Port GPIOC -#define USB_SOF_Pin GPIO_PIN_8 -#define USB_SOF_GPIO_Port GPIOA -#define USB_VBUS_Pin GPIO_PIN_9 -#define USB_VBUS_GPIO_Port GPIOA -#define USB_ID_Pin GPIO_PIN_10 -#define USB_ID_GPIO_Port GPIOA -#define USB_DM_Pin GPIO_PIN_11 -#define USB_DM_GPIO_Port GPIOA -#define USB_DP_Pin GPIO_PIN_12 -#define USB_DP_GPIO_Port GPIOA -#define TMS_Pin GPIO_PIN_13 -#define TMS_GPIO_Port GPIOA -#define TCK_Pin GPIO_PIN_14 -#define TCK_GPIO_Port GPIOA -#define RMII_TX_EN_Pin GPIO_PIN_11 -#define RMII_TX_EN_GPIO_Port GPIOG -#define RMII_TXD0_Pin GPIO_PIN_13 -#define RMII_TXD0_GPIO_Port GPIOG -#define SWO_Pin GPIO_PIN_3 -#define SWO_GPIO_Port GPIOB -#define LD2_Pin GPIO_PIN_7 -#define LD2_GPIO_Port GPIOB - -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.h + * @brief : Header for main.c file. + * This file contains the common defines of the application. + ****************************************************************************** + * @attention + * + * Copyright (c) 2022 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MAIN_H +#define __MAIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32f2xx_hal.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); + +/* Exported functions prototypes ---------------------------------------------*/ +void Error_Handler(void); + +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +/* Private defines -----------------------------------------------------------*/ +#define USER_Btn_Pin GPIO_PIN_13 +#define USER_Btn_GPIO_Port GPIOC +#define MCO_Pin GPIO_PIN_0 +#define MCO_GPIO_Port GPIOH +#define RMII_MDC_Pin GPIO_PIN_1 +#define RMII_MDC_GPIO_Port GPIOC +#define RMII_REF_CLK_Pin GPIO_PIN_1 +#define RMII_REF_CLK_GPIO_Port GPIOA +#define RMII_MDIO_Pin GPIO_PIN_2 +#define RMII_MDIO_GPIO_Port GPIOA +#define PWM5_Pin GPIO_PIN_6 +#define PWM5_GPIO_Port GPIOA +#define RMII_CRS_DV_Pin GPIO_PIN_7 +#define RMII_CRS_DV_GPIO_Port GPIOA +#define RMII_RXD0_Pin GPIO_PIN_4 +#define RMII_RXD0_GPIO_Port GPIOC +#define RMII_RXD1_Pin GPIO_PIN_5 +#define RMII_RXD1_GPIO_Port GPIOC +#define LD1_Pin GPIO_PIN_0 +#define LD1_GPIO_Port GPIOB +#define PWM6_Pin GPIO_PIN_1 +#define PWM6_GPIO_Port GPIOB +#define PWM1_Pin GPIO_PIN_9 +#define PWM1_GPIO_Port GPIOE +#define PWM2_Pin GPIO_PIN_11 +#define PWM2_GPIO_Port GPIOE +#define PWM3_Pin GPIO_PIN_13 +#define PWM3_GPIO_Port GPIOE +#define PWM4_Pin GPIO_PIN_14 +#define PWM4_GPIO_Port GPIOE +#define RMII_TXD1_Pin GPIO_PIN_13 +#define RMII_TXD1_GPIO_Port GPIOB +#define LD3_Pin GPIO_PIN_14 +#define LD3_GPIO_Port GPIOB +#define STLK_RX_Pin GPIO_PIN_8 +#define STLK_RX_GPIO_Port GPIOD +#define STLK_TX_Pin GPIO_PIN_9 +#define STLK_TX_GPIO_Port GPIOD +#define USB_PowerSwitchOn_Pin GPIO_PIN_6 +#define USB_PowerSwitchOn_GPIO_Port GPIOG +#define USB_OverCurrent_Pin GPIO_PIN_7 +#define USB_OverCurrent_GPIO_Port GPIOG +#define PWM7_Pin GPIO_PIN_7 +#define PWM7_GPIO_Port GPIOC +#define PWM8_Pin GPIO_PIN_8 +#define PWM8_GPIO_Port GPIOC +#define USB_SOF_Pin GPIO_PIN_8 +#define USB_SOF_GPIO_Port GPIOA +#define USB_VBUS_Pin GPIO_PIN_9 +#define USB_VBUS_GPIO_Port GPIOA +#define USB_ID_Pin GPIO_PIN_10 +#define USB_ID_GPIO_Port GPIOA +#define USB_DM_Pin GPIO_PIN_11 +#define USB_DM_GPIO_Port GPIOA +#define USB_DP_Pin GPIO_PIN_12 +#define USB_DP_GPIO_Port GPIOA +#define TMS_Pin GPIO_PIN_13 +#define TMS_GPIO_Port GPIOA +#define TCK_Pin GPIO_PIN_14 +#define TCK_GPIO_Port GPIOA +#define RMII_TX_EN_Pin GPIO_PIN_11 +#define RMII_TX_EN_GPIO_Port GPIOG +#define RMII_TXD0_Pin GPIO_PIN_13 +#define RMII_TXD0_GPIO_Port GPIOG +#define SWO_Pin GPIO_PIN_3 +#define SWO_GPIO_Port GPIOB +#define LD2_Pin GPIO_PIN_7 +#define LD2_GPIO_Port GPIOB + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MAIN_H */ diff --git a/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_hal_conf.h b/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_hal_conf.h index 28af1a5..6fb7c3f 100644 --- a/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_hal_conf.h +++ b/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_hal_conf.h @@ -1,412 +1,412 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f2xx_hal_conf.h - * @brief HAL configuration file. - ****************************************************************************** - * @attention - * - * Copyright (c) 2016 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F2xx_HAL_CONF_H -#define __STM32F2xx_HAL_CONF_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ - -#define HAL_MODULE_ENABLED -/*#define HAL_ADC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_CAN_MODULE_ENABLED */ -/*#define HAL_CAN_LEGACY_MODULE_ENABLED */ -/*#define HAL_CRC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_DAC_MODULE_ENABLED */ -/*#define HAL_DCMI_MODULE_ENABLED */ -#define HAL_ETH_MODULE_ENABLED -/*#define HAL_NAND_MODULE_ENABLED */ -/*#define HAL_NOR_MODULE_ENABLED */ -/*#define HAL_PCCARD_MODULE_ENABLED */ -/*#define HAL_SRAM_MODULE_ENABLED */ -/*#define HAL_HASH_MODULE_ENABLED */ -/*#define HAL_I2C_MODULE_ENABLED */ -/*#define HAL_I2S_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ -/*#define HAL_RNG_MODULE_ENABLED */ -/*#define HAL_RTC_MODULE_ENABLED */ -/*#define HAL_SD_MODULE_ENABLED */ -/*#define HAL_MMC_MODULE_ENABLED */ -/*#define HAL_SPI_MODULE_ENABLED */ -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -/*#define HAL_USART_MODULE_ENABLED */ -/*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_WWDG_MODULE_ENABLED */ -#define HAL_PCD_MODULE_ENABLED -/*#define HAL_HCD_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED - -/* ########################## HSE/HSI Values adaptation ##################### */ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined (HSE_VALUE) - #define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined (HSI_VALUE) - #define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined (LSI_VALUE) - #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz - The real value may vary depending on the variations - in voltage and temperature.*/ -/** - * @brief External Low Speed oscillator (LSE) value. - - */ -#if !defined (LSE_VALUE) - #define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/ -#endif /* LSE_VALUE */ - -#if !defined (LSE_STARTUP_TIMEOUT) - #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/** - * @brief External clock source for I2S peripheral - * This value is used by the I2S HAL module to compute the I2S clock source - * frequency, this source is inserted directly through I2S_CKIN pad. - */ -#if !defined (EXTERNAL_CLOCK_VALUE) - #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External audio frequency in Hz*/ -#endif /* EXTERNAL_CLOCK_VALUE */ - -/* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - -/* ########################### System Configuration ######################### */ -/** - * @brief This is the HAL system configuration section - */ -#define VDD_VALUE 3300U /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY 0U /*!< tick interrupt priority */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 1U -#define INSTRUCTION_CACHE_ENABLE 1U -#define DATA_CACHE_ENABLE 1U - -#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ -#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ -#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ -#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ -#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ -#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ -#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ -#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ -#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ -#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ -#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ -#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ -#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ -#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ -#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ -#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ -#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ -#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ -#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ -#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ -#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ -#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ -#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ -#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ -#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ -#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ - -/* ########################## Assert Selection ############################## */ -/** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ -/* #define USE_FULL_ASSERT 1U */ - -/* ################## Ethernet peripheral configuration ##################### */ - -/* Section 1 : Ethernet peripheral configuration */ - -/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ -#define MAC_ADDR0 2U -#define MAC_ADDR1 0U -#define MAC_ADDR2 0U -#define MAC_ADDR3 0U -#define MAC_ADDR4 0U -#define MAC_ADDR5 0U - -/* Definition of the Ethernet driver buffers size and count */ -#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ -#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ -#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ -#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ - -/* Section 2: PHY configuration section */ - -/* LAN8742A_PHY_ADDRESS Address*/ -#define LAN8742A_PHY_ADDRESS 0U -/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ -#define PHY_RESET_DELAY 0x000000FFU -/* PHY Configuration delay */ -#define PHY_CONFIG_DELAY 0x00000FFFU - -#define PHY_READ_TO 0x0000FFFFU -#define PHY_WRITE_TO 0x0000FFFFU - -/* Section 3: Common PHY Registers */ - -#define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */ -#define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */ - -#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ -#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ -#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ -#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ -#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ -#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ -#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ -#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ -#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ -#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ - -#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ -#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ -#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ - -/* Section 4: Extended PHY Registers */ -#define PHY_SR ((uint16_t)0x10) /*!< PHY status register Offset */ - -#define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ -#define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ - -#define PHY_ISFR ((uint16_t)0x001D) /*!< PHY Interrupt Source Flag register Offset */ -#define PHY_ISFR_INT4 ((uint16_t)0x000B) /*!< PHY Link down inturrupt */ - -/* ################## SPI peripheral configuration ########################## */ - -/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver -* Activated: CRC code is present inside driver -* Deactivated: CRC code cleaned from driver -*/ - -#define USE_SPI_CRC 0U - -/* Includes ------------------------------------------------------------------*/ -/** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED - #include "stm32f2xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED - #include "stm32f2xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_EXTI_MODULE_ENABLED - #include "stm32f2xx_hal_exti.h" -#endif /* HAL_EXTI_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED - #include "stm32f2xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED - #include "stm32f2xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED - #include "stm32f2xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_CAN_MODULE_ENABLED - #include "stm32f2xx_hal_can.h" -#endif /* HAL_CAN_MODULE_ENABLED */ - -#ifdef HAL_CAN_LEGACY_MODULE_ENABLED - #include "stm32f2xx_hal_can_legacy.h" -#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED - #include "stm32f2xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED - #include "stm32f2xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED - #include "stm32f2xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_DCMI_MODULE_ENABLED - #include "stm32f2xx_hal_dcmi.h" -#endif /* HAL_DCMI_MODULE_ENABLED */ - -#ifdef HAL_ETH_MODULE_ENABLED - #include "stm32f2xx_hal_eth.h" -#endif /* HAL_ETH_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED - #include "stm32f2xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_SRAM_MODULE_ENABLED - #include "stm32f2xx_hal_sram.h" -#endif /* HAL_SRAM_MODULE_ENABLED */ - -#ifdef HAL_NOR_MODULE_ENABLED - #include "stm32f2xx_hal_nor.h" -#endif /* HAL_NOR_MODULE_ENABLED */ - -#ifdef HAL_NAND_MODULE_ENABLED - #include "stm32f2xx_hal_nand.h" -#endif /* HAL_NAND_MODULE_ENABLED */ - -#ifdef HAL_PCCARD_MODULE_ENABLED - #include "stm32f2xx_hal_pccard.h" -#endif /* HAL_PCCARD_MODULE_ENABLED */ - -#ifdef HAL_HASH_MODULE_ENABLED - #include "stm32f2xx_hal_hash.h" -#endif /* HAL_HASH_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED - #include "stm32f2xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED - #include "stm32f2xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED - #include "stm32f2xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED - #include "stm32f2xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED - #include "stm32f2xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED - #include "stm32f2xx_hal_rtc.h" -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SD_MODULE_ENABLED - #include "stm32f2xx_hal_sd.h" -#endif /* HAL_SD_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED - #include "stm32f2xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED - #include "stm32f2xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED - #include "stm32f2xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED - #include "stm32f2xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED - #include "stm32f2xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED - #include "stm32f2xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED - #include "stm32f2xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED - #include "stm32f2xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -#ifdef HAL_HCD_MODULE_ENABLED - #include "stm32f2xx_hal_hcd.h" -#endif /* HAL_HCD_MODULE_ENABLED */ - -#ifdef HAL_MMC_MODULE_ENABLED - #include "stm32f2xx_hal_mmc.h" -#endif /* HAL_MMC_MODULE_ENABLED */ -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT -/** - * @brief The assert_param macro is used for function's parameters check. - * @param expr If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ - #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) -/* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t* file, uint32_t line); -#else - #define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F2xx_HAL_CONF_H */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f2xx_hal_conf.h + * @brief HAL configuration file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2016 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F2xx_HAL_CONF_H +#define __STM32F2xx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ + +#define HAL_MODULE_ENABLED +/*#define HAL_ADC_MODULE_ENABLED */ +/*#define HAL_CRYP_MODULE_ENABLED */ +/*#define HAL_CAN_MODULE_ENABLED */ +/*#define HAL_CAN_LEGACY_MODULE_ENABLED */ +/*#define HAL_CRC_MODULE_ENABLED */ +/*#define HAL_CRYP_MODULE_ENABLED */ +/*#define HAL_DAC_MODULE_ENABLED */ +/*#define HAL_DCMI_MODULE_ENABLED */ +#define HAL_ETH_MODULE_ENABLED +/*#define HAL_NAND_MODULE_ENABLED */ +/*#define HAL_NOR_MODULE_ENABLED */ +/*#define HAL_PCCARD_MODULE_ENABLED */ +/*#define HAL_SRAM_MODULE_ENABLED */ +/*#define HAL_HASH_MODULE_ENABLED */ +/*#define HAL_I2C_MODULE_ENABLED */ +/*#define HAL_I2S_MODULE_ENABLED */ +/*#define HAL_IWDG_MODULE_ENABLED */ +/*#define HAL_RNG_MODULE_ENABLED */ +/*#define HAL_RTC_MODULE_ENABLED */ +/*#define HAL_SD_MODULE_ENABLED */ +/*#define HAL_MMC_MODULE_ENABLED */ +/*#define HAL_SPI_MODULE_ENABLED */ +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +/*#define HAL_USART_MODULE_ENABLED */ +/*#define HAL_IRDA_MODULE_ENABLED */ +/*#define HAL_SMARTCARD_MODULE_ENABLED */ +/*#define HAL_WWDG_MODULE_ENABLED */ +#define HAL_PCD_MODULE_ENABLED +/*#define HAL_HCD_MODULE_ENABLED */ +#define HAL_GPIO_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) + #define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) + #define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) + #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature.*/ +/** + * @brief External Low Speed oscillator (LSE) value. + + */ +#if !defined (LSE_VALUE) + #define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) + #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External audio frequency in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY 0U /*!< tick interrupt priority */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U +#define INSTRUCTION_CACHE_ENABLE 1U +#define DATA_CACHE_ENABLE 1U + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ + +/* LAN8742A_PHY_ADDRESS Address*/ +#define LAN8742A_PHY_ADDRESS 0U +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ +#define PHY_SR ((uint16_t)0x10) /*!< PHY status register Offset */ + +#define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ + +#define PHY_ISFR ((uint16_t)0x001D) /*!< PHY Interrupt Source Flag register Offset */ +#define PHY_ISFR_INT4 ((uint16_t)0x000B) /*!< PHY Link down inturrupt */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ + +#define USE_SPI_CRC 0U + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32f2xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32f2xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32f2xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32f2xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32f2xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32f2xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED + #include "stm32f2xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #include "stm32f2xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32f2xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED + #include "stm32f2xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32f2xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED + #include "stm32f2xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED + #include "stm32f2xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32f2xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED + #include "stm32f2xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED + #include "stm32f2xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED + #include "stm32f2xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED + #include "stm32f2xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED + #include "stm32f2xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32f2xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32f2xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32f2xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32f2xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED + #include "stm32f2xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32f2xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED + #include "stm32f2xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32f2xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32f2xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32f2xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32f2xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32f2xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32f2xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32f2xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32f2xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED + #include "stm32f2xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32f2xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F2xx_HAL_CONF_H */ diff --git a/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_it.h b/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_it.h index d656f3a..dead697 100644 --- a/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_it.h +++ b/STM32_Nucleo207ZG/Core/Inc/stm32f2xx_it.h @@ -1,67 +1,67 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f2xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * @attention - * - * Copyright (c) 2022 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F2xx_IT_H -#define __STM32F2xx_IT_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Exported types ------------------------------------------------------------*/ -/* USER CODE BEGIN ET */ - -/* USER CODE END ET */ - -/* Exported constants --------------------------------------------------------*/ -/* USER CODE BEGIN EC */ - -/* USER CODE END EC */ - -/* Exported macro ------------------------------------------------------------*/ -/* USER CODE BEGIN EM */ - -/* USER CODE END EM */ - -/* Exported functions prototypes ---------------------------------------------*/ -void NMI_Handler(void); -void HardFault_Handler(void); -void MemManage_Handler(void); -void BusFault_Handler(void); -void UsageFault_Handler(void); -void SVC_Handler(void); -void DebugMon_Handler(void); -void PendSV_Handler(void); -void SysTick_Handler(void); -void TIM7_IRQHandler(void); -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32F2xx_IT_H */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f2xx_it.h + * @brief This file contains the headers of the interrupt handlers. + ****************************************************************************** + * @attention + * + * Copyright (c) 2022 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F2xx_IT_H +#define __STM32F2xx_IT_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); +void TIM7_IRQHandler(void); +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F2xx_IT_H */ diff --git a/STM32_Nucleo207ZG/Core/Src/main.c b/STM32_Nucleo207ZG/Core/Src/main.c index c502a88..53c159c 100644 --- a/STM32_Nucleo207ZG/Core/Src/main.c +++ b/STM32_Nucleo207ZG/Core/Src/main.c @@ -1,637 +1,727 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.c - * @brief : Main program body - ****************************************************************************** - * @attention - * - * Copyright (c) 2022 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "lwip.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -#include "mqtt.h" -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN PTD */ - -/* USER CODE END PTD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ -const uint32_t cMqttServerIpAddr_u32 = 0xC0A80000; // 192.168.0.0 -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -TIM_HandleTypeDef htim1; -TIM_HandleTypeDef htim3; -TIM_HandleTypeDef htim7; - -UART_HandleTypeDef huart3; - -PCD_HandleTypeDef hpcd_USB_OTG_FS; - -/* USER CODE BEGIN PV */ -static mqtt_client_t mqtt_static_client; -static int inpub_id; -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); -static void MX_GPIO_Init(void); -static void MX_USART3_UART_Init(void); -static void MX_USB_OTG_FS_PCD_Init(void); -static void MX_TIM1_Init(void); -static void MX_TIM3_Init(void); -static void MX_TIM7_Init(void); -/* USER CODE BEGIN PFP */ -static void MQTTConnect (mqtt_client_t *client); -static void mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t status); -static void mqtt_sub_request_cb(void *arg, err_t result); -static void mqtt_incoming_publish_cb(void *arg, const char *topic, u32_t tot_len); -static void mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t flags); -static void example_publish(mqtt_client_t *client, void *arg); -static void mqtt_pub_request_cb(void *arg, err_t result); -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - MX_USART3_UART_Init(); - MX_USB_OTG_FS_PCD_Init(); - MX_TIM1_Init(); - MX_TIM3_Init(); - MX_TIM7_Init(); - MX_LWIP_Init(); - /* USER CODE BEGIN 2 */ - - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - } - /* USER CODE END 3 */ -} - -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = 13; - RCC_OscInitStruct.PLL.PLLN = 195; - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - RCC_OscInitStruct.PLL.PLLQ = 5; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - Error_Handler(); - } - - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK - |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) - { - Error_Handler(); - } -} - -/** - * @brief TIM1 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM1_Init(void) -{ - - /* USER CODE BEGIN TIM1_Init 0 */ - - /* USER CODE END TIM1_Init 0 */ - - TIM_ClockConfigTypeDef sClockSourceConfig = {0}; - TIM_MasterConfigTypeDef sMasterConfig = {0}; - TIM_OC_InitTypeDef sConfigOC = {0}; - TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; - - /* USER CODE BEGIN TIM1_Init 1 */ - - /* USER CODE END TIM1_Init 1 */ - htim1.Instance = TIM1; - htim1.Init.Prescaler = 0; - htim1.Init.CounterMode = TIM_COUNTERMODE_UP; - htim1.Init.Period = 16383; - htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - htim1.Init.RepetitionCounter = 0; - htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - if (HAL_TIM_Base_Init(&htim1) != HAL_OK) - { - Error_Handler(); - } - sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; - if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_Init(&htim1) != HAL_OK) - { - Error_Handler(); - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) - { - Error_Handler(); - } - sConfigOC.OCMode = TIM_OCMODE_PWM1; - sConfigOC.Pulse = 0; - sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; - sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH; - sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; - sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET; - sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET; - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) - { - Error_Handler(); - } - sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; - sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; - sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; - sBreakDeadTimeConfig.DeadTime = 0; - sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; - sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; - sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; - if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN TIM1_Init 2 */ - - /* USER CODE END TIM1_Init 2 */ - HAL_TIM_MspPostInit(&htim1); - -} - -/** - * @brief TIM3 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM3_Init(void) -{ - - /* USER CODE BEGIN TIM3_Init 0 */ - - /* USER CODE END TIM3_Init 0 */ - - TIM_ClockConfigTypeDef sClockSourceConfig = {0}; - TIM_MasterConfigTypeDef sMasterConfig = {0}; - TIM_OC_InitTypeDef sConfigOC = {0}; - - /* USER CODE BEGIN TIM3_Init 1 */ - - /* USER CODE END TIM3_Init 1 */ - htim3.Instance = TIM3; - htim3.Init.Prescaler = 0; - htim3.Init.CounterMode = TIM_COUNTERMODE_UP; - htim3.Init.Period = 16383; - htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - if (HAL_TIM_Base_Init(&htim3) != HAL_OK) - { - Error_Handler(); - } - sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; - if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_Init(&htim3) != HAL_OK) - { - Error_Handler(); - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK) - { - Error_Handler(); - } - sConfigOC.OCMode = TIM_OCMODE_PWM1; - sConfigOC.Pulse = 0; - sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; - sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) - { - Error_Handler(); - } - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN TIM3_Init 2 */ - - /* USER CODE END TIM3_Init 2 */ - HAL_TIM_MspPostInit(&htim3); - -} - -/** - * @brief TIM7 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM7_Init(void) -{ - - /* USER CODE BEGIN TIM7_Init 0 */ - - /* USER CODE END TIM7_Init 0 */ - - TIM_MasterConfigTypeDef sMasterConfig = {0}; - - /* USER CODE BEGIN TIM7_Init 1 */ - - /* USER CODE END TIM7_Init 1 */ - htim7.Instance = TIM7; - htim7.Init.Prescaler = 120; - htim7.Init.CounterMode = TIM_COUNTERMODE_UP; - htim7.Init.Period = 1000; - htim7.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - if (HAL_TIM_Base_Init(&htim7) != HAL_OK) - { - Error_Handler(); - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - if (HAL_TIMEx_MasterConfigSynchronization(&htim7, &sMasterConfig) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN TIM7_Init 2 */ - - /* USER CODE END TIM7_Init 2 */ - -} - -/** - * @brief USART3 Initialization Function - * @param None - * @retval None - */ -static void MX_USART3_UART_Init(void) -{ - - /* USER CODE BEGIN USART3_Init 0 */ - - /* USER CODE END USART3_Init 0 */ - - /* USER CODE BEGIN USART3_Init 1 */ - - /* USER CODE END USART3_Init 1 */ - huart3.Instance = USART3; - huart3.Init.BaudRate = 115200; - huart3.Init.WordLength = UART_WORDLENGTH_8B; - huart3.Init.StopBits = UART_STOPBITS_1; - huart3.Init.Parity = UART_PARITY_NONE; - huart3.Init.Mode = UART_MODE_TX_RX; - huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; - huart3.Init.OverSampling = UART_OVERSAMPLING_16; - if (HAL_UART_Init(&huart3) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN USART3_Init 2 */ - - /* USER CODE END USART3_Init 2 */ - -} - -/** - * @brief USB_OTG_FS Initialization Function - * @param None - * @retval None - */ -static void MX_USB_OTG_FS_PCD_Init(void) -{ - - /* USER CODE BEGIN USB_OTG_FS_Init 0 */ - - /* USER CODE END USB_OTG_FS_Init 0 */ - - /* USER CODE BEGIN USB_OTG_FS_Init 1 */ - - /* USER CODE END USB_OTG_FS_Init 1 */ - hpcd_USB_OTG_FS.Instance = USB_OTG_FS; - hpcd_USB_OTG_FS.Init.dev_endpoints = 4; - hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL; - hpcd_USB_OTG_FS.Init.dma_enable = DISABLE; - hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED; - hpcd_USB_OTG_FS.Init.Sof_enable = ENABLE; - hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE; - hpcd_USB_OTG_FS.Init.vbus_sensing_enable = ENABLE; - hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE; - if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN USB_OTG_FS_Init 2 */ - - /* USER CODE END USB_OTG_FS_Init 2 */ - -} - -/** - * @brief GPIO Initialization Function - * @param None - * @retval None - */ -static void MX_GPIO_Init(void) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; -/* USER CODE BEGIN MX_GPIO_Init_1 */ -/* USER CODE END MX_GPIO_Init_1 */ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOH_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - __HAL_RCC_GPIOE_CLK_ENABLE(); - __HAL_RCC_GPIOD_CLK_ENABLE(); - __HAL_RCC_GPIOG_CLK_ENABLE(); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOB, LD1_Pin|LD3_Pin|LD2_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(USB_PowerSwitchOn_GPIO_Port, USB_PowerSwitchOn_Pin, GPIO_PIN_RESET); - - /*Configure GPIO pin : USER_Btn_Pin */ - GPIO_InitStruct.Pin = USER_Btn_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(USER_Btn_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pins : LD1_Pin LD3_Pin LD2_Pin */ - GPIO_InitStruct.Pin = LD1_Pin|LD3_Pin|LD2_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - - /*Configure GPIO pin : USB_PowerSwitchOn_Pin */ - GPIO_InitStruct.Pin = USB_PowerSwitchOn_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(USB_PowerSwitchOn_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : USB_OverCurrent_Pin */ - GPIO_InitStruct.Pin = USB_OverCurrent_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(USB_OverCurrent_GPIO_Port, &GPIO_InitStruct); - -/* USER CODE BEGIN MX_GPIO_Init_2 */ -/* USER CODE END MX_GPIO_Init_2 */ -} - -/* USER CODE BEGIN 4 */ -static void MQTTConnect (mqtt_client_t *client) -{ - struct mqtt_connect_client_info_t ci; - err_t err; - - /* Setup an empty client info structure */ - memset(&ci, 0, sizeof(ci)); - - /* Minimal amount of information required is client identifier, so set it here */ - ci.client_id = "lwip_test"; - - /* Initiate client and connect to server, if this fails immediately an error code is returned - otherwise mqtt_connection_cb will be called with connection result after attempting - to establish a connection with the server. - For now MQTT version 3.1.1 is always used */ - - err = mqtt_client_connect(client, cMqttServerIpAddr_u32, MQTT_PORT, mqtt_connection_cb, 0, &ci); - - /* For now just print the result code if something goes wrong */ - if(err != ERR_OK) { - printf("mqtt_connect return %d\n", err); - } -} - -static void mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t status) -{ - err_t err; - if(status == MQTT_CONNECT_ACCEPTED) { - printf("mqtt_connection_cb: Successfully connected\n"); - - /* Setup callback for incoming publish requests */ - mqtt_set_inpub_callback(client, mqtt_incoming_publish_cb, mqtt_incoming_data_cb, arg); - - /* Subscribe to a topic named "subtopic" with QoS level 1, call mqtt_sub_request_cb with result */ - err = mqtt_subscribe(client, "subtopic", 1, mqtt_sub_request_cb, arg); - - if(err != ERR_OK) { - printf("mqtt_subscribe return: %d\n", err); - } - } else { - printf("mqtt_connection_cb: Disconnected, reason: %d\n", status); - - /* Its more nice to be connected, so try to reconnect */ - MQTTConnect(client); - } -} - -static void mqtt_sub_request_cb(void *arg, err_t result) -{ - /* Just print the result code here for simplicity, - normal behaviour would be to take some action if subscribe fails like - notifying user, retry subscribe or disconnect from server */ - printf("Subscribe result: %d\n", result); -} - -static void mqtt_incoming_publish_cb(void *arg, const char *topic, u32_t tot_len) -{ - printf("Incoming publish at topic %s with total length %u\n", topic, (unsigned int)tot_len); - - /* Decode topic string into a user defined reference */ - if(strcmp(topic, "print_payload") == 0) { - inpub_id = 0; - } else if(topic[0] == 'A') { - /* All topics starting with 'A' might be handled at the same way */ - inpub_id = 1; - } else { - /* For all other topics */ - inpub_id = 2; - } -} - -static void mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t flags) -{ - printf("Incoming publish payload with length %d, flags %u\n", len, (unsigned int)flags); - - if(flags & MQTT_DATA_FLAG_LAST) { - /* Last fragment of payload received (or whole part if payload fits receive buffer - See MQTT_VAR_HEADER_BUFFER_LEN) */ - - /* Call function or do action depending on reference, in this case inpub_id */ - if(inpub_id == 0) { - /* Don't trust the publisher, check zero termination */ - if(data[len-1] == 0) { - printf("mqtt_incoming_data_cb: %s\n", (const char *)data); - } - } else if(inpub_id == 1) { - /* Call an 'A' function... */ - } else { - printf("mqtt_incoming_data_cb: Ignoring payload...\n"); - } - } else { - /* Handle fragmented payload, store in buffer, write to file or whatever */ - } -} - -static void example_publish(mqtt_client_t *client, void *arg) -{ - const char *pub_payload= "PubSubHubLubJub"; - err_t err; - u8_t qos = 2; /* 0 1 or 2, see MQTT specification */ - u8_t retain = 0; /* No don't retain such crappy payload... */ - err = mqtt_publish(client, "pub_topic", pub_payload, strlen(pub_payload), qos, retain, mqtt_pub_request_cb, arg); - if(err != ERR_OK) { - printf("Publish err: %d\n", err); - } -} - -/* Called when publish is complete either with sucess or failure */ -static void mqtt_pub_request_cb(void *arg, err_t result) -{ - if(result != ERR_OK) { - printf("Publish result: %d\n", result); - } -} - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -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) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t *file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ -} -#endif /* USE_FULL_ASSERT */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.c + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2022 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "lwip.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +#include "mqtt.h" +#include "string.h" +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ +typedef enum +{ + MQTT_STM_RESET, + MQTT_STM_ETH_CONNECT, + MQTT_STM_ETH_CONNECTED, + MQTT_STM_BROKER_CONNECT, + MQTT_STM_BROKER_CONNECTED, + MQTT_STM_SUBSCRIBE, + MQTT_STM_SUBSCRIBED, + MQTT_STM_READY, +} eMqttState; +/* USER CODE END PTD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ +const uint32_t cMqttServerIpAddr_u32 = 0xC0A80000; // 192.168.0.0 +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +TIM_HandleTypeDef htim1; +TIM_HandleTypeDef htim3; +TIM_HandleTypeDef htim7; + +UART_HandleTypeDef huart3; + +PCD_HandleTypeDef hpcd_USB_OTG_FS; + +/* USER CODE BEGIN PV */ +static mqtt_client_t mqtt_static_client; +static int inpub_id; +static uint8_t connected_U8; +static eMqttState MqttState_T; +static uint32_t cnt_u32; +static uint8_t lock_u8; +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +void SystemClock_Config(void); +static void MX_GPIO_Init(void); +static void MX_USART3_UART_Init(void); +static void MX_USB_OTG_FS_PCD_Init(void); +static void MX_TIM1_Init(void); +static void MX_TIM3_Init(void); +static void MX_TIM7_Init(void); +/* USER CODE BEGIN PFP */ +static void MQTTConnect (mqtt_client_t *client); +static void mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t status); +static void mqtt_sub_request_cb(void *arg, err_t result); +static void mqtt_incoming_publish_cb(void *arg, const char *topic, u32_t tot_len); +static void mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t flags); +static void example_publish(mqtt_client_t *client, void *arg); +static void mqtt_pub_request_cb(void *arg, err_t result); +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + /* USER CODE BEGIN 1 */ + + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + MX_USART3_UART_Init(); + MX_USB_OTG_FS_PCD_Init(); + MX_TIM1_Init(); + MX_TIM3_Init(); + MX_TIM7_Init(); + MX_LWIP_Init(); + /* USER CODE BEGIN 2 */ + connected_U8 = 0; + //MQTTConnect(&mqtt_static_client); + HAL_TIM_PWM_Start_IT(&htim7, TIM_CHANNEL_1); + __HAL_TIM_ENABLE_IT(&htim7, TIM_IT_UPDATE); + MqttState_T = MQTT_STM_RESET; + /* USER CODE END 2 */ + + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + /* USER CODE END WHILE */ + + /* USER CODE BEGIN 3 */ + // Communication functions + + /* + if (connected_U8 == 0) + { + MQTTConnect(&mqtt_static_client); + if (mqtt_static_client.conn_state == 3) // MQTT_CONNECTED + { + connected_U8 = 1; + } + } + */ + + switch (MqttState_T) + { + case MQTT_STM_RESET: + MqttState_T = MQTT_STM_ETH_CONNECT; + break; + case MQTT_STM_ETH_CONNECT: + if (LwipConnectionStatus_T == LWIP_CONNECTED) + { + MqttState_T = MQTT_STM_ETH_CONNECTED; + } + break; + case MQTT_STM_ETH_CONNECTED: + //bsp_mqtt_init(); + MQTTConnect(&mqtt_static_client); + MqttState_T = MQTT_STM_BROKER_CONNECT; + break; + case MQTT_STM_BROKER_CONNECT: + if (mqtt_client_is_connected(&mqtt_static_client)) + { + MqttState_T = MQTT_STM_BROKER_CONNECTED; + } + break; + case MQTT_STM_BROKER_CONNECTED: + //bsp_mqtt_subscribe_topic("testflax"); // ~70us + MqttState_T = MQTT_STM_SUBSCRIBE; + break; + case MQTT_STM_SUBSCRIBE: + for (cnt_u32 = 0; cnt_u32 < 10000000; cnt_u32++) + { // Wait for ~100ms + MqttState_T = MQTT_STM_SUBSCRIBED; + } + break; + case MQTT_STM_SUBSCRIBED: + MqttState_T = MQTT_STM_READY; + break; + case MQTT_STM_READY: + default: + break; + } + + if (MqttState_T == MQTT_STM_READY) + { + if ((HAL_GPIO_ReadPin(USER_Btn_GPIO_Port, USER_Btn_Pin) == GPIO_PIN_SET) && (lock_u8 == 0U)) + { + lock_u8 = 1U; + + //bsp_mqtt_send_message(message_test, sizeof(message_test)-1U); // ~12us + example_publish(&mqtt_static_client, 0); + } + else if (HAL_GPIO_ReadPin(USER_Btn_GPIO_Port, USER_Btn_Pin) == GPIO_PIN_RESET) + { + lock_u8 = 0U; + } + } + } + /* USER CODE END 3 */ +} + +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; + RCC_OscInitStruct.PLL.PLLM = 13; + RCC_OscInitStruct.PLL.PLLN = 195; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 5; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) + { + Error_Handler(); + } +} + +/** + * @brief TIM1 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM1_Init(void) +{ + + /* USER CODE BEGIN TIM1_Init 0 */ + + /* USER CODE END TIM1_Init 0 */ + + TIM_ClockConfigTypeDef sClockSourceConfig = {0}; + TIM_MasterConfigTypeDef sMasterConfig = {0}; + TIM_OC_InitTypeDef sConfigOC = {0}; + TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; + + /* USER CODE BEGIN TIM1_Init 1 */ + + /* USER CODE END TIM1_Init 1 */ + htim1.Instance = TIM1; + htim1.Init.Prescaler = 0; + htim1.Init.CounterMode = TIM_COUNTERMODE_UP; + htim1.Init.Period = 16383; + htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + htim1.Init.RepetitionCounter = 0; + htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + if (HAL_TIM_Base_Init(&htim1) != HAL_OK) + { + Error_Handler(); + } + sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; + if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_Init(&htim1) != HAL_OK) + { + Error_Handler(); + } + sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; + sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; + if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) + { + Error_Handler(); + } + sConfigOC.OCMode = TIM_OCMODE_PWM1; + sConfigOC.Pulse = 0; + sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; + sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH; + sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; + sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET; + sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET; + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) + { + Error_Handler(); + } + sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; + sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; + sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; + sBreakDeadTimeConfig.DeadTime = 0; + sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; + sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; + sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; + if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN TIM1_Init 2 */ + + /* USER CODE END TIM1_Init 2 */ + HAL_TIM_MspPostInit(&htim1); + +} + +/** + * @brief TIM3 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM3_Init(void) +{ + + /* USER CODE BEGIN TIM3_Init 0 */ + + /* USER CODE END TIM3_Init 0 */ + + TIM_ClockConfigTypeDef sClockSourceConfig = {0}; + TIM_MasterConfigTypeDef sMasterConfig = {0}; + TIM_OC_InitTypeDef sConfigOC = {0}; + + /* USER CODE BEGIN TIM3_Init 1 */ + + /* USER CODE END TIM3_Init 1 */ + htim3.Instance = TIM3; + htim3.Init.Prescaler = 0; + htim3.Init.CounterMode = TIM_COUNTERMODE_UP; + htim3.Init.Period = 16383; + htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + if (HAL_TIM_Base_Init(&htim3) != HAL_OK) + { + Error_Handler(); + } + sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; + if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_Init(&htim3) != HAL_OK) + { + Error_Handler(); + } + sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; + sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; + if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK) + { + Error_Handler(); + } + sConfigOC.OCMode = TIM_OCMODE_PWM1; + sConfigOC.Pulse = 0; + sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; + sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) + { + Error_Handler(); + } + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN TIM3_Init 2 */ + + /* USER CODE END TIM3_Init 2 */ + HAL_TIM_MspPostInit(&htim3); + +} + +/** + * @brief TIM7 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM7_Init(void) +{ + + /* USER CODE BEGIN TIM7_Init 0 */ + + /* USER CODE END TIM7_Init 0 */ + + TIM_MasterConfigTypeDef sMasterConfig = {0}; + + /* USER CODE BEGIN TIM7_Init 1 */ + + /* USER CODE END TIM7_Init 1 */ + htim7.Instance = TIM7; + htim7.Init.Prescaler = 120; + htim7.Init.CounterMode = TIM_COUNTERMODE_UP; + htim7.Init.Period = 1000; + htim7.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + if (HAL_TIM_Base_Init(&htim7) != HAL_OK) + { + Error_Handler(); + } + sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; + sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; + if (HAL_TIMEx_MasterConfigSynchronization(&htim7, &sMasterConfig) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN TIM7_Init 2 */ + + /* USER CODE END TIM7_Init 2 */ + +} + +/** + * @brief USART3 Initialization Function + * @param None + * @retval None + */ +static void MX_USART3_UART_Init(void) +{ + + /* USER CODE BEGIN USART3_Init 0 */ + + /* USER CODE END USART3_Init 0 */ + + /* USER CODE BEGIN USART3_Init 1 */ + + /* USER CODE END USART3_Init 1 */ + huart3.Instance = USART3; + huart3.Init.BaudRate = 115200; + huart3.Init.WordLength = UART_WORDLENGTH_8B; + huart3.Init.StopBits = UART_STOPBITS_1; + huart3.Init.Parity = UART_PARITY_NONE; + huart3.Init.Mode = UART_MODE_TX_RX; + huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; + huart3.Init.OverSampling = UART_OVERSAMPLING_16; + if (HAL_UART_Init(&huart3) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN USART3_Init 2 */ + + /* USER CODE END USART3_Init 2 */ + +} + +/** + * @brief USB_OTG_FS Initialization Function + * @param None + * @retval None + */ +static void MX_USB_OTG_FS_PCD_Init(void) +{ + + /* USER CODE BEGIN USB_OTG_FS_Init 0 */ + + /* USER CODE END USB_OTG_FS_Init 0 */ + + /* USER CODE BEGIN USB_OTG_FS_Init 1 */ + + /* USER CODE END USB_OTG_FS_Init 1 */ + hpcd_USB_OTG_FS.Instance = USB_OTG_FS; + hpcd_USB_OTG_FS.Init.dev_endpoints = 4; + hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL; + hpcd_USB_OTG_FS.Init.dma_enable = DISABLE; + hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED; + hpcd_USB_OTG_FS.Init.Sof_enable = ENABLE; + hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE; + hpcd_USB_OTG_FS.Init.vbus_sensing_enable = ENABLE; + hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE; + if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN USB_OTG_FS_Init 2 */ + + /* USER CODE END USB_OTG_FS_Init 2 */ + +} + +/** + * @brief GPIO Initialization Function + * @param None + * @retval None + */ +static void MX_GPIO_Init(void) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; +/* USER CODE BEGIN MX_GPIO_Init_1 */ +/* USER CODE END MX_GPIO_Init_1 */ + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOH_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOE_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); + __HAL_RCC_GPIOG_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOB, LD1_Pin|LD3_Pin|LD2_Pin, GPIO_PIN_RESET); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(USB_PowerSwitchOn_GPIO_Port, USB_PowerSwitchOn_Pin, GPIO_PIN_RESET); + + /*Configure GPIO pin : USER_Btn_Pin */ + GPIO_InitStruct.Pin = USER_Btn_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(USER_Btn_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pins : LD1_Pin LD3_Pin LD2_Pin */ + GPIO_InitStruct.Pin = LD1_Pin|LD3_Pin|LD2_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /*Configure GPIO pin : USB_PowerSwitchOn_Pin */ + GPIO_InitStruct.Pin = USB_PowerSwitchOn_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(USB_PowerSwitchOn_GPIO_Port, &GPIO_InitStruct); + + /*Configure GPIO pin : USB_OverCurrent_Pin */ + GPIO_InitStruct.Pin = USB_OverCurrent_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(USB_OverCurrent_GPIO_Port, &GPIO_InitStruct); + +/* USER CODE BEGIN MX_GPIO_Init_2 */ +/* USER CODE END MX_GPIO_Init_2 */ +} + +/* USER CODE BEGIN 4 */ +static void MQTTConnect (mqtt_client_t *client) +{ + struct mqtt_connect_client_info_t ci; + err_t err; + + /* Setup an empty client info structure */ + memset(&ci, 0, sizeof(ci)); + + /* Minimal amount of information required is client identifier, so set it here */ + ci.client_id = "lwip_test"; + + ip_addr_t server_ip; + ip4_addr_set_u32(&server_ip, ipaddr_addr("3.73.193.253")); + + /* Initiate client and connect to server, if this fails immediately an error code is returned + otherwise mqtt_connection_cb will be called with connection result after attempting + to establish a connection with the server. + For now MQTT version 3.1.1 is always used */ + + //err = mqtt_client_connect(client, cMqttServerIpAddr_u32, MQTT_PORT, mqtt_connection_cb, 0, &ci); + err = mqtt_client_connect(client, &server_ip, MQTT_PORT, mqtt_connection_cb, 0, &ci); + + /* For now just print the result code if something goes wrong */ + if(err != ERR_OK) { + printf("mqtt_connect return %d\n", err); + } +} + +static void mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t status) +{ + err_t err; + if(status == MQTT_CONNECT_ACCEPTED) { + printf("mqtt_connection_cb: Successfully connected\n"); + + /* Setup callback for incoming publish requests */ + mqtt_set_inpub_callback(client, mqtt_incoming_publish_cb, mqtt_incoming_data_cb, arg); + + /* Subscribe to a topic named "subtopic" with QoS level 1, call mqtt_sub_request_cb with result */ + err = mqtt_subscribe(client, "testflax", 1, mqtt_sub_request_cb, arg); + + if(err != ERR_OK) { + printf("mqtt_subscribe return: %d\n", err); + } + } else { + printf("mqtt_connection_cb: Disconnected, reason: %d\n", status); + + /* Its more nice to be connected, so try to reconnect */ + MQTTConnect(client); + } +} + +static void mqtt_sub_request_cb(void *arg, err_t result) +{ + /* Just print the result code here for simplicity, + normal behaviour would be to take some action if subscribe fails like + notifying user, retry subscribe or disconnect from server */ + printf("Subscribe result: %d\n", result); +} + +static void mqtt_incoming_publish_cb(void *arg, const char *topic, u32_t tot_len) +{ + printf("Incoming publish at topic %s with total length %u\n", topic, (unsigned int)tot_len); + + /* Decode topic string into a user defined reference */ + if(strcmp(topic, "print_payload") == 0) { + inpub_id = 0; + } else if(topic[0] == 'A') { + /* All topics starting with 'A' might be handled at the same way */ + inpub_id = 1; + } else { + /* For all other topics */ + inpub_id = 2; + } +} + +static void mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t flags) +{ + printf("Incoming publish payload with length %d, flags %u\n", len, (unsigned int)flags); + + if(flags & MQTT_DATA_FLAG_LAST) { + /* Last fragment of payload received (or whole part if payload fits receive buffer + See MQTT_VAR_HEADER_BUFFER_LEN) */ + + /* Call function or do action depending on reference, in this case inpub_id */ + if(inpub_id == 0) { + /* Don't trust the publisher, check zero termination */ + if(data[len-1] == 0) { + printf("mqtt_incoming_data_cb: %s\n", (const char *)data); + } + } else if(inpub_id == 1) { + /* Call an 'A' function... */ + } else { + printf("mqtt_incoming_data_cb: Ignoring payload...\n"); + } + } else { + /* Handle fragmented payload, store in buffer, write to file or whatever */ + } +} + +static void example_publish(mqtt_client_t *client, void *arg) +{ + const char *pub_payload= "PubSubHubLubJub"; + err_t err; + u8_t qos = 2; /* 0 1 or 2, see MQTT specification */ + u8_t retain = 0; /* No don't retain such crappy payload... */ + err = mqtt_publish(client, "testflax", pub_payload, strlen(pub_payload), qos, retain, mqtt_pub_request_cb, arg); + if(err != ERR_OK) { + printf("Publish err: %d\n", err); + } +} + +/* Called when publish is complete either with sucess or failure */ +static void mqtt_pub_request_cb(void *arg, err_t result) +{ + if(result != ERR_OK) { + printf("Publish result: %d\n", result); + } +} + +/* USER CODE END 4 */ + +/** + * @brief This function is executed in case of error occurrence. + * @retval None + */ +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) + { + } + /* USER CODE END Error_Handler_Debug */ +} + +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t *file, uint32_t line) +{ + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ diff --git a/STM32_Nucleo207ZG/Core/Src/stm32f2xx_hal_msp.c b/STM32_Nucleo207ZG/Core/Src/stm32f2xx_hal_msp.c index 368f60e..a276081 100644 --- a/STM32_Nucleo207ZG/Core/Src/stm32f2xx_hal_msp.c +++ b/STM32_Nucleo207ZG/Core/Src/stm32f2xx_hal_msp.c @@ -1,388 +1,388 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f2xx_hal_msp.c - * @brief This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - * @attention - * - * Copyright (c) 2022 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN Define */ - -/* USER CODE END Define */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN Macro */ - -/* USER CODE END Macro */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* External functions --------------------------------------------------------*/ -/* USER CODE BEGIN ExternalFunctions */ - -/* USER CODE END ExternalFunctions */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); - /** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/** -* @brief TIM_Base MSP Initialization -* This function configures the hardware resources used in this example -* @param htim_base: TIM_Base handle pointer -* @retval None -*/ -void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) -{ - if(htim_base->Instance==TIM1) - { - /* USER CODE BEGIN TIM1_MspInit 0 */ - - /* USER CODE END TIM1_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_TIM1_CLK_ENABLE(); - /* USER CODE BEGIN TIM1_MspInit 1 */ - - /* USER CODE END TIM1_MspInit 1 */ - } - else if(htim_base->Instance==TIM3) - { - /* USER CODE BEGIN TIM3_MspInit 0 */ - - /* USER CODE END TIM3_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_TIM3_CLK_ENABLE(); - /* USER CODE BEGIN TIM3_MspInit 1 */ - - /* USER CODE END TIM3_MspInit 1 */ - } - else if(htim_base->Instance==TIM7) - { - /* USER CODE BEGIN TIM7_MspInit 0 */ - - /* USER CODE END TIM7_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_TIM7_CLK_ENABLE(); - /* TIM7 interrupt Init */ - HAL_NVIC_SetPriority(TIM7_IRQn, 0, 0); - HAL_NVIC_EnableIRQ(TIM7_IRQn); - /* USER CODE BEGIN TIM7_MspInit 1 */ - - /* USER CODE END TIM7_MspInit 1 */ - } - -} - -void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(htim->Instance==TIM1) - { - /* USER CODE BEGIN TIM1_MspPostInit 0 */ - - /* USER CODE END TIM1_MspPostInit 0 */ - __HAL_RCC_GPIOE_CLK_ENABLE(); - /**TIM1 GPIO Configuration - PE9 ------> TIM1_CH1 - PE11 ------> TIM1_CH2 - PE13 ------> TIM1_CH3 - PE14 ------> TIM1_CH4 - */ - GPIO_InitStruct.Pin = PWM1_Pin|PWM2_Pin|PWM3_Pin|PWM4_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF1_TIM1; - HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); - - /* USER CODE BEGIN TIM1_MspPostInit 1 */ - - /* USER CODE END TIM1_MspPostInit 1 */ - } - else if(htim->Instance==TIM3) - { - /* USER CODE BEGIN TIM3_MspPostInit 0 */ - - /* USER CODE END TIM3_MspPostInit 0 */ - - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - __HAL_RCC_GPIOC_CLK_ENABLE(); - /**TIM3 GPIO Configuration - PA6 ------> TIM3_CH1 - PB1 ------> TIM3_CH4 - PC7 ------> TIM3_CH2 - PC8 ------> TIM3_CH3 - */ - GPIO_InitStruct.Pin = PWM5_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; - HAL_GPIO_Init(PWM5_GPIO_Port, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = PWM6_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; - HAL_GPIO_Init(PWM6_GPIO_Port, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = PWM7_Pin|PWM8_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - - /* USER CODE BEGIN TIM3_MspPostInit 1 */ - - /* USER CODE END TIM3_MspPostInit 1 */ - } - -} -/** -* @brief TIM_Base MSP De-Initialization -* This function freeze the hardware resources used in this example -* @param htim_base: TIM_Base handle pointer -* @retval None -*/ -void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base) -{ - if(htim_base->Instance==TIM1) - { - /* USER CODE BEGIN TIM1_MspDeInit 0 */ - - /* USER CODE END TIM1_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_TIM1_CLK_DISABLE(); - /* USER CODE BEGIN TIM1_MspDeInit 1 */ - - /* USER CODE END TIM1_MspDeInit 1 */ - } - else if(htim_base->Instance==TIM3) - { - /* USER CODE BEGIN TIM3_MspDeInit 0 */ - - /* USER CODE END TIM3_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_TIM3_CLK_DISABLE(); - /* USER CODE BEGIN TIM3_MspDeInit 1 */ - - /* USER CODE END TIM3_MspDeInit 1 */ - } - else if(htim_base->Instance==TIM7) - { - /* USER CODE BEGIN TIM7_MspDeInit 0 */ - - /* USER CODE END TIM7_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_TIM7_CLK_DISABLE(); - - /* TIM7 interrupt DeInit */ - HAL_NVIC_DisableIRQ(TIM7_IRQn); - /* USER CODE BEGIN TIM7_MspDeInit 1 */ - - /* USER CODE END TIM7_MspDeInit 1 */ - } - -} - -/** -* @brief UART MSP Initialization -* This function configures the hardware resources used in this example -* @param huart: UART handle pointer -* @retval None -*/ -void HAL_UART_MspInit(UART_HandleTypeDef* huart) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(huart->Instance==USART3) - { - /* USER CODE BEGIN USART3_MspInit 0 */ - - /* USER CODE END USART3_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_USART3_CLK_ENABLE(); - - __HAL_RCC_GPIOD_CLK_ENABLE(); - /**USART3 GPIO Configuration - PD8 ------> USART3_TX - PD9 ------> USART3_RX - */ - GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF7_USART3; - HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - - /* USER CODE BEGIN USART3_MspInit 1 */ - - /* USER CODE END USART3_MspInit 1 */ - } - -} - -/** -* @brief UART MSP De-Initialization -* This function freeze the hardware resources used in this example -* @param huart: UART handle pointer -* @retval None -*/ -void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) -{ - if(huart->Instance==USART3) - { - /* USER CODE BEGIN USART3_MspDeInit 0 */ - - /* USER CODE END USART3_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_USART3_CLK_DISABLE(); - - /**USART3 GPIO Configuration - PD8 ------> USART3_TX - PD9 ------> USART3_RX - */ - HAL_GPIO_DeInit(GPIOD, STLK_RX_Pin|STLK_TX_Pin); - - /* USER CODE BEGIN USART3_MspDeInit 1 */ - - /* USER CODE END USART3_MspDeInit 1 */ - } - -} - -/** -* @brief PCD MSP Initialization -* This function configures the hardware resources used in this example -* @param hpcd: PCD handle pointer -* @retval None -*/ -void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(hpcd->Instance==USB_OTG_FS) - { - /* USER CODE BEGIN USB_OTG_FS_MspInit 0 */ - - /* USER CODE END USB_OTG_FS_MspInit 0 */ - - __HAL_RCC_GPIOA_CLK_ENABLE(); - /**USB_OTG_FS GPIO Configuration - PA8 ------> USB_OTG_FS_SOF - PA9 ------> USB_OTG_FS_VBUS - PA10 ------> USB_OTG_FS_ID - PA11 ------> USB_OTG_FS_DM - PA12 ------> USB_OTG_FS_DP - */ - GPIO_InitStruct.Pin = USB_SOF_Pin|USB_ID_Pin|USB_DM_Pin|USB_DP_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = USB_VBUS_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(USB_VBUS_GPIO_Port, &GPIO_InitStruct); - - /* Peripheral clock enable */ - __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); - /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */ - - /* USER CODE END USB_OTG_FS_MspInit 1 */ - } - -} - -/** -* @brief PCD MSP De-Initialization -* This function freeze the hardware resources used in this example -* @param hpcd: PCD handle pointer -* @retval None -*/ -void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd) -{ - if(hpcd->Instance==USB_OTG_FS) - { - /* USER CODE BEGIN USB_OTG_FS_MspDeInit 0 */ - - /* USER CODE END USB_OTG_FS_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_USB_OTG_FS_CLK_DISABLE(); - - /**USB_OTG_FS GPIO Configuration - PA8 ------> USB_OTG_FS_SOF - PA9 ------> USB_OTG_FS_VBUS - PA10 ------> USB_OTG_FS_ID - PA11 ------> USB_OTG_FS_DM - PA12 ------> USB_OTG_FS_DP - */ - HAL_GPIO_DeInit(GPIOA, USB_SOF_Pin|USB_VBUS_Pin|USB_ID_Pin|USB_DM_Pin - |USB_DP_Pin); - - /* USER CODE BEGIN USB_OTG_FS_MspDeInit 1 */ - - /* USER CODE END USB_OTG_FS_MspDeInit 1 */ - } - -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f2xx_hal_msp.c + * @brief This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + * Copyright (c) 2022 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Define */ + +/* USER CODE END Define */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Macro */ + +/* USER CODE END Macro */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External functions --------------------------------------------------------*/ +/* USER CODE BEGIN ExternalFunctions */ + +/* USER CODE END ExternalFunctions */ + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); + /** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_SYSCFG_CLK_ENABLE(); + __HAL_RCC_PWR_CLK_ENABLE(); + + /* System interrupt init*/ + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + +/** +* @brief TIM_Base MSP Initialization +* This function configures the hardware resources used in this example +* @param htim_base: TIM_Base handle pointer +* @retval None +*/ +void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) +{ + if(htim_base->Instance==TIM1) + { + /* USER CODE BEGIN TIM1_MspInit 0 */ + + /* USER CODE END TIM1_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_TIM1_CLK_ENABLE(); + /* USER CODE BEGIN TIM1_MspInit 1 */ + + /* USER CODE END TIM1_MspInit 1 */ + } + else if(htim_base->Instance==TIM3) + { + /* USER CODE BEGIN TIM3_MspInit 0 */ + + /* USER CODE END TIM3_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_TIM3_CLK_ENABLE(); + /* USER CODE BEGIN TIM3_MspInit 1 */ + + /* USER CODE END TIM3_MspInit 1 */ + } + else if(htim_base->Instance==TIM7) + { + /* USER CODE BEGIN TIM7_MspInit 0 */ + + /* USER CODE END TIM7_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_TIM7_CLK_ENABLE(); + /* TIM7 interrupt Init */ + HAL_NVIC_SetPriority(TIM7_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(TIM7_IRQn); + /* USER CODE BEGIN TIM7_MspInit 1 */ + + /* USER CODE END TIM7_MspInit 1 */ + } + +} + +void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(htim->Instance==TIM1) + { + /* USER CODE BEGIN TIM1_MspPostInit 0 */ + + /* USER CODE END TIM1_MspPostInit 0 */ + __HAL_RCC_GPIOE_CLK_ENABLE(); + /**TIM1 GPIO Configuration + PE9 ------> TIM1_CH1 + PE11 ------> TIM1_CH2 + PE13 ------> TIM1_CH3 + PE14 ------> TIM1_CH4 + */ + GPIO_InitStruct.Pin = PWM1_Pin|PWM2_Pin|PWM3_Pin|PWM4_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF1_TIM1; + HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); + + /* USER CODE BEGIN TIM1_MspPostInit 1 */ + + /* USER CODE END TIM1_MspPostInit 1 */ + } + else if(htim->Instance==TIM3) + { + /* USER CODE BEGIN TIM3_MspPostInit 0 */ + + /* USER CODE END TIM3_MspPostInit 0 */ + + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOC_CLK_ENABLE(); + /**TIM3 GPIO Configuration + PA6 ------> TIM3_CH1 + PB1 ------> TIM3_CH4 + PC7 ------> TIM3_CH2 + PC8 ------> TIM3_CH3 + */ + GPIO_InitStruct.Pin = PWM5_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; + HAL_GPIO_Init(PWM5_GPIO_Port, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = PWM6_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; + HAL_GPIO_Init(PWM6_GPIO_Port, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = PWM7_Pin|PWM8_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + /* USER CODE BEGIN TIM3_MspPostInit 1 */ + + /* USER CODE END TIM3_MspPostInit 1 */ + } + +} +/** +* @brief TIM_Base MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param htim_base: TIM_Base handle pointer +* @retval None +*/ +void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base) +{ + if(htim_base->Instance==TIM1) + { + /* USER CODE BEGIN TIM1_MspDeInit 0 */ + + /* USER CODE END TIM1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_TIM1_CLK_DISABLE(); + /* USER CODE BEGIN TIM1_MspDeInit 1 */ + + /* USER CODE END TIM1_MspDeInit 1 */ + } + else if(htim_base->Instance==TIM3) + { + /* USER CODE BEGIN TIM3_MspDeInit 0 */ + + /* USER CODE END TIM3_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_TIM3_CLK_DISABLE(); + /* USER CODE BEGIN TIM3_MspDeInit 1 */ + + /* USER CODE END TIM3_MspDeInit 1 */ + } + else if(htim_base->Instance==TIM7) + { + /* USER CODE BEGIN TIM7_MspDeInit 0 */ + + /* USER CODE END TIM7_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_TIM7_CLK_DISABLE(); + + /* TIM7 interrupt DeInit */ + HAL_NVIC_DisableIRQ(TIM7_IRQn); + /* USER CODE BEGIN TIM7_MspDeInit 1 */ + + /* USER CODE END TIM7_MspDeInit 1 */ + } + +} + +/** +* @brief UART MSP Initialization +* This function configures the hardware resources used in this example +* @param huart: UART handle pointer +* @retval None +*/ +void HAL_UART_MspInit(UART_HandleTypeDef* huart) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(huart->Instance==USART3) + { + /* USER CODE BEGIN USART3_MspInit 0 */ + + /* USER CODE END USART3_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_USART3_CLK_ENABLE(); + + __HAL_RCC_GPIOD_CLK_ENABLE(); + /**USART3 GPIO Configuration + PD8 ------> USART3_TX + PD9 ------> USART3_RX + */ + GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF7_USART3; + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + + /* USER CODE BEGIN USART3_MspInit 1 */ + + /* USER CODE END USART3_MspInit 1 */ + } + +} + +/** +* @brief UART MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param huart: UART handle pointer +* @retval None +*/ +void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) +{ + if(huart->Instance==USART3) + { + /* USER CODE BEGIN USART3_MspDeInit 0 */ + + /* USER CODE END USART3_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_USART3_CLK_DISABLE(); + + /**USART3 GPIO Configuration + PD8 ------> USART3_TX + PD9 ------> USART3_RX + */ + HAL_GPIO_DeInit(GPIOD, STLK_RX_Pin|STLK_TX_Pin); + + /* USER CODE BEGIN USART3_MspDeInit 1 */ + + /* USER CODE END USART3_MspDeInit 1 */ + } + +} + +/** +* @brief PCD MSP Initialization +* This function configures the hardware resources used in this example +* @param hpcd: PCD handle pointer +* @retval None +*/ +void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(hpcd->Instance==USB_OTG_FS) + { + /* USER CODE BEGIN USB_OTG_FS_MspInit 0 */ + + /* USER CODE END USB_OTG_FS_MspInit 0 */ + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**USB_OTG_FS GPIO Configuration + PA8 ------> USB_OTG_FS_SOF + PA9 ------> USB_OTG_FS_VBUS + PA10 ------> USB_OTG_FS_ID + PA11 ------> USB_OTG_FS_DM + PA12 ------> USB_OTG_FS_DP + */ + GPIO_InitStruct.Pin = USB_SOF_Pin|USB_ID_Pin|USB_DM_Pin|USB_DP_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = USB_VBUS_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(USB_VBUS_GPIO_Port, &GPIO_InitStruct); + + /* Peripheral clock enable */ + __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); + /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */ + + /* USER CODE END USB_OTG_FS_MspInit 1 */ + } + +} + +/** +* @brief PCD MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param hpcd: PCD handle pointer +* @retval None +*/ +void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd) +{ + if(hpcd->Instance==USB_OTG_FS) + { + /* USER CODE BEGIN USB_OTG_FS_MspDeInit 0 */ + + /* USER CODE END USB_OTG_FS_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_USB_OTG_FS_CLK_DISABLE(); + + /**USB_OTG_FS GPIO Configuration + PA8 ------> USB_OTG_FS_SOF + PA9 ------> USB_OTG_FS_VBUS + PA10 ------> USB_OTG_FS_ID + PA11 ------> USB_OTG_FS_DM + PA12 ------> USB_OTG_FS_DP + */ + HAL_GPIO_DeInit(GPIOA, USB_SOF_Pin|USB_VBUS_Pin|USB_ID_Pin|USB_DM_Pin + |USB_DP_Pin); + + /* USER CODE BEGIN USB_OTG_FS_MspDeInit 1 */ + + /* USER CODE END USB_OTG_FS_MspDeInit 1 */ + } + +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/STM32_Nucleo207ZG/Core/Src/stm32f2xx_it.c b/STM32_Nucleo207ZG/Core/Src/stm32f2xx_it.c index 39bdcb1..0ef5e11 100644 --- a/STM32_Nucleo207ZG/Core/Src/stm32f2xx_it.c +++ b/STM32_Nucleo207ZG/Core/Src/stm32f2xx_it.c @@ -1,217 +1,218 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file stm32f2xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * @attention - * - * Copyright (c) 2022 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32f2xx_it.h" -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ -/* USER CODE END Includes */ - -/* Private typedef -----------------------------------------------------------*/ -/* USER CODE BEGIN TD */ - -/* USER CODE END TD */ - -/* Private define ------------------------------------------------------------*/ -/* USER CODE BEGIN PD */ - -/* USER CODE END PD */ - -/* Private macro -------------------------------------------------------------*/ -/* USER CODE BEGIN PM */ - -/* USER CODE END PM */ - -/* Private variables ---------------------------------------------------------*/ -/* USER CODE BEGIN PV */ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -/* USER CODE BEGIN PFP */ - -/* USER CODE END PFP */ - -/* Private user code ---------------------------------------------------------*/ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ -extern TIM_HandleTypeDef htim7; -/* USER CODE BEGIN EV */ - -/* USER CODE END EV */ - -/******************************************************************************/ -/* Cortex-M3 Processor Interruption and Exception Handlers */ -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - { - } - /* USER CODE END NonMaskableInt_IRQn 1 */ -} - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_HardFault_IRQn 0 */ - /* USER CODE END W1_HardFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ - /* USER CODE END W1_MemoryManagement_IRQn 0 */ - } -} - -/** - * @brief This function handles Pre-fetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_BusFault_IRQn 0 */ - /* USER CODE END W1_BusFault_IRQn 0 */ - } -} - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - { - /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ - /* USER CODE END W1_UsageFault_IRQn 0 */ - } -} - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVCall_IRQn 0 */ - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - /* USER CODE BEGIN DebugMonitor_IRQn 0 */ - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32F2xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32f2xx.s). */ -/******************************************************************************/ - -/** - * @brief This function handles TIM7 global interrupt. - */ -void TIM7_IRQHandler(void) -{ - /* USER CODE BEGIN TIM7_IRQn 0 */ - - /* USER CODE END TIM7_IRQn 0 */ - HAL_TIM_IRQHandler(&htim7); - /* USER CODE BEGIN TIM7_IRQn 1 */ - - /* USER CODE END TIM7_IRQn 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32f2xx_it.c + * @brief Interrupt Service Routines. + ****************************************************************************** + * @attention + * + * Copyright (c) 2022 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "stm32f2xx_it.h" +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +#include "lwip.h" +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* External variables --------------------------------------------------------*/ +extern TIM_HandleTypeDef htim7; +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/******************************************************************************/ +/* Cortex-M3 Processor Interruption and Exception Handlers */ +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + while (1) + { + } + /* USER CODE END NonMaskableInt_IRQn 1 */ +} + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_HardFault_IRQn 0 */ + /* USER CODE END W1_HardFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ + /* USER CODE END W1_MemoryManagement_IRQn 0 */ + } +} + +/** + * @brief This function handles Pre-fetch fault, memory access fault. + */ +void BusFault_Handler(void) +{ + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_BusFault_IRQn 0 */ + /* USER CODE END W1_BusFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Undefined instruction or illegal state. + */ +void UsageFault_Handler(void) +{ + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ + /* USER CODE END W1_UsageFault_IRQn 0 */ + } +} + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + /* USER CODE BEGIN SVCall_IRQn 0 */ + + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ + + /* USER CODE END SVCall_IRQn 1 */ +} + +/** + * @brief This function handles Debug monitor. + */ +void DebugMon_Handler(void) +{ + /* USER CODE BEGIN DebugMonitor_IRQn 0 */ + + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + + /* USER CODE END DebugMonitor_IRQn 1 */ +} + +/** + * @brief This function handles Pendable request for system service. + */ +void PendSV_Handler(void) +{ + /* USER CODE BEGIN PendSV_IRQn 0 */ + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + +/******************************************************************************/ +/* STM32F2xx Peripheral Interrupt Handlers */ +/* Add here the Interrupt Handlers for the used peripherals. */ +/* For the available peripheral interrupt handler names, */ +/* please refer to the startup file (startup_stm32f2xx.s). */ +/******************************************************************************/ + +/** + * @brief This function handles TIM7 global interrupt. + */ +void TIM7_IRQHandler(void) +{ + /* USER CODE BEGIN TIM7_IRQn 0 */ + + /* USER CODE END TIM7_IRQn 0 */ + HAL_TIM_IRQHandler(&htim7); + /* USER CODE BEGIN TIM7_IRQn 1 */ + MX_LWIP_Process(); + /* USER CODE END TIM7_IRQn 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/STM32_Nucleo207ZG/Debug/Core/Src/subdir.mk b/STM32_Nucleo207ZG/Debug/Core/Src/subdir.mk index fde43cc..bc61dc3 100644 --- a/STM32_Nucleo207ZG/Debug/Core/Src/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Core/Src/subdir.mk @@ -1,42 +1,42 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Core/Src/main.c \ ../Core/Src/stm32f2xx_hal_msp.c \ ../Core/Src/stm32f2xx_it.c \ ../Core/Src/syscalls.c \ ../Core/Src/sysmem.c \ -../Core/Src/system_stm32f2xx.c - +../Core/Src/system_stm32f2xx.c + C_DEPS += \ ./Core/Src/main.d \ ./Core/Src/stm32f2xx_hal_msp.d \ ./Core/Src/stm32f2xx_it.d \ ./Core/Src/syscalls.d \ ./Core/Src/sysmem.d \ -./Core/Src/system_stm32f2xx.d - +./Core/Src/system_stm32f2xx.d + OBJS += \ ./Core/Src/main.o \ ./Core/Src/stm32f2xx_hal_msp.o \ ./Core/Src/stm32f2xx_it.o \ ./Core/Src/syscalls.o \ ./Core/Src/sysmem.o \ -./Core/Src/system_stm32f2xx.o - - -# Each subdirectory must supply rules for building sources it contributes -Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Core-2f-Src - -clean-Core-2f-Src: - -$(RM) ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32f2xx_hal_msp.cyclo ./Core/Src/stm32f2xx_hal_msp.d ./Core/Src/stm32f2xx_hal_msp.o ./Core/Src/stm32f2xx_hal_msp.su ./Core/Src/stm32f2xx_it.cyclo ./Core/Src/stm32f2xx_it.d ./Core/Src/stm32f2xx_it.o ./Core/Src/stm32f2xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32f2xx.cyclo ./Core/Src/system_stm32f2xx.d ./Core/Src/system_stm32f2xx.o ./Core/Src/system_stm32f2xx.su - -.PHONY: clean-Core-2f-Src - +./Core/Src/system_stm32f2xx.o + + +# Each subdirectory must supply rules for building sources it contributes +Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Core-2f-Src + +clean-Core-2f-Src: + -$(RM) ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32f2xx_hal_msp.cyclo ./Core/Src/stm32f2xx_hal_msp.d ./Core/Src/stm32f2xx_hal_msp.o ./Core/Src/stm32f2xx_hal_msp.su ./Core/Src/stm32f2xx_it.cyclo ./Core/Src/stm32f2xx_it.d ./Core/Src/stm32f2xx_it.o ./Core/Src/stm32f2xx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32f2xx.cyclo ./Core/Src/system_stm32f2xx.d ./Core/Src/system_stm32f2xx.o ./Core/Src/system_stm32f2xx.su + +.PHONY: clean-Core-2f-Src + diff --git a/STM32_Nucleo207ZG/Debug/Core/Startup/subdir.mk b/STM32_Nucleo207ZG/Debug/Core/Startup/subdir.mk index 25c946d..b0c8e0e 100644 --- a/STM32_Nucleo207ZG/Debug/Core/Startup/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Core/Startup/subdir.mk @@ -1,27 +1,27 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables S_SRCS += \ -../Core/Startup/startup_stm32f207zgtx.s - +../Core/Startup/startup_stm32f207zgtx.s + S_DEPS += \ -./Core/Startup/startup_stm32f207zgtx.d - +./Core/Startup/startup_stm32f207zgtx.d + OBJS += \ -./Core/Startup/startup_stm32f207zgtx.o - - -# Each subdirectory must supply rules for building sources it contributes -Core/Startup/%.o: ../Core/Startup/%.s Core/Startup/subdir.mk - arm-none-eabi-gcc -mcpu=cortex-m3 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" "$<" - -clean: clean-Core-2f-Startup - -clean-Core-2f-Startup: - -$(RM) ./Core/Startup/startup_stm32f207zgtx.d ./Core/Startup/startup_stm32f207zgtx.o - -.PHONY: clean-Core-2f-Startup - +./Core/Startup/startup_stm32f207zgtx.o + + +# Each subdirectory must supply rules for building sources it contributes +Core/Startup/%.o: ../Core/Startup/%.s Core/Startup/subdir.mk + arm-none-eabi-gcc -mcpu=cortex-m3 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" "$<" + +clean: clean-Core-2f-Startup + +clean-Core-2f-Startup: + -$(RM) ./Core/Startup/startup_stm32f207zgtx.d ./Core/Startup/startup_stm32f207zgtx.o + +.PHONY: clean-Core-2f-Startup + diff --git a/STM32_Nucleo207ZG/Debug/Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk b/STM32_Nucleo207ZG/Debug/Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk index 7d0f216..819be3b 100644 --- a/STM32_Nucleo207ZG/Debug/Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.c \ ../Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.c \ @@ -23,8 +23,8 @@ C_SRCS += \ ../Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.c \ ../Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.c \ ../Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.c \ -../Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c - +../Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.c + C_DEPS += \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.d \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.d \ @@ -44,8 +44,8 @@ C_DEPS += \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.d \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.d \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.d \ -./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.d - +./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.d + OBJS += \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o \ @@ -65,17 +65,17 @@ OBJS += \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o \ ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o \ -./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - - -# Each subdirectory must supply rules for building sources it contributes -Drivers/STM32F2xx_HAL_Driver/Src/%.o Drivers/STM32F2xx_HAL_Driver/Src/%.su Drivers/STM32F2xx_HAL_Driver/Src/%.cyclo: ../Drivers/STM32F2xx_HAL_Driver/Src/%.c Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Drivers-2f-STM32F2xx_HAL_Driver-2f-Src - -clean-Drivers-2f-STM32F2xx_HAL_Driver-2f-Src: - -$(RM) ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.su - -.PHONY: clean-Drivers-2f-STM32F2xx_HAL_Driver-2f-Src - +./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + + +# Each subdirectory must supply rules for building sources it contributes +Drivers/STM32F2xx_HAL_Driver/Src/%.o Drivers/STM32F2xx_HAL_Driver/Src/%.su Drivers/STM32F2xx_HAL_Driver/Src/%.cyclo: ../Drivers/STM32F2xx_HAL_Driver/Src/%.c Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Drivers-2f-STM32F2xx_HAL_Driver-2f-Src + +clean-Drivers-2f-STM32F2xx_HAL_Driver-2f-Src: + -$(RM) ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.su ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.cyclo ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.su + +.PHONY: clean-Drivers-2f-STM32F2xx_HAL_Driver-2f-Src + diff --git a/STM32_Nucleo207ZG/Debug/LWIP/App/subdir.mk b/STM32_Nucleo207ZG/Debug/LWIP/App/subdir.mk index 17d7a29..ec73b70 100644 --- a/STM32_Nucleo207ZG/Debug/LWIP/App/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/LWIP/App/subdir.mk @@ -1,27 +1,27 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ -../LWIP/App/lwip.c - +../LWIP/App/lwip.c + C_DEPS += \ -./LWIP/App/lwip.d - +./LWIP/App/lwip.d + OBJS += \ -./LWIP/App/lwip.o - - -# Each subdirectory must supply rules for building sources it contributes -LWIP/App/%.o LWIP/App/%.su LWIP/App/%.cyclo: ../LWIP/App/%.c LWIP/App/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-LWIP-2f-App - -clean-LWIP-2f-App: - -$(RM) ./LWIP/App/lwip.cyclo ./LWIP/App/lwip.d ./LWIP/App/lwip.o ./LWIP/App/lwip.su - -.PHONY: clean-LWIP-2f-App - +./LWIP/App/lwip.o + + +# Each subdirectory must supply rules for building sources it contributes +LWIP/App/%.o LWIP/App/%.su LWIP/App/%.cyclo: ../LWIP/App/%.c LWIP/App/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-LWIP-2f-App + +clean-LWIP-2f-App: + -$(RM) ./LWIP/App/lwip.cyclo ./LWIP/App/lwip.d ./LWIP/App/lwip.o ./LWIP/App/lwip.su + +.PHONY: clean-LWIP-2f-App + diff --git a/STM32_Nucleo207ZG/Debug/LWIP/Target/subdir.mk b/STM32_Nucleo207ZG/Debug/LWIP/Target/subdir.mk index d182f41..775c3da 100644 --- a/STM32_Nucleo207ZG/Debug/LWIP/Target/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/LWIP/Target/subdir.mk @@ -1,27 +1,27 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ -../LWIP/Target/ethernetif.c - +../LWIP/Target/ethernetif.c + C_DEPS += \ -./LWIP/Target/ethernetif.d - +./LWIP/Target/ethernetif.d + OBJS += \ -./LWIP/Target/ethernetif.o - - -# Each subdirectory must supply rules for building sources it contributes -LWIP/Target/%.o LWIP/Target/%.su LWIP/Target/%.cyclo: ../LWIP/Target/%.c LWIP/Target/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-LWIP-2f-Target - -clean-LWIP-2f-Target: - -$(RM) ./LWIP/Target/ethernetif.cyclo ./LWIP/Target/ethernetif.d ./LWIP/Target/ethernetif.o ./LWIP/Target/ethernetif.su - -.PHONY: clean-LWIP-2f-Target - +./LWIP/Target/ethernetif.o + + +# Each subdirectory must supply rules for building sources it contributes +LWIP/Target/%.o LWIP/Target/%.su LWIP/Target/%.cyclo: ../LWIP/Target/%.c LWIP/Target/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-LWIP-2f-Target + +clean-LWIP-2f-Target: + -$(RM) ./LWIP/Target/ethernetif.cyclo ./LWIP/Target/ethernetif.d ./LWIP/Target/ethernetif.o ./LWIP/Target/ethernetif.su + +.PHONY: clean-LWIP-2f-Target + diff --git a/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.list b/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.list index 1005dcf..53317e7 100644 --- a/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.list +++ b/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.list @@ -1,44076 +1,52379 @@ - -LightControlConvi_Nucleo207ZG.elf: file format elf32-littlearm - -Sections: -Idx Name Size VMA LMA File off Algn - 0 .isr_vector 00000184 08000000 08000000 00010000 2**0 - CONTENTS, ALLOC, LOAD, READONLY, DATA - 1 .text 00010784 08000184 08000184 00010184 2**2 - CONTENTS, ALLOC, LOAD, READONLY, CODE - 2 .rodata 000023a4 08010908 08010908 00020908 2**2 - CONTENTS, ALLOC, LOAD, READONLY, DATA - 3 .ARM.extab 00000000 08012cac 08012cac 00030074 2**0 - CONTENTS - 4 .ARM 00000008 08012cac 08012cac 00022cac 2**2 - CONTENTS, ALLOC, LOAD, READONLY, DATA - 5 .preinit_array 00000000 08012cb4 08012cb4 00030074 2**0 - CONTENTS, ALLOC, LOAD, DATA - 6 .init_array 00000004 08012cb4 08012cb4 00022cb4 2**2 - CONTENTS, ALLOC, LOAD, DATA - 7 .fini_array 00000004 08012cb8 08012cb8 00022cb8 2**2 - CONTENTS, ALLOC, LOAD, DATA - 8 .data 00000074 20000000 08012cbc 00030000 2**2 - CONTENTS, ALLOC, LOAD, DATA - 9 .bss 00006fcc 20000074 08012d30 00030074 2**2 - ALLOC - 10 ._user_heap_stack 00000600 20007040 08012d30 00037040 2**0 - ALLOC - 11 .ARM.attributes 00000029 00000000 00000000 00030074 2**0 - CONTENTS, READONLY - 12 .comment 00000043 00000000 00000000 0003009d 2**0 - CONTENTS, READONLY - 13 .debug_info 00022076 00000000 00000000 000300e0 2**0 - CONTENTS, READONLY, DEBUGGING, OCTETS - 14 .debug_abbrev 00005818 00000000 00000000 00052156 2**0 - CONTENTS, READONLY, DEBUGGING, OCTETS - 15 .debug_aranges 00001a80 00000000 00000000 00057970 2**3 - CONTENTS, READONLY, DEBUGGING, OCTETS - 16 .debug_rnglists 00001502 00000000 00000000 000593f0 2**0 - CONTENTS, READONLY, DEBUGGING, OCTETS - 17 .debug_macro 0002c82d 00000000 00000000 0005a8f2 2**0 - CONTENTS, READONLY, DEBUGGING, OCTETS - 18 .debug_line 0002c4f9 00000000 00000000 0008711f 2**0 - CONTENTS, READONLY, DEBUGGING, OCTETS - 19 .debug_str 000dd677 00000000 00000000 000b3618 2**0 - CONTENTS, READONLY, DEBUGGING, OCTETS - 20 .debug_frame 0000779c 00000000 00000000 00190c90 2**2 - CONTENTS, READONLY, DEBUGGING, OCTETS - 21 .debug_line_str 00000084 00000000 00000000 0019842c 2**0 - CONTENTS, READONLY, DEBUGGING, OCTETS - -Disassembly of section .text: - -08000184 <__do_global_dtors_aux>: - 8000184: b510 push {r4, lr} - 8000186: 4c05 ldr r4, [pc, #20] ; (800019c <__do_global_dtors_aux+0x18>) - 8000188: 7823 ldrb r3, [r4, #0] - 800018a: b933 cbnz r3, 800019a <__do_global_dtors_aux+0x16> - 800018c: 4b04 ldr r3, [pc, #16] ; (80001a0 <__do_global_dtors_aux+0x1c>) - 800018e: b113 cbz r3, 8000196 <__do_global_dtors_aux+0x12> - 8000190: 4804 ldr r0, [pc, #16] ; (80001a4 <__do_global_dtors_aux+0x20>) - 8000192: f3af 8000 nop.w - 8000196: 2301 movs r3, #1 - 8000198: 7023 strb r3, [r4, #0] - 800019a: bd10 pop {r4, pc} - 800019c: 20000074 .word 0x20000074 - 80001a0: 00000000 .word 0x00000000 - 80001a4: 080108f0 .word 0x080108f0 - -080001a8 : - 80001a8: b508 push {r3, lr} - 80001aa: 4b03 ldr r3, [pc, #12] ; (80001b8 ) - 80001ac: b11b cbz r3, 80001b6 - 80001ae: 4903 ldr r1, [pc, #12] ; (80001bc ) - 80001b0: 4803 ldr r0, [pc, #12] ; (80001c0 ) - 80001b2: f3af 8000 nop.w - 80001b6: bd08 pop {r3, pc} - 80001b8: 00000000 .word 0x00000000 - 80001bc: 20000078 .word 0x20000078 - 80001c0: 080108f0 .word 0x080108f0 - -080001c4 <__aeabi_uldivmod>: - 80001c4: b953 cbnz r3, 80001dc <__aeabi_uldivmod+0x18> - 80001c6: b94a cbnz r2, 80001dc <__aeabi_uldivmod+0x18> - 80001c8: 2900 cmp r1, #0 - 80001ca: bf08 it eq - 80001cc: 2800 cmpeq r0, #0 - 80001ce: bf1c itt ne - 80001d0: f04f 31ff movne.w r1, #4294967295 - 80001d4: f04f 30ff movne.w r0, #4294967295 - 80001d8: f000 b972 b.w 80004c0 <__aeabi_idiv0> - 80001dc: f1ad 0c08 sub.w ip, sp, #8 - 80001e0: e96d ce04 strd ip, lr, [sp, #-16]! - 80001e4: f000 f806 bl 80001f4 <__udivmoddi4> - 80001e8: f8dd e004 ldr.w lr, [sp, #4] - 80001ec: e9dd 2302 ldrd r2, r3, [sp, #8] - 80001f0: b004 add sp, #16 - 80001f2: 4770 bx lr - -080001f4 <__udivmoddi4>: - 80001f4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} - 80001f8: 9e08 ldr r6, [sp, #32] - 80001fa: 460d mov r5, r1 - 80001fc: 4604 mov r4, r0 - 80001fe: 468e mov lr, r1 - 8000200: 2b00 cmp r3, #0 - 8000202: d14c bne.n 800029e <__udivmoddi4+0xaa> - 8000204: 428a cmp r2, r1 - 8000206: 4694 mov ip, r2 - 8000208: d967 bls.n 80002da <__udivmoddi4+0xe6> - 800020a: fab2 f382 clz r3, r2 - 800020e: b153 cbz r3, 8000226 <__udivmoddi4+0x32> - 8000210: fa02 fc03 lsl.w ip, r2, r3 - 8000214: f1c3 0220 rsb r2, r3, #32 - 8000218: fa01 fe03 lsl.w lr, r1, r3 - 800021c: fa20 f202 lsr.w r2, r0, r2 - 8000220: ea42 0e0e orr.w lr, r2, lr - 8000224: 409c lsls r4, r3 - 8000226: ea4f 471c mov.w r7, ip, lsr #16 - 800022a: fbbe f1f7 udiv r1, lr, r7 - 800022e: fa1f f58c uxth.w r5, ip - 8000232: fb07 ee11 mls lr, r7, r1, lr - 8000236: fb01 f005 mul.w r0, r1, r5 - 800023a: 0c22 lsrs r2, r4, #16 - 800023c: ea42 420e orr.w r2, r2, lr, lsl #16 - 8000240: 4290 cmp r0, r2 - 8000242: d90a bls.n 800025a <__udivmoddi4+0x66> - 8000244: eb1c 0202 adds.w r2, ip, r2 - 8000248: f101 3eff add.w lr, r1, #4294967295 - 800024c: f080 8119 bcs.w 8000482 <__udivmoddi4+0x28e> - 8000250: 4290 cmp r0, r2 - 8000252: f240 8116 bls.w 8000482 <__udivmoddi4+0x28e> - 8000256: 3902 subs r1, #2 - 8000258: 4462 add r2, ip - 800025a: 1a12 subs r2, r2, r0 - 800025c: fbb2 f0f7 udiv r0, r2, r7 - 8000260: fb07 2210 mls r2, r7, r0, r2 - 8000264: fb00 f505 mul.w r5, r0, r5 - 8000268: b2a4 uxth r4, r4 - 800026a: ea44 4402 orr.w r4, r4, r2, lsl #16 - 800026e: 42a5 cmp r5, r4 - 8000270: d90a bls.n 8000288 <__udivmoddi4+0x94> - 8000272: eb1c 0404 adds.w r4, ip, r4 - 8000276: f100 32ff add.w r2, r0, #4294967295 - 800027a: f080 8104 bcs.w 8000486 <__udivmoddi4+0x292> - 800027e: 42a5 cmp r5, r4 - 8000280: f240 8101 bls.w 8000486 <__udivmoddi4+0x292> - 8000284: 4464 add r4, ip - 8000286: 3802 subs r0, #2 - 8000288: ea40 4001 orr.w r0, r0, r1, lsl #16 - 800028c: 2100 movs r1, #0 - 800028e: 1b64 subs r4, r4, r5 - 8000290: b11e cbz r6, 800029a <__udivmoddi4+0xa6> - 8000292: 40dc lsrs r4, r3 - 8000294: 2300 movs r3, #0 - 8000296: e9c6 4300 strd r4, r3, [r6] - 800029a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} - 800029e: 428b cmp r3, r1 - 80002a0: d908 bls.n 80002b4 <__udivmoddi4+0xc0> - 80002a2: 2e00 cmp r6, #0 - 80002a4: f000 80ea beq.w 800047c <__udivmoddi4+0x288> - 80002a8: 2100 movs r1, #0 - 80002aa: e9c6 0500 strd r0, r5, [r6] - 80002ae: 4608 mov r0, r1 - 80002b0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} - 80002b4: fab3 f183 clz r1, r3 - 80002b8: 2900 cmp r1, #0 - 80002ba: d148 bne.n 800034e <__udivmoddi4+0x15a> - 80002bc: 42ab cmp r3, r5 - 80002be: d302 bcc.n 80002c6 <__udivmoddi4+0xd2> - 80002c0: 4282 cmp r2, r0 - 80002c2: f200 80f8 bhi.w 80004b6 <__udivmoddi4+0x2c2> - 80002c6: 1a84 subs r4, r0, r2 - 80002c8: eb65 0203 sbc.w r2, r5, r3 - 80002cc: 2001 movs r0, #1 - 80002ce: 4696 mov lr, r2 - 80002d0: 2e00 cmp r6, #0 - 80002d2: d0e2 beq.n 800029a <__udivmoddi4+0xa6> - 80002d4: e9c6 4e00 strd r4, lr, [r6] - 80002d8: e7df b.n 800029a <__udivmoddi4+0xa6> - 80002da: b902 cbnz r2, 80002de <__udivmoddi4+0xea> - 80002dc: deff udf #255 ; 0xff - 80002de: fab2 f382 clz r3, r2 - 80002e2: 2b00 cmp r3, #0 - 80002e4: f040 808e bne.w 8000404 <__udivmoddi4+0x210> - 80002e8: 1a88 subs r0, r1, r2 - 80002ea: 2101 movs r1, #1 - 80002ec: 0c17 lsrs r7, r2, #16 - 80002ee: fa1f fe82 uxth.w lr, r2 - 80002f2: fbb0 f5f7 udiv r5, r0, r7 - 80002f6: fb07 0015 mls r0, r7, r5, r0 - 80002fa: 0c22 lsrs r2, r4, #16 - 80002fc: ea42 4200 orr.w r2, r2, r0, lsl #16 - 8000300: fb0e f005 mul.w r0, lr, r5 - 8000304: 4290 cmp r0, r2 - 8000306: d908 bls.n 800031a <__udivmoddi4+0x126> - 8000308: eb1c 0202 adds.w r2, ip, r2 - 800030c: f105 38ff add.w r8, r5, #4294967295 - 8000310: d202 bcs.n 8000318 <__udivmoddi4+0x124> - 8000312: 4290 cmp r0, r2 - 8000314: f200 80cc bhi.w 80004b0 <__udivmoddi4+0x2bc> - 8000318: 4645 mov r5, r8 - 800031a: 1a12 subs r2, r2, r0 - 800031c: fbb2 f0f7 udiv r0, r2, r7 - 8000320: fb07 2210 mls r2, r7, r0, r2 - 8000324: fb0e fe00 mul.w lr, lr, r0 - 8000328: b2a4 uxth r4, r4 - 800032a: ea44 4402 orr.w r4, r4, r2, lsl #16 - 800032e: 45a6 cmp lr, r4 - 8000330: d908 bls.n 8000344 <__udivmoddi4+0x150> - 8000332: eb1c 0404 adds.w r4, ip, r4 - 8000336: f100 32ff add.w r2, r0, #4294967295 - 800033a: d202 bcs.n 8000342 <__udivmoddi4+0x14e> - 800033c: 45a6 cmp lr, r4 - 800033e: f200 80b4 bhi.w 80004aa <__udivmoddi4+0x2b6> - 8000342: 4610 mov r0, r2 - 8000344: eba4 040e sub.w r4, r4, lr - 8000348: ea40 4005 orr.w r0, r0, r5, lsl #16 - 800034c: e7a0 b.n 8000290 <__udivmoddi4+0x9c> - 800034e: f1c1 0720 rsb r7, r1, #32 - 8000352: 408b lsls r3, r1 - 8000354: fa22 fc07 lsr.w ip, r2, r7 - 8000358: ea4c 0c03 orr.w ip, ip, r3 - 800035c: fa25 fa07 lsr.w sl, r5, r7 - 8000360: ea4f 491c mov.w r9, ip, lsr #16 - 8000364: fbba f8f9 udiv r8, sl, r9 - 8000368: 408d lsls r5, r1 - 800036a: fa20 f307 lsr.w r3, r0, r7 - 800036e: fb09 aa18 mls sl, r9, r8, sl - 8000372: fa1f fe8c uxth.w lr, ip - 8000376: 432b orrs r3, r5 - 8000378: fa00 f501 lsl.w r5, r0, r1 - 800037c: fb08 f00e mul.w r0, r8, lr - 8000380: 0c1c lsrs r4, r3, #16 - 8000382: ea44 440a orr.w r4, r4, sl, lsl #16 - 8000386: 42a0 cmp r0, r4 - 8000388: fa02 f201 lsl.w r2, r2, r1 - 800038c: d90b bls.n 80003a6 <__udivmoddi4+0x1b2> - 800038e: eb1c 0404 adds.w r4, ip, r4 - 8000392: f108 3aff add.w sl, r8, #4294967295 - 8000396: f080 8086 bcs.w 80004a6 <__udivmoddi4+0x2b2> - 800039a: 42a0 cmp r0, r4 - 800039c: f240 8083 bls.w 80004a6 <__udivmoddi4+0x2b2> - 80003a0: f1a8 0802 sub.w r8, r8, #2 - 80003a4: 4464 add r4, ip - 80003a6: 1a24 subs r4, r4, r0 - 80003a8: b298 uxth r0, r3 - 80003aa: fbb4 f3f9 udiv r3, r4, r9 - 80003ae: fb09 4413 mls r4, r9, r3, r4 - 80003b2: fb03 fe0e mul.w lr, r3, lr - 80003b6: ea40 4404 orr.w r4, r0, r4, lsl #16 - 80003ba: 45a6 cmp lr, r4 - 80003bc: d908 bls.n 80003d0 <__udivmoddi4+0x1dc> - 80003be: eb1c 0404 adds.w r4, ip, r4 - 80003c2: f103 30ff add.w r0, r3, #4294967295 - 80003c6: d26a bcs.n 800049e <__udivmoddi4+0x2aa> - 80003c8: 45a6 cmp lr, r4 - 80003ca: d968 bls.n 800049e <__udivmoddi4+0x2aa> - 80003cc: 3b02 subs r3, #2 - 80003ce: 4464 add r4, ip - 80003d0: ea43 4008 orr.w r0, r3, r8, lsl #16 - 80003d4: fba0 9302 umull r9, r3, r0, r2 - 80003d8: eba4 040e sub.w r4, r4, lr - 80003dc: 429c cmp r4, r3 - 80003de: 46c8 mov r8, r9 - 80003e0: 469e mov lr, r3 - 80003e2: d354 bcc.n 800048e <__udivmoddi4+0x29a> - 80003e4: d051 beq.n 800048a <__udivmoddi4+0x296> - 80003e6: 2e00 cmp r6, #0 - 80003e8: d067 beq.n 80004ba <__udivmoddi4+0x2c6> - 80003ea: ebb5 0308 subs.w r3, r5, r8 - 80003ee: eb64 040e sbc.w r4, r4, lr - 80003f2: 40cb lsrs r3, r1 - 80003f4: fa04 f707 lsl.w r7, r4, r7 - 80003f8: 431f orrs r7, r3 - 80003fa: 40cc lsrs r4, r1 - 80003fc: e9c6 7400 strd r7, r4, [r6] - 8000400: 2100 movs r1, #0 - 8000402: e74a b.n 800029a <__udivmoddi4+0xa6> - 8000404: fa02 fc03 lsl.w ip, r2, r3 - 8000408: f1c3 0020 rsb r0, r3, #32 - 800040c: 40c1 lsrs r1, r0 - 800040e: 409d lsls r5, r3 - 8000410: fa24 f000 lsr.w r0, r4, r0 - 8000414: ea4f 471c mov.w r7, ip, lsr #16 - 8000418: 4328 orrs r0, r5 - 800041a: fbb1 f5f7 udiv r5, r1, r7 - 800041e: fb07 1115 mls r1, r7, r5, r1 - 8000422: fa1f fe8c uxth.w lr, ip - 8000426: 0c02 lsrs r2, r0, #16 - 8000428: ea42 4201 orr.w r2, r2, r1, lsl #16 - 800042c: fb05 f10e mul.w r1, r5, lr - 8000430: 4291 cmp r1, r2 - 8000432: fa04 f403 lsl.w r4, r4, r3 - 8000436: d908 bls.n 800044a <__udivmoddi4+0x256> - 8000438: eb1c 0202 adds.w r2, ip, r2 - 800043c: f105 38ff add.w r8, r5, #4294967295 - 8000440: d22f bcs.n 80004a2 <__udivmoddi4+0x2ae> - 8000442: 4291 cmp r1, r2 - 8000444: d92d bls.n 80004a2 <__udivmoddi4+0x2ae> - 8000446: 3d02 subs r5, #2 - 8000448: 4462 add r2, ip - 800044a: 1a52 subs r2, r2, r1 - 800044c: fbb2 f1f7 udiv r1, r2, r7 - 8000450: fb07 2211 mls r2, r7, r1, r2 - 8000454: b280 uxth r0, r0 - 8000456: ea40 4002 orr.w r0, r0, r2, lsl #16 - 800045a: fb01 f20e mul.w r2, r1, lr - 800045e: 4282 cmp r2, r0 - 8000460: d908 bls.n 8000474 <__udivmoddi4+0x280> - 8000462: eb1c 0000 adds.w r0, ip, r0 - 8000466: f101 38ff add.w r8, r1, #4294967295 - 800046a: d216 bcs.n 800049a <__udivmoddi4+0x2a6> - 800046c: 4282 cmp r2, r0 - 800046e: d914 bls.n 800049a <__udivmoddi4+0x2a6> - 8000470: 3902 subs r1, #2 - 8000472: 4460 add r0, ip - 8000474: 1a80 subs r0, r0, r2 - 8000476: ea41 4105 orr.w r1, r1, r5, lsl #16 - 800047a: e73a b.n 80002f2 <__udivmoddi4+0xfe> - 800047c: 4631 mov r1, r6 - 800047e: 4630 mov r0, r6 - 8000480: e70b b.n 800029a <__udivmoddi4+0xa6> - 8000482: 4671 mov r1, lr - 8000484: e6e9 b.n 800025a <__udivmoddi4+0x66> - 8000486: 4610 mov r0, r2 - 8000488: e6fe b.n 8000288 <__udivmoddi4+0x94> - 800048a: 454d cmp r5, r9 - 800048c: d2ab bcs.n 80003e6 <__udivmoddi4+0x1f2> - 800048e: ebb9 0802 subs.w r8, r9, r2 - 8000492: eb63 0e0c sbc.w lr, r3, ip - 8000496: 3801 subs r0, #1 - 8000498: e7a5 b.n 80003e6 <__udivmoddi4+0x1f2> - 800049a: 4641 mov r1, r8 - 800049c: e7ea b.n 8000474 <__udivmoddi4+0x280> - 800049e: 4603 mov r3, r0 - 80004a0: e796 b.n 80003d0 <__udivmoddi4+0x1dc> - 80004a2: 4645 mov r5, r8 - 80004a4: e7d1 b.n 800044a <__udivmoddi4+0x256> - 80004a6: 46d0 mov r8, sl - 80004a8: e77d b.n 80003a6 <__udivmoddi4+0x1b2> - 80004aa: 4464 add r4, ip - 80004ac: 3802 subs r0, #2 - 80004ae: e749 b.n 8000344 <__udivmoddi4+0x150> - 80004b0: 3d02 subs r5, #2 - 80004b2: 4462 add r2, ip - 80004b4: e731 b.n 800031a <__udivmoddi4+0x126> - 80004b6: 4608 mov r0, r1 - 80004b8: e70a b.n 80002d0 <__udivmoddi4+0xdc> - 80004ba: 4631 mov r1, r6 - 80004bc: e6ed b.n 800029a <__udivmoddi4+0xa6> - 80004be: bf00 nop - -080004c0 <__aeabi_idiv0>: - 80004c0: 4770 bx lr - 80004c2: bf00 nop - -080004c4
: -/** - * @brief The application entry point. - * @retval int - */ -int main(void) -{ - 80004c4: b580 push {r7, lr} - 80004c6: af00 add r7, sp, #0 - /* USER CODE END 1 */ - - /* MCU Configuration--------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - 80004c8: f000 fde8 bl 800109c - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - 80004cc: f000 f80f bl 80004ee - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - 80004d0: f000 fa3a bl 8000948 - MX_USART3_UART_Init(); - 80004d4: f000 f9e4 bl 80008a0 - MX_USB_OTG_FS_PCD_Init(); - 80004d8: f000 fa0c bl 80008f4 - MX_TIM1_Init(); - 80004dc: f000 f84e bl 800057c - MX_TIM3_Init(); - 80004e0: f000 f910 bl 8000704 - MX_TIM7_Init(); - 80004e4: f000 f9a6 bl 8000834 - MX_LWIP_Init(); - 80004e8: f004 faa2 bl 8004a30 - - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - 80004ec: e7fe b.n 80004ec - -080004ee : -/** - * @brief System Clock Configuration - * @retval None - */ -void SystemClock_Config(void) -{ - 80004ee: b580 push {r7, lr} - 80004f0: b092 sub sp, #72 ; 0x48 - 80004f2: af00 add r7, sp, #0 - RCC_OscInitTypeDef RCC_OscInitStruct = {0}; - 80004f4: f107 0318 add.w r3, r7, #24 - 80004f8: 2230 movs r2, #48 ; 0x30 - 80004fa: 2100 movs r1, #0 - 80004fc: 4618 mov r0, r3 - 80004fe: f00f fbdb bl 800fcb8 - RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; - 8000502: 1d3b adds r3, r7, #4 - 8000504: 2200 movs r2, #0 - 8000506: 601a str r2, [r3, #0] - 8000508: 605a str r2, [r3, #4] - 800050a: 609a str r2, [r3, #8] - 800050c: 60da str r2, [r3, #12] - 800050e: 611a str r2, [r3, #16] - - /** Initializes the RCC Oscillators according to the specified parameters - * in the RCC_OscInitTypeDef structure. - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - 8000510: 2302 movs r3, #2 - 8000512: 61bb str r3, [r7, #24] - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - 8000514: 2301 movs r3, #1 - 8000516: 627b str r3, [r7, #36] ; 0x24 - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - 8000518: 2310 movs r3, #16 - 800051a: 62bb str r3, [r7, #40] ; 0x28 - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - 800051c: 2302 movs r3, #2 - 800051e: 633b str r3, [r7, #48] ; 0x30 - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - 8000520: 2300 movs r3, #0 - 8000522: 637b str r3, [r7, #52] ; 0x34 - RCC_OscInitStruct.PLL.PLLM = 13; - 8000524: 230d movs r3, #13 - 8000526: 63bb str r3, [r7, #56] ; 0x38 - RCC_OscInitStruct.PLL.PLLN = 195; - 8000528: 23c3 movs r3, #195 ; 0xc3 - 800052a: 63fb str r3, [r7, #60] ; 0x3c - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; - 800052c: 2302 movs r3, #2 - 800052e: 643b str r3, [r7, #64] ; 0x40 - RCC_OscInitStruct.PLL.PLLQ = 5; - 8000530: 2305 movs r3, #5 - 8000532: 647b str r3, [r7, #68] ; 0x44 - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - 8000534: f107 0318 add.w r3, r7, #24 - 8000538: 4618 mov r0, r3 - 800053a: f002 fa97 bl 8002a6c - 800053e: 4603 mov r3, r0 - 8000540: 2b00 cmp r3, #0 - 8000542: d001 beq.n 8000548 - { - Error_Handler(); - 8000544: f000 fabc bl 8000ac0 - } - - /** Initializes the CPU, AHB and APB buses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK - 8000548: 230f movs r3, #15 - 800054a: 607b str r3, [r7, #4] - |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - 800054c: 2302 movs r3, #2 - 800054e: 60bb str r3, [r7, #8] - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - 8000550: 2300 movs r3, #0 - 8000552: 60fb str r3, [r7, #12] - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; - 8000554: f44f 53a0 mov.w r3, #5120 ; 0x1400 - 8000558: 613b str r3, [r7, #16] - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; - 800055a: f44f 5380 mov.w r3, #4096 ; 0x1000 - 800055e: 617b str r3, [r7, #20] - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) - 8000560: 1d3b adds r3, r7, #4 - 8000562: 2103 movs r1, #3 - 8000564: 4618 mov r0, r3 - 8000566: f002 fcd5 bl 8002f14 - 800056a: 4603 mov r3, r0 - 800056c: 2b00 cmp r3, #0 - 800056e: d001 beq.n 8000574 - { - Error_Handler(); - 8000570: f000 faa6 bl 8000ac0 - } -} - 8000574: bf00 nop - 8000576: 3748 adds r7, #72 ; 0x48 - 8000578: 46bd mov sp, r7 - 800057a: bd80 pop {r7, pc} - -0800057c : - * @brief TIM1 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM1_Init(void) -{ - 800057c: b580 push {r7, lr} - 800057e: b096 sub sp, #88 ; 0x58 - 8000580: af00 add r7, sp, #0 - - /* USER CODE BEGIN TIM1_Init 0 */ - - /* USER CODE END TIM1_Init 0 */ - - TIM_ClockConfigTypeDef sClockSourceConfig = {0}; - 8000582: f107 0348 add.w r3, r7, #72 ; 0x48 - 8000586: 2200 movs r2, #0 - 8000588: 601a str r2, [r3, #0] - 800058a: 605a str r2, [r3, #4] - 800058c: 609a str r2, [r3, #8] - 800058e: 60da str r2, [r3, #12] - TIM_MasterConfigTypeDef sMasterConfig = {0}; - 8000590: f107 0340 add.w r3, r7, #64 ; 0x40 - 8000594: 2200 movs r2, #0 - 8000596: 601a str r2, [r3, #0] - 8000598: 605a str r2, [r3, #4] - TIM_OC_InitTypeDef sConfigOC = {0}; - 800059a: f107 0324 add.w r3, r7, #36 ; 0x24 - 800059e: 2200 movs r2, #0 - 80005a0: 601a str r2, [r3, #0] - 80005a2: 605a str r2, [r3, #4] - 80005a4: 609a str r2, [r3, #8] - 80005a6: 60da str r2, [r3, #12] - 80005a8: 611a str r2, [r3, #16] - 80005aa: 615a str r2, [r3, #20] - 80005ac: 619a str r2, [r3, #24] - TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; - 80005ae: 1d3b adds r3, r7, #4 - 80005b0: 2220 movs r2, #32 - 80005b2: 2100 movs r1, #0 - 80005b4: 4618 mov r0, r3 - 80005b6: f00f fb7f bl 800fcb8 - - /* USER CODE BEGIN TIM1_Init 1 */ - - /* USER CODE END TIM1_Init 1 */ - htim1.Instance = TIM1; - 80005ba: 4b50 ldr r3, [pc, #320] ; (80006fc ) - 80005bc: 4a50 ldr r2, [pc, #320] ; (8000700 ) - 80005be: 601a str r2, [r3, #0] - htim1.Init.Prescaler = 0; - 80005c0: 4b4e ldr r3, [pc, #312] ; (80006fc ) - 80005c2: 2200 movs r2, #0 - 80005c4: 605a str r2, [r3, #4] - htim1.Init.CounterMode = TIM_COUNTERMODE_UP; - 80005c6: 4b4d ldr r3, [pc, #308] ; (80006fc ) - 80005c8: 2200 movs r2, #0 - 80005ca: 609a str r2, [r3, #8] - htim1.Init.Period = 16383; - 80005cc: 4b4b ldr r3, [pc, #300] ; (80006fc ) - 80005ce: f643 72ff movw r2, #16383 ; 0x3fff - 80005d2: 60da str r2, [r3, #12] - htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - 80005d4: 4b49 ldr r3, [pc, #292] ; (80006fc ) - 80005d6: 2200 movs r2, #0 - 80005d8: 611a str r2, [r3, #16] - htim1.Init.RepetitionCounter = 0; - 80005da: 4b48 ldr r3, [pc, #288] ; (80006fc ) - 80005dc: 2200 movs r2, #0 - 80005de: 615a str r2, [r3, #20] - htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - 80005e0: 4b46 ldr r3, [pc, #280] ; (80006fc ) - 80005e2: 2200 movs r2, #0 - 80005e4: 619a str r2, [r3, #24] - if (HAL_TIM_Base_Init(&htim1) != HAL_OK) - 80005e6: 4845 ldr r0, [pc, #276] ; (80006fc ) - 80005e8: f002 feda bl 80033a0 - 80005ec: 4603 mov r3, r0 - 80005ee: 2b00 cmp r3, #0 - 80005f0: d001 beq.n 80005f6 - { - Error_Handler(); - 80005f2: f000 fa65 bl 8000ac0 - } - sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; - 80005f6: f44f 5380 mov.w r3, #4096 ; 0x1000 - 80005fa: 64bb str r3, [r7, #72] ; 0x48 - if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK) - 80005fc: f107 0348 add.w r3, r7, #72 ; 0x48 - 8000600: 4619 mov r1, r3 - 8000602: 483e ldr r0, [pc, #248] ; (80006fc ) - 8000604: f003 f93e bl 8003884 - 8000608: 4603 mov r3, r0 - 800060a: 2b00 cmp r3, #0 - 800060c: d001 beq.n 8000612 - { - Error_Handler(); - 800060e: f000 fa57 bl 8000ac0 - } - if (HAL_TIM_PWM_Init(&htim1) != HAL_OK) - 8000612: 483a ldr r0, [pc, #232] ; (80006fc ) - 8000614: f002 ff13 bl 800343e - 8000618: 4603 mov r3, r0 - 800061a: 2b00 cmp r3, #0 - 800061c: d001 beq.n 8000622 - { - Error_Handler(); - 800061e: f000 fa4f bl 8000ac0 - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - 8000622: 2300 movs r3, #0 - 8000624: 643b str r3, [r7, #64] ; 0x40 - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - 8000626: 2300 movs r3, #0 - 8000628: 647b str r3, [r7, #68] ; 0x44 - if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) - 800062a: f107 0340 add.w r3, r7, #64 ; 0x40 - 800062e: 4619 mov r1, r3 - 8000630: 4832 ldr r0, [pc, #200] ; (80006fc ) - 8000632: f003 fcfb bl 800402c - 8000636: 4603 mov r3, r0 - 8000638: 2b00 cmp r3, #0 - 800063a: d001 beq.n 8000640 - { - Error_Handler(); - 800063c: f000 fa40 bl 8000ac0 - } - sConfigOC.OCMode = TIM_OCMODE_PWM1; - 8000640: 2360 movs r3, #96 ; 0x60 - 8000642: 627b str r3, [r7, #36] ; 0x24 - sConfigOC.Pulse = 0; - 8000644: 2300 movs r3, #0 - 8000646: 62bb str r3, [r7, #40] ; 0x28 - sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; - 8000648: 2300 movs r3, #0 - 800064a: 62fb str r3, [r7, #44] ; 0x2c - sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH; - 800064c: 2300 movs r3, #0 - 800064e: 633b str r3, [r7, #48] ; 0x30 - sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; - 8000650: 2300 movs r3, #0 - 8000652: 637b str r3, [r7, #52] ; 0x34 - sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET; - 8000654: 2300 movs r3, #0 - 8000656: 63bb str r3, [r7, #56] ; 0x38 - sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET; - 8000658: 2300 movs r3, #0 - 800065a: 63fb str r3, [r7, #60] ; 0x3c - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) - 800065c: f107 0324 add.w r3, r7, #36 ; 0x24 - 8000660: 2200 movs r2, #0 - 8000662: 4619 mov r1, r3 - 8000664: 4825 ldr r0, [pc, #148] ; (80006fc ) - 8000666: f003 f84b bl 8003700 - 800066a: 4603 mov r3, r0 - 800066c: 2b00 cmp r3, #0 - 800066e: d001 beq.n 8000674 - { - Error_Handler(); - 8000670: f000 fa26 bl 8000ac0 - } - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) - 8000674: f107 0324 add.w r3, r7, #36 ; 0x24 - 8000678: 2204 movs r2, #4 - 800067a: 4619 mov r1, r3 - 800067c: 481f ldr r0, [pc, #124] ; (80006fc ) - 800067e: f003 f83f bl 8003700 - 8000682: 4603 mov r3, r0 - 8000684: 2b00 cmp r3, #0 - 8000686: d001 beq.n 800068c - { - Error_Handler(); - 8000688: f000 fa1a bl 8000ac0 - } - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) - 800068c: f107 0324 add.w r3, r7, #36 ; 0x24 - 8000690: 2208 movs r2, #8 - 8000692: 4619 mov r1, r3 - 8000694: 4819 ldr r0, [pc, #100] ; (80006fc ) - 8000696: f003 f833 bl 8003700 - 800069a: 4603 mov r3, r0 - 800069c: 2b00 cmp r3, #0 - 800069e: d001 beq.n 80006a4 - { - Error_Handler(); - 80006a0: f000 fa0e bl 8000ac0 - } - if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) - 80006a4: f107 0324 add.w r3, r7, #36 ; 0x24 - 80006a8: 220c movs r2, #12 - 80006aa: 4619 mov r1, r3 - 80006ac: 4813 ldr r0, [pc, #76] ; (80006fc ) - 80006ae: f003 f827 bl 8003700 - 80006b2: 4603 mov r3, r0 - 80006b4: 2b00 cmp r3, #0 - 80006b6: d001 beq.n 80006bc - { - Error_Handler(); - 80006b8: f000 fa02 bl 8000ac0 - } - sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; - 80006bc: 2300 movs r3, #0 - 80006be: 607b str r3, [r7, #4] - sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; - 80006c0: 2300 movs r3, #0 - 80006c2: 60bb str r3, [r7, #8] - sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; - 80006c4: 2300 movs r3, #0 - 80006c6: 60fb str r3, [r7, #12] - sBreakDeadTimeConfig.DeadTime = 0; - 80006c8: 2300 movs r3, #0 - 80006ca: 613b str r3, [r7, #16] - sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; - 80006cc: 2300 movs r3, #0 - 80006ce: 617b str r3, [r7, #20] - sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; - 80006d0: f44f 5300 mov.w r3, #8192 ; 0x2000 - 80006d4: 61bb str r3, [r7, #24] - sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; - 80006d6: 2300 movs r3, #0 - 80006d8: 623b str r3, [r7, #32] - if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK) - 80006da: 1d3b adds r3, r7, #4 - 80006dc: 4619 mov r1, r3 - 80006de: 4807 ldr r0, [pc, #28] ; (80006fc ) - 80006e0: f003 fd1e bl 8004120 - 80006e4: 4603 mov r3, r0 - 80006e6: 2b00 cmp r3, #0 - 80006e8: d001 beq.n 80006ee - { - Error_Handler(); - 80006ea: f000 f9e9 bl 8000ac0 - } - /* USER CODE BEGIN TIM1_Init 2 */ - - /* USER CODE END TIM1_Init 2 */ - HAL_TIM_MspPostInit(&htim1); - 80006ee: 4803 ldr r0, [pc, #12] ; (80006fc ) - 80006f0: f000 fa66 bl 8000bc0 - -} - 80006f4: bf00 nop - 80006f6: 3758 adds r7, #88 ; 0x58 - 80006f8: 46bd mov sp, r7 - 80006fa: bd80 pop {r7, pc} - 80006fc: 20000090 .word 0x20000090 - 8000700: 40010000 .word 0x40010000 - -08000704 : - * @brief TIM3 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM3_Init(void) -{ - 8000704: b580 push {r7, lr} - 8000706: b08e sub sp, #56 ; 0x38 - 8000708: af00 add r7, sp, #0 - - /* USER CODE BEGIN TIM3_Init 0 */ - - /* USER CODE END TIM3_Init 0 */ - - TIM_ClockConfigTypeDef sClockSourceConfig = {0}; - 800070a: f107 0328 add.w r3, r7, #40 ; 0x28 - 800070e: 2200 movs r2, #0 - 8000710: 601a str r2, [r3, #0] - 8000712: 605a str r2, [r3, #4] - 8000714: 609a str r2, [r3, #8] - 8000716: 60da str r2, [r3, #12] - TIM_MasterConfigTypeDef sMasterConfig = {0}; - 8000718: f107 0320 add.w r3, r7, #32 - 800071c: 2200 movs r2, #0 - 800071e: 601a str r2, [r3, #0] - 8000720: 605a str r2, [r3, #4] - TIM_OC_InitTypeDef sConfigOC = {0}; - 8000722: 1d3b adds r3, r7, #4 - 8000724: 2200 movs r2, #0 - 8000726: 601a str r2, [r3, #0] - 8000728: 605a str r2, [r3, #4] - 800072a: 609a str r2, [r3, #8] - 800072c: 60da str r2, [r3, #12] - 800072e: 611a str r2, [r3, #16] - 8000730: 615a str r2, [r3, #20] - 8000732: 619a str r2, [r3, #24] - - /* USER CODE BEGIN TIM3_Init 1 */ - - /* USER CODE END TIM3_Init 1 */ - htim3.Instance = TIM3; - 8000734: 4b3d ldr r3, [pc, #244] ; (800082c ) - 8000736: 4a3e ldr r2, [pc, #248] ; (8000830 ) - 8000738: 601a str r2, [r3, #0] - htim3.Init.Prescaler = 0; - 800073a: 4b3c ldr r3, [pc, #240] ; (800082c ) - 800073c: 2200 movs r2, #0 - 800073e: 605a str r2, [r3, #4] - htim3.Init.CounterMode = TIM_COUNTERMODE_UP; - 8000740: 4b3a ldr r3, [pc, #232] ; (800082c ) - 8000742: 2200 movs r2, #0 - 8000744: 609a str r2, [r3, #8] - htim3.Init.Period = 16383; - 8000746: 4b39 ldr r3, [pc, #228] ; (800082c ) - 8000748: f643 72ff movw r2, #16383 ; 0x3fff - 800074c: 60da str r2, [r3, #12] - htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - 800074e: 4b37 ldr r3, [pc, #220] ; (800082c ) - 8000750: 2200 movs r2, #0 - 8000752: 611a str r2, [r3, #16] - htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - 8000754: 4b35 ldr r3, [pc, #212] ; (800082c ) - 8000756: 2200 movs r2, #0 - 8000758: 619a str r2, [r3, #24] - if (HAL_TIM_Base_Init(&htim3) != HAL_OK) - 800075a: 4834 ldr r0, [pc, #208] ; (800082c ) - 800075c: f002 fe20 bl 80033a0 - 8000760: 4603 mov r3, r0 - 8000762: 2b00 cmp r3, #0 - 8000764: d001 beq.n 800076a - { - Error_Handler(); - 8000766: f000 f9ab bl 8000ac0 - } - sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; - 800076a: f44f 5380 mov.w r3, #4096 ; 0x1000 - 800076e: 62bb str r3, [r7, #40] ; 0x28 - if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK) - 8000770: f107 0328 add.w r3, r7, #40 ; 0x28 - 8000774: 4619 mov r1, r3 - 8000776: 482d ldr r0, [pc, #180] ; (800082c ) - 8000778: f003 f884 bl 8003884 - 800077c: 4603 mov r3, r0 - 800077e: 2b00 cmp r3, #0 - 8000780: d001 beq.n 8000786 - { - Error_Handler(); - 8000782: f000 f99d bl 8000ac0 - } - if (HAL_TIM_PWM_Init(&htim3) != HAL_OK) - 8000786: 4829 ldr r0, [pc, #164] ; (800082c ) - 8000788: f002 fe59 bl 800343e - 800078c: 4603 mov r3, r0 - 800078e: 2b00 cmp r3, #0 - 8000790: d001 beq.n 8000796 - { - Error_Handler(); - 8000792: f000 f995 bl 8000ac0 - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - 8000796: 2300 movs r3, #0 - 8000798: 623b str r3, [r7, #32] - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - 800079a: 2300 movs r3, #0 - 800079c: 627b str r3, [r7, #36] ; 0x24 - if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK) - 800079e: f107 0320 add.w r3, r7, #32 - 80007a2: 4619 mov r1, r3 - 80007a4: 4821 ldr r0, [pc, #132] ; (800082c ) - 80007a6: f003 fc41 bl 800402c - 80007aa: 4603 mov r3, r0 - 80007ac: 2b00 cmp r3, #0 - 80007ae: d001 beq.n 80007b4 - { - Error_Handler(); - 80007b0: f000 f986 bl 8000ac0 - } - sConfigOC.OCMode = TIM_OCMODE_PWM1; - 80007b4: 2360 movs r3, #96 ; 0x60 - 80007b6: 607b str r3, [r7, #4] - sConfigOC.Pulse = 0; - 80007b8: 2300 movs r3, #0 - 80007ba: 60bb str r3, [r7, #8] - sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; - 80007bc: 2300 movs r3, #0 - 80007be: 60fb str r3, [r7, #12] - sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; - 80007c0: 2300 movs r3, #0 - 80007c2: 617b str r3, [r7, #20] - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) - 80007c4: 1d3b adds r3, r7, #4 - 80007c6: 2200 movs r2, #0 - 80007c8: 4619 mov r1, r3 - 80007ca: 4818 ldr r0, [pc, #96] ; (800082c ) - 80007cc: f002 ff98 bl 8003700 - 80007d0: 4603 mov r3, r0 - 80007d2: 2b00 cmp r3, #0 - 80007d4: d001 beq.n 80007da - { - Error_Handler(); - 80007d6: f000 f973 bl 8000ac0 - } - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) - 80007da: 1d3b adds r3, r7, #4 - 80007dc: 2204 movs r2, #4 - 80007de: 4619 mov r1, r3 - 80007e0: 4812 ldr r0, [pc, #72] ; (800082c ) - 80007e2: f002 ff8d bl 8003700 - 80007e6: 4603 mov r3, r0 - 80007e8: 2b00 cmp r3, #0 - 80007ea: d001 beq.n 80007f0 - { - Error_Handler(); - 80007ec: f000 f968 bl 8000ac0 - } - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) - 80007f0: 1d3b adds r3, r7, #4 - 80007f2: 2208 movs r2, #8 - 80007f4: 4619 mov r1, r3 - 80007f6: 480d ldr r0, [pc, #52] ; (800082c ) - 80007f8: f002 ff82 bl 8003700 - 80007fc: 4603 mov r3, r0 - 80007fe: 2b00 cmp r3, #0 - 8000800: d001 beq.n 8000806 - { - Error_Handler(); - 8000802: f000 f95d bl 8000ac0 - } - if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) - 8000806: 1d3b adds r3, r7, #4 - 8000808: 220c movs r2, #12 - 800080a: 4619 mov r1, r3 - 800080c: 4807 ldr r0, [pc, #28] ; (800082c ) - 800080e: f002 ff77 bl 8003700 - 8000812: 4603 mov r3, r0 - 8000814: 2b00 cmp r3, #0 - 8000816: d001 beq.n 800081c - { - Error_Handler(); - 8000818: f000 f952 bl 8000ac0 - } - /* USER CODE BEGIN TIM3_Init 2 */ - - /* USER CODE END TIM3_Init 2 */ - HAL_TIM_MspPostInit(&htim3); - 800081c: 4803 ldr r0, [pc, #12] ; (800082c ) - 800081e: f000 f9cf bl 8000bc0 - -} - 8000822: bf00 nop - 8000824: 3738 adds r7, #56 ; 0x38 - 8000826: 46bd mov sp, r7 - 8000828: bd80 pop {r7, pc} - 800082a: bf00 nop - 800082c: 200000d8 .word 0x200000d8 - 8000830: 40000400 .word 0x40000400 - -08000834 : - * @brief TIM7 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM7_Init(void) -{ - 8000834: b580 push {r7, lr} - 8000836: b082 sub sp, #8 - 8000838: af00 add r7, sp, #0 - - /* USER CODE BEGIN TIM7_Init 0 */ - - /* USER CODE END TIM7_Init 0 */ - - TIM_MasterConfigTypeDef sMasterConfig = {0}; - 800083a: 463b mov r3, r7 - 800083c: 2200 movs r2, #0 - 800083e: 601a str r2, [r3, #0] - 8000840: 605a str r2, [r3, #4] - - /* USER CODE BEGIN TIM7_Init 1 */ - - /* USER CODE END TIM7_Init 1 */ - htim7.Instance = TIM7; - 8000842: 4b15 ldr r3, [pc, #84] ; (8000898 ) - 8000844: 4a15 ldr r2, [pc, #84] ; (800089c ) - 8000846: 601a str r2, [r3, #0] - htim7.Init.Prescaler = 120; - 8000848: 4b13 ldr r3, [pc, #76] ; (8000898 ) - 800084a: 2278 movs r2, #120 ; 0x78 - 800084c: 605a str r2, [r3, #4] - htim7.Init.CounterMode = TIM_COUNTERMODE_UP; - 800084e: 4b12 ldr r3, [pc, #72] ; (8000898 ) - 8000850: 2200 movs r2, #0 - 8000852: 609a str r2, [r3, #8] - htim7.Init.Period = 1000; - 8000854: 4b10 ldr r3, [pc, #64] ; (8000898 ) - 8000856: f44f 727a mov.w r2, #1000 ; 0x3e8 - 800085a: 60da str r2, [r3, #12] - htim7.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - 800085c: 4b0e ldr r3, [pc, #56] ; (8000898 ) - 800085e: 2200 movs r2, #0 - 8000860: 619a str r2, [r3, #24] - if (HAL_TIM_Base_Init(&htim7) != HAL_OK) - 8000862: 480d ldr r0, [pc, #52] ; (8000898 ) - 8000864: f002 fd9c bl 80033a0 - 8000868: 4603 mov r3, r0 - 800086a: 2b00 cmp r3, #0 - 800086c: d001 beq.n 8000872 - { - Error_Handler(); - 800086e: f000 f927 bl 8000ac0 - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - 8000872: 2300 movs r3, #0 - 8000874: 603b str r3, [r7, #0] - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - 8000876: 2300 movs r3, #0 - 8000878: 607b str r3, [r7, #4] - if (HAL_TIMEx_MasterConfigSynchronization(&htim7, &sMasterConfig) != HAL_OK) - 800087a: 463b mov r3, r7 - 800087c: 4619 mov r1, r3 - 800087e: 4806 ldr r0, [pc, #24] ; (8000898 ) - 8000880: f003 fbd4 bl 800402c - 8000884: 4603 mov r3, r0 - 8000886: 2b00 cmp r3, #0 - 8000888: d001 beq.n 800088e - { - Error_Handler(); - 800088a: f000 f919 bl 8000ac0 - } - /* USER CODE BEGIN TIM7_Init 2 */ - - /* USER CODE END TIM7_Init 2 */ - -} - 800088e: bf00 nop - 8000890: 3708 adds r7, #8 - 8000892: 46bd mov sp, r7 - 8000894: bd80 pop {r7, pc} - 8000896: bf00 nop - 8000898: 20000120 .word 0x20000120 - 800089c: 40001400 .word 0x40001400 - -080008a0 : - * @brief USART3 Initialization Function - * @param None - * @retval None - */ -static void MX_USART3_UART_Init(void) -{ - 80008a0: b580 push {r7, lr} - 80008a2: af00 add r7, sp, #0 - /* USER CODE END USART3_Init 0 */ - - /* USER CODE BEGIN USART3_Init 1 */ - - /* USER CODE END USART3_Init 1 */ - huart3.Instance = USART3; - 80008a4: 4b11 ldr r3, [pc, #68] ; (80008ec ) - 80008a6: 4a12 ldr r2, [pc, #72] ; (80008f0 ) - 80008a8: 601a str r2, [r3, #0] - huart3.Init.BaudRate = 115200; - 80008aa: 4b10 ldr r3, [pc, #64] ; (80008ec ) - 80008ac: f44f 32e1 mov.w r2, #115200 ; 0x1c200 - 80008b0: 605a str r2, [r3, #4] - huart3.Init.WordLength = UART_WORDLENGTH_8B; - 80008b2: 4b0e ldr r3, [pc, #56] ; (80008ec ) - 80008b4: 2200 movs r2, #0 - 80008b6: 609a str r2, [r3, #8] - huart3.Init.StopBits = UART_STOPBITS_1; - 80008b8: 4b0c ldr r3, [pc, #48] ; (80008ec ) - 80008ba: 2200 movs r2, #0 - 80008bc: 60da str r2, [r3, #12] - huart3.Init.Parity = UART_PARITY_NONE; - 80008be: 4b0b ldr r3, [pc, #44] ; (80008ec ) - 80008c0: 2200 movs r2, #0 - 80008c2: 611a str r2, [r3, #16] - huart3.Init.Mode = UART_MODE_TX_RX; - 80008c4: 4b09 ldr r3, [pc, #36] ; (80008ec ) - 80008c6: 220c movs r2, #12 - 80008c8: 615a str r2, [r3, #20] - huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; - 80008ca: 4b08 ldr r3, [pc, #32] ; (80008ec ) - 80008cc: 2200 movs r2, #0 - 80008ce: 619a str r2, [r3, #24] - huart3.Init.OverSampling = UART_OVERSAMPLING_16; - 80008d0: 4b06 ldr r3, [pc, #24] ; (80008ec ) - 80008d2: 2200 movs r2, #0 - 80008d4: 61da str r2, [r3, #28] - if (HAL_UART_Init(&huart3) != HAL_OK) - 80008d6: 4805 ldr r0, [pc, #20] ; (80008ec ) - 80008d8: f003 fc85 bl 80041e6 - 80008dc: 4603 mov r3, r0 - 80008de: 2b00 cmp r3, #0 - 80008e0: d001 beq.n 80008e6 - { - Error_Handler(); - 80008e2: f000 f8ed bl 8000ac0 - } - /* USER CODE BEGIN USART3_Init 2 */ - - /* USER CODE END USART3_Init 2 */ - -} - 80008e6: bf00 nop - 80008e8: bd80 pop {r7, pc} - 80008ea: bf00 nop - 80008ec: 20000168 .word 0x20000168 - 80008f0: 40004800 .word 0x40004800 - -080008f4 : - * @brief USB_OTG_FS Initialization Function - * @param None - * @retval None - */ -static void MX_USB_OTG_FS_PCD_Init(void) -{ - 80008f4: b580 push {r7, lr} - 80008f6: af00 add r7, sp, #0 - /* USER CODE END USB_OTG_FS_Init 0 */ - - /* USER CODE BEGIN USB_OTG_FS_Init 1 */ - - /* USER CODE END USB_OTG_FS_Init 1 */ - hpcd_USB_OTG_FS.Instance = USB_OTG_FS; - 80008f8: 4b12 ldr r3, [pc, #72] ; (8000944 ) - 80008fa: f04f 42a0 mov.w r2, #1342177280 ; 0x50000000 - 80008fe: 601a str r2, [r3, #0] - hpcd_USB_OTG_FS.Init.dev_endpoints = 4; - 8000900: 4b10 ldr r3, [pc, #64] ; (8000944 ) - 8000902: 2204 movs r2, #4 - 8000904: 605a str r2, [r3, #4] - hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL; - 8000906: 4b0f ldr r3, [pc, #60] ; (8000944 ) - 8000908: 2202 movs r2, #2 - 800090a: 611a str r2, [r3, #16] - hpcd_USB_OTG_FS.Init.dma_enable = DISABLE; - 800090c: 4b0d ldr r3, [pc, #52] ; (8000944 ) - 800090e: 2200 movs r2, #0 - 8000910: 60da str r2, [r3, #12] - hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED; - 8000912: 4b0c ldr r3, [pc, #48] ; (8000944 ) - 8000914: 2202 movs r2, #2 - 8000916: 619a str r2, [r3, #24] - hpcd_USB_OTG_FS.Init.Sof_enable = ENABLE; - 8000918: 4b0a ldr r3, [pc, #40] ; (8000944 ) - 800091a: 2201 movs r2, #1 - 800091c: 61da str r2, [r3, #28] - hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE; - 800091e: 4b09 ldr r3, [pc, #36] ; (8000944 ) - 8000920: 2200 movs r2, #0 - 8000922: 621a str r2, [r3, #32] - hpcd_USB_OTG_FS.Init.vbus_sensing_enable = ENABLE; - 8000924: 4b07 ldr r3, [pc, #28] ; (8000944 ) - 8000926: 2201 movs r2, #1 - 8000928: 62da str r2, [r3, #44] ; 0x2c - hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE; - 800092a: 4b06 ldr r3, [pc, #24] ; (8000944 ) - 800092c: 2200 movs r2, #0 - 800092e: 631a str r2, [r3, #48] ; 0x30 - if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK) - 8000930: 4804 ldr r0, [pc, #16] ; (8000944 ) - 8000932: f001 ff7d bl 8002830 - 8000936: 4603 mov r3, r0 - 8000938: 2b00 cmp r3, #0 - 800093a: d001 beq.n 8000940 - { - Error_Handler(); - 800093c: f000 f8c0 bl 8000ac0 - } - /* USER CODE BEGIN USB_OTG_FS_Init 2 */ - - /* USER CODE END USB_OTG_FS_Init 2 */ - -} - 8000940: bf00 nop - 8000942: bd80 pop {r7, pc} - 8000944: 200001b0 .word 0x200001b0 - -08000948 : - * @brief GPIO Initialization Function - * @param None - * @retval None - */ -static void MX_GPIO_Init(void) -{ - 8000948: b580 push {r7, lr} - 800094a: b08c sub sp, #48 ; 0x30 - 800094c: af00 add r7, sp, #0 - GPIO_InitTypeDef GPIO_InitStruct = {0}; - 800094e: f107 031c add.w r3, r7, #28 - 8000952: 2200 movs r2, #0 - 8000954: 601a str r2, [r3, #0] - 8000956: 605a str r2, [r3, #4] - 8000958: 609a str r2, [r3, #8] - 800095a: 60da str r2, [r3, #12] - 800095c: 611a str r2, [r3, #16] -/* USER CODE BEGIN MX_GPIO_Init_1 */ -/* USER CODE END MX_GPIO_Init_1 */ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - 800095e: 2300 movs r3, #0 - 8000960: 61bb str r3, [r7, #24] - 8000962: 4b53 ldr r3, [pc, #332] ; (8000ab0 ) - 8000964: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000966: 4a52 ldr r2, [pc, #328] ; (8000ab0 ) - 8000968: f043 0304 orr.w r3, r3, #4 - 800096c: 6313 str r3, [r2, #48] ; 0x30 - 800096e: 4b50 ldr r3, [pc, #320] ; (8000ab0 ) - 8000970: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000972: f003 0304 and.w r3, r3, #4 - 8000976: 61bb str r3, [r7, #24] - 8000978: 69bb ldr r3, [r7, #24] - __HAL_RCC_GPIOH_CLK_ENABLE(); - 800097a: 2300 movs r3, #0 - 800097c: 617b str r3, [r7, #20] - 800097e: 4b4c ldr r3, [pc, #304] ; (8000ab0 ) - 8000980: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000982: 4a4b ldr r2, [pc, #300] ; (8000ab0 ) - 8000984: f043 0380 orr.w r3, r3, #128 ; 0x80 - 8000988: 6313 str r3, [r2, #48] ; 0x30 - 800098a: 4b49 ldr r3, [pc, #292] ; (8000ab0 ) - 800098c: 6b1b ldr r3, [r3, #48] ; 0x30 - 800098e: f003 0380 and.w r3, r3, #128 ; 0x80 - 8000992: 617b str r3, [r7, #20] - 8000994: 697b ldr r3, [r7, #20] - __HAL_RCC_GPIOA_CLK_ENABLE(); - 8000996: 2300 movs r3, #0 - 8000998: 613b str r3, [r7, #16] - 800099a: 4b45 ldr r3, [pc, #276] ; (8000ab0 ) - 800099c: 6b1b ldr r3, [r3, #48] ; 0x30 - 800099e: 4a44 ldr r2, [pc, #272] ; (8000ab0 ) - 80009a0: f043 0301 orr.w r3, r3, #1 - 80009a4: 6313 str r3, [r2, #48] ; 0x30 - 80009a6: 4b42 ldr r3, [pc, #264] ; (8000ab0 ) - 80009a8: 6b1b ldr r3, [r3, #48] ; 0x30 - 80009aa: f003 0301 and.w r3, r3, #1 - 80009ae: 613b str r3, [r7, #16] - 80009b0: 693b ldr r3, [r7, #16] - __HAL_RCC_GPIOB_CLK_ENABLE(); - 80009b2: 2300 movs r3, #0 - 80009b4: 60fb str r3, [r7, #12] - 80009b6: 4b3e ldr r3, [pc, #248] ; (8000ab0 ) - 80009b8: 6b1b ldr r3, [r3, #48] ; 0x30 - 80009ba: 4a3d ldr r2, [pc, #244] ; (8000ab0 ) - 80009bc: f043 0302 orr.w r3, r3, #2 - 80009c0: 6313 str r3, [r2, #48] ; 0x30 - 80009c2: 4b3b ldr r3, [pc, #236] ; (8000ab0 ) - 80009c4: 6b1b ldr r3, [r3, #48] ; 0x30 - 80009c6: f003 0302 and.w r3, r3, #2 - 80009ca: 60fb str r3, [r7, #12] - 80009cc: 68fb ldr r3, [r7, #12] - __HAL_RCC_GPIOE_CLK_ENABLE(); - 80009ce: 2300 movs r3, #0 - 80009d0: 60bb str r3, [r7, #8] - 80009d2: 4b37 ldr r3, [pc, #220] ; (8000ab0 ) - 80009d4: 6b1b ldr r3, [r3, #48] ; 0x30 - 80009d6: 4a36 ldr r2, [pc, #216] ; (8000ab0 ) - 80009d8: f043 0310 orr.w r3, r3, #16 - 80009dc: 6313 str r3, [r2, #48] ; 0x30 - 80009de: 4b34 ldr r3, [pc, #208] ; (8000ab0 ) - 80009e0: 6b1b ldr r3, [r3, #48] ; 0x30 - 80009e2: f003 0310 and.w r3, r3, #16 - 80009e6: 60bb str r3, [r7, #8] - 80009e8: 68bb ldr r3, [r7, #8] - __HAL_RCC_GPIOD_CLK_ENABLE(); - 80009ea: 2300 movs r3, #0 - 80009ec: 607b str r3, [r7, #4] - 80009ee: 4b30 ldr r3, [pc, #192] ; (8000ab0 ) - 80009f0: 6b1b ldr r3, [r3, #48] ; 0x30 - 80009f2: 4a2f ldr r2, [pc, #188] ; (8000ab0 ) - 80009f4: f043 0308 orr.w r3, r3, #8 - 80009f8: 6313 str r3, [r2, #48] ; 0x30 - 80009fa: 4b2d ldr r3, [pc, #180] ; (8000ab0 ) - 80009fc: 6b1b ldr r3, [r3, #48] ; 0x30 - 80009fe: f003 0308 and.w r3, r3, #8 - 8000a02: 607b str r3, [r7, #4] - 8000a04: 687b ldr r3, [r7, #4] - __HAL_RCC_GPIOG_CLK_ENABLE(); - 8000a06: 2300 movs r3, #0 - 8000a08: 603b str r3, [r7, #0] - 8000a0a: 4b29 ldr r3, [pc, #164] ; (8000ab0 ) - 8000a0c: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000a0e: 4a28 ldr r2, [pc, #160] ; (8000ab0 ) - 8000a10: f043 0340 orr.w r3, r3, #64 ; 0x40 - 8000a14: 6313 str r3, [r2, #48] ; 0x30 - 8000a16: 4b26 ldr r3, [pc, #152] ; (8000ab0 ) - 8000a18: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000a1a: f003 0340 and.w r3, r3, #64 ; 0x40 - 8000a1e: 603b str r3, [r7, #0] - 8000a20: 683b ldr r3, [r7, #0] - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOB, LD1_Pin|LD3_Pin|LD2_Pin, GPIO_PIN_RESET); - 8000a22: 2200 movs r2, #0 - 8000a24: f244 0181 movw r1, #16513 ; 0x4081 - 8000a28: 4822 ldr r0, [pc, #136] ; (8000ab4 ) - 8000a2a: f001 fee9 bl 8002800 - - /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(USB_PowerSwitchOn_GPIO_Port, USB_PowerSwitchOn_Pin, GPIO_PIN_RESET); - 8000a2e: 2200 movs r2, #0 - 8000a30: 2140 movs r1, #64 ; 0x40 - 8000a32: 4821 ldr r0, [pc, #132] ; (8000ab8 ) - 8000a34: f001 fee4 bl 8002800 - - /*Configure GPIO pin : USER_Btn_Pin */ - GPIO_InitStruct.Pin = USER_Btn_Pin; - 8000a38: f44f 5300 mov.w r3, #8192 ; 0x2000 - 8000a3c: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; - 8000a3e: f44f 1388 mov.w r3, #1114112 ; 0x110000 - 8000a42: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000a44: 2300 movs r3, #0 - 8000a46: 627b str r3, [r7, #36] ; 0x24 - HAL_GPIO_Init(USER_Btn_GPIO_Port, &GPIO_InitStruct); - 8000a48: f107 031c add.w r3, r7, #28 - 8000a4c: 4619 mov r1, r3 - 8000a4e: 481b ldr r0, [pc, #108] ; (8000abc ) - 8000a50: f001 fd38 bl 80024c4 - - /*Configure GPIO pins : LD1_Pin LD3_Pin LD2_Pin */ - GPIO_InitStruct.Pin = LD1_Pin|LD3_Pin|LD2_Pin; - 8000a54: f244 0381 movw r3, #16513 ; 0x4081 - 8000a58: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - 8000a5a: 2301 movs r3, #1 - 8000a5c: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000a5e: 2300 movs r3, #0 - 8000a60: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - 8000a62: 2300 movs r3, #0 - 8000a64: 62bb str r3, [r7, #40] ; 0x28 - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - 8000a66: f107 031c add.w r3, r7, #28 - 8000a6a: 4619 mov r1, r3 - 8000a6c: 4811 ldr r0, [pc, #68] ; (8000ab4 ) - 8000a6e: f001 fd29 bl 80024c4 - - /*Configure GPIO pin : USB_PowerSwitchOn_Pin */ - GPIO_InitStruct.Pin = USB_PowerSwitchOn_Pin; - 8000a72: 2340 movs r3, #64 ; 0x40 - 8000a74: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - 8000a76: 2301 movs r3, #1 - 8000a78: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000a7a: 2300 movs r3, #0 - 8000a7c: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - 8000a7e: 2300 movs r3, #0 - 8000a80: 62bb str r3, [r7, #40] ; 0x28 - HAL_GPIO_Init(USB_PowerSwitchOn_GPIO_Port, &GPIO_InitStruct); - 8000a82: f107 031c add.w r3, r7, #28 - 8000a86: 4619 mov r1, r3 - 8000a88: 480b ldr r0, [pc, #44] ; (8000ab8 ) - 8000a8a: f001 fd1b bl 80024c4 - - /*Configure GPIO pin : USB_OverCurrent_Pin */ - GPIO_InitStruct.Pin = USB_OverCurrent_Pin; - 8000a8e: 2380 movs r3, #128 ; 0x80 - 8000a90: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - 8000a92: 2300 movs r3, #0 - 8000a94: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000a96: 2300 movs r3, #0 - 8000a98: 627b str r3, [r7, #36] ; 0x24 - HAL_GPIO_Init(USB_OverCurrent_GPIO_Port, &GPIO_InitStruct); - 8000a9a: f107 031c add.w r3, r7, #28 - 8000a9e: 4619 mov r1, r3 - 8000aa0: 4805 ldr r0, [pc, #20] ; (8000ab8 ) - 8000aa2: f001 fd0f bl 80024c4 - -/* USER CODE BEGIN MX_GPIO_Init_2 */ -/* USER CODE END MX_GPIO_Init_2 */ -} - 8000aa6: bf00 nop - 8000aa8: 3730 adds r7, #48 ; 0x30 - 8000aaa: 46bd mov sp, r7 - 8000aac: bd80 pop {r7, pc} - 8000aae: bf00 nop - 8000ab0: 40023800 .word 0x40023800 - 8000ab4: 40020400 .word 0x40020400 - 8000ab8: 40021800 .word 0x40021800 - 8000abc: 40020800 .word 0x40020800 - -08000ac0 : -/** - * @brief This function is executed in case of error occurrence. - * @retval None - */ -void Error_Handler(void) -{ - 8000ac0: b480 push {r7} - 8000ac2: af00 add r7, sp, #0 - \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"); - 8000ac4: b672 cpsid i -} - 8000ac6: bf00 nop - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - __disable_irq(); - while (1) - 8000ac8: e7fe b.n 8000ac8 - ... - -08000acc : -void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); - /** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - 8000acc: b480 push {r7} - 8000ace: b083 sub sp, #12 - 8000ad0: af00 add r7, sp, #0 - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - 8000ad2: 2300 movs r3, #0 - 8000ad4: 607b str r3, [r7, #4] - 8000ad6: 4b0f ldr r3, [pc, #60] ; (8000b14 ) - 8000ad8: 6c5b ldr r3, [r3, #68] ; 0x44 - 8000ada: 4a0e ldr r2, [pc, #56] ; (8000b14 ) - 8000adc: f443 4380 orr.w r3, r3, #16384 ; 0x4000 - 8000ae0: 6453 str r3, [r2, #68] ; 0x44 - 8000ae2: 4b0c ldr r3, [pc, #48] ; (8000b14 ) - 8000ae4: 6c5b ldr r3, [r3, #68] ; 0x44 - 8000ae6: f403 4380 and.w r3, r3, #16384 ; 0x4000 - 8000aea: 607b str r3, [r7, #4] - 8000aec: 687b ldr r3, [r7, #4] - __HAL_RCC_PWR_CLK_ENABLE(); - 8000aee: 2300 movs r3, #0 - 8000af0: 603b str r3, [r7, #0] - 8000af2: 4b08 ldr r3, [pc, #32] ; (8000b14 ) - 8000af4: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000af6: 4a07 ldr r2, [pc, #28] ; (8000b14 ) - 8000af8: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 - 8000afc: 6413 str r3, [r2, #64] ; 0x40 - 8000afe: 4b05 ldr r3, [pc, #20] ; (8000b14 ) - 8000b00: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b02: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 - 8000b06: 603b str r3, [r7, #0] - 8000b08: 683b ldr r3, [r7, #0] - /* System interrupt init*/ - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - 8000b0a: bf00 nop - 8000b0c: 370c adds r7, #12 - 8000b0e: 46bd mov sp, r7 - 8000b10: bc80 pop {r7} - 8000b12: 4770 bx lr - 8000b14: 40023800 .word 0x40023800 - -08000b18 : -* This function configures the hardware resources used in this example -* @param htim_base: TIM_Base handle pointer -* @retval None -*/ -void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) -{ - 8000b18: b580 push {r7, lr} - 8000b1a: b086 sub sp, #24 - 8000b1c: af00 add r7, sp, #0 - 8000b1e: 6078 str r0, [r7, #4] - if(htim_base->Instance==TIM1) - 8000b20: 687b ldr r3, [r7, #4] - 8000b22: 681b ldr r3, [r3, #0] - 8000b24: 4a22 ldr r2, [pc, #136] ; (8000bb0 ) - 8000b26: 4293 cmp r3, r2 - 8000b28: d10e bne.n 8000b48 - { - /* USER CODE BEGIN TIM1_MspInit 0 */ - - /* USER CODE END TIM1_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_TIM1_CLK_ENABLE(); - 8000b2a: 2300 movs r3, #0 - 8000b2c: 617b str r3, [r7, #20] - 8000b2e: 4b21 ldr r3, [pc, #132] ; (8000bb4 ) - 8000b30: 6c5b ldr r3, [r3, #68] ; 0x44 - 8000b32: 4a20 ldr r2, [pc, #128] ; (8000bb4 ) - 8000b34: f043 0301 orr.w r3, r3, #1 - 8000b38: 6453 str r3, [r2, #68] ; 0x44 - 8000b3a: 4b1e ldr r3, [pc, #120] ; (8000bb4 ) - 8000b3c: 6c5b ldr r3, [r3, #68] ; 0x44 - 8000b3e: f003 0301 and.w r3, r3, #1 - 8000b42: 617b str r3, [r7, #20] - 8000b44: 697b ldr r3, [r7, #20] - /* USER CODE BEGIN TIM7_MspInit 1 */ - - /* USER CODE END TIM7_MspInit 1 */ - } - -} - 8000b46: e02e b.n 8000ba6 - else if(htim_base->Instance==TIM3) - 8000b48: 687b ldr r3, [r7, #4] - 8000b4a: 681b ldr r3, [r3, #0] - 8000b4c: 4a1a ldr r2, [pc, #104] ; (8000bb8 ) - 8000b4e: 4293 cmp r3, r2 - 8000b50: d10e bne.n 8000b70 - __HAL_RCC_TIM3_CLK_ENABLE(); - 8000b52: 2300 movs r3, #0 - 8000b54: 613b str r3, [r7, #16] - 8000b56: 4b17 ldr r3, [pc, #92] ; (8000bb4 ) - 8000b58: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b5a: 4a16 ldr r2, [pc, #88] ; (8000bb4 ) - 8000b5c: f043 0302 orr.w r3, r3, #2 - 8000b60: 6413 str r3, [r2, #64] ; 0x40 - 8000b62: 4b14 ldr r3, [pc, #80] ; (8000bb4 ) - 8000b64: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b66: f003 0302 and.w r3, r3, #2 - 8000b6a: 613b str r3, [r7, #16] - 8000b6c: 693b ldr r3, [r7, #16] -} - 8000b6e: e01a b.n 8000ba6 - else if(htim_base->Instance==TIM7) - 8000b70: 687b ldr r3, [r7, #4] - 8000b72: 681b ldr r3, [r3, #0] - 8000b74: 4a11 ldr r2, [pc, #68] ; (8000bbc ) - 8000b76: 4293 cmp r3, r2 - 8000b78: d115 bne.n 8000ba6 - __HAL_RCC_TIM7_CLK_ENABLE(); - 8000b7a: 2300 movs r3, #0 - 8000b7c: 60fb str r3, [r7, #12] - 8000b7e: 4b0d ldr r3, [pc, #52] ; (8000bb4 ) - 8000b80: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b82: 4a0c ldr r2, [pc, #48] ; (8000bb4 ) - 8000b84: f043 0320 orr.w r3, r3, #32 - 8000b88: 6413 str r3, [r2, #64] ; 0x40 - 8000b8a: 4b0a ldr r3, [pc, #40] ; (8000bb4 ) - 8000b8c: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b8e: f003 0320 and.w r3, r3, #32 - 8000b92: 60fb str r3, [r7, #12] - 8000b94: 68fb ldr r3, [r7, #12] - HAL_NVIC_SetPriority(TIM7_IRQn, 0, 0); - 8000b96: 2200 movs r2, #0 - 8000b98: 2100 movs r1, #0 - 8000b9a: 2037 movs r0, #55 ; 0x37 - 8000b9c: f000 fbe7 bl 800136e - HAL_NVIC_EnableIRQ(TIM7_IRQn); - 8000ba0: 2037 movs r0, #55 ; 0x37 - 8000ba2: f000 fc00 bl 80013a6 -} - 8000ba6: bf00 nop - 8000ba8: 3718 adds r7, #24 - 8000baa: 46bd mov sp, r7 - 8000bac: bd80 pop {r7, pc} - 8000bae: bf00 nop - 8000bb0: 40010000 .word 0x40010000 - 8000bb4: 40023800 .word 0x40023800 - 8000bb8: 40000400 .word 0x40000400 - 8000bbc: 40001400 .word 0x40001400 - -08000bc0 : - -void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim) -{ - 8000bc0: b580 push {r7, lr} - 8000bc2: b08c sub sp, #48 ; 0x30 - 8000bc4: af00 add r7, sp, #0 - 8000bc6: 6078 str r0, [r7, #4] - GPIO_InitTypeDef GPIO_InitStruct = {0}; - 8000bc8: f107 031c add.w r3, r7, #28 - 8000bcc: 2200 movs r2, #0 - 8000bce: 601a str r2, [r3, #0] - 8000bd0: 605a str r2, [r3, #4] - 8000bd2: 609a str r2, [r3, #8] - 8000bd4: 60da str r2, [r3, #12] - 8000bd6: 611a str r2, [r3, #16] - if(htim->Instance==TIM1) - 8000bd8: 687b ldr r3, [r7, #4] - 8000bda: 681b ldr r3, [r3, #0] - 8000bdc: 4a43 ldr r2, [pc, #268] ; (8000cec ) - 8000bde: 4293 cmp r3, r2 - 8000be0: d11f bne.n 8000c22 - { - /* USER CODE BEGIN TIM1_MspPostInit 0 */ - - /* USER CODE END TIM1_MspPostInit 0 */ - __HAL_RCC_GPIOE_CLK_ENABLE(); - 8000be2: 2300 movs r3, #0 - 8000be4: 61bb str r3, [r7, #24] - 8000be6: 4b42 ldr r3, [pc, #264] ; (8000cf0 ) - 8000be8: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000bea: 4a41 ldr r2, [pc, #260] ; (8000cf0 ) - 8000bec: f043 0310 orr.w r3, r3, #16 - 8000bf0: 6313 str r3, [r2, #48] ; 0x30 - 8000bf2: 4b3f ldr r3, [pc, #252] ; (8000cf0 ) - 8000bf4: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000bf6: f003 0310 and.w r3, r3, #16 - 8000bfa: 61bb str r3, [r7, #24] - 8000bfc: 69bb ldr r3, [r7, #24] - PE9 ------> TIM1_CH1 - PE11 ------> TIM1_CH2 - PE13 ------> TIM1_CH3 - PE14 ------> TIM1_CH4 - */ - GPIO_InitStruct.Pin = PWM1_Pin|PWM2_Pin|PWM3_Pin|PWM4_Pin; - 8000bfe: f44f 43d4 mov.w r3, #27136 ; 0x6a00 - 8000c02: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8000c04: 2302 movs r3, #2 - 8000c06: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000c08: 2300 movs r3, #0 - 8000c0a: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - 8000c0c: 2300 movs r3, #0 - 8000c0e: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Alternate = GPIO_AF1_TIM1; - 8000c10: 2301 movs r3, #1 - 8000c12: 62fb str r3, [r7, #44] ; 0x2c - HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); - 8000c14: f107 031c add.w r3, r7, #28 - 8000c18: 4619 mov r1, r3 - 8000c1a: 4836 ldr r0, [pc, #216] ; (8000cf4 ) - 8000c1c: f001 fc52 bl 80024c4 - /* USER CODE BEGIN TIM3_MspPostInit 1 */ - - /* USER CODE END TIM3_MspPostInit 1 */ - } - -} - 8000c20: e05f b.n 8000ce2 - else if(htim->Instance==TIM3) - 8000c22: 687b ldr r3, [r7, #4] - 8000c24: 681b ldr r3, [r3, #0] - 8000c26: 4a34 ldr r2, [pc, #208] ; (8000cf8 ) - 8000c28: 4293 cmp r3, r2 - 8000c2a: d15a bne.n 8000ce2 - __HAL_RCC_GPIOA_CLK_ENABLE(); - 8000c2c: 2300 movs r3, #0 - 8000c2e: 617b str r3, [r7, #20] - 8000c30: 4b2f ldr r3, [pc, #188] ; (8000cf0 ) - 8000c32: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000c34: 4a2e ldr r2, [pc, #184] ; (8000cf0 ) - 8000c36: f043 0301 orr.w r3, r3, #1 - 8000c3a: 6313 str r3, [r2, #48] ; 0x30 - 8000c3c: 4b2c ldr r3, [pc, #176] ; (8000cf0 ) - 8000c3e: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000c40: f003 0301 and.w r3, r3, #1 - 8000c44: 617b str r3, [r7, #20] - 8000c46: 697b ldr r3, [r7, #20] - __HAL_RCC_GPIOB_CLK_ENABLE(); - 8000c48: 2300 movs r3, #0 - 8000c4a: 613b str r3, [r7, #16] - 8000c4c: 4b28 ldr r3, [pc, #160] ; (8000cf0 ) - 8000c4e: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000c50: 4a27 ldr r2, [pc, #156] ; (8000cf0 ) - 8000c52: f043 0302 orr.w r3, r3, #2 - 8000c56: 6313 str r3, [r2, #48] ; 0x30 - 8000c58: 4b25 ldr r3, [pc, #148] ; (8000cf0 ) - 8000c5a: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000c5c: f003 0302 and.w r3, r3, #2 - 8000c60: 613b str r3, [r7, #16] - 8000c62: 693b ldr r3, [r7, #16] - __HAL_RCC_GPIOC_CLK_ENABLE(); - 8000c64: 2300 movs r3, #0 - 8000c66: 60fb str r3, [r7, #12] - 8000c68: 4b21 ldr r3, [pc, #132] ; (8000cf0 ) - 8000c6a: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000c6c: 4a20 ldr r2, [pc, #128] ; (8000cf0 ) - 8000c6e: f043 0304 orr.w r3, r3, #4 - 8000c72: 6313 str r3, [r2, #48] ; 0x30 - 8000c74: 4b1e ldr r3, [pc, #120] ; (8000cf0 ) - 8000c76: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000c78: f003 0304 and.w r3, r3, #4 - 8000c7c: 60fb str r3, [r7, #12] - 8000c7e: 68fb ldr r3, [r7, #12] - GPIO_InitStruct.Pin = PWM5_Pin; - 8000c80: 2340 movs r3, #64 ; 0x40 - 8000c82: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8000c84: 2302 movs r3, #2 - 8000c86: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000c88: 2300 movs r3, #0 - 8000c8a: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - 8000c8c: 2300 movs r3, #0 - 8000c8e: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; - 8000c90: 2302 movs r3, #2 - 8000c92: 62fb str r3, [r7, #44] ; 0x2c - HAL_GPIO_Init(PWM5_GPIO_Port, &GPIO_InitStruct); - 8000c94: f107 031c add.w r3, r7, #28 - 8000c98: 4619 mov r1, r3 - 8000c9a: 4818 ldr r0, [pc, #96] ; (8000cfc ) - 8000c9c: f001 fc12 bl 80024c4 - GPIO_InitStruct.Pin = PWM6_Pin; - 8000ca0: 2302 movs r3, #2 - 8000ca2: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8000ca4: 2302 movs r3, #2 - 8000ca6: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000ca8: 2300 movs r3, #0 - 8000caa: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - 8000cac: 2300 movs r3, #0 - 8000cae: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; - 8000cb0: 2302 movs r3, #2 - 8000cb2: 62fb str r3, [r7, #44] ; 0x2c - HAL_GPIO_Init(PWM6_GPIO_Port, &GPIO_InitStruct); - 8000cb4: f107 031c add.w r3, r7, #28 - 8000cb8: 4619 mov r1, r3 - 8000cba: 4811 ldr r0, [pc, #68] ; (8000d00 ) - 8000cbc: f001 fc02 bl 80024c4 - GPIO_InitStruct.Pin = PWM7_Pin|PWM8_Pin; - 8000cc0: f44f 73c0 mov.w r3, #384 ; 0x180 - 8000cc4: 61fb str r3, [r7, #28] - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8000cc6: 2302 movs r3, #2 - 8000cc8: 623b str r3, [r7, #32] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000cca: 2300 movs r3, #0 - 8000ccc: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - 8000cce: 2300 movs r3, #0 - 8000cd0: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; - 8000cd2: 2302 movs r3, #2 - 8000cd4: 62fb str r3, [r7, #44] ; 0x2c - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - 8000cd6: f107 031c add.w r3, r7, #28 - 8000cda: 4619 mov r1, r3 - 8000cdc: 4809 ldr r0, [pc, #36] ; (8000d04 ) - 8000cde: f001 fbf1 bl 80024c4 -} - 8000ce2: bf00 nop - 8000ce4: 3730 adds r7, #48 ; 0x30 - 8000ce6: 46bd mov sp, r7 - 8000ce8: bd80 pop {r7, pc} - 8000cea: bf00 nop - 8000cec: 40010000 .word 0x40010000 - 8000cf0: 40023800 .word 0x40023800 - 8000cf4: 40021000 .word 0x40021000 - 8000cf8: 40000400 .word 0x40000400 - 8000cfc: 40020000 .word 0x40020000 - 8000d00: 40020400 .word 0x40020400 - 8000d04: 40020800 .word 0x40020800 - -08000d08 : -* This function configures the hardware resources used in this example -* @param huart: UART handle pointer -* @retval None -*/ -void HAL_UART_MspInit(UART_HandleTypeDef* huart) -{ - 8000d08: b580 push {r7, lr} - 8000d0a: b08a sub sp, #40 ; 0x28 - 8000d0c: af00 add r7, sp, #0 - 8000d0e: 6078 str r0, [r7, #4] - GPIO_InitTypeDef GPIO_InitStruct = {0}; - 8000d10: f107 0314 add.w r3, r7, #20 - 8000d14: 2200 movs r2, #0 - 8000d16: 601a str r2, [r3, #0] - 8000d18: 605a str r2, [r3, #4] - 8000d1a: 609a str r2, [r3, #8] - 8000d1c: 60da str r2, [r3, #12] - 8000d1e: 611a str r2, [r3, #16] - if(huart->Instance==USART3) - 8000d20: 687b ldr r3, [r7, #4] - 8000d22: 681b ldr r3, [r3, #0] - 8000d24: 4a19 ldr r2, [pc, #100] ; (8000d8c ) - 8000d26: 4293 cmp r3, r2 - 8000d28: d12c bne.n 8000d84 - { - /* USER CODE BEGIN USART3_MspInit 0 */ - - /* USER CODE END USART3_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_USART3_CLK_ENABLE(); - 8000d2a: 2300 movs r3, #0 - 8000d2c: 613b str r3, [r7, #16] - 8000d2e: 4b18 ldr r3, [pc, #96] ; (8000d90 ) - 8000d30: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000d32: 4a17 ldr r2, [pc, #92] ; (8000d90 ) - 8000d34: f443 2380 orr.w r3, r3, #262144 ; 0x40000 - 8000d38: 6413 str r3, [r2, #64] ; 0x40 - 8000d3a: 4b15 ldr r3, [pc, #84] ; (8000d90 ) - 8000d3c: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000d3e: f403 2380 and.w r3, r3, #262144 ; 0x40000 - 8000d42: 613b str r3, [r7, #16] - 8000d44: 693b ldr r3, [r7, #16] - - __HAL_RCC_GPIOD_CLK_ENABLE(); - 8000d46: 2300 movs r3, #0 - 8000d48: 60fb str r3, [r7, #12] - 8000d4a: 4b11 ldr r3, [pc, #68] ; (8000d90 ) - 8000d4c: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000d4e: 4a10 ldr r2, [pc, #64] ; (8000d90 ) - 8000d50: f043 0308 orr.w r3, r3, #8 - 8000d54: 6313 str r3, [r2, #48] ; 0x30 - 8000d56: 4b0e ldr r3, [pc, #56] ; (8000d90 ) - 8000d58: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000d5a: f003 0308 and.w r3, r3, #8 - 8000d5e: 60fb str r3, [r7, #12] - 8000d60: 68fb ldr r3, [r7, #12] - /**USART3 GPIO Configuration - PD8 ------> USART3_TX - PD9 ------> USART3_RX - */ - GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin; - 8000d62: f44f 7340 mov.w r3, #768 ; 0x300 - 8000d66: 617b str r3, [r7, #20] - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8000d68: 2302 movs r3, #2 - 8000d6a: 61bb str r3, [r7, #24] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000d6c: 2300 movs r3, #0 - 8000d6e: 61fb str r3, [r7, #28] - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - 8000d70: 2303 movs r3, #3 - 8000d72: 623b str r3, [r7, #32] - GPIO_InitStruct.Alternate = GPIO_AF7_USART3; - 8000d74: 2307 movs r3, #7 - 8000d76: 627b str r3, [r7, #36] ; 0x24 - HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - 8000d78: f107 0314 add.w r3, r7, #20 - 8000d7c: 4619 mov r1, r3 - 8000d7e: 4805 ldr r0, [pc, #20] ; (8000d94 ) - 8000d80: f001 fba0 bl 80024c4 - /* USER CODE BEGIN USART3_MspInit 1 */ - - /* USER CODE END USART3_MspInit 1 */ - } - -} - 8000d84: bf00 nop - 8000d86: 3728 adds r7, #40 ; 0x28 - 8000d88: 46bd mov sp, r7 - 8000d8a: bd80 pop {r7, pc} - 8000d8c: 40004800 .word 0x40004800 - 8000d90: 40023800 .word 0x40023800 - 8000d94: 40020c00 .word 0x40020c00 - -08000d98 : -* This function configures the hardware resources used in this example -* @param hpcd: PCD handle pointer -* @retval None -*/ -void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) -{ - 8000d98: b580 push {r7, lr} - 8000d9a: b08a sub sp, #40 ; 0x28 - 8000d9c: af00 add r7, sp, #0 - 8000d9e: 6078 str r0, [r7, #4] - GPIO_InitTypeDef GPIO_InitStruct = {0}; - 8000da0: f107 0314 add.w r3, r7, #20 - 8000da4: 2200 movs r2, #0 - 8000da6: 601a str r2, [r3, #0] - 8000da8: 605a str r2, [r3, #4] - 8000daa: 609a str r2, [r3, #8] - 8000dac: 60da str r2, [r3, #12] - 8000dae: 611a str r2, [r3, #16] - if(hpcd->Instance==USB_OTG_FS) - 8000db0: 687b ldr r3, [r7, #4] - 8000db2: 681b ldr r3, [r3, #0] - 8000db4: f1b3 4fa0 cmp.w r3, #1342177280 ; 0x50000000 - 8000db8: d13f bne.n 8000e3a - { - /* USER CODE BEGIN USB_OTG_FS_MspInit 0 */ - - /* USER CODE END USB_OTG_FS_MspInit 0 */ - - __HAL_RCC_GPIOA_CLK_ENABLE(); - 8000dba: 2300 movs r3, #0 - 8000dbc: 613b str r3, [r7, #16] - 8000dbe: 4b21 ldr r3, [pc, #132] ; (8000e44 ) - 8000dc0: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000dc2: 4a20 ldr r2, [pc, #128] ; (8000e44 ) - 8000dc4: f043 0301 orr.w r3, r3, #1 - 8000dc8: 6313 str r3, [r2, #48] ; 0x30 - 8000dca: 4b1e ldr r3, [pc, #120] ; (8000e44 ) - 8000dcc: 6b1b ldr r3, [r3, #48] ; 0x30 - 8000dce: f003 0301 and.w r3, r3, #1 - 8000dd2: 613b str r3, [r7, #16] - 8000dd4: 693b ldr r3, [r7, #16] - PA9 ------> USB_OTG_FS_VBUS - PA10 ------> USB_OTG_FS_ID - PA11 ------> USB_OTG_FS_DM - PA12 ------> USB_OTG_FS_DP - */ - GPIO_InitStruct.Pin = USB_SOF_Pin|USB_ID_Pin|USB_DM_Pin|USB_DP_Pin; - 8000dd6: f44f 53e8 mov.w r3, #7424 ; 0x1d00 - 8000dda: 617b str r3, [r7, #20] - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8000ddc: 2302 movs r3, #2 - 8000dde: 61bb str r3, [r7, #24] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000de0: 2300 movs r3, #0 - 8000de2: 61fb str r3, [r7, #28] - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - 8000de4: 2303 movs r3, #3 - 8000de6: 623b str r3, [r7, #32] - GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; - 8000de8: 230a movs r3, #10 - 8000dea: 627b str r3, [r7, #36] ; 0x24 - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - 8000dec: f107 0314 add.w r3, r7, #20 - 8000df0: 4619 mov r1, r3 - 8000df2: 4815 ldr r0, [pc, #84] ; (8000e48 ) - 8000df4: f001 fb66 bl 80024c4 - - GPIO_InitStruct.Pin = USB_VBUS_Pin; - 8000df8: f44f 7300 mov.w r3, #512 ; 0x200 - 8000dfc: 617b str r3, [r7, #20] - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - 8000dfe: 2300 movs r3, #0 - 8000e00: 61bb str r3, [r7, #24] - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8000e02: 2300 movs r3, #0 - 8000e04: 61fb str r3, [r7, #28] - HAL_GPIO_Init(USB_VBUS_GPIO_Port, &GPIO_InitStruct); - 8000e06: f107 0314 add.w r3, r7, #20 - 8000e0a: 4619 mov r1, r3 - 8000e0c: 480e ldr r0, [pc, #56] ; (8000e48 ) - 8000e0e: f001 fb59 bl 80024c4 - - /* Peripheral clock enable */ - __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); - 8000e12: 4b0c ldr r3, [pc, #48] ; (8000e44 ) - 8000e14: 6b5b ldr r3, [r3, #52] ; 0x34 - 8000e16: 4a0b ldr r2, [pc, #44] ; (8000e44 ) - 8000e18: f043 0380 orr.w r3, r3, #128 ; 0x80 - 8000e1c: 6353 str r3, [r2, #52] ; 0x34 - 8000e1e: 2300 movs r3, #0 - 8000e20: 60fb str r3, [r7, #12] - 8000e22: 4b08 ldr r3, [pc, #32] ; (8000e44 ) - 8000e24: 6c5b ldr r3, [r3, #68] ; 0x44 - 8000e26: 4a07 ldr r2, [pc, #28] ; (8000e44 ) - 8000e28: f443 4380 orr.w r3, r3, #16384 ; 0x4000 - 8000e2c: 6453 str r3, [r2, #68] ; 0x44 - 8000e2e: 4b05 ldr r3, [pc, #20] ; (8000e44 ) - 8000e30: 6c5b ldr r3, [r3, #68] ; 0x44 - 8000e32: f403 4380 and.w r3, r3, #16384 ; 0x4000 - 8000e36: 60fb str r3, [r7, #12] - 8000e38: 68fb ldr r3, [r7, #12] - /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */ - - /* USER CODE END USB_OTG_FS_MspInit 1 */ - } - -} - 8000e3a: bf00 nop - 8000e3c: 3728 adds r7, #40 ; 0x28 - 8000e3e: 46bd mov sp, r7 - 8000e40: bd80 pop {r7, pc} - 8000e42: bf00 nop - 8000e44: 40023800 .word 0x40023800 - 8000e48: 40020000 .word 0x40020000 - -08000e4c : -/******************************************************************************/ -/** - * @brief This function handles Non maskable interrupt. - */ -void NMI_Handler(void) -{ - 8000e4c: b480 push {r7} - 8000e4e: af00 add r7, sp, #0 - /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ - - /* USER CODE END NonMaskableInt_IRQn 0 */ - /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ - while (1) - 8000e50: e7fe b.n 8000e50 - -08000e52 : - -/** - * @brief This function handles Hard fault interrupt. - */ -void HardFault_Handler(void) -{ - 8000e52: b480 push {r7} - 8000e54: af00 add r7, sp, #0 - /* USER CODE BEGIN HardFault_IRQn 0 */ - - /* USER CODE END HardFault_IRQn 0 */ - while (1) - 8000e56: e7fe b.n 8000e56 - -08000e58 : - -/** - * @brief This function handles Memory management fault. - */ -void MemManage_Handler(void) -{ - 8000e58: b480 push {r7} - 8000e5a: af00 add r7, sp, #0 - /* USER CODE BEGIN MemoryManagement_IRQn 0 */ - - /* USER CODE END MemoryManagement_IRQn 0 */ - while (1) - 8000e5c: e7fe b.n 8000e5c - -08000e5e : - -/** - * @brief This function handles Pre-fetch fault, memory access fault. - */ -void BusFault_Handler(void) -{ - 8000e5e: b480 push {r7} - 8000e60: af00 add r7, sp, #0 - /* USER CODE BEGIN BusFault_IRQn 0 */ - - /* USER CODE END BusFault_IRQn 0 */ - while (1) - 8000e62: e7fe b.n 8000e62 - -08000e64 : - -/** - * @brief This function handles Undefined instruction or illegal state. - */ -void UsageFault_Handler(void) -{ - 8000e64: b480 push {r7} - 8000e66: af00 add r7, sp, #0 - /* USER CODE BEGIN UsageFault_IRQn 0 */ - - /* USER CODE END UsageFault_IRQn 0 */ - while (1) - 8000e68: e7fe b.n 8000e68 - -08000e6a : - -/** - * @brief This function handles System service call via SWI instruction. - */ -void SVC_Handler(void) -{ - 8000e6a: b480 push {r7} - 8000e6c: af00 add r7, sp, #0 - - /* USER CODE END SVCall_IRQn 0 */ - /* USER CODE BEGIN SVCall_IRQn 1 */ - - /* USER CODE END SVCall_IRQn 1 */ -} - 8000e6e: bf00 nop - 8000e70: 46bd mov sp, r7 - 8000e72: bc80 pop {r7} - 8000e74: 4770 bx lr - -08000e76 : - -/** - * @brief This function handles Debug monitor. - */ -void DebugMon_Handler(void) -{ - 8000e76: b480 push {r7} - 8000e78: af00 add r7, sp, #0 - - /* USER CODE END DebugMonitor_IRQn 0 */ - /* USER CODE BEGIN DebugMonitor_IRQn 1 */ - - /* USER CODE END DebugMonitor_IRQn 1 */ -} - 8000e7a: bf00 nop - 8000e7c: 46bd mov sp, r7 - 8000e7e: bc80 pop {r7} - 8000e80: 4770 bx lr - -08000e82 : - -/** - * @brief This function handles Pendable request for system service. - */ -void PendSV_Handler(void) -{ - 8000e82: b480 push {r7} - 8000e84: af00 add r7, sp, #0 - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - 8000e86: bf00 nop - 8000e88: 46bd mov sp, r7 - 8000e8a: bc80 pop {r7} - 8000e8c: 4770 bx lr - -08000e8e : - -/** - * @brief This function handles System tick timer. - */ -void SysTick_Handler(void) -{ - 8000e8e: b580 push {r7, lr} - 8000e90: af00 add r7, sp, #0 - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - 8000e92: f000 f955 bl 8001140 - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - 8000e96: bf00 nop - 8000e98: bd80 pop {r7, pc} - ... - -08000e9c : - -/** - * @brief This function handles TIM7 global interrupt. - */ -void TIM7_IRQHandler(void) -{ - 8000e9c: b580 push {r7, lr} - 8000e9e: af00 add r7, sp, #0 - /* USER CODE BEGIN TIM7_IRQn 0 */ - - /* USER CODE END TIM7_IRQn 0 */ - HAL_TIM_IRQHandler(&htim7); - 8000ea0: 4802 ldr r0, [pc, #8] ; (8000eac ) - 8000ea2: f002 fb24 bl 80034ee - /* USER CODE BEGIN TIM7_IRQn 1 */ - - /* USER CODE END TIM7_IRQn 1 */ -} - 8000ea6: bf00 nop - 8000ea8: bd80 pop {r7, pc} - 8000eaa: bf00 nop - 8000eac: 20000120 .word 0x20000120 - -08000eb0 <_getpid>: -void initialise_monitor_handles() -{ -} - -int _getpid(void) -{ - 8000eb0: b480 push {r7} - 8000eb2: af00 add r7, sp, #0 - return 1; - 8000eb4: 2301 movs r3, #1 -} - 8000eb6: 4618 mov r0, r3 - 8000eb8: 46bd mov sp, r7 - 8000eba: bc80 pop {r7} - 8000ebc: 4770 bx lr - ... - -08000ec0 <_kill>: - -int _kill(int pid, int sig) -{ - 8000ec0: b480 push {r7} - 8000ec2: b083 sub sp, #12 - 8000ec4: af00 add r7, sp, #0 - 8000ec6: 6078 str r0, [r7, #4] - 8000ec8: 6039 str r1, [r7, #0] - (void)pid; - (void)sig; - errno = EINVAL; - 8000eca: 4b05 ldr r3, [pc, #20] ; (8000ee0 <_kill+0x20>) - 8000ecc: 2216 movs r2, #22 - 8000ece: 601a str r2, [r3, #0] - return -1; - 8000ed0: f04f 33ff mov.w r3, #4294967295 -} - 8000ed4: 4618 mov r0, r3 - 8000ed6: 370c adds r7, #12 - 8000ed8: 46bd mov sp, r7 - 8000eda: bc80 pop {r7} - 8000edc: 4770 bx lr - 8000ede: bf00 nop - 8000ee0: 20007030 .word 0x20007030 - -08000ee4 <_exit>: - -void _exit (int status) -{ - 8000ee4: b580 push {r7, lr} - 8000ee6: b082 sub sp, #8 - 8000ee8: af00 add r7, sp, #0 - 8000eea: 6078 str r0, [r7, #4] - _kill(status, -1); - 8000eec: f04f 31ff mov.w r1, #4294967295 - 8000ef0: 6878 ldr r0, [r7, #4] - 8000ef2: f7ff ffe5 bl 8000ec0 <_kill> - while (1) {} /* Make sure we hang here */ - 8000ef6: e7fe b.n 8000ef6 <_exit+0x12> - -08000ef8 <_read>: -} - -__attribute__((weak)) int _read(int file, char *ptr, int len) -{ - 8000ef8: b580 push {r7, lr} - 8000efa: b086 sub sp, #24 - 8000efc: af00 add r7, sp, #0 - 8000efe: 60f8 str r0, [r7, #12] - 8000f00: 60b9 str r1, [r7, #8] - 8000f02: 607a str r2, [r7, #4] - (void)file; - int DataIdx; - - for (DataIdx = 0; DataIdx < len; DataIdx++) - 8000f04: 2300 movs r3, #0 - 8000f06: 617b str r3, [r7, #20] - 8000f08: e00a b.n 8000f20 <_read+0x28> - { - *ptr++ = __io_getchar(); - 8000f0a: f3af 8000 nop.w - 8000f0e: 4601 mov r1, r0 - 8000f10: 68bb ldr r3, [r7, #8] - 8000f12: 1c5a adds r2, r3, #1 - 8000f14: 60ba str r2, [r7, #8] - 8000f16: b2ca uxtb r2, r1 - 8000f18: 701a strb r2, [r3, #0] - for (DataIdx = 0; DataIdx < len; DataIdx++) - 8000f1a: 697b ldr r3, [r7, #20] - 8000f1c: 3301 adds r3, #1 - 8000f1e: 617b str r3, [r7, #20] - 8000f20: 697a ldr r2, [r7, #20] - 8000f22: 687b ldr r3, [r7, #4] - 8000f24: 429a cmp r2, r3 - 8000f26: dbf0 blt.n 8000f0a <_read+0x12> - } - - return len; - 8000f28: 687b ldr r3, [r7, #4] -} - 8000f2a: 4618 mov r0, r3 - 8000f2c: 3718 adds r7, #24 - 8000f2e: 46bd mov sp, r7 - 8000f30: bd80 pop {r7, pc} - -08000f32 <_write>: - -__attribute__((weak)) int _write(int file, char *ptr, int len) -{ - 8000f32: b580 push {r7, lr} - 8000f34: b086 sub sp, #24 - 8000f36: af00 add r7, sp, #0 - 8000f38: 60f8 str r0, [r7, #12] - 8000f3a: 60b9 str r1, [r7, #8] - 8000f3c: 607a str r2, [r7, #4] - (void)file; - int DataIdx; - - for (DataIdx = 0; DataIdx < len; DataIdx++) - 8000f3e: 2300 movs r3, #0 - 8000f40: 617b str r3, [r7, #20] - 8000f42: e009 b.n 8000f58 <_write+0x26> - { - __io_putchar(*ptr++); - 8000f44: 68bb ldr r3, [r7, #8] - 8000f46: 1c5a adds r2, r3, #1 - 8000f48: 60ba str r2, [r7, #8] - 8000f4a: 781b ldrb r3, [r3, #0] - 8000f4c: 4618 mov r0, r3 - 8000f4e: f3af 8000 nop.w - for (DataIdx = 0; DataIdx < len; DataIdx++) - 8000f52: 697b ldr r3, [r7, #20] - 8000f54: 3301 adds r3, #1 - 8000f56: 617b str r3, [r7, #20] - 8000f58: 697a ldr r2, [r7, #20] - 8000f5a: 687b ldr r3, [r7, #4] - 8000f5c: 429a cmp r2, r3 - 8000f5e: dbf1 blt.n 8000f44 <_write+0x12> - } - return len; - 8000f60: 687b ldr r3, [r7, #4] -} - 8000f62: 4618 mov r0, r3 - 8000f64: 3718 adds r7, #24 - 8000f66: 46bd mov sp, r7 - 8000f68: bd80 pop {r7, pc} - -08000f6a <_close>: - -int _close(int file) -{ - 8000f6a: b480 push {r7} - 8000f6c: b083 sub sp, #12 - 8000f6e: af00 add r7, sp, #0 - 8000f70: 6078 str r0, [r7, #4] - (void)file; - return -1; - 8000f72: f04f 33ff mov.w r3, #4294967295 -} - 8000f76: 4618 mov r0, r3 - 8000f78: 370c adds r7, #12 - 8000f7a: 46bd mov sp, r7 - 8000f7c: bc80 pop {r7} - 8000f7e: 4770 bx lr - -08000f80 <_fstat>: - - -int _fstat(int file, struct stat *st) -{ - 8000f80: b480 push {r7} - 8000f82: b083 sub sp, #12 - 8000f84: af00 add r7, sp, #0 - 8000f86: 6078 str r0, [r7, #4] - 8000f88: 6039 str r1, [r7, #0] - (void)file; - st->st_mode = S_IFCHR; - 8000f8a: 683b ldr r3, [r7, #0] - 8000f8c: f44f 5200 mov.w r2, #8192 ; 0x2000 - 8000f90: 605a str r2, [r3, #4] - return 0; - 8000f92: 2300 movs r3, #0 -} - 8000f94: 4618 mov r0, r3 - 8000f96: 370c adds r7, #12 - 8000f98: 46bd mov sp, r7 - 8000f9a: bc80 pop {r7} - 8000f9c: 4770 bx lr - -08000f9e <_isatty>: - -int _isatty(int file) -{ - 8000f9e: b480 push {r7} - 8000fa0: b083 sub sp, #12 - 8000fa2: af00 add r7, sp, #0 - 8000fa4: 6078 str r0, [r7, #4] - (void)file; - return 1; - 8000fa6: 2301 movs r3, #1 -} - 8000fa8: 4618 mov r0, r3 - 8000faa: 370c adds r7, #12 - 8000fac: 46bd mov sp, r7 - 8000fae: bc80 pop {r7} - 8000fb0: 4770 bx lr - -08000fb2 <_lseek>: - -int _lseek(int file, int ptr, int dir) -{ - 8000fb2: b480 push {r7} - 8000fb4: b085 sub sp, #20 - 8000fb6: af00 add r7, sp, #0 - 8000fb8: 60f8 str r0, [r7, #12] - 8000fba: 60b9 str r1, [r7, #8] - 8000fbc: 607a str r2, [r7, #4] - (void)file; - (void)ptr; - (void)dir; - return 0; - 8000fbe: 2300 movs r3, #0 -} - 8000fc0: 4618 mov r0, r3 - 8000fc2: 3714 adds r7, #20 - 8000fc4: 46bd mov sp, r7 - 8000fc6: bc80 pop {r7} - 8000fc8: 4770 bx lr - ... - -08000fcc <_sbrk>: - * - * @param incr Memory size - * @return Pointer to allocated memory - */ -void *_sbrk(ptrdiff_t incr) -{ - 8000fcc: b480 push {r7} - 8000fce: b087 sub sp, #28 - 8000fd0: af00 add r7, sp, #0 - 8000fd2: 6078 str r0, [r7, #4] - 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; - 8000fd4: 4a14 ldr r2, [pc, #80] ; (8001028 <_sbrk+0x5c>) - 8000fd6: 4b15 ldr r3, [pc, #84] ; (800102c <_sbrk+0x60>) - 8000fd8: 1ad3 subs r3, r2, r3 - 8000fda: 617b str r3, [r7, #20] - const uint8_t *max_heap = (uint8_t *)stack_limit; - 8000fdc: 697b ldr r3, [r7, #20] - 8000fde: 613b str r3, [r7, #16] - uint8_t *prev_heap_end; - - /* Initialize heap end at first call */ - if (NULL == __sbrk_heap_end) - 8000fe0: 4b13 ldr r3, [pc, #76] ; (8001030 <_sbrk+0x64>) - 8000fe2: 681b ldr r3, [r3, #0] - 8000fe4: 2b00 cmp r3, #0 - 8000fe6: d102 bne.n 8000fee <_sbrk+0x22> - { - __sbrk_heap_end = &_end; - 8000fe8: 4b11 ldr r3, [pc, #68] ; (8001030 <_sbrk+0x64>) - 8000fea: 4a12 ldr r2, [pc, #72] ; (8001034 <_sbrk+0x68>) - 8000fec: 601a str r2, [r3, #0] - } - - /* Protect heap from growing into the reserved MSP stack */ - if (__sbrk_heap_end + incr > max_heap) - 8000fee: 4b10 ldr r3, [pc, #64] ; (8001030 <_sbrk+0x64>) - 8000ff0: 681a ldr r2, [r3, #0] - 8000ff2: 687b ldr r3, [r7, #4] - 8000ff4: 4413 add r3, r2 - 8000ff6: 693a ldr r2, [r7, #16] - 8000ff8: 429a cmp r2, r3 - 8000ffa: d205 bcs.n 8001008 <_sbrk+0x3c> - { - errno = ENOMEM; - 8000ffc: 4b0e ldr r3, [pc, #56] ; (8001038 <_sbrk+0x6c>) - 8000ffe: 220c movs r2, #12 - 8001000: 601a str r2, [r3, #0] - return (void *)-1; - 8001002: f04f 33ff mov.w r3, #4294967295 - 8001006: e009 b.n 800101c <_sbrk+0x50> - } - - prev_heap_end = __sbrk_heap_end; - 8001008: 4b09 ldr r3, [pc, #36] ; (8001030 <_sbrk+0x64>) - 800100a: 681b ldr r3, [r3, #0] - 800100c: 60fb str r3, [r7, #12] - __sbrk_heap_end += incr; - 800100e: 4b08 ldr r3, [pc, #32] ; (8001030 <_sbrk+0x64>) - 8001010: 681a ldr r2, [r3, #0] - 8001012: 687b ldr r3, [r7, #4] - 8001014: 4413 add r3, r2 - 8001016: 4a06 ldr r2, [pc, #24] ; (8001030 <_sbrk+0x64>) - 8001018: 6013 str r3, [r2, #0] - - return (void *)prev_heap_end; - 800101a: 68fb ldr r3, [r7, #12] -} - 800101c: 4618 mov r0, r3 - 800101e: 371c adds r7, #28 - 8001020: 46bd mov sp, r7 - 8001022: bc80 pop {r7} - 8001024: 4770 bx lr - 8001026: bf00 nop - 8001028: 20020000 .word 0x20020000 - 800102c: 00000400 .word 0x00000400 - 8001030: 200006b4 .word 0x200006b4 - 8001034: 20007040 .word 0x20007040 - 8001038: 20007030 .word 0x20007030 - -0800103c : - * SystemFrequency variable. - * @param None - * @retval None - */ -void SystemInit(void) -{ - 800103c: b480 push {r7} - 800103e: af00 add r7, sp, #0 - - /* Configure the Vector Table location -------------------------------------*/ -#if defined(USER_VECT_TAB_ADDRESS) - SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#endif /* USER_VECT_TAB_ADDRESS */ -} - 8001040: bf00 nop - 8001042: 46bd mov sp, r7 - 8001044: bc80 pop {r7} - 8001046: 4770 bx lr - -08001048 : - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - ldr sp, =_estack /* set stack pointer */ - 8001048: f8df d034 ldr.w sp, [pc, #52] ; 8001080 - -/* Copy the data segment initializers from flash to SRAM */ - ldr r0, =_sdata - 800104c: 480d ldr r0, [pc, #52] ; (8001084 ) - ldr r1, =_edata - 800104e: 490e ldr r1, [pc, #56] ; (8001088 ) - ldr r2, =_sidata - 8001050: 4a0e ldr r2, [pc, #56] ; (800108c ) - movs r3, #0 - 8001052: 2300 movs r3, #0 - b LoopCopyDataInit - 8001054: e002 b.n 800105c - -08001056 : - -CopyDataInit: - ldr r4, [r2, r3] - 8001056: 58d4 ldr r4, [r2, r3] - str r4, [r0, r3] - 8001058: 50c4 str r4, [r0, r3] - adds r3, r3, #4 - 800105a: 3304 adds r3, #4 - -0800105c : - -LoopCopyDataInit: - adds r4, r0, r3 - 800105c: 18c4 adds r4, r0, r3 - cmp r4, r1 - 800105e: 428c cmp r4, r1 - bcc CopyDataInit - 8001060: d3f9 bcc.n 8001056 - -/* Zero fill the bss segment. */ - ldr r2, =_sbss - 8001062: 4a0b ldr r2, [pc, #44] ; (8001090 ) - ldr r4, =_ebss - 8001064: 4c0b ldr r4, [pc, #44] ; (8001094 ) - movs r3, #0 - 8001066: 2300 movs r3, #0 - b LoopFillZerobss - 8001068: e001 b.n 800106e - -0800106a : - -FillZerobss: - str r3, [r2] - 800106a: 6013 str r3, [r2, #0] - adds r2, r2, #4 - 800106c: 3204 adds r2, #4 - -0800106e : - -LoopFillZerobss: - cmp r2, r4 - 800106e: 42a2 cmp r2, r4 - bcc FillZerobss - 8001070: d3fb bcc.n 800106a - -/* Call the clock system initialization function.*/ - bl SystemInit - 8001072: f7ff ffe3 bl 800103c -/* Call static constructors */ - bl __libc_init_array - 8001076: f00e fe6d bl 800fd54 <__libc_init_array> -/* Call the application's entry point.*/ - bl main - 800107a: f7ff fa23 bl 80004c4
- bx lr - 800107e: 4770 bx lr - ldr sp, =_estack /* set stack pointer */ - 8001080: 20020000 .word 0x20020000 - ldr r0, =_sdata - 8001084: 20000000 .word 0x20000000 - ldr r1, =_edata - 8001088: 20000074 .word 0x20000074 - ldr r2, =_sidata - 800108c: 08012cbc .word 0x08012cbc - ldr r2, =_sbss - 8001090: 20000074 .word 0x20000074 - ldr r4, =_ebss - 8001094: 20007040 .word 0x20007040 - -08001098 : - * @retval None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - 8001098: e7fe b.n 8001098 - ... - -0800109c : - * 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) -{ - 800109c: b580 push {r7, lr} - 800109e: af00 add r7, sp, #0 - /* Configure Flash prefetch, Instruction cache, Data cache */ -#if (INSTRUCTION_CACHE_ENABLE != 0U) - __HAL_FLASH_INSTRUCTION_CACHE_ENABLE(); - 80010a0: 4b0e ldr r3, [pc, #56] ; (80010dc ) - 80010a2: 681b ldr r3, [r3, #0] - 80010a4: 4a0d ldr r2, [pc, #52] ; (80010dc ) - 80010a6: f443 7300 orr.w r3, r3, #512 ; 0x200 - 80010aa: 6013 str r3, [r2, #0] -#endif /* INSTRUCTION_CACHE_ENABLE */ - -#if (DATA_CACHE_ENABLE != 0U) - __HAL_FLASH_DATA_CACHE_ENABLE(); - 80010ac: 4b0b ldr r3, [pc, #44] ; (80010dc ) - 80010ae: 681b ldr r3, [r3, #0] - 80010b0: 4a0a ldr r2, [pc, #40] ; (80010dc ) - 80010b2: f443 6380 orr.w r3, r3, #1024 ; 0x400 - 80010b6: 6013 str r3, [r2, #0] -#endif /* DATA_CACHE_ENABLE */ - -#if (PREFETCH_ENABLE != 0U) - __HAL_FLASH_PREFETCH_BUFFER_ENABLE(); - 80010b8: 4b08 ldr r3, [pc, #32] ; (80010dc ) - 80010ba: 681b ldr r3, [r3, #0] - 80010bc: 4a07 ldr r2, [pc, #28] ; (80010dc ) - 80010be: f443 7380 orr.w r3, r3, #256 ; 0x100 - 80010c2: 6013 str r3, [r2, #0] -#endif /* PREFETCH_ENABLE */ - - /* Set Interrupt Group Priority */ - HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); - 80010c4: 2003 movs r0, #3 - 80010c6: f000 f947 bl 8001358 - - /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ - HAL_InitTick(TICK_INT_PRIORITY); - 80010ca: 2000 movs r0, #0 - 80010cc: f000 f808 bl 80010e0 - - /* Init the low level hardware */ - HAL_MspInit(); - 80010d0: f7ff fcfc bl 8000acc - - /* Return function status */ - return HAL_OK; - 80010d4: 2300 movs r3, #0 -} - 80010d6: 4618 mov r0, r3 - 80010d8: bd80 pop {r7, pc} - 80010da: bf00 nop - 80010dc: 40023c00 .word 0x40023c00 - -080010e0 : - * implementation in user file. - * @param TickPriority Tick interrupt priority. - * @retval HAL status - */ -__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) -{ - 80010e0: b580 push {r7, lr} - 80010e2: b082 sub sp, #8 - 80010e4: af00 add r7, sp, #0 - 80010e6: 6078 str r0, [r7, #4] - /* Configure the SysTick to have interrupt in 1ms time basis*/ - if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U) - 80010e8: 4b12 ldr r3, [pc, #72] ; (8001134 ) - 80010ea: 681a ldr r2, [r3, #0] - 80010ec: 4b12 ldr r3, [pc, #72] ; (8001138 ) - 80010ee: 781b ldrb r3, [r3, #0] - 80010f0: 4619 mov r1, r3 - 80010f2: f44f 737a mov.w r3, #1000 ; 0x3e8 - 80010f6: fbb3 f3f1 udiv r3, r3, r1 - 80010fa: fbb2 f3f3 udiv r3, r2, r3 - 80010fe: 4618 mov r0, r3 - 8001100: f000 f95f bl 80013c2 - 8001104: 4603 mov r3, r0 - 8001106: 2b00 cmp r3, #0 - 8001108: d001 beq.n 800110e - { - return HAL_ERROR; - 800110a: 2301 movs r3, #1 - 800110c: e00e b.n 800112c - } - - /* Configure the SysTick IRQ priority */ - if (TickPriority < (1UL << __NVIC_PRIO_BITS)) - 800110e: 687b ldr r3, [r7, #4] - 8001110: 2b0f cmp r3, #15 - 8001112: d80a bhi.n 800112a - { - HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); - 8001114: 2200 movs r2, #0 - 8001116: 6879 ldr r1, [r7, #4] - 8001118: f04f 30ff mov.w r0, #4294967295 - 800111c: f000 f927 bl 800136e - uwTickPrio = TickPriority; - 8001120: 4a06 ldr r2, [pc, #24] ; (800113c ) - 8001122: 687b ldr r3, [r7, #4] - 8001124: 6013 str r3, [r2, #0] - { - return HAL_ERROR; - } - - /* Return function status */ - return HAL_OK; - 8001126: 2300 movs r3, #0 - 8001128: e000 b.n 800112c - return HAL_ERROR; - 800112a: 2301 movs r3, #1 -} - 800112c: 4618 mov r0, r3 - 800112e: 3708 adds r7, #8 - 8001130: 46bd mov sp, r7 - 8001132: bd80 pop {r7, pc} - 8001134: 20000000 .word 0x20000000 - 8001138: 20000008 .word 0x20000008 - 800113c: 20000004 .word 0x20000004 - -08001140 : - * @note This function is declared as __weak to be overwritten in case of other - * implementations in user file. - * @retval None - */ -__weak void HAL_IncTick(void) -{ - 8001140: b480 push {r7} - 8001142: af00 add r7, sp, #0 - uwTick += uwTickFreq; - 8001144: 4b05 ldr r3, [pc, #20] ; (800115c ) - 8001146: 781b ldrb r3, [r3, #0] - 8001148: 461a mov r2, r3 - 800114a: 4b05 ldr r3, [pc, #20] ; (8001160 ) - 800114c: 681b ldr r3, [r3, #0] - 800114e: 4413 add r3, r2 - 8001150: 4a03 ldr r2, [pc, #12] ; (8001160 ) - 8001152: 6013 str r3, [r2, #0] -} - 8001154: bf00 nop - 8001156: 46bd mov sp, r7 - 8001158: bc80 pop {r7} - 800115a: 4770 bx lr - 800115c: 20000008 .word 0x20000008 - 8001160: 200006b8 .word 0x200006b8 - -08001164 : - * @note This function is declared as __weak to be overwritten in case of other - * implementations in user file. - * @retval tick value - */ -__weak uint32_t HAL_GetTick(void) -{ - 8001164: b480 push {r7} - 8001166: af00 add r7, sp, #0 - return uwTick; - 8001168: 4b02 ldr r3, [pc, #8] ; (8001174 ) - 800116a: 681b ldr r3, [r3, #0] -} - 800116c: 4618 mov r0, r3 - 800116e: 46bd mov sp, r7 - 8001170: bc80 pop {r7} - 8001172: 4770 bx lr - 8001174: 200006b8 .word 0x200006b8 - -08001178 : - * implementations in user file. - * @param Delay specifies the delay time length, in milliseconds. - * @retval None - */ -__weak void HAL_Delay(__IO uint32_t Delay) -{ - 8001178: b580 push {r7, lr} - 800117a: b084 sub sp, #16 - 800117c: af00 add r7, sp, #0 - 800117e: 6078 str r0, [r7, #4] - uint32_t tickstart = HAL_GetTick(); - 8001180: f7ff fff0 bl 8001164 - 8001184: 60b8 str r0, [r7, #8] - uint32_t wait = Delay; - 8001186: 687b ldr r3, [r7, #4] - 8001188: 60fb str r3, [r7, #12] - - /* Add a freq to guarantee minimum wait */ - if (wait < HAL_MAX_DELAY) - 800118a: 68fb ldr r3, [r7, #12] - 800118c: f1b3 3fff cmp.w r3, #4294967295 - 8001190: d005 beq.n 800119e - { - wait += (uint32_t)(uwTickFreq); - 8001192: 4b0a ldr r3, [pc, #40] ; (80011bc ) - 8001194: 781b ldrb r3, [r3, #0] - 8001196: 461a mov r2, r3 - 8001198: 68fb ldr r3, [r7, #12] - 800119a: 4413 add r3, r2 - 800119c: 60fb str r3, [r7, #12] - } - - while ((HAL_GetTick() - tickstart) < wait) - 800119e: bf00 nop - 80011a0: f7ff ffe0 bl 8001164 - 80011a4: 4602 mov r2, r0 - 80011a6: 68bb ldr r3, [r7, #8] - 80011a8: 1ad3 subs r3, r2, r3 - 80011aa: 68fa ldr r2, [r7, #12] - 80011ac: 429a cmp r2, r3 - 80011ae: d8f7 bhi.n 80011a0 - { - } -} - 80011b0: bf00 nop - 80011b2: bf00 nop - 80011b4: 3710 adds r7, #16 - 80011b6: 46bd mov sp, r7 - 80011b8: bd80 pop {r7, pc} - 80011ba: bf00 nop - 80011bc: 20000008 .word 0x20000008 - -080011c0 <__NVIC_SetPriorityGrouping>: - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - 80011c0: b480 push {r7} - 80011c2: b085 sub sp, #20 - 80011c4: af00 add r7, sp, #0 - 80011c6: 6078 str r0, [r7, #4] - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - 80011c8: 687b ldr r3, [r7, #4] - 80011ca: f003 0307 and.w r3, r3, #7 - 80011ce: 60fb str r3, [r7, #12] - - reg_value = SCB->AIRCR; /* read old register configuration */ - 80011d0: 4b0c ldr r3, [pc, #48] ; (8001204 <__NVIC_SetPriorityGrouping+0x44>) - 80011d2: 68db ldr r3, [r3, #12] - 80011d4: 60bb str r3, [r7, #8] - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - 80011d6: 68ba ldr r2, [r7, #8] - 80011d8: f64f 03ff movw r3, #63743 ; 0xf8ff - 80011dc: 4013 ands r3, r2 - 80011de: 60bb str r3, [r7, #8] - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ - 80011e0: 68fb ldr r3, [r7, #12] - 80011e2: 021a lsls r2, r3, #8 - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - 80011e4: 68bb ldr r3, [r7, #8] - 80011e6: 4313 orrs r3, r2 - reg_value = (reg_value | - 80011e8: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 - 80011ec: f443 3300 orr.w r3, r3, #131072 ; 0x20000 - 80011f0: 60bb str r3, [r7, #8] - SCB->AIRCR = reg_value; - 80011f2: 4a04 ldr r2, [pc, #16] ; (8001204 <__NVIC_SetPriorityGrouping+0x44>) - 80011f4: 68bb ldr r3, [r7, #8] - 80011f6: 60d3 str r3, [r2, #12] -} - 80011f8: bf00 nop - 80011fa: 3714 adds r7, #20 - 80011fc: 46bd mov sp, r7 - 80011fe: bc80 pop {r7} - 8001200: 4770 bx lr - 8001202: bf00 nop - 8001204: e000ed00 .word 0xe000ed00 - -08001208 <__NVIC_GetPriorityGrouping>: - \brief Get Priority Grouping - \details Reads the priority grouping field from the NVIC Interrupt Controller. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) -{ - 8001208: b480 push {r7} - 800120a: af00 add r7, sp, #0 - return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); - 800120c: 4b04 ldr r3, [pc, #16] ; (8001220 <__NVIC_GetPriorityGrouping+0x18>) - 800120e: 68db ldr r3, [r3, #12] - 8001210: 0a1b lsrs r3, r3, #8 - 8001212: f003 0307 and.w r3, r3, #7 -} - 8001216: 4618 mov r0, r3 - 8001218: 46bd mov sp, r7 - 800121a: bc80 pop {r7} - 800121c: 4770 bx lr - 800121e: bf00 nop - 8001220: e000ed00 .word 0xe000ed00 - -08001224 <__NVIC_EnableIRQ>: - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - 8001224: b480 push {r7} - 8001226: b083 sub sp, #12 - 8001228: af00 add r7, sp, #0 - 800122a: 4603 mov r3, r0 - 800122c: 71fb strb r3, [r7, #7] - if ((int32_t)(IRQn) >= 0) - 800122e: f997 3007 ldrsb.w r3, [r7, #7] - 8001232: 2b00 cmp r3, #0 - 8001234: db0b blt.n 800124e <__NVIC_EnableIRQ+0x2a> - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - 8001236: 79fb ldrb r3, [r7, #7] - 8001238: f003 021f and.w r2, r3, #31 - 800123c: 4906 ldr r1, [pc, #24] ; (8001258 <__NVIC_EnableIRQ+0x34>) - 800123e: f997 3007 ldrsb.w r3, [r7, #7] - 8001242: 095b lsrs r3, r3, #5 - 8001244: 2001 movs r0, #1 - 8001246: fa00 f202 lsl.w r2, r0, r2 - 800124a: f841 2023 str.w r2, [r1, r3, lsl #2] - } -} - 800124e: bf00 nop - 8001250: 370c adds r7, #12 - 8001252: 46bd mov sp, r7 - 8001254: bc80 pop {r7} - 8001256: 4770 bx lr - 8001258: e000e100 .word 0xe000e100 - -0800125c <__NVIC_SetPriority>: - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - 800125c: b480 push {r7} - 800125e: b083 sub sp, #12 - 8001260: af00 add r7, sp, #0 - 8001262: 4603 mov r3, r0 - 8001264: 6039 str r1, [r7, #0] - 8001266: 71fb strb r3, [r7, #7] - if ((int32_t)(IRQn) >= 0) - 8001268: f997 3007 ldrsb.w r3, [r7, #7] - 800126c: 2b00 cmp r3, #0 - 800126e: db0a blt.n 8001286 <__NVIC_SetPriority+0x2a> - { - NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - 8001270: 683b ldr r3, [r7, #0] - 8001272: b2da uxtb r2, r3 - 8001274: 490c ldr r1, [pc, #48] ; (80012a8 <__NVIC_SetPriority+0x4c>) - 8001276: f997 3007 ldrsb.w r3, [r7, #7] - 800127a: 0112 lsls r2, r2, #4 - 800127c: b2d2 uxtb r2, r2 - 800127e: 440b add r3, r1 - 8001280: f883 2300 strb.w r2, [r3, #768] ; 0x300 - } - else - { - SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - 8001284: e00a b.n 800129c <__NVIC_SetPriority+0x40> - SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - 8001286: 683b ldr r3, [r7, #0] - 8001288: b2da uxtb r2, r3 - 800128a: 4908 ldr r1, [pc, #32] ; (80012ac <__NVIC_SetPriority+0x50>) - 800128c: 79fb ldrb r3, [r7, #7] - 800128e: f003 030f and.w r3, r3, #15 - 8001292: 3b04 subs r3, #4 - 8001294: 0112 lsls r2, r2, #4 - 8001296: b2d2 uxtb r2, r2 - 8001298: 440b add r3, r1 - 800129a: 761a strb r2, [r3, #24] -} - 800129c: bf00 nop - 800129e: 370c adds r7, #12 - 80012a0: 46bd mov sp, r7 - 80012a2: bc80 pop {r7} - 80012a4: 4770 bx lr - 80012a6: bf00 nop - 80012a8: e000e100 .word 0xe000e100 - 80012ac: e000ed00 .word 0xe000ed00 - -080012b0 : - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - 80012b0: b480 push {r7} - 80012b2: b089 sub sp, #36 ; 0x24 - 80012b4: af00 add r7, sp, #0 - 80012b6: 60f8 str r0, [r7, #12] - 80012b8: 60b9 str r1, [r7, #8] - 80012ba: 607a str r2, [r7, #4] - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - 80012bc: 68fb ldr r3, [r7, #12] - 80012be: f003 0307 and.w r3, r3, #7 - 80012c2: 61fb str r3, [r7, #28] - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - 80012c4: 69fb ldr r3, [r7, #28] - 80012c6: f1c3 0307 rsb r3, r3, #7 - 80012ca: 2b04 cmp r3, #4 - 80012cc: bf28 it cs - 80012ce: 2304 movcs r3, #4 - 80012d0: 61bb str r3, [r7, #24] - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - 80012d2: 69fb ldr r3, [r7, #28] - 80012d4: 3304 adds r3, #4 - 80012d6: 2b06 cmp r3, #6 - 80012d8: d902 bls.n 80012e0 - 80012da: 69fb ldr r3, [r7, #28] - 80012dc: 3b03 subs r3, #3 - 80012de: e000 b.n 80012e2 - 80012e0: 2300 movs r3, #0 - 80012e2: 617b str r3, [r7, #20] - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - 80012e4: f04f 32ff mov.w r2, #4294967295 - 80012e8: 69bb ldr r3, [r7, #24] - 80012ea: fa02 f303 lsl.w r3, r2, r3 - 80012ee: 43da mvns r2, r3 - 80012f0: 68bb ldr r3, [r7, #8] - 80012f2: 401a ands r2, r3 - 80012f4: 697b ldr r3, [r7, #20] - 80012f6: 409a lsls r2, r3 - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - 80012f8: f04f 31ff mov.w r1, #4294967295 - 80012fc: 697b ldr r3, [r7, #20] - 80012fe: fa01 f303 lsl.w r3, r1, r3 - 8001302: 43d9 mvns r1, r3 - 8001304: 687b ldr r3, [r7, #4] - 8001306: 400b ands r3, r1 - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - 8001308: 4313 orrs r3, r2 - ); -} - 800130a: 4618 mov r0, r3 - 800130c: 3724 adds r7, #36 ; 0x24 - 800130e: 46bd mov sp, r7 - 8001310: bc80 pop {r7} - 8001312: 4770 bx lr - -08001314 : - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - 8001314: b580 push {r7, lr} - 8001316: b082 sub sp, #8 - 8001318: af00 add r7, sp, #0 - 800131a: 6078 str r0, [r7, #4] - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - 800131c: 687b ldr r3, [r7, #4] - 800131e: 3b01 subs r3, #1 - 8001320: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 - 8001324: d301 bcc.n 800132a - { - return (1UL); /* Reload value impossible */ - 8001326: 2301 movs r3, #1 - 8001328: e00f b.n 800134a - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - 800132a: 4a0a ldr r2, [pc, #40] ; (8001354 ) - 800132c: 687b ldr r3, [r7, #4] - 800132e: 3b01 subs r3, #1 - 8001330: 6053 str r3, [r2, #4] - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - 8001332: 210f movs r1, #15 - 8001334: f04f 30ff mov.w r0, #4294967295 - 8001338: f7ff ff90 bl 800125c <__NVIC_SetPriority> - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - 800133c: 4b05 ldr r3, [pc, #20] ; (8001354 ) - 800133e: 2200 movs r2, #0 - 8001340: 609a str r2, [r3, #8] - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - 8001342: 4b04 ldr r3, [pc, #16] ; (8001354 ) - 8001344: 2207 movs r2, #7 - 8001346: 601a str r2, [r3, #0] - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ - 8001348: 2300 movs r3, #0 -} - 800134a: 4618 mov r0, r3 - 800134c: 3708 adds r7, #8 - 800134e: 46bd mov sp, r7 - 8001350: bd80 pop {r7, pc} - 8001352: bf00 nop - 8001354: e000e010 .word 0xe000e010 - -08001358 : - * @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible. - * The pending IRQ priority will be managed only by the subpriority. - * @retval None - */ -void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - 8001358: b580 push {r7, lr} - 800135a: b082 sub sp, #8 - 800135c: af00 add r7, sp, #0 - 800135e: 6078 str r0, [r7, #4] - /* 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); - 8001360: 6878 ldr r0, [r7, #4] - 8001362: f7ff ff2d bl 80011c0 <__NVIC_SetPriorityGrouping> -} - 8001366: bf00 nop - 8001368: 3708 adds r7, #8 - 800136a: 46bd mov sp, r7 - 800136c: bd80 pop {r7, pc} - -0800136e : - * 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) -{ - 800136e: b580 push {r7, lr} - 8001370: b086 sub sp, #24 - 8001372: af00 add r7, sp, #0 - 8001374: 4603 mov r3, r0 - 8001376: 60b9 str r1, [r7, #8] - 8001378: 607a str r2, [r7, #4] - 800137a: 73fb strb r3, [r7, #15] - uint32_t prioritygroup = 0x00U; - 800137c: 2300 movs r3, #0 - 800137e: 617b str r3, [r7, #20] - - /* Check the parameters */ - assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); - assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); - - prioritygroup = NVIC_GetPriorityGrouping(); - 8001380: f7ff ff42 bl 8001208 <__NVIC_GetPriorityGrouping> - 8001384: 6178 str r0, [r7, #20] - - NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); - 8001386: 687a ldr r2, [r7, #4] - 8001388: 68b9 ldr r1, [r7, #8] - 800138a: 6978 ldr r0, [r7, #20] - 800138c: f7ff ff90 bl 80012b0 - 8001390: 4602 mov r2, r0 - 8001392: f997 300f ldrsb.w r3, [r7, #15] - 8001396: 4611 mov r1, r2 - 8001398: 4618 mov r0, r3 - 800139a: f7ff ff5f bl 800125c <__NVIC_SetPriority> -} - 800139e: bf00 nop - 80013a0: 3718 adds r7, #24 - 80013a2: 46bd mov sp, r7 - 80013a4: bd80 pop {r7, pc} - -080013a6 : - * 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 (stm32f2xxxx.h)) - * @retval None - */ -void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) -{ - 80013a6: b580 push {r7, lr} - 80013a8: b082 sub sp, #8 - 80013aa: af00 add r7, sp, #0 - 80013ac: 4603 mov r3, r0 - 80013ae: 71fb strb r3, [r7, #7] - /* Check the parameters */ - assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); - - /* Enable interrupt */ - NVIC_EnableIRQ(IRQn); - 80013b0: f997 3007 ldrsb.w r3, [r7, #7] - 80013b4: 4618 mov r0, r3 - 80013b6: f7ff ff35 bl 8001224 <__NVIC_EnableIRQ> -} - 80013ba: bf00 nop - 80013bc: 3708 adds r7, #8 - 80013be: 46bd mov sp, r7 - 80013c0: bd80 pop {r7, pc} - -080013c2 : - * @param TicksNumb Specifies the ticks Number of ticks between two interrupts. - * @retval status: - 0 Function succeeded. - * - 1 Function failed. - */ -uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb) -{ - 80013c2: b580 push {r7, lr} - 80013c4: b082 sub sp, #8 - 80013c6: af00 add r7, sp, #0 - 80013c8: 6078 str r0, [r7, #4] - return SysTick_Config(TicksNumb); - 80013ca: 6878 ldr r0, [r7, #4] - 80013cc: f7ff ffa2 bl 8001314 - 80013d0: 4603 mov r3, r0 -} - 80013d2: 4618 mov r0, r3 - 80013d4: 3708 adds r7, #8 - 80013d6: 46bd mov sp, r7 - 80013d8: bd80 pop {r7, pc} - ... - -080013dc : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) -{ - 80013dc: b580 push {r7, lr} - 80013de: b088 sub sp, #32 - 80013e0: af00 add r7, sp, #0 - 80013e2: 6078 str r0, [r7, #4] - uint32_t tmpreg1 = 0U, phyreg = 0U; - 80013e4: 2300 movs r3, #0 - 80013e6: 61fb str r3, [r7, #28] - 80013e8: 2300 movs r3, #0 - 80013ea: 60fb str r3, [r7, #12] - uint32_t hclk = 60000000U; - 80013ec: 4ba3 ldr r3, [pc, #652] ; (800167c ) - 80013ee: 61bb str r3, [r7, #24] - uint32_t tickstart = 0U; - 80013f0: 2300 movs r3, #0 - 80013f2: 617b str r3, [r7, #20] - uint32_t err = ETH_SUCCESS; - 80013f4: 2300 movs r3, #0 - 80013f6: 613b str r3, [r7, #16] - - /* Check the ETH peripheral state */ - if (heth == NULL) - 80013f8: 687b ldr r3, [r7, #4] - 80013fa: 2b00 cmp r3, #0 - 80013fc: d101 bne.n 8001402 - { - return HAL_ERROR; - 80013fe: 2301 movs r3, #1 - 8001400: e173 b.n 80016ea - assert_param(IS_ETH_AUTONEGOTIATION(heth->Init.AutoNegotiation)); - assert_param(IS_ETH_RX_MODE(heth->Init.RxMode)); - assert_param(IS_ETH_CHECKSUM_MODE(heth->Init.ChecksumMode)); - assert_param(IS_ETH_MEDIA_INTERFACE(heth->Init.MediaInterface)); - - if (heth->State == HAL_ETH_STATE_RESET) - 8001402: 687b ldr r3, [r7, #4] - 8001404: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 - 8001408: b2db uxtb r3, r3 - 800140a: 2b00 cmp r3, #0 - 800140c: d106 bne.n 800141c - { - /* Allocate lock resource and initialize it */ - heth->Lock = HAL_UNLOCKED; - 800140e: 687b ldr r3, [r7, #4] - 8001410: 2200 movs r2, #0 - 8001412: f883 2045 strb.w r2, [r3, #69] ; 0x45 - } - heth->MspInitCallback(heth); - -#else - /* Init the low level hardware : GPIO, CLOCK, NVIC. */ - HAL_ETH_MspInit(heth); - 8001416: 6878 ldr r0, [r7, #4] - 8001418: f003 fb50 bl 8004abc -#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ - } - - /* Enable SYSCFG Clock */ - __HAL_RCC_SYSCFG_CLK_ENABLE(); - 800141c: 2300 movs r3, #0 - 800141e: 60bb str r3, [r7, #8] - 8001420: 4b97 ldr r3, [pc, #604] ; (8001680 ) - 8001422: 6c5b ldr r3, [r3, #68] ; 0x44 - 8001424: 4a96 ldr r2, [pc, #600] ; (8001680 ) - 8001426: f443 4380 orr.w r3, r3, #16384 ; 0x4000 - 800142a: 6453 str r3, [r2, #68] ; 0x44 - 800142c: 4b94 ldr r3, [pc, #592] ; (8001680 ) - 800142e: 6c5b ldr r3, [r3, #68] ; 0x44 - 8001430: f403 4380 and.w r3, r3, #16384 ; 0x4000 - 8001434: 60bb str r3, [r7, #8] - 8001436: 68bb ldr r3, [r7, #8] - - /* Select MII or RMII Mode*/ - SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL); - 8001438: 4b92 ldr r3, [pc, #584] ; (8001684 ) - 800143a: 685b ldr r3, [r3, #4] - 800143c: 4a91 ldr r2, [pc, #580] ; (8001684 ) - 800143e: f423 0300 bic.w r3, r3, #8388608 ; 0x800000 - 8001442: 6053 str r3, [r2, #4] - SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface; - 8001444: 4b8f ldr r3, [pc, #572] ; (8001684 ) - 8001446: 685a ldr r2, [r3, #4] - 8001448: 687b ldr r3, [r7, #4] - 800144a: 6a1b ldr r3, [r3, #32] - 800144c: 498d ldr r1, [pc, #564] ; (8001684 ) - 800144e: 4313 orrs r3, r2 - 8001450: 604b str r3, [r1, #4] - - /* Ethernet Software reset */ - /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ - /* After reset all the registers holds their respective reset values */ - (heth->Instance)->DMABMR |= ETH_DMABMR_SR; - 8001452: 687b ldr r3, [r7, #4] - 8001454: 681b ldr r3, [r3, #0] - 8001456: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 800145a: 681b ldr r3, [r3, #0] - 800145c: 687a ldr r2, [r7, #4] - 800145e: 6812 ldr r2, [r2, #0] - 8001460: f043 0301 orr.w r3, r3, #1 - 8001464: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 8001468: 6013 str r3, [r2, #0] - - /* Get tick */ - tickstart = HAL_GetTick(); - 800146a: f7ff fe7b bl 8001164 - 800146e: 6178 str r0, [r7, #20] - - /* Wait for software reset */ - while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) - 8001470: e011 b.n 8001496 - { - /* Check for the Timeout */ - if ((HAL_GetTick() - tickstart) > ETH_TIMEOUT_SWRESET) - 8001472: f7ff fe77 bl 8001164 - 8001476: 4602 mov r2, r0 - 8001478: 697b ldr r3, [r7, #20] - 800147a: 1ad3 subs r3, r2, r3 - 800147c: f5b3 7ffa cmp.w r3, #500 ; 0x1f4 - 8001480: d909 bls.n 8001496 - { - heth->State = HAL_ETH_STATE_TIMEOUT; - 8001482: 687b ldr r3, [r7, #4] - 8001484: 2203 movs r2, #3 - 8001486: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 800148a: 687b ldr r3, [r7, #4] - 800148c: 2200 movs r2, #0 - 800148e: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Note: The SWR is not performed if the ETH_RX_CLK or the ETH_TX_CLK are - not available, please check your external PHY or the IO configuration */ - return HAL_TIMEOUT; - 8001492: 2303 movs r3, #3 - 8001494: e129 b.n 80016ea - while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) - 8001496: 687b ldr r3, [r7, #4] - 8001498: 681b ldr r3, [r3, #0] - 800149a: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 800149e: 681b ldr r3, [r3, #0] - 80014a0: f003 0301 and.w r3, r3, #1 - 80014a4: 2b00 cmp r3, #0 - 80014a6: d1e4 bne.n 8001472 - } - } - - /*-------------------------------- MAC Initialization ----------------------*/ - /* Get the ETHERNET MACMIIAR value */ - tmpreg1 = (heth->Instance)->MACMIIAR; - 80014a8: 687b ldr r3, [r7, #4] - 80014aa: 681b ldr r3, [r3, #0] - 80014ac: 691b ldr r3, [r3, #16] - 80014ae: 61fb str r3, [r7, #28] - /* Clear CSR Clock Range CR[2:0] bits */ - tmpreg1 &= ETH_MACMIIAR_CR_MASK; - 80014b0: 69fb ldr r3, [r7, #28] - 80014b2: f023 031c bic.w r3, r3, #28 - 80014b6: 61fb str r3, [r7, #28] - - /* Get hclk frequency value */ - hclk = HAL_RCC_GetHCLKFreq(); - 80014b8: f001 ff24 bl 8003304 - 80014bc: 61b8 str r0, [r7, #24] - - /* Set CR bits depending on hclk value */ - if ((hclk >= 20000000U) && (hclk < 35000000U)) - 80014be: 69bb ldr r3, [r7, #24] - 80014c0: 4a71 ldr r2, [pc, #452] ; (8001688 ) - 80014c2: 4293 cmp r3, r2 - 80014c4: d908 bls.n 80014d8 - 80014c6: 69bb ldr r3, [r7, #24] - 80014c8: 4a70 ldr r2, [pc, #448] ; (800168c ) - 80014ca: 4293 cmp r3, r2 - 80014cc: d804 bhi.n 80014d8 - { - /* CSR Clock Range between 20-35 MHz */ - tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div16; - 80014ce: 69fb ldr r3, [r7, #28] - 80014d0: f043 0308 orr.w r3, r3, #8 - 80014d4: 61fb str r3, [r7, #28] - 80014d6: e01a b.n 800150e - } - else if ((hclk >= 35000000U) && (hclk < 60000000U)) - 80014d8: 69bb ldr r3, [r7, #24] - 80014da: 4a6c ldr r2, [pc, #432] ; (800168c ) - 80014dc: 4293 cmp r3, r2 - 80014de: d908 bls.n 80014f2 - 80014e0: 69bb ldr r3, [r7, #24] - 80014e2: 4a66 ldr r2, [pc, #408] ; (800167c ) - 80014e4: 4293 cmp r3, r2 - 80014e6: d204 bcs.n 80014f2 - { - /* CSR Clock Range between 35-60 MHz */ - tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div26; - 80014e8: 69fb ldr r3, [r7, #28] - 80014ea: f043 030c orr.w r3, r3, #12 - 80014ee: 61fb str r3, [r7, #28] - 80014f0: e00d b.n 800150e - } - else if ((hclk >= 60000000U) && (hclk < 100000000U)) - 80014f2: 69bb ldr r3, [r7, #24] - 80014f4: 4a61 ldr r2, [pc, #388] ; (800167c ) - 80014f6: 4293 cmp r3, r2 - 80014f8: d303 bcc.n 8001502 - 80014fa: 69bb ldr r3, [r7, #24] - 80014fc: 4a64 ldr r2, [pc, #400] ; (8001690 ) - 80014fe: 4293 cmp r3, r2 - 8001500: d904 bls.n 800150c - tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div42; - } - else /* ((hclk >= 100000000)&&(hclk < 120000000)) */ - { - /* CSR Clock Range between 100-120 MHz */ - tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div62; - 8001502: 69fb ldr r3, [r7, #28] - 8001504: f043 0304 orr.w r3, r3, #4 - 8001508: 61fb str r3, [r7, #28] - 800150a: e000 b.n 800150e - tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div42; - 800150c: bf00 nop - } - - /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ - (heth->Instance)->MACMIIAR = (uint32_t)tmpreg1; - 800150e: 687b ldr r3, [r7, #4] - 8001510: 681b ldr r3, [r3, #0] - 8001512: 69fa ldr r2, [r7, #28] - 8001514: 611a str r2, [r3, #16] - - /*-------------------- PHY initialization and configuration ----------------*/ - /* Put the PHY in reset mode */ - if ((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_RESET)) != HAL_OK) - 8001516: f44f 4200 mov.w r2, #32768 ; 0x8000 - 800151a: 2100 movs r1, #0 - 800151c: 6878 ldr r0, [r7, #4] - 800151e: f000 fb0b bl 8001b38 - 8001522: 4603 mov r3, r0 - 8001524: 2b00 cmp r3, #0 - 8001526: d00b beq.n 8001540 - { - /* In case of write timeout */ - err = ETH_ERROR; - 8001528: 2301 movs r3, #1 - 800152a: 613b str r3, [r7, #16] - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - 800152c: 6939 ldr r1, [r7, #16] - 800152e: 6878 ldr r0, [r7, #4] - 8001530: f000 fcc0 bl 8001eb4 - - /* Set the ETH peripheral state to READY */ - heth->State = HAL_ETH_STATE_READY; - 8001534: 687b ldr r3, [r7, #4] - 8001536: 2201 movs r2, #1 - 8001538: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Return HAL_ERROR */ - return HAL_ERROR; - 800153c: 2301 movs r3, #1 - 800153e: e0d4 b.n 80016ea - } - - /* Delay to assure PHY reset */ - HAL_Delay(PHY_RESET_DELAY); - 8001540: 20ff movs r0, #255 ; 0xff - 8001542: f7ff fe19 bl 8001178 - - if ((heth->Init).AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) - 8001546: 687b ldr r3, [r7, #4] - 8001548: 685b ldr r3, [r3, #4] - 800154a: 2b00 cmp r3, #0 - 800154c: f000 80a2 beq.w 8001694 - { - /* Get tick */ - tickstart = HAL_GetTick(); - 8001550: f7ff fe08 bl 8001164 - 8001554: 6178 str r0, [r7, #20] - - /* We wait for linked status */ - do - { - HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); - 8001556: f107 030c add.w r3, r7, #12 - 800155a: 461a mov r2, r3 - 800155c: 2101 movs r1, #1 - 800155e: 6878 ldr r0, [r7, #4] - 8001560: f000 fa82 bl 8001a68 - - /* Check for the Timeout */ - if ((HAL_GetTick() - tickstart) > ETH_TIMEOUT_LINKED_STATE) - 8001564: f7ff fdfe bl 8001164 - 8001568: 4602 mov r2, r0 - 800156a: 697b ldr r3, [r7, #20] - 800156c: 1ad3 subs r3, r2, r3 - 800156e: f241 3288 movw r2, #5000 ; 0x1388 - 8001572: 4293 cmp r3, r2 - 8001574: d90f bls.n 8001596 - { - /* In case of write timeout */ - err = ETH_ERROR; - 8001576: 2301 movs r3, #1 - 8001578: 613b str r3, [r7, #16] - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - 800157a: 6939 ldr r1, [r7, #16] - 800157c: 6878 ldr r0, [r7, #4] - 800157e: f000 fc99 bl 8001eb4 - - heth->State = HAL_ETH_STATE_READY; - 8001582: 687b ldr r3, [r7, #4] - 8001584: 2201 movs r2, #1 - 8001586: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 800158a: 687b ldr r3, [r7, #4] - 800158c: 2200 movs r2, #0 - 800158e: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - return HAL_TIMEOUT; - 8001592: 2303 movs r3, #3 - 8001594: e0a9 b.n 80016ea - } - } - while (((phyreg & PHY_LINKED_STATUS) != PHY_LINKED_STATUS)); - 8001596: 68fb ldr r3, [r7, #12] - 8001598: f003 0304 and.w r3, r3, #4 - 800159c: 2b00 cmp r3, #0 - 800159e: d0da beq.n 8001556 - - - /* Enable Auto-Negotiation */ - if ((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_AUTONEGOTIATION)) != HAL_OK) - 80015a0: f44f 5280 mov.w r2, #4096 ; 0x1000 - 80015a4: 2100 movs r1, #0 - 80015a6: 6878 ldr r0, [r7, #4] - 80015a8: f000 fac6 bl 8001b38 - 80015ac: 4603 mov r3, r0 - 80015ae: 2b00 cmp r3, #0 - 80015b0: d00b beq.n 80015ca - { - /* In case of write timeout */ - err = ETH_ERROR; - 80015b2: 2301 movs r3, #1 - 80015b4: 613b str r3, [r7, #16] - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - 80015b6: 6939 ldr r1, [r7, #16] - 80015b8: 6878 ldr r0, [r7, #4] - 80015ba: f000 fc7b bl 8001eb4 - - /* Set the ETH peripheral state to READY */ - heth->State = HAL_ETH_STATE_READY; - 80015be: 687b ldr r3, [r7, #4] - 80015c0: 2201 movs r2, #1 - 80015c2: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Return HAL_ERROR */ - return HAL_ERROR; - 80015c6: 2301 movs r3, #1 - 80015c8: e08f b.n 80016ea - } - - /* Get tick */ - tickstart = HAL_GetTick(); - 80015ca: f7ff fdcb bl 8001164 - 80015ce: 6178 str r0, [r7, #20] - - /* Wait until the auto-negotiation will be completed */ - do - { - HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); - 80015d0: f107 030c add.w r3, r7, #12 - 80015d4: 461a mov r2, r3 - 80015d6: 2101 movs r1, #1 - 80015d8: 6878 ldr r0, [r7, #4] - 80015da: f000 fa45 bl 8001a68 - - /* Check for the Timeout */ - if ((HAL_GetTick() - tickstart) > ETH_TIMEOUT_AUTONEGO_COMPLETED) - 80015de: f7ff fdc1 bl 8001164 - 80015e2: 4602 mov r2, r0 - 80015e4: 697b ldr r3, [r7, #20] - 80015e6: 1ad3 subs r3, r2, r3 - 80015e8: f241 3288 movw r2, #5000 ; 0x1388 - 80015ec: 4293 cmp r3, r2 - 80015ee: d90f bls.n 8001610 - { - /* In case of write timeout */ - err = ETH_ERROR; - 80015f0: 2301 movs r3, #1 - 80015f2: 613b str r3, [r7, #16] - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - 80015f4: 6939 ldr r1, [r7, #16] - 80015f6: 6878 ldr r0, [r7, #4] - 80015f8: f000 fc5c bl 8001eb4 - - heth->State = HAL_ETH_STATE_READY; - 80015fc: 687b ldr r3, [r7, #4] - 80015fe: 2201 movs r2, #1 - 8001600: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001604: 687b ldr r3, [r7, #4] - 8001606: 2200 movs r2, #0 - 8001608: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - return HAL_TIMEOUT; - 800160c: 2303 movs r3, #3 - 800160e: e06c b.n 80016ea - } - - } - while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE)); - 8001610: 68fb ldr r3, [r7, #12] - 8001612: f003 0320 and.w r3, r3, #32 - 8001616: 2b00 cmp r3, #0 - 8001618: d0da beq.n 80015d0 - - /* Read the result of the auto-negotiation */ - if ((HAL_ETH_ReadPHYRegister(heth, PHY_SR, &phyreg)) != HAL_OK) - 800161a: f107 030c add.w r3, r7, #12 - 800161e: 461a mov r2, r3 - 8001620: 2110 movs r1, #16 - 8001622: 6878 ldr r0, [r7, #4] - 8001624: f000 fa20 bl 8001a68 - 8001628: 4603 mov r3, r0 - 800162a: 2b00 cmp r3, #0 - 800162c: d00b beq.n 8001646 - { - /* In case of write timeout */ - err = ETH_ERROR; - 800162e: 2301 movs r3, #1 - 8001630: 613b str r3, [r7, #16] - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - 8001632: 6939 ldr r1, [r7, #16] - 8001634: 6878 ldr r0, [r7, #4] - 8001636: f000 fc3d bl 8001eb4 - - /* Set the ETH peripheral state to READY */ - heth->State = HAL_ETH_STATE_READY; - 800163a: 687b ldr r3, [r7, #4] - 800163c: 2201 movs r2, #1 - 800163e: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Return HAL_ERROR */ - return HAL_ERROR; - 8001642: 2301 movs r3, #1 - 8001644: e051 b.n 80016ea - } - - /* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */ - if ((phyreg & PHY_DUPLEX_STATUS) != (uint32_t)RESET) - 8001646: 68fb ldr r3, [r7, #12] - 8001648: f003 0304 and.w r3, r3, #4 - 800164c: 2b00 cmp r3, #0 - 800164e: d004 beq.n 800165a - { - /* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */ - (heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX; - 8001650: 687b ldr r3, [r7, #4] - 8001652: f44f 6200 mov.w r2, #2048 ; 0x800 - 8001656: 60da str r2, [r3, #12] - 8001658: e002 b.n 8001660 - } - else - { - /* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */ - (heth->Init).DuplexMode = ETH_MODE_HALFDUPLEX; - 800165a: 687b ldr r3, [r7, #4] - 800165c: 2200 movs r2, #0 - 800165e: 60da str r2, [r3, #12] - } - /* Configure the MAC with the speed fixed by the auto-negotiation process */ - if ((phyreg & PHY_SPEED_STATUS) == PHY_SPEED_STATUS) - 8001660: 68fb ldr r3, [r7, #12] - 8001662: f003 0302 and.w r3, r3, #2 - 8001666: 2b00 cmp r3, #0 - 8001668: d003 beq.n 8001672 - { - /* Set Ethernet speed to 10M following the auto-negotiation */ - (heth->Init).Speed = ETH_SPEED_10M; - 800166a: 687b ldr r3, [r7, #4] - 800166c: 2200 movs r2, #0 - 800166e: 609a str r2, [r3, #8] - 8001670: e032 b.n 80016d8 - } - else - { - /* Set Ethernet speed to 100M following the auto-negotiation */ - (heth->Init).Speed = ETH_SPEED_100M; - 8001672: 687b ldr r3, [r7, #4] - 8001674: f44f 4280 mov.w r2, #16384 ; 0x4000 - 8001678: 609a str r2, [r3, #8] - 800167a: e02d b.n 80016d8 - 800167c: 03938700 .word 0x03938700 - 8001680: 40023800 .word 0x40023800 - 8001684: 40013800 .word 0x40013800 - 8001688: 01312cff .word 0x01312cff - 800168c: 02160ebf .word 0x02160ebf - 8001690: 05f5e0ff .word 0x05f5e0ff - /* Check parameters */ - assert_param(IS_ETH_SPEED(heth->Init.Speed)); - assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); - - /* Set MAC Speed and Duplex Mode */ - if (HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) | - 8001694: 687b ldr r3, [r7, #4] - 8001696: 68db ldr r3, [r3, #12] - 8001698: 08db lsrs r3, r3, #3 - 800169a: b29a uxth r2, r3 - (uint16_t)((heth->Init).Speed >> 1))) != HAL_OK) - 800169c: 687b ldr r3, [r7, #4] - 800169e: 689b ldr r3, [r3, #8] - 80016a0: 085b lsrs r3, r3, #1 - 80016a2: b29b uxth r3, r3 - if (HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) | - 80016a4: 4313 orrs r3, r2 - 80016a6: b29b uxth r3, r3 - 80016a8: 461a mov r2, r3 - 80016aa: 2100 movs r1, #0 - 80016ac: 6878 ldr r0, [r7, #4] - 80016ae: f000 fa43 bl 8001b38 - 80016b2: 4603 mov r3, r0 - 80016b4: 2b00 cmp r3, #0 - 80016b6: d00b beq.n 80016d0 - { - /* In case of write timeout */ - err = ETH_ERROR; - 80016b8: 2301 movs r3, #1 - 80016ba: 613b str r3, [r7, #16] - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - 80016bc: 6939 ldr r1, [r7, #16] - 80016be: 6878 ldr r0, [r7, #4] - 80016c0: f000 fbf8 bl 8001eb4 - - /* Set the ETH peripheral state to READY */ - heth->State = HAL_ETH_STATE_READY; - 80016c4: 687b ldr r3, [r7, #4] - 80016c6: 2201 movs r2, #1 - 80016c8: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Return HAL_ERROR */ - return HAL_ERROR; - 80016cc: 2301 movs r3, #1 - 80016ce: e00c b.n 80016ea - } - - /* Delay to assure PHY configuration */ - HAL_Delay(PHY_CONFIG_DELAY); - 80016d0: f640 70ff movw r0, #4095 ; 0xfff - 80016d4: f7ff fd50 bl 8001178 - } - - /* Config MAC and DMA */ - ETH_MACDMAConfig(heth, err); - 80016d8: 6939 ldr r1, [r7, #16] - 80016da: 6878 ldr r0, [r7, #4] - 80016dc: f000 fbea bl 8001eb4 - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - 80016e0: 687b ldr r3, [r7, #4] - 80016e2: 2201 movs r2, #1 - 80016e4: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Return function status */ - return HAL_OK; - 80016e8: 2300 movs r3, #0 -} - 80016ea: 4618 mov r0, r3 - 80016ec: 3720 adds r7, #32 - 80016ee: 46bd mov sp, r7 - 80016f0: bd80 pop {r7, pc} - 80016f2: bf00 nop - -080016f4 : - * @param TxBuff Pointer to the first TxBuffer list - * @param TxBuffCount Number of the used Tx desc in the list - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t *TxBuff, uint32_t TxBuffCount) -{ - 80016f4: b480 push {r7} - 80016f6: b087 sub sp, #28 - 80016f8: af00 add r7, sp, #0 - 80016fa: 60f8 str r0, [r7, #12] - 80016fc: 60b9 str r1, [r7, #8] - 80016fe: 607a str r2, [r7, #4] - 8001700: 603b str r3, [r7, #0] - uint32_t i = 0U; - 8001702: 2300 movs r3, #0 - 8001704: 617b str r3, [r7, #20] - ETH_DMADescTypeDef *dmatxdesc; - - /* Process Locked */ - __HAL_LOCK(heth); - 8001706: 68fb ldr r3, [r7, #12] - 8001708: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 800170c: 2b01 cmp r3, #1 - 800170e: d101 bne.n 8001714 - 8001710: 2302 movs r3, #2 - 8001712: e051 b.n 80017b8 - 8001714: 68fb ldr r3, [r7, #12] - 8001716: 2201 movs r2, #1 - 8001718: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - 800171c: 68fb ldr r3, [r7, #12] - 800171e: 2202 movs r2, #2 - 8001720: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ - heth->TxDesc = DMATxDescTab; - 8001724: 68fb ldr r3, [r7, #12] - 8001726: 68ba ldr r2, [r7, #8] - 8001728: 62da str r2, [r3, #44] ; 0x2c - - /* Fill each DMATxDesc descriptor with the right values */ - for (i = 0U; i < TxBuffCount; i++) - 800172a: 2300 movs r3, #0 - 800172c: 617b str r3, [r7, #20] - 800172e: e030 b.n 8001792 - { - /* Get the pointer on the member (i) of the Tx Desc list */ - dmatxdesc = DMATxDescTab + i; - 8001730: 697b ldr r3, [r7, #20] - 8001732: 015b lsls r3, r3, #5 - 8001734: 68ba ldr r2, [r7, #8] - 8001736: 4413 add r3, r2 - 8001738: 613b str r3, [r7, #16] - - /* Set Second Address Chained bit */ - dmatxdesc->Status = ETH_DMATXDESC_TCH; - 800173a: 693b ldr r3, [r7, #16] - 800173c: f44f 1280 mov.w r2, #1048576 ; 0x100000 - 8001740: 601a str r2, [r3, #0] - - /* Set Buffer1 address pointer */ - dmatxdesc->Buffer1Addr = (uint32_t)(&TxBuff[i * ETH_TX_BUF_SIZE]); - 8001742: 697b ldr r3, [r7, #20] - 8001744: f240 52f4 movw r2, #1524 ; 0x5f4 - 8001748: fb02 f303 mul.w r3, r2, r3 - 800174c: 687a ldr r2, [r7, #4] - 800174e: 4413 add r3, r2 - 8001750: 461a mov r2, r3 - 8001752: 693b ldr r3, [r7, #16] - 8001754: 609a str r2, [r3, #8] - - if ((heth->Init).ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) - 8001756: 68fb ldr r3, [r7, #12] - 8001758: 69db ldr r3, [r3, #28] - 800175a: 2b00 cmp r3, #0 - 800175c: d105 bne.n 800176a - { - /* Set the DMA Tx descriptors checksum insertion */ - dmatxdesc->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; - 800175e: 693b ldr r3, [r7, #16] - 8001760: 681b ldr r3, [r3, #0] - 8001762: f443 0240 orr.w r2, r3, #12582912 ; 0xc00000 - 8001766: 693b ldr r3, [r7, #16] - 8001768: 601a str r2, [r3, #0] - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if (i < (TxBuffCount - 1)) - 800176a: 683b ldr r3, [r7, #0] - 800176c: 3b01 subs r3, #1 - 800176e: 697a ldr r2, [r7, #20] - 8001770: 429a cmp r2, r3 - 8001772: d208 bcs.n 8001786 - { - /* Set next descriptor address register with next descriptor base address */ - dmatxdesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab + i + 1); - 8001774: 697b ldr r3, [r7, #20] - 8001776: 3301 adds r3, #1 - 8001778: 015b lsls r3, r3, #5 - 800177a: 68ba ldr r2, [r7, #8] - 800177c: 4413 add r3, r2 - 800177e: 461a mov r2, r3 - 8001780: 693b ldr r3, [r7, #16] - 8001782: 60da str r2, [r3, #12] - 8001784: e002 b.n 800178c - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - dmatxdesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; - 8001786: 68ba ldr r2, [r7, #8] - 8001788: 693b ldr r3, [r7, #16] - 800178a: 60da str r2, [r3, #12] - for (i = 0U; i < TxBuffCount; i++) - 800178c: 697b ldr r3, [r7, #20] - 800178e: 3301 adds r3, #1 - 8001790: 617b str r3, [r7, #20] - 8001792: 697a ldr r2, [r7, #20] - 8001794: 683b ldr r3, [r7, #0] - 8001796: 429a cmp r2, r3 - 8001798: d3ca bcc.n 8001730 - } - } - - /* Set Transmit Descriptor List Address Register */ - (heth->Instance)->DMATDLAR = (uint32_t) DMATxDescTab; - 800179a: 68fb ldr r3, [r7, #12] - 800179c: 681a ldr r2, [r3, #0] - 800179e: 68bb ldr r3, [r7, #8] - 80017a0: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 80017a4: 6113 str r3, [r2, #16] - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - 80017a6: 68fb ldr r3, [r7, #12] - 80017a8: 2201 movs r2, #1 - 80017aa: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 80017ae: 68fb ldr r3, [r7, #12] - 80017b0: 2200 movs r2, #0 - 80017b2: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Return function status */ - return HAL_OK; - 80017b6: 2300 movs r3, #0 -} - 80017b8: 4618 mov r0, r3 - 80017ba: 371c adds r7, #28 - 80017bc: 46bd mov sp, r7 - 80017be: bc80 pop {r7} - 80017c0: 4770 bx lr - -080017c2 : - * @param RxBuff Pointer to the first RxBuffer list - * @param RxBuffCount Number of the used Rx desc in the list - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount) -{ - 80017c2: b480 push {r7} - 80017c4: b087 sub sp, #28 - 80017c6: af00 add r7, sp, #0 - 80017c8: 60f8 str r0, [r7, #12] - 80017ca: 60b9 str r1, [r7, #8] - 80017cc: 607a str r2, [r7, #4] - 80017ce: 603b str r3, [r7, #0] - uint32_t i = 0U; - 80017d0: 2300 movs r3, #0 - 80017d2: 617b str r3, [r7, #20] - ETH_DMADescTypeDef *DMARxDesc; - - /* Process Locked */ - __HAL_LOCK(heth); - 80017d4: 68fb ldr r3, [r7, #12] - 80017d6: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 80017da: 2b01 cmp r3, #1 - 80017dc: d101 bne.n 80017e2 - 80017de: 2302 movs r3, #2 - 80017e0: e055 b.n 800188e - 80017e2: 68fb ldr r3, [r7, #12] - 80017e4: 2201 movs r2, #1 - 80017e6: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - 80017ea: 68fb ldr r3, [r7, #12] - 80017ec: 2202 movs r2, #2 - 80017ee: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Set the Ethernet RxDesc pointer with the first one of the DMARxDescTab list */ - heth->RxDesc = DMARxDescTab; - 80017f2: 68fb ldr r3, [r7, #12] - 80017f4: 68ba ldr r2, [r7, #8] - 80017f6: 629a str r2, [r3, #40] ; 0x28 - - /* Fill each DMARxDesc descriptor with the right values */ - for (i = 0U; i < RxBuffCount; i++) - 80017f8: 2300 movs r3, #0 - 80017fa: 617b str r3, [r7, #20] - 80017fc: e034 b.n 8001868 - { - /* Get the pointer on the member (i) of the Rx Desc list */ - DMARxDesc = DMARxDescTab + i; - 80017fe: 697b ldr r3, [r7, #20] - 8001800: 015b lsls r3, r3, #5 - 8001802: 68ba ldr r2, [r7, #8] - 8001804: 4413 add r3, r2 - 8001806: 613b str r3, [r7, #16] - - /* Set Own bit of the Rx descriptor Status */ - DMARxDesc->Status = ETH_DMARXDESC_OWN; - 8001808: 693b ldr r3, [r7, #16] - 800180a: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 - 800180e: 601a str r2, [r3, #0] - - /* Set Buffer1 size and Second Address Chained bit */ - DMARxDesc->ControlBufferSize = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE; - 8001810: 693b ldr r3, [r7, #16] - 8001812: f244 52f4 movw r2, #17908 ; 0x45f4 - 8001816: 605a str r2, [r3, #4] - - /* Set Buffer1 address pointer */ - DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i * ETH_RX_BUF_SIZE]); - 8001818: 697b ldr r3, [r7, #20] - 800181a: f240 52f4 movw r2, #1524 ; 0x5f4 - 800181e: fb02 f303 mul.w r3, r2, r3 - 8001822: 687a ldr r2, [r7, #4] - 8001824: 4413 add r3, r2 - 8001826: 461a mov r2, r3 - 8001828: 693b ldr r3, [r7, #16] - 800182a: 609a str r2, [r3, #8] - - if ((heth->Init).RxMode == ETH_RXINTERRUPT_MODE) - 800182c: 68fb ldr r3, [r7, #12] - 800182e: 699b ldr r3, [r3, #24] - 8001830: 2b01 cmp r3, #1 - 8001832: d105 bne.n 8001840 - { - /* Enable Ethernet DMA Rx Descriptor interrupt */ - DMARxDesc->ControlBufferSize &= ~ETH_DMARXDESC_DIC; - 8001834: 693b ldr r3, [r7, #16] - 8001836: 685b ldr r3, [r3, #4] - 8001838: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000 - 800183c: 693b ldr r3, [r7, #16] - 800183e: 605a str r2, [r3, #4] - } - - /* Initialize the next descriptor with the Next Descriptor Polling Enable */ - if (i < (RxBuffCount - 1U)) - 8001840: 683b ldr r3, [r7, #0] - 8001842: 3b01 subs r3, #1 - 8001844: 697a ldr r2, [r7, #20] - 8001846: 429a cmp r2, r3 - 8001848: d208 bcs.n 800185c - { - /* Set next descriptor address register with next descriptor base address */ - DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab + i + 1U); - 800184a: 697b ldr r3, [r7, #20] - 800184c: 3301 adds r3, #1 - 800184e: 015b lsls r3, r3, #5 - 8001850: 68ba ldr r2, [r7, #8] - 8001852: 4413 add r3, r2 - 8001854: 461a mov r2, r3 - 8001856: 693b ldr r3, [r7, #16] - 8001858: 60da str r2, [r3, #12] - 800185a: e002 b.n 8001862 - } - else - { - /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ - DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); - 800185c: 68ba ldr r2, [r7, #8] - 800185e: 693b ldr r3, [r7, #16] - 8001860: 60da str r2, [r3, #12] - for (i = 0U; i < RxBuffCount; i++) - 8001862: 697b ldr r3, [r7, #20] - 8001864: 3301 adds r3, #1 - 8001866: 617b str r3, [r7, #20] - 8001868: 697a ldr r2, [r7, #20] - 800186a: 683b ldr r3, [r7, #0] - 800186c: 429a cmp r2, r3 - 800186e: d3c6 bcc.n 80017fe - } - } - - /* Set Receive Descriptor List Address Register */ - (heth->Instance)->DMARDLAR = (uint32_t) DMARxDescTab; - 8001870: 68fb ldr r3, [r7, #12] - 8001872: 681a ldr r2, [r3, #0] - 8001874: 68bb ldr r3, [r7, #8] - 8001876: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 800187a: 60d3 str r3, [r2, #12] - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - 800187c: 68fb ldr r3, [r7, #12] - 800187e: 2201 movs r2, #1 - 8001880: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001884: 68fb ldr r3, [r7, #12] - 8001886: 2200 movs r2, #0 - 8001888: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Return function status */ - return HAL_OK; - 800188c: 2300 movs r3, #0 -} - 800188e: 4618 mov r0, r3 - 8001890: 371c adds r7, #28 - 8001892: 46bd mov sp, r7 - 8001894: bc80 pop {r7} - 8001896: 4770 bx lr - -08001898 : - * the configuration information for ETHERNET module - * @param FrameLength Amount of data to be sent - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength) -{ - 8001898: b480 push {r7} - 800189a: b087 sub sp, #28 - 800189c: af00 add r7, sp, #0 - 800189e: 6078 str r0, [r7, #4] - 80018a0: 6039 str r1, [r7, #0] - uint32_t bufcount = 0U, size = 0U, i = 0U; - 80018a2: 2300 movs r3, #0 - 80018a4: 617b str r3, [r7, #20] - 80018a6: 2300 movs r3, #0 - 80018a8: 60fb str r3, [r7, #12] - 80018aa: 2300 movs r3, #0 - 80018ac: 613b str r3, [r7, #16] - - /* Process Locked */ - __HAL_LOCK(heth); - 80018ae: 687b ldr r3, [r7, #4] - 80018b0: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 80018b4: 2b01 cmp r3, #1 - 80018b6: d101 bne.n 80018bc - 80018b8: 2302 movs r3, #2 - 80018ba: e0cc b.n 8001a56 - 80018bc: 687b ldr r3, [r7, #4] - 80018be: 2201 movs r2, #1 - 80018c0: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - 80018c4: 687b ldr r3, [r7, #4] - 80018c6: 2202 movs r2, #2 - 80018c8: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - if (FrameLength == 0U) - 80018cc: 683b ldr r3, [r7, #0] - 80018ce: 2b00 cmp r3, #0 - 80018d0: d109 bne.n 80018e6 - { - /* Set ETH HAL state to READY */ - heth->State = HAL_ETH_STATE_READY; - 80018d2: 687b ldr r3, [r7, #4] - 80018d4: 2201 movs r2, #1 - 80018d6: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 80018da: 687b ldr r3, [r7, #4] - 80018dc: 2200 movs r2, #0 - 80018de: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - return HAL_ERROR; - 80018e2: 2301 movs r3, #1 - 80018e4: e0b7 b.n 8001a56 - } - - /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ - if (((heth->TxDesc)->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) - 80018e6: 687b ldr r3, [r7, #4] - 80018e8: 6adb ldr r3, [r3, #44] ; 0x2c - 80018ea: 681b ldr r3, [r3, #0] - 80018ec: 2b00 cmp r3, #0 - 80018ee: da09 bge.n 8001904 - { - /* OWN bit set */ - heth->State = HAL_ETH_STATE_BUSY_TX; - 80018f0: 687b ldr r3, [r7, #4] - 80018f2: 2212 movs r2, #18 - 80018f4: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 80018f8: 687b ldr r3, [r7, #4] - 80018fa: 2200 movs r2, #0 - 80018fc: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - return HAL_ERROR; - 8001900: 2301 movs r3, #1 - 8001902: e0a8 b.n 8001a56 - } - - /* Get the number of needed Tx buffers for the current frame */ - if (FrameLength > ETH_TX_BUF_SIZE) - 8001904: 683b ldr r3, [r7, #0] - 8001906: f240 52f4 movw r2, #1524 ; 0x5f4 - 800190a: 4293 cmp r3, r2 - 800190c: d915 bls.n 800193a - { - bufcount = FrameLength / ETH_TX_BUF_SIZE; - 800190e: 683b ldr r3, [r7, #0] - 8001910: 4a53 ldr r2, [pc, #332] ; (8001a60 ) - 8001912: fba2 2303 umull r2, r3, r2, r3 - 8001916: 0a9b lsrs r3, r3, #10 - 8001918: 617b str r3, [r7, #20] - if (FrameLength % ETH_TX_BUF_SIZE) - 800191a: 683a ldr r2, [r7, #0] - 800191c: 4b50 ldr r3, [pc, #320] ; (8001a60 ) - 800191e: fba3 1302 umull r1, r3, r3, r2 - 8001922: 0a9b lsrs r3, r3, #10 - 8001924: f240 51f4 movw r1, #1524 ; 0x5f4 - 8001928: fb01 f303 mul.w r3, r1, r3 - 800192c: 1ad3 subs r3, r2, r3 - 800192e: 2b00 cmp r3, #0 - 8001930: d005 beq.n 800193e - { - bufcount++; - 8001932: 697b ldr r3, [r7, #20] - 8001934: 3301 adds r3, #1 - 8001936: 617b str r3, [r7, #20] - 8001938: e001 b.n 800193e - } - } - else - { - bufcount = 1U; - 800193a: 2301 movs r3, #1 - 800193c: 617b str r3, [r7, #20] - } - if (bufcount == 1U) - 800193e: 697b ldr r3, [r7, #20] - 8001940: 2b01 cmp r3, #1 - 8001942: d11c bne.n 800197e - { - /* Set LAST and FIRST segment */ - heth->TxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; - 8001944: 687b ldr r3, [r7, #4] - 8001946: 6adb ldr r3, [r3, #44] ; 0x2c - 8001948: 681a ldr r2, [r3, #0] - 800194a: 687b ldr r3, [r7, #4] - 800194c: 6adb ldr r3, [r3, #44] ; 0x2c - 800194e: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 - 8001952: 601a str r2, [r3, #0] - /* Set frame size */ - heth->TxDesc->ControlBufferSize = (FrameLength & ETH_DMATXDESC_TBS1); - 8001954: 687b ldr r3, [r7, #4] - 8001956: 6adb ldr r3, [r3, #44] ; 0x2c - 8001958: 683a ldr r2, [r7, #0] - 800195a: f3c2 020c ubfx r2, r2, #0, #13 - 800195e: 605a str r2, [r3, #4] - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - heth->TxDesc->Status |= ETH_DMATXDESC_OWN; - 8001960: 687b ldr r3, [r7, #4] - 8001962: 6adb ldr r3, [r3, #44] ; 0x2c - 8001964: 681a ldr r2, [r3, #0] - 8001966: 687b ldr r3, [r7, #4] - 8001968: 6adb ldr r3, [r3, #44] ; 0x2c - 800196a: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 - 800196e: 601a str r2, [r3, #0] - /* Point to next descriptor */ - heth->TxDesc = (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr); - 8001970: 687b ldr r3, [r7, #4] - 8001972: 6adb ldr r3, [r3, #44] ; 0x2c - 8001974: 68db ldr r3, [r3, #12] - 8001976: 461a mov r2, r3 - 8001978: 687b ldr r3, [r7, #4] - 800197a: 62da str r2, [r3, #44] ; 0x2c - 800197c: e04b b.n 8001a16 - } - else - { - for (i = 0U; i < bufcount; i++) - 800197e: 2300 movs r3, #0 - 8001980: 613b str r3, [r7, #16] - 8001982: e044 b.n 8001a0e - { - /* Clear FIRST and LAST segment bits */ - heth->TxDesc->Status &= ~(ETH_DMATXDESC_FS | ETH_DMATXDESC_LS); - 8001984: 687b ldr r3, [r7, #4] - 8001986: 6adb ldr r3, [r3, #44] ; 0x2c - 8001988: 681a ldr r2, [r3, #0] - 800198a: 687b ldr r3, [r7, #4] - 800198c: 6adb ldr r3, [r3, #44] ; 0x2c - 800198e: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000 - 8001992: 601a str r2, [r3, #0] - - if (i == 0U) - 8001994: 693b ldr r3, [r7, #16] - 8001996: 2b00 cmp r3, #0 - 8001998: d107 bne.n 80019aa - { - /* Setting the first segment bit */ - heth->TxDesc->Status |= ETH_DMATXDESC_FS; - 800199a: 687b ldr r3, [r7, #4] - 800199c: 6adb ldr r3, [r3, #44] ; 0x2c - 800199e: 681a ldr r2, [r3, #0] - 80019a0: 687b ldr r3, [r7, #4] - 80019a2: 6adb ldr r3, [r3, #44] ; 0x2c - 80019a4: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000 - 80019a8: 601a str r2, [r3, #0] - } - - /* Program size */ - heth->TxDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATXDESC_TBS1); - 80019aa: 687b ldr r3, [r7, #4] - 80019ac: 6adb ldr r3, [r3, #44] ; 0x2c - 80019ae: f240 52f4 movw r2, #1524 ; 0x5f4 - 80019b2: 605a str r2, [r3, #4] - - if (i == (bufcount - 1U)) - 80019b4: 697b ldr r3, [r7, #20] - 80019b6: 3b01 subs r3, #1 - 80019b8: 693a ldr r2, [r7, #16] - 80019ba: 429a cmp r2, r3 - 80019bc: d116 bne.n 80019ec - { - /* Setting the last segment bit */ - heth->TxDesc->Status |= ETH_DMATXDESC_LS; - 80019be: 687b ldr r3, [r7, #4] - 80019c0: 6adb ldr r3, [r3, #44] ; 0x2c - 80019c2: 681a ldr r2, [r3, #0] - 80019c4: 687b ldr r3, [r7, #4] - 80019c6: 6adb ldr r3, [r3, #44] ; 0x2c - 80019c8: f042 5200 orr.w r2, r2, #536870912 ; 0x20000000 - 80019cc: 601a str r2, [r3, #0] - size = FrameLength - (bufcount - 1U) * ETH_TX_BUF_SIZE; - 80019ce: 697b ldr r3, [r7, #20] - 80019d0: 4a24 ldr r2, [pc, #144] ; (8001a64 ) - 80019d2: fb03 f202 mul.w r2, r3, r2 - 80019d6: 683b ldr r3, [r7, #0] - 80019d8: 4413 add r3, r2 - 80019da: f203 53f4 addw r3, r3, #1524 ; 0x5f4 - 80019de: 60fb str r3, [r7, #12] - heth->TxDesc->ControlBufferSize = (size & ETH_DMATXDESC_TBS1); - 80019e0: 687b ldr r3, [r7, #4] - 80019e2: 6adb ldr r3, [r3, #44] ; 0x2c - 80019e4: 68fa ldr r2, [r7, #12] - 80019e6: f3c2 020c ubfx r2, r2, #0, #13 - 80019ea: 605a str r2, [r3, #4] - } - - /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ - heth->TxDesc->Status |= ETH_DMATXDESC_OWN; - 80019ec: 687b ldr r3, [r7, #4] - 80019ee: 6adb ldr r3, [r3, #44] ; 0x2c - 80019f0: 681a ldr r2, [r3, #0] - 80019f2: 687b ldr r3, [r7, #4] - 80019f4: 6adb ldr r3, [r3, #44] ; 0x2c - 80019f6: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 - 80019fa: 601a str r2, [r3, #0] - /* point to next descriptor */ - heth->TxDesc = (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr); - 80019fc: 687b ldr r3, [r7, #4] - 80019fe: 6adb ldr r3, [r3, #44] ; 0x2c - 8001a00: 68db ldr r3, [r3, #12] - 8001a02: 461a mov r2, r3 - 8001a04: 687b ldr r3, [r7, #4] - 8001a06: 62da str r2, [r3, #44] ; 0x2c - for (i = 0U; i < bufcount; i++) - 8001a08: 693b ldr r3, [r7, #16] - 8001a0a: 3301 adds r3, #1 - 8001a0c: 613b str r3, [r7, #16] - 8001a0e: 693a ldr r2, [r7, #16] - 8001a10: 697b ldr r3, [r7, #20] - 8001a12: 429a cmp r2, r3 - 8001a14: d3b6 bcc.n 8001984 - } - } - - /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ - if (((heth->Instance)->DMASR & ETH_DMASR_TBUS) != (uint32_t)RESET) - 8001a16: 687b ldr r3, [r7, #4] - 8001a18: 681b ldr r3, [r3, #0] - 8001a1a: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8001a1e: 695b ldr r3, [r3, #20] - 8001a20: f003 0304 and.w r3, r3, #4 - 8001a24: 2b00 cmp r3, #0 - 8001a26: d00d beq.n 8001a44 - { - /* Clear TBUS ETHERNET DMA flag */ - (heth->Instance)->DMASR = ETH_DMASR_TBUS; - 8001a28: 687b ldr r3, [r7, #4] - 8001a2a: 681b ldr r3, [r3, #0] - 8001a2c: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8001a30: 461a mov r2, r3 - 8001a32: 2304 movs r3, #4 - 8001a34: 6153 str r3, [r2, #20] - /* Resume DMA transmission*/ - (heth->Instance)->DMATPDR = 0U; - 8001a36: 687b ldr r3, [r7, #4] - 8001a38: 681b ldr r3, [r3, #0] - 8001a3a: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8001a3e: 461a mov r2, r3 - 8001a40: 2300 movs r3, #0 - 8001a42: 6053 str r3, [r2, #4] - } - - /* Set ETH HAL State to Ready */ - heth->State = HAL_ETH_STATE_READY; - 8001a44: 687b ldr r3, [r7, #4] - 8001a46: 2201 movs r2, #1 - 8001a48: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001a4c: 687b ldr r3, [r7, #4] - 8001a4e: 2200 movs r2, #0 - 8001a50: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Return function status */ - return HAL_OK; - 8001a54: 2300 movs r3, #0 -} - 8001a56: 4618 mov r0, r3 - 8001a58: 371c adds r7, #28 - 8001a5a: 46bd mov sp, r7 - 8001a5c: bc80 pop {r7} - 8001a5e: 4770 bx lr - 8001a60: ac02b00b .word 0xac02b00b - 8001a64: fffffa0c .word 0xfffffa0c - -08001a68 : - * More PHY register could be read depending on the used PHY - * @param RegValue PHY register value - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) -{ - 8001a68: b580 push {r7, lr} - 8001a6a: b086 sub sp, #24 - 8001a6c: af00 add r7, sp, #0 - 8001a6e: 60f8 str r0, [r7, #12] - 8001a70: 460b mov r3, r1 - 8001a72: 607a str r2, [r7, #4] - 8001a74: 817b strh r3, [r7, #10] - uint32_t tmpreg1 = 0U; - 8001a76: 2300 movs r3, #0 - 8001a78: 617b str r3, [r7, #20] - uint32_t tickstart = 0U; - 8001a7a: 2300 movs r3, #0 - 8001a7c: 613b str r3, [r7, #16] - - /* Check parameters */ - assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); - - /* Check the ETH peripheral state */ - if (heth->State == HAL_ETH_STATE_BUSY_RD) - 8001a7e: 68fb ldr r3, [r7, #12] - 8001a80: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 - 8001a84: b2db uxtb r3, r3 - 8001a86: 2b82 cmp r3, #130 ; 0x82 - 8001a88: d101 bne.n 8001a8e - { - return HAL_BUSY; - 8001a8a: 2302 movs r3, #2 - 8001a8c: e050 b.n 8001b30 - } - /* Set ETH HAL State to BUSY_RD */ - heth->State = HAL_ETH_STATE_BUSY_RD; - 8001a8e: 68fb ldr r3, [r7, #12] - 8001a90: 2282 movs r2, #130 ; 0x82 - 8001a92: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Get the ETHERNET MACMIIAR value */ - tmpreg1 = heth->Instance->MACMIIAR; - 8001a96: 68fb ldr r3, [r7, #12] - 8001a98: 681b ldr r3, [r3, #0] - 8001a9a: 691b ldr r3, [r3, #16] - 8001a9c: 617b str r3, [r7, #20] - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg1 &= ~ETH_MACMIIAR_CR_MASK; - 8001a9e: 697b ldr r3, [r7, #20] - 8001aa0: f003 031c and.w r3, r3, #28 - 8001aa4: 617b str r3, [r7, #20] - - /* Prepare the MII address register value */ - tmpreg1 |= (((uint32_t)heth->Init.PhyAddress << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */ - 8001aa6: 68fb ldr r3, [r7, #12] - 8001aa8: 8a1b ldrh r3, [r3, #16] - 8001aaa: 02db lsls r3, r3, #11 - 8001aac: b29b uxth r3, r3 - 8001aae: 697a ldr r2, [r7, #20] - 8001ab0: 4313 orrs r3, r2 - 8001ab2: 617b str r3, [r7, #20] - tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */ - 8001ab4: 897b ldrh r3, [r7, #10] - 8001ab6: 019b lsls r3, r3, #6 - 8001ab8: f403 63f8 and.w r3, r3, #1984 ; 0x7c0 - 8001abc: 697a ldr r2, [r7, #20] - 8001abe: 4313 orrs r3, r2 - 8001ac0: 617b str r3, [r7, #20] - tmpreg1 &= ~ETH_MACMIIAR_MW; /* Set the read mode */ - 8001ac2: 697b ldr r3, [r7, #20] - 8001ac4: f023 0302 bic.w r3, r3, #2 - 8001ac8: 617b str r3, [r7, #20] - tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - 8001aca: 697b ldr r3, [r7, #20] - 8001acc: f043 0301 orr.w r3, r3, #1 - 8001ad0: 617b str r3, [r7, #20] - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg1; - 8001ad2: 68fb ldr r3, [r7, #12] - 8001ad4: 681b ldr r3, [r3, #0] - 8001ad6: 697a ldr r2, [r7, #20] - 8001ad8: 611a str r2, [r3, #16] - - /* Get tick */ - tickstart = HAL_GetTick(); - 8001ada: f7ff fb43 bl 8001164 - 8001ade: 6138 str r0, [r7, #16] - - /* Check for the Busy flag */ - while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) - 8001ae0: e015 b.n 8001b0e - { - /* Check for the Timeout */ - if ((HAL_GetTick() - tickstart) > PHY_READ_TO) - 8001ae2: f7ff fb3f bl 8001164 - 8001ae6: 4602 mov r2, r0 - 8001ae8: 693b ldr r3, [r7, #16] - 8001aea: 1ad3 subs r3, r2, r3 - 8001aec: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 8001af0: d309 bcc.n 8001b06 - { - heth->State = HAL_ETH_STATE_READY; - 8001af2: 68fb ldr r3, [r7, #12] - 8001af4: 2201 movs r2, #1 - 8001af6: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001afa: 68fb ldr r3, [r7, #12] - 8001afc: 2200 movs r2, #0 - 8001afe: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - return HAL_TIMEOUT; - 8001b02: 2303 movs r3, #3 - 8001b04: e014 b.n 8001b30 - } - - tmpreg1 = heth->Instance->MACMIIAR; - 8001b06: 68fb ldr r3, [r7, #12] - 8001b08: 681b ldr r3, [r3, #0] - 8001b0a: 691b ldr r3, [r3, #16] - 8001b0c: 617b str r3, [r7, #20] - while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) - 8001b0e: 697b ldr r3, [r7, #20] - 8001b10: f003 0301 and.w r3, r3, #1 - 8001b14: 2b00 cmp r3, #0 - 8001b16: d1e4 bne.n 8001ae2 - } - - /* Get MACMIIDR value */ - *RegValue = (uint16_t)(heth->Instance->MACMIIDR); - 8001b18: 68fb ldr r3, [r7, #12] - 8001b1a: 681b ldr r3, [r3, #0] - 8001b1c: 695b ldr r3, [r3, #20] - 8001b1e: b29b uxth r3, r3 - 8001b20: 461a mov r2, r3 - 8001b22: 687b ldr r3, [r7, #4] - 8001b24: 601a str r2, [r3, #0] - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - 8001b26: 68fb ldr r3, [r7, #12] - 8001b28: 2201 movs r2, #1 - 8001b2a: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Return function status */ - return HAL_OK; - 8001b2e: 2300 movs r3, #0 -} - 8001b30: 4618 mov r0, r3 - 8001b32: 3718 adds r7, #24 - 8001b34: 46bd mov sp, r7 - 8001b36: bd80 pop {r7, pc} - -08001b38 : - * More PHY register could be written depending on the used PHY - * @param RegValue the value to write - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue) -{ - 8001b38: b580 push {r7, lr} - 8001b3a: b086 sub sp, #24 - 8001b3c: af00 add r7, sp, #0 - 8001b3e: 60f8 str r0, [r7, #12] - 8001b40: 460b mov r3, r1 - 8001b42: 607a str r2, [r7, #4] - 8001b44: 817b strh r3, [r7, #10] - uint32_t tmpreg1 = 0U; - 8001b46: 2300 movs r3, #0 - 8001b48: 617b str r3, [r7, #20] - uint32_t tickstart = 0U; - 8001b4a: 2300 movs r3, #0 - 8001b4c: 613b str r3, [r7, #16] - - /* Check parameters */ - assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); - - /* Check the ETH peripheral state */ - if (heth->State == HAL_ETH_STATE_BUSY_WR) - 8001b4e: 68fb ldr r3, [r7, #12] - 8001b50: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 - 8001b54: b2db uxtb r3, r3 - 8001b56: 2b42 cmp r3, #66 ; 0x42 - 8001b58: d101 bne.n 8001b5e - { - return HAL_BUSY; - 8001b5a: 2302 movs r3, #2 - 8001b5c: e04e b.n 8001bfc - } - /* Set ETH HAL State to BUSY_WR */ - heth->State = HAL_ETH_STATE_BUSY_WR; - 8001b5e: 68fb ldr r3, [r7, #12] - 8001b60: 2242 movs r2, #66 ; 0x42 - 8001b62: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Get the ETHERNET MACMIIAR value */ - tmpreg1 = heth->Instance->MACMIIAR; - 8001b66: 68fb ldr r3, [r7, #12] - 8001b68: 681b ldr r3, [r3, #0] - 8001b6a: 691b ldr r3, [r3, #16] - 8001b6c: 617b str r3, [r7, #20] - - /* Keep only the CSR Clock Range CR[2:0] bits value */ - tmpreg1 &= ~ETH_MACMIIAR_CR_MASK; - 8001b6e: 697b ldr r3, [r7, #20] - 8001b70: f003 031c and.w r3, r3, #28 - 8001b74: 617b str r3, [r7, #20] - - /* Prepare the MII register address value */ - tmpreg1 |= (((uint32_t)heth->Init.PhyAddress << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */ - 8001b76: 68fb ldr r3, [r7, #12] - 8001b78: 8a1b ldrh r3, [r3, #16] - 8001b7a: 02db lsls r3, r3, #11 - 8001b7c: b29b uxth r3, r3 - 8001b7e: 697a ldr r2, [r7, #20] - 8001b80: 4313 orrs r3, r2 - 8001b82: 617b str r3, [r7, #20] - tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */ - 8001b84: 897b ldrh r3, [r7, #10] - 8001b86: 019b lsls r3, r3, #6 - 8001b88: f403 63f8 and.w r3, r3, #1984 ; 0x7c0 - 8001b8c: 697a ldr r2, [r7, #20] - 8001b8e: 4313 orrs r3, r2 - 8001b90: 617b str r3, [r7, #20] - tmpreg1 |= ETH_MACMIIAR_MW; /* Set the write mode */ - 8001b92: 697b ldr r3, [r7, #20] - 8001b94: f043 0302 orr.w r3, r3, #2 - 8001b98: 617b str r3, [r7, #20] - tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ - 8001b9a: 697b ldr r3, [r7, #20] - 8001b9c: f043 0301 orr.w r3, r3, #1 - 8001ba0: 617b str r3, [r7, #20] - - /* Give the value to the MII data register */ - heth->Instance->MACMIIDR = (uint16_t)RegValue; - 8001ba2: 687b ldr r3, [r7, #4] - 8001ba4: b29a uxth r2, r3 - 8001ba6: 68fb ldr r3, [r7, #12] - 8001ba8: 681b ldr r3, [r3, #0] - 8001baa: 615a str r2, [r3, #20] - - /* Write the result value into the MII Address register */ - heth->Instance->MACMIIAR = tmpreg1; - 8001bac: 68fb ldr r3, [r7, #12] - 8001bae: 681b ldr r3, [r3, #0] - 8001bb0: 697a ldr r2, [r7, #20] - 8001bb2: 611a str r2, [r3, #16] - - /* Get tick */ - tickstart = HAL_GetTick(); - 8001bb4: f7ff fad6 bl 8001164 - 8001bb8: 6138 str r0, [r7, #16] - - /* Check for the Busy flag */ - while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) - 8001bba: e015 b.n 8001be8 - { - /* Check for the Timeout */ - if ((HAL_GetTick() - tickstart) > PHY_WRITE_TO) - 8001bbc: f7ff fad2 bl 8001164 - 8001bc0: 4602 mov r2, r0 - 8001bc2: 693b ldr r3, [r7, #16] - 8001bc4: 1ad3 subs r3, r2, r3 - 8001bc6: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 8001bca: d309 bcc.n 8001be0 - { - heth->State = HAL_ETH_STATE_READY; - 8001bcc: 68fb ldr r3, [r7, #12] - 8001bce: 2201 movs r2, #1 - 8001bd0: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001bd4: 68fb ldr r3, [r7, #12] - 8001bd6: 2200 movs r2, #0 - 8001bd8: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - return HAL_TIMEOUT; - 8001bdc: 2303 movs r3, #3 - 8001bde: e00d b.n 8001bfc - } - - tmpreg1 = heth->Instance->MACMIIAR; - 8001be0: 68fb ldr r3, [r7, #12] - 8001be2: 681b ldr r3, [r3, #0] - 8001be4: 691b ldr r3, [r3, #16] - 8001be6: 617b str r3, [r7, #20] - while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) - 8001be8: 697b ldr r3, [r7, #20] - 8001bea: f003 0301 and.w r3, r3, #1 - 8001bee: 2b00 cmp r3, #0 - 8001bf0: d1e4 bne.n 8001bbc - } - - /* Set ETH HAL State to READY */ - heth->State = HAL_ETH_STATE_READY; - 8001bf2: 68fb ldr r3, [r7, #12] - 8001bf4: 2201 movs r2, #1 - 8001bf6: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Return function status */ - return HAL_OK; - 8001bfa: 2300 movs r3, #0 -} - 8001bfc: 4618 mov r0, r3 - 8001bfe: 3718 adds r7, #24 - 8001c00: 46bd mov sp, r7 - 8001c02: bd80 pop {r7, pc} - -08001c04 : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth) -{ - 8001c04: b580 push {r7, lr} - 8001c06: b082 sub sp, #8 - 8001c08: af00 add r7, sp, #0 - 8001c0a: 6078 str r0, [r7, #4] - /* Process Locked */ - __HAL_LOCK(heth); - 8001c0c: 687b ldr r3, [r7, #4] - 8001c0e: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 8001c12: 2b01 cmp r3, #1 - 8001c14: d101 bne.n 8001c1a - 8001c16: 2302 movs r3, #2 - 8001c18: e01f b.n 8001c5a - 8001c1a: 687b ldr r3, [r7, #4] - 8001c1c: 2201 movs r2, #1 - 8001c1e: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - 8001c22: 687b ldr r3, [r7, #4] - 8001c24: 2202 movs r2, #2 - 8001c26: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Enable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionEnable(heth); - 8001c2a: 6878 ldr r0, [r7, #4] - 8001c2c: f000 fb3e bl 80022ac - - /* Enable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionEnable(heth); - 8001c30: 6878 ldr r0, [r7, #4] - 8001c32: f000 fb75 bl 8002320 - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO(heth); - 8001c36: 6878 ldr r0, [r7, #4] - 8001c38: f000 fc00 bl 800243c - - /* Start DMA transmission */ - ETH_DMATransmissionEnable(heth); - 8001c3c: 6878 ldr r0, [r7, #4] - 8001c3e: f000 fba9 bl 8002394 - - /* Start DMA reception */ - ETH_DMAReceptionEnable(heth); - 8001c42: 6878 ldr r0, [r7, #4] - 8001c44: f000 fbd0 bl 80023e8 - - /* Set the ETH state to READY*/ - heth->State = HAL_ETH_STATE_READY; - 8001c48: 687b ldr r3, [r7, #4] - 8001c4a: 2201 movs r2, #1 - 8001c4c: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001c50: 687b ldr r3, [r7, #4] - 8001c52: 2200 movs r2, #0 - 8001c54: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Return function status */ - return HAL_OK; - 8001c58: 2300 movs r3, #0 -} - 8001c5a: 4618 mov r0, r3 - 8001c5c: 3708 adds r7, #8 - 8001c5e: 46bd mov sp, r7 - 8001c60: bd80 pop {r7, pc} - -08001c62 : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) -{ - 8001c62: b580 push {r7, lr} - 8001c64: b082 sub sp, #8 - 8001c66: af00 add r7, sp, #0 - 8001c68: 6078 str r0, [r7, #4] - /* Process Locked */ - __HAL_LOCK(heth); - 8001c6a: 687b ldr r3, [r7, #4] - 8001c6c: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 8001c70: 2b01 cmp r3, #1 - 8001c72: d101 bne.n 8001c78 - 8001c74: 2302 movs r3, #2 - 8001c76: e01f b.n 8001cb8 - 8001c78: 687b ldr r3, [r7, #4] - 8001c7a: 2201 movs r2, #1 - 8001c7c: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - 8001c80: 687b ldr r3, [r7, #4] - 8001c82: 2202 movs r2, #2 - 8001c84: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Stop DMA transmission */ - ETH_DMATransmissionDisable(heth); - 8001c88: 6878 ldr r0, [r7, #4] - 8001c8a: f000 fb98 bl 80023be - - /* Stop DMA reception */ - ETH_DMAReceptionDisable(heth); - 8001c8e: 6878 ldr r0, [r7, #4] - 8001c90: f000 fbbf bl 8002412 - - /* Disable receive state machine of the MAC for reception from the MII */ - ETH_MACReceptionDisable(heth); - 8001c94: 6878 ldr r0, [r7, #4] - 8001c96: f000 fb60 bl 800235a - - /* Flush Transmit FIFO */ - ETH_FlushTransmitFIFO(heth); - 8001c9a: 6878 ldr r0, [r7, #4] - 8001c9c: f000 fbce bl 800243c - - /* Disable transmit state machine of the MAC for transmission on the MII */ - ETH_MACTransmissionDisable(heth); - 8001ca0: 6878 ldr r0, [r7, #4] - 8001ca2: f000 fb20 bl 80022e6 - - /* Set the ETH state*/ - heth->State = HAL_ETH_STATE_READY; - 8001ca6: 687b ldr r3, [r7, #4] - 8001ca8: 2201 movs r2, #1 - 8001caa: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001cae: 687b ldr r3, [r7, #4] - 8001cb0: 2200 movs r2, #0 - 8001cb2: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Return function status */ - return HAL_OK; - 8001cb6: 2300 movs r3, #0 -} - 8001cb8: 4618 mov r0, r3 - 8001cba: 3708 adds r7, #8 - 8001cbc: 46bd mov sp, r7 - 8001cbe: bd80 pop {r7, pc} - -08001cc0 : - * the configuration information for ETHERNET module - * @param macconf MAC Configuration structure - * @retval HAL status - */ -HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf) -{ - 8001cc0: b580 push {r7, lr} - 8001cc2: b084 sub sp, #16 - 8001cc4: af00 add r7, sp, #0 - 8001cc6: 6078 str r0, [r7, #4] - 8001cc8: 6039 str r1, [r7, #0] - uint32_t tmpreg1 = 0U; - 8001cca: 2300 movs r3, #0 - 8001ccc: 60fb str r3, [r7, #12] - - /* Process Locked */ - __HAL_LOCK(heth); - 8001cce: 687b ldr r3, [r7, #4] - 8001cd0: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 8001cd4: 2b01 cmp r3, #1 - 8001cd6: d101 bne.n 8001cdc - 8001cd8: 2302 movs r3, #2 - 8001cda: e0e4 b.n 8001ea6 - 8001cdc: 687b ldr r3, [r7, #4] - 8001cde: 2201 movs r2, #1 - 8001ce0: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Set the ETH peripheral state to BUSY */ - heth->State = HAL_ETH_STATE_BUSY; - 8001ce4: 687b ldr r3, [r7, #4] - 8001ce6: 2202 movs r2, #2 - 8001ce8: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - assert_param(IS_ETH_SPEED(heth->Init.Speed)); - assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); - - if (macconf != NULL) - 8001cec: 683b ldr r3, [r7, #0] - 8001cee: 2b00 cmp r3, #0 - 8001cf0: f000 80b1 beq.w 8001e56 - assert_param(IS_ETH_VLAN_TAG_COMPARISON(macconf->VLANTagComparison)); - assert_param(IS_ETH_VLAN_TAG_IDENTIFIER(macconf->VLANTagIdentifier)); - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg1 = (heth->Instance)->MACCR; - 8001cf4: 687b ldr r3, [r7, #4] - 8001cf6: 681b ldr r3, [r3, #0] - 8001cf8: 681b ldr r3, [r3, #0] - 8001cfa: 60fb str r3, [r7, #12] - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg1 &= ETH_MACCR_CLEAR_MASK; - 8001cfc: 68fa ldr r2, [r7, #12] - 8001cfe: 4b6c ldr r3, [pc, #432] ; (8001eb0 ) - 8001d00: 4013 ands r3, r2 - 8001d02: 60fb str r3, [r7, #12] - - tmpreg1 |= (uint32_t)(macconf->Watchdog | - 8001d04: 683b ldr r3, [r7, #0] - 8001d06: 681a ldr r2, [r3, #0] - macconf->Jabber | - 8001d08: 683b ldr r3, [r7, #0] - 8001d0a: 685b ldr r3, [r3, #4] - tmpreg1 |= (uint32_t)(macconf->Watchdog | - 8001d0c: 431a orrs r2, r3 - macconf->InterFrameGap | - 8001d0e: 683b ldr r3, [r7, #0] - 8001d10: 689b ldr r3, [r3, #8] - macconf->Jabber | - 8001d12: 431a orrs r2, r3 - macconf->CarrierSense | - 8001d14: 683b ldr r3, [r7, #0] - 8001d16: 68db ldr r3, [r3, #12] - macconf->InterFrameGap | - 8001d18: 431a orrs r2, r3 - (heth->Init).Speed | - 8001d1a: 687b ldr r3, [r7, #4] - 8001d1c: 689b ldr r3, [r3, #8] - macconf->CarrierSense | - 8001d1e: 431a orrs r2, r3 - macconf->ReceiveOwn | - 8001d20: 683b ldr r3, [r7, #0] - 8001d22: 691b ldr r3, [r3, #16] - (heth->Init).Speed | - 8001d24: 431a orrs r2, r3 - macconf->LoopbackMode | - 8001d26: 683b ldr r3, [r7, #0] - 8001d28: 695b ldr r3, [r3, #20] - macconf->ReceiveOwn | - 8001d2a: 431a orrs r2, r3 - (heth->Init).DuplexMode | - 8001d2c: 687b ldr r3, [r7, #4] - 8001d2e: 68db ldr r3, [r3, #12] - macconf->LoopbackMode | - 8001d30: 431a orrs r2, r3 - macconf->ChecksumOffload | - 8001d32: 683b ldr r3, [r7, #0] - 8001d34: 699b ldr r3, [r3, #24] - (heth->Init).DuplexMode | - 8001d36: 431a orrs r2, r3 - macconf->RetryTransmission | - 8001d38: 683b ldr r3, [r7, #0] - 8001d3a: 69db ldr r3, [r3, #28] - macconf->ChecksumOffload | - 8001d3c: 431a orrs r2, r3 - macconf->AutomaticPadCRCStrip | - 8001d3e: 683b ldr r3, [r7, #0] - 8001d40: 6a1b ldr r3, [r3, #32] - macconf->RetryTransmission | - 8001d42: 431a orrs r2, r3 - macconf->BackOffLimit | - 8001d44: 683b ldr r3, [r7, #0] - 8001d46: 6a5b ldr r3, [r3, #36] ; 0x24 - macconf->AutomaticPadCRCStrip | - 8001d48: 431a orrs r2, r3 - macconf->DeferralCheck); - 8001d4a: 683b ldr r3, [r7, #0] - 8001d4c: 6a9b ldr r3, [r3, #40] ; 0x28 - macconf->BackOffLimit | - 8001d4e: 4313 orrs r3, r2 - tmpreg1 |= (uint32_t)(macconf->Watchdog | - 8001d50: 68fa ldr r2, [r7, #12] - 8001d52: 4313 orrs r3, r2 - 8001d54: 60fb str r3, [r7, #12] - - /* Write to ETHERNET MACCR */ - (heth->Instance)->MACCR = (uint32_t)tmpreg1; - 8001d56: 687b ldr r3, [r7, #4] - 8001d58: 681b ldr r3, [r3, #0] - 8001d5a: 68fa ldr r2, [r7, #12] - 8001d5c: 601a str r2, [r3, #0] - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACCR; - 8001d5e: 687b ldr r3, [r7, #4] - 8001d60: 681b ldr r3, [r3, #0] - 8001d62: 681b ldr r3, [r3, #0] - 8001d64: 60fb str r3, [r7, #12] - HAL_Delay(ETH_REG_WRITE_DELAY); - 8001d66: 2001 movs r0, #1 - 8001d68: f7ff fa06 bl 8001178 - (heth->Instance)->MACCR = tmpreg1; - 8001d6c: 687b ldr r3, [r7, #4] - 8001d6e: 681b ldr r3, [r3, #0] - 8001d70: 68fa ldr r2, [r7, #12] - 8001d72: 601a str r2, [r3, #0] - - /*----------------------- ETHERNET MACFFR Configuration --------------------*/ - /* Write to ETHERNET MACFFR */ - (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | - 8001d74: 683b ldr r3, [r7, #0] - 8001d76: 6ada ldr r2, [r3, #44] ; 0x2c - macconf->SourceAddrFilter | - 8001d78: 683b ldr r3, [r7, #0] - 8001d7a: 6b1b ldr r3, [r3, #48] ; 0x30 - (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | - 8001d7c: 431a orrs r2, r3 - macconf->PassControlFrames | - 8001d7e: 683b ldr r3, [r7, #0] - 8001d80: 6b5b ldr r3, [r3, #52] ; 0x34 - macconf->SourceAddrFilter | - 8001d82: 431a orrs r2, r3 - macconf->BroadcastFramesReception | - 8001d84: 683b ldr r3, [r7, #0] - 8001d86: 6b9b ldr r3, [r3, #56] ; 0x38 - macconf->PassControlFrames | - 8001d88: 431a orrs r2, r3 - macconf->DestinationAddrFilter | - 8001d8a: 683b ldr r3, [r7, #0] - 8001d8c: 6bdb ldr r3, [r3, #60] ; 0x3c - macconf->BroadcastFramesReception | - 8001d8e: 431a orrs r2, r3 - macconf->PromiscuousMode | - 8001d90: 683b ldr r3, [r7, #0] - 8001d92: 6c1b ldr r3, [r3, #64] ; 0x40 - macconf->DestinationAddrFilter | - 8001d94: 431a orrs r2, r3 - macconf->MulticastFramesFilter | - 8001d96: 683b ldr r3, [r7, #0] - 8001d98: 6c5b ldr r3, [r3, #68] ; 0x44 - macconf->PromiscuousMode | - 8001d9a: ea42 0103 orr.w r1, r2, r3 - macconf->UnicastFramesFilter); - 8001d9e: 683b ldr r3, [r7, #0] - 8001da0: 6c9a ldr r2, [r3, #72] ; 0x48 - (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | - 8001da2: 687b ldr r3, [r7, #4] - 8001da4: 681b ldr r3, [r3, #0] - macconf->MulticastFramesFilter | - 8001da6: 430a orrs r2, r1 - (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | - 8001da8: 605a str r2, [r3, #4] - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACFFR; - 8001daa: 687b ldr r3, [r7, #4] - 8001dac: 681b ldr r3, [r3, #0] - 8001dae: 685b ldr r3, [r3, #4] - 8001db0: 60fb str r3, [r7, #12] - HAL_Delay(ETH_REG_WRITE_DELAY); - 8001db2: 2001 movs r0, #1 - 8001db4: f7ff f9e0 bl 8001178 - (heth->Instance)->MACFFR = tmpreg1; - 8001db8: 687b ldr r3, [r7, #4] - 8001dba: 681b ldr r3, [r3, #0] - 8001dbc: 68fa ldr r2, [r7, #12] - 8001dbe: 605a str r2, [r3, #4] - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ - /* Write to ETHERNET MACHTHR */ - (heth->Instance)->MACHTHR = (uint32_t)macconf->HashTableHigh; - 8001dc0: 687b ldr r3, [r7, #4] - 8001dc2: 681b ldr r3, [r3, #0] - 8001dc4: 683a ldr r2, [r7, #0] - 8001dc6: 6cd2 ldr r2, [r2, #76] ; 0x4c - 8001dc8: 609a str r2, [r3, #8] - - /* Write to ETHERNET MACHTLR */ - (heth->Instance)->MACHTLR = (uint32_t)macconf->HashTableLow; - 8001dca: 687b ldr r3, [r7, #4] - 8001dcc: 681b ldr r3, [r3, #0] - 8001dce: 683a ldr r2, [r7, #0] - 8001dd0: 6d12 ldr r2, [r2, #80] ; 0x50 - 8001dd2: 60da str r2, [r3, #12] - /*----------------------- ETHERNET MACFCR Configuration --------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg1 = (heth->Instance)->MACFCR; - 8001dd4: 687b ldr r3, [r7, #4] - 8001dd6: 681b ldr r3, [r3, #0] - 8001dd8: 699b ldr r3, [r3, #24] - 8001dda: 60fb str r3, [r7, #12] - /* Clear xx bits */ - tmpreg1 &= ETH_MACFCR_CLEAR_MASK; - 8001ddc: 68fa ldr r2, [r7, #12] - 8001dde: f64f 7341 movw r3, #65345 ; 0xff41 - 8001de2: 4013 ands r3, r2 - 8001de4: 60fb str r3, [r7, #12] - - tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) | - 8001de6: 683b ldr r3, [r7, #0] - 8001de8: 6d5b ldr r3, [r3, #84] ; 0x54 - 8001dea: 041a lsls r2, r3, #16 - macconf->ZeroQuantaPause | - 8001dec: 683b ldr r3, [r7, #0] - 8001dee: 6d9b ldr r3, [r3, #88] ; 0x58 - tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) | - 8001df0: 431a orrs r2, r3 - macconf->PauseLowThreshold | - 8001df2: 683b ldr r3, [r7, #0] - 8001df4: 6ddb ldr r3, [r3, #92] ; 0x5c - macconf->ZeroQuantaPause | - 8001df6: 431a orrs r2, r3 - macconf->UnicastPauseFrameDetect | - 8001df8: 683b ldr r3, [r7, #0] - 8001dfa: 6e1b ldr r3, [r3, #96] ; 0x60 - macconf->PauseLowThreshold | - 8001dfc: 431a orrs r2, r3 - macconf->ReceiveFlowControl | - 8001dfe: 683b ldr r3, [r7, #0] - 8001e00: 6e5b ldr r3, [r3, #100] ; 0x64 - macconf->UnicastPauseFrameDetect | - 8001e02: 431a orrs r2, r3 - macconf->TransmitFlowControl); - 8001e04: 683b ldr r3, [r7, #0] - 8001e06: 6e9b ldr r3, [r3, #104] ; 0x68 - macconf->ReceiveFlowControl | - 8001e08: 4313 orrs r3, r2 - tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) | - 8001e0a: 68fa ldr r2, [r7, #12] - 8001e0c: 4313 orrs r3, r2 - 8001e0e: 60fb str r3, [r7, #12] - - /* Write to ETHERNET MACFCR */ - (heth->Instance)->MACFCR = (uint32_t)tmpreg1; - 8001e10: 687b ldr r3, [r7, #4] - 8001e12: 681b ldr r3, [r3, #0] - 8001e14: 68fa ldr r2, [r7, #12] - 8001e16: 619a str r2, [r3, #24] - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACFCR; - 8001e18: 687b ldr r3, [r7, #4] - 8001e1a: 681b ldr r3, [r3, #0] - 8001e1c: 699b ldr r3, [r3, #24] - 8001e1e: 60fb str r3, [r7, #12] - HAL_Delay(ETH_REG_WRITE_DELAY); - 8001e20: 2001 movs r0, #1 - 8001e22: f7ff f9a9 bl 8001178 - (heth->Instance)->MACFCR = tmpreg1; - 8001e26: 687b ldr r3, [r7, #4] - 8001e28: 681b ldr r3, [r3, #0] - 8001e2a: 68fa ldr r2, [r7, #12] - 8001e2c: 619a str r2, [r3, #24] - - /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ - (heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | - 8001e2e: 683b ldr r3, [r7, #0] - 8001e30: 6ed9 ldr r1, [r3, #108] ; 0x6c - macconf->VLANTagIdentifier); - 8001e32: 683b ldr r3, [r7, #0] - 8001e34: 6f1a ldr r2, [r3, #112] ; 0x70 - (heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | - 8001e36: 687b ldr r3, [r7, #4] - 8001e38: 681b ldr r3, [r3, #0] - 8001e3a: 430a orrs r2, r1 - 8001e3c: 61da str r2, [r3, #28] - - /* Wait until the write operation will be taken into account : - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACVLANTR; - 8001e3e: 687b ldr r3, [r7, #4] - 8001e40: 681b ldr r3, [r3, #0] - 8001e42: 69db ldr r3, [r3, #28] - 8001e44: 60fb str r3, [r7, #12] - HAL_Delay(ETH_REG_WRITE_DELAY); - 8001e46: 2001 movs r0, #1 - 8001e48: f7ff f996 bl 8001178 - (heth->Instance)->MACVLANTR = tmpreg1; - 8001e4c: 687b ldr r3, [r7, #4] - 8001e4e: 681b ldr r3, [r3, #0] - 8001e50: 68fa ldr r2, [r7, #12] - 8001e52: 61da str r2, [r3, #28] - 8001e54: e01e b.n 8001e94 - } - else /* macconf == NULL : here we just configure Speed and Duplex mode */ - { - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg1 = (heth->Instance)->MACCR; - 8001e56: 687b ldr r3, [r7, #4] - 8001e58: 681b ldr r3, [r3, #0] - 8001e5a: 681b ldr r3, [r3, #0] - 8001e5c: 60fb str r3, [r7, #12] - - /* Clear FES and DM bits */ - tmpreg1 &= ~(0x00004800U); - 8001e5e: 68fb ldr r3, [r7, #12] - 8001e60: f423 4390 bic.w r3, r3, #18432 ; 0x4800 - 8001e64: 60fb str r3, [r7, #12] - - tmpreg1 |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode); - 8001e66: 687b ldr r3, [r7, #4] - 8001e68: 689a ldr r2, [r3, #8] - 8001e6a: 687b ldr r3, [r7, #4] - 8001e6c: 68db ldr r3, [r3, #12] - 8001e6e: 4313 orrs r3, r2 - 8001e70: 68fa ldr r2, [r7, #12] - 8001e72: 4313 orrs r3, r2 - 8001e74: 60fb str r3, [r7, #12] - - /* Write to ETHERNET MACCR */ - (heth->Instance)->MACCR = (uint32_t)tmpreg1; - 8001e76: 687b ldr r3, [r7, #4] - 8001e78: 681b ldr r3, [r3, #0] - 8001e7a: 68fa ldr r2, [r7, #12] - 8001e7c: 601a str r2, [r3, #0] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACCR; - 8001e7e: 687b ldr r3, [r7, #4] - 8001e80: 681b ldr r3, [r3, #0] - 8001e82: 681b ldr r3, [r3, #0] - 8001e84: 60fb str r3, [r7, #12] - HAL_Delay(ETH_REG_WRITE_DELAY); - 8001e86: 2001 movs r0, #1 - 8001e88: f7ff f976 bl 8001178 - (heth->Instance)->MACCR = tmpreg1; - 8001e8c: 687b ldr r3, [r7, #4] - 8001e8e: 681b ldr r3, [r3, #0] - 8001e90: 68fa ldr r2, [r7, #12] - 8001e92: 601a str r2, [r3, #0] - } - - /* Set the ETH state to Ready */ - heth->State = HAL_ETH_STATE_READY; - 8001e94: 687b ldr r3, [r7, #4] - 8001e96: 2201 movs r2, #1 - 8001e98: f883 2044 strb.w r2, [r3, #68] ; 0x44 - - /* Process Unlocked */ - __HAL_UNLOCK(heth); - 8001e9c: 687b ldr r3, [r7, #4] - 8001e9e: 2200 movs r2, #0 - 8001ea0: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Return function status */ - return HAL_OK; - 8001ea4: 2300 movs r3, #0 -} - 8001ea6: 4618 mov r0, r3 - 8001ea8: 3710 adds r7, #16 - 8001eaa: 46bd mov sp, r7 - 8001eac: bd80 pop {r7, pc} - 8001eae: bf00 nop - 8001eb0: ff20810f .word 0xff20810f - -08001eb4 : - * the configuration information for ETHERNET module - * @param err Ethernet Init error - * @retval HAL status - */ -static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err) -{ - 8001eb4: b580 push {r7, lr} - 8001eb6: b0b0 sub sp, #192 ; 0xc0 - 8001eb8: af00 add r7, sp, #0 - 8001eba: 6078 str r0, [r7, #4] - 8001ebc: 6039 str r1, [r7, #0] - ETH_MACInitTypeDef macinit; - ETH_DMAInitTypeDef dmainit; - uint32_t tmpreg1 = 0U; - 8001ebe: 2300 movs r3, #0 - 8001ec0: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - - if (err != ETH_SUCCESS) /* Auto-negotiation failed */ - 8001ec4: 683b ldr r3, [r7, #0] - 8001ec6: 2b00 cmp r3, #0 - 8001ec8: d007 beq.n 8001eda - { - /* Set Ethernet duplex mode to Full-duplex */ - (heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX; - 8001eca: 687b ldr r3, [r7, #4] - 8001ecc: f44f 6200 mov.w r2, #2048 ; 0x800 - 8001ed0: 60da str r2, [r3, #12] - - /* Set Ethernet speed to 100M */ - (heth->Init).Speed = ETH_SPEED_100M; - 8001ed2: 687b ldr r3, [r7, #4] - 8001ed4: f44f 4280 mov.w r2, #16384 ; 0x4000 - 8001ed8: 609a str r2, [r3, #8] - } - - /* Ethernet MAC default initialization **************************************/ - macinit.Watchdog = ETH_WATCHDOG_ENABLE; - 8001eda: 2300 movs r3, #0 - 8001edc: 64bb str r3, [r7, #72] ; 0x48 - macinit.Jabber = ETH_JABBER_ENABLE; - 8001ede: 2300 movs r3, #0 - 8001ee0: 64fb str r3, [r7, #76] ; 0x4c - macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT; - 8001ee2: 2300 movs r3, #0 - 8001ee4: 653b str r3, [r7, #80] ; 0x50 - macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE; - 8001ee6: 2300 movs r3, #0 - 8001ee8: 657b str r3, [r7, #84] ; 0x54 - macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE; - 8001eea: 2300 movs r3, #0 - 8001eec: 65bb str r3, [r7, #88] ; 0x58 - macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE; - 8001eee: 2300 movs r3, #0 - 8001ef0: 65fb str r3, [r7, #92] ; 0x5c - if (heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) - 8001ef2: 687b ldr r3, [r7, #4] - 8001ef4: 69db ldr r3, [r3, #28] - 8001ef6: 2b00 cmp r3, #0 - 8001ef8: d103 bne.n 8001f02 - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE; - 8001efa: f44f 6380 mov.w r3, #1024 ; 0x400 - 8001efe: 663b str r3, [r7, #96] ; 0x60 - 8001f00: e001 b.n 8001f06 - } - else - { - macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE; - 8001f02: 2300 movs r3, #0 - 8001f04: 663b str r3, [r7, #96] ; 0x60 - } - macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE; - 8001f06: f44f 7300 mov.w r3, #512 ; 0x200 - 8001f0a: 667b str r3, [r7, #100] ; 0x64 - macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE; - 8001f0c: 2300 movs r3, #0 - 8001f0e: 66bb str r3, [r7, #104] ; 0x68 - macinit.BackOffLimit = ETH_BACKOFFLIMIT_10; - 8001f10: 2300 movs r3, #0 - 8001f12: 66fb str r3, [r7, #108] ; 0x6c - macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE; - 8001f14: 2300 movs r3, #0 - 8001f16: 673b str r3, [r7, #112] ; 0x70 - macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE; - 8001f18: 2300 movs r3, #0 - 8001f1a: 677b str r3, [r7, #116] ; 0x74 - macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE; - 8001f1c: 2300 movs r3, #0 - 8001f1e: 67bb str r3, [r7, #120] ; 0x78 - macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL; - 8001f20: 2340 movs r3, #64 ; 0x40 - 8001f22: 67fb str r3, [r7, #124] ; 0x7c - macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE; - 8001f24: 2300 movs r3, #0 - 8001f26: f8c7 3080 str.w r3, [r7, #128] ; 0x80 - macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL; - 8001f2a: 2300 movs r3, #0 - 8001f2c: f8c7 3084 str.w r3, [r7, #132] ; 0x84 - macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE; - 8001f30: 2300 movs r3, #0 - 8001f32: f8c7 3088 str.w r3, [r7, #136] ; 0x88 - macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT; - 8001f36: 2300 movs r3, #0 - 8001f38: f8c7 308c str.w r3, [r7, #140] ; 0x8c - macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT; - 8001f3c: 2300 movs r3, #0 - 8001f3e: f8c7 3090 str.w r3, [r7, #144] ; 0x90 - macinit.HashTableHigh = 0x0U; - 8001f42: 2300 movs r3, #0 - 8001f44: f8c7 3094 str.w r3, [r7, #148] ; 0x94 - macinit.HashTableLow = 0x0U; - 8001f48: 2300 movs r3, #0 - 8001f4a: f8c7 3098 str.w r3, [r7, #152] ; 0x98 - macinit.PauseTime = 0x0U; - 8001f4e: 2300 movs r3, #0 - 8001f50: f8c7 309c str.w r3, [r7, #156] ; 0x9c - macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE; - 8001f54: 2380 movs r3, #128 ; 0x80 - 8001f56: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0 - macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4; - 8001f5a: 2300 movs r3, #0 - 8001f5c: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4 - macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE; - 8001f60: 2300 movs r3, #0 - 8001f62: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8 - macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE; - 8001f66: 2300 movs r3, #0 - 8001f68: f8c7 30ac str.w r3, [r7, #172] ; 0xac - macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE; - 8001f6c: 2300 movs r3, #0 - 8001f6e: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0 - macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT; - 8001f72: 2300 movs r3, #0 - 8001f74: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4 - macinit.VLANTagIdentifier = 0x0U; - 8001f78: 2300 movs r3, #0 - 8001f7a: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8 - - /*------------------------ ETHERNET MACCR Configuration --------------------*/ - /* Get the ETHERNET MACCR value */ - tmpreg1 = (heth->Instance)->MACCR; - 8001f7e: 687b ldr r3, [r7, #4] - 8001f80: 681b ldr r3, [r3, #0] - 8001f82: 681b ldr r3, [r3, #0] - 8001f84: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - /* Clear WD, PCE, PS, TE and RE bits */ - tmpreg1 &= ETH_MACCR_CLEAR_MASK; - 8001f88: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8001f8c: 4baa ldr r3, [pc, #680] ; (8002238 ) - 8001f8e: 4013 ands r3, r2 - 8001f90: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - /* Set the IPCO bit according to ETH ChecksumOffload value */ - /* Set the DR bit according to ETH RetryTransmission value */ - /* Set the ACS bit according to ETH AutomaticPadCRCStrip value */ - /* Set the BL bit according to ETH BackOffLimit value */ - /* Set the DC bit according to ETH DeferralCheck value */ - tmpreg1 |= (uint32_t)(macinit.Watchdog | - 8001f94: 6cba ldr r2, [r7, #72] ; 0x48 - macinit.Jabber | - 8001f96: 6cfb ldr r3, [r7, #76] ; 0x4c - tmpreg1 |= (uint32_t)(macinit.Watchdog | - 8001f98: 431a orrs r2, r3 - macinit.InterFrameGap | - 8001f9a: 6d3b ldr r3, [r7, #80] ; 0x50 - macinit.Jabber | - 8001f9c: 431a orrs r2, r3 - macinit.CarrierSense | - 8001f9e: 6d7b ldr r3, [r7, #84] ; 0x54 - macinit.InterFrameGap | - 8001fa0: 431a orrs r2, r3 - (heth->Init).Speed | - 8001fa2: 687b ldr r3, [r7, #4] - 8001fa4: 689b ldr r3, [r3, #8] - macinit.CarrierSense | - 8001fa6: 431a orrs r2, r3 - macinit.ReceiveOwn | - 8001fa8: 6dbb ldr r3, [r7, #88] ; 0x58 - (heth->Init).Speed | - 8001faa: 431a orrs r2, r3 - macinit.LoopbackMode | - 8001fac: 6dfb ldr r3, [r7, #92] ; 0x5c - macinit.ReceiveOwn | - 8001fae: 431a orrs r2, r3 - (heth->Init).DuplexMode | - 8001fb0: 687b ldr r3, [r7, #4] - 8001fb2: 68db ldr r3, [r3, #12] - macinit.LoopbackMode | - 8001fb4: 431a orrs r2, r3 - macinit.ChecksumOffload | - 8001fb6: 6e3b ldr r3, [r7, #96] ; 0x60 - (heth->Init).DuplexMode | - 8001fb8: 431a orrs r2, r3 - macinit.RetryTransmission | - 8001fba: 6e7b ldr r3, [r7, #100] ; 0x64 - macinit.ChecksumOffload | - 8001fbc: 431a orrs r2, r3 - macinit.AutomaticPadCRCStrip | - 8001fbe: 6ebb ldr r3, [r7, #104] ; 0x68 - macinit.RetryTransmission | - 8001fc0: 431a orrs r2, r3 - macinit.BackOffLimit | - 8001fc2: 6efb ldr r3, [r7, #108] ; 0x6c - macinit.AutomaticPadCRCStrip | - 8001fc4: 431a orrs r2, r3 - macinit.DeferralCheck); - 8001fc6: 6f3b ldr r3, [r7, #112] ; 0x70 - macinit.BackOffLimit | - 8001fc8: 4313 orrs r3, r2 - tmpreg1 |= (uint32_t)(macinit.Watchdog | - 8001fca: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8001fce: 4313 orrs r3, r2 - 8001fd0: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - - /* Write to ETHERNET MACCR */ - (heth->Instance)->MACCR = (uint32_t)tmpreg1; - 8001fd4: 687b ldr r3, [r7, #4] - 8001fd6: 681b ldr r3, [r3, #0] - 8001fd8: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8001fdc: 601a str r2, [r3, #0] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACCR; - 8001fde: 687b ldr r3, [r7, #4] - 8001fe0: 681b ldr r3, [r3, #0] - 8001fe2: 681b ldr r3, [r3, #0] - 8001fe4: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - HAL_Delay(ETH_REG_WRITE_DELAY); - 8001fe8: 2001 movs r0, #1 - 8001fea: f7ff f8c5 bl 8001178 - (heth->Instance)->MACCR = tmpreg1; - 8001fee: 687b ldr r3, [r7, #4] - 8001ff0: 681b ldr r3, [r3, #0] - 8001ff2: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8001ff6: 601a str r2, [r3, #0] - /* Set the DAIF bit according to ETH DestinationAddrFilter value */ - /* Set the PR bit according to ETH PromiscuousMode value */ - /* Set the PM, HMC and HPF bits according to ETH MulticastFramesFilter value */ - /* Set the HUC and HPF bits according to ETH UnicastFramesFilter value */ - /* Write to ETHERNET MACFFR */ - (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | - 8001ff8: 6f7a ldr r2, [r7, #116] ; 0x74 - macinit.SourceAddrFilter | - 8001ffa: 6fbb ldr r3, [r7, #120] ; 0x78 - (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | - 8001ffc: 431a orrs r2, r3 - macinit.PassControlFrames | - 8001ffe: 6ffb ldr r3, [r7, #124] ; 0x7c - macinit.SourceAddrFilter | - 8002000: 431a orrs r2, r3 - macinit.BroadcastFramesReception | - 8002002: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 - macinit.PassControlFrames | - 8002006: 431a orrs r2, r3 - macinit.DestinationAddrFilter | - 8002008: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 - macinit.BroadcastFramesReception | - 800200c: 431a orrs r2, r3 - macinit.PromiscuousMode | - 800200e: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88 - macinit.DestinationAddrFilter | - 8002012: 431a orrs r2, r3 - macinit.MulticastFramesFilter | - 8002014: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c - macinit.PromiscuousMode | - 8002018: ea42 0103 orr.w r1, r2, r3 - macinit.UnicastFramesFilter); - 800201c: f8d7 2090 ldr.w r2, [r7, #144] ; 0x90 - (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | - 8002020: 687b ldr r3, [r7, #4] - 8002022: 681b ldr r3, [r3, #0] - macinit.MulticastFramesFilter | - 8002024: 430a orrs r2, r1 - (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | - 8002026: 605a str r2, [r3, #4] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACFFR; - 8002028: 687b ldr r3, [r7, #4] - 800202a: 681b ldr r3, [r3, #0] - 800202c: 685b ldr r3, [r3, #4] - 800202e: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - HAL_Delay(ETH_REG_WRITE_DELAY); - 8002032: 2001 movs r0, #1 - 8002034: f7ff f8a0 bl 8001178 - (heth->Instance)->MACFFR = tmpreg1; - 8002038: 687b ldr r3, [r7, #4] - 800203a: 681b ldr r3, [r3, #0] - 800203c: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8002040: 605a str r2, [r3, #4] - - /*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/ - /* Write to ETHERNET MACHTHR */ - (heth->Instance)->MACHTHR = (uint32_t)macinit.HashTableHigh; - 8002042: 687b ldr r3, [r7, #4] - 8002044: 681b ldr r3, [r3, #0] - 8002046: f8d7 2094 ldr.w r2, [r7, #148] ; 0x94 - 800204a: 609a str r2, [r3, #8] - - /* Write to ETHERNET MACHTLR */ - (heth->Instance)->MACHTLR = (uint32_t)macinit.HashTableLow; - 800204c: 687b ldr r3, [r7, #4] - 800204e: 681b ldr r3, [r3, #0] - 8002050: f8d7 2098 ldr.w r2, [r7, #152] ; 0x98 - 8002054: 60da str r2, [r3, #12] - /*----------------------- ETHERNET MACFCR Configuration -------------------*/ - - /* Get the ETHERNET MACFCR value */ - tmpreg1 = (heth->Instance)->MACFCR; - 8002056: 687b ldr r3, [r7, #4] - 8002058: 681b ldr r3, [r3, #0] - 800205a: 699b ldr r3, [r3, #24] - 800205c: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - /* Clear xx bits */ - tmpreg1 &= ETH_MACFCR_CLEAR_MASK; - 8002060: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8002064: f64f 7341 movw r3, #65345 ; 0xff41 - 8002068: 4013 ands r3, r2 - 800206a: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - /* Set the DZPQ bit according to ETH ZeroQuantaPause value */ - /* Set the PLT bit according to ETH PauseLowThreshold value */ - /* Set the UP bit according to ETH UnicastPauseFrameDetect value */ - /* Set the RFE bit according to ETH ReceiveFlowControl value */ - /* Set the TFE bit according to ETH TransmitFlowControl value */ - tmpreg1 |= (uint32_t)((macinit.PauseTime << 16U) | - 800206e: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c - 8002072: 041a lsls r2, r3, #16 - macinit.ZeroQuantaPause | - 8002074: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0 - tmpreg1 |= (uint32_t)((macinit.PauseTime << 16U) | - 8002078: 431a orrs r2, r3 - macinit.PauseLowThreshold | - 800207a: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4 - macinit.ZeroQuantaPause | - 800207e: 431a orrs r2, r3 - macinit.UnicastPauseFrameDetect | - 8002080: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8 - macinit.PauseLowThreshold | - 8002084: 431a orrs r2, r3 - macinit.ReceiveFlowControl | - 8002086: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac - macinit.UnicastPauseFrameDetect | - 800208a: 431a orrs r2, r3 - macinit.TransmitFlowControl); - 800208c: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0 - macinit.ReceiveFlowControl | - 8002090: 4313 orrs r3, r2 - tmpreg1 |= (uint32_t)((macinit.PauseTime << 16U) | - 8002092: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8002096: 4313 orrs r3, r2 - 8002098: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - - /* Write to ETHERNET MACFCR */ - (heth->Instance)->MACFCR = (uint32_t)tmpreg1; - 800209c: 687b ldr r3, [r7, #4] - 800209e: 681b ldr r3, [r3, #0] - 80020a0: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 80020a4: 619a str r2, [r3, #24] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACFCR; - 80020a6: 687b ldr r3, [r7, #4] - 80020a8: 681b ldr r3, [r3, #0] - 80020aa: 699b ldr r3, [r3, #24] - 80020ac: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - HAL_Delay(ETH_REG_WRITE_DELAY); - 80020b0: 2001 movs r0, #1 - 80020b2: f7ff f861 bl 8001178 - (heth->Instance)->MACFCR = tmpreg1; - 80020b6: 687b ldr r3, [r7, #4] - 80020b8: 681b ldr r3, [r3, #0] - 80020ba: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 80020be: 619a str r2, [r3, #24] - - /*----------------------- ETHERNET MACVLANTR Configuration ----------------*/ - /* Set the ETV bit according to ETH VLANTagComparison value */ - /* Set the VL bit according to ETH VLANTagIdentifier value */ - (heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | - 80020c0: f8d7 10b4 ldr.w r1, [r7, #180] ; 0xb4 - macinit.VLANTagIdentifier); - 80020c4: f8d7 20b8 ldr.w r2, [r7, #184] ; 0xb8 - (heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | - 80020c8: 687b ldr r3, [r7, #4] - 80020ca: 681b ldr r3, [r3, #0] - 80020cc: 430a orrs r2, r1 - 80020ce: 61da str r2, [r3, #28] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACVLANTR; - 80020d0: 687b ldr r3, [r7, #4] - 80020d2: 681b ldr r3, [r3, #0] - 80020d4: 69db ldr r3, [r3, #28] - 80020d6: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - HAL_Delay(ETH_REG_WRITE_DELAY); - 80020da: 2001 movs r0, #1 - 80020dc: f7ff f84c bl 8001178 - (heth->Instance)->MACVLANTR = tmpreg1; - 80020e0: 687b ldr r3, [r7, #4] - 80020e2: 681b ldr r3, [r3, #0] - 80020e4: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 80020e8: 61da str r2, [r3, #28] - - /* Ethernet DMA default initialization ************************************/ - dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE; - 80020ea: 2300 movs r3, #0 - 80020ec: 60bb str r3, [r7, #8] - dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE; - 80020ee: f04f 7300 mov.w r3, #33554432 ; 0x2000000 - 80020f2: 60fb str r3, [r7, #12] - dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE; - 80020f4: 2300 movs r3, #0 - 80020f6: 613b str r3, [r7, #16] - dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE; - 80020f8: f44f 1300 mov.w r3, #2097152 ; 0x200000 - 80020fc: 617b str r3, [r7, #20] - dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES; - 80020fe: 2300 movs r3, #0 - 8002100: 61bb str r3, [r7, #24] - dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE; - 8002102: 2300 movs r3, #0 - 8002104: 61fb str r3, [r7, #28] - dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE; - 8002106: 2300 movs r3, #0 - 8002108: 623b str r3, [r7, #32] - dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES; - 800210a: 2300 movs r3, #0 - 800210c: 627b str r3, [r7, #36] ; 0x24 - dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE; - 800210e: 2304 movs r3, #4 - 8002110: 62bb str r3, [r7, #40] ; 0x28 - dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE; - 8002112: f04f 7300 mov.w r3, #33554432 ; 0x2000000 - 8002116: 62fb str r3, [r7, #44] ; 0x2c - dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE; - 8002118: f44f 3380 mov.w r3, #65536 ; 0x10000 - 800211c: 633b str r3, [r7, #48] ; 0x30 - dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; - 800211e: f44f 0380 mov.w r3, #4194304 ; 0x400000 - 8002122: 637b str r3, [r7, #52] ; 0x34 - dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; - 8002124: f44f 5300 mov.w r3, #8192 ; 0x2000 - 8002128: 63bb str r3, [r7, #56] ; 0x38 - dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE; - 800212a: 2380 movs r3, #128 ; 0x80 - 800212c: 63fb str r3, [r7, #60] ; 0x3c - dmainit.DescriptorSkipLength = 0x0U; - 800212e: 2300 movs r3, #0 - 8002130: 643b str r3, [r7, #64] ; 0x40 - dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1; - 8002132: 2300 movs r3, #0 - 8002134: 647b str r3, [r7, #68] ; 0x44 - - /* Get the ETHERNET DMAOMR value */ - tmpreg1 = (heth->Instance)->DMAOMR; - 8002136: 687b ldr r3, [r7, #4] - 8002138: 681b ldr r3, [r3, #0] - 800213a: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 800213e: 699b ldr r3, [r3, #24] - 8002140: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - /* Clear xx bits */ - tmpreg1 &= ETH_DMAOMR_CLEAR_MASK; - 8002144: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8002148: 4b3c ldr r3, [pc, #240] ; (800223c ) - 800214a: 4013 ands r3, r2 - 800214c: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - /* Set the TTC bit according to ETH TransmitThresholdControl value */ - /* Set the FEF bit according to ETH ForwardErrorFrames value */ - /* Set the FUF bit according to ETH ForwardUndersizedGoodFrames value */ - /* Set the RTC bit according to ETH ReceiveThresholdControl value */ - /* Set the OSF bit according to ETH SecondFrameOperate value */ - tmpreg1 |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | - 8002150: 68ba ldr r2, [r7, #8] - dmainit.ReceiveStoreForward | - 8002152: 68fb ldr r3, [r7, #12] - tmpreg1 |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | - 8002154: 431a orrs r2, r3 - dmainit.FlushReceivedFrame | - 8002156: 693b ldr r3, [r7, #16] - dmainit.ReceiveStoreForward | - 8002158: 431a orrs r2, r3 - dmainit.TransmitStoreForward | - 800215a: 697b ldr r3, [r7, #20] - dmainit.FlushReceivedFrame | - 800215c: 431a orrs r2, r3 - dmainit.TransmitThresholdControl | - 800215e: 69bb ldr r3, [r7, #24] - dmainit.TransmitStoreForward | - 8002160: 431a orrs r2, r3 - dmainit.ForwardErrorFrames | - 8002162: 69fb ldr r3, [r7, #28] - dmainit.TransmitThresholdControl | - 8002164: 431a orrs r2, r3 - dmainit.ForwardUndersizedGoodFrames | - 8002166: 6a3b ldr r3, [r7, #32] - dmainit.ForwardErrorFrames | - 8002168: 431a orrs r2, r3 - dmainit.ReceiveThresholdControl | - 800216a: 6a7b ldr r3, [r7, #36] ; 0x24 - dmainit.ForwardUndersizedGoodFrames | - 800216c: 431a orrs r2, r3 - dmainit.SecondFrameOperate); - 800216e: 6abb ldr r3, [r7, #40] ; 0x28 - dmainit.ReceiveThresholdControl | - 8002170: 4313 orrs r3, r2 - tmpreg1 |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | - 8002172: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc - 8002176: 4313 orrs r3, r2 - 8002178: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - - /* Write to ETHERNET DMAOMR */ - (heth->Instance)->DMAOMR = (uint32_t)tmpreg1; - 800217c: 687b ldr r3, [r7, #4] - 800217e: 681b ldr r3, [r3, #0] - 8002180: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8002184: 461a mov r2, r3 - 8002186: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc - 800218a: 6193 str r3, [r2, #24] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->DMAOMR; - 800218c: 687b ldr r3, [r7, #4] - 800218e: 681b ldr r3, [r3, #0] - 8002190: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8002194: 699b ldr r3, [r3, #24] - 8002196: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - HAL_Delay(ETH_REG_WRITE_DELAY); - 800219a: 2001 movs r0, #1 - 800219c: f7fe ffec bl 8001178 - (heth->Instance)->DMAOMR = tmpreg1; - 80021a0: 687b ldr r3, [r7, #4] - 80021a2: 681b ldr r3, [r3, #0] - 80021a4: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 80021a8: 461a mov r2, r3 - 80021aa: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc - 80021ae: 6193 str r3, [r2, #24] - /* Set the RPBL and 4*PBL bits according to ETH RxDMABurstLength value */ - /* Set the PBL and 4*PBL bits according to ETH TxDMABurstLength value */ - /* Set the Enhanced DMA descriptors bit according to ETH EnhancedDescriptorFormat value*/ - /* Set the DSL bit according to ETH DesciptorSkipLength value */ - /* Set the PR and DA bits according to ETH DMAArbitration value */ - (heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | - 80021b0: 6afa ldr r2, [r7, #44] ; 0x2c - dmainit.FixedBurst | - 80021b2: 6b3b ldr r3, [r7, #48] ; 0x30 - (heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | - 80021b4: 431a orrs r2, r3 - dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - 80021b6: 6b7b ldr r3, [r7, #52] ; 0x34 - dmainit.FixedBurst | - 80021b8: 431a orrs r2, r3 - dmainit.TxDMABurstLength | - 80021ba: 6bbb ldr r3, [r7, #56] ; 0x38 - dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ - 80021bc: 431a orrs r2, r3 - dmainit.EnhancedDescriptorFormat | - 80021be: 6bfb ldr r3, [r7, #60] ; 0x3c - dmainit.TxDMABurstLength | - 80021c0: 431a orrs r2, r3 - (dmainit.DescriptorSkipLength << 2U) | - 80021c2: 6c3b ldr r3, [r7, #64] ; 0x40 - 80021c4: 009b lsls r3, r3, #2 - dmainit.EnhancedDescriptorFormat | - 80021c6: 431a orrs r2, r3 - dmainit.DMAArbitration | - 80021c8: 6c7b ldr r3, [r7, #68] ; 0x44 - (dmainit.DescriptorSkipLength << 2U) | - 80021ca: 4313 orrs r3, r2 - (heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | - 80021cc: 687a ldr r2, [r7, #4] - 80021ce: 6812 ldr r2, [r2, #0] - 80021d0: f443 0300 orr.w r3, r3, #8388608 ; 0x800000 - 80021d4: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 80021d8: 6013 str r3, [r2, #0] - ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->DMABMR; - 80021da: 687b ldr r3, [r7, #4] - 80021dc: 681b ldr r3, [r3, #0] - 80021de: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 80021e2: 681b ldr r3, [r3, #0] - 80021e4: f8c7 30bc str.w r3, [r7, #188] ; 0xbc - HAL_Delay(ETH_REG_WRITE_DELAY); - 80021e8: 2001 movs r0, #1 - 80021ea: f7fe ffc5 bl 8001178 - (heth->Instance)->DMABMR = tmpreg1; - 80021ee: 687b ldr r3, [r7, #4] - 80021f0: 681b ldr r3, [r3, #0] - 80021f2: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 80021f6: 461a mov r2, r3 - 80021f8: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc - 80021fc: 6013 str r3, [r2, #0] - - if ((heth->Init).RxMode == ETH_RXINTERRUPT_MODE) - 80021fe: 687b ldr r3, [r7, #4] - 8002200: 699b ldr r3, [r3, #24] - 8002202: 2b01 cmp r3, #1 - 8002204: d10d bne.n 8002222 - { - /* Enable the Ethernet Rx Interrupt */ - __HAL_ETH_DMA_ENABLE_IT((heth), ETH_DMA_IT_NIS | ETH_DMA_IT_R); - 8002206: 687b ldr r3, [r7, #4] - 8002208: 681b ldr r3, [r3, #0] - 800220a: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 800220e: 69db ldr r3, [r3, #28] - 8002210: 687a ldr r2, [r7, #4] - 8002212: 6812 ldr r2, [r2, #0] - 8002214: f443 3380 orr.w r3, r3, #65536 ; 0x10000 - 8002218: f043 0340 orr.w r3, r3, #64 ; 0x40 - 800221c: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 8002220: 61d3 str r3, [r2, #28] - } - - /* Initialize MAC address in ethernet MAC */ - ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr); - 8002222: 687b ldr r3, [r7, #4] - 8002224: 695b ldr r3, [r3, #20] - 8002226: 461a mov r2, r3 - 8002228: 2100 movs r1, #0 - 800222a: 6878 ldr r0, [r7, #4] - 800222c: f000 f808 bl 8002240 -} - 8002230: bf00 nop - 8002232: 37c0 adds r7, #192 ; 0xc0 - 8002234: 46bd mov sp, r7 - 8002236: bd80 pop {r7, pc} - 8002238: ff20810f .word 0xff20810f - 800223c: f8de3f23 .word 0xf8de3f23 - -08002240 : - * @arg ETH_MAC_Address3: MAC Address3 - * @param Addr Pointer to MAC address buffer data (6 bytes) - * @retval HAL status - */ -static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr) -{ - 8002240: b480 push {r7} - 8002242: b087 sub sp, #28 - 8002244: af00 add r7, sp, #0 - 8002246: 60f8 str r0, [r7, #12] - 8002248: 60b9 str r1, [r7, #8] - 800224a: 607a str r2, [r7, #4] - - /* Check the parameters */ - assert_param(IS_ETH_MAC_ADDRESS0123(MacAddr)); - - /* Calculate the selected MAC address high register */ - tmpreg1 = ((uint32_t)Addr[5U] << 8U) | (uint32_t)Addr[4U]; - 800224c: 687b ldr r3, [r7, #4] - 800224e: 3305 adds r3, #5 - 8002250: 781b ldrb r3, [r3, #0] - 8002252: 021b lsls r3, r3, #8 - 8002254: 687a ldr r2, [r7, #4] - 8002256: 3204 adds r2, #4 - 8002258: 7812 ldrb r2, [r2, #0] - 800225a: 4313 orrs r3, r2 - 800225c: 617b str r3, [r7, #20] - /* Load the selected MAC address high register */ - (*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg1; - 800225e: 68ba ldr r2, [r7, #8] - 8002260: 4b10 ldr r3, [pc, #64] ; (80022a4 ) - 8002262: 4413 add r3, r2 - 8002264: 461a mov r2, r3 - 8002266: 697b ldr r3, [r7, #20] - 8002268: 6013 str r3, [r2, #0] - /* Calculate the selected MAC address low register */ - tmpreg1 = ((uint32_t)Addr[3U] << 24U) | ((uint32_t)Addr[2U] << 16U) | ((uint32_t)Addr[1U] << 8U) | Addr[0U]; - 800226a: 687b ldr r3, [r7, #4] - 800226c: 3303 adds r3, #3 - 800226e: 781b ldrb r3, [r3, #0] - 8002270: 061a lsls r2, r3, #24 - 8002272: 687b ldr r3, [r7, #4] - 8002274: 3302 adds r3, #2 - 8002276: 781b ldrb r3, [r3, #0] - 8002278: 041b lsls r3, r3, #16 - 800227a: 431a orrs r2, r3 - 800227c: 687b ldr r3, [r7, #4] - 800227e: 3301 adds r3, #1 - 8002280: 781b ldrb r3, [r3, #0] - 8002282: 021b lsls r3, r3, #8 - 8002284: 4313 orrs r3, r2 - 8002286: 687a ldr r2, [r7, #4] - 8002288: 7812 ldrb r2, [r2, #0] - 800228a: 4313 orrs r3, r2 - 800228c: 617b str r3, [r7, #20] - - /* Load the selected MAC address low register */ - (*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg1; - 800228e: 68ba ldr r2, [r7, #8] - 8002290: 4b05 ldr r3, [pc, #20] ; (80022a8 ) - 8002292: 4413 add r3, r2 - 8002294: 461a mov r2, r3 - 8002296: 697b ldr r3, [r7, #20] - 8002298: 6013 str r3, [r2, #0] -} - 800229a: bf00 nop - 800229c: 371c adds r7, #28 - 800229e: 46bd mov sp, r7 - 80022a0: bc80 pop {r7} - 80022a2: 4770 bx lr - 80022a4: 40028040 .word 0x40028040 - 80022a8: 40028044 .word 0x40028044 - -080022ac : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth) -{ - 80022ac: b580 push {r7, lr} - 80022ae: b084 sub sp, #16 - 80022b0: af00 add r7, sp, #0 - 80022b2: 6078 str r0, [r7, #4] - __IO uint32_t tmpreg1 = 0U; - 80022b4: 2300 movs r3, #0 - 80022b6: 60fb str r3, [r7, #12] - - /* Enable the MAC transmission */ - (heth->Instance)->MACCR |= ETH_MACCR_TE; - 80022b8: 687b ldr r3, [r7, #4] - 80022ba: 681b ldr r3, [r3, #0] - 80022bc: 681a ldr r2, [r3, #0] - 80022be: 687b ldr r3, [r7, #4] - 80022c0: 681b ldr r3, [r3, #0] - 80022c2: f042 0208 orr.w r2, r2, #8 - 80022c6: 601a str r2, [r3, #0] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACCR; - 80022c8: 687b ldr r3, [r7, #4] - 80022ca: 681b ldr r3, [r3, #0] - 80022cc: 681b ldr r3, [r3, #0] - 80022ce: 60fb str r3, [r7, #12] - ETH_Delay(ETH_REG_WRITE_DELAY); - 80022d0: 2001 movs r0, #1 - 80022d2: f000 f8d9 bl 8002488 - (heth->Instance)->MACCR = tmpreg1; - 80022d6: 687b ldr r3, [r7, #4] - 80022d8: 681b ldr r3, [r3, #0] - 80022da: 68fa ldr r2, [r7, #12] - 80022dc: 601a str r2, [r3, #0] -} - 80022de: bf00 nop - 80022e0: 3710 adds r7, #16 - 80022e2: 46bd mov sp, r7 - 80022e4: bd80 pop {r7, pc} - -080022e6 : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth) -{ - 80022e6: b580 push {r7, lr} - 80022e8: b084 sub sp, #16 - 80022ea: af00 add r7, sp, #0 - 80022ec: 6078 str r0, [r7, #4] - __IO uint32_t tmpreg1 = 0U; - 80022ee: 2300 movs r3, #0 - 80022f0: 60fb str r3, [r7, #12] - - /* Disable the MAC transmission */ - (heth->Instance)->MACCR &= ~ETH_MACCR_TE; - 80022f2: 687b ldr r3, [r7, #4] - 80022f4: 681b ldr r3, [r3, #0] - 80022f6: 681a ldr r2, [r3, #0] - 80022f8: 687b ldr r3, [r7, #4] - 80022fa: 681b ldr r3, [r3, #0] - 80022fc: f022 0208 bic.w r2, r2, #8 - 8002300: 601a str r2, [r3, #0] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACCR; - 8002302: 687b ldr r3, [r7, #4] - 8002304: 681b ldr r3, [r3, #0] - 8002306: 681b ldr r3, [r3, #0] - 8002308: 60fb str r3, [r7, #12] - ETH_Delay(ETH_REG_WRITE_DELAY); - 800230a: 2001 movs r0, #1 - 800230c: f000 f8bc bl 8002488 - (heth->Instance)->MACCR = tmpreg1; - 8002310: 687b ldr r3, [r7, #4] - 8002312: 681b ldr r3, [r3, #0] - 8002314: 68fa ldr r2, [r7, #12] - 8002316: 601a str r2, [r3, #0] -} - 8002318: bf00 nop - 800231a: 3710 adds r7, #16 - 800231c: 46bd mov sp, r7 - 800231e: bd80 pop {r7, pc} - -08002320 : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth) -{ - 8002320: b580 push {r7, lr} - 8002322: b084 sub sp, #16 - 8002324: af00 add r7, sp, #0 - 8002326: 6078 str r0, [r7, #4] - __IO uint32_t tmpreg1 = 0U; - 8002328: 2300 movs r3, #0 - 800232a: 60fb str r3, [r7, #12] - - /* Enable the MAC reception */ - (heth->Instance)->MACCR |= ETH_MACCR_RE; - 800232c: 687b ldr r3, [r7, #4] - 800232e: 681b ldr r3, [r3, #0] - 8002330: 681a ldr r2, [r3, #0] - 8002332: 687b ldr r3, [r7, #4] - 8002334: 681b ldr r3, [r3, #0] - 8002336: f042 0204 orr.w r2, r2, #4 - 800233a: 601a str r2, [r3, #0] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACCR; - 800233c: 687b ldr r3, [r7, #4] - 800233e: 681b ldr r3, [r3, #0] - 8002340: 681b ldr r3, [r3, #0] - 8002342: 60fb str r3, [r7, #12] - ETH_Delay(ETH_REG_WRITE_DELAY); - 8002344: 2001 movs r0, #1 - 8002346: f000 f89f bl 8002488 - (heth->Instance)->MACCR = tmpreg1; - 800234a: 687b ldr r3, [r7, #4] - 800234c: 681b ldr r3, [r3, #0] - 800234e: 68fa ldr r2, [r7, #12] - 8002350: 601a str r2, [r3, #0] -} - 8002352: bf00 nop - 8002354: 3710 adds r7, #16 - 8002356: 46bd mov sp, r7 - 8002358: bd80 pop {r7, pc} - -0800235a : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth) -{ - 800235a: b580 push {r7, lr} - 800235c: b084 sub sp, #16 - 800235e: af00 add r7, sp, #0 - 8002360: 6078 str r0, [r7, #4] - __IO uint32_t tmpreg1 = 0U; - 8002362: 2300 movs r3, #0 - 8002364: 60fb str r3, [r7, #12] - - /* Disable the MAC reception */ - (heth->Instance)->MACCR &= ~ETH_MACCR_RE; - 8002366: 687b ldr r3, [r7, #4] - 8002368: 681b ldr r3, [r3, #0] - 800236a: 681a ldr r2, [r3, #0] - 800236c: 687b ldr r3, [r7, #4] - 800236e: 681b ldr r3, [r3, #0] - 8002370: f022 0204 bic.w r2, r2, #4 - 8002374: 601a str r2, [r3, #0] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->MACCR; - 8002376: 687b ldr r3, [r7, #4] - 8002378: 681b ldr r3, [r3, #0] - 800237a: 681b ldr r3, [r3, #0] - 800237c: 60fb str r3, [r7, #12] - ETH_Delay(ETH_REG_WRITE_DELAY); - 800237e: 2001 movs r0, #1 - 8002380: f000 f882 bl 8002488 - (heth->Instance)->MACCR = tmpreg1; - 8002384: 687b ldr r3, [r7, #4] - 8002386: 681b ldr r3, [r3, #0] - 8002388: 68fa ldr r2, [r7, #12] - 800238a: 601a str r2, [r3, #0] -} - 800238c: bf00 nop - 800238e: 3710 adds r7, #16 - 8002390: 46bd mov sp, r7 - 8002392: bd80 pop {r7, pc} - -08002394 : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth) -{ - 8002394: b480 push {r7} - 8002396: b083 sub sp, #12 - 8002398: af00 add r7, sp, #0 - 800239a: 6078 str r0, [r7, #4] - /* Enable the DMA transmission */ - (heth->Instance)->DMAOMR |= ETH_DMAOMR_ST; - 800239c: 687b ldr r3, [r7, #4] - 800239e: 681b ldr r3, [r3, #0] - 80023a0: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 80023a4: 699b ldr r3, [r3, #24] - 80023a6: 687a ldr r2, [r7, #4] - 80023a8: 6812 ldr r2, [r2, #0] - 80023aa: f443 5300 orr.w r3, r3, #8192 ; 0x2000 - 80023ae: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 80023b2: 6193 str r3, [r2, #24] -} - 80023b4: bf00 nop - 80023b6: 370c adds r7, #12 - 80023b8: 46bd mov sp, r7 - 80023ba: bc80 pop {r7} - 80023bc: 4770 bx lr - -080023be : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth) -{ - 80023be: b480 push {r7} - 80023c0: b083 sub sp, #12 - 80023c2: af00 add r7, sp, #0 - 80023c4: 6078 str r0, [r7, #4] - /* Disable the DMA transmission */ - (heth->Instance)->DMAOMR &= ~ETH_DMAOMR_ST; - 80023c6: 687b ldr r3, [r7, #4] - 80023c8: 681b ldr r3, [r3, #0] - 80023ca: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 80023ce: 699b ldr r3, [r3, #24] - 80023d0: 687a ldr r2, [r7, #4] - 80023d2: 6812 ldr r2, [r2, #0] - 80023d4: f423 5300 bic.w r3, r3, #8192 ; 0x2000 - 80023d8: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 80023dc: 6193 str r3, [r2, #24] -} - 80023de: bf00 nop - 80023e0: 370c adds r7, #12 - 80023e2: 46bd mov sp, r7 - 80023e4: bc80 pop {r7} - 80023e6: 4770 bx lr - -080023e8 : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth) -{ - 80023e8: b480 push {r7} - 80023ea: b083 sub sp, #12 - 80023ec: af00 add r7, sp, #0 - 80023ee: 6078 str r0, [r7, #4] - /* Enable the DMA reception */ - (heth->Instance)->DMAOMR |= ETH_DMAOMR_SR; - 80023f0: 687b ldr r3, [r7, #4] - 80023f2: 681b ldr r3, [r3, #0] - 80023f4: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 80023f8: 699b ldr r3, [r3, #24] - 80023fa: 687a ldr r2, [r7, #4] - 80023fc: 6812 ldr r2, [r2, #0] - 80023fe: f043 0302 orr.w r3, r3, #2 - 8002402: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 8002406: 6193 str r3, [r2, #24] -} - 8002408: bf00 nop - 800240a: 370c adds r7, #12 - 800240c: 46bd mov sp, r7 - 800240e: bc80 pop {r7} - 8002410: 4770 bx lr - -08002412 : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth) -{ - 8002412: b480 push {r7} - 8002414: b083 sub sp, #12 - 8002416: af00 add r7, sp, #0 - 8002418: 6078 str r0, [r7, #4] - /* Disable the DMA reception */ - (heth->Instance)->DMAOMR &= ~ETH_DMAOMR_SR; - 800241a: 687b ldr r3, [r7, #4] - 800241c: 681b ldr r3, [r3, #0] - 800241e: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8002422: 699b ldr r3, [r3, #24] - 8002424: 687a ldr r2, [r7, #4] - 8002426: 6812 ldr r2, [r2, #0] - 8002428: f023 0302 bic.w r3, r3, #2 - 800242c: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 8002430: 6193 str r3, [r2, #24] -} - 8002432: bf00 nop - 8002434: 370c adds r7, #12 - 8002436: 46bd mov sp, r7 - 8002438: bc80 pop {r7} - 800243a: 4770 bx lr - -0800243c : - * @param heth pointer to a ETH_HandleTypeDef structure that contains - * the configuration information for ETHERNET module - * @retval None - */ -static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth) -{ - 800243c: b580 push {r7, lr} - 800243e: b084 sub sp, #16 - 8002440: af00 add r7, sp, #0 - 8002442: 6078 str r0, [r7, #4] - __IO uint32_t tmpreg1 = 0U; - 8002444: 2300 movs r3, #0 - 8002446: 60fb str r3, [r7, #12] - - /* Set the Flush Transmit FIFO bit */ - (heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF; - 8002448: 687b ldr r3, [r7, #4] - 800244a: 681b ldr r3, [r3, #0] - 800244c: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8002450: 699b ldr r3, [r3, #24] - 8002452: 687a ldr r2, [r7, #4] - 8002454: 6812 ldr r2, [r2, #0] - 8002456: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 - 800245a: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 800245e: 6193 str r3, [r2, #24] - - /* Wait until the write operation will be taken into account: - at least four TX_CLK/RX_CLK clock cycles */ - tmpreg1 = (heth->Instance)->DMAOMR; - 8002460: 687b ldr r3, [r7, #4] - 8002462: 681b ldr r3, [r3, #0] - 8002464: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8002468: 699b ldr r3, [r3, #24] - 800246a: 60fb str r3, [r7, #12] - ETH_Delay(ETH_REG_WRITE_DELAY); - 800246c: 2001 movs r0, #1 - 800246e: f000 f80b bl 8002488 - (heth->Instance)->DMAOMR = tmpreg1; - 8002472: 687b ldr r3, [r7, #4] - 8002474: 681a ldr r2, [r3, #0] - 8002476: 68fb ldr r3, [r7, #12] - 8002478: f502 5280 add.w r2, r2, #4096 ; 0x1000 - 800247c: 6193 str r3, [r2, #24] -} - 800247e: bf00 nop - 8002480: 3710 adds r7, #16 - 8002482: 46bd mov sp, r7 - 8002484: bd80 pop {r7, pc} - ... - -08002488 : - * @brief This function provides delay (in milliseconds) based on CPU cycles method. - * @param mdelay specifies the delay time length, in milliseconds. - * @retval None - */ -static void ETH_Delay(uint32_t mdelay) -{ - 8002488: b480 push {r7} - 800248a: b085 sub sp, #20 - 800248c: af00 add r7, sp, #0 - 800248e: 6078 str r0, [r7, #4] - __IO uint32_t Delay = mdelay * (SystemCoreClock / 8U / 1000U); - 8002490: 4b0a ldr r3, [pc, #40] ; (80024bc ) - 8002492: 681b ldr r3, [r3, #0] - 8002494: 4a0a ldr r2, [pc, #40] ; (80024c0 ) - 8002496: fba2 2303 umull r2, r3, r2, r3 - 800249a: 0a5b lsrs r3, r3, #9 - 800249c: 687a ldr r2, [r7, #4] - 800249e: fb02 f303 mul.w r3, r2, r3 - 80024a2: 60fb str r3, [r7, #12] - do - { - __NOP(); - 80024a4: bf00 nop - } - while (Delay --); - 80024a6: 68fb ldr r3, [r7, #12] - 80024a8: 1e5a subs r2, r3, #1 - 80024aa: 60fa str r2, [r7, #12] - 80024ac: 2b00 cmp r3, #0 - 80024ae: d1f9 bne.n 80024a4 -} - 80024b0: bf00 nop - 80024b2: bf00 nop - 80024b4: 3714 adds r7, #20 - 80024b6: 46bd mov sp, r7 - 80024b8: bc80 pop {r7} - 80024ba: 4770 bx lr - 80024bc: 20000000 .word 0x20000000 - 80024c0: 10624dd3 .word 0x10624dd3 - -080024c4 : - * @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) -{ - 80024c4: b480 push {r7} - 80024c6: b087 sub sp, #28 - 80024c8: af00 add r7, sp, #0 - 80024ca: 6078 str r0, [r7, #4] - 80024cc: 6039 str r1, [r7, #0] - uint32_t position = 0x00u; - 80024ce: 2300 movs r3, #0 - 80024d0: 617b str r3, [r7, #20] - 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) - 80024d2: e16f b.n 80027b4 - { - /* Get current io position */ - iocurrent = (GPIO_Init->Pin) & (1uL << position); - 80024d4: 683b ldr r3, [r7, #0] - 80024d6: 681a ldr r2, [r3, #0] - 80024d8: 2101 movs r1, #1 - 80024da: 697b ldr r3, [r7, #20] - 80024dc: fa01 f303 lsl.w r3, r1, r3 - 80024e0: 4013 ands r3, r2 - 80024e2: 60fb str r3, [r7, #12] - - if (iocurrent != 0x00u) - 80024e4: 68fb ldr r3, [r7, #12] - 80024e6: 2b00 cmp r3, #0 - 80024e8: f000 8161 beq.w 80027ae - { - /* In case of Output or Alternate function mode selection */ - if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) - 80024ec: 683b ldr r3, [r7, #0] - 80024ee: 685b ldr r3, [r3, #4] - 80024f0: f003 0303 and.w r3, r3, #3 - 80024f4: 2b01 cmp r3, #1 - 80024f6: d005 beq.n 8002504 - 80024f8: 683b ldr r3, [r7, #0] - 80024fa: 685b ldr r3, [r3, #4] - 80024fc: f003 0303 and.w r3, r3, #3 - 8002500: 2b02 cmp r3, #2 - 8002502: d130 bne.n 8002566 - { - /* Check the Speed parameter */ - assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); - /* Configure the IO Speed */ - temp = GPIOx->OSPEEDR; - 8002504: 687b ldr r3, [r7, #4] - 8002506: 689b ldr r3, [r3, #8] - 8002508: 613b str r3, [r7, #16] - temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u)); - 800250a: 697b ldr r3, [r7, #20] - 800250c: 005b lsls r3, r3, #1 - 800250e: 2203 movs r2, #3 - 8002510: fa02 f303 lsl.w r3, r2, r3 - 8002514: 43db mvns r3, r3 - 8002516: 693a ldr r2, [r7, #16] - 8002518: 4013 ands r3, r2 - 800251a: 613b str r3, [r7, #16] - temp |= (GPIO_Init->Speed << (position * 2u)); - 800251c: 683b ldr r3, [r7, #0] - 800251e: 68da ldr r2, [r3, #12] - 8002520: 697b ldr r3, [r7, #20] - 8002522: 005b lsls r3, r3, #1 - 8002524: fa02 f303 lsl.w r3, r2, r3 - 8002528: 693a ldr r2, [r7, #16] - 800252a: 4313 orrs r3, r2 - 800252c: 613b str r3, [r7, #16] - GPIOx->OSPEEDR = temp; - 800252e: 687b ldr r3, [r7, #4] - 8002530: 693a ldr r2, [r7, #16] - 8002532: 609a str r2, [r3, #8] - - /* Configure the IO Output Type */ - temp = GPIOx->OTYPER; - 8002534: 687b ldr r3, [r7, #4] - 8002536: 685b ldr r3, [r3, #4] - 8002538: 613b str r3, [r7, #16] - temp &= ~(GPIO_OTYPER_OT0 << position) ; - 800253a: 2201 movs r2, #1 - 800253c: 697b ldr r3, [r7, #20] - 800253e: fa02 f303 lsl.w r3, r2, r3 - 8002542: 43db mvns r3, r3 - 8002544: 693a ldr r2, [r7, #16] - 8002546: 4013 ands r3, r2 - 8002548: 613b str r3, [r7, #16] - temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); - 800254a: 683b ldr r3, [r7, #0] - 800254c: 685b ldr r3, [r3, #4] - 800254e: 091b lsrs r3, r3, #4 - 8002550: f003 0201 and.w r2, r3, #1 - 8002554: 697b ldr r3, [r7, #20] - 8002556: fa02 f303 lsl.w r3, r2, r3 - 800255a: 693a ldr r2, [r7, #16] - 800255c: 4313 orrs r3, r2 - 800255e: 613b str r3, [r7, #16] - GPIOx->OTYPER = temp; - 8002560: 687b ldr r3, [r7, #4] - 8002562: 693a ldr r2, [r7, #16] - 8002564: 605a str r2, [r3, #4] - } - if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) - 8002566: 683b ldr r3, [r7, #0] - 8002568: 685b ldr r3, [r3, #4] - 800256a: f003 0303 and.w r3, r3, #3 - 800256e: 2b03 cmp r3, #3 - 8002570: d017 beq.n 80025a2 - { - /* Check the Pull parameter */ - assert_param(IS_GPIO_PULL(GPIO_Init->Pull)); - - /* Activate the Pull-up or Pull down resistor for the current IO */ - temp = GPIOx->PUPDR; - 8002572: 687b ldr r3, [r7, #4] - 8002574: 68db ldr r3, [r3, #12] - 8002576: 613b str r3, [r7, #16] - temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2u)); - 8002578: 697b ldr r3, [r7, #20] - 800257a: 005b lsls r3, r3, #1 - 800257c: 2203 movs r2, #3 - 800257e: fa02 f303 lsl.w r3, r2, r3 - 8002582: 43db mvns r3, r3 - 8002584: 693a ldr r2, [r7, #16] - 8002586: 4013 ands r3, r2 - 8002588: 613b str r3, [r7, #16] - temp |= ((GPIO_Init->Pull) << (position * 2u)); - 800258a: 683b ldr r3, [r7, #0] - 800258c: 689a ldr r2, [r3, #8] - 800258e: 697b ldr r3, [r7, #20] - 8002590: 005b lsls r3, r3, #1 - 8002592: fa02 f303 lsl.w r3, r2, r3 - 8002596: 693a ldr r2, [r7, #16] - 8002598: 4313 orrs r3, r2 - 800259a: 613b str r3, [r7, #16] - GPIOx->PUPDR = temp; - 800259c: 687b ldr r3, [r7, #4] - 800259e: 693a ldr r2, [r7, #16] - 80025a0: 60da str r2, [r3, #12] - } - - /*--------------------- GPIO Mode Configuration ------------------------*/ - /* In case of Alternate function mode selection */ - if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) - 80025a2: 683b ldr r3, [r7, #0] - 80025a4: 685b ldr r3, [r3, #4] - 80025a6: f003 0303 and.w r3, r3, #3 - 80025aa: 2b02 cmp r3, #2 - 80025ac: d123 bne.n 80025f6 - /* 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]; - 80025ae: 697b ldr r3, [r7, #20] - 80025b0: 08da lsrs r2, r3, #3 - 80025b2: 687b ldr r3, [r7, #4] - 80025b4: 3208 adds r2, #8 - 80025b6: f853 3022 ldr.w r3, [r3, r2, lsl #2] - 80025ba: 613b str r3, [r7, #16] - temp &= ~(0xFu << ((position & 0x07u) * 4u)); - 80025bc: 697b ldr r3, [r7, #20] - 80025be: f003 0307 and.w r3, r3, #7 - 80025c2: 009b lsls r3, r3, #2 - 80025c4: 220f movs r2, #15 - 80025c6: fa02 f303 lsl.w r3, r2, r3 - 80025ca: 43db mvns r3, r3 - 80025cc: 693a ldr r2, [r7, #16] - 80025ce: 4013 ands r3, r2 - 80025d0: 613b str r3, [r7, #16] - temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u)); - 80025d2: 683b ldr r3, [r7, #0] - 80025d4: 691a ldr r2, [r3, #16] - 80025d6: 697b ldr r3, [r7, #20] - 80025d8: f003 0307 and.w r3, r3, #7 - 80025dc: 009b lsls r3, r3, #2 - 80025de: fa02 f303 lsl.w r3, r2, r3 - 80025e2: 693a ldr r2, [r7, #16] - 80025e4: 4313 orrs r3, r2 - 80025e6: 613b str r3, [r7, #16] - GPIOx->AFR[position >> 3u] = temp; - 80025e8: 697b ldr r3, [r7, #20] - 80025ea: 08da lsrs r2, r3, #3 - 80025ec: 687b ldr r3, [r7, #4] - 80025ee: 3208 adds r2, #8 - 80025f0: 6939 ldr r1, [r7, #16] - 80025f2: f843 1022 str.w r1, [r3, r2, lsl #2] - } - - /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ - temp = GPIOx->MODER; - 80025f6: 687b ldr r3, [r7, #4] - 80025f8: 681b ldr r3, [r3, #0] - 80025fa: 613b str r3, [r7, #16] - temp &= ~(GPIO_MODER_MODE0 << (position * 2u)); - 80025fc: 697b ldr r3, [r7, #20] - 80025fe: 005b lsls r3, r3, #1 - 8002600: 2203 movs r2, #3 - 8002602: fa02 f303 lsl.w r3, r2, r3 - 8002606: 43db mvns r3, r3 - 8002608: 693a ldr r2, [r7, #16] - 800260a: 4013 ands r3, r2 - 800260c: 613b str r3, [r7, #16] - temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u)); - 800260e: 683b ldr r3, [r7, #0] - 8002610: 685b ldr r3, [r3, #4] - 8002612: f003 0203 and.w r2, r3, #3 - 8002616: 697b ldr r3, [r7, #20] - 8002618: 005b lsls r3, r3, #1 - 800261a: fa02 f303 lsl.w r3, r2, r3 - 800261e: 693a ldr r2, [r7, #16] - 8002620: 4313 orrs r3, r2 - 8002622: 613b str r3, [r7, #16] - GPIOx->MODER = temp; - 8002624: 687b ldr r3, [r7, #4] - 8002626: 693a ldr r2, [r7, #16] - 8002628: 601a str r2, [r3, #0] - - /*--------------------- EXTI Mode Configuration ------------------------*/ - /* Configure the External Interrupt or event for the current IO */ - if((GPIO_Init->Mode & EXTI_MODE) != 0x00u) - 800262a: 683b ldr r3, [r7, #0] - 800262c: 685b ldr r3, [r3, #4] - 800262e: f403 3340 and.w r3, r3, #196608 ; 0x30000 - 8002632: 2b00 cmp r3, #0 - 8002634: f000 80bb beq.w 80027ae - { - /* Enable SYSCFG Clock */ - __HAL_RCC_SYSCFG_CLK_ENABLE(); - 8002638: 2300 movs r3, #0 - 800263a: 60bb str r3, [r7, #8] - 800263c: 4b64 ldr r3, [pc, #400] ; (80027d0 ) - 800263e: 6c5b ldr r3, [r3, #68] ; 0x44 - 8002640: 4a63 ldr r2, [pc, #396] ; (80027d0 ) - 8002642: f443 4380 orr.w r3, r3, #16384 ; 0x4000 - 8002646: 6453 str r3, [r2, #68] ; 0x44 - 8002648: 4b61 ldr r3, [pc, #388] ; (80027d0 ) - 800264a: 6c5b ldr r3, [r3, #68] ; 0x44 - 800264c: f403 4380 and.w r3, r3, #16384 ; 0x4000 - 8002650: 60bb str r3, [r7, #8] - 8002652: 68bb ldr r3, [r7, #8] - - temp = SYSCFG->EXTICR[position >> 2u]; - 8002654: 4a5f ldr r2, [pc, #380] ; (80027d4 ) - 8002656: 697b ldr r3, [r7, #20] - 8002658: 089b lsrs r3, r3, #2 - 800265a: 3302 adds r3, #2 - 800265c: f852 3023 ldr.w r3, [r2, r3, lsl #2] - 8002660: 613b str r3, [r7, #16] - temp &= ~(0x0FuL << (4u * (position & 0x03u))); - 8002662: 697b ldr r3, [r7, #20] - 8002664: f003 0303 and.w r3, r3, #3 - 8002668: 009b lsls r3, r3, #2 - 800266a: 220f movs r2, #15 - 800266c: fa02 f303 lsl.w r3, r2, r3 - 8002670: 43db mvns r3, r3 - 8002672: 693a ldr r2, [r7, #16] - 8002674: 4013 ands r3, r2 - 8002676: 613b str r3, [r7, #16] - temp |= (GPIO_GET_INDEX(GPIOx) << (4u * (position & 0x03u))); - 8002678: 687b ldr r3, [r7, #4] - 800267a: 4a57 ldr r2, [pc, #348] ; (80027d8 ) - 800267c: 4293 cmp r3, r2 - 800267e: d031 beq.n 80026e4 - 8002680: 687b ldr r3, [r7, #4] - 8002682: 4a56 ldr r2, [pc, #344] ; (80027dc ) - 8002684: 4293 cmp r3, r2 - 8002686: d02b beq.n 80026e0 - 8002688: 687b ldr r3, [r7, #4] - 800268a: 4a55 ldr r2, [pc, #340] ; (80027e0 ) - 800268c: 4293 cmp r3, r2 - 800268e: d025 beq.n 80026dc - 8002690: 687b ldr r3, [r7, #4] - 8002692: 4a54 ldr r2, [pc, #336] ; (80027e4 ) - 8002694: 4293 cmp r3, r2 - 8002696: d01f beq.n 80026d8 - 8002698: 687b ldr r3, [r7, #4] - 800269a: 4a53 ldr r2, [pc, #332] ; (80027e8 ) - 800269c: 4293 cmp r3, r2 - 800269e: d019 beq.n 80026d4 - 80026a0: 687b ldr r3, [r7, #4] - 80026a2: 4a52 ldr r2, [pc, #328] ; (80027ec ) - 80026a4: 4293 cmp r3, r2 - 80026a6: d013 beq.n 80026d0 - 80026a8: 687b ldr r3, [r7, #4] - 80026aa: 4a51 ldr r2, [pc, #324] ; (80027f0 ) - 80026ac: 4293 cmp r3, r2 - 80026ae: d00d beq.n 80026cc - 80026b0: 687b ldr r3, [r7, #4] - 80026b2: 4a50 ldr r2, [pc, #320] ; (80027f4 ) - 80026b4: 4293 cmp r3, r2 - 80026b6: d007 beq.n 80026c8 - 80026b8: 687b ldr r3, [r7, #4] - 80026ba: 4a4f ldr r2, [pc, #316] ; (80027f8 ) - 80026bc: 4293 cmp r3, r2 - 80026be: d101 bne.n 80026c4 - 80026c0: 2308 movs r3, #8 - 80026c2: e010 b.n 80026e6 - 80026c4: 2309 movs r3, #9 - 80026c6: e00e b.n 80026e6 - 80026c8: 2307 movs r3, #7 - 80026ca: e00c b.n 80026e6 - 80026cc: 2306 movs r3, #6 - 80026ce: e00a b.n 80026e6 - 80026d0: 2305 movs r3, #5 - 80026d2: e008 b.n 80026e6 - 80026d4: 2304 movs r3, #4 - 80026d6: e006 b.n 80026e6 - 80026d8: 2303 movs r3, #3 - 80026da: e004 b.n 80026e6 - 80026dc: 2302 movs r3, #2 - 80026de: e002 b.n 80026e6 - 80026e0: 2301 movs r3, #1 - 80026e2: e000 b.n 80026e6 - 80026e4: 2300 movs r3, #0 - 80026e6: 697a ldr r2, [r7, #20] - 80026e8: f002 0203 and.w r2, r2, #3 - 80026ec: 0092 lsls r2, r2, #2 - 80026ee: 4093 lsls r3, r2 - 80026f0: 461a mov r2, r3 - 80026f2: 693b ldr r3, [r7, #16] - 80026f4: 4313 orrs r3, r2 - 80026f6: 613b str r3, [r7, #16] - SYSCFG->EXTICR[position >> 2u] = temp; - 80026f8: 4936 ldr r1, [pc, #216] ; (80027d4 ) - 80026fa: 697b ldr r3, [r7, #20] - 80026fc: 089b lsrs r3, r3, #2 - 80026fe: 3302 adds r3, #2 - 8002700: 693a ldr r2, [r7, #16] - 8002702: f841 2023 str.w r2, [r1, r3, lsl #2] - - /* Clear Rising Falling edge configuration */ - temp = EXTI->RTSR; - 8002706: 4b3d ldr r3, [pc, #244] ; (80027fc ) - 8002708: 689b ldr r3, [r3, #8] - 800270a: 613b str r3, [r7, #16] - temp &= ~(iocurrent); - 800270c: 68fb ldr r3, [r7, #12] - 800270e: 43db mvns r3, r3 - 8002710: 693a ldr r2, [r7, #16] - 8002712: 4013 ands r3, r2 - 8002714: 613b str r3, [r7, #16] - if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u) - 8002716: 683b ldr r3, [r7, #0] - 8002718: 685b ldr r3, [r3, #4] - 800271a: f403 1380 and.w r3, r3, #1048576 ; 0x100000 - 800271e: 2b00 cmp r3, #0 - 8002720: d003 beq.n 800272a - { - temp |= iocurrent; - 8002722: 693a ldr r2, [r7, #16] - 8002724: 68fb ldr r3, [r7, #12] - 8002726: 4313 orrs r3, r2 - 8002728: 613b str r3, [r7, #16] - } - EXTI->RTSR = temp; - 800272a: 4a34 ldr r2, [pc, #208] ; (80027fc ) - 800272c: 693b ldr r3, [r7, #16] - 800272e: 6093 str r3, [r2, #8] - - temp = EXTI->FTSR; - 8002730: 4b32 ldr r3, [pc, #200] ; (80027fc ) - 8002732: 68db ldr r3, [r3, #12] - 8002734: 613b str r3, [r7, #16] - temp &= ~(iocurrent); - 8002736: 68fb ldr r3, [r7, #12] - 8002738: 43db mvns r3, r3 - 800273a: 693a ldr r2, [r7, #16] - 800273c: 4013 ands r3, r2 - 800273e: 613b str r3, [r7, #16] - if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u) - 8002740: 683b ldr r3, [r7, #0] - 8002742: 685b ldr r3, [r3, #4] - 8002744: f403 1300 and.w r3, r3, #2097152 ; 0x200000 - 8002748: 2b00 cmp r3, #0 - 800274a: d003 beq.n 8002754 - { - temp |= iocurrent; - 800274c: 693a ldr r2, [r7, #16] - 800274e: 68fb ldr r3, [r7, #12] - 8002750: 4313 orrs r3, r2 - 8002752: 613b str r3, [r7, #16] - } - EXTI->FTSR = temp; - 8002754: 4a29 ldr r2, [pc, #164] ; (80027fc ) - 8002756: 693b ldr r3, [r7, #16] - 8002758: 60d3 str r3, [r2, #12] - - temp = EXTI->EMR; - 800275a: 4b28 ldr r3, [pc, #160] ; (80027fc ) - 800275c: 685b ldr r3, [r3, #4] - 800275e: 613b str r3, [r7, #16] - temp &= ~(iocurrent); - 8002760: 68fb ldr r3, [r7, #12] - 8002762: 43db mvns r3, r3 - 8002764: 693a ldr r2, [r7, #16] - 8002766: 4013 ands r3, r2 - 8002768: 613b str r3, [r7, #16] - if((GPIO_Init->Mode & EXTI_EVT) != 0x00u) - 800276a: 683b ldr r3, [r7, #0] - 800276c: 685b ldr r3, [r3, #4] - 800276e: f403 3300 and.w r3, r3, #131072 ; 0x20000 - 8002772: 2b00 cmp r3, #0 - 8002774: d003 beq.n 800277e - { - temp |= iocurrent; - 8002776: 693a ldr r2, [r7, #16] - 8002778: 68fb ldr r3, [r7, #12] - 800277a: 4313 orrs r3, r2 - 800277c: 613b str r3, [r7, #16] - } - EXTI->EMR = temp; - 800277e: 4a1f ldr r2, [pc, #124] ; (80027fc ) - 8002780: 693b ldr r3, [r7, #16] - 8002782: 6053 str r3, [r2, #4] - - /* Clear EXTI line configuration */ - temp = EXTI->IMR; - 8002784: 4b1d ldr r3, [pc, #116] ; (80027fc ) - 8002786: 681b ldr r3, [r3, #0] - 8002788: 613b str r3, [r7, #16] - temp &= ~(iocurrent); - 800278a: 68fb ldr r3, [r7, #12] - 800278c: 43db mvns r3, r3 - 800278e: 693a ldr r2, [r7, #16] - 8002790: 4013 ands r3, r2 - 8002792: 613b str r3, [r7, #16] - if((GPIO_Init->Mode & EXTI_IT) != 0x00u) - 8002794: 683b ldr r3, [r7, #0] - 8002796: 685b ldr r3, [r3, #4] - 8002798: f403 3380 and.w r3, r3, #65536 ; 0x10000 - 800279c: 2b00 cmp r3, #0 - 800279e: d003 beq.n 80027a8 - { - temp |= iocurrent; - 80027a0: 693a ldr r2, [r7, #16] - 80027a2: 68fb ldr r3, [r7, #12] - 80027a4: 4313 orrs r3, r2 - 80027a6: 613b str r3, [r7, #16] - } - EXTI->IMR = temp; - 80027a8: 4a14 ldr r2, [pc, #80] ; (80027fc ) - 80027aa: 693b ldr r3, [r7, #16] - 80027ac: 6013 str r3, [r2, #0] - } - } - - position++; - 80027ae: 697b ldr r3, [r7, #20] - 80027b0: 3301 adds r3, #1 - 80027b2: 617b str r3, [r7, #20] - while (((GPIO_Init->Pin) >> position) != 0x00u) - 80027b4: 683b ldr r3, [r7, #0] - 80027b6: 681a ldr r2, [r3, #0] - 80027b8: 697b ldr r3, [r7, #20] - 80027ba: fa22 f303 lsr.w r3, r2, r3 - 80027be: 2b00 cmp r3, #0 - 80027c0: f47f ae88 bne.w 80024d4 - } -} - 80027c4: bf00 nop - 80027c6: bf00 nop - 80027c8: 371c adds r7, #28 - 80027ca: 46bd mov sp, r7 - 80027cc: bc80 pop {r7} - 80027ce: 4770 bx lr - 80027d0: 40023800 .word 0x40023800 - 80027d4: 40013800 .word 0x40013800 - 80027d8: 40020000 .word 0x40020000 - 80027dc: 40020400 .word 0x40020400 - 80027e0: 40020800 .word 0x40020800 - 80027e4: 40020c00 .word 0x40020c00 - 80027e8: 40021000 .word 0x40021000 - 80027ec: 40021400 .word 0x40021400 - 80027f0: 40021800 .word 0x40021800 - 80027f4: 40021c00 .word 0x40021c00 - 80027f8: 40022000 .word 0x40022000 - 80027fc: 40013c00 .word 0x40013c00 - -08002800 : - * @arg GPIO_PIN_RESET: to clear the port pin - * @arg GPIO_PIN_SET: to set the port pin - * @retval None - */ -void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) -{ - 8002800: b480 push {r7} - 8002802: b083 sub sp, #12 - 8002804: af00 add r7, sp, #0 - 8002806: 6078 str r0, [r7, #4] - 8002808: 460b mov r3, r1 - 800280a: 807b strh r3, [r7, #2] - 800280c: 4613 mov r3, r2 - 800280e: 707b strb r3, [r7, #1] - /* Check the parameters */ - assert_param(IS_GPIO_PIN(GPIO_Pin)); - assert_param(IS_GPIO_PIN_ACTION(PinState)); - - if(PinState != GPIO_PIN_RESET) - 8002810: 787b ldrb r3, [r7, #1] - 8002812: 2b00 cmp r3, #0 - 8002814: d003 beq.n 800281e - { - GPIOx->BSRR = GPIO_Pin; - 8002816: 887a ldrh r2, [r7, #2] - 8002818: 687b ldr r3, [r7, #4] - 800281a: 619a str r2, [r3, #24] - } - else - { - GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U; - } -} - 800281c: e003 b.n 8002826 - GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U; - 800281e: 887b ldrh r3, [r7, #2] - 8002820: 041a lsls r2, r3, #16 - 8002822: 687b ldr r3, [r7, #4] - 8002824: 619a str r2, [r3, #24] -} - 8002826: bf00 nop - 8002828: 370c adds r7, #12 - 800282a: 46bd mov sp, r7 - 800282c: bc80 pop {r7} - 800282e: 4770 bx lr - -08002830 : - * parameters in the PCD_InitTypeDef and initialize the associated handle. - * @param hpcd PCD handle - * @retval HAL status - */ -HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd) -{ - 8002830: b5f0 push {r4, r5, r6, r7, lr} - 8002832: b08f sub sp, #60 ; 0x3c - 8002834: af0a add r7, sp, #40 ; 0x28 - 8002836: 6078 str r0, [r7, #4] - USB_OTG_GlobalTypeDef *USBx; - uint8_t i; - - /* Check the PCD handle allocation */ - if (hpcd == NULL) - 8002838: 687b ldr r3, [r7, #4] - 800283a: 2b00 cmp r3, #0 - 800283c: d101 bne.n 8002842 - { - return HAL_ERROR; - 800283e: 2301 movs r3, #1 - 8002840: e10f b.n 8002a62 - } - - /* Check the parameters */ - assert_param(IS_PCD_ALL_INSTANCE(hpcd->Instance)); - - USBx = hpcd->Instance; - 8002842: 687b ldr r3, [r7, #4] - 8002844: 681b ldr r3, [r3, #0] - 8002846: 60bb str r3, [r7, #8] - - if (hpcd->State == HAL_PCD_STATE_RESET) - 8002848: 687b ldr r3, [r7, #4] - 800284a: f893 34bd ldrb.w r3, [r3, #1213] ; 0x4bd - 800284e: b2db uxtb r3, r3 - 8002850: 2b00 cmp r3, #0 - 8002852: d106 bne.n 8002862 - { - /* Allocate lock resource and initialize it */ - hpcd->Lock = HAL_UNLOCKED; - 8002854: 687b ldr r3, [r7, #4] - 8002856: 2200 movs r2, #0 - 8002858: f883 24bc strb.w r2, [r3, #1212] ; 0x4bc - - /* Init the low level hardware */ - hpcd->MspInitCallback(hpcd); -#else - /* Init the low level hardware : GPIO, CLOCK, NVIC... */ - HAL_PCD_MspInit(hpcd); - 800285c: 6878 ldr r0, [r7, #4] - 800285e: f7fe fa9b bl 8000d98 -#endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */ - } - - hpcd->State = HAL_PCD_STATE_BUSY; - 8002862: 687b ldr r3, [r7, #4] - 8002864: 2203 movs r2, #3 - 8002866: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd - - /* Disable DMA mode for FS instance */ - if ((USBx->CID & (0x1U << 8)) == 0U) - 800286a: 68bb ldr r3, [r7, #8] - 800286c: 6bdb ldr r3, [r3, #60] ; 0x3c - 800286e: f403 7380 and.w r3, r3, #256 ; 0x100 - 8002872: 2b00 cmp r3, #0 - 8002874: d102 bne.n 800287c - { - hpcd->Init.dma_enable = 0U; - 8002876: 687b ldr r3, [r7, #4] - 8002878: 2200 movs r2, #0 - 800287a: 60da str r2, [r3, #12] - } - - /* Disable the Interrupts */ - __HAL_PCD_DISABLE(hpcd); - 800287c: 687b ldr r3, [r7, #4] - 800287e: 681b ldr r3, [r3, #0] - 8002880: 4618 mov r0, r3 - 8002882: f001 fe42 bl 800450a - - /*Init the Core (common init.) */ - if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK) - 8002886: 687b ldr r3, [r7, #4] - 8002888: 681b ldr r3, [r3, #0] - 800288a: 603b str r3, [r7, #0] - 800288c: 687e ldr r6, [r7, #4] - 800288e: 466d mov r5, sp - 8002890: f106 0410 add.w r4, r6, #16 - 8002894: cc0f ldmia r4!, {r0, r1, r2, r3} - 8002896: c50f stmia r5!, {r0, r1, r2, r3} - 8002898: cc0f ldmia r4!, {r0, r1, r2, r3} - 800289a: c50f stmia r5!, {r0, r1, r2, r3} - 800289c: e894 0003 ldmia.w r4, {r0, r1} - 80028a0: e885 0003 stmia.w r5, {r0, r1} - 80028a4: 1d33 adds r3, r6, #4 - 80028a6: cb0e ldmia r3, {r1, r2, r3} - 80028a8: 6838 ldr r0, [r7, #0] - 80028aa: f001 fdd7 bl 800445c - 80028ae: 4603 mov r3, r0 - 80028b0: 2b00 cmp r3, #0 - 80028b2: d005 beq.n 80028c0 - { - hpcd->State = HAL_PCD_STATE_ERROR; - 80028b4: 687b ldr r3, [r7, #4] - 80028b6: 2202 movs r2, #2 - 80028b8: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd - return HAL_ERROR; - 80028bc: 2301 movs r3, #1 - 80028be: e0d0 b.n 8002a62 - } - - /* Force Device Mode*/ - (void)USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE); - 80028c0: 687b ldr r3, [r7, #4] - 80028c2: 681b ldr r3, [r3, #0] - 80028c4: 2100 movs r1, #0 - 80028c6: 4618 mov r0, r3 - 80028c8: f001 fe2f bl 800452a - - /* Init endpoints structures */ - for (i = 0U; i < hpcd->Init.dev_endpoints; i++) - 80028cc: 2300 movs r3, #0 - 80028ce: 73fb strb r3, [r7, #15] - 80028d0: e04a b.n 8002968 - { - /* Init ep structure */ - hpcd->IN_ep[i].is_in = 1U; - 80028d2: 7bfa ldrb r2, [r7, #15] - 80028d4: 6879 ldr r1, [r7, #4] - 80028d6: 4613 mov r3, r2 - 80028d8: 00db lsls r3, r3, #3 - 80028da: 4413 add r3, r2 - 80028dc: 009b lsls r3, r3, #2 - 80028de: 440b add r3, r1 - 80028e0: 333d adds r3, #61 ; 0x3d - 80028e2: 2201 movs r2, #1 - 80028e4: 701a strb r2, [r3, #0] - hpcd->IN_ep[i].num = i; - 80028e6: 7bfa ldrb r2, [r7, #15] - 80028e8: 6879 ldr r1, [r7, #4] - 80028ea: 4613 mov r3, r2 - 80028ec: 00db lsls r3, r3, #3 - 80028ee: 4413 add r3, r2 - 80028f0: 009b lsls r3, r3, #2 - 80028f2: 440b add r3, r1 - 80028f4: 333c adds r3, #60 ; 0x3c - 80028f6: 7bfa ldrb r2, [r7, #15] - 80028f8: 701a strb r2, [r3, #0] - hpcd->IN_ep[i].tx_fifo_num = i; - 80028fa: 7bfa ldrb r2, [r7, #15] - 80028fc: 7bfb ldrb r3, [r7, #15] - 80028fe: b298 uxth r0, r3 - 8002900: 6879 ldr r1, [r7, #4] - 8002902: 4613 mov r3, r2 - 8002904: 00db lsls r3, r3, #3 - 8002906: 4413 add r3, r2 - 8002908: 009b lsls r3, r3, #2 - 800290a: 440b add r3, r1 - 800290c: 3356 adds r3, #86 ; 0x56 - 800290e: 4602 mov r2, r0 - 8002910: 801a strh r2, [r3, #0] - /* Control until ep is activated */ - hpcd->IN_ep[i].type = EP_TYPE_CTRL; - 8002912: 7bfa ldrb r2, [r7, #15] - 8002914: 6879 ldr r1, [r7, #4] - 8002916: 4613 mov r3, r2 - 8002918: 00db lsls r3, r3, #3 - 800291a: 4413 add r3, r2 - 800291c: 009b lsls r3, r3, #2 - 800291e: 440b add r3, r1 - 8002920: 3340 adds r3, #64 ; 0x40 - 8002922: 2200 movs r2, #0 - 8002924: 701a strb r2, [r3, #0] - hpcd->IN_ep[i].maxpacket = 0U; - 8002926: 7bfa ldrb r2, [r7, #15] - 8002928: 6879 ldr r1, [r7, #4] - 800292a: 4613 mov r3, r2 - 800292c: 00db lsls r3, r3, #3 - 800292e: 4413 add r3, r2 - 8002930: 009b lsls r3, r3, #2 - 8002932: 440b add r3, r1 - 8002934: 3344 adds r3, #68 ; 0x44 - 8002936: 2200 movs r2, #0 - 8002938: 601a str r2, [r3, #0] - hpcd->IN_ep[i].xfer_buff = 0U; - 800293a: 7bfa ldrb r2, [r7, #15] - 800293c: 6879 ldr r1, [r7, #4] - 800293e: 4613 mov r3, r2 - 8002940: 00db lsls r3, r3, #3 - 8002942: 4413 add r3, r2 - 8002944: 009b lsls r3, r3, #2 - 8002946: 440b add r3, r1 - 8002948: 3348 adds r3, #72 ; 0x48 - 800294a: 2200 movs r2, #0 - 800294c: 601a str r2, [r3, #0] - hpcd->IN_ep[i].xfer_len = 0U; - 800294e: 7bfa ldrb r2, [r7, #15] - 8002950: 6879 ldr r1, [r7, #4] - 8002952: 4613 mov r3, r2 - 8002954: 00db lsls r3, r3, #3 - 8002956: 4413 add r3, r2 - 8002958: 009b lsls r3, r3, #2 - 800295a: 440b add r3, r1 - 800295c: 334c adds r3, #76 ; 0x4c - 800295e: 2200 movs r2, #0 - 8002960: 601a str r2, [r3, #0] - for (i = 0U; i < hpcd->Init.dev_endpoints; i++) - 8002962: 7bfb ldrb r3, [r7, #15] - 8002964: 3301 adds r3, #1 - 8002966: 73fb strb r3, [r7, #15] - 8002968: 7bfa ldrb r2, [r7, #15] - 800296a: 687b ldr r3, [r7, #4] - 800296c: 685b ldr r3, [r3, #4] - 800296e: 429a cmp r2, r3 - 8002970: d3af bcc.n 80028d2 - } - - for (i = 0U; i < hpcd->Init.dev_endpoints; i++) - 8002972: 2300 movs r3, #0 - 8002974: 73fb strb r3, [r7, #15] - 8002976: e044 b.n 8002a02 - { - hpcd->OUT_ep[i].is_in = 0U; - 8002978: 7bfa ldrb r2, [r7, #15] - 800297a: 6879 ldr r1, [r7, #4] - 800297c: 4613 mov r3, r2 - 800297e: 00db lsls r3, r3, #3 - 8002980: 4413 add r3, r2 - 8002982: 009b lsls r3, r3, #2 - 8002984: 440b add r3, r1 - 8002986: f203 237d addw r3, r3, #637 ; 0x27d - 800298a: 2200 movs r2, #0 - 800298c: 701a strb r2, [r3, #0] - hpcd->OUT_ep[i].num = i; - 800298e: 7bfa ldrb r2, [r7, #15] - 8002990: 6879 ldr r1, [r7, #4] - 8002992: 4613 mov r3, r2 - 8002994: 00db lsls r3, r3, #3 - 8002996: 4413 add r3, r2 - 8002998: 009b lsls r3, r3, #2 - 800299a: 440b add r3, r1 - 800299c: f503 731f add.w r3, r3, #636 ; 0x27c - 80029a0: 7bfa ldrb r2, [r7, #15] - 80029a2: 701a strb r2, [r3, #0] - /* Control until ep is activated */ - hpcd->OUT_ep[i].type = EP_TYPE_CTRL; - 80029a4: 7bfa ldrb r2, [r7, #15] - 80029a6: 6879 ldr r1, [r7, #4] - 80029a8: 4613 mov r3, r2 - 80029aa: 00db lsls r3, r3, #3 - 80029ac: 4413 add r3, r2 - 80029ae: 009b lsls r3, r3, #2 - 80029b0: 440b add r3, r1 - 80029b2: f503 7320 add.w r3, r3, #640 ; 0x280 - 80029b6: 2200 movs r2, #0 - 80029b8: 701a strb r2, [r3, #0] - hpcd->OUT_ep[i].maxpacket = 0U; - 80029ba: 7bfa ldrb r2, [r7, #15] - 80029bc: 6879 ldr r1, [r7, #4] - 80029be: 4613 mov r3, r2 - 80029c0: 00db lsls r3, r3, #3 - 80029c2: 4413 add r3, r2 - 80029c4: 009b lsls r3, r3, #2 - 80029c6: 440b add r3, r1 - 80029c8: f503 7321 add.w r3, r3, #644 ; 0x284 - 80029cc: 2200 movs r2, #0 - 80029ce: 601a str r2, [r3, #0] - hpcd->OUT_ep[i].xfer_buff = 0U; - 80029d0: 7bfa ldrb r2, [r7, #15] - 80029d2: 6879 ldr r1, [r7, #4] - 80029d4: 4613 mov r3, r2 - 80029d6: 00db lsls r3, r3, #3 - 80029d8: 4413 add r3, r2 - 80029da: 009b lsls r3, r3, #2 - 80029dc: 440b add r3, r1 - 80029de: f503 7322 add.w r3, r3, #648 ; 0x288 - 80029e2: 2200 movs r2, #0 - 80029e4: 601a str r2, [r3, #0] - hpcd->OUT_ep[i].xfer_len = 0U; - 80029e6: 7bfa ldrb r2, [r7, #15] - 80029e8: 6879 ldr r1, [r7, #4] - 80029ea: 4613 mov r3, r2 - 80029ec: 00db lsls r3, r3, #3 - 80029ee: 4413 add r3, r2 - 80029f0: 009b lsls r3, r3, #2 - 80029f2: 440b add r3, r1 - 80029f4: f503 7323 add.w r3, r3, #652 ; 0x28c - 80029f8: 2200 movs r2, #0 - 80029fa: 601a str r2, [r3, #0] - for (i = 0U; i < hpcd->Init.dev_endpoints; i++) - 80029fc: 7bfb ldrb r3, [r7, #15] - 80029fe: 3301 adds r3, #1 - 8002a00: 73fb strb r3, [r7, #15] - 8002a02: 7bfa ldrb r2, [r7, #15] - 8002a04: 687b ldr r3, [r7, #4] - 8002a06: 685b ldr r3, [r3, #4] - 8002a08: 429a cmp r2, r3 - 8002a0a: d3b5 bcc.n 8002978 - } - - /* Init Device */ - if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK) - 8002a0c: 687b ldr r3, [r7, #4] - 8002a0e: 681b ldr r3, [r3, #0] - 8002a10: 603b str r3, [r7, #0] - 8002a12: 687e ldr r6, [r7, #4] - 8002a14: 466d mov r5, sp - 8002a16: f106 0410 add.w r4, r6, #16 - 8002a1a: cc0f ldmia r4!, {r0, r1, r2, r3} - 8002a1c: c50f stmia r5!, {r0, r1, r2, r3} - 8002a1e: cc0f ldmia r4!, {r0, r1, r2, r3} - 8002a20: c50f stmia r5!, {r0, r1, r2, r3} - 8002a22: e894 0003 ldmia.w r4, {r0, r1} - 8002a26: e885 0003 stmia.w r5, {r0, r1} - 8002a2a: 1d33 adds r3, r6, #4 - 8002a2c: cb0e ldmia r3, {r1, r2, r3} - 8002a2e: 6838 ldr r0, [r7, #0] - 8002a30: f001 fdc8 bl 80045c4 - 8002a34: 4603 mov r3, r0 - 8002a36: 2b00 cmp r3, #0 - 8002a38: d005 beq.n 8002a46 - { - hpcd->State = HAL_PCD_STATE_ERROR; - 8002a3a: 687b ldr r3, [r7, #4] - 8002a3c: 2202 movs r2, #2 - 8002a3e: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd - return HAL_ERROR; - 8002a42: 2301 movs r3, #1 - 8002a44: e00d b.n 8002a62 - } - - hpcd->USB_Address = 0U; - 8002a46: 687b ldr r3, [r7, #4] - 8002a48: 2200 movs r2, #0 - 8002a4a: f883 2038 strb.w r2, [r3, #56] ; 0x38 - hpcd->State = HAL_PCD_STATE_READY; - 8002a4e: 687b ldr r3, [r7, #4] - 8002a50: 2201 movs r2, #1 - 8002a52: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd - (void)USB_DevDisconnect(hpcd->Instance); - 8002a56: 687b ldr r3, [r7, #4] - 8002a58: 681b ldr r3, [r3, #0] - 8002a5a: 4618 mov r0, r3 - 8002a5c: f001 ff88 bl 8004970 - - return HAL_OK; - 8002a60: 2300 movs r3, #0 -} - 8002a62: 4618 mov r0, r3 - 8002a64: 3714 adds r7, #20 - 8002a66: 46bd mov sp, r7 - 8002a68: bdf0 pop {r4, r5, r6, r7, pc} - ... - -08002a6c : - * supported by this API. User should request a transition to HSE Off - * first and then HSE On or HSE Bypass. - * @retval HAL status - */ -HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) -{ - 8002a6c: b580 push {r7, lr} - 8002a6e: b08a sub sp, #40 ; 0x28 - 8002a70: af00 add r7, sp, #0 - 8002a72: 6078 str r0, [r7, #4] - uint32_t tickstart; - - /* Check Null pointer */ - if(RCC_OscInitStruct == NULL) - 8002a74: 687b ldr r3, [r7, #4] - 8002a76: 2b00 cmp r3, #0 - 8002a78: d101 bne.n 8002a7e - { - return HAL_ERROR; - 8002a7a: 2301 movs r3, #1 - 8002a7c: e23b b.n 8002ef6 - } - - /* Check the parameters */ - assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); - /*------------------------------- HSE Configuration ------------------------*/ - if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) - 8002a7e: 687b ldr r3, [r7, #4] - 8002a80: 681b ldr r3, [r3, #0] - 8002a82: f003 0301 and.w r3, r3, #1 - 8002a86: 2b00 cmp r3, #0 - 8002a88: d050 beq.n 8002b2c - { - /* Check the parameters */ - assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); - /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */ - if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\ - 8002a8a: 4b9e ldr r3, [pc, #632] ; (8002d04 ) - 8002a8c: 689b ldr r3, [r3, #8] - 8002a8e: f003 030c and.w r3, r3, #12 - 8002a92: 2b04 cmp r3, #4 - 8002a94: d00c beq.n 8002ab0 - ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE))) - 8002a96: 4b9b ldr r3, [pc, #620] ; (8002d04 ) - 8002a98: 689b ldr r3, [r3, #8] - 8002a9a: f003 030c and.w r3, r3, #12 - if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\ - 8002a9e: 2b08 cmp r3, #8 - 8002aa0: d112 bne.n 8002ac8 - ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE))) - 8002aa2: 4b98 ldr r3, [pc, #608] ; (8002d04 ) - 8002aa4: 685b ldr r3, [r3, #4] - 8002aa6: f403 0380 and.w r3, r3, #4194304 ; 0x400000 - 8002aaa: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000 - 8002aae: d10b bne.n 8002ac8 - { - if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) - 8002ab0: 4b94 ldr r3, [pc, #592] ; (8002d04 ) - 8002ab2: 681b ldr r3, [r3, #0] - 8002ab4: f403 3300 and.w r3, r3, #131072 ; 0x20000 - 8002ab8: 2b00 cmp r3, #0 - 8002aba: d036 beq.n 8002b2a - 8002abc: 687b ldr r3, [r7, #4] - 8002abe: 685b ldr r3, [r3, #4] - 8002ac0: 2b00 cmp r3, #0 - 8002ac2: d132 bne.n 8002b2a - { - return HAL_ERROR; - 8002ac4: 2301 movs r3, #1 - 8002ac6: e216 b.n 8002ef6 - } - } - else - { - /* Set the new HSE configuration ---------------------------------------*/ - __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); - 8002ac8: 687b ldr r3, [r7, #4] - 8002aca: 685a ldr r2, [r3, #4] - 8002acc: 4b8e ldr r3, [pc, #568] ; (8002d08 ) - 8002ace: b2d2 uxtb r2, r2 - 8002ad0: 701a strb r2, [r3, #0] - - /* Check the HSE State */ - if((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF) - 8002ad2: 687b ldr r3, [r7, #4] - 8002ad4: 685b ldr r3, [r3, #4] - 8002ad6: 2b00 cmp r3, #0 - 8002ad8: d013 beq.n 8002b02 - { - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002ada: f7fe fb43 bl 8001164 - 8002ade: 6238 str r0, [r7, #32] - - /* Wait till HSE is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) - 8002ae0: e008 b.n 8002af4 - { - if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) - 8002ae2: f7fe fb3f bl 8001164 - 8002ae6: 4602 mov r2, r0 - 8002ae8: 6a3b ldr r3, [r7, #32] - 8002aea: 1ad3 subs r3, r2, r3 - 8002aec: 2b64 cmp r3, #100 ; 0x64 - 8002aee: d901 bls.n 8002af4 - { - return HAL_TIMEOUT; - 8002af0: 2303 movs r3, #3 - 8002af2: e200 b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) - 8002af4: 4b83 ldr r3, [pc, #524] ; (8002d04 ) - 8002af6: 681b ldr r3, [r3, #0] - 8002af8: f403 3300 and.w r3, r3, #131072 ; 0x20000 - 8002afc: 2b00 cmp r3, #0 - 8002afe: d0f0 beq.n 8002ae2 - 8002b00: e014 b.n 8002b2c - } - } - else - { - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002b02: f7fe fb2f bl 8001164 - 8002b06: 6238 str r0, [r7, #32] - - /* Wait till HSE is bypassed or disabled */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) - 8002b08: e008 b.n 8002b1c - { - if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) - 8002b0a: f7fe fb2b bl 8001164 - 8002b0e: 4602 mov r2, r0 - 8002b10: 6a3b ldr r3, [r7, #32] - 8002b12: 1ad3 subs r3, r2, r3 - 8002b14: 2b64 cmp r3, #100 ; 0x64 - 8002b16: d901 bls.n 8002b1c - { - return HAL_TIMEOUT; - 8002b18: 2303 movs r3, #3 - 8002b1a: e1ec b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) - 8002b1c: 4b79 ldr r3, [pc, #484] ; (8002d04 ) - 8002b1e: 681b ldr r3, [r3, #0] - 8002b20: f403 3300 and.w r3, r3, #131072 ; 0x20000 - 8002b24: 2b00 cmp r3, #0 - 8002b26: d1f0 bne.n 8002b0a - 8002b28: e000 b.n 8002b2c - if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) - 8002b2a: bf00 nop - } - } - } - } - /*----------------------------- HSI Configuration --------------------------*/ - if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) - 8002b2c: 687b ldr r3, [r7, #4] - 8002b2e: 681b ldr r3, [r3, #0] - 8002b30: f003 0302 and.w r3, r3, #2 - 8002b34: 2b00 cmp r3, #0 - 8002b36: d077 beq.n 8002c28 - /* Check the parameters */ - assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); - assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); - - /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */ - if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\ - 8002b38: 4b72 ldr r3, [pc, #456] ; (8002d04 ) - 8002b3a: 689b ldr r3, [r3, #8] - 8002b3c: f003 030c and.w r3, r3, #12 - 8002b40: 2b00 cmp r3, #0 - 8002b42: d00b beq.n 8002b5c - ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI))) - 8002b44: 4b6f ldr r3, [pc, #444] ; (8002d04 ) - 8002b46: 689b ldr r3, [r3, #8] - 8002b48: f003 030c and.w r3, r3, #12 - if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\ - 8002b4c: 2b08 cmp r3, #8 - 8002b4e: d126 bne.n 8002b9e - ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI))) - 8002b50: 4b6c ldr r3, [pc, #432] ; (8002d04 ) - 8002b52: 685b ldr r3, [r3, #4] - 8002b54: f403 0380 and.w r3, r3, #4194304 ; 0x400000 - 8002b58: 2b00 cmp r3, #0 - 8002b5a: d120 bne.n 8002b9e - { - /* When HSI is used as system clock it will not disabled */ - if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) - 8002b5c: 4b69 ldr r3, [pc, #420] ; (8002d04 ) - 8002b5e: 681b ldr r3, [r3, #0] - 8002b60: f003 0302 and.w r3, r3, #2 - 8002b64: 2b00 cmp r3, #0 - 8002b66: d005 beq.n 8002b74 - 8002b68: 687b ldr r3, [r7, #4] - 8002b6a: 68db ldr r3, [r3, #12] - 8002b6c: 2b01 cmp r3, #1 - 8002b6e: d001 beq.n 8002b74 - { - return HAL_ERROR; - 8002b70: 2301 movs r3, #1 - 8002b72: e1c0 b.n 8002ef6 - } - /* Otherwise, just the calibration is allowed */ - else - { - /* Adjusts the Internal High Speed oscillator (HSI) calibration value. */ - __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); - 8002b74: 4b63 ldr r3, [pc, #396] ; (8002d04 ) - 8002b76: 681b ldr r3, [r3, #0] - 8002b78: f023 02f8 bic.w r2, r3, #248 ; 0xf8 - 8002b7c: 687b ldr r3, [r7, #4] - 8002b7e: 691b ldr r3, [r3, #16] - 8002b80: 21f8 movs r1, #248 ; 0xf8 - 8002b82: 61b9 str r1, [r7, #24] - uint32_t result; - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) - __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); - 8002b84: 69b9 ldr r1, [r7, #24] - 8002b86: fa91 f1a1 rbit r1, r1 - 8002b8a: 6179 str r1, [r7, #20] - result |= value & 1U; - s--; - } - result <<= s; /* shift when v's highest bits are zero */ -#endif - return result; - 8002b8c: 6979 ldr r1, [r7, #20] - 8002b8e: fab1 f181 clz r1, r1 - 8002b92: b2c9 uxtb r1, r1 - 8002b94: 408b lsls r3, r1 - 8002b96: 495b ldr r1, [pc, #364] ; (8002d04 ) - 8002b98: 4313 orrs r3, r2 - 8002b9a: 600b str r3, [r1, #0] - if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) - 8002b9c: e044 b.n 8002c28 - } - } - else - { - /* Check the HSI State */ - if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF) - 8002b9e: 687b ldr r3, [r7, #4] - 8002ba0: 68db ldr r3, [r3, #12] - 8002ba2: 2b00 cmp r3, #0 - 8002ba4: d02a beq.n 8002bfc - { - /* Enable the Internal High Speed oscillator (HSI). */ - __HAL_RCC_HSI_ENABLE(); - 8002ba6: 4b59 ldr r3, [pc, #356] ; (8002d0c ) - 8002ba8: 2201 movs r2, #1 - 8002baa: 601a str r2, [r3, #0] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002bac: f7fe fada bl 8001164 - 8002bb0: 6238 str r0, [r7, #32] - - /* Wait till HSI is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) - 8002bb2: e008 b.n 8002bc6 - { - if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) - 8002bb4: f7fe fad6 bl 8001164 - 8002bb8: 4602 mov r2, r0 - 8002bba: 6a3b ldr r3, [r7, #32] - 8002bbc: 1ad3 subs r3, r2, r3 - 8002bbe: 2b02 cmp r3, #2 - 8002bc0: d901 bls.n 8002bc6 - { - return HAL_TIMEOUT; - 8002bc2: 2303 movs r3, #3 - 8002bc4: e197 b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) - 8002bc6: 4b4f ldr r3, [pc, #316] ; (8002d04 ) - 8002bc8: 681b ldr r3, [r3, #0] - 8002bca: f003 0302 and.w r3, r3, #2 - 8002bce: 2b00 cmp r3, #0 - 8002bd0: d0f0 beq.n 8002bb4 - } - } - - /* Adjusts the Internal High Speed oscillator (HSI) calibration value. */ - __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); - 8002bd2: 4b4c ldr r3, [pc, #304] ; (8002d04 ) - 8002bd4: 681b ldr r3, [r3, #0] - 8002bd6: f023 02f8 bic.w r2, r3, #248 ; 0xf8 - 8002bda: 687b ldr r3, [r7, #4] - 8002bdc: 691b ldr r3, [r3, #16] - 8002bde: 21f8 movs r1, #248 ; 0xf8 - 8002be0: 6139 str r1, [r7, #16] - __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); - 8002be2: 6939 ldr r1, [r7, #16] - 8002be4: fa91 f1a1 rbit r1, r1 - 8002be8: 60f9 str r1, [r7, #12] - return result; - 8002bea: 68f9 ldr r1, [r7, #12] - 8002bec: fab1 f181 clz r1, r1 - 8002bf0: b2c9 uxtb r1, r1 - 8002bf2: 408b lsls r3, r1 - 8002bf4: 4943 ldr r1, [pc, #268] ; (8002d04 ) - 8002bf6: 4313 orrs r3, r2 - 8002bf8: 600b str r3, [r1, #0] - 8002bfa: e015 b.n 8002c28 - } - else - { - /* Disable the Internal High Speed oscillator (HSI). */ - __HAL_RCC_HSI_DISABLE(); - 8002bfc: 4b43 ldr r3, [pc, #268] ; (8002d0c ) - 8002bfe: 2200 movs r2, #0 - 8002c00: 601a str r2, [r3, #0] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002c02: f7fe faaf bl 8001164 - 8002c06: 6238 str r0, [r7, #32] - - /* Wait till HSI is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) - 8002c08: e008 b.n 8002c1c - { - if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) - 8002c0a: f7fe faab bl 8001164 - 8002c0e: 4602 mov r2, r0 - 8002c10: 6a3b ldr r3, [r7, #32] - 8002c12: 1ad3 subs r3, r2, r3 - 8002c14: 2b02 cmp r3, #2 - 8002c16: d901 bls.n 8002c1c - { - return HAL_TIMEOUT; - 8002c18: 2303 movs r3, #3 - 8002c1a: e16c b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) - 8002c1c: 4b39 ldr r3, [pc, #228] ; (8002d04 ) - 8002c1e: 681b ldr r3, [r3, #0] - 8002c20: f003 0302 and.w r3, r3, #2 - 8002c24: 2b00 cmp r3, #0 - 8002c26: d1f0 bne.n 8002c0a - } - } - } - } - /*------------------------------ LSI Configuration -------------------------*/ - if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) - 8002c28: 687b ldr r3, [r7, #4] - 8002c2a: 681b ldr r3, [r3, #0] - 8002c2c: f003 0308 and.w r3, r3, #8 - 8002c30: 2b00 cmp r3, #0 - 8002c32: d030 beq.n 8002c96 - { - /* Check the parameters */ - assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); - - /* Check the LSI State */ - if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF) - 8002c34: 687b ldr r3, [r7, #4] - 8002c36: 695b ldr r3, [r3, #20] - 8002c38: 2b00 cmp r3, #0 - 8002c3a: d016 beq.n 8002c6a - { - /* Enable the Internal Low Speed oscillator (LSI). */ - __HAL_RCC_LSI_ENABLE(); - 8002c3c: 4b34 ldr r3, [pc, #208] ; (8002d10 ) - 8002c3e: 2201 movs r2, #1 - 8002c40: 601a str r2, [r3, #0] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002c42: f7fe fa8f bl 8001164 - 8002c46: 6238 str r0, [r7, #32] - - /* Wait till LSI is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) - 8002c48: e008 b.n 8002c5c - { - if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) - 8002c4a: f7fe fa8b bl 8001164 - 8002c4e: 4602 mov r2, r0 - 8002c50: 6a3b ldr r3, [r7, #32] - 8002c52: 1ad3 subs r3, r2, r3 - 8002c54: 2b02 cmp r3, #2 - 8002c56: d901 bls.n 8002c5c - { - return HAL_TIMEOUT; - 8002c58: 2303 movs r3, #3 - 8002c5a: e14c b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) - 8002c5c: 4b29 ldr r3, [pc, #164] ; (8002d04 ) - 8002c5e: 6f5b ldr r3, [r3, #116] ; 0x74 - 8002c60: f003 0302 and.w r3, r3, #2 - 8002c64: 2b00 cmp r3, #0 - 8002c66: d0f0 beq.n 8002c4a - 8002c68: e015 b.n 8002c96 - } - } - else - { - /* Disable the Internal Low Speed oscillator (LSI). */ - __HAL_RCC_LSI_DISABLE(); - 8002c6a: 4b29 ldr r3, [pc, #164] ; (8002d10 ) - 8002c6c: 2200 movs r2, #0 - 8002c6e: 601a str r2, [r3, #0] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002c70: f7fe fa78 bl 8001164 - 8002c74: 6238 str r0, [r7, #32] - - /* Wait till LSI is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) - 8002c76: e008 b.n 8002c8a - { - if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) - 8002c78: f7fe fa74 bl 8001164 - 8002c7c: 4602 mov r2, r0 - 8002c7e: 6a3b ldr r3, [r7, #32] - 8002c80: 1ad3 subs r3, r2, r3 - 8002c82: 2b02 cmp r3, #2 - 8002c84: d901 bls.n 8002c8a - { - return HAL_TIMEOUT; - 8002c86: 2303 movs r3, #3 - 8002c88: e135 b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) - 8002c8a: 4b1e ldr r3, [pc, #120] ; (8002d04 ) - 8002c8c: 6f5b ldr r3, [r3, #116] ; 0x74 - 8002c8e: f003 0302 and.w r3, r3, #2 - 8002c92: 2b00 cmp r3, #0 - 8002c94: d1f0 bne.n 8002c78 - } - } - } - } - /*------------------------------ LSE Configuration -------------------------*/ - if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) - 8002c96: 687b ldr r3, [r7, #4] - 8002c98: 681b ldr r3, [r3, #0] - 8002c9a: f003 0304 and.w r3, r3, #4 - 8002c9e: 2b00 cmp r3, #0 - 8002ca0: f000 8087 beq.w 8002db2 - { - FlagStatus pwrclkchanged = RESET; - 8002ca4: 2300 movs r3, #0 - 8002ca6: f887 3027 strb.w r3, [r7, #39] ; 0x27 - /* Check the parameters */ - assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); - - /* Update LSE configuration in Backup Domain control register */ - /* Requires to enable write access to Backup Domain of necessary */ - if(__HAL_RCC_PWR_IS_CLK_DISABLED()) - 8002caa: 4b16 ldr r3, [pc, #88] ; (8002d04 ) - 8002cac: 6c1b ldr r3, [r3, #64] ; 0x40 - 8002cae: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 - 8002cb2: 2b00 cmp r3, #0 - 8002cb4: d110 bne.n 8002cd8 - { - __HAL_RCC_PWR_CLK_ENABLE(); - 8002cb6: 2300 movs r3, #0 - 8002cb8: 60bb str r3, [r7, #8] - 8002cba: 4b12 ldr r3, [pc, #72] ; (8002d04 ) - 8002cbc: 6c1b ldr r3, [r3, #64] ; 0x40 - 8002cbe: 4a11 ldr r2, [pc, #68] ; (8002d04 ) - 8002cc0: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 - 8002cc4: 6413 str r3, [r2, #64] ; 0x40 - 8002cc6: 4b0f ldr r3, [pc, #60] ; (8002d04 ) - 8002cc8: 6c1b ldr r3, [r3, #64] ; 0x40 - 8002cca: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 - 8002cce: 60bb str r3, [r7, #8] - 8002cd0: 68bb ldr r3, [r7, #8] - pwrclkchanged = SET; - 8002cd2: 2301 movs r3, #1 - 8002cd4: f887 3027 strb.w r3, [r7, #39] ; 0x27 - } - - /* Enable write access to Backup domain */ - PWR->CR |= PWR_CR_DBP; - 8002cd8: 4b0e ldr r3, [pc, #56] ; (8002d14 ) - 8002cda: 681b ldr r3, [r3, #0] - 8002cdc: 4a0d ldr r2, [pc, #52] ; (8002d14 ) - 8002cde: f443 7380 orr.w r3, r3, #256 ; 0x100 - 8002ce2: 6013 str r3, [r2, #0] - - if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) - 8002ce4: 4b0b ldr r3, [pc, #44] ; (8002d14 ) - 8002ce6: 681b ldr r3, [r3, #0] - 8002ce8: f403 7380 and.w r3, r3, #256 ; 0x100 - 8002cec: 2b00 cmp r3, #0 - 8002cee: d122 bne.n 8002d36 - { - /* Enable write access to Backup domain */ - SET_BIT(PWR->CR, PWR_CR_DBP); - 8002cf0: 4b08 ldr r3, [pc, #32] ; (8002d14 ) - 8002cf2: 681b ldr r3, [r3, #0] - 8002cf4: 4a07 ldr r2, [pc, #28] ; (8002d14 ) - 8002cf6: f443 7380 orr.w r3, r3, #256 ; 0x100 - 8002cfa: 6013 str r3, [r2, #0] - - /* Wait for Backup domain Write protection disable */ - tickstart = HAL_GetTick(); - 8002cfc: f7fe fa32 bl 8001164 - 8002d00: 6238 str r0, [r7, #32] - - while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) - 8002d02: e012 b.n 8002d2a - 8002d04: 40023800 .word 0x40023800 - 8002d08: 40023802 .word 0x40023802 - 8002d0c: 42470000 .word 0x42470000 - 8002d10: 42470e80 .word 0x42470e80 - 8002d14: 40007000 .word 0x40007000 - { - if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) - 8002d18: f7fe fa24 bl 8001164 - 8002d1c: 4602 mov r2, r0 - 8002d1e: 6a3b ldr r3, [r7, #32] - 8002d20: 1ad3 subs r3, r2, r3 - 8002d22: 2b02 cmp r3, #2 - 8002d24: d901 bls.n 8002d2a - { - return HAL_TIMEOUT; - 8002d26: 2303 movs r3, #3 - 8002d28: e0e5 b.n 8002ef6 - while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) - 8002d2a: 4b75 ldr r3, [pc, #468] ; (8002f00 ) - 8002d2c: 681b ldr r3, [r3, #0] - 8002d2e: f403 7380 and.w r3, r3, #256 ; 0x100 - 8002d32: 2b00 cmp r3, #0 - 8002d34: d0f0 beq.n 8002d18 - } - } - } - - /* Set the new LSE configuration -----------------------------------------*/ - __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); - 8002d36: 687b ldr r3, [r7, #4] - 8002d38: 689a ldr r2, [r3, #8] - 8002d3a: 4b72 ldr r3, [pc, #456] ; (8002f04 ) - 8002d3c: b2d2 uxtb r2, r2 - 8002d3e: 701a strb r2, [r3, #0] - /* Check the LSE State */ - if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF) - 8002d40: 687b ldr r3, [r7, #4] - 8002d42: 689b ldr r3, [r3, #8] - 8002d44: 2b00 cmp r3, #0 - 8002d46: d015 beq.n 8002d74 - { - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002d48: f7fe fa0c bl 8001164 - 8002d4c: 6238 str r0, [r7, #32] - - /* Wait till LSE is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) - 8002d4e: e00a b.n 8002d66 - { - if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) - 8002d50: f7fe fa08 bl 8001164 - 8002d54: 4602 mov r2, r0 - 8002d56: 6a3b ldr r3, [r7, #32] - 8002d58: 1ad3 subs r3, r2, r3 - 8002d5a: f241 3288 movw r2, #5000 ; 0x1388 - 8002d5e: 4293 cmp r3, r2 - 8002d60: d901 bls.n 8002d66 - { - return HAL_TIMEOUT; - 8002d62: 2303 movs r3, #3 - 8002d64: e0c7 b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) - 8002d66: 4b68 ldr r3, [pc, #416] ; (8002f08 ) - 8002d68: 6f1b ldr r3, [r3, #112] ; 0x70 - 8002d6a: f003 0302 and.w r3, r3, #2 - 8002d6e: 2b00 cmp r3, #0 - 8002d70: d0ee beq.n 8002d50 - 8002d72: e014 b.n 8002d9e - } - } - else - { - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002d74: f7fe f9f6 bl 8001164 - 8002d78: 6238 str r0, [r7, #32] - - /* Wait till LSE is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) - 8002d7a: e00a b.n 8002d92 - { - if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) - 8002d7c: f7fe f9f2 bl 8001164 - 8002d80: 4602 mov r2, r0 - 8002d82: 6a3b ldr r3, [r7, #32] - 8002d84: 1ad3 subs r3, r2, r3 - 8002d86: f241 3288 movw r2, #5000 ; 0x1388 - 8002d8a: 4293 cmp r3, r2 - 8002d8c: d901 bls.n 8002d92 - { - return HAL_TIMEOUT; - 8002d8e: 2303 movs r3, #3 - 8002d90: e0b1 b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) - 8002d92: 4b5d ldr r3, [pc, #372] ; (8002f08 ) - 8002d94: 6f1b ldr r3, [r3, #112] ; 0x70 - 8002d96: f003 0302 and.w r3, r3, #2 - 8002d9a: 2b00 cmp r3, #0 - 8002d9c: d1ee bne.n 8002d7c - } - } - } - - /* Restore clock configuration if changed */ - if(pwrclkchanged == SET) - 8002d9e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 - 8002da2: 2b01 cmp r3, #1 - 8002da4: d105 bne.n 8002db2 - { - __HAL_RCC_PWR_CLK_DISABLE(); - 8002da6: 4b58 ldr r3, [pc, #352] ; (8002f08 ) - 8002da8: 6c1b ldr r3, [r3, #64] ; 0x40 - 8002daa: 4a57 ldr r2, [pc, #348] ; (8002f08 ) - 8002dac: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000 - 8002db0: 6413 str r3, [r2, #64] ; 0x40 - } - } - /*-------------------------------- PLL Configuration -----------------------*/ - /* Check the parameters */ - assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); - if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) - 8002db2: 687b ldr r3, [r7, #4] - 8002db4: 699b ldr r3, [r3, #24] - 8002db6: 2b00 cmp r3, #0 - 8002db8: f000 809c beq.w 8002ef4 - { - /* Check if the PLL is used as system clock or not */ - if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL) - 8002dbc: 4b52 ldr r3, [pc, #328] ; (8002f08 ) - 8002dbe: 689b ldr r3, [r3, #8] - 8002dc0: f003 030c and.w r3, r3, #12 - 8002dc4: 2b08 cmp r3, #8 - 8002dc6: d061 beq.n 8002e8c - { - if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) - 8002dc8: 687b ldr r3, [r7, #4] - 8002dca: 699b ldr r3, [r3, #24] - 8002dcc: 2b02 cmp r3, #2 - 8002dce: d146 bne.n 8002e5e - assert_param(IS_RCC_PLLN_VALUE(RCC_OscInitStruct->PLL.PLLN)); - assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP)); - assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ)); - - /* Disable the main PLL. */ - __HAL_RCC_PLL_DISABLE(); - 8002dd0: 4b4e ldr r3, [pc, #312] ; (8002f0c ) - 8002dd2: 2200 movs r2, #0 - 8002dd4: 601a str r2, [r3, #0] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002dd6: f7fe f9c5 bl 8001164 - 8002dda: 6238 str r0, [r7, #32] - - /* Wait till PLL is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) - 8002ddc: e008 b.n 8002df0 - { - if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) - 8002dde: f7fe f9c1 bl 8001164 - 8002de2: 4602 mov r2, r0 - 8002de4: 6a3b ldr r3, [r7, #32] - 8002de6: 1ad3 subs r3, r2, r3 - 8002de8: 2b64 cmp r3, #100 ; 0x64 - 8002dea: d901 bls.n 8002df0 - { - return HAL_TIMEOUT; - 8002dec: 2303 movs r3, #3 - 8002dee: e082 b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) - 8002df0: 4b45 ldr r3, [pc, #276] ; (8002f08 ) - 8002df2: 681b ldr r3, [r3, #0] - 8002df4: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 - 8002df8: 2b00 cmp r3, #0 - 8002dfa: d1f0 bne.n 8002dde - } - } - - /* Configure the main PLL clock source, multiplication and division factors. */ - __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, - 8002dfc: 4b42 ldr r3, [pc, #264] ; (8002f08 ) - 8002dfe: 685a ldr r2, [r3, #4] - 8002e00: 4b43 ldr r3, [pc, #268] ; (8002f10 ) - 8002e02: 4013 ands r3, r2 - 8002e04: 687a ldr r2, [r7, #4] - 8002e06: 69d1 ldr r1, [r2, #28] - 8002e08: 687a ldr r2, [r7, #4] - 8002e0a: 6a12 ldr r2, [r2, #32] - 8002e0c: 4311 orrs r1, r2 - 8002e0e: 687a ldr r2, [r7, #4] - 8002e10: 6a52 ldr r2, [r2, #36] ; 0x24 - 8002e12: 0192 lsls r2, r2, #6 - 8002e14: 4311 orrs r1, r2 - 8002e16: 687a ldr r2, [r7, #4] - 8002e18: 6ad2 ldr r2, [r2, #44] ; 0x2c - 8002e1a: 0612 lsls r2, r2, #24 - 8002e1c: 4311 orrs r1, r2 - 8002e1e: 687a ldr r2, [r7, #4] - 8002e20: 6a92 ldr r2, [r2, #40] ; 0x28 - 8002e22: 0852 lsrs r2, r2, #1 - 8002e24: 3a01 subs r2, #1 - 8002e26: 0412 lsls r2, r2, #16 - 8002e28: 430a orrs r2, r1 - 8002e2a: 4937 ldr r1, [pc, #220] ; (8002f08 ) - 8002e2c: 4313 orrs r3, r2 - 8002e2e: 604b str r3, [r1, #4] - RCC_OscInitStruct->PLL.PLLN, - RCC_OscInitStruct->PLL.PLLP, - RCC_OscInitStruct->PLL.PLLQ); - - /* Enable the main PLL. */ - __HAL_RCC_PLL_ENABLE(); - 8002e30: 4b36 ldr r3, [pc, #216] ; (8002f0c ) - 8002e32: 2201 movs r2, #1 - 8002e34: 601a str r2, [r3, #0] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002e36: f7fe f995 bl 8001164 - 8002e3a: 6238 str r0, [r7, #32] - - /* Wait till PLL is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) - 8002e3c: e008 b.n 8002e50 - { - if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) - 8002e3e: f7fe f991 bl 8001164 - 8002e42: 4602 mov r2, r0 - 8002e44: 6a3b ldr r3, [r7, #32] - 8002e46: 1ad3 subs r3, r2, r3 - 8002e48: 2b64 cmp r3, #100 ; 0x64 - 8002e4a: d901 bls.n 8002e50 - { - return HAL_TIMEOUT; - 8002e4c: 2303 movs r3, #3 - 8002e4e: e052 b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) - 8002e50: 4b2d ldr r3, [pc, #180] ; (8002f08 ) - 8002e52: 681b ldr r3, [r3, #0] - 8002e54: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 - 8002e58: 2b00 cmp r3, #0 - 8002e5a: d0f0 beq.n 8002e3e - 8002e5c: e04a b.n 8002ef4 - } - } - else - { - /* Disable the main PLL. */ - __HAL_RCC_PLL_DISABLE(); - 8002e5e: 4b2b ldr r3, [pc, #172] ; (8002f0c ) - 8002e60: 2200 movs r2, #0 - 8002e62: 601a str r2, [r3, #0] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002e64: f7fe f97e bl 8001164 - 8002e68: 6238 str r0, [r7, #32] - - /* Wait till PLL is ready */ - while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) - 8002e6a: e008 b.n 8002e7e - { - if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) - 8002e6c: f7fe f97a bl 8001164 - 8002e70: 4602 mov r2, r0 - 8002e72: 6a3b ldr r3, [r7, #32] - 8002e74: 1ad3 subs r3, r2, r3 - 8002e76: 2b64 cmp r3, #100 ; 0x64 - 8002e78: d901 bls.n 8002e7e - { - return HAL_TIMEOUT; - 8002e7a: 2303 movs r3, #3 - 8002e7c: e03b b.n 8002ef6 - while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) - 8002e7e: 4b22 ldr r3, [pc, #136] ; (8002f08 ) - 8002e80: 681b ldr r3, [r3, #0] - 8002e82: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 - 8002e86: 2b00 cmp r3, #0 - 8002e88: d1f0 bne.n 8002e6c - 8002e8a: e033 b.n 8002ef4 - } - } - else - { - /* Check if there is a request to disable the PLL used as System clock source */ - if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) - 8002e8c: 687b ldr r3, [r7, #4] - 8002e8e: 699b ldr r3, [r3, #24] - 8002e90: 2b01 cmp r3, #1 - 8002e92: d101 bne.n 8002e98 - { - return HAL_ERROR; - 8002e94: 2301 movs r3, #1 - 8002e96: e02e b.n 8002ef6 - } - else - { - /* Do not return HAL_ERROR if request repeats the current configuration */ - uint32_t pllcfgr = RCC->PLLCFGR; - 8002e98: 4b1b ldr r3, [pc, #108] ; (8002f08 ) - 8002e9a: 685b ldr r3, [r3, #4] - 8002e9c: 61fb str r3, [r7, #28] - - if((READ_BIT(pllcfgr, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || - 8002e9e: 69fb ldr r3, [r7, #28] - 8002ea0: f403 0280 and.w r2, r3, #4194304 ; 0x400000 - 8002ea4: 687b ldr r3, [r7, #4] - 8002ea6: 69db ldr r3, [r3, #28] - 8002ea8: 429a cmp r2, r3 - 8002eaa: d121 bne.n 8002ef0 - (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) || - 8002eac: 69fb ldr r3, [r7, #28] - 8002eae: f003 023f and.w r2, r3, #63 ; 0x3f - 8002eb2: 687b ldr r3, [r7, #4] - 8002eb4: 6a1b ldr r3, [r3, #32] - if((READ_BIT(pllcfgr, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || - 8002eb6: 429a cmp r2, r3 - 8002eb8: d11a bne.n 8002ef0 - (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) || - 8002eba: 69fa ldr r2, [r7, #28] - 8002ebc: f647 73c0 movw r3, #32704 ; 0x7fc0 - 8002ec0: 4013 ands r3, r2 - 8002ec2: 687a ldr r2, [r7, #4] - 8002ec4: 6a52 ldr r2, [r2, #36] ; 0x24 - 8002ec6: 0192 lsls r2, r2, #6 - (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) || - 8002ec8: 4293 cmp r3, r2 - 8002eca: d111 bne.n 8002ef0 - (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) || - 8002ecc: 69fb ldr r3, [r7, #28] - 8002ece: f403 3240 and.w r2, r3, #196608 ; 0x30000 - 8002ed2: 687b ldr r3, [r7, #4] - 8002ed4: 6a9b ldr r3, [r3, #40] ; 0x28 - 8002ed6: 085b lsrs r3, r3, #1 - 8002ed8: 3b01 subs r3, #1 - 8002eda: 041b lsls r3, r3, #16 - (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) || - 8002edc: 429a cmp r2, r3 - 8002ede: d107 bne.n 8002ef0 - (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos))) - 8002ee0: 69fb ldr r3, [r7, #28] - 8002ee2: f003 6270 and.w r2, r3, #251658240 ; 0xf000000 - 8002ee6: 687b ldr r3, [r7, #4] - 8002ee8: 6adb ldr r3, [r3, #44] ; 0x2c - 8002eea: 061b lsls r3, r3, #24 - (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) || - 8002eec: 429a cmp r2, r3 - 8002eee: d001 beq.n 8002ef4 - { - return HAL_ERROR; - 8002ef0: 2301 movs r3, #1 - 8002ef2: e000 b.n 8002ef6 - } - } - } - } - return HAL_OK; - 8002ef4: 2300 movs r3, #0 -} - 8002ef6: 4618 mov r0, r3 - 8002ef8: 3728 adds r7, #40 ; 0x28 - 8002efa: 46bd mov sp, r7 - 8002efc: bd80 pop {r7, pc} - 8002efe: bf00 nop - 8002f00: 40007000 .word 0x40007000 - 8002f04: 40023870 .word 0x40023870 - 8002f08: 40023800 .word 0x40023800 - 8002f0c: 42470060 .word 0x42470060 - 8002f10: f0bc8000 .word 0xf0bc8000 - -08002f14 : - * HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency - * (for more details refer to section above "Initialization/de-initialization functions") - * @retval None - */ -HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency) -{ - 8002f14: b580 push {r7, lr} - 8002f16: b086 sub sp, #24 - 8002f18: af00 add r7, sp, #0 - 8002f1a: 6078 str r0, [r7, #4] - 8002f1c: 6039 str r1, [r7, #0] - uint32_t tickstart; - - /* Check Null pointer */ - if(RCC_ClkInitStruct == NULL) - 8002f1e: 687b ldr r3, [r7, #4] - 8002f20: 2b00 cmp r3, #0 - 8002f22: d101 bne.n 8002f28 - { - return HAL_ERROR; - 8002f24: 2301 movs r3, #1 - 8002f26: e0d2 b.n 80030ce - /* To correctly read data from FLASH memory, the number of wait states (LATENCY) - must be correctly programmed according to the frequency of the CPU clock - (HCLK) and the supply voltage of the device. */ - - /* Increasing the number of wait states because of higher CPU frequency */ - if(FLatency > __HAL_FLASH_GET_LATENCY()) - 8002f28: 4b6b ldr r3, [pc, #428] ; (80030d8 ) - 8002f2a: 681b ldr r3, [r3, #0] - 8002f2c: f003 030f and.w r3, r3, #15 - 8002f30: 683a ldr r2, [r7, #0] - 8002f32: 429a cmp r2, r3 - 8002f34: d90c bls.n 8002f50 - { - /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ - __HAL_FLASH_SET_LATENCY(FLatency); - 8002f36: 4b68 ldr r3, [pc, #416] ; (80030d8 ) - 8002f38: 683a ldr r2, [r7, #0] - 8002f3a: b2d2 uxtb r2, r2 - 8002f3c: 701a strb r2, [r3, #0] - - /* Check that the new number of wait states is taken into account to access the Flash - memory by reading the FLASH_ACR register */ - if(__HAL_FLASH_GET_LATENCY() != FLatency) - 8002f3e: 4b66 ldr r3, [pc, #408] ; (80030d8 ) - 8002f40: 681b ldr r3, [r3, #0] - 8002f42: f003 030f and.w r3, r3, #15 - 8002f46: 683a ldr r2, [r7, #0] - 8002f48: 429a cmp r2, r3 - 8002f4a: d001 beq.n 8002f50 - { - return HAL_ERROR; - 8002f4c: 2301 movs r3, #1 - 8002f4e: e0be b.n 80030ce - } - } - - /*-------------------------- HCLK Configuration --------------------------*/ - if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) - 8002f50: 687b ldr r3, [r7, #4] - 8002f52: 681b ldr r3, [r3, #0] - 8002f54: f003 0302 and.w r3, r3, #2 - 8002f58: 2b00 cmp r3, #0 - 8002f5a: d020 beq.n 8002f9e - { - /* Set the highest APBx dividers in order to ensure that we do not go through - a non-spec phase whatever we decrease or increase HCLK. */ - if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) - 8002f5c: 687b ldr r3, [r7, #4] - 8002f5e: 681b ldr r3, [r3, #0] - 8002f60: f003 0304 and.w r3, r3, #4 - 8002f64: 2b00 cmp r3, #0 - 8002f66: d005 beq.n 8002f74 - { - MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16); - 8002f68: 4b5c ldr r3, [pc, #368] ; (80030dc ) - 8002f6a: 689b ldr r3, [r3, #8] - 8002f6c: 4a5b ldr r2, [pc, #364] ; (80030dc ) - 8002f6e: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00 - 8002f72: 6093 str r3, [r2, #8] - } - - if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) - 8002f74: 687b ldr r3, [r7, #4] - 8002f76: 681b ldr r3, [r3, #0] - 8002f78: f003 0308 and.w r3, r3, #8 - 8002f7c: 2b00 cmp r3, #0 - 8002f7e: d005 beq.n 8002f8c - { - MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3U)); - 8002f80: 4b56 ldr r3, [pc, #344] ; (80030dc ) - 8002f82: 689b ldr r3, [r3, #8] - 8002f84: 4a55 ldr r2, [pc, #340] ; (80030dc ) - 8002f86: f443 4360 orr.w r3, r3, #57344 ; 0xe000 - 8002f8a: 6093 str r3, [r2, #8] - } - - /* Set the new HCLK clock divider */ - assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); - MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); - 8002f8c: 4b53 ldr r3, [pc, #332] ; (80030dc ) - 8002f8e: 689b ldr r3, [r3, #8] - 8002f90: f023 02f0 bic.w r2, r3, #240 ; 0xf0 - 8002f94: 687b ldr r3, [r7, #4] - 8002f96: 689b ldr r3, [r3, #8] - 8002f98: 4950 ldr r1, [pc, #320] ; (80030dc ) - 8002f9a: 4313 orrs r3, r2 - 8002f9c: 608b str r3, [r1, #8] - } - - /*------------------------- SYSCLK Configuration ---------------------------*/ - if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) - 8002f9e: 687b ldr r3, [r7, #4] - 8002fa0: 681b ldr r3, [r3, #0] - 8002fa2: f003 0301 and.w r3, r3, #1 - 8002fa6: 2b00 cmp r3, #0 - 8002fa8: d040 beq.n 800302c - { - assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); - - /* HSE is selected as System Clock Source */ - if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) - 8002faa: 687b ldr r3, [r7, #4] - 8002fac: 685b ldr r3, [r3, #4] - 8002fae: 2b01 cmp r3, #1 - 8002fb0: d107 bne.n 8002fc2 - { - /* Check the HSE ready flag */ - if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) - 8002fb2: 4b4a ldr r3, [pc, #296] ; (80030dc ) - 8002fb4: 681b ldr r3, [r3, #0] - 8002fb6: f403 3300 and.w r3, r3, #131072 ; 0x20000 - 8002fba: 2b00 cmp r3, #0 - 8002fbc: d115 bne.n 8002fea - { - return HAL_ERROR; - 8002fbe: 2301 movs r3, #1 - 8002fc0: e085 b.n 80030ce - } - } - /* PLL is selected as System Clock Source */ - else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) - 8002fc2: 687b ldr r3, [r7, #4] - 8002fc4: 685b ldr r3, [r3, #4] - 8002fc6: 2b02 cmp r3, #2 - 8002fc8: d107 bne.n 8002fda - { - /* Check the PLL ready flag */ - if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) - 8002fca: 4b44 ldr r3, [pc, #272] ; (80030dc ) - 8002fcc: 681b ldr r3, [r3, #0] - 8002fce: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 - 8002fd2: 2b00 cmp r3, #0 - 8002fd4: d109 bne.n 8002fea - { - return HAL_ERROR; - 8002fd6: 2301 movs r3, #1 - 8002fd8: e079 b.n 80030ce - } - /* HSI is selected as System Clock Source */ - else - { - /* Check the HSI ready flag */ - if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) - 8002fda: 4b40 ldr r3, [pc, #256] ; (80030dc ) - 8002fdc: 681b ldr r3, [r3, #0] - 8002fde: f003 0302 and.w r3, r3, #2 - 8002fe2: 2b00 cmp r3, #0 - 8002fe4: d101 bne.n 8002fea - { - return HAL_ERROR; - 8002fe6: 2301 movs r3, #1 - 8002fe8: e071 b.n 80030ce - } - } - - __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource); - 8002fea: 4b3c ldr r3, [pc, #240] ; (80030dc ) - 8002fec: 689b ldr r3, [r3, #8] - 8002fee: f023 0203 bic.w r2, r3, #3 - 8002ff2: 687b ldr r3, [r7, #4] - 8002ff4: 685b ldr r3, [r3, #4] - 8002ff6: 4939 ldr r1, [pc, #228] ; (80030dc ) - 8002ff8: 4313 orrs r3, r2 - 8002ffa: 608b str r3, [r1, #8] - - /* Get Start Tick */ - tickstart = HAL_GetTick(); - 8002ffc: f7fe f8b2 bl 8001164 - 8003000: 6178 str r0, [r7, #20] - - while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) - 8003002: e00a b.n 800301a - { - if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) - 8003004: f7fe f8ae bl 8001164 - 8003008: 4602 mov r2, r0 - 800300a: 697b ldr r3, [r7, #20] - 800300c: 1ad3 subs r3, r2, r3 - 800300e: f241 3288 movw r2, #5000 ; 0x1388 - 8003012: 4293 cmp r3, r2 - 8003014: d901 bls.n 800301a - { - return HAL_TIMEOUT; - 8003016: 2303 movs r3, #3 - 8003018: e059 b.n 80030ce - while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) - 800301a: 4b30 ldr r3, [pc, #192] ; (80030dc ) - 800301c: 689b ldr r3, [r3, #8] - 800301e: f003 020c and.w r2, r3, #12 - 8003022: 687b ldr r3, [r7, #4] - 8003024: 685b ldr r3, [r3, #4] - 8003026: 009b lsls r3, r3, #2 - 8003028: 429a cmp r2, r3 - 800302a: d1eb bne.n 8003004 - } - } - } - - /* Decreasing the number of wait states because of lower CPU frequency */ - if(FLatency < __HAL_FLASH_GET_LATENCY()) - 800302c: 4b2a ldr r3, [pc, #168] ; (80030d8 ) - 800302e: 681b ldr r3, [r3, #0] - 8003030: f003 030f and.w r3, r3, #15 - 8003034: 683a ldr r2, [r7, #0] - 8003036: 429a cmp r2, r3 - 8003038: d20c bcs.n 8003054 - { - /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ - __HAL_FLASH_SET_LATENCY(FLatency); - 800303a: 4b27 ldr r3, [pc, #156] ; (80030d8 ) - 800303c: 683a ldr r2, [r7, #0] - 800303e: b2d2 uxtb r2, r2 - 8003040: 701a strb r2, [r3, #0] - - /* Check that the new number of wait states is taken into account to access the Flash - memory by reading the FLASH_ACR register */ - if(__HAL_FLASH_GET_LATENCY() != FLatency) - 8003042: 4b25 ldr r3, [pc, #148] ; (80030d8 ) - 8003044: 681b ldr r3, [r3, #0] - 8003046: f003 030f and.w r3, r3, #15 - 800304a: 683a ldr r2, [r7, #0] - 800304c: 429a cmp r2, r3 - 800304e: d001 beq.n 8003054 - { - return HAL_ERROR; - 8003050: 2301 movs r3, #1 - 8003052: e03c b.n 80030ce - } - } - - /*-------------------------- PCLK1 Configuration ---------------------------*/ - if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) - 8003054: 687b ldr r3, [r7, #4] - 8003056: 681b ldr r3, [r3, #0] - 8003058: f003 0304 and.w r3, r3, #4 - 800305c: 2b00 cmp r3, #0 - 800305e: d008 beq.n 8003072 - { - assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider)); - MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider); - 8003060: 4b1e ldr r3, [pc, #120] ; (80030dc ) - 8003062: 689b ldr r3, [r3, #8] - 8003064: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00 - 8003068: 687b ldr r3, [r7, #4] - 800306a: 68db ldr r3, [r3, #12] - 800306c: 491b ldr r1, [pc, #108] ; (80030dc ) - 800306e: 4313 orrs r3, r2 - 8003070: 608b str r3, [r1, #8] - } - - /*-------------------------- PCLK2 Configuration ---------------------------*/ - if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) - 8003072: 687b ldr r3, [r7, #4] - 8003074: 681b ldr r3, [r3, #0] - 8003076: f003 0308 and.w r3, r3, #8 - 800307a: 2b00 cmp r3, #0 - 800307c: d009 beq.n 8003092 - { - assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider)); - MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U)); - 800307e: 4b17 ldr r3, [pc, #92] ; (80030dc ) - 8003080: 689b ldr r3, [r3, #8] - 8003082: f423 4260 bic.w r2, r3, #57344 ; 0xe000 - 8003086: 687b ldr r3, [r7, #4] - 8003088: 691b ldr r3, [r3, #16] - 800308a: 00db lsls r3, r3, #3 - 800308c: 4913 ldr r1, [pc, #76] ; (80030dc ) - 800308e: 4313 orrs r3, r2 - 8003090: 608b str r3, [r1, #8] - } - - /* Update the SystemCoreClock global variable */ - SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> POSITION_VAL(RCC_CFGR_HPRE)]; - 8003092: f000 f82b bl 80030ec - 8003096: 4601 mov r1, r0 - 8003098: 4b10 ldr r3, [pc, #64] ; (80030dc ) - 800309a: 689b ldr r3, [r3, #8] - 800309c: f003 03f0 and.w r3, r3, #240 ; 0xf0 - 80030a0: 22f0 movs r2, #240 ; 0xf0 - 80030a2: 613a str r2, [r7, #16] - __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); - 80030a4: 693a ldr r2, [r7, #16] - 80030a6: fa92 f2a2 rbit r2, r2 - 80030aa: 60fa str r2, [r7, #12] - return result; - 80030ac: 68fa ldr r2, [r7, #12] - 80030ae: fab2 f282 clz r2, r2 - 80030b2: b2d2 uxtb r2, r2 - 80030b4: 40d3 lsrs r3, r2 - 80030b6: 4a0a ldr r2, [pc, #40] ; (80030e0 ) - 80030b8: 5cd3 ldrb r3, [r2, r3] - 80030ba: fa21 f303 lsr.w r3, r1, r3 - 80030be: 4a09 ldr r2, [pc, #36] ; (80030e4 ) - 80030c0: 6013 str r3, [r2, #0] - - /* Configure the source of time base considering new system clocks settings */ - HAL_InitTick (uwTickPrio); - 80030c2: 4b09 ldr r3, [pc, #36] ; (80030e8 ) - 80030c4: 681b ldr r3, [r3, #0] - 80030c6: 4618 mov r0, r3 - 80030c8: f7fe f80a bl 80010e0 - - return HAL_OK; - 80030cc: 2300 movs r3, #0 -} - 80030ce: 4618 mov r0, r3 - 80030d0: 3718 adds r7, #24 - 80030d2: 46bd mov sp, r7 - 80030d4: bd80 pop {r7, pc} - 80030d6: bf00 nop - 80030d8: 40023c00 .word 0x40023c00 - 80030dc: 40023800 .word 0x40023800 - 80030e0: 08012ac0 .word 0x08012ac0 - 80030e4: 20000000 .word 0x20000000 - 80030e8: 20000004 .word 0x20000004 - -080030ec : - * - * - * @retval SYSCLK frequency - */ -uint32_t HAL_RCC_GetSysClockFreq(void) -{ - 80030ec: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} - 80030f0: b094 sub sp, #80 ; 0x50 - 80030f2: af00 add r7, sp, #0 - uint32_t pllm = 0U, pllvco = 0U, pllp = 0U; - 80030f4: 2300 movs r3, #0 - 80030f6: 647b str r3, [r7, #68] ; 0x44 - 80030f8: 2300 movs r3, #0 - 80030fa: 64fb str r3, [r7, #76] ; 0x4c - 80030fc: 2300 movs r3, #0 - 80030fe: 643b str r3, [r7, #64] ; 0x40 - uint32_t sysclockfreq = 0U; - 8003100: 2300 movs r3, #0 - 8003102: 64bb str r3, [r7, #72] ; 0x48 - - /* Get SYSCLK source -------------------------------------------------------*/ - switch (RCC->CFGR & RCC_CFGR_SWS) - 8003104: 4b7c ldr r3, [pc, #496] ; (80032f8 ) - 8003106: 689b ldr r3, [r3, #8] - 8003108: f003 030c and.w r3, r3, #12 - 800310c: 2b08 cmp r3, #8 - 800310e: d00d beq.n 800312c - 8003110: 2b08 cmp r3, #8 - 8003112: f200 80e7 bhi.w 80032e4 - 8003116: 2b00 cmp r3, #0 - 8003118: d002 beq.n 8003120 - 800311a: 2b04 cmp r3, #4 - 800311c: d003 beq.n 8003126 - 800311e: e0e1 b.n 80032e4 - { - case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */ - { - sysclockfreq = HSI_VALUE; - 8003120: 4b76 ldr r3, [pc, #472] ; (80032fc ) - 8003122: 64bb str r3, [r7, #72] ; 0x48 - break; - 8003124: e0e1 b.n 80032ea - } - case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */ - { - sysclockfreq = HSE_VALUE; - 8003126: 4b76 ldr r3, [pc, #472] ; (8003300 ) - 8003128: 64bb str r3, [r7, #72] ; 0x48 - break; - 800312a: e0de b.n 80032ea - } - case RCC_CFGR_SWS_PLL: /* PLL used as system clock source */ - { - /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN - SYSCLK = PLL_VCO / PLLP */ - pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - 800312c: 4b72 ldr r3, [pc, #456] ; (80032f8 ) - 800312e: 685b ldr r3, [r3, #4] - 8003130: f003 033f and.w r3, r3, #63 ; 0x3f - 8003134: 647b str r3, [r7, #68] ; 0x44 - if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI) - 8003136: 4b70 ldr r3, [pc, #448] ; (80032f8 ) - 8003138: 685b ldr r3, [r3, #4] - 800313a: f403 0380 and.w r3, r3, #4194304 ; 0x400000 - 800313e: 2b00 cmp r3, #0 - 8003140: d065 beq.n 800320e - { - /* HSE used as PLL clock source */ - pllvco = (uint32_t) ((((uint64_t) HSE_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm); - 8003142: 4b6d ldr r3, [pc, #436] ; (80032f8 ) - 8003144: 685b ldr r3, [r3, #4] - 8003146: 099b lsrs r3, r3, #6 - 8003148: 2200 movs r2, #0 - 800314a: 63bb str r3, [r7, #56] ; 0x38 - 800314c: 63fa str r2, [r7, #60] ; 0x3c - 800314e: 6bbb ldr r3, [r7, #56] ; 0x38 - 8003150: f3c3 0308 ubfx r3, r3, #0, #9 - 8003154: 633b str r3, [r7, #48] ; 0x30 - 8003156: 2300 movs r3, #0 - 8003158: 637b str r3, [r7, #52] ; 0x34 - 800315a: e9d7 450c ldrd r4, r5, [r7, #48] ; 0x30 - 800315e: 4622 mov r2, r4 - 8003160: 462b mov r3, r5 - 8003162: f04f 0000 mov.w r0, #0 - 8003166: f04f 0100 mov.w r1, #0 - 800316a: 0159 lsls r1, r3, #5 - 800316c: ea41 61d2 orr.w r1, r1, r2, lsr #27 - 8003170: 0150 lsls r0, r2, #5 - 8003172: 4602 mov r2, r0 - 8003174: 460b mov r3, r1 - 8003176: 4621 mov r1, r4 - 8003178: 1a51 subs r1, r2, r1 - 800317a: 6139 str r1, [r7, #16] - 800317c: 4629 mov r1, r5 - 800317e: eb63 0301 sbc.w r3, r3, r1 - 8003182: 617b str r3, [r7, #20] - 8003184: f04f 0200 mov.w r2, #0 - 8003188: f04f 0300 mov.w r3, #0 - 800318c: e9d7 ab04 ldrd sl, fp, [r7, #16] - 8003190: 4659 mov r1, fp - 8003192: 018b lsls r3, r1, #6 - 8003194: 4651 mov r1, sl - 8003196: ea43 6391 orr.w r3, r3, r1, lsr #26 - 800319a: 4651 mov r1, sl - 800319c: 018a lsls r2, r1, #6 - 800319e: 46d4 mov ip, sl - 80031a0: ebb2 080c subs.w r8, r2, ip - 80031a4: 4659 mov r1, fp - 80031a6: eb63 0901 sbc.w r9, r3, r1 - 80031aa: f04f 0200 mov.w r2, #0 - 80031ae: f04f 0300 mov.w r3, #0 - 80031b2: ea4f 03c9 mov.w r3, r9, lsl #3 - 80031b6: ea43 7358 orr.w r3, r3, r8, lsr #29 - 80031ba: ea4f 02c8 mov.w r2, r8, lsl #3 - 80031be: 4690 mov r8, r2 - 80031c0: 4699 mov r9, r3 - 80031c2: 4623 mov r3, r4 - 80031c4: eb18 0303 adds.w r3, r8, r3 - 80031c8: 60bb str r3, [r7, #8] - 80031ca: 462b mov r3, r5 - 80031cc: eb49 0303 adc.w r3, r9, r3 - 80031d0: 60fb str r3, [r7, #12] - 80031d2: f04f 0200 mov.w r2, #0 - 80031d6: f04f 0300 mov.w r3, #0 - 80031da: e9d7 4502 ldrd r4, r5, [r7, #8] - 80031de: 4629 mov r1, r5 - 80031e0: 024b lsls r3, r1, #9 - 80031e2: 4620 mov r0, r4 - 80031e4: 4629 mov r1, r5 - 80031e6: 4604 mov r4, r0 - 80031e8: ea43 53d4 orr.w r3, r3, r4, lsr #23 - 80031ec: 4601 mov r1, r0 - 80031ee: 024a lsls r2, r1, #9 - 80031f0: 4610 mov r0, r2 - 80031f2: 4619 mov r1, r3 - 80031f4: 6c7b ldr r3, [r7, #68] ; 0x44 - 80031f6: 2200 movs r2, #0 - 80031f8: 62bb str r3, [r7, #40] ; 0x28 - 80031fa: 62fa str r2, [r7, #44] ; 0x2c - 80031fc: e9d7 230a ldrd r2, r3, [r7, #40] ; 0x28 - 8003200: f7fc ffe0 bl 80001c4 <__aeabi_uldivmod> - 8003204: 4602 mov r2, r0 - 8003206: 460b mov r3, r1 - 8003208: 4613 mov r3, r2 - 800320a: 64fb str r3, [r7, #76] ; 0x4c - 800320c: e05c b.n 80032c8 - } - else - { - /* HSI used as PLL clock source */ - pllvco = (uint32_t) ((((uint64_t) HSI_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm); - 800320e: 4b3a ldr r3, [pc, #232] ; (80032f8 ) - 8003210: 685b ldr r3, [r3, #4] - 8003212: 099b lsrs r3, r3, #6 - 8003214: 2200 movs r2, #0 - 8003216: 4618 mov r0, r3 - 8003218: 4611 mov r1, r2 - 800321a: f3c0 0308 ubfx r3, r0, #0, #9 - 800321e: 623b str r3, [r7, #32] - 8003220: 2300 movs r3, #0 - 8003222: 627b str r3, [r7, #36] ; 0x24 - 8003224: e9d7 8908 ldrd r8, r9, [r7, #32] - 8003228: 4642 mov r2, r8 - 800322a: 464b mov r3, r9 - 800322c: f04f 0000 mov.w r0, #0 - 8003230: f04f 0100 mov.w r1, #0 - 8003234: 0159 lsls r1, r3, #5 - 8003236: ea41 61d2 orr.w r1, r1, r2, lsr #27 - 800323a: 0150 lsls r0, r2, #5 - 800323c: 4602 mov r2, r0 - 800323e: 460b mov r3, r1 - 8003240: 46c4 mov ip, r8 - 8003242: ebb2 0a0c subs.w sl, r2, ip - 8003246: 4640 mov r0, r8 - 8003248: 4649 mov r1, r9 - 800324a: 468c mov ip, r1 - 800324c: eb63 0b0c sbc.w fp, r3, ip - 8003250: f04f 0200 mov.w r2, #0 - 8003254: f04f 0300 mov.w r3, #0 - 8003258: ea4f 138b mov.w r3, fp, lsl #6 - 800325c: ea43 639a orr.w r3, r3, sl, lsr #26 - 8003260: ea4f 128a mov.w r2, sl, lsl #6 - 8003264: ebb2 040a subs.w r4, r2, sl - 8003268: eb63 050b sbc.w r5, r3, fp - 800326c: f04f 0200 mov.w r2, #0 - 8003270: f04f 0300 mov.w r3, #0 - 8003274: 00eb lsls r3, r5, #3 - 8003276: ea43 7354 orr.w r3, r3, r4, lsr #29 - 800327a: 00e2 lsls r2, r4, #3 - 800327c: 4614 mov r4, r2 - 800327e: 461d mov r5, r3 - 8003280: 4603 mov r3, r0 - 8003282: 18e3 adds r3, r4, r3 - 8003284: 603b str r3, [r7, #0] - 8003286: 460b mov r3, r1 - 8003288: eb45 0303 adc.w r3, r5, r3 - 800328c: 607b str r3, [r7, #4] - 800328e: f04f 0200 mov.w r2, #0 - 8003292: f04f 0300 mov.w r3, #0 - 8003296: e9d7 4500 ldrd r4, r5, [r7] - 800329a: 4629 mov r1, r5 - 800329c: 028b lsls r3, r1, #10 - 800329e: 4620 mov r0, r4 - 80032a0: 4629 mov r1, r5 - 80032a2: 4604 mov r4, r0 - 80032a4: ea43 5394 orr.w r3, r3, r4, lsr #22 - 80032a8: 4601 mov r1, r0 - 80032aa: 028a lsls r2, r1, #10 - 80032ac: 4610 mov r0, r2 - 80032ae: 4619 mov r1, r3 - 80032b0: 6c7b ldr r3, [r7, #68] ; 0x44 - 80032b2: 2200 movs r2, #0 - 80032b4: 61bb str r3, [r7, #24] - 80032b6: 61fa str r2, [r7, #28] - 80032b8: e9d7 2306 ldrd r2, r3, [r7, #24] - 80032bc: f7fc ff82 bl 80001c4 <__aeabi_uldivmod> - 80032c0: 4602 mov r2, r0 - 80032c2: 460b mov r3, r1 - 80032c4: 4613 mov r3, r2 - 80032c6: 64fb str r3, [r7, #76] ; 0x4c - } - pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) *2U); - 80032c8: 4b0b ldr r3, [pc, #44] ; (80032f8 ) - 80032ca: 685b ldr r3, [r3, #4] - 80032cc: 0c1b lsrs r3, r3, #16 - 80032ce: f003 0303 and.w r3, r3, #3 - 80032d2: 3301 adds r3, #1 - 80032d4: 005b lsls r3, r3, #1 - 80032d6: 643b str r3, [r7, #64] ; 0x40 - - sysclockfreq = pllvco/pllp; - 80032d8: 6cfa ldr r2, [r7, #76] ; 0x4c - 80032da: 6c3b ldr r3, [r7, #64] ; 0x40 - 80032dc: fbb2 f3f3 udiv r3, r2, r3 - 80032e0: 64bb str r3, [r7, #72] ; 0x48 - break; - 80032e2: e002 b.n 80032ea - } - default: - { - sysclockfreq = HSI_VALUE; - 80032e4: 4b05 ldr r3, [pc, #20] ; (80032fc ) - 80032e6: 64bb str r3, [r7, #72] ; 0x48 - break; - 80032e8: bf00 nop - } - } - return sysclockfreq; - 80032ea: 6cbb ldr r3, [r7, #72] ; 0x48 -} - 80032ec: 4618 mov r0, r3 - 80032ee: 3750 adds r7, #80 ; 0x50 - 80032f0: 46bd mov sp, r7 - 80032f2: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} - 80032f6: bf00 nop - 80032f8: 40023800 .word 0x40023800 - 80032fc: 00f42400 .word 0x00f42400 - 8003300: 007a1200 .word 0x007a1200 - -08003304 : - * @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency - * and updated within this function - * @retval HCLK frequency - */ -uint32_t HAL_RCC_GetHCLKFreq(void) -{ - 8003304: b480 push {r7} - 8003306: af00 add r7, sp, #0 - return SystemCoreClock; - 8003308: 4b02 ldr r3, [pc, #8] ; (8003314 ) - 800330a: 681b ldr r3, [r3, #0] -} - 800330c: 4618 mov r0, r3 - 800330e: 46bd mov sp, r7 - 8003310: bc80 pop {r7} - 8003312: 4770 bx lr - 8003314: 20000000 .word 0x20000000 - -08003318 : - * @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) -{ - 8003318: b580 push {r7, lr} - 800331a: b082 sub sp, #8 - 800331c: af00 add r7, sp, #0 - /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ - return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1)>> POSITION_VAL(RCC_CFGR_PPRE1)]); - 800331e: f7ff fff1 bl 8003304 - 8003322: 4601 mov r1, r0 - 8003324: 4b0b ldr r3, [pc, #44] ; (8003354 ) - 8003326: 689b ldr r3, [r3, #8] - 8003328: f403 53e0 and.w r3, r3, #7168 ; 0x1c00 - 800332c: f44f 52e0 mov.w r2, #7168 ; 0x1c00 - 8003330: 607a str r2, [r7, #4] - __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); - 8003332: 687a ldr r2, [r7, #4] - 8003334: fa92 f2a2 rbit r2, r2 - 8003338: 603a str r2, [r7, #0] - return result; - 800333a: 683a ldr r2, [r7, #0] - 800333c: fab2 f282 clz r2, r2 - 8003340: b2d2 uxtb r2, r2 - 8003342: 40d3 lsrs r3, r2 - 8003344: 4a04 ldr r2, [pc, #16] ; (8003358 ) - 8003346: 5cd3 ldrb r3, [r2, r3] - 8003348: fa21 f303 lsr.w r3, r1, r3 -} - 800334c: 4618 mov r0, r3 - 800334e: 3708 adds r7, #8 - 8003350: 46bd mov sp, r7 - 8003352: bd80 pop {r7, pc} - 8003354: 40023800 .word 0x40023800 - 8003358: 08012ad0 .word 0x08012ad0 - -0800335c : - * @note Each time PCLK2 changes, this function must be called to update the - * right PCLK2 value. Otherwise, any configuration based on this function will be incorrect. - * @retval PCLK2 frequency - */ -uint32_t HAL_RCC_GetPCLK2Freq(void) -{ - 800335c: b580 push {r7, lr} - 800335e: b082 sub sp, #8 - 8003360: af00 add r7, sp, #0 - /* Get HCLK source and Compute PCLK2 frequency ---------------------------*/ - return (HAL_RCC_GetHCLKFreq()>> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2)>> POSITION_VAL(RCC_CFGR_PPRE2)]); - 8003362: f7ff ffcf bl 8003304 - 8003366: 4601 mov r1, r0 - 8003368: 4b0b ldr r3, [pc, #44] ; (8003398 ) - 800336a: 689b ldr r3, [r3, #8] - 800336c: f403 4360 and.w r3, r3, #57344 ; 0xe000 - 8003370: f44f 4260 mov.w r2, #57344 ; 0xe000 - 8003374: 607a str r2, [r7, #4] - __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); - 8003376: 687a ldr r2, [r7, #4] - 8003378: fa92 f2a2 rbit r2, r2 - 800337c: 603a str r2, [r7, #0] - return result; - 800337e: 683a ldr r2, [r7, #0] - 8003380: fab2 f282 clz r2, r2 - 8003384: b2d2 uxtb r2, r2 - 8003386: 40d3 lsrs r3, r2 - 8003388: 4a04 ldr r2, [pc, #16] ; (800339c ) - 800338a: 5cd3 ldrb r3, [r2, r3] - 800338c: fa21 f303 lsr.w r3, r1, r3 -} - 8003390: 4618 mov r0, r3 - 8003392: 3708 adds r7, #8 - 8003394: 46bd mov sp, r7 - 8003396: bd80 pop {r7, pc} - 8003398: 40023800 .word 0x40023800 - 800339c: 08012ad0 .word 0x08012ad0 - -080033a0 : - * Ex: call @ref HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init() - * @param htim TIM Base handle - * @retval HAL status - */ -HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim) -{ - 80033a0: b580 push {r7, lr} - 80033a2: b082 sub sp, #8 - 80033a4: af00 add r7, sp, #0 - 80033a6: 6078 str r0, [r7, #4] - /* Check the TIM handle allocation */ - if (htim == NULL) - 80033a8: 687b ldr r3, [r7, #4] - 80033aa: 2b00 cmp r3, #0 - 80033ac: d101 bne.n 80033b2 - { - return HAL_ERROR; - 80033ae: 2301 movs r3, #1 - 80033b0: e041 b.n 8003436 - assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode)); - assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision)); - assert_param(IS_TIM_PERIOD(htim, htim->Init.Period)); - assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload)); - - if (htim->State == HAL_TIM_STATE_RESET) - 80033b2: 687b ldr r3, [r7, #4] - 80033b4: f893 303d ldrb.w r3, [r3, #61] ; 0x3d - 80033b8: b2db uxtb r3, r3 - 80033ba: 2b00 cmp r3, #0 - 80033bc: d106 bne.n 80033cc - { - /* Allocate lock resource and initialize it */ - htim->Lock = HAL_UNLOCKED; - 80033be: 687b ldr r3, [r7, #4] - 80033c0: 2200 movs r2, #0 - 80033c2: f883 203c strb.w r2, [r3, #60] ; 0x3c - } - /* Init the low level hardware : GPIO, CLOCK, NVIC */ - htim->Base_MspInitCallback(htim); -#else - /* Init the low level hardware : GPIO, CLOCK, NVIC */ - HAL_TIM_Base_MspInit(htim); - 80033c6: 6878 ldr r0, [r7, #4] - 80033c8: f7fd fba6 bl 8000b18 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - - /* Set the TIM state */ - htim->State = HAL_TIM_STATE_BUSY; - 80033cc: 687b ldr r3, [r7, #4] - 80033ce: 2202 movs r2, #2 - 80033d0: f883 203d strb.w r2, [r3, #61] ; 0x3d - - /* Set the Time Base configuration */ - TIM_Base_SetConfig(htim->Instance, &htim->Init); - 80033d4: 687b ldr r3, [r7, #4] - 80033d6: 681a ldr r2, [r3, #0] - 80033d8: 687b ldr r3, [r7, #4] - 80033da: 3304 adds r3, #4 - 80033dc: 4619 mov r1, r3 - 80033de: 4610 mov r0, r2 - 80033e0: f000 fb44 bl 8003a6c - - /* Initialize the DMA burst operation state */ - htim->DMABurstState = HAL_DMA_BURST_STATE_READY; - 80033e4: 687b ldr r3, [r7, #4] - 80033e6: 2201 movs r2, #1 - 80033e8: f883 2046 strb.w r2, [r3, #70] ; 0x46 - - /* Initialize the TIM channels state */ - TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); - 80033ec: 687b ldr r3, [r7, #4] - 80033ee: 2201 movs r2, #1 - 80033f0: f883 203e strb.w r2, [r3, #62] ; 0x3e - 80033f4: 687b ldr r3, [r7, #4] - 80033f6: 2201 movs r2, #1 - 80033f8: f883 203f strb.w r2, [r3, #63] ; 0x3f - 80033fc: 687b ldr r3, [r7, #4] - 80033fe: 2201 movs r2, #1 - 8003400: f883 2040 strb.w r2, [r3, #64] ; 0x40 - 8003404: 687b ldr r3, [r7, #4] - 8003406: 2201 movs r2, #1 - 8003408: f883 2041 strb.w r2, [r3, #65] ; 0x41 - TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); - 800340c: 687b ldr r3, [r7, #4] - 800340e: 2201 movs r2, #1 - 8003410: f883 2042 strb.w r2, [r3, #66] ; 0x42 - 8003414: 687b ldr r3, [r7, #4] - 8003416: 2201 movs r2, #1 - 8003418: f883 2043 strb.w r2, [r3, #67] ; 0x43 - 800341c: 687b ldr r3, [r7, #4] - 800341e: 2201 movs r2, #1 - 8003420: f883 2044 strb.w r2, [r3, #68] ; 0x44 - 8003424: 687b ldr r3, [r7, #4] - 8003426: 2201 movs r2, #1 - 8003428: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Initialize the TIM state*/ - htim->State = HAL_TIM_STATE_READY; - 800342c: 687b ldr r3, [r7, #4] - 800342e: 2201 movs r2, #1 - 8003430: f883 203d strb.w r2, [r3, #61] ; 0x3d - - return HAL_OK; - 8003434: 2300 movs r3, #0 -} - 8003436: 4618 mov r0, r3 - 8003438: 3708 adds r7, #8 - 800343a: 46bd mov sp, r7 - 800343c: bd80 pop {r7, pc} - -0800343e : - * Ex: call @ref HAL_TIM_PWM_DeInit() before HAL_TIM_PWM_Init() - * @param htim TIM PWM handle - * @retval HAL status - */ -HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim) -{ - 800343e: b580 push {r7, lr} - 8003440: b082 sub sp, #8 - 8003442: af00 add r7, sp, #0 - 8003444: 6078 str r0, [r7, #4] - /* Check the TIM handle allocation */ - if (htim == NULL) - 8003446: 687b ldr r3, [r7, #4] - 8003448: 2b00 cmp r3, #0 - 800344a: d101 bne.n 8003450 - { - return HAL_ERROR; - 800344c: 2301 movs r3, #1 - 800344e: e041 b.n 80034d4 - assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode)); - assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision)); - assert_param(IS_TIM_PERIOD(htim, htim->Init.Period)); - assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload)); - - if (htim->State == HAL_TIM_STATE_RESET) - 8003450: 687b ldr r3, [r7, #4] - 8003452: f893 303d ldrb.w r3, [r3, #61] ; 0x3d - 8003456: b2db uxtb r3, r3 - 8003458: 2b00 cmp r3, #0 - 800345a: d106 bne.n 800346a - { - /* Allocate lock resource and initialize it */ - htim->Lock = HAL_UNLOCKED; - 800345c: 687b ldr r3, [r7, #4] - 800345e: 2200 movs r2, #0 - 8003460: f883 203c strb.w r2, [r3, #60] ; 0x3c - } - /* Init the low level hardware : GPIO, CLOCK, NVIC */ - htim->PWM_MspInitCallback(htim); -#else - /* Init the low level hardware : GPIO, CLOCK, NVIC and DMA */ - HAL_TIM_PWM_MspInit(htim); - 8003464: 6878 ldr r0, [r7, #4] - 8003466: f000 f839 bl 80034dc -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - - /* Set the TIM state */ - htim->State = HAL_TIM_STATE_BUSY; - 800346a: 687b ldr r3, [r7, #4] - 800346c: 2202 movs r2, #2 - 800346e: f883 203d strb.w r2, [r3, #61] ; 0x3d - - /* Init the base time for the PWM */ - TIM_Base_SetConfig(htim->Instance, &htim->Init); - 8003472: 687b ldr r3, [r7, #4] - 8003474: 681a ldr r2, [r3, #0] - 8003476: 687b ldr r3, [r7, #4] - 8003478: 3304 adds r3, #4 - 800347a: 4619 mov r1, r3 - 800347c: 4610 mov r0, r2 - 800347e: f000 faf5 bl 8003a6c - - /* Initialize the DMA burst operation state */ - htim->DMABurstState = HAL_DMA_BURST_STATE_READY; - 8003482: 687b ldr r3, [r7, #4] - 8003484: 2201 movs r2, #1 - 8003486: f883 2046 strb.w r2, [r3, #70] ; 0x46 - - /* Initialize the TIM channels state */ - TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); - 800348a: 687b ldr r3, [r7, #4] - 800348c: 2201 movs r2, #1 - 800348e: f883 203e strb.w r2, [r3, #62] ; 0x3e - 8003492: 687b ldr r3, [r7, #4] - 8003494: 2201 movs r2, #1 - 8003496: f883 203f strb.w r2, [r3, #63] ; 0x3f - 800349a: 687b ldr r3, [r7, #4] - 800349c: 2201 movs r2, #1 - 800349e: f883 2040 strb.w r2, [r3, #64] ; 0x40 - 80034a2: 687b ldr r3, [r7, #4] - 80034a4: 2201 movs r2, #1 - 80034a6: f883 2041 strb.w r2, [r3, #65] ; 0x41 - TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); - 80034aa: 687b ldr r3, [r7, #4] - 80034ac: 2201 movs r2, #1 - 80034ae: f883 2042 strb.w r2, [r3, #66] ; 0x42 - 80034b2: 687b ldr r3, [r7, #4] - 80034b4: 2201 movs r2, #1 - 80034b6: f883 2043 strb.w r2, [r3, #67] ; 0x43 - 80034ba: 687b ldr r3, [r7, #4] - 80034bc: 2201 movs r2, #1 - 80034be: f883 2044 strb.w r2, [r3, #68] ; 0x44 - 80034c2: 687b ldr r3, [r7, #4] - 80034c4: 2201 movs r2, #1 - 80034c6: f883 2045 strb.w r2, [r3, #69] ; 0x45 - - /* Initialize the TIM state*/ - htim->State = HAL_TIM_STATE_READY; - 80034ca: 687b ldr r3, [r7, #4] - 80034cc: 2201 movs r2, #1 - 80034ce: f883 203d strb.w r2, [r3, #61] ; 0x3d - - return HAL_OK; - 80034d2: 2300 movs r3, #0 -} - 80034d4: 4618 mov r0, r3 - 80034d6: 3708 adds r7, #8 - 80034d8: 46bd mov sp, r7 - 80034da: bd80 pop {r7, pc} - -080034dc : - * @brief Initializes the TIM PWM MSP. - * @param htim TIM PWM handle - * @retval None - */ -__weak void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim) -{ - 80034dc: b480 push {r7} - 80034de: b083 sub sp, #12 - 80034e0: af00 add r7, sp, #0 - 80034e2: 6078 str r0, [r7, #4] - UNUSED(htim); - - /* NOTE : This function should not be modified, when the callback is needed, - the HAL_TIM_PWM_MspInit could be implemented in the user file - */ -} - 80034e4: bf00 nop - 80034e6: 370c adds r7, #12 - 80034e8: 46bd mov sp, r7 - 80034ea: bc80 pop {r7} - 80034ec: 4770 bx lr - -080034ee : - * @brief This function handles TIM interrupts requests. - * @param htim TIM handle - * @retval None - */ -void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim) -{ - 80034ee: b580 push {r7, lr} - 80034f0: b082 sub sp, #8 - 80034f2: af00 add r7, sp, #0 - 80034f4: 6078 str r0, [r7, #4] - /* Capture compare 1 event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET) - 80034f6: 687b ldr r3, [r7, #4] - 80034f8: 681b ldr r3, [r3, #0] - 80034fa: 691b ldr r3, [r3, #16] - 80034fc: f003 0302 and.w r3, r3, #2 - 8003500: 2b02 cmp r3, #2 - 8003502: d122 bne.n 800354a - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET) - 8003504: 687b ldr r3, [r7, #4] - 8003506: 681b ldr r3, [r3, #0] - 8003508: 68db ldr r3, [r3, #12] - 800350a: f003 0302 and.w r3, r3, #2 - 800350e: 2b02 cmp r3, #2 - 8003510: d11b bne.n 800354a - { - { - __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1); - 8003512: 687b ldr r3, [r7, #4] - 8003514: 681b ldr r3, [r3, #0] - 8003516: f06f 0202 mvn.w r2, #2 - 800351a: 611a str r2, [r3, #16] - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; - 800351c: 687b ldr r3, [r7, #4] - 800351e: 2201 movs r2, #1 - 8003520: 771a strb r2, [r3, #28] - - /* Input capture event */ - if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U) - 8003522: 687b ldr r3, [r7, #4] - 8003524: 681b ldr r3, [r3, #0] - 8003526: 699b ldr r3, [r3, #24] - 8003528: f003 0303 and.w r3, r3, #3 - 800352c: 2b00 cmp r3, #0 - 800352e: d003 beq.n 8003538 - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->IC_CaptureCallback(htim); -#else - HAL_TIM_IC_CaptureCallback(htim); - 8003530: 6878 ldr r0, [r7, #4] - 8003532: f000 fa80 bl 8003a36 - 8003536: e005 b.n 8003544 - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->OC_DelayElapsedCallback(htim); - htim->PWM_PulseFinishedCallback(htim); -#else - HAL_TIM_OC_DelayElapsedCallback(htim); - 8003538: 6878 ldr r0, [r7, #4] - 800353a: f000 fa73 bl 8003a24 - HAL_TIM_PWM_PulseFinishedCallback(htim); - 800353e: 6878 ldr r0, [r7, #4] - 8003540: f000 fa82 bl 8003a48 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; - 8003544: 687b ldr r3, [r7, #4] - 8003546: 2200 movs r2, #0 - 8003548: 771a strb r2, [r3, #28] - } - } - } - /* Capture compare 2 event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET) - 800354a: 687b ldr r3, [r7, #4] - 800354c: 681b ldr r3, [r3, #0] - 800354e: 691b ldr r3, [r3, #16] - 8003550: f003 0304 and.w r3, r3, #4 - 8003554: 2b04 cmp r3, #4 - 8003556: d122 bne.n 800359e - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET) - 8003558: 687b ldr r3, [r7, #4] - 800355a: 681b ldr r3, [r3, #0] - 800355c: 68db ldr r3, [r3, #12] - 800355e: f003 0304 and.w r3, r3, #4 - 8003562: 2b04 cmp r3, #4 - 8003564: d11b bne.n 800359e - { - __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2); - 8003566: 687b ldr r3, [r7, #4] - 8003568: 681b ldr r3, [r3, #0] - 800356a: f06f 0204 mvn.w r2, #4 - 800356e: 611a str r2, [r3, #16] - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; - 8003570: 687b ldr r3, [r7, #4] - 8003572: 2202 movs r2, #2 - 8003574: 771a strb r2, [r3, #28] - /* Input capture event */ - if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U) - 8003576: 687b ldr r3, [r7, #4] - 8003578: 681b ldr r3, [r3, #0] - 800357a: 699b ldr r3, [r3, #24] - 800357c: f403 7340 and.w r3, r3, #768 ; 0x300 - 8003580: 2b00 cmp r3, #0 - 8003582: d003 beq.n 800358c - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->IC_CaptureCallback(htim); -#else - HAL_TIM_IC_CaptureCallback(htim); - 8003584: 6878 ldr r0, [r7, #4] - 8003586: f000 fa56 bl 8003a36 - 800358a: e005 b.n 8003598 - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->OC_DelayElapsedCallback(htim); - htim->PWM_PulseFinishedCallback(htim); -#else - HAL_TIM_OC_DelayElapsedCallback(htim); - 800358c: 6878 ldr r0, [r7, #4] - 800358e: f000 fa49 bl 8003a24 - HAL_TIM_PWM_PulseFinishedCallback(htim); - 8003592: 6878 ldr r0, [r7, #4] - 8003594: f000 fa58 bl 8003a48 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; - 8003598: 687b ldr r3, [r7, #4] - 800359a: 2200 movs r2, #0 - 800359c: 771a strb r2, [r3, #28] - } - } - /* Capture compare 3 event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET) - 800359e: 687b ldr r3, [r7, #4] - 80035a0: 681b ldr r3, [r3, #0] - 80035a2: 691b ldr r3, [r3, #16] - 80035a4: f003 0308 and.w r3, r3, #8 - 80035a8: 2b08 cmp r3, #8 - 80035aa: d122 bne.n 80035f2 - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET) - 80035ac: 687b ldr r3, [r7, #4] - 80035ae: 681b ldr r3, [r3, #0] - 80035b0: 68db ldr r3, [r3, #12] - 80035b2: f003 0308 and.w r3, r3, #8 - 80035b6: 2b08 cmp r3, #8 - 80035b8: d11b bne.n 80035f2 - { - __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3); - 80035ba: 687b ldr r3, [r7, #4] - 80035bc: 681b ldr r3, [r3, #0] - 80035be: f06f 0208 mvn.w r2, #8 - 80035c2: 611a str r2, [r3, #16] - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; - 80035c4: 687b ldr r3, [r7, #4] - 80035c6: 2204 movs r2, #4 - 80035c8: 771a strb r2, [r3, #28] - /* Input capture event */ - if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U) - 80035ca: 687b ldr r3, [r7, #4] - 80035cc: 681b ldr r3, [r3, #0] - 80035ce: 69db ldr r3, [r3, #28] - 80035d0: f003 0303 and.w r3, r3, #3 - 80035d4: 2b00 cmp r3, #0 - 80035d6: d003 beq.n 80035e0 - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->IC_CaptureCallback(htim); -#else - HAL_TIM_IC_CaptureCallback(htim); - 80035d8: 6878 ldr r0, [r7, #4] - 80035da: f000 fa2c bl 8003a36 - 80035de: e005 b.n 80035ec - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->OC_DelayElapsedCallback(htim); - htim->PWM_PulseFinishedCallback(htim); -#else - HAL_TIM_OC_DelayElapsedCallback(htim); - 80035e0: 6878 ldr r0, [r7, #4] - 80035e2: f000 fa1f bl 8003a24 - HAL_TIM_PWM_PulseFinishedCallback(htim); - 80035e6: 6878 ldr r0, [r7, #4] - 80035e8: f000 fa2e bl 8003a48 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; - 80035ec: 687b ldr r3, [r7, #4] - 80035ee: 2200 movs r2, #0 - 80035f0: 771a strb r2, [r3, #28] - } - } - /* Capture compare 4 event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET) - 80035f2: 687b ldr r3, [r7, #4] - 80035f4: 681b ldr r3, [r3, #0] - 80035f6: 691b ldr r3, [r3, #16] - 80035f8: f003 0310 and.w r3, r3, #16 - 80035fc: 2b10 cmp r3, #16 - 80035fe: d122 bne.n 8003646 - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET) - 8003600: 687b ldr r3, [r7, #4] - 8003602: 681b ldr r3, [r3, #0] - 8003604: 68db ldr r3, [r3, #12] - 8003606: f003 0310 and.w r3, r3, #16 - 800360a: 2b10 cmp r3, #16 - 800360c: d11b bne.n 8003646 - { - __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4); - 800360e: 687b ldr r3, [r7, #4] - 8003610: 681b ldr r3, [r3, #0] - 8003612: f06f 0210 mvn.w r2, #16 - 8003616: 611a str r2, [r3, #16] - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; - 8003618: 687b ldr r3, [r7, #4] - 800361a: 2208 movs r2, #8 - 800361c: 771a strb r2, [r3, #28] - /* Input capture event */ - if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U) - 800361e: 687b ldr r3, [r7, #4] - 8003620: 681b ldr r3, [r3, #0] - 8003622: 69db ldr r3, [r3, #28] - 8003624: f403 7340 and.w r3, r3, #768 ; 0x300 - 8003628: 2b00 cmp r3, #0 - 800362a: d003 beq.n 8003634 - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->IC_CaptureCallback(htim); -#else - HAL_TIM_IC_CaptureCallback(htim); - 800362c: 6878 ldr r0, [r7, #4] - 800362e: f000 fa02 bl 8003a36 - 8003632: e005 b.n 8003640 - { -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->OC_DelayElapsedCallback(htim); - htim->PWM_PulseFinishedCallback(htim); -#else - HAL_TIM_OC_DelayElapsedCallback(htim); - 8003634: 6878 ldr r0, [r7, #4] - 8003636: f000 f9f5 bl 8003a24 - HAL_TIM_PWM_PulseFinishedCallback(htim); - 800363a: 6878 ldr r0, [r7, #4] - 800363c: f000 fa04 bl 8003a48 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; - 8003640: 687b ldr r3, [r7, #4] - 8003642: 2200 movs r2, #0 - 8003644: 771a strb r2, [r3, #28] - } - } - /* TIM Update event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET) - 8003646: 687b ldr r3, [r7, #4] - 8003648: 681b ldr r3, [r3, #0] - 800364a: 691b ldr r3, [r3, #16] - 800364c: f003 0301 and.w r3, r3, #1 - 8003650: 2b01 cmp r3, #1 - 8003652: d10e bne.n 8003672 - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET) - 8003654: 687b ldr r3, [r7, #4] - 8003656: 681b ldr r3, [r3, #0] - 8003658: 68db ldr r3, [r3, #12] - 800365a: f003 0301 and.w r3, r3, #1 - 800365e: 2b01 cmp r3, #1 - 8003660: d107 bne.n 8003672 - { - __HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE); - 8003662: 687b ldr r3, [r7, #4] - 8003664: 681b ldr r3, [r3, #0] - 8003666: f06f 0201 mvn.w r2, #1 - 800366a: 611a str r2, [r3, #16] -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->PeriodElapsedCallback(htim); -#else - HAL_TIM_PeriodElapsedCallback(htim); - 800366c: 6878 ldr r0, [r7, #4] - 800366e: f000 f9d0 bl 8003a12 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - } - /* TIM Break input event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET) - 8003672: 687b ldr r3, [r7, #4] - 8003674: 681b ldr r3, [r3, #0] - 8003676: 691b ldr r3, [r3, #16] - 8003678: f003 0380 and.w r3, r3, #128 ; 0x80 - 800367c: 2b80 cmp r3, #128 ; 0x80 - 800367e: d10e bne.n 800369e - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET) - 8003680: 687b ldr r3, [r7, #4] - 8003682: 681b ldr r3, [r3, #0] - 8003684: 68db ldr r3, [r3, #12] - 8003686: f003 0380 and.w r3, r3, #128 ; 0x80 - 800368a: 2b80 cmp r3, #128 ; 0x80 - 800368c: d107 bne.n 800369e - { - __HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK); - 800368e: 687b ldr r3, [r7, #4] - 8003690: 681b ldr r3, [r3, #0] - 8003692: f06f 0280 mvn.w r2, #128 ; 0x80 - 8003696: 611a str r2, [r3, #16] -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->BreakCallback(htim); -#else - HAL_TIMEx_BreakCallback(htim); - 8003698: 6878 ldr r0, [r7, #4] - 800369a: f000 fd9b bl 80041d4 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - } - /* TIM Trigger detection event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET) - 800369e: 687b ldr r3, [r7, #4] - 80036a0: 681b ldr r3, [r3, #0] - 80036a2: 691b ldr r3, [r3, #16] - 80036a4: f003 0340 and.w r3, r3, #64 ; 0x40 - 80036a8: 2b40 cmp r3, #64 ; 0x40 - 80036aa: d10e bne.n 80036ca - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET) - 80036ac: 687b ldr r3, [r7, #4] - 80036ae: 681b ldr r3, [r3, #0] - 80036b0: 68db ldr r3, [r3, #12] - 80036b2: f003 0340 and.w r3, r3, #64 ; 0x40 - 80036b6: 2b40 cmp r3, #64 ; 0x40 - 80036b8: d107 bne.n 80036ca - { - __HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER); - 80036ba: 687b ldr r3, [r7, #4] - 80036bc: 681b ldr r3, [r3, #0] - 80036be: f06f 0240 mvn.w r2, #64 ; 0x40 - 80036c2: 611a str r2, [r3, #16] -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->TriggerCallback(htim); -#else - HAL_TIM_TriggerCallback(htim); - 80036c4: 6878 ldr r0, [r7, #4] - 80036c6: f000 f9c8 bl 8003a5a -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - } - /* TIM commutation event */ - if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET) - 80036ca: 687b ldr r3, [r7, #4] - 80036cc: 681b ldr r3, [r3, #0] - 80036ce: 691b ldr r3, [r3, #16] - 80036d0: f003 0320 and.w r3, r3, #32 - 80036d4: 2b20 cmp r3, #32 - 80036d6: d10e bne.n 80036f6 - { - if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET) - 80036d8: 687b ldr r3, [r7, #4] - 80036da: 681b ldr r3, [r3, #0] - 80036dc: 68db ldr r3, [r3, #12] - 80036de: f003 0320 and.w r3, r3, #32 - 80036e2: 2b20 cmp r3, #32 - 80036e4: d107 bne.n 80036f6 - { - __HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM); - 80036e6: 687b ldr r3, [r7, #4] - 80036e8: 681b ldr r3, [r3, #0] - 80036ea: f06f 0220 mvn.w r2, #32 - 80036ee: 611a str r2, [r3, #16] -#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) - htim->CommutationCallback(htim); -#else - HAL_TIMEx_CommutCallback(htim); - 80036f0: 6878 ldr r0, [r7, #4] - 80036f2: f000 fd66 bl 80041c2 -#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ - } - } -} - 80036f6: bf00 nop - 80036f8: 3708 adds r7, #8 - 80036fa: 46bd mov sp, r7 - 80036fc: bd80 pop {r7, pc} - ... - -08003700 : - * @retval HAL status - */ -HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, - const TIM_OC_InitTypeDef *sConfig, - uint32_t Channel) -{ - 8003700: b580 push {r7, lr} - 8003702: b086 sub sp, #24 - 8003704: af00 add r7, sp, #0 - 8003706: 60f8 str r0, [r7, #12] - 8003708: 60b9 str r1, [r7, #8] - 800370a: 607a str r2, [r7, #4] - HAL_StatusTypeDef status = HAL_OK; - 800370c: 2300 movs r3, #0 - 800370e: 75fb strb r3, [r7, #23] - assert_param(IS_TIM_PWM_MODE(sConfig->OCMode)); - assert_param(IS_TIM_OC_POLARITY(sConfig->OCPolarity)); - assert_param(IS_TIM_FAST_STATE(sConfig->OCFastMode)); - - /* Process Locked */ - __HAL_LOCK(htim); - 8003710: 68fb ldr r3, [r7, #12] - 8003712: f893 303c ldrb.w r3, [r3, #60] ; 0x3c - 8003716: 2b01 cmp r3, #1 - 8003718: d101 bne.n 800371e - 800371a: 2302 movs r3, #2 - 800371c: e0ae b.n 800387c - 800371e: 68fb ldr r3, [r7, #12] - 8003720: 2201 movs r2, #1 - 8003722: f883 203c strb.w r2, [r3, #60] ; 0x3c - - switch (Channel) - 8003726: 687b ldr r3, [r7, #4] - 8003728: 2b0c cmp r3, #12 - 800372a: f200 809f bhi.w 800386c - 800372e: a201 add r2, pc, #4 ; (adr r2, 8003734 ) - 8003730: f852 f023 ldr.w pc, [r2, r3, lsl #2] - 8003734: 08003769 .word 0x08003769 - 8003738: 0800386d .word 0x0800386d - 800373c: 0800386d .word 0x0800386d - 8003740: 0800386d .word 0x0800386d - 8003744: 080037a9 .word 0x080037a9 - 8003748: 0800386d .word 0x0800386d - 800374c: 0800386d .word 0x0800386d - 8003750: 0800386d .word 0x0800386d - 8003754: 080037eb .word 0x080037eb - 8003758: 0800386d .word 0x0800386d - 800375c: 0800386d .word 0x0800386d - 8003760: 0800386d .word 0x0800386d - 8003764: 0800382b .word 0x0800382b - { - /* Check the parameters */ - assert_param(IS_TIM_CC1_INSTANCE(htim->Instance)); - - /* Configure the Channel 1 in PWM mode */ - TIM_OC1_SetConfig(htim->Instance, sConfig); - 8003768: 68fb ldr r3, [r7, #12] - 800376a: 681b ldr r3, [r3, #0] - 800376c: 68b9 ldr r1, [r7, #8] - 800376e: 4618 mov r0, r3 - 8003770: f000 fa1a bl 8003ba8 - - /* Set the Preload enable bit for channel1 */ - htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE; - 8003774: 68fb ldr r3, [r7, #12] - 8003776: 681b ldr r3, [r3, #0] - 8003778: 699a ldr r2, [r3, #24] - 800377a: 68fb ldr r3, [r7, #12] - 800377c: 681b ldr r3, [r3, #0] - 800377e: f042 0208 orr.w r2, r2, #8 - 8003782: 619a str r2, [r3, #24] - - /* Configure the Output Fast mode */ - htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE; - 8003784: 68fb ldr r3, [r7, #12] - 8003786: 681b ldr r3, [r3, #0] - 8003788: 699a ldr r2, [r3, #24] - 800378a: 68fb ldr r3, [r7, #12] - 800378c: 681b ldr r3, [r3, #0] - 800378e: f022 0204 bic.w r2, r2, #4 - 8003792: 619a str r2, [r3, #24] - htim->Instance->CCMR1 |= sConfig->OCFastMode; - 8003794: 68fb ldr r3, [r7, #12] - 8003796: 681b ldr r3, [r3, #0] - 8003798: 6999 ldr r1, [r3, #24] - 800379a: 68bb ldr r3, [r7, #8] - 800379c: 691a ldr r2, [r3, #16] - 800379e: 68fb ldr r3, [r7, #12] - 80037a0: 681b ldr r3, [r3, #0] - 80037a2: 430a orrs r2, r1 - 80037a4: 619a str r2, [r3, #24] - break; - 80037a6: e064 b.n 8003872 - { - /* Check the parameters */ - assert_param(IS_TIM_CC2_INSTANCE(htim->Instance)); - - /* Configure the Channel 2 in PWM mode */ - TIM_OC2_SetConfig(htim->Instance, sConfig); - 80037a8: 68fb ldr r3, [r7, #12] - 80037aa: 681b ldr r3, [r3, #0] - 80037ac: 68b9 ldr r1, [r7, #8] - 80037ae: 4618 mov r0, r3 - 80037b0: f000 fa6a bl 8003c88 - - /* Set the Preload enable bit for channel2 */ - htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE; - 80037b4: 68fb ldr r3, [r7, #12] - 80037b6: 681b ldr r3, [r3, #0] - 80037b8: 699a ldr r2, [r3, #24] - 80037ba: 68fb ldr r3, [r7, #12] - 80037bc: 681b ldr r3, [r3, #0] - 80037be: f442 6200 orr.w r2, r2, #2048 ; 0x800 - 80037c2: 619a str r2, [r3, #24] - - /* Configure the Output Fast mode */ - htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE; - 80037c4: 68fb ldr r3, [r7, #12] - 80037c6: 681b ldr r3, [r3, #0] - 80037c8: 699a ldr r2, [r3, #24] - 80037ca: 68fb ldr r3, [r7, #12] - 80037cc: 681b ldr r3, [r3, #0] - 80037ce: f422 6280 bic.w r2, r2, #1024 ; 0x400 - 80037d2: 619a str r2, [r3, #24] - htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U; - 80037d4: 68fb ldr r3, [r7, #12] - 80037d6: 681b ldr r3, [r3, #0] - 80037d8: 6999 ldr r1, [r3, #24] - 80037da: 68bb ldr r3, [r7, #8] - 80037dc: 691b ldr r3, [r3, #16] - 80037de: 021a lsls r2, r3, #8 - 80037e0: 68fb ldr r3, [r7, #12] - 80037e2: 681b ldr r3, [r3, #0] - 80037e4: 430a orrs r2, r1 - 80037e6: 619a str r2, [r3, #24] - break; - 80037e8: e043 b.n 8003872 - { - /* Check the parameters */ - assert_param(IS_TIM_CC3_INSTANCE(htim->Instance)); - - /* Configure the Channel 3 in PWM mode */ - TIM_OC3_SetConfig(htim->Instance, sConfig); - 80037ea: 68fb ldr r3, [r7, #12] - 80037ec: 681b ldr r3, [r3, #0] - 80037ee: 68b9 ldr r1, [r7, #8] - 80037f0: 4618 mov r0, r3 - 80037f2: f000 fabd bl 8003d70 - - /* Set the Preload enable bit for channel3 */ - htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE; - 80037f6: 68fb ldr r3, [r7, #12] - 80037f8: 681b ldr r3, [r3, #0] - 80037fa: 69da ldr r2, [r3, #28] - 80037fc: 68fb ldr r3, [r7, #12] - 80037fe: 681b ldr r3, [r3, #0] - 8003800: f042 0208 orr.w r2, r2, #8 - 8003804: 61da str r2, [r3, #28] - - /* Configure the Output Fast mode */ - htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE; - 8003806: 68fb ldr r3, [r7, #12] - 8003808: 681b ldr r3, [r3, #0] - 800380a: 69da ldr r2, [r3, #28] - 800380c: 68fb ldr r3, [r7, #12] - 800380e: 681b ldr r3, [r3, #0] - 8003810: f022 0204 bic.w r2, r2, #4 - 8003814: 61da str r2, [r3, #28] - htim->Instance->CCMR2 |= sConfig->OCFastMode; - 8003816: 68fb ldr r3, [r7, #12] - 8003818: 681b ldr r3, [r3, #0] - 800381a: 69d9 ldr r1, [r3, #28] - 800381c: 68bb ldr r3, [r7, #8] - 800381e: 691a ldr r2, [r3, #16] - 8003820: 68fb ldr r3, [r7, #12] - 8003822: 681b ldr r3, [r3, #0] - 8003824: 430a orrs r2, r1 - 8003826: 61da str r2, [r3, #28] - break; - 8003828: e023 b.n 8003872 - { - /* Check the parameters */ - assert_param(IS_TIM_CC4_INSTANCE(htim->Instance)); - - /* Configure the Channel 4 in PWM mode */ - TIM_OC4_SetConfig(htim->Instance, sConfig); - 800382a: 68fb ldr r3, [r7, #12] - 800382c: 681b ldr r3, [r3, #0] - 800382e: 68b9 ldr r1, [r7, #8] - 8003830: 4618 mov r0, r3 - 8003832: f000 fb11 bl 8003e58 - - /* Set the Preload enable bit for channel4 */ - htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE; - 8003836: 68fb ldr r3, [r7, #12] - 8003838: 681b ldr r3, [r3, #0] - 800383a: 69da ldr r2, [r3, #28] - 800383c: 68fb ldr r3, [r7, #12] - 800383e: 681b ldr r3, [r3, #0] - 8003840: f442 6200 orr.w r2, r2, #2048 ; 0x800 - 8003844: 61da str r2, [r3, #28] - - /* Configure the Output Fast mode */ - htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE; - 8003846: 68fb ldr r3, [r7, #12] - 8003848: 681b ldr r3, [r3, #0] - 800384a: 69da ldr r2, [r3, #28] - 800384c: 68fb ldr r3, [r7, #12] - 800384e: 681b ldr r3, [r3, #0] - 8003850: f422 6280 bic.w r2, r2, #1024 ; 0x400 - 8003854: 61da str r2, [r3, #28] - htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U; - 8003856: 68fb ldr r3, [r7, #12] - 8003858: 681b ldr r3, [r3, #0] - 800385a: 69d9 ldr r1, [r3, #28] - 800385c: 68bb ldr r3, [r7, #8] - 800385e: 691b ldr r3, [r3, #16] - 8003860: 021a lsls r2, r3, #8 - 8003862: 68fb ldr r3, [r7, #12] - 8003864: 681b ldr r3, [r3, #0] - 8003866: 430a orrs r2, r1 - 8003868: 61da str r2, [r3, #28] - break; - 800386a: e002 b.n 8003872 - } - - default: - status = HAL_ERROR; - 800386c: 2301 movs r3, #1 - 800386e: 75fb strb r3, [r7, #23] - break; - 8003870: bf00 nop - } - - __HAL_UNLOCK(htim); - 8003872: 68fb ldr r3, [r7, #12] - 8003874: 2200 movs r2, #0 - 8003876: f883 203c strb.w r2, [r3, #60] ; 0x3c - - return status; - 800387a: 7dfb ldrb r3, [r7, #23] -} - 800387c: 4618 mov r0, r3 - 800387e: 3718 adds r7, #24 - 8003880: 46bd mov sp, r7 - 8003882: bd80 pop {r7, pc} - -08003884 : - * @param sClockSourceConfig pointer to a TIM_ClockConfigTypeDef structure that - * contains the clock source information for the TIM peripheral. - * @retval HAL status - */ -HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, const TIM_ClockConfigTypeDef *sClockSourceConfig) -{ - 8003884: b580 push {r7, lr} - 8003886: b084 sub sp, #16 - 8003888: af00 add r7, sp, #0 - 800388a: 6078 str r0, [r7, #4] - 800388c: 6039 str r1, [r7, #0] - HAL_StatusTypeDef status = HAL_OK; - 800388e: 2300 movs r3, #0 - 8003890: 73fb strb r3, [r7, #15] - uint32_t tmpsmcr; - - /* Process Locked */ - __HAL_LOCK(htim); - 8003892: 687b ldr r3, [r7, #4] - 8003894: f893 303c ldrb.w r3, [r3, #60] ; 0x3c - 8003898: 2b01 cmp r3, #1 - 800389a: d101 bne.n 80038a0 - 800389c: 2302 movs r3, #2 - 800389e: e0b4 b.n 8003a0a - 80038a0: 687b ldr r3, [r7, #4] - 80038a2: 2201 movs r2, #1 - 80038a4: f883 203c strb.w r2, [r3, #60] ; 0x3c - - htim->State = HAL_TIM_STATE_BUSY; - 80038a8: 687b ldr r3, [r7, #4] - 80038aa: 2202 movs r2, #2 - 80038ac: f883 203d strb.w r2, [r3, #61] ; 0x3d - - /* Check the parameters */ - assert_param(IS_TIM_CLOCKSOURCE(sClockSourceConfig->ClockSource)); - - /* Reset the SMS, TS, ECE, ETPS and ETRF bits */ - tmpsmcr = htim->Instance->SMCR; - 80038b0: 687b ldr r3, [r7, #4] - 80038b2: 681b ldr r3, [r3, #0] - 80038b4: 689b ldr r3, [r3, #8] - 80038b6: 60bb str r3, [r7, #8] - tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS); - 80038b8: 68bb ldr r3, [r7, #8] - 80038ba: f023 0377 bic.w r3, r3, #119 ; 0x77 - 80038be: 60bb str r3, [r7, #8] - tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP); - 80038c0: 68bb ldr r3, [r7, #8] - 80038c2: f423 437f bic.w r3, r3, #65280 ; 0xff00 - 80038c6: 60bb str r3, [r7, #8] - htim->Instance->SMCR = tmpsmcr; - 80038c8: 687b ldr r3, [r7, #4] - 80038ca: 681b ldr r3, [r3, #0] - 80038cc: 68ba ldr r2, [r7, #8] - 80038ce: 609a str r2, [r3, #8] - - switch (sClockSourceConfig->ClockSource) - 80038d0: 683b ldr r3, [r7, #0] - 80038d2: 681b ldr r3, [r3, #0] - 80038d4: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 - 80038d8: d03e beq.n 8003958 - 80038da: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 - 80038de: f200 8087 bhi.w 80039f0 - 80038e2: f5b3 5f80 cmp.w r3, #4096 ; 0x1000 - 80038e6: f000 8086 beq.w 80039f6 - 80038ea: f5b3 5f80 cmp.w r3, #4096 ; 0x1000 - 80038ee: d87f bhi.n 80039f0 - 80038f0: 2b70 cmp r3, #112 ; 0x70 - 80038f2: d01a beq.n 800392a - 80038f4: 2b70 cmp r3, #112 ; 0x70 - 80038f6: d87b bhi.n 80039f0 - 80038f8: 2b60 cmp r3, #96 ; 0x60 - 80038fa: d050 beq.n 800399e - 80038fc: 2b60 cmp r3, #96 ; 0x60 - 80038fe: d877 bhi.n 80039f0 - 8003900: 2b50 cmp r3, #80 ; 0x50 - 8003902: d03c beq.n 800397e - 8003904: 2b50 cmp r3, #80 ; 0x50 - 8003906: d873 bhi.n 80039f0 - 8003908: 2b40 cmp r3, #64 ; 0x40 - 800390a: d058 beq.n 80039be - 800390c: 2b40 cmp r3, #64 ; 0x40 - 800390e: d86f bhi.n 80039f0 - 8003910: 2b30 cmp r3, #48 ; 0x30 - 8003912: d064 beq.n 80039de - 8003914: 2b30 cmp r3, #48 ; 0x30 - 8003916: d86b bhi.n 80039f0 - 8003918: 2b20 cmp r3, #32 - 800391a: d060 beq.n 80039de - 800391c: 2b20 cmp r3, #32 - 800391e: d867 bhi.n 80039f0 - 8003920: 2b00 cmp r3, #0 - 8003922: d05c beq.n 80039de - 8003924: 2b10 cmp r3, #16 - 8003926: d05a beq.n 80039de - 8003928: e062 b.n 80039f0 - assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler)); - assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); - assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); - - /* Configure the ETR Clock source */ - TIM_ETR_SetConfig(htim->Instance, - 800392a: 687b ldr r3, [r7, #4] - 800392c: 6818 ldr r0, [r3, #0] - sClockSourceConfig->ClockPrescaler, - 800392e: 683b ldr r3, [r7, #0] - 8003930: 6899 ldr r1, [r3, #8] - sClockSourceConfig->ClockPolarity, - 8003932: 683b ldr r3, [r7, #0] - 8003934: 685a ldr r2, [r3, #4] - sClockSourceConfig->ClockFilter); - 8003936: 683b ldr r3, [r7, #0] - 8003938: 68db ldr r3, [r3, #12] - TIM_ETR_SetConfig(htim->Instance, - 800393a: f000 fb58 bl 8003fee - - /* Select the External clock mode1 and the ETRF trigger */ - tmpsmcr = htim->Instance->SMCR; - 800393e: 687b ldr r3, [r7, #4] - 8003940: 681b ldr r3, [r3, #0] - 8003942: 689b ldr r3, [r3, #8] - 8003944: 60bb str r3, [r7, #8] - tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1); - 8003946: 68bb ldr r3, [r7, #8] - 8003948: f043 0377 orr.w r3, r3, #119 ; 0x77 - 800394c: 60bb str r3, [r7, #8] - /* Write to TIMx SMCR */ - htim->Instance->SMCR = tmpsmcr; - 800394e: 687b ldr r3, [r7, #4] - 8003950: 681b ldr r3, [r3, #0] - 8003952: 68ba ldr r2, [r7, #8] - 8003954: 609a str r2, [r3, #8] - break; - 8003956: e04f b.n 80039f8 - assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler)); - assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); - assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); - - /* Configure the ETR Clock source */ - TIM_ETR_SetConfig(htim->Instance, - 8003958: 687b ldr r3, [r7, #4] - 800395a: 6818 ldr r0, [r3, #0] - sClockSourceConfig->ClockPrescaler, - 800395c: 683b ldr r3, [r7, #0] - 800395e: 6899 ldr r1, [r3, #8] - sClockSourceConfig->ClockPolarity, - 8003960: 683b ldr r3, [r7, #0] - 8003962: 685a ldr r2, [r3, #4] - sClockSourceConfig->ClockFilter); - 8003964: 683b ldr r3, [r7, #0] - 8003966: 68db ldr r3, [r3, #12] - TIM_ETR_SetConfig(htim->Instance, - 8003968: f000 fb41 bl 8003fee - /* Enable the External clock mode2 */ - htim->Instance->SMCR |= TIM_SMCR_ECE; - 800396c: 687b ldr r3, [r7, #4] - 800396e: 681b ldr r3, [r3, #0] - 8003970: 689a ldr r2, [r3, #8] - 8003972: 687b ldr r3, [r7, #4] - 8003974: 681b ldr r3, [r3, #0] - 8003976: f442 4280 orr.w r2, r2, #16384 ; 0x4000 - 800397a: 609a str r2, [r3, #8] - break; - 800397c: e03c b.n 80039f8 - - /* Check TI1 input conditioning related parameters */ - assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); - assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); - - TIM_TI1_ConfigInputStage(htim->Instance, - 800397e: 687b ldr r3, [r7, #4] - 8003980: 6818 ldr r0, [r3, #0] - sClockSourceConfig->ClockPolarity, - 8003982: 683b ldr r3, [r7, #0] - 8003984: 6859 ldr r1, [r3, #4] - sClockSourceConfig->ClockFilter); - 8003986: 683b ldr r3, [r7, #0] - 8003988: 68db ldr r3, [r3, #12] - TIM_TI1_ConfigInputStage(htim->Instance, - 800398a: 461a mov r2, r3 - 800398c: f000 fab8 bl 8003f00 - TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1); - 8003990: 687b ldr r3, [r7, #4] - 8003992: 681b ldr r3, [r3, #0] - 8003994: 2150 movs r1, #80 ; 0x50 - 8003996: 4618 mov r0, r3 - 8003998: f000 fb0f bl 8003fba - break; - 800399c: e02c b.n 80039f8 - - /* Check TI2 input conditioning related parameters */ - assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); - assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); - - TIM_TI2_ConfigInputStage(htim->Instance, - 800399e: 687b ldr r3, [r7, #4] - 80039a0: 6818 ldr r0, [r3, #0] - sClockSourceConfig->ClockPolarity, - 80039a2: 683b ldr r3, [r7, #0] - 80039a4: 6859 ldr r1, [r3, #4] - sClockSourceConfig->ClockFilter); - 80039a6: 683b ldr r3, [r7, #0] - 80039a8: 68db ldr r3, [r3, #12] - TIM_TI2_ConfigInputStage(htim->Instance, - 80039aa: 461a mov r2, r3 - 80039ac: f000 fad6 bl 8003f5c - TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2); - 80039b0: 687b ldr r3, [r7, #4] - 80039b2: 681b ldr r3, [r3, #0] - 80039b4: 2160 movs r1, #96 ; 0x60 - 80039b6: 4618 mov r0, r3 - 80039b8: f000 faff bl 8003fba - break; - 80039bc: e01c b.n 80039f8 - - /* Check TI1 input conditioning related parameters */ - assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); - assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); - - TIM_TI1_ConfigInputStage(htim->Instance, - 80039be: 687b ldr r3, [r7, #4] - 80039c0: 6818 ldr r0, [r3, #0] - sClockSourceConfig->ClockPolarity, - 80039c2: 683b ldr r3, [r7, #0] - 80039c4: 6859 ldr r1, [r3, #4] - sClockSourceConfig->ClockFilter); - 80039c6: 683b ldr r3, [r7, #0] - 80039c8: 68db ldr r3, [r3, #12] - TIM_TI1_ConfigInputStage(htim->Instance, - 80039ca: 461a mov r2, r3 - 80039cc: f000 fa98 bl 8003f00 - TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED); - 80039d0: 687b ldr r3, [r7, #4] - 80039d2: 681b ldr r3, [r3, #0] - 80039d4: 2140 movs r1, #64 ; 0x40 - 80039d6: 4618 mov r0, r3 - 80039d8: f000 faef bl 8003fba - break; - 80039dc: e00c b.n 80039f8 - case TIM_CLOCKSOURCE_ITR3: - { - /* Check whether or not the timer instance supports internal trigger input */ - assert_param(IS_TIM_CLOCKSOURCE_ITRX_INSTANCE(htim->Instance)); - - TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource); - 80039de: 687b ldr r3, [r7, #4] - 80039e0: 681a ldr r2, [r3, #0] - 80039e2: 683b ldr r3, [r7, #0] - 80039e4: 681b ldr r3, [r3, #0] - 80039e6: 4619 mov r1, r3 - 80039e8: 4610 mov r0, r2 - 80039ea: f000 fae6 bl 8003fba - break; - 80039ee: e003 b.n 80039f8 - } - - default: - status = HAL_ERROR; - 80039f0: 2301 movs r3, #1 - 80039f2: 73fb strb r3, [r7, #15] - break; - 80039f4: e000 b.n 80039f8 - break; - 80039f6: bf00 nop - } - htim->State = HAL_TIM_STATE_READY; - 80039f8: 687b ldr r3, [r7, #4] - 80039fa: 2201 movs r2, #1 - 80039fc: f883 203d strb.w r2, [r3, #61] ; 0x3d - - __HAL_UNLOCK(htim); - 8003a00: 687b ldr r3, [r7, #4] - 8003a02: 2200 movs r2, #0 - 8003a04: f883 203c strb.w r2, [r3, #60] ; 0x3c - - return status; - 8003a08: 7bfb ldrb r3, [r7, #15] -} - 8003a0a: 4618 mov r0, r3 - 8003a0c: 3710 adds r7, #16 - 8003a0e: 46bd mov sp, r7 - 8003a10: bd80 pop {r7, pc} - -08003a12 : - * @brief Period elapsed callback in non-blocking mode - * @param htim TIM handle - * @retval None - */ -__weak void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) -{ - 8003a12: b480 push {r7} - 8003a14: b083 sub sp, #12 - 8003a16: af00 add r7, sp, #0 - 8003a18: 6078 str r0, [r7, #4] - UNUSED(htim); - - /* NOTE : This function should not be modified, when the callback is needed, - the HAL_TIM_PeriodElapsedCallback could be implemented in the user file - */ -} - 8003a1a: bf00 nop - 8003a1c: 370c adds r7, #12 - 8003a1e: 46bd mov sp, r7 - 8003a20: bc80 pop {r7} - 8003a22: 4770 bx lr - -08003a24 : - * @brief Output Compare callback in non-blocking mode - * @param htim TIM OC handle - * @retval None - */ -__weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) -{ - 8003a24: b480 push {r7} - 8003a26: b083 sub sp, #12 - 8003a28: af00 add r7, sp, #0 - 8003a2a: 6078 str r0, [r7, #4] - 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 - */ -} - 8003a2c: bf00 nop - 8003a2e: 370c adds r7, #12 - 8003a30: 46bd mov sp, r7 - 8003a32: bc80 pop {r7} - 8003a34: 4770 bx lr - -08003a36 : - * @brief Input Capture callback in non-blocking mode - * @param htim TIM IC handle - * @retval None - */ -__weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) -{ - 8003a36: b480 push {r7} - 8003a38: b083 sub sp, #12 - 8003a3a: af00 add r7, sp, #0 - 8003a3c: 6078 str r0, [r7, #4] - 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 - */ -} - 8003a3e: bf00 nop - 8003a40: 370c adds r7, #12 - 8003a42: 46bd mov sp, r7 - 8003a44: bc80 pop {r7} - 8003a46: 4770 bx lr - -08003a48 : - * @brief PWM Pulse finished callback in non-blocking mode - * @param htim TIM handle - * @retval None - */ -__weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) -{ - 8003a48: b480 push {r7} - 8003a4a: b083 sub sp, #12 - 8003a4c: af00 add r7, sp, #0 - 8003a4e: 6078 str r0, [r7, #4] - 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 - */ -} - 8003a50: bf00 nop - 8003a52: 370c adds r7, #12 - 8003a54: 46bd mov sp, r7 - 8003a56: bc80 pop {r7} - 8003a58: 4770 bx lr - -08003a5a : - * @brief Hall Trigger detection callback in non-blocking mode - * @param htim TIM handle - * @retval None - */ -__weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim) -{ - 8003a5a: b480 push {r7} - 8003a5c: b083 sub sp, #12 - 8003a5e: af00 add r7, sp, #0 - 8003a60: 6078 str r0, [r7, #4] - 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 - */ -} - 8003a62: bf00 nop - 8003a64: 370c adds r7, #12 - 8003a66: 46bd mov sp, r7 - 8003a68: bc80 pop {r7} - 8003a6a: 4770 bx lr - -08003a6c : - * @param TIMx TIM peripheral - * @param Structure TIM Base configuration structure - * @retval None - */ -void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure) -{ - 8003a6c: b480 push {r7} - 8003a6e: b085 sub sp, #20 - 8003a70: af00 add r7, sp, #0 - 8003a72: 6078 str r0, [r7, #4] - 8003a74: 6039 str r1, [r7, #0] - uint32_t tmpcr1; - tmpcr1 = TIMx->CR1; - 8003a76: 687b ldr r3, [r7, #4] - 8003a78: 681b ldr r3, [r3, #0] - 8003a7a: 60fb str r3, [r7, #12] - - /* Set TIM Time Base Unit parameters ---------------------------------------*/ - if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx)) - 8003a7c: 687b ldr r3, [r7, #4] - 8003a7e: 4a3f ldr r2, [pc, #252] ; (8003b7c ) - 8003a80: 4293 cmp r3, r2 - 8003a82: d013 beq.n 8003aac - 8003a84: 687b ldr r3, [r7, #4] - 8003a86: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 - 8003a8a: d00f beq.n 8003aac - 8003a8c: 687b ldr r3, [r7, #4] - 8003a8e: 4a3c ldr r2, [pc, #240] ; (8003b80 ) - 8003a90: 4293 cmp r3, r2 - 8003a92: d00b beq.n 8003aac - 8003a94: 687b ldr r3, [r7, #4] - 8003a96: 4a3b ldr r2, [pc, #236] ; (8003b84 ) - 8003a98: 4293 cmp r3, r2 - 8003a9a: d007 beq.n 8003aac - 8003a9c: 687b ldr r3, [r7, #4] - 8003a9e: 4a3a ldr r2, [pc, #232] ; (8003b88 ) - 8003aa0: 4293 cmp r3, r2 - 8003aa2: d003 beq.n 8003aac - 8003aa4: 687b ldr r3, [r7, #4] - 8003aa6: 4a39 ldr r2, [pc, #228] ; (8003b8c ) - 8003aa8: 4293 cmp r3, r2 - 8003aaa: d108 bne.n 8003abe - { - /* Select the Counter Mode */ - tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS); - 8003aac: 68fb ldr r3, [r7, #12] - 8003aae: f023 0370 bic.w r3, r3, #112 ; 0x70 - 8003ab2: 60fb str r3, [r7, #12] - tmpcr1 |= Structure->CounterMode; - 8003ab4: 683b ldr r3, [r7, #0] - 8003ab6: 685b ldr r3, [r3, #4] - 8003ab8: 68fa ldr r2, [r7, #12] - 8003aba: 4313 orrs r3, r2 - 8003abc: 60fb str r3, [r7, #12] - } - - if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx)) - 8003abe: 687b ldr r3, [r7, #4] - 8003ac0: 4a2e ldr r2, [pc, #184] ; (8003b7c ) - 8003ac2: 4293 cmp r3, r2 - 8003ac4: d02b beq.n 8003b1e - 8003ac6: 687b ldr r3, [r7, #4] - 8003ac8: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 - 8003acc: d027 beq.n 8003b1e - 8003ace: 687b ldr r3, [r7, #4] - 8003ad0: 4a2b ldr r2, [pc, #172] ; (8003b80 ) - 8003ad2: 4293 cmp r3, r2 - 8003ad4: d023 beq.n 8003b1e - 8003ad6: 687b ldr r3, [r7, #4] - 8003ad8: 4a2a ldr r2, [pc, #168] ; (8003b84 ) - 8003ada: 4293 cmp r3, r2 - 8003adc: d01f beq.n 8003b1e - 8003ade: 687b ldr r3, [r7, #4] - 8003ae0: 4a29 ldr r2, [pc, #164] ; (8003b88 ) - 8003ae2: 4293 cmp r3, r2 - 8003ae4: d01b beq.n 8003b1e - 8003ae6: 687b ldr r3, [r7, #4] - 8003ae8: 4a28 ldr r2, [pc, #160] ; (8003b8c ) - 8003aea: 4293 cmp r3, r2 - 8003aec: d017 beq.n 8003b1e - 8003aee: 687b ldr r3, [r7, #4] - 8003af0: 4a27 ldr r2, [pc, #156] ; (8003b90 ) - 8003af2: 4293 cmp r3, r2 - 8003af4: d013 beq.n 8003b1e - 8003af6: 687b ldr r3, [r7, #4] - 8003af8: 4a26 ldr r2, [pc, #152] ; (8003b94 ) - 8003afa: 4293 cmp r3, r2 - 8003afc: d00f beq.n 8003b1e - 8003afe: 687b ldr r3, [r7, #4] - 8003b00: 4a25 ldr r2, [pc, #148] ; (8003b98 ) - 8003b02: 4293 cmp r3, r2 - 8003b04: d00b beq.n 8003b1e - 8003b06: 687b ldr r3, [r7, #4] - 8003b08: 4a24 ldr r2, [pc, #144] ; (8003b9c ) - 8003b0a: 4293 cmp r3, r2 - 8003b0c: d007 beq.n 8003b1e - 8003b0e: 687b ldr r3, [r7, #4] - 8003b10: 4a23 ldr r2, [pc, #140] ; (8003ba0 ) - 8003b12: 4293 cmp r3, r2 - 8003b14: d003 beq.n 8003b1e - 8003b16: 687b ldr r3, [r7, #4] - 8003b18: 4a22 ldr r2, [pc, #136] ; (8003ba4 ) - 8003b1a: 4293 cmp r3, r2 - 8003b1c: d108 bne.n 8003b30 - { - /* Set the clock division */ - tmpcr1 &= ~TIM_CR1_CKD; - 8003b1e: 68fb ldr r3, [r7, #12] - 8003b20: f423 7340 bic.w r3, r3, #768 ; 0x300 - 8003b24: 60fb str r3, [r7, #12] - tmpcr1 |= (uint32_t)Structure->ClockDivision; - 8003b26: 683b ldr r3, [r7, #0] - 8003b28: 68db ldr r3, [r3, #12] - 8003b2a: 68fa ldr r2, [r7, #12] - 8003b2c: 4313 orrs r3, r2 - 8003b2e: 60fb str r3, [r7, #12] - } - - /* Set the auto-reload preload */ - MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload); - 8003b30: 68fb ldr r3, [r7, #12] - 8003b32: f023 0280 bic.w r2, r3, #128 ; 0x80 - 8003b36: 683b ldr r3, [r7, #0] - 8003b38: 695b ldr r3, [r3, #20] - 8003b3a: 4313 orrs r3, r2 - 8003b3c: 60fb str r3, [r7, #12] - - TIMx->CR1 = tmpcr1; - 8003b3e: 687b ldr r3, [r7, #4] - 8003b40: 68fa ldr r2, [r7, #12] - 8003b42: 601a str r2, [r3, #0] - - /* Set the Autoreload value */ - TIMx->ARR = (uint32_t)Structure->Period ; - 8003b44: 683b ldr r3, [r7, #0] - 8003b46: 689a ldr r2, [r3, #8] - 8003b48: 687b ldr r3, [r7, #4] - 8003b4a: 62da str r2, [r3, #44] ; 0x2c - - /* Set the Prescaler value */ - TIMx->PSC = Structure->Prescaler; - 8003b4c: 683b ldr r3, [r7, #0] - 8003b4e: 681a ldr r2, [r3, #0] - 8003b50: 687b ldr r3, [r7, #4] - 8003b52: 629a str r2, [r3, #40] ; 0x28 - - if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx)) - 8003b54: 687b ldr r3, [r7, #4] - 8003b56: 4a09 ldr r2, [pc, #36] ; (8003b7c ) - 8003b58: 4293 cmp r3, r2 - 8003b5a: d003 beq.n 8003b64 - 8003b5c: 687b ldr r3, [r7, #4] - 8003b5e: 4a0b ldr r2, [pc, #44] ; (8003b8c ) - 8003b60: 4293 cmp r3, r2 - 8003b62: d103 bne.n 8003b6c - { - /* Set the Repetition Counter value */ - TIMx->RCR = Structure->RepetitionCounter; - 8003b64: 683b ldr r3, [r7, #0] - 8003b66: 691a ldr r2, [r3, #16] - 8003b68: 687b ldr r3, [r7, #4] - 8003b6a: 631a str r2, [r3, #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; - 8003b6c: 687b ldr r3, [r7, #4] - 8003b6e: 2201 movs r2, #1 - 8003b70: 615a str r2, [r3, #20] -} - 8003b72: bf00 nop - 8003b74: 3714 adds r7, #20 - 8003b76: 46bd mov sp, r7 - 8003b78: bc80 pop {r7} - 8003b7a: 4770 bx lr - 8003b7c: 40010000 .word 0x40010000 - 8003b80: 40000400 .word 0x40000400 - 8003b84: 40000800 .word 0x40000800 - 8003b88: 40000c00 .word 0x40000c00 - 8003b8c: 40010400 .word 0x40010400 - 8003b90: 40014000 .word 0x40014000 - 8003b94: 40014400 .word 0x40014400 - 8003b98: 40014800 .word 0x40014800 - 8003b9c: 40001800 .word 0x40001800 - 8003ba0: 40001c00 .word 0x40001c00 - 8003ba4: 40002000 .word 0x40002000 - -08003ba8 : - * @param TIMx to select the TIM peripheral - * @param OC_Config The output configuration structure - * @retval None - */ -static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) -{ - 8003ba8: b480 push {r7} - 8003baa: b087 sub sp, #28 - 8003bac: af00 add r7, sp, #0 - 8003bae: 6078 str r0, [r7, #4] - 8003bb0: 6039 str r1, [r7, #0] - uint32_t tmpccmrx; - uint32_t tmpccer; - uint32_t tmpcr2; - - /* Get the TIMx CCER register value */ - tmpccer = TIMx->CCER; - 8003bb2: 687b ldr r3, [r7, #4] - 8003bb4: 6a1b ldr r3, [r3, #32] - 8003bb6: 617b str r3, [r7, #20] - - /* Disable the Channel 1: Reset the CC1E Bit */ - TIMx->CCER &= ~TIM_CCER_CC1E; - 8003bb8: 687b ldr r3, [r7, #4] - 8003bba: 6a1b ldr r3, [r3, #32] - 8003bbc: f023 0201 bic.w r2, r3, #1 - 8003bc0: 687b ldr r3, [r7, #4] - 8003bc2: 621a str r2, [r3, #32] - - /* Get the TIMx CR2 register value */ - tmpcr2 = TIMx->CR2; - 8003bc4: 687b ldr r3, [r7, #4] - 8003bc6: 685b ldr r3, [r3, #4] - 8003bc8: 613b str r3, [r7, #16] - - /* Get the TIMx CCMR1 register value */ - tmpccmrx = TIMx->CCMR1; - 8003bca: 687b ldr r3, [r7, #4] - 8003bcc: 699b ldr r3, [r3, #24] - 8003bce: 60fb str r3, [r7, #12] - - /* Reset the Output Compare Mode Bits */ - tmpccmrx &= ~TIM_CCMR1_OC1M; - 8003bd0: 68fb ldr r3, [r7, #12] - 8003bd2: f023 0370 bic.w r3, r3, #112 ; 0x70 - 8003bd6: 60fb str r3, [r7, #12] - tmpccmrx &= ~TIM_CCMR1_CC1S; - 8003bd8: 68fb ldr r3, [r7, #12] - 8003bda: f023 0303 bic.w r3, r3, #3 - 8003bde: 60fb str r3, [r7, #12] - /* Select the Output Compare Mode */ - tmpccmrx |= OC_Config->OCMode; - 8003be0: 683b ldr r3, [r7, #0] - 8003be2: 681b ldr r3, [r3, #0] - 8003be4: 68fa ldr r2, [r7, #12] - 8003be6: 4313 orrs r3, r2 - 8003be8: 60fb str r3, [r7, #12] - - /* Reset the Output Polarity level */ - tmpccer &= ~TIM_CCER_CC1P; - 8003bea: 697b ldr r3, [r7, #20] - 8003bec: f023 0302 bic.w r3, r3, #2 - 8003bf0: 617b str r3, [r7, #20] - /* Set the Output Compare Polarity */ - tmpccer |= OC_Config->OCPolarity; - 8003bf2: 683b ldr r3, [r7, #0] - 8003bf4: 689b ldr r3, [r3, #8] - 8003bf6: 697a ldr r2, [r7, #20] - 8003bf8: 4313 orrs r3, r2 - 8003bfa: 617b str r3, [r7, #20] - - if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_1)) - 8003bfc: 687b ldr r3, [r7, #4] - 8003bfe: 4a20 ldr r2, [pc, #128] ; (8003c80 ) - 8003c00: 4293 cmp r3, r2 - 8003c02: d003 beq.n 8003c0c - 8003c04: 687b ldr r3, [r7, #4] - 8003c06: 4a1f ldr r2, [pc, #124] ; (8003c84 ) - 8003c08: 4293 cmp r3, r2 - 8003c0a: d10c bne.n 8003c26 - { - /* Check parameters */ - assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity)); - - /* Reset the Output N Polarity level */ - tmpccer &= ~TIM_CCER_CC1NP; - 8003c0c: 697b ldr r3, [r7, #20] - 8003c0e: f023 0308 bic.w r3, r3, #8 - 8003c12: 617b str r3, [r7, #20] - /* Set the Output N Polarity */ - tmpccer |= OC_Config->OCNPolarity; - 8003c14: 683b ldr r3, [r7, #0] - 8003c16: 68db ldr r3, [r3, #12] - 8003c18: 697a ldr r2, [r7, #20] - 8003c1a: 4313 orrs r3, r2 - 8003c1c: 617b str r3, [r7, #20] - /* Reset the Output N State */ - tmpccer &= ~TIM_CCER_CC1NE; - 8003c1e: 697b ldr r3, [r7, #20] - 8003c20: f023 0304 bic.w r3, r3, #4 - 8003c24: 617b str r3, [r7, #20] - } - - if (IS_TIM_BREAK_INSTANCE(TIMx)) - 8003c26: 687b ldr r3, [r7, #4] - 8003c28: 4a15 ldr r2, [pc, #84] ; (8003c80 ) - 8003c2a: 4293 cmp r3, r2 - 8003c2c: d003 beq.n 8003c36 - 8003c2e: 687b ldr r3, [r7, #4] - 8003c30: 4a14 ldr r2, [pc, #80] ; (8003c84 ) - 8003c32: 4293 cmp r3, r2 - 8003c34: d111 bne.n 8003c5a - /* Check parameters */ - assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState)); - assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); - - /* Reset the Output Compare and Output Compare N IDLE State */ - tmpcr2 &= ~TIM_CR2_OIS1; - 8003c36: 693b ldr r3, [r7, #16] - 8003c38: f423 7380 bic.w r3, r3, #256 ; 0x100 - 8003c3c: 613b str r3, [r7, #16] - tmpcr2 &= ~TIM_CR2_OIS1N; - 8003c3e: 693b ldr r3, [r7, #16] - 8003c40: f423 7300 bic.w r3, r3, #512 ; 0x200 - 8003c44: 613b str r3, [r7, #16] - /* Set the Output Idle state */ - tmpcr2 |= OC_Config->OCIdleState; - 8003c46: 683b ldr r3, [r7, #0] - 8003c48: 695b ldr r3, [r3, #20] - 8003c4a: 693a ldr r2, [r7, #16] - 8003c4c: 4313 orrs r3, r2 - 8003c4e: 613b str r3, [r7, #16] - /* Set the Output N Idle state */ - tmpcr2 |= OC_Config->OCNIdleState; - 8003c50: 683b ldr r3, [r7, #0] - 8003c52: 699b ldr r3, [r3, #24] - 8003c54: 693a ldr r2, [r7, #16] - 8003c56: 4313 orrs r3, r2 - 8003c58: 613b str r3, [r7, #16] - } - - /* Write to TIMx CR2 */ - TIMx->CR2 = tmpcr2; - 8003c5a: 687b ldr r3, [r7, #4] - 8003c5c: 693a ldr r2, [r7, #16] - 8003c5e: 605a str r2, [r3, #4] - - /* Write to TIMx CCMR1 */ - TIMx->CCMR1 = tmpccmrx; - 8003c60: 687b ldr r3, [r7, #4] - 8003c62: 68fa ldr r2, [r7, #12] - 8003c64: 619a str r2, [r3, #24] - - /* Set the Capture Compare Register value */ - TIMx->CCR1 = OC_Config->Pulse; - 8003c66: 683b ldr r3, [r7, #0] - 8003c68: 685a ldr r2, [r3, #4] - 8003c6a: 687b ldr r3, [r7, #4] - 8003c6c: 635a str r2, [r3, #52] ; 0x34 - - /* Write to TIMx CCER */ - TIMx->CCER = tmpccer; - 8003c6e: 687b ldr r3, [r7, #4] - 8003c70: 697a ldr r2, [r7, #20] - 8003c72: 621a str r2, [r3, #32] -} - 8003c74: bf00 nop - 8003c76: 371c adds r7, #28 - 8003c78: 46bd mov sp, r7 - 8003c7a: bc80 pop {r7} - 8003c7c: 4770 bx lr - 8003c7e: bf00 nop - 8003c80: 40010000 .word 0x40010000 - 8003c84: 40010400 .word 0x40010400 - -08003c88 : - * @param TIMx to select the TIM peripheral - * @param OC_Config The output configuration structure - * @retval None - */ -void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) -{ - 8003c88: b480 push {r7} - 8003c8a: b087 sub sp, #28 - 8003c8c: af00 add r7, sp, #0 - 8003c8e: 6078 str r0, [r7, #4] - 8003c90: 6039 str r1, [r7, #0] - uint32_t tmpccmrx; - uint32_t tmpccer; - uint32_t tmpcr2; - - /* Get the TIMx CCER register value */ - tmpccer = TIMx->CCER; - 8003c92: 687b ldr r3, [r7, #4] - 8003c94: 6a1b ldr r3, [r3, #32] - 8003c96: 617b str r3, [r7, #20] - - /* Disable the Channel 2: Reset the CC2E Bit */ - TIMx->CCER &= ~TIM_CCER_CC2E; - 8003c98: 687b ldr r3, [r7, #4] - 8003c9a: 6a1b ldr r3, [r3, #32] - 8003c9c: f023 0210 bic.w r2, r3, #16 - 8003ca0: 687b ldr r3, [r7, #4] - 8003ca2: 621a str r2, [r3, #32] - - /* Get the TIMx CR2 register value */ - tmpcr2 = TIMx->CR2; - 8003ca4: 687b ldr r3, [r7, #4] - 8003ca6: 685b ldr r3, [r3, #4] - 8003ca8: 613b str r3, [r7, #16] - - /* Get the TIMx CCMR1 register value */ - tmpccmrx = TIMx->CCMR1; - 8003caa: 687b ldr r3, [r7, #4] - 8003cac: 699b ldr r3, [r3, #24] - 8003cae: 60fb str r3, [r7, #12] - - /* Reset the Output Compare mode and Capture/Compare selection Bits */ - tmpccmrx &= ~TIM_CCMR1_OC2M; - 8003cb0: 68fb ldr r3, [r7, #12] - 8003cb2: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 - 8003cb6: 60fb str r3, [r7, #12] - tmpccmrx &= ~TIM_CCMR1_CC2S; - 8003cb8: 68fb ldr r3, [r7, #12] - 8003cba: f423 7340 bic.w r3, r3, #768 ; 0x300 - 8003cbe: 60fb str r3, [r7, #12] - - /* Select the Output Compare Mode */ - tmpccmrx |= (OC_Config->OCMode << 8U); - 8003cc0: 683b ldr r3, [r7, #0] - 8003cc2: 681b ldr r3, [r3, #0] - 8003cc4: 021b lsls r3, r3, #8 - 8003cc6: 68fa ldr r2, [r7, #12] - 8003cc8: 4313 orrs r3, r2 - 8003cca: 60fb str r3, [r7, #12] - - /* Reset the Output Polarity level */ - tmpccer &= ~TIM_CCER_CC2P; - 8003ccc: 697b ldr r3, [r7, #20] - 8003cce: f023 0320 bic.w r3, r3, #32 - 8003cd2: 617b str r3, [r7, #20] - /* Set the Output Compare Polarity */ - tmpccer |= (OC_Config->OCPolarity << 4U); - 8003cd4: 683b ldr r3, [r7, #0] - 8003cd6: 689b ldr r3, [r3, #8] - 8003cd8: 011b lsls r3, r3, #4 - 8003cda: 697a ldr r2, [r7, #20] - 8003cdc: 4313 orrs r3, r2 - 8003cde: 617b str r3, [r7, #20] - - if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_2)) - 8003ce0: 687b ldr r3, [r7, #4] - 8003ce2: 4a21 ldr r2, [pc, #132] ; (8003d68 ) - 8003ce4: 4293 cmp r3, r2 - 8003ce6: d003 beq.n 8003cf0 - 8003ce8: 687b ldr r3, [r7, #4] - 8003cea: 4a20 ldr r2, [pc, #128] ; (8003d6c ) - 8003cec: 4293 cmp r3, r2 - 8003cee: d10d bne.n 8003d0c - { - assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity)); - - /* Reset the Output N Polarity level */ - tmpccer &= ~TIM_CCER_CC2NP; - 8003cf0: 697b ldr r3, [r7, #20] - 8003cf2: f023 0380 bic.w r3, r3, #128 ; 0x80 - 8003cf6: 617b str r3, [r7, #20] - /* Set the Output N Polarity */ - tmpccer |= (OC_Config->OCNPolarity << 4U); - 8003cf8: 683b ldr r3, [r7, #0] - 8003cfa: 68db ldr r3, [r3, #12] - 8003cfc: 011b lsls r3, r3, #4 - 8003cfe: 697a ldr r2, [r7, #20] - 8003d00: 4313 orrs r3, r2 - 8003d02: 617b str r3, [r7, #20] - /* Reset the Output N State */ - tmpccer &= ~TIM_CCER_CC2NE; - 8003d04: 697b ldr r3, [r7, #20] - 8003d06: f023 0340 bic.w r3, r3, #64 ; 0x40 - 8003d0a: 617b str r3, [r7, #20] - - } - - if (IS_TIM_BREAK_INSTANCE(TIMx)) - 8003d0c: 687b ldr r3, [r7, #4] - 8003d0e: 4a16 ldr r2, [pc, #88] ; (8003d68 ) - 8003d10: 4293 cmp r3, r2 - 8003d12: d003 beq.n 8003d1c - 8003d14: 687b ldr r3, [r7, #4] - 8003d16: 4a15 ldr r2, [pc, #84] ; (8003d6c ) - 8003d18: 4293 cmp r3, r2 - 8003d1a: d113 bne.n 8003d44 - /* Check parameters */ - assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState)); - assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); - - /* Reset the Output Compare and Output Compare N IDLE State */ - tmpcr2 &= ~TIM_CR2_OIS2; - 8003d1c: 693b ldr r3, [r7, #16] - 8003d1e: f423 6380 bic.w r3, r3, #1024 ; 0x400 - 8003d22: 613b str r3, [r7, #16] - tmpcr2 &= ~TIM_CR2_OIS2N; - 8003d24: 693b ldr r3, [r7, #16] - 8003d26: f423 6300 bic.w r3, r3, #2048 ; 0x800 - 8003d2a: 613b str r3, [r7, #16] - /* Set the Output Idle state */ - tmpcr2 |= (OC_Config->OCIdleState << 2U); - 8003d2c: 683b ldr r3, [r7, #0] - 8003d2e: 695b ldr r3, [r3, #20] - 8003d30: 009b lsls r3, r3, #2 - 8003d32: 693a ldr r2, [r7, #16] - 8003d34: 4313 orrs r3, r2 - 8003d36: 613b str r3, [r7, #16] - /* Set the Output N Idle state */ - tmpcr2 |= (OC_Config->OCNIdleState << 2U); - 8003d38: 683b ldr r3, [r7, #0] - 8003d3a: 699b ldr r3, [r3, #24] - 8003d3c: 009b lsls r3, r3, #2 - 8003d3e: 693a ldr r2, [r7, #16] - 8003d40: 4313 orrs r3, r2 - 8003d42: 613b str r3, [r7, #16] - } - - /* Write to TIMx CR2 */ - TIMx->CR2 = tmpcr2; - 8003d44: 687b ldr r3, [r7, #4] - 8003d46: 693a ldr r2, [r7, #16] - 8003d48: 605a str r2, [r3, #4] - - /* Write to TIMx CCMR1 */ - TIMx->CCMR1 = tmpccmrx; - 8003d4a: 687b ldr r3, [r7, #4] - 8003d4c: 68fa ldr r2, [r7, #12] - 8003d4e: 619a str r2, [r3, #24] - - /* Set the Capture Compare Register value */ - TIMx->CCR2 = OC_Config->Pulse; - 8003d50: 683b ldr r3, [r7, #0] - 8003d52: 685a ldr r2, [r3, #4] - 8003d54: 687b ldr r3, [r7, #4] - 8003d56: 639a str r2, [r3, #56] ; 0x38 - - /* Write to TIMx CCER */ - TIMx->CCER = tmpccer; - 8003d58: 687b ldr r3, [r7, #4] - 8003d5a: 697a ldr r2, [r7, #20] - 8003d5c: 621a str r2, [r3, #32] -} - 8003d5e: bf00 nop - 8003d60: 371c adds r7, #28 - 8003d62: 46bd mov sp, r7 - 8003d64: bc80 pop {r7} - 8003d66: 4770 bx lr - 8003d68: 40010000 .word 0x40010000 - 8003d6c: 40010400 .word 0x40010400 - -08003d70 : - * @param TIMx to select the TIM peripheral - * @param OC_Config The output configuration structure - * @retval None - */ -static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) -{ - 8003d70: b480 push {r7} - 8003d72: b087 sub sp, #28 - 8003d74: af00 add r7, sp, #0 - 8003d76: 6078 str r0, [r7, #4] - 8003d78: 6039 str r1, [r7, #0] - uint32_t tmpccmrx; - uint32_t tmpccer; - uint32_t tmpcr2; - - /* Get the TIMx CCER register value */ - tmpccer = TIMx->CCER; - 8003d7a: 687b ldr r3, [r7, #4] - 8003d7c: 6a1b ldr r3, [r3, #32] - 8003d7e: 617b str r3, [r7, #20] - - /* Disable the Channel 3: Reset the CC2E Bit */ - TIMx->CCER &= ~TIM_CCER_CC3E; - 8003d80: 687b ldr r3, [r7, #4] - 8003d82: 6a1b ldr r3, [r3, #32] - 8003d84: f423 7280 bic.w r2, r3, #256 ; 0x100 - 8003d88: 687b ldr r3, [r7, #4] - 8003d8a: 621a str r2, [r3, #32] - - /* Get the TIMx CR2 register value */ - tmpcr2 = TIMx->CR2; - 8003d8c: 687b ldr r3, [r7, #4] - 8003d8e: 685b ldr r3, [r3, #4] - 8003d90: 613b str r3, [r7, #16] - - /* Get the TIMx CCMR2 register value */ - tmpccmrx = TIMx->CCMR2; - 8003d92: 687b ldr r3, [r7, #4] - 8003d94: 69db ldr r3, [r3, #28] - 8003d96: 60fb str r3, [r7, #12] - - /* Reset the Output Compare mode and Capture/Compare selection Bits */ - tmpccmrx &= ~TIM_CCMR2_OC3M; - 8003d98: 68fb ldr r3, [r7, #12] - 8003d9a: f023 0370 bic.w r3, r3, #112 ; 0x70 - 8003d9e: 60fb str r3, [r7, #12] - tmpccmrx &= ~TIM_CCMR2_CC3S; - 8003da0: 68fb ldr r3, [r7, #12] - 8003da2: f023 0303 bic.w r3, r3, #3 - 8003da6: 60fb str r3, [r7, #12] - /* Select the Output Compare Mode */ - tmpccmrx |= OC_Config->OCMode; - 8003da8: 683b ldr r3, [r7, #0] - 8003daa: 681b ldr r3, [r3, #0] - 8003dac: 68fa ldr r2, [r7, #12] - 8003dae: 4313 orrs r3, r2 - 8003db0: 60fb str r3, [r7, #12] - - /* Reset the Output Polarity level */ - tmpccer &= ~TIM_CCER_CC3P; - 8003db2: 697b ldr r3, [r7, #20] - 8003db4: f423 7300 bic.w r3, r3, #512 ; 0x200 - 8003db8: 617b str r3, [r7, #20] - /* Set the Output Compare Polarity */ - tmpccer |= (OC_Config->OCPolarity << 8U); - 8003dba: 683b ldr r3, [r7, #0] - 8003dbc: 689b ldr r3, [r3, #8] - 8003dbe: 021b lsls r3, r3, #8 - 8003dc0: 697a ldr r2, [r7, #20] - 8003dc2: 4313 orrs r3, r2 - 8003dc4: 617b str r3, [r7, #20] - - if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_3)) - 8003dc6: 687b ldr r3, [r7, #4] - 8003dc8: 4a21 ldr r2, [pc, #132] ; (8003e50 ) - 8003dca: 4293 cmp r3, r2 - 8003dcc: d003 beq.n 8003dd6 - 8003dce: 687b ldr r3, [r7, #4] - 8003dd0: 4a20 ldr r2, [pc, #128] ; (8003e54 ) - 8003dd2: 4293 cmp r3, r2 - 8003dd4: d10d bne.n 8003df2 - { - assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity)); - - /* Reset the Output N Polarity level */ - tmpccer &= ~TIM_CCER_CC3NP; - 8003dd6: 697b ldr r3, [r7, #20] - 8003dd8: f423 6300 bic.w r3, r3, #2048 ; 0x800 - 8003ddc: 617b str r3, [r7, #20] - /* Set the Output N Polarity */ - tmpccer |= (OC_Config->OCNPolarity << 8U); - 8003dde: 683b ldr r3, [r7, #0] - 8003de0: 68db ldr r3, [r3, #12] - 8003de2: 021b lsls r3, r3, #8 - 8003de4: 697a ldr r2, [r7, #20] - 8003de6: 4313 orrs r3, r2 - 8003de8: 617b str r3, [r7, #20] - /* Reset the Output N State */ - tmpccer &= ~TIM_CCER_CC3NE; - 8003dea: 697b ldr r3, [r7, #20] - 8003dec: f423 6380 bic.w r3, r3, #1024 ; 0x400 - 8003df0: 617b str r3, [r7, #20] - } - - if (IS_TIM_BREAK_INSTANCE(TIMx)) - 8003df2: 687b ldr r3, [r7, #4] - 8003df4: 4a16 ldr r2, [pc, #88] ; (8003e50 ) - 8003df6: 4293 cmp r3, r2 - 8003df8: d003 beq.n 8003e02 - 8003dfa: 687b ldr r3, [r7, #4] - 8003dfc: 4a15 ldr r2, [pc, #84] ; (8003e54 ) - 8003dfe: 4293 cmp r3, r2 - 8003e00: d113 bne.n 8003e2a - /* Check parameters */ - assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState)); - assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); - - /* Reset the Output Compare and Output Compare N IDLE State */ - tmpcr2 &= ~TIM_CR2_OIS3; - 8003e02: 693b ldr r3, [r7, #16] - 8003e04: f423 5380 bic.w r3, r3, #4096 ; 0x1000 - 8003e08: 613b str r3, [r7, #16] - tmpcr2 &= ~TIM_CR2_OIS3N; - 8003e0a: 693b ldr r3, [r7, #16] - 8003e0c: f423 5300 bic.w r3, r3, #8192 ; 0x2000 - 8003e10: 613b str r3, [r7, #16] - /* Set the Output Idle state */ - tmpcr2 |= (OC_Config->OCIdleState << 4U); - 8003e12: 683b ldr r3, [r7, #0] - 8003e14: 695b ldr r3, [r3, #20] - 8003e16: 011b lsls r3, r3, #4 - 8003e18: 693a ldr r2, [r7, #16] - 8003e1a: 4313 orrs r3, r2 - 8003e1c: 613b str r3, [r7, #16] - /* Set the Output N Idle state */ - tmpcr2 |= (OC_Config->OCNIdleState << 4U); - 8003e1e: 683b ldr r3, [r7, #0] - 8003e20: 699b ldr r3, [r3, #24] - 8003e22: 011b lsls r3, r3, #4 - 8003e24: 693a ldr r2, [r7, #16] - 8003e26: 4313 orrs r3, r2 - 8003e28: 613b str r3, [r7, #16] - } - - /* Write to TIMx CR2 */ - TIMx->CR2 = tmpcr2; - 8003e2a: 687b ldr r3, [r7, #4] - 8003e2c: 693a ldr r2, [r7, #16] - 8003e2e: 605a str r2, [r3, #4] - - /* Write to TIMx CCMR2 */ - TIMx->CCMR2 = tmpccmrx; - 8003e30: 687b ldr r3, [r7, #4] - 8003e32: 68fa ldr r2, [r7, #12] - 8003e34: 61da str r2, [r3, #28] - - /* Set the Capture Compare Register value */ - TIMx->CCR3 = OC_Config->Pulse; - 8003e36: 683b ldr r3, [r7, #0] - 8003e38: 685a ldr r2, [r3, #4] - 8003e3a: 687b ldr r3, [r7, #4] - 8003e3c: 63da str r2, [r3, #60] ; 0x3c - - /* Write to TIMx CCER */ - TIMx->CCER = tmpccer; - 8003e3e: 687b ldr r3, [r7, #4] - 8003e40: 697a ldr r2, [r7, #20] - 8003e42: 621a str r2, [r3, #32] -} - 8003e44: bf00 nop - 8003e46: 371c adds r7, #28 - 8003e48: 46bd mov sp, r7 - 8003e4a: bc80 pop {r7} - 8003e4c: 4770 bx lr - 8003e4e: bf00 nop - 8003e50: 40010000 .word 0x40010000 - 8003e54: 40010400 .word 0x40010400 - -08003e58 : - * @param TIMx to select the TIM peripheral - * @param OC_Config The output configuration structure - * @retval None - */ -static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) -{ - 8003e58: b480 push {r7} - 8003e5a: b087 sub sp, #28 - 8003e5c: af00 add r7, sp, #0 - 8003e5e: 6078 str r0, [r7, #4] - 8003e60: 6039 str r1, [r7, #0] - uint32_t tmpccmrx; - uint32_t tmpccer; - uint32_t tmpcr2; - - /* Get the TIMx CCER register value */ - tmpccer = TIMx->CCER; - 8003e62: 687b ldr r3, [r7, #4] - 8003e64: 6a1b ldr r3, [r3, #32] - 8003e66: 613b str r3, [r7, #16] - - /* Disable the Channel 4: Reset the CC4E Bit */ - TIMx->CCER &= ~TIM_CCER_CC4E; - 8003e68: 687b ldr r3, [r7, #4] - 8003e6a: 6a1b ldr r3, [r3, #32] - 8003e6c: f423 5280 bic.w r2, r3, #4096 ; 0x1000 - 8003e70: 687b ldr r3, [r7, #4] - 8003e72: 621a str r2, [r3, #32] - - /* Get the TIMx CR2 register value */ - tmpcr2 = TIMx->CR2; - 8003e74: 687b ldr r3, [r7, #4] - 8003e76: 685b ldr r3, [r3, #4] - 8003e78: 617b str r3, [r7, #20] - - /* Get the TIMx CCMR2 register value */ - tmpccmrx = TIMx->CCMR2; - 8003e7a: 687b ldr r3, [r7, #4] - 8003e7c: 69db ldr r3, [r3, #28] - 8003e7e: 60fb str r3, [r7, #12] - - /* Reset the Output Compare mode and Capture/Compare selection Bits */ - tmpccmrx &= ~TIM_CCMR2_OC4M; - 8003e80: 68fb ldr r3, [r7, #12] - 8003e82: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 - 8003e86: 60fb str r3, [r7, #12] - tmpccmrx &= ~TIM_CCMR2_CC4S; - 8003e88: 68fb ldr r3, [r7, #12] - 8003e8a: f423 7340 bic.w r3, r3, #768 ; 0x300 - 8003e8e: 60fb str r3, [r7, #12] - - /* Select the Output Compare Mode */ - tmpccmrx |= (OC_Config->OCMode << 8U); - 8003e90: 683b ldr r3, [r7, #0] - 8003e92: 681b ldr r3, [r3, #0] - 8003e94: 021b lsls r3, r3, #8 - 8003e96: 68fa ldr r2, [r7, #12] - 8003e98: 4313 orrs r3, r2 - 8003e9a: 60fb str r3, [r7, #12] - - /* Reset the Output Polarity level */ - tmpccer &= ~TIM_CCER_CC4P; - 8003e9c: 693b ldr r3, [r7, #16] - 8003e9e: f423 5300 bic.w r3, r3, #8192 ; 0x2000 - 8003ea2: 613b str r3, [r7, #16] - /* Set the Output Compare Polarity */ - tmpccer |= (OC_Config->OCPolarity << 12U); - 8003ea4: 683b ldr r3, [r7, #0] - 8003ea6: 689b ldr r3, [r3, #8] - 8003ea8: 031b lsls r3, r3, #12 - 8003eaa: 693a ldr r2, [r7, #16] - 8003eac: 4313 orrs r3, r2 - 8003eae: 613b str r3, [r7, #16] - - if (IS_TIM_BREAK_INSTANCE(TIMx)) - 8003eb0: 687b ldr r3, [r7, #4] - 8003eb2: 4a11 ldr r2, [pc, #68] ; (8003ef8 ) - 8003eb4: 4293 cmp r3, r2 - 8003eb6: d003 beq.n 8003ec0 - 8003eb8: 687b ldr r3, [r7, #4] - 8003eba: 4a10 ldr r2, [pc, #64] ; (8003efc ) - 8003ebc: 4293 cmp r3, r2 - 8003ebe: d109 bne.n 8003ed4 - { - /* Check parameters */ - assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); - - /* Reset the Output Compare IDLE State */ - tmpcr2 &= ~TIM_CR2_OIS4; - 8003ec0: 697b ldr r3, [r7, #20] - 8003ec2: f423 4380 bic.w r3, r3, #16384 ; 0x4000 - 8003ec6: 617b str r3, [r7, #20] - - /* Set the Output Idle state */ - tmpcr2 |= (OC_Config->OCIdleState << 6U); - 8003ec8: 683b ldr r3, [r7, #0] - 8003eca: 695b ldr r3, [r3, #20] - 8003ecc: 019b lsls r3, r3, #6 - 8003ece: 697a ldr r2, [r7, #20] - 8003ed0: 4313 orrs r3, r2 - 8003ed2: 617b str r3, [r7, #20] - } - - /* Write to TIMx CR2 */ - TIMx->CR2 = tmpcr2; - 8003ed4: 687b ldr r3, [r7, #4] - 8003ed6: 697a ldr r2, [r7, #20] - 8003ed8: 605a str r2, [r3, #4] - - /* Write to TIMx CCMR2 */ - TIMx->CCMR2 = tmpccmrx; - 8003eda: 687b ldr r3, [r7, #4] - 8003edc: 68fa ldr r2, [r7, #12] - 8003ede: 61da str r2, [r3, #28] - - /* Set the Capture Compare Register value */ - TIMx->CCR4 = OC_Config->Pulse; - 8003ee0: 683b ldr r3, [r7, #0] - 8003ee2: 685a ldr r2, [r3, #4] - 8003ee4: 687b ldr r3, [r7, #4] - 8003ee6: 641a str r2, [r3, #64] ; 0x40 - - /* Write to TIMx CCER */ - TIMx->CCER = tmpccer; - 8003ee8: 687b ldr r3, [r7, #4] - 8003eea: 693a ldr r2, [r7, #16] - 8003eec: 621a str r2, [r3, #32] -} - 8003eee: bf00 nop - 8003ef0: 371c adds r7, #28 - 8003ef2: 46bd mov sp, r7 - 8003ef4: bc80 pop {r7} - 8003ef6: 4770 bx lr - 8003ef8: 40010000 .word 0x40010000 - 8003efc: 40010400 .word 0x40010400 - -08003f00 : - * @param TIM_ICFilter Specifies the Input Capture Filter. - * This parameter must be a value between 0x00 and 0x0F. - * @retval None - */ -static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter) -{ - 8003f00: b480 push {r7} - 8003f02: b087 sub sp, #28 - 8003f04: af00 add r7, sp, #0 - 8003f06: 60f8 str r0, [r7, #12] - 8003f08: 60b9 str r1, [r7, #8] - 8003f0a: 607a str r2, [r7, #4] - uint32_t tmpccmr1; - uint32_t tmpccer; - - /* Disable the Channel 1: Reset the CC1E Bit */ - tmpccer = TIMx->CCER; - 8003f0c: 68fb ldr r3, [r7, #12] - 8003f0e: 6a1b ldr r3, [r3, #32] - 8003f10: 617b str r3, [r7, #20] - TIMx->CCER &= ~TIM_CCER_CC1E; - 8003f12: 68fb ldr r3, [r7, #12] - 8003f14: 6a1b ldr r3, [r3, #32] - 8003f16: f023 0201 bic.w r2, r3, #1 - 8003f1a: 68fb ldr r3, [r7, #12] - 8003f1c: 621a str r2, [r3, #32] - tmpccmr1 = TIMx->CCMR1; - 8003f1e: 68fb ldr r3, [r7, #12] - 8003f20: 699b ldr r3, [r3, #24] - 8003f22: 613b str r3, [r7, #16] - - /* Set the filter */ - tmpccmr1 &= ~TIM_CCMR1_IC1F; - 8003f24: 693b ldr r3, [r7, #16] - 8003f26: f023 03f0 bic.w r3, r3, #240 ; 0xf0 - 8003f2a: 613b str r3, [r7, #16] - tmpccmr1 |= (TIM_ICFilter << 4U); - 8003f2c: 687b ldr r3, [r7, #4] - 8003f2e: 011b lsls r3, r3, #4 - 8003f30: 693a ldr r2, [r7, #16] - 8003f32: 4313 orrs r3, r2 - 8003f34: 613b str r3, [r7, #16] - - /* Select the Polarity and set the CC1E Bit */ - tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP); - 8003f36: 697b ldr r3, [r7, #20] - 8003f38: f023 030a bic.w r3, r3, #10 - 8003f3c: 617b str r3, [r7, #20] - tmpccer |= TIM_ICPolarity; - 8003f3e: 697a ldr r2, [r7, #20] - 8003f40: 68bb ldr r3, [r7, #8] - 8003f42: 4313 orrs r3, r2 - 8003f44: 617b str r3, [r7, #20] - - /* Write to TIMx CCMR1 and CCER registers */ - TIMx->CCMR1 = tmpccmr1; - 8003f46: 68fb ldr r3, [r7, #12] - 8003f48: 693a ldr r2, [r7, #16] - 8003f4a: 619a str r2, [r3, #24] - TIMx->CCER = tmpccer; - 8003f4c: 68fb ldr r3, [r7, #12] - 8003f4e: 697a ldr r2, [r7, #20] - 8003f50: 621a str r2, [r3, #32] -} - 8003f52: bf00 nop - 8003f54: 371c adds r7, #28 - 8003f56: 46bd mov sp, r7 - 8003f58: bc80 pop {r7} - 8003f5a: 4770 bx lr - -08003f5c : - * @param TIM_ICFilter Specifies the Input Capture Filter. - * This parameter must be a value between 0x00 and 0x0F. - * @retval None - */ -static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter) -{ - 8003f5c: b480 push {r7} - 8003f5e: b087 sub sp, #28 - 8003f60: af00 add r7, sp, #0 - 8003f62: 60f8 str r0, [r7, #12] - 8003f64: 60b9 str r1, [r7, #8] - 8003f66: 607a str r2, [r7, #4] - uint32_t tmpccmr1; - uint32_t tmpccer; - - /* Disable the Channel 2: Reset the CC2E Bit */ - tmpccer = TIMx->CCER; - 8003f68: 68fb ldr r3, [r7, #12] - 8003f6a: 6a1b ldr r3, [r3, #32] - 8003f6c: 617b str r3, [r7, #20] - TIMx->CCER &= ~TIM_CCER_CC2E; - 8003f6e: 68fb ldr r3, [r7, #12] - 8003f70: 6a1b ldr r3, [r3, #32] - 8003f72: f023 0210 bic.w r2, r3, #16 - 8003f76: 68fb ldr r3, [r7, #12] - 8003f78: 621a str r2, [r3, #32] - tmpccmr1 = TIMx->CCMR1; - 8003f7a: 68fb ldr r3, [r7, #12] - 8003f7c: 699b ldr r3, [r3, #24] - 8003f7e: 613b str r3, [r7, #16] - - /* Set the filter */ - tmpccmr1 &= ~TIM_CCMR1_IC2F; - 8003f80: 693b ldr r3, [r7, #16] - 8003f82: f423 4370 bic.w r3, r3, #61440 ; 0xf000 - 8003f86: 613b str r3, [r7, #16] - tmpccmr1 |= (TIM_ICFilter << 12U); - 8003f88: 687b ldr r3, [r7, #4] - 8003f8a: 031b lsls r3, r3, #12 - 8003f8c: 693a ldr r2, [r7, #16] - 8003f8e: 4313 orrs r3, r2 - 8003f90: 613b str r3, [r7, #16] - - /* Select the Polarity and set the CC2E Bit */ - tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP); - 8003f92: 697b ldr r3, [r7, #20] - 8003f94: f023 03a0 bic.w r3, r3, #160 ; 0xa0 - 8003f98: 617b str r3, [r7, #20] - tmpccer |= (TIM_ICPolarity << 4U); - 8003f9a: 68bb ldr r3, [r7, #8] - 8003f9c: 011b lsls r3, r3, #4 - 8003f9e: 697a ldr r2, [r7, #20] - 8003fa0: 4313 orrs r3, r2 - 8003fa2: 617b str r3, [r7, #20] - - /* Write to TIMx CCMR1 and CCER registers */ - TIMx->CCMR1 = tmpccmr1 ; - 8003fa4: 68fb ldr r3, [r7, #12] - 8003fa6: 693a ldr r2, [r7, #16] - 8003fa8: 619a str r2, [r3, #24] - TIMx->CCER = tmpccer; - 8003faa: 68fb ldr r3, [r7, #12] - 8003fac: 697a ldr r2, [r7, #20] - 8003fae: 621a str r2, [r3, #32] -} - 8003fb0: bf00 nop - 8003fb2: 371c adds r7, #28 - 8003fb4: 46bd mov sp, r7 - 8003fb6: bc80 pop {r7} - 8003fb8: 4770 bx lr - -08003fba : - * @arg TIM_TS_TI2FP2: Filtered Timer Input 2 - * @arg TIM_TS_ETRF: External Trigger input - * @retval None - */ -static void TIM_ITRx_SetConfig(TIM_TypeDef *TIMx, uint32_t InputTriggerSource) -{ - 8003fba: b480 push {r7} - 8003fbc: b085 sub sp, #20 - 8003fbe: af00 add r7, sp, #0 - 8003fc0: 6078 str r0, [r7, #4] - 8003fc2: 6039 str r1, [r7, #0] - uint32_t tmpsmcr; - - /* Get the TIMx SMCR register value */ - tmpsmcr = TIMx->SMCR; - 8003fc4: 687b ldr r3, [r7, #4] - 8003fc6: 689b ldr r3, [r3, #8] - 8003fc8: 60fb str r3, [r7, #12] - /* Reset the TS Bits */ - tmpsmcr &= ~TIM_SMCR_TS; - 8003fca: 68fb ldr r3, [r7, #12] - 8003fcc: f023 0370 bic.w r3, r3, #112 ; 0x70 - 8003fd0: 60fb str r3, [r7, #12] - /* Set the Input Trigger source and the slave mode*/ - tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1); - 8003fd2: 683a ldr r2, [r7, #0] - 8003fd4: 68fb ldr r3, [r7, #12] - 8003fd6: 4313 orrs r3, r2 - 8003fd8: f043 0307 orr.w r3, r3, #7 - 8003fdc: 60fb str r3, [r7, #12] - /* Write to TIMx SMCR */ - TIMx->SMCR = tmpsmcr; - 8003fde: 687b ldr r3, [r7, #4] - 8003fe0: 68fa ldr r2, [r7, #12] - 8003fe2: 609a str r2, [r3, #8] -} - 8003fe4: bf00 nop - 8003fe6: 3714 adds r7, #20 - 8003fe8: 46bd mov sp, r7 - 8003fea: bc80 pop {r7} - 8003fec: 4770 bx lr - -08003fee : - * This parameter must be a value between 0x00 and 0x0F - * @retval None - */ -void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler, - uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter) -{ - 8003fee: b480 push {r7} - 8003ff0: b087 sub sp, #28 - 8003ff2: af00 add r7, sp, #0 - 8003ff4: 60f8 str r0, [r7, #12] - 8003ff6: 60b9 str r1, [r7, #8] - 8003ff8: 607a str r2, [r7, #4] - 8003ffa: 603b str r3, [r7, #0] - uint32_t tmpsmcr; - - tmpsmcr = TIMx->SMCR; - 8003ffc: 68fb ldr r3, [r7, #12] - 8003ffe: 689b ldr r3, [r3, #8] - 8004000: 617b str r3, [r7, #20] - - /* Reset the ETR Bits */ - tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP); - 8004002: 697b ldr r3, [r7, #20] - 8004004: f423 437f bic.w r3, r3, #65280 ; 0xff00 - 8004008: 617b str r3, [r7, #20] - - /* Set the Prescaler, the Filter value and the Polarity */ - tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U))); - 800400a: 683b ldr r3, [r7, #0] - 800400c: 021a lsls r2, r3, #8 - 800400e: 687b ldr r3, [r7, #4] - 8004010: 431a orrs r2, r3 - 8004012: 68bb ldr r3, [r7, #8] - 8004014: 4313 orrs r3, r2 - 8004016: 697a ldr r2, [r7, #20] - 8004018: 4313 orrs r3, r2 - 800401a: 617b str r3, [r7, #20] - - /* Write to TIMx SMCR */ - TIMx->SMCR = tmpsmcr; - 800401c: 68fb ldr r3, [r7, #12] - 800401e: 697a ldr r2, [r7, #20] - 8004020: 609a str r2, [r3, #8] -} - 8004022: bf00 nop - 8004024: 371c adds r7, #28 - 8004026: 46bd mov sp, r7 - 8004028: bc80 pop {r7} - 800402a: 4770 bx lr - -0800402c : - * mode. - * @retval HAL status - */ -HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, - const TIM_MasterConfigTypeDef *sMasterConfig) -{ - 800402c: b480 push {r7} - 800402e: b085 sub sp, #20 - 8004030: af00 add r7, sp, #0 - 8004032: 6078 str r0, [r7, #4] - 8004034: 6039 str r1, [r7, #0] - assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance)); - assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger)); - assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode)); - - /* Check input state */ - __HAL_LOCK(htim); - 8004036: 687b ldr r3, [r7, #4] - 8004038: f893 303c ldrb.w r3, [r3, #60] ; 0x3c - 800403c: 2b01 cmp r3, #1 - 800403e: d101 bne.n 8004044 - 8004040: 2302 movs r3, #2 - 8004042: e05a b.n 80040fa - 8004044: 687b ldr r3, [r7, #4] - 8004046: 2201 movs r2, #1 - 8004048: f883 203c strb.w r2, [r3, #60] ; 0x3c - - /* Change the handler state */ - htim->State = HAL_TIM_STATE_BUSY; - 800404c: 687b ldr r3, [r7, #4] - 800404e: 2202 movs r2, #2 - 8004050: f883 203d strb.w r2, [r3, #61] ; 0x3d - - /* Get the TIMx CR2 register value */ - tmpcr2 = htim->Instance->CR2; - 8004054: 687b ldr r3, [r7, #4] - 8004056: 681b ldr r3, [r3, #0] - 8004058: 685b ldr r3, [r3, #4] - 800405a: 60fb str r3, [r7, #12] - - /* Get the TIMx SMCR register value */ - tmpsmcr = htim->Instance->SMCR; - 800405c: 687b ldr r3, [r7, #4] - 800405e: 681b ldr r3, [r3, #0] - 8004060: 689b ldr r3, [r3, #8] - 8004062: 60bb str r3, [r7, #8] - - /* Reset the MMS Bits */ - tmpcr2 &= ~TIM_CR2_MMS; - 8004064: 68fb ldr r3, [r7, #12] - 8004066: f023 0370 bic.w r3, r3, #112 ; 0x70 - 800406a: 60fb str r3, [r7, #12] - /* Select the TRGO source */ - tmpcr2 |= sMasterConfig->MasterOutputTrigger; - 800406c: 683b ldr r3, [r7, #0] - 800406e: 681b ldr r3, [r3, #0] - 8004070: 68fa ldr r2, [r7, #12] - 8004072: 4313 orrs r3, r2 - 8004074: 60fb str r3, [r7, #12] - - /* Update TIMx CR2 */ - htim->Instance->CR2 = tmpcr2; - 8004076: 687b ldr r3, [r7, #4] - 8004078: 681b ldr r3, [r3, #0] - 800407a: 68fa ldr r2, [r7, #12] - 800407c: 605a str r2, [r3, #4] - - if (IS_TIM_SLAVE_INSTANCE(htim->Instance)) - 800407e: 687b ldr r3, [r7, #4] - 8004080: 681b ldr r3, [r3, #0] - 8004082: 4a20 ldr r2, [pc, #128] ; (8004104 ) - 8004084: 4293 cmp r3, r2 - 8004086: d022 beq.n 80040ce - 8004088: 687b ldr r3, [r7, #4] - 800408a: 681b ldr r3, [r3, #0] - 800408c: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 - 8004090: d01d beq.n 80040ce - 8004092: 687b ldr r3, [r7, #4] - 8004094: 681b ldr r3, [r3, #0] - 8004096: 4a1c ldr r2, [pc, #112] ; (8004108 ) - 8004098: 4293 cmp r3, r2 - 800409a: d018 beq.n 80040ce - 800409c: 687b ldr r3, [r7, #4] - 800409e: 681b ldr r3, [r3, #0] - 80040a0: 4a1a ldr r2, [pc, #104] ; (800410c ) - 80040a2: 4293 cmp r3, r2 - 80040a4: d013 beq.n 80040ce - 80040a6: 687b ldr r3, [r7, #4] - 80040a8: 681b ldr r3, [r3, #0] - 80040aa: 4a19 ldr r2, [pc, #100] ; (8004110 ) - 80040ac: 4293 cmp r3, r2 - 80040ae: d00e beq.n 80040ce - 80040b0: 687b ldr r3, [r7, #4] - 80040b2: 681b ldr r3, [r3, #0] - 80040b4: 4a17 ldr r2, [pc, #92] ; (8004114 ) - 80040b6: 4293 cmp r3, r2 - 80040b8: d009 beq.n 80040ce - 80040ba: 687b ldr r3, [r7, #4] - 80040bc: 681b ldr r3, [r3, #0] - 80040be: 4a16 ldr r2, [pc, #88] ; (8004118 ) - 80040c0: 4293 cmp r3, r2 - 80040c2: d004 beq.n 80040ce - 80040c4: 687b ldr r3, [r7, #4] - 80040c6: 681b ldr r3, [r3, #0] - 80040c8: 4a14 ldr r2, [pc, #80] ; (800411c ) - 80040ca: 4293 cmp r3, r2 - 80040cc: d10c bne.n 80040e8 - { - /* Reset the MSM Bit */ - tmpsmcr &= ~TIM_SMCR_MSM; - 80040ce: 68bb ldr r3, [r7, #8] - 80040d0: f023 0380 bic.w r3, r3, #128 ; 0x80 - 80040d4: 60bb str r3, [r7, #8] - /* Set master mode */ - tmpsmcr |= sMasterConfig->MasterSlaveMode; - 80040d6: 683b ldr r3, [r7, #0] - 80040d8: 685b ldr r3, [r3, #4] - 80040da: 68ba ldr r2, [r7, #8] - 80040dc: 4313 orrs r3, r2 - 80040de: 60bb str r3, [r7, #8] - - /* Update TIMx SMCR */ - htim->Instance->SMCR = tmpsmcr; - 80040e0: 687b ldr r3, [r7, #4] - 80040e2: 681b ldr r3, [r3, #0] - 80040e4: 68ba ldr r2, [r7, #8] - 80040e6: 609a str r2, [r3, #8] - } - - /* Change the htim state */ - htim->State = HAL_TIM_STATE_READY; - 80040e8: 687b ldr r3, [r7, #4] - 80040ea: 2201 movs r2, #1 - 80040ec: f883 203d strb.w r2, [r3, #61] ; 0x3d - - __HAL_UNLOCK(htim); - 80040f0: 687b ldr r3, [r7, #4] - 80040f2: 2200 movs r2, #0 - 80040f4: f883 203c strb.w r2, [r3, #60] ; 0x3c - - return HAL_OK; - 80040f8: 2300 movs r3, #0 -} - 80040fa: 4618 mov r0, r3 - 80040fc: 3714 adds r7, #20 - 80040fe: 46bd mov sp, r7 - 8004100: bc80 pop {r7} - 8004102: 4770 bx lr - 8004104: 40010000 .word 0x40010000 - 8004108: 40000400 .word 0x40000400 - 800410c: 40000800 .word 0x40000800 - 8004110: 40000c00 .word 0x40000c00 - 8004114: 40010400 .word 0x40010400 - 8004118: 40014000 .word 0x40014000 - 800411c: 40001800 .word 0x40001800 - -08004120 : - * interrupt can be enabled by calling the @ref __HAL_TIM_ENABLE_IT macro. - * @retval HAL status - */ -HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim, - const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig) -{ - 8004120: b480 push {r7} - 8004122: b085 sub sp, #20 - 8004124: af00 add r7, sp, #0 - 8004126: 6078 str r0, [r7, #4] - 8004128: 6039 str r1, [r7, #0] - /* Keep this variable initialized to 0 as it is used to configure BDTR register */ - uint32_t tmpbdtr = 0U; - 800412a: 2300 movs r3, #0 - 800412c: 60fb str r3, [r7, #12] - assert_param(IS_TIM_BREAK_STATE(sBreakDeadTimeConfig->BreakState)); - assert_param(IS_TIM_BREAK_POLARITY(sBreakDeadTimeConfig->BreakPolarity)); - assert_param(IS_TIM_AUTOMATIC_OUTPUT_STATE(sBreakDeadTimeConfig->AutomaticOutput)); - - /* Check input state */ - __HAL_LOCK(htim); - 800412e: 687b ldr r3, [r7, #4] - 8004130: f893 303c ldrb.w r3, [r3, #60] ; 0x3c - 8004134: 2b01 cmp r3, #1 - 8004136: d101 bne.n 800413c - 8004138: 2302 movs r3, #2 - 800413a: e03d b.n 80041b8 - 800413c: 687b ldr r3, [r7, #4] - 800413e: 2201 movs r2, #1 - 8004140: f883 203c strb.w r2, [r3, #60] ; 0x3c - - /* Set the Lock level, the Break enable Bit and the Polarity, the OSSR State, - the OSSI State, the dead time value and the Automatic Output Enable Bit */ - - /* Set the BDTR bits */ - MODIFY_REG(tmpbdtr, TIM_BDTR_DTG, sBreakDeadTimeConfig->DeadTime); - 8004144: 68fb ldr r3, [r7, #12] - 8004146: f023 02ff bic.w r2, r3, #255 ; 0xff - 800414a: 683b ldr r3, [r7, #0] - 800414c: 68db ldr r3, [r3, #12] - 800414e: 4313 orrs r3, r2 - 8004150: 60fb str r3, [r7, #12] - MODIFY_REG(tmpbdtr, TIM_BDTR_LOCK, sBreakDeadTimeConfig->LockLevel); - 8004152: 68fb ldr r3, [r7, #12] - 8004154: f423 7240 bic.w r2, r3, #768 ; 0x300 - 8004158: 683b ldr r3, [r7, #0] - 800415a: 689b ldr r3, [r3, #8] - 800415c: 4313 orrs r3, r2 - 800415e: 60fb str r3, [r7, #12] - MODIFY_REG(tmpbdtr, TIM_BDTR_OSSI, sBreakDeadTimeConfig->OffStateIDLEMode); - 8004160: 68fb ldr r3, [r7, #12] - 8004162: f423 6280 bic.w r2, r3, #1024 ; 0x400 - 8004166: 683b ldr r3, [r7, #0] - 8004168: 685b ldr r3, [r3, #4] - 800416a: 4313 orrs r3, r2 - 800416c: 60fb str r3, [r7, #12] - MODIFY_REG(tmpbdtr, TIM_BDTR_OSSR, sBreakDeadTimeConfig->OffStateRunMode); - 800416e: 68fb ldr r3, [r7, #12] - 8004170: f423 6200 bic.w r2, r3, #2048 ; 0x800 - 8004174: 683b ldr r3, [r7, #0] - 8004176: 681b ldr r3, [r3, #0] - 8004178: 4313 orrs r3, r2 - 800417a: 60fb str r3, [r7, #12] - MODIFY_REG(tmpbdtr, TIM_BDTR_BKE, sBreakDeadTimeConfig->BreakState); - 800417c: 68fb ldr r3, [r7, #12] - 800417e: f423 5280 bic.w r2, r3, #4096 ; 0x1000 - 8004182: 683b ldr r3, [r7, #0] - 8004184: 691b ldr r3, [r3, #16] - 8004186: 4313 orrs r3, r2 - 8004188: 60fb str r3, [r7, #12] - MODIFY_REG(tmpbdtr, TIM_BDTR_BKP, sBreakDeadTimeConfig->BreakPolarity); - 800418a: 68fb ldr r3, [r7, #12] - 800418c: f423 5200 bic.w r2, r3, #8192 ; 0x2000 - 8004190: 683b ldr r3, [r7, #0] - 8004192: 695b ldr r3, [r3, #20] - 8004194: 4313 orrs r3, r2 - 8004196: 60fb str r3, [r7, #12] - MODIFY_REG(tmpbdtr, TIM_BDTR_AOE, sBreakDeadTimeConfig->AutomaticOutput); - 8004198: 68fb ldr r3, [r7, #12] - 800419a: f423 4280 bic.w r2, r3, #16384 ; 0x4000 - 800419e: 683b ldr r3, [r7, #0] - 80041a0: 69db ldr r3, [r3, #28] - 80041a2: 4313 orrs r3, r2 - 80041a4: 60fb str r3, [r7, #12] - - - /* Set TIMx_BDTR */ - htim->Instance->BDTR = tmpbdtr; - 80041a6: 687b ldr r3, [r7, #4] - 80041a8: 681b ldr r3, [r3, #0] - 80041aa: 68fa ldr r2, [r7, #12] - 80041ac: 645a str r2, [r3, #68] ; 0x44 - - __HAL_UNLOCK(htim); - 80041ae: 687b ldr r3, [r7, #4] - 80041b0: 2200 movs r2, #0 - 80041b2: f883 203c strb.w r2, [r3, #60] ; 0x3c - - return HAL_OK; - 80041b6: 2300 movs r3, #0 -} - 80041b8: 4618 mov r0, r3 - 80041ba: 3714 adds r7, #20 - 80041bc: 46bd mov sp, r7 - 80041be: bc80 pop {r7} - 80041c0: 4770 bx lr - -080041c2 : - * @brief Hall commutation changed callback in non-blocking mode - * @param htim TIM handle - * @retval None - */ -__weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim) -{ - 80041c2: b480 push {r7} - 80041c4: b083 sub sp, #12 - 80041c6: af00 add r7, sp, #0 - 80041c8: 6078 str r0, [r7, #4] - 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 - */ -} - 80041ca: bf00 nop - 80041cc: 370c adds r7, #12 - 80041ce: 46bd mov sp, r7 - 80041d0: bc80 pop {r7} - 80041d2: 4770 bx lr - -080041d4 : - * @brief Hall Break detection callback in non-blocking mode - * @param htim TIM handle - * @retval None - */ -__weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim) -{ - 80041d4: b480 push {r7} - 80041d6: b083 sub sp, #12 - 80041d8: af00 add r7, sp, #0 - 80041da: 6078 str r0, [r7, #4] - 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 - */ -} - 80041dc: bf00 nop - 80041de: 370c adds r7, #12 - 80041e0: 46bd mov sp, r7 - 80041e2: bc80 pop {r7} - 80041e4: 4770 bx lr - -080041e6 : - * @param huart Pointer to a UART_HandleTypeDef structure that contains - * the configuration information for the specified UART module. - * @retval HAL status - */ -HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart) -{ - 80041e6: b580 push {r7, lr} - 80041e8: b082 sub sp, #8 - 80041ea: af00 add r7, sp, #0 - 80041ec: 6078 str r0, [r7, #4] - /* Check the UART handle allocation */ - if (huart == NULL) - 80041ee: 687b ldr r3, [r7, #4] - 80041f0: 2b00 cmp r3, #0 - 80041f2: d101 bne.n 80041f8 - { - return HAL_ERROR; - 80041f4: 2301 movs r3, #1 - 80041f6: e042 b.n 800427e - assert_param(IS_UART_INSTANCE(huart->Instance)); - } - assert_param(IS_UART_WORD_LENGTH(huart->Init.WordLength)); - assert_param(IS_UART_OVERSAMPLING(huart->Init.OverSampling)); - - if (huart->gState == HAL_UART_STATE_RESET) - 80041f8: 687b ldr r3, [r7, #4] - 80041fa: f893 3041 ldrb.w r3, [r3, #65] ; 0x41 - 80041fe: b2db uxtb r3, r3 - 8004200: 2b00 cmp r3, #0 - 8004202: d106 bne.n 8004212 - { - /* Allocate lock resource and initialize it */ - huart->Lock = HAL_UNLOCKED; - 8004204: 687b ldr r3, [r7, #4] - 8004206: 2200 movs r2, #0 - 8004208: f883 2040 strb.w r2, [r3, #64] ; 0x40 - - /* Init the low level hardware */ - huart->MspInitCallback(huart); -#else - /* Init the low level hardware : GPIO, CLOCK */ - HAL_UART_MspInit(huart); - 800420c: 6878 ldr r0, [r7, #4] - 800420e: f7fc fd7b bl 8000d08 -#endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ - } - - huart->gState = HAL_UART_STATE_BUSY; - 8004212: 687b ldr r3, [r7, #4] - 8004214: 2224 movs r2, #36 ; 0x24 - 8004216: f883 2041 strb.w r2, [r3, #65] ; 0x41 - - /* Disable the peripheral */ - __HAL_UART_DISABLE(huart); - 800421a: 687b ldr r3, [r7, #4] - 800421c: 681b ldr r3, [r3, #0] - 800421e: 68da ldr r2, [r3, #12] - 8004220: 687b ldr r3, [r7, #4] - 8004222: 681b ldr r3, [r3, #0] - 8004224: f422 5200 bic.w r2, r2, #8192 ; 0x2000 - 8004228: 60da str r2, [r3, #12] - - /* Set the UART Communication parameters */ - UART_SetConfig(huart); - 800422a: 6878 ldr r0, [r7, #4] - 800422c: f000 f82c bl 8004288 - - /* In asynchronous mode, the following bits must be kept cleared: - - LINEN and CLKEN bits in the USART_CR2 register, - - SCEN, HDSEL and IREN bits in the USART_CR3 register.*/ - CLEAR_BIT(huart->Instance->CR2, (USART_CR2_LINEN | USART_CR2_CLKEN)); - 8004230: 687b ldr r3, [r7, #4] - 8004232: 681b ldr r3, [r3, #0] - 8004234: 691a ldr r2, [r3, #16] - 8004236: 687b ldr r3, [r7, #4] - 8004238: 681b ldr r3, [r3, #0] - 800423a: f422 4290 bic.w r2, r2, #18432 ; 0x4800 - 800423e: 611a str r2, [r3, #16] - CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN)); - 8004240: 687b ldr r3, [r7, #4] - 8004242: 681b ldr r3, [r3, #0] - 8004244: 695a ldr r2, [r3, #20] - 8004246: 687b ldr r3, [r7, #4] - 8004248: 681b ldr r3, [r3, #0] - 800424a: f022 022a bic.w r2, r2, #42 ; 0x2a - 800424e: 615a str r2, [r3, #20] - - /* Enable the peripheral */ - __HAL_UART_ENABLE(huart); - 8004250: 687b ldr r3, [r7, #4] - 8004252: 681b ldr r3, [r3, #0] - 8004254: 68da ldr r2, [r3, #12] - 8004256: 687b ldr r3, [r7, #4] - 8004258: 681b ldr r3, [r3, #0] - 800425a: f442 5200 orr.w r2, r2, #8192 ; 0x2000 - 800425e: 60da str r2, [r3, #12] - - /* Initialize the UART state */ - huart->ErrorCode = HAL_UART_ERROR_NONE; - 8004260: 687b ldr r3, [r7, #4] - 8004262: 2200 movs r2, #0 - 8004264: 645a str r2, [r3, #68] ; 0x44 - huart->gState = HAL_UART_STATE_READY; - 8004266: 687b ldr r3, [r7, #4] - 8004268: 2220 movs r2, #32 - 800426a: f883 2041 strb.w r2, [r3, #65] ; 0x41 - huart->RxState = HAL_UART_STATE_READY; - 800426e: 687b ldr r3, [r7, #4] - 8004270: 2220 movs r2, #32 - 8004272: f883 2042 strb.w r2, [r3, #66] ; 0x42 - huart->RxEventType = HAL_UART_RXEVENT_TC; - 8004276: 687b ldr r3, [r7, #4] - 8004278: 2200 movs r2, #0 - 800427a: 635a str r2, [r3, #52] ; 0x34 - - return HAL_OK; - 800427c: 2300 movs r3, #0 -} - 800427e: 4618 mov r0, r3 - 8004280: 3708 adds r7, #8 - 8004282: 46bd mov sp, r7 - 8004284: bd80 pop {r7, pc} - ... - -08004288 : - * @param huart Pointer to a UART_HandleTypeDef structure that contains - * the configuration information for the specified UART module. - * @retval None - */ -static void UART_SetConfig(UART_HandleTypeDef *huart) -{ - 8004288: b580 push {r7, lr} - 800428a: b084 sub sp, #16 - 800428c: af00 add r7, sp, #0 - 800428e: 6078 str r0, [r7, #4] - assert_param(IS_UART_MODE(huart->Init.Mode)); - - /*-------------------------- USART CR2 Configuration -----------------------*/ - /* Configure the UART Stop Bits: Set STOP[13:12] bits - according to huart->Init.StopBits value */ - MODIFY_REG(huart->Instance->CR2, USART_CR2_STOP, huart->Init.StopBits); - 8004290: 687b ldr r3, [r7, #4] - 8004292: 681b ldr r3, [r3, #0] - 8004294: 691b ldr r3, [r3, #16] - 8004296: f423 5140 bic.w r1, r3, #12288 ; 0x3000 - 800429a: 687b ldr r3, [r7, #4] - 800429c: 68da ldr r2, [r3, #12] - 800429e: 687b ldr r3, [r7, #4] - 80042a0: 681b ldr r3, [r3, #0] - 80042a2: 430a orrs r2, r1 - 80042a4: 611a str r2, [r3, #16] - Set the M bits according to huart->Init.WordLength value - Set PCE and PS bits according to huart->Init.Parity value - Set TE and RE bits according to huart->Init.Mode value - Set OVER8 bit according to huart->Init.OverSampling value */ - - tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode | huart->Init.OverSampling; - 80042a6: 687b ldr r3, [r7, #4] - 80042a8: 689a ldr r2, [r3, #8] - 80042aa: 687b ldr r3, [r7, #4] - 80042ac: 691b ldr r3, [r3, #16] - 80042ae: 431a orrs r2, r3 - 80042b0: 687b ldr r3, [r7, #4] - 80042b2: 695b ldr r3, [r3, #20] - 80042b4: 431a orrs r2, r3 - 80042b6: 687b ldr r3, [r7, #4] - 80042b8: 69db ldr r3, [r3, #28] - 80042ba: 4313 orrs r3, r2 - 80042bc: 60bb str r3, [r7, #8] - MODIFY_REG(huart->Instance->CR1, - 80042be: 687b ldr r3, [r7, #4] - 80042c0: 681b ldr r3, [r3, #0] - 80042c2: 68db ldr r3, [r3, #12] - 80042c4: f423 4316 bic.w r3, r3, #38400 ; 0x9600 - 80042c8: f023 030c bic.w r3, r3, #12 - 80042cc: 687a ldr r2, [r7, #4] - 80042ce: 6812 ldr r2, [r2, #0] - 80042d0: 68b9 ldr r1, [r7, #8] - 80042d2: 430b orrs r3, r1 - 80042d4: 60d3 str r3, [r2, #12] - (uint32_t)(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS | USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8), - tmpreg); - - /*-------------------------- USART CR3 Configuration -----------------------*/ - /* Configure the UART HFC: Set CTSE and RTSE bits according to huart->Init.HwFlowCtl value */ - MODIFY_REG(huart->Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE), huart->Init.HwFlowCtl); - 80042d6: 687b ldr r3, [r7, #4] - 80042d8: 681b ldr r3, [r3, #0] - 80042da: 695b ldr r3, [r3, #20] - 80042dc: f423 7140 bic.w r1, r3, #768 ; 0x300 - 80042e0: 687b ldr r3, [r7, #4] - 80042e2: 699a ldr r2, [r3, #24] - 80042e4: 687b ldr r3, [r7, #4] - 80042e6: 681b ldr r3, [r3, #0] - 80042e8: 430a orrs r2, r1 - 80042ea: 615a str r2, [r3, #20] - - - if((huart->Instance == USART1) || (huart->Instance == USART6)) - 80042ec: 687b ldr r3, [r7, #4] - 80042ee: 681b ldr r3, [r3, #0] - 80042f0: 4a57 ldr r2, [pc, #348] ; (8004450 ) - 80042f2: 4293 cmp r3, r2 - 80042f4: d004 beq.n 8004300 - 80042f6: 687b ldr r3, [r7, #4] - 80042f8: 681b ldr r3, [r3, #0] - 80042fa: 4a56 ldr r2, [pc, #344] ; (8004454 ) - 80042fc: 4293 cmp r3, r2 - 80042fe: d103 bne.n 8004308 - { - pclk = HAL_RCC_GetPCLK2Freq(); - 8004300: f7ff f82c bl 800335c - 8004304: 60f8 str r0, [r7, #12] - 8004306: e002 b.n 800430e - } - else - { - pclk = HAL_RCC_GetPCLK1Freq(); - 8004308: f7ff f806 bl 8003318 - 800430c: 60f8 str r0, [r7, #12] - } - - /*-------------------------- USART BRR Configuration ---------------------*/ - if (huart->Init.OverSampling == UART_OVERSAMPLING_8) - 800430e: 687b ldr r3, [r7, #4] - 8004310: 69db ldr r3, [r3, #28] - 8004312: f5b3 4f00 cmp.w r3, #32768 ; 0x8000 - 8004316: d14c bne.n 80043b2 - { - huart->Instance->BRR = UART_BRR_SAMPLING8(pclk, huart->Init.BaudRate); - 8004318: 68fa ldr r2, [r7, #12] - 800431a: 4613 mov r3, r2 - 800431c: 009b lsls r3, r3, #2 - 800431e: 4413 add r3, r2 - 8004320: 009a lsls r2, r3, #2 - 8004322: 441a add r2, r3 - 8004324: 687b ldr r3, [r7, #4] - 8004326: 685b ldr r3, [r3, #4] - 8004328: 005b lsls r3, r3, #1 - 800432a: fbb2 f3f3 udiv r3, r2, r3 - 800432e: 4a4a ldr r2, [pc, #296] ; (8004458 ) - 8004330: fba2 2303 umull r2, r3, r2, r3 - 8004334: 095b lsrs r3, r3, #5 - 8004336: 0119 lsls r1, r3, #4 - 8004338: 68fa ldr r2, [r7, #12] - 800433a: 4613 mov r3, r2 - 800433c: 009b lsls r3, r3, #2 - 800433e: 4413 add r3, r2 - 8004340: 009a lsls r2, r3, #2 - 8004342: 441a add r2, r3 - 8004344: 687b ldr r3, [r7, #4] - 8004346: 685b ldr r3, [r3, #4] - 8004348: 005b lsls r3, r3, #1 - 800434a: fbb2 f2f3 udiv r2, r2, r3 - 800434e: 4b42 ldr r3, [pc, #264] ; (8004458 ) - 8004350: fba3 0302 umull r0, r3, r3, r2 - 8004354: 095b lsrs r3, r3, #5 - 8004356: 2064 movs r0, #100 ; 0x64 - 8004358: fb00 f303 mul.w r3, r0, r3 - 800435c: 1ad3 subs r3, r2, r3 - 800435e: 00db lsls r3, r3, #3 - 8004360: 3332 adds r3, #50 ; 0x32 - 8004362: 4a3d ldr r2, [pc, #244] ; (8004458 ) - 8004364: fba2 2303 umull r2, r3, r2, r3 - 8004368: 095b lsrs r3, r3, #5 - 800436a: 005b lsls r3, r3, #1 - 800436c: f403 73f8 and.w r3, r3, #496 ; 0x1f0 - 8004370: 4419 add r1, r3 - 8004372: 68fa ldr r2, [r7, #12] - 8004374: 4613 mov r3, r2 - 8004376: 009b lsls r3, r3, #2 - 8004378: 4413 add r3, r2 - 800437a: 009a lsls r2, r3, #2 - 800437c: 441a add r2, r3 - 800437e: 687b ldr r3, [r7, #4] - 8004380: 685b ldr r3, [r3, #4] - 8004382: 005b lsls r3, r3, #1 - 8004384: fbb2 f2f3 udiv r2, r2, r3 - 8004388: 4b33 ldr r3, [pc, #204] ; (8004458 ) - 800438a: fba3 0302 umull r0, r3, r3, r2 - 800438e: 095b lsrs r3, r3, #5 - 8004390: 2064 movs r0, #100 ; 0x64 - 8004392: fb00 f303 mul.w r3, r0, r3 - 8004396: 1ad3 subs r3, r2, r3 - 8004398: 00db lsls r3, r3, #3 - 800439a: 3332 adds r3, #50 ; 0x32 - 800439c: 4a2e ldr r2, [pc, #184] ; (8004458 ) - 800439e: fba2 2303 umull r2, r3, r2, r3 - 80043a2: 095b lsrs r3, r3, #5 - 80043a4: f003 0207 and.w r2, r3, #7 - 80043a8: 687b ldr r3, [r7, #4] - 80043aa: 681b ldr r3, [r3, #0] - 80043ac: 440a add r2, r1 - 80043ae: 609a str r2, [r3, #8] - } - else - { - huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate); - } -} - 80043b0: e04a b.n 8004448 - huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate); - 80043b2: 68fa ldr r2, [r7, #12] - 80043b4: 4613 mov r3, r2 - 80043b6: 009b lsls r3, r3, #2 - 80043b8: 4413 add r3, r2 - 80043ba: 009a lsls r2, r3, #2 - 80043bc: 441a add r2, r3 - 80043be: 687b ldr r3, [r7, #4] - 80043c0: 685b ldr r3, [r3, #4] - 80043c2: 009b lsls r3, r3, #2 - 80043c4: fbb2 f3f3 udiv r3, r2, r3 - 80043c8: 4a23 ldr r2, [pc, #140] ; (8004458 ) - 80043ca: fba2 2303 umull r2, r3, r2, r3 - 80043ce: 095b lsrs r3, r3, #5 - 80043d0: 0119 lsls r1, r3, #4 - 80043d2: 68fa ldr r2, [r7, #12] - 80043d4: 4613 mov r3, r2 - 80043d6: 009b lsls r3, r3, #2 - 80043d8: 4413 add r3, r2 - 80043da: 009a lsls r2, r3, #2 - 80043dc: 441a add r2, r3 - 80043de: 687b ldr r3, [r7, #4] - 80043e0: 685b ldr r3, [r3, #4] - 80043e2: 009b lsls r3, r3, #2 - 80043e4: fbb2 f2f3 udiv r2, r2, r3 - 80043e8: 4b1b ldr r3, [pc, #108] ; (8004458 ) - 80043ea: fba3 0302 umull r0, r3, r3, r2 - 80043ee: 095b lsrs r3, r3, #5 - 80043f0: 2064 movs r0, #100 ; 0x64 - 80043f2: fb00 f303 mul.w r3, r0, r3 - 80043f6: 1ad3 subs r3, r2, r3 - 80043f8: 011b lsls r3, r3, #4 - 80043fa: 3332 adds r3, #50 ; 0x32 - 80043fc: 4a16 ldr r2, [pc, #88] ; (8004458 ) - 80043fe: fba2 2303 umull r2, r3, r2, r3 - 8004402: 095b lsrs r3, r3, #5 - 8004404: f003 03f0 and.w r3, r3, #240 ; 0xf0 - 8004408: 4419 add r1, r3 - 800440a: 68fa ldr r2, [r7, #12] - 800440c: 4613 mov r3, r2 - 800440e: 009b lsls r3, r3, #2 - 8004410: 4413 add r3, r2 - 8004412: 009a lsls r2, r3, #2 - 8004414: 441a add r2, r3 - 8004416: 687b ldr r3, [r7, #4] - 8004418: 685b ldr r3, [r3, #4] - 800441a: 009b lsls r3, r3, #2 - 800441c: fbb2 f2f3 udiv r2, r2, r3 - 8004420: 4b0d ldr r3, [pc, #52] ; (8004458 ) - 8004422: fba3 0302 umull r0, r3, r3, r2 - 8004426: 095b lsrs r3, r3, #5 - 8004428: 2064 movs r0, #100 ; 0x64 - 800442a: fb00 f303 mul.w r3, r0, r3 - 800442e: 1ad3 subs r3, r2, r3 - 8004430: 011b lsls r3, r3, #4 - 8004432: 3332 adds r3, #50 ; 0x32 - 8004434: 4a08 ldr r2, [pc, #32] ; (8004458 ) - 8004436: fba2 2303 umull r2, r3, r2, r3 - 800443a: 095b lsrs r3, r3, #5 - 800443c: f003 020f and.w r2, r3, #15 - 8004440: 687b ldr r3, [r7, #4] - 8004442: 681b ldr r3, [r3, #0] - 8004444: 440a add r2, r1 - 8004446: 609a str r2, [r3, #8] -} - 8004448: bf00 nop - 800444a: 3710 adds r7, #16 - 800444c: 46bd mov sp, r7 - 800444e: bd80 pop {r7, pc} - 8004450: 40011000 .word 0x40011000 - 8004454: 40011400 .word 0x40011400 - 8004458: 51eb851f .word 0x51eb851f - -0800445c : - * @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains - * the configuration information for the specified USBx peripheral. - * @retval HAL status - */ -HAL_StatusTypeDef USB_CoreInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg) -{ - 800445c: b084 sub sp, #16 - 800445e: b580 push {r7, lr} - 8004460: b084 sub sp, #16 - 8004462: af00 add r7, sp, #0 - 8004464: 6078 str r0, [r7, #4] - 8004466: f107 001c add.w r0, r7, #28 - 800446a: e880 000e stmia.w r0, {r1, r2, r3} - HAL_StatusTypeDef ret; - if (cfg.phy_itface == USB_OTG_ULPI_PHY) - 800446e: 6b3b ldr r3, [r7, #48] ; 0x30 - 8004470: 2b01 cmp r3, #1 - 8004472: d122 bne.n 80044ba - { - USBx->GCCFG &= ~(USB_OTG_GCCFG_PWRDWN); - 8004474: 687b ldr r3, [r7, #4] - 8004476: 6b9b ldr r3, [r3, #56] ; 0x38 - 8004478: f423 3280 bic.w r2, r3, #65536 ; 0x10000 - 800447c: 687b ldr r3, [r7, #4] - 800447e: 639a str r2, [r3, #56] ; 0x38 - - /* Init The ULPI Interface */ - USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_TSDPS | USB_OTG_GUSBCFG_ULPIFSLS | USB_OTG_GUSBCFG_PHYSEL); - 8004480: 687b ldr r3, [r7, #4] - 8004482: 68db ldr r3, [r3, #12] - 8004484: f423 0384 bic.w r3, r3, #4325376 ; 0x420000 - 8004488: f023 0340 bic.w r3, r3, #64 ; 0x40 - 800448c: 687a ldr r2, [r7, #4] - 800448e: 60d3 str r3, [r2, #12] - - /* Select vbus source */ - USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_ULPIEVBUSD | USB_OTG_GUSBCFG_ULPIEVBUSI); - 8004490: 687b ldr r3, [r7, #4] - 8004492: 68db ldr r3, [r3, #12] - 8004494: f423 1240 bic.w r2, r3, #3145728 ; 0x300000 - 8004498: 687b ldr r3, [r7, #4] - 800449a: 60da str r2, [r3, #12] - if (cfg.use_external_vbus == 1U) - 800449c: 6cfb ldr r3, [r7, #76] ; 0x4c - 800449e: 2b01 cmp r3, #1 - 80044a0: d105 bne.n 80044ae - { - USBx->GUSBCFG |= USB_OTG_GUSBCFG_ULPIEVBUSD; - 80044a2: 687b ldr r3, [r7, #4] - 80044a4: 68db ldr r3, [r3, #12] - 80044a6: f443 1280 orr.w r2, r3, #1048576 ; 0x100000 - 80044aa: 687b ldr r3, [r7, #4] - 80044ac: 60da str r2, [r3, #12] - } - - /* Reset after a PHY select */ - ret = USB_CoreReset(USBx); - 80044ae: 6878 ldr r0, [r7, #4] - 80044b0: f000 fa8c bl 80049cc - 80044b4: 4603 mov r3, r0 - 80044b6: 73fb strb r3, [r7, #15] - 80044b8: e010 b.n 80044dc - } - else /* FS interface (embedded Phy) */ - { - /* Select FS Embedded PHY */ - USBx->GUSBCFG |= USB_OTG_GUSBCFG_PHYSEL; - 80044ba: 687b ldr r3, [r7, #4] - 80044bc: 68db ldr r3, [r3, #12] - 80044be: f043 0240 orr.w r2, r3, #64 ; 0x40 - 80044c2: 687b ldr r3, [r7, #4] - 80044c4: 60da str r2, [r3, #12] - - /* Reset after a PHY select */ - ret = USB_CoreReset(USBx); - 80044c6: 6878 ldr r0, [r7, #4] - 80044c8: f000 fa80 bl 80049cc - 80044cc: 4603 mov r3, r0 - 80044ce: 73fb strb r3, [r7, #15] - - /* Activate the USB Transceiver */ - USBx->GCCFG |= USB_OTG_GCCFG_PWRDWN; - 80044d0: 687b ldr r3, [r7, #4] - 80044d2: 6b9b ldr r3, [r3, #56] ; 0x38 - 80044d4: f443 3280 orr.w r2, r3, #65536 ; 0x10000 - 80044d8: 687b ldr r3, [r7, #4] - 80044da: 639a str r2, [r3, #56] ; 0x38 - } - - if (cfg.dma_enable == 1U) - 80044dc: 6a7b ldr r3, [r7, #36] ; 0x24 - 80044de: 2b01 cmp r3, #1 - 80044e0: d10b bne.n 80044fa - { - USBx->GAHBCFG |= USB_OTG_GAHBCFG_HBSTLEN_2; - 80044e2: 687b ldr r3, [r7, #4] - 80044e4: 689b ldr r3, [r3, #8] - 80044e6: f043 0206 orr.w r2, r3, #6 - 80044ea: 687b ldr r3, [r7, #4] - 80044ec: 609a str r2, [r3, #8] - USBx->GAHBCFG |= USB_OTG_GAHBCFG_DMAEN; - 80044ee: 687b ldr r3, [r7, #4] - 80044f0: 689b ldr r3, [r3, #8] - 80044f2: f043 0220 orr.w r2, r3, #32 - 80044f6: 687b ldr r3, [r7, #4] - 80044f8: 609a str r2, [r3, #8] - } - - return ret; - 80044fa: 7bfb ldrb r3, [r7, #15] -} - 80044fc: 4618 mov r0, r3 - 80044fe: 3710 adds r7, #16 - 8004500: 46bd mov sp, r7 - 8004502: e8bd 4080 ldmia.w sp!, {r7, lr} - 8004506: b004 add sp, #16 - 8004508: 4770 bx lr - -0800450a : - * Disable the controller's Global Int in the AHB Config reg - * @param USBx Selected device - * @retval HAL status - */ -HAL_StatusTypeDef USB_DisableGlobalInt(USB_OTG_GlobalTypeDef *USBx) -{ - 800450a: b480 push {r7} - 800450c: b083 sub sp, #12 - 800450e: af00 add r7, sp, #0 - 8004510: 6078 str r0, [r7, #4] - USBx->GAHBCFG &= ~USB_OTG_GAHBCFG_GINT; - 8004512: 687b ldr r3, [r7, #4] - 8004514: 689b ldr r3, [r3, #8] - 8004516: f023 0201 bic.w r2, r3, #1 - 800451a: 687b ldr r3, [r7, #4] - 800451c: 609a str r2, [r3, #8] - return HAL_OK; - 800451e: 2300 movs r3, #0 -} - 8004520: 4618 mov r0, r3 - 8004522: 370c adds r7, #12 - 8004524: 46bd mov sp, r7 - 8004526: bc80 pop {r7} - 8004528: 4770 bx lr - -0800452a : - * @arg USB_DEVICE_MODE Peripheral mode - * @arg USB_HOST_MODE Host mode - * @retval HAL status - */ -HAL_StatusTypeDef USB_SetCurrentMode(USB_OTG_GlobalTypeDef *USBx, USB_OTG_ModeTypeDef mode) -{ - 800452a: b580 push {r7, lr} - 800452c: b084 sub sp, #16 - 800452e: af00 add r7, sp, #0 - 8004530: 6078 str r0, [r7, #4] - 8004532: 460b mov r3, r1 - 8004534: 70fb strb r3, [r7, #3] - uint32_t ms = 0U; - 8004536: 2300 movs r3, #0 - 8004538: 60fb str r3, [r7, #12] - - USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_FHMOD | USB_OTG_GUSBCFG_FDMOD); - 800453a: 687b ldr r3, [r7, #4] - 800453c: 68db ldr r3, [r3, #12] - 800453e: f023 42c0 bic.w r2, r3, #1610612736 ; 0x60000000 - 8004542: 687b ldr r3, [r7, #4] - 8004544: 60da str r2, [r3, #12] - - if (mode == USB_HOST_MODE) - 8004546: 78fb ldrb r3, [r7, #3] - 8004548: 2b01 cmp r3, #1 - 800454a: d115 bne.n 8004578 - { - USBx->GUSBCFG |= USB_OTG_GUSBCFG_FHMOD; - 800454c: 687b ldr r3, [r7, #4] - 800454e: 68db ldr r3, [r3, #12] - 8004550: f043 5200 orr.w r2, r3, #536870912 ; 0x20000000 - 8004554: 687b ldr r3, [r7, #4] - 8004556: 60da str r2, [r3, #12] - - do - { - HAL_Delay(1U); - 8004558: 2001 movs r0, #1 - 800455a: f7fc fe0d bl 8001178 - ms++; - 800455e: 68fb ldr r3, [r7, #12] - 8004560: 3301 adds r3, #1 - 8004562: 60fb str r3, [r7, #12] - } while ((USB_GetMode(USBx) != (uint32_t)USB_HOST_MODE) && (ms < 50U)); - 8004564: 6878 ldr r0, [r7, #4] - 8004566: f000 fa23 bl 80049b0 - 800456a: 4603 mov r3, r0 - 800456c: 2b01 cmp r3, #1 - 800456e: d01e beq.n 80045ae - 8004570: 68fb ldr r3, [r7, #12] - 8004572: 2b31 cmp r3, #49 ; 0x31 - 8004574: d9f0 bls.n 8004558 - 8004576: e01a b.n 80045ae - } - else if (mode == USB_DEVICE_MODE) - 8004578: 78fb ldrb r3, [r7, #3] - 800457a: 2b00 cmp r3, #0 - 800457c: d115 bne.n 80045aa - { - USBx->GUSBCFG |= USB_OTG_GUSBCFG_FDMOD; - 800457e: 687b ldr r3, [r7, #4] - 8004580: 68db ldr r3, [r3, #12] - 8004582: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000 - 8004586: 687b ldr r3, [r7, #4] - 8004588: 60da str r2, [r3, #12] - - do - { - HAL_Delay(1U); - 800458a: 2001 movs r0, #1 - 800458c: f7fc fdf4 bl 8001178 - ms++; - 8004590: 68fb ldr r3, [r7, #12] - 8004592: 3301 adds r3, #1 - 8004594: 60fb str r3, [r7, #12] - } while ((USB_GetMode(USBx) != (uint32_t)USB_DEVICE_MODE) && (ms < 50U)); - 8004596: 6878 ldr r0, [r7, #4] - 8004598: f000 fa0a bl 80049b0 - 800459c: 4603 mov r3, r0 - 800459e: 2b00 cmp r3, #0 - 80045a0: d005 beq.n 80045ae - 80045a2: 68fb ldr r3, [r7, #12] - 80045a4: 2b31 cmp r3, #49 ; 0x31 - 80045a6: d9f0 bls.n 800458a - 80045a8: e001 b.n 80045ae - } - else - { - return HAL_ERROR; - 80045aa: 2301 movs r3, #1 - 80045ac: e005 b.n 80045ba - } - - if (ms == 50U) - 80045ae: 68fb ldr r3, [r7, #12] - 80045b0: 2b32 cmp r3, #50 ; 0x32 - 80045b2: d101 bne.n 80045b8 - { - return HAL_ERROR; - 80045b4: 2301 movs r3, #1 - 80045b6: e000 b.n 80045ba - } - - return HAL_OK; - 80045b8: 2300 movs r3, #0 -} - 80045ba: 4618 mov r0, r3 - 80045bc: 3710 adds r7, #16 - 80045be: 46bd mov sp, r7 - 80045c0: bd80 pop {r7, pc} - ... - -080045c4 : - * @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains - * the configuration information for the specified USBx peripheral. - * @retval HAL status - */ -HAL_StatusTypeDef USB_DevInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg) -{ - 80045c4: b084 sub sp, #16 - 80045c6: b580 push {r7, lr} - 80045c8: b086 sub sp, #24 - 80045ca: af00 add r7, sp, #0 - 80045cc: 6078 str r0, [r7, #4] - 80045ce: f107 0024 add.w r0, r7, #36 ; 0x24 - 80045d2: e880 000e stmia.w r0, {r1, r2, r3} - HAL_StatusTypeDef ret = HAL_OK; - 80045d6: 2300 movs r3, #0 - 80045d8: 75fb strb r3, [r7, #23] - uint32_t USBx_BASE = (uint32_t)USBx; - 80045da: 687b ldr r3, [r7, #4] - 80045dc: 60fb str r3, [r7, #12] - uint32_t i; - - for (i = 0U; i < 15U; i++) - 80045de: 2300 movs r3, #0 - 80045e0: 613b str r3, [r7, #16] - 80045e2: e009 b.n 80045f8 - { - USBx->DIEPTXF[i] = 0U; - 80045e4: 687a ldr r2, [r7, #4] - 80045e6: 693b ldr r3, [r7, #16] - 80045e8: 3340 adds r3, #64 ; 0x40 - 80045ea: 009b lsls r3, r3, #2 - 80045ec: 4413 add r3, r2 - 80045ee: 2200 movs r2, #0 - 80045f0: 605a str r2, [r3, #4] - for (i = 0U; i < 15U; i++) - 80045f2: 693b ldr r3, [r7, #16] - 80045f4: 3301 adds r3, #1 - 80045f6: 613b str r3, [r7, #16] - 80045f8: 693b ldr r3, [r7, #16] - 80045fa: 2b0e cmp r3, #14 - 80045fc: d9f2 bls.n 80045e4 - } - - /* VBUS Sensing setup */ - if (cfg.vbus_sensing_enable == 0U) - 80045fe: 6cfb ldr r3, [r7, #76] ; 0x4c - 8004600: 2b00 cmp r3, #0 - 8004602: d11c bne.n 800463e - { - /* - * disable HW VBUS sensing. VBUS is internally considered to be always - * at VBUS-Valid level (5V). - */ - USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS; - 8004604: 68fb ldr r3, [r7, #12] - 8004606: f503 6300 add.w r3, r3, #2048 ; 0x800 - 800460a: 685b ldr r3, [r3, #4] - 800460c: 68fa ldr r2, [r7, #12] - 800460e: f502 6200 add.w r2, r2, #2048 ; 0x800 - 8004612: f043 0302 orr.w r3, r3, #2 - 8004616: 6053 str r3, [r2, #4] - USBx->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS; - 8004618: 687b ldr r3, [r7, #4] - 800461a: 6b9b ldr r3, [r3, #56] ; 0x38 - 800461c: f443 1200 orr.w r2, r3, #2097152 ; 0x200000 - 8004620: 687b ldr r3, [r7, #4] - 8004622: 639a str r2, [r3, #56] ; 0x38 - USBx->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN; - 8004624: 687b ldr r3, [r7, #4] - 8004626: 6b9b ldr r3, [r3, #56] ; 0x38 - 8004628: f423 2200 bic.w r2, r3, #524288 ; 0x80000 - 800462c: 687b ldr r3, [r7, #4] - 800462e: 639a str r2, [r3, #56] ; 0x38 - USBx->GCCFG &= ~USB_OTG_GCCFG_VBUSASEN; - 8004630: 687b ldr r3, [r7, #4] - 8004632: 6b9b ldr r3, [r3, #56] ; 0x38 - 8004634: f423 2280 bic.w r2, r3, #262144 ; 0x40000 - 8004638: 687b ldr r3, [r7, #4] - 800463a: 639a str r2, [r3, #56] ; 0x38 - 800463c: e00b b.n 8004656 - } - else - { - /* Enable HW VBUS sensing */ - USBx->GCCFG &= ~USB_OTG_GCCFG_NOVBUSSENS; - 800463e: 687b ldr r3, [r7, #4] - 8004640: 6b9b ldr r3, [r3, #56] ; 0x38 - 8004642: f423 1200 bic.w r2, r3, #2097152 ; 0x200000 - 8004646: 687b ldr r3, [r7, #4] - 8004648: 639a str r2, [r3, #56] ; 0x38 - USBx->GCCFG |= USB_OTG_GCCFG_VBUSBSEN; - 800464a: 687b ldr r3, [r7, #4] - 800464c: 6b9b ldr r3, [r3, #56] ; 0x38 - 800464e: f443 2200 orr.w r2, r3, #524288 ; 0x80000 - 8004652: 687b ldr r3, [r7, #4] - 8004654: 639a str r2, [r3, #56] ; 0x38 - } - - /* Restart the Phy Clock */ - USBx_PCGCCTL = 0U; - 8004656: 68fb ldr r3, [r7, #12] - 8004658: f503 6360 add.w r3, r3, #3584 ; 0xe00 - 800465c: 461a mov r2, r3 - 800465e: 2300 movs r3, #0 - 8004660: 6013 str r3, [r2, #0] - - if (cfg.phy_itface == USB_OTG_ULPI_PHY) - 8004662: 6bbb ldr r3, [r7, #56] ; 0x38 - 8004664: 2b01 cmp r3, #1 - 8004666: d10c bne.n 8004682 - { - if (cfg.speed == USBD_HS_SPEED) - 8004668: 6b3b ldr r3, [r7, #48] ; 0x30 - 800466a: 2b00 cmp r3, #0 - 800466c: d104 bne.n 8004678 - { - /* Set Core speed to High speed mode */ - (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_HIGH); - 800466e: 2100 movs r1, #0 - 8004670: 6878 ldr r0, [r7, #4] - 8004672: f000 f965 bl 8004940 - 8004676: e008 b.n 800468a - } - else - { - /* Set Core speed to Full speed mode */ - (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_HIGH_IN_FULL); - 8004678: 2101 movs r1, #1 - 800467a: 6878 ldr r0, [r7, #4] - 800467c: f000 f960 bl 8004940 - 8004680: e003 b.n 800468a - } - } - else - { - /* Set Core speed to Full speed mode */ - (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_FULL); - 8004682: 2103 movs r1, #3 - 8004684: 6878 ldr r0, [r7, #4] - 8004686: f000 f95b bl 8004940 - } - - /* Flush the FIFOs */ - if (USB_FlushTxFifo(USBx, 0x10U) != HAL_OK) /* all Tx FIFOs */ - 800468a: 2110 movs r1, #16 - 800468c: 6878 ldr r0, [r7, #4] - 800468e: f000 f8f3 bl 8004878 - 8004692: 4603 mov r3, r0 - 8004694: 2b00 cmp r3, #0 - 8004696: d001 beq.n 800469c - { - ret = HAL_ERROR; - 8004698: 2301 movs r3, #1 - 800469a: 75fb strb r3, [r7, #23] - } - - if (USB_FlushRxFifo(USBx) != HAL_OK) - 800469c: 6878 ldr r0, [r7, #4] - 800469e: f000 f91f bl 80048e0 - 80046a2: 4603 mov r3, r0 - 80046a4: 2b00 cmp r3, #0 - 80046a6: d001 beq.n 80046ac - { - ret = HAL_ERROR; - 80046a8: 2301 movs r3, #1 - 80046aa: 75fb strb r3, [r7, #23] - } - - /* Clear all pending Device Interrupts */ - USBx_DEVICE->DIEPMSK = 0U; - 80046ac: 68fb ldr r3, [r7, #12] - 80046ae: f503 6300 add.w r3, r3, #2048 ; 0x800 - 80046b2: 461a mov r2, r3 - 80046b4: 2300 movs r3, #0 - 80046b6: 6113 str r3, [r2, #16] - USBx_DEVICE->DOEPMSK = 0U; - 80046b8: 68fb ldr r3, [r7, #12] - 80046ba: f503 6300 add.w r3, r3, #2048 ; 0x800 - 80046be: 461a mov r2, r3 - 80046c0: 2300 movs r3, #0 - 80046c2: 6153 str r3, [r2, #20] - USBx_DEVICE->DAINTMSK = 0U; - 80046c4: 68fb ldr r3, [r7, #12] - 80046c6: f503 6300 add.w r3, r3, #2048 ; 0x800 - 80046ca: 461a mov r2, r3 - 80046cc: 2300 movs r3, #0 - 80046ce: 61d3 str r3, [r2, #28] - - for (i = 0U; i < cfg.dev_endpoints; i++) - 80046d0: 2300 movs r3, #0 - 80046d2: 613b str r3, [r7, #16] - 80046d4: e043 b.n 800475e - { - if ((USBx_INEP(i)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == USB_OTG_DIEPCTL_EPENA) - 80046d6: 693b ldr r3, [r7, #16] - 80046d8: 015a lsls r2, r3, #5 - 80046da: 68fb ldr r3, [r7, #12] - 80046dc: 4413 add r3, r2 - 80046de: f503 6310 add.w r3, r3, #2304 ; 0x900 - 80046e2: 681b ldr r3, [r3, #0] - 80046e4: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000 - 80046e8: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 - 80046ec: d118 bne.n 8004720 - { - if (i == 0U) - 80046ee: 693b ldr r3, [r7, #16] - 80046f0: 2b00 cmp r3, #0 - 80046f2: d10a bne.n 800470a - { - USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_SNAK; - 80046f4: 693b ldr r3, [r7, #16] - 80046f6: 015a lsls r2, r3, #5 - 80046f8: 68fb ldr r3, [r7, #12] - 80046fa: 4413 add r3, r2 - 80046fc: f503 6310 add.w r3, r3, #2304 ; 0x900 - 8004700: 461a mov r2, r3 - 8004702: f04f 6300 mov.w r3, #134217728 ; 0x8000000 - 8004706: 6013 str r3, [r2, #0] - 8004708: e013 b.n 8004732 - } - else - { - USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_EPDIS | USB_OTG_DIEPCTL_SNAK; - 800470a: 693b ldr r3, [r7, #16] - 800470c: 015a lsls r2, r3, #5 - 800470e: 68fb ldr r3, [r7, #12] - 8004710: 4413 add r3, r2 - 8004712: f503 6310 add.w r3, r3, #2304 ; 0x900 - 8004716: 461a mov r2, r3 - 8004718: f04f 4390 mov.w r3, #1207959552 ; 0x48000000 - 800471c: 6013 str r3, [r2, #0] - 800471e: e008 b.n 8004732 - } - } - else - { - USBx_INEP(i)->DIEPCTL = 0U; - 8004720: 693b ldr r3, [r7, #16] - 8004722: 015a lsls r2, r3, #5 - 8004724: 68fb ldr r3, [r7, #12] - 8004726: 4413 add r3, r2 - 8004728: f503 6310 add.w r3, r3, #2304 ; 0x900 - 800472c: 461a mov r2, r3 - 800472e: 2300 movs r3, #0 - 8004730: 6013 str r3, [r2, #0] - } - - USBx_INEP(i)->DIEPTSIZ = 0U; - 8004732: 693b ldr r3, [r7, #16] - 8004734: 015a lsls r2, r3, #5 - 8004736: 68fb ldr r3, [r7, #12] - 8004738: 4413 add r3, r2 - 800473a: f503 6310 add.w r3, r3, #2304 ; 0x900 - 800473e: 461a mov r2, r3 - 8004740: 2300 movs r3, #0 - 8004742: 6113 str r3, [r2, #16] - USBx_INEP(i)->DIEPINT = 0xFB7FU; - 8004744: 693b ldr r3, [r7, #16] - 8004746: 015a lsls r2, r3, #5 - 8004748: 68fb ldr r3, [r7, #12] - 800474a: 4413 add r3, r2 - 800474c: f503 6310 add.w r3, r3, #2304 ; 0x900 - 8004750: 461a mov r2, r3 - 8004752: f64f 337f movw r3, #64383 ; 0xfb7f - 8004756: 6093 str r3, [r2, #8] - for (i = 0U; i < cfg.dev_endpoints; i++) - 8004758: 693b ldr r3, [r7, #16] - 800475a: 3301 adds r3, #1 - 800475c: 613b str r3, [r7, #16] - 800475e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8004760: 693a ldr r2, [r7, #16] - 8004762: 429a cmp r2, r3 - 8004764: d3b7 bcc.n 80046d6 - } - - for (i = 0U; i < cfg.dev_endpoints; i++) - 8004766: 2300 movs r3, #0 - 8004768: 613b str r3, [r7, #16] - 800476a: e043 b.n 80047f4 - { - if ((USBx_OUTEP(i)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA) - 800476c: 693b ldr r3, [r7, #16] - 800476e: 015a lsls r2, r3, #5 - 8004770: 68fb ldr r3, [r7, #12] - 8004772: 4413 add r3, r2 - 8004774: f503 6330 add.w r3, r3, #2816 ; 0xb00 - 8004778: 681b ldr r3, [r3, #0] - 800477a: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000 - 800477e: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 - 8004782: d118 bne.n 80047b6 - { - if (i == 0U) - 8004784: 693b ldr r3, [r7, #16] - 8004786: 2b00 cmp r3, #0 - 8004788: d10a bne.n 80047a0 - { - USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_SNAK; - 800478a: 693b ldr r3, [r7, #16] - 800478c: 015a lsls r2, r3, #5 - 800478e: 68fb ldr r3, [r7, #12] - 8004790: 4413 add r3, r2 - 8004792: f503 6330 add.w r3, r3, #2816 ; 0xb00 - 8004796: 461a mov r2, r3 - 8004798: f04f 6300 mov.w r3, #134217728 ; 0x8000000 - 800479c: 6013 str r3, [r2, #0] - 800479e: e013 b.n 80047c8 - } - else - { - USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_EPDIS | USB_OTG_DOEPCTL_SNAK; - 80047a0: 693b ldr r3, [r7, #16] - 80047a2: 015a lsls r2, r3, #5 - 80047a4: 68fb ldr r3, [r7, #12] - 80047a6: 4413 add r3, r2 - 80047a8: f503 6330 add.w r3, r3, #2816 ; 0xb00 - 80047ac: 461a mov r2, r3 - 80047ae: f04f 4390 mov.w r3, #1207959552 ; 0x48000000 - 80047b2: 6013 str r3, [r2, #0] - 80047b4: e008 b.n 80047c8 - } - } - else - { - USBx_OUTEP(i)->DOEPCTL = 0U; - 80047b6: 693b ldr r3, [r7, #16] - 80047b8: 015a lsls r2, r3, #5 - 80047ba: 68fb ldr r3, [r7, #12] - 80047bc: 4413 add r3, r2 - 80047be: f503 6330 add.w r3, r3, #2816 ; 0xb00 - 80047c2: 461a mov r2, r3 - 80047c4: 2300 movs r3, #0 - 80047c6: 6013 str r3, [r2, #0] - } - - USBx_OUTEP(i)->DOEPTSIZ = 0U; - 80047c8: 693b ldr r3, [r7, #16] - 80047ca: 015a lsls r2, r3, #5 - 80047cc: 68fb ldr r3, [r7, #12] - 80047ce: 4413 add r3, r2 - 80047d0: f503 6330 add.w r3, r3, #2816 ; 0xb00 - 80047d4: 461a mov r2, r3 - 80047d6: 2300 movs r3, #0 - 80047d8: 6113 str r3, [r2, #16] - USBx_OUTEP(i)->DOEPINT = 0xFB7FU; - 80047da: 693b ldr r3, [r7, #16] - 80047dc: 015a lsls r2, r3, #5 - 80047de: 68fb ldr r3, [r7, #12] - 80047e0: 4413 add r3, r2 - 80047e2: f503 6330 add.w r3, r3, #2816 ; 0xb00 - 80047e6: 461a mov r2, r3 - 80047e8: f64f 337f movw r3, #64383 ; 0xfb7f - 80047ec: 6093 str r3, [r2, #8] - for (i = 0U; i < cfg.dev_endpoints; i++) - 80047ee: 693b ldr r3, [r7, #16] - 80047f0: 3301 adds r3, #1 - 80047f2: 613b str r3, [r7, #16] - 80047f4: 6a7b ldr r3, [r7, #36] ; 0x24 - 80047f6: 693a ldr r2, [r7, #16] - 80047f8: 429a cmp r2, r3 - 80047fa: d3b7 bcc.n 800476c - } - - USBx_DEVICE->DIEPMSK &= ~(USB_OTG_DIEPMSK_TXFURM); - 80047fc: 68fb ldr r3, [r7, #12] - 80047fe: f503 6300 add.w r3, r3, #2048 ; 0x800 - 8004802: 691b ldr r3, [r3, #16] - 8004804: 68fa ldr r2, [r7, #12] - 8004806: f502 6200 add.w r2, r2, #2048 ; 0x800 - 800480a: f423 7380 bic.w r3, r3, #256 ; 0x100 - 800480e: 6113 str r3, [r2, #16] - - /* Disable all interrupts. */ - USBx->GINTMSK = 0U; - 8004810: 687b ldr r3, [r7, #4] - 8004812: 2200 movs r2, #0 - 8004814: 619a str r2, [r3, #24] - - /* Clear any pending interrupts */ - USBx->GINTSTS = 0xBFFFFFFFU; - 8004816: 687b ldr r3, [r7, #4] - 8004818: f06f 4280 mvn.w r2, #1073741824 ; 0x40000000 - 800481c: 615a str r2, [r3, #20] - - /* Enable the common interrupts */ - if (cfg.dma_enable == 0U) - 800481e: 6afb ldr r3, [r7, #44] ; 0x2c - 8004820: 2b00 cmp r3, #0 - 8004822: d105 bne.n 8004830 - { - USBx->GINTMSK |= USB_OTG_GINTMSK_RXFLVLM; - 8004824: 687b ldr r3, [r7, #4] - 8004826: 699b ldr r3, [r3, #24] - 8004828: f043 0210 orr.w r2, r3, #16 - 800482c: 687b ldr r3, [r7, #4] - 800482e: 619a str r2, [r3, #24] - } - - /* Enable interrupts matching to the Device mode ONLY */ - USBx->GINTMSK |= USB_OTG_GINTMSK_USBSUSPM | USB_OTG_GINTMSK_USBRST | - 8004830: 687b ldr r3, [r7, #4] - 8004832: 699a ldr r2, [r3, #24] - 8004834: 4b0f ldr r3, [pc, #60] ; (8004874 ) - 8004836: 4313 orrs r3, r2 - 8004838: 687a ldr r2, [r7, #4] - 800483a: 6193 str r3, [r2, #24] - USB_OTG_GINTMSK_ENUMDNEM | USB_OTG_GINTMSK_IEPINT | - USB_OTG_GINTMSK_OEPINT | USB_OTG_GINTMSK_IISOIXFRM | - USB_OTG_GINTMSK_PXFRM_IISOOXFRM | USB_OTG_GINTMSK_WUIM; - - if (cfg.Sof_enable != 0U) - 800483c: 6bfb ldr r3, [r7, #60] ; 0x3c - 800483e: 2b00 cmp r3, #0 - 8004840: d005 beq.n 800484e - { - USBx->GINTMSK |= USB_OTG_GINTMSK_SOFM; - 8004842: 687b ldr r3, [r7, #4] - 8004844: 699b ldr r3, [r3, #24] - 8004846: f043 0208 orr.w r2, r3, #8 - 800484a: 687b ldr r3, [r7, #4] - 800484c: 619a str r2, [r3, #24] - } - - if (cfg.vbus_sensing_enable == 1U) - 800484e: 6cfb ldr r3, [r7, #76] ; 0x4c - 8004850: 2b01 cmp r3, #1 - 8004852: d107 bne.n 8004864 - { - USBx->GINTMSK |= (USB_OTG_GINTMSK_SRQIM | USB_OTG_GINTMSK_OTGINT); - 8004854: 687b ldr r3, [r7, #4] - 8004856: 699b ldr r3, [r3, #24] - 8004858: f043 4380 orr.w r3, r3, #1073741824 ; 0x40000000 - 800485c: f043 0304 orr.w r3, r3, #4 - 8004860: 687a ldr r2, [r7, #4] - 8004862: 6193 str r3, [r2, #24] - } - - return ret; - 8004864: 7dfb ldrb r3, [r7, #23] -} - 8004866: 4618 mov r0, r3 - 8004868: 3718 adds r7, #24 - 800486a: 46bd mov sp, r7 - 800486c: e8bd 4080 ldmia.w sp!, {r7, lr} - 8004870: b004 add sp, #16 - 8004872: 4770 bx lr - 8004874: 803c3800 .word 0x803c3800 - -08004878 : - * This parameter can be a value from 1 to 15 - 15 means Flush all Tx FIFOs - * @retval HAL status - */ -HAL_StatusTypeDef USB_FlushTxFifo(USB_OTG_GlobalTypeDef *USBx, uint32_t num) -{ - 8004878: b480 push {r7} - 800487a: b085 sub sp, #20 - 800487c: af00 add r7, sp, #0 - 800487e: 6078 str r0, [r7, #4] - 8004880: 6039 str r1, [r7, #0] - __IO uint32_t count = 0U; - 8004882: 2300 movs r3, #0 - 8004884: 60fb str r3, [r7, #12] - - /* Wait for AHB master IDLE state. */ - do - { - count++; - 8004886: 68fb ldr r3, [r7, #12] - 8004888: 3301 adds r3, #1 - 800488a: 60fb str r3, [r7, #12] - - if (count > 200000U) - 800488c: 68fb ldr r3, [r7, #12] - 800488e: 4a13 ldr r2, [pc, #76] ; (80048dc ) - 8004890: 4293 cmp r3, r2 - 8004892: d901 bls.n 8004898 - { - return HAL_TIMEOUT; - 8004894: 2303 movs r3, #3 - 8004896: e01b b.n 80048d0 - } - } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); - 8004898: 687b ldr r3, [r7, #4] - 800489a: 691b ldr r3, [r3, #16] - 800489c: 2b00 cmp r3, #0 - 800489e: daf2 bge.n 8004886 - - /* Flush TX Fifo */ - count = 0U; - 80048a0: 2300 movs r3, #0 - 80048a2: 60fb str r3, [r7, #12] - USBx->GRSTCTL = (USB_OTG_GRSTCTL_TXFFLSH | (num << 6)); - 80048a4: 683b ldr r3, [r7, #0] - 80048a6: 019b lsls r3, r3, #6 - 80048a8: f043 0220 orr.w r2, r3, #32 - 80048ac: 687b ldr r3, [r7, #4] - 80048ae: 611a str r2, [r3, #16] - - do - { - count++; - 80048b0: 68fb ldr r3, [r7, #12] - 80048b2: 3301 adds r3, #1 - 80048b4: 60fb str r3, [r7, #12] - - if (count > 200000U) - 80048b6: 68fb ldr r3, [r7, #12] - 80048b8: 4a08 ldr r2, [pc, #32] ; (80048dc ) - 80048ba: 4293 cmp r3, r2 - 80048bc: d901 bls.n 80048c2 - { - return HAL_TIMEOUT; - 80048be: 2303 movs r3, #3 - 80048c0: e006 b.n 80048d0 - } - } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_TXFFLSH) == USB_OTG_GRSTCTL_TXFFLSH); - 80048c2: 687b ldr r3, [r7, #4] - 80048c4: 691b ldr r3, [r3, #16] - 80048c6: f003 0320 and.w r3, r3, #32 - 80048ca: 2b20 cmp r3, #32 - 80048cc: d0f0 beq.n 80048b0 - - return HAL_OK; - 80048ce: 2300 movs r3, #0 -} - 80048d0: 4618 mov r0, r3 - 80048d2: 3714 adds r7, #20 - 80048d4: 46bd mov sp, r7 - 80048d6: bc80 pop {r7} - 80048d8: 4770 bx lr - 80048da: bf00 nop - 80048dc: 00030d40 .word 0x00030d40 - -080048e0 : - * @brief USB_FlushRxFifo Flush Rx FIFO - * @param USBx Selected device - * @retval HAL status - */ -HAL_StatusTypeDef USB_FlushRxFifo(USB_OTG_GlobalTypeDef *USBx) -{ - 80048e0: b480 push {r7} - 80048e2: b085 sub sp, #20 - 80048e4: af00 add r7, sp, #0 - 80048e6: 6078 str r0, [r7, #4] - __IO uint32_t count = 0U; - 80048e8: 2300 movs r3, #0 - 80048ea: 60fb str r3, [r7, #12] - - /* Wait for AHB master IDLE state. */ - do - { - count++; - 80048ec: 68fb ldr r3, [r7, #12] - 80048ee: 3301 adds r3, #1 - 80048f0: 60fb str r3, [r7, #12] - - if (count > 200000U) - 80048f2: 68fb ldr r3, [r7, #12] - 80048f4: 4a11 ldr r2, [pc, #68] ; (800493c ) - 80048f6: 4293 cmp r3, r2 - 80048f8: d901 bls.n 80048fe - { - return HAL_TIMEOUT; - 80048fa: 2303 movs r3, #3 - 80048fc: e018 b.n 8004930 - } - } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); - 80048fe: 687b ldr r3, [r7, #4] - 8004900: 691b ldr r3, [r3, #16] - 8004902: 2b00 cmp r3, #0 - 8004904: daf2 bge.n 80048ec - - /* Flush RX Fifo */ - count = 0U; - 8004906: 2300 movs r3, #0 - 8004908: 60fb str r3, [r7, #12] - USBx->GRSTCTL = USB_OTG_GRSTCTL_RXFFLSH; - 800490a: 687b ldr r3, [r7, #4] - 800490c: 2210 movs r2, #16 - 800490e: 611a str r2, [r3, #16] - - do - { - count++; - 8004910: 68fb ldr r3, [r7, #12] - 8004912: 3301 adds r3, #1 - 8004914: 60fb str r3, [r7, #12] - - if (count > 200000U) - 8004916: 68fb ldr r3, [r7, #12] - 8004918: 4a08 ldr r2, [pc, #32] ; (800493c ) - 800491a: 4293 cmp r3, r2 - 800491c: d901 bls.n 8004922 - { - return HAL_TIMEOUT; - 800491e: 2303 movs r3, #3 - 8004920: e006 b.n 8004930 - } - } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_RXFFLSH) == USB_OTG_GRSTCTL_RXFFLSH); - 8004922: 687b ldr r3, [r7, #4] - 8004924: 691b ldr r3, [r3, #16] - 8004926: f003 0310 and.w r3, r3, #16 - 800492a: 2b10 cmp r3, #16 - 800492c: d0f0 beq.n 8004910 - - return HAL_OK; - 800492e: 2300 movs r3, #0 -} - 8004930: 4618 mov r0, r3 - 8004932: 3714 adds r7, #20 - 8004934: 46bd mov sp, r7 - 8004936: bc80 pop {r7} - 8004938: 4770 bx lr - 800493a: bf00 nop - 800493c: 00030d40 .word 0x00030d40 - -08004940 : - * @arg USB_OTG_SPEED_HIGH_IN_FULL: High speed core in Full Speed mode - * @arg USB_OTG_SPEED_FULL: Full speed mode - * @retval Hal status - */ -HAL_StatusTypeDef USB_SetDevSpeed(USB_OTG_GlobalTypeDef *USBx, uint8_t speed) -{ - 8004940: b480 push {r7} - 8004942: b085 sub sp, #20 - 8004944: af00 add r7, sp, #0 - 8004946: 6078 str r0, [r7, #4] - 8004948: 460b mov r3, r1 - 800494a: 70fb strb r3, [r7, #3] - uint32_t USBx_BASE = (uint32_t)USBx; - 800494c: 687b ldr r3, [r7, #4] - 800494e: 60fb str r3, [r7, #12] - - USBx_DEVICE->DCFG |= speed; - 8004950: 68fb ldr r3, [r7, #12] - 8004952: f503 6300 add.w r3, r3, #2048 ; 0x800 - 8004956: 681a ldr r2, [r3, #0] - 8004958: 78fb ldrb r3, [r7, #3] - 800495a: 68f9 ldr r1, [r7, #12] - 800495c: f501 6100 add.w r1, r1, #2048 ; 0x800 - 8004960: 4313 orrs r3, r2 - 8004962: 600b str r3, [r1, #0] - return HAL_OK; - 8004964: 2300 movs r3, #0 -} - 8004966: 4618 mov r0, r3 - 8004968: 3714 adds r7, #20 - 800496a: 46bd mov sp, r7 - 800496c: bc80 pop {r7} - 800496e: 4770 bx lr - -08004970 : - * @brief USB_DevDisconnect : Disconnect the USB device by disabling Rpu - * @param USBx Selected device - * @retval HAL status - */ -HAL_StatusTypeDef USB_DevDisconnect(USB_OTG_GlobalTypeDef *USBx) -{ - 8004970: b480 push {r7} - 8004972: b085 sub sp, #20 - 8004974: af00 add r7, sp, #0 - 8004976: 6078 str r0, [r7, #4] - uint32_t USBx_BASE = (uint32_t)USBx; - 8004978: 687b ldr r3, [r7, #4] - 800497a: 60fb str r3, [r7, #12] - - /* In case phy is stopped, ensure to ungate and restore the phy CLK */ - USBx_PCGCCTL &= ~(USB_OTG_PCGCCTL_STOPCLK | USB_OTG_PCGCCTL_GATECLK); - 800497c: 68fb ldr r3, [r7, #12] - 800497e: f503 6360 add.w r3, r3, #3584 ; 0xe00 - 8004982: 681b ldr r3, [r3, #0] - 8004984: 68fa ldr r2, [r7, #12] - 8004986: f502 6260 add.w r2, r2, #3584 ; 0xe00 - 800498a: f023 0303 bic.w r3, r3, #3 - 800498e: 6013 str r3, [r2, #0] - - USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS; - 8004990: 68fb ldr r3, [r7, #12] - 8004992: f503 6300 add.w r3, r3, #2048 ; 0x800 - 8004996: 685b ldr r3, [r3, #4] - 8004998: 68fa ldr r2, [r7, #12] - 800499a: f502 6200 add.w r2, r2, #2048 ; 0x800 - 800499e: f043 0302 orr.w r3, r3, #2 - 80049a2: 6053 str r3, [r2, #4] - - return HAL_OK; - 80049a4: 2300 movs r3, #0 -} - 80049a6: 4618 mov r0, r3 - 80049a8: 3714 adds r7, #20 - 80049aa: 46bd mov sp, r7 - 80049ac: bc80 pop {r7} - 80049ae: 4770 bx lr - -080049b0 : - * This parameter can be one of these values: - * 0 : Host - * 1 : Device - */ -uint32_t USB_GetMode(USB_OTG_GlobalTypeDef *USBx) -{ - 80049b0: b480 push {r7} - 80049b2: b083 sub sp, #12 - 80049b4: af00 add r7, sp, #0 - 80049b6: 6078 str r0, [r7, #4] - return ((USBx->GINTSTS) & 0x1U); - 80049b8: 687b ldr r3, [r7, #4] - 80049ba: 695b ldr r3, [r3, #20] - 80049bc: f003 0301 and.w r3, r3, #1 -} - 80049c0: 4618 mov r0, r3 - 80049c2: 370c adds r7, #12 - 80049c4: 46bd mov sp, r7 - 80049c6: bc80 pop {r7} - 80049c8: 4770 bx lr - ... - -080049cc : - * @brief Reset the USB Core (needed after USB clock settings change) - * @param USBx Selected device - * @retval HAL status - */ -static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx) -{ - 80049cc: b480 push {r7} - 80049ce: b085 sub sp, #20 - 80049d0: af00 add r7, sp, #0 - 80049d2: 6078 str r0, [r7, #4] - __IO uint32_t count = 0U; - 80049d4: 2300 movs r3, #0 - 80049d6: 60fb str r3, [r7, #12] - - /* Wait for AHB master IDLE state. */ - do - { - count++; - 80049d8: 68fb ldr r3, [r7, #12] - 80049da: 3301 adds r3, #1 - 80049dc: 60fb str r3, [r7, #12] - - if (count > 200000U) - 80049de: 68fb ldr r3, [r7, #12] - 80049e0: 4a12 ldr r2, [pc, #72] ; (8004a2c ) - 80049e2: 4293 cmp r3, r2 - 80049e4: d901 bls.n 80049ea - { - return HAL_TIMEOUT; - 80049e6: 2303 movs r3, #3 - 80049e8: e01b b.n 8004a22 - } - } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); - 80049ea: 687b ldr r3, [r7, #4] - 80049ec: 691b ldr r3, [r3, #16] - 80049ee: 2b00 cmp r3, #0 - 80049f0: daf2 bge.n 80049d8 - - /* Core Soft Reset */ - count = 0U; - 80049f2: 2300 movs r3, #0 - 80049f4: 60fb str r3, [r7, #12] - USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST; - 80049f6: 687b ldr r3, [r7, #4] - 80049f8: 691b ldr r3, [r3, #16] - 80049fa: f043 0201 orr.w r2, r3, #1 - 80049fe: 687b ldr r3, [r7, #4] - 8004a00: 611a str r2, [r3, #16] - - do - { - count++; - 8004a02: 68fb ldr r3, [r7, #12] - 8004a04: 3301 adds r3, #1 - 8004a06: 60fb str r3, [r7, #12] - - if (count > 200000U) - 8004a08: 68fb ldr r3, [r7, #12] - 8004a0a: 4a08 ldr r2, [pc, #32] ; (8004a2c ) - 8004a0c: 4293 cmp r3, r2 - 8004a0e: d901 bls.n 8004a14 - { - return HAL_TIMEOUT; - 8004a10: 2303 movs r3, #3 - 8004a12: e006 b.n 8004a22 - } - } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST); - 8004a14: 687b ldr r3, [r7, #4] - 8004a16: 691b ldr r3, [r3, #16] - 8004a18: f003 0301 and.w r3, r3, #1 - 8004a1c: 2b01 cmp r3, #1 - 8004a1e: d0f0 beq.n 8004a02 - - return HAL_OK; - 8004a20: 2300 movs r3, #0 -} - 8004a22: 4618 mov r0, r3 - 8004a24: 3714 adds r7, #20 - 8004a26: 46bd mov sp, r7 - 8004a28: bc80 pop {r7} - 8004a2a: 4770 bx lr - 8004a2c: 00030d40 .word 0x00030d40 - -08004a30 : - -/** - * LwIP initialization function - */ -void MX_LWIP_Init(void) -{ - 8004a30: b580 push {r7, lr} - 8004a32: b084 sub sp, #16 - 8004a34: af04 add r7, sp, #16 - /* Initilialize the LwIP stack without RTOS */ - lwip_init(); - 8004a36: f000 fb33 bl 80050a0 - - /* IP addresses initialization with DHCP (IPv4) */ - ipaddr.addr = 0; - 8004a3a: 4b19 ldr r3, [pc, #100] ; (8004aa0 ) - 8004a3c: 2200 movs r2, #0 - 8004a3e: 601a str r2, [r3, #0] - netmask.addr = 0; - 8004a40: 4b18 ldr r3, [pc, #96] ; (8004aa4 ) - 8004a42: 2200 movs r2, #0 - 8004a44: 601a str r2, [r3, #0] - gw.addr = 0; - 8004a46: 4b18 ldr r3, [pc, #96] ; (8004aa8 ) - 8004a48: 2200 movs r2, #0 - 8004a4a: 601a str r2, [r3, #0] - - /* add the network interface (IPv4/IPv6) without RTOS */ - netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, ðernet_input); - 8004a4c: 4b17 ldr r3, [pc, #92] ; (8004aac ) - 8004a4e: 9302 str r3, [sp, #8] - 8004a50: 4b17 ldr r3, [pc, #92] ; (8004ab0 ) - 8004a52: 9301 str r3, [sp, #4] - 8004a54: 2300 movs r3, #0 - 8004a56: 9300 str r3, [sp, #0] - 8004a58: 4b13 ldr r3, [pc, #76] ; (8004aa8 ) - 8004a5a: 4a12 ldr r2, [pc, #72] ; (8004aa4 ) - 8004a5c: 4910 ldr r1, [pc, #64] ; (8004aa0 ) - 8004a5e: 4815 ldr r0, [pc, #84] ; (8004ab4 ) - 8004a60: f000 ff1e bl 80058a0 - - /* Registers the default network interface */ - netif_set_default(&gnetif); - 8004a64: 4813 ldr r0, [pc, #76] ; (8004ab4 ) - 8004a66: f001 f803 bl 8005a70 - - if (netif_is_link_up(&gnetif)) - 8004a6a: 4b12 ldr r3, [pc, #72] ; (8004ab4 ) - 8004a6c: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8004a70: 089b lsrs r3, r3, #2 - 8004a72: f003 0301 and.w r3, r3, #1 - 8004a76: b2db uxtb r3, r3 - 8004a78: 2b00 cmp r3, #0 - 8004a7a: d003 beq.n 8004a84 - { - /* When the netif is fully configured this function must be called */ - netif_set_up(&gnetif); - 8004a7c: 480d ldr r0, [pc, #52] ; (8004ab4 ) - 8004a7e: f001 f805 bl 8005a8c - 8004a82: e002 b.n 8004a8a - } - else - { - /* When the netif link is down this function must be called */ - netif_set_down(&gnetif); - 8004a84: 480b ldr r0, [pc, #44] ; (8004ab4 ) - 8004a86: f001 f845 bl 8005b14 - } - - /* Set the link callback function, this function is called on change of link status*/ - netif_set_link_callback(&gnetif, ethernetif_update_config); - 8004a8a: 490b ldr r1, [pc, #44] ; (8004ab8 ) - 8004a8c: 4809 ldr r0, [pc, #36] ; (8004ab4 ) - 8004a8e: f001 f863 bl 8005b58 - - /* Create the Ethernet link handler thread */ - - /* Start DHCP negotiation for a network interface (IPv4) */ - dhcp_start(&gnetif); - 8004a92: 4808 ldr r0, [pc, #32] ; (8004ab4 ) - 8004a94: f007 f968 bl 800bd68 - -/* USER CODE BEGIN 3 */ - -/* USER CODE END 3 */ -} - 8004a98: bf00 nop - 8004a9a: 46bd mov sp, r7 - 8004a9c: bd80 pop {r7, pc} - 8004a9e: bf00 nop - 8004aa0: 200006f4 .word 0x200006f4 - 8004aa4: 200006f8 .word 0x200006f8 - 8004aa8: 200006fc .word 0x200006fc - 8004aac: 0800f72d .word 0x0800f72d - 8004ab0: 08004ee1 .word 0x08004ee1 - 8004ab4: 200006bc .word 0x200006bc - 8004ab8: 08004f4d .word 0x08004f4d - -08004abc : -/* USER CODE END 3 */ - -/* Private functions ---------------------------------------------------------*/ - -void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) -{ - 8004abc: b580 push {r7, lr} - 8004abe: b08e sub sp, #56 ; 0x38 - 8004ac0: af00 add r7, sp, #0 - 8004ac2: 6078 str r0, [r7, #4] - GPIO_InitTypeDef GPIO_InitStruct = {0}; - 8004ac4: f107 0324 add.w r3, r7, #36 ; 0x24 - 8004ac8: 2200 movs r2, #0 - 8004aca: 601a str r2, [r3, #0] - 8004acc: 605a str r2, [r3, #4] - 8004ace: 609a str r2, [r3, #8] - 8004ad0: 60da str r2, [r3, #12] - 8004ad2: 611a str r2, [r3, #16] - if(ethHandle->Instance==ETH) - 8004ad4: 687b ldr r3, [r7, #4] - 8004ad6: 681b ldr r3, [r3, #0] - 8004ad8: 4a55 ldr r2, [pc, #340] ; (8004c30 ) - 8004ada: 4293 cmp r3, r2 - 8004adc: f040 80a4 bne.w 8004c28 - { - /* USER CODE BEGIN ETH_MspInit 0 */ - - /* USER CODE END ETH_MspInit 0 */ - /* Enable Peripheral clock */ - __HAL_RCC_ETH_CLK_ENABLE(); - 8004ae0: 2300 movs r3, #0 - 8004ae2: 623b str r3, [r7, #32] - 8004ae4: 4b53 ldr r3, [pc, #332] ; (8004c34 ) - 8004ae6: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004ae8: 4a52 ldr r2, [pc, #328] ; (8004c34 ) - 8004aea: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000 - 8004aee: 6313 str r3, [r2, #48] ; 0x30 - 8004af0: 4b50 ldr r3, [pc, #320] ; (8004c34 ) - 8004af2: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004af4: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 - 8004af8: 623b str r3, [r7, #32] - 8004afa: 6a3b ldr r3, [r7, #32] - 8004afc: 2300 movs r3, #0 - 8004afe: 61fb str r3, [r7, #28] - 8004b00: 4b4c ldr r3, [pc, #304] ; (8004c34 ) - 8004b02: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b04: 4a4b ldr r2, [pc, #300] ; (8004c34 ) - 8004b06: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000 - 8004b0a: 6313 str r3, [r2, #48] ; 0x30 - 8004b0c: 4b49 ldr r3, [pc, #292] ; (8004c34 ) - 8004b0e: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b10: f003 6380 and.w r3, r3, #67108864 ; 0x4000000 - 8004b14: 61fb str r3, [r7, #28] - 8004b16: 69fb ldr r3, [r7, #28] - 8004b18: 2300 movs r3, #0 - 8004b1a: 61bb str r3, [r7, #24] - 8004b1c: 4b45 ldr r3, [pc, #276] ; (8004c34 ) - 8004b1e: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b20: 4a44 ldr r2, [pc, #272] ; (8004c34 ) - 8004b22: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000 - 8004b26: 6313 str r3, [r2, #48] ; 0x30 - 8004b28: 4b42 ldr r3, [pc, #264] ; (8004c34 ) - 8004b2a: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b2c: f003 6300 and.w r3, r3, #134217728 ; 0x8000000 - 8004b30: 61bb str r3, [r7, #24] - 8004b32: 69bb ldr r3, [r7, #24] - - __HAL_RCC_GPIOC_CLK_ENABLE(); - 8004b34: 2300 movs r3, #0 - 8004b36: 617b str r3, [r7, #20] - 8004b38: 4b3e ldr r3, [pc, #248] ; (8004c34 ) - 8004b3a: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b3c: 4a3d ldr r2, [pc, #244] ; (8004c34 ) - 8004b3e: f043 0304 orr.w r3, r3, #4 - 8004b42: 6313 str r3, [r2, #48] ; 0x30 - 8004b44: 4b3b ldr r3, [pc, #236] ; (8004c34 ) - 8004b46: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b48: f003 0304 and.w r3, r3, #4 - 8004b4c: 617b str r3, [r7, #20] - 8004b4e: 697b ldr r3, [r7, #20] - __HAL_RCC_GPIOA_CLK_ENABLE(); - 8004b50: 2300 movs r3, #0 - 8004b52: 613b str r3, [r7, #16] - 8004b54: 4b37 ldr r3, [pc, #220] ; (8004c34 ) - 8004b56: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b58: 4a36 ldr r2, [pc, #216] ; (8004c34 ) - 8004b5a: f043 0301 orr.w r3, r3, #1 - 8004b5e: 6313 str r3, [r2, #48] ; 0x30 - 8004b60: 4b34 ldr r3, [pc, #208] ; (8004c34 ) - 8004b62: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b64: f003 0301 and.w r3, r3, #1 - 8004b68: 613b str r3, [r7, #16] - 8004b6a: 693b ldr r3, [r7, #16] - __HAL_RCC_GPIOB_CLK_ENABLE(); - 8004b6c: 2300 movs r3, #0 - 8004b6e: 60fb str r3, [r7, #12] - 8004b70: 4b30 ldr r3, [pc, #192] ; (8004c34 ) - 8004b72: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b74: 4a2f ldr r2, [pc, #188] ; (8004c34 ) - 8004b76: f043 0302 orr.w r3, r3, #2 - 8004b7a: 6313 str r3, [r2, #48] ; 0x30 - 8004b7c: 4b2d ldr r3, [pc, #180] ; (8004c34 ) - 8004b7e: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b80: f003 0302 and.w r3, r3, #2 - 8004b84: 60fb str r3, [r7, #12] - 8004b86: 68fb ldr r3, [r7, #12] - __HAL_RCC_GPIOG_CLK_ENABLE(); - 8004b88: 2300 movs r3, #0 - 8004b8a: 60bb str r3, [r7, #8] - 8004b8c: 4b29 ldr r3, [pc, #164] ; (8004c34 ) - 8004b8e: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b90: 4a28 ldr r2, [pc, #160] ; (8004c34 ) - 8004b92: f043 0340 orr.w r3, r3, #64 ; 0x40 - 8004b96: 6313 str r3, [r2, #48] ; 0x30 - 8004b98: 4b26 ldr r3, [pc, #152] ; (8004c34 ) - 8004b9a: 6b1b ldr r3, [r3, #48] ; 0x30 - 8004b9c: f003 0340 and.w r3, r3, #64 ; 0x40 - 8004ba0: 60bb str r3, [r7, #8] - 8004ba2: 68bb ldr r3, [r7, #8] - PC5 ------> ETH_RXD1 - PB13 ------> ETH_TXD1 - PG11 ------> ETH_TX_EN - PG13 ------> ETH_TXD0 - */ - GPIO_InitStruct.Pin = RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin; - 8004ba4: 2332 movs r3, #50 ; 0x32 - 8004ba6: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8004ba8: 2302 movs r3, #2 - 8004baa: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8004bac: 2300 movs r3, #0 - 8004bae: 62fb str r3, [r7, #44] ; 0x2c - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - 8004bb0: 2303 movs r3, #3 - 8004bb2: 633b str r3, [r7, #48] ; 0x30 - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - 8004bb4: 230b movs r3, #11 - 8004bb6: 637b str r3, [r7, #52] ; 0x34 - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - 8004bb8: f107 0324 add.w r3, r7, #36 ; 0x24 - 8004bbc: 4619 mov r1, r3 - 8004bbe: 481e ldr r0, [pc, #120] ; (8004c38 ) - 8004bc0: f7fd fc80 bl 80024c4 - - GPIO_InitStruct.Pin = RMII_REF_CLK_Pin|RMII_MDIO_Pin|RMII_CRS_DV_Pin; - 8004bc4: 2386 movs r3, #134 ; 0x86 - 8004bc6: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8004bc8: 2302 movs r3, #2 - 8004bca: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8004bcc: 2300 movs r3, #0 - 8004bce: 62fb str r3, [r7, #44] ; 0x2c - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - 8004bd0: 2303 movs r3, #3 - 8004bd2: 633b str r3, [r7, #48] ; 0x30 - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - 8004bd4: 230b movs r3, #11 - 8004bd6: 637b str r3, [r7, #52] ; 0x34 - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - 8004bd8: f107 0324 add.w r3, r7, #36 ; 0x24 - 8004bdc: 4619 mov r1, r3 - 8004bde: 4817 ldr r0, [pc, #92] ; (8004c3c ) - 8004be0: f7fd fc70 bl 80024c4 - - GPIO_InitStruct.Pin = RMII_TXD1_Pin; - 8004be4: f44f 5300 mov.w r3, #8192 ; 0x2000 - 8004be8: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8004bea: 2302 movs r3, #2 - 8004bec: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8004bee: 2300 movs r3, #0 - 8004bf0: 62fb str r3, [r7, #44] ; 0x2c - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - 8004bf2: 2303 movs r3, #3 - 8004bf4: 633b str r3, [r7, #48] ; 0x30 - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - 8004bf6: 230b movs r3, #11 - 8004bf8: 637b str r3, [r7, #52] ; 0x34 - HAL_GPIO_Init(RMII_TXD1_GPIO_Port, &GPIO_InitStruct); - 8004bfa: f107 0324 add.w r3, r7, #36 ; 0x24 - 8004bfe: 4619 mov r1, r3 - 8004c00: 480f ldr r0, [pc, #60] ; (8004c40 ) - 8004c02: f7fd fc5f bl 80024c4 - - GPIO_InitStruct.Pin = RMII_TX_EN_Pin|RMII_TXD0_Pin; - 8004c06: f44f 5320 mov.w r3, #10240 ; 0x2800 - 8004c0a: 627b str r3, [r7, #36] ; 0x24 - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - 8004c0c: 2302 movs r3, #2 - 8004c0e: 62bb str r3, [r7, #40] ; 0x28 - GPIO_InitStruct.Pull = GPIO_NOPULL; - 8004c10: 2300 movs r3, #0 - 8004c12: 62fb str r3, [r7, #44] ; 0x2c - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - 8004c14: 2303 movs r3, #3 - 8004c16: 633b str r3, [r7, #48] ; 0x30 - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - 8004c18: 230b movs r3, #11 - 8004c1a: 637b str r3, [r7, #52] ; 0x34 - HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); - 8004c1c: f107 0324 add.w r3, r7, #36 ; 0x24 - 8004c20: 4619 mov r1, r3 - 8004c22: 4808 ldr r0, [pc, #32] ; (8004c44 ) - 8004c24: f7fd fc4e bl 80024c4 - - /* USER CODE BEGIN ETH_MspInit 1 */ - - /* USER CODE END ETH_MspInit 1 */ - } -} - 8004c28: bf00 nop - 8004c2a: 3738 adds r7, #56 ; 0x38 - 8004c2c: 46bd mov sp, r7 - 8004c2e: bd80 pop {r7, pc} - 8004c30: 40028000 .word 0x40028000 - 8004c34: 40023800 .word 0x40023800 - 8004c38: 40020800 .word 0x40020800 - 8004c3c: 40020000 .word 0x40020000 - 8004c40: 40020400 .word 0x40020400 - 8004c44: 40021800 .word 0x40021800 - -08004c48 : - * - * @param netif the already initialized lwip network interface structure - * for this ethernetif - */ -static void low_level_init(struct netif *netif) -{ - 8004c48: b580 push {r7, lr} - 8004c4a: b086 sub sp, #24 - 8004c4c: af00 add r7, sp, #0 - 8004c4e: 6078 str r0, [r7, #4] - uint32_t regvalue = 0; - 8004c50: 2300 movs r3, #0 - 8004c52: 613b str r3, [r7, #16] - HAL_StatusTypeDef hal_eth_init_status; - -/* Init ETH */ - - uint8_t MACAddr[6] ; - heth.Instance = ETH; - 8004c54: 4b4d ldr r3, [pc, #308] ; (8004d8c ) - 8004c56: 4a4e ldr r2, [pc, #312] ; (8004d90 ) - 8004c58: 601a str r2, [r3, #0] - heth.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; - 8004c5a: 4b4c ldr r3, [pc, #304] ; (8004d8c ) - 8004c5c: 2201 movs r2, #1 - 8004c5e: 605a str r2, [r3, #4] - heth.Init.Speed = ETH_SPEED_100M; - 8004c60: 4b4a ldr r3, [pc, #296] ; (8004d8c ) - 8004c62: f44f 4280 mov.w r2, #16384 ; 0x4000 - 8004c66: 609a str r2, [r3, #8] - heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - 8004c68: 4b48 ldr r3, [pc, #288] ; (8004d8c ) - 8004c6a: f44f 6200 mov.w r2, #2048 ; 0x800 - 8004c6e: 60da str r2, [r3, #12] - heth.Init.PhyAddress = LAN8742A_PHY_ADDRESS; - 8004c70: 4b46 ldr r3, [pc, #280] ; (8004d8c ) - 8004c72: 2200 movs r2, #0 - 8004c74: 821a strh r2, [r3, #16] - MACAddr[0] = 0x00; - 8004c76: 2300 movs r3, #0 - 8004c78: 723b strb r3, [r7, #8] - MACAddr[1] = 0x80; - 8004c7a: 2380 movs r3, #128 ; 0x80 - 8004c7c: 727b strb r3, [r7, #9] - MACAddr[2] = 0xE1; - 8004c7e: 23e1 movs r3, #225 ; 0xe1 - 8004c80: 72bb strb r3, [r7, #10] - MACAddr[3] = 0x00; - 8004c82: 2300 movs r3, #0 - 8004c84: 72fb strb r3, [r7, #11] - MACAddr[4] = 0x00; - 8004c86: 2300 movs r3, #0 - 8004c88: 733b strb r3, [r7, #12] - MACAddr[5] = 0x00; - 8004c8a: 2300 movs r3, #0 - 8004c8c: 737b strb r3, [r7, #13] - heth.Init.MACAddr = &MACAddr[0]; - 8004c8e: 4a3f ldr r2, [pc, #252] ; (8004d8c ) - 8004c90: f107 0308 add.w r3, r7, #8 - 8004c94: 6153 str r3, [r2, #20] - heth.Init.RxMode = ETH_RXPOLLING_MODE; - 8004c96: 4b3d ldr r3, [pc, #244] ; (8004d8c ) - 8004c98: 2200 movs r2, #0 - 8004c9a: 619a str r2, [r3, #24] - heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; - 8004c9c: 4b3b ldr r3, [pc, #236] ; (8004d8c ) - 8004c9e: 2200 movs r2, #0 - 8004ca0: 61da str r2, [r3, #28] - heth.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; - 8004ca2: 4b3a ldr r3, [pc, #232] ; (8004d8c ) - 8004ca4: f44f 0200 mov.w r2, #8388608 ; 0x800000 - 8004ca8: 621a str r2, [r3, #32] - - /* USER CODE BEGIN MACADDRESS */ - - /* USER CODE END MACADDRESS */ - - hal_eth_init_status = HAL_ETH_Init(&heth); - 8004caa: 4838 ldr r0, [pc, #224] ; (8004d8c ) - 8004cac: f7fc fb96 bl 80013dc - 8004cb0: 4603 mov r3, r0 - 8004cb2: 75fb strb r3, [r7, #23] - - if (hal_eth_init_status == HAL_OK) - 8004cb4: 7dfb ldrb r3, [r7, #23] - 8004cb6: 2b00 cmp r3, #0 - 8004cb8: d108 bne.n 8004ccc - { - /* Set netif link flag */ - netif->flags |= NETIF_FLAG_LINK_UP; - 8004cba: 687b ldr r3, [r7, #4] - 8004cbc: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8004cc0: f043 0304 orr.w r3, r3, #4 - 8004cc4: b2da uxtb r2, r3 - 8004cc6: 687b ldr r3, [r7, #4] - 8004cc8: f883 2033 strb.w r2, [r3, #51] ; 0x33 - } - /* Initialize Tx Descriptors list: Chain Mode */ - HAL_ETH_DMATxDescListInit(&heth, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); - 8004ccc: 2304 movs r3, #4 - 8004cce: 4a31 ldr r2, [pc, #196] ; (8004d94 ) - 8004cd0: 4931 ldr r1, [pc, #196] ; (8004d98 ) - 8004cd2: 482e ldr r0, [pc, #184] ; (8004d8c ) - 8004cd4: f7fc fd0e bl 80016f4 - - /* Initialize Rx Descriptors list: Chain Mode */ - HAL_ETH_DMARxDescListInit(&heth, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); - 8004cd8: 2304 movs r3, #4 - 8004cda: 4a30 ldr r2, [pc, #192] ; (8004d9c ) - 8004cdc: 4930 ldr r1, [pc, #192] ; (8004da0 ) - 8004cde: 482b ldr r0, [pc, #172] ; (8004d8c ) - 8004ce0: f7fc fd6f bl 80017c2 - -#if LWIP_ARP || LWIP_ETHERNET - - /* set MAC hardware address length */ - netif->hwaddr_len = ETH_HWADDR_LEN; - 8004ce4: 687b ldr r3, [r7, #4] - 8004ce6: 2206 movs r2, #6 - 8004ce8: f883 202c strb.w r2, [r3, #44] ; 0x2c - - /* set MAC hardware address */ - netif->hwaddr[0] = heth.Init.MACAddr[0]; - 8004cec: 4b27 ldr r3, [pc, #156] ; (8004d8c ) - 8004cee: 695b ldr r3, [r3, #20] - 8004cf0: 781a ldrb r2, [r3, #0] - 8004cf2: 687b ldr r3, [r7, #4] - 8004cf4: f883 202d strb.w r2, [r3, #45] ; 0x2d - netif->hwaddr[1] = heth.Init.MACAddr[1]; - 8004cf8: 4b24 ldr r3, [pc, #144] ; (8004d8c ) - 8004cfa: 695b ldr r3, [r3, #20] - 8004cfc: 785a ldrb r2, [r3, #1] - 8004cfe: 687b ldr r3, [r7, #4] - 8004d00: f883 202e strb.w r2, [r3, #46] ; 0x2e - netif->hwaddr[2] = heth.Init.MACAddr[2]; - 8004d04: 4b21 ldr r3, [pc, #132] ; (8004d8c ) - 8004d06: 695b ldr r3, [r3, #20] - 8004d08: 789a ldrb r2, [r3, #2] - 8004d0a: 687b ldr r3, [r7, #4] - 8004d0c: f883 202f strb.w r2, [r3, #47] ; 0x2f - netif->hwaddr[3] = heth.Init.MACAddr[3]; - 8004d10: 4b1e ldr r3, [pc, #120] ; (8004d8c ) - 8004d12: 695b ldr r3, [r3, #20] - 8004d14: 78da ldrb r2, [r3, #3] - 8004d16: 687b ldr r3, [r7, #4] - 8004d18: f883 2030 strb.w r2, [r3, #48] ; 0x30 - netif->hwaddr[4] = heth.Init.MACAddr[4]; - 8004d1c: 4b1b ldr r3, [pc, #108] ; (8004d8c ) - 8004d1e: 695b ldr r3, [r3, #20] - 8004d20: 791a ldrb r2, [r3, #4] - 8004d22: 687b ldr r3, [r7, #4] - 8004d24: f883 2031 strb.w r2, [r3, #49] ; 0x31 - netif->hwaddr[5] = heth.Init.MACAddr[5]; - 8004d28: 4b18 ldr r3, [pc, #96] ; (8004d8c ) - 8004d2a: 695b ldr r3, [r3, #20] - 8004d2c: 795a ldrb r2, [r3, #5] - 8004d2e: 687b ldr r3, [r7, #4] - 8004d30: f883 2032 strb.w r2, [r3, #50] ; 0x32 - - /* maximum transfer unit */ - netif->mtu = 1500; - 8004d34: 687b ldr r3, [r7, #4] - 8004d36: f240 52dc movw r2, #1500 ; 0x5dc - 8004d3a: 855a strh r2, [r3, #42] ; 0x2a - - /* Accept broadcast address and ARP traffic */ - /* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */ - #if LWIP_ARP - netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; - 8004d3c: 687b ldr r3, [r7, #4] - 8004d3e: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8004d42: f043 030a orr.w r3, r3, #10 - 8004d46: b2da uxtb r2, r3 - 8004d48: 687b ldr r3, [r7, #4] - 8004d4a: f883 2033 strb.w r2, [r3, #51] ; 0x33 - #else - netif->flags |= NETIF_FLAG_BROADCAST; - #endif /* LWIP_ARP */ - - /* Enable MAC and DMA transmission and reception */ - HAL_ETH_Start(&heth); - 8004d4e: 480f ldr r0, [pc, #60] ; (8004d8c ) - 8004d50: f7fc ff58 bl 8001c04 -/* USER CODE BEGIN PHY_PRE_CONFIG */ - -/* USER CODE END PHY_PRE_CONFIG */ - - /* Read Register Configuration */ - HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR, ®value); - 8004d54: f107 0310 add.w r3, r7, #16 - 8004d58: 461a mov r2, r3 - 8004d5a: 211d movs r1, #29 - 8004d5c: 480b ldr r0, [pc, #44] ; (8004d8c ) - 8004d5e: f7fc fe83 bl 8001a68 - regvalue |= (PHY_ISFR_INT4); - 8004d62: 693b ldr r3, [r7, #16] - 8004d64: f043 030b orr.w r3, r3, #11 - 8004d68: 613b str r3, [r7, #16] - - /* Enable Interrupt on change of link status */ - HAL_ETH_WritePHYRegister(&heth, PHY_ISFR , regvalue ); - 8004d6a: 693b ldr r3, [r7, #16] - 8004d6c: 461a mov r2, r3 - 8004d6e: 211d movs r1, #29 - 8004d70: 4806 ldr r0, [pc, #24] ; (8004d8c ) - 8004d72: f7fc fee1 bl 8001b38 - - /* Read Register Configuration */ - HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR , ®value); - 8004d76: f107 0310 add.w r3, r7, #16 - 8004d7a: 461a mov r2, r3 - 8004d7c: 211d movs r1, #29 - 8004d7e: 4803 ldr r0, [pc, #12] ; (8004d8c ) - 8004d80: f7fc fe72 bl 8001a68 -#endif /* LWIP_ARP || LWIP_ETHERNET */ - -/* USER CODE BEGIN LOW_LEVEL_INIT */ - -/* USER CODE END LOW_LEVEL_INIT */ -} - 8004d84: bf00 nop - 8004d86: 3718 adds r7, #24 - 8004d88: 46bd mov sp, r7 - 8004d8a: bd80 pop {r7, pc} - 8004d8c: 200037a0 .word 0x200037a0 - 8004d90: 40028000 .word 0x40028000 - 8004d94: 20001fd0 .word 0x20001fd0 - 8004d98: 20000780 .word 0x20000780 - 8004d9c: 20000800 .word 0x20000800 - 8004da0: 20000700 .word 0x20000700 - -08004da4 : - * to become available since the stack doesn't retry to send a packet - * dropped because of memory failure (except for the TCP timers). - */ - -static err_t low_level_output(struct netif *netif, struct pbuf *p) -{ - 8004da4: b580 push {r7, lr} - 8004da6: b08a sub sp, #40 ; 0x28 - 8004da8: af00 add r7, sp, #0 - 8004daa: 6078 str r0, [r7, #4] - 8004dac: 6039 str r1, [r7, #0] - err_t errval; - struct pbuf *q; - uint8_t *buffer = (uint8_t *)(heth.TxDesc->Buffer1Addr); - 8004dae: 4b4b ldr r3, [pc, #300] ; (8004edc ) - 8004db0: 6adb ldr r3, [r3, #44] ; 0x2c - 8004db2: 689b ldr r3, [r3, #8] - 8004db4: 61fb str r3, [r7, #28] - __IO ETH_DMADescTypeDef *DmaTxDesc; - uint32_t framelength = 0; - 8004db6: 2300 movs r3, #0 - 8004db8: 617b str r3, [r7, #20] - uint32_t bufferoffset = 0; - 8004dba: 2300 movs r3, #0 - 8004dbc: 613b str r3, [r7, #16] - uint32_t byteslefttocopy = 0; - 8004dbe: 2300 movs r3, #0 - 8004dc0: 60fb str r3, [r7, #12] - uint32_t payloadoffset = 0; - 8004dc2: 2300 movs r3, #0 - 8004dc4: 60bb str r3, [r7, #8] - DmaTxDesc = heth.TxDesc; - 8004dc6: 4b45 ldr r3, [pc, #276] ; (8004edc ) - 8004dc8: 6adb ldr r3, [r3, #44] ; 0x2c - 8004dca: 61bb str r3, [r7, #24] - bufferoffset = 0; - 8004dcc: 2300 movs r3, #0 - 8004dce: 613b str r3, [r7, #16] - - /* copy frame from pbufs to driver buffers */ - for(q = p; q != NULL; q = q->next) - 8004dd0: 683b ldr r3, [r7, #0] - 8004dd2: 623b str r3, [r7, #32] - 8004dd4: e05a b.n 8004e8c - { - /* Is this buffer available? If not, goto error */ - if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) - 8004dd6: 69bb ldr r3, [r7, #24] - 8004dd8: 681b ldr r3, [r3, #0] - 8004dda: 2b00 cmp r3, #0 - 8004ddc: da03 bge.n 8004de6 - { - errval = ERR_USE; - 8004dde: 23f8 movs r3, #248 ; 0xf8 - 8004de0: f887 3027 strb.w r3, [r7, #39] ; 0x27 - goto error; - 8004de4: e05c b.n 8004ea0 - } - - /* Get bytes in current lwIP buffer */ - byteslefttocopy = q->len; - 8004de6: 6a3b ldr r3, [r7, #32] - 8004de8: 895b ldrh r3, [r3, #10] - 8004dea: 60fb str r3, [r7, #12] - payloadoffset = 0; - 8004dec: 2300 movs r3, #0 - 8004dee: 60bb str r3, [r7, #8] - - /* Check if the length of data to copy is bigger than Tx buffer size*/ - while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE ) - 8004df0: e02f b.n 8004e52 - { - /* Copy data to Tx buffer*/ - memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), (ETH_TX_BUF_SIZE - bufferoffset) ); - 8004df2: 69fa ldr r2, [r7, #28] - 8004df4: 693b ldr r3, [r7, #16] - 8004df6: 18d0 adds r0, r2, r3 - 8004df8: 6a3b ldr r3, [r7, #32] - 8004dfa: 685a ldr r2, [r3, #4] - 8004dfc: 68bb ldr r3, [r7, #8] - 8004dfe: 18d1 adds r1, r2, r3 - 8004e00: 693b ldr r3, [r7, #16] - 8004e02: f5c3 63be rsb r3, r3, #1520 ; 0x5f0 - 8004e06: 3304 adds r3, #4 - 8004e08: 461a mov r2, r3 - 8004e0a: f00a ffc9 bl 800fda0 - - /* Point to next descriptor */ - DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr); - 8004e0e: 69bb ldr r3, [r7, #24] - 8004e10: 68db ldr r3, [r3, #12] - 8004e12: 61bb str r3, [r7, #24] - - /* Check if the buffer is available */ - if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) - 8004e14: 69bb ldr r3, [r7, #24] - 8004e16: 681b ldr r3, [r3, #0] - 8004e18: 2b00 cmp r3, #0 - 8004e1a: da03 bge.n 8004e24 - { - errval = ERR_USE; - 8004e1c: 23f8 movs r3, #248 ; 0xf8 - 8004e1e: f887 3027 strb.w r3, [r7, #39] ; 0x27 - goto error; - 8004e22: e03d b.n 8004ea0 - } - - buffer = (uint8_t *)(DmaTxDesc->Buffer1Addr); - 8004e24: 69bb ldr r3, [r7, #24] - 8004e26: 689b ldr r3, [r3, #8] - 8004e28: 61fb str r3, [r7, #28] - - byteslefttocopy = byteslefttocopy - (ETH_TX_BUF_SIZE - bufferoffset); - 8004e2a: 693a ldr r2, [r7, #16] - 8004e2c: 68fb ldr r3, [r7, #12] - 8004e2e: 4413 add r3, r2 - 8004e30: f2a3 53f4 subw r3, r3, #1524 ; 0x5f4 - 8004e34: 60fb str r3, [r7, #12] - payloadoffset = payloadoffset + (ETH_TX_BUF_SIZE - bufferoffset); - 8004e36: 68ba ldr r2, [r7, #8] - 8004e38: 693b ldr r3, [r7, #16] - 8004e3a: 1ad3 subs r3, r2, r3 - 8004e3c: f203 53f4 addw r3, r3, #1524 ; 0x5f4 - 8004e40: 60bb str r3, [r7, #8] - framelength = framelength + (ETH_TX_BUF_SIZE - bufferoffset); - 8004e42: 697a ldr r2, [r7, #20] - 8004e44: 693b ldr r3, [r7, #16] - 8004e46: 1ad3 subs r3, r2, r3 - 8004e48: f203 53f4 addw r3, r3, #1524 ; 0x5f4 - 8004e4c: 617b str r3, [r7, #20] - bufferoffset = 0; - 8004e4e: 2300 movs r3, #0 - 8004e50: 613b str r3, [r7, #16] - while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE ) - 8004e52: 68fa ldr r2, [r7, #12] - 8004e54: 693b ldr r3, [r7, #16] - 8004e56: 4413 add r3, r2 - 8004e58: f240 52f4 movw r2, #1524 ; 0x5f4 - 8004e5c: 4293 cmp r3, r2 - 8004e5e: d8c8 bhi.n 8004df2 - } - - /* Copy the remaining bytes */ - memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), byteslefttocopy ); - 8004e60: 69fa ldr r2, [r7, #28] - 8004e62: 693b ldr r3, [r7, #16] - 8004e64: 18d0 adds r0, r2, r3 - 8004e66: 6a3b ldr r3, [r7, #32] - 8004e68: 685a ldr r2, [r3, #4] - 8004e6a: 68bb ldr r3, [r7, #8] - 8004e6c: 4413 add r3, r2 - 8004e6e: 68fa ldr r2, [r7, #12] - 8004e70: 4619 mov r1, r3 - 8004e72: f00a ff95 bl 800fda0 - bufferoffset = bufferoffset + byteslefttocopy; - 8004e76: 693a ldr r2, [r7, #16] - 8004e78: 68fb ldr r3, [r7, #12] - 8004e7a: 4413 add r3, r2 - 8004e7c: 613b str r3, [r7, #16] - framelength = framelength + byteslefttocopy; - 8004e7e: 697a ldr r2, [r7, #20] - 8004e80: 68fb ldr r3, [r7, #12] - 8004e82: 4413 add r3, r2 - 8004e84: 617b str r3, [r7, #20] - for(q = p; q != NULL; q = q->next) - 8004e86: 6a3b ldr r3, [r7, #32] - 8004e88: 681b ldr r3, [r3, #0] - 8004e8a: 623b str r3, [r7, #32] - 8004e8c: 6a3b ldr r3, [r7, #32] - 8004e8e: 2b00 cmp r3, #0 - 8004e90: d1a1 bne.n 8004dd6 - } - - /* Prepare transmit descriptors to give to DMA */ - HAL_ETH_TransmitFrame(&heth, framelength); - 8004e92: 6979 ldr r1, [r7, #20] - 8004e94: 4811 ldr r0, [pc, #68] ; (8004edc ) - 8004e96: f7fc fcff bl 8001898 - - errval = ERR_OK; - 8004e9a: 2300 movs r3, #0 - 8004e9c: f887 3027 strb.w r3, [r7, #39] ; 0x27 - -error: - - /* When Transmit Underflow flag is set, clear it and issue a Transmit Poll Demand to resume transmission */ - if ((heth.Instance->DMASR & ETH_DMASR_TUS) != (uint32_t)RESET) - 8004ea0: 4b0e ldr r3, [pc, #56] ; (8004edc ) - 8004ea2: 681b ldr r3, [r3, #0] - 8004ea4: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8004ea8: 695b ldr r3, [r3, #20] - 8004eaa: f003 0320 and.w r3, r3, #32 - 8004eae: 2b00 cmp r3, #0 - 8004eb0: d00d beq.n 8004ece - { - /* Clear TUS ETHERNET DMA flag */ - heth.Instance->DMASR = ETH_DMASR_TUS; - 8004eb2: 4b0a ldr r3, [pc, #40] ; (8004edc ) - 8004eb4: 681b ldr r3, [r3, #0] - 8004eb6: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8004eba: 461a mov r2, r3 - 8004ebc: 2320 movs r3, #32 - 8004ebe: 6153 str r3, [r2, #20] - - /* Resume DMA transmission*/ - heth.Instance->DMATPDR = 0; - 8004ec0: 4b06 ldr r3, [pc, #24] ; (8004edc ) - 8004ec2: 681b ldr r3, [r3, #0] - 8004ec4: f503 5380 add.w r3, r3, #4096 ; 0x1000 - 8004ec8: 461a mov r2, r3 - 8004eca: 2300 movs r3, #0 - 8004ecc: 6053 str r3, [r2, #4] - } - return errval; - 8004ece: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 -} - 8004ed2: 4618 mov r0, r3 - 8004ed4: 3728 adds r7, #40 ; 0x28 - 8004ed6: 46bd mov sp, r7 - 8004ed8: bd80 pop {r7, pc} - 8004eda: bf00 nop - 8004edc: 200037a0 .word 0x200037a0 - -08004ee0 : - * @return ERR_OK if the loopif is initialized - * ERR_MEM if private data couldn't be allocated - * any other err_t on error - */ -err_t ethernetif_init(struct netif *netif) -{ - 8004ee0: b580 push {r7, lr} - 8004ee2: b082 sub sp, #8 - 8004ee4: af00 add r7, sp, #0 - 8004ee6: 6078 str r0, [r7, #4] - LWIP_ASSERT("netif != NULL", (netif != NULL)); - 8004ee8: 687b ldr r3, [r7, #4] - 8004eea: 2b00 cmp r3, #0 - 8004eec: d106 bne.n 8004efc - 8004eee: 4b0e ldr r3, [pc, #56] ; (8004f28 ) - 8004ef0: f44f 7205 mov.w r2, #532 ; 0x214 - 8004ef4: 490d ldr r1, [pc, #52] ; (8004f2c ) - 8004ef6: 480e ldr r0, [pc, #56] ; (8004f30 ) - 8004ef8: f00a fde4 bl 800fac4 -#if LWIP_NETIF_HOSTNAME - /* Initialize interface hostname */ - netif->hostname = "lwip"; -#endif /* LWIP_NETIF_HOSTNAME */ - - netif->name[0] = IFNAME0; - 8004efc: 687b ldr r3, [r7, #4] - 8004efe: 2273 movs r2, #115 ; 0x73 - 8004f00: f883 2034 strb.w r2, [r3, #52] ; 0x34 - netif->name[1] = IFNAME1; - 8004f04: 687b ldr r3, [r7, #4] - 8004f06: 2274 movs r2, #116 ; 0x74 - 8004f08: f883 2035 strb.w r2, [r3, #53] ; 0x35 - * is available...) */ - -#if LWIP_IPV4 -#if LWIP_ARP || LWIP_ETHERNET -#if LWIP_ARP - netif->output = etharp_output; - 8004f0c: 687b ldr r3, [r7, #4] - 8004f0e: 4a09 ldr r2, [pc, #36] ; (8004f34 ) - 8004f10: 615a str r2, [r3, #20] - -#if LWIP_IPV6 - netif->output_ip6 = ethip6_output; -#endif /* LWIP_IPV6 */ - - netif->linkoutput = low_level_output; - 8004f12: 687b ldr r3, [r7, #4] - 8004f14: 4a08 ldr r2, [pc, #32] ; (8004f38 ) - 8004f16: 619a str r2, [r3, #24] - - /* initialize the hardware */ - low_level_init(netif); - 8004f18: 6878 ldr r0, [r7, #4] - 8004f1a: f7ff fe95 bl 8004c48 - - return ERR_OK; - 8004f1e: 2300 movs r3, #0 -} - 8004f20: 4618 mov r0, r3 - 8004f22: 3708 adds r7, #8 - 8004f24: 46bd mov sp, r7 - 8004f26: bd80 pop {r7, pc} - 8004f28: 08010908 .word 0x08010908 - 8004f2c: 08010924 .word 0x08010924 - 8004f30: 08010934 .word 0x08010934 - 8004f34: 0800dcd9 .word 0x0800dcd9 - 8004f38: 08004da5 .word 0x08004da5 - -08004f3c : -* when LWIP_TIMERS == 1 and NO_SYS == 1 -* @param None -* @retval Time -*/ -u32_t sys_now(void) -{ - 8004f3c: b580 push {r7, lr} - 8004f3e: af00 add r7, sp, #0 - return HAL_GetTick(); - 8004f40: f7fc f910 bl 8001164 - 8004f44: 4603 mov r3, r0 -} - 8004f46: 4618 mov r0, r3 - 8004f48: bd80 pop {r7, pc} - ... - -08004f4c : - * to update low level driver configuration. -* @param netif: The network interface - * @retval None - */ -void ethernetif_update_config(struct netif *netif) -{ - 8004f4c: b580 push {r7, lr} - 8004f4e: b084 sub sp, #16 - 8004f50: af00 add r7, sp, #0 - 8004f52: 6078 str r0, [r7, #4] - __IO uint32_t tickstart = 0; - 8004f54: 2300 movs r3, #0 - 8004f56: 60fb str r3, [r7, #12] - uint32_t regvalue = 0; - 8004f58: 2300 movs r3, #0 - 8004f5a: 60bb str r3, [r7, #8] - - if(netif_is_link_up(netif)) - 8004f5c: 687b ldr r3, [r7, #4] - 8004f5e: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8004f62: 089b lsrs r3, r3, #2 - 8004f64: f003 0301 and.w r3, r3, #1 - 8004f68: b2db uxtb r3, r3 - 8004f6a: 2b00 cmp r3, #0 - 8004f6c: d05d beq.n 800502a - { - /* Restart the auto-negotiation */ - if(heth.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) - 8004f6e: 4b34 ldr r3, [pc, #208] ; (8005040 ) - 8004f70: 685b ldr r3, [r3, #4] - 8004f72: 2b00 cmp r3, #0 - 8004f74: d03f beq.n 8004ff6 - { - /* Enable Auto-Negotiation */ - HAL_ETH_WritePHYRegister(&heth, PHY_BCR, PHY_AUTONEGOTIATION); - 8004f76: f44f 5280 mov.w r2, #4096 ; 0x1000 - 8004f7a: 2100 movs r1, #0 - 8004f7c: 4830 ldr r0, [pc, #192] ; (8005040 ) - 8004f7e: f7fc fddb bl 8001b38 - - /* Get tick */ - tickstart = HAL_GetTick(); - 8004f82: f7fc f8ef bl 8001164 - 8004f86: 4603 mov r3, r0 - 8004f88: 60fb str r3, [r7, #12] - - /* Wait until the auto-negotiation will be completed */ - do - { - HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, ®value); - 8004f8a: f107 0308 add.w r3, r7, #8 - 8004f8e: 461a mov r2, r3 - 8004f90: 2101 movs r1, #1 - 8004f92: 482b ldr r0, [pc, #172] ; (8005040 ) - 8004f94: f7fc fd68 bl 8001a68 - - /* Check for the Timeout ( 1s ) */ - if((HAL_GetTick() - tickstart ) > 1000) - 8004f98: f7fc f8e4 bl 8001164 - 8004f9c: 4602 mov r2, r0 - 8004f9e: 68fb ldr r3, [r7, #12] - 8004fa0: 1ad3 subs r3, r2, r3 - 8004fa2: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8 - 8004fa6: d828 bhi.n 8004ffa - { - /* In case of timeout */ - goto error; - } - } while (((regvalue & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE)); - 8004fa8: 68bb ldr r3, [r7, #8] - 8004faa: f003 0320 and.w r3, r3, #32 - 8004fae: 2b00 cmp r3, #0 - 8004fb0: d0eb beq.n 8004f8a - - /* Read the result of the auto-negotiation */ - HAL_ETH_ReadPHYRegister(&heth, PHY_SR, ®value); - 8004fb2: f107 0308 add.w r3, r7, #8 - 8004fb6: 461a mov r2, r3 - 8004fb8: 2110 movs r1, #16 - 8004fba: 4821 ldr r0, [pc, #132] ; (8005040 ) - 8004fbc: f7fc fd54 bl 8001a68 - - /* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */ - if((regvalue & PHY_DUPLEX_STATUS) != (uint32_t)RESET) - 8004fc0: 68bb ldr r3, [r7, #8] - 8004fc2: f003 0304 and.w r3, r3, #4 - 8004fc6: 2b00 cmp r3, #0 - 8004fc8: d004 beq.n 8004fd4 - { - /* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */ - heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - 8004fca: 4b1d ldr r3, [pc, #116] ; (8005040 ) - 8004fcc: f44f 6200 mov.w r2, #2048 ; 0x800 - 8004fd0: 60da str r2, [r3, #12] - 8004fd2: e002 b.n 8004fda - } - else - { - /* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */ - heth.Init.DuplexMode = ETH_MODE_HALFDUPLEX; - 8004fd4: 4b1a ldr r3, [pc, #104] ; (8005040 ) - 8004fd6: 2200 movs r2, #0 - 8004fd8: 60da str r2, [r3, #12] - } - /* Configure the MAC with the speed fixed by the auto-negotiation process */ - if(regvalue & PHY_SPEED_STATUS) - 8004fda: 68bb ldr r3, [r7, #8] - 8004fdc: f003 0302 and.w r3, r3, #2 - 8004fe0: 2b00 cmp r3, #0 - 8004fe2: d003 beq.n 8004fec - { - /* Set Ethernet speed to 10M following the auto-negotiation */ - heth.Init.Speed = ETH_SPEED_10M; - 8004fe4: 4b16 ldr r3, [pc, #88] ; (8005040 ) - 8004fe6: 2200 movs r2, #0 - 8004fe8: 609a str r2, [r3, #8] - 8004fea: e016 b.n 800501a - } - else - { - /* Set Ethernet speed to 100M following the auto-negotiation */ - heth.Init.Speed = ETH_SPEED_100M; - 8004fec: 4b14 ldr r3, [pc, #80] ; (8005040 ) - 8004fee: f44f 4280 mov.w r2, #16384 ; 0x4000 - 8004ff2: 609a str r2, [r3, #8] - 8004ff4: e011 b.n 800501a - } - } - else /* AutoNegotiation Disable */ - { - error : - 8004ff6: bf00 nop - 8004ff8: e000 b.n 8004ffc - goto error; - 8004ffa: bf00 nop - /* Check parameters */ - assert_param(IS_ETH_SPEED(heth.Init.Speed)); - assert_param(IS_ETH_DUPLEX_MODE(heth.Init.DuplexMode)); - - /* Set MAC Speed and Duplex Mode to PHY */ - HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) | - 8004ffc: 4b10 ldr r3, [pc, #64] ; (8005040 ) - 8004ffe: 68db ldr r3, [r3, #12] - 8005000: 08db lsrs r3, r3, #3 - 8005002: b29a uxth r2, r3 - (uint16_t)(heth.Init.Speed >> 1))); - 8005004: 4b0e ldr r3, [pc, #56] ; (8005040 ) - 8005006: 689b ldr r3, [r3, #8] - 8005008: 085b lsrs r3, r3, #1 - 800500a: b29b uxth r3, r3 - HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) | - 800500c: 4313 orrs r3, r2 - 800500e: b29b uxth r3, r3 - 8005010: 461a mov r2, r3 - 8005012: 2100 movs r1, #0 - 8005014: 480a ldr r0, [pc, #40] ; (8005040 ) - 8005016: f7fc fd8f bl 8001b38 - } - - /* ETHERNET MAC Re-Configuration */ - HAL_ETH_ConfigMAC(&heth, (ETH_MACInitTypeDef *) NULL); - 800501a: 2100 movs r1, #0 - 800501c: 4808 ldr r0, [pc, #32] ; (8005040 ) - 800501e: f7fc fe4f bl 8001cc0 - - /* Restart MAC interface */ - HAL_ETH_Start(&heth); - 8005022: 4807 ldr r0, [pc, #28] ; (8005040 ) - 8005024: f7fc fdee bl 8001c04 - 8005028: e002 b.n 8005030 - } - else - { - /* Stop MAC interface */ - HAL_ETH_Stop(&heth); - 800502a: 4805 ldr r0, [pc, #20] ; (8005040 ) - 800502c: f7fc fe19 bl 8001c62 - } - - ethernetif_notify_conn_changed(netif); - 8005030: 6878 ldr r0, [r7, #4] - 8005032: f000 f807 bl 8005044 -} - 8005036: bf00 nop - 8005038: 3710 adds r7, #16 - 800503a: 46bd mov sp, r7 - 800503c: bd80 pop {r7, pc} - 800503e: bf00 nop - 8005040: 200037a0 .word 0x200037a0 - -08005044 : - * @brief This function notify user about link status changement. - * @param netif: the network interface - * @retval None - */ -__weak void ethernetif_notify_conn_changed(struct netif *netif) -{ - 8005044: b480 push {r7} - 8005046: b083 sub sp, #12 - 8005048: af00 add r7, sp, #0 - 800504a: 6078 str r0, [r7, #4] - /* NOTE : This is function could be implemented in user file - when the callback is needed, - */ - -} - 800504c: bf00 nop - 800504e: 370c adds r7, #12 - 8005050: 46bd mov sp, r7 - 8005052: bc80 pop {r7} - 8005054: 4770 bx lr - -08005056 : - * @param n u16_t in host byte order - * @return n in network byte order - */ -u16_t -lwip_htons(u16_t n) -{ - 8005056: b480 push {r7} - 8005058: b083 sub sp, #12 - 800505a: af00 add r7, sp, #0 - 800505c: 4603 mov r3, r0 - 800505e: 80fb strh r3, [r7, #6] - return (u16_t)PP_HTONS(n); - 8005060: 88fb ldrh r3, [r7, #6] - 8005062: ba5b rev16 r3, r3 - 8005064: b29b uxth r3, r3 -} - 8005066: 4618 mov r0, r3 - 8005068: 370c adds r7, #12 - 800506a: 46bd mov sp, r7 - 800506c: bc80 pop {r7} - 800506e: 4770 bx lr - -08005070 : - * @param n u32_t in host byte order - * @return n in network byte order - */ -u32_t -lwip_htonl(u32_t n) -{ - 8005070: b480 push {r7} - 8005072: b083 sub sp, #12 - 8005074: af00 add r7, sp, #0 - 8005076: 6078 str r0, [r7, #4] - return (u32_t)PP_HTONL(n); - 8005078: 687b ldr r3, [r7, #4] - 800507a: 061a lsls r2, r3, #24 - 800507c: 687b ldr r3, [r7, #4] - 800507e: 021b lsls r3, r3, #8 - 8005080: f403 037f and.w r3, r3, #16711680 ; 0xff0000 - 8005084: 431a orrs r2, r3 - 8005086: 687b ldr r3, [r7, #4] - 8005088: 0a1b lsrs r3, r3, #8 - 800508a: f403 437f and.w r3, r3, #65280 ; 0xff00 - 800508e: 431a orrs r2, r3 - 8005090: 687b ldr r3, [r7, #4] - 8005092: 0e1b lsrs r3, r3, #24 - 8005094: 4313 orrs r3, r2 -} - 8005096: 4618 mov r0, r3 - 8005098: 370c adds r7, #12 - 800509a: 46bd mov sp, r7 - 800509c: bc80 pop {r7} - 800509e: 4770 bx lr - -080050a0 : - * Initialize all modules. - * Use this in NO_SYS mode. Use tcpip_init() otherwise. - */ -void -lwip_init(void) -{ - 80050a0: b580 push {r7, lr} - 80050a2: b082 sub sp, #8 - 80050a4: af00 add r7, sp, #0 -#ifndef LWIP_SKIP_CONST_CHECK - int a = 0; - 80050a6: 2300 movs r3, #0 - 80050a8: 607b str r3, [r7, #4] - /* Modules initialization */ - stats_init(); -#if !NO_SYS - sys_init(); -#endif /* !NO_SYS */ - mem_init(); - 80050aa: f000 f8a7 bl 80051fc - memp_init(); - 80050ae: f000 fb37 bl 8005720 - pbuf_init(); - netif_init(); - 80050b2: f000 fbef bl 8005894 -#endif /* LWIP_IPV4 */ -#if LWIP_RAW - raw_init(); -#endif /* LWIP_RAW */ -#if LWIP_UDP - udp_init(); - 80050b6: f005 ffad bl 800b014 -#endif /* LWIP_UDP */ -#if LWIP_TCP - tcp_init(); - 80050ba: f001 fb59 bl 8006770 -#if PPP_SUPPORT - ppp_init(); -#endif - -#if LWIP_TIMERS - sys_timeouts_init(); - 80050be: f005 fedd bl 800ae7c -#endif /* LWIP_TIMERS */ -} - 80050c2: bf00 nop - 80050c4: 3708 adds r7, #8 - 80050c6: 46bd mov sp, r7 - 80050c8: bd80 pop {r7, pc} - ... - -080050cc : - * This assumes access to the heap is protected by the calling function - * already. - */ -static void -plug_holes(struct mem *mem) -{ - 80050cc: b580 push {r7, lr} - 80050ce: b084 sub sp, #16 - 80050d0: af00 add r7, sp, #0 - 80050d2: 6078 str r0, [r7, #4] - struct mem *nmem; - struct mem *pmem; - - LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); - 80050d4: 4b40 ldr r3, [pc, #256] ; (80051d8 ) - 80050d6: 681b ldr r3, [r3, #0] - 80050d8: 687a ldr r2, [r7, #4] - 80050da: 429a cmp r2, r3 - 80050dc: d206 bcs.n 80050ec - 80050de: 4b3f ldr r3, [pc, #252] ; (80051dc ) - 80050e0: f240 125d movw r2, #349 ; 0x15d - 80050e4: 493e ldr r1, [pc, #248] ; (80051e0 ) - 80050e6: 483f ldr r0, [pc, #252] ; (80051e4 ) - 80050e8: f00a fcec bl 800fac4 - LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); - 80050ec: 4b3e ldr r3, [pc, #248] ; (80051e8 ) - 80050ee: 681b ldr r3, [r3, #0] - 80050f0: 687a ldr r2, [r7, #4] - 80050f2: 429a cmp r2, r3 - 80050f4: d306 bcc.n 8005104 - 80050f6: 4b39 ldr r3, [pc, #228] ; (80051dc ) - 80050f8: f44f 72af mov.w r2, #350 ; 0x15e - 80050fc: 493b ldr r1, [pc, #236] ; (80051ec ) - 80050fe: 4839 ldr r0, [pc, #228] ; (80051e4 ) - 8005100: f00a fce0 bl 800fac4 - LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); - 8005104: 687b ldr r3, [r7, #4] - 8005106: 791b ldrb r3, [r3, #4] - 8005108: 2b00 cmp r3, #0 - 800510a: d006 beq.n 800511a - 800510c: 4b33 ldr r3, [pc, #204] ; (80051dc ) - 800510e: f240 125f movw r2, #351 ; 0x15f - 8005112: 4937 ldr r1, [pc, #220] ; (80051f0 ) - 8005114: 4833 ldr r0, [pc, #204] ; (80051e4 ) - 8005116: f00a fcd5 bl 800fac4 - - /* plug hole forward */ - LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); - 800511a: 687b ldr r3, [r7, #4] - 800511c: 881b ldrh r3, [r3, #0] - 800511e: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 - 8005122: d906 bls.n 8005132 - 8005124: 4b2d ldr r3, [pc, #180] ; (80051dc ) - 8005126: f44f 72b1 mov.w r2, #354 ; 0x162 - 800512a: 4932 ldr r1, [pc, #200] ; (80051f4 ) - 800512c: 482d ldr r0, [pc, #180] ; (80051e4 ) - 800512e: f00a fcc9 bl 800fac4 - - nmem = (struct mem *)(void *)&ram[mem->next]; - 8005132: 4b29 ldr r3, [pc, #164] ; (80051d8 ) - 8005134: 681b ldr r3, [r3, #0] - 8005136: 687a ldr r2, [r7, #4] - 8005138: 8812 ldrh r2, [r2, #0] - 800513a: 4413 add r3, r2 - 800513c: 60fb str r3, [r7, #12] - if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { - 800513e: 687a ldr r2, [r7, #4] - 8005140: 68fb ldr r3, [r7, #12] - 8005142: 429a cmp r2, r3 - 8005144: d01f beq.n 8005186 - 8005146: 68fb ldr r3, [r7, #12] - 8005148: 791b ldrb r3, [r3, #4] - 800514a: 2b00 cmp r3, #0 - 800514c: d11b bne.n 8005186 - 800514e: 4b26 ldr r3, [pc, #152] ; (80051e8 ) - 8005150: 681b ldr r3, [r3, #0] - 8005152: 68fa ldr r2, [r7, #12] - 8005154: 429a cmp r2, r3 - 8005156: d016 beq.n 8005186 - /* if mem->next is unused and not end of ram, combine mem and mem->next */ - if (lfree == nmem) { - 8005158: 4b27 ldr r3, [pc, #156] ; (80051f8 ) - 800515a: 681b ldr r3, [r3, #0] - 800515c: 68fa ldr r2, [r7, #12] - 800515e: 429a cmp r2, r3 - 8005160: d102 bne.n 8005168 - lfree = mem; - 8005162: 4a25 ldr r2, [pc, #148] ; (80051f8 ) - 8005164: 687b ldr r3, [r7, #4] - 8005166: 6013 str r3, [r2, #0] - } - mem->next = nmem->next; - 8005168: 68fb ldr r3, [r7, #12] - 800516a: 881a ldrh r2, [r3, #0] - 800516c: 687b ldr r3, [r7, #4] - 800516e: 801a strh r2, [r3, #0] - ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); - 8005170: 4b19 ldr r3, [pc, #100] ; (80051d8 ) - 8005172: 681b ldr r3, [r3, #0] - 8005174: 687a ldr r2, [r7, #4] - 8005176: 1ad1 subs r1, r2, r3 - 8005178: 4b17 ldr r3, [pc, #92] ; (80051d8 ) - 800517a: 681b ldr r3, [r3, #0] - 800517c: 68fa ldr r2, [r7, #12] - 800517e: 8812 ldrh r2, [r2, #0] - 8005180: 4413 add r3, r2 - 8005182: b28a uxth r2, r1 - 8005184: 805a strh r2, [r3, #2] - } - - /* plug hole backward */ - pmem = (struct mem *)(void *)&ram[mem->prev]; - 8005186: 4b14 ldr r3, [pc, #80] ; (80051d8 ) - 8005188: 681b ldr r3, [r3, #0] - 800518a: 687a ldr r2, [r7, #4] - 800518c: 8852 ldrh r2, [r2, #2] - 800518e: 4413 add r3, r2 - 8005190: 60bb str r3, [r7, #8] - if (pmem != mem && pmem->used == 0) { - 8005192: 68ba ldr r2, [r7, #8] - 8005194: 687b ldr r3, [r7, #4] - 8005196: 429a cmp r2, r3 - 8005198: d01a beq.n 80051d0 - 800519a: 68bb ldr r3, [r7, #8] - 800519c: 791b ldrb r3, [r3, #4] - 800519e: 2b00 cmp r3, #0 - 80051a0: d116 bne.n 80051d0 - /* if mem->prev is unused, combine mem and mem->prev */ - if (lfree == mem) { - 80051a2: 4b15 ldr r3, [pc, #84] ; (80051f8 ) - 80051a4: 681b ldr r3, [r3, #0] - 80051a6: 687a ldr r2, [r7, #4] - 80051a8: 429a cmp r2, r3 - 80051aa: d102 bne.n 80051b2 - lfree = pmem; - 80051ac: 4a12 ldr r2, [pc, #72] ; (80051f8 ) - 80051ae: 68bb ldr r3, [r7, #8] - 80051b0: 6013 str r3, [r2, #0] - } - pmem->next = mem->next; - 80051b2: 687b ldr r3, [r7, #4] - 80051b4: 881a ldrh r2, [r3, #0] - 80051b6: 68bb ldr r3, [r7, #8] - 80051b8: 801a strh r2, [r3, #0] - ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); - 80051ba: 4b07 ldr r3, [pc, #28] ; (80051d8 ) - 80051bc: 681b ldr r3, [r3, #0] - 80051be: 68ba ldr r2, [r7, #8] - 80051c0: 1ad1 subs r1, r2, r3 - 80051c2: 4b05 ldr r3, [pc, #20] ; (80051d8 ) - 80051c4: 681b ldr r3, [r3, #0] - 80051c6: 687a ldr r2, [r7, #4] - 80051c8: 8812 ldrh r2, [r2, #0] - 80051ca: 4413 add r3, r2 - 80051cc: b28a uxth r2, r1 - 80051ce: 805a strh r2, [r3, #2] - } -} - 80051d0: bf00 nop - 80051d2: 3710 adds r7, #16 - 80051d4: 46bd mov sp, r7 - 80051d6: bd80 pop {r7, pc} - 80051d8: 20003e54 .word 0x20003e54 - 80051dc: 0801095c .word 0x0801095c - 80051e0: 0801098c .word 0x0801098c - 80051e4: 080109a4 .word 0x080109a4 - 80051e8: 20003e58 .word 0x20003e58 - 80051ec: 080109cc .word 0x080109cc - 80051f0: 080109e8 .word 0x080109e8 - 80051f4: 08010a04 .word 0x08010a04 - 80051f8: 20003e5c .word 0x20003e5c - -080051fc : -/** - * Zero the heap and initialize start, end and lowest-free - */ -void -mem_init(void) -{ - 80051fc: b480 push {r7} - 80051fe: b083 sub sp, #12 - 8005200: af00 add r7, sp, #0 - - LWIP_ASSERT("Sanity check alignment", - (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); - - /* align the heap */ - ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); - 8005202: 4b18 ldr r3, [pc, #96] ; (8005264 ) - 8005204: 3303 adds r3, #3 - 8005206: f023 0303 bic.w r3, r3, #3 - 800520a: 461a mov r2, r3 - 800520c: 4b16 ldr r3, [pc, #88] ; (8005268 ) - 800520e: 601a str r2, [r3, #0] - /* initialize the start of the heap */ - mem = (struct mem *)(void *)ram; - 8005210: 4b15 ldr r3, [pc, #84] ; (8005268 ) - 8005212: 681b ldr r3, [r3, #0] - 8005214: 607b str r3, [r7, #4] - mem->next = MEM_SIZE_ALIGNED; - 8005216: 687b ldr r3, [r7, #4] - 8005218: f44f 62c8 mov.w r2, #1600 ; 0x640 - 800521c: 801a strh r2, [r3, #0] - mem->prev = 0; - 800521e: 687b ldr r3, [r7, #4] - 8005220: 2200 movs r2, #0 - 8005222: 805a strh r2, [r3, #2] - mem->used = 0; - 8005224: 687b ldr r3, [r7, #4] - 8005226: 2200 movs r2, #0 - 8005228: 711a strb r2, [r3, #4] - /* initialize the end of the heap */ - ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; - 800522a: 4b0f ldr r3, [pc, #60] ; (8005268 ) - 800522c: 681b ldr r3, [r3, #0] - 800522e: f503 63c8 add.w r3, r3, #1600 ; 0x640 - 8005232: 4a0e ldr r2, [pc, #56] ; (800526c ) - 8005234: 6013 str r3, [r2, #0] - ram_end->used = 1; - 8005236: 4b0d ldr r3, [pc, #52] ; (800526c ) - 8005238: 681b ldr r3, [r3, #0] - 800523a: 2201 movs r2, #1 - 800523c: 711a strb r2, [r3, #4] - ram_end->next = MEM_SIZE_ALIGNED; - 800523e: 4b0b ldr r3, [pc, #44] ; (800526c ) - 8005240: 681b ldr r3, [r3, #0] - 8005242: f44f 62c8 mov.w r2, #1600 ; 0x640 - 8005246: 801a strh r2, [r3, #0] - ram_end->prev = MEM_SIZE_ALIGNED; - 8005248: 4b08 ldr r3, [pc, #32] ; (800526c ) - 800524a: 681b ldr r3, [r3, #0] - 800524c: f44f 62c8 mov.w r2, #1600 ; 0x640 - 8005250: 805a strh r2, [r3, #2] - - /* initialize the lowest-free pointer to the start of the heap */ - lfree = (struct mem *)(void *)ram; - 8005252: 4b05 ldr r3, [pc, #20] ; (8005268 ) - 8005254: 681b ldr r3, [r3, #0] - 8005256: 4a06 ldr r2, [pc, #24] ; (8005270 ) - 8005258: 6013 str r3, [r2, #0] - MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); - - if (sys_mutex_new(&mem_mutex) != ERR_OK) { - LWIP_ASSERT("failed to create mem_mutex", 0); - } -} - 800525a: bf00 nop - 800525c: 370c adds r7, #12 - 800525e: 46bd mov sp, r7 - 8005260: bc80 pop {r7} - 8005262: 4770 bx lr - 8005264: 20003800 .word 0x20003800 - 8005268: 20003e54 .word 0x20003e54 - 800526c: 20003e58 .word 0x20003e58 - 8005270: 20003e5c .word 0x20003e5c - -08005274 : - * @param rmem is the data portion of a struct mem as returned by a previous - * call to mem_malloc() - */ -void -mem_free(void *rmem) -{ - 8005274: b580 push {r7, lr} - 8005276: b084 sub sp, #16 - 8005278: af00 add r7, sp, #0 - 800527a: 6078 str r0, [r7, #4] - struct mem *mem; - LWIP_MEM_FREE_DECL_PROTECT(); - - if (rmem == NULL) { - 800527c: 687b ldr r3, [r7, #4] - 800527e: 2b00 cmp r3, #0 - 8005280: d043 beq.n 800530a - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n")); - return; - } - LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0); - 8005282: 687b ldr r3, [r7, #4] - 8005284: f003 0303 and.w r3, r3, #3 - 8005288: 2b00 cmp r3, #0 - 800528a: d006 beq.n 800529a - 800528c: 4b22 ldr r3, [pc, #136] ; (8005318 ) - 800528e: f44f 72d6 mov.w r2, #428 ; 0x1ac - 8005292: 4922 ldr r1, [pc, #136] ; (800531c ) - 8005294: 4822 ldr r0, [pc, #136] ; (8005320 ) - 8005296: f00a fc15 bl 800fac4 - - LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram && - 800529a: 4b22 ldr r3, [pc, #136] ; (8005324 ) - 800529c: 681b ldr r3, [r3, #0] - 800529e: 687a ldr r2, [r7, #4] - 80052a0: 429a cmp r2, r3 - 80052a2: d304 bcc.n 80052ae - 80052a4: 4b20 ldr r3, [pc, #128] ; (8005328 ) - 80052a6: 681b ldr r3, [r3, #0] - 80052a8: 687a ldr r2, [r7, #4] - 80052aa: 429a cmp r2, r3 - 80052ac: d306 bcc.n 80052bc - 80052ae: 4b1a ldr r3, [pc, #104] ; (8005318 ) - 80052b0: f44f 72d7 mov.w r2, #430 ; 0x1ae - 80052b4: 491d ldr r1, [pc, #116] ; (800532c ) - 80052b6: 481a ldr r0, [pc, #104] ; (8005320 ) - 80052b8: f00a fc04 bl 800fac4 - (u8_t *)rmem < (u8_t *)ram_end); - - if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { - 80052bc: 4b19 ldr r3, [pc, #100] ; (8005324 ) - 80052be: 681b ldr r3, [r3, #0] - 80052c0: 687a ldr r2, [r7, #4] - 80052c2: 429a cmp r2, r3 - 80052c4: d323 bcc.n 800530e - 80052c6: 4b18 ldr r3, [pc, #96] ; (8005328 ) - 80052c8: 681b ldr r3, [r3, #0] - 80052ca: 687a ldr r2, [r7, #4] - 80052cc: 429a cmp r2, r3 - 80052ce: d21e bcs.n 800530e - } - /* protect the heap from concurrent access */ - LWIP_MEM_FREE_PROTECT(); - /* Get the corresponding struct mem ... */ - /* cast through void* to get rid of alignment warnings */ - mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); - 80052d0: 687b ldr r3, [r7, #4] - 80052d2: 3b08 subs r3, #8 - 80052d4: 60fb str r3, [r7, #12] - /* ... which has to be in a used state ... */ - LWIP_ASSERT("mem_free: mem->used", mem->used); - 80052d6: 68fb ldr r3, [r7, #12] - 80052d8: 791b ldrb r3, [r3, #4] - 80052da: 2b00 cmp r3, #0 - 80052dc: d106 bne.n 80052ec - 80052de: 4b0e ldr r3, [pc, #56] ; (8005318 ) - 80052e0: f44f 72e0 mov.w r2, #448 ; 0x1c0 - 80052e4: 4912 ldr r1, [pc, #72] ; (8005330 ) - 80052e6: 480e ldr r0, [pc, #56] ; (8005320 ) - 80052e8: f00a fbec bl 800fac4 - /* ... and is now unused. */ - mem->used = 0; - 80052ec: 68fb ldr r3, [r7, #12] - 80052ee: 2200 movs r2, #0 - 80052f0: 711a strb r2, [r3, #4] - - if (mem < lfree) { - 80052f2: 4b10 ldr r3, [pc, #64] ; (8005334 ) - 80052f4: 681b ldr r3, [r3, #0] - 80052f6: 68fa ldr r2, [r7, #12] - 80052f8: 429a cmp r2, r3 - 80052fa: d202 bcs.n 8005302 - /* the newly freed struct is now the lowest */ - lfree = mem; - 80052fc: 4a0d ldr r2, [pc, #52] ; (8005334 ) - 80052fe: 68fb ldr r3, [r7, #12] - 8005300: 6013 str r3, [r2, #0] - } - - MEM_STATS_DEC_USED(used, mem->next - (mem_size_t)(((u8_t *)mem - ram))); - - /* finally, see if prev or next are free also */ - plug_holes(mem); - 8005302: 68f8 ldr r0, [r7, #12] - 8005304: f7ff fee2 bl 80050cc - 8005308: e002 b.n 8005310 - return; - 800530a: bf00 nop - 800530c: e000 b.n 8005310 - return; - 800530e: bf00 nop -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - mem_free_count = 1; -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_MEM_FREE_UNPROTECT(); -} - 8005310: 3710 adds r7, #16 - 8005312: 46bd mov sp, r7 - 8005314: bd80 pop {r7, pc} - 8005316: bf00 nop - 8005318: 0801095c .word 0x0801095c - 800531c: 08010a30 .word 0x08010a30 - 8005320: 080109a4 .word 0x080109a4 - 8005324: 20003e54 .word 0x20003e54 - 8005328: 20003e58 .word 0x20003e58 - 800532c: 08010a54 .word 0x08010a54 - 8005330: 08010a6c .word 0x08010a6c - 8005334: 20003e5c .word 0x20003e5c - -08005338 : - * or NULL if newsize is > old size, in which case rmem is NOT touched - * or freed! - */ -void * -mem_trim(void *rmem, mem_size_t newsize) -{ - 8005338: b580 push {r7, lr} - 800533a: b086 sub sp, #24 - 800533c: af00 add r7, sp, #0 - 800533e: 6078 str r0, [r7, #4] - 8005340: 460b mov r3, r1 - 8005342: 807b strh r3, [r7, #2] - /* 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 = LWIP_MEM_ALIGN_SIZE(newsize); - 8005344: 887b ldrh r3, [r7, #2] - 8005346: 3303 adds r3, #3 - 8005348: b29b uxth r3, r3 - 800534a: f023 0303 bic.w r3, r3, #3 - 800534e: 807b strh r3, [r7, #2] - - if (newsize < MIN_SIZE_ALIGNED) { - 8005350: 887b ldrh r3, [r7, #2] - 8005352: 2b0b cmp r3, #11 - 8005354: d801 bhi.n 800535a - /* every data block must be at least MIN_SIZE_ALIGNED long */ - newsize = MIN_SIZE_ALIGNED; - 8005356: 230c movs r3, #12 - 8005358: 807b strh r3, [r7, #2] - } - - if (newsize > MEM_SIZE_ALIGNED) { - 800535a: 887b ldrh r3, [r7, #2] - 800535c: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 - 8005360: d901 bls.n 8005366 - return NULL; - 8005362: 2300 movs r3, #0 - 8005364: e0b1 b.n 80054ca - } - - LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && - 8005366: 4b5b ldr r3, [pc, #364] ; (80054d4 ) - 8005368: 681b ldr r3, [r3, #0] - 800536a: 687a ldr r2, [r7, #4] - 800536c: 429a cmp r2, r3 - 800536e: d304 bcc.n 800537a - 8005370: 4b59 ldr r3, [pc, #356] ; (80054d8 ) - 8005372: 681b ldr r3, [r3, #0] - 8005374: 687a ldr r2, [r7, #4] - 8005376: 429a cmp r2, r3 - 8005378: d306 bcc.n 8005388 - 800537a: 4b58 ldr r3, [pc, #352] ; (80054dc ) - 800537c: f240 12f3 movw r2, #499 ; 0x1f3 - 8005380: 4957 ldr r1, [pc, #348] ; (80054e0 ) - 8005382: 4858 ldr r0, [pc, #352] ; (80054e4 ) - 8005384: f00a fb9e bl 800fac4 - (u8_t *)rmem < (u8_t *)ram_end); - - if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { - 8005388: 4b52 ldr r3, [pc, #328] ; (80054d4 ) - 800538a: 681b ldr r3, [r3, #0] - 800538c: 687a ldr r2, [r7, #4] - 800538e: 429a cmp r2, r3 - 8005390: d304 bcc.n 800539c - 8005392: 4b51 ldr r3, [pc, #324] ; (80054d8 ) - 8005394: 681b ldr r3, [r3, #0] - 8005396: 687a ldr r2, [r7, #4] - 8005398: 429a cmp r2, r3 - 800539a: d301 bcc.n 80053a0 - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); - /* protect mem stats from concurrent access */ - SYS_ARCH_PROTECT(lev); - MEM_STATS_INC(illegal); - SYS_ARCH_UNPROTECT(lev); - return rmem; - 800539c: 687b ldr r3, [r7, #4] - 800539e: e094 b.n 80054ca - } - /* Get the corresponding struct mem ... */ - /* cast through void* to get rid of alignment warnings */ - mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); - 80053a0: 687b ldr r3, [r7, #4] - 80053a2: 3b08 subs r3, #8 - 80053a4: 617b str r3, [r7, #20] - /* ... and its offset pointer */ - ptr = (mem_size_t)((u8_t *)mem - ram); - 80053a6: 4b4b ldr r3, [pc, #300] ; (80054d4 ) - 80053a8: 681b ldr r3, [r3, #0] - 80053aa: 697a ldr r2, [r7, #20] - 80053ac: 1ad3 subs r3, r2, r3 - 80053ae: 827b strh r3, [r7, #18] - - size = mem->next - ptr - SIZEOF_STRUCT_MEM; - 80053b0: 697b ldr r3, [r7, #20] - 80053b2: 881a ldrh r2, [r3, #0] - 80053b4: 8a7b ldrh r3, [r7, #18] - 80053b6: 1ad3 subs r3, r2, r3 - 80053b8: b29b uxth r3, r3 - 80053ba: 3b08 subs r3, #8 - 80053bc: 823b strh r3, [r7, #16] - LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); - 80053be: 887a ldrh r2, [r7, #2] - 80053c0: 8a3b ldrh r3, [r7, #16] - 80053c2: 429a cmp r2, r3 - 80053c4: d906 bls.n 80053d4 - 80053c6: 4b45 ldr r3, [pc, #276] ; (80054dc ) - 80053c8: f240 2206 movw r2, #518 ; 0x206 - 80053cc: 4946 ldr r1, [pc, #280] ; (80054e8 ) - 80053ce: 4845 ldr r0, [pc, #276] ; (80054e4 ) - 80053d0: f00a fb78 bl 800fac4 - if (newsize > size) { - 80053d4: 887a ldrh r2, [r7, #2] - 80053d6: 8a3b ldrh r3, [r7, #16] - 80053d8: 429a cmp r2, r3 - 80053da: d901 bls.n 80053e0 - /* not supported */ - return NULL; - 80053dc: 2300 movs r3, #0 - 80053de: e074 b.n 80054ca - } - if (newsize == size) { - 80053e0: 887a ldrh r2, [r7, #2] - 80053e2: 8a3b ldrh r3, [r7, #16] - 80053e4: 429a cmp r2, r3 - 80053e6: d101 bne.n 80053ec - /* No change in size, simply return */ - return rmem; - 80053e8: 687b ldr r3, [r7, #4] - 80053ea: e06e b.n 80054ca - } - - /* protect the heap from concurrent access */ - LWIP_MEM_FREE_PROTECT(); - - mem2 = (struct mem *)(void *)&ram[mem->next]; - 80053ec: 4b39 ldr r3, [pc, #228] ; (80054d4 ) - 80053ee: 681b ldr r3, [r3, #0] - 80053f0: 697a ldr r2, [r7, #20] - 80053f2: 8812 ldrh r2, [r2, #0] - 80053f4: 4413 add r3, r2 - 80053f6: 60fb str r3, [r7, #12] - if (mem2->used == 0) { - 80053f8: 68fb ldr r3, [r7, #12] - 80053fa: 791b ldrb r3, [r3, #4] - 80053fc: 2b00 cmp r3, #0 - 80053fe: d131 bne.n 8005464 - /* The next struct is unused, we can simply move it at little */ - mem_size_t next; - /* remember the old next pointer */ - next = mem2->next; - 8005400: 68fb ldr r3, [r7, #12] - 8005402: 881b ldrh r3, [r3, #0] - 8005404: 813b strh r3, [r7, #8] - /* create new struct mem which is moved directly after the shrinked mem */ - ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; - 8005406: 8a7a ldrh r2, [r7, #18] - 8005408: 887b ldrh r3, [r7, #2] - 800540a: 4413 add r3, r2 - 800540c: b29b uxth r3, r3 - 800540e: 3308 adds r3, #8 - 8005410: 817b strh r3, [r7, #10] - if (lfree == mem2) { - 8005412: 4b36 ldr r3, [pc, #216] ; (80054ec ) - 8005414: 681b ldr r3, [r3, #0] - 8005416: 68fa ldr r2, [r7, #12] - 8005418: 429a cmp r2, r3 - 800541a: d105 bne.n 8005428 - lfree = (struct mem *)(void *)&ram[ptr2]; - 800541c: 4b2d ldr r3, [pc, #180] ; (80054d4 ) - 800541e: 681a ldr r2, [r3, #0] - 8005420: 897b ldrh r3, [r7, #10] - 8005422: 4413 add r3, r2 - 8005424: 4a31 ldr r2, [pc, #196] ; (80054ec ) - 8005426: 6013 str r3, [r2, #0] - } - mem2 = (struct mem *)(void *)&ram[ptr2]; - 8005428: 4b2a ldr r3, [pc, #168] ; (80054d4 ) - 800542a: 681a ldr r2, [r3, #0] - 800542c: 897b ldrh r3, [r7, #10] - 800542e: 4413 add r3, r2 - 8005430: 60fb str r3, [r7, #12] - mem2->used = 0; - 8005432: 68fb ldr r3, [r7, #12] - 8005434: 2200 movs r2, #0 - 8005436: 711a strb r2, [r3, #4] - /* restore the next pointer */ - mem2->next = next; - 8005438: 68fb ldr r3, [r7, #12] - 800543a: 893a ldrh r2, [r7, #8] - 800543c: 801a strh r2, [r3, #0] - /* link it back to mem */ - mem2->prev = ptr; - 800543e: 68fb ldr r3, [r7, #12] - 8005440: 8a7a ldrh r2, [r7, #18] - 8005442: 805a strh r2, [r3, #2] - /* link mem to it */ - mem->next = ptr2; - 8005444: 697b ldr r3, [r7, #20] - 8005446: 897a ldrh r2, [r7, #10] - 8005448: 801a strh r2, [r3, #0] - /* 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) { - 800544a: 68fb ldr r3, [r7, #12] - 800544c: 881b ldrh r3, [r3, #0] - 800544e: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 - 8005452: d039 beq.n 80054c8 - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; - 8005454: 4b1f ldr r3, [pc, #124] ; (80054d4 ) - 8005456: 681b ldr r3, [r3, #0] - 8005458: 68fa ldr r2, [r7, #12] - 800545a: 8812 ldrh r2, [r2, #0] - 800545c: 4413 add r3, r2 - 800545e: 897a ldrh r2, [r7, #10] - 8005460: 805a strh r2, [r3, #2] - 8005462: e031 b.n 80054c8 - } - MEM_STATS_DEC_USED(used, (size - newsize)); - /* no need to plug holes, we've already done that */ - } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) { - 8005464: 887b ldrh r3, [r7, #2] - 8005466: f103 0214 add.w r2, r3, #20 - 800546a: 8a3b ldrh r3, [r7, #16] - 800546c: 429a cmp r2, r3 - 800546e: d82b bhi.n 80054c8 - * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem - * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). - * @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 = ptr + SIZEOF_STRUCT_MEM + newsize; - 8005470: 8a7a ldrh r2, [r7, #18] - 8005472: 887b ldrh r3, [r7, #2] - 8005474: 4413 add r3, r2 - 8005476: b29b uxth r3, r3 - 8005478: 3308 adds r3, #8 - 800547a: 817b strh r3, [r7, #10] - mem2 = (struct mem *)(void *)&ram[ptr2]; - 800547c: 4b15 ldr r3, [pc, #84] ; (80054d4 ) - 800547e: 681a ldr r2, [r3, #0] - 8005480: 897b ldrh r3, [r7, #10] - 8005482: 4413 add r3, r2 - 8005484: 60fb str r3, [r7, #12] - if (mem2 < lfree) { - 8005486: 4b19 ldr r3, [pc, #100] ; (80054ec ) - 8005488: 681b ldr r3, [r3, #0] - 800548a: 68fa ldr r2, [r7, #12] - 800548c: 429a cmp r2, r3 - 800548e: d202 bcs.n 8005496 - lfree = mem2; - 8005490: 4a16 ldr r2, [pc, #88] ; (80054ec ) - 8005492: 68fb ldr r3, [r7, #12] - 8005494: 6013 str r3, [r2, #0] - } - mem2->used = 0; - 8005496: 68fb ldr r3, [r7, #12] - 8005498: 2200 movs r2, #0 - 800549a: 711a strb r2, [r3, #4] - mem2->next = mem->next; - 800549c: 697b ldr r3, [r7, #20] - 800549e: 881a ldrh r2, [r3, #0] - 80054a0: 68fb ldr r3, [r7, #12] - 80054a2: 801a strh r2, [r3, #0] - mem2->prev = ptr; - 80054a4: 68fb ldr r3, [r7, #12] - 80054a6: 8a7a ldrh r2, [r7, #18] - 80054a8: 805a strh r2, [r3, #2] - mem->next = ptr2; - 80054aa: 697b ldr r3, [r7, #20] - 80054ac: 897a ldrh r2, [r7, #10] - 80054ae: 801a strh r2, [r3, #0] - if (mem2->next != MEM_SIZE_ALIGNED) { - 80054b0: 68fb ldr r3, [r7, #12] - 80054b2: 881b ldrh r3, [r3, #0] - 80054b4: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 - 80054b8: d006 beq.n 80054c8 - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; - 80054ba: 4b06 ldr r3, [pc, #24] ; (80054d4 ) - 80054bc: 681b ldr r3, [r3, #0] - 80054be: 68fa ldr r2, [r7, #12] - 80054c0: 8812 ldrh r2, [r2, #0] - 80054c2: 4413 add r3, r2 - 80054c4: 897a ldrh r2, [r7, #10] - 80054c6: 805a strh r2, [r3, #2] - } */ -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - mem_free_count = 1; -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_MEM_FREE_UNPROTECT(); - return rmem; - 80054c8: 687b ldr r3, [r7, #4] -} - 80054ca: 4618 mov r0, r3 - 80054cc: 3718 adds r7, #24 - 80054ce: 46bd mov sp, r7 - 80054d0: bd80 pop {r7, pc} - 80054d2: bf00 nop - 80054d4: 20003e54 .word 0x20003e54 - 80054d8: 20003e58 .word 0x20003e58 - 80054dc: 0801095c .word 0x0801095c - 80054e0: 08010a80 .word 0x08010a80 - 80054e4: 080109a4 .word 0x080109a4 - 80054e8: 08010a98 .word 0x08010a98 - 80054ec: 20003e5c .word 0x20003e5c - -080054f0 : - * - * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). - */ -void * -mem_malloc(mem_size_t size) -{ - 80054f0: b580 push {r7, lr} - 80054f2: b088 sub sp, #32 - 80054f4: af00 add r7, sp, #0 - 80054f6: 4603 mov r3, r0 - 80054f8: 80fb strh r3, [r7, #6] -#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 == 0) { - 80054fa: 88fb ldrh r3, [r7, #6] - 80054fc: 2b00 cmp r3, #0 - 80054fe: d101 bne.n 8005504 - return NULL; - 8005500: 2300 movs r3, #0 - 8005502: e0c7 b.n 8005694 - } - - /* Expand the size of the allocated memory region so that we can - adjust for alignment. */ - size = LWIP_MEM_ALIGN_SIZE(size); - 8005504: 88fb ldrh r3, [r7, #6] - 8005506: 3303 adds r3, #3 - 8005508: b29b uxth r3, r3 - 800550a: f023 0303 bic.w r3, r3, #3 - 800550e: 80fb strh r3, [r7, #6] - - if (size < MIN_SIZE_ALIGNED) { - 8005510: 88fb ldrh r3, [r7, #6] - 8005512: 2b0b cmp r3, #11 - 8005514: d801 bhi.n 800551a - /* every data block must be at least MIN_SIZE_ALIGNED long */ - size = MIN_SIZE_ALIGNED; - 8005516: 230c movs r3, #12 - 8005518: 80fb strh r3, [r7, #6] - } - - if (size > MEM_SIZE_ALIGNED) { - 800551a: 88fb ldrh r3, [r7, #6] - 800551c: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 - 8005520: d901 bls.n 8005526 - return NULL; - 8005522: 2300 movs r3, #0 - 8005524: e0b6 b.n 8005694 -#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_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; - 8005526: 4b5d ldr r3, [pc, #372] ; (800569c ) - 8005528: 681a ldr r2, [r3, #0] - 800552a: 4b5d ldr r3, [pc, #372] ; (80056a0 ) - 800552c: 681b ldr r3, [r3, #0] - 800552e: 1ad3 subs r3, r2, r3 - 8005530: 83fb strh r3, [r7, #30] - 8005532: e0a7 b.n 8005684 - ptr = ((struct mem *)(void *)&ram[ptr])->next) { - mem = (struct mem *)(void *)&ram[ptr]; - 8005534: 4b5a ldr r3, [pc, #360] ; (80056a0 ) - 8005536: 681a ldr r2, [r3, #0] - 8005538: 8bfb ldrh r3, [r7, #30] - 800553a: 4413 add r3, r2 - 800553c: 617b str r3, [r7, #20] - local_mem_free_count = 1; - break; - } -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - - if ((!mem->used) && - 800553e: 697b ldr r3, [r7, #20] - 8005540: 791b ldrb r3, [r3, #4] - 8005542: 2b00 cmp r3, #0 - 8005544: f040 8098 bne.w 8005678 - (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { - 8005548: 697b ldr r3, [r7, #20] - 800554a: 881b ldrh r3, [r3, #0] - 800554c: 461a mov r2, r3 - 800554e: 8bfb ldrh r3, [r7, #30] - 8005550: 1ad3 subs r3, r2, r3 - 8005552: f1a3 0208 sub.w r2, r3, #8 - 8005556: 88fb ldrh r3, [r7, #6] - if ((!mem->used) && - 8005558: 429a cmp r2, r3 - 800555a: f0c0 808d bcc.w 8005678 - /* mem is not used and at least perfect fit is possible: - * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */ - - if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) { - 800555e: 697b ldr r3, [r7, #20] - 8005560: 881b ldrh r3, [r3, #0] - 8005562: 461a mov r2, r3 - 8005564: 8bfb ldrh r3, [r7, #30] - 8005566: 1ad3 subs r3, r2, r3 - 8005568: f1a3 0208 sub.w r2, r3, #8 - 800556c: 88fb ldrh r3, [r7, #6] - 800556e: 3314 adds r3, #20 - 8005570: 429a cmp r2, r3 - 8005572: d327 bcc.n 80055c4 - * struct mem would fit in but no data between mem2 and mem2->next - * @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 = ptr + SIZEOF_STRUCT_MEM + size; - 8005574: 8bfa ldrh r2, [r7, #30] - 8005576: 88fb ldrh r3, [r7, #6] - 8005578: 4413 add r3, r2 - 800557a: b29b uxth r3, r3 - 800557c: 3308 adds r3, #8 - 800557e: 827b strh r3, [r7, #18] - /* create mem2 struct */ - mem2 = (struct mem *)(void *)&ram[ptr2]; - 8005580: 4b47 ldr r3, [pc, #284] ; (80056a0 ) - 8005582: 681a ldr r2, [r3, #0] - 8005584: 8a7b ldrh r3, [r7, #18] - 8005586: 4413 add r3, r2 - 8005588: 60fb str r3, [r7, #12] - mem2->used = 0; - 800558a: 68fb ldr r3, [r7, #12] - 800558c: 2200 movs r2, #0 - 800558e: 711a strb r2, [r3, #4] - mem2->next = mem->next; - 8005590: 697b ldr r3, [r7, #20] - 8005592: 881a ldrh r2, [r3, #0] - 8005594: 68fb ldr r3, [r7, #12] - 8005596: 801a strh r2, [r3, #0] - mem2->prev = ptr; - 8005598: 68fb ldr r3, [r7, #12] - 800559a: 8bfa ldrh r2, [r7, #30] - 800559c: 805a strh r2, [r3, #2] - /* and insert it between mem and mem->next */ - mem->next = ptr2; - 800559e: 697b ldr r3, [r7, #20] - 80055a0: 8a7a ldrh r2, [r7, #18] - 80055a2: 801a strh r2, [r3, #0] - mem->used = 1; - 80055a4: 697b ldr r3, [r7, #20] - 80055a6: 2201 movs r2, #1 - 80055a8: 711a strb r2, [r3, #4] - - if (mem2->next != MEM_SIZE_ALIGNED) { - 80055aa: 68fb ldr r3, [r7, #12] - 80055ac: 881b ldrh r3, [r3, #0] - 80055ae: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 - 80055b2: d00a beq.n 80055ca - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; - 80055b4: 4b3a ldr r3, [pc, #232] ; (80056a0 ) - 80055b6: 681b ldr r3, [r3, #0] - 80055b8: 68fa ldr r2, [r7, #12] - 80055ba: 8812 ldrh r2, [r2, #0] - 80055bc: 4413 add r3, r2 - 80055be: 8a7a ldrh r2, [r7, #18] - 80055c0: 805a strh r2, [r3, #2] - 80055c2: e002 b.n 80055ca - * 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; - 80055c4: 697b ldr r3, [r7, #20] - 80055c6: 2201 movs r2, #1 - 80055c8: 711a strb r2, [r3, #4] - MEM_STATS_INC_USED(used, mem->next - (mem_size_t)((u8_t *)mem - ram)); - } -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT -mem_malloc_adjust_lfree: -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - if (mem == lfree) { - 80055ca: 4b34 ldr r3, [pc, #208] ; (800569c ) - 80055cc: 681b ldr r3, [r3, #0] - 80055ce: 697a ldr r2, [r7, #20] - 80055d0: 429a cmp r2, r3 - 80055d2: d127 bne.n 8005624 - struct mem *cur = lfree; - 80055d4: 4b31 ldr r3, [pc, #196] ; (800569c ) - 80055d6: 681b ldr r3, [r3, #0] - 80055d8: 61bb str r3, [r7, #24] - /* Find next free block after mem and update lowest free pointer */ - while (cur->used && cur != ram_end) { - 80055da: e005 b.n 80055e8 - /* If mem_free or mem_trim have run, we have to restart since they - could have altered our current struct mem or lfree. */ - goto mem_malloc_adjust_lfree; - } -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - cur = (struct mem *)(void *)&ram[cur->next]; - 80055dc: 4b30 ldr r3, [pc, #192] ; (80056a0 ) - 80055de: 681b ldr r3, [r3, #0] - 80055e0: 69ba ldr r2, [r7, #24] - 80055e2: 8812 ldrh r2, [r2, #0] - 80055e4: 4413 add r3, r2 - 80055e6: 61bb str r3, [r7, #24] - while (cur->used && cur != ram_end) { - 80055e8: 69bb ldr r3, [r7, #24] - 80055ea: 791b ldrb r3, [r3, #4] - 80055ec: 2b00 cmp r3, #0 - 80055ee: d004 beq.n 80055fa - 80055f0: 4b2c ldr r3, [pc, #176] ; (80056a4 ) - 80055f2: 681b ldr r3, [r3, #0] - 80055f4: 69ba ldr r2, [r7, #24] - 80055f6: 429a cmp r2, r3 - 80055f8: d1f0 bne.n 80055dc - } - lfree = cur; - 80055fa: 4a28 ldr r2, [pc, #160] ; (800569c ) - 80055fc: 69bb ldr r3, [r7, #24] - 80055fe: 6013 str r3, [r2, #0] - LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); - 8005600: 4b26 ldr r3, [pc, #152] ; (800569c ) - 8005602: 681a ldr r2, [r3, #0] - 8005604: 4b27 ldr r3, [pc, #156] ; (80056a4 ) - 8005606: 681b ldr r3, [r3, #0] - 8005608: 429a cmp r2, r3 - 800560a: d00b beq.n 8005624 - 800560c: 4b23 ldr r3, [pc, #140] ; (800569c ) - 800560e: 681b ldr r3, [r3, #0] - 8005610: 791b ldrb r3, [r3, #4] - 8005612: 2b00 cmp r3, #0 - 8005614: d006 beq.n 8005624 - 8005616: 4b24 ldr r3, [pc, #144] ; (80056a8 ) - 8005618: f240 22cf movw r2, #719 ; 0x2cf - 800561c: 4923 ldr r1, [pc, #140] ; (80056ac ) - 800561e: 4824 ldr r0, [pc, #144] ; (80056b0 ) - 8005620: f00a fa50 bl 800fac4 - } - LWIP_MEM_ALLOC_UNPROTECT(); - sys_mutex_unlock(&mem_mutex); - LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", - 8005624: 88fa ldrh r2, [r7, #6] - 8005626: 697b ldr r3, [r7, #20] - 8005628: 4413 add r3, r2 - 800562a: 3308 adds r3, #8 - 800562c: 4a1d ldr r2, [pc, #116] ; (80056a4 ) - 800562e: 6812 ldr r2, [r2, #0] - 8005630: 4293 cmp r3, r2 - 8005632: d906 bls.n 8005642 - 8005634: 4b1c ldr r3, [pc, #112] ; (80056a8 ) - 8005636: f240 22d3 movw r2, #723 ; 0x2d3 - 800563a: 491e ldr r1, [pc, #120] ; (80056b4 ) - 800563c: 481c ldr r0, [pc, #112] ; (80056b0 ) - 800563e: f00a fa41 bl 800fac4 - (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); - LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", - 8005642: 697b ldr r3, [r7, #20] - 8005644: f003 0303 and.w r3, r3, #3 - 8005648: 2b00 cmp r3, #0 - 800564a: d006 beq.n 800565a - 800564c: 4b16 ldr r3, [pc, #88] ; (80056a8 ) - 800564e: f240 22d5 movw r2, #725 ; 0x2d5 - 8005652: 4919 ldr r1, [pc, #100] ; (80056b8 ) - 8005654: 4816 ldr r0, [pc, #88] ; (80056b0 ) - 8005656: f00a fa35 bl 800fac4 - ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); - LWIP_ASSERT("mem_malloc: sanity check alignment", - 800565a: 697b ldr r3, [r7, #20] - 800565c: f003 0303 and.w r3, r3, #3 - 8005660: 2b00 cmp r3, #0 - 8005662: d006 beq.n 8005672 - 8005664: 4b10 ldr r3, [pc, #64] ; (80056a8 ) - 8005666: f240 22d7 movw r2, #727 ; 0x2d7 - 800566a: 4914 ldr r1, [pc, #80] ; (80056bc ) - 800566c: 4810 ldr r0, [pc, #64] ; (80056b0 ) - 800566e: f00a fa29 bl 800fac4 - (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0); - - return (u8_t *)mem + SIZEOF_STRUCT_MEM; - 8005672: 697b ldr r3, [r7, #20] - 8005674: 3308 adds r3, #8 - 8005676: e00d b.n 8005694 - ptr = ((struct mem *)(void *)&ram[ptr])->next) { - 8005678: 4b09 ldr r3, [pc, #36] ; (80056a0 ) - 800567a: 681a ldr r2, [r3, #0] - 800567c: 8bfb ldrh r3, [r7, #30] - 800567e: 4413 add r3, r2 - 8005680: 881b ldrh r3, [r3, #0] - 8005682: 83fb strh r3, [r7, #30] - for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; - 8005684: 8bfa ldrh r2, [r7, #30] - 8005686: 88fb ldrh r3, [r7, #6] - 8005688: f5c3 63c8 rsb r3, r3, #1600 ; 0x640 - 800568c: 429a cmp r2, r3 - 800568e: f4ff af51 bcc.w 8005534 -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); - MEM_STATS_INC(err); - LWIP_MEM_ALLOC_UNPROTECT(); - sys_mutex_unlock(&mem_mutex); - return NULL; - 8005692: 2300 movs r3, #0 -} - 8005694: 4618 mov r0, r3 - 8005696: 3720 adds r7, #32 - 8005698: 46bd mov sp, r7 - 800569a: bd80 pop {r7, pc} - 800569c: 20003e5c .word 0x20003e5c - 80056a0: 20003e54 .word 0x20003e54 - 80056a4: 20003e58 .word 0x20003e58 - 80056a8: 0801095c .word 0x0801095c - 80056ac: 08010ab8 .word 0x08010ab8 - 80056b0: 080109a4 .word 0x080109a4 - 80056b4: 08010ad4 .word 0x08010ad4 - 80056b8: 08010b04 .word 0x08010b04 - 80056bc: 08010b34 .word 0x08010b34 - -080056c0 : - * - * @param desc pool to initialize - */ -void -memp_init_pool(const struct memp_desc *desc) -{ - 80056c0: b480 push {r7} - 80056c2: b085 sub sp, #20 - 80056c4: af00 add r7, sp, #0 - 80056c6: 6078 str r0, [r7, #4] - LWIP_UNUSED_ARG(desc); -#else - int i; - struct memp *memp; - - *desc->tab = NULL; - 80056c8: 687b ldr r3, [r7, #4] - 80056ca: 689b ldr r3, [r3, #8] - 80056cc: 2200 movs r2, #0 - 80056ce: 601a str r2, [r3, #0] - memp = (struct memp*)LWIP_MEM_ALIGN(desc->base); - 80056d0: 687b ldr r3, [r7, #4] - 80056d2: 685b ldr r3, [r3, #4] - 80056d4: 3303 adds r3, #3 - 80056d6: f023 0303 bic.w r3, r3, #3 - 80056da: 60bb str r3, [r7, #8] - /* create a linked list of memp elements */ - for (i = 0; i < desc->num; ++i) { - 80056dc: 2300 movs r3, #0 - 80056de: 60fb str r3, [r7, #12] - 80056e0: e011 b.n 8005706 - memp->next = *desc->tab; - 80056e2: 687b ldr r3, [r7, #4] - 80056e4: 689b ldr r3, [r3, #8] - 80056e6: 681a ldr r2, [r3, #0] - 80056e8: 68bb ldr r3, [r7, #8] - 80056ea: 601a str r2, [r3, #0] - *desc->tab = memp; - 80056ec: 687b ldr r3, [r7, #4] - 80056ee: 689b ldr r3, [r3, #8] - 80056f0: 68ba ldr r2, [r7, #8] - 80056f2: 601a str r2, [r3, #0] -#if MEMP_OVERFLOW_CHECK - memp_overflow_init_element(memp, desc); -#endif /* MEMP_OVERFLOW_CHECK */ - /* cast through void* to get rid of alignment warnings */ - memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size - 80056f4: 687b ldr r3, [r7, #4] - 80056f6: 881b ldrh r3, [r3, #0] - 80056f8: 461a mov r2, r3 - 80056fa: 68bb ldr r3, [r7, #8] - 80056fc: 4413 add r3, r2 - 80056fe: 60bb str r3, [r7, #8] - for (i = 0; i < desc->num; ++i) { - 8005700: 68fb ldr r3, [r7, #12] - 8005702: 3301 adds r3, #1 - 8005704: 60fb str r3, [r7, #12] - 8005706: 687b ldr r3, [r7, #4] - 8005708: 885b ldrh r3, [r3, #2] - 800570a: 461a mov r2, r3 - 800570c: 68fb ldr r3, [r7, #12] - 800570e: 4293 cmp r3, r2 - 8005710: dbe7 blt.n 80056e2 -#endif /* !MEMP_MEM_MALLOC */ - -#if MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) - desc->stats->name = desc->desc; -#endif /* MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) */ -} - 8005712: bf00 nop - 8005714: bf00 nop - 8005716: 3714 adds r7, #20 - 8005718: 46bd mov sp, r7 - 800571a: bc80 pop {r7} - 800571c: 4770 bx lr - ... - -08005720 : - * - * Carves out memp_memory into linked lists for each pool-type. - */ -void -memp_init(void) -{ - 8005720: b580 push {r7, lr} - 8005722: b082 sub sp, #8 - 8005724: af00 add r7, sp, #0 - u16_t i; - - /* for every pool: */ - for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { - 8005726: 2300 movs r3, #0 - 8005728: 80fb strh r3, [r7, #6] - 800572a: e009 b.n 8005740 - memp_init_pool(memp_pools[i]); - 800572c: 88fb ldrh r3, [r7, #6] - 800572e: 4a08 ldr r2, [pc, #32] ; (8005750 ) - 8005730: f852 3023 ldr.w r3, [r2, r3, lsl #2] - 8005734: 4618 mov r0, r3 - 8005736: f7ff ffc3 bl 80056c0 - for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { - 800573a: 88fb ldrh r3, [r7, #6] - 800573c: 3301 adds r3, #1 - 800573e: 80fb strh r3, [r7, #6] - 8005740: 88fb ldrh r3, [r7, #6] - 8005742: 2b08 cmp r3, #8 - 8005744: d9f2 bls.n 800572c - -#if MEMP_OVERFLOW_CHECK >= 2 - /* check everything a first time to see if it worked */ - memp_overflow_check_all(); -#endif /* MEMP_OVERFLOW_CHECK >= 2 */ -} - 8005746: bf00 nop - 8005748: bf00 nop - 800574a: 3708 adds r7, #8 - 800574c: 46bd mov sp, r7 - 800574e: bd80 pop {r7, pc} - 8005750: 08012b44 .word 0x08012b44 - -08005754 : -#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 -{ - 8005754: b580 push {r7, lr} - 8005756: b084 sub sp, #16 - 8005758: af00 add r7, sp, #0 - 800575a: 6078 str r0, [r7, #4] - 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); - - memp = *desc->tab; - 800575c: 687b ldr r3, [r7, #4] - 800575e: 689b ldr r3, [r3, #8] - 8005760: 681b ldr r3, [r3, #0] - 8005762: 60fb str r3, [r7, #12] -#endif /* MEMP_MEM_MALLOC */ - - if (memp != NULL) { - 8005764: 68fb ldr r3, [r7, #12] - 8005766: 2b00 cmp r3, #0 - 8005768: d012 beq.n 8005790 -#if MEMP_OVERFLOW_CHECK == 1 - memp_overflow_check_element_overflow(memp, desc); - memp_overflow_check_element_underflow(memp, desc); -#endif /* MEMP_OVERFLOW_CHECK */ - - *desc->tab = memp->next; - 800576a: 687b ldr r3, [r7, #4] - 800576c: 689b ldr r3, [r3, #8] - 800576e: 68fa ldr r2, [r7, #12] - 8005770: 6812 ldr r2, [r2, #0] - 8005772: 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", - 8005774: 68fb ldr r3, [r7, #12] - 8005776: f003 0303 and.w r3, r3, #3 - 800577a: 2b00 cmp r3, #0 - 800577c: d006 beq.n 800578c - 800577e: 4b07 ldr r3, [pc, #28] ; (800579c ) - 8005780: f44f 72a4 mov.w r2, #328 ; 0x148 - 8005784: 4906 ldr r1, [pc, #24] ; (80057a0 ) - 8005786: 4807 ldr r0, [pc, #28] ; (80057a4 ) - 8005788: f00a f99c bl 800fac4 - desc->stats->max = desc->stats->used; - } -#endif - SYS_ARCH_UNPROTECT(old_level); - /* cast through u8_t* to get rid of alignment warnings */ - return ((u8_t*)memp + MEMP_SIZE); - 800578c: 68fb ldr r3, [r7, #12] - 800578e: e000 b.n 8005792 - desc->stats->err++; -#endif - } - - SYS_ARCH_UNPROTECT(old_level); - return NULL; - 8005790: 2300 movs r3, #0 -} - 8005792: 4618 mov r0, r3 - 8005794: 3710 adds r7, #16 - 8005796: 46bd mov sp, r7 - 8005798: bd80 pop {r7, pc} - 800579a: bf00 nop - 800579c: 08010b58 .word 0x08010b58 - 80057a0: 08010b88 .word 0x08010b88 - 80057a4: 08010bac .word 0x08010bac - -080057a8 : -#if !MEMP_OVERFLOW_CHECK -memp_malloc(memp_t type) -#else -memp_malloc_fn(memp_t type, const char* file, const int line) -#endif -{ - 80057a8: b580 push {r7, lr} - 80057aa: b084 sub sp, #16 - 80057ac: af00 add r7, sp, #0 - 80057ae: 4603 mov r3, r0 - 80057b0: 71fb strb r3, [r7, #7] - void *memp; - LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); - 80057b2: 79fb ldrb r3, [r7, #7] - 80057b4: 2b08 cmp r3, #8 - 80057b6: d908 bls.n 80057ca - 80057b8: 4b0a ldr r3, [pc, #40] ; (80057e4 ) - 80057ba: f240 1287 movw r2, #391 ; 0x187 - 80057be: 490a ldr r1, [pc, #40] ; (80057e8 ) - 80057c0: 480a ldr r0, [pc, #40] ; (80057ec ) - 80057c2: f00a f97f bl 800fac4 - 80057c6: 2300 movs r3, #0 - 80057c8: e008 b.n 80057dc -#if MEMP_OVERFLOW_CHECK >= 2 - memp_overflow_check_all(); -#endif /* MEMP_OVERFLOW_CHECK >= 2 */ - -#if !MEMP_OVERFLOW_CHECK - memp = do_memp_malloc_pool(memp_pools[type]); - 80057ca: 79fb ldrb r3, [r7, #7] - 80057cc: 4a08 ldr r2, [pc, #32] ; (80057f0 ) - 80057ce: f852 3023 ldr.w r3, [r2, r3, lsl #2] - 80057d2: 4618 mov r0, r3 - 80057d4: f7ff ffbe bl 8005754 - 80057d8: 60f8 str r0, [r7, #12] -#else - memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); -#endif - - return memp; - 80057da: 68fb ldr r3, [r7, #12] -} - 80057dc: 4618 mov r0, r3 - 80057de: 3710 adds r7, #16 - 80057e0: 46bd mov sp, r7 - 80057e2: bd80 pop {r7, pc} - 80057e4: 08010b58 .word 0x08010b58 - 80057e8: 08010be8 .word 0x08010be8 - 80057ec: 08010bac .word 0x08010bac - 80057f0: 08012b44 .word 0x08012b44 - -080057f4 : - -static void -do_memp_free_pool(const struct memp_desc* desc, void *mem) -{ - 80057f4: b580 push {r7, lr} - 80057f6: b084 sub sp, #16 - 80057f8: af00 add r7, sp, #0 - 80057fa: 6078 str r0, [r7, #4] - 80057fc: 6039 str r1, [r7, #0] - struct memp *memp; - SYS_ARCH_DECL_PROTECT(old_level); - - LWIP_ASSERT("memp_free: mem properly aligned", - 80057fe: 683b ldr r3, [r7, #0] - 8005800: f003 0303 and.w r3, r3, #3 - 8005804: 2b00 cmp r3, #0 - 8005806: d006 beq.n 8005816 - 8005808: 4b0a ldr r3, [pc, #40] ; (8005834 ) - 800580a: f44f 72ce mov.w r2, #412 ; 0x19c - 800580e: 490a ldr r1, [pc, #40] ; (8005838 ) - 8005810: 480a ldr r0, [pc, #40] ; (800583c ) - 8005812: f00a f957 bl 800fac4 - ((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); - 8005816: 683b ldr r3, [r7, #0] - 8005818: 60fb str r3, [r7, #12] -#if MEMP_MEM_MALLOC - LWIP_UNUSED_ARG(desc); - SYS_ARCH_UNPROTECT(old_level); - mem_free(memp); -#else /* MEMP_MEM_MALLOC */ - memp->next = *desc->tab; - 800581a: 687b ldr r3, [r7, #4] - 800581c: 689b ldr r3, [r3, #8] - 800581e: 681a ldr r2, [r3, #0] - 8005820: 68fb ldr r3, [r7, #12] - 8005822: 601a str r2, [r3, #0] - *desc->tab = memp; - 8005824: 687b ldr r3, [r7, #4] - 8005826: 689b ldr r3, [r3, #8] - 8005828: 68fa ldr r2, [r7, #12] - 800582a: 601a str r2, [r3, #0] - LWIP_ASSERT("memp sanity", memp_sanity(desc)); -#endif /* MEMP_SANITY_CHECK */ - - SYS_ARCH_UNPROTECT(old_level); -#endif /* !MEMP_MEM_MALLOC */ -} - 800582c: bf00 nop - 800582e: 3710 adds r7, #16 - 8005830: 46bd mov sp, r7 - 8005832: bd80 pop {r7, pc} - 8005834: 08010b58 .word 0x08010b58 - 8005838: 08010c08 .word 0x08010c08 - 800583c: 08010bac .word 0x08010bac - -08005840 : - * @param type the pool where to put mem - * @param mem the memp element to free - */ -void -memp_free(memp_t type, void *mem) -{ - 8005840: b580 push {r7, lr} - 8005842: b082 sub sp, #8 - 8005844: af00 add r7, sp, #0 - 8005846: 4603 mov r3, r0 - 8005848: 6039 str r1, [r7, #0] - 800584a: 71fb strb r3, [r7, #7] -#ifdef LWIP_HOOK_MEMP_AVAILABLE - struct memp *old_first; -#endif - - LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;); - 800584c: 79fb ldrb r3, [r7, #7] - 800584e: 2b08 cmp r3, #8 - 8005850: d907 bls.n 8005862 - 8005852: 4b0c ldr r3, [pc, #48] ; (8005884 ) - 8005854: f240 12db movw r2, #475 ; 0x1db - 8005858: 490b ldr r1, [pc, #44] ; (8005888 ) - 800585a: 480c ldr r0, [pc, #48] ; (800588c ) - 800585c: f00a f932 bl 800fac4 - 8005860: e00c b.n 800587c - - if (mem == NULL) { - 8005862: 683b ldr r3, [r7, #0] - 8005864: 2b00 cmp r3, #0 - 8005866: d008 beq.n 800587a - -#ifdef LWIP_HOOK_MEMP_AVAILABLE - old_first = *memp_pools[type]->tab; -#endif - - do_memp_free_pool(memp_pools[type], mem); - 8005868: 79fb ldrb r3, [r7, #7] - 800586a: 4a09 ldr r2, [pc, #36] ; (8005890 ) - 800586c: f852 3023 ldr.w r3, [r2, r3, lsl #2] - 8005870: 6839 ldr r1, [r7, #0] - 8005872: 4618 mov r0, r3 - 8005874: f7ff ffbe bl 80057f4 - 8005878: e000 b.n 800587c - return; - 800587a: bf00 nop -#ifdef LWIP_HOOK_MEMP_AVAILABLE - if (old_first == NULL) { - LWIP_HOOK_MEMP_AVAILABLE(type); - } -#endif -} - 800587c: 3708 adds r7, #8 - 800587e: 46bd mov sp, r7 - 8005880: bd80 pop {r7, pc} - 8005882: bf00 nop - 8005884: 08010b58 .word 0x08010b58 - 8005888: 08010c28 .word 0x08010c28 - 800588c: 08010bac .word 0x08010bac - 8005890: 08012b44 .word 0x08012b44 - -08005894 : -} -#endif /* LWIP_HAVE_LOOPIF */ - -void -netif_init(void) -{ - 8005894: b480 push {r7} - 8005896: af00 add r7, sp, #0 - - netif_set_link_up(&loop_netif); - netif_set_up(&loop_netif); - -#endif /* LWIP_HAVE_LOOPIF */ -} - 8005898: bf00 nop - 800589a: 46bd mov sp, r7 - 800589c: bc80 pop {r7} - 800589e: 4770 bx lr - -080058a0 : -netif_add(struct netif *netif, -#if LWIP_IPV4 - const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, -#endif /* LWIP_IPV4 */ - void *state, netif_init_fn init, netif_input_fn input) -{ - 80058a0: b580 push {r7, lr} - 80058a2: b084 sub sp, #16 - 80058a4: af00 add r7, sp, #0 - 80058a6: 60f8 str r0, [r7, #12] - 80058a8: 60b9 str r1, [r7, #8] - 80058aa: 607a str r2, [r7, #4] - 80058ac: 603b str r3, [r7, #0] -#if LWIP_IPV6 - s8_t i; -#endif - - LWIP_ASSERT("No init function given", init != NULL); - 80058ae: 69fb ldr r3, [r7, #28] - 80058b0: 2b00 cmp r3, #0 - 80058b2: d105 bne.n 80058c0 - 80058b4: 4b24 ldr r3, [pc, #144] ; (8005948 ) - 80058b6: 22fb movs r2, #251 ; 0xfb - 80058b8: 4924 ldr r1, [pc, #144] ; (800594c ) - 80058ba: 4825 ldr r0, [pc, #148] ; (8005950 ) - 80058bc: f00a f902 bl 800fac4 - - /* reset new interface configuration state */ -#if LWIP_IPV4 - ip_addr_set_zero_ip4(&netif->ip_addr); - 80058c0: 68fb ldr r3, [r7, #12] - 80058c2: 2200 movs r2, #0 - 80058c4: 605a str r2, [r3, #4] - ip_addr_set_zero_ip4(&netif->netmask); - 80058c6: 68fb ldr r3, [r7, #12] - 80058c8: 2200 movs r2, #0 - 80058ca: 609a str r2, [r3, #8] - ip_addr_set_zero_ip4(&netif->gw); - 80058cc: 68fb ldr r3, [r7, #12] - 80058ce: 2200 movs r2, #0 - 80058d0: 60da str r2, [r3, #12] - netif->ip6_addr_state[i] = IP6_ADDR_INVALID; - } - netif->output_ip6 = netif_null_output_ip6; -#endif /* LWIP_IPV6 */ - NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_ENABLE_ALL); - netif->flags = 0; - 80058d2: 68fb ldr r3, [r7, #12] - 80058d4: 2200 movs r2, #0 - 80058d6: f883 2033 strb.w r2, [r3, #51] ; 0x33 -#ifdef netif_get_client_data - memset(netif->client_data, 0, sizeof(netif->client_data)); - 80058da: 68fb ldr r3, [r7, #12] - 80058dc: 3324 adds r3, #36 ; 0x24 - 80058de: 2204 movs r2, #4 - 80058e0: 2100 movs r1, #0 - 80058e2: 4618 mov r0, r3 - 80058e4: f00a f9e8 bl 800fcb8 -#if LWIP_IPV6_AUTOCONFIG - /* IPv6 address autoconfiguration not enabled by default */ - netif->ip6_autoconfig_enabled = 0; -#endif /* LWIP_IPV6_AUTOCONFIG */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; - 80058e8: 68fb ldr r3, [r7, #12] - 80058ea: 2203 movs r2, #3 - 80058ec: f883 2028 strb.w r2, [r3, #40] ; 0x28 -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ -#if LWIP_NETIF_STATUS_CALLBACK - netif->status_callback = NULL; -#endif /* LWIP_NETIF_STATUS_CALLBACK */ -#if LWIP_NETIF_LINK_CALLBACK - netif->link_callback = NULL; - 80058f0: 68fb ldr r3, [r7, #12] - 80058f2: 2200 movs r2, #0 - 80058f4: 61da str r2, [r3, #28] - netif->loop_first = NULL; - netif->loop_last = NULL; -#endif /* ENABLE_LOOPBACK */ - - /* remember netif specific state information data */ - netif->state = state; - 80058f6: 68fb ldr r3, [r7, #12] - 80058f8: 69ba ldr r2, [r7, #24] - 80058fa: 621a str r2, [r3, #32] - netif->num = netif_num++; - 80058fc: 4b15 ldr r3, [pc, #84] ; (8005954 ) - 80058fe: 781b ldrb r3, [r3, #0] - 8005900: 1c5a adds r2, r3, #1 - 8005902: b2d1 uxtb r1, r2 - 8005904: 4a13 ldr r2, [pc, #76] ; (8005954 ) - 8005906: 7011 strb r1, [r2, #0] - 8005908: 68fa ldr r2, [r7, #12] - 800590a: f882 3036 strb.w r3, [r2, #54] ; 0x36 - netif->input = input; - 800590e: 68fb ldr r3, [r7, #12] - 8005910: 6a3a ldr r2, [r7, #32] - 8005912: 611a str r2, [r3, #16] -#if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS - netif->loop_cnt_current = 0; -#endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */ - -#if LWIP_IPV4 - netif_set_addr(netif, ipaddr, netmask, gw); - 8005914: 683b ldr r3, [r7, #0] - 8005916: 687a ldr r2, [r7, #4] - 8005918: 68b9 ldr r1, [r7, #8] - 800591a: 68f8 ldr r0, [r7, #12] - 800591c: f000 f81e bl 800595c -#endif /* LWIP_IPV4 */ - - /* call user specified initialization function for netif */ - if (init(netif) != ERR_OK) { - 8005920: 69fb ldr r3, [r7, #28] - 8005922: 68f8 ldr r0, [r7, #12] - 8005924: 4798 blx r3 - 8005926: 4603 mov r3, r0 - 8005928: 2b00 cmp r3, #0 - 800592a: d001 beq.n 8005930 - return NULL; - 800592c: 2300 movs r3, #0 - 800592e: e007 b.n 8005940 - } - - /* add this netif to the list */ - netif->next = netif_list; - 8005930: 4b09 ldr r3, [pc, #36] ; (8005958 ) - 8005932: 681a ldr r2, [r3, #0] - 8005934: 68fb ldr r3, [r7, #12] - 8005936: 601a str r2, [r3, #0] - netif_list = netif; - 8005938: 4a07 ldr r2, [pc, #28] ; (8005958 ) - 800593a: 68fb ldr r3, [r7, #12] - 800593c: 6013 str r3, [r2, #0] - ip4_addr_debug_print(NETIF_DEBUG, netmask); - LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); - ip4_addr_debug_print(NETIF_DEBUG, gw); -#endif /* LWIP_IPV4 */ - LWIP_DEBUGF(NETIF_DEBUG, ("\n")); - return netif; - 800593e: 68fb ldr r3, [r7, #12] -} - 8005940: 4618 mov r0, r3 - 8005942: 3710 adds r7, #16 - 8005944: 46bd mov sp, r7 - 8005946: bd80 pop {r7, pc} - 8005948: 08010c44 .word 0x08010c44 - 800594c: 08010c78 .word 0x08010c78 - 8005950: 08010c90 .word 0x08010c90 - 8005954: 20006d60 .word 0x20006d60 - 8005958: 20006d58 .word 0x20006d58 - -0800595c : - * @param gw the new default gateway - */ -void -netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, - const ip4_addr_t *gw) -{ - 800595c: b580 push {r7, lr} - 800595e: b084 sub sp, #16 - 8005960: af00 add r7, sp, #0 - 8005962: 60f8 str r0, [r7, #12] - 8005964: 60b9 str r1, [r7, #8] - 8005966: 607a str r2, [r7, #4] - 8005968: 603b str r3, [r7, #0] - if (ip4_addr_isany(ipaddr)) { - 800596a: 68bb ldr r3, [r7, #8] - 800596c: 2b00 cmp r3, #0 - 800596e: d003 beq.n 8005978 - 8005970: 68bb ldr r3, [r7, #8] - 8005972: 681b ldr r3, [r3, #0] - 8005974: 2b00 cmp r3, #0 - 8005976: d10c bne.n 8005992 - /* when removing an address, we have to remove it *before* changing netmask/gw - to ensure that tcp RST segment can be sent correctly */ - netif_set_ipaddr(netif, ipaddr); - 8005978: 68b9 ldr r1, [r7, #8] - 800597a: 68f8 ldr r0, [r7, #12] - 800597c: f000 f81a bl 80059b4 - netif_set_netmask(netif, netmask); - 8005980: 6879 ldr r1, [r7, #4] - 8005982: 68f8 ldr r0, [r7, #12] - 8005984: f000 f861 bl 8005a4a - netif_set_gw(netif, gw); - 8005988: 6839 ldr r1, [r7, #0] - 800598a: 68f8 ldr r0, [r7, #12] - 800598c: f000 f84a bl 8005a24 - 8005990: e00c b.n 80059ac - } else { - netif_set_netmask(netif, netmask); - 8005992: 6879 ldr r1, [r7, #4] - 8005994: 68f8 ldr r0, [r7, #12] - 8005996: f000 f858 bl 8005a4a - netif_set_gw(netif, gw); - 800599a: 6839 ldr r1, [r7, #0] - 800599c: 68f8 ldr r0, [r7, #12] - 800599e: f000 f841 bl 8005a24 - /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ - netif_set_ipaddr(netif, ipaddr); - 80059a2: 68b9 ldr r1, [r7, #8] - 80059a4: 68f8 ldr r0, [r7, #12] - 80059a6: f000 f805 bl 80059b4 - } -} - 80059aa: bf00 nop - 80059ac: bf00 nop - 80059ae: 3710 adds r7, #16 - 80059b0: 46bd mov sp, r7 - 80059b2: bd80 pop {r7, pc} - -080059b4 : - * @note call netif_set_addr() if you also want to change netmask and - * default gateway - */ -void -netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) -{ - 80059b4: b580 push {r7, lr} - 80059b6: b084 sub sp, #16 - 80059b8: af00 add r7, sp, #0 - 80059ba: 6078 str r0, [r7, #4] - 80059bc: 6039 str r1, [r7, #0] - ip_addr_t new_addr; - *ip_2_ip4(&new_addr) = (ipaddr ? *ipaddr : *IP4_ADDR_ANY4); - 80059be: 683b ldr r3, [r7, #0] - 80059c0: 2b00 cmp r3, #0 - 80059c2: d003 beq.n 80059cc - 80059c4: 683b ldr r3, [r7, #0] - 80059c6: 681b ldr r3, [r3, #0] - 80059c8: 60fb str r3, [r7, #12] - 80059ca: e002 b.n 80059d2 - 80059cc: 4b14 ldr r3, [pc, #80] ; (8005a20 ) - 80059ce: 681b ldr r3, [r3, #0] - 80059d0: 60fb str r3, [r7, #12] - IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); - - /* address is actually being changed? */ - if (ip4_addr_cmp(ip_2_ip4(&new_addr), netif_ip4_addr(netif)) == 0) { - 80059d2: 68fa ldr r2, [r7, #12] - 80059d4: 687b ldr r3, [r7, #4] - 80059d6: 3304 adds r3, #4 - 80059d8: 681b ldr r3, [r3, #0] - 80059da: 429a cmp r2, r3 - 80059dc: d01c beq.n 8005a18 - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); - 80059de: 687b ldr r3, [r7, #4] - 80059e0: 3304 adds r3, #4 - 80059e2: f107 020c add.w r2, r7, #12 - 80059e6: 4611 mov r1, r2 - 80059e8: 4618 mov r0, r3 - 80059ea: f002 f855 bl 8007a98 -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); - 80059ee: 687b ldr r3, [r7, #4] - 80059f0: 3304 adds r3, #4 - 80059f2: f107 020c add.w r2, r7, #12 - 80059f6: 4611 mov r1, r2 - 80059f8: 4618 mov r0, r3 - 80059fa: f005 fe63 bl 800b6c4 -#endif /* LWIP_RAW */ - - mib2_remove_ip4(netif); - mib2_remove_route_ip4(0, netif); - /* set new IP address to netif */ - ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); - 80059fe: 683b ldr r3, [r7, #0] - 8005a00: 2b00 cmp r3, #0 - 8005a02: d002 beq.n 8005a0a - 8005a04: 683b ldr r3, [r7, #0] - 8005a06: 681b ldr r3, [r3, #0] - 8005a08: e000 b.n 8005a0c - 8005a0a: 2300 movs r3, #0 - 8005a0c: 687a ldr r2, [r7, #4] - 8005a0e: 6053 str r3, [r2, #4] - IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4); - mib2_add_ip4(netif); - mib2_add_route_ip4(0, netif); - - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); - 8005a10: 2101 movs r1, #1 - 8005a12: 6878 ldr r0, [r7, #4] - 8005a14: f000 f85d bl 8005ad2 - netif->name[0], netif->name[1], - ip4_addr1_16(netif_ip4_addr(netif)), - ip4_addr2_16(netif_ip4_addr(netif)), - ip4_addr3_16(netif_ip4_addr(netif)), - ip4_addr4_16(netif_ip4_addr(netif)))); -} - 8005a18: bf00 nop - 8005a1a: 3710 adds r7, #16 - 8005a1c: 46bd mov sp, r7 - 8005a1e: bd80 pop {r7, pc} - 8005a20: 08012bb8 .word 0x08012bb8 - -08005a24 : - * - * @note call netif_set_addr() if you also want to change ip address and netmask - */ -void -netif_set_gw(struct netif *netif, const ip4_addr_t *gw) -{ - 8005a24: b480 push {r7} - 8005a26: b083 sub sp, #12 - 8005a28: af00 add r7, sp, #0 - 8005a2a: 6078 str r0, [r7, #4] - 8005a2c: 6039 str r1, [r7, #0] - ip4_addr_set(ip_2_ip4(&netif->gw), gw); - 8005a2e: 683b ldr r3, [r7, #0] - 8005a30: 2b00 cmp r3, #0 - 8005a32: d002 beq.n 8005a3a - 8005a34: 683b ldr r3, [r7, #0] - 8005a36: 681b ldr r3, [r3, #0] - 8005a38: e000 b.n 8005a3c - 8005a3a: 2300 movs r3, #0 - 8005a3c: 687a ldr r2, [r7, #4] - 8005a3e: 60d3 str r3, [r2, #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)))); -} - 8005a40: bf00 nop - 8005a42: 370c adds r7, #12 - 8005a44: 46bd mov sp, r7 - 8005a46: bc80 pop {r7} - 8005a48: 4770 bx lr - -08005a4a : - * @note call netif_set_addr() if you also want to change ip address and - * default gateway - */ -void -netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) -{ - 8005a4a: b480 push {r7} - 8005a4c: b083 sub sp, #12 - 8005a4e: af00 add r7, sp, #0 - 8005a50: 6078 str r0, [r7, #4] - 8005a52: 6039 str r1, [r7, #0] - mib2_remove_route_ip4(0, netif); - /* set new netmask to netif */ - ip4_addr_set(ip_2_ip4(&netif->netmask), netmask); - 8005a54: 683b ldr r3, [r7, #0] - 8005a56: 2b00 cmp r3, #0 - 8005a58: d002 beq.n 8005a60 - 8005a5a: 683b ldr r3, [r7, #0] - 8005a5c: 681b ldr r3, [r3, #0] - 8005a5e: e000 b.n 8005a62 - 8005a60: 2300 movs r3, #0 - 8005a62: 687a ldr r2, [r7, #4] - 8005a64: 6093 str r3, [r2, #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)))); -} - 8005a66: bf00 nop - 8005a68: 370c adds r7, #12 - 8005a6a: 46bd mov sp, r7 - 8005a6c: bc80 pop {r7} - 8005a6e: 4770 bx lr - -08005a70 : - * - * @param netif the default network interface - */ -void -netif_set_default(struct netif *netif) -{ - 8005a70: b480 push {r7} - 8005a72: b083 sub sp, #12 - 8005a74: af00 add r7, sp, #0 - 8005a76: 6078 str r0, [r7, #4] - mib2_remove_route_ip4(1, netif); - } else { - /* install default route */ - mib2_add_route_ip4(1, netif); - } - netif_default = netif; - 8005a78: 4a03 ldr r2, [pc, #12] ; (8005a88 ) - 8005a7a: 687b ldr r3, [r7, #4] - 8005a7c: 6013 str r3, [r2, #0] - LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", - netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); -} - 8005a7e: bf00 nop - 8005a80: 370c adds r7, #12 - 8005a82: 46bd mov sp, r7 - 8005a84: bc80 pop {r7} - 8005a86: 4770 bx lr - 8005a88: 20006d5c .word 0x20006d5c - -08005a8c : - * Bring an interface up, available for processing - * traffic. - */ -void -netif_set_up(struct netif *netif) -{ - 8005a8c: b580 push {r7, lr} - 8005a8e: b082 sub sp, #8 - 8005a90: af00 add r7, sp, #0 - 8005a92: 6078 str r0, [r7, #4] - if (!(netif->flags & NETIF_FLAG_UP)) { - 8005a94: 687b ldr r3, [r7, #4] - 8005a96: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8005a9a: f003 0301 and.w r3, r3, #1 - 8005a9e: 2b00 cmp r3, #0 - 8005aa0: d113 bne.n 8005aca - netif->flags |= NETIF_FLAG_UP; - 8005aa2: 687b ldr r3, [r7, #4] - 8005aa4: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8005aa8: f043 0301 orr.w r3, r3, #1 - 8005aac: b2da uxtb r2, r3 - 8005aae: 687b ldr r3, [r7, #4] - 8005ab0: f883 2033 strb.w r2, [r3, #51] ; 0x33 - - MIB2_COPY_SYSUPTIME_TO(&netif->ts); - - NETIF_STATUS_CALLBACK(netif); - - if (netif->flags & NETIF_FLAG_LINK_UP) { - 8005ab4: 687b ldr r3, [r7, #4] - 8005ab6: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8005aba: f003 0304 and.w r3, r3, #4 - 8005abe: 2b00 cmp r3, #0 - 8005ac0: d003 beq.n 8005aca - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); - 8005ac2: 2103 movs r1, #3 - 8005ac4: 6878 ldr r0, [r7, #4] - 8005ac6: f000 f804 bl 8005ad2 - } - } -} - 8005aca: bf00 nop - 8005acc: 3708 adds r7, #8 - 8005ace: 46bd mov sp, r7 - 8005ad0: bd80 pop {r7, pc} - -08005ad2 : - -/** Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change - */ -static void -netif_issue_reports(struct netif* netif, u8_t report_type) -{ - 8005ad2: b580 push {r7, lr} - 8005ad4: b082 sub sp, #8 - 8005ad6: af00 add r7, sp, #0 - 8005ad8: 6078 str r0, [r7, #4] - 8005ada: 460b mov r3, r1 - 8005adc: 70fb strb r3, [r7, #3] -#if LWIP_IPV4 - if ((report_type & NETIF_REPORT_TYPE_IPV4) && - 8005ade: 78fb ldrb r3, [r7, #3] - 8005ae0: f003 0301 and.w r3, r3, #1 - 8005ae4: 2b00 cmp r3, #0 - 8005ae6: d011 beq.n 8005b0c - !ip4_addr_isany_val(*netif_ip4_addr(netif))) { - 8005ae8: 687b ldr r3, [r7, #4] - 8005aea: 3304 adds r3, #4 - 8005aec: 681b ldr r3, [r3, #0] - if ((report_type & NETIF_REPORT_TYPE_IPV4) && - 8005aee: 2b00 cmp r3, #0 - 8005af0: d00c beq.n 8005b0c -#if LWIP_ARP - /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ - if (netif->flags & (NETIF_FLAG_ETHARP)) { - 8005af2: 687b ldr r3, [r7, #4] - 8005af4: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8005af8: f003 0308 and.w r3, r3, #8 - 8005afc: 2b00 cmp r3, #0 - 8005afe: d005 beq.n 8005b0c - etharp_gratuitous(netif); - 8005b00: 687b ldr r3, [r7, #4] - 8005b02: 3304 adds r3, #4 - 8005b04: 4619 mov r1, r3 - 8005b06: 6878 ldr r0, [r7, #4] - 8005b08: f008 fbca bl 800e2a0 - /* Send Router Solicitation messages. */ - netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ - } -#endif /* LWIP_IPV6 */ -} - 8005b0c: bf00 nop - 8005b0e: 3708 adds r7, #8 - 8005b10: 46bd mov sp, r7 - 8005b12: bd80 pop {r7, pc} - -08005b14 : - * @ingroup netif - * Bring an interface down, disabling any traffic processing. - */ -void -netif_set_down(struct netif *netif) -{ - 8005b14: b580 push {r7, lr} - 8005b16: b082 sub sp, #8 - 8005b18: af00 add r7, sp, #0 - 8005b1a: 6078 str r0, [r7, #4] - if (netif->flags & NETIF_FLAG_UP) { - 8005b1c: 687b ldr r3, [r7, #4] - 8005b1e: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8005b22: f003 0301 and.w r3, r3, #1 - 8005b26: 2b00 cmp r3, #0 - 8005b28: d012 beq.n 8005b50 - netif->flags &= ~NETIF_FLAG_UP; - 8005b2a: 687b ldr r3, [r7, #4] - 8005b2c: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8005b30: f023 0301 bic.w r3, r3, #1 - 8005b34: b2da uxtb r2, r3 - 8005b36: 687b ldr r3, [r7, #4] - 8005b38: f883 2033 strb.w r2, [r3, #51] ; 0x33 - MIB2_COPY_SYSUPTIME_TO(&netif->ts); - -#if LWIP_IPV4 && LWIP_ARP - if (netif->flags & NETIF_FLAG_ETHARP) { - 8005b3c: 687b ldr r3, [r7, #4] - 8005b3e: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 8005b42: f003 0308 and.w r3, r3, #8 - 8005b46: 2b00 cmp r3, #0 - 8005b48: d002 beq.n 8005b50 - etharp_cleanup_netif(netif); - 8005b4a: 6878 ldr r0, [r7, #4] - 8005b4c: f007 ff6a bl 800da24 - nd6_cleanup_netif(netif); -#endif /* LWIP_IPV6 */ - - NETIF_STATUS_CALLBACK(netif); - } -} - 8005b50: bf00 nop - 8005b52: 3708 adds r7, #8 - 8005b54: 46bd mov sp, r7 - 8005b56: bd80 pop {r7, pc} - -08005b58 : - * @ingroup netif - * Set callback to be called when link is brought up/down - */ -void -netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback) -{ - 8005b58: b480 push {r7} - 8005b5a: b083 sub sp, #12 - 8005b5c: af00 add r7, sp, #0 - 8005b5e: 6078 str r0, [r7, #4] - 8005b60: 6039 str r1, [r7, #0] - if (netif) { - 8005b62: 687b ldr r3, [r7, #4] - 8005b64: 2b00 cmp r3, #0 - 8005b66: d002 beq.n 8005b6e - netif->link_callback = link_callback; - 8005b68: 687b ldr r3, [r7, #4] - 8005b6a: 683a ldr r2, [r7, #0] - 8005b6c: 61da str r2, [r3, #28] - } -} - 8005b6e: bf00 nop - 8005b70: 370c adds r7, #12 - 8005b72: 46bd mov sp, r7 - 8005b74: bc80 pop {r7} - 8005b76: 4770 bx lr - -08005b78 : -#endif /* !NO_SYS */ - -/** Queue a call to pbuf_free_ooseq if not already queued. */ -static void -pbuf_pool_is_empty(void) -{ - 8005b78: b480 push {r7} - 8005b7a: af00 add r7, sp, #0 -#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL - SYS_ARCH_SET(pbuf_free_ooseq_pending, 1); - 8005b7c: 4b03 ldr r3, [pc, #12] ; (8005b8c ) - 8005b7e: 2201 movs r2, #1 - 8005b80: 701a strb r2, [r3, #0] - if (!queued) { - /* queue a call to pbuf_free_ooseq if not already queued */ - PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); - } -#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ -} - 8005b82: bf00 nop - 8005b84: 46bd mov sp, r7 - 8005b86: bc80 pop {r7} - 8005b88: 4770 bx lr - 8005b8a: bf00 nop - 8005b8c: 20006d61 .word 0x20006d61 - -08005b90 : - * @return the allocated pbuf. If multiple pbufs where allocated, this - * is the first pbuf of a pbuf chain. - */ -struct pbuf * -pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) -{ - 8005b90: b580 push {r7, lr} - 8005b92: b088 sub sp, #32 - 8005b94: af00 add r7, sp, #0 - 8005b96: 4603 mov r3, r0 - 8005b98: 71fb strb r3, [r7, #7] - 8005b9a: 460b mov r3, r1 - 8005b9c: 80bb strh r3, [r7, #4] - 8005b9e: 4613 mov r3, r2 - 8005ba0: 71bb strb r3, [r7, #6] - u16_t offset; - s32_t rem_len; /* remaining length */ - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); - - /* determine header offset */ - switch (layer) { - 8005ba2: 79fb ldrb r3, [r7, #7] - 8005ba4: 2b04 cmp r3, #4 - 8005ba6: d81c bhi.n 8005be2 - 8005ba8: a201 add r2, pc, #4 ; (adr r2, 8005bb0 ) - 8005baa: f852 f023 ldr.w pc, [r2, r3, lsl #2] - 8005bae: bf00 nop - 8005bb0: 08005bc5 .word 0x08005bc5 - 8005bb4: 08005bcb .word 0x08005bcb - 8005bb8: 08005bd1 .word 0x08005bd1 - 8005bbc: 08005bd7 .word 0x08005bd7 - 8005bc0: 08005bdd .word 0x08005bdd - case PBUF_TRANSPORT: - /* add room for transport (often TCP) layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; - 8005bc4: 2336 movs r3, #54 ; 0x36 - 8005bc6: 82fb strh r3, [r7, #22] - break; - 8005bc8: e014 b.n 8005bf4 - case PBUF_IP: - /* add room for IP layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; - 8005bca: 2322 movs r3, #34 ; 0x22 - 8005bcc: 82fb strh r3, [r7, #22] - break; - 8005bce: e011 b.n 8005bf4 - case PBUF_LINK: - /* add room for link layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; - 8005bd0: 230e movs r3, #14 - 8005bd2: 82fb strh r3, [r7, #22] - break; - 8005bd4: e00e b.n 8005bf4 - case PBUF_RAW_TX: - /* add room for encapsulating link layer headers (e.g. 802.11) */ - offset = PBUF_LINK_ENCAPSULATION_HLEN; - 8005bd6: 2300 movs r3, #0 - 8005bd8: 82fb strh r3, [r7, #22] - break; - 8005bda: e00b b.n 8005bf4 - case PBUF_RAW: - /* no offset (e.g. RX buffers or chain successors) */ - offset = 0; - 8005bdc: 2300 movs r3, #0 - 8005bde: 82fb strh r3, [r7, #22] - break; - 8005be0: e008 b.n 8005bf4 - default: - LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); - 8005be2: 4ba1 ldr r3, [pc, #644] ; (8005e68 ) - 8005be4: f44f 728b mov.w r2, #278 ; 0x116 - 8005be8: 49a0 ldr r1, [pc, #640] ; (8005e6c ) - 8005bea: 48a1 ldr r0, [pc, #644] ; (8005e70 ) - 8005bec: f009 ff6a bl 800fac4 - return NULL; - 8005bf0: 2300 movs r3, #0 - 8005bf2: e15c b.n 8005eae - } - - switch (type) { - 8005bf4: 79bb ldrb r3, [r7, #6] - 8005bf6: 2b03 cmp r3, #3 - 8005bf8: d00d beq.n 8005c16 - 8005bfa: 2b03 cmp r3, #3 - 8005bfc: f300 8146 bgt.w 8005e8c - 8005c00: 2b00 cmp r3, #0 - 8005c02: f000 80d0 beq.w 8005da6 - 8005c06: 2b00 cmp r3, #0 - 8005c08: f2c0 8140 blt.w 8005e8c - 8005c0c: 3b01 subs r3, #1 - 8005c0e: 2b01 cmp r3, #1 - 8005c10: f200 813c bhi.w 8005e8c - 8005c14: e10d b.n 8005e32 - case PBUF_POOL: - /* allocate head of pbuf chain into p */ - p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); - 8005c16: 2008 movs r0, #8 - 8005c18: f7ff fdc6 bl 80057a8 - 8005c1c: 61f8 str r0, [r7, #28] - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); - if (p == NULL) { - 8005c1e: 69fb ldr r3, [r7, #28] - 8005c20: 2b00 cmp r3, #0 - 8005c22: d103 bne.n 8005c2c - PBUF_POOL_IS_EMPTY(); - 8005c24: f7ff ffa8 bl 8005b78 - return NULL; - 8005c28: 2300 movs r3, #0 - 8005c2a: e140 b.n 8005eae - } - p->type = type; - 8005c2c: 69fb ldr r3, [r7, #28] - 8005c2e: 79ba ldrb r2, [r7, #6] - 8005c30: 731a strb r2, [r3, #12] - p->next = NULL; - 8005c32: 69fb ldr r3, [r7, #28] - 8005c34: 2200 movs r2, #0 - 8005c36: 601a str r2, [r3, #0] - - /* make the payload pointer point 'offset' bytes into pbuf data memory */ - p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); - 8005c38: 8afb ldrh r3, [r7, #22] - 8005c3a: 3310 adds r3, #16 - 8005c3c: 69fa ldr r2, [r7, #28] - 8005c3e: 4413 add r3, r2 - 8005c40: 3303 adds r3, #3 - 8005c42: f023 0303 bic.w r3, r3, #3 - 8005c46: 461a mov r2, r3 - 8005c48: 69fb ldr r3, [r7, #28] - 8005c4a: 605a str r2, [r3, #4] - LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", - 8005c4c: 69fb ldr r3, [r7, #28] - 8005c4e: 685b ldr r3, [r3, #4] - 8005c50: f003 0303 and.w r3, r3, #3 - 8005c54: 2b00 cmp r3, #0 - 8005c56: d006 beq.n 8005c66 - 8005c58: 4b83 ldr r3, [pc, #524] ; (8005e68 ) - 8005c5a: f44f 7294 mov.w r2, #296 ; 0x128 - 8005c5e: 4985 ldr r1, [pc, #532] ; (8005e74 ) - 8005c60: 4883 ldr r0, [pc, #524] ; (8005e70 ) - 8005c62: f009 ff2f bl 800fac4 - ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); - /* the total length of the pbuf chain is the requested size */ - p->tot_len = length; - 8005c66: 69fb ldr r3, [r7, #28] - 8005c68: 88ba ldrh r2, [r7, #4] - 8005c6a: 811a strh r2, [r3, #8] - /* set the length of the first pbuf in the chain */ - p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); - 8005c6c: 8afb ldrh r3, [r7, #22] - 8005c6e: 3303 adds r3, #3 - 8005c70: f023 0303 bic.w r3, r3, #3 - 8005c74: f5c3 7214 rsb r2, r3, #592 ; 0x250 - 8005c78: 88bb ldrh r3, [r7, #4] - 8005c7a: 4293 cmp r3, r2 - 8005c7c: bf28 it cs - 8005c7e: 4613 movcs r3, r2 - 8005c80: b29a uxth r2, r3 - 8005c82: 69fb ldr r3, [r7, #28] - 8005c84: 815a strh r2, [r3, #10] - LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", - 8005c86: 69fb ldr r3, [r7, #28] - 8005c88: 685b ldr r3, [r3, #4] - 8005c8a: 69fa ldr r2, [r7, #28] - 8005c8c: 8952 ldrh r2, [r2, #10] - 8005c8e: 441a add r2, r3 - 8005c90: 69fb ldr r3, [r7, #28] - 8005c92: f503 7318 add.w r3, r3, #608 ; 0x260 - 8005c96: 429a cmp r2, r3 - 8005c98: d906 bls.n 8005ca8 - 8005c9a: 4b73 ldr r3, [pc, #460] ; (8005e68 ) - 8005c9c: f44f 7297 mov.w r2, #302 ; 0x12e - 8005ca0: 4975 ldr r1, [pc, #468] ; (8005e78 ) - 8005ca2: 4873 ldr r0, [pc, #460] ; (8005e70 ) - 8005ca4: f009 ff0e bl 800fac4 - ((u8_t*)p->payload + p->len <= - (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); - LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", - 8005ca8: 8afb ldrh r3, [r7, #22] - 8005caa: 3303 adds r3, #3 - 8005cac: f023 0303 bic.w r3, r3, #3 - 8005cb0: f5b3 7f14 cmp.w r3, #592 ; 0x250 - 8005cb4: d106 bne.n 8005cc4 - 8005cb6: 4b6c ldr r3, [pc, #432] ; (8005e68 ) - 8005cb8: f240 1231 movw r2, #305 ; 0x131 - 8005cbc: 496f ldr r1, [pc, #444] ; (8005e7c ) - 8005cbe: 486c ldr r0, [pc, #432] ; (8005e70 ) - 8005cc0: f009 ff00 bl 800fac4 - (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); - /* set reference count (needed here in case we fail) */ - p->ref = 1; - 8005cc4: 69fb ldr r3, [r7, #28] - 8005cc6: 2201 movs r2, #1 - 8005cc8: 81da strh r2, [r3, #14] - - /* now allocate the tail of the pbuf chain */ - - /* remember first pbuf for linkage in next iteration */ - r = p; - 8005cca: 69fb ldr r3, [r7, #28] - 8005ccc: 61bb str r3, [r7, #24] - /* remaining length to be allocated */ - rem_len = length - p->len; - 8005cce: 88bb ldrh r3, [r7, #4] - 8005cd0: 69fa ldr r2, [r7, #28] - 8005cd2: 8952 ldrh r2, [r2, #10] - 8005cd4: 1a9b subs r3, r3, r2 - 8005cd6: 613b str r3, [r7, #16] - /* any remaining pbufs to be allocated? */ - while (rem_len > 0) { - 8005cd8: e061 b.n 8005d9e - q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); - 8005cda: 2008 movs r0, #8 - 8005cdc: f7ff fd64 bl 80057a8 - 8005ce0: 60f8 str r0, [r7, #12] - if (q == NULL) { - 8005ce2: 68fb ldr r3, [r7, #12] - 8005ce4: 2b00 cmp r3, #0 - 8005ce6: d106 bne.n 8005cf6 - PBUF_POOL_IS_EMPTY(); - 8005ce8: f7ff ff46 bl 8005b78 - /* free chain so far allocated */ - pbuf_free(p); - 8005cec: 69f8 ldr r0, [r7, #28] - 8005cee: f000 fac7 bl 8006280 - /* bail out unsuccessfully */ - return NULL; - 8005cf2: 2300 movs r3, #0 - 8005cf4: e0db b.n 8005eae - } - q->type = type; - 8005cf6: 68fb ldr r3, [r7, #12] - 8005cf8: 79ba ldrb r2, [r7, #6] - 8005cfa: 731a strb r2, [r3, #12] - q->flags = 0; - 8005cfc: 68fb ldr r3, [r7, #12] - 8005cfe: 2200 movs r2, #0 - 8005d00: 735a strb r2, [r3, #13] - q->next = NULL; - 8005d02: 68fb ldr r3, [r7, #12] - 8005d04: 2200 movs r2, #0 - 8005d06: 601a str r2, [r3, #0] - /* make previous pbuf point to this pbuf */ - r->next = q; - 8005d08: 69bb ldr r3, [r7, #24] - 8005d0a: 68fa ldr r2, [r7, #12] - 8005d0c: 601a str r2, [r3, #0] - /* set total length of this pbuf and next in chain */ - LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); - 8005d0e: 693b ldr r3, [r7, #16] - 8005d10: f64f 72fe movw r2, #65534 ; 0xfffe - 8005d14: 4293 cmp r3, r2 - 8005d16: dd06 ble.n 8005d26 - 8005d18: 4b53 ldr r3, [pc, #332] ; (8005e68 ) - 8005d1a: f44f 72a6 mov.w r2, #332 ; 0x14c - 8005d1e: 4958 ldr r1, [pc, #352] ; (8005e80 ) - 8005d20: 4853 ldr r0, [pc, #332] ; (8005e70 ) - 8005d22: f009 fecf bl 800fac4 - q->tot_len = (u16_t)rem_len; - 8005d26: 693b ldr r3, [r7, #16] - 8005d28: b29a uxth r2, r3 - 8005d2a: 68fb ldr r3, [r7, #12] - 8005d2c: 811a strh r2, [r3, #8] - /* this pbuf length is pool size, unless smaller sized tail */ - q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); - 8005d2e: 693b ldr r3, [r7, #16] - 8005d30: b29b uxth r3, r3 - 8005d32: f5b3 7f14 cmp.w r3, #592 ; 0x250 - 8005d36: bf28 it cs - 8005d38: f44f 7314 movcs.w r3, #592 ; 0x250 - 8005d3c: b29a uxth r2, r3 - 8005d3e: 68fb ldr r3, [r7, #12] - 8005d40: 815a strh r2, [r3, #10] - q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); - 8005d42: 68fb ldr r3, [r7, #12] - 8005d44: f103 0210 add.w r2, r3, #16 - 8005d48: 68fb ldr r3, [r7, #12] - 8005d4a: 605a str r2, [r3, #4] - LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", - 8005d4c: 68fb ldr r3, [r7, #12] - 8005d4e: 685b ldr r3, [r3, #4] - 8005d50: f003 0303 and.w r3, r3, #3 - 8005d54: 2b00 cmp r3, #0 - 8005d56: d006 beq.n 8005d66 - 8005d58: 4b43 ldr r3, [pc, #268] ; (8005e68 ) - 8005d5a: f240 1251 movw r2, #337 ; 0x151 - 8005d5e: 4949 ldr r1, [pc, #292] ; (8005e84 ) - 8005d60: 4843 ldr r0, [pc, #268] ; (8005e70 ) - 8005d62: f009 feaf bl 800fac4 - ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); - LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", - 8005d66: 69fb ldr r3, [r7, #28] - 8005d68: 685b ldr r3, [r3, #4] - 8005d6a: 69fa ldr r2, [r7, #28] - 8005d6c: 8952 ldrh r2, [r2, #10] - 8005d6e: 441a add r2, r3 - 8005d70: 69fb ldr r3, [r7, #28] - 8005d72: f503 7318 add.w r3, r3, #608 ; 0x260 - 8005d76: 429a cmp r2, r3 - 8005d78: d906 bls.n 8005d88 - 8005d7a: 4b3b ldr r3, [pc, #236] ; (8005e68 ) - 8005d7c: f240 1253 movw r2, #339 ; 0x153 - 8005d80: 493d ldr r1, [pc, #244] ; (8005e78 ) - 8005d82: 483b ldr r0, [pc, #236] ; (8005e70 ) - 8005d84: f009 fe9e bl 800fac4 - ((u8_t*)p->payload + p->len <= - (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); - q->ref = 1; - 8005d88: 68fb ldr r3, [r7, #12] - 8005d8a: 2201 movs r2, #1 - 8005d8c: 81da strh r2, [r3, #14] - /* calculate remaining length to be allocated */ - rem_len -= q->len; - 8005d8e: 68fb ldr r3, [r7, #12] - 8005d90: 895b ldrh r3, [r3, #10] - 8005d92: 461a mov r2, r3 - 8005d94: 693b ldr r3, [r7, #16] - 8005d96: 1a9b subs r3, r3, r2 - 8005d98: 613b str r3, [r7, #16] - /* remember this pbuf for linkage in next iteration */ - r = q; - 8005d9a: 68fb ldr r3, [r7, #12] - 8005d9c: 61bb str r3, [r7, #24] - while (rem_len > 0) { - 8005d9e: 693b ldr r3, [r7, #16] - 8005da0: 2b00 cmp r3, #0 - 8005da2: dc9a bgt.n 8005cda - } - /* end of chain */ - /*r->next = NULL;*/ - - break; - 8005da4: e07c b.n 8005ea0 - case PBUF_RAM: - { - mem_size_t alloc_len = LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length); - 8005da6: 8afb ldrh r3, [r7, #22] - 8005da8: 3313 adds r3, #19 - 8005daa: b29b uxth r3, r3 - 8005dac: f023 0303 bic.w r3, r3, #3 - 8005db0: b29a uxth r2, r3 - 8005db2: 88bb ldrh r3, [r7, #4] - 8005db4: 3303 adds r3, #3 - 8005db6: b29b uxth r3, r3 - 8005db8: f023 0303 bic.w r3, r3, #3 - 8005dbc: b29b uxth r3, r3 - 8005dbe: 4413 add r3, r2 - 8005dc0: 817b strh r3, [r7, #10] - - /* bug #50040: Check for integer overflow when calculating alloc_len */ - if (alloc_len < LWIP_MEM_ALIGN_SIZE(length)) { - 8005dc2: 897a ldrh r2, [r7, #10] - 8005dc4: 88bb ldrh r3, [r7, #4] - 8005dc6: 3303 adds r3, #3 - 8005dc8: f023 0303 bic.w r3, r3, #3 - 8005dcc: 429a cmp r2, r3 - 8005dce: d201 bcs.n 8005dd4 - return NULL; - 8005dd0: 2300 movs r3, #0 - 8005dd2: e06c b.n 8005eae - } - - /* If pbuf is to be allocated in RAM, allocate memory for it. */ - p = (struct pbuf*)mem_malloc(alloc_len); - 8005dd4: 897b ldrh r3, [r7, #10] - 8005dd6: 4618 mov r0, r3 - 8005dd8: f7ff fb8a bl 80054f0 - 8005ddc: 61f8 str r0, [r7, #28] - } - - if (p == NULL) { - 8005dde: 69fb ldr r3, [r7, #28] - 8005de0: 2b00 cmp r3, #0 - 8005de2: d101 bne.n 8005de8 - return NULL; - 8005de4: 2300 movs r3, #0 - 8005de6: e062 b.n 8005eae - } - /* Set up internal structure of the pbuf. */ - p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); - 8005de8: 8afb ldrh r3, [r7, #22] - 8005dea: 3310 adds r3, #16 - 8005dec: 69fa ldr r2, [r7, #28] - 8005dee: 4413 add r3, r2 - 8005df0: 3303 adds r3, #3 - 8005df2: f023 0303 bic.w r3, r3, #3 - 8005df6: 461a mov r2, r3 - 8005df8: 69fb ldr r3, [r7, #28] - 8005dfa: 605a str r2, [r3, #4] - p->len = p->tot_len = length; - 8005dfc: 69fb ldr r3, [r7, #28] - 8005dfe: 88ba ldrh r2, [r7, #4] - 8005e00: 811a strh r2, [r3, #8] - 8005e02: 69fb ldr r3, [r7, #28] - 8005e04: 891a ldrh r2, [r3, #8] - 8005e06: 69fb ldr r3, [r7, #28] - 8005e08: 815a strh r2, [r3, #10] - p->next = NULL; - 8005e0a: 69fb ldr r3, [r7, #28] - 8005e0c: 2200 movs r2, #0 - 8005e0e: 601a str r2, [r3, #0] - p->type = type; - 8005e10: 69fb ldr r3, [r7, #28] - 8005e12: 79ba ldrb r2, [r7, #6] - 8005e14: 731a strb r2, [r3, #12] - - LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", - 8005e16: 69fb ldr r3, [r7, #28] - 8005e18: 685b ldr r3, [r3, #4] - 8005e1a: f003 0303 and.w r3, r3, #3 - 8005e1e: 2b00 cmp r3, #0 - 8005e20: d03d beq.n 8005e9e - 8005e22: 4b11 ldr r3, [pc, #68] ; (8005e68 ) - 8005e24: f44f 72bb mov.w r2, #374 ; 0x176 - 8005e28: 4917 ldr r1, [pc, #92] ; (8005e88 ) - 8005e2a: 4811 ldr r0, [pc, #68] ; (8005e70 ) - 8005e2c: f009 fe4a bl 800fac4 - ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); - break; - 8005e30: e035 b.n 8005e9e - /* pbuf references existing (non-volatile static constant) ROM payload? */ - case PBUF_ROM: - /* pbuf references existing (externally allocated) RAM payload? */ - case PBUF_REF: - /* only allocate memory for the pbuf structure */ - p = (struct pbuf *)memp_malloc(MEMP_PBUF); - 8005e32: 2007 movs r0, #7 - 8005e34: f7ff fcb8 bl 80057a8 - 8005e38: 61f8 str r0, [r7, #28] - if (p == NULL) { - 8005e3a: 69fb ldr r3, [r7, #28] - 8005e3c: 2b00 cmp r3, #0 - 8005e3e: d101 bne.n 8005e44 - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", - (type == PBUF_ROM) ? "ROM" : "REF")); - return NULL; - 8005e40: 2300 movs r3, #0 - 8005e42: e034 b.n 8005eae - } - /* caller must set this field properly, afterwards */ - p->payload = NULL; - 8005e44: 69fb ldr r3, [r7, #28] - 8005e46: 2200 movs r2, #0 - 8005e48: 605a str r2, [r3, #4] - p->len = p->tot_len = length; - 8005e4a: 69fb ldr r3, [r7, #28] - 8005e4c: 88ba ldrh r2, [r7, #4] - 8005e4e: 811a strh r2, [r3, #8] - 8005e50: 69fb ldr r3, [r7, #28] - 8005e52: 891a ldrh r2, [r3, #8] - 8005e54: 69fb ldr r3, [r7, #28] - 8005e56: 815a strh r2, [r3, #10] - p->next = NULL; - 8005e58: 69fb ldr r3, [r7, #28] - 8005e5a: 2200 movs r2, #0 - 8005e5c: 601a str r2, [r3, #0] - p->type = type; - 8005e5e: 69fb ldr r3, [r7, #28] - 8005e60: 79ba ldrb r2, [r7, #6] - 8005e62: 731a strb r2, [r3, #12] - break; - 8005e64: e01c b.n 8005ea0 - 8005e66: bf00 nop - 8005e68: 08010cb8 .word 0x08010cb8 - 8005e6c: 08010ce8 .word 0x08010ce8 - 8005e70: 08010d04 .word 0x08010d04 - 8005e74: 08010d2c .word 0x08010d2c - 8005e78: 08010d5c .word 0x08010d5c - 8005e7c: 08010d90 .word 0x08010d90 - 8005e80: 08010dc4 .word 0x08010dc4 - 8005e84: 08010dd8 .word 0x08010dd8 - 8005e88: 08010e08 .word 0x08010e08 - default: - LWIP_ASSERT("pbuf_alloc: erroneous type", 0); - 8005e8c: 4b0a ldr r3, [pc, #40] ; (8005eb8 ) - 8005e8e: f44f 72c6 mov.w r2, #396 ; 0x18c - 8005e92: 490a ldr r1, [pc, #40] ; (8005ebc ) - 8005e94: 480a ldr r0, [pc, #40] ; (8005ec0 ) - 8005e96: f009 fe15 bl 800fac4 - return NULL; - 8005e9a: 2300 movs r3, #0 - 8005e9c: e007 b.n 8005eae - break; - 8005e9e: bf00 nop - } - /* set reference count */ - p->ref = 1; - 8005ea0: 69fb ldr r3, [r7, #28] - 8005ea2: 2201 movs r2, #1 - 8005ea4: 81da strh r2, [r3, #14] - /* set flags */ - p->flags = 0; - 8005ea6: 69fb ldr r3, [r7, #28] - 8005ea8: 2200 movs r2, #0 - 8005eaa: 735a strb r2, [r3, #13] - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); - return p; - 8005eac: 69fb ldr r3, [r7, #28] -} - 8005eae: 4618 mov r0, r3 - 8005eb0: 3720 adds r7, #32 - 8005eb2: 46bd mov sp, r7 - 8005eb4: bd80 pop {r7, pc} - 8005eb6: bf00 nop - 8005eb8: 08010cb8 .word 0x08010cb8 - 8005ebc: 08010e34 .word 0x08010e34 - 8005ec0: 08010d04 .word 0x08010d04 - -08005ec4 : - * big enough to hold 'length' plus the header size - */ -struct pbuf* -pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, - void *payload_mem, u16_t payload_mem_len) -{ - 8005ec4: b580 push {r7, lr} - 8005ec6: b084 sub sp, #16 - 8005ec8: af00 add r7, sp, #0 - 8005eca: 603b str r3, [r7, #0] - 8005ecc: 4603 mov r3, r0 - 8005ece: 71fb strb r3, [r7, #7] - 8005ed0: 460b mov r3, r1 - 8005ed2: 80bb strh r3, [r7, #4] - 8005ed4: 4613 mov r3, r2 - 8005ed6: 71bb strb r3, [r7, #6] - u16_t offset; - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length)); - - /* determine header offset */ - switch (l) { - 8005ed8: 79fb ldrb r3, [r7, #7] - 8005eda: 2b04 cmp r3, #4 - 8005edc: d81b bhi.n 8005f16 - 8005ede: a201 add r2, pc, #4 ; (adr r2, 8005ee4 ) - 8005ee0: f852 f023 ldr.w pc, [r2, r3, lsl #2] - 8005ee4: 08005ef9 .word 0x08005ef9 - 8005ee8: 08005eff .word 0x08005eff - 8005eec: 08005f05 .word 0x08005f05 - 8005ef0: 08005f0b .word 0x08005f0b - 8005ef4: 08005f11 .word 0x08005f11 - case PBUF_TRANSPORT: - /* add room for transport (often TCP) layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; - 8005ef8: 2336 movs r3, #54 ; 0x36 - 8005efa: 81fb strh r3, [r7, #14] - break; - 8005efc: e014 b.n 8005f28 - case PBUF_IP: - /* add room for IP layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; - 8005efe: 2322 movs r3, #34 ; 0x22 - 8005f00: 81fb strh r3, [r7, #14] - break; - 8005f02: e011 b.n 8005f28 - case PBUF_LINK: - /* add room for link layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; - 8005f04: 230e movs r3, #14 - 8005f06: 81fb strh r3, [r7, #14] - break; - 8005f08: e00e b.n 8005f28 - case PBUF_RAW_TX: - /* add room for encapsulating link layer headers (e.g. 802.11) */ - offset = PBUF_LINK_ENCAPSULATION_HLEN; - 8005f0a: 2300 movs r3, #0 - 8005f0c: 81fb strh r3, [r7, #14] - break; - 8005f0e: e00b b.n 8005f28 - case PBUF_RAW: - offset = 0; - 8005f10: 2300 movs r3, #0 - 8005f12: 81fb strh r3, [r7, #14] - break; - 8005f14: e008 b.n 8005f28 - default: - LWIP_ASSERT("pbuf_alloced_custom: bad pbuf layer", 0); - 8005f16: 4b1d ldr r3, [pc, #116] ; (8005f8c ) - 8005f18: f240 12c5 movw r2, #453 ; 0x1c5 - 8005f1c: 491c ldr r1, [pc, #112] ; (8005f90 ) - 8005f1e: 481d ldr r0, [pc, #116] ; (8005f94 ) - 8005f20: f009 fdd0 bl 800fac4 - return NULL; - 8005f24: 2300 movs r3, #0 - 8005f26: e02d b.n 8005f84 - } - - if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) { - 8005f28: 89fb ldrh r3, [r7, #14] - 8005f2a: 3303 adds r3, #3 - 8005f2c: f023 0203 bic.w r2, r3, #3 - 8005f30: 88bb ldrh r3, [r7, #4] - 8005f32: 441a add r2, r3 - 8005f34: 8bbb ldrh r3, [r7, #28] - 8005f36: 429a cmp r2, r3 - 8005f38: d901 bls.n 8005f3e - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); - return NULL; - 8005f3a: 2300 movs r3, #0 - 8005f3c: e022 b.n 8005f84 - } - - p->pbuf.next = NULL; - 8005f3e: 683b ldr r3, [r7, #0] - 8005f40: 2200 movs r2, #0 - 8005f42: 601a str r2, [r3, #0] - if (payload_mem != NULL) { - 8005f44: 69bb ldr r3, [r7, #24] - 8005f46: 2b00 cmp r3, #0 - 8005f48: d008 beq.n 8005f5c - p->pbuf.payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); - 8005f4a: 89fb ldrh r3, [r7, #14] - 8005f4c: 3303 adds r3, #3 - 8005f4e: f023 0303 bic.w r3, r3, #3 - 8005f52: 69ba ldr r2, [r7, #24] - 8005f54: 441a add r2, r3 - 8005f56: 683b ldr r3, [r7, #0] - 8005f58: 605a str r2, [r3, #4] - 8005f5a: e002 b.n 8005f62 - } else { - p->pbuf.payload = NULL; - 8005f5c: 683b ldr r3, [r7, #0] - 8005f5e: 2200 movs r2, #0 - 8005f60: 605a str r2, [r3, #4] - } - p->pbuf.flags = PBUF_FLAG_IS_CUSTOM; - 8005f62: 683b ldr r3, [r7, #0] - 8005f64: 2202 movs r2, #2 - 8005f66: 735a strb r2, [r3, #13] - p->pbuf.len = p->pbuf.tot_len = length; - 8005f68: 683b ldr r3, [r7, #0] - 8005f6a: 88ba ldrh r2, [r7, #4] - 8005f6c: 811a strh r2, [r3, #8] - 8005f6e: 683b ldr r3, [r7, #0] - 8005f70: 891a ldrh r2, [r3, #8] - 8005f72: 683b ldr r3, [r7, #0] - 8005f74: 815a strh r2, [r3, #10] - p->pbuf.type = type; - 8005f76: 683b ldr r3, [r7, #0] - 8005f78: 79ba ldrb r2, [r7, #6] - 8005f7a: 731a strb r2, [r3, #12] - p->pbuf.ref = 1; - 8005f7c: 683b ldr r3, [r7, #0] - 8005f7e: 2201 movs r2, #1 - 8005f80: 81da strh r2, [r3, #14] - return &p->pbuf; - 8005f82: 683b ldr r3, [r7, #0] -} - 8005f84: 4618 mov r0, r3 - 8005f86: 3710 adds r7, #16 - 8005f88: 46bd mov sp, r7 - 8005f8a: bd80 pop {r7, pc} - 8005f8c: 08010cb8 .word 0x08010cb8 - 8005f90: 08010e50 .word 0x08010e50 - 8005f94: 08010d04 .word 0x08010d04 - -08005f98 : - * - * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). - */ -void -pbuf_realloc(struct pbuf *p, u16_t new_len) -{ - 8005f98: b580 push {r7, lr} - 8005f9a: b086 sub sp, #24 - 8005f9c: af00 add r7, sp, #0 - 8005f9e: 6078 str r0, [r7, #4] - 8005fa0: 460b mov r3, r1 - 8005fa2: 807b strh r3, [r7, #2] - struct pbuf *q; - u16_t rem_len; /* remaining length */ - s32_t grow; - - LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL); - 8005fa4: 687b ldr r3, [r7, #4] - 8005fa6: 2b00 cmp r3, #0 - 8005fa8: d106 bne.n 8005fb8 - 8005faa: 4b4b ldr r3, [pc, #300] ; (80060d8 ) - 8005fac: f240 12f3 movw r2, #499 ; 0x1f3 - 8005fb0: 494a ldr r1, [pc, #296] ; (80060dc ) - 8005fb2: 484b ldr r0, [pc, #300] ; (80060e0 ) - 8005fb4: f009 fd86 bl 800fac4 - LWIP_ASSERT("pbuf_realloc: sane p->type", p->type == PBUF_POOL || - 8005fb8: 687b ldr r3, [r7, #4] - 8005fba: 7b1b ldrb r3, [r3, #12] - 8005fbc: 2b03 cmp r3, #3 - 8005fbe: d012 beq.n 8005fe6 - 8005fc0: 687b ldr r3, [r7, #4] - 8005fc2: 7b1b ldrb r3, [r3, #12] - 8005fc4: 2b01 cmp r3, #1 - 8005fc6: d00e beq.n 8005fe6 - 8005fc8: 687b ldr r3, [r7, #4] - 8005fca: 7b1b ldrb r3, [r3, #12] - 8005fcc: 2b00 cmp r3, #0 - 8005fce: d00a beq.n 8005fe6 - 8005fd0: 687b ldr r3, [r7, #4] - 8005fd2: 7b1b ldrb r3, [r3, #12] - 8005fd4: 2b02 cmp r3, #2 - 8005fd6: d006 beq.n 8005fe6 - 8005fd8: 4b3f ldr r3, [pc, #252] ; (80060d8 ) - 8005fda: f44f 72fa mov.w r2, #500 ; 0x1f4 - 8005fde: 4941 ldr r1, [pc, #260] ; (80060e4 ) - 8005fe0: 483f ldr r0, [pc, #252] ; (80060e0 ) - 8005fe2: f009 fd6f bl 800fac4 - p->type == PBUF_ROM || - p->type == PBUF_RAM || - p->type == PBUF_REF); - - /* desired length larger than current length? */ - if (new_len >= p->tot_len) { - 8005fe6: 687b ldr r3, [r7, #4] - 8005fe8: 891b ldrh r3, [r3, #8] - 8005fea: 887a ldrh r2, [r7, #2] - 8005fec: 429a cmp r2, r3 - 8005fee: d26e bcs.n 80060ce - return; - } - - /* the pbuf chain grows by (new_len - p->tot_len) bytes - * (which may be negative in case of shrinking) */ - grow = new_len - p->tot_len; - 8005ff0: 887b ldrh r3, [r7, #2] - 8005ff2: 687a ldr r2, [r7, #4] - 8005ff4: 8912 ldrh r2, [r2, #8] - 8005ff6: 1a9b subs r3, r3, r2 - 8005ff8: 60fb str r3, [r7, #12] - - /* first, step over any pbufs that should remain in the chain */ - rem_len = new_len; - 8005ffa: 887b ldrh r3, [r7, #2] - 8005ffc: 827b strh r3, [r7, #18] - q = p; - 8005ffe: 687b ldr r3, [r7, #4] - 8006000: 617b str r3, [r7, #20] - /* should this pbuf be kept? */ - while (rem_len > q->len) { - 8006002: e025 b.n 8006050 - /* decrease remaining length by pbuf length */ - rem_len -= q->len; - 8006004: 697b ldr r3, [r7, #20] - 8006006: 895b ldrh r3, [r3, #10] - 8006008: 8a7a ldrh r2, [r7, #18] - 800600a: 1ad3 subs r3, r2, r3 - 800600c: 827b strh r3, [r7, #18] - /* decrease total length indicator */ - LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); - 800600e: 68fb ldr r3, [r7, #12] - 8006010: f64f 72fe movw r2, #65534 ; 0xfffe - 8006014: 4293 cmp r3, r2 - 8006016: dd06 ble.n 8006026 - 8006018: 4b2f ldr r3, [pc, #188] ; (80060d8 ) - 800601a: f240 220b movw r2, #523 ; 0x20b - 800601e: 4932 ldr r1, [pc, #200] ; (80060e8 ) - 8006020: 482f ldr r0, [pc, #188] ; (80060e0 ) - 8006022: f009 fd4f bl 800fac4 - q->tot_len += (u16_t)grow; - 8006026: 697b ldr r3, [r7, #20] - 8006028: 891a ldrh r2, [r3, #8] - 800602a: 68fb ldr r3, [r7, #12] - 800602c: b29b uxth r3, r3 - 800602e: 4413 add r3, r2 - 8006030: b29a uxth r2, r3 - 8006032: 697b ldr r3, [r7, #20] - 8006034: 811a strh r2, [r3, #8] - /* proceed to next pbuf in chain */ - q = q->next; - 8006036: 697b ldr r3, [r7, #20] - 8006038: 681b ldr r3, [r3, #0] - 800603a: 617b str r3, [r7, #20] - LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); - 800603c: 697b ldr r3, [r7, #20] - 800603e: 2b00 cmp r3, #0 - 8006040: d106 bne.n 8006050 - 8006042: 4b25 ldr r3, [pc, #148] ; (80060d8 ) - 8006044: f240 220f movw r2, #527 ; 0x20f - 8006048: 4928 ldr r1, [pc, #160] ; (80060ec ) - 800604a: 4825 ldr r0, [pc, #148] ; (80060e0 ) - 800604c: f009 fd3a bl 800fac4 - while (rem_len > q->len) { - 8006050: 697b ldr r3, [r7, #20] - 8006052: 895b ldrh r3, [r3, #10] - 8006054: 8a7a ldrh r2, [r7, #18] - 8006056: 429a cmp r2, r3 - 8006058: d8d4 bhi.n 8006004 - /* we have now reached the new last pbuf (in q) */ - /* rem_len == desired length for pbuf q */ - - /* shrink allocated memory for PBUF_RAM */ - /* (other types merely adjust their length fields */ - if ((q->type == PBUF_RAM) && (rem_len != q->len) - 800605a: 697b ldr r3, [r7, #20] - 800605c: 7b1b ldrb r3, [r3, #12] - 800605e: 2b00 cmp r3, #0 - 8006060: d121 bne.n 80060a6 - 8006062: 697b ldr r3, [r7, #20] - 8006064: 895b ldrh r3, [r3, #10] - 8006066: 8a7a ldrh r2, [r7, #18] - 8006068: 429a cmp r2, r3 - 800606a: d01c beq.n 80060a6 -#if LWIP_SUPPORT_CUSTOM_PBUF - && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) - 800606c: 697b ldr r3, [r7, #20] - 800606e: 7b5b ldrb r3, [r3, #13] - 8006070: f003 0302 and.w r3, r3, #2 - 8006074: 2b00 cmp r3, #0 - 8006076: d116 bne.n 80060a6 -#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ - ) { - /* reallocate and adjust the length of the pbuf that will be split */ - q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); - 8006078: 697b ldr r3, [r7, #20] - 800607a: 685a ldr r2, [r3, #4] - 800607c: 697b ldr r3, [r7, #20] - 800607e: 1ad3 subs r3, r2, r3 - 8006080: b29a uxth r2, r3 - 8006082: 8a7b ldrh r3, [r7, #18] - 8006084: 4413 add r3, r2 - 8006086: b29b uxth r3, r3 - 8006088: 4619 mov r1, r3 - 800608a: 6978 ldr r0, [r7, #20] - 800608c: f7ff f954 bl 8005338 - 8006090: 6178 str r0, [r7, #20] - LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); - 8006092: 697b ldr r3, [r7, #20] - 8006094: 2b00 cmp r3, #0 - 8006096: d106 bne.n 80060a6 - 8006098: 4b0f ldr r3, [pc, #60] ; (80060d8 ) - 800609a: f240 221d movw r2, #541 ; 0x21d - 800609e: 4914 ldr r1, [pc, #80] ; (80060f0 ) - 80060a0: 480f ldr r0, [pc, #60] ; (80060e0 ) - 80060a2: f009 fd0f bl 800fac4 - } - /* adjust length fields for new last pbuf */ - q->len = rem_len; - 80060a6: 697b ldr r3, [r7, #20] - 80060a8: 8a7a ldrh r2, [r7, #18] - 80060aa: 815a strh r2, [r3, #10] - q->tot_len = q->len; - 80060ac: 697b ldr r3, [r7, #20] - 80060ae: 895a ldrh r2, [r3, #10] - 80060b0: 697b ldr r3, [r7, #20] - 80060b2: 811a strh r2, [r3, #8] - - /* any remaining pbufs in chain? */ - if (q->next != NULL) { - 80060b4: 697b ldr r3, [r7, #20] - 80060b6: 681b ldr r3, [r3, #0] - 80060b8: 2b00 cmp r3, #0 - 80060ba: d004 beq.n 80060c6 - /* free remaining pbufs in chain */ - pbuf_free(q->next); - 80060bc: 697b ldr r3, [r7, #20] - 80060be: 681b ldr r3, [r3, #0] - 80060c0: 4618 mov r0, r3 - 80060c2: f000 f8dd bl 8006280 - } - /* q is last packet in chain */ - q->next = NULL; - 80060c6: 697b ldr r3, [r7, #20] - 80060c8: 2200 movs r2, #0 - 80060ca: 601a str r2, [r3, #0] - 80060cc: e000 b.n 80060d0 - return; - 80060ce: bf00 nop - -} - 80060d0: 3718 adds r7, #24 - 80060d2: 46bd mov sp, r7 - 80060d4: bd80 pop {r7, pc} - 80060d6: bf00 nop - 80060d8: 08010cb8 .word 0x08010cb8 - 80060dc: 08010e74 .word 0x08010e74 - 80060e0: 08010d04 .word 0x08010d04 - 80060e4: 08010e8c .word 0x08010e8c - 80060e8: 08010ea8 .word 0x08010ea8 - 80060ec: 08010ebc .word 0x08010ebc - 80060f0: 08010ed4 .word 0x08010ed4 - -080060f4 : - * @return non-zero on failure, zero on success. - * - */ -static u8_t -pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) -{ - 80060f4: b580 push {r7, lr} - 80060f6: b084 sub sp, #16 - 80060f8: af00 add r7, sp, #0 - 80060fa: 6078 str r0, [r7, #4] - 80060fc: 460b mov r3, r1 - 80060fe: 807b strh r3, [r7, #2] - 8006100: 4613 mov r3, r2 - 8006102: 707b strb r3, [r7, #1] - u16_t type; - void *payload; - u16_t increment_magnitude; - - LWIP_ASSERT("p != NULL", p != NULL); - 8006104: 687b ldr r3, [r7, #4] - 8006106: 2b00 cmp r3, #0 - 8006108: d106 bne.n 8006118 - 800610a: 4b46 ldr r3, [pc, #280] ; (8006224 ) - 800610c: f240 223f movw r2, #575 ; 0x23f - 8006110: 4945 ldr r1, [pc, #276] ; (8006228 ) - 8006112: 4846 ldr r0, [pc, #280] ; (800622c ) - 8006114: f009 fcd6 bl 800fac4 - if ((header_size_increment == 0) || (p == NULL)) { - 8006118: f9b7 3002 ldrsh.w r3, [r7, #2] - 800611c: 2b00 cmp r3, #0 - 800611e: d002 beq.n 8006126 - 8006120: 687b ldr r3, [r7, #4] - 8006122: 2b00 cmp r3, #0 - 8006124: d101 bne.n 800612a - return 0; - 8006126: 2300 movs r3, #0 - 8006128: e078 b.n 800621c - } - - if (header_size_increment < 0) { - 800612a: f9b7 3002 ldrsh.w r3, [r7, #2] - 800612e: 2b00 cmp r3, #0 - 8006130: da10 bge.n 8006154 - increment_magnitude = (u16_t)-header_size_increment; - 8006132: 887b ldrh r3, [r7, #2] - 8006134: 425b negs r3, r3 - 8006136: 81fb strh r3, [r7, #14] - /* 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;); - 8006138: 687b ldr r3, [r7, #4] - 800613a: 895b ldrh r3, [r3, #10] - 800613c: 89fa ldrh r2, [r7, #14] - 800613e: 429a cmp r2, r3 - 8006140: d90a bls.n 8006158 - 8006142: 4b38 ldr r3, [pc, #224] ; (8006224 ) - 8006144: f240 2247 movw r2, #583 ; 0x247 - 8006148: 4939 ldr r1, [pc, #228] ; (8006230 ) - 800614a: 4838 ldr r0, [pc, #224] ; (800622c ) - 800614c: f009 fcba bl 800fac4 - 8006150: 2301 movs r3, #1 - 8006152: e063 b.n 800621c - } else { - increment_magnitude = (u16_t)header_size_increment; - 8006154: 887b ldrh r3, [r7, #2] - 8006156: 81fb strh r3, [r7, #14] - LWIP_ASSERT("p->payload - increment_magnitude >= p + SIZEOF_STRUCT_PBUF", - (u8_t *)p->payload - increment_magnitude >= (u8_t *)p + SIZEOF_STRUCT_PBUF); -#endif - } - - type = p->type; - 8006158: 687b ldr r3, [r7, #4] - 800615a: 7b1b ldrb r3, [r3, #12] - 800615c: 81bb strh r3, [r7, #12] - /* remember current payload pointer */ - payload = p->payload; - 800615e: 687b ldr r3, [r7, #4] - 8006160: 685b ldr r3, [r3, #4] - 8006162: 60bb str r3, [r7, #8] - - /* pbuf types containing payloads? */ - if (type == PBUF_RAM || type == PBUF_POOL) { - 8006164: 89bb ldrh r3, [r7, #12] - 8006166: 2b00 cmp r3, #0 - 8006168: d002 beq.n 8006170 - 800616a: 89bb ldrh r3, [r7, #12] - 800616c: 2b03 cmp r3, #3 - 800616e: d112 bne.n 8006196 - /* set new payload pointer */ - p->payload = (u8_t *)p->payload - header_size_increment; - 8006170: 687b ldr r3, [r7, #4] - 8006172: 685a ldr r2, [r3, #4] - 8006174: f9b7 3002 ldrsh.w r3, [r7, #2] - 8006178: 425b negs r3, r3 - 800617a: 441a add r2, r3 - 800617c: 687b ldr r3, [r7, #4] - 800617e: 605a str r2, [r3, #4] - /* boundary check fails? */ - if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { - 8006180: 687b ldr r3, [r7, #4] - 8006182: 685a ldr r2, [r3, #4] - 8006184: 687b ldr r3, [r7, #4] - 8006186: 3310 adds r3, #16 - 8006188: 429a cmp r2, r3 - 800618a: d238 bcs.n 80061fe - LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, - ("pbuf_header: failed as %p < %p (not enough space for new header size)\n", - (void *)p->payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF))); - /* restore old payload pointer */ - p->payload = payload; - 800618c: 687b ldr r3, [r7, #4] - 800618e: 68ba ldr r2, [r7, #8] - 8006190: 605a str r2, [r3, #4] - /* bail out unsuccessfully */ - return 1; - 8006192: 2301 movs r3, #1 - 8006194: e042 b.n 800621c - } - /* pbuf types referring to external payloads? */ - } else if (type == PBUF_REF || type == PBUF_ROM) { - 8006196: 89bb ldrh r3, [r7, #12] - 8006198: 2b02 cmp r3, #2 - 800619a: d002 beq.n 80061a2 - 800619c: 89bb ldrh r3, [r7, #12] - 800619e: 2b01 cmp r3, #1 - 80061a0: d124 bne.n 80061ec - /* hide a header in the payload? */ - if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { - 80061a2: f9b7 3002 ldrsh.w r3, [r7, #2] - 80061a6: 2b00 cmp r3, #0 - 80061a8: da0d bge.n 80061c6 - 80061aa: 687b ldr r3, [r7, #4] - 80061ac: 895b ldrh r3, [r3, #10] - 80061ae: 89fa ldrh r2, [r7, #14] - 80061b0: 429a cmp r2, r3 - 80061b2: d808 bhi.n 80061c6 - /* increase payload pointer */ - p->payload = (u8_t *)p->payload - header_size_increment; - 80061b4: 687b ldr r3, [r7, #4] - 80061b6: 685a ldr r2, [r3, #4] - 80061b8: f9b7 3002 ldrsh.w r3, [r7, #2] - 80061bc: 425b negs r3, r3 - 80061be: 441a add r2, r3 - 80061c0: 687b ldr r3, [r7, #4] - 80061c2: 605a str r2, [r3, #4] - 80061c4: e011 b.n 80061ea - } else if ((header_size_increment > 0) && force) { - 80061c6: f9b7 3002 ldrsh.w r3, [r7, #2] - 80061ca: 2b00 cmp r3, #0 - 80061cc: dd0b ble.n 80061e6 - 80061ce: 787b ldrb r3, [r7, #1] - 80061d0: 2b00 cmp r3, #0 - 80061d2: d008 beq.n 80061e6 - p->payload = (u8_t *)p->payload - header_size_increment; - 80061d4: 687b ldr r3, [r7, #4] - 80061d6: 685a ldr r2, [r3, #4] - 80061d8: f9b7 3002 ldrsh.w r3, [r7, #2] - 80061dc: 425b negs r3, r3 - 80061de: 441a add r2, r3 - 80061e0: 687b ldr r3, [r7, #4] - 80061e2: 605a str r2, [r3, #4] - 80061e4: e001 b.n 80061ea - } else { - /* cannot expand payload to front (yet!) - * bail out unsuccessfully */ - return 1; - 80061e6: 2301 movs r3, #1 - 80061e8: e018 b.n 800621c - if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { - 80061ea: e008 b.n 80061fe - } - } else { - /* Unknown type */ - LWIP_ASSERT("bad pbuf type", 0); - 80061ec: 4b0d ldr r3, [pc, #52] ; (8006224 ) - 80061ee: f240 2277 movw r2, #631 ; 0x277 - 80061f2: 4910 ldr r1, [pc, #64] ; (8006234 ) - 80061f4: 480d ldr r0, [pc, #52] ; (800622c ) - 80061f6: f009 fc65 bl 800fac4 - return 1; - 80061fa: 2301 movs r3, #1 - 80061fc: e00e b.n 800621c - } - /* modify pbuf length fields */ - p->len += header_size_increment; - 80061fe: 687b ldr r3, [r7, #4] - 8006200: 895a ldrh r2, [r3, #10] - 8006202: 887b ldrh r3, [r7, #2] - 8006204: 4413 add r3, r2 - 8006206: b29a uxth r2, r3 - 8006208: 687b ldr r3, [r7, #4] - 800620a: 815a strh r2, [r3, #10] - p->tot_len += header_size_increment; - 800620c: 687b ldr r3, [r7, #4] - 800620e: 891a ldrh r2, [r3, #8] - 8006210: 887b ldrh r3, [r7, #2] - 8006212: 4413 add r3, r2 - 8006214: b29a uxth r2, r3 - 8006216: 687b ldr r3, [r7, #4] - 8006218: 811a strh r2, [r3, #8] - - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", - (void *)payload, (void *)p->payload, header_size_increment)); - - return 0; - 800621a: 2300 movs r3, #0 -} - 800621c: 4618 mov r0, r3 - 800621e: 3710 adds r7, #16 - 8006220: 46bd mov sp, r7 - 8006222: bd80 pop {r7, pc} - 8006224: 08010cb8 .word 0x08010cb8 - 8006228: 08010ef0 .word 0x08010ef0 - 800622c: 08010d04 .word 0x08010d04 - 8006230: 08010efc .word 0x08010efc - 8006234: 08010f1c .word 0x08010f1c - -08006238 : - * @return non-zero on failure, zero on success. - * - */ -u8_t -pbuf_header(struct pbuf *p, s16_t header_size_increment) -{ - 8006238: b580 push {r7, lr} - 800623a: b082 sub sp, #8 - 800623c: af00 add r7, sp, #0 - 800623e: 6078 str r0, [r7, #4] - 8006240: 460b mov r3, r1 - 8006242: 807b strh r3, [r7, #2] - return pbuf_header_impl(p, header_size_increment, 0); - 8006244: f9b7 3002 ldrsh.w r3, [r7, #2] - 8006248: 2200 movs r2, #0 - 800624a: 4619 mov r1, r3 - 800624c: 6878 ldr r0, [r7, #4] - 800624e: f7ff ff51 bl 80060f4 - 8006252: 4603 mov r3, r0 -} - 8006254: 4618 mov r0, r3 - 8006256: 3708 adds r7, #8 - 8006258: 46bd mov sp, r7 - 800625a: bd80 pop {r7, pc} - -0800625c : - * 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) -{ - 800625c: b580 push {r7, lr} - 800625e: b082 sub sp, #8 - 8006260: af00 add r7, sp, #0 - 8006262: 6078 str r0, [r7, #4] - 8006264: 460b mov r3, r1 - 8006266: 807b strh r3, [r7, #2] - return pbuf_header_impl(p, header_size_increment, 1); - 8006268: f9b7 3002 ldrsh.w r3, [r7, #2] - 800626c: 2201 movs r2, #1 - 800626e: 4619 mov r1, r3 - 8006270: 6878 ldr r0, [r7, #4] - 8006272: f7ff ff3f bl 80060f4 - 8006276: 4603 mov r3, r0 -} - 8006278: 4618 mov r0, r3 - 800627a: 3708 adds r7, #8 - 800627c: 46bd mov sp, r7 - 800627e: bd80 pop {r7, pc} - -08006280 : - * 1->1->1 becomes ....... - * - */ -u8_t -pbuf_free(struct pbuf *p) -{ - 8006280: b580 push {r7, lr} - 8006282: b086 sub sp, #24 - 8006284: af00 add r7, sp, #0 - 8006286: 6078 str r0, [r7, #4] - u16_t type; - struct pbuf *q; - u8_t count; - - if (p == NULL) { - 8006288: 687b ldr r3, [r7, #4] - 800628a: 2b00 cmp r3, #0 - 800628c: d10b bne.n 80062a6 - LWIP_ASSERT("p != NULL", p != NULL); - 800628e: 687b ldr r3, [r7, #4] - 8006290: 2b00 cmp r3, #0 - 8006292: d106 bne.n 80062a2 - 8006294: 4b3e ldr r3, [pc, #248] ; (8006390 ) - 8006296: f240 22d2 movw r2, #722 ; 0x2d2 - 800629a: 493e ldr r1, [pc, #248] ; (8006394 ) - 800629c: 483e ldr r0, [pc, #248] ; (8006398 ) - 800629e: f009 fc11 bl 800fac4 - /* if assertions are disabled, proceed with debug output */ - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("pbuf_free(p == NULL) was called.\n")); - return 0; - 80062a2: 2300 movs r3, #0 - 80062a4: e070 b.n 8006388 - } - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); - - PERF_START; - - LWIP_ASSERT("pbuf_free: sane type", - 80062a6: 687b ldr r3, [r7, #4] - 80062a8: 7b1b ldrb r3, [r3, #12] - 80062aa: 2b00 cmp r3, #0 - 80062ac: d012 beq.n 80062d4 - 80062ae: 687b ldr r3, [r7, #4] - 80062b0: 7b1b ldrb r3, [r3, #12] - 80062b2: 2b01 cmp r3, #1 - 80062b4: d00e beq.n 80062d4 - 80062b6: 687b ldr r3, [r7, #4] - 80062b8: 7b1b ldrb r3, [r3, #12] - 80062ba: 2b02 cmp r3, #2 - 80062bc: d00a beq.n 80062d4 - 80062be: 687b ldr r3, [r7, #4] - 80062c0: 7b1b ldrb r3, [r3, #12] - 80062c2: 2b03 cmp r3, #3 - 80062c4: d006 beq.n 80062d4 - 80062c6: 4b32 ldr r3, [pc, #200] ; (8006390 ) - 80062c8: f44f 7237 mov.w r2, #732 ; 0x2dc - 80062cc: 4933 ldr r1, [pc, #204] ; (800639c ) - 80062ce: 4832 ldr r0, [pc, #200] ; (8006398 ) - 80062d0: f009 fbf8 bl 800fac4 - p->type == PBUF_RAM || p->type == PBUF_ROM || - p->type == PBUF_REF || p->type == PBUF_POOL); - - count = 0; - 80062d4: 2300 movs r3, #0 - 80062d6: 75fb strb r3, [r7, #23] - /* de-allocate all consecutive pbufs from the head of the chain that - * obtain a zero reference count after decrementing*/ - while (p != NULL) { - 80062d8: e052 b.n 8006380 - /* Since decrementing ref cannot be guaranteed to be a single machine operation - * we must protect it. We put the new ref into a local variable to prevent - * further protection. */ - SYS_ARCH_PROTECT(old_level); - /* all pbufs in a chain are referenced at least once */ - LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); - 80062da: 687b ldr r3, [r7, #4] - 80062dc: 89db ldrh r3, [r3, #14] - 80062de: 2b00 cmp r3, #0 - 80062e0: d106 bne.n 80062f0 - 80062e2: 4b2b ldr r3, [pc, #172] ; (8006390 ) - 80062e4: f240 22eb movw r2, #747 ; 0x2eb - 80062e8: 492d ldr r1, [pc, #180] ; (80063a0 ) - 80062ea: 482b ldr r0, [pc, #172] ; (8006398 ) - 80062ec: f009 fbea bl 800fac4 - /* decrease reference count (number of pointers to pbuf) */ - ref = --(p->ref); - 80062f0: 687b ldr r3, [r7, #4] - 80062f2: 89db ldrh r3, [r3, #14] - 80062f4: 3b01 subs r3, #1 - 80062f6: b29a uxth r2, r3 - 80062f8: 687b ldr r3, [r7, #4] - 80062fa: 81da strh r2, [r3, #14] - 80062fc: 687b ldr r3, [r7, #4] - 80062fe: 89db ldrh r3, [r3, #14] - 8006300: 82bb strh r3, [r7, #20] - SYS_ARCH_UNPROTECT(old_level); - /* this pbuf is no longer referenced to? */ - if (ref == 0) { - 8006302: 8abb ldrh r3, [r7, #20] - 8006304: 2b00 cmp r3, #0 - 8006306: d139 bne.n 800637c - /* remember next pbuf in chain for next iteration */ - q = p->next; - 8006308: 687b ldr r3, [r7, #4] - 800630a: 681b ldr r3, [r3, #0] - 800630c: 613b str r3, [r7, #16] - LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p)); - type = p->type; - 800630e: 687b ldr r3, [r7, #4] - 8006310: 7b1b ldrb r3, [r3, #12] - 8006312: 81fb strh r3, [r7, #14] -#if LWIP_SUPPORT_CUSTOM_PBUF - /* is this a custom pbuf? */ - if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { - 8006314: 687b ldr r3, [r7, #4] - 8006316: 7b5b ldrb r3, [r3, #13] - 8006318: f003 0302 and.w r3, r3, #2 - 800631c: 2b00 cmp r3, #0 - 800631e: d011 beq.n 8006344 - struct pbuf_custom *pc = (struct pbuf_custom*)p; - 8006320: 687b ldr r3, [r7, #4] - 8006322: 60bb str r3, [r7, #8] - LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); - 8006324: 68bb ldr r3, [r7, #8] - 8006326: 691b ldr r3, [r3, #16] - 8006328: 2b00 cmp r3, #0 - 800632a: d106 bne.n 800633a - 800632c: 4b18 ldr r3, [pc, #96] ; (8006390 ) - 800632e: f240 22f9 movw r2, #761 ; 0x2f9 - 8006332: 491c ldr r1, [pc, #112] ; (80063a4 ) - 8006334: 4818 ldr r0, [pc, #96] ; (8006398 ) - 8006336: f009 fbc5 bl 800fac4 - pc->custom_free_function(p); - 800633a: 68bb ldr r3, [r7, #8] - 800633c: 691b ldr r3, [r3, #16] - 800633e: 6878 ldr r0, [r7, #4] - 8006340: 4798 blx r3 - 8006342: e015 b.n 8006370 - } else -#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ - { - /* is this a pbuf from the pool? */ - if (type == PBUF_POOL) { - 8006344: 89fb ldrh r3, [r7, #14] - 8006346: 2b03 cmp r3, #3 - 8006348: d104 bne.n 8006354 - memp_free(MEMP_PBUF_POOL, p); - 800634a: 6879 ldr r1, [r7, #4] - 800634c: 2008 movs r0, #8 - 800634e: f7ff fa77 bl 8005840 - 8006352: e00d b.n 8006370 - /* is this a ROM or RAM referencing pbuf? */ - } else if (type == PBUF_ROM || type == PBUF_REF) { - 8006354: 89fb ldrh r3, [r7, #14] - 8006356: 2b01 cmp r3, #1 - 8006358: d002 beq.n 8006360 - 800635a: 89fb ldrh r3, [r7, #14] - 800635c: 2b02 cmp r3, #2 - 800635e: d104 bne.n 800636a - memp_free(MEMP_PBUF, p); - 8006360: 6879 ldr r1, [r7, #4] - 8006362: 2007 movs r0, #7 - 8006364: f7ff fa6c bl 8005840 - 8006368: e002 b.n 8006370 - /* type == PBUF_RAM */ - } else { - mem_free(p); - 800636a: 6878 ldr r0, [r7, #4] - 800636c: f7fe ff82 bl 8005274 - } - } - count++; - 8006370: 7dfb ldrb r3, [r7, #23] - 8006372: 3301 adds r3, #1 - 8006374: 75fb strb r3, [r7, #23] - /* proceed to next pbuf */ - p = q; - 8006376: 693b ldr r3, [r7, #16] - 8006378: 607b str r3, [r7, #4] - 800637a: e001 b.n 8006380 - /* p->ref > 0, this pbuf is still referenced to */ - /* (and so the remaining pbufs in chain as well) */ - } else { - LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, ref)); - /* stop walking through the chain */ - p = NULL; - 800637c: 2300 movs r3, #0 - 800637e: 607b str r3, [r7, #4] - while (p != NULL) { - 8006380: 687b ldr r3, [r7, #4] - 8006382: 2b00 cmp r3, #0 - 8006384: d1a9 bne.n 80062da - } - } - PERF_STOP("pbuf_free"); - /* return number of de-allocated pbufs */ - return count; - 8006386: 7dfb ldrb r3, [r7, #23] -} - 8006388: 4618 mov r0, r3 - 800638a: 3718 adds r7, #24 - 800638c: 46bd mov sp, r7 - 800638e: bd80 pop {r7, pc} - 8006390: 08010cb8 .word 0x08010cb8 - 8006394: 08010ef0 .word 0x08010ef0 - 8006398: 08010d04 .word 0x08010d04 - 800639c: 08010f2c .word 0x08010f2c - 80063a0: 08010f44 .word 0x08010f44 - 80063a4: 08010f5c .word 0x08010f5c - -080063a8 : - * @param p first pbuf of chain - * @return the number of pbufs in a chain - */ -u16_t -pbuf_clen(const struct pbuf *p) -{ - 80063a8: b480 push {r7} - 80063aa: b085 sub sp, #20 - 80063ac: af00 add r7, sp, #0 - 80063ae: 6078 str r0, [r7, #4] - u16_t len; - - len = 0; - 80063b0: 2300 movs r3, #0 - 80063b2: 81fb strh r3, [r7, #14] - while (p != NULL) { - 80063b4: e005 b.n 80063c2 - ++len; - 80063b6: 89fb ldrh r3, [r7, #14] - 80063b8: 3301 adds r3, #1 - 80063ba: 81fb strh r3, [r7, #14] - p = p->next; - 80063bc: 687b ldr r3, [r7, #4] - 80063be: 681b ldr r3, [r3, #0] - 80063c0: 607b str r3, [r7, #4] - while (p != NULL) { - 80063c2: 687b ldr r3, [r7, #4] - 80063c4: 2b00 cmp r3, #0 - 80063c6: d1f6 bne.n 80063b6 - } - return len; - 80063c8: 89fb ldrh r3, [r7, #14] -} - 80063ca: 4618 mov r0, r3 - 80063cc: 3714 adds r7, #20 - 80063ce: 46bd mov sp, r7 - 80063d0: bc80 pop {r7} - 80063d2: 4770 bx lr - -080063d4 : - * @param p pbuf to increase reference counter of - * - */ -void -pbuf_ref(struct pbuf *p) -{ - 80063d4: b580 push {r7, lr} - 80063d6: b082 sub sp, #8 - 80063d8: af00 add r7, sp, #0 - 80063da: 6078 str r0, [r7, #4] - /* pbuf given? */ - if (p != NULL) { - 80063dc: 687b ldr r3, [r7, #4] - 80063de: 2b00 cmp r3, #0 - 80063e0: d010 beq.n 8006404 - SYS_ARCH_INC(p->ref, 1); - 80063e2: 687b ldr r3, [r7, #4] - 80063e4: 89db ldrh r3, [r3, #14] - 80063e6: 3301 adds r3, #1 - 80063e8: b29a uxth r2, r3 - 80063ea: 687b ldr r3, [r7, #4] - 80063ec: 81da strh r2, [r3, #14] - LWIP_ASSERT("pbuf ref overflow", p->ref > 0); - 80063ee: 687b ldr r3, [r7, #4] - 80063f0: 89db ldrh r3, [r3, #14] - 80063f2: 2b00 cmp r3, #0 - 80063f4: d106 bne.n 8006404 - 80063f6: 4b05 ldr r3, [pc, #20] ; (800640c ) - 80063f8: f240 3239 movw r2, #825 ; 0x339 - 80063fc: 4904 ldr r1, [pc, #16] ; (8006410 ) - 80063fe: 4805 ldr r0, [pc, #20] ; (8006414 ) - 8006400: f009 fb60 bl 800fac4 - } -} - 8006404: bf00 nop - 8006406: 3708 adds r7, #8 - 8006408: 46bd mov sp, r7 - 800640a: bd80 pop {r7, pc} - 800640c: 08010cb8 .word 0x08010cb8 - 8006410: 08010f80 .word 0x08010f80 - 8006414: 08010d04 .word 0x08010d04 - -08006418 : - * - * @see pbuf_chain() - */ -void -pbuf_cat(struct pbuf *h, struct pbuf *t) -{ - 8006418: b580 push {r7, lr} - 800641a: b084 sub sp, #16 - 800641c: af00 add r7, sp, #0 - 800641e: 6078 str r0, [r7, #4] - 8006420: 6039 str r1, [r7, #0] - struct pbuf *p; - - LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", - 8006422: 687b ldr r3, [r7, #4] - 8006424: 2b00 cmp r3, #0 - 8006426: d002 beq.n 800642e - 8006428: 683b ldr r3, [r7, #0] - 800642a: 2b00 cmp r3, #0 - 800642c: d107 bne.n 800643e - 800642e: 4b20 ldr r3, [pc, #128] ; (80064b0 ) - 8006430: f44f 7253 mov.w r2, #844 ; 0x34c - 8006434: 491f ldr r1, [pc, #124] ; (80064b4 ) - 8006436: 4820 ldr r0, [pc, #128] ; (80064b8 ) - 8006438: f009 fb44 bl 800fac4 - 800643c: e034 b.n 80064a8 - ((h != NULL) && (t != NULL)), return;); - - /* proceed to last pbuf of chain */ - for (p = h; p->next != NULL; p = p->next) { - 800643e: 687b ldr r3, [r7, #4] - 8006440: 60fb str r3, [r7, #12] - 8006442: e00a b.n 800645a - /* add total length of second chain to all totals of first chain */ - p->tot_len += t->tot_len; - 8006444: 68fb ldr r3, [r7, #12] - 8006446: 891a ldrh r2, [r3, #8] - 8006448: 683b ldr r3, [r7, #0] - 800644a: 891b ldrh r3, [r3, #8] - 800644c: 4413 add r3, r2 - 800644e: b29a uxth r2, r3 - 8006450: 68fb ldr r3, [r7, #12] - 8006452: 811a strh r2, [r3, #8] - for (p = h; p->next != NULL; p = p->next) { - 8006454: 68fb ldr r3, [r7, #12] - 8006456: 681b ldr r3, [r3, #0] - 8006458: 60fb str r3, [r7, #12] - 800645a: 68fb ldr r3, [r7, #12] - 800645c: 681b ldr r3, [r3, #0] - 800645e: 2b00 cmp r3, #0 - 8006460: d1f0 bne.n 8006444 - } - /* { 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); - 8006462: 68fb ldr r3, [r7, #12] - 8006464: 891a ldrh r2, [r3, #8] - 8006466: 68fb ldr r3, [r7, #12] - 8006468: 895b ldrh r3, [r3, #10] - 800646a: 429a cmp r2, r3 - 800646c: d006 beq.n 800647c - 800646e: 4b10 ldr r3, [pc, #64] ; (80064b0 ) - 8006470: f240 3255 movw r2, #853 ; 0x355 - 8006474: 4911 ldr r1, [pc, #68] ; (80064bc ) - 8006476: 4810 ldr r0, [pc, #64] ; (80064b8 ) - 8006478: f009 fb24 bl 800fac4 - LWIP_ASSERT("p->next == NULL", p->next == NULL); - 800647c: 68fb ldr r3, [r7, #12] - 800647e: 681b ldr r3, [r3, #0] - 8006480: 2b00 cmp r3, #0 - 8006482: d006 beq.n 8006492 - 8006484: 4b0a ldr r3, [pc, #40] ; (80064b0 ) - 8006486: f240 3256 movw r2, #854 ; 0x356 - 800648a: 490d ldr r1, [pc, #52] ; (80064c0 ) - 800648c: 480a ldr r0, [pc, #40] ; (80064b8 ) - 800648e: f009 fb19 bl 800fac4 - /* add total length of second chain to last pbuf total of first chain */ - p->tot_len += t->tot_len; - 8006492: 68fb ldr r3, [r7, #12] - 8006494: 891a ldrh r2, [r3, #8] - 8006496: 683b ldr r3, [r7, #0] - 8006498: 891b ldrh r3, [r3, #8] - 800649a: 4413 add r3, r2 - 800649c: b29a uxth r2, r3 - 800649e: 68fb ldr r3, [r7, #12] - 80064a0: 811a strh r2, [r3, #8] - /* chain last pbuf of head (p) with first of tail (t) */ - p->next = t; - 80064a2: 68fb ldr r3, [r7, #12] - 80064a4: 683a ldr r2, [r7, #0] - 80064a6: 601a str r2, [r3, #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. - */ -} - 80064a8: 3710 adds r7, #16 - 80064aa: 46bd mov sp, r7 - 80064ac: bd80 pop {r7, pc} - 80064ae: bf00 nop - 80064b0: 08010cb8 .word 0x08010cb8 - 80064b4: 08010f94 .word 0x08010f94 - 80064b8: 08010d04 .word 0x08010d04 - 80064bc: 08010fcc .word 0x08010fcc - 80064c0: 08010ffc .word 0x08010ffc - -080064c4 : - * The ->ref field of the first pbuf of the tail chain is adjusted. - * - */ -void -pbuf_chain(struct pbuf *h, struct pbuf *t) -{ - 80064c4: b580 push {r7, lr} - 80064c6: b082 sub sp, #8 - 80064c8: af00 add r7, sp, #0 - 80064ca: 6078 str r0, [r7, #4] - 80064cc: 6039 str r1, [r7, #0] - pbuf_cat(h, t); - 80064ce: 6839 ldr r1, [r7, #0] - 80064d0: 6878 ldr r0, [r7, #4] - 80064d2: f7ff ffa1 bl 8006418 - /* t is now referenced by h */ - pbuf_ref(t); - 80064d6: 6838 ldr r0, [r7, #0] - 80064d8: f7ff ff7c bl 80063d4 - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); -} - 80064dc: bf00 nop - 80064de: 3708 adds r7, #8 - 80064e0: 46bd mov sp, r7 - 80064e2: bd80 pop {r7, pc} - -080064e4 : - * 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) -{ - 80064e4: b580 push {r7, lr} - 80064e6: b084 sub sp, #16 - 80064e8: af00 add r7, sp, #0 - 80064ea: 6078 str r0, [r7, #4] - 80064ec: 6039 str r1, [r7, #0] - u16_t offset_to=0, offset_from=0, len; - 80064ee: 2300 movs r3, #0 - 80064f0: 81fb strh r3, [r7, #14] - 80064f2: 2300 movs r3, #0 - 80064f4: 81bb strh r3, [r7, #12] - - 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) && - 80064f6: 687b ldr r3, [r7, #4] - 80064f8: 2b00 cmp r3, #0 - 80064fa: d008 beq.n 800650e - 80064fc: 683b ldr r3, [r7, #0] - 80064fe: 2b00 cmp r3, #0 - 8006500: d005 beq.n 800650e - 8006502: 687b ldr r3, [r7, #4] - 8006504: 891a ldrh r2, [r3, #8] - 8006506: 683b ldr r3, [r7, #0] - 8006508: 891b ldrh r3, [r3, #8] - 800650a: 429a cmp r2, r3 - 800650c: d209 bcs.n 8006522 - 800650e: 4b54 ldr r3, [pc, #336] ; (8006660 ) - 8006510: f44f 726f mov.w r2, #956 ; 0x3bc - 8006514: 4953 ldr r1, [pc, #332] ; (8006664 ) - 8006516: 4854 ldr r0, [pc, #336] ; (8006668 ) - 8006518: f009 fad4 bl 800fac4 - 800651c: f06f 030f mvn.w r3, #15 - 8006520: e099 b.n 8006656 - - /* iterate through pbuf chain */ - do - { - /* copy one part of the original chain */ - if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { - 8006522: 687b ldr r3, [r7, #4] - 8006524: 895b ldrh r3, [r3, #10] - 8006526: 461a mov r2, r3 - 8006528: 89fb ldrh r3, [r7, #14] - 800652a: 1ad2 subs r2, r2, r3 - 800652c: 683b ldr r3, [r7, #0] - 800652e: 895b ldrh r3, [r3, #10] - 8006530: 4619 mov r1, r3 - 8006532: 89bb ldrh r3, [r7, #12] - 8006534: 1acb subs r3, r1, r3 - 8006536: 429a cmp r2, r3 - 8006538: db05 blt.n 8006546 - /* complete current p_from fits into current p_to */ - len = p_from->len - offset_from; - 800653a: 683b ldr r3, [r7, #0] - 800653c: 895a ldrh r2, [r3, #10] - 800653e: 89bb ldrh r3, [r7, #12] - 8006540: 1ad3 subs r3, r2, r3 - 8006542: 817b strh r3, [r7, #10] - 8006544: e004 b.n 8006550 - } else { - /* current p_from does not fit into current p_to */ - len = p_to->len - offset_to; - 8006546: 687b ldr r3, [r7, #4] - 8006548: 895a ldrh r2, [r3, #10] - 800654a: 89fb ldrh r3, [r7, #14] - 800654c: 1ad3 subs r3, r2, r3 - 800654e: 817b strh r3, [r7, #10] - } - MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); - 8006550: 687b ldr r3, [r7, #4] - 8006552: 685a ldr r2, [r3, #4] - 8006554: 89fb ldrh r3, [r7, #14] - 8006556: 18d0 adds r0, r2, r3 - 8006558: 683b ldr r3, [r7, #0] - 800655a: 685a ldr r2, [r3, #4] - 800655c: 89bb ldrh r3, [r7, #12] - 800655e: 4413 add r3, r2 - 8006560: 897a ldrh r2, [r7, #10] - 8006562: 4619 mov r1, r3 - 8006564: f009 fc1c bl 800fda0 - offset_to += len; - 8006568: 89fa ldrh r2, [r7, #14] - 800656a: 897b ldrh r3, [r7, #10] - 800656c: 4413 add r3, r2 - 800656e: 81fb strh r3, [r7, #14] - offset_from += len; - 8006570: 89ba ldrh r2, [r7, #12] - 8006572: 897b ldrh r3, [r7, #10] - 8006574: 4413 add r3, r2 - 8006576: 81bb strh r3, [r7, #12] - LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); - 8006578: 687b ldr r3, [r7, #4] - 800657a: 895b ldrh r3, [r3, #10] - 800657c: 89fa ldrh r2, [r7, #14] - 800657e: 429a cmp r2, r3 - 8006580: d906 bls.n 8006590 - 8006582: 4b37 ldr r3, [pc, #220] ; (8006660 ) - 8006584: f240 32cd movw r2, #973 ; 0x3cd - 8006588: 4938 ldr r1, [pc, #224] ; (800666c ) - 800658a: 4837 ldr r0, [pc, #220] ; (8006668 ) - 800658c: f009 fa9a bl 800fac4 - LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); - 8006590: 683b ldr r3, [r7, #0] - 8006592: 895b ldrh r3, [r3, #10] - 8006594: 89ba ldrh r2, [r7, #12] - 8006596: 429a cmp r2, r3 - 8006598: d906 bls.n 80065a8 - 800659a: 4b31 ldr r3, [pc, #196] ; (8006660 ) - 800659c: f240 32ce movw r2, #974 ; 0x3ce - 80065a0: 4933 ldr r1, [pc, #204] ; (8006670 ) - 80065a2: 4831 ldr r0, [pc, #196] ; (8006668 ) - 80065a4: f009 fa8e bl 800fac4 - if (offset_from >= p_from->len) { - 80065a8: 683b ldr r3, [r7, #0] - 80065aa: 895b ldrh r3, [r3, #10] - 80065ac: 89ba ldrh r2, [r7, #12] - 80065ae: 429a cmp r2, r3 - 80065b0: d304 bcc.n 80065bc - /* on to next p_from (if any) */ - offset_from = 0; - 80065b2: 2300 movs r3, #0 - 80065b4: 81bb strh r3, [r7, #12] - p_from = p_from->next; - 80065b6: 683b ldr r3, [r7, #0] - 80065b8: 681b ldr r3, [r3, #0] - 80065ba: 603b str r3, [r7, #0] - } - if (offset_to == p_to->len) { - 80065bc: 687b ldr r3, [r7, #4] - 80065be: 895b ldrh r3, [r3, #10] - 80065c0: 89fa ldrh r2, [r7, #14] - 80065c2: 429a cmp r2, r3 - 80065c4: d114 bne.n 80065f0 - /* on to next p_to (if any) */ - offset_to = 0; - 80065c6: 2300 movs r3, #0 - 80065c8: 81fb strh r3, [r7, #14] - p_to = p_to->next; - 80065ca: 687b ldr r3, [r7, #4] - 80065cc: 681b ldr r3, [r3, #0] - 80065ce: 607b str r3, [r7, #4] - LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); - 80065d0: 687b ldr r3, [r7, #4] - 80065d2: 2b00 cmp r3, #0 - 80065d4: d10c bne.n 80065f0 - 80065d6: 683b ldr r3, [r7, #0] - 80065d8: 2b00 cmp r3, #0 - 80065da: d009 beq.n 80065f0 - 80065dc: 4b20 ldr r3, [pc, #128] ; (8006660 ) - 80065de: f44f 7276 mov.w r2, #984 ; 0x3d8 - 80065e2: 4924 ldr r1, [pc, #144] ; (8006674 ) - 80065e4: 4820 ldr r0, [pc, #128] ; (8006668 ) - 80065e6: f009 fa6d bl 800fac4 - 80065ea: f06f 030f mvn.w r3, #15 - 80065ee: e032 b.n 8006656 - } - - if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { - 80065f0: 683b ldr r3, [r7, #0] - 80065f2: 2b00 cmp r3, #0 - 80065f4: d013 beq.n 800661e - 80065f6: 683b ldr r3, [r7, #0] - 80065f8: 895a ldrh r2, [r3, #10] - 80065fa: 683b ldr r3, [r7, #0] - 80065fc: 891b ldrh r3, [r3, #8] - 80065fe: 429a cmp r2, r3 - 8006600: d10d bne.n 800661e - /* don't copy more than one packet! */ - LWIP_ERROR("pbuf_copy() does not allow packet queues!", - 8006602: 683b ldr r3, [r7, #0] - 8006604: 681b ldr r3, [r3, #0] - 8006606: 2b00 cmp r3, #0 - 8006608: d009 beq.n 800661e - 800660a: 4b15 ldr r3, [pc, #84] ; (8006660 ) - 800660c: f240 32dd movw r2, #989 ; 0x3dd - 8006610: 4919 ldr r1, [pc, #100] ; (8006678 ) - 8006612: 4815 ldr r0, [pc, #84] ; (8006668 ) - 8006614: f009 fa56 bl 800fac4 - 8006618: f06f 0305 mvn.w r3, #5 - 800661c: e01b b.n 8006656 - (p_from->next == NULL), return ERR_VAL;); - } - if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { - 800661e: 687b ldr r3, [r7, #4] - 8006620: 2b00 cmp r3, #0 - 8006622: d013 beq.n 800664c - 8006624: 687b ldr r3, [r7, #4] - 8006626: 895a ldrh r2, [r3, #10] - 8006628: 687b ldr r3, [r7, #4] - 800662a: 891b ldrh r3, [r3, #8] - 800662c: 429a cmp r2, r3 - 800662e: d10d bne.n 800664c - /* don't copy more than one packet! */ - LWIP_ERROR("pbuf_copy() does not allow packet queues!", - 8006630: 687b ldr r3, [r7, #4] - 8006632: 681b ldr r3, [r3, #0] - 8006634: 2b00 cmp r3, #0 - 8006636: d009 beq.n 800664c - 8006638: 4b09 ldr r3, [pc, #36] ; (8006660 ) - 800663a: f240 32e2 movw r2, #994 ; 0x3e2 - 800663e: 490e ldr r1, [pc, #56] ; (8006678 ) - 8006640: 4809 ldr r0, [pc, #36] ; (8006668 ) - 8006642: f009 fa3f bl 800fac4 - 8006646: f06f 0305 mvn.w r3, #5 - 800664a: e004 b.n 8006656 - (p_to->next == NULL), return ERR_VAL;); - } - } while (p_from); - 800664c: 683b ldr r3, [r7, #0] - 800664e: 2b00 cmp r3, #0 - 8006650: f47f af67 bne.w 8006522 - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); - return ERR_OK; - 8006654: 2300 movs r3, #0 -} - 8006656: 4618 mov r0, r3 - 8006658: 3710 adds r7, #16 - 800665a: 46bd mov sp, r7 - 800665c: bd80 pop {r7, pc} - 800665e: bf00 nop - 8006660: 08010cb8 .word 0x08010cb8 - 8006664: 08011048 .word 0x08011048 - 8006668: 08010d04 .word 0x08010d04 - 800666c: 08011078 .word 0x08011078 - 8006670: 08011090 .word 0x08011090 - 8006674: 080110ac .word 0x080110ac - 8006678: 080110bc .word 0x080110bc - -0800667c : - * @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) -{ - 800667c: b580 push {r7, lr} - 800667e: b088 sub sp, #32 - 8006680: af00 add r7, sp, #0 - 8006682: 60f8 str r0, [r7, #12] - 8006684: 60b9 str r1, [r7, #8] - 8006686: 4611 mov r1, r2 - 8006688: 461a mov r2, r3 - 800668a: 460b mov r3, r1 - 800668c: 80fb strh r3, [r7, #6] - 800668e: 4613 mov r3, r2 - 8006690: 80bb strh r3, [r7, #4] - const struct pbuf *p; - u16_t left; - u16_t buf_copy_len; - u16_t copied_total = 0; - 8006692: 2300 movs r3, #0 - 8006694: 82fb strh r3, [r7, #22] - - LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); - 8006696: 68fb ldr r3, [r7, #12] - 8006698: 2b00 cmp r3, #0 - 800669a: d108 bne.n 80066ae - 800669c: 4b30 ldr r3, [pc, #192] ; (8006760 ) - 800669e: f240 32fe movw r2, #1022 ; 0x3fe - 80066a2: 4930 ldr r1, [pc, #192] ; (8006764 ) - 80066a4: 4830 ldr r0, [pc, #192] ; (8006768 ) - 80066a6: f009 fa0d bl 800fac4 - 80066aa: 2300 movs r3, #0 - 80066ac: e054 b.n 8006758 - LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); - 80066ae: 68bb ldr r3, [r7, #8] - 80066b0: 2b00 cmp r3, #0 - 80066b2: d108 bne.n 80066c6 - 80066b4: 4b2a ldr r3, [pc, #168] ; (8006760 ) - 80066b6: f240 32ff movw r2, #1023 ; 0x3ff - 80066ba: 492c ldr r1, [pc, #176] ; (800676c ) - 80066bc: 482a ldr r0, [pc, #168] ; (8006768 ) - 80066be: f009 fa01 bl 800fac4 - 80066c2: 2300 movs r3, #0 - 80066c4: e048 b.n 8006758 - - left = 0; - 80066c6: 2300 movs r3, #0 - 80066c8: 837b strh r3, [r7, #26] - - if ((buf == NULL) || (dataptr == NULL)) { - 80066ca: 68fb ldr r3, [r7, #12] - 80066cc: 2b00 cmp r3, #0 - 80066ce: d002 beq.n 80066d6 - 80066d0: 68bb ldr r3, [r7, #8] - 80066d2: 2b00 cmp r3, #0 - 80066d4: d101 bne.n 80066da - return 0; - 80066d6: 2300 movs r3, #0 - 80066d8: e03e b.n 8006758 - } - - /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ - for (p = buf; len != 0 && p != NULL; p = p->next) { - 80066da: 68fb ldr r3, [r7, #12] - 80066dc: 61fb str r3, [r7, #28] - 80066de: e034 b.n 800674a - if ((offset != 0) && (offset >= p->len)) { - 80066e0: 88bb ldrh r3, [r7, #4] - 80066e2: 2b00 cmp r3, #0 - 80066e4: d00a beq.n 80066fc - 80066e6: 69fb ldr r3, [r7, #28] - 80066e8: 895b ldrh r3, [r3, #10] - 80066ea: 88ba ldrh r2, [r7, #4] - 80066ec: 429a cmp r2, r3 - 80066ee: d305 bcc.n 80066fc - /* don't copy from this buffer -> on to the next */ - offset -= p->len; - 80066f0: 69fb ldr r3, [r7, #28] - 80066f2: 895b ldrh r3, [r3, #10] - 80066f4: 88ba ldrh r2, [r7, #4] - 80066f6: 1ad3 subs r3, r2, r3 - 80066f8: 80bb strh r3, [r7, #4] - 80066fa: e023 b.n 8006744 - } else { - /* copy from this buffer. maybe only partially. */ - buf_copy_len = p->len - offset; - 80066fc: 69fb ldr r3, [r7, #28] - 80066fe: 895a ldrh r2, [r3, #10] - 8006700: 88bb ldrh r3, [r7, #4] - 8006702: 1ad3 subs r3, r2, r3 - 8006704: 833b strh r3, [r7, #24] - if (buf_copy_len > len) { - 8006706: 8b3a ldrh r2, [r7, #24] - 8006708: 88fb ldrh r3, [r7, #6] - 800670a: 429a cmp r2, r3 - 800670c: d901 bls.n 8006712 - buf_copy_len = len; - 800670e: 88fb ldrh r3, [r7, #6] - 8006710: 833b strh r3, [r7, #24] - } - /* copy the necessary parts of the buffer */ - MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); - 8006712: 8b7b ldrh r3, [r7, #26] - 8006714: 68ba ldr r2, [r7, #8] - 8006716: 18d0 adds r0, r2, r3 - 8006718: 69fb ldr r3, [r7, #28] - 800671a: 685a ldr r2, [r3, #4] - 800671c: 88bb ldrh r3, [r7, #4] - 800671e: 4413 add r3, r2 - 8006720: 8b3a ldrh r2, [r7, #24] - 8006722: 4619 mov r1, r3 - 8006724: f009 fb3c bl 800fda0 - copied_total += buf_copy_len; - 8006728: 8afa ldrh r2, [r7, #22] - 800672a: 8b3b ldrh r3, [r7, #24] - 800672c: 4413 add r3, r2 - 800672e: 82fb strh r3, [r7, #22] - left += buf_copy_len; - 8006730: 8b7a ldrh r2, [r7, #26] - 8006732: 8b3b ldrh r3, [r7, #24] - 8006734: 4413 add r3, r2 - 8006736: 837b strh r3, [r7, #26] - len -= buf_copy_len; - 8006738: 88fa ldrh r2, [r7, #6] - 800673a: 8b3b ldrh r3, [r7, #24] - 800673c: 1ad3 subs r3, r2, r3 - 800673e: 80fb strh r3, [r7, #6] - offset = 0; - 8006740: 2300 movs r3, #0 - 8006742: 80bb strh r3, [r7, #4] - for (p = buf; len != 0 && p != NULL; p = p->next) { - 8006744: 69fb ldr r3, [r7, #28] - 8006746: 681b ldr r3, [r3, #0] - 8006748: 61fb str r3, [r7, #28] - 800674a: 88fb ldrh r3, [r7, #6] - 800674c: 2b00 cmp r3, #0 - 800674e: d002 beq.n 8006756 - 8006750: 69fb ldr r3, [r7, #28] - 8006752: 2b00 cmp r3, #0 - 8006754: d1c4 bne.n 80066e0 - } - } - return copied_total; - 8006756: 8afb ldrh r3, [r7, #22] -} - 8006758: 4618 mov r0, r3 - 800675a: 3720 adds r7, #32 - 800675c: 46bd mov sp, r7 - 800675e: bd80 pop {r7, pc} - 8006760: 08010cb8 .word 0x08010cb8 - 8006764: 080110e8 .word 0x080110e8 - 8006768: 08010d04 .word 0x08010d04 - 800676c: 08011108 .word 0x08011108 - -08006770 : -/** - * Initialize this module. - */ -void -tcp_init(void) -{ - 8006770: b480 push {r7} - 8006772: af00 add r7, sp, #0 -#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) - tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); -#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ -} - 8006774: bf00 nop - 8006776: 46bd mov sp, r7 - 8006778: bc80 pop {r7} - 800677a: 4770 bx lr - -0800677c : -/** - * Called periodically to dispatch TCP timers. - */ -void -tcp_tmr(void) -{ - 800677c: b580 push {r7, lr} - 800677e: af00 add r7, sp, #0 - /* Call tcp_fasttmr() every 250 ms */ - tcp_fasttmr(); - 8006780: f000 fdfa bl 8007378 - - if (++tcp_timer & 1) { - 8006784: 4b07 ldr r3, [pc, #28] ; (80067a4 ) - 8006786: 781b ldrb r3, [r3, #0] - 8006788: 3301 adds r3, #1 - 800678a: b2da uxtb r2, r3 - 800678c: 4b05 ldr r3, [pc, #20] ; (80067a4 ) - 800678e: 701a strb r2, [r3, #0] - 8006790: 4b04 ldr r3, [pc, #16] ; (80067a4 ) - 8006792: 781b ldrb r3, [r3, #0] - 8006794: f003 0301 and.w r3, r3, #1 - 8006798: 2b00 cmp r3, #0 - 800679a: d001 beq.n 80067a0 - /* Call tcp_slowtmr() every 500 ms, i.e., every other timer - tcp_tmr() is called. */ - tcp_slowtmr(); - 800679c: f000 fb2a bl 8006df4 - } -} - 80067a0: bf00 nop - 80067a2: bd80 pop {r7, pc} - 80067a4: 20006d79 .word 0x20006d79 - -080067a8 : -/** Called when a listen pcb is closed. Iterates one pcb list and removes the - * closed listener pcb from pcb->listener if matching. - */ -static void -tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb) -{ - 80067a8: b480 push {r7} - 80067aa: b085 sub sp, #20 - 80067ac: af00 add r7, sp, #0 - 80067ae: 6078 str r0, [r7, #4] - 80067b0: 6039 str r1, [r7, #0] - struct tcp_pcb *pcb; - for (pcb = list; pcb != NULL; pcb = pcb->next) { - 80067b2: 687b ldr r3, [r7, #4] - 80067b4: 60fb str r3, [r7, #12] - 80067b6: e00a b.n 80067ce - if (pcb->listener == lpcb) { - 80067b8: 68fb ldr r3, [r7, #12] - 80067ba: 6f9b ldr r3, [r3, #120] ; 0x78 - 80067bc: 683a ldr r2, [r7, #0] - 80067be: 429a cmp r2, r3 - 80067c0: d102 bne.n 80067c8 - pcb->listener = NULL; - 80067c2: 68fb ldr r3, [r7, #12] - 80067c4: 2200 movs r2, #0 - 80067c6: 679a str r2, [r3, #120] ; 0x78 - for (pcb = list; pcb != NULL; pcb = pcb->next) { - 80067c8: 68fb ldr r3, [r7, #12] - 80067ca: 68db ldr r3, [r3, #12] - 80067cc: 60fb str r3, [r7, #12] - 80067ce: 68fb ldr r3, [r7, #12] - 80067d0: 2b00 cmp r3, #0 - 80067d2: d1f1 bne.n 80067b8 - } - } -} - 80067d4: bf00 nop - 80067d6: bf00 nop - 80067d8: 3714 adds r7, #20 - 80067da: 46bd mov sp, r7 - 80067dc: bc80 pop {r7} - 80067de: 4770 bx lr - -080067e0 : -/** Called when a listen pcb is closed. Iterates all pcb lists and removes the - * closed listener pcb from pcb->listener if matching. - */ -static void -tcp_listen_closed(struct tcp_pcb *pcb) -{ - 80067e0: b580 push {r7, lr} - 80067e2: b084 sub sp, #16 - 80067e4: af00 add r7, sp, #0 - 80067e6: 6078 str r0, [r7, #4] -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG - size_t i; - LWIP_ASSERT("pcb != NULL", pcb != NULL); - 80067e8: 687b ldr r3, [r7, #4] - 80067ea: 2b00 cmp r3, #0 - 80067ec: d105 bne.n 80067fa - 80067ee: 4b13 ldr r3, [pc, #76] ; (800683c ) - 80067f0: 22c0 movs r2, #192 ; 0xc0 - 80067f2: 4913 ldr r1, [pc, #76] ; (8006840 ) - 80067f4: 4813 ldr r0, [pc, #76] ; (8006844 ) - 80067f6: f009 f965 bl 800fac4 - LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); - 80067fa: 687b ldr r3, [r7, #4] - 80067fc: 7d1b ldrb r3, [r3, #20] - 80067fe: 2b01 cmp r3, #1 - 8006800: d005 beq.n 800680e - 8006802: 4b0e ldr r3, [pc, #56] ; (800683c ) - 8006804: 22c1 movs r2, #193 ; 0xc1 - 8006806: 4910 ldr r1, [pc, #64] ; (8006848 ) - 8006808: 480e ldr r0, [pc, #56] ; (8006844 ) - 800680a: f009 f95b bl 800fac4 - for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { - 800680e: 2301 movs r3, #1 - 8006810: 60fb str r3, [r7, #12] - 8006812: e00b b.n 800682c - tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen*)pcb); - 8006814: 4a0d ldr r2, [pc, #52] ; (800684c ) - 8006816: 68fb ldr r3, [r7, #12] - 8006818: f852 3023 ldr.w r3, [r2, r3, lsl #2] - 800681c: 681b ldr r3, [r3, #0] - 800681e: 6879 ldr r1, [r7, #4] - 8006820: 4618 mov r0, r3 - 8006822: f7ff ffc1 bl 80067a8 - for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { - 8006826: 68fb ldr r3, [r7, #12] - 8006828: 3301 adds r3, #1 - 800682a: 60fb str r3, [r7, #12] - 800682c: 68fb ldr r3, [r7, #12] - 800682e: 2b03 cmp r3, #3 - 8006830: d9f0 bls.n 8006814 - } -#endif - LWIP_UNUSED_ARG(pcb); -} - 8006832: bf00 nop - 8006834: bf00 nop - 8006836: 3710 adds r7, #16 - 8006838: 46bd mov sp, r7 - 800683a: bd80 pop {r7, pc} - 800683c: 0801123c .word 0x0801123c - 8006840: 0801126c .word 0x0801126c - 8006844: 08011278 .word 0x08011278 - 8006848: 080112a0 .word 0x080112a0 - 800684c: 08012b80 .word 0x08012b80 - -08006850 : - * @return ERR_OK if connection has been closed - * another err_t if closing failed and pcb is not freed - */ -static err_t -tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) -{ - 8006850: b5b0 push {r4, r5, r7, lr} - 8006852: b086 sub sp, #24 - 8006854: af02 add r7, sp, #8 - 8006856: 6078 str r0, [r7, #4] - 8006858: 460b mov r3, r1 - 800685a: 70fb strb r3, [r7, #3] - if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { - 800685c: 78fb ldrb r3, [r7, #3] - 800685e: 2b00 cmp r3, #0 - 8006860: d075 beq.n 800694e - 8006862: 687b ldr r3, [r7, #4] - 8006864: 7d1b ldrb r3, [r3, #20] - 8006866: 2b04 cmp r3, #4 - 8006868: d003 beq.n 8006872 - 800686a: 687b ldr r3, [r7, #4] - 800686c: 7d1b ldrb r3, [r3, #20] - 800686e: 2b07 cmp r3, #7 - 8006870: d16d bne.n 800694e - if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { - 8006872: 687b ldr r3, [r7, #4] - 8006874: 6f5b ldr r3, [r3, #116] ; 0x74 - 8006876: 2b00 cmp r3, #0 - 8006878: d104 bne.n 8006884 - 800687a: 687b ldr r3, [r7, #4] - 800687c: 8d1b ldrh r3, [r3, #40] ; 0x28 - 800687e: f5b3 6f06 cmp.w r3, #2144 ; 0x860 - 8006882: d064 beq.n 800694e - /* Not all data received by application, send RST to tell the remote - side about this. */ - LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); - 8006884: 687b ldr r3, [r7, #4] - 8006886: 7e9b ldrb r3, [r3, #26] - 8006888: f003 0310 and.w r3, r3, #16 - 800688c: 2b00 cmp r3, #0 - 800688e: d106 bne.n 800689e - 8006890: 4b5b ldr r3, [pc, #364] ; (8006a00 ) - 8006892: f240 120f movw r2, #271 ; 0x10f - 8006896: 495b ldr r1, [pc, #364] ; (8006a04 ) - 8006898: 485b ldr r0, [pc, #364] ; (8006a08 ) - 800689a: f009 f913 bl 800fac4 - - /* don't call tcp_abort here: we must not deallocate the pcb since - that might not be expected when calling tcp_close */ - tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, - 800689e: 687b ldr r3, [r7, #4] - 80068a0: 6cd8 ldr r0, [r3, #76] ; 0x4c - 80068a2: 687b ldr r3, [r7, #4] - 80068a4: 6a59 ldr r1, [r3, #36] ; 0x24 - 80068a6: 687c ldr r4, [r7, #4] - 80068a8: 687b ldr r3, [r7, #4] - 80068aa: 1d1d adds r5, r3, #4 - 80068ac: 687b ldr r3, [r7, #4] - 80068ae: 8adb ldrh r3, [r3, #22] - 80068b0: 687a ldr r2, [r7, #4] - 80068b2: 8b12 ldrh r2, [r2, #24] - 80068b4: 9201 str r2, [sp, #4] - 80068b6: 9300 str r3, [sp, #0] - 80068b8: 462b mov r3, r5 - 80068ba: 4622 mov r2, r4 - 80068bc: f004 f860 bl 800a980 - pcb->local_port, pcb->remote_port); - - tcp_pcb_purge(pcb); - 80068c0: 6878 ldr r0, [r7, #4] - 80068c2: f000 ffcf bl 8007864 - TCP_RMV_ACTIVE(pcb); - 80068c6: 4b51 ldr r3, [pc, #324] ; (8006a0c ) - 80068c8: 681b ldr r3, [r3, #0] - 80068ca: 687a ldr r2, [r7, #4] - 80068cc: 429a cmp r2, r3 - 80068ce: d105 bne.n 80068dc - 80068d0: 4b4e ldr r3, [pc, #312] ; (8006a0c ) - 80068d2: 681b ldr r3, [r3, #0] - 80068d4: 68db ldr r3, [r3, #12] - 80068d6: 4a4d ldr r2, [pc, #308] ; (8006a0c ) - 80068d8: 6013 str r3, [r2, #0] - 80068da: e013 b.n 8006904 - 80068dc: 4b4b ldr r3, [pc, #300] ; (8006a0c ) - 80068de: 681b ldr r3, [r3, #0] - 80068e0: 60fb str r3, [r7, #12] - 80068e2: e00c b.n 80068fe - 80068e4: 68fb ldr r3, [r7, #12] - 80068e6: 68db ldr r3, [r3, #12] - 80068e8: 687a ldr r2, [r7, #4] - 80068ea: 429a cmp r2, r3 - 80068ec: d104 bne.n 80068f8 - 80068ee: 687b ldr r3, [r7, #4] - 80068f0: 68da ldr r2, [r3, #12] - 80068f2: 68fb ldr r3, [r7, #12] - 80068f4: 60da str r2, [r3, #12] - 80068f6: e005 b.n 8006904 - 80068f8: 68fb ldr r3, [r7, #12] - 80068fa: 68db ldr r3, [r3, #12] - 80068fc: 60fb str r3, [r7, #12] - 80068fe: 68fb ldr r3, [r7, #12] - 8006900: 2b00 cmp r3, #0 - 8006902: d1ef bne.n 80068e4 - 8006904: 687b ldr r3, [r7, #4] - 8006906: 2200 movs r2, #0 - 8006908: 60da str r2, [r3, #12] - 800690a: 4b41 ldr r3, [pc, #260] ; (8006a10 ) - 800690c: 2201 movs r2, #1 - 800690e: 701a strb r2, [r3, #0] - if (pcb->state == ESTABLISHED) { - 8006910: 687b ldr r3, [r7, #4] - 8006912: 7d1b ldrb r3, [r3, #20] - 8006914: 2b04 cmp r3, #4 - 8006916: d10c bne.n 8006932 - /* move to TIME_WAIT since we close actively */ - pcb->state = TIME_WAIT; - 8006918: 687b ldr r3, [r7, #4] - 800691a: 220a movs r2, #10 - 800691c: 751a strb r2, [r3, #20] - TCP_REG(&tcp_tw_pcbs, pcb); - 800691e: 4b3d ldr r3, [pc, #244] ; (8006a14 ) - 8006920: 681a ldr r2, [r3, #0] - 8006922: 687b ldr r3, [r7, #4] - 8006924: 60da str r2, [r3, #12] - 8006926: 4a3b ldr r2, [pc, #236] ; (8006a14 ) - 8006928: 687b ldr r3, [r7, #4] - 800692a: 6013 str r3, [r2, #0] - 800692c: f004 fa70 bl 800ae10 - 8006930: e00b b.n 800694a - } else { - /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ - if (tcp_input_pcb == pcb) { - 8006932: 4b39 ldr r3, [pc, #228] ; (8006a18 ) - 8006934: 681b ldr r3, [r3, #0] - 8006936: 687a ldr r2, [r7, #4] - 8006938: 429a cmp r2, r3 - 800693a: d102 bne.n 8006942 - /* prevent using a deallocated pcb: free it from tcp_input later */ - tcp_trigger_input_pcb_close(); - 800693c: f003 faf2 bl 8009f24 - 8006940: e003 b.n 800694a - } else { - memp_free(MEMP_TCP_PCB, pcb); - 8006942: 6879 ldr r1, [r7, #4] - 8006944: 2001 movs r0, #1 - 8006946: f7fe ff7b bl 8005840 - } - } - return ERR_OK; - 800694a: 2300 movs r3, #0 - 800694c: e053 b.n 80069f6 - } - } - - /* - states which free the pcb are handled here, - - states which send FIN and change state are handled in tcp_close_shutdown_fin() */ - switch (pcb->state) { - 800694e: 687b ldr r3, [r7, #4] - 8006950: 7d1b ldrb r3, [r3, #20] - 8006952: 2b02 cmp r3, #2 - 8006954: d03d beq.n 80069d2 - 8006956: 2b02 cmp r3, #2 - 8006958: dc47 bgt.n 80069ea - 800695a: 2b00 cmp r3, #0 - 800695c: d002 beq.n 8006964 - 800695e: 2b01 cmp r3, #1 - 8006960: d02b beq.n 80069ba - 8006962: e042 b.n 80069ea - * and the user needs some way to free it should the need arise. - * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) - * or for a pcb that has been used and then entered the CLOSED state - * is erroneous, but this should never happen as the pcb has in those cases - * been freed, and so any remaining handles are bogus. */ - if (pcb->local_port != 0) { - 8006964: 687b ldr r3, [r7, #4] - 8006966: 8adb ldrh r3, [r3, #22] - 8006968: 2b00 cmp r3, #0 - 800696a: d021 beq.n 80069b0 - TCP_RMV(&tcp_bound_pcbs, pcb); - 800696c: 4b2b ldr r3, [pc, #172] ; (8006a1c ) - 800696e: 681b ldr r3, [r3, #0] - 8006970: 687a ldr r2, [r7, #4] - 8006972: 429a cmp r2, r3 - 8006974: d105 bne.n 8006982 - 8006976: 4b29 ldr r3, [pc, #164] ; (8006a1c ) - 8006978: 681b ldr r3, [r3, #0] - 800697a: 68db ldr r3, [r3, #12] - 800697c: 4a27 ldr r2, [pc, #156] ; (8006a1c ) - 800697e: 6013 str r3, [r2, #0] - 8006980: e013 b.n 80069aa - 8006982: 4b26 ldr r3, [pc, #152] ; (8006a1c ) - 8006984: 681b ldr r3, [r3, #0] - 8006986: 60bb str r3, [r7, #8] - 8006988: e00c b.n 80069a4 - 800698a: 68bb ldr r3, [r7, #8] - 800698c: 68db ldr r3, [r3, #12] - 800698e: 687a ldr r2, [r7, #4] - 8006990: 429a cmp r2, r3 - 8006992: d104 bne.n 800699e - 8006994: 687b ldr r3, [r7, #4] - 8006996: 68da ldr r2, [r3, #12] - 8006998: 68bb ldr r3, [r7, #8] - 800699a: 60da str r2, [r3, #12] - 800699c: e005 b.n 80069aa - 800699e: 68bb ldr r3, [r7, #8] - 80069a0: 68db ldr r3, [r3, #12] - 80069a2: 60bb str r3, [r7, #8] - 80069a4: 68bb ldr r3, [r7, #8] - 80069a6: 2b00 cmp r3, #0 - 80069a8: d1ef bne.n 800698a - 80069aa: 687b ldr r3, [r7, #4] - 80069ac: 2200 movs r2, #0 - 80069ae: 60da str r2, [r3, #12] - } - memp_free(MEMP_TCP_PCB, pcb); - 80069b0: 6879 ldr r1, [r7, #4] - 80069b2: 2001 movs r0, #1 - 80069b4: f7fe ff44 bl 8005840 - break; - 80069b8: e01c b.n 80069f4 - case LISTEN: - tcp_listen_closed(pcb); - 80069ba: 6878 ldr r0, [r7, #4] - 80069bc: f7ff ff10 bl 80067e0 - tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); - 80069c0: 6879 ldr r1, [r7, #4] - 80069c2: 4817 ldr r0, [pc, #92] ; (8006a20 ) - 80069c4: f000 ff90 bl 80078e8 - memp_free(MEMP_TCP_PCB_LISTEN, pcb); - 80069c8: 6879 ldr r1, [r7, #4] - 80069ca: 2002 movs r0, #2 - 80069cc: f7fe ff38 bl 8005840 - break; - 80069d0: e010 b.n 80069f4 - case SYN_SENT: - TCP_PCB_REMOVE_ACTIVE(pcb); - 80069d2: 6879 ldr r1, [r7, #4] - 80069d4: 480d ldr r0, [pc, #52] ; (8006a0c ) - 80069d6: f000 ff87 bl 80078e8 - 80069da: 4b0d ldr r3, [pc, #52] ; (8006a10 ) - 80069dc: 2201 movs r2, #1 - 80069de: 701a strb r2, [r3, #0] - memp_free(MEMP_TCP_PCB, pcb); - 80069e0: 6879 ldr r1, [r7, #4] - 80069e2: 2001 movs r0, #1 - 80069e4: f7fe ff2c bl 8005840 - MIB2_STATS_INC(mib2.tcpattemptfails); - break; - 80069e8: e004 b.n 80069f4 - default: - return tcp_close_shutdown_fin(pcb); - 80069ea: 6878 ldr r0, [r7, #4] - 80069ec: f000 f81a bl 8006a24 - 80069f0: 4603 mov r3, r0 - 80069f2: e000 b.n 80069f6 - } - return ERR_OK; - 80069f4: 2300 movs r3, #0 -} - 80069f6: 4618 mov r0, r3 - 80069f8: 3710 adds r7, #16 - 80069fa: 46bd mov sp, r7 - 80069fc: bdb0 pop {r4, r5, r7, pc} - 80069fe: bf00 nop - 8006a00: 0801123c .word 0x0801123c - 8006a04: 080112b8 .word 0x080112b8 - 8006a08: 08011278 .word 0x08011278 - 8006a0c: 20006d70 .word 0x20006d70 - 8006a10: 20006d78 .word 0x20006d78 - 8006a14: 20006d74 .word 0x20006d74 - 8006a18: 20006db0 .word 0x20006db0 - 8006a1c: 20006d68 .word 0x20006d68 - 8006a20: 20006d6c .word 0x20006d6c - -08006a24 : - -static err_t -tcp_close_shutdown_fin(struct tcp_pcb *pcb) -{ - 8006a24: b580 push {r7, lr} - 8006a26: b084 sub sp, #16 - 8006a28: af00 add r7, sp, #0 - 8006a2a: 6078 str r0, [r7, #4] - err_t err; - LWIP_ASSERT("pcb != NULL", pcb != NULL); - 8006a2c: 687b ldr r3, [r7, #4] - 8006a2e: 2b00 cmp r3, #0 - 8006a30: d106 bne.n 8006a40 - 8006a32: 4b2e ldr r3, [pc, #184] ; (8006aec ) - 8006a34: f240 124d movw r2, #333 ; 0x14d - 8006a38: 492d ldr r1, [pc, #180] ; (8006af0 ) - 8006a3a: 482e ldr r0, [pc, #184] ; (8006af4 ) - 8006a3c: f009 f842 bl 800fac4 - - switch (pcb->state) { - 8006a40: 687b ldr r3, [r7, #4] - 8006a42: 7d1b ldrb r3, [r3, #20] - 8006a44: 2b07 cmp r3, #7 - 8006a46: d020 beq.n 8006a8a - 8006a48: 2b07 cmp r3, #7 - 8006a4a: dc2b bgt.n 8006aa4 - 8006a4c: 2b03 cmp r3, #3 - 8006a4e: d002 beq.n 8006a56 - 8006a50: 2b04 cmp r3, #4 - 8006a52: d00d beq.n 8006a70 - 8006a54: e026 b.n 8006aa4 - case SYN_RCVD: - err = tcp_send_fin(pcb); - 8006a56: 6878 ldr r0, [r7, #4] - 8006a58: f003 faee bl 800a038 - 8006a5c: 4603 mov r3, r0 - 8006a5e: 73fb strb r3, [r7, #15] - if (err == ERR_OK) { - 8006a60: f997 300f ldrsb.w r3, [r7, #15] - 8006a64: 2b00 cmp r3, #0 - 8006a66: d11f bne.n 8006aa8 - tcp_backlog_accepted(pcb); - MIB2_STATS_INC(mib2.tcpattemptfails); - pcb->state = FIN_WAIT_1; - 8006a68: 687b ldr r3, [r7, #4] - 8006a6a: 2205 movs r2, #5 - 8006a6c: 751a strb r2, [r3, #20] - } - break; - 8006a6e: e01b b.n 8006aa8 - case ESTABLISHED: - err = tcp_send_fin(pcb); - 8006a70: 6878 ldr r0, [r7, #4] - 8006a72: f003 fae1 bl 800a038 - 8006a76: 4603 mov r3, r0 - 8006a78: 73fb strb r3, [r7, #15] - if (err == ERR_OK) { - 8006a7a: f997 300f ldrsb.w r3, [r7, #15] - 8006a7e: 2b00 cmp r3, #0 - 8006a80: d114 bne.n 8006aac - MIB2_STATS_INC(mib2.tcpestabresets); - pcb->state = FIN_WAIT_1; - 8006a82: 687b ldr r3, [r7, #4] - 8006a84: 2205 movs r2, #5 - 8006a86: 751a strb r2, [r3, #20] - } - break; - 8006a88: e010 b.n 8006aac - case CLOSE_WAIT: - err = tcp_send_fin(pcb); - 8006a8a: 6878 ldr r0, [r7, #4] - 8006a8c: f003 fad4 bl 800a038 - 8006a90: 4603 mov r3, r0 - 8006a92: 73fb strb r3, [r7, #15] - if (err == ERR_OK) { - 8006a94: f997 300f ldrsb.w r3, [r7, #15] - 8006a98: 2b00 cmp r3, #0 - 8006a9a: d109 bne.n 8006ab0 - MIB2_STATS_INC(mib2.tcpestabresets); - pcb->state = LAST_ACK; - 8006a9c: 687b ldr r3, [r7, #4] - 8006a9e: 2209 movs r2, #9 - 8006aa0: 751a strb r2, [r3, #20] - } - break; - 8006aa2: e005 b.n 8006ab0 - default: - /* Has already been closed, do nothing. */ - return ERR_OK; - 8006aa4: 2300 movs r3, #0 - 8006aa6: e01c b.n 8006ae2 - break; - 8006aa8: bf00 nop - 8006aaa: e002 b.n 8006ab2 - break; - 8006aac: bf00 nop - 8006aae: e000 b.n 8006ab2 - break; - 8006ab0: bf00 nop - } - - if (err == ERR_OK) { - 8006ab2: f997 300f ldrsb.w r3, [r7, #15] - 8006ab6: 2b00 cmp r3, #0 - 8006ab8: d103 bne.n 8006ac2 - /* To ensure all data has been sent when tcp_close returns, we have - to make sure tcp_output doesn't fail. - Since we don't really have to ensure all data has been sent when tcp_close - returns (unsent data is sent from tcp timer functions, also), we don't care - for the return value of tcp_output for now. */ - tcp_output(pcb); - 8006aba: 6878 ldr r0, [r7, #4] - 8006abc: f003 fcdc bl 800a478 - 8006ac0: e00d b.n 8006ade - } else if (err == ERR_MEM) { - 8006ac2: f997 300f ldrsb.w r3, [r7, #15] - 8006ac6: f1b3 3fff cmp.w r3, #4294967295 - 8006aca: d108 bne.n 8006ade - /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ - pcb->flags |= TF_CLOSEPEND; - 8006acc: 687b ldr r3, [r7, #4] - 8006ace: 7e9b ldrb r3, [r3, #26] - 8006ad0: f043 0308 orr.w r3, r3, #8 - 8006ad4: b2da uxtb r2, r3 - 8006ad6: 687b ldr r3, [r7, #4] - 8006ad8: 769a strb r2, [r3, #26] - /* We have to return ERR_OK from here to indicate to the callers that this - pcb should not be used any more as it will be freed soon via tcp_tmr. - This is OK here since sending FIN does not guarantee a time frime for - actually freeing the pcb, either (it is left in closure states for - remote ACK or timeout) */ - return ERR_OK; - 8006ada: 2300 movs r3, #0 - 8006adc: e001 b.n 8006ae2 - } - return err; - 8006ade: f997 300f ldrsb.w r3, [r7, #15] -} - 8006ae2: 4618 mov r0, r3 - 8006ae4: 3710 adds r7, #16 - 8006ae6: 46bd mov sp, r7 - 8006ae8: bd80 pop {r7, pc} - 8006aea: bf00 nop - 8006aec: 0801123c .word 0x0801123c - 8006af0: 0801126c .word 0x0801126c - 8006af4: 08011278 .word 0x08011278 - -08006af8 : - * @return ERR_OK if connection has been closed - * another err_t if closing failed and pcb is not freed - */ -err_t -tcp_close(struct tcp_pcb *pcb) -{ - 8006af8: b580 push {r7, lr} - 8006afa: b082 sub sp, #8 - 8006afc: af00 add r7, sp, #0 - 8006afe: 6078 str r0, [r7, #4] - LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); - tcp_debug_print_state(pcb->state); - - if (pcb->state != LISTEN) { - 8006b00: 687b ldr r3, [r7, #4] - 8006b02: 7d1b ldrb r3, [r3, #20] - 8006b04: 2b01 cmp r3, #1 - 8006b06: d006 beq.n 8006b16 - /* Set a flag not to receive any more data... */ - pcb->flags |= TF_RXCLOSED; - 8006b08: 687b ldr r3, [r7, #4] - 8006b0a: 7e9b ldrb r3, [r3, #26] - 8006b0c: f043 0310 orr.w r3, r3, #16 - 8006b10: b2da uxtb r2, r3 - 8006b12: 687b ldr r3, [r7, #4] - 8006b14: 769a strb r2, [r3, #26] - } - /* ... and close */ - return tcp_close_shutdown(pcb, 1); - 8006b16: 2101 movs r1, #1 - 8006b18: 6878 ldr r0, [r7, #4] - 8006b1a: f7ff fe99 bl 8006850 - 8006b1e: 4603 mov r3, r0 -} - 8006b20: 4618 mov r0, r3 - 8006b22: 3708 adds r7, #8 - 8006b24: 46bd mov sp, r7 - 8006b26: bd80 pop {r7, pc} - -08006b28 : - * @param pcb the tcp_pcb to abort - * @param reset boolean to indicate whether a reset should be sent - */ -void -tcp_abandon(struct tcp_pcb *pcb, int reset) -{ - 8006b28: b580 push {r7, lr} - 8006b2a: b08c sub sp, #48 ; 0x30 - 8006b2c: af02 add r7, sp, #8 - 8006b2e: 6078 str r0, [r7, #4] - 8006b30: 6039 str r1, [r7, #0] - tcp_err_fn errf; -#endif /* LWIP_CALLBACK_API */ - void *errf_arg; - - /* pcb->state LISTEN not allowed here */ - LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", - 8006b32: 687b ldr r3, [r7, #4] - 8006b34: 7d1b ldrb r3, [r3, #20] - 8006b36: 2b01 cmp r3, #1 - 8006b38: d106 bne.n 8006b48 - 8006b3a: 4b4d ldr r3, [pc, #308] ; (8006c70 ) - 8006b3c: f240 12df movw r2, #479 ; 0x1df - 8006b40: 494c ldr r1, [pc, #304] ; (8006c74 ) - 8006b42: 484d ldr r0, [pc, #308] ; (8006c78 ) - 8006b44: f008 ffbe bl 800fac4 - pcb->state != LISTEN); - /* Figure out on which TCP PCB list we are, and remove us. If we - are in an active state, call the receive function associated with - the PCB with a NULL argument, and send an RST to the remote end. */ - if (pcb->state == TIME_WAIT) { - 8006b48: 687b ldr r3, [r7, #4] - 8006b4a: 7d1b ldrb r3, [r3, #20] - 8006b4c: 2b0a cmp r3, #10 - 8006b4e: d108 bne.n 8006b62 - tcp_pcb_remove(&tcp_tw_pcbs, pcb); - 8006b50: 6879 ldr r1, [r7, #4] - 8006b52: 484a ldr r0, [pc, #296] ; (8006c7c ) - 8006b54: f000 fec8 bl 80078e8 - memp_free(MEMP_TCP_PCB, pcb); - 8006b58: 6879 ldr r1, [r7, #4] - 8006b5a: 2001 movs r0, #1 - 8006b5c: f7fe fe70 bl 8005840 - } - last_state = pcb->state; - memp_free(MEMP_TCP_PCB, pcb); - TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); - } -} - 8006b60: e081 b.n 8006c66 - int send_rst = 0; - 8006b62: 2300 movs r3, #0 - 8006b64: 627b str r3, [r7, #36] ; 0x24 - u16_t local_port = 0; - 8006b66: 2300 movs r3, #0 - 8006b68: 847b strh r3, [r7, #34] ; 0x22 - seqno = pcb->snd_nxt; - 8006b6a: 687b ldr r3, [r7, #4] - 8006b6c: 6cdb ldr r3, [r3, #76] ; 0x4c - 8006b6e: 61bb str r3, [r7, #24] - ackno = pcb->rcv_nxt; - 8006b70: 687b ldr r3, [r7, #4] - 8006b72: 6a5b ldr r3, [r3, #36] ; 0x24 - 8006b74: 617b str r3, [r7, #20] - errf = pcb->errf; - 8006b76: 687b ldr r3, [r7, #4] - 8006b78: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c - 8006b7c: 613b str r3, [r7, #16] - errf_arg = pcb->callback_arg; - 8006b7e: 687b ldr r3, [r7, #4] - 8006b80: 691b ldr r3, [r3, #16] - 8006b82: 60fb str r3, [r7, #12] - if (pcb->state == CLOSED) { - 8006b84: 687b ldr r3, [r7, #4] - 8006b86: 7d1b ldrb r3, [r3, #20] - 8006b88: 2b00 cmp r3, #0 - 8006b8a: d126 bne.n 8006bda - if (pcb->local_port != 0) { - 8006b8c: 687b ldr r3, [r7, #4] - 8006b8e: 8adb ldrh r3, [r3, #22] - 8006b90: 2b00 cmp r3, #0 - 8006b92: d02e beq.n 8006bf2 - TCP_RMV(&tcp_bound_pcbs, pcb); - 8006b94: 4b3a ldr r3, [pc, #232] ; (8006c80 ) - 8006b96: 681b ldr r3, [r3, #0] - 8006b98: 687a ldr r2, [r7, #4] - 8006b9a: 429a cmp r2, r3 - 8006b9c: d105 bne.n 8006baa - 8006b9e: 4b38 ldr r3, [pc, #224] ; (8006c80 ) - 8006ba0: 681b ldr r3, [r3, #0] - 8006ba2: 68db ldr r3, [r3, #12] - 8006ba4: 4a36 ldr r2, [pc, #216] ; (8006c80 ) - 8006ba6: 6013 str r3, [r2, #0] - 8006ba8: e013 b.n 8006bd2 - 8006baa: 4b35 ldr r3, [pc, #212] ; (8006c80 ) - 8006bac: 681b ldr r3, [r3, #0] - 8006bae: 61fb str r3, [r7, #28] - 8006bb0: e00c b.n 8006bcc - 8006bb2: 69fb ldr r3, [r7, #28] - 8006bb4: 68db ldr r3, [r3, #12] - 8006bb6: 687a ldr r2, [r7, #4] - 8006bb8: 429a cmp r2, r3 - 8006bba: d104 bne.n 8006bc6 - 8006bbc: 687b ldr r3, [r7, #4] - 8006bbe: 68da ldr r2, [r3, #12] - 8006bc0: 69fb ldr r3, [r7, #28] - 8006bc2: 60da str r2, [r3, #12] - 8006bc4: e005 b.n 8006bd2 - 8006bc6: 69fb ldr r3, [r7, #28] - 8006bc8: 68db ldr r3, [r3, #12] - 8006bca: 61fb str r3, [r7, #28] - 8006bcc: 69fb ldr r3, [r7, #28] - 8006bce: 2b00 cmp r3, #0 - 8006bd0: d1ef bne.n 8006bb2 - 8006bd2: 687b ldr r3, [r7, #4] - 8006bd4: 2200 movs r2, #0 - 8006bd6: 60da str r2, [r3, #12] - 8006bd8: e00b b.n 8006bf2 - send_rst = reset; - 8006bda: 683b ldr r3, [r7, #0] - 8006bdc: 627b str r3, [r7, #36] ; 0x24 - local_port = pcb->local_port; - 8006bde: 687b ldr r3, [r7, #4] - 8006be0: 8adb ldrh r3, [r3, #22] - 8006be2: 847b strh r3, [r7, #34] ; 0x22 - TCP_PCB_REMOVE_ACTIVE(pcb); - 8006be4: 6879 ldr r1, [r7, #4] - 8006be6: 4827 ldr r0, [pc, #156] ; (8006c84 ) - 8006be8: f000 fe7e bl 80078e8 - 8006bec: 4b26 ldr r3, [pc, #152] ; (8006c88 ) - 8006bee: 2201 movs r2, #1 - 8006bf0: 701a strb r2, [r3, #0] - if (pcb->unacked != NULL) { - 8006bf2: 687b ldr r3, [r7, #4] - 8006bf4: 6edb ldr r3, [r3, #108] ; 0x6c - 8006bf6: 2b00 cmp r3, #0 - 8006bf8: d004 beq.n 8006c04 - tcp_segs_free(pcb->unacked); - 8006bfa: 687b ldr r3, [r7, #4] - 8006bfc: 6edb ldr r3, [r3, #108] ; 0x6c - 8006bfe: 4618 mov r0, r3 - 8006c00: f000 fc87 bl 8007512 - if (pcb->unsent != NULL) { - 8006c04: 687b ldr r3, [r7, #4] - 8006c06: 6e9b ldr r3, [r3, #104] ; 0x68 - 8006c08: 2b00 cmp r3, #0 - 8006c0a: d004 beq.n 8006c16 - tcp_segs_free(pcb->unsent); - 8006c0c: 687b ldr r3, [r7, #4] - 8006c0e: 6e9b ldr r3, [r3, #104] ; 0x68 - 8006c10: 4618 mov r0, r3 - 8006c12: f000 fc7e bl 8007512 - if (pcb->ooseq != NULL) { - 8006c16: 687b ldr r3, [r7, #4] - 8006c18: 6f1b ldr r3, [r3, #112] ; 0x70 - 8006c1a: 2b00 cmp r3, #0 - 8006c1c: d004 beq.n 8006c28 - tcp_segs_free(pcb->ooseq); - 8006c1e: 687b ldr r3, [r7, #4] - 8006c20: 6f1b ldr r3, [r3, #112] ; 0x70 - 8006c22: 4618 mov r0, r3 - 8006c24: f000 fc75 bl 8007512 - if (send_rst) { - 8006c28: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006c2a: 2b00 cmp r3, #0 - 8006c2c: d00c beq.n 8006c48 - tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port); - 8006c2e: 687a ldr r2, [r7, #4] - 8006c30: 687b ldr r3, [r7, #4] - 8006c32: 1d19 adds r1, r3, #4 - 8006c34: 687b ldr r3, [r7, #4] - 8006c36: 8b1b ldrh r3, [r3, #24] - 8006c38: 9301 str r3, [sp, #4] - 8006c3a: 8c7b ldrh r3, [r7, #34] ; 0x22 - 8006c3c: 9300 str r3, [sp, #0] - 8006c3e: 460b mov r3, r1 - 8006c40: 6979 ldr r1, [r7, #20] - 8006c42: 69b8 ldr r0, [r7, #24] - 8006c44: f003 fe9c bl 800a980 - last_state = pcb->state; - 8006c48: 687b ldr r3, [r7, #4] - 8006c4a: 7d1b ldrb r3, [r3, #20] - 8006c4c: 72fb strb r3, [r7, #11] - memp_free(MEMP_TCP_PCB, pcb); - 8006c4e: 6879 ldr r1, [r7, #4] - 8006c50: 2001 movs r0, #1 - 8006c52: f7fe fdf5 bl 8005840 - TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); - 8006c56: 693b ldr r3, [r7, #16] - 8006c58: 2b00 cmp r3, #0 - 8006c5a: d004 beq.n 8006c66 - 8006c5c: 693b ldr r3, [r7, #16] - 8006c5e: f06f 010c mvn.w r1, #12 - 8006c62: 68f8 ldr r0, [r7, #12] - 8006c64: 4798 blx r3 -} - 8006c66: bf00 nop - 8006c68: 3728 adds r7, #40 ; 0x28 - 8006c6a: 46bd mov sp, r7 - 8006c6c: bd80 pop {r7, pc} - 8006c6e: bf00 nop - 8006c70: 0801123c .word 0x0801123c - 8006c74: 080112d4 .word 0x080112d4 - 8006c78: 08011278 .word 0x08011278 - 8006c7c: 20006d74 .word 0x20006d74 - 8006c80: 20006d68 .word 0x20006d68 - 8006c84: 20006d70 .word 0x20006d70 - 8006c88: 20006d78 .word 0x20006d78 - -08006c8c : - * - * @param pcb the tcp pcb to abort - */ -void -tcp_abort(struct tcp_pcb *pcb) -{ - 8006c8c: b580 push {r7, lr} - 8006c8e: b082 sub sp, #8 - 8006c90: af00 add r7, sp, #0 - 8006c92: 6078 str r0, [r7, #4] - tcp_abandon(pcb, 1); - 8006c94: 2101 movs r1, #1 - 8006c96: 6878 ldr r0, [r7, #4] - 8006c98: f7ff ff46 bl 8006b28 -} - 8006c9c: bf00 nop - 8006c9e: 3708 adds r7, #8 - 8006ca0: 46bd mov sp, r7 - 8006ca2: bd80 pop {r7, pc} - -08006ca4 : - * Returns how much extra window would be advertised if we sent an - * update now. - */ -u32_t -tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) -{ - 8006ca4: b580 push {r7, lr} - 8006ca6: b084 sub sp, #16 - 8006ca8: af00 add r7, sp, #0 - 8006caa: 6078 str r0, [r7, #4] - u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; - 8006cac: 687b ldr r3, [r7, #4] - 8006cae: 6a5b ldr r3, [r3, #36] ; 0x24 - 8006cb0: 687a ldr r2, [r7, #4] - 8006cb2: 8d12 ldrh r2, [r2, #40] ; 0x28 - 8006cb4: 4413 add r3, r2 - 8006cb6: 60fb str r3, [r7, #12] - - if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { - 8006cb8: 687b ldr r3, [r7, #4] - 8006cba: 6adb ldr r3, [r3, #44] ; 0x2c - 8006cbc: 687a ldr r2, [r7, #4] - 8006cbe: 8e52 ldrh r2, [r2, #50] ; 0x32 - 8006cc0: f5b2 6f86 cmp.w r2, #1072 ; 0x430 - 8006cc4: bf28 it cs - 8006cc6: f44f 6286 movcs.w r2, #1072 ; 0x430 - 8006cca: b292 uxth r2, r2 - 8006ccc: 4413 add r3, r2 - 8006cce: 68fa ldr r2, [r7, #12] - 8006cd0: 1ad3 subs r3, r2, r3 - 8006cd2: 2b00 cmp r3, #0 - 8006cd4: db08 blt.n 8006ce8 - /* we can advertise more window */ - pcb->rcv_ann_wnd = pcb->rcv_wnd; - 8006cd6: 687b ldr r3, [r7, #4] - 8006cd8: 8d1a ldrh r2, [r3, #40] ; 0x28 - 8006cda: 687b ldr r3, [r7, #4] - 8006cdc: 855a strh r2, [r3, #42] ; 0x2a - return new_right_edge - pcb->rcv_ann_right_edge; - 8006cde: 687b ldr r3, [r7, #4] - 8006ce0: 6adb ldr r3, [r3, #44] ; 0x2c - 8006ce2: 68fa ldr r2, [r7, #12] - 8006ce4: 1ad3 subs r3, r2, r3 - 8006ce6: e020 b.n 8006d2a - } else { - if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { - 8006ce8: 687b ldr r3, [r7, #4] - 8006cea: 6a5a ldr r2, [r3, #36] ; 0x24 - 8006cec: 687b ldr r3, [r7, #4] - 8006cee: 6adb ldr r3, [r3, #44] ; 0x2c - 8006cf0: 1ad3 subs r3, r2, r3 - 8006cf2: 2b00 cmp r3, #0 - 8006cf4: dd03 ble.n 8006cfe - /* Can happen due to other end sending out of advertised window, - * but within actual available (but not yet advertised) window */ - pcb->rcv_ann_wnd = 0; - 8006cf6: 687b ldr r3, [r7, #4] - 8006cf8: 2200 movs r2, #0 - 8006cfa: 855a strh r2, [r3, #42] ; 0x2a - 8006cfc: e014 b.n 8006d28 - } else { - /* keep the right edge of window constant */ - u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; - 8006cfe: 687b ldr r3, [r7, #4] - 8006d00: 6ada ldr r2, [r3, #44] ; 0x2c - 8006d02: 687b ldr r3, [r7, #4] - 8006d04: 6a5b ldr r3, [r3, #36] ; 0x24 - 8006d06: 1ad3 subs r3, r2, r3 - 8006d08: 60bb str r3, [r7, #8] -#if !LWIP_WND_SCALE - LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); - 8006d0a: 68bb ldr r3, [r7, #8] - 8006d0c: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 8006d10: d306 bcc.n 8006d20 - 8006d12: 4b08 ldr r3, [pc, #32] ; (8006d34 ) - 8006d14: f44f 7242 mov.w r2, #776 ; 0x308 - 8006d18: 4907 ldr r1, [pc, #28] ; (8006d38 ) - 8006d1a: 4808 ldr r0, [pc, #32] ; (8006d3c ) - 8006d1c: f008 fed2 bl 800fac4 -#endif - pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; - 8006d20: 68bb ldr r3, [r7, #8] - 8006d22: b29a uxth r2, r3 - 8006d24: 687b ldr r3, [r7, #4] - 8006d26: 855a strh r2, [r3, #42] ; 0x2a - } - return 0; - 8006d28: 2300 movs r3, #0 - } -} - 8006d2a: 4618 mov r0, r3 - 8006d2c: 3710 adds r7, #16 - 8006d2e: 46bd mov sp, r7 - 8006d30: bd80 pop {r7, pc} - 8006d32: bf00 nop - 8006d34: 0801123c .word 0x0801123c - 8006d38: 08011354 .word 0x08011354 - 8006d3c: 08011278 .word 0x08011278 - -08006d40 : - * @param pcb the tcp_pcb for which data is read - * @param len the amount of bytes that have been read by the application - */ -void -tcp_recved(struct tcp_pcb *pcb, u16_t len) -{ - 8006d40: b580 push {r7, lr} - 8006d42: b084 sub sp, #16 - 8006d44: af00 add r7, sp, #0 - 8006d46: 6078 str r0, [r7, #4] - 8006d48: 460b mov r3, r1 - 8006d4a: 807b strh r3, [r7, #2] - int wnd_inflation; - - /* pcb->state LISTEN not allowed here */ - LWIP_ASSERT("don't call tcp_recved for listen-pcbs", - 8006d4c: 687b ldr r3, [r7, #4] - 8006d4e: 7d1b ldrb r3, [r3, #20] - 8006d50: 2b01 cmp r3, #1 - 8006d52: d106 bne.n 8006d62 - 8006d54: 4b23 ldr r3, [pc, #140] ; (8006de4 ) - 8006d56: f240 321f movw r2, #799 ; 0x31f - 8006d5a: 4923 ldr r1, [pc, #140] ; (8006de8 ) - 8006d5c: 4823 ldr r0, [pc, #140] ; (8006dec ) - 8006d5e: f008 feb1 bl 800fac4 - pcb->state != LISTEN); - - pcb->rcv_wnd += len; - 8006d62: 687b ldr r3, [r7, #4] - 8006d64: 8d1a ldrh r2, [r3, #40] ; 0x28 - 8006d66: 887b ldrh r3, [r7, #2] - 8006d68: 4413 add r3, r2 - 8006d6a: b29a uxth r2, r3 - 8006d6c: 687b ldr r3, [r7, #4] - 8006d6e: 851a strh r2, [r3, #40] ; 0x28 - if (pcb->rcv_wnd > TCP_WND_MAX(pcb)) { - 8006d70: 687b ldr r3, [r7, #4] - 8006d72: 8d1b ldrh r3, [r3, #40] ; 0x28 - 8006d74: f5b3 6f06 cmp.w r3, #2144 ; 0x860 - 8006d78: d904 bls.n 8006d84 - pcb->rcv_wnd = TCP_WND_MAX(pcb); - 8006d7a: 687b ldr r3, [r7, #4] - 8006d7c: f44f 6206 mov.w r2, #2144 ; 0x860 - 8006d80: 851a strh r2, [r3, #40] ; 0x28 - 8006d82: e017 b.n 8006db4 - } else if (pcb->rcv_wnd == 0) { - 8006d84: 687b ldr r3, [r7, #4] - 8006d86: 8d1b ldrh r3, [r3, #40] ; 0x28 - 8006d88: 2b00 cmp r3, #0 - 8006d8a: d113 bne.n 8006db4 - /* rcv_wnd overflowed */ - if ((pcb->state == CLOSE_WAIT) || (pcb->state == LAST_ACK)) { - 8006d8c: 687b ldr r3, [r7, #4] - 8006d8e: 7d1b ldrb r3, [r3, #20] - 8006d90: 2b07 cmp r3, #7 - 8006d92: d003 beq.n 8006d9c - 8006d94: 687b ldr r3, [r7, #4] - 8006d96: 7d1b ldrb r3, [r3, #20] - 8006d98: 2b09 cmp r3, #9 - 8006d9a: d104 bne.n 8006da6 - /* In passive close, we allow this, since the FIN bit is added to rcv_wnd - by the stack itself, since it is not mandatory for an application - to call tcp_recved() for the FIN bit, but e.g. the netconn API does so. */ - pcb->rcv_wnd = TCP_WND_MAX(pcb); - 8006d9c: 687b ldr r3, [r7, #4] - 8006d9e: f44f 6206 mov.w r2, #2144 ; 0x860 - 8006da2: 851a strh r2, [r3, #40] ; 0x28 - 8006da4: e006 b.n 8006db4 - } else { - LWIP_ASSERT("tcp_recved: len wrapped rcv_wnd\n", 0); - 8006da6: 4b0f ldr r3, [pc, #60] ; (8006de4 ) - 8006da8: f240 322d movw r2, #813 ; 0x32d - 8006dac: 4910 ldr r1, [pc, #64] ; (8006df0 ) - 8006dae: 480f ldr r0, [pc, #60] ; (8006dec ) - 8006db0: f008 fe88 bl 800fac4 - } - } - - wnd_inflation = tcp_update_rcv_ann_wnd(pcb); - 8006db4: 6878 ldr r0, [r7, #4] - 8006db6: f7ff ff75 bl 8006ca4 - 8006dba: 4603 mov r3, r0 - 8006dbc: 60fb str r3, [r7, #12] - - /* If the change in the right edge of window is significant (default - * watermark is TCP_WND/4), then send an explicit update now. - * Otherwise wait for a packet to be sent in the normal course of - * events (or more window to be available later) */ - if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { - 8006dbe: 68fb ldr r3, [r7, #12] - 8006dc0: f5b3 7f06 cmp.w r3, #536 ; 0x218 - 8006dc4: db09 blt.n 8006dda - tcp_ack_now(pcb); - 8006dc6: 687b ldr r3, [r7, #4] - 8006dc8: 7e9b ldrb r3, [r3, #26] - 8006dca: f043 0302 orr.w r3, r3, #2 - 8006dce: b2da uxtb r2, r3 - 8006dd0: 687b ldr r3, [r7, #4] - 8006dd2: 769a strb r2, [r3, #26] - tcp_output(pcb); - 8006dd4: 6878 ldr r0, [r7, #4] - 8006dd6: f003 fb4f bl 800a478 - } - - LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n", - len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd))); -} - 8006dda: bf00 nop - 8006ddc: 3710 adds r7, #16 - 8006dde: 46bd mov sp, r7 - 8006de0: bd80 pop {r7, pc} - 8006de2: bf00 nop - 8006de4: 0801123c .word 0x0801123c - 8006de8: 08011370 .word 0x08011370 - 8006dec: 08011278 .word 0x08011278 - 8006df0: 08011398 .word 0x08011398 - -08006df4 : - * - * Automatically called from tcp_tmr(). - */ -void -tcp_slowtmr(void) -{ - 8006df4: b5b0 push {r4, r5, r7, lr} - 8006df6: b08c sub sp, #48 ; 0x30 - 8006df8: af02 add r7, sp, #8 - tcpwnd_size_t eff_wnd; - u8_t pcb_remove; /* flag if a PCB should be removed */ - u8_t pcb_reset; /* flag if a RST should be sent when removing */ - err_t err; - - err = ERR_OK; - 8006dfa: 2300 movs r3, #0 - 8006dfc: 777b strb r3, [r7, #29] - - ++tcp_ticks; - 8006dfe: 4b97 ldr r3, [pc, #604] ; (800705c ) - 8006e00: 681b ldr r3, [r3, #0] - 8006e02: 3301 adds r3, #1 - 8006e04: 4a95 ldr r2, [pc, #596] ; (800705c ) - 8006e06: 6013 str r3, [r2, #0] - ++tcp_timer_ctr; - 8006e08: 4b95 ldr r3, [pc, #596] ; (8007060 ) - 8006e0a: 781b ldrb r3, [r3, #0] - 8006e0c: 3301 adds r3, #1 - 8006e0e: b2da uxtb r2, r3 - 8006e10: 4b93 ldr r3, [pc, #588] ; (8007060 ) - 8006e12: 701a strb r2, [r3, #0] - -tcp_slowtmr_start: - /* Steps through all of the active PCBs. */ - prev = NULL; - 8006e14: 2300 movs r3, #0 - 8006e16: 623b str r3, [r7, #32] - pcb = tcp_active_pcbs; - 8006e18: 4b92 ldr r3, [pc, #584] ; (8007064 ) - 8006e1a: 681b ldr r3, [r3, #0] - 8006e1c: 627b str r3, [r7, #36] ; 0x24 - if (pcb == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); - } - while (pcb != NULL) { - 8006e1e: e227 b.n 8007270 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); - LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); - 8006e20: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e22: 7d1b ldrb r3, [r3, #20] - 8006e24: 2b00 cmp r3, #0 - 8006e26: d106 bne.n 8006e36 - 8006e28: 4b8f ldr r3, [pc, #572] ; (8007068 ) - 8006e2a: f44f 727c mov.w r2, #1008 ; 0x3f0 - 8006e2e: 498f ldr r1, [pc, #572] ; (800706c ) - 8006e30: 488f ldr r0, [pc, #572] ; (8007070 ) - 8006e32: f008 fe47 bl 800fac4 - LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); - 8006e36: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e38: 7d1b ldrb r3, [r3, #20] - 8006e3a: 2b01 cmp r3, #1 - 8006e3c: d106 bne.n 8006e4c - 8006e3e: 4b8a ldr r3, [pc, #552] ; (8007068 ) - 8006e40: f240 32f1 movw r2, #1009 ; 0x3f1 - 8006e44: 498b ldr r1, [pc, #556] ; (8007074 ) - 8006e46: 488a ldr r0, [pc, #552] ; (8007070 ) - 8006e48: f008 fe3c bl 800fac4 - LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); - 8006e4c: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e4e: 7d1b ldrb r3, [r3, #20] - 8006e50: 2b0a cmp r3, #10 - 8006e52: d106 bne.n 8006e62 - 8006e54: 4b84 ldr r3, [pc, #528] ; (8007068 ) - 8006e56: f240 32f2 movw r2, #1010 ; 0x3f2 - 8006e5a: 4987 ldr r1, [pc, #540] ; (8007078 ) - 8006e5c: 4884 ldr r0, [pc, #528] ; (8007070 ) - 8006e5e: f008 fe31 bl 800fac4 - if (pcb->last_timer == tcp_timer_ctr) { - 8006e62: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e64: 7f5a ldrb r2, [r3, #29] - 8006e66: 4b7e ldr r3, [pc, #504] ; (8007060 ) - 8006e68: 781b ldrb r3, [r3, #0] - 8006e6a: 429a cmp r2, r3 - 8006e6c: d103 bne.n 8006e76 - /* skip this pcb, we have already processed it */ - pcb = pcb->next; - 8006e6e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e70: 68db ldr r3, [r3, #12] - 8006e72: 627b str r3, [r7, #36] ; 0x24 - continue; - 8006e74: e1fc b.n 8007270 - } - pcb->last_timer = tcp_timer_ctr; - 8006e76: 4b7a ldr r3, [pc, #488] ; (8007060 ) - 8006e78: 781a ldrb r2, [r3, #0] - 8006e7a: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e7c: 775a strb r2, [r3, #29] - - pcb_remove = 0; - 8006e7e: 2300 movs r3, #0 - 8006e80: 77fb strb r3, [r7, #31] - pcb_reset = 0; - 8006e82: 2300 movs r3, #0 - 8006e84: 77bb strb r3, [r7, #30] - - if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { - 8006e86: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e88: 7d1b ldrb r3, [r3, #20] - 8006e8a: 2b02 cmp r3, #2 - 8006e8c: d108 bne.n 8006ea0 - 8006e8e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006e90: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 8006e94: 2b05 cmp r3, #5 - 8006e96: d903 bls.n 8006ea0 - ++pcb_remove; - 8006e98: 7ffb ldrb r3, [r7, #31] - 8006e9a: 3301 adds r3, #1 - 8006e9c: 77fb strb r3, [r7, #31] - 8006e9e: e0a2 b.n 8006fe6 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); - } - else if (pcb->nrtx >= TCP_MAXRTX) { - 8006ea0: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006ea2: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 8006ea6: 2b0b cmp r3, #11 - 8006ea8: d903 bls.n 8006eb2 - ++pcb_remove; - 8006eaa: 7ffb ldrb r3, [r7, #31] - 8006eac: 3301 adds r3, #1 - 8006eae: 77fb strb r3, [r7, #31] - 8006eb0: e099 b.n 8006fe6 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); - } else { - if (pcb->persist_backoff > 0) { - 8006eb2: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006eb4: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 - 8006eb8: 2b00 cmp r3, #0 - 8006eba: d032 beq.n 8006f22 - /* If snd_wnd is zero, use persist timer to send 1 byte probes - * instead of using the standard retransmission mechanism. */ - u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff-1]; - 8006ebc: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006ebe: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 - 8006ec2: 3b01 subs r3, #1 - 8006ec4: 4a6d ldr r2, [pc, #436] ; (800707c ) - 8006ec6: 5cd3 ldrb r3, [r2, r3] - 8006ec8: 74fb strb r3, [r7, #19] - if (pcb->persist_cnt < backoff_cnt) { - 8006eca: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006ecc: f893 3094 ldrb.w r3, [r3, #148] ; 0x94 - 8006ed0: 7cfa ldrb r2, [r7, #19] - 8006ed2: 429a cmp r2, r3 - 8006ed4: d907 bls.n 8006ee6 - pcb->persist_cnt++; - 8006ed6: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006ed8: f893 3094 ldrb.w r3, [r3, #148] ; 0x94 - 8006edc: 3301 adds r3, #1 - 8006ede: b2da uxtb r2, r3 - 8006ee0: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006ee2: f883 2094 strb.w r2, [r3, #148] ; 0x94 - } - if (pcb->persist_cnt >= backoff_cnt) { - 8006ee6: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006ee8: f893 3094 ldrb.w r3, [r3, #148] ; 0x94 - 8006eec: 7cfa ldrb r2, [r7, #19] - 8006eee: 429a cmp r2, r3 - 8006ef0: d879 bhi.n 8006fe6 - if (tcp_zero_window_probe(pcb) == ERR_OK) { - 8006ef2: 6a78 ldr r0, [r7, #36] ; 0x24 - 8006ef4: f003 fecb bl 800ac8e - 8006ef8: 4603 mov r3, r0 - 8006efa: 2b00 cmp r3, #0 - 8006efc: d173 bne.n 8006fe6 - pcb->persist_cnt = 0; - 8006efe: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f00: 2200 movs r2, #0 - 8006f02: f883 2094 strb.w r2, [r3, #148] ; 0x94 - if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { - 8006f06: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f08: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 - 8006f0c: 2b06 cmp r3, #6 - 8006f0e: d86a bhi.n 8006fe6 - pcb->persist_backoff++; - 8006f10: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f12: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 - 8006f16: 3301 adds r3, #1 - 8006f18: b2da uxtb r2, r3 - 8006f1a: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f1c: f883 2095 strb.w r2, [r3, #149] ; 0x95 - 8006f20: e061 b.n 8006fe6 - } - } - } - } else { - /* Increase the retransmission timer if it is running */ - if (pcb->rtime >= 0) { - 8006f22: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f24: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 - 8006f28: 2b00 cmp r3, #0 - 8006f2a: db08 blt.n 8006f3e - ++pcb->rtime; - 8006f2c: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f2e: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 - 8006f32: b29b uxth r3, r3 - 8006f34: 3301 adds r3, #1 - 8006f36: b29b uxth r3, r3 - 8006f38: b21a sxth r2, r3 - 8006f3a: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f3c: 861a strh r2, [r3, #48] ; 0x30 - } - - if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { - 8006f3e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f40: 6edb ldr r3, [r3, #108] ; 0x6c - 8006f42: 2b00 cmp r3, #0 - 8006f44: d04f beq.n 8006fe6 - 8006f46: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f48: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30 - 8006f4c: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f4e: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40 - 8006f52: 429a cmp r2, r3 - 8006f54: db47 blt.n 8006fe6 - " pcb->rto %"S16_F"\n", - pcb->rtime, pcb->rto)); - - /* Double retransmission time-out unless we are trying to - * connect to somebody (i.e., we are in SYN_SENT). */ - if (pcb->state != SYN_SENT) { - 8006f56: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f58: 7d1b ldrb r3, [r3, #20] - 8006f5a: 2b02 cmp r3, #2 - 8006f5c: d018 beq.n 8006f90 - u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff)-1); - 8006f5e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f60: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 8006f64: 2b0c cmp r3, #12 - 8006f66: bf28 it cs - 8006f68: 230c movcs r3, #12 - 8006f6a: 75fb strb r3, [r7, #23] - pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; - 8006f6c: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f6e: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c - 8006f72: 10db asrs r3, r3, #3 - 8006f74: b21b sxth r3, r3 - 8006f76: 461a mov r2, r3 - 8006f78: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f7a: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e - 8006f7e: 4413 add r3, r2 - 8006f80: 7dfa ldrb r2, [r7, #23] - 8006f82: 493f ldr r1, [pc, #252] ; (8007080 ) - 8006f84: 5c8a ldrb r2, [r1, r2] - 8006f86: 4093 lsls r3, r2 - 8006f88: b21a sxth r2, r3 - 8006f8a: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f8c: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 - } - - /* Reset the retransmission timer. */ - pcb->rtime = 0; - 8006f90: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f92: 2200 movs r2, #0 - 8006f94: 861a strh r2, [r3, #48] ; 0x30 - - /* Reduce congestion window and ssthresh. */ - eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); - 8006f96: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f98: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c - 8006f9c: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006f9e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 - 8006fa2: 4293 cmp r3, r2 - 8006fa4: bf28 it cs - 8006fa6: 4613 movcs r3, r2 - 8006fa8: 82bb strh r3, [r7, #20] - pcb->ssthresh = eff_wnd >> 1; - 8006faa: 8abb ldrh r3, [r7, #20] - 8006fac: 085b lsrs r3, r3, #1 - 8006fae: b29a uxth r2, r3 - 8006fb0: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fb2: f8a3 204a strh.w r2, [r3, #74] ; 0x4a - if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { - 8006fb6: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fb8: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a - 8006fbc: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fbe: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8006fc0: 005b lsls r3, r3, #1 - 8006fc2: b29b uxth r3, r3 - 8006fc4: 429a cmp r2, r3 - 8006fc6: d206 bcs.n 8006fd6 - pcb->ssthresh = (pcb->mss << 1); - 8006fc8: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fca: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8006fcc: 005b lsls r3, r3, #1 - 8006fce: b29a uxth r2, r3 - 8006fd0: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fd2: f8a3 204a strh.w r2, [r3, #74] ; 0x4a - } - pcb->cwnd = pcb->mss; - 8006fd6: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fd8: 8e5a ldrh r2, [r3, #50] ; 0x32 - 8006fda: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fdc: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - - /* The following needs to be called AFTER cwnd is set to one - mss - STJ */ - tcp_rexmit_rto(pcb); - 8006fe0: 6a78 ldr r0, [r7, #36] ; 0x24 - 8006fe2: f003 fd43 bl 800aa6c - } - } - } - /* Check if this PCB has stayed too long in FIN-WAIT-2 */ - if (pcb->state == FIN_WAIT_2) { - 8006fe6: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006fe8: 7d1b ldrb r3, [r3, #20] - 8006fea: 2b06 cmp r3, #6 - 8006fec: d10f bne.n 800700e - /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ - if (pcb->flags & TF_RXCLOSED) { - 8006fee: 6a7b ldr r3, [r7, #36] ; 0x24 - 8006ff0: 7e9b ldrb r3, [r3, #26] - 8006ff2: f003 0310 and.w r3, r3, #16 - 8006ff6: 2b00 cmp r3, #0 - 8006ff8: d009 beq.n 800700e - /* PCB was fully closed (either through close() or SHUT_RDWR): - normal FIN-WAIT timeout handling. */ - if ((u32_t)(tcp_ticks - pcb->tmr) > - 8006ffa: 4b18 ldr r3, [pc, #96] ; (800705c ) - 8006ffc: 681a ldr r2, [r3, #0] - 8006ffe: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007000: 6a1b ldr r3, [r3, #32] - 8007002: 1ad3 subs r3, r2, r3 - 8007004: 2b28 cmp r3, #40 ; 0x28 - 8007006: d902 bls.n 800700e - TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { - ++pcb_remove; - 8007008: 7ffb ldrb r3, [r7, #31] - 800700a: 3301 adds r3, #1 - 800700c: 77fb strb r3, [r7, #31] - } - } - } - - /* Check if KEEPALIVE should be sent */ - if (ip_get_option(pcb, SOF_KEEPALIVE) && - 800700e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007010: 7a1b ldrb r3, [r3, #8] - 8007012: f003 0308 and.w r3, r3, #8 - 8007016: 2b00 cmp r3, #0 - 8007018: d05d beq.n 80070d6 - ((pcb->state == ESTABLISHED) || - 800701a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800701c: 7d1b ldrb r3, [r3, #20] - if (ip_get_option(pcb, SOF_KEEPALIVE) && - 800701e: 2b04 cmp r3, #4 - 8007020: d003 beq.n 800702a - (pcb->state == CLOSE_WAIT))) { - 8007022: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007024: 7d1b ldrb r3, [r3, #20] - ((pcb->state == ESTABLISHED) || - 8007026: 2b07 cmp r3, #7 - 8007028: d155 bne.n 80070d6 - if ((u32_t)(tcp_ticks - pcb->tmr) > - 800702a: 4b0c ldr r3, [pc, #48] ; (800705c ) - 800702c: 681a ldr r2, [r3, #0] - 800702e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007030: 6a1b ldr r3, [r3, #32] - 8007032: 1ad2 subs r2, r2, r3 - (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) - 8007034: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007036: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 - 800703a: f503 2324 add.w r3, r3, #671744 ; 0xa4000 - 800703e: f603 43b8 addw r3, r3, #3256 ; 0xcb8 - 8007042: 4910 ldr r1, [pc, #64] ; (8007084 ) - 8007044: fba1 1303 umull r1, r3, r1, r3 - 8007048: 095b lsrs r3, r3, #5 - if ((u32_t)(tcp_ticks - pcb->tmr) > - 800704a: 429a cmp r2, r3 - 800704c: d91c bls.n 8007088 - { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to ")); - ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); - LWIP_DEBUGF(TCP_DEBUG, ("\n")); - - ++pcb_remove; - 800704e: 7ffb ldrb r3, [r7, #31] - 8007050: 3301 adds r3, #1 - 8007052: 77fb strb r3, [r7, #31] - ++pcb_reset; - 8007054: 7fbb ldrb r3, [r7, #30] - 8007056: 3301 adds r3, #1 - 8007058: 77bb strb r3, [r7, #30] - 800705a: e03c b.n 80070d6 - 800705c: 20006d64 .word 0x20006d64 - 8007060: 20006d7a .word 0x20006d7a - 8007064: 20006d70 .word 0x20006d70 - 8007068: 0801123c .word 0x0801123c - 800706c: 080113ec .word 0x080113ec - 8007070: 08011278 .word 0x08011278 - 8007074: 08011418 .word 0x08011418 - 8007078: 08011444 .word 0x08011444 - 800707c: 08012b78 .word 0x08012b78 - 8007080: 08012b68 .word 0x08012b68 - 8007084: 10624dd3 .word 0x10624dd3 - } else if ((u32_t)(tcp_ticks - pcb->tmr) > - 8007088: 4b97 ldr r3, [pc, #604] ; (80072e8 ) - 800708a: 681a ldr r2, [r3, #0] - 800708c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800708e: 6a1b ldr r3, [r3, #32] - 8007090: 1ad2 subs r2, r2, r3 - (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) - 8007092: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007094: f8d3 1090 ldr.w r1, [r3, #144] ; 0x90 - 8007098: 6a7b ldr r3, [r7, #36] ; 0x24 - 800709a: f893 3096 ldrb.w r3, [r3, #150] ; 0x96 - 800709e: 4618 mov r0, r3 - 80070a0: 4b92 ldr r3, [pc, #584] ; (80072ec ) - 80070a2: fb00 f303 mul.w r3, r0, r3 - 80070a6: 440b add r3, r1 - / TCP_SLOW_INTERVAL) - 80070a8: 4991 ldr r1, [pc, #580] ; (80072f0 ) - 80070aa: fba1 1303 umull r1, r3, r1, r3 - 80070ae: 095b lsrs r3, r3, #5 - } else if ((u32_t)(tcp_ticks - pcb->tmr) > - 80070b0: 429a cmp r2, r3 - 80070b2: d910 bls.n 80070d6 - { - err = tcp_keepalive(pcb); - 80070b4: 6a78 ldr r0, [r7, #36] ; 0x24 - 80070b6: f003 fdad bl 800ac14 - 80070ba: 4603 mov r3, r0 - 80070bc: 777b strb r3, [r7, #29] - if (err == ERR_OK) { - 80070be: f997 301d ldrsb.w r3, [r7, #29] - 80070c2: 2b00 cmp r3, #0 - 80070c4: d107 bne.n 80070d6 - pcb->keep_cnt_sent++; - 80070c6: 6a7b ldr r3, [r7, #36] ; 0x24 - 80070c8: f893 3096 ldrb.w r3, [r3, #150] ; 0x96 - 80070cc: 3301 adds r3, #1 - 80070ce: b2da uxtb r2, r3 - 80070d0: 6a7b ldr r3, [r7, #36] ; 0x24 - 80070d2: f883 2096 strb.w r2, [r3, #150] ; 0x96 - - /* If this PCB has queued out of sequence data, but has been - inactive for too long, will drop the data (it will eventually - be retransmitted). */ -#if TCP_QUEUE_OOSEQ - if (pcb->ooseq != NULL && - 80070d6: 6a7b ldr r3, [r7, #36] ; 0x24 - 80070d8: 6f1b ldr r3, [r3, #112] ; 0x70 - 80070da: 2b00 cmp r3, #0 - 80070dc: d016 beq.n 800710c - (u32_t)tcp_ticks - pcb->tmr >= pcb->rto * TCP_OOSEQ_TIMEOUT) { - 80070de: 4b82 ldr r3, [pc, #520] ; (80072e8 ) - 80070e0: 681a ldr r2, [r3, #0] - 80070e2: 6a7b ldr r3, [r7, #36] ; 0x24 - 80070e4: 6a1b ldr r3, [r3, #32] - 80070e6: 1ad2 subs r2, r2, r3 - 80070e8: 6a7b ldr r3, [r7, #36] ; 0x24 - 80070ea: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40 - 80070ee: 4619 mov r1, r3 - 80070f0: 460b mov r3, r1 - 80070f2: 005b lsls r3, r3, #1 - 80070f4: 440b add r3, r1 - 80070f6: 005b lsls r3, r3, #1 - if (pcb->ooseq != NULL && - 80070f8: 429a cmp r2, r3 - 80070fa: d307 bcc.n 800710c - tcp_segs_free(pcb->ooseq); - 80070fc: 6a7b ldr r3, [r7, #36] ; 0x24 - 80070fe: 6f1b ldr r3, [r3, #112] ; 0x70 - 8007100: 4618 mov r0, r3 - 8007102: f000 fa06 bl 8007512 - pcb->ooseq = NULL; - 8007106: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007108: 2200 movs r2, #0 - 800710a: 671a str r2, [r3, #112] ; 0x70 - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); - } -#endif /* TCP_QUEUE_OOSEQ */ - - /* Check if this PCB has stayed too long in SYN-RCVD */ - if (pcb->state == SYN_RCVD) { - 800710c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800710e: 7d1b ldrb r3, [r3, #20] - 8007110: 2b03 cmp r3, #3 - 8007112: d109 bne.n 8007128 - if ((u32_t)(tcp_ticks - pcb->tmr) > - 8007114: 4b74 ldr r3, [pc, #464] ; (80072e8 ) - 8007116: 681a ldr r2, [r3, #0] - 8007118: 6a7b ldr r3, [r7, #36] ; 0x24 - 800711a: 6a1b ldr r3, [r3, #32] - 800711c: 1ad3 subs r3, r2, r3 - 800711e: 2b28 cmp r3, #40 ; 0x28 - 8007120: d902 bls.n 8007128 - TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { - ++pcb_remove; - 8007122: 7ffb ldrb r3, [r7, #31] - 8007124: 3301 adds r3, #1 - 8007126: 77fb strb r3, [r7, #31] - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n")); - } - } - - /* Check if this PCB has stayed too long in LAST-ACK */ - if (pcb->state == LAST_ACK) { - 8007128: 6a7b ldr r3, [r7, #36] ; 0x24 - 800712a: 7d1b ldrb r3, [r3, #20] - 800712c: 2b09 cmp r3, #9 - 800712e: d109 bne.n 8007144 - if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { - 8007130: 4b6d ldr r3, [pc, #436] ; (80072e8 ) - 8007132: 681a ldr r2, [r3, #0] - 8007134: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007136: 6a1b ldr r3, [r3, #32] - 8007138: 1ad3 subs r3, r2, r3 - 800713a: 2bf0 cmp r3, #240 ; 0xf0 - 800713c: d902 bls.n 8007144 - ++pcb_remove; - 800713e: 7ffb ldrb r3, [r7, #31] - 8007140: 3301 adds r3, #1 - 8007142: 77fb strb r3, [r7, #31] - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); - } - } - - /* If the PCB should be removed, do it. */ - if (pcb_remove) { - 8007144: 7ffb ldrb r3, [r7, #31] - 8007146: 2b00 cmp r3, #0 - 8007148: d05d beq.n 8007206 - struct tcp_pcb *pcb2; -#if LWIP_CALLBACK_API - tcp_err_fn err_fn = pcb->errf; - 800714a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800714c: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c - 8007150: 60fb str r3, [r7, #12] -#endif /* LWIP_CALLBACK_API */ - void *err_arg; - enum tcp_state last_state; - tcp_pcb_purge(pcb); - 8007152: 6a78 ldr r0, [r7, #36] ; 0x24 - 8007154: f000 fb86 bl 8007864 - /* Remove PCB from tcp_active_pcbs list. */ - if (prev != NULL) { - 8007158: 6a3b ldr r3, [r7, #32] - 800715a: 2b00 cmp r3, #0 - 800715c: d010 beq.n 8007180 - LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); - 800715e: 4b65 ldr r3, [pc, #404] ; (80072f4 ) - 8007160: 681b ldr r3, [r3, #0] - 8007162: 6a7a ldr r2, [r7, #36] ; 0x24 - 8007164: 429a cmp r2, r3 - 8007166: d106 bne.n 8007176 - 8007168: 4b63 ldr r3, [pc, #396] ; (80072f8 ) - 800716a: f240 4289 movw r2, #1161 ; 0x489 - 800716e: 4963 ldr r1, [pc, #396] ; (80072fc ) - 8007170: 4863 ldr r0, [pc, #396] ; (8007300 ) - 8007172: f008 fca7 bl 800fac4 - prev->next = pcb->next; - 8007176: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007178: 68da ldr r2, [r3, #12] - 800717a: 6a3b ldr r3, [r7, #32] - 800717c: 60da str r2, [r3, #12] - 800717e: e00f b.n 80071a0 - } else { - /* This PCB was the first. */ - LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); - 8007180: 4b5c ldr r3, [pc, #368] ; (80072f4 ) - 8007182: 681b ldr r3, [r3, #0] - 8007184: 6a7a ldr r2, [r7, #36] ; 0x24 - 8007186: 429a cmp r2, r3 - 8007188: d006 beq.n 8007198 - 800718a: 4b5b ldr r3, [pc, #364] ; (80072f8 ) - 800718c: f240 428d movw r2, #1165 ; 0x48d - 8007190: 495c ldr r1, [pc, #368] ; (8007304 ) - 8007192: 485b ldr r0, [pc, #364] ; (8007300 ) - 8007194: f008 fc96 bl 800fac4 - tcp_active_pcbs = pcb->next; - 8007198: 6a7b ldr r3, [r7, #36] ; 0x24 - 800719a: 68db ldr r3, [r3, #12] - 800719c: 4a55 ldr r2, [pc, #340] ; (80072f4 ) - 800719e: 6013 str r3, [r2, #0] - } - - if (pcb_reset) { - 80071a0: 7fbb ldrb r3, [r7, #30] - 80071a2: 2b00 cmp r3, #0 - 80071a4: d010 beq.n 80071c8 - tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, - 80071a6: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071a8: 6cd8 ldr r0, [r3, #76] ; 0x4c - 80071aa: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071ac: 6a59 ldr r1, [r3, #36] ; 0x24 - 80071ae: 6a7c ldr r4, [r7, #36] ; 0x24 - 80071b0: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071b2: 1d1d adds r5, r3, #4 - 80071b4: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071b6: 8adb ldrh r3, [r3, #22] - 80071b8: 6a7a ldr r2, [r7, #36] ; 0x24 - 80071ba: 8b12 ldrh r2, [r2, #24] - 80071bc: 9201 str r2, [sp, #4] - 80071be: 9300 str r3, [sp, #0] - 80071c0: 462b mov r3, r5 - 80071c2: 4622 mov r2, r4 - 80071c4: f003 fbdc bl 800a980 - pcb->local_port, pcb->remote_port); - } - - err_arg = pcb->callback_arg; - 80071c8: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071ca: 691b ldr r3, [r3, #16] - 80071cc: 60bb str r3, [r7, #8] - last_state = pcb->state; - 80071ce: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071d0: 7d1b ldrb r3, [r3, #20] - 80071d2: 71fb strb r3, [r7, #7] - pcb2 = pcb; - 80071d4: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071d6: 603b str r3, [r7, #0] - pcb = pcb->next; - 80071d8: 6a7b ldr r3, [r7, #36] ; 0x24 - 80071da: 68db ldr r3, [r3, #12] - 80071dc: 627b str r3, [r7, #36] ; 0x24 - memp_free(MEMP_TCP_PCB, pcb2); - 80071de: 6839 ldr r1, [r7, #0] - 80071e0: 2001 movs r0, #1 - 80071e2: f7fe fb2d bl 8005840 - - tcp_active_pcbs_changed = 0; - 80071e6: 4b48 ldr r3, [pc, #288] ; (8007308 ) - 80071e8: 2200 movs r2, #0 - 80071ea: 701a strb r2, [r3, #0] - TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); - 80071ec: 68fb ldr r3, [r7, #12] - 80071ee: 2b00 cmp r3, #0 - 80071f0: d004 beq.n 80071fc - 80071f2: 68fb ldr r3, [r7, #12] - 80071f4: f06f 010c mvn.w r1, #12 - 80071f8: 68b8 ldr r0, [r7, #8] - 80071fa: 4798 blx r3 - if (tcp_active_pcbs_changed) { - 80071fc: 4b42 ldr r3, [pc, #264] ; (8007308 ) - 80071fe: 781b ldrb r3, [r3, #0] - 8007200: 2b00 cmp r3, #0 - 8007202: d035 beq.n 8007270 - goto tcp_slowtmr_start; - 8007204: e606 b.n 8006e14 - } - } else { - /* get the 'next' element now and work with 'prev' below (in case of abort) */ - prev = pcb; - 8007206: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007208: 623b str r3, [r7, #32] - pcb = pcb->next; - 800720a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800720c: 68db ldr r3, [r3, #12] - 800720e: 627b str r3, [r7, #36] ; 0x24 - - /* We check if we should poll the connection. */ - ++prev->polltmr; - 8007210: 6a3b ldr r3, [r7, #32] - 8007212: 7edb ldrb r3, [r3, #27] - 8007214: 3301 adds r3, #1 - 8007216: b2da uxtb r2, r3 - 8007218: 6a3b ldr r3, [r7, #32] - 800721a: 76da strb r2, [r3, #27] - if (prev->polltmr >= prev->pollinterval) { - 800721c: 6a3b ldr r3, [r7, #32] - 800721e: 7eda ldrb r2, [r3, #27] - 8007220: 6a3b ldr r3, [r7, #32] - 8007222: 7f1b ldrb r3, [r3, #28] - 8007224: 429a cmp r2, r3 - 8007226: d323 bcc.n 8007270 - prev->polltmr = 0; - 8007228: 6a3b ldr r3, [r7, #32] - 800722a: 2200 movs r2, #0 - 800722c: 76da strb r2, [r3, #27] - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); - tcp_active_pcbs_changed = 0; - 800722e: 4b36 ldr r3, [pc, #216] ; (8007308 ) - 8007230: 2200 movs r2, #0 - 8007232: 701a strb r2, [r3, #0] - TCP_EVENT_POLL(prev, err); - 8007234: 6a3b ldr r3, [r7, #32] - 8007236: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 - 800723a: 2b00 cmp r3, #0 - 800723c: d00a beq.n 8007254 - 800723e: 6a3b ldr r3, [r7, #32] - 8007240: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 - 8007244: 6a3a ldr r2, [r7, #32] - 8007246: 6912 ldr r2, [r2, #16] - 8007248: 6a39 ldr r1, [r7, #32] - 800724a: 4610 mov r0, r2 - 800724c: 4798 blx r3 - 800724e: 4603 mov r3, r0 - 8007250: 777b strb r3, [r7, #29] - 8007252: e001 b.n 8007258 - 8007254: 2300 movs r3, #0 - 8007256: 777b strb r3, [r7, #29] - if (tcp_active_pcbs_changed) { - 8007258: 4b2b ldr r3, [pc, #172] ; (8007308 ) - 800725a: 781b ldrb r3, [r3, #0] - 800725c: 2b00 cmp r3, #0 - 800725e: d000 beq.n 8007262 - goto tcp_slowtmr_start; - 8007260: e5d8 b.n 8006e14 - } - /* if err == ERR_ABRT, 'prev' is already deallocated */ - if (err == ERR_OK) { - 8007262: f997 301d ldrsb.w r3, [r7, #29] - 8007266: 2b00 cmp r3, #0 - 8007268: d102 bne.n 8007270 - tcp_output(prev); - 800726a: 6a38 ldr r0, [r7, #32] - 800726c: f003 f904 bl 800a478 - while (pcb != NULL) { - 8007270: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007272: 2b00 cmp r3, #0 - 8007274: f47f add4 bne.w 8006e20 - } - } - - - /* Steps through all of the TIME-WAIT PCBs. */ - prev = NULL; - 8007278: 2300 movs r3, #0 - 800727a: 623b str r3, [r7, #32] - pcb = tcp_tw_pcbs; - 800727c: 4b23 ldr r3, [pc, #140] ; (800730c ) - 800727e: 681b ldr r3, [r3, #0] - 8007280: 627b str r3, [r7, #36] ; 0x24 - while (pcb != NULL) { - 8007282: e068 b.n 8007356 - LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); - 8007284: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007286: 7d1b ldrb r3, [r3, #20] - 8007288: 2b0a cmp r3, #10 - 800728a: d006 beq.n 800729a - 800728c: 4b1a ldr r3, [pc, #104] ; (80072f8 ) - 800728e: f240 42bd movw r2, #1213 ; 0x4bd - 8007292: 491f ldr r1, [pc, #124] ; (8007310 ) - 8007294: 481a ldr r0, [pc, #104] ; (8007300 ) - 8007296: f008 fc15 bl 800fac4 - pcb_remove = 0; - 800729a: 2300 movs r3, #0 - 800729c: 77fb strb r3, [r7, #31] - - /* Check if this PCB has stayed long enough in TIME-WAIT */ - if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { - 800729e: 4b12 ldr r3, [pc, #72] ; (80072e8 ) - 80072a0: 681a ldr r2, [r3, #0] - 80072a2: 6a7b ldr r3, [r7, #36] ; 0x24 - 80072a4: 6a1b ldr r3, [r3, #32] - 80072a6: 1ad3 subs r3, r2, r3 - 80072a8: 2bf0 cmp r3, #240 ; 0xf0 - 80072aa: d902 bls.n 80072b2 - ++pcb_remove; - 80072ac: 7ffb ldrb r3, [r7, #31] - 80072ae: 3301 adds r3, #1 - 80072b0: 77fb strb r3, [r7, #31] - } - - /* If the PCB should be removed, do it. */ - if (pcb_remove) { - 80072b2: 7ffb ldrb r3, [r7, #31] - 80072b4: 2b00 cmp r3, #0 - 80072b6: d049 beq.n 800734c - struct tcp_pcb *pcb2; - tcp_pcb_purge(pcb); - 80072b8: 6a78 ldr r0, [r7, #36] ; 0x24 - 80072ba: f000 fad3 bl 8007864 - /* Remove PCB from tcp_tw_pcbs list. */ - if (prev != NULL) { - 80072be: 6a3b ldr r3, [r7, #32] - 80072c0: 2b00 cmp r3, #0 - 80072c2: d029 beq.n 8007318 - LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); - 80072c4: 4b11 ldr r3, [pc, #68] ; (800730c ) - 80072c6: 681b ldr r3, [r3, #0] - 80072c8: 6a7a ldr r2, [r7, #36] ; 0x24 - 80072ca: 429a cmp r2, r3 - 80072cc: d106 bne.n 80072dc - 80072ce: 4b0a ldr r3, [pc, #40] ; (80072f8 ) - 80072d0: f240 42cb movw r2, #1227 ; 0x4cb - 80072d4: 490f ldr r1, [pc, #60] ; (8007314 ) - 80072d6: 480a ldr r0, [pc, #40] ; (8007300 ) - 80072d8: f008 fbf4 bl 800fac4 - prev->next = pcb->next; - 80072dc: 6a7b ldr r3, [r7, #36] ; 0x24 - 80072de: 68da ldr r2, [r3, #12] - 80072e0: 6a3b ldr r3, [r7, #32] - 80072e2: 60da str r2, [r3, #12] - 80072e4: e028 b.n 8007338 - 80072e6: bf00 nop - 80072e8: 20006d64 .word 0x20006d64 - 80072ec: 000124f8 .word 0x000124f8 - 80072f0: 10624dd3 .word 0x10624dd3 - 80072f4: 20006d70 .word 0x20006d70 - 80072f8: 0801123c .word 0x0801123c - 80072fc: 08011474 .word 0x08011474 - 8007300: 08011278 .word 0x08011278 - 8007304: 080114a0 .word 0x080114a0 - 8007308: 20006d78 .word 0x20006d78 - 800730c: 20006d74 .word 0x20006d74 - 8007310: 080114cc .word 0x080114cc - 8007314: 080114fc .word 0x080114fc - } else { - /* This PCB was the first. */ - LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); - 8007318: 4b13 ldr r3, [pc, #76] ; (8007368 ) - 800731a: 681b ldr r3, [r3, #0] - 800731c: 6a7a ldr r2, [r7, #36] ; 0x24 - 800731e: 429a cmp r2, r3 - 8007320: d006 beq.n 8007330 - 8007322: 4b12 ldr r3, [pc, #72] ; (800736c ) - 8007324: f240 42cf movw r2, #1231 ; 0x4cf - 8007328: 4911 ldr r1, [pc, #68] ; (8007370 ) - 800732a: 4812 ldr r0, [pc, #72] ; (8007374 ) - 800732c: f008 fbca bl 800fac4 - tcp_tw_pcbs = pcb->next; - 8007330: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007332: 68db ldr r3, [r3, #12] - 8007334: 4a0c ldr r2, [pc, #48] ; (8007368 ) - 8007336: 6013 str r3, [r2, #0] - } - pcb2 = pcb; - 8007338: 6a7b ldr r3, [r7, #36] ; 0x24 - 800733a: 61bb str r3, [r7, #24] - pcb = pcb->next; - 800733c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800733e: 68db ldr r3, [r3, #12] - 8007340: 627b str r3, [r7, #36] ; 0x24 - memp_free(MEMP_TCP_PCB, pcb2); - 8007342: 69b9 ldr r1, [r7, #24] - 8007344: 2001 movs r0, #1 - 8007346: f7fe fa7b bl 8005840 - 800734a: e004 b.n 8007356 - } else { - prev = pcb; - 800734c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800734e: 623b str r3, [r7, #32] - pcb = pcb->next; - 8007350: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007352: 68db ldr r3, [r3, #12] - 8007354: 627b str r3, [r7, #36] ; 0x24 - while (pcb != NULL) { - 8007356: 6a7b ldr r3, [r7, #36] ; 0x24 - 8007358: 2b00 cmp r3, #0 - 800735a: d193 bne.n 8007284 - } - } -} - 800735c: bf00 nop - 800735e: bf00 nop - 8007360: 3728 adds r7, #40 ; 0x28 - 8007362: 46bd mov sp, r7 - 8007364: bdb0 pop {r4, r5, r7, pc} - 8007366: bf00 nop - 8007368: 20006d74 .word 0x20006d74 - 800736c: 0801123c .word 0x0801123c - 8007370: 08011524 .word 0x08011524 - 8007374: 08011278 .word 0x08011278 - -08007378 : - * - * Automatically called from tcp_tmr(). - */ -void -tcp_fasttmr(void) -{ - 8007378: b580 push {r7, lr} - 800737a: b082 sub sp, #8 - 800737c: af00 add r7, sp, #0 - struct tcp_pcb *pcb; - - ++tcp_timer_ctr; - 800737e: 4b2d ldr r3, [pc, #180] ; (8007434 ) - 8007380: 781b ldrb r3, [r3, #0] - 8007382: 3301 adds r3, #1 - 8007384: b2da uxtb r2, r3 - 8007386: 4b2b ldr r3, [pc, #172] ; (8007434 ) - 8007388: 701a strb r2, [r3, #0] - -tcp_fasttmr_start: - pcb = tcp_active_pcbs; - 800738a: 4b2b ldr r3, [pc, #172] ; (8007438 ) - 800738c: 681b ldr r3, [r3, #0] - 800738e: 607b str r3, [r7, #4] - - while (pcb != NULL) { - 8007390: e048 b.n 8007424 - if (pcb->last_timer != tcp_timer_ctr) { - 8007392: 687b ldr r3, [r7, #4] - 8007394: 7f5a ldrb r2, [r3, #29] - 8007396: 4b27 ldr r3, [pc, #156] ; (8007434 ) - 8007398: 781b ldrb r3, [r3, #0] - 800739a: 429a cmp r2, r3 - 800739c: d03f beq.n 800741e - struct tcp_pcb *next; - pcb->last_timer = tcp_timer_ctr; - 800739e: 4b25 ldr r3, [pc, #148] ; (8007434 ) - 80073a0: 781a ldrb r2, [r3, #0] - 80073a2: 687b ldr r3, [r7, #4] - 80073a4: 775a strb r2, [r3, #29] - /* send delayed ACKs */ - if (pcb->flags & TF_ACK_DELAY) { - 80073a6: 687b ldr r3, [r7, #4] - 80073a8: 7e9b ldrb r3, [r3, #26] - 80073aa: f003 0301 and.w r3, r3, #1 - 80073ae: 2b00 cmp r3, #0 - 80073b0: d010 beq.n 80073d4 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); - tcp_ack_now(pcb); - 80073b2: 687b ldr r3, [r7, #4] - 80073b4: 7e9b ldrb r3, [r3, #26] - 80073b6: f043 0302 orr.w r3, r3, #2 - 80073ba: b2da uxtb r2, r3 - 80073bc: 687b ldr r3, [r7, #4] - 80073be: 769a strb r2, [r3, #26] - tcp_output(pcb); - 80073c0: 6878 ldr r0, [r7, #4] - 80073c2: f003 f859 bl 800a478 - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); - 80073c6: 687b ldr r3, [r7, #4] - 80073c8: 7e9b ldrb r3, [r3, #26] - 80073ca: f023 0303 bic.w r3, r3, #3 - 80073ce: b2da uxtb r2, r3 - 80073d0: 687b ldr r3, [r7, #4] - 80073d2: 769a strb r2, [r3, #26] - } - /* send pending FIN */ - if (pcb->flags & TF_CLOSEPEND) { - 80073d4: 687b ldr r3, [r7, #4] - 80073d6: 7e9b ldrb r3, [r3, #26] - 80073d8: f003 0308 and.w r3, r3, #8 - 80073dc: 2b00 cmp r3, #0 - 80073de: d009 beq.n 80073f4 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); - pcb->flags &= ~(TF_CLOSEPEND); - 80073e0: 687b ldr r3, [r7, #4] - 80073e2: 7e9b ldrb r3, [r3, #26] - 80073e4: f023 0308 bic.w r3, r3, #8 - 80073e8: b2da uxtb r2, r3 - 80073ea: 687b ldr r3, [r7, #4] - 80073ec: 769a strb r2, [r3, #26] - tcp_close_shutdown_fin(pcb); - 80073ee: 6878 ldr r0, [r7, #4] - 80073f0: f7ff fb18 bl 8006a24 - } - - next = pcb->next; - 80073f4: 687b ldr r3, [r7, #4] - 80073f6: 68db ldr r3, [r3, #12] - 80073f8: 603b str r3, [r7, #0] - - /* If there is data which was previously "refused" by upper layer */ - if (pcb->refused_data != NULL) { - 80073fa: 687b ldr r3, [r7, #4] - 80073fc: 6f5b ldr r3, [r3, #116] ; 0x74 - 80073fe: 2b00 cmp r3, #0 - 8007400: d00a beq.n 8007418 - tcp_active_pcbs_changed = 0; - 8007402: 4b0e ldr r3, [pc, #56] ; (800743c ) - 8007404: 2200 movs r2, #0 - 8007406: 701a strb r2, [r3, #0] - tcp_process_refused_data(pcb); - 8007408: 6878 ldr r0, [r7, #4] - 800740a: f000 f819 bl 8007440 - if (tcp_active_pcbs_changed) { - 800740e: 4b0b ldr r3, [pc, #44] ; (800743c ) - 8007410: 781b ldrb r3, [r3, #0] - 8007412: 2b00 cmp r3, #0 - 8007414: d000 beq.n 8007418 - /* application callback has changed the pcb list: restart the loop */ - goto tcp_fasttmr_start; - 8007416: e7b8 b.n 800738a - } - } - pcb = next; - 8007418: 683b ldr r3, [r7, #0] - 800741a: 607b str r3, [r7, #4] - 800741c: e002 b.n 8007424 - } else { - pcb = pcb->next; - 800741e: 687b ldr r3, [r7, #4] - 8007420: 68db ldr r3, [r3, #12] - 8007422: 607b str r3, [r7, #4] - while (pcb != NULL) { - 8007424: 687b ldr r3, [r7, #4] - 8007426: 2b00 cmp r3, #0 - 8007428: d1b3 bne.n 8007392 - } - } -} - 800742a: bf00 nop - 800742c: bf00 nop - 800742e: 3708 adds r7, #8 - 8007430: 46bd mov sp, r7 - 8007432: bd80 pop {r7, pc} - 8007434: 20006d7a .word 0x20006d7a - 8007438: 20006d70 .word 0x20006d70 - 800743c: 20006d78 .word 0x20006d78 - -08007440 : -} - -/** Pass pcb->refused_data to the recv callback */ -err_t -tcp_process_refused_data(struct tcp_pcb *pcb) -{ - 8007440: b590 push {r4, r7, lr} - 8007442: b085 sub sp, #20 - 8007444: af00 add r7, sp, #0 - 8007446: 6078 str r0, [r7, #4] - struct pbuf *rest; - while (pcb->refused_data != NULL) -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - { - err_t err; - u8_t refused_flags = pcb->refused_data->flags; - 8007448: 687b ldr r3, [r7, #4] - 800744a: 6f5b ldr r3, [r3, #116] ; 0x74 - 800744c: 7b5b ldrb r3, [r3, #13] - 800744e: 73bb strb r3, [r7, #14] - /* set pcb->refused_data to NULL in case the callback frees it and then - closes the pcb */ - struct pbuf *refused_data = pcb->refused_data; - 8007450: 687b ldr r3, [r7, #4] - 8007452: 6f5b ldr r3, [r3, #116] ; 0x74 - 8007454: 60bb str r3, [r7, #8] -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - pbuf_split_64k(refused_data, &rest); - pcb->refused_data = rest; -#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - pcb->refused_data = NULL; - 8007456: 687b ldr r3, [r7, #4] - 8007458: 2200 movs r2, #0 - 800745a: 675a str r2, [r3, #116] ; 0x74 -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - /* Notify again application with data previously received. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); - TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); - 800745c: 687b ldr r3, [r7, #4] - 800745e: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 - 8007462: 2b00 cmp r3, #0 - 8007464: d00b beq.n 800747e - 8007466: 687b ldr r3, [r7, #4] - 8007468: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 - 800746c: 687b ldr r3, [r7, #4] - 800746e: 6918 ldr r0, [r3, #16] - 8007470: 2300 movs r3, #0 - 8007472: 68ba ldr r2, [r7, #8] - 8007474: 6879 ldr r1, [r7, #4] - 8007476: 47a0 blx r4 - 8007478: 4603 mov r3, r0 - 800747a: 73fb strb r3, [r7, #15] - 800747c: e007 b.n 800748e - 800747e: 2300 movs r3, #0 - 8007480: 68ba ldr r2, [r7, #8] - 8007482: 6879 ldr r1, [r7, #4] - 8007484: 2000 movs r0, #0 - 8007486: f000 f88d bl 80075a4 - 800748a: 4603 mov r3, r0 - 800748c: 73fb strb r3, [r7, #15] - if (err == ERR_OK) { - 800748e: f997 300f ldrsb.w r3, [r7, #15] - 8007492: 2b00 cmp r3, #0 - 8007494: d12a bne.n 80074ec - /* did refused_data include a FIN? */ - if (refused_flags & PBUF_FLAG_TCP_FIN - 8007496: 7bbb ldrb r3, [r7, #14] - 8007498: f003 0320 and.w r3, r3, #32 - 800749c: 2b00 cmp r3, #0 - 800749e: d033 beq.n 8007508 - && (rest == NULL) -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - ) { - /* correct rcv_wnd as the application won't call tcp_recved() - for the FIN's seqno */ - if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { - 80074a0: 687b ldr r3, [r7, #4] - 80074a2: 8d1b ldrh r3, [r3, #40] ; 0x28 - 80074a4: f5b3 6f06 cmp.w r3, #2144 ; 0x860 - 80074a8: d005 beq.n 80074b6 - pcb->rcv_wnd++; - 80074aa: 687b ldr r3, [r7, #4] - 80074ac: 8d1b ldrh r3, [r3, #40] ; 0x28 - 80074ae: 3301 adds r3, #1 - 80074b0: b29a uxth r2, r3 - 80074b2: 687b ldr r3, [r7, #4] - 80074b4: 851a strh r2, [r3, #40] ; 0x28 - } - TCP_EVENT_CLOSED(pcb, err); - 80074b6: 687b ldr r3, [r7, #4] - 80074b8: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 - 80074bc: 2b00 cmp r3, #0 - 80074be: d00b beq.n 80074d8 - 80074c0: 687b ldr r3, [r7, #4] - 80074c2: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 - 80074c6: 687b ldr r3, [r7, #4] - 80074c8: 6918 ldr r0, [r3, #16] - 80074ca: 2300 movs r3, #0 - 80074cc: 2200 movs r2, #0 - 80074ce: 6879 ldr r1, [r7, #4] - 80074d0: 47a0 blx r4 - 80074d2: 4603 mov r3, r0 - 80074d4: 73fb strb r3, [r7, #15] - 80074d6: e001 b.n 80074dc - 80074d8: 2300 movs r3, #0 - 80074da: 73fb strb r3, [r7, #15] - if (err == ERR_ABRT) { - 80074dc: f997 300f ldrsb.w r3, [r7, #15] - 80074e0: f113 0f0d cmn.w r3, #13 - 80074e4: d110 bne.n 8007508 - return ERR_ABRT; - 80074e6: f06f 030c mvn.w r3, #12 - 80074ea: e00e b.n 800750a - } - } - } else if (err == ERR_ABRT) { - 80074ec: f997 300f ldrsb.w r3, [r7, #15] - 80074f0: f113 0f0d cmn.w r3, #13 - 80074f4: d102 bne.n 80074fc - /* if err == ERR_ABRT, 'pcb' is already deallocated */ - /* Drop incoming packets because pcb is "full" (only if the incoming - segment contains data). */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n")); - return ERR_ABRT; - 80074f6: f06f 030c mvn.w r3, #12 - 80074fa: e006 b.n 800750a -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - if (rest != NULL) { - pbuf_cat(refused_data, rest); - } -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - pcb->refused_data = refused_data; - 80074fc: 687b ldr r3, [r7, #4] - 80074fe: 68ba ldr r2, [r7, #8] - 8007500: 675a str r2, [r3, #116] ; 0x74 - return ERR_INPROGRESS; - 8007502: f06f 0304 mvn.w r3, #4 - 8007506: e000 b.n 800750a - } - } - return ERR_OK; - 8007508: 2300 movs r3, #0 -} - 800750a: 4618 mov r0, r3 - 800750c: 3714 adds r7, #20 - 800750e: 46bd mov sp, r7 - 8007510: bd90 pop {r4, r7, pc} - -08007512 : - * - * @param seg tcp_seg list of TCP segments to free - */ -void -tcp_segs_free(struct tcp_seg *seg) -{ - 8007512: b580 push {r7, lr} - 8007514: b084 sub sp, #16 - 8007516: af00 add r7, sp, #0 - 8007518: 6078 str r0, [r7, #4] - while (seg != NULL) { - 800751a: e007 b.n 800752c - struct tcp_seg *next = seg->next; - 800751c: 687b ldr r3, [r7, #4] - 800751e: 681b ldr r3, [r3, #0] - 8007520: 60fb str r3, [r7, #12] - tcp_seg_free(seg); - 8007522: 6878 ldr r0, [r7, #4] - 8007524: f000 f80a bl 800753c - seg = next; - 8007528: 68fb ldr r3, [r7, #12] - 800752a: 607b str r3, [r7, #4] - while (seg != NULL) { - 800752c: 687b ldr r3, [r7, #4] - 800752e: 2b00 cmp r3, #0 - 8007530: d1f4 bne.n 800751c - } -} - 8007532: bf00 nop - 8007534: bf00 nop - 8007536: 3710 adds r7, #16 - 8007538: 46bd mov sp, r7 - 800753a: bd80 pop {r7, pc} - -0800753c : - * - * @param seg single tcp_seg to free - */ -void -tcp_seg_free(struct tcp_seg *seg) -{ - 800753c: b580 push {r7, lr} - 800753e: b082 sub sp, #8 - 8007540: af00 add r7, sp, #0 - 8007542: 6078 str r0, [r7, #4] - if (seg != NULL) { - 8007544: 687b ldr r3, [r7, #4] - 8007546: 2b00 cmp r3, #0 - 8007548: d00c beq.n 8007564 - if (seg->p != NULL) { - 800754a: 687b ldr r3, [r7, #4] - 800754c: 685b ldr r3, [r3, #4] - 800754e: 2b00 cmp r3, #0 - 8007550: d004 beq.n 800755c - pbuf_free(seg->p); - 8007552: 687b ldr r3, [r7, #4] - 8007554: 685b ldr r3, [r3, #4] - 8007556: 4618 mov r0, r3 - 8007558: f7fe fe92 bl 8006280 -#if TCP_DEBUG - seg->p = NULL; -#endif /* TCP_DEBUG */ - } - memp_free(MEMP_TCP_SEG, seg); - 800755c: 6879 ldr r1, [r7, #4] - 800755e: 2003 movs r0, #3 - 8007560: f7fe f96e bl 8005840 - } -} - 8007564: bf00 nop - 8007566: 3708 adds r7, #8 - 8007568: 46bd mov sp, r7 - 800756a: bd80 pop {r7, pc} - -0800756c : - * @param seg the old tcp_seg - * @return a copy of seg - */ -struct tcp_seg * -tcp_seg_copy(struct tcp_seg *seg) -{ - 800756c: b580 push {r7, lr} - 800756e: b084 sub sp, #16 - 8007570: af00 add r7, sp, #0 - 8007572: 6078 str r0, [r7, #4] - struct tcp_seg *cseg; - - cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); - 8007574: 2003 movs r0, #3 - 8007576: f7fe f917 bl 80057a8 - 800757a: 60f8 str r0, [r7, #12] - if (cseg == NULL) { - 800757c: 68fb ldr r3, [r7, #12] - 800757e: 2b00 cmp r3, #0 - 8007580: d101 bne.n 8007586 - return NULL; - 8007582: 2300 movs r3, #0 - 8007584: e00a b.n 800759c - } - SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); - 8007586: 2210 movs r2, #16 - 8007588: 6879 ldr r1, [r7, #4] - 800758a: 68f8 ldr r0, [r7, #12] - 800758c: f008 fc08 bl 800fda0 - pbuf_ref(cseg->p); - 8007590: 68fb ldr r3, [r7, #12] - 8007592: 685b ldr r3, [r3, #4] - 8007594: 4618 mov r0, r3 - 8007596: f7fe ff1d bl 80063d4 - return cseg; - 800759a: 68fb ldr r3, [r7, #12] -} - 800759c: 4618 mov r0, r3 - 800759e: 3710 adds r7, #16 - 80075a0: 46bd mov sp, r7 - 80075a2: bd80 pop {r7, pc} - -080075a4 : - * Default receive callback that is called if the user didn't register - * a recv callback for the pcb. - */ -err_t -tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) -{ - 80075a4: b580 push {r7, lr} - 80075a6: b084 sub sp, #16 - 80075a8: af00 add r7, sp, #0 - 80075aa: 60f8 str r0, [r7, #12] - 80075ac: 60b9 str r1, [r7, #8] - 80075ae: 607a str r2, [r7, #4] - 80075b0: 70fb strb r3, [r7, #3] - LWIP_UNUSED_ARG(arg); - if (p != NULL) { - 80075b2: 687b ldr r3, [r7, #4] - 80075b4: 2b00 cmp r3, #0 - 80075b6: d009 beq.n 80075cc - tcp_recved(pcb, p->tot_len); - 80075b8: 687b ldr r3, [r7, #4] - 80075ba: 891b ldrh r3, [r3, #8] - 80075bc: 4619 mov r1, r3 - 80075be: 68b8 ldr r0, [r7, #8] - 80075c0: f7ff fbbe bl 8006d40 - pbuf_free(p); - 80075c4: 6878 ldr r0, [r7, #4] - 80075c6: f7fe fe5b bl 8006280 - 80075ca: e008 b.n 80075de - } else if (err == ERR_OK) { - 80075cc: f997 3003 ldrsb.w r3, [r7, #3] - 80075d0: 2b00 cmp r3, #0 - 80075d2: d104 bne.n 80075de - return tcp_close(pcb); - 80075d4: 68b8 ldr r0, [r7, #8] - 80075d6: f7ff fa8f bl 8006af8 - 80075da: 4603 mov r3, r0 - 80075dc: e000 b.n 80075e0 - } - return ERR_OK; - 80075de: 2300 movs r3, #0 -} - 80075e0: 4618 mov r0, r3 - 80075e2: 3710 adds r7, #16 - 80075e4: 46bd mov sp, r7 - 80075e6: bd80 pop {r7, pc} - -080075e8 : - * - * @param prio minimum priority - */ -static void -tcp_kill_prio(u8_t prio) -{ - 80075e8: b580 push {r7, lr} - 80075ea: b086 sub sp, #24 - 80075ec: af00 add r7, sp, #0 - 80075ee: 4603 mov r3, r0 - 80075f0: 71fb strb r3, [r7, #7] - struct tcp_pcb *pcb, *inactive; - u32_t inactivity; - u8_t mprio; - - mprio = LWIP_MIN(TCP_PRIO_MAX, prio); - 80075f2: f997 3007 ldrsb.w r3, [r7, #7] - 80075f6: 2b00 cmp r3, #0 - 80075f8: db01 blt.n 80075fe - 80075fa: 79fb ldrb r3, [r7, #7] - 80075fc: e000 b.n 8007600 - 80075fe: 237f movs r3, #127 ; 0x7f - 8007600: 72fb strb r3, [r7, #11] - - /* We kill the oldest active connection that has lower priority than prio. */ - inactivity = 0; - 8007602: 2300 movs r3, #0 - 8007604: 60fb str r3, [r7, #12] - inactive = NULL; - 8007606: 2300 movs r3, #0 - 8007608: 613b str r3, [r7, #16] - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - 800760a: 4b16 ldr r3, [pc, #88] ; (8007664 ) - 800760c: 681b ldr r3, [r3, #0] - 800760e: 617b str r3, [r7, #20] - 8007610: e01a b.n 8007648 - if (pcb->prio <= mprio && - 8007612: 697b ldr r3, [r7, #20] - 8007614: 7d5b ldrb r3, [r3, #21] - 8007616: 7afa ldrb r2, [r7, #11] - 8007618: 429a cmp r2, r3 - 800761a: d312 bcc.n 8007642 - (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { - 800761c: 4b12 ldr r3, [pc, #72] ; (8007668 ) - 800761e: 681a ldr r2, [r3, #0] - 8007620: 697b ldr r3, [r7, #20] - 8007622: 6a1b ldr r3, [r3, #32] - 8007624: 1ad3 subs r3, r2, r3 - if (pcb->prio <= mprio && - 8007626: 68fa ldr r2, [r7, #12] - 8007628: 429a cmp r2, r3 - 800762a: d80a bhi.n 8007642 - inactivity = tcp_ticks - pcb->tmr; - 800762c: 4b0e ldr r3, [pc, #56] ; (8007668 ) - 800762e: 681a ldr r2, [r3, #0] - 8007630: 697b ldr r3, [r7, #20] - 8007632: 6a1b ldr r3, [r3, #32] - 8007634: 1ad3 subs r3, r2, r3 - 8007636: 60fb str r3, [r7, #12] - inactive = pcb; - 8007638: 697b ldr r3, [r7, #20] - 800763a: 613b str r3, [r7, #16] - mprio = pcb->prio; - 800763c: 697b ldr r3, [r7, #20] - 800763e: 7d5b ldrb r3, [r3, #21] - 8007640: 72fb strb r3, [r7, #11] - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - 8007642: 697b ldr r3, [r7, #20] - 8007644: 68db ldr r3, [r3, #12] - 8007646: 617b str r3, [r7, #20] - 8007648: 697b ldr r3, [r7, #20] - 800764a: 2b00 cmp r3, #0 - 800764c: d1e1 bne.n 8007612 - } - } - if (inactive != NULL) { - 800764e: 693b ldr r3, [r7, #16] - 8007650: 2b00 cmp r3, #0 - 8007652: d002 beq.n 800765a - LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", - (void *)inactive, inactivity)); - tcp_abort(inactive); - 8007654: 6938 ldr r0, [r7, #16] - 8007656: f7ff fb19 bl 8006c8c - } -} - 800765a: bf00 nop - 800765c: 3718 adds r7, #24 - 800765e: 46bd mov sp, r7 - 8007660: bd80 pop {r7, pc} - 8007662: bf00 nop - 8007664: 20006d70 .word 0x20006d70 - 8007668: 20006d64 .word 0x20006d64 - -0800766c : - * Kills the oldest connection that is in specific state. - * Called from tcp_alloc() for LAST_ACK and CLOSING if no more connections are available. - */ -static void -tcp_kill_state(enum tcp_state state) -{ - 800766c: b580 push {r7, lr} - 800766e: b086 sub sp, #24 - 8007670: af00 add r7, sp, #0 - 8007672: 4603 mov r3, r0 - 8007674: 71fb strb r3, [r7, #7] - struct tcp_pcb *pcb, *inactive; - u32_t inactivity; - - LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); - 8007676: 79fb ldrb r3, [r7, #7] - 8007678: 2b08 cmp r3, #8 - 800767a: d009 beq.n 8007690 - 800767c: 79fb ldrb r3, [r7, #7] - 800767e: 2b09 cmp r3, #9 - 8007680: d006 beq.n 8007690 - 8007682: 4b1a ldr r3, [pc, #104] ; (80076ec ) - 8007684: f240 52dc movw r2, #1500 ; 0x5dc - 8007688: 4919 ldr r1, [pc, #100] ; (80076f0 ) - 800768a: 481a ldr r0, [pc, #104] ; (80076f4 ) - 800768c: f008 fa1a bl 800fac4 - - inactivity = 0; - 8007690: 2300 movs r3, #0 - 8007692: 60fb str r3, [r7, #12] - inactive = NULL; - 8007694: 2300 movs r3, #0 - 8007696: 613b str r3, [r7, #16] - /* Go through the list of active pcbs and get the oldest pcb that is in state - CLOSING/LAST_ACK. */ - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - 8007698: 4b17 ldr r3, [pc, #92] ; (80076f8 ) - 800769a: 681b ldr r3, [r3, #0] - 800769c: 617b str r3, [r7, #20] - 800769e: e017 b.n 80076d0 - if (pcb->state == state) { - 80076a0: 697b ldr r3, [r7, #20] - 80076a2: 7d1b ldrb r3, [r3, #20] - 80076a4: 79fa ldrb r2, [r7, #7] - 80076a6: 429a cmp r2, r3 - 80076a8: d10f bne.n 80076ca - if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { - 80076aa: 4b14 ldr r3, [pc, #80] ; (80076fc ) - 80076ac: 681a ldr r2, [r3, #0] - 80076ae: 697b ldr r3, [r7, #20] - 80076b0: 6a1b ldr r3, [r3, #32] - 80076b2: 1ad3 subs r3, r2, r3 - 80076b4: 68fa ldr r2, [r7, #12] - 80076b6: 429a cmp r2, r3 - 80076b8: d807 bhi.n 80076ca - inactivity = tcp_ticks - pcb->tmr; - 80076ba: 4b10 ldr r3, [pc, #64] ; (80076fc ) - 80076bc: 681a ldr r2, [r3, #0] - 80076be: 697b ldr r3, [r7, #20] - 80076c0: 6a1b ldr r3, [r3, #32] - 80076c2: 1ad3 subs r3, r2, r3 - 80076c4: 60fb str r3, [r7, #12] - inactive = pcb; - 80076c6: 697b ldr r3, [r7, #20] - 80076c8: 613b str r3, [r7, #16] - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - 80076ca: 697b ldr r3, [r7, #20] - 80076cc: 68db ldr r3, [r3, #12] - 80076ce: 617b str r3, [r7, #20] - 80076d0: 697b ldr r3, [r7, #20] - 80076d2: 2b00 cmp r3, #0 - 80076d4: d1e4 bne.n 80076a0 - } - } - } - if (inactive != NULL) { - 80076d6: 693b ldr r3, [r7, #16] - 80076d8: 2b00 cmp r3, #0 - 80076da: d003 beq.n 80076e4 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n", - tcp_state_str[state], (void *)inactive, inactivity)); - /* Don't send a RST, since no data is lost. */ - tcp_abandon(inactive, 0); - 80076dc: 2100 movs r1, #0 - 80076de: 6938 ldr r0, [r7, #16] - 80076e0: f7ff fa22 bl 8006b28 - } -} - 80076e4: bf00 nop - 80076e6: 3718 adds r7, #24 - 80076e8: 46bd mov sp, r7 - 80076ea: bd80 pop {r7, pc} - 80076ec: 0801123c .word 0x0801123c - 80076f0: 0801154c .word 0x0801154c - 80076f4: 08011278 .word 0x08011278 - 80076f8: 20006d70 .word 0x20006d70 - 80076fc: 20006d64 .word 0x20006d64 - -08007700 : - * Kills the oldest connection that is in TIME_WAIT state. - * Called from tcp_alloc() if no more connections are available. - */ -static void -tcp_kill_timewait(void) -{ - 8007700: b580 push {r7, lr} - 8007702: b084 sub sp, #16 - 8007704: af00 add r7, sp, #0 - struct tcp_pcb *pcb, *inactive; - u32_t inactivity; - - inactivity = 0; - 8007706: 2300 movs r3, #0 - 8007708: 607b str r3, [r7, #4] - inactive = NULL; - 800770a: 2300 movs r3, #0 - 800770c: 60bb str r3, [r7, #8] - /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - 800770e: 4b12 ldr r3, [pc, #72] ; (8007758 ) - 8007710: 681b ldr r3, [r3, #0] - 8007712: 60fb str r3, [r7, #12] - 8007714: e012 b.n 800773c - if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { - 8007716: 4b11 ldr r3, [pc, #68] ; (800775c ) - 8007718: 681a ldr r2, [r3, #0] - 800771a: 68fb ldr r3, [r7, #12] - 800771c: 6a1b ldr r3, [r3, #32] - 800771e: 1ad3 subs r3, r2, r3 - 8007720: 687a ldr r2, [r7, #4] - 8007722: 429a cmp r2, r3 - 8007724: d807 bhi.n 8007736 - inactivity = tcp_ticks - pcb->tmr; - 8007726: 4b0d ldr r3, [pc, #52] ; (800775c ) - 8007728: 681a ldr r2, [r3, #0] - 800772a: 68fb ldr r3, [r7, #12] - 800772c: 6a1b ldr r3, [r3, #32] - 800772e: 1ad3 subs r3, r2, r3 - 8007730: 607b str r3, [r7, #4] - inactive = pcb; - 8007732: 68fb ldr r3, [r7, #12] - 8007734: 60bb str r3, [r7, #8] - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - 8007736: 68fb ldr r3, [r7, #12] - 8007738: 68db ldr r3, [r3, #12] - 800773a: 60fb str r3, [r7, #12] - 800773c: 68fb ldr r3, [r7, #12] - 800773e: 2b00 cmp r3, #0 - 8007740: d1e9 bne.n 8007716 - } - } - if (inactive != NULL) { - 8007742: 68bb ldr r3, [r7, #8] - 8007744: 2b00 cmp r3, #0 - 8007746: d002 beq.n 800774e - LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", - (void *)inactive, inactivity)); - tcp_abort(inactive); - 8007748: 68b8 ldr r0, [r7, #8] - 800774a: f7ff fa9f bl 8006c8c - } -} - 800774e: bf00 nop - 8007750: 3710 adds r7, #16 - 8007752: 46bd mov sp, r7 - 8007754: bd80 pop {r7, pc} - 8007756: bf00 nop - 8007758: 20006d74 .word 0x20006d74 - 800775c: 20006d64 .word 0x20006d64 - -08007760 : - * @param prio priority for the new pcb - * @return a new tcp_pcb that initially is in state CLOSED - */ -struct tcp_pcb * -tcp_alloc(u8_t prio) -{ - 8007760: b580 push {r7, lr} - 8007762: b084 sub sp, #16 - 8007764: af00 add r7, sp, #0 - 8007766: 4603 mov r3, r0 - 8007768: 71fb strb r3, [r7, #7] - struct tcp_pcb *pcb; - - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - 800776a: 2001 movs r0, #1 - 800776c: f7fe f81c bl 80057a8 - 8007770: 60f8 str r0, [r7, #12] - if (pcb == NULL) { - 8007772: 68fb ldr r3, [r7, #12] - 8007774: 2b00 cmp r3, #0 - 8007776: d124 bne.n 80077c2 - /* Try killing oldest connection in TIME-WAIT. */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); - tcp_kill_timewait(); - 8007778: f7ff ffc2 bl 8007700 - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - 800777c: 2001 movs r0, #1 - 800777e: f7fe f813 bl 80057a8 - 8007782: 60f8 str r0, [r7, #12] - if (pcb == NULL) { - 8007784: 68fb ldr r3, [r7, #12] - 8007786: 2b00 cmp r3, #0 - 8007788: d11b bne.n 80077c2 - /* Try killing oldest connection in LAST-ACK (these wouldn't go to TIME-WAIT). */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest LAST-ACK connection\n")); - tcp_kill_state(LAST_ACK); - 800778a: 2009 movs r0, #9 - 800778c: f7ff ff6e bl 800766c - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - 8007790: 2001 movs r0, #1 - 8007792: f7fe f809 bl 80057a8 - 8007796: 60f8 str r0, [r7, #12] - if (pcb == NULL) { - 8007798: 68fb ldr r3, [r7, #12] - 800779a: 2b00 cmp r3, #0 - 800779c: d111 bne.n 80077c2 - /* Try killing oldest connection in CLOSING. */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); - tcp_kill_state(CLOSING); - 800779e: 2008 movs r0, #8 - 80077a0: f7ff ff64 bl 800766c - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - 80077a4: 2001 movs r0, #1 - 80077a6: f7fd ffff bl 80057a8 - 80077aa: 60f8 str r0, [r7, #12] - if (pcb == NULL) { - 80077ac: 68fb ldr r3, [r7, #12] - 80077ae: 2b00 cmp r3, #0 - 80077b0: d107 bne.n 80077c2 - /* Try killing active connections with lower priority than the new one. */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio)); - tcp_kill_prio(prio); - 80077b2: 79fb ldrb r3, [r7, #7] - 80077b4: 4618 mov r0, r3 - 80077b6: f7ff ff17 bl 80075e8 - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - 80077ba: 2001 movs r0, #1 - 80077bc: f7fd fff4 bl 80057a8 - 80077c0: 60f8 str r0, [r7, #12] - if (pcb != NULL) { - /* adjust err stats: memp_malloc failed above */ - MEMP_STATS_DEC(err, MEMP_TCP_PCB); - } - } - if (pcb != NULL) { - 80077c2: 68fb ldr r3, [r7, #12] - 80077c4: 2b00 cmp r3, #0 - 80077c6: d03f beq.n 8007848 - /* zero out the whole pcb, so there is no need to initialize members to zero */ - memset(pcb, 0, sizeof(struct tcp_pcb)); - 80077c8: 2298 movs r2, #152 ; 0x98 - 80077ca: 2100 movs r1, #0 - 80077cc: 68f8 ldr r0, [r7, #12] - 80077ce: f008 fa73 bl 800fcb8 - pcb->prio = prio; - 80077d2: 68fb ldr r3, [r7, #12] - 80077d4: 79fa ldrb r2, [r7, #7] - 80077d6: 755a strb r2, [r3, #21] - pcb->snd_buf = TCP_SND_BUF; - 80077d8: 68fb ldr r3, [r7, #12] - 80077da: f44f 6286 mov.w r2, #1072 ; 0x430 - 80077de: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 - /* Start with a window that does not need scaling. When window scaling is - enabled and used, the window is enlarged when both sides agree on scaling. */ - pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); - 80077e2: 68fb ldr r3, [r7, #12] - 80077e4: f44f 6206 mov.w r2, #2144 ; 0x860 - 80077e8: 855a strh r2, [r3, #42] ; 0x2a - 80077ea: 68fb ldr r3, [r7, #12] - 80077ec: 8d5a ldrh r2, [r3, #42] ; 0x2a - 80077ee: 68fb ldr r3, [r7, #12] - 80077f0: 851a strh r2, [r3, #40] ; 0x28 - pcb->ttl = TCP_TTL; - 80077f2: 68fb ldr r3, [r7, #12] - 80077f4: 22ff movs r2, #255 ; 0xff - 80077f6: 729a strb r2, [r3, #10] - /* As initial send MSS, we use TCP_MSS but limit it to 536. - The send MSS is updated when an MSS option is received. */ - pcb->mss = INITIAL_MSS; - 80077f8: 68fb ldr r3, [r7, #12] - 80077fa: f44f 7206 mov.w r2, #536 ; 0x218 - 80077fe: 865a strh r2, [r3, #50] ; 0x32 - pcb->rto = 3000 / TCP_SLOW_INTERVAL; - 8007800: 68fb ldr r3, [r7, #12] - 8007802: 2206 movs r2, #6 - 8007804: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 - pcb->sv = 3000 / TCP_SLOW_INTERVAL; - 8007808: 68fb ldr r3, [r7, #12] - 800780a: 2206 movs r2, #6 - 800780c: 87da strh r2, [r3, #62] ; 0x3e - pcb->rtime = -1; - 800780e: 68fb ldr r3, [r7, #12] - 8007810: f64f 72ff movw r2, #65535 ; 0xffff - 8007814: 861a strh r2, [r3, #48] ; 0x30 - pcb->cwnd = 1; - 8007816: 68fb ldr r3, [r7, #12] - 8007818: 2201 movs r2, #1 - 800781a: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - pcb->tmr = tcp_ticks; - 800781e: 4b0d ldr r3, [pc, #52] ; (8007854 ) - 8007820: 681a ldr r2, [r3, #0] - 8007822: 68fb ldr r3, [r7, #12] - 8007824: 621a str r2, [r3, #32] - pcb->last_timer = tcp_timer_ctr; - 8007826: 4b0c ldr r3, [pc, #48] ; (8007858 ) - 8007828: 781a ldrb r2, [r3, #0] - 800782a: 68fb ldr r3, [r7, #12] - 800782c: 775a strb r2, [r3, #29] - of using the largest advertised receive window. We've seen complications with - receiving TCPs that use window scaling and/or window auto-tuning where the - initial advertised window is very small and then grows rapidly once the - connection is established. To avoid these complications, we set ssthresh to the - largest effective cwnd (amount of in-flight data) that the sender can have. */ - pcb->ssthresh = TCP_SND_BUF; - 800782e: 68fb ldr r3, [r7, #12] - 8007830: f44f 6286 mov.w r2, #1072 ; 0x430 - 8007834: f8a3 204a strh.w r2, [r3, #74] ; 0x4a - -#if LWIP_CALLBACK_API - pcb->recv = tcp_recv_null; - 8007838: 68fb ldr r3, [r7, #12] - 800783a: 4a08 ldr r2, [pc, #32] ; (800785c ) - 800783c: f8c3 2080 str.w r2, [r3, #128] ; 0x80 -#endif /* LWIP_CALLBACK_API */ - - /* Init KEEPALIVE timer */ - pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; - 8007840: 68fb ldr r3, [r7, #12] - 8007842: 4a07 ldr r2, [pc, #28] ; (8007860 ) - 8007844: f8c3 2090 str.w r2, [r3, #144] ; 0x90 -#if LWIP_TCP_KEEPALIVE - pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT; - pcb->keep_cnt = TCP_KEEPCNT_DEFAULT; -#endif /* LWIP_TCP_KEEPALIVE */ - } - return pcb; - 8007848: 68fb ldr r3, [r7, #12] -} - 800784a: 4618 mov r0, r3 - 800784c: 3710 adds r7, #16 - 800784e: 46bd mov sp, r7 - 8007850: bd80 pop {r7, pc} - 8007852: bf00 nop - 8007854: 20006d64 .word 0x20006d64 - 8007858: 20006d7a .word 0x20006d7a - 800785c: 080075a5 .word 0x080075a5 - 8007860: 006ddd00 .word 0x006ddd00 - -08007864 : - * - * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! - */ -void -tcp_pcb_purge(struct tcp_pcb *pcb) -{ - 8007864: b580 push {r7, lr} - 8007866: b082 sub sp, #8 - 8007868: af00 add r7, sp, #0 - 800786a: 6078 str r0, [r7, #4] - if (pcb->state != CLOSED && - 800786c: 687b ldr r3, [r7, #4] - 800786e: 7d1b ldrb r3, [r3, #20] - 8007870: 2b00 cmp r3, #0 - 8007872: d034 beq.n 80078de - pcb->state != TIME_WAIT && - 8007874: 687b ldr r3, [r7, #4] - 8007876: 7d1b ldrb r3, [r3, #20] - if (pcb->state != CLOSED && - 8007878: 2b0a cmp r3, #10 - 800787a: d030 beq.n 80078de - pcb->state != LISTEN) { - 800787c: 687b ldr r3, [r7, #4] - 800787e: 7d1b ldrb r3, [r3, #20] - pcb->state != TIME_WAIT && - 8007880: 2b01 cmp r3, #1 - 8007882: d02c beq.n 80078de - - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); - - tcp_backlog_accepted(pcb); - - if (pcb->refused_data != NULL) { - 8007884: 687b ldr r3, [r7, #4] - 8007886: 6f5b ldr r3, [r3, #116] ; 0x74 - 8007888: 2b00 cmp r3, #0 - 800788a: d007 beq.n 800789c - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); - pbuf_free(pcb->refused_data); - 800788c: 687b ldr r3, [r7, #4] - 800788e: 6f5b ldr r3, [r3, #116] ; 0x74 - 8007890: 4618 mov r0, r3 - 8007892: f7fe fcf5 bl 8006280 - pcb->refused_data = NULL; - 8007896: 687b ldr r3, [r7, #4] - 8007898: 2200 movs r2, #0 - 800789a: 675a str r2, [r3, #116] ; 0x74 - } -#if TCP_QUEUE_OOSEQ - if (pcb->ooseq != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); - } - tcp_segs_free(pcb->ooseq); - 800789c: 687b ldr r3, [r7, #4] - 800789e: 6f1b ldr r3, [r3, #112] ; 0x70 - 80078a0: 4618 mov r0, r3 - 80078a2: f7ff fe36 bl 8007512 - pcb->ooseq = NULL; - 80078a6: 687b ldr r3, [r7, #4] - 80078a8: 2200 movs r2, #0 - 80078aa: 671a str r2, [r3, #112] ; 0x70 -#endif /* TCP_QUEUE_OOSEQ */ - - /* Stop the retransmission timer as it will expect data on unacked - queue if it fires */ - pcb->rtime = -1; - 80078ac: 687b ldr r3, [r7, #4] - 80078ae: f64f 72ff movw r2, #65535 ; 0xffff - 80078b2: 861a strh r2, [r3, #48] ; 0x30 - - tcp_segs_free(pcb->unsent); - 80078b4: 687b ldr r3, [r7, #4] - 80078b6: 6e9b ldr r3, [r3, #104] ; 0x68 - 80078b8: 4618 mov r0, r3 - 80078ba: f7ff fe2a bl 8007512 - tcp_segs_free(pcb->unacked); - 80078be: 687b ldr r3, [r7, #4] - 80078c0: 6edb ldr r3, [r3, #108] ; 0x6c - 80078c2: 4618 mov r0, r3 - 80078c4: f7ff fe25 bl 8007512 - pcb->unacked = pcb->unsent = NULL; - 80078c8: 687b ldr r3, [r7, #4] - 80078ca: 2200 movs r2, #0 - 80078cc: 669a str r2, [r3, #104] ; 0x68 - 80078ce: 687b ldr r3, [r7, #4] - 80078d0: 6e9a ldr r2, [r3, #104] ; 0x68 - 80078d2: 687b ldr r3, [r7, #4] - 80078d4: 66da str r2, [r3, #108] ; 0x6c -#if TCP_OVERSIZE - pcb->unsent_oversize = 0; - 80078d6: 687b ldr r3, [r7, #4] - 80078d8: 2200 movs r2, #0 - 80078da: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 -#endif /* TCP_OVERSIZE */ - } -} - 80078de: bf00 nop - 80078e0: 3708 adds r7, #8 - 80078e2: 46bd mov sp, r7 - 80078e4: bd80 pop {r7, pc} - ... - -080078e8 : - * @param pcblist PCB list to purge. - * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! - */ -void -tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) -{ - 80078e8: b580 push {r7, lr} - 80078ea: b084 sub sp, #16 - 80078ec: af00 add r7, sp, #0 - 80078ee: 6078 str r0, [r7, #4] - 80078f0: 6039 str r1, [r7, #0] - TCP_RMV(pcblist, pcb); - 80078f2: 687b ldr r3, [r7, #4] - 80078f4: 681b ldr r3, [r3, #0] - 80078f6: 683a ldr r2, [r7, #0] - 80078f8: 429a cmp r2, r3 - 80078fa: d105 bne.n 8007908 - 80078fc: 687b ldr r3, [r7, #4] - 80078fe: 681b ldr r3, [r3, #0] - 8007900: 68da ldr r2, [r3, #12] - 8007902: 687b ldr r3, [r7, #4] - 8007904: 601a str r2, [r3, #0] - 8007906: e013 b.n 8007930 - 8007908: 687b ldr r3, [r7, #4] - 800790a: 681b ldr r3, [r3, #0] - 800790c: 60fb str r3, [r7, #12] - 800790e: e00c b.n 800792a - 8007910: 68fb ldr r3, [r7, #12] - 8007912: 68db ldr r3, [r3, #12] - 8007914: 683a ldr r2, [r7, #0] - 8007916: 429a cmp r2, r3 - 8007918: d104 bne.n 8007924 - 800791a: 683b ldr r3, [r7, #0] - 800791c: 68da ldr r2, [r3, #12] - 800791e: 68fb ldr r3, [r7, #12] - 8007920: 60da str r2, [r3, #12] - 8007922: e005 b.n 8007930 - 8007924: 68fb ldr r3, [r7, #12] - 8007926: 68db ldr r3, [r3, #12] - 8007928: 60fb str r3, [r7, #12] - 800792a: 68fb ldr r3, [r7, #12] - 800792c: 2b00 cmp r3, #0 - 800792e: d1ef bne.n 8007910 - 8007930: 683b ldr r3, [r7, #0] - 8007932: 2200 movs r2, #0 - 8007934: 60da str r2, [r3, #12] - - tcp_pcb_purge(pcb); - 8007936: 6838 ldr r0, [r7, #0] - 8007938: f7ff ff94 bl 8007864 - - /* if there is an outstanding delayed ACKs, send it */ - if (pcb->state != TIME_WAIT && - 800793c: 683b ldr r3, [r7, #0] - 800793e: 7d1b ldrb r3, [r3, #20] - 8007940: 2b0a cmp r3, #10 - 8007942: d013 beq.n 800796c - pcb->state != LISTEN && - 8007944: 683b ldr r3, [r7, #0] - 8007946: 7d1b ldrb r3, [r3, #20] - if (pcb->state != TIME_WAIT && - 8007948: 2b01 cmp r3, #1 - 800794a: d00f beq.n 800796c - pcb->flags & TF_ACK_DELAY) { - 800794c: 683b ldr r3, [r7, #0] - 800794e: 7e9b ldrb r3, [r3, #26] - 8007950: f003 0301 and.w r3, r3, #1 - pcb->state != LISTEN && - 8007954: 2b00 cmp r3, #0 - 8007956: d009 beq.n 800796c - pcb->flags |= TF_ACK_NOW; - 8007958: 683b ldr r3, [r7, #0] - 800795a: 7e9b ldrb r3, [r3, #26] - 800795c: f043 0302 orr.w r3, r3, #2 - 8007960: b2da uxtb r2, r3 - 8007962: 683b ldr r3, [r7, #0] - 8007964: 769a strb r2, [r3, #26] - tcp_output(pcb); - 8007966: 6838 ldr r0, [r7, #0] - 8007968: f002 fd86 bl 800a478 - } - - if (pcb->state != LISTEN) { - 800796c: 683b ldr r3, [r7, #0] - 800796e: 7d1b ldrb r3, [r3, #20] - 8007970: 2b01 cmp r3, #1 - 8007972: d020 beq.n 80079b6 - LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); - 8007974: 683b ldr r3, [r7, #0] - 8007976: 6e9b ldr r3, [r3, #104] ; 0x68 - 8007978: 2b00 cmp r3, #0 - 800797a: d006 beq.n 800798a - 800797c: 4b13 ldr r3, [pc, #76] ; (80079cc ) - 800797e: f240 7253 movw r2, #1875 ; 0x753 - 8007982: 4913 ldr r1, [pc, #76] ; (80079d0 ) - 8007984: 4813 ldr r0, [pc, #76] ; (80079d4 ) - 8007986: f008 f89d bl 800fac4 - LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); - 800798a: 683b ldr r3, [r7, #0] - 800798c: 6edb ldr r3, [r3, #108] ; 0x6c - 800798e: 2b00 cmp r3, #0 - 8007990: d006 beq.n 80079a0 - 8007992: 4b0e ldr r3, [pc, #56] ; (80079cc ) - 8007994: f240 7254 movw r2, #1876 ; 0x754 - 8007998: 490f ldr r1, [pc, #60] ; (80079d8 ) - 800799a: 480e ldr r0, [pc, #56] ; (80079d4 ) - 800799c: f008 f892 bl 800fac4 -#if TCP_QUEUE_OOSEQ - LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); - 80079a0: 683b ldr r3, [r7, #0] - 80079a2: 6f1b ldr r3, [r3, #112] ; 0x70 - 80079a4: 2b00 cmp r3, #0 - 80079a6: d006 beq.n 80079b6 - 80079a8: 4b08 ldr r3, [pc, #32] ; (80079cc ) - 80079aa: f240 7256 movw r2, #1878 ; 0x756 - 80079ae: 490b ldr r1, [pc, #44] ; (80079dc ) - 80079b0: 4808 ldr r0, [pc, #32] ; (80079d4 ) - 80079b2: f008 f887 bl 800fac4 -#endif /* TCP_QUEUE_OOSEQ */ - } - - pcb->state = CLOSED; - 80079b6: 683b ldr r3, [r7, #0] - 80079b8: 2200 movs r2, #0 - 80079ba: 751a strb r2, [r3, #20] - /* reset the local port to prevent the pcb from being 'bound' */ - pcb->local_port = 0; - 80079bc: 683b ldr r3, [r7, #0] - 80079be: 2200 movs r2, #0 - 80079c0: 82da strh r2, [r3, #22] - - LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); -} - 80079c2: bf00 nop - 80079c4: 3710 adds r7, #16 - 80079c6: 46bd mov sp, r7 - 80079c8: bd80 pop {r7, pc} - 80079ca: bf00 nop - 80079cc: 0801123c .word 0x0801123c - 80079d0: 080115f4 .word 0x080115f4 - 80079d4: 08011278 .word 0x08011278 - 80079d8: 0801160c .word 0x0801160c - 80079dc: 08011628 .word 0x08011628 - -080079e0 : - * - * @return u32_t pseudo random sequence number - */ -u32_t -tcp_next_iss(struct tcp_pcb *pcb) -{ - 80079e0: b480 push {r7} - 80079e2: b083 sub sp, #12 - 80079e4: af00 add r7, sp, #0 - 80079e6: 6078 str r0, [r7, #4] -#else /* LWIP_HOOK_TCP_ISN */ - static u32_t iss = 6510; - - LWIP_UNUSED_ARG(pcb); - - iss += tcp_ticks; /* XXX */ - 80079e8: 4b06 ldr r3, [pc, #24] ; (8007a04 ) - 80079ea: 681a ldr r2, [r3, #0] - 80079ec: 4b06 ldr r3, [pc, #24] ; (8007a08 ) - 80079ee: 681b ldr r3, [r3, #0] - 80079f0: 4413 add r3, r2 - 80079f2: 4a04 ldr r2, [pc, #16] ; (8007a04 ) - 80079f4: 6013 str r3, [r2, #0] - return iss; - 80079f6: 4b03 ldr r3, [pc, #12] ; (8007a04 ) - 80079f8: 681b ldr r3, [r3, #0] -#endif /* LWIP_HOOK_TCP_ISN */ -} - 80079fa: 4618 mov r0, r3 - 80079fc: 370c adds r7, #12 - 80079fe: 46bd mov sp, r7 - 8007a00: bc80 pop {r7} - 8007a02: 4770 bx lr - 8007a04: 2000000c .word 0x2000000c - 8007a08: 20006d64 .word 0x20006d64 - -08007a0c : -tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest -#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING - , const ip_addr_t *src -#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ - ) -{ - 8007a0c: b580 push {r7, lr} - 8007a0e: b084 sub sp, #16 - 8007a10: af00 add r7, sp, #0 - 8007a12: 4603 mov r3, r0 - 8007a14: 6039 str r1, [r7, #0] - 8007a16: 80fb strh r3, [r7, #6] - u16_t mss_s; - struct netif *outif; - s16_t mtu; - - outif = ip_route(src, dest); - 8007a18: 6838 ldr r0, [r7, #0] - 8007a1a: f006 fde1 bl 800e5e0 - 8007a1e: 60f8 str r0, [r7, #12] - else -#endif /* LWIP_IPV4 */ -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - { - if (outif == NULL) { - 8007a20: 68fb ldr r3, [r7, #12] - 8007a22: 2b00 cmp r3, #0 - 8007a24: d101 bne.n 8007a2a - return sendmss; - 8007a26: 88fb ldrh r3, [r7, #6] - 8007a28: e010 b.n 8007a4c - } - mtu = outif->mtu; - 8007a2a: 68fb ldr r3, [r7, #12] - 8007a2c: 8d5b ldrh r3, [r3, #42] ; 0x2a - 8007a2e: 817b strh r3, [r7, #10] - } -#endif /* LWIP_IPV4 */ - - if (mtu != 0) { - 8007a30: f9b7 300a ldrsh.w r3, [r7, #10] - 8007a34: 2b00 cmp r3, #0 - 8007a36: d008 beq.n 8007a4a - else -#endif /* LWIP_IPV4 */ -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - { - mss_s = mtu - IP_HLEN - TCP_HLEN; - 8007a38: 897b ldrh r3, [r7, #10] - 8007a3a: 3b28 subs r3, #40 ; 0x28 - 8007a3c: 813b strh r3, [r7, #8] -#endif /* LWIP_IPV4 */ - /* 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); - 8007a3e: 893a ldrh r2, [r7, #8] - 8007a40: 88fb ldrh r3, [r7, #6] - 8007a42: 4293 cmp r3, r2 - 8007a44: bf28 it cs - 8007a46: 4613 movcs r3, r2 - 8007a48: 80fb strh r3, [r7, #6] - } - return sendmss; - 8007a4a: 88fb ldrh r3, [r7, #6] -} - 8007a4c: 4618 mov r0, r3 - 8007a4e: 3710 adds r7, #16 - 8007a50: 46bd mov sp, r7 - 8007a52: bd80 pop {r7, pc} - -08007a54 : -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - -/** Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list */ -static void -tcp_netif_ip_addr_changed_pcblist(const ip_addr_t* old_addr, struct tcp_pcb* pcb_list) -{ - 8007a54: b580 push {r7, lr} - 8007a56: b084 sub sp, #16 - 8007a58: af00 add r7, sp, #0 - 8007a5a: 6078 str r0, [r7, #4] - 8007a5c: 6039 str r1, [r7, #0] - struct tcp_pcb *pcb; - pcb = pcb_list; - 8007a5e: 683b ldr r3, [r7, #0] - 8007a60: 60fb str r3, [r7, #12] - while (pcb != NULL) { - 8007a62: e011 b.n 8007a88 - /* PCB bound to current local interface address? */ - if (ip_addr_cmp(&pcb->local_ip, old_addr) - 8007a64: 68fb ldr r3, [r7, #12] - 8007a66: 681a ldr r2, [r3, #0] - 8007a68: 687b ldr r3, [r7, #4] - 8007a6a: 681b ldr r3, [r3, #0] - 8007a6c: 429a cmp r2, r3 - 8007a6e: d108 bne.n 8007a82 - /* connections to link-local addresses must persist (RFC3927 ch. 1.9) */ - && (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip))) -#endif /* LWIP_AUTOIP */ - ) { - /* this connection must be aborted */ - struct tcp_pcb *next = pcb->next; - 8007a70: 68fb ldr r3, [r7, #12] - 8007a72: 68db ldr r3, [r3, #12] - 8007a74: 60bb str r3, [r7, #8] - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); - tcp_abort(pcb); - 8007a76: 68f8 ldr r0, [r7, #12] - 8007a78: f7ff f908 bl 8006c8c - pcb = next; - 8007a7c: 68bb ldr r3, [r7, #8] - 8007a7e: 60fb str r3, [r7, #12] - 8007a80: e002 b.n 8007a88 - } else { - pcb = pcb->next; - 8007a82: 68fb ldr r3, [r7, #12] - 8007a84: 68db ldr r3, [r3, #12] - 8007a86: 60fb str r3, [r7, #12] - while (pcb != NULL) { - 8007a88: 68fb ldr r3, [r7, #12] - 8007a8a: 2b00 cmp r3, #0 - 8007a8c: d1ea bne.n 8007a64 - } - } -} - 8007a8e: bf00 nop - 8007a90: bf00 nop - 8007a92: 3710 adds r7, #16 - 8007a94: 46bd mov sp, r7 - 8007a96: bd80 pop {r7, pc} - -08007a98 : - * @param old_addr IP address of the netif before change - * @param new_addr IP address of the netif after change or NULL if netif has been removed - */ -void -tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) -{ - 8007a98: b580 push {r7, lr} - 8007a9a: b084 sub sp, #16 - 8007a9c: af00 add r7, sp, #0 - 8007a9e: 6078 str r0, [r7, #4] - 8007aa0: 6039 str r1, [r7, #0] - struct tcp_pcb_listen *lpcb, *next; - - if (!ip_addr_isany(old_addr)) { - 8007aa2: 687b ldr r3, [r7, #4] - 8007aa4: 2b00 cmp r3, #0 - 8007aa6: d02c beq.n 8007b02 - 8007aa8: 687b ldr r3, [r7, #4] - 8007aaa: 681b ldr r3, [r3, #0] - 8007aac: 2b00 cmp r3, #0 - 8007aae: d028 beq.n 8007b02 - tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); - 8007ab0: 4b16 ldr r3, [pc, #88] ; (8007b0c ) - 8007ab2: 681b ldr r3, [r3, #0] - 8007ab4: 4619 mov r1, r3 - 8007ab6: 6878 ldr r0, [r7, #4] - 8007ab8: f7ff ffcc bl 8007a54 - tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); - 8007abc: 4b14 ldr r3, [pc, #80] ; (8007b10 ) - 8007abe: 681b ldr r3, [r3, #0] - 8007ac0: 4619 mov r1, r3 - 8007ac2: 6878 ldr r0, [r7, #4] - 8007ac4: f7ff ffc6 bl 8007a54 - - if (!ip_addr_isany(new_addr)) { - 8007ac8: 683b ldr r3, [r7, #0] - 8007aca: 2b00 cmp r3, #0 - 8007acc: d019 beq.n 8007b02 - 8007ace: 683b ldr r3, [r7, #0] - 8007ad0: 681b ldr r3, [r3, #0] - 8007ad2: 2b00 cmp r3, #0 - 8007ad4: d015 beq.n 8007b02 - /* PCB bound to current local interface address? */ - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { - 8007ad6: 4b0f ldr r3, [pc, #60] ; (8007b14 ) - 8007ad8: 681b ldr r3, [r3, #0] - 8007ada: 60fb str r3, [r7, #12] - 8007adc: e00e b.n 8007afc - next = lpcb->next; - 8007ade: 68fb ldr r3, [r7, #12] - 8007ae0: 68db ldr r3, [r3, #12] - 8007ae2: 60bb str r3, [r7, #8] - /* PCB bound to current local interface address? */ - if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { - 8007ae4: 68fb ldr r3, [r7, #12] - 8007ae6: 681a ldr r2, [r3, #0] - 8007ae8: 687b ldr r3, [r7, #4] - 8007aea: 681b ldr r3, [r3, #0] - 8007aec: 429a cmp r2, r3 - 8007aee: d103 bne.n 8007af8 - /* The PCB is listening to the old ipaddr and - * is set to listen to the new one instead */ - ip_addr_copy(lpcb->local_ip, *new_addr); - 8007af0: 683b ldr r3, [r7, #0] - 8007af2: 681a ldr r2, [r3, #0] - 8007af4: 68fb ldr r3, [r7, #12] - 8007af6: 601a str r2, [r3, #0] - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { - 8007af8: 68bb ldr r3, [r7, #8] - 8007afa: 60fb str r3, [r7, #12] - 8007afc: 68fb ldr r3, [r7, #12] - 8007afe: 2b00 cmp r3, #0 - 8007b00: d1ed bne.n 8007ade - } - } - } - } -} - 8007b02: bf00 nop - 8007b04: 3710 adds r7, #16 - 8007b06: 46bd mov sp, r7 - 8007b08: bd80 pop {r7, pc} - 8007b0a: bf00 nop - 8007b0c: 20006d70 .word 0x20006d70 - 8007b10: 20006d68 .word 0x20006d68 - 8007b14: 20006d6c .word 0x20006d6c - -08007b18 : - * @param p received TCP segment to process (p->payload pointing to the TCP header) - * @param inp network interface on which this segment was received - */ -void -tcp_input(struct pbuf *p, struct netif *inp) -{ - 8007b18: b590 push {r4, r7, lr} - 8007b1a: b08b sub sp, #44 ; 0x2c - 8007b1c: af02 add r7, sp, #8 - 8007b1e: 6078 str r0, [r7, #4] - 8007b20: 6039 str r1, [r7, #0] - PERF_START; - - TCP_STATS_INC(tcp.recv); - MIB2_STATS_INC(mib2.tcpinsegs); - - tcphdr = (struct tcp_hdr *)p->payload; - 8007b22: 687b ldr r3, [r7, #4] - 8007b24: 685b ldr r3, [r3, #4] - 8007b26: 4a82 ldr r2, [pc, #520] ; (8007d30 ) - 8007b28: 6013 str r3, [r2, #0] -#if TCP_INPUT_DEBUG - tcp_debug_print(tcphdr); -#endif - - /* Check that TCP header fits in payload */ - if (p->len < TCP_HLEN) { - 8007b2a: 687b ldr r3, [r7, #4] - 8007b2c: 895b ldrh r3, [r3, #10] - 8007b2e: 2b13 cmp r3, #19 - 8007b30: f240 8398 bls.w 8008264 - TCP_STATS_INC(tcp.lenerr); - goto dropped; - } - - /* Don't even process incoming broadcasts/multicasts. */ - if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || - 8007b34: 4b7f ldr r3, [pc, #508] ; (8007d34 ) - 8007b36: 695b ldr r3, [r3, #20] - 8007b38: 4a7e ldr r2, [pc, #504] ; (8007d34 ) - 8007b3a: 6812 ldr r2, [r2, #0] - 8007b3c: 4611 mov r1, r2 - 8007b3e: 4618 mov r0, r3 - 8007b40: f006 ffe8 bl 800eb14 - 8007b44: 4603 mov r3, r0 - 8007b46: 2b00 cmp r3, #0 - 8007b48: f040 838e bne.w 8008268 - ip_addr_ismulticast(ip_current_dest_addr())) { - 8007b4c: 4b79 ldr r3, [pc, #484] ; (8007d34 ) - 8007b4e: 695b ldr r3, [r3, #20] - 8007b50: f003 03f0 and.w r3, r3, #240 ; 0xf0 - if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || - 8007b54: 2be0 cmp r3, #224 ; 0xe0 - 8007b56: f000 8387 beq.w 8008268 - } - } -#endif /* CHECKSUM_CHECK_TCP */ - - /* sanity-check header length */ - hdrlen_bytes = TCPH_HDRLEN(tcphdr) * 4; - 8007b5a: 4b75 ldr r3, [pc, #468] ; (8007d30 ) - 8007b5c: 681b ldr r3, [r3, #0] - 8007b5e: 899b ldrh r3, [r3, #12] - 8007b60: b29b uxth r3, r3 - 8007b62: 4618 mov r0, r3 - 8007b64: f7fd fa77 bl 8005056 - 8007b68: 4603 mov r3, r0 - 8007b6a: 0b1b lsrs r3, r3, #12 - 8007b6c: b29b uxth r3, r3 - 8007b6e: b2db uxtb r3, r3 - 8007b70: 009b lsls r3, r3, #2 - 8007b72: 74bb strb r3, [r7, #18] - if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { - 8007b74: 7cbb ldrb r3, [r7, #18] - 8007b76: 2b13 cmp r3, #19 - 8007b78: f240 8378 bls.w 800826c - 8007b7c: 7cbb ldrb r3, [r7, #18] - 8007b7e: b29a uxth r2, r3 - 8007b80: 687b ldr r3, [r7, #4] - 8007b82: 891b ldrh r3, [r3, #8] - 8007b84: 429a cmp r2, r3 - 8007b86: f200 8371 bhi.w 800826c - goto dropped; - } - - /* Move the payload pointer in the pbuf so that it points to the - TCP data instead of the TCP header. */ - tcphdr_optlen = hdrlen_bytes - TCP_HLEN; - 8007b8a: 7cbb ldrb r3, [r7, #18] - 8007b8c: b29b uxth r3, r3 - 8007b8e: 3b14 subs r3, #20 - 8007b90: b29a uxth r2, r3 - 8007b92: 4b69 ldr r3, [pc, #420] ; (8007d38 ) - 8007b94: 801a strh r2, [r3, #0] - tcphdr_opt2 = NULL; - 8007b96: 4b69 ldr r3, [pc, #420] ; (8007d3c ) - 8007b98: 2200 movs r2, #0 - 8007b9a: 601a str r2, [r3, #0] - if (p->len >= hdrlen_bytes) { - 8007b9c: 687b ldr r3, [r7, #4] - 8007b9e: 895a ldrh r2, [r3, #10] - 8007ba0: 7cbb ldrb r3, [r7, #18] - 8007ba2: b29b uxth r3, r3 - 8007ba4: 429a cmp r2, r3 - 8007ba6: d30d bcc.n 8007bc4 - /* all options are in the first pbuf */ - tcphdr_opt1len = tcphdr_optlen; - 8007ba8: 4b63 ldr r3, [pc, #396] ; (8007d38 ) - 8007baa: 881a ldrh r2, [r3, #0] - 8007bac: 4b64 ldr r3, [pc, #400] ; (8007d40 ) - 8007bae: 801a strh r2, [r3, #0] - pbuf_header(p, -(s16_t)hdrlen_bytes); /* cannot fail */ - 8007bb0: 7cbb ldrb r3, [r7, #18] - 8007bb2: b29b uxth r3, r3 - 8007bb4: 425b negs r3, r3 - 8007bb6: b29b uxth r3, r3 - 8007bb8: b21b sxth r3, r3 - 8007bba: 4619 mov r1, r3 - 8007bbc: 6878 ldr r0, [r7, #4] - 8007bbe: f7fe fb3b bl 8006238 - 8007bc2: e055 b.n 8007c70 - } else { - u16_t opt2len; - /* TCP header fits into first pbuf, options don't - data is in the next pbuf */ - /* there must be a next pbuf, due to hdrlen_bytes sanity check above */ - LWIP_ASSERT("p->next != NULL", p->next != NULL); - 8007bc4: 687b ldr r3, [r7, #4] - 8007bc6: 681b ldr r3, [r3, #0] - 8007bc8: 2b00 cmp r3, #0 - 8007bca: d105 bne.n 8007bd8 - 8007bcc: 4b5d ldr r3, [pc, #372] ; (8007d44 ) - 8007bce: 22b2 movs r2, #178 ; 0xb2 - 8007bd0: 495d ldr r1, [pc, #372] ; (8007d48 ) - 8007bd2: 485e ldr r0, [pc, #376] ; (8007d4c ) - 8007bd4: f007 ff76 bl 800fac4 - - /* advance over the TCP header (cannot fail) */ - pbuf_header(p, -TCP_HLEN); - 8007bd8: f06f 0113 mvn.w r1, #19 - 8007bdc: 6878 ldr r0, [r7, #4] - 8007bde: f7fe fb2b bl 8006238 - - /* determine how long the first and second parts of the options are */ - tcphdr_opt1len = p->len; - 8007be2: 687b ldr r3, [r7, #4] - 8007be4: 895a ldrh r2, [r3, #10] - 8007be6: 4b56 ldr r3, [pc, #344] ; (8007d40 ) - 8007be8: 801a strh r2, [r3, #0] - opt2len = tcphdr_optlen - tcphdr_opt1len; - 8007bea: 4b53 ldr r3, [pc, #332] ; (8007d38 ) - 8007bec: 881a ldrh r2, [r3, #0] - 8007bee: 4b54 ldr r3, [pc, #336] ; (8007d40 ) - 8007bf0: 881b ldrh r3, [r3, #0] - 8007bf2: 1ad3 subs r3, r2, r3 - 8007bf4: 823b strh r3, [r7, #16] - - /* options continue in the next pbuf: set p to zero length and hide the - options in the next pbuf (adjusting p->tot_len) */ - pbuf_header(p, -(s16_t)tcphdr_opt1len); - 8007bf6: 4b52 ldr r3, [pc, #328] ; (8007d40 ) - 8007bf8: 881b ldrh r3, [r3, #0] - 8007bfa: 425b negs r3, r3 - 8007bfc: b29b uxth r3, r3 - 8007bfe: b21b sxth r3, r3 - 8007c00: 4619 mov r1, r3 - 8007c02: 6878 ldr r0, [r7, #4] - 8007c04: f7fe fb18 bl 8006238 - - /* check that the options fit in the second pbuf */ - if (opt2len > p->next->len) { - 8007c08: 687b ldr r3, [r7, #4] - 8007c0a: 681b ldr r3, [r3, #0] - 8007c0c: 895b ldrh r3, [r3, #10] - 8007c0e: 8a3a ldrh r2, [r7, #16] - 8007c10: 429a cmp r2, r3 - 8007c12: f200 832d bhi.w 8008270 - TCP_STATS_INC(tcp.lenerr); - goto dropped; - } - - /* remember the pointer to the second part of the options */ - tcphdr_opt2 = (u8_t*)p->next->payload; - 8007c16: 687b ldr r3, [r7, #4] - 8007c18: 681b ldr r3, [r3, #0] - 8007c1a: 685b ldr r3, [r3, #4] - 8007c1c: 4a47 ldr r2, [pc, #284] ; (8007d3c ) - 8007c1e: 6013 str r3, [r2, #0] - - /* advance p->next to point after the options, and manually - adjust p->tot_len to keep it consistent with the changed p->next */ - pbuf_header(p->next, -(s16_t)opt2len); - 8007c20: 687b ldr r3, [r7, #4] - 8007c22: 681a ldr r2, [r3, #0] - 8007c24: 8a3b ldrh r3, [r7, #16] - 8007c26: 425b negs r3, r3 - 8007c28: b29b uxth r3, r3 - 8007c2a: b21b sxth r3, r3 - 8007c2c: 4619 mov r1, r3 - 8007c2e: 4610 mov r0, r2 - 8007c30: f7fe fb02 bl 8006238 - p->tot_len -= opt2len; - 8007c34: 687b ldr r3, [r7, #4] - 8007c36: 891a ldrh r2, [r3, #8] - 8007c38: 8a3b ldrh r3, [r7, #16] - 8007c3a: 1ad3 subs r3, r2, r3 - 8007c3c: b29a uxth r2, r3 - 8007c3e: 687b ldr r3, [r7, #4] - 8007c40: 811a strh r2, [r3, #8] - - LWIP_ASSERT("p->len == 0", p->len == 0); - 8007c42: 687b ldr r3, [r7, #4] - 8007c44: 895b ldrh r3, [r3, #10] - 8007c46: 2b00 cmp r3, #0 - 8007c48: d005 beq.n 8007c56 - 8007c4a: 4b3e ldr r3, [pc, #248] ; (8007d44 ) - 8007c4c: 22cf movs r2, #207 ; 0xcf - 8007c4e: 4940 ldr r1, [pc, #256] ; (8007d50 ) - 8007c50: 483e ldr r0, [pc, #248] ; (8007d4c ) - 8007c52: f007 ff37 bl 800fac4 - LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); - 8007c56: 687b ldr r3, [r7, #4] - 8007c58: 891a ldrh r2, [r3, #8] - 8007c5a: 687b ldr r3, [r7, #4] - 8007c5c: 681b ldr r3, [r3, #0] - 8007c5e: 891b ldrh r3, [r3, #8] - 8007c60: 429a cmp r2, r3 - 8007c62: d005 beq.n 8007c70 - 8007c64: 4b37 ldr r3, [pc, #220] ; (8007d44 ) - 8007c66: 22d0 movs r2, #208 ; 0xd0 - 8007c68: 493a ldr r1, [pc, #232] ; (8007d54 ) - 8007c6a: 4838 ldr r0, [pc, #224] ; (8007d4c ) - 8007c6c: f007 ff2a bl 800fac4 - } - - /* Convert fields in TCP header to host byte order. */ - tcphdr->src = lwip_ntohs(tcphdr->src); - 8007c70: 4b2f ldr r3, [pc, #188] ; (8007d30 ) - 8007c72: 681b ldr r3, [r3, #0] - 8007c74: 881b ldrh r3, [r3, #0] - 8007c76: b29b uxth r3, r3 - 8007c78: 4a2d ldr r2, [pc, #180] ; (8007d30 ) - 8007c7a: 6814 ldr r4, [r2, #0] - 8007c7c: 4618 mov r0, r3 - 8007c7e: f7fd f9ea bl 8005056 - 8007c82: 4603 mov r3, r0 - 8007c84: 8023 strh r3, [r4, #0] - tcphdr->dest = lwip_ntohs(tcphdr->dest); - 8007c86: 4b2a ldr r3, [pc, #168] ; (8007d30 ) - 8007c88: 681b ldr r3, [r3, #0] - 8007c8a: 885b ldrh r3, [r3, #2] - 8007c8c: b29b uxth r3, r3 - 8007c8e: 4a28 ldr r2, [pc, #160] ; (8007d30 ) - 8007c90: 6814 ldr r4, [r2, #0] - 8007c92: 4618 mov r0, r3 - 8007c94: f7fd f9df bl 8005056 - 8007c98: 4603 mov r3, r0 - 8007c9a: 8063 strh r3, [r4, #2] - seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); - 8007c9c: 4b24 ldr r3, [pc, #144] ; (8007d30 ) - 8007c9e: 681b ldr r3, [r3, #0] - 8007ca0: 685b ldr r3, [r3, #4] - 8007ca2: 4a23 ldr r2, [pc, #140] ; (8007d30 ) - 8007ca4: 6814 ldr r4, [r2, #0] - 8007ca6: 4618 mov r0, r3 - 8007ca8: f7fd f9e2 bl 8005070 - 8007cac: 4603 mov r3, r0 - 8007cae: 6063 str r3, [r4, #4] - 8007cb0: 6863 ldr r3, [r4, #4] - 8007cb2: 4a29 ldr r2, [pc, #164] ; (8007d58 ) - 8007cb4: 6013 str r3, [r2, #0] - ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); - 8007cb6: 4b1e ldr r3, [pc, #120] ; (8007d30 ) - 8007cb8: 681b ldr r3, [r3, #0] - 8007cba: 689b ldr r3, [r3, #8] - 8007cbc: 4a1c ldr r2, [pc, #112] ; (8007d30 ) - 8007cbe: 6814 ldr r4, [r2, #0] - 8007cc0: 4618 mov r0, r3 - 8007cc2: f7fd f9d5 bl 8005070 - 8007cc6: 4603 mov r3, r0 - 8007cc8: 60a3 str r3, [r4, #8] - 8007cca: 68a3 ldr r3, [r4, #8] - 8007ccc: 4a23 ldr r2, [pc, #140] ; (8007d5c ) - 8007cce: 6013 str r3, [r2, #0] - tcphdr->wnd = lwip_ntohs(tcphdr->wnd); - 8007cd0: 4b17 ldr r3, [pc, #92] ; (8007d30 ) - 8007cd2: 681b ldr r3, [r3, #0] - 8007cd4: 89db ldrh r3, [r3, #14] - 8007cd6: b29b uxth r3, r3 - 8007cd8: 4a15 ldr r2, [pc, #84] ; (8007d30 ) - 8007cda: 6814 ldr r4, [r2, #0] - 8007cdc: 4618 mov r0, r3 - 8007cde: f7fd f9ba bl 8005056 - 8007ce2: 4603 mov r3, r0 - 8007ce4: 81e3 strh r3, [r4, #14] - - flags = TCPH_FLAGS(tcphdr); - 8007ce6: 4b12 ldr r3, [pc, #72] ; (8007d30 ) - 8007ce8: 681b ldr r3, [r3, #0] - 8007cea: 899b ldrh r3, [r3, #12] - 8007cec: b29b uxth r3, r3 - 8007cee: 4618 mov r0, r3 - 8007cf0: f7fd f9b1 bl 8005056 - 8007cf4: 4603 mov r3, r0 - 8007cf6: b2db uxtb r3, r3 - 8007cf8: f003 033f and.w r3, r3, #63 ; 0x3f - 8007cfc: b2da uxtb r2, r3 - 8007cfe: 4b18 ldr r3, [pc, #96] ; (8007d60 ) - 8007d00: 701a strb r2, [r3, #0] - tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); - 8007d02: 687b ldr r3, [r7, #4] - 8007d04: 891a ldrh r2, [r3, #8] - 8007d06: 4b16 ldr r3, [pc, #88] ; (8007d60 ) - 8007d08: 781b ldrb r3, [r3, #0] - 8007d0a: f003 0303 and.w r3, r3, #3 - 8007d0e: 2b00 cmp r3, #0 - 8007d10: bf14 ite ne - 8007d12: 2301 movne r3, #1 - 8007d14: 2300 moveq r3, #0 - 8007d16: b2db uxtb r3, r3 - 8007d18: b29b uxth r3, r3 - 8007d1a: 4413 add r3, r2 - 8007d1c: b29a uxth r2, r3 - 8007d1e: 4b11 ldr r3, [pc, #68] ; (8007d64 ) - 8007d20: 801a strh r2, [r3, #0] - - /* Demultiplex an incoming segment. First, we check if it is destined - for an active connection. */ - prev = NULL; - 8007d22: 2300 movs r3, #0 - 8007d24: 61bb str r3, [r7, #24] - - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - 8007d26: 4b10 ldr r3, [pc, #64] ; (8007d68 ) - 8007d28: 681b ldr r3, [r3, #0] - 8007d2a: 61fb str r3, [r7, #28] - 8007d2c: e082 b.n 8007e34 - 8007d2e: bf00 nop - 8007d30: 20006d8c .word 0x20006d8c - 8007d34: 200037e8 .word 0x200037e8 - 8007d38: 20006d90 .word 0x20006d90 - 8007d3c: 20006d94 .word 0x20006d94 - 8007d40: 20006d92 .word 0x20006d92 - 8007d44: 08011640 .word 0x08011640 - 8007d48: 08011674 .word 0x08011674 - 8007d4c: 08011684 .word 0x08011684 - 8007d50: 080116ac .word 0x080116ac - 8007d54: 080116b8 .word 0x080116b8 - 8007d58: 20006d9c .word 0x20006d9c - 8007d5c: 20006da0 .word 0x20006da0 - 8007d60: 20006da8 .word 0x20006da8 - 8007d64: 20006da6 .word 0x20006da6 - 8007d68: 20006d70 .word 0x20006d70 - LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); - 8007d6c: 69fb ldr r3, [r7, #28] - 8007d6e: 7d1b ldrb r3, [r3, #20] - 8007d70: 2b00 cmp r3, #0 - 8007d72: d105 bne.n 8007d80 - 8007d74: 4b6e ldr r3, [pc, #440] ; (8007f30 ) - 8007d76: 22e2 movs r2, #226 ; 0xe2 - 8007d78: 496e ldr r1, [pc, #440] ; (8007f34 ) - 8007d7a: 486f ldr r0, [pc, #444] ; (8007f38 ) - 8007d7c: f007 fea2 bl 800fac4 - LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); - 8007d80: 69fb ldr r3, [r7, #28] - 8007d82: 7d1b ldrb r3, [r3, #20] - 8007d84: 2b0a cmp r3, #10 - 8007d86: d105 bne.n 8007d94 - 8007d88: 4b69 ldr r3, [pc, #420] ; (8007f30 ) - 8007d8a: 22e3 movs r2, #227 ; 0xe3 - 8007d8c: 496b ldr r1, [pc, #428] ; (8007f3c ) - 8007d8e: 486a ldr r0, [pc, #424] ; (8007f38 ) - 8007d90: f007 fe98 bl 800fac4 - LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); - 8007d94: 69fb ldr r3, [r7, #28] - 8007d96: 7d1b ldrb r3, [r3, #20] - 8007d98: 2b01 cmp r3, #1 - 8007d9a: d105 bne.n 8007da8 - 8007d9c: 4b64 ldr r3, [pc, #400] ; (8007f30 ) - 8007d9e: 22e4 movs r2, #228 ; 0xe4 - 8007da0: 4967 ldr r1, [pc, #412] ; (8007f40 ) - 8007da2: 4865 ldr r0, [pc, #404] ; (8007f38 ) - 8007da4: f007 fe8e bl 800fac4 - if (pcb->remote_port == tcphdr->src && - 8007da8: 69fb ldr r3, [r7, #28] - 8007daa: 8b1a ldrh r2, [r3, #24] - 8007dac: 4b65 ldr r3, [pc, #404] ; (8007f44 ) - 8007dae: 681b ldr r3, [r3, #0] - 8007db0: 881b ldrh r3, [r3, #0] - 8007db2: b29b uxth r3, r3 - 8007db4: 429a cmp r2, r3 - 8007db6: d138 bne.n 8007e2a - pcb->local_port == tcphdr->dest && - 8007db8: 69fb ldr r3, [r7, #28] - 8007dba: 8ada ldrh r2, [r3, #22] - 8007dbc: 4b61 ldr r3, [pc, #388] ; (8007f44 ) - 8007dbe: 681b ldr r3, [r3, #0] - 8007dc0: 885b ldrh r3, [r3, #2] - 8007dc2: b29b uxth r3, r3 - if (pcb->remote_port == tcphdr->src && - 8007dc4: 429a cmp r2, r3 - 8007dc6: d130 bne.n 8007e2a - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && - 8007dc8: 69fb ldr r3, [r7, #28] - 8007dca: 685a ldr r2, [r3, #4] - 8007dcc: 4b5e ldr r3, [pc, #376] ; (8007f48 ) - 8007dce: 691b ldr r3, [r3, #16] - pcb->local_port == tcphdr->dest && - 8007dd0: 429a cmp r2, r3 - 8007dd2: d12a bne.n 8007e2a - ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - 8007dd4: 69fb ldr r3, [r7, #28] - 8007dd6: 681a ldr r2, [r3, #0] - 8007dd8: 4b5b ldr r3, [pc, #364] ; (8007f48 ) - 8007dda: 695b ldr r3, [r3, #20] - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && - 8007ddc: 429a cmp r2, r3 - 8007dde: d124 bne.n 8007e2a - /* Move this PCB to the front of the list so that subsequent - lookups will be faster (we exploit locality in TCP segment - arrivals). */ - LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); - 8007de0: 69fb ldr r3, [r7, #28] - 8007de2: 68db ldr r3, [r3, #12] - 8007de4: 69fa ldr r2, [r7, #28] - 8007de6: 429a cmp r2, r3 - 8007de8: d105 bne.n 8007df6 - 8007dea: 4b51 ldr r3, [pc, #324] ; (8007f30 ) - 8007dec: 22ec movs r2, #236 ; 0xec - 8007dee: 4957 ldr r1, [pc, #348] ; (8007f4c ) - 8007df0: 4851 ldr r0, [pc, #324] ; (8007f38 ) - 8007df2: f007 fe67 bl 800fac4 - if (prev != NULL) { - 8007df6: 69bb ldr r3, [r7, #24] - 8007df8: 2b00 cmp r3, #0 - 8007dfa: d00a beq.n 8007e12 - prev->next = pcb->next; - 8007dfc: 69fb ldr r3, [r7, #28] - 8007dfe: 68da ldr r2, [r3, #12] - 8007e00: 69bb ldr r3, [r7, #24] - 8007e02: 60da str r2, [r3, #12] - pcb->next = tcp_active_pcbs; - 8007e04: 4b52 ldr r3, [pc, #328] ; (8007f50 ) - 8007e06: 681a ldr r2, [r3, #0] - 8007e08: 69fb ldr r3, [r7, #28] - 8007e0a: 60da str r2, [r3, #12] - tcp_active_pcbs = pcb; - 8007e0c: 4a50 ldr r2, [pc, #320] ; (8007f50 ) - 8007e0e: 69fb ldr r3, [r7, #28] - 8007e10: 6013 str r3, [r2, #0] - } else { - TCP_STATS_INC(tcp.cachehit); - } - LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); - 8007e12: 69fb ldr r3, [r7, #28] - 8007e14: 68db ldr r3, [r3, #12] - 8007e16: 69fa ldr r2, [r7, #28] - 8007e18: 429a cmp r2, r3 - 8007e1a: d10f bne.n 8007e3c - 8007e1c: 4b44 ldr r3, [pc, #272] ; (8007f30 ) - 8007e1e: 22f4 movs r2, #244 ; 0xf4 - 8007e20: 494c ldr r1, [pc, #304] ; (8007f54 ) - 8007e22: 4845 ldr r0, [pc, #276] ; (8007f38 ) - 8007e24: f007 fe4e bl 800fac4 - break; - 8007e28: e008 b.n 8007e3c - } - prev = pcb; - 8007e2a: 69fb ldr r3, [r7, #28] - 8007e2c: 61bb str r3, [r7, #24] - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - 8007e2e: 69fb ldr r3, [r7, #28] - 8007e30: 68db ldr r3, [r3, #12] - 8007e32: 61fb str r3, [r7, #28] - 8007e34: 69fb ldr r3, [r7, #28] - 8007e36: 2b00 cmp r3, #0 - 8007e38: d198 bne.n 8007d6c - 8007e3a: e000 b.n 8007e3e - break; - 8007e3c: bf00 nop - } - - if (pcb == NULL) { - 8007e3e: 69fb ldr r3, [r7, #28] - 8007e40: 2b00 cmp r3, #0 - 8007e42: f040 808f bne.w 8007f64 - /* If it did not go to an active connection, we check the connections - in the TIME-WAIT state. */ - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - 8007e46: 4b44 ldr r3, [pc, #272] ; (8007f58 ) - 8007e48: 681b ldr r3, [r3, #0] - 8007e4a: 61fb str r3, [r7, #28] - 8007e4c: e02f b.n 8007eae - LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); - 8007e4e: 69fb ldr r3, [r7, #28] - 8007e50: 7d1b ldrb r3, [r3, #20] - 8007e52: 2b0a cmp r3, #10 - 8007e54: d005 beq.n 8007e62 - 8007e56: 4b36 ldr r3, [pc, #216] ; (8007f30 ) - 8007e58: 22fe movs r2, #254 ; 0xfe - 8007e5a: 4940 ldr r1, [pc, #256] ; (8007f5c ) - 8007e5c: 4836 ldr r0, [pc, #216] ; (8007f38 ) - 8007e5e: f007 fe31 bl 800fac4 - if (pcb->remote_port == tcphdr->src && - 8007e62: 69fb ldr r3, [r7, #28] - 8007e64: 8b1a ldrh r2, [r3, #24] - 8007e66: 4b37 ldr r3, [pc, #220] ; (8007f44 ) - 8007e68: 681b ldr r3, [r3, #0] - 8007e6a: 881b ldrh r3, [r3, #0] - 8007e6c: b29b uxth r3, r3 - 8007e6e: 429a cmp r2, r3 - 8007e70: d11a bne.n 8007ea8 - pcb->local_port == tcphdr->dest && - 8007e72: 69fb ldr r3, [r7, #28] - 8007e74: 8ada ldrh r2, [r3, #22] - 8007e76: 4b33 ldr r3, [pc, #204] ; (8007f44 ) - 8007e78: 681b ldr r3, [r3, #0] - 8007e7a: 885b ldrh r3, [r3, #2] - 8007e7c: b29b uxth r3, r3 - if (pcb->remote_port == tcphdr->src && - 8007e7e: 429a cmp r2, r3 - 8007e80: d112 bne.n 8007ea8 - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && - 8007e82: 69fb ldr r3, [r7, #28] - 8007e84: 685a ldr r2, [r3, #4] - 8007e86: 4b30 ldr r3, [pc, #192] ; (8007f48 ) - 8007e88: 691b ldr r3, [r3, #16] - pcb->local_port == tcphdr->dest && - 8007e8a: 429a cmp r2, r3 - 8007e8c: d10c bne.n 8007ea8 - ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - 8007e8e: 69fb ldr r3, [r7, #28] - 8007e90: 681a ldr r2, [r3, #0] - 8007e92: 4b2d ldr r3, [pc, #180] ; (8007f48 ) - 8007e94: 695b ldr r3, [r3, #20] - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && - 8007e96: 429a cmp r2, r3 - 8007e98: d106 bne.n 8007ea8 - /* We don't really care enough to move this PCB to the front - of the list since we are not very likely to receive that - many segments for connections in TIME-WAIT. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for TIME_WAITing connection.\n")); - tcp_timewait_input(pcb); - 8007e9a: 69f8 ldr r0, [r7, #28] - 8007e9c: f000 fb16 bl 80084cc - pbuf_free(p); - 8007ea0: 6878 ldr r0, [r7, #4] - 8007ea2: f7fe f9ed bl 8006280 - return; - 8007ea6: e1e9 b.n 800827c - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - 8007ea8: 69fb ldr r3, [r7, #28] - 8007eaa: 68db ldr r3, [r3, #12] - 8007eac: 61fb str r3, [r7, #28] - 8007eae: 69fb ldr r3, [r7, #28] - 8007eb0: 2b00 cmp r3, #0 - 8007eb2: d1cc bne.n 8007e4e - } - } - - /* Finally, if we still did not get a match, we check all PCBs that - are LISTENing for incoming connections. */ - prev = NULL; - 8007eb4: 2300 movs r3, #0 - 8007eb6: 61bb str r3, [r7, #24] - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { - 8007eb8: 4b29 ldr r3, [pc, #164] ; (8007f60 ) - 8007eba: 681b ldr r3, [r3, #0] - 8007ebc: 617b str r3, [r7, #20] - 8007ebe: e019 b.n 8007ef4 - if (lpcb->local_port == tcphdr->dest) { - 8007ec0: 697b ldr r3, [r7, #20] - 8007ec2: 8ada ldrh r2, [r3, #22] - 8007ec4: 4b1f ldr r3, [pc, #124] ; (8007f44 ) - 8007ec6: 681b ldr r3, [r3, #0] - 8007ec8: 885b ldrh r3, [r3, #2] - 8007eca: b29b uxth r3, r3 - 8007ecc: 429a cmp r2, r3 - 8007ece: d10c bne.n 8007eea - lpcb_prev = prev; -#else /* SO_REUSE */ - break; -#endif /* SO_REUSE */ - } else if (IP_ADDR_PCB_VERSION_MATCH_EXACT(lpcb, ip_current_dest_addr())) { - if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) { - 8007ed0: 697b ldr r3, [r7, #20] - 8007ed2: 681a ldr r2, [r3, #0] - 8007ed4: 4b1c ldr r3, [pc, #112] ; (8007f48 ) - 8007ed6: 695b ldr r3, [r3, #20] - 8007ed8: 429a cmp r2, r3 - 8007eda: d00f beq.n 8007efc - /* found an exact match */ - break; - } else if (ip_addr_isany(&lpcb->local_ip)) { - 8007edc: 697b ldr r3, [r7, #20] - 8007ede: 2b00 cmp r3, #0 - 8007ee0: d00d beq.n 8007efe - 8007ee2: 697b ldr r3, [r7, #20] - 8007ee4: 681b ldr r3, [r3, #0] - 8007ee6: 2b00 cmp r3, #0 - 8007ee8: d009 beq.n 8007efe - break; - #endif /* SO_REUSE */ - } - } - } - prev = (struct tcp_pcb *)lpcb; - 8007eea: 697b ldr r3, [r7, #20] - 8007eec: 61bb str r3, [r7, #24] - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { - 8007eee: 697b ldr r3, [r7, #20] - 8007ef0: 68db ldr r3, [r3, #12] - 8007ef2: 617b str r3, [r7, #20] - 8007ef4: 697b ldr r3, [r7, #20] - 8007ef6: 2b00 cmp r3, #0 - 8007ef8: d1e2 bne.n 8007ec0 - 8007efa: e000 b.n 8007efe - break; - 8007efc: bf00 nop - /* only pass to ANY if no specific local IP has been found */ - lpcb = lpcb_any; - prev = lpcb_prev; - } -#endif /* SO_REUSE */ - if (lpcb != NULL) { - 8007efe: 697b ldr r3, [r7, #20] - 8007f00: 2b00 cmp r3, #0 - 8007f02: d02f beq.n 8007f64 - /* Move this PCB to the front of the list so that subsequent - lookups will be faster (we exploit locality in TCP segment - arrivals). */ - if (prev != NULL) { - 8007f04: 69bb ldr r3, [r7, #24] - 8007f06: 2b00 cmp r3, #0 - 8007f08: d00a beq.n 8007f20 - ((struct tcp_pcb_listen *)prev)->next = lpcb->next; - 8007f0a: 697b ldr r3, [r7, #20] - 8007f0c: 68da ldr r2, [r3, #12] - 8007f0e: 69bb ldr r3, [r7, #24] - 8007f10: 60da str r2, [r3, #12] - /* our successor is the remainder of the listening list */ - lpcb->next = tcp_listen_pcbs.listen_pcbs; - 8007f12: 4b13 ldr r3, [pc, #76] ; (8007f60 ) - 8007f14: 681a ldr r2, [r3, #0] - 8007f16: 697b ldr r3, [r7, #20] - 8007f18: 60da str r2, [r3, #12] - /* put this listening pcb at the head of the listening list */ - tcp_listen_pcbs.listen_pcbs = lpcb; - 8007f1a: 4a11 ldr r2, [pc, #68] ; (8007f60 ) - 8007f1c: 697b ldr r3, [r7, #20] - 8007f1e: 6013 str r3, [r2, #0] - } else { - TCP_STATS_INC(tcp.cachehit); - } - - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for LISTENing connection.\n")); - tcp_listen_input(lpcb); - 8007f20: 6978 ldr r0, [r7, #20] - 8007f22: f000 f9f3 bl 800830c - pbuf_free(p); - 8007f26: 6878 ldr r0, [r7, #4] - 8007f28: f7fe f9aa bl 8006280 - return; - 8007f2c: e1a6 b.n 800827c - 8007f2e: bf00 nop - 8007f30: 08011640 .word 0x08011640 - 8007f34: 080116d8 .word 0x080116d8 - 8007f38: 08011684 .word 0x08011684 - 8007f3c: 08011700 .word 0x08011700 - 8007f40: 0801172c .word 0x0801172c - 8007f44: 20006d8c .word 0x20006d8c - 8007f48: 200037e8 .word 0x200037e8 - 8007f4c: 08011754 .word 0x08011754 - 8007f50: 20006d70 .word 0x20006d70 - 8007f54: 08011780 .word 0x08011780 - 8007f58: 20006d74 .word 0x20006d74 - 8007f5c: 080117ac .word 0x080117ac - 8007f60: 20006d6c .word 0x20006d6c - tcp_debug_print_flags(TCPH_FLAGS(tcphdr)); - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n")); -#endif /* TCP_INPUT_DEBUG */ - - - if (pcb != NULL) { - 8007f64: 69fb ldr r3, [r7, #28] - 8007f66: 2b00 cmp r3, #0 - 8007f68: f000 8156 beq.w 8008218 -#if TCP_INPUT_DEBUG - tcp_debug_print_state(pcb->state); -#endif /* TCP_INPUT_DEBUG */ - - /* Set up a tcp_seg structure. */ - inseg.next = NULL; - 8007f6c: 4b94 ldr r3, [pc, #592] ; (80081c0 ) - 8007f6e: 2200 movs r2, #0 - 8007f70: 601a str r2, [r3, #0] - inseg.len = p->tot_len; - 8007f72: 687b ldr r3, [r7, #4] - 8007f74: 891a ldrh r2, [r3, #8] - 8007f76: 4b92 ldr r3, [pc, #584] ; (80081c0 ) - 8007f78: 811a strh r2, [r3, #8] - inseg.p = p; - 8007f7a: 4a91 ldr r2, [pc, #580] ; (80081c0 ) - 8007f7c: 687b ldr r3, [r7, #4] - 8007f7e: 6053 str r3, [r2, #4] - inseg.tcphdr = tcphdr; - 8007f80: 4b90 ldr r3, [pc, #576] ; (80081c4 ) - 8007f82: 681b ldr r3, [r3, #0] - 8007f84: 4a8e ldr r2, [pc, #568] ; (80081c0 ) - 8007f86: 60d3 str r3, [r2, #12] - - recv_data = NULL; - 8007f88: 4b8f ldr r3, [pc, #572] ; (80081c8 ) - 8007f8a: 2200 movs r2, #0 - 8007f8c: 601a str r2, [r3, #0] - recv_flags = 0; - 8007f8e: 4b8f ldr r3, [pc, #572] ; (80081cc ) - 8007f90: 2200 movs r2, #0 - 8007f92: 701a strb r2, [r3, #0] - recv_acked = 0; - 8007f94: 4b8e ldr r3, [pc, #568] ; (80081d0 ) - 8007f96: 2200 movs r2, #0 - 8007f98: 801a strh r2, [r3, #0] - - if (flags & TCP_PSH) { - 8007f9a: 4b8e ldr r3, [pc, #568] ; (80081d4 ) - 8007f9c: 781b ldrb r3, [r3, #0] - 8007f9e: f003 0308 and.w r3, r3, #8 - 8007fa2: 2b00 cmp r3, #0 - 8007fa4: d006 beq.n 8007fb4 - p->flags |= PBUF_FLAG_PUSH; - 8007fa6: 687b ldr r3, [r7, #4] - 8007fa8: 7b5b ldrb r3, [r3, #13] - 8007faa: f043 0301 orr.w r3, r3, #1 - 8007fae: b2da uxtb r2, r3 - 8007fb0: 687b ldr r3, [r7, #4] - 8007fb2: 735a strb r2, [r3, #13] - } - - /* If there is data which was previously "refused" by upper layer */ - if (pcb->refused_data != NULL) { - 8007fb4: 69fb ldr r3, [r7, #28] - 8007fb6: 6f5b ldr r3, [r3, #116] ; 0x74 - 8007fb8: 2b00 cmp r3, #0 - 8007fba: d017 beq.n 8007fec - if ((tcp_process_refused_data(pcb) == ERR_ABRT) || - 8007fbc: 69f8 ldr r0, [r7, #28] - 8007fbe: f7ff fa3f bl 8007440 - 8007fc2: 4603 mov r3, r0 - 8007fc4: f113 0f0d cmn.w r3, #13 - 8007fc8: d007 beq.n 8007fda - ((pcb->refused_data != NULL) && (tcplen > 0))) { - 8007fca: 69fb ldr r3, [r7, #28] - 8007fcc: 6f5b ldr r3, [r3, #116] ; 0x74 - if ((tcp_process_refused_data(pcb) == ERR_ABRT) || - 8007fce: 2b00 cmp r3, #0 - 8007fd0: d00c beq.n 8007fec - ((pcb->refused_data != NULL) && (tcplen > 0))) { - 8007fd2: 4b81 ldr r3, [pc, #516] ; (80081d8 ) - 8007fd4: 881b ldrh r3, [r3, #0] - 8007fd6: 2b00 cmp r3, #0 - 8007fd8: d008 beq.n 8007fec - /* pcb has been aborted or refused data is still refused and the new - segment contains data */ - if (pcb->rcv_ann_wnd == 0) { - 8007fda: 69fb ldr r3, [r7, #28] - 8007fdc: 8d5b ldrh r3, [r3, #42] ; 0x2a - 8007fde: 2b00 cmp r3, #0 - 8007fe0: f040 80e2 bne.w 80081a8 - /* this is a zero-window probe, we respond to it with current RCV.NXT - and drop the data segment */ - tcp_send_empty_ack(pcb); - 8007fe4: 69f8 ldr r0, [r7, #28] - 8007fe6: f002 f9eb bl 800a3c0 - } - TCP_STATS_INC(tcp.drop); - MIB2_STATS_INC(mib2.tcpinerrs); - goto aborted; - 8007fea: e0dd b.n 80081a8 - } - } - tcp_input_pcb = pcb; - 8007fec: 4a7b ldr r2, [pc, #492] ; (80081dc ) - 8007fee: 69fb ldr r3, [r7, #28] - 8007ff0: 6013 str r3, [r2, #0] - err = tcp_process(pcb); - 8007ff2: 69f8 ldr r0, [r7, #28] - 8007ff4: f000 fad2 bl 800859c - 8007ff8: 4603 mov r3, r0 - 8007ffa: 74fb strb r3, [r7, #19] - /* A return value of ERR_ABRT means that tcp_abort() was called - and that the pcb has been freed. If so, we don't do anything. */ - if (err != ERR_ABRT) { - 8007ffc: f997 3013 ldrsb.w r3, [r7, #19] - 8008000: f113 0f0d cmn.w r3, #13 - 8008004: f000 80d2 beq.w 80081ac - if (recv_flags & TF_RESET) { - 8008008: 4b70 ldr r3, [pc, #448] ; (80081cc ) - 800800a: 781b ldrb r3, [r3, #0] - 800800c: f003 0308 and.w r3, r3, #8 - 8008010: 2b00 cmp r3, #0 - 8008012: d016 beq.n 8008042 - /* TF_RESET means that the connection was reset by the other - end. We then call the error callback to inform the - application that the connection is dead before we - deallocate the PCB. */ - TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST); - 8008014: 69fb ldr r3, [r7, #28] - 8008016: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c - 800801a: 2b00 cmp r3, #0 - 800801c: d008 beq.n 8008030 - 800801e: 69fb ldr r3, [r7, #28] - 8008020: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c - 8008024: 69fa ldr r2, [r7, #28] - 8008026: 6912 ldr r2, [r2, #16] - 8008028: f06f 010d mvn.w r1, #13 - 800802c: 4610 mov r0, r2 - 800802e: 4798 blx r3 - tcp_pcb_remove(&tcp_active_pcbs, pcb); - 8008030: 69f9 ldr r1, [r7, #28] - 8008032: 486b ldr r0, [pc, #428] ; (80081e0 ) - 8008034: f7ff fc58 bl 80078e8 - memp_free(MEMP_TCP_PCB, pcb); - 8008038: 69f9 ldr r1, [r7, #28] - 800803a: 2001 movs r0, #1 - 800803c: f7fd fc00 bl 8005840 - 8008040: e0d7 b.n 80081f2 - } else { - err = ERR_OK; - 8008042: 2300 movs r3, #0 - 8008044: 74fb strb r3, [r7, #19] - /* If the application has registered a "sent" function to be - called when new send buffer space is available, we call it - now. */ - if (recv_acked > 0) { - 8008046: 4b62 ldr r3, [pc, #392] ; (80081d0 ) - 8008048: 881b ldrh r3, [r3, #0] - 800804a: 2b00 cmp r3, #0 - 800804c: d01b beq.n 8008086 - while (acked > 0) { - acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); - acked -= acked16; -#else - { - acked16 = recv_acked; - 800804e: 4b60 ldr r3, [pc, #384] ; (80081d0 ) - 8008050: 881b ldrh r3, [r3, #0] - 8008052: 81fb strh r3, [r7, #14] -#endif - TCP_EVENT_SENT(pcb, (u16_t)acked16, err); - 8008054: 69fb ldr r3, [r7, #28] - 8008056: 6fdb ldr r3, [r3, #124] ; 0x7c - 8008058: 2b00 cmp r3, #0 - 800805a: d009 beq.n 8008070 - 800805c: 69fb ldr r3, [r7, #28] - 800805e: 6fdb ldr r3, [r3, #124] ; 0x7c - 8008060: 69fa ldr r2, [r7, #28] - 8008062: 6910 ldr r0, [r2, #16] - 8008064: 89fa ldrh r2, [r7, #14] - 8008066: 69f9 ldr r1, [r7, #28] - 8008068: 4798 blx r3 - 800806a: 4603 mov r3, r0 - 800806c: 74fb strb r3, [r7, #19] - 800806e: e001 b.n 8008074 - 8008070: 2300 movs r3, #0 - 8008072: 74fb strb r3, [r7, #19] - if (err == ERR_ABRT) { - 8008074: f997 3013 ldrsb.w r3, [r7, #19] - 8008078: f113 0f0d cmn.w r3, #13 - 800807c: f000 8098 beq.w 80081b0 - goto aborted; - } - } - recv_acked = 0; - 8008080: 4b53 ldr r3, [pc, #332] ; (80081d0 ) - 8008082: 2200 movs r2, #0 - 8008084: 801a strh r2, [r3, #0] - } - if (tcp_input_delayed_close(pcb)) { - 8008086: 69f8 ldr r0, [r7, #28] - 8008088: f000 f90e bl 80082a8 - 800808c: 4603 mov r3, r0 - 800808e: 2b00 cmp r3, #0 - 8008090: f040 8090 bne.w 80081b4 -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - while (recv_data != NULL) { - struct pbuf *rest = NULL; - pbuf_split_64k(recv_data, &rest); -#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - if (recv_data != NULL) { - 8008094: 4b4c ldr r3, [pc, #304] ; (80081c8 ) - 8008096: 681b ldr r3, [r3, #0] - 8008098: 2b00 cmp r3, #0 - 800809a: d041 beq.n 8008120 -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - - LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); - 800809c: 69fb ldr r3, [r7, #28] - 800809e: 6f5b ldr r3, [r3, #116] ; 0x74 - 80080a0: 2b00 cmp r3, #0 - 80080a2: d006 beq.n 80080b2 - 80080a4: 4b4f ldr r3, [pc, #316] ; (80081e4 ) - 80080a6: f44f 72d2 mov.w r2, #420 ; 0x1a4 - 80080aa: 494f ldr r1, [pc, #316] ; (80081e8 ) - 80080ac: 484f ldr r0, [pc, #316] ; (80081ec ) - 80080ae: f007 fd09 bl 800fac4 - if (pcb->flags & TF_RXCLOSED) { - 80080b2: 69fb ldr r3, [r7, #28] - 80080b4: 7e9b ldrb r3, [r3, #26] - 80080b6: f003 0310 and.w r3, r3, #16 - 80080ba: 2b00 cmp r3, #0 - 80080bc: d008 beq.n 80080d0 - /* received data although already closed -> abort (send RST) to - notify the remote host that not all data has been processed */ - pbuf_free(recv_data); - 80080be: 4b42 ldr r3, [pc, #264] ; (80081c8 ) - 80080c0: 681b ldr r3, [r3, #0] - 80080c2: 4618 mov r0, r3 - 80080c4: f7fe f8dc bl 8006280 -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - if (rest != NULL) { - pbuf_free(rest); - } -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - tcp_abort(pcb); - 80080c8: 69f8 ldr r0, [r7, #28] - 80080ca: f7fe fddf bl 8006c8c - goto aborted; - 80080ce: e090 b.n 80081f2 - } - - /* Notify application that data has been received. */ - TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); - 80080d0: 69fb ldr r3, [r7, #28] - 80080d2: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 - 80080d6: 2b00 cmp r3, #0 - 80080d8: d00c beq.n 80080f4 - 80080da: 69fb ldr r3, [r7, #28] - 80080dc: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 - 80080e0: 69fb ldr r3, [r7, #28] - 80080e2: 6918 ldr r0, [r3, #16] - 80080e4: 4b38 ldr r3, [pc, #224] ; (80081c8 ) - 80080e6: 681a ldr r2, [r3, #0] - 80080e8: 2300 movs r3, #0 - 80080ea: 69f9 ldr r1, [r7, #28] - 80080ec: 47a0 blx r4 - 80080ee: 4603 mov r3, r0 - 80080f0: 74fb strb r3, [r7, #19] - 80080f2: e008 b.n 8008106 - 80080f4: 4b34 ldr r3, [pc, #208] ; (80081c8 ) - 80080f6: 681a ldr r2, [r3, #0] - 80080f8: 2300 movs r3, #0 - 80080fa: 69f9 ldr r1, [r7, #28] - 80080fc: 2000 movs r0, #0 - 80080fe: f7ff fa51 bl 80075a4 - 8008102: 4603 mov r3, r0 - 8008104: 74fb strb r3, [r7, #19] - if (err == ERR_ABRT) { - 8008106: f997 3013 ldrsb.w r3, [r7, #19] - 800810a: f113 0f0d cmn.w r3, #13 - 800810e: d053 beq.n 80081b8 -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - goto aborted; - } - - /* If the upper layer can't receive this data, store it */ - if (err != ERR_OK) { - 8008110: f997 3013 ldrsb.w r3, [r7, #19] - 8008114: 2b00 cmp r3, #0 - 8008116: d003 beq.n 8008120 -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - if (rest != NULL) { - pbuf_cat(recv_data, rest); - } -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - pcb->refused_data = recv_data; - 8008118: 4b2b ldr r3, [pc, #172] ; (80081c8 ) - 800811a: 681a ldr r2, [r3, #0] - 800811c: 69fb ldr r3, [r7, #28] - 800811e: 675a str r2, [r3, #116] ; 0x74 - } - } - - /* If a FIN segment was received, we call the callback - function with a NULL buffer to indicate EOF. */ - if (recv_flags & TF_GOT_FIN) { - 8008120: 4b2a ldr r3, [pc, #168] ; (80081cc ) - 8008122: 781b ldrb r3, [r3, #0] - 8008124: f003 0320 and.w r3, r3, #32 - 8008128: 2b00 cmp r3, #0 - 800812a: d030 beq.n 800818e - if (pcb->refused_data != NULL) { - 800812c: 69fb ldr r3, [r7, #28] - 800812e: 6f5b ldr r3, [r3, #116] ; 0x74 - 8008130: 2b00 cmp r3, #0 - 8008132: d009 beq.n 8008148 - /* Delay this if we have refused data. */ - pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; - 8008134: 69fb ldr r3, [r7, #28] - 8008136: 6f5b ldr r3, [r3, #116] ; 0x74 - 8008138: 7b5a ldrb r2, [r3, #13] - 800813a: 69fb ldr r3, [r7, #28] - 800813c: 6f5b ldr r3, [r3, #116] ; 0x74 - 800813e: f042 0220 orr.w r2, r2, #32 - 8008142: b2d2 uxtb r2, r2 - 8008144: 735a strb r2, [r3, #13] - 8008146: e022 b.n 800818e - } else { - /* correct rcv_wnd as the application won't call tcp_recved() - for the FIN's seqno */ - if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { - 8008148: 69fb ldr r3, [r7, #28] - 800814a: 8d1b ldrh r3, [r3, #40] ; 0x28 - 800814c: f5b3 6f06 cmp.w r3, #2144 ; 0x860 - 8008150: d005 beq.n 800815e - pcb->rcv_wnd++; - 8008152: 69fb ldr r3, [r7, #28] - 8008154: 8d1b ldrh r3, [r3, #40] ; 0x28 - 8008156: 3301 adds r3, #1 - 8008158: b29a uxth r2, r3 - 800815a: 69fb ldr r3, [r7, #28] - 800815c: 851a strh r2, [r3, #40] ; 0x28 - } - TCP_EVENT_CLOSED(pcb, err); - 800815e: 69fb ldr r3, [r7, #28] - 8008160: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 - 8008164: 2b00 cmp r3, #0 - 8008166: d00b beq.n 8008180 - 8008168: 69fb ldr r3, [r7, #28] - 800816a: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 - 800816e: 69fb ldr r3, [r7, #28] - 8008170: 6918 ldr r0, [r3, #16] - 8008172: 2300 movs r3, #0 - 8008174: 2200 movs r2, #0 - 8008176: 69f9 ldr r1, [r7, #28] - 8008178: 47a0 blx r4 - 800817a: 4603 mov r3, r0 - 800817c: 74fb strb r3, [r7, #19] - 800817e: e001 b.n 8008184 - 8008180: 2300 movs r3, #0 - 8008182: 74fb strb r3, [r7, #19] - if (err == ERR_ABRT) { - 8008184: f997 3013 ldrsb.w r3, [r7, #19] - 8008188: f113 0f0d cmn.w r3, #13 - 800818c: d016 beq.n 80081bc - goto aborted; - } - } - } - - tcp_input_pcb = NULL; - 800818e: 4b13 ldr r3, [pc, #76] ; (80081dc ) - 8008190: 2200 movs r2, #0 - 8008192: 601a str r2, [r3, #0] - if (tcp_input_delayed_close(pcb)) { - 8008194: 69f8 ldr r0, [r7, #28] - 8008196: f000 f887 bl 80082a8 - 800819a: 4603 mov r3, r0 - 800819c: 2b00 cmp r3, #0 - 800819e: d127 bne.n 80081f0 - goto aborted; - } - /* Try to send something out. */ - tcp_output(pcb); - 80081a0: 69f8 ldr r0, [r7, #28] - 80081a2: f002 f969 bl 800a478 - 80081a6: e024 b.n 80081f2 - goto aborted; - 80081a8: bf00 nop - 80081aa: e022 b.n 80081f2 -#endif /* TCP_INPUT_DEBUG */ - } - } - /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). - Below this line, 'pcb' may not be dereferenced! */ -aborted: - 80081ac: bf00 nop - 80081ae: e020 b.n 80081f2 - goto aborted; - 80081b0: bf00 nop - 80081b2: e01e b.n 80081f2 - goto aborted; - 80081b4: bf00 nop - 80081b6: e01c b.n 80081f2 - goto aborted; - 80081b8: bf00 nop - 80081ba: e01a b.n 80081f2 - goto aborted; - 80081bc: bf00 nop - 80081be: e018 b.n 80081f2 - 80081c0: 20006d7c .word 0x20006d7c - 80081c4: 20006d8c .word 0x20006d8c - 80081c8: 20006dac .word 0x20006dac - 80081cc: 20006da9 .word 0x20006da9 - 80081d0: 20006da4 .word 0x20006da4 - 80081d4: 20006da8 .word 0x20006da8 - 80081d8: 20006da6 .word 0x20006da6 - 80081dc: 20006db0 .word 0x20006db0 - 80081e0: 20006d70 .word 0x20006d70 - 80081e4: 08011640 .word 0x08011640 - 80081e8: 080117dc .word 0x080117dc - 80081ec: 08011684 .word 0x08011684 - goto aborted; - 80081f0: bf00 nop - tcp_input_pcb = NULL; - 80081f2: 4b24 ldr r3, [pc, #144] ; (8008284 ) - 80081f4: 2200 movs r2, #0 - 80081f6: 601a str r2, [r3, #0] - recv_data = NULL; - 80081f8: 4b23 ldr r3, [pc, #140] ; (8008288 ) - 80081fa: 2200 movs r2, #0 - 80081fc: 601a str r2, [r3, #0] - - /* give up our reference to inseg.p */ - if (inseg.p != NULL) - 80081fe: 4b23 ldr r3, [pc, #140] ; (800828c ) - 8008200: 685b ldr r3, [r3, #4] - 8008202: 2b00 cmp r3, #0 - 8008204: d039 beq.n 800827a - { - pbuf_free(inseg.p); - 8008206: 4b21 ldr r3, [pc, #132] ; (800828c ) - 8008208: 685b ldr r3, [r3, #4] - 800820a: 4618 mov r0, r3 - 800820c: f7fe f838 bl 8006280 - inseg.p = NULL; - 8008210: 4b1e ldr r3, [pc, #120] ; (800828c ) - 8008212: 2200 movs r2, #0 - 8008214: 605a str r2, [r3, #4] - pbuf_free(p); - } - - LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); - PERF_STOP("tcp_input"); - return; - 8008216: e030 b.n 800827a - if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { - 8008218: 4b1d ldr r3, [pc, #116] ; (8008290 ) - 800821a: 681b ldr r3, [r3, #0] - 800821c: 899b ldrh r3, [r3, #12] - 800821e: b29b uxth r3, r3 - 8008220: 4618 mov r0, r3 - 8008222: f7fc ff18 bl 8005056 - 8008226: 4603 mov r3, r0 - 8008228: f003 0304 and.w r3, r3, #4 - 800822c: 2b00 cmp r3, #0 - 800822e: d115 bne.n 800825c - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 8008230: 4b18 ldr r3, [pc, #96] ; (8008294 ) - 8008232: 6818 ldr r0, [r3, #0] - 8008234: 4b18 ldr r3, [pc, #96] ; (8008298 ) - 8008236: 881b ldrh r3, [r3, #0] - 8008238: 461a mov r2, r3 - 800823a: 4b18 ldr r3, [pc, #96] ; (800829c ) - 800823c: 681b ldr r3, [r3, #0] - 800823e: 18d1 adds r1, r2, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 8008240: 4b13 ldr r3, [pc, #76] ; (8008290 ) - 8008242: 681b ldr r3, [r3, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 8008244: 885b ldrh r3, [r3, #2] - 8008246: b29b uxth r3, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 8008248: 4a11 ldr r2, [pc, #68] ; (8008290 ) - 800824a: 6812 ldr r2, [r2, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 800824c: 8812 ldrh r2, [r2, #0] - 800824e: b292 uxth r2, r2 - 8008250: 9201 str r2, [sp, #4] - 8008252: 9300 str r3, [sp, #0] - 8008254: 4b12 ldr r3, [pc, #72] ; (80082a0 ) - 8008256: 4a13 ldr r2, [pc, #76] ; (80082a4 ) - 8008258: f002 fb92 bl 800a980 - pbuf_free(p); - 800825c: 6878 ldr r0, [r7, #4] - 800825e: f7fe f80f bl 8006280 - return; - 8008262: e00a b.n 800827a - goto dropped; - 8008264: bf00 nop - 8008266: e004 b.n 8008272 - goto dropped; - 8008268: bf00 nop - 800826a: e002 b.n 8008272 - goto dropped; - 800826c: bf00 nop - 800826e: e000 b.n 8008272 - goto dropped; - 8008270: bf00 nop -dropped: - TCP_STATS_INC(tcp.drop); - MIB2_STATS_INC(mib2.tcpinerrs); - pbuf_free(p); - 8008272: 6878 ldr r0, [r7, #4] - 8008274: f7fe f804 bl 8006280 - 8008278: e000 b.n 800827c - return; - 800827a: bf00 nop -} - 800827c: 3724 adds r7, #36 ; 0x24 - 800827e: 46bd mov sp, r7 - 8008280: bd90 pop {r4, r7, pc} - 8008282: bf00 nop - 8008284: 20006db0 .word 0x20006db0 - 8008288: 20006dac .word 0x20006dac - 800828c: 20006d7c .word 0x20006d7c - 8008290: 20006d8c .word 0x20006d8c - 8008294: 20006da0 .word 0x20006da0 - 8008298: 20006da6 .word 0x20006da6 - 800829c: 20006d9c .word 0x20006d9c - 80082a0: 200037f8 .word 0x200037f8 - 80082a4: 200037fc .word 0x200037fc - -080082a8 : - * any more. - * @returns 1 if the pcb has been closed and deallocated, 0 otherwise - */ -static int -tcp_input_delayed_close(struct tcp_pcb *pcb) -{ - 80082a8: b580 push {r7, lr} - 80082aa: b082 sub sp, #8 - 80082ac: af00 add r7, sp, #0 - 80082ae: 6078 str r0, [r7, #4] - if (recv_flags & TF_CLOSED) { - 80082b0: 4b14 ldr r3, [pc, #80] ; (8008304 ) - 80082b2: 781b ldrb r3, [r3, #0] - 80082b4: f003 0310 and.w r3, r3, #16 - 80082b8: 2b00 cmp r3, #0 - 80082ba: d01d beq.n 80082f8 - /* The connection has been closed and we will deallocate the - PCB. */ - if (!(pcb->flags & TF_RXCLOSED)) { - 80082bc: 687b ldr r3, [r7, #4] - 80082be: 7e9b ldrb r3, [r3, #26] - 80082c0: f003 0310 and.w r3, r3, #16 - 80082c4: 2b00 cmp r3, #0 - 80082c6: d10d bne.n 80082e4 - /* Connection closed although the application has only shut down the - tx side: call the PCB's err callback and indicate the closure to - ensure the application doesn't continue using the PCB. */ - TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD); - 80082c8: 687b ldr r3, [r7, #4] - 80082ca: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c - 80082ce: 2b00 cmp r3, #0 - 80082d0: d008 beq.n 80082e4 - 80082d2: 687b ldr r3, [r7, #4] - 80082d4: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c - 80082d8: 687a ldr r2, [r7, #4] - 80082da: 6912 ldr r2, [r2, #16] - 80082dc: f06f 010e mvn.w r1, #14 - 80082e0: 4610 mov r0, r2 - 80082e2: 4798 blx r3 - } - tcp_pcb_remove(&tcp_active_pcbs, pcb); - 80082e4: 6879 ldr r1, [r7, #4] - 80082e6: 4808 ldr r0, [pc, #32] ; (8008308 ) - 80082e8: f7ff fafe bl 80078e8 - memp_free(MEMP_TCP_PCB, pcb); - 80082ec: 6879 ldr r1, [r7, #4] - 80082ee: 2001 movs r0, #1 - 80082f0: f7fd faa6 bl 8005840 - return 1; - 80082f4: 2301 movs r3, #1 - 80082f6: e000 b.n 80082fa - } - return 0; - 80082f8: 2300 movs r3, #0 -} - 80082fa: 4618 mov r0, r3 - 80082fc: 3708 adds r7, #8 - 80082fe: 46bd mov sp, r7 - 8008300: bd80 pop {r7, pc} - 8008302: bf00 nop - 8008304: 20006da9 .word 0x20006da9 - 8008308: 20006d70 .word 0x20006d70 - -0800830c : - * @note the segment which arrived is saved in global variables, therefore only the pcb - * involved is passed as a parameter to this function - */ -static void -tcp_listen_input(struct tcp_pcb_listen *pcb) -{ - 800830c: b580 push {r7, lr} - 800830e: b088 sub sp, #32 - 8008310: af02 add r7, sp, #8 - 8008312: 6078 str r0, [r7, #4] - struct tcp_pcb *npcb; - u32_t iss; - err_t rc; - - if (flags & TCP_RST) { - 8008314: 4b63 ldr r3, [pc, #396] ; (80084a4 ) - 8008316: 781b ldrb r3, [r3, #0] - 8008318: f003 0304 and.w r3, r3, #4 - 800831c: 2b00 cmp r3, #0 - 800831e: f040 80bb bne.w 8008498 - return; - } - - /* In the LISTEN state, we check for incoming SYN segments, - creates a new PCB, and responds with a SYN|ACK. */ - if (flags & TCP_ACK) { - 8008322: 4b60 ldr r3, [pc, #384] ; (80084a4 ) - 8008324: 781b ldrb r3, [r3, #0] - 8008326: f003 0310 and.w r3, r3, #16 - 800832a: 2b00 cmp r3, #0 - 800832c: d016 beq.n 800835c - /* For incoming segments with the ACK flag set, respond with a - RST. */ - LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n")); - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 800832e: 4b5e ldr r3, [pc, #376] ; (80084a8 ) - 8008330: 6818 ldr r0, [r3, #0] - 8008332: 4b5e ldr r3, [pc, #376] ; (80084ac ) - 8008334: 881b ldrh r3, [r3, #0] - 8008336: 461a mov r2, r3 - 8008338: 4b5d ldr r3, [pc, #372] ; (80084b0 ) - 800833a: 681b ldr r3, [r3, #0] - 800833c: 18d1 adds r1, r2, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 800833e: 4b5d ldr r3, [pc, #372] ; (80084b4 ) - 8008340: 681b ldr r3, [r3, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 8008342: 885b ldrh r3, [r3, #2] - 8008344: b29b uxth r3, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 8008346: 4a5b ldr r2, [pc, #364] ; (80084b4 ) - 8008348: 6812 ldr r2, [r2, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 800834a: 8812 ldrh r2, [r2, #0] - 800834c: b292 uxth r2, r2 - 800834e: 9201 str r2, [sp, #4] - 8008350: 9300 str r3, [sp, #0] - 8008352: 4b59 ldr r3, [pc, #356] ; (80084b8 ) - 8008354: 4a59 ldr r2, [pc, #356] ; (80084bc ) - 8008356: f002 fb13 bl 800a980 - tcp_abandon(npcb, 0); - return; - } - tcp_output(npcb); - } - return; - 800835a: e09f b.n 800849c - } else if (flags & TCP_SYN) { - 800835c: 4b51 ldr r3, [pc, #324] ; (80084a4 ) - 800835e: 781b ldrb r3, [r3, #0] - 8008360: f003 0302 and.w r3, r3, #2 - 8008364: 2b00 cmp r3, #0 - 8008366: f000 8099 beq.w 800849c - npcb = tcp_alloc(pcb->prio); - 800836a: 687b ldr r3, [r7, #4] - 800836c: 7d5b ldrb r3, [r3, #21] - 800836e: 4618 mov r0, r3 - 8008370: f7ff f9f6 bl 8007760 - 8008374: 6178 str r0, [r7, #20] - if (npcb == NULL) { - 8008376: 697b ldr r3, [r7, #20] - 8008378: 2b00 cmp r3, #0 - 800837a: d111 bne.n 80083a0 - TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); - 800837c: 687b ldr r3, [r7, #4] - 800837e: 699b ldr r3, [r3, #24] - 8008380: 2b00 cmp r3, #0 - 8008382: d00a beq.n 800839a - 8008384: 687b ldr r3, [r7, #4] - 8008386: 699b ldr r3, [r3, #24] - 8008388: 687a ldr r2, [r7, #4] - 800838a: 6910 ldr r0, [r2, #16] - 800838c: f04f 32ff mov.w r2, #4294967295 - 8008390: 2100 movs r1, #0 - 8008392: 4798 blx r3 - 8008394: 4603 mov r3, r0 - 8008396: 73bb strb r3, [r7, #14] - return; - 8008398: e081 b.n 800849e - TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); - 800839a: 23f0 movs r3, #240 ; 0xf0 - 800839c: 73bb strb r3, [r7, #14] - return; - 800839e: e07e b.n 800849e - ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); - 80083a0: 4b47 ldr r3, [pc, #284] ; (80084c0 ) - 80083a2: 695a ldr r2, [r3, #20] - 80083a4: 697b ldr r3, [r7, #20] - 80083a6: 601a str r2, [r3, #0] - ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); - 80083a8: 4b45 ldr r3, [pc, #276] ; (80084c0 ) - 80083aa: 691a ldr r2, [r3, #16] - 80083ac: 697b ldr r3, [r7, #20] - 80083ae: 605a str r2, [r3, #4] - npcb->local_port = pcb->local_port; - 80083b0: 687b ldr r3, [r7, #4] - 80083b2: 8ada ldrh r2, [r3, #22] - 80083b4: 697b ldr r3, [r7, #20] - 80083b6: 82da strh r2, [r3, #22] - npcb->remote_port = tcphdr->src; - 80083b8: 4b3e ldr r3, [pc, #248] ; (80084b4 ) - 80083ba: 681b ldr r3, [r3, #0] - 80083bc: 881b ldrh r3, [r3, #0] - 80083be: b29a uxth r2, r3 - 80083c0: 697b ldr r3, [r7, #20] - 80083c2: 831a strh r2, [r3, #24] - npcb->state = SYN_RCVD; - 80083c4: 697b ldr r3, [r7, #20] - 80083c6: 2203 movs r2, #3 - 80083c8: 751a strb r2, [r3, #20] - npcb->rcv_nxt = seqno + 1; - 80083ca: 4b39 ldr r3, [pc, #228] ; (80084b0 ) - 80083cc: 681b ldr r3, [r3, #0] - 80083ce: 1c5a adds r2, r3, #1 - 80083d0: 697b ldr r3, [r7, #20] - 80083d2: 625a str r2, [r3, #36] ; 0x24 - npcb->rcv_ann_right_edge = npcb->rcv_nxt; - 80083d4: 697b ldr r3, [r7, #20] - 80083d6: 6a5a ldr r2, [r3, #36] ; 0x24 - 80083d8: 697b ldr r3, [r7, #20] - 80083da: 62da str r2, [r3, #44] ; 0x2c - iss = tcp_next_iss(npcb); - 80083dc: 6978 ldr r0, [r7, #20] - 80083de: f7ff faff bl 80079e0 - 80083e2: 6138 str r0, [r7, #16] - npcb->snd_wl2 = iss; - 80083e4: 697b ldr r3, [r7, #20] - 80083e6: 693a ldr r2, [r7, #16] - 80083e8: 655a str r2, [r3, #84] ; 0x54 - npcb->snd_nxt = iss; - 80083ea: 697b ldr r3, [r7, #20] - 80083ec: 693a ldr r2, [r7, #16] - 80083ee: 64da str r2, [r3, #76] ; 0x4c - npcb->lastack = iss; - 80083f0: 697b ldr r3, [r7, #20] - 80083f2: 693a ldr r2, [r7, #16] - 80083f4: 645a str r2, [r3, #68] ; 0x44 - npcb->snd_lbb = iss; - 80083f6: 697b ldr r3, [r7, #20] - 80083f8: 693a ldr r2, [r7, #16] - 80083fa: 659a str r2, [r3, #88] ; 0x58 - npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ - 80083fc: 4b2c ldr r3, [pc, #176] ; (80084b0 ) - 80083fe: 681b ldr r3, [r3, #0] - 8008400: 1e5a subs r2, r3, #1 - 8008402: 697b ldr r3, [r7, #20] - 8008404: 651a str r2, [r3, #80] ; 0x50 - npcb->callback_arg = pcb->callback_arg; - 8008406: 687b ldr r3, [r7, #4] - 8008408: 691a ldr r2, [r3, #16] - 800840a: 697b ldr r3, [r7, #20] - 800840c: 611a str r2, [r3, #16] - npcb->listener = pcb; - 800840e: 697b ldr r3, [r7, #20] - 8008410: 687a ldr r2, [r7, #4] - 8008412: 679a str r2, [r3, #120] ; 0x78 - npcb->so_options = pcb->so_options & SOF_INHERITED; - 8008414: 687b ldr r3, [r7, #4] - 8008416: 7a1b ldrb r3, [r3, #8] - 8008418: f003 030c and.w r3, r3, #12 - 800841c: b2da uxtb r2, r3 - 800841e: 697b ldr r3, [r7, #20] - 8008420: 721a strb r2, [r3, #8] - TCP_REG_ACTIVE(npcb); - 8008422: 4b28 ldr r3, [pc, #160] ; (80084c4 ) - 8008424: 681a ldr r2, [r3, #0] - 8008426: 697b ldr r3, [r7, #20] - 8008428: 60da str r2, [r3, #12] - 800842a: 4a26 ldr r2, [pc, #152] ; (80084c4 ) - 800842c: 697b ldr r3, [r7, #20] - 800842e: 6013 str r3, [r2, #0] - 8008430: f002 fcee bl 800ae10 - 8008434: 4b24 ldr r3, [pc, #144] ; (80084c8 ) - 8008436: 2201 movs r2, #1 - 8008438: 701a strb r2, [r3, #0] - tcp_parseopt(npcb); - 800843a: 6978 ldr r0, [r7, #20] - 800843c: f001 fd0c bl 8009e58 - npcb->snd_wnd = tcphdr->wnd; - 8008440: 4b1c ldr r3, [pc, #112] ; (80084b4 ) - 8008442: 681b ldr r3, [r3, #0] - 8008444: 89db ldrh r3, [r3, #14] - 8008446: b29a uxth r2, r3 - 8008448: 697b ldr r3, [r7, #20] - 800844a: f8a3 205c strh.w r2, [r3, #92] ; 0x5c - npcb->snd_wnd_max = npcb->snd_wnd; - 800844e: 697b ldr r3, [r7, #20] - 8008450: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c - 8008454: 697b ldr r3, [r7, #20] - 8008456: f8a3 205e strh.w r2, [r3, #94] ; 0x5e - npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); - 800845a: 697b ldr r3, [r7, #20] - 800845c: 8e5a ldrh r2, [r3, #50] ; 0x32 - 800845e: 697b ldr r3, [r7, #20] - 8008460: 3304 adds r3, #4 - 8008462: 4619 mov r1, r3 - 8008464: 4610 mov r0, r2 - 8008466: f7ff fad1 bl 8007a0c - 800846a: 4603 mov r3, r0 - 800846c: 461a mov r2, r3 - 800846e: 697b ldr r3, [r7, #20] - 8008470: 865a strh r2, [r3, #50] ; 0x32 - rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); - 8008472: 2112 movs r1, #18 - 8008474: 6978 ldr r0, [r7, #20] - 8008476: f001 fea7 bl 800a1c8 - 800847a: 4603 mov r3, r0 - 800847c: 73fb strb r3, [r7, #15] - if (rc != ERR_OK) { - 800847e: f997 300f ldrsb.w r3, [r7, #15] - 8008482: 2b00 cmp r3, #0 - 8008484: d004 beq.n 8008490 - tcp_abandon(npcb, 0); - 8008486: 2100 movs r1, #0 - 8008488: 6978 ldr r0, [r7, #20] - 800848a: f7fe fb4d bl 8006b28 - return; - 800848e: e006 b.n 800849e - tcp_output(npcb); - 8008490: 6978 ldr r0, [r7, #20] - 8008492: f001 fff1 bl 800a478 - return; - 8008496: e001 b.n 800849c - return; - 8008498: bf00 nop - 800849a: e000 b.n 800849e - return; - 800849c: bf00 nop -} - 800849e: 3718 adds r7, #24 - 80084a0: 46bd mov sp, r7 - 80084a2: bd80 pop {r7, pc} - 80084a4: 20006da8 .word 0x20006da8 - 80084a8: 20006da0 .word 0x20006da0 - 80084ac: 20006da6 .word 0x20006da6 - 80084b0: 20006d9c .word 0x20006d9c - 80084b4: 20006d8c .word 0x20006d8c - 80084b8: 200037f8 .word 0x200037f8 - 80084bc: 200037fc .word 0x200037fc - 80084c0: 200037e8 .word 0x200037e8 - 80084c4: 20006d70 .word 0x20006d70 - 80084c8: 20006d78 .word 0x20006d78 - -080084cc : - * @note the segment which arrived is saved in global variables, therefore only the pcb - * involved is passed as a parameter to this function - */ -static void -tcp_timewait_input(struct tcp_pcb *pcb) -{ - 80084cc: b580 push {r7, lr} - 80084ce: b084 sub sp, #16 - 80084d0: af02 add r7, sp, #8 - 80084d2: 6078 str r0, [r7, #4] - /* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */ - /* RFC 793 3.9 Event Processing - Segment Arrives: - * - first check sequence number - we skip that one in TIME_WAIT (always - * acceptable since we only send ACKs) - * - second check the RST bit (... return) */ - if (flags & TCP_RST) { - 80084d4: 4b29 ldr r3, [pc, #164] ; (800857c ) - 80084d6: 781b ldrb r3, [r3, #0] - 80084d8: f003 0304 and.w r3, r3, #4 - 80084dc: 2b00 cmp r3, #0 - 80084de: d146 bne.n 800856e - return; - } - /* - fourth, check the SYN bit, */ - if (flags & TCP_SYN) { - 80084e0: 4b26 ldr r3, [pc, #152] ; (800857c ) - 80084e2: 781b ldrb r3, [r3, #0] - 80084e4: f003 0302 and.w r3, r3, #2 - 80084e8: 2b00 cmp r3, #0 - 80084ea: d027 beq.n 800853c - /* If an incoming segment is not acceptable, an acknowledgment - should be sent in reply */ - if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) { - 80084ec: 4b24 ldr r3, [pc, #144] ; (8008580 ) - 80084ee: 681a ldr r2, [r3, #0] - 80084f0: 687b ldr r3, [r7, #4] - 80084f2: 6a5b ldr r3, [r3, #36] ; 0x24 - 80084f4: 1ad3 subs r3, r2, r3 - 80084f6: 2b00 cmp r3, #0 - 80084f8: db2a blt.n 8008550 - 80084fa: 4b21 ldr r3, [pc, #132] ; (8008580 ) - 80084fc: 681a ldr r2, [r3, #0] - 80084fe: 687b ldr r3, [r7, #4] - 8008500: 6a5b ldr r3, [r3, #36] ; 0x24 - 8008502: 6879 ldr r1, [r7, #4] - 8008504: 8d09 ldrh r1, [r1, #40] ; 0x28 - 8008506: 440b add r3, r1 - 8008508: 1ad3 subs r3, r2, r3 - 800850a: 2b00 cmp r3, #0 - 800850c: dc20 bgt.n 8008550 - /* If the SYN is in the window it is an error, send a reset */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 800850e: 4b1d ldr r3, [pc, #116] ; (8008584 ) - 8008510: 6818 ldr r0, [r3, #0] - 8008512: 4b1d ldr r3, [pc, #116] ; (8008588 ) - 8008514: 881b ldrh r3, [r3, #0] - 8008516: 461a mov r2, r3 - 8008518: 4b19 ldr r3, [pc, #100] ; (8008580 ) - 800851a: 681b ldr r3, [r3, #0] - 800851c: 18d1 adds r1, r2, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 800851e: 4b1b ldr r3, [pc, #108] ; (800858c ) - 8008520: 681b ldr r3, [r3, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 8008522: 885b ldrh r3, [r3, #2] - 8008524: b29b uxth r3, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 8008526: 4a19 ldr r2, [pc, #100] ; (800858c ) - 8008528: 6812 ldr r2, [r2, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 800852a: 8812 ldrh r2, [r2, #0] - 800852c: b292 uxth r2, r2 - 800852e: 9201 str r2, [sp, #4] - 8008530: 9300 str r3, [sp, #0] - 8008532: 4b17 ldr r3, [pc, #92] ; (8008590 ) - 8008534: 4a17 ldr r2, [pc, #92] ; (8008594 ) - 8008536: f002 fa23 bl 800a980 - return; - 800853a: e01b b.n 8008574 - } - } else if (flags & TCP_FIN) { - 800853c: 4b0f ldr r3, [pc, #60] ; (800857c ) - 800853e: 781b ldrb r3, [r3, #0] - 8008540: f003 0301 and.w r3, r3, #1 - 8008544: 2b00 cmp r3, #0 - 8008546: d003 beq.n 8008550 - /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. - Restart the 2 MSL time-wait timeout.*/ - pcb->tmr = tcp_ticks; - 8008548: 4b13 ldr r3, [pc, #76] ; (8008598 ) - 800854a: 681a ldr r2, [r3, #0] - 800854c: 687b ldr r3, [r7, #4] - 800854e: 621a str r2, [r3, #32] - } - - if ((tcplen > 0)) { - 8008550: 4b0d ldr r3, [pc, #52] ; (8008588 ) - 8008552: 881b ldrh r3, [r3, #0] - 8008554: 2b00 cmp r3, #0 - 8008556: d00c beq.n 8008572 - /* Acknowledge data, FIN or out-of-window SYN */ - pcb->flags |= TF_ACK_NOW; - 8008558: 687b ldr r3, [r7, #4] - 800855a: 7e9b ldrb r3, [r3, #26] - 800855c: f043 0302 orr.w r3, r3, #2 - 8008560: b2da uxtb r2, r3 - 8008562: 687b ldr r3, [r7, #4] - 8008564: 769a strb r2, [r3, #26] - tcp_output(pcb); - 8008566: 6878 ldr r0, [r7, #4] - 8008568: f001 ff86 bl 800a478 - } - return; - 800856c: e001 b.n 8008572 - return; - 800856e: bf00 nop - 8008570: e000 b.n 8008574 - return; - 8008572: bf00 nop -} - 8008574: 3708 adds r7, #8 - 8008576: 46bd mov sp, r7 - 8008578: bd80 pop {r7, pc} - 800857a: bf00 nop - 800857c: 20006da8 .word 0x20006da8 - 8008580: 20006d9c .word 0x20006d9c - 8008584: 20006da0 .word 0x20006da0 - 8008588: 20006da6 .word 0x20006da6 - 800858c: 20006d8c .word 0x20006d8c - 8008590: 200037f8 .word 0x200037f8 - 8008594: 200037fc .word 0x200037fc - 8008598: 20006d64 .word 0x20006d64 - -0800859c : - * @note the segment which arrived is saved in global variables, therefore only the pcb - * involved is passed as a parameter to this function - */ -static err_t -tcp_process(struct tcp_pcb *pcb) -{ - 800859c: b580 push {r7, lr} - 800859e: b08a sub sp, #40 ; 0x28 - 80085a0: af02 add r7, sp, #8 - 80085a2: 6078 str r0, [r7, #4] - struct tcp_seg *rseg; - u8_t acceptable = 0; - 80085a4: 2300 movs r3, #0 - 80085a6: 76fb strb r3, [r7, #27] - err_t err; - - err = ERR_OK; - 80085a8: 2300 movs r3, #0 - 80085aa: 76bb strb r3, [r7, #26] - - /* Process incoming RST segments. */ - if (flags & TCP_RST) { - 80085ac: 4b93 ldr r3, [pc, #588] ; (80087fc ) - 80085ae: 781b ldrb r3, [r3, #0] - 80085b0: f003 0304 and.w r3, r3, #4 - 80085b4: 2b00 cmp r3, #0 - 80085b6: d04e beq.n 8008656 - /* First, determine if the reset is acceptable. */ - if (pcb->state == SYN_SENT) { - 80085b8: 687b ldr r3, [r7, #4] - 80085ba: 7d1b ldrb r3, [r3, #20] - 80085bc: 2b02 cmp r3, #2 - 80085be: d108 bne.n 80085d2 - /* "In the SYN-SENT state (a RST received in response to an initial SYN), - the RST is acceptable if the ACK field acknowledges the SYN." */ - if (ackno == pcb->snd_nxt) { - 80085c0: 687b ldr r3, [r7, #4] - 80085c2: 6cda ldr r2, [r3, #76] ; 0x4c - 80085c4: 4b8e ldr r3, [pc, #568] ; (8008800 ) - 80085c6: 681b ldr r3, [r3, #0] - 80085c8: 429a cmp r2, r3 - 80085ca: d123 bne.n 8008614 - acceptable = 1; - 80085cc: 2301 movs r3, #1 - 80085ce: 76fb strb r3, [r7, #27] - 80085d0: e020 b.n 8008614 - } - } else { - /* "In all states except SYN-SENT, all reset (RST) segments are validated - by checking their SEQ-fields." */ - if (seqno == pcb->rcv_nxt) { - 80085d2: 687b ldr r3, [r7, #4] - 80085d4: 6a5a ldr r2, [r3, #36] ; 0x24 - 80085d6: 4b8b ldr r3, [pc, #556] ; (8008804 ) - 80085d8: 681b ldr r3, [r3, #0] - 80085da: 429a cmp r2, r3 - 80085dc: d102 bne.n 80085e4 - acceptable = 1; - 80085de: 2301 movs r3, #1 - 80085e0: 76fb strb r3, [r7, #27] - 80085e2: e017 b.n 8008614 - } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, - 80085e4: 4b87 ldr r3, [pc, #540] ; (8008804 ) - 80085e6: 681a ldr r2, [r3, #0] - 80085e8: 687b ldr r3, [r7, #4] - 80085ea: 6a5b ldr r3, [r3, #36] ; 0x24 - 80085ec: 1ad3 subs r3, r2, r3 - 80085ee: 2b00 cmp r3, #0 - 80085f0: db10 blt.n 8008614 - 80085f2: 4b84 ldr r3, [pc, #528] ; (8008804 ) - 80085f4: 681a ldr r2, [r3, #0] - 80085f6: 687b ldr r3, [r7, #4] - 80085f8: 6a5b ldr r3, [r3, #36] ; 0x24 - 80085fa: 6879 ldr r1, [r7, #4] - 80085fc: 8d09 ldrh r1, [r1, #40] ; 0x28 - 80085fe: 440b add r3, r1 - 8008600: 1ad3 subs r3, r2, r3 - 8008602: 2b00 cmp r3, #0 - 8008604: dc06 bgt.n 8008614 - pcb->rcv_nxt + pcb->rcv_wnd)) { - /* If the sequence number is inside the window, we only send an ACK - and wait for a re-send with matching sequence number. - This violates RFC 793, but is required to protection against - CVE-2004-0230 (RST spoofing attack). */ - tcp_ack_now(pcb); - 8008606: 687b ldr r3, [r7, #4] - 8008608: 7e9b ldrb r3, [r3, #26] - 800860a: f043 0302 orr.w r3, r3, #2 - 800860e: b2da uxtb r2, r3 - 8008610: 687b ldr r3, [r7, #4] - 8008612: 769a strb r2, [r3, #26] - } - } - - if (acceptable) { - 8008614: 7efb ldrb r3, [r7, #27] - 8008616: 2b00 cmp r3, #0 - 8008618: d01b beq.n 8008652 - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); - LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); - 800861a: 687b ldr r3, [r7, #4] - 800861c: 7d1b ldrb r3, [r3, #20] - 800861e: 2b00 cmp r3, #0 - 8008620: d106 bne.n 8008630 - 8008622: 4b79 ldr r3, [pc, #484] ; (8008808 ) - 8008624: f240 22e7 movw r2, #743 ; 0x2e7 - 8008628: 4978 ldr r1, [pc, #480] ; (800880c ) - 800862a: 4879 ldr r0, [pc, #484] ; (8008810 ) - 800862c: f007 fa4a bl 800fac4 - recv_flags |= TF_RESET; - 8008630: 4b78 ldr r3, [pc, #480] ; (8008814 ) - 8008632: 781b ldrb r3, [r3, #0] - 8008634: f043 0308 orr.w r3, r3, #8 - 8008638: b2da uxtb r2, r3 - 800863a: 4b76 ldr r3, [pc, #472] ; (8008814 ) - 800863c: 701a strb r2, [r3, #0] - pcb->flags &= ~TF_ACK_DELAY; - 800863e: 687b ldr r3, [r7, #4] - 8008640: 7e9b ldrb r3, [r3, #26] - 8008642: f023 0301 bic.w r3, r3, #1 - 8008646: b2da uxtb r2, r3 - 8008648: 687b ldr r3, [r7, #4] - 800864a: 769a strb r2, [r3, #26] - return ERR_RST; - 800864c: f06f 030d mvn.w r3, #13 - 8008650: e348 b.n 8008ce4 - } else { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", - seqno, pcb->rcv_nxt)); - LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", - seqno, pcb->rcv_nxt)); - return ERR_OK; - 8008652: 2300 movs r3, #0 - 8008654: e346 b.n 8008ce4 - } - } - - if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { - 8008656: 4b69 ldr r3, [pc, #420] ; (80087fc ) - 8008658: 781b ldrb r3, [r3, #0] - 800865a: f003 0302 and.w r3, r3, #2 - 800865e: 2b00 cmp r3, #0 - 8008660: d010 beq.n 8008684 - 8008662: 687b ldr r3, [r7, #4] - 8008664: 7d1b ldrb r3, [r3, #20] - 8008666: 2b02 cmp r3, #2 - 8008668: d00c beq.n 8008684 - 800866a: 687b ldr r3, [r7, #4] - 800866c: 7d1b ldrb r3, [r3, #20] - 800866e: 2b03 cmp r3, #3 - 8008670: d008 beq.n 8008684 - /* Cope with new connection attempt after remote end crashed */ - tcp_ack_now(pcb); - 8008672: 687b ldr r3, [r7, #4] - 8008674: 7e9b ldrb r3, [r3, #26] - 8008676: f043 0302 orr.w r3, r3, #2 - 800867a: b2da uxtb r2, r3 - 800867c: 687b ldr r3, [r7, #4] - 800867e: 769a strb r2, [r3, #26] - return ERR_OK; - 8008680: 2300 movs r3, #0 - 8008682: e32f b.n 8008ce4 - } - - if ((pcb->flags & TF_RXCLOSED) == 0) { - 8008684: 687b ldr r3, [r7, #4] - 8008686: 7e9b ldrb r3, [r3, #26] - 8008688: f003 0310 and.w r3, r3, #16 - 800868c: 2b00 cmp r3, #0 - 800868e: d103 bne.n 8008698 - /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ - pcb->tmr = tcp_ticks; - 8008690: 4b61 ldr r3, [pc, #388] ; (8008818 ) - 8008692: 681a ldr r2, [r3, #0] - 8008694: 687b ldr r3, [r7, #4] - 8008696: 621a str r2, [r3, #32] - } - pcb->keep_cnt_sent = 0; - 8008698: 687b ldr r3, [r7, #4] - 800869a: 2200 movs r2, #0 - 800869c: f883 2096 strb.w r2, [r3, #150] ; 0x96 - - tcp_parseopt(pcb); - 80086a0: 6878 ldr r0, [r7, #4] - 80086a2: f001 fbd9 bl 8009e58 - - /* Do different things depending on the TCP state. */ - switch (pcb->state) { - 80086a6: 687b ldr r3, [r7, #4] - 80086a8: 7d1b ldrb r3, [r3, #20] - 80086aa: 3b02 subs r3, #2 - 80086ac: 2b07 cmp r3, #7 - 80086ae: f200 8309 bhi.w 8008cc4 - 80086b2: a201 add r2, pc, #4 ; (adr r2, 80086b8 ) - 80086b4: f852 f023 ldr.w pc, [r2, r3, lsl #2] - 80086b8: 080086d9 .word 0x080086d9 - 80086bc: 080088cf .word 0x080088cf - 80086c0: 08008a27 .word 0x08008a27 - 80086c4: 08008a51 .word 0x08008a51 - 80086c8: 08008b73 .word 0x08008b73 - 80086cc: 08008a27 .word 0x08008a27 - 80086d0: 08008bff .word 0x08008bff - 80086d4: 08008c8f .word 0x08008c8f - case SYN_SENT: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, - pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno))); - /* received SYN ACK with expected sequence number? */ - if ((flags & TCP_ACK) && (flags & TCP_SYN) - 80086d8: 4b48 ldr r3, [pc, #288] ; (80087fc ) - 80086da: 781b ldrb r3, [r3, #0] - 80086dc: f003 0310 and.w r3, r3, #16 - 80086e0: 2b00 cmp r3, #0 - 80086e2: f000 80ca beq.w 800887a - 80086e6: 4b45 ldr r3, [pc, #276] ; (80087fc ) - 80086e8: 781b ldrb r3, [r3, #0] - 80086ea: f003 0302 and.w r3, r3, #2 - 80086ee: 2b00 cmp r3, #0 - 80086f0: f000 80c3 beq.w 800887a - && (ackno == pcb->lastack + 1)) { - 80086f4: 687b ldr r3, [r7, #4] - 80086f6: 6c5b ldr r3, [r3, #68] ; 0x44 - 80086f8: 1c5a adds r2, r3, #1 - 80086fa: 4b41 ldr r3, [pc, #260] ; (8008800 ) - 80086fc: 681b ldr r3, [r3, #0] - 80086fe: 429a cmp r2, r3 - 8008700: f040 80bb bne.w 800887a - pcb->rcv_nxt = seqno + 1; - 8008704: 4b3f ldr r3, [pc, #252] ; (8008804 ) - 8008706: 681b ldr r3, [r3, #0] - 8008708: 1c5a adds r2, r3, #1 - 800870a: 687b ldr r3, [r7, #4] - 800870c: 625a str r2, [r3, #36] ; 0x24 - pcb->rcv_ann_right_edge = pcb->rcv_nxt; - 800870e: 687b ldr r3, [r7, #4] - 8008710: 6a5a ldr r2, [r3, #36] ; 0x24 - 8008712: 687b ldr r3, [r7, #4] - 8008714: 62da str r2, [r3, #44] ; 0x2c - pcb->lastack = ackno; - 8008716: 4b3a ldr r3, [pc, #232] ; (8008800 ) - 8008718: 681a ldr r2, [r3, #0] - 800871a: 687b ldr r3, [r7, #4] - 800871c: 645a str r2, [r3, #68] ; 0x44 - pcb->snd_wnd = tcphdr->wnd; - 800871e: 4b3f ldr r3, [pc, #252] ; (800881c ) - 8008720: 681b ldr r3, [r3, #0] - 8008722: 89db ldrh r3, [r3, #14] - 8008724: b29a uxth r2, r3 - 8008726: 687b ldr r3, [r7, #4] - 8008728: f8a3 205c strh.w r2, [r3, #92] ; 0x5c - pcb->snd_wnd_max = pcb->snd_wnd; - 800872c: 687b ldr r3, [r7, #4] - 800872e: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c - 8008732: 687b ldr r3, [r7, #4] - 8008734: f8a3 205e strh.w r2, [r3, #94] ; 0x5e - pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ - 8008738: 4b32 ldr r3, [pc, #200] ; (8008804 ) - 800873a: 681b ldr r3, [r3, #0] - 800873c: 1e5a subs r2, r3, #1 - 800873e: 687b ldr r3, [r7, #4] - 8008740: 651a str r2, [r3, #80] ; 0x50 - pcb->state = ESTABLISHED; - 8008742: 687b ldr r3, [r7, #4] - 8008744: 2204 movs r2, #4 - 8008746: 751a strb r2, [r3, #20] - -#if TCP_CALCULATE_EFF_SEND_MSS - pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); - 8008748: 687b ldr r3, [r7, #4] - 800874a: 8e5a ldrh r2, [r3, #50] ; 0x32 - 800874c: 687b ldr r3, [r7, #4] - 800874e: 3304 adds r3, #4 - 8008750: 4619 mov r1, r3 - 8008752: 4610 mov r0, r2 - 8008754: f7ff f95a bl 8007a0c - 8008758: 4603 mov r3, r0 - 800875a: 461a mov r2, r3 - 800875c: 687b ldr r3, [r7, #4] - 800875e: 865a strh r2, [r3, #50] ; 0x32 -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - - pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); - 8008760: 687b ldr r3, [r7, #4] - 8008762: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8008764: 005b lsls r3, r3, #1 - 8008766: f241 121c movw r2, #4380 ; 0x111c - 800876a: 429a cmp r2, r3 - 800876c: bf38 it cc - 800876e: 461a movcc r2, r3 - 8008770: 687b ldr r3, [r7, #4] - 8008772: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8008774: 009b lsls r3, r3, #2 - 8008776: 4293 cmp r3, r2 - 8008778: bf28 it cs - 800877a: 4613 movcs r3, r2 - 800877c: b29a uxth r2, r3 - 800877e: 687b ldr r3, [r7, #4] - 8008780: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); - 8008784: 687b ldr r3, [r7, #4] - 8008786: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 800878a: 2b00 cmp r3, #0 - 800878c: d106 bne.n 800879c - 800878e: 4b1e ldr r3, [pc, #120] ; (8008808 ) - 8008790: f240 321a movw r2, #794 ; 0x31a - 8008794: 4922 ldr r1, [pc, #136] ; (8008820 ) - 8008796: 481e ldr r0, [pc, #120] ; (8008810 ) - 8008798: f007 f994 bl 800fac4 - --pcb->snd_queuelen; - 800879c: 687b ldr r3, [r7, #4] - 800879e: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 80087a2: 3b01 subs r3, #1 - 80087a4: b29a uxth r2, r3 - 80087a6: 687b ldr r3, [r7, #4] - 80087a8: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); - rseg = pcb->unacked; - 80087ac: 687b ldr r3, [r7, #4] - 80087ae: 6edb ldr r3, [r3, #108] ; 0x6c - 80087b0: 61fb str r3, [r7, #28] - if (rseg == NULL) { - 80087b2: 69fb ldr r3, [r7, #28] - 80087b4: 2b00 cmp r3, #0 - 80087b6: d111 bne.n 80087dc - /* might happen if tcp_output fails in tcp_rexmit_rto() - in which case the segment is on the unsent list */ - rseg = pcb->unsent; - 80087b8: 687b ldr r3, [r7, #4] - 80087ba: 6e9b ldr r3, [r3, #104] ; 0x68 - 80087bc: 61fb str r3, [r7, #28] - LWIP_ASSERT("no segment to free", rseg != NULL); - 80087be: 69fb ldr r3, [r7, #28] - 80087c0: 2b00 cmp r3, #0 - 80087c2: d106 bne.n 80087d2 - 80087c4: 4b10 ldr r3, [pc, #64] ; (8008808 ) - 80087c6: f240 3222 movw r2, #802 ; 0x322 - 80087ca: 4916 ldr r1, [pc, #88] ; (8008824 ) - 80087cc: 4810 ldr r0, [pc, #64] ; (8008810 ) - 80087ce: f007 f979 bl 800fac4 - pcb->unsent = rseg->next; - 80087d2: 69fb ldr r3, [r7, #28] - 80087d4: 681a ldr r2, [r3, #0] - 80087d6: 687b ldr r3, [r7, #4] - 80087d8: 669a str r2, [r3, #104] ; 0x68 - 80087da: e003 b.n 80087e4 - } else { - pcb->unacked = rseg->next; - 80087dc: 69fb ldr r3, [r7, #28] - 80087de: 681a ldr r2, [r3, #0] - 80087e0: 687b ldr r3, [r7, #4] - 80087e2: 66da str r2, [r3, #108] ; 0x6c - } - tcp_seg_free(rseg); - 80087e4: 69f8 ldr r0, [r7, #28] - 80087e6: f7fe fea9 bl 800753c - - /* If there's nothing left to acknowledge, stop the retransmit - timer, otherwise reset it to start again */ - if (pcb->unacked == NULL) { - 80087ea: 687b ldr r3, [r7, #4] - 80087ec: 6edb ldr r3, [r3, #108] ; 0x6c - 80087ee: 2b00 cmp r3, #0 - 80087f0: d11a bne.n 8008828 - pcb->rtime = -1; - 80087f2: 687b ldr r3, [r7, #4] - 80087f4: f64f 72ff movw r2, #65535 ; 0xffff - 80087f8: 861a strh r2, [r3, #48] ; 0x30 - 80087fa: e01c b.n 8008836 - 80087fc: 20006da8 .word 0x20006da8 - 8008800: 20006da0 .word 0x20006da0 - 8008804: 20006d9c .word 0x20006d9c - 8008808: 08011640 .word 0x08011640 - 800880c: 080117f8 .word 0x080117f8 - 8008810: 08011684 .word 0x08011684 - 8008814: 20006da9 .word 0x20006da9 - 8008818: 20006d64 .word 0x20006d64 - 800881c: 20006d8c .word 0x20006d8c - 8008820: 08011818 .word 0x08011818 - 8008824: 08011830 .word 0x08011830 - } else { - pcb->rtime = 0; - 8008828: 687b ldr r3, [r7, #4] - 800882a: 2200 movs r2, #0 - 800882c: 861a strh r2, [r3, #48] ; 0x30 - pcb->nrtx = 0; - 800882e: 687b ldr r3, [r7, #4] - 8008830: 2200 movs r2, #0 - 8008832: f883 2042 strb.w r2, [r3, #66] ; 0x42 - } - - /* Call the user specified function to call when successfully - * connected. */ - TCP_EVENT_CONNECTED(pcb, ERR_OK, err); - 8008836: 687b ldr r3, [r7, #4] - 8008838: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 - 800883c: 2b00 cmp r3, #0 - 800883e: d00a beq.n 8008856 - 8008840: 687b ldr r3, [r7, #4] - 8008842: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 - 8008846: 687a ldr r2, [r7, #4] - 8008848: 6910 ldr r0, [r2, #16] - 800884a: 2200 movs r2, #0 - 800884c: 6879 ldr r1, [r7, #4] - 800884e: 4798 blx r3 - 8008850: 4603 mov r3, r0 - 8008852: 76bb strb r3, [r7, #26] - 8008854: e001 b.n 800885a - 8008856: 2300 movs r3, #0 - 8008858: 76bb strb r3, [r7, #26] - if (err == ERR_ABRT) { - 800885a: f997 301a ldrsb.w r3, [r7, #26] - 800885e: f113 0f0d cmn.w r3, #13 - 8008862: d102 bne.n 800886a - return ERR_ABRT; - 8008864: f06f 030c mvn.w r3, #12 - 8008868: e23c b.n 8008ce4 - } - tcp_ack_now(pcb); - 800886a: 687b ldr r3, [r7, #4] - 800886c: 7e9b ldrb r3, [r3, #26] - 800886e: f043 0302 orr.w r3, r3, #2 - 8008872: b2da uxtb r2, r3 - 8008874: 687b ldr r3, [r7, #4] - 8008876: 769a strb r2, [r3, #26] - if (pcb->nrtx < TCP_SYNMAXRTX) { - pcb->rtime = 0; - tcp_rexmit_rto(pcb); - } - } - break; - 8008878: e226 b.n 8008cc8 - else if (flags & TCP_ACK) { - 800887a: 4b93 ldr r3, [pc, #588] ; (8008ac8 ) - 800887c: 781b ldrb r3, [r3, #0] - 800887e: f003 0310 and.w r3, r3, #16 - 8008882: 2b00 cmp r3, #0 - 8008884: f000 8220 beq.w 8008cc8 - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 8008888: 4b90 ldr r3, [pc, #576] ; (8008acc ) - 800888a: 6818 ldr r0, [r3, #0] - 800888c: 4b90 ldr r3, [pc, #576] ; (8008ad0 ) - 800888e: 881b ldrh r3, [r3, #0] - 8008890: 461a mov r2, r3 - 8008892: 4b90 ldr r3, [pc, #576] ; (8008ad4 ) - 8008894: 681b ldr r3, [r3, #0] - 8008896: 18d1 adds r1, r2, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 8008898: 4b8f ldr r3, [pc, #572] ; (8008ad8 ) - 800889a: 681b ldr r3, [r3, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 800889c: 885b ldrh r3, [r3, #2] - 800889e: b29b uxth r3, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 80088a0: 4a8d ldr r2, [pc, #564] ; (8008ad8 ) - 80088a2: 6812 ldr r2, [r2, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 80088a4: 8812 ldrh r2, [r2, #0] - 80088a6: b292 uxth r2, r2 - 80088a8: 9201 str r2, [sp, #4] - 80088aa: 9300 str r3, [sp, #0] - 80088ac: 4b8b ldr r3, [pc, #556] ; (8008adc ) - 80088ae: 4a8c ldr r2, [pc, #560] ; (8008ae0 ) - 80088b0: f002 f866 bl 800a980 - if (pcb->nrtx < TCP_SYNMAXRTX) { - 80088b4: 687b ldr r3, [r7, #4] - 80088b6: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 80088ba: 2b05 cmp r3, #5 - 80088bc: f200 8204 bhi.w 8008cc8 - pcb->rtime = 0; - 80088c0: 687b ldr r3, [r7, #4] - 80088c2: 2200 movs r2, #0 - 80088c4: 861a strh r2, [r3, #48] ; 0x30 - tcp_rexmit_rto(pcb); - 80088c6: 6878 ldr r0, [r7, #4] - 80088c8: f002 f8d0 bl 800aa6c - break; - 80088cc: e1fc b.n 8008cc8 - case SYN_RCVD: - if (flags & TCP_ACK) { - 80088ce: 4b7e ldr r3, [pc, #504] ; (8008ac8 ) - 80088d0: 781b ldrb r3, [r3, #0] - 80088d2: f003 0310 and.w r3, r3, #16 - 80088d6: 2b00 cmp r3, #0 - 80088d8: f000 8091 beq.w 80089fe - /* expected ACK number? */ - if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { - 80088dc: 4b7b ldr r3, [pc, #492] ; (8008acc ) - 80088de: 681a ldr r2, [r3, #0] - 80088e0: 687b ldr r3, [r7, #4] - 80088e2: 6c5b ldr r3, [r3, #68] ; 0x44 - 80088e4: 1ad3 subs r3, r2, r3 - 80088e6: 3b01 subs r3, #1 - 80088e8: 2b00 cmp r3, #0 - 80088ea: db71 blt.n 80089d0 - 80088ec: 4b77 ldr r3, [pc, #476] ; (8008acc ) - 80088ee: 681a ldr r2, [r3, #0] - 80088f0: 687b ldr r3, [r7, #4] - 80088f2: 6cdb ldr r3, [r3, #76] ; 0x4c - 80088f4: 1ad3 subs r3, r2, r3 - 80088f6: 2b00 cmp r3, #0 - 80088f8: dc6a bgt.n 80089d0 - pcb->state = ESTABLISHED; - 80088fa: 687b ldr r3, [r7, #4] - 80088fc: 2204 movs r2, #4 - 80088fe: 751a strb r2, [r3, #20] - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG -#if LWIP_CALLBACK_API - LWIP_ASSERT("pcb->listener->accept != NULL", - 8008900: 687b ldr r3, [r7, #4] - 8008902: 6f9b ldr r3, [r3, #120] ; 0x78 - 8008904: 2b00 cmp r3, #0 - 8008906: d00b beq.n 8008920 - 8008908: 687b ldr r3, [r7, #4] - 800890a: 6f9b ldr r3, [r3, #120] ; 0x78 - 800890c: 699b ldr r3, [r3, #24] - 800890e: 2b00 cmp r3, #0 - 8008910: d106 bne.n 8008920 - 8008912: 4b74 ldr r3, [pc, #464] ; (8008ae4 ) - 8008914: f44f 7254 mov.w r2, #848 ; 0x350 - 8008918: 4973 ldr r1, [pc, #460] ; (8008ae8 ) - 800891a: 4874 ldr r0, [pc, #464] ; (8008aec ) - 800891c: f007 f8d2 bl 800fac4 - (pcb->listener == NULL) || (pcb->listener->accept != NULL)); -#endif - if (pcb->listener == NULL) { - 8008920: 687b ldr r3, [r7, #4] - 8008922: 6f9b ldr r3, [r3, #120] ; 0x78 - 8008924: 2b00 cmp r3, #0 - 8008926: d102 bne.n 800892e - /* listen pcb might be closed by now */ - err = ERR_VAL; - 8008928: 23fa movs r3, #250 ; 0xfa - 800892a: 76bb strb r3, [r7, #26] - 800892c: e011 b.n 8008952 - } else -#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ - { - tcp_backlog_accepted(pcb); - /* Call the accept function. */ - TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); - 800892e: 687b ldr r3, [r7, #4] - 8008930: 6f9b ldr r3, [r3, #120] ; 0x78 - 8008932: 699b ldr r3, [r3, #24] - 8008934: 2b00 cmp r3, #0 - 8008936: d00a beq.n 800894e - 8008938: 687b ldr r3, [r7, #4] - 800893a: 6f9b ldr r3, [r3, #120] ; 0x78 - 800893c: 699b ldr r3, [r3, #24] - 800893e: 687a ldr r2, [r7, #4] - 8008940: 6910 ldr r0, [r2, #16] - 8008942: 2200 movs r2, #0 - 8008944: 6879 ldr r1, [r7, #4] - 8008946: 4798 blx r3 - 8008948: 4603 mov r3, r0 - 800894a: 76bb strb r3, [r7, #26] - 800894c: e001 b.n 8008952 - 800894e: 23f0 movs r3, #240 ; 0xf0 - 8008950: 76bb strb r3, [r7, #26] - } - if (err != ERR_OK) { - 8008952: f997 301a ldrsb.w r3, [r7, #26] - 8008956: 2b00 cmp r3, #0 - 8008958: d00a beq.n 8008970 - /* If the accept function returns with an error, we abort - * the connection. */ - /* Already aborted? */ - if (err != ERR_ABRT) { - 800895a: f997 301a ldrsb.w r3, [r7, #26] - 800895e: f113 0f0d cmn.w r3, #13 - 8008962: d002 beq.n 800896a - tcp_abort(pcb); - 8008964: 6878 ldr r0, [r7, #4] - 8008966: f7fe f991 bl 8006c8c - } - return ERR_ABRT; - 800896a: f06f 030c mvn.w r3, #12 - 800896e: e1b9 b.n 8008ce4 - } - /* If there was any data contained within this ACK, - * we'd better pass it on to the application as well. */ - tcp_receive(pcb); - 8008970: 6878 ldr r0, [r7, #4] - 8008972: f000 fa3d bl 8008df0 - - /* Prevent ACK for SYN to generate a sent event */ - if (recv_acked != 0) { - 8008976: 4b5e ldr r3, [pc, #376] ; (8008af0 ) - 8008978: 881b ldrh r3, [r3, #0] - 800897a: 2b00 cmp r3, #0 - 800897c: d005 beq.n 800898a - recv_acked--; - 800897e: 4b5c ldr r3, [pc, #368] ; (8008af0 ) - 8008980: 881b ldrh r3, [r3, #0] - 8008982: 3b01 subs r3, #1 - 8008984: b29a uxth r2, r3 - 8008986: 4b5a ldr r3, [pc, #360] ; (8008af0 ) - 8008988: 801a strh r2, [r3, #0] - } - - pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); - 800898a: 687b ldr r3, [r7, #4] - 800898c: 8e5b ldrh r3, [r3, #50] ; 0x32 - 800898e: 005b lsls r3, r3, #1 - 8008990: f241 121c movw r2, #4380 ; 0x111c - 8008994: 429a cmp r2, r3 - 8008996: bf38 it cc - 8008998: 461a movcc r2, r3 - 800899a: 687b ldr r3, [r7, #4] - 800899c: 8e5b ldrh r3, [r3, #50] ; 0x32 - 800899e: 009b lsls r3, r3, #2 - 80089a0: 4293 cmp r3, r2 - 80089a2: bf28 it cs - 80089a4: 4613 movcs r3, r2 - 80089a6: b29a uxth r2, r3 - 80089a8: 687b ldr r3, [r7, #4] - 80089aa: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - - if (recv_flags & TF_GOT_FIN) { - 80089ae: 4b51 ldr r3, [pc, #324] ; (8008af4 ) - 80089b0: 781b ldrb r3, [r3, #0] - 80089b2: f003 0320 and.w r3, r3, #32 - 80089b6: 2b00 cmp r3, #0 - 80089b8: d034 beq.n 8008a24 - tcp_ack_now(pcb); - 80089ba: 687b ldr r3, [r7, #4] - 80089bc: 7e9b ldrb r3, [r3, #26] - 80089be: f043 0302 orr.w r3, r3, #2 - 80089c2: b2da uxtb r2, r3 - 80089c4: 687b ldr r3, [r7, #4] - 80089c6: 769a strb r2, [r3, #26] - pcb->state = CLOSE_WAIT; - 80089c8: 687b ldr r3, [r7, #4] - 80089ca: 2207 movs r2, #7 - 80089cc: 751a strb r2, [r3, #20] - if (recv_flags & TF_GOT_FIN) { - 80089ce: e029 b.n 8008a24 - } - } else { - /* incorrect ACK number, send RST */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 80089d0: 4b3e ldr r3, [pc, #248] ; (8008acc ) - 80089d2: 6818 ldr r0, [r3, #0] - 80089d4: 4b3e ldr r3, [pc, #248] ; (8008ad0 ) - 80089d6: 881b ldrh r3, [r3, #0] - 80089d8: 461a mov r2, r3 - 80089da: 4b3e ldr r3, [pc, #248] ; (8008ad4 ) - 80089dc: 681b ldr r3, [r3, #0] - 80089de: 18d1 adds r1, r2, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 80089e0: 4b3d ldr r3, [pc, #244] ; (8008ad8 ) - 80089e2: 681b ldr r3, [r3, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 80089e4: 885b ldrh r3, [r3, #2] - 80089e6: b29b uxth r3, r3 - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - 80089e8: 4a3b ldr r2, [pc, #236] ; (8008ad8 ) - 80089ea: 6812 ldr r2, [r2, #0] - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - 80089ec: 8812 ldrh r2, [r2, #0] - 80089ee: b292 uxth r2, r2 - 80089f0: 9201 str r2, [sp, #4] - 80089f2: 9300 str r3, [sp, #0] - 80089f4: 4b39 ldr r3, [pc, #228] ; (8008adc ) - 80089f6: 4a3a ldr r2, [pc, #232] ; (8008ae0 ) - 80089f8: f001 ffc2 bl 800a980 - } - } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { - /* Looks like another copy of the SYN - retransmit our SYN-ACK */ - tcp_rexmit(pcb); - } - break; - 80089fc: e166 b.n 8008ccc - } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { - 80089fe: 4b32 ldr r3, [pc, #200] ; (8008ac8 ) - 8008a00: 781b ldrb r3, [r3, #0] - 8008a02: f003 0302 and.w r3, r3, #2 - 8008a06: 2b00 cmp r3, #0 - 8008a08: f000 8160 beq.w 8008ccc - 8008a0c: 687b ldr r3, [r7, #4] - 8008a0e: 6a5b ldr r3, [r3, #36] ; 0x24 - 8008a10: 1e5a subs r2, r3, #1 - 8008a12: 4b30 ldr r3, [pc, #192] ; (8008ad4 ) - 8008a14: 681b ldr r3, [r3, #0] - 8008a16: 429a cmp r2, r3 - 8008a18: f040 8158 bne.w 8008ccc - tcp_rexmit(pcb); - 8008a1c: 6878 ldr r0, [r7, #4] - 8008a1e: f002 f85b bl 800aad8 - break; - 8008a22: e153 b.n 8008ccc - 8008a24: e152 b.n 8008ccc - case CLOSE_WAIT: - /* FALLTHROUGH */ - case ESTABLISHED: - tcp_receive(pcb); - 8008a26: 6878 ldr r0, [r7, #4] - 8008a28: f000 f9e2 bl 8008df0 - if (recv_flags & TF_GOT_FIN) { /* passive close */ - 8008a2c: 4b31 ldr r3, [pc, #196] ; (8008af4 ) - 8008a2e: 781b ldrb r3, [r3, #0] - 8008a30: f003 0320 and.w r3, r3, #32 - 8008a34: 2b00 cmp r3, #0 - 8008a36: f000 814b beq.w 8008cd0 - tcp_ack_now(pcb); - 8008a3a: 687b ldr r3, [r7, #4] - 8008a3c: 7e9b ldrb r3, [r3, #26] - 8008a3e: f043 0302 orr.w r3, r3, #2 - 8008a42: b2da uxtb r2, r3 - 8008a44: 687b ldr r3, [r7, #4] - 8008a46: 769a strb r2, [r3, #26] - pcb->state = CLOSE_WAIT; - 8008a48: 687b ldr r3, [r7, #4] - 8008a4a: 2207 movs r2, #7 - 8008a4c: 751a strb r2, [r3, #20] - } - break; - 8008a4e: e13f b.n 8008cd0 - case FIN_WAIT_1: - tcp_receive(pcb); - 8008a50: 6878 ldr r0, [r7, #4] - 8008a52: f000 f9cd bl 8008df0 - if (recv_flags & TF_GOT_FIN) { - 8008a56: 4b27 ldr r3, [pc, #156] ; (8008af4 ) - 8008a58: 781b ldrb r3, [r3, #0] - 8008a5a: f003 0320 and.w r3, r3, #32 - 8008a5e: 2b00 cmp r3, #0 - 8008a60: d070 beq.n 8008b44 - if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - 8008a62: 4b19 ldr r3, [pc, #100] ; (8008ac8 ) - 8008a64: 781b ldrb r3, [r3, #0] - 8008a66: f003 0310 and.w r3, r3, #16 - 8008a6a: 2b00 cmp r3, #0 - 8008a6c: d05f beq.n 8008b2e - 8008a6e: 687b ldr r3, [r7, #4] - 8008a70: 6cda ldr r2, [r3, #76] ; 0x4c - 8008a72: 4b16 ldr r3, [pc, #88] ; (8008acc ) - 8008a74: 681b ldr r3, [r3, #0] - 8008a76: 429a cmp r2, r3 - 8008a78: d159 bne.n 8008b2e - pcb->unsent == NULL) { - 8008a7a: 687b ldr r3, [r7, #4] - 8008a7c: 6e9b ldr r3, [r3, #104] ; 0x68 - if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - 8008a7e: 2b00 cmp r3, #0 - 8008a80: d155 bne.n 8008b2e - LWIP_DEBUGF(TCP_DEBUG, - ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_ack_now(pcb); - 8008a82: 687b ldr r3, [r7, #4] - 8008a84: 7e9b ldrb r3, [r3, #26] - 8008a86: f043 0302 orr.w r3, r3, #2 - 8008a8a: b2da uxtb r2, r3 - 8008a8c: 687b ldr r3, [r7, #4] - 8008a8e: 769a strb r2, [r3, #26] - tcp_pcb_purge(pcb); - 8008a90: 6878 ldr r0, [r7, #4] - 8008a92: f7fe fee7 bl 8007864 - TCP_RMV_ACTIVE(pcb); - 8008a96: 4b18 ldr r3, [pc, #96] ; (8008af8 ) - 8008a98: 681b ldr r3, [r3, #0] - 8008a9a: 687a ldr r2, [r7, #4] - 8008a9c: 429a cmp r2, r3 - 8008a9e: d105 bne.n 8008aac - 8008aa0: 4b15 ldr r3, [pc, #84] ; (8008af8 ) - 8008aa2: 681b ldr r3, [r3, #0] - 8008aa4: 68db ldr r3, [r3, #12] - 8008aa6: 4a14 ldr r2, [pc, #80] ; (8008af8 ) - 8008aa8: 6013 str r3, [r2, #0] - 8008aaa: e02d b.n 8008b08 - 8008aac: 4b12 ldr r3, [pc, #72] ; (8008af8 ) - 8008aae: 681b ldr r3, [r3, #0] - 8008ab0: 617b str r3, [r7, #20] - 8008ab2: e026 b.n 8008b02 - 8008ab4: 697b ldr r3, [r7, #20] - 8008ab6: 68db ldr r3, [r3, #12] - 8008ab8: 687a ldr r2, [r7, #4] - 8008aba: 429a cmp r2, r3 - 8008abc: d11e bne.n 8008afc - 8008abe: 687b ldr r3, [r7, #4] - 8008ac0: 68da ldr r2, [r3, #12] - 8008ac2: 697b ldr r3, [r7, #20] - 8008ac4: 60da str r2, [r3, #12] - 8008ac6: e01f b.n 8008b08 - 8008ac8: 20006da8 .word 0x20006da8 - 8008acc: 20006da0 .word 0x20006da0 - 8008ad0: 20006da6 .word 0x20006da6 - 8008ad4: 20006d9c .word 0x20006d9c - 8008ad8: 20006d8c .word 0x20006d8c - 8008adc: 200037f8 .word 0x200037f8 - 8008ae0: 200037fc .word 0x200037fc - 8008ae4: 08011640 .word 0x08011640 - 8008ae8: 08011844 .word 0x08011844 - 8008aec: 08011684 .word 0x08011684 - 8008af0: 20006da4 .word 0x20006da4 - 8008af4: 20006da9 .word 0x20006da9 - 8008af8: 20006d70 .word 0x20006d70 - 8008afc: 697b ldr r3, [r7, #20] - 8008afe: 68db ldr r3, [r3, #12] - 8008b00: 617b str r3, [r7, #20] - 8008b02: 697b ldr r3, [r7, #20] - 8008b04: 2b00 cmp r3, #0 - 8008b06: d1d5 bne.n 8008ab4 - 8008b08: 687b ldr r3, [r7, #4] - 8008b0a: 2200 movs r2, #0 - 8008b0c: 60da str r2, [r3, #12] - 8008b0e: 4b77 ldr r3, [pc, #476] ; (8008cec ) - 8008b10: 2201 movs r2, #1 - 8008b12: 701a strb r2, [r3, #0] - pcb->state = TIME_WAIT; - 8008b14: 687b ldr r3, [r7, #4] - 8008b16: 220a movs r2, #10 - 8008b18: 751a strb r2, [r3, #20] - TCP_REG(&tcp_tw_pcbs, pcb); - 8008b1a: 4b75 ldr r3, [pc, #468] ; (8008cf0 ) - 8008b1c: 681a ldr r2, [r3, #0] - 8008b1e: 687b ldr r3, [r7, #4] - 8008b20: 60da str r2, [r3, #12] - 8008b22: 4a73 ldr r2, [pc, #460] ; (8008cf0 ) - 8008b24: 687b ldr r3, [r7, #4] - 8008b26: 6013 str r3, [r2, #0] - 8008b28: f002 f972 bl 800ae10 - } - } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - pcb->unsent == NULL) { - pcb->state = FIN_WAIT_2; - } - break; - 8008b2c: e0d2 b.n 8008cd4 - tcp_ack_now(pcb); - 8008b2e: 687b ldr r3, [r7, #4] - 8008b30: 7e9b ldrb r3, [r3, #26] - 8008b32: f043 0302 orr.w r3, r3, #2 - 8008b36: b2da uxtb r2, r3 - 8008b38: 687b ldr r3, [r7, #4] - 8008b3a: 769a strb r2, [r3, #26] - pcb->state = CLOSING; - 8008b3c: 687b ldr r3, [r7, #4] - 8008b3e: 2208 movs r2, #8 - 8008b40: 751a strb r2, [r3, #20] - break; - 8008b42: e0c7 b.n 8008cd4 - } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - 8008b44: 4b6b ldr r3, [pc, #428] ; (8008cf4 ) - 8008b46: 781b ldrb r3, [r3, #0] - 8008b48: f003 0310 and.w r3, r3, #16 - 8008b4c: 2b00 cmp r3, #0 - 8008b4e: f000 80c1 beq.w 8008cd4 - 8008b52: 687b ldr r3, [r7, #4] - 8008b54: 6cda ldr r2, [r3, #76] ; 0x4c - 8008b56: 4b68 ldr r3, [pc, #416] ; (8008cf8 ) - 8008b58: 681b ldr r3, [r3, #0] - 8008b5a: 429a cmp r2, r3 - 8008b5c: f040 80ba bne.w 8008cd4 - pcb->unsent == NULL) { - 8008b60: 687b ldr r3, [r7, #4] - 8008b62: 6e9b ldr r3, [r3, #104] ; 0x68 - } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - 8008b64: 2b00 cmp r3, #0 - 8008b66: f040 80b5 bne.w 8008cd4 - pcb->state = FIN_WAIT_2; - 8008b6a: 687b ldr r3, [r7, #4] - 8008b6c: 2206 movs r2, #6 - 8008b6e: 751a strb r2, [r3, #20] - break; - 8008b70: e0b0 b.n 8008cd4 - case FIN_WAIT_2: - tcp_receive(pcb); - 8008b72: 6878 ldr r0, [r7, #4] - 8008b74: f000 f93c bl 8008df0 - if (recv_flags & TF_GOT_FIN) { - 8008b78: 4b60 ldr r3, [pc, #384] ; (8008cfc ) - 8008b7a: 781b ldrb r3, [r3, #0] - 8008b7c: f003 0320 and.w r3, r3, #32 - 8008b80: 2b00 cmp r3, #0 - 8008b82: f000 80a9 beq.w 8008cd8 - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_ack_now(pcb); - 8008b86: 687b ldr r3, [r7, #4] - 8008b88: 7e9b ldrb r3, [r3, #26] - 8008b8a: f043 0302 orr.w r3, r3, #2 - 8008b8e: b2da uxtb r2, r3 - 8008b90: 687b ldr r3, [r7, #4] - 8008b92: 769a strb r2, [r3, #26] - tcp_pcb_purge(pcb); - 8008b94: 6878 ldr r0, [r7, #4] - 8008b96: f7fe fe65 bl 8007864 - TCP_RMV_ACTIVE(pcb); - 8008b9a: 4b59 ldr r3, [pc, #356] ; (8008d00 ) - 8008b9c: 681b ldr r3, [r3, #0] - 8008b9e: 687a ldr r2, [r7, #4] - 8008ba0: 429a cmp r2, r3 - 8008ba2: d105 bne.n 8008bb0 - 8008ba4: 4b56 ldr r3, [pc, #344] ; (8008d00 ) - 8008ba6: 681b ldr r3, [r3, #0] - 8008ba8: 68db ldr r3, [r3, #12] - 8008baa: 4a55 ldr r2, [pc, #340] ; (8008d00 ) - 8008bac: 6013 str r3, [r2, #0] - 8008bae: e013 b.n 8008bd8 - 8008bb0: 4b53 ldr r3, [pc, #332] ; (8008d00 ) - 8008bb2: 681b ldr r3, [r3, #0] - 8008bb4: 613b str r3, [r7, #16] - 8008bb6: e00c b.n 8008bd2 - 8008bb8: 693b ldr r3, [r7, #16] - 8008bba: 68db ldr r3, [r3, #12] - 8008bbc: 687a ldr r2, [r7, #4] - 8008bbe: 429a cmp r2, r3 - 8008bc0: d104 bne.n 8008bcc - 8008bc2: 687b ldr r3, [r7, #4] - 8008bc4: 68da ldr r2, [r3, #12] - 8008bc6: 693b ldr r3, [r7, #16] - 8008bc8: 60da str r2, [r3, #12] - 8008bca: e005 b.n 8008bd8 - 8008bcc: 693b ldr r3, [r7, #16] - 8008bce: 68db ldr r3, [r3, #12] - 8008bd0: 613b str r3, [r7, #16] - 8008bd2: 693b ldr r3, [r7, #16] - 8008bd4: 2b00 cmp r3, #0 - 8008bd6: d1ef bne.n 8008bb8 - 8008bd8: 687b ldr r3, [r7, #4] - 8008bda: 2200 movs r2, #0 - 8008bdc: 60da str r2, [r3, #12] - 8008bde: 4b43 ldr r3, [pc, #268] ; (8008cec ) - 8008be0: 2201 movs r2, #1 - 8008be2: 701a strb r2, [r3, #0] - pcb->state = TIME_WAIT; - 8008be4: 687b ldr r3, [r7, #4] - 8008be6: 220a movs r2, #10 - 8008be8: 751a strb r2, [r3, #20] - TCP_REG(&tcp_tw_pcbs, pcb); - 8008bea: 4b41 ldr r3, [pc, #260] ; (8008cf0 ) - 8008bec: 681a ldr r2, [r3, #0] - 8008bee: 687b ldr r3, [r7, #4] - 8008bf0: 60da str r2, [r3, #12] - 8008bf2: 4a3f ldr r2, [pc, #252] ; (8008cf0 ) - 8008bf4: 687b ldr r3, [r7, #4] - 8008bf6: 6013 str r3, [r2, #0] - 8008bf8: f002 f90a bl 800ae10 - } - break; - 8008bfc: e06c b.n 8008cd8 - case CLOSING: - tcp_receive(pcb); - 8008bfe: 6878 ldr r0, [r7, #4] - 8008c00: f000 f8f6 bl 8008df0 - if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { - 8008c04: 4b3b ldr r3, [pc, #236] ; (8008cf4 ) - 8008c06: 781b ldrb r3, [r3, #0] - 8008c08: f003 0310 and.w r3, r3, #16 - 8008c0c: 2b00 cmp r3, #0 - 8008c0e: d065 beq.n 8008cdc - 8008c10: 687b ldr r3, [r7, #4] - 8008c12: 6cda ldr r2, [r3, #76] ; 0x4c - 8008c14: 4b38 ldr r3, [pc, #224] ; (8008cf8 ) - 8008c16: 681b ldr r3, [r3, #0] - 8008c18: 429a cmp r2, r3 - 8008c1a: d15f bne.n 8008cdc - 8008c1c: 687b ldr r3, [r7, #4] - 8008c1e: 6e9b ldr r3, [r3, #104] ; 0x68 - 8008c20: 2b00 cmp r3, #0 - 8008c22: d15b bne.n 8008cdc - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_pcb_purge(pcb); - 8008c24: 6878 ldr r0, [r7, #4] - 8008c26: f7fe fe1d bl 8007864 - TCP_RMV_ACTIVE(pcb); - 8008c2a: 4b35 ldr r3, [pc, #212] ; (8008d00 ) - 8008c2c: 681b ldr r3, [r3, #0] - 8008c2e: 687a ldr r2, [r7, #4] - 8008c30: 429a cmp r2, r3 - 8008c32: d105 bne.n 8008c40 - 8008c34: 4b32 ldr r3, [pc, #200] ; (8008d00 ) - 8008c36: 681b ldr r3, [r3, #0] - 8008c38: 68db ldr r3, [r3, #12] - 8008c3a: 4a31 ldr r2, [pc, #196] ; (8008d00 ) - 8008c3c: 6013 str r3, [r2, #0] - 8008c3e: e013 b.n 8008c68 - 8008c40: 4b2f ldr r3, [pc, #188] ; (8008d00 ) - 8008c42: 681b ldr r3, [r3, #0] - 8008c44: 60fb str r3, [r7, #12] - 8008c46: e00c b.n 8008c62 - 8008c48: 68fb ldr r3, [r7, #12] - 8008c4a: 68db ldr r3, [r3, #12] - 8008c4c: 687a ldr r2, [r7, #4] - 8008c4e: 429a cmp r2, r3 - 8008c50: d104 bne.n 8008c5c - 8008c52: 687b ldr r3, [r7, #4] - 8008c54: 68da ldr r2, [r3, #12] - 8008c56: 68fb ldr r3, [r7, #12] - 8008c58: 60da str r2, [r3, #12] - 8008c5a: e005 b.n 8008c68 - 8008c5c: 68fb ldr r3, [r7, #12] - 8008c5e: 68db ldr r3, [r3, #12] - 8008c60: 60fb str r3, [r7, #12] - 8008c62: 68fb ldr r3, [r7, #12] - 8008c64: 2b00 cmp r3, #0 - 8008c66: d1ef bne.n 8008c48 - 8008c68: 687b ldr r3, [r7, #4] - 8008c6a: 2200 movs r2, #0 - 8008c6c: 60da str r2, [r3, #12] - 8008c6e: 4b1f ldr r3, [pc, #124] ; (8008cec ) - 8008c70: 2201 movs r2, #1 - 8008c72: 701a strb r2, [r3, #0] - pcb->state = TIME_WAIT; - 8008c74: 687b ldr r3, [r7, #4] - 8008c76: 220a movs r2, #10 - 8008c78: 751a strb r2, [r3, #20] - TCP_REG(&tcp_tw_pcbs, pcb); - 8008c7a: 4b1d ldr r3, [pc, #116] ; (8008cf0 ) - 8008c7c: 681a ldr r2, [r3, #0] - 8008c7e: 687b ldr r3, [r7, #4] - 8008c80: 60da str r2, [r3, #12] - 8008c82: 4a1b ldr r2, [pc, #108] ; (8008cf0 ) - 8008c84: 687b ldr r3, [r7, #4] - 8008c86: 6013 str r3, [r2, #0] - 8008c88: f002 f8c2 bl 800ae10 - } - break; - 8008c8c: e026 b.n 8008cdc - case LAST_ACK: - tcp_receive(pcb); - 8008c8e: 6878 ldr r0, [r7, #4] - 8008c90: f000 f8ae bl 8008df0 - if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { - 8008c94: 4b17 ldr r3, [pc, #92] ; (8008cf4 ) - 8008c96: 781b ldrb r3, [r3, #0] - 8008c98: f003 0310 and.w r3, r3, #16 - 8008c9c: 2b00 cmp r3, #0 - 8008c9e: d01f beq.n 8008ce0 - 8008ca0: 687b ldr r3, [r7, #4] - 8008ca2: 6cda ldr r2, [r3, #76] ; 0x4c - 8008ca4: 4b14 ldr r3, [pc, #80] ; (8008cf8 ) - 8008ca6: 681b ldr r3, [r3, #0] - 8008ca8: 429a cmp r2, r3 - 8008caa: d119 bne.n 8008ce0 - 8008cac: 687b ldr r3, [r7, #4] - 8008cae: 6e9b ldr r3, [r3, #104] ; 0x68 - 8008cb0: 2b00 cmp r3, #0 - 8008cb2: d115 bne.n 8008ce0 - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ - recv_flags |= TF_CLOSED; - 8008cb4: 4b11 ldr r3, [pc, #68] ; (8008cfc ) - 8008cb6: 781b ldrb r3, [r3, #0] - 8008cb8: f043 0310 orr.w r3, r3, #16 - 8008cbc: b2da uxtb r2, r3 - 8008cbe: 4b0f ldr r3, [pc, #60] ; (8008cfc ) - 8008cc0: 701a strb r2, [r3, #0] - } - break; - 8008cc2: e00d b.n 8008ce0 - default: - break; - 8008cc4: bf00 nop - 8008cc6: e00c b.n 8008ce2 - break; - 8008cc8: bf00 nop - 8008cca: e00a b.n 8008ce2 - break; - 8008ccc: bf00 nop - 8008cce: e008 b.n 8008ce2 - break; - 8008cd0: bf00 nop - 8008cd2: e006 b.n 8008ce2 - break; - 8008cd4: bf00 nop - 8008cd6: e004 b.n 8008ce2 - break; - 8008cd8: bf00 nop - 8008cda: e002 b.n 8008ce2 - break; - 8008cdc: bf00 nop - 8008cde: e000 b.n 8008ce2 - break; - 8008ce0: bf00 nop - } - return ERR_OK; - 8008ce2: 2300 movs r3, #0 -} - 8008ce4: 4618 mov r0, r3 - 8008ce6: 3720 adds r7, #32 - 8008ce8: 46bd mov sp, r7 - 8008cea: bd80 pop {r7, pc} - 8008cec: 20006d78 .word 0x20006d78 - 8008cf0: 20006d74 .word 0x20006d74 - 8008cf4: 20006da8 .word 0x20006da8 - 8008cf8: 20006da0 .word 0x20006da0 - 8008cfc: 20006da9 .word 0x20006da9 - 8008d00: 20006d70 .word 0x20006d70 - -08008d04 : - * - * Called from tcp_receive() - */ -static void -tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) -{ - 8008d04: b590 push {r4, r7, lr} - 8008d06: b085 sub sp, #20 - 8008d08: af00 add r7, sp, #0 - 8008d0a: 6078 str r0, [r7, #4] - 8008d0c: 6039 str r1, [r7, #0] - struct tcp_seg *old_seg; - - if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { - 8008d0e: 687b ldr r3, [r7, #4] - 8008d10: 68db ldr r3, [r3, #12] - 8008d12: 899b ldrh r3, [r3, #12] - 8008d14: b29b uxth r3, r3 - 8008d16: 4618 mov r0, r3 - 8008d18: f7fc f99d bl 8005056 - 8008d1c: 4603 mov r3, r0 - 8008d1e: f003 0301 and.w r3, r3, #1 - 8008d22: 2b00 cmp r3, #0 - 8008d24: d027 beq.n 8008d76 - /* received segment overlaps all following segments */ - tcp_segs_free(next); - 8008d26: 6838 ldr r0, [r7, #0] - 8008d28: f7fe fbf3 bl 8007512 - next = NULL; - 8008d2c: 2300 movs r3, #0 - 8008d2e: 603b str r3, [r7, #0] - 8008d30: e055 b.n 8008dde - oos queue may have segments with FIN flag */ - while (next && - TCP_SEQ_GEQ((seqno + cseg->len), - (next->tcphdr->seqno + next->len))) { - /* cseg with FIN already processed */ - if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { - 8008d32: 683b ldr r3, [r7, #0] - 8008d34: 68db ldr r3, [r3, #12] - 8008d36: 899b ldrh r3, [r3, #12] - 8008d38: b29b uxth r3, r3 - 8008d3a: 4618 mov r0, r3 - 8008d3c: f7fc f98b bl 8005056 - 8008d40: 4603 mov r3, r0 - 8008d42: f003 0301 and.w r3, r3, #1 - 8008d46: 2b00 cmp r3, #0 - 8008d48: d00d beq.n 8008d66 - TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); - 8008d4a: 687b ldr r3, [r7, #4] - 8008d4c: 68db ldr r3, [r3, #12] - 8008d4e: 899b ldrh r3, [r3, #12] - 8008d50: b29c uxth r4, r3 - 8008d52: 2001 movs r0, #1 - 8008d54: f7fc f97f bl 8005056 - 8008d58: 4603 mov r3, r0 - 8008d5a: 461a mov r2, r3 - 8008d5c: 687b ldr r3, [r7, #4] - 8008d5e: 68db ldr r3, [r3, #12] - 8008d60: 4322 orrs r2, r4 - 8008d62: b292 uxth r2, r2 - 8008d64: 819a strh r2, [r3, #12] - } - old_seg = next; - 8008d66: 683b ldr r3, [r7, #0] - 8008d68: 60fb str r3, [r7, #12] - next = next->next; - 8008d6a: 683b ldr r3, [r7, #0] - 8008d6c: 681b ldr r3, [r3, #0] - 8008d6e: 603b str r3, [r7, #0] - tcp_seg_free(old_seg); - 8008d70: 68f8 ldr r0, [r7, #12] - 8008d72: f7fe fbe3 bl 800753c - while (next && - 8008d76: 683b ldr r3, [r7, #0] - 8008d78: 2b00 cmp r3, #0 - 8008d7a: d00e beq.n 8008d9a - TCP_SEQ_GEQ((seqno + cseg->len), - 8008d7c: 687b ldr r3, [r7, #4] - 8008d7e: 891b ldrh r3, [r3, #8] - 8008d80: 461a mov r2, r3 - 8008d82: 4b1a ldr r3, [pc, #104] ; (8008dec ) - 8008d84: 681b ldr r3, [r3, #0] - 8008d86: 441a add r2, r3 - 8008d88: 683b ldr r3, [r7, #0] - 8008d8a: 68db ldr r3, [r3, #12] - 8008d8c: 685b ldr r3, [r3, #4] - 8008d8e: 6839 ldr r1, [r7, #0] - 8008d90: 8909 ldrh r1, [r1, #8] - 8008d92: 440b add r3, r1 - 8008d94: 1ad3 subs r3, r2, r3 - while (next && - 8008d96: 2b00 cmp r3, #0 - 8008d98: dacb bge.n 8008d32 - } - if (next && - 8008d9a: 683b ldr r3, [r7, #0] - 8008d9c: 2b00 cmp r3, #0 - 8008d9e: d01e beq.n 8008dde - TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { - 8008da0: 687b ldr r3, [r7, #4] - 8008da2: 891b ldrh r3, [r3, #8] - 8008da4: 461a mov r2, r3 - 8008da6: 4b11 ldr r3, [pc, #68] ; (8008dec ) - 8008da8: 681b ldr r3, [r3, #0] - 8008daa: 441a add r2, r3 - 8008dac: 683b ldr r3, [r7, #0] - 8008dae: 68db ldr r3, [r3, #12] - 8008db0: 685b ldr r3, [r3, #4] - 8008db2: 1ad3 subs r3, r2, r3 - if (next && - 8008db4: 2b00 cmp r3, #0 - 8008db6: dd12 ble.n 8008dde - /* We need to trim the incoming segment. */ - cseg->len = (u16_t)(next->tcphdr->seqno - seqno); - 8008db8: 683b ldr r3, [r7, #0] - 8008dba: 68db ldr r3, [r3, #12] - 8008dbc: 685b ldr r3, [r3, #4] - 8008dbe: b29a uxth r2, r3 - 8008dc0: 4b0a ldr r3, [pc, #40] ; (8008dec ) - 8008dc2: 681b ldr r3, [r3, #0] - 8008dc4: b29b uxth r3, r3 - 8008dc6: 1ad3 subs r3, r2, r3 - 8008dc8: b29a uxth r2, r3 - 8008dca: 687b ldr r3, [r7, #4] - 8008dcc: 811a strh r2, [r3, #8] - pbuf_realloc(cseg->p, cseg->len); - 8008dce: 687b ldr r3, [r7, #4] - 8008dd0: 685a ldr r2, [r3, #4] - 8008dd2: 687b ldr r3, [r7, #4] - 8008dd4: 891b ldrh r3, [r3, #8] - 8008dd6: 4619 mov r1, r3 - 8008dd8: 4610 mov r0, r2 - 8008dda: f7fd f8dd bl 8005f98 - } - } - cseg->next = next; - 8008dde: 687b ldr r3, [r7, #4] - 8008de0: 683a ldr r2, [r7, #0] - 8008de2: 601a str r2, [r3, #0] -} - 8008de4: bf00 nop - 8008de6: 3714 adds r7, #20 - 8008de8: 46bd mov sp, r7 - 8008dea: bd90 pop {r4, r7, pc} - 8008dec: 20006d9c .word 0x20006d9c - -08008df0 : - * - * Called from tcp_process(). - */ -static void -tcp_receive(struct tcp_pcb *pcb) -{ - 8008df0: b5f0 push {r4, r5, r6, r7, lr} - 8008df2: b08d sub sp, #52 ; 0x34 - 8008df4: af00 add r7, sp, #0 - 8008df6: 6078 str r0, [r7, #4] -#endif /* TCP_QUEUE_OOSEQ */ - s32_t off; - s16_t m; - u32_t right_wnd_edge; - u16_t new_tot_len; - int found_dupack = 0; - 8008df8: 2300 movs r3, #0 - 8008dfa: 61fb str r3, [r7, #28] -#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS - u32_t ooseq_blen; - u16_t ooseq_qlen; -#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ - - LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); - 8008dfc: 687b ldr r3, [r7, #4] - 8008dfe: 7d1b ldrb r3, [r3, #20] - 8008e00: 2b03 cmp r3, #3 - 8008e02: d806 bhi.n 8008e12 - 8008e04: 4b98 ldr r3, [pc, #608] ; (8009068 ) - 8008e06: f44f 6281 mov.w r2, #1032 ; 0x408 - 8008e0a: 4998 ldr r1, [pc, #608] ; (800906c ) - 8008e0c: 4898 ldr r0, [pc, #608] ; (8009070 ) - 8008e0e: f006 fe59 bl 800fac4 - - if (flags & TCP_ACK) { - 8008e12: 4b98 ldr r3, [pc, #608] ; (8009074 ) - 8008e14: 781b ldrb r3, [r3, #0] - 8008e16: f003 0310 and.w r3, r3, #16 - 8008e1a: 2b00 cmp r3, #0 - 8008e1c: f000 82c1 beq.w 80093a2 - right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; - 8008e20: 687b ldr r3, [r7, #4] - 8008e22: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c - 8008e26: 461a mov r2, r3 - 8008e28: 687b ldr r3, [r7, #4] - 8008e2a: 6d5b ldr r3, [r3, #84] ; 0x54 - 8008e2c: 4413 add r3, r2 - 8008e2e: 617b str r3, [r7, #20] - - /* Update window. */ - if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || - 8008e30: 687b ldr r3, [r7, #4] - 8008e32: 6d1a ldr r2, [r3, #80] ; 0x50 - 8008e34: 4b90 ldr r3, [pc, #576] ; (8009078 ) - 8008e36: 681b ldr r3, [r3, #0] - 8008e38: 1ad3 subs r3, r2, r3 - 8008e3a: 2b00 cmp r3, #0 - 8008e3c: db1b blt.n 8008e76 - (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || - 8008e3e: 687b ldr r3, [r7, #4] - 8008e40: 6d1a ldr r2, [r3, #80] ; 0x50 - 8008e42: 4b8d ldr r3, [pc, #564] ; (8009078 ) - 8008e44: 681b ldr r3, [r3, #0] - if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || - 8008e46: 429a cmp r2, r3 - 8008e48: d106 bne.n 8008e58 - (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || - 8008e4a: 687b ldr r3, [r7, #4] - 8008e4c: 6d5a ldr r2, [r3, #84] ; 0x54 - 8008e4e: 4b8b ldr r3, [pc, #556] ; (800907c ) - 8008e50: 681b ldr r3, [r3, #0] - 8008e52: 1ad3 subs r3, r2, r3 - 8008e54: 2b00 cmp r3, #0 - 8008e56: db0e blt.n 8008e76 - (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { - 8008e58: 687b ldr r3, [r7, #4] - 8008e5a: 6d5a ldr r2, [r3, #84] ; 0x54 - 8008e5c: 4b87 ldr r3, [pc, #540] ; (800907c ) - 8008e5e: 681b ldr r3, [r3, #0] - (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || - 8008e60: 429a cmp r2, r3 - 8008e62: d141 bne.n 8008ee8 - (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { - 8008e64: 4b86 ldr r3, [pc, #536] ; (8009080 ) - 8008e66: 681b ldr r3, [r3, #0] - 8008e68: 89db ldrh r3, [r3, #14] - 8008e6a: b29a uxth r2, r3 - 8008e6c: 687b ldr r3, [r7, #4] - 8008e6e: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c - 8008e72: 429a cmp r2, r3 - 8008e74: d938 bls.n 8008ee8 - pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); - 8008e76: 4b82 ldr r3, [pc, #520] ; (8009080 ) - 8008e78: 681b ldr r3, [r3, #0] - 8008e7a: 89db ldrh r3, [r3, #14] - 8008e7c: b29a uxth r2, r3 - 8008e7e: 687b ldr r3, [r7, #4] - 8008e80: f8a3 205c strh.w r2, [r3, #92] ; 0x5c - /* keep track of the biggest window announced by the remote host to calculate - the maximum segment size */ - if (pcb->snd_wnd_max < pcb->snd_wnd) { - 8008e84: 687b ldr r3, [r7, #4] - 8008e86: f8b3 205e ldrh.w r2, [r3, #94] ; 0x5e - 8008e8a: 687b ldr r3, [r7, #4] - 8008e8c: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c - 8008e90: 429a cmp r2, r3 - 8008e92: d205 bcs.n 8008ea0 - pcb->snd_wnd_max = pcb->snd_wnd; - 8008e94: 687b ldr r3, [r7, #4] - 8008e96: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c - 8008e9a: 687b ldr r3, [r7, #4] - 8008e9c: f8a3 205e strh.w r2, [r3, #94] ; 0x5e - } - pcb->snd_wl1 = seqno; - 8008ea0: 4b75 ldr r3, [pc, #468] ; (8009078 ) - 8008ea2: 681a ldr r2, [r3, #0] - 8008ea4: 687b ldr r3, [r7, #4] - 8008ea6: 651a str r2, [r3, #80] ; 0x50 - pcb->snd_wl2 = ackno; - 8008ea8: 4b74 ldr r3, [pc, #464] ; (800907c ) - 8008eaa: 681a ldr r2, [r3, #0] - 8008eac: 687b ldr r3, [r7, #4] - 8008eae: 655a str r2, [r3, #84] ; 0x54 - if (pcb->snd_wnd == 0) { - 8008eb0: 687b ldr r3, [r7, #4] - 8008eb2: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c - 8008eb6: 2b00 cmp r3, #0 - 8008eb8: d10d bne.n 8008ed6 - if (pcb->persist_backoff == 0) { - 8008eba: 687b ldr r3, [r7, #4] - 8008ebc: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 - 8008ec0: 2b00 cmp r3, #0 - 8008ec2: d111 bne.n 8008ee8 - /* start persist timer */ - pcb->persist_cnt = 0; - 8008ec4: 687b ldr r3, [r7, #4] - 8008ec6: 2200 movs r2, #0 - 8008ec8: f883 2094 strb.w r2, [r3, #148] ; 0x94 - pcb->persist_backoff = 1; - 8008ecc: 687b ldr r3, [r7, #4] - 8008ece: 2201 movs r2, #1 - 8008ed0: f883 2095 strb.w r2, [r3, #149] ; 0x95 - 8008ed4: e008 b.n 8008ee8 - } - } else if (pcb->persist_backoff > 0) { - 8008ed6: 687b ldr r3, [r7, #4] - 8008ed8: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 - 8008edc: 2b00 cmp r3, #0 - 8008ede: d003 beq.n 8008ee8 - /* stop persist timer */ - pcb->persist_backoff = 0; - 8008ee0: 687b ldr r3, [r7, #4] - 8008ee2: 2200 movs r2, #0 - 8008ee4: f883 2095 strb.w r2, [r3, #149] ; 0x95 - * If it only passes 1, should reset dupack counter - * - */ - - /* Clause 1 */ - if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { - 8008ee8: 4b64 ldr r3, [pc, #400] ; (800907c ) - 8008eea: 681a ldr r2, [r3, #0] - 8008eec: 687b ldr r3, [r7, #4] - 8008eee: 6c5b ldr r3, [r3, #68] ; 0x44 - 8008ef0: 1ad3 subs r3, r2, r3 - 8008ef2: 2b00 cmp r3, #0 - 8008ef4: dc53 bgt.n 8008f9e - /* Clause 2 */ - if (tcplen == 0) { - 8008ef6: 4b63 ldr r3, [pc, #396] ; (8009084 ) - 8008ef8: 881b ldrh r3, [r3, #0] - 8008efa: 2b00 cmp r3, #0 - 8008efc: d146 bne.n 8008f8c - /* Clause 3 */ - if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { - 8008efe: 687b ldr r3, [r7, #4] - 8008f00: 6d5b ldr r3, [r3, #84] ; 0x54 - 8008f02: 687a ldr r2, [r7, #4] - 8008f04: f8b2 205c ldrh.w r2, [r2, #92] ; 0x5c - 8008f08: 4413 add r3, r2 - 8008f0a: 697a ldr r2, [r7, #20] - 8008f0c: 429a cmp r2, r3 - 8008f0e: d13d bne.n 8008f8c - /* Clause 4 */ - if (pcb->rtime >= 0) { - 8008f10: 687b ldr r3, [r7, #4] - 8008f12: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 - 8008f16: 2b00 cmp r3, #0 - 8008f18: db38 blt.n 8008f8c - /* Clause 5 */ - if (pcb->lastack == ackno) { - 8008f1a: 687b ldr r3, [r7, #4] - 8008f1c: 6c5a ldr r2, [r3, #68] ; 0x44 - 8008f1e: 4b57 ldr r3, [pc, #348] ; (800907c ) - 8008f20: 681b ldr r3, [r3, #0] - 8008f22: 429a cmp r2, r3 - 8008f24: d132 bne.n 8008f8c - found_dupack = 1; - 8008f26: 2301 movs r3, #1 - 8008f28: 61fb str r3, [r7, #28] - if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { - 8008f2a: 687b ldr r3, [r7, #4] - 8008f2c: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 - 8008f30: 2bff cmp r3, #255 ; 0xff - 8008f32: d007 beq.n 8008f44 - ++pcb->dupacks; - 8008f34: 687b ldr r3, [r7, #4] - 8008f36: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 - 8008f3a: 3301 adds r3, #1 - 8008f3c: b2da uxtb r2, r3 - 8008f3e: 687b ldr r3, [r7, #4] - 8008f40: f883 2043 strb.w r2, [r3, #67] ; 0x43 - } - if (pcb->dupacks > 3) { - 8008f44: 687b ldr r3, [r7, #4] - 8008f46: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 - 8008f4a: 2b03 cmp r3, #3 - 8008f4c: d916 bls.n 8008f7c - /* Inflate the congestion window, but not if it means that - the value overflows. */ - if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { - 8008f4e: 687b ldr r3, [r7, #4] - 8008f50: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 - 8008f54: 687b ldr r3, [r7, #4] - 8008f56: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8008f58: 4413 add r3, r2 - 8008f5a: b29a uxth r2, r3 - 8008f5c: 687b ldr r3, [r7, #4] - 8008f5e: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 - 8008f62: 429a cmp r2, r3 - 8008f64: d912 bls.n 8008f8c - pcb->cwnd += pcb->mss; - 8008f66: 687b ldr r3, [r7, #4] - 8008f68: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 - 8008f6c: 687b ldr r3, [r7, #4] - 8008f6e: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8008f70: 4413 add r3, r2 - 8008f72: b29a uxth r2, r3 - 8008f74: 687b ldr r3, [r7, #4] - 8008f76: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - 8008f7a: e007 b.n 8008f8c - } - } else if (pcb->dupacks == 3) { - 8008f7c: 687b ldr r3, [r7, #4] - 8008f7e: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 - 8008f82: 2b03 cmp r3, #3 - 8008f84: d102 bne.n 8008f8c - /* Do fast retransmit */ - tcp_rexmit_fast(pcb); - 8008f86: 6878 ldr r0, [r7, #4] - 8008f88: f001 fdf6 bl 800ab78 - } - } - } - /* If Clause (1) or more is true, but not a duplicate ack, reset - * count of consecutive duplicate acks */ - if (!found_dupack) { - 8008f8c: 69fb ldr r3, [r7, #28] - 8008f8e: 2b00 cmp r3, #0 - 8008f90: f040 816a bne.w 8009268 - pcb->dupacks = 0; - 8008f94: 687b ldr r3, [r7, #4] - 8008f96: 2200 movs r2, #0 - 8008f98: f883 2043 strb.w r2, [r3, #67] ; 0x43 - 8008f9c: e164 b.n 8009268 - } - } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { - 8008f9e: 4b37 ldr r3, [pc, #220] ; (800907c ) - 8008fa0: 681a ldr r2, [r3, #0] - 8008fa2: 687b ldr r3, [r7, #4] - 8008fa4: 6c5b ldr r3, [r3, #68] ; 0x44 - 8008fa6: 1ad3 subs r3, r2, r3 - 8008fa8: 3b01 subs r3, #1 - 8008faa: 2b00 cmp r3, #0 - 8008fac: f2c0 8108 blt.w 80091c0 - 8008fb0: 4b32 ldr r3, [pc, #200] ; (800907c ) - 8008fb2: 681a ldr r2, [r3, #0] - 8008fb4: 687b ldr r3, [r7, #4] - 8008fb6: 6cdb ldr r3, [r3, #76] ; 0x4c - 8008fb8: 1ad3 subs r3, r2, r3 - 8008fba: 2b00 cmp r3, #0 - 8008fbc: f300 8100 bgt.w 80091c0 - /* We come here when the ACK acknowledges new data. */ - - /* Reset the "IN Fast Retransmit" flag, since we are no longer - in fast retransmit. Also reset the congestion window to the - slow start threshold. */ - if (pcb->flags & TF_INFR) { - 8008fc0: 687b ldr r3, [r7, #4] - 8008fc2: 7e9b ldrb r3, [r3, #26] - 8008fc4: f003 0304 and.w r3, r3, #4 - 8008fc8: 2b00 cmp r3, #0 - 8008fca: d00c beq.n 8008fe6 - pcb->flags &= ~TF_INFR; - 8008fcc: 687b ldr r3, [r7, #4] - 8008fce: 7e9b ldrb r3, [r3, #26] - 8008fd0: f023 0304 bic.w r3, r3, #4 - 8008fd4: b2da uxtb r2, r3 - 8008fd6: 687b ldr r3, [r7, #4] - 8008fd8: 769a strb r2, [r3, #26] - pcb->cwnd = pcb->ssthresh; - 8008fda: 687b ldr r3, [r7, #4] - 8008fdc: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a - 8008fe0: 687b ldr r3, [r7, #4] - 8008fe2: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - } - - /* Reset the number of retransmissions. */ - pcb->nrtx = 0; - 8008fe6: 687b ldr r3, [r7, #4] - 8008fe8: 2200 movs r2, #0 - 8008fea: f883 2042 strb.w r2, [r3, #66] ; 0x42 - - /* Reset the retransmission time-out. */ - pcb->rto = (pcb->sa >> 3) + pcb->sv; - 8008fee: 687b ldr r3, [r7, #4] - 8008ff0: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c - 8008ff4: 10db asrs r3, r3, #3 - 8008ff6: b21b sxth r3, r3 - 8008ff8: b29a uxth r2, r3 - 8008ffa: 687b ldr r3, [r7, #4] - 8008ffc: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e - 8009000: b29b uxth r3, r3 - 8009002: 4413 add r3, r2 - 8009004: b29b uxth r3, r3 - 8009006: b21a sxth r2, r3 - 8009008: 687b ldr r3, [r7, #4] - 800900a: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 - - /* Reset the fast retransmit variables. */ - pcb->dupacks = 0; - 800900e: 687b ldr r3, [r7, #4] - 8009010: 2200 movs r2, #0 - 8009012: f883 2043 strb.w r2, [r3, #67] ; 0x43 - pcb->lastack = ackno; - 8009016: 4b19 ldr r3, [pc, #100] ; (800907c ) - 8009018: 681a ldr r2, [r3, #0] - 800901a: 687b ldr r3, [r7, #4] - 800901c: 645a str r2, [r3, #68] ; 0x44 - - /* Update the congestion control variables (cwnd and - ssthresh). */ - if (pcb->state >= ESTABLISHED) { - 800901e: 687b ldr r3, [r7, #4] - 8009020: 7d1b ldrb r3, [r3, #20] - 8009022: 2b03 cmp r3, #3 - 8009024: f240 8095 bls.w 8009152 - if (pcb->cwnd < pcb->ssthresh) { - 8009028: 687b ldr r3, [r7, #4] - 800902a: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 - 800902e: 687b ldr r3, [r7, #4] - 8009030: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a - 8009034: 429a cmp r2, r3 - 8009036: d227 bcs.n 8009088 - if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { - 8009038: 687b ldr r3, [r7, #4] - 800903a: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 - 800903e: 687b ldr r3, [r7, #4] - 8009040: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8009042: 4413 add r3, r2 - 8009044: b29a uxth r2, r3 - 8009046: 687b ldr r3, [r7, #4] - 8009048: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 - 800904c: 429a cmp r2, r3 - 800904e: f240 8080 bls.w 8009152 - pcb->cwnd += pcb->mss; - 8009052: 687b ldr r3, [r7, #4] - 8009054: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 - 8009058: 687b ldr r3, [r7, #4] - 800905a: 8e5b ldrh r3, [r3, #50] ; 0x32 - 800905c: 4413 add r3, r2 - 800905e: b29a uxth r2, r3 - 8009060: 687b ldr r3, [r7, #4] - 8009062: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - 8009066: e074 b.n 8009152 - 8009068: 08011640 .word 0x08011640 - 800906c: 08011864 .word 0x08011864 - 8009070: 08011684 .word 0x08011684 - 8009074: 20006da8 .word 0x20006da8 - 8009078: 20006d9c .word 0x20006d9c - 800907c: 20006da0 .word 0x20006da0 - 8009080: 20006d8c .word 0x20006d8c - 8009084: 20006da6 .word 0x20006da6 - } - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); - } else { - tcpwnd_size_t new_cwnd = (pcb->cwnd + pcb->mss * pcb->mss / pcb->cwnd); - 8009088: 687b ldr r3, [r7, #4] - 800908a: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 - 800908e: 687b ldr r3, [r7, #4] - 8009090: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8009092: 4619 mov r1, r3 - 8009094: 687b ldr r3, [r7, #4] - 8009096: 8e5b ldrh r3, [r3, #50] ; 0x32 - 8009098: fb01 f303 mul.w r3, r1, r3 - 800909c: 6879 ldr r1, [r7, #4] - 800909e: f8b1 1048 ldrh.w r1, [r1, #72] ; 0x48 - 80090a2: fb93 f3f1 sdiv r3, r3, r1 - 80090a6: b29b uxth r3, r3 - 80090a8: 4413 add r3, r2 - 80090aa: 827b strh r3, [r7, #18] - if (new_cwnd > pcb->cwnd) { - 80090ac: 687b ldr r3, [r7, #4] - 80090ae: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 - 80090b2: 8a7a ldrh r2, [r7, #18] - 80090b4: 429a cmp r2, r3 - 80090b6: d94c bls.n 8009152 - pcb->cwnd = new_cwnd; - 80090b8: 687b ldr r3, [r7, #4] - 80090ba: 8a7a ldrh r2, [r7, #18] - 80090bc: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - pcb->unacked != NULL? - lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); - - /* Remove segment from the unacknowledged list if the incoming - ACK acknowledges them. */ - while (pcb->unacked != NULL && - 80090c0: e047 b.n 8009152 - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unacked\n", - lwip_ntohl(pcb->unacked->tcphdr->seqno), - lwip_ntohl(pcb->unacked->tcphdr->seqno) + - TCP_TCPLEN(pcb->unacked))); - - next = pcb->unacked; - 80090c2: 687b ldr r3, [r7, #4] - 80090c4: 6edb ldr r3, [r3, #108] ; 0x6c - 80090c6: 62fb str r3, [r7, #44] ; 0x2c - pcb->unacked = pcb->unacked->next; - 80090c8: 687b ldr r3, [r7, #4] - 80090ca: 6edb ldr r3, [r3, #108] ; 0x6c - 80090cc: 681a ldr r2, [r3, #0] - 80090ce: 687b ldr r3, [r7, #4] - 80090d0: 66da str r2, [r3, #108] ; 0x6c - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); - LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); - 80090d2: 687b ldr r3, [r7, #4] - 80090d4: f8b3 4062 ldrh.w r4, [r3, #98] ; 0x62 - 80090d8: 6afb ldr r3, [r7, #44] ; 0x2c - 80090da: 685b ldr r3, [r3, #4] - 80090dc: 4618 mov r0, r3 - 80090de: f7fd f963 bl 80063a8 - 80090e2: 4603 mov r3, r0 - 80090e4: 429c cmp r4, r3 - 80090e6: d206 bcs.n 80090f6 - 80090e8: 4b70 ldr r3, [pc, #448] ; (80092ac ) - 80090ea: f240 429e movw r2, #1182 ; 0x49e - 80090ee: 4970 ldr r1, [pc, #448] ; (80092b0 ) - 80090f0: 4870 ldr r0, [pc, #448] ; (80092b4 ) - 80090f2: f006 fce7 bl 800fac4 - - pcb->snd_queuelen -= pbuf_clen(next->p); - 80090f6: 6afb ldr r3, [r7, #44] ; 0x2c - 80090f8: 685b ldr r3, [r3, #4] - 80090fa: 4618 mov r0, r3 - 80090fc: f7fd f954 bl 80063a8 - 8009100: 4603 mov r3, r0 - 8009102: 461a mov r2, r3 - 8009104: 687b ldr r3, [r7, #4] - 8009106: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 800910a: 1a9b subs r3, r3, r2 - 800910c: b29a uxth r2, r3 - 800910e: 687b ldr r3, [r7, #4] - 8009110: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 - recv_acked += next->len; - 8009114: 6afb ldr r3, [r7, #44] ; 0x2c - 8009116: 891a ldrh r2, [r3, #8] - 8009118: 4b67 ldr r3, [pc, #412] ; (80092b8 ) - 800911a: 881b ldrh r3, [r3, #0] - 800911c: 4413 add r3, r2 - 800911e: b29a uxth r2, r3 - 8009120: 4b65 ldr r3, [pc, #404] ; (80092b8 ) - 8009122: 801a strh r2, [r3, #0] - tcp_seg_free(next); - 8009124: 6af8 ldr r0, [r7, #44] ; 0x2c - 8009126: f7fe fa09 bl 800753c - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unacked)\n", (tcpwnd_size_t)pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - 800912a: 687b ldr r3, [r7, #4] - 800912c: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 8009130: 2b00 cmp r3, #0 - 8009132: d00e beq.n 8009152 - LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL || - 8009134: 687b ldr r3, [r7, #4] - 8009136: 6edb ldr r3, [r3, #108] ; 0x6c - 8009138: 2b00 cmp r3, #0 - 800913a: d10a bne.n 8009152 - 800913c: 687b ldr r3, [r7, #4] - 800913e: 6e9b ldr r3, [r3, #104] ; 0x68 - 8009140: 2b00 cmp r3, #0 - 8009142: d106 bne.n 8009152 - 8009144: 4b59 ldr r3, [pc, #356] ; (80092ac ) - 8009146: f240 42a6 movw r2, #1190 ; 0x4a6 - 800914a: 495c ldr r1, [pc, #368] ; (80092bc ) - 800914c: 4859 ldr r0, [pc, #356] ; (80092b4 ) - 800914e: f006 fcb9 bl 800fac4 - while (pcb->unacked != NULL && - 8009152: 687b ldr r3, [r7, #4] - 8009154: 6edb ldr r3, [r3, #108] ; 0x6c - 8009156: 2b00 cmp r3, #0 - 8009158: d022 beq.n 80091a0 - TCP_SEQ_LEQ(lwip_ntohl(pcb->unacked->tcphdr->seqno) + - 800915a: 687b ldr r3, [r7, #4] - 800915c: 6edb ldr r3, [r3, #108] ; 0x6c - 800915e: 68db ldr r3, [r3, #12] - 8009160: 685b ldr r3, [r3, #4] - 8009162: 4618 mov r0, r3 - 8009164: f7fb ff84 bl 8005070 - 8009168: 4604 mov r4, r0 - 800916a: 687b ldr r3, [r7, #4] - 800916c: 6edb ldr r3, [r3, #108] ; 0x6c - 800916e: 891b ldrh r3, [r3, #8] - 8009170: 461d mov r5, r3 - 8009172: 687b ldr r3, [r7, #4] - 8009174: 6edb ldr r3, [r3, #108] ; 0x6c - 8009176: 68db ldr r3, [r3, #12] - 8009178: 899b ldrh r3, [r3, #12] - 800917a: b29b uxth r3, r3 - 800917c: 4618 mov r0, r3 - 800917e: f7fb ff6a bl 8005056 - 8009182: 4603 mov r3, r0 - 8009184: f003 0303 and.w r3, r3, #3 - 8009188: 2b00 cmp r3, #0 - 800918a: d001 beq.n 8009190 - 800918c: 2301 movs r3, #1 - 800918e: e000 b.n 8009192 - 8009190: 2300 movs r3, #0 - 8009192: 442b add r3, r5 - 8009194: 18e2 adds r2, r4, r3 - 8009196: 4b4a ldr r3, [pc, #296] ; (80092c0 ) - 8009198: 681b ldr r3, [r3, #0] - 800919a: 1ad3 subs r3, r2, r3 - while (pcb->unacked != NULL && - 800919c: 2b00 cmp r3, #0 - 800919e: dd90 ble.n 80090c2 - } - } - - /* If there's nothing left to acknowledge, stop the retransmit - timer, otherwise reset it to start again */ - if (pcb->unacked == NULL) { - 80091a0: 687b ldr r3, [r7, #4] - 80091a2: 6edb ldr r3, [r3, #108] ; 0x6c - 80091a4: 2b00 cmp r3, #0 - 80091a6: d104 bne.n 80091b2 - pcb->rtime = -1; - 80091a8: 687b ldr r3, [r7, #4] - 80091aa: f64f 72ff movw r2, #65535 ; 0xffff - 80091ae: 861a strh r2, [r3, #48] ; 0x30 - 80091b0: e002 b.n 80091b8 - } else { - pcb->rtime = 0; - 80091b2: 687b ldr r3, [r7, #4] - 80091b4: 2200 movs r2, #0 - 80091b6: 861a strh r2, [r3, #48] ; 0x30 - } - - pcb->polltmr = 0; - 80091b8: 687b ldr r3, [r7, #4] - 80091ba: 2200 movs r2, #0 - 80091bc: 76da strb r2, [r3, #27] - 80091be: e002 b.n 80091c6 - nd6_reachability_hint(ip6_current_src_addr()); - } -#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ - } else { - /* Out of sequence ACK, didn't really ack anything */ - tcp_send_empty_ack(pcb); - 80091c0: 6878 ldr r0, [r7, #4] - 80091c2: f001 f8fd bl 800a3c0 - on the list are acknowledged by the ACK. This may seem - strange since an "unsent" segment shouldn't be acked. The - rationale is that lwIP puts all outstanding segments on the - ->unsent list after a retransmission, so these segments may - in fact have been sent once. */ - while (pcb->unsent != NULL && - 80091c6: e04f b.n 8009268 - TCP_TCPLEN(pcb->unsent), pcb->snd_nxt)) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unsent\n", - lwip_ntohl(pcb->unsent->tcphdr->seqno), lwip_ntohl(pcb->unsent->tcphdr->seqno) + - TCP_TCPLEN(pcb->unsent))); - - next = pcb->unsent; - 80091c8: 687b ldr r3, [r7, #4] - 80091ca: 6e9b ldr r3, [r3, #104] ; 0x68 - 80091cc: 62fb str r3, [r7, #44] ; 0x2c - pcb->unsent = pcb->unsent->next; - 80091ce: 687b ldr r3, [r7, #4] - 80091d0: 6e9b ldr r3, [r3, #104] ; 0x68 - 80091d2: 681a ldr r2, [r3, #0] - 80091d4: 687b ldr r3, [r7, #4] - 80091d6: 669a str r2, [r3, #104] ; 0x68 -#if TCP_OVERSIZE - if (pcb->unsent == NULL) { - 80091d8: 687b ldr r3, [r7, #4] - 80091da: 6e9b ldr r3, [r3, #104] ; 0x68 - 80091dc: 2b00 cmp r3, #0 - 80091de: d103 bne.n 80091e8 - pcb->unsent_oversize = 0; - 80091e0: 687b ldr r3, [r7, #4] - 80091e2: 2200 movs r2, #0 - 80091e4: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 - } -#endif /* TCP_OVERSIZE */ - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); - LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); - 80091e8: 687b ldr r3, [r7, #4] - 80091ea: f8b3 4062 ldrh.w r4, [r3, #98] ; 0x62 - 80091ee: 6afb ldr r3, [r7, #44] ; 0x2c - 80091f0: 685b ldr r3, [r3, #4] - 80091f2: 4618 mov r0, r3 - 80091f4: f7fd f8d8 bl 80063a8 - 80091f8: 4603 mov r3, r0 - 80091fa: 429c cmp r4, r3 - 80091fc: d206 bcs.n 800920c - 80091fe: 4b2b ldr r3, [pc, #172] ; (80092ac ) - 8009200: f240 42d5 movw r2, #1237 ; 0x4d5 - 8009204: 492a ldr r1, [pc, #168] ; (80092b0 ) - 8009206: 482b ldr r0, [pc, #172] ; (80092b4 ) - 8009208: f006 fc5c bl 800fac4 - /* Prevent ACK for FIN to generate a sent event */ - pcb->snd_queuelen -= pbuf_clen(next->p); - 800920c: 6afb ldr r3, [r7, #44] ; 0x2c - 800920e: 685b ldr r3, [r3, #4] - 8009210: 4618 mov r0, r3 - 8009212: f7fd f8c9 bl 80063a8 - 8009216: 4603 mov r3, r0 - 8009218: 461a mov r2, r3 - 800921a: 687b ldr r3, [r7, #4] - 800921c: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 8009220: 1a9b subs r3, r3, r2 - 8009222: b29a uxth r2, r3 - 8009224: 687b ldr r3, [r7, #4] - 8009226: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 - recv_acked += next->len; - 800922a: 6afb ldr r3, [r7, #44] ; 0x2c - 800922c: 891a ldrh r2, [r3, #8] - 800922e: 4b22 ldr r3, [pc, #136] ; (80092b8 ) - 8009230: 881b ldrh r3, [r3, #0] - 8009232: 4413 add r3, r2 - 8009234: b29a uxth r2, r3 - 8009236: 4b20 ldr r3, [pc, #128] ; (80092b8 ) - 8009238: 801a strh r2, [r3, #0] - tcp_seg_free(next); - 800923a: 6af8 ldr r0, [r7, #44] ; 0x2c - 800923c: f7fe f97e bl 800753c - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unsent)\n", (tcpwnd_size_t)pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - 8009240: 687b ldr r3, [r7, #4] - 8009242: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 8009246: 2b00 cmp r3, #0 - 8009248: d00e beq.n 8009268 - LWIP_ASSERT("tcp_receive: valid queue length", - 800924a: 687b ldr r3, [r7, #4] - 800924c: 6edb ldr r3, [r3, #108] ; 0x6c - 800924e: 2b00 cmp r3, #0 - 8009250: d10a bne.n 8009268 - 8009252: 687b ldr r3, [r7, #4] - 8009254: 6e9b ldr r3, [r3, #104] ; 0x68 - 8009256: 2b00 cmp r3, #0 - 8009258: d106 bne.n 8009268 - 800925a: 4b14 ldr r3, [pc, #80] ; (80092ac ) - 800925c: f240 42dc movw r2, #1244 ; 0x4dc - 8009260: 4916 ldr r1, [pc, #88] ; (80092bc ) - 8009262: 4814 ldr r0, [pc, #80] ; (80092b4 ) - 8009264: f006 fc2e bl 800fac4 - while (pcb->unsent != NULL && - 8009268: 687b ldr r3, [r7, #4] - 800926a: 6e9b ldr r3, [r3, #104] ; 0x68 - 800926c: 2b00 cmp r3, #0 - 800926e: d037 beq.n 80092e0 - TCP_SEQ_BETWEEN(ackno, lwip_ntohl(pcb->unsent->tcphdr->seqno) + - 8009270: 4b13 ldr r3, [pc, #76] ; (80092c0 ) - 8009272: 681c ldr r4, [r3, #0] - 8009274: 687b ldr r3, [r7, #4] - 8009276: 6e9b ldr r3, [r3, #104] ; 0x68 - 8009278: 68db ldr r3, [r3, #12] - 800927a: 685b ldr r3, [r3, #4] - 800927c: 4618 mov r0, r3 - 800927e: f7fb fef7 bl 8005070 - 8009282: 4605 mov r5, r0 - 8009284: 687b ldr r3, [r7, #4] - 8009286: 6e9b ldr r3, [r3, #104] ; 0x68 - 8009288: 891b ldrh r3, [r3, #8] - 800928a: 461e mov r6, r3 - 800928c: 687b ldr r3, [r7, #4] - 800928e: 6e9b ldr r3, [r3, #104] ; 0x68 - 8009290: 68db ldr r3, [r3, #12] - 8009292: 899b ldrh r3, [r3, #12] - 8009294: b29b uxth r3, r3 - 8009296: 4618 mov r0, r3 - 8009298: f7fb fedd bl 8005056 - 800929c: 4603 mov r3, r0 - 800929e: f003 0303 and.w r3, r3, #3 - 80092a2: 2b00 cmp r3, #0 - 80092a4: d00e beq.n 80092c4 - 80092a6: 2301 movs r3, #1 - 80092a8: e00d b.n 80092c6 - 80092aa: bf00 nop - 80092ac: 08011640 .word 0x08011640 - 80092b0: 08011880 .word 0x08011880 - 80092b4: 08011684 .word 0x08011684 - 80092b8: 20006da4 .word 0x20006da4 - 80092bc: 080118a8 .word 0x080118a8 - 80092c0: 20006da0 .word 0x20006da0 - 80092c4: 2300 movs r3, #0 - 80092c6: 4433 add r3, r6 - 80092c8: 442b add r3, r5 - 80092ca: 1ae3 subs r3, r4, r3 - while (pcb->unsent != NULL && - 80092cc: 2b00 cmp r3, #0 - 80092ce: db07 blt.n 80092e0 - TCP_SEQ_BETWEEN(ackno, lwip_ntohl(pcb->unsent->tcphdr->seqno) + - 80092d0: 4b8d ldr r3, [pc, #564] ; (8009508 ) - 80092d2: 681a ldr r2, [r3, #0] - 80092d4: 687b ldr r3, [r7, #4] - 80092d6: 6cdb ldr r3, [r3, #76] ; 0x4c - 80092d8: 1ad3 subs r3, r2, r3 - 80092da: 2b00 cmp r3, #0 - 80092dc: f77f af74 ble.w 80091c8 - pcb->unacked != NULL || pcb->unsent != NULL); - } - } - pcb->snd_buf += recv_acked; - 80092e0: 687b ldr r3, [r7, #4] - 80092e2: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 - 80092e6: 4b89 ldr r3, [pc, #548] ; (800950c ) - 80092e8: 881b ldrh r3, [r3, #0] - 80092ea: 4413 add r3, r2 - 80092ec: b29a uxth r2, r3 - 80092ee: 687b ldr r3, [r7, #4] - 80092f0: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 - pcb->rttest, pcb->rtseq, ackno)); - - /* RTT estimation calculations. This is done by checking if the - incoming segment acknowledges the segment we use to take a - round-trip time measurement. */ - if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { - 80092f4: 687b ldr r3, [r7, #4] - 80092f6: 6b5b ldr r3, [r3, #52] ; 0x34 - 80092f8: 2b00 cmp r3, #0 - 80092fa: d052 beq.n 80093a2 - 80092fc: 687b ldr r3, [r7, #4] - 80092fe: 6b9a ldr r2, [r3, #56] ; 0x38 - 8009300: 4b81 ldr r3, [pc, #516] ; (8009508 ) - 8009302: 681b ldr r3, [r3, #0] - 8009304: 1ad3 subs r3, r2, r3 - 8009306: 2b00 cmp r3, #0 - 8009308: da4b bge.n 80093a2 - /* diff between this shouldn't exceed 32K since this are tcp timer ticks - and a round-trip shouldn't be that long... */ - m = (s16_t)(tcp_ticks - pcb->rttest); - 800930a: 4b81 ldr r3, [pc, #516] ; (8009510 ) - 800930c: 681b ldr r3, [r3, #0] - 800930e: b29a uxth r2, r3 - 8009310: 687b ldr r3, [r7, #4] - 8009312: 6b5b ldr r3, [r3, #52] ; 0x34 - 8009314: b29b uxth r3, r3 - 8009316: 1ad3 subs r3, r2, r3 - 8009318: b29b uxth r3, r3 - 800931a: 847b strh r3, [r7, #34] ; 0x22 - - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", - m, (u16_t)(m * TCP_SLOW_INTERVAL))); - - /* This is taken directly from VJs original code in his paper */ - m = m - (pcb->sa >> 3); - 800931c: 8c7a ldrh r2, [r7, #34] ; 0x22 - 800931e: 687b ldr r3, [r7, #4] - 8009320: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c - 8009324: 10db asrs r3, r3, #3 - 8009326: b21b sxth r3, r3 - 8009328: b29b uxth r3, r3 - 800932a: 1ad3 subs r3, r2, r3 - 800932c: b29b uxth r3, r3 - 800932e: 847b strh r3, [r7, #34] ; 0x22 - pcb->sa += m; - 8009330: 687b ldr r3, [r7, #4] - 8009332: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c - 8009336: b29a uxth r2, r3 - 8009338: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800933a: 4413 add r3, r2 - 800933c: b29b uxth r3, r3 - 800933e: b21a sxth r2, r3 - 8009340: 687b ldr r3, [r7, #4] - 8009342: 879a strh r2, [r3, #60] ; 0x3c - if (m < 0) { - 8009344: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22 - 8009348: 2b00 cmp r3, #0 - 800934a: da03 bge.n 8009354 - m = -m; - 800934c: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800934e: 425b negs r3, r3 - 8009350: b29b uxth r3, r3 - 8009352: 847b strh r3, [r7, #34] ; 0x22 - } - m = m - (pcb->sv >> 2); - 8009354: 8c7a ldrh r2, [r7, #34] ; 0x22 - 8009356: 687b ldr r3, [r7, #4] - 8009358: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e - 800935c: 109b asrs r3, r3, #2 - 800935e: b21b sxth r3, r3 - 8009360: b29b uxth r3, r3 - 8009362: 1ad3 subs r3, r2, r3 - 8009364: b29b uxth r3, r3 - 8009366: 847b strh r3, [r7, #34] ; 0x22 - pcb->sv += m; - 8009368: 687b ldr r3, [r7, #4] - 800936a: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e - 800936e: b29a uxth r2, r3 - 8009370: 8c7b ldrh r3, [r7, #34] ; 0x22 - 8009372: 4413 add r3, r2 - 8009374: b29b uxth r3, r3 - 8009376: b21a sxth r2, r3 - 8009378: 687b ldr r3, [r7, #4] - 800937a: 87da strh r2, [r3, #62] ; 0x3e - pcb->rto = (pcb->sa >> 3) + pcb->sv; - 800937c: 687b ldr r3, [r7, #4] - 800937e: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c - 8009382: 10db asrs r3, r3, #3 - 8009384: b21b sxth r3, r3 - 8009386: b29a uxth r2, r3 - 8009388: 687b ldr r3, [r7, #4] - 800938a: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e - 800938e: b29b uxth r3, r3 - 8009390: 4413 add r3, r2 - 8009392: b29b uxth r3, r3 - 8009394: b21a sxth r2, r3 - 8009396: 687b ldr r3, [r7, #4] - 8009398: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 - - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n", - pcb->rto, (u16_t)(pcb->rto * TCP_SLOW_INTERVAL))); - - pcb->rttest = 0; - 800939c: 687b ldr r3, [r7, #4] - 800939e: 2200 movs r2, #0 - 80093a0: 635a str r2, [r3, #52] ; 0x34 - - /* If the incoming segment contains data, we must process it - further unless the pcb already received a FIN. - (RFC 793, chapter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING, - LAST-ACK and TIME-WAIT: "Ignore the segment text.") */ - if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) { - 80093a2: 4b5c ldr r3, [pc, #368] ; (8009514 ) - 80093a4: 881b ldrh r3, [r3, #0] - 80093a6: 2b00 cmp r3, #0 - 80093a8: f000 84f1 beq.w 8009d8e - 80093ac: 687b ldr r3, [r7, #4] - 80093ae: 7d1b ldrb r3, [r3, #20] - 80093b0: 2b06 cmp r3, #6 - 80093b2: f200 84ec bhi.w 8009d8e - this if the sequence number of the incoming segment is less - than rcv_nxt, and the sequence number plus the length of the - segment is larger than rcv_nxt. */ - /* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { - if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/ - if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { - 80093b6: 687b ldr r3, [r7, #4] - 80093b8: 6a5a ldr r2, [r3, #36] ; 0x24 - 80093ba: 4b57 ldr r3, [pc, #348] ; (8009518 ) - 80093bc: 681b ldr r3, [r3, #0] - 80093be: 1ad3 subs r3, r2, r3 - 80093c0: 3b01 subs r3, #1 - 80093c2: 2b00 cmp r3, #0 - 80093c4: f2c0 80b8 blt.w 8009538 - 80093c8: 687b ldr r3, [r7, #4] - 80093ca: 6a5a ldr r2, [r3, #36] ; 0x24 - 80093cc: 4b51 ldr r3, [pc, #324] ; (8009514 ) - 80093ce: 881b ldrh r3, [r3, #0] - 80093d0: 4619 mov r1, r3 - 80093d2: 4b51 ldr r3, [pc, #324] ; (8009518 ) - 80093d4: 681b ldr r3, [r3, #0] - 80093d6: 440b add r3, r1 - 80093d8: 1ad3 subs r3, r2, r3 - 80093da: 3301 adds r3, #1 - 80093dc: 2b00 cmp r3, #0 - 80093de: f300 80ab bgt.w 8009538 - - After we are done with adjusting the pbuf pointers we must - adjust the ->data pointer in the seg and the segment - length.*/ - - struct pbuf *p = inseg.p; - 80093e2: 4b4e ldr r3, [pc, #312] ; (800951c ) - 80093e4: 685b ldr r3, [r3, #4] - 80093e6: 61bb str r3, [r7, #24] - off = pcb->rcv_nxt - seqno; - 80093e8: 687b ldr r3, [r7, #4] - 80093ea: 6a5a ldr r2, [r3, #36] ; 0x24 - 80093ec: 4b4a ldr r3, [pc, #296] ; (8009518 ) - 80093ee: 681b ldr r3, [r3, #0] - 80093f0: 1ad3 subs r3, r2, r3 - 80093f2: 627b str r3, [r7, #36] ; 0x24 - LWIP_ASSERT("inseg.p != NULL", inseg.p); - 80093f4: 4b49 ldr r3, [pc, #292] ; (800951c ) - 80093f6: 685b ldr r3, [r3, #4] - 80093f8: 2b00 cmp r3, #0 - 80093fa: d106 bne.n 800940a - 80093fc: 4b48 ldr r3, [pc, #288] ; (8009520 ) - 80093fe: f240 523c movw r2, #1340 ; 0x53c - 8009402: 4948 ldr r1, [pc, #288] ; (8009524 ) - 8009404: 4848 ldr r0, [pc, #288] ; (8009528 ) - 8009406: f006 fb5d bl 800fac4 - LWIP_ASSERT("insane offset!", (off < 0x7fff)); - 800940a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800940c: f647 72fe movw r2, #32766 ; 0x7ffe - 8009410: 4293 cmp r3, r2 - 8009412: dd06 ble.n 8009422 - 8009414: 4b42 ldr r3, [pc, #264] ; (8009520 ) - 8009416: f240 523d movw r2, #1341 ; 0x53d - 800941a: 4944 ldr r1, [pc, #272] ; (800952c ) - 800941c: 4842 ldr r0, [pc, #264] ; (8009528 ) - 800941e: f006 fb51 bl 800fac4 - if (inseg.p->len < off) { - 8009422: 4b3e ldr r3, [pc, #248] ; (800951c ) - 8009424: 685b ldr r3, [r3, #4] - 8009426: 895b ldrh r3, [r3, #10] - 8009428: 461a mov r2, r3 - 800942a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800942c: 4293 cmp r3, r2 - 800942e: dd3e ble.n 80094ae - LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); - 8009430: 4b3a ldr r3, [pc, #232] ; (800951c ) - 8009432: 685b ldr r3, [r3, #4] - 8009434: 891b ldrh r3, [r3, #8] - 8009436: 461a mov r2, r3 - 8009438: 6a7b ldr r3, [r7, #36] ; 0x24 - 800943a: 4293 cmp r3, r2 - 800943c: dd06 ble.n 800944c - 800943e: 4b38 ldr r3, [pc, #224] ; (8009520 ) - 8009440: f240 523f movw r2, #1343 ; 0x53f - 8009444: 493a ldr r1, [pc, #232] ; (8009530 ) - 8009446: 4838 ldr r0, [pc, #224] ; (8009528 ) - 8009448: f006 fb3c bl 800fac4 - new_tot_len = (u16_t)(inseg.p->tot_len - off); - 800944c: 4b33 ldr r3, [pc, #204] ; (800951c ) - 800944e: 685b ldr r3, [r3, #4] - 8009450: 891a ldrh r2, [r3, #8] - 8009452: 6a7b ldr r3, [r7, #36] ; 0x24 - 8009454: b29b uxth r3, r3 - 8009456: 1ad3 subs r3, r2, r3 - 8009458: 823b strh r3, [r7, #16] - while (p->len < off) { - 800945a: e00e b.n 800947a - off -= p->len; - 800945c: 69bb ldr r3, [r7, #24] - 800945e: 895b ldrh r3, [r3, #10] - 8009460: 461a mov r2, r3 - 8009462: 6a7b ldr r3, [r7, #36] ; 0x24 - 8009464: 1a9b subs r3, r3, r2 - 8009466: 627b str r3, [r7, #36] ; 0x24 - /* KJM following line changed (with addition of new_tot_len var) - to fix bug #9076 - inseg.p->tot_len -= p->len; */ - p->tot_len = new_tot_len; - 8009468: 69bb ldr r3, [r7, #24] - 800946a: 8a3a ldrh r2, [r7, #16] - 800946c: 811a strh r2, [r3, #8] - p->len = 0; - 800946e: 69bb ldr r3, [r7, #24] - 8009470: 2200 movs r2, #0 - 8009472: 815a strh r2, [r3, #10] - p = p->next; - 8009474: 69bb ldr r3, [r7, #24] - 8009476: 681b ldr r3, [r3, #0] - 8009478: 61bb str r3, [r7, #24] - while (p->len < off) { - 800947a: 69bb ldr r3, [r7, #24] - 800947c: 895b ldrh r3, [r3, #10] - 800947e: 461a mov r2, r3 - 8009480: 6a7b ldr r3, [r7, #36] ; 0x24 - 8009482: 4293 cmp r3, r2 - 8009484: dcea bgt.n 800945c - } - if (pbuf_header(p, (s16_t)-off)) { - 8009486: 6a7b ldr r3, [r7, #36] ; 0x24 - 8009488: b29b uxth r3, r3 - 800948a: 425b negs r3, r3 - 800948c: b29b uxth r3, r3 - 800948e: b21b sxth r3, r3 - 8009490: 4619 mov r1, r3 - 8009492: 69b8 ldr r0, [r7, #24] - 8009494: f7fc fed0 bl 8006238 - 8009498: 4603 mov r3, r0 - 800949a: 2b00 cmp r3, #0 - 800949c: d01c beq.n 80094d8 - /* Do we need to cope with this failing? Assert for now */ - LWIP_ASSERT("pbuf_header failed", 0); - 800949e: 4b20 ldr r3, [pc, #128] ; (8009520 ) - 80094a0: f240 524c movw r2, #1356 ; 0x54c - 80094a4: 4923 ldr r1, [pc, #140] ; (8009534 ) - 80094a6: 4820 ldr r0, [pc, #128] ; (8009528 ) - 80094a8: f006 fb0c bl 800fac4 - 80094ac: e014 b.n 80094d8 - } - } else { - if (pbuf_header(inseg.p, (s16_t)-off)) { - 80094ae: 4b1b ldr r3, [pc, #108] ; (800951c ) - 80094b0: 685b ldr r3, [r3, #4] - 80094b2: 6a7a ldr r2, [r7, #36] ; 0x24 - 80094b4: b292 uxth r2, r2 - 80094b6: 4252 negs r2, r2 - 80094b8: b292 uxth r2, r2 - 80094ba: b212 sxth r2, r2 - 80094bc: 4611 mov r1, r2 - 80094be: 4618 mov r0, r3 - 80094c0: f7fc feba bl 8006238 - 80094c4: 4603 mov r3, r0 - 80094c6: 2b00 cmp r3, #0 - 80094c8: d006 beq.n 80094d8 - /* Do we need to cope with this failing? Assert for now */ - LWIP_ASSERT("pbuf_header failed", 0); - 80094ca: 4b15 ldr r3, [pc, #84] ; (8009520 ) - 80094cc: f240 5251 movw r2, #1361 ; 0x551 - 80094d0: 4918 ldr r1, [pc, #96] ; (8009534 ) - 80094d2: 4815 ldr r0, [pc, #84] ; (8009528 ) - 80094d4: f006 faf6 bl 800fac4 - } - } - inseg.len -= (u16_t)(pcb->rcv_nxt - seqno); - 80094d8: 4b10 ldr r3, [pc, #64] ; (800951c ) - 80094da: 891a ldrh r2, [r3, #8] - 80094dc: 4b0e ldr r3, [pc, #56] ; (8009518 ) - 80094de: 681b ldr r3, [r3, #0] - 80094e0: b299 uxth r1, r3 - 80094e2: 687b ldr r3, [r7, #4] - 80094e4: 6a5b ldr r3, [r3, #36] ; 0x24 - 80094e6: b29b uxth r3, r3 - 80094e8: 1acb subs r3, r1, r3 - 80094ea: b29b uxth r3, r3 - 80094ec: 4413 add r3, r2 - 80094ee: b29a uxth r2, r3 - 80094f0: 4b0a ldr r3, [pc, #40] ; (800951c ) - 80094f2: 811a strh r2, [r3, #8] - inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; - 80094f4: 687b ldr r3, [r7, #4] - 80094f6: 6a5b ldr r3, [r3, #36] ; 0x24 - 80094f8: 4a07 ldr r2, [pc, #28] ; (8009518 ) - 80094fa: 6013 str r3, [r2, #0] - 80094fc: 4b07 ldr r3, [pc, #28] ; (800951c ) - 80094fe: 68db ldr r3, [r3, #12] - 8009500: 4a05 ldr r2, [pc, #20] ; (8009518 ) - 8009502: 6812 ldr r2, [r2, #0] - 8009504: 605a str r2, [r3, #4] - if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { - 8009506: e025 b.n 8009554 - 8009508: 20006da0 .word 0x20006da0 - 800950c: 20006da4 .word 0x20006da4 - 8009510: 20006d64 .word 0x20006d64 - 8009514: 20006da6 .word 0x20006da6 - 8009518: 20006d9c .word 0x20006d9c - 800951c: 20006d7c .word 0x20006d7c - 8009520: 08011640 .word 0x08011640 - 8009524: 080118c8 .word 0x080118c8 - 8009528: 08011684 .word 0x08011684 - 800952c: 080118d8 .word 0x080118d8 - 8009530: 080118e8 .word 0x080118e8 - 8009534: 080118f8 .word 0x080118f8 - } - else { - if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { - 8009538: 4b87 ldr r3, [pc, #540] ; (8009758 ) - 800953a: 681a ldr r2, [r3, #0] - 800953c: 687b ldr r3, [r7, #4] - 800953e: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009540: 1ad3 subs r3, r2, r3 - 8009542: 2b00 cmp r3, #0 - 8009544: da06 bge.n 8009554 - /* the whole segment is < rcv_nxt */ - /* must be a duplicate of a packet that has already been correctly handled */ - - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno)); - tcp_ack_now(pcb); - 8009546: 687b ldr r3, [r7, #4] - 8009548: 7e9b ldrb r3, [r3, #26] - 800954a: f043 0302 orr.w r3, r3, #2 - 800954e: b2da uxtb r2, r3 - 8009550: 687b ldr r3, [r7, #4] - 8009552: 769a strb r2, [r3, #26] - } - - /* The sequence number must be within the window (above rcv_nxt - and below rcv_nxt + rcv_wnd) in order to be further - processed. */ - if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, - 8009554: 4b80 ldr r3, [pc, #512] ; (8009758 ) - 8009556: 681a ldr r2, [r3, #0] - 8009558: 687b ldr r3, [r7, #4] - 800955a: 6a5b ldr r3, [r3, #36] ; 0x24 - 800955c: 1ad3 subs r3, r2, r3 - 800955e: 2b00 cmp r3, #0 - 8009560: f2c0 8410 blt.w 8009d84 - 8009564: 4b7c ldr r3, [pc, #496] ; (8009758 ) - 8009566: 681a ldr r2, [r3, #0] - 8009568: 687b ldr r3, [r7, #4] - 800956a: 6a5b ldr r3, [r3, #36] ; 0x24 - 800956c: 6879 ldr r1, [r7, #4] - 800956e: 8d09 ldrh r1, [r1, #40] ; 0x28 - 8009570: 440b add r3, r1 - 8009572: 1ad3 subs r3, r2, r3 - 8009574: 3301 adds r3, #1 - 8009576: 2b00 cmp r3, #0 - 8009578: f300 8404 bgt.w 8009d84 - pcb->rcv_nxt + pcb->rcv_wnd - 1)) { - if (pcb->rcv_nxt == seqno) { - 800957c: 687b ldr r3, [r7, #4] - 800957e: 6a5a ldr r2, [r3, #36] ; 0x24 - 8009580: 4b75 ldr r3, [pc, #468] ; (8009758 ) - 8009582: 681b ldr r3, [r3, #0] - 8009584: 429a cmp r2, r3 - 8009586: f040 8287 bne.w 8009a98 - /* The incoming segment is the next in sequence. We check if - we have to trim the end of the segment and update rcv_nxt - and pass the data to the application. */ - tcplen = TCP_TCPLEN(&inseg); - 800958a: 4b74 ldr r3, [pc, #464] ; (800975c ) - 800958c: 891c ldrh r4, [r3, #8] - 800958e: 4b73 ldr r3, [pc, #460] ; (800975c ) - 8009590: 68db ldr r3, [r3, #12] - 8009592: 899b ldrh r3, [r3, #12] - 8009594: b29b uxth r3, r3 - 8009596: 4618 mov r0, r3 - 8009598: f7fb fd5d bl 8005056 - 800959c: 4603 mov r3, r0 - 800959e: f003 0303 and.w r3, r3, #3 - 80095a2: 2b00 cmp r3, #0 - 80095a4: d001 beq.n 80095aa - 80095a6: 2301 movs r3, #1 - 80095a8: e000 b.n 80095ac - 80095aa: 2300 movs r3, #0 - 80095ac: 4423 add r3, r4 - 80095ae: b29a uxth r2, r3 - 80095b0: 4b6b ldr r3, [pc, #428] ; (8009760 ) - 80095b2: 801a strh r2, [r3, #0] - - if (tcplen > pcb->rcv_wnd) { - 80095b4: 687b ldr r3, [r7, #4] - 80095b6: 8d1a ldrh r2, [r3, #40] ; 0x28 - 80095b8: 4b69 ldr r3, [pc, #420] ; (8009760 ) - 80095ba: 881b ldrh r3, [r3, #0] - 80095bc: 429a cmp r2, r3 - 80095be: d26e bcs.n 800969e - LWIP_DEBUGF(TCP_INPUT_DEBUG, - ("tcp_receive: other end overran receive window" - "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", - seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); - if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { - 80095c0: 4b66 ldr r3, [pc, #408] ; (800975c ) - 80095c2: 68db ldr r3, [r3, #12] - 80095c4: 899b ldrh r3, [r3, #12] - 80095c6: b29b uxth r3, r3 - 80095c8: 4618 mov r0, r3 - 80095ca: f7fb fd44 bl 8005056 - 80095ce: 4603 mov r3, r0 - 80095d0: f003 0301 and.w r3, r3, #1 - 80095d4: 2b00 cmp r3, #0 - 80095d6: d01b beq.n 8009610 - /* Must remove the FIN from the header as we're trimming - * that byte of sequence-space from the packet */ - TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN); - 80095d8: 4b60 ldr r3, [pc, #384] ; (800975c ) - 80095da: 68db ldr r3, [r3, #12] - 80095dc: 899b ldrh r3, [r3, #12] - 80095de: b29b uxth r3, r3 - 80095e0: f423 537c bic.w r3, r3, #16128 ; 0x3f00 - 80095e4: b29c uxth r4, r3 - 80095e6: 4b5d ldr r3, [pc, #372] ; (800975c ) - 80095e8: 68db ldr r3, [r3, #12] - 80095ea: 899b ldrh r3, [r3, #12] - 80095ec: b29b uxth r3, r3 - 80095ee: 4618 mov r0, r3 - 80095f0: f7fb fd31 bl 8005056 - 80095f4: 4603 mov r3, r0 - 80095f6: f003 033e and.w r3, r3, #62 ; 0x3e - 80095fa: b29b uxth r3, r3 - 80095fc: 4618 mov r0, r3 - 80095fe: f7fb fd2a bl 8005056 - 8009602: 4603 mov r3, r0 - 8009604: 461a mov r2, r3 - 8009606: 4b55 ldr r3, [pc, #340] ; (800975c ) - 8009608: 68db ldr r3, [r3, #12] - 800960a: 4322 orrs r2, r4 - 800960c: b292 uxth r2, r2 - 800960e: 819a strh r2, [r3, #12] - } - /* Adjust length of segment to fit in the window. */ - TCPWND_CHECK16(pcb->rcv_wnd); - inseg.len = (u16_t)pcb->rcv_wnd; - 8009610: 687b ldr r3, [r7, #4] - 8009612: 8d1a ldrh r2, [r3, #40] ; 0x28 - 8009614: 4b51 ldr r3, [pc, #324] ; (800975c ) - 8009616: 811a strh r2, [r3, #8] - if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { - 8009618: 4b50 ldr r3, [pc, #320] ; (800975c ) - 800961a: 68db ldr r3, [r3, #12] - 800961c: 899b ldrh r3, [r3, #12] - 800961e: b29b uxth r3, r3 - 8009620: 4618 mov r0, r3 - 8009622: f7fb fd18 bl 8005056 - 8009626: 4603 mov r3, r0 - 8009628: f003 0302 and.w r3, r3, #2 - 800962c: 2b00 cmp r3, #0 - 800962e: d005 beq.n 800963c - inseg.len -= 1; - 8009630: 4b4a ldr r3, [pc, #296] ; (800975c ) - 8009632: 891b ldrh r3, [r3, #8] - 8009634: 3b01 subs r3, #1 - 8009636: b29a uxth r2, r3 - 8009638: 4b48 ldr r3, [pc, #288] ; (800975c ) - 800963a: 811a strh r2, [r3, #8] - } - pbuf_realloc(inseg.p, inseg.len); - 800963c: 4b47 ldr r3, [pc, #284] ; (800975c ) - 800963e: 685b ldr r3, [r3, #4] - 8009640: 4a46 ldr r2, [pc, #280] ; (800975c ) - 8009642: 8912 ldrh r2, [r2, #8] - 8009644: 4611 mov r1, r2 - 8009646: 4618 mov r0, r3 - 8009648: f7fc fca6 bl 8005f98 - tcplen = TCP_TCPLEN(&inseg); - 800964c: 4b43 ldr r3, [pc, #268] ; (800975c ) - 800964e: 891c ldrh r4, [r3, #8] - 8009650: 4b42 ldr r3, [pc, #264] ; (800975c ) - 8009652: 68db ldr r3, [r3, #12] - 8009654: 899b ldrh r3, [r3, #12] - 8009656: b29b uxth r3, r3 - 8009658: 4618 mov r0, r3 - 800965a: f7fb fcfc bl 8005056 - 800965e: 4603 mov r3, r0 - 8009660: f003 0303 and.w r3, r3, #3 - 8009664: 2b00 cmp r3, #0 - 8009666: d001 beq.n 800966c - 8009668: 2301 movs r3, #1 - 800966a: e000 b.n 800966e - 800966c: 2300 movs r3, #0 - 800966e: 4423 add r3, r4 - 8009670: b29a uxth r2, r3 - 8009672: 4b3b ldr r3, [pc, #236] ; (8009760 ) - 8009674: 801a strh r2, [r3, #0] - LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", - 8009676: 4b3a ldr r3, [pc, #232] ; (8009760 ) - 8009678: 881b ldrh r3, [r3, #0] - 800967a: 461a mov r2, r3 - 800967c: 4b36 ldr r3, [pc, #216] ; (8009758 ) - 800967e: 681b ldr r3, [r3, #0] - 8009680: 441a add r2, r3 - 8009682: 687b ldr r3, [r7, #4] - 8009684: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009686: 6879 ldr r1, [r7, #4] - 8009688: 8d09 ldrh r1, [r1, #40] ; 0x28 - 800968a: 440b add r3, r1 - 800968c: 429a cmp r2, r3 - 800968e: d006 beq.n 800969e - 8009690: 4b34 ldr r3, [pc, #208] ; (8009764 ) - 8009692: f240 527e movw r2, #1406 ; 0x57e - 8009696: 4934 ldr r1, [pc, #208] ; (8009768 ) - 8009698: 4834 ldr r0, [pc, #208] ; (800976c ) - 800969a: f006 fa13 bl 800fac4 - } -#if TCP_QUEUE_OOSEQ - /* Received in-sequence data, adjust ooseq data if: - - FIN has been received or - - inseq overlaps with ooseq */ - if (pcb->ooseq != NULL) { - 800969e: 687b ldr r3, [r7, #4] - 80096a0: 6f1b ldr r3, [r3, #112] ; 0x70 - 80096a2: 2b00 cmp r3, #0 - 80096a4: f000 80e1 beq.w 800986a - if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { - 80096a8: 4b2c ldr r3, [pc, #176] ; (800975c ) - 80096aa: 68db ldr r3, [r3, #12] - 80096ac: 899b ldrh r3, [r3, #12] - 80096ae: b29b uxth r3, r3 - 80096b0: 4618 mov r0, r3 - 80096b2: f7fb fcd0 bl 8005056 - 80096b6: 4603 mov r3, r0 - 80096b8: f003 0301 and.w r3, r3, #1 - 80096bc: 2b00 cmp r3, #0 - 80096be: d010 beq.n 80096e2 - LWIP_DEBUGF(TCP_INPUT_DEBUG, - ("tcp_receive: received in-order FIN, binning ooseq queue\n")); - /* Received in-order FIN means anything that was received - * out of order must now have been received in-order, so - * bin the ooseq queue */ - while (pcb->ooseq != NULL) { - 80096c0: e00a b.n 80096d8 - struct tcp_seg *old_ooseq = pcb->ooseq; - 80096c2: 687b ldr r3, [r7, #4] - 80096c4: 6f1b ldr r3, [r3, #112] ; 0x70 - 80096c6: 60bb str r3, [r7, #8] - pcb->ooseq = pcb->ooseq->next; - 80096c8: 687b ldr r3, [r7, #4] - 80096ca: 6f1b ldr r3, [r3, #112] ; 0x70 - 80096cc: 681a ldr r2, [r3, #0] - 80096ce: 687b ldr r3, [r7, #4] - 80096d0: 671a str r2, [r3, #112] ; 0x70 - tcp_seg_free(old_ooseq); - 80096d2: 68b8 ldr r0, [r7, #8] - 80096d4: f7fd ff32 bl 800753c - while (pcb->ooseq != NULL) { - 80096d8: 687b ldr r3, [r7, #4] - 80096da: 6f1b ldr r3, [r3, #112] ; 0x70 - 80096dc: 2b00 cmp r3, #0 - 80096de: d1f0 bne.n 80096c2 - 80096e0: e0c3 b.n 800986a - } - } else { - next = pcb->ooseq; - 80096e2: 687b ldr r3, [r7, #4] - 80096e4: 6f1b ldr r3, [r3, #112] ; 0x70 - 80096e6: 62fb str r3, [r7, #44] ; 0x2c - /* Remove all segments on ooseq that are covered by inseg already. - * FIN is copied from ooseq to inseg if present. */ - while (next && - 80096e8: e04f b.n 800978a - TCP_SEQ_GEQ(seqno + tcplen, - next->tcphdr->seqno + next->len)) { - /* inseg cannot have FIN here (already processed above) */ - if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && - 80096ea: 6afb ldr r3, [r7, #44] ; 0x2c - 80096ec: 68db ldr r3, [r3, #12] - 80096ee: 899b ldrh r3, [r3, #12] - 80096f0: b29b uxth r3, r3 - 80096f2: 4618 mov r0, r3 - 80096f4: f7fb fcaf bl 8005056 - 80096f8: 4603 mov r3, r0 - 80096fa: f003 0301 and.w r3, r3, #1 - 80096fe: 2b00 cmp r3, #0 - 8009700: d03b beq.n 800977a - (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { - 8009702: 4b16 ldr r3, [pc, #88] ; (800975c ) - 8009704: 68db ldr r3, [r3, #12] - 8009706: 899b ldrh r3, [r3, #12] - 8009708: b29b uxth r3, r3 - 800970a: 4618 mov r0, r3 - 800970c: f7fb fca3 bl 8005056 - 8009710: 4603 mov r3, r0 - 8009712: f003 0302 and.w r3, r3, #2 - if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && - 8009716: 2b00 cmp r3, #0 - 8009718: d12f bne.n 800977a - TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); - 800971a: 4b10 ldr r3, [pc, #64] ; (800975c ) - 800971c: 68db ldr r3, [r3, #12] - 800971e: 899b ldrh r3, [r3, #12] - 8009720: b29c uxth r4, r3 - 8009722: 2001 movs r0, #1 - 8009724: f7fb fc97 bl 8005056 - 8009728: 4603 mov r3, r0 - 800972a: 461a mov r2, r3 - 800972c: 4b0b ldr r3, [pc, #44] ; (800975c ) - 800972e: 68db ldr r3, [r3, #12] - 8009730: 4322 orrs r2, r4 - 8009732: b292 uxth r2, r2 - 8009734: 819a strh r2, [r3, #12] - tcplen = TCP_TCPLEN(&inseg); - 8009736: 4b09 ldr r3, [pc, #36] ; (800975c ) - 8009738: 891c ldrh r4, [r3, #8] - 800973a: 4b08 ldr r3, [pc, #32] ; (800975c ) - 800973c: 68db ldr r3, [r3, #12] - 800973e: 899b ldrh r3, [r3, #12] - 8009740: b29b uxth r3, r3 - 8009742: 4618 mov r0, r3 - 8009744: f7fb fc87 bl 8005056 - 8009748: 4603 mov r3, r0 - 800974a: f003 0303 and.w r3, r3, #3 - 800974e: 2b00 cmp r3, #0 - 8009750: d00e beq.n 8009770 - 8009752: 2301 movs r3, #1 - 8009754: e00d b.n 8009772 - 8009756: bf00 nop - 8009758: 20006d9c .word 0x20006d9c - 800975c: 20006d7c .word 0x20006d7c - 8009760: 20006da6 .word 0x20006da6 - 8009764: 08011640 .word 0x08011640 - 8009768: 0801190c .word 0x0801190c - 800976c: 08011684 .word 0x08011684 - 8009770: 2300 movs r3, #0 - 8009772: 4423 add r3, r4 - 8009774: b29a uxth r2, r3 - 8009776: 4b95 ldr r3, [pc, #596] ; (80099cc ) - 8009778: 801a strh r2, [r3, #0] - } - prev = next; - 800977a: 6afb ldr r3, [r7, #44] ; 0x2c - 800977c: 62bb str r3, [r7, #40] ; 0x28 - next = next->next; - 800977e: 6afb ldr r3, [r7, #44] ; 0x2c - 8009780: 681b ldr r3, [r3, #0] - 8009782: 62fb str r3, [r7, #44] ; 0x2c - tcp_seg_free(prev); - 8009784: 6ab8 ldr r0, [r7, #40] ; 0x28 - 8009786: f7fd fed9 bl 800753c - while (next && - 800978a: 6afb ldr r3, [r7, #44] ; 0x2c - 800978c: 2b00 cmp r3, #0 - 800978e: d00e beq.n 80097ae - TCP_SEQ_GEQ(seqno + tcplen, - 8009790: 4b8e ldr r3, [pc, #568] ; (80099cc ) - 8009792: 881b ldrh r3, [r3, #0] - 8009794: 461a mov r2, r3 - 8009796: 4b8e ldr r3, [pc, #568] ; (80099d0 ) - 8009798: 681b ldr r3, [r3, #0] - 800979a: 441a add r2, r3 - 800979c: 6afb ldr r3, [r7, #44] ; 0x2c - 800979e: 68db ldr r3, [r3, #12] - 80097a0: 685b ldr r3, [r3, #4] - 80097a2: 6af9 ldr r1, [r7, #44] ; 0x2c - 80097a4: 8909 ldrh r1, [r1, #8] - 80097a6: 440b add r3, r1 - 80097a8: 1ad3 subs r3, r2, r3 - while (next && - 80097aa: 2b00 cmp r3, #0 - 80097ac: da9d bge.n 80096ea - } - /* Now trim right side of inseg if it overlaps with the first - * segment on ooseq */ - if (next && - 80097ae: 6afb ldr r3, [r7, #44] ; 0x2c - 80097b0: 2b00 cmp r3, #0 - 80097b2: d057 beq.n 8009864 - TCP_SEQ_GT(seqno + tcplen, - 80097b4: 4b85 ldr r3, [pc, #532] ; (80099cc ) - 80097b6: 881b ldrh r3, [r3, #0] - 80097b8: 461a mov r2, r3 - 80097ba: 4b85 ldr r3, [pc, #532] ; (80099d0 ) - 80097bc: 681b ldr r3, [r3, #0] - 80097be: 441a add r2, r3 - 80097c0: 6afb ldr r3, [r7, #44] ; 0x2c - 80097c2: 68db ldr r3, [r3, #12] - 80097c4: 685b ldr r3, [r3, #4] - 80097c6: 1ad3 subs r3, r2, r3 - if (next && - 80097c8: 2b00 cmp r3, #0 - 80097ca: dd4b ble.n 8009864 - next->tcphdr->seqno)) { - /* inseg cannot have FIN here (already processed above) */ - inseg.len = (u16_t)(next->tcphdr->seqno - seqno); - 80097cc: 6afb ldr r3, [r7, #44] ; 0x2c - 80097ce: 68db ldr r3, [r3, #12] - 80097d0: 685b ldr r3, [r3, #4] - 80097d2: b29a uxth r2, r3 - 80097d4: 4b7e ldr r3, [pc, #504] ; (80099d0 ) - 80097d6: 681b ldr r3, [r3, #0] - 80097d8: b29b uxth r3, r3 - 80097da: 1ad3 subs r3, r2, r3 - 80097dc: b29a uxth r2, r3 - 80097de: 4b7d ldr r3, [pc, #500] ; (80099d4 ) - 80097e0: 811a strh r2, [r3, #8] - if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { - 80097e2: 4b7c ldr r3, [pc, #496] ; (80099d4 ) - 80097e4: 68db ldr r3, [r3, #12] - 80097e6: 899b ldrh r3, [r3, #12] - 80097e8: b29b uxth r3, r3 - 80097ea: 4618 mov r0, r3 - 80097ec: f7fb fc33 bl 8005056 - 80097f0: 4603 mov r3, r0 - 80097f2: f003 0302 and.w r3, r3, #2 - 80097f6: 2b00 cmp r3, #0 - 80097f8: d005 beq.n 8009806 - inseg.len -= 1; - 80097fa: 4b76 ldr r3, [pc, #472] ; (80099d4 ) - 80097fc: 891b ldrh r3, [r3, #8] - 80097fe: 3b01 subs r3, #1 - 8009800: b29a uxth r2, r3 - 8009802: 4b74 ldr r3, [pc, #464] ; (80099d4 ) - 8009804: 811a strh r2, [r3, #8] - } - pbuf_realloc(inseg.p, inseg.len); - 8009806: 4b73 ldr r3, [pc, #460] ; (80099d4 ) - 8009808: 685b ldr r3, [r3, #4] - 800980a: 4a72 ldr r2, [pc, #456] ; (80099d4 ) - 800980c: 8912 ldrh r2, [r2, #8] - 800980e: 4611 mov r1, r2 - 8009810: 4618 mov r0, r3 - 8009812: f7fc fbc1 bl 8005f98 - tcplen = TCP_TCPLEN(&inseg); - 8009816: 4b6f ldr r3, [pc, #444] ; (80099d4 ) - 8009818: 891c ldrh r4, [r3, #8] - 800981a: 4b6e ldr r3, [pc, #440] ; (80099d4 ) - 800981c: 68db ldr r3, [r3, #12] - 800981e: 899b ldrh r3, [r3, #12] - 8009820: b29b uxth r3, r3 - 8009822: 4618 mov r0, r3 - 8009824: f7fb fc17 bl 8005056 - 8009828: 4603 mov r3, r0 - 800982a: f003 0303 and.w r3, r3, #3 - 800982e: 2b00 cmp r3, #0 - 8009830: d001 beq.n 8009836 - 8009832: 2301 movs r3, #1 - 8009834: e000 b.n 8009838 - 8009836: 2300 movs r3, #0 - 8009838: 4423 add r3, r4 - 800983a: b29a uxth r2, r3 - 800983c: 4b63 ldr r3, [pc, #396] ; (80099cc ) - 800983e: 801a strh r2, [r3, #0] - LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", - 8009840: 4b62 ldr r3, [pc, #392] ; (80099cc ) - 8009842: 881b ldrh r3, [r3, #0] - 8009844: 461a mov r2, r3 - 8009846: 4b62 ldr r3, [pc, #392] ; (80099d0 ) - 8009848: 681b ldr r3, [r3, #0] - 800984a: 441a add r2, r3 - 800984c: 6afb ldr r3, [r7, #44] ; 0x2c - 800984e: 68db ldr r3, [r3, #12] - 8009850: 685b ldr r3, [r3, #4] - 8009852: 429a cmp r2, r3 - 8009854: d006 beq.n 8009864 - 8009856: 4b60 ldr r3, [pc, #384] ; (80099d8 ) - 8009858: f240 52ae movw r2, #1454 ; 0x5ae - 800985c: 495f ldr r1, [pc, #380] ; (80099dc ) - 800985e: 4860 ldr r0, [pc, #384] ; (80099e0 ) - 8009860: f006 f930 bl 800fac4 - (seqno + tcplen) == next->tcphdr->seqno); - } - pcb->ooseq = next; - 8009864: 687b ldr r3, [r7, #4] - 8009866: 6afa ldr r2, [r7, #44] ; 0x2c - 8009868: 671a str r2, [r3, #112] ; 0x70 - } - } -#endif /* TCP_QUEUE_OOSEQ */ - - pcb->rcv_nxt = seqno + tcplen; - 800986a: 4b58 ldr r3, [pc, #352] ; (80099cc ) - 800986c: 881b ldrh r3, [r3, #0] - 800986e: 461a mov r2, r3 - 8009870: 4b57 ldr r3, [pc, #348] ; (80099d0 ) - 8009872: 681b ldr r3, [r3, #0] - 8009874: 441a add r2, r3 - 8009876: 687b ldr r3, [r7, #4] - 8009878: 625a str r2, [r3, #36] ; 0x24 - - /* Update the receiver's (our) window. */ - LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); - 800987a: 687b ldr r3, [r7, #4] - 800987c: 8d1a ldrh r2, [r3, #40] ; 0x28 - 800987e: 4b53 ldr r3, [pc, #332] ; (80099cc ) - 8009880: 881b ldrh r3, [r3, #0] - 8009882: 429a cmp r2, r3 - 8009884: d206 bcs.n 8009894 - 8009886: 4b54 ldr r3, [pc, #336] ; (80099d8 ) - 8009888: f240 52b9 movw r2, #1465 ; 0x5b9 - 800988c: 4955 ldr r1, [pc, #340] ; (80099e4 ) - 800988e: 4854 ldr r0, [pc, #336] ; (80099e0 ) - 8009890: f006 f918 bl 800fac4 - pcb->rcv_wnd -= tcplen; - 8009894: 687b ldr r3, [r7, #4] - 8009896: 8d1a ldrh r2, [r3, #40] ; 0x28 - 8009898: 4b4c ldr r3, [pc, #304] ; (80099cc ) - 800989a: 881b ldrh r3, [r3, #0] - 800989c: 1ad3 subs r3, r2, r3 - 800989e: b29a uxth r2, r3 - 80098a0: 687b ldr r3, [r7, #4] - 80098a2: 851a strh r2, [r3, #40] ; 0x28 - - tcp_update_rcv_ann_wnd(pcb); - 80098a4: 6878 ldr r0, [r7, #4] - 80098a6: f7fd f9fd bl 8006ca4 - chains its data on this pbuf as well. - - If the segment was a FIN, we set the TF_GOT_FIN flag that will - be used to indicate to the application that the remote side has - closed its end of the connection. */ - if (inseg.p->tot_len > 0) { - 80098aa: 4b4a ldr r3, [pc, #296] ; (80099d4 ) - 80098ac: 685b ldr r3, [r3, #4] - 80098ae: 891b ldrh r3, [r3, #8] - 80098b0: 2b00 cmp r3, #0 - 80098b2: d006 beq.n 80098c2 - recv_data = inseg.p; - 80098b4: 4b47 ldr r3, [pc, #284] ; (80099d4 ) - 80098b6: 685b ldr r3, [r3, #4] - 80098b8: 4a4b ldr r2, [pc, #300] ; (80099e8 ) - 80098ba: 6013 str r3, [r2, #0] - /* Since this pbuf now is the responsibility of the - application, we delete our reference to it so that we won't - (mistakingly) deallocate it. */ - inseg.p = NULL; - 80098bc: 4b45 ldr r3, [pc, #276] ; (80099d4 ) - 80098be: 2200 movs r2, #0 - 80098c0: 605a str r2, [r3, #4] - } - if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { - 80098c2: 4b44 ldr r3, [pc, #272] ; (80099d4 ) - 80098c4: 68db ldr r3, [r3, #12] - 80098c6: 899b ldrh r3, [r3, #12] - 80098c8: b29b uxth r3, r3 - 80098ca: 4618 mov r0, r3 - 80098cc: f7fb fbc3 bl 8005056 - 80098d0: 4603 mov r3, r0 - 80098d2: f003 0301 and.w r3, r3, #1 - 80098d6: 2b00 cmp r3, #0 - 80098d8: f000 80b4 beq.w 8009a44 - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); - recv_flags |= TF_GOT_FIN; - 80098dc: 4b43 ldr r3, [pc, #268] ; (80099ec ) - 80098de: 781b ldrb r3, [r3, #0] - 80098e0: f043 0320 orr.w r3, r3, #32 - 80098e4: b2da uxtb r2, r3 - 80098e6: 4b41 ldr r3, [pc, #260] ; (80099ec ) - 80098e8: 701a strb r2, [r3, #0] - } - -#if TCP_QUEUE_OOSEQ - /* We now check if we have segments on the ->ooseq queue that - are now in sequence. */ - while (pcb->ooseq != NULL && - 80098ea: e0ab b.n 8009a44 - pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { - - cseg = pcb->ooseq; - 80098ec: 687b ldr r3, [r7, #4] - 80098ee: 6f1b ldr r3, [r3, #112] ; 0x70 - 80098f0: 60fb str r3, [r7, #12] - seqno = pcb->ooseq->tcphdr->seqno; - 80098f2: 687b ldr r3, [r7, #4] - 80098f4: 6f1b ldr r3, [r3, #112] ; 0x70 - 80098f6: 68db ldr r3, [r3, #12] - 80098f8: 685b ldr r3, [r3, #4] - 80098fa: 4a35 ldr r2, [pc, #212] ; (80099d0 ) - 80098fc: 6013 str r3, [r2, #0] - - pcb->rcv_nxt += TCP_TCPLEN(cseg); - 80098fe: 68fb ldr r3, [r7, #12] - 8009900: 891b ldrh r3, [r3, #8] - 8009902: 461c mov r4, r3 - 8009904: 68fb ldr r3, [r7, #12] - 8009906: 68db ldr r3, [r3, #12] - 8009908: 899b ldrh r3, [r3, #12] - 800990a: b29b uxth r3, r3 - 800990c: 4618 mov r0, r3 - 800990e: f7fb fba2 bl 8005056 - 8009912: 4603 mov r3, r0 - 8009914: f003 0303 and.w r3, r3, #3 - 8009918: 2b00 cmp r3, #0 - 800991a: d001 beq.n 8009920 - 800991c: 2301 movs r3, #1 - 800991e: e000 b.n 8009922 - 8009920: 2300 movs r3, #0 - 8009922: 191a adds r2, r3, r4 - 8009924: 687b ldr r3, [r7, #4] - 8009926: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009928: 441a add r2, r3 - 800992a: 687b ldr r3, [r7, #4] - 800992c: 625a str r2, [r3, #36] ; 0x24 - LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", - 800992e: 687b ldr r3, [r7, #4] - 8009930: 8d1b ldrh r3, [r3, #40] ; 0x28 - 8009932: 461c mov r4, r3 - 8009934: 68fb ldr r3, [r7, #12] - 8009936: 891b ldrh r3, [r3, #8] - 8009938: 461d mov r5, r3 - 800993a: 68fb ldr r3, [r7, #12] - 800993c: 68db ldr r3, [r3, #12] - 800993e: 899b ldrh r3, [r3, #12] - 8009940: b29b uxth r3, r3 - 8009942: 4618 mov r0, r3 - 8009944: f7fb fb87 bl 8005056 - 8009948: 4603 mov r3, r0 - 800994a: f003 0303 and.w r3, r3, #3 - 800994e: 2b00 cmp r3, #0 - 8009950: d001 beq.n 8009956 - 8009952: 2301 movs r3, #1 - 8009954: e000 b.n 8009958 - 8009956: 2300 movs r3, #0 - 8009958: 442b add r3, r5 - 800995a: 429c cmp r4, r3 - 800995c: d206 bcs.n 800996c - 800995e: 4b1e ldr r3, [pc, #120] ; (80099d8 ) - 8009960: f240 52dd movw r2, #1501 ; 0x5dd - 8009964: 4922 ldr r1, [pc, #136] ; (80099f0 ) - 8009966: 481e ldr r0, [pc, #120] ; (80099e0 ) - 8009968: f006 f8ac bl 800fac4 - pcb->rcv_wnd >= TCP_TCPLEN(cseg)); - pcb->rcv_wnd -= TCP_TCPLEN(cseg); - 800996c: 68fb ldr r3, [r7, #12] - 800996e: 891b ldrh r3, [r3, #8] - 8009970: 461c mov r4, r3 - 8009972: 68fb ldr r3, [r7, #12] - 8009974: 68db ldr r3, [r3, #12] - 8009976: 899b ldrh r3, [r3, #12] - 8009978: b29b uxth r3, r3 - 800997a: 4618 mov r0, r3 - 800997c: f7fb fb6b bl 8005056 - 8009980: 4603 mov r3, r0 - 8009982: f003 0303 and.w r3, r3, #3 - 8009986: 2b00 cmp r3, #0 - 8009988: d001 beq.n 800998e - 800998a: 2301 movs r3, #1 - 800998c: e000 b.n 8009990 - 800998e: 2300 movs r3, #0 - 8009990: 1919 adds r1, r3, r4 - 8009992: 687b ldr r3, [r7, #4] - 8009994: 8d1a ldrh r2, [r3, #40] ; 0x28 - 8009996: b28b uxth r3, r1 - 8009998: 1ad3 subs r3, r2, r3 - 800999a: b29a uxth r2, r3 - 800999c: 687b ldr r3, [r7, #4] - 800999e: 851a strh r2, [r3, #40] ; 0x28 - - tcp_update_rcv_ann_wnd(pcb); - 80099a0: 6878 ldr r0, [r7, #4] - 80099a2: f7fd f97f bl 8006ca4 - - if (cseg->p->tot_len > 0) { - 80099a6: 68fb ldr r3, [r7, #12] - 80099a8: 685b ldr r3, [r3, #4] - 80099aa: 891b ldrh r3, [r3, #8] - 80099ac: 2b00 cmp r3, #0 - 80099ae: d028 beq.n 8009a02 - /* Chain this pbuf onto the pbuf that we will pass to - the application. */ - /* With window scaling, this can overflow recv_data->tot_len, but - that's not a problem since we explicitly fix that before passing - recv_data to the application. */ - if (recv_data) { - 80099b0: 4b0d ldr r3, [pc, #52] ; (80099e8 ) - 80099b2: 681b ldr r3, [r3, #0] - 80099b4: 2b00 cmp r3, #0 - 80099b6: d01d beq.n 80099f4 - pbuf_cat(recv_data, cseg->p); - 80099b8: 4b0b ldr r3, [pc, #44] ; (80099e8 ) - 80099ba: 681a ldr r2, [r3, #0] - 80099bc: 68fb ldr r3, [r7, #12] - 80099be: 685b ldr r3, [r3, #4] - 80099c0: 4619 mov r1, r3 - 80099c2: 4610 mov r0, r2 - 80099c4: f7fc fd28 bl 8006418 - 80099c8: e018 b.n 80099fc - 80099ca: bf00 nop - 80099cc: 20006da6 .word 0x20006da6 - 80099d0: 20006d9c .word 0x20006d9c - 80099d4: 20006d7c .word 0x20006d7c - 80099d8: 08011640 .word 0x08011640 - 80099dc: 08011944 .word 0x08011944 - 80099e0: 08011684 .word 0x08011684 - 80099e4: 08011980 .word 0x08011980 - 80099e8: 20006dac .word 0x20006dac - 80099ec: 20006da9 .word 0x20006da9 - 80099f0: 080119a0 .word 0x080119a0 - } else { - recv_data = cseg->p; - 80099f4: 68fb ldr r3, [r7, #12] - 80099f6: 685b ldr r3, [r3, #4] - 80099f8: 4a71 ldr r2, [pc, #452] ; (8009bc0 ) - 80099fa: 6013 str r3, [r2, #0] - } - cseg->p = NULL; - 80099fc: 68fb ldr r3, [r7, #12] - 80099fe: 2200 movs r2, #0 - 8009a00: 605a str r2, [r3, #4] - } - if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { - 8009a02: 68fb ldr r3, [r7, #12] - 8009a04: 68db ldr r3, [r3, #12] - 8009a06: 899b ldrh r3, [r3, #12] - 8009a08: b29b uxth r3, r3 - 8009a0a: 4618 mov r0, r3 - 8009a0c: f7fb fb23 bl 8005056 - 8009a10: 4603 mov r3, r0 - 8009a12: f003 0301 and.w r3, r3, #1 - 8009a16: 2b00 cmp r3, #0 - 8009a18: d00d beq.n 8009a36 - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); - recv_flags |= TF_GOT_FIN; - 8009a1a: 4b6a ldr r3, [pc, #424] ; (8009bc4 ) - 8009a1c: 781b ldrb r3, [r3, #0] - 8009a1e: f043 0320 orr.w r3, r3, #32 - 8009a22: b2da uxtb r2, r3 - 8009a24: 4b67 ldr r3, [pc, #412] ; (8009bc4 ) - 8009a26: 701a strb r2, [r3, #0] - if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ - 8009a28: 687b ldr r3, [r7, #4] - 8009a2a: 7d1b ldrb r3, [r3, #20] - 8009a2c: 2b04 cmp r3, #4 - 8009a2e: d102 bne.n 8009a36 - pcb->state = CLOSE_WAIT; - 8009a30: 687b ldr r3, [r7, #4] - 8009a32: 2207 movs r2, #7 - 8009a34: 751a strb r2, [r3, #20] - } - } - - pcb->ooseq = cseg->next; - 8009a36: 68fb ldr r3, [r7, #12] - 8009a38: 681a ldr r2, [r3, #0] - 8009a3a: 687b ldr r3, [r7, #4] - 8009a3c: 671a str r2, [r3, #112] ; 0x70 - tcp_seg_free(cseg); - 8009a3e: 68f8 ldr r0, [r7, #12] - 8009a40: f7fd fd7c bl 800753c - while (pcb->ooseq != NULL && - 8009a44: 687b ldr r3, [r7, #4] - 8009a46: 6f1b ldr r3, [r3, #112] ; 0x70 - 8009a48: 2b00 cmp r3, #0 - 8009a4a: d008 beq.n 8009a5e - pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { - 8009a4c: 687b ldr r3, [r7, #4] - 8009a4e: 6f1b ldr r3, [r3, #112] ; 0x70 - 8009a50: 68db ldr r3, [r3, #12] - 8009a52: 685a ldr r2, [r3, #4] - 8009a54: 687b ldr r3, [r7, #4] - 8009a56: 6a5b ldr r3, [r3, #36] ; 0x24 - while (pcb->ooseq != NULL && - 8009a58: 429a cmp r2, r3 - 8009a5a: f43f af47 beq.w 80098ec - } -#endif /* TCP_QUEUE_OOSEQ */ - - - /* Acknowledge the segment(s). */ - tcp_ack(pcb); - 8009a5e: 687b ldr r3, [r7, #4] - 8009a60: 7e9b ldrb r3, [r3, #26] - 8009a62: f003 0301 and.w r3, r3, #1 - 8009a66: 2b00 cmp r3, #0 - 8009a68: d00e beq.n 8009a88 - 8009a6a: 687b ldr r3, [r7, #4] - 8009a6c: 7e9b ldrb r3, [r3, #26] - 8009a6e: f023 0301 bic.w r3, r3, #1 - 8009a72: b2da uxtb r2, r3 - 8009a74: 687b ldr r3, [r7, #4] - 8009a76: 769a strb r2, [r3, #26] - 8009a78: 687b ldr r3, [r7, #4] - 8009a7a: 7e9b ldrb r3, [r3, #26] - 8009a7c: f043 0302 orr.w r3, r3, #2 - 8009a80: b2da uxtb r2, r3 - 8009a82: 687b ldr r3, [r7, #4] - 8009a84: 769a strb r2, [r3, #26] - if (pcb->rcv_nxt == seqno) { - 8009a86: e181 b.n 8009d8c - tcp_ack(pcb); - 8009a88: 687b ldr r3, [r7, #4] - 8009a8a: 7e9b ldrb r3, [r3, #26] - 8009a8c: f043 0301 orr.w r3, r3, #1 - 8009a90: b2da uxtb r2, r3 - 8009a92: 687b ldr r3, [r7, #4] - 8009a94: 769a strb r2, [r3, #26] - if (pcb->rcv_nxt == seqno) { - 8009a96: e179 b.n 8009d8c - } -#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ - - } else { - /* We get here if the incoming segment is out-of-sequence. */ - tcp_send_empty_ack(pcb); - 8009a98: 6878 ldr r0, [r7, #4] - 8009a9a: f000 fc91 bl 800a3c0 -#if TCP_QUEUE_OOSEQ - /* We queue the segment on the ->ooseq queue. */ - if (pcb->ooseq == NULL) { - 8009a9e: 687b ldr r3, [r7, #4] - 8009aa0: 6f1b ldr r3, [r3, #112] ; 0x70 - 8009aa2: 2b00 cmp r3, #0 - 8009aa4: d106 bne.n 8009ab4 - pcb->ooseq = tcp_seg_copy(&inseg); - 8009aa6: 4848 ldr r0, [pc, #288] ; (8009bc8 ) - 8009aa8: f7fd fd60 bl 800756c - 8009aac: 4602 mov r2, r0 - 8009aae: 687b ldr r3, [r7, #4] - 8009ab0: 671a str r2, [r3, #112] ; 0x70 - if (pcb->rcv_nxt == seqno) { - 8009ab2: e16b b.n 8009d8c - - If the incoming segment has the same sequence number as a - segment on the ->ooseq queue, we discard the segment that - contains less data. */ - - prev = NULL; - 8009ab4: 2300 movs r3, #0 - 8009ab6: 62bb str r3, [r7, #40] ; 0x28 - for (next = pcb->ooseq; next != NULL; next = next->next) { - 8009ab8: 687b ldr r3, [r7, #4] - 8009aba: 6f1b ldr r3, [r3, #112] ; 0x70 - 8009abc: 62fb str r3, [r7, #44] ; 0x2c - 8009abe: e150 b.n 8009d62 - if (seqno == next->tcphdr->seqno) { - 8009ac0: 6afb ldr r3, [r7, #44] ; 0x2c - 8009ac2: 68db ldr r3, [r3, #12] - 8009ac4: 685a ldr r2, [r3, #4] - 8009ac6: 4b41 ldr r3, [pc, #260] ; (8009bcc ) - 8009ac8: 681b ldr r3, [r3, #0] - 8009aca: 429a cmp r2, r3 - 8009acc: d11d bne.n 8009b0a - /* The sequence number of the incoming segment is the - same as the sequence number of the segment on - ->ooseq. We check the lengths to see which one to - discard. */ - if (inseg.len > next->len) { - 8009ace: 4b3e ldr r3, [pc, #248] ; (8009bc8 ) - 8009ad0: 891a ldrh r2, [r3, #8] - 8009ad2: 6afb ldr r3, [r7, #44] ; 0x2c - 8009ad4: 891b ldrh r3, [r3, #8] - 8009ad6: 429a cmp r2, r3 - 8009ad8: f240 8148 bls.w 8009d6c - /* The incoming segment is larger than the old - segment. We replace some segments with the new - one. */ - cseg = tcp_seg_copy(&inseg); - 8009adc: 483a ldr r0, [pc, #232] ; (8009bc8 ) - 8009ade: f7fd fd45 bl 800756c - 8009ae2: 60f8 str r0, [r7, #12] - if (cseg != NULL) { - 8009ae4: 68fb ldr r3, [r7, #12] - 8009ae6: 2b00 cmp r3, #0 - 8009ae8: f000 8142 beq.w 8009d70 - if (prev != NULL) { - 8009aec: 6abb ldr r3, [r7, #40] ; 0x28 - 8009aee: 2b00 cmp r3, #0 - 8009af0: d003 beq.n 8009afa - prev->next = cseg; - 8009af2: 6abb ldr r3, [r7, #40] ; 0x28 - 8009af4: 68fa ldr r2, [r7, #12] - 8009af6: 601a str r2, [r3, #0] - 8009af8: e002 b.n 8009b00 - } else { - pcb->ooseq = cseg; - 8009afa: 687b ldr r3, [r7, #4] - 8009afc: 68fa ldr r2, [r7, #12] - 8009afe: 671a str r2, [r3, #112] ; 0x70 - } - tcp_oos_insert_segment(cseg, next); - 8009b00: 6af9 ldr r1, [r7, #44] ; 0x2c - 8009b02: 68f8 ldr r0, [r7, #12] - 8009b04: f7ff f8fe bl 8008d04 - } - break; - 8009b08: e132 b.n 8009d70 - segment was smaller than the old one; in either - case, we ditch the incoming segment. */ - break; - } - } else { - if (prev == NULL) { - 8009b0a: 6abb ldr r3, [r7, #40] ; 0x28 - 8009b0c: 2b00 cmp r3, #0 - 8009b0e: d117 bne.n 8009b40 - if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { - 8009b10: 4b2e ldr r3, [pc, #184] ; (8009bcc ) - 8009b12: 681a ldr r2, [r3, #0] - 8009b14: 6afb ldr r3, [r7, #44] ; 0x2c - 8009b16: 68db ldr r3, [r3, #12] - 8009b18: 685b ldr r3, [r3, #4] - 8009b1a: 1ad3 subs r3, r2, r3 - 8009b1c: 2b00 cmp r3, #0 - 8009b1e: da57 bge.n 8009bd0 - /* The sequence number of the incoming segment is lower - than the sequence number of the first segment on the - queue. We put the incoming segment first on the - queue. */ - cseg = tcp_seg_copy(&inseg); - 8009b20: 4829 ldr r0, [pc, #164] ; (8009bc8 ) - 8009b22: f7fd fd23 bl 800756c - 8009b26: 60f8 str r0, [r7, #12] - if (cseg != NULL) { - 8009b28: 68fb ldr r3, [r7, #12] - 8009b2a: 2b00 cmp r3, #0 - 8009b2c: f000 8122 beq.w 8009d74 - pcb->ooseq = cseg; - 8009b30: 687b ldr r3, [r7, #4] - 8009b32: 68fa ldr r2, [r7, #12] - 8009b34: 671a str r2, [r3, #112] ; 0x70 - tcp_oos_insert_segment(cseg, next); - 8009b36: 6af9 ldr r1, [r7, #44] ; 0x2c - 8009b38: 68f8 ldr r0, [r7, #12] - 8009b3a: f7ff f8e3 bl 8008d04 - } - break; - 8009b3e: e119 b.n 8009d74 - } - } else { - /*if (TCP_SEQ_LT(prev->tcphdr->seqno, seqno) && - TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/ - if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno+1, next->tcphdr->seqno-1)) { - 8009b40: 4b22 ldr r3, [pc, #136] ; (8009bcc ) - 8009b42: 681a ldr r2, [r3, #0] - 8009b44: 6abb ldr r3, [r7, #40] ; 0x28 - 8009b46: 68db ldr r3, [r3, #12] - 8009b48: 685b ldr r3, [r3, #4] - 8009b4a: 1ad3 subs r3, r2, r3 - 8009b4c: 3b01 subs r3, #1 - 8009b4e: 2b00 cmp r3, #0 - 8009b50: db3e blt.n 8009bd0 - 8009b52: 4b1e ldr r3, [pc, #120] ; (8009bcc ) - 8009b54: 681a ldr r2, [r3, #0] - 8009b56: 6afb ldr r3, [r7, #44] ; 0x2c - 8009b58: 68db ldr r3, [r3, #12] - 8009b5a: 685b ldr r3, [r3, #4] - 8009b5c: 1ad3 subs r3, r2, r3 - 8009b5e: 3301 adds r3, #1 - 8009b60: 2b00 cmp r3, #0 - 8009b62: dc35 bgt.n 8009bd0 - /* The sequence number of the incoming segment is in - between the sequence numbers of the previous and - the next segment on ->ooseq. We trim trim the previous - segment, delete next segments that included in received segment - and trim received, if needed. */ - cseg = tcp_seg_copy(&inseg); - 8009b64: 4818 ldr r0, [pc, #96] ; (8009bc8 ) - 8009b66: f7fd fd01 bl 800756c - 8009b6a: 60f8 str r0, [r7, #12] - if (cseg != NULL) { - 8009b6c: 68fb ldr r3, [r7, #12] - 8009b6e: 2b00 cmp r3, #0 - 8009b70: f000 8102 beq.w 8009d78 - if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { - 8009b74: 6abb ldr r3, [r7, #40] ; 0x28 - 8009b76: 68db ldr r3, [r3, #12] - 8009b78: 685b ldr r3, [r3, #4] - 8009b7a: 6aba ldr r2, [r7, #40] ; 0x28 - 8009b7c: 8912 ldrh r2, [r2, #8] - 8009b7e: 441a add r2, r3 - 8009b80: 4b12 ldr r3, [pc, #72] ; (8009bcc ) - 8009b82: 681b ldr r3, [r3, #0] - 8009b84: 1ad3 subs r3, r2, r3 - 8009b86: 2b00 cmp r3, #0 - 8009b88: dd12 ble.n 8009bb0 - /* We need to trim the prev segment. */ - prev->len = (u16_t)(seqno - prev->tcphdr->seqno); - 8009b8a: 4b10 ldr r3, [pc, #64] ; (8009bcc ) - 8009b8c: 681b ldr r3, [r3, #0] - 8009b8e: b29a uxth r2, r3 - 8009b90: 6abb ldr r3, [r7, #40] ; 0x28 - 8009b92: 68db ldr r3, [r3, #12] - 8009b94: 685b ldr r3, [r3, #4] - 8009b96: b29b uxth r3, r3 - 8009b98: 1ad3 subs r3, r2, r3 - 8009b9a: b29a uxth r2, r3 - 8009b9c: 6abb ldr r3, [r7, #40] ; 0x28 - 8009b9e: 811a strh r2, [r3, #8] - pbuf_realloc(prev->p, prev->len); - 8009ba0: 6abb ldr r3, [r7, #40] ; 0x28 - 8009ba2: 685a ldr r2, [r3, #4] - 8009ba4: 6abb ldr r3, [r7, #40] ; 0x28 - 8009ba6: 891b ldrh r3, [r3, #8] - 8009ba8: 4619 mov r1, r3 - 8009baa: 4610 mov r0, r2 - 8009bac: f7fc f9f4 bl 8005f98 - } - prev->next = cseg; - 8009bb0: 6abb ldr r3, [r7, #40] ; 0x28 - 8009bb2: 68fa ldr r2, [r7, #12] - 8009bb4: 601a str r2, [r3, #0] - tcp_oos_insert_segment(cseg, next); - 8009bb6: 6af9 ldr r1, [r7, #44] ; 0x2c - 8009bb8: 68f8 ldr r0, [r7, #12] - 8009bba: f7ff f8a3 bl 8008d04 - } - break; - 8009bbe: e0db b.n 8009d78 - 8009bc0: 20006dac .word 0x20006dac - 8009bc4: 20006da9 .word 0x20006da9 - 8009bc8: 20006d7c .word 0x20006d7c - 8009bcc: 20006d9c .word 0x20006d9c - } - } - /* If the "next" segment is the last segment on the - ooseq queue, we add the incoming segment to the end - of the list. */ - if (next->next == NULL && - 8009bd0: 6afb ldr r3, [r7, #44] ; 0x2c - 8009bd2: 681b ldr r3, [r3, #0] - 8009bd4: 2b00 cmp r3, #0 - 8009bd6: f040 80bf bne.w 8009d58 - TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { - 8009bda: 4b7c ldr r3, [pc, #496] ; (8009dcc ) - 8009bdc: 681a ldr r2, [r3, #0] - 8009bde: 6afb ldr r3, [r7, #44] ; 0x2c - 8009be0: 68db ldr r3, [r3, #12] - 8009be2: 685b ldr r3, [r3, #4] - 8009be4: 1ad3 subs r3, r2, r3 - if (next->next == NULL && - 8009be6: 2b00 cmp r3, #0 - 8009be8: f340 80b6 ble.w 8009d58 - if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { - 8009bec: 6afb ldr r3, [r7, #44] ; 0x2c - 8009bee: 68db ldr r3, [r3, #12] - 8009bf0: 899b ldrh r3, [r3, #12] - 8009bf2: b29b uxth r3, r3 - 8009bf4: 4618 mov r0, r3 - 8009bf6: f7fb fa2e bl 8005056 - 8009bfa: 4603 mov r3, r0 - 8009bfc: f003 0301 and.w r3, r3, #1 - 8009c00: 2b00 cmp r3, #0 - 8009c02: f040 80bb bne.w 8009d7c - /* segment "next" already contains all data */ - break; - } - next->next = tcp_seg_copy(&inseg); - 8009c06: 4872 ldr r0, [pc, #456] ; (8009dd0 ) - 8009c08: f7fd fcb0 bl 800756c - 8009c0c: 4602 mov r2, r0 - 8009c0e: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c10: 601a str r2, [r3, #0] - if (next->next != NULL) { - 8009c12: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c14: 681b ldr r3, [r3, #0] - 8009c16: 2b00 cmp r3, #0 - 8009c18: f000 80b2 beq.w 8009d80 - if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { - 8009c1c: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c1e: 68db ldr r3, [r3, #12] - 8009c20: 685b ldr r3, [r3, #4] - 8009c22: 6afa ldr r2, [r7, #44] ; 0x2c - 8009c24: 8912 ldrh r2, [r2, #8] - 8009c26: 441a add r2, r3 - 8009c28: 4b68 ldr r3, [pc, #416] ; (8009dcc ) - 8009c2a: 681b ldr r3, [r3, #0] - 8009c2c: 1ad3 subs r3, r2, r3 - 8009c2e: 2b00 cmp r3, #0 - 8009c30: dd12 ble.n 8009c58 - /* We need to trim the last segment. */ - next->len = (u16_t)(seqno - next->tcphdr->seqno); - 8009c32: 4b66 ldr r3, [pc, #408] ; (8009dcc ) - 8009c34: 681b ldr r3, [r3, #0] - 8009c36: b29a uxth r2, r3 - 8009c38: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c3a: 68db ldr r3, [r3, #12] - 8009c3c: 685b ldr r3, [r3, #4] - 8009c3e: b29b uxth r3, r3 - 8009c40: 1ad3 subs r3, r2, r3 - 8009c42: b29a uxth r2, r3 - 8009c44: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c46: 811a strh r2, [r3, #8] - pbuf_realloc(next->p, next->len); - 8009c48: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c4a: 685a ldr r2, [r3, #4] - 8009c4c: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c4e: 891b ldrh r3, [r3, #8] - 8009c50: 4619 mov r1, r3 - 8009c52: 4610 mov r0, r2 - 8009c54: f7fc f9a0 bl 8005f98 - } - /* check if the remote side overruns our receive window */ - if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) { - 8009c58: 4b5e ldr r3, [pc, #376] ; (8009dd4 ) - 8009c5a: 881b ldrh r3, [r3, #0] - 8009c5c: 461a mov r2, r3 - 8009c5e: 4b5b ldr r3, [pc, #364] ; (8009dcc ) - 8009c60: 681b ldr r3, [r3, #0] - 8009c62: 441a add r2, r3 - 8009c64: 687b ldr r3, [r7, #4] - 8009c66: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009c68: 6879 ldr r1, [r7, #4] - 8009c6a: 8d09 ldrh r1, [r1, #40] ; 0x28 - 8009c6c: 440b add r3, r1 - 8009c6e: 1ad3 subs r3, r2, r3 - 8009c70: 2b00 cmp r3, #0 - 8009c72: f340 8085 ble.w 8009d80 - LWIP_DEBUGF(TCP_INPUT_DEBUG, - ("tcp_receive: other end overran receive window" - "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", - seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); - if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) { - 8009c76: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c78: 681b ldr r3, [r3, #0] - 8009c7a: 68db ldr r3, [r3, #12] - 8009c7c: 899b ldrh r3, [r3, #12] - 8009c7e: b29b uxth r3, r3 - 8009c80: 4618 mov r0, r3 - 8009c82: f7fb f9e8 bl 8005056 - 8009c86: 4603 mov r3, r0 - 8009c88: f003 0301 and.w r3, r3, #1 - 8009c8c: 2b00 cmp r3, #0 - 8009c8e: d01e beq.n 8009cce - /* Must remove the FIN from the header as we're trimming - * that byte of sequence-space from the packet */ - TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN); - 8009c90: 6afb ldr r3, [r7, #44] ; 0x2c - 8009c92: 681b ldr r3, [r3, #0] - 8009c94: 68db ldr r3, [r3, #12] - 8009c96: 899b ldrh r3, [r3, #12] - 8009c98: b29b uxth r3, r3 - 8009c9a: f423 537c bic.w r3, r3, #16128 ; 0x3f00 - 8009c9e: b29c uxth r4, r3 - 8009ca0: 6afb ldr r3, [r7, #44] ; 0x2c - 8009ca2: 681b ldr r3, [r3, #0] - 8009ca4: 68db ldr r3, [r3, #12] - 8009ca6: 899b ldrh r3, [r3, #12] - 8009ca8: b29b uxth r3, r3 - 8009caa: 4618 mov r0, r3 - 8009cac: f7fb f9d3 bl 8005056 - 8009cb0: 4603 mov r3, r0 - 8009cb2: f003 033e and.w r3, r3, #62 ; 0x3e - 8009cb6: b29b uxth r3, r3 - 8009cb8: 4618 mov r0, r3 - 8009cba: f7fb f9cc bl 8005056 - 8009cbe: 4603 mov r3, r0 - 8009cc0: 461a mov r2, r3 - 8009cc2: 6afb ldr r3, [r7, #44] ; 0x2c - 8009cc4: 681b ldr r3, [r3, #0] - 8009cc6: 68db ldr r3, [r3, #12] - 8009cc8: 4322 orrs r2, r4 - 8009cca: b292 uxth r2, r2 - 8009ccc: 819a strh r2, [r3, #12] - } - /* Adjust length of segment to fit in the window. */ - next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno); - 8009cce: 687b ldr r3, [r7, #4] - 8009cd0: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009cd2: b29a uxth r2, r3 - 8009cd4: 687b ldr r3, [r7, #4] - 8009cd6: 8d1b ldrh r3, [r3, #40] ; 0x28 - 8009cd8: 4413 add r3, r2 - 8009cda: b299 uxth r1, r3 - 8009cdc: 4b3b ldr r3, [pc, #236] ; (8009dcc ) - 8009cde: 681b ldr r3, [r3, #0] - 8009ce0: b29a uxth r2, r3 - 8009ce2: 6afb ldr r3, [r7, #44] ; 0x2c - 8009ce4: 681b ldr r3, [r3, #0] - 8009ce6: 1a8a subs r2, r1, r2 - 8009ce8: b292 uxth r2, r2 - 8009cea: 811a strh r2, [r3, #8] - pbuf_realloc(next->next->p, next->next->len); - 8009cec: 6afb ldr r3, [r7, #44] ; 0x2c - 8009cee: 681b ldr r3, [r3, #0] - 8009cf0: 685a ldr r2, [r3, #4] - 8009cf2: 6afb ldr r3, [r7, #44] ; 0x2c - 8009cf4: 681b ldr r3, [r3, #0] - 8009cf6: 891b ldrh r3, [r3, #8] - 8009cf8: 4619 mov r1, r3 - 8009cfa: 4610 mov r0, r2 - 8009cfc: f7fc f94c bl 8005f98 - tcplen = TCP_TCPLEN(next->next); - 8009d00: 6afb ldr r3, [r7, #44] ; 0x2c - 8009d02: 681b ldr r3, [r3, #0] - 8009d04: 891c ldrh r4, [r3, #8] - 8009d06: 6afb ldr r3, [r7, #44] ; 0x2c - 8009d08: 681b ldr r3, [r3, #0] - 8009d0a: 68db ldr r3, [r3, #12] - 8009d0c: 899b ldrh r3, [r3, #12] - 8009d0e: b29b uxth r3, r3 - 8009d10: 4618 mov r0, r3 - 8009d12: f7fb f9a0 bl 8005056 - 8009d16: 4603 mov r3, r0 - 8009d18: f003 0303 and.w r3, r3, #3 - 8009d1c: 2b00 cmp r3, #0 - 8009d1e: d001 beq.n 8009d24 - 8009d20: 2301 movs r3, #1 - 8009d22: e000 b.n 8009d26 - 8009d24: 2300 movs r3, #0 - 8009d26: 4423 add r3, r4 - 8009d28: b29a uxth r2, r3 - 8009d2a: 4b2a ldr r3, [pc, #168] ; (8009dd4 ) - 8009d2c: 801a strh r2, [r3, #0] - LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", - 8009d2e: 4b29 ldr r3, [pc, #164] ; (8009dd4 ) - 8009d30: 881b ldrh r3, [r3, #0] - 8009d32: 461a mov r2, r3 - 8009d34: 4b25 ldr r3, [pc, #148] ; (8009dcc ) - 8009d36: 681b ldr r3, [r3, #0] - 8009d38: 441a add r2, r3 - 8009d3a: 687b ldr r3, [r7, #4] - 8009d3c: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009d3e: 6879 ldr r1, [r7, #4] - 8009d40: 8d09 ldrh r1, [r1, #40] ; 0x28 - 8009d42: 440b add r3, r1 - 8009d44: 429a cmp r2, r3 - 8009d46: d01b beq.n 8009d80 - 8009d48: 4b23 ldr r3, [pc, #140] ; (8009dd8 ) - 8009d4a: f240 627a movw r2, #1658 ; 0x67a - 8009d4e: 4923 ldr r1, [pc, #140] ; (8009ddc ) - 8009d50: 4823 ldr r0, [pc, #140] ; (8009de0 ) - 8009d52: f005 feb7 bl 800fac4 - (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); - } - } - break; - 8009d56: e013 b.n 8009d80 - } - } - prev = next; - 8009d58: 6afb ldr r3, [r7, #44] ; 0x2c - 8009d5a: 62bb str r3, [r7, #40] ; 0x28 - for (next = pcb->ooseq; next != NULL; next = next->next) { - 8009d5c: 6afb ldr r3, [r7, #44] ; 0x2c - 8009d5e: 681b ldr r3, [r3, #0] - 8009d60: 62fb str r3, [r7, #44] ; 0x2c - 8009d62: 6afb ldr r3, [r7, #44] ; 0x2c - 8009d64: 2b00 cmp r3, #0 - 8009d66: f47f aeab bne.w 8009ac0 - if (pcb->rcv_nxt == seqno) { - 8009d6a: e00f b.n 8009d8c - break; - 8009d6c: bf00 nop - 8009d6e: e00d b.n 8009d8c - break; - 8009d70: bf00 nop - 8009d72: e00b b.n 8009d8c - break; - 8009d74: bf00 nop - 8009d76: e009 b.n 8009d8c - break; - 8009d78: bf00 nop - 8009d7a: e007 b.n 8009d8c - break; - 8009d7c: bf00 nop - 8009d7e: e005 b.n 8009d8c - break; - 8009d80: bf00 nop - if (pcb->rcv_nxt == seqno) { - 8009d82: e003 b.n 8009d8c -#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ -#endif /* TCP_QUEUE_OOSEQ */ - } - } else { - /* The incoming segment is not within the window. */ - tcp_send_empty_ack(pcb); - 8009d84: 6878 ldr r0, [r7, #4] - 8009d86: f000 fb1b bl 800a3c0 - if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, - 8009d8a: e01a b.n 8009dc2 - 8009d8c: e019 b.n 8009dc2 - } - } else { - /* Segments with length 0 is taken care of here. Segments that - fall out of the window are ACKed. */ - if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) { - 8009d8e: 4b0f ldr r3, [pc, #60] ; (8009dcc ) - 8009d90: 681a ldr r2, [r3, #0] - 8009d92: 687b ldr r3, [r7, #4] - 8009d94: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009d96: 1ad3 subs r3, r2, r3 - 8009d98: 2b00 cmp r3, #0 - 8009d9a: db0a blt.n 8009db2 - 8009d9c: 4b0b ldr r3, [pc, #44] ; (8009dcc ) - 8009d9e: 681a ldr r2, [r3, #0] - 8009da0: 687b ldr r3, [r7, #4] - 8009da2: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009da4: 6879 ldr r1, [r7, #4] - 8009da6: 8d09 ldrh r1, [r1, #40] ; 0x28 - 8009da8: 440b add r3, r1 - 8009daa: 1ad3 subs r3, r2, r3 - 8009dac: 3301 adds r3, #1 - 8009dae: 2b00 cmp r3, #0 - 8009db0: dd07 ble.n 8009dc2 - tcp_ack_now(pcb); - 8009db2: 687b ldr r3, [r7, #4] - 8009db4: 7e9b ldrb r3, [r3, #26] - 8009db6: f043 0302 orr.w r3, r3, #2 - 8009dba: b2da uxtb r2, r3 - 8009dbc: 687b ldr r3, [r7, #4] - 8009dbe: 769a strb r2, [r3, #26] - } - } -} - 8009dc0: e7ff b.n 8009dc2 - 8009dc2: bf00 nop - 8009dc4: 3734 adds r7, #52 ; 0x34 - 8009dc6: 46bd mov sp, r7 - 8009dc8: bdf0 pop {r4, r5, r6, r7, pc} - 8009dca: bf00 nop - 8009dcc: 20006d9c .word 0x20006d9c - 8009dd0: 20006d7c .word 0x20006d7c - 8009dd4: 20006da6 .word 0x20006da6 - 8009dd8: 08011640 .word 0x08011640 - 8009ddc: 0801190c .word 0x0801190c - 8009de0: 08011684 .word 0x08011684 - -08009de4 : - -static u8_t -tcp_getoptbyte(void) -{ - 8009de4: b480 push {r7} - 8009de6: b083 sub sp, #12 - 8009de8: af00 add r7, sp, #0 - if ((tcphdr_opt2 == NULL) || (tcp_optidx < tcphdr_opt1len)) { - 8009dea: 4b17 ldr r3, [pc, #92] ; (8009e48 ) - 8009dec: 681b ldr r3, [r3, #0] - 8009dee: 2b00 cmp r3, #0 - 8009df0: d005 beq.n 8009dfe - 8009df2: 4b16 ldr r3, [pc, #88] ; (8009e4c ) - 8009df4: 881a ldrh r2, [r3, #0] - 8009df6: 4b16 ldr r3, [pc, #88] ; (8009e50 ) - 8009df8: 881b ldrh r3, [r3, #0] - 8009dfa: 429a cmp r2, r3 - 8009dfc: d20e bcs.n 8009e1c - u8_t* opts = (u8_t *)tcphdr + TCP_HLEN; - 8009dfe: 4b15 ldr r3, [pc, #84] ; (8009e54 ) - 8009e00: 681b ldr r3, [r3, #0] - 8009e02: 3314 adds r3, #20 - 8009e04: 603b str r3, [r7, #0] - return opts[tcp_optidx++]; - 8009e06: 4b11 ldr r3, [pc, #68] ; (8009e4c ) - 8009e08: 881b ldrh r3, [r3, #0] - 8009e0a: 1c5a adds r2, r3, #1 - 8009e0c: b291 uxth r1, r2 - 8009e0e: 4a0f ldr r2, [pc, #60] ; (8009e4c ) - 8009e10: 8011 strh r1, [r2, #0] - 8009e12: 461a mov r2, r3 - 8009e14: 683b ldr r3, [r7, #0] - 8009e16: 4413 add r3, r2 - 8009e18: 781b ldrb r3, [r3, #0] - 8009e1a: e010 b.n 8009e3e - } else { - u8_t idx = (u8_t)(tcp_optidx++ - tcphdr_opt1len); - 8009e1c: 4b0b ldr r3, [pc, #44] ; (8009e4c ) - 8009e1e: 881b ldrh r3, [r3, #0] - 8009e20: 1c5a adds r2, r3, #1 - 8009e22: b291 uxth r1, r2 - 8009e24: 4a09 ldr r2, [pc, #36] ; (8009e4c ) - 8009e26: 8011 strh r1, [r2, #0] - 8009e28: b2da uxtb r2, r3 - 8009e2a: 4b09 ldr r3, [pc, #36] ; (8009e50 ) - 8009e2c: 881b ldrh r3, [r3, #0] - 8009e2e: b2db uxtb r3, r3 - 8009e30: 1ad3 subs r3, r2, r3 - 8009e32: 71fb strb r3, [r7, #7] - return tcphdr_opt2[idx]; - 8009e34: 4b04 ldr r3, [pc, #16] ; (8009e48 ) - 8009e36: 681a ldr r2, [r3, #0] - 8009e38: 79fb ldrb r3, [r7, #7] - 8009e3a: 4413 add r3, r2 - 8009e3c: 781b ldrb r3, [r3, #0] - } -} - 8009e3e: 4618 mov r0, r3 - 8009e40: 370c adds r7, #12 - 8009e42: 46bd mov sp, r7 - 8009e44: bc80 pop {r7} - 8009e46: 4770 bx lr - 8009e48: 20006d94 .word 0x20006d94 - 8009e4c: 20006d98 .word 0x20006d98 - 8009e50: 20006d92 .word 0x20006d92 - 8009e54: 20006d8c .word 0x20006d8c - -08009e58 : - * - * @param pcb the tcp_pcb for which a segment arrived - */ -static void -tcp_parseopt(struct tcp_pcb *pcb) -{ - 8009e58: b580 push {r7, lr} - 8009e5a: b084 sub sp, #16 - 8009e5c: af00 add r7, sp, #0 - 8009e5e: 6078 str r0, [r7, #4] -#if LWIP_TCP_TIMESTAMPS - u32_t tsval; -#endif - - /* Parse the TCP MSS option, if present. */ - if (tcphdr_optlen != 0) { - 8009e60: 4b2e ldr r3, [pc, #184] ; (8009f1c ) - 8009e62: 881b ldrh r3, [r3, #0] - 8009e64: 2b00 cmp r3, #0 - 8009e66: d055 beq.n 8009f14 - for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { - 8009e68: 4b2d ldr r3, [pc, #180] ; (8009f20 ) - 8009e6a: 2200 movs r2, #0 - 8009e6c: 801a strh r2, [r3, #0] - 8009e6e: e045 b.n 8009efc - u8_t opt = tcp_getoptbyte(); - 8009e70: f7ff ffb8 bl 8009de4 - 8009e74: 4603 mov r3, r0 - 8009e76: 73fb strb r3, [r7, #15] - switch (opt) { - 8009e78: 7bfb ldrb r3, [r7, #15] - 8009e7a: 2b02 cmp r3, #2 - 8009e7c: d006 beq.n 8009e8c - 8009e7e: 2b02 cmp r3, #2 - 8009e80: dc2b bgt.n 8009eda - 8009e82: 2b00 cmp r3, #0 - 8009e84: d041 beq.n 8009f0a - 8009e86: 2b01 cmp r3, #1 - 8009e88: d127 bne.n 8009eda - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); - return; - case LWIP_TCP_OPT_NOP: - /* NOP option. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); - break; - 8009e8a: e037 b.n 8009efc - case LWIP_TCP_OPT_MSS: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); - if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) { - 8009e8c: f7ff ffaa bl 8009de4 - 8009e90: 4603 mov r3, r0 - 8009e92: 2b04 cmp r3, #4 - 8009e94: d13b bne.n 8009f0e - 8009e96: 4b22 ldr r3, [pc, #136] ; (8009f20 ) - 8009e98: 881b ldrh r3, [r3, #0] - 8009e9a: 3301 adds r3, #1 - 8009e9c: 4a1f ldr r2, [pc, #124] ; (8009f1c ) - 8009e9e: 8812 ldrh r2, [r2, #0] - 8009ea0: 4293 cmp r3, r2 - 8009ea2: da34 bge.n 8009f0e - /* Bad length */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - return; - } - /* An MSS option with the right option length. */ - mss = (tcp_getoptbyte() << 8); - 8009ea4: f7ff ff9e bl 8009de4 - 8009ea8: 4603 mov r3, r0 - 8009eaa: b29b uxth r3, r3 - 8009eac: 021b lsls r3, r3, #8 - 8009eae: 81bb strh r3, [r7, #12] - mss |= tcp_getoptbyte(); - 8009eb0: f7ff ff98 bl 8009de4 - 8009eb4: 4603 mov r3, r0 - 8009eb6: b29a uxth r2, r3 - 8009eb8: 89bb ldrh r3, [r7, #12] - 8009eba: 4313 orrs r3, r2 - 8009ebc: 81bb strh r3, [r7, #12] - /* Limit the mss to the configured TCP_MSS and prevent division by zero */ - pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; - 8009ebe: 89bb ldrh r3, [r7, #12] - 8009ec0: f5b3 7f06 cmp.w r3, #536 ; 0x218 - 8009ec4: d804 bhi.n 8009ed0 - 8009ec6: 89bb ldrh r3, [r7, #12] - 8009ec8: 2b00 cmp r3, #0 - 8009eca: d001 beq.n 8009ed0 - 8009ecc: 89ba ldrh r2, [r7, #12] - 8009ece: e001 b.n 8009ed4 - 8009ed0: f44f 7206 mov.w r2, #536 ; 0x218 - 8009ed4: 687b ldr r3, [r7, #4] - 8009ed6: 865a strh r2, [r3, #50] ; 0x32 - break; - 8009ed8: e010 b.n 8009efc - tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6; - break; -#endif - default: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); - data = tcp_getoptbyte(); - 8009eda: f7ff ff83 bl 8009de4 - 8009ede: 4603 mov r3, r0 - 8009ee0: 72fb strb r3, [r7, #11] - if (data < 2) { - 8009ee2: 7afb ldrb r3, [r7, #11] - 8009ee4: 2b01 cmp r3, #1 - 8009ee6: d914 bls.n 8009f12 - 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; - 8009ee8: 7afb ldrb r3, [r7, #11] - 8009eea: b29a uxth r2, r3 - 8009eec: 4b0c ldr r3, [pc, #48] ; (8009f20 ) - 8009eee: 881b ldrh r3, [r3, #0] - 8009ef0: 4413 add r3, r2 - 8009ef2: b29b uxth r3, r3 - 8009ef4: 3b02 subs r3, #2 - 8009ef6: b29a uxth r2, r3 - 8009ef8: 4b09 ldr r3, [pc, #36] ; (8009f20 ) - 8009efa: 801a strh r2, [r3, #0] - for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { - 8009efc: 4b08 ldr r3, [pc, #32] ; (8009f20 ) - 8009efe: 881a ldrh r2, [r3, #0] - 8009f00: 4b06 ldr r3, [pc, #24] ; (8009f1c ) - 8009f02: 881b ldrh r3, [r3, #0] - 8009f04: 429a cmp r2, r3 - 8009f06: d3b3 bcc.n 8009e70 - 8009f08: e004 b.n 8009f14 - return; - 8009f0a: bf00 nop - 8009f0c: e002 b.n 8009f14 - return; - 8009f0e: bf00 nop - 8009f10: e000 b.n 8009f14 - return; - 8009f12: bf00 nop - } - } - } -} - 8009f14: 3710 adds r7, #16 - 8009f16: 46bd mov sp, r7 - 8009f18: bd80 pop {r7, pc} - 8009f1a: bf00 nop - 8009f1c: 20006d90 .word 0x20006d90 - 8009f20: 20006d98 .word 0x20006d98 - -08009f24 : - -void -tcp_trigger_input_pcb_close(void) -{ - 8009f24: b480 push {r7} - 8009f26: af00 add r7, sp, #0 - recv_flags |= TF_CLOSED; - 8009f28: 4b05 ldr r3, [pc, #20] ; (8009f40 ) - 8009f2a: 781b ldrb r3, [r3, #0] - 8009f2c: f043 0310 orr.w r3, r3, #16 - 8009f30: b2da uxtb r2, r3 - 8009f32: 4b03 ldr r3, [pc, #12] ; (8009f40 ) - 8009f34: 701a strb r2, [r3, #0] -} - 8009f36: bf00 nop - 8009f38: 46bd mov sp, r7 - 8009f3a: bc80 pop {r7} - 8009f3c: 4770 bx lr - 8009f3e: bf00 nop - 8009f40: 20006da9 .word 0x20006da9 - -08009f44 : - * @return pbuf with p->payload being the tcp_hdr - */ -static struct pbuf * -tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, - u32_t seqno_be /* already in network byte order */) -{ - 8009f44: b580 push {r7, lr} - 8009f46: b086 sub sp, #24 - 8009f48: af00 add r7, sp, #0 - 8009f4a: 60f8 str r0, [r7, #12] - 8009f4c: 607b str r3, [r7, #4] - 8009f4e: 460b mov r3, r1 - 8009f50: 817b strh r3, [r7, #10] - 8009f52: 4613 mov r3, r2 - 8009f54: 813b strh r3, [r7, #8] - struct tcp_hdr *tcphdr; - struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); - 8009f56: 897a ldrh r2, [r7, #10] - 8009f58: 893b ldrh r3, [r7, #8] - 8009f5a: 4413 add r3, r2 - 8009f5c: b29b uxth r3, r3 - 8009f5e: 3314 adds r3, #20 - 8009f60: b29b uxth r3, r3 - 8009f62: 2200 movs r2, #0 - 8009f64: 4619 mov r1, r3 - 8009f66: 2001 movs r0, #1 - 8009f68: f7fb fe12 bl 8005b90 - 8009f6c: 6178 str r0, [r7, #20] - if (p != NULL) { - 8009f6e: 697b ldr r3, [r7, #20] - 8009f70: 2b00 cmp r3, #0 - 8009f72: d056 beq.n 800a022 - LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", - 8009f74: 897b ldrh r3, [r7, #10] - 8009f76: 3313 adds r3, #19 - 8009f78: 697a ldr r2, [r7, #20] - 8009f7a: 8952 ldrh r2, [r2, #10] - 8009f7c: 4293 cmp r3, r2 - 8009f7e: db05 blt.n 8009f8c - 8009f80: 4b2a ldr r3, [pc, #168] ; (800a02c ) - 8009f82: 2272 movs r2, #114 ; 0x72 - 8009f84: 492a ldr r1, [pc, #168] ; (800a030 ) - 8009f86: 482b ldr r0, [pc, #172] ; (800a034 ) - 8009f88: f005 fd9c bl 800fac4 - (p->len >= TCP_HLEN + optlen)); - tcphdr = (struct tcp_hdr *)p->payload; - 8009f8c: 697b ldr r3, [r7, #20] - 8009f8e: 685b ldr r3, [r3, #4] - 8009f90: 613b str r3, [r7, #16] - tcphdr->src = lwip_htons(pcb->local_port); - 8009f92: 68fb ldr r3, [r7, #12] - 8009f94: 8adb ldrh r3, [r3, #22] - 8009f96: 4618 mov r0, r3 - 8009f98: f7fb f85d bl 8005056 - 8009f9c: 4603 mov r3, r0 - 8009f9e: 461a mov r2, r3 - 8009fa0: 693b ldr r3, [r7, #16] - 8009fa2: 801a strh r2, [r3, #0] - tcphdr->dest = lwip_htons(pcb->remote_port); - 8009fa4: 68fb ldr r3, [r7, #12] - 8009fa6: 8b1b ldrh r3, [r3, #24] - 8009fa8: 4618 mov r0, r3 - 8009faa: f7fb f854 bl 8005056 - 8009fae: 4603 mov r3, r0 - 8009fb0: 461a mov r2, r3 - 8009fb2: 693b ldr r3, [r7, #16] - 8009fb4: 805a strh r2, [r3, #2] - tcphdr->seqno = seqno_be; - 8009fb6: 693b ldr r3, [r7, #16] - 8009fb8: 687a ldr r2, [r7, #4] - 8009fba: 605a str r2, [r3, #4] - tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); - 8009fbc: 68fb ldr r3, [r7, #12] - 8009fbe: 6a5b ldr r3, [r3, #36] ; 0x24 - 8009fc0: 4618 mov r0, r3 - 8009fc2: f7fb f855 bl 8005070 - 8009fc6: 4602 mov r2, r0 - 8009fc8: 693b ldr r3, [r7, #16] - 8009fca: 609a str r2, [r3, #8] - TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); - 8009fcc: 897b ldrh r3, [r7, #10] - 8009fce: 089b lsrs r3, r3, #2 - 8009fd0: b29b uxth r3, r3 - 8009fd2: 3305 adds r3, #5 - 8009fd4: b29b uxth r3, r3 - 8009fd6: 031b lsls r3, r3, #12 - 8009fd8: b29b uxth r3, r3 - 8009fda: f043 0310 orr.w r3, r3, #16 - 8009fde: b29b uxth r3, r3 - 8009fe0: 4618 mov r0, r3 - 8009fe2: f7fb f838 bl 8005056 - 8009fe6: 4603 mov r3, r0 - 8009fe8: 461a mov r2, r3 - 8009fea: 693b ldr r3, [r7, #16] - 8009fec: 819a strh r2, [r3, #12] - tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); - 8009fee: 68fb ldr r3, [r7, #12] - 8009ff0: 8d5b ldrh r3, [r3, #42] ; 0x2a - 8009ff2: 4618 mov r0, r3 - 8009ff4: f7fb f82f bl 8005056 - 8009ff8: 4603 mov r3, r0 - 8009ffa: 461a mov r2, r3 - 8009ffc: 693b ldr r3, [r7, #16] - 8009ffe: 81da strh r2, [r3, #14] - tcphdr->chksum = 0; - 800a000: 693b ldr r3, [r7, #16] - 800a002: 2200 movs r2, #0 - 800a004: 741a strb r2, [r3, #16] - 800a006: 2200 movs r2, #0 - 800a008: 745a strb r2, [r3, #17] - tcphdr->urgp = 0; - 800a00a: 693b ldr r3, [r7, #16] - 800a00c: 2200 movs r2, #0 - 800a00e: 749a strb r2, [r3, #18] - 800a010: 2200 movs r2, #0 - 800a012: 74da strb r2, [r3, #19] - - /* If we're sending a packet, update the announced right window edge */ - pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; - 800a014: 68fb ldr r3, [r7, #12] - 800a016: 6a5b ldr r3, [r3, #36] ; 0x24 - 800a018: 68fa ldr r2, [r7, #12] - 800a01a: 8d52 ldrh r2, [r2, #42] ; 0x2a - 800a01c: 441a add r2, r3 - 800a01e: 68fb ldr r3, [r7, #12] - 800a020: 62da str r2, [r3, #44] ; 0x2c - } - return p; - 800a022: 697b ldr r3, [r7, #20] -} - 800a024: 4618 mov r0, r3 - 800a026: 3718 adds r7, #24 - 800a028: 46bd mov sp, r7 - 800a02a: bd80 pop {r7, pc} - 800a02c: 080119c8 .word 0x080119c8 - 800a030: 080119fc .word 0x080119fc - 800a034: 08011a2c .word 0x08011a2c - -0800a038 : - * @param pcb the tcp_pcb over which to send a segment - * @return ERR_OK if sent, another err_t otherwise - */ -err_t -tcp_send_fin(struct tcp_pcb *pcb) -{ - 800a038: b590 push {r4, r7, lr} - 800a03a: b085 sub sp, #20 - 800a03c: af00 add r7, sp, #0 - 800a03e: 6078 str r0, [r7, #4] - /* first, try to add the fin to the last unsent segment */ - if (pcb->unsent != NULL) { - 800a040: 687b ldr r3, [r7, #4] - 800a042: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a044: 2b00 cmp r3, #0 - 800a046: d02d beq.n 800a0a4 - struct tcp_seg *last_unsent; - for (last_unsent = pcb->unsent; last_unsent->next != NULL; - 800a048: 687b ldr r3, [r7, #4] - 800a04a: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a04c: 60fb str r3, [r7, #12] - 800a04e: e002 b.n 800a056 - last_unsent = last_unsent->next); - 800a050: 68fb ldr r3, [r7, #12] - 800a052: 681b ldr r3, [r3, #0] - 800a054: 60fb str r3, [r7, #12] - for (last_unsent = pcb->unsent; last_unsent->next != NULL; - 800a056: 68fb ldr r3, [r7, #12] - 800a058: 681b ldr r3, [r3, #0] - 800a05a: 2b00 cmp r3, #0 - 800a05c: d1f8 bne.n 800a050 - - if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { - 800a05e: 68fb ldr r3, [r7, #12] - 800a060: 68db ldr r3, [r3, #12] - 800a062: 899b ldrh r3, [r3, #12] - 800a064: b29b uxth r3, r3 - 800a066: 4618 mov r0, r3 - 800a068: f7fa fff5 bl 8005056 - 800a06c: 4603 mov r3, r0 - 800a06e: f003 0307 and.w r3, r3, #7 - 800a072: 2b00 cmp r3, #0 - 800a074: d116 bne.n 800a0a4 - /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ - TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); - 800a076: 68fb ldr r3, [r7, #12] - 800a078: 68db ldr r3, [r3, #12] - 800a07a: 899b ldrh r3, [r3, #12] - 800a07c: b29c uxth r4, r3 - 800a07e: 2001 movs r0, #1 - 800a080: f7fa ffe9 bl 8005056 - 800a084: 4603 mov r3, r0 - 800a086: 461a mov r2, r3 - 800a088: 68fb ldr r3, [r7, #12] - 800a08a: 68db ldr r3, [r3, #12] - 800a08c: 4322 orrs r2, r4 - 800a08e: b292 uxth r2, r2 - 800a090: 819a strh r2, [r3, #12] - pcb->flags |= TF_FIN; - 800a092: 687b ldr r3, [r7, #4] - 800a094: 7e9b ldrb r3, [r3, #26] - 800a096: f043 0320 orr.w r3, r3, #32 - 800a09a: b2da uxtb r2, r3 - 800a09c: 687b ldr r3, [r7, #4] - 800a09e: 769a strb r2, [r3, #26] - return ERR_OK; - 800a0a0: 2300 movs r3, #0 - 800a0a2: e004 b.n 800a0ae - } - } - /* no data, no length, flags, copy=1, no optdata */ - return tcp_enqueue_flags(pcb, TCP_FIN); - 800a0a4: 2101 movs r1, #1 - 800a0a6: 6878 ldr r0, [r7, #4] - 800a0a8: f000 f88e bl 800a1c8 - 800a0ac: 4603 mov r3, r0 -} - 800a0ae: 4618 mov r0, r3 - 800a0b0: 3714 adds r7, #20 - 800a0b2: 46bd mov sp, r7 - 800a0b4: bd90 pop {r4, r7, pc} - ... - -0800a0b8 : - * The TCP header is filled in except ackno and wnd. - * p is freed on failure. - */ -static struct tcp_seg * -tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) -{ - 800a0b8: b590 push {r4, r7, lr} - 800a0ba: b087 sub sp, #28 - 800a0bc: af00 add r7, sp, #0 - 800a0be: 60f8 str r0, [r7, #12] - 800a0c0: 60b9 str r1, [r7, #8] - 800a0c2: 603b str r3, [r7, #0] - 800a0c4: 4613 mov r3, r2 - 800a0c6: 71fb strb r3, [r7, #7] - struct tcp_seg *seg; - u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); - 800a0c8: f897 3028 ldrb.w r3, [r7, #40] ; 0x28 - 800a0cc: 009b lsls r3, r3, #2 - 800a0ce: b2db uxtb r3, r3 - 800a0d0: f003 0304 and.w r3, r3, #4 - 800a0d4: 75fb strb r3, [r7, #23] - - if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { - 800a0d6: 2003 movs r0, #3 - 800a0d8: f7fb fb66 bl 80057a8 - 800a0dc: 6138 str r0, [r7, #16] - 800a0de: 693b ldr r3, [r7, #16] - 800a0e0: 2b00 cmp r3, #0 - 800a0e2: d104 bne.n 800a0ee - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); - pbuf_free(p); - 800a0e4: 68b8 ldr r0, [r7, #8] - 800a0e6: f7fc f8cb bl 8006280 - return NULL; - 800a0ea: 2300 movs r3, #0 - 800a0ec: e061 b.n 800a1b2 - } - seg->flags = optflags; - 800a0ee: 693b ldr r3, [r7, #16] - 800a0f0: f897 2028 ldrb.w r2, [r7, #40] ; 0x28 - 800a0f4: 729a strb r2, [r3, #10] - seg->next = NULL; - 800a0f6: 693b ldr r3, [r7, #16] - 800a0f8: 2200 movs r2, #0 - 800a0fa: 601a str r2, [r3, #0] - seg->p = p; - 800a0fc: 693b ldr r3, [r7, #16] - 800a0fe: 68ba ldr r2, [r7, #8] - 800a100: 605a str r2, [r3, #4] - LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); - 800a102: 68bb ldr r3, [r7, #8] - 800a104: 891a ldrh r2, [r3, #8] - 800a106: 7dfb ldrb r3, [r7, #23] - 800a108: b29b uxth r3, r3 - 800a10a: 429a cmp r2, r3 - 800a10c: d205 bcs.n 800a11a - 800a10e: 4b2b ldr r3, [pc, #172] ; (800a1bc ) - 800a110: 22ba movs r2, #186 ; 0xba - 800a112: 492b ldr r1, [pc, #172] ; (800a1c0 ) - 800a114: 482b ldr r0, [pc, #172] ; (800a1c4 ) - 800a116: f005 fcd5 bl 800fac4 - seg->len = p->tot_len - optlen; - 800a11a: 68bb ldr r3, [r7, #8] - 800a11c: 891a ldrh r2, [r3, #8] - 800a11e: 7dfb ldrb r3, [r7, #23] - 800a120: b29b uxth r3, r3 - 800a122: 1ad3 subs r3, r2, r3 - 800a124: b29a uxth r2, r3 - 800a126: 693b ldr r3, [r7, #16] - 800a128: 811a strh r2, [r3, #8] - LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED", - (optflags & TF_SEG_DATA_CHECKSUMMED) == 0); -#endif /* TCP_CHECKSUM_ON_COPY */ - - /* build TCP header */ - if (pbuf_header(p, TCP_HLEN)) { - 800a12a: 2114 movs r1, #20 - 800a12c: 68b8 ldr r0, [r7, #8] - 800a12e: f7fc f883 bl 8006238 - 800a132: 4603 mov r3, r0 - 800a134: 2b00 cmp r3, #0 - 800a136: d004 beq.n 800a142 - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no room for TCP header in pbuf.\n")); - TCP_STATS_INC(tcp.err); - tcp_seg_free(seg); - 800a138: 6938 ldr r0, [r7, #16] - 800a13a: f7fd f9ff bl 800753c - return NULL; - 800a13e: 2300 movs r3, #0 - 800a140: e037 b.n 800a1b2 - } - seg->tcphdr = (struct tcp_hdr *)seg->p->payload; - 800a142: 693b ldr r3, [r7, #16] - 800a144: 685b ldr r3, [r3, #4] - 800a146: 685a ldr r2, [r3, #4] - 800a148: 693b ldr r3, [r7, #16] - 800a14a: 60da str r2, [r3, #12] - seg->tcphdr->src = lwip_htons(pcb->local_port); - 800a14c: 68fb ldr r3, [r7, #12] - 800a14e: 8ada ldrh r2, [r3, #22] - 800a150: 693b ldr r3, [r7, #16] - 800a152: 68dc ldr r4, [r3, #12] - 800a154: 4610 mov r0, r2 - 800a156: f7fa ff7e bl 8005056 - 800a15a: 4603 mov r3, r0 - 800a15c: 8023 strh r3, [r4, #0] - seg->tcphdr->dest = lwip_htons(pcb->remote_port); - 800a15e: 68fb ldr r3, [r7, #12] - 800a160: 8b1a ldrh r2, [r3, #24] - 800a162: 693b ldr r3, [r7, #16] - 800a164: 68dc ldr r4, [r3, #12] - 800a166: 4610 mov r0, r2 - 800a168: f7fa ff75 bl 8005056 - 800a16c: 4603 mov r3, r0 - 800a16e: 8063 strh r3, [r4, #2] - seg->tcphdr->seqno = lwip_htonl(seqno); - 800a170: 693b ldr r3, [r7, #16] - 800a172: 68dc ldr r4, [r3, #12] - 800a174: 6838 ldr r0, [r7, #0] - 800a176: f7fa ff7b bl 8005070 - 800a17a: 4603 mov r3, r0 - 800a17c: 6063 str r3, [r4, #4] - /* ackno is set in tcp_output */ - TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); - 800a17e: 7dfb ldrb r3, [r7, #23] - 800a180: 089b lsrs r3, r3, #2 - 800a182: b2db uxtb r3, r3 - 800a184: b29b uxth r3, r3 - 800a186: 3305 adds r3, #5 - 800a188: b29b uxth r3, r3 - 800a18a: 031b lsls r3, r3, #12 - 800a18c: b29a uxth r2, r3 - 800a18e: 79fb ldrb r3, [r7, #7] - 800a190: b29b uxth r3, r3 - 800a192: 4313 orrs r3, r2 - 800a194: b29a uxth r2, r3 - 800a196: 693b ldr r3, [r7, #16] - 800a198: 68dc ldr r4, [r3, #12] - 800a19a: 4610 mov r0, r2 - 800a19c: f7fa ff5b bl 8005056 - 800a1a0: 4603 mov r3, r0 - 800a1a2: 81a3 strh r3, [r4, #12] - /* wnd and chksum are set in tcp_output */ - seg->tcphdr->urgp = 0; - 800a1a4: 693b ldr r3, [r7, #16] - 800a1a6: 68db ldr r3, [r3, #12] - 800a1a8: 2200 movs r2, #0 - 800a1aa: 749a strb r2, [r3, #18] - 800a1ac: 2200 movs r2, #0 - 800a1ae: 74da strb r2, [r3, #19] - return seg; - 800a1b0: 693b ldr r3, [r7, #16] -} - 800a1b2: 4618 mov r0, r3 - 800a1b4: 371c adds r7, #28 - 800a1b6: 46bd mov sp, r7 - 800a1b8: bd90 pop {r4, r7, pc} - 800a1ba: bf00 nop - 800a1bc: 080119c8 .word 0x080119c8 - 800a1c0: 08011a54 .word 0x08011a54 - 800a1c4: 08011a2c .word 0x08011a2c - -0800a1c8 : - * @param pcb Protocol control block for the TCP connection. - * @param flags TCP header flags to set in the outgoing segment. - */ -err_t -tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) -{ - 800a1c8: b580 push {r7, lr} - 800a1ca: b08a sub sp, #40 ; 0x28 - 800a1cc: af02 add r7, sp, #8 - 800a1ce: 6078 str r0, [r7, #4] - 800a1d0: 460b mov r3, r1 - 800a1d2: 70fb strb r3, [r7, #3] - struct pbuf *p; - struct tcp_seg *seg; - u8_t optflags = 0; - 800a1d4: 2300 movs r3, #0 - 800a1d6: 77fb strb r3, [r7, #31] - u8_t optlen = 0; - 800a1d8: 2300 movs r3, #0 - 800a1da: 75fb strb r3, [r7, #23] - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen)); - - LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", - 800a1dc: 78fb ldrb r3, [r7, #3] - 800a1de: f003 0303 and.w r3, r3, #3 - 800a1e2: 2b00 cmp r3, #0 - 800a1e4: d106 bne.n 800a1f4 - 800a1e6: 4b6f ldr r3, [pc, #444] ; (800a3a4 ) - 800a1e8: f240 321a movw r2, #794 ; 0x31a - 800a1ec: 496e ldr r1, [pc, #440] ; (800a3a8 ) - 800a1ee: 486f ldr r0, [pc, #444] ; (800a3ac ) - 800a1f0: f005 fc68 bl 800fac4 - (flags & (TCP_SYN | TCP_FIN)) != 0); - - /* check for configured max queuelen and possible overflow (FIN flag should always come through!) */ - if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) && - 800a1f4: 687b ldr r3, [r7, #4] - 800a1f6: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 800a1fa: 2b08 cmp r3, #8 - 800a1fc: d806 bhi.n 800a20c - 800a1fe: 687b ldr r3, [r7, #4] - 800a200: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 800a204: f64f 72fc movw r2, #65532 ; 0xfffc - 800a208: 4293 cmp r3, r2 - 800a20a: d90e bls.n 800a22a - ((flags & TCP_FIN) == 0)) { - 800a20c: 78fb ldrb r3, [r7, #3] - 800a20e: f003 0301 and.w r3, r3, #1 - if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) && - 800a212: 2b00 cmp r3, #0 - 800a214: d109 bne.n 800a22a - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n", - pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); - TCP_STATS_INC(tcp.memerr); - pcb->flags |= TF_NAGLEMEMERR; - 800a216: 687b ldr r3, [r7, #4] - 800a218: 7e9b ldrb r3, [r3, #26] - 800a21a: f063 037f orn r3, r3, #127 ; 0x7f - 800a21e: b2da uxtb r2, r3 - 800a220: 687b ldr r3, [r7, #4] - 800a222: 769a strb r2, [r3, #26] - return ERR_MEM; - 800a224: f04f 33ff mov.w r3, #4294967295 - 800a228: e0b7 b.n 800a39a - } - - if (flags & TCP_SYN) { - 800a22a: 78fb ldrb r3, [r7, #3] - 800a22c: f003 0302 and.w r3, r3, #2 - 800a230: 2b00 cmp r3, #0 - 800a232: d001 beq.n 800a238 - optflags = TF_SEG_OPTS_MSS; - 800a234: 2301 movs r3, #1 - 800a236: 77fb strb r3, [r7, #31] - /* Make sure the timestamp option is only included in data segments if we - agreed about it with the remote host. */ - optflags |= TF_SEG_OPTS_TS; - } -#endif /* LWIP_TCP_TIMESTAMPS */ - optlen = LWIP_TCP_OPT_LENGTH(optflags); - 800a238: 7ffb ldrb r3, [r7, #31] - 800a23a: 009b lsls r3, r3, #2 - 800a23c: b2db uxtb r3, r3 - 800a23e: f003 0304 and.w r3, r3, #4 - 800a242: 75fb strb r3, [r7, #23] - - /* Allocate pbuf with room for TCP header + options */ - if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { - 800a244: 7dfb ldrb r3, [r7, #23] - 800a246: b29b uxth r3, r3 - 800a248: 2200 movs r2, #0 - 800a24a: 4619 mov r1, r3 - 800a24c: 2000 movs r0, #0 - 800a24e: f7fb fc9f bl 8005b90 - 800a252: 6138 str r0, [r7, #16] - 800a254: 693b ldr r3, [r7, #16] - 800a256: 2b00 cmp r3, #0 - 800a258: d109 bne.n 800a26e - pcb->flags |= TF_NAGLEMEMERR; - 800a25a: 687b ldr r3, [r7, #4] - 800a25c: 7e9b ldrb r3, [r3, #26] - 800a25e: f063 037f orn r3, r3, #127 ; 0x7f - 800a262: b2da uxtb r2, r3 - 800a264: 687b ldr r3, [r7, #4] - 800a266: 769a strb r2, [r3, #26] - TCP_STATS_INC(tcp.memerr); - return ERR_MEM; - 800a268: f04f 33ff mov.w r3, #4294967295 - 800a26c: e095 b.n 800a39a - } - LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", - 800a26e: 693b ldr r3, [r7, #16] - 800a270: 895a ldrh r2, [r3, #10] - 800a272: 7dfb ldrb r3, [r7, #23] - 800a274: b29b uxth r3, r3 - 800a276: 429a cmp r2, r3 - 800a278: d206 bcs.n 800a288 - 800a27a: 4b4a ldr r3, [pc, #296] ; (800a3a4 ) - 800a27c: f44f 7250 mov.w r2, #832 ; 0x340 - 800a280: 494b ldr r1, [pc, #300] ; (800a3b0 ) - 800a282: 484a ldr r0, [pc, #296] ; (800a3ac ) - 800a284: f005 fc1e bl 800fac4 - (p->len >= optlen)); - - /* Allocate memory for tcp_seg, and fill in fields. */ - if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { - 800a288: 687b ldr r3, [r7, #4] - 800a28a: 6d99 ldr r1, [r3, #88] ; 0x58 - 800a28c: 78fa ldrb r2, [r7, #3] - 800a28e: 7ffb ldrb r3, [r7, #31] - 800a290: 9300 str r3, [sp, #0] - 800a292: 460b mov r3, r1 - 800a294: 6939 ldr r1, [r7, #16] - 800a296: 6878 ldr r0, [r7, #4] - 800a298: f7ff ff0e bl 800a0b8 - 800a29c: 60f8 str r0, [r7, #12] - 800a29e: 68fb ldr r3, [r7, #12] - 800a2a0: 2b00 cmp r3, #0 - 800a2a2: d109 bne.n 800a2b8 - pcb->flags |= TF_NAGLEMEMERR; - 800a2a4: 687b ldr r3, [r7, #4] - 800a2a6: 7e9b ldrb r3, [r3, #26] - 800a2a8: f063 037f orn r3, r3, #127 ; 0x7f - 800a2ac: b2da uxtb r2, r3 - 800a2ae: 687b ldr r3, [r7, #4] - 800a2b0: 769a strb r2, [r3, #26] - TCP_STATS_INC(tcp.memerr); - return ERR_MEM; - 800a2b2: f04f 33ff mov.w r3, #4294967295 - 800a2b6: e070 b.n 800a39a - } - LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); - 800a2b8: 68fb ldr r3, [r7, #12] - 800a2ba: 68db ldr r3, [r3, #12] - 800a2bc: f003 0303 and.w r3, r3, #3 - 800a2c0: 2b00 cmp r3, #0 - 800a2c2: d006 beq.n 800a2d2 - 800a2c4: 4b37 ldr r3, [pc, #220] ; (800a3a4 ) - 800a2c6: f240 3249 movw r2, #841 ; 0x349 - 800a2ca: 493a ldr r1, [pc, #232] ; (800a3b4 ) - 800a2cc: 4837 ldr r0, [pc, #220] ; (800a3ac ) - 800a2ce: f005 fbf9 bl 800fac4 - LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); - 800a2d2: 68fb ldr r3, [r7, #12] - 800a2d4: 891b ldrh r3, [r3, #8] - 800a2d6: 2b00 cmp r3, #0 - 800a2d8: d006 beq.n 800a2e8 - 800a2da: 4b32 ldr r3, [pc, #200] ; (800a3a4 ) - 800a2dc: f240 324a movw r2, #842 ; 0x34a - 800a2e0: 4935 ldr r1, [pc, #212] ; (800a3b8 ) - 800a2e2: 4832 ldr r0, [pc, #200] ; (800a3ac ) - 800a2e4: f005 fbee bl 800fac4 - lwip_ntohl(seg->tcphdr->seqno), - lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg), - (u16_t)flags)); - - /* Now append seg to pcb->unsent queue */ - if (pcb->unsent == NULL) { - 800a2e8: 687b ldr r3, [r7, #4] - 800a2ea: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a2ec: 2b00 cmp r3, #0 - 800a2ee: d103 bne.n 800a2f8 - pcb->unsent = seg; - 800a2f0: 687b ldr r3, [r7, #4] - 800a2f2: 68fa ldr r2, [r7, #12] - 800a2f4: 669a str r2, [r3, #104] ; 0x68 - 800a2f6: e00d b.n 800a314 - } else { - struct tcp_seg *useg; - for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); - 800a2f8: 687b ldr r3, [r7, #4] - 800a2fa: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a2fc: 61bb str r3, [r7, #24] - 800a2fe: e002 b.n 800a306 - 800a300: 69bb ldr r3, [r7, #24] - 800a302: 681b ldr r3, [r3, #0] - 800a304: 61bb str r3, [r7, #24] - 800a306: 69bb ldr r3, [r7, #24] - 800a308: 681b ldr r3, [r3, #0] - 800a30a: 2b00 cmp r3, #0 - 800a30c: d1f8 bne.n 800a300 - useg->next = seg; - 800a30e: 69bb ldr r3, [r7, #24] - 800a310: 68fa ldr r2, [r7, #12] - 800a312: 601a str r2, [r3, #0] - } -#if TCP_OVERSIZE - /* The new unsent tail has no space */ - pcb->unsent_oversize = 0; - 800a314: 687b ldr r3, [r7, #4] - 800a316: 2200 movs r2, #0 - 800a318: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 -#endif /* TCP_OVERSIZE */ - - /* SYN and FIN bump the sequence number */ - if ((flags & TCP_SYN) || (flags & TCP_FIN)) { - 800a31c: 78fb ldrb r3, [r7, #3] - 800a31e: f003 0302 and.w r3, r3, #2 - 800a322: 2b00 cmp r3, #0 - 800a324: d104 bne.n 800a330 - 800a326: 78fb ldrb r3, [r7, #3] - 800a328: f003 0301 and.w r3, r3, #1 - 800a32c: 2b00 cmp r3, #0 - 800a32e: d004 beq.n 800a33a - pcb->snd_lbb++; - 800a330: 687b ldr r3, [r7, #4] - 800a332: 6d9b ldr r3, [r3, #88] ; 0x58 - 800a334: 1c5a adds r2, r3, #1 - 800a336: 687b ldr r3, [r7, #4] - 800a338: 659a str r2, [r3, #88] ; 0x58 - /* optlen does not influence snd_buf */ - } - if (flags & TCP_FIN) { - 800a33a: 78fb ldrb r3, [r7, #3] - 800a33c: f003 0301 and.w r3, r3, #1 - 800a340: 2b00 cmp r3, #0 - 800a342: d006 beq.n 800a352 - pcb->flags |= TF_FIN; - 800a344: 687b ldr r3, [r7, #4] - 800a346: 7e9b ldrb r3, [r3, #26] - 800a348: f043 0320 orr.w r3, r3, #32 - 800a34c: b2da uxtb r2, r3 - 800a34e: 687b ldr r3, [r7, #4] - 800a350: 769a strb r2, [r3, #26] - } - - /* update number of segments on the queues */ - pcb->snd_queuelen += pbuf_clen(seg->p); - 800a352: 68fb ldr r3, [r7, #12] - 800a354: 685b ldr r3, [r3, #4] - 800a356: 4618 mov r0, r3 - 800a358: f7fc f826 bl 80063a8 - 800a35c: 4603 mov r3, r0 - 800a35e: 461a mov r2, r3 - 800a360: 687b ldr r3, [r7, #4] - 800a362: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 800a366: 4413 add r3, r2 - 800a368: b29a uxth r2, r3 - 800a36a: 687b ldr r3, [r7, #4] - 800a36c: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: %"S16_F" (after enqueued)\n", pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - 800a370: 687b ldr r3, [r7, #4] - 800a372: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 800a376: 2b00 cmp r3, #0 - 800a378: d00e beq.n 800a398 - LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", - 800a37a: 687b ldr r3, [r7, #4] - 800a37c: 6edb ldr r3, [r3, #108] ; 0x6c - 800a37e: 2b00 cmp r3, #0 - 800a380: d10a bne.n 800a398 - 800a382: 687b ldr r3, [r7, #4] - 800a384: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a386: 2b00 cmp r3, #0 - 800a388: d106 bne.n 800a398 - 800a38a: 4b06 ldr r3, [pc, #24] ; (800a3a4 ) - 800a38c: f44f 725b mov.w r2, #876 ; 0x36c - 800a390: 490a ldr r1, [pc, #40] ; (800a3bc ) - 800a392: 4806 ldr r0, [pc, #24] ; (800a3ac ) - 800a394: f005 fb96 bl 800fac4 - pcb->unacked != NULL || pcb->unsent != NULL); - } - - return ERR_OK; - 800a398: 2300 movs r3, #0 -} - 800a39a: 4618 mov r0, r3 - 800a39c: 3720 adds r7, #32 - 800a39e: 46bd mov sp, r7 - 800a3a0: bd80 pop {r7, pc} - 800a3a2: bf00 nop - 800a3a4: 080119c8 .word 0x080119c8 - 800a3a8: 08011ccc .word 0x08011ccc - 800a3ac: 08011a2c .word 0x08011a2c - 800a3b0: 08011d24 .word 0x08011d24 - 800a3b4: 08011d60 .word 0x08011d60 - 800a3b8: 08011d78 .word 0x08011d78 - 800a3bc: 08011da4 .word 0x08011da4 - -0800a3c0 : - * - * @param pcb Protocol control block for the TCP connection to send the ACK - */ -err_t -tcp_send_empty_ack(struct tcp_pcb *pcb) -{ - 800a3c0: b590 push {r4, r7, lr} - 800a3c2: b08b sub sp, #44 ; 0x2c - 800a3c4: af04 add r7, sp, #16 - 800a3c6: 6078 str r0, [r7, #4] - err_t err; - struct pbuf *p; - u8_t optlen = 0; - 800a3c8: 2300 movs r3, #0 - 800a3ca: 75bb strb r3, [r7, #22] - if (pcb->flags & TF_TIMESTAMP) { - optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); - } -#endif - - p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt)); - 800a3cc: 7dbb ldrb r3, [r7, #22] - 800a3ce: b29c uxth r4, r3 - 800a3d0: 687b ldr r3, [r7, #4] - 800a3d2: 6cdb ldr r3, [r3, #76] ; 0x4c - 800a3d4: 4618 mov r0, r3 - 800a3d6: f7fa fe4b bl 8005070 - 800a3da: 4603 mov r3, r0 - 800a3dc: 2200 movs r2, #0 - 800a3de: 4621 mov r1, r4 - 800a3e0: 6878 ldr r0, [r7, #4] - 800a3e2: f7ff fdaf bl 8009f44 - 800a3e6: 6138 str r0, [r7, #16] - if (p == NULL) { - 800a3e8: 693b ldr r3, [r7, #16] - 800a3ea: 2b00 cmp r3, #0 - 800a3ec: d109 bne.n 800a402 - /* let tcp_fasttmr retry sending this ACK */ - pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); - 800a3ee: 687b ldr r3, [r7, #4] - 800a3f0: 7e9b ldrb r3, [r3, #26] - 800a3f2: f043 0303 orr.w r3, r3, #3 - 800a3f6: b2da uxtb r2, r3 - 800a3f8: 687b ldr r3, [r7, #4] - 800a3fa: 769a strb r2, [r3, #26] - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); - return ERR_BUF; - 800a3fc: f06f 0301 mvn.w r3, #1 - 800a400: e036 b.n 800a470 - if (pcb->flags & TF_TIMESTAMP) { - tcp_build_timestamp_option(pcb, (u32_t *)(tcphdr + 1)); - } -#endif - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - 800a402: 687b ldr r3, [r7, #4] - 800a404: 3304 adds r3, #4 - 800a406: 4618 mov r0, r3 - 800a408: f004 f8ea bl 800e5e0 - 800a40c: 60f8 str r0, [r7, #12] - if (netif == NULL) { - 800a40e: 68fb ldr r3, [r7, #12] - 800a410: 2b00 cmp r3, #0 - 800a412: d102 bne.n 800a41a - err = ERR_RTE; - 800a414: 23fc movs r3, #252 ; 0xfc - 800a416: 75fb strb r3, [r7, #23] - 800a418: e012 b.n 800a440 - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &pcb->local_ip, &pcb->remote_ip); - } -#endif - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, - 800a41a: 6879 ldr r1, [r7, #4] - 800a41c: 687b ldr r3, [r7, #4] - 800a41e: 1d18 adds r0, r3, #4 - 800a420: 687b ldr r3, [r7, #4] - 800a422: 7a9c ldrb r4, [r3, #10] - 800a424: 687b ldr r3, [r7, #4] - 800a426: 7a5b ldrb r3, [r3, #9] - 800a428: 68fa ldr r2, [r7, #12] - 800a42a: 9202 str r2, [sp, #8] - 800a42c: 2206 movs r2, #6 - 800a42e: 9201 str r2, [sp, #4] - 800a430: 9300 str r3, [sp, #0] - 800a432: 4623 mov r3, r4 - 800a434: 4602 mov r2, r0 - 800a436: 6938 ldr r0, [r7, #16] - 800a438: f004 fa9a bl 800e970 - 800a43c: 4603 mov r3, r0 - 800a43e: 75fb strb r3, [r7, #23] - pcb->ttl, pcb->tos, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - pbuf_free(p); - 800a440: 6938 ldr r0, [r7, #16] - 800a442: f7fb ff1d bl 8006280 - - if (err != ERR_OK) { - 800a446: f997 3017 ldrsb.w r3, [r7, #23] - 800a44a: 2b00 cmp r3, #0 - 800a44c: d007 beq.n 800a45e - /* let tcp_fasttmr retry sending this ACK */ - pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); - 800a44e: 687b ldr r3, [r7, #4] - 800a450: 7e9b ldrb r3, [r3, #26] - 800a452: f043 0303 orr.w r3, r3, #3 - 800a456: b2da uxtb r2, r3 - 800a458: 687b ldr r3, [r7, #4] - 800a45a: 769a strb r2, [r3, #26] - 800a45c: e006 b.n 800a46c - } else { - /* remove ACK flags from the PCB, as we sent an empty ACK now */ - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); - 800a45e: 687b ldr r3, [r7, #4] - 800a460: 7e9b ldrb r3, [r3, #26] - 800a462: f023 0303 bic.w r3, r3, #3 - 800a466: b2da uxtb r2, r3 - 800a468: 687b ldr r3, [r7, #4] - 800a46a: 769a strb r2, [r3, #26] - } - - return err; - 800a46c: f997 3017 ldrsb.w r3, [r7, #23] -} - 800a470: 4618 mov r0, r3 - 800a472: 371c adds r7, #28 - 800a474: 46bd mov sp, r7 - 800a476: bd90 pop {r4, r7, pc} - -0800a478 : - * @return ERR_OK if data has been sent or nothing to send - * another err_t on error - */ -err_t -tcp_output(struct tcp_pcb *pcb) -{ - 800a478: b5b0 push {r4, r5, r7, lr} - 800a47a: b08a sub sp, #40 ; 0x28 - 800a47c: af00 add r7, sp, #0 - 800a47e: 6078 str r0, [r7, #4] -#if TCP_CWND_DEBUG - s16_t i = 0; -#endif /* TCP_CWND_DEBUG */ - - /* pcb->state LISTEN not allowed here */ - LWIP_ASSERT("don't call tcp_output for listen-pcbs", - 800a480: 687b ldr r3, [r7, #4] - 800a482: 7d1b ldrb r3, [r3, #20] - 800a484: 2b01 cmp r3, #1 - 800a486: d106 bne.n 800a496 - 800a488: 4b99 ldr r3, [pc, #612] ; (800a6f0 ) - 800a48a: f44f 727b mov.w r2, #1004 ; 0x3ec - 800a48e: 4999 ldr r1, [pc, #612] ; (800a6f4 ) - 800a490: 4899 ldr r0, [pc, #612] ; (800a6f8 ) - 800a492: f005 fb17 bl 800fac4 - - /* First, check if we are invoked by the TCP input processing - code. If so, we do not output anything. Instead, we rely on the - input processing code to call us when input processing is done - with. */ - if (tcp_input_pcb == pcb) { - 800a496: 4b99 ldr r3, [pc, #612] ; (800a6fc ) - 800a498: 681b ldr r3, [r3, #0] - 800a49a: 687a ldr r2, [r7, #4] - 800a49c: 429a cmp r2, r3 - 800a49e: d101 bne.n 800a4a4 - return ERR_OK; - 800a4a0: 2300 movs r3, #0 - 800a4a2: e1cb b.n 800a83c - } - - wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); - 800a4a4: 687b ldr r3, [r7, #4] - 800a4a6: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 - 800a4aa: 687b ldr r3, [r7, #4] - 800a4ac: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c - 800a4b0: 4293 cmp r3, r2 - 800a4b2: bf28 it cs - 800a4b4: 4613 movcs r3, r2 - 800a4b6: b29b uxth r3, r3 - 800a4b8: 61bb str r3, [r7, #24] - - seg = pcb->unsent; - 800a4ba: 687b ldr r3, [r7, #4] - 800a4bc: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a4be: 627b str r3, [r7, #36] ; 0x24 - * because the ->unsent queue is empty or because the window does - * not allow it), construct an empty ACK segment and send it. - * - * If data is to be sent, we will just piggyback the ACK (see below). - */ - if (pcb->flags & TF_ACK_NOW && - 800a4c0: 687b ldr r3, [r7, #4] - 800a4c2: 7e9b ldrb r3, [r3, #26] - 800a4c4: f003 0302 and.w r3, r3, #2 - 800a4c8: 2b00 cmp r3, #0 - 800a4ca: d017 beq.n 800a4fc - 800a4cc: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a4ce: 2b00 cmp r3, #0 - 800a4d0: d00f beq.n 800a4f2 - (seg == NULL || - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { - 800a4d2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a4d4: 68db ldr r3, [r3, #12] - 800a4d6: 685b ldr r3, [r3, #4] - 800a4d8: 4618 mov r0, r3 - 800a4da: f7fa fdc9 bl 8005070 - 800a4de: 4602 mov r2, r0 - 800a4e0: 687b ldr r3, [r7, #4] - 800a4e2: 6c5b ldr r3, [r3, #68] ; 0x44 - 800a4e4: 1ad3 subs r3, r2, r3 - 800a4e6: 6a7a ldr r2, [r7, #36] ; 0x24 - 800a4e8: 8912 ldrh r2, [r2, #8] - 800a4ea: 4413 add r3, r2 - (seg == NULL || - 800a4ec: 69ba ldr r2, [r7, #24] - 800a4ee: 429a cmp r2, r3 - 800a4f0: d204 bcs.n 800a4fc - return tcp_send_empty_ack(pcb); - 800a4f2: 6878 ldr r0, [r7, #4] - 800a4f4: f7ff ff64 bl 800a3c0 - 800a4f8: 4603 mov r3, r0 - 800a4fa: e19f b.n 800a83c - } - - /* useg should point to last segment on unacked queue */ - useg = pcb->unacked; - 800a4fc: 687b ldr r3, [r7, #4] - 800a4fe: 6edb ldr r3, [r3, #108] ; 0x6c - 800a500: 623b str r3, [r7, #32] - if (useg != NULL) { - 800a502: 6a3b ldr r3, [r7, #32] - 800a504: 2b00 cmp r3, #0 - 800a506: d007 beq.n 800a518 - for (; useg->next != NULL; useg = useg->next); - 800a508: e002 b.n 800a510 - 800a50a: 6a3b ldr r3, [r7, #32] - 800a50c: 681b ldr r3, [r3, #0] - 800a50e: 623b str r3, [r7, #32] - 800a510: 6a3b ldr r3, [r7, #32] - 800a512: 681b ldr r3, [r3, #0] - 800a514: 2b00 cmp r3, #0 - 800a516: d1f8 bne.n 800a50a - } - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - 800a518: 687b ldr r3, [r7, #4] - 800a51a: 3304 adds r3, #4 - 800a51c: 4618 mov r0, r3 - 800a51e: f004 f85f bl 800e5e0 - 800a522: 6178 str r0, [r7, #20] - if (netif == NULL) { - 800a524: 697b ldr r3, [r7, #20] - 800a526: 2b00 cmp r3, #0 - 800a528: d102 bne.n 800a530 - return ERR_RTE; - 800a52a: f06f 0303 mvn.w r3, #3 - 800a52e: e185 b.n 800a83c - } - - /* If we don't have a local IP address, we get one from netif */ - if (ip_addr_isany(&pcb->local_ip)) { - 800a530: 687b ldr r3, [r7, #4] - 800a532: 2b00 cmp r3, #0 - 800a534: d003 beq.n 800a53e - 800a536: 687b ldr r3, [r7, #4] - 800a538: 681b ldr r3, [r3, #0] - 800a53a: 2b00 cmp r3, #0 - 800a53c: d111 bne.n 800a562 - const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); - 800a53e: 697b ldr r3, [r7, #20] - 800a540: 2b00 cmp r3, #0 - 800a542: d002 beq.n 800a54a - 800a544: 697b ldr r3, [r7, #20] - 800a546: 3304 adds r3, #4 - 800a548: e000 b.n 800a54c - 800a54a: 2300 movs r3, #0 - 800a54c: 613b str r3, [r7, #16] - if (local_ip == NULL) { - 800a54e: 693b ldr r3, [r7, #16] - 800a550: 2b00 cmp r3, #0 - 800a552: d102 bne.n 800a55a - return ERR_RTE; - 800a554: f06f 0303 mvn.w r3, #3 - 800a558: e170 b.n 800a83c - } - ip_addr_copy(pcb->local_ip, *local_ip); - 800a55a: 693b ldr r3, [r7, #16] - 800a55c: 681a ldr r2, [r3, #0] - 800a55e: 687b ldr r3, [r7, #4] - 800a560: 601a str r2, [r3, #0] - * with part of the unsent segment (which will engage zero-window probing upon - * reception of the zero window update from the receiver). This ensures the - * subsequent window update is reliably received. With the goal of being lightweight, - * we avoid splitting the unsent segment and treat the window as already zero. - */ - if (seg != NULL && - 800a562: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a564: 2b00 cmp r3, #0 - 800a566: f000 813f beq.w 800a7e8 - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd && - 800a56a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a56c: 68db ldr r3, [r3, #12] - 800a56e: 685b ldr r3, [r3, #4] - 800a570: 4618 mov r0, r3 - 800a572: f7fa fd7d bl 8005070 - 800a576: 4602 mov r2, r0 - 800a578: 687b ldr r3, [r7, #4] - 800a57a: 6c5b ldr r3, [r3, #68] ; 0x44 - 800a57c: 1ad3 subs r3, r2, r3 - 800a57e: 6a7a ldr r2, [r7, #36] ; 0x24 - 800a580: 8912 ldrh r2, [r2, #8] - 800a582: 4413 add r3, r2 - if (seg != NULL && - 800a584: 69ba ldr r2, [r7, #24] - 800a586: 429a cmp r2, r3 - 800a588: f080 812e bcs.w 800a7e8 - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd && - 800a58c: 69bb ldr r3, [r7, #24] - 800a58e: 2b00 cmp r3, #0 - 800a590: f000 812a beq.w 800a7e8 - wnd > 0 && wnd == pcb->snd_wnd && pcb->unacked == NULL) { - 800a594: 687b ldr r3, [r7, #4] - 800a596: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c - 800a59a: 461a mov r2, r3 - 800a59c: 69bb ldr r3, [r7, #24] - 800a59e: 4293 cmp r3, r2 - 800a5a0: f040 8122 bne.w 800a7e8 - 800a5a4: 687b ldr r3, [r7, #4] - 800a5a6: 6edb ldr r3, [r3, #108] ; 0x6c - 800a5a8: 2b00 cmp r3, #0 - 800a5aa: f040 811d bne.w 800a7e8 - /* Start the persist timer */ - if (pcb->persist_backoff == 0) { - 800a5ae: 687b ldr r3, [r7, #4] - 800a5b0: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 - 800a5b4: 2b00 cmp r3, #0 - 800a5b6: f040 812c bne.w 800a812 - pcb->persist_cnt = 0; - 800a5ba: 687b ldr r3, [r7, #4] - 800a5bc: 2200 movs r2, #0 - 800a5be: f883 2094 strb.w r2, [r3, #148] ; 0x94 - pcb->persist_backoff = 1; - 800a5c2: 687b ldr r3, [r7, #4] - 800a5c4: 2201 movs r2, #1 - 800a5c6: f883 2095 strb.w r2, [r3, #149] ; 0x95 - } - goto output_done; - 800a5ca: e122 b.n 800a812 - } - /* data available and window allows it to be sent? */ - while (seg != NULL && - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { - LWIP_ASSERT("RST not expected here!", - 800a5cc: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a5ce: 68db ldr r3, [r3, #12] - 800a5d0: 899b ldrh r3, [r3, #12] - 800a5d2: b29b uxth r3, r3 - 800a5d4: 4618 mov r0, r3 - 800a5d6: f7fa fd3e bl 8005056 - 800a5da: 4603 mov r3, r0 - 800a5dc: f003 0304 and.w r3, r3, #4 - 800a5e0: 2b00 cmp r3, #0 - 800a5e2: d006 beq.n 800a5f2 - 800a5e4: 4b42 ldr r3, [pc, #264] ; (800a6f0 ) - 800a5e6: f240 4245 movw r2, #1093 ; 0x445 - 800a5ea: 4945 ldr r1, [pc, #276] ; (800a700 ) - 800a5ec: 4842 ldr r0, [pc, #264] ; (800a6f8 ) - 800a5ee: f005 fa69 bl 800fac4 - * - if tcp_write had a memory error before (prevent delayed ACK timeout) or - * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - - * either seg->next != NULL or pcb->unacked == NULL; - * RST is no sent using tcp_write/tcp_output. - */ - if ((tcp_do_output_nagle(pcb) == 0) && - 800a5f2: 687b ldr r3, [r7, #4] - 800a5f4: 6edb ldr r3, [r3, #108] ; 0x6c - 800a5f6: 2b00 cmp r3, #0 - 800a5f8: d01f beq.n 800a63a - 800a5fa: 687b ldr r3, [r7, #4] - 800a5fc: 7e9b ldrb r3, [r3, #26] - 800a5fe: f003 0344 and.w r3, r3, #68 ; 0x44 - 800a602: 2b00 cmp r3, #0 - 800a604: d119 bne.n 800a63a - 800a606: 687b ldr r3, [r7, #4] - 800a608: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a60a: 2b00 cmp r3, #0 - 800a60c: d00b beq.n 800a626 - 800a60e: 687b ldr r3, [r7, #4] - 800a610: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a612: 681b ldr r3, [r3, #0] - 800a614: 2b00 cmp r3, #0 - 800a616: d110 bne.n 800a63a - 800a618: 687b ldr r3, [r7, #4] - 800a61a: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a61c: 891a ldrh r2, [r3, #8] - 800a61e: 687b ldr r3, [r7, #4] - 800a620: 8e5b ldrh r3, [r3, #50] ; 0x32 - 800a622: 429a cmp r2, r3 - 800a624: d209 bcs.n 800a63a - 800a626: 687b ldr r3, [r7, #4] - 800a628: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 - 800a62c: 2b00 cmp r3, #0 - 800a62e: d004 beq.n 800a63a - 800a630: 687b ldr r3, [r7, #4] - 800a632: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 - 800a636: 2b08 cmp r3, #8 - 800a638: d901 bls.n 800a63e - 800a63a: 2301 movs r3, #1 - 800a63c: e000 b.n 800a640 - 800a63e: 2300 movs r3, #0 - 800a640: 2b00 cmp r3, #0 - 800a642: d106 bne.n 800a652 - ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { - 800a644: 687b ldr r3, [r7, #4] - 800a646: 7e9b ldrb r3, [r3, #26] - 800a648: f003 03a0 and.w r3, r3, #160 ; 0xa0 - if ((tcp_do_output_nagle(pcb) == 0) && - 800a64c: 2b00 cmp r3, #0 - 800a64e: f000 80e2 beq.w 800a816 - pcb->lastack, - lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); - ++i; -#endif /* TCP_CWND_DEBUG */ - - if (pcb->state != SYN_SENT) { - 800a652: 687b ldr r3, [r7, #4] - 800a654: 7d1b ldrb r3, [r3, #20] - 800a656: 2b02 cmp r3, #2 - 800a658: d00d beq.n 800a676 - TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); - 800a65a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a65c: 68db ldr r3, [r3, #12] - 800a65e: 899b ldrh r3, [r3, #12] - 800a660: b29c uxth r4, r3 - 800a662: 2010 movs r0, #16 - 800a664: f7fa fcf7 bl 8005056 - 800a668: 4603 mov r3, r0 - 800a66a: 461a mov r2, r3 - 800a66c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a66e: 68db ldr r3, [r3, #12] - 800a670: 4322 orrs r2, r4 - 800a672: b292 uxth r2, r2 - 800a674: 819a strh r2, [r3, #12] - } - -#if TCP_OVERSIZE_DBGCHECK - seg->oversize_left = 0; -#endif /* TCP_OVERSIZE_DBGCHECK */ - err = tcp_output_segment(seg, pcb, netif); - 800a676: 697a ldr r2, [r7, #20] - 800a678: 6879 ldr r1, [r7, #4] - 800a67a: 6a78 ldr r0, [r7, #36] ; 0x24 - 800a67c: f000 f8e2 bl 800a844 - 800a680: 4603 mov r3, r0 - 800a682: 73fb strb r3, [r7, #15] - if (err != ERR_OK) { - 800a684: f997 300f ldrsb.w r3, [r7, #15] - 800a688: 2b00 cmp r3, #0 - 800a68a: d009 beq.n 800a6a0 - /* segment could not be sent, for whatever reason */ - pcb->flags |= TF_NAGLEMEMERR; - 800a68c: 687b ldr r3, [r7, #4] - 800a68e: 7e9b ldrb r3, [r3, #26] - 800a690: f063 037f orn r3, r3, #127 ; 0x7f - 800a694: b2da uxtb r2, r3 - 800a696: 687b ldr r3, [r7, #4] - 800a698: 769a strb r2, [r3, #26] - return err; - 800a69a: f997 300f ldrsb.w r3, [r7, #15] - 800a69e: e0cd b.n 800a83c - } - pcb->unsent = seg->next; - 800a6a0: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a6a2: 681a ldr r2, [r3, #0] - 800a6a4: 687b ldr r3, [r7, #4] - 800a6a6: 669a str r2, [r3, #104] ; 0x68 - if (pcb->state != SYN_SENT) { - 800a6a8: 687b ldr r3, [r7, #4] - 800a6aa: 7d1b ldrb r3, [r3, #20] - 800a6ac: 2b02 cmp r3, #2 - 800a6ae: d006 beq.n 800a6be - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); - 800a6b0: 687b ldr r3, [r7, #4] - 800a6b2: 7e9b ldrb r3, [r3, #26] - 800a6b4: f023 0303 bic.w r3, r3, #3 - 800a6b8: b2da uxtb r2, r3 - 800a6ba: 687b ldr r3, [r7, #4] - 800a6bc: 769a strb r2, [r3, #26] - } - snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); - 800a6be: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a6c0: 68db ldr r3, [r3, #12] - 800a6c2: 685b ldr r3, [r3, #4] - 800a6c4: 4618 mov r0, r3 - 800a6c6: f7fa fcd3 bl 8005070 - 800a6ca: 4604 mov r4, r0 - 800a6cc: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a6ce: 891b ldrh r3, [r3, #8] - 800a6d0: 461d mov r5, r3 - 800a6d2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a6d4: 68db ldr r3, [r3, #12] - 800a6d6: 899b ldrh r3, [r3, #12] - 800a6d8: b29b uxth r3, r3 - 800a6da: 4618 mov r0, r3 - 800a6dc: f7fa fcbb bl 8005056 - 800a6e0: 4603 mov r3, r0 - 800a6e2: f003 0303 and.w r3, r3, #3 - 800a6e6: 2b00 cmp r3, #0 - 800a6e8: d00c beq.n 800a704 - 800a6ea: 2301 movs r3, #1 - 800a6ec: e00b b.n 800a706 - 800a6ee: bf00 nop - 800a6f0: 080119c8 .word 0x080119c8 - 800a6f4: 08011dcc .word 0x08011dcc - 800a6f8: 08011a2c .word 0x08011a2c - 800a6fc: 20006db0 .word 0x20006db0 - 800a700: 08011df4 .word 0x08011df4 - 800a704: 2300 movs r3, #0 - 800a706: 442b add r3, r5 - 800a708: 4423 add r3, r4 - 800a70a: 60bb str r3, [r7, #8] - if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { - 800a70c: 687b ldr r3, [r7, #4] - 800a70e: 6cda ldr r2, [r3, #76] ; 0x4c - 800a710: 68bb ldr r3, [r7, #8] - 800a712: 1ad3 subs r3, r2, r3 - 800a714: 2b00 cmp r3, #0 - 800a716: da02 bge.n 800a71e - pcb->snd_nxt = snd_nxt; - 800a718: 687b ldr r3, [r7, #4] - 800a71a: 68ba ldr r2, [r7, #8] - 800a71c: 64da str r2, [r3, #76] ; 0x4c - } - /* put segment on unacknowledged list if length > 0 */ - if (TCP_TCPLEN(seg) > 0) { - 800a71e: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a720: 891b ldrh r3, [r3, #8] - 800a722: 461c mov r4, r3 - 800a724: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a726: 68db ldr r3, [r3, #12] - 800a728: 899b ldrh r3, [r3, #12] - 800a72a: b29b uxth r3, r3 - 800a72c: 4618 mov r0, r3 - 800a72e: f7fa fc92 bl 8005056 - 800a732: 4603 mov r3, r0 - 800a734: f003 0303 and.w r3, r3, #3 - 800a738: 2b00 cmp r3, #0 - 800a73a: d001 beq.n 800a740 - 800a73c: 2301 movs r3, #1 - 800a73e: e000 b.n 800a742 - 800a740: 2300 movs r3, #0 - 800a742: 4423 add r3, r4 - 800a744: 2b00 cmp r3, #0 - 800a746: d049 beq.n 800a7dc - seg->next = NULL; - 800a748: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a74a: 2200 movs r2, #0 - 800a74c: 601a str r2, [r3, #0] - /* unacked list is empty? */ - if (pcb->unacked == NULL) { - 800a74e: 687b ldr r3, [r7, #4] - 800a750: 6edb ldr r3, [r3, #108] ; 0x6c - 800a752: 2b00 cmp r3, #0 - 800a754: d105 bne.n 800a762 - pcb->unacked = seg; - 800a756: 687b ldr r3, [r7, #4] - 800a758: 6a7a ldr r2, [r7, #36] ; 0x24 - 800a75a: 66da str r2, [r3, #108] ; 0x6c - useg = seg; - 800a75c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a75e: 623b str r3, [r7, #32] - 800a760: e03f b.n 800a7e2 - /* unacked list is not empty? */ - } else { - /* In the case of fast retransmit, the packet should not go to the tail - * of the unacked queue, but rather somewhere before it. We need to check for - * this case. -STJ Jul 27, 2004 */ - if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) { - 800a762: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a764: 68db ldr r3, [r3, #12] - 800a766: 685b ldr r3, [r3, #4] - 800a768: 4618 mov r0, r3 - 800a76a: f7fa fc81 bl 8005070 - 800a76e: 4604 mov r4, r0 - 800a770: 6a3b ldr r3, [r7, #32] - 800a772: 68db ldr r3, [r3, #12] - 800a774: 685b ldr r3, [r3, #4] - 800a776: 4618 mov r0, r3 - 800a778: f7fa fc7a bl 8005070 - 800a77c: 4603 mov r3, r0 - 800a77e: 1ae3 subs r3, r4, r3 - 800a780: 2b00 cmp r3, #0 - 800a782: da24 bge.n 800a7ce - /* add segment to before tail of unacked list, keeping the list sorted */ - struct tcp_seg **cur_seg = &(pcb->unacked); - 800a784: 687b ldr r3, [r7, #4] - 800a786: 336c adds r3, #108 ; 0x6c - 800a788: 61fb str r3, [r7, #28] - while (*cur_seg && - 800a78a: e002 b.n 800a792 - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - cur_seg = &((*cur_seg)->next ); - 800a78c: 69fb ldr r3, [r7, #28] - 800a78e: 681b ldr r3, [r3, #0] - 800a790: 61fb str r3, [r7, #28] - while (*cur_seg && - 800a792: 69fb ldr r3, [r7, #28] - 800a794: 681b ldr r3, [r3, #0] - 800a796: 2b00 cmp r3, #0 - 800a798: d011 beq.n 800a7be - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - 800a79a: 69fb ldr r3, [r7, #28] - 800a79c: 681b ldr r3, [r3, #0] - 800a79e: 68db ldr r3, [r3, #12] - 800a7a0: 685b ldr r3, [r3, #4] - 800a7a2: 4618 mov r0, r3 - 800a7a4: f7fa fc64 bl 8005070 - 800a7a8: 4604 mov r4, r0 - 800a7aa: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a7ac: 68db ldr r3, [r3, #12] - 800a7ae: 685b ldr r3, [r3, #4] - 800a7b0: 4618 mov r0, r3 - 800a7b2: f7fa fc5d bl 8005070 - 800a7b6: 4603 mov r3, r0 - 800a7b8: 1ae3 subs r3, r4, r3 - while (*cur_seg && - 800a7ba: 2b00 cmp r3, #0 - 800a7bc: dbe6 blt.n 800a78c - } - seg->next = (*cur_seg); - 800a7be: 69fb ldr r3, [r7, #28] - 800a7c0: 681a ldr r2, [r3, #0] - 800a7c2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a7c4: 601a str r2, [r3, #0] - (*cur_seg) = seg; - 800a7c6: 69fb ldr r3, [r7, #28] - 800a7c8: 6a7a ldr r2, [r7, #36] ; 0x24 - 800a7ca: 601a str r2, [r3, #0] - 800a7cc: e009 b.n 800a7e2 - } else { - /* add segment to tail of unacked list */ - useg->next = seg; - 800a7ce: 6a3b ldr r3, [r7, #32] - 800a7d0: 6a7a ldr r2, [r7, #36] ; 0x24 - 800a7d2: 601a str r2, [r3, #0] - useg = useg->next; - 800a7d4: 6a3b ldr r3, [r7, #32] - 800a7d6: 681b ldr r3, [r3, #0] - 800a7d8: 623b str r3, [r7, #32] - 800a7da: e002 b.n 800a7e2 - } - } - /* do not queue empty segments on the unacked list */ - } else { - tcp_seg_free(seg); - 800a7dc: 6a78 ldr r0, [r7, #36] ; 0x24 - 800a7de: f7fc fead bl 800753c - } - seg = pcb->unsent; - 800a7e2: 687b ldr r3, [r7, #4] - 800a7e4: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a7e6: 627b str r3, [r7, #36] ; 0x24 - while (seg != NULL && - 800a7e8: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a7ea: 2b00 cmp r3, #0 - 800a7ec: d015 beq.n 800a81a - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { - 800a7ee: 6a7b ldr r3, [r7, #36] ; 0x24 - 800a7f0: 68db ldr r3, [r3, #12] - 800a7f2: 685b ldr r3, [r3, #4] - 800a7f4: 4618 mov r0, r3 - 800a7f6: f7fa fc3b bl 8005070 - 800a7fa: 4602 mov r2, r0 - 800a7fc: 687b ldr r3, [r7, #4] - 800a7fe: 6c5b ldr r3, [r3, #68] ; 0x44 - 800a800: 1ad3 subs r3, r2, r3 - 800a802: 6a7a ldr r2, [r7, #36] ; 0x24 - 800a804: 8912 ldrh r2, [r2, #8] - 800a806: 4413 add r3, r2 - while (seg != NULL && - 800a808: 69ba ldr r2, [r7, #24] - 800a80a: 429a cmp r2, r3 - 800a80c: f4bf aede bcs.w 800a5cc - } -output_done: - 800a810: e003 b.n 800a81a - goto output_done; - 800a812: bf00 nop - 800a814: e002 b.n 800a81c - break; - 800a816: bf00 nop - 800a818: e000 b.n 800a81c -output_done: - 800a81a: bf00 nop -#if TCP_OVERSIZE - if (pcb->unsent == NULL) { - 800a81c: 687b ldr r3, [r7, #4] - 800a81e: 6e9b ldr r3, [r3, #104] ; 0x68 - 800a820: 2b00 cmp r3, #0 - 800a822: d103 bne.n 800a82c - /* last unsent has been removed, reset unsent_oversize */ - pcb->unsent_oversize = 0; - 800a824: 687b ldr r3, [r7, #4] - 800a826: 2200 movs r2, #0 - 800a828: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 - } -#endif /* TCP_OVERSIZE */ - - pcb->flags &= ~TF_NAGLEMEMERR; - 800a82c: 687b ldr r3, [r7, #4] - 800a82e: 7e9b ldrb r3, [r3, #26] - 800a830: f003 037f and.w r3, r3, #127 ; 0x7f - 800a834: b2da uxtb r2, r3 - 800a836: 687b ldr r3, [r7, #4] - 800a838: 769a strb r2, [r3, #26] - return ERR_OK; - 800a83a: 2300 movs r3, #0 -} - 800a83c: 4618 mov r0, r3 - 800a83e: 3728 adds r7, #40 ; 0x28 - 800a840: 46bd mov sp, r7 - 800a842: bdb0 pop {r4, r5, r7, pc} - -0800a844 : - * @param pcb the tcp_pcb for the TCP connection used to send the segment - * @param netif the netif used to send the segment - */ -static err_t -tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif) -{ - 800a844: b5b0 push {r4, r5, r7, lr} - 800a846: b08c sub sp, #48 ; 0x30 - 800a848: af04 add r7, sp, #16 - 800a84a: 60f8 str r0, [r7, #12] - 800a84c: 60b9 str r1, [r7, #8] - 800a84e: 607a str r2, [r7, #4] - err_t err; - u16_t len; - u32_t *opts; - - if (seg->p->ref != 1) { - 800a850: 68fb ldr r3, [r7, #12] - 800a852: 685b ldr r3, [r3, #4] - 800a854: 89db ldrh r3, [r3, #14] - 800a856: 2b01 cmp r3, #1 - 800a858: d001 beq.n 800a85e - /* This can happen if the pbuf of this segment is still referenced by the - netif driver due to deferred transmission. Since this function modifies - p->len, we must not continue in this case. */ - return ERR_OK; - 800a85a: 2300 movs r3, #0 - 800a85c: e08a b.n 800a974 - } - - /* The TCP header has already been constructed, but the ackno and - wnd fields remain. */ - seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); - 800a85e: 68bb ldr r3, [r7, #8] - 800a860: 6a5a ldr r2, [r3, #36] ; 0x24 - 800a862: 68fb ldr r3, [r7, #12] - 800a864: 68dc ldr r4, [r3, #12] - 800a866: 4610 mov r0, r2 - 800a868: f7fa fc02 bl 8005070 - 800a86c: 4603 mov r3, r0 - 800a86e: 60a3 str r3, [r4, #8] - the window scale option) is never scaled. */ - seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(pcb->rcv_ann_wnd)); - } else -#endif /* LWIP_WND_SCALE */ - { - seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); - 800a870: 68bb ldr r3, [r7, #8] - 800a872: 8d5a ldrh r2, [r3, #42] ; 0x2a - 800a874: 68fb ldr r3, [r7, #12] - 800a876: 68dc ldr r4, [r3, #12] - 800a878: 4610 mov r0, r2 - 800a87a: f7fa fbec bl 8005056 - 800a87e: 4603 mov r3, r0 - 800a880: 81e3 strh r3, [r4, #14] - } - - pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; - 800a882: 68bb ldr r3, [r7, #8] - 800a884: 6a5b ldr r3, [r3, #36] ; 0x24 - 800a886: 68ba ldr r2, [r7, #8] - 800a888: 8d52 ldrh r2, [r2, #42] ; 0x2a - 800a88a: 441a add r2, r3 - 800a88c: 68bb ldr r3, [r7, #8] - 800a88e: 62da str r2, [r3, #44] ; 0x2c - - /* Add any requested options. NB MSS option is only set on SYN - packets, so ignore it here */ - /* cast through void* to get rid of alignment warnings */ - opts = (u32_t *)(void *)(seg->tcphdr + 1); - 800a890: 68fb ldr r3, [r7, #12] - 800a892: 68db ldr r3, [r3, #12] - 800a894: 3314 adds r3, #20 - 800a896: 61fb str r3, [r7, #28] - if (seg->flags & TF_SEG_OPTS_MSS) { - 800a898: 68fb ldr r3, [r7, #12] - 800a89a: 7a9b ldrb r3, [r3, #10] - 800a89c: f003 0301 and.w r3, r3, #1 - 800a8a0: 2b00 cmp r3, #0 - 800a8a2: d014 beq.n 800a8ce - u16_t mss; -#if TCP_CALCULATE_EFF_SEND_MSS - mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip); - 800a8a4: 68bb ldr r3, [r7, #8] - 800a8a6: 3304 adds r3, #4 - 800a8a8: 4619 mov r1, r3 - 800a8aa: f44f 7006 mov.w r0, #536 ; 0x218 - 800a8ae: f7fd f8ad bl 8007a0c - 800a8b2: 4603 mov r3, r0 - 800a8b4: 837b strh r3, [r7, #26] -#else /* TCP_CALCULATE_EFF_SEND_MSS */ - mss = TCP_MSS; -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - *opts = TCP_BUILD_MSS_OPTION(mss); - 800a8b6: 8b7b ldrh r3, [r7, #26] - 800a8b8: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000 - 800a8bc: 4618 mov r0, r3 - 800a8be: f7fa fbd7 bl 8005070 - 800a8c2: 4602 mov r2, r0 - 800a8c4: 69fb ldr r3, [r7, #28] - 800a8c6: 601a str r2, [r3, #0] - opts += 1; - 800a8c8: 69fb ldr r3, [r7, #28] - 800a8ca: 3304 adds r3, #4 - 800a8cc: 61fb str r3, [r7, #28] - } -#endif - - /* Set retransmission timer running if it is not currently enabled - This must be set before checking the route. */ - if (pcb->rtime < 0) { - 800a8ce: 68bb ldr r3, [r7, #8] - 800a8d0: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 - 800a8d4: 2b00 cmp r3, #0 - 800a8d6: da02 bge.n 800a8de - pcb->rtime = 0; - 800a8d8: 68bb ldr r3, [r7, #8] - 800a8da: 2200 movs r2, #0 - 800a8dc: 861a strh r2, [r3, #48] ; 0x30 - } - - if (pcb->rttest == 0) { - 800a8de: 68bb ldr r3, [r7, #8] - 800a8e0: 6b5b ldr r3, [r3, #52] ; 0x34 - 800a8e2: 2b00 cmp r3, #0 - 800a8e4: d10c bne.n 800a900 - pcb->rttest = tcp_ticks; - 800a8e6: 4b25 ldr r3, [pc, #148] ; (800a97c ) - 800a8e8: 681a ldr r2, [r3, #0] - 800a8ea: 68bb ldr r3, [r7, #8] - 800a8ec: 635a str r2, [r3, #52] ; 0x34 - pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); - 800a8ee: 68fb ldr r3, [r7, #12] - 800a8f0: 68db ldr r3, [r3, #12] - 800a8f2: 685b ldr r3, [r3, #4] - 800a8f4: 4618 mov r0, r3 - 800a8f6: f7fa fbbb bl 8005070 - 800a8fa: 4602 mov r2, r0 - 800a8fc: 68bb ldr r3, [r7, #8] - 800a8fe: 639a str r2, [r3, #56] ; 0x38 - } - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", - lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) + - seg->len)); - - len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); - 800a900: 68fb ldr r3, [r7, #12] - 800a902: 68da ldr r2, [r3, #12] - 800a904: 68fb ldr r3, [r7, #12] - 800a906: 685b ldr r3, [r3, #4] - 800a908: 685b ldr r3, [r3, #4] - 800a90a: 1ad3 subs r3, r2, r3 - 800a90c: 833b strh r3, [r7, #24] - if (len == 0) { - /** Exclude retransmitted segments from this count. */ - MIB2_STATS_INC(mib2.tcpoutsegs); - } - - seg->p->len -= len; - 800a90e: 68fb ldr r3, [r7, #12] - 800a910: 685b ldr r3, [r3, #4] - 800a912: 8959 ldrh r1, [r3, #10] - 800a914: 68fb ldr r3, [r7, #12] - 800a916: 685b ldr r3, [r3, #4] - 800a918: 8b3a ldrh r2, [r7, #24] - 800a91a: 1a8a subs r2, r1, r2 - 800a91c: b292 uxth r2, r2 - 800a91e: 815a strh r2, [r3, #10] - seg->p->tot_len -= len; - 800a920: 68fb ldr r3, [r7, #12] - 800a922: 685b ldr r3, [r3, #4] - 800a924: 8919 ldrh r1, [r3, #8] - 800a926: 68fb ldr r3, [r7, #12] - 800a928: 685b ldr r3, [r3, #4] - 800a92a: 8b3a ldrh r2, [r7, #24] - 800a92c: 1a8a subs r2, r1, r2 - 800a92e: b292 uxth r2, r2 - 800a930: 811a strh r2, [r3, #8] - - seg->p->payload = seg->tcphdr; - 800a932: 68fb ldr r3, [r7, #12] - 800a934: 685b ldr r3, [r3, #4] - 800a936: 68fa ldr r2, [r7, #12] - 800a938: 68d2 ldr r2, [r2, #12] - 800a93a: 605a str r2, [r3, #4] - - seg->tcphdr->chksum = 0; - 800a93c: 68fb ldr r3, [r7, #12] - 800a93e: 68db ldr r3, [r3, #12] - 800a940: 2200 movs r2, #0 - 800a942: 741a strb r2, [r3, #16] - 800a944: 2200 movs r2, #0 - 800a946: 745a strb r2, [r3, #17] - } -#endif /* CHECKSUM_GEN_TCP */ - TCP_STATS_INC(tcp.xmit); - - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, - 800a948: 68fb ldr r3, [r7, #12] - 800a94a: 6858 ldr r0, [r3, #4] - 800a94c: 68b9 ldr r1, [r7, #8] - 800a94e: 68bb ldr r3, [r7, #8] - 800a950: 1d1c adds r4, r3, #4 - 800a952: 68bb ldr r3, [r7, #8] - 800a954: 7a9d ldrb r5, [r3, #10] - 800a956: 68bb ldr r3, [r7, #8] - 800a958: 7a5b ldrb r3, [r3, #9] - 800a95a: 687a ldr r2, [r7, #4] - 800a95c: 9202 str r2, [sp, #8] - 800a95e: 2206 movs r2, #6 - 800a960: 9201 str r2, [sp, #4] - 800a962: 9300 str r3, [sp, #0] - 800a964: 462b mov r3, r5 - 800a966: 4622 mov r2, r4 - 800a968: f004 f802 bl 800e970 - 800a96c: 4603 mov r3, r0 - 800a96e: 75fb strb r3, [r7, #23] - pcb->tos, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - return err; - 800a970: f997 3017 ldrsb.w r3, [r7, #23] -} - 800a974: 4618 mov r0, r3 - 800a976: 3720 adds r7, #32 - 800a978: 46bd mov sp, r7 - 800a97a: bdb0 pop {r4, r5, r7, pc} - 800a97c: 20006d64 .word 0x20006d64 - -0800a980 : - */ -void -tcp_rst(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) -{ - 800a980: b580 push {r7, lr} - 800a982: b08c sub sp, #48 ; 0x30 - 800a984: af04 add r7, sp, #16 - 800a986: 60f8 str r0, [r7, #12] - 800a988: 60b9 str r1, [r7, #8] - 800a98a: 607a str r2, [r7, #4] - 800a98c: 603b str r3, [r7, #0] - struct pbuf *p; - struct tcp_hdr *tcphdr; - struct netif *netif; - p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); - 800a98e: 2200 movs r2, #0 - 800a990: 2114 movs r1, #20 - 800a992: 2001 movs r0, #1 - 800a994: f7fb f8fc bl 8005b90 - 800a998: 61f8 str r0, [r7, #28] - if (p == NULL) { - 800a99a: 69fb ldr r3, [r7, #28] - 800a99c: 2b00 cmp r3, #0 - 800a99e: d05b beq.n 800aa58 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); - return; - } - LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", - 800a9a0: 69fb ldr r3, [r7, #28] - 800a9a2: 895b ldrh r3, [r3, #10] - 800a9a4: 2b13 cmp r3, #19 - 800a9a6: d806 bhi.n 800a9b6 - 800a9a8: 4b2d ldr r3, [pc, #180] ; (800aa60 ) - 800a9aa: f240 524c movw r2, #1356 ; 0x54c - 800a9ae: 492d ldr r1, [pc, #180] ; (800aa64 ) - 800a9b0: 482d ldr r0, [pc, #180] ; (800aa68 ) - 800a9b2: f005 f887 bl 800fac4 - (p->len >= sizeof(struct tcp_hdr))); - - tcphdr = (struct tcp_hdr *)p->payload; - 800a9b6: 69fb ldr r3, [r7, #28] - 800a9b8: 685b ldr r3, [r3, #4] - 800a9ba: 61bb str r3, [r7, #24] - tcphdr->src = lwip_htons(local_port); - 800a9bc: 8d3b ldrh r3, [r7, #40] ; 0x28 - 800a9be: 4618 mov r0, r3 - 800a9c0: f7fa fb49 bl 8005056 - 800a9c4: 4603 mov r3, r0 - 800a9c6: 461a mov r2, r3 - 800a9c8: 69bb ldr r3, [r7, #24] - 800a9ca: 801a strh r2, [r3, #0] - tcphdr->dest = lwip_htons(remote_port); - 800a9cc: 8dbb ldrh r3, [r7, #44] ; 0x2c - 800a9ce: 4618 mov r0, r3 - 800a9d0: f7fa fb41 bl 8005056 - 800a9d4: 4603 mov r3, r0 - 800a9d6: 461a mov r2, r3 - 800a9d8: 69bb ldr r3, [r7, #24] - 800a9da: 805a strh r2, [r3, #2] - tcphdr->seqno = lwip_htonl(seqno); - 800a9dc: 68f8 ldr r0, [r7, #12] - 800a9de: f7fa fb47 bl 8005070 - 800a9e2: 4602 mov r2, r0 - 800a9e4: 69bb ldr r3, [r7, #24] - 800a9e6: 605a str r2, [r3, #4] - tcphdr->ackno = lwip_htonl(ackno); - 800a9e8: 68b8 ldr r0, [r7, #8] - 800a9ea: f7fa fb41 bl 8005070 - 800a9ee: 4602 mov r2, r0 - 800a9f0: 69bb ldr r3, [r7, #24] - 800a9f2: 609a str r2, [r3, #8] - TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); - 800a9f4: f245 0014 movw r0, #20500 ; 0x5014 - 800a9f8: f7fa fb2d bl 8005056 - 800a9fc: 4603 mov r3, r0 - 800a9fe: 461a mov r2, r3 - 800aa00: 69bb ldr r3, [r7, #24] - 800aa02: 819a strh r2, [r3, #12] -#if LWIP_WND_SCALE - tcphdr->wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); -#else - tcphdr->wnd = PP_HTONS(TCP_WND); - 800aa04: 69bb ldr r3, [r7, #24] - 800aa06: 2200 movs r2, #0 - 800aa08: f042 0208 orr.w r2, r2, #8 - 800aa0c: 739a strb r2, [r3, #14] - 800aa0e: 2200 movs r2, #0 - 800aa10: f042 0260 orr.w r2, r2, #96 ; 0x60 - 800aa14: 73da strb r2, [r3, #15] -#endif - tcphdr->chksum = 0; - 800aa16: 69bb ldr r3, [r7, #24] - 800aa18: 2200 movs r2, #0 - 800aa1a: 741a strb r2, [r3, #16] - 800aa1c: 2200 movs r2, #0 - 800aa1e: 745a strb r2, [r3, #17] - tcphdr->urgp = 0; - 800aa20: 69bb ldr r3, [r7, #24] - 800aa22: 2200 movs r2, #0 - 800aa24: 749a strb r2, [r3, #18] - 800aa26: 2200 movs r2, #0 - 800aa28: 74da strb r2, [r3, #19] - - TCP_STATS_INC(tcp.xmit); - MIB2_STATS_INC(mib2.tcpoutrsts); - - netif = ip_route(local_ip, remote_ip); - 800aa2a: 6838 ldr r0, [r7, #0] - 800aa2c: f003 fdd8 bl 800e5e0 - 800aa30: 6178 str r0, [r7, #20] - if (netif != NULL) { - 800aa32: 697b ldr r3, [r7, #20] - 800aa34: 2b00 cmp r3, #0 - 800aa36: d00b beq.n 800aa50 - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - local_ip, remote_ip); - } -#endif - /* Send output with hardcoded TTL/HL since we have no access to the pcb */ - ip_output_if(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP, netif); - 800aa38: 697b ldr r3, [r7, #20] - 800aa3a: 9302 str r3, [sp, #8] - 800aa3c: 2306 movs r3, #6 - 800aa3e: 9301 str r3, [sp, #4] - 800aa40: 2300 movs r3, #0 - 800aa42: 9300 str r3, [sp, #0] - 800aa44: 23ff movs r3, #255 ; 0xff - 800aa46: 683a ldr r2, [r7, #0] - 800aa48: 6879 ldr r1, [r7, #4] - 800aa4a: 69f8 ldr r0, [r7, #28] - 800aa4c: f003 ff90 bl 800e970 - } - pbuf_free(p); - 800aa50: 69f8 ldr r0, [r7, #28] - 800aa52: f7fb fc15 bl 8006280 - 800aa56: e000 b.n 800aa5a - return; - 800aa58: bf00 nop - LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); -} - 800aa5a: 3720 adds r7, #32 - 800aa5c: 46bd mov sp, r7 - 800aa5e: bd80 pop {r7, pc} - 800aa60: 080119c8 .word 0x080119c8 - 800aa64: 080119fc .word 0x080119fc - 800aa68: 08011a2c .word 0x08011a2c - -0800aa6c : - * - * @param pcb the tcp_pcb for which to re-enqueue all unacked segments - */ -void -tcp_rexmit_rto(struct tcp_pcb *pcb) -{ - 800aa6c: b580 push {r7, lr} - 800aa6e: b084 sub sp, #16 - 800aa70: af00 add r7, sp, #0 - 800aa72: 6078 str r0, [r7, #4] - struct tcp_seg *seg; - - if (pcb->unacked == NULL) { - 800aa74: 687b ldr r3, [r7, #4] - 800aa76: 6edb ldr r3, [r3, #108] ; 0x6c - 800aa78: 2b00 cmp r3, #0 - 800aa7a: d029 beq.n 800aad0 - return; - } - - /* Move all unacked segments to the head of the unsent queue */ - for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); - 800aa7c: 687b ldr r3, [r7, #4] - 800aa7e: 6edb ldr r3, [r3, #108] ; 0x6c - 800aa80: 60fb str r3, [r7, #12] - 800aa82: e002 b.n 800aa8a - 800aa84: 68fb ldr r3, [r7, #12] - 800aa86: 681b ldr r3, [r3, #0] - 800aa88: 60fb str r3, [r7, #12] - 800aa8a: 68fb ldr r3, [r7, #12] - 800aa8c: 681b ldr r3, [r3, #0] - 800aa8e: 2b00 cmp r3, #0 - 800aa90: d1f8 bne.n 800aa84 - /* concatenate unsent queue after unacked queue */ - seg->next = pcb->unsent; - 800aa92: 687b ldr r3, [r7, #4] - 800aa94: 6e9a ldr r2, [r3, #104] ; 0x68 - 800aa96: 68fb ldr r3, [r7, #12] - 800aa98: 601a str r2, [r3, #0] - if (pcb->unsent == NULL) { - pcb->unsent_oversize = seg->oversize_left; - } -#endif /* TCP_OVERSIZE_DBGCHECK */ - /* unsent queue is the concatenated queue (of unacked, unsent) */ - pcb->unsent = pcb->unacked; - 800aa9a: 687b ldr r3, [r7, #4] - 800aa9c: 6eda ldr r2, [r3, #108] ; 0x6c - 800aa9e: 687b ldr r3, [r7, #4] - 800aaa0: 669a str r2, [r3, #104] ; 0x68 - /* unacked queue is now empty */ - pcb->unacked = NULL; - 800aaa2: 687b ldr r3, [r7, #4] - 800aaa4: 2200 movs r2, #0 - 800aaa6: 66da str r2, [r3, #108] ; 0x6c - - /* increment number of retransmissions */ - if (pcb->nrtx < 0xFF) { - 800aaa8: 687b ldr r3, [r7, #4] - 800aaaa: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 800aaae: 2bff cmp r3, #255 ; 0xff - 800aab0: d007 beq.n 800aac2 - ++pcb->nrtx; - 800aab2: 687b ldr r3, [r7, #4] - 800aab4: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 800aab8: 3301 adds r3, #1 - 800aaba: b2da uxtb r2, r3 - 800aabc: 687b ldr r3, [r7, #4] - 800aabe: f883 2042 strb.w r2, [r3, #66] ; 0x42 - } - - /* Don't take any RTT measurements after retransmitting. */ - pcb->rttest = 0; - 800aac2: 687b ldr r3, [r7, #4] - 800aac4: 2200 movs r2, #0 - 800aac6: 635a str r2, [r3, #52] ; 0x34 - - /* Do the actual retransmission */ - tcp_output(pcb); - 800aac8: 6878 ldr r0, [r7, #4] - 800aaca: f7ff fcd5 bl 800a478 - 800aace: e000 b.n 800aad2 - return; - 800aad0: bf00 nop -} - 800aad2: 3710 adds r7, #16 - 800aad4: 46bd mov sp, r7 - 800aad6: bd80 pop {r7, pc} - -0800aad8 : - * - * @param pcb the tcp_pcb for which to retransmit the first unacked segment - */ -void -tcp_rexmit(struct tcp_pcb *pcb) -{ - 800aad8: b590 push {r4, r7, lr} - 800aada: b085 sub sp, #20 - 800aadc: af00 add r7, sp, #0 - 800aade: 6078 str r0, [r7, #4] - struct tcp_seg *seg; - struct tcp_seg **cur_seg; - - if (pcb->unacked == NULL) { - 800aae0: 687b ldr r3, [r7, #4] - 800aae2: 6edb ldr r3, [r3, #108] ; 0x6c - 800aae4: 2b00 cmp r3, #0 - 800aae6: d043 beq.n 800ab70 - return; - } - - /* Move the first unacked segment to the unsent queue */ - /* Keep the unsent queue sorted. */ - seg = pcb->unacked; - 800aae8: 687b ldr r3, [r7, #4] - 800aaea: 6edb ldr r3, [r3, #108] ; 0x6c - 800aaec: 60bb str r3, [r7, #8] - pcb->unacked = seg->next; - 800aaee: 68bb ldr r3, [r7, #8] - 800aaf0: 681a ldr r2, [r3, #0] - 800aaf2: 687b ldr r3, [r7, #4] - 800aaf4: 66da str r2, [r3, #108] ; 0x6c - - cur_seg = &(pcb->unsent); - 800aaf6: 687b ldr r3, [r7, #4] - 800aaf8: 3368 adds r3, #104 ; 0x68 - 800aafa: 60fb str r3, [r7, #12] - while (*cur_seg && - 800aafc: e002 b.n 800ab04 - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - cur_seg = &((*cur_seg)->next ); - 800aafe: 68fb ldr r3, [r7, #12] - 800ab00: 681b ldr r3, [r3, #0] - 800ab02: 60fb str r3, [r7, #12] - while (*cur_seg && - 800ab04: 68fb ldr r3, [r7, #12] - 800ab06: 681b ldr r3, [r3, #0] - 800ab08: 2b00 cmp r3, #0 - 800ab0a: d011 beq.n 800ab30 - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - 800ab0c: 68fb ldr r3, [r7, #12] - 800ab0e: 681b ldr r3, [r3, #0] - 800ab10: 68db ldr r3, [r3, #12] - 800ab12: 685b ldr r3, [r3, #4] - 800ab14: 4618 mov r0, r3 - 800ab16: f7fa faab bl 8005070 - 800ab1a: 4604 mov r4, r0 - 800ab1c: 68bb ldr r3, [r7, #8] - 800ab1e: 68db ldr r3, [r3, #12] - 800ab20: 685b ldr r3, [r3, #4] - 800ab22: 4618 mov r0, r3 - 800ab24: f7fa faa4 bl 8005070 - 800ab28: 4603 mov r3, r0 - 800ab2a: 1ae3 subs r3, r4, r3 - while (*cur_seg && - 800ab2c: 2b00 cmp r3, #0 - 800ab2e: dbe6 blt.n 800aafe - } - seg->next = *cur_seg; - 800ab30: 68fb ldr r3, [r7, #12] - 800ab32: 681a ldr r2, [r3, #0] - 800ab34: 68bb ldr r3, [r7, #8] - 800ab36: 601a str r2, [r3, #0] - *cur_seg = seg; - 800ab38: 68fb ldr r3, [r7, #12] - 800ab3a: 68ba ldr r2, [r7, #8] - 800ab3c: 601a str r2, [r3, #0] -#if TCP_OVERSIZE - if (seg->next == NULL) { - 800ab3e: 68bb ldr r3, [r7, #8] - 800ab40: 681b ldr r3, [r3, #0] - 800ab42: 2b00 cmp r3, #0 - 800ab44: d103 bne.n 800ab4e - /* the retransmitted segment is last in unsent, so reset unsent_oversize */ - pcb->unsent_oversize = 0; - 800ab46: 687b ldr r3, [r7, #4] - 800ab48: 2200 movs r2, #0 - 800ab4a: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 - } -#endif /* TCP_OVERSIZE */ - - if (pcb->nrtx < 0xFF) { - 800ab4e: 687b ldr r3, [r7, #4] - 800ab50: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 800ab54: 2bff cmp r3, #255 ; 0xff - 800ab56: d007 beq.n 800ab68 - ++pcb->nrtx; - 800ab58: 687b ldr r3, [r7, #4] - 800ab5a: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 - 800ab5e: 3301 adds r3, #1 - 800ab60: b2da uxtb r2, r3 - 800ab62: 687b ldr r3, [r7, #4] - 800ab64: f883 2042 strb.w r2, [r3, #66] ; 0x42 - } - - /* Don't take any rtt measurements after retransmitting. */ - pcb->rttest = 0; - 800ab68: 687b ldr r3, [r7, #4] - 800ab6a: 2200 movs r2, #0 - 800ab6c: 635a str r2, [r3, #52] ; 0x34 - 800ab6e: e000 b.n 800ab72 - return; - 800ab70: bf00 nop - - /* Do the actual retransmission. */ - MIB2_STATS_INC(mib2.tcpretranssegs); - /* No need to call tcp_output: we are always called from tcp_input() - and thus tcp_output directly returns. */ -} - 800ab72: 3714 adds r7, #20 - 800ab74: 46bd mov sp, r7 - 800ab76: bd90 pop {r4, r7, pc} - -0800ab78 : - * - * @param pcb the tcp_pcb for which to retransmit the first unacked segment - */ -void -tcp_rexmit_fast(struct tcp_pcb *pcb) -{ - 800ab78: b580 push {r7, lr} - 800ab7a: b082 sub sp, #8 - 800ab7c: af00 add r7, sp, #0 - 800ab7e: 6078 str r0, [r7, #4] - if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { - 800ab80: 687b ldr r3, [r7, #4] - 800ab82: 6edb ldr r3, [r3, #108] ; 0x6c - 800ab84: 2b00 cmp r3, #0 - 800ab86: d041 beq.n 800ac0c - 800ab88: 687b ldr r3, [r7, #4] - 800ab8a: 7e9b ldrb r3, [r3, #26] - 800ab8c: f003 0304 and.w r3, r3, #4 - 800ab90: 2b00 cmp r3, #0 - 800ab92: d13b bne.n 800ac0c - LWIP_DEBUGF(TCP_FR_DEBUG, - ("tcp_receive: dupacks %"U16_F" (%"U32_F - "), fast retransmit %"U32_F"\n", - (u16_t)pcb->dupacks, pcb->lastack, - lwip_ntohl(pcb->unacked->tcphdr->seqno))); - tcp_rexmit(pcb); - 800ab94: 6878 ldr r0, [r7, #4] - 800ab96: f7ff ff9f bl 800aad8 - - /* Set ssthresh to half of the minimum of the current - * cwnd and the advertised window */ - pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2; - 800ab9a: 687b ldr r3, [r7, #4] - 800ab9c: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c - 800aba0: 687b ldr r3, [r7, #4] - 800aba2: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 - 800aba6: 4293 cmp r3, r2 - 800aba8: bf28 it cs - 800abaa: 4613 movcs r3, r2 - 800abac: b29b uxth r3, r3 - 800abae: 0fda lsrs r2, r3, #31 - 800abb0: 4413 add r3, r2 - 800abb2: 105b asrs r3, r3, #1 - 800abb4: b29a uxth r2, r3 - 800abb6: 687b ldr r3, [r7, #4] - 800abb8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a - - /* The minimum value for ssthresh should be 2 MSS */ - if (pcb->ssthresh < (2U * pcb->mss)) { - 800abbc: 687b ldr r3, [r7, #4] - 800abbe: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a - 800abc2: 461a mov r2, r3 - 800abc4: 687b ldr r3, [r7, #4] - 800abc6: 8e5b ldrh r3, [r3, #50] ; 0x32 - 800abc8: 005b lsls r3, r3, #1 - 800abca: 429a cmp r2, r3 - 800abcc: d206 bcs.n 800abdc - LWIP_DEBUGF(TCP_FR_DEBUG, - ("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F - " should be min 2 mss %"U16_F"...\n", - pcb->ssthresh, (u16_t)(2*pcb->mss))); - pcb->ssthresh = 2*pcb->mss; - 800abce: 687b ldr r3, [r7, #4] - 800abd0: 8e5b ldrh r3, [r3, #50] ; 0x32 - 800abd2: 005b lsls r3, r3, #1 - 800abd4: b29a uxth r2, r3 - 800abd6: 687b ldr r3, [r7, #4] - 800abd8: f8a3 204a strh.w r2, [r3, #74] ; 0x4a - } - - pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; - 800abdc: 687b ldr r3, [r7, #4] - 800abde: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a - 800abe2: 687b ldr r3, [r7, #4] - 800abe4: 8e5b ldrh r3, [r3, #50] ; 0x32 - 800abe6: 4619 mov r1, r3 - 800abe8: 0049 lsls r1, r1, #1 - 800abea: 440b add r3, r1 - 800abec: b29b uxth r3, r3 - 800abee: 4413 add r3, r2 - 800abf0: b29a uxth r2, r3 - 800abf2: 687b ldr r3, [r7, #4] - 800abf4: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 - pcb->flags |= TF_INFR; - 800abf8: 687b ldr r3, [r7, #4] - 800abfa: 7e9b ldrb r3, [r3, #26] - 800abfc: f043 0304 orr.w r3, r3, #4 - 800ac00: b2da uxtb r2, r3 - 800ac02: 687b ldr r3, [r7, #4] - 800ac04: 769a strb r2, [r3, #26] - - /* Reset the retransmission timer to prevent immediate rto retransmissions */ - pcb->rtime = 0; - 800ac06: 687b ldr r3, [r7, #4] - 800ac08: 2200 movs r2, #0 - 800ac0a: 861a strh r2, [r3, #48] ; 0x30 - } -} - 800ac0c: bf00 nop - 800ac0e: 3708 adds r7, #8 - 800ac10: 46bd mov sp, r7 - 800ac12: bd80 pop {r7, pc} - -0800ac14 : - * - * @param pcb the tcp_pcb for which to send a keepalive packet - */ -err_t -tcp_keepalive(struct tcp_pcb *pcb) -{ - 800ac14: b580 push {r7, lr} - 800ac16: b08a sub sp, #40 ; 0x28 - 800ac18: af04 add r7, sp, #16 - 800ac1a: 6078 str r0, [r7, #4] - 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, 0, 0, lwip_htonl(pcb->snd_nxt - 1)); - 800ac1c: 687b ldr r3, [r7, #4] - 800ac1e: 6cdb ldr r3, [r3, #76] ; 0x4c - 800ac20: 3b01 subs r3, #1 - 800ac22: 4618 mov r0, r3 - 800ac24: f7fa fa24 bl 8005070 - 800ac28: 4603 mov r3, r0 - 800ac2a: 2200 movs r2, #0 - 800ac2c: 2100 movs r1, #0 - 800ac2e: 6878 ldr r0, [r7, #4] - 800ac30: f7ff f988 bl 8009f44 - 800ac34: 6138 str r0, [r7, #16] - if (p == NULL) { - 800ac36: 693b ldr r3, [r7, #16] - 800ac38: 2b00 cmp r3, #0 - 800ac3a: d102 bne.n 800ac42 - LWIP_DEBUGF(TCP_DEBUG, - ("tcp_keepalive: could not allocate memory for pbuf\n")); - return ERR_MEM; - 800ac3c: f04f 33ff mov.w r3, #4294967295 - 800ac40: e021 b.n 800ac86 - } - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - 800ac42: 687b ldr r3, [r7, #4] - 800ac44: 3304 adds r3, #4 - 800ac46: 4618 mov r0, r3 - 800ac48: f003 fcca bl 800e5e0 - 800ac4c: 60f8 str r0, [r7, #12] - if (netif == NULL) { - 800ac4e: 68fb ldr r3, [r7, #12] - 800ac50: 2b00 cmp r3, #0 - 800ac52: d102 bne.n 800ac5a - err = ERR_RTE; - 800ac54: 23fc movs r3, #252 ; 0xfc - 800ac56: 75fb strb r3, [r7, #23] - 800ac58: e010 b.n 800ac7c -#endif /* CHECKSUM_GEN_TCP */ - TCP_STATS_INC(tcp.xmit); - - /* Send output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, netif); - 800ac5a: 6879 ldr r1, [r7, #4] - 800ac5c: 687b ldr r3, [r7, #4] - 800ac5e: 1d1a adds r2, r3, #4 - 800ac60: 687b ldr r3, [r7, #4] - 800ac62: 7a98 ldrb r0, [r3, #10] - 800ac64: 68fb ldr r3, [r7, #12] - 800ac66: 9302 str r3, [sp, #8] - 800ac68: 2306 movs r3, #6 - 800ac6a: 9301 str r3, [sp, #4] - 800ac6c: 2300 movs r3, #0 - 800ac6e: 9300 str r3, [sp, #0] - 800ac70: 4603 mov r3, r0 - 800ac72: 6938 ldr r0, [r7, #16] - 800ac74: f003 fe7c bl 800e970 - 800ac78: 4603 mov r3, r0 - 800ac7a: 75fb strb r3, [r7, #23] - NETIF_SET_HWADDRHINT(netif, NULL); - } - pbuf_free(p); - 800ac7c: 6938 ldr r0, [r7, #16] - 800ac7e: f7fb faff bl 8006280 - - 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; - 800ac82: f997 3017 ldrsb.w r3, [r7, #23] -} - 800ac86: 4618 mov r0, r3 - 800ac88: 3718 adds r7, #24 - 800ac8a: 46bd mov sp, r7 - 800ac8c: bd80 pop {r7, pc} - -0800ac8e : - * - * @param pcb the tcp_pcb for which to send a zero-window probe packet - */ -err_t -tcp_zero_window_probe(struct tcp_pcb *pcb) -{ - 800ac8e: b590 push {r4, r7, lr} - 800ac90: b08f sub sp, #60 ; 0x3c - 800ac92: af04 add r7, sp, #16 - 800ac94: 6078 str r0, [r7, #4] - LWIP_DEBUGF(TCP_DEBUG, - ("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)); - - seg = pcb->unacked; - 800ac96: 687b ldr r3, [r7, #4] - 800ac98: 6edb ldr r3, [r3, #108] ; 0x6c - 800ac9a: 623b str r3, [r7, #32] - - if (seg == NULL) { - 800ac9c: 6a3b ldr r3, [r7, #32] - 800ac9e: 2b00 cmp r3, #0 - 800aca0: d102 bne.n 800aca8 - seg = pcb->unsent; - 800aca2: 687b ldr r3, [r7, #4] - 800aca4: 6e9b ldr r3, [r3, #104] ; 0x68 - 800aca6: 623b str r3, [r7, #32] - } - if (seg == NULL) { - 800aca8: 6a3b ldr r3, [r7, #32] - 800acaa: 2b00 cmp r3, #0 - 800acac: d101 bne.n 800acb2 - /* nothing to send, zero window probe not needed */ - return ERR_OK; - 800acae: 2300 movs r3, #0 - 800acb0: e085 b.n 800adbe - } - - is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); - 800acb2: 6a3b ldr r3, [r7, #32] - 800acb4: 68db ldr r3, [r3, #12] - 800acb6: 899b ldrh r3, [r3, #12] - 800acb8: b29b uxth r3, r3 - 800acba: 4618 mov r0, r3 - 800acbc: f7fa f9cb bl 8005056 - 800acc0: 4603 mov r3, r0 - 800acc2: f003 0301 and.w r3, r3, #1 - 800acc6: 2b00 cmp r3, #0 - 800acc8: d005 beq.n 800acd6 - 800acca: 6a3b ldr r3, [r7, #32] - 800accc: 891b ldrh r3, [r3, #8] - 800acce: 2b00 cmp r3, #0 - 800acd0: d101 bne.n 800acd6 - 800acd2: 2301 movs r3, #1 - 800acd4: e000 b.n 800acd8 - 800acd6: 2300 movs r3, #0 - 800acd8: 77fb strb r3, [r7, #31] - /* we want to send one seqno: either FIN or data (no options) */ - len = is_fin ? 0 : 1; - 800acda: 7ffb ldrb r3, [r7, #31] - 800acdc: 2b00 cmp r3, #0 - 800acde: bf0c ite eq - 800ace0: 2301 moveq r3, #1 - 800ace2: 2300 movne r3, #0 - 800ace4: b2db uxtb r3, r3 - 800ace6: 83bb strh r3, [r7, #28] - - p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); - 800ace8: 6a3b ldr r3, [r7, #32] - 800acea: 68db ldr r3, [r3, #12] - 800acec: 685b ldr r3, [r3, #4] - 800acee: 8bba ldrh r2, [r7, #28] - 800acf0: 2100 movs r1, #0 - 800acf2: 6878 ldr r0, [r7, #4] - 800acf4: f7ff f926 bl 8009f44 - 800acf8: 61b8 str r0, [r7, #24] - if (p == NULL) { - 800acfa: 69bb ldr r3, [r7, #24] - 800acfc: 2b00 cmp r3, #0 - 800acfe: d102 bne.n 800ad06 - LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); - return ERR_MEM; - 800ad00: f04f 33ff mov.w r3, #4294967295 - 800ad04: e05b b.n 800adbe - } - tcphdr = (struct tcp_hdr *)p->payload; - 800ad06: 69bb ldr r3, [r7, #24] - 800ad08: 685b ldr r3, [r3, #4] - 800ad0a: 617b str r3, [r7, #20] - - if (is_fin) { - 800ad0c: 7ffb ldrb r3, [r7, #31] - 800ad0e: 2b00 cmp r3, #0 - 800ad10: d00e beq.n 800ad30 - /* FIN segment, no data */ - TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); - 800ad12: 697b ldr r3, [r7, #20] - 800ad14: 899b ldrh r3, [r3, #12] - 800ad16: b29b uxth r3, r3 - 800ad18: f423 537c bic.w r3, r3, #16128 ; 0x3f00 - 800ad1c: b29c uxth r4, r3 - 800ad1e: 2011 movs r0, #17 - 800ad20: f7fa f999 bl 8005056 - 800ad24: 4603 mov r3, r0 - 800ad26: 4323 orrs r3, r4 - 800ad28: b29a uxth r2, r3 - 800ad2a: 697b ldr r3, [r7, #20] - 800ad2c: 819a strh r2, [r3, #12] - 800ad2e: e010 b.n 800ad52 - } else { - /* Data segment, copy in one byte from the head of the unacked queue */ - char *d = ((char *)p->payload + TCP_HLEN); - 800ad30: 69bb ldr r3, [r7, #24] - 800ad32: 685b ldr r3, [r3, #4] - 800ad34: 3314 adds r3, #20 - 800ad36: 613b str r3, [r7, #16] - /* Depending on whether the segment has already been sent (unacked) or not - (unsent), seg->p->payload points to the IP header or TCP header. - Ensure we copy the first TCP data byte: */ - pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len); - 800ad38: 6a3b ldr r3, [r7, #32] - 800ad3a: 6858 ldr r0, [r3, #4] - 800ad3c: 6a3b ldr r3, [r7, #32] - 800ad3e: 685b ldr r3, [r3, #4] - 800ad40: 891a ldrh r2, [r3, #8] - 800ad42: 6a3b ldr r3, [r7, #32] - 800ad44: 891b ldrh r3, [r3, #8] - 800ad46: 1ad3 subs r3, r2, r3 - 800ad48: b29b uxth r3, r3 - 800ad4a: 2201 movs r2, #1 - 800ad4c: 6939 ldr r1, [r7, #16] - 800ad4e: f7fb fc95 bl 800667c - } - - /* The byte may be acknowledged without the window being opened. */ - snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1; - 800ad52: 6a3b ldr r3, [r7, #32] - 800ad54: 68db ldr r3, [r3, #12] - 800ad56: 685b ldr r3, [r3, #4] - 800ad58: 4618 mov r0, r3 - 800ad5a: f7fa f989 bl 8005070 - 800ad5e: 4603 mov r3, r0 - 800ad60: 3301 adds r3, #1 - 800ad62: 60fb str r3, [r7, #12] - if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { - 800ad64: 687b ldr r3, [r7, #4] - 800ad66: 6cda ldr r2, [r3, #76] ; 0x4c - 800ad68: 68fb ldr r3, [r7, #12] - 800ad6a: 1ad3 subs r3, r2, r3 - 800ad6c: 2b00 cmp r3, #0 - 800ad6e: da02 bge.n 800ad76 - pcb->snd_nxt = snd_nxt; - 800ad70: 687b ldr r3, [r7, #4] - 800ad72: 68fa ldr r2, [r7, #12] - 800ad74: 64da str r2, [r3, #76] ; 0x4c - } - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - 800ad76: 687b ldr r3, [r7, #4] - 800ad78: 3304 adds r3, #4 - 800ad7a: 4618 mov r0, r3 - 800ad7c: f003 fc30 bl 800e5e0 - 800ad80: 60b8 str r0, [r7, #8] - if (netif == NULL) { - 800ad82: 68bb ldr r3, [r7, #8] - 800ad84: 2b00 cmp r3, #0 - 800ad86: d103 bne.n 800ad90 - err = ERR_RTE; - 800ad88: 23fc movs r3, #252 ; 0xfc - 800ad8a: f887 3027 strb.w r3, [r7, #39] ; 0x27 - 800ad8e: e011 b.n 800adb4 -#endif - TCP_STATS_INC(tcp.xmit); - - /* Send output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, - 800ad90: 6879 ldr r1, [r7, #4] - 800ad92: 687b ldr r3, [r7, #4] - 800ad94: 1d1a adds r2, r3, #4 - 800ad96: 687b ldr r3, [r7, #4] - 800ad98: 7a98 ldrb r0, [r3, #10] - 800ad9a: 68bb ldr r3, [r7, #8] - 800ad9c: 9302 str r3, [sp, #8] - 800ad9e: 2306 movs r3, #6 - 800ada0: 9301 str r3, [sp, #4] - 800ada2: 2300 movs r3, #0 - 800ada4: 9300 str r3, [sp, #0] - 800ada6: 4603 mov r3, r0 - 800ada8: 69b8 ldr r0, [r7, #24] - 800adaa: f003 fde1 bl 800e970 - 800adae: 4603 mov r3, r0 - 800adb0: f887 3027 strb.w r3, [r7, #39] ; 0x27 - 0, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - - pbuf_free(p); - 800adb4: 69b8 ldr r0, [r7, #24] - 800adb6: f7fb fa63 bl 8006280 - - 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; - 800adba: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 -} - 800adbe: 4618 mov r0, r3 - 800adc0: 372c adds r7, #44 ; 0x2c - 800adc2: 46bd mov sp, r7 - 800adc4: bd90 pop {r4, r7, pc} - ... - -0800adc8 : - * - * @param arg unused argument - */ -static void -tcpip_tcp_timer(void *arg) -{ - 800adc8: b580 push {r7, lr} - 800adca: b082 sub sp, #8 - 800adcc: af00 add r7, sp, #0 - 800adce: 6078 str r0, [r7, #4] - LWIP_UNUSED_ARG(arg); - - /* call TCP timer handler */ - tcp_tmr(); - 800add0: f7fb fcd4 bl 800677c - /* timer still needed? */ - if (tcp_active_pcbs || tcp_tw_pcbs) { - 800add4: 4b0a ldr r3, [pc, #40] ; (800ae00 ) - 800add6: 681b ldr r3, [r3, #0] - 800add8: 2b00 cmp r3, #0 - 800adda: d103 bne.n 800ade4 - 800addc: 4b09 ldr r3, [pc, #36] ; (800ae04 ) - 800adde: 681b ldr r3, [r3, #0] - 800ade0: 2b00 cmp r3, #0 - 800ade2: d005 beq.n 800adf0 - /* restart timer */ - sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); - 800ade4: 2200 movs r2, #0 - 800ade6: 4908 ldr r1, [pc, #32] ; (800ae08 ) - 800ade8: 20fa movs r0, #250 ; 0xfa - 800adea: f000 f86f bl 800aecc - 800adee: e003 b.n 800adf8 - } else { - /* disable timer */ - tcpip_tcp_timer_active = 0; - 800adf0: 4b06 ldr r3, [pc, #24] ; (800ae0c ) - 800adf2: 2200 movs r2, #0 - 800adf4: 601a str r2, [r3, #0] - } -} - 800adf6: bf00 nop - 800adf8: bf00 nop - 800adfa: 3708 adds r7, #8 - 800adfc: 46bd mov sp, r7 - 800adfe: bd80 pop {r7, pc} - 800ae00: 20006d70 .word 0x20006d70 - 800ae04: 20006d74 .word 0x20006d74 - 800ae08: 0800adc9 .word 0x0800adc9 - 800ae0c: 20006dbc .word 0x20006dbc - -0800ae10 : - * the reason is to have the TCP timer only running when - * there are active (or time-wait) PCBs. - */ -void -tcp_timer_needed(void) -{ - 800ae10: b580 push {r7, lr} - 800ae12: af00 add r7, sp, #0 - /* timer is off but needed again? */ - if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { - 800ae14: 4b0a ldr r3, [pc, #40] ; (800ae40 ) - 800ae16: 681b ldr r3, [r3, #0] - 800ae18: 2b00 cmp r3, #0 - 800ae1a: d10f bne.n 800ae3c - 800ae1c: 4b09 ldr r3, [pc, #36] ; (800ae44 ) - 800ae1e: 681b ldr r3, [r3, #0] - 800ae20: 2b00 cmp r3, #0 - 800ae22: d103 bne.n 800ae2c - 800ae24: 4b08 ldr r3, [pc, #32] ; (800ae48 ) - 800ae26: 681b ldr r3, [r3, #0] - 800ae28: 2b00 cmp r3, #0 - 800ae2a: d007 beq.n 800ae3c - /* enable and start timer */ - tcpip_tcp_timer_active = 1; - 800ae2c: 4b04 ldr r3, [pc, #16] ; (800ae40 ) - 800ae2e: 2201 movs r2, #1 - 800ae30: 601a str r2, [r3, #0] - sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); - 800ae32: 2200 movs r2, #0 - 800ae34: 4905 ldr r1, [pc, #20] ; (800ae4c ) - 800ae36: 20fa movs r0, #250 ; 0xfa - 800ae38: f000 f848 bl 800aecc - } -} - 800ae3c: bf00 nop - 800ae3e: bd80 pop {r7, pc} - 800ae40: 20006dbc .word 0x20006dbc - 800ae44: 20006d70 .word 0x20006d70 - 800ae48: 20006d74 .word 0x20006d74 - 800ae4c: 0800adc9 .word 0x0800adc9 - -0800ae50 : - * - * @param arg unused argument - */ -static void -cyclic_timer(void *arg) -{ - 800ae50: b580 push {r7, lr} - 800ae52: b084 sub sp, #16 - 800ae54: af00 add r7, sp, #0 - 800ae56: 6078 str r0, [r7, #4] - const struct lwip_cyclic_timer* cyclic = (const struct lwip_cyclic_timer*)arg; - 800ae58: 687b ldr r3, [r7, #4] - 800ae5a: 60fb str r3, [r7, #12] -#if LWIP_DEBUG_TIMERNAMES - LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); -#endif - cyclic->handler(); - 800ae5c: 68fb ldr r3, [r7, #12] - 800ae5e: 685b ldr r3, [r3, #4] - 800ae60: 4798 blx r3 - sys_timeout(cyclic->interval_ms, cyclic_timer, arg); - 800ae62: 68fb ldr r3, [r7, #12] - 800ae64: 681b ldr r3, [r3, #0] - 800ae66: 687a ldr r2, [r7, #4] - 800ae68: 4903 ldr r1, [pc, #12] ; (800ae78 ) - 800ae6a: 4618 mov r0, r3 - 800ae6c: f000 f82e bl 800aecc -} - 800ae70: bf00 nop - 800ae72: 3710 adds r7, #16 - 800ae74: 46bd mov sp, r7 - 800ae76: bd80 pop {r7, pc} - 800ae78: 0800ae51 .word 0x0800ae51 - -0800ae7c : - -/** Initialize this module */ -void sys_timeouts_init(void) -{ - 800ae7c: b580 push {r7, lr} - 800ae7e: b082 sub sp, #8 - 800ae80: af00 add r7, sp, #0 - size_t i; - /* tcp_tmr() at index 0 is started on demand */ - for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { - 800ae82: 2301 movs r3, #1 - 800ae84: 607b str r3, [r7, #4] - 800ae86: e00e b.n 800aea6 - /* we have to cast via size_t to get rid of const warning - (this is OK as cyclic_timer() casts back to const* */ - sys_timeout(lwip_cyclic_timers[i].interval_ms, cyclic_timer, LWIP_CONST_CAST(void*, &lwip_cyclic_timers[i])); - 800ae88: 4a0d ldr r2, [pc, #52] ; (800aec0 ) - 800ae8a: 687b ldr r3, [r7, #4] - 800ae8c: f852 0033 ldr.w r0, [r2, r3, lsl #3] - 800ae90: 687b ldr r3, [r7, #4] - 800ae92: 00db lsls r3, r3, #3 - 800ae94: 4a0a ldr r2, [pc, #40] ; (800aec0 ) - 800ae96: 4413 add r3, r2 - 800ae98: 461a mov r2, r3 - 800ae9a: 490a ldr r1, [pc, #40] ; (800aec4 ) - 800ae9c: f000 f816 bl 800aecc - for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { - 800aea0: 687b ldr r3, [r7, #4] - 800aea2: 3301 adds r3, #1 - 800aea4: 607b str r3, [r7, #4] - 800aea6: 687b ldr r3, [r7, #4] - 800aea8: 2b04 cmp r3, #4 - 800aeaa: d9ed bls.n 800ae88 - } - - /* Initialise timestamp for sys_check_timeouts */ - timeouts_last_time = sys_now(); - 800aeac: f7fa f846 bl 8004f3c - 800aeb0: 4603 mov r3, r0 - 800aeb2: 4a05 ldr r2, [pc, #20] ; (800aec8 ) - 800aeb4: 6013 str r3, [r2, #0] -} - 800aeb6: bf00 nop - 800aeb8: 3708 adds r7, #8 - 800aeba: 46bd mov sp, r7 - 800aebc: bd80 pop {r7, pc} - 800aebe: bf00 nop - 800aec0: 08012b90 .word 0x08012b90 - 800aec4: 0800ae51 .word 0x0800ae51 - 800aec8: 20006db8 .word 0x20006db8 - -0800aecc : -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 */ -{ - 800aecc: b580 push {r7, lr} - 800aece: b088 sub sp, #32 - 800aed0: af00 add r7, sp, #0 - 800aed2: 60f8 str r0, [r7, #12] - 800aed4: 60b9 str r1, [r7, #8] - 800aed6: 607a str r2, [r7, #4] - struct sys_timeo *timeout, *t; - u32_t now, diff; - - timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); - 800aed8: 2006 movs r0, #6 - 800aeda: f7fa fc65 bl 80057a8 - 800aede: 6178 str r0, [r7, #20] - if (timeout == NULL) { - 800aee0: 697b ldr r3, [r7, #20] - 800aee2: 2b00 cmp r3, #0 - 800aee4: d10a bne.n 800aefc - LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); - 800aee6: 697b ldr r3, [r7, #20] - 800aee8: 2b00 cmp r3, #0 - 800aeea: f040 8084 bne.w 800aff6 - 800aeee: 4b44 ldr r3, [pc, #272] ; (800b000 ) - 800aef0: 22d4 movs r2, #212 ; 0xd4 - 800aef2: 4944 ldr r1, [pc, #272] ; (800b004 ) - 800aef4: 4844 ldr r0, [pc, #272] ; (800b008 ) - 800aef6: f004 fde5 bl 800fac4 - return; - 800aefa: e07c b.n 800aff6 - } - - now = sys_now(); - 800aefc: f7fa f81e bl 8004f3c - 800af00: 6138 str r0, [r7, #16] - if (next_timeout == NULL) { - 800af02: 4b42 ldr r3, [pc, #264] ; (800b00c ) - 800af04: 681b ldr r3, [r3, #0] - 800af06: 2b00 cmp r3, #0 - 800af08: d105 bne.n 800af16 - diff = 0; - 800af0a: 2300 movs r3, #0 - 800af0c: 61bb str r3, [r7, #24] - timeouts_last_time = now; - 800af0e: 4a40 ldr r2, [pc, #256] ; (800b010 ) - 800af10: 693b ldr r3, [r7, #16] - 800af12: 6013 str r3, [r2, #0] - 800af14: e004 b.n 800af20 - } else { - diff = now - timeouts_last_time; - 800af16: 4b3e ldr r3, [pc, #248] ; (800b010 ) - 800af18: 681b ldr r3, [r3, #0] - 800af1a: 693a ldr r2, [r7, #16] - 800af1c: 1ad3 subs r3, r2, r3 - 800af1e: 61bb str r3, [r7, #24] - } - - timeout->next = NULL; - 800af20: 697b ldr r3, [r7, #20] - 800af22: 2200 movs r2, #0 - 800af24: 601a str r2, [r3, #0] - timeout->h = handler; - 800af26: 697b ldr r3, [r7, #20] - 800af28: 68ba ldr r2, [r7, #8] - 800af2a: 609a str r2, [r3, #8] - timeout->arg = arg; - 800af2c: 697b ldr r3, [r7, #20] - 800af2e: 687a ldr r2, [r7, #4] - 800af30: 60da str r2, [r3, #12] - timeout->time = msecs + diff; - 800af32: 68fa ldr r2, [r7, #12] - 800af34: 69bb ldr r3, [r7, #24] - 800af36: 441a add r2, r3 - 800af38: 697b ldr r3, [r7, #20] - 800af3a: 605a str r2, [r3, #4] - timeout->handler_name = handler_name; - LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", - (void *)timeout, msecs, handler_name, (void *)arg)); -#endif /* LWIP_DEBUG_TIMERNAMES */ - - if (next_timeout == NULL) { - 800af3c: 4b33 ldr r3, [pc, #204] ; (800b00c ) - 800af3e: 681b ldr r3, [r3, #0] - 800af40: 2b00 cmp r3, #0 - 800af42: d103 bne.n 800af4c - next_timeout = timeout; - 800af44: 4a31 ldr r2, [pc, #196] ; (800b00c ) - 800af46: 697b ldr r3, [r7, #20] - 800af48: 6013 str r3, [r2, #0] - return; - 800af4a: e055 b.n 800aff8 - } - - if (next_timeout->time > msecs) { - 800af4c: 4b2f ldr r3, [pc, #188] ; (800b00c ) - 800af4e: 681b ldr r3, [r3, #0] - 800af50: 685b ldr r3, [r3, #4] - 800af52: 68fa ldr r2, [r7, #12] - 800af54: 429a cmp r2, r3 - 800af56: d20f bcs.n 800af78 - next_timeout->time -= msecs; - 800af58: 4b2c ldr r3, [pc, #176] ; (800b00c ) - 800af5a: 681b ldr r3, [r3, #0] - 800af5c: 6859 ldr r1, [r3, #4] - 800af5e: 4b2b ldr r3, [pc, #172] ; (800b00c ) - 800af60: 681b ldr r3, [r3, #0] - 800af62: 68fa ldr r2, [r7, #12] - 800af64: 1a8a subs r2, r1, r2 - 800af66: 605a str r2, [r3, #4] - timeout->next = next_timeout; - 800af68: 4b28 ldr r3, [pc, #160] ; (800b00c ) - 800af6a: 681a ldr r2, [r3, #0] - 800af6c: 697b ldr r3, [r7, #20] - 800af6e: 601a str r2, [r3, #0] - next_timeout = timeout; - 800af70: 4a26 ldr r2, [pc, #152] ; (800b00c ) - 800af72: 697b ldr r3, [r7, #20] - 800af74: 6013 str r3, [r2, #0] - 800af76: e03f b.n 800aff8 - } else { - for (t = next_timeout; t != NULL; t = t->next) { - 800af78: 4b24 ldr r3, [pc, #144] ; (800b00c ) - 800af7a: 681b ldr r3, [r3, #0] - 800af7c: 61fb str r3, [r7, #28] - 800af7e: e036 b.n 800afee - timeout->time -= t->time; - 800af80: 697b ldr r3, [r7, #20] - 800af82: 685a ldr r2, [r3, #4] - 800af84: 69fb ldr r3, [r7, #28] - 800af86: 685b ldr r3, [r3, #4] - 800af88: 1ad2 subs r2, r2, r3 - 800af8a: 697b ldr r3, [r7, #20] - 800af8c: 605a str r2, [r3, #4] - if (t->next == NULL || t->next->time > timeout->time) { - 800af8e: 69fb ldr r3, [r7, #28] - 800af90: 681b ldr r3, [r3, #0] - 800af92: 2b00 cmp r3, #0 - 800af94: d006 beq.n 800afa4 - 800af96: 69fb ldr r3, [r7, #28] - 800af98: 681b ldr r3, [r3, #0] - 800af9a: 685a ldr r2, [r3, #4] - 800af9c: 697b ldr r3, [r7, #20] - 800af9e: 685b ldr r3, [r3, #4] - 800afa0: 429a cmp r2, r3 - 800afa2: d921 bls.n 800afe8 - if (t->next != NULL) { - 800afa4: 69fb ldr r3, [r7, #28] - 800afa6: 681b ldr r3, [r3, #0] - 800afa8: 2b00 cmp r3, #0 - 800afaa: d009 beq.n 800afc0 - t->next->time -= timeout->time; - 800afac: 69fb ldr r3, [r7, #28] - 800afae: 681b ldr r3, [r3, #0] - 800afb0: 6859 ldr r1, [r3, #4] - 800afb2: 697b ldr r3, [r7, #20] - 800afb4: 685a ldr r2, [r3, #4] - 800afb6: 69fb ldr r3, [r7, #28] - 800afb8: 681b ldr r3, [r3, #0] - 800afba: 1a8a subs r2, r1, r2 - 800afbc: 605a str r2, [r3, #4] - 800afbe: e00b b.n 800afd8 - } else if (timeout->time > msecs) { - 800afc0: 697b ldr r3, [r7, #20] - 800afc2: 685b ldr r3, [r3, #4] - 800afc4: 68fa ldr r2, [r7, #12] - 800afc6: 429a cmp r2, r3 - 800afc8: d206 bcs.n 800afd8 - /* If this is the case, 'timeouts_last_time' and 'now' differs too much. - This can be due to sys_check_timeouts() not being called at the right - times, but also when stopping in a breakpoint. Anyway, let's assume - this is not wanted, so add the first timer's time instead of 'diff' */ - timeout->time = msecs + next_timeout->time; - 800afca: 4b10 ldr r3, [pc, #64] ; (800b00c ) - 800afcc: 681b ldr r3, [r3, #0] - 800afce: 685a ldr r2, [r3, #4] - 800afd0: 68fb ldr r3, [r7, #12] - 800afd2: 441a add r2, r3 - 800afd4: 697b ldr r3, [r7, #20] - 800afd6: 605a str r2, [r3, #4] - } - timeout->next = t->next; - 800afd8: 69fb ldr r3, [r7, #28] - 800afda: 681a ldr r2, [r3, #0] - 800afdc: 697b ldr r3, [r7, #20] - 800afde: 601a str r2, [r3, #0] - t->next = timeout; - 800afe0: 69fb ldr r3, [r7, #28] - 800afe2: 697a ldr r2, [r7, #20] - 800afe4: 601a str r2, [r3, #0] - break; - 800afe6: e007 b.n 800aff8 - for (t = next_timeout; t != NULL; t = t->next) { - 800afe8: 69fb ldr r3, [r7, #28] - 800afea: 681b ldr r3, [r3, #0] - 800afec: 61fb str r3, [r7, #28] - 800afee: 69fb ldr r3, [r7, #28] - 800aff0: 2b00 cmp r3, #0 - 800aff2: d1c5 bne.n 800af80 - 800aff4: e000 b.n 800aff8 - return; - 800aff6: bf00 nop - } - } - } -} - 800aff8: 3720 adds r7, #32 - 800affa: 46bd mov sp, r7 - 800affc: bd80 pop {r7, pc} - 800affe: bf00 nop - 800b000: 08011e0c .word 0x08011e0c - 800b004: 08011e40 .word 0x08011e40 - 800b008: 08011e80 .word 0x08011e80 - 800b00c: 20006db4 .word 0x20006db4 - 800b010: 20006db8 .word 0x20006db8 - -0800b014 : -/** - * Initialize this module. - */ -void -udp_init(void) -{ - 800b014: b480 push {r7} - 800b016: af00 add r7, sp, #0 -#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) - udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); -#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ -} - 800b018: bf00 nop - 800b01a: 46bd mov sp, r7 - 800b01c: bc80 pop {r7} - 800b01e: 4770 bx lr - -0800b020 : - * - * @return a new (free) local UDP port number - */ -static u16_t -udp_new_port(void) -{ - 800b020: b480 push {r7} - 800b022: b083 sub sp, #12 - 800b024: af00 add r7, sp, #0 - u16_t n = 0; - 800b026: 2300 movs r3, #0 - 800b028: 80fb strh r3, [r7, #6] - struct udp_pcb *pcb; - -again: - if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { - 800b02a: 4b17 ldr r3, [pc, #92] ; (800b088 ) - 800b02c: 881b ldrh r3, [r3, #0] - 800b02e: 1c5a adds r2, r3, #1 - 800b030: b291 uxth r1, r2 - 800b032: 4a15 ldr r2, [pc, #84] ; (800b088 ) - 800b034: 8011 strh r1, [r2, #0] - 800b036: f64f 72ff movw r2, #65535 ; 0xffff - 800b03a: 4293 cmp r3, r2 - 800b03c: d103 bne.n 800b046 - udp_port = UDP_LOCAL_PORT_RANGE_START; - 800b03e: 4b12 ldr r3, [pc, #72] ; (800b088 ) - 800b040: f44f 4240 mov.w r2, #49152 ; 0xc000 - 800b044: 801a strh r2, [r3, #0] - } - /* Check all PCBs. */ - for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { - 800b046: 4b11 ldr r3, [pc, #68] ; (800b08c ) - 800b048: 681b ldr r3, [r3, #0] - 800b04a: 603b str r3, [r7, #0] - 800b04c: e011 b.n 800b072 - if (pcb->local_port == udp_port) { - 800b04e: 683b ldr r3, [r7, #0] - 800b050: 8a5a ldrh r2, [r3, #18] - 800b052: 4b0d ldr r3, [pc, #52] ; (800b088 ) - 800b054: 881b ldrh r3, [r3, #0] - 800b056: 429a cmp r2, r3 - 800b058: d108 bne.n 800b06c - if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { - 800b05a: 88fb ldrh r3, [r7, #6] - 800b05c: 3301 adds r3, #1 - 800b05e: 80fb strh r3, [r7, #6] - 800b060: 88fb ldrh r3, [r7, #6] - 800b062: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 - 800b066: d3e0 bcc.n 800b02a - return 0; - 800b068: 2300 movs r3, #0 - 800b06a: e007 b.n 800b07c - for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { - 800b06c: 683b ldr r3, [r7, #0] - 800b06e: 68db ldr r3, [r3, #12] - 800b070: 603b str r3, [r7, #0] - 800b072: 683b ldr r3, [r7, #0] - 800b074: 2b00 cmp r3, #0 - 800b076: d1ea bne.n 800b04e - } - goto again; - } - } - return udp_port; - 800b078: 4b03 ldr r3, [pc, #12] ; (800b088 ) - 800b07a: 881b ldrh r3, [r3, #0] -} - 800b07c: 4618 mov r0, r3 - 800b07e: 370c adds r7, #12 - 800b080: 46bd mov sp, r7 - 800b082: bc80 pop {r7} - 800b084: 4770 bx lr - 800b086: bf00 nop - 800b088: 20000010 .word 0x20000010 - 800b08c: 20006dc0 .word 0x20006dc0 - -0800b090 : - * @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) -{ - 800b090: b480 push {r7} - 800b092: b085 sub sp, #20 - 800b094: af00 add r7, sp, #0 - 800b096: 60f8 str r0, [r7, #12] - 800b098: 60b9 str r1, [r7, #8] - 800b09a: 4613 mov r3, r2 - 800b09c: 71fb strb r3, [r7, #7] - /* 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) { - 800b09e: 79fb ldrb r3, [r7, #7] - 800b0a0: 2b00 cmp r3, #0 - 800b0a2: d018 beq.n 800b0d6 -#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)) || - 800b0a4: 68fb ldr r3, [r7, #12] - 800b0a6: 2b00 cmp r3, #0 - 800b0a8: d013 beq.n 800b0d2 - 800b0aa: 68fb ldr r3, [r7, #12] - 800b0ac: 681b ldr r3, [r3, #0] - 800b0ae: 2b00 cmp r3, #0 - 800b0b0: d00f beq.n 800b0d2 - ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || - 800b0b2: 4b13 ldr r3, [pc, #76] ; (800b100 ) - 800b0b4: 695b ldr r3, [r3, #20] - if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || - 800b0b6: f1b3 3fff cmp.w r3, #4294967295 - 800b0ba: d00a beq.n 800b0d2 - ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { - 800b0bc: 68fb ldr r3, [r7, #12] - 800b0be: 681a ldr r2, [r3, #0] - 800b0c0: 4b0f ldr r3, [pc, #60] ; (800b100 ) - 800b0c2: 695b ldr r3, [r3, #20] - 800b0c4: 405a eors r2, r3 - 800b0c6: 68bb ldr r3, [r7, #8] - 800b0c8: 3308 adds r3, #8 - 800b0ca: 681b ldr r3, [r3, #0] - 800b0cc: 4013 ands r3, r2 - ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || - 800b0ce: 2b00 cmp r3, #0 - 800b0d0: d110 bne.n 800b0f4 - return 1; - 800b0d2: 2301 movs r3, #1 - 800b0d4: e00f b.n 800b0f6 - } - } - } else -#endif /* LWIP_IPV4 */ - /* Handle IPv4 and IPv6: all or exact match */ - if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - 800b0d6: 68fb ldr r3, [r7, #12] - 800b0d8: 2b00 cmp r3, #0 - 800b0da: d009 beq.n 800b0f0 - 800b0dc: 68fb ldr r3, [r7, #12] - 800b0de: 681b ldr r3, [r3, #0] - 800b0e0: 2b00 cmp r3, #0 - 800b0e2: d005 beq.n 800b0f0 - 800b0e4: 68fb ldr r3, [r7, #12] - 800b0e6: 681a ldr r2, [r3, #0] - 800b0e8: 4b05 ldr r3, [pc, #20] ; (800b100 ) - 800b0ea: 695b ldr r3, [r3, #20] - 800b0ec: 429a cmp r2, r3 - 800b0ee: d101 bne.n 800b0f4 - return 1; - 800b0f0: 2301 movs r3, #1 - 800b0f2: e000 b.n 800b0f6 - } - } - - return 0; - 800b0f4: 2300 movs r3, #0 -} - 800b0f6: 4618 mov r0, r3 - 800b0f8: 3714 adds r7, #20 - 800b0fa: 46bd mov sp, r7 - 800b0fc: bc80 pop {r7} - 800b0fe: 4770 bx lr - 800b100: 200037e8 .word 0x200037e8 - -0800b104 : - * @param inp network interface on which the datagram was received. - * - */ -void -udp_input(struct pbuf *p, struct netif *inp) -{ - 800b104: b590 push {r4, r7, lr} - 800b106: b08d sub sp, #52 ; 0x34 - 800b108: af02 add r7, sp, #8 - 800b10a: 6078 str r0, [r7, #4] - 800b10c: 6039 str r1, [r7, #0] - struct udp_hdr *udphdr; - struct udp_pcb *pcb, *prev; - struct udp_pcb *uncon_pcb; - u16_t src, dest; - u8_t broadcast; - u8_t for_us = 0; - 800b10e: 2300 movs r3, #0 - 800b110: 76fb strb r3, [r7, #27] - PERF_START; - - UDP_STATS_INC(udp.recv); - - /* Check minimum length (UDP header) */ - if (p->len < UDP_HLEN) { - 800b112: 687b ldr r3, [r7, #4] - 800b114: 895b ldrh r3, [r3, #10] - 800b116: 2b07 cmp r3, #7 - 800b118: d803 bhi.n 800b122 - LWIP_DEBUGF(UDP_DEBUG, - ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len)); - UDP_STATS_INC(udp.lenerr); - UDP_STATS_INC(udp.drop); - MIB2_STATS_INC(mib2.udpinerrors); - pbuf_free(p); - 800b11a: 6878 ldr r0, [r7, #4] - 800b11c: f7fb f8b0 bl 8006280 - goto end; - 800b120: e0c6 b.n 800b2b0 - } - - udphdr = (struct udp_hdr *)p->payload; - 800b122: 687b ldr r3, [r7, #4] - 800b124: 685b ldr r3, [r3, #4] - 800b126: 617b str r3, [r7, #20] - - /* is broadcast packet ? */ - broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); - 800b128: 4b63 ldr r3, [pc, #396] ; (800b2b8 ) - 800b12a: 695b ldr r3, [r3, #20] - 800b12c: 4a62 ldr r2, [pc, #392] ; (800b2b8 ) - 800b12e: 6812 ldr r2, [r2, #0] - 800b130: 4611 mov r1, r2 - 800b132: 4618 mov r0, r3 - 800b134: f003 fcee bl 800eb14 - 800b138: 4603 mov r3, r0 - 800b13a: 74fb strb r3, [r7, #19] - - 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); - 800b13c: 697b ldr r3, [r7, #20] - 800b13e: 881b ldrh r3, [r3, #0] - 800b140: b29b uxth r3, r3 - 800b142: 4618 mov r0, r3 - 800b144: f7f9 ff87 bl 8005056 - 800b148: 4603 mov r3, r0 - 800b14a: 823b strh r3, [r7, #16] - dest = lwip_ntohs(udphdr->dest); - 800b14c: 697b ldr r3, [r7, #20] - 800b14e: 885b ldrh r3, [r3, #2] - 800b150: b29b uxth r3, r3 - 800b152: 4618 mov r0, r3 - 800b154: f7f9 ff7f bl 8005056 - 800b158: 4603 mov r3, r0 - 800b15a: 81fb strh r3, [r7, #14] - ip_addr_debug_print(UDP_DEBUG, ip_current_dest_addr()); - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", lwip_ntohs(udphdr->dest))); - ip_addr_debug_print(UDP_DEBUG, ip_current_src_addr()); - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", lwip_ntohs(udphdr->src))); - - pcb = NULL; - 800b15c: 2300 movs r3, #0 - 800b15e: 627b str r3, [r7, #36] ; 0x24 - prev = NULL; - 800b160: 2300 movs r3, #0 - 800b162: 623b str r3, [r7, #32] - uncon_pcb = NULL; - 800b164: 2300 movs r3, #0 - 800b166: 61fb str r3, [r7, #28] - /* 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) { - 800b168: 4b54 ldr r3, [pc, #336] ; (800b2bc ) - 800b16a: 681b ldr r3, [r3, #0] - 800b16c: 627b str r3, [r7, #36] ; 0x24 - 800b16e: e03b b.n 800b1e8 - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", pcb->local_port)); - ip_addr_debug_print(UDP_DEBUG, &pcb->remote_ip); - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port)); - - /* compare PCB local addr+port to UDP destination addr+port */ - if ((pcb->local_port == dest) && - 800b170: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b172: 8a5b ldrh r3, [r3, #18] - 800b174: 89fa ldrh r2, [r7, #14] - 800b176: 429a cmp r2, r3 - 800b178: d131 bne.n 800b1de - (udp_input_local_match(pcb, inp, broadcast) != 0)) { - 800b17a: 7cfb ldrb r3, [r7, #19] - 800b17c: 461a mov r2, r3 - 800b17e: 6839 ldr r1, [r7, #0] - 800b180: 6a78 ldr r0, [r7, #36] ; 0x24 - 800b182: f7ff ff85 bl 800b090 - 800b186: 4603 mov r3, r0 - if ((pcb->local_port == dest) && - 800b188: 2b00 cmp r3, #0 - 800b18a: d028 beq.n 800b1de - if (((pcb->flags & UDP_FLAGS_CONNECTED) == 0) && - 800b18c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b18e: 7c1b ldrb r3, [r3, #16] - 800b190: f003 0304 and.w r3, r3, #4 - 800b194: 2b00 cmp r3, #0 - 800b196: d104 bne.n 800b1a2 - 800b198: 69fb ldr r3, [r7, #28] - 800b19a: 2b00 cmp r3, #0 - 800b19c: d101 bne.n 800b1a2 - /* prefer specific IPs over cath-all */ - || !ip_addr_isany(&pcb->local_ip) -#endif /* SO_REUSE */ - )) { - /* the first unconnected matching PCB */ - uncon_pcb = pcb; - 800b19e: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1a0: 61fb str r3, [r7, #28] - } - - /* compare PCB remote addr+port to UDP source addr+port */ - if ((pcb->remote_port == src) && - 800b1a2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1a4: 8a9b ldrh r3, [r3, #20] - 800b1a6: 8a3a ldrh r2, [r7, #16] - 800b1a8: 429a cmp r2, r3 - 800b1aa: d118 bne.n 800b1de - (ip_addr_isany_val(pcb->remote_ip) || - 800b1ac: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1ae: 685b ldr r3, [r3, #4] - if ((pcb->remote_port == src) && - 800b1b0: 2b00 cmp r3, #0 - 800b1b2: d005 beq.n 800b1c0 - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { - 800b1b4: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1b6: 685a ldr r2, [r3, #4] - 800b1b8: 4b3f ldr r3, [pc, #252] ; (800b2b8 ) - 800b1ba: 691b ldr r3, [r3, #16] - (ip_addr_isany_val(pcb->remote_ip) || - 800b1bc: 429a cmp r2, r3 - 800b1be: d10e bne.n 800b1de - /* the first fully matching PCB */ - if (prev != NULL) { - 800b1c0: 6a3b ldr r3, [r7, #32] - 800b1c2: 2b00 cmp r3, #0 - 800b1c4: d014 beq.n 800b1f0 - /* move the pcb to the front of udp_pcbs so that is - found faster next time */ - prev->next = pcb->next; - 800b1c6: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1c8: 68da ldr r2, [r3, #12] - 800b1ca: 6a3b ldr r3, [r7, #32] - 800b1cc: 60da str r2, [r3, #12] - pcb->next = udp_pcbs; - 800b1ce: 4b3b ldr r3, [pc, #236] ; (800b2bc ) - 800b1d0: 681a ldr r2, [r3, #0] - 800b1d2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1d4: 60da str r2, [r3, #12] - udp_pcbs = pcb; - 800b1d6: 4a39 ldr r2, [pc, #228] ; (800b2bc ) - 800b1d8: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1da: 6013 str r3, [r2, #0] - } else { - UDP_STATS_INC(udp.cachehit); - } - break; - 800b1dc: e008 b.n 800b1f0 - } - } - - prev = pcb; - 800b1de: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1e0: 623b str r3, [r7, #32] - for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { - 800b1e2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1e4: 68db ldr r3, [r3, #12] - 800b1e6: 627b str r3, [r7, #36] ; 0x24 - 800b1e8: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1ea: 2b00 cmp r3, #0 - 800b1ec: d1c0 bne.n 800b170 - 800b1ee: e000 b.n 800b1f2 - break; - 800b1f0: bf00 nop - } - /* no fully matching pcb found? then look for an unconnected pcb */ - if (pcb == NULL) { - 800b1f2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1f4: 2b00 cmp r3, #0 - 800b1f6: d101 bne.n 800b1fc - pcb = uncon_pcb; - 800b1f8: 69fb ldr r3, [r7, #28] - 800b1fa: 627b str r3, [r7, #36] ; 0x24 - } - - /* Check checksum if this is a match or if it was directed at us. */ - if (pcb != NULL) { - 800b1fc: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b1fe: 2b00 cmp r3, #0 - 800b200: d002 beq.n 800b208 - for_us = 1; - 800b202: 2301 movs r3, #1 - 800b204: 76fb strb r3, [r7, #27] - 800b206: e00a b.n 800b21e - for_us = netif_get_ip6_addr_match(inp, ip6_current_dest_addr()) >= 0; - } -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - if (!ip_current_is_v6()) { - for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr()); - 800b208: 683b ldr r3, [r7, #0] - 800b20a: 3304 adds r3, #4 - 800b20c: 681a ldr r2, [r3, #0] - 800b20e: 4b2a ldr r3, [pc, #168] ; (800b2b8 ) - 800b210: 695b ldr r3, [r3, #20] - 800b212: 429a cmp r2, r3 - 800b214: bf0c ite eq - 800b216: 2301 moveq r3, #1 - 800b218: 2300 movne r3, #0 - 800b21a: b2db uxtb r3, r3 - 800b21c: 76fb strb r3, [r7, #27] - } -#endif /* LWIP_IPV4 */ - } - - if (for_us) { - 800b21e: 7efb ldrb r3, [r7, #27] - 800b220: 2b00 cmp r3, #0 - 800b222: d042 beq.n 800b2aa - } - } - } - } -#endif /* CHECKSUM_CHECK_UDP */ - if (pbuf_header(p, -UDP_HLEN)) { - 800b224: f06f 0107 mvn.w r1, #7 - 800b228: 6878 ldr r0, [r7, #4] - 800b22a: f7fb f805 bl 8006238 - 800b22e: 4603 mov r3, r0 - 800b230: 2b00 cmp r3, #0 - 800b232: d00a beq.n 800b24a - /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); - 800b234: 4b22 ldr r3, [pc, #136] ; (800b2c0 ) - 800b236: f240 1255 movw r2, #341 ; 0x155 - 800b23a: 4922 ldr r1, [pc, #136] ; (800b2c4 ) - 800b23c: 4822 ldr r0, [pc, #136] ; (800b2c8 ) - 800b23e: f004 fc41 bl 800fac4 - UDP_STATS_INC(udp.drop); - MIB2_STATS_INC(mib2.udpinerrors); - pbuf_free(p); - 800b242: 6878 ldr r0, [r7, #4] - 800b244: f7fb f81c bl 8006280 - goto end; - 800b248: e032 b.n 800b2b0 - } - - if (pcb != NULL) { - 800b24a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b24c: 2b00 cmp r3, #0 - 800b24e: d012 beq.n 800b276 - pbuf_header(p, -hdrs_len); - } - } -#endif /* SO_REUSE && SO_REUSE_RXTOALL */ - /* callback */ - if (pcb->recv != NULL) { - 800b250: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b252: 699b ldr r3, [r3, #24] - 800b254: 2b00 cmp r3, #0 - 800b256: d00a beq.n 800b26e - /* now the recv function is responsible for freeing p */ - pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); - 800b258: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b25a: 699c ldr r4, [r3, #24] - 800b25c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800b25e: 69d8 ldr r0, [r3, #28] - 800b260: 8a3b ldrh r3, [r7, #16] - 800b262: 9300 str r3, [sp, #0] - 800b264: 4b19 ldr r3, [pc, #100] ; (800b2cc ) - 800b266: 687a ldr r2, [r7, #4] - 800b268: 6a79 ldr r1, [r7, #36] ; 0x24 - 800b26a: 47a0 blx r4 - } else { - pbuf_free(p); - } -end: - PERF_STOP("udp_input"); - return; - 800b26c: e021 b.n 800b2b2 - pbuf_free(p); - 800b26e: 6878 ldr r0, [r7, #4] - 800b270: f7fb f806 bl 8006280 - goto end; - 800b274: e01c b.n 800b2b0 - if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { - 800b276: 7cfb ldrb r3, [r7, #19] - 800b278: 2b00 cmp r3, #0 - 800b27a: d112 bne.n 800b2a2 - 800b27c: 4b0e ldr r3, [pc, #56] ; (800b2b8 ) - 800b27e: 695b ldr r3, [r3, #20] - 800b280: f003 03f0 and.w r3, r3, #240 ; 0xf0 - 800b284: 2be0 cmp r3, #224 ; 0xe0 - 800b286: d00c beq.n 800b2a2 - pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); - 800b288: 4b0b ldr r3, [pc, #44] ; (800b2b8 ) - 800b28a: 899b ldrh r3, [r3, #12] - 800b28c: 3308 adds r3, #8 - 800b28e: b29b uxth r3, r3 - 800b290: b21b sxth r3, r3 - 800b292: 4619 mov r1, r3 - 800b294: 6878 ldr r0, [r7, #4] - 800b296: f7fa ffe1 bl 800625c - icmp_port_unreach(ip_current_is_v6(), p); - 800b29a: 2103 movs r1, #3 - 800b29c: 6878 ldr r0, [r7, #4] - 800b29e: f003 f917 bl 800e4d0 - pbuf_free(p); - 800b2a2: 6878 ldr r0, [r7, #4] - 800b2a4: f7fa ffec bl 8006280 - return; - 800b2a8: e003 b.n 800b2b2 - pbuf_free(p); - 800b2aa: 6878 ldr r0, [r7, #4] - 800b2ac: f7fa ffe8 bl 8006280 - return; - 800b2b0: bf00 nop - UDP_STATS_INC(udp.drop); - MIB2_STATS_INC(mib2.udpinerrors); - pbuf_free(p); - PERF_STOP("udp_input"); -#endif /* CHECKSUM_CHECK_UDP */ -} - 800b2b2: 372c adds r7, #44 ; 0x2c - 800b2b4: 46bd mov sp, r7 - 800b2b6: bd90 pop {r4, r7, pc} - 800b2b8: 200037e8 .word 0x200037e8 - 800b2bc: 20006dc0 .word 0x20006dc0 - 800b2c0: 08011ea8 .word 0x08011ea8 - 800b2c4: 08011ed8 .word 0x08011ed8 - 800b2c8: 08011eec .word 0x08011eec - 800b2cc: 200037f8 .word 0x200037f8 - -0800b2d0 : - * @see udp_disconnect() udp_send() - */ -err_t -udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) -{ - 800b2d0: b580 push {r7, lr} - 800b2d2: b088 sub sp, #32 - 800b2d4: af02 add r7, sp, #8 - 800b2d6: 60f8 str r0, [r7, #12] - 800b2d8: 60b9 str r1, [r7, #8] - 800b2da: 607a str r2, [r7, #4] - 800b2dc: 807b strh r3, [r7, #2] - u16_t chksum) -{ -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - const ip_addr_t *src_ip; - - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { - 800b2de: 68fb ldr r3, [r7, #12] - 800b2e0: 2b00 cmp r3, #0 - 800b2e2: d002 beq.n 800b2ea - 800b2e4: 687b ldr r3, [r7, #4] - 800b2e6: 2b00 cmp r3, #0 - 800b2e8: d102 bne.n 800b2f0 - return ERR_VAL; - 800b2ea: f06f 0305 mvn.w r3, #5 - 800b2ee: e028 b.n 800b342 -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 && LWIP_IPV6 - else -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -#if LWIP_IPV4 - if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || - 800b2f0: 68fb ldr r3, [r7, #12] - 800b2f2: 2b00 cmp r3, #0 - 800b2f4: d009 beq.n 800b30a - 800b2f6: 68fb ldr r3, [r7, #12] - 800b2f8: 681b ldr r3, [r3, #0] - 800b2fa: 2b00 cmp r3, #0 - 800b2fc: d005 beq.n 800b30a - ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { - 800b2fe: 68fb ldr r3, [r7, #12] - 800b300: 681b ldr r3, [r3, #0] - 800b302: f003 03f0 and.w r3, r3, #240 ; 0xf0 - if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || - 800b306: 2be0 cmp r3, #224 ; 0xe0 - 800b308: d103 bne.n 800b312 - /* if the local_ip is any or multicast - * use the outgoing network interface IP address as source address */ - src_ip = netif_ip_addr4(netif); - 800b30a: 6a3b ldr r3, [r7, #32] - 800b30c: 3304 adds r3, #4 - 800b30e: 617b str r3, [r7, #20] - 800b310: e00b b.n 800b32a - } else { - /* check if UDP PCB local IP address is correct - * this could be an old address if netif->ip_addr has changed */ - if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) { - 800b312: 68fb ldr r3, [r7, #12] - 800b314: 681a ldr r2, [r3, #0] - 800b316: 6a3b ldr r3, [r7, #32] - 800b318: 3304 adds r3, #4 - 800b31a: 681b ldr r3, [r3, #0] - 800b31c: 429a cmp r2, r3 - 800b31e: d002 beq.n 800b326 - /* local_ip doesn't match, drop the packet */ - return ERR_RTE; - 800b320: f06f 0303 mvn.w r3, #3 - 800b324: e00d b.n 800b342 - } - /* use UDP PCB local IP address as source address */ - src_ip = &pcb->local_ip; - 800b326: 68fb ldr r3, [r7, #12] - 800b328: 617b str r3, [r7, #20] - } -#endif /* LWIP_IPV4 */ -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP - return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum, src_ip); -#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip); - 800b32a: 887a ldrh r2, [r7, #2] - 800b32c: 697b ldr r3, [r7, #20] - 800b32e: 9301 str r3, [sp, #4] - 800b330: 6a3b ldr r3, [r7, #32] - 800b332: 9300 str r3, [sp, #0] - 800b334: 4613 mov r3, r2 - 800b336: 687a ldr r2, [r7, #4] - 800b338: 68b9 ldr r1, [r7, #8] - 800b33a: 68f8 ldr r0, [r7, #12] - 800b33c: f000 f806 bl 800b34c - 800b340: 4603 mov r3, r0 -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ -} - 800b342: 4618 mov r0, r3 - 800b344: 3718 adds r7, #24 - 800b346: 46bd mov sp, r7 - 800b348: bd80 pop {r7, pc} - ... - -0800b34c : -/** @ingroup udp_raw - * Same as @ref udp_sendto_if, but with source address */ -err_t -udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip) -{ - 800b34c: b580 push {r7, lr} - 800b34e: b08c sub sp, #48 ; 0x30 - 800b350: af04 add r7, sp, #16 - 800b352: 60f8 str r0, [r7, #12] - 800b354: 60b9 str r1, [r7, #8] - 800b356: 607a str r2, [r7, #4] - 800b358: 807b strh r3, [r7, #2] - err_t err; - struct pbuf *q; /* q will be sent down the stack */ - u8_t ip_proto; - u8_t ttl; - - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, src_ip) || - 800b35a: 68fb ldr r3, [r7, #12] - 800b35c: 2b00 cmp r3, #0 - 800b35e: d002 beq.n 800b366 - 800b360: 687b ldr r3, [r7, #4] - 800b362: 2b00 cmp r3, #0 - 800b364: d102 bne.n 800b36c - !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { - return ERR_VAL; - 800b366: f06f 0305 mvn.w r3, #5 - 800b36a: e07e b.n 800b46a - return ERR_VAL; - } -#endif /* LWIP_IPV4 && IP_SOF_BROADCAST */ - - /* if the PCB is not yet bound to a port, bind it here */ - if (pcb->local_port == 0) { - 800b36c: 68fb ldr r3, [r7, #12] - 800b36e: 8a5b ldrh r3, [r3, #18] - 800b370: 2b00 cmp r3, #0 - 800b372: d10f bne.n 800b394 - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n")); - err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); - 800b374: 68f9 ldr r1, [r7, #12] - 800b376: 68fb ldr r3, [r7, #12] - 800b378: 8a5b ldrh r3, [r3, #18] - 800b37a: 461a mov r2, r3 - 800b37c: 68f8 ldr r0, [r7, #12] - 800b37e: f000 f87f bl 800b480 - 800b382: 4603 mov r3, r0 - 800b384: 76fb strb r3, [r7, #27] - if (err != ERR_OK) { - 800b386: f997 301b ldrsb.w r3, [r7, #27] - 800b38a: 2b00 cmp r3, #0 - 800b38c: d002 beq.n 800b394 - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n")); - return err; - 800b38e: f997 301b ldrsb.w r3, [r7, #27] - 800b392: e06a b.n 800b46a - } - } - - /* not enough space to add an UDP header to first pbuf in given p chain? */ - if (pbuf_header(p, UDP_HLEN)) { - 800b394: 2108 movs r1, #8 - 800b396: 68b8 ldr r0, [r7, #8] - 800b398: f7fa ff4e bl 8006238 - 800b39c: 4603 mov r3, r0 - 800b39e: 2b00 cmp r3, #0 - 800b3a0: d014 beq.n 800b3cc - /* allocate header in a separate new pbuf */ - q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); - 800b3a2: 2200 movs r2, #0 - 800b3a4: 2108 movs r1, #8 - 800b3a6: 2001 movs r0, #1 - 800b3a8: f7fa fbf2 bl 8005b90 - 800b3ac: 61f8 str r0, [r7, #28] - /* new header pbuf could not be allocated? */ - if (q == NULL) { - 800b3ae: 69fb ldr r3, [r7, #28] - 800b3b0: 2b00 cmp r3, #0 - 800b3b2: d102 bne.n 800b3ba - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); - return ERR_MEM; - 800b3b4: f04f 33ff mov.w r3, #4294967295 - 800b3b8: e057 b.n 800b46a - } - if (p->tot_len != 0) { - 800b3ba: 68bb ldr r3, [r7, #8] - 800b3bc: 891b ldrh r3, [r3, #8] - 800b3be: 2b00 cmp r3, #0 - 800b3c0: d006 beq.n 800b3d0 - /* chain header q in front of given pbuf p (only if p contains data) */ - pbuf_chain(q, p); - 800b3c2: 68b9 ldr r1, [r7, #8] - 800b3c4: 69f8 ldr r0, [r7, #28] - 800b3c6: f7fb f87d bl 80064c4 - 800b3ca: e001 b.n 800b3d0 - LWIP_DEBUGF(UDP_DEBUG, - ("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); - } else { - /* adding space for header within p succeeded */ - /* first pbuf q equals given pbuf */ - q = p; - 800b3cc: 68bb ldr r3, [r7, #8] - 800b3ce: 61fb str r3, [r7, #28] - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p)); - } - LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", - 800b3d0: 69fb ldr r3, [r7, #28] - 800b3d2: 895b ldrh r3, [r3, #10] - 800b3d4: 2b07 cmp r3, #7 - 800b3d6: d806 bhi.n 800b3e6 - 800b3d8: 4b26 ldr r3, [pc, #152] ; (800b474 ) - 800b3da: f240 22db movw r2, #731 ; 0x2db - 800b3de: 4926 ldr r1, [pc, #152] ; (800b478 ) - 800b3e0: 4826 ldr r0, [pc, #152] ; (800b47c ) - 800b3e2: f004 fb6f bl 800fac4 - (q->len >= sizeof(struct udp_hdr))); - /* q now represents the packet to be sent */ - udphdr = (struct udp_hdr *)q->payload; - 800b3e6: 69fb ldr r3, [r7, #28] - 800b3e8: 685b ldr r3, [r3, #4] - 800b3ea: 617b str r3, [r7, #20] - udphdr->src = lwip_htons(pcb->local_port); - 800b3ec: 68fb ldr r3, [r7, #12] - 800b3ee: 8a5b ldrh r3, [r3, #18] - 800b3f0: 4618 mov r0, r3 - 800b3f2: f7f9 fe30 bl 8005056 - 800b3f6: 4603 mov r3, r0 - 800b3f8: 461a mov r2, r3 - 800b3fa: 697b ldr r3, [r7, #20] - 800b3fc: 801a strh r2, [r3, #0] - udphdr->dest = lwip_htons(dst_port); - 800b3fe: 887b ldrh r3, [r7, #2] - 800b400: 4618 mov r0, r3 - 800b402: f7f9 fe28 bl 8005056 - 800b406: 4603 mov r3, r0 - 800b408: 461a mov r2, r3 - 800b40a: 697b ldr r3, [r7, #20] - 800b40c: 805a strh r2, [r3, #2] - /* in UDP, 0 checksum means 'no checksum' */ - udphdr->chksum = 0x0000; - 800b40e: 697b ldr r3, [r7, #20] - 800b410: 2200 movs r2, #0 - 800b412: 719a strb r2, [r3, #6] - 800b414: 2200 movs r2, #0 - 800b416: 71da strb r2, [r3, #7] - ip_proto = IP_PROTO_UDPLITE; - } else -#endif /* LWIP_UDPLITE */ - { /* UDP */ - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len)); - udphdr->len = lwip_htons(q->tot_len); - 800b418: 69fb ldr r3, [r7, #28] - 800b41a: 891b ldrh r3, [r3, #8] - 800b41c: 4618 mov r0, r3 - 800b41e: f7f9 fe1a bl 8005056 - 800b422: 4603 mov r3, r0 - 800b424: 461a mov r2, r3 - 800b426: 697b ldr r3, [r7, #20] - 800b428: 809a strh r2, [r3, #4] - } - udphdr->chksum = udpchksum; - } - } -#endif /* CHECKSUM_GEN_UDP */ - ip_proto = IP_PROTO_UDP; - 800b42a: 2311 movs r3, #17 - 800b42c: 74fb strb r3, [r7, #19] - - /* Determine TTL to use */ -#if LWIP_MULTICAST_TX_OPTIONS - ttl = (ip_addr_ismulticast(dst_ip) ? udp_get_multicast_ttl(pcb) : pcb->ttl); -#else /* LWIP_MULTICAST_TX_OPTIONS */ - ttl = pcb->ttl; - 800b42e: 68fb ldr r3, [r7, #12] - 800b430: 7a9b ldrb r3, [r3, #10] - 800b432: 74bb strb r3, [r7, #18] - - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum)); - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto)); - /* output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); - 800b434: 68fb ldr r3, [r7, #12] - 800b436: 7a5b ldrb r3, [r3, #9] - 800b438: 7cb9 ldrb r1, [r7, #18] - 800b43a: 6aba ldr r2, [r7, #40] ; 0x28 - 800b43c: 9202 str r2, [sp, #8] - 800b43e: 7cfa ldrb r2, [r7, #19] - 800b440: 9201 str r2, [sp, #4] - 800b442: 9300 str r3, [sp, #0] - 800b444: 460b mov r3, r1 - 800b446: 687a ldr r2, [r7, #4] - 800b448: 6af9 ldr r1, [r7, #44] ; 0x2c - 800b44a: 69f8 ldr r0, [r7, #28] - 800b44c: f003 faba bl 800e9c4 - 800b450: 4603 mov r3, r0 - 800b452: 76fb strb r3, [r7, #27] - - /* @todo: must this be increased even if error occurred? */ - MIB2_STATS_INC(mib2.udpoutdatagrams); - - /* did we chain a separate header pbuf earlier? */ - if (q != p) { - 800b454: 69fa ldr r2, [r7, #28] - 800b456: 68bb ldr r3, [r7, #8] - 800b458: 429a cmp r2, r3 - 800b45a: d004 beq.n 800b466 - /* free the header pbuf */ - pbuf_free(q); - 800b45c: 69f8 ldr r0, [r7, #28] - 800b45e: f7fa ff0f bl 8006280 - q = NULL; - 800b462: 2300 movs r3, #0 - 800b464: 61fb str r3, [r7, #28] - /* p is still referenced by the caller, and will live on */ - } - - UDP_STATS_INC(udp.xmit); - return err; - 800b466: f997 301b ldrsb.w r3, [r7, #27] -} - 800b46a: 4618 mov r0, r3 - 800b46c: 3720 adds r7, #32 - 800b46e: 46bd mov sp, r7 - 800b470: bd80 pop {r7, pc} - 800b472: bf00 nop - 800b474: 08011ea8 .word 0x08011ea8 - 800b478: 08011f14 .word 0x08011f14 - 800b47c: 08011eec .word 0x08011eec - -0800b480 : - * - * @see udp_disconnect() - */ -err_t -udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) -{ - 800b480: b580 push {r7, lr} - 800b482: b086 sub sp, #24 - 800b484: af00 add r7, sp, #0 - 800b486: 60f8 str r0, [r7, #12] - 800b488: 60b9 str r1, [r7, #8] - 800b48a: 4613 mov r3, r2 - 800b48c: 80fb strh r3, [r7, #6] - struct udp_pcb *ipcb; - u8_t rebind; - -#if LWIP_IPV4 - /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ - if (ipaddr == NULL) { - 800b48e: 68bb ldr r3, [r7, #8] - 800b490: 2b00 cmp r3, #0 - 800b492: d101 bne.n 800b498 - ipaddr = IP4_ADDR_ANY; - 800b494: 4b30 ldr r3, [pc, #192] ; (800b558 ) - 800b496: 60bb str r3, [r7, #8] - } -#endif /* LWIP_IPV4 */ - - /* still need to check for ipaddr == NULL in IPv6 only case */ - if ((pcb == NULL) || (ipaddr == NULL)) { - 800b498: 68fb ldr r3, [r7, #12] - 800b49a: 2b00 cmp r3, #0 - 800b49c: d002 beq.n 800b4a4 - 800b49e: 68bb ldr r3, [r7, #8] - 800b4a0: 2b00 cmp r3, #0 - 800b4a2: d102 bne.n 800b4aa - return ERR_VAL; - 800b4a4: f06f 0305 mvn.w r3, #5 - 800b4a8: e052 b.n 800b550 - - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = ")); - ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr); - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); - - rebind = 0; - 800b4aa: 2300 movs r3, #0 - 800b4ac: 74fb strb r3, [r7, #19] - /* Check for double bind and rebind of the same pcb */ - for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { - 800b4ae: 4b2b ldr r3, [pc, #172] ; (800b55c ) - 800b4b0: 681b ldr r3, [r3, #0] - 800b4b2: 617b str r3, [r7, #20] - 800b4b4: e009 b.n 800b4ca - /* is this UDP PCB already on active list? */ - if (pcb == ipcb) { - 800b4b6: 68fa ldr r2, [r7, #12] - 800b4b8: 697b ldr r3, [r7, #20] - 800b4ba: 429a cmp r2, r3 - 800b4bc: d102 bne.n 800b4c4 - rebind = 1; - 800b4be: 2301 movs r3, #1 - 800b4c0: 74fb strb r3, [r7, #19] - break; - 800b4c2: e005 b.n 800b4d0 - for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { - 800b4c4: 697b ldr r3, [r7, #20] - 800b4c6: 68db ldr r3, [r3, #12] - 800b4c8: 617b str r3, [r7, #20] - 800b4ca: 697b ldr r3, [r7, #20] - 800b4cc: 2b00 cmp r3, #0 - 800b4ce: d1f2 bne.n 800b4b6 - } - } - - /* no port specified? */ - if (port == 0) { - 800b4d0: 88fb ldrh r3, [r7, #6] - 800b4d2: 2b00 cmp r3, #0 - 800b4d4: d109 bne.n 800b4ea - port = udp_new_port(); - 800b4d6: f7ff fda3 bl 800b020 - 800b4da: 4603 mov r3, r0 - 800b4dc: 80fb strh r3, [r7, #6] - if (port == 0) { - 800b4de: 88fb ldrh r3, [r7, #6] - 800b4e0: 2b00 cmp r3, #0 - 800b4e2: d11e bne.n 800b522 - /* no more ports available in local range */ - LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); - return ERR_USE; - 800b4e4: f06f 0307 mvn.w r3, #7 - 800b4e8: e032 b.n 800b550 - } - } else { - for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { - 800b4ea: 4b1c ldr r3, [pc, #112] ; (800b55c ) - 800b4ec: 681b ldr r3, [r3, #0] - 800b4ee: 617b str r3, [r7, #20] - 800b4f0: e014 b.n 800b51c - if (pcb != ipcb) { - 800b4f2: 68fa ldr r2, [r7, #12] - 800b4f4: 697b ldr r3, [r7, #20] - 800b4f6: 429a cmp r2, r3 - 800b4f8: d00d beq.n 800b516 - if (!ip_get_option(pcb, SOF_REUSEADDR) || - !ip_get_option(ipcb, SOF_REUSEADDR)) -#endif /* SO_REUSE */ - { - /* port matches that of PCB in list and REUSEADDR not set -> reject */ - if ((ipcb->local_port == port) && - 800b4fa: 697b ldr r3, [r7, #20] - 800b4fc: 8a5b ldrh r3, [r3, #18] - 800b4fe: 88fa ldrh r2, [r7, #6] - 800b500: 429a cmp r2, r3 - 800b502: d108 bne.n 800b516 - /* IP address matches? */ - ip_addr_cmp(&ipcb->local_ip, ipaddr)) { - 800b504: 697b ldr r3, [r7, #20] - 800b506: 681a ldr r2, [r3, #0] - 800b508: 68bb ldr r3, [r7, #8] - 800b50a: 681b ldr r3, [r3, #0] - if ((ipcb->local_port == port) && - 800b50c: 429a cmp r2, r3 - 800b50e: d102 bne.n 800b516 - /* other PCB already binds to this local IP and port */ - LWIP_DEBUGF(UDP_DEBUG, - ("udp_bind: local port %"U16_F" already bound by another pcb\n", port)); - return ERR_USE; - 800b510: f06f 0307 mvn.w r3, #7 - 800b514: e01c b.n 800b550 - for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { - 800b516: 697b ldr r3, [r7, #20] - 800b518: 68db ldr r3, [r3, #12] - 800b51a: 617b str r3, [r7, #20] - 800b51c: 697b ldr r3, [r7, #20] - 800b51e: 2b00 cmp r3, #0 - 800b520: d1e7 bne.n 800b4f2 - } - } - } - } - - ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); - 800b522: 68bb ldr r3, [r7, #8] - 800b524: 2b00 cmp r3, #0 - 800b526: d002 beq.n 800b52e - 800b528: 68bb ldr r3, [r7, #8] - 800b52a: 681b ldr r3, [r3, #0] - 800b52c: e000 b.n 800b530 - 800b52e: 2300 movs r3, #0 - 800b530: 68fa ldr r2, [r7, #12] - 800b532: 6013 str r3, [r2, #0] - - pcb->local_port = port; - 800b534: 68fb ldr r3, [r7, #12] - 800b536: 88fa ldrh r2, [r7, #6] - 800b538: 825a strh r2, [r3, #18] - mib2_udp_bind(pcb); - /* pcb not active yet? */ - if (rebind == 0) { - 800b53a: 7cfb ldrb r3, [r7, #19] - 800b53c: 2b00 cmp r3, #0 - 800b53e: d106 bne.n 800b54e - /* place the PCB on the active list if not already there */ - pcb->next = udp_pcbs; - 800b540: 4b06 ldr r3, [pc, #24] ; (800b55c ) - 800b542: 681a ldr r2, [r3, #0] - 800b544: 68fb ldr r3, [r7, #12] - 800b546: 60da str r2, [r3, #12] - udp_pcbs = pcb; - 800b548: 4a04 ldr r2, [pc, #16] ; (800b55c ) - 800b54a: 68fb ldr r3, [r7, #12] - 800b54c: 6013 str r3, [r2, #0] - } - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to ")); - ip_addr_debug_print(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; - 800b54e: 2300 movs r3, #0 -} - 800b550: 4618 mov r0, r3 - 800b552: 3718 adds r7, #24 - 800b554: 46bd mov sp, r7 - 800b556: bd80 pop {r7, pc} - 800b558: 08012bb8 .word 0x08012bb8 - 800b55c: 20006dc0 .word 0x20006dc0 - -0800b560 : - * - * @see udp_disconnect() - */ -err_t -udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) -{ - 800b560: b580 push {r7, lr} - 800b562: b086 sub sp, #24 - 800b564: af00 add r7, sp, #0 - 800b566: 60f8 str r0, [r7, #12] - 800b568: 60b9 str r1, [r7, #8] - 800b56a: 4613 mov r3, r2 - 800b56c: 80fb strh r3, [r7, #6] - struct udp_pcb *ipcb; - - if ((pcb == NULL) || (ipaddr == NULL)) { - 800b56e: 68fb ldr r3, [r7, #12] - 800b570: 2b00 cmp r3, #0 - 800b572: d002 beq.n 800b57a - 800b574: 68bb ldr r3, [r7, #8] - 800b576: 2b00 cmp r3, #0 - 800b578: d102 bne.n 800b580 - return ERR_VAL; - 800b57a: f06f 0305 mvn.w r3, #5 - 800b57e: e03e b.n 800b5fe - } - - if (pcb->local_port == 0) { - 800b580: 68fb ldr r3, [r7, #12] - 800b582: 8a5b ldrh r3, [r3, #18] - 800b584: 2b00 cmp r3, #0 - 800b586: d10f bne.n 800b5a8 - err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); - 800b588: 68f9 ldr r1, [r7, #12] - 800b58a: 68fb ldr r3, [r7, #12] - 800b58c: 8a5b ldrh r3, [r3, #18] - 800b58e: 461a mov r2, r3 - 800b590: 68f8 ldr r0, [r7, #12] - 800b592: f7ff ff75 bl 800b480 - 800b596: 4603 mov r3, r0 - 800b598: 74fb strb r3, [r7, #19] - if (err != ERR_OK) { - 800b59a: f997 3013 ldrsb.w r3, [r7, #19] - 800b59e: 2b00 cmp r3, #0 - 800b5a0: d002 beq.n 800b5a8 - return err; - 800b5a2: f997 3013 ldrsb.w r3, [r7, #19] - 800b5a6: e02a b.n 800b5fe - } - } - - ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); - 800b5a8: 68bb ldr r3, [r7, #8] - 800b5aa: 2b00 cmp r3, #0 - 800b5ac: d002 beq.n 800b5b4 - 800b5ae: 68bb ldr r3, [r7, #8] - 800b5b0: 681b ldr r3, [r3, #0] - 800b5b2: e000 b.n 800b5b6 - 800b5b4: 2300 movs r3, #0 - 800b5b6: 68fa ldr r2, [r7, #12] - 800b5b8: 6053 str r3, [r2, #4] - pcb->remote_port = port; - 800b5ba: 68fb ldr r3, [r7, #12] - 800b5bc: 88fa ldrh r2, [r7, #6] - 800b5be: 829a strh r2, [r3, #20] - pcb->flags |= UDP_FLAGS_CONNECTED; - 800b5c0: 68fb ldr r3, [r7, #12] - 800b5c2: 7c1b ldrb r3, [r3, #16] - 800b5c4: f043 0304 orr.w r3, r3, #4 - 800b5c8: b2da uxtb r2, r3 - 800b5ca: 68fb ldr r3, [r7, #12] - 800b5cc: 741a strb r2, [r3, #16] - ip_addr_debug_print(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) { - 800b5ce: 4b0e ldr r3, [pc, #56] ; (800b608 ) - 800b5d0: 681b ldr r3, [r3, #0] - 800b5d2: 617b str r3, [r7, #20] - 800b5d4: e008 b.n 800b5e8 - if (pcb == ipcb) { - 800b5d6: 68fa ldr r2, [r7, #12] - 800b5d8: 697b ldr r3, [r7, #20] - 800b5da: 429a cmp r2, r3 - 800b5dc: d101 bne.n 800b5e2 - /* already on the list, just return */ - return ERR_OK; - 800b5de: 2300 movs r3, #0 - 800b5e0: e00d b.n 800b5fe - for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { - 800b5e2: 697b ldr r3, [r7, #20] - 800b5e4: 68db ldr r3, [r3, #12] - 800b5e6: 617b str r3, [r7, #20] - 800b5e8: 697b ldr r3, [r7, #20] - 800b5ea: 2b00 cmp r3, #0 - 800b5ec: d1f3 bne.n 800b5d6 - } - } - /* PCB not yet on the list, add PCB now */ - pcb->next = udp_pcbs; - 800b5ee: 4b06 ldr r3, [pc, #24] ; (800b608 ) - 800b5f0: 681a ldr r2, [r3, #0] - 800b5f2: 68fb ldr r3, [r7, #12] - 800b5f4: 60da str r2, [r3, #12] - udp_pcbs = pcb; - 800b5f6: 4a04 ldr r2, [pc, #16] ; (800b608 ) - 800b5f8: 68fb ldr r3, [r7, #12] - 800b5fa: 6013 str r3, [r2, #0] - return ERR_OK; - 800b5fc: 2300 movs r3, #0 -} - 800b5fe: 4618 mov r0, r3 - 800b600: 3718 adds r7, #24 - 800b602: 46bd mov sp, r7 - 800b604: bd80 pop {r7, pc} - 800b606: bf00 nop - 800b608: 20006dc0 .word 0x20006dc0 - -0800b60c : - * @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) -{ - 800b60c: b480 push {r7} - 800b60e: b085 sub sp, #20 - 800b610: af00 add r7, sp, #0 - 800b612: 60f8 str r0, [r7, #12] - 800b614: 60b9 str r1, [r7, #8] - 800b616: 607a str r2, [r7, #4] - /* remember recv() callback and user data */ - pcb->recv = recv; - 800b618: 68fb ldr r3, [r7, #12] - 800b61a: 68ba ldr r2, [r7, #8] - 800b61c: 619a str r2, [r3, #24] - pcb->recv_arg = recv_arg; - 800b61e: 68fb ldr r3, [r7, #12] - 800b620: 687a ldr r2, [r7, #4] - 800b622: 61da str r2, [r3, #28] -} - 800b624: bf00 nop - 800b626: 3714 adds r7, #20 - 800b628: 46bd mov sp, r7 - 800b62a: bc80 pop {r7} - 800b62c: 4770 bx lr - ... - -0800b630 : - * - * @see udp_new() - */ -void -udp_remove(struct udp_pcb *pcb) -{ - 800b630: b580 push {r7, lr} - 800b632: b084 sub sp, #16 - 800b634: af00 add r7, sp, #0 - 800b636: 6078 str r0, [r7, #4] - struct udp_pcb *pcb2; - - mib2_udp_unbind(pcb); - /* pcb to be removed is first in list? */ - if (udp_pcbs == pcb) { - 800b638: 4b15 ldr r3, [pc, #84] ; (800b690 ) - 800b63a: 681b ldr r3, [r3, #0] - 800b63c: 687a ldr r2, [r7, #4] - 800b63e: 429a cmp r2, r3 - 800b640: d105 bne.n 800b64e - /* make list start at 2nd pcb */ - udp_pcbs = udp_pcbs->next; - 800b642: 4b13 ldr r3, [pc, #76] ; (800b690 ) - 800b644: 681b ldr r3, [r3, #0] - 800b646: 68db ldr r3, [r3, #12] - 800b648: 4a11 ldr r2, [pc, #68] ; (800b690 ) - 800b64a: 6013 str r3, [r2, #0] - 800b64c: e017 b.n 800b67e - /* pcb not 1st in list */ - } else { - for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { - 800b64e: 4b10 ldr r3, [pc, #64] ; (800b690 ) - 800b650: 681b ldr r3, [r3, #0] - 800b652: 60fb str r3, [r7, #12] - 800b654: e010 b.n 800b678 - /* find pcb in udp_pcbs list */ - if (pcb2->next != NULL && pcb2->next == pcb) { - 800b656: 68fb ldr r3, [r7, #12] - 800b658: 68db ldr r3, [r3, #12] - 800b65a: 2b00 cmp r3, #0 - 800b65c: d009 beq.n 800b672 - 800b65e: 68fb ldr r3, [r7, #12] - 800b660: 68db ldr r3, [r3, #12] - 800b662: 687a ldr r2, [r7, #4] - 800b664: 429a cmp r2, r3 - 800b666: d104 bne.n 800b672 - /* remove pcb from list */ - pcb2->next = pcb->next; - 800b668: 687b ldr r3, [r7, #4] - 800b66a: 68da ldr r2, [r3, #12] - 800b66c: 68fb ldr r3, [r7, #12] - 800b66e: 60da str r2, [r3, #12] - break; - 800b670: e005 b.n 800b67e - for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { - 800b672: 68fb ldr r3, [r7, #12] - 800b674: 68db ldr r3, [r3, #12] - 800b676: 60fb str r3, [r7, #12] - 800b678: 68fb ldr r3, [r7, #12] - 800b67a: 2b00 cmp r3, #0 - 800b67c: d1eb bne.n 800b656 - } - } - } - memp_free(MEMP_UDP_PCB, pcb); - 800b67e: 6879 ldr r1, [r7, #4] - 800b680: 2000 movs r0, #0 - 800b682: f7fa f8dd bl 8005840 -} - 800b686: bf00 nop - 800b688: 3710 adds r7, #16 - 800b68a: 46bd mov sp, r7 - 800b68c: bd80 pop {r7, pc} - 800b68e: bf00 nop - 800b690: 20006dc0 .word 0x20006dc0 - -0800b694 : - * - * @see udp_remove() - */ -struct udp_pcb * -udp_new(void) -{ - 800b694: b580 push {r7, lr} - 800b696: b082 sub sp, #8 - 800b698: af00 add r7, sp, #0 - struct udp_pcb *pcb; - pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); - 800b69a: 2000 movs r0, #0 - 800b69c: f7fa f884 bl 80057a8 - 800b6a0: 6078 str r0, [r7, #4] - /* could allocate UDP PCB? */ - if (pcb != NULL) { - 800b6a2: 687b ldr r3, [r7, #4] - 800b6a4: 2b00 cmp r3, #0 - 800b6a6: d007 beq.n 800b6b8 - /* 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)); - 800b6a8: 2220 movs r2, #32 - 800b6aa: 2100 movs r1, #0 - 800b6ac: 6878 ldr r0, [r7, #4] - 800b6ae: f004 fb03 bl 800fcb8 - pcb->ttl = UDP_TTL; - 800b6b2: 687b ldr r3, [r7, #4] - 800b6b4: 22ff movs r2, #255 ; 0xff - 800b6b6: 729a strb r2, [r3, #10] -#if LWIP_MULTICAST_TX_OPTIONS - udp_set_multicast_ttl(pcb, UDP_TTL); -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - } - return pcb; - 800b6b8: 687b ldr r3, [r7, #4] -} - 800b6ba: 4618 mov r0, r3 - 800b6bc: 3708 adds r7, #8 - 800b6be: 46bd mov sp, r7 - 800b6c0: bd80 pop {r7, pc} - ... - -0800b6c4 : - * - * @param old_addr IP address of the netif before change - * @param new_addr IP address of the netif after change - */ -void udp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) -{ - 800b6c4: b480 push {r7} - 800b6c6: b085 sub sp, #20 - 800b6c8: af00 add r7, sp, #0 - 800b6ca: 6078 str r0, [r7, #4] - 800b6cc: 6039 str r1, [r7, #0] - struct udp_pcb* upcb; - - if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { - 800b6ce: 687b ldr r3, [r7, #4] - 800b6d0: 2b00 cmp r3, #0 - 800b6d2: d01e beq.n 800b712 - 800b6d4: 687b ldr r3, [r7, #4] - 800b6d6: 681b ldr r3, [r3, #0] - 800b6d8: 2b00 cmp r3, #0 - 800b6da: d01a beq.n 800b712 - 800b6dc: 683b ldr r3, [r7, #0] - 800b6de: 2b00 cmp r3, #0 - 800b6e0: d017 beq.n 800b712 - 800b6e2: 683b ldr r3, [r7, #0] - 800b6e4: 681b ldr r3, [r3, #0] - 800b6e6: 2b00 cmp r3, #0 - 800b6e8: d013 beq.n 800b712 - for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { - 800b6ea: 4b0c ldr r3, [pc, #48] ; (800b71c ) - 800b6ec: 681b ldr r3, [r3, #0] - 800b6ee: 60fb str r3, [r7, #12] - 800b6f0: e00c b.n 800b70c - /* PCB bound to current local interface address? */ - if (ip_addr_cmp(&upcb->local_ip, old_addr)) { - 800b6f2: 68fb ldr r3, [r7, #12] - 800b6f4: 681a ldr r2, [r3, #0] - 800b6f6: 687b ldr r3, [r7, #4] - 800b6f8: 681b ldr r3, [r3, #0] - 800b6fa: 429a cmp r2, r3 - 800b6fc: d103 bne.n 800b706 - /* 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); - 800b6fe: 683b ldr r3, [r7, #0] - 800b700: 681a ldr r2, [r3, #0] - 800b702: 68fb ldr r3, [r7, #12] - 800b704: 601a str r2, [r3, #0] - for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { - 800b706: 68fb ldr r3, [r7, #12] - 800b708: 68db ldr r3, [r3, #12] - 800b70a: 60fb str r3, [r7, #12] - 800b70c: 68fb ldr r3, [r7, #12] - 800b70e: 2b00 cmp r3, #0 - 800b710: d1ef bne.n 800b6f2 - } - } - } -} - 800b712: bf00 nop - 800b714: 3714 adds r7, #20 - 800b716: 46bd mov sp, r7 - 800b718: bc80 pop {r7} - 800b71a: 4770 bx lr - 800b71c: 20006dc0 .word 0x20006dc0 - -0800b720 : -static void dhcp_option_trailer(struct dhcp *dhcp); - -/** Ensure DHCP PCB is allocated and bound */ -static err_t -dhcp_inc_pcb_refcount(void) -{ - 800b720: b580 push {r7, lr} - 800b722: af00 add r7, sp, #0 - if (dhcp_pcb_refcount == 0) { - 800b724: 4b20 ldr r3, [pc, #128] ; (800b7a8 ) - 800b726: 781b ldrb r3, [r3, #0] - 800b728: 2b00 cmp r3, #0 - 800b72a: d133 bne.n 800b794 - LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); - 800b72c: 4b1f ldr r3, [pc, #124] ; (800b7ac ) - 800b72e: 681b ldr r3, [r3, #0] - 800b730: 2b00 cmp r3, #0 - 800b732: d005 beq.n 800b740 - 800b734: 4b1e ldr r3, [pc, #120] ; (800b7b0 ) - 800b736: 22d9 movs r2, #217 ; 0xd9 - 800b738: 491e ldr r1, [pc, #120] ; (800b7b4 ) - 800b73a: 481f ldr r0, [pc, #124] ; (800b7b8 ) - 800b73c: f004 f9c2 bl 800fac4 - - /* allocate UDP PCB */ - dhcp_pcb = udp_new(); - 800b740: f7ff ffa8 bl 800b694 - 800b744: 4603 mov r3, r0 - 800b746: 4a19 ldr r2, [pc, #100] ; (800b7ac ) - 800b748: 6013 str r3, [r2, #0] - - if (dhcp_pcb == NULL) { - 800b74a: 4b18 ldr r3, [pc, #96] ; (800b7ac ) - 800b74c: 681b ldr r3, [r3, #0] - 800b74e: 2b00 cmp r3, #0 - 800b750: d102 bne.n 800b758 - return ERR_MEM; - 800b752: f04f 33ff mov.w r3, #4294967295 - 800b756: e024 b.n 800b7a2 - } - - ip_set_option(dhcp_pcb, SOF_BROADCAST); - 800b758: 4b14 ldr r3, [pc, #80] ; (800b7ac ) - 800b75a: 681b ldr r3, [r3, #0] - 800b75c: 7a1a ldrb r2, [r3, #8] - 800b75e: 4b13 ldr r3, [pc, #76] ; (800b7ac ) - 800b760: 681b ldr r3, [r3, #0] - 800b762: f042 0220 orr.w r2, r2, #32 - 800b766: b2d2 uxtb r2, r2 - 800b768: 721a strb r2, [r3, #8] - - /* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */ - udp_bind(dhcp_pcb, IP4_ADDR_ANY, DHCP_CLIENT_PORT); - 800b76a: 4b10 ldr r3, [pc, #64] ; (800b7ac ) - 800b76c: 681b ldr r3, [r3, #0] - 800b76e: 2244 movs r2, #68 ; 0x44 - 800b770: 4912 ldr r1, [pc, #72] ; (800b7bc ) - 800b772: 4618 mov r0, r3 - 800b774: f7ff fe84 bl 800b480 - udp_connect(dhcp_pcb, IP4_ADDR_ANY, DHCP_SERVER_PORT); - 800b778: 4b0c ldr r3, [pc, #48] ; (800b7ac ) - 800b77a: 681b ldr r3, [r3, #0] - 800b77c: 2243 movs r2, #67 ; 0x43 - 800b77e: 490f ldr r1, [pc, #60] ; (800b7bc ) - 800b780: 4618 mov r0, r3 - 800b782: f7ff feed bl 800b560 - udp_recv(dhcp_pcb, dhcp_recv, NULL); - 800b786: 4b09 ldr r3, [pc, #36] ; (800b7ac ) - 800b788: 681b ldr r3, [r3, #0] - 800b78a: 2200 movs r2, #0 - 800b78c: 490c ldr r1, [pc, #48] ; (800b7c0 ) - 800b78e: 4618 mov r0, r3 - 800b790: f7ff ff3c bl 800b60c - } - - dhcp_pcb_refcount++; - 800b794: 4b04 ldr r3, [pc, #16] ; (800b7a8 ) - 800b796: 781b ldrb r3, [r3, #0] - 800b798: 3301 adds r3, #1 - 800b79a: b2da uxtb r2, r3 - 800b79c: 4b02 ldr r3, [pc, #8] ; (800b7a8 ) - 800b79e: 701a strb r2, [r3, #0] - - return ERR_OK; - 800b7a0: 2300 movs r3, #0 -} - 800b7a2: 4618 mov r0, r3 - 800b7a4: bd80 pop {r7, pc} - 800b7a6: bf00 nop - 800b7a8: 20006df0 .word 0x20006df0 - 800b7ac: 20006dec .word 0x20006dec - 800b7b0: 08011f44 .word 0x08011f44 - 800b7b4: 08011f7c .word 0x08011f7c - 800b7b8: 08011fa4 .word 0x08011fa4 - 800b7bc: 08012bb8 .word 0x08012bb8 - 800b7c0: 0800ce7d .word 0x0800ce7d - -0800b7c4 : - -/** Free DHCP PCB if the last netif stops using it */ -static void -dhcp_dec_pcb_refcount(void) -{ - 800b7c4: b580 push {r7, lr} - 800b7c6: af00 add r7, sp, #0 - LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); - 800b7c8: 4b0e ldr r3, [pc, #56] ; (800b804 ) - 800b7ca: 781b ldrb r3, [r3, #0] - 800b7cc: 2b00 cmp r3, #0 - 800b7ce: d105 bne.n 800b7dc - 800b7d0: 4b0d ldr r3, [pc, #52] ; (800b808 ) - 800b7d2: 22f3 movs r2, #243 ; 0xf3 - 800b7d4: 490d ldr r1, [pc, #52] ; (800b80c ) - 800b7d6: 480e ldr r0, [pc, #56] ; (800b810 ) - 800b7d8: f004 f974 bl 800fac4 - dhcp_pcb_refcount--; - 800b7dc: 4b09 ldr r3, [pc, #36] ; (800b804 ) - 800b7de: 781b ldrb r3, [r3, #0] - 800b7e0: 3b01 subs r3, #1 - 800b7e2: b2da uxtb r2, r3 - 800b7e4: 4b07 ldr r3, [pc, #28] ; (800b804 ) - 800b7e6: 701a strb r2, [r3, #0] - - if (dhcp_pcb_refcount == 0) { - 800b7e8: 4b06 ldr r3, [pc, #24] ; (800b804 ) - 800b7ea: 781b ldrb r3, [r3, #0] - 800b7ec: 2b00 cmp r3, #0 - 800b7ee: d107 bne.n 800b800 - udp_remove(dhcp_pcb); - 800b7f0: 4b08 ldr r3, [pc, #32] ; (800b814 ) - 800b7f2: 681b ldr r3, [r3, #0] - 800b7f4: 4618 mov r0, r3 - 800b7f6: f7ff ff1b bl 800b630 - dhcp_pcb = NULL; - 800b7fa: 4b06 ldr r3, [pc, #24] ; (800b814 ) - 800b7fc: 2200 movs r2, #0 - 800b7fe: 601a str r2, [r3, #0] - } -} - 800b800: bf00 nop - 800b802: bd80 pop {r7, pc} - 800b804: 20006df0 .word 0x20006df0 - 800b808: 08011f44 .word 0x08011f44 - 800b80c: 08011fcc .word 0x08011fcc - 800b810: 08011fa4 .word 0x08011fa4 - 800b814: 20006dec .word 0x20006dec - -0800b818 : - * - * @param netif the netif under DHCP control - */ -static void -dhcp_handle_nak(struct netif *netif) -{ - 800b818: b580 push {r7, lr} - 800b81a: b084 sub sp, #16 - 800b81c: af00 add r7, sp, #0 - 800b81e: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800b820: 687b ldr r3, [r7, #4] - 800b822: 6a5b ldr r3, [r3, #36] ; 0x24 - 800b824: 60fb str r3, [r7, #12] - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - /* Change to a defined state - set this before assigning the address - to ensure the callback can use dhcp_supplied_address() */ - dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); - 800b826: 210c movs r1, #12 - 800b828: 68f8 ldr r0, [r7, #12] - 800b82a: f000 ff85 bl 800c738 - /* remove IP address from interface (must no longer be used, as per RFC2131) */ - netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); - 800b82e: 4b06 ldr r3, [pc, #24] ; (800b848 ) - 800b830: 4a05 ldr r2, [pc, #20] ; (800b848 ) - 800b832: 4905 ldr r1, [pc, #20] ; (800b848 ) - 800b834: 6878 ldr r0, [r7, #4] - 800b836: f7fa f891 bl 800595c - /* We can immediately restart discovery */ - dhcp_discover(netif); - 800b83a: 6878 ldr r0, [r7, #4] - 800b83c: f000 fbb6 bl 800bfac -} - 800b840: bf00 nop - 800b842: 3710 adds r7, #16 - 800b844: 46bd mov sp, r7 - 800b846: bd80 pop {r7, pc} - 800b848: 08012bb8 .word 0x08012bb8 - -0800b84c : - * - * @param netif the netif under DHCP control - */ -static void -dhcp_check(struct netif *netif) -{ - 800b84c: b580 push {r7, lr} - 800b84e: b084 sub sp, #16 - 800b850: af00 add r7, sp, #0 - 800b852: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800b854: 687b ldr r3, [r7, #4] - 800b856: 6a5b ldr r3, [r3, #36] ; 0x24 - 800b858: 60fb str r3, [r7, #12] - err_t result; - u16_t msecs; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0], - (s16_t)netif->name[1])); - dhcp_set_state(dhcp, DHCP_STATE_CHECKING); - 800b85a: 2108 movs r1, #8 - 800b85c: 68f8 ldr r0, [r7, #12] - 800b85e: f000 ff6b bl 800c738 - /* create an ARP query for the offered IP address, expecting that no host - responds, as the IP address should not be in use. */ - result = etharp_query(netif, &dhcp->offered_ip_addr, NULL); - 800b862: 68fb ldr r3, [r7, #12] - 800b864: 3328 adds r3, #40 ; 0x28 - 800b866: 2200 movs r2, #0 - 800b868: 4619 mov r1, r3 - 800b86a: 6878 ldr r0, [r7, #4] - 800b86c: f002 fb22 bl 800deb4 - 800b870: 4603 mov r3, r0 - 800b872: 72fb strb r3, [r7, #11] - if (result != ERR_OK) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n")); - } - if (dhcp->tries < 255) { - 800b874: 68fb ldr r3, [r7, #12] - 800b876: 7a9b ldrb r3, [r3, #10] - 800b878: 2bff cmp r3, #255 ; 0xff - 800b87a: d005 beq.n 800b888 - dhcp->tries++; - 800b87c: 68fb ldr r3, [r7, #12] - 800b87e: 7a9b ldrb r3, [r3, #10] - 800b880: 3301 adds r3, #1 - 800b882: b2da uxtb r2, r3 - 800b884: 68fb ldr r3, [r7, #12] - 800b886: 729a strb r2, [r3, #10] - } - msecs = 500; - 800b888: f44f 73fa mov.w r3, #500 ; 0x1f4 - 800b88c: 813b strh r3, [r7, #8] - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - 800b88e: 893b ldrh r3, [r7, #8] - 800b890: f203 13f3 addw r3, r3, #499 ; 0x1f3 - 800b894: 4a06 ldr r2, [pc, #24] ; (800b8b0 ) - 800b896: fb82 1203 smull r1, r2, r2, r3 - 800b89a: 1152 asrs r2, r2, #5 - 800b89c: 17db asrs r3, r3, #31 - 800b89e: 1ad3 subs r3, r2, r3 - 800b8a0: b29a uxth r2, r3 - 800b8a2: 68fb ldr r3, [r7, #12] - 800b8a4: 82da strh r2, [r3, #22] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs)); -} - 800b8a6: bf00 nop - 800b8a8: 3710 adds r7, #16 - 800b8aa: 46bd mov sp, r7 - 800b8ac: bd80 pop {r7, pc} - 800b8ae: bf00 nop - 800b8b0: 10624dd3 .word 0x10624dd3 - -0800b8b4 : - * - * @param netif the netif under DHCP control - */ -static void -dhcp_handle_offer(struct netif *netif) -{ - 800b8b4: b580 push {r7, lr} - 800b8b6: b084 sub sp, #16 - 800b8b8: af00 add r7, sp, #0 - 800b8ba: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800b8bc: 687b ldr r3, [r7, #4] - 800b8be: 6a5b ldr r3, [r3, #36] ; 0x24 - 800b8c0: 60fb str r3, [r7, #12] - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - /* obtain the server address */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { - 800b8c2: 4b0c ldr r3, [pc, #48] ; (800b8f4 ) - 800b8c4: 789b ldrb r3, [r3, #2] - 800b8c6: 2b00 cmp r3, #0 - 800b8c8: d00f beq.n 800b8ea - ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); - 800b8ca: 4b0b ldr r3, [pc, #44] ; (800b8f8 ) - 800b8cc: 689b ldr r3, [r3, #8] - 800b8ce: 4618 mov r0, r3 - 800b8d0: f7f9 fbce bl 8005070 - 800b8d4: 4602 mov r2, r0 - 800b8d6: 68fb ldr r3, [r7, #12] - 800b8d8: 625a str r2, [r3, #36] ; 0x24 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", - ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); - /* remember offered address */ - ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); - 800b8da: 68fb ldr r3, [r7, #12] - 800b8dc: 685b ldr r3, [r3, #4] - 800b8de: 691a ldr r2, [r3, #16] - 800b8e0: 68fb ldr r3, [r7, #12] - 800b8e2: 629a str r2, [r3, #40] ; 0x28 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", - ip4_addr_get_u32(&dhcp->offered_ip_addr))); - - dhcp_select(netif); - 800b8e4: 6878 ldr r0, [r7, #4] - 800b8e6: f000 f809 bl 800b8fc - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void*)netif)); - } -} - 800b8ea: bf00 nop - 800b8ec: 3710 adds r7, #16 - 800b8ee: 46bd mov sp, r7 - 800b8f0: bd80 pop {r7, pc} - 800b8f2: bf00 nop - 800b8f4: 20006de4 .word 0x20006de4 - 800b8f8: 20006dc4 .word 0x20006dc4 - -0800b8fc : - * @param netif the netif under DHCP control - * @return lwIP specific error (see error.h) - */ -static err_t -dhcp_select(struct netif *netif) -{ - 800b8fc: b580 push {r7, lr} - 800b8fe: b088 sub sp, #32 - 800b900: af02 add r7, sp, #8 - 800b902: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800b904: 687b ldr r3, [r7, #4] - 800b906: 6a5b ldr r3, [r3, #36] ; 0x24 - 800b908: 613b str r3, [r7, #16] - err_t result; - u16_t msecs; - u8_t i; - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - dhcp_set_state(dhcp, DHCP_STATE_REQUESTING); - 800b90a: 2101 movs r1, #1 - 800b90c: 6938 ldr r0, [r7, #16] - 800b90e: f000 ff13 bl 800c738 - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - 800b912: 2203 movs r2, #3 - 800b914: 6939 ldr r1, [r7, #16] - 800b916: 6878 ldr r0, [r7, #4] - 800b918: f001 fb96 bl 800d048 - 800b91c: 4603 mov r3, r0 - 800b91e: 73fb strb r3, [r7, #15] - if (result == ERR_OK) { - 800b920: f997 300f ldrsb.w r3, [r7, #15] - 800b924: 2b00 cmp r3, #0 - 800b926: d159 bne.n 800b9dc - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - 800b928: 2202 movs r2, #2 - 800b92a: 2139 movs r1, #57 ; 0x39 - 800b92c: 6938 ldr r0, [r7, #16] - 800b92e: f000 ff1d bl 800c76c - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - 800b932: 687b ldr r3, [r7, #4] - 800b934: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800b936: 4619 mov r1, r3 - 800b938: 6938 ldr r0, [r7, #16] - 800b93a: f000 ff79 bl 800c830 - - /* MUST request the offered IP address */ - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - 800b93e: 2204 movs r2, #4 - 800b940: 2132 movs r1, #50 ; 0x32 - 800b942: 6938 ldr r0, [r7, #16] - 800b944: f000 ff12 bl 800c76c - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - 800b948: 693b ldr r3, [r7, #16] - 800b94a: 6a9b ldr r3, [r3, #40] ; 0x28 - 800b94c: 4618 mov r0, r3 - 800b94e: f7f9 fb8f bl 8005070 - 800b952: 4603 mov r3, r0 - 800b954: 4619 mov r1, r3 - 800b956: 6938 ldr r0, [r7, #16] - 800b958: f000 ffa4 bl 800c8a4 - - dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); - 800b95c: 2204 movs r2, #4 - 800b95e: 2136 movs r1, #54 ; 0x36 - 800b960: 6938 ldr r0, [r7, #16] - 800b962: f000 ff03 bl 800c76c - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); - 800b966: 693b ldr r3, [r7, #16] - 800b968: 6a5b ldr r3, [r3, #36] ; 0x24 - 800b96a: 4618 mov r0, r3 - 800b96c: f7f9 fb80 bl 8005070 - 800b970: 4603 mov r3, r0 - 800b972: 4619 mov r1, r3 - 800b974: 6938 ldr r0, [r7, #16] - 800b976: f000 ff95 bl 800c8a4 - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - 800b97a: 2203 movs r2, #3 - 800b97c: 2137 movs r1, #55 ; 0x37 - 800b97e: 6938 ldr r0, [r7, #16] - 800b980: f000 fef4 bl 800c76c - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800b984: 2300 movs r3, #0 - 800b986: 75fb strb r3, [r7, #23] - 800b988: e009 b.n 800b99e - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - 800b98a: 7dfb ldrb r3, [r7, #23] - 800b98c: 4a29 ldr r2, [pc, #164] ; (800ba34 ) - 800b98e: 5cd3 ldrb r3, [r2, r3] - 800b990: 4619 mov r1, r3 - 800b992: 6938 ldr r0, [r7, #16] - 800b994: f000 ff24 bl 800c7e0 - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800b998: 7dfb ldrb r3, [r7, #23] - 800b99a: 3301 adds r3, #1 - 800b99c: 75fb strb r3, [r7, #23] - 800b99e: 7dfb ldrb r3, [r7, #23] - 800b9a0: 2b02 cmp r3, #2 - 800b9a2: d9f2 bls.n 800b98a - -#if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); -#endif /* LWIP_NETIF_HOSTNAME */ - - dhcp_option_trailer(dhcp); - 800b9a4: 6938 ldr r0, [r7, #16] - 800b9a6: f001 fcf3 bl 800d390 - /* shrink the pbuf to the actual content length */ - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - 800b9aa: 693b ldr r3, [r7, #16] - 800b9ac: 68da ldr r2, [r3, #12] - 800b9ae: 693b ldr r3, [r7, #16] - 800b9b0: 8a9b ldrh r3, [r3, #20] - 800b9b2: 33f0 adds r3, #240 ; 0xf0 - 800b9b4: b29b uxth r3, r3 - 800b9b6: 4619 mov r1, r3 - 800b9b8: 4610 mov r0, r2 - 800b9ba: f7fa faed bl 8005f98 - - /* send broadcast to any DHCP server */ - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - 800b9be: 4b1e ldr r3, [pc, #120] ; (800ba38 ) - 800b9c0: 6818 ldr r0, [r3, #0] - 800b9c2: 693b ldr r3, [r7, #16] - 800b9c4: 68d9 ldr r1, [r3, #12] - 800b9c6: 4b1d ldr r3, [pc, #116] ; (800ba3c ) - 800b9c8: 9301 str r3, [sp, #4] - 800b9ca: 687b ldr r3, [r7, #4] - 800b9cc: 9300 str r3, [sp, #0] - 800b9ce: 2343 movs r3, #67 ; 0x43 - 800b9d0: 4a1b ldr r2, [pc, #108] ; (800ba40 ) - 800b9d2: f7ff fcbb bl 800b34c - dhcp_delete_msg(dhcp); - 800b9d6: 6938 ldr r0, [r7, #16] - 800b9d8: f001 fc98 bl 800d30c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - 800b9dc: 693b ldr r3, [r7, #16] - 800b9de: 7a9b ldrb r3, [r3, #10] - 800b9e0: 2bff cmp r3, #255 ; 0xff - 800b9e2: d005 beq.n 800b9f0 - dhcp->tries++; - 800b9e4: 693b ldr r3, [r7, #16] - 800b9e6: 7a9b ldrb r3, [r3, #10] - 800b9e8: 3301 adds r3, #1 - 800b9ea: b2da uxtb r2, r3 - 800b9ec: 693b ldr r3, [r7, #16] - 800b9ee: 729a strb r2, [r3, #10] - } - msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; - 800b9f0: 693b ldr r3, [r7, #16] - 800b9f2: 7a9b ldrb r3, [r3, #10] - 800b9f4: 2b05 cmp r3, #5 - 800b9f6: d807 bhi.n 800ba08 - 800b9f8: 693b ldr r3, [r7, #16] - 800b9fa: 7a9b ldrb r3, [r3, #10] - 800b9fc: 461a mov r2, r3 - 800b9fe: f44f 737a mov.w r3, #1000 ; 0x3e8 - 800ba02: 4093 lsls r3, r2 - 800ba04: b29b uxth r3, r3 - 800ba06: e001 b.n 800ba0c - 800ba08: f64e 2360 movw r3, #60000 ; 0xea60 - 800ba0c: 81bb strh r3, [r7, #12] - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - 800ba0e: 89bb ldrh r3, [r7, #12] - 800ba10: f203 13f3 addw r3, r3, #499 ; 0x1f3 - 800ba14: 4a0b ldr r2, [pc, #44] ; (800ba44 ) - 800ba16: fb82 1203 smull r1, r2, r2, r3 - 800ba1a: 1152 asrs r2, r2, #5 - 800ba1c: 17db asrs r3, r3, #31 - 800ba1e: 1ad3 subs r3, r2, r3 - 800ba20: b29a uxth r2, r3 - 800ba22: 693b ldr r3, [r7, #16] - 800ba24: 82da strh r2, [r3, #22] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); - return result; - 800ba26: f997 300f ldrsb.w r3, [r7, #15] -} - 800ba2a: 4618 mov r0, r3 - 800ba2c: 3718 adds r7, #24 - 800ba2e: 46bd mov sp, r7 - 800ba30: bd80 pop {r7, pc} - 800ba32: bf00 nop - 800ba34: 20000014 .word 0x20000014 - 800ba38: 20006dec .word 0x20006dec - 800ba3c: 08012bb8 .word 0x08012bb8 - 800ba40: 08012bbc .word 0x08012bbc - 800ba44: 10624dd3 .word 0x10624dd3 - -0800ba48 : - * The DHCP timer that checks for lease renewal/rebind timeouts. - * Must be called once a minute (see @ref DHCP_COARSE_TIMER_SECS). - */ -void -dhcp_coarse_tmr(void) -{ - 800ba48: b580 push {r7, lr} - 800ba4a: b082 sub sp, #8 - 800ba4c: af00 add r7, sp, #0 - struct netif *netif = netif_list; - 800ba4e: 4b27 ldr r3, [pc, #156] ; (800baec ) - 800ba50: 681b ldr r3, [r3, #0] - 800ba52: 607b str r3, [r7, #4] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); - /* iterate through all network interfaces */ - while (netif != NULL) { - 800ba54: e042 b.n 800badc - /* only act on DHCP configured interfaces */ - struct dhcp *dhcp = netif_dhcp_data(netif); - 800ba56: 687b ldr r3, [r7, #4] - 800ba58: 6a5b ldr r3, [r3, #36] ; 0x24 - 800ba5a: 603b str r3, [r7, #0] - if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { - 800ba5c: 683b ldr r3, [r7, #0] - 800ba5e: 2b00 cmp r3, #0 - 800ba60: d039 beq.n 800bad6 - 800ba62: 683b ldr r3, [r7, #0] - 800ba64: 7a5b ldrb r3, [r3, #9] - 800ba66: 2b00 cmp r3, #0 - 800ba68: d035 beq.n 800bad6 - /* compare lease time to expire timeout */ - if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { - 800ba6a: 683b ldr r3, [r7, #0] - 800ba6c: 8c5b ldrh r3, [r3, #34] ; 0x22 - 800ba6e: 2b00 cmp r3, #0 - 800ba70: d012 beq.n 800ba98 - 800ba72: 683b ldr r3, [r7, #0] - 800ba74: 8c1b ldrh r3, [r3, #32] - 800ba76: 3301 adds r3, #1 - 800ba78: b29a uxth r2, r3 - 800ba7a: 683b ldr r3, [r7, #0] - 800ba7c: 841a strh r2, [r3, #32] - 800ba7e: 683b ldr r3, [r7, #0] - 800ba80: 8c1a ldrh r2, [r3, #32] - 800ba82: 683b ldr r3, [r7, #0] - 800ba84: 8c5b ldrh r3, [r3, #34] ; 0x22 - 800ba86: 429a cmp r2, r3 - 800ba88: d106 bne.n 800ba98 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t0 timeout\n")); - /* this clients' lease time has expired */ - dhcp_release(netif); - 800ba8a: 6878 ldr r0, [r7, #4] - 800ba8c: f000 fd94 bl 800c5b8 - dhcp_discover(netif); - 800ba90: 6878 ldr r0, [r7, #4] - 800ba92: f000 fa8b bl 800bfac - 800ba96: e01e b.n 800bad6 - /* timer is active (non zero), and triggers (zeroes) now? */ - } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { - 800ba98: 683b ldr r3, [r7, #0] - 800ba9a: 8bdb ldrh r3, [r3, #30] - 800ba9c: 2b00 cmp r3, #0 - 800ba9e: d00b beq.n 800bab8 - 800baa0: 683b ldr r3, [r7, #0] - 800baa2: 8bdb ldrh r3, [r3, #30] - 800baa4: 1e5a subs r2, r3, #1 - 800baa6: b291 uxth r1, r2 - 800baa8: 683a ldr r2, [r7, #0] - 800baaa: 83d1 strh r1, [r2, #30] - 800baac: 2b01 cmp r3, #1 - 800baae: d103 bne.n 800bab8 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n")); - /* this clients' rebind timeout triggered */ - dhcp_t2_timeout(netif); - 800bab0: 6878 ldr r0, [r7, #4] - 800bab2: f000 f8c6 bl 800bc42 - 800bab6: e00e b.n 800bad6 - /* timer is active (non zero), and triggers (zeroes) now */ - } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { - 800bab8: 683b ldr r3, [r7, #0] - 800baba: 8b9b ldrh r3, [r3, #28] - 800babc: 2b00 cmp r3, #0 - 800babe: d00a beq.n 800bad6 - 800bac0: 683b ldr r3, [r7, #0] - 800bac2: 8b9b ldrh r3, [r3, #28] - 800bac4: 1e5a subs r2, r3, #1 - 800bac6: b291 uxth r1, r2 - 800bac8: 683a ldr r2, [r7, #0] - 800baca: 8391 strh r1, [r2, #28] - 800bacc: 2b01 cmp r3, #1 - 800bace: d102 bne.n 800bad6 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t1 timeout\n")); - /* this clients' renewal timeout triggered */ - dhcp_t1_timeout(netif); - 800bad0: 6878 ldr r0, [r7, #4] - 800bad2: f000 f888 bl 800bbe6 - } - } - /* proceed to next netif */ - netif = netif->next; - 800bad6: 687b ldr r3, [r7, #4] - 800bad8: 681b ldr r3, [r3, #0] - 800bada: 607b str r3, [r7, #4] - while (netif != NULL) { - 800badc: 687b ldr r3, [r7, #4] - 800bade: 2b00 cmp r3, #0 - 800bae0: d1b9 bne.n 800ba56 - } -} - 800bae2: bf00 nop - 800bae4: bf00 nop - 800bae6: 3708 adds r7, #8 - 800bae8: 46bd mov sp, r7 - 800baea: bd80 pop {r7, pc} - 800baec: 20006d58 .word 0x20006d58 - -0800baf0 : - * A DHCP server is expected to respond within a short period of time. - * This timer checks whether an outstanding DHCP request is timed out. - */ -void -dhcp_fine_tmr(void) -{ - 800baf0: b580 push {r7, lr} - 800baf2: b082 sub sp, #8 - 800baf4: af00 add r7, sp, #0 - struct netif *netif = netif_list; - 800baf6: 4b16 ldr r3, [pc, #88] ; (800bb50 ) - 800baf8: 681b ldr r3, [r3, #0] - 800bafa: 607b str r3, [r7, #4] - /* loop through netif's */ - while (netif != NULL) { - 800bafc: e020 b.n 800bb40 - struct dhcp *dhcp = netif_dhcp_data(netif); - 800bafe: 687b ldr r3, [r7, #4] - 800bb00: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bb02: 603b str r3, [r7, #0] - /* only act on DHCP configured interfaces */ - if (dhcp != NULL) { - 800bb04: 683b ldr r3, [r7, #0] - 800bb06: 2b00 cmp r3, #0 - 800bb08: d017 beq.n 800bb3a - /* timer is active (non zero), and is about to trigger now */ - if (dhcp->request_timeout > 1) { - 800bb0a: 683b ldr r3, [r7, #0] - 800bb0c: 8adb ldrh r3, [r3, #22] - 800bb0e: 2b01 cmp r3, #1 - 800bb10: d906 bls.n 800bb20 - dhcp->request_timeout--; - 800bb12: 683b ldr r3, [r7, #0] - 800bb14: 8adb ldrh r3, [r3, #22] - 800bb16: 3b01 subs r3, #1 - 800bb18: b29a uxth r2, r3 - 800bb1a: 683b ldr r3, [r7, #0] - 800bb1c: 82da strh r2, [r3, #22] - 800bb1e: e00c b.n 800bb3a - } - else if (dhcp->request_timeout == 1) { - 800bb20: 683b ldr r3, [r7, #0] - 800bb22: 8adb ldrh r3, [r3, #22] - 800bb24: 2b01 cmp r3, #1 - 800bb26: d108 bne.n 800bb3a - dhcp->request_timeout--; - 800bb28: 683b ldr r3, [r7, #0] - 800bb2a: 8adb ldrh r3, [r3, #22] - 800bb2c: 3b01 subs r3, #1 - 800bb2e: b29a uxth r2, r3 - 800bb30: 683b ldr r3, [r7, #0] - 800bb32: 82da strh r2, [r3, #22] - /* { netif->dhcp->request_timeout == 0 } */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_fine_tmr(): request timeout\n")); - /* this client's request timeout triggered */ - dhcp_timeout(netif); - 800bb34: 6878 ldr r0, [r7, #4] - 800bb36: f000 f80d bl 800bb54 - } - } - /* proceed to next network interface */ - netif = netif->next; - 800bb3a: 687b ldr r3, [r7, #4] - 800bb3c: 681b ldr r3, [r3, #0] - 800bb3e: 607b str r3, [r7, #4] - while (netif != NULL) { - 800bb40: 687b ldr r3, [r7, #4] - 800bb42: 2b00 cmp r3, #0 - 800bb44: d1db bne.n 800bafe - } -} - 800bb46: bf00 nop - 800bb48: bf00 nop - 800bb4a: 3708 adds r7, #8 - 800bb4c: 46bd mov sp, r7 - 800bb4e: bd80 pop {r7, pc} - 800bb50: 20006d58 .word 0x20006d58 - -0800bb54 : - * - * @param netif the netif under DHCP control - */ -static void -dhcp_timeout(struct netif *netif) -{ - 800bb54: b580 push {r7, lr} - 800bb56: b084 sub sp, #16 - 800bb58: af00 add r7, sp, #0 - 800bb5a: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800bb5c: 687b ldr r3, [r7, #4] - 800bb5e: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bb60: 60fb str r3, [r7, #12] - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); - /* back-off period has passed, or server selection timed out */ - if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) { - 800bb62: 68fb ldr r3, [r7, #12] - 800bb64: 7a5b ldrb r3, [r3, #9] - 800bb66: 2b0c cmp r3, #12 - 800bb68: d003 beq.n 800bb72 - 800bb6a: 68fb ldr r3, [r7, #12] - 800bb6c: 7a5b ldrb r3, [r3, #9] - 800bb6e: 2b06 cmp r3, #6 - 800bb70: d103 bne.n 800bb7a - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); - dhcp_discover(netif); - 800bb72: 6878 ldr r0, [r7, #4] - 800bb74: f000 fa1a bl 800bfac - dhcp_reboot(netif); - } else { - dhcp_discover(netif); - } - } -} - 800bb78: e031 b.n 800bbde - } else if (dhcp->state == DHCP_STATE_REQUESTING) { - 800bb7a: 68fb ldr r3, [r7, #12] - 800bb7c: 7a5b ldrb r3, [r3, #9] - 800bb7e: 2b01 cmp r3, #1 - 800bb80: d10e bne.n 800bba0 - if (dhcp->tries <= 5) { - 800bb82: 68fb ldr r3, [r7, #12] - 800bb84: 7a9b ldrb r3, [r3, #10] - 800bb86: 2b05 cmp r3, #5 - 800bb88: d803 bhi.n 800bb92 - dhcp_select(netif); - 800bb8a: 6878 ldr r0, [r7, #4] - 800bb8c: f7ff feb6 bl 800b8fc -} - 800bb90: e025 b.n 800bbde - dhcp_release(netif); - 800bb92: 6878 ldr r0, [r7, #4] - 800bb94: f000 fd10 bl 800c5b8 - dhcp_discover(netif); - 800bb98: 6878 ldr r0, [r7, #4] - 800bb9a: f000 fa07 bl 800bfac -} - 800bb9e: e01e b.n 800bbde - } else if (dhcp->state == DHCP_STATE_CHECKING) { - 800bba0: 68fb ldr r3, [r7, #12] - 800bba2: 7a5b ldrb r3, [r3, #9] - 800bba4: 2b08 cmp r3, #8 - 800bba6: d10b bne.n 800bbc0 - if (dhcp->tries <= 1) { - 800bba8: 68fb ldr r3, [r7, #12] - 800bbaa: 7a9b ldrb r3, [r3, #10] - 800bbac: 2b01 cmp r3, #1 - 800bbae: d803 bhi.n 800bbb8 - dhcp_check(netif); - 800bbb0: 6878 ldr r0, [r7, #4] - 800bbb2: f7ff fe4b bl 800b84c -} - 800bbb6: e012 b.n 800bbde - dhcp_bind(netif); - 800bbb8: 6878 ldr r0, [r7, #4] - 800bbba: f000 fa83 bl 800c0c4 -} - 800bbbe: e00e b.n 800bbde - } else if (dhcp->state == DHCP_STATE_REBOOTING) { - 800bbc0: 68fb ldr r3, [r7, #12] - 800bbc2: 7a5b ldrb r3, [r3, #9] - 800bbc4: 2b03 cmp r3, #3 - 800bbc6: d10a bne.n 800bbde - if (dhcp->tries < REBOOT_TRIES) { - 800bbc8: 68fb ldr r3, [r7, #12] - 800bbca: 7a9b ldrb r3, [r3, #10] - 800bbcc: 2b01 cmp r3, #1 - 800bbce: d803 bhi.n 800bbd8 - dhcp_reboot(netif); - 800bbd0: 6878 ldr r0, [r7, #4] - 800bbd2: f000 fc5d bl 800c490 -} - 800bbd6: e002 b.n 800bbde - dhcp_discover(netif); - 800bbd8: 6878 ldr r0, [r7, #4] - 800bbda: f000 f9e7 bl 800bfac -} - 800bbde: bf00 nop - 800bbe0: 3710 adds r7, #16 - 800bbe2: 46bd mov sp, r7 - 800bbe4: bd80 pop {r7, pc} - -0800bbe6 : - * - * @param netif the netif under DHCP control - */ -static void -dhcp_t1_timeout(struct netif *netif) -{ - 800bbe6: b580 push {r7, lr} - 800bbe8: b084 sub sp, #16 - 800bbea: af00 add r7, sp, #0 - 800bbec: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800bbee: 687b ldr r3, [r7, #4] - 800bbf0: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bbf2: 60fb str r3, [r7, #12] - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_t1_timeout()\n")); - if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || - 800bbf4: 68fb ldr r3, [r7, #12] - 800bbf6: 7a5b ldrb r3, [r3, #9] - 800bbf8: 2b01 cmp r3, #1 - 800bbfa: d007 beq.n 800bc0c - 800bbfc: 68fb ldr r3, [r7, #12] - 800bbfe: 7a5b ldrb r3, [r3, #9] - 800bc00: 2b0a cmp r3, #10 - 800bc02: d003 beq.n 800bc0c - (dhcp->state == DHCP_STATE_RENEWING)) { - 800bc04: 68fb ldr r3, [r7, #12] - 800bc06: 7a5b ldrb r3, [r3, #9] - if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || - 800bc08: 2b05 cmp r3, #5 - 800bc0a: d116 bne.n 800bc3a - * eventually time-out if renew tries fail. */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("dhcp_t1_timeout(): must renew\n")); - /* This slightly different to RFC2131: DHCPREQUEST will be sent from state - DHCP_STATE_RENEWING, not DHCP_STATE_BOUND */ - dhcp_renew(netif); - 800bc0c: 6878 ldr r0, [r7, #4] - 800bc0e: f000 fb33 bl 800c278 - /* Calculate next timeout */ - if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) - 800bc12: 68fb ldr r3, [r7, #12] - 800bc14: 8b5b ldrh r3, [r3, #26] - 800bc16: 461a mov r2, r3 - 800bc18: 68fb ldr r3, [r7, #12] - 800bc1a: 8c1b ldrh r3, [r3, #32] - 800bc1c: 1ad3 subs r3, r2, r3 - 800bc1e: 2b01 cmp r3, #1 - 800bc20: dd0b ble.n 800bc3a - { - dhcp->t1_renew_time = ((dhcp->t2_timeout - dhcp->lease_used) / 2); - 800bc22: 68fb ldr r3, [r7, #12] - 800bc24: 8b5b ldrh r3, [r3, #26] - 800bc26: 461a mov r2, r3 - 800bc28: 68fb ldr r3, [r7, #12] - 800bc2a: 8c1b ldrh r3, [r3, #32] - 800bc2c: 1ad3 subs r3, r2, r3 - 800bc2e: 0fda lsrs r2, r3, #31 - 800bc30: 4413 add r3, r2 - 800bc32: 105b asrs r3, r3, #1 - 800bc34: b29a uxth r2, r3 - 800bc36: 68fb ldr r3, [r7, #12] - 800bc38: 839a strh r2, [r3, #28] - } - } -} - 800bc3a: bf00 nop - 800bc3c: 3710 adds r7, #16 - 800bc3e: 46bd mov sp, r7 - 800bc40: bd80 pop {r7, pc} - -0800bc42 : - * - * @param netif the netif under DHCP control - */ -static void -dhcp_t2_timeout(struct netif *netif) -{ - 800bc42: b580 push {r7, lr} - 800bc44: b084 sub sp, #16 - 800bc46: af00 add r7, sp, #0 - 800bc48: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800bc4a: 687b ldr r3, [r7, #4] - 800bc4c: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bc4e: 60fb str r3, [r7, #12] - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout()\n")); - if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || - 800bc50: 68fb ldr r3, [r7, #12] - 800bc52: 7a5b ldrb r3, [r3, #9] - 800bc54: 2b01 cmp r3, #1 - 800bc56: d00b beq.n 800bc70 - 800bc58: 68fb ldr r3, [r7, #12] - 800bc5a: 7a5b ldrb r3, [r3, #9] - 800bc5c: 2b0a cmp r3, #10 - 800bc5e: d007 beq.n 800bc70 - (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { - 800bc60: 68fb ldr r3, [r7, #12] - 800bc62: 7a5b ldrb r3, [r3, #9] - if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || - 800bc64: 2b05 cmp r3, #5 - 800bc66: d003 beq.n 800bc70 - (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { - 800bc68: 68fb ldr r3, [r7, #12] - 800bc6a: 7a5b ldrb r3, [r3, #9] - 800bc6c: 2b04 cmp r3, #4 - 800bc6e: d116 bne.n 800bc9e - /* just retry to rebind */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("dhcp_t2_timeout(): must rebind\n")); - /* This slightly different to RFC2131: DHCPREQUEST will be sent from state - DHCP_STATE_REBINDING, not DHCP_STATE_BOUND */ - dhcp_rebind(netif); - 800bc70: 6878 ldr r0, [r7, #4] - 800bc72: f000 fb87 bl 800c384 - /* Calculate next timeout */ - if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) - 800bc76: 68fb ldr r3, [r7, #12] - 800bc78: 8c5b ldrh r3, [r3, #34] ; 0x22 - 800bc7a: 461a mov r2, r3 - 800bc7c: 68fb ldr r3, [r7, #12] - 800bc7e: 8c1b ldrh r3, [r3, #32] - 800bc80: 1ad3 subs r3, r2, r3 - 800bc82: 2b01 cmp r3, #1 - 800bc84: dd0b ble.n 800bc9e - { - dhcp->t2_rebind_time = ((dhcp->t0_timeout - dhcp->lease_used) / 2); - 800bc86: 68fb ldr r3, [r7, #12] - 800bc88: 8c5b ldrh r3, [r3, #34] ; 0x22 - 800bc8a: 461a mov r2, r3 - 800bc8c: 68fb ldr r3, [r7, #12] - 800bc8e: 8c1b ldrh r3, [r3, #32] - 800bc90: 1ad3 subs r3, r2, r3 - 800bc92: 0fda lsrs r2, r3, #31 - 800bc94: 4413 add r3, r2 - 800bc96: 105b asrs r3, r3, #1 - 800bc98: b29a uxth r2, r3 - 800bc9a: 68fb ldr r3, [r7, #12] - 800bc9c: 83da strh r2, [r3, #30] - } - } -} - 800bc9e: bf00 nop - 800bca0: 3710 adds r7, #16 - 800bca2: 46bd mov sp, r7 - 800bca4: bd80 pop {r7, pc} - ... - -0800bca8 : - * - * @param netif the netif under DHCP control - */ -static void -dhcp_handle_ack(struct netif *netif) -{ - 800bca8: b580 push {r7, lr} - 800bcaa: b084 sub sp, #16 - 800bcac: af00 add r7, sp, #0 - 800bcae: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800bcb0: 687b ldr r3, [r7, #4] - 800bcb2: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bcb4: 60fb str r3, [r7, #12] -#if LWIP_DHCP_GET_NTP_SRV - ip4_addr_t ntp_server_addrs[LWIP_DHCP_MAX_NTP_SERVERS]; -#endif - - /* clear options we might not get from the ACK */ - ip4_addr_set_zero(&dhcp->offered_sn_mask); - 800bcb6: 68fb ldr r3, [r7, #12] - 800bcb8: 2200 movs r2, #0 - 800bcba: 62da str r2, [r3, #44] ; 0x2c - ip4_addr_set_zero(&dhcp->offered_gw_addr); - 800bcbc: 68fb ldr r3, [r7, #12] - 800bcbe: 2200 movs r2, #0 - 800bcc0: 631a str r2, [r3, #48] ; 0x30 -#if LWIP_DHCP_BOOTP_FILE - ip4_addr_set_zero(&dhcp->offered_si_addr); -#endif /* LWIP_DHCP_BOOTP_FILE */ - - /* lease time given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { - 800bcc2: 4b27 ldr r3, [pc, #156] ; (800bd60 ) - 800bcc4: 78db ldrb r3, [r3, #3] - 800bcc6: 2b00 cmp r3, #0 - 800bcc8: d003 beq.n 800bcd2 - /* remember offered lease time */ - dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); - 800bcca: 4b26 ldr r3, [pc, #152] ; (800bd64 ) - 800bccc: 68da ldr r2, [r3, #12] - 800bcce: 68fb ldr r3, [r7, #12] - 800bcd0: 635a str r2, [r3, #52] ; 0x34 - } - /* renewal period given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { - 800bcd2: 4b23 ldr r3, [pc, #140] ; (800bd60 ) - 800bcd4: 791b ldrb r3, [r3, #4] - 800bcd6: 2b00 cmp r3, #0 - 800bcd8: d004 beq.n 800bce4 - /* remember given renewal period */ - dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); - 800bcda: 4b22 ldr r3, [pc, #136] ; (800bd64 ) - 800bcdc: 691a ldr r2, [r3, #16] - 800bcde: 68fb ldr r3, [r7, #12] - 800bce0: 639a str r2, [r3, #56] ; 0x38 - 800bce2: e004 b.n 800bcee - } else { - /* calculate safe periods for renewal */ - dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; - 800bce4: 68fb ldr r3, [r7, #12] - 800bce6: 6b5b ldr r3, [r3, #52] ; 0x34 - 800bce8: 085a lsrs r2, r3, #1 - 800bcea: 68fb ldr r3, [r7, #12] - 800bcec: 639a str r2, [r3, #56] ; 0x38 - } - - /* renewal period given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { - 800bcee: 4b1c ldr r3, [pc, #112] ; (800bd60 ) - 800bcf0: 795b ldrb r3, [r3, #5] - 800bcf2: 2b00 cmp r3, #0 - 800bcf4: d004 beq.n 800bd00 - /* remember given rebind period */ - dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); - 800bcf6: 4b1b ldr r3, [pc, #108] ; (800bd64 ) - 800bcf8: 695a ldr r2, [r3, #20] - 800bcfa: 68fb ldr r3, [r7, #12] - 800bcfc: 63da str r2, [r3, #60] ; 0x3c - 800bcfe: e007 b.n 800bd10 - } else { - /* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/ - dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; - 800bd00: 68fb ldr r3, [r7, #12] - 800bd02: 6b5a ldr r2, [r3, #52] ; 0x34 - 800bd04: 4613 mov r3, r2 - 800bd06: 00db lsls r3, r3, #3 - 800bd08: 1a9b subs r3, r3, r2 - 800bd0a: 08da lsrs r2, r3, #3 - 800bd0c: 68fb ldr r3, [r7, #12] - 800bd0e: 63da str r2, [r3, #60] ; 0x3c - } - - /* (y)our internet address */ - ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); - 800bd10: 68fb ldr r3, [r7, #12] - 800bd12: 685b ldr r3, [r3, #4] - 800bd14: 691a ldr r2, [r3, #16] - 800bd16: 68fb ldr r3, [r7, #12] - 800bd18: 629a str r2, [r3, #40] ; 0x28 - boot file name copied in dhcp_parse_reply if not overloaded */ - ip4_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); -#endif /* LWIP_DHCP_BOOTP_FILE */ - - /* subnet mask given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { - 800bd1a: 4b11 ldr r3, [pc, #68] ; (800bd60 ) - 800bd1c: 799b ldrb r3, [r3, #6] - 800bd1e: 2b00 cmp r3, #0 - 800bd20: d00b beq.n 800bd3a - /* remember given subnet mask */ - ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); - 800bd22: 4b10 ldr r3, [pc, #64] ; (800bd64 ) - 800bd24: 699b ldr r3, [r3, #24] - 800bd26: 4618 mov r0, r3 - 800bd28: f7f9 f9a2 bl 8005070 - 800bd2c: 4602 mov r2, r0 - 800bd2e: 68fb ldr r3, [r7, #12] - 800bd30: 62da str r2, [r3, #44] ; 0x2c - dhcp->subnet_mask_given = 1; - 800bd32: 68fb ldr r3, [r7, #12] - 800bd34: 2201 movs r2, #1 - 800bd36: 72da strb r2, [r3, #11] - 800bd38: e002 b.n 800bd40 - } else { - dhcp->subnet_mask_given = 0; - 800bd3a: 68fb ldr r3, [r7, #12] - 800bd3c: 2200 movs r2, #0 - 800bd3e: 72da strb r2, [r3, #11] - } - - /* gateway router */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { - 800bd40: 4b07 ldr r3, [pc, #28] ; (800bd60 ) - 800bd42: 79db ldrb r3, [r3, #7] - 800bd44: 2b00 cmp r3, #0 - 800bd46: d007 beq.n 800bd58 - ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); - 800bd48: 4b06 ldr r3, [pc, #24] ; (800bd64 ) - 800bd4a: 69db ldr r3, [r3, #28] - 800bd4c: 4618 mov r0, r3 - 800bd4e: f7f9 f98f bl 8005070 - 800bd52: 4602 mov r2, r0 - 800bd54: 68fb ldr r3, [r7, #12] - 800bd56: 631a str r2, [r3, #48] ; 0x30 - ip_addr_t dns_addr; - ip_addr_set_ip4_u32(&dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n))); - dns_setserver(n, &dns_addr); - } -#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ -} - 800bd58: bf00 nop - 800bd5a: 3710 adds r7, #16 - 800bd5c: 46bd mov sp, r7 - 800bd5e: bd80 pop {r7, pc} - 800bd60: 20006de4 .word 0x20006de4 - 800bd64: 20006dc4 .word 0x20006dc4 - -0800bd68 : - * - ERR_OK - No error - * - ERR_MEM - Out of memory - */ -err_t -dhcp_start(struct netif *netif) -{ - 800bd68: b580 push {r7, lr} - 800bd6a: b084 sub sp, #16 - 800bd6c: af00 add r7, sp, #0 - 800bd6e: 6078 str r0, [r7, #4] - struct dhcp *dhcp; - err_t result; - - LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); - 800bd70: 687b ldr r3, [r7, #4] - 800bd72: 2b00 cmp r3, #0 - 800bd74: d109 bne.n 800bd8a - 800bd76: 4b3c ldr r3, [pc, #240] ; (800be68 ) - 800bd78: f240 22d6 movw r2, #726 ; 0x2d6 - 800bd7c: 493b ldr r1, [pc, #236] ; (800be6c ) - 800bd7e: 483c ldr r0, [pc, #240] ; (800be70 ) - 800bd80: f003 fea0 bl 800fac4 - 800bd84: f06f 030f mvn.w r3, #15 - 800bd88: e069 b.n 800be5e - LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); - 800bd8a: 687b ldr r3, [r7, #4] - 800bd8c: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800bd90: f003 0301 and.w r3, r3, #1 - 800bd94: 2b00 cmp r3, #0 - 800bd96: d109 bne.n 800bdac - 800bd98: 4b33 ldr r3, [pc, #204] ; (800be68 ) - 800bd9a: f240 22d7 movw r2, #727 ; 0x2d7 - 800bd9e: 4935 ldr r1, [pc, #212] ; (800be74 ) - 800bda0: 4833 ldr r0, [pc, #204] ; (800be70 ) - 800bda2: f003 fe8f bl 800fac4 - 800bda6: f06f 030f mvn.w r3, #15 - 800bdaa: e058 b.n 800be5e - dhcp = netif_dhcp_data(netif); - 800bdac: 687b ldr r3, [r7, #4] - 800bdae: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bdb0: 60fb str r3, [r7, #12] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - - /* check MTU of the netif */ - if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { - 800bdb2: 687b ldr r3, [r7, #4] - 800bdb4: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800bdb6: f5b3 7f10 cmp.w r3, #576 ; 0x240 - 800bdba: d202 bcs.n 800bdc2 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); - return ERR_MEM; - 800bdbc: f04f 33ff mov.w r3, #4294967295 - 800bdc0: e04d b.n 800be5e - } - - /* no DHCP client attached yet? */ - if (dhcp == NULL) { - 800bdc2: 68fb ldr r3, [r7, #12] - 800bdc4: 2b00 cmp r3, #0 - 800bdc6: d10d bne.n 800bde4 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n")); - dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); - 800bdc8: 2040 movs r0, #64 ; 0x40 - 800bdca: f7f9 fb91 bl 80054f0 - 800bdce: 60f8 str r0, [r7, #12] - if (dhcp == NULL) { - 800bdd0: 68fb ldr r3, [r7, #12] - 800bdd2: 2b00 cmp r3, #0 - 800bdd4: d102 bne.n 800bddc - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); - return ERR_MEM; - 800bdd6: f04f 33ff mov.w r3, #4294967295 - 800bdda: e040 b.n 800be5e - } - - /* store this dhcp client in the netif */ - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); - 800bddc: 687b ldr r3, [r7, #4] - 800bdde: 68fa ldr r2, [r7, #12] - 800bde0: 625a str r2, [r3, #36] ; 0x24 - 800bde2: e01b b.n 800be1c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); - /* already has DHCP client attached */ - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n")); - LWIP_ASSERT("pbuf p_out wasn't freed", dhcp->p_out == NULL); - 800bde4: 68fb ldr r3, [r7, #12] - 800bde6: 68db ldr r3, [r3, #12] - 800bde8: 2b00 cmp r3, #0 - 800bdea: d006 beq.n 800bdfa - 800bdec: 4b1e ldr r3, [pc, #120] ; (800be68 ) - 800bdee: f44f 723c mov.w r2, #752 ; 0x2f0 - 800bdf2: 4921 ldr r1, [pc, #132] ; (800be78 ) - 800bdf4: 481e ldr r0, [pc, #120] ; (800be70 ) - 800bdf6: f003 fe65 bl 800fac4 - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL ); - 800bdfa: 68fb ldr r3, [r7, #12] - 800bdfc: 685b ldr r3, [r3, #4] - 800bdfe: 2b00 cmp r3, #0 - 800be00: d006 beq.n 800be10 - 800be02: 4b19 ldr r3, [pc, #100] ; (800be68 ) - 800be04: f240 22f1 movw r2, #753 ; 0x2f1 - 800be08: 491c ldr r1, [pc, #112] ; (800be7c ) - 800be0a: 4819 ldr r0, [pc, #100] ; (800be70 ) - 800be0c: f003 fe5a bl 800fac4 - - if (dhcp->pcb_allocated != 0) { - 800be10: 68fb ldr r3, [r7, #12] - 800be12: 7a1b ldrb r3, [r3, #8] - 800be14: 2b00 cmp r3, #0 - 800be16: d001 beq.n 800be1c - dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ - 800be18: f7ff fcd4 bl 800b7c4 - } - /* dhcp is cleared below, no need to reset flag*/ - } - - /* clear data structure */ - memset(dhcp, 0, sizeof(struct dhcp)); - 800be1c: 2240 movs r2, #64 ; 0x40 - 800be1e: 2100 movs r1, #0 - 800be20: 68f8 ldr r0, [r7, #12] - 800be22: f003 ff49 bl 800fcb8 - /* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */ - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); - - if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ - 800be26: f7ff fc7b bl 800b720 - 800be2a: 4603 mov r3, r0 - 800be2c: 2b00 cmp r3, #0 - 800be2e: d002 beq.n 800be36 - return ERR_MEM; - 800be30: f04f 33ff mov.w r3, #4294967295 - 800be34: e013 b.n 800be5e - } - dhcp->pcb_allocated = 1; - 800be36: 68fb ldr r3, [r7, #12] - 800be38: 2201 movs r2, #1 - 800be3a: 721a strb r2, [r3, #8] - } -#endif /* LWIP_DHCP_CHECK_LINK_UP */ - - - /* (re)start the DHCP negotiation */ - result = dhcp_discover(netif); - 800be3c: 6878 ldr r0, [r7, #4] - 800be3e: f000 f8b5 bl 800bfac - 800be42: 4603 mov r3, r0 - 800be44: 72fb strb r3, [r7, #11] - if (result != ERR_OK) { - 800be46: f997 300b ldrsb.w r3, [r7, #11] - 800be4a: 2b00 cmp r3, #0 - 800be4c: d005 beq.n 800be5a - /* free resources allocated above */ - dhcp_stop(netif); - 800be4e: 6878 ldr r0, [r7, #4] - 800be50: f000 fc3a bl 800c6c8 - return ERR_MEM; - 800be54: f04f 33ff mov.w r3, #4294967295 - 800be58: e001 b.n 800be5e - } - return result; - 800be5a: f997 300b ldrsb.w r3, [r7, #11] -} - 800be5e: 4618 mov r0, r3 - 800be60: 3710 adds r7, #16 - 800be62: 46bd mov sp, r7 - 800be64: bd80 pop {r7, pc} - 800be66: bf00 nop - 800be68: 08011f44 .word 0x08011f44 - 800be6c: 08011ff0 .word 0x08011ff0 - 800be70: 08011fa4 .word 0x08011fa4 - 800be74: 08012034 .word 0x08012034 - 800be78: 08012058 .word 0x08012058 - 800be7c: 08012070 .word 0x08012070 - -0800be80 : - * @param netif the network interface on which the reply was received - * @param addr The IP address we received a reply from - */ -void -dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr) -{ - 800be80: b580 push {r7, lr} - 800be82: b084 sub sp, #16 - 800be84: af00 add r7, sp, #0 - 800be86: 6078 str r0, [r7, #4] - 800be88: 6039 str r1, [r7, #0] - struct dhcp *dhcp; - - LWIP_ERROR("netif != NULL", (netif != NULL), return;); - 800be8a: 687b ldr r3, [r7, #4] - 800be8c: 2b00 cmp r3, #0 - 800be8e: d107 bne.n 800bea0 - 800be90: 4b0e ldr r3, [pc, #56] ; (800becc ) - 800be92: f240 327b movw r2, #891 ; 0x37b - 800be96: 490e ldr r1, [pc, #56] ; (800bed0 ) - 800be98: 480e ldr r0, [pc, #56] ; (800bed4 ) - 800be9a: f003 fe13 bl 800fac4 - 800be9e: e012 b.n 800bec6 - dhcp = netif_dhcp_data(netif); - 800bea0: 687b ldr r3, [r7, #4] - 800bea2: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bea4: 60fb str r3, [r7, #12] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n")); - /* is a DHCP client doing an ARP check? */ - if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) { - 800bea6: 68fb ldr r3, [r7, #12] - 800bea8: 2b00 cmp r3, #0 - 800beaa: d00c beq.n 800bec6 - 800beac: 68fb ldr r3, [r7, #12] - 800beae: 7a5b ldrb r3, [r3, #9] - 800beb0: 2b08 cmp r3, #8 - 800beb2: d108 bne.n 800bec6 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n", - ip4_addr_get_u32(addr))); - /* did a host respond with the address we - were offered by the DHCP server? */ - if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) { - 800beb4: 683b ldr r3, [r7, #0] - 800beb6: 681a ldr r2, [r3, #0] - 800beb8: 68fb ldr r3, [r7, #12] - 800beba: 6a9b ldr r3, [r3, #40] ; 0x28 - 800bebc: 429a cmp r2, r3 - 800bebe: d102 bne.n 800bec6 - /* we will not accept the offered address */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, - ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); - dhcp_decline(netif); - 800bec0: 6878 ldr r0, [r7, #4] - 800bec2: f000 f809 bl 800bed8 - } - } -} - 800bec6: 3710 adds r7, #16 - 800bec8: 46bd mov sp, r7 - 800beca: bd80 pop {r7, pc} - 800becc: 08011f44 .word 0x08011f44 - 800bed0: 08011ff0 .word 0x08011ff0 - 800bed4: 08011fa4 .word 0x08011fa4 - -0800bed8 : - * - * @param netif the netif under DHCP control - */ -static err_t -dhcp_decline(struct netif *netif) -{ - 800bed8: b580 push {r7, lr} - 800beda: b086 sub sp, #24 - 800bedc: af02 add r7, sp, #8 - 800bede: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800bee0: 687b ldr r3, [r7, #4] - 800bee2: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bee4: 60fb str r3, [r7, #12] - err_t result = ERR_OK; - 800bee6: 2300 movs r3, #0 - 800bee8: 72fb strb r3, [r7, #11] - u16_t msecs; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n")); - dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); - 800beea: 210c movs r1, #12 - 800beec: 68f8 ldr r0, [r7, #12] - 800beee: f000 fc23 bl 800c738 - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); - 800bef2: 2204 movs r2, #4 - 800bef4: 68f9 ldr r1, [r7, #12] - 800bef6: 6878 ldr r0, [r7, #4] - 800bef8: f001 f8a6 bl 800d048 - 800befc: 4603 mov r3, r0 - 800befe: 72fb strb r3, [r7, #11] - if (result == ERR_OK) { - 800bf00: f997 300b ldrsb.w r3, [r7, #11] - 800bf04: 2b00 cmp r3, #0 - 800bf06: d12a bne.n 800bf5e - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - 800bf08: 2204 movs r2, #4 - 800bf0a: 2132 movs r1, #50 ; 0x32 - 800bf0c: 68f8 ldr r0, [r7, #12] - 800bf0e: f000 fc2d bl 800c76c - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - 800bf12: 68fb ldr r3, [r7, #12] - 800bf14: 6a9b ldr r3, [r3, #40] ; 0x28 - 800bf16: 4618 mov r0, r3 - 800bf18: f7f9 f8aa bl 8005070 - 800bf1c: 4603 mov r3, r0 - 800bf1e: 4619 mov r1, r3 - 800bf20: 68f8 ldr r0, [r7, #12] - 800bf22: f000 fcbf bl 800c8a4 - - dhcp_option_trailer(dhcp); - 800bf26: 68f8 ldr r0, [r7, #12] - 800bf28: f001 fa32 bl 800d390 - /* resize pbuf to reflect true size of options */ - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - 800bf2c: 68fb ldr r3, [r7, #12] - 800bf2e: 68da ldr r2, [r3, #12] - 800bf30: 68fb ldr r3, [r7, #12] - 800bf32: 8a9b ldrh r3, [r3, #20] - 800bf34: 33f0 adds r3, #240 ; 0xf0 - 800bf36: b29b uxth r3, r3 - 800bf38: 4619 mov r1, r3 - 800bf3a: 4610 mov r0, r2 - 800bf3c: f7fa f82c bl 8005f98 - - /* per section 4.4.4, broadcast DECLINE messages */ - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - 800bf40: 4b16 ldr r3, [pc, #88] ; (800bf9c ) - 800bf42: 6818 ldr r0, [r3, #0] - 800bf44: 68fb ldr r3, [r7, #12] - 800bf46: 68d9 ldr r1, [r3, #12] - 800bf48: 4b15 ldr r3, [pc, #84] ; (800bfa0 ) - 800bf4a: 9301 str r3, [sp, #4] - 800bf4c: 687b ldr r3, [r7, #4] - 800bf4e: 9300 str r3, [sp, #0] - 800bf50: 2343 movs r3, #67 ; 0x43 - 800bf52: 4a14 ldr r2, [pc, #80] ; (800bfa4 ) - 800bf54: f7ff f9fa bl 800b34c - dhcp_delete_msg(dhcp); - 800bf58: 68f8 ldr r0, [r7, #12] - 800bf5a: f001 f9d7 bl 800d30c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_decline: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - 800bf5e: 68fb ldr r3, [r7, #12] - 800bf60: 7a9b ldrb r3, [r3, #10] - 800bf62: 2bff cmp r3, #255 ; 0xff - 800bf64: d005 beq.n 800bf72 - dhcp->tries++; - 800bf66: 68fb ldr r3, [r7, #12] - 800bf68: 7a9b ldrb r3, [r3, #10] - 800bf6a: 3301 adds r3, #1 - 800bf6c: b2da uxtb r2, r3 - 800bf6e: 68fb ldr r3, [r7, #12] - 800bf70: 729a strb r2, [r3, #10] - } - msecs = 10*1000; - 800bf72: f242 7310 movw r3, #10000 ; 0x2710 - 800bf76: 813b strh r3, [r7, #8] - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - 800bf78: 893b ldrh r3, [r7, #8] - 800bf7a: f203 13f3 addw r3, r3, #499 ; 0x1f3 - 800bf7e: 4a0a ldr r2, [pc, #40] ; (800bfa8 ) - 800bf80: fb82 1203 smull r1, r2, r2, r3 - 800bf84: 1152 asrs r2, r2, #5 - 800bf86: 17db asrs r3, r3, #31 - 800bf88: 1ad3 subs r3, r2, r3 - 800bf8a: b29a uxth r2, r3 - 800bf8c: 68fb ldr r3, [r7, #12] - 800bf8e: 82da strh r2, [r3, #22] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); - return result; - 800bf90: f997 300b ldrsb.w r3, [r7, #11] -} - 800bf94: 4618 mov r0, r3 - 800bf96: 3710 adds r7, #16 - 800bf98: 46bd mov sp, r7 - 800bf9a: bd80 pop {r7, pc} - 800bf9c: 20006dec .word 0x20006dec - 800bfa0: 08012bb8 .word 0x08012bb8 - 800bfa4: 08012bbc .word 0x08012bbc - 800bfa8: 10624dd3 .word 0x10624dd3 - -0800bfac : - * - * @param netif the netif under DHCP control - */ -static err_t -dhcp_discover(struct netif *netif) -{ - 800bfac: b580 push {r7, lr} - 800bfae: b088 sub sp, #32 - 800bfb0: af02 add r7, sp, #8 - 800bfb2: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800bfb4: 687b ldr r3, [r7, #4] - 800bfb6: 6a5b ldr r3, [r3, #36] ; 0x24 - 800bfb8: 613b str r3, [r7, #16] - err_t result = ERR_OK; - 800bfba: 2300 movs r3, #0 - 800bfbc: 73fb strb r3, [r7, #15] - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); - ip4_addr_set_any(&dhcp->offered_ip_addr); - 800bfbe: 693b ldr r3, [r7, #16] - 800bfc0: 2200 movs r2, #0 - 800bfc2: 629a str r2, [r3, #40] ; 0x28 - dhcp_set_state(dhcp, DHCP_STATE_SELECTING); - 800bfc4: 2106 movs r1, #6 - 800bfc6: 6938 ldr r0, [r7, #16] - 800bfc8: f000 fbb6 bl 800c738 - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); - 800bfcc: 2201 movs r2, #1 - 800bfce: 6939 ldr r1, [r7, #16] - 800bfd0: 6878 ldr r0, [r7, #4] - 800bfd2: f001 f839 bl 800d048 - 800bfd6: 4603 mov r3, r0 - 800bfd8: 73fb strb r3, [r7, #15] - if (result == ERR_OK) { - 800bfda: f997 300f ldrsb.w r3, [r7, #15] - 800bfde: 2b00 cmp r3, #0 - 800bfe0: d13b bne.n 800c05a - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n")); - - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - 800bfe2: 2202 movs r2, #2 - 800bfe4: 2139 movs r1, #57 ; 0x39 - 800bfe6: 6938 ldr r0, [r7, #16] - 800bfe8: f000 fbc0 bl 800c76c - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - 800bfec: 687b ldr r3, [r7, #4] - 800bfee: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800bff0: 4619 mov r1, r3 - 800bff2: 6938 ldr r0, [r7, #16] - 800bff4: f000 fc1c bl 800c830 - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - 800bff8: 2203 movs r2, #3 - 800bffa: 2137 movs r1, #55 ; 0x37 - 800bffc: 6938 ldr r0, [r7, #16] - 800bffe: f000 fbb5 bl 800c76c - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c002: 2300 movs r3, #0 - 800c004: 75fb strb r3, [r7, #23] - 800c006: e009 b.n 800c01c - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - 800c008: 7dfb ldrb r3, [r7, #23] - 800c00a: 4a29 ldr r2, [pc, #164] ; (800c0b0 ) - 800c00c: 5cd3 ldrb r3, [r2, r3] - 800c00e: 4619 mov r1, r3 - 800c010: 6938 ldr r0, [r7, #16] - 800c012: f000 fbe5 bl 800c7e0 - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c016: 7dfb ldrb r3, [r7, #23] - 800c018: 3301 adds r3, #1 - 800c01a: 75fb strb r3, [r7, #23] - 800c01c: 7dfb ldrb r3, [r7, #23] - 800c01e: 2b02 cmp r3, #2 - 800c020: d9f2 bls.n 800c008 - } - dhcp_option_trailer(dhcp); - 800c022: 6938 ldr r0, [r7, #16] - 800c024: f001 f9b4 bl 800d390 - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: realloc()ing\n")); - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - 800c028: 693b ldr r3, [r7, #16] - 800c02a: 68da ldr r2, [r3, #12] - 800c02c: 693b ldr r3, [r7, #16] - 800c02e: 8a9b ldrh r3, [r3, #20] - 800c030: 33f0 adds r3, #240 ; 0xf0 - 800c032: b29b uxth r3, r3 - 800c034: 4619 mov r1, r3 - 800c036: 4610 mov r0, r2 - 800c038: f7f9 ffae bl 8005f98 - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)\n")); - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - 800c03c: 4b1d ldr r3, [pc, #116] ; (800c0b4 ) - 800c03e: 6818 ldr r0, [r3, #0] - 800c040: 693b ldr r3, [r7, #16] - 800c042: 68d9 ldr r1, [r3, #12] - 800c044: 4b1c ldr r3, [pc, #112] ; (800c0b8 ) - 800c046: 9301 str r3, [sp, #4] - 800c048: 687b ldr r3, [r7, #4] - 800c04a: 9300 str r3, [sp, #0] - 800c04c: 2343 movs r3, #67 ; 0x43 - 800c04e: 4a1b ldr r2, [pc, #108] ; (800c0bc ) - 800c050: f7ff f97c bl 800b34c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); - dhcp_delete_msg(dhcp); - 800c054: 6938 ldr r0, [r7, #16] - 800c056: f001 f959 bl 800d30c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - 800c05a: 693b ldr r3, [r7, #16] - 800c05c: 7a9b ldrb r3, [r3, #10] - 800c05e: 2bff cmp r3, #255 ; 0xff - 800c060: d005 beq.n 800c06e - dhcp->tries++; - 800c062: 693b ldr r3, [r7, #16] - 800c064: 7a9b ldrb r3, [r3, #10] - 800c066: 3301 adds r3, #1 - 800c068: b2da uxtb r2, r3 - 800c06a: 693b ldr r3, [r7, #16] - 800c06c: 729a strb r2, [r3, #10] - if (dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; - autoip_start(netif); - } -#endif /* LWIP_DHCP_AUTOIP_COOP */ - msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; - 800c06e: 693b ldr r3, [r7, #16] - 800c070: 7a9b ldrb r3, [r3, #10] - 800c072: 2b05 cmp r3, #5 - 800c074: d807 bhi.n 800c086 - 800c076: 693b ldr r3, [r7, #16] - 800c078: 7a9b ldrb r3, [r3, #10] - 800c07a: 461a mov r2, r3 - 800c07c: f44f 737a mov.w r3, #1000 ; 0x3e8 - 800c080: 4093 lsls r3, r2 - 800c082: b29b uxth r3, r3 - 800c084: e001 b.n 800c08a - 800c086: f64e 2360 movw r3, #60000 ; 0xea60 - 800c08a: 81bb strh r3, [r7, #12] - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - 800c08c: 89bb ldrh r3, [r7, #12] - 800c08e: f203 13f3 addw r3, r3, #499 ; 0x1f3 - 800c092: 4a0b ldr r2, [pc, #44] ; (800c0c0 ) - 800c094: fb82 1203 smull r1, r2, r2, r3 - 800c098: 1152 asrs r2, r2, #5 - 800c09a: 17db asrs r3, r3, #31 - 800c09c: 1ad3 subs r3, r2, r3 - 800c09e: b29a uxth r2, r3 - 800c0a0: 693b ldr r3, [r7, #16] - 800c0a2: 82da strh r2, [r3, #22] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs)); - return result; - 800c0a4: f997 300f ldrsb.w r3, [r7, #15] -} - 800c0a8: 4618 mov r0, r3 - 800c0aa: 3718 adds r7, #24 - 800c0ac: 46bd mov sp, r7 - 800c0ae: bd80 pop {r7, pc} - 800c0b0: 20000014 .word 0x20000014 - 800c0b4: 20006dec .word 0x20006dec - 800c0b8: 08012bb8 .word 0x08012bb8 - 800c0bc: 08012bbc .word 0x08012bbc - 800c0c0: 10624dd3 .word 0x10624dd3 - -0800c0c4 : - * - * @param netif network interface to bind to the offered address - */ -static void -dhcp_bind(struct netif *netif) -{ - 800c0c4: b580 push {r7, lr} - 800c0c6: b088 sub sp, #32 - 800c0c8: af00 add r7, sp, #0 - 800c0ca: 6078 str r0, [r7, #4] - u32_t timeout; - struct dhcp *dhcp; - ip4_addr_t sn_mask, gw_addr; - LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); - 800c0cc: 687b ldr r3, [r7, #4] - 800c0ce: 2b00 cmp r3, #0 - 800c0d0: d107 bne.n 800c0e2 - 800c0d2: 4b64 ldr r3, [pc, #400] ; (800c264 ) - 800c0d4: f240 32fe movw r2, #1022 ; 0x3fe - 800c0d8: 4963 ldr r1, [pc, #396] ; (800c268 ) - 800c0da: 4864 ldr r0, [pc, #400] ; (800c26c ) - 800c0dc: f003 fcf2 bl 800fac4 - 800c0e0: e0bc b.n 800c25c - dhcp = netif_dhcp_data(netif); - 800c0e2: 687b ldr r3, [r7, #4] - 800c0e4: 6a5b ldr r3, [r3, #36] ; 0x24 - 800c0e6: 61bb str r3, [r7, #24] - LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); - 800c0e8: 69bb ldr r3, [r7, #24] - 800c0ea: 2b00 cmp r3, #0 - 800c0ec: d107 bne.n 800c0fe - 800c0ee: 4b5d ldr r3, [pc, #372] ; (800c264 ) - 800c0f0: f44f 6280 mov.w r2, #1024 ; 0x400 - 800c0f4: 495e ldr r1, [pc, #376] ; (800c270 ) - 800c0f6: 485d ldr r0, [pc, #372] ; (800c26c ) - 800c0f8: f003 fce4 bl 800fac4 - 800c0fc: e0ae b.n 800c25c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - - /* reset time used of lease */ - dhcp->lease_used = 0; - 800c0fe: 69bb ldr r3, [r7, #24] - 800c100: 2200 movs r2, #0 - 800c102: 841a strh r2, [r3, #32] - - if (dhcp->offered_t0_lease != 0xffffffffUL) { - 800c104: 69bb ldr r3, [r7, #24] - 800c106: 6b5b ldr r3, [r3, #52] ; 0x34 - 800c108: f1b3 3fff cmp.w r3, #4294967295 - 800c10c: d019 beq.n 800c142 - /* set renewal period timer */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease)); - timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; - 800c10e: 69bb ldr r3, [r7, #24] - 800c110: 6b5b ldr r3, [r3, #52] ; 0x34 - 800c112: 331e adds r3, #30 - 800c114: 4a57 ldr r2, [pc, #348] ; (800c274 ) - 800c116: fba2 2303 umull r2, r3, r2, r3 - 800c11a: 095b lsrs r3, r3, #5 - 800c11c: 61fb str r3, [r7, #28] - if (timeout > 0xffff) { - 800c11e: 69fb ldr r3, [r7, #28] - 800c120: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 800c124: d302 bcc.n 800c12c - timeout = 0xffff; - 800c126: f64f 73ff movw r3, #65535 ; 0xffff - 800c12a: 61fb str r3, [r7, #28] - } - dhcp->t0_timeout = (u16_t)timeout; - 800c12c: 69fb ldr r3, [r7, #28] - 800c12e: b29a uxth r2, r3 - 800c130: 69bb ldr r3, [r7, #24] - 800c132: 845a strh r2, [r3, #34] ; 0x22 - if (dhcp->t0_timeout == 0) { - 800c134: 69bb ldr r3, [r7, #24] - 800c136: 8c5b ldrh r3, [r3, #34] ; 0x22 - 800c138: 2b00 cmp r3, #0 - 800c13a: d102 bne.n 800c142 - dhcp->t0_timeout = 1; - 800c13c: 69bb ldr r3, [r7, #24] - 800c13e: 2201 movs r2, #1 - 800c140: 845a strh r2, [r3, #34] ; 0x22 - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease*1000)); - } - - /* temporary DHCP lease? */ - if (dhcp->offered_t1_renew != 0xffffffffUL) { - 800c142: 69bb ldr r3, [r7, #24] - 800c144: 6b9b ldr r3, [r3, #56] ; 0x38 - 800c146: f1b3 3fff cmp.w r3, #4294967295 - 800c14a: d01d beq.n 800c188 - /* set renewal period timer */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew)); - timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; - 800c14c: 69bb ldr r3, [r7, #24] - 800c14e: 6b9b ldr r3, [r3, #56] ; 0x38 - 800c150: 331e adds r3, #30 - 800c152: 4a48 ldr r2, [pc, #288] ; (800c274 ) - 800c154: fba2 2303 umull r2, r3, r2, r3 - 800c158: 095b lsrs r3, r3, #5 - 800c15a: 61fb str r3, [r7, #28] - if (timeout > 0xffff) { - 800c15c: 69fb ldr r3, [r7, #28] - 800c15e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 800c162: d302 bcc.n 800c16a - timeout = 0xffff; - 800c164: f64f 73ff movw r3, #65535 ; 0xffff - 800c168: 61fb str r3, [r7, #28] - } - dhcp->t1_timeout = (u16_t)timeout; - 800c16a: 69fb ldr r3, [r7, #28] - 800c16c: b29a uxth r2, r3 - 800c16e: 69bb ldr r3, [r7, #24] - 800c170: 831a strh r2, [r3, #24] - if (dhcp->t1_timeout == 0) { - 800c172: 69bb ldr r3, [r7, #24] - 800c174: 8b1b ldrh r3, [r3, #24] - 800c176: 2b00 cmp r3, #0 - 800c178: d102 bne.n 800c180 - dhcp->t1_timeout = 1; - 800c17a: 69bb ldr r3, [r7, #24] - 800c17c: 2201 movs r2, #1 - 800c17e: 831a strh r2, [r3, #24] - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew*1000)); - dhcp->t1_renew_time = dhcp->t1_timeout; - 800c180: 69bb ldr r3, [r7, #24] - 800c182: 8b1a ldrh r2, [r3, #24] - 800c184: 69bb ldr r3, [r7, #24] - 800c186: 839a strh r2, [r3, #28] - } - /* set renewal period timer */ - if (dhcp->offered_t2_rebind != 0xffffffffUL) { - 800c188: 69bb ldr r3, [r7, #24] - 800c18a: 6bdb ldr r3, [r3, #60] ; 0x3c - 800c18c: f1b3 3fff cmp.w r3, #4294967295 - 800c190: d01d beq.n 800c1ce - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind)); - timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; - 800c192: 69bb ldr r3, [r7, #24] - 800c194: 6bdb ldr r3, [r3, #60] ; 0x3c - 800c196: 331e adds r3, #30 - 800c198: 4a36 ldr r2, [pc, #216] ; (800c274 ) - 800c19a: fba2 2303 umull r2, r3, r2, r3 - 800c19e: 095b lsrs r3, r3, #5 - 800c1a0: 61fb str r3, [r7, #28] - if (timeout > 0xffff) { - 800c1a2: 69fb ldr r3, [r7, #28] - 800c1a4: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 800c1a8: d302 bcc.n 800c1b0 - timeout = 0xffff; - 800c1aa: f64f 73ff movw r3, #65535 ; 0xffff - 800c1ae: 61fb str r3, [r7, #28] - } - dhcp->t2_timeout = (u16_t)timeout; - 800c1b0: 69fb ldr r3, [r7, #28] - 800c1b2: b29a uxth r2, r3 - 800c1b4: 69bb ldr r3, [r7, #24] - 800c1b6: 835a strh r2, [r3, #26] - if (dhcp->t2_timeout == 0) { - 800c1b8: 69bb ldr r3, [r7, #24] - 800c1ba: 8b5b ldrh r3, [r3, #26] - 800c1bc: 2b00 cmp r3, #0 - 800c1be: d102 bne.n 800c1c6 - dhcp->t2_timeout = 1; - 800c1c0: 69bb ldr r3, [r7, #24] - 800c1c2: 2201 movs r2, #1 - 800c1c4: 835a strh r2, [r3, #26] - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind*1000)); - dhcp->t2_rebind_time = dhcp->t2_timeout; - 800c1c6: 69bb ldr r3, [r7, #24] - 800c1c8: 8b5a ldrh r2, [r3, #26] - 800c1ca: 69bb ldr r3, [r7, #24] - 800c1cc: 83da strh r2, [r3, #30] - } - - /* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */ - if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) { - 800c1ce: 69bb ldr r3, [r7, #24] - 800c1d0: 8b1a ldrh r2, [r3, #24] - 800c1d2: 69bb ldr r3, [r7, #24] - 800c1d4: 8b5b ldrh r3, [r3, #26] - 800c1d6: 429a cmp r2, r3 - 800c1d8: d306 bcc.n 800c1e8 - 800c1da: 69bb ldr r3, [r7, #24] - 800c1dc: 8b5b ldrh r3, [r3, #26] - 800c1de: 2b00 cmp r3, #0 - 800c1e0: d002 beq.n 800c1e8 - dhcp->t1_timeout = 0; - 800c1e2: 69bb ldr r3, [r7, #24] - 800c1e4: 2200 movs r2, #0 - 800c1e6: 831a strh r2, [r3, #24] - } - - if (dhcp->subnet_mask_given) { - 800c1e8: 69bb ldr r3, [r7, #24] - 800c1ea: 7adb ldrb r3, [r3, #11] - 800c1ec: 2b00 cmp r3, #0 - 800c1ee: d003 beq.n 800c1f8 - /* copy offered network mask */ - ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); - 800c1f0: 69bb ldr r3, [r7, #24] - 800c1f2: 6adb ldr r3, [r3, #44] ; 0x2c - 800c1f4: 613b str r3, [r7, #16] - 800c1f6: e014 b.n 800c222 - } else { - /* subnet mask not given, choose a safe subnet mask given the network class */ - u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); - 800c1f8: 69bb ldr r3, [r7, #24] - 800c1fa: 3328 adds r3, #40 ; 0x28 - 800c1fc: 781b ldrb r3, [r3, #0] - 800c1fe: 75fb strb r3, [r7, #23] - if (first_octet <= 127) { - 800c200: f997 3017 ldrsb.w r3, [r7, #23] - 800c204: 2b00 cmp r3, #0 - 800c206: db02 blt.n 800c20e - ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); - 800c208: 23ff movs r3, #255 ; 0xff - 800c20a: 613b str r3, [r7, #16] - 800c20c: e009 b.n 800c222 - } else if (first_octet >= 192) { - 800c20e: 7dfb ldrb r3, [r7, #23] - 800c210: 2bbf cmp r3, #191 ; 0xbf - 800c212: d903 bls.n 800c21c - ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); - 800c214: f06f 437f mvn.w r3, #4278190080 ; 0xff000000 - 800c218: 613b str r3, [r7, #16] - 800c21a: e002 b.n 800c222 - } else { - ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); - 800c21c: f64f 73ff movw r3, #65535 ; 0xffff - 800c220: 613b str r3, [r7, #16] - } - } - - ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); - 800c222: 69bb ldr r3, [r7, #24] - 800c224: 6b1b ldr r3, [r3, #48] ; 0x30 - 800c226: 60fb str r3, [r7, #12] - /* gateway address not given? */ - if (ip4_addr_isany_val(gw_addr)) { - 800c228: 68fb ldr r3, [r7, #12] - 800c22a: 2b00 cmp r3, #0 - 800c22c: d108 bne.n 800c240 - /* copy network address */ - ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); - 800c22e: 69bb ldr r3, [r7, #24] - 800c230: 6a9a ldr r2, [r3, #40] ; 0x28 - 800c232: 693b ldr r3, [r7, #16] - 800c234: 4013 ands r3, r2 - 800c236: 60fb str r3, [r7, #12] - /* use first host address on network as gateway */ - ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL)); - 800c238: 68fb ldr r3, [r7, #12] - 800c23a: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 - 800c23e: 60fb str r3, [r7, #12] - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F" SN: 0x%08"X32_F" GW: 0x%08"X32_F"\n", - ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr))); - /* netif is now bound to DHCP leased address - set this before assigning the address - to ensure the callback can use dhcp_supplied_address() */ - dhcp_set_state(dhcp, DHCP_STATE_BOUND); - 800c240: 210a movs r1, #10 - 800c242: 69b8 ldr r0, [r7, #24] - 800c244: f000 fa78 bl 800c738 - - netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); - 800c248: 69bb ldr r3, [r7, #24] - 800c24a: f103 0128 add.w r1, r3, #40 ; 0x28 - 800c24e: f107 030c add.w r3, r7, #12 - 800c252: f107 0210 add.w r2, r7, #16 - 800c256: 6878 ldr r0, [r7, #4] - 800c258: f7f9 fb80 bl 800595c - /* interface is used by routing now that an address is set */ -} - 800c25c: 3720 adds r7, #32 - 800c25e: 46bd mov sp, r7 - 800c260: bd80 pop {r7, pc} - 800c262: bf00 nop - 800c264: 08011f44 .word 0x08011f44 - 800c268: 08012084 .word 0x08012084 - 800c26c: 08011fa4 .word 0x08011fa4 - 800c270: 080120a0 .word 0x080120a0 - 800c274: 88888889 .word 0x88888889 - -0800c278 : - * - * @param netif network interface which must renew its lease - */ -err_t -dhcp_renew(struct netif *netif) -{ - 800c278: b580 push {r7, lr} - 800c27a: b088 sub sp, #32 - 800c27c: af02 add r7, sp, #8 - 800c27e: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800c280: 687b ldr r3, [r7, #4] - 800c282: 6a5b ldr r3, [r3, #36] ; 0x24 - 800c284: 613b str r3, [r7, #16] - err_t result; - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); - dhcp_set_state(dhcp, DHCP_STATE_RENEWING); - 800c286: 2105 movs r1, #5 - 800c288: 6938 ldr r0, [r7, #16] - 800c28a: f000 fa55 bl 800c738 - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - 800c28e: 2203 movs r2, #3 - 800c290: 6939 ldr r1, [r7, #16] - 800c292: 6878 ldr r0, [r7, #4] - 800c294: f000 fed8 bl 800d048 - 800c298: 4603 mov r3, r0 - 800c29a: 73fb strb r3, [r7, #15] - if (result == ERR_OK) { - 800c29c: f997 300f ldrsb.w r3, [r7, #15] - 800c2a0: 2b00 cmp r3, #0 - 800c2a2: d13b bne.n 800c31c - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - 800c2a4: 2202 movs r2, #2 - 800c2a6: 2139 movs r1, #57 ; 0x39 - 800c2a8: 6938 ldr r0, [r7, #16] - 800c2aa: f000 fa5f bl 800c76c - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - 800c2ae: 687b ldr r3, [r7, #4] - 800c2b0: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800c2b2: 4619 mov r1, r3 - 800c2b4: 6938 ldr r0, [r7, #16] - 800c2b6: f000 fabb bl 800c830 - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - 800c2ba: 2203 movs r2, #3 - 800c2bc: 2137 movs r1, #55 ; 0x37 - 800c2be: 6938 ldr r0, [r7, #16] - 800c2c0: f000 fa54 bl 800c76c - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c2c4: 2300 movs r3, #0 - 800c2c6: 75fb strb r3, [r7, #23] - 800c2c8: e009 b.n 800c2de - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - 800c2ca: 7dfb ldrb r3, [r7, #23] - 800c2cc: 4a2a ldr r2, [pc, #168] ; (800c378 ) - 800c2ce: 5cd3 ldrb r3, [r2, r3] - 800c2d0: 4619 mov r1, r3 - 800c2d2: 6938 ldr r0, [r7, #16] - 800c2d4: f000 fa84 bl 800c7e0 - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c2d8: 7dfb ldrb r3, [r7, #23] - 800c2da: 3301 adds r3, #1 - 800c2dc: 75fb strb r3, [r7, #23] - 800c2de: 7dfb ldrb r3, [r7, #23] - 800c2e0: 2b02 cmp r3, #2 - 800c2e2: d9f2 bls.n 800c2ca -#if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); -#endif /* LWIP_NETIF_HOSTNAME */ - - /* append DHCP message trailer */ - dhcp_option_trailer(dhcp); - 800c2e4: 6938 ldr r0, [r7, #16] - 800c2e6: f001 f853 bl 800d390 - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - 800c2ea: 693b ldr r3, [r7, #16] - 800c2ec: 68da ldr r2, [r3, #12] - 800c2ee: 693b ldr r3, [r7, #16] - 800c2f0: 8a9b ldrh r3, [r3, #20] - 800c2f2: 33f0 adds r3, #240 ; 0xf0 - 800c2f4: b29b uxth r3, r3 - 800c2f6: 4619 mov r1, r3 - 800c2f8: 4610 mov r0, r2 - 800c2fa: f7f9 fe4d bl 8005f98 - - udp_sendto_if(dhcp_pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); - 800c2fe: 4b1f ldr r3, [pc, #124] ; (800c37c ) - 800c300: 6818 ldr r0, [r3, #0] - 800c302: 693b ldr r3, [r7, #16] - 800c304: 68d9 ldr r1, [r3, #12] - 800c306: 693b ldr r3, [r7, #16] - 800c308: f103 0224 add.w r2, r3, #36 ; 0x24 - 800c30c: 687b ldr r3, [r7, #4] - 800c30e: 9300 str r3, [sp, #0] - 800c310: 2343 movs r3, #67 ; 0x43 - 800c312: f7fe ffdd bl 800b2d0 - dhcp_delete_msg(dhcp); - 800c316: 6938 ldr r0, [r7, #16] - 800c318: f000 fff8 bl 800d30c - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - 800c31c: 693b ldr r3, [r7, #16] - 800c31e: 7a9b ldrb r3, [r3, #10] - 800c320: 2bff cmp r3, #255 ; 0xff - 800c322: d005 beq.n 800c330 - dhcp->tries++; - 800c324: 693b ldr r3, [r7, #16] - 800c326: 7a9b ldrb r3, [r3, #10] - 800c328: 3301 adds r3, #1 - 800c32a: b2da uxtb r2, r3 - 800c32c: 693b ldr r3, [r7, #16] - 800c32e: 729a strb r2, [r3, #10] - } - /* back-off on retries, but to a maximum of 20 seconds */ - msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; - 800c330: 693b ldr r3, [r7, #16] - 800c332: 7a9b ldrb r3, [r3, #10] - 800c334: 2b09 cmp r3, #9 - 800c336: d80a bhi.n 800c34e - 800c338: 693b ldr r3, [r7, #16] - 800c33a: 7a9b ldrb r3, [r3, #10] - 800c33c: b29b uxth r3, r3 - 800c33e: 461a mov r2, r3 - 800c340: 0152 lsls r2, r2, #5 - 800c342: 1ad2 subs r2, r2, r3 - 800c344: 0092 lsls r2, r2, #2 - 800c346: 4413 add r3, r2 - 800c348: 011b lsls r3, r3, #4 - 800c34a: b29b uxth r3, r3 - 800c34c: e001 b.n 800c352 - 800c34e: f644 6320 movw r3, #20000 ; 0x4e20 - 800c352: 81bb strh r3, [r7, #12] - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - 800c354: 89bb ldrh r3, [r7, #12] - 800c356: f203 13f3 addw r3, r3, #499 ; 0x1f3 - 800c35a: 4a09 ldr r2, [pc, #36] ; (800c380 ) - 800c35c: fb82 1203 smull r1, r2, r2, r3 - 800c360: 1152 asrs r2, r2, #5 - 800c362: 17db asrs r3, r3, #31 - 800c364: 1ad3 subs r3, r2, r3 - 800c366: b29a uxth r2, r3 - 800c368: 693b ldr r3, [r7, #16] - 800c36a: 82da strh r2, [r3, #22] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs)); - return result; - 800c36c: f997 300f ldrsb.w r3, [r7, #15] -} - 800c370: 4618 mov r0, r3 - 800c372: 3718 adds r7, #24 - 800c374: 46bd mov sp, r7 - 800c376: bd80 pop {r7, pc} - 800c378: 20000014 .word 0x20000014 - 800c37c: 20006dec .word 0x20006dec - 800c380: 10624dd3 .word 0x10624dd3 - -0800c384 : - * - * @param netif network interface which must rebind with a DHCP server - */ -static err_t -dhcp_rebind(struct netif *netif) -{ - 800c384: b580 push {r7, lr} - 800c386: b088 sub sp, #32 - 800c388: af02 add r7, sp, #8 - 800c38a: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800c38c: 687b ldr r3, [r7, #4] - 800c38e: 6a5b ldr r3, [r3, #36] ; 0x24 - 800c390: 613b str r3, [r7, #16] - err_t result; - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n")); - dhcp_set_state(dhcp, DHCP_STATE_REBINDING); - 800c392: 2104 movs r1, #4 - 800c394: 6938 ldr r0, [r7, #16] - 800c396: f000 f9cf bl 800c738 - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - 800c39a: 2203 movs r2, #3 - 800c39c: 6939 ldr r1, [r7, #16] - 800c39e: 6878 ldr r0, [r7, #4] - 800c3a0: f000 fe52 bl 800d048 - 800c3a4: 4603 mov r3, r0 - 800c3a6: 73fb strb r3, [r7, #15] - if (result == ERR_OK) { - 800c3a8: f997 300f ldrsb.w r3, [r7, #15] - 800c3ac: 2b00 cmp r3, #0 - 800c3ae: d139 bne.n 800c424 - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - 800c3b0: 2202 movs r2, #2 - 800c3b2: 2139 movs r1, #57 ; 0x39 - 800c3b4: 6938 ldr r0, [r7, #16] - 800c3b6: f000 f9d9 bl 800c76c - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - 800c3ba: 687b ldr r3, [r7, #4] - 800c3bc: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800c3be: 4619 mov r1, r3 - 800c3c0: 6938 ldr r0, [r7, #16] - 800c3c2: f000 fa35 bl 800c830 - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - 800c3c6: 2203 movs r2, #3 - 800c3c8: 2137 movs r1, #55 ; 0x37 - 800c3ca: 6938 ldr r0, [r7, #16] - 800c3cc: f000 f9ce bl 800c76c - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c3d0: 2300 movs r3, #0 - 800c3d2: 75fb strb r3, [r7, #23] - 800c3d4: e009 b.n 800c3ea - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - 800c3d6: 7dfb ldrb r3, [r7, #23] - 800c3d8: 4a29 ldr r2, [pc, #164] ; (800c480 ) - 800c3da: 5cd3 ldrb r3, [r2, r3] - 800c3dc: 4619 mov r1, r3 - 800c3de: 6938 ldr r0, [r7, #16] - 800c3e0: f000 f9fe bl 800c7e0 - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c3e4: 7dfb ldrb r3, [r7, #23] - 800c3e6: 3301 adds r3, #1 - 800c3e8: 75fb strb r3, [r7, #23] - 800c3ea: 7dfb ldrb r3, [r7, #23] - 800c3ec: 2b02 cmp r3, #2 - 800c3ee: d9f2 bls.n 800c3d6 - -#if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); -#endif /* LWIP_NETIF_HOSTNAME */ - - dhcp_option_trailer(dhcp); - 800c3f0: 6938 ldr r0, [r7, #16] - 800c3f2: f000 ffcd bl 800d390 - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - 800c3f6: 693b ldr r3, [r7, #16] - 800c3f8: 68da ldr r2, [r3, #12] - 800c3fa: 693b ldr r3, [r7, #16] - 800c3fc: 8a9b ldrh r3, [r3, #20] - 800c3fe: 33f0 adds r3, #240 ; 0xf0 - 800c400: b29b uxth r3, r3 - 800c402: 4619 mov r1, r3 - 800c404: 4610 mov r0, r2 - 800c406: f7f9 fdc7 bl 8005f98 - - /* broadcast to server */ - udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); - 800c40a: 4b1e ldr r3, [pc, #120] ; (800c484 ) - 800c40c: 6818 ldr r0, [r3, #0] - 800c40e: 693b ldr r3, [r7, #16] - 800c410: 68d9 ldr r1, [r3, #12] - 800c412: 687b ldr r3, [r7, #4] - 800c414: 9300 str r3, [sp, #0] - 800c416: 2343 movs r3, #67 ; 0x43 - 800c418: 4a1b ldr r2, [pc, #108] ; (800c488 ) - 800c41a: f7fe ff59 bl 800b2d0 - dhcp_delete_msg(dhcp); - 800c41e: 6938 ldr r0, [r7, #16] - 800c420: f000 ff74 bl 800d30c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - 800c424: 693b ldr r3, [r7, #16] - 800c426: 7a9b ldrb r3, [r3, #10] - 800c428: 2bff cmp r3, #255 ; 0xff - 800c42a: d005 beq.n 800c438 - dhcp->tries++; - 800c42c: 693b ldr r3, [r7, #16] - 800c42e: 7a9b ldrb r3, [r3, #10] - 800c430: 3301 adds r3, #1 - 800c432: b2da uxtb r2, r3 - 800c434: 693b ldr r3, [r7, #16] - 800c436: 729a strb r2, [r3, #10] - } - msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; - 800c438: 693b ldr r3, [r7, #16] - 800c43a: 7a9b ldrb r3, [r3, #10] - 800c43c: 2b09 cmp r3, #9 - 800c43e: d80a bhi.n 800c456 - 800c440: 693b ldr r3, [r7, #16] - 800c442: 7a9b ldrb r3, [r3, #10] - 800c444: b29b uxth r3, r3 - 800c446: 461a mov r2, r3 - 800c448: 0152 lsls r2, r2, #5 - 800c44a: 1ad2 subs r2, r2, r3 - 800c44c: 0092 lsls r2, r2, #2 - 800c44e: 4413 add r3, r2 - 800c450: 00db lsls r3, r3, #3 - 800c452: b29b uxth r3, r3 - 800c454: e001 b.n 800c45a - 800c456: f242 7310 movw r3, #10000 ; 0x2710 - 800c45a: 81bb strh r3, [r7, #12] - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - 800c45c: 89bb ldrh r3, [r7, #12] - 800c45e: f203 13f3 addw r3, r3, #499 ; 0x1f3 - 800c462: 4a0a ldr r2, [pc, #40] ; (800c48c ) - 800c464: fb82 1203 smull r1, r2, r2, r3 - 800c468: 1152 asrs r2, r2, #5 - 800c46a: 17db asrs r3, r3, #31 - 800c46c: 1ad3 subs r3, r2, r3 - 800c46e: b29a uxth r2, r3 - 800c470: 693b ldr r3, [r7, #16] - 800c472: 82da strh r2, [r3, #22] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs)); - return result; - 800c474: f997 300f ldrsb.w r3, [r7, #15] -} - 800c478: 4618 mov r0, r3 - 800c47a: 3718 adds r7, #24 - 800c47c: 46bd mov sp, r7 - 800c47e: bd80 pop {r7, pc} - 800c480: 20000014 .word 0x20000014 - 800c484: 20006dec .word 0x20006dec - 800c488: 08012bbc .word 0x08012bbc - 800c48c: 10624dd3 .word 0x10624dd3 - -0800c490 : - * - * @param netif network interface which must reboot - */ -static err_t -dhcp_reboot(struct netif *netif) -{ - 800c490: b580 push {r7, lr} - 800c492: b088 sub sp, #32 - 800c494: af02 add r7, sp, #8 - 800c496: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800c498: 687b ldr r3, [r7, #4] - 800c49a: 6a5b ldr r3, [r3, #36] ; 0x24 - 800c49c: 613b str r3, [r7, #16] - err_t result; - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); - dhcp_set_state(dhcp, DHCP_STATE_REBOOTING); - 800c49e: 2103 movs r1, #3 - 800c4a0: 6938 ldr r0, [r7, #16] - 800c4a2: f000 f949 bl 800c738 - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - 800c4a6: 2203 movs r2, #3 - 800c4a8: 6939 ldr r1, [r7, #16] - 800c4aa: 6878 ldr r0, [r7, #4] - 800c4ac: f000 fdcc bl 800d048 - 800c4b0: 4603 mov r3, r0 - 800c4b2: 73fb strb r3, [r7, #15] - if (result == ERR_OK) { - 800c4b4: f997 300f ldrsb.w r3, [r7, #15] - 800c4b8: 2b00 cmp r3, #0 - 800c4ba: d147 bne.n 800c54c - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - 800c4bc: 2202 movs r2, #2 - 800c4be: 2139 movs r1, #57 ; 0x39 - 800c4c0: 6938 ldr r0, [r7, #16] - 800c4c2: f000 f953 bl 800c76c - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN_MIN_REQUIRED); - 800c4c6: f44f 7110 mov.w r1, #576 ; 0x240 - 800c4ca: 6938 ldr r0, [r7, #16] - 800c4cc: f000 f9b0 bl 800c830 - - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - 800c4d0: 2204 movs r2, #4 - 800c4d2: 2132 movs r1, #50 ; 0x32 - 800c4d4: 6938 ldr r0, [r7, #16] - 800c4d6: f000 f949 bl 800c76c - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - 800c4da: 693b ldr r3, [r7, #16] - 800c4dc: 6a9b ldr r3, [r3, #40] ; 0x28 - 800c4de: 4618 mov r0, r3 - 800c4e0: f7f8 fdc6 bl 8005070 - 800c4e4: 4603 mov r3, r0 - 800c4e6: 4619 mov r1, r3 - 800c4e8: 6938 ldr r0, [r7, #16] - 800c4ea: f000 f9db bl 800c8a4 - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - 800c4ee: 2203 movs r2, #3 - 800c4f0: 2137 movs r1, #55 ; 0x37 - 800c4f2: 6938 ldr r0, [r7, #16] - 800c4f4: f000 f93a bl 800c76c - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c4f8: 2300 movs r3, #0 - 800c4fa: 75fb strb r3, [r7, #23] - 800c4fc: e009 b.n 800c512 - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - 800c4fe: 7dfb ldrb r3, [r7, #23] - 800c500: 4a29 ldr r2, [pc, #164] ; (800c5a8 ) - 800c502: 5cd3 ldrb r3, [r2, r3] - 800c504: 4619 mov r1, r3 - 800c506: 6938 ldr r0, [r7, #16] - 800c508: f000 f96a bl 800c7e0 - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - 800c50c: 7dfb ldrb r3, [r7, #23] - 800c50e: 3301 adds r3, #1 - 800c510: 75fb strb r3, [r7, #23] - 800c512: 7dfb ldrb r3, [r7, #23] - 800c514: 2b02 cmp r3, #2 - 800c516: d9f2 bls.n 800c4fe - } - - dhcp_option_trailer(dhcp); - 800c518: 6938 ldr r0, [r7, #16] - 800c51a: f000 ff39 bl 800d390 - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - 800c51e: 693b ldr r3, [r7, #16] - 800c520: 68da ldr r2, [r3, #12] - 800c522: 693b ldr r3, [r7, #16] - 800c524: 8a9b ldrh r3, [r3, #20] - 800c526: 33f0 adds r3, #240 ; 0xf0 - 800c528: b29b uxth r3, r3 - 800c52a: 4619 mov r1, r3 - 800c52c: 4610 mov r0, r2 - 800c52e: f7f9 fd33 bl 8005f98 - - /* broadcast to server */ - udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); - 800c532: 4b1e ldr r3, [pc, #120] ; (800c5ac ) - 800c534: 6818 ldr r0, [r3, #0] - 800c536: 693b ldr r3, [r7, #16] - 800c538: 68d9 ldr r1, [r3, #12] - 800c53a: 687b ldr r3, [r7, #4] - 800c53c: 9300 str r3, [sp, #0] - 800c53e: 2343 movs r3, #67 ; 0x43 - 800c540: 4a1b ldr r2, [pc, #108] ; (800c5b0 ) - 800c542: f7fe fec5 bl 800b2d0 - dhcp_delete_msg(dhcp); - 800c546: 6938 ldr r0, [r7, #16] - 800c548: f000 fee0 bl 800d30c - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - 800c54c: 693b ldr r3, [r7, #16] - 800c54e: 7a9b ldrb r3, [r3, #10] - 800c550: 2bff cmp r3, #255 ; 0xff - 800c552: d005 beq.n 800c560 - dhcp->tries++; - 800c554: 693b ldr r3, [r7, #16] - 800c556: 7a9b ldrb r3, [r3, #10] - 800c558: 3301 adds r3, #1 - 800c55a: b2da uxtb r2, r3 - 800c55c: 693b ldr r3, [r7, #16] - 800c55e: 729a strb r2, [r3, #10] - } - msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; - 800c560: 693b ldr r3, [r7, #16] - 800c562: 7a9b ldrb r3, [r3, #10] - 800c564: 2b09 cmp r3, #9 - 800c566: d80a bhi.n 800c57e - 800c568: 693b ldr r3, [r7, #16] - 800c56a: 7a9b ldrb r3, [r3, #10] - 800c56c: b29b uxth r3, r3 - 800c56e: 461a mov r2, r3 - 800c570: 0152 lsls r2, r2, #5 - 800c572: 1ad2 subs r2, r2, r3 - 800c574: 0092 lsls r2, r2, #2 - 800c576: 4413 add r3, r2 - 800c578: 00db lsls r3, r3, #3 - 800c57a: b29b uxth r3, r3 - 800c57c: e001 b.n 800c582 - 800c57e: f242 7310 movw r3, #10000 ; 0x2710 - 800c582: 81bb strh r3, [r7, #12] - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - 800c584: 89bb ldrh r3, [r7, #12] - 800c586: f203 13f3 addw r3, r3, #499 ; 0x1f3 - 800c58a: 4a0a ldr r2, [pc, #40] ; (800c5b4 ) - 800c58c: fb82 1203 smull r1, r2, r2, r3 - 800c590: 1152 asrs r2, r2, #5 - 800c592: 17db asrs r3, r3, #31 - 800c594: 1ad3 subs r3, r2, r3 - 800c596: b29a uxth r2, r3 - 800c598: 693b ldr r3, [r7, #16] - 800c59a: 82da strh r2, [r3, #22] - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs)); - return result; - 800c59c: f997 300f ldrsb.w r3, [r7, #15] -} - 800c5a0: 4618 mov r0, r3 - 800c5a2: 3718 adds r7, #24 - 800c5a4: 46bd mov sp, r7 - 800c5a6: bd80 pop {r7, pc} - 800c5a8: 20000014 .word 0x20000014 - 800c5ac: 20006dec .word 0x20006dec - 800c5b0: 08012bbc .word 0x08012bbc - 800c5b4: 10624dd3 .word 0x10624dd3 - -0800c5b8 : - * - * @param netif network interface which must release its lease - */ -err_t -dhcp_release(struct netif *netif) -{ - 800c5b8: b580 push {r7, lr} - 800c5ba: b088 sub sp, #32 - 800c5bc: af02 add r7, sp, #8 - 800c5be: 6078 str r0, [r7, #4] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800c5c0: 687b ldr r3, [r7, #4] - 800c5c2: 6a5b ldr r3, [r3, #36] ; 0x24 - 800c5c4: 617b str r3, [r7, #20] - err_t result; - ip_addr_t server_ip_addr; - u8_t is_dhcp_supplied_address; - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n")); - if (dhcp == NULL) { - 800c5c6: 697b ldr r3, [r7, #20] - 800c5c8: 2b00 cmp r3, #0 - 800c5ca: d102 bne.n 800c5d2 - return ERR_ARG; - 800c5cc: f06f 030f mvn.w r3, #15 - 800c5d0: e072 b.n 800c6b8 - } - ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); - 800c5d2: 697b ldr r3, [r7, #20] - 800c5d4: 6a5b ldr r3, [r3, #36] ; 0x24 - 800c5d6: 60fb str r3, [r7, #12] - - is_dhcp_supplied_address = dhcp_supplied_address(netif); - 800c5d8: 6878 ldr r0, [r7, #4] - 800c5da: f000 ff33 bl 800d444 - 800c5de: 4603 mov r3, r0 - 800c5e0: 74fb strb r3, [r7, #19] - - /* idle DHCP client */ - dhcp_set_state(dhcp, DHCP_STATE_OFF); - 800c5e2: 2100 movs r1, #0 - 800c5e4: 6978 ldr r0, [r7, #20] - 800c5e6: f000 f8a7 bl 800c738 - /* clean old DHCP offer */ - ip_addr_set_zero_ip4(&dhcp->server_ip_addr); - 800c5ea: 697b ldr r3, [r7, #20] - 800c5ec: 2200 movs r2, #0 - 800c5ee: 625a str r2, [r3, #36] ; 0x24 - ip4_addr_set_zero(&dhcp->offered_ip_addr); - 800c5f0: 697b ldr r3, [r7, #20] - 800c5f2: 2200 movs r2, #0 - 800c5f4: 629a str r2, [r3, #40] ; 0x28 - ip4_addr_set_zero(&dhcp->offered_sn_mask); - 800c5f6: 697b ldr r3, [r7, #20] - 800c5f8: 2200 movs r2, #0 - 800c5fa: 62da str r2, [r3, #44] ; 0x2c - ip4_addr_set_zero(&dhcp->offered_gw_addr); - 800c5fc: 697b ldr r3, [r7, #20] - 800c5fe: 2200 movs r2, #0 - 800c600: 631a str r2, [r3, #48] ; 0x30 -#if LWIP_DHCP_BOOTP_FILE - ip4_addr_set_zero(&dhcp->offered_si_addr); -#endif /* LWIP_DHCP_BOOTP_FILE */ - dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; - 800c602: 697b ldr r3, [r7, #20] - 800c604: 2200 movs r2, #0 - 800c606: 63da str r2, [r3, #60] ; 0x3c - 800c608: 697b ldr r3, [r7, #20] - 800c60a: 6bda ldr r2, [r3, #60] ; 0x3c - 800c60c: 697b ldr r3, [r7, #20] - 800c60e: 639a str r2, [r3, #56] ; 0x38 - 800c610: 697b ldr r3, [r7, #20] - 800c612: 6b9a ldr r2, [r3, #56] ; 0x38 - 800c614: 697b ldr r3, [r7, #20] - 800c616: 635a str r2, [r3, #52] ; 0x34 - dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; - 800c618: 697b ldr r3, [r7, #20] - 800c61a: 2200 movs r2, #0 - 800c61c: 845a strh r2, [r3, #34] ; 0x22 - 800c61e: 697b ldr r3, [r7, #20] - 800c620: 8c5a ldrh r2, [r3, #34] ; 0x22 - 800c622: 697b ldr r3, [r7, #20] - 800c624: 841a strh r2, [r3, #32] - 800c626: 697b ldr r3, [r7, #20] - 800c628: 8c1a ldrh r2, [r3, #32] - 800c62a: 697b ldr r3, [r7, #20] - 800c62c: 83da strh r2, [r3, #30] - 800c62e: 697b ldr r3, [r7, #20] - 800c630: 8bda ldrh r2, [r3, #30] - 800c632: 697b ldr r3, [r7, #20] - 800c634: 839a strh r2, [r3, #28] - - if (!is_dhcp_supplied_address) { - 800c636: 7cfb ldrb r3, [r7, #19] - 800c638: 2b00 cmp r3, #0 - 800c63a: d101 bne.n 800c640 - /* don't issue release message when address is not dhcp-assigned */ - return ERR_OK; - 800c63c: 2300 movs r3, #0 - 800c63e: e03b b.n 800c6b8 - } - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); - 800c640: 2207 movs r2, #7 - 800c642: 6979 ldr r1, [r7, #20] - 800c644: 6878 ldr r0, [r7, #4] - 800c646: f000 fcff bl 800d048 - 800c64a: 4603 mov r3, r0 - 800c64c: 74bb strb r3, [r7, #18] - if (result == ERR_OK) { - 800c64e: f997 3012 ldrsb.w r3, [r7, #18] - 800c652: 2b00 cmp r3, #0 - 800c654: d128 bne.n 800c6a8 - dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); - 800c656: 2204 movs r2, #4 - 800c658: 2136 movs r1, #54 ; 0x36 - 800c65a: 6978 ldr r0, [r7, #20] - 800c65c: f000 f886 bl 800c76c - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr)))); - 800c660: 68fb ldr r3, [r7, #12] - 800c662: 4618 mov r0, r3 - 800c664: f7f8 fd04 bl 8005070 - 800c668: 4603 mov r3, r0 - 800c66a: 4619 mov r1, r3 - 800c66c: 6978 ldr r0, [r7, #20] - 800c66e: f000 f919 bl 800c8a4 - - dhcp_option_trailer(dhcp); - 800c672: 6978 ldr r0, [r7, #20] - 800c674: f000 fe8c bl 800d390 - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - 800c678: 697b ldr r3, [r7, #20] - 800c67a: 68da ldr r2, [r3, #12] - 800c67c: 697b ldr r3, [r7, #20] - 800c67e: 8a9b ldrh r3, [r3, #20] - 800c680: 33f0 adds r3, #240 ; 0xf0 - 800c682: b29b uxth r3, r3 - 800c684: 4619 mov r1, r3 - 800c686: 4610 mov r0, r2 - 800c688: f7f9 fc86 bl 8005f98 - - udp_sendto_if(dhcp_pcb, dhcp->p_out, &server_ip_addr, DHCP_SERVER_PORT, netif); - 800c68c: 4b0c ldr r3, [pc, #48] ; (800c6c0 ) - 800c68e: 6818 ldr r0, [r3, #0] - 800c690: 697b ldr r3, [r7, #20] - 800c692: 68d9 ldr r1, [r3, #12] - 800c694: f107 020c add.w r2, r7, #12 - 800c698: 687b ldr r3, [r7, #4] - 800c69a: 9300 str r3, [sp, #0] - 800c69c: 2343 movs r3, #67 ; 0x43 - 800c69e: f7fe fe17 bl 800b2d0 - dhcp_delete_msg(dhcp); - 800c6a2: 6978 ldr r0, [r7, #20] - 800c6a4: f000 fe32 bl 800d30c - } else { - /* sending release failed, but that's not a problem since the correct behaviour of dhcp does not rely on release */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); - } - /* remove IP address from interface (prevents routing from selecting this interface) */ - netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); - 800c6a8: 4b06 ldr r3, [pc, #24] ; (800c6c4 ) - 800c6aa: 4a06 ldr r2, [pc, #24] ; (800c6c4 ) - 800c6ac: 4905 ldr r1, [pc, #20] ; (800c6c4 ) - 800c6ae: 6878 ldr r0, [r7, #4] - 800c6b0: f7f9 f954 bl 800595c - - return result; - 800c6b4: f997 3012 ldrsb.w r3, [r7, #18] -} - 800c6b8: 4618 mov r0, r3 - 800c6ba: 3718 adds r7, #24 - 800c6bc: 46bd mov sp, r7 - 800c6be: bd80 pop {r7, pc} - 800c6c0: 20006dec .word 0x20006dec - 800c6c4: 08012bb8 .word 0x08012bb8 - -0800c6c8 : - * - * @param netif The network interface to stop DHCP on - */ -void -dhcp_stop(struct netif *netif) -{ - 800c6c8: b580 push {r7, lr} - 800c6ca: b084 sub sp, #16 - 800c6cc: af00 add r7, sp, #0 - 800c6ce: 6078 str r0, [r7, #4] - struct dhcp *dhcp; - LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); - 800c6d0: 687b ldr r3, [r7, #4] - 800c6d2: 2b00 cmp r3, #0 - 800c6d4: d107 bne.n 800c6e6 - 800c6d6: 4b14 ldr r3, [pc, #80] ; (800c728 ) - 800c6d8: f240 5242 movw r2, #1346 ; 0x542 - 800c6dc: 4913 ldr r1, [pc, #76] ; (800c72c ) - 800c6de: 4814 ldr r0, [pc, #80] ; (800c730 ) - 800c6e0: f003 f9f0 bl 800fac4 - 800c6e4: e01d b.n 800c722 - dhcp = netif_dhcp_data(netif); - 800c6e6: 687b ldr r3, [r7, #4] - 800c6e8: 6a5b ldr r3, [r3, #36] ; 0x24 - 800c6ea: 60fb str r3, [r7, #12] - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); - /* netif is DHCP configured? */ - if (dhcp != NULL) { - 800c6ec: 68fb ldr r3, [r7, #12] - 800c6ee: 2b00 cmp r3, #0 - 800c6f0: d017 beq.n 800c722 - autoip_stop(netif); - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; - } -#endif /* LWIP_DHCP_AUTOIP_COOP */ - - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); - 800c6f2: 68fb ldr r3, [r7, #12] - 800c6f4: 685b ldr r3, [r3, #4] - 800c6f6: 2b00 cmp r3, #0 - 800c6f8: d006 beq.n 800c708 - 800c6fa: 4b0b ldr r3, [pc, #44] ; (800c728 ) - 800c6fc: f240 524f movw r2, #1359 ; 0x54f - 800c700: 490c ldr r1, [pc, #48] ; (800c734 ) - 800c702: 480b ldr r0, [pc, #44] ; (800c730 ) - 800c704: f003 f9de bl 800fac4 - dhcp_set_state(dhcp, DHCP_STATE_OFF); - 800c708: 2100 movs r1, #0 - 800c70a: 68f8 ldr r0, [r7, #12] - 800c70c: f000 f814 bl 800c738 - - if (dhcp->pcb_allocated != 0) { - 800c710: 68fb ldr r3, [r7, #12] - 800c712: 7a1b ldrb r3, [r3, #8] - 800c714: 2b00 cmp r3, #0 - 800c716: d004 beq.n 800c722 - dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ - 800c718: f7ff f854 bl 800b7c4 - dhcp->pcb_allocated = 0; - 800c71c: 68fb ldr r3, [r7, #12] - 800c71e: 2200 movs r2, #0 - 800c720: 721a strb r2, [r3, #8] - } - } -} - 800c722: 3710 adds r7, #16 - 800c724: 46bd mov sp, r7 - 800c726: bd80 pop {r7, pc} - 800c728: 08011f44 .word 0x08011f44 - 800c72c: 080120b8 .word 0x080120b8 - 800c730: 08011fa4 .word 0x08011fa4 - 800c734: 08012070 .word 0x08012070 - -0800c738 : - * - * If the state changed, reset the number of tries. - */ -static void -dhcp_set_state(struct dhcp *dhcp, u8_t new_state) -{ - 800c738: b480 push {r7} - 800c73a: b083 sub sp, #12 - 800c73c: af00 add r7, sp, #0 - 800c73e: 6078 str r0, [r7, #4] - 800c740: 460b mov r3, r1 - 800c742: 70fb strb r3, [r7, #3] - if (new_state != dhcp->state) { - 800c744: 687b ldr r3, [r7, #4] - 800c746: 7a5b ldrb r3, [r3, #9] - 800c748: 78fa ldrb r2, [r7, #3] - 800c74a: 429a cmp r2, r3 - 800c74c: d008 beq.n 800c760 - dhcp->state = new_state; - 800c74e: 687b ldr r3, [r7, #4] - 800c750: 78fa ldrb r2, [r7, #3] - 800c752: 725a strb r2, [r3, #9] - dhcp->tries = 0; - 800c754: 687b ldr r3, [r7, #4] - 800c756: 2200 movs r2, #0 - 800c758: 729a strb r2, [r3, #10] - dhcp->request_timeout = 0; - 800c75a: 687b ldr r3, [r7, #4] - 800c75c: 2200 movs r2, #0 - 800c75e: 82da strh r2, [r3, #22] - } -} - 800c760: bf00 nop - 800c762: 370c adds r7, #12 - 800c764: 46bd mov sp, r7 - 800c766: bc80 pop {r7} - 800c768: 4770 bx lr - ... - -0800c76c : - * DHCP message. - * - */ -static void -dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) -{ - 800c76c: b580 push {r7, lr} - 800c76e: b082 sub sp, #8 - 800c770: af00 add r7, sp, #0 - 800c772: 6078 str r0, [r7, #4] - 800c774: 460b mov r3, r1 - 800c776: 70fb strb r3, [r7, #3] - 800c778: 4613 mov r3, r2 - 800c77a: 70bb strb r3, [r7, #2] - LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); - 800c77c: 687b ldr r3, [r7, #4] - 800c77e: 8a9b ldrh r3, [r3, #20] - 800c780: 461a mov r2, r3 - 800c782: 78bb ldrb r3, [r7, #2] - 800c784: 4413 add r3, r2 - 800c786: 3302 adds r3, #2 - 800c788: 2b44 cmp r3, #68 ; 0x44 - 800c78a: d906 bls.n 800c79a - 800c78c: 4b11 ldr r3, [pc, #68] ; (800c7d4 ) - 800c78e: f44f 62ae mov.w r2, #1392 ; 0x570 - 800c792: 4911 ldr r1, [pc, #68] ; (800c7d8 ) - 800c794: 4811 ldr r0, [pc, #68] ; (800c7dc ) - 800c796: f003 f995 bl 800fac4 - dhcp->msg_out->options[dhcp->options_out_len++] = option_type; - 800c79a: 687b ldr r3, [r7, #4] - 800c79c: 691a ldr r2, [r3, #16] - 800c79e: 687b ldr r3, [r7, #4] - 800c7a0: 8a9b ldrh r3, [r3, #20] - 800c7a2: 1c59 adds r1, r3, #1 - 800c7a4: b288 uxth r0, r1 - 800c7a6: 6879 ldr r1, [r7, #4] - 800c7a8: 8288 strh r0, [r1, #20] - 800c7aa: 4413 add r3, r2 - 800c7ac: 78fa ldrb r2, [r7, #3] - 800c7ae: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - dhcp->msg_out->options[dhcp->options_out_len++] = option_len; - 800c7b2: 687b ldr r3, [r7, #4] - 800c7b4: 691a ldr r2, [r3, #16] - 800c7b6: 687b ldr r3, [r7, #4] - 800c7b8: 8a9b ldrh r3, [r3, #20] - 800c7ba: 1c59 adds r1, r3, #1 - 800c7bc: b288 uxth r0, r1 - 800c7be: 6879 ldr r1, [r7, #4] - 800c7c0: 8288 strh r0, [r1, #20] - 800c7c2: 4413 add r3, r2 - 800c7c4: 78ba ldrb r2, [r7, #2] - 800c7c6: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 -} - 800c7ca: bf00 nop - 800c7cc: 3708 adds r7, #8 - 800c7ce: 46bd mov sp, r7 - 800c7d0: bd80 pop {r7, pc} - 800c7d2: bf00 nop - 800c7d4: 08011f44 .word 0x08011f44 - 800c7d8: 080120d4 .word 0x080120d4 - 800c7dc: 08011fa4 .word 0x08011fa4 - -0800c7e0 : - * Concatenate a single byte to the outgoing DHCP message. - * - */ -static void -dhcp_option_byte(struct dhcp *dhcp, u8_t value) -{ - 800c7e0: b580 push {r7, lr} - 800c7e2: b082 sub sp, #8 - 800c7e4: af00 add r7, sp, #0 - 800c7e6: 6078 str r0, [r7, #4] - 800c7e8: 460b mov r3, r1 - 800c7ea: 70fb strb r3, [r7, #3] - LWIP_ASSERT("dhcp_option_byte: dhcp->options_out_len < DHCP_OPTIONS_LEN", dhcp->options_out_len < DHCP_OPTIONS_LEN); - 800c7ec: 687b ldr r3, [r7, #4] - 800c7ee: 8a9b ldrh r3, [r3, #20] - 800c7f0: 2b43 cmp r3, #67 ; 0x43 - 800c7f2: d906 bls.n 800c802 - 800c7f4: 4b0b ldr r3, [pc, #44] ; (800c824 ) - 800c7f6: f240 527b movw r2, #1403 ; 0x57b - 800c7fa: 490b ldr r1, [pc, #44] ; (800c828 ) - 800c7fc: 480b ldr r0, [pc, #44] ; (800c82c ) - 800c7fe: f003 f961 bl 800fac4 - dhcp->msg_out->options[dhcp->options_out_len++] = value; - 800c802: 687b ldr r3, [r7, #4] - 800c804: 691a ldr r2, [r3, #16] - 800c806: 687b ldr r3, [r7, #4] - 800c808: 8a9b ldrh r3, [r3, #20] - 800c80a: 1c59 adds r1, r3, #1 - 800c80c: b288 uxth r0, r1 - 800c80e: 6879 ldr r1, [r7, #4] - 800c810: 8288 strh r0, [r1, #20] - 800c812: 4413 add r3, r2 - 800c814: 78fa ldrb r2, [r7, #3] - 800c816: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 -} - 800c81a: bf00 nop - 800c81c: 3708 adds r7, #8 - 800c81e: 46bd mov sp, r7 - 800c820: bd80 pop {r7, pc} - 800c822: bf00 nop - 800c824: 08011f44 .word 0x08011f44 - 800c828: 0801211c .word 0x0801211c - 800c82c: 08011fa4 .word 0x08011fa4 - -0800c830 : - -static void -dhcp_option_short(struct dhcp *dhcp, u16_t value) -{ - 800c830: b590 push {r4, r7, lr} - 800c832: b083 sub sp, #12 - 800c834: af00 add r7, sp, #0 - 800c836: 6078 str r0, [r7, #4] - 800c838: 460b mov r3, r1 - 800c83a: 807b strh r3, [r7, #2] - LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); - 800c83c: 687b ldr r3, [r7, #4] - 800c83e: 8a9b ldrh r3, [r3, #20] - 800c840: 3302 adds r3, #2 - 800c842: 2b44 cmp r3, #68 ; 0x44 - 800c844: d906 bls.n 800c854 - 800c846: 4b14 ldr r3, [pc, #80] ; (800c898 ) - 800c848: f240 5282 movw r2, #1410 ; 0x582 - 800c84c: 4913 ldr r1, [pc, #76] ; (800c89c ) - 800c84e: 4814 ldr r0, [pc, #80] ; (800c8a0 ) - 800c850: f003 f938 bl 800fac4 - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); - 800c854: 887b ldrh r3, [r7, #2] - 800c856: 0a1b lsrs r3, r3, #8 - 800c858: b298 uxth r0, r3 - 800c85a: 687b ldr r3, [r7, #4] - 800c85c: 691a ldr r2, [r3, #16] - 800c85e: 687b ldr r3, [r7, #4] - 800c860: 8a9b ldrh r3, [r3, #20] - 800c862: 1c59 adds r1, r3, #1 - 800c864: b28c uxth r4, r1 - 800c866: 6879 ldr r1, [r7, #4] - 800c868: 828c strh r4, [r1, #20] - 800c86a: b2c1 uxtb r1, r0 - 800c86c: 4413 add r3, r2 - 800c86e: 460a mov r2, r1 - 800c870: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); - 800c874: 687b ldr r3, [r7, #4] - 800c876: 691a ldr r2, [r3, #16] - 800c878: 687b ldr r3, [r7, #4] - 800c87a: 8a9b ldrh r3, [r3, #20] - 800c87c: 1c59 adds r1, r3, #1 - 800c87e: b288 uxth r0, r1 - 800c880: 6879 ldr r1, [r7, #4] - 800c882: 8288 strh r0, [r1, #20] - 800c884: 8879 ldrh r1, [r7, #2] - 800c886: b2c9 uxtb r1, r1 - 800c888: 4413 add r3, r2 - 800c88a: 460a mov r2, r1 - 800c88c: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 -} - 800c890: bf00 nop - 800c892: 370c adds r7, #12 - 800c894: 46bd mov sp, r7 - 800c896: bd90 pop {r4, r7, pc} - 800c898: 08011f44 .word 0x08011f44 - 800c89c: 08012158 .word 0x08012158 - 800c8a0: 08011fa4 .word 0x08011fa4 - -0800c8a4 : - -static void -dhcp_option_long(struct dhcp *dhcp, u32_t value) -{ - 800c8a4: b590 push {r4, r7, lr} - 800c8a6: b083 sub sp, #12 - 800c8a8: af00 add r7, sp, #0 - 800c8aa: 6078 str r0, [r7, #4] - 800c8ac: 6039 str r1, [r7, #0] - LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); - 800c8ae: 687b ldr r3, [r7, #4] - 800c8b0: 8a9b ldrh r3, [r3, #20] - 800c8b2: 3304 adds r3, #4 - 800c8b4: 2b44 cmp r3, #68 ; 0x44 - 800c8b6: d906 bls.n 800c8c6 - 800c8b8: 4b22 ldr r3, [pc, #136] ; (800c944 ) - 800c8ba: f240 528a movw r2, #1418 ; 0x58a - 800c8be: 4922 ldr r1, [pc, #136] ; (800c948 ) - 800c8c0: 4822 ldr r0, [pc, #136] ; (800c94c ) - 800c8c2: f003 f8ff bl 800fac4 - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); - 800c8c6: 683b ldr r3, [r7, #0] - 800c8c8: 0e18 lsrs r0, r3, #24 - 800c8ca: 687b ldr r3, [r7, #4] - 800c8cc: 691a ldr r2, [r3, #16] - 800c8ce: 687b ldr r3, [r7, #4] - 800c8d0: 8a9b ldrh r3, [r3, #20] - 800c8d2: 1c59 adds r1, r3, #1 - 800c8d4: b28c uxth r4, r1 - 800c8d6: 6879 ldr r1, [r7, #4] - 800c8d8: 828c strh r4, [r1, #20] - 800c8da: b2c1 uxtb r1, r0 - 800c8dc: 4413 add r3, r2 - 800c8de: 460a mov r2, r1 - 800c8e0: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); - 800c8e4: 683b ldr r3, [r7, #0] - 800c8e6: 0c18 lsrs r0, r3, #16 - 800c8e8: 687b ldr r3, [r7, #4] - 800c8ea: 691a ldr r2, [r3, #16] - 800c8ec: 687b ldr r3, [r7, #4] - 800c8ee: 8a9b ldrh r3, [r3, #20] - 800c8f0: 1c59 adds r1, r3, #1 - 800c8f2: b28c uxth r4, r1 - 800c8f4: 6879 ldr r1, [r7, #4] - 800c8f6: 828c strh r4, [r1, #20] - 800c8f8: b2c1 uxtb r1, r0 - 800c8fa: 4413 add r3, r2 - 800c8fc: 460a mov r2, r1 - 800c8fe: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); - 800c902: 683b ldr r3, [r7, #0] - 800c904: 0a18 lsrs r0, r3, #8 - 800c906: 687b ldr r3, [r7, #4] - 800c908: 691a ldr r2, [r3, #16] - 800c90a: 687b ldr r3, [r7, #4] - 800c90c: 8a9b ldrh r3, [r3, #20] - 800c90e: 1c59 adds r1, r3, #1 - 800c910: b28c uxth r4, r1 - 800c912: 6879 ldr r1, [r7, #4] - 800c914: 828c strh r4, [r1, #20] - 800c916: b2c1 uxtb r1, r0 - 800c918: 4413 add r3, r2 - 800c91a: 460a mov r2, r1 - 800c91c: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); - 800c920: 687b ldr r3, [r7, #4] - 800c922: 691a ldr r2, [r3, #16] - 800c924: 687b ldr r3, [r7, #4] - 800c926: 8a9b ldrh r3, [r3, #20] - 800c928: 1c59 adds r1, r3, #1 - 800c92a: b288 uxth r0, r1 - 800c92c: 6879 ldr r1, [r7, #4] - 800c92e: 8288 strh r0, [r1, #20] - 800c930: 6839 ldr r1, [r7, #0] - 800c932: b2c9 uxtb r1, r1 - 800c934: 4413 add r3, r2 - 800c936: 460a mov r2, r1 - 800c938: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 -} - 800c93c: bf00 nop - 800c93e: 370c adds r7, #12 - 800c940: 46bd mov sp, r7 - 800c942: bd90 pop {r4, r7, pc} - 800c944: 08011f44 .word 0x08011f44 - 800c948: 0801219c .word 0x0801219c - 800c94c: 08011fa4 .word 0x08011fa4 - -0800c950 : - * use that further on. - * - */ -static err_t -dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) -{ - 800c950: b580 push {r7, lr} - 800c952: b08e sub sp, #56 ; 0x38 - 800c954: af00 add r7, sp, #0 - 800c956: 6078 str r0, [r7, #4] - 800c958: 6039 str r1, [r7, #0] - u16_t offset; - u16_t offset_max; - u16_t options_idx; - u16_t options_idx_max; - struct pbuf *q; - int parse_file_as_options = 0; - 800c95a: 2300 movs r3, #0 - 800c95c: 627b str r3, [r7, #36] ; 0x24 - int parse_sname_as_options = 0; - 800c95e: 2300 movs r3, #0 - 800c960: 623b str r3, [r7, #32] - - /* clear received options */ - dhcp_clear_all_options(dhcp); - 800c962: 2208 movs r2, #8 - 800c964: 2100 movs r1, #0 - 800c966: 48b3 ldr r0, [pc, #716] ; (800cc34 ) - 800c968: f003 f9a6 bl 800fcb8 - /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ - if (p->len < DHCP_SNAME_OFS) { - 800c96c: 683b ldr r3, [r7, #0] - 800c96e: 895b ldrh r3, [r3, #10] - 800c970: 2b2b cmp r3, #43 ; 0x2b - 800c972: d802 bhi.n 800c97a - return ERR_BUF; - 800c974: f06f 0301 mvn.w r3, #1 - 800c978: e26a b.n 800ce50 - } - dhcp->msg_in = (struct dhcp_msg *)p->payload; - 800c97a: 683b ldr r3, [r7, #0] - 800c97c: 685a ldr r2, [r3, #4] - 800c97e: 687b ldr r3, [r7, #4] - 800c980: 605a str r2, [r3, #4] -#endif /* LWIP_DHCP_BOOTP_FILE */ - - /* parse options */ - - /* start with options field */ - options_idx = DHCP_OPTIONS_OFS; - 800c982: 23f0 movs r3, #240 ; 0xf0 - 800c984: 85fb strh r3, [r7, #46] ; 0x2e - /* parse options to the end of the received packet */ - options_idx_max = p->tot_len; - 800c986: 683b ldr r3, [r7, #0] - 800c988: 891b ldrh r3, [r3, #8] - 800c98a: 85bb strh r3, [r7, #44] ; 0x2c -again: - q = p; - 800c98c: 683b ldr r3, [r7, #0] - 800c98e: 62bb str r3, [r7, #40] ; 0x28 - while ((q != NULL) && (options_idx >= q->len)) { - 800c990: e00c b.n 800c9ac - options_idx -= q->len; - 800c992: 6abb ldr r3, [r7, #40] ; 0x28 - 800c994: 895b ldrh r3, [r3, #10] - 800c996: 8dfa ldrh r2, [r7, #46] ; 0x2e - 800c998: 1ad3 subs r3, r2, r3 - 800c99a: 85fb strh r3, [r7, #46] ; 0x2e - options_idx_max -= q->len; - 800c99c: 6abb ldr r3, [r7, #40] ; 0x28 - 800c99e: 895b ldrh r3, [r3, #10] - 800c9a0: 8dba ldrh r2, [r7, #44] ; 0x2c - 800c9a2: 1ad3 subs r3, r2, r3 - 800c9a4: 85bb strh r3, [r7, #44] ; 0x2c - q = q->next; - 800c9a6: 6abb ldr r3, [r7, #40] ; 0x28 - 800c9a8: 681b ldr r3, [r3, #0] - 800c9aa: 62bb str r3, [r7, #40] ; 0x28 - while ((q != NULL) && (options_idx >= q->len)) { - 800c9ac: 6abb ldr r3, [r7, #40] ; 0x28 - 800c9ae: 2b00 cmp r3, #0 - 800c9b0: d004 beq.n 800c9bc - 800c9b2: 6abb ldr r3, [r7, #40] ; 0x28 - 800c9b4: 895b ldrh r3, [r3, #10] - 800c9b6: 8dfa ldrh r2, [r7, #46] ; 0x2e - 800c9b8: 429a cmp r2, r3 - 800c9ba: d2ea bcs.n 800c992 - } - if (q == NULL) { - 800c9bc: 6abb ldr r3, [r7, #40] ; 0x28 - 800c9be: 2b00 cmp r3, #0 - 800c9c0: d102 bne.n 800c9c8 - return ERR_BUF; - 800c9c2: f06f 0301 mvn.w r3, #1 - 800c9c6: e243 b.n 800ce50 - } - offset = options_idx; - 800c9c8: 8dfb ldrh r3, [r7, #46] ; 0x2e - 800c9ca: 867b strh r3, [r7, #50] ; 0x32 - offset_max = options_idx_max; - 800c9cc: 8dbb ldrh r3, [r7, #44] ; 0x2c - 800c9ce: 863b strh r3, [r7, #48] ; 0x30 - options = (u8_t*)q->payload; - 800c9d0: 6abb ldr r3, [r7, #40] ; 0x28 - 800c9d2: 685b ldr r3, [r3, #4] - 800c9d4: 637b str r3, [r7, #52] ; 0x34 - /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ - while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { - 800c9d6: e1fb b.n 800cdd0 - u8_t op = options[offset]; - 800c9d8: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800c9da: 6b7a ldr r2, [r7, #52] ; 0x34 - 800c9dc: 4413 add r3, r2 - 800c9de: 781b ldrb r3, [r3, #0] - 800c9e0: 757b strb r3, [r7, #21] - u8_t len; - u8_t decode_len = 0; - 800c9e2: 2300 movs r3, #0 - 800c9e4: 77bb strb r3, [r7, #30] - int decode_idx = -1; - 800c9e6: f04f 33ff mov.w r3, #4294967295 - 800c9ea: 61bb str r3, [r7, #24] - u16_t val_offset = offset + 2; - 800c9ec: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800c9ee: 3302 adds r3, #2 - 800c9f0: 82fb strh r3, [r7, #22] - /* len byte might be in the next pbuf */ - if ((offset + 1) < q->len) { - 800c9f2: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800c9f4: 3301 adds r3, #1 - 800c9f6: 6aba ldr r2, [r7, #40] ; 0x28 - 800c9f8: 8952 ldrh r2, [r2, #10] - 800c9fa: 4293 cmp r3, r2 - 800c9fc: da06 bge.n 800ca0c - len = options[offset + 1]; - 800c9fe: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800ca00: 3301 adds r3, #1 - 800ca02: 6b7a ldr r2, [r7, #52] ; 0x34 - 800ca04: 4413 add r3, r2 - 800ca06: 781b ldrb r3, [r3, #0] - 800ca08: 77fb strb r3, [r7, #31] - 800ca0a: e00a b.n 800ca22 - } else { - len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); - 800ca0c: 6abb ldr r3, [r7, #40] ; 0x28 - 800ca0e: 681b ldr r3, [r3, #0] - 800ca10: 2b00 cmp r3, #0 - 800ca12: d004 beq.n 800ca1e - 800ca14: 6abb ldr r3, [r7, #40] ; 0x28 - 800ca16: 681b ldr r3, [r3, #0] - 800ca18: 685b ldr r3, [r3, #4] - 800ca1a: 781b ldrb r3, [r3, #0] - 800ca1c: e000 b.n 800ca20 - 800ca1e: 2300 movs r3, #0 - 800ca20: 77fb strb r3, [r7, #31] - } - /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ - decode_len = len; - 800ca22: 7ffb ldrb r3, [r7, #31] - 800ca24: 77bb strb r3, [r7, #30] - switch(op) { - 800ca26: 7d7b ldrb r3, [r7, #21] - 800ca28: 2b3b cmp r3, #59 ; 0x3b - 800ca2a: f200 8121 bhi.w 800cc70 - 800ca2e: a201 add r2, pc, #4 ; (adr r2, 800ca34 ) - 800ca30: f852 f023 ldr.w pc, [r2, r3, lsl #2] - 800ca34: 0800cb25 .word 0x0800cb25 - 800ca38: 0800cb35 .word 0x0800cb35 - 800ca3c: 0800cc71 .word 0x0800cc71 - 800ca40: 0800cb55 .word 0x0800cb55 - 800ca44: 0800cc71 .word 0x0800cc71 - 800ca48: 0800cc71 .word 0x0800cc71 - 800ca4c: 0800cc71 .word 0x0800cc71 - 800ca50: 0800cc71 .word 0x0800cc71 - 800ca54: 0800cc71 .word 0x0800cc71 - 800ca58: 0800cc71 .word 0x0800cc71 - 800ca5c: 0800cc71 .word 0x0800cc71 - 800ca60: 0800cc71 .word 0x0800cc71 - 800ca64: 0800cc71 .word 0x0800cc71 - 800ca68: 0800cc71 .word 0x0800cc71 - 800ca6c: 0800cc71 .word 0x0800cc71 - 800ca70: 0800cc71 .word 0x0800cc71 - 800ca74: 0800cc71 .word 0x0800cc71 - 800ca78: 0800cc71 .word 0x0800cc71 - 800ca7c: 0800cc71 .word 0x0800cc71 - 800ca80: 0800cc71 .word 0x0800cc71 - 800ca84: 0800cc71 .word 0x0800cc71 - 800ca88: 0800cc71 .word 0x0800cc71 - 800ca8c: 0800cc71 .word 0x0800cc71 - 800ca90: 0800cc71 .word 0x0800cc71 - 800ca94: 0800cc71 .word 0x0800cc71 - 800ca98: 0800cc71 .word 0x0800cc71 - 800ca9c: 0800cc71 .word 0x0800cc71 - 800caa0: 0800cc71 .word 0x0800cc71 - 800caa4: 0800cc71 .word 0x0800cc71 - 800caa8: 0800cc71 .word 0x0800cc71 - 800caac: 0800cc71 .word 0x0800cc71 - 800cab0: 0800cc71 .word 0x0800cc71 - 800cab4: 0800cc71 .word 0x0800cc71 - 800cab8: 0800cc71 .word 0x0800cc71 - 800cabc: 0800cc71 .word 0x0800cc71 - 800cac0: 0800cc71 .word 0x0800cc71 - 800cac4: 0800cc71 .word 0x0800cc71 - 800cac8: 0800cc71 .word 0x0800cc71 - 800cacc: 0800cc71 .word 0x0800cc71 - 800cad0: 0800cc71 .word 0x0800cc71 - 800cad4: 0800cc71 .word 0x0800cc71 - 800cad8: 0800cc71 .word 0x0800cc71 - 800cadc: 0800cc71 .word 0x0800cc71 - 800cae0: 0800cc71 .word 0x0800cc71 - 800cae4: 0800cc71 .word 0x0800cc71 - 800cae8: 0800cc71 .word 0x0800cc71 - 800caec: 0800cc71 .word 0x0800cc71 - 800caf0: 0800cc71 .word 0x0800cc71 - 800caf4: 0800cc71 .word 0x0800cc71 - 800caf8: 0800cc71 .word 0x0800cc71 - 800cafc: 0800cc71 .word 0x0800cc71 - 800cb00: 0800cb7b .word 0x0800cb7b - 800cb04: 0800cb9b .word 0x0800cb9b - 800cb08: 0800cbd5 .word 0x0800cbd5 - 800cb0c: 0800cbf5 .word 0x0800cbf5 - 800cb10: 0800cc71 .word 0x0800cc71 - 800cb14: 0800cc71 .word 0x0800cc71 - 800cb18: 0800cc71 .word 0x0800cc71 - 800cb1c: 0800cc15 .word 0x0800cc15 - 800cb20: 0800cc51 .word 0x0800cc51 - /* case(DHCP_OPTION_END): handled above */ - case(DHCP_OPTION_PAD): - /* special option: no len encoded */ - decode_len = len = 0; - 800cb24: 2300 movs r3, #0 - 800cb26: 77fb strb r3, [r7, #31] - 800cb28: 7ffb ldrb r3, [r7, #31] - 800cb2a: 77bb strb r3, [r7, #30] - /* will be increased below */ - offset--; - 800cb2c: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800cb2e: 3b01 subs r3, #1 - 800cb30: 867b strh r3, [r7, #50] ; 0x32 - break; - 800cb32: e0a0 b.n 800cc76 - case(DHCP_OPTION_SUBNET_MASK): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - 800cb34: 7ffb ldrb r3, [r7, #31] - 800cb36: 2b04 cmp r3, #4 - 800cb38: d009 beq.n 800cb4e - 800cb3a: 4b3f ldr r3, [pc, #252] ; (800cc38 ) - 800cb3c: f240 52f6 movw r2, #1526 ; 0x5f6 - 800cb40: 493e ldr r1, [pc, #248] ; (800cc3c ) - 800cb42: 483f ldr r0, [pc, #252] ; (800cc40 ) - 800cb44: f002 ffbe bl 800fac4 - 800cb48: f06f 0305 mvn.w r3, #5 - 800cb4c: e180 b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; - 800cb4e: 2306 movs r3, #6 - 800cb50: 61bb str r3, [r7, #24] - break; - 800cb52: e090 b.n 800cc76 - case(DHCP_OPTION_ROUTER): - decode_len = 4; /* only copy the first given router */ - 800cb54: 2304 movs r3, #4 - 800cb56: 77bb strb r3, [r7, #30] - LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); - 800cb58: 7ffa ldrb r2, [r7, #31] - 800cb5a: 7fbb ldrb r3, [r7, #30] - 800cb5c: 429a cmp r2, r3 - 800cb5e: d209 bcs.n 800cb74 - 800cb60: 4b35 ldr r3, [pc, #212] ; (800cc38 ) - 800cb62: f240 52fb movw r2, #1531 ; 0x5fb - 800cb66: 4937 ldr r1, [pc, #220] ; (800cc44 ) - 800cb68: 4835 ldr r0, [pc, #212] ; (800cc40 ) - 800cb6a: f002 ffab bl 800fac4 - 800cb6e: f06f 0305 mvn.w r3, #5 - 800cb72: e16d b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_ROUTER; - 800cb74: 2307 movs r3, #7 - 800cb76: 61bb str r3, [r7, #24] - break; - 800cb78: e07d b.n 800cc76 - LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_DNS_SERVER; - break; -#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ - case(DHCP_OPTION_LEASE_TIME): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - 800cb7a: 7ffb ldrb r3, [r7, #31] - 800cb7c: 2b04 cmp r3, #4 - 800cb7e: d009 beq.n 800cb94 - 800cb80: 4b2d ldr r3, [pc, #180] ; (800cc38 ) - 800cb82: f240 6209 movw r2, #1545 ; 0x609 - 800cb86: 492d ldr r1, [pc, #180] ; (800cc3c ) - 800cb88: 482d ldr r0, [pc, #180] ; (800cc40 ) - 800cb8a: f002 ff9b bl 800fac4 - 800cb8e: f06f 0305 mvn.w r3, #5 - 800cb92: e15d b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_LEASE_TIME; - 800cb94: 2303 movs r3, #3 - 800cb96: 61bb str r3, [r7, #24] - break; - 800cb98: e06d b.n 800cc76 - LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_NTP_SERVER; - break; -#endif /* LWIP_DHCP_GET_NTP_SRV*/ - case(DHCP_OPTION_OVERLOAD): - LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); - 800cb9a: 7ffb ldrb r3, [r7, #31] - 800cb9c: 2b01 cmp r3, #1 - 800cb9e: d009 beq.n 800cbb4 - 800cba0: 4b25 ldr r3, [pc, #148] ; (800cc38 ) - 800cba2: f240 6217 movw r2, #1559 ; 0x617 - 800cba6: 4928 ldr r1, [pc, #160] ; (800cc48 ) - 800cba8: 4825 ldr r0, [pc, #148] ; (800cc40 ) - 800cbaa: f002 ff8b bl 800fac4 - 800cbae: f06f 0305 mvn.w r3, #5 - 800cbb2: e14d b.n 800ce50 - /* decode overload only in options, not in file/sname: invalid packet */ - LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;); - 800cbb4: 8dfb ldrh r3, [r7, #46] ; 0x2e - 800cbb6: 2bf0 cmp r3, #240 ; 0xf0 - 800cbb8: d009 beq.n 800cbce - 800cbba: 4b1f ldr r3, [pc, #124] ; (800cc38 ) - 800cbbc: f240 6219 movw r2, #1561 ; 0x619 - 800cbc0: 4922 ldr r1, [pc, #136] ; (800cc4c ) - 800cbc2: 481f ldr r0, [pc, #124] ; (800cc40 ) - 800cbc4: f002 ff7e bl 800fac4 - 800cbc8: f06f 0305 mvn.w r3, #5 - 800cbcc: e140 b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_OVERLOAD; - 800cbce: 2300 movs r3, #0 - 800cbd0: 61bb str r3, [r7, #24] - break; - 800cbd2: e050 b.n 800cc76 - case(DHCP_OPTION_MESSAGE_TYPE): - LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); - 800cbd4: 7ffb ldrb r3, [r7, #31] - 800cbd6: 2b01 cmp r3, #1 - 800cbd8: d009 beq.n 800cbee - 800cbda: 4b17 ldr r3, [pc, #92] ; (800cc38 ) - 800cbdc: f240 621d movw r2, #1565 ; 0x61d - 800cbe0: 4919 ldr r1, [pc, #100] ; (800cc48 ) - 800cbe2: 4817 ldr r0, [pc, #92] ; (800cc40 ) - 800cbe4: f002 ff6e bl 800fac4 - 800cbe8: f06f 0305 mvn.w r3, #5 - 800cbec: e130 b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_MSG_TYPE; - 800cbee: 2301 movs r3, #1 - 800cbf0: 61bb str r3, [r7, #24] - break; - 800cbf2: e040 b.n 800cc76 - case(DHCP_OPTION_SERVER_ID): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - 800cbf4: 7ffb ldrb r3, [r7, #31] - 800cbf6: 2b04 cmp r3, #4 - 800cbf8: d009 beq.n 800cc0e - 800cbfa: 4b0f ldr r3, [pc, #60] ; (800cc38 ) - 800cbfc: f240 6221 movw r2, #1569 ; 0x621 - 800cc00: 490e ldr r1, [pc, #56] ; (800cc3c ) - 800cc02: 480f ldr r0, [pc, #60] ; (800cc40 ) - 800cc04: f002 ff5e bl 800fac4 - 800cc08: f06f 0305 mvn.w r3, #5 - 800cc0c: e120 b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_SERVER_ID; - 800cc0e: 2302 movs r3, #2 - 800cc10: 61bb str r3, [r7, #24] - break; - 800cc12: e030 b.n 800cc76 - case(DHCP_OPTION_T1): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - 800cc14: 7ffb ldrb r3, [r7, #31] - 800cc16: 2b04 cmp r3, #4 - 800cc18: d009 beq.n 800cc2e - 800cc1a: 4b07 ldr r3, [pc, #28] ; (800cc38 ) - 800cc1c: f240 6225 movw r2, #1573 ; 0x625 - 800cc20: 4906 ldr r1, [pc, #24] ; (800cc3c ) - 800cc22: 4807 ldr r0, [pc, #28] ; (800cc40 ) - 800cc24: f002 ff4e bl 800fac4 - 800cc28: f06f 0305 mvn.w r3, #5 - 800cc2c: e110 b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_T1; - 800cc2e: 2304 movs r3, #4 - 800cc30: 61bb str r3, [r7, #24] - break; - 800cc32: e020 b.n 800cc76 - 800cc34: 20006de4 .word 0x20006de4 - 800cc38: 08011f44 .word 0x08011f44 - 800cc3c: 080121dc .word 0x080121dc - 800cc40: 08011fa4 .word 0x08011fa4 - 800cc44: 080121e8 .word 0x080121e8 - 800cc48: 080121fc .word 0x080121fc - 800cc4c: 08012208 .word 0x08012208 - case(DHCP_OPTION_T2): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - 800cc50: 7ffb ldrb r3, [r7, #31] - 800cc52: 2b04 cmp r3, #4 - 800cc54: d009 beq.n 800cc6a - 800cc56: 4b80 ldr r3, [pc, #512] ; (800ce58 ) - 800cc58: f240 6229 movw r2, #1577 ; 0x629 - 800cc5c: 497f ldr r1, [pc, #508] ; (800ce5c ) - 800cc5e: 4880 ldr r0, [pc, #512] ; (800ce60 ) - 800cc60: f002 ff30 bl 800fac4 - 800cc64: f06f 0305 mvn.w r3, #5 - 800cc68: e0f2 b.n 800ce50 - decode_idx = DHCP_OPTION_IDX_T2; - 800cc6a: 2305 movs r3, #5 - 800cc6c: 61bb str r3, [r7, #24] - break; - 800cc6e: e002 b.n 800cc76 - default: - decode_len = 0; - 800cc70: 2300 movs r3, #0 - 800cc72: 77bb strb r3, [r7, #30] - LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", (u16_t)op)); - break; - 800cc74: bf00 nop - } - offset += len + 2; - 800cc76: 7ffb ldrb r3, [r7, #31] - 800cc78: b29a uxth r2, r3 - 800cc7a: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800cc7c: 4413 add r3, r2 - 800cc7e: b29b uxth r3, r3 - 800cc80: 3302 adds r3, #2 - 800cc82: 867b strh r3, [r7, #50] ; 0x32 - if (decode_len > 0) { - 800cc84: 7fbb ldrb r3, [r7, #30] - 800cc86: 2b00 cmp r3, #0 - 800cc88: d079 beq.n 800cd7e - u32_t value = 0; - 800cc8a: 2300 movs r3, #0 - 800cc8c: 60bb str r3, [r7, #8] - u16_t copy_len; -decode_next: - LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); - 800cc8e: 69bb ldr r3, [r7, #24] - 800cc90: 2b00 cmp r3, #0 - 800cc92: db02 blt.n 800cc9a - 800cc94: 69bb ldr r3, [r7, #24] - 800cc96: 2b07 cmp r3, #7 - 800cc98: dd06 ble.n 800cca8 - 800cc9a: 4b6f ldr r3, [pc, #444] ; (800ce58 ) - 800cc9c: f240 6236 movw r2, #1590 ; 0x636 - 800cca0: 4970 ldr r1, [pc, #448] ; (800ce64 ) - 800cca2: 486f ldr r0, [pc, #444] ; (800ce60 ) - 800cca4: f002 ff0e bl 800fac4 - if (!dhcp_option_given(dhcp, decode_idx)) { - 800cca8: 4a6f ldr r2, [pc, #444] ; (800ce68 ) - 800ccaa: 69bb ldr r3, [r7, #24] - 800ccac: 4413 add r3, r2 - 800ccae: 781b ldrb r3, [r3, #0] - 800ccb0: 2b00 cmp r3, #0 - 800ccb2: d164 bne.n 800cd7e - copy_len = LWIP_MIN(decode_len, 4); - 800ccb4: 7fbb ldrb r3, [r7, #30] - 800ccb6: 2b04 cmp r3, #4 - 800ccb8: bf28 it cs - 800ccba: 2304 movcs r3, #4 - 800ccbc: b2db uxtb r3, r3 - 800ccbe: 827b strh r3, [r7, #18] - if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { - 800ccc0: 8afb ldrh r3, [r7, #22] - 800ccc2: 8a7a ldrh r2, [r7, #18] - 800ccc4: f107 0108 add.w r1, r7, #8 - 800ccc8: 6ab8 ldr r0, [r7, #40] ; 0x28 - 800ccca: f7f9 fcd7 bl 800667c - 800ccce: 4603 mov r3, r0 - 800ccd0: 461a mov r2, r3 - 800ccd2: 8a7b ldrh r3, [r7, #18] - 800ccd4: 4293 cmp r3, r2 - 800ccd6: d002 beq.n 800ccde - return ERR_BUF; - 800ccd8: f06f 0301 mvn.w r3, #1 - 800ccdc: e0b8 b.n 800ce50 - } - if (decode_len > 4) { - 800ccde: 7fbb ldrb r3, [r7, #30] - 800cce0: 2b04 cmp r3, #4 - 800cce2: d927 bls.n 800cd34 - /* decode more than one u32_t */ - LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); - 800cce4: 7fbb ldrb r3, [r7, #30] - 800cce6: f003 0303 and.w r3, r3, #3 - 800ccea: b2db uxtb r3, r3 - 800ccec: 2b00 cmp r3, #0 - 800ccee: d009 beq.n 800cd04 - 800ccf0: 4b59 ldr r3, [pc, #356] ; (800ce58 ) - 800ccf2: f240 623e movw r2, #1598 ; 0x63e - 800ccf6: 495d ldr r1, [pc, #372] ; (800ce6c ) - 800ccf8: 4859 ldr r0, [pc, #356] ; (800ce60 ) - 800ccfa: f002 fee3 bl 800fac4 - 800ccfe: f06f 0305 mvn.w r3, #5 - 800cd02: e0a5 b.n 800ce50 - dhcp_got_option(dhcp, decode_idx); - 800cd04: 4a58 ldr r2, [pc, #352] ; (800ce68 ) - 800cd06: 69bb ldr r3, [r7, #24] - 800cd08: 4413 add r3, r2 - 800cd0a: 2201 movs r2, #1 - 800cd0c: 701a strb r2, [r3, #0] - dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); - 800cd0e: 68bb ldr r3, [r7, #8] - 800cd10: 4618 mov r0, r3 - 800cd12: f7f8 f9ad bl 8005070 - 800cd16: 4602 mov r2, r0 - 800cd18: 4955 ldr r1, [pc, #340] ; (800ce70 ) - 800cd1a: 69bb ldr r3, [r7, #24] - 800cd1c: f841 2023 str.w r2, [r1, r3, lsl #2] - decode_len -= 4; - 800cd20: 7fbb ldrb r3, [r7, #30] - 800cd22: 3b04 subs r3, #4 - 800cd24: 77bb strb r3, [r7, #30] - val_offset += 4; - 800cd26: 8afb ldrh r3, [r7, #22] - 800cd28: 3304 adds r3, #4 - 800cd2a: 82fb strh r3, [r7, #22] - decode_idx++; - 800cd2c: 69bb ldr r3, [r7, #24] - 800cd2e: 3301 adds r3, #1 - 800cd30: 61bb str r3, [r7, #24] - goto decode_next; - 800cd32: e7ac b.n 800cc8e - } else if (decode_len == 4) { - 800cd34: 7fbb ldrb r3, [r7, #30] - 800cd36: 2b04 cmp r3, #4 - 800cd38: d106 bne.n 800cd48 - value = lwip_ntohl(value); - 800cd3a: 68bb ldr r3, [r7, #8] - 800cd3c: 4618 mov r0, r3 - 800cd3e: f7f8 f997 bl 8005070 - 800cd42: 4603 mov r3, r0 - 800cd44: 60bb str r3, [r7, #8] - 800cd46: e010 b.n 800cd6a - } else { - LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); - 800cd48: 7fbb ldrb r3, [r7, #30] - 800cd4a: 2b01 cmp r3, #1 - 800cd4c: d009 beq.n 800cd62 - 800cd4e: 4b42 ldr r3, [pc, #264] ; (800ce58 ) - 800cd50: f44f 62c9 mov.w r2, #1608 ; 0x648 - 800cd54: 4947 ldr r1, [pc, #284] ; (800ce74 ) - 800cd56: 4842 ldr r0, [pc, #264] ; (800ce60 ) - 800cd58: f002 feb4 bl 800fac4 - 800cd5c: f06f 0305 mvn.w r3, #5 - 800cd60: e076 b.n 800ce50 - value = ((u8_t*)&value)[0]; - 800cd62: f107 0308 add.w r3, r7, #8 - 800cd66: 781b ldrb r3, [r3, #0] - 800cd68: 60bb str r3, [r7, #8] - } - dhcp_got_option(dhcp, decode_idx); - 800cd6a: 4a3f ldr r2, [pc, #252] ; (800ce68 ) - 800cd6c: 69bb ldr r3, [r7, #24] - 800cd6e: 4413 add r3, r2 - 800cd70: 2201 movs r2, #1 - 800cd72: 701a strb r2, [r3, #0] - dhcp_set_option_value(dhcp, decode_idx, value); - 800cd74: 68ba ldr r2, [r7, #8] - 800cd76: 493e ldr r1, [pc, #248] ; (800ce70 ) - 800cd78: 69bb ldr r3, [r7, #24] - 800cd7a: f841 2023 str.w r2, [r1, r3, lsl #2] - } - } - if (offset >= q->len) { - 800cd7e: 6abb ldr r3, [r7, #40] ; 0x28 - 800cd80: 895b ldrh r3, [r3, #10] - 800cd82: 8e7a ldrh r2, [r7, #50] ; 0x32 - 800cd84: 429a cmp r2, r3 - 800cd86: d323 bcc.n 800cdd0 - offset -= q->len; - 800cd88: 6abb ldr r3, [r7, #40] ; 0x28 - 800cd8a: 895b ldrh r3, [r3, #10] - 800cd8c: 8e7a ldrh r2, [r7, #50] ; 0x32 - 800cd8e: 1ad3 subs r3, r2, r3 - 800cd90: 867b strh r3, [r7, #50] ; 0x32 - offset_max -= q->len; - 800cd92: 6abb ldr r3, [r7, #40] ; 0x28 - 800cd94: 895b ldrh r3, [r3, #10] - 800cd96: 8e3a ldrh r2, [r7, #48] ; 0x30 - 800cd98: 1ad3 subs r3, r2, r3 - 800cd9a: 863b strh r3, [r7, #48] ; 0x30 - if ((offset < offset_max) && offset_max) { - 800cd9c: 8e7a ldrh r2, [r7, #50] ; 0x32 - 800cd9e: 8e3b ldrh r3, [r7, #48] ; 0x30 - 800cda0: 429a cmp r2, r3 - 800cda2: d223 bcs.n 800cdec - 800cda4: 8e3b ldrh r3, [r7, #48] ; 0x30 - 800cda6: 2b00 cmp r3, #0 - 800cda8: d020 beq.n 800cdec - q = q->next; - 800cdaa: 6abb ldr r3, [r7, #40] ; 0x28 - 800cdac: 681b ldr r3, [r3, #0] - 800cdae: 62bb str r3, [r7, #40] ; 0x28 - LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); - 800cdb0: 6abb ldr r3, [r7, #40] ; 0x28 - 800cdb2: 2b00 cmp r3, #0 - 800cdb4: d109 bne.n 800cdca - 800cdb6: 4b28 ldr r3, [pc, #160] ; (800ce58 ) - 800cdb8: f240 6254 movw r2, #1620 ; 0x654 - 800cdbc: 492e ldr r1, [pc, #184] ; (800ce78 ) - 800cdbe: 4828 ldr r0, [pc, #160] ; (800ce60 ) - 800cdc0: f002 fe80 bl 800fac4 - 800cdc4: f06f 0305 mvn.w r3, #5 - 800cdc8: e042 b.n 800ce50 - options = (u8_t*)q->payload; - 800cdca: 6abb ldr r3, [r7, #40] ; 0x28 - 800cdcc: 685b ldr r3, [r3, #4] - 800cdce: 637b str r3, [r7, #52] ; 0x34 - while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { - 800cdd0: 6abb ldr r3, [r7, #40] ; 0x28 - 800cdd2: 2b00 cmp r3, #0 - 800cdd4: d00a beq.n 800cdec - 800cdd6: 8e7a ldrh r2, [r7, #50] ; 0x32 - 800cdd8: 8e3b ldrh r3, [r7, #48] ; 0x30 - 800cdda: 429a cmp r2, r3 - 800cddc: d206 bcs.n 800cdec - 800cdde: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800cde0: 6b7a ldr r2, [r7, #52] ; 0x34 - 800cde2: 4413 add r3, r2 - 800cde4: 781b ldrb r3, [r3, #0] - 800cde6: 2bff cmp r3, #255 ; 0xff - 800cde8: f47f adf6 bne.w 800c9d8 - break; - } - } - } - /* is this an overloaded message? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { - 800cdec: 4b1e ldr r3, [pc, #120] ; (800ce68 ) - 800cdee: 781b ldrb r3, [r3, #0] - 800cdf0: 2b00 cmp r3, #0 - 800cdf2: d018 beq.n 800ce26 - u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); - 800cdf4: 4b1e ldr r3, [pc, #120] ; (800ce70 ) - 800cdf6: 681b ldr r3, [r3, #0] - 800cdf8: 60fb str r3, [r7, #12] - dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); - 800cdfa: 4b1b ldr r3, [pc, #108] ; (800ce68 ) - 800cdfc: 2200 movs r2, #0 - 800cdfe: 701a strb r2, [r3, #0] - if (overload == DHCP_OVERLOAD_FILE) { - 800ce00: 68fb ldr r3, [r7, #12] - 800ce02: 2b01 cmp r3, #1 - 800ce04: d102 bne.n 800ce0c - parse_file_as_options = 1; - 800ce06: 2301 movs r3, #1 - 800ce08: 627b str r3, [r7, #36] ; 0x24 - 800ce0a: e00c b.n 800ce26 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); - } else if (overload == DHCP_OVERLOAD_SNAME) { - 800ce0c: 68fb ldr r3, [r7, #12] - 800ce0e: 2b02 cmp r3, #2 - 800ce10: d102 bne.n 800ce18 - parse_sname_as_options = 1; - 800ce12: 2301 movs r3, #1 - 800ce14: 623b str r3, [r7, #32] - 800ce16: e006 b.n 800ce26 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); - } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { - 800ce18: 68fb ldr r3, [r7, #12] - 800ce1a: 2b03 cmp r3, #3 - 800ce1c: d103 bne.n 800ce26 - parse_sname_as_options = 1; - 800ce1e: 2301 movs r3, #1 - 800ce20: 623b str r3, [r7, #32] - parse_file_as_options = 1; - 800ce22: 2301 movs r3, #1 - 800ce24: 627b str r3, [r7, #36] ; 0x24 - /* make sure the string is really NULL-terminated */ - dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0; - } -#endif /* LWIP_DHCP_BOOTP_FILE */ - } - if (parse_file_as_options) { - 800ce26: 6a7b ldr r3, [r7, #36] ; 0x24 - 800ce28: 2b00 cmp r3, #0 - 800ce2a: d006 beq.n 800ce3a - /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ - parse_file_as_options = 0; - 800ce2c: 2300 movs r3, #0 - 800ce2e: 627b str r3, [r7, #36] ; 0x24 - options_idx = DHCP_FILE_OFS; - 800ce30: 236c movs r3, #108 ; 0x6c - 800ce32: 85fb strh r3, [r7, #46] ; 0x2e - options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; - 800ce34: 23ec movs r3, #236 ; 0xec - 800ce36: 85bb strh r3, [r7, #44] ; 0x2c - goto again; - 800ce38: e5a8 b.n 800c98c - } else if (parse_sname_as_options) { - 800ce3a: 6a3b ldr r3, [r7, #32] - 800ce3c: 2b00 cmp r3, #0 - 800ce3e: d006 beq.n 800ce4e - parse_sname_as_options = 0; - 800ce40: 2300 movs r3, #0 - 800ce42: 623b str r3, [r7, #32] - options_idx = DHCP_SNAME_OFS; - 800ce44: 232c movs r3, #44 ; 0x2c - 800ce46: 85fb strh r3, [r7, #46] ; 0x2e - options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; - 800ce48: 236c movs r3, #108 ; 0x6c - 800ce4a: 85bb strh r3, [r7, #44] ; 0x2c - goto again; - 800ce4c: e59e b.n 800c98c - } - return ERR_OK; - 800ce4e: 2300 movs r3, #0 -} - 800ce50: 4618 mov r0, r3 - 800ce52: 3738 adds r7, #56 ; 0x38 - 800ce54: 46bd mov sp, r7 - 800ce56: bd80 pop {r7, pc} - 800ce58: 08011f44 .word 0x08011f44 - 800ce5c: 080121dc .word 0x080121dc - 800ce60: 08011fa4 .word 0x08011fa4 - 800ce64: 08012220 .word 0x08012220 - 800ce68: 20006de4 .word 0x20006de4 - 800ce6c: 08012234 .word 0x08012234 - 800ce70: 20006dc4 .word 0x20006dc4 - 800ce74: 0801224c .word 0x0801224c - 800ce78: 08012260 .word 0x08012260 - -0800ce7c : -/** - * If an incoming DHCP message is in response to us, then trigger the state machine - */ -static void -dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) -{ - 800ce7c: b580 push {r7, lr} - 800ce7e: b08a sub sp, #40 ; 0x28 - 800ce80: af00 add r7, sp, #0 - 800ce82: 60f8 str r0, [r7, #12] - 800ce84: 60b9 str r1, [r7, #8] - 800ce86: 607a str r2, [r7, #4] - 800ce88: 603b str r3, [r7, #0] - struct netif *netif = ip_current_input_netif(); - 800ce8a: 4b69 ldr r3, [pc, #420] ; (800d030 ) - 800ce8c: 685b ldr r3, [r3, #4] - 800ce8e: 623b str r3, [r7, #32] - struct dhcp *dhcp = netif_dhcp_data(netif); - 800ce90: 6a3b ldr r3, [r7, #32] - 800ce92: 6a5b ldr r3, [r3, #36] ; 0x24 - 800ce94: 61fb str r3, [r7, #28] - struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; - 800ce96: 687b ldr r3, [r7, #4] - 800ce98: 685b ldr r3, [r3, #4] - 800ce9a: 61bb str r3, [r7, #24] - u8_t i; - - LWIP_UNUSED_ARG(arg); - - /* Caught DHCP message from netif that does not have DHCP enabled? -> not interested */ - if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) { - 800ce9c: 69fb ldr r3, [r7, #28] - 800ce9e: 2b00 cmp r3, #0 - 800cea0: f000 80a9 beq.w 800cff6 - 800cea4: 69fb ldr r3, [r7, #28] - 800cea6: 7a1b ldrb r3, [r3, #8] - 800cea8: 2b00 cmp r3, #0 - 800ceaa: f000 80a4 beq.w 800cff6 - /* prevent warnings about unused arguments */ - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(addr); - LWIP_UNUSED_ARG(port); - - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); - 800ceae: 69fb ldr r3, [r7, #28] - 800ceb0: 685b ldr r3, [r3, #4] - 800ceb2: 2b00 cmp r3, #0 - 800ceb4: d006 beq.n 800cec4 - 800ceb6: 4b5f ldr r3, [pc, #380] ; (800d034 ) - 800ceb8: f44f 62d5 mov.w r2, #1704 ; 0x6a8 - 800cebc: 495e ldr r1, [pc, #376] ; (800d038 ) - 800cebe: 485f ldr r0, [pc, #380] ; (800d03c ) - 800cec0: f002 fe00 bl 800fac4 - - if (p->len < DHCP_MIN_REPLY_LEN) { - 800cec4: 687b ldr r3, [r7, #4] - 800cec6: 895b ldrh r3, [r3, #10] - 800cec8: 2b2b cmp r3, #43 ; 0x2b - 800ceca: f240 8096 bls.w 800cffa - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n")); - goto free_pbuf_and_return; - } - - if (reply_msg->op != DHCP_BOOTREPLY) { - 800cece: 69bb ldr r3, [r7, #24] - 800ced0: 781b ldrb r3, [r3, #0] - 800ced2: 2b02 cmp r3, #2 - 800ced4: f040 8093 bne.w 800cffe - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); - goto free_pbuf_and_return; - } - /* iterate through hardware address and match against DHCP message */ - for (i = 0; i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN && i < DHCP_CHADDR_LEN; i++) { - 800ced8: 2300 movs r3, #0 - 800ceda: f887 3027 strb.w r3, [r7, #39] ; 0x27 - 800cede: e012 b.n 800cf06 - if (netif->hwaddr[i] != reply_msg->chaddr[i]) { - 800cee0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 - 800cee4: 6a3a ldr r2, [r7, #32] - 800cee6: 4413 add r3, r2 - 800cee8: f893 202d ldrb.w r2, [r3, #45] ; 0x2d - 800ceec: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 - 800cef0: 69b9 ldr r1, [r7, #24] - 800cef2: 440b add r3, r1 - 800cef4: 7f1b ldrb r3, [r3, #28] - 800cef6: 429a cmp r2, r3 - 800cef8: f040 8083 bne.w 800d002 - for (i = 0; i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN && i < DHCP_CHADDR_LEN; i++) { - 800cefc: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 - 800cf00: 3301 adds r3, #1 - 800cf02: f887 3027 strb.w r3, [r7, #39] ; 0x27 - 800cf06: 6a3b ldr r3, [r7, #32] - 800cf08: f893 302c ldrb.w r3, [r3, #44] ; 0x2c - 800cf0c: f897 2027 ldrb.w r2, [r7, #39] ; 0x27 - 800cf10: 429a cmp r2, r3 - 800cf12: d207 bcs.n 800cf24 - 800cf14: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 - 800cf18: 2b05 cmp r3, #5 - 800cf1a: d803 bhi.n 800cf24 - 800cf1c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 - 800cf20: 2b0f cmp r3, #15 - 800cf22: d9dd bls.n 800cee0 - (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); - goto free_pbuf_and_return; - } - } - /* match transaction ID against what we expected */ - if (lwip_ntohl(reply_msg->xid) != dhcp->xid) { - 800cf24: 69bb ldr r3, [r7, #24] - 800cf26: 685b ldr r3, [r3, #4] - 800cf28: 4618 mov r0, r3 - 800cf2a: f7f8 f8a1 bl 8005070 - 800cf2e: 4602 mov r2, r0 - 800cf30: 69fb ldr r3, [r7, #28] - 800cf32: 681b ldr r3, [r3, #0] - 800cf34: 429a cmp r2, r3 - 800cf36: d166 bne.n 800d006 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n",lwip_ntohl(reply_msg->xid),dhcp->xid)); - goto free_pbuf_and_return; - } - /* option fields could be unfold? */ - if (dhcp_parse_reply(dhcp, p) != ERR_OK) { - 800cf38: 6879 ldr r1, [r7, #4] - 800cf3a: 69f8 ldr r0, [r7, #28] - 800cf3c: f7ff fd08 bl 800c950 - 800cf40: 4603 mov r3, r0 - 800cf42: 2b00 cmp r3, #0 - 800cf44: d161 bne.n 800d00a - goto free_pbuf_and_return; - } - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n")); - /* obtain pointer to DHCP message type */ - if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) { - 800cf46: 4b3e ldr r3, [pc, #248] ; (800d040 ) - 800cf48: 785b ldrb r3, [r3, #1] - 800cf4a: 2b00 cmp r3, #0 - 800cf4c: d05f beq.n 800d00e - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n")); - goto free_pbuf_and_return; - } - - /* read DHCP message type */ - msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); - 800cf4e: 4b3d ldr r3, [pc, #244] ; (800d044 ) - 800cf50: 685b ldr r3, [r3, #4] - 800cf52: 75fb strb r3, [r7, #23] - /* message type is DHCP ACK? */ - if (msg_type == DHCP_ACK) { - 800cf54: 7dfb ldrb r3, [r7, #23] - 800cf56: 2b05 cmp r3, #5 - 800cf58: d128 bne.n 800cfac - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); - /* in requesting state? */ - if (dhcp->state == DHCP_STATE_REQUESTING) { - 800cf5a: 69fb ldr r3, [r7, #28] - 800cf5c: 7a5b ldrb r3, [r3, #9] - 800cf5e: 2b01 cmp r3, #1 - 800cf60: d111 bne.n 800cf86 - dhcp_handle_ack(netif); - 800cf62: 6a38 ldr r0, [r7, #32] - 800cf64: f7fe fea0 bl 800bca8 -#if DHCP_DOES_ARP_CHECK - if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { - 800cf68: 6a3b ldr r3, [r7, #32] - 800cf6a: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800cf6e: f003 0308 and.w r3, r3, #8 - 800cf72: 2b00 cmp r3, #0 - 800cf74: d003 beq.n 800cf7e - /* check if the acknowledged lease address is already in use */ - dhcp_check(netif); - 800cf76: 6a38 ldr r0, [r7, #32] - 800cf78: f7fe fc68 bl 800b84c - 800cf7c: e04a b.n 800d014 - } else { - /* bind interface to the acknowledged lease address */ - dhcp_bind(netif); - 800cf7e: 6a38 ldr r0, [r7, #32] - 800cf80: f7ff f8a0 bl 800c0c4 - 800cf84: e046 b.n 800d014 - /* bind interface to the acknowledged lease address */ - dhcp_bind(netif); -#endif - } - /* already bound to the given lease address? */ - else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || - 800cf86: 69fb ldr r3, [r7, #28] - 800cf88: 7a5b ldrb r3, [r3, #9] - 800cf8a: 2b03 cmp r3, #3 - 800cf8c: d007 beq.n 800cf9e - 800cf8e: 69fb ldr r3, [r7, #28] - 800cf90: 7a5b ldrb r3, [r3, #9] - 800cf92: 2b04 cmp r3, #4 - 800cf94: d003 beq.n 800cf9e - (dhcp->state == DHCP_STATE_RENEWING)) { - 800cf96: 69fb ldr r3, [r7, #28] - 800cf98: 7a5b ldrb r3, [r3, #9] - else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || - 800cf9a: 2b05 cmp r3, #5 - 800cf9c: d13a bne.n 800d014 - dhcp_handle_ack(netif); - 800cf9e: 6a38 ldr r0, [r7, #32] - 800cfa0: f7fe fe82 bl 800bca8 - dhcp_bind(netif); - 800cfa4: 6a38 ldr r0, [r7, #32] - 800cfa6: f7ff f88d bl 800c0c4 - 800cfaa: e033 b.n 800d014 - } - } - /* received a DHCP_NAK in appropriate state? */ - else if ((msg_type == DHCP_NAK) && - 800cfac: 7dfb ldrb r3, [r7, #23] - 800cfae: 2b06 cmp r3, #6 - 800cfb0: d113 bne.n 800cfda - ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || - 800cfb2: 69fb ldr r3, [r7, #28] - 800cfb4: 7a5b ldrb r3, [r3, #9] - else if ((msg_type == DHCP_NAK) && - 800cfb6: 2b03 cmp r3, #3 - 800cfb8: d00b beq.n 800cfd2 - ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || - 800cfba: 69fb ldr r3, [r7, #28] - 800cfbc: 7a5b ldrb r3, [r3, #9] - 800cfbe: 2b01 cmp r3, #1 - 800cfc0: d007 beq.n 800cfd2 - (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { - 800cfc2: 69fb ldr r3, [r7, #28] - 800cfc4: 7a5b ldrb r3, [r3, #9] - ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || - 800cfc6: 2b04 cmp r3, #4 - 800cfc8: d003 beq.n 800cfd2 - (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { - 800cfca: 69fb ldr r3, [r7, #28] - 800cfcc: 7a5b ldrb r3, [r3, #9] - 800cfce: 2b05 cmp r3, #5 - 800cfd0: d103 bne.n 800cfda - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); - dhcp_handle_nak(netif); - 800cfd2: 6a38 ldr r0, [r7, #32] - 800cfd4: f7fe fc20 bl 800b818 - 800cfd8: e01c b.n 800d014 - } - /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ - else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { - 800cfda: 7dfb ldrb r3, [r7, #23] - 800cfdc: 2b02 cmp r3, #2 - 800cfde: d118 bne.n 800d012 - 800cfe0: 69fb ldr r3, [r7, #28] - 800cfe2: 7a5b ldrb r3, [r3, #9] - 800cfe4: 2b06 cmp r3, #6 - 800cfe6: d114 bne.n 800d012 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_STATE_SELECTING state\n")); - dhcp->request_timeout = 0; - 800cfe8: 69fb ldr r3, [r7, #28] - 800cfea: 2200 movs r2, #0 - 800cfec: 82da strh r2, [r3, #22] - /* remember offered lease */ - dhcp_handle_offer(netif); - 800cfee: 6a38 ldr r0, [r7, #32] - 800cff0: f7fe fc60 bl 800b8b4 - 800cff4: e00e b.n 800d014 - goto free_pbuf_and_return; - 800cff6: bf00 nop - 800cff8: e00c b.n 800d014 - goto free_pbuf_and_return; - 800cffa: bf00 nop - 800cffc: e00a b.n 800d014 - goto free_pbuf_and_return; - 800cffe: bf00 nop - 800d000: e008 b.n 800d014 - goto free_pbuf_and_return; - 800d002: bf00 nop - 800d004: e006 b.n 800d014 - goto free_pbuf_and_return; - 800d006: bf00 nop - 800d008: e004 b.n 800d014 - goto free_pbuf_and_return; - 800d00a: bf00 nop - 800d00c: e002 b.n 800d014 - goto free_pbuf_and_return; - 800d00e: bf00 nop - 800d010: e000 b.n 800d014 - } - -free_pbuf_and_return: - 800d012: bf00 nop - if (dhcp != NULL) { - 800d014: 69fb ldr r3, [r7, #28] - 800d016: 2b00 cmp r3, #0 - 800d018: d002 beq.n 800d020 - dhcp->msg_in = NULL; - 800d01a: 69fb ldr r3, [r7, #28] - 800d01c: 2200 movs r2, #0 - 800d01e: 605a str r2, [r3, #4] - } - pbuf_free(p); - 800d020: 6878 ldr r0, [r7, #4] - 800d022: f7f9 f92d bl 8006280 -} - 800d026: bf00 nop - 800d028: 3728 adds r7, #40 ; 0x28 - 800d02a: 46bd mov sp, r7 - 800d02c: bd80 pop {r7, pc} - 800d02e: bf00 nop - 800d030: 200037e8 .word 0x200037e8 - 800d034: 08011f44 .word 0x08011f44 - 800d038: 08012070 .word 0x08012070 - 800d03c: 08011fa4 .word 0x08011fa4 - 800d040: 20006de4 .word 0x20006de4 - 800d044: 20006dc4 .word 0x20006dc4 - -0800d048 : - * @param dhcp dhcp control struct - * @param message_type message type of the request - */ -static err_t -dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) -{ - 800d048: b590 push {r4, r7, lr} - 800d04a: b087 sub sp, #28 - 800d04c: af00 add r7, sp, #0 - 800d04e: 60f8 str r0, [r7, #12] - 800d050: 60b9 str r1, [r7, #8] - 800d052: 4613 mov r3, r2 - 800d054: 71fb strb r3, [r7, #7] - if (!xid_initialised) { - xid = DHCP_GLOBAL_XID; - xid_initialised = !xid_initialised; - } -#endif - LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); - 800d056: 68fb ldr r3, [r7, #12] - 800d058: 2b00 cmp r3, #0 - 800d05a: d109 bne.n 800d070 - 800d05c: 4ba3 ldr r3, [pc, #652] ; (800d2ec ) - 800d05e: f240 721d movw r2, #1821 ; 0x71d - 800d062: 49a3 ldr r1, [pc, #652] ; (800d2f0 ) - 800d064: 48a3 ldr r0, [pc, #652] ; (800d2f4 ) - 800d066: f002 fd2d bl 800fac4 - 800d06a: f06f 030f mvn.w r3, #15 - 800d06e: e138 b.n 800d2e2 - LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); - 800d070: 68bb ldr r3, [r7, #8] - 800d072: 2b00 cmp r3, #0 - 800d074: d109 bne.n 800d08a - 800d076: 4b9d ldr r3, [pc, #628] ; (800d2ec ) - 800d078: f240 721e movw r2, #1822 ; 0x71e - 800d07c: 499e ldr r1, [pc, #632] ; (800d2f8 ) - 800d07e: 489d ldr r0, [pc, #628] ; (800d2f4 ) - 800d080: f002 fd20 bl 800fac4 - 800d084: f06f 0305 mvn.w r3, #5 - 800d088: e12b b.n 800d2e2 - LWIP_ASSERT("dhcp_create_msg: dhcp->p_out == NULL", dhcp->p_out == NULL); - 800d08a: 68bb ldr r3, [r7, #8] - 800d08c: 68db ldr r3, [r3, #12] - 800d08e: 2b00 cmp r3, #0 - 800d090: d006 beq.n 800d0a0 - 800d092: 4b96 ldr r3, [pc, #600] ; (800d2ec ) - 800d094: f240 721f movw r2, #1823 ; 0x71f - 800d098: 4998 ldr r1, [pc, #608] ; (800d2fc ) - 800d09a: 4896 ldr r0, [pc, #600] ; (800d2f4 ) - 800d09c: f002 fd12 bl 800fac4 - LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); - 800d0a0: 68bb ldr r3, [r7, #8] - 800d0a2: 691b ldr r3, [r3, #16] - 800d0a4: 2b00 cmp r3, #0 - 800d0a6: d006 beq.n 800d0b6 - 800d0a8: 4b90 ldr r3, [pc, #576] ; (800d2ec ) - 800d0aa: f44f 62e4 mov.w r2, #1824 ; 0x720 - 800d0ae: 4994 ldr r1, [pc, #592] ; (800d300 ) - 800d0b0: 4890 ldr r0, [pc, #576] ; (800d2f4 ) - 800d0b2: f002 fd07 bl 800fac4 - dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); - 800d0b6: 2200 movs r2, #0 - 800d0b8: f44f 719a mov.w r1, #308 ; 0x134 - 800d0bc: 2000 movs r0, #0 - 800d0be: f7f8 fd67 bl 8005b90 - 800d0c2: 4602 mov r2, r0 - 800d0c4: 68bb ldr r3, [r7, #8] - 800d0c6: 60da str r2, [r3, #12] - if (dhcp->p_out == NULL) { - 800d0c8: 68bb ldr r3, [r7, #8] - 800d0ca: 68db ldr r3, [r3, #12] - 800d0cc: 2b00 cmp r3, #0 - 800d0ce: d102 bne.n 800d0d6 - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_create_msg(): could not allocate pbuf\n")); - return ERR_MEM; - 800d0d0: f04f 33ff mov.w r3, #4294967295 - 800d0d4: e105 b.n 800d2e2 - } - LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", - 800d0d6: 68bb ldr r3, [r7, #8] - 800d0d8: 68db ldr r3, [r3, #12] - 800d0da: 895b ldrh r3, [r3, #10] - 800d0dc: f5b3 7f9a cmp.w r3, #308 ; 0x134 - 800d0e0: d206 bcs.n 800d0f0 - 800d0e2: 4b82 ldr r3, [pc, #520] ; (800d2ec ) - 800d0e4: f240 7227 movw r2, #1831 ; 0x727 - 800d0e8: 4986 ldr r1, [pc, #536] ; (800d304 ) - 800d0ea: 4882 ldr r0, [pc, #520] ; (800d2f4 ) - 800d0ec: f002 fcea bl 800fac4 - (dhcp->p_out->len >= sizeof(struct dhcp_msg))); - - /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ - if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { - 800d0f0: 79fb ldrb r3, [r7, #7] - 800d0f2: 2b03 cmp r3, #3 - 800d0f4: d103 bne.n 800d0fe - 800d0f6: 68bb ldr r3, [r7, #8] - 800d0f8: 7a5b ldrb r3, [r3, #9] - 800d0fa: 2b03 cmp r3, #3 - 800d0fc: d10d bne.n 800d11a - /* reuse transaction identifier in retransmissions */ - if (dhcp->tries == 0) { - 800d0fe: 68bb ldr r3, [r7, #8] - 800d100: 7a9b ldrb r3, [r3, #10] - 800d102: 2b00 cmp r3, #0 - 800d104: d105 bne.n 800d112 -#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) - xid = LWIP_RAND(); - 800d106: f002 fbef bl 800f8e8 - 800d10a: 4603 mov r3, r0 - 800d10c: 461a mov r2, r3 - 800d10e: 4b7e ldr r3, [pc, #504] ; (800d308 ) - 800d110: 601a str r2, [r3, #0] -#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ - xid++; -#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ - } - dhcp->xid = xid; - 800d112: 4b7d ldr r3, [pc, #500] ; (800d308 ) - 800d114: 681a ldr r2, [r3, #0] - 800d116: 68bb ldr r3, [r7, #8] - 800d118: 601a str r2, [r3, #0] - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, - ("transaction id xid(%"X32_F")\n", xid)); - - dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; - 800d11a: 68bb ldr r3, [r7, #8] - 800d11c: 68db ldr r3, [r3, #12] - 800d11e: 685a ldr r2, [r3, #4] - 800d120: 68bb ldr r3, [r7, #8] - 800d122: 611a str r2, [r3, #16] - - dhcp->msg_out->op = DHCP_BOOTREQUEST; - 800d124: 68bb ldr r3, [r7, #8] - 800d126: 691b ldr r3, [r3, #16] - 800d128: 2201 movs r2, #1 - 800d12a: 701a strb r2, [r3, #0] - /* @todo: make link layer independent */ - dhcp->msg_out->htype = DHCP_HTYPE_ETH; - 800d12c: 68bb ldr r3, [r7, #8] - 800d12e: 691b ldr r3, [r3, #16] - 800d130: 2201 movs r2, #1 - 800d132: 705a strb r2, [r3, #1] - dhcp->msg_out->hlen = netif->hwaddr_len; - 800d134: 68bb ldr r3, [r7, #8] - 800d136: 691b ldr r3, [r3, #16] - 800d138: 68fa ldr r2, [r7, #12] - 800d13a: f892 202c ldrb.w r2, [r2, #44] ; 0x2c - 800d13e: 709a strb r2, [r3, #2] - dhcp->msg_out->hops = 0; - 800d140: 68bb ldr r3, [r7, #8] - 800d142: 691b ldr r3, [r3, #16] - 800d144: 2200 movs r2, #0 - 800d146: 70da strb r2, [r3, #3] - dhcp->msg_out->xid = lwip_htonl(dhcp->xid); - 800d148: 68bb ldr r3, [r7, #8] - 800d14a: 681a ldr r2, [r3, #0] - 800d14c: 68bb ldr r3, [r7, #8] - 800d14e: 691c ldr r4, [r3, #16] - 800d150: 4610 mov r0, r2 - 800d152: f7f7 ff8d bl 8005070 - 800d156: 4603 mov r3, r0 - 800d158: 6063 str r3, [r4, #4] - dhcp->msg_out->secs = 0; - 800d15a: 68bb ldr r3, [r7, #8] - 800d15c: 691b ldr r3, [r3, #16] - 800d15e: 2200 movs r2, #0 - 800d160: 721a strb r2, [r3, #8] - 800d162: 2200 movs r2, #0 - 800d164: 725a strb r2, [r3, #9] - /* we don't need the broadcast flag since we can receive unicast traffic - before being fully configured! */ - dhcp->msg_out->flags = 0; - 800d166: 68bb ldr r3, [r7, #8] - 800d168: 691b ldr r3, [r3, #16] - 800d16a: 2200 movs r2, #0 - 800d16c: 729a strb r2, [r3, #10] - 800d16e: 2200 movs r2, #0 - 800d170: 72da strb r2, [r3, #11] - ip4_addr_set_zero(&dhcp->msg_out->ciaddr); - 800d172: 68bb ldr r3, [r7, #8] - 800d174: 691b ldr r3, [r3, #16] - 800d176: 2200 movs r2, #0 - 800d178: 731a strb r2, [r3, #12] - 800d17a: 2200 movs r2, #0 - 800d17c: 735a strb r2, [r3, #13] - 800d17e: 2200 movs r2, #0 - 800d180: 739a strb r2, [r3, #14] - 800d182: 2200 movs r2, #0 - 800d184: 73da strb r2, [r3, #15] - /* 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) || - 800d186: 79fb ldrb r3, [r7, #7] - 800d188: 2b08 cmp r3, #8 - 800d18a: d010 beq.n 800d1ae - 800d18c: 79fb ldrb r3, [r7, #7] - 800d18e: 2b04 cmp r3, #4 - 800d190: d00d beq.n 800d1ae - 800d192: 79fb ldrb r3, [r7, #7] - 800d194: 2b07 cmp r3, #7 - 800d196: d00a beq.n 800d1ae - 800d198: 79fb ldrb r3, [r7, #7] - 800d19a: 2b03 cmp r3, #3 - 800d19c: d10d bne.n 800d1ba - ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ - ((dhcp->state== DHCP_STATE_RENEWING) || dhcp->state== DHCP_STATE_REBINDING))) { - 800d19e: 68bb ldr r3, [r7, #8] - 800d1a0: 7a5b ldrb r3, [r3, #9] - ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ - 800d1a2: 2b05 cmp r3, #5 - 800d1a4: d003 beq.n 800d1ae - ((dhcp->state== DHCP_STATE_RENEWING) || dhcp->state== DHCP_STATE_REBINDING))) { - 800d1a6: 68bb ldr r3, [r7, #8] - 800d1a8: 7a5b ldrb r3, [r3, #9] - 800d1aa: 2b04 cmp r3, #4 - 800d1ac: d105 bne.n 800d1ba - ip4_addr_copy(dhcp->msg_out->ciaddr, *netif_ip4_addr(netif)); - 800d1ae: 68fb ldr r3, [r7, #12] - 800d1b0: 1d1a adds r2, r3, #4 - 800d1b2: 68bb ldr r3, [r7, #8] - 800d1b4: 691b ldr r3, [r3, #16] - 800d1b6: 6812 ldr r2, [r2, #0] - 800d1b8: 60da str r2, [r3, #12] - } - ip4_addr_set_zero(&dhcp->msg_out->yiaddr); - 800d1ba: 68bb ldr r3, [r7, #8] - 800d1bc: 691b ldr r3, [r3, #16] - 800d1be: 2200 movs r2, #0 - 800d1c0: 741a strb r2, [r3, #16] - 800d1c2: 2200 movs r2, #0 - 800d1c4: 745a strb r2, [r3, #17] - 800d1c6: 2200 movs r2, #0 - 800d1c8: 749a strb r2, [r3, #18] - 800d1ca: 2200 movs r2, #0 - 800d1cc: 74da strb r2, [r3, #19] - ip4_addr_set_zero(&dhcp->msg_out->siaddr); - 800d1ce: 68bb ldr r3, [r7, #8] - 800d1d0: 691b ldr r3, [r3, #16] - 800d1d2: 2200 movs r2, #0 - 800d1d4: 751a strb r2, [r3, #20] - 800d1d6: 2200 movs r2, #0 - 800d1d8: 755a strb r2, [r3, #21] - 800d1da: 2200 movs r2, #0 - 800d1dc: 759a strb r2, [r3, #22] - 800d1de: 2200 movs r2, #0 - 800d1e0: 75da strb r2, [r3, #23] - ip4_addr_set_zero(&dhcp->msg_out->giaddr); - 800d1e2: 68bb ldr r3, [r7, #8] - 800d1e4: 691b ldr r3, [r3, #16] - 800d1e6: 2200 movs r2, #0 - 800d1e8: 761a strb r2, [r3, #24] - 800d1ea: 2200 movs r2, #0 - 800d1ec: 765a strb r2, [r3, #25] - 800d1ee: 2200 movs r2, #0 - 800d1f0: 769a strb r2, [r3, #26] - 800d1f2: 2200 movs r2, #0 - 800d1f4: 76da strb r2, [r3, #27] - for (i = 0; i < DHCP_CHADDR_LEN; i++) { - 800d1f6: 2300 movs r3, #0 - 800d1f8: 82fb strh r3, [r7, #22] - 800d1fa: e019 b.n 800d230 - /* copy netif hardware address, pad with zeroes */ - dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN) ? netif->hwaddr[i] : 0/* pad byte*/; - 800d1fc: 68fb ldr r3, [r7, #12] - 800d1fe: f893 302c ldrb.w r3, [r3, #44] ; 0x2c - 800d202: b29b uxth r3, r3 - 800d204: 8afa ldrh r2, [r7, #22] - 800d206: 429a cmp r2, r3 - 800d208: d208 bcs.n 800d21c - 800d20a: 8afb ldrh r3, [r7, #22] - 800d20c: 2b05 cmp r3, #5 - 800d20e: d805 bhi.n 800d21c - 800d210: 8afb ldrh r3, [r7, #22] - 800d212: 68fa ldr r2, [r7, #12] - 800d214: 4413 add r3, r2 - 800d216: f893 102d ldrb.w r1, [r3, #45] ; 0x2d - 800d21a: e000 b.n 800d21e - 800d21c: 2100 movs r1, #0 - 800d21e: 68bb ldr r3, [r7, #8] - 800d220: 691a ldr r2, [r3, #16] - 800d222: 8afb ldrh r3, [r7, #22] - 800d224: 4413 add r3, r2 - 800d226: 460a mov r2, r1 - 800d228: 771a strb r2, [r3, #28] - for (i = 0; i < DHCP_CHADDR_LEN; i++) { - 800d22a: 8afb ldrh r3, [r7, #22] - 800d22c: 3301 adds r3, #1 - 800d22e: 82fb strh r3, [r7, #22] - 800d230: 8afb ldrh r3, [r7, #22] - 800d232: 2b0f cmp r3, #15 - 800d234: d9e2 bls.n 800d1fc - } - for (i = 0; i < DHCP_SNAME_LEN; i++) { - 800d236: 2300 movs r3, #0 - 800d238: 82fb strh r3, [r7, #22] - 800d23a: e009 b.n 800d250 - dhcp->msg_out->sname[i] = 0; - 800d23c: 68bb ldr r3, [r7, #8] - 800d23e: 691a ldr r2, [r3, #16] - 800d240: 8afb ldrh r3, [r7, #22] - 800d242: 4413 add r3, r2 - 800d244: 2200 movs r2, #0 - 800d246: f883 202c strb.w r2, [r3, #44] ; 0x2c - for (i = 0; i < DHCP_SNAME_LEN; i++) { - 800d24a: 8afb ldrh r3, [r7, #22] - 800d24c: 3301 adds r3, #1 - 800d24e: 82fb strh r3, [r7, #22] - 800d250: 8afb ldrh r3, [r7, #22] - 800d252: 2b3f cmp r3, #63 ; 0x3f - 800d254: d9f2 bls.n 800d23c - } - for (i = 0; i < DHCP_FILE_LEN; i++) { - 800d256: 2300 movs r3, #0 - 800d258: 82fb strh r3, [r7, #22] - 800d25a: e009 b.n 800d270 - dhcp->msg_out->file[i] = 0; - 800d25c: 68bb ldr r3, [r7, #8] - 800d25e: 691a ldr r2, [r3, #16] - 800d260: 8afb ldrh r3, [r7, #22] - 800d262: 4413 add r3, r2 - 800d264: 2200 movs r2, #0 - 800d266: f883 206c strb.w r2, [r3, #108] ; 0x6c - for (i = 0; i < DHCP_FILE_LEN; i++) { - 800d26a: 8afb ldrh r3, [r7, #22] - 800d26c: 3301 adds r3, #1 - 800d26e: 82fb strh r3, [r7, #22] - 800d270: 8afb ldrh r3, [r7, #22] - 800d272: 2b7f cmp r3, #127 ; 0x7f - 800d274: d9f2 bls.n 800d25c - } - dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); - 800d276: 68bb ldr r3, [r7, #8] - 800d278: 691b ldr r3, [r3, #16] - 800d27a: 2200 movs r2, #0 - 800d27c: f042 0263 orr.w r2, r2, #99 ; 0x63 - 800d280: f883 20ec strb.w r2, [r3, #236] ; 0xec - 800d284: 2200 movs r2, #0 - 800d286: f062 027d orn r2, r2, #125 ; 0x7d - 800d28a: f883 20ed strb.w r2, [r3, #237] ; 0xed - 800d28e: 2200 movs r2, #0 - 800d290: f042 0253 orr.w r2, r2, #83 ; 0x53 - 800d294: f883 20ee strb.w r2, [r3, #238] ; 0xee - 800d298: 2200 movs r2, #0 - 800d29a: f042 0263 orr.w r2, r2, #99 ; 0x63 - 800d29e: f883 20ef strb.w r2, [r3, #239] ; 0xef - dhcp->options_out_len = 0; - 800d2a2: 68bb ldr r3, [r7, #8] - 800d2a4: 2200 movs r2, #0 - 800d2a6: 829a strh r2, [r3, #20] - /* fill options field with an incrementing array (for debugging purposes) */ - for (i = 0; i < DHCP_OPTIONS_LEN; i++) { - 800d2a8: 2300 movs r3, #0 - 800d2aa: 82fb strh r3, [r7, #22] - 800d2ac: e00b b.n 800d2c6 - dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ - 800d2ae: 68bb ldr r3, [r7, #8] - 800d2b0: 691a ldr r2, [r3, #16] - 800d2b2: 8afb ldrh r3, [r7, #22] - 800d2b4: 8af9 ldrh r1, [r7, #22] - 800d2b6: b2c9 uxtb r1, r1 - 800d2b8: 4413 add r3, r2 - 800d2ba: 460a mov r2, r1 - 800d2bc: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - for (i = 0; i < DHCP_OPTIONS_LEN; i++) { - 800d2c0: 8afb ldrh r3, [r7, #22] - 800d2c2: 3301 adds r3, #1 - 800d2c4: 82fb strh r3, [r7, #22] - 800d2c6: 8afb ldrh r3, [r7, #22] - 800d2c8: 2b43 cmp r3, #67 ; 0x43 - 800d2ca: d9f0 bls.n 800d2ae - } - /* Add option MESSAGE_TYPE */ - dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); - 800d2cc: 2201 movs r2, #1 - 800d2ce: 2135 movs r1, #53 ; 0x35 - 800d2d0: 68b8 ldr r0, [r7, #8] - 800d2d2: f7ff fa4b bl 800c76c - dhcp_option_byte(dhcp, message_type); - 800d2d6: 79fb ldrb r3, [r7, #7] - 800d2d8: 4619 mov r1, r3 - 800d2da: 68b8 ldr r0, [r7, #8] - 800d2dc: f7ff fa80 bl 800c7e0 - return ERR_OK; - 800d2e0: 2300 movs r3, #0 -} - 800d2e2: 4618 mov r0, r3 - 800d2e4: 371c adds r7, #28 - 800d2e6: 46bd mov sp, r7 - 800d2e8: bd90 pop {r4, r7, pc} - 800d2ea: bf00 nop - 800d2ec: 08011f44 .word 0x08011f44 - 800d2f0: 08012274 .word 0x08012274 - 800d2f4: 08011fa4 .word 0x08011fa4 - 800d2f8: 08012294 .word 0x08012294 - 800d2fc: 080122b4 .word 0x080122b4 - 800d300: 080122dc .word 0x080122dc - 800d304: 08012304 .word 0x08012304 - 800d308: 20006df4 .word 0x20006df4 - -0800d30c : - * - * @param dhcp the dhcp struct to free the request from - */ -static void -dhcp_delete_msg(struct dhcp *dhcp) -{ - 800d30c: b580 push {r7, lr} - 800d30e: b082 sub sp, #8 - 800d310: af00 add r7, sp, #0 - 800d312: 6078 str r0, [r7, #4] - LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); - 800d314: 687b ldr r3, [r7, #4] - 800d316: 2b00 cmp r3, #0 - 800d318: d107 bne.n 800d32a - 800d31a: 4b18 ldr r3, [pc, #96] ; (800d37c ) - 800d31c: f240 726d movw r2, #1901 ; 0x76d - 800d320: 4917 ldr r1, [pc, #92] ; (800d380 ) - 800d322: 4818 ldr r0, [pc, #96] ; (800d384 ) - 800d324: f002 fbce bl 800fac4 - 800d328: e024 b.n 800d374 - LWIP_ASSERT("dhcp_delete_msg: dhcp->p_out != NULL", dhcp->p_out != NULL); - 800d32a: 687b ldr r3, [r7, #4] - 800d32c: 68db ldr r3, [r3, #12] - 800d32e: 2b00 cmp r3, #0 - 800d330: d106 bne.n 800d340 - 800d332: 4b12 ldr r3, [pc, #72] ; (800d37c ) - 800d334: f240 726e movw r2, #1902 ; 0x76e - 800d338: 4913 ldr r1, [pc, #76] ; (800d388 ) - 800d33a: 4812 ldr r0, [pc, #72] ; (800d384 ) - 800d33c: f002 fbc2 bl 800fac4 - LWIP_ASSERT("dhcp_delete_msg: dhcp->msg_out != NULL", dhcp->msg_out != NULL); - 800d340: 687b ldr r3, [r7, #4] - 800d342: 691b ldr r3, [r3, #16] - 800d344: 2b00 cmp r3, #0 - 800d346: d106 bne.n 800d356 - 800d348: 4b0c ldr r3, [pc, #48] ; (800d37c ) - 800d34a: f240 726f movw r2, #1903 ; 0x76f - 800d34e: 490f ldr r1, [pc, #60] ; (800d38c ) - 800d350: 480c ldr r0, [pc, #48] ; (800d384 ) - 800d352: f002 fbb7 bl 800fac4 - if (dhcp->p_out != NULL) { - 800d356: 687b ldr r3, [r7, #4] - 800d358: 68db ldr r3, [r3, #12] - 800d35a: 2b00 cmp r3, #0 - 800d35c: d004 beq.n 800d368 - pbuf_free(dhcp->p_out); - 800d35e: 687b ldr r3, [r7, #4] - 800d360: 68db ldr r3, [r3, #12] - 800d362: 4618 mov r0, r3 - 800d364: f7f8 ff8c bl 8006280 - } - dhcp->p_out = NULL; - 800d368: 687b ldr r3, [r7, #4] - 800d36a: 2200 movs r2, #0 - 800d36c: 60da str r2, [r3, #12] - dhcp->msg_out = NULL; - 800d36e: 687b ldr r3, [r7, #4] - 800d370: 2200 movs r2, #0 - 800d372: 611a str r2, [r3, #16] -} - 800d374: 3708 adds r7, #8 - 800d376: 46bd mov sp, r7 - 800d378: bd80 pop {r7, pc} - 800d37a: bf00 nop - 800d37c: 08011f44 .word 0x08011f44 - 800d380: 08012344 .word 0x08012344 - 800d384: 08011fa4 .word 0x08011fa4 - 800d388: 08012364 .word 0x08012364 - 800d38c: 0801238c .word 0x0801238c - -0800d390 : - * - * @param dhcp DHCP state structure - */ -static void -dhcp_option_trailer(struct dhcp *dhcp) -{ - 800d390: b580 push {r7, lr} - 800d392: b082 sub sp, #8 - 800d394: af00 add r7, sp, #0 - 800d396: 6078 str r0, [r7, #4] - LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); - 800d398: 687b ldr r3, [r7, #4] - 800d39a: 2b00 cmp r3, #0 - 800d39c: d107 bne.n 800d3ae - 800d39e: 4b24 ldr r3, [pc, #144] ; (800d430 ) - 800d3a0: f240 7282 movw r2, #1922 ; 0x782 - 800d3a4: 4923 ldr r1, [pc, #140] ; (800d434 ) - 800d3a6: 4824 ldr r0, [pc, #144] ; (800d438 ) - 800d3a8: f002 fb8c bl 800fac4 - 800d3ac: e03c b.n 800d428 - LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); - 800d3ae: 687b ldr r3, [r7, #4] - 800d3b0: 691b ldr r3, [r3, #16] - 800d3b2: 2b00 cmp r3, #0 - 800d3b4: d106 bne.n 800d3c4 - 800d3b6: 4b1e ldr r3, [pc, #120] ; (800d430 ) - 800d3b8: f240 7283 movw r2, #1923 ; 0x783 - 800d3bc: 491f ldr r1, [pc, #124] ; (800d43c ) - 800d3be: 481e ldr r0, [pc, #120] ; (800d438 ) - 800d3c0: f002 fb80 bl 800fac4 - LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); - 800d3c4: 687b ldr r3, [r7, #4] - 800d3c6: 8a9b ldrh r3, [r3, #20] - 800d3c8: 2b43 cmp r3, #67 ; 0x43 - 800d3ca: d906 bls.n 800d3da - 800d3cc: 4b18 ldr r3, [pc, #96] ; (800d430 ) - 800d3ce: f240 7284 movw r2, #1924 ; 0x784 - 800d3d2: 491b ldr r1, [pc, #108] ; (800d440 ) - 800d3d4: 4818 ldr r0, [pc, #96] ; (800d438 ) - 800d3d6: f002 fb75 bl 800fac4 - dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; - 800d3da: 687b ldr r3, [r7, #4] - 800d3dc: 691a ldr r2, [r3, #16] - 800d3de: 687b ldr r3, [r7, #4] - 800d3e0: 8a9b ldrh r3, [r3, #20] - 800d3e2: 1c59 adds r1, r3, #1 - 800d3e4: b288 uxth r0, r1 - 800d3e6: 6879 ldr r1, [r7, #4] - 800d3e8: 8288 strh r0, [r1, #20] - 800d3ea: 4413 add r3, r2 - 800d3ec: 22ff movs r2, #255 ; 0xff - 800d3ee: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - /* packet is too small, or not 4 byte aligned? */ - while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && - 800d3f2: e00b b.n 800d40c - (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { - /* add a fill/padding byte */ - dhcp->msg_out->options[dhcp->options_out_len++] = 0; - 800d3f4: 687b ldr r3, [r7, #4] - 800d3f6: 691a ldr r2, [r3, #16] - 800d3f8: 687b ldr r3, [r7, #4] - 800d3fa: 8a9b ldrh r3, [r3, #20] - 800d3fc: 1c59 adds r1, r3, #1 - 800d3fe: b288 uxth r0, r1 - 800d400: 6879 ldr r1, [r7, #4] - 800d402: 8288 strh r0, [r1, #20] - 800d404: 4413 add r3, r2 - 800d406: 2200 movs r2, #0 - 800d408: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 - while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && - 800d40c: 687b ldr r3, [r7, #4] - 800d40e: 8a9b ldrh r3, [r3, #20] - 800d410: 2b43 cmp r3, #67 ; 0x43 - 800d412: d905 bls.n 800d420 - 800d414: 687b ldr r3, [r7, #4] - 800d416: 8a9b ldrh r3, [r3, #20] - 800d418: f003 0303 and.w r3, r3, #3 - 800d41c: 2b00 cmp r3, #0 - 800d41e: d003 beq.n 800d428 - (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { - 800d420: 687b ldr r3, [r7, #4] - 800d422: 8a9b ldrh r3, [r3, #20] - while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && - 800d424: 2b43 cmp r3, #67 ; 0x43 - 800d426: d9e5 bls.n 800d3f4 - } -} - 800d428: 3708 adds r7, #8 - 800d42a: 46bd mov sp, r7 - 800d42c: bd80 pop {r7, pc} - 800d42e: bf00 nop - 800d430: 08011f44 .word 0x08011f44 - 800d434: 080123b4 .word 0x080123b4 - 800d438: 08011fa4 .word 0x08011fa4 - 800d43c: 080123d8 .word 0x080123d8 - 800d440: 08012404 .word 0x08012404 - -0800d444 : - * @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), - * 0 otherwise - */ -u8_t -dhcp_supplied_address(const struct netif *netif) -{ - 800d444: b480 push {r7} - 800d446: b085 sub sp, #20 - 800d448: af00 add r7, sp, #0 - 800d44a: 6078 str r0, [r7, #4] - if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { - 800d44c: 687b ldr r3, [r7, #4] - 800d44e: 2b00 cmp r3, #0 - 800d450: d017 beq.n 800d482 - 800d452: 687b ldr r3, [r7, #4] - 800d454: 6a5b ldr r3, [r3, #36] ; 0x24 - 800d456: 2b00 cmp r3, #0 - 800d458: d013 beq.n 800d482 - struct dhcp* dhcp = netif_dhcp_data(netif); - 800d45a: 687b ldr r3, [r7, #4] - 800d45c: 6a5b ldr r3, [r3, #36] ; 0x24 - 800d45e: 60fb str r3, [r7, #12] - return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || - 800d460: 68fb ldr r3, [r7, #12] - 800d462: 7a5b ldrb r3, [r3, #9] - 800d464: 2b0a cmp r3, #10 - 800d466: d007 beq.n 800d478 - 800d468: 68fb ldr r3, [r7, #12] - 800d46a: 7a5b ldrb r3, [r3, #9] - 800d46c: 2b05 cmp r3, #5 - 800d46e: d003 beq.n 800d478 - (dhcp->state == DHCP_STATE_REBINDING); - 800d470: 68fb ldr r3, [r7, #12] - 800d472: 7a5b ldrb r3, [r3, #9] - return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || - 800d474: 2b04 cmp r3, #4 - 800d476: d101 bne.n 800d47c - 800d478: 2301 movs r3, #1 - 800d47a: e000 b.n 800d47e - 800d47c: 2300 movs r3, #0 - 800d47e: b2db uxtb r3, r3 - 800d480: e000 b.n 800d484 - } - return 0; - 800d482: 2300 movs r3, #0 -} - 800d484: 4618 mov r0, r3 - 800d486: 3714 adds r7, #20 - 800d488: 46bd mov sp, r7 - 800d48a: bc80 pop {r7} - 800d48c: 4770 bx lr - ... - -0800d490 : -#endif /* ARP_QUEUEING */ - -/** Clean up ARP table entries */ -static void -etharp_free_entry(int i) -{ - 800d490: b580 push {r7, lr} - 800d492: b082 sub sp, #8 - 800d494: af00 add r7, sp, #0 - 800d496: 6078 str r0, [r7, #4] - /* 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) { - 800d498: 4915 ldr r1, [pc, #84] ; (800d4f0 ) - 800d49a: 687a ldr r2, [r7, #4] - 800d49c: 4613 mov r3, r2 - 800d49e: 005b lsls r3, r3, #1 - 800d4a0: 4413 add r3, r2 - 800d4a2: 00db lsls r3, r3, #3 - 800d4a4: 440b add r3, r1 - 800d4a6: 681b ldr r3, [r3, #0] - 800d4a8: 2b00 cmp r3, #0 - 800d4aa: d013 beq.n 800d4d4 - /* 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); - 800d4ac: 4910 ldr r1, [pc, #64] ; (800d4f0 ) - 800d4ae: 687a ldr r2, [r7, #4] - 800d4b0: 4613 mov r3, r2 - 800d4b2: 005b lsls r3, r3, #1 - 800d4b4: 4413 add r3, r2 - 800d4b6: 00db lsls r3, r3, #3 - 800d4b8: 440b add r3, r1 - 800d4ba: 681b ldr r3, [r3, #0] - 800d4bc: 4618 mov r0, r3 - 800d4be: f7f8 fedf bl 8006280 - arp_table[i].q = NULL; - 800d4c2: 490b ldr r1, [pc, #44] ; (800d4f0 ) - 800d4c4: 687a ldr r2, [r7, #4] - 800d4c6: 4613 mov r3, r2 - 800d4c8: 005b lsls r3, r3, #1 - 800d4ca: 4413 add r3, r2 - 800d4cc: 00db lsls r3, r3, #3 - 800d4ce: 440b add r3, r1 - 800d4d0: 2200 movs r2, #0 - 800d4d2: 601a str r2, [r3, #0] - } - /* recycle entry for re-use */ - arp_table[i].state = ETHARP_STATE_EMPTY; - 800d4d4: 4906 ldr r1, [pc, #24] ; (800d4f0 ) - 800d4d6: 687a ldr r2, [r7, #4] - 800d4d8: 4613 mov r3, r2 - 800d4da: 005b lsls r3, r3, #1 - 800d4dc: 4413 add r3, r2 - 800d4de: 00db lsls r3, r3, #3 - 800d4e0: 440b add r3, r1 - 800d4e2: 3314 adds r3, #20 - 800d4e4: 2200 movs r2, #0 - 800d4e6: 701a strb r2, [r3, #0] - arp_table[i].ctime = 0; - arp_table[i].netif = NULL; - ip4_addr_set_zero(&arp_table[i].ipaddr); - arp_table[i].ethaddr = ethzero; -#endif /* LWIP_DEBUG */ -} - 800d4e8: bf00 nop - 800d4ea: 3708 adds r7, #8 - 800d4ec: 46bd mov sp, r7 - 800d4ee: bd80 pop {r7, pc} - 800d4f0: 20006df8 .word 0x20006df8 - -0800d4f4 : - * This function should be called every ARP_TMR_INTERVAL milliseconds (1 second), - * in order to expire entries in the ARP table. - */ -void -etharp_tmr(void) -{ - 800d4f4: b580 push {r7, lr} - 800d4f6: b082 sub sp, #8 - 800d4f8: af00 add r7, sp, #0 - u8_t i; - - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); - /* remove expired entries from the ARP table */ - for (i = 0; i < ARP_TABLE_SIZE; ++i) { - 800d4fa: 2300 movs r3, #0 - 800d4fc: 71fb strb r3, [r7, #7] - 800d4fe: e096 b.n 800d62e - u8_t state = arp_table[i].state; - 800d500: 79fa ldrb r2, [r7, #7] - 800d502: 494f ldr r1, [pc, #316] ; (800d640 ) - 800d504: 4613 mov r3, r2 - 800d506: 005b lsls r3, r3, #1 - 800d508: 4413 add r3, r2 - 800d50a: 00db lsls r3, r3, #3 - 800d50c: 440b add r3, r1 - 800d50e: 3314 adds r3, #20 - 800d510: 781b ldrb r3, [r3, #0] - 800d512: 71bb strb r3, [r7, #6] - if (state != ETHARP_STATE_EMPTY - 800d514: 79bb ldrb r3, [r7, #6] - 800d516: 2b00 cmp r3, #0 - 800d518: f000 8086 beq.w 800d628 -#if ETHARP_SUPPORT_STATIC_ENTRIES - && (state != ETHARP_STATE_STATIC) -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - ) { - arp_table[i].ctime++; - 800d51c: 79fa ldrb r2, [r7, #7] - 800d51e: 4948 ldr r1, [pc, #288] ; (800d640 ) - 800d520: 4613 mov r3, r2 - 800d522: 005b lsls r3, r3, #1 - 800d524: 4413 add r3, r2 - 800d526: 00db lsls r3, r3, #3 - 800d528: 440b add r3, r1 - 800d52a: 3312 adds r3, #18 - 800d52c: 881b ldrh r3, [r3, #0] - 800d52e: 3301 adds r3, #1 - 800d530: b298 uxth r0, r3 - 800d532: 4943 ldr r1, [pc, #268] ; (800d640 ) - 800d534: 4613 mov r3, r2 - 800d536: 005b lsls r3, r3, #1 - 800d538: 4413 add r3, r2 - 800d53a: 00db lsls r3, r3, #3 - 800d53c: 440b add r3, r1 - 800d53e: 3312 adds r3, #18 - 800d540: 4602 mov r2, r0 - 800d542: 801a strh r2, [r3, #0] - if ((arp_table[i].ctime >= ARP_MAXAGE) || - 800d544: 79fa ldrb r2, [r7, #7] - 800d546: 493e ldr r1, [pc, #248] ; (800d640 ) - 800d548: 4613 mov r3, r2 - 800d54a: 005b lsls r3, r3, #1 - 800d54c: 4413 add r3, r2 - 800d54e: 00db lsls r3, r3, #3 - 800d550: 440b add r3, r1 - 800d552: 3312 adds r3, #18 - 800d554: 881b ldrh r3, [r3, #0] - 800d556: f5b3 7f96 cmp.w r3, #300 ; 0x12c - 800d55a: d215 bcs.n 800d588 - ((arp_table[i].state == ETHARP_STATE_PENDING) && - 800d55c: 79fa ldrb r2, [r7, #7] - 800d55e: 4938 ldr r1, [pc, #224] ; (800d640 ) - 800d560: 4613 mov r3, r2 - 800d562: 005b lsls r3, r3, #1 - 800d564: 4413 add r3, r2 - 800d566: 00db lsls r3, r3, #3 - 800d568: 440b add r3, r1 - 800d56a: 3314 adds r3, #20 - 800d56c: 781b ldrb r3, [r3, #0] - if ((arp_table[i].ctime >= ARP_MAXAGE) || - 800d56e: 2b01 cmp r3, #1 - 800d570: d10f bne.n 800d592 - (arp_table[i].ctime >= ARP_MAXPENDING))) { - 800d572: 79fa ldrb r2, [r7, #7] - 800d574: 4932 ldr r1, [pc, #200] ; (800d640 ) - 800d576: 4613 mov r3, r2 - 800d578: 005b lsls r3, r3, #1 - 800d57a: 4413 add r3, r2 - 800d57c: 00db lsls r3, r3, #3 - 800d57e: 440b add r3, r1 - 800d580: 3312 adds r3, #18 - 800d582: 881b ldrh r3, [r3, #0] - ((arp_table[i].state == ETHARP_STATE_PENDING) && - 800d584: 2b04 cmp r3, #4 - 800d586: d904 bls.n 800d592 - /* pending or stable entry has become old! */ - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %"U16_F".\n", - arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", (u16_t)i)); - /* clean up entries that have just been expired */ - etharp_free_entry(i); - 800d588: 79fb ldrb r3, [r7, #7] - 800d58a: 4618 mov r0, r3 - 800d58c: f7ff ff80 bl 800d490 - 800d590: e04a b.n 800d628 - } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { - 800d592: 79fa ldrb r2, [r7, #7] - 800d594: 492a ldr r1, [pc, #168] ; (800d640 ) - 800d596: 4613 mov r3, r2 - 800d598: 005b lsls r3, r3, #1 - 800d59a: 4413 add r3, r2 - 800d59c: 00db lsls r3, r3, #3 - 800d59e: 440b add r3, r1 - 800d5a0: 3314 adds r3, #20 - 800d5a2: 781b ldrb r3, [r3, #0] - 800d5a4: 2b03 cmp r3, #3 - 800d5a6: d10a bne.n 800d5be - /* Don't send more than one request every 2 seconds. */ - arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; - 800d5a8: 79fa ldrb r2, [r7, #7] - 800d5aa: 4925 ldr r1, [pc, #148] ; (800d640 ) - 800d5ac: 4613 mov r3, r2 - 800d5ae: 005b lsls r3, r3, #1 - 800d5b0: 4413 add r3, r2 - 800d5b2: 00db lsls r3, r3, #3 - 800d5b4: 440b add r3, r1 - 800d5b6: 3314 adds r3, #20 - 800d5b8: 2204 movs r2, #4 - 800d5ba: 701a strb r2, [r3, #0] - 800d5bc: e034 b.n 800d628 - } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { - 800d5be: 79fa ldrb r2, [r7, #7] - 800d5c0: 491f ldr r1, [pc, #124] ; (800d640 ) - 800d5c2: 4613 mov r3, r2 - 800d5c4: 005b lsls r3, r3, #1 - 800d5c6: 4413 add r3, r2 - 800d5c8: 00db lsls r3, r3, #3 - 800d5ca: 440b add r3, r1 - 800d5cc: 3314 adds r3, #20 - 800d5ce: 781b ldrb r3, [r3, #0] - 800d5d0: 2b04 cmp r3, #4 - 800d5d2: d10a bne.n 800d5ea - /* Reset state to stable, so that the next transmitted packet will - re-send an ARP request. */ - arp_table[i].state = ETHARP_STATE_STABLE; - 800d5d4: 79fa ldrb r2, [r7, #7] - 800d5d6: 491a ldr r1, [pc, #104] ; (800d640 ) - 800d5d8: 4613 mov r3, r2 - 800d5da: 005b lsls r3, r3, #1 - 800d5dc: 4413 add r3, r2 - 800d5de: 00db lsls r3, r3, #3 - 800d5e0: 440b add r3, r1 - 800d5e2: 3314 adds r3, #20 - 800d5e4: 2202 movs r2, #2 - 800d5e6: 701a strb r2, [r3, #0] - 800d5e8: e01e b.n 800d628 - } else if (arp_table[i].state == ETHARP_STATE_PENDING) { - 800d5ea: 79fa ldrb r2, [r7, #7] - 800d5ec: 4914 ldr r1, [pc, #80] ; (800d640 ) - 800d5ee: 4613 mov r3, r2 - 800d5f0: 005b lsls r3, r3, #1 - 800d5f2: 4413 add r3, r2 - 800d5f4: 00db lsls r3, r3, #3 - 800d5f6: 440b add r3, r1 - 800d5f8: 3314 adds r3, #20 - 800d5fa: 781b ldrb r3, [r3, #0] - 800d5fc: 2b01 cmp r3, #1 - 800d5fe: d113 bne.n 800d628 - /* still pending, resend an ARP query */ - etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); - 800d600: 79fa ldrb r2, [r7, #7] - 800d602: 490f ldr r1, [pc, #60] ; (800d640 ) - 800d604: 4613 mov r3, r2 - 800d606: 005b lsls r3, r3, #1 - 800d608: 4413 add r3, r2 - 800d60a: 00db lsls r3, r3, #3 - 800d60c: 440b add r3, r1 - 800d60e: 3308 adds r3, #8 - 800d610: 6818 ldr r0, [r3, #0] - 800d612: 79fa ldrb r2, [r7, #7] - 800d614: 4613 mov r3, r2 - 800d616: 005b lsls r3, r3, #1 - 800d618: 4413 add r3, r2 - 800d61a: 00db lsls r3, r3, #3 - 800d61c: 4a08 ldr r2, [pc, #32] ; (800d640 ) - 800d61e: 4413 add r3, r2 - 800d620: 3304 adds r3, #4 - 800d622: 4619 mov r1, r3 - 800d624: f000 fe3c bl 800e2a0 - for (i = 0; i < ARP_TABLE_SIZE; ++i) { - 800d628: 79fb ldrb r3, [r7, #7] - 800d62a: 3301 adds r3, #1 - 800d62c: 71fb strb r3, [r7, #7] - 800d62e: 79fb ldrb r3, [r7, #7] - 800d630: 2b09 cmp r3, #9 - 800d632: f67f af65 bls.w 800d500 - } - } - } -} - 800d636: bf00 nop - 800d638: bf00 nop - 800d63a: 3708 adds r7, #8 - 800d63c: 46bd mov sp, r7 - 800d63e: bd80 pop {r7, pc} - 800d640: 20006df8 .word 0x20006df8 - -0800d644 : - * @return The ARP entry index that matched or is created, ERR_MEM if no - * entry is found or could be recycled. - */ -static s8_t -etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) -{ - 800d644: b580 push {r7, lr} - 800d646: b088 sub sp, #32 - 800d648: af00 add r7, sp, #0 - 800d64a: 60f8 str r0, [r7, #12] - 800d64c: 460b mov r3, r1 - 800d64e: 607a str r2, [r7, #4] - 800d650: 72fb strb r3, [r7, #11] - s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; - 800d652: 230a movs r3, #10 - 800d654: 77fb strb r3, [r7, #31] - 800d656: 230a movs r3, #10 - 800d658: 77bb strb r3, [r7, #30] - s8_t empty = ARP_TABLE_SIZE; - 800d65a: 230a movs r3, #10 - 800d65c: 777b strb r3, [r7, #29] - u8_t i = 0; - 800d65e: 2300 movs r3, #0 - 800d660: 773b strb r3, [r7, #28] - /* oldest entry with packets on queue */ - s8_t old_queue = ARP_TABLE_SIZE; - 800d662: 230a movs r3, #10 - 800d664: 76fb strb r3, [r7, #27] - /* its age */ - u16_t age_queue = 0, age_pending = 0, age_stable = 0; - 800d666: 2300 movs r3, #0 - 800d668: 833b strh r3, [r7, #24] - 800d66a: 2300 movs r3, #0 - 800d66c: 82fb strh r3, [r7, #22] - 800d66e: 2300 movs r3, #0 - 800d670: 82bb strh r3, [r7, #20] - * 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) { - 800d672: 2300 movs r3, #0 - 800d674: 773b strb r3, [r7, #28] - 800d676: e093 b.n 800d7a0 - u8_t state = arp_table[i].state; - 800d678: 7f3a ldrb r2, [r7, #28] - 800d67a: 4990 ldr r1, [pc, #576] ; (800d8bc ) - 800d67c: 4613 mov r3, r2 - 800d67e: 005b lsls r3, r3, #1 - 800d680: 4413 add r3, r2 - 800d682: 00db lsls r3, r3, #3 - 800d684: 440b add r3, r1 - 800d686: 3314 adds r3, #20 - 800d688: 781b ldrb r3, [r3, #0] - 800d68a: 74fb strb r3, [r7, #19] - /* no empty entry found yet and now we do find one? */ - if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { - 800d68c: f997 301d ldrsb.w r3, [r7, #29] - 800d690: 2b0a cmp r3, #10 - 800d692: d105 bne.n 800d6a0 - 800d694: 7cfb ldrb r3, [r7, #19] - 800d696: 2b00 cmp r3, #0 - 800d698: d102 bne.n 800d6a0 - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); - /* remember first empty entry */ - empty = i; - 800d69a: 7f3b ldrb r3, [r7, #28] - 800d69c: 777b strb r3, [r7, #29] - 800d69e: e07c b.n 800d79a - } else if (state != ETHARP_STATE_EMPTY) { - 800d6a0: 7cfb ldrb r3, [r7, #19] - 800d6a2: 2b00 cmp r3, #0 - 800d6a4: d079 beq.n 800d79a - LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", - 800d6a6: 7cfb ldrb r3, [r7, #19] - 800d6a8: 2b01 cmp r3, #1 - 800d6aa: d009 beq.n 800d6c0 - 800d6ac: 7cfb ldrb r3, [r7, #19] - 800d6ae: 2b01 cmp r3, #1 - 800d6b0: d806 bhi.n 800d6c0 - 800d6b2: 4b83 ldr r3, [pc, #524] ; (800d8c0 ) - 800d6b4: f240 1225 movw r2, #293 ; 0x125 - 800d6b8: 4982 ldr r1, [pc, #520] ; (800d8c4 ) - 800d6ba: 4883 ldr r0, [pc, #524] ; (800d8c8 ) - 800d6bc: f002 fa02 bl 800fac4 - 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) - 800d6c0: 68fb ldr r3, [r7, #12] - 800d6c2: 2b00 cmp r3, #0 - 800d6c4: d00f beq.n 800d6e6 - 800d6c6: 68fb ldr r3, [r7, #12] - 800d6c8: 6819 ldr r1, [r3, #0] - 800d6ca: 7f3a ldrb r2, [r7, #28] - 800d6cc: 487b ldr r0, [pc, #492] ; (800d8bc ) - 800d6ce: 4613 mov r3, r2 - 800d6d0: 005b lsls r3, r3, #1 - 800d6d2: 4413 add r3, r2 - 800d6d4: 00db lsls r3, r3, #3 - 800d6d6: 4403 add r3, r0 - 800d6d8: 3304 adds r3, #4 - 800d6da: 681b ldr r3, [r3, #0] - 800d6dc: 4299 cmp r1, r3 - 800d6de: d102 bne.n 800d6e6 - && ((netif == NULL) || (netif == arp_table[i].netif)) -#endif /* ETHARP_TABLE_MATCH_NETIF */ - ) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %"U16_F"\n", (u16_t)i)); - /* found exact IP address match, simply bail out */ - return i; - 800d6e0: f997 301c ldrsb.w r3, [r7, #28] - 800d6e4: e0e5 b.n 800d8b2 - } - /* pending entry? */ - if (state == ETHARP_STATE_PENDING) { - 800d6e6: 7cfb ldrb r3, [r7, #19] - 800d6e8: 2b01 cmp r3, #1 - 800d6ea: d13b bne.n 800d764 - /* pending with queued packets? */ - if (arp_table[i].q != NULL) { - 800d6ec: 7f3a ldrb r2, [r7, #28] - 800d6ee: 4973 ldr r1, [pc, #460] ; (800d8bc ) - 800d6f0: 4613 mov r3, r2 - 800d6f2: 005b lsls r3, r3, #1 - 800d6f4: 4413 add r3, r2 - 800d6f6: 00db lsls r3, r3, #3 - 800d6f8: 440b add r3, r1 - 800d6fa: 681b ldr r3, [r3, #0] - 800d6fc: 2b00 cmp r3, #0 - 800d6fe: d018 beq.n 800d732 - if (arp_table[i].ctime >= age_queue) { - 800d700: 7f3a ldrb r2, [r7, #28] - 800d702: 496e ldr r1, [pc, #440] ; (800d8bc ) - 800d704: 4613 mov r3, r2 - 800d706: 005b lsls r3, r3, #1 - 800d708: 4413 add r3, r2 - 800d70a: 00db lsls r3, r3, #3 - 800d70c: 440b add r3, r1 - 800d70e: 3312 adds r3, #18 - 800d710: 881b ldrh r3, [r3, #0] - 800d712: 8b3a ldrh r2, [r7, #24] - 800d714: 429a cmp r2, r3 - 800d716: d840 bhi.n 800d79a - old_queue = i; - 800d718: 7f3b ldrb r3, [r7, #28] - 800d71a: 76fb strb r3, [r7, #27] - age_queue = arp_table[i].ctime; - 800d71c: 7f3a ldrb r2, [r7, #28] - 800d71e: 4967 ldr r1, [pc, #412] ; (800d8bc ) - 800d720: 4613 mov r3, r2 - 800d722: 005b lsls r3, r3, #1 - 800d724: 4413 add r3, r2 - 800d726: 00db lsls r3, r3, #3 - 800d728: 440b add r3, r1 - 800d72a: 3312 adds r3, #18 - 800d72c: 881b ldrh r3, [r3, #0] - 800d72e: 833b strh r3, [r7, #24] - 800d730: e033 b.n 800d79a - } - } else - /* pending without queued packets? */ - { - if (arp_table[i].ctime >= age_pending) { - 800d732: 7f3a ldrb r2, [r7, #28] - 800d734: 4961 ldr r1, [pc, #388] ; (800d8bc ) - 800d736: 4613 mov r3, r2 - 800d738: 005b lsls r3, r3, #1 - 800d73a: 4413 add r3, r2 - 800d73c: 00db lsls r3, r3, #3 - 800d73e: 440b add r3, r1 - 800d740: 3312 adds r3, #18 - 800d742: 881b ldrh r3, [r3, #0] - 800d744: 8afa ldrh r2, [r7, #22] - 800d746: 429a cmp r2, r3 - 800d748: d827 bhi.n 800d79a - old_pending = i; - 800d74a: 7f3b ldrb r3, [r7, #28] - 800d74c: 77fb strb r3, [r7, #31] - age_pending = arp_table[i].ctime; - 800d74e: 7f3a ldrb r2, [r7, #28] - 800d750: 495a ldr r1, [pc, #360] ; (800d8bc ) - 800d752: 4613 mov r3, r2 - 800d754: 005b lsls r3, r3, #1 - 800d756: 4413 add r3, r2 - 800d758: 00db lsls r3, r3, #3 - 800d75a: 440b add r3, r1 - 800d75c: 3312 adds r3, #18 - 800d75e: 881b ldrh r3, [r3, #0] - 800d760: 82fb strh r3, [r7, #22] - 800d762: e01a b.n 800d79a - } - } - /* stable entry? */ - } else if (state >= ETHARP_STATE_STABLE) { - 800d764: 7cfb ldrb r3, [r7, #19] - 800d766: 2b01 cmp r3, #1 - 800d768: d917 bls.n 800d79a - /* 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) { - 800d76a: 7f3a ldrb r2, [r7, #28] - 800d76c: 4953 ldr r1, [pc, #332] ; (800d8bc ) - 800d76e: 4613 mov r3, r2 - 800d770: 005b lsls r3, r3, #1 - 800d772: 4413 add r3, r2 - 800d774: 00db lsls r3, r3, #3 - 800d776: 440b add r3, r1 - 800d778: 3312 adds r3, #18 - 800d77a: 881b ldrh r3, [r3, #0] - 800d77c: 8aba ldrh r2, [r7, #20] - 800d77e: 429a cmp r2, r3 - 800d780: d80b bhi.n 800d79a - old_stable = i; - 800d782: 7f3b ldrb r3, [r7, #28] - 800d784: 77bb strb r3, [r7, #30] - age_stable = arp_table[i].ctime; - 800d786: 7f3a ldrb r2, [r7, #28] - 800d788: 494c ldr r1, [pc, #304] ; (800d8bc ) - 800d78a: 4613 mov r3, r2 - 800d78c: 005b lsls r3, r3, #1 - 800d78e: 4413 add r3, r2 - 800d790: 00db lsls r3, r3, #3 - 800d792: 440b add r3, r1 - 800d794: 3312 adds r3, #18 - 800d796: 881b ldrh r3, [r3, #0] - 800d798: 82bb strh r3, [r7, #20] - for (i = 0; i < ARP_TABLE_SIZE; ++i) { - 800d79a: 7f3b ldrb r3, [r7, #28] - 800d79c: 3301 adds r3, #1 - 800d79e: 773b strb r3, [r7, #28] - 800d7a0: 7f3b ldrb r3, [r7, #28] - 800d7a2: 2b09 cmp r3, #9 - 800d7a4: f67f af68 bls.w 800d678 - } - } - /* { we have no match } => try to create a new entry */ - - /* don't create new entry, only search? */ - if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || - 800d7a8: 7afb ldrb r3, [r7, #11] - 800d7aa: f003 0302 and.w r3, r3, #2 - 800d7ae: 2b00 cmp r3, #0 - 800d7b0: d108 bne.n 800d7c4 - 800d7b2: f997 301d ldrsb.w r3, [r7, #29] - 800d7b6: 2b0a cmp r3, #10 - 800d7b8: d107 bne.n 800d7ca - /* or no empty entry found and not allowed to recycle? */ - ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { - 800d7ba: 7afb ldrb r3, [r7, #11] - 800d7bc: f003 0301 and.w r3, r3, #1 - 800d7c0: 2b00 cmp r3, #0 - 800d7c2: d102 bne.n 800d7ca - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n")); - return (s8_t)ERR_MEM; - 800d7c4: f04f 33ff mov.w r3, #4294967295 - 800d7c8: e073 b.n 800d8b2 - * - * { ETHARP_FLAG_TRY_HARD is set at this point } - */ - - /* 1) empty entry available? */ - if (empty < ARP_TABLE_SIZE) { - 800d7ca: f997 301d ldrsb.w r3, [r7, #29] - 800d7ce: 2b09 cmp r3, #9 - 800d7d0: dc02 bgt.n 800d7d8 - i = empty; - 800d7d2: 7f7b ldrb r3, [r7, #29] - 800d7d4: 773b strb r3, [r7, #28] - 800d7d6: e036 b.n 800d846 - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %"U16_F"\n", (u16_t)i)); - } else { - /* 2) found recyclable stable entry? */ - if (old_stable < ARP_TABLE_SIZE) { - 800d7d8: f997 301e ldrsb.w r3, [r7, #30] - 800d7dc: 2b09 cmp r3, #9 - 800d7de: dc13 bgt.n 800d808 - /* recycle oldest stable*/ - i = old_stable; - 800d7e0: 7fbb ldrb r3, [r7, #30] - 800d7e2: 773b strb r3, [r7, #28] - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %"U16_F"\n", (u16_t)i)); - /* no queued packets should exist on stable entries */ - LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); - 800d7e4: 7f3a ldrb r2, [r7, #28] - 800d7e6: 4935 ldr r1, [pc, #212] ; (800d8bc ) - 800d7e8: 4613 mov r3, r2 - 800d7ea: 005b lsls r3, r3, #1 - 800d7ec: 4413 add r3, r2 - 800d7ee: 00db lsls r3, r3, #3 - 800d7f0: 440b add r3, r1 - 800d7f2: 681b ldr r3, [r3, #0] - 800d7f4: 2b00 cmp r3, #0 - 800d7f6: d018 beq.n 800d82a - 800d7f8: 4b31 ldr r3, [pc, #196] ; (800d8c0 ) - 800d7fa: f240 126f movw r2, #367 ; 0x16f - 800d7fe: 4933 ldr r1, [pc, #204] ; (800d8cc ) - 800d800: 4831 ldr r0, [pc, #196] ; (800d8c8 ) - 800d802: f002 f95f bl 800fac4 - 800d806: e010 b.n 800d82a - /* 3) found recyclable pending entry without queued packets? */ - } else if (old_pending < ARP_TABLE_SIZE) { - 800d808: f997 301f ldrsb.w r3, [r7, #31] - 800d80c: 2b09 cmp r3, #9 - 800d80e: dc02 bgt.n 800d816 - /* recycle oldest pending */ - i = old_pending; - 800d810: 7ffb ldrb r3, [r7, #31] - 800d812: 773b strb r3, [r7, #28] - 800d814: e009 b.n 800d82a - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F" (without queue)\n", (u16_t)i)); - /* 4) found recyclable pending entry with queued packets? */ - } else if (old_queue < ARP_TABLE_SIZE) { - 800d816: f997 301b ldrsb.w r3, [r7, #27] - 800d81a: 2b09 cmp r3, #9 - 800d81c: dc02 bgt.n 800d824 - /* recycle oldest pending (queued packets are free in etharp_free_entry) */ - i = old_queue; - 800d81e: 7efb ldrb r3, [r7, #27] - 800d820: 773b strb r3, [r7, #28] - 800d822: e002 b.n 800d82a - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F", freeing packet queue %p\n", (u16_t)i, (void *)(arp_table[i].q))); - /* no empty or recyclable entries found */ - } else { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty or recyclable entries found\n")); - return (s8_t)ERR_MEM; - 800d824: f04f 33ff mov.w r3, #4294967295 - 800d828: e043 b.n 800d8b2 - } - - /* { empty or recyclable entry found } */ - LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); - 800d82a: 7f3b ldrb r3, [r7, #28] - 800d82c: 2b09 cmp r3, #9 - 800d82e: d906 bls.n 800d83e - 800d830: 4b23 ldr r3, [pc, #140] ; (800d8c0 ) - 800d832: f240 1281 movw r2, #385 ; 0x181 - 800d836: 4926 ldr r1, [pc, #152] ; (800d8d0 ) - 800d838: 4823 ldr r0, [pc, #140] ; (800d8c8 ) - 800d83a: f002 f943 bl 800fac4 - etharp_free_entry(i); - 800d83e: 7f3b ldrb r3, [r7, #28] - 800d840: 4618 mov r0, r3 - 800d842: f7ff fe25 bl 800d490 - } - - LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); - 800d846: 7f3b ldrb r3, [r7, #28] - 800d848: 2b09 cmp r3, #9 - 800d84a: d906 bls.n 800d85a - 800d84c: 4b1c ldr r3, [pc, #112] ; (800d8c0 ) - 800d84e: f240 1285 movw r2, #389 ; 0x185 - 800d852: 491f ldr r1, [pc, #124] ; (800d8d0 ) - 800d854: 481c ldr r0, [pc, #112] ; (800d8c8 ) - 800d856: f002 f935 bl 800fac4 - LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", - 800d85a: 7f3a ldrb r2, [r7, #28] - 800d85c: 4917 ldr r1, [pc, #92] ; (800d8bc ) - 800d85e: 4613 mov r3, r2 - 800d860: 005b lsls r3, r3, #1 - 800d862: 4413 add r3, r2 - 800d864: 00db lsls r3, r3, #3 - 800d866: 440b add r3, r1 - 800d868: 3314 adds r3, #20 - 800d86a: 781b ldrb r3, [r3, #0] - 800d86c: 2b00 cmp r3, #0 - 800d86e: d006 beq.n 800d87e - 800d870: 4b13 ldr r3, [pc, #76] ; (800d8c0 ) - 800d872: f44f 72c3 mov.w r2, #390 ; 0x186 - 800d876: 4917 ldr r1, [pc, #92] ; (800d8d4 ) - 800d878: 4813 ldr r0, [pc, #76] ; (800d8c8 ) - 800d87a: f002 f923 bl 800fac4 - arp_table[i].state == ETHARP_STATE_EMPTY); - - /* IP address given? */ - if (ipaddr != NULL) { - 800d87e: 68fb ldr r3, [r7, #12] - 800d880: 2b00 cmp r3, #0 - 800d882: d00a beq.n 800d89a - /* set IP address */ - ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); - 800d884: 7f3a ldrb r2, [r7, #28] - 800d886: 68fb ldr r3, [r7, #12] - 800d888: 6819 ldr r1, [r3, #0] - 800d88a: 480c ldr r0, [pc, #48] ; (800d8bc ) - 800d88c: 4613 mov r3, r2 - 800d88e: 005b lsls r3, r3, #1 - 800d890: 4413 add r3, r2 - 800d892: 00db lsls r3, r3, #3 - 800d894: 4403 add r3, r0 - 800d896: 3304 adds r3, #4 - 800d898: 6019 str r1, [r3, #0] - } - arp_table[i].ctime = 0; - 800d89a: 7f3a ldrb r2, [r7, #28] - 800d89c: 4907 ldr r1, [pc, #28] ; (800d8bc ) - 800d89e: 4613 mov r3, r2 - 800d8a0: 005b lsls r3, r3, #1 - 800d8a2: 4413 add r3, r2 - 800d8a4: 00db lsls r3, r3, #3 - 800d8a6: 440b add r3, r1 - 800d8a8: 3312 adds r3, #18 - 800d8aa: 2200 movs r2, #0 - 800d8ac: 801a strh r2, [r3, #0] -#if ETHARP_TABLE_MATCH_NETIF - arp_table[i].netif = netif; -#endif /* ETHARP_TABLE_MATCH_NETIF*/ - return (err_t)i; - 800d8ae: f997 301c ldrsb.w r3, [r7, #28] -} - 800d8b2: 4618 mov r0, r3 - 800d8b4: 3720 adds r7, #32 - 800d8b6: 46bd mov sp, r7 - 800d8b8: bd80 pop {r7, pc} - 800d8ba: bf00 nop - 800d8bc: 20006df8 .word 0x20006df8 - 800d8c0: 08012444 .word 0x08012444 - 800d8c4: 0801247c .word 0x0801247c - 800d8c8: 080124bc .word 0x080124bc - 800d8cc: 080124e4 .word 0x080124e4 - 800d8d0: 080124fc .word 0x080124fc - 800d8d4: 08012510 .word 0x08012510 - -0800d8d8 : - * - * @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) -{ - 800d8d8: b580 push {r7, lr} - 800d8da: b088 sub sp, #32 - 800d8dc: af02 add r7, sp, #8 - 800d8de: 60f8 str r0, [r7, #12] - 800d8e0: 60b9 str r1, [r7, #8] - 800d8e2: 607a str r2, [r7, #4] - 800d8e4: 70fb strb r3, [r7, #3] - s8_t i; - LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); - 800d8e6: 68fb ldr r3, [r7, #12] - 800d8e8: f893 302c ldrb.w r3, [r3, #44] ; 0x2c - 800d8ec: 2b06 cmp r3, #6 - 800d8ee: d006 beq.n 800d8fe - 800d8f0: 4b48 ldr r3, [pc, #288] ; (800da14 ) - 800d8f2: f240 12ab movw r2, #427 ; 0x1ab - 800d8f6: 4948 ldr r1, [pc, #288] ; (800da18 ) - 800d8f8: 4848 ldr r0, [pc, #288] ; (800da1c ) - 800d8fa: f002 f8e3 bl 800fac4 - 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) || - 800d8fe: 68bb ldr r3, [r7, #8] - 800d900: 2b00 cmp r3, #0 - 800d902: d012 beq.n 800d92a - 800d904: 68bb ldr r3, [r7, #8] - 800d906: 681b ldr r3, [r3, #0] - 800d908: 2b00 cmp r3, #0 - 800d90a: d00e beq.n 800d92a - ip4_addr_isbroadcast(ipaddr, netif) || - 800d90c: 68bb ldr r3, [r7, #8] - 800d90e: 681b ldr r3, [r3, #0] - 800d910: 68f9 ldr r1, [r7, #12] - 800d912: 4618 mov r0, r3 - 800d914: f001 f8fe bl 800eb14 - 800d918: 4603 mov r3, r0 - if (ip4_addr_isany(ipaddr) || - 800d91a: 2b00 cmp r3, #0 - 800d91c: d105 bne.n 800d92a - ip4_addr_ismulticast(ipaddr)) { - 800d91e: 68bb ldr r3, [r7, #8] - 800d920: 681b ldr r3, [r3, #0] - 800d922: f003 03f0 and.w r3, r3, #240 ; 0xf0 - ip4_addr_isbroadcast(ipaddr, netif) || - 800d926: 2be0 cmp r3, #224 ; 0xe0 - 800d928: d102 bne.n 800d930 - 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; - 800d92a: f06f 030f mvn.w r3, #15 - 800d92e: e06c b.n 800da0a - } - /* find or create ARP entry */ - i = etharp_find_entry(ipaddr, flags, netif); - 800d930: 78fb ldrb r3, [r7, #3] - 800d932: 68fa ldr r2, [r7, #12] - 800d934: 4619 mov r1, r3 - 800d936: 68b8 ldr r0, [r7, #8] - 800d938: f7ff fe84 bl 800d644 - 800d93c: 4603 mov r3, r0 - 800d93e: 75fb strb r3, [r7, #23] - /* bail out if no entry could be found */ - if (i < 0) { - 800d940: f997 3017 ldrsb.w r3, [r7, #23] - 800d944: 2b00 cmp r3, #0 - 800d946: da02 bge.n 800d94e - return (err_t)i; - 800d948: f997 3017 ldrsb.w r3, [r7, #23] - 800d94c: e05d b.n 800da0a - return ERR_VAL; - } else -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - { - /* mark it stable */ - arp_table[i].state = ETHARP_STATE_STABLE; - 800d94e: f997 2017 ldrsb.w r2, [r7, #23] - 800d952: 4933 ldr r1, [pc, #204] ; (800da20 ) - 800d954: 4613 mov r3, r2 - 800d956: 005b lsls r3, r3, #1 - 800d958: 4413 add r3, r2 - 800d95a: 00db lsls r3, r3, #3 - 800d95c: 440b add r3, r1 - 800d95e: 3314 adds r3, #20 - 800d960: 2202 movs r2, #2 - 800d962: 701a strb r2, [r3, #0] - } - - /* record network interface */ - arp_table[i].netif = netif; - 800d964: f997 2017 ldrsb.w r2, [r7, #23] - 800d968: 492d ldr r1, [pc, #180] ; (800da20 ) - 800d96a: 4613 mov r3, r2 - 800d96c: 005b lsls r3, r3, #1 - 800d96e: 4413 add r3, r2 - 800d970: 00db lsls r3, r3, #3 - 800d972: 440b add r3, r1 - 800d974: 3308 adds r3, #8 - 800d976: 68fa ldr r2, [r7, #12] - 800d978: 601a str r2, [r3, #0] - /* 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", (s16_t)i)); - /* update address */ - ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); - 800d97a: f997 2017 ldrsb.w r2, [r7, #23] - 800d97e: 4613 mov r3, r2 - 800d980: 005b lsls r3, r3, #1 - 800d982: 4413 add r3, r2 - 800d984: 00db lsls r3, r3, #3 - 800d986: 3308 adds r3, #8 - 800d988: 4a25 ldr r2, [pc, #148] ; (800da20 ) - 800d98a: 4413 add r3, r2 - 800d98c: 3304 adds r3, #4 - 800d98e: 2206 movs r2, #6 - 800d990: 6879 ldr r1, [r7, #4] - 800d992: 4618 mov r0, r3 - 800d994: f002 fa04 bl 800fda0 - /* reset time stamp */ - arp_table[i].ctime = 0; - 800d998: f997 2017 ldrsb.w r2, [r7, #23] - 800d99c: 4920 ldr r1, [pc, #128] ; (800da20 ) - 800d99e: 4613 mov r3, r2 - 800d9a0: 005b lsls r3, r3, #1 - 800d9a2: 4413 add r3, r2 - 800d9a4: 00db lsls r3, r3, #3 - 800d9a6: 440b add r3, r1 - 800d9a8: 3312 adds r3, #18 - 800d9aa: 2200 movs r2, #0 - 800d9ac: 801a strh r2, [r3, #0] - /* 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) { - 800d9ae: f997 2017 ldrsb.w r2, [r7, #23] - 800d9b2: 491b ldr r1, [pc, #108] ; (800da20 ) - 800d9b4: 4613 mov r3, r2 - 800d9b6: 005b lsls r3, r3, #1 - 800d9b8: 4413 add r3, r2 - 800d9ba: 00db lsls r3, r3, #3 - 800d9bc: 440b add r3, r1 - 800d9be: 681b ldr r3, [r3, #0] - 800d9c0: 2b00 cmp r3, #0 - 800d9c2: d021 beq.n 800da08 - struct pbuf *p = arp_table[i].q; - 800d9c4: f997 2017 ldrsb.w r2, [r7, #23] - 800d9c8: 4915 ldr r1, [pc, #84] ; (800da20 ) - 800d9ca: 4613 mov r3, r2 - 800d9cc: 005b lsls r3, r3, #1 - 800d9ce: 4413 add r3, r2 - 800d9d0: 00db lsls r3, r3, #3 - 800d9d2: 440b add r3, r1 - 800d9d4: 681b ldr r3, [r3, #0] - 800d9d6: 613b str r3, [r7, #16] - arp_table[i].q = NULL; - 800d9d8: f997 2017 ldrsb.w r2, [r7, #23] - 800d9dc: 4910 ldr r1, [pc, #64] ; (800da20 ) - 800d9de: 4613 mov r3, r2 - 800d9e0: 005b lsls r3, r3, #1 - 800d9e2: 4413 add r3, r2 - 800d9e4: 00db lsls r3, r3, #3 - 800d9e6: 440b add r3, r1 - 800d9e8: 2200 movs r2, #0 - 800d9ea: 601a str r2, [r3, #0] -#endif /* ARP_QUEUEING */ - /* send the queued IP packet */ - ethernet_output(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr, ETHTYPE_IP); - 800d9ec: 68fb ldr r3, [r7, #12] - 800d9ee: f103 022d add.w r2, r3, #45 ; 0x2d - 800d9f2: f44f 6300 mov.w r3, #2048 ; 0x800 - 800d9f6: 9300 str r3, [sp, #0] - 800d9f8: 687b ldr r3, [r7, #4] - 800d9fa: 6939 ldr r1, [r7, #16] - 800d9fc: 68f8 ldr r0, [r7, #12] - 800d9fe: f001 ff2b bl 800f858 - /* free the queued IP packet */ - pbuf_free(p); - 800da02: 6938 ldr r0, [r7, #16] - 800da04: f7f8 fc3c bl 8006280 - } - return ERR_OK; - 800da08: 2300 movs r3, #0 -} - 800da0a: 4618 mov r0, r3 - 800da0c: 3718 adds r7, #24 - 800da0e: 46bd mov sp, r7 - 800da10: bd80 pop {r7, pc} - 800da12: bf00 nop - 800da14: 08012444 .word 0x08012444 - 800da18: 0801253c .word 0x0801253c - 800da1c: 080124bc .word 0x080124bc - 800da20: 20006df8 .word 0x20006df8 - -0800da24 : - * - * @param netif points to a network interface - */ -void -etharp_cleanup_netif(struct netif *netif) -{ - 800da24: b580 push {r7, lr} - 800da26: b084 sub sp, #16 - 800da28: af00 add r7, sp, #0 - 800da2a: 6078 str r0, [r7, #4] - u8_t i; - - for (i = 0; i < ARP_TABLE_SIZE; ++i) { - 800da2c: 2300 movs r3, #0 - 800da2e: 73fb strb r3, [r7, #15] - 800da30: e01f b.n 800da72 - u8_t state = arp_table[i].state; - 800da32: 7bfa ldrb r2, [r7, #15] - 800da34: 4913 ldr r1, [pc, #76] ; (800da84 ) - 800da36: 4613 mov r3, r2 - 800da38: 005b lsls r3, r3, #1 - 800da3a: 4413 add r3, r2 - 800da3c: 00db lsls r3, r3, #3 - 800da3e: 440b add r3, r1 - 800da40: 3314 adds r3, #20 - 800da42: 781b ldrb r3, [r3, #0] - 800da44: 73bb strb r3, [r7, #14] - if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { - 800da46: 7bbb ldrb r3, [r7, #14] - 800da48: 2b00 cmp r3, #0 - 800da4a: d00f beq.n 800da6c - 800da4c: 7bfa ldrb r2, [r7, #15] - 800da4e: 490d ldr r1, [pc, #52] ; (800da84 ) - 800da50: 4613 mov r3, r2 - 800da52: 005b lsls r3, r3, #1 - 800da54: 4413 add r3, r2 - 800da56: 00db lsls r3, r3, #3 - 800da58: 440b add r3, r1 - 800da5a: 3308 adds r3, #8 - 800da5c: 681b ldr r3, [r3, #0] - 800da5e: 687a ldr r2, [r7, #4] - 800da60: 429a cmp r2, r3 - 800da62: d103 bne.n 800da6c - etharp_free_entry(i); - 800da64: 7bfb ldrb r3, [r7, #15] - 800da66: 4618 mov r0, r3 - 800da68: f7ff fd12 bl 800d490 - for (i = 0; i < ARP_TABLE_SIZE; ++i) { - 800da6c: 7bfb ldrb r3, [r7, #15] - 800da6e: 3301 adds r3, #1 - 800da70: 73fb strb r3, [r7, #15] - 800da72: 7bfb ldrb r3, [r7, #15] - 800da74: 2b09 cmp r3, #9 - 800da76: d9dc bls.n 800da32 - } - } -} - 800da78: bf00 nop - 800da7a: bf00 nop - 800da7c: 3710 adds r7, #16 - 800da7e: 46bd mov sp, r7 - 800da80: bd80 pop {r7, pc} - 800da82: bf00 nop - 800da84: 20006df8 .word 0x20006df8 - -0800da88 : - * - * @see pbuf_free() - */ -void -etharp_input(struct pbuf *p, struct netif *netif) -{ - 800da88: b5b0 push {r4, r5, r7, lr} - 800da8a: b08a sub sp, #40 ; 0x28 - 800da8c: af04 add r7, sp, #16 - 800da8e: 6078 str r0, [r7, #4] - 800da90: 6039 str r1, [r7, #0] - struct etharp_hdr *hdr; - /* these are aligned properly, whereas the ARP header fields might not be */ - ip4_addr_t sipaddr, dipaddr; - u8_t for_us; - - LWIP_ERROR("netif != NULL", (netif != NULL), return;); - 800da92: 683b ldr r3, [r7, #0] - 800da94: 2b00 cmp r3, #0 - 800da96: d107 bne.n 800daa8 - 800da98: 4b3f ldr r3, [pc, #252] ; (800db98 ) - 800da9a: f44f 7222 mov.w r2, #648 ; 0x288 - 800da9e: 493f ldr r1, [pc, #252] ; (800db9c ) - 800daa0: 483f ldr r0, [pc, #252] ; (800dba0 ) - 800daa2: f002 f80f bl 800fac4 - 800daa6: e074 b.n 800db92 - - hdr = (struct etharp_hdr *)p->payload; - 800daa8: 687b ldr r3, [r7, #4] - 800daaa: 685b ldr r3, [r3, #4] - 800daac: 613b str r3, [r7, #16] - - /* RFC 826 "Packet Reception": */ - if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || - 800daae: 693b ldr r3, [r7, #16] - 800dab0: 881b ldrh r3, [r3, #0] - 800dab2: b29b uxth r3, r3 - 800dab4: f5b3 7f80 cmp.w r3, #256 ; 0x100 - 800dab8: d10c bne.n 800dad4 - (hdr->hwlen != ETH_HWADDR_LEN) || - 800daba: 693b ldr r3, [r7, #16] - 800dabc: 791b ldrb r3, [r3, #4] - if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || - 800dabe: 2b06 cmp r3, #6 - 800dac0: d108 bne.n 800dad4 - (hdr->protolen != sizeof(ip4_addr_t)) || - 800dac2: 693b ldr r3, [r7, #16] - 800dac4: 795b ldrb r3, [r3, #5] - (hdr->hwlen != ETH_HWADDR_LEN) || - 800dac6: 2b04 cmp r3, #4 - 800dac8: d104 bne.n 800dad4 - (hdr->proto != PP_HTONS(ETHTYPE_IP))) { - 800daca: 693b ldr r3, [r7, #16] - 800dacc: 885b ldrh r3, [r3, #2] - 800dace: b29b uxth r3, r3 - (hdr->protolen != sizeof(ip4_addr_t)) || - 800dad0: 2b08 cmp r3, #8 - 800dad2: d003 beq.n 800dadc - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n", - hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen)); - ETHARP_STATS_INC(etharp.proterr); - ETHARP_STATS_INC(etharp.drop); - pbuf_free(p); - 800dad4: 6878 ldr r0, [r7, #4] - 800dad6: f7f8 fbd3 bl 8006280 - return; - 800dada: e05a b.n 800db92 - autoip_arp_reply(netif, hdr); -#endif /* LWIP_AUTOIP */ - - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without - * structure packing (not using structure copy which breaks strict-aliasing rules). */ - IPADDR2_COPY(&sipaddr, &hdr->sipaddr); - 800dadc: 693b ldr r3, [r7, #16] - 800dade: 330e adds r3, #14 - 800dae0: 681b ldr r3, [r3, #0] - 800dae2: 60fb str r3, [r7, #12] - IPADDR2_COPY(&dipaddr, &hdr->dipaddr); - 800dae4: 693b ldr r3, [r7, #16] - 800dae6: 3318 adds r3, #24 - 800dae8: 681b ldr r3, [r3, #0] - 800daea: 60bb str r3, [r7, #8] - - /* this interface is not configured? */ - if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { - 800daec: 683b ldr r3, [r7, #0] - 800daee: 3304 adds r3, #4 - 800daf0: 681b ldr r3, [r3, #0] - 800daf2: 2b00 cmp r3, #0 - 800daf4: d102 bne.n 800dafc - for_us = 0; - 800daf6: 2300 movs r3, #0 - 800daf8: 75fb strb r3, [r7, #23] - 800dafa: e009 b.n 800db10 - } else { - /* ARP packet directed to us? */ - for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); - 800dafc: 68ba ldr r2, [r7, #8] - 800dafe: 683b ldr r3, [r7, #0] - 800db00: 3304 adds r3, #4 - 800db02: 681b ldr r3, [r3, #0] - 800db04: 429a cmp r2, r3 - 800db06: bf0c ite eq - 800db08: 2301 moveq r3, #1 - 800db0a: 2300 movne r3, #0 - 800db0c: b2db uxtb r3, r3 - 800db0e: 75fb strb r3, [r7, #23] - /* ARP message directed to us? - -> add IP address in ARP cache; assume requester wants to talk to us, - can result in directly sending the queued packets for this host. - ARP message not directed to us? - -> update the source IP address in the cache, if present */ - etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), - 800db10: 693b ldr r3, [r7, #16] - 800db12: f103 0208 add.w r2, r3, #8 - 800db16: 7dfb ldrb r3, [r7, #23] - 800db18: 2b00 cmp r3, #0 - 800db1a: d001 beq.n 800db20 - 800db1c: 2301 movs r3, #1 - 800db1e: e000 b.n 800db22 - 800db20: 2302 movs r3, #2 - 800db22: f107 010c add.w r1, r7, #12 - 800db26: 6838 ldr r0, [r7, #0] - 800db28: f7ff fed6 bl 800d8d8 - for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); - - /* now act on the message itself */ - switch (hdr->opcode) { - 800db2c: 693b ldr r3, [r7, #16] - 800db2e: 88db ldrh r3, [r3, #6] - 800db30: b29b uxth r3, r3 - 800db32: f5b3 7f80 cmp.w r3, #256 ; 0x100 - 800db36: d003 beq.n 800db40 - 800db38: f5b3 7f00 cmp.w r3, #512 ; 0x200 - 800db3c: d01e beq.n 800db7c -#endif /* (LWIP_DHCP && DHCP_DOES_ARP_CHECK) */ - break; - default: - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode))); - ETHARP_STATS_INC(etharp.err); - break; - 800db3e: e025 b.n 800db8c - if (for_us) { - 800db40: 7dfb ldrb r3, [r7, #23] - 800db42: 2b00 cmp r3, #0 - 800db44: d021 beq.n 800db8a - (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, - 800db46: 683b ldr r3, [r7, #0] - 800db48: f103 002d add.w r0, r3, #45 ; 0x2d - 800db4c: 693b ldr r3, [r7, #16] - 800db4e: f103 0408 add.w r4, r3, #8 - (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), - 800db52: 683b ldr r3, [r7, #0] - 800db54: f103 052d add.w r5, r3, #45 ; 0x2d - 800db58: 683b ldr r3, [r7, #0] - 800db5a: 3304 adds r3, #4 - &hdr->shwaddr, &sipaddr, - 800db5c: 693a ldr r2, [r7, #16] - 800db5e: 3208 adds r2, #8 - etharp_raw(netif, - 800db60: 2102 movs r1, #2 - 800db62: 9103 str r1, [sp, #12] - 800db64: f107 010c add.w r1, r7, #12 - 800db68: 9102 str r1, [sp, #8] - 800db6a: 9201 str r2, [sp, #4] - 800db6c: 9300 str r3, [sp, #0] - 800db6e: 462b mov r3, r5 - 800db70: 4622 mov r2, r4 - 800db72: 4601 mov r1, r0 - 800db74: 6838 ldr r0, [r7, #0] - 800db76: f000 fae5 bl 800e144 - break; - 800db7a: e006 b.n 800db8a - dhcp_arp_reply(netif, &sipaddr); - 800db7c: f107 030c add.w r3, r7, #12 - 800db80: 4619 mov r1, r3 - 800db82: 6838 ldr r0, [r7, #0] - 800db84: f7fe f97c bl 800be80 - break; - 800db88: e000 b.n 800db8c - break; - 800db8a: bf00 nop - } - /* free ARP packet */ - pbuf_free(p); - 800db8c: 6878 ldr r0, [r7, #4] - 800db8e: f7f8 fb77 bl 8006280 -} - 800db92: 3718 adds r7, #24 - 800db94: 46bd mov sp, r7 - 800db96: bdb0 pop {r4, r5, r7, pc} - 800db98: 08012444 .word 0x08012444 - 800db9c: 08012594 .word 0x08012594 - 800dba0: 080124bc .word 0x080124bc - -0800dba4 : -/** Just a small helper function that sends a pbuf to an ethernet address - * in the arp_table specified by the index 'arp_idx'. - */ -static err_t -etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) -{ - 800dba4: b580 push {r7, lr} - 800dba6: b086 sub sp, #24 - 800dba8: af02 add r7, sp, #8 - 800dbaa: 60f8 str r0, [r7, #12] - 800dbac: 60b9 str r1, [r7, #8] - 800dbae: 4613 mov r3, r2 - 800dbb0: 71fb strb r3, [r7, #7] - LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", - 800dbb2: 79fa ldrb r2, [r7, #7] - 800dbb4: 4944 ldr r1, [pc, #272] ; (800dcc8 ) - 800dbb6: 4613 mov r3, r2 - 800dbb8: 005b lsls r3, r3, #1 - 800dbba: 4413 add r3, r2 - 800dbbc: 00db lsls r3, r3, #3 - 800dbbe: 440b add r3, r1 - 800dbc0: 3314 adds r3, #20 - 800dbc2: 781b ldrb r3, [r3, #0] - 800dbc4: 2b01 cmp r3, #1 - 800dbc6: d806 bhi.n 800dbd6 - 800dbc8: 4b40 ldr r3, [pc, #256] ; (800dccc ) - 800dbca: f44f 723b mov.w r2, #748 ; 0x2ec - 800dbce: 4940 ldr r1, [pc, #256] ; (800dcd0 ) - 800dbd0: 4840 ldr r0, [pc, #256] ; (800dcd4 ) - 800dbd2: f001 ff77 bl 800fac4 - arp_table[arp_idx].state >= ETHARP_STATE_STABLE); - /* if arp table entry is about to expire: re-request it, - but only if its state is ETHARP_STATE_STABLE to prevent flooding the - network with ARP requests if this address is used frequently. */ - if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) { - 800dbd6: 79fa ldrb r2, [r7, #7] - 800dbd8: 493b ldr r1, [pc, #236] ; (800dcc8 ) - 800dbda: 4613 mov r3, r2 - 800dbdc: 005b lsls r3, r3, #1 - 800dbde: 4413 add r3, r2 - 800dbe0: 00db lsls r3, r3, #3 - 800dbe2: 440b add r3, r1 - 800dbe4: 3314 adds r3, #20 - 800dbe6: 781b ldrb r3, [r3, #0] - 800dbe8: 2b02 cmp r3, #2 - 800dbea: d153 bne.n 800dc94 - if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { - 800dbec: 79fa ldrb r2, [r7, #7] - 800dbee: 4936 ldr r1, [pc, #216] ; (800dcc8 ) - 800dbf0: 4613 mov r3, r2 - 800dbf2: 005b lsls r3, r3, #1 - 800dbf4: 4413 add r3, r2 - 800dbf6: 00db lsls r3, r3, #3 - 800dbf8: 440b add r3, r1 - 800dbfa: 3312 adds r3, #18 - 800dbfc: 881b ldrh r3, [r3, #0] - 800dbfe: f5b3 7f8e cmp.w r3, #284 ; 0x11c - 800dc02: d919 bls.n 800dc38 - /* issue a standard request using broadcast */ - if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { - 800dc04: 79fa ldrb r2, [r7, #7] - 800dc06: 4613 mov r3, r2 - 800dc08: 005b lsls r3, r3, #1 - 800dc0a: 4413 add r3, r2 - 800dc0c: 00db lsls r3, r3, #3 - 800dc0e: 4a2e ldr r2, [pc, #184] ; (800dcc8 ) - 800dc10: 4413 add r3, r2 - 800dc12: 3304 adds r3, #4 - 800dc14: 4619 mov r1, r3 - 800dc16: 68f8 ldr r0, [r7, #12] - 800dc18: f000 fb42 bl 800e2a0 - 800dc1c: 4603 mov r3, r0 - 800dc1e: 2b00 cmp r3, #0 - 800dc20: d138 bne.n 800dc94 - arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; - 800dc22: 79fa ldrb r2, [r7, #7] - 800dc24: 4928 ldr r1, [pc, #160] ; (800dcc8 ) - 800dc26: 4613 mov r3, r2 - 800dc28: 005b lsls r3, r3, #1 - 800dc2a: 4413 add r3, r2 - 800dc2c: 00db lsls r3, r3, #3 - 800dc2e: 440b add r3, r1 - 800dc30: 3314 adds r3, #20 - 800dc32: 2203 movs r2, #3 - 800dc34: 701a strb r2, [r3, #0] - 800dc36: e02d b.n 800dc94 - } - } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { - 800dc38: 79fa ldrb r2, [r7, #7] - 800dc3a: 4923 ldr r1, [pc, #140] ; (800dcc8 ) - 800dc3c: 4613 mov r3, r2 - 800dc3e: 005b lsls r3, r3, #1 - 800dc40: 4413 add r3, r2 - 800dc42: 00db lsls r3, r3, #3 - 800dc44: 440b add r3, r1 - 800dc46: 3312 adds r3, #18 - 800dc48: 881b ldrh r3, [r3, #0] - 800dc4a: f5b3 7f87 cmp.w r3, #270 ; 0x10e - 800dc4e: d321 bcc.n 800dc94 - /* issue a unicast request (for 15 seconds) to prevent unnecessary broadcast */ - if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) { - 800dc50: 79fa ldrb r2, [r7, #7] - 800dc52: 4613 mov r3, r2 - 800dc54: 005b lsls r3, r3, #1 - 800dc56: 4413 add r3, r2 - 800dc58: 00db lsls r3, r3, #3 - 800dc5a: 4a1b ldr r2, [pc, #108] ; (800dcc8 ) - 800dc5c: 4413 add r3, r2 - 800dc5e: 1d19 adds r1, r3, #4 - 800dc60: 79fa ldrb r2, [r7, #7] - 800dc62: 4613 mov r3, r2 - 800dc64: 005b lsls r3, r3, #1 - 800dc66: 4413 add r3, r2 - 800dc68: 00db lsls r3, r3, #3 - 800dc6a: 3308 adds r3, #8 - 800dc6c: 4a16 ldr r2, [pc, #88] ; (800dcc8 ) - 800dc6e: 4413 add r3, r2 - 800dc70: 3304 adds r3, #4 - 800dc72: 461a mov r2, r3 - 800dc74: 68f8 ldr r0, [r7, #12] - 800dc76: f000 faf1 bl 800e25c - 800dc7a: 4603 mov r3, r0 - 800dc7c: 2b00 cmp r3, #0 - 800dc7e: d109 bne.n 800dc94 - arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; - 800dc80: 79fa ldrb r2, [r7, #7] - 800dc82: 4911 ldr r1, [pc, #68] ; (800dcc8 ) - 800dc84: 4613 mov r3, r2 - 800dc86: 005b lsls r3, r3, #1 - 800dc88: 4413 add r3, r2 - 800dc8a: 00db lsls r3, r3, #3 - 800dc8c: 440b add r3, r1 - 800dc8e: 3314 adds r3, #20 - 800dc90: 2203 movs r2, #3 - 800dc92: 701a strb r2, [r3, #0] - } - } - } - - return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); - 800dc94: 68fb ldr r3, [r7, #12] - 800dc96: f103 012d add.w r1, r3, #45 ; 0x2d - 800dc9a: 79fa ldrb r2, [r7, #7] - 800dc9c: 4613 mov r3, r2 - 800dc9e: 005b lsls r3, r3, #1 - 800dca0: 4413 add r3, r2 - 800dca2: 00db lsls r3, r3, #3 - 800dca4: 3308 adds r3, #8 - 800dca6: 4a08 ldr r2, [pc, #32] ; (800dcc8 ) - 800dca8: 4413 add r3, r2 - 800dcaa: 3304 adds r3, #4 - 800dcac: f44f 6200 mov.w r2, #2048 ; 0x800 - 800dcb0: 9200 str r2, [sp, #0] - 800dcb2: 460a mov r2, r1 - 800dcb4: 68b9 ldr r1, [r7, #8] - 800dcb6: 68f8 ldr r0, [r7, #12] - 800dcb8: f001 fdce bl 800f858 - 800dcbc: 4603 mov r3, r0 -} - 800dcbe: 4618 mov r0, r3 - 800dcc0: 3710 adds r7, #16 - 800dcc2: 46bd mov sp, r7 - 800dcc4: bd80 pop {r7, pc} - 800dcc6: bf00 nop - 800dcc8: 20006df8 .word 0x20006df8 - 800dccc: 08012444 .word 0x08012444 - 800dcd0: 080125b4 .word 0x080125b4 - 800dcd4: 080124bc .word 0x080124bc - -0800dcd8 : - * - ERR_RTE No route to destination (no gateway to external networks), - * or the return type of either etharp_query() or ethernet_output(). - */ -err_t -etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) -{ - 800dcd8: b580 push {r7, lr} - 800dcda: b08a sub sp, #40 ; 0x28 - 800dcdc: af02 add r7, sp, #8 - 800dcde: 60f8 str r0, [r7, #12] - 800dce0: 60b9 str r1, [r7, #8] - 800dce2: 607a str r2, [r7, #4] - const struct eth_addr *dest; - struct eth_addr mcastaddr; - const ip4_addr_t *dst_addr = ipaddr; - 800dce4: 687b ldr r3, [r7, #4] - 800dce6: 61bb str r3, [r7, #24] - - LWIP_ASSERT("netif != NULL", netif != NULL); - 800dce8: 68fb ldr r3, [r7, #12] - 800dcea: 2b00 cmp r3, #0 - 800dcec: d106 bne.n 800dcfc - 800dcee: 4b69 ldr r3, [pc, #420] ; (800de94 ) - 800dcf0: f240 321b movw r2, #795 ; 0x31b - 800dcf4: 4968 ldr r1, [pc, #416] ; (800de98 ) - 800dcf6: 4869 ldr r0, [pc, #420] ; (800de9c ) - 800dcf8: f001 fee4 bl 800fac4 - LWIP_ASSERT("q != NULL", q != NULL); - 800dcfc: 68bb ldr r3, [r7, #8] - 800dcfe: 2b00 cmp r3, #0 - 800dd00: d106 bne.n 800dd10 - 800dd02: 4b64 ldr r3, [pc, #400] ; (800de94 ) - 800dd04: f44f 7247 mov.w r2, #796 ; 0x31c - 800dd08: 4965 ldr r1, [pc, #404] ; (800dea0 ) - 800dd0a: 4864 ldr r0, [pc, #400] ; (800de9c ) - 800dd0c: f001 feda bl 800fac4 - LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); - 800dd10: 687b ldr r3, [r7, #4] - 800dd12: 2b00 cmp r3, #0 - 800dd14: d106 bne.n 800dd24 - 800dd16: 4b5f ldr r3, [pc, #380] ; (800de94 ) - 800dd18: f240 321d movw r2, #797 ; 0x31d - 800dd1c: 4961 ldr r1, [pc, #388] ; (800dea4 ) - 800dd1e: 485f ldr r0, [pc, #380] ; (800de9c ) - 800dd20: f001 fed0 bl 800fac4 - - /* Determine on destination hardware address. Broadcasts and multicasts - * are special, other IP addresses are looked up in the ARP table. */ - - /* broadcast destination IP address? */ - if (ip4_addr_isbroadcast(ipaddr, netif)) { - 800dd24: 687b ldr r3, [r7, #4] - 800dd26: 681b ldr r3, [r3, #0] - 800dd28: 68f9 ldr r1, [r7, #12] - 800dd2a: 4618 mov r0, r3 - 800dd2c: f000 fef2 bl 800eb14 - 800dd30: 4603 mov r3, r0 - 800dd32: 2b00 cmp r3, #0 - 800dd34: d002 beq.n 800dd3c - /* broadcast on Ethernet also */ - dest = (const struct eth_addr *)ðbroadcast; - 800dd36: 4b5c ldr r3, [pc, #368] ; (800dea8 ) - 800dd38: 61fb str r3, [r7, #28] - 800dd3a: e09b b.n 800de74 - /* multicast destination IP address? */ - } else if (ip4_addr_ismulticast(ipaddr)) { - 800dd3c: 687b ldr r3, [r7, #4] - 800dd3e: 681b ldr r3, [r3, #0] - 800dd40: f003 03f0 and.w r3, r3, #240 ; 0xf0 - 800dd44: 2be0 cmp r3, #224 ; 0xe0 - 800dd46: d118 bne.n 800dd7a - /* Hash IP multicast address to MAC address.*/ - mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; - 800dd48: 2301 movs r3, #1 - 800dd4a: 743b strb r3, [r7, #16] - mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; - 800dd4c: 2300 movs r3, #0 - 800dd4e: 747b strb r3, [r7, #17] - mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; - 800dd50: 235e movs r3, #94 ; 0x5e - 800dd52: 74bb strb r3, [r7, #18] - mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; - 800dd54: 687b ldr r3, [r7, #4] - 800dd56: 3301 adds r3, #1 - 800dd58: 781b ldrb r3, [r3, #0] - 800dd5a: f003 037f and.w r3, r3, #127 ; 0x7f - 800dd5e: b2db uxtb r3, r3 - 800dd60: 74fb strb r3, [r7, #19] - mcastaddr.addr[4] = ip4_addr3(ipaddr); - 800dd62: 687b ldr r3, [r7, #4] - 800dd64: 3302 adds r3, #2 - 800dd66: 781b ldrb r3, [r3, #0] - 800dd68: 753b strb r3, [r7, #20] - mcastaddr.addr[5] = ip4_addr4(ipaddr); - 800dd6a: 687b ldr r3, [r7, #4] - 800dd6c: 3303 adds r3, #3 - 800dd6e: 781b ldrb r3, [r3, #0] - 800dd70: 757b strb r3, [r7, #21] - /* destination Ethernet address is multicast */ - dest = &mcastaddr; - 800dd72: f107 0310 add.w r3, r7, #16 - 800dd76: 61fb str r3, [r7, #28] - 800dd78: e07c b.n 800de74 - /* unicast destination IP address? */ - } else { - s8_t i; - /* outside local network? if so, this can neither be a global broadcast nor - a subnet broadcast. */ - if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && - 800dd7a: 687b ldr r3, [r7, #4] - 800dd7c: 681a ldr r2, [r3, #0] - 800dd7e: 68fb ldr r3, [r7, #12] - 800dd80: 3304 adds r3, #4 - 800dd82: 681b ldr r3, [r3, #0] - 800dd84: 405a eors r2, r3 - 800dd86: 68fb ldr r3, [r7, #12] - 800dd88: 3308 adds r3, #8 - 800dd8a: 681b ldr r3, [r3, #0] - 800dd8c: 4013 ands r3, r2 - 800dd8e: 2b00 cmp r3, #0 - 800dd90: d012 beq.n 800ddb8 - !ip4_addr_islinklocal(ipaddr)) { - 800dd92: 687b ldr r3, [r7, #4] - 800dd94: 681b ldr r3, [r3, #0] - 800dd96: b29b uxth r3, r3 - if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && - 800dd98: f64f 62a9 movw r2, #65193 ; 0xfea9 - 800dd9c: 4293 cmp r3, r2 - 800dd9e: d00b beq.n 800ddb8 - dst_addr = LWIP_HOOK_ETHARP_GET_GW(netif, ipaddr); - if (dst_addr == NULL) -#endif /* LWIP_HOOK_ETHARP_GET_GW */ - { - /* interface has default gateway? */ - if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) { - 800dda0: 68fb ldr r3, [r7, #12] - 800dda2: 330c adds r3, #12 - 800dda4: 681b ldr r3, [r3, #0] - 800dda6: 2b00 cmp r3, #0 - 800dda8: d003 beq.n 800ddb2 - /* send to hardware address of default gateway IP address */ - dst_addr = netif_ip4_gw(netif); - 800ddaa: 68fb ldr r3, [r7, #12] - 800ddac: 330c adds r3, #12 - 800ddae: 61bb str r3, [r7, #24] - 800ddb0: e002 b.n 800ddb8 - /* no default gateway available */ - } else { - /* no route to destination error (default gateway missing) */ - return ERR_RTE; - 800ddb2: f06f 0303 mvn.w r3, #3 - 800ddb6: e069 b.n 800de8c - if (netif->addr_hint != NULL) { - /* per-pcb cached entry was given */ - u8_t etharp_cached_entry = *(netif->addr_hint); - if (etharp_cached_entry < ARP_TABLE_SIZE) { -#endif /* LWIP_NETIF_HWADDRHINT */ - if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && - 800ddb8: 4b3c ldr r3, [pc, #240] ; (800deac ) - 800ddba: 781b ldrb r3, [r3, #0] - 800ddbc: 4619 mov r1, r3 - 800ddbe: 4a3c ldr r2, [pc, #240] ; (800deb0 ) - 800ddc0: 460b mov r3, r1 - 800ddc2: 005b lsls r3, r3, #1 - 800ddc4: 440b add r3, r1 - 800ddc6: 00db lsls r3, r3, #3 - 800ddc8: 4413 add r3, r2 - 800ddca: 3314 adds r3, #20 - 800ddcc: 781b ldrb r3, [r3, #0] - 800ddce: 2b01 cmp r3, #1 - 800ddd0: d917 bls.n 800de02 -#if ETHARP_TABLE_MATCH_NETIF - (arp_table[etharp_cached_entry].netif == netif) && -#endif - (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { - 800ddd2: 69bb ldr r3, [r7, #24] - 800ddd4: 681a ldr r2, [r3, #0] - 800ddd6: 4b35 ldr r3, [pc, #212] ; (800deac ) - 800ddd8: 781b ldrb r3, [r3, #0] - 800ddda: 4618 mov r0, r3 - 800dddc: 4934 ldr r1, [pc, #208] ; (800deb0 ) - 800ddde: 4603 mov r3, r0 - 800dde0: 005b lsls r3, r3, #1 - 800dde2: 4403 add r3, r0 - 800dde4: 00db lsls r3, r3, #3 - 800dde6: 440b add r3, r1 - 800dde8: 3304 adds r3, #4 - 800ddea: 681b ldr r3, [r3, #0] - if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && - 800ddec: 429a cmp r2, r3 - 800ddee: d108 bne.n 800de02 - /* the per-pcb-cached entry is stable and the right one! */ - ETHARP_STATS_INC(etharp.cachehit); - return etharp_output_to_arp_index(netif, q, etharp_cached_entry); - 800ddf0: 4b2e ldr r3, [pc, #184] ; (800deac ) - 800ddf2: 781b ldrb r3, [r3, #0] - 800ddf4: 461a mov r2, r3 - 800ddf6: 68b9 ldr r1, [r7, #8] - 800ddf8: 68f8 ldr r0, [r7, #12] - 800ddfa: f7ff fed3 bl 800dba4 - 800ddfe: 4603 mov r3, r0 - 800de00: e044 b.n 800de8c - } -#endif /* LWIP_NETIF_HWADDRHINT */ - - /* find stable entry: do this here since this is a critical path for - throughput and etharp_find_entry() is kind of slow */ - for (i = 0; i < ARP_TABLE_SIZE; i++) { - 800de02: 2300 movs r3, #0 - 800de04: 75fb strb r3, [r7, #23] - 800de06: e02a b.n 800de5e - if ((arp_table[i].state >= ETHARP_STATE_STABLE) && - 800de08: f997 2017 ldrsb.w r2, [r7, #23] - 800de0c: 4928 ldr r1, [pc, #160] ; (800deb0 ) - 800de0e: 4613 mov r3, r2 - 800de10: 005b lsls r3, r3, #1 - 800de12: 4413 add r3, r2 - 800de14: 00db lsls r3, r3, #3 - 800de16: 440b add r3, r1 - 800de18: 3314 adds r3, #20 - 800de1a: 781b ldrb r3, [r3, #0] - 800de1c: 2b01 cmp r3, #1 - 800de1e: d918 bls.n 800de52 -#if ETHARP_TABLE_MATCH_NETIF - (arp_table[i].netif == netif) && -#endif - (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { - 800de20: 69bb ldr r3, [r7, #24] - 800de22: 6819 ldr r1, [r3, #0] - 800de24: f997 2017 ldrsb.w r2, [r7, #23] - 800de28: 4821 ldr r0, [pc, #132] ; (800deb0 ) - 800de2a: 4613 mov r3, r2 - 800de2c: 005b lsls r3, r3, #1 - 800de2e: 4413 add r3, r2 - 800de30: 00db lsls r3, r3, #3 - 800de32: 4403 add r3, r0 - 800de34: 3304 adds r3, #4 - 800de36: 681b ldr r3, [r3, #0] - if ((arp_table[i].state >= ETHARP_STATE_STABLE) && - 800de38: 4299 cmp r1, r3 - 800de3a: d10a bne.n 800de52 - /* found an existing, stable entry */ - ETHARP_SET_HINT(netif, i); - 800de3c: 7dfa ldrb r2, [r7, #23] - 800de3e: 4b1b ldr r3, [pc, #108] ; (800deac ) - 800de40: 701a strb r2, [r3, #0] - return etharp_output_to_arp_index(netif, q, i); - 800de42: 7dfb ldrb r3, [r7, #23] - 800de44: 461a mov r2, r3 - 800de46: 68b9 ldr r1, [r7, #8] - 800de48: 68f8 ldr r0, [r7, #12] - 800de4a: f7ff feab bl 800dba4 - 800de4e: 4603 mov r3, r0 - 800de50: e01c b.n 800de8c - for (i = 0; i < ARP_TABLE_SIZE; i++) { - 800de52: f997 3017 ldrsb.w r3, [r7, #23] - 800de56: b2db uxtb r3, r3 - 800de58: 3301 adds r3, #1 - 800de5a: b2db uxtb r3, r3 - 800de5c: 75fb strb r3, [r7, #23] - 800de5e: f997 3017 ldrsb.w r3, [r7, #23] - 800de62: 2b09 cmp r3, #9 - 800de64: ddd0 ble.n 800de08 - } - } - /* no stable entry found, use the (slower) query function: - queue on destination Ethernet address belonging to ipaddr */ - return etharp_query(netif, dst_addr, q); - 800de66: 68ba ldr r2, [r7, #8] - 800de68: 69b9 ldr r1, [r7, #24] - 800de6a: 68f8 ldr r0, [r7, #12] - 800de6c: f000 f822 bl 800deb4 - 800de70: 4603 mov r3, r0 - 800de72: e00b b.n 800de8c - } - - /* continuation for multicast/broadcast destinations */ - /* obtain source Ethernet address of the given interface */ - /* send packet directly on the link */ - return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), dest, ETHTYPE_IP); - 800de74: 68fb ldr r3, [r7, #12] - 800de76: f103 022d add.w r2, r3, #45 ; 0x2d - 800de7a: f44f 6300 mov.w r3, #2048 ; 0x800 - 800de7e: 9300 str r3, [sp, #0] - 800de80: 69fb ldr r3, [r7, #28] - 800de82: 68b9 ldr r1, [r7, #8] - 800de84: 68f8 ldr r0, [r7, #12] - 800de86: f001 fce7 bl 800f858 - 800de8a: 4603 mov r3, r0 -} - 800de8c: 4618 mov r0, r3 - 800de8e: 3720 adds r7, #32 - 800de90: 46bd mov sp, r7 - 800de92: bd80 pop {r7, pc} - 800de94: 08012444 .word 0x08012444 - 800de98: 08012594 .word 0x08012594 - 800de9c: 080124bc .word 0x080124bc - 800dea0: 080125e4 .word 0x080125e4 - 800dea4: 08012584 .word 0x08012584 - 800dea8: 08012bc0 .word 0x08012bc0 - 800deac: 20006ee8 .word 0x20006ee8 - 800deb0: 20006df8 .word 0x20006df8 - -0800deb4 : - * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. - * - */ -err_t -etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) -{ - 800deb4: b580 push {r7, lr} - 800deb6: b08c sub sp, #48 ; 0x30 - 800deb8: af02 add r7, sp, #8 - 800deba: 60f8 str r0, [r7, #12] - 800debc: 60b9 str r1, [r7, #8] - 800debe: 607a str r2, [r7, #4] - struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; - 800dec0: 68fb ldr r3, [r7, #12] - 800dec2: 332d adds r3, #45 ; 0x2d - 800dec4: 617b str r3, [r7, #20] - err_t result = ERR_MEM; - 800dec6: 23ff movs r3, #255 ; 0xff - 800dec8: f887 3027 strb.w r3, [r7, #39] ; 0x27 - int is_new_entry = 0; - 800decc: 2300 movs r3, #0 - 800dece: 623b str r3, [r7, #32] - s8_t i; /* ARP entry index */ - - /* non-unicast address? */ - if (ip4_addr_isbroadcast(ipaddr, netif) || - 800ded0: 68bb ldr r3, [r7, #8] - 800ded2: 681b ldr r3, [r3, #0] - 800ded4: 68f9 ldr r1, [r7, #12] - 800ded6: 4618 mov r0, r3 - 800ded8: f000 fe1c bl 800eb14 - 800dedc: 4603 mov r3, r0 - 800dede: 2b00 cmp r3, #0 - 800dee0: d10c bne.n 800defc - ip4_addr_ismulticast(ipaddr) || - 800dee2: 68bb ldr r3, [r7, #8] - 800dee4: 681b ldr r3, [r3, #0] - 800dee6: f003 03f0 and.w r3, r3, #240 ; 0xf0 - if (ip4_addr_isbroadcast(ipaddr, netif) || - 800deea: 2be0 cmp r3, #224 ; 0xe0 - 800deec: d006 beq.n 800defc - ip4_addr_ismulticast(ipaddr) || - 800deee: 68bb ldr r3, [r7, #8] - 800def0: 2b00 cmp r3, #0 - 800def2: d003 beq.n 800defc - ip4_addr_isany(ipaddr)) { - 800def4: 68bb ldr r3, [r7, #8] - 800def6: 681b ldr r3, [r3, #0] - 800def8: 2b00 cmp r3, #0 - 800defa: d102 bne.n 800df02 - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); - return ERR_ARG; - 800defc: f06f 030f mvn.w r3, #15 - 800df00: e10e b.n 800e120 - } - - /* find entry in ARP cache, ask to create entry if queueing packet */ - i = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); - 800df02: 68fa ldr r2, [r7, #12] - 800df04: 2101 movs r1, #1 - 800df06: 68b8 ldr r0, [r7, #8] - 800df08: f7ff fb9c bl 800d644 - 800df0c: 4603 mov r3, r0 - 800df0e: 74fb strb r3, [r7, #19] - - /* could not find or create entry? */ - if (i < 0) { - 800df10: f997 3013 ldrsb.w r3, [r7, #19] - 800df14: 2b00 cmp r3, #0 - 800df16: da02 bge.n 800df1e - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not create ARP entry\n")); - if (q) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: packet dropped\n")); - ETHARP_STATS_INC(etharp.memerr); - } - return (err_t)i; - 800df18: f997 3013 ldrsb.w r3, [r7, #19] - 800df1c: e100 b.n 800e120 - } - - /* mark a fresh entry as pending (we just sent a request) */ - if (arp_table[i].state == ETHARP_STATE_EMPTY) { - 800df1e: f997 2013 ldrsb.w r2, [r7, #19] - 800df22: 4981 ldr r1, [pc, #516] ; (800e128 ) - 800df24: 4613 mov r3, r2 - 800df26: 005b lsls r3, r3, #1 - 800df28: 4413 add r3, r2 - 800df2a: 00db lsls r3, r3, #3 - 800df2c: 440b add r3, r1 - 800df2e: 3314 adds r3, #20 - 800df30: 781b ldrb r3, [r3, #0] - 800df32: 2b00 cmp r3, #0 - 800df34: d117 bne.n 800df66 - is_new_entry = 1; - 800df36: 2301 movs r3, #1 - 800df38: 623b str r3, [r7, #32] - arp_table[i].state = ETHARP_STATE_PENDING; - 800df3a: f997 2013 ldrsb.w r2, [r7, #19] - 800df3e: 497a ldr r1, [pc, #488] ; (800e128 ) - 800df40: 4613 mov r3, r2 - 800df42: 005b lsls r3, r3, #1 - 800df44: 4413 add r3, r2 - 800df46: 00db lsls r3, r3, #3 - 800df48: 440b add r3, r1 - 800df4a: 3314 adds r3, #20 - 800df4c: 2201 movs r2, #1 - 800df4e: 701a strb r2, [r3, #0] - /* record network interface for re-sending arp request in etharp_tmr */ - arp_table[i].netif = netif; - 800df50: f997 2013 ldrsb.w r2, [r7, #19] - 800df54: 4974 ldr r1, [pc, #464] ; (800e128 ) - 800df56: 4613 mov r3, r2 - 800df58: 005b lsls r3, r3, #1 - 800df5a: 4413 add r3, r2 - 800df5c: 00db lsls r3, r3, #3 - 800df5e: 440b add r3, r1 - 800df60: 3308 adds r3, #8 - 800df62: 68fa ldr r2, [r7, #12] - 800df64: 601a str r2, [r3, #0] - } - - /* { i is either a STABLE or (new or existing) PENDING entry } */ - LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", - 800df66: f997 2013 ldrsb.w r2, [r7, #19] - 800df6a: 496f ldr r1, [pc, #444] ; (800e128 ) - 800df6c: 4613 mov r3, r2 - 800df6e: 005b lsls r3, r3, #1 - 800df70: 4413 add r3, r2 - 800df72: 00db lsls r3, r3, #3 - 800df74: 440b add r3, r1 - 800df76: 3314 adds r3, #20 - 800df78: 781b ldrb r3, [r3, #0] - 800df7a: 2b01 cmp r3, #1 - 800df7c: d012 beq.n 800dfa4 - 800df7e: f997 2013 ldrsb.w r2, [r7, #19] - 800df82: 4969 ldr r1, [pc, #420] ; (800e128 ) - 800df84: 4613 mov r3, r2 - 800df86: 005b lsls r3, r3, #1 - 800df88: 4413 add r3, r2 - 800df8a: 00db lsls r3, r3, #3 - 800df8c: 440b add r3, r1 - 800df8e: 3314 adds r3, #20 - 800df90: 781b ldrb r3, [r3, #0] - 800df92: 2b01 cmp r3, #1 - 800df94: d806 bhi.n 800dfa4 - 800df96: 4b65 ldr r3, [pc, #404] ; (800e12c ) - 800df98: f240 32c7 movw r2, #967 ; 0x3c7 - 800df9c: 4964 ldr r1, [pc, #400] ; (800e130 ) - 800df9e: 4865 ldr r0, [pc, #404] ; (800e134 ) - 800dfa0: f001 fd90 bl 800fac4 - ((arp_table[i].state == ETHARP_STATE_PENDING) || - (arp_table[i].state >= ETHARP_STATE_STABLE))); - - /* do we have a new entry? or an implicit query request? */ - if (is_new_entry || (q == NULL)) { - 800dfa4: 6a3b ldr r3, [r7, #32] - 800dfa6: 2b00 cmp r3, #0 - 800dfa8: d102 bne.n 800dfb0 - 800dfaa: 687b ldr r3, [r7, #4] - 800dfac: 2b00 cmp r3, #0 - 800dfae: d10c bne.n 800dfca - /* try to resolve it; send out ARP request */ - result = etharp_request(netif, ipaddr); - 800dfb0: 68b9 ldr r1, [r7, #8] - 800dfb2: 68f8 ldr r0, [r7, #12] - 800dfb4: f000 f974 bl 800e2a0 - 800dfb8: 4603 mov r3, r0 - 800dfba: f887 3027 strb.w r3, [r7, #39] ; 0x27 - /* ARP request couldn't be sent */ - /* We don't re-send arp request in etharp_tmr, but we still queue packets, - since this failure could be temporary, and the next packet calling - etharp_query again could lead to sending the queued packets. */ - } - if (q == NULL) { - 800dfbe: 687b ldr r3, [r7, #4] - 800dfc0: 2b00 cmp r3, #0 - 800dfc2: d102 bne.n 800dfca - return result; - 800dfc4: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 - 800dfc8: e0aa b.n 800e120 - } - } - - /* packet given? */ - LWIP_ASSERT("q != NULL", q != NULL); - 800dfca: 687b ldr r3, [r7, #4] - 800dfcc: 2b00 cmp r3, #0 - 800dfce: d106 bne.n 800dfde - 800dfd0: 4b56 ldr r3, [pc, #344] ; (800e12c ) - 800dfd2: f240 32db movw r2, #987 ; 0x3db - 800dfd6: 4958 ldr r1, [pc, #352] ; (800e138 ) - 800dfd8: 4856 ldr r0, [pc, #344] ; (800e134 ) - 800dfda: f001 fd73 bl 800fac4 - /* stable entry? */ - if (arp_table[i].state >= ETHARP_STATE_STABLE) { - 800dfde: f997 2013 ldrsb.w r2, [r7, #19] - 800dfe2: 4951 ldr r1, [pc, #324] ; (800e128 ) - 800dfe4: 4613 mov r3, r2 - 800dfe6: 005b lsls r3, r3, #1 - 800dfe8: 4413 add r3, r2 - 800dfea: 00db lsls r3, r3, #3 - 800dfec: 440b add r3, r1 - 800dfee: 3314 adds r3, #20 - 800dff0: 781b ldrb r3, [r3, #0] - 800dff2: 2b01 cmp r3, #1 - 800dff4: d918 bls.n 800e028 - /* we have a valid IP->Ethernet address mapping */ - ETHARP_SET_HINT(netif, i); - 800dff6: 7cfa ldrb r2, [r7, #19] - 800dff8: 4b50 ldr r3, [pc, #320] ; (800e13c ) - 800dffa: 701a strb r2, [r3, #0] - /* send the packet */ - result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); - 800dffc: f997 2013 ldrsb.w r2, [r7, #19] - 800e000: 4613 mov r3, r2 - 800e002: 005b lsls r3, r3, #1 - 800e004: 4413 add r3, r2 - 800e006: 00db lsls r3, r3, #3 - 800e008: 3308 adds r3, #8 - 800e00a: 4a47 ldr r2, [pc, #284] ; (800e128 ) - 800e00c: 4413 add r3, r2 - 800e00e: 3304 adds r3, #4 - 800e010: f44f 6200 mov.w r2, #2048 ; 0x800 - 800e014: 9200 str r2, [sp, #0] - 800e016: 697a ldr r2, [r7, #20] - 800e018: 6879 ldr r1, [r7, #4] - 800e01a: 68f8 ldr r0, [r7, #12] - 800e01c: f001 fc1c bl 800f858 - 800e020: 4603 mov r3, r0 - 800e022: f887 3027 strb.w r3, [r7, #39] ; 0x27 - 800e026: e079 b.n 800e11c - /* pending entry? (either just created or already pending */ - } else if (arp_table[i].state == ETHARP_STATE_PENDING) { - 800e028: f997 2013 ldrsb.w r2, [r7, #19] - 800e02c: 493e ldr r1, [pc, #248] ; (800e128 ) - 800e02e: 4613 mov r3, r2 - 800e030: 005b lsls r3, r3, #1 - 800e032: 4413 add r3, r2 - 800e034: 00db lsls r3, r3, #3 - 800e036: 440b add r3, r1 - 800e038: 3314 adds r3, #20 - 800e03a: 781b ldrb r3, [r3, #0] - 800e03c: 2b01 cmp r3, #1 - 800e03e: d16d bne.n 800e11c - /* entry is still pending, queue the given packet 'q' */ - struct pbuf *p; - int copy_needed = 0; - 800e040: 2300 movs r3, #0 - 800e042: 61bb str r3, [r7, #24] - /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but - * to copy the whole queue into a new PBUF_RAM (see bug #11400) - * PBUF_ROMs can be left as they are, since ROM must not get changed. */ - p = q; - 800e044: 687b ldr r3, [r7, #4] - 800e046: 61fb str r3, [r7, #28] - while (p) { - 800e048: e01a b.n 800e080 - LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); - 800e04a: 69fb ldr r3, [r7, #28] - 800e04c: 895a ldrh r2, [r3, #10] - 800e04e: 69fb ldr r3, [r7, #28] - 800e050: 891b ldrh r3, [r3, #8] - 800e052: 429a cmp r2, r3 - 800e054: d10a bne.n 800e06c - 800e056: 69fb ldr r3, [r7, #28] - 800e058: 681b ldr r3, [r3, #0] - 800e05a: 2b00 cmp r3, #0 - 800e05c: d006 beq.n 800e06c - 800e05e: 4b33 ldr r3, [pc, #204] ; (800e12c ) - 800e060: f44f 727b mov.w r2, #1004 ; 0x3ec - 800e064: 4936 ldr r1, [pc, #216] ; (800e140 ) - 800e066: 4833 ldr r0, [pc, #204] ; (800e134 ) - 800e068: f001 fd2c bl 800fac4 - if (p->type != PBUF_ROM) { - 800e06c: 69fb ldr r3, [r7, #28] - 800e06e: 7b1b ldrb r3, [r3, #12] - 800e070: 2b01 cmp r3, #1 - 800e072: d002 beq.n 800e07a - copy_needed = 1; - 800e074: 2301 movs r3, #1 - 800e076: 61bb str r3, [r7, #24] - break; - 800e078: e005 b.n 800e086 - } - p = p->next; - 800e07a: 69fb ldr r3, [r7, #28] - 800e07c: 681b ldr r3, [r3, #0] - 800e07e: 61fb str r3, [r7, #28] - while (p) { - 800e080: 69fb ldr r3, [r7, #28] - 800e082: 2b00 cmp r3, #0 - 800e084: d1e1 bne.n 800e04a - } - if (copy_needed) { - 800e086: 69bb ldr r3, [r7, #24] - 800e088: 2b00 cmp r3, #0 - 800e08a: d017 beq.n 800e0bc - /* copy the whole packet into new pbufs */ - p = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); - 800e08c: 69fb ldr r3, [r7, #28] - 800e08e: 891b ldrh r3, [r3, #8] - 800e090: 2200 movs r2, #0 - 800e092: 4619 mov r1, r3 - 800e094: 2002 movs r0, #2 - 800e096: f7f7 fd7b bl 8005b90 - 800e09a: 61f8 str r0, [r7, #28] - if (p != NULL) { - 800e09c: 69fb ldr r3, [r7, #28] - 800e09e: 2b00 cmp r3, #0 - 800e0a0: d011 beq.n 800e0c6 - if (pbuf_copy(p, q) != ERR_OK) { - 800e0a2: 6879 ldr r1, [r7, #4] - 800e0a4: 69f8 ldr r0, [r7, #28] - 800e0a6: f7f8 fa1d bl 80064e4 - 800e0aa: 4603 mov r3, r0 - 800e0ac: 2b00 cmp r3, #0 - 800e0ae: d00a beq.n 800e0c6 - pbuf_free(p); - 800e0b0: 69f8 ldr r0, [r7, #28] - 800e0b2: f7f8 f8e5 bl 8006280 - p = NULL; - 800e0b6: 2300 movs r3, #0 - 800e0b8: 61fb str r3, [r7, #28] - 800e0ba: e004 b.n 800e0c6 - } - } - } else { - /* referencing the old pbuf is enough */ - p = q; - 800e0bc: 687b ldr r3, [r7, #4] - 800e0be: 61fb str r3, [r7, #28] - pbuf_ref(p); - 800e0c0: 69f8 ldr r0, [r7, #28] - 800e0c2: f7f8 f987 bl 80063d4 - } - /* packet could be taken over? */ - if (p != NULL) { - 800e0c6: 69fb ldr r3, [r7, #28] - 800e0c8: 2b00 cmp r3, #0 - 800e0ca: d024 beq.n 800e116 - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); - result = ERR_MEM; - } -#else /* ARP_QUEUEING */ - /* always queue one packet per ARP request only, freeing a previously queued packet */ - if (arp_table[i].q != NULL) { - 800e0cc: f997 2013 ldrsb.w r2, [r7, #19] - 800e0d0: 4915 ldr r1, [pc, #84] ; (800e128 ) - 800e0d2: 4613 mov r3, r2 - 800e0d4: 005b lsls r3, r3, #1 - 800e0d6: 4413 add r3, r2 - 800e0d8: 00db lsls r3, r3, #3 - 800e0da: 440b add r3, r1 - 800e0dc: 681b ldr r3, [r3, #0] - 800e0de: 2b00 cmp r3, #0 - 800e0e0: d00b beq.n 800e0fa - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); - pbuf_free(arp_table[i].q); - 800e0e2: f997 2013 ldrsb.w r2, [r7, #19] - 800e0e6: 4910 ldr r1, [pc, #64] ; (800e128 ) - 800e0e8: 4613 mov r3, r2 - 800e0ea: 005b lsls r3, r3, #1 - 800e0ec: 4413 add r3, r2 - 800e0ee: 00db lsls r3, r3, #3 - 800e0f0: 440b add r3, r1 - 800e0f2: 681b ldr r3, [r3, #0] - 800e0f4: 4618 mov r0, r3 - 800e0f6: f7f8 f8c3 bl 8006280 - } - arp_table[i].q = p; - 800e0fa: f997 2013 ldrsb.w r2, [r7, #19] - 800e0fe: 490a ldr r1, [pc, #40] ; (800e128 ) - 800e100: 4613 mov r3, r2 - 800e102: 005b lsls r3, r3, #1 - 800e104: 4413 add r3, r2 - 800e106: 00db lsls r3, r3, #3 - 800e108: 440b add r3, r1 - 800e10a: 69fa ldr r2, [r7, #28] - 800e10c: 601a str r2, [r3, #0] - result = ERR_OK; - 800e10e: 2300 movs r3, #0 - 800e110: f887 3027 strb.w r3, [r7, #39] ; 0x27 - 800e114: e002 b.n 800e11c - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); -#endif /* ARP_QUEUEING */ - } else { - ETHARP_STATS_INC(etharp.memerr); - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); - result = ERR_MEM; - 800e116: 23ff movs r3, #255 ; 0xff - 800e118: f887 3027 strb.w r3, [r7, #39] ; 0x27 - } - } - return result; - 800e11c: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 -} - 800e120: 4618 mov r0, r3 - 800e122: 3728 adds r7, #40 ; 0x28 - 800e124: 46bd mov sp, r7 - 800e126: bd80 pop {r7, pc} - 800e128: 20006df8 .word 0x20006df8 - 800e12c: 08012444 .word 0x08012444 - 800e130: 080125f0 .word 0x080125f0 - 800e134: 080124bc .word 0x080124bc - 800e138: 080125e4 .word 0x080125e4 - 800e13c: 20006ee8 .word 0x20006ee8 - 800e140: 08012618 .word 0x08012618 - -0800e144 : -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) -{ - 800e144: b580 push {r7, lr} - 800e146: b08a sub sp, #40 ; 0x28 - 800e148: af02 add r7, sp, #8 - 800e14a: 60f8 str r0, [r7, #12] - 800e14c: 60b9 str r1, [r7, #8] - 800e14e: 607a str r2, [r7, #4] - 800e150: 603b str r3, [r7, #0] - struct pbuf *p; - err_t result = ERR_OK; - 800e152: 2300 movs r3, #0 - 800e154: 77fb strb r3, [r7, #31] - struct etharp_hdr *hdr; - - LWIP_ASSERT("netif != NULL", netif != NULL); - 800e156: 68fb ldr r3, [r7, #12] - 800e158: 2b00 cmp r3, #0 - 800e15a: d106 bne.n 800e16a - 800e15c: 4b3a ldr r3, [pc, #232] ; (800e248 ) - 800e15e: f44f 628b mov.w r2, #1112 ; 0x458 - 800e162: 493a ldr r1, [pc, #232] ; (800e24c ) - 800e164: 483a ldr r0, [pc, #232] ; (800e250 ) - 800e166: f001 fcad bl 800fac4 - - /* allocate a pbuf for the outgoing ARP request packet */ - p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); - 800e16a: 2200 movs r2, #0 - 800e16c: 211c movs r1, #28 - 800e16e: 2002 movs r0, #2 - 800e170: f7f7 fd0e bl 8005b90 - 800e174: 61b8 str r0, [r7, #24] - /* could allocate a pbuf for an ARP request? */ - if (p == NULL) { - 800e176: 69bb ldr r3, [r7, #24] - 800e178: 2b00 cmp r3, #0 - 800e17a: d102 bne.n 800e182 - 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; - 800e17c: f04f 33ff mov.w r3, #4294967295 - 800e180: e05d b.n 800e23e - } - LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", - 800e182: 69bb ldr r3, [r7, #24] - 800e184: 895b ldrh r3, [r3, #10] - 800e186: 2b1b cmp r3, #27 - 800e188: d806 bhi.n 800e198 - 800e18a: 4b2f ldr r3, [pc, #188] ; (800e248 ) - 800e18c: f240 4263 movw r2, #1123 ; 0x463 - 800e190: 4930 ldr r1, [pc, #192] ; (800e254 ) - 800e192: 482f ldr r0, [pc, #188] ; (800e250 ) - 800e194: f001 fc96 bl 800fac4 - (p->len >= SIZEOF_ETHARP_HDR)); - - hdr = (struct etharp_hdr *)p->payload; - 800e198: 69bb ldr r3, [r7, #24] - 800e19a: 685b ldr r3, [r3, #4] - 800e19c: 617b str r3, [r7, #20] - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); - hdr->opcode = lwip_htons(opcode); - 800e19e: 8ebb ldrh r3, [r7, #52] ; 0x34 - 800e1a0: 4618 mov r0, r3 - 800e1a2: f7f6 ff58 bl 8005056 - 800e1a6: 4603 mov r3, r0 - 800e1a8: 461a mov r2, r3 - 800e1aa: 697b ldr r3, [r7, #20] - 800e1ac: 80da strh r2, [r3, #6] - - LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", - 800e1ae: 68fb ldr r3, [r7, #12] - 800e1b0: f893 302c ldrb.w r3, [r3, #44] ; 0x2c - 800e1b4: 2b06 cmp r3, #6 - 800e1b6: d006 beq.n 800e1c6 - 800e1b8: 4b23 ldr r3, [pc, #140] ; (800e248 ) - 800e1ba: f240 426a movw r2, #1130 ; 0x46a - 800e1be: 4926 ldr r1, [pc, #152] ; (800e258 ) - 800e1c0: 4823 ldr r0, [pc, #140] ; (800e250 ) - 800e1c2: f001 fc7f bl 800fac4 - (netif->hwaddr_len == ETH_HWADDR_LEN)); - - /* Write the ARP MAC-Addresses */ - ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); - 800e1c6: 697b ldr r3, [r7, #20] - 800e1c8: 3308 adds r3, #8 - 800e1ca: 2206 movs r2, #6 - 800e1cc: 6839 ldr r1, [r7, #0] - 800e1ce: 4618 mov r0, r3 - 800e1d0: f001 fde6 bl 800fda0 - ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); - 800e1d4: 697b ldr r3, [r7, #20] - 800e1d6: 3312 adds r3, #18 - 800e1d8: 2206 movs r2, #6 - 800e1da: 6af9 ldr r1, [r7, #44] ; 0x2c - 800e1dc: 4618 mov r0, r3 - 800e1de: f001 fddf bl 800fda0 - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without - * structure packing. */ - IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); - 800e1e2: 697b ldr r3, [r7, #20] - 800e1e4: 330e adds r3, #14 - 800e1e6: 6aba ldr r2, [r7, #40] ; 0x28 - 800e1e8: 6812 ldr r2, [r2, #0] - 800e1ea: 601a str r2, [r3, #0] - IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); - 800e1ec: 697b ldr r3, [r7, #20] - 800e1ee: 3318 adds r3, #24 - 800e1f0: 6b3a ldr r2, [r7, #48] ; 0x30 - 800e1f2: 6812 ldr r2, [r2, #0] - 800e1f4: 601a str r2, [r3, #0] - - hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); - 800e1f6: 697b ldr r3, [r7, #20] - 800e1f8: 2200 movs r2, #0 - 800e1fa: 701a strb r2, [r3, #0] - 800e1fc: 2200 movs r2, #0 - 800e1fe: f042 0201 orr.w r2, r2, #1 - 800e202: 705a strb r2, [r3, #1] - hdr->proto = PP_HTONS(ETHTYPE_IP); - 800e204: 697b ldr r3, [r7, #20] - 800e206: 2200 movs r2, #0 - 800e208: f042 0208 orr.w r2, r2, #8 - 800e20c: 709a strb r2, [r3, #2] - 800e20e: 2200 movs r2, #0 - 800e210: 70da strb r2, [r3, #3] - /* set hwlen and protolen */ - hdr->hwlen = ETH_HWADDR_LEN; - 800e212: 697b ldr r3, [r7, #20] - 800e214: 2206 movs r2, #6 - 800e216: 711a strb r2, [r3, #4] - hdr->protolen = sizeof(ip4_addr_t); - 800e218: 697b ldr r3, [r7, #20] - 800e21a: 2204 movs r2, #4 - 800e21c: 715a strb r2, [r3, #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); - 800e21e: f640 0306 movw r3, #2054 ; 0x806 - 800e222: 9300 str r3, [sp, #0] - 800e224: 687b ldr r3, [r7, #4] - 800e226: 68ba ldr r2, [r7, #8] - 800e228: 69b9 ldr r1, [r7, #24] - 800e22a: 68f8 ldr r0, [r7, #12] - 800e22c: f001 fb14 bl 800f858 - } - - ETHARP_STATS_INC(etharp.xmit); - /* free ARP query packet */ - pbuf_free(p); - 800e230: 69b8 ldr r0, [r7, #24] - 800e232: f7f8 f825 bl 8006280 - p = NULL; - 800e236: 2300 movs r3, #0 - 800e238: 61bb str r3, [r7, #24] - /* could not allocate pbuf for ARP request */ - - return result; - 800e23a: f997 301f ldrsb.w r3, [r7, #31] -} - 800e23e: 4618 mov r0, r3 - 800e240: 3720 adds r7, #32 - 800e242: 46bd mov sp, r7 - 800e244: bd80 pop {r7, pc} - 800e246: bf00 nop - 800e248: 08012444 .word 0x08012444 - 800e24c: 08012594 .word 0x08012594 - 800e250: 080124bc .word 0x080124bc - 800e254: 08012634 .word 0x08012634 - 800e258: 08012668 .word 0x08012668 - -0800e25c : - * 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) -{ - 800e25c: b580 push {r7, lr} - 800e25e: b088 sub sp, #32 - 800e260: af04 add r7, sp, #16 - 800e262: 60f8 str r0, [r7, #12] - 800e264: 60b9 str r1, [r7, #8] - 800e266: 607a str r2, [r7, #4] - return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, - 800e268: 68fb ldr r3, [r7, #12] - 800e26a: f103 012d add.w r1, r3, #45 ; 0x2d - (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, - 800e26e: 68fb ldr r3, [r7, #12] - 800e270: f103 002d add.w r0, r3, #45 ; 0x2d - 800e274: 68fb ldr r3, [r7, #12] - 800e276: 3304 adds r3, #4 - return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, - 800e278: 2201 movs r2, #1 - 800e27a: 9203 str r2, [sp, #12] - 800e27c: 68ba ldr r2, [r7, #8] - 800e27e: 9202 str r2, [sp, #8] - 800e280: 4a06 ldr r2, [pc, #24] ; (800e29c ) - 800e282: 9201 str r2, [sp, #4] - 800e284: 9300 str r3, [sp, #0] - 800e286: 4603 mov r3, r0 - 800e288: 687a ldr r2, [r7, #4] - 800e28a: 68f8 ldr r0, [r7, #12] - 800e28c: f7ff ff5a bl 800e144 - 800e290: 4603 mov r3, r0 - ipaddr, ARP_REQUEST); -} - 800e292: 4618 mov r0, r3 - 800e294: 3710 adds r7, #16 - 800e296: 46bd mov sp, r7 - 800e298: bd80 pop {r7, pc} - 800e29a: bf00 nop - 800e29c: 08012bc8 .word 0x08012bc8 - -0800e2a0 : - * 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) -{ - 800e2a0: b580 push {r7, lr} - 800e2a2: b082 sub sp, #8 - 800e2a4: af00 add r7, sp, #0 - 800e2a6: 6078 str r0, [r7, #4] - 800e2a8: 6039 str r1, [r7, #0] - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); - return etharp_request_dst(netif, ipaddr, ðbroadcast); - 800e2aa: 4a05 ldr r2, [pc, #20] ; (800e2c0 ) - 800e2ac: 6839 ldr r1, [r7, #0] - 800e2ae: 6878 ldr r0, [r7, #4] - 800e2b0: f7ff ffd4 bl 800e25c - 800e2b4: 4603 mov r3, r0 -} - 800e2b6: 4618 mov r0, r3 - 800e2b8: 3708 adds r7, #8 - 800e2ba: 46bd mov sp, r7 - 800e2bc: bd80 pop {r7, pc} - 800e2be: bf00 nop - 800e2c0: 08012bc0 .word 0x08012bc0 - -0800e2c4 : - * @param p the icmp echo request packet, p->payload pointing to the icmp header - * @param inp the netif on which this packet was received - */ -void -icmp_input(struct pbuf *p, struct netif *inp) -{ - 800e2c4: b580 push {r7, lr} - 800e2c6: b08e sub sp, #56 ; 0x38 - 800e2c8: af04 add r7, sp, #16 - 800e2ca: 6078 str r0, [r7, #4] - 800e2cc: 6039 str r1, [r7, #0] - const ip4_addr_t* src; - - ICMP_STATS_INC(icmp.recv); - MIB2_STATS_INC(mib2.icmpinmsgs); - - iphdr_in = ip4_current_header(); - 800e2ce: 4b7a ldr r3, [pc, #488] ; (800e4b8 ) - 800e2d0: 689b ldr r3, [r3, #8] - 800e2d2: 627b str r3, [r7, #36] ; 0x24 - hlen = IPH_HL(iphdr_in) * 4; - 800e2d4: 6a7b ldr r3, [r7, #36] ; 0x24 - 800e2d6: 781b ldrb r3, [r3, #0] - 800e2d8: b29b uxth r3, r3 - 800e2da: f003 030f and.w r3, r3, #15 - 800e2de: b29b uxth r3, r3 - 800e2e0: 009b lsls r3, r3, #2 - 800e2e2: 847b strh r3, [r7, #34] ; 0x22 - if (hlen < IP_HLEN) { - 800e2e4: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800e2e6: 2b13 cmp r3, #19 - 800e2e8: f240 80d1 bls.w 800e48e - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); - goto lenerr; - } - if (p->len < sizeof(u16_t)*2) { - 800e2ec: 687b ldr r3, [r7, #4] - 800e2ee: 895b ldrh r3, [r3, #10] - 800e2f0: 2b03 cmp r3, #3 - 800e2f2: f240 80ce bls.w 800e492 - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); - goto lenerr; - } - - type = *((u8_t *)p->payload); - 800e2f6: 687b ldr r3, [r7, #4] - 800e2f8: 685b ldr r3, [r3, #4] - 800e2fa: 781b ldrb r3, [r3, #0] - 800e2fc: f887 3021 strb.w r3, [r7, #33] ; 0x21 -#ifdef LWIP_DEBUG - code = *(((u8_t *)p->payload)+1); -#endif /* LWIP_DEBUG */ - switch (type) { - 800e300: f897 3021 ldrb.w r3, [r7, #33] ; 0x21 - 800e304: 2b00 cmp r3, #0 - 800e306: f000 80bb beq.w 800e480 - 800e30a: 2b08 cmp r3, #8 - 800e30c: f040 80bb bne.w 800e486 - (as obviously, an echo request has been sent, too). */ - MIB2_STATS_INC(mib2.icmpinechoreps); - break; - case ICMP_ECHO: - MIB2_STATS_INC(mib2.icmpinechos); - src = ip4_current_dest_addr(); - 800e310: 4b6a ldr r3, [pc, #424] ; (800e4bc ) - 800e312: 61fb str r3, [r7, #28] - /* multicast destination address? */ - if (ip4_addr_ismulticast(ip4_current_dest_addr())) { - 800e314: 4b68 ldr r3, [pc, #416] ; (800e4b8 ) - 800e316: 695b ldr r3, [r3, #20] - 800e318: f003 03f0 and.w r3, r3, #240 ; 0xf0 - 800e31c: 2be0 cmp r3, #224 ; 0xe0 - 800e31e: f000 80bf beq.w 800e4a0 - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n")); - goto icmperr; -#endif /* LWIP_MULTICAST_PING */ - } - /* broadcast destination address? */ - if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { - 800e322: 4b65 ldr r3, [pc, #404] ; (800e4b8 ) - 800e324: 695b ldr r3, [r3, #20] - 800e326: 4a64 ldr r2, [pc, #400] ; (800e4b8 ) - 800e328: 6812 ldr r2, [r2, #0] - 800e32a: 4611 mov r1, r2 - 800e32c: 4618 mov r0, r3 - 800e32e: f000 fbf1 bl 800eb14 - 800e332: 4603 mov r3, r0 - 800e334: 2b00 cmp r3, #0 - 800e336: f040 80b5 bne.w 800e4a4 - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n")); - goto icmperr; -#endif /* LWIP_BROADCAST_PING */ - } - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); - if (p->tot_len < sizeof(struct icmp_echo_hdr)) { - 800e33a: 687b ldr r3, [r7, #4] - 800e33c: 891b ldrh r3, [r3, #8] - 800e33e: 2b07 cmp r3, #7 - 800e340: f240 80a9 bls.w 800e496 - return; - } - } -#endif -#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN - if (pbuf_header(p, (s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { - 800e344: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800e346: 330e adds r3, #14 - 800e348: b29b uxth r3, r3 - 800e34a: b21b sxth r3, r3 - 800e34c: 4619 mov r1, r3 - 800e34e: 6878 ldr r0, [r7, #4] - 800e350: f7f7 ff72 bl 8006238 - 800e354: 4603 mov r3, r0 - 800e356: 2b00 cmp r3, #0 - 800e358: d046 beq.n 800e3e8 - /* p is not big enough to contain link headers - * allocate a new one and copy p into it - */ - struct pbuf *r; - /* allocate new packet buffer with space for link headers */ - r = pbuf_alloc(PBUF_LINK, p->tot_len + hlen, PBUF_RAM); - 800e35a: 687b ldr r3, [r7, #4] - 800e35c: 891a ldrh r2, [r3, #8] - 800e35e: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800e360: 4413 add r3, r2 - 800e362: b29b uxth r3, r3 - 800e364: 2200 movs r2, #0 - 800e366: 4619 mov r1, r3 - 800e368: 2002 movs r0, #2 - 800e36a: f7f7 fc11 bl 8005b90 - 800e36e: 61b8 str r0, [r7, #24] - if (r == NULL) { - 800e370: 69bb ldr r3, [r7, #24] - 800e372: 2b00 cmp r3, #0 - 800e374: f000 8098 beq.w 800e4a8 - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); - goto icmperr; - } - if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { - 800e378: 69bb ldr r3, [r7, #24] - 800e37a: 895b ldrh r3, [r3, #10] - 800e37c: 461a mov r2, r3 - 800e37e: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800e380: 3308 adds r3, #8 - 800e382: 429a cmp r2, r3 - 800e384: d203 bcs.n 800e38e - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); - pbuf_free(r); - 800e386: 69b8 ldr r0, [r7, #24] - 800e388: f7f7 ff7a bl 8006280 - goto icmperr; - 800e38c: e08d b.n 800e4aa - } - /* copy the ip header */ - MEMCPY(r->payload, iphdr_in, hlen); - 800e38e: 69bb ldr r3, [r7, #24] - 800e390: 685b ldr r3, [r3, #4] - 800e392: 8c7a ldrh r2, [r7, #34] ; 0x22 - 800e394: 6a79 ldr r1, [r7, #36] ; 0x24 - 800e396: 4618 mov r0, r3 - 800e398: f001 fd02 bl 800fda0 - /* switch r->payload back to icmp header (cannot fail) */ - if (pbuf_header(r, (s16_t)-hlen)) { - 800e39c: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800e39e: 425b negs r3, r3 - 800e3a0: b29b uxth r3, r3 - 800e3a2: b21b sxth r3, r3 - 800e3a4: 4619 mov r1, r3 - 800e3a6: 69b8 ldr r0, [r7, #24] - 800e3a8: f7f7 ff46 bl 8006238 - 800e3ac: 4603 mov r3, r0 - 800e3ae: 2b00 cmp r3, #0 - 800e3b0: d009 beq.n 800e3c6 - LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); - 800e3b2: 4b43 ldr r3, [pc, #268] ; (800e4c0 ) - 800e3b4: 22af movs r2, #175 ; 0xaf - 800e3b6: 4943 ldr r1, [pc, #268] ; (800e4c4 ) - 800e3b8: 4843 ldr r0, [pc, #268] ; (800e4c8 ) - 800e3ba: f001 fb83 bl 800fac4 - pbuf_free(r); - 800e3be: 69b8 ldr r0, [r7, #24] - 800e3c0: f7f7 ff5e bl 8006280 - goto icmperr; - 800e3c4: e071 b.n 800e4aa - } - /* copy the rest of the packet without ip header */ - if (pbuf_copy(r, p) != ERR_OK) { - 800e3c6: 6879 ldr r1, [r7, #4] - 800e3c8: 69b8 ldr r0, [r7, #24] - 800e3ca: f7f8 f88b bl 80064e4 - 800e3ce: 4603 mov r3, r0 - 800e3d0: 2b00 cmp r3, #0 - 800e3d2: d003 beq.n 800e3dc - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); - pbuf_free(r); - 800e3d4: 69b8 ldr r0, [r7, #24] - 800e3d6: f7f7 ff53 bl 8006280 - goto icmperr; - 800e3da: e066 b.n 800e4aa - } - /* free the original p */ - pbuf_free(p); - 800e3dc: 6878 ldr r0, [r7, #4] - 800e3de: f7f7 ff4f bl 8006280 - /* we now have an identical copy of p that has room for link headers */ - p = r; - 800e3e2: 69bb ldr r3, [r7, #24] - 800e3e4: 607b str r3, [r7, #4] - 800e3e6: e015 b.n 800e414 - } else { - /* restore p->payload to point to icmp header (cannot fail) */ - if (pbuf_header(p, -(s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { - 800e3e8: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800e3ea: f1c3 23ff rsb r3, r3, #4278255360 ; 0xff00ff00 - 800e3ee: f503 037f add.w r3, r3, #16711680 ; 0xff0000 - 800e3f2: 33f2 adds r3, #242 ; 0xf2 - 800e3f4: b29b uxth r3, r3 - 800e3f6: b21b sxth r3, r3 - 800e3f8: 4619 mov r1, r3 - 800e3fa: 6878 ldr r0, [r7, #4] - 800e3fc: f7f7 ff1c bl 8006238 - 800e400: 4603 mov r3, r0 - 800e402: 2b00 cmp r3, #0 - 800e404: d006 beq.n 800e414 - LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); - 800e406: 4b2e ldr r3, [pc, #184] ; (800e4c0 ) - 800e408: 22c0 movs r2, #192 ; 0xc0 - 800e40a: 4930 ldr r1, [pc, #192] ; (800e4cc ) - 800e40c: 482e ldr r0, [pc, #184] ; (800e4c8 ) - 800e40e: f001 fb59 bl 800fac4 - goto icmperr; - 800e412: e04a b.n 800e4aa - } -#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ - /* At this point, all checks are OK. */ - /* We generate an answer by switching the dest and src ip addresses, - * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ - iecho = (struct icmp_echo_hdr *)p->payload; - 800e414: 687b ldr r3, [r7, #4] - 800e416: 685b ldr r3, [r3, #4] - 800e418: 617b str r3, [r7, #20] - if (pbuf_header(p, (s16_t)hlen)) { - 800e41a: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22 - 800e41e: 4619 mov r1, r3 - 800e420: 6878 ldr r0, [r7, #4] - 800e422: f7f7 ff09 bl 8006238 - 800e426: 4603 mov r3, r0 - 800e428: 2b00 cmp r3, #0 - 800e42a: d12b bne.n 800e484 - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet")); - } else { - err_t ret; - struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; - 800e42c: 687b ldr r3, [r7, #4] - 800e42e: 685b ldr r3, [r3, #4] - 800e430: 613b str r3, [r7, #16] - ip4_addr_copy(iphdr->src, *src); - 800e432: 69fb ldr r3, [r7, #28] - 800e434: 681a ldr r2, [r3, #0] - 800e436: 693b ldr r3, [r7, #16] - 800e438: 60da str r2, [r3, #12] - ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); - 800e43a: 4b1f ldr r3, [pc, #124] ; (800e4b8 ) - 800e43c: 691a ldr r2, [r3, #16] - 800e43e: 693b ldr r3, [r7, #16] - 800e440: 611a str r2, [r3, #16] - ICMPH_TYPE_SET(iecho, ICMP_ER); - 800e442: 697b ldr r3, [r7, #20] - 800e444: 2200 movs r2, #0 - 800e446: 701a strb r2, [r3, #0] - else { - iecho->chksum = 0; - } -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ -#else /* CHECKSUM_GEN_ICMP */ - iecho->chksum = 0; - 800e448: 697b ldr r3, [r7, #20] - 800e44a: 2200 movs r2, #0 - 800e44c: 709a strb r2, [r3, #2] - 800e44e: 2200 movs r2, #0 - 800e450: 70da strb r2, [r3, #3] -#endif /* CHECKSUM_GEN_ICMP */ - - /* Set the correct TTL and recalculate the header checksum. */ - IPH_TTL_SET(iphdr, ICMP_TTL); - 800e452: 693b ldr r3, [r7, #16] - 800e454: 22ff movs r2, #255 ; 0xff - 800e456: 721a strb r2, [r3, #8] - IPH_CHKSUM_SET(iphdr, 0); - 800e458: 693b ldr r3, [r7, #16] - 800e45a: 2200 movs r2, #0 - 800e45c: 729a strb r2, [r3, #10] - 800e45e: 2200 movs r2, #0 - 800e460: 72da strb r2, [r3, #11] - MIB2_STATS_INC(mib2.icmpoutmsgs); - /* increase number of echo replies attempted to send */ - MIB2_STATS_INC(mib2.icmpoutechoreps); - - /* send an ICMP packet */ - ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, - 800e462: 683b ldr r3, [r7, #0] - 800e464: 9302 str r3, [sp, #8] - 800e466: 2301 movs r3, #1 - 800e468: 9301 str r3, [sp, #4] - 800e46a: 2300 movs r3, #0 - 800e46c: 9300 str r3, [sp, #0] - 800e46e: 23ff movs r3, #255 ; 0xff - 800e470: 2200 movs r2, #0 - 800e472: 69f9 ldr r1, [r7, #28] - 800e474: 6878 ldr r0, [r7, #4] - 800e476: f000 fa7b bl 800e970 - 800e47a: 4603 mov r3, r0 - 800e47c: 73fb strb r3, [r7, #15] - ICMP_TTL, 0, IP_PROTO_ICMP, inp); - if (ret != ERR_OK) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret))); - } - } - break; - 800e47e: e001 b.n 800e484 - break; - 800e480: bf00 nop - 800e482: e000 b.n 800e486 - break; - 800e484: bf00 nop - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", - (s16_t)type, (s16_t)code)); - ICMP_STATS_INC(icmp.proterr); - ICMP_STATS_INC(icmp.drop); - } - pbuf_free(p); - 800e486: 6878 ldr r0, [r7, #4] - 800e488: f7f7 fefa bl 8006280 - return; - 800e48c: e011 b.n 800e4b2 - goto lenerr; - 800e48e: bf00 nop - 800e490: e002 b.n 800e498 - goto lenerr; - 800e492: bf00 nop - 800e494: e000 b.n 800e498 - goto lenerr; - 800e496: bf00 nop -lenerr: - pbuf_free(p); - 800e498: 6878 ldr r0, [r7, #4] - 800e49a: f7f7 fef1 bl 8006280 - ICMP_STATS_INC(icmp.lenerr); - MIB2_STATS_INC(mib2.icmpinerrors); - return; - 800e49e: e008 b.n 800e4b2 - goto icmperr; - 800e4a0: bf00 nop - 800e4a2: e002 b.n 800e4aa - goto icmperr; - 800e4a4: bf00 nop - 800e4a6: e000 b.n 800e4aa - goto icmperr; - 800e4a8: bf00 nop -#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING -icmperr: - pbuf_free(p); - 800e4aa: 6878 ldr r0, [r7, #4] - 800e4ac: f7f7 fee8 bl 8006280 - ICMP_STATS_INC(icmp.err); - MIB2_STATS_INC(mib2.icmpinerrors); - return; - 800e4b0: bf00 nop -#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ -} - 800e4b2: 3728 adds r7, #40 ; 0x28 - 800e4b4: 46bd mov sp, r7 - 800e4b6: bd80 pop {r7, pc} - 800e4b8: 200037e8 .word 0x200037e8 - 800e4bc: 200037fc .word 0x200037fc - 800e4c0: 080126ac .word 0x080126ac - 800e4c4: 080126e4 .word 0x080126e4 - 800e4c8: 0801271c .word 0x0801271c - 800e4cc: 08012744 .word 0x08012744 - -0800e4d0 : - * p->payload pointing to the IP header - * @param t type of the 'unreachable' packet - */ -void -icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) -{ - 800e4d0: b580 push {r7, lr} - 800e4d2: b082 sub sp, #8 - 800e4d4: af00 add r7, sp, #0 - 800e4d6: 6078 str r0, [r7, #4] - 800e4d8: 460b mov r3, r1 - 800e4da: 70fb strb r3, [r7, #3] - MIB2_STATS_INC(mib2.icmpoutdestunreachs); - icmp_send_response(p, ICMP_DUR, t); - 800e4dc: 78fb ldrb r3, [r7, #3] - 800e4de: 461a mov r2, r3 - 800e4e0: 2103 movs r1, #3 - 800e4e2: 6878 ldr r0, [r7, #4] - 800e4e4: f000 f814 bl 800e510 -} - 800e4e8: bf00 nop - 800e4ea: 3708 adds r7, #8 - 800e4ec: 46bd mov sp, r7 - 800e4ee: bd80 pop {r7, pc} - -0800e4f0 : - * p->payload pointing to the IP header - * @param t type of the 'time exceeded' packet - */ -void -icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t) -{ - 800e4f0: b580 push {r7, lr} - 800e4f2: b082 sub sp, #8 - 800e4f4: af00 add r7, sp, #0 - 800e4f6: 6078 str r0, [r7, #4] - 800e4f8: 460b mov r3, r1 - 800e4fa: 70fb strb r3, [r7, #3] - MIB2_STATS_INC(mib2.icmpouttimeexcds); - icmp_send_response(p, ICMP_TE, t); - 800e4fc: 78fb ldrb r3, [r7, #3] - 800e4fe: 461a mov r2, r3 - 800e500: 210b movs r1, #11 - 800e502: 6878 ldr r0, [r7, #4] - 800e504: f000 f804 bl 800e510 -} - 800e508: bf00 nop - 800e50a: 3708 adds r7, #8 - 800e50c: 46bd mov sp, r7 - 800e50e: bd80 pop {r7, pc} - -0800e510 : - * @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) -{ - 800e510: b580 push {r7, lr} - 800e512: b08c sub sp, #48 ; 0x30 - 800e514: af04 add r7, sp, #16 - 800e516: 6078 str r0, [r7, #4] - 800e518: 460b mov r3, r1 - 800e51a: 70fb strb r3, [r7, #3] - 800e51c: 4613 mov r3, r2 - 800e51e: 70bb strb r3, [r7, #2] - - /* 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, - 800e520: 2200 movs r2, #0 - 800e522: 2124 movs r1, #36 ; 0x24 - 800e524: 2001 movs r0, #1 - 800e526: f7f7 fb33 bl 8005b90 - 800e52a: 61f8 str r0, [r7, #28] - PBUF_RAM); - if (q == NULL) { - 800e52c: 69fb ldr r3, [r7, #28] - 800e52e: 2b00 cmp r3, #0 - 800e530: d04c beq.n 800e5cc - 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", - 800e532: 69fb ldr r3, [r7, #28] - 800e534: 895b ldrh r3, [r3, #10] - 800e536: 2b23 cmp r3, #35 ; 0x23 - 800e538: d806 bhi.n 800e548 - 800e53a: 4b26 ldr r3, [pc, #152] ; (800e5d4 ) - 800e53c: f240 1261 movw r2, #353 ; 0x161 - 800e540: 4925 ldr r1, [pc, #148] ; (800e5d8 ) - 800e542: 4826 ldr r0, [pc, #152] ; (800e5dc ) - 800e544: f001 fabe bl 800fac4 - (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); - - iphdr = (struct ip_hdr *)p->payload; - 800e548: 687b ldr r3, [r7, #4] - 800e54a: 685b ldr r3, [r3, #4] - 800e54c: 61bb str r3, [r7, #24] - 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; - 800e54e: 69fb ldr r3, [r7, #28] - 800e550: 685b ldr r3, [r3, #4] - 800e552: 617b str r3, [r7, #20] - icmphdr->type = type; - 800e554: 697b ldr r3, [r7, #20] - 800e556: 78fa ldrb r2, [r7, #3] - 800e558: 701a strb r2, [r3, #0] - icmphdr->code = code; - 800e55a: 697b ldr r3, [r7, #20] - 800e55c: 78ba ldrb r2, [r7, #2] - 800e55e: 705a strb r2, [r3, #1] - icmphdr->id = 0; - 800e560: 697b ldr r3, [r7, #20] - 800e562: 2200 movs r2, #0 - 800e564: 711a strb r2, [r3, #4] - 800e566: 2200 movs r2, #0 - 800e568: 715a strb r2, [r3, #5] - icmphdr->seqno = 0; - 800e56a: 697b ldr r3, [r7, #20] - 800e56c: 2200 movs r2, #0 - 800e56e: 719a strb r2, [r3, #6] - 800e570: 2200 movs r2, #0 - 800e572: 71da strb r2, [r3, #7] - - /* copy fields from original packet */ - SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, - 800e574: 69fb ldr r3, [r7, #28] - 800e576: 685b ldr r3, [r3, #4] - 800e578: f103 0008 add.w r0, r3, #8 - 800e57c: 687b ldr r3, [r7, #4] - 800e57e: 685b ldr r3, [r3, #4] - 800e580: 221c movs r2, #28 - 800e582: 4619 mov r1, r3 - 800e584: f001 fc0c bl 800fda0 - IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); - - ip4_addr_copy(iphdr_src, iphdr->src); - 800e588: 69bb ldr r3, [r7, #24] - 800e58a: 68db ldr r3, [r3, #12] - 800e58c: 60fb str r3, [r7, #12] - ip4_addr_t iphdr_dst; - ip4_addr_copy(iphdr_dst, iphdr->dest); - netif = ip4_route_src(&iphdr_src, &iphdr_dst); - } -#else - netif = ip4_route(&iphdr_src); - 800e58e: f107 030c add.w r3, r7, #12 - 800e592: 4618 mov r0, r3 - 800e594: f000 f824 bl 800e5e0 - 800e598: 6138 str r0, [r7, #16] -#endif - if (netif != NULL) { - 800e59a: 693b ldr r3, [r7, #16] - 800e59c: 2b00 cmp r3, #0 - 800e59e: d011 beq.n 800e5c4 - /* calculate checksum */ - icmphdr->chksum = 0; - 800e5a0: 697b ldr r3, [r7, #20] - 800e5a2: 2200 movs r2, #0 - 800e5a4: 709a strb r2, [r3, #2] - 800e5a6: 2200 movs r2, #0 - 800e5a8: 70da strb r2, [r3, #3] - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) { - icmphdr->chksum = inet_chksum(icmphdr, q->len); - } -#endif - ICMP_STATS_INC(icmp.xmit); - ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif); - 800e5aa: f107 020c add.w r2, r7, #12 - 800e5ae: 693b ldr r3, [r7, #16] - 800e5b0: 9302 str r3, [sp, #8] - 800e5b2: 2301 movs r3, #1 - 800e5b4: 9301 str r3, [sp, #4] - 800e5b6: 2300 movs r3, #0 - 800e5b8: 9300 str r3, [sp, #0] - 800e5ba: 23ff movs r3, #255 ; 0xff - 800e5bc: 2100 movs r1, #0 - 800e5be: 69f8 ldr r0, [r7, #28] - 800e5c0: f000 f9d6 bl 800e970 - } - pbuf_free(q); - 800e5c4: 69f8 ldr r0, [r7, #28] - 800e5c6: f7f7 fe5b bl 8006280 - 800e5ca: e000 b.n 800e5ce - return; - 800e5cc: bf00 nop -} - 800e5ce: 3720 adds r7, #32 - 800e5d0: 46bd mov sp, r7 - 800e5d2: bd80 pop {r7, pc} - 800e5d4: 080126ac .word 0x080126ac - 800e5d8: 08012778 .word 0x08012778 - 800e5dc: 0801271c .word 0x0801271c - -0800e5e0 : - * @param dest the destination IP address for which to find the route - * @return the netif on which to send to reach dest - */ -struct netif * -ip4_route(const ip4_addr_t *dest) -{ - 800e5e0: b480 push {r7} - 800e5e2: b085 sub sp, #20 - 800e5e4: af00 add r7, sp, #0 - 800e5e6: 6078 str r0, [r7, #4] - return ip4_default_multicast_netif; - } -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - - /* iterate through netifs */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - 800e5e8: 4b30 ldr r3, [pc, #192] ; (800e6ac ) - 800e5ea: 681b ldr r3, [r3, #0] - 800e5ec: 60fb str r3, [r7, #12] - 800e5ee: e036 b.n 800e65e - /* is the netif up, does it have a link and a valid address? */ - if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { - 800e5f0: 68fb ldr r3, [r7, #12] - 800e5f2: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800e5f6: f003 0301 and.w r3, r3, #1 - 800e5fa: b2db uxtb r3, r3 - 800e5fc: 2b00 cmp r3, #0 - 800e5fe: d02b beq.n 800e658 - 800e600: 68fb ldr r3, [r7, #12] - 800e602: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800e606: 089b lsrs r3, r3, #2 - 800e608: f003 0301 and.w r3, r3, #1 - 800e60c: b2db uxtb r3, r3 - 800e60e: 2b00 cmp r3, #0 - 800e610: d022 beq.n 800e658 - 800e612: 68fb ldr r3, [r7, #12] - 800e614: 3304 adds r3, #4 - 800e616: 681b ldr r3, [r3, #0] - 800e618: 2b00 cmp r3, #0 - 800e61a: d01d beq.n 800e658 - /* network mask matches? */ - if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { - 800e61c: 687b ldr r3, [r7, #4] - 800e61e: 681a ldr r2, [r3, #0] - 800e620: 68fb ldr r3, [r7, #12] - 800e622: 3304 adds r3, #4 - 800e624: 681b ldr r3, [r3, #0] - 800e626: 405a eors r2, r3 - 800e628: 68fb ldr r3, [r7, #12] - 800e62a: 3308 adds r3, #8 - 800e62c: 681b ldr r3, [r3, #0] - 800e62e: 4013 ands r3, r2 - 800e630: 2b00 cmp r3, #0 - 800e632: d101 bne.n 800e638 - /* return netif on which to forward IP packet */ - return netif; - 800e634: 68fb ldr r3, [r7, #12] - 800e636: e033 b.n 800e6a0 - } - /* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */ - if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) { - 800e638: 68fb ldr r3, [r7, #12] - 800e63a: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800e63e: f003 0302 and.w r3, r3, #2 - 800e642: 2b00 cmp r3, #0 - 800e644: d108 bne.n 800e658 - 800e646: 687b ldr r3, [r7, #4] - 800e648: 681a ldr r2, [r3, #0] - 800e64a: 68fb ldr r3, [r7, #12] - 800e64c: 330c adds r3, #12 - 800e64e: 681b ldr r3, [r3, #0] - 800e650: 429a cmp r2, r3 - 800e652: d101 bne.n 800e658 - /* return netif on which to forward IP packet */ - return netif; - 800e654: 68fb ldr r3, [r7, #12] - 800e656: e023 b.n 800e6a0 - for (netif = netif_list; netif != NULL; netif = netif->next) { - 800e658: 68fb ldr r3, [r7, #12] - 800e65a: 681b ldr r3, [r3, #0] - 800e65c: 60fb str r3, [r7, #12] - 800e65e: 68fb ldr r3, [r7, #12] - 800e660: 2b00 cmp r3, #0 - 800e662: d1c5 bne.n 800e5f0 - if (netif != NULL) { - return netif; - } -#endif - - if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || - 800e664: 4b12 ldr r3, [pc, #72] ; (800e6b0 ) - 800e666: 681b ldr r3, [r3, #0] - 800e668: 2b00 cmp r3, #0 - 800e66a: d015 beq.n 800e698 - 800e66c: 4b10 ldr r3, [pc, #64] ; (800e6b0 ) - 800e66e: 681b ldr r3, [r3, #0] - 800e670: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800e674: f003 0301 and.w r3, r3, #1 - 800e678: 2b00 cmp r3, #0 - 800e67a: d00d beq.n 800e698 - 800e67c: 4b0c ldr r3, [pc, #48] ; (800e6b0 ) - 800e67e: 681b ldr r3, [r3, #0] - 800e680: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800e684: f003 0304 and.w r3, r3, #4 - 800e688: 2b00 cmp r3, #0 - 800e68a: d005 beq.n 800e698 - ip4_addr_isany_val(*netif_ip4_addr(netif_default))) { - 800e68c: 4b08 ldr r3, [pc, #32] ; (800e6b0 ) - 800e68e: 681b ldr r3, [r3, #0] - 800e690: 3304 adds r3, #4 - 800e692: 681b ldr r3, [r3, #0] - if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || - 800e694: 2b00 cmp r3, #0 - 800e696: d101 bne.n 800e69c - If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */ - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); - IP_STATS_INC(ip.rterr); - MIB2_STATS_INC(mib2.ipoutnoroutes); - return NULL; - 800e698: 2300 movs r3, #0 - 800e69a: e001 b.n 800e6a0 - } - - return netif_default; - 800e69c: 4b04 ldr r3, [pc, #16] ; (800e6b0 ) - 800e69e: 681b ldr r3, [r3, #0] -} - 800e6a0: 4618 mov r0, r3 - 800e6a2: 3714 adds r7, #20 - 800e6a4: 46bd mov sp, r7 - 800e6a6: bc80 pop {r7} - 800e6a8: 4770 bx lr - 800e6aa: bf00 nop - 800e6ac: 20006d58 .word 0x20006d58 - 800e6b0: 20006d5c .word 0x20006d5c - -0800e6b4 : - * @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) -{ - 800e6b4: b580 push {r7, lr} - 800e6b6: b088 sub sp, #32 - 800e6b8: af00 add r7, sp, #0 - 800e6ba: 6078 str r0, [r7, #4] - 800e6bc: 6039 str r1, [r7, #0] - struct ip_hdr *iphdr; - struct netif *netif; - u16_t iphdr_hlen; - u16_t iphdr_len; -#if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP - int check_ip_src = 1; - 800e6be: 2301 movs r3, #1 - 800e6c0: 617b str r3, [r7, #20] - - IP_STATS_INC(ip.recv); - MIB2_STATS_INC(mib2.ipinreceives); - - /* identify the IP header */ - iphdr = (struct ip_hdr *)p->payload; - 800e6c2: 687b ldr r3, [r7, #4] - 800e6c4: 685b ldr r3, [r3, #4] - 800e6c6: 61fb str r3, [r7, #28] - if (IPH_V(iphdr) != 4) { - 800e6c8: 69fb ldr r3, [r7, #28] - 800e6ca: 781b ldrb r3, [r3, #0] - 800e6cc: 091b lsrs r3, r3, #4 - 800e6ce: b2db uxtb r3, r3 - 800e6d0: 2b04 cmp r3, #4 - 800e6d2: d004 beq.n 800e6de - 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); - 800e6d4: 6878 ldr r0, [r7, #4] - 800e6d6: f7f7 fdd3 bl 8006280 - IP_STATS_INC(ip.err); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinhdrerrors); - return ERR_OK; - 800e6da: 2300 movs r3, #0 - 800e6dc: e140 b.n 800e960 - return ERR_OK; - } -#endif - - /* obtain IP header length in number of 32-bit words */ - iphdr_hlen = IPH_HL(iphdr); - 800e6de: 69fb ldr r3, [r7, #28] - 800e6e0: 781b ldrb r3, [r3, #0] - 800e6e2: b29b uxth r3, r3 - 800e6e4: f003 030f and.w r3, r3, #15 - 800e6e8: 81fb strh r3, [r7, #14] - /* calculate IP header length in bytes */ - iphdr_hlen *= 4; - 800e6ea: 89fb ldrh r3, [r7, #14] - 800e6ec: 009b lsls r3, r3, #2 - 800e6ee: 81fb strh r3, [r7, #14] - /* obtain ip length in bytes */ - iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); - 800e6f0: 69fb ldr r3, [r7, #28] - 800e6f2: 885b ldrh r3, [r3, #2] - 800e6f4: b29b uxth r3, r3 - 800e6f6: 4618 mov r0, r3 - 800e6f8: f7f6 fcad bl 8005056 - 800e6fc: 4603 mov r3, r0 - 800e6fe: 81bb strh r3, [r7, #12] - - /* Trim pbuf. This is especially required for packets < 60 bytes. */ - if (iphdr_len < p->tot_len) { - 800e700: 687b ldr r3, [r7, #4] - 800e702: 891b ldrh r3, [r3, #8] - 800e704: 89ba ldrh r2, [r7, #12] - 800e706: 429a cmp r2, r3 - 800e708: d204 bcs.n 800e714 - pbuf_realloc(p, iphdr_len); - 800e70a: 89bb ldrh r3, [r7, #12] - 800e70c: 4619 mov r1, r3 - 800e70e: 6878 ldr r0, [r7, #4] - 800e710: f7f7 fc42 bl 8005f98 - } - - /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ - if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) { - 800e714: 687b ldr r3, [r7, #4] - 800e716: 895b ldrh r3, [r3, #10] - 800e718: 89fa ldrh r2, [r7, #14] - 800e71a: 429a cmp r2, r3 - 800e71c: d807 bhi.n 800e72e - 800e71e: 687b ldr r3, [r7, #4] - 800e720: 891b ldrh r3, [r3, #8] - 800e722: 89ba ldrh r2, [r7, #12] - 800e724: 429a cmp r2, r3 - 800e726: d802 bhi.n 800e72e - 800e728: 89fb ldrh r3, [r7, #14] - 800e72a: 2b13 cmp r3, #19 - 800e72c: d804 bhi.n 800e738 - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", - iphdr_len, p->tot_len)); - } - /* free (drop) packet pbufs */ - pbuf_free(p); - 800e72e: 6878 ldr r0, [r7, #4] - 800e730: f7f7 fda6 bl 8006280 - IP_STATS_INC(ip.lenerr); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipindiscards); - return ERR_OK; - 800e734: 2300 movs r3, #0 - 800e736: e113 b.n 800e960 - } - } -#endif - - /* copy IP addresses to aligned ip_addr_t */ - ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); - 800e738: 69fb ldr r3, [r7, #28] - 800e73a: 691b ldr r3, [r3, #16] - 800e73c: 4a8a ldr r2, [pc, #552] ; (800e968 ) - 800e73e: 6153 str r3, [r2, #20] - ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); - 800e740: 69fb ldr r3, [r7, #28] - 800e742: 68db ldr r3, [r3, #12] - 800e744: 4a88 ldr r2, [pc, #544] ; (800e968 ) - 800e746: 6113 str r3, [r2, #16] - - /* match packet against an interface, i.e. is this packet for us? */ - if (ip4_addr_ismulticast(ip4_current_dest_addr())) { - 800e748: 4b87 ldr r3, [pc, #540] ; (800e968 ) - 800e74a: 695b ldr r3, [r3, #20] - 800e74c: f003 03f0 and.w r3, r3, #240 ; 0xf0 - 800e750: 2be0 cmp r3, #224 ; 0xe0 - 800e752: d112 bne.n 800e77a - netif = inp; - } else { - netif = NULL; - } -#else /* LWIP_IGMP */ - if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { - 800e754: 683b ldr r3, [r7, #0] - 800e756: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800e75a: f003 0301 and.w r3, r3, #1 - 800e75e: b2db uxtb r3, r3 - 800e760: 2b00 cmp r3, #0 - 800e762: d007 beq.n 800e774 - 800e764: 683b ldr r3, [r7, #0] - 800e766: 3304 adds r3, #4 - 800e768: 681b ldr r3, [r3, #0] - 800e76a: 2b00 cmp r3, #0 - 800e76c: d002 beq.n 800e774 - netif = inp; - 800e76e: 683b ldr r3, [r7, #0] - 800e770: 61bb str r3, [r7, #24] - 800e772: e041 b.n 800e7f8 - } else { - netif = NULL; - 800e774: 2300 movs r3, #0 - 800e776: 61bb str r3, [r7, #24] - 800e778: e03e b.n 800e7f8 -#endif /* LWIP_IGMP */ - } else { - /* start trying with inp. if that's not acceptable, start walking the - list of configured netifs. - 'first' is used as a boolean to mark whether we started walking the list */ - int first = 1; - 800e77a: 2301 movs r3, #1 - 800e77c: 613b str r3, [r7, #16] - netif = inp; - 800e77e: 683b ldr r3, [r7, #0] - 800e780: 61bb str r3, [r7, #24] - ip4_addr_get_u32(&iphdr->dest) & 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(&iphdr->dest) & ~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)))) { - 800e782: 69bb ldr r3, [r7, #24] - 800e784: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800e788: f003 0301 and.w r3, r3, #1 - 800e78c: b2db uxtb r3, r3 - 800e78e: 2b00 cmp r3, #0 - 800e790: d014 beq.n 800e7bc - 800e792: 69bb ldr r3, [r7, #24] - 800e794: 3304 adds r3, #4 - 800e796: 681b ldr r3, [r3, #0] - 800e798: 2b00 cmp r3, #0 - 800e79a: d00f beq.n 800e7bc - /* unicast to this interface address? */ - if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || - 800e79c: 4b72 ldr r3, [pc, #456] ; (800e968 ) - 800e79e: 695a ldr r2, [r3, #20] - 800e7a0: 69bb ldr r3, [r7, #24] - 800e7a2: 3304 adds r3, #4 - 800e7a4: 681b ldr r3, [r3, #0] - 800e7a6: 429a cmp r2, r3 - 800e7a8: d026 beq.n 800e7f8 - /* or broadcast on this interface network address? */ - ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) - 800e7aa: 4b6f ldr r3, [pc, #444] ; (800e968 ) - 800e7ac: 695b ldr r3, [r3, #20] - 800e7ae: 69b9 ldr r1, [r7, #24] - 800e7b0: 4618 mov r0, r3 - 800e7b2: f000 f9af bl 800eb14 - 800e7b6: 4603 mov r3, r0 - if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || - 800e7b8: 2b00 cmp r3, #0 - 800e7ba: d11d bne.n 800e7f8 - /* break out of for loop */ - break; - } -#endif /* LWIP_AUTOIP */ - } - if (first) { - 800e7bc: 693b ldr r3, [r7, #16] - 800e7be: 2b00 cmp r3, #0 - 800e7c0: d00d beq.n 800e7de -#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF - /* Packets sent to the loopback address must not be accepted on an - * interface that does not have the loopback address assigned to it, - * unless a non-loopback interface is used for loopback traffic. */ - if (ip4_addr_isloopback(ip4_current_dest_addr())) { - 800e7c2: 4b69 ldr r3, [pc, #420] ; (800e968 ) - 800e7c4: 695b ldr r3, [r3, #20] - 800e7c6: b2db uxtb r3, r3 - 800e7c8: 2b7f cmp r3, #127 ; 0x7f - 800e7ca: d102 bne.n 800e7d2 - netif = NULL; - 800e7cc: 2300 movs r3, #0 - 800e7ce: 61bb str r3, [r7, #24] - break; - 800e7d0: e012 b.n 800e7f8 - } -#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ - first = 0; - 800e7d2: 2300 movs r3, #0 - 800e7d4: 613b str r3, [r7, #16] - netif = netif_list; - 800e7d6: 4b65 ldr r3, [pc, #404] ; (800e96c ) - 800e7d8: 681b ldr r3, [r3, #0] - 800e7da: 61bb str r3, [r7, #24] - 800e7dc: e002 b.n 800e7e4 - } else { - netif = netif->next; - 800e7de: 69bb ldr r3, [r7, #24] - 800e7e0: 681b ldr r3, [r3, #0] - 800e7e2: 61bb str r3, [r7, #24] - } - if (netif == inp) { - 800e7e4: 69ba ldr r2, [r7, #24] - 800e7e6: 683b ldr r3, [r7, #0] - 800e7e8: 429a cmp r2, r3 - 800e7ea: d102 bne.n 800e7f2 - netif = netif->next; - 800e7ec: 69bb ldr r3, [r7, #24] - 800e7ee: 681b ldr r3, [r3, #0] - 800e7f0: 61bb str r3, [r7, #24] - } - } while (netif != NULL); - 800e7f2: 69bb ldr r3, [r7, #24] - 800e7f4: 2b00 cmp r3, #0 - 800e7f6: d1c4 bne.n 800e782 - * If you want to accept private broadcast communication while a netif is down, - * define LWIP_IP_ACCEPT_UDP_PORT(dst_port), e.g.: - * - * #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345)) - */ - if (netif == NULL) { - 800e7f8: 69bb ldr r3, [r7, #24] - 800e7fa: 2b00 cmp r3, #0 - 800e7fc: d111 bne.n 800e822 - /* remote port is DHCP server? */ - if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { - 800e7fe: 69fb ldr r3, [r7, #28] - 800e800: 7a5b ldrb r3, [r3, #9] - 800e802: 2b11 cmp r3, #17 - 800e804: d10d bne.n 800e822 - struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); - 800e806: 89fb ldrh r3, [r7, #14] - 800e808: 69fa ldr r2, [r7, #28] - 800e80a: 4413 add r3, r2 - 800e80c: 60bb str r3, [r7, #8] - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: UDP packet to DHCP client port %"U16_F"\n", - lwip_ntohs(udphdr->dest))); - if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { - 800e80e: 68bb ldr r3, [r7, #8] - 800e810: 885b ldrh r3, [r3, #2] - 800e812: b29b uxth r3, r3 - 800e814: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 - 800e818: d103 bne.n 800e822 - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); - netif = inp; - 800e81a: 683b ldr r3, [r7, #0] - 800e81c: 61bb str r3, [r7, #24] - check_ip_src = 0; - 800e81e: 2300 movs r3, #0 - 800e820: 617b str r3, [r7, #20] - } -#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ - - /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ -#if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING - if (check_ip_src - 800e822: 697b ldr r3, [r7, #20] - 800e824: 2b00 cmp r3, #0 - 800e826: d017 beq.n 800e858 -#if IP_ACCEPT_LINK_LAYER_ADDRESSING - /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ - && !ip4_addr_isany_val(*ip4_current_src_addr()) - 800e828: 4b4f ldr r3, [pc, #316] ; (800e968 ) - 800e82a: 691b ldr r3, [r3, #16] - 800e82c: 2b00 cmp r3, #0 - 800e82e: d013 beq.n 800e858 -#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ - ) -#endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ - { - if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || - 800e830: 4b4d ldr r3, [pc, #308] ; (800e968 ) - 800e832: 691b ldr r3, [r3, #16] - 800e834: 6839 ldr r1, [r7, #0] - 800e836: 4618 mov r0, r3 - 800e838: f000 f96c bl 800eb14 - 800e83c: 4603 mov r3, r0 - 800e83e: 2b00 cmp r3, #0 - 800e840: d105 bne.n 800e84e - (ip4_addr_ismulticast(ip4_current_src_addr()))) { - 800e842: 4b49 ldr r3, [pc, #292] ; (800e968 ) - 800e844: 691b ldr r3, [r3, #16] - 800e846: f003 03f0 and.w r3, r3, #240 ; 0xf0 - if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || - 800e84a: 2be0 cmp r3, #224 ; 0xe0 - 800e84c: d104 bne.n 800e858 - /* packet source is not valid */ - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip4_input: packet source is not valid.\n")); - /* free (drop) packet pbufs */ - pbuf_free(p); - 800e84e: 6878 ldr r0, [r7, #4] - 800e850: f7f7 fd16 bl 8006280 - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinaddrerrors); - MIB2_STATS_INC(mib2.ipindiscards); - return ERR_OK; - 800e854: 2300 movs r3, #0 - 800e856: e083 b.n 800e960 - } - } - - /* packet not for us? */ - if (netif == NULL) { - 800e858: 69bb ldr r3, [r7, #24] - 800e85a: 2b00 cmp r3, #0 - 800e85c: d104 bne.n 800e868 - { - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinaddrerrors); - MIB2_STATS_INC(mib2.ipindiscards); - } - pbuf_free(p); - 800e85e: 6878 ldr r0, [r7, #4] - 800e860: f7f7 fd0e bl 8006280 - return ERR_OK; - 800e864: 2300 movs r3, #0 - 800e866: e07b b.n 800e960 - } - /* packet consists of multiple fragments? */ - if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { - 800e868: 69fb ldr r3, [r7, #28] - 800e86a: 88db ldrh r3, [r3, #6] - 800e86c: b29b uxth r3, r3 - 800e86e: 461a mov r2, r3 - 800e870: f64f 733f movw r3, #65343 ; 0xff3f - 800e874: 4013 ands r3, r2 - 800e876: 2b00 cmp r3, #0 - 800e878: d00b beq.n 800e892 -#if IP_REASSEMBLY /* packet fragment reassembly code present? */ - LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip4_reass()\n", - lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK)*8))); - /* reassemble the packet*/ - p = ip4_reass(p); - 800e87a: 6878 ldr r0, [r7, #4] - 800e87c: f000 fc8e bl 800f19c - 800e880: 6078 str r0, [r7, #4] - /* packet not fully reassembled yet? */ - if (p == NULL) { - 800e882: 687b ldr r3, [r7, #4] - 800e884: 2b00 cmp r3, #0 - 800e886: d101 bne.n 800e88c - return ERR_OK; - 800e888: 2300 movs r3, #0 - 800e88a: e069 b.n 800e960 - } - iphdr = (struct ip_hdr *)p->payload; - 800e88c: 687b ldr r3, [r7, #4] - 800e88e: 685b ldr r3, [r3, #4] - 800e890: 61fb str r3, [r7, #28] - /* send to upper layers */ - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: \n")); - ip4_debug_print(p); - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); - - ip_data.current_netif = netif; - 800e892: 4a35 ldr r2, [pc, #212] ; (800e968 ) - 800e894: 69bb ldr r3, [r7, #24] - 800e896: 6013 str r3, [r2, #0] - ip_data.current_input_netif = inp; - 800e898: 4a33 ldr r2, [pc, #204] ; (800e968 ) - 800e89a: 683b ldr r3, [r7, #0] - 800e89c: 6053 str r3, [r2, #4] - ip_data.current_ip4_header = iphdr; - 800e89e: 4a32 ldr r2, [pc, #200] ; (800e968 ) - 800e8a0: 69fb ldr r3, [r7, #28] - 800e8a2: 6093 str r3, [r2, #8] - ip_data.current_ip_header_tot_len = IPH_HL(iphdr) * 4; - 800e8a4: 69fb ldr r3, [r7, #28] - 800e8a6: 781b ldrb r3, [r3, #0] - 800e8a8: b29b uxth r3, r3 - 800e8aa: f003 030f and.w r3, r3, #15 - 800e8ae: b29b uxth r3, r3 - 800e8b0: 009b lsls r3, r3, #2 - 800e8b2: b29a uxth r2, r3 - 800e8b4: 4b2c ldr r3, [pc, #176] ; (800e968 ) - 800e8b6: 819a strh r2, [r3, #12] -#if LWIP_RAW - /* raw input did not eat the packet? */ - if (raw_input(p, inp) == 0) -#endif /* LWIP_RAW */ - { - pbuf_header(p, -(s16_t)iphdr_hlen); /* Move to payload, no check necessary. */ - 800e8b8: 89fb ldrh r3, [r7, #14] - 800e8ba: 425b negs r3, r3 - 800e8bc: b29b uxth r3, r3 - 800e8be: b21b sxth r3, r3 - 800e8c0: 4619 mov r1, r3 - 800e8c2: 6878 ldr r0, [r7, #4] - 800e8c4: f7f7 fcb8 bl 8006238 - - switch (IPH_PROTO(iphdr)) { - 800e8c8: 69fb ldr r3, [r7, #28] - 800e8ca: 7a5b ldrb r3, [r3, #9] - 800e8cc: 2b11 cmp r3, #17 - 800e8ce: d006 beq.n 800e8de - 800e8d0: 2b11 cmp r3, #17 - 800e8d2: dc13 bgt.n 800e8fc - 800e8d4: 2b01 cmp r3, #1 - 800e8d6: d00c beq.n 800e8f2 - 800e8d8: 2b06 cmp r3, #6 - 800e8da: d005 beq.n 800e8e8 - 800e8dc: e00e b.n 800e8fc - case IP_PROTO_UDP: -#if LWIP_UDPLITE - case IP_PROTO_UDPLITE: -#endif /* LWIP_UDPLITE */ - MIB2_STATS_INC(mib2.ipindelivers); - udp_input(p, inp); - 800e8de: 6839 ldr r1, [r7, #0] - 800e8e0: 6878 ldr r0, [r7, #4] - 800e8e2: f7fc fc0f bl 800b104 - break; - 800e8e6: e028 b.n 800e93a -#endif /* LWIP_UDP */ -#if LWIP_TCP - case IP_PROTO_TCP: - MIB2_STATS_INC(mib2.ipindelivers); - tcp_input(p, inp); - 800e8e8: 6839 ldr r1, [r7, #0] - 800e8ea: 6878 ldr r0, [r7, #4] - 800e8ec: f7f9 f914 bl 8007b18 - break; - 800e8f0: e023 b.n 800e93a -#endif /* LWIP_TCP */ -#if LWIP_ICMP - case IP_PROTO_ICMP: - MIB2_STATS_INC(mib2.ipindelivers); - icmp_input(p, inp); - 800e8f2: 6839 ldr r1, [r7, #0] - 800e8f4: 6878 ldr r0, [r7, #4] - 800e8f6: f7ff fce5 bl 800e2c4 - break; - 800e8fa: e01e b.n 800e93a - break; -#endif /* LWIP_IGMP */ - default: -#if LWIP_ICMP - /* send ICMP destination protocol unreachable unless is was a broadcast */ - if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && - 800e8fc: 4b1a ldr r3, [pc, #104] ; (800e968 ) - 800e8fe: 695b ldr r3, [r3, #20] - 800e900: 69b9 ldr r1, [r7, #24] - 800e902: 4618 mov r0, r3 - 800e904: f000 f906 bl 800eb14 - 800e908: 4603 mov r3, r0 - 800e90a: 2b00 cmp r3, #0 - 800e90c: d112 bne.n 800e934 - !ip4_addr_ismulticast(ip4_current_dest_addr())) { - 800e90e: 4b16 ldr r3, [pc, #88] ; (800e968 ) - 800e910: 695b ldr r3, [r3, #20] - 800e912: f003 03f0 and.w r3, r3, #240 ; 0xf0 - if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && - 800e916: 2be0 cmp r3, #224 ; 0xe0 - 800e918: d00c beq.n 800e934 - pbuf_header_force(p, iphdr_hlen); /* Move to ip header, no check necessary. */ - 800e91a: f9b7 300e ldrsh.w r3, [r7, #14] - 800e91e: 4619 mov r1, r3 - 800e920: 6878 ldr r0, [r7, #4] - 800e922: f7f7 fc9b bl 800625c - p->payload = iphdr; - 800e926: 687b ldr r3, [r7, #4] - 800e928: 69fa ldr r2, [r7, #28] - 800e92a: 605a str r2, [r3, #4] - icmp_dest_unreach(p, ICMP_DUR_PROTO); - 800e92c: 2102 movs r1, #2 - 800e92e: 6878 ldr r0, [r7, #4] - 800e930: f7ff fdce bl 800e4d0 - } -#endif /* LWIP_ICMP */ - pbuf_free(p); - 800e934: 6878 ldr r0, [r7, #4] - 800e936: f7f7 fca3 bl 8006280 - MIB2_STATS_INC(mib2.ipinunknownprotos); - } - } - - /* @todo: this is not really necessary... */ - ip_data.current_netif = NULL; - 800e93a: 4b0b ldr r3, [pc, #44] ; (800e968 ) - 800e93c: 2200 movs r2, #0 - 800e93e: 601a str r2, [r3, #0] - ip_data.current_input_netif = NULL; - 800e940: 4b09 ldr r3, [pc, #36] ; (800e968 ) - 800e942: 2200 movs r2, #0 - 800e944: 605a str r2, [r3, #4] - ip_data.current_ip4_header = NULL; - 800e946: 4b08 ldr r3, [pc, #32] ; (800e968 ) - 800e948: 2200 movs r2, #0 - 800e94a: 609a str r2, [r3, #8] - ip_data.current_ip_header_tot_len = 0; - 800e94c: 4b06 ldr r3, [pc, #24] ; (800e968 ) - 800e94e: 2200 movs r2, #0 - 800e950: 819a strh r2, [r3, #12] - ip4_addr_set_any(ip4_current_src_addr()); - 800e952: 4b05 ldr r3, [pc, #20] ; (800e968 ) - 800e954: 2200 movs r2, #0 - 800e956: 611a str r2, [r3, #16] - ip4_addr_set_any(ip4_current_dest_addr()); - 800e958: 4b03 ldr r3, [pc, #12] ; (800e968 ) - 800e95a: 2200 movs r2, #0 - 800e95c: 615a str r2, [r3, #20] - - return ERR_OK; - 800e95e: 2300 movs r3, #0 -} - 800e960: 4618 mov r0, r3 - 800e962: 3720 adds r7, #32 - 800e964: 46bd mov sp, r7 - 800e966: bd80 pop {r7, pc} - 800e968: 200037e8 .word 0x200037e8 - 800e96c: 20006d58 .word 0x20006d58 - -0800e970 : - */ -err_t -ip4_output_if(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) -{ - 800e970: b580 push {r7, lr} - 800e972: b08a sub sp, #40 ; 0x28 - 800e974: af04 add r7, sp, #16 - 800e976: 60f8 str r0, [r7, #12] - 800e978: 60b9 str r1, [r7, #8] - 800e97a: 607a str r2, [r7, #4] - 800e97c: 70fb strb r3, [r7, #3] -ip4_output_if_opt(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, void *ip_options, - u16_t optlen) -{ -#endif /* IP_OPTIONS_SEND */ - const ip4_addr_t *src_used = src; - 800e97e: 68bb ldr r3, [r7, #8] - 800e980: 617b str r3, [r7, #20] - if (dest != LWIP_IP_HDRINCL) { - 800e982: 687b ldr r3, [r7, #4] - 800e984: 2b00 cmp r3, #0 - 800e986: d009 beq.n 800e99c - if (ip4_addr_isany(src)) { - 800e988: 68bb ldr r3, [r7, #8] - 800e98a: 2b00 cmp r3, #0 - 800e98c: d003 beq.n 800e996 - 800e98e: 68bb ldr r3, [r7, #8] - 800e990: 681b ldr r3, [r3, #0] - 800e992: 2b00 cmp r3, #0 - 800e994: d102 bne.n 800e99c - src_used = netif_ip4_addr(netif); - 800e996: 6abb ldr r3, [r7, #40] ; 0x28 - 800e998: 3304 adds r3, #4 - 800e99a: 617b str r3, [r7, #20] - -#if IP_OPTIONS_SEND - return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto, netif, - ip_options, optlen); -#else /* IP_OPTIONS_SEND */ - return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif); - 800e99c: 78fa ldrb r2, [r7, #3] - 800e99e: 6abb ldr r3, [r7, #40] ; 0x28 - 800e9a0: 9302 str r3, [sp, #8] - 800e9a2: f897 3024 ldrb.w r3, [r7, #36] ; 0x24 - 800e9a6: 9301 str r3, [sp, #4] - 800e9a8: f897 3020 ldrb.w r3, [r7, #32] - 800e9ac: 9300 str r3, [sp, #0] - 800e9ae: 4613 mov r3, r2 - 800e9b0: 687a ldr r2, [r7, #4] - 800e9b2: 6979 ldr r1, [r7, #20] - 800e9b4: 68f8 ldr r0, [r7, #12] - 800e9b6: f000 f805 bl 800e9c4 - 800e9ba: 4603 mov r3, r0 -#endif /* IP_OPTIONS_SEND */ -} - 800e9bc: 4618 mov r0, r3 - 800e9be: 3718 adds r7, #24 - 800e9c0: 46bd mov sp, r7 - 800e9c2: bd80 pop {r7, pc} - -0800e9c4 : - */ -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) -{ - 800e9c4: b580 push {r7, lr} - 800e9c6: b088 sub sp, #32 - 800e9c8: af00 add r7, sp, #0 - 800e9ca: 60f8 str r0, [r7, #12] - 800e9cc: 60b9 str r1, [r7, #8] - 800e9ce: 607a str r2, [r7, #4] - 800e9d0: 70fb strb r3, [r7, #3] - ip4_addr_t dest_addr; -#if CHECKSUM_GEN_IP_INLINE - u32_t chk_sum = 0; -#endif /* CHECKSUM_GEN_IP_INLINE */ - - LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - 800e9d2: 68fb ldr r3, [r7, #12] - 800e9d4: 89db ldrh r3, [r3, #14] - 800e9d6: 2b01 cmp r3, #1 - 800e9d8: d006 beq.n 800e9e8 - 800e9da: 4b48 ldr r3, [pc, #288] ; (800eafc ) - 800e9dc: f240 3233 movw r2, #819 ; 0x333 - 800e9e0: 4947 ldr r1, [pc, #284] ; (800eb00 ) - 800e9e2: 4848 ldr r0, [pc, #288] ; (800eb04 ) - 800e9e4: f001 f86e bl 800fac4 - - MIB2_STATS_INC(mib2.ipoutrequests); - - /* Should the IP header be generated or is it already included in p? */ - if (dest != LWIP_IP_HDRINCL) { - 800e9e8: 687b ldr r3, [r7, #4] - 800e9ea: 2b00 cmp r3, #0 - 800e9ec: d060 beq.n 800eab0 - u16_t ip_hlen = IP_HLEN; - 800e9ee: 2314 movs r3, #20 - 800e9f0: 837b strh r3, [r7, #26] - } -#endif /* CHECKSUM_GEN_IP_INLINE */ - } -#endif /* IP_OPTIONS_SEND */ - /* generate IP header */ - if (pbuf_header(p, IP_HLEN)) { - 800e9f2: 2114 movs r1, #20 - 800e9f4: 68f8 ldr r0, [r7, #12] - 800e9f6: f7f7 fc1f bl 8006238 - 800e9fa: 4603 mov r3, r0 - 800e9fc: 2b00 cmp r3, #0 - 800e9fe: d002 beq.n 800ea06 - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: not enough room for IP header in pbuf\n")); - - IP_STATS_INC(ip.err); - MIB2_STATS_INC(mib2.ipoutdiscards); - return ERR_BUF; - 800ea00: f06f 0301 mvn.w r3, #1 - 800ea04: e075 b.n 800eaf2 - } - - iphdr = (struct ip_hdr *)p->payload; - 800ea06: 68fb ldr r3, [r7, #12] - 800ea08: 685b ldr r3, [r3, #4] - 800ea0a: 61fb str r3, [r7, #28] - LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", - 800ea0c: 68fb ldr r3, [r7, #12] - 800ea0e: 895b ldrh r3, [r3, #10] - 800ea10: 2b13 cmp r3, #19 - 800ea12: d806 bhi.n 800ea22 - 800ea14: 4b39 ldr r3, [pc, #228] ; (800eafc ) - 800ea16: f44f 7258 mov.w r2, #864 ; 0x360 - 800ea1a: 493b ldr r1, [pc, #236] ; (800eb08 ) - 800ea1c: 4839 ldr r0, [pc, #228] ; (800eb04 ) - 800ea1e: f001 f851 bl 800fac4 - (p->len >= sizeof(struct ip_hdr))); - - IPH_TTL_SET(iphdr, ttl); - 800ea22: 69fb ldr r3, [r7, #28] - 800ea24: 78fa ldrb r2, [r7, #3] - 800ea26: 721a strb r2, [r3, #8] - IPH_PROTO_SET(iphdr, proto); - 800ea28: 69fb ldr r3, [r7, #28] - 800ea2a: f897 202c ldrb.w r2, [r7, #44] ; 0x2c - 800ea2e: 725a strb r2, [r3, #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); - 800ea30: 687b ldr r3, [r7, #4] - 800ea32: 681a ldr r2, [r3, #0] - 800ea34: 69fb ldr r3, [r7, #28] - 800ea36: 611a str r2, [r3, #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); - 800ea38: 8b7b ldrh r3, [r7, #26] - 800ea3a: 089b lsrs r3, r3, #2 - 800ea3c: b29b uxth r3, r3 - 800ea3e: b2db uxtb r3, r3 - 800ea40: f043 0340 orr.w r3, r3, #64 ; 0x40 - 800ea44: b2da uxtb r2, r3 - 800ea46: 69fb ldr r3, [r7, #28] - 800ea48: 701a strb r2, [r3, #0] - IPH_TOS_SET(iphdr, tos); - 800ea4a: 69fb ldr r3, [r7, #28] - 800ea4c: f897 2028 ldrb.w r2, [r7, #40] ; 0x28 - 800ea50: 705a strb r2, [r3, #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)); - 800ea52: 68fb ldr r3, [r7, #12] - 800ea54: 891b ldrh r3, [r3, #8] - 800ea56: 4618 mov r0, r3 - 800ea58: f7f6 fafd bl 8005056 - 800ea5c: 4603 mov r3, r0 - 800ea5e: 461a mov r2, r3 - 800ea60: 69fb ldr r3, [r7, #28] - 800ea62: 805a strh r2, [r3, #2] -#if CHECKSUM_GEN_IP_INLINE - chk_sum += iphdr->_len; -#endif /* CHECKSUM_GEN_IP_INLINE */ - IPH_OFFSET_SET(iphdr, 0); - 800ea64: 69fb ldr r3, [r7, #28] - 800ea66: 2200 movs r2, #0 - 800ea68: 719a strb r2, [r3, #6] - 800ea6a: 2200 movs r2, #0 - 800ea6c: 71da strb r2, [r3, #7] - IPH_ID_SET(iphdr, lwip_htons(ip_id)); - 800ea6e: 4b27 ldr r3, [pc, #156] ; (800eb0c ) - 800ea70: 881b ldrh r3, [r3, #0] - 800ea72: 4618 mov r0, r3 - 800ea74: f7f6 faef bl 8005056 - 800ea78: 4603 mov r3, r0 - 800ea7a: 461a mov r2, r3 - 800ea7c: 69fb ldr r3, [r7, #28] - 800ea7e: 809a strh r2, [r3, #4] -#if CHECKSUM_GEN_IP_INLINE - chk_sum += iphdr->_id; -#endif /* CHECKSUM_GEN_IP_INLINE */ - ++ip_id; - 800ea80: 4b22 ldr r3, [pc, #136] ; (800eb0c ) - 800ea82: 881b ldrh r3, [r3, #0] - 800ea84: 3301 adds r3, #1 - 800ea86: b29a uxth r2, r3 - 800ea88: 4b20 ldr r3, [pc, #128] ; (800eb0c ) - 800ea8a: 801a strh r2, [r3, #0] - - if (src == NULL) { - 800ea8c: 68bb ldr r3, [r7, #8] - 800ea8e: 2b00 cmp r3, #0 - 800ea90: d104 bne.n 800ea9c - ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); - 800ea92: 4b1f ldr r3, [pc, #124] ; (800eb10 ) - 800ea94: 681a ldr r2, [r3, #0] - 800ea96: 69fb ldr r3, [r7, #28] - 800ea98: 60da str r2, [r3, #12] - 800ea9a: e003 b.n 800eaa4 - } else { - /* src cannot be NULL here */ - ip4_addr_copy(iphdr->src, *src); - 800ea9c: 68bb ldr r3, [r7, #8] - 800ea9e: 681a ldr r2, [r3, #0] - 800eaa0: 69fb ldr r3, [r7, #28] - 800eaa2: 60da str r2, [r3, #12] - else { - IPH_CHKSUM_SET(iphdr, 0); - } -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ -#else /* CHECKSUM_GEN_IP_INLINE */ - IPH_CHKSUM_SET(iphdr, 0); - 800eaa4: 69fb ldr r3, [r7, #28] - 800eaa6: 2200 movs r2, #0 - 800eaa8: 729a strb r2, [r3, #10] - 800eaaa: 2200 movs r2, #0 - 800eaac: 72da strb r2, [r3, #11] - 800eaae: e008 b.n 800eac2 - } -#endif /* CHECKSUM_GEN_IP */ -#endif /* CHECKSUM_GEN_IP_INLINE */ - } else { - /* IP header already included in p */ - iphdr = (struct ip_hdr *)p->payload; - 800eab0: 68fb ldr r3, [r7, #12] - 800eab2: 685b ldr r3, [r3, #4] - 800eab4: 61fb str r3, [r7, #28] - ip4_addr_copy(dest_addr, iphdr->dest); - 800eab6: 69fb ldr r3, [r7, #28] - 800eab8: 691b ldr r3, [r3, #16] - 800eaba: 617b str r3, [r7, #20] - dest = &dest_addr; - 800eabc: f107 0314 add.w r3, r7, #20 - 800eac0: 607b str r3, [r7, #4] - } -#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)) { - 800eac2: 6b3b ldr r3, [r7, #48] ; 0x30 - 800eac4: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800eac6: 2b00 cmp r3, #0 - 800eac8: d00c beq.n 800eae4 - 800eaca: 68fb ldr r3, [r7, #12] - 800eacc: 891a ldrh r2, [r3, #8] - 800eace: 6b3b ldr r3, [r7, #48] ; 0x30 - 800ead0: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800ead2: 429a cmp r2, r3 - 800ead4: d906 bls.n 800eae4 - return ip4_frag(p, netif, dest); - 800ead6: 687a ldr r2, [r7, #4] - 800ead8: 6b39 ldr r1, [r7, #48] ; 0x30 - 800eada: 68f8 ldr r0, [r7, #12] - 800eadc: f000 fd08 bl 800f4f0 - 800eae0: 4603 mov r3, r0 - 800eae2: e006 b.n 800eaf2 - } -#endif /* IP_FRAG */ - - LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n")); - return netif->output(netif, p, dest); - 800eae4: 6b3b ldr r3, [r7, #48] ; 0x30 - 800eae6: 695b ldr r3, [r3, #20] - 800eae8: 687a ldr r2, [r7, #4] - 800eaea: 68f9 ldr r1, [r7, #12] - 800eaec: 6b38 ldr r0, [r7, #48] ; 0x30 - 800eaee: 4798 blx r3 - 800eaf0: 4603 mov r3, r0 -} - 800eaf2: 4618 mov r0, r3 - 800eaf4: 3720 adds r7, #32 - 800eaf6: 46bd mov sp, r7 - 800eaf8: bd80 pop {r7, pc} - 800eafa: bf00 nop - 800eafc: 080127a4 .word 0x080127a4 - 800eb00: 080127d8 .word 0x080127d8 - 800eb04: 080127e4 .word 0x080127e4 - 800eb08: 0801280c .word 0x0801280c - 800eb0c: 20006eea .word 0x20006eea - 800eb10: 08012bb8 .word 0x08012bb8 - -0800eb14 : - * @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) -{ - 800eb14: b480 push {r7} - 800eb16: b085 sub sp, #20 - 800eb18: af00 add r7, sp, #0 - 800eb1a: 6078 str r0, [r7, #4] - 800eb1c: 6039 str r1, [r7, #0] - ip4_addr_t ipaddr; - ip4_addr_set_u32(&ipaddr, addr); - 800eb1e: 687b ldr r3, [r7, #4] - 800eb20: 60fb str r3, [r7, #12] - - /* all ones (broadcast) or all zeroes (old skool broadcast) */ - if ((~addr == IPADDR_ANY) || - 800eb22: 687b ldr r3, [r7, #4] - 800eb24: f1b3 3fff cmp.w r3, #4294967295 - 800eb28: d002 beq.n 800eb30 - 800eb2a: 687b ldr r3, [r7, #4] - 800eb2c: 2b00 cmp r3, #0 - 800eb2e: d101 bne.n 800eb34 - (addr == IPADDR_ANY)) { - return 1; - 800eb30: 2301 movs r3, #1 - 800eb32: e02a b.n 800eb8a - /* no broadcast support on this network interface? */ - } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { - 800eb34: 683b ldr r3, [r7, #0] - 800eb36: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800eb3a: f003 0302 and.w r3, r3, #2 - 800eb3e: 2b00 cmp r3, #0 - 800eb40: d101 bne.n 800eb46 - /* the given address cannot be a broadcast address - * nor can we check against any broadcast addresses */ - return 0; - 800eb42: 2300 movs r3, #0 - 800eb44: e021 b.n 800eb8a - /* address matches network interface address exactly? => no broadcast */ - } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { - 800eb46: 683b ldr r3, [r7, #0] - 800eb48: 3304 adds r3, #4 - 800eb4a: 681b ldr r3, [r3, #0] - 800eb4c: 687a ldr r2, [r7, #4] - 800eb4e: 429a cmp r2, r3 - 800eb50: d101 bne.n 800eb56 - return 0; - 800eb52: 2300 movs r3, #0 - 800eb54: e019 b.n 800eb8a - /* on the same (sub) network... */ - } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) - 800eb56: 68fa ldr r2, [r7, #12] - 800eb58: 683b ldr r3, [r7, #0] - 800eb5a: 3304 adds r3, #4 - 800eb5c: 681b ldr r3, [r3, #0] - 800eb5e: 405a eors r2, r3 - 800eb60: 683b ldr r3, [r7, #0] - 800eb62: 3308 adds r3, #8 - 800eb64: 681b ldr r3, [r3, #0] - 800eb66: 4013 ands r3, r2 - 800eb68: 2b00 cmp r3, #0 - 800eb6a: d10d bne.n 800eb88 - /* ...and host identifier bits are all ones? =>... */ - && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == - 800eb6c: 683b ldr r3, [r7, #0] - 800eb6e: 3308 adds r3, #8 - 800eb70: 681b ldr r3, [r3, #0] - 800eb72: 43da mvns r2, r3 - 800eb74: 687b ldr r3, [r7, #4] - 800eb76: 401a ands r2, r3 - (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { - 800eb78: 683b ldr r3, [r7, #0] - 800eb7a: 3308 adds r3, #8 - 800eb7c: 681b ldr r3, [r3, #0] - 800eb7e: 43db mvns r3, r3 - && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == - 800eb80: 429a cmp r2, r3 - 800eb82: d101 bne.n 800eb88 - /* => network broadcast address */ - return 1; - 800eb84: 2301 movs r3, #1 - 800eb86: e000 b.n 800eb8a - } else { - return 0; - 800eb88: 2300 movs r3, #0 - } -} - 800eb8a: 4618 mov r0, r3 - 800eb8c: 3714 adds r7, #20 - 800eb8e: 46bd mov sp, r7 - 800eb90: bc80 pop {r7} - 800eb92: 4770 bx lr - -0800eb94 : - * - * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). - */ -void -ip_reass_tmr(void) -{ - 800eb94: b580 push {r7, lr} - 800eb96: b084 sub sp, #16 - 800eb98: af00 add r7, sp, #0 - struct ip_reassdata *r, *prev = NULL; - 800eb9a: 2300 movs r3, #0 - 800eb9c: 60bb str r3, [r7, #8] - - r = reassdatagrams; - 800eb9e: 4b12 ldr r3, [pc, #72] ; (800ebe8 ) - 800eba0: 681b ldr r3, [r3, #0] - 800eba2: 60fb str r3, [r7, #12] - while (r != NULL) { - 800eba4: e018 b.n 800ebd8 - /* Decrement the timer. Once it reaches 0, - * clean up the incomplete fragment assembly */ - if (r->timer > 0) { - 800eba6: 68fb ldr r3, [r7, #12] - 800eba8: 7fdb ldrb r3, [r3, #31] - 800ebaa: 2b00 cmp r3, #0 - 800ebac: d00b beq.n 800ebc6 - r->timer--; - 800ebae: 68fb ldr r3, [r7, #12] - 800ebb0: 7fdb ldrb r3, [r3, #31] - 800ebb2: 3b01 subs r3, #1 - 800ebb4: b2da uxtb r2, r3 - 800ebb6: 68fb ldr r3, [r7, #12] - 800ebb8: 77da strb r2, [r3, #31] - LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n",(u16_t)r->timer)); - prev = r; - 800ebba: 68fb ldr r3, [r7, #12] - 800ebbc: 60bb str r3, [r7, #8] - r = r->next; - 800ebbe: 68fb ldr r3, [r7, #12] - 800ebc0: 681b ldr r3, [r3, #0] - 800ebc2: 60fb str r3, [r7, #12] - 800ebc4: e008 b.n 800ebd8 - } else { - /* reassembly timed out */ - struct ip_reassdata *tmp; - LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); - tmp = r; - 800ebc6: 68fb ldr r3, [r7, #12] - 800ebc8: 607b str r3, [r7, #4] - /* get the next pointer before freeing */ - r = r->next; - 800ebca: 68fb ldr r3, [r7, #12] - 800ebcc: 681b ldr r3, [r3, #0] - 800ebce: 60fb str r3, [r7, #12] - /* free the helper struct and all enqueued pbufs */ - ip_reass_free_complete_datagram(tmp, prev); - 800ebd0: 68b9 ldr r1, [r7, #8] - 800ebd2: 6878 ldr r0, [r7, #4] - 800ebd4: f000 f80a bl 800ebec - while (r != NULL) { - 800ebd8: 68fb ldr r3, [r7, #12] - 800ebda: 2b00 cmp r3, #0 - 800ebdc: d1e3 bne.n 800eba6 - } - } -} - 800ebde: bf00 nop - 800ebe0: bf00 nop - 800ebe2: 3710 adds r7, #16 - 800ebe4: 46bd mov sp, r7 - 800ebe6: bd80 pop {r7, pc} - 800ebe8: 20006eec .word 0x20006eec - -0800ebec : - * @param prev the previous datagram in the linked list - * @return the number of pbufs freed - */ -static int -ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev) -{ - 800ebec: b580 push {r7, lr} - 800ebee: b088 sub sp, #32 - 800ebf0: af00 add r7, sp, #0 - 800ebf2: 6078 str r0, [r7, #4] - 800ebf4: 6039 str r1, [r7, #0] - u16_t pbufs_freed = 0; - 800ebf6: 2300 movs r3, #0 - 800ebf8: 83fb strh r3, [r7, #30] - u16_t clen; - struct pbuf *p; - struct ip_reass_helper *iprh; - - LWIP_ASSERT("prev != ipr", prev != ipr); - 800ebfa: 683a ldr r2, [r7, #0] - 800ebfc: 687b ldr r3, [r7, #4] - 800ebfe: 429a cmp r2, r3 - 800ec00: d105 bne.n 800ec0e - 800ec02: 4b45 ldr r3, [pc, #276] ; (800ed18 ) - 800ec04: 22ab movs r2, #171 ; 0xab - 800ec06: 4945 ldr r1, [pc, #276] ; (800ed1c ) - 800ec08: 4845 ldr r0, [pc, #276] ; (800ed20 ) - 800ec0a: f000 ff5b bl 800fac4 - if (prev != NULL) { - 800ec0e: 683b ldr r3, [r7, #0] - 800ec10: 2b00 cmp r3, #0 - 800ec12: d00a beq.n 800ec2a - LWIP_ASSERT("prev->next == ipr", prev->next == ipr); - 800ec14: 683b ldr r3, [r7, #0] - 800ec16: 681b ldr r3, [r3, #0] - 800ec18: 687a ldr r2, [r7, #4] - 800ec1a: 429a cmp r2, r3 - 800ec1c: d005 beq.n 800ec2a - 800ec1e: 4b3e ldr r3, [pc, #248] ; (800ed18 ) - 800ec20: 22ad movs r2, #173 ; 0xad - 800ec22: 4940 ldr r1, [pc, #256] ; (800ed24 ) - 800ec24: 483e ldr r0, [pc, #248] ; (800ed20 ) - 800ec26: f000 ff4d bl 800fac4 - } - - MIB2_STATS_INC(mib2.ipreasmfails); -#if LWIP_ICMP - iprh = (struct ip_reass_helper *)ipr->p->payload; - 800ec2a: 687b ldr r3, [r7, #4] - 800ec2c: 685b ldr r3, [r3, #4] - 800ec2e: 685b ldr r3, [r3, #4] - 800ec30: 617b str r3, [r7, #20] - if (iprh->start == 0) { - 800ec32: 697b ldr r3, [r7, #20] - 800ec34: 889b ldrh r3, [r3, #4] - 800ec36: b29b uxth r3, r3 - 800ec38: 2b00 cmp r3, #0 - 800ec3a: d12a bne.n 800ec92 - /* The first fragment was received, send ICMP time exceeded. */ - /* First, de-queue the first pbuf from r->p. */ - p = ipr->p; - 800ec3c: 687b ldr r3, [r7, #4] - 800ec3e: 685b ldr r3, [r3, #4] - 800ec40: 61bb str r3, [r7, #24] - ipr->p = iprh->next_pbuf; - 800ec42: 697b ldr r3, [r7, #20] - 800ec44: 681a ldr r2, [r3, #0] - 800ec46: 687b ldr r3, [r7, #4] - 800ec48: 605a str r2, [r3, #4] - /* Then, copy the original header into it. */ - SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); - 800ec4a: 69bb ldr r3, [r7, #24] - 800ec4c: 6858 ldr r0, [r3, #4] - 800ec4e: 687b ldr r3, [r7, #4] - 800ec50: 3308 adds r3, #8 - 800ec52: 2214 movs r2, #20 - 800ec54: 4619 mov r1, r3 - 800ec56: f001 f8a3 bl 800fda0 - icmp_time_exceeded(p, ICMP_TE_FRAG); - 800ec5a: 2101 movs r1, #1 - 800ec5c: 69b8 ldr r0, [r7, #24] - 800ec5e: f7ff fc47 bl 800e4f0 - clen = pbuf_clen(p); - 800ec62: 69b8 ldr r0, [r7, #24] - 800ec64: f7f7 fba0 bl 80063a8 - 800ec68: 4603 mov r3, r0 - 800ec6a: 827b strh r3, [r7, #18] - LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - 800ec6c: 8bfa ldrh r2, [r7, #30] - 800ec6e: 8a7b ldrh r3, [r7, #18] - 800ec70: 4413 add r3, r2 - 800ec72: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 800ec76: db05 blt.n 800ec84 - 800ec78: 4b27 ldr r3, [pc, #156] ; (800ed18 ) - 800ec7a: 22bc movs r2, #188 ; 0xbc - 800ec7c: 492a ldr r1, [pc, #168] ; (800ed28 ) - 800ec7e: 4828 ldr r0, [pc, #160] ; (800ed20 ) - 800ec80: f000 ff20 bl 800fac4 - pbufs_freed += clen; - 800ec84: 8bfa ldrh r2, [r7, #30] - 800ec86: 8a7b ldrh r3, [r7, #18] - 800ec88: 4413 add r3, r2 - 800ec8a: 83fb strh r3, [r7, #30] - pbuf_free(p); - 800ec8c: 69b8 ldr r0, [r7, #24] - 800ec8e: f7f7 faf7 bl 8006280 - } -#endif /* LWIP_ICMP */ - - /* First, free all received pbufs. The individual pbufs need to be released - separately as they have not yet been chained */ - p = ipr->p; - 800ec92: 687b ldr r3, [r7, #4] - 800ec94: 685b ldr r3, [r3, #4] - 800ec96: 61bb str r3, [r7, #24] - while (p != NULL) { - 800ec98: e01f b.n 800ecda - struct pbuf *pcur; - iprh = (struct ip_reass_helper *)p->payload; - 800ec9a: 69bb ldr r3, [r7, #24] - 800ec9c: 685b ldr r3, [r3, #4] - 800ec9e: 617b str r3, [r7, #20] - pcur = p; - 800eca0: 69bb ldr r3, [r7, #24] - 800eca2: 60fb str r3, [r7, #12] - /* get the next pointer before freeing */ - p = iprh->next_pbuf; - 800eca4: 697b ldr r3, [r7, #20] - 800eca6: 681b ldr r3, [r3, #0] - 800eca8: 61bb str r3, [r7, #24] - clen = pbuf_clen(pcur); - 800ecaa: 68f8 ldr r0, [r7, #12] - 800ecac: f7f7 fb7c bl 80063a8 - 800ecb0: 4603 mov r3, r0 - 800ecb2: 827b strh r3, [r7, #18] - LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - 800ecb4: 8bfa ldrh r2, [r7, #30] - 800ecb6: 8a7b ldrh r3, [r7, #18] - 800ecb8: 4413 add r3, r2 - 800ecba: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 - 800ecbe: db05 blt.n 800eccc - 800ecc0: 4b15 ldr r3, [pc, #84] ; (800ed18 ) - 800ecc2: 22cc movs r2, #204 ; 0xcc - 800ecc4: 4918 ldr r1, [pc, #96] ; (800ed28 ) - 800ecc6: 4816 ldr r0, [pc, #88] ; (800ed20 ) - 800ecc8: f000 fefc bl 800fac4 - pbufs_freed += clen; - 800eccc: 8bfa ldrh r2, [r7, #30] - 800ecce: 8a7b ldrh r3, [r7, #18] - 800ecd0: 4413 add r3, r2 - 800ecd2: 83fb strh r3, [r7, #30] - pbuf_free(pcur); - 800ecd4: 68f8 ldr r0, [r7, #12] - 800ecd6: f7f7 fad3 bl 8006280 - while (p != NULL) { - 800ecda: 69bb ldr r3, [r7, #24] - 800ecdc: 2b00 cmp r3, #0 - 800ecde: d1dc bne.n 800ec9a - } - /* Then, unchain the struct ip_reassdata from the list and free it. */ - ip_reass_dequeue_datagram(ipr, prev); - 800ece0: 6839 ldr r1, [r7, #0] - 800ece2: 6878 ldr r0, [r7, #4] - 800ece4: f000 f8c2 bl 800ee6c - LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= pbufs_freed); - 800ece8: 4b10 ldr r3, [pc, #64] ; (800ed2c ) - 800ecea: 881b ldrh r3, [r3, #0] - 800ecec: 8bfa ldrh r2, [r7, #30] - 800ecee: 429a cmp r2, r3 - 800ecf0: d905 bls.n 800ecfe - 800ecf2: 4b09 ldr r3, [pc, #36] ; (800ed18 ) - 800ecf4: 22d2 movs r2, #210 ; 0xd2 - 800ecf6: 490e ldr r1, [pc, #56] ; (800ed30 ) - 800ecf8: 4809 ldr r0, [pc, #36] ; (800ed20 ) - 800ecfa: f000 fee3 bl 800fac4 - ip_reass_pbufcount -= pbufs_freed; - 800ecfe: 4b0b ldr r3, [pc, #44] ; (800ed2c ) - 800ed00: 881a ldrh r2, [r3, #0] - 800ed02: 8bfb ldrh r3, [r7, #30] - 800ed04: 1ad3 subs r3, r2, r3 - 800ed06: b29a uxth r2, r3 - 800ed08: 4b08 ldr r3, [pc, #32] ; (800ed2c ) - 800ed0a: 801a strh r2, [r3, #0] - - return pbufs_freed; - 800ed0c: 8bfb ldrh r3, [r7, #30] -} - 800ed0e: 4618 mov r0, r3 - 800ed10: 3720 adds r7, #32 - 800ed12: 46bd mov sp, r7 - 800ed14: bd80 pop {r7, pc} - 800ed16: bf00 nop - 800ed18: 0801283c .word 0x0801283c - 800ed1c: 08012878 .word 0x08012878 - 800ed20: 08012884 .word 0x08012884 - 800ed24: 080128ac .word 0x080128ac - 800ed28: 080128c0 .word 0x080128c0 - 800ed2c: 20006ef0 .word 0x20006ef0 - 800ed30: 080128e0 .word 0x080128e0 - -0800ed34 : - * (used for freeing other datagrams if not enough space) - * @return the number of pbufs freed - */ -static int -ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed) -{ - 800ed34: b580 push {r7, lr} - 800ed36: b08a sub sp, #40 ; 0x28 - 800ed38: af00 add r7, sp, #0 - 800ed3a: 6078 str r0, [r7, #4] - 800ed3c: 6039 str r1, [r7, #0] - /* @todo Can't we simply remove the last datagram in the - * linked list behind reassdatagrams? - */ - struct ip_reassdata *r, *oldest, *prev, *oldest_prev; - int pbufs_freed = 0, pbufs_freed_current; - 800ed3e: 2300 movs r3, #0 - 800ed40: 617b str r3, [r7, #20] - int other_datagrams; - - /* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs, - * but don't free the datagram that 'fraghdr' belongs to! */ - do { - oldest = NULL; - 800ed42: 2300 movs r3, #0 - 800ed44: 623b str r3, [r7, #32] - prev = NULL; - 800ed46: 2300 movs r3, #0 - 800ed48: 61fb str r3, [r7, #28] - oldest_prev = NULL; - 800ed4a: 2300 movs r3, #0 - 800ed4c: 61bb str r3, [r7, #24] - other_datagrams = 0; - 800ed4e: 2300 movs r3, #0 - 800ed50: 613b str r3, [r7, #16] - r = reassdatagrams; - 800ed52: 4b28 ldr r3, [pc, #160] ; (800edf4 ) - 800ed54: 681b ldr r3, [r3, #0] - 800ed56: 627b str r3, [r7, #36] ; 0x24 - while (r != NULL) { - 800ed58: e030 b.n 800edbc - if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { - 800ed5a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800ed5c: 695a ldr r2, [r3, #20] - 800ed5e: 687b ldr r3, [r7, #4] - 800ed60: 68db ldr r3, [r3, #12] - 800ed62: 429a cmp r2, r3 - 800ed64: d10c bne.n 800ed80 - 800ed66: 6a7b ldr r3, [r7, #36] ; 0x24 - 800ed68: 699a ldr r2, [r3, #24] - 800ed6a: 687b ldr r3, [r7, #4] - 800ed6c: 691b ldr r3, [r3, #16] - 800ed6e: 429a cmp r2, r3 - 800ed70: d106 bne.n 800ed80 - 800ed72: 6a7b ldr r3, [r7, #36] ; 0x24 - 800ed74: 899a ldrh r2, [r3, #12] - 800ed76: 687b ldr r3, [r7, #4] - 800ed78: 889b ldrh r3, [r3, #4] - 800ed7a: b29b uxth r3, r3 - 800ed7c: 429a cmp r2, r3 - 800ed7e: d014 beq.n 800edaa - /* Not the same datagram as fraghdr */ - other_datagrams++; - 800ed80: 693b ldr r3, [r7, #16] - 800ed82: 3301 adds r3, #1 - 800ed84: 613b str r3, [r7, #16] - if (oldest == NULL) { - 800ed86: 6a3b ldr r3, [r7, #32] - 800ed88: 2b00 cmp r3, #0 - 800ed8a: d104 bne.n 800ed96 - oldest = r; - 800ed8c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800ed8e: 623b str r3, [r7, #32] - oldest_prev = prev; - 800ed90: 69fb ldr r3, [r7, #28] - 800ed92: 61bb str r3, [r7, #24] - 800ed94: e009 b.n 800edaa - } else if (r->timer <= oldest->timer) { - 800ed96: 6a7b ldr r3, [r7, #36] ; 0x24 - 800ed98: 7fda ldrb r2, [r3, #31] - 800ed9a: 6a3b ldr r3, [r7, #32] - 800ed9c: 7fdb ldrb r3, [r3, #31] - 800ed9e: 429a cmp r2, r3 - 800eda0: d803 bhi.n 800edaa - /* older than the previous oldest */ - oldest = r; - 800eda2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800eda4: 623b str r3, [r7, #32] - oldest_prev = prev; - 800eda6: 69fb ldr r3, [r7, #28] - 800eda8: 61bb str r3, [r7, #24] - } - } - if (r->next != NULL) { - 800edaa: 6a7b ldr r3, [r7, #36] ; 0x24 - 800edac: 681b ldr r3, [r3, #0] - 800edae: 2b00 cmp r3, #0 - 800edb0: d001 beq.n 800edb6 - prev = r; - 800edb2: 6a7b ldr r3, [r7, #36] ; 0x24 - 800edb4: 61fb str r3, [r7, #28] - } - r = r->next; - 800edb6: 6a7b ldr r3, [r7, #36] ; 0x24 - 800edb8: 681b ldr r3, [r3, #0] - 800edba: 627b str r3, [r7, #36] ; 0x24 - while (r != NULL) { - 800edbc: 6a7b ldr r3, [r7, #36] ; 0x24 - 800edbe: 2b00 cmp r3, #0 - 800edc0: d1cb bne.n 800ed5a - } - if (oldest != NULL) { - 800edc2: 6a3b ldr r3, [r7, #32] - 800edc4: 2b00 cmp r3, #0 - 800edc6: d008 beq.n 800edda - pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); - 800edc8: 69b9 ldr r1, [r7, #24] - 800edca: 6a38 ldr r0, [r7, #32] - 800edcc: f7ff ff0e bl 800ebec - 800edd0: 60f8 str r0, [r7, #12] - pbufs_freed += pbufs_freed_current; - 800edd2: 697a ldr r2, [r7, #20] - 800edd4: 68fb ldr r3, [r7, #12] - 800edd6: 4413 add r3, r2 - 800edd8: 617b str r3, [r7, #20] - } - } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); - 800edda: 697a ldr r2, [r7, #20] - 800eddc: 683b ldr r3, [r7, #0] - 800edde: 429a cmp r2, r3 - 800ede0: da02 bge.n 800ede8 - 800ede2: 693b ldr r3, [r7, #16] - 800ede4: 2b01 cmp r3, #1 - 800ede6: dcac bgt.n 800ed42 - return pbufs_freed; - 800ede8: 697b ldr r3, [r7, #20] -} - 800edea: 4618 mov r0, r3 - 800edec: 3728 adds r7, #40 ; 0x28 - 800edee: 46bd mov sp, r7 - 800edf0: bd80 pop {r7, pc} - 800edf2: bf00 nop - 800edf4: 20006eec .word 0x20006eec - -0800edf8 : - * @param clen number of pbufs needed to enqueue (used for freeing other datagrams if not enough space) - * @return A pointer to the queue location into which the fragment was enqueued - */ -static struct ip_reassdata* -ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen) -{ - 800edf8: b580 push {r7, lr} - 800edfa: b084 sub sp, #16 - 800edfc: af00 add r7, sp, #0 - 800edfe: 6078 str r0, [r7, #4] - 800ee00: 6039 str r1, [r7, #0] -#if ! IP_REASS_FREE_OLDEST - LWIP_UNUSED_ARG(clen); -#endif - - /* No matching previous fragment found, allocate a new reassdata struct */ - ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); - 800ee02: 2004 movs r0, #4 - 800ee04: f7f6 fcd0 bl 80057a8 - 800ee08: 60f8 str r0, [r7, #12] - if (ipr == NULL) { - 800ee0a: 68fb ldr r3, [r7, #12] - 800ee0c: 2b00 cmp r3, #0 - 800ee0e: d110 bne.n 800ee32 -#if IP_REASS_FREE_OLDEST - if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { - 800ee10: 6839 ldr r1, [r7, #0] - 800ee12: 6878 ldr r0, [r7, #4] - 800ee14: f7ff ff8e bl 800ed34 - 800ee18: 4602 mov r2, r0 - 800ee1a: 683b ldr r3, [r7, #0] - 800ee1c: 4293 cmp r3, r2 - 800ee1e: dc03 bgt.n 800ee28 - ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); - 800ee20: 2004 movs r0, #4 - 800ee22: f7f6 fcc1 bl 80057a8 - 800ee26: 60f8 str r0, [r7, #12] - } - if (ipr == NULL) - 800ee28: 68fb ldr r3, [r7, #12] - 800ee2a: 2b00 cmp r3, #0 - 800ee2c: d101 bne.n 800ee32 -#endif /* IP_REASS_FREE_OLDEST */ - { - IPFRAG_STATS_INC(ip_frag.memerr); - LWIP_DEBUGF(IP_REASS_DEBUG,("Failed to alloc reassdata struct\n")); - return NULL; - 800ee2e: 2300 movs r3, #0 - 800ee30: e016 b.n 800ee60 - } - } - memset(ipr, 0, sizeof(struct ip_reassdata)); - 800ee32: 2220 movs r2, #32 - 800ee34: 2100 movs r1, #0 - 800ee36: 68f8 ldr r0, [r7, #12] - 800ee38: f000 ff3e bl 800fcb8 - ipr->timer = IP_REASS_MAXAGE; - 800ee3c: 68fb ldr r3, [r7, #12] - 800ee3e: 2203 movs r2, #3 - 800ee40: 77da strb r2, [r3, #31] - - /* enqueue the new structure to the front of the list */ - ipr->next = reassdatagrams; - 800ee42: 4b09 ldr r3, [pc, #36] ; (800ee68 ) - 800ee44: 681a ldr r2, [r3, #0] - 800ee46: 68fb ldr r3, [r7, #12] - 800ee48: 601a str r2, [r3, #0] - reassdatagrams = ipr; - 800ee4a: 4a07 ldr r2, [pc, #28] ; (800ee68 ) - 800ee4c: 68fb ldr r3, [r7, #12] - 800ee4e: 6013 str r3, [r2, #0] - /* copy the ip header for later tests and input */ - /* @todo: no ip options supported? */ - SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN); - 800ee50: 68fb ldr r3, [r7, #12] - 800ee52: 3308 adds r3, #8 - 800ee54: 2214 movs r2, #20 - 800ee56: 6879 ldr r1, [r7, #4] - 800ee58: 4618 mov r0, r3 - 800ee5a: f000 ffa1 bl 800fda0 - return ipr; - 800ee5e: 68fb ldr r3, [r7, #12] -} - 800ee60: 4618 mov r0, r3 - 800ee62: 3710 adds r7, #16 - 800ee64: 46bd mov sp, r7 - 800ee66: bd80 pop {r7, pc} - 800ee68: 20006eec .word 0x20006eec - -0800ee6c : - * 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) -{ - 800ee6c: b580 push {r7, lr} - 800ee6e: b082 sub sp, #8 - 800ee70: af00 add r7, sp, #0 - 800ee72: 6078 str r0, [r7, #4] - 800ee74: 6039 str r1, [r7, #0] - /* dequeue the reass struct */ - if (reassdatagrams == ipr) { - 800ee76: 4b10 ldr r3, [pc, #64] ; (800eeb8 ) - 800ee78: 681b ldr r3, [r3, #0] - 800ee7a: 687a ldr r2, [r7, #4] - 800ee7c: 429a cmp r2, r3 - 800ee7e: d104 bne.n 800ee8a - /* it was the first in the list */ - reassdatagrams = ipr->next; - 800ee80: 687b ldr r3, [r7, #4] - 800ee82: 681b ldr r3, [r3, #0] - 800ee84: 4a0c ldr r2, [pc, #48] ; (800eeb8 ) - 800ee86: 6013 str r3, [r2, #0] - 800ee88: e00d b.n 800eea6 - } else { - /* it wasn't the first, so it must have a valid 'prev' */ - LWIP_ASSERT("sanity check linked list", prev != NULL); - 800ee8a: 683b ldr r3, [r7, #0] - 800ee8c: 2b00 cmp r3, #0 - 800ee8e: d106 bne.n 800ee9e - 800ee90: 4b0a ldr r3, [pc, #40] ; (800eebc ) - 800ee92: f240 1245 movw r2, #325 ; 0x145 - 800ee96: 490a ldr r1, [pc, #40] ; (800eec0 ) - 800ee98: 480a ldr r0, [pc, #40] ; (800eec4 ) - 800ee9a: f000 fe13 bl 800fac4 - prev->next = ipr->next; - 800ee9e: 687b ldr r3, [r7, #4] - 800eea0: 681a ldr r2, [r3, #0] - 800eea2: 683b ldr r3, [r7, #0] - 800eea4: 601a str r2, [r3, #0] - } - - /* now we can free the ip_reassdata struct */ - memp_free(MEMP_REASSDATA, ipr); - 800eea6: 6879 ldr r1, [r7, #4] - 800eea8: 2004 movs r0, #4 - 800eeaa: f7f6 fcc9 bl 8005840 -} - 800eeae: bf00 nop - 800eeb0: 3708 adds r7, #8 - 800eeb2: 46bd mov sp, r7 - 800eeb4: bd80 pop {r7, pc} - 800eeb6: bf00 nop - 800eeb8: 20006eec .word 0x20006eec - 800eebc: 0801283c .word 0x0801283c - 800eec0: 080128fc .word 0x080128fc - 800eec4: 08012884 .word 0x08012884 - -0800eec8 : - * @param is_last is 1 if this pbuf has MF==0 (ipr->flags not updated yet) - * @return see IP_REASS_VALIDATE_* defines - */ -static int -ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct pbuf *new_p, int is_last) -{ - 800eec8: b580 push {r7, lr} - 800eeca: b08c sub sp, #48 ; 0x30 - 800eecc: af00 add r7, sp, #0 - 800eece: 60f8 str r0, [r7, #12] - 800eed0: 60b9 str r1, [r7, #8] - 800eed2: 607a str r2, [r7, #4] - struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; - 800eed4: 2300 movs r3, #0 - 800eed6: 62bb str r3, [r7, #40] ; 0x28 - struct pbuf *q; - u16_t offset, len; - struct ip_hdr *fraghdr; - int valid = 1; - 800eed8: 2301 movs r3, #1 - 800eeda: 623b str r3, [r7, #32] - - /* Extract length and fragment offset from current fragment */ - fraghdr = (struct ip_hdr*)new_p->payload; - 800eedc: 68bb ldr r3, [r7, #8] - 800eede: 685b ldr r3, [r3, #4] - 800eee0: 61fb str r3, [r7, #28] - len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; - 800eee2: 69fb ldr r3, [r7, #28] - 800eee4: 885b ldrh r3, [r3, #2] - 800eee6: b29b uxth r3, r3 - 800eee8: 4618 mov r0, r3 - 800eeea: f7f6 f8b4 bl 8005056 - 800eeee: 4603 mov r3, r0 - 800eef0: 461a mov r2, r3 - 800eef2: 69fb ldr r3, [r7, #28] - 800eef4: 781b ldrb r3, [r3, #0] - 800eef6: b29b uxth r3, r3 - 800eef8: f003 030f and.w r3, r3, #15 - 800eefc: b29b uxth r3, r3 - 800eefe: 009b lsls r3, r3, #2 - 800ef00: b29b uxth r3, r3 - 800ef02: 1ad3 subs r3, r2, r3 - 800ef04: 837b strh r3, [r7, #26] - offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; - 800ef06: 69fb ldr r3, [r7, #28] - 800ef08: 88db ldrh r3, [r3, #6] - 800ef0a: b29b uxth r3, r3 - 800ef0c: 4618 mov r0, r3 - 800ef0e: f7f6 f8a2 bl 8005056 - 800ef12: 4603 mov r3, r0 - 800ef14: f3c3 030c ubfx r3, r3, #0, #13 - 800ef18: b29b uxth r3, r3 - 800ef1a: 00db lsls r3, r3, #3 - 800ef1c: 833b strh r3, [r7, #24] - /* overwrite the fragment's ip header from the pbuf with our helper struct, - * and setup the embedded helper structure. */ - /* make sure the struct ip_reass_helper fits into the IP header */ - LWIP_ASSERT("sizeof(struct ip_reass_helper) <= IP_HLEN", - sizeof(struct ip_reass_helper) <= IP_HLEN); - iprh = (struct ip_reass_helper*)new_p->payload; - 800ef1e: 68bb ldr r3, [r7, #8] - 800ef20: 685b ldr r3, [r3, #4] - 800ef22: 62fb str r3, [r7, #44] ; 0x2c - iprh->next_pbuf = NULL; - 800ef24: 6afb ldr r3, [r7, #44] ; 0x2c - 800ef26: 2200 movs r2, #0 - 800ef28: 701a strb r2, [r3, #0] - 800ef2a: 2200 movs r2, #0 - 800ef2c: 705a strb r2, [r3, #1] - 800ef2e: 2200 movs r2, #0 - 800ef30: 709a strb r2, [r3, #2] - 800ef32: 2200 movs r2, #0 - 800ef34: 70da strb r2, [r3, #3] - iprh->start = offset; - 800ef36: 6afb ldr r3, [r7, #44] ; 0x2c - 800ef38: 8b3a ldrh r2, [r7, #24] - 800ef3a: 809a strh r2, [r3, #4] - iprh->end = offset + len; - 800ef3c: 8b3a ldrh r2, [r7, #24] - 800ef3e: 8b7b ldrh r3, [r7, #26] - 800ef40: 4413 add r3, r2 - 800ef42: b29a uxth r2, r3 - 800ef44: 6afb ldr r3, [r7, #44] ; 0x2c - 800ef46: 80da strh r2, [r3, #6] - - /* Iterate through until we either get to the end of the list (append), - * or we find one with a larger offset (insert). */ - for (q = ipr->p; q != NULL;) { - 800ef48: 68fb ldr r3, [r7, #12] - 800ef4a: 685b ldr r3, [r3, #4] - 800ef4c: 627b str r3, [r7, #36] ; 0x24 - 800ef4e: e061 b.n 800f014 - iprh_tmp = (struct ip_reass_helper*)q->payload; - 800ef50: 6a7b ldr r3, [r7, #36] ; 0x24 - 800ef52: 685b ldr r3, [r3, #4] - 800ef54: 617b str r3, [r7, #20] - if (iprh->start < iprh_tmp->start) { - 800ef56: 6afb ldr r3, [r7, #44] ; 0x2c - 800ef58: 889b ldrh r3, [r3, #4] - 800ef5a: b29a uxth r2, r3 - 800ef5c: 697b ldr r3, [r7, #20] - 800ef5e: 889b ldrh r3, [r3, #4] - 800ef60: b29b uxth r3, r3 - 800ef62: 429a cmp r2, r3 - 800ef64: d232 bcs.n 800efcc - /* the new pbuf should be inserted before this */ - iprh->next_pbuf = q; - 800ef66: 6afb ldr r3, [r7, #44] ; 0x2c - 800ef68: 6a7a ldr r2, [r7, #36] ; 0x24 - 800ef6a: 601a str r2, [r3, #0] - if (iprh_prev != NULL) { - 800ef6c: 6abb ldr r3, [r7, #40] ; 0x28 - 800ef6e: 2b00 cmp r3, #0 - 800ef70: d01f beq.n 800efb2 - /* not the fragment with the lowest offset */ -#if IP_REASS_CHECK_OVERLAP - if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { - 800ef72: 6afb ldr r3, [r7, #44] ; 0x2c - 800ef74: 889b ldrh r3, [r3, #4] - 800ef76: b29a uxth r2, r3 - 800ef78: 6abb ldr r3, [r7, #40] ; 0x28 - 800ef7a: 88db ldrh r3, [r3, #6] - 800ef7c: b29b uxth r3, r3 - 800ef7e: 429a cmp r2, r3 - 800ef80: f0c0 80e3 bcc.w 800f14a - 800ef84: 6afb ldr r3, [r7, #44] ; 0x2c - 800ef86: 88db ldrh r3, [r3, #6] - 800ef88: b29a uxth r2, r3 - 800ef8a: 697b ldr r3, [r7, #20] - 800ef8c: 889b ldrh r3, [r3, #4] - 800ef8e: b29b uxth r3, r3 - 800ef90: 429a cmp r2, r3 - 800ef92: f200 80da bhi.w 800f14a - /* fragment overlaps with previous or following, throw away */ - goto freepbuf; - } -#endif /* IP_REASS_CHECK_OVERLAP */ - iprh_prev->next_pbuf = new_p; - 800ef96: 6abb ldr r3, [r7, #40] ; 0x28 - 800ef98: 68ba ldr r2, [r7, #8] - 800ef9a: 601a str r2, [r3, #0] - if (iprh_prev->end != iprh->start) { - 800ef9c: 6abb ldr r3, [r7, #40] ; 0x28 - 800ef9e: 88db ldrh r3, [r3, #6] - 800efa0: b29a uxth r2, r3 - 800efa2: 6afb ldr r3, [r7, #44] ; 0x2c - 800efa4: 889b ldrh r3, [r3, #4] - 800efa6: b29b uxth r3, r3 - 800efa8: 429a cmp r2, r3 - 800efaa: d037 beq.n 800f01c - /* There is a fragment missing between the current - * and the previous fragment */ - valid = 0; - 800efac: 2300 movs r3, #0 - 800efae: 623b str r3, [r7, #32] - } -#endif /* IP_REASS_CHECK_OVERLAP */ - /* fragment with the lowest offset */ - ipr->p = new_p; - } - break; - 800efb0: e034 b.n 800f01c - if (iprh->end > iprh_tmp->start) { - 800efb2: 6afb ldr r3, [r7, #44] ; 0x2c - 800efb4: 88db ldrh r3, [r3, #6] - 800efb6: b29a uxth r2, r3 - 800efb8: 697b ldr r3, [r7, #20] - 800efba: 889b ldrh r3, [r3, #4] - 800efbc: b29b uxth r3, r3 - 800efbe: 429a cmp r2, r3 - 800efc0: f200 80c5 bhi.w 800f14e - ipr->p = new_p; - 800efc4: 68fb ldr r3, [r7, #12] - 800efc6: 68ba ldr r2, [r7, #8] - 800efc8: 605a str r2, [r3, #4] - break; - 800efca: e027 b.n 800f01c - } else if (iprh->start == iprh_tmp->start) { - 800efcc: 6afb ldr r3, [r7, #44] ; 0x2c - 800efce: 889b ldrh r3, [r3, #4] - 800efd0: b29a uxth r2, r3 - 800efd2: 697b ldr r3, [r7, #20] - 800efd4: 889b ldrh r3, [r3, #4] - 800efd6: b29b uxth r3, r3 - 800efd8: 429a cmp r2, r3 - 800efda: f000 80ba beq.w 800f152 - /* received the same datagram twice: no need to keep the datagram */ - goto freepbuf; -#if IP_REASS_CHECK_OVERLAP - } else if (iprh->start < iprh_tmp->end) { - 800efde: 6afb ldr r3, [r7, #44] ; 0x2c - 800efe0: 889b ldrh r3, [r3, #4] - 800efe2: b29a uxth r2, r3 - 800efe4: 697b ldr r3, [r7, #20] - 800efe6: 88db ldrh r3, [r3, #6] - 800efe8: b29b uxth r3, r3 - 800efea: 429a cmp r2, r3 - 800efec: f0c0 80b3 bcc.w 800f156 - /* overlap: no need to keep the new datagram */ - goto freepbuf; -#endif /* IP_REASS_CHECK_OVERLAP */ - } else { - /* Check if the fragments received so far have no holes. */ - if (iprh_prev != NULL) { - 800eff0: 6abb ldr r3, [r7, #40] ; 0x28 - 800eff2: 2b00 cmp r3, #0 - 800eff4: d009 beq.n 800f00a - if (iprh_prev->end != iprh_tmp->start) { - 800eff6: 6abb ldr r3, [r7, #40] ; 0x28 - 800eff8: 88db ldrh r3, [r3, #6] - 800effa: b29a uxth r2, r3 - 800effc: 697b ldr r3, [r7, #20] - 800effe: 889b ldrh r3, [r3, #4] - 800f000: b29b uxth r3, r3 - 800f002: 429a cmp r2, r3 - 800f004: d001 beq.n 800f00a - /* There is a fragment missing between the current - * and the previous fragment */ - valid = 0; - 800f006: 2300 movs r3, #0 - 800f008: 623b str r3, [r7, #32] - } - } - } - q = iprh_tmp->next_pbuf; - 800f00a: 697b ldr r3, [r7, #20] - 800f00c: 681b ldr r3, [r3, #0] - 800f00e: 627b str r3, [r7, #36] ; 0x24 - iprh_prev = iprh_tmp; - 800f010: 697b ldr r3, [r7, #20] - 800f012: 62bb str r3, [r7, #40] ; 0x28 - for (q = ipr->p; q != NULL;) { - 800f014: 6a7b ldr r3, [r7, #36] ; 0x24 - 800f016: 2b00 cmp r3, #0 - 800f018: d19a bne.n 800ef50 - 800f01a: e000 b.n 800f01e - break; - 800f01c: bf00 nop - } - - /* If q is NULL, then we made it to the end of the list. Determine what to do now */ - if (q == NULL) { - 800f01e: 6a7b ldr r3, [r7, #36] ; 0x24 - 800f020: 2b00 cmp r3, #0 - 800f022: d12d bne.n 800f080 - if (iprh_prev != NULL) { - 800f024: 6abb ldr r3, [r7, #40] ; 0x28 - 800f026: 2b00 cmp r3, #0 - 800f028: d01c beq.n 800f064 - /* this is (for now), the fragment with the highest offset: - * chain it to the last fragment */ -#if IP_REASS_CHECK_OVERLAP - LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); - 800f02a: 6abb ldr r3, [r7, #40] ; 0x28 - 800f02c: 88db ldrh r3, [r3, #6] - 800f02e: b29a uxth r2, r3 - 800f030: 6afb ldr r3, [r7, #44] ; 0x2c - 800f032: 889b ldrh r3, [r3, #4] - 800f034: b29b uxth r3, r3 - 800f036: 429a cmp r2, r3 - 800f038: d906 bls.n 800f048 - 800f03a: 4b51 ldr r3, [pc, #324] ; (800f180 ) - 800f03c: f240 12ab movw r2, #427 ; 0x1ab - 800f040: 4950 ldr r1, [pc, #320] ; (800f184 ) - 800f042: 4851 ldr r0, [pc, #324] ; (800f188 ) - 800f044: f000 fd3e bl 800fac4 -#endif /* IP_REASS_CHECK_OVERLAP */ - iprh_prev->next_pbuf = new_p; - 800f048: 6abb ldr r3, [r7, #40] ; 0x28 - 800f04a: 68ba ldr r2, [r7, #8] - 800f04c: 601a str r2, [r3, #0] - if (iprh_prev->end != iprh->start) { - 800f04e: 6abb ldr r3, [r7, #40] ; 0x28 - 800f050: 88db ldrh r3, [r3, #6] - 800f052: b29a uxth r2, r3 - 800f054: 6afb ldr r3, [r7, #44] ; 0x2c - 800f056: 889b ldrh r3, [r3, #4] - 800f058: b29b uxth r3, r3 - 800f05a: 429a cmp r2, r3 - 800f05c: d010 beq.n 800f080 - valid = 0; - 800f05e: 2300 movs r3, #0 - 800f060: 623b str r3, [r7, #32] - 800f062: e00d b.n 800f080 - } - } else { -#if IP_REASS_CHECK_OVERLAP - LWIP_ASSERT("no previous fragment, this must be the first fragment!", - 800f064: 68fb ldr r3, [r7, #12] - 800f066: 685b ldr r3, [r3, #4] - 800f068: 2b00 cmp r3, #0 - 800f06a: d006 beq.n 800f07a - 800f06c: 4b44 ldr r3, [pc, #272] ; (800f180 ) - 800f06e: f240 12b3 movw r2, #435 ; 0x1b3 - 800f072: 4946 ldr r1, [pc, #280] ; (800f18c ) - 800f074: 4844 ldr r0, [pc, #272] ; (800f188 ) - 800f076: f000 fd25 bl 800fac4 - ipr->p == NULL); -#endif /* IP_REASS_CHECK_OVERLAP */ - /* this is the first fragment we ever received for this ip datagram */ - ipr->p = new_p; - 800f07a: 68fb ldr r3, [r7, #12] - 800f07c: 68ba ldr r2, [r7, #8] - 800f07e: 605a str r2, [r3, #4] - } - } - - /* At this point, the validation part begins: */ - /* If we already received the last fragment */ - if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) { - 800f080: 687b ldr r3, [r7, #4] - 800f082: 2b00 cmp r3, #0 - 800f084: d105 bne.n 800f092 - 800f086: 68fb ldr r3, [r7, #12] - 800f088: 7f9b ldrb r3, [r3, #30] - 800f08a: f003 0301 and.w r3, r3, #1 - 800f08e: 2b00 cmp r3, #0 - 800f090: d059 beq.n 800f146 - /* and had no holes so far */ - if (valid) { - 800f092: 6a3b ldr r3, [r7, #32] - 800f094: 2b00 cmp r3, #0 - 800f096: d04f beq.n 800f138 - /* then check if the rest of the fragments is here */ - /* Check if the queue starts with the first datagram */ - if ((ipr->p == NULL) || (((struct ip_reass_helper*)ipr->p->payload)->start != 0)) { - 800f098: 68fb ldr r3, [r7, #12] - 800f09a: 685b ldr r3, [r3, #4] - 800f09c: 2b00 cmp r3, #0 - 800f09e: d006 beq.n 800f0ae - 800f0a0: 68fb ldr r3, [r7, #12] - 800f0a2: 685b ldr r3, [r3, #4] - 800f0a4: 685b ldr r3, [r3, #4] - 800f0a6: 889b ldrh r3, [r3, #4] - 800f0a8: b29b uxth r3, r3 - 800f0aa: 2b00 cmp r3, #0 - 800f0ac: d002 beq.n 800f0b4 - valid = 0; - 800f0ae: 2300 movs r3, #0 - 800f0b0: 623b str r3, [r7, #32] - 800f0b2: e041 b.n 800f138 - } else { - /* and check that there are no holes after this datagram */ - iprh_prev = iprh; - 800f0b4: 6afb ldr r3, [r7, #44] ; 0x2c - 800f0b6: 62bb str r3, [r7, #40] ; 0x28 - q = iprh->next_pbuf; - 800f0b8: 6afb ldr r3, [r7, #44] ; 0x2c - 800f0ba: 681b ldr r3, [r3, #0] - 800f0bc: 627b str r3, [r7, #36] ; 0x24 - while (q != NULL) { - 800f0be: e012 b.n 800f0e6 - iprh = (struct ip_reass_helper*)q->payload; - 800f0c0: 6a7b ldr r3, [r7, #36] ; 0x24 - 800f0c2: 685b ldr r3, [r3, #4] - 800f0c4: 62fb str r3, [r7, #44] ; 0x2c - if (iprh_prev->end != iprh->start) { - 800f0c6: 6abb ldr r3, [r7, #40] ; 0x28 - 800f0c8: 88db ldrh r3, [r3, #6] - 800f0ca: b29a uxth r2, r3 - 800f0cc: 6afb ldr r3, [r7, #44] ; 0x2c - 800f0ce: 889b ldrh r3, [r3, #4] - 800f0d0: b29b uxth r3, r3 - 800f0d2: 429a cmp r2, r3 - 800f0d4: d002 beq.n 800f0dc - valid = 0; - 800f0d6: 2300 movs r3, #0 - 800f0d8: 623b str r3, [r7, #32] - break; - 800f0da: e007 b.n 800f0ec - } - iprh_prev = iprh; - 800f0dc: 6afb ldr r3, [r7, #44] ; 0x2c - 800f0de: 62bb str r3, [r7, #40] ; 0x28 - q = iprh->next_pbuf; - 800f0e0: 6afb ldr r3, [r7, #44] ; 0x2c - 800f0e2: 681b ldr r3, [r3, #0] - 800f0e4: 627b str r3, [r7, #36] ; 0x24 - while (q != NULL) { - 800f0e6: 6a7b ldr r3, [r7, #36] ; 0x24 - 800f0e8: 2b00 cmp r3, #0 - 800f0ea: d1e9 bne.n 800f0c0 - } - /* if still valid, all fragments are received - * (because to the MF==0 already arrived */ - if (valid) { - 800f0ec: 6a3b ldr r3, [r7, #32] - 800f0ee: 2b00 cmp r3, #0 - 800f0f0: d022 beq.n 800f138 - LWIP_ASSERT("sanity check", ipr->p != NULL); - 800f0f2: 68fb ldr r3, [r7, #12] - 800f0f4: 685b ldr r3, [r3, #4] - 800f0f6: 2b00 cmp r3, #0 - 800f0f8: d106 bne.n 800f108 - 800f0fa: 4b21 ldr r3, [pc, #132] ; (800f180 ) - 800f0fc: f44f 72ea mov.w r2, #468 ; 0x1d4 - 800f100: 4923 ldr r1, [pc, #140] ; (800f190 ) - 800f102: 4821 ldr r0, [pc, #132] ; (800f188 ) - 800f104: f000 fcde bl 800fac4 - LWIP_ASSERT("sanity check", - 800f108: 68fb ldr r3, [r7, #12] - 800f10a: 685b ldr r3, [r3, #4] - 800f10c: 685b ldr r3, [r3, #4] - 800f10e: 6afa ldr r2, [r7, #44] ; 0x2c - 800f110: 429a cmp r2, r3 - 800f112: d106 bne.n 800f122 - 800f114: 4b1a ldr r3, [pc, #104] ; (800f180 ) - 800f116: f240 12d5 movw r2, #469 ; 0x1d5 - 800f11a: 491d ldr r1, [pc, #116] ; (800f190 ) - 800f11c: 481a ldr r0, [pc, #104] ; (800f188 ) - 800f11e: f000 fcd1 bl 800fac4 - ((struct ip_reass_helper*)ipr->p->payload) != iprh); - LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", - 800f122: 6afb ldr r3, [r7, #44] ; 0x2c - 800f124: 681b ldr r3, [r3, #0] - 800f126: 2b00 cmp r3, #0 - 800f128: d006 beq.n 800f138 - 800f12a: 4b15 ldr r3, [pc, #84] ; (800f180 ) - 800f12c: f240 12d7 movw r2, #471 ; 0x1d7 - 800f130: 4918 ldr r1, [pc, #96] ; (800f194 ) - 800f132: 4815 ldr r0, [pc, #84] ; (800f188 ) - 800f134: f000 fcc6 bl 800fac4 - } - } - /* If valid is 0 here, there are some fragments missing in the middle - * (since MF == 0 has already arrived). Such datagrams simply time out if - * no more fragments are received... */ - return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED; - 800f138: 6a3b ldr r3, [r7, #32] - 800f13a: 2b00 cmp r3, #0 - 800f13c: bf14 ite ne - 800f13e: 2301 movne r3, #1 - 800f140: 2300 moveq r3, #0 - 800f142: b2db uxtb r3, r3 - 800f144: e018 b.n 800f178 - } - /* If we come here, not all fragments were received, yet! */ - return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ - 800f146: 2300 movs r3, #0 - 800f148: e016 b.n 800f178 - goto freepbuf; - 800f14a: bf00 nop - 800f14c: e004 b.n 800f158 - goto freepbuf; - 800f14e: bf00 nop - 800f150: e002 b.n 800f158 - goto freepbuf; - 800f152: bf00 nop - 800f154: e000 b.n 800f158 - goto freepbuf; - 800f156: bf00 nop -#if IP_REASS_CHECK_OVERLAP -freepbuf: - ip_reass_pbufcount -= pbuf_clen(new_p); - 800f158: 68b8 ldr r0, [r7, #8] - 800f15a: f7f7 f925 bl 80063a8 - 800f15e: 4603 mov r3, r0 - 800f160: 461a mov r2, r3 - 800f162: 4b0d ldr r3, [pc, #52] ; (800f198 ) - 800f164: 881b ldrh r3, [r3, #0] - 800f166: 1a9b subs r3, r3, r2 - 800f168: b29a uxth r2, r3 - 800f16a: 4b0b ldr r3, [pc, #44] ; (800f198 ) - 800f16c: 801a strh r2, [r3, #0] - pbuf_free(new_p); - 800f16e: 68b8 ldr r0, [r7, #8] - 800f170: f7f7 f886 bl 8006280 - return IP_REASS_VALIDATE_PBUF_DROPPED; - 800f174: f04f 33ff mov.w r3, #4294967295 -#endif /* IP_REASS_CHECK_OVERLAP */ -} - 800f178: 4618 mov r0, r3 - 800f17a: 3730 adds r7, #48 ; 0x30 - 800f17c: 46bd mov sp, r7 - 800f17e: bd80 pop {r7, pc} - 800f180: 0801283c .word 0x0801283c - 800f184: 08012918 .word 0x08012918 - 800f188: 08012884 .word 0x08012884 - 800f18c: 08012938 .word 0x08012938 - 800f190: 08012970 .word 0x08012970 - 800f194: 08012980 .word 0x08012980 - 800f198: 20006ef0 .word 0x20006ef0 - -0800f19c : - * @param p points to a pbuf chain of the fragment - * @return NULL if reassembly is incomplete, ? otherwise - */ -struct pbuf * -ip4_reass(struct pbuf *p) -{ - 800f19c: b580 push {r7, lr} - 800f19e: b08e sub sp, #56 ; 0x38 - 800f1a0: af00 add r7, sp, #0 - 800f1a2: 6078 str r0, [r7, #4] - int is_last; - - IPFRAG_STATS_INC(ip_frag.recv); - MIB2_STATS_INC(mib2.ipreasmreqds); - - fraghdr = (struct ip_hdr*)p->payload; - 800f1a4: 687b ldr r3, [r7, #4] - 800f1a6: 685b ldr r3, [r3, #4] - 800f1a8: 62bb str r3, [r7, #40] ; 0x28 - - if ((IPH_HL(fraghdr) * 4) != IP_HLEN) { - 800f1aa: 6abb ldr r3, [r7, #40] ; 0x28 - 800f1ac: 781b ldrb r3, [r3, #0] - 800f1ae: f003 030f and.w r3, r3, #15 - 800f1b2: 2b05 cmp r3, #5 - 800f1b4: f040 8131 bne.w 800f41a - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: IP options currently not supported!\n")); - IPFRAG_STATS_INC(ip_frag.err); - goto nullreturn; - } - - offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; - 800f1b8: 6abb ldr r3, [r7, #40] ; 0x28 - 800f1ba: 88db ldrh r3, [r3, #6] - 800f1bc: b29b uxth r3, r3 - 800f1be: 4618 mov r0, r3 - 800f1c0: f7f5 ff49 bl 8005056 - 800f1c4: 4603 mov r3, r0 - 800f1c6: f3c3 030c ubfx r3, r3, #0, #13 - 800f1ca: b29b uxth r3, r3 - 800f1cc: 00db lsls r3, r3, #3 - 800f1ce: 84fb strh r3, [r7, #38] ; 0x26 - len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; - 800f1d0: 6abb ldr r3, [r7, #40] ; 0x28 - 800f1d2: 885b ldrh r3, [r3, #2] - 800f1d4: b29b uxth r3, r3 - 800f1d6: 4618 mov r0, r3 - 800f1d8: f7f5 ff3d bl 8005056 - 800f1dc: 4603 mov r3, r0 - 800f1de: 461a mov r2, r3 - 800f1e0: 6abb ldr r3, [r7, #40] ; 0x28 - 800f1e2: 781b ldrb r3, [r3, #0] - 800f1e4: b29b uxth r3, r3 - 800f1e6: f003 030f and.w r3, r3, #15 - 800f1ea: b29b uxth r3, r3 - 800f1ec: 009b lsls r3, r3, #2 - 800f1ee: b29b uxth r3, r3 - 800f1f0: 1ad3 subs r3, r2, r3 - 800f1f2: 84bb strh r3, [r7, #36] ; 0x24 - - /* Check if we are allowed to enqueue more datagrams. */ - clen = pbuf_clen(p); - 800f1f4: 6878 ldr r0, [r7, #4] - 800f1f6: f7f7 f8d7 bl 80063a8 - 800f1fa: 4603 mov r3, r0 - 800f1fc: 847b strh r3, [r7, #34] ; 0x22 - if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { - 800f1fe: 4b8e ldr r3, [pc, #568] ; (800f438 ) - 800f200: 881b ldrh r3, [r3, #0] - 800f202: 461a mov r2, r3 - 800f204: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800f206: 4413 add r3, r2 - 800f208: 2b0a cmp r3, #10 - 800f20a: dd10 ble.n 800f22e -#if IP_REASS_FREE_OLDEST - if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || - 800f20c: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800f20e: 4619 mov r1, r3 - 800f210: 6ab8 ldr r0, [r7, #40] ; 0x28 - 800f212: f7ff fd8f bl 800ed34 - 800f216: 4603 mov r3, r0 - 800f218: 2b00 cmp r3, #0 - 800f21a: f000 8100 beq.w 800f41e - ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) - 800f21e: 4b86 ldr r3, [pc, #536] ; (800f438 ) - 800f220: 881b ldrh r3, [r3, #0] - 800f222: 461a mov r2, r3 - 800f224: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800f226: 4413 add r3, r2 - if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || - 800f228: 2b0a cmp r3, #10 - 800f22a: f300 80f8 bgt.w 800f41e - } - } - - /* Look for the datagram the fragment belongs to in the current datagram queue, - * remembering the previous in the queue for later dequeueing. */ - for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { - 800f22e: 4b83 ldr r3, [pc, #524] ; (800f43c ) - 800f230: 681b ldr r3, [r3, #0] - 800f232: 633b str r3, [r7, #48] ; 0x30 - 800f234: e015 b.n 800f262 - /* Check if the incoming fragment matches the one currently present - in the reassembly buffer. If so, we proceed with copying the - fragment into the buffer. */ - if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) { - 800f236: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f238: 695a ldr r2, [r3, #20] - 800f23a: 6abb ldr r3, [r7, #40] ; 0x28 - 800f23c: 68db ldr r3, [r3, #12] - 800f23e: 429a cmp r2, r3 - 800f240: d10c bne.n 800f25c - 800f242: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f244: 699a ldr r2, [r3, #24] - 800f246: 6abb ldr r3, [r7, #40] ; 0x28 - 800f248: 691b ldr r3, [r3, #16] - 800f24a: 429a cmp r2, r3 - 800f24c: d106 bne.n 800f25c - 800f24e: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f250: 899a ldrh r2, [r3, #12] - 800f252: 6abb ldr r3, [r7, #40] ; 0x28 - 800f254: 889b ldrh r3, [r3, #4] - 800f256: b29b uxth r3, r3 - 800f258: 429a cmp r2, r3 - 800f25a: d006 beq.n 800f26a - for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { - 800f25c: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f25e: 681b ldr r3, [r3, #0] - 800f260: 633b str r3, [r7, #48] ; 0x30 - 800f262: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f264: 2b00 cmp r3, #0 - 800f266: d1e6 bne.n 800f236 - 800f268: e000 b.n 800f26c - LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: matching previous fragment ID=%"X16_F"\n", - lwip_ntohs(IPH_ID(fraghdr)))); - IPFRAG_STATS_INC(ip_frag.cachehit); - break; - 800f26a: bf00 nop - } - } - - if (ipr == NULL) { - 800f26c: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f26e: 2b00 cmp r3, #0 - 800f270: d109 bne.n 800f286 - /* Enqueue a new datagram into the datagram queue */ - ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); - 800f272: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800f274: 4619 mov r1, r3 - 800f276: 6ab8 ldr r0, [r7, #40] ; 0x28 - 800f278: f7ff fdbe bl 800edf8 - 800f27c: 6338 str r0, [r7, #48] ; 0x30 - /* Bail if unable to enqueue */ - if (ipr == NULL) { - 800f27e: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f280: 2b00 cmp r3, #0 - 800f282: d11c bne.n 800f2be - goto nullreturn; - 800f284: e0d0 b.n 800f428 - } - } else { - if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && - 800f286: 6abb ldr r3, [r7, #40] ; 0x28 - 800f288: 88db ldrh r3, [r3, #6] - 800f28a: b29b uxth r3, r3 - 800f28c: 4618 mov r0, r3 - 800f28e: f7f5 fee2 bl 8005056 - 800f292: 4603 mov r3, r0 - 800f294: f3c3 030c ubfx r3, r3, #0, #13 - 800f298: 2b00 cmp r3, #0 - 800f29a: d110 bne.n 800f2be - ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { - 800f29c: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f29e: 89db ldrh r3, [r3, #14] - 800f2a0: 4618 mov r0, r3 - 800f2a2: f7f5 fed8 bl 8005056 - 800f2a6: 4603 mov r3, r0 - 800f2a8: f3c3 030c ubfx r3, r3, #0, #13 - if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && - 800f2ac: 2b00 cmp r3, #0 - 800f2ae: d006 beq.n 800f2be - /* ipr->iphdr is not the header from the first fragment, but fraghdr is - * -> copy fraghdr into ipr->iphdr since we want to have the header - * of the first fragment (for ICMP time exceeded and later, for copying - * all options, if supported)*/ - SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN); - 800f2b0: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f2b2: 3308 adds r3, #8 - 800f2b4: 2214 movs r2, #20 - 800f2b6: 6ab9 ldr r1, [r7, #40] ; 0x28 - 800f2b8: 4618 mov r0, r3 - 800f2ba: f000 fd71 bl 800fda0 - - /* At this point, we have either created a new entry or pointing - * to an existing one */ - - /* check for 'no more fragments', and update queue entry*/ - is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0; - 800f2be: 6abb ldr r3, [r7, #40] ; 0x28 - 800f2c0: 88db ldrh r3, [r3, #6] - 800f2c2: b29b uxth r3, r3 - 800f2c4: f003 0320 and.w r3, r3, #32 - 800f2c8: 2b00 cmp r3, #0 - 800f2ca: bf0c ite eq - 800f2cc: 2301 moveq r3, #1 - 800f2ce: 2300 movne r3, #0 - 800f2d0: b2db uxtb r3, r3 - 800f2d2: 61fb str r3, [r7, #28] - if (is_last) { - 800f2d4: 69fb ldr r3, [r7, #28] - 800f2d6: 2b00 cmp r3, #0 - 800f2d8: d00e beq.n 800f2f8 - u16_t datagram_len = (u16_t)(offset + len); - 800f2da: 8cfa ldrh r2, [r7, #38] ; 0x26 - 800f2dc: 8cbb ldrh r3, [r7, #36] ; 0x24 - 800f2de: 4413 add r3, r2 - 800f2e0: 837b strh r3, [r7, #26] - if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { - 800f2e2: 8b7a ldrh r2, [r7, #26] - 800f2e4: 8cfb ldrh r3, [r7, #38] ; 0x26 - 800f2e6: 429a cmp r2, r3 - 800f2e8: f0c0 809b bcc.w 800f422 - 800f2ec: 8b7b ldrh r3, [r7, #26] - 800f2ee: f64f 72eb movw r2, #65515 ; 0xffeb - 800f2f2: 4293 cmp r3, r2 - 800f2f4: f200 8095 bhi.w 800f422 - goto nullreturn; - } - } - /* find the right place to insert this pbuf */ - /* @todo: trim pbufs if fragments are overlapping */ - valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last); - 800f2f8: 69fa ldr r2, [r7, #28] - 800f2fa: 6879 ldr r1, [r7, #4] - 800f2fc: 6b38 ldr r0, [r7, #48] ; 0x30 - 800f2fe: f7ff fde3 bl 800eec8 - 800f302: 6178 str r0, [r7, #20] - if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { - 800f304: 697b ldr r3, [r7, #20] - 800f306: f1b3 3fff cmp.w r3, #4294967295 - 800f30a: f000 808c beq.w 800f426 - /* if we come here, the pbuf has been enqueued */ - - /* Track the current number of pbufs current 'in-flight', in order to limit - the number of fragments that may be enqueued at any one time - (overflow checked by testing against IP_REASS_MAX_PBUFS) */ - ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen); - 800f30e: 4b4a ldr r3, [pc, #296] ; (800f438 ) - 800f310: 881a ldrh r2, [r3, #0] - 800f312: 8c7b ldrh r3, [r7, #34] ; 0x22 - 800f314: 4413 add r3, r2 - 800f316: b29a uxth r2, r3 - 800f318: 4b47 ldr r3, [pc, #284] ; (800f438 ) - 800f31a: 801a strh r2, [r3, #0] - if (is_last) { - 800f31c: 69fb ldr r3, [r7, #28] - 800f31e: 2b00 cmp r3, #0 - 800f320: d00d beq.n 800f33e - u16_t datagram_len = (u16_t)(offset + len); - 800f322: 8cfa ldrh r2, [r7, #38] ; 0x26 - 800f324: 8cbb ldrh r3, [r7, #36] ; 0x24 - 800f326: 4413 add r3, r2 - 800f328: 827b strh r3, [r7, #18] - ipr->datagram_len = datagram_len; - 800f32a: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f32c: 8a7a ldrh r2, [r7, #18] - 800f32e: 839a strh r2, [r3, #28] - ipr->flags |= IP_REASS_FLAG_LASTFRAG; - 800f330: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f332: 7f9b ldrb r3, [r3, #30] - 800f334: f043 0301 orr.w r3, r3, #1 - 800f338: b2da uxtb r2, r3 - 800f33a: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f33c: 779a strb r2, [r3, #30] - LWIP_DEBUGF(IP_REASS_DEBUG, - ("ip4_reass: last fragment seen, total len %"S16_F"\n", - ipr->datagram_len)); - } - - if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) { - 800f33e: 697b ldr r3, [r7, #20] - 800f340: 2b01 cmp r3, #1 - 800f342: d168 bne.n 800f416 - struct ip_reassdata *ipr_prev; - /* the totally last fragment (flag more fragments = 0) was received at least - * once AND all fragments are received */ - ipr->datagram_len += IP_HLEN; - 800f344: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f346: 8b9b ldrh r3, [r3, #28] - 800f348: 3314 adds r3, #20 - 800f34a: b29a uxth r2, r3 - 800f34c: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f34e: 839a strh r2, [r3, #28] - - /* save the second pbuf before copying the header over the pointer */ - r = ((struct ip_reass_helper*)ipr->p->payload)->next_pbuf; - 800f350: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f352: 685b ldr r3, [r3, #4] - 800f354: 685b ldr r3, [r3, #4] - 800f356: 681b ldr r3, [r3, #0] - 800f358: 637b str r3, [r7, #52] ; 0x34 - - /* copy the original ip header back to the first pbuf */ - fraghdr = (struct ip_hdr*)(ipr->p->payload); - 800f35a: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f35c: 685b ldr r3, [r3, #4] - 800f35e: 685b ldr r3, [r3, #4] - 800f360: 62bb str r3, [r7, #40] ; 0x28 - SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); - 800f362: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f364: 3308 adds r3, #8 - 800f366: 2214 movs r2, #20 - 800f368: 4619 mov r1, r3 - 800f36a: 6ab8 ldr r0, [r7, #40] ; 0x28 - 800f36c: f000 fd18 bl 800fda0 - IPH_LEN_SET(fraghdr, lwip_htons(ipr->datagram_len)); - 800f370: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f372: 8b9b ldrh r3, [r3, #28] - 800f374: 4618 mov r0, r3 - 800f376: f7f5 fe6e bl 8005056 - 800f37a: 4603 mov r3, r0 - 800f37c: 461a mov r2, r3 - 800f37e: 6abb ldr r3, [r7, #40] ; 0x28 - 800f380: 805a strh r2, [r3, #2] - IPH_OFFSET_SET(fraghdr, 0); - 800f382: 6abb ldr r3, [r7, #40] ; 0x28 - 800f384: 2200 movs r2, #0 - 800f386: 719a strb r2, [r3, #6] - 800f388: 2200 movs r2, #0 - 800f38a: 71da strb r2, [r3, #7] - IPH_CHKSUM_SET(fraghdr, 0); - 800f38c: 6abb ldr r3, [r7, #40] ; 0x28 - 800f38e: 2200 movs r2, #0 - 800f390: 729a strb r2, [r3, #10] - 800f392: 2200 movs r2, #0 - 800f394: 72da strb r2, [r3, #11] - IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) { - IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN)); - } -#endif /* CHECKSUM_GEN_IP */ - - p = ipr->p; - 800f396: 6b3b ldr r3, [r7, #48] ; 0x30 - 800f398: 685b ldr r3, [r3, #4] - 800f39a: 607b str r3, [r7, #4] - - /* chain together the pbufs contained within the reass_data list. */ - while (r != NULL) { - 800f39c: e00e b.n 800f3bc - iprh = (struct ip_reass_helper*)r->payload; - 800f39e: 6b7b ldr r3, [r7, #52] ; 0x34 - 800f3a0: 685b ldr r3, [r3, #4] - 800f3a2: 60fb str r3, [r7, #12] - - /* hide the ip header for every succeeding fragment */ - pbuf_header(r, -IP_HLEN); - 800f3a4: f06f 0113 mvn.w r1, #19 - 800f3a8: 6b78 ldr r0, [r7, #52] ; 0x34 - 800f3aa: f7f6 ff45 bl 8006238 - pbuf_cat(p, r); - 800f3ae: 6b79 ldr r1, [r7, #52] ; 0x34 - 800f3b0: 6878 ldr r0, [r7, #4] - 800f3b2: f7f7 f831 bl 8006418 - r = iprh->next_pbuf; - 800f3b6: 68fb ldr r3, [r7, #12] - 800f3b8: 681b ldr r3, [r3, #0] - 800f3ba: 637b str r3, [r7, #52] ; 0x34 - while (r != NULL) { - 800f3bc: 6b7b ldr r3, [r7, #52] ; 0x34 - 800f3be: 2b00 cmp r3, #0 - 800f3c0: d1ed bne.n 800f39e - } - - /* find the previous entry in the linked list */ - if (ipr == reassdatagrams) { - 800f3c2: 4b1e ldr r3, [pc, #120] ; (800f43c ) - 800f3c4: 681b ldr r3, [r3, #0] - 800f3c6: 6b3a ldr r2, [r7, #48] ; 0x30 - 800f3c8: 429a cmp r2, r3 - 800f3ca: d102 bne.n 800f3d2 - ipr_prev = NULL; - 800f3cc: 2300 movs r3, #0 - 800f3ce: 62fb str r3, [r7, #44] ; 0x2c - 800f3d0: e010 b.n 800f3f4 - } else { - for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { - 800f3d2: 4b1a ldr r3, [pc, #104] ; (800f43c ) - 800f3d4: 681b ldr r3, [r3, #0] - 800f3d6: 62fb str r3, [r7, #44] ; 0x2c - 800f3d8: e007 b.n 800f3ea - if (ipr_prev->next == ipr) { - 800f3da: 6afb ldr r3, [r7, #44] ; 0x2c - 800f3dc: 681b ldr r3, [r3, #0] - 800f3de: 6b3a ldr r2, [r7, #48] ; 0x30 - 800f3e0: 429a cmp r2, r3 - 800f3e2: d006 beq.n 800f3f2 - for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { - 800f3e4: 6afb ldr r3, [r7, #44] ; 0x2c - 800f3e6: 681b ldr r3, [r3, #0] - 800f3e8: 62fb str r3, [r7, #44] ; 0x2c - 800f3ea: 6afb ldr r3, [r7, #44] ; 0x2c - 800f3ec: 2b00 cmp r3, #0 - 800f3ee: d1f4 bne.n 800f3da - 800f3f0: e000 b.n 800f3f4 - break; - 800f3f2: bf00 nop - } - } - } - - /* release the sources allocate for the fragment queue entry */ - ip_reass_dequeue_datagram(ipr, ipr_prev); - 800f3f4: 6af9 ldr r1, [r7, #44] ; 0x2c - 800f3f6: 6b38 ldr r0, [r7, #48] ; 0x30 - 800f3f8: f7ff fd38 bl 800ee6c - - /* and adjust the number of pbufs currently queued for reassembly. */ - ip_reass_pbufcount -= pbuf_clen(p); - 800f3fc: 6878 ldr r0, [r7, #4] - 800f3fe: f7f6 ffd3 bl 80063a8 - 800f402: 4603 mov r3, r0 - 800f404: 461a mov r2, r3 - 800f406: 4b0c ldr r3, [pc, #48] ; (800f438 ) - 800f408: 881b ldrh r3, [r3, #0] - 800f40a: 1a9b subs r3, r3, r2 - 800f40c: b29a uxth r2, r3 - 800f40e: 4b0a ldr r3, [pc, #40] ; (800f438 ) - 800f410: 801a strh r2, [r3, #0] - - MIB2_STATS_INC(mib2.ipreasmoks); - - /* Return the pbuf chain */ - return p; - 800f412: 687b ldr r3, [r7, #4] - 800f414: e00c b.n 800f430 - } - /* the datagram is not (yet?) reassembled completely */ - LWIP_DEBUGF(IP_REASS_DEBUG,("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); - return NULL; - 800f416: 2300 movs r3, #0 - 800f418: e00a b.n 800f430 - goto nullreturn; - 800f41a: bf00 nop - 800f41c: e004 b.n 800f428 - goto nullreturn; - 800f41e: bf00 nop - 800f420: e002 b.n 800f428 - goto nullreturn; - 800f422: bf00 nop - 800f424: e000 b.n 800f428 - goto nullreturn; - 800f426: bf00 nop - -nullreturn: - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: nullreturn\n")); - IPFRAG_STATS_INC(ip_frag.drop); - pbuf_free(p); - 800f428: 6878 ldr r0, [r7, #4] - 800f42a: f7f6 ff29 bl 8006280 - return NULL; - 800f42e: 2300 movs r3, #0 -} - 800f430: 4618 mov r0, r3 - 800f432: 3738 adds r7, #56 ; 0x38 - 800f434: 46bd mov sp, r7 - 800f436: bd80 pop {r7, pc} - 800f438: 20006ef0 .word 0x20006ef0 - 800f43c: 20006eec .word 0x20006eec - -0800f440 : -#if IP_FRAG -#if !LWIP_NETIF_TX_SINGLE_PBUF -/** Allocate a new struct pbuf_custom_ref */ -static struct pbuf_custom_ref* -ip_frag_alloc_pbuf_custom_ref(void) -{ - 800f440: b580 push {r7, lr} - 800f442: af00 add r7, sp, #0 - return (struct pbuf_custom_ref*)memp_malloc(MEMP_FRAG_PBUF); - 800f444: 2005 movs r0, #5 - 800f446: f7f6 f9af bl 80057a8 - 800f44a: 4603 mov r3, r0 -} - 800f44c: 4618 mov r0, r3 - 800f44e: bd80 pop {r7, pc} - -0800f450 : - -/** Free a struct pbuf_custom_ref */ -static void -ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) -{ - 800f450: b580 push {r7, lr} - 800f452: b082 sub sp, #8 - 800f454: af00 add r7, sp, #0 - 800f456: 6078 str r0, [r7, #4] - LWIP_ASSERT("p != NULL", p != NULL); - 800f458: 687b ldr r3, [r7, #4] - 800f45a: 2b00 cmp r3, #0 - 800f45c: d106 bne.n 800f46c - 800f45e: 4b07 ldr r3, [pc, #28] ; (800f47c ) - 800f460: f240 22ae movw r2, #686 ; 0x2ae - 800f464: 4906 ldr r1, [pc, #24] ; (800f480 ) - 800f466: 4807 ldr r0, [pc, #28] ; (800f484 ) - 800f468: f000 fb2c bl 800fac4 - memp_free(MEMP_FRAG_PBUF, p); - 800f46c: 6879 ldr r1, [r7, #4] - 800f46e: 2005 movs r0, #5 - 800f470: f7f6 f9e6 bl 8005840 -} - 800f474: bf00 nop - 800f476: 3708 adds r7, #8 - 800f478: 46bd mov sp, r7 - 800f47a: bd80 pop {r7, pc} - 800f47c: 0801283c .word 0x0801283c - 800f480: 080129a4 .word 0x080129a4 - 800f484: 08012884 .word 0x08012884 - -0800f488 : - -/** Free-callback function to free a 'struct pbuf_custom_ref', called by - * pbuf_free. */ -static void -ipfrag_free_pbuf_custom(struct pbuf *p) -{ - 800f488: b580 push {r7, lr} - 800f48a: b084 sub sp, #16 - 800f48c: af00 add r7, sp, #0 - 800f48e: 6078 str r0, [r7, #4] - struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p; - 800f490: 687b ldr r3, [r7, #4] - 800f492: 60fb str r3, [r7, #12] - LWIP_ASSERT("pcr != NULL", pcr != NULL); - 800f494: 68fb ldr r3, [r7, #12] - 800f496: 2b00 cmp r3, #0 - 800f498: d106 bne.n 800f4a8 - 800f49a: 4b11 ldr r3, [pc, #68] ; (800f4e0 ) - 800f49c: f44f 722e mov.w r2, #696 ; 0x2b8 - 800f4a0: 4910 ldr r1, [pc, #64] ; (800f4e4 ) - 800f4a2: 4811 ldr r0, [pc, #68] ; (800f4e8 ) - 800f4a4: f000 fb0e bl 800fac4 - LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p); - 800f4a8: 68fa ldr r2, [r7, #12] - 800f4aa: 687b ldr r3, [r7, #4] - 800f4ac: 429a cmp r2, r3 - 800f4ae: d006 beq.n 800f4be - 800f4b0: 4b0b ldr r3, [pc, #44] ; (800f4e0 ) - 800f4b2: f240 22b9 movw r2, #697 ; 0x2b9 - 800f4b6: 490d ldr r1, [pc, #52] ; (800f4ec ) - 800f4b8: 480b ldr r0, [pc, #44] ; (800f4e8 ) - 800f4ba: f000 fb03 bl 800fac4 - if (pcr->original != NULL) { - 800f4be: 68fb ldr r3, [r7, #12] - 800f4c0: 695b ldr r3, [r3, #20] - 800f4c2: 2b00 cmp r3, #0 - 800f4c4: d004 beq.n 800f4d0 - pbuf_free(pcr->original); - 800f4c6: 68fb ldr r3, [r7, #12] - 800f4c8: 695b ldr r3, [r3, #20] - 800f4ca: 4618 mov r0, r3 - 800f4cc: f7f6 fed8 bl 8006280 - } - ip_frag_free_pbuf_custom_ref(pcr); - 800f4d0: 68f8 ldr r0, [r7, #12] - 800f4d2: f7ff ffbd bl 800f450 -} - 800f4d6: bf00 nop - 800f4d8: 3710 adds r7, #16 - 800f4da: 46bd mov sp, r7 - 800f4dc: bd80 pop {r7, pc} - 800f4de: bf00 nop - 800f4e0: 0801283c .word 0x0801283c - 800f4e4: 080129b0 .word 0x080129b0 - 800f4e8: 08012884 .word 0x08012884 - 800f4ec: 080129bc .word 0x080129bc - -0800f4f0 : - * - * @return ERR_OK if sent successfully, err_t otherwise - */ -err_t -ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) -{ - 800f4f0: b580 push {r7, lr} - 800f4f2: b092 sub sp, #72 ; 0x48 - 800f4f4: af02 add r7, sp, #8 - 800f4f6: 60f8 str r0, [r7, #12] - 800f4f8: 60b9 str r1, [r7, #8] - 800f4fa: 607a str r2, [r7, #4] - struct pbuf *rambuf; -#if !LWIP_NETIF_TX_SINGLE_PBUF - struct pbuf *newpbuf; - u16_t newpbuflen = 0; - 800f4fc: 2300 movs r3, #0 - 800f4fe: 87fb strh r3, [r7, #62] ; 0x3e - u16_t left_to_copy; -#endif - struct ip_hdr *original_iphdr; - struct ip_hdr *iphdr; - const u16_t nfb = (netif->mtu - IP_HLEN) / 8; - 800f500: 68bb ldr r3, [r7, #8] - 800f502: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800f504: 3b14 subs r3, #20 - 800f506: 2b00 cmp r3, #0 - 800f508: da00 bge.n 800f50c - 800f50a: 3307 adds r3, #7 - 800f50c: 10db asrs r3, r3, #3 - 800f50e: 867b strh r3, [r7, #50] ; 0x32 - u16_t left, fragsize; - u16_t ofo; - int last; - u16_t poff = IP_HLEN; - 800f510: 2314 movs r3, #20 - 800f512: 86fb strh r3, [r7, #54] ; 0x36 - u16_t tmp; - - original_iphdr = (struct ip_hdr *)p->payload; - 800f514: 68fb ldr r3, [r7, #12] - 800f516: 685b ldr r3, [r3, #4] - 800f518: 62fb str r3, [r7, #44] ; 0x2c - iphdr = original_iphdr; - 800f51a: 6afb ldr r3, [r7, #44] ; 0x2c - 800f51c: 62bb str r3, [r7, #40] ; 0x28 - LWIP_ERROR("ip4_frag() does not support IP options", IPH_HL(iphdr) * 4 == IP_HLEN, return ERR_VAL); - 800f51e: 6abb ldr r3, [r7, #40] ; 0x28 - 800f520: 781b ldrb r3, [r3, #0] - 800f522: f003 030f and.w r3, r3, #15 - 800f526: 2b05 cmp r3, #5 - 800f528: d009 beq.n 800f53e - 800f52a: 4b7a ldr r3, [pc, #488] ; (800f714 ) - 800f52c: f240 22e1 movw r2, #737 ; 0x2e1 - 800f530: 4979 ldr r1, [pc, #484] ; (800f718 ) - 800f532: 487a ldr r0, [pc, #488] ; (800f71c ) - 800f534: f000 fac6 bl 800fac4 - 800f538: f06f 0305 mvn.w r3, #5 - 800f53c: e0e6 b.n 800f70c - - /* Save original offset */ - tmp = lwip_ntohs(IPH_OFFSET(iphdr)); - 800f53e: 6abb ldr r3, [r7, #40] ; 0x28 - 800f540: 88db ldrh r3, [r3, #6] - 800f542: b29b uxth r3, r3 - 800f544: 4618 mov r0, r3 - 800f546: f7f5 fd86 bl 8005056 - 800f54a: 4603 mov r3, r0 - 800f54c: 86bb strh r3, [r7, #52] ; 0x34 - ofo = tmp & IP_OFFMASK; - 800f54e: 8ebb ldrh r3, [r7, #52] ; 0x34 - 800f550: f3c3 030c ubfx r3, r3, #0, #13 - 800f554: 873b strh r3, [r7, #56] ; 0x38 - LWIP_ERROR("ip_frag(): MF already set", (tmp & IP_MF) == 0, return ERR_VAL); - 800f556: 8ebb ldrh r3, [r7, #52] ; 0x34 - 800f558: f403 5300 and.w r3, r3, #8192 ; 0x2000 - 800f55c: 2b00 cmp r3, #0 - 800f55e: d009 beq.n 800f574 - 800f560: 4b6c ldr r3, [pc, #432] ; (800f714 ) - 800f562: f240 22e6 movw r2, #742 ; 0x2e6 - 800f566: 496e ldr r1, [pc, #440] ; (800f720 ) - 800f568: 486c ldr r0, [pc, #432] ; (800f71c ) - 800f56a: f000 faab bl 800fac4 - 800f56e: f06f 0305 mvn.w r3, #5 - 800f572: e0cb b.n 800f70c - - left = p->tot_len - IP_HLEN; - 800f574: 68fb ldr r3, [r7, #12] - 800f576: 891b ldrh r3, [r3, #8] - 800f578: 3b14 subs r3, #20 - 800f57a: 877b strh r3, [r7, #58] ; 0x3a - - while (left) { - 800f57c: e0bd b.n 800f6fa - /* Fill this fragment */ - fragsize = LWIP_MIN(left, nfb * 8); - 800f57e: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800f580: 00da lsls r2, r3, #3 - 800f582: 8f7b ldrh r3, [r7, #58] ; 0x3a - 800f584: 4293 cmp r3, r2 - 800f586: bfa8 it ge - 800f588: 4613 movge r3, r2 - 800f58a: 84fb strh r3, [r7, #38] ; 0x26 - /* 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); - 800f58c: 2200 movs r2, #0 - 800f58e: 2114 movs r1, #20 - 800f590: 2002 movs r0, #2 - 800f592: f7f6 fafd bl 8005b90 - 800f596: 6238 str r0, [r7, #32] - if (rambuf == NULL) { - 800f598: 6a3b ldr r3, [r7, #32] - 800f59a: 2b00 cmp r3, #0 - 800f59c: f000 80b3 beq.w 800f706 - goto memerr; - } - LWIP_ASSERT("this needs a pbuf in one piece!", - 800f5a0: 68fb ldr r3, [r7, #12] - 800f5a2: 895b ldrh r3, [r3, #10] - 800f5a4: 2b13 cmp r3, #19 - 800f5a6: d806 bhi.n 800f5b6 - 800f5a8: 4b5a ldr r3, [pc, #360] ; (800f714 ) - 800f5aa: f44f 7242 mov.w r2, #776 ; 0x308 - 800f5ae: 495d ldr r1, [pc, #372] ; (800f724 ) - 800f5b0: 485a ldr r0, [pc, #360] ; (800f71c ) - 800f5b2: f000 fa87 bl 800fac4 - (p->len >= (IP_HLEN))); - SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); - 800f5b6: 6a3b ldr r3, [r7, #32] - 800f5b8: 685b ldr r3, [r3, #4] - 800f5ba: 2214 movs r2, #20 - 800f5bc: 6af9 ldr r1, [r7, #44] ; 0x2c - 800f5be: 4618 mov r0, r3 - 800f5c0: f000 fbee bl 800fda0 - iphdr = (struct ip_hdr *)rambuf->payload; - 800f5c4: 6a3b ldr r3, [r7, #32] - 800f5c6: 685b ldr r3, [r3, #4] - 800f5c8: 62bb str r3, [r7, #40] ; 0x28 - - left_to_copy = fragsize; - 800f5ca: 8cfb ldrh r3, [r7, #38] ; 0x26 - 800f5cc: 87bb strh r3, [r7, #60] ; 0x3c - while (left_to_copy) { - 800f5ce: e04f b.n 800f670 - struct pbuf_custom_ref *pcr; - u16_t plen = p->len - poff; - 800f5d0: 68fb ldr r3, [r7, #12] - 800f5d2: 895a ldrh r2, [r3, #10] - 800f5d4: 8efb ldrh r3, [r7, #54] ; 0x36 - 800f5d6: 1ad3 subs r3, r2, r3 - 800f5d8: 837b strh r3, [r7, #26] - newpbuflen = LWIP_MIN(left_to_copy, plen); - 800f5da: 8b7a ldrh r2, [r7, #26] - 800f5dc: 8fbb ldrh r3, [r7, #60] ; 0x3c - 800f5de: 4293 cmp r3, r2 - 800f5e0: bf28 it cs - 800f5e2: 4613 movcs r3, r2 - 800f5e4: 87fb strh r3, [r7, #62] ; 0x3e - /* Is this pbuf already empty? */ - if (!newpbuflen) { - 800f5e6: 8ffb ldrh r3, [r7, #62] ; 0x3e - 800f5e8: 2b00 cmp r3, #0 - 800f5ea: d105 bne.n 800f5f8 - poff = 0; - 800f5ec: 2300 movs r3, #0 - 800f5ee: 86fb strh r3, [r7, #54] ; 0x36 - p = p->next; - 800f5f0: 68fb ldr r3, [r7, #12] - 800f5f2: 681b ldr r3, [r3, #0] - 800f5f4: 60fb str r3, [r7, #12] - continue; - 800f5f6: e03b b.n 800f670 - } - pcr = ip_frag_alloc_pbuf_custom_ref(); - 800f5f8: f7ff ff22 bl 800f440 - 800f5fc: 6178 str r0, [r7, #20] - if (pcr == NULL) { - 800f5fe: 697b ldr r3, [r7, #20] - 800f600: 2b00 cmp r3, #0 - 800f602: d103 bne.n 800f60c - pbuf_free(rambuf); - 800f604: 6a38 ldr r0, [r7, #32] - 800f606: f7f6 fe3b bl 8006280 - goto memerr; - 800f60a: e07d b.n 800f708 - } - /* Mirror this pbuf, although we might not need all of it. */ - newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, - 800f60c: 6978 ldr r0, [r7, #20] - (u8_t*)p->payload + poff, newpbuflen); - 800f60e: 68fb ldr r3, [r7, #12] - 800f610: 685a ldr r2, [r3, #4] - newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, - 800f612: 8efb ldrh r3, [r7, #54] ; 0x36 - 800f614: 4413 add r3, r2 - 800f616: 8ff9 ldrh r1, [r7, #62] ; 0x3e - 800f618: 8ffa ldrh r2, [r7, #62] ; 0x3e - 800f61a: 9201 str r2, [sp, #4] - 800f61c: 9300 str r3, [sp, #0] - 800f61e: 4603 mov r3, r0 - 800f620: 2202 movs r2, #2 - 800f622: 2004 movs r0, #4 - 800f624: f7f6 fc4e bl 8005ec4 - 800f628: 6138 str r0, [r7, #16] - if (newpbuf == NULL) { - 800f62a: 693b ldr r3, [r7, #16] - 800f62c: 2b00 cmp r3, #0 - 800f62e: d106 bne.n 800f63e - ip_frag_free_pbuf_custom_ref(pcr); - 800f630: 6978 ldr r0, [r7, #20] - 800f632: f7ff ff0d bl 800f450 - pbuf_free(rambuf); - 800f636: 6a38 ldr r0, [r7, #32] - 800f638: f7f6 fe22 bl 8006280 - goto memerr; - 800f63c: e064 b.n 800f708 - } - pbuf_ref(p); - 800f63e: 68f8 ldr r0, [r7, #12] - 800f640: f7f6 fec8 bl 80063d4 - pcr->original = p; - 800f644: 697b ldr r3, [r7, #20] - 800f646: 68fa ldr r2, [r7, #12] - 800f648: 615a str r2, [r3, #20] - pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; - 800f64a: 697b ldr r3, [r7, #20] - 800f64c: 4a36 ldr r2, [pc, #216] ; (800f728 ) - 800f64e: 611a str r2, [r3, #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); - 800f650: 6939 ldr r1, [r7, #16] - 800f652: 6a38 ldr r0, [r7, #32] - 800f654: f7f6 fee0 bl 8006418 - left_to_copy -= newpbuflen; - 800f658: 8fba ldrh r2, [r7, #60] ; 0x3c - 800f65a: 8ffb ldrh r3, [r7, #62] ; 0x3e - 800f65c: 1ad3 subs r3, r2, r3 - 800f65e: 87bb strh r3, [r7, #60] ; 0x3c - if (left_to_copy) { - 800f660: 8fbb ldrh r3, [r7, #60] ; 0x3c - 800f662: 2b00 cmp r3, #0 - 800f664: d004 beq.n 800f670 - poff = 0; - 800f666: 2300 movs r3, #0 - 800f668: 86fb strh r3, [r7, #54] ; 0x36 - p = p->next; - 800f66a: 68fb ldr r3, [r7, #12] - 800f66c: 681b ldr r3, [r3, #0] - 800f66e: 60fb str r3, [r7, #12] - while (left_to_copy) { - 800f670: 8fbb ldrh r3, [r7, #60] ; 0x3c - 800f672: 2b00 cmp r3, #0 - 800f674: d1ac bne.n 800f5d0 - } - } - poff += newpbuflen; - 800f676: 8efa ldrh r2, [r7, #54] ; 0x36 - 800f678: 8ffb ldrh r3, [r7, #62] ; 0x3e - 800f67a: 4413 add r3, r2 - 800f67c: 86fb strh r3, [r7, #54] ; 0x36 -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - - /* Correct header */ - last = (left <= netif->mtu - IP_HLEN); - 800f67e: 68bb ldr r3, [r7, #8] - 800f680: 8d5b ldrh r3, [r3, #42] ; 0x2a - 800f682: f1a3 0213 sub.w r2, r3, #19 - 800f686: 8f7b ldrh r3, [r7, #58] ; 0x3a - 800f688: 429a cmp r2, r3 - 800f68a: bfcc ite gt - 800f68c: 2301 movgt r3, #1 - 800f68e: 2300 movle r3, #0 - 800f690: b2db uxtb r3, r3 - 800f692: 61fb str r3, [r7, #28] - - /* Set new offset and MF flag */ - tmp = (IP_OFFMASK & (ofo)); - 800f694: 8f3b ldrh r3, [r7, #56] ; 0x38 - 800f696: f3c3 030c ubfx r3, r3, #0, #13 - 800f69a: 86bb strh r3, [r7, #52] ; 0x34 - if (!last) { - 800f69c: 69fb ldr r3, [r7, #28] - 800f69e: 2b00 cmp r3, #0 - 800f6a0: d103 bne.n 800f6aa - tmp = tmp | IP_MF; - 800f6a2: 8ebb ldrh r3, [r7, #52] ; 0x34 - 800f6a4: f443 5300 orr.w r3, r3, #8192 ; 0x2000 - 800f6a8: 86bb strh r3, [r7, #52] ; 0x34 - } - IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); - 800f6aa: 8ebb ldrh r3, [r7, #52] ; 0x34 - 800f6ac: 4618 mov r0, r3 - 800f6ae: f7f5 fcd2 bl 8005056 - 800f6b2: 4603 mov r3, r0 - 800f6b4: 461a mov r2, r3 - 800f6b6: 6abb ldr r3, [r7, #40] ; 0x28 - 800f6b8: 80da strh r2, [r3, #6] - IPH_LEN_SET(iphdr, lwip_htons(fragsize + IP_HLEN)); - 800f6ba: 8cfb ldrh r3, [r7, #38] ; 0x26 - 800f6bc: 3314 adds r3, #20 - 800f6be: b29b uxth r3, r3 - 800f6c0: 4618 mov r0, r3 - 800f6c2: f7f5 fcc8 bl 8005056 - 800f6c6: 4603 mov r3, r0 - 800f6c8: 461a mov r2, r3 - 800f6ca: 6abb ldr r3, [r7, #40] ; 0x28 - 800f6cc: 805a strh r2, [r3, #2] - IPH_CHKSUM_SET(iphdr, 0); - 800f6ce: 6abb ldr r3, [r7, #40] ; 0x28 - 800f6d0: 2200 movs r2, #0 - 800f6d2: 729a strb r2, [r3, #10] - 800f6d4: 2200 movs r2, #0 - 800f6d6: 72da strb r2, [r3, #11] -#endif /* CHECKSUM_GEN_IP */ - - /* No need for separate header pbuf - we allowed room for it in rambuf - * when allocated. - */ - netif->output(netif, rambuf, dest); - 800f6d8: 68bb ldr r3, [r7, #8] - 800f6da: 695b ldr r3, [r3, #20] - 800f6dc: 687a ldr r2, [r7, #4] - 800f6de: 6a39 ldr r1, [r7, #32] - 800f6e0: 68b8 ldr r0, [r7, #8] - 800f6e2: 4798 blx r3 - * recreate it next time round the loop. If we're lucky the hardware - * will have already sent the packet, the free will really free, and - * there will be zero memory penalty. - */ - - pbuf_free(rambuf); - 800f6e4: 6a38 ldr r0, [r7, #32] - 800f6e6: f7f6 fdcb bl 8006280 - left -= fragsize; - 800f6ea: 8f7a ldrh r2, [r7, #58] ; 0x3a - 800f6ec: 8cfb ldrh r3, [r7, #38] ; 0x26 - 800f6ee: 1ad3 subs r3, r2, r3 - 800f6f0: 877b strh r3, [r7, #58] ; 0x3a - ofo += nfb; - 800f6f2: 8f3a ldrh r2, [r7, #56] ; 0x38 - 800f6f4: 8e7b ldrh r3, [r7, #50] ; 0x32 - 800f6f6: 4413 add r3, r2 - 800f6f8: 873b strh r3, [r7, #56] ; 0x38 - while (left) { - 800f6fa: 8f7b ldrh r3, [r7, #58] ; 0x3a - 800f6fc: 2b00 cmp r3, #0 - 800f6fe: f47f af3e bne.w 800f57e - } - MIB2_STATS_INC(mib2.ipfragoks); - return ERR_OK; - 800f702: 2300 movs r3, #0 - 800f704: e002 b.n 800f70c - goto memerr; - 800f706: bf00 nop -memerr: - MIB2_STATS_INC(mib2.ipfragfails); - return ERR_MEM; - 800f708: f04f 33ff mov.w r3, #4294967295 -} - 800f70c: 4618 mov r0, r3 - 800f70e: 3740 adds r7, #64 ; 0x40 - 800f710: 46bd mov sp, r7 - 800f712: bd80 pop {r7, pc} - 800f714: 0801283c .word 0x0801283c - 800f718: 080129c8 .word 0x080129c8 - 800f71c: 08012884 .word 0x08012884 - 800f720: 080129f0 .word 0x080129f0 - 800f724: 08012a0c .word 0x08012a0c - 800f728: 0800f489 .word 0x0800f489 - -0800f72c : - * @see ETHARP_SUPPORT_VLAN - * @see LWIP_HOOK_VLAN_CHECK - */ -err_t -ethernet_input(struct pbuf *p, struct netif *netif) -{ - 800f72c: b580 push {r7, lr} - 800f72e: b086 sub sp, #24 - 800f730: af00 add r7, sp, #0 - 800f732: 6078 str r0, [r7, #4] - 800f734: 6039 str r1, [r7, #0] - struct eth_hdr* ethhdr; - u16_t type; -#if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6 - s16_t ip_hdr_offset = SIZEOF_ETH_HDR; - 800f736: 230e movs r3, #14 - 800f738: 82fb strh r3, [r7, #22] -#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ - - if (p->len <= SIZEOF_ETH_HDR) { - 800f73a: 687b ldr r3, [r7, #4] - 800f73c: 895b ldrh r3, [r3, #10] - 800f73e: 2b0e cmp r3, #14 - 800f740: d977 bls.n 800f832 - MIB2_STATS_NETIF_INC(netif, ifinerrors); - goto free_and_return; - } - - /* points to packet payload, which starts with an Ethernet header */ - ethhdr = (struct eth_hdr *)p->payload; - 800f742: 687b ldr r3, [r7, #4] - 800f744: 685b ldr r3, [r3, #4] - 800f746: 613b str r3, [r7, #16] - (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], - (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], - (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], - lwip_htons(ethhdr->type))); - - type = ethhdr->type; - 800f748: 693b ldr r3, [r7, #16] - 800f74a: 7b1a ldrb r2, [r3, #12] - 800f74c: 7b5b ldrb r3, [r3, #13] - 800f74e: 021b lsls r3, r3, #8 - 800f750: 4313 orrs r3, r2 - 800f752: 81fb strh r3, [r7, #14] - -#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) { - 800f754: 693b ldr r3, [r7, #16] - 800f756: 781b ldrb r3, [r3, #0] - 800f758: f003 0301 and.w r3, r3, #1 - 800f75c: 2b00 cmp r3, #0 - 800f75e: d023 beq.n 800f7a8 - /* this might be a multicast or broadcast packet */ - if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { - 800f760: 693b ldr r3, [r7, #16] - 800f762: 781b ldrb r3, [r3, #0] - 800f764: 2b01 cmp r3, #1 - 800f766: d10f bne.n 800f788 -#if LWIP_IPV4 - if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && - 800f768: 693b ldr r3, [r7, #16] - 800f76a: 785b ldrb r3, [r3, #1] - 800f76c: 2b00 cmp r3, #0 - 800f76e: d11b bne.n 800f7a8 - (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { - 800f770: 693b ldr r3, [r7, #16] - 800f772: 789b ldrb r3, [r3, #2] - if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && - 800f774: 2b5e cmp r3, #94 ; 0x5e - 800f776: d117 bne.n 800f7a8 - /* mark the pbuf as link-layer multicast */ - p->flags |= PBUF_FLAG_LLMCAST; - 800f778: 687b ldr r3, [r7, #4] - 800f77a: 7b5b ldrb r3, [r3, #13] - 800f77c: f043 0310 orr.w r3, r3, #16 - 800f780: b2da uxtb r2, r3 - 800f782: 687b ldr r3, [r7, #4] - 800f784: 735a strb r2, [r3, #13] - 800f786: e00f b.n 800f7a8 - (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)) { - 800f788: 693b ldr r3, [r7, #16] - 800f78a: 2206 movs r2, #6 - 800f78c: 4931 ldr r1, [pc, #196] ; (800f854 ) - 800f78e: 4618 mov r0, r3 - 800f790: f000 fa82 bl 800fc98 - 800f794: 4603 mov r3, r0 - 800f796: 2b00 cmp r3, #0 - 800f798: d106 bne.n 800f7a8 - /* mark the pbuf as link-layer broadcast */ - p->flags |= PBUF_FLAG_LLBCAST; - 800f79a: 687b ldr r3, [r7, #4] - 800f79c: 7b5b ldrb r3, [r3, #13] - 800f79e: f043 0308 orr.w r3, r3, #8 - 800f7a2: b2da uxtb r2, r3 - 800f7a4: 687b ldr r3, [r7, #4] - 800f7a6: 735a strb r2, [r3, #13] - } - } - - switch (type) { - 800f7a8: 89fb ldrh r3, [r7, #14] - 800f7aa: 2b08 cmp r3, #8 - 800f7ac: d003 beq.n 800f7b6 - 800f7ae: f5b3 6fc1 cmp.w r3, #1544 ; 0x608 - 800f7b2: d01e beq.n 800f7f2 - } -#endif - ETHARP_STATS_INC(etharp.proterr); - ETHARP_STATS_INC(etharp.drop); - MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); - goto free_and_return; - 800f7b4: e046 b.n 800f844 - if (!(netif->flags & NETIF_FLAG_ETHARP)) { - 800f7b6: 683b ldr r3, [r7, #0] - 800f7b8: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800f7bc: f003 0308 and.w r3, r3, #8 - 800f7c0: 2b00 cmp r3, #0 - 800f7c2: d038 beq.n 800f836 - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { - 800f7c4: 687b ldr r3, [r7, #4] - 800f7c6: 895b ldrh r3, [r3, #10] - 800f7c8: 461a mov r2, r3 - 800f7ca: f9b7 3016 ldrsh.w r3, [r7, #22] - 800f7ce: 429a cmp r2, r3 - 800f7d0: db33 blt.n 800f83a - 800f7d2: 8afb ldrh r3, [r7, #22] - 800f7d4: 425b negs r3, r3 - 800f7d6: b29b uxth r3, r3 - 800f7d8: b21b sxth r3, r3 - 800f7da: 4619 mov r1, r3 - 800f7dc: 6878 ldr r0, [r7, #4] - 800f7de: f7f6 fd2b bl 8006238 - 800f7e2: 4603 mov r3, r0 - 800f7e4: 2b00 cmp r3, #0 - 800f7e6: d128 bne.n 800f83a - ip4_input(p, netif); - 800f7e8: 6839 ldr r1, [r7, #0] - 800f7ea: 6878 ldr r0, [r7, #4] - 800f7ec: f7fe ff62 bl 800e6b4 - break; - 800f7f0: e01d b.n 800f82e - if (!(netif->flags & NETIF_FLAG_ETHARP)) { - 800f7f2: 683b ldr r3, [r7, #0] - 800f7f4: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 - 800f7f8: f003 0308 and.w r3, r3, #8 - 800f7fc: 2b00 cmp r3, #0 - 800f7fe: d01e beq.n 800f83e - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { - 800f800: 687b ldr r3, [r7, #4] - 800f802: 895b ldrh r3, [r3, #10] - 800f804: 461a mov r2, r3 - 800f806: f9b7 3016 ldrsh.w r3, [r7, #22] - 800f80a: 429a cmp r2, r3 - 800f80c: db19 blt.n 800f842 - 800f80e: 8afb ldrh r3, [r7, #22] - 800f810: 425b negs r3, r3 - 800f812: b29b uxth r3, r3 - 800f814: b21b sxth r3, r3 - 800f816: 4619 mov r1, r3 - 800f818: 6878 ldr r0, [r7, #4] - 800f81a: f7f6 fd0d bl 8006238 - 800f81e: 4603 mov r3, r0 - 800f820: 2b00 cmp r3, #0 - 800f822: d10e bne.n 800f842 - etharp_input(p, netif); - 800f824: 6839 ldr r1, [r7, #0] - 800f826: 6878 ldr r0, [r7, #4] - 800f828: f7fe f92e bl 800da88 - break; - 800f82c: bf00 nop - } - - /* This means the pbuf is freed or consumed, - so the caller doesn't have to free it again */ - return ERR_OK; - 800f82e: 2300 movs r3, #0 - 800f830: e00c b.n 800f84c - goto free_and_return; - 800f832: bf00 nop - 800f834: e006 b.n 800f844 - goto free_and_return; - 800f836: bf00 nop - 800f838: e004 b.n 800f844 - goto free_and_return; - 800f83a: bf00 nop - 800f83c: e002 b.n 800f844 - goto free_and_return; - 800f83e: bf00 nop - 800f840: e000 b.n 800f844 - goto free_and_return; - 800f842: bf00 nop - -free_and_return: - pbuf_free(p); - 800f844: 6878 ldr r0, [r7, #4] - 800f846: f7f6 fd1b bl 8006280 - return ERR_OK; - 800f84a: 2300 movs r3, #0 -} - 800f84c: 4618 mov r0, r3 - 800f84e: 3718 adds r7, #24 - 800f850: 46bd mov sp, r7 - 800f852: bd80 pop {r7, pc} - 800f854: 08012bc0 .word 0x08012bc0 - -0800f858 : - */ -err_t -ethernet_output(struct netif* netif, struct pbuf* p, - const struct eth_addr* src, const struct eth_addr* dst, - u16_t eth_type) -{ - 800f858: b580 push {r7, lr} - 800f85a: b086 sub sp, #24 - 800f85c: af00 add r7, sp, #0 - 800f85e: 60f8 str r0, [r7, #12] - 800f860: 60b9 str r1, [r7, #8] - 800f862: 607a str r2, [r7, #4] - 800f864: 603b str r3, [r7, #0] - struct eth_hdr* ethhdr; - u16_t eth_type_be = lwip_htons(eth_type); - 800f866: 8c3b ldrh r3, [r7, #32] - 800f868: 4618 mov r0, r3 - 800f86a: f7f5 fbf4 bl 8005056 - 800f86e: 4603 mov r3, r0 - 800f870: 82fb strh r3, [r7, #22] - - eth_type_be = PP_HTONS(ETHTYPE_VLAN); - } else -#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ - { - if (pbuf_header(p, SIZEOF_ETH_HDR) != 0) { - 800f872: 210e movs r1, #14 - 800f874: 68b8 ldr r0, [r7, #8] - 800f876: f7f6 fcdf bl 8006238 - 800f87a: 4603 mov r3, r0 - 800f87c: 2b00 cmp r3, #0 - 800f87e: d125 bne.n 800f8cc - goto pbuf_header_failed; - } - } - - ethhdr = (struct eth_hdr*)p->payload; - 800f880: 68bb ldr r3, [r7, #8] - 800f882: 685b ldr r3, [r3, #4] - 800f884: 613b str r3, [r7, #16] - ethhdr->type = eth_type_be; - 800f886: 693b ldr r3, [r7, #16] - 800f888: 8afa ldrh r2, [r7, #22] - 800f88a: 819a strh r2, [r3, #12] - ETHADDR32_COPY(ðhdr->dest, dst); - 800f88c: 693b ldr r3, [r7, #16] - 800f88e: 2206 movs r2, #6 - 800f890: 6839 ldr r1, [r7, #0] - 800f892: 4618 mov r0, r3 - 800f894: f000 fa84 bl 800fda0 - ETHADDR16_COPY(ðhdr->src, src); - 800f898: 693b ldr r3, [r7, #16] - 800f89a: 3306 adds r3, #6 - 800f89c: 2206 movs r2, #6 - 800f89e: 6879 ldr r1, [r7, #4] - 800f8a0: 4618 mov r0, r3 - 800f8a2: f000 fa7d bl 800fda0 - - LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", - 800f8a6: 68fb ldr r3, [r7, #12] - 800f8a8: f893 302c ldrb.w r3, [r3, #44] ; 0x2c - 800f8ac: 2b06 cmp r3, #6 - 800f8ae: d006 beq.n 800f8be - 800f8b0: 4b0a ldr r3, [pc, #40] ; (800f8dc ) - 800f8b2: f240 122b movw r2, #299 ; 0x12b - 800f8b6: 490a ldr r1, [pc, #40] ; (800f8e0 ) - 800f8b8: 480a ldr r0, [pc, #40] ; (800f8e4 ) - 800f8ba: f000 f903 bl 800fac4 - (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); - 800f8be: 68fb ldr r3, [r7, #12] - 800f8c0: 699b ldr r3, [r3, #24] - 800f8c2: 68b9 ldr r1, [r7, #8] - 800f8c4: 68f8 ldr r0, [r7, #12] - 800f8c6: 4798 blx r3 - 800f8c8: 4603 mov r3, r0 - 800f8ca: e002 b.n 800f8d2 - goto pbuf_header_failed; - 800f8cc: bf00 nop - -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; - 800f8ce: f06f 0301 mvn.w r3, #1 -} - 800f8d2: 4618 mov r0, r3 - 800f8d4: 3718 adds r7, #24 - 800f8d6: 46bd mov sp, r7 - 800f8d8: bd80 pop {r7, pc} - 800f8da: bf00 nop - 800f8dc: 08012a2c .word 0x08012a2c - 800f8e0: 08012a64 .word 0x08012a64 - 800f8e4: 08012a98 .word 0x08012a98 - -0800f8e8 : - 800f8e8: 4b16 ldr r3, [pc, #88] ; (800f944 ) - 800f8ea: b510 push {r4, lr} - 800f8ec: 681c ldr r4, [r3, #0] - 800f8ee: 6b23 ldr r3, [r4, #48] ; 0x30 - 800f8f0: b9b3 cbnz r3, 800f920 - 800f8f2: 2018 movs r0, #24 - 800f8f4: f000 fac8 bl 800fe88 - 800f8f8: 4602 mov r2, r0 - 800f8fa: 6320 str r0, [r4, #48] ; 0x30 - 800f8fc: b920 cbnz r0, 800f908 - 800f8fe: 2152 movs r1, #82 ; 0x52 - 800f900: 4b11 ldr r3, [pc, #68] ; (800f948 ) - 800f902: 4812 ldr r0, [pc, #72] ; (800f94c ) - 800f904: f000 fa5a bl 800fdbc <__assert_func> - 800f908: 4911 ldr r1, [pc, #68] ; (800f950 ) - 800f90a: 4b12 ldr r3, [pc, #72] ; (800f954 ) - 800f90c: e9c0 1300 strd r1, r3, [r0] - 800f910: 4b11 ldr r3, [pc, #68] ; (800f958 ) - 800f912: 2100 movs r1, #0 - 800f914: 6083 str r3, [r0, #8] - 800f916: 230b movs r3, #11 - 800f918: 8183 strh r3, [r0, #12] - 800f91a: 2001 movs r0, #1 - 800f91c: e9c2 0104 strd r0, r1, [r2, #16] - 800f920: 6b21 ldr r1, [r4, #48] ; 0x30 - 800f922: 480e ldr r0, [pc, #56] ; (800f95c ) - 800f924: 690b ldr r3, [r1, #16] - 800f926: 694c ldr r4, [r1, #20] - 800f928: 4358 muls r0, r3 - 800f92a: 4a0d ldr r2, [pc, #52] ; (800f960 ) - 800f92c: fb02 0004 mla r0, r2, r4, r0 - 800f930: fba3 3202 umull r3, r2, r3, r2 - 800f934: 3301 adds r3, #1 - 800f936: eb40 0002 adc.w r0, r0, r2 - 800f93a: e9c1 3004 strd r3, r0, [r1, #16] - 800f93e: f020 4000 bic.w r0, r0, #2147483648 ; 0x80000000 - 800f942: bd10 pop {r4, pc} - 800f944: 20000070 .word 0x20000070 - 800f948: 08012bce .word 0x08012bce - 800f94c: 08012be5 .word 0x08012be5 - 800f950: abcd330e .word 0xabcd330e - 800f954: e66d1234 .word 0xe66d1234 - 800f958: 0005deec .word 0x0005deec - 800f95c: 5851f42d .word 0x5851f42d - 800f960: 4c957f2d .word 0x4c957f2d - -0800f964 : - 800f964: 2300 movs r3, #0 - 800f966: b510 push {r4, lr} - 800f968: 4604 mov r4, r0 - 800f96a: e9c0 3300 strd r3, r3, [r0] - 800f96e: e9c0 3304 strd r3, r3, [r0, #16] - 800f972: 6083 str r3, [r0, #8] - 800f974: 8181 strh r1, [r0, #12] - 800f976: 6643 str r3, [r0, #100] ; 0x64 - 800f978: 81c2 strh r2, [r0, #14] - 800f97a: 6183 str r3, [r0, #24] - 800f97c: 4619 mov r1, r3 - 800f97e: 2208 movs r2, #8 - 800f980: 305c adds r0, #92 ; 0x5c - 800f982: f000 f999 bl 800fcb8 - 800f986: 4b05 ldr r3, [pc, #20] ; (800f99c ) - 800f988: 6224 str r4, [r4, #32] - 800f98a: 6263 str r3, [r4, #36] ; 0x24 - 800f98c: 4b04 ldr r3, [pc, #16] ; (800f9a0 ) - 800f98e: 62a3 str r3, [r4, #40] ; 0x28 - 800f990: 4b04 ldr r3, [pc, #16] ; (800f9a4 ) - 800f992: 62e3 str r3, [r4, #44] ; 0x2c - 800f994: 4b04 ldr r3, [pc, #16] ; (800f9a8 ) - 800f996: 6323 str r3, [r4, #48] ; 0x30 - 800f998: bd10 pop {r4, pc} - 800f99a: bf00 nop - 800f99c: 0800fae9 .word 0x0800fae9 - 800f9a0: 0800fb0b .word 0x0800fb0b - 800f9a4: 0800fb43 .word 0x0800fb43 - 800f9a8: 0800fb67 .word 0x0800fb67 - -0800f9ac : - 800f9ac: 4a02 ldr r2, [pc, #8] ; (800f9b8 ) - 800f9ae: 4903 ldr r1, [pc, #12] ; (800f9bc ) - 800f9b0: 4803 ldr r0, [pc, #12] ; (800f9c0 ) - 800f9b2: f000 b869 b.w 800fa88 <_fwalk_sglue> - 800f9b6: bf00 nop - 800f9b8: 20000018 .word 0x20000018 - 800f9bc: 080106a1 .word 0x080106a1 - 800f9c0: 20000024 .word 0x20000024 - -0800f9c4 : - 800f9c4: 6841 ldr r1, [r0, #4] - 800f9c6: 4b0c ldr r3, [pc, #48] ; (800f9f8 ) - 800f9c8: b510 push {r4, lr} - 800f9ca: 4299 cmp r1, r3 - 800f9cc: 4604 mov r4, r0 - 800f9ce: d001 beq.n 800f9d4 - 800f9d0: f000 fe66 bl 80106a0 <_fflush_r> - 800f9d4: 68a1 ldr r1, [r4, #8] - 800f9d6: 4b09 ldr r3, [pc, #36] ; (800f9fc ) - 800f9d8: 4299 cmp r1, r3 - 800f9da: d002 beq.n 800f9e2 - 800f9dc: 4620 mov r0, r4 - 800f9de: f000 fe5f bl 80106a0 <_fflush_r> - 800f9e2: 68e1 ldr r1, [r4, #12] - 800f9e4: 4b06 ldr r3, [pc, #24] ; (800fa00 ) - 800f9e6: 4299 cmp r1, r3 - 800f9e8: d004 beq.n 800f9f4 - 800f9ea: 4620 mov r0, r4 - 800f9ec: e8bd 4010 ldmia.w sp!, {r4, lr} - 800f9f0: f000 be56 b.w 80106a0 <_fflush_r> - 800f9f4: bd10 pop {r4, pc} - 800f9f6: bf00 nop - 800f9f8: 20006ef4 .word 0x20006ef4 - 800f9fc: 20006f5c .word 0x20006f5c - 800fa00: 20006fc4 .word 0x20006fc4 - -0800fa04 : - 800fa04: b510 push {r4, lr} - 800fa06: 4b0b ldr r3, [pc, #44] ; (800fa34 ) - 800fa08: 4c0b ldr r4, [pc, #44] ; (800fa38 ) - 800fa0a: 4a0c ldr r2, [pc, #48] ; (800fa3c ) - 800fa0c: 4620 mov r0, r4 - 800fa0e: 601a str r2, [r3, #0] - 800fa10: 2104 movs r1, #4 - 800fa12: 2200 movs r2, #0 - 800fa14: f7ff ffa6 bl 800f964 - 800fa18: f104 0068 add.w r0, r4, #104 ; 0x68 - 800fa1c: 2201 movs r2, #1 - 800fa1e: 2109 movs r1, #9 - 800fa20: f7ff ffa0 bl 800f964 - 800fa24: f104 00d0 add.w r0, r4, #208 ; 0xd0 - 800fa28: 2202 movs r2, #2 - 800fa2a: e8bd 4010 ldmia.w sp!, {r4, lr} - 800fa2e: 2112 movs r1, #18 - 800fa30: f7ff bf98 b.w 800f964 - 800fa34: 2000702c .word 0x2000702c - 800fa38: 20006ef4 .word 0x20006ef4 - 800fa3c: 0800f9ad .word 0x0800f9ad - -0800fa40 <__sfp_lock_acquire>: - 800fa40: 4801 ldr r0, [pc, #4] ; (800fa48 <__sfp_lock_acquire+0x8>) - 800fa42: f000 b9ab b.w 800fd9c <__retarget_lock_acquire_recursive> - 800fa46: bf00 nop - 800fa48: 20007035 .word 0x20007035 - -0800fa4c <__sfp_lock_release>: - 800fa4c: 4801 ldr r0, [pc, #4] ; (800fa54 <__sfp_lock_release+0x8>) - 800fa4e: f000 b9a6 b.w 800fd9e <__retarget_lock_release_recursive> - 800fa52: bf00 nop - 800fa54: 20007035 .word 0x20007035 - -0800fa58 <__sinit>: - 800fa58: b510 push {r4, lr} - 800fa5a: 4604 mov r4, r0 - 800fa5c: f7ff fff0 bl 800fa40 <__sfp_lock_acquire> - 800fa60: 6a23 ldr r3, [r4, #32] - 800fa62: b11b cbz r3, 800fa6c <__sinit+0x14> - 800fa64: e8bd 4010 ldmia.w sp!, {r4, lr} - 800fa68: f7ff bff0 b.w 800fa4c <__sfp_lock_release> - 800fa6c: 4b04 ldr r3, [pc, #16] ; (800fa80 <__sinit+0x28>) - 800fa6e: 6223 str r3, [r4, #32] - 800fa70: 4b04 ldr r3, [pc, #16] ; (800fa84 <__sinit+0x2c>) - 800fa72: 681b ldr r3, [r3, #0] - 800fa74: 2b00 cmp r3, #0 - 800fa76: d1f5 bne.n 800fa64 <__sinit+0xc> - 800fa78: f7ff ffc4 bl 800fa04 - 800fa7c: e7f2 b.n 800fa64 <__sinit+0xc> - 800fa7e: bf00 nop - 800fa80: 0800f9c5 .word 0x0800f9c5 - 800fa84: 2000702c .word 0x2000702c - -0800fa88 <_fwalk_sglue>: - 800fa88: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} - 800fa8c: 4607 mov r7, r0 - 800fa8e: 4688 mov r8, r1 - 800fa90: 4614 mov r4, r2 - 800fa92: 2600 movs r6, #0 - 800fa94: e9d4 9501 ldrd r9, r5, [r4, #4] - 800fa98: f1b9 0901 subs.w r9, r9, #1 - 800fa9c: d505 bpl.n 800faaa <_fwalk_sglue+0x22> - 800fa9e: 6824 ldr r4, [r4, #0] - 800faa0: 2c00 cmp r4, #0 - 800faa2: d1f7 bne.n 800fa94 <_fwalk_sglue+0xc> - 800faa4: 4630 mov r0, r6 - 800faa6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} - 800faaa: 89ab ldrh r3, [r5, #12] - 800faac: 2b01 cmp r3, #1 - 800faae: d907 bls.n 800fac0 <_fwalk_sglue+0x38> - 800fab0: f9b5 300e ldrsh.w r3, [r5, #14] - 800fab4: 3301 adds r3, #1 - 800fab6: d003 beq.n 800fac0 <_fwalk_sglue+0x38> - 800fab8: 4629 mov r1, r5 - 800faba: 4638 mov r0, r7 - 800fabc: 47c0 blx r8 - 800fabe: 4306 orrs r6, r0 - 800fac0: 3568 adds r5, #104 ; 0x68 - 800fac2: e7e9 b.n 800fa98 <_fwalk_sglue+0x10> - -0800fac4 : - 800fac4: b40f push {r0, r1, r2, r3} - 800fac6: b507 push {r0, r1, r2, lr} - 800fac8: 4906 ldr r1, [pc, #24] ; (800fae4 ) - 800faca: ab04 add r3, sp, #16 - 800facc: 6808 ldr r0, [r1, #0] - 800face: f853 2b04 ldr.w r2, [r3], #4 - 800fad2: 6881 ldr r1, [r0, #8] - 800fad4: 9301 str r3, [sp, #4] - 800fad6: f000 fab3 bl 8010040 <_vfiprintf_r> - 800fada: b003 add sp, #12 - 800fadc: f85d eb04 ldr.w lr, [sp], #4 - 800fae0: b004 add sp, #16 - 800fae2: 4770 bx lr - 800fae4: 20000070 .word 0x20000070 - -0800fae8 <__sread>: - 800fae8: b510 push {r4, lr} - 800faea: 460c mov r4, r1 - 800faec: f9b1 100e ldrsh.w r1, [r1, #14] - 800faf0: f000 f90c bl 800fd0c <_read_r> - 800faf4: 2800 cmp r0, #0 - 800faf6: bfab itete ge - 800faf8: 6d63 ldrge r3, [r4, #84] ; 0x54 - 800fafa: 89a3 ldrhlt r3, [r4, #12] - 800fafc: 181b addge r3, r3, r0 - 800fafe: f423 5380 biclt.w r3, r3, #4096 ; 0x1000 - 800fb02: bfac ite ge - 800fb04: 6563 strge r3, [r4, #84] ; 0x54 - 800fb06: 81a3 strhlt r3, [r4, #12] - 800fb08: bd10 pop {r4, pc} - -0800fb0a <__swrite>: - 800fb0a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} - 800fb0e: 461f mov r7, r3 - 800fb10: 898b ldrh r3, [r1, #12] - 800fb12: 4605 mov r5, r0 - 800fb14: 05db lsls r3, r3, #23 - 800fb16: 460c mov r4, r1 - 800fb18: 4616 mov r6, r2 - 800fb1a: d505 bpl.n 800fb28 <__swrite+0x1e> - 800fb1c: 2302 movs r3, #2 - 800fb1e: 2200 movs r2, #0 - 800fb20: f9b1 100e ldrsh.w r1, [r1, #14] - 800fb24: f000 f8e0 bl 800fce8 <_lseek_r> - 800fb28: 89a3 ldrh r3, [r4, #12] - 800fb2a: 4632 mov r2, r6 - 800fb2c: f423 5380 bic.w r3, r3, #4096 ; 0x1000 - 800fb30: 81a3 strh r3, [r4, #12] - 800fb32: 4628 mov r0, r5 - 800fb34: 463b mov r3, r7 - 800fb36: f9b4 100e ldrsh.w r1, [r4, #14] - 800fb3a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} - 800fb3e: f000 b8f7 b.w 800fd30 <_write_r> - -0800fb42 <__sseek>: - 800fb42: b510 push {r4, lr} - 800fb44: 460c mov r4, r1 - 800fb46: f9b1 100e ldrsh.w r1, [r1, #14] - 800fb4a: f000 f8cd bl 800fce8 <_lseek_r> - 800fb4e: 1c43 adds r3, r0, #1 - 800fb50: 89a3 ldrh r3, [r4, #12] - 800fb52: bf15 itete ne - 800fb54: 6560 strne r0, [r4, #84] ; 0x54 - 800fb56: f423 5380 biceq.w r3, r3, #4096 ; 0x1000 - 800fb5a: f443 5380 orrne.w r3, r3, #4096 ; 0x1000 - 800fb5e: 81a3 strheq r3, [r4, #12] - 800fb60: bf18 it ne - 800fb62: 81a3 strhne r3, [r4, #12] - 800fb64: bd10 pop {r4, pc} - -0800fb66 <__sclose>: - 800fb66: f9b1 100e ldrsh.w r1, [r1, #14] - 800fb6a: f000 b8ad b.w 800fcc8 <_close_r> - -0800fb6e <__swbuf_r>: - 800fb6e: b5f8 push {r3, r4, r5, r6, r7, lr} - 800fb70: 460e mov r6, r1 - 800fb72: 4614 mov r4, r2 - 800fb74: 4605 mov r5, r0 - 800fb76: b118 cbz r0, 800fb80 <__swbuf_r+0x12> - 800fb78: 6a03 ldr r3, [r0, #32] - 800fb7a: b90b cbnz r3, 800fb80 <__swbuf_r+0x12> - 800fb7c: f7ff ff6c bl 800fa58 <__sinit> - 800fb80: 69a3 ldr r3, [r4, #24] - 800fb82: 60a3 str r3, [r4, #8] - 800fb84: 89a3 ldrh r3, [r4, #12] - 800fb86: 071a lsls r2, r3, #28 - 800fb88: d525 bpl.n 800fbd6 <__swbuf_r+0x68> - 800fb8a: 6923 ldr r3, [r4, #16] - 800fb8c: b31b cbz r3, 800fbd6 <__swbuf_r+0x68> - 800fb8e: 6823 ldr r3, [r4, #0] - 800fb90: 6922 ldr r2, [r4, #16] - 800fb92: b2f6 uxtb r6, r6 - 800fb94: 1a98 subs r0, r3, r2 - 800fb96: 6963 ldr r3, [r4, #20] - 800fb98: 4637 mov r7, r6 - 800fb9a: 4283 cmp r3, r0 - 800fb9c: dc04 bgt.n 800fba8 <__swbuf_r+0x3a> - 800fb9e: 4621 mov r1, r4 - 800fba0: 4628 mov r0, r5 - 800fba2: f000 fd7d bl 80106a0 <_fflush_r> - 800fba6: b9e0 cbnz r0, 800fbe2 <__swbuf_r+0x74> - 800fba8: 68a3 ldr r3, [r4, #8] - 800fbaa: 3b01 subs r3, #1 - 800fbac: 60a3 str r3, [r4, #8] - 800fbae: 6823 ldr r3, [r4, #0] - 800fbb0: 1c5a adds r2, r3, #1 - 800fbb2: 6022 str r2, [r4, #0] - 800fbb4: 701e strb r6, [r3, #0] - 800fbb6: 6962 ldr r2, [r4, #20] - 800fbb8: 1c43 adds r3, r0, #1 - 800fbba: 429a cmp r2, r3 - 800fbbc: d004 beq.n 800fbc8 <__swbuf_r+0x5a> - 800fbbe: 89a3 ldrh r3, [r4, #12] - 800fbc0: 07db lsls r3, r3, #31 - 800fbc2: d506 bpl.n 800fbd2 <__swbuf_r+0x64> - 800fbc4: 2e0a cmp r6, #10 - 800fbc6: d104 bne.n 800fbd2 <__swbuf_r+0x64> - 800fbc8: 4621 mov r1, r4 - 800fbca: 4628 mov r0, r5 - 800fbcc: f000 fd68 bl 80106a0 <_fflush_r> - 800fbd0: b938 cbnz r0, 800fbe2 <__swbuf_r+0x74> - 800fbd2: 4638 mov r0, r7 - 800fbd4: bdf8 pop {r3, r4, r5, r6, r7, pc} - 800fbd6: 4621 mov r1, r4 - 800fbd8: 4628 mov r0, r5 - 800fbda: f000 f805 bl 800fbe8 <__swsetup_r> - 800fbde: 2800 cmp r0, #0 - 800fbe0: d0d5 beq.n 800fb8e <__swbuf_r+0x20> - 800fbe2: f04f 37ff mov.w r7, #4294967295 - 800fbe6: e7f4 b.n 800fbd2 <__swbuf_r+0x64> - -0800fbe8 <__swsetup_r>: - 800fbe8: b538 push {r3, r4, r5, lr} - 800fbea: 4b2a ldr r3, [pc, #168] ; (800fc94 <__swsetup_r+0xac>) - 800fbec: 4605 mov r5, r0 - 800fbee: 6818 ldr r0, [r3, #0] - 800fbf0: 460c mov r4, r1 - 800fbf2: b118 cbz r0, 800fbfc <__swsetup_r+0x14> - 800fbf4: 6a03 ldr r3, [r0, #32] - 800fbf6: b90b cbnz r3, 800fbfc <__swsetup_r+0x14> - 800fbf8: f7ff ff2e bl 800fa58 <__sinit> - 800fbfc: 89a3 ldrh r3, [r4, #12] - 800fbfe: f9b4 200c ldrsh.w r2, [r4, #12] - 800fc02: 0718 lsls r0, r3, #28 - 800fc04: d422 bmi.n 800fc4c <__swsetup_r+0x64> - 800fc06: 06d9 lsls r1, r3, #27 - 800fc08: d407 bmi.n 800fc1a <__swsetup_r+0x32> - 800fc0a: 2309 movs r3, #9 - 800fc0c: 602b str r3, [r5, #0] - 800fc0e: f042 0340 orr.w r3, r2, #64 ; 0x40 - 800fc12: f04f 30ff mov.w r0, #4294967295 - 800fc16: 81a3 strh r3, [r4, #12] - 800fc18: e034 b.n 800fc84 <__swsetup_r+0x9c> - 800fc1a: 0758 lsls r0, r3, #29 - 800fc1c: d512 bpl.n 800fc44 <__swsetup_r+0x5c> - 800fc1e: 6b61 ldr r1, [r4, #52] ; 0x34 - 800fc20: b141 cbz r1, 800fc34 <__swsetup_r+0x4c> - 800fc22: f104 0344 add.w r3, r4, #68 ; 0x44 - 800fc26: 4299 cmp r1, r3 - 800fc28: d002 beq.n 800fc30 <__swsetup_r+0x48> - 800fc2a: 4628 mov r0, r5 - 800fc2c: f000 f8e4 bl 800fdf8 <_free_r> - 800fc30: 2300 movs r3, #0 - 800fc32: 6363 str r3, [r4, #52] ; 0x34 - 800fc34: 89a3 ldrh r3, [r4, #12] - 800fc36: f023 0324 bic.w r3, r3, #36 ; 0x24 - 800fc3a: 81a3 strh r3, [r4, #12] - 800fc3c: 2300 movs r3, #0 - 800fc3e: 6063 str r3, [r4, #4] - 800fc40: 6923 ldr r3, [r4, #16] - 800fc42: 6023 str r3, [r4, #0] - 800fc44: 89a3 ldrh r3, [r4, #12] - 800fc46: f043 0308 orr.w r3, r3, #8 - 800fc4a: 81a3 strh r3, [r4, #12] - 800fc4c: 6923 ldr r3, [r4, #16] - 800fc4e: b94b cbnz r3, 800fc64 <__swsetup_r+0x7c> - 800fc50: 89a3 ldrh r3, [r4, #12] - 800fc52: f403 7320 and.w r3, r3, #640 ; 0x280 - 800fc56: f5b3 7f00 cmp.w r3, #512 ; 0x200 - 800fc5a: d003 beq.n 800fc64 <__swsetup_r+0x7c> - 800fc5c: 4621 mov r1, r4 - 800fc5e: 4628 mov r0, r5 - 800fc60: f000 fd7d bl 801075e <__smakebuf_r> - 800fc64: 89a0 ldrh r0, [r4, #12] - 800fc66: f9b4 200c ldrsh.w r2, [r4, #12] - 800fc6a: f010 0301 ands.w r3, r0, #1 - 800fc6e: d00a beq.n 800fc86 <__swsetup_r+0x9e> - 800fc70: 2300 movs r3, #0 - 800fc72: 60a3 str r3, [r4, #8] - 800fc74: 6963 ldr r3, [r4, #20] - 800fc76: 425b negs r3, r3 - 800fc78: 61a3 str r3, [r4, #24] - 800fc7a: 6923 ldr r3, [r4, #16] - 800fc7c: b943 cbnz r3, 800fc90 <__swsetup_r+0xa8> - 800fc7e: f010 0080 ands.w r0, r0, #128 ; 0x80 - 800fc82: d1c4 bne.n 800fc0e <__swsetup_r+0x26> - 800fc84: bd38 pop {r3, r4, r5, pc} - 800fc86: 0781 lsls r1, r0, #30 - 800fc88: bf58 it pl - 800fc8a: 6963 ldrpl r3, [r4, #20] - 800fc8c: 60a3 str r3, [r4, #8] - 800fc8e: e7f4 b.n 800fc7a <__swsetup_r+0x92> - 800fc90: 2000 movs r0, #0 - 800fc92: e7f7 b.n 800fc84 <__swsetup_r+0x9c> - 800fc94: 20000070 .word 0x20000070 - -0800fc98 : - 800fc98: b510 push {r4, lr} - 800fc9a: 3901 subs r1, #1 - 800fc9c: 4402 add r2, r0 - 800fc9e: 4290 cmp r0, r2 - 800fca0: d101 bne.n 800fca6 - 800fca2: 2000 movs r0, #0 - 800fca4: e005 b.n 800fcb2 - 800fca6: 7803 ldrb r3, [r0, #0] - 800fca8: f811 4f01 ldrb.w r4, [r1, #1]! - 800fcac: 42a3 cmp r3, r4 - 800fcae: d001 beq.n 800fcb4 - 800fcb0: 1b18 subs r0, r3, r4 - 800fcb2: bd10 pop {r4, pc} - 800fcb4: 3001 adds r0, #1 - 800fcb6: e7f2 b.n 800fc9e - -0800fcb8 : - 800fcb8: 4603 mov r3, r0 - 800fcba: 4402 add r2, r0 - 800fcbc: 4293 cmp r3, r2 - 800fcbe: d100 bne.n 800fcc2 - 800fcc0: 4770 bx lr - 800fcc2: f803 1b01 strb.w r1, [r3], #1 - 800fcc6: e7f9 b.n 800fcbc - -0800fcc8 <_close_r>: - 800fcc8: b538 push {r3, r4, r5, lr} - 800fcca: 2300 movs r3, #0 - 800fccc: 4d05 ldr r5, [pc, #20] ; (800fce4 <_close_r+0x1c>) - 800fcce: 4604 mov r4, r0 - 800fcd0: 4608 mov r0, r1 - 800fcd2: 602b str r3, [r5, #0] - 800fcd4: f7f1 f949 bl 8000f6a <_close> - 800fcd8: 1c43 adds r3, r0, #1 - 800fcda: d102 bne.n 800fce2 <_close_r+0x1a> - 800fcdc: 682b ldr r3, [r5, #0] - 800fcde: b103 cbz r3, 800fce2 <_close_r+0x1a> - 800fce0: 6023 str r3, [r4, #0] - 800fce2: bd38 pop {r3, r4, r5, pc} - 800fce4: 20007030 .word 0x20007030 - -0800fce8 <_lseek_r>: - 800fce8: b538 push {r3, r4, r5, lr} - 800fcea: 4604 mov r4, r0 - 800fcec: 4608 mov r0, r1 - 800fcee: 4611 mov r1, r2 - 800fcf0: 2200 movs r2, #0 - 800fcf2: 4d05 ldr r5, [pc, #20] ; (800fd08 <_lseek_r+0x20>) - 800fcf4: 602a str r2, [r5, #0] - 800fcf6: 461a mov r2, r3 - 800fcf8: f7f1 f95b bl 8000fb2 <_lseek> - 800fcfc: 1c43 adds r3, r0, #1 - 800fcfe: d102 bne.n 800fd06 <_lseek_r+0x1e> - 800fd00: 682b ldr r3, [r5, #0] - 800fd02: b103 cbz r3, 800fd06 <_lseek_r+0x1e> - 800fd04: 6023 str r3, [r4, #0] - 800fd06: bd38 pop {r3, r4, r5, pc} - 800fd08: 20007030 .word 0x20007030 - -0800fd0c <_read_r>: - 800fd0c: b538 push {r3, r4, r5, lr} - 800fd0e: 4604 mov r4, r0 - 800fd10: 4608 mov r0, r1 - 800fd12: 4611 mov r1, r2 - 800fd14: 2200 movs r2, #0 - 800fd16: 4d05 ldr r5, [pc, #20] ; (800fd2c <_read_r+0x20>) - 800fd18: 602a str r2, [r5, #0] - 800fd1a: 461a mov r2, r3 - 800fd1c: f7f1 f8ec bl 8000ef8 <_read> - 800fd20: 1c43 adds r3, r0, #1 - 800fd22: d102 bne.n 800fd2a <_read_r+0x1e> - 800fd24: 682b ldr r3, [r5, #0] - 800fd26: b103 cbz r3, 800fd2a <_read_r+0x1e> - 800fd28: 6023 str r3, [r4, #0] - 800fd2a: bd38 pop {r3, r4, r5, pc} - 800fd2c: 20007030 .word 0x20007030 - -0800fd30 <_write_r>: - 800fd30: b538 push {r3, r4, r5, lr} - 800fd32: 4604 mov r4, r0 - 800fd34: 4608 mov r0, r1 - 800fd36: 4611 mov r1, r2 - 800fd38: 2200 movs r2, #0 - 800fd3a: 4d05 ldr r5, [pc, #20] ; (800fd50 <_write_r+0x20>) - 800fd3c: 602a str r2, [r5, #0] - 800fd3e: 461a mov r2, r3 - 800fd40: f7f1 f8f7 bl 8000f32 <_write> - 800fd44: 1c43 adds r3, r0, #1 - 800fd46: d102 bne.n 800fd4e <_write_r+0x1e> - 800fd48: 682b ldr r3, [r5, #0] - 800fd4a: b103 cbz r3, 800fd4e <_write_r+0x1e> - 800fd4c: 6023 str r3, [r4, #0] - 800fd4e: bd38 pop {r3, r4, r5, pc} - 800fd50: 20007030 .word 0x20007030 - -0800fd54 <__libc_init_array>: - 800fd54: b570 push {r4, r5, r6, lr} - 800fd56: 2600 movs r6, #0 - 800fd58: 4d0c ldr r5, [pc, #48] ; (800fd8c <__libc_init_array+0x38>) - 800fd5a: 4c0d ldr r4, [pc, #52] ; (800fd90 <__libc_init_array+0x3c>) - 800fd5c: 1b64 subs r4, r4, r5 - 800fd5e: 10a4 asrs r4, r4, #2 - 800fd60: 42a6 cmp r6, r4 - 800fd62: d109 bne.n 800fd78 <__libc_init_array+0x24> - 800fd64: f000 fdc4 bl 80108f0 <_init> - 800fd68: 2600 movs r6, #0 - 800fd6a: 4d0a ldr r5, [pc, #40] ; (800fd94 <__libc_init_array+0x40>) - 800fd6c: 4c0a ldr r4, [pc, #40] ; (800fd98 <__libc_init_array+0x44>) - 800fd6e: 1b64 subs r4, r4, r5 - 800fd70: 10a4 asrs r4, r4, #2 - 800fd72: 42a6 cmp r6, r4 - 800fd74: d105 bne.n 800fd82 <__libc_init_array+0x2e> - 800fd76: bd70 pop {r4, r5, r6, pc} - 800fd78: f855 3b04 ldr.w r3, [r5], #4 - 800fd7c: 4798 blx r3 - 800fd7e: 3601 adds r6, #1 - 800fd80: e7ee b.n 800fd60 <__libc_init_array+0xc> - 800fd82: f855 3b04 ldr.w r3, [r5], #4 - 800fd86: 4798 blx r3 - 800fd88: 3601 adds r6, #1 - 800fd8a: e7f2 b.n 800fd72 <__libc_init_array+0x1e> - 800fd8c: 08012cb4 .word 0x08012cb4 - 800fd90: 08012cb4 .word 0x08012cb4 - 800fd94: 08012cb4 .word 0x08012cb4 - 800fd98: 08012cb8 .word 0x08012cb8 - -0800fd9c <__retarget_lock_acquire_recursive>: - 800fd9c: 4770 bx lr - -0800fd9e <__retarget_lock_release_recursive>: - 800fd9e: 4770 bx lr - -0800fda0 : - 800fda0: 440a add r2, r1 - 800fda2: 4291 cmp r1, r2 - 800fda4: f100 33ff add.w r3, r0, #4294967295 - 800fda8: d100 bne.n 800fdac - 800fdaa: 4770 bx lr - 800fdac: b510 push {r4, lr} - 800fdae: f811 4b01 ldrb.w r4, [r1], #1 - 800fdb2: 4291 cmp r1, r2 - 800fdb4: f803 4f01 strb.w r4, [r3, #1]! - 800fdb8: d1f9 bne.n 800fdae - 800fdba: bd10 pop {r4, pc} - -0800fdbc <__assert_func>: - 800fdbc: b51f push {r0, r1, r2, r3, r4, lr} - 800fdbe: 4614 mov r4, r2 - 800fdc0: 461a mov r2, r3 - 800fdc2: 4b09 ldr r3, [pc, #36] ; (800fde8 <__assert_func+0x2c>) - 800fdc4: 4605 mov r5, r0 - 800fdc6: 681b ldr r3, [r3, #0] - 800fdc8: 68d8 ldr r0, [r3, #12] - 800fdca: b14c cbz r4, 800fde0 <__assert_func+0x24> - 800fdcc: 4b07 ldr r3, [pc, #28] ; (800fdec <__assert_func+0x30>) - 800fdce: e9cd 3401 strd r3, r4, [sp, #4] - 800fdd2: 9100 str r1, [sp, #0] - 800fdd4: 462b mov r3, r5 - 800fdd6: 4906 ldr r1, [pc, #24] ; (800fdf0 <__assert_func+0x34>) - 800fdd8: f000 fc8a bl 80106f0 - 800fddc: f000 fd3c bl 8010858 - 800fde0: 4b04 ldr r3, [pc, #16] ; (800fdf4 <__assert_func+0x38>) - 800fde2: 461c mov r4, r3 - 800fde4: e7f3 b.n 800fdce <__assert_func+0x12> - 800fde6: bf00 nop - 800fde8: 20000070 .word 0x20000070 - 800fdec: 08012c3d .word 0x08012c3d - 800fdf0: 08012c4a .word 0x08012c4a - 800fdf4: 08012c78 .word 0x08012c78 - -0800fdf8 <_free_r>: - 800fdf8: b538 push {r3, r4, r5, lr} - 800fdfa: 4605 mov r5, r0 - 800fdfc: 2900 cmp r1, #0 - 800fdfe: d040 beq.n 800fe82 <_free_r+0x8a> - 800fe00: f851 3c04 ldr.w r3, [r1, #-4] - 800fe04: 1f0c subs r4, r1, #4 - 800fe06: 2b00 cmp r3, #0 - 800fe08: bfb8 it lt - 800fe0a: 18e4 addlt r4, r4, r3 - 800fe0c: f000 f8e4 bl 800ffd8 <__malloc_lock> - 800fe10: 4a1c ldr r2, [pc, #112] ; (800fe84 <_free_r+0x8c>) - 800fe12: 6813 ldr r3, [r2, #0] - 800fe14: b933 cbnz r3, 800fe24 <_free_r+0x2c> - 800fe16: 6063 str r3, [r4, #4] - 800fe18: 6014 str r4, [r2, #0] - 800fe1a: 4628 mov r0, r5 - 800fe1c: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} - 800fe20: f000 b8e0 b.w 800ffe4 <__malloc_unlock> - 800fe24: 42a3 cmp r3, r4 - 800fe26: d908 bls.n 800fe3a <_free_r+0x42> - 800fe28: 6820 ldr r0, [r4, #0] - 800fe2a: 1821 adds r1, r4, r0 - 800fe2c: 428b cmp r3, r1 - 800fe2e: bf01 itttt eq - 800fe30: 6819 ldreq r1, [r3, #0] - 800fe32: 685b ldreq r3, [r3, #4] - 800fe34: 1809 addeq r1, r1, r0 - 800fe36: 6021 streq r1, [r4, #0] - 800fe38: e7ed b.n 800fe16 <_free_r+0x1e> - 800fe3a: 461a mov r2, r3 - 800fe3c: 685b ldr r3, [r3, #4] - 800fe3e: b10b cbz r3, 800fe44 <_free_r+0x4c> - 800fe40: 42a3 cmp r3, r4 - 800fe42: d9fa bls.n 800fe3a <_free_r+0x42> - 800fe44: 6811 ldr r1, [r2, #0] - 800fe46: 1850 adds r0, r2, r1 - 800fe48: 42a0 cmp r0, r4 - 800fe4a: d10b bne.n 800fe64 <_free_r+0x6c> - 800fe4c: 6820 ldr r0, [r4, #0] - 800fe4e: 4401 add r1, r0 - 800fe50: 1850 adds r0, r2, r1 - 800fe52: 4283 cmp r3, r0 - 800fe54: 6011 str r1, [r2, #0] - 800fe56: d1e0 bne.n 800fe1a <_free_r+0x22> - 800fe58: 6818 ldr r0, [r3, #0] - 800fe5a: 685b ldr r3, [r3, #4] - 800fe5c: 4408 add r0, r1 - 800fe5e: 6010 str r0, [r2, #0] - 800fe60: 6053 str r3, [r2, #4] - 800fe62: e7da b.n 800fe1a <_free_r+0x22> - 800fe64: d902 bls.n 800fe6c <_free_r+0x74> - 800fe66: 230c movs r3, #12 - 800fe68: 602b str r3, [r5, #0] - 800fe6a: e7d6 b.n 800fe1a <_free_r+0x22> - 800fe6c: 6820 ldr r0, [r4, #0] - 800fe6e: 1821 adds r1, r4, r0 - 800fe70: 428b cmp r3, r1 - 800fe72: bf01 itttt eq - 800fe74: 6819 ldreq r1, [r3, #0] - 800fe76: 685b ldreq r3, [r3, #4] - 800fe78: 1809 addeq r1, r1, r0 - 800fe7a: 6021 streq r1, [r4, #0] - 800fe7c: 6063 str r3, [r4, #4] - 800fe7e: 6054 str r4, [r2, #4] - 800fe80: e7cb b.n 800fe1a <_free_r+0x22> - 800fe82: bd38 pop {r3, r4, r5, pc} - 800fe84: 20007038 .word 0x20007038 - -0800fe88 : - 800fe88: 4b02 ldr r3, [pc, #8] ; (800fe94 ) - 800fe8a: 4601 mov r1, r0 - 800fe8c: 6818 ldr r0, [r3, #0] - 800fe8e: f000 b823 b.w 800fed8 <_malloc_r> - 800fe92: bf00 nop - 800fe94: 20000070 .word 0x20000070 - -0800fe98 : - 800fe98: b570 push {r4, r5, r6, lr} - 800fe9a: 4e0e ldr r6, [pc, #56] ; (800fed4 ) - 800fe9c: 460c mov r4, r1 - 800fe9e: 6831 ldr r1, [r6, #0] - 800fea0: 4605 mov r5, r0 - 800fea2: b911 cbnz r1, 800feaa - 800fea4: f000 fcba bl 801081c <_sbrk_r> - 800fea8: 6030 str r0, [r6, #0] - 800feaa: 4621 mov r1, r4 - 800feac: 4628 mov r0, r5 - 800feae: f000 fcb5 bl 801081c <_sbrk_r> - 800feb2: 1c43 adds r3, r0, #1 - 800feb4: d00a beq.n 800fecc - 800feb6: 1cc4 adds r4, r0, #3 - 800feb8: f024 0403 bic.w r4, r4, #3 - 800febc: 42a0 cmp r0, r4 - 800febe: d007 beq.n 800fed0 - 800fec0: 1a21 subs r1, r4, r0 - 800fec2: 4628 mov r0, r5 - 800fec4: f000 fcaa bl 801081c <_sbrk_r> - 800fec8: 3001 adds r0, #1 - 800feca: d101 bne.n 800fed0 - 800fecc: f04f 34ff mov.w r4, #4294967295 - 800fed0: 4620 mov r0, r4 - 800fed2: bd70 pop {r4, r5, r6, pc} - 800fed4: 2000703c .word 0x2000703c - -0800fed8 <_malloc_r>: - 800fed8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} - 800fedc: 1ccd adds r5, r1, #3 - 800fede: f025 0503 bic.w r5, r5, #3 - 800fee2: 3508 adds r5, #8 - 800fee4: 2d0c cmp r5, #12 - 800fee6: bf38 it cc - 800fee8: 250c movcc r5, #12 - 800feea: 2d00 cmp r5, #0 - 800feec: 4607 mov r7, r0 - 800feee: db01 blt.n 800fef4 <_malloc_r+0x1c> - 800fef0: 42a9 cmp r1, r5 - 800fef2: d905 bls.n 800ff00 <_malloc_r+0x28> - 800fef4: 230c movs r3, #12 - 800fef6: 2600 movs r6, #0 - 800fef8: 603b str r3, [r7, #0] - 800fefa: 4630 mov r0, r6 - 800fefc: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} - 800ff00: f8df 80d0 ldr.w r8, [pc, #208] ; 800ffd4 <_malloc_r+0xfc> - 800ff04: f000 f868 bl 800ffd8 <__malloc_lock> - 800ff08: f8d8 3000 ldr.w r3, [r8] - 800ff0c: 461c mov r4, r3 - 800ff0e: bb5c cbnz r4, 800ff68 <_malloc_r+0x90> - 800ff10: 4629 mov r1, r5 - 800ff12: 4638 mov r0, r7 - 800ff14: f7ff ffc0 bl 800fe98 - 800ff18: 1c43 adds r3, r0, #1 - 800ff1a: 4604 mov r4, r0 - 800ff1c: d155 bne.n 800ffca <_malloc_r+0xf2> - 800ff1e: f8d8 4000 ldr.w r4, [r8] - 800ff22: 4626 mov r6, r4 - 800ff24: 2e00 cmp r6, #0 - 800ff26: d145 bne.n 800ffb4 <_malloc_r+0xdc> - 800ff28: 2c00 cmp r4, #0 - 800ff2a: d048 beq.n 800ffbe <_malloc_r+0xe6> - 800ff2c: 6823 ldr r3, [r4, #0] - 800ff2e: 4631 mov r1, r6 - 800ff30: 4638 mov r0, r7 - 800ff32: eb04 0903 add.w r9, r4, r3 - 800ff36: f000 fc71 bl 801081c <_sbrk_r> - 800ff3a: 4581 cmp r9, r0 - 800ff3c: d13f bne.n 800ffbe <_malloc_r+0xe6> - 800ff3e: 6821 ldr r1, [r4, #0] - 800ff40: 4638 mov r0, r7 - 800ff42: 1a6d subs r5, r5, r1 - 800ff44: 4629 mov r1, r5 - 800ff46: f7ff ffa7 bl 800fe98 - 800ff4a: 3001 adds r0, #1 - 800ff4c: d037 beq.n 800ffbe <_malloc_r+0xe6> - 800ff4e: 6823 ldr r3, [r4, #0] - 800ff50: 442b add r3, r5 - 800ff52: 6023 str r3, [r4, #0] - 800ff54: f8d8 3000 ldr.w r3, [r8] - 800ff58: 2b00 cmp r3, #0 - 800ff5a: d038 beq.n 800ffce <_malloc_r+0xf6> - 800ff5c: 685a ldr r2, [r3, #4] - 800ff5e: 42a2 cmp r2, r4 - 800ff60: d12b bne.n 800ffba <_malloc_r+0xe2> - 800ff62: 2200 movs r2, #0 - 800ff64: 605a str r2, [r3, #4] - 800ff66: e00f b.n 800ff88 <_malloc_r+0xb0> - 800ff68: 6822 ldr r2, [r4, #0] - 800ff6a: 1b52 subs r2, r2, r5 - 800ff6c: d41f bmi.n 800ffae <_malloc_r+0xd6> - 800ff6e: 2a0b cmp r2, #11 - 800ff70: d917 bls.n 800ffa2 <_malloc_r+0xca> - 800ff72: 1961 adds r1, r4, r5 - 800ff74: 42a3 cmp r3, r4 - 800ff76: 6025 str r5, [r4, #0] - 800ff78: bf18 it ne - 800ff7a: 6059 strne r1, [r3, #4] - 800ff7c: 6863 ldr r3, [r4, #4] - 800ff7e: bf08 it eq - 800ff80: f8c8 1000 streq.w r1, [r8] - 800ff84: 5162 str r2, [r4, r5] - 800ff86: 604b str r3, [r1, #4] - 800ff88: 4638 mov r0, r7 - 800ff8a: f104 060b add.w r6, r4, #11 - 800ff8e: f000 f829 bl 800ffe4 <__malloc_unlock> - 800ff92: f026 0607 bic.w r6, r6, #7 - 800ff96: 1d23 adds r3, r4, #4 - 800ff98: 1af2 subs r2, r6, r3 - 800ff9a: d0ae beq.n 800fefa <_malloc_r+0x22> - 800ff9c: 1b9b subs r3, r3, r6 - 800ff9e: 50a3 str r3, [r4, r2] - 800ffa0: e7ab b.n 800fefa <_malloc_r+0x22> - 800ffa2: 42a3 cmp r3, r4 - 800ffa4: 6862 ldr r2, [r4, #4] - 800ffa6: d1dd bne.n 800ff64 <_malloc_r+0x8c> - 800ffa8: f8c8 2000 str.w r2, [r8] - 800ffac: e7ec b.n 800ff88 <_malloc_r+0xb0> - 800ffae: 4623 mov r3, r4 - 800ffb0: 6864 ldr r4, [r4, #4] - 800ffb2: e7ac b.n 800ff0e <_malloc_r+0x36> - 800ffb4: 4634 mov r4, r6 - 800ffb6: 6876 ldr r6, [r6, #4] - 800ffb8: e7b4 b.n 800ff24 <_malloc_r+0x4c> - 800ffba: 4613 mov r3, r2 - 800ffbc: e7cc b.n 800ff58 <_malloc_r+0x80> - 800ffbe: 230c movs r3, #12 - 800ffc0: 4638 mov r0, r7 - 800ffc2: 603b str r3, [r7, #0] - 800ffc4: f000 f80e bl 800ffe4 <__malloc_unlock> - 800ffc8: e797 b.n 800fefa <_malloc_r+0x22> - 800ffca: 6025 str r5, [r4, #0] - 800ffcc: e7dc b.n 800ff88 <_malloc_r+0xb0> - 800ffce: 605b str r3, [r3, #4] - 800ffd0: deff udf #255 ; 0xff - 800ffd2: bf00 nop - 800ffd4: 20007038 .word 0x20007038 - -0800ffd8 <__malloc_lock>: - 800ffd8: 4801 ldr r0, [pc, #4] ; (800ffe0 <__malloc_lock+0x8>) - 800ffda: f7ff bedf b.w 800fd9c <__retarget_lock_acquire_recursive> - 800ffde: bf00 nop - 800ffe0: 20007034 .word 0x20007034 - -0800ffe4 <__malloc_unlock>: - 800ffe4: 4801 ldr r0, [pc, #4] ; (800ffec <__malloc_unlock+0x8>) - 800ffe6: f7ff beda b.w 800fd9e <__retarget_lock_release_recursive> - 800ffea: bf00 nop - 800ffec: 20007034 .word 0x20007034 - -0800fff0 <__sfputc_r>: - 800fff0: 6893 ldr r3, [r2, #8] - 800fff2: b410 push {r4} - 800fff4: 3b01 subs r3, #1 - 800fff6: 2b00 cmp r3, #0 - 800fff8: 6093 str r3, [r2, #8] - 800fffa: da07 bge.n 801000c <__sfputc_r+0x1c> - 800fffc: 6994 ldr r4, [r2, #24] - 800fffe: 42a3 cmp r3, r4 - 8010000: db01 blt.n 8010006 <__sfputc_r+0x16> - 8010002: 290a cmp r1, #10 - 8010004: d102 bne.n 801000c <__sfputc_r+0x1c> - 8010006: bc10 pop {r4} - 8010008: f7ff bdb1 b.w 800fb6e <__swbuf_r> - 801000c: 6813 ldr r3, [r2, #0] - 801000e: 1c58 adds r0, r3, #1 - 8010010: 6010 str r0, [r2, #0] - 8010012: 7019 strb r1, [r3, #0] - 8010014: 4608 mov r0, r1 - 8010016: bc10 pop {r4} - 8010018: 4770 bx lr - -0801001a <__sfputs_r>: - 801001a: b5f8 push {r3, r4, r5, r6, r7, lr} - 801001c: 4606 mov r6, r0 - 801001e: 460f mov r7, r1 - 8010020: 4614 mov r4, r2 - 8010022: 18d5 adds r5, r2, r3 - 8010024: 42ac cmp r4, r5 - 8010026: d101 bne.n 801002c <__sfputs_r+0x12> - 8010028: 2000 movs r0, #0 - 801002a: e007 b.n 801003c <__sfputs_r+0x22> - 801002c: 463a mov r2, r7 - 801002e: 4630 mov r0, r6 - 8010030: f814 1b01 ldrb.w r1, [r4], #1 - 8010034: f7ff ffdc bl 800fff0 <__sfputc_r> - 8010038: 1c43 adds r3, r0, #1 - 801003a: d1f3 bne.n 8010024 <__sfputs_r+0xa> - 801003c: bdf8 pop {r3, r4, r5, r6, r7, pc} - ... - -08010040 <_vfiprintf_r>: - 8010040: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} - 8010044: 460d mov r5, r1 - 8010046: 4614 mov r4, r2 - 8010048: 4698 mov r8, r3 - 801004a: 4606 mov r6, r0 - 801004c: b09d sub sp, #116 ; 0x74 - 801004e: b118 cbz r0, 8010058 <_vfiprintf_r+0x18> - 8010050: 6a03 ldr r3, [r0, #32] - 8010052: b90b cbnz r3, 8010058 <_vfiprintf_r+0x18> - 8010054: f7ff fd00 bl 800fa58 <__sinit> - 8010058: 6e6b ldr r3, [r5, #100] ; 0x64 - 801005a: 07d9 lsls r1, r3, #31 - 801005c: d405 bmi.n 801006a <_vfiprintf_r+0x2a> - 801005e: 89ab ldrh r3, [r5, #12] - 8010060: 059a lsls r2, r3, #22 - 8010062: d402 bmi.n 801006a <_vfiprintf_r+0x2a> - 8010064: 6da8 ldr r0, [r5, #88] ; 0x58 - 8010066: f7ff fe99 bl 800fd9c <__retarget_lock_acquire_recursive> - 801006a: 89ab ldrh r3, [r5, #12] - 801006c: 071b lsls r3, r3, #28 - 801006e: d501 bpl.n 8010074 <_vfiprintf_r+0x34> - 8010070: 692b ldr r3, [r5, #16] - 8010072: b99b cbnz r3, 801009c <_vfiprintf_r+0x5c> - 8010074: 4629 mov r1, r5 - 8010076: 4630 mov r0, r6 - 8010078: f7ff fdb6 bl 800fbe8 <__swsetup_r> - 801007c: b170 cbz r0, 801009c <_vfiprintf_r+0x5c> - 801007e: 6e6b ldr r3, [r5, #100] ; 0x64 - 8010080: 07dc lsls r4, r3, #31 - 8010082: d504 bpl.n 801008e <_vfiprintf_r+0x4e> - 8010084: f04f 30ff mov.w r0, #4294967295 - 8010088: b01d add sp, #116 ; 0x74 - 801008a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} - 801008e: 89ab ldrh r3, [r5, #12] - 8010090: 0598 lsls r0, r3, #22 - 8010092: d4f7 bmi.n 8010084 <_vfiprintf_r+0x44> - 8010094: 6da8 ldr r0, [r5, #88] ; 0x58 - 8010096: f7ff fe82 bl 800fd9e <__retarget_lock_release_recursive> - 801009a: e7f3 b.n 8010084 <_vfiprintf_r+0x44> - 801009c: 2300 movs r3, #0 - 801009e: 9309 str r3, [sp, #36] ; 0x24 - 80100a0: 2320 movs r3, #32 - 80100a2: f88d 3029 strb.w r3, [sp, #41] ; 0x29 - 80100a6: 2330 movs r3, #48 ; 0x30 - 80100a8: f04f 0901 mov.w r9, #1 - 80100ac: f8cd 800c str.w r8, [sp, #12] - 80100b0: f8df 81ac ldr.w r8, [pc, #428] ; 8010260 <_vfiprintf_r+0x220> - 80100b4: f88d 302a strb.w r3, [sp, #42] ; 0x2a - 80100b8: 4623 mov r3, r4 - 80100ba: 469a mov sl, r3 - 80100bc: f813 2b01 ldrb.w r2, [r3], #1 - 80100c0: b10a cbz r2, 80100c6 <_vfiprintf_r+0x86> - 80100c2: 2a25 cmp r2, #37 ; 0x25 - 80100c4: d1f9 bne.n 80100ba <_vfiprintf_r+0x7a> - 80100c6: ebba 0b04 subs.w fp, sl, r4 - 80100ca: d00b beq.n 80100e4 <_vfiprintf_r+0xa4> - 80100cc: 465b mov r3, fp - 80100ce: 4622 mov r2, r4 - 80100d0: 4629 mov r1, r5 - 80100d2: 4630 mov r0, r6 - 80100d4: f7ff ffa1 bl 801001a <__sfputs_r> - 80100d8: 3001 adds r0, #1 - 80100da: f000 80a9 beq.w 8010230 <_vfiprintf_r+0x1f0> - 80100de: 9a09 ldr r2, [sp, #36] ; 0x24 - 80100e0: 445a add r2, fp - 80100e2: 9209 str r2, [sp, #36] ; 0x24 - 80100e4: f89a 3000 ldrb.w r3, [sl] - 80100e8: 2b00 cmp r3, #0 - 80100ea: f000 80a1 beq.w 8010230 <_vfiprintf_r+0x1f0> - 80100ee: 2300 movs r3, #0 - 80100f0: f04f 32ff mov.w r2, #4294967295 - 80100f4: e9cd 2305 strd r2, r3, [sp, #20] - 80100f8: f10a 0a01 add.w sl, sl, #1 - 80100fc: 9304 str r3, [sp, #16] - 80100fe: 9307 str r3, [sp, #28] - 8010100: f88d 3053 strb.w r3, [sp, #83] ; 0x53 - 8010104: 931a str r3, [sp, #104] ; 0x68 - 8010106: 4654 mov r4, sl - 8010108: 2205 movs r2, #5 - 801010a: f814 1b01 ldrb.w r1, [r4], #1 - 801010e: 4854 ldr r0, [pc, #336] ; (8010260 <_vfiprintf_r+0x220>) - 8010110: f000 fb94 bl 801083c - 8010114: 9a04 ldr r2, [sp, #16] - 8010116: b9d8 cbnz r0, 8010150 <_vfiprintf_r+0x110> - 8010118: 06d1 lsls r1, r2, #27 - 801011a: bf44 itt mi - 801011c: 2320 movmi r3, #32 - 801011e: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53 - 8010122: 0713 lsls r3, r2, #28 - 8010124: bf44 itt mi - 8010126: 232b movmi r3, #43 ; 0x2b - 8010128: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53 - 801012c: f89a 3000 ldrb.w r3, [sl] - 8010130: 2b2a cmp r3, #42 ; 0x2a - 8010132: d015 beq.n 8010160 <_vfiprintf_r+0x120> - 8010134: 4654 mov r4, sl - 8010136: 2000 movs r0, #0 - 8010138: f04f 0c0a mov.w ip, #10 - 801013c: 9a07 ldr r2, [sp, #28] - 801013e: 4621 mov r1, r4 - 8010140: f811 3b01 ldrb.w r3, [r1], #1 - 8010144: 3b30 subs r3, #48 ; 0x30 - 8010146: 2b09 cmp r3, #9 - 8010148: d94d bls.n 80101e6 <_vfiprintf_r+0x1a6> - 801014a: b1b0 cbz r0, 801017a <_vfiprintf_r+0x13a> - 801014c: 9207 str r2, [sp, #28] - 801014e: e014 b.n 801017a <_vfiprintf_r+0x13a> - 8010150: eba0 0308 sub.w r3, r0, r8 - 8010154: fa09 f303 lsl.w r3, r9, r3 - 8010158: 4313 orrs r3, r2 - 801015a: 46a2 mov sl, r4 - 801015c: 9304 str r3, [sp, #16] - 801015e: e7d2 b.n 8010106 <_vfiprintf_r+0xc6> - 8010160: 9b03 ldr r3, [sp, #12] - 8010162: 1d19 adds r1, r3, #4 - 8010164: 681b ldr r3, [r3, #0] - 8010166: 9103 str r1, [sp, #12] - 8010168: 2b00 cmp r3, #0 - 801016a: bfbb ittet lt - 801016c: 425b neglt r3, r3 - 801016e: f042 0202 orrlt.w r2, r2, #2 - 8010172: 9307 strge r3, [sp, #28] - 8010174: 9307 strlt r3, [sp, #28] - 8010176: bfb8 it lt - 8010178: 9204 strlt r2, [sp, #16] - 801017a: 7823 ldrb r3, [r4, #0] - 801017c: 2b2e cmp r3, #46 ; 0x2e - 801017e: d10c bne.n 801019a <_vfiprintf_r+0x15a> - 8010180: 7863 ldrb r3, [r4, #1] - 8010182: 2b2a cmp r3, #42 ; 0x2a - 8010184: d134 bne.n 80101f0 <_vfiprintf_r+0x1b0> - 8010186: 9b03 ldr r3, [sp, #12] - 8010188: 3402 adds r4, #2 - 801018a: 1d1a adds r2, r3, #4 - 801018c: 681b ldr r3, [r3, #0] - 801018e: 9203 str r2, [sp, #12] - 8010190: 2b00 cmp r3, #0 - 8010192: bfb8 it lt - 8010194: f04f 33ff movlt.w r3, #4294967295 - 8010198: 9305 str r3, [sp, #20] - 801019a: f8df a0c8 ldr.w sl, [pc, #200] ; 8010264 <_vfiprintf_r+0x224> - 801019e: 2203 movs r2, #3 - 80101a0: 4650 mov r0, sl - 80101a2: 7821 ldrb r1, [r4, #0] - 80101a4: f000 fb4a bl 801083c - 80101a8: b138 cbz r0, 80101ba <_vfiprintf_r+0x17a> - 80101aa: 2240 movs r2, #64 ; 0x40 - 80101ac: 9b04 ldr r3, [sp, #16] - 80101ae: eba0 000a sub.w r0, r0, sl - 80101b2: 4082 lsls r2, r0 - 80101b4: 4313 orrs r3, r2 - 80101b6: 3401 adds r4, #1 - 80101b8: 9304 str r3, [sp, #16] - 80101ba: f814 1b01 ldrb.w r1, [r4], #1 - 80101be: 2206 movs r2, #6 - 80101c0: 4829 ldr r0, [pc, #164] ; (8010268 <_vfiprintf_r+0x228>) - 80101c2: f88d 1028 strb.w r1, [sp, #40] ; 0x28 - 80101c6: f000 fb39 bl 801083c - 80101ca: 2800 cmp r0, #0 - 80101cc: d03f beq.n 801024e <_vfiprintf_r+0x20e> - 80101ce: 4b27 ldr r3, [pc, #156] ; (801026c <_vfiprintf_r+0x22c>) - 80101d0: bb1b cbnz r3, 801021a <_vfiprintf_r+0x1da> - 80101d2: 9b03 ldr r3, [sp, #12] - 80101d4: 3307 adds r3, #7 - 80101d6: f023 0307 bic.w r3, r3, #7 - 80101da: 3308 adds r3, #8 - 80101dc: 9303 str r3, [sp, #12] - 80101de: 9b09 ldr r3, [sp, #36] ; 0x24 - 80101e0: 443b add r3, r7 - 80101e2: 9309 str r3, [sp, #36] ; 0x24 - 80101e4: e768 b.n 80100b8 <_vfiprintf_r+0x78> - 80101e6: 460c mov r4, r1 - 80101e8: 2001 movs r0, #1 - 80101ea: fb0c 3202 mla r2, ip, r2, r3 - 80101ee: e7a6 b.n 801013e <_vfiprintf_r+0xfe> - 80101f0: 2300 movs r3, #0 - 80101f2: f04f 0c0a mov.w ip, #10 - 80101f6: 4619 mov r1, r3 - 80101f8: 3401 adds r4, #1 - 80101fa: 9305 str r3, [sp, #20] - 80101fc: 4620 mov r0, r4 - 80101fe: f810 2b01 ldrb.w r2, [r0], #1 - 8010202: 3a30 subs r2, #48 ; 0x30 - 8010204: 2a09 cmp r2, #9 - 8010206: d903 bls.n 8010210 <_vfiprintf_r+0x1d0> - 8010208: 2b00 cmp r3, #0 - 801020a: d0c6 beq.n 801019a <_vfiprintf_r+0x15a> - 801020c: 9105 str r1, [sp, #20] - 801020e: e7c4 b.n 801019a <_vfiprintf_r+0x15a> - 8010210: 4604 mov r4, r0 - 8010212: 2301 movs r3, #1 - 8010214: fb0c 2101 mla r1, ip, r1, r2 - 8010218: e7f0 b.n 80101fc <_vfiprintf_r+0x1bc> - 801021a: ab03 add r3, sp, #12 - 801021c: 9300 str r3, [sp, #0] - 801021e: 462a mov r2, r5 - 8010220: 4630 mov r0, r6 - 8010222: 4b13 ldr r3, [pc, #76] ; (8010270 <_vfiprintf_r+0x230>) - 8010224: a904 add r1, sp, #16 - 8010226: f3af 8000 nop.w - 801022a: 4607 mov r7, r0 - 801022c: 1c78 adds r0, r7, #1 - 801022e: d1d6 bne.n 80101de <_vfiprintf_r+0x19e> - 8010230: 6e6b ldr r3, [r5, #100] ; 0x64 - 8010232: 07d9 lsls r1, r3, #31 - 8010234: d405 bmi.n 8010242 <_vfiprintf_r+0x202> - 8010236: 89ab ldrh r3, [r5, #12] - 8010238: 059a lsls r2, r3, #22 - 801023a: d402 bmi.n 8010242 <_vfiprintf_r+0x202> - 801023c: 6da8 ldr r0, [r5, #88] ; 0x58 - 801023e: f7ff fdae bl 800fd9e <__retarget_lock_release_recursive> - 8010242: 89ab ldrh r3, [r5, #12] - 8010244: 065b lsls r3, r3, #25 - 8010246: f53f af1d bmi.w 8010084 <_vfiprintf_r+0x44> - 801024a: 9809 ldr r0, [sp, #36] ; 0x24 - 801024c: e71c b.n 8010088 <_vfiprintf_r+0x48> - 801024e: ab03 add r3, sp, #12 - 8010250: 9300 str r3, [sp, #0] - 8010252: 462a mov r2, r5 - 8010254: 4630 mov r0, r6 - 8010256: 4b06 ldr r3, [pc, #24] ; (8010270 <_vfiprintf_r+0x230>) - 8010258: a904 add r1, sp, #16 - 801025a: f000 f87d bl 8010358 <_printf_i> - 801025e: e7e4 b.n 801022a <_vfiprintf_r+0x1ea> - 8010260: 08012c79 .word 0x08012c79 - 8010264: 08012c7f .word 0x08012c7f - 8010268: 08012c83 .word 0x08012c83 - 801026c: 00000000 .word 0x00000000 - 8010270: 0801001b .word 0x0801001b - -08010274 <_printf_common>: - 8010274: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} - 8010278: 4616 mov r6, r2 - 801027a: 4699 mov r9, r3 - 801027c: 688a ldr r2, [r1, #8] - 801027e: 690b ldr r3, [r1, #16] - 8010280: 4607 mov r7, r0 - 8010282: 4293 cmp r3, r2 - 8010284: bfb8 it lt - 8010286: 4613 movlt r3, r2 - 8010288: 6033 str r3, [r6, #0] - 801028a: f891 2043 ldrb.w r2, [r1, #67] ; 0x43 - 801028e: 460c mov r4, r1 - 8010290: f8dd 8020 ldr.w r8, [sp, #32] - 8010294: b10a cbz r2, 801029a <_printf_common+0x26> - 8010296: 3301 adds r3, #1 - 8010298: 6033 str r3, [r6, #0] - 801029a: 6823 ldr r3, [r4, #0] - 801029c: 0699 lsls r1, r3, #26 - 801029e: bf42 ittt mi - 80102a0: 6833 ldrmi r3, [r6, #0] - 80102a2: 3302 addmi r3, #2 - 80102a4: 6033 strmi r3, [r6, #0] - 80102a6: 6825 ldr r5, [r4, #0] - 80102a8: f015 0506 ands.w r5, r5, #6 - 80102ac: d106 bne.n 80102bc <_printf_common+0x48> - 80102ae: f104 0a19 add.w sl, r4, #25 - 80102b2: 68e3 ldr r3, [r4, #12] - 80102b4: 6832 ldr r2, [r6, #0] - 80102b6: 1a9b subs r3, r3, r2 - 80102b8: 42ab cmp r3, r5 - 80102ba: dc2b bgt.n 8010314 <_printf_common+0xa0> - 80102bc: f894 2043 ldrb.w r2, [r4, #67] ; 0x43 - 80102c0: 1e13 subs r3, r2, #0 - 80102c2: 6822 ldr r2, [r4, #0] - 80102c4: bf18 it ne - 80102c6: 2301 movne r3, #1 - 80102c8: 0692 lsls r2, r2, #26 - 80102ca: d430 bmi.n 801032e <_printf_common+0xba> - 80102cc: 4649 mov r1, r9 - 80102ce: 4638 mov r0, r7 - 80102d0: f104 0243 add.w r2, r4, #67 ; 0x43 - 80102d4: 47c0 blx r8 - 80102d6: 3001 adds r0, #1 - 80102d8: d023 beq.n 8010322 <_printf_common+0xae> - 80102da: 6823 ldr r3, [r4, #0] - 80102dc: 6922 ldr r2, [r4, #16] - 80102de: f003 0306 and.w r3, r3, #6 - 80102e2: 2b04 cmp r3, #4 - 80102e4: bf14 ite ne - 80102e6: 2500 movne r5, #0 - 80102e8: 6833 ldreq r3, [r6, #0] - 80102ea: f04f 0600 mov.w r6, #0 - 80102ee: bf08 it eq - 80102f0: 68e5 ldreq r5, [r4, #12] - 80102f2: f104 041a add.w r4, r4, #26 - 80102f6: bf08 it eq - 80102f8: 1aed subeq r5, r5, r3 - 80102fa: f854 3c12 ldr.w r3, [r4, #-18] - 80102fe: bf08 it eq - 8010300: ea25 75e5 biceq.w r5, r5, r5, asr #31 - 8010304: 4293 cmp r3, r2 - 8010306: bfc4 itt gt - 8010308: 1a9b subgt r3, r3, r2 - 801030a: 18ed addgt r5, r5, r3 - 801030c: 42b5 cmp r5, r6 - 801030e: d11a bne.n 8010346 <_printf_common+0xd2> - 8010310: 2000 movs r0, #0 - 8010312: e008 b.n 8010326 <_printf_common+0xb2> - 8010314: 2301 movs r3, #1 - 8010316: 4652 mov r2, sl - 8010318: 4649 mov r1, r9 - 801031a: 4638 mov r0, r7 - 801031c: 47c0 blx r8 - 801031e: 3001 adds r0, #1 - 8010320: d103 bne.n 801032a <_printf_common+0xb6> - 8010322: f04f 30ff mov.w r0, #4294967295 - 8010326: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} - 801032a: 3501 adds r5, #1 - 801032c: e7c1 b.n 80102b2 <_printf_common+0x3e> - 801032e: 2030 movs r0, #48 ; 0x30 - 8010330: 18e1 adds r1, r4, r3 - 8010332: f881 0043 strb.w r0, [r1, #67] ; 0x43 - 8010336: 1c5a adds r2, r3, #1 - 8010338: f894 1045 ldrb.w r1, [r4, #69] ; 0x45 - 801033c: 4422 add r2, r4 - 801033e: 3302 adds r3, #2 - 8010340: f882 1043 strb.w r1, [r2, #67] ; 0x43 - 8010344: e7c2 b.n 80102cc <_printf_common+0x58> - 8010346: 2301 movs r3, #1 - 8010348: 4622 mov r2, r4 - 801034a: 4649 mov r1, r9 - 801034c: 4638 mov r0, r7 - 801034e: 47c0 blx r8 - 8010350: 3001 adds r0, #1 - 8010352: d0e6 beq.n 8010322 <_printf_common+0xae> - 8010354: 3601 adds r6, #1 - 8010356: e7d9 b.n 801030c <_printf_common+0x98> - -08010358 <_printf_i>: - 8010358: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} - 801035c: 7e0f ldrb r7, [r1, #24] - 801035e: 4691 mov r9, r2 - 8010360: 2f78 cmp r7, #120 ; 0x78 - 8010362: 4680 mov r8, r0 - 8010364: 460c mov r4, r1 - 8010366: 469a mov sl, r3 - 8010368: 9d0c ldr r5, [sp, #48] ; 0x30 - 801036a: f101 0243 add.w r2, r1, #67 ; 0x43 - 801036e: d807 bhi.n 8010380 <_printf_i+0x28> - 8010370: 2f62 cmp r7, #98 ; 0x62 - 8010372: d80a bhi.n 801038a <_printf_i+0x32> - 8010374: 2f00 cmp r7, #0 - 8010376: f000 80d5 beq.w 8010524 <_printf_i+0x1cc> - 801037a: 2f58 cmp r7, #88 ; 0x58 - 801037c: f000 80c1 beq.w 8010502 <_printf_i+0x1aa> - 8010380: f104 0542 add.w r5, r4, #66 ; 0x42 - 8010384: f884 7042 strb.w r7, [r4, #66] ; 0x42 - 8010388: e03a b.n 8010400 <_printf_i+0xa8> - 801038a: f1a7 0363 sub.w r3, r7, #99 ; 0x63 - 801038e: 2b15 cmp r3, #21 - 8010390: d8f6 bhi.n 8010380 <_printf_i+0x28> - 8010392: a101 add r1, pc, #4 ; (adr r1, 8010398 <_printf_i+0x40>) - 8010394: f851 f023 ldr.w pc, [r1, r3, lsl #2] - 8010398: 080103f1 .word 0x080103f1 - 801039c: 08010405 .word 0x08010405 - 80103a0: 08010381 .word 0x08010381 - 80103a4: 08010381 .word 0x08010381 - 80103a8: 08010381 .word 0x08010381 - 80103ac: 08010381 .word 0x08010381 - 80103b0: 08010405 .word 0x08010405 - 80103b4: 08010381 .word 0x08010381 - 80103b8: 08010381 .word 0x08010381 - 80103bc: 08010381 .word 0x08010381 - 80103c0: 08010381 .word 0x08010381 - 80103c4: 0801050b .word 0x0801050b - 80103c8: 08010431 .word 0x08010431 - 80103cc: 080104c5 .word 0x080104c5 - 80103d0: 08010381 .word 0x08010381 - 80103d4: 08010381 .word 0x08010381 - 80103d8: 0801052d .word 0x0801052d - 80103dc: 08010381 .word 0x08010381 - 80103e0: 08010431 .word 0x08010431 - 80103e4: 08010381 .word 0x08010381 - 80103e8: 08010381 .word 0x08010381 - 80103ec: 080104cd .word 0x080104cd - 80103f0: 682b ldr r3, [r5, #0] - 80103f2: 1d1a adds r2, r3, #4 - 80103f4: 681b ldr r3, [r3, #0] - 80103f6: 602a str r2, [r5, #0] - 80103f8: f104 0542 add.w r5, r4, #66 ; 0x42 - 80103fc: f884 3042 strb.w r3, [r4, #66] ; 0x42 - 8010400: 2301 movs r3, #1 - 8010402: e0a0 b.n 8010546 <_printf_i+0x1ee> - 8010404: 6820 ldr r0, [r4, #0] - 8010406: 682b ldr r3, [r5, #0] - 8010408: 0607 lsls r7, r0, #24 - 801040a: f103 0104 add.w r1, r3, #4 - 801040e: 6029 str r1, [r5, #0] - 8010410: d501 bpl.n 8010416 <_printf_i+0xbe> - 8010412: 681e ldr r6, [r3, #0] - 8010414: e003 b.n 801041e <_printf_i+0xc6> - 8010416: 0646 lsls r6, r0, #25 - 8010418: d5fb bpl.n 8010412 <_printf_i+0xba> - 801041a: f9b3 6000 ldrsh.w r6, [r3] - 801041e: 2e00 cmp r6, #0 - 8010420: da03 bge.n 801042a <_printf_i+0xd2> - 8010422: 232d movs r3, #45 ; 0x2d - 8010424: 4276 negs r6, r6 - 8010426: f884 3043 strb.w r3, [r4, #67] ; 0x43 - 801042a: 230a movs r3, #10 - 801042c: 4859 ldr r0, [pc, #356] ; (8010594 <_printf_i+0x23c>) - 801042e: e012 b.n 8010456 <_printf_i+0xfe> - 8010430: 682b ldr r3, [r5, #0] - 8010432: 6820 ldr r0, [r4, #0] - 8010434: 1d19 adds r1, r3, #4 - 8010436: 6029 str r1, [r5, #0] - 8010438: 0605 lsls r5, r0, #24 - 801043a: d501 bpl.n 8010440 <_printf_i+0xe8> - 801043c: 681e ldr r6, [r3, #0] - 801043e: e002 b.n 8010446 <_printf_i+0xee> - 8010440: 0641 lsls r1, r0, #25 - 8010442: d5fb bpl.n 801043c <_printf_i+0xe4> - 8010444: 881e ldrh r6, [r3, #0] - 8010446: 2f6f cmp r7, #111 ; 0x6f - 8010448: bf0c ite eq - 801044a: 2308 moveq r3, #8 - 801044c: 230a movne r3, #10 - 801044e: 4851 ldr r0, [pc, #324] ; (8010594 <_printf_i+0x23c>) - 8010450: 2100 movs r1, #0 - 8010452: f884 1043 strb.w r1, [r4, #67] ; 0x43 - 8010456: 6865 ldr r5, [r4, #4] - 8010458: 2d00 cmp r5, #0 - 801045a: bfa8 it ge - 801045c: 6821 ldrge r1, [r4, #0] - 801045e: 60a5 str r5, [r4, #8] - 8010460: bfa4 itt ge - 8010462: f021 0104 bicge.w r1, r1, #4 - 8010466: 6021 strge r1, [r4, #0] - 8010468: b90e cbnz r6, 801046e <_printf_i+0x116> - 801046a: 2d00 cmp r5, #0 - 801046c: d04b beq.n 8010506 <_printf_i+0x1ae> - 801046e: 4615 mov r5, r2 - 8010470: fbb6 f1f3 udiv r1, r6, r3 - 8010474: fb03 6711 mls r7, r3, r1, r6 - 8010478: 5dc7 ldrb r7, [r0, r7] - 801047a: f805 7d01 strb.w r7, [r5, #-1]! - 801047e: 4637 mov r7, r6 - 8010480: 42bb cmp r3, r7 - 8010482: 460e mov r6, r1 - 8010484: d9f4 bls.n 8010470 <_printf_i+0x118> - 8010486: 2b08 cmp r3, #8 - 8010488: d10b bne.n 80104a2 <_printf_i+0x14a> - 801048a: 6823 ldr r3, [r4, #0] - 801048c: 07de lsls r6, r3, #31 - 801048e: d508 bpl.n 80104a2 <_printf_i+0x14a> - 8010490: 6923 ldr r3, [r4, #16] - 8010492: 6861 ldr r1, [r4, #4] - 8010494: 4299 cmp r1, r3 - 8010496: bfde ittt le - 8010498: 2330 movle r3, #48 ; 0x30 - 801049a: f805 3c01 strble.w r3, [r5, #-1] - 801049e: f105 35ff addle.w r5, r5, #4294967295 - 80104a2: 1b52 subs r2, r2, r5 - 80104a4: 6122 str r2, [r4, #16] - 80104a6: 464b mov r3, r9 - 80104a8: 4621 mov r1, r4 - 80104aa: 4640 mov r0, r8 - 80104ac: f8cd a000 str.w sl, [sp] - 80104b0: aa03 add r2, sp, #12 - 80104b2: f7ff fedf bl 8010274 <_printf_common> - 80104b6: 3001 adds r0, #1 - 80104b8: d14a bne.n 8010550 <_printf_i+0x1f8> - 80104ba: f04f 30ff mov.w r0, #4294967295 - 80104be: b004 add sp, #16 - 80104c0: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} - 80104c4: 6823 ldr r3, [r4, #0] - 80104c6: f043 0320 orr.w r3, r3, #32 - 80104ca: 6023 str r3, [r4, #0] - 80104cc: 2778 movs r7, #120 ; 0x78 - 80104ce: 4832 ldr r0, [pc, #200] ; (8010598 <_printf_i+0x240>) - 80104d0: f884 7045 strb.w r7, [r4, #69] ; 0x45 - 80104d4: 6823 ldr r3, [r4, #0] - 80104d6: 6829 ldr r1, [r5, #0] - 80104d8: 061f lsls r7, r3, #24 - 80104da: f851 6b04 ldr.w r6, [r1], #4 - 80104de: d402 bmi.n 80104e6 <_printf_i+0x18e> - 80104e0: 065f lsls r7, r3, #25 - 80104e2: bf48 it mi - 80104e4: b2b6 uxthmi r6, r6 - 80104e6: 07df lsls r7, r3, #31 - 80104e8: bf48 it mi - 80104ea: f043 0320 orrmi.w r3, r3, #32 - 80104ee: 6029 str r1, [r5, #0] - 80104f0: bf48 it mi - 80104f2: 6023 strmi r3, [r4, #0] - 80104f4: b91e cbnz r6, 80104fe <_printf_i+0x1a6> - 80104f6: 6823 ldr r3, [r4, #0] - 80104f8: f023 0320 bic.w r3, r3, #32 - 80104fc: 6023 str r3, [r4, #0] - 80104fe: 2310 movs r3, #16 - 8010500: e7a6 b.n 8010450 <_printf_i+0xf8> - 8010502: 4824 ldr r0, [pc, #144] ; (8010594 <_printf_i+0x23c>) - 8010504: e7e4 b.n 80104d0 <_printf_i+0x178> - 8010506: 4615 mov r5, r2 - 8010508: e7bd b.n 8010486 <_printf_i+0x12e> - 801050a: 682b ldr r3, [r5, #0] - 801050c: 6826 ldr r6, [r4, #0] - 801050e: 1d18 adds r0, r3, #4 - 8010510: 6961 ldr r1, [r4, #20] - 8010512: 6028 str r0, [r5, #0] - 8010514: 0635 lsls r5, r6, #24 - 8010516: 681b ldr r3, [r3, #0] - 8010518: d501 bpl.n 801051e <_printf_i+0x1c6> - 801051a: 6019 str r1, [r3, #0] - 801051c: e002 b.n 8010524 <_printf_i+0x1cc> - 801051e: 0670 lsls r0, r6, #25 - 8010520: d5fb bpl.n 801051a <_printf_i+0x1c2> - 8010522: 8019 strh r1, [r3, #0] - 8010524: 2300 movs r3, #0 - 8010526: 4615 mov r5, r2 - 8010528: 6123 str r3, [r4, #16] - 801052a: e7bc b.n 80104a6 <_printf_i+0x14e> - 801052c: 682b ldr r3, [r5, #0] - 801052e: 2100 movs r1, #0 - 8010530: 1d1a adds r2, r3, #4 - 8010532: 602a str r2, [r5, #0] - 8010534: 681d ldr r5, [r3, #0] - 8010536: 6862 ldr r2, [r4, #4] - 8010538: 4628 mov r0, r5 - 801053a: f000 f97f bl 801083c - 801053e: b108 cbz r0, 8010544 <_printf_i+0x1ec> - 8010540: 1b40 subs r0, r0, r5 - 8010542: 6060 str r0, [r4, #4] - 8010544: 6863 ldr r3, [r4, #4] - 8010546: 6123 str r3, [r4, #16] - 8010548: 2300 movs r3, #0 - 801054a: f884 3043 strb.w r3, [r4, #67] ; 0x43 - 801054e: e7aa b.n 80104a6 <_printf_i+0x14e> - 8010550: 462a mov r2, r5 - 8010552: 4649 mov r1, r9 - 8010554: 4640 mov r0, r8 - 8010556: 6923 ldr r3, [r4, #16] - 8010558: 47d0 blx sl - 801055a: 3001 adds r0, #1 - 801055c: d0ad beq.n 80104ba <_printf_i+0x162> - 801055e: 6823 ldr r3, [r4, #0] - 8010560: 079b lsls r3, r3, #30 - 8010562: d413 bmi.n 801058c <_printf_i+0x234> - 8010564: 68e0 ldr r0, [r4, #12] - 8010566: 9b03 ldr r3, [sp, #12] - 8010568: 4298 cmp r0, r3 - 801056a: bfb8 it lt - 801056c: 4618 movlt r0, r3 - 801056e: e7a6 b.n 80104be <_printf_i+0x166> - 8010570: 2301 movs r3, #1 - 8010572: 4632 mov r2, r6 - 8010574: 4649 mov r1, r9 - 8010576: 4640 mov r0, r8 - 8010578: 47d0 blx sl - 801057a: 3001 adds r0, #1 - 801057c: d09d beq.n 80104ba <_printf_i+0x162> - 801057e: 3501 adds r5, #1 - 8010580: 68e3 ldr r3, [r4, #12] - 8010582: 9903 ldr r1, [sp, #12] - 8010584: 1a5b subs r3, r3, r1 - 8010586: 42ab cmp r3, r5 - 8010588: dcf2 bgt.n 8010570 <_printf_i+0x218> - 801058a: e7eb b.n 8010564 <_printf_i+0x20c> - 801058c: 2500 movs r5, #0 - 801058e: f104 0619 add.w r6, r4, #25 - 8010592: e7f5 b.n 8010580 <_printf_i+0x228> - 8010594: 08012c8a .word 0x08012c8a - 8010598: 08012c9b .word 0x08012c9b - -0801059c <__sflush_r>: - 801059c: 898a ldrh r2, [r1, #12] - 801059e: b5f8 push {r3, r4, r5, r6, r7, lr} - 80105a0: 4605 mov r5, r0 - 80105a2: 0710 lsls r0, r2, #28 - 80105a4: 460c mov r4, r1 - 80105a6: d457 bmi.n 8010658 <__sflush_r+0xbc> - 80105a8: 684b ldr r3, [r1, #4] - 80105aa: 2b00 cmp r3, #0 - 80105ac: dc04 bgt.n 80105b8 <__sflush_r+0x1c> - 80105ae: 6c0b ldr r3, [r1, #64] ; 0x40 - 80105b0: 2b00 cmp r3, #0 - 80105b2: dc01 bgt.n 80105b8 <__sflush_r+0x1c> - 80105b4: 2000 movs r0, #0 - 80105b6: bdf8 pop {r3, r4, r5, r6, r7, pc} - 80105b8: 6ae6 ldr r6, [r4, #44] ; 0x2c - 80105ba: 2e00 cmp r6, #0 - 80105bc: d0fa beq.n 80105b4 <__sflush_r+0x18> - 80105be: 2300 movs r3, #0 - 80105c0: f412 5280 ands.w r2, r2, #4096 ; 0x1000 - 80105c4: 682f ldr r7, [r5, #0] - 80105c6: 6a21 ldr r1, [r4, #32] - 80105c8: 602b str r3, [r5, #0] - 80105ca: d032 beq.n 8010632 <__sflush_r+0x96> - 80105cc: 6d60 ldr r0, [r4, #84] ; 0x54 - 80105ce: 89a3 ldrh r3, [r4, #12] - 80105d0: 075a lsls r2, r3, #29 - 80105d2: d505 bpl.n 80105e0 <__sflush_r+0x44> - 80105d4: 6863 ldr r3, [r4, #4] - 80105d6: 1ac0 subs r0, r0, r3 - 80105d8: 6b63 ldr r3, [r4, #52] ; 0x34 - 80105da: b10b cbz r3, 80105e0 <__sflush_r+0x44> - 80105dc: 6c23 ldr r3, [r4, #64] ; 0x40 - 80105de: 1ac0 subs r0, r0, r3 - 80105e0: 2300 movs r3, #0 - 80105e2: 4602 mov r2, r0 - 80105e4: 6ae6 ldr r6, [r4, #44] ; 0x2c - 80105e6: 4628 mov r0, r5 - 80105e8: 6a21 ldr r1, [r4, #32] - 80105ea: 47b0 blx r6 - 80105ec: 1c43 adds r3, r0, #1 - 80105ee: 89a3 ldrh r3, [r4, #12] - 80105f0: d106 bne.n 8010600 <__sflush_r+0x64> - 80105f2: 6829 ldr r1, [r5, #0] - 80105f4: 291d cmp r1, #29 - 80105f6: d82b bhi.n 8010650 <__sflush_r+0xb4> - 80105f8: 4a28 ldr r2, [pc, #160] ; (801069c <__sflush_r+0x100>) - 80105fa: 410a asrs r2, r1 - 80105fc: 07d6 lsls r6, r2, #31 - 80105fe: d427 bmi.n 8010650 <__sflush_r+0xb4> - 8010600: 2200 movs r2, #0 - 8010602: 6062 str r2, [r4, #4] - 8010604: 6922 ldr r2, [r4, #16] - 8010606: 04d9 lsls r1, r3, #19 - 8010608: 6022 str r2, [r4, #0] - 801060a: d504 bpl.n 8010616 <__sflush_r+0x7a> - 801060c: 1c42 adds r2, r0, #1 - 801060e: d101 bne.n 8010614 <__sflush_r+0x78> - 8010610: 682b ldr r3, [r5, #0] - 8010612: b903 cbnz r3, 8010616 <__sflush_r+0x7a> - 8010614: 6560 str r0, [r4, #84] ; 0x54 - 8010616: 6b61 ldr r1, [r4, #52] ; 0x34 - 8010618: 602f str r7, [r5, #0] - 801061a: 2900 cmp r1, #0 - 801061c: d0ca beq.n 80105b4 <__sflush_r+0x18> - 801061e: f104 0344 add.w r3, r4, #68 ; 0x44 - 8010622: 4299 cmp r1, r3 - 8010624: d002 beq.n 801062c <__sflush_r+0x90> - 8010626: 4628 mov r0, r5 - 8010628: f7ff fbe6 bl 800fdf8 <_free_r> - 801062c: 2000 movs r0, #0 - 801062e: 6360 str r0, [r4, #52] ; 0x34 - 8010630: e7c1 b.n 80105b6 <__sflush_r+0x1a> - 8010632: 2301 movs r3, #1 - 8010634: 4628 mov r0, r5 - 8010636: 47b0 blx r6 - 8010638: 1c41 adds r1, r0, #1 - 801063a: d1c8 bne.n 80105ce <__sflush_r+0x32> - 801063c: 682b ldr r3, [r5, #0] - 801063e: 2b00 cmp r3, #0 - 8010640: d0c5 beq.n 80105ce <__sflush_r+0x32> - 8010642: 2b1d cmp r3, #29 - 8010644: d001 beq.n 801064a <__sflush_r+0xae> - 8010646: 2b16 cmp r3, #22 - 8010648: d101 bne.n 801064e <__sflush_r+0xb2> - 801064a: 602f str r7, [r5, #0] - 801064c: e7b2 b.n 80105b4 <__sflush_r+0x18> - 801064e: 89a3 ldrh r3, [r4, #12] - 8010650: f043 0340 orr.w r3, r3, #64 ; 0x40 - 8010654: 81a3 strh r3, [r4, #12] - 8010656: e7ae b.n 80105b6 <__sflush_r+0x1a> - 8010658: 690f ldr r7, [r1, #16] - 801065a: 2f00 cmp r7, #0 - 801065c: d0aa beq.n 80105b4 <__sflush_r+0x18> - 801065e: 0793 lsls r3, r2, #30 - 8010660: bf18 it ne - 8010662: 2300 movne r3, #0 - 8010664: 680e ldr r6, [r1, #0] - 8010666: bf08 it eq - 8010668: 694b ldreq r3, [r1, #20] - 801066a: 1bf6 subs r6, r6, r7 - 801066c: 600f str r7, [r1, #0] - 801066e: 608b str r3, [r1, #8] - 8010670: 2e00 cmp r6, #0 - 8010672: dd9f ble.n 80105b4 <__sflush_r+0x18> - 8010674: 4633 mov r3, r6 - 8010676: 463a mov r2, r7 - 8010678: 4628 mov r0, r5 - 801067a: 6a21 ldr r1, [r4, #32] - 801067c: f8d4 c028 ldr.w ip, [r4, #40] ; 0x28 - 8010680: 47e0 blx ip - 8010682: 2800 cmp r0, #0 - 8010684: dc06 bgt.n 8010694 <__sflush_r+0xf8> - 8010686: 89a3 ldrh r3, [r4, #12] - 8010688: f04f 30ff mov.w r0, #4294967295 - 801068c: f043 0340 orr.w r3, r3, #64 ; 0x40 - 8010690: 81a3 strh r3, [r4, #12] - 8010692: e790 b.n 80105b6 <__sflush_r+0x1a> - 8010694: 4407 add r7, r0 - 8010696: 1a36 subs r6, r6, r0 - 8010698: e7ea b.n 8010670 <__sflush_r+0xd4> - 801069a: bf00 nop - 801069c: dfbffffe .word 0xdfbffffe - -080106a0 <_fflush_r>: - 80106a0: b538 push {r3, r4, r5, lr} - 80106a2: 690b ldr r3, [r1, #16] - 80106a4: 4605 mov r5, r0 - 80106a6: 460c mov r4, r1 - 80106a8: b913 cbnz r3, 80106b0 <_fflush_r+0x10> - 80106aa: 2500 movs r5, #0 - 80106ac: 4628 mov r0, r5 - 80106ae: bd38 pop {r3, r4, r5, pc} - 80106b0: b118 cbz r0, 80106ba <_fflush_r+0x1a> - 80106b2: 6a03 ldr r3, [r0, #32] - 80106b4: b90b cbnz r3, 80106ba <_fflush_r+0x1a> - 80106b6: f7ff f9cf bl 800fa58 <__sinit> - 80106ba: f9b4 300c ldrsh.w r3, [r4, #12] - 80106be: 2b00 cmp r3, #0 - 80106c0: d0f3 beq.n 80106aa <_fflush_r+0xa> - 80106c2: 6e62 ldr r2, [r4, #100] ; 0x64 - 80106c4: 07d0 lsls r0, r2, #31 - 80106c6: d404 bmi.n 80106d2 <_fflush_r+0x32> - 80106c8: 0599 lsls r1, r3, #22 - 80106ca: d402 bmi.n 80106d2 <_fflush_r+0x32> - 80106cc: 6da0 ldr r0, [r4, #88] ; 0x58 - 80106ce: f7ff fb65 bl 800fd9c <__retarget_lock_acquire_recursive> - 80106d2: 4628 mov r0, r5 - 80106d4: 4621 mov r1, r4 - 80106d6: f7ff ff61 bl 801059c <__sflush_r> - 80106da: 6e63 ldr r3, [r4, #100] ; 0x64 - 80106dc: 4605 mov r5, r0 - 80106de: 07da lsls r2, r3, #31 - 80106e0: d4e4 bmi.n 80106ac <_fflush_r+0xc> - 80106e2: 89a3 ldrh r3, [r4, #12] - 80106e4: 059b lsls r3, r3, #22 - 80106e6: d4e1 bmi.n 80106ac <_fflush_r+0xc> - 80106e8: 6da0 ldr r0, [r4, #88] ; 0x58 - 80106ea: f7ff fb58 bl 800fd9e <__retarget_lock_release_recursive> - 80106ee: e7dd b.n 80106ac <_fflush_r+0xc> - -080106f0 : - 80106f0: b40e push {r1, r2, r3} - 80106f2: b503 push {r0, r1, lr} - 80106f4: 4601 mov r1, r0 - 80106f6: ab03 add r3, sp, #12 - 80106f8: 4805 ldr r0, [pc, #20] ; (8010710 ) - 80106fa: f853 2b04 ldr.w r2, [r3], #4 - 80106fe: 6800 ldr r0, [r0, #0] - 8010700: 9301 str r3, [sp, #4] - 8010702: f7ff fc9d bl 8010040 <_vfiprintf_r> - 8010706: b002 add sp, #8 - 8010708: f85d eb04 ldr.w lr, [sp], #4 - 801070c: b003 add sp, #12 - 801070e: 4770 bx lr - 8010710: 20000070 .word 0x20000070 - -08010714 <__swhatbuf_r>: - 8010714: b570 push {r4, r5, r6, lr} - 8010716: 460c mov r4, r1 - 8010718: f9b1 100e ldrsh.w r1, [r1, #14] - 801071c: 4615 mov r5, r2 - 801071e: 2900 cmp r1, #0 - 8010720: 461e mov r6, r3 - 8010722: b096 sub sp, #88 ; 0x58 - 8010724: da0c bge.n 8010740 <__swhatbuf_r+0x2c> - 8010726: 89a3 ldrh r3, [r4, #12] - 8010728: 2100 movs r1, #0 - 801072a: f013 0f80 tst.w r3, #128 ; 0x80 - 801072e: bf0c ite eq - 8010730: f44f 6380 moveq.w r3, #1024 ; 0x400 - 8010734: 2340 movne r3, #64 ; 0x40 - 8010736: 2000 movs r0, #0 - 8010738: 6031 str r1, [r6, #0] - 801073a: 602b str r3, [r5, #0] - 801073c: b016 add sp, #88 ; 0x58 - 801073e: bd70 pop {r4, r5, r6, pc} - 8010740: 466a mov r2, sp - 8010742: f000 f849 bl 80107d8 <_fstat_r> - 8010746: 2800 cmp r0, #0 - 8010748: dbed blt.n 8010726 <__swhatbuf_r+0x12> - 801074a: 9901 ldr r1, [sp, #4] - 801074c: f401 4170 and.w r1, r1, #61440 ; 0xf000 - 8010750: f5a1 5300 sub.w r3, r1, #8192 ; 0x2000 - 8010754: 4259 negs r1, r3 - 8010756: 4159 adcs r1, r3 - 8010758: f44f 6380 mov.w r3, #1024 ; 0x400 - 801075c: e7eb b.n 8010736 <__swhatbuf_r+0x22> - -0801075e <__smakebuf_r>: - 801075e: 898b ldrh r3, [r1, #12] - 8010760: b573 push {r0, r1, r4, r5, r6, lr} - 8010762: 079d lsls r5, r3, #30 - 8010764: 4606 mov r6, r0 - 8010766: 460c mov r4, r1 - 8010768: d507 bpl.n 801077a <__smakebuf_r+0x1c> - 801076a: f104 0347 add.w r3, r4, #71 ; 0x47 - 801076e: 6023 str r3, [r4, #0] - 8010770: 6123 str r3, [r4, #16] - 8010772: 2301 movs r3, #1 - 8010774: 6163 str r3, [r4, #20] - 8010776: b002 add sp, #8 - 8010778: bd70 pop {r4, r5, r6, pc} - 801077a: 466a mov r2, sp - 801077c: ab01 add r3, sp, #4 - 801077e: f7ff ffc9 bl 8010714 <__swhatbuf_r> - 8010782: 9900 ldr r1, [sp, #0] - 8010784: 4605 mov r5, r0 - 8010786: 4630 mov r0, r6 - 8010788: f7ff fba6 bl 800fed8 <_malloc_r> - 801078c: b948 cbnz r0, 80107a2 <__smakebuf_r+0x44> - 801078e: f9b4 300c ldrsh.w r3, [r4, #12] - 8010792: 059a lsls r2, r3, #22 - 8010794: d4ef bmi.n 8010776 <__smakebuf_r+0x18> - 8010796: f023 0303 bic.w r3, r3, #3 - 801079a: f043 0302 orr.w r3, r3, #2 - 801079e: 81a3 strh r3, [r4, #12] - 80107a0: e7e3 b.n 801076a <__smakebuf_r+0xc> - 80107a2: 89a3 ldrh r3, [r4, #12] - 80107a4: 6020 str r0, [r4, #0] - 80107a6: f043 0380 orr.w r3, r3, #128 ; 0x80 - 80107aa: 81a3 strh r3, [r4, #12] - 80107ac: 9b00 ldr r3, [sp, #0] - 80107ae: 6120 str r0, [r4, #16] - 80107b0: 6163 str r3, [r4, #20] - 80107b2: 9b01 ldr r3, [sp, #4] - 80107b4: b15b cbz r3, 80107ce <__smakebuf_r+0x70> - 80107b6: 4630 mov r0, r6 - 80107b8: f9b4 100e ldrsh.w r1, [r4, #14] - 80107bc: f000 f81e bl 80107fc <_isatty_r> - 80107c0: b128 cbz r0, 80107ce <__smakebuf_r+0x70> - 80107c2: 89a3 ldrh r3, [r4, #12] - 80107c4: f023 0303 bic.w r3, r3, #3 - 80107c8: f043 0301 orr.w r3, r3, #1 - 80107cc: 81a3 strh r3, [r4, #12] - 80107ce: 89a3 ldrh r3, [r4, #12] - 80107d0: 431d orrs r5, r3 - 80107d2: 81a5 strh r5, [r4, #12] - 80107d4: e7cf b.n 8010776 <__smakebuf_r+0x18> - ... - -080107d8 <_fstat_r>: - 80107d8: b538 push {r3, r4, r5, lr} - 80107da: 2300 movs r3, #0 - 80107dc: 4d06 ldr r5, [pc, #24] ; (80107f8 <_fstat_r+0x20>) - 80107de: 4604 mov r4, r0 - 80107e0: 4608 mov r0, r1 - 80107e2: 4611 mov r1, r2 - 80107e4: 602b str r3, [r5, #0] - 80107e6: f7f0 fbcb bl 8000f80 <_fstat> - 80107ea: 1c43 adds r3, r0, #1 - 80107ec: d102 bne.n 80107f4 <_fstat_r+0x1c> - 80107ee: 682b ldr r3, [r5, #0] - 80107f0: b103 cbz r3, 80107f4 <_fstat_r+0x1c> - 80107f2: 6023 str r3, [r4, #0] - 80107f4: bd38 pop {r3, r4, r5, pc} - 80107f6: bf00 nop - 80107f8: 20007030 .word 0x20007030 - -080107fc <_isatty_r>: - 80107fc: b538 push {r3, r4, r5, lr} - 80107fe: 2300 movs r3, #0 - 8010800: 4d05 ldr r5, [pc, #20] ; (8010818 <_isatty_r+0x1c>) - 8010802: 4604 mov r4, r0 - 8010804: 4608 mov r0, r1 - 8010806: 602b str r3, [r5, #0] - 8010808: f7f0 fbc9 bl 8000f9e <_isatty> - 801080c: 1c43 adds r3, r0, #1 - 801080e: d102 bne.n 8010816 <_isatty_r+0x1a> - 8010810: 682b ldr r3, [r5, #0] - 8010812: b103 cbz r3, 8010816 <_isatty_r+0x1a> - 8010814: 6023 str r3, [r4, #0] - 8010816: bd38 pop {r3, r4, r5, pc} - 8010818: 20007030 .word 0x20007030 - -0801081c <_sbrk_r>: - 801081c: b538 push {r3, r4, r5, lr} - 801081e: 2300 movs r3, #0 - 8010820: 4d05 ldr r5, [pc, #20] ; (8010838 <_sbrk_r+0x1c>) - 8010822: 4604 mov r4, r0 - 8010824: 4608 mov r0, r1 - 8010826: 602b str r3, [r5, #0] - 8010828: f7f0 fbd0 bl 8000fcc <_sbrk> - 801082c: 1c43 adds r3, r0, #1 - 801082e: d102 bne.n 8010836 <_sbrk_r+0x1a> - 8010830: 682b ldr r3, [r5, #0] - 8010832: b103 cbz r3, 8010836 <_sbrk_r+0x1a> - 8010834: 6023 str r3, [r4, #0] - 8010836: bd38 pop {r3, r4, r5, pc} - 8010838: 20007030 .word 0x20007030 - -0801083c : - 801083c: 4603 mov r3, r0 - 801083e: b510 push {r4, lr} - 8010840: b2c9 uxtb r1, r1 - 8010842: 4402 add r2, r0 - 8010844: 4293 cmp r3, r2 - 8010846: 4618 mov r0, r3 - 8010848: d101 bne.n 801084e - 801084a: 2000 movs r0, #0 - 801084c: e003 b.n 8010856 - 801084e: 7804 ldrb r4, [r0, #0] - 8010850: 3301 adds r3, #1 - 8010852: 428c cmp r4, r1 - 8010854: d1f6 bne.n 8010844 - 8010856: bd10 pop {r4, pc} - -08010858 : - 8010858: 2006 movs r0, #6 - 801085a: b508 push {r3, lr} - 801085c: f000 f82c bl 80108b8 - 8010860: 2001 movs r0, #1 - 8010862: f7f0 fb3f bl 8000ee4 <_exit> - -08010866 <_raise_r>: - 8010866: 291f cmp r1, #31 - 8010868: b538 push {r3, r4, r5, lr} - 801086a: 4604 mov r4, r0 - 801086c: 460d mov r5, r1 - 801086e: d904 bls.n 801087a <_raise_r+0x14> - 8010870: 2316 movs r3, #22 - 8010872: 6003 str r3, [r0, #0] - 8010874: f04f 30ff mov.w r0, #4294967295 - 8010878: bd38 pop {r3, r4, r5, pc} - 801087a: 6bc2 ldr r2, [r0, #60] ; 0x3c - 801087c: b112 cbz r2, 8010884 <_raise_r+0x1e> - 801087e: f852 3021 ldr.w r3, [r2, r1, lsl #2] - 8010882: b94b cbnz r3, 8010898 <_raise_r+0x32> - 8010884: 4620 mov r0, r4 - 8010886: f000 f831 bl 80108ec <_getpid_r> - 801088a: 462a mov r2, r5 - 801088c: 4601 mov r1, r0 - 801088e: 4620 mov r0, r4 - 8010890: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} - 8010894: f000 b818 b.w 80108c8 <_kill_r> - 8010898: 2b01 cmp r3, #1 - 801089a: d00a beq.n 80108b2 <_raise_r+0x4c> - 801089c: 1c59 adds r1, r3, #1 - 801089e: d103 bne.n 80108a8 <_raise_r+0x42> - 80108a0: 2316 movs r3, #22 - 80108a2: 6003 str r3, [r0, #0] - 80108a4: 2001 movs r0, #1 - 80108a6: e7e7 b.n 8010878 <_raise_r+0x12> - 80108a8: 2400 movs r4, #0 - 80108aa: 4628 mov r0, r5 - 80108ac: f842 4025 str.w r4, [r2, r5, lsl #2] - 80108b0: 4798 blx r3 - 80108b2: 2000 movs r0, #0 - 80108b4: e7e0 b.n 8010878 <_raise_r+0x12> - ... - -080108b8 : - 80108b8: 4b02 ldr r3, [pc, #8] ; (80108c4 ) - 80108ba: 4601 mov r1, r0 - 80108bc: 6818 ldr r0, [r3, #0] - 80108be: f7ff bfd2 b.w 8010866 <_raise_r> - 80108c2: bf00 nop - 80108c4: 20000070 .word 0x20000070 - -080108c8 <_kill_r>: - 80108c8: b538 push {r3, r4, r5, lr} - 80108ca: 2300 movs r3, #0 - 80108cc: 4d06 ldr r5, [pc, #24] ; (80108e8 <_kill_r+0x20>) - 80108ce: 4604 mov r4, r0 - 80108d0: 4608 mov r0, r1 - 80108d2: 4611 mov r1, r2 - 80108d4: 602b str r3, [r5, #0] - 80108d6: f7f0 faf3 bl 8000ec0 <_kill> - 80108da: 1c43 adds r3, r0, #1 - 80108dc: d102 bne.n 80108e4 <_kill_r+0x1c> - 80108de: 682b ldr r3, [r5, #0] - 80108e0: b103 cbz r3, 80108e4 <_kill_r+0x1c> - 80108e2: 6023 str r3, [r4, #0] - 80108e4: bd38 pop {r3, r4, r5, pc} - 80108e6: bf00 nop - 80108e8: 20007030 .word 0x20007030 - -080108ec <_getpid_r>: - 80108ec: f7f0 bae0 b.w 8000eb0 <_getpid> - -080108f0 <_init>: - 80108f0: b5f8 push {r3, r4, r5, r6, r7, lr} - 80108f2: bf00 nop - 80108f4: bcf8 pop {r3, r4, r5, r6, r7} - 80108f6: bc08 pop {r3} - 80108f8: 469e mov lr, r3 - 80108fa: 4770 bx lr - -080108fc <_fini>: - 80108fc: b5f8 push {r3, r4, r5, r6, r7, lr} - 80108fe: bf00 nop - 8010900: bcf8 pop {r3, r4, r5, r6, r7} - 8010902: bc08 pop {r3} - 8010904: 469e mov lr, r3 - 8010906: 4770 bx lr + +LightControlConvi_Nucleo207ZG.elf: file format elf32-littlearm + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .isr_vector 00000184 08000000 08000000 00010000 2**0 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 1 .text 00013b00 08000184 08000184 00010184 2**2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 2 .rodata 00002bd8 08013c84 08013c84 00023c84 2**2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 3 .ARM.extab 00000000 0801685c 0801685c 00030074 2**0 + CONTENTS + 4 .ARM 00000008 0801685c 0801685c 0002685c 2**2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 5 .preinit_array 00000000 08016864 08016864 00030074 2**0 + CONTENTS, ALLOC, LOAD, DATA + 6 .init_array 00000004 08016864 08016864 00026864 2**2 + CONTENTS, ALLOC, LOAD, DATA + 7 .fini_array 00000004 08016868 08016868 00026868 2**2 + CONTENTS, ALLOC, LOAD, DATA + 8 .data 00000074 20000000 0801686c 00030000 2**2 + CONTENTS, ALLOC, LOAD, DATA + 9 .bss 000071d0 20000074 080168e0 00030074 2**2 + ALLOC + 10 ._user_heap_stack 00000604 20007244 080168e0 00037244 2**0 + ALLOC + 11 .ARM.attributes 00000029 00000000 00000000 00030074 2**0 + CONTENTS, READONLY + 12 .comment 00000043 00000000 00000000 0003009d 2**0 + CONTENTS, READONLY + 13 .debug_info 00023c51 00000000 00000000 000300e0 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 14 .debug_abbrev 00005b39 00000000 00000000 00053d31 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 15 .debug_aranges 00001ba0 00000000 00000000 00059870 2**3 + CONTENTS, READONLY, DEBUGGING, OCTETS + 16 .debug_rnglists 00001601 00000000 00000000 0005b410 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 17 .debug_macro 0002d3de 00000000 00000000 0005ca11 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 18 .debug_line 0002e75e 00000000 00000000 00089def 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 19 .debug_str 000de13d 00000000 00000000 000b854d 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 20 .debug_frame 00007ce0 00000000 00000000 0019668c 2**2 + CONTENTS, READONLY, DEBUGGING, OCTETS + 21 .debug_line_str 0000007e 00000000 00000000 0019e36c 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + +Disassembly of section .text: + +08000184 <__do_global_dtors_aux>: + 8000184: b510 push {r4, lr} + 8000186: 4c05 ldr r4, [pc, #20] ; (800019c <__do_global_dtors_aux+0x18>) + 8000188: 7823 ldrb r3, [r4, #0] + 800018a: b933 cbnz r3, 800019a <__do_global_dtors_aux+0x16> + 800018c: 4b04 ldr r3, [pc, #16] ; (80001a0 <__do_global_dtors_aux+0x1c>) + 800018e: b113 cbz r3, 8000196 <__do_global_dtors_aux+0x12> + 8000190: 4804 ldr r0, [pc, #16] ; (80001a4 <__do_global_dtors_aux+0x20>) + 8000192: f3af 8000 nop.w + 8000196: 2301 movs r3, #1 + 8000198: 7023 strb r3, [r4, #0] + 800019a: bd10 pop {r4, pc} + 800019c: 20000074 .word 0x20000074 + 80001a0: 00000000 .word 0x00000000 + 80001a4: 08013c6c .word 0x08013c6c + +080001a8 : + 80001a8: b508 push {r3, lr} + 80001aa: 4b03 ldr r3, [pc, #12] ; (80001b8 ) + 80001ac: b11b cbz r3, 80001b6 + 80001ae: 4903 ldr r1, [pc, #12] ; (80001bc ) + 80001b0: 4803 ldr r0, [pc, #12] ; (80001c0 ) + 80001b2: f3af 8000 nop.w + 80001b6: bd08 pop {r3, pc} + 80001b8: 00000000 .word 0x00000000 + 80001bc: 20000078 .word 0x20000078 + 80001c0: 08013c6c .word 0x08013c6c + +080001c4 : + 80001c4: f810 2b01 ldrb.w r2, [r0], #1 + 80001c8: f811 3b01 ldrb.w r3, [r1], #1 + 80001cc: 2a01 cmp r2, #1 + 80001ce: bf28 it cs + 80001d0: 429a cmpcs r2, r3 + 80001d2: d0f7 beq.n 80001c4 + 80001d4: 1ad0 subs r0, r2, r3 + 80001d6: 4770 bx lr + +080001d8 : + 80001d8: 4603 mov r3, r0 + 80001da: f813 2b01 ldrb.w r2, [r3], #1 + 80001de: 2a00 cmp r2, #0 + 80001e0: d1fb bne.n 80001da + 80001e2: 1a18 subs r0, r3, r0 + 80001e4: 3801 subs r0, #1 + 80001e6: 4770 bx lr + +080001e8 <__aeabi_uldivmod>: + 80001e8: b953 cbnz r3, 8000200 <__aeabi_uldivmod+0x18> + 80001ea: b94a cbnz r2, 8000200 <__aeabi_uldivmod+0x18> + 80001ec: 2900 cmp r1, #0 + 80001ee: bf08 it eq + 80001f0: 2800 cmpeq r0, #0 + 80001f2: bf1c itt ne + 80001f4: f04f 31ff movne.w r1, #4294967295 + 80001f8: f04f 30ff movne.w r0, #4294967295 + 80001fc: f000 b972 b.w 80004e4 <__aeabi_idiv0> + 8000200: f1ad 0c08 sub.w ip, sp, #8 + 8000204: e96d ce04 strd ip, lr, [sp, #-16]! + 8000208: f000 f806 bl 8000218 <__udivmoddi4> + 800020c: f8dd e004 ldr.w lr, [sp, #4] + 8000210: e9dd 2302 ldrd r2, r3, [sp, #8] + 8000214: b004 add sp, #16 + 8000216: 4770 bx lr + +08000218 <__udivmoddi4>: + 8000218: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 800021c: 9e08 ldr r6, [sp, #32] + 800021e: 460d mov r5, r1 + 8000220: 4604 mov r4, r0 + 8000222: 468e mov lr, r1 + 8000224: 2b00 cmp r3, #0 + 8000226: d14c bne.n 80002c2 <__udivmoddi4+0xaa> + 8000228: 428a cmp r2, r1 + 800022a: 4694 mov ip, r2 + 800022c: d967 bls.n 80002fe <__udivmoddi4+0xe6> + 800022e: fab2 f382 clz r3, r2 + 8000232: b153 cbz r3, 800024a <__udivmoddi4+0x32> + 8000234: fa02 fc03 lsl.w ip, r2, r3 + 8000238: f1c3 0220 rsb r2, r3, #32 + 800023c: fa01 fe03 lsl.w lr, r1, r3 + 8000240: fa20 f202 lsr.w r2, r0, r2 + 8000244: ea42 0e0e orr.w lr, r2, lr + 8000248: 409c lsls r4, r3 + 800024a: ea4f 471c mov.w r7, ip, lsr #16 + 800024e: fbbe f1f7 udiv r1, lr, r7 + 8000252: fa1f f58c uxth.w r5, ip + 8000256: fb07 ee11 mls lr, r7, r1, lr + 800025a: fb01 f005 mul.w r0, r1, r5 + 800025e: 0c22 lsrs r2, r4, #16 + 8000260: ea42 420e orr.w r2, r2, lr, lsl #16 + 8000264: 4290 cmp r0, r2 + 8000266: d90a bls.n 800027e <__udivmoddi4+0x66> + 8000268: eb1c 0202 adds.w r2, ip, r2 + 800026c: f101 3eff add.w lr, r1, #4294967295 + 8000270: f080 8119 bcs.w 80004a6 <__udivmoddi4+0x28e> + 8000274: 4290 cmp r0, r2 + 8000276: f240 8116 bls.w 80004a6 <__udivmoddi4+0x28e> + 800027a: 3902 subs r1, #2 + 800027c: 4462 add r2, ip + 800027e: 1a12 subs r2, r2, r0 + 8000280: fbb2 f0f7 udiv r0, r2, r7 + 8000284: fb07 2210 mls r2, r7, r0, r2 + 8000288: fb00 f505 mul.w r5, r0, r5 + 800028c: b2a4 uxth r4, r4 + 800028e: ea44 4402 orr.w r4, r4, r2, lsl #16 + 8000292: 42a5 cmp r5, r4 + 8000294: d90a bls.n 80002ac <__udivmoddi4+0x94> + 8000296: eb1c 0404 adds.w r4, ip, r4 + 800029a: f100 32ff add.w r2, r0, #4294967295 + 800029e: f080 8104 bcs.w 80004aa <__udivmoddi4+0x292> + 80002a2: 42a5 cmp r5, r4 + 80002a4: f240 8101 bls.w 80004aa <__udivmoddi4+0x292> + 80002a8: 4464 add r4, ip + 80002aa: 3802 subs r0, #2 + 80002ac: ea40 4001 orr.w r0, r0, r1, lsl #16 + 80002b0: 2100 movs r1, #0 + 80002b2: 1b64 subs r4, r4, r5 + 80002b4: b11e cbz r6, 80002be <__udivmoddi4+0xa6> + 80002b6: 40dc lsrs r4, r3 + 80002b8: 2300 movs r3, #0 + 80002ba: e9c6 4300 strd r4, r3, [r6] + 80002be: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 80002c2: 428b cmp r3, r1 + 80002c4: d908 bls.n 80002d8 <__udivmoddi4+0xc0> + 80002c6: 2e00 cmp r6, #0 + 80002c8: f000 80ea beq.w 80004a0 <__udivmoddi4+0x288> + 80002cc: 2100 movs r1, #0 + 80002ce: e9c6 0500 strd r0, r5, [r6] + 80002d2: 4608 mov r0, r1 + 80002d4: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 80002d8: fab3 f183 clz r1, r3 + 80002dc: 2900 cmp r1, #0 + 80002de: d148 bne.n 8000372 <__udivmoddi4+0x15a> + 80002e0: 42ab cmp r3, r5 + 80002e2: d302 bcc.n 80002ea <__udivmoddi4+0xd2> + 80002e4: 4282 cmp r2, r0 + 80002e6: f200 80f8 bhi.w 80004da <__udivmoddi4+0x2c2> + 80002ea: 1a84 subs r4, r0, r2 + 80002ec: eb65 0203 sbc.w r2, r5, r3 + 80002f0: 2001 movs r0, #1 + 80002f2: 4696 mov lr, r2 + 80002f4: 2e00 cmp r6, #0 + 80002f6: d0e2 beq.n 80002be <__udivmoddi4+0xa6> + 80002f8: e9c6 4e00 strd r4, lr, [r6] + 80002fc: e7df b.n 80002be <__udivmoddi4+0xa6> + 80002fe: b902 cbnz r2, 8000302 <__udivmoddi4+0xea> + 8000300: deff udf #255 ; 0xff + 8000302: fab2 f382 clz r3, r2 + 8000306: 2b00 cmp r3, #0 + 8000308: f040 808e bne.w 8000428 <__udivmoddi4+0x210> + 800030c: 1a88 subs r0, r1, r2 + 800030e: 2101 movs r1, #1 + 8000310: 0c17 lsrs r7, r2, #16 + 8000312: fa1f fe82 uxth.w lr, r2 + 8000316: fbb0 f5f7 udiv r5, r0, r7 + 800031a: fb07 0015 mls r0, r7, r5, r0 + 800031e: 0c22 lsrs r2, r4, #16 + 8000320: ea42 4200 orr.w r2, r2, r0, lsl #16 + 8000324: fb0e f005 mul.w r0, lr, r5 + 8000328: 4290 cmp r0, r2 + 800032a: d908 bls.n 800033e <__udivmoddi4+0x126> + 800032c: eb1c 0202 adds.w r2, ip, r2 + 8000330: f105 38ff add.w r8, r5, #4294967295 + 8000334: d202 bcs.n 800033c <__udivmoddi4+0x124> + 8000336: 4290 cmp r0, r2 + 8000338: f200 80cc bhi.w 80004d4 <__udivmoddi4+0x2bc> + 800033c: 4645 mov r5, r8 + 800033e: 1a12 subs r2, r2, r0 + 8000340: fbb2 f0f7 udiv r0, r2, r7 + 8000344: fb07 2210 mls r2, r7, r0, r2 + 8000348: fb0e fe00 mul.w lr, lr, r0 + 800034c: b2a4 uxth r4, r4 + 800034e: ea44 4402 orr.w r4, r4, r2, lsl #16 + 8000352: 45a6 cmp lr, r4 + 8000354: d908 bls.n 8000368 <__udivmoddi4+0x150> + 8000356: eb1c 0404 adds.w r4, ip, r4 + 800035a: f100 32ff add.w r2, r0, #4294967295 + 800035e: d202 bcs.n 8000366 <__udivmoddi4+0x14e> + 8000360: 45a6 cmp lr, r4 + 8000362: f200 80b4 bhi.w 80004ce <__udivmoddi4+0x2b6> + 8000366: 4610 mov r0, r2 + 8000368: eba4 040e sub.w r4, r4, lr + 800036c: ea40 4005 orr.w r0, r0, r5, lsl #16 + 8000370: e7a0 b.n 80002b4 <__udivmoddi4+0x9c> + 8000372: f1c1 0720 rsb r7, r1, #32 + 8000376: 408b lsls r3, r1 + 8000378: fa22 fc07 lsr.w ip, r2, r7 + 800037c: ea4c 0c03 orr.w ip, ip, r3 + 8000380: fa25 fa07 lsr.w sl, r5, r7 + 8000384: ea4f 491c mov.w r9, ip, lsr #16 + 8000388: fbba f8f9 udiv r8, sl, r9 + 800038c: 408d lsls r5, r1 + 800038e: fa20 f307 lsr.w r3, r0, r7 + 8000392: fb09 aa18 mls sl, r9, r8, sl + 8000396: fa1f fe8c uxth.w lr, ip + 800039a: 432b orrs r3, r5 + 800039c: fa00 f501 lsl.w r5, r0, r1 + 80003a0: fb08 f00e mul.w r0, r8, lr + 80003a4: 0c1c lsrs r4, r3, #16 + 80003a6: ea44 440a orr.w r4, r4, sl, lsl #16 + 80003aa: 42a0 cmp r0, r4 + 80003ac: fa02 f201 lsl.w r2, r2, r1 + 80003b0: d90b bls.n 80003ca <__udivmoddi4+0x1b2> + 80003b2: eb1c 0404 adds.w r4, ip, r4 + 80003b6: f108 3aff add.w sl, r8, #4294967295 + 80003ba: f080 8086 bcs.w 80004ca <__udivmoddi4+0x2b2> + 80003be: 42a0 cmp r0, r4 + 80003c0: f240 8083 bls.w 80004ca <__udivmoddi4+0x2b2> + 80003c4: f1a8 0802 sub.w r8, r8, #2 + 80003c8: 4464 add r4, ip + 80003ca: 1a24 subs r4, r4, r0 + 80003cc: b298 uxth r0, r3 + 80003ce: fbb4 f3f9 udiv r3, r4, r9 + 80003d2: fb09 4413 mls r4, r9, r3, r4 + 80003d6: fb03 fe0e mul.w lr, r3, lr + 80003da: ea40 4404 orr.w r4, r0, r4, lsl #16 + 80003de: 45a6 cmp lr, r4 + 80003e0: d908 bls.n 80003f4 <__udivmoddi4+0x1dc> + 80003e2: eb1c 0404 adds.w r4, ip, r4 + 80003e6: f103 30ff add.w r0, r3, #4294967295 + 80003ea: d26a bcs.n 80004c2 <__udivmoddi4+0x2aa> + 80003ec: 45a6 cmp lr, r4 + 80003ee: d968 bls.n 80004c2 <__udivmoddi4+0x2aa> + 80003f0: 3b02 subs r3, #2 + 80003f2: 4464 add r4, ip + 80003f4: ea43 4008 orr.w r0, r3, r8, lsl #16 + 80003f8: fba0 9302 umull r9, r3, r0, r2 + 80003fc: eba4 040e sub.w r4, r4, lr + 8000400: 429c cmp r4, r3 + 8000402: 46c8 mov r8, r9 + 8000404: 469e mov lr, r3 + 8000406: d354 bcc.n 80004b2 <__udivmoddi4+0x29a> + 8000408: d051 beq.n 80004ae <__udivmoddi4+0x296> + 800040a: 2e00 cmp r6, #0 + 800040c: d067 beq.n 80004de <__udivmoddi4+0x2c6> + 800040e: ebb5 0308 subs.w r3, r5, r8 + 8000412: eb64 040e sbc.w r4, r4, lr + 8000416: 40cb lsrs r3, r1 + 8000418: fa04 f707 lsl.w r7, r4, r7 + 800041c: 431f orrs r7, r3 + 800041e: 40cc lsrs r4, r1 + 8000420: e9c6 7400 strd r7, r4, [r6] + 8000424: 2100 movs r1, #0 + 8000426: e74a b.n 80002be <__udivmoddi4+0xa6> + 8000428: fa02 fc03 lsl.w ip, r2, r3 + 800042c: f1c3 0020 rsb r0, r3, #32 + 8000430: 40c1 lsrs r1, r0 + 8000432: 409d lsls r5, r3 + 8000434: fa24 f000 lsr.w r0, r4, r0 + 8000438: ea4f 471c mov.w r7, ip, lsr #16 + 800043c: 4328 orrs r0, r5 + 800043e: fbb1 f5f7 udiv r5, r1, r7 + 8000442: fb07 1115 mls r1, r7, r5, r1 + 8000446: fa1f fe8c uxth.w lr, ip + 800044a: 0c02 lsrs r2, r0, #16 + 800044c: ea42 4201 orr.w r2, r2, r1, lsl #16 + 8000450: fb05 f10e mul.w r1, r5, lr + 8000454: 4291 cmp r1, r2 + 8000456: fa04 f403 lsl.w r4, r4, r3 + 800045a: d908 bls.n 800046e <__udivmoddi4+0x256> + 800045c: eb1c 0202 adds.w r2, ip, r2 + 8000460: f105 38ff add.w r8, r5, #4294967295 + 8000464: d22f bcs.n 80004c6 <__udivmoddi4+0x2ae> + 8000466: 4291 cmp r1, r2 + 8000468: d92d bls.n 80004c6 <__udivmoddi4+0x2ae> + 800046a: 3d02 subs r5, #2 + 800046c: 4462 add r2, ip + 800046e: 1a52 subs r2, r2, r1 + 8000470: fbb2 f1f7 udiv r1, r2, r7 + 8000474: fb07 2211 mls r2, r7, r1, r2 + 8000478: b280 uxth r0, r0 + 800047a: ea40 4002 orr.w r0, r0, r2, lsl #16 + 800047e: fb01 f20e mul.w r2, r1, lr + 8000482: 4282 cmp r2, r0 + 8000484: d908 bls.n 8000498 <__udivmoddi4+0x280> + 8000486: eb1c 0000 adds.w r0, ip, r0 + 800048a: f101 38ff add.w r8, r1, #4294967295 + 800048e: d216 bcs.n 80004be <__udivmoddi4+0x2a6> + 8000490: 4282 cmp r2, r0 + 8000492: d914 bls.n 80004be <__udivmoddi4+0x2a6> + 8000494: 3902 subs r1, #2 + 8000496: 4460 add r0, ip + 8000498: 1a80 subs r0, r0, r2 + 800049a: ea41 4105 orr.w r1, r1, r5, lsl #16 + 800049e: e73a b.n 8000316 <__udivmoddi4+0xfe> + 80004a0: 4631 mov r1, r6 + 80004a2: 4630 mov r0, r6 + 80004a4: e70b b.n 80002be <__udivmoddi4+0xa6> + 80004a6: 4671 mov r1, lr + 80004a8: e6e9 b.n 800027e <__udivmoddi4+0x66> + 80004aa: 4610 mov r0, r2 + 80004ac: e6fe b.n 80002ac <__udivmoddi4+0x94> + 80004ae: 454d cmp r5, r9 + 80004b0: d2ab bcs.n 800040a <__udivmoddi4+0x1f2> + 80004b2: ebb9 0802 subs.w r8, r9, r2 + 80004b6: eb63 0e0c sbc.w lr, r3, ip + 80004ba: 3801 subs r0, #1 + 80004bc: e7a5 b.n 800040a <__udivmoddi4+0x1f2> + 80004be: 4641 mov r1, r8 + 80004c0: e7ea b.n 8000498 <__udivmoddi4+0x280> + 80004c2: 4603 mov r3, r0 + 80004c4: e796 b.n 80003f4 <__udivmoddi4+0x1dc> + 80004c6: 4645 mov r5, r8 + 80004c8: e7d1 b.n 800046e <__udivmoddi4+0x256> + 80004ca: 46d0 mov r8, sl + 80004cc: e77d b.n 80003ca <__udivmoddi4+0x1b2> + 80004ce: 4464 add r4, ip + 80004d0: 3802 subs r0, #2 + 80004d2: e749 b.n 8000368 <__udivmoddi4+0x150> + 80004d4: 3d02 subs r5, #2 + 80004d6: 4462 add r2, ip + 80004d8: e731 b.n 800033e <__udivmoddi4+0x126> + 80004da: 4608 mov r0, r1 + 80004dc: e70a b.n 80002f4 <__udivmoddi4+0xdc> + 80004de: 4631 mov r1, r6 + 80004e0: e6ed b.n 80002be <__udivmoddi4+0xa6> + 80004e2: bf00 nop + +080004e4 <__aeabi_idiv0>: + 80004e4: 4770 bx lr + 80004e6: bf00 nop + +080004e8
: +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + 80004e8: b580 push {r7, lr} + 80004ea: af00 add r7, sp, #0 + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + 80004ec: f000 ffc4 bl 8001478 + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + 80004f0: f000 f8a8 bl 8000644 + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + 80004f4: f000 fad4 bl 8000aa0 + MX_USART3_UART_Init(); + 80004f8: f000 fa7e bl 80009f8 + MX_USB_OTG_FS_PCD_Init(); + 80004fc: f000 faa6 bl 8000a4c + MX_TIM1_Init(); + 8000500: f000 f8e8 bl 80006d4 + MX_TIM3_Init(); + 8000504: f000 f9aa bl 800085c + MX_TIM7_Init(); + 8000508: f000 fa40 bl 800098c + MX_LWIP_Init(); + 800050c: f004 fe52 bl 80051b4 + /* USER CODE BEGIN 2 */ + connected_U8 = 0; + 8000510: 4b43 ldr r3, [pc, #268] ; (8000620 ) + 8000512: 2200 movs r2, #0 + 8000514: 701a strb r2, [r3, #0] + //MQTTConnect(&mqtt_static_client); + HAL_TIM_PWM_Start_IT(&htim7, TIM_CHANNEL_1); + 8000516: 2100 movs r1, #0 + 8000518: 4842 ldr r0, [pc, #264] ; (8000624 ) + 800051a: f003 fa71 bl 8003a00 + __HAL_TIM_ENABLE_IT(&htim7, TIM_IT_UPDATE); + 800051e: 4b41 ldr r3, [pc, #260] ; (8000624 ) + 8000520: 681b ldr r3, [r3, #0] + 8000522: 68da ldr r2, [r3, #12] + 8000524: 4b3f ldr r3, [pc, #252] ; (8000624 ) + 8000526: 681b ldr r3, [r3, #0] + 8000528: f042 0201 orr.w r2, r2, #1 + 800052c: 60da str r2, [r3, #12] + MqttState_T = MQTT_STM_RESET; + 800052e: 4b3e ldr r3, [pc, #248] ; (8000628 ) + 8000530: 2200 movs r2, #0 + 8000532: 701a strb r2, [r3, #0] + connected_U8 = 1; + } + } + */ + + switch (MqttState_T) + 8000534: 4b3c ldr r3, [pc, #240] ; (8000628 ) + 8000536: 781b ldrb r3, [r3, #0] + 8000538: 2b06 cmp r3, #6 + 800053a: d848 bhi.n 80005ce + 800053c: a201 add r2, pc, #4 ; (adr r2, 8000544 ) + 800053e: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8000542: bf00 nop + 8000544: 08000561 .word 0x08000561 + 8000548: 08000569 .word 0x08000569 + 800054c: 08000579 .word 0x08000579 + 8000550: 08000587 .word 0x08000587 + 8000554: 0800059b .word 0x0800059b + 8000558: 080005a3 .word 0x080005a3 + 800055c: 080005c7 .word 0x080005c7 + { + case MQTT_STM_RESET: + MqttState_T = MQTT_STM_ETH_CONNECT; + 8000560: 4b31 ldr r3, [pc, #196] ; (8000628 ) + 8000562: 2201 movs r2, #1 + 8000564: 701a strb r2, [r3, #0] + break; + 8000566: e037 b.n 80005d8 + case MQTT_STM_ETH_CONNECT: + if (LwipConnectionStatus_T == LWIP_CONNECTED) + 8000568: 4b30 ldr r3, [pc, #192] ; (800062c ) + 800056a: 781b ldrb r3, [r3, #0] + 800056c: 2b01 cmp r3, #1 + 800056e: d130 bne.n 80005d2 + { + MqttState_T = MQTT_STM_ETH_CONNECTED; + 8000570: 4b2d ldr r3, [pc, #180] ; (8000628 ) + 8000572: 2202 movs r2, #2 + 8000574: 701a strb r2, [r3, #0] + } + break; + 8000576: e02c b.n 80005d2 + case MQTT_STM_ETH_CONNECTED: + //bsp_mqtt_init(); + MQTTConnect(&mqtt_static_client); + 8000578: 482d ldr r0, [pc, #180] ; (8000630 ) + 800057a: f000 fb4d bl 8000c18 + MqttState_T = MQTT_STM_BROKER_CONNECT; + 800057e: 4b2a ldr r3, [pc, #168] ; (8000628 ) + 8000580: 2203 movs r2, #3 + 8000582: 701a strb r2, [r3, #0] + break; + 8000584: e028 b.n 80005d8 + case MQTT_STM_BROKER_CONNECT: + if (mqtt_client_is_connected(&mqtt_static_client)) + 8000586: 482a ldr r0, [pc, #168] ; (8000630 ) + 8000588: f006 fd84 bl 8007094 + 800058c: 4603 mov r3, r0 + 800058e: 2b00 cmp r3, #0 + 8000590: d021 beq.n 80005d6 + { + MqttState_T = MQTT_STM_BROKER_CONNECTED; + 8000592: 4b25 ldr r3, [pc, #148] ; (8000628 ) + 8000594: 2204 movs r2, #4 + 8000596: 701a strb r2, [r3, #0] + } + break; + 8000598: e01d b.n 80005d6 + case MQTT_STM_BROKER_CONNECTED: + //bsp_mqtt_subscribe_topic("testflax"); // ~70us + MqttState_T = MQTT_STM_SUBSCRIBE; + 800059a: 4b23 ldr r3, [pc, #140] ; (8000628 ) + 800059c: 2205 movs r2, #5 + 800059e: 701a strb r2, [r3, #0] + break; + 80005a0: e01a b.n 80005d8 + case MQTT_STM_SUBSCRIBE: + for (cnt_u32 = 0; cnt_u32 < 10000000; cnt_u32++) + 80005a2: 4b24 ldr r3, [pc, #144] ; (8000634 ) + 80005a4: 2200 movs r2, #0 + 80005a6: 601a str r2, [r3, #0] + 80005a8: e007 b.n 80005ba + { // Wait for ~100ms + MqttState_T = MQTT_STM_SUBSCRIBED; + 80005aa: 4b1f ldr r3, [pc, #124] ; (8000628 ) + 80005ac: 2206 movs r2, #6 + 80005ae: 701a strb r2, [r3, #0] + for (cnt_u32 = 0; cnt_u32 < 10000000; cnt_u32++) + 80005b0: 4b20 ldr r3, [pc, #128] ; (8000634 ) + 80005b2: 681b ldr r3, [r3, #0] + 80005b4: 3301 adds r3, #1 + 80005b6: 4a1f ldr r2, [pc, #124] ; (8000634 ) + 80005b8: 6013 str r3, [r2, #0] + 80005ba: 4b1e ldr r3, [pc, #120] ; (8000634 ) + 80005bc: 681b ldr r3, [r3, #0] + 80005be: 4a1e ldr r2, [pc, #120] ; (8000638 ) + 80005c0: 4293 cmp r3, r2 + 80005c2: d3f2 bcc.n 80005aa + } + break; + 80005c4: e008 b.n 80005d8 + case MQTT_STM_SUBSCRIBED: + MqttState_T = MQTT_STM_READY; + 80005c6: 4b18 ldr r3, [pc, #96] ; (8000628 ) + 80005c8: 2207 movs r2, #7 + 80005ca: 701a strb r2, [r3, #0] + break; + 80005cc: e004 b.n 80005d8 + case MQTT_STM_READY: + default: + break; + 80005ce: bf00 nop + 80005d0: e002 b.n 80005d8 + break; + 80005d2: bf00 nop + 80005d4: e000 b.n 80005d8 + break; + 80005d6: bf00 nop + } + + if (MqttState_T == MQTT_STM_READY) + 80005d8: 4b13 ldr r3, [pc, #76] ; (8000628 ) + 80005da: 781b ldrb r3, [r3, #0] + 80005dc: 2b07 cmp r3, #7 + 80005de: d1a9 bne.n 8000534 + { + if ((HAL_GPIO_ReadPin(USER_Btn_GPIO_Port, USER_Btn_Pin) == GPIO_PIN_SET) && (lock_u8 == 0U)) + 80005e0: f44f 5100 mov.w r1, #8192 ; 0x2000 + 80005e4: 4815 ldr r0, [pc, #84] ; (800063c ) + 80005e6: f002 fb7d bl 8002ce4 + 80005ea: 4603 mov r3, r0 + 80005ec: 2b01 cmp r3, #1 + 80005ee: d10b bne.n 8000608 + 80005f0: 4b13 ldr r3, [pc, #76] ; (8000640 ) + 80005f2: 781b ldrb r3, [r3, #0] + 80005f4: 2b00 cmp r3, #0 + 80005f6: d107 bne.n 8000608 + { + lock_u8 = 1U; + 80005f8: 4b11 ldr r3, [pc, #68] ; (8000640 ) + 80005fa: 2201 movs r2, #1 + 80005fc: 701a strb r2, [r3, #0] + + //bsp_mqtt_send_message(message_test, sizeof(message_test)-1U); // ~12us + example_publish(&mqtt_static_client, 0); + 80005fe: 2100 movs r1, #0 + 8000600: 480b ldr r0, [pc, #44] ; (8000630 ) + 8000602: f000 fbfd bl 8000e00 + 8000606: e00a b.n 800061e + } + else if (HAL_GPIO_ReadPin(USER_Btn_GPIO_Port, USER_Btn_Pin) == GPIO_PIN_RESET) + 8000608: f44f 5100 mov.w r1, #8192 ; 0x2000 + 800060c: 480b ldr r0, [pc, #44] ; (800063c ) + 800060e: f002 fb69 bl 8002ce4 + 8000612: 4603 mov r3, r0 + 8000614: 2b00 cmp r3, #0 + 8000616: d18d bne.n 8000534 + { + lock_u8 = 0U; + 8000618: 4b09 ldr r3, [pc, #36] ; (8000640 ) + 800061a: 2200 movs r2, #0 + 800061c: 701a strb r2, [r3, #0] + switch (MqttState_T) + 800061e: e789 b.n 8000534 + 8000620: 200008a8 .word 0x200008a8 + 8000624: 20000120 .word 0x20000120 + 8000628: 200008a9 .word 0x200008a9 + 800062c: 200008bc .word 0x200008bc + 8000630: 200006b4 .word 0x200006b4 + 8000634: 200008ac .word 0x200008ac + 8000638: 00989680 .word 0x00989680 + 800063c: 40020800 .word 0x40020800 + 8000640: 200008b0 .word 0x200008b0 + +08000644 : +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + 8000644: b580 push {r7, lr} + 8000646: b092 sub sp, #72 ; 0x48 + 8000648: af00 add r7, sp, #0 + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + 800064a: f107 0318 add.w r3, r7, #24 + 800064e: 2230 movs r2, #48 ; 0x30 + 8000650: 2100 movs r1, #0 + 8000652: 4618 mov r0, r3 + 8000654: f012 fcec bl 8013030 + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + 8000658: 1d3b adds r3, r7, #4 + 800065a: 2200 movs r2, #0 + 800065c: 601a str r2, [r3, #0] + 800065e: 605a str r2, [r3, #4] + 8000660: 609a str r2, [r3, #8] + 8000662: 60da str r2, [r3, #12] + 8000664: 611a str r2, [r3, #16] + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; + 8000666: 2302 movs r3, #2 + 8000668: 61bb str r3, [r7, #24] + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + 800066a: 2301 movs r3, #1 + 800066c: 627b str r3, [r7, #36] ; 0x24 + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + 800066e: 2310 movs r3, #16 + 8000670: 62bb str r3, [r7, #40] ; 0x28 + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + 8000672: 2302 movs r3, #2 + 8000674: 633b str r3, [r7, #48] ; 0x30 + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; + 8000676: 2300 movs r3, #0 + 8000678: 637b str r3, [r7, #52] ; 0x34 + RCC_OscInitStruct.PLL.PLLM = 13; + 800067a: 230d movs r3, #13 + 800067c: 63bb str r3, [r7, #56] ; 0x38 + RCC_OscInitStruct.PLL.PLLN = 195; + 800067e: 23c3 movs r3, #195 ; 0xc3 + 8000680: 63fb str r3, [r7, #60] ; 0x3c + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + 8000682: 2302 movs r3, #2 + 8000684: 643b str r3, [r7, #64] ; 0x40 + RCC_OscInitStruct.PLL.PLLQ = 5; + 8000686: 2305 movs r3, #5 + 8000688: 647b str r3, [r7, #68] ; 0x44 + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + 800068a: f107 0318 add.w r3, r7, #24 + 800068e: 4618 mov r0, r3 + 8000690: f002 fc74 bl 8002f7c + 8000694: 4603 mov r3, r0 + 8000696: 2b00 cmp r3, #0 + 8000698: d001 beq.n 800069e + { + Error_Handler(); + 800069a: f000 fbfd bl 8000e98 + } + + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + 800069e: 230f movs r3, #15 + 80006a0: 607b str r3, [r7, #4] + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + 80006a2: 2302 movs r3, #2 + 80006a4: 60bb str r3, [r7, #8] + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + 80006a6: 2300 movs r3, #0 + 80006a8: 60fb str r3, [r7, #12] + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + 80006aa: f44f 53a0 mov.w r3, #5120 ; 0x1400 + 80006ae: 613b str r3, [r7, #16] + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + 80006b0: f44f 5380 mov.w r3, #4096 ; 0x1000 + 80006b4: 617b str r3, [r7, #20] + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) + 80006b6: 1d3b adds r3, r7, #4 + 80006b8: 2103 movs r1, #3 + 80006ba: 4618 mov r0, r3 + 80006bc: f002 feb2 bl 8003424 + 80006c0: 4603 mov r3, r0 + 80006c2: 2b00 cmp r3, #0 + 80006c4: d001 beq.n 80006ca + { + Error_Handler(); + 80006c6: f000 fbe7 bl 8000e98 + } +} + 80006ca: bf00 nop + 80006cc: 3748 adds r7, #72 ; 0x48 + 80006ce: 46bd mov sp, r7 + 80006d0: bd80 pop {r7, pc} + ... + +080006d4 : + * @brief TIM1 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM1_Init(void) +{ + 80006d4: b580 push {r7, lr} + 80006d6: b096 sub sp, #88 ; 0x58 + 80006d8: af00 add r7, sp, #0 + + /* USER CODE BEGIN TIM1_Init 0 */ + + /* USER CODE END TIM1_Init 0 */ + + TIM_ClockConfigTypeDef sClockSourceConfig = {0}; + 80006da: f107 0348 add.w r3, r7, #72 ; 0x48 + 80006de: 2200 movs r2, #0 + 80006e0: 601a str r2, [r3, #0] + 80006e2: 605a str r2, [r3, #4] + 80006e4: 609a str r2, [r3, #8] + 80006e6: 60da str r2, [r3, #12] + TIM_MasterConfigTypeDef sMasterConfig = {0}; + 80006e8: f107 0340 add.w r3, r7, #64 ; 0x40 + 80006ec: 2200 movs r2, #0 + 80006ee: 601a str r2, [r3, #0] + 80006f0: 605a str r2, [r3, #4] + TIM_OC_InitTypeDef sConfigOC = {0}; + 80006f2: f107 0324 add.w r3, r7, #36 ; 0x24 + 80006f6: 2200 movs r2, #0 + 80006f8: 601a str r2, [r3, #0] + 80006fa: 605a str r2, [r3, #4] + 80006fc: 609a str r2, [r3, #8] + 80006fe: 60da str r2, [r3, #12] + 8000700: 611a str r2, [r3, #16] + 8000702: 615a str r2, [r3, #20] + 8000704: 619a str r2, [r3, #24] + TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; + 8000706: 1d3b adds r3, r7, #4 + 8000708: 2220 movs r2, #32 + 800070a: 2100 movs r1, #0 + 800070c: 4618 mov r0, r3 + 800070e: f012 fc8f bl 8013030 + + /* USER CODE BEGIN TIM1_Init 1 */ + + /* USER CODE END TIM1_Init 1 */ + htim1.Instance = TIM1; + 8000712: 4b50 ldr r3, [pc, #320] ; (8000854 ) + 8000714: 4a50 ldr r2, [pc, #320] ; (8000858 ) + 8000716: 601a str r2, [r3, #0] + htim1.Init.Prescaler = 0; + 8000718: 4b4e ldr r3, [pc, #312] ; (8000854 ) + 800071a: 2200 movs r2, #0 + 800071c: 605a str r2, [r3, #4] + htim1.Init.CounterMode = TIM_COUNTERMODE_UP; + 800071e: 4b4d ldr r3, [pc, #308] ; (8000854 ) + 8000720: 2200 movs r2, #0 + 8000722: 609a str r2, [r3, #8] + htim1.Init.Period = 16383; + 8000724: 4b4b ldr r3, [pc, #300] ; (8000854 ) + 8000726: f643 72ff movw r2, #16383 ; 0x3fff + 800072a: 60da str r2, [r3, #12] + htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + 800072c: 4b49 ldr r3, [pc, #292] ; (8000854 ) + 800072e: 2200 movs r2, #0 + 8000730: 611a str r2, [r3, #16] + htim1.Init.RepetitionCounter = 0; + 8000732: 4b48 ldr r3, [pc, #288] ; (8000854 ) + 8000734: 2200 movs r2, #0 + 8000736: 615a str r2, [r3, #20] + htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + 8000738: 4b46 ldr r3, [pc, #280] ; (8000854 ) + 800073a: 2200 movs r2, #0 + 800073c: 619a str r2, [r3, #24] + if (HAL_TIM_Base_Init(&htim1) != HAL_OK) + 800073e: 4845 ldr r0, [pc, #276] ; (8000854 ) + 8000740: f003 f8b6 bl 80038b0 + 8000744: 4603 mov r3, r0 + 8000746: 2b00 cmp r3, #0 + 8000748: d001 beq.n 800074e + { + Error_Handler(); + 800074a: f000 fba5 bl 8000e98 + } + sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; + 800074e: f44f 5380 mov.w r3, #4096 ; 0x1000 + 8000752: 64bb str r3, [r7, #72] ; 0x48 + if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK) + 8000754: f107 0348 add.w r3, r7, #72 ; 0x48 + 8000758: 4619 mov r1, r3 + 800075a: 483e ldr r0, [pc, #248] ; (8000854 ) + 800075c: f003 fc30 bl 8003fc0 + 8000760: 4603 mov r3, r0 + 8000762: 2b00 cmp r3, #0 + 8000764: d001 beq.n 800076a + { + Error_Handler(); + 8000766: f000 fb97 bl 8000e98 + } + if (HAL_TIM_PWM_Init(&htim1) != HAL_OK) + 800076a: 483a ldr r0, [pc, #232] ; (8000854 ) + 800076c: f003 f8ef bl 800394e + 8000770: 4603 mov r3, r0 + 8000772: 2b00 cmp r3, #0 + 8000774: d001 beq.n 800077a + { + Error_Handler(); + 8000776: f000 fb8f bl 8000e98 + } + sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; + 800077a: 2300 movs r3, #0 + 800077c: 643b str r3, [r7, #64] ; 0x40 + sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; + 800077e: 2300 movs r3, #0 + 8000780: 647b str r3, [r7, #68] ; 0x44 + if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) + 8000782: f107 0340 add.w r3, r7, #64 ; 0x40 + 8000786: 4619 mov r1, r3 + 8000788: 4832 ldr r0, [pc, #200] ; (8000854 ) + 800078a: f004 f811 bl 80047b0 + 800078e: 4603 mov r3, r0 + 8000790: 2b00 cmp r3, #0 + 8000792: d001 beq.n 8000798 + { + Error_Handler(); + 8000794: f000 fb80 bl 8000e98 + } + sConfigOC.OCMode = TIM_OCMODE_PWM1; + 8000798: 2360 movs r3, #96 ; 0x60 + 800079a: 627b str r3, [r7, #36] ; 0x24 + sConfigOC.Pulse = 0; + 800079c: 2300 movs r3, #0 + 800079e: 62bb str r3, [r7, #40] ; 0x28 + sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; + 80007a0: 2300 movs r3, #0 + 80007a2: 62fb str r3, [r7, #44] ; 0x2c + sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH; + 80007a4: 2300 movs r3, #0 + 80007a6: 633b str r3, [r7, #48] ; 0x30 + sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; + 80007a8: 2300 movs r3, #0 + 80007aa: 637b str r3, [r7, #52] ; 0x34 + sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET; + 80007ac: 2300 movs r3, #0 + 80007ae: 63bb str r3, [r7, #56] ; 0x38 + sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET; + 80007b0: 2300 movs r3, #0 + 80007b2: 63fb str r3, [r7, #60] ; 0x3c + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) + 80007b4: f107 0324 add.w r3, r7, #36 ; 0x24 + 80007b8: 2200 movs r2, #0 + 80007ba: 4619 mov r1, r3 + 80007bc: 4825 ldr r0, [pc, #148] ; (8000854 ) + 80007be: f003 fb3d bl 8003e3c + 80007c2: 4603 mov r3, r0 + 80007c4: 2b00 cmp r3, #0 + 80007c6: d001 beq.n 80007cc + { + Error_Handler(); + 80007c8: f000 fb66 bl 8000e98 + } + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) + 80007cc: f107 0324 add.w r3, r7, #36 ; 0x24 + 80007d0: 2204 movs r2, #4 + 80007d2: 4619 mov r1, r3 + 80007d4: 481f ldr r0, [pc, #124] ; (8000854 ) + 80007d6: f003 fb31 bl 8003e3c + 80007da: 4603 mov r3, r0 + 80007dc: 2b00 cmp r3, #0 + 80007de: d001 beq.n 80007e4 + { + Error_Handler(); + 80007e0: f000 fb5a bl 8000e98 + } + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) + 80007e4: f107 0324 add.w r3, r7, #36 ; 0x24 + 80007e8: 2208 movs r2, #8 + 80007ea: 4619 mov r1, r3 + 80007ec: 4819 ldr r0, [pc, #100] ; (8000854 ) + 80007ee: f003 fb25 bl 8003e3c + 80007f2: 4603 mov r3, r0 + 80007f4: 2b00 cmp r3, #0 + 80007f6: d001 beq.n 80007fc + { + Error_Handler(); + 80007f8: f000 fb4e bl 8000e98 + } + if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) + 80007fc: f107 0324 add.w r3, r7, #36 ; 0x24 + 8000800: 220c movs r2, #12 + 8000802: 4619 mov r1, r3 + 8000804: 4813 ldr r0, [pc, #76] ; (8000854 ) + 8000806: f003 fb19 bl 8003e3c + 800080a: 4603 mov r3, r0 + 800080c: 2b00 cmp r3, #0 + 800080e: d001 beq.n 8000814 + { + Error_Handler(); + 8000810: f000 fb42 bl 8000e98 + } + sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; + 8000814: 2300 movs r3, #0 + 8000816: 607b str r3, [r7, #4] + sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; + 8000818: 2300 movs r3, #0 + 800081a: 60bb str r3, [r7, #8] + sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; + 800081c: 2300 movs r3, #0 + 800081e: 60fb str r3, [r7, #12] + sBreakDeadTimeConfig.DeadTime = 0; + 8000820: 2300 movs r3, #0 + 8000822: 613b str r3, [r7, #16] + sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; + 8000824: 2300 movs r3, #0 + 8000826: 617b str r3, [r7, #20] + sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; + 8000828: f44f 5300 mov.w r3, #8192 ; 0x2000 + 800082c: 61bb str r3, [r7, #24] + sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; + 800082e: 2300 movs r3, #0 + 8000830: 623b str r3, [r7, #32] + if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK) + 8000832: 1d3b adds r3, r7, #4 + 8000834: 4619 mov r1, r3 + 8000836: 4807 ldr r0, [pc, #28] ; (8000854 ) + 8000838: f004 f834 bl 80048a4 + 800083c: 4603 mov r3, r0 + 800083e: 2b00 cmp r3, #0 + 8000840: d001 beq.n 8000846 + { + Error_Handler(); + 8000842: f000 fb29 bl 8000e98 + } + /* USER CODE BEGIN TIM1_Init 2 */ + + /* USER CODE END TIM1_Init 2 */ + HAL_TIM_MspPostInit(&htim1); + 8000846: 4803 ldr r0, [pc, #12] ; (8000854 ) + 8000848: f000 fba6 bl 8000f98 + +} + 800084c: bf00 nop + 800084e: 3758 adds r7, #88 ; 0x58 + 8000850: 46bd mov sp, r7 + 8000852: bd80 pop {r7, pc} + 8000854: 20000090 .word 0x20000090 + 8000858: 40010000 .word 0x40010000 + +0800085c : + * @brief TIM3 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM3_Init(void) +{ + 800085c: b580 push {r7, lr} + 800085e: b08e sub sp, #56 ; 0x38 + 8000860: af00 add r7, sp, #0 + + /* USER CODE BEGIN TIM3_Init 0 */ + + /* USER CODE END TIM3_Init 0 */ + + TIM_ClockConfigTypeDef sClockSourceConfig = {0}; + 8000862: f107 0328 add.w r3, r7, #40 ; 0x28 + 8000866: 2200 movs r2, #0 + 8000868: 601a str r2, [r3, #0] + 800086a: 605a str r2, [r3, #4] + 800086c: 609a str r2, [r3, #8] + 800086e: 60da str r2, [r3, #12] + TIM_MasterConfigTypeDef sMasterConfig = {0}; + 8000870: f107 0320 add.w r3, r7, #32 + 8000874: 2200 movs r2, #0 + 8000876: 601a str r2, [r3, #0] + 8000878: 605a str r2, [r3, #4] + TIM_OC_InitTypeDef sConfigOC = {0}; + 800087a: 1d3b adds r3, r7, #4 + 800087c: 2200 movs r2, #0 + 800087e: 601a str r2, [r3, #0] + 8000880: 605a str r2, [r3, #4] + 8000882: 609a str r2, [r3, #8] + 8000884: 60da str r2, [r3, #12] + 8000886: 611a str r2, [r3, #16] + 8000888: 615a str r2, [r3, #20] + 800088a: 619a str r2, [r3, #24] + + /* USER CODE BEGIN TIM3_Init 1 */ + + /* USER CODE END TIM3_Init 1 */ + htim3.Instance = TIM3; + 800088c: 4b3d ldr r3, [pc, #244] ; (8000984 ) + 800088e: 4a3e ldr r2, [pc, #248] ; (8000988 ) + 8000890: 601a str r2, [r3, #0] + htim3.Init.Prescaler = 0; + 8000892: 4b3c ldr r3, [pc, #240] ; (8000984 ) + 8000894: 2200 movs r2, #0 + 8000896: 605a str r2, [r3, #4] + htim3.Init.CounterMode = TIM_COUNTERMODE_UP; + 8000898: 4b3a ldr r3, [pc, #232] ; (8000984 ) + 800089a: 2200 movs r2, #0 + 800089c: 609a str r2, [r3, #8] + htim3.Init.Period = 16383; + 800089e: 4b39 ldr r3, [pc, #228] ; (8000984 ) + 80008a0: f643 72ff movw r2, #16383 ; 0x3fff + 80008a4: 60da str r2, [r3, #12] + htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; + 80008a6: 4b37 ldr r3, [pc, #220] ; (8000984 ) + 80008a8: 2200 movs r2, #0 + 80008aa: 611a str r2, [r3, #16] + htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + 80008ac: 4b35 ldr r3, [pc, #212] ; (8000984 ) + 80008ae: 2200 movs r2, #0 + 80008b0: 619a str r2, [r3, #24] + if (HAL_TIM_Base_Init(&htim3) != HAL_OK) + 80008b2: 4834 ldr r0, [pc, #208] ; (8000984 ) + 80008b4: f002 fffc bl 80038b0 + 80008b8: 4603 mov r3, r0 + 80008ba: 2b00 cmp r3, #0 + 80008bc: d001 beq.n 80008c2 + { + Error_Handler(); + 80008be: f000 faeb bl 8000e98 + } + sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; + 80008c2: f44f 5380 mov.w r3, #4096 ; 0x1000 + 80008c6: 62bb str r3, [r7, #40] ; 0x28 + if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK) + 80008c8: f107 0328 add.w r3, r7, #40 ; 0x28 + 80008cc: 4619 mov r1, r3 + 80008ce: 482d ldr r0, [pc, #180] ; (8000984 ) + 80008d0: f003 fb76 bl 8003fc0 + 80008d4: 4603 mov r3, r0 + 80008d6: 2b00 cmp r3, #0 + 80008d8: d001 beq.n 80008de + { + Error_Handler(); + 80008da: f000 fadd bl 8000e98 + } + if (HAL_TIM_PWM_Init(&htim3) != HAL_OK) + 80008de: 4829 ldr r0, [pc, #164] ; (8000984 ) + 80008e0: f003 f835 bl 800394e + 80008e4: 4603 mov r3, r0 + 80008e6: 2b00 cmp r3, #0 + 80008e8: d001 beq.n 80008ee + { + Error_Handler(); + 80008ea: f000 fad5 bl 8000e98 + } + sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; + 80008ee: 2300 movs r3, #0 + 80008f0: 623b str r3, [r7, #32] + sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; + 80008f2: 2300 movs r3, #0 + 80008f4: 627b str r3, [r7, #36] ; 0x24 + if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK) + 80008f6: f107 0320 add.w r3, r7, #32 + 80008fa: 4619 mov r1, r3 + 80008fc: 4821 ldr r0, [pc, #132] ; (8000984 ) + 80008fe: f003 ff57 bl 80047b0 + 8000902: 4603 mov r3, r0 + 8000904: 2b00 cmp r3, #0 + 8000906: d001 beq.n 800090c + { + Error_Handler(); + 8000908: f000 fac6 bl 8000e98 + } + sConfigOC.OCMode = TIM_OCMODE_PWM1; + 800090c: 2360 movs r3, #96 ; 0x60 + 800090e: 607b str r3, [r7, #4] + sConfigOC.Pulse = 0; + 8000910: 2300 movs r3, #0 + 8000912: 60bb str r3, [r7, #8] + sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; + 8000914: 2300 movs r3, #0 + 8000916: 60fb str r3, [r7, #12] + sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; + 8000918: 2300 movs r3, #0 + 800091a: 617b str r3, [r7, #20] + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1) != HAL_OK) + 800091c: 1d3b adds r3, r7, #4 + 800091e: 2200 movs r2, #0 + 8000920: 4619 mov r1, r3 + 8000922: 4818 ldr r0, [pc, #96] ; (8000984 ) + 8000924: f003 fa8a bl 8003e3c + 8000928: 4603 mov r3, r0 + 800092a: 2b00 cmp r3, #0 + 800092c: d001 beq.n 8000932 + { + Error_Handler(); + 800092e: f000 fab3 bl 8000e98 + } + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2) != HAL_OK) + 8000932: 1d3b adds r3, r7, #4 + 8000934: 2204 movs r2, #4 + 8000936: 4619 mov r1, r3 + 8000938: 4812 ldr r0, [pc, #72] ; (8000984 ) + 800093a: f003 fa7f bl 8003e3c + 800093e: 4603 mov r3, r0 + 8000940: 2b00 cmp r3, #0 + 8000942: d001 beq.n 8000948 + { + Error_Handler(); + 8000944: f000 faa8 bl 8000e98 + } + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3) != HAL_OK) + 8000948: 1d3b adds r3, r7, #4 + 800094a: 2208 movs r2, #8 + 800094c: 4619 mov r1, r3 + 800094e: 480d ldr r0, [pc, #52] ; (8000984 ) + 8000950: f003 fa74 bl 8003e3c + 8000954: 4603 mov r3, r0 + 8000956: 2b00 cmp r3, #0 + 8000958: d001 beq.n 800095e + { + Error_Handler(); + 800095a: f000 fa9d bl 8000e98 + } + if (HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_4) != HAL_OK) + 800095e: 1d3b adds r3, r7, #4 + 8000960: 220c movs r2, #12 + 8000962: 4619 mov r1, r3 + 8000964: 4807 ldr r0, [pc, #28] ; (8000984 ) + 8000966: f003 fa69 bl 8003e3c + 800096a: 4603 mov r3, r0 + 800096c: 2b00 cmp r3, #0 + 800096e: d001 beq.n 8000974 + { + Error_Handler(); + 8000970: f000 fa92 bl 8000e98 + } + /* USER CODE BEGIN TIM3_Init 2 */ + + /* USER CODE END TIM3_Init 2 */ + HAL_TIM_MspPostInit(&htim3); + 8000974: 4803 ldr r0, [pc, #12] ; (8000984 ) + 8000976: f000 fb0f bl 8000f98 + +} + 800097a: bf00 nop + 800097c: 3738 adds r7, #56 ; 0x38 + 800097e: 46bd mov sp, r7 + 8000980: bd80 pop {r7, pc} + 8000982: bf00 nop + 8000984: 200000d8 .word 0x200000d8 + 8000988: 40000400 .word 0x40000400 + +0800098c : + * @brief TIM7 Initialization Function + * @param None + * @retval None + */ +static void MX_TIM7_Init(void) +{ + 800098c: b580 push {r7, lr} + 800098e: b082 sub sp, #8 + 8000990: af00 add r7, sp, #0 + + /* USER CODE BEGIN TIM7_Init 0 */ + + /* USER CODE END TIM7_Init 0 */ + + TIM_MasterConfigTypeDef sMasterConfig = {0}; + 8000992: 463b mov r3, r7 + 8000994: 2200 movs r2, #0 + 8000996: 601a str r2, [r3, #0] + 8000998: 605a str r2, [r3, #4] + + /* USER CODE BEGIN TIM7_Init 1 */ + + /* USER CODE END TIM7_Init 1 */ + htim7.Instance = TIM7; + 800099a: 4b15 ldr r3, [pc, #84] ; (80009f0 ) + 800099c: 4a15 ldr r2, [pc, #84] ; (80009f4 ) + 800099e: 601a str r2, [r3, #0] + htim7.Init.Prescaler = 120; + 80009a0: 4b13 ldr r3, [pc, #76] ; (80009f0 ) + 80009a2: 2278 movs r2, #120 ; 0x78 + 80009a4: 605a str r2, [r3, #4] + htim7.Init.CounterMode = TIM_COUNTERMODE_UP; + 80009a6: 4b12 ldr r3, [pc, #72] ; (80009f0 ) + 80009a8: 2200 movs r2, #0 + 80009aa: 609a str r2, [r3, #8] + htim7.Init.Period = 1000; + 80009ac: 4b10 ldr r3, [pc, #64] ; (80009f0 ) + 80009ae: f44f 727a mov.w r2, #1000 ; 0x3e8 + 80009b2: 60da str r2, [r3, #12] + htim7.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; + 80009b4: 4b0e ldr r3, [pc, #56] ; (80009f0 ) + 80009b6: 2200 movs r2, #0 + 80009b8: 619a str r2, [r3, #24] + if (HAL_TIM_Base_Init(&htim7) != HAL_OK) + 80009ba: 480d ldr r0, [pc, #52] ; (80009f0 ) + 80009bc: f002 ff78 bl 80038b0 + 80009c0: 4603 mov r3, r0 + 80009c2: 2b00 cmp r3, #0 + 80009c4: d001 beq.n 80009ca + { + Error_Handler(); + 80009c6: f000 fa67 bl 8000e98 + } + sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; + 80009ca: 2300 movs r3, #0 + 80009cc: 603b str r3, [r7, #0] + sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; + 80009ce: 2300 movs r3, #0 + 80009d0: 607b str r3, [r7, #4] + if (HAL_TIMEx_MasterConfigSynchronization(&htim7, &sMasterConfig) != HAL_OK) + 80009d2: 463b mov r3, r7 + 80009d4: 4619 mov r1, r3 + 80009d6: 4806 ldr r0, [pc, #24] ; (80009f0 ) + 80009d8: f003 feea bl 80047b0 + 80009dc: 4603 mov r3, r0 + 80009de: 2b00 cmp r3, #0 + 80009e0: d001 beq.n 80009e6 + { + Error_Handler(); + 80009e2: f000 fa59 bl 8000e98 + } + /* USER CODE BEGIN TIM7_Init 2 */ + + /* USER CODE END TIM7_Init 2 */ + +} + 80009e6: bf00 nop + 80009e8: 3708 adds r7, #8 + 80009ea: 46bd mov sp, r7 + 80009ec: bd80 pop {r7, pc} + 80009ee: bf00 nop + 80009f0: 20000120 .word 0x20000120 + 80009f4: 40001400 .word 0x40001400 + +080009f8 : + * @brief USART3 Initialization Function + * @param None + * @retval None + */ +static void MX_USART3_UART_Init(void) +{ + 80009f8: b580 push {r7, lr} + 80009fa: af00 add r7, sp, #0 + /* USER CODE END USART3_Init 0 */ + + /* USER CODE BEGIN USART3_Init 1 */ + + /* USER CODE END USART3_Init 1 */ + huart3.Instance = USART3; + 80009fc: 4b11 ldr r3, [pc, #68] ; (8000a44 ) + 80009fe: 4a12 ldr r2, [pc, #72] ; (8000a48 ) + 8000a00: 601a str r2, [r3, #0] + huart3.Init.BaudRate = 115200; + 8000a02: 4b10 ldr r3, [pc, #64] ; (8000a44 ) + 8000a04: f44f 32e1 mov.w r2, #115200 ; 0x1c200 + 8000a08: 605a str r2, [r3, #4] + huart3.Init.WordLength = UART_WORDLENGTH_8B; + 8000a0a: 4b0e ldr r3, [pc, #56] ; (8000a44 ) + 8000a0c: 2200 movs r2, #0 + 8000a0e: 609a str r2, [r3, #8] + huart3.Init.StopBits = UART_STOPBITS_1; + 8000a10: 4b0c ldr r3, [pc, #48] ; (8000a44 ) + 8000a12: 2200 movs r2, #0 + 8000a14: 60da str r2, [r3, #12] + huart3.Init.Parity = UART_PARITY_NONE; + 8000a16: 4b0b ldr r3, [pc, #44] ; (8000a44 ) + 8000a18: 2200 movs r2, #0 + 8000a1a: 611a str r2, [r3, #16] + huart3.Init.Mode = UART_MODE_TX_RX; + 8000a1c: 4b09 ldr r3, [pc, #36] ; (8000a44 ) + 8000a1e: 220c movs r2, #12 + 8000a20: 615a str r2, [r3, #20] + huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; + 8000a22: 4b08 ldr r3, [pc, #32] ; (8000a44 ) + 8000a24: 2200 movs r2, #0 + 8000a26: 619a str r2, [r3, #24] + huart3.Init.OverSampling = UART_OVERSAMPLING_16; + 8000a28: 4b06 ldr r3, [pc, #24] ; (8000a44 ) + 8000a2a: 2200 movs r2, #0 + 8000a2c: 61da str r2, [r3, #28] + if (HAL_UART_Init(&huart3) != HAL_OK) + 8000a2e: 4805 ldr r0, [pc, #20] ; (8000a44 ) + 8000a30: f003 ff9b bl 800496a + 8000a34: 4603 mov r3, r0 + 8000a36: 2b00 cmp r3, #0 + 8000a38: d001 beq.n 8000a3e + { + Error_Handler(); + 8000a3a: f000 fa2d bl 8000e98 + } + /* USER CODE BEGIN USART3_Init 2 */ + + /* USER CODE END USART3_Init 2 */ + +} + 8000a3e: bf00 nop + 8000a40: bd80 pop {r7, pc} + 8000a42: bf00 nop + 8000a44: 20000168 .word 0x20000168 + 8000a48: 40004800 .word 0x40004800 + +08000a4c : + * @brief USB_OTG_FS Initialization Function + * @param None + * @retval None + */ +static void MX_USB_OTG_FS_PCD_Init(void) +{ + 8000a4c: b580 push {r7, lr} + 8000a4e: af00 add r7, sp, #0 + /* USER CODE END USB_OTG_FS_Init 0 */ + + /* USER CODE BEGIN USB_OTG_FS_Init 1 */ + + /* USER CODE END USB_OTG_FS_Init 1 */ + hpcd_USB_OTG_FS.Instance = USB_OTG_FS; + 8000a50: 4b12 ldr r3, [pc, #72] ; (8000a9c ) + 8000a52: f04f 42a0 mov.w r2, #1342177280 ; 0x50000000 + 8000a56: 601a str r2, [r3, #0] + hpcd_USB_OTG_FS.Init.dev_endpoints = 4; + 8000a58: 4b10 ldr r3, [pc, #64] ; (8000a9c ) + 8000a5a: 2204 movs r2, #4 + 8000a5c: 605a str r2, [r3, #4] + hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL; + 8000a5e: 4b0f ldr r3, [pc, #60] ; (8000a9c ) + 8000a60: 2202 movs r2, #2 + 8000a62: 611a str r2, [r3, #16] + hpcd_USB_OTG_FS.Init.dma_enable = DISABLE; + 8000a64: 4b0d ldr r3, [pc, #52] ; (8000a9c ) + 8000a66: 2200 movs r2, #0 + 8000a68: 60da str r2, [r3, #12] + hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED; + 8000a6a: 4b0c ldr r3, [pc, #48] ; (8000a9c ) + 8000a6c: 2202 movs r2, #2 + 8000a6e: 619a str r2, [r3, #24] + hpcd_USB_OTG_FS.Init.Sof_enable = ENABLE; + 8000a70: 4b0a ldr r3, [pc, #40] ; (8000a9c ) + 8000a72: 2201 movs r2, #1 + 8000a74: 61da str r2, [r3, #28] + hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE; + 8000a76: 4b09 ldr r3, [pc, #36] ; (8000a9c ) + 8000a78: 2200 movs r2, #0 + 8000a7a: 621a str r2, [r3, #32] + hpcd_USB_OTG_FS.Init.vbus_sensing_enable = ENABLE; + 8000a7c: 4b07 ldr r3, [pc, #28] ; (8000a9c ) + 8000a7e: 2201 movs r2, #1 + 8000a80: 62da str r2, [r3, #44] ; 0x2c + hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE; + 8000a82: 4b06 ldr r3, [pc, #24] ; (8000a9c ) + 8000a84: 2200 movs r2, #0 + 8000a86: 631a str r2, [r3, #48] ; 0x30 + if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK) + 8000a88: 4804 ldr r0, [pc, #16] ; (8000a9c ) + 8000a8a: f002 f95a bl 8002d42 + 8000a8e: 4603 mov r3, r0 + 8000a90: 2b00 cmp r3, #0 + 8000a92: d001 beq.n 8000a98 + { + Error_Handler(); + 8000a94: f000 fa00 bl 8000e98 + } + /* USER CODE BEGIN USB_OTG_FS_Init 2 */ + + /* USER CODE END USB_OTG_FS_Init 2 */ + +} + 8000a98: bf00 nop + 8000a9a: bd80 pop {r7, pc} + 8000a9c: 200001b0 .word 0x200001b0 + +08000aa0 : + * @brief GPIO Initialization Function + * @param None + * @retval None + */ +static void MX_GPIO_Init(void) +{ + 8000aa0: b580 push {r7, lr} + 8000aa2: b08c sub sp, #48 ; 0x30 + 8000aa4: af00 add r7, sp, #0 + GPIO_InitTypeDef GPIO_InitStruct = {0}; + 8000aa6: f107 031c add.w r3, r7, #28 + 8000aaa: 2200 movs r2, #0 + 8000aac: 601a str r2, [r3, #0] + 8000aae: 605a str r2, [r3, #4] + 8000ab0: 609a str r2, [r3, #8] + 8000ab2: 60da str r2, [r3, #12] + 8000ab4: 611a str r2, [r3, #16] +/* USER CODE BEGIN MX_GPIO_Init_1 */ +/* USER CODE END MX_GPIO_Init_1 */ + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOC_CLK_ENABLE(); + 8000ab6: 2300 movs r3, #0 + 8000ab8: 61bb str r3, [r7, #24] + 8000aba: 4b53 ldr r3, [pc, #332] ; (8000c08 ) + 8000abc: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000abe: 4a52 ldr r2, [pc, #328] ; (8000c08 ) + 8000ac0: f043 0304 orr.w r3, r3, #4 + 8000ac4: 6313 str r3, [r2, #48] ; 0x30 + 8000ac6: 4b50 ldr r3, [pc, #320] ; (8000c08 ) + 8000ac8: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000aca: f003 0304 and.w r3, r3, #4 + 8000ace: 61bb str r3, [r7, #24] + 8000ad0: 69bb ldr r3, [r7, #24] + __HAL_RCC_GPIOH_CLK_ENABLE(); + 8000ad2: 2300 movs r3, #0 + 8000ad4: 617b str r3, [r7, #20] + 8000ad6: 4b4c ldr r3, [pc, #304] ; (8000c08 ) + 8000ad8: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000ada: 4a4b ldr r2, [pc, #300] ; (8000c08 ) + 8000adc: f043 0380 orr.w r3, r3, #128 ; 0x80 + 8000ae0: 6313 str r3, [r2, #48] ; 0x30 + 8000ae2: 4b49 ldr r3, [pc, #292] ; (8000c08 ) + 8000ae4: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000ae6: f003 0380 and.w r3, r3, #128 ; 0x80 + 8000aea: 617b str r3, [r7, #20] + 8000aec: 697b ldr r3, [r7, #20] + __HAL_RCC_GPIOA_CLK_ENABLE(); + 8000aee: 2300 movs r3, #0 + 8000af0: 613b str r3, [r7, #16] + 8000af2: 4b45 ldr r3, [pc, #276] ; (8000c08 ) + 8000af4: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000af6: 4a44 ldr r2, [pc, #272] ; (8000c08 ) + 8000af8: f043 0301 orr.w r3, r3, #1 + 8000afc: 6313 str r3, [r2, #48] ; 0x30 + 8000afe: 4b42 ldr r3, [pc, #264] ; (8000c08 ) + 8000b00: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b02: f003 0301 and.w r3, r3, #1 + 8000b06: 613b str r3, [r7, #16] + 8000b08: 693b ldr r3, [r7, #16] + __HAL_RCC_GPIOB_CLK_ENABLE(); + 8000b0a: 2300 movs r3, #0 + 8000b0c: 60fb str r3, [r7, #12] + 8000b0e: 4b3e ldr r3, [pc, #248] ; (8000c08 ) + 8000b10: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b12: 4a3d ldr r2, [pc, #244] ; (8000c08 ) + 8000b14: f043 0302 orr.w r3, r3, #2 + 8000b18: 6313 str r3, [r2, #48] ; 0x30 + 8000b1a: 4b3b ldr r3, [pc, #236] ; (8000c08 ) + 8000b1c: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b1e: f003 0302 and.w r3, r3, #2 + 8000b22: 60fb str r3, [r7, #12] + 8000b24: 68fb ldr r3, [r7, #12] + __HAL_RCC_GPIOE_CLK_ENABLE(); + 8000b26: 2300 movs r3, #0 + 8000b28: 60bb str r3, [r7, #8] + 8000b2a: 4b37 ldr r3, [pc, #220] ; (8000c08 ) + 8000b2c: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b2e: 4a36 ldr r2, [pc, #216] ; (8000c08 ) + 8000b30: f043 0310 orr.w r3, r3, #16 + 8000b34: 6313 str r3, [r2, #48] ; 0x30 + 8000b36: 4b34 ldr r3, [pc, #208] ; (8000c08 ) + 8000b38: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b3a: f003 0310 and.w r3, r3, #16 + 8000b3e: 60bb str r3, [r7, #8] + 8000b40: 68bb ldr r3, [r7, #8] + __HAL_RCC_GPIOD_CLK_ENABLE(); + 8000b42: 2300 movs r3, #0 + 8000b44: 607b str r3, [r7, #4] + 8000b46: 4b30 ldr r3, [pc, #192] ; (8000c08 ) + 8000b48: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b4a: 4a2f ldr r2, [pc, #188] ; (8000c08 ) + 8000b4c: f043 0308 orr.w r3, r3, #8 + 8000b50: 6313 str r3, [r2, #48] ; 0x30 + 8000b52: 4b2d ldr r3, [pc, #180] ; (8000c08 ) + 8000b54: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b56: f003 0308 and.w r3, r3, #8 + 8000b5a: 607b str r3, [r7, #4] + 8000b5c: 687b ldr r3, [r7, #4] + __HAL_RCC_GPIOG_CLK_ENABLE(); + 8000b5e: 2300 movs r3, #0 + 8000b60: 603b str r3, [r7, #0] + 8000b62: 4b29 ldr r3, [pc, #164] ; (8000c08 ) + 8000b64: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b66: 4a28 ldr r2, [pc, #160] ; (8000c08 ) + 8000b68: f043 0340 orr.w r3, r3, #64 ; 0x40 + 8000b6c: 6313 str r3, [r2, #48] ; 0x30 + 8000b6e: 4b26 ldr r3, [pc, #152] ; (8000c08 ) + 8000b70: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000b72: f003 0340 and.w r3, r3, #64 ; 0x40 + 8000b76: 603b str r3, [r7, #0] + 8000b78: 683b ldr r3, [r7, #0] + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOB, LD1_Pin|LD3_Pin|LD2_Pin, GPIO_PIN_RESET); + 8000b7a: 2200 movs r2, #0 + 8000b7c: f244 0181 movw r1, #16513 ; 0x4081 + 8000b80: 4822 ldr r0, [pc, #136] ; (8000c0c ) + 8000b82: f002 f8c6 bl 8002d12 + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(USB_PowerSwitchOn_GPIO_Port, USB_PowerSwitchOn_Pin, GPIO_PIN_RESET); + 8000b86: 2200 movs r2, #0 + 8000b88: 2140 movs r1, #64 ; 0x40 + 8000b8a: 4821 ldr r0, [pc, #132] ; (8000c10 ) + 8000b8c: f002 f8c1 bl 8002d12 + + /*Configure GPIO pin : USER_Btn_Pin */ + GPIO_InitStruct.Pin = USER_Btn_Pin; + 8000b90: f44f 5300 mov.w r3, #8192 ; 0x2000 + 8000b94: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + 8000b96: f44f 1388 mov.w r3, #1114112 ; 0x110000 + 8000b9a: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8000b9c: 2300 movs r3, #0 + 8000b9e: 627b str r3, [r7, #36] ; 0x24 + HAL_GPIO_Init(USER_Btn_GPIO_Port, &GPIO_InitStruct); + 8000ba0: f107 031c add.w r3, r7, #28 + 8000ba4: 4619 mov r1, r3 + 8000ba6: 481b ldr r0, [pc, #108] ; (8000c14 ) + 8000ba8: f001 fefe bl 80029a8 + + /*Configure GPIO pins : LD1_Pin LD3_Pin LD2_Pin */ + GPIO_InitStruct.Pin = LD1_Pin|LD3_Pin|LD2_Pin; + 8000bac: f244 0381 movw r3, #16513 ; 0x4081 + 8000bb0: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + 8000bb2: 2301 movs r3, #1 + 8000bb4: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8000bb6: 2300 movs r3, #0 + 8000bb8: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 8000bba: 2300 movs r3, #0 + 8000bbc: 62bb str r3, [r7, #40] ; 0x28 + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + 8000bbe: f107 031c add.w r3, r7, #28 + 8000bc2: 4619 mov r1, r3 + 8000bc4: 4811 ldr r0, [pc, #68] ; (8000c0c ) + 8000bc6: f001 feef bl 80029a8 + + /*Configure GPIO pin : USB_PowerSwitchOn_Pin */ + GPIO_InitStruct.Pin = USB_PowerSwitchOn_Pin; + 8000bca: 2340 movs r3, #64 ; 0x40 + 8000bcc: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + 8000bce: 2301 movs r3, #1 + 8000bd0: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8000bd2: 2300 movs r3, #0 + 8000bd4: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 8000bd6: 2300 movs r3, #0 + 8000bd8: 62bb str r3, [r7, #40] ; 0x28 + HAL_GPIO_Init(USB_PowerSwitchOn_GPIO_Port, &GPIO_InitStruct); + 8000bda: f107 031c add.w r3, r7, #28 + 8000bde: 4619 mov r1, r3 + 8000be0: 480b ldr r0, [pc, #44] ; (8000c10 ) + 8000be2: f001 fee1 bl 80029a8 + + /*Configure GPIO pin : USB_OverCurrent_Pin */ + GPIO_InitStruct.Pin = USB_OverCurrent_Pin; + 8000be6: 2380 movs r3, #128 ; 0x80 + 8000be8: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + 8000bea: 2300 movs r3, #0 + 8000bec: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8000bee: 2300 movs r3, #0 + 8000bf0: 627b str r3, [r7, #36] ; 0x24 + HAL_GPIO_Init(USB_OverCurrent_GPIO_Port, &GPIO_InitStruct); + 8000bf2: f107 031c add.w r3, r7, #28 + 8000bf6: 4619 mov r1, r3 + 8000bf8: 4805 ldr r0, [pc, #20] ; (8000c10 ) + 8000bfa: f001 fed5 bl 80029a8 + +/* USER CODE BEGIN MX_GPIO_Init_2 */ +/* USER CODE END MX_GPIO_Init_2 */ +} + 8000bfe: bf00 nop + 8000c00: 3730 adds r7, #48 ; 0x30 + 8000c02: 46bd mov sp, r7 + 8000c04: bd80 pop {r7, pc} + 8000c06: bf00 nop + 8000c08: 40023800 .word 0x40023800 + 8000c0c: 40020400 .word 0x40020400 + 8000c10: 40021800 .word 0x40021800 + 8000c14: 40020800 .word 0x40020800 + +08000c18 : + +/* USER CODE BEGIN 4 */ +static void MQTTConnect (mqtt_client_t *client) +{ + 8000c18: b580 push {r7, lr} + 8000c1a: b08e sub sp, #56 ; 0x38 + 8000c1c: af02 add r7, sp, #8 + 8000c1e: 6078 str r0, [r7, #4] + struct mqtt_connect_client_info_t ci; + err_t err; + + /* Setup an empty client info structure */ + memset(&ci, 0, sizeof(ci)); + 8000c20: f107 0310 add.w r3, r7, #16 + 8000c24: 221c movs r2, #28 + 8000c26: 2100 movs r1, #0 + 8000c28: 4618 mov r0, r3 + 8000c2a: f012 fa01 bl 8013030 + + /* Minimal amount of information required is client identifier, so set it here */ + ci.client_id = "lwip_test"; + 8000c2e: 4b12 ldr r3, [pc, #72] ; (8000c78 ) + 8000c30: 613b str r3, [r7, #16] + + ip_addr_t server_ip; + ip4_addr_set_u32(&server_ip, ipaddr_addr("3.73.193.253")); + 8000c32: 4812 ldr r0, [pc, #72] ; (8000c7c ) + 8000c34: f010 ffa6 bl 8011b84 + 8000c38: 4603 mov r3, r0 + 8000c3a: 60fb str r3, [r7, #12] + otherwise mqtt_connection_cb will be called with connection result after attempting + to establish a connection with the server. + For now MQTT version 3.1.1 is always used */ + + //err = mqtt_client_connect(client, cMqttServerIpAddr_u32, MQTT_PORT, mqtt_connection_cb, 0, &ci); + err = mqtt_client_connect(client, &server_ip, MQTT_PORT, mqtt_connection_cb, 0, &ci); + 8000c3c: f107 010c add.w r1, r7, #12 + 8000c40: f107 0310 add.w r3, r7, #16 + 8000c44: 9301 str r3, [sp, #4] + 8000c46: 2300 movs r3, #0 + 8000c48: 9300 str r3, [sp, #0] + 8000c4a: 4b0d ldr r3, [pc, #52] ; (8000c80 ) + 8000c4c: f240 725b movw r2, #1883 ; 0x75b + 8000c50: 6878 ldr r0, [r7, #4] + 8000c52: f006 f86d bl 8006d30 + 8000c56: 4603 mov r3, r0 + 8000c58: f887 302f strb.w r3, [r7, #47] ; 0x2f + + /* For now just print the result code if something goes wrong */ + if(err != ERR_OK) { + 8000c5c: f997 302f ldrsb.w r3, [r7, #47] ; 0x2f + 8000c60: 2b00 cmp r3, #0 + 8000c62: d005 beq.n 8000c70 + printf("mqtt_connect return %d\n", err); + 8000c64: f997 302f ldrsb.w r3, [r7, #47] ; 0x2f + 8000c68: 4619 mov r1, r3 + 8000c6a: 4806 ldr r0, [pc, #24] ; (8000c84 ) + 8000c6c: f012 f88a bl 8012d84 + } +} + 8000c70: bf00 nop + 8000c72: 3730 adds r7, #48 ; 0x30 + 8000c74: 46bd mov sp, r7 + 8000c76: bd80 pop {r7, pc} + 8000c78: 08013c84 .word 0x08013c84 + 8000c7c: 08013c90 .word 0x08013c90 + 8000c80: 08000c89 .word 0x08000c89 + 8000c84: 08013ca0 .word 0x08013ca0 + +08000c88 : + +static void mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t status) +{ + 8000c88: b580 push {r7, lr} + 8000c8a: b088 sub sp, #32 + 8000c8c: af02 add r7, sp, #8 + 8000c8e: 60f8 str r0, [r7, #12] + 8000c90: 60b9 str r1, [r7, #8] + 8000c92: 4613 mov r3, r2 + 8000c94: 80fb strh r3, [r7, #6] + err_t err; + if(status == MQTT_CONNECT_ACCEPTED) { + 8000c96: 88fb ldrh r3, [r7, #6] + 8000c98: 2b00 cmp r3, #0 + 8000c9a: d11f bne.n 8000cdc + printf("mqtt_connection_cb: Successfully connected\n"); + 8000c9c: 4815 ldr r0, [pc, #84] ; (8000cf4 ) + 8000c9e: f012 f8d7 bl 8012e50 + + /* Setup callback for incoming publish requests */ + mqtt_set_inpub_callback(client, mqtt_incoming_publish_cb, mqtt_incoming_data_cb, arg); + 8000ca2: 68bb ldr r3, [r7, #8] + 8000ca4: 4a14 ldr r2, [pc, #80] ; (8000cf8 ) + 8000ca6: 4915 ldr r1, [pc, #84] ; (8000cfc ) + 8000ca8: 68f8 ldr r0, [r7, #12] + 8000caa: f006 f81d bl 8006ce8 + + /* Subscribe to a topic named "subtopic" with QoS level 1, call mqtt_sub_request_cb with result */ + err = mqtt_subscribe(client, "testflax", 1, mqtt_sub_request_cb, arg); + 8000cae: 2301 movs r3, #1 + 8000cb0: 9301 str r3, [sp, #4] + 8000cb2: 68bb ldr r3, [r7, #8] + 8000cb4: 9300 str r3, [sp, #0] + 8000cb6: 4b12 ldr r3, [pc, #72] ; (8000d00 ) + 8000cb8: 2201 movs r2, #1 + 8000cba: 4912 ldr r1, [pc, #72] ; (8000d04 ) + 8000cbc: 68f8 ldr r0, [r7, #12] + 8000cbe: f005 ff3f bl 8006b40 + 8000cc2: 4603 mov r3, r0 + 8000cc4: 75fb strb r3, [r7, #23] + + if(err != ERR_OK) { + 8000cc6: f997 3017 ldrsb.w r3, [r7, #23] + 8000cca: 2b00 cmp r3, #0 + 8000ccc: d00e beq.n 8000cec + printf("mqtt_subscribe return: %d\n", err); + 8000cce: f997 3017 ldrsb.w r3, [r7, #23] + 8000cd2: 4619 mov r1, r3 + 8000cd4: 480c ldr r0, [pc, #48] ; (8000d08 ) + 8000cd6: f012 f855 bl 8012d84 + printf("mqtt_connection_cb: Disconnected, reason: %d\n", status); + + /* Its more nice to be connected, so try to reconnect */ + MQTTConnect(client); + } +} + 8000cda: e007 b.n 8000cec + printf("mqtt_connection_cb: Disconnected, reason: %d\n", status); + 8000cdc: 88fb ldrh r3, [r7, #6] + 8000cde: 4619 mov r1, r3 + 8000ce0: 480a ldr r0, [pc, #40] ; (8000d0c ) + 8000ce2: f012 f84f bl 8012d84 + MQTTConnect(client); + 8000ce6: 68f8 ldr r0, [r7, #12] + 8000ce8: f7ff ff96 bl 8000c18 +} + 8000cec: bf00 nop + 8000cee: 3718 adds r7, #24 + 8000cf0: 46bd mov sp, r7 + 8000cf2: bd80 pop {r7, pc} + 8000cf4: 08013cb8 .word 0x08013cb8 + 8000cf8: 08000d8d .word 0x08000d8d + 8000cfc: 08000d35 .word 0x08000d35 + 8000d00: 08000d11 .word 0x08000d11 + 8000d04: 08013ce4 .word 0x08013ce4 + 8000d08: 08013cf0 .word 0x08013cf0 + 8000d0c: 08013d0c .word 0x08013d0c + +08000d10 : + +static void mqtt_sub_request_cb(void *arg, err_t result) +{ + 8000d10: b580 push {r7, lr} + 8000d12: b082 sub sp, #8 + 8000d14: af00 add r7, sp, #0 + 8000d16: 6078 str r0, [r7, #4] + 8000d18: 460b mov r3, r1 + 8000d1a: 70fb strb r3, [r7, #3] + /* Just print the result code here for simplicity, + normal behaviour would be to take some action if subscribe fails like + notifying user, retry subscribe or disconnect from server */ + printf("Subscribe result: %d\n", result); + 8000d1c: f997 3003 ldrsb.w r3, [r7, #3] + 8000d20: 4619 mov r1, r3 + 8000d22: 4803 ldr r0, [pc, #12] ; (8000d30 ) + 8000d24: f012 f82e bl 8012d84 +} + 8000d28: bf00 nop + 8000d2a: 3708 adds r7, #8 + 8000d2c: 46bd mov sp, r7 + 8000d2e: bd80 pop {r7, pc} + 8000d30: 08013d3c .word 0x08013d3c + +08000d34 : + +static void mqtt_incoming_publish_cb(void *arg, const char *topic, u32_t tot_len) +{ + 8000d34: b580 push {r7, lr} + 8000d36: b084 sub sp, #16 + 8000d38: af00 add r7, sp, #0 + 8000d3a: 60f8 str r0, [r7, #12] + 8000d3c: 60b9 str r1, [r7, #8] + 8000d3e: 607a str r2, [r7, #4] + printf("Incoming publish at topic %s with total length %u\n", topic, (unsigned int)tot_len); + 8000d40: 687a ldr r2, [r7, #4] + 8000d42: 68b9 ldr r1, [r7, #8] + 8000d44: 480e ldr r0, [pc, #56] ; (8000d80 ) + 8000d46: f012 f81d bl 8012d84 + + /* Decode topic string into a user defined reference */ + if(strcmp(topic, "print_payload") == 0) { + 8000d4a: 490e ldr r1, [pc, #56] ; (8000d84 ) + 8000d4c: 68b8 ldr r0, [r7, #8] + 8000d4e: f7ff fa39 bl 80001c4 + 8000d52: 4603 mov r3, r0 + 8000d54: 2b00 cmp r3, #0 + 8000d56: d103 bne.n 8000d60 + inpub_id = 0; + 8000d58: 4b0b ldr r3, [pc, #44] ; (8000d88 ) + 8000d5a: 2200 movs r2, #0 + 8000d5c: 601a str r2, [r3, #0] + inpub_id = 1; + } else { + /* For all other topics */ + inpub_id = 2; + } +} + 8000d5e: e00a b.n 8000d76 + } else if(topic[0] == 'A') { + 8000d60: 68bb ldr r3, [r7, #8] + 8000d62: 781b ldrb r3, [r3, #0] + 8000d64: 2b41 cmp r3, #65 ; 0x41 + 8000d66: d103 bne.n 8000d70 + inpub_id = 1; + 8000d68: 4b07 ldr r3, [pc, #28] ; (8000d88 ) + 8000d6a: 2201 movs r2, #1 + 8000d6c: 601a str r2, [r3, #0] +} + 8000d6e: e002 b.n 8000d76 + inpub_id = 2; + 8000d70: 4b05 ldr r3, [pc, #20] ; (8000d88 ) + 8000d72: 2202 movs r2, #2 + 8000d74: 601a str r2, [r3, #0] +} + 8000d76: bf00 nop + 8000d78: 3710 adds r7, #16 + 8000d7a: 46bd mov sp, r7 + 8000d7c: bd80 pop {r7, pc} + 8000d7e: bf00 nop + 8000d80: 08013d54 .word 0x08013d54 + 8000d84: 08013d88 .word 0x08013d88 + 8000d88: 200008a4 .word 0x200008a4 + +08000d8c : + +static void mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t flags) +{ + 8000d8c: b580 push {r7, lr} + 8000d8e: b084 sub sp, #16 + 8000d90: af00 add r7, sp, #0 + 8000d92: 60f8 str r0, [r7, #12] + 8000d94: 60b9 str r1, [r7, #8] + 8000d96: 4611 mov r1, r2 + 8000d98: 461a mov r2, r3 + 8000d9a: 460b mov r3, r1 + 8000d9c: 80fb strh r3, [r7, #6] + 8000d9e: 4613 mov r3, r2 + 8000da0: 717b strb r3, [r7, #5] + printf("Incoming publish payload with length %d, flags %u\n", len, (unsigned int)flags); + 8000da2: 88fb ldrh r3, [r7, #6] + 8000da4: 797a ldrb r2, [r7, #5] + 8000da6: 4619 mov r1, r3 + 8000da8: 4811 ldr r0, [pc, #68] ; (8000df0 ) + 8000daa: f011 ffeb bl 8012d84 + + if(flags & MQTT_DATA_FLAG_LAST) { + 8000dae: 797b ldrb r3, [r7, #5] + 8000db0: f003 0301 and.w r3, r3, #1 + 8000db4: 2b00 cmp r3, #0 + 8000db6: d016 beq.n 8000de6 + /* Last fragment of payload received (or whole part if payload fits receive buffer + See MQTT_VAR_HEADER_BUFFER_LEN) */ + + /* Call function or do action depending on reference, in this case inpub_id */ + if(inpub_id == 0) { + 8000db8: 4b0e ldr r3, [pc, #56] ; (8000df4 ) + 8000dba: 681b ldr r3, [r3, #0] + 8000dbc: 2b00 cmp r3, #0 + 8000dbe: d10b bne.n 8000dd8 + /* Don't trust the publisher, check zero termination */ + if(data[len-1] == 0) { + 8000dc0: 88fb ldrh r3, [r7, #6] + 8000dc2: 3b01 subs r3, #1 + 8000dc4: 68ba ldr r2, [r7, #8] + 8000dc6: 4413 add r3, r2 + 8000dc8: 781b ldrb r3, [r3, #0] + 8000dca: 2b00 cmp r3, #0 + 8000dcc: d10b bne.n 8000de6 + printf("mqtt_incoming_data_cb: %s\n", (const char *)data); + 8000dce: 68b9 ldr r1, [r7, #8] + 8000dd0: 4809 ldr r0, [pc, #36] ; (8000df8 ) + 8000dd2: f011 ffd7 bl 8012d84 + printf("mqtt_incoming_data_cb: Ignoring payload...\n"); + } + } else { + /* Handle fragmented payload, store in buffer, write to file or whatever */ + } +} + 8000dd6: e006 b.n 8000de6 + } else if(inpub_id == 1) { + 8000dd8: 4b06 ldr r3, [pc, #24] ; (8000df4 ) + 8000dda: 681b ldr r3, [r3, #0] + 8000ddc: 2b01 cmp r3, #1 + 8000dde: d002 beq.n 8000de6 + printf("mqtt_incoming_data_cb: Ignoring payload...\n"); + 8000de0: 4806 ldr r0, [pc, #24] ; (8000dfc ) + 8000de2: f012 f835 bl 8012e50 +} + 8000de6: bf00 nop + 8000de8: 3710 adds r7, #16 + 8000dea: 46bd mov sp, r7 + 8000dec: bd80 pop {r7, pc} + 8000dee: bf00 nop + 8000df0: 08013d98 .word 0x08013d98 + 8000df4: 200008a4 .word 0x200008a4 + 8000df8: 08013dcc .word 0x08013dcc + 8000dfc: 08013de8 .word 0x08013de8 + +08000e00 : + +static void example_publish(mqtt_client_t *client, void *arg) +{ + 8000e00: b580 push {r7, lr} + 8000e02: b088 sub sp, #32 + 8000e04: af04 add r7, sp, #16 + 8000e06: 6078 str r0, [r7, #4] + 8000e08: 6039 str r1, [r7, #0] + const char *pub_payload= "PubSubHubLubJub"; + 8000e0a: 4b14 ldr r3, [pc, #80] ; (8000e5c ) + 8000e0c: 60fb str r3, [r7, #12] + err_t err; + u8_t qos = 2; /* 0 1 or 2, see MQTT specification */ + 8000e0e: 2302 movs r3, #2 + 8000e10: 72fb strb r3, [r7, #11] + u8_t retain = 0; /* No don't retain such crappy payload... */ + 8000e12: 2300 movs r3, #0 + 8000e14: 72bb strb r3, [r7, #10] + err = mqtt_publish(client, "testflax", pub_payload, strlen(pub_payload), qos, retain, mqtt_pub_request_cb, arg); + 8000e16: 68f8 ldr r0, [r7, #12] + 8000e18: f7ff f9de bl 80001d8 + 8000e1c: 4603 mov r3, r0 + 8000e1e: b29a uxth r2, r3 + 8000e20: 683b ldr r3, [r7, #0] + 8000e22: 9303 str r3, [sp, #12] + 8000e24: 4b0e ldr r3, [pc, #56] ; (8000e60 ) + 8000e26: 9302 str r3, [sp, #8] + 8000e28: 7abb ldrb r3, [r7, #10] + 8000e2a: 9301 str r3, [sp, #4] + 8000e2c: 7afb ldrb r3, [r7, #11] + 8000e2e: 9300 str r3, [sp, #0] + 8000e30: 4613 mov r3, r2 + 8000e32: 68fa ldr r2, [r7, #12] + 8000e34: 490b ldr r1, [pc, #44] ; (8000e64 ) + 8000e36: 6878 ldr r0, [r7, #4] + 8000e38: f005 fdb0 bl 800699c + 8000e3c: 4603 mov r3, r0 + 8000e3e: 727b strb r3, [r7, #9] + if(err != ERR_OK) { + 8000e40: f997 3009 ldrsb.w r3, [r7, #9] + 8000e44: 2b00 cmp r3, #0 + 8000e46: d005 beq.n 8000e54 + printf("Publish err: %d\n", err); + 8000e48: f997 3009 ldrsb.w r3, [r7, #9] + 8000e4c: 4619 mov r1, r3 + 8000e4e: 4806 ldr r0, [pc, #24] ; (8000e68 ) + 8000e50: f011 ff98 bl 8012d84 + } +} + 8000e54: bf00 nop + 8000e56: 3710 adds r7, #16 + 8000e58: 46bd mov sp, r7 + 8000e5a: bd80 pop {r7, pc} + 8000e5c: 08013e14 .word 0x08013e14 + 8000e60: 08000e6d .word 0x08000e6d + 8000e64: 08013ce4 .word 0x08013ce4 + 8000e68: 08013e24 .word 0x08013e24 + +08000e6c : + +/* Called when publish is complete either with sucess or failure */ +static void mqtt_pub_request_cb(void *arg, err_t result) +{ + 8000e6c: b580 push {r7, lr} + 8000e6e: b082 sub sp, #8 + 8000e70: af00 add r7, sp, #0 + 8000e72: 6078 str r0, [r7, #4] + 8000e74: 460b mov r3, r1 + 8000e76: 70fb strb r3, [r7, #3] + if(result != ERR_OK) { + 8000e78: f997 3003 ldrsb.w r3, [r7, #3] + 8000e7c: 2b00 cmp r3, #0 + 8000e7e: d005 beq.n 8000e8c + printf("Publish result: %d\n", result); + 8000e80: f997 3003 ldrsb.w r3, [r7, #3] + 8000e84: 4619 mov r1, r3 + 8000e86: 4803 ldr r0, [pc, #12] ; (8000e94 ) + 8000e88: f011 ff7c bl 8012d84 + } +} + 8000e8c: bf00 nop + 8000e8e: 3708 adds r7, #8 + 8000e90: 46bd mov sp, r7 + 8000e92: bd80 pop {r7, pc} + 8000e94: 08013e38 .word 0x08013e38 + +08000e98 : +/** + * @brief This function is executed in case of error occurrence. + * @retval None + */ +void Error_Handler(void) +{ + 8000e98: b480 push {r7} + 8000e9a: af00 add r7, sp, #0 + \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"); + 8000e9c: b672 cpsid i +} + 8000e9e: bf00 nop + /* USER CODE BEGIN Error_Handler_Debug */ + /* User can add his own implementation to report the HAL error return state */ + __disable_irq(); + while (1) + 8000ea0: e7fe b.n 8000ea0 + ... + +08000ea4 : +void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); + /** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + 8000ea4: b480 push {r7} + 8000ea6: b083 sub sp, #12 + 8000ea8: af00 add r7, sp, #0 + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_SYSCFG_CLK_ENABLE(); + 8000eaa: 2300 movs r3, #0 + 8000eac: 607b str r3, [r7, #4] + 8000eae: 4b0f ldr r3, [pc, #60] ; (8000eec ) + 8000eb0: 6c5b ldr r3, [r3, #68] ; 0x44 + 8000eb2: 4a0e ldr r2, [pc, #56] ; (8000eec ) + 8000eb4: f443 4380 orr.w r3, r3, #16384 ; 0x4000 + 8000eb8: 6453 str r3, [r2, #68] ; 0x44 + 8000eba: 4b0c ldr r3, [pc, #48] ; (8000eec ) + 8000ebc: 6c5b ldr r3, [r3, #68] ; 0x44 + 8000ebe: f403 4380 and.w r3, r3, #16384 ; 0x4000 + 8000ec2: 607b str r3, [r7, #4] + 8000ec4: 687b ldr r3, [r7, #4] + __HAL_RCC_PWR_CLK_ENABLE(); + 8000ec6: 2300 movs r3, #0 + 8000ec8: 603b str r3, [r7, #0] + 8000eca: 4b08 ldr r3, [pc, #32] ; (8000eec ) + 8000ecc: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000ece: 4a07 ldr r2, [pc, #28] ; (8000eec ) + 8000ed0: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 + 8000ed4: 6413 str r3, [r2, #64] ; 0x40 + 8000ed6: 4b05 ldr r3, [pc, #20] ; (8000eec ) + 8000ed8: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000eda: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 + 8000ede: 603b str r3, [r7, #0] + 8000ee0: 683b ldr r3, [r7, #0] + /* System interrupt init*/ + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + 8000ee2: bf00 nop + 8000ee4: 370c adds r7, #12 + 8000ee6: 46bd mov sp, r7 + 8000ee8: bc80 pop {r7} + 8000eea: 4770 bx lr + 8000eec: 40023800 .word 0x40023800 + +08000ef0 : +* This function configures the hardware resources used in this example +* @param htim_base: TIM_Base handle pointer +* @retval None +*/ +void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) +{ + 8000ef0: b580 push {r7, lr} + 8000ef2: b086 sub sp, #24 + 8000ef4: af00 add r7, sp, #0 + 8000ef6: 6078 str r0, [r7, #4] + if(htim_base->Instance==TIM1) + 8000ef8: 687b ldr r3, [r7, #4] + 8000efa: 681b ldr r3, [r3, #0] + 8000efc: 4a22 ldr r2, [pc, #136] ; (8000f88 ) + 8000efe: 4293 cmp r3, r2 + 8000f00: d10e bne.n 8000f20 + { + /* USER CODE BEGIN TIM1_MspInit 0 */ + + /* USER CODE END TIM1_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_TIM1_CLK_ENABLE(); + 8000f02: 2300 movs r3, #0 + 8000f04: 617b str r3, [r7, #20] + 8000f06: 4b21 ldr r3, [pc, #132] ; (8000f8c ) + 8000f08: 6c5b ldr r3, [r3, #68] ; 0x44 + 8000f0a: 4a20 ldr r2, [pc, #128] ; (8000f8c ) + 8000f0c: f043 0301 orr.w r3, r3, #1 + 8000f10: 6453 str r3, [r2, #68] ; 0x44 + 8000f12: 4b1e ldr r3, [pc, #120] ; (8000f8c ) + 8000f14: 6c5b ldr r3, [r3, #68] ; 0x44 + 8000f16: f003 0301 and.w r3, r3, #1 + 8000f1a: 617b str r3, [r7, #20] + 8000f1c: 697b ldr r3, [r7, #20] + /* USER CODE BEGIN TIM7_MspInit 1 */ + + /* USER CODE END TIM7_MspInit 1 */ + } + +} + 8000f1e: e02e b.n 8000f7e + else if(htim_base->Instance==TIM3) + 8000f20: 687b ldr r3, [r7, #4] + 8000f22: 681b ldr r3, [r3, #0] + 8000f24: 4a1a ldr r2, [pc, #104] ; (8000f90 ) + 8000f26: 4293 cmp r3, r2 + 8000f28: d10e bne.n 8000f48 + __HAL_RCC_TIM3_CLK_ENABLE(); + 8000f2a: 2300 movs r3, #0 + 8000f2c: 613b str r3, [r7, #16] + 8000f2e: 4b17 ldr r3, [pc, #92] ; (8000f8c ) + 8000f30: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000f32: 4a16 ldr r2, [pc, #88] ; (8000f8c ) + 8000f34: f043 0302 orr.w r3, r3, #2 + 8000f38: 6413 str r3, [r2, #64] ; 0x40 + 8000f3a: 4b14 ldr r3, [pc, #80] ; (8000f8c ) + 8000f3c: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000f3e: f003 0302 and.w r3, r3, #2 + 8000f42: 613b str r3, [r7, #16] + 8000f44: 693b ldr r3, [r7, #16] +} + 8000f46: e01a b.n 8000f7e + else if(htim_base->Instance==TIM7) + 8000f48: 687b ldr r3, [r7, #4] + 8000f4a: 681b ldr r3, [r3, #0] + 8000f4c: 4a11 ldr r2, [pc, #68] ; (8000f94 ) + 8000f4e: 4293 cmp r3, r2 + 8000f50: d115 bne.n 8000f7e + __HAL_RCC_TIM7_CLK_ENABLE(); + 8000f52: 2300 movs r3, #0 + 8000f54: 60fb str r3, [r7, #12] + 8000f56: 4b0d ldr r3, [pc, #52] ; (8000f8c ) + 8000f58: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000f5a: 4a0c ldr r2, [pc, #48] ; (8000f8c ) + 8000f5c: f043 0320 orr.w r3, r3, #32 + 8000f60: 6413 str r3, [r2, #64] ; 0x40 + 8000f62: 4b0a ldr r3, [pc, #40] ; (8000f8c ) + 8000f64: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000f66: f003 0320 and.w r3, r3, #32 + 8000f6a: 60fb str r3, [r7, #12] + 8000f6c: 68fb ldr r3, [r7, #12] + HAL_NVIC_SetPriority(TIM7_IRQn, 0, 0); + 8000f6e: 2200 movs r2, #0 + 8000f70: 2100 movs r1, #0 + 8000f72: 2037 movs r0, #55 ; 0x37 + 8000f74: f000 fbe9 bl 800174a + HAL_NVIC_EnableIRQ(TIM7_IRQn); + 8000f78: 2037 movs r0, #55 ; 0x37 + 8000f7a: f000 fc02 bl 8001782 +} + 8000f7e: bf00 nop + 8000f80: 3718 adds r7, #24 + 8000f82: 46bd mov sp, r7 + 8000f84: bd80 pop {r7, pc} + 8000f86: bf00 nop + 8000f88: 40010000 .word 0x40010000 + 8000f8c: 40023800 .word 0x40023800 + 8000f90: 40000400 .word 0x40000400 + 8000f94: 40001400 .word 0x40001400 + +08000f98 : + +void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim) +{ + 8000f98: b580 push {r7, lr} + 8000f9a: b08c sub sp, #48 ; 0x30 + 8000f9c: af00 add r7, sp, #0 + 8000f9e: 6078 str r0, [r7, #4] + GPIO_InitTypeDef GPIO_InitStruct = {0}; + 8000fa0: f107 031c add.w r3, r7, #28 + 8000fa4: 2200 movs r2, #0 + 8000fa6: 601a str r2, [r3, #0] + 8000fa8: 605a str r2, [r3, #4] + 8000faa: 609a str r2, [r3, #8] + 8000fac: 60da str r2, [r3, #12] + 8000fae: 611a str r2, [r3, #16] + if(htim->Instance==TIM1) + 8000fb0: 687b ldr r3, [r7, #4] + 8000fb2: 681b ldr r3, [r3, #0] + 8000fb4: 4a43 ldr r2, [pc, #268] ; (80010c4 ) + 8000fb6: 4293 cmp r3, r2 + 8000fb8: d11f bne.n 8000ffa + { + /* USER CODE BEGIN TIM1_MspPostInit 0 */ + + /* USER CODE END TIM1_MspPostInit 0 */ + __HAL_RCC_GPIOE_CLK_ENABLE(); + 8000fba: 2300 movs r3, #0 + 8000fbc: 61bb str r3, [r7, #24] + 8000fbe: 4b42 ldr r3, [pc, #264] ; (80010c8 ) + 8000fc0: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000fc2: 4a41 ldr r2, [pc, #260] ; (80010c8 ) + 8000fc4: f043 0310 orr.w r3, r3, #16 + 8000fc8: 6313 str r3, [r2, #48] ; 0x30 + 8000fca: 4b3f ldr r3, [pc, #252] ; (80010c8 ) + 8000fcc: 6b1b ldr r3, [r3, #48] ; 0x30 + 8000fce: f003 0310 and.w r3, r3, #16 + 8000fd2: 61bb str r3, [r7, #24] + 8000fd4: 69bb ldr r3, [r7, #24] + PE9 ------> TIM1_CH1 + PE11 ------> TIM1_CH2 + PE13 ------> TIM1_CH3 + PE14 ------> TIM1_CH4 + */ + GPIO_InitStruct.Pin = PWM1_Pin|PWM2_Pin|PWM3_Pin|PWM4_Pin; + 8000fd6: f44f 43d4 mov.w r3, #27136 ; 0x6a00 + 8000fda: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 8000fdc: 2302 movs r3, #2 + 8000fde: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8000fe0: 2300 movs r3, #0 + 8000fe2: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 8000fe4: 2300 movs r3, #0 + 8000fe6: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Alternate = GPIO_AF1_TIM1; + 8000fe8: 2301 movs r3, #1 + 8000fea: 62fb str r3, [r7, #44] ; 0x2c + HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); + 8000fec: f107 031c add.w r3, r7, #28 + 8000ff0: 4619 mov r1, r3 + 8000ff2: 4836 ldr r0, [pc, #216] ; (80010cc ) + 8000ff4: f001 fcd8 bl 80029a8 + /* USER CODE BEGIN TIM3_MspPostInit 1 */ + + /* USER CODE END TIM3_MspPostInit 1 */ + } + +} + 8000ff8: e05f b.n 80010ba + else if(htim->Instance==TIM3) + 8000ffa: 687b ldr r3, [r7, #4] + 8000ffc: 681b ldr r3, [r3, #0] + 8000ffe: 4a34 ldr r2, [pc, #208] ; (80010d0 ) + 8001000: 4293 cmp r3, r2 + 8001002: d15a bne.n 80010ba + __HAL_RCC_GPIOA_CLK_ENABLE(); + 8001004: 2300 movs r3, #0 + 8001006: 617b str r3, [r7, #20] + 8001008: 4b2f ldr r3, [pc, #188] ; (80010c8 ) + 800100a: 6b1b ldr r3, [r3, #48] ; 0x30 + 800100c: 4a2e ldr r2, [pc, #184] ; (80010c8 ) + 800100e: f043 0301 orr.w r3, r3, #1 + 8001012: 6313 str r3, [r2, #48] ; 0x30 + 8001014: 4b2c ldr r3, [pc, #176] ; (80010c8 ) + 8001016: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001018: f003 0301 and.w r3, r3, #1 + 800101c: 617b str r3, [r7, #20] + 800101e: 697b ldr r3, [r7, #20] + __HAL_RCC_GPIOB_CLK_ENABLE(); + 8001020: 2300 movs r3, #0 + 8001022: 613b str r3, [r7, #16] + 8001024: 4b28 ldr r3, [pc, #160] ; (80010c8 ) + 8001026: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001028: 4a27 ldr r2, [pc, #156] ; (80010c8 ) + 800102a: f043 0302 orr.w r3, r3, #2 + 800102e: 6313 str r3, [r2, #48] ; 0x30 + 8001030: 4b25 ldr r3, [pc, #148] ; (80010c8 ) + 8001032: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001034: f003 0302 and.w r3, r3, #2 + 8001038: 613b str r3, [r7, #16] + 800103a: 693b ldr r3, [r7, #16] + __HAL_RCC_GPIOC_CLK_ENABLE(); + 800103c: 2300 movs r3, #0 + 800103e: 60fb str r3, [r7, #12] + 8001040: 4b21 ldr r3, [pc, #132] ; (80010c8 ) + 8001042: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001044: 4a20 ldr r2, [pc, #128] ; (80010c8 ) + 8001046: f043 0304 orr.w r3, r3, #4 + 800104a: 6313 str r3, [r2, #48] ; 0x30 + 800104c: 4b1e ldr r3, [pc, #120] ; (80010c8 ) + 800104e: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001050: f003 0304 and.w r3, r3, #4 + 8001054: 60fb str r3, [r7, #12] + 8001056: 68fb ldr r3, [r7, #12] + GPIO_InitStruct.Pin = PWM5_Pin; + 8001058: 2340 movs r3, #64 ; 0x40 + 800105a: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 800105c: 2302 movs r3, #2 + 800105e: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8001060: 2300 movs r3, #0 + 8001062: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 8001064: 2300 movs r3, #0 + 8001066: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; + 8001068: 2302 movs r3, #2 + 800106a: 62fb str r3, [r7, #44] ; 0x2c + HAL_GPIO_Init(PWM5_GPIO_Port, &GPIO_InitStruct); + 800106c: f107 031c add.w r3, r7, #28 + 8001070: 4619 mov r1, r3 + 8001072: 4818 ldr r0, [pc, #96] ; (80010d4 ) + 8001074: f001 fc98 bl 80029a8 + GPIO_InitStruct.Pin = PWM6_Pin; + 8001078: 2302 movs r3, #2 + 800107a: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 800107c: 2302 movs r3, #2 + 800107e: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8001080: 2300 movs r3, #0 + 8001082: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 8001084: 2300 movs r3, #0 + 8001086: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; + 8001088: 2302 movs r3, #2 + 800108a: 62fb str r3, [r7, #44] ; 0x2c + HAL_GPIO_Init(PWM6_GPIO_Port, &GPIO_InitStruct); + 800108c: f107 031c add.w r3, r7, #28 + 8001090: 4619 mov r1, r3 + 8001092: 4811 ldr r0, [pc, #68] ; (80010d8 ) + 8001094: f001 fc88 bl 80029a8 + GPIO_InitStruct.Pin = PWM7_Pin|PWM8_Pin; + 8001098: f44f 73c0 mov.w r3, #384 ; 0x180 + 800109c: 61fb str r3, [r7, #28] + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 800109e: 2302 movs r3, #2 + 80010a0: 623b str r3, [r7, #32] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 80010a2: 2300 movs r3, #0 + 80010a4: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 80010a6: 2300 movs r3, #0 + 80010a8: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Alternate = GPIO_AF2_TIM3; + 80010aa: 2302 movs r3, #2 + 80010ac: 62fb str r3, [r7, #44] ; 0x2c + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + 80010ae: f107 031c add.w r3, r7, #28 + 80010b2: 4619 mov r1, r3 + 80010b4: 4809 ldr r0, [pc, #36] ; (80010dc ) + 80010b6: f001 fc77 bl 80029a8 +} + 80010ba: bf00 nop + 80010bc: 3730 adds r7, #48 ; 0x30 + 80010be: 46bd mov sp, r7 + 80010c0: bd80 pop {r7, pc} + 80010c2: bf00 nop + 80010c4: 40010000 .word 0x40010000 + 80010c8: 40023800 .word 0x40023800 + 80010cc: 40021000 .word 0x40021000 + 80010d0: 40000400 .word 0x40000400 + 80010d4: 40020000 .word 0x40020000 + 80010d8: 40020400 .word 0x40020400 + 80010dc: 40020800 .word 0x40020800 + +080010e0 : +* This function configures the hardware resources used in this example +* @param huart: UART handle pointer +* @retval None +*/ +void HAL_UART_MspInit(UART_HandleTypeDef* huart) +{ + 80010e0: b580 push {r7, lr} + 80010e2: b08a sub sp, #40 ; 0x28 + 80010e4: af00 add r7, sp, #0 + 80010e6: 6078 str r0, [r7, #4] + GPIO_InitTypeDef GPIO_InitStruct = {0}; + 80010e8: f107 0314 add.w r3, r7, #20 + 80010ec: 2200 movs r2, #0 + 80010ee: 601a str r2, [r3, #0] + 80010f0: 605a str r2, [r3, #4] + 80010f2: 609a str r2, [r3, #8] + 80010f4: 60da str r2, [r3, #12] + 80010f6: 611a str r2, [r3, #16] + if(huart->Instance==USART3) + 80010f8: 687b ldr r3, [r7, #4] + 80010fa: 681b ldr r3, [r3, #0] + 80010fc: 4a19 ldr r2, [pc, #100] ; (8001164 ) + 80010fe: 4293 cmp r3, r2 + 8001100: d12c bne.n 800115c + { + /* USER CODE BEGIN USART3_MspInit 0 */ + + /* USER CODE END USART3_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_USART3_CLK_ENABLE(); + 8001102: 2300 movs r3, #0 + 8001104: 613b str r3, [r7, #16] + 8001106: 4b18 ldr r3, [pc, #96] ; (8001168 ) + 8001108: 6c1b ldr r3, [r3, #64] ; 0x40 + 800110a: 4a17 ldr r2, [pc, #92] ; (8001168 ) + 800110c: f443 2380 orr.w r3, r3, #262144 ; 0x40000 + 8001110: 6413 str r3, [r2, #64] ; 0x40 + 8001112: 4b15 ldr r3, [pc, #84] ; (8001168 ) + 8001114: 6c1b ldr r3, [r3, #64] ; 0x40 + 8001116: f403 2380 and.w r3, r3, #262144 ; 0x40000 + 800111a: 613b str r3, [r7, #16] + 800111c: 693b ldr r3, [r7, #16] + + __HAL_RCC_GPIOD_CLK_ENABLE(); + 800111e: 2300 movs r3, #0 + 8001120: 60fb str r3, [r7, #12] + 8001122: 4b11 ldr r3, [pc, #68] ; (8001168 ) + 8001124: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001126: 4a10 ldr r2, [pc, #64] ; (8001168 ) + 8001128: f043 0308 orr.w r3, r3, #8 + 800112c: 6313 str r3, [r2, #48] ; 0x30 + 800112e: 4b0e ldr r3, [pc, #56] ; (8001168 ) + 8001130: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001132: f003 0308 and.w r3, r3, #8 + 8001136: 60fb str r3, [r7, #12] + 8001138: 68fb ldr r3, [r7, #12] + /**USART3 GPIO Configuration + PD8 ------> USART3_TX + PD9 ------> USART3_RX + */ + GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin; + 800113a: f44f 7340 mov.w r3, #768 ; 0x300 + 800113e: 617b str r3, [r7, #20] + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 8001140: 2302 movs r3, #2 + 8001142: 61bb str r3, [r7, #24] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8001144: 2300 movs r3, #0 + 8001146: 61fb str r3, [r7, #28] + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + 8001148: 2303 movs r3, #3 + 800114a: 623b str r3, [r7, #32] + GPIO_InitStruct.Alternate = GPIO_AF7_USART3; + 800114c: 2307 movs r3, #7 + 800114e: 627b str r3, [r7, #36] ; 0x24 + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + 8001150: f107 0314 add.w r3, r7, #20 + 8001154: 4619 mov r1, r3 + 8001156: 4805 ldr r0, [pc, #20] ; (800116c ) + 8001158: f001 fc26 bl 80029a8 + /* USER CODE BEGIN USART3_MspInit 1 */ + + /* USER CODE END USART3_MspInit 1 */ + } + +} + 800115c: bf00 nop + 800115e: 3728 adds r7, #40 ; 0x28 + 8001160: 46bd mov sp, r7 + 8001162: bd80 pop {r7, pc} + 8001164: 40004800 .word 0x40004800 + 8001168: 40023800 .word 0x40023800 + 800116c: 40020c00 .word 0x40020c00 + +08001170 : +* This function configures the hardware resources used in this example +* @param hpcd: PCD handle pointer +* @retval None +*/ +void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) +{ + 8001170: b580 push {r7, lr} + 8001172: b08a sub sp, #40 ; 0x28 + 8001174: af00 add r7, sp, #0 + 8001176: 6078 str r0, [r7, #4] + GPIO_InitTypeDef GPIO_InitStruct = {0}; + 8001178: f107 0314 add.w r3, r7, #20 + 800117c: 2200 movs r2, #0 + 800117e: 601a str r2, [r3, #0] + 8001180: 605a str r2, [r3, #4] + 8001182: 609a str r2, [r3, #8] + 8001184: 60da str r2, [r3, #12] + 8001186: 611a str r2, [r3, #16] + if(hpcd->Instance==USB_OTG_FS) + 8001188: 687b ldr r3, [r7, #4] + 800118a: 681b ldr r3, [r3, #0] + 800118c: f1b3 4fa0 cmp.w r3, #1342177280 ; 0x50000000 + 8001190: d13f bne.n 8001212 + { + /* USER CODE BEGIN USB_OTG_FS_MspInit 0 */ + + /* USER CODE END USB_OTG_FS_MspInit 0 */ + + __HAL_RCC_GPIOA_CLK_ENABLE(); + 8001192: 2300 movs r3, #0 + 8001194: 613b str r3, [r7, #16] + 8001196: 4b21 ldr r3, [pc, #132] ; (800121c ) + 8001198: 6b1b ldr r3, [r3, #48] ; 0x30 + 800119a: 4a20 ldr r2, [pc, #128] ; (800121c ) + 800119c: f043 0301 orr.w r3, r3, #1 + 80011a0: 6313 str r3, [r2, #48] ; 0x30 + 80011a2: 4b1e ldr r3, [pc, #120] ; (800121c ) + 80011a4: 6b1b ldr r3, [r3, #48] ; 0x30 + 80011a6: f003 0301 and.w r3, r3, #1 + 80011aa: 613b str r3, [r7, #16] + 80011ac: 693b ldr r3, [r7, #16] + PA9 ------> USB_OTG_FS_VBUS + PA10 ------> USB_OTG_FS_ID + PA11 ------> USB_OTG_FS_DM + PA12 ------> USB_OTG_FS_DP + */ + GPIO_InitStruct.Pin = USB_SOF_Pin|USB_ID_Pin|USB_DM_Pin|USB_DP_Pin; + 80011ae: f44f 53e8 mov.w r3, #7424 ; 0x1d00 + 80011b2: 617b str r3, [r7, #20] + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 80011b4: 2302 movs r3, #2 + 80011b6: 61bb str r3, [r7, #24] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 80011b8: 2300 movs r3, #0 + 80011ba: 61fb str r3, [r7, #28] + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + 80011bc: 2303 movs r3, #3 + 80011be: 623b str r3, [r7, #32] + GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS; + 80011c0: 230a movs r3, #10 + 80011c2: 627b str r3, [r7, #36] ; 0x24 + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + 80011c4: f107 0314 add.w r3, r7, #20 + 80011c8: 4619 mov r1, r3 + 80011ca: 4815 ldr r0, [pc, #84] ; (8001220 ) + 80011cc: f001 fbec bl 80029a8 + + GPIO_InitStruct.Pin = USB_VBUS_Pin; + 80011d0: f44f 7300 mov.w r3, #512 ; 0x200 + 80011d4: 617b str r3, [r7, #20] + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + 80011d6: 2300 movs r3, #0 + 80011d8: 61bb str r3, [r7, #24] + GPIO_InitStruct.Pull = GPIO_NOPULL; + 80011da: 2300 movs r3, #0 + 80011dc: 61fb str r3, [r7, #28] + HAL_GPIO_Init(USB_VBUS_GPIO_Port, &GPIO_InitStruct); + 80011de: f107 0314 add.w r3, r7, #20 + 80011e2: 4619 mov r1, r3 + 80011e4: 480e ldr r0, [pc, #56] ; (8001220 ) + 80011e6: f001 fbdf bl 80029a8 + + /* Peripheral clock enable */ + __HAL_RCC_USB_OTG_FS_CLK_ENABLE(); + 80011ea: 4b0c ldr r3, [pc, #48] ; (800121c ) + 80011ec: 6b5b ldr r3, [r3, #52] ; 0x34 + 80011ee: 4a0b ldr r2, [pc, #44] ; (800121c ) + 80011f0: f043 0380 orr.w r3, r3, #128 ; 0x80 + 80011f4: 6353 str r3, [r2, #52] ; 0x34 + 80011f6: 2300 movs r3, #0 + 80011f8: 60fb str r3, [r7, #12] + 80011fa: 4b08 ldr r3, [pc, #32] ; (800121c ) + 80011fc: 6c5b ldr r3, [r3, #68] ; 0x44 + 80011fe: 4a07 ldr r2, [pc, #28] ; (800121c ) + 8001200: f443 4380 orr.w r3, r3, #16384 ; 0x4000 + 8001204: 6453 str r3, [r2, #68] ; 0x44 + 8001206: 4b05 ldr r3, [pc, #20] ; (800121c ) + 8001208: 6c5b ldr r3, [r3, #68] ; 0x44 + 800120a: f403 4380 and.w r3, r3, #16384 ; 0x4000 + 800120e: 60fb str r3, [r7, #12] + 8001210: 68fb ldr r3, [r7, #12] + /* USER CODE BEGIN USB_OTG_FS_MspInit 1 */ + + /* USER CODE END USB_OTG_FS_MspInit 1 */ + } + +} + 8001212: bf00 nop + 8001214: 3728 adds r7, #40 ; 0x28 + 8001216: 46bd mov sp, r7 + 8001218: bd80 pop {r7, pc} + 800121a: bf00 nop + 800121c: 40023800 .word 0x40023800 + 8001220: 40020000 .word 0x40020000 + +08001224 : +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + 8001224: b480 push {r7} + 8001226: af00 add r7, sp, #0 + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + while (1) + 8001228: e7fe b.n 8001228 + +0800122a : + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + 800122a: b480 push {r7} + 800122c: af00 add r7, sp, #0 + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + 800122e: e7fe b.n 800122e + +08001230 : + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + 8001230: b480 push {r7} + 8001232: af00 add r7, sp, #0 + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + 8001234: e7fe b.n 8001234 + +08001236 : + +/** + * @brief This function handles Pre-fetch fault, memory access fault. + */ +void BusFault_Handler(void) +{ + 8001236: b480 push {r7} + 8001238: af00 add r7, sp, #0 + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + 800123a: e7fe b.n 800123a + +0800123c : + +/** + * @brief This function handles Undefined instruction or illegal state. + */ +void UsageFault_Handler(void) +{ + 800123c: b480 push {r7} + 800123e: af00 add r7, sp, #0 + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + 8001240: e7fe b.n 8001240 + +08001242 : + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + 8001242: b480 push {r7} + 8001244: af00 add r7, sp, #0 + + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ + + /* USER CODE END SVCall_IRQn 1 */ +} + 8001246: bf00 nop + 8001248: 46bd mov sp, r7 + 800124a: bc80 pop {r7} + 800124c: 4770 bx lr + +0800124e : + +/** + * @brief This function handles Debug monitor. + */ +void DebugMon_Handler(void) +{ + 800124e: b480 push {r7} + 8001250: af00 add r7, sp, #0 + + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + + /* USER CODE END DebugMonitor_IRQn 1 */ +} + 8001252: bf00 nop + 8001254: 46bd mov sp, r7 + 8001256: bc80 pop {r7} + 8001258: 4770 bx lr + +0800125a : + +/** + * @brief This function handles Pendable request for system service. + */ +void PendSV_Handler(void) +{ + 800125a: b480 push {r7} + 800125c: af00 add r7, sp, #0 + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + 800125e: bf00 nop + 8001260: 46bd mov sp, r7 + 8001262: bc80 pop {r7} + 8001264: 4770 bx lr + +08001266 : + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + 8001266: b580 push {r7, lr} + 8001268: af00 add r7, sp, #0 + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + 800126a: f000 f957 bl 800151c + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + 800126e: bf00 nop + 8001270: bd80 pop {r7, pc} + ... + +08001274 : + +/** + * @brief This function handles TIM7 global interrupt. + */ +void TIM7_IRQHandler(void) +{ + 8001274: b580 push {r7, lr} + 8001276: af00 add r7, sp, #0 + /* USER CODE BEGIN TIM7_IRQn 0 */ + + /* USER CODE END TIM7_IRQn 0 */ + HAL_TIM_IRQHandler(&htim7); + 8001278: 4803 ldr r0, [pc, #12] ; (8001288 ) + 800127a: f002 fcd7 bl 8003c2c + /* USER CODE BEGIN TIM7_IRQn 1 */ + MX_LWIP_Process(); + 800127e: f003 ffdf bl 8005240 + /* USER CODE END TIM7_IRQn 1 */ +} + 8001282: bf00 nop + 8001284: bd80 pop {r7, pc} + 8001286: bf00 nop + 8001288: 20000120 .word 0x20000120 + +0800128c <_getpid>: +void initialise_monitor_handles() +{ +} + +int _getpid(void) +{ + 800128c: b480 push {r7} + 800128e: af00 add r7, sp, #0 + return 1; + 8001290: 2301 movs r3, #1 +} + 8001292: 4618 mov r0, r3 + 8001294: 46bd mov sp, r7 + 8001296: bc80 pop {r7} + 8001298: 4770 bx lr + ... + +0800129c <_kill>: + +int _kill(int pid, int sig) +{ + 800129c: b480 push {r7} + 800129e: b083 sub sp, #12 + 80012a0: af00 add r7, sp, #0 + 80012a2: 6078 str r0, [r7, #4] + 80012a4: 6039 str r1, [r7, #0] + (void)pid; + (void)sig; + errno = EINVAL; + 80012a6: 4b05 ldr r3, [pc, #20] ; (80012bc <_kill+0x20>) + 80012a8: 2216 movs r2, #22 + 80012aa: 601a str r2, [r3, #0] + return -1; + 80012ac: f04f 33ff mov.w r3, #4294967295 +} + 80012b0: 4618 mov r0, r3 + 80012b2: 370c adds r7, #12 + 80012b4: 46bd mov sp, r7 + 80012b6: bc80 pop {r7} + 80012b8: 4770 bx lr + 80012ba: bf00 nop + 80012bc: 20007234 .word 0x20007234 + +080012c0 <_exit>: + +void _exit (int status) +{ + 80012c0: b580 push {r7, lr} + 80012c2: b082 sub sp, #8 + 80012c4: af00 add r7, sp, #0 + 80012c6: 6078 str r0, [r7, #4] + _kill(status, -1); + 80012c8: f04f 31ff mov.w r1, #4294967295 + 80012cc: 6878 ldr r0, [r7, #4] + 80012ce: f7ff ffe5 bl 800129c <_kill> + while (1) {} /* Make sure we hang here */ + 80012d2: e7fe b.n 80012d2 <_exit+0x12> + +080012d4 <_read>: +} + +__attribute__((weak)) int _read(int file, char *ptr, int len) +{ + 80012d4: b580 push {r7, lr} + 80012d6: b086 sub sp, #24 + 80012d8: af00 add r7, sp, #0 + 80012da: 60f8 str r0, [r7, #12] + 80012dc: 60b9 str r1, [r7, #8] + 80012de: 607a str r2, [r7, #4] + (void)file; + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + 80012e0: 2300 movs r3, #0 + 80012e2: 617b str r3, [r7, #20] + 80012e4: e00a b.n 80012fc <_read+0x28> + { + *ptr++ = __io_getchar(); + 80012e6: f3af 8000 nop.w + 80012ea: 4601 mov r1, r0 + 80012ec: 68bb ldr r3, [r7, #8] + 80012ee: 1c5a adds r2, r3, #1 + 80012f0: 60ba str r2, [r7, #8] + 80012f2: b2ca uxtb r2, r1 + 80012f4: 701a strb r2, [r3, #0] + for (DataIdx = 0; DataIdx < len; DataIdx++) + 80012f6: 697b ldr r3, [r7, #20] + 80012f8: 3301 adds r3, #1 + 80012fa: 617b str r3, [r7, #20] + 80012fc: 697a ldr r2, [r7, #20] + 80012fe: 687b ldr r3, [r7, #4] + 8001300: 429a cmp r2, r3 + 8001302: dbf0 blt.n 80012e6 <_read+0x12> + } + + return len; + 8001304: 687b ldr r3, [r7, #4] +} + 8001306: 4618 mov r0, r3 + 8001308: 3718 adds r7, #24 + 800130a: 46bd mov sp, r7 + 800130c: bd80 pop {r7, pc} + +0800130e <_write>: + +__attribute__((weak)) int _write(int file, char *ptr, int len) +{ + 800130e: b580 push {r7, lr} + 8001310: b086 sub sp, #24 + 8001312: af00 add r7, sp, #0 + 8001314: 60f8 str r0, [r7, #12] + 8001316: 60b9 str r1, [r7, #8] + 8001318: 607a str r2, [r7, #4] + (void)file; + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + 800131a: 2300 movs r3, #0 + 800131c: 617b str r3, [r7, #20] + 800131e: e009 b.n 8001334 <_write+0x26> + { + __io_putchar(*ptr++); + 8001320: 68bb ldr r3, [r7, #8] + 8001322: 1c5a adds r2, r3, #1 + 8001324: 60ba str r2, [r7, #8] + 8001326: 781b ldrb r3, [r3, #0] + 8001328: 4618 mov r0, r3 + 800132a: f3af 8000 nop.w + for (DataIdx = 0; DataIdx < len; DataIdx++) + 800132e: 697b ldr r3, [r7, #20] + 8001330: 3301 adds r3, #1 + 8001332: 617b str r3, [r7, #20] + 8001334: 697a ldr r2, [r7, #20] + 8001336: 687b ldr r3, [r7, #4] + 8001338: 429a cmp r2, r3 + 800133a: dbf1 blt.n 8001320 <_write+0x12> + } + return len; + 800133c: 687b ldr r3, [r7, #4] +} + 800133e: 4618 mov r0, r3 + 8001340: 3718 adds r7, #24 + 8001342: 46bd mov sp, r7 + 8001344: bd80 pop {r7, pc} + +08001346 <_close>: + +int _close(int file) +{ + 8001346: b480 push {r7} + 8001348: b083 sub sp, #12 + 800134a: af00 add r7, sp, #0 + 800134c: 6078 str r0, [r7, #4] + (void)file; + return -1; + 800134e: f04f 33ff mov.w r3, #4294967295 +} + 8001352: 4618 mov r0, r3 + 8001354: 370c adds r7, #12 + 8001356: 46bd mov sp, r7 + 8001358: bc80 pop {r7} + 800135a: 4770 bx lr + +0800135c <_fstat>: + + +int _fstat(int file, struct stat *st) +{ + 800135c: b480 push {r7} + 800135e: b083 sub sp, #12 + 8001360: af00 add r7, sp, #0 + 8001362: 6078 str r0, [r7, #4] + 8001364: 6039 str r1, [r7, #0] + (void)file; + st->st_mode = S_IFCHR; + 8001366: 683b ldr r3, [r7, #0] + 8001368: f44f 5200 mov.w r2, #8192 ; 0x2000 + 800136c: 605a str r2, [r3, #4] + return 0; + 800136e: 2300 movs r3, #0 +} + 8001370: 4618 mov r0, r3 + 8001372: 370c adds r7, #12 + 8001374: 46bd mov sp, r7 + 8001376: bc80 pop {r7} + 8001378: 4770 bx lr + +0800137a <_isatty>: + +int _isatty(int file) +{ + 800137a: b480 push {r7} + 800137c: b083 sub sp, #12 + 800137e: af00 add r7, sp, #0 + 8001380: 6078 str r0, [r7, #4] + (void)file; + return 1; + 8001382: 2301 movs r3, #1 +} + 8001384: 4618 mov r0, r3 + 8001386: 370c adds r7, #12 + 8001388: 46bd mov sp, r7 + 800138a: bc80 pop {r7} + 800138c: 4770 bx lr + +0800138e <_lseek>: + +int _lseek(int file, int ptr, int dir) +{ + 800138e: b480 push {r7} + 8001390: b085 sub sp, #20 + 8001392: af00 add r7, sp, #0 + 8001394: 60f8 str r0, [r7, #12] + 8001396: 60b9 str r1, [r7, #8] + 8001398: 607a str r2, [r7, #4] + (void)file; + (void)ptr; + (void)dir; + return 0; + 800139a: 2300 movs r3, #0 +} + 800139c: 4618 mov r0, r3 + 800139e: 3714 adds r7, #20 + 80013a0: 46bd mov sp, r7 + 80013a2: bc80 pop {r7} + 80013a4: 4770 bx lr + ... + +080013a8 <_sbrk>: + * + * @param incr Memory size + * @return Pointer to allocated memory + */ +void *_sbrk(ptrdiff_t incr) +{ + 80013a8: b480 push {r7} + 80013aa: b087 sub sp, #28 + 80013ac: af00 add r7, sp, #0 + 80013ae: 6078 str r0, [r7, #4] + 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; + 80013b0: 4a14 ldr r2, [pc, #80] ; (8001404 <_sbrk+0x5c>) + 80013b2: 4b15 ldr r3, [pc, #84] ; (8001408 <_sbrk+0x60>) + 80013b4: 1ad3 subs r3, r2, r3 + 80013b6: 617b str r3, [r7, #20] + const uint8_t *max_heap = (uint8_t *)stack_limit; + 80013b8: 697b ldr r3, [r7, #20] + 80013ba: 613b str r3, [r7, #16] + uint8_t *prev_heap_end; + + /* Initialize heap end at first call */ + if (NULL == __sbrk_heap_end) + 80013bc: 4b13 ldr r3, [pc, #76] ; (800140c <_sbrk+0x64>) + 80013be: 681b ldr r3, [r3, #0] + 80013c0: 2b00 cmp r3, #0 + 80013c2: d102 bne.n 80013ca <_sbrk+0x22> + { + __sbrk_heap_end = &_end; + 80013c4: 4b11 ldr r3, [pc, #68] ; (800140c <_sbrk+0x64>) + 80013c6: 4a12 ldr r2, [pc, #72] ; (8001410 <_sbrk+0x68>) + 80013c8: 601a str r2, [r3, #0] + } + + /* Protect heap from growing into the reserved MSP stack */ + if (__sbrk_heap_end + incr > max_heap) + 80013ca: 4b10 ldr r3, [pc, #64] ; (800140c <_sbrk+0x64>) + 80013cc: 681a ldr r2, [r3, #0] + 80013ce: 687b ldr r3, [r7, #4] + 80013d0: 4413 add r3, r2 + 80013d2: 693a ldr r2, [r7, #16] + 80013d4: 429a cmp r2, r3 + 80013d6: d205 bcs.n 80013e4 <_sbrk+0x3c> + { + errno = ENOMEM; + 80013d8: 4b0e ldr r3, [pc, #56] ; (8001414 <_sbrk+0x6c>) + 80013da: 220c movs r2, #12 + 80013dc: 601a str r2, [r3, #0] + return (void *)-1; + 80013de: f04f 33ff mov.w r3, #4294967295 + 80013e2: e009 b.n 80013f8 <_sbrk+0x50> + } + + prev_heap_end = __sbrk_heap_end; + 80013e4: 4b09 ldr r3, [pc, #36] ; (800140c <_sbrk+0x64>) + 80013e6: 681b ldr r3, [r3, #0] + 80013e8: 60fb str r3, [r7, #12] + __sbrk_heap_end += incr; + 80013ea: 4b08 ldr r3, [pc, #32] ; (800140c <_sbrk+0x64>) + 80013ec: 681a ldr r2, [r3, #0] + 80013ee: 687b ldr r3, [r7, #4] + 80013f0: 4413 add r3, r2 + 80013f2: 4a06 ldr r2, [pc, #24] ; (800140c <_sbrk+0x64>) + 80013f4: 6013 str r3, [r2, #0] + + return (void *)prev_heap_end; + 80013f6: 68fb ldr r3, [r7, #12] +} + 80013f8: 4618 mov r0, r3 + 80013fa: 371c adds r7, #28 + 80013fc: 46bd mov sp, r7 + 80013fe: bc80 pop {r7} + 8001400: 4770 bx lr + 8001402: bf00 nop + 8001404: 20020000 .word 0x20020000 + 8001408: 00000400 .word 0x00000400 + 800140c: 200008b4 .word 0x200008b4 + 8001410: 20007248 .word 0x20007248 + 8001414: 20007234 .word 0x20007234 + +08001418 : + * SystemFrequency variable. + * @param None + * @retval None + */ +void SystemInit(void) +{ + 8001418: b480 push {r7} + 800141a: af00 add r7, sp, #0 + + /* Configure the Vector Table location -------------------------------------*/ +#if defined(USER_VECT_TAB_ADDRESS) + SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ +#endif /* USER_VECT_TAB_ADDRESS */ +} + 800141c: bf00 nop + 800141e: 46bd mov sp, r7 + 8001420: bc80 pop {r7} + 8001422: 4770 bx lr + +08001424 : + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr sp, =_estack /* set stack pointer */ + 8001424: f8df d034 ldr.w sp, [pc, #52] ; 800145c + +/* Copy the data segment initializers from flash to SRAM */ + ldr r0, =_sdata + 8001428: 480d ldr r0, [pc, #52] ; (8001460 ) + ldr r1, =_edata + 800142a: 490e ldr r1, [pc, #56] ; (8001464 ) + ldr r2, =_sidata + 800142c: 4a0e ldr r2, [pc, #56] ; (8001468 ) + movs r3, #0 + 800142e: 2300 movs r3, #0 + b LoopCopyDataInit + 8001430: e002 b.n 8001438 + +08001432 : + +CopyDataInit: + ldr r4, [r2, r3] + 8001432: 58d4 ldr r4, [r2, r3] + str r4, [r0, r3] + 8001434: 50c4 str r4, [r0, r3] + adds r3, r3, #4 + 8001436: 3304 adds r3, #4 + +08001438 : + +LoopCopyDataInit: + adds r4, r0, r3 + 8001438: 18c4 adds r4, r0, r3 + cmp r4, r1 + 800143a: 428c cmp r4, r1 + bcc CopyDataInit + 800143c: d3f9 bcc.n 8001432 + +/* Zero fill the bss segment. */ + ldr r2, =_sbss + 800143e: 4a0b ldr r2, [pc, #44] ; (800146c ) + ldr r4, =_ebss + 8001440: 4c0b ldr r4, [pc, #44] ; (8001470 ) + movs r3, #0 + 8001442: 2300 movs r3, #0 + b LoopFillZerobss + 8001444: e001 b.n 800144a + +08001446 : + +FillZerobss: + str r3, [r2] + 8001446: 6013 str r3, [r2, #0] + adds r2, r2, #4 + 8001448: 3204 adds r2, #4 + +0800144a : + +LoopFillZerobss: + cmp r2, r4 + 800144a: 42a2 cmp r2, r4 + bcc FillZerobss + 800144c: d3fb bcc.n 8001446 + +/* Call the clock system initialization function.*/ + bl SystemInit + 800144e: f7ff ffe3 bl 8001418 +/* Call static constructors */ + bl __libc_init_array + 8001452: f011 fe3b bl 80130cc <__libc_init_array> +/* Call the application's entry point.*/ + bl main + 8001456: f7ff f847 bl 80004e8
+ bx lr + 800145a: 4770 bx lr + ldr sp, =_estack /* set stack pointer */ + 800145c: 20020000 .word 0x20020000 + ldr r0, =_sdata + 8001460: 20000000 .word 0x20000000 + ldr r1, =_edata + 8001464: 20000074 .word 0x20000074 + ldr r2, =_sidata + 8001468: 0801686c .word 0x0801686c + ldr r2, =_sbss + 800146c: 20000074 .word 0x20000074 + ldr r4, =_ebss + 8001470: 20007244 .word 0x20007244 + +08001474 : + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + 8001474: e7fe b.n 8001474 + ... + +08001478 : + * 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) +{ + 8001478: b580 push {r7, lr} + 800147a: af00 add r7, sp, #0 + /* Configure Flash prefetch, Instruction cache, Data cache */ +#if (INSTRUCTION_CACHE_ENABLE != 0U) + __HAL_FLASH_INSTRUCTION_CACHE_ENABLE(); + 800147c: 4b0e ldr r3, [pc, #56] ; (80014b8 ) + 800147e: 681b ldr r3, [r3, #0] + 8001480: 4a0d ldr r2, [pc, #52] ; (80014b8 ) + 8001482: f443 7300 orr.w r3, r3, #512 ; 0x200 + 8001486: 6013 str r3, [r2, #0] +#endif /* INSTRUCTION_CACHE_ENABLE */ + +#if (DATA_CACHE_ENABLE != 0U) + __HAL_FLASH_DATA_CACHE_ENABLE(); + 8001488: 4b0b ldr r3, [pc, #44] ; (80014b8 ) + 800148a: 681b ldr r3, [r3, #0] + 800148c: 4a0a ldr r2, [pc, #40] ; (80014b8 ) + 800148e: f443 6380 orr.w r3, r3, #1024 ; 0x400 + 8001492: 6013 str r3, [r2, #0] +#endif /* DATA_CACHE_ENABLE */ + +#if (PREFETCH_ENABLE != 0U) + __HAL_FLASH_PREFETCH_BUFFER_ENABLE(); + 8001494: 4b08 ldr r3, [pc, #32] ; (80014b8 ) + 8001496: 681b ldr r3, [r3, #0] + 8001498: 4a07 ldr r2, [pc, #28] ; (80014b8 ) + 800149a: f443 7380 orr.w r3, r3, #256 ; 0x100 + 800149e: 6013 str r3, [r2, #0] +#endif /* PREFETCH_ENABLE */ + + /* Set Interrupt Group Priority */ + HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); + 80014a0: 2003 movs r0, #3 + 80014a2: f000 f947 bl 8001734 + + /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ + HAL_InitTick(TICK_INT_PRIORITY); + 80014a6: 2000 movs r0, #0 + 80014a8: f000 f808 bl 80014bc + + /* Init the low level hardware */ + HAL_MspInit(); + 80014ac: f7ff fcfa bl 8000ea4 + + /* Return function status */ + return HAL_OK; + 80014b0: 2300 movs r3, #0 +} + 80014b2: 4618 mov r0, r3 + 80014b4: bd80 pop {r7, pc} + 80014b6: bf00 nop + 80014b8: 40023c00 .word 0x40023c00 + +080014bc : + * implementation in user file. + * @param TickPriority Tick interrupt priority. + * @retval HAL status + */ +__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) +{ + 80014bc: b580 push {r7, lr} + 80014be: b082 sub sp, #8 + 80014c0: af00 add r7, sp, #0 + 80014c2: 6078 str r0, [r7, #4] + /* Configure the SysTick to have interrupt in 1ms time basis*/ + if (HAL_SYSTICK_Config(SystemCoreClock / (1000U / uwTickFreq)) > 0U) + 80014c4: 4b12 ldr r3, [pc, #72] ; (8001510 ) + 80014c6: 681a ldr r2, [r3, #0] + 80014c8: 4b12 ldr r3, [pc, #72] ; (8001514 ) + 80014ca: 781b ldrb r3, [r3, #0] + 80014cc: 4619 mov r1, r3 + 80014ce: f44f 737a mov.w r3, #1000 ; 0x3e8 + 80014d2: fbb3 f3f1 udiv r3, r3, r1 + 80014d6: fbb2 f3f3 udiv r3, r2, r3 + 80014da: 4618 mov r0, r3 + 80014dc: f000 f95f bl 800179e + 80014e0: 4603 mov r3, r0 + 80014e2: 2b00 cmp r3, #0 + 80014e4: d001 beq.n 80014ea + { + return HAL_ERROR; + 80014e6: 2301 movs r3, #1 + 80014e8: e00e b.n 8001508 + } + + /* Configure the SysTick IRQ priority */ + if (TickPriority < (1UL << __NVIC_PRIO_BITS)) + 80014ea: 687b ldr r3, [r7, #4] + 80014ec: 2b0f cmp r3, #15 + 80014ee: d80a bhi.n 8001506 + { + HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); + 80014f0: 2200 movs r2, #0 + 80014f2: 6879 ldr r1, [r7, #4] + 80014f4: f04f 30ff mov.w r0, #4294967295 + 80014f8: f000 f927 bl 800174a + uwTickPrio = TickPriority; + 80014fc: 4a06 ldr r2, [pc, #24] ; (8001518 ) + 80014fe: 687b ldr r3, [r7, #4] + 8001500: 6013 str r3, [r2, #0] + { + return HAL_ERROR; + } + + /* Return function status */ + return HAL_OK; + 8001502: 2300 movs r3, #0 + 8001504: e000 b.n 8001508 + return HAL_ERROR; + 8001506: 2301 movs r3, #1 +} + 8001508: 4618 mov r0, r3 + 800150a: 3708 adds r7, #8 + 800150c: 46bd mov sp, r7 + 800150e: bd80 pop {r7, pc} + 8001510: 20000000 .word 0x20000000 + 8001514: 20000008 .word 0x20000008 + 8001518: 20000004 .word 0x20000004 + +0800151c : + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval None + */ +__weak void HAL_IncTick(void) +{ + 800151c: b480 push {r7} + 800151e: af00 add r7, sp, #0 + uwTick += uwTickFreq; + 8001520: 4b05 ldr r3, [pc, #20] ; (8001538 ) + 8001522: 781b ldrb r3, [r3, #0] + 8001524: 461a mov r2, r3 + 8001526: 4b05 ldr r3, [pc, #20] ; (800153c ) + 8001528: 681b ldr r3, [r3, #0] + 800152a: 4413 add r3, r2 + 800152c: 4a03 ldr r2, [pc, #12] ; (800153c ) + 800152e: 6013 str r3, [r2, #0] +} + 8001530: bf00 nop + 8001532: 46bd mov sp, r7 + 8001534: bc80 pop {r7} + 8001536: 4770 bx lr + 8001538: 20000008 .word 0x20000008 + 800153c: 200008b8 .word 0x200008b8 + +08001540 : + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval tick value + */ +__weak uint32_t HAL_GetTick(void) +{ + 8001540: b480 push {r7} + 8001542: af00 add r7, sp, #0 + return uwTick; + 8001544: 4b02 ldr r3, [pc, #8] ; (8001550 ) + 8001546: 681b ldr r3, [r3, #0] +} + 8001548: 4618 mov r0, r3 + 800154a: 46bd mov sp, r7 + 800154c: bc80 pop {r7} + 800154e: 4770 bx lr + 8001550: 200008b8 .word 0x200008b8 + +08001554 : + * implementations in user file. + * @param Delay specifies the delay time length, in milliseconds. + * @retval None + */ +__weak void HAL_Delay(__IO uint32_t Delay) +{ + 8001554: b580 push {r7, lr} + 8001556: b084 sub sp, #16 + 8001558: af00 add r7, sp, #0 + 800155a: 6078 str r0, [r7, #4] + uint32_t tickstart = HAL_GetTick(); + 800155c: f7ff fff0 bl 8001540 + 8001560: 60b8 str r0, [r7, #8] + uint32_t wait = Delay; + 8001562: 687b ldr r3, [r7, #4] + 8001564: 60fb str r3, [r7, #12] + + /* Add a freq to guarantee minimum wait */ + if (wait < HAL_MAX_DELAY) + 8001566: 68fb ldr r3, [r7, #12] + 8001568: f1b3 3fff cmp.w r3, #4294967295 + 800156c: d005 beq.n 800157a + { + wait += (uint32_t)(uwTickFreq); + 800156e: 4b0a ldr r3, [pc, #40] ; (8001598 ) + 8001570: 781b ldrb r3, [r3, #0] + 8001572: 461a mov r2, r3 + 8001574: 68fb ldr r3, [r7, #12] + 8001576: 4413 add r3, r2 + 8001578: 60fb str r3, [r7, #12] + } + + while ((HAL_GetTick() - tickstart) < wait) + 800157a: bf00 nop + 800157c: f7ff ffe0 bl 8001540 + 8001580: 4602 mov r2, r0 + 8001582: 68bb ldr r3, [r7, #8] + 8001584: 1ad3 subs r3, r2, r3 + 8001586: 68fa ldr r2, [r7, #12] + 8001588: 429a cmp r2, r3 + 800158a: d8f7 bhi.n 800157c + { + } +} + 800158c: bf00 nop + 800158e: bf00 nop + 8001590: 3710 adds r7, #16 + 8001592: 46bd mov sp, r7 + 8001594: bd80 pop {r7, pc} + 8001596: bf00 nop + 8001598: 20000008 .word 0x20000008 + +0800159c <__NVIC_SetPriorityGrouping>: + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + 800159c: b480 push {r7} + 800159e: b085 sub sp, #20 + 80015a0: af00 add r7, sp, #0 + 80015a2: 6078 str r0, [r7, #4] + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + 80015a4: 687b ldr r3, [r7, #4] + 80015a6: f003 0307 and.w r3, r3, #7 + 80015aa: 60fb str r3, [r7, #12] + + reg_value = SCB->AIRCR; /* read old register configuration */ + 80015ac: 4b0c ldr r3, [pc, #48] ; (80015e0 <__NVIC_SetPriorityGrouping+0x44>) + 80015ae: 68db ldr r3, [r3, #12] + 80015b0: 60bb str r3, [r7, #8] + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + 80015b2: 68ba ldr r2, [r7, #8] + 80015b4: f64f 03ff movw r3, #63743 ; 0xf8ff + 80015b8: 4013 ands r3, r2 + 80015ba: 60bb str r3, [r7, #8] + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + 80015bc: 68fb ldr r3, [r7, #12] + 80015be: 021a lsls r2, r3, #8 + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + 80015c0: 68bb ldr r3, [r7, #8] + 80015c2: 4313 orrs r3, r2 + reg_value = (reg_value | + 80015c4: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 + 80015c8: f443 3300 orr.w r3, r3, #131072 ; 0x20000 + 80015cc: 60bb str r3, [r7, #8] + SCB->AIRCR = reg_value; + 80015ce: 4a04 ldr r2, [pc, #16] ; (80015e0 <__NVIC_SetPriorityGrouping+0x44>) + 80015d0: 68bb ldr r3, [r7, #8] + 80015d2: 60d3 str r3, [r2, #12] +} + 80015d4: bf00 nop + 80015d6: 3714 adds r7, #20 + 80015d8: 46bd mov sp, r7 + 80015da: bc80 pop {r7} + 80015dc: 4770 bx lr + 80015de: bf00 nop + 80015e0: e000ed00 .word 0xe000ed00 + +080015e4 <__NVIC_GetPriorityGrouping>: + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + 80015e4: b480 push {r7} + 80015e6: af00 add r7, sp, #0 + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); + 80015e8: 4b04 ldr r3, [pc, #16] ; (80015fc <__NVIC_GetPriorityGrouping+0x18>) + 80015ea: 68db ldr r3, [r3, #12] + 80015ec: 0a1b lsrs r3, r3, #8 + 80015ee: f003 0307 and.w r3, r3, #7 +} + 80015f2: 4618 mov r0, r3 + 80015f4: 46bd mov sp, r7 + 80015f6: bc80 pop {r7} + 80015f8: 4770 bx lr + 80015fa: bf00 nop + 80015fc: e000ed00 .word 0xe000ed00 + +08001600 <__NVIC_EnableIRQ>: + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + 8001600: b480 push {r7} + 8001602: b083 sub sp, #12 + 8001604: af00 add r7, sp, #0 + 8001606: 4603 mov r3, r0 + 8001608: 71fb strb r3, [r7, #7] + if ((int32_t)(IRQn) >= 0) + 800160a: f997 3007 ldrsb.w r3, [r7, #7] + 800160e: 2b00 cmp r3, #0 + 8001610: db0b blt.n 800162a <__NVIC_EnableIRQ+0x2a> + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + 8001612: 79fb ldrb r3, [r7, #7] + 8001614: f003 021f and.w r2, r3, #31 + 8001618: 4906 ldr r1, [pc, #24] ; (8001634 <__NVIC_EnableIRQ+0x34>) + 800161a: f997 3007 ldrsb.w r3, [r7, #7] + 800161e: 095b lsrs r3, r3, #5 + 8001620: 2001 movs r0, #1 + 8001622: fa00 f202 lsl.w r2, r0, r2 + 8001626: f841 2023 str.w r2, [r1, r3, lsl #2] + } +} + 800162a: bf00 nop + 800162c: 370c adds r7, #12 + 800162e: 46bd mov sp, r7 + 8001630: bc80 pop {r7} + 8001632: 4770 bx lr + 8001634: e000e100 .word 0xe000e100 + +08001638 <__NVIC_SetPriority>: + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + 8001638: b480 push {r7} + 800163a: b083 sub sp, #12 + 800163c: af00 add r7, sp, #0 + 800163e: 4603 mov r3, r0 + 8001640: 6039 str r1, [r7, #0] + 8001642: 71fb strb r3, [r7, #7] + if ((int32_t)(IRQn) >= 0) + 8001644: f997 3007 ldrsb.w r3, [r7, #7] + 8001648: 2b00 cmp r3, #0 + 800164a: db0a blt.n 8001662 <__NVIC_SetPriority+0x2a> + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + 800164c: 683b ldr r3, [r7, #0] + 800164e: b2da uxtb r2, r3 + 8001650: 490c ldr r1, [pc, #48] ; (8001684 <__NVIC_SetPriority+0x4c>) + 8001652: f997 3007 ldrsb.w r3, [r7, #7] + 8001656: 0112 lsls r2, r2, #4 + 8001658: b2d2 uxtb r2, r2 + 800165a: 440b add r3, r1 + 800165c: f883 2300 strb.w r2, [r3, #768] ; 0x300 + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + 8001660: e00a b.n 8001678 <__NVIC_SetPriority+0x40> + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + 8001662: 683b ldr r3, [r7, #0] + 8001664: b2da uxtb r2, r3 + 8001666: 4908 ldr r1, [pc, #32] ; (8001688 <__NVIC_SetPriority+0x50>) + 8001668: 79fb ldrb r3, [r7, #7] + 800166a: f003 030f and.w r3, r3, #15 + 800166e: 3b04 subs r3, #4 + 8001670: 0112 lsls r2, r2, #4 + 8001672: b2d2 uxtb r2, r2 + 8001674: 440b add r3, r1 + 8001676: 761a strb r2, [r3, #24] +} + 8001678: bf00 nop + 800167a: 370c adds r7, #12 + 800167c: 46bd mov sp, r7 + 800167e: bc80 pop {r7} + 8001680: 4770 bx lr + 8001682: bf00 nop + 8001684: e000e100 .word 0xe000e100 + 8001688: e000ed00 .word 0xe000ed00 + +0800168c : + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + 800168c: b480 push {r7} + 800168e: b089 sub sp, #36 ; 0x24 + 8001690: af00 add r7, sp, #0 + 8001692: 60f8 str r0, [r7, #12] + 8001694: 60b9 str r1, [r7, #8] + 8001696: 607a str r2, [r7, #4] + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + 8001698: 68fb ldr r3, [r7, #12] + 800169a: f003 0307 and.w r3, r3, #7 + 800169e: 61fb str r3, [r7, #28] + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + 80016a0: 69fb ldr r3, [r7, #28] + 80016a2: f1c3 0307 rsb r3, r3, #7 + 80016a6: 2b04 cmp r3, #4 + 80016a8: bf28 it cs + 80016aa: 2304 movcs r3, #4 + 80016ac: 61bb str r3, [r7, #24] + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + 80016ae: 69fb ldr r3, [r7, #28] + 80016b0: 3304 adds r3, #4 + 80016b2: 2b06 cmp r3, #6 + 80016b4: d902 bls.n 80016bc + 80016b6: 69fb ldr r3, [r7, #28] + 80016b8: 3b03 subs r3, #3 + 80016ba: e000 b.n 80016be + 80016bc: 2300 movs r3, #0 + 80016be: 617b str r3, [r7, #20] + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + 80016c0: f04f 32ff mov.w r2, #4294967295 + 80016c4: 69bb ldr r3, [r7, #24] + 80016c6: fa02 f303 lsl.w r3, r2, r3 + 80016ca: 43da mvns r2, r3 + 80016cc: 68bb ldr r3, [r7, #8] + 80016ce: 401a ands r2, r3 + 80016d0: 697b ldr r3, [r7, #20] + 80016d2: 409a lsls r2, r3 + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + 80016d4: f04f 31ff mov.w r1, #4294967295 + 80016d8: 697b ldr r3, [r7, #20] + 80016da: fa01 f303 lsl.w r3, r1, r3 + 80016de: 43d9 mvns r1, r3 + 80016e0: 687b ldr r3, [r7, #4] + 80016e2: 400b ands r3, r1 + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + 80016e4: 4313 orrs r3, r2 + ); +} + 80016e6: 4618 mov r0, r3 + 80016e8: 3724 adds r7, #36 ; 0x24 + 80016ea: 46bd mov sp, r7 + 80016ec: bc80 pop {r7} + 80016ee: 4770 bx lr + +080016f0 : + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + 80016f0: b580 push {r7, lr} + 80016f2: b082 sub sp, #8 + 80016f4: af00 add r7, sp, #0 + 80016f6: 6078 str r0, [r7, #4] + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + 80016f8: 687b ldr r3, [r7, #4] + 80016fa: 3b01 subs r3, #1 + 80016fc: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 + 8001700: d301 bcc.n 8001706 + { + return (1UL); /* Reload value impossible */ + 8001702: 2301 movs r3, #1 + 8001704: e00f b.n 8001726 + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + 8001706: 4a0a ldr r2, [pc, #40] ; (8001730 ) + 8001708: 687b ldr r3, [r7, #4] + 800170a: 3b01 subs r3, #1 + 800170c: 6053 str r3, [r2, #4] + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + 800170e: 210f movs r1, #15 + 8001710: f04f 30ff mov.w r0, #4294967295 + 8001714: f7ff ff90 bl 8001638 <__NVIC_SetPriority> + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + 8001718: 4b05 ldr r3, [pc, #20] ; (8001730 ) + 800171a: 2200 movs r2, #0 + 800171c: 609a str r2, [r3, #8] + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + 800171e: 4b04 ldr r3, [pc, #16] ; (8001730 ) + 8001720: 2207 movs r2, #7 + 8001722: 601a str r2, [r3, #0] + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ + 8001724: 2300 movs r3, #0 +} + 8001726: 4618 mov r0, r3 + 8001728: 3708 adds r7, #8 + 800172a: 46bd mov sp, r7 + 800172c: bd80 pop {r7, pc} + 800172e: bf00 nop + 8001730: e000e010 .word 0xe000e010 + +08001734 : + * @note When the NVIC_PriorityGroup_0 is selected, IRQ preemption is no more possible. + * The pending IRQ priority will be managed only by the subpriority. + * @retval None + */ +void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + 8001734: b580 push {r7, lr} + 8001736: b082 sub sp, #8 + 8001738: af00 add r7, sp, #0 + 800173a: 6078 str r0, [r7, #4] + /* 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); + 800173c: 6878 ldr r0, [r7, #4] + 800173e: f7ff ff2d bl 800159c <__NVIC_SetPriorityGrouping> +} + 8001742: bf00 nop + 8001744: 3708 adds r7, #8 + 8001746: 46bd mov sp, r7 + 8001748: bd80 pop {r7, pc} + +0800174a : + * 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) +{ + 800174a: b580 push {r7, lr} + 800174c: b086 sub sp, #24 + 800174e: af00 add r7, sp, #0 + 8001750: 4603 mov r3, r0 + 8001752: 60b9 str r1, [r7, #8] + 8001754: 607a str r2, [r7, #4] + 8001756: 73fb strb r3, [r7, #15] + uint32_t prioritygroup = 0x00U; + 8001758: 2300 movs r3, #0 + 800175a: 617b str r3, [r7, #20] + + /* Check the parameters */ + assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); + assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); + + prioritygroup = NVIC_GetPriorityGrouping(); + 800175c: f7ff ff42 bl 80015e4 <__NVIC_GetPriorityGrouping> + 8001760: 6178 str r0, [r7, #20] + + NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); + 8001762: 687a ldr r2, [r7, #4] + 8001764: 68b9 ldr r1, [r7, #8] + 8001766: 6978 ldr r0, [r7, #20] + 8001768: f7ff ff90 bl 800168c + 800176c: 4602 mov r2, r0 + 800176e: f997 300f ldrsb.w r3, [r7, #15] + 8001772: 4611 mov r1, r2 + 8001774: 4618 mov r0, r3 + 8001776: f7ff ff5f bl 8001638 <__NVIC_SetPriority> +} + 800177a: bf00 nop + 800177c: 3718 adds r7, #24 + 800177e: 46bd mov sp, r7 + 8001780: bd80 pop {r7, pc} + +08001782 : + * 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 (stm32f2xxxx.h)) + * @retval None + */ +void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) +{ + 8001782: b580 push {r7, lr} + 8001784: b082 sub sp, #8 + 8001786: af00 add r7, sp, #0 + 8001788: 4603 mov r3, r0 + 800178a: 71fb strb r3, [r7, #7] + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Enable interrupt */ + NVIC_EnableIRQ(IRQn); + 800178c: f997 3007 ldrsb.w r3, [r7, #7] + 8001790: 4618 mov r0, r3 + 8001792: f7ff ff35 bl 8001600 <__NVIC_EnableIRQ> +} + 8001796: bf00 nop + 8001798: 3708 adds r7, #8 + 800179a: 46bd mov sp, r7 + 800179c: bd80 pop {r7, pc} + +0800179e : + * @param TicksNumb Specifies the ticks Number of ticks between two interrupts. + * @retval status: - 0 Function succeeded. + * - 1 Function failed. + */ +uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb) +{ + 800179e: b580 push {r7, lr} + 80017a0: b082 sub sp, #8 + 80017a2: af00 add r7, sp, #0 + 80017a4: 6078 str r0, [r7, #4] + return SysTick_Config(TicksNumb); + 80017a6: 6878 ldr r0, [r7, #4] + 80017a8: f7ff ffa2 bl 80016f0 + 80017ac: 4603 mov r3, r0 +} + 80017ae: 4618 mov r0, r3 + 80017b0: 3708 adds r7, #8 + 80017b2: 46bd mov sp, r7 + 80017b4: bd80 pop {r7, pc} + ... + +080017b8 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) +{ + 80017b8: b580 push {r7, lr} + 80017ba: b088 sub sp, #32 + 80017bc: af00 add r7, sp, #0 + 80017be: 6078 str r0, [r7, #4] + uint32_t tmpreg1 = 0U, phyreg = 0U; + 80017c0: 2300 movs r3, #0 + 80017c2: 61fb str r3, [r7, #28] + 80017c4: 2300 movs r3, #0 + 80017c6: 60fb str r3, [r7, #12] + uint32_t hclk = 60000000U; + 80017c8: 4ba3 ldr r3, [pc, #652] ; (8001a58 ) + 80017ca: 61bb str r3, [r7, #24] + uint32_t tickstart = 0U; + 80017cc: 2300 movs r3, #0 + 80017ce: 617b str r3, [r7, #20] + uint32_t err = ETH_SUCCESS; + 80017d0: 2300 movs r3, #0 + 80017d2: 613b str r3, [r7, #16] + + /* Check the ETH peripheral state */ + if (heth == NULL) + 80017d4: 687b ldr r3, [r7, #4] + 80017d6: 2b00 cmp r3, #0 + 80017d8: d101 bne.n 80017de + { + return HAL_ERROR; + 80017da: 2301 movs r3, #1 + 80017dc: e173 b.n 8001ac6 + assert_param(IS_ETH_AUTONEGOTIATION(heth->Init.AutoNegotiation)); + assert_param(IS_ETH_RX_MODE(heth->Init.RxMode)); + assert_param(IS_ETH_CHECKSUM_MODE(heth->Init.ChecksumMode)); + assert_param(IS_ETH_MEDIA_INTERFACE(heth->Init.MediaInterface)); + + if (heth->State == HAL_ETH_STATE_RESET) + 80017de: 687b ldr r3, [r7, #4] + 80017e0: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 + 80017e4: b2db uxtb r3, r3 + 80017e6: 2b00 cmp r3, #0 + 80017e8: d106 bne.n 80017f8 + { + /* Allocate lock resource and initialize it */ + heth->Lock = HAL_UNLOCKED; + 80017ea: 687b ldr r3, [r7, #4] + 80017ec: 2200 movs r2, #0 + 80017ee: f883 2045 strb.w r2, [r3, #69] ; 0x45 + } + heth->MspInitCallback(heth); + +#else + /* Init the low level hardware : GPIO, CLOCK, NVIC. */ + HAL_ETH_MspInit(heth); + 80017f2: 6878 ldr r0, [r7, #4] + 80017f4: f003 fd3c bl 8005270 +#endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ + } + + /* Enable SYSCFG Clock */ + __HAL_RCC_SYSCFG_CLK_ENABLE(); + 80017f8: 2300 movs r3, #0 + 80017fa: 60bb str r3, [r7, #8] + 80017fc: 4b97 ldr r3, [pc, #604] ; (8001a5c ) + 80017fe: 6c5b ldr r3, [r3, #68] ; 0x44 + 8001800: 4a96 ldr r2, [pc, #600] ; (8001a5c ) + 8001802: f443 4380 orr.w r3, r3, #16384 ; 0x4000 + 8001806: 6453 str r3, [r2, #68] ; 0x44 + 8001808: 4b94 ldr r3, [pc, #592] ; (8001a5c ) + 800180a: 6c5b ldr r3, [r3, #68] ; 0x44 + 800180c: f403 4380 and.w r3, r3, #16384 ; 0x4000 + 8001810: 60bb str r3, [r7, #8] + 8001812: 68bb ldr r3, [r7, #8] + + /* Select MII or RMII Mode*/ + SYSCFG->PMC &= ~(SYSCFG_PMC_MII_RMII_SEL); + 8001814: 4b92 ldr r3, [pc, #584] ; (8001a60 ) + 8001816: 685b ldr r3, [r3, #4] + 8001818: 4a91 ldr r2, [pc, #580] ; (8001a60 ) + 800181a: f423 0300 bic.w r3, r3, #8388608 ; 0x800000 + 800181e: 6053 str r3, [r2, #4] + SYSCFG->PMC |= (uint32_t)heth->Init.MediaInterface; + 8001820: 4b8f ldr r3, [pc, #572] ; (8001a60 ) + 8001822: 685a ldr r2, [r3, #4] + 8001824: 687b ldr r3, [r7, #4] + 8001826: 6a1b ldr r3, [r3, #32] + 8001828: 498d ldr r1, [pc, #564] ; (8001a60 ) + 800182a: 4313 orrs r3, r2 + 800182c: 604b str r3, [r1, #4] + + /* Ethernet Software reset */ + /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ + /* After reset all the registers holds their respective reset values */ + (heth->Instance)->DMABMR |= ETH_DMABMR_SR; + 800182e: 687b ldr r3, [r7, #4] + 8001830: 681b ldr r3, [r3, #0] + 8001832: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8001836: 681b ldr r3, [r3, #0] + 8001838: 687a ldr r2, [r7, #4] + 800183a: 6812 ldr r2, [r2, #0] + 800183c: f043 0301 orr.w r3, r3, #1 + 8001840: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8001844: 6013 str r3, [r2, #0] + + /* Get tick */ + tickstart = HAL_GetTick(); + 8001846: f7ff fe7b bl 8001540 + 800184a: 6178 str r0, [r7, #20] + + /* Wait for software reset */ + while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) + 800184c: e011 b.n 8001872 + { + /* Check for the Timeout */ + if ((HAL_GetTick() - tickstart) > ETH_TIMEOUT_SWRESET) + 800184e: f7ff fe77 bl 8001540 + 8001852: 4602 mov r2, r0 + 8001854: 697b ldr r3, [r7, #20] + 8001856: 1ad3 subs r3, r2, r3 + 8001858: f5b3 7ffa cmp.w r3, #500 ; 0x1f4 + 800185c: d909 bls.n 8001872 + { + heth->State = HAL_ETH_STATE_TIMEOUT; + 800185e: 687b ldr r3, [r7, #4] + 8001860: 2203 movs r2, #3 + 8001862: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001866: 687b ldr r3, [r7, #4] + 8001868: 2200 movs r2, #0 + 800186a: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Note: The SWR is not performed if the ETH_RX_CLK or the ETH_TX_CLK are + not available, please check your external PHY or the IO configuration */ + return HAL_TIMEOUT; + 800186e: 2303 movs r3, #3 + 8001870: e129 b.n 8001ac6 + while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) + 8001872: 687b ldr r3, [r7, #4] + 8001874: 681b ldr r3, [r3, #0] + 8001876: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 800187a: 681b ldr r3, [r3, #0] + 800187c: f003 0301 and.w r3, r3, #1 + 8001880: 2b00 cmp r3, #0 + 8001882: d1e4 bne.n 800184e + } + } + + /*-------------------------------- MAC Initialization ----------------------*/ + /* Get the ETHERNET MACMIIAR value */ + tmpreg1 = (heth->Instance)->MACMIIAR; + 8001884: 687b ldr r3, [r7, #4] + 8001886: 681b ldr r3, [r3, #0] + 8001888: 691b ldr r3, [r3, #16] + 800188a: 61fb str r3, [r7, #28] + /* Clear CSR Clock Range CR[2:0] bits */ + tmpreg1 &= ETH_MACMIIAR_CR_MASK; + 800188c: 69fb ldr r3, [r7, #28] + 800188e: f023 031c bic.w r3, r3, #28 + 8001892: 61fb str r3, [r7, #28] + + /* Get hclk frequency value */ + hclk = HAL_RCC_GetHCLKFreq(); + 8001894: f001 ffbe bl 8003814 + 8001898: 61b8 str r0, [r7, #24] + + /* Set CR bits depending on hclk value */ + if ((hclk >= 20000000U) && (hclk < 35000000U)) + 800189a: 69bb ldr r3, [r7, #24] + 800189c: 4a71 ldr r2, [pc, #452] ; (8001a64 ) + 800189e: 4293 cmp r3, r2 + 80018a0: d908 bls.n 80018b4 + 80018a2: 69bb ldr r3, [r7, #24] + 80018a4: 4a70 ldr r2, [pc, #448] ; (8001a68 ) + 80018a6: 4293 cmp r3, r2 + 80018a8: d804 bhi.n 80018b4 + { + /* CSR Clock Range between 20-35 MHz */ + tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div16; + 80018aa: 69fb ldr r3, [r7, #28] + 80018ac: f043 0308 orr.w r3, r3, #8 + 80018b0: 61fb str r3, [r7, #28] + 80018b2: e01a b.n 80018ea + } + else if ((hclk >= 35000000U) && (hclk < 60000000U)) + 80018b4: 69bb ldr r3, [r7, #24] + 80018b6: 4a6c ldr r2, [pc, #432] ; (8001a68 ) + 80018b8: 4293 cmp r3, r2 + 80018ba: d908 bls.n 80018ce + 80018bc: 69bb ldr r3, [r7, #24] + 80018be: 4a66 ldr r2, [pc, #408] ; (8001a58 ) + 80018c0: 4293 cmp r3, r2 + 80018c2: d204 bcs.n 80018ce + { + /* CSR Clock Range between 35-60 MHz */ + tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div26; + 80018c4: 69fb ldr r3, [r7, #28] + 80018c6: f043 030c orr.w r3, r3, #12 + 80018ca: 61fb str r3, [r7, #28] + 80018cc: e00d b.n 80018ea + } + else if ((hclk >= 60000000U) && (hclk < 100000000U)) + 80018ce: 69bb ldr r3, [r7, #24] + 80018d0: 4a61 ldr r2, [pc, #388] ; (8001a58 ) + 80018d2: 4293 cmp r3, r2 + 80018d4: d303 bcc.n 80018de + 80018d6: 69bb ldr r3, [r7, #24] + 80018d8: 4a64 ldr r2, [pc, #400] ; (8001a6c ) + 80018da: 4293 cmp r3, r2 + 80018dc: d904 bls.n 80018e8 + tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div42; + } + else /* ((hclk >= 100000000)&&(hclk < 120000000)) */ + { + /* CSR Clock Range between 100-120 MHz */ + tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div62; + 80018de: 69fb ldr r3, [r7, #28] + 80018e0: f043 0304 orr.w r3, r3, #4 + 80018e4: 61fb str r3, [r7, #28] + 80018e6: e000 b.n 80018ea + tmpreg1 |= (uint32_t)ETH_MACMIIAR_CR_Div42; + 80018e8: bf00 nop + } + + /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ + (heth->Instance)->MACMIIAR = (uint32_t)tmpreg1; + 80018ea: 687b ldr r3, [r7, #4] + 80018ec: 681b ldr r3, [r3, #0] + 80018ee: 69fa ldr r2, [r7, #28] + 80018f0: 611a str r2, [r3, #16] + + /*-------------------- PHY initialization and configuration ----------------*/ + /* Put the PHY in reset mode */ + if ((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_RESET)) != HAL_OK) + 80018f2: f44f 4200 mov.w r2, #32768 ; 0x8000 + 80018f6: 2100 movs r1, #0 + 80018f8: 6878 ldr r0, [r7, #4] + 80018fa: f000 fb8e bl 800201a + 80018fe: 4603 mov r3, r0 + 8001900: 2b00 cmp r3, #0 + 8001902: d00b beq.n 800191c + { + /* In case of write timeout */ + err = ETH_ERROR; + 8001904: 2301 movs r3, #1 + 8001906: 613b str r3, [r7, #16] + + /* Config MAC and DMA */ + ETH_MACDMAConfig(heth, err); + 8001908: 6939 ldr r1, [r7, #16] + 800190a: 6878 ldr r0, [r7, #4] + 800190c: f000 fd44 bl 8002398 + + /* Set the ETH peripheral state to READY */ + heth->State = HAL_ETH_STATE_READY; + 8001910: 687b ldr r3, [r7, #4] + 8001912: 2201 movs r2, #1 + 8001914: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Return HAL_ERROR */ + return HAL_ERROR; + 8001918: 2301 movs r3, #1 + 800191a: e0d4 b.n 8001ac6 + } + + /* Delay to assure PHY reset */ + HAL_Delay(PHY_RESET_DELAY); + 800191c: 20ff movs r0, #255 ; 0xff + 800191e: f7ff fe19 bl 8001554 + + if ((heth->Init).AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) + 8001922: 687b ldr r3, [r7, #4] + 8001924: 685b ldr r3, [r3, #4] + 8001926: 2b00 cmp r3, #0 + 8001928: f000 80a2 beq.w 8001a70 + { + /* Get tick */ + tickstart = HAL_GetTick(); + 800192c: f7ff fe08 bl 8001540 + 8001930: 6178 str r0, [r7, #20] + + /* We wait for linked status */ + do + { + HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); + 8001932: f107 030c add.w r3, r7, #12 + 8001936: 461a mov r2, r3 + 8001938: 2101 movs r1, #1 + 800193a: 6878 ldr r0, [r7, #4] + 800193c: f000 fb05 bl 8001f4a + + /* Check for the Timeout */ + if ((HAL_GetTick() - tickstart) > ETH_TIMEOUT_LINKED_STATE) + 8001940: f7ff fdfe bl 8001540 + 8001944: 4602 mov r2, r0 + 8001946: 697b ldr r3, [r7, #20] + 8001948: 1ad3 subs r3, r2, r3 + 800194a: f241 3288 movw r2, #5000 ; 0x1388 + 800194e: 4293 cmp r3, r2 + 8001950: d90f bls.n 8001972 + { + /* In case of write timeout */ + err = ETH_ERROR; + 8001952: 2301 movs r3, #1 + 8001954: 613b str r3, [r7, #16] + + /* Config MAC and DMA */ + ETH_MACDMAConfig(heth, err); + 8001956: 6939 ldr r1, [r7, #16] + 8001958: 6878 ldr r0, [r7, #4] + 800195a: f000 fd1d bl 8002398 + + heth->State = HAL_ETH_STATE_READY; + 800195e: 687b ldr r3, [r7, #4] + 8001960: 2201 movs r2, #1 + 8001962: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001966: 687b ldr r3, [r7, #4] + 8001968: 2200 movs r2, #0 + 800196a: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + return HAL_TIMEOUT; + 800196e: 2303 movs r3, #3 + 8001970: e0a9 b.n 8001ac6 + } + } + while (((phyreg & PHY_LINKED_STATUS) != PHY_LINKED_STATUS)); + 8001972: 68fb ldr r3, [r7, #12] + 8001974: f003 0304 and.w r3, r3, #4 + 8001978: 2b00 cmp r3, #0 + 800197a: d0da beq.n 8001932 + + + /* Enable Auto-Negotiation */ + if ((HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_AUTONEGOTIATION)) != HAL_OK) + 800197c: f44f 5280 mov.w r2, #4096 ; 0x1000 + 8001980: 2100 movs r1, #0 + 8001982: 6878 ldr r0, [r7, #4] + 8001984: f000 fb49 bl 800201a + 8001988: 4603 mov r3, r0 + 800198a: 2b00 cmp r3, #0 + 800198c: d00b beq.n 80019a6 + { + /* In case of write timeout */ + err = ETH_ERROR; + 800198e: 2301 movs r3, #1 + 8001990: 613b str r3, [r7, #16] + + /* Config MAC and DMA */ + ETH_MACDMAConfig(heth, err); + 8001992: 6939 ldr r1, [r7, #16] + 8001994: 6878 ldr r0, [r7, #4] + 8001996: f000 fcff bl 8002398 + + /* Set the ETH peripheral state to READY */ + heth->State = HAL_ETH_STATE_READY; + 800199a: 687b ldr r3, [r7, #4] + 800199c: 2201 movs r2, #1 + 800199e: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Return HAL_ERROR */ + return HAL_ERROR; + 80019a2: 2301 movs r3, #1 + 80019a4: e08f b.n 8001ac6 + } + + /* Get tick */ + tickstart = HAL_GetTick(); + 80019a6: f7ff fdcb bl 8001540 + 80019aa: 6178 str r0, [r7, #20] + + /* Wait until the auto-negotiation will be completed */ + do + { + HAL_ETH_ReadPHYRegister(heth, PHY_BSR, &phyreg); + 80019ac: f107 030c add.w r3, r7, #12 + 80019b0: 461a mov r2, r3 + 80019b2: 2101 movs r1, #1 + 80019b4: 6878 ldr r0, [r7, #4] + 80019b6: f000 fac8 bl 8001f4a + + /* Check for the Timeout */ + if ((HAL_GetTick() - tickstart) > ETH_TIMEOUT_AUTONEGO_COMPLETED) + 80019ba: f7ff fdc1 bl 8001540 + 80019be: 4602 mov r2, r0 + 80019c0: 697b ldr r3, [r7, #20] + 80019c2: 1ad3 subs r3, r2, r3 + 80019c4: f241 3288 movw r2, #5000 ; 0x1388 + 80019c8: 4293 cmp r3, r2 + 80019ca: d90f bls.n 80019ec + { + /* In case of write timeout */ + err = ETH_ERROR; + 80019cc: 2301 movs r3, #1 + 80019ce: 613b str r3, [r7, #16] + + /* Config MAC and DMA */ + ETH_MACDMAConfig(heth, err); + 80019d0: 6939 ldr r1, [r7, #16] + 80019d2: 6878 ldr r0, [r7, #4] + 80019d4: f000 fce0 bl 8002398 + + heth->State = HAL_ETH_STATE_READY; + 80019d8: 687b ldr r3, [r7, #4] + 80019da: 2201 movs r2, #1 + 80019dc: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 80019e0: 687b ldr r3, [r7, #4] + 80019e2: 2200 movs r2, #0 + 80019e4: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + return HAL_TIMEOUT; + 80019e8: 2303 movs r3, #3 + 80019ea: e06c b.n 8001ac6 + } + + } + while (((phyreg & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE)); + 80019ec: 68fb ldr r3, [r7, #12] + 80019ee: f003 0320 and.w r3, r3, #32 + 80019f2: 2b00 cmp r3, #0 + 80019f4: d0da beq.n 80019ac + + /* Read the result of the auto-negotiation */ + if ((HAL_ETH_ReadPHYRegister(heth, PHY_SR, &phyreg)) != HAL_OK) + 80019f6: f107 030c add.w r3, r7, #12 + 80019fa: 461a mov r2, r3 + 80019fc: 2110 movs r1, #16 + 80019fe: 6878 ldr r0, [r7, #4] + 8001a00: f000 faa3 bl 8001f4a + 8001a04: 4603 mov r3, r0 + 8001a06: 2b00 cmp r3, #0 + 8001a08: d00b beq.n 8001a22 + { + /* In case of write timeout */ + err = ETH_ERROR; + 8001a0a: 2301 movs r3, #1 + 8001a0c: 613b str r3, [r7, #16] + + /* Config MAC and DMA */ + ETH_MACDMAConfig(heth, err); + 8001a0e: 6939 ldr r1, [r7, #16] + 8001a10: 6878 ldr r0, [r7, #4] + 8001a12: f000 fcc1 bl 8002398 + + /* Set the ETH peripheral state to READY */ + heth->State = HAL_ETH_STATE_READY; + 8001a16: 687b ldr r3, [r7, #4] + 8001a18: 2201 movs r2, #1 + 8001a1a: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Return HAL_ERROR */ + return HAL_ERROR; + 8001a1e: 2301 movs r3, #1 + 8001a20: e051 b.n 8001ac6 + } + + /* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */ + if ((phyreg & PHY_DUPLEX_STATUS) != (uint32_t)RESET) + 8001a22: 68fb ldr r3, [r7, #12] + 8001a24: f003 0304 and.w r3, r3, #4 + 8001a28: 2b00 cmp r3, #0 + 8001a2a: d004 beq.n 8001a36 + { + /* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */ + (heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX; + 8001a2c: 687b ldr r3, [r7, #4] + 8001a2e: f44f 6200 mov.w r2, #2048 ; 0x800 + 8001a32: 60da str r2, [r3, #12] + 8001a34: e002 b.n 8001a3c + } + else + { + /* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */ + (heth->Init).DuplexMode = ETH_MODE_HALFDUPLEX; + 8001a36: 687b ldr r3, [r7, #4] + 8001a38: 2200 movs r2, #0 + 8001a3a: 60da str r2, [r3, #12] + } + /* Configure the MAC with the speed fixed by the auto-negotiation process */ + if ((phyreg & PHY_SPEED_STATUS) == PHY_SPEED_STATUS) + 8001a3c: 68fb ldr r3, [r7, #12] + 8001a3e: f003 0302 and.w r3, r3, #2 + 8001a42: 2b00 cmp r3, #0 + 8001a44: d003 beq.n 8001a4e + { + /* Set Ethernet speed to 10M following the auto-negotiation */ + (heth->Init).Speed = ETH_SPEED_10M; + 8001a46: 687b ldr r3, [r7, #4] + 8001a48: 2200 movs r2, #0 + 8001a4a: 609a str r2, [r3, #8] + 8001a4c: e032 b.n 8001ab4 + } + else + { + /* Set Ethernet speed to 100M following the auto-negotiation */ + (heth->Init).Speed = ETH_SPEED_100M; + 8001a4e: 687b ldr r3, [r7, #4] + 8001a50: f44f 4280 mov.w r2, #16384 ; 0x4000 + 8001a54: 609a str r2, [r3, #8] + 8001a56: e02d b.n 8001ab4 + 8001a58: 03938700 .word 0x03938700 + 8001a5c: 40023800 .word 0x40023800 + 8001a60: 40013800 .word 0x40013800 + 8001a64: 01312cff .word 0x01312cff + 8001a68: 02160ebf .word 0x02160ebf + 8001a6c: 05f5e0ff .word 0x05f5e0ff + /* Check parameters */ + assert_param(IS_ETH_SPEED(heth->Init.Speed)); + assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); + + /* Set MAC Speed and Duplex Mode */ + if (HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) | + 8001a70: 687b ldr r3, [r7, #4] + 8001a72: 68db ldr r3, [r3, #12] + 8001a74: 08db lsrs r3, r3, #3 + 8001a76: b29a uxth r2, r3 + (uint16_t)((heth->Init).Speed >> 1))) != HAL_OK) + 8001a78: 687b ldr r3, [r7, #4] + 8001a7a: 689b ldr r3, [r3, #8] + 8001a7c: 085b lsrs r3, r3, #1 + 8001a7e: b29b uxth r3, r3 + if (HAL_ETH_WritePHYRegister(heth, PHY_BCR, ((uint16_t)((heth->Init).DuplexMode >> 3) | + 8001a80: 4313 orrs r3, r2 + 8001a82: b29b uxth r3, r3 + 8001a84: 461a mov r2, r3 + 8001a86: 2100 movs r1, #0 + 8001a88: 6878 ldr r0, [r7, #4] + 8001a8a: f000 fac6 bl 800201a + 8001a8e: 4603 mov r3, r0 + 8001a90: 2b00 cmp r3, #0 + 8001a92: d00b beq.n 8001aac + { + /* In case of write timeout */ + err = ETH_ERROR; + 8001a94: 2301 movs r3, #1 + 8001a96: 613b str r3, [r7, #16] + + /* Config MAC and DMA */ + ETH_MACDMAConfig(heth, err); + 8001a98: 6939 ldr r1, [r7, #16] + 8001a9a: 6878 ldr r0, [r7, #4] + 8001a9c: f000 fc7c bl 8002398 + + /* Set the ETH peripheral state to READY */ + heth->State = HAL_ETH_STATE_READY; + 8001aa0: 687b ldr r3, [r7, #4] + 8001aa2: 2201 movs r2, #1 + 8001aa4: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Return HAL_ERROR */ + return HAL_ERROR; + 8001aa8: 2301 movs r3, #1 + 8001aaa: e00c b.n 8001ac6 + } + + /* Delay to assure PHY configuration */ + HAL_Delay(PHY_CONFIG_DELAY); + 8001aac: f640 70ff movw r0, #4095 ; 0xfff + 8001ab0: f7ff fd50 bl 8001554 + } + + /* Config MAC and DMA */ + ETH_MACDMAConfig(heth, err); + 8001ab4: 6939 ldr r1, [r7, #16] + 8001ab6: 6878 ldr r0, [r7, #4] + 8001ab8: f000 fc6e bl 8002398 + + /* Set ETH HAL State to Ready */ + heth->State = HAL_ETH_STATE_READY; + 8001abc: 687b ldr r3, [r7, #4] + 8001abe: 2201 movs r2, #1 + 8001ac0: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Return function status */ + return HAL_OK; + 8001ac4: 2300 movs r3, #0 +} + 8001ac6: 4618 mov r0, r3 + 8001ac8: 3720 adds r7, #32 + 8001aca: 46bd mov sp, r7 + 8001acc: bd80 pop {r7, pc} + 8001ace: bf00 nop + +08001ad0 : + * @param TxBuff Pointer to the first TxBuffer list + * @param TxBuffCount Number of the used Tx desc in the list + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t *TxBuff, uint32_t TxBuffCount) +{ + 8001ad0: b480 push {r7} + 8001ad2: b087 sub sp, #28 + 8001ad4: af00 add r7, sp, #0 + 8001ad6: 60f8 str r0, [r7, #12] + 8001ad8: 60b9 str r1, [r7, #8] + 8001ada: 607a str r2, [r7, #4] + 8001adc: 603b str r3, [r7, #0] + uint32_t i = 0U; + 8001ade: 2300 movs r3, #0 + 8001ae0: 617b str r3, [r7, #20] + ETH_DMADescTypeDef *dmatxdesc; + + /* Process Locked */ + __HAL_LOCK(heth); + 8001ae2: 68fb ldr r3, [r7, #12] + 8001ae4: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8001ae8: 2b01 cmp r3, #1 + 8001aea: d101 bne.n 8001af0 + 8001aec: 2302 movs r3, #2 + 8001aee: e051 b.n 8001b94 + 8001af0: 68fb ldr r3, [r7, #12] + 8001af2: 2201 movs r2, #1 + 8001af4: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Set the ETH peripheral state to BUSY */ + heth->State = HAL_ETH_STATE_BUSY; + 8001af8: 68fb ldr r3, [r7, #12] + 8001afa: 2202 movs r2, #2 + 8001afc: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ + heth->TxDesc = DMATxDescTab; + 8001b00: 68fb ldr r3, [r7, #12] + 8001b02: 68ba ldr r2, [r7, #8] + 8001b04: 62da str r2, [r3, #44] ; 0x2c + + /* Fill each DMATxDesc descriptor with the right values */ + for (i = 0U; i < TxBuffCount; i++) + 8001b06: 2300 movs r3, #0 + 8001b08: 617b str r3, [r7, #20] + 8001b0a: e030 b.n 8001b6e + { + /* Get the pointer on the member (i) of the Tx Desc list */ + dmatxdesc = DMATxDescTab + i; + 8001b0c: 697b ldr r3, [r7, #20] + 8001b0e: 015b lsls r3, r3, #5 + 8001b10: 68ba ldr r2, [r7, #8] + 8001b12: 4413 add r3, r2 + 8001b14: 613b str r3, [r7, #16] + + /* Set Second Address Chained bit */ + dmatxdesc->Status = ETH_DMATXDESC_TCH; + 8001b16: 693b ldr r3, [r7, #16] + 8001b18: f44f 1280 mov.w r2, #1048576 ; 0x100000 + 8001b1c: 601a str r2, [r3, #0] + + /* Set Buffer1 address pointer */ + dmatxdesc->Buffer1Addr = (uint32_t)(&TxBuff[i * ETH_TX_BUF_SIZE]); + 8001b1e: 697b ldr r3, [r7, #20] + 8001b20: f240 52f4 movw r2, #1524 ; 0x5f4 + 8001b24: fb02 f303 mul.w r3, r2, r3 + 8001b28: 687a ldr r2, [r7, #4] + 8001b2a: 4413 add r3, r2 + 8001b2c: 461a mov r2, r3 + 8001b2e: 693b ldr r3, [r7, #16] + 8001b30: 609a str r2, [r3, #8] + + if ((heth->Init).ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) + 8001b32: 68fb ldr r3, [r7, #12] + 8001b34: 69db ldr r3, [r3, #28] + 8001b36: 2b00 cmp r3, #0 + 8001b38: d105 bne.n 8001b46 + { + /* Set the DMA Tx descriptors checksum insertion */ + dmatxdesc->Status |= ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL; + 8001b3a: 693b ldr r3, [r7, #16] + 8001b3c: 681b ldr r3, [r3, #0] + 8001b3e: f443 0240 orr.w r2, r3, #12582912 ; 0xc00000 + 8001b42: 693b ldr r3, [r7, #16] + 8001b44: 601a str r2, [r3, #0] + } + + /* Initialize the next descriptor with the Next Descriptor Polling Enable */ + if (i < (TxBuffCount - 1)) + 8001b46: 683b ldr r3, [r7, #0] + 8001b48: 3b01 subs r3, #1 + 8001b4a: 697a ldr r2, [r7, #20] + 8001b4c: 429a cmp r2, r3 + 8001b4e: d208 bcs.n 8001b62 + { + /* Set next descriptor address register with next descriptor base address */ + dmatxdesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab + i + 1); + 8001b50: 697b ldr r3, [r7, #20] + 8001b52: 3301 adds r3, #1 + 8001b54: 015b lsls r3, r3, #5 + 8001b56: 68ba ldr r2, [r7, #8] + 8001b58: 4413 add r3, r2 + 8001b5a: 461a mov r2, r3 + 8001b5c: 693b ldr r3, [r7, #16] + 8001b5e: 60da str r2, [r3, #12] + 8001b60: e002 b.n 8001b68 + } + else + { + /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ + dmatxdesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; + 8001b62: 68ba ldr r2, [r7, #8] + 8001b64: 693b ldr r3, [r7, #16] + 8001b66: 60da str r2, [r3, #12] + for (i = 0U; i < TxBuffCount; i++) + 8001b68: 697b ldr r3, [r7, #20] + 8001b6a: 3301 adds r3, #1 + 8001b6c: 617b str r3, [r7, #20] + 8001b6e: 697a ldr r2, [r7, #20] + 8001b70: 683b ldr r3, [r7, #0] + 8001b72: 429a cmp r2, r3 + 8001b74: d3ca bcc.n 8001b0c + } + } + + /* Set Transmit Descriptor List Address Register */ + (heth->Instance)->DMATDLAR = (uint32_t) DMATxDescTab; + 8001b76: 68fb ldr r3, [r7, #12] + 8001b78: 681a ldr r2, [r3, #0] + 8001b7a: 68bb ldr r3, [r7, #8] + 8001b7c: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8001b80: 6113 str r3, [r2, #16] + + /* Set ETH HAL State to Ready */ + heth->State = HAL_ETH_STATE_READY; + 8001b82: 68fb ldr r3, [r7, #12] + 8001b84: 2201 movs r2, #1 + 8001b86: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001b8a: 68fb ldr r3, [r7, #12] + 8001b8c: 2200 movs r2, #0 + 8001b8e: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_OK; + 8001b92: 2300 movs r3, #0 +} + 8001b94: 4618 mov r0, r3 + 8001b96: 371c adds r7, #28 + 8001b98: 46bd mov sp, r7 + 8001b9a: bc80 pop {r7} + 8001b9c: 4770 bx lr + +08001b9e : + * @param RxBuff Pointer to the first RxBuffer list + * @param RxBuffCount Number of the used Rx desc in the list + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount) +{ + 8001b9e: b480 push {r7} + 8001ba0: b087 sub sp, #28 + 8001ba2: af00 add r7, sp, #0 + 8001ba4: 60f8 str r0, [r7, #12] + 8001ba6: 60b9 str r1, [r7, #8] + 8001ba8: 607a str r2, [r7, #4] + 8001baa: 603b str r3, [r7, #0] + uint32_t i = 0U; + 8001bac: 2300 movs r3, #0 + 8001bae: 617b str r3, [r7, #20] + ETH_DMADescTypeDef *DMARxDesc; + + /* Process Locked */ + __HAL_LOCK(heth); + 8001bb0: 68fb ldr r3, [r7, #12] + 8001bb2: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8001bb6: 2b01 cmp r3, #1 + 8001bb8: d101 bne.n 8001bbe + 8001bba: 2302 movs r3, #2 + 8001bbc: e055 b.n 8001c6a + 8001bbe: 68fb ldr r3, [r7, #12] + 8001bc0: 2201 movs r2, #1 + 8001bc2: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Set the ETH peripheral state to BUSY */ + heth->State = HAL_ETH_STATE_BUSY; + 8001bc6: 68fb ldr r3, [r7, #12] + 8001bc8: 2202 movs r2, #2 + 8001bca: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Set the Ethernet RxDesc pointer with the first one of the DMARxDescTab list */ + heth->RxDesc = DMARxDescTab; + 8001bce: 68fb ldr r3, [r7, #12] + 8001bd0: 68ba ldr r2, [r7, #8] + 8001bd2: 629a str r2, [r3, #40] ; 0x28 + + /* Fill each DMARxDesc descriptor with the right values */ + for (i = 0U; i < RxBuffCount; i++) + 8001bd4: 2300 movs r3, #0 + 8001bd6: 617b str r3, [r7, #20] + 8001bd8: e034 b.n 8001c44 + { + /* Get the pointer on the member (i) of the Rx Desc list */ + DMARxDesc = DMARxDescTab + i; + 8001bda: 697b ldr r3, [r7, #20] + 8001bdc: 015b lsls r3, r3, #5 + 8001bde: 68ba ldr r2, [r7, #8] + 8001be0: 4413 add r3, r2 + 8001be2: 613b str r3, [r7, #16] + + /* Set Own bit of the Rx descriptor Status */ + DMARxDesc->Status = ETH_DMARXDESC_OWN; + 8001be4: 693b ldr r3, [r7, #16] + 8001be6: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 + 8001bea: 601a str r2, [r3, #0] + + /* Set Buffer1 size and Second Address Chained bit */ + DMARxDesc->ControlBufferSize = ETH_DMARXDESC_RCH | ETH_RX_BUF_SIZE; + 8001bec: 693b ldr r3, [r7, #16] + 8001bee: f244 52f4 movw r2, #17908 ; 0x45f4 + 8001bf2: 605a str r2, [r3, #4] + + /* Set Buffer1 address pointer */ + DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i * ETH_RX_BUF_SIZE]); + 8001bf4: 697b ldr r3, [r7, #20] + 8001bf6: f240 52f4 movw r2, #1524 ; 0x5f4 + 8001bfa: fb02 f303 mul.w r3, r2, r3 + 8001bfe: 687a ldr r2, [r7, #4] + 8001c00: 4413 add r3, r2 + 8001c02: 461a mov r2, r3 + 8001c04: 693b ldr r3, [r7, #16] + 8001c06: 609a str r2, [r3, #8] + + if ((heth->Init).RxMode == ETH_RXINTERRUPT_MODE) + 8001c08: 68fb ldr r3, [r7, #12] + 8001c0a: 699b ldr r3, [r3, #24] + 8001c0c: 2b01 cmp r3, #1 + 8001c0e: d105 bne.n 8001c1c + { + /* Enable Ethernet DMA Rx Descriptor interrupt */ + DMARxDesc->ControlBufferSize &= ~ETH_DMARXDESC_DIC; + 8001c10: 693b ldr r3, [r7, #16] + 8001c12: 685b ldr r3, [r3, #4] + 8001c14: f023 4200 bic.w r2, r3, #2147483648 ; 0x80000000 + 8001c18: 693b ldr r3, [r7, #16] + 8001c1a: 605a str r2, [r3, #4] + } + + /* Initialize the next descriptor with the Next Descriptor Polling Enable */ + if (i < (RxBuffCount - 1U)) + 8001c1c: 683b ldr r3, [r7, #0] + 8001c1e: 3b01 subs r3, #1 + 8001c20: 697a ldr r2, [r7, #20] + 8001c22: 429a cmp r2, r3 + 8001c24: d208 bcs.n 8001c38 + { + /* Set next descriptor address register with next descriptor base address */ + DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab + i + 1U); + 8001c26: 697b ldr r3, [r7, #20] + 8001c28: 3301 adds r3, #1 + 8001c2a: 015b lsls r3, r3, #5 + 8001c2c: 68ba ldr r2, [r7, #8] + 8001c2e: 4413 add r3, r2 + 8001c30: 461a mov r2, r3 + 8001c32: 693b ldr r3, [r7, #16] + 8001c34: 60da str r2, [r3, #12] + 8001c36: e002 b.n 8001c3e + } + else + { + /* For last descriptor, set next descriptor address register equal to the first descriptor base address */ + DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); + 8001c38: 68ba ldr r2, [r7, #8] + 8001c3a: 693b ldr r3, [r7, #16] + 8001c3c: 60da str r2, [r3, #12] + for (i = 0U; i < RxBuffCount; i++) + 8001c3e: 697b ldr r3, [r7, #20] + 8001c40: 3301 adds r3, #1 + 8001c42: 617b str r3, [r7, #20] + 8001c44: 697a ldr r2, [r7, #20] + 8001c46: 683b ldr r3, [r7, #0] + 8001c48: 429a cmp r2, r3 + 8001c4a: d3c6 bcc.n 8001bda + } + } + + /* Set Receive Descriptor List Address Register */ + (heth->Instance)->DMARDLAR = (uint32_t) DMARxDescTab; + 8001c4c: 68fb ldr r3, [r7, #12] + 8001c4e: 681a ldr r2, [r3, #0] + 8001c50: 68bb ldr r3, [r7, #8] + 8001c52: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8001c56: 60d3 str r3, [r2, #12] + + /* Set ETH HAL State to Ready */ + heth->State = HAL_ETH_STATE_READY; + 8001c58: 68fb ldr r3, [r7, #12] + 8001c5a: 2201 movs r2, #1 + 8001c5c: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001c60: 68fb ldr r3, [r7, #12] + 8001c62: 2200 movs r2, #0 + 8001c64: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_OK; + 8001c68: 2300 movs r3, #0 +} + 8001c6a: 4618 mov r0, r3 + 8001c6c: 371c adds r7, #28 + 8001c6e: 46bd mov sp, r7 + 8001c70: bc80 pop {r7} + 8001c72: 4770 bx lr + +08001c74 : + * the configuration information for ETHERNET module + * @param FrameLength Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength) +{ + 8001c74: b480 push {r7} + 8001c76: b087 sub sp, #28 + 8001c78: af00 add r7, sp, #0 + 8001c7a: 6078 str r0, [r7, #4] + 8001c7c: 6039 str r1, [r7, #0] + uint32_t bufcount = 0U, size = 0U, i = 0U; + 8001c7e: 2300 movs r3, #0 + 8001c80: 617b str r3, [r7, #20] + 8001c82: 2300 movs r3, #0 + 8001c84: 60fb str r3, [r7, #12] + 8001c86: 2300 movs r3, #0 + 8001c88: 613b str r3, [r7, #16] + + /* Process Locked */ + __HAL_LOCK(heth); + 8001c8a: 687b ldr r3, [r7, #4] + 8001c8c: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8001c90: 2b01 cmp r3, #1 + 8001c92: d101 bne.n 8001c98 + 8001c94: 2302 movs r3, #2 + 8001c96: e0cc b.n 8001e32 + 8001c98: 687b ldr r3, [r7, #4] + 8001c9a: 2201 movs r2, #1 + 8001c9c: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Set the ETH peripheral state to BUSY */ + heth->State = HAL_ETH_STATE_BUSY; + 8001ca0: 687b ldr r3, [r7, #4] + 8001ca2: 2202 movs r2, #2 + 8001ca4: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + if (FrameLength == 0U) + 8001ca8: 683b ldr r3, [r7, #0] + 8001caa: 2b00 cmp r3, #0 + 8001cac: d109 bne.n 8001cc2 + { + /* Set ETH HAL state to READY */ + heth->State = HAL_ETH_STATE_READY; + 8001cae: 687b ldr r3, [r7, #4] + 8001cb0: 2201 movs r2, #1 + 8001cb2: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001cb6: 687b ldr r3, [r7, #4] + 8001cb8: 2200 movs r2, #0 + 8001cba: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + return HAL_ERROR; + 8001cbe: 2301 movs r3, #1 + 8001cc0: e0b7 b.n 8001e32 + } + + /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ + if (((heth->TxDesc)->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) + 8001cc2: 687b ldr r3, [r7, #4] + 8001cc4: 6adb ldr r3, [r3, #44] ; 0x2c + 8001cc6: 681b ldr r3, [r3, #0] + 8001cc8: 2b00 cmp r3, #0 + 8001cca: da09 bge.n 8001ce0 + { + /* OWN bit set */ + heth->State = HAL_ETH_STATE_BUSY_TX; + 8001ccc: 687b ldr r3, [r7, #4] + 8001cce: 2212 movs r2, #18 + 8001cd0: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001cd4: 687b ldr r3, [r7, #4] + 8001cd6: 2200 movs r2, #0 + 8001cd8: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + return HAL_ERROR; + 8001cdc: 2301 movs r3, #1 + 8001cde: e0a8 b.n 8001e32 + } + + /* Get the number of needed Tx buffers for the current frame */ + if (FrameLength > ETH_TX_BUF_SIZE) + 8001ce0: 683b ldr r3, [r7, #0] + 8001ce2: f240 52f4 movw r2, #1524 ; 0x5f4 + 8001ce6: 4293 cmp r3, r2 + 8001ce8: d915 bls.n 8001d16 + { + bufcount = FrameLength / ETH_TX_BUF_SIZE; + 8001cea: 683b ldr r3, [r7, #0] + 8001cec: 4a53 ldr r2, [pc, #332] ; (8001e3c ) + 8001cee: fba2 2303 umull r2, r3, r2, r3 + 8001cf2: 0a9b lsrs r3, r3, #10 + 8001cf4: 617b str r3, [r7, #20] + if (FrameLength % ETH_TX_BUF_SIZE) + 8001cf6: 683a ldr r2, [r7, #0] + 8001cf8: 4b50 ldr r3, [pc, #320] ; (8001e3c ) + 8001cfa: fba3 1302 umull r1, r3, r3, r2 + 8001cfe: 0a9b lsrs r3, r3, #10 + 8001d00: f240 51f4 movw r1, #1524 ; 0x5f4 + 8001d04: fb01 f303 mul.w r3, r1, r3 + 8001d08: 1ad3 subs r3, r2, r3 + 8001d0a: 2b00 cmp r3, #0 + 8001d0c: d005 beq.n 8001d1a + { + bufcount++; + 8001d0e: 697b ldr r3, [r7, #20] + 8001d10: 3301 adds r3, #1 + 8001d12: 617b str r3, [r7, #20] + 8001d14: e001 b.n 8001d1a + } + } + else + { + bufcount = 1U; + 8001d16: 2301 movs r3, #1 + 8001d18: 617b str r3, [r7, #20] + } + if (bufcount == 1U) + 8001d1a: 697b ldr r3, [r7, #20] + 8001d1c: 2b01 cmp r3, #1 + 8001d1e: d11c bne.n 8001d5a + { + /* Set LAST and FIRST segment */ + heth->TxDesc->Status |= ETH_DMATXDESC_FS | ETH_DMATXDESC_LS; + 8001d20: 687b ldr r3, [r7, #4] + 8001d22: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d24: 681a ldr r2, [r3, #0] + 8001d26: 687b ldr r3, [r7, #4] + 8001d28: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d2a: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 + 8001d2e: 601a str r2, [r3, #0] + /* Set frame size */ + heth->TxDesc->ControlBufferSize = (FrameLength & ETH_DMATXDESC_TBS1); + 8001d30: 687b ldr r3, [r7, #4] + 8001d32: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d34: 683a ldr r2, [r7, #0] + 8001d36: f3c2 020c ubfx r2, r2, #0, #13 + 8001d3a: 605a str r2, [r3, #4] + /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ + heth->TxDesc->Status |= ETH_DMATXDESC_OWN; + 8001d3c: 687b ldr r3, [r7, #4] + 8001d3e: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d40: 681a ldr r2, [r3, #0] + 8001d42: 687b ldr r3, [r7, #4] + 8001d44: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d46: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 + 8001d4a: 601a str r2, [r3, #0] + /* Point to next descriptor */ + heth->TxDesc = (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr); + 8001d4c: 687b ldr r3, [r7, #4] + 8001d4e: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d50: 68db ldr r3, [r3, #12] + 8001d52: 461a mov r2, r3 + 8001d54: 687b ldr r3, [r7, #4] + 8001d56: 62da str r2, [r3, #44] ; 0x2c + 8001d58: e04b b.n 8001df2 + } + else + { + for (i = 0U; i < bufcount; i++) + 8001d5a: 2300 movs r3, #0 + 8001d5c: 613b str r3, [r7, #16] + 8001d5e: e044 b.n 8001dea + { + /* Clear FIRST and LAST segment bits */ + heth->TxDesc->Status &= ~(ETH_DMATXDESC_FS | ETH_DMATXDESC_LS); + 8001d60: 687b ldr r3, [r7, #4] + 8001d62: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d64: 681a ldr r2, [r3, #0] + 8001d66: 687b ldr r3, [r7, #4] + 8001d68: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d6a: f022 5240 bic.w r2, r2, #805306368 ; 0x30000000 + 8001d6e: 601a str r2, [r3, #0] + + if (i == 0U) + 8001d70: 693b ldr r3, [r7, #16] + 8001d72: 2b00 cmp r3, #0 + 8001d74: d107 bne.n 8001d86 + { + /* Setting the first segment bit */ + heth->TxDesc->Status |= ETH_DMATXDESC_FS; + 8001d76: 687b ldr r3, [r7, #4] + 8001d78: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d7a: 681a ldr r2, [r3, #0] + 8001d7c: 687b ldr r3, [r7, #4] + 8001d7e: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d80: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000 + 8001d84: 601a str r2, [r3, #0] + } + + /* Program size */ + heth->TxDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATXDESC_TBS1); + 8001d86: 687b ldr r3, [r7, #4] + 8001d88: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d8a: f240 52f4 movw r2, #1524 ; 0x5f4 + 8001d8e: 605a str r2, [r3, #4] + + if (i == (bufcount - 1U)) + 8001d90: 697b ldr r3, [r7, #20] + 8001d92: 3b01 subs r3, #1 + 8001d94: 693a ldr r2, [r7, #16] + 8001d96: 429a cmp r2, r3 + 8001d98: d116 bne.n 8001dc8 + { + /* Setting the last segment bit */ + heth->TxDesc->Status |= ETH_DMATXDESC_LS; + 8001d9a: 687b ldr r3, [r7, #4] + 8001d9c: 6adb ldr r3, [r3, #44] ; 0x2c + 8001d9e: 681a ldr r2, [r3, #0] + 8001da0: 687b ldr r3, [r7, #4] + 8001da2: 6adb ldr r3, [r3, #44] ; 0x2c + 8001da4: f042 5200 orr.w r2, r2, #536870912 ; 0x20000000 + 8001da8: 601a str r2, [r3, #0] + size = FrameLength - (bufcount - 1U) * ETH_TX_BUF_SIZE; + 8001daa: 697b ldr r3, [r7, #20] + 8001dac: 4a24 ldr r2, [pc, #144] ; (8001e40 ) + 8001dae: fb03 f202 mul.w r2, r3, r2 + 8001db2: 683b ldr r3, [r7, #0] + 8001db4: 4413 add r3, r2 + 8001db6: f203 53f4 addw r3, r3, #1524 ; 0x5f4 + 8001dba: 60fb str r3, [r7, #12] + heth->TxDesc->ControlBufferSize = (size & ETH_DMATXDESC_TBS1); + 8001dbc: 687b ldr r3, [r7, #4] + 8001dbe: 6adb ldr r3, [r3, #44] ; 0x2c + 8001dc0: 68fa ldr r2, [r7, #12] + 8001dc2: f3c2 020c ubfx r2, r2, #0, #13 + 8001dc6: 605a str r2, [r3, #4] + } + + /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ + heth->TxDesc->Status |= ETH_DMATXDESC_OWN; + 8001dc8: 687b ldr r3, [r7, #4] + 8001dca: 6adb ldr r3, [r3, #44] ; 0x2c + 8001dcc: 681a ldr r2, [r3, #0] + 8001dce: 687b ldr r3, [r7, #4] + 8001dd0: 6adb ldr r3, [r3, #44] ; 0x2c + 8001dd2: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 + 8001dd6: 601a str r2, [r3, #0] + /* point to next descriptor */ + heth->TxDesc = (ETH_DMADescTypeDef *)(heth->TxDesc->Buffer2NextDescAddr); + 8001dd8: 687b ldr r3, [r7, #4] + 8001dda: 6adb ldr r3, [r3, #44] ; 0x2c + 8001ddc: 68db ldr r3, [r3, #12] + 8001dde: 461a mov r2, r3 + 8001de0: 687b ldr r3, [r7, #4] + 8001de2: 62da str r2, [r3, #44] ; 0x2c + for (i = 0U; i < bufcount; i++) + 8001de4: 693b ldr r3, [r7, #16] + 8001de6: 3301 adds r3, #1 + 8001de8: 613b str r3, [r7, #16] + 8001dea: 693a ldr r2, [r7, #16] + 8001dec: 697b ldr r3, [r7, #20] + 8001dee: 429a cmp r2, r3 + 8001df0: d3b6 bcc.n 8001d60 + } + } + + /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ + if (((heth->Instance)->DMASR & ETH_DMASR_TBUS) != (uint32_t)RESET) + 8001df2: 687b ldr r3, [r7, #4] + 8001df4: 681b ldr r3, [r3, #0] + 8001df6: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8001dfa: 695b ldr r3, [r3, #20] + 8001dfc: f003 0304 and.w r3, r3, #4 + 8001e00: 2b00 cmp r3, #0 + 8001e02: d00d beq.n 8001e20 + { + /* Clear TBUS ETHERNET DMA flag */ + (heth->Instance)->DMASR = ETH_DMASR_TBUS; + 8001e04: 687b ldr r3, [r7, #4] + 8001e06: 681b ldr r3, [r3, #0] + 8001e08: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8001e0c: 461a mov r2, r3 + 8001e0e: 2304 movs r3, #4 + 8001e10: 6153 str r3, [r2, #20] + /* Resume DMA transmission*/ + (heth->Instance)->DMATPDR = 0U; + 8001e12: 687b ldr r3, [r7, #4] + 8001e14: 681b ldr r3, [r3, #0] + 8001e16: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8001e1a: 461a mov r2, r3 + 8001e1c: 2300 movs r3, #0 + 8001e1e: 6053 str r3, [r2, #4] + } + + /* Set ETH HAL State to Ready */ + heth->State = HAL_ETH_STATE_READY; + 8001e20: 687b ldr r3, [r7, #4] + 8001e22: 2201 movs r2, #1 + 8001e24: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001e28: 687b ldr r3, [r7, #4] + 8001e2a: 2200 movs r2, #0 + 8001e2c: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_OK; + 8001e30: 2300 movs r3, #0 +} + 8001e32: 4618 mov r0, r3 + 8001e34: 371c adds r7, #28 + 8001e36: 46bd mov sp, r7 + 8001e38: bc80 pop {r7} + 8001e3a: 4770 bx lr + 8001e3c: ac02b00b .word 0xac02b00b + 8001e40: fffffa0c .word 0xfffffa0c + +08001e44 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth) +{ + 8001e44: b480 push {r7} + 8001e46: b085 sub sp, #20 + 8001e48: af00 add r7, sp, #0 + 8001e4a: 6078 str r0, [r7, #4] + uint32_t framelength = 0U; + 8001e4c: 2300 movs r3, #0 + 8001e4e: 60fb str r3, [r7, #12] + + /* Process Locked */ + __HAL_LOCK(heth); + 8001e50: 687b ldr r3, [r7, #4] + 8001e52: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8001e56: 2b01 cmp r3, #1 + 8001e58: d101 bne.n 8001e5e + 8001e5a: 2302 movs r3, #2 + 8001e5c: e070 b.n 8001f40 + 8001e5e: 687b ldr r3, [r7, #4] + 8001e60: 2201 movs r2, #1 + 8001e62: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Check the ETH state to BUSY */ + heth->State = HAL_ETH_STATE_BUSY; + 8001e66: 687b ldr r3, [r7, #4] + 8001e68: 2202 movs r2, #2 + 8001e6a: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Check if segment is not owned by DMA */ + /* (((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET) && ((heth->RxDesc->Status & ETH_DMARXDESC_LS) != (uint32_t)RESET)) */ + if (((heth->RxDesc->Status & ETH_DMARXDESC_OWN) == (uint32_t)RESET)) + 8001e6e: 687b ldr r3, [r7, #4] + 8001e70: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001e72: 681b ldr r3, [r3, #0] + 8001e74: 2b00 cmp r3, #0 + 8001e76: db5a blt.n 8001f2e + { + /* Check if last segment */ + if (((heth->RxDesc->Status & ETH_DMARXDESC_LS) != (uint32_t)RESET)) + 8001e78: 687b ldr r3, [r7, #4] + 8001e7a: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001e7c: 681b ldr r3, [r3, #0] + 8001e7e: f403 7380 and.w r3, r3, #256 ; 0x100 + 8001e82: 2b00 cmp r3, #0 + 8001e84: d030 beq.n 8001ee8 + { + /* increment segment count */ + (heth->RxFrameInfos).SegCount++; + 8001e86: 687b ldr r3, [r7, #4] + 8001e88: 6b9b ldr r3, [r3, #56] ; 0x38 + 8001e8a: 1c5a adds r2, r3, #1 + 8001e8c: 687b ldr r3, [r7, #4] + 8001e8e: 639a str r2, [r3, #56] ; 0x38 + + /* Check if last segment is first segment: one segment contains the frame */ + if ((heth->RxFrameInfos).SegCount == 1U) + 8001e90: 687b ldr r3, [r7, #4] + 8001e92: 6b9b ldr r3, [r3, #56] ; 0x38 + 8001e94: 2b01 cmp r3, #1 + 8001e96: d103 bne.n 8001ea0 + { + (heth->RxFrameInfos).FSRxDesc = heth->RxDesc; + 8001e98: 687b ldr r3, [r7, #4] + 8001e9a: 6a9a ldr r2, [r3, #40] ; 0x28 + 8001e9c: 687b ldr r3, [r7, #4] + 8001e9e: 631a str r2, [r3, #48] ; 0x30 + } + + heth->RxFrameInfos.LSRxDesc = heth->RxDesc; + 8001ea0: 687b ldr r3, [r7, #4] + 8001ea2: 6a9a ldr r2, [r3, #40] ; 0x28 + 8001ea4: 687b ldr r3, [r7, #4] + 8001ea6: 635a str r2, [r3, #52] ; 0x34 + + /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ + framelength = (((heth->RxDesc)->Status & ETH_DMARXDESC_FL) >> ETH_DMARXDESC_FRAMELENGTHSHIFT) - 4U; + 8001ea8: 687b ldr r3, [r7, #4] + 8001eaa: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001eac: 681b ldr r3, [r3, #0] + 8001eae: 0c1b lsrs r3, r3, #16 + 8001eb0: f3c3 030d ubfx r3, r3, #0, #14 + 8001eb4: 3b04 subs r3, #4 + 8001eb6: 60fb str r3, [r7, #12] + heth->RxFrameInfos.length = framelength; + 8001eb8: 687b ldr r3, [r7, #4] + 8001eba: 68fa ldr r2, [r7, #12] + 8001ebc: 63da str r2, [r3, #60] ; 0x3c + + /* Get the address of the buffer start address */ + heth->RxFrameInfos.buffer = ((heth->RxFrameInfos).FSRxDesc)->Buffer1Addr; + 8001ebe: 687b ldr r3, [r7, #4] + 8001ec0: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001ec2: 689a ldr r2, [r3, #8] + 8001ec4: 687b ldr r3, [r7, #4] + 8001ec6: 641a str r2, [r3, #64] ; 0x40 + /* point to next descriptor */ + heth->RxDesc = (ETH_DMADescTypeDef *)((heth->RxDesc)->Buffer2NextDescAddr); + 8001ec8: 687b ldr r3, [r7, #4] + 8001eca: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001ecc: 68db ldr r3, [r3, #12] + 8001ece: 461a mov r2, r3 + 8001ed0: 687b ldr r3, [r7, #4] + 8001ed2: 629a str r2, [r3, #40] ; 0x28 + + /* Set HAL State to Ready */ + heth->State = HAL_ETH_STATE_READY; + 8001ed4: 687b ldr r3, [r7, #4] + 8001ed6: 2201 movs r2, #1 + 8001ed8: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001edc: 687b ldr r3, [r7, #4] + 8001ede: 2200 movs r2, #0 + 8001ee0: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_OK; + 8001ee4: 2300 movs r3, #0 + 8001ee6: e02b b.n 8001f40 + } + /* Check if first segment */ + else if ((heth->RxDesc->Status & ETH_DMARXDESC_FS) != (uint32_t)RESET) + 8001ee8: 687b ldr r3, [r7, #4] + 8001eea: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001eec: 681b ldr r3, [r3, #0] + 8001eee: f403 7300 and.w r3, r3, #512 ; 0x200 + 8001ef2: 2b00 cmp r3, #0 + 8001ef4: d010 beq.n 8001f18 + { + (heth->RxFrameInfos).FSRxDesc = heth->RxDesc; + 8001ef6: 687b ldr r3, [r7, #4] + 8001ef8: 6a9a ldr r2, [r3, #40] ; 0x28 + 8001efa: 687b ldr r3, [r7, #4] + 8001efc: 631a str r2, [r3, #48] ; 0x30 + (heth->RxFrameInfos).LSRxDesc = NULL; + 8001efe: 687b ldr r3, [r7, #4] + 8001f00: 2200 movs r2, #0 + 8001f02: 635a str r2, [r3, #52] ; 0x34 + (heth->RxFrameInfos).SegCount = 1U; + 8001f04: 687b ldr r3, [r7, #4] + 8001f06: 2201 movs r2, #1 + 8001f08: 639a str r2, [r3, #56] ; 0x38 + /* Point to next descriptor */ + heth->RxDesc = (ETH_DMADescTypeDef *)(heth->RxDesc->Buffer2NextDescAddr); + 8001f0a: 687b ldr r3, [r7, #4] + 8001f0c: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001f0e: 68db ldr r3, [r3, #12] + 8001f10: 461a mov r2, r3 + 8001f12: 687b ldr r3, [r7, #4] + 8001f14: 629a str r2, [r3, #40] ; 0x28 + 8001f16: e00a b.n 8001f2e + } + /* Check if intermediate segment */ + else + { + (heth->RxFrameInfos).SegCount++; + 8001f18: 687b ldr r3, [r7, #4] + 8001f1a: 6b9b ldr r3, [r3, #56] ; 0x38 + 8001f1c: 1c5a adds r2, r3, #1 + 8001f1e: 687b ldr r3, [r7, #4] + 8001f20: 639a str r2, [r3, #56] ; 0x38 + /* Point to next descriptor */ + heth->RxDesc = (ETH_DMADescTypeDef *)(heth->RxDesc->Buffer2NextDescAddr); + 8001f22: 687b ldr r3, [r7, #4] + 8001f24: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001f26: 68db ldr r3, [r3, #12] + 8001f28: 461a mov r2, r3 + 8001f2a: 687b ldr r3, [r7, #4] + 8001f2c: 629a str r2, [r3, #40] ; 0x28 + } + } + + /* Set ETH HAL State to Ready */ + heth->State = HAL_ETH_STATE_READY; + 8001f2e: 687b ldr r3, [r7, #4] + 8001f30: 2201 movs r2, #1 + 8001f32: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001f36: 687b ldr r3, [r7, #4] + 8001f38: 2200 movs r2, #0 + 8001f3a: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_ERROR; + 8001f3e: 2301 movs r3, #1 +} + 8001f40: 4618 mov r0, r3 + 8001f42: 3714 adds r7, #20 + 8001f44: 46bd mov sp, r7 + 8001f46: bc80 pop {r7} + 8001f48: 4770 bx lr + +08001f4a : + * More PHY register could be read depending on the used PHY + * @param RegValue PHY register value + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) +{ + 8001f4a: b580 push {r7, lr} + 8001f4c: b086 sub sp, #24 + 8001f4e: af00 add r7, sp, #0 + 8001f50: 60f8 str r0, [r7, #12] + 8001f52: 460b mov r3, r1 + 8001f54: 607a str r2, [r7, #4] + 8001f56: 817b strh r3, [r7, #10] + uint32_t tmpreg1 = 0U; + 8001f58: 2300 movs r3, #0 + 8001f5a: 617b str r3, [r7, #20] + uint32_t tickstart = 0U; + 8001f5c: 2300 movs r3, #0 + 8001f5e: 613b str r3, [r7, #16] + + /* Check parameters */ + assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); + + /* Check the ETH peripheral state */ + if (heth->State == HAL_ETH_STATE_BUSY_RD) + 8001f60: 68fb ldr r3, [r7, #12] + 8001f62: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 + 8001f66: b2db uxtb r3, r3 + 8001f68: 2b82 cmp r3, #130 ; 0x82 + 8001f6a: d101 bne.n 8001f70 + { + return HAL_BUSY; + 8001f6c: 2302 movs r3, #2 + 8001f6e: e050 b.n 8002012 + } + /* Set ETH HAL State to BUSY_RD */ + heth->State = HAL_ETH_STATE_BUSY_RD; + 8001f70: 68fb ldr r3, [r7, #12] + 8001f72: 2282 movs r2, #130 ; 0x82 + 8001f74: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Get the ETHERNET MACMIIAR value */ + tmpreg1 = heth->Instance->MACMIIAR; + 8001f78: 68fb ldr r3, [r7, #12] + 8001f7a: 681b ldr r3, [r3, #0] + 8001f7c: 691b ldr r3, [r3, #16] + 8001f7e: 617b str r3, [r7, #20] + + /* Keep only the CSR Clock Range CR[2:0] bits value */ + tmpreg1 &= ~ETH_MACMIIAR_CR_MASK; + 8001f80: 697b ldr r3, [r7, #20] + 8001f82: f003 031c and.w r3, r3, #28 + 8001f86: 617b str r3, [r7, #20] + + /* Prepare the MII address register value */ + tmpreg1 |= (((uint32_t)heth->Init.PhyAddress << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */ + 8001f88: 68fb ldr r3, [r7, #12] + 8001f8a: 8a1b ldrh r3, [r3, #16] + 8001f8c: 02db lsls r3, r3, #11 + 8001f8e: b29b uxth r3, r3 + 8001f90: 697a ldr r2, [r7, #20] + 8001f92: 4313 orrs r3, r2 + 8001f94: 617b str r3, [r7, #20] + tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */ + 8001f96: 897b ldrh r3, [r7, #10] + 8001f98: 019b lsls r3, r3, #6 + 8001f9a: f403 63f8 and.w r3, r3, #1984 ; 0x7c0 + 8001f9e: 697a ldr r2, [r7, #20] + 8001fa0: 4313 orrs r3, r2 + 8001fa2: 617b str r3, [r7, #20] + tmpreg1 &= ~ETH_MACMIIAR_MW; /* Set the read mode */ + 8001fa4: 697b ldr r3, [r7, #20] + 8001fa6: f023 0302 bic.w r3, r3, #2 + 8001faa: 617b str r3, [r7, #20] + tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ + 8001fac: 697b ldr r3, [r7, #20] + 8001fae: f043 0301 orr.w r3, r3, #1 + 8001fb2: 617b str r3, [r7, #20] + + /* Write the result value into the MII Address register */ + heth->Instance->MACMIIAR = tmpreg1; + 8001fb4: 68fb ldr r3, [r7, #12] + 8001fb6: 681b ldr r3, [r3, #0] + 8001fb8: 697a ldr r2, [r7, #20] + 8001fba: 611a str r2, [r3, #16] + + /* Get tick */ + tickstart = HAL_GetTick(); + 8001fbc: f7ff fac0 bl 8001540 + 8001fc0: 6138 str r0, [r7, #16] + + /* Check for the Busy flag */ + while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) + 8001fc2: e015 b.n 8001ff0 + { + /* Check for the Timeout */ + if ((HAL_GetTick() - tickstart) > PHY_READ_TO) + 8001fc4: f7ff fabc bl 8001540 + 8001fc8: 4602 mov r2, r0 + 8001fca: 693b ldr r3, [r7, #16] + 8001fcc: 1ad3 subs r3, r2, r3 + 8001fce: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8001fd2: d309 bcc.n 8001fe8 + { + heth->State = HAL_ETH_STATE_READY; + 8001fd4: 68fb ldr r3, [r7, #12] + 8001fd6: 2201 movs r2, #1 + 8001fd8: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8001fdc: 68fb ldr r3, [r7, #12] + 8001fde: 2200 movs r2, #0 + 8001fe0: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + return HAL_TIMEOUT; + 8001fe4: 2303 movs r3, #3 + 8001fe6: e014 b.n 8002012 + } + + tmpreg1 = heth->Instance->MACMIIAR; + 8001fe8: 68fb ldr r3, [r7, #12] + 8001fea: 681b ldr r3, [r3, #0] + 8001fec: 691b ldr r3, [r3, #16] + 8001fee: 617b str r3, [r7, #20] + while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) + 8001ff0: 697b ldr r3, [r7, #20] + 8001ff2: f003 0301 and.w r3, r3, #1 + 8001ff6: 2b00 cmp r3, #0 + 8001ff8: d1e4 bne.n 8001fc4 + } + + /* Get MACMIIDR value */ + *RegValue = (uint16_t)(heth->Instance->MACMIIDR); + 8001ffa: 68fb ldr r3, [r7, #12] + 8001ffc: 681b ldr r3, [r3, #0] + 8001ffe: 695b ldr r3, [r3, #20] + 8002000: b29b uxth r3, r3 + 8002002: 461a mov r2, r3 + 8002004: 687b ldr r3, [r7, #4] + 8002006: 601a str r2, [r3, #0] + + /* Set ETH HAL State to READY */ + heth->State = HAL_ETH_STATE_READY; + 8002008: 68fb ldr r3, [r7, #12] + 800200a: 2201 movs r2, #1 + 800200c: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Return function status */ + return HAL_OK; + 8002010: 2300 movs r3, #0 +} + 8002012: 4618 mov r0, r3 + 8002014: 3718 adds r7, #24 + 8002016: 46bd mov sp, r7 + 8002018: bd80 pop {r7, pc} + +0800201a : + * More PHY register could be written depending on the used PHY + * @param RegValue the value to write + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue) +{ + 800201a: b580 push {r7, lr} + 800201c: b086 sub sp, #24 + 800201e: af00 add r7, sp, #0 + 8002020: 60f8 str r0, [r7, #12] + 8002022: 460b mov r3, r1 + 8002024: 607a str r2, [r7, #4] + 8002026: 817b strh r3, [r7, #10] + uint32_t tmpreg1 = 0U; + 8002028: 2300 movs r3, #0 + 800202a: 617b str r3, [r7, #20] + uint32_t tickstart = 0U; + 800202c: 2300 movs r3, #0 + 800202e: 613b str r3, [r7, #16] + + /* Check parameters */ + assert_param(IS_ETH_PHY_ADDRESS(heth->Init.PhyAddress)); + + /* Check the ETH peripheral state */ + if (heth->State == HAL_ETH_STATE_BUSY_WR) + 8002030: 68fb ldr r3, [r7, #12] + 8002032: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 + 8002036: b2db uxtb r3, r3 + 8002038: 2b42 cmp r3, #66 ; 0x42 + 800203a: d101 bne.n 8002040 + { + return HAL_BUSY; + 800203c: 2302 movs r3, #2 + 800203e: e04e b.n 80020de + } + /* Set ETH HAL State to BUSY_WR */ + heth->State = HAL_ETH_STATE_BUSY_WR; + 8002040: 68fb ldr r3, [r7, #12] + 8002042: 2242 movs r2, #66 ; 0x42 + 8002044: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Get the ETHERNET MACMIIAR value */ + tmpreg1 = heth->Instance->MACMIIAR; + 8002048: 68fb ldr r3, [r7, #12] + 800204a: 681b ldr r3, [r3, #0] + 800204c: 691b ldr r3, [r3, #16] + 800204e: 617b str r3, [r7, #20] + + /* Keep only the CSR Clock Range CR[2:0] bits value */ + tmpreg1 &= ~ETH_MACMIIAR_CR_MASK; + 8002050: 697b ldr r3, [r7, #20] + 8002052: f003 031c and.w r3, r3, #28 + 8002056: 617b str r3, [r7, #20] + + /* Prepare the MII register address value */ + tmpreg1 |= (((uint32_t)heth->Init.PhyAddress << 11U) & ETH_MACMIIAR_PA); /* Set the PHY device address */ + 8002058: 68fb ldr r3, [r7, #12] + 800205a: 8a1b ldrh r3, [r3, #16] + 800205c: 02db lsls r3, r3, #11 + 800205e: b29b uxth r3, r3 + 8002060: 697a ldr r2, [r7, #20] + 8002062: 4313 orrs r3, r2 + 8002064: 617b str r3, [r7, #20] + tmpreg1 |= (((uint32_t)PHYReg << 6U) & ETH_MACMIIAR_MR); /* Set the PHY register address */ + 8002066: 897b ldrh r3, [r7, #10] + 8002068: 019b lsls r3, r3, #6 + 800206a: f403 63f8 and.w r3, r3, #1984 ; 0x7c0 + 800206e: 697a ldr r2, [r7, #20] + 8002070: 4313 orrs r3, r2 + 8002072: 617b str r3, [r7, #20] + tmpreg1 |= ETH_MACMIIAR_MW; /* Set the write mode */ + 8002074: 697b ldr r3, [r7, #20] + 8002076: f043 0302 orr.w r3, r3, #2 + 800207a: 617b str r3, [r7, #20] + tmpreg1 |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ + 800207c: 697b ldr r3, [r7, #20] + 800207e: f043 0301 orr.w r3, r3, #1 + 8002082: 617b str r3, [r7, #20] + + /* Give the value to the MII data register */ + heth->Instance->MACMIIDR = (uint16_t)RegValue; + 8002084: 687b ldr r3, [r7, #4] + 8002086: b29a uxth r2, r3 + 8002088: 68fb ldr r3, [r7, #12] + 800208a: 681b ldr r3, [r3, #0] + 800208c: 615a str r2, [r3, #20] + + /* Write the result value into the MII Address register */ + heth->Instance->MACMIIAR = tmpreg1; + 800208e: 68fb ldr r3, [r7, #12] + 8002090: 681b ldr r3, [r3, #0] + 8002092: 697a ldr r2, [r7, #20] + 8002094: 611a str r2, [r3, #16] + + /* Get tick */ + tickstart = HAL_GetTick(); + 8002096: f7ff fa53 bl 8001540 + 800209a: 6138 str r0, [r7, #16] + + /* Check for the Busy flag */ + while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) + 800209c: e015 b.n 80020ca + { + /* Check for the Timeout */ + if ((HAL_GetTick() - tickstart) > PHY_WRITE_TO) + 800209e: f7ff fa4f bl 8001540 + 80020a2: 4602 mov r2, r0 + 80020a4: 693b ldr r3, [r7, #16] + 80020a6: 1ad3 subs r3, r2, r3 + 80020a8: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 80020ac: d309 bcc.n 80020c2 + { + heth->State = HAL_ETH_STATE_READY; + 80020ae: 68fb ldr r3, [r7, #12] + 80020b0: 2201 movs r2, #1 + 80020b2: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 80020b6: 68fb ldr r3, [r7, #12] + 80020b8: 2200 movs r2, #0 + 80020ba: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + return HAL_TIMEOUT; + 80020be: 2303 movs r3, #3 + 80020c0: e00d b.n 80020de + } + + tmpreg1 = heth->Instance->MACMIIAR; + 80020c2: 68fb ldr r3, [r7, #12] + 80020c4: 681b ldr r3, [r3, #0] + 80020c6: 691b ldr r3, [r3, #16] + 80020c8: 617b str r3, [r7, #20] + while ((tmpreg1 & ETH_MACMIIAR_MB) == ETH_MACMIIAR_MB) + 80020ca: 697b ldr r3, [r7, #20] + 80020cc: f003 0301 and.w r3, r3, #1 + 80020d0: 2b00 cmp r3, #0 + 80020d2: d1e4 bne.n 800209e + } + + /* Set ETH HAL State to READY */ + heth->State = HAL_ETH_STATE_READY; + 80020d4: 68fb ldr r3, [r7, #12] + 80020d6: 2201 movs r2, #1 + 80020d8: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Return function status */ + return HAL_OK; + 80020dc: 2300 movs r3, #0 +} + 80020de: 4618 mov r0, r3 + 80020e0: 3718 adds r7, #24 + 80020e2: 46bd mov sp, r7 + 80020e4: bd80 pop {r7, pc} + +080020e6 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth) +{ + 80020e6: b580 push {r7, lr} + 80020e8: b082 sub sp, #8 + 80020ea: af00 add r7, sp, #0 + 80020ec: 6078 str r0, [r7, #4] + /* Process Locked */ + __HAL_LOCK(heth); + 80020ee: 687b ldr r3, [r7, #4] + 80020f0: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 80020f4: 2b01 cmp r3, #1 + 80020f6: d101 bne.n 80020fc + 80020f8: 2302 movs r3, #2 + 80020fa: e01f b.n 800213c + 80020fc: 687b ldr r3, [r7, #4] + 80020fe: 2201 movs r2, #1 + 8002100: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Set the ETH peripheral state to BUSY */ + heth->State = HAL_ETH_STATE_BUSY; + 8002104: 687b ldr r3, [r7, #4] + 8002106: 2202 movs r2, #2 + 8002108: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Enable transmit state machine of the MAC for transmission on the MII */ + ETH_MACTransmissionEnable(heth); + 800210c: 6878 ldr r0, [r7, #4] + 800210e: f000 fb3f bl 8002790 + + /* Enable receive state machine of the MAC for reception from the MII */ + ETH_MACReceptionEnable(heth); + 8002112: 6878 ldr r0, [r7, #4] + 8002114: f000 fb76 bl 8002804 + + /* Flush Transmit FIFO */ + ETH_FlushTransmitFIFO(heth); + 8002118: 6878 ldr r0, [r7, #4] + 800211a: f000 fc01 bl 8002920 + + /* Start DMA transmission */ + ETH_DMATransmissionEnable(heth); + 800211e: 6878 ldr r0, [r7, #4] + 8002120: f000 fbaa bl 8002878 + + /* Start DMA reception */ + ETH_DMAReceptionEnable(heth); + 8002124: 6878 ldr r0, [r7, #4] + 8002126: f000 fbd1 bl 80028cc + + /* Set the ETH state to READY*/ + heth->State = HAL_ETH_STATE_READY; + 800212a: 687b ldr r3, [r7, #4] + 800212c: 2201 movs r2, #1 + 800212e: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8002132: 687b ldr r3, [r7, #4] + 8002134: 2200 movs r2, #0 + 8002136: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_OK; + 800213a: 2300 movs r3, #0 +} + 800213c: 4618 mov r0, r3 + 800213e: 3708 adds r7, #8 + 8002140: 46bd mov sp, r7 + 8002142: bd80 pop {r7, pc} + +08002144 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) +{ + 8002144: b580 push {r7, lr} + 8002146: b082 sub sp, #8 + 8002148: af00 add r7, sp, #0 + 800214a: 6078 str r0, [r7, #4] + /* Process Locked */ + __HAL_LOCK(heth); + 800214c: 687b ldr r3, [r7, #4] + 800214e: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8002152: 2b01 cmp r3, #1 + 8002154: d101 bne.n 800215a + 8002156: 2302 movs r3, #2 + 8002158: e01f b.n 800219a + 800215a: 687b ldr r3, [r7, #4] + 800215c: 2201 movs r2, #1 + 800215e: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Set the ETH peripheral state to BUSY */ + heth->State = HAL_ETH_STATE_BUSY; + 8002162: 687b ldr r3, [r7, #4] + 8002164: 2202 movs r2, #2 + 8002166: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Stop DMA transmission */ + ETH_DMATransmissionDisable(heth); + 800216a: 6878 ldr r0, [r7, #4] + 800216c: f000 fb99 bl 80028a2 + + /* Stop DMA reception */ + ETH_DMAReceptionDisable(heth); + 8002170: 6878 ldr r0, [r7, #4] + 8002172: f000 fbc0 bl 80028f6 + + /* Disable receive state machine of the MAC for reception from the MII */ + ETH_MACReceptionDisable(heth); + 8002176: 6878 ldr r0, [r7, #4] + 8002178: f000 fb61 bl 800283e + + /* Flush Transmit FIFO */ + ETH_FlushTransmitFIFO(heth); + 800217c: 6878 ldr r0, [r7, #4] + 800217e: f000 fbcf bl 8002920 + + /* Disable transmit state machine of the MAC for transmission on the MII */ + ETH_MACTransmissionDisable(heth); + 8002182: 6878 ldr r0, [r7, #4] + 8002184: f000 fb21 bl 80027ca + + /* Set the ETH state*/ + heth->State = HAL_ETH_STATE_READY; + 8002188: 687b ldr r3, [r7, #4] + 800218a: 2201 movs r2, #1 + 800218c: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8002190: 687b ldr r3, [r7, #4] + 8002192: 2200 movs r2, #0 + 8002194: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_OK; + 8002198: 2300 movs r3, #0 +} + 800219a: 4618 mov r0, r3 + 800219c: 3708 adds r7, #8 + 800219e: 46bd mov sp, r7 + 80021a0: bd80 pop {r7, pc} + ... + +080021a4 : + * the configuration information for ETHERNET module + * @param macconf MAC Configuration structure + * @retval HAL status + */ +HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf) +{ + 80021a4: b580 push {r7, lr} + 80021a6: b084 sub sp, #16 + 80021a8: af00 add r7, sp, #0 + 80021aa: 6078 str r0, [r7, #4] + 80021ac: 6039 str r1, [r7, #0] + uint32_t tmpreg1 = 0U; + 80021ae: 2300 movs r3, #0 + 80021b0: 60fb str r3, [r7, #12] + + /* Process Locked */ + __HAL_LOCK(heth); + 80021b2: 687b ldr r3, [r7, #4] + 80021b4: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 80021b8: 2b01 cmp r3, #1 + 80021ba: d101 bne.n 80021c0 + 80021bc: 2302 movs r3, #2 + 80021be: e0e4 b.n 800238a + 80021c0: 687b ldr r3, [r7, #4] + 80021c2: 2201 movs r2, #1 + 80021c4: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Set the ETH peripheral state to BUSY */ + heth->State = HAL_ETH_STATE_BUSY; + 80021c8: 687b ldr r3, [r7, #4] + 80021ca: 2202 movs r2, #2 + 80021cc: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + assert_param(IS_ETH_SPEED(heth->Init.Speed)); + assert_param(IS_ETH_DUPLEX_MODE(heth->Init.DuplexMode)); + + if (macconf != NULL) + 80021d0: 683b ldr r3, [r7, #0] + 80021d2: 2b00 cmp r3, #0 + 80021d4: f000 80b1 beq.w 800233a + assert_param(IS_ETH_VLAN_TAG_COMPARISON(macconf->VLANTagComparison)); + assert_param(IS_ETH_VLAN_TAG_IDENTIFIER(macconf->VLANTagIdentifier)); + + /*------------------------ ETHERNET MACCR Configuration --------------------*/ + /* Get the ETHERNET MACCR value */ + tmpreg1 = (heth->Instance)->MACCR; + 80021d8: 687b ldr r3, [r7, #4] + 80021da: 681b ldr r3, [r3, #0] + 80021dc: 681b ldr r3, [r3, #0] + 80021de: 60fb str r3, [r7, #12] + /* Clear WD, PCE, PS, TE and RE bits */ + tmpreg1 &= ETH_MACCR_CLEAR_MASK; + 80021e0: 68fa ldr r2, [r7, #12] + 80021e2: 4b6c ldr r3, [pc, #432] ; (8002394 ) + 80021e4: 4013 ands r3, r2 + 80021e6: 60fb str r3, [r7, #12] + + tmpreg1 |= (uint32_t)(macconf->Watchdog | + 80021e8: 683b ldr r3, [r7, #0] + 80021ea: 681a ldr r2, [r3, #0] + macconf->Jabber | + 80021ec: 683b ldr r3, [r7, #0] + 80021ee: 685b ldr r3, [r3, #4] + tmpreg1 |= (uint32_t)(macconf->Watchdog | + 80021f0: 431a orrs r2, r3 + macconf->InterFrameGap | + 80021f2: 683b ldr r3, [r7, #0] + 80021f4: 689b ldr r3, [r3, #8] + macconf->Jabber | + 80021f6: 431a orrs r2, r3 + macconf->CarrierSense | + 80021f8: 683b ldr r3, [r7, #0] + 80021fa: 68db ldr r3, [r3, #12] + macconf->InterFrameGap | + 80021fc: 431a orrs r2, r3 + (heth->Init).Speed | + 80021fe: 687b ldr r3, [r7, #4] + 8002200: 689b ldr r3, [r3, #8] + macconf->CarrierSense | + 8002202: 431a orrs r2, r3 + macconf->ReceiveOwn | + 8002204: 683b ldr r3, [r7, #0] + 8002206: 691b ldr r3, [r3, #16] + (heth->Init).Speed | + 8002208: 431a orrs r2, r3 + macconf->LoopbackMode | + 800220a: 683b ldr r3, [r7, #0] + 800220c: 695b ldr r3, [r3, #20] + macconf->ReceiveOwn | + 800220e: 431a orrs r2, r3 + (heth->Init).DuplexMode | + 8002210: 687b ldr r3, [r7, #4] + 8002212: 68db ldr r3, [r3, #12] + macconf->LoopbackMode | + 8002214: 431a orrs r2, r3 + macconf->ChecksumOffload | + 8002216: 683b ldr r3, [r7, #0] + 8002218: 699b ldr r3, [r3, #24] + (heth->Init).DuplexMode | + 800221a: 431a orrs r2, r3 + macconf->RetryTransmission | + 800221c: 683b ldr r3, [r7, #0] + 800221e: 69db ldr r3, [r3, #28] + macconf->ChecksumOffload | + 8002220: 431a orrs r2, r3 + macconf->AutomaticPadCRCStrip | + 8002222: 683b ldr r3, [r7, #0] + 8002224: 6a1b ldr r3, [r3, #32] + macconf->RetryTransmission | + 8002226: 431a orrs r2, r3 + macconf->BackOffLimit | + 8002228: 683b ldr r3, [r7, #0] + 800222a: 6a5b ldr r3, [r3, #36] ; 0x24 + macconf->AutomaticPadCRCStrip | + 800222c: 431a orrs r2, r3 + macconf->DeferralCheck); + 800222e: 683b ldr r3, [r7, #0] + 8002230: 6a9b ldr r3, [r3, #40] ; 0x28 + macconf->BackOffLimit | + 8002232: 4313 orrs r3, r2 + tmpreg1 |= (uint32_t)(macconf->Watchdog | + 8002234: 68fa ldr r2, [r7, #12] + 8002236: 4313 orrs r3, r2 + 8002238: 60fb str r3, [r7, #12] + + /* Write to ETHERNET MACCR */ + (heth->Instance)->MACCR = (uint32_t)tmpreg1; + 800223a: 687b ldr r3, [r7, #4] + 800223c: 681b ldr r3, [r3, #0] + 800223e: 68fa ldr r2, [r7, #12] + 8002240: 601a str r2, [r3, #0] + + /* Wait until the write operation will be taken into account : + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACCR; + 8002242: 687b ldr r3, [r7, #4] + 8002244: 681b ldr r3, [r3, #0] + 8002246: 681b ldr r3, [r3, #0] + 8002248: 60fb str r3, [r7, #12] + HAL_Delay(ETH_REG_WRITE_DELAY); + 800224a: 2001 movs r0, #1 + 800224c: f7ff f982 bl 8001554 + (heth->Instance)->MACCR = tmpreg1; + 8002250: 687b ldr r3, [r7, #4] + 8002252: 681b ldr r3, [r3, #0] + 8002254: 68fa ldr r2, [r7, #12] + 8002256: 601a str r2, [r3, #0] + + /*----------------------- ETHERNET MACFFR Configuration --------------------*/ + /* Write to ETHERNET MACFFR */ + (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | + 8002258: 683b ldr r3, [r7, #0] + 800225a: 6ada ldr r2, [r3, #44] ; 0x2c + macconf->SourceAddrFilter | + 800225c: 683b ldr r3, [r7, #0] + 800225e: 6b1b ldr r3, [r3, #48] ; 0x30 + (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | + 8002260: 431a orrs r2, r3 + macconf->PassControlFrames | + 8002262: 683b ldr r3, [r7, #0] + 8002264: 6b5b ldr r3, [r3, #52] ; 0x34 + macconf->SourceAddrFilter | + 8002266: 431a orrs r2, r3 + macconf->BroadcastFramesReception | + 8002268: 683b ldr r3, [r7, #0] + 800226a: 6b9b ldr r3, [r3, #56] ; 0x38 + macconf->PassControlFrames | + 800226c: 431a orrs r2, r3 + macconf->DestinationAddrFilter | + 800226e: 683b ldr r3, [r7, #0] + 8002270: 6bdb ldr r3, [r3, #60] ; 0x3c + macconf->BroadcastFramesReception | + 8002272: 431a orrs r2, r3 + macconf->PromiscuousMode | + 8002274: 683b ldr r3, [r7, #0] + 8002276: 6c1b ldr r3, [r3, #64] ; 0x40 + macconf->DestinationAddrFilter | + 8002278: 431a orrs r2, r3 + macconf->MulticastFramesFilter | + 800227a: 683b ldr r3, [r7, #0] + 800227c: 6c5b ldr r3, [r3, #68] ; 0x44 + macconf->PromiscuousMode | + 800227e: ea42 0103 orr.w r1, r2, r3 + macconf->UnicastFramesFilter); + 8002282: 683b ldr r3, [r7, #0] + 8002284: 6c9a ldr r2, [r3, #72] ; 0x48 + (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | + 8002286: 687b ldr r3, [r7, #4] + 8002288: 681b ldr r3, [r3, #0] + macconf->MulticastFramesFilter | + 800228a: 430a orrs r2, r1 + (heth->Instance)->MACFFR = (uint32_t)(macconf->ReceiveAll | + 800228c: 605a str r2, [r3, #4] + + /* Wait until the write operation will be taken into account : + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACFFR; + 800228e: 687b ldr r3, [r7, #4] + 8002290: 681b ldr r3, [r3, #0] + 8002292: 685b ldr r3, [r3, #4] + 8002294: 60fb str r3, [r7, #12] + HAL_Delay(ETH_REG_WRITE_DELAY); + 8002296: 2001 movs r0, #1 + 8002298: f7ff f95c bl 8001554 + (heth->Instance)->MACFFR = tmpreg1; + 800229c: 687b ldr r3, [r7, #4] + 800229e: 681b ldr r3, [r3, #0] + 80022a0: 68fa ldr r2, [r7, #12] + 80022a2: 605a str r2, [r3, #4] + + /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ + /* Write to ETHERNET MACHTHR */ + (heth->Instance)->MACHTHR = (uint32_t)macconf->HashTableHigh; + 80022a4: 687b ldr r3, [r7, #4] + 80022a6: 681b ldr r3, [r3, #0] + 80022a8: 683a ldr r2, [r7, #0] + 80022aa: 6cd2 ldr r2, [r2, #76] ; 0x4c + 80022ac: 609a str r2, [r3, #8] + + /* Write to ETHERNET MACHTLR */ + (heth->Instance)->MACHTLR = (uint32_t)macconf->HashTableLow; + 80022ae: 687b ldr r3, [r7, #4] + 80022b0: 681b ldr r3, [r3, #0] + 80022b2: 683a ldr r2, [r7, #0] + 80022b4: 6d12 ldr r2, [r2, #80] ; 0x50 + 80022b6: 60da str r2, [r3, #12] + /*----------------------- ETHERNET MACFCR Configuration --------------------*/ + + /* Get the ETHERNET MACFCR value */ + tmpreg1 = (heth->Instance)->MACFCR; + 80022b8: 687b ldr r3, [r7, #4] + 80022ba: 681b ldr r3, [r3, #0] + 80022bc: 699b ldr r3, [r3, #24] + 80022be: 60fb str r3, [r7, #12] + /* Clear xx bits */ + tmpreg1 &= ETH_MACFCR_CLEAR_MASK; + 80022c0: 68fa ldr r2, [r7, #12] + 80022c2: f64f 7341 movw r3, #65345 ; 0xff41 + 80022c6: 4013 ands r3, r2 + 80022c8: 60fb str r3, [r7, #12] + + tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) | + 80022ca: 683b ldr r3, [r7, #0] + 80022cc: 6d5b ldr r3, [r3, #84] ; 0x54 + 80022ce: 041a lsls r2, r3, #16 + macconf->ZeroQuantaPause | + 80022d0: 683b ldr r3, [r7, #0] + 80022d2: 6d9b ldr r3, [r3, #88] ; 0x58 + tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) | + 80022d4: 431a orrs r2, r3 + macconf->PauseLowThreshold | + 80022d6: 683b ldr r3, [r7, #0] + 80022d8: 6ddb ldr r3, [r3, #92] ; 0x5c + macconf->ZeroQuantaPause | + 80022da: 431a orrs r2, r3 + macconf->UnicastPauseFrameDetect | + 80022dc: 683b ldr r3, [r7, #0] + 80022de: 6e1b ldr r3, [r3, #96] ; 0x60 + macconf->PauseLowThreshold | + 80022e0: 431a orrs r2, r3 + macconf->ReceiveFlowControl | + 80022e2: 683b ldr r3, [r7, #0] + 80022e4: 6e5b ldr r3, [r3, #100] ; 0x64 + macconf->UnicastPauseFrameDetect | + 80022e6: 431a orrs r2, r3 + macconf->TransmitFlowControl); + 80022e8: 683b ldr r3, [r7, #0] + 80022ea: 6e9b ldr r3, [r3, #104] ; 0x68 + macconf->ReceiveFlowControl | + 80022ec: 4313 orrs r3, r2 + tmpreg1 |= (uint32_t)((macconf->PauseTime << 16U) | + 80022ee: 68fa ldr r2, [r7, #12] + 80022f0: 4313 orrs r3, r2 + 80022f2: 60fb str r3, [r7, #12] + + /* Write to ETHERNET MACFCR */ + (heth->Instance)->MACFCR = (uint32_t)tmpreg1; + 80022f4: 687b ldr r3, [r7, #4] + 80022f6: 681b ldr r3, [r3, #0] + 80022f8: 68fa ldr r2, [r7, #12] + 80022fa: 619a str r2, [r3, #24] + + /* Wait until the write operation will be taken into account : + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACFCR; + 80022fc: 687b ldr r3, [r7, #4] + 80022fe: 681b ldr r3, [r3, #0] + 8002300: 699b ldr r3, [r3, #24] + 8002302: 60fb str r3, [r7, #12] + HAL_Delay(ETH_REG_WRITE_DELAY); + 8002304: 2001 movs r0, #1 + 8002306: f7ff f925 bl 8001554 + (heth->Instance)->MACFCR = tmpreg1; + 800230a: 687b ldr r3, [r7, #4] + 800230c: 681b ldr r3, [r3, #0] + 800230e: 68fa ldr r2, [r7, #12] + 8002310: 619a str r2, [r3, #24] + + /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ + (heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | + 8002312: 683b ldr r3, [r7, #0] + 8002314: 6ed9 ldr r1, [r3, #108] ; 0x6c + macconf->VLANTagIdentifier); + 8002316: 683b ldr r3, [r7, #0] + 8002318: 6f1a ldr r2, [r3, #112] ; 0x70 + (heth->Instance)->MACVLANTR = (uint32_t)(macconf->VLANTagComparison | + 800231a: 687b ldr r3, [r7, #4] + 800231c: 681b ldr r3, [r3, #0] + 800231e: 430a orrs r2, r1 + 8002320: 61da str r2, [r3, #28] + + /* Wait until the write operation will be taken into account : + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACVLANTR; + 8002322: 687b ldr r3, [r7, #4] + 8002324: 681b ldr r3, [r3, #0] + 8002326: 69db ldr r3, [r3, #28] + 8002328: 60fb str r3, [r7, #12] + HAL_Delay(ETH_REG_WRITE_DELAY); + 800232a: 2001 movs r0, #1 + 800232c: f7ff f912 bl 8001554 + (heth->Instance)->MACVLANTR = tmpreg1; + 8002330: 687b ldr r3, [r7, #4] + 8002332: 681b ldr r3, [r3, #0] + 8002334: 68fa ldr r2, [r7, #12] + 8002336: 61da str r2, [r3, #28] + 8002338: e01e b.n 8002378 + } + else /* macconf == NULL : here we just configure Speed and Duplex mode */ + { + /*------------------------ ETHERNET MACCR Configuration --------------------*/ + /* Get the ETHERNET MACCR value */ + tmpreg1 = (heth->Instance)->MACCR; + 800233a: 687b ldr r3, [r7, #4] + 800233c: 681b ldr r3, [r3, #0] + 800233e: 681b ldr r3, [r3, #0] + 8002340: 60fb str r3, [r7, #12] + + /* Clear FES and DM bits */ + tmpreg1 &= ~(0x00004800U); + 8002342: 68fb ldr r3, [r7, #12] + 8002344: f423 4390 bic.w r3, r3, #18432 ; 0x4800 + 8002348: 60fb str r3, [r7, #12] + + tmpreg1 |= (uint32_t)(heth->Init.Speed | heth->Init.DuplexMode); + 800234a: 687b ldr r3, [r7, #4] + 800234c: 689a ldr r2, [r3, #8] + 800234e: 687b ldr r3, [r7, #4] + 8002350: 68db ldr r3, [r3, #12] + 8002352: 4313 orrs r3, r2 + 8002354: 68fa ldr r2, [r7, #12] + 8002356: 4313 orrs r3, r2 + 8002358: 60fb str r3, [r7, #12] + + /* Write to ETHERNET MACCR */ + (heth->Instance)->MACCR = (uint32_t)tmpreg1; + 800235a: 687b ldr r3, [r7, #4] + 800235c: 681b ldr r3, [r3, #0] + 800235e: 68fa ldr r2, [r7, #12] + 8002360: 601a str r2, [r3, #0] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACCR; + 8002362: 687b ldr r3, [r7, #4] + 8002364: 681b ldr r3, [r3, #0] + 8002366: 681b ldr r3, [r3, #0] + 8002368: 60fb str r3, [r7, #12] + HAL_Delay(ETH_REG_WRITE_DELAY); + 800236a: 2001 movs r0, #1 + 800236c: f7ff f8f2 bl 8001554 + (heth->Instance)->MACCR = tmpreg1; + 8002370: 687b ldr r3, [r7, #4] + 8002372: 681b ldr r3, [r3, #0] + 8002374: 68fa ldr r2, [r7, #12] + 8002376: 601a str r2, [r3, #0] + } + + /* Set the ETH state to Ready */ + heth->State = HAL_ETH_STATE_READY; + 8002378: 687b ldr r3, [r7, #4] + 800237a: 2201 movs r2, #1 + 800237c: f883 2044 strb.w r2, [r3, #68] ; 0x44 + + /* Process Unlocked */ + __HAL_UNLOCK(heth); + 8002380: 687b ldr r3, [r7, #4] + 8002382: 2200 movs r2, #0 + 8002384: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Return function status */ + return HAL_OK; + 8002388: 2300 movs r3, #0 +} + 800238a: 4618 mov r0, r3 + 800238c: 3710 adds r7, #16 + 800238e: 46bd mov sp, r7 + 8002390: bd80 pop {r7, pc} + 8002392: bf00 nop + 8002394: ff20810f .word 0xff20810f + +08002398 : + * the configuration information for ETHERNET module + * @param err Ethernet Init error + * @retval HAL status + */ +static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth, uint32_t err) +{ + 8002398: b580 push {r7, lr} + 800239a: b0b0 sub sp, #192 ; 0xc0 + 800239c: af00 add r7, sp, #0 + 800239e: 6078 str r0, [r7, #4] + 80023a0: 6039 str r1, [r7, #0] + ETH_MACInitTypeDef macinit; + ETH_DMAInitTypeDef dmainit; + uint32_t tmpreg1 = 0U; + 80023a2: 2300 movs r3, #0 + 80023a4: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + + if (err != ETH_SUCCESS) /* Auto-negotiation failed */ + 80023a8: 683b ldr r3, [r7, #0] + 80023aa: 2b00 cmp r3, #0 + 80023ac: d007 beq.n 80023be + { + /* Set Ethernet duplex mode to Full-duplex */ + (heth->Init).DuplexMode = ETH_MODE_FULLDUPLEX; + 80023ae: 687b ldr r3, [r7, #4] + 80023b0: f44f 6200 mov.w r2, #2048 ; 0x800 + 80023b4: 60da str r2, [r3, #12] + + /* Set Ethernet speed to 100M */ + (heth->Init).Speed = ETH_SPEED_100M; + 80023b6: 687b ldr r3, [r7, #4] + 80023b8: f44f 4280 mov.w r2, #16384 ; 0x4000 + 80023bc: 609a str r2, [r3, #8] + } + + /* Ethernet MAC default initialization **************************************/ + macinit.Watchdog = ETH_WATCHDOG_ENABLE; + 80023be: 2300 movs r3, #0 + 80023c0: 64bb str r3, [r7, #72] ; 0x48 + macinit.Jabber = ETH_JABBER_ENABLE; + 80023c2: 2300 movs r3, #0 + 80023c4: 64fb str r3, [r7, #76] ; 0x4c + macinit.InterFrameGap = ETH_INTERFRAMEGAP_96BIT; + 80023c6: 2300 movs r3, #0 + 80023c8: 653b str r3, [r7, #80] ; 0x50 + macinit.CarrierSense = ETH_CARRIERSENCE_ENABLE; + 80023ca: 2300 movs r3, #0 + 80023cc: 657b str r3, [r7, #84] ; 0x54 + macinit.ReceiveOwn = ETH_RECEIVEOWN_ENABLE; + 80023ce: 2300 movs r3, #0 + 80023d0: 65bb str r3, [r7, #88] ; 0x58 + macinit.LoopbackMode = ETH_LOOPBACKMODE_DISABLE; + 80023d2: 2300 movs r3, #0 + 80023d4: 65fb str r3, [r7, #92] ; 0x5c + if (heth->Init.ChecksumMode == ETH_CHECKSUM_BY_HARDWARE) + 80023d6: 687b ldr r3, [r7, #4] + 80023d8: 69db ldr r3, [r3, #28] + 80023da: 2b00 cmp r3, #0 + 80023dc: d103 bne.n 80023e6 + { + macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_ENABLE; + 80023de: f44f 6380 mov.w r3, #1024 ; 0x400 + 80023e2: 663b str r3, [r7, #96] ; 0x60 + 80023e4: e001 b.n 80023ea + } + else + { + macinit.ChecksumOffload = ETH_CHECKSUMOFFLAOD_DISABLE; + 80023e6: 2300 movs r3, #0 + 80023e8: 663b str r3, [r7, #96] ; 0x60 + } + macinit.RetryTransmission = ETH_RETRYTRANSMISSION_DISABLE; + 80023ea: f44f 7300 mov.w r3, #512 ; 0x200 + 80023ee: 667b str r3, [r7, #100] ; 0x64 + macinit.AutomaticPadCRCStrip = ETH_AUTOMATICPADCRCSTRIP_DISABLE; + 80023f0: 2300 movs r3, #0 + 80023f2: 66bb str r3, [r7, #104] ; 0x68 + macinit.BackOffLimit = ETH_BACKOFFLIMIT_10; + 80023f4: 2300 movs r3, #0 + 80023f6: 66fb str r3, [r7, #108] ; 0x6c + macinit.DeferralCheck = ETH_DEFFERRALCHECK_DISABLE; + 80023f8: 2300 movs r3, #0 + 80023fa: 673b str r3, [r7, #112] ; 0x70 + macinit.ReceiveAll = ETH_RECEIVEAll_DISABLE; + 80023fc: 2300 movs r3, #0 + 80023fe: 677b str r3, [r7, #116] ; 0x74 + macinit.SourceAddrFilter = ETH_SOURCEADDRFILTER_DISABLE; + 8002400: 2300 movs r3, #0 + 8002402: 67bb str r3, [r7, #120] ; 0x78 + macinit.PassControlFrames = ETH_PASSCONTROLFRAMES_BLOCKALL; + 8002404: 2340 movs r3, #64 ; 0x40 + 8002406: 67fb str r3, [r7, #124] ; 0x7c + macinit.BroadcastFramesReception = ETH_BROADCASTFRAMESRECEPTION_ENABLE; + 8002408: 2300 movs r3, #0 + 800240a: f8c7 3080 str.w r3, [r7, #128] ; 0x80 + macinit.DestinationAddrFilter = ETH_DESTINATIONADDRFILTER_NORMAL; + 800240e: 2300 movs r3, #0 + 8002410: f8c7 3084 str.w r3, [r7, #132] ; 0x84 + macinit.PromiscuousMode = ETH_PROMISCUOUS_MODE_DISABLE; + 8002414: 2300 movs r3, #0 + 8002416: f8c7 3088 str.w r3, [r7, #136] ; 0x88 + macinit.MulticastFramesFilter = ETH_MULTICASTFRAMESFILTER_PERFECT; + 800241a: 2300 movs r3, #0 + 800241c: f8c7 308c str.w r3, [r7, #140] ; 0x8c + macinit.UnicastFramesFilter = ETH_UNICASTFRAMESFILTER_PERFECT; + 8002420: 2300 movs r3, #0 + 8002422: f8c7 3090 str.w r3, [r7, #144] ; 0x90 + macinit.HashTableHigh = 0x0U; + 8002426: 2300 movs r3, #0 + 8002428: f8c7 3094 str.w r3, [r7, #148] ; 0x94 + macinit.HashTableLow = 0x0U; + 800242c: 2300 movs r3, #0 + 800242e: f8c7 3098 str.w r3, [r7, #152] ; 0x98 + macinit.PauseTime = 0x0U; + 8002432: 2300 movs r3, #0 + 8002434: f8c7 309c str.w r3, [r7, #156] ; 0x9c + macinit.ZeroQuantaPause = ETH_ZEROQUANTAPAUSE_DISABLE; + 8002438: 2380 movs r3, #128 ; 0x80 + 800243a: f8c7 30a0 str.w r3, [r7, #160] ; 0xa0 + macinit.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS4; + 800243e: 2300 movs r3, #0 + 8002440: f8c7 30a4 str.w r3, [r7, #164] ; 0xa4 + macinit.UnicastPauseFrameDetect = ETH_UNICASTPAUSEFRAMEDETECT_DISABLE; + 8002444: 2300 movs r3, #0 + 8002446: f8c7 30a8 str.w r3, [r7, #168] ; 0xa8 + macinit.ReceiveFlowControl = ETH_RECEIVEFLOWCONTROL_DISABLE; + 800244a: 2300 movs r3, #0 + 800244c: f8c7 30ac str.w r3, [r7, #172] ; 0xac + macinit.TransmitFlowControl = ETH_TRANSMITFLOWCONTROL_DISABLE; + 8002450: 2300 movs r3, #0 + 8002452: f8c7 30b0 str.w r3, [r7, #176] ; 0xb0 + macinit.VLANTagComparison = ETH_VLANTAGCOMPARISON_16BIT; + 8002456: 2300 movs r3, #0 + 8002458: f8c7 30b4 str.w r3, [r7, #180] ; 0xb4 + macinit.VLANTagIdentifier = 0x0U; + 800245c: 2300 movs r3, #0 + 800245e: f8c7 30b8 str.w r3, [r7, #184] ; 0xb8 + + /*------------------------ ETHERNET MACCR Configuration --------------------*/ + /* Get the ETHERNET MACCR value */ + tmpreg1 = (heth->Instance)->MACCR; + 8002462: 687b ldr r3, [r7, #4] + 8002464: 681b ldr r3, [r3, #0] + 8002466: 681b ldr r3, [r3, #0] + 8002468: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + /* Clear WD, PCE, PS, TE and RE bits */ + tmpreg1 &= ETH_MACCR_CLEAR_MASK; + 800246c: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 8002470: 4baa ldr r3, [pc, #680] ; (800271c ) + 8002472: 4013 ands r3, r2 + 8002474: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + /* Set the IPCO bit according to ETH ChecksumOffload value */ + /* Set the DR bit according to ETH RetryTransmission value */ + /* Set the ACS bit according to ETH AutomaticPadCRCStrip value */ + /* Set the BL bit according to ETH BackOffLimit value */ + /* Set the DC bit according to ETH DeferralCheck value */ + tmpreg1 |= (uint32_t)(macinit.Watchdog | + 8002478: 6cba ldr r2, [r7, #72] ; 0x48 + macinit.Jabber | + 800247a: 6cfb ldr r3, [r7, #76] ; 0x4c + tmpreg1 |= (uint32_t)(macinit.Watchdog | + 800247c: 431a orrs r2, r3 + macinit.InterFrameGap | + 800247e: 6d3b ldr r3, [r7, #80] ; 0x50 + macinit.Jabber | + 8002480: 431a orrs r2, r3 + macinit.CarrierSense | + 8002482: 6d7b ldr r3, [r7, #84] ; 0x54 + macinit.InterFrameGap | + 8002484: 431a orrs r2, r3 + (heth->Init).Speed | + 8002486: 687b ldr r3, [r7, #4] + 8002488: 689b ldr r3, [r3, #8] + macinit.CarrierSense | + 800248a: 431a orrs r2, r3 + macinit.ReceiveOwn | + 800248c: 6dbb ldr r3, [r7, #88] ; 0x58 + (heth->Init).Speed | + 800248e: 431a orrs r2, r3 + macinit.LoopbackMode | + 8002490: 6dfb ldr r3, [r7, #92] ; 0x5c + macinit.ReceiveOwn | + 8002492: 431a orrs r2, r3 + (heth->Init).DuplexMode | + 8002494: 687b ldr r3, [r7, #4] + 8002496: 68db ldr r3, [r3, #12] + macinit.LoopbackMode | + 8002498: 431a orrs r2, r3 + macinit.ChecksumOffload | + 800249a: 6e3b ldr r3, [r7, #96] ; 0x60 + (heth->Init).DuplexMode | + 800249c: 431a orrs r2, r3 + macinit.RetryTransmission | + 800249e: 6e7b ldr r3, [r7, #100] ; 0x64 + macinit.ChecksumOffload | + 80024a0: 431a orrs r2, r3 + macinit.AutomaticPadCRCStrip | + 80024a2: 6ebb ldr r3, [r7, #104] ; 0x68 + macinit.RetryTransmission | + 80024a4: 431a orrs r2, r3 + macinit.BackOffLimit | + 80024a6: 6efb ldr r3, [r7, #108] ; 0x6c + macinit.AutomaticPadCRCStrip | + 80024a8: 431a orrs r2, r3 + macinit.DeferralCheck); + 80024aa: 6f3b ldr r3, [r7, #112] ; 0x70 + macinit.BackOffLimit | + 80024ac: 4313 orrs r3, r2 + tmpreg1 |= (uint32_t)(macinit.Watchdog | + 80024ae: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 80024b2: 4313 orrs r3, r2 + 80024b4: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + + /* Write to ETHERNET MACCR */ + (heth->Instance)->MACCR = (uint32_t)tmpreg1; + 80024b8: 687b ldr r3, [r7, #4] + 80024ba: 681b ldr r3, [r3, #0] + 80024bc: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 80024c0: 601a str r2, [r3, #0] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACCR; + 80024c2: 687b ldr r3, [r7, #4] + 80024c4: 681b ldr r3, [r3, #0] + 80024c6: 681b ldr r3, [r3, #0] + 80024c8: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + HAL_Delay(ETH_REG_WRITE_DELAY); + 80024cc: 2001 movs r0, #1 + 80024ce: f7ff f841 bl 8001554 + (heth->Instance)->MACCR = tmpreg1; + 80024d2: 687b ldr r3, [r7, #4] + 80024d4: 681b ldr r3, [r3, #0] + 80024d6: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 80024da: 601a str r2, [r3, #0] + /* Set the DAIF bit according to ETH DestinationAddrFilter value */ + /* Set the PR bit according to ETH PromiscuousMode value */ + /* Set the PM, HMC and HPF bits according to ETH MulticastFramesFilter value */ + /* Set the HUC and HPF bits according to ETH UnicastFramesFilter value */ + /* Write to ETHERNET MACFFR */ + (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | + 80024dc: 6f7a ldr r2, [r7, #116] ; 0x74 + macinit.SourceAddrFilter | + 80024de: 6fbb ldr r3, [r7, #120] ; 0x78 + (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | + 80024e0: 431a orrs r2, r3 + macinit.PassControlFrames | + 80024e2: 6ffb ldr r3, [r7, #124] ; 0x7c + macinit.SourceAddrFilter | + 80024e4: 431a orrs r2, r3 + macinit.BroadcastFramesReception | + 80024e6: f8d7 3080 ldr.w r3, [r7, #128] ; 0x80 + macinit.PassControlFrames | + 80024ea: 431a orrs r2, r3 + macinit.DestinationAddrFilter | + 80024ec: f8d7 3084 ldr.w r3, [r7, #132] ; 0x84 + macinit.BroadcastFramesReception | + 80024f0: 431a orrs r2, r3 + macinit.PromiscuousMode | + 80024f2: f8d7 3088 ldr.w r3, [r7, #136] ; 0x88 + macinit.DestinationAddrFilter | + 80024f6: 431a orrs r2, r3 + macinit.MulticastFramesFilter | + 80024f8: f8d7 308c ldr.w r3, [r7, #140] ; 0x8c + macinit.PromiscuousMode | + 80024fc: ea42 0103 orr.w r1, r2, r3 + macinit.UnicastFramesFilter); + 8002500: f8d7 2090 ldr.w r2, [r7, #144] ; 0x90 + (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | + 8002504: 687b ldr r3, [r7, #4] + 8002506: 681b ldr r3, [r3, #0] + macinit.MulticastFramesFilter | + 8002508: 430a orrs r2, r1 + (heth->Instance)->MACFFR = (uint32_t)(macinit.ReceiveAll | + 800250a: 605a str r2, [r3, #4] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACFFR; + 800250c: 687b ldr r3, [r7, #4] + 800250e: 681b ldr r3, [r3, #0] + 8002510: 685b ldr r3, [r3, #4] + 8002512: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + HAL_Delay(ETH_REG_WRITE_DELAY); + 8002516: 2001 movs r0, #1 + 8002518: f7ff f81c bl 8001554 + (heth->Instance)->MACFFR = tmpreg1; + 800251c: 687b ldr r3, [r7, #4] + 800251e: 681b ldr r3, [r3, #0] + 8002520: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 8002524: 605a str r2, [r3, #4] + + /*--------------- ETHERNET MACHTHR and MACHTLR Configuration --------------*/ + /* Write to ETHERNET MACHTHR */ + (heth->Instance)->MACHTHR = (uint32_t)macinit.HashTableHigh; + 8002526: 687b ldr r3, [r7, #4] + 8002528: 681b ldr r3, [r3, #0] + 800252a: f8d7 2094 ldr.w r2, [r7, #148] ; 0x94 + 800252e: 609a str r2, [r3, #8] + + /* Write to ETHERNET MACHTLR */ + (heth->Instance)->MACHTLR = (uint32_t)macinit.HashTableLow; + 8002530: 687b ldr r3, [r7, #4] + 8002532: 681b ldr r3, [r3, #0] + 8002534: f8d7 2098 ldr.w r2, [r7, #152] ; 0x98 + 8002538: 60da str r2, [r3, #12] + /*----------------------- ETHERNET MACFCR Configuration -------------------*/ + + /* Get the ETHERNET MACFCR value */ + tmpreg1 = (heth->Instance)->MACFCR; + 800253a: 687b ldr r3, [r7, #4] + 800253c: 681b ldr r3, [r3, #0] + 800253e: 699b ldr r3, [r3, #24] + 8002540: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + /* Clear xx bits */ + tmpreg1 &= ETH_MACFCR_CLEAR_MASK; + 8002544: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 8002548: f64f 7341 movw r3, #65345 ; 0xff41 + 800254c: 4013 ands r3, r2 + 800254e: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + /* Set the DZPQ bit according to ETH ZeroQuantaPause value */ + /* Set the PLT bit according to ETH PauseLowThreshold value */ + /* Set the UP bit according to ETH UnicastPauseFrameDetect value */ + /* Set the RFE bit according to ETH ReceiveFlowControl value */ + /* Set the TFE bit according to ETH TransmitFlowControl value */ + tmpreg1 |= (uint32_t)((macinit.PauseTime << 16U) | + 8002552: f8d7 309c ldr.w r3, [r7, #156] ; 0x9c + 8002556: 041a lsls r2, r3, #16 + macinit.ZeroQuantaPause | + 8002558: f8d7 30a0 ldr.w r3, [r7, #160] ; 0xa0 + tmpreg1 |= (uint32_t)((macinit.PauseTime << 16U) | + 800255c: 431a orrs r2, r3 + macinit.PauseLowThreshold | + 800255e: f8d7 30a4 ldr.w r3, [r7, #164] ; 0xa4 + macinit.ZeroQuantaPause | + 8002562: 431a orrs r2, r3 + macinit.UnicastPauseFrameDetect | + 8002564: f8d7 30a8 ldr.w r3, [r7, #168] ; 0xa8 + macinit.PauseLowThreshold | + 8002568: 431a orrs r2, r3 + macinit.ReceiveFlowControl | + 800256a: f8d7 30ac ldr.w r3, [r7, #172] ; 0xac + macinit.UnicastPauseFrameDetect | + 800256e: 431a orrs r2, r3 + macinit.TransmitFlowControl); + 8002570: f8d7 30b0 ldr.w r3, [r7, #176] ; 0xb0 + macinit.ReceiveFlowControl | + 8002574: 4313 orrs r3, r2 + tmpreg1 |= (uint32_t)((macinit.PauseTime << 16U) | + 8002576: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 800257a: 4313 orrs r3, r2 + 800257c: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + + /* Write to ETHERNET MACFCR */ + (heth->Instance)->MACFCR = (uint32_t)tmpreg1; + 8002580: 687b ldr r3, [r7, #4] + 8002582: 681b ldr r3, [r3, #0] + 8002584: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 8002588: 619a str r2, [r3, #24] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACFCR; + 800258a: 687b ldr r3, [r7, #4] + 800258c: 681b ldr r3, [r3, #0] + 800258e: 699b ldr r3, [r3, #24] + 8002590: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + HAL_Delay(ETH_REG_WRITE_DELAY); + 8002594: 2001 movs r0, #1 + 8002596: f7fe ffdd bl 8001554 + (heth->Instance)->MACFCR = tmpreg1; + 800259a: 687b ldr r3, [r7, #4] + 800259c: 681b ldr r3, [r3, #0] + 800259e: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 80025a2: 619a str r2, [r3, #24] + + /*----------------------- ETHERNET MACVLANTR Configuration ----------------*/ + /* Set the ETV bit according to ETH VLANTagComparison value */ + /* Set the VL bit according to ETH VLANTagIdentifier value */ + (heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | + 80025a4: f8d7 10b4 ldr.w r1, [r7, #180] ; 0xb4 + macinit.VLANTagIdentifier); + 80025a8: f8d7 20b8 ldr.w r2, [r7, #184] ; 0xb8 + (heth->Instance)->MACVLANTR = (uint32_t)(macinit.VLANTagComparison | + 80025ac: 687b ldr r3, [r7, #4] + 80025ae: 681b ldr r3, [r3, #0] + 80025b0: 430a orrs r2, r1 + 80025b2: 61da str r2, [r3, #28] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACVLANTR; + 80025b4: 687b ldr r3, [r7, #4] + 80025b6: 681b ldr r3, [r3, #0] + 80025b8: 69db ldr r3, [r3, #28] + 80025ba: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + HAL_Delay(ETH_REG_WRITE_DELAY); + 80025be: 2001 movs r0, #1 + 80025c0: f7fe ffc8 bl 8001554 + (heth->Instance)->MACVLANTR = tmpreg1; + 80025c4: 687b ldr r3, [r7, #4] + 80025c6: 681b ldr r3, [r3, #0] + 80025c8: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 80025cc: 61da str r2, [r3, #28] + + /* Ethernet DMA default initialization ************************************/ + dmainit.DropTCPIPChecksumErrorFrame = ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE; + 80025ce: 2300 movs r3, #0 + 80025d0: 60bb str r3, [r7, #8] + dmainit.ReceiveStoreForward = ETH_RECEIVESTOREFORWARD_ENABLE; + 80025d2: f04f 7300 mov.w r3, #33554432 ; 0x2000000 + 80025d6: 60fb str r3, [r7, #12] + dmainit.FlushReceivedFrame = ETH_FLUSHRECEIVEDFRAME_ENABLE; + 80025d8: 2300 movs r3, #0 + 80025da: 613b str r3, [r7, #16] + dmainit.TransmitStoreForward = ETH_TRANSMITSTOREFORWARD_ENABLE; + 80025dc: f44f 1300 mov.w r3, #2097152 ; 0x200000 + 80025e0: 617b str r3, [r7, #20] + dmainit.TransmitThresholdControl = ETH_TRANSMITTHRESHOLDCONTROL_64BYTES; + 80025e2: 2300 movs r3, #0 + 80025e4: 61bb str r3, [r7, #24] + dmainit.ForwardErrorFrames = ETH_FORWARDERRORFRAMES_DISABLE; + 80025e6: 2300 movs r3, #0 + 80025e8: 61fb str r3, [r7, #28] + dmainit.ForwardUndersizedGoodFrames = ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE; + 80025ea: 2300 movs r3, #0 + 80025ec: 623b str r3, [r7, #32] + dmainit.ReceiveThresholdControl = ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES; + 80025ee: 2300 movs r3, #0 + 80025f0: 627b str r3, [r7, #36] ; 0x24 + dmainit.SecondFrameOperate = ETH_SECONDFRAMEOPERARTE_ENABLE; + 80025f2: 2304 movs r3, #4 + 80025f4: 62bb str r3, [r7, #40] ; 0x28 + dmainit.AddressAlignedBeats = ETH_ADDRESSALIGNEDBEATS_ENABLE; + 80025f6: f04f 7300 mov.w r3, #33554432 ; 0x2000000 + 80025fa: 62fb str r3, [r7, #44] ; 0x2c + dmainit.FixedBurst = ETH_FIXEDBURST_ENABLE; + 80025fc: f44f 3380 mov.w r3, #65536 ; 0x10000 + 8002600: 633b str r3, [r7, #48] ; 0x30 + dmainit.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; + 8002602: f44f 0380 mov.w r3, #4194304 ; 0x400000 + 8002606: 637b str r3, [r7, #52] ; 0x34 + dmainit.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; + 8002608: f44f 5300 mov.w r3, #8192 ; 0x2000 + 800260c: 63bb str r3, [r7, #56] ; 0x38 + dmainit.EnhancedDescriptorFormat = ETH_DMAENHANCEDDESCRIPTOR_ENABLE; + 800260e: 2380 movs r3, #128 ; 0x80 + 8002610: 63fb str r3, [r7, #60] ; 0x3c + dmainit.DescriptorSkipLength = 0x0U; + 8002612: 2300 movs r3, #0 + 8002614: 643b str r3, [r7, #64] ; 0x40 + dmainit.DMAArbitration = ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1; + 8002616: 2300 movs r3, #0 + 8002618: 647b str r3, [r7, #68] ; 0x44 + + /* Get the ETHERNET DMAOMR value */ + tmpreg1 = (heth->Instance)->DMAOMR; + 800261a: 687b ldr r3, [r7, #4] + 800261c: 681b ldr r3, [r3, #0] + 800261e: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8002622: 699b ldr r3, [r3, #24] + 8002624: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + /* Clear xx bits */ + tmpreg1 &= ETH_DMAOMR_CLEAR_MASK; + 8002628: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 800262c: 4b3c ldr r3, [pc, #240] ; (8002720 ) + 800262e: 4013 ands r3, r2 + 8002630: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + /* Set the TTC bit according to ETH TransmitThresholdControl value */ + /* Set the FEF bit according to ETH ForwardErrorFrames value */ + /* Set the FUF bit according to ETH ForwardUndersizedGoodFrames value */ + /* Set the RTC bit according to ETH ReceiveThresholdControl value */ + /* Set the OSF bit according to ETH SecondFrameOperate value */ + tmpreg1 |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | + 8002634: 68ba ldr r2, [r7, #8] + dmainit.ReceiveStoreForward | + 8002636: 68fb ldr r3, [r7, #12] + tmpreg1 |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | + 8002638: 431a orrs r2, r3 + dmainit.FlushReceivedFrame | + 800263a: 693b ldr r3, [r7, #16] + dmainit.ReceiveStoreForward | + 800263c: 431a orrs r2, r3 + dmainit.TransmitStoreForward | + 800263e: 697b ldr r3, [r7, #20] + dmainit.FlushReceivedFrame | + 8002640: 431a orrs r2, r3 + dmainit.TransmitThresholdControl | + 8002642: 69bb ldr r3, [r7, #24] + dmainit.TransmitStoreForward | + 8002644: 431a orrs r2, r3 + dmainit.ForwardErrorFrames | + 8002646: 69fb ldr r3, [r7, #28] + dmainit.TransmitThresholdControl | + 8002648: 431a orrs r2, r3 + dmainit.ForwardUndersizedGoodFrames | + 800264a: 6a3b ldr r3, [r7, #32] + dmainit.ForwardErrorFrames | + 800264c: 431a orrs r2, r3 + dmainit.ReceiveThresholdControl | + 800264e: 6a7b ldr r3, [r7, #36] ; 0x24 + dmainit.ForwardUndersizedGoodFrames | + 8002650: 431a orrs r2, r3 + dmainit.SecondFrameOperate); + 8002652: 6abb ldr r3, [r7, #40] ; 0x28 + dmainit.ReceiveThresholdControl | + 8002654: 4313 orrs r3, r2 + tmpreg1 |= (uint32_t)(dmainit.DropTCPIPChecksumErrorFrame | + 8002656: f8d7 20bc ldr.w r2, [r7, #188] ; 0xbc + 800265a: 4313 orrs r3, r2 + 800265c: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + + /* Write to ETHERNET DMAOMR */ + (heth->Instance)->DMAOMR = (uint32_t)tmpreg1; + 8002660: 687b ldr r3, [r7, #4] + 8002662: 681b ldr r3, [r3, #0] + 8002664: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8002668: 461a mov r2, r3 + 800266a: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc + 800266e: 6193 str r3, [r2, #24] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->DMAOMR; + 8002670: 687b ldr r3, [r7, #4] + 8002672: 681b ldr r3, [r3, #0] + 8002674: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8002678: 699b ldr r3, [r3, #24] + 800267a: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + HAL_Delay(ETH_REG_WRITE_DELAY); + 800267e: 2001 movs r0, #1 + 8002680: f7fe ff68 bl 8001554 + (heth->Instance)->DMAOMR = tmpreg1; + 8002684: 687b ldr r3, [r7, #4] + 8002686: 681b ldr r3, [r3, #0] + 8002688: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 800268c: 461a mov r2, r3 + 800268e: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc + 8002692: 6193 str r3, [r2, #24] + /* Set the RPBL and 4*PBL bits according to ETH RxDMABurstLength value */ + /* Set the PBL and 4*PBL bits according to ETH TxDMABurstLength value */ + /* Set the Enhanced DMA descriptors bit according to ETH EnhancedDescriptorFormat value*/ + /* Set the DSL bit according to ETH DesciptorSkipLength value */ + /* Set the PR and DA bits according to ETH DMAArbitration value */ + (heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | + 8002694: 6afa ldr r2, [r7, #44] ; 0x2c + dmainit.FixedBurst | + 8002696: 6b3b ldr r3, [r7, #48] ; 0x30 + (heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | + 8002698: 431a orrs r2, r3 + dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ + 800269a: 6b7b ldr r3, [r7, #52] ; 0x34 + dmainit.FixedBurst | + 800269c: 431a orrs r2, r3 + dmainit.TxDMABurstLength | + 800269e: 6bbb ldr r3, [r7, #56] ; 0x38 + dmainit.RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ + 80026a0: 431a orrs r2, r3 + dmainit.EnhancedDescriptorFormat | + 80026a2: 6bfb ldr r3, [r7, #60] ; 0x3c + dmainit.TxDMABurstLength | + 80026a4: 431a orrs r2, r3 + (dmainit.DescriptorSkipLength << 2U) | + 80026a6: 6c3b ldr r3, [r7, #64] ; 0x40 + 80026a8: 009b lsls r3, r3, #2 + dmainit.EnhancedDescriptorFormat | + 80026aa: 431a orrs r2, r3 + dmainit.DMAArbitration | + 80026ac: 6c7b ldr r3, [r7, #68] ; 0x44 + (dmainit.DescriptorSkipLength << 2U) | + 80026ae: 4313 orrs r3, r2 + (heth->Instance)->DMABMR = (uint32_t)(dmainit.AddressAlignedBeats | + 80026b0: 687a ldr r2, [r7, #4] + 80026b2: 6812 ldr r2, [r2, #0] + 80026b4: f443 0300 orr.w r3, r3, #8388608 ; 0x800000 + 80026b8: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 80026bc: 6013 str r3, [r2, #0] + ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->DMABMR; + 80026be: 687b ldr r3, [r7, #4] + 80026c0: 681b ldr r3, [r3, #0] + 80026c2: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80026c6: 681b ldr r3, [r3, #0] + 80026c8: f8c7 30bc str.w r3, [r7, #188] ; 0xbc + HAL_Delay(ETH_REG_WRITE_DELAY); + 80026cc: 2001 movs r0, #1 + 80026ce: f7fe ff41 bl 8001554 + (heth->Instance)->DMABMR = tmpreg1; + 80026d2: 687b ldr r3, [r7, #4] + 80026d4: 681b ldr r3, [r3, #0] + 80026d6: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80026da: 461a mov r2, r3 + 80026dc: f8d7 30bc ldr.w r3, [r7, #188] ; 0xbc + 80026e0: 6013 str r3, [r2, #0] + + if ((heth->Init).RxMode == ETH_RXINTERRUPT_MODE) + 80026e2: 687b ldr r3, [r7, #4] + 80026e4: 699b ldr r3, [r3, #24] + 80026e6: 2b01 cmp r3, #1 + 80026e8: d10d bne.n 8002706 + { + /* Enable the Ethernet Rx Interrupt */ + __HAL_ETH_DMA_ENABLE_IT((heth), ETH_DMA_IT_NIS | ETH_DMA_IT_R); + 80026ea: 687b ldr r3, [r7, #4] + 80026ec: 681b ldr r3, [r3, #0] + 80026ee: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80026f2: 69db ldr r3, [r3, #28] + 80026f4: 687a ldr r2, [r7, #4] + 80026f6: 6812 ldr r2, [r2, #0] + 80026f8: f443 3380 orr.w r3, r3, #65536 ; 0x10000 + 80026fc: f043 0340 orr.w r3, r3, #64 ; 0x40 + 8002700: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8002704: 61d3 str r3, [r2, #28] + } + + /* Initialize MAC address in ethernet MAC */ + ETH_MACAddressConfig(heth, ETH_MAC_ADDRESS0, heth->Init.MACAddr); + 8002706: 687b ldr r3, [r7, #4] + 8002708: 695b ldr r3, [r3, #20] + 800270a: 461a mov r2, r3 + 800270c: 2100 movs r1, #0 + 800270e: 6878 ldr r0, [r7, #4] + 8002710: f000 f808 bl 8002724 +} + 8002714: bf00 nop + 8002716: 37c0 adds r7, #192 ; 0xc0 + 8002718: 46bd mov sp, r7 + 800271a: bd80 pop {r7, pc} + 800271c: ff20810f .word 0xff20810f + 8002720: f8de3f23 .word 0xf8de3f23 + +08002724 : + * @arg ETH_MAC_Address3: MAC Address3 + * @param Addr Pointer to MAC address buffer data (6 bytes) + * @retval HAL status + */ +static void ETH_MACAddressConfig(ETH_HandleTypeDef *heth, uint32_t MacAddr, uint8_t *Addr) +{ + 8002724: b480 push {r7} + 8002726: b087 sub sp, #28 + 8002728: af00 add r7, sp, #0 + 800272a: 60f8 str r0, [r7, #12] + 800272c: 60b9 str r1, [r7, #8] + 800272e: 607a str r2, [r7, #4] + + /* Check the parameters */ + assert_param(IS_ETH_MAC_ADDRESS0123(MacAddr)); + + /* Calculate the selected MAC address high register */ + tmpreg1 = ((uint32_t)Addr[5U] << 8U) | (uint32_t)Addr[4U]; + 8002730: 687b ldr r3, [r7, #4] + 8002732: 3305 adds r3, #5 + 8002734: 781b ldrb r3, [r3, #0] + 8002736: 021b lsls r3, r3, #8 + 8002738: 687a ldr r2, [r7, #4] + 800273a: 3204 adds r2, #4 + 800273c: 7812 ldrb r2, [r2, #0] + 800273e: 4313 orrs r3, r2 + 8002740: 617b str r3, [r7, #20] + /* Load the selected MAC address high register */ + (*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_HBASE + MacAddr))) = tmpreg1; + 8002742: 68ba ldr r2, [r7, #8] + 8002744: 4b10 ldr r3, [pc, #64] ; (8002788 ) + 8002746: 4413 add r3, r2 + 8002748: 461a mov r2, r3 + 800274a: 697b ldr r3, [r7, #20] + 800274c: 6013 str r3, [r2, #0] + /* Calculate the selected MAC address low register */ + tmpreg1 = ((uint32_t)Addr[3U] << 24U) | ((uint32_t)Addr[2U] << 16U) | ((uint32_t)Addr[1U] << 8U) | Addr[0U]; + 800274e: 687b ldr r3, [r7, #4] + 8002750: 3303 adds r3, #3 + 8002752: 781b ldrb r3, [r3, #0] + 8002754: 061a lsls r2, r3, #24 + 8002756: 687b ldr r3, [r7, #4] + 8002758: 3302 adds r3, #2 + 800275a: 781b ldrb r3, [r3, #0] + 800275c: 041b lsls r3, r3, #16 + 800275e: 431a orrs r2, r3 + 8002760: 687b ldr r3, [r7, #4] + 8002762: 3301 adds r3, #1 + 8002764: 781b ldrb r3, [r3, #0] + 8002766: 021b lsls r3, r3, #8 + 8002768: 4313 orrs r3, r2 + 800276a: 687a ldr r2, [r7, #4] + 800276c: 7812 ldrb r2, [r2, #0] + 800276e: 4313 orrs r3, r2 + 8002770: 617b str r3, [r7, #20] + + /* Load the selected MAC address low register */ + (*(__IO uint32_t *)((uint32_t)(ETH_MAC_ADDR_LBASE + MacAddr))) = tmpreg1; + 8002772: 68ba ldr r2, [r7, #8] + 8002774: 4b05 ldr r3, [pc, #20] ; (800278c ) + 8002776: 4413 add r3, r2 + 8002778: 461a mov r2, r3 + 800277a: 697b ldr r3, [r7, #20] + 800277c: 6013 str r3, [r2, #0] +} + 800277e: bf00 nop + 8002780: 371c adds r7, #28 + 8002782: 46bd mov sp, r7 + 8002784: bc80 pop {r7} + 8002786: 4770 bx lr + 8002788: 40028040 .word 0x40028040 + 800278c: 40028044 .word 0x40028044 + +08002790 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth) +{ + 8002790: b580 push {r7, lr} + 8002792: b084 sub sp, #16 + 8002794: af00 add r7, sp, #0 + 8002796: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg1 = 0U; + 8002798: 2300 movs r3, #0 + 800279a: 60fb str r3, [r7, #12] + + /* Enable the MAC transmission */ + (heth->Instance)->MACCR |= ETH_MACCR_TE; + 800279c: 687b ldr r3, [r7, #4] + 800279e: 681b ldr r3, [r3, #0] + 80027a0: 681a ldr r2, [r3, #0] + 80027a2: 687b ldr r3, [r7, #4] + 80027a4: 681b ldr r3, [r3, #0] + 80027a6: f042 0208 orr.w r2, r2, #8 + 80027aa: 601a str r2, [r3, #0] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACCR; + 80027ac: 687b ldr r3, [r7, #4] + 80027ae: 681b ldr r3, [r3, #0] + 80027b0: 681b ldr r3, [r3, #0] + 80027b2: 60fb str r3, [r7, #12] + ETH_Delay(ETH_REG_WRITE_DELAY); + 80027b4: 2001 movs r0, #1 + 80027b6: f000 f8d9 bl 800296c + (heth->Instance)->MACCR = tmpreg1; + 80027ba: 687b ldr r3, [r7, #4] + 80027bc: 681b ldr r3, [r3, #0] + 80027be: 68fa ldr r2, [r7, #12] + 80027c0: 601a str r2, [r3, #0] +} + 80027c2: bf00 nop + 80027c4: 3710 adds r7, #16 + 80027c6: 46bd mov sp, r7 + 80027c8: bd80 pop {r7, pc} + +080027ca : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth) +{ + 80027ca: b580 push {r7, lr} + 80027cc: b084 sub sp, #16 + 80027ce: af00 add r7, sp, #0 + 80027d0: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg1 = 0U; + 80027d2: 2300 movs r3, #0 + 80027d4: 60fb str r3, [r7, #12] + + /* Disable the MAC transmission */ + (heth->Instance)->MACCR &= ~ETH_MACCR_TE; + 80027d6: 687b ldr r3, [r7, #4] + 80027d8: 681b ldr r3, [r3, #0] + 80027da: 681a ldr r2, [r3, #0] + 80027dc: 687b ldr r3, [r7, #4] + 80027de: 681b ldr r3, [r3, #0] + 80027e0: f022 0208 bic.w r2, r2, #8 + 80027e4: 601a str r2, [r3, #0] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACCR; + 80027e6: 687b ldr r3, [r7, #4] + 80027e8: 681b ldr r3, [r3, #0] + 80027ea: 681b ldr r3, [r3, #0] + 80027ec: 60fb str r3, [r7, #12] + ETH_Delay(ETH_REG_WRITE_DELAY); + 80027ee: 2001 movs r0, #1 + 80027f0: f000 f8bc bl 800296c + (heth->Instance)->MACCR = tmpreg1; + 80027f4: 687b ldr r3, [r7, #4] + 80027f6: 681b ldr r3, [r3, #0] + 80027f8: 68fa ldr r2, [r7, #12] + 80027fa: 601a str r2, [r3, #0] +} + 80027fc: bf00 nop + 80027fe: 3710 adds r7, #16 + 8002800: 46bd mov sp, r7 + 8002802: bd80 pop {r7, pc} + +08002804 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth) +{ + 8002804: b580 push {r7, lr} + 8002806: b084 sub sp, #16 + 8002808: af00 add r7, sp, #0 + 800280a: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg1 = 0U; + 800280c: 2300 movs r3, #0 + 800280e: 60fb str r3, [r7, #12] + + /* Enable the MAC reception */ + (heth->Instance)->MACCR |= ETH_MACCR_RE; + 8002810: 687b ldr r3, [r7, #4] + 8002812: 681b ldr r3, [r3, #0] + 8002814: 681a ldr r2, [r3, #0] + 8002816: 687b ldr r3, [r7, #4] + 8002818: 681b ldr r3, [r3, #0] + 800281a: f042 0204 orr.w r2, r2, #4 + 800281e: 601a str r2, [r3, #0] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACCR; + 8002820: 687b ldr r3, [r7, #4] + 8002822: 681b ldr r3, [r3, #0] + 8002824: 681b ldr r3, [r3, #0] + 8002826: 60fb str r3, [r7, #12] + ETH_Delay(ETH_REG_WRITE_DELAY); + 8002828: 2001 movs r0, #1 + 800282a: f000 f89f bl 800296c + (heth->Instance)->MACCR = tmpreg1; + 800282e: 687b ldr r3, [r7, #4] + 8002830: 681b ldr r3, [r3, #0] + 8002832: 68fa ldr r2, [r7, #12] + 8002834: 601a str r2, [r3, #0] +} + 8002836: bf00 nop + 8002838: 3710 adds r7, #16 + 800283a: 46bd mov sp, r7 + 800283c: bd80 pop {r7, pc} + +0800283e : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth) +{ + 800283e: b580 push {r7, lr} + 8002840: b084 sub sp, #16 + 8002842: af00 add r7, sp, #0 + 8002844: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg1 = 0U; + 8002846: 2300 movs r3, #0 + 8002848: 60fb str r3, [r7, #12] + + /* Disable the MAC reception */ + (heth->Instance)->MACCR &= ~ETH_MACCR_RE; + 800284a: 687b ldr r3, [r7, #4] + 800284c: 681b ldr r3, [r3, #0] + 800284e: 681a ldr r2, [r3, #0] + 8002850: 687b ldr r3, [r7, #4] + 8002852: 681b ldr r3, [r3, #0] + 8002854: f022 0204 bic.w r2, r2, #4 + 8002858: 601a str r2, [r3, #0] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->MACCR; + 800285a: 687b ldr r3, [r7, #4] + 800285c: 681b ldr r3, [r3, #0] + 800285e: 681b ldr r3, [r3, #0] + 8002860: 60fb str r3, [r7, #12] + ETH_Delay(ETH_REG_WRITE_DELAY); + 8002862: 2001 movs r0, #1 + 8002864: f000 f882 bl 800296c + (heth->Instance)->MACCR = tmpreg1; + 8002868: 687b ldr r3, [r7, #4] + 800286a: 681b ldr r3, [r3, #0] + 800286c: 68fa ldr r2, [r7, #12] + 800286e: 601a str r2, [r3, #0] +} + 8002870: bf00 nop + 8002872: 3710 adds r7, #16 + 8002874: 46bd mov sp, r7 + 8002876: bd80 pop {r7, pc} + +08002878 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth) +{ + 8002878: b480 push {r7} + 800287a: b083 sub sp, #12 + 800287c: af00 add r7, sp, #0 + 800287e: 6078 str r0, [r7, #4] + /* Enable the DMA transmission */ + (heth->Instance)->DMAOMR |= ETH_DMAOMR_ST; + 8002880: 687b ldr r3, [r7, #4] + 8002882: 681b ldr r3, [r3, #0] + 8002884: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8002888: 699b ldr r3, [r3, #24] + 800288a: 687a ldr r2, [r7, #4] + 800288c: 6812 ldr r2, [r2, #0] + 800288e: f443 5300 orr.w r3, r3, #8192 ; 0x2000 + 8002892: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8002896: 6193 str r3, [r2, #24] +} + 8002898: bf00 nop + 800289a: 370c adds r7, #12 + 800289c: 46bd mov sp, r7 + 800289e: bc80 pop {r7} + 80028a0: 4770 bx lr + +080028a2 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth) +{ + 80028a2: b480 push {r7} + 80028a4: b083 sub sp, #12 + 80028a6: af00 add r7, sp, #0 + 80028a8: 6078 str r0, [r7, #4] + /* Disable the DMA transmission */ + (heth->Instance)->DMAOMR &= ~ETH_DMAOMR_ST; + 80028aa: 687b ldr r3, [r7, #4] + 80028ac: 681b ldr r3, [r3, #0] + 80028ae: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80028b2: 699b ldr r3, [r3, #24] + 80028b4: 687a ldr r2, [r7, #4] + 80028b6: 6812 ldr r2, [r2, #0] + 80028b8: f423 5300 bic.w r3, r3, #8192 ; 0x2000 + 80028bc: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 80028c0: 6193 str r3, [r2, #24] +} + 80028c2: bf00 nop + 80028c4: 370c adds r7, #12 + 80028c6: 46bd mov sp, r7 + 80028c8: bc80 pop {r7} + 80028ca: 4770 bx lr + +080028cc : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth) +{ + 80028cc: b480 push {r7} + 80028ce: b083 sub sp, #12 + 80028d0: af00 add r7, sp, #0 + 80028d2: 6078 str r0, [r7, #4] + /* Enable the DMA reception */ + (heth->Instance)->DMAOMR |= ETH_DMAOMR_SR; + 80028d4: 687b ldr r3, [r7, #4] + 80028d6: 681b ldr r3, [r3, #0] + 80028d8: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80028dc: 699b ldr r3, [r3, #24] + 80028de: 687a ldr r2, [r7, #4] + 80028e0: 6812 ldr r2, [r2, #0] + 80028e2: f043 0302 orr.w r3, r3, #2 + 80028e6: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 80028ea: 6193 str r3, [r2, #24] +} + 80028ec: bf00 nop + 80028ee: 370c adds r7, #12 + 80028f0: 46bd mov sp, r7 + 80028f2: bc80 pop {r7} + 80028f4: 4770 bx lr + +080028f6 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth) +{ + 80028f6: b480 push {r7} + 80028f8: b083 sub sp, #12 + 80028fa: af00 add r7, sp, #0 + 80028fc: 6078 str r0, [r7, #4] + /* Disable the DMA reception */ + (heth->Instance)->DMAOMR &= ~ETH_DMAOMR_SR; + 80028fe: 687b ldr r3, [r7, #4] + 8002900: 681b ldr r3, [r3, #0] + 8002902: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8002906: 699b ldr r3, [r3, #24] + 8002908: 687a ldr r2, [r7, #4] + 800290a: 6812 ldr r2, [r2, #0] + 800290c: f023 0302 bic.w r3, r3, #2 + 8002910: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8002914: 6193 str r3, [r2, #24] +} + 8002916: bf00 nop + 8002918: 370c adds r7, #12 + 800291a: 46bd mov sp, r7 + 800291c: bc80 pop {r7} + 800291e: 4770 bx lr + +08002920 : + * @param heth pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module + * @retval None + */ +static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth) +{ + 8002920: b580 push {r7, lr} + 8002922: b084 sub sp, #16 + 8002924: af00 add r7, sp, #0 + 8002926: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg1 = 0U; + 8002928: 2300 movs r3, #0 + 800292a: 60fb str r3, [r7, #12] + + /* Set the Flush Transmit FIFO bit */ + (heth->Instance)->DMAOMR |= ETH_DMAOMR_FTF; + 800292c: 687b ldr r3, [r7, #4] + 800292e: 681b ldr r3, [r3, #0] + 8002930: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 8002934: 699b ldr r3, [r3, #24] + 8002936: 687a ldr r2, [r7, #4] + 8002938: 6812 ldr r2, [r2, #0] + 800293a: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 + 800293e: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8002942: 6193 str r3, [r2, #24] + + /* Wait until the write operation will be taken into account: + at least four TX_CLK/RX_CLK clock cycles */ + tmpreg1 = (heth->Instance)->DMAOMR; + 8002944: 687b ldr r3, [r7, #4] + 8002946: 681b ldr r3, [r3, #0] + 8002948: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 800294c: 699b ldr r3, [r3, #24] + 800294e: 60fb str r3, [r7, #12] + ETH_Delay(ETH_REG_WRITE_DELAY); + 8002950: 2001 movs r0, #1 + 8002952: f000 f80b bl 800296c + (heth->Instance)->DMAOMR = tmpreg1; + 8002956: 687b ldr r3, [r7, #4] + 8002958: 681a ldr r2, [r3, #0] + 800295a: 68fb ldr r3, [r7, #12] + 800295c: f502 5280 add.w r2, r2, #4096 ; 0x1000 + 8002960: 6193 str r3, [r2, #24] +} + 8002962: bf00 nop + 8002964: 3710 adds r7, #16 + 8002966: 46bd mov sp, r7 + 8002968: bd80 pop {r7, pc} + ... + +0800296c : + * @brief This function provides delay (in milliseconds) based on CPU cycles method. + * @param mdelay specifies the delay time length, in milliseconds. + * @retval None + */ +static void ETH_Delay(uint32_t mdelay) +{ + 800296c: b480 push {r7} + 800296e: b085 sub sp, #20 + 8002970: af00 add r7, sp, #0 + 8002972: 6078 str r0, [r7, #4] + __IO uint32_t Delay = mdelay * (SystemCoreClock / 8U / 1000U); + 8002974: 4b0a ldr r3, [pc, #40] ; (80029a0 ) + 8002976: 681b ldr r3, [r3, #0] + 8002978: 4a0a ldr r2, [pc, #40] ; (80029a4 ) + 800297a: fba2 2303 umull r2, r3, r2, r3 + 800297e: 0a5b lsrs r3, r3, #9 + 8002980: 687a ldr r2, [r7, #4] + 8002982: fb02 f303 mul.w r3, r2, r3 + 8002986: 60fb str r3, [r7, #12] + do + { + __NOP(); + 8002988: bf00 nop + } + while (Delay --); + 800298a: 68fb ldr r3, [r7, #12] + 800298c: 1e5a subs r2, r3, #1 + 800298e: 60fa str r2, [r7, #12] + 8002990: 2b00 cmp r3, #0 + 8002992: d1f9 bne.n 8002988 +} + 8002994: bf00 nop + 8002996: bf00 nop + 8002998: 3714 adds r7, #20 + 800299a: 46bd mov sp, r7 + 800299c: bc80 pop {r7} + 800299e: 4770 bx lr + 80029a0: 20000000 .word 0x20000000 + 80029a4: 10624dd3 .word 0x10624dd3 + +080029a8 : + * @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) +{ + 80029a8: b480 push {r7} + 80029aa: b087 sub sp, #28 + 80029ac: af00 add r7, sp, #0 + 80029ae: 6078 str r0, [r7, #4] + 80029b0: 6039 str r1, [r7, #0] + uint32_t position = 0x00u; + 80029b2: 2300 movs r3, #0 + 80029b4: 617b str r3, [r7, #20] + 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) + 80029b6: e16f b.n 8002c98 + { + /* Get current io position */ + iocurrent = (GPIO_Init->Pin) & (1uL << position); + 80029b8: 683b ldr r3, [r7, #0] + 80029ba: 681a ldr r2, [r3, #0] + 80029bc: 2101 movs r1, #1 + 80029be: 697b ldr r3, [r7, #20] + 80029c0: fa01 f303 lsl.w r3, r1, r3 + 80029c4: 4013 ands r3, r2 + 80029c6: 60fb str r3, [r7, #12] + + if (iocurrent != 0x00u) + 80029c8: 68fb ldr r3, [r7, #12] + 80029ca: 2b00 cmp r3, #0 + 80029cc: f000 8161 beq.w 8002c92 + { + /* In case of Output or Alternate function mode selection */ + if(((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) + 80029d0: 683b ldr r3, [r7, #0] + 80029d2: 685b ldr r3, [r3, #4] + 80029d4: f003 0303 and.w r3, r3, #3 + 80029d8: 2b01 cmp r3, #1 + 80029da: d005 beq.n 80029e8 + 80029dc: 683b ldr r3, [r7, #0] + 80029de: 685b ldr r3, [r3, #4] + 80029e0: f003 0303 and.w r3, r3, #3 + 80029e4: 2b02 cmp r3, #2 + 80029e6: d130 bne.n 8002a4a + { + /* Check the Speed parameter */ + assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); + /* Configure the IO Speed */ + temp = GPIOx->OSPEEDR; + 80029e8: 687b ldr r3, [r7, #4] + 80029ea: 689b ldr r3, [r3, #8] + 80029ec: 613b str r3, [r7, #16] + temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u)); + 80029ee: 697b ldr r3, [r7, #20] + 80029f0: 005b lsls r3, r3, #1 + 80029f2: 2203 movs r2, #3 + 80029f4: fa02 f303 lsl.w r3, r2, r3 + 80029f8: 43db mvns r3, r3 + 80029fa: 693a ldr r2, [r7, #16] + 80029fc: 4013 ands r3, r2 + 80029fe: 613b str r3, [r7, #16] + temp |= (GPIO_Init->Speed << (position * 2u)); + 8002a00: 683b ldr r3, [r7, #0] + 8002a02: 68da ldr r2, [r3, #12] + 8002a04: 697b ldr r3, [r7, #20] + 8002a06: 005b lsls r3, r3, #1 + 8002a08: fa02 f303 lsl.w r3, r2, r3 + 8002a0c: 693a ldr r2, [r7, #16] + 8002a0e: 4313 orrs r3, r2 + 8002a10: 613b str r3, [r7, #16] + GPIOx->OSPEEDR = temp; + 8002a12: 687b ldr r3, [r7, #4] + 8002a14: 693a ldr r2, [r7, #16] + 8002a16: 609a str r2, [r3, #8] + + /* Configure the IO Output Type */ + temp = GPIOx->OTYPER; + 8002a18: 687b ldr r3, [r7, #4] + 8002a1a: 685b ldr r3, [r3, #4] + 8002a1c: 613b str r3, [r7, #16] + temp &= ~(GPIO_OTYPER_OT0 << position) ; + 8002a1e: 2201 movs r2, #1 + 8002a20: 697b ldr r3, [r7, #20] + 8002a22: fa02 f303 lsl.w r3, r2, r3 + 8002a26: 43db mvns r3, r3 + 8002a28: 693a ldr r2, [r7, #16] + 8002a2a: 4013 ands r3, r2 + 8002a2c: 613b str r3, [r7, #16] + temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); + 8002a2e: 683b ldr r3, [r7, #0] + 8002a30: 685b ldr r3, [r3, #4] + 8002a32: 091b lsrs r3, r3, #4 + 8002a34: f003 0201 and.w r2, r3, #1 + 8002a38: 697b ldr r3, [r7, #20] + 8002a3a: fa02 f303 lsl.w r3, r2, r3 + 8002a3e: 693a ldr r2, [r7, #16] + 8002a40: 4313 orrs r3, r2 + 8002a42: 613b str r3, [r7, #16] + GPIOx->OTYPER = temp; + 8002a44: 687b ldr r3, [r7, #4] + 8002a46: 693a ldr r2, [r7, #16] + 8002a48: 605a str r2, [r3, #4] + } + if((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) + 8002a4a: 683b ldr r3, [r7, #0] + 8002a4c: 685b ldr r3, [r3, #4] + 8002a4e: f003 0303 and.w r3, r3, #3 + 8002a52: 2b03 cmp r3, #3 + 8002a54: d017 beq.n 8002a86 + { + /* Check the Pull parameter */ + assert_param(IS_GPIO_PULL(GPIO_Init->Pull)); + + /* Activate the Pull-up or Pull down resistor for the current IO */ + temp = GPIOx->PUPDR; + 8002a56: 687b ldr r3, [r7, #4] + 8002a58: 68db ldr r3, [r3, #12] + 8002a5a: 613b str r3, [r7, #16] + temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2u)); + 8002a5c: 697b ldr r3, [r7, #20] + 8002a5e: 005b lsls r3, r3, #1 + 8002a60: 2203 movs r2, #3 + 8002a62: fa02 f303 lsl.w r3, r2, r3 + 8002a66: 43db mvns r3, r3 + 8002a68: 693a ldr r2, [r7, #16] + 8002a6a: 4013 ands r3, r2 + 8002a6c: 613b str r3, [r7, #16] + temp |= ((GPIO_Init->Pull) << (position * 2u)); + 8002a6e: 683b ldr r3, [r7, #0] + 8002a70: 689a ldr r2, [r3, #8] + 8002a72: 697b ldr r3, [r7, #20] + 8002a74: 005b lsls r3, r3, #1 + 8002a76: fa02 f303 lsl.w r3, r2, r3 + 8002a7a: 693a ldr r2, [r7, #16] + 8002a7c: 4313 orrs r3, r2 + 8002a7e: 613b str r3, [r7, #16] + GPIOx->PUPDR = temp; + 8002a80: 687b ldr r3, [r7, #4] + 8002a82: 693a ldr r2, [r7, #16] + 8002a84: 60da str r2, [r3, #12] + } + + /*--------------------- GPIO Mode Configuration ------------------------*/ + /* In case of Alternate function mode selection */ + if((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) + 8002a86: 683b ldr r3, [r7, #0] + 8002a88: 685b ldr r3, [r3, #4] + 8002a8a: f003 0303 and.w r3, r3, #3 + 8002a8e: 2b02 cmp r3, #2 + 8002a90: d123 bne.n 8002ada + /* 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]; + 8002a92: 697b ldr r3, [r7, #20] + 8002a94: 08da lsrs r2, r3, #3 + 8002a96: 687b ldr r3, [r7, #4] + 8002a98: 3208 adds r2, #8 + 8002a9a: f853 3022 ldr.w r3, [r3, r2, lsl #2] + 8002a9e: 613b str r3, [r7, #16] + temp &= ~(0xFu << ((position & 0x07u) * 4u)); + 8002aa0: 697b ldr r3, [r7, #20] + 8002aa2: f003 0307 and.w r3, r3, #7 + 8002aa6: 009b lsls r3, r3, #2 + 8002aa8: 220f movs r2, #15 + 8002aaa: fa02 f303 lsl.w r3, r2, r3 + 8002aae: 43db mvns r3, r3 + 8002ab0: 693a ldr r2, [r7, #16] + 8002ab2: 4013 ands r3, r2 + 8002ab4: 613b str r3, [r7, #16] + temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u)); + 8002ab6: 683b ldr r3, [r7, #0] + 8002ab8: 691a ldr r2, [r3, #16] + 8002aba: 697b ldr r3, [r7, #20] + 8002abc: f003 0307 and.w r3, r3, #7 + 8002ac0: 009b lsls r3, r3, #2 + 8002ac2: fa02 f303 lsl.w r3, r2, r3 + 8002ac6: 693a ldr r2, [r7, #16] + 8002ac8: 4313 orrs r3, r2 + 8002aca: 613b str r3, [r7, #16] + GPIOx->AFR[position >> 3u] = temp; + 8002acc: 697b ldr r3, [r7, #20] + 8002ace: 08da lsrs r2, r3, #3 + 8002ad0: 687b ldr r3, [r7, #4] + 8002ad2: 3208 adds r2, #8 + 8002ad4: 6939 ldr r1, [r7, #16] + 8002ad6: f843 1022 str.w r1, [r3, r2, lsl #2] + } + + /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ + temp = GPIOx->MODER; + 8002ada: 687b ldr r3, [r7, #4] + 8002adc: 681b ldr r3, [r3, #0] + 8002ade: 613b str r3, [r7, #16] + temp &= ~(GPIO_MODER_MODE0 << (position * 2u)); + 8002ae0: 697b ldr r3, [r7, #20] + 8002ae2: 005b lsls r3, r3, #1 + 8002ae4: 2203 movs r2, #3 + 8002ae6: fa02 f303 lsl.w r3, r2, r3 + 8002aea: 43db mvns r3, r3 + 8002aec: 693a ldr r2, [r7, #16] + 8002aee: 4013 ands r3, r2 + 8002af0: 613b str r3, [r7, #16] + temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u)); + 8002af2: 683b ldr r3, [r7, #0] + 8002af4: 685b ldr r3, [r3, #4] + 8002af6: f003 0203 and.w r2, r3, #3 + 8002afa: 697b ldr r3, [r7, #20] + 8002afc: 005b lsls r3, r3, #1 + 8002afe: fa02 f303 lsl.w r3, r2, r3 + 8002b02: 693a ldr r2, [r7, #16] + 8002b04: 4313 orrs r3, r2 + 8002b06: 613b str r3, [r7, #16] + GPIOx->MODER = temp; + 8002b08: 687b ldr r3, [r7, #4] + 8002b0a: 693a ldr r2, [r7, #16] + 8002b0c: 601a str r2, [r3, #0] + + /*--------------------- EXTI Mode Configuration ------------------------*/ + /* Configure the External Interrupt or event for the current IO */ + if((GPIO_Init->Mode & EXTI_MODE) != 0x00u) + 8002b0e: 683b ldr r3, [r7, #0] + 8002b10: 685b ldr r3, [r3, #4] + 8002b12: f403 3340 and.w r3, r3, #196608 ; 0x30000 + 8002b16: 2b00 cmp r3, #0 + 8002b18: f000 80bb beq.w 8002c92 + { + /* Enable SYSCFG Clock */ + __HAL_RCC_SYSCFG_CLK_ENABLE(); + 8002b1c: 2300 movs r3, #0 + 8002b1e: 60bb str r3, [r7, #8] + 8002b20: 4b64 ldr r3, [pc, #400] ; (8002cb4 ) + 8002b22: 6c5b ldr r3, [r3, #68] ; 0x44 + 8002b24: 4a63 ldr r2, [pc, #396] ; (8002cb4 ) + 8002b26: f443 4380 orr.w r3, r3, #16384 ; 0x4000 + 8002b2a: 6453 str r3, [r2, #68] ; 0x44 + 8002b2c: 4b61 ldr r3, [pc, #388] ; (8002cb4 ) + 8002b2e: 6c5b ldr r3, [r3, #68] ; 0x44 + 8002b30: f403 4380 and.w r3, r3, #16384 ; 0x4000 + 8002b34: 60bb str r3, [r7, #8] + 8002b36: 68bb ldr r3, [r7, #8] + + temp = SYSCFG->EXTICR[position >> 2u]; + 8002b38: 4a5f ldr r2, [pc, #380] ; (8002cb8 ) + 8002b3a: 697b ldr r3, [r7, #20] + 8002b3c: 089b lsrs r3, r3, #2 + 8002b3e: 3302 adds r3, #2 + 8002b40: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 8002b44: 613b str r3, [r7, #16] + temp &= ~(0x0FuL << (4u * (position & 0x03u))); + 8002b46: 697b ldr r3, [r7, #20] + 8002b48: f003 0303 and.w r3, r3, #3 + 8002b4c: 009b lsls r3, r3, #2 + 8002b4e: 220f movs r2, #15 + 8002b50: fa02 f303 lsl.w r3, r2, r3 + 8002b54: 43db mvns r3, r3 + 8002b56: 693a ldr r2, [r7, #16] + 8002b58: 4013 ands r3, r2 + 8002b5a: 613b str r3, [r7, #16] + temp |= (GPIO_GET_INDEX(GPIOx) << (4u * (position & 0x03u))); + 8002b5c: 687b ldr r3, [r7, #4] + 8002b5e: 4a57 ldr r2, [pc, #348] ; (8002cbc ) + 8002b60: 4293 cmp r3, r2 + 8002b62: d031 beq.n 8002bc8 + 8002b64: 687b ldr r3, [r7, #4] + 8002b66: 4a56 ldr r2, [pc, #344] ; (8002cc0 ) + 8002b68: 4293 cmp r3, r2 + 8002b6a: d02b beq.n 8002bc4 + 8002b6c: 687b ldr r3, [r7, #4] + 8002b6e: 4a55 ldr r2, [pc, #340] ; (8002cc4 ) + 8002b70: 4293 cmp r3, r2 + 8002b72: d025 beq.n 8002bc0 + 8002b74: 687b ldr r3, [r7, #4] + 8002b76: 4a54 ldr r2, [pc, #336] ; (8002cc8 ) + 8002b78: 4293 cmp r3, r2 + 8002b7a: d01f beq.n 8002bbc + 8002b7c: 687b ldr r3, [r7, #4] + 8002b7e: 4a53 ldr r2, [pc, #332] ; (8002ccc ) + 8002b80: 4293 cmp r3, r2 + 8002b82: d019 beq.n 8002bb8 + 8002b84: 687b ldr r3, [r7, #4] + 8002b86: 4a52 ldr r2, [pc, #328] ; (8002cd0 ) + 8002b88: 4293 cmp r3, r2 + 8002b8a: d013 beq.n 8002bb4 + 8002b8c: 687b ldr r3, [r7, #4] + 8002b8e: 4a51 ldr r2, [pc, #324] ; (8002cd4 ) + 8002b90: 4293 cmp r3, r2 + 8002b92: d00d beq.n 8002bb0 + 8002b94: 687b ldr r3, [r7, #4] + 8002b96: 4a50 ldr r2, [pc, #320] ; (8002cd8 ) + 8002b98: 4293 cmp r3, r2 + 8002b9a: d007 beq.n 8002bac + 8002b9c: 687b ldr r3, [r7, #4] + 8002b9e: 4a4f ldr r2, [pc, #316] ; (8002cdc ) + 8002ba0: 4293 cmp r3, r2 + 8002ba2: d101 bne.n 8002ba8 + 8002ba4: 2308 movs r3, #8 + 8002ba6: e010 b.n 8002bca + 8002ba8: 2309 movs r3, #9 + 8002baa: e00e b.n 8002bca + 8002bac: 2307 movs r3, #7 + 8002bae: e00c b.n 8002bca + 8002bb0: 2306 movs r3, #6 + 8002bb2: e00a b.n 8002bca + 8002bb4: 2305 movs r3, #5 + 8002bb6: e008 b.n 8002bca + 8002bb8: 2304 movs r3, #4 + 8002bba: e006 b.n 8002bca + 8002bbc: 2303 movs r3, #3 + 8002bbe: e004 b.n 8002bca + 8002bc0: 2302 movs r3, #2 + 8002bc2: e002 b.n 8002bca + 8002bc4: 2301 movs r3, #1 + 8002bc6: e000 b.n 8002bca + 8002bc8: 2300 movs r3, #0 + 8002bca: 697a ldr r2, [r7, #20] + 8002bcc: f002 0203 and.w r2, r2, #3 + 8002bd0: 0092 lsls r2, r2, #2 + 8002bd2: 4093 lsls r3, r2 + 8002bd4: 461a mov r2, r3 + 8002bd6: 693b ldr r3, [r7, #16] + 8002bd8: 4313 orrs r3, r2 + 8002bda: 613b str r3, [r7, #16] + SYSCFG->EXTICR[position >> 2u] = temp; + 8002bdc: 4936 ldr r1, [pc, #216] ; (8002cb8 ) + 8002bde: 697b ldr r3, [r7, #20] + 8002be0: 089b lsrs r3, r3, #2 + 8002be2: 3302 adds r3, #2 + 8002be4: 693a ldr r2, [r7, #16] + 8002be6: f841 2023 str.w r2, [r1, r3, lsl #2] + + /* Clear Rising Falling edge configuration */ + temp = EXTI->RTSR; + 8002bea: 4b3d ldr r3, [pc, #244] ; (8002ce0 ) + 8002bec: 689b ldr r3, [r3, #8] + 8002bee: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8002bf0: 68fb ldr r3, [r7, #12] + 8002bf2: 43db mvns r3, r3 + 8002bf4: 693a ldr r2, [r7, #16] + 8002bf6: 4013 ands r3, r2 + 8002bf8: 613b str r3, [r7, #16] + if((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u) + 8002bfa: 683b ldr r3, [r7, #0] + 8002bfc: 685b ldr r3, [r3, #4] + 8002bfe: f403 1380 and.w r3, r3, #1048576 ; 0x100000 + 8002c02: 2b00 cmp r3, #0 + 8002c04: d003 beq.n 8002c0e + { + temp |= iocurrent; + 8002c06: 693a ldr r2, [r7, #16] + 8002c08: 68fb ldr r3, [r7, #12] + 8002c0a: 4313 orrs r3, r2 + 8002c0c: 613b str r3, [r7, #16] + } + EXTI->RTSR = temp; + 8002c0e: 4a34 ldr r2, [pc, #208] ; (8002ce0 ) + 8002c10: 693b ldr r3, [r7, #16] + 8002c12: 6093 str r3, [r2, #8] + + temp = EXTI->FTSR; + 8002c14: 4b32 ldr r3, [pc, #200] ; (8002ce0 ) + 8002c16: 68db ldr r3, [r3, #12] + 8002c18: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8002c1a: 68fb ldr r3, [r7, #12] + 8002c1c: 43db mvns r3, r3 + 8002c1e: 693a ldr r2, [r7, #16] + 8002c20: 4013 ands r3, r2 + 8002c22: 613b str r3, [r7, #16] + if((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u) + 8002c24: 683b ldr r3, [r7, #0] + 8002c26: 685b ldr r3, [r3, #4] + 8002c28: f403 1300 and.w r3, r3, #2097152 ; 0x200000 + 8002c2c: 2b00 cmp r3, #0 + 8002c2e: d003 beq.n 8002c38 + { + temp |= iocurrent; + 8002c30: 693a ldr r2, [r7, #16] + 8002c32: 68fb ldr r3, [r7, #12] + 8002c34: 4313 orrs r3, r2 + 8002c36: 613b str r3, [r7, #16] + } + EXTI->FTSR = temp; + 8002c38: 4a29 ldr r2, [pc, #164] ; (8002ce0 ) + 8002c3a: 693b ldr r3, [r7, #16] + 8002c3c: 60d3 str r3, [r2, #12] + + temp = EXTI->EMR; + 8002c3e: 4b28 ldr r3, [pc, #160] ; (8002ce0 ) + 8002c40: 685b ldr r3, [r3, #4] + 8002c42: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8002c44: 68fb ldr r3, [r7, #12] + 8002c46: 43db mvns r3, r3 + 8002c48: 693a ldr r2, [r7, #16] + 8002c4a: 4013 ands r3, r2 + 8002c4c: 613b str r3, [r7, #16] + if((GPIO_Init->Mode & EXTI_EVT) != 0x00u) + 8002c4e: 683b ldr r3, [r7, #0] + 8002c50: 685b ldr r3, [r3, #4] + 8002c52: f403 3300 and.w r3, r3, #131072 ; 0x20000 + 8002c56: 2b00 cmp r3, #0 + 8002c58: d003 beq.n 8002c62 + { + temp |= iocurrent; + 8002c5a: 693a ldr r2, [r7, #16] + 8002c5c: 68fb ldr r3, [r7, #12] + 8002c5e: 4313 orrs r3, r2 + 8002c60: 613b str r3, [r7, #16] + } + EXTI->EMR = temp; + 8002c62: 4a1f ldr r2, [pc, #124] ; (8002ce0 ) + 8002c64: 693b ldr r3, [r7, #16] + 8002c66: 6053 str r3, [r2, #4] + + /* Clear EXTI line configuration */ + temp = EXTI->IMR; + 8002c68: 4b1d ldr r3, [pc, #116] ; (8002ce0 ) + 8002c6a: 681b ldr r3, [r3, #0] + 8002c6c: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8002c6e: 68fb ldr r3, [r7, #12] + 8002c70: 43db mvns r3, r3 + 8002c72: 693a ldr r2, [r7, #16] + 8002c74: 4013 ands r3, r2 + 8002c76: 613b str r3, [r7, #16] + if((GPIO_Init->Mode & EXTI_IT) != 0x00u) + 8002c78: 683b ldr r3, [r7, #0] + 8002c7a: 685b ldr r3, [r3, #4] + 8002c7c: f403 3380 and.w r3, r3, #65536 ; 0x10000 + 8002c80: 2b00 cmp r3, #0 + 8002c82: d003 beq.n 8002c8c + { + temp |= iocurrent; + 8002c84: 693a ldr r2, [r7, #16] + 8002c86: 68fb ldr r3, [r7, #12] + 8002c88: 4313 orrs r3, r2 + 8002c8a: 613b str r3, [r7, #16] + } + EXTI->IMR = temp; + 8002c8c: 4a14 ldr r2, [pc, #80] ; (8002ce0 ) + 8002c8e: 693b ldr r3, [r7, #16] + 8002c90: 6013 str r3, [r2, #0] + } + } + + position++; + 8002c92: 697b ldr r3, [r7, #20] + 8002c94: 3301 adds r3, #1 + 8002c96: 617b str r3, [r7, #20] + while (((GPIO_Init->Pin) >> position) != 0x00u) + 8002c98: 683b ldr r3, [r7, #0] + 8002c9a: 681a ldr r2, [r3, #0] + 8002c9c: 697b ldr r3, [r7, #20] + 8002c9e: fa22 f303 lsr.w r3, r2, r3 + 8002ca2: 2b00 cmp r3, #0 + 8002ca4: f47f ae88 bne.w 80029b8 + } +} + 8002ca8: bf00 nop + 8002caa: bf00 nop + 8002cac: 371c adds r7, #28 + 8002cae: 46bd mov sp, r7 + 8002cb0: bc80 pop {r7} + 8002cb2: 4770 bx lr + 8002cb4: 40023800 .word 0x40023800 + 8002cb8: 40013800 .word 0x40013800 + 8002cbc: 40020000 .word 0x40020000 + 8002cc0: 40020400 .word 0x40020400 + 8002cc4: 40020800 .word 0x40020800 + 8002cc8: 40020c00 .word 0x40020c00 + 8002ccc: 40021000 .word 0x40021000 + 8002cd0: 40021400 .word 0x40021400 + 8002cd4: 40021800 .word 0x40021800 + 8002cd8: 40021c00 .word 0x40021c00 + 8002cdc: 40022000 .word 0x40022000 + 8002ce0: 40013c00 .word 0x40013c00 + +08002ce4 : + * @param GPIO_Pin specifies the port bit to read. + * This parameter can be GPIO_PIN_x where x can be (0..15). + * @retval The input port pin value. + */ +GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) +{ + 8002ce4: b480 push {r7} + 8002ce6: b085 sub sp, #20 + 8002ce8: af00 add r7, sp, #0 + 8002cea: 6078 str r0, [r7, #4] + 8002cec: 460b mov r3, r1 + 8002cee: 807b strh r3, [r7, #2] + GPIO_PinState bitstatus; + + /* Check the parameters */ + assert_param(IS_GPIO_PIN(GPIO_Pin)); + + if((GPIOx->IDR & GPIO_Pin) != (uint32_t)GPIO_PIN_RESET) + 8002cf0: 687b ldr r3, [r7, #4] + 8002cf2: 691a ldr r2, [r3, #16] + 8002cf4: 887b ldrh r3, [r7, #2] + 8002cf6: 4013 ands r3, r2 + 8002cf8: 2b00 cmp r3, #0 + 8002cfa: d002 beq.n 8002d02 + { + bitstatus = GPIO_PIN_SET; + 8002cfc: 2301 movs r3, #1 + 8002cfe: 73fb strb r3, [r7, #15] + 8002d00: e001 b.n 8002d06 + } + else + { + bitstatus = GPIO_PIN_RESET; + 8002d02: 2300 movs r3, #0 + 8002d04: 73fb strb r3, [r7, #15] + } + return bitstatus; + 8002d06: 7bfb ldrb r3, [r7, #15] +} + 8002d08: 4618 mov r0, r3 + 8002d0a: 3714 adds r7, #20 + 8002d0c: 46bd mov sp, r7 + 8002d0e: bc80 pop {r7} + 8002d10: 4770 bx lr + +08002d12 : + * @arg GPIO_PIN_RESET: to clear the port pin + * @arg GPIO_PIN_SET: to set the port pin + * @retval None + */ +void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) +{ + 8002d12: b480 push {r7} + 8002d14: b083 sub sp, #12 + 8002d16: af00 add r7, sp, #0 + 8002d18: 6078 str r0, [r7, #4] + 8002d1a: 460b mov r3, r1 + 8002d1c: 807b strh r3, [r7, #2] + 8002d1e: 4613 mov r3, r2 + 8002d20: 707b strb r3, [r7, #1] + /* Check the parameters */ + assert_param(IS_GPIO_PIN(GPIO_Pin)); + assert_param(IS_GPIO_PIN_ACTION(PinState)); + + if(PinState != GPIO_PIN_RESET) + 8002d22: 787b ldrb r3, [r7, #1] + 8002d24: 2b00 cmp r3, #0 + 8002d26: d003 beq.n 8002d30 + { + GPIOx->BSRR = GPIO_Pin; + 8002d28: 887a ldrh r2, [r7, #2] + 8002d2a: 687b ldr r3, [r7, #4] + 8002d2c: 619a str r2, [r3, #24] + } + else + { + GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U; + } +} + 8002d2e: e003 b.n 8002d38 + GPIOx->BSRR = (uint32_t)GPIO_Pin << 16U; + 8002d30: 887b ldrh r3, [r7, #2] + 8002d32: 041a lsls r2, r3, #16 + 8002d34: 687b ldr r3, [r7, #4] + 8002d36: 619a str r2, [r3, #24] +} + 8002d38: bf00 nop + 8002d3a: 370c adds r7, #12 + 8002d3c: 46bd mov sp, r7 + 8002d3e: bc80 pop {r7} + 8002d40: 4770 bx lr + +08002d42 : + * parameters in the PCD_InitTypeDef and initialize the associated handle. + * @param hpcd PCD handle + * @retval HAL status + */ +HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd) +{ + 8002d42: b5f0 push {r4, r5, r6, r7, lr} + 8002d44: b08f sub sp, #60 ; 0x3c + 8002d46: af0a add r7, sp, #40 ; 0x28 + 8002d48: 6078 str r0, [r7, #4] + USB_OTG_GlobalTypeDef *USBx; + uint8_t i; + + /* Check the PCD handle allocation */ + if (hpcd == NULL) + 8002d4a: 687b ldr r3, [r7, #4] + 8002d4c: 2b00 cmp r3, #0 + 8002d4e: d101 bne.n 8002d54 + { + return HAL_ERROR; + 8002d50: 2301 movs r3, #1 + 8002d52: e10f b.n 8002f74 + } + + /* Check the parameters */ + assert_param(IS_PCD_ALL_INSTANCE(hpcd->Instance)); + + USBx = hpcd->Instance; + 8002d54: 687b ldr r3, [r7, #4] + 8002d56: 681b ldr r3, [r3, #0] + 8002d58: 60bb str r3, [r7, #8] + + if (hpcd->State == HAL_PCD_STATE_RESET) + 8002d5a: 687b ldr r3, [r7, #4] + 8002d5c: f893 34bd ldrb.w r3, [r3, #1213] ; 0x4bd + 8002d60: b2db uxtb r3, r3 + 8002d62: 2b00 cmp r3, #0 + 8002d64: d106 bne.n 8002d74 + { + /* Allocate lock resource and initialize it */ + hpcd->Lock = HAL_UNLOCKED; + 8002d66: 687b ldr r3, [r7, #4] + 8002d68: 2200 movs r2, #0 + 8002d6a: f883 24bc strb.w r2, [r3, #1212] ; 0x4bc + + /* Init the low level hardware */ + hpcd->MspInitCallback(hpcd); +#else + /* Init the low level hardware : GPIO, CLOCK, NVIC... */ + HAL_PCD_MspInit(hpcd); + 8002d6e: 6878 ldr r0, [r7, #4] + 8002d70: f7fe f9fe bl 8001170 +#endif /* (USE_HAL_PCD_REGISTER_CALLBACKS) */ + } + + hpcd->State = HAL_PCD_STATE_BUSY; + 8002d74: 687b ldr r3, [r7, #4] + 8002d76: 2203 movs r2, #3 + 8002d78: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd + + /* Disable DMA mode for FS instance */ + if ((USBx->CID & (0x1U << 8)) == 0U) + 8002d7c: 68bb ldr r3, [r7, #8] + 8002d7e: 6bdb ldr r3, [r3, #60] ; 0x3c + 8002d80: f403 7380 and.w r3, r3, #256 ; 0x100 + 8002d84: 2b00 cmp r3, #0 + 8002d86: d102 bne.n 8002d8e + { + hpcd->Init.dma_enable = 0U; + 8002d88: 687b ldr r3, [r7, #4] + 8002d8a: 2200 movs r2, #0 + 8002d8c: 60da str r2, [r3, #12] + } + + /* Disable the Interrupts */ + __HAL_PCD_DISABLE(hpcd); + 8002d8e: 687b ldr r3, [r7, #4] + 8002d90: 681b ldr r3, [r3, #0] + 8002d92: 4618 mov r0, r3 + 8002d94: f001 ff7b bl 8004c8e + + /*Init the Core (common init.) */ + if (USB_CoreInit(hpcd->Instance, hpcd->Init) != HAL_OK) + 8002d98: 687b ldr r3, [r7, #4] + 8002d9a: 681b ldr r3, [r3, #0] + 8002d9c: 603b str r3, [r7, #0] + 8002d9e: 687e ldr r6, [r7, #4] + 8002da0: 466d mov r5, sp + 8002da2: f106 0410 add.w r4, r6, #16 + 8002da6: cc0f ldmia r4!, {r0, r1, r2, r3} + 8002da8: c50f stmia r5!, {r0, r1, r2, r3} + 8002daa: cc0f ldmia r4!, {r0, r1, r2, r3} + 8002dac: c50f stmia r5!, {r0, r1, r2, r3} + 8002dae: e894 0003 ldmia.w r4, {r0, r1} + 8002db2: e885 0003 stmia.w r5, {r0, r1} + 8002db6: 1d33 adds r3, r6, #4 + 8002db8: cb0e ldmia r3, {r1, r2, r3} + 8002dba: 6838 ldr r0, [r7, #0] + 8002dbc: f001 ff10 bl 8004be0 + 8002dc0: 4603 mov r3, r0 + 8002dc2: 2b00 cmp r3, #0 + 8002dc4: d005 beq.n 8002dd2 + { + hpcd->State = HAL_PCD_STATE_ERROR; + 8002dc6: 687b ldr r3, [r7, #4] + 8002dc8: 2202 movs r2, #2 + 8002dca: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd + return HAL_ERROR; + 8002dce: 2301 movs r3, #1 + 8002dd0: e0d0 b.n 8002f74 + } + + /* Force Device Mode*/ + (void)USB_SetCurrentMode(hpcd->Instance, USB_DEVICE_MODE); + 8002dd2: 687b ldr r3, [r7, #4] + 8002dd4: 681b ldr r3, [r3, #0] + 8002dd6: 2100 movs r1, #0 + 8002dd8: 4618 mov r0, r3 + 8002dda: f001 ff68 bl 8004cae + + /* Init endpoints structures */ + for (i = 0U; i < hpcd->Init.dev_endpoints; i++) + 8002dde: 2300 movs r3, #0 + 8002de0: 73fb strb r3, [r7, #15] + 8002de2: e04a b.n 8002e7a + { + /* Init ep structure */ + hpcd->IN_ep[i].is_in = 1U; + 8002de4: 7bfa ldrb r2, [r7, #15] + 8002de6: 6879 ldr r1, [r7, #4] + 8002de8: 4613 mov r3, r2 + 8002dea: 00db lsls r3, r3, #3 + 8002dec: 4413 add r3, r2 + 8002dee: 009b lsls r3, r3, #2 + 8002df0: 440b add r3, r1 + 8002df2: 333d adds r3, #61 ; 0x3d + 8002df4: 2201 movs r2, #1 + 8002df6: 701a strb r2, [r3, #0] + hpcd->IN_ep[i].num = i; + 8002df8: 7bfa ldrb r2, [r7, #15] + 8002dfa: 6879 ldr r1, [r7, #4] + 8002dfc: 4613 mov r3, r2 + 8002dfe: 00db lsls r3, r3, #3 + 8002e00: 4413 add r3, r2 + 8002e02: 009b lsls r3, r3, #2 + 8002e04: 440b add r3, r1 + 8002e06: 333c adds r3, #60 ; 0x3c + 8002e08: 7bfa ldrb r2, [r7, #15] + 8002e0a: 701a strb r2, [r3, #0] + hpcd->IN_ep[i].tx_fifo_num = i; + 8002e0c: 7bfa ldrb r2, [r7, #15] + 8002e0e: 7bfb ldrb r3, [r7, #15] + 8002e10: b298 uxth r0, r3 + 8002e12: 6879 ldr r1, [r7, #4] + 8002e14: 4613 mov r3, r2 + 8002e16: 00db lsls r3, r3, #3 + 8002e18: 4413 add r3, r2 + 8002e1a: 009b lsls r3, r3, #2 + 8002e1c: 440b add r3, r1 + 8002e1e: 3356 adds r3, #86 ; 0x56 + 8002e20: 4602 mov r2, r0 + 8002e22: 801a strh r2, [r3, #0] + /* Control until ep is activated */ + hpcd->IN_ep[i].type = EP_TYPE_CTRL; + 8002e24: 7bfa ldrb r2, [r7, #15] + 8002e26: 6879 ldr r1, [r7, #4] + 8002e28: 4613 mov r3, r2 + 8002e2a: 00db lsls r3, r3, #3 + 8002e2c: 4413 add r3, r2 + 8002e2e: 009b lsls r3, r3, #2 + 8002e30: 440b add r3, r1 + 8002e32: 3340 adds r3, #64 ; 0x40 + 8002e34: 2200 movs r2, #0 + 8002e36: 701a strb r2, [r3, #0] + hpcd->IN_ep[i].maxpacket = 0U; + 8002e38: 7bfa ldrb r2, [r7, #15] + 8002e3a: 6879 ldr r1, [r7, #4] + 8002e3c: 4613 mov r3, r2 + 8002e3e: 00db lsls r3, r3, #3 + 8002e40: 4413 add r3, r2 + 8002e42: 009b lsls r3, r3, #2 + 8002e44: 440b add r3, r1 + 8002e46: 3344 adds r3, #68 ; 0x44 + 8002e48: 2200 movs r2, #0 + 8002e4a: 601a str r2, [r3, #0] + hpcd->IN_ep[i].xfer_buff = 0U; + 8002e4c: 7bfa ldrb r2, [r7, #15] + 8002e4e: 6879 ldr r1, [r7, #4] + 8002e50: 4613 mov r3, r2 + 8002e52: 00db lsls r3, r3, #3 + 8002e54: 4413 add r3, r2 + 8002e56: 009b lsls r3, r3, #2 + 8002e58: 440b add r3, r1 + 8002e5a: 3348 adds r3, #72 ; 0x48 + 8002e5c: 2200 movs r2, #0 + 8002e5e: 601a str r2, [r3, #0] + hpcd->IN_ep[i].xfer_len = 0U; + 8002e60: 7bfa ldrb r2, [r7, #15] + 8002e62: 6879 ldr r1, [r7, #4] + 8002e64: 4613 mov r3, r2 + 8002e66: 00db lsls r3, r3, #3 + 8002e68: 4413 add r3, r2 + 8002e6a: 009b lsls r3, r3, #2 + 8002e6c: 440b add r3, r1 + 8002e6e: 334c adds r3, #76 ; 0x4c + 8002e70: 2200 movs r2, #0 + 8002e72: 601a str r2, [r3, #0] + for (i = 0U; i < hpcd->Init.dev_endpoints; i++) + 8002e74: 7bfb ldrb r3, [r7, #15] + 8002e76: 3301 adds r3, #1 + 8002e78: 73fb strb r3, [r7, #15] + 8002e7a: 7bfa ldrb r2, [r7, #15] + 8002e7c: 687b ldr r3, [r7, #4] + 8002e7e: 685b ldr r3, [r3, #4] + 8002e80: 429a cmp r2, r3 + 8002e82: d3af bcc.n 8002de4 + } + + for (i = 0U; i < hpcd->Init.dev_endpoints; i++) + 8002e84: 2300 movs r3, #0 + 8002e86: 73fb strb r3, [r7, #15] + 8002e88: e044 b.n 8002f14 + { + hpcd->OUT_ep[i].is_in = 0U; + 8002e8a: 7bfa ldrb r2, [r7, #15] + 8002e8c: 6879 ldr r1, [r7, #4] + 8002e8e: 4613 mov r3, r2 + 8002e90: 00db lsls r3, r3, #3 + 8002e92: 4413 add r3, r2 + 8002e94: 009b lsls r3, r3, #2 + 8002e96: 440b add r3, r1 + 8002e98: f203 237d addw r3, r3, #637 ; 0x27d + 8002e9c: 2200 movs r2, #0 + 8002e9e: 701a strb r2, [r3, #0] + hpcd->OUT_ep[i].num = i; + 8002ea0: 7bfa ldrb r2, [r7, #15] + 8002ea2: 6879 ldr r1, [r7, #4] + 8002ea4: 4613 mov r3, r2 + 8002ea6: 00db lsls r3, r3, #3 + 8002ea8: 4413 add r3, r2 + 8002eaa: 009b lsls r3, r3, #2 + 8002eac: 440b add r3, r1 + 8002eae: f503 731f add.w r3, r3, #636 ; 0x27c + 8002eb2: 7bfa ldrb r2, [r7, #15] + 8002eb4: 701a strb r2, [r3, #0] + /* Control until ep is activated */ + hpcd->OUT_ep[i].type = EP_TYPE_CTRL; + 8002eb6: 7bfa ldrb r2, [r7, #15] + 8002eb8: 6879 ldr r1, [r7, #4] + 8002eba: 4613 mov r3, r2 + 8002ebc: 00db lsls r3, r3, #3 + 8002ebe: 4413 add r3, r2 + 8002ec0: 009b lsls r3, r3, #2 + 8002ec2: 440b add r3, r1 + 8002ec4: f503 7320 add.w r3, r3, #640 ; 0x280 + 8002ec8: 2200 movs r2, #0 + 8002eca: 701a strb r2, [r3, #0] + hpcd->OUT_ep[i].maxpacket = 0U; + 8002ecc: 7bfa ldrb r2, [r7, #15] + 8002ece: 6879 ldr r1, [r7, #4] + 8002ed0: 4613 mov r3, r2 + 8002ed2: 00db lsls r3, r3, #3 + 8002ed4: 4413 add r3, r2 + 8002ed6: 009b lsls r3, r3, #2 + 8002ed8: 440b add r3, r1 + 8002eda: f503 7321 add.w r3, r3, #644 ; 0x284 + 8002ede: 2200 movs r2, #0 + 8002ee0: 601a str r2, [r3, #0] + hpcd->OUT_ep[i].xfer_buff = 0U; + 8002ee2: 7bfa ldrb r2, [r7, #15] + 8002ee4: 6879 ldr r1, [r7, #4] + 8002ee6: 4613 mov r3, r2 + 8002ee8: 00db lsls r3, r3, #3 + 8002eea: 4413 add r3, r2 + 8002eec: 009b lsls r3, r3, #2 + 8002eee: 440b add r3, r1 + 8002ef0: f503 7322 add.w r3, r3, #648 ; 0x288 + 8002ef4: 2200 movs r2, #0 + 8002ef6: 601a str r2, [r3, #0] + hpcd->OUT_ep[i].xfer_len = 0U; + 8002ef8: 7bfa ldrb r2, [r7, #15] + 8002efa: 6879 ldr r1, [r7, #4] + 8002efc: 4613 mov r3, r2 + 8002efe: 00db lsls r3, r3, #3 + 8002f00: 4413 add r3, r2 + 8002f02: 009b lsls r3, r3, #2 + 8002f04: 440b add r3, r1 + 8002f06: f503 7323 add.w r3, r3, #652 ; 0x28c + 8002f0a: 2200 movs r2, #0 + 8002f0c: 601a str r2, [r3, #0] + for (i = 0U; i < hpcd->Init.dev_endpoints; i++) + 8002f0e: 7bfb ldrb r3, [r7, #15] + 8002f10: 3301 adds r3, #1 + 8002f12: 73fb strb r3, [r7, #15] + 8002f14: 7bfa ldrb r2, [r7, #15] + 8002f16: 687b ldr r3, [r7, #4] + 8002f18: 685b ldr r3, [r3, #4] + 8002f1a: 429a cmp r2, r3 + 8002f1c: d3b5 bcc.n 8002e8a + } + + /* Init Device */ + if (USB_DevInit(hpcd->Instance, hpcd->Init) != HAL_OK) + 8002f1e: 687b ldr r3, [r7, #4] + 8002f20: 681b ldr r3, [r3, #0] + 8002f22: 603b str r3, [r7, #0] + 8002f24: 687e ldr r6, [r7, #4] + 8002f26: 466d mov r5, sp + 8002f28: f106 0410 add.w r4, r6, #16 + 8002f2c: cc0f ldmia r4!, {r0, r1, r2, r3} + 8002f2e: c50f stmia r5!, {r0, r1, r2, r3} + 8002f30: cc0f ldmia r4!, {r0, r1, r2, r3} + 8002f32: c50f stmia r5!, {r0, r1, r2, r3} + 8002f34: e894 0003 ldmia.w r4, {r0, r1} + 8002f38: e885 0003 stmia.w r5, {r0, r1} + 8002f3c: 1d33 adds r3, r6, #4 + 8002f3e: cb0e ldmia r3, {r1, r2, r3} + 8002f40: 6838 ldr r0, [r7, #0] + 8002f42: f001 ff01 bl 8004d48 + 8002f46: 4603 mov r3, r0 + 8002f48: 2b00 cmp r3, #0 + 8002f4a: d005 beq.n 8002f58 + { + hpcd->State = HAL_PCD_STATE_ERROR; + 8002f4c: 687b ldr r3, [r7, #4] + 8002f4e: 2202 movs r2, #2 + 8002f50: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd + return HAL_ERROR; + 8002f54: 2301 movs r3, #1 + 8002f56: e00d b.n 8002f74 + } + + hpcd->USB_Address = 0U; + 8002f58: 687b ldr r3, [r7, #4] + 8002f5a: 2200 movs r2, #0 + 8002f5c: f883 2038 strb.w r2, [r3, #56] ; 0x38 + hpcd->State = HAL_PCD_STATE_READY; + 8002f60: 687b ldr r3, [r7, #4] + 8002f62: 2201 movs r2, #1 + 8002f64: f883 24bd strb.w r2, [r3, #1213] ; 0x4bd + (void)USB_DevDisconnect(hpcd->Instance); + 8002f68: 687b ldr r3, [r7, #4] + 8002f6a: 681b ldr r3, [r3, #0] + 8002f6c: 4618 mov r0, r3 + 8002f6e: f002 f8c1 bl 80050f4 + + return HAL_OK; + 8002f72: 2300 movs r3, #0 +} + 8002f74: 4618 mov r0, r3 + 8002f76: 3714 adds r7, #20 + 8002f78: 46bd mov sp, r7 + 8002f7a: bdf0 pop {r4, r5, r6, r7, pc} + +08002f7c : + * supported by this API. User should request a transition to HSE Off + * first and then HSE On or HSE Bypass. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) +{ + 8002f7c: b580 push {r7, lr} + 8002f7e: b08a sub sp, #40 ; 0x28 + 8002f80: af00 add r7, sp, #0 + 8002f82: 6078 str r0, [r7, #4] + uint32_t tickstart; + + /* Check Null pointer */ + if(RCC_OscInitStruct == NULL) + 8002f84: 687b ldr r3, [r7, #4] + 8002f86: 2b00 cmp r3, #0 + 8002f88: d101 bne.n 8002f8e + { + return HAL_ERROR; + 8002f8a: 2301 movs r3, #1 + 8002f8c: e23b b.n 8003406 + } + + /* Check the parameters */ + assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); + /*------------------------------- HSE Configuration ------------------------*/ + if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) + 8002f8e: 687b ldr r3, [r7, #4] + 8002f90: 681b ldr r3, [r3, #0] + 8002f92: f003 0301 and.w r3, r3, #1 + 8002f96: 2b00 cmp r3, #0 + 8002f98: d050 beq.n 800303c + { + /* Check the parameters */ + assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); + /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */ + if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\ + 8002f9a: 4b9e ldr r3, [pc, #632] ; (8003214 ) + 8002f9c: 689b ldr r3, [r3, #8] + 8002f9e: f003 030c and.w r3, r3, #12 + 8002fa2: 2b04 cmp r3, #4 + 8002fa4: d00c beq.n 8002fc0 + ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE))) + 8002fa6: 4b9b ldr r3, [pc, #620] ; (8003214 ) + 8002fa8: 689b ldr r3, [r3, #8] + 8002faa: f003 030c and.w r3, r3, #12 + if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSE) ||\ + 8002fae: 2b08 cmp r3, #8 + 8002fb0: d112 bne.n 8002fd8 + ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSE))) + 8002fb2: 4b98 ldr r3, [pc, #608] ; (8003214 ) + 8002fb4: 685b ldr r3, [r3, #4] + 8002fb6: f403 0380 and.w r3, r3, #4194304 ; 0x400000 + 8002fba: f5b3 0f80 cmp.w r3, #4194304 ; 0x400000 + 8002fbe: d10b bne.n 8002fd8 + { + if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) + 8002fc0: 4b94 ldr r3, [pc, #592] ; (8003214 ) + 8002fc2: 681b ldr r3, [r3, #0] + 8002fc4: f403 3300 and.w r3, r3, #131072 ; 0x20000 + 8002fc8: 2b00 cmp r3, #0 + 8002fca: d036 beq.n 800303a + 8002fcc: 687b ldr r3, [r7, #4] + 8002fce: 685b ldr r3, [r3, #4] + 8002fd0: 2b00 cmp r3, #0 + 8002fd2: d132 bne.n 800303a + { + return HAL_ERROR; + 8002fd4: 2301 movs r3, #1 + 8002fd6: e216 b.n 8003406 + } + } + else + { + /* Set the new HSE configuration ---------------------------------------*/ + __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); + 8002fd8: 687b ldr r3, [r7, #4] + 8002fda: 685a ldr r2, [r3, #4] + 8002fdc: 4b8e ldr r3, [pc, #568] ; (8003218 ) + 8002fde: b2d2 uxtb r2, r2 + 8002fe0: 701a strb r2, [r3, #0] + + /* Check the HSE State */ + if((RCC_OscInitStruct->HSEState) != RCC_HSE_OFF) + 8002fe2: 687b ldr r3, [r7, #4] + 8002fe4: 685b ldr r3, [r3, #4] + 8002fe6: 2b00 cmp r3, #0 + 8002fe8: d013 beq.n 8003012 + { + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8002fea: f7fe faa9 bl 8001540 + 8002fee: 6238 str r0, [r7, #32] + + /* Wait till HSE is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) + 8002ff0: e008 b.n 8003004 + { + if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) + 8002ff2: f7fe faa5 bl 8001540 + 8002ff6: 4602 mov r2, r0 + 8002ff8: 6a3b ldr r3, [r7, #32] + 8002ffa: 1ad3 subs r3, r2, r3 + 8002ffc: 2b64 cmp r3, #100 ; 0x64 + 8002ffe: d901 bls.n 8003004 + { + return HAL_TIMEOUT; + 8003000: 2303 movs r3, #3 + 8003002: e200 b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) + 8003004: 4b83 ldr r3, [pc, #524] ; (8003214 ) + 8003006: 681b ldr r3, [r3, #0] + 8003008: f403 3300 and.w r3, r3, #131072 ; 0x20000 + 800300c: 2b00 cmp r3, #0 + 800300e: d0f0 beq.n 8002ff2 + 8003010: e014 b.n 800303c + } + } + else + { + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003012: f7fe fa95 bl 8001540 + 8003016: 6238 str r0, [r7, #32] + + /* Wait till HSE is bypassed or disabled */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) + 8003018: e008 b.n 800302c + { + if((HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) + 800301a: f7fe fa91 bl 8001540 + 800301e: 4602 mov r2, r0 + 8003020: 6a3b ldr r3, [r7, #32] + 8003022: 1ad3 subs r3, r2, r3 + 8003024: 2b64 cmp r3, #100 ; 0x64 + 8003026: d901 bls.n 800302c + { + return HAL_TIMEOUT; + 8003028: 2303 movs r3, #3 + 800302a: e1ec b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) + 800302c: 4b79 ldr r3, [pc, #484] ; (8003214 ) + 800302e: 681b ldr r3, [r3, #0] + 8003030: f403 3300 and.w r3, r3, #131072 ; 0x20000 + 8003034: 2b00 cmp r3, #0 + 8003036: d1f0 bne.n 800301a + 8003038: e000 b.n 800303c + if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != RESET) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) + 800303a: bf00 nop + } + } + } + } + /*----------------------------- HSI Configuration --------------------------*/ + if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) + 800303c: 687b ldr r3, [r7, #4] + 800303e: 681b ldr r3, [r3, #0] + 8003040: f003 0302 and.w r3, r3, #2 + 8003044: 2b00 cmp r3, #0 + 8003046: d077 beq.n 8003138 + /* Check the parameters */ + assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); + assert_param(IS_RCC_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); + + /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */ + if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\ + 8003048: 4b72 ldr r3, [pc, #456] ; (8003214 ) + 800304a: 689b ldr r3, [r3, #8] + 800304c: f003 030c and.w r3, r3, #12 + 8003050: 2b00 cmp r3, #0 + 8003052: d00b beq.n 800306c + ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI))) + 8003054: 4b6f ldr r3, [pc, #444] ; (8003214 ) + 8003056: 689b ldr r3, [r3, #8] + 8003058: f003 030c and.w r3, r3, #12 + if((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_HSI) ||\ + 800305c: 2b08 cmp r3, #8 + 800305e: d126 bne.n 80030ae + ((__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL) && ((RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) == RCC_PLLCFGR_PLLSRC_HSI))) + 8003060: 4b6c ldr r3, [pc, #432] ; (8003214 ) + 8003062: 685b ldr r3, [r3, #4] + 8003064: f403 0380 and.w r3, r3, #4194304 ; 0x400000 + 8003068: 2b00 cmp r3, #0 + 800306a: d120 bne.n 80030ae + { + /* When HSI is used as system clock it will not disabled */ + if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) + 800306c: 4b69 ldr r3, [pc, #420] ; (8003214 ) + 800306e: 681b ldr r3, [r3, #0] + 8003070: f003 0302 and.w r3, r3, #2 + 8003074: 2b00 cmp r3, #0 + 8003076: d005 beq.n 8003084 + 8003078: 687b ldr r3, [r7, #4] + 800307a: 68db ldr r3, [r3, #12] + 800307c: 2b01 cmp r3, #1 + 800307e: d001 beq.n 8003084 + { + return HAL_ERROR; + 8003080: 2301 movs r3, #1 + 8003082: e1c0 b.n 8003406 + } + /* Otherwise, just the calibration is allowed */ + else + { + /* Adjusts the Internal High Speed oscillator (HSI) calibration value. */ + __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); + 8003084: 4b63 ldr r3, [pc, #396] ; (8003214 ) + 8003086: 681b ldr r3, [r3, #0] + 8003088: f023 02f8 bic.w r2, r3, #248 ; 0xf8 + 800308c: 687b ldr r3, [r7, #4] + 800308e: 691b ldr r3, [r3, #16] + 8003090: 21f8 movs r1, #248 ; 0xf8 + 8003092: 61b9 str r1, [r7, #24] + uint32_t result; + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); + 8003094: 69b9 ldr r1, [r7, #24] + 8003096: fa91 f1a1 rbit r1, r1 + 800309a: 6179 str r1, [r7, #20] + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ +#endif + return result; + 800309c: 6979 ldr r1, [r7, #20] + 800309e: fab1 f181 clz r1, r1 + 80030a2: b2c9 uxtb r1, r1 + 80030a4: 408b lsls r3, r1 + 80030a6: 495b ldr r1, [pc, #364] ; (8003214 ) + 80030a8: 4313 orrs r3, r2 + 80030aa: 600b str r3, [r1, #0] + if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) && (RCC_OscInitStruct->HSIState != RCC_HSI_ON)) + 80030ac: e044 b.n 8003138 + } + } + else + { + /* Check the HSI State */ + if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF) + 80030ae: 687b ldr r3, [r7, #4] + 80030b0: 68db ldr r3, [r3, #12] + 80030b2: 2b00 cmp r3, #0 + 80030b4: d02a beq.n 800310c + { + /* Enable the Internal High Speed oscillator (HSI). */ + __HAL_RCC_HSI_ENABLE(); + 80030b6: 4b59 ldr r3, [pc, #356] ; (800321c ) + 80030b8: 2201 movs r2, #1 + 80030ba: 601a str r2, [r3, #0] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 80030bc: f7fe fa40 bl 8001540 + 80030c0: 6238 str r0, [r7, #32] + + /* Wait till HSI is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) + 80030c2: e008 b.n 80030d6 + { + if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) + 80030c4: f7fe fa3c bl 8001540 + 80030c8: 4602 mov r2, r0 + 80030ca: 6a3b ldr r3, [r7, #32] + 80030cc: 1ad3 subs r3, r2, r3 + 80030ce: 2b02 cmp r3, #2 + 80030d0: d901 bls.n 80030d6 + { + return HAL_TIMEOUT; + 80030d2: 2303 movs r3, #3 + 80030d4: e197 b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) + 80030d6: 4b4f ldr r3, [pc, #316] ; (8003214 ) + 80030d8: 681b ldr r3, [r3, #0] + 80030da: f003 0302 and.w r3, r3, #2 + 80030de: 2b00 cmp r3, #0 + 80030e0: d0f0 beq.n 80030c4 + } + } + + /* Adjusts the Internal High Speed oscillator (HSI) calibration value. */ + __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); + 80030e2: 4b4c ldr r3, [pc, #304] ; (8003214 ) + 80030e4: 681b ldr r3, [r3, #0] + 80030e6: f023 02f8 bic.w r2, r3, #248 ; 0xf8 + 80030ea: 687b ldr r3, [r7, #4] + 80030ec: 691b ldr r3, [r3, #16] + 80030ee: 21f8 movs r1, #248 ; 0xf8 + 80030f0: 6139 str r1, [r7, #16] + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); + 80030f2: 6939 ldr r1, [r7, #16] + 80030f4: fa91 f1a1 rbit r1, r1 + 80030f8: 60f9 str r1, [r7, #12] + return result; + 80030fa: 68f9 ldr r1, [r7, #12] + 80030fc: fab1 f181 clz r1, r1 + 8003100: b2c9 uxtb r1, r1 + 8003102: 408b lsls r3, r1 + 8003104: 4943 ldr r1, [pc, #268] ; (8003214 ) + 8003106: 4313 orrs r3, r2 + 8003108: 600b str r3, [r1, #0] + 800310a: e015 b.n 8003138 + } + else + { + /* Disable the Internal High Speed oscillator (HSI). */ + __HAL_RCC_HSI_DISABLE(); + 800310c: 4b43 ldr r3, [pc, #268] ; (800321c ) + 800310e: 2200 movs r2, #0 + 8003110: 601a str r2, [r3, #0] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003112: f7fe fa15 bl 8001540 + 8003116: 6238 str r0, [r7, #32] + + /* Wait till HSI is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) + 8003118: e008 b.n 800312c + { + if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) + 800311a: f7fe fa11 bl 8001540 + 800311e: 4602 mov r2, r0 + 8003120: 6a3b ldr r3, [r7, #32] + 8003122: 1ad3 subs r3, r2, r3 + 8003124: 2b02 cmp r3, #2 + 8003126: d901 bls.n 800312c + { + return HAL_TIMEOUT; + 8003128: 2303 movs r3, #3 + 800312a: e16c b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET) + 800312c: 4b39 ldr r3, [pc, #228] ; (8003214 ) + 800312e: 681b ldr r3, [r3, #0] + 8003130: f003 0302 and.w r3, r3, #2 + 8003134: 2b00 cmp r3, #0 + 8003136: d1f0 bne.n 800311a + } + } + } + } + /*------------------------------ LSI Configuration -------------------------*/ + if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) + 8003138: 687b ldr r3, [r7, #4] + 800313a: 681b ldr r3, [r3, #0] + 800313c: f003 0308 and.w r3, r3, #8 + 8003140: 2b00 cmp r3, #0 + 8003142: d030 beq.n 80031a6 + { + /* Check the parameters */ + assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); + + /* Check the LSI State */ + if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF) + 8003144: 687b ldr r3, [r7, #4] + 8003146: 695b ldr r3, [r3, #20] + 8003148: 2b00 cmp r3, #0 + 800314a: d016 beq.n 800317a + { + /* Enable the Internal Low Speed oscillator (LSI). */ + __HAL_RCC_LSI_ENABLE(); + 800314c: 4b34 ldr r3, [pc, #208] ; (8003220 ) + 800314e: 2201 movs r2, #1 + 8003150: 601a str r2, [r3, #0] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003152: f7fe f9f5 bl 8001540 + 8003156: 6238 str r0, [r7, #32] + + /* Wait till LSI is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) + 8003158: e008 b.n 800316c + { + if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) + 800315a: f7fe f9f1 bl 8001540 + 800315e: 4602 mov r2, r0 + 8003160: 6a3b ldr r3, [r7, #32] + 8003162: 1ad3 subs r3, r2, r3 + 8003164: 2b02 cmp r3, #2 + 8003166: d901 bls.n 800316c + { + return HAL_TIMEOUT; + 8003168: 2303 movs r3, #3 + 800316a: e14c b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) + 800316c: 4b29 ldr r3, [pc, #164] ; (8003214 ) + 800316e: 6f5b ldr r3, [r3, #116] ; 0x74 + 8003170: f003 0302 and.w r3, r3, #2 + 8003174: 2b00 cmp r3, #0 + 8003176: d0f0 beq.n 800315a + 8003178: e015 b.n 80031a6 + } + } + else + { + /* Disable the Internal Low Speed oscillator (LSI). */ + __HAL_RCC_LSI_DISABLE(); + 800317a: 4b29 ldr r3, [pc, #164] ; (8003220 ) + 800317c: 2200 movs r2, #0 + 800317e: 601a str r2, [r3, #0] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003180: f7fe f9de bl 8001540 + 8003184: 6238 str r0, [r7, #32] + + /* Wait till LSI is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) + 8003186: e008 b.n 800319a + { + if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) + 8003188: f7fe f9da bl 8001540 + 800318c: 4602 mov r2, r0 + 800318e: 6a3b ldr r3, [r7, #32] + 8003190: 1ad3 subs r3, r2, r3 + 8003192: 2b02 cmp r3, #2 + 8003194: d901 bls.n 800319a + { + return HAL_TIMEOUT; + 8003196: 2303 movs r3, #3 + 8003198: e135 b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != RESET) + 800319a: 4b1e ldr r3, [pc, #120] ; (8003214 ) + 800319c: 6f5b ldr r3, [r3, #116] ; 0x74 + 800319e: f003 0302 and.w r3, r3, #2 + 80031a2: 2b00 cmp r3, #0 + 80031a4: d1f0 bne.n 8003188 + } + } + } + } + /*------------------------------ LSE Configuration -------------------------*/ + if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) + 80031a6: 687b ldr r3, [r7, #4] + 80031a8: 681b ldr r3, [r3, #0] + 80031aa: f003 0304 and.w r3, r3, #4 + 80031ae: 2b00 cmp r3, #0 + 80031b0: f000 8087 beq.w 80032c2 + { + FlagStatus pwrclkchanged = RESET; + 80031b4: 2300 movs r3, #0 + 80031b6: f887 3027 strb.w r3, [r7, #39] ; 0x27 + /* Check the parameters */ + assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); + + /* Update LSE configuration in Backup Domain control register */ + /* Requires to enable write access to Backup Domain of necessary */ + if(__HAL_RCC_PWR_IS_CLK_DISABLED()) + 80031ba: 4b16 ldr r3, [pc, #88] ; (8003214 ) + 80031bc: 6c1b ldr r3, [r3, #64] ; 0x40 + 80031be: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 + 80031c2: 2b00 cmp r3, #0 + 80031c4: d110 bne.n 80031e8 + { + __HAL_RCC_PWR_CLK_ENABLE(); + 80031c6: 2300 movs r3, #0 + 80031c8: 60bb str r3, [r7, #8] + 80031ca: 4b12 ldr r3, [pc, #72] ; (8003214 ) + 80031cc: 6c1b ldr r3, [r3, #64] ; 0x40 + 80031ce: 4a11 ldr r2, [pc, #68] ; (8003214 ) + 80031d0: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 + 80031d4: 6413 str r3, [r2, #64] ; 0x40 + 80031d6: 4b0f ldr r3, [pc, #60] ; (8003214 ) + 80031d8: 6c1b ldr r3, [r3, #64] ; 0x40 + 80031da: f003 5380 and.w r3, r3, #268435456 ; 0x10000000 + 80031de: 60bb str r3, [r7, #8] + 80031e0: 68bb ldr r3, [r7, #8] + pwrclkchanged = SET; + 80031e2: 2301 movs r3, #1 + 80031e4: f887 3027 strb.w r3, [r7, #39] ; 0x27 + } + + /* Enable write access to Backup domain */ + PWR->CR |= PWR_CR_DBP; + 80031e8: 4b0e ldr r3, [pc, #56] ; (8003224 ) + 80031ea: 681b ldr r3, [r3, #0] + 80031ec: 4a0d ldr r2, [pc, #52] ; (8003224 ) + 80031ee: f443 7380 orr.w r3, r3, #256 ; 0x100 + 80031f2: 6013 str r3, [r2, #0] + + if(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) + 80031f4: 4b0b ldr r3, [pc, #44] ; (8003224 ) + 80031f6: 681b ldr r3, [r3, #0] + 80031f8: f403 7380 and.w r3, r3, #256 ; 0x100 + 80031fc: 2b00 cmp r3, #0 + 80031fe: d122 bne.n 8003246 + { + /* Enable write access to Backup domain */ + SET_BIT(PWR->CR, PWR_CR_DBP); + 8003200: 4b08 ldr r3, [pc, #32] ; (8003224 ) + 8003202: 681b ldr r3, [r3, #0] + 8003204: 4a07 ldr r2, [pc, #28] ; (8003224 ) + 8003206: f443 7380 orr.w r3, r3, #256 ; 0x100 + 800320a: 6013 str r3, [r2, #0] + + /* Wait for Backup domain Write protection disable */ + tickstart = HAL_GetTick(); + 800320c: f7fe f998 bl 8001540 + 8003210: 6238 str r0, [r7, #32] + + while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) + 8003212: e012 b.n 800323a + 8003214: 40023800 .word 0x40023800 + 8003218: 40023802 .word 0x40023802 + 800321c: 42470000 .word 0x42470000 + 8003220: 42470e80 .word 0x42470e80 + 8003224: 40007000 .word 0x40007000 + { + if((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) + 8003228: f7fe f98a bl 8001540 + 800322c: 4602 mov r2, r0 + 800322e: 6a3b ldr r3, [r7, #32] + 8003230: 1ad3 subs r3, r2, r3 + 8003232: 2b02 cmp r3, #2 + 8003234: d901 bls.n 800323a + { + return HAL_TIMEOUT; + 8003236: 2303 movs r3, #3 + 8003238: e0e5 b.n 8003406 + while(HAL_IS_BIT_CLR(PWR->CR, PWR_CR_DBP)) + 800323a: 4b75 ldr r3, [pc, #468] ; (8003410 ) + 800323c: 681b ldr r3, [r3, #0] + 800323e: f403 7380 and.w r3, r3, #256 ; 0x100 + 8003242: 2b00 cmp r3, #0 + 8003244: d0f0 beq.n 8003228 + } + } + } + + /* Set the new LSE configuration -----------------------------------------*/ + __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); + 8003246: 687b ldr r3, [r7, #4] + 8003248: 689a ldr r2, [r3, #8] + 800324a: 4b72 ldr r3, [pc, #456] ; (8003414 ) + 800324c: b2d2 uxtb r2, r2 + 800324e: 701a strb r2, [r3, #0] + /* Check the LSE State */ + if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF) + 8003250: 687b ldr r3, [r7, #4] + 8003252: 689b ldr r3, [r3, #8] + 8003254: 2b00 cmp r3, #0 + 8003256: d015 beq.n 8003284 + { + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003258: f7fe f972 bl 8001540 + 800325c: 6238 str r0, [r7, #32] + + /* Wait till LSE is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) + 800325e: e00a b.n 8003276 + { + if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) + 8003260: f7fe f96e bl 8001540 + 8003264: 4602 mov r2, r0 + 8003266: 6a3b ldr r3, [r7, #32] + 8003268: 1ad3 subs r3, r2, r3 + 800326a: f241 3288 movw r2, #5000 ; 0x1388 + 800326e: 4293 cmp r3, r2 + 8003270: d901 bls.n 8003276 + { + return HAL_TIMEOUT; + 8003272: 2303 movs r3, #3 + 8003274: e0c7 b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) + 8003276: 4b68 ldr r3, [pc, #416] ; (8003418 ) + 8003278: 6f1b ldr r3, [r3, #112] ; 0x70 + 800327a: f003 0302 and.w r3, r3, #2 + 800327e: 2b00 cmp r3, #0 + 8003280: d0ee beq.n 8003260 + 8003282: e014 b.n 80032ae + } + } + else + { + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003284: f7fe f95c bl 8001540 + 8003288: 6238 str r0, [r7, #32] + + /* Wait till LSE is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) + 800328a: e00a b.n 80032a2 + { + if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) + 800328c: f7fe f958 bl 8001540 + 8003290: 4602 mov r2, r0 + 8003292: 6a3b ldr r3, [r7, #32] + 8003294: 1ad3 subs r3, r2, r3 + 8003296: f241 3288 movw r2, #5000 ; 0x1388 + 800329a: 4293 cmp r3, r2 + 800329c: d901 bls.n 80032a2 + { + return HAL_TIMEOUT; + 800329e: 2303 movs r3, #3 + 80032a0: e0b1 b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != RESET) + 80032a2: 4b5d ldr r3, [pc, #372] ; (8003418 ) + 80032a4: 6f1b ldr r3, [r3, #112] ; 0x70 + 80032a6: f003 0302 and.w r3, r3, #2 + 80032aa: 2b00 cmp r3, #0 + 80032ac: d1ee bne.n 800328c + } + } + } + + /* Restore clock configuration if changed */ + if(pwrclkchanged == SET) + 80032ae: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 80032b2: 2b01 cmp r3, #1 + 80032b4: d105 bne.n 80032c2 + { + __HAL_RCC_PWR_CLK_DISABLE(); + 80032b6: 4b58 ldr r3, [pc, #352] ; (8003418 ) + 80032b8: 6c1b ldr r3, [r3, #64] ; 0x40 + 80032ba: 4a57 ldr r2, [pc, #348] ; (8003418 ) + 80032bc: f023 5380 bic.w r3, r3, #268435456 ; 0x10000000 + 80032c0: 6413 str r3, [r2, #64] ; 0x40 + } + } + /*-------------------------------- PLL Configuration -----------------------*/ + /* Check the parameters */ + assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); + if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) + 80032c2: 687b ldr r3, [r7, #4] + 80032c4: 699b ldr r3, [r3, #24] + 80032c6: 2b00 cmp r3, #0 + 80032c8: f000 809c beq.w 8003404 + { + /* Check if the PLL is used as system clock or not */ + if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL) + 80032cc: 4b52 ldr r3, [pc, #328] ; (8003418 ) + 80032ce: 689b ldr r3, [r3, #8] + 80032d0: f003 030c and.w r3, r3, #12 + 80032d4: 2b08 cmp r3, #8 + 80032d6: d061 beq.n 800339c + { + if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) + 80032d8: 687b ldr r3, [r7, #4] + 80032da: 699b ldr r3, [r3, #24] + 80032dc: 2b02 cmp r3, #2 + 80032de: d146 bne.n 800336e + assert_param(IS_RCC_PLLN_VALUE(RCC_OscInitStruct->PLL.PLLN)); + assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP)); + assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ)); + + /* Disable the main PLL. */ + __HAL_RCC_PLL_DISABLE(); + 80032e0: 4b4e ldr r3, [pc, #312] ; (800341c ) + 80032e2: 2200 movs r2, #0 + 80032e4: 601a str r2, [r3, #0] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 80032e6: f7fe f92b bl 8001540 + 80032ea: 6238 str r0, [r7, #32] + + /* Wait till PLL is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) + 80032ec: e008 b.n 8003300 + { + if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) + 80032ee: f7fe f927 bl 8001540 + 80032f2: 4602 mov r2, r0 + 80032f4: 6a3b ldr r3, [r7, #32] + 80032f6: 1ad3 subs r3, r2, r3 + 80032f8: 2b64 cmp r3, #100 ; 0x64 + 80032fa: d901 bls.n 8003300 + { + return HAL_TIMEOUT; + 80032fc: 2303 movs r3, #3 + 80032fe: e082 b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) + 8003300: 4b45 ldr r3, [pc, #276] ; (8003418 ) + 8003302: 681b ldr r3, [r3, #0] + 8003304: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 + 8003308: 2b00 cmp r3, #0 + 800330a: d1f0 bne.n 80032ee + } + } + + /* Configure the main PLL clock source, multiplication and division factors. */ + __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, + 800330c: 4b42 ldr r3, [pc, #264] ; (8003418 ) + 800330e: 685a ldr r2, [r3, #4] + 8003310: 4b43 ldr r3, [pc, #268] ; (8003420 ) + 8003312: 4013 ands r3, r2 + 8003314: 687a ldr r2, [r7, #4] + 8003316: 69d1 ldr r1, [r2, #28] + 8003318: 687a ldr r2, [r7, #4] + 800331a: 6a12 ldr r2, [r2, #32] + 800331c: 4311 orrs r1, r2 + 800331e: 687a ldr r2, [r7, #4] + 8003320: 6a52 ldr r2, [r2, #36] ; 0x24 + 8003322: 0192 lsls r2, r2, #6 + 8003324: 4311 orrs r1, r2 + 8003326: 687a ldr r2, [r7, #4] + 8003328: 6ad2 ldr r2, [r2, #44] ; 0x2c + 800332a: 0612 lsls r2, r2, #24 + 800332c: 4311 orrs r1, r2 + 800332e: 687a ldr r2, [r7, #4] + 8003330: 6a92 ldr r2, [r2, #40] ; 0x28 + 8003332: 0852 lsrs r2, r2, #1 + 8003334: 3a01 subs r2, #1 + 8003336: 0412 lsls r2, r2, #16 + 8003338: 430a orrs r2, r1 + 800333a: 4937 ldr r1, [pc, #220] ; (8003418 ) + 800333c: 4313 orrs r3, r2 + 800333e: 604b str r3, [r1, #4] + RCC_OscInitStruct->PLL.PLLN, + RCC_OscInitStruct->PLL.PLLP, + RCC_OscInitStruct->PLL.PLLQ); + + /* Enable the main PLL. */ + __HAL_RCC_PLL_ENABLE(); + 8003340: 4b36 ldr r3, [pc, #216] ; (800341c ) + 8003342: 2201 movs r2, #1 + 8003344: 601a str r2, [r3, #0] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003346: f7fe f8fb bl 8001540 + 800334a: 6238 str r0, [r7, #32] + + /* Wait till PLL is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) + 800334c: e008 b.n 8003360 + { + if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) + 800334e: f7fe f8f7 bl 8001540 + 8003352: 4602 mov r2, r0 + 8003354: 6a3b ldr r3, [r7, #32] + 8003356: 1ad3 subs r3, r2, r3 + 8003358: 2b64 cmp r3, #100 ; 0x64 + 800335a: d901 bls.n 8003360 + { + return HAL_TIMEOUT; + 800335c: 2303 movs r3, #3 + 800335e: e052 b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) + 8003360: 4b2d ldr r3, [pc, #180] ; (8003418 ) + 8003362: 681b ldr r3, [r3, #0] + 8003364: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 + 8003368: 2b00 cmp r3, #0 + 800336a: d0f0 beq.n 800334e + 800336c: e04a b.n 8003404 + } + } + else + { + /* Disable the main PLL. */ + __HAL_RCC_PLL_DISABLE(); + 800336e: 4b2b ldr r3, [pc, #172] ; (800341c ) + 8003370: 2200 movs r2, #0 + 8003372: 601a str r2, [r3, #0] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 8003374: f7fe f8e4 bl 8001540 + 8003378: 6238 str r0, [r7, #32] + + /* Wait till PLL is ready */ + while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) + 800337a: e008 b.n 800338e + { + if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) + 800337c: f7fe f8e0 bl 8001540 + 8003380: 4602 mov r2, r0 + 8003382: 6a3b ldr r3, [r7, #32] + 8003384: 1ad3 subs r3, r2, r3 + 8003386: 2b64 cmp r3, #100 ; 0x64 + 8003388: d901 bls.n 800338e + { + return HAL_TIMEOUT; + 800338a: 2303 movs r3, #3 + 800338c: e03b b.n 8003406 + while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET) + 800338e: 4b22 ldr r3, [pc, #136] ; (8003418 ) + 8003390: 681b ldr r3, [r3, #0] + 8003392: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 + 8003396: 2b00 cmp r3, #0 + 8003398: d1f0 bne.n 800337c + 800339a: e033 b.n 8003404 + } + } + else + { + /* Check if there is a request to disable the PLL used as System clock source */ + if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) + 800339c: 687b ldr r3, [r7, #4] + 800339e: 699b ldr r3, [r3, #24] + 80033a0: 2b01 cmp r3, #1 + 80033a2: d101 bne.n 80033a8 + { + return HAL_ERROR; + 80033a4: 2301 movs r3, #1 + 80033a6: e02e b.n 8003406 + } + else + { + /* Do not return HAL_ERROR if request repeats the current configuration */ + uint32_t pllcfgr = RCC->PLLCFGR; + 80033a8: 4b1b ldr r3, [pc, #108] ; (8003418 ) + 80033aa: 685b ldr r3, [r3, #4] + 80033ac: 61fb str r3, [r7, #28] + + if((READ_BIT(pllcfgr, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || + 80033ae: 69fb ldr r3, [r7, #28] + 80033b0: f403 0280 and.w r2, r3, #4194304 ; 0x400000 + 80033b4: 687b ldr r3, [r7, #4] + 80033b6: 69db ldr r3, [r3, #28] + 80033b8: 429a cmp r2, r3 + 80033ba: d121 bne.n 8003400 + (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) || + 80033bc: 69fb ldr r3, [r7, #28] + 80033be: f003 023f and.w r2, r3, #63 ; 0x3f + 80033c2: 687b ldr r3, [r7, #4] + 80033c4: 6a1b ldr r3, [r3, #32] + if((READ_BIT(pllcfgr, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || + 80033c6: 429a cmp r2, r3 + 80033c8: d11a bne.n 8003400 + (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) || + 80033ca: 69fa ldr r2, [r7, #28] + 80033cc: f647 73c0 movw r3, #32704 ; 0x7fc0 + 80033d0: 4013 ands r3, r2 + 80033d2: 687a ldr r2, [r7, #4] + 80033d4: 6a52 ldr r2, [r2, #36] ; 0x24 + 80033d6: 0192 lsls r2, r2, #6 + (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLM) != (RCC_OscInitStruct->PLL.PLLM) << RCC_PLLCFGR_PLLM_Pos) || + 80033d8: 4293 cmp r3, r2 + 80033da: d111 bne.n 8003400 + (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) || + 80033dc: 69fb ldr r3, [r7, #28] + 80033de: f403 3240 and.w r2, r3, #196608 ; 0x30000 + 80033e2: 687b ldr r3, [r7, #4] + 80033e4: 6a9b ldr r3, [r3, #40] ; 0x28 + 80033e6: 085b lsrs r3, r3, #1 + 80033e8: 3b01 subs r3, #1 + 80033ea: 041b lsls r3, r3, #16 + (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLN) != (RCC_OscInitStruct->PLL.PLLN) << RCC_PLLCFGR_PLLN_Pos) || + 80033ec: 429a cmp r2, r3 + 80033ee: d107 bne.n 8003400 + (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLQ) != (RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos))) + 80033f0: 69fb ldr r3, [r7, #28] + 80033f2: f003 6270 and.w r2, r3, #251658240 ; 0xf000000 + 80033f6: 687b ldr r3, [r7, #4] + 80033f8: 6adb ldr r3, [r3, #44] ; 0x2c + 80033fa: 061b lsls r3, r3, #24 + (READ_BIT(pllcfgr, RCC_PLLCFGR_PLLP) != (((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U)) << RCC_PLLCFGR_PLLP_Pos) || + 80033fc: 429a cmp r2, r3 + 80033fe: d001 beq.n 8003404 + { + return HAL_ERROR; + 8003400: 2301 movs r3, #1 + 8003402: e000 b.n 8003406 + } + } + } + } + return HAL_OK; + 8003404: 2300 movs r3, #0 +} + 8003406: 4618 mov r0, r3 + 8003408: 3728 adds r7, #40 ; 0x28 + 800340a: 46bd mov sp, r7 + 800340c: bd80 pop {r7, pc} + 800340e: bf00 nop + 8003410: 40007000 .word 0x40007000 + 8003414: 40023870 .word 0x40023870 + 8003418: 40023800 .word 0x40023800 + 800341c: 42470060 .word 0x42470060 + 8003420: f0bc8000 .word 0xf0bc8000 + +08003424 : + * HPRE[3:0] bits to ensure that HCLK not exceed the maximum allowed frequency + * (for more details refer to section above "Initialization/de-initialization functions") + * @retval None + */ +HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency) +{ + 8003424: b580 push {r7, lr} + 8003426: b086 sub sp, #24 + 8003428: af00 add r7, sp, #0 + 800342a: 6078 str r0, [r7, #4] + 800342c: 6039 str r1, [r7, #0] + uint32_t tickstart; + + /* Check Null pointer */ + if(RCC_ClkInitStruct == NULL) + 800342e: 687b ldr r3, [r7, #4] + 8003430: 2b00 cmp r3, #0 + 8003432: d101 bne.n 8003438 + { + return HAL_ERROR; + 8003434: 2301 movs r3, #1 + 8003436: e0d2 b.n 80035de + /* To correctly read data from FLASH memory, the number of wait states (LATENCY) + must be correctly programmed according to the frequency of the CPU clock + (HCLK) and the supply voltage of the device. */ + + /* Increasing the number of wait states because of higher CPU frequency */ + if(FLatency > __HAL_FLASH_GET_LATENCY()) + 8003438: 4b6b ldr r3, [pc, #428] ; (80035e8 ) + 800343a: 681b ldr r3, [r3, #0] + 800343c: f003 030f and.w r3, r3, #15 + 8003440: 683a ldr r2, [r7, #0] + 8003442: 429a cmp r2, r3 + 8003444: d90c bls.n 8003460 + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + __HAL_FLASH_SET_LATENCY(FLatency); + 8003446: 4b68 ldr r3, [pc, #416] ; (80035e8 ) + 8003448: 683a ldr r2, [r7, #0] + 800344a: b2d2 uxtb r2, r2 + 800344c: 701a strb r2, [r3, #0] + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + if(__HAL_FLASH_GET_LATENCY() != FLatency) + 800344e: 4b66 ldr r3, [pc, #408] ; (80035e8 ) + 8003450: 681b ldr r3, [r3, #0] + 8003452: f003 030f and.w r3, r3, #15 + 8003456: 683a ldr r2, [r7, #0] + 8003458: 429a cmp r2, r3 + 800345a: d001 beq.n 8003460 + { + return HAL_ERROR; + 800345c: 2301 movs r3, #1 + 800345e: e0be b.n 80035de + } + } + + /*-------------------------- HCLK Configuration --------------------------*/ + if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) + 8003460: 687b ldr r3, [r7, #4] + 8003462: 681b ldr r3, [r3, #0] + 8003464: f003 0302 and.w r3, r3, #2 + 8003468: 2b00 cmp r3, #0 + 800346a: d020 beq.n 80034ae + { + /* Set the highest APBx dividers in order to ensure that we do not go through + a non-spec phase whatever we decrease or increase HCLK. */ + if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) + 800346c: 687b ldr r3, [r7, #4] + 800346e: 681b ldr r3, [r3, #0] + 8003470: f003 0304 and.w r3, r3, #4 + 8003474: 2b00 cmp r3, #0 + 8003476: d005 beq.n 8003484 + { + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_HCLK_DIV16); + 8003478: 4b5c ldr r3, [pc, #368] ; (80035ec ) + 800347a: 689b ldr r3, [r3, #8] + 800347c: 4a5b ldr r2, [pc, #364] ; (80035ec ) + 800347e: f443 53e0 orr.w r3, r3, #7168 ; 0x1c00 + 8003482: 6093 str r3, [r2, #8] + } + + if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) + 8003484: 687b ldr r3, [r7, #4] + 8003486: 681b ldr r3, [r3, #0] + 8003488: f003 0308 and.w r3, r3, #8 + 800348c: 2b00 cmp r3, #0 + 800348e: d005 beq.n 800349c + { + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, (RCC_HCLK_DIV16 << 3U)); + 8003490: 4b56 ldr r3, [pc, #344] ; (80035ec ) + 8003492: 689b ldr r3, [r3, #8] + 8003494: 4a55 ldr r2, [pc, #340] ; (80035ec ) + 8003496: f443 4360 orr.w r3, r3, #57344 ; 0xe000 + 800349a: 6093 str r3, [r2, #8] + } + + /* Set the new HCLK clock divider */ + assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); + MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); + 800349c: 4b53 ldr r3, [pc, #332] ; (80035ec ) + 800349e: 689b ldr r3, [r3, #8] + 80034a0: f023 02f0 bic.w r2, r3, #240 ; 0xf0 + 80034a4: 687b ldr r3, [r7, #4] + 80034a6: 689b ldr r3, [r3, #8] + 80034a8: 4950 ldr r1, [pc, #320] ; (80035ec ) + 80034aa: 4313 orrs r3, r2 + 80034ac: 608b str r3, [r1, #8] + } + + /*------------------------- SYSCLK Configuration ---------------------------*/ + if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) + 80034ae: 687b ldr r3, [r7, #4] + 80034b0: 681b ldr r3, [r3, #0] + 80034b2: f003 0301 and.w r3, r3, #1 + 80034b6: 2b00 cmp r3, #0 + 80034b8: d040 beq.n 800353c + { + assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); + + /* HSE is selected as System Clock Source */ + if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) + 80034ba: 687b ldr r3, [r7, #4] + 80034bc: 685b ldr r3, [r3, #4] + 80034be: 2b01 cmp r3, #1 + 80034c0: d107 bne.n 80034d2 + { + /* Check the HSE ready flag */ + if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET) + 80034c2: 4b4a ldr r3, [pc, #296] ; (80035ec ) + 80034c4: 681b ldr r3, [r3, #0] + 80034c6: f403 3300 and.w r3, r3, #131072 ; 0x20000 + 80034ca: 2b00 cmp r3, #0 + 80034cc: d115 bne.n 80034fa + { + return HAL_ERROR; + 80034ce: 2301 movs r3, #1 + 80034d0: e085 b.n 80035de + } + } + /* PLL is selected as System Clock Source */ + else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) + 80034d2: 687b ldr r3, [r7, #4] + 80034d4: 685b ldr r3, [r3, #4] + 80034d6: 2b02 cmp r3, #2 + 80034d8: d107 bne.n 80034ea + { + /* Check the PLL ready flag */ + if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET) + 80034da: 4b44 ldr r3, [pc, #272] ; (80035ec ) + 80034dc: 681b ldr r3, [r3, #0] + 80034de: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 + 80034e2: 2b00 cmp r3, #0 + 80034e4: d109 bne.n 80034fa + { + return HAL_ERROR; + 80034e6: 2301 movs r3, #1 + 80034e8: e079 b.n 80035de + } + /* HSI is selected as System Clock Source */ + else + { + /* Check the HSI ready flag */ + if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == RESET) + 80034ea: 4b40 ldr r3, [pc, #256] ; (80035ec ) + 80034ec: 681b ldr r3, [r3, #0] + 80034ee: f003 0302 and.w r3, r3, #2 + 80034f2: 2b00 cmp r3, #0 + 80034f4: d101 bne.n 80034fa + { + return HAL_ERROR; + 80034f6: 2301 movs r3, #1 + 80034f8: e071 b.n 80035de + } + } + + __HAL_RCC_SYSCLK_CONFIG(RCC_ClkInitStruct->SYSCLKSource); + 80034fa: 4b3c ldr r3, [pc, #240] ; (80035ec ) + 80034fc: 689b ldr r3, [r3, #8] + 80034fe: f023 0203 bic.w r2, r3, #3 + 8003502: 687b ldr r3, [r7, #4] + 8003504: 685b ldr r3, [r3, #4] + 8003506: 4939 ldr r1, [pc, #228] ; (80035ec ) + 8003508: 4313 orrs r3, r2 + 800350a: 608b str r3, [r1, #8] + + /* Get Start Tick */ + tickstart = HAL_GetTick(); + 800350c: f7fe f818 bl 8001540 + 8003510: 6178 str r0, [r7, #20] + + while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) + 8003512: e00a b.n 800352a + { + if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) + 8003514: f7fe f814 bl 8001540 + 8003518: 4602 mov r2, r0 + 800351a: 697b ldr r3, [r7, #20] + 800351c: 1ad3 subs r3, r2, r3 + 800351e: f241 3288 movw r2, #5000 ; 0x1388 + 8003522: 4293 cmp r3, r2 + 8003524: d901 bls.n 800352a + { + return HAL_TIMEOUT; + 8003526: 2303 movs r3, #3 + 8003528: e059 b.n 80035de + while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) + 800352a: 4b30 ldr r3, [pc, #192] ; (80035ec ) + 800352c: 689b ldr r3, [r3, #8] + 800352e: f003 020c and.w r2, r3, #12 + 8003532: 687b ldr r3, [r7, #4] + 8003534: 685b ldr r3, [r3, #4] + 8003536: 009b lsls r3, r3, #2 + 8003538: 429a cmp r2, r3 + 800353a: d1eb bne.n 8003514 + } + } + } + + /* Decreasing the number of wait states because of lower CPU frequency */ + if(FLatency < __HAL_FLASH_GET_LATENCY()) + 800353c: 4b2a ldr r3, [pc, #168] ; (80035e8 ) + 800353e: 681b ldr r3, [r3, #0] + 8003540: f003 030f and.w r3, r3, #15 + 8003544: 683a ldr r2, [r7, #0] + 8003546: 429a cmp r2, r3 + 8003548: d20c bcs.n 8003564 + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + __HAL_FLASH_SET_LATENCY(FLatency); + 800354a: 4b27 ldr r3, [pc, #156] ; (80035e8 ) + 800354c: 683a ldr r2, [r7, #0] + 800354e: b2d2 uxtb r2, r2 + 8003550: 701a strb r2, [r3, #0] + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + if(__HAL_FLASH_GET_LATENCY() != FLatency) + 8003552: 4b25 ldr r3, [pc, #148] ; (80035e8 ) + 8003554: 681b ldr r3, [r3, #0] + 8003556: f003 030f and.w r3, r3, #15 + 800355a: 683a ldr r2, [r7, #0] + 800355c: 429a cmp r2, r3 + 800355e: d001 beq.n 8003564 + { + return HAL_ERROR; + 8003560: 2301 movs r3, #1 + 8003562: e03c b.n 80035de + } + } + + /*-------------------------- PCLK1 Configuration ---------------------------*/ + if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) + 8003564: 687b ldr r3, [r7, #4] + 8003566: 681b ldr r3, [r3, #0] + 8003568: f003 0304 and.w r3, r3, #4 + 800356c: 2b00 cmp r3, #0 + 800356e: d008 beq.n 8003582 + { + assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB1CLKDivider)); + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, RCC_ClkInitStruct->APB1CLKDivider); + 8003570: 4b1e ldr r3, [pc, #120] ; (80035ec ) + 8003572: 689b ldr r3, [r3, #8] + 8003574: f423 52e0 bic.w r2, r3, #7168 ; 0x1c00 + 8003578: 687b ldr r3, [r7, #4] + 800357a: 68db ldr r3, [r3, #12] + 800357c: 491b ldr r1, [pc, #108] ; (80035ec ) + 800357e: 4313 orrs r3, r2 + 8003580: 608b str r3, [r1, #8] + } + + /*-------------------------- PCLK2 Configuration ---------------------------*/ + if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) + 8003582: 687b ldr r3, [r7, #4] + 8003584: 681b ldr r3, [r3, #0] + 8003586: f003 0308 and.w r3, r3, #8 + 800358a: 2b00 cmp r3, #0 + 800358c: d009 beq.n 80035a2 + { + assert_param(IS_RCC_PCLK(RCC_ClkInitStruct->APB2CLKDivider)); + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, ((RCC_ClkInitStruct->APB2CLKDivider) << 3U)); + 800358e: 4b17 ldr r3, [pc, #92] ; (80035ec ) + 8003590: 689b ldr r3, [r3, #8] + 8003592: f423 4260 bic.w r2, r3, #57344 ; 0xe000 + 8003596: 687b ldr r3, [r7, #4] + 8003598: 691b ldr r3, [r3, #16] + 800359a: 00db lsls r3, r3, #3 + 800359c: 4913 ldr r1, [pc, #76] ; (80035ec ) + 800359e: 4313 orrs r3, r2 + 80035a0: 608b str r3, [r1, #8] + } + + /* Update the SystemCoreClock global variable */ + SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> POSITION_VAL(RCC_CFGR_HPRE)]; + 80035a2: f000 f82b bl 80035fc + 80035a6: 4601 mov r1, r0 + 80035a8: 4b10 ldr r3, [pc, #64] ; (80035ec ) + 80035aa: 689b ldr r3, [r3, #8] + 80035ac: f003 03f0 and.w r3, r3, #240 ; 0xf0 + 80035b0: 22f0 movs r2, #240 ; 0xf0 + 80035b2: 613a str r2, [r7, #16] + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); + 80035b4: 693a ldr r2, [r7, #16] + 80035b6: fa92 f2a2 rbit r2, r2 + 80035ba: 60fa str r2, [r7, #12] + return result; + 80035bc: 68fa ldr r2, [r7, #12] + 80035be: fab2 f282 clz r2, r2 + 80035c2: b2d2 uxtb r2, r2 + 80035c4: 40d3 lsrs r3, r2 + 80035c6: 4a0a ldr r2, [pc, #40] ; (80035f0 ) + 80035c8: 5cd3 ldrb r3, [r2, r3] + 80035ca: fa21 f303 lsr.w r3, r1, r3 + 80035ce: 4a09 ldr r2, [pc, #36] ; (80035f4 ) + 80035d0: 6013 str r3, [r2, #0] + + /* Configure the source of time base considering new system clocks settings */ + HAL_InitTick (uwTickPrio); + 80035d2: 4b09 ldr r3, [pc, #36] ; (80035f8 ) + 80035d4: 681b ldr r3, [r3, #0] + 80035d6: 4618 mov r0, r3 + 80035d8: f7fd ff70 bl 80014bc + + return HAL_OK; + 80035dc: 2300 movs r3, #0 +} + 80035de: 4618 mov r0, r3 + 80035e0: 3718 adds r7, #24 + 80035e2: 46bd mov sp, r7 + 80035e4: bd80 pop {r7, pc} + 80035e6: bf00 nop + 80035e8: 40023c00 .word 0x40023c00 + 80035ec: 40023800 .word 0x40023800 + 80035f0: 08016670 .word 0x08016670 + 80035f4: 20000000 .word 0x20000000 + 80035f8: 20000004 .word 0x20000004 + +080035fc : + * + * + * @retval SYSCLK frequency + */ +uint32_t HAL_RCC_GetSysClockFreq(void) +{ + 80035fc: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} + 8003600: b094 sub sp, #80 ; 0x50 + 8003602: af00 add r7, sp, #0 + uint32_t pllm = 0U, pllvco = 0U, pllp = 0U; + 8003604: 2300 movs r3, #0 + 8003606: 647b str r3, [r7, #68] ; 0x44 + 8003608: 2300 movs r3, #0 + 800360a: 64fb str r3, [r7, #76] ; 0x4c + 800360c: 2300 movs r3, #0 + 800360e: 643b str r3, [r7, #64] ; 0x40 + uint32_t sysclockfreq = 0U; + 8003610: 2300 movs r3, #0 + 8003612: 64bb str r3, [r7, #72] ; 0x48 + + /* Get SYSCLK source -------------------------------------------------------*/ + switch (RCC->CFGR & RCC_CFGR_SWS) + 8003614: 4b7c ldr r3, [pc, #496] ; (8003808 ) + 8003616: 689b ldr r3, [r3, #8] + 8003618: f003 030c and.w r3, r3, #12 + 800361c: 2b08 cmp r3, #8 + 800361e: d00d beq.n 800363c + 8003620: 2b08 cmp r3, #8 + 8003622: f200 80e7 bhi.w 80037f4 + 8003626: 2b00 cmp r3, #0 + 8003628: d002 beq.n 8003630 + 800362a: 2b04 cmp r3, #4 + 800362c: d003 beq.n 8003636 + 800362e: e0e1 b.n 80037f4 + { + case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */ + { + sysclockfreq = HSI_VALUE; + 8003630: 4b76 ldr r3, [pc, #472] ; (800380c ) + 8003632: 64bb str r3, [r7, #72] ; 0x48 + break; + 8003634: e0e1 b.n 80037fa + } + case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */ + { + sysclockfreq = HSE_VALUE; + 8003636: 4b76 ldr r3, [pc, #472] ; (8003810 ) + 8003638: 64bb str r3, [r7, #72] ; 0x48 + break; + 800363a: e0de b.n 80037fa + } + case RCC_CFGR_SWS_PLL: /* PLL used as system clock source */ + { + /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN + SYSCLK = PLL_VCO / PLLP */ + pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; + 800363c: 4b72 ldr r3, [pc, #456] ; (8003808 ) + 800363e: 685b ldr r3, [r3, #4] + 8003640: f003 033f and.w r3, r3, #63 ; 0x3f + 8003644: 647b str r3, [r7, #68] ; 0x44 + if(__HAL_RCC_GET_PLL_OSCSOURCE() != RCC_PLLSOURCE_HSI) + 8003646: 4b70 ldr r3, [pc, #448] ; (8003808 ) + 8003648: 685b ldr r3, [r3, #4] + 800364a: f403 0380 and.w r3, r3, #4194304 ; 0x400000 + 800364e: 2b00 cmp r3, #0 + 8003650: d065 beq.n 800371e + { + /* HSE used as PLL clock source */ + pllvco = (uint32_t) ((((uint64_t) HSE_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm); + 8003652: 4b6d ldr r3, [pc, #436] ; (8003808 ) + 8003654: 685b ldr r3, [r3, #4] + 8003656: 099b lsrs r3, r3, #6 + 8003658: 2200 movs r2, #0 + 800365a: 63bb str r3, [r7, #56] ; 0x38 + 800365c: 63fa str r2, [r7, #60] ; 0x3c + 800365e: 6bbb ldr r3, [r7, #56] ; 0x38 + 8003660: f3c3 0308 ubfx r3, r3, #0, #9 + 8003664: 633b str r3, [r7, #48] ; 0x30 + 8003666: 2300 movs r3, #0 + 8003668: 637b str r3, [r7, #52] ; 0x34 + 800366a: e9d7 450c ldrd r4, r5, [r7, #48] ; 0x30 + 800366e: 4622 mov r2, r4 + 8003670: 462b mov r3, r5 + 8003672: f04f 0000 mov.w r0, #0 + 8003676: f04f 0100 mov.w r1, #0 + 800367a: 0159 lsls r1, r3, #5 + 800367c: ea41 61d2 orr.w r1, r1, r2, lsr #27 + 8003680: 0150 lsls r0, r2, #5 + 8003682: 4602 mov r2, r0 + 8003684: 460b mov r3, r1 + 8003686: 4621 mov r1, r4 + 8003688: 1a51 subs r1, r2, r1 + 800368a: 6139 str r1, [r7, #16] + 800368c: 4629 mov r1, r5 + 800368e: eb63 0301 sbc.w r3, r3, r1 + 8003692: 617b str r3, [r7, #20] + 8003694: f04f 0200 mov.w r2, #0 + 8003698: f04f 0300 mov.w r3, #0 + 800369c: e9d7 ab04 ldrd sl, fp, [r7, #16] + 80036a0: 4659 mov r1, fp + 80036a2: 018b lsls r3, r1, #6 + 80036a4: 4651 mov r1, sl + 80036a6: ea43 6391 orr.w r3, r3, r1, lsr #26 + 80036aa: 4651 mov r1, sl + 80036ac: 018a lsls r2, r1, #6 + 80036ae: 46d4 mov ip, sl + 80036b0: ebb2 080c subs.w r8, r2, ip + 80036b4: 4659 mov r1, fp + 80036b6: eb63 0901 sbc.w r9, r3, r1 + 80036ba: f04f 0200 mov.w r2, #0 + 80036be: f04f 0300 mov.w r3, #0 + 80036c2: ea4f 03c9 mov.w r3, r9, lsl #3 + 80036c6: ea43 7358 orr.w r3, r3, r8, lsr #29 + 80036ca: ea4f 02c8 mov.w r2, r8, lsl #3 + 80036ce: 4690 mov r8, r2 + 80036d0: 4699 mov r9, r3 + 80036d2: 4623 mov r3, r4 + 80036d4: eb18 0303 adds.w r3, r8, r3 + 80036d8: 60bb str r3, [r7, #8] + 80036da: 462b mov r3, r5 + 80036dc: eb49 0303 adc.w r3, r9, r3 + 80036e0: 60fb str r3, [r7, #12] + 80036e2: f04f 0200 mov.w r2, #0 + 80036e6: f04f 0300 mov.w r3, #0 + 80036ea: e9d7 4502 ldrd r4, r5, [r7, #8] + 80036ee: 4629 mov r1, r5 + 80036f0: 024b lsls r3, r1, #9 + 80036f2: 4620 mov r0, r4 + 80036f4: 4629 mov r1, r5 + 80036f6: 4604 mov r4, r0 + 80036f8: ea43 53d4 orr.w r3, r3, r4, lsr #23 + 80036fc: 4601 mov r1, r0 + 80036fe: 024a lsls r2, r1, #9 + 8003700: 4610 mov r0, r2 + 8003702: 4619 mov r1, r3 + 8003704: 6c7b ldr r3, [r7, #68] ; 0x44 + 8003706: 2200 movs r2, #0 + 8003708: 62bb str r3, [r7, #40] ; 0x28 + 800370a: 62fa str r2, [r7, #44] ; 0x2c + 800370c: e9d7 230a ldrd r2, r3, [r7, #40] ; 0x28 + 8003710: f7fc fd6a bl 80001e8 <__aeabi_uldivmod> + 8003714: 4602 mov r2, r0 + 8003716: 460b mov r3, r1 + 8003718: 4613 mov r3, r2 + 800371a: 64fb str r3, [r7, #76] ; 0x4c + 800371c: e05c b.n 80037d8 + } + else + { + /* HSI used as PLL clock source */ + pllvco = (uint32_t) ((((uint64_t) HSI_VALUE * ((uint64_t) ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos)))) / (uint64_t)pllm); + 800371e: 4b3a ldr r3, [pc, #232] ; (8003808 ) + 8003720: 685b ldr r3, [r3, #4] + 8003722: 099b lsrs r3, r3, #6 + 8003724: 2200 movs r2, #0 + 8003726: 4618 mov r0, r3 + 8003728: 4611 mov r1, r2 + 800372a: f3c0 0308 ubfx r3, r0, #0, #9 + 800372e: 623b str r3, [r7, #32] + 8003730: 2300 movs r3, #0 + 8003732: 627b str r3, [r7, #36] ; 0x24 + 8003734: e9d7 8908 ldrd r8, r9, [r7, #32] + 8003738: 4642 mov r2, r8 + 800373a: 464b mov r3, r9 + 800373c: f04f 0000 mov.w r0, #0 + 8003740: f04f 0100 mov.w r1, #0 + 8003744: 0159 lsls r1, r3, #5 + 8003746: ea41 61d2 orr.w r1, r1, r2, lsr #27 + 800374a: 0150 lsls r0, r2, #5 + 800374c: 4602 mov r2, r0 + 800374e: 460b mov r3, r1 + 8003750: 46c4 mov ip, r8 + 8003752: ebb2 0a0c subs.w sl, r2, ip + 8003756: 4640 mov r0, r8 + 8003758: 4649 mov r1, r9 + 800375a: 468c mov ip, r1 + 800375c: eb63 0b0c sbc.w fp, r3, ip + 8003760: f04f 0200 mov.w r2, #0 + 8003764: f04f 0300 mov.w r3, #0 + 8003768: ea4f 138b mov.w r3, fp, lsl #6 + 800376c: ea43 639a orr.w r3, r3, sl, lsr #26 + 8003770: ea4f 128a mov.w r2, sl, lsl #6 + 8003774: ebb2 040a subs.w r4, r2, sl + 8003778: eb63 050b sbc.w r5, r3, fp + 800377c: f04f 0200 mov.w r2, #0 + 8003780: f04f 0300 mov.w r3, #0 + 8003784: 00eb lsls r3, r5, #3 + 8003786: ea43 7354 orr.w r3, r3, r4, lsr #29 + 800378a: 00e2 lsls r2, r4, #3 + 800378c: 4614 mov r4, r2 + 800378e: 461d mov r5, r3 + 8003790: 4603 mov r3, r0 + 8003792: 18e3 adds r3, r4, r3 + 8003794: 603b str r3, [r7, #0] + 8003796: 460b mov r3, r1 + 8003798: eb45 0303 adc.w r3, r5, r3 + 800379c: 607b str r3, [r7, #4] + 800379e: f04f 0200 mov.w r2, #0 + 80037a2: f04f 0300 mov.w r3, #0 + 80037a6: e9d7 4500 ldrd r4, r5, [r7] + 80037aa: 4629 mov r1, r5 + 80037ac: 028b lsls r3, r1, #10 + 80037ae: 4620 mov r0, r4 + 80037b0: 4629 mov r1, r5 + 80037b2: 4604 mov r4, r0 + 80037b4: ea43 5394 orr.w r3, r3, r4, lsr #22 + 80037b8: 4601 mov r1, r0 + 80037ba: 028a lsls r2, r1, #10 + 80037bc: 4610 mov r0, r2 + 80037be: 4619 mov r1, r3 + 80037c0: 6c7b ldr r3, [r7, #68] ; 0x44 + 80037c2: 2200 movs r2, #0 + 80037c4: 61bb str r3, [r7, #24] + 80037c6: 61fa str r2, [r7, #28] + 80037c8: e9d7 2306 ldrd r2, r3, [r7, #24] + 80037cc: f7fc fd0c bl 80001e8 <__aeabi_uldivmod> + 80037d0: 4602 mov r2, r0 + 80037d2: 460b mov r3, r1 + 80037d4: 4613 mov r3, r2 + 80037d6: 64fb str r3, [r7, #76] ; 0x4c + } + pllp = ((((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >> RCC_PLLCFGR_PLLP_Pos) + 1U) *2U); + 80037d8: 4b0b ldr r3, [pc, #44] ; (8003808 ) + 80037da: 685b ldr r3, [r3, #4] + 80037dc: 0c1b lsrs r3, r3, #16 + 80037de: f003 0303 and.w r3, r3, #3 + 80037e2: 3301 adds r3, #1 + 80037e4: 005b lsls r3, r3, #1 + 80037e6: 643b str r3, [r7, #64] ; 0x40 + + sysclockfreq = pllvco/pllp; + 80037e8: 6cfa ldr r2, [r7, #76] ; 0x4c + 80037ea: 6c3b ldr r3, [r7, #64] ; 0x40 + 80037ec: fbb2 f3f3 udiv r3, r2, r3 + 80037f0: 64bb str r3, [r7, #72] ; 0x48 + break; + 80037f2: e002 b.n 80037fa + } + default: + { + sysclockfreq = HSI_VALUE; + 80037f4: 4b05 ldr r3, [pc, #20] ; (800380c ) + 80037f6: 64bb str r3, [r7, #72] ; 0x48 + break; + 80037f8: bf00 nop + } + } + return sysclockfreq; + 80037fa: 6cbb ldr r3, [r7, #72] ; 0x48 +} + 80037fc: 4618 mov r0, r3 + 80037fe: 3750 adds r7, #80 ; 0x50 + 8003800: 46bd mov sp, r7 + 8003802: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} + 8003806: bf00 nop + 8003808: 40023800 .word 0x40023800 + 800380c: 00f42400 .word 0x00f42400 + 8003810: 007a1200 .word 0x007a1200 + +08003814 : + * @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency + * and updated within this function + * @retval HCLK frequency + */ +uint32_t HAL_RCC_GetHCLKFreq(void) +{ + 8003814: b480 push {r7} + 8003816: af00 add r7, sp, #0 + return SystemCoreClock; + 8003818: 4b02 ldr r3, [pc, #8] ; (8003824 ) + 800381a: 681b ldr r3, [r3, #0] +} + 800381c: 4618 mov r0, r3 + 800381e: 46bd mov sp, r7 + 8003820: bc80 pop {r7} + 8003822: 4770 bx lr + 8003824: 20000000 .word 0x20000000 + +08003828 : + * @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) +{ + 8003828: b580 push {r7, lr} + 800382a: b082 sub sp, #8 + 800382c: af00 add r7, sp, #0 + /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ + return (HAL_RCC_GetHCLKFreq() >> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE1)>> POSITION_VAL(RCC_CFGR_PPRE1)]); + 800382e: f7ff fff1 bl 8003814 + 8003832: 4601 mov r1, r0 + 8003834: 4b0b ldr r3, [pc, #44] ; (8003864 ) + 8003836: 689b ldr r3, [r3, #8] + 8003838: f403 53e0 and.w r3, r3, #7168 ; 0x1c00 + 800383c: f44f 52e0 mov.w r2, #7168 ; 0x1c00 + 8003840: 607a str r2, [r7, #4] + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); + 8003842: 687a ldr r2, [r7, #4] + 8003844: fa92 f2a2 rbit r2, r2 + 8003848: 603a str r2, [r7, #0] + return result; + 800384a: 683a ldr r2, [r7, #0] + 800384c: fab2 f282 clz r2, r2 + 8003850: b2d2 uxtb r2, r2 + 8003852: 40d3 lsrs r3, r2 + 8003854: 4a04 ldr r2, [pc, #16] ; (8003868 ) + 8003856: 5cd3 ldrb r3, [r2, r3] + 8003858: fa21 f303 lsr.w r3, r1, r3 +} + 800385c: 4618 mov r0, r3 + 800385e: 3708 adds r7, #8 + 8003860: 46bd mov sp, r7 + 8003862: bd80 pop {r7, pc} + 8003864: 40023800 .word 0x40023800 + 8003868: 08016680 .word 0x08016680 + +0800386c : + * @note Each time PCLK2 changes, this function must be called to update the + * right PCLK2 value. Otherwise, any configuration based on this function will be incorrect. + * @retval PCLK2 frequency + */ +uint32_t HAL_RCC_GetPCLK2Freq(void) +{ + 800386c: b580 push {r7, lr} + 800386e: b082 sub sp, #8 + 8003870: af00 add r7, sp, #0 + /* Get HCLK source and Compute PCLK2 frequency ---------------------------*/ + return (HAL_RCC_GetHCLKFreq()>> APBPrescTable[(RCC->CFGR & RCC_CFGR_PPRE2)>> POSITION_VAL(RCC_CFGR_PPRE2)]); + 8003872: f7ff ffcf bl 8003814 + 8003876: 4601 mov r1, r0 + 8003878: 4b0b ldr r3, [pc, #44] ; (80038a8 ) + 800387a: 689b ldr r3, [r3, #8] + 800387c: f403 4360 and.w r3, r3, #57344 ; 0xe000 + 8003880: f44f 4260 mov.w r2, #57344 ; 0xe000 + 8003884: 607a str r2, [r7, #4] + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); + 8003886: 687a ldr r2, [r7, #4] + 8003888: fa92 f2a2 rbit r2, r2 + 800388c: 603a str r2, [r7, #0] + return result; + 800388e: 683a ldr r2, [r7, #0] + 8003890: fab2 f282 clz r2, r2 + 8003894: b2d2 uxtb r2, r2 + 8003896: 40d3 lsrs r3, r2 + 8003898: 4a04 ldr r2, [pc, #16] ; (80038ac ) + 800389a: 5cd3 ldrb r3, [r2, r3] + 800389c: fa21 f303 lsr.w r3, r1, r3 +} + 80038a0: 4618 mov r0, r3 + 80038a2: 3708 adds r7, #8 + 80038a4: 46bd mov sp, r7 + 80038a6: bd80 pop {r7, pc} + 80038a8: 40023800 .word 0x40023800 + 80038ac: 08016680 .word 0x08016680 + +080038b0 : + * Ex: call @ref HAL_TIM_Base_DeInit() before HAL_TIM_Base_Init() + * @param htim TIM Base handle + * @retval HAL status + */ +HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim) +{ + 80038b0: b580 push {r7, lr} + 80038b2: b082 sub sp, #8 + 80038b4: af00 add r7, sp, #0 + 80038b6: 6078 str r0, [r7, #4] + /* Check the TIM handle allocation */ + if (htim == NULL) + 80038b8: 687b ldr r3, [r7, #4] + 80038ba: 2b00 cmp r3, #0 + 80038bc: d101 bne.n 80038c2 + { + return HAL_ERROR; + 80038be: 2301 movs r3, #1 + 80038c0: e041 b.n 8003946 + assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode)); + assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision)); + assert_param(IS_TIM_PERIOD(htim, htim->Init.Period)); + assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload)); + + if (htim->State == HAL_TIM_STATE_RESET) + 80038c2: 687b ldr r3, [r7, #4] + 80038c4: f893 303d ldrb.w r3, [r3, #61] ; 0x3d + 80038c8: b2db uxtb r3, r3 + 80038ca: 2b00 cmp r3, #0 + 80038cc: d106 bne.n 80038dc + { + /* Allocate lock resource and initialize it */ + htim->Lock = HAL_UNLOCKED; + 80038ce: 687b ldr r3, [r7, #4] + 80038d0: 2200 movs r2, #0 + 80038d2: f883 203c strb.w r2, [r3, #60] ; 0x3c + } + /* Init the low level hardware : GPIO, CLOCK, NVIC */ + htim->Base_MspInitCallback(htim); +#else + /* Init the low level hardware : GPIO, CLOCK, NVIC */ + HAL_TIM_Base_MspInit(htim); + 80038d6: 6878 ldr r0, [r7, #4] + 80038d8: f7fd fb0a bl 8000ef0 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + + /* Set the TIM state */ + htim->State = HAL_TIM_STATE_BUSY; + 80038dc: 687b ldr r3, [r7, #4] + 80038de: 2202 movs r2, #2 + 80038e0: f883 203d strb.w r2, [r3, #61] ; 0x3d + + /* Set the Time Base configuration */ + TIM_Base_SetConfig(htim->Instance, &htim->Init); + 80038e4: 687b ldr r3, [r7, #4] + 80038e6: 681a ldr r2, [r3, #0] + 80038e8: 687b ldr r3, [r7, #4] + 80038ea: 3304 adds r3, #4 + 80038ec: 4619 mov r1, r3 + 80038ee: 4610 mov r0, r2 + 80038f0: f000 fc5a bl 80041a8 + + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + 80038f4: 687b ldr r3, [r7, #4] + 80038f6: 2201 movs r2, #1 + 80038f8: f883 2046 strb.w r2, [r3, #70] ; 0x46 + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + 80038fc: 687b ldr r3, [r7, #4] + 80038fe: 2201 movs r2, #1 + 8003900: f883 203e strb.w r2, [r3, #62] ; 0x3e + 8003904: 687b ldr r3, [r7, #4] + 8003906: 2201 movs r2, #1 + 8003908: f883 203f strb.w r2, [r3, #63] ; 0x3f + 800390c: 687b ldr r3, [r7, #4] + 800390e: 2201 movs r2, #1 + 8003910: f883 2040 strb.w r2, [r3, #64] ; 0x40 + 8003914: 687b ldr r3, [r7, #4] + 8003916: 2201 movs r2, #1 + 8003918: f883 2041 strb.w r2, [r3, #65] ; 0x41 + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + 800391c: 687b ldr r3, [r7, #4] + 800391e: 2201 movs r2, #1 + 8003920: f883 2042 strb.w r2, [r3, #66] ; 0x42 + 8003924: 687b ldr r3, [r7, #4] + 8003926: 2201 movs r2, #1 + 8003928: f883 2043 strb.w r2, [r3, #67] ; 0x43 + 800392c: 687b ldr r3, [r7, #4] + 800392e: 2201 movs r2, #1 + 8003930: f883 2044 strb.w r2, [r3, #68] ; 0x44 + 8003934: 687b ldr r3, [r7, #4] + 8003936: 2201 movs r2, #1 + 8003938: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Initialize the TIM state*/ + htim->State = HAL_TIM_STATE_READY; + 800393c: 687b ldr r3, [r7, #4] + 800393e: 2201 movs r2, #1 + 8003940: f883 203d strb.w r2, [r3, #61] ; 0x3d + + return HAL_OK; + 8003944: 2300 movs r3, #0 +} + 8003946: 4618 mov r0, r3 + 8003948: 3708 adds r7, #8 + 800394a: 46bd mov sp, r7 + 800394c: bd80 pop {r7, pc} + +0800394e : + * Ex: call @ref HAL_TIM_PWM_DeInit() before HAL_TIM_PWM_Init() + * @param htim TIM PWM handle + * @retval HAL status + */ +HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim) +{ + 800394e: b580 push {r7, lr} + 8003950: b082 sub sp, #8 + 8003952: af00 add r7, sp, #0 + 8003954: 6078 str r0, [r7, #4] + /* Check the TIM handle allocation */ + if (htim == NULL) + 8003956: 687b ldr r3, [r7, #4] + 8003958: 2b00 cmp r3, #0 + 800395a: d101 bne.n 8003960 + { + return HAL_ERROR; + 800395c: 2301 movs r3, #1 + 800395e: e041 b.n 80039e4 + assert_param(IS_TIM_COUNTER_MODE(htim->Init.CounterMode)); + assert_param(IS_TIM_CLOCKDIVISION_DIV(htim->Init.ClockDivision)); + assert_param(IS_TIM_PERIOD(htim, htim->Init.Period)); + assert_param(IS_TIM_AUTORELOAD_PRELOAD(htim->Init.AutoReloadPreload)); + + if (htim->State == HAL_TIM_STATE_RESET) + 8003960: 687b ldr r3, [r7, #4] + 8003962: f893 303d ldrb.w r3, [r3, #61] ; 0x3d + 8003966: b2db uxtb r3, r3 + 8003968: 2b00 cmp r3, #0 + 800396a: d106 bne.n 800397a + { + /* Allocate lock resource and initialize it */ + htim->Lock = HAL_UNLOCKED; + 800396c: 687b ldr r3, [r7, #4] + 800396e: 2200 movs r2, #0 + 8003970: f883 203c strb.w r2, [r3, #60] ; 0x3c + } + /* Init the low level hardware : GPIO, CLOCK, NVIC */ + htim->PWM_MspInitCallback(htim); +#else + /* Init the low level hardware : GPIO, CLOCK, NVIC and DMA */ + HAL_TIM_PWM_MspInit(htim); + 8003974: 6878 ldr r0, [r7, #4] + 8003976: f000 f839 bl 80039ec +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + + /* Set the TIM state */ + htim->State = HAL_TIM_STATE_BUSY; + 800397a: 687b ldr r3, [r7, #4] + 800397c: 2202 movs r2, #2 + 800397e: f883 203d strb.w r2, [r3, #61] ; 0x3d + + /* Init the base time for the PWM */ + TIM_Base_SetConfig(htim->Instance, &htim->Init); + 8003982: 687b ldr r3, [r7, #4] + 8003984: 681a ldr r2, [r3, #0] + 8003986: 687b ldr r3, [r7, #4] + 8003988: 3304 adds r3, #4 + 800398a: 4619 mov r1, r3 + 800398c: 4610 mov r0, r2 + 800398e: f000 fc0b bl 80041a8 + + /* Initialize the DMA burst operation state */ + htim->DMABurstState = HAL_DMA_BURST_STATE_READY; + 8003992: 687b ldr r3, [r7, #4] + 8003994: 2201 movs r2, #1 + 8003996: f883 2046 strb.w r2, [r3, #70] ; 0x46 + + /* Initialize the TIM channels state */ + TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + 800399a: 687b ldr r3, [r7, #4] + 800399c: 2201 movs r2, #1 + 800399e: f883 203e strb.w r2, [r3, #62] ; 0x3e + 80039a2: 687b ldr r3, [r7, #4] + 80039a4: 2201 movs r2, #1 + 80039a6: f883 203f strb.w r2, [r3, #63] ; 0x3f + 80039aa: 687b ldr r3, [r7, #4] + 80039ac: 2201 movs r2, #1 + 80039ae: f883 2040 strb.w r2, [r3, #64] ; 0x40 + 80039b2: 687b ldr r3, [r7, #4] + 80039b4: 2201 movs r2, #1 + 80039b6: f883 2041 strb.w r2, [r3, #65] ; 0x41 + TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); + 80039ba: 687b ldr r3, [r7, #4] + 80039bc: 2201 movs r2, #1 + 80039be: f883 2042 strb.w r2, [r3, #66] ; 0x42 + 80039c2: 687b ldr r3, [r7, #4] + 80039c4: 2201 movs r2, #1 + 80039c6: f883 2043 strb.w r2, [r3, #67] ; 0x43 + 80039ca: 687b ldr r3, [r7, #4] + 80039cc: 2201 movs r2, #1 + 80039ce: f883 2044 strb.w r2, [r3, #68] ; 0x44 + 80039d2: 687b ldr r3, [r7, #4] + 80039d4: 2201 movs r2, #1 + 80039d6: f883 2045 strb.w r2, [r3, #69] ; 0x45 + + /* Initialize the TIM state*/ + htim->State = HAL_TIM_STATE_READY; + 80039da: 687b ldr r3, [r7, #4] + 80039dc: 2201 movs r2, #1 + 80039de: f883 203d strb.w r2, [r3, #61] ; 0x3d + + return HAL_OK; + 80039e2: 2300 movs r3, #0 +} + 80039e4: 4618 mov r0, r3 + 80039e6: 3708 adds r7, #8 + 80039e8: 46bd mov sp, r7 + 80039ea: bd80 pop {r7, pc} + +080039ec : + * @brief Initializes the TIM PWM MSP. + * @param htim TIM PWM handle + * @retval None + */ +__weak void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim) +{ + 80039ec: b480 push {r7} + 80039ee: b083 sub sp, #12 + 80039f0: af00 add r7, sp, #0 + 80039f2: 6078 str r0, [r7, #4] + UNUSED(htim); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_TIM_PWM_MspInit could be implemented in the user file + */ +} + 80039f4: bf00 nop + 80039f6: 370c adds r7, #12 + 80039f8: 46bd mov sp, r7 + 80039fa: bc80 pop {r7} + 80039fc: 4770 bx lr + ... + +08003a00 : + * @arg TIM_CHANNEL_3: TIM Channel 3 selected + * @arg TIM_CHANNEL_4: TIM Channel 4 selected + * @retval HAL status + */ +HAL_StatusTypeDef HAL_TIM_PWM_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel) +{ + 8003a00: b580 push {r7, lr} + 8003a02: b084 sub sp, #16 + 8003a04: af00 add r7, sp, #0 + 8003a06: 6078 str r0, [r7, #4] + 8003a08: 6039 str r1, [r7, #0] + HAL_StatusTypeDef status = HAL_OK; + 8003a0a: 2300 movs r3, #0 + 8003a0c: 73fb strb r3, [r7, #15] + + /* Check the parameters */ + assert_param(IS_TIM_CCX_INSTANCE(htim->Instance, Channel)); + + /* Check the TIM channel state */ + if (TIM_CHANNEL_STATE_GET(htim, Channel) != HAL_TIM_CHANNEL_STATE_READY) + 8003a0e: 683b ldr r3, [r7, #0] + 8003a10: 2b00 cmp r3, #0 + 8003a12: d109 bne.n 8003a28 + 8003a14: 687b ldr r3, [r7, #4] + 8003a16: f893 303e ldrb.w r3, [r3, #62] ; 0x3e + 8003a1a: b2db uxtb r3, r3 + 8003a1c: 2b01 cmp r3, #1 + 8003a1e: bf14 ite ne + 8003a20: 2301 movne r3, #1 + 8003a22: 2300 moveq r3, #0 + 8003a24: b2db uxtb r3, r3 + 8003a26: e022 b.n 8003a6e + 8003a28: 683b ldr r3, [r7, #0] + 8003a2a: 2b04 cmp r3, #4 + 8003a2c: d109 bne.n 8003a42 + 8003a2e: 687b ldr r3, [r7, #4] + 8003a30: f893 303f ldrb.w r3, [r3, #63] ; 0x3f + 8003a34: b2db uxtb r3, r3 + 8003a36: 2b01 cmp r3, #1 + 8003a38: bf14 ite ne + 8003a3a: 2301 movne r3, #1 + 8003a3c: 2300 moveq r3, #0 + 8003a3e: b2db uxtb r3, r3 + 8003a40: e015 b.n 8003a6e + 8003a42: 683b ldr r3, [r7, #0] + 8003a44: 2b08 cmp r3, #8 + 8003a46: d109 bne.n 8003a5c + 8003a48: 687b ldr r3, [r7, #4] + 8003a4a: f893 3040 ldrb.w r3, [r3, #64] ; 0x40 + 8003a4e: b2db uxtb r3, r3 + 8003a50: 2b01 cmp r3, #1 + 8003a52: bf14 ite ne + 8003a54: 2301 movne r3, #1 + 8003a56: 2300 moveq r3, #0 + 8003a58: b2db uxtb r3, r3 + 8003a5a: e008 b.n 8003a6e + 8003a5c: 687b ldr r3, [r7, #4] + 8003a5e: f893 3041 ldrb.w r3, [r3, #65] ; 0x41 + 8003a62: b2db uxtb r3, r3 + 8003a64: 2b01 cmp r3, #1 + 8003a66: bf14 ite ne + 8003a68: 2301 movne r3, #1 + 8003a6a: 2300 moveq r3, #0 + 8003a6c: b2db uxtb r3, r3 + 8003a6e: 2b00 cmp r3, #0 + 8003a70: d001 beq.n 8003a76 + { + return HAL_ERROR; + 8003a72: 2301 movs r3, #1 + 8003a74: e0c7 b.n 8003c06 + } + + /* Set the TIM channel state */ + TIM_CHANNEL_STATE_SET(htim, Channel, HAL_TIM_CHANNEL_STATE_BUSY); + 8003a76: 683b ldr r3, [r7, #0] + 8003a78: 2b00 cmp r3, #0 + 8003a7a: d104 bne.n 8003a86 + 8003a7c: 687b ldr r3, [r7, #4] + 8003a7e: 2202 movs r2, #2 + 8003a80: f883 203e strb.w r2, [r3, #62] ; 0x3e + 8003a84: e013 b.n 8003aae + 8003a86: 683b ldr r3, [r7, #0] + 8003a88: 2b04 cmp r3, #4 + 8003a8a: d104 bne.n 8003a96 + 8003a8c: 687b ldr r3, [r7, #4] + 8003a8e: 2202 movs r2, #2 + 8003a90: f883 203f strb.w r2, [r3, #63] ; 0x3f + 8003a94: e00b b.n 8003aae + 8003a96: 683b ldr r3, [r7, #0] + 8003a98: 2b08 cmp r3, #8 + 8003a9a: d104 bne.n 8003aa6 + 8003a9c: 687b ldr r3, [r7, #4] + 8003a9e: 2202 movs r2, #2 + 8003aa0: f883 2040 strb.w r2, [r3, #64] ; 0x40 + 8003aa4: e003 b.n 8003aae + 8003aa6: 687b ldr r3, [r7, #4] + 8003aa8: 2202 movs r2, #2 + 8003aaa: f883 2041 strb.w r2, [r3, #65] ; 0x41 + + switch (Channel) + 8003aae: 683b ldr r3, [r7, #0] + 8003ab0: 2b0c cmp r3, #12 + 8003ab2: d841 bhi.n 8003b38 + 8003ab4: a201 add r2, pc, #4 ; (adr r2, 8003abc ) + 8003ab6: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8003aba: bf00 nop + 8003abc: 08003af1 .word 0x08003af1 + 8003ac0: 08003b39 .word 0x08003b39 + 8003ac4: 08003b39 .word 0x08003b39 + 8003ac8: 08003b39 .word 0x08003b39 + 8003acc: 08003b03 .word 0x08003b03 + 8003ad0: 08003b39 .word 0x08003b39 + 8003ad4: 08003b39 .word 0x08003b39 + 8003ad8: 08003b39 .word 0x08003b39 + 8003adc: 08003b15 .word 0x08003b15 + 8003ae0: 08003b39 .word 0x08003b39 + 8003ae4: 08003b39 .word 0x08003b39 + 8003ae8: 08003b39 .word 0x08003b39 + 8003aec: 08003b27 .word 0x08003b27 + { + case TIM_CHANNEL_1: + { + /* Enable the TIM Capture/Compare 1 interrupt */ + __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC1); + 8003af0: 687b ldr r3, [r7, #4] + 8003af2: 681b ldr r3, [r3, #0] + 8003af4: 68da ldr r2, [r3, #12] + 8003af6: 687b ldr r3, [r7, #4] + 8003af8: 681b ldr r3, [r3, #0] + 8003afa: f042 0202 orr.w r2, r2, #2 + 8003afe: 60da str r2, [r3, #12] + break; + 8003b00: e01d b.n 8003b3e + } + + case TIM_CHANNEL_2: + { + /* Enable the TIM Capture/Compare 2 interrupt */ + __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC2); + 8003b02: 687b ldr r3, [r7, #4] + 8003b04: 681b ldr r3, [r3, #0] + 8003b06: 68da ldr r2, [r3, #12] + 8003b08: 687b ldr r3, [r7, #4] + 8003b0a: 681b ldr r3, [r3, #0] + 8003b0c: f042 0204 orr.w r2, r2, #4 + 8003b10: 60da str r2, [r3, #12] + break; + 8003b12: e014 b.n 8003b3e + } + + case TIM_CHANNEL_3: + { + /* Enable the TIM Capture/Compare 3 interrupt */ + __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC3); + 8003b14: 687b ldr r3, [r7, #4] + 8003b16: 681b ldr r3, [r3, #0] + 8003b18: 68da ldr r2, [r3, #12] + 8003b1a: 687b ldr r3, [r7, #4] + 8003b1c: 681b ldr r3, [r3, #0] + 8003b1e: f042 0208 orr.w r2, r2, #8 + 8003b22: 60da str r2, [r3, #12] + break; + 8003b24: e00b b.n 8003b3e + } + + case TIM_CHANNEL_4: + { + /* Enable the TIM Capture/Compare 4 interrupt */ + __HAL_TIM_ENABLE_IT(htim, TIM_IT_CC4); + 8003b26: 687b ldr r3, [r7, #4] + 8003b28: 681b ldr r3, [r3, #0] + 8003b2a: 68da ldr r2, [r3, #12] + 8003b2c: 687b ldr r3, [r7, #4] + 8003b2e: 681b ldr r3, [r3, #0] + 8003b30: f042 0210 orr.w r2, r2, #16 + 8003b34: 60da str r2, [r3, #12] + break; + 8003b36: e002 b.n 8003b3e + } + + default: + status = HAL_ERROR; + 8003b38: 2301 movs r3, #1 + 8003b3a: 73fb strb r3, [r7, #15] + break; + 8003b3c: bf00 nop + } + + if (status == HAL_OK) + 8003b3e: 7bfb ldrb r3, [r7, #15] + 8003b40: 2b00 cmp r3, #0 + 8003b42: d15f bne.n 8003c04 + { + /* Enable the Capture compare channel */ + TIM_CCxChannelCmd(htim->Instance, Channel, TIM_CCx_ENABLE); + 8003b44: 687b ldr r3, [r7, #4] + 8003b46: 681b ldr r3, [r3, #0] + 8003b48: 2201 movs r2, #1 + 8003b4a: 6839 ldr r1, [r7, #0] + 8003b4c: 4618 mov r0, r3 + 8003b4e: f000 fe0b bl 8004768 + + if (IS_TIM_BREAK_INSTANCE(htim->Instance) != RESET) + 8003b52: 687b ldr r3, [r7, #4] + 8003b54: 681b ldr r3, [r3, #0] + 8003b56: 4a2e ldr r2, [pc, #184] ; (8003c10 ) + 8003b58: 4293 cmp r3, r2 + 8003b5a: d004 beq.n 8003b66 + 8003b5c: 687b ldr r3, [r7, #4] + 8003b5e: 681b ldr r3, [r3, #0] + 8003b60: 4a2c ldr r2, [pc, #176] ; (8003c14 ) + 8003b62: 4293 cmp r3, r2 + 8003b64: d101 bne.n 8003b6a + 8003b66: 2301 movs r3, #1 + 8003b68: e000 b.n 8003b6c + 8003b6a: 2300 movs r3, #0 + 8003b6c: 2b00 cmp r3, #0 + 8003b6e: d007 beq.n 8003b80 + { + /* Enable the main output */ + __HAL_TIM_MOE_ENABLE(htim); + 8003b70: 687b ldr r3, [r7, #4] + 8003b72: 681b ldr r3, [r3, #0] + 8003b74: 6c5a ldr r2, [r3, #68] ; 0x44 + 8003b76: 687b ldr r3, [r7, #4] + 8003b78: 681b ldr r3, [r3, #0] + 8003b7a: f442 4200 orr.w r2, r2, #32768 ; 0x8000 + 8003b7e: 645a str r2, [r3, #68] ; 0x44 + } + + /* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */ + if (IS_TIM_SLAVE_INSTANCE(htim->Instance)) + 8003b80: 687b ldr r3, [r7, #4] + 8003b82: 681b ldr r3, [r3, #0] + 8003b84: 4a22 ldr r2, [pc, #136] ; (8003c10 ) + 8003b86: 4293 cmp r3, r2 + 8003b88: d022 beq.n 8003bd0 + 8003b8a: 687b ldr r3, [r7, #4] + 8003b8c: 681b ldr r3, [r3, #0] + 8003b8e: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 + 8003b92: d01d beq.n 8003bd0 + 8003b94: 687b ldr r3, [r7, #4] + 8003b96: 681b ldr r3, [r3, #0] + 8003b98: 4a1f ldr r2, [pc, #124] ; (8003c18 ) + 8003b9a: 4293 cmp r3, r2 + 8003b9c: d018 beq.n 8003bd0 + 8003b9e: 687b ldr r3, [r7, #4] + 8003ba0: 681b ldr r3, [r3, #0] + 8003ba2: 4a1e ldr r2, [pc, #120] ; (8003c1c ) + 8003ba4: 4293 cmp r3, r2 + 8003ba6: d013 beq.n 8003bd0 + 8003ba8: 687b ldr r3, [r7, #4] + 8003baa: 681b ldr r3, [r3, #0] + 8003bac: 4a1c ldr r2, [pc, #112] ; (8003c20 ) + 8003bae: 4293 cmp r3, r2 + 8003bb0: d00e beq.n 8003bd0 + 8003bb2: 687b ldr r3, [r7, #4] + 8003bb4: 681b ldr r3, [r3, #0] + 8003bb6: 4a17 ldr r2, [pc, #92] ; (8003c14 ) + 8003bb8: 4293 cmp r3, r2 + 8003bba: d009 beq.n 8003bd0 + 8003bbc: 687b ldr r3, [r7, #4] + 8003bbe: 681b ldr r3, [r3, #0] + 8003bc0: 4a18 ldr r2, [pc, #96] ; (8003c24 ) + 8003bc2: 4293 cmp r3, r2 + 8003bc4: d004 beq.n 8003bd0 + 8003bc6: 687b ldr r3, [r7, #4] + 8003bc8: 681b ldr r3, [r3, #0] + 8003bca: 4a17 ldr r2, [pc, #92] ; (8003c28 ) + 8003bcc: 4293 cmp r3, r2 + 8003bce: d111 bne.n 8003bf4 + { + tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS; + 8003bd0: 687b ldr r3, [r7, #4] + 8003bd2: 681b ldr r3, [r3, #0] + 8003bd4: 689b ldr r3, [r3, #8] + 8003bd6: f003 0307 and.w r3, r3, #7 + 8003bda: 60bb str r3, [r7, #8] + if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) + 8003bdc: 68bb ldr r3, [r7, #8] + 8003bde: 2b06 cmp r3, #6 + 8003be0: d010 beq.n 8003c04 + { + __HAL_TIM_ENABLE(htim); + 8003be2: 687b ldr r3, [r7, #4] + 8003be4: 681b ldr r3, [r3, #0] + 8003be6: 681a ldr r2, [r3, #0] + 8003be8: 687b ldr r3, [r7, #4] + 8003bea: 681b ldr r3, [r3, #0] + 8003bec: f042 0201 orr.w r2, r2, #1 + 8003bf0: 601a str r2, [r3, #0] + if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) + 8003bf2: e007 b.n 8003c04 + } + } + else + { + __HAL_TIM_ENABLE(htim); + 8003bf4: 687b ldr r3, [r7, #4] + 8003bf6: 681b ldr r3, [r3, #0] + 8003bf8: 681a ldr r2, [r3, #0] + 8003bfa: 687b ldr r3, [r7, #4] + 8003bfc: 681b ldr r3, [r3, #0] + 8003bfe: f042 0201 orr.w r2, r2, #1 + 8003c02: 601a str r2, [r3, #0] + } + } + + /* Return function status */ + return status; + 8003c04: 7bfb ldrb r3, [r7, #15] +} + 8003c06: 4618 mov r0, r3 + 8003c08: 3710 adds r7, #16 + 8003c0a: 46bd mov sp, r7 + 8003c0c: bd80 pop {r7, pc} + 8003c0e: bf00 nop + 8003c10: 40010000 .word 0x40010000 + 8003c14: 40010400 .word 0x40010400 + 8003c18: 40000400 .word 0x40000400 + 8003c1c: 40000800 .word 0x40000800 + 8003c20: 40000c00 .word 0x40000c00 + 8003c24: 40014000 .word 0x40014000 + 8003c28: 40001800 .word 0x40001800 + +08003c2c : + * @brief This function handles TIM interrupts requests. + * @param htim TIM handle + * @retval None + */ +void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim) +{ + 8003c2c: b580 push {r7, lr} + 8003c2e: b082 sub sp, #8 + 8003c30: af00 add r7, sp, #0 + 8003c32: 6078 str r0, [r7, #4] + /* Capture compare 1 event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET) + 8003c34: 687b ldr r3, [r7, #4] + 8003c36: 681b ldr r3, [r3, #0] + 8003c38: 691b ldr r3, [r3, #16] + 8003c3a: f003 0302 and.w r3, r3, #2 + 8003c3e: 2b02 cmp r3, #2 + 8003c40: d122 bne.n 8003c88 + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET) + 8003c42: 687b ldr r3, [r7, #4] + 8003c44: 681b ldr r3, [r3, #0] + 8003c46: 68db ldr r3, [r3, #12] + 8003c48: f003 0302 and.w r3, r3, #2 + 8003c4c: 2b02 cmp r3, #2 + 8003c4e: d11b bne.n 8003c88 + { + { + __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1); + 8003c50: 687b ldr r3, [r7, #4] + 8003c52: 681b ldr r3, [r3, #0] + 8003c54: f06f 0202 mvn.w r2, #2 + 8003c58: 611a str r2, [r3, #16] + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; + 8003c5a: 687b ldr r3, [r7, #4] + 8003c5c: 2201 movs r2, #1 + 8003c5e: 771a strb r2, [r3, #28] + + /* Input capture event */ + if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U) + 8003c60: 687b ldr r3, [r7, #4] + 8003c62: 681b ldr r3, [r3, #0] + 8003c64: 699b ldr r3, [r3, #24] + 8003c66: f003 0303 and.w r3, r3, #3 + 8003c6a: 2b00 cmp r3, #0 + 8003c6c: d003 beq.n 8003c76 + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->IC_CaptureCallback(htim); +#else + HAL_TIM_IC_CaptureCallback(htim); + 8003c6e: 6878 ldr r0, [r7, #4] + 8003c70: f000 fa7f bl 8004172 + 8003c74: e005 b.n 8003c82 + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->OC_DelayElapsedCallback(htim); + htim->PWM_PulseFinishedCallback(htim); +#else + HAL_TIM_OC_DelayElapsedCallback(htim); + 8003c76: 6878 ldr r0, [r7, #4] + 8003c78: f000 fa72 bl 8004160 + HAL_TIM_PWM_PulseFinishedCallback(htim); + 8003c7c: 6878 ldr r0, [r7, #4] + 8003c7e: f000 fa81 bl 8004184 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; + 8003c82: 687b ldr r3, [r7, #4] + 8003c84: 2200 movs r2, #0 + 8003c86: 771a strb r2, [r3, #28] + } + } + } + /* Capture compare 2 event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET) + 8003c88: 687b ldr r3, [r7, #4] + 8003c8a: 681b ldr r3, [r3, #0] + 8003c8c: 691b ldr r3, [r3, #16] + 8003c8e: f003 0304 and.w r3, r3, #4 + 8003c92: 2b04 cmp r3, #4 + 8003c94: d122 bne.n 8003cdc + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET) + 8003c96: 687b ldr r3, [r7, #4] + 8003c98: 681b ldr r3, [r3, #0] + 8003c9a: 68db ldr r3, [r3, #12] + 8003c9c: f003 0304 and.w r3, r3, #4 + 8003ca0: 2b04 cmp r3, #4 + 8003ca2: d11b bne.n 8003cdc + { + __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2); + 8003ca4: 687b ldr r3, [r7, #4] + 8003ca6: 681b ldr r3, [r3, #0] + 8003ca8: f06f 0204 mvn.w r2, #4 + 8003cac: 611a str r2, [r3, #16] + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; + 8003cae: 687b ldr r3, [r7, #4] + 8003cb0: 2202 movs r2, #2 + 8003cb2: 771a strb r2, [r3, #28] + /* Input capture event */ + if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U) + 8003cb4: 687b ldr r3, [r7, #4] + 8003cb6: 681b ldr r3, [r3, #0] + 8003cb8: 699b ldr r3, [r3, #24] + 8003cba: f403 7340 and.w r3, r3, #768 ; 0x300 + 8003cbe: 2b00 cmp r3, #0 + 8003cc0: d003 beq.n 8003cca + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->IC_CaptureCallback(htim); +#else + HAL_TIM_IC_CaptureCallback(htim); + 8003cc2: 6878 ldr r0, [r7, #4] + 8003cc4: f000 fa55 bl 8004172 + 8003cc8: e005 b.n 8003cd6 + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->OC_DelayElapsedCallback(htim); + htim->PWM_PulseFinishedCallback(htim); +#else + HAL_TIM_OC_DelayElapsedCallback(htim); + 8003cca: 6878 ldr r0, [r7, #4] + 8003ccc: f000 fa48 bl 8004160 + HAL_TIM_PWM_PulseFinishedCallback(htim); + 8003cd0: 6878 ldr r0, [r7, #4] + 8003cd2: f000 fa57 bl 8004184 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; + 8003cd6: 687b ldr r3, [r7, #4] + 8003cd8: 2200 movs r2, #0 + 8003cda: 771a strb r2, [r3, #28] + } + } + /* Capture compare 3 event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET) + 8003cdc: 687b ldr r3, [r7, #4] + 8003cde: 681b ldr r3, [r3, #0] + 8003ce0: 691b ldr r3, [r3, #16] + 8003ce2: f003 0308 and.w r3, r3, #8 + 8003ce6: 2b08 cmp r3, #8 + 8003ce8: d122 bne.n 8003d30 + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET) + 8003cea: 687b ldr r3, [r7, #4] + 8003cec: 681b ldr r3, [r3, #0] + 8003cee: 68db ldr r3, [r3, #12] + 8003cf0: f003 0308 and.w r3, r3, #8 + 8003cf4: 2b08 cmp r3, #8 + 8003cf6: d11b bne.n 8003d30 + { + __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3); + 8003cf8: 687b ldr r3, [r7, #4] + 8003cfa: 681b ldr r3, [r3, #0] + 8003cfc: f06f 0208 mvn.w r2, #8 + 8003d00: 611a str r2, [r3, #16] + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; + 8003d02: 687b ldr r3, [r7, #4] + 8003d04: 2204 movs r2, #4 + 8003d06: 771a strb r2, [r3, #28] + /* Input capture event */ + if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U) + 8003d08: 687b ldr r3, [r7, #4] + 8003d0a: 681b ldr r3, [r3, #0] + 8003d0c: 69db ldr r3, [r3, #28] + 8003d0e: f003 0303 and.w r3, r3, #3 + 8003d12: 2b00 cmp r3, #0 + 8003d14: d003 beq.n 8003d1e + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->IC_CaptureCallback(htim); +#else + HAL_TIM_IC_CaptureCallback(htim); + 8003d16: 6878 ldr r0, [r7, #4] + 8003d18: f000 fa2b bl 8004172 + 8003d1c: e005 b.n 8003d2a + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->OC_DelayElapsedCallback(htim); + htim->PWM_PulseFinishedCallback(htim); +#else + HAL_TIM_OC_DelayElapsedCallback(htim); + 8003d1e: 6878 ldr r0, [r7, #4] + 8003d20: f000 fa1e bl 8004160 + HAL_TIM_PWM_PulseFinishedCallback(htim); + 8003d24: 6878 ldr r0, [r7, #4] + 8003d26: f000 fa2d bl 8004184 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; + 8003d2a: 687b ldr r3, [r7, #4] + 8003d2c: 2200 movs r2, #0 + 8003d2e: 771a strb r2, [r3, #28] + } + } + /* Capture compare 4 event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET) + 8003d30: 687b ldr r3, [r7, #4] + 8003d32: 681b ldr r3, [r3, #0] + 8003d34: 691b ldr r3, [r3, #16] + 8003d36: f003 0310 and.w r3, r3, #16 + 8003d3a: 2b10 cmp r3, #16 + 8003d3c: d122 bne.n 8003d84 + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET) + 8003d3e: 687b ldr r3, [r7, #4] + 8003d40: 681b ldr r3, [r3, #0] + 8003d42: 68db ldr r3, [r3, #12] + 8003d44: f003 0310 and.w r3, r3, #16 + 8003d48: 2b10 cmp r3, #16 + 8003d4a: d11b bne.n 8003d84 + { + __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4); + 8003d4c: 687b ldr r3, [r7, #4] + 8003d4e: 681b ldr r3, [r3, #0] + 8003d50: f06f 0210 mvn.w r2, #16 + 8003d54: 611a str r2, [r3, #16] + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; + 8003d56: 687b ldr r3, [r7, #4] + 8003d58: 2208 movs r2, #8 + 8003d5a: 771a strb r2, [r3, #28] + /* Input capture event */ + if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U) + 8003d5c: 687b ldr r3, [r7, #4] + 8003d5e: 681b ldr r3, [r3, #0] + 8003d60: 69db ldr r3, [r3, #28] + 8003d62: f403 7340 and.w r3, r3, #768 ; 0x300 + 8003d66: 2b00 cmp r3, #0 + 8003d68: d003 beq.n 8003d72 + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->IC_CaptureCallback(htim); +#else + HAL_TIM_IC_CaptureCallback(htim); + 8003d6a: 6878 ldr r0, [r7, #4] + 8003d6c: f000 fa01 bl 8004172 + 8003d70: e005 b.n 8003d7e + { +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->OC_DelayElapsedCallback(htim); + htim->PWM_PulseFinishedCallback(htim); +#else + HAL_TIM_OC_DelayElapsedCallback(htim); + 8003d72: 6878 ldr r0, [r7, #4] + 8003d74: f000 f9f4 bl 8004160 + HAL_TIM_PWM_PulseFinishedCallback(htim); + 8003d78: 6878 ldr r0, [r7, #4] + 8003d7a: f000 fa03 bl 8004184 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; + 8003d7e: 687b ldr r3, [r7, #4] + 8003d80: 2200 movs r2, #0 + 8003d82: 771a strb r2, [r3, #28] + } + } + /* TIM Update event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET) + 8003d84: 687b ldr r3, [r7, #4] + 8003d86: 681b ldr r3, [r3, #0] + 8003d88: 691b ldr r3, [r3, #16] + 8003d8a: f003 0301 and.w r3, r3, #1 + 8003d8e: 2b01 cmp r3, #1 + 8003d90: d10e bne.n 8003db0 + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET) + 8003d92: 687b ldr r3, [r7, #4] + 8003d94: 681b ldr r3, [r3, #0] + 8003d96: 68db ldr r3, [r3, #12] + 8003d98: f003 0301 and.w r3, r3, #1 + 8003d9c: 2b01 cmp r3, #1 + 8003d9e: d107 bne.n 8003db0 + { + __HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE); + 8003da0: 687b ldr r3, [r7, #4] + 8003da2: 681b ldr r3, [r3, #0] + 8003da4: f06f 0201 mvn.w r2, #1 + 8003da8: 611a str r2, [r3, #16] +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->PeriodElapsedCallback(htim); +#else + HAL_TIM_PeriodElapsedCallback(htim); + 8003daa: 6878 ldr r0, [r7, #4] + 8003dac: f000 f9cf bl 800414e +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + } + /* TIM Break input event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET) + 8003db0: 687b ldr r3, [r7, #4] + 8003db2: 681b ldr r3, [r3, #0] + 8003db4: 691b ldr r3, [r3, #16] + 8003db6: f003 0380 and.w r3, r3, #128 ; 0x80 + 8003dba: 2b80 cmp r3, #128 ; 0x80 + 8003dbc: d10e bne.n 8003ddc + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET) + 8003dbe: 687b ldr r3, [r7, #4] + 8003dc0: 681b ldr r3, [r3, #0] + 8003dc2: 68db ldr r3, [r3, #12] + 8003dc4: f003 0380 and.w r3, r3, #128 ; 0x80 + 8003dc8: 2b80 cmp r3, #128 ; 0x80 + 8003dca: d107 bne.n 8003ddc + { + __HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK); + 8003dcc: 687b ldr r3, [r7, #4] + 8003dce: 681b ldr r3, [r3, #0] + 8003dd0: f06f 0280 mvn.w r2, #128 ; 0x80 + 8003dd4: 611a str r2, [r3, #16] +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->BreakCallback(htim); +#else + HAL_TIMEx_BreakCallback(htim); + 8003dd6: 6878 ldr r0, [r7, #4] + 8003dd8: f000 fdbe bl 8004958 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + } + /* TIM Trigger detection event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET) + 8003ddc: 687b ldr r3, [r7, #4] + 8003dde: 681b ldr r3, [r3, #0] + 8003de0: 691b ldr r3, [r3, #16] + 8003de2: f003 0340 and.w r3, r3, #64 ; 0x40 + 8003de6: 2b40 cmp r3, #64 ; 0x40 + 8003de8: d10e bne.n 8003e08 + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET) + 8003dea: 687b ldr r3, [r7, #4] + 8003dec: 681b ldr r3, [r3, #0] + 8003dee: 68db ldr r3, [r3, #12] + 8003df0: f003 0340 and.w r3, r3, #64 ; 0x40 + 8003df4: 2b40 cmp r3, #64 ; 0x40 + 8003df6: d107 bne.n 8003e08 + { + __HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER); + 8003df8: 687b ldr r3, [r7, #4] + 8003dfa: 681b ldr r3, [r3, #0] + 8003dfc: f06f 0240 mvn.w r2, #64 ; 0x40 + 8003e00: 611a str r2, [r3, #16] +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->TriggerCallback(htim); +#else + HAL_TIM_TriggerCallback(htim); + 8003e02: 6878 ldr r0, [r7, #4] + 8003e04: f000 f9c7 bl 8004196 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + } + /* TIM commutation event */ + if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET) + 8003e08: 687b ldr r3, [r7, #4] + 8003e0a: 681b ldr r3, [r3, #0] + 8003e0c: 691b ldr r3, [r3, #16] + 8003e0e: f003 0320 and.w r3, r3, #32 + 8003e12: 2b20 cmp r3, #32 + 8003e14: d10e bne.n 8003e34 + { + if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET) + 8003e16: 687b ldr r3, [r7, #4] + 8003e18: 681b ldr r3, [r3, #0] + 8003e1a: 68db ldr r3, [r3, #12] + 8003e1c: f003 0320 and.w r3, r3, #32 + 8003e20: 2b20 cmp r3, #32 + 8003e22: d107 bne.n 8003e34 + { + __HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM); + 8003e24: 687b ldr r3, [r7, #4] + 8003e26: 681b ldr r3, [r3, #0] + 8003e28: f06f 0220 mvn.w r2, #32 + 8003e2c: 611a str r2, [r3, #16] +#if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) + htim->CommutationCallback(htim); +#else + HAL_TIMEx_CommutCallback(htim); + 8003e2e: 6878 ldr r0, [r7, #4] + 8003e30: f000 fd89 bl 8004946 +#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ + } + } +} + 8003e34: bf00 nop + 8003e36: 3708 adds r7, #8 + 8003e38: 46bd mov sp, r7 + 8003e3a: bd80 pop {r7, pc} + +08003e3c : + * @retval HAL status + */ +HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, + const TIM_OC_InitTypeDef *sConfig, + uint32_t Channel) +{ + 8003e3c: b580 push {r7, lr} + 8003e3e: b086 sub sp, #24 + 8003e40: af00 add r7, sp, #0 + 8003e42: 60f8 str r0, [r7, #12] + 8003e44: 60b9 str r1, [r7, #8] + 8003e46: 607a str r2, [r7, #4] + HAL_StatusTypeDef status = HAL_OK; + 8003e48: 2300 movs r3, #0 + 8003e4a: 75fb strb r3, [r7, #23] + assert_param(IS_TIM_PWM_MODE(sConfig->OCMode)); + assert_param(IS_TIM_OC_POLARITY(sConfig->OCPolarity)); + assert_param(IS_TIM_FAST_STATE(sConfig->OCFastMode)); + + /* Process Locked */ + __HAL_LOCK(htim); + 8003e4c: 68fb ldr r3, [r7, #12] + 8003e4e: f893 303c ldrb.w r3, [r3, #60] ; 0x3c + 8003e52: 2b01 cmp r3, #1 + 8003e54: d101 bne.n 8003e5a + 8003e56: 2302 movs r3, #2 + 8003e58: e0ae b.n 8003fb8 + 8003e5a: 68fb ldr r3, [r7, #12] + 8003e5c: 2201 movs r2, #1 + 8003e5e: f883 203c strb.w r2, [r3, #60] ; 0x3c + + switch (Channel) + 8003e62: 687b ldr r3, [r7, #4] + 8003e64: 2b0c cmp r3, #12 + 8003e66: f200 809f bhi.w 8003fa8 + 8003e6a: a201 add r2, pc, #4 ; (adr r2, 8003e70 ) + 8003e6c: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8003e70: 08003ea5 .word 0x08003ea5 + 8003e74: 08003fa9 .word 0x08003fa9 + 8003e78: 08003fa9 .word 0x08003fa9 + 8003e7c: 08003fa9 .word 0x08003fa9 + 8003e80: 08003ee5 .word 0x08003ee5 + 8003e84: 08003fa9 .word 0x08003fa9 + 8003e88: 08003fa9 .word 0x08003fa9 + 8003e8c: 08003fa9 .word 0x08003fa9 + 8003e90: 08003f27 .word 0x08003f27 + 8003e94: 08003fa9 .word 0x08003fa9 + 8003e98: 08003fa9 .word 0x08003fa9 + 8003e9c: 08003fa9 .word 0x08003fa9 + 8003ea0: 08003f67 .word 0x08003f67 + { + /* Check the parameters */ + assert_param(IS_TIM_CC1_INSTANCE(htim->Instance)); + + /* Configure the Channel 1 in PWM mode */ + TIM_OC1_SetConfig(htim->Instance, sConfig); + 8003ea4: 68fb ldr r3, [r7, #12] + 8003ea6: 681b ldr r3, [r3, #0] + 8003ea8: 68b9 ldr r1, [r7, #8] + 8003eaa: 4618 mov r0, r3 + 8003eac: f000 fa1a bl 80042e4 + + /* Set the Preload enable bit for channel1 */ + htim->Instance->CCMR1 |= TIM_CCMR1_OC1PE; + 8003eb0: 68fb ldr r3, [r7, #12] + 8003eb2: 681b ldr r3, [r3, #0] + 8003eb4: 699a ldr r2, [r3, #24] + 8003eb6: 68fb ldr r3, [r7, #12] + 8003eb8: 681b ldr r3, [r3, #0] + 8003eba: f042 0208 orr.w r2, r2, #8 + 8003ebe: 619a str r2, [r3, #24] + + /* Configure the Output Fast mode */ + htim->Instance->CCMR1 &= ~TIM_CCMR1_OC1FE; + 8003ec0: 68fb ldr r3, [r7, #12] + 8003ec2: 681b ldr r3, [r3, #0] + 8003ec4: 699a ldr r2, [r3, #24] + 8003ec6: 68fb ldr r3, [r7, #12] + 8003ec8: 681b ldr r3, [r3, #0] + 8003eca: f022 0204 bic.w r2, r2, #4 + 8003ece: 619a str r2, [r3, #24] + htim->Instance->CCMR1 |= sConfig->OCFastMode; + 8003ed0: 68fb ldr r3, [r7, #12] + 8003ed2: 681b ldr r3, [r3, #0] + 8003ed4: 6999 ldr r1, [r3, #24] + 8003ed6: 68bb ldr r3, [r7, #8] + 8003ed8: 691a ldr r2, [r3, #16] + 8003eda: 68fb ldr r3, [r7, #12] + 8003edc: 681b ldr r3, [r3, #0] + 8003ede: 430a orrs r2, r1 + 8003ee0: 619a str r2, [r3, #24] + break; + 8003ee2: e064 b.n 8003fae + { + /* Check the parameters */ + assert_param(IS_TIM_CC2_INSTANCE(htim->Instance)); + + /* Configure the Channel 2 in PWM mode */ + TIM_OC2_SetConfig(htim->Instance, sConfig); + 8003ee4: 68fb ldr r3, [r7, #12] + 8003ee6: 681b ldr r3, [r3, #0] + 8003ee8: 68b9 ldr r1, [r7, #8] + 8003eea: 4618 mov r0, r3 + 8003eec: f000 fa6a bl 80043c4 + + /* Set the Preload enable bit for channel2 */ + htim->Instance->CCMR1 |= TIM_CCMR1_OC2PE; + 8003ef0: 68fb ldr r3, [r7, #12] + 8003ef2: 681b ldr r3, [r3, #0] + 8003ef4: 699a ldr r2, [r3, #24] + 8003ef6: 68fb ldr r3, [r7, #12] + 8003ef8: 681b ldr r3, [r3, #0] + 8003efa: f442 6200 orr.w r2, r2, #2048 ; 0x800 + 8003efe: 619a str r2, [r3, #24] + + /* Configure the Output Fast mode */ + htim->Instance->CCMR1 &= ~TIM_CCMR1_OC2FE; + 8003f00: 68fb ldr r3, [r7, #12] + 8003f02: 681b ldr r3, [r3, #0] + 8003f04: 699a ldr r2, [r3, #24] + 8003f06: 68fb ldr r3, [r7, #12] + 8003f08: 681b ldr r3, [r3, #0] + 8003f0a: f422 6280 bic.w r2, r2, #1024 ; 0x400 + 8003f0e: 619a str r2, [r3, #24] + htim->Instance->CCMR1 |= sConfig->OCFastMode << 8U; + 8003f10: 68fb ldr r3, [r7, #12] + 8003f12: 681b ldr r3, [r3, #0] + 8003f14: 6999 ldr r1, [r3, #24] + 8003f16: 68bb ldr r3, [r7, #8] + 8003f18: 691b ldr r3, [r3, #16] + 8003f1a: 021a lsls r2, r3, #8 + 8003f1c: 68fb ldr r3, [r7, #12] + 8003f1e: 681b ldr r3, [r3, #0] + 8003f20: 430a orrs r2, r1 + 8003f22: 619a str r2, [r3, #24] + break; + 8003f24: e043 b.n 8003fae + { + /* Check the parameters */ + assert_param(IS_TIM_CC3_INSTANCE(htim->Instance)); + + /* Configure the Channel 3 in PWM mode */ + TIM_OC3_SetConfig(htim->Instance, sConfig); + 8003f26: 68fb ldr r3, [r7, #12] + 8003f28: 681b ldr r3, [r3, #0] + 8003f2a: 68b9 ldr r1, [r7, #8] + 8003f2c: 4618 mov r0, r3 + 8003f2e: f000 fabd bl 80044ac + + /* Set the Preload enable bit for channel3 */ + htim->Instance->CCMR2 |= TIM_CCMR2_OC3PE; + 8003f32: 68fb ldr r3, [r7, #12] + 8003f34: 681b ldr r3, [r3, #0] + 8003f36: 69da ldr r2, [r3, #28] + 8003f38: 68fb ldr r3, [r7, #12] + 8003f3a: 681b ldr r3, [r3, #0] + 8003f3c: f042 0208 orr.w r2, r2, #8 + 8003f40: 61da str r2, [r3, #28] + + /* Configure the Output Fast mode */ + htim->Instance->CCMR2 &= ~TIM_CCMR2_OC3FE; + 8003f42: 68fb ldr r3, [r7, #12] + 8003f44: 681b ldr r3, [r3, #0] + 8003f46: 69da ldr r2, [r3, #28] + 8003f48: 68fb ldr r3, [r7, #12] + 8003f4a: 681b ldr r3, [r3, #0] + 8003f4c: f022 0204 bic.w r2, r2, #4 + 8003f50: 61da str r2, [r3, #28] + htim->Instance->CCMR2 |= sConfig->OCFastMode; + 8003f52: 68fb ldr r3, [r7, #12] + 8003f54: 681b ldr r3, [r3, #0] + 8003f56: 69d9 ldr r1, [r3, #28] + 8003f58: 68bb ldr r3, [r7, #8] + 8003f5a: 691a ldr r2, [r3, #16] + 8003f5c: 68fb ldr r3, [r7, #12] + 8003f5e: 681b ldr r3, [r3, #0] + 8003f60: 430a orrs r2, r1 + 8003f62: 61da str r2, [r3, #28] + break; + 8003f64: e023 b.n 8003fae + { + /* Check the parameters */ + assert_param(IS_TIM_CC4_INSTANCE(htim->Instance)); + + /* Configure the Channel 4 in PWM mode */ + TIM_OC4_SetConfig(htim->Instance, sConfig); + 8003f66: 68fb ldr r3, [r7, #12] + 8003f68: 681b ldr r3, [r3, #0] + 8003f6a: 68b9 ldr r1, [r7, #8] + 8003f6c: 4618 mov r0, r3 + 8003f6e: f000 fb11 bl 8004594 + + /* Set the Preload enable bit for channel4 */ + htim->Instance->CCMR2 |= TIM_CCMR2_OC4PE; + 8003f72: 68fb ldr r3, [r7, #12] + 8003f74: 681b ldr r3, [r3, #0] + 8003f76: 69da ldr r2, [r3, #28] + 8003f78: 68fb ldr r3, [r7, #12] + 8003f7a: 681b ldr r3, [r3, #0] + 8003f7c: f442 6200 orr.w r2, r2, #2048 ; 0x800 + 8003f80: 61da str r2, [r3, #28] + + /* Configure the Output Fast mode */ + htim->Instance->CCMR2 &= ~TIM_CCMR2_OC4FE; + 8003f82: 68fb ldr r3, [r7, #12] + 8003f84: 681b ldr r3, [r3, #0] + 8003f86: 69da ldr r2, [r3, #28] + 8003f88: 68fb ldr r3, [r7, #12] + 8003f8a: 681b ldr r3, [r3, #0] + 8003f8c: f422 6280 bic.w r2, r2, #1024 ; 0x400 + 8003f90: 61da str r2, [r3, #28] + htim->Instance->CCMR2 |= sConfig->OCFastMode << 8U; + 8003f92: 68fb ldr r3, [r7, #12] + 8003f94: 681b ldr r3, [r3, #0] + 8003f96: 69d9 ldr r1, [r3, #28] + 8003f98: 68bb ldr r3, [r7, #8] + 8003f9a: 691b ldr r3, [r3, #16] + 8003f9c: 021a lsls r2, r3, #8 + 8003f9e: 68fb ldr r3, [r7, #12] + 8003fa0: 681b ldr r3, [r3, #0] + 8003fa2: 430a orrs r2, r1 + 8003fa4: 61da str r2, [r3, #28] + break; + 8003fa6: e002 b.n 8003fae + } + + default: + status = HAL_ERROR; + 8003fa8: 2301 movs r3, #1 + 8003faa: 75fb strb r3, [r7, #23] + break; + 8003fac: bf00 nop + } + + __HAL_UNLOCK(htim); + 8003fae: 68fb ldr r3, [r7, #12] + 8003fb0: 2200 movs r2, #0 + 8003fb2: f883 203c strb.w r2, [r3, #60] ; 0x3c + + return status; + 8003fb6: 7dfb ldrb r3, [r7, #23] +} + 8003fb8: 4618 mov r0, r3 + 8003fba: 3718 adds r7, #24 + 8003fbc: 46bd mov sp, r7 + 8003fbe: bd80 pop {r7, pc} + +08003fc0 : + * @param sClockSourceConfig pointer to a TIM_ClockConfigTypeDef structure that + * contains the clock source information for the TIM peripheral. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, const TIM_ClockConfigTypeDef *sClockSourceConfig) +{ + 8003fc0: b580 push {r7, lr} + 8003fc2: b084 sub sp, #16 + 8003fc4: af00 add r7, sp, #0 + 8003fc6: 6078 str r0, [r7, #4] + 8003fc8: 6039 str r1, [r7, #0] + HAL_StatusTypeDef status = HAL_OK; + 8003fca: 2300 movs r3, #0 + 8003fcc: 73fb strb r3, [r7, #15] + uint32_t tmpsmcr; + + /* Process Locked */ + __HAL_LOCK(htim); + 8003fce: 687b ldr r3, [r7, #4] + 8003fd0: f893 303c ldrb.w r3, [r3, #60] ; 0x3c + 8003fd4: 2b01 cmp r3, #1 + 8003fd6: d101 bne.n 8003fdc + 8003fd8: 2302 movs r3, #2 + 8003fda: e0b4 b.n 8004146 + 8003fdc: 687b ldr r3, [r7, #4] + 8003fde: 2201 movs r2, #1 + 8003fe0: f883 203c strb.w r2, [r3, #60] ; 0x3c + + htim->State = HAL_TIM_STATE_BUSY; + 8003fe4: 687b ldr r3, [r7, #4] + 8003fe6: 2202 movs r2, #2 + 8003fe8: f883 203d strb.w r2, [r3, #61] ; 0x3d + + /* Check the parameters */ + assert_param(IS_TIM_CLOCKSOURCE(sClockSourceConfig->ClockSource)); + + /* Reset the SMS, TS, ECE, ETPS and ETRF bits */ + tmpsmcr = htim->Instance->SMCR; + 8003fec: 687b ldr r3, [r7, #4] + 8003fee: 681b ldr r3, [r3, #0] + 8003ff0: 689b ldr r3, [r3, #8] + 8003ff2: 60bb str r3, [r7, #8] + tmpsmcr &= ~(TIM_SMCR_SMS | TIM_SMCR_TS); + 8003ff4: 68bb ldr r3, [r7, #8] + 8003ff6: f023 0377 bic.w r3, r3, #119 ; 0x77 + 8003ffa: 60bb str r3, [r7, #8] + tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP); + 8003ffc: 68bb ldr r3, [r7, #8] + 8003ffe: f423 437f bic.w r3, r3, #65280 ; 0xff00 + 8004002: 60bb str r3, [r7, #8] + htim->Instance->SMCR = tmpsmcr; + 8004004: 687b ldr r3, [r7, #4] + 8004006: 681b ldr r3, [r3, #0] + 8004008: 68ba ldr r2, [r7, #8] + 800400a: 609a str r2, [r3, #8] + + switch (sClockSourceConfig->ClockSource) + 800400c: 683b ldr r3, [r7, #0] + 800400e: 681b ldr r3, [r3, #0] + 8004010: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 + 8004014: d03e beq.n 8004094 + 8004016: f5b3 5f00 cmp.w r3, #8192 ; 0x2000 + 800401a: f200 8087 bhi.w 800412c + 800401e: f5b3 5f80 cmp.w r3, #4096 ; 0x1000 + 8004022: f000 8086 beq.w 8004132 + 8004026: f5b3 5f80 cmp.w r3, #4096 ; 0x1000 + 800402a: d87f bhi.n 800412c + 800402c: 2b70 cmp r3, #112 ; 0x70 + 800402e: d01a beq.n 8004066 + 8004030: 2b70 cmp r3, #112 ; 0x70 + 8004032: d87b bhi.n 800412c + 8004034: 2b60 cmp r3, #96 ; 0x60 + 8004036: d050 beq.n 80040da + 8004038: 2b60 cmp r3, #96 ; 0x60 + 800403a: d877 bhi.n 800412c + 800403c: 2b50 cmp r3, #80 ; 0x50 + 800403e: d03c beq.n 80040ba + 8004040: 2b50 cmp r3, #80 ; 0x50 + 8004042: d873 bhi.n 800412c + 8004044: 2b40 cmp r3, #64 ; 0x40 + 8004046: d058 beq.n 80040fa + 8004048: 2b40 cmp r3, #64 ; 0x40 + 800404a: d86f bhi.n 800412c + 800404c: 2b30 cmp r3, #48 ; 0x30 + 800404e: d064 beq.n 800411a + 8004050: 2b30 cmp r3, #48 ; 0x30 + 8004052: d86b bhi.n 800412c + 8004054: 2b20 cmp r3, #32 + 8004056: d060 beq.n 800411a + 8004058: 2b20 cmp r3, #32 + 800405a: d867 bhi.n 800412c + 800405c: 2b00 cmp r3, #0 + 800405e: d05c beq.n 800411a + 8004060: 2b10 cmp r3, #16 + 8004062: d05a beq.n 800411a + 8004064: e062 b.n 800412c + assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler)); + assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); + assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); + + /* Configure the ETR Clock source */ + TIM_ETR_SetConfig(htim->Instance, + 8004066: 687b ldr r3, [r7, #4] + 8004068: 6818 ldr r0, [r3, #0] + sClockSourceConfig->ClockPrescaler, + 800406a: 683b ldr r3, [r7, #0] + 800406c: 6899 ldr r1, [r3, #8] + sClockSourceConfig->ClockPolarity, + 800406e: 683b ldr r3, [r7, #0] + 8004070: 685a ldr r2, [r3, #4] + sClockSourceConfig->ClockFilter); + 8004072: 683b ldr r3, [r7, #0] + 8004074: 68db ldr r3, [r3, #12] + TIM_ETR_SetConfig(htim->Instance, + 8004076: f000 fb58 bl 800472a + + /* Select the External clock mode1 and the ETRF trigger */ + tmpsmcr = htim->Instance->SMCR; + 800407a: 687b ldr r3, [r7, #4] + 800407c: 681b ldr r3, [r3, #0] + 800407e: 689b ldr r3, [r3, #8] + 8004080: 60bb str r3, [r7, #8] + tmpsmcr |= (TIM_SLAVEMODE_EXTERNAL1 | TIM_CLOCKSOURCE_ETRMODE1); + 8004082: 68bb ldr r3, [r7, #8] + 8004084: f043 0377 orr.w r3, r3, #119 ; 0x77 + 8004088: 60bb str r3, [r7, #8] + /* Write to TIMx SMCR */ + htim->Instance->SMCR = tmpsmcr; + 800408a: 687b ldr r3, [r7, #4] + 800408c: 681b ldr r3, [r3, #0] + 800408e: 68ba ldr r2, [r7, #8] + 8004090: 609a str r2, [r3, #8] + break; + 8004092: e04f b.n 8004134 + assert_param(IS_TIM_CLOCKPRESCALER(sClockSourceConfig->ClockPrescaler)); + assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); + assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); + + /* Configure the ETR Clock source */ + TIM_ETR_SetConfig(htim->Instance, + 8004094: 687b ldr r3, [r7, #4] + 8004096: 6818 ldr r0, [r3, #0] + sClockSourceConfig->ClockPrescaler, + 8004098: 683b ldr r3, [r7, #0] + 800409a: 6899 ldr r1, [r3, #8] + sClockSourceConfig->ClockPolarity, + 800409c: 683b ldr r3, [r7, #0] + 800409e: 685a ldr r2, [r3, #4] + sClockSourceConfig->ClockFilter); + 80040a0: 683b ldr r3, [r7, #0] + 80040a2: 68db ldr r3, [r3, #12] + TIM_ETR_SetConfig(htim->Instance, + 80040a4: f000 fb41 bl 800472a + /* Enable the External clock mode2 */ + htim->Instance->SMCR |= TIM_SMCR_ECE; + 80040a8: 687b ldr r3, [r7, #4] + 80040aa: 681b ldr r3, [r3, #0] + 80040ac: 689a ldr r2, [r3, #8] + 80040ae: 687b ldr r3, [r7, #4] + 80040b0: 681b ldr r3, [r3, #0] + 80040b2: f442 4280 orr.w r2, r2, #16384 ; 0x4000 + 80040b6: 609a str r2, [r3, #8] + break; + 80040b8: e03c b.n 8004134 + + /* Check TI1 input conditioning related parameters */ + assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); + assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); + + TIM_TI1_ConfigInputStage(htim->Instance, + 80040ba: 687b ldr r3, [r7, #4] + 80040bc: 6818 ldr r0, [r3, #0] + sClockSourceConfig->ClockPolarity, + 80040be: 683b ldr r3, [r7, #0] + 80040c0: 6859 ldr r1, [r3, #4] + sClockSourceConfig->ClockFilter); + 80040c2: 683b ldr r3, [r7, #0] + 80040c4: 68db ldr r3, [r3, #12] + TIM_TI1_ConfigInputStage(htim->Instance, + 80040c6: 461a mov r2, r3 + 80040c8: f000 fab8 bl 800463c + TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1); + 80040cc: 687b ldr r3, [r7, #4] + 80040ce: 681b ldr r3, [r3, #0] + 80040d0: 2150 movs r1, #80 ; 0x50 + 80040d2: 4618 mov r0, r3 + 80040d4: f000 fb0f bl 80046f6 + break; + 80040d8: e02c b.n 8004134 + + /* Check TI2 input conditioning related parameters */ + assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); + assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); + + TIM_TI2_ConfigInputStage(htim->Instance, + 80040da: 687b ldr r3, [r7, #4] + 80040dc: 6818 ldr r0, [r3, #0] + sClockSourceConfig->ClockPolarity, + 80040de: 683b ldr r3, [r7, #0] + 80040e0: 6859 ldr r1, [r3, #4] + sClockSourceConfig->ClockFilter); + 80040e2: 683b ldr r3, [r7, #0] + 80040e4: 68db ldr r3, [r3, #12] + TIM_TI2_ConfigInputStage(htim->Instance, + 80040e6: 461a mov r2, r3 + 80040e8: f000 fad6 bl 8004698 + TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI2); + 80040ec: 687b ldr r3, [r7, #4] + 80040ee: 681b ldr r3, [r3, #0] + 80040f0: 2160 movs r1, #96 ; 0x60 + 80040f2: 4618 mov r0, r3 + 80040f4: f000 faff bl 80046f6 + break; + 80040f8: e01c b.n 8004134 + + /* Check TI1 input conditioning related parameters */ + assert_param(IS_TIM_CLOCKPOLARITY(sClockSourceConfig->ClockPolarity)); + assert_param(IS_TIM_CLOCKFILTER(sClockSourceConfig->ClockFilter)); + + TIM_TI1_ConfigInputStage(htim->Instance, + 80040fa: 687b ldr r3, [r7, #4] + 80040fc: 6818 ldr r0, [r3, #0] + sClockSourceConfig->ClockPolarity, + 80040fe: 683b ldr r3, [r7, #0] + 8004100: 6859 ldr r1, [r3, #4] + sClockSourceConfig->ClockFilter); + 8004102: 683b ldr r3, [r7, #0] + 8004104: 68db ldr r3, [r3, #12] + TIM_TI1_ConfigInputStage(htim->Instance, + 8004106: 461a mov r2, r3 + 8004108: f000 fa98 bl 800463c + TIM_ITRx_SetConfig(htim->Instance, TIM_CLOCKSOURCE_TI1ED); + 800410c: 687b ldr r3, [r7, #4] + 800410e: 681b ldr r3, [r3, #0] + 8004110: 2140 movs r1, #64 ; 0x40 + 8004112: 4618 mov r0, r3 + 8004114: f000 faef bl 80046f6 + break; + 8004118: e00c b.n 8004134 + case TIM_CLOCKSOURCE_ITR3: + { + /* Check whether or not the timer instance supports internal trigger input */ + assert_param(IS_TIM_CLOCKSOURCE_ITRX_INSTANCE(htim->Instance)); + + TIM_ITRx_SetConfig(htim->Instance, sClockSourceConfig->ClockSource); + 800411a: 687b ldr r3, [r7, #4] + 800411c: 681a ldr r2, [r3, #0] + 800411e: 683b ldr r3, [r7, #0] + 8004120: 681b ldr r3, [r3, #0] + 8004122: 4619 mov r1, r3 + 8004124: 4610 mov r0, r2 + 8004126: f000 fae6 bl 80046f6 + break; + 800412a: e003 b.n 8004134 + } + + default: + status = HAL_ERROR; + 800412c: 2301 movs r3, #1 + 800412e: 73fb strb r3, [r7, #15] + break; + 8004130: e000 b.n 8004134 + break; + 8004132: bf00 nop + } + htim->State = HAL_TIM_STATE_READY; + 8004134: 687b ldr r3, [r7, #4] + 8004136: 2201 movs r2, #1 + 8004138: f883 203d strb.w r2, [r3, #61] ; 0x3d + + __HAL_UNLOCK(htim); + 800413c: 687b ldr r3, [r7, #4] + 800413e: 2200 movs r2, #0 + 8004140: f883 203c strb.w r2, [r3, #60] ; 0x3c + + return status; + 8004144: 7bfb ldrb r3, [r7, #15] +} + 8004146: 4618 mov r0, r3 + 8004148: 3710 adds r7, #16 + 800414a: 46bd mov sp, r7 + 800414c: bd80 pop {r7, pc} + +0800414e : + * @brief Period elapsed callback in non-blocking mode + * @param htim TIM handle + * @retval None + */ +__weak void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) +{ + 800414e: b480 push {r7} + 8004150: b083 sub sp, #12 + 8004152: af00 add r7, sp, #0 + 8004154: 6078 str r0, [r7, #4] + UNUSED(htim); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_TIM_PeriodElapsedCallback could be implemented in the user file + */ +} + 8004156: bf00 nop + 8004158: 370c adds r7, #12 + 800415a: 46bd mov sp, r7 + 800415c: bc80 pop {r7} + 800415e: 4770 bx lr + +08004160 : + * @brief Output Compare callback in non-blocking mode + * @param htim TIM OC handle + * @retval None + */ +__weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) +{ + 8004160: b480 push {r7} + 8004162: b083 sub sp, #12 + 8004164: af00 add r7, sp, #0 + 8004166: 6078 str r0, [r7, #4] + 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 + */ +} + 8004168: bf00 nop + 800416a: 370c adds r7, #12 + 800416c: 46bd mov sp, r7 + 800416e: bc80 pop {r7} + 8004170: 4770 bx lr + +08004172 : + * @brief Input Capture callback in non-blocking mode + * @param htim TIM IC handle + * @retval None + */ +__weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) +{ + 8004172: b480 push {r7} + 8004174: b083 sub sp, #12 + 8004176: af00 add r7, sp, #0 + 8004178: 6078 str r0, [r7, #4] + 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 + */ +} + 800417a: bf00 nop + 800417c: 370c adds r7, #12 + 800417e: 46bd mov sp, r7 + 8004180: bc80 pop {r7} + 8004182: 4770 bx lr + +08004184 : + * @brief PWM Pulse finished callback in non-blocking mode + * @param htim TIM handle + * @retval None + */ +__weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) +{ + 8004184: b480 push {r7} + 8004186: b083 sub sp, #12 + 8004188: af00 add r7, sp, #0 + 800418a: 6078 str r0, [r7, #4] + 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 + */ +} + 800418c: bf00 nop + 800418e: 370c adds r7, #12 + 8004190: 46bd mov sp, r7 + 8004192: bc80 pop {r7} + 8004194: 4770 bx lr + +08004196 : + * @brief Hall Trigger detection callback in non-blocking mode + * @param htim TIM handle + * @retval None + */ +__weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim) +{ + 8004196: b480 push {r7} + 8004198: b083 sub sp, #12 + 800419a: af00 add r7, sp, #0 + 800419c: 6078 str r0, [r7, #4] + 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 + */ +} + 800419e: bf00 nop + 80041a0: 370c adds r7, #12 + 80041a2: 46bd mov sp, r7 + 80041a4: bc80 pop {r7} + 80041a6: 4770 bx lr + +080041a8 : + * @param TIMx TIM peripheral + * @param Structure TIM Base configuration structure + * @retval None + */ +void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure) +{ + 80041a8: b480 push {r7} + 80041aa: b085 sub sp, #20 + 80041ac: af00 add r7, sp, #0 + 80041ae: 6078 str r0, [r7, #4] + 80041b0: 6039 str r1, [r7, #0] + uint32_t tmpcr1; + tmpcr1 = TIMx->CR1; + 80041b2: 687b ldr r3, [r7, #4] + 80041b4: 681b ldr r3, [r3, #0] + 80041b6: 60fb str r3, [r7, #12] + + /* Set TIM Time Base Unit parameters ---------------------------------------*/ + if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx)) + 80041b8: 687b ldr r3, [r7, #4] + 80041ba: 4a3f ldr r2, [pc, #252] ; (80042b8 ) + 80041bc: 4293 cmp r3, r2 + 80041be: d013 beq.n 80041e8 + 80041c0: 687b ldr r3, [r7, #4] + 80041c2: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 + 80041c6: d00f beq.n 80041e8 + 80041c8: 687b ldr r3, [r7, #4] + 80041ca: 4a3c ldr r2, [pc, #240] ; (80042bc ) + 80041cc: 4293 cmp r3, r2 + 80041ce: d00b beq.n 80041e8 + 80041d0: 687b ldr r3, [r7, #4] + 80041d2: 4a3b ldr r2, [pc, #236] ; (80042c0 ) + 80041d4: 4293 cmp r3, r2 + 80041d6: d007 beq.n 80041e8 + 80041d8: 687b ldr r3, [r7, #4] + 80041da: 4a3a ldr r2, [pc, #232] ; (80042c4 ) + 80041dc: 4293 cmp r3, r2 + 80041de: d003 beq.n 80041e8 + 80041e0: 687b ldr r3, [r7, #4] + 80041e2: 4a39 ldr r2, [pc, #228] ; (80042c8 ) + 80041e4: 4293 cmp r3, r2 + 80041e6: d108 bne.n 80041fa + { + /* Select the Counter Mode */ + tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS); + 80041e8: 68fb ldr r3, [r7, #12] + 80041ea: f023 0370 bic.w r3, r3, #112 ; 0x70 + 80041ee: 60fb str r3, [r7, #12] + tmpcr1 |= Structure->CounterMode; + 80041f0: 683b ldr r3, [r7, #0] + 80041f2: 685b ldr r3, [r3, #4] + 80041f4: 68fa ldr r2, [r7, #12] + 80041f6: 4313 orrs r3, r2 + 80041f8: 60fb str r3, [r7, #12] + } + + if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx)) + 80041fa: 687b ldr r3, [r7, #4] + 80041fc: 4a2e ldr r2, [pc, #184] ; (80042b8 ) + 80041fe: 4293 cmp r3, r2 + 8004200: d02b beq.n 800425a + 8004202: 687b ldr r3, [r7, #4] + 8004204: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 + 8004208: d027 beq.n 800425a + 800420a: 687b ldr r3, [r7, #4] + 800420c: 4a2b ldr r2, [pc, #172] ; (80042bc ) + 800420e: 4293 cmp r3, r2 + 8004210: d023 beq.n 800425a + 8004212: 687b ldr r3, [r7, #4] + 8004214: 4a2a ldr r2, [pc, #168] ; (80042c0 ) + 8004216: 4293 cmp r3, r2 + 8004218: d01f beq.n 800425a + 800421a: 687b ldr r3, [r7, #4] + 800421c: 4a29 ldr r2, [pc, #164] ; (80042c4 ) + 800421e: 4293 cmp r3, r2 + 8004220: d01b beq.n 800425a + 8004222: 687b ldr r3, [r7, #4] + 8004224: 4a28 ldr r2, [pc, #160] ; (80042c8 ) + 8004226: 4293 cmp r3, r2 + 8004228: d017 beq.n 800425a + 800422a: 687b ldr r3, [r7, #4] + 800422c: 4a27 ldr r2, [pc, #156] ; (80042cc ) + 800422e: 4293 cmp r3, r2 + 8004230: d013 beq.n 800425a + 8004232: 687b ldr r3, [r7, #4] + 8004234: 4a26 ldr r2, [pc, #152] ; (80042d0 ) + 8004236: 4293 cmp r3, r2 + 8004238: d00f beq.n 800425a + 800423a: 687b ldr r3, [r7, #4] + 800423c: 4a25 ldr r2, [pc, #148] ; (80042d4 ) + 800423e: 4293 cmp r3, r2 + 8004240: d00b beq.n 800425a + 8004242: 687b ldr r3, [r7, #4] + 8004244: 4a24 ldr r2, [pc, #144] ; (80042d8 ) + 8004246: 4293 cmp r3, r2 + 8004248: d007 beq.n 800425a + 800424a: 687b ldr r3, [r7, #4] + 800424c: 4a23 ldr r2, [pc, #140] ; (80042dc ) + 800424e: 4293 cmp r3, r2 + 8004250: d003 beq.n 800425a + 8004252: 687b ldr r3, [r7, #4] + 8004254: 4a22 ldr r2, [pc, #136] ; (80042e0 ) + 8004256: 4293 cmp r3, r2 + 8004258: d108 bne.n 800426c + { + /* Set the clock division */ + tmpcr1 &= ~TIM_CR1_CKD; + 800425a: 68fb ldr r3, [r7, #12] + 800425c: f423 7340 bic.w r3, r3, #768 ; 0x300 + 8004260: 60fb str r3, [r7, #12] + tmpcr1 |= (uint32_t)Structure->ClockDivision; + 8004262: 683b ldr r3, [r7, #0] + 8004264: 68db ldr r3, [r3, #12] + 8004266: 68fa ldr r2, [r7, #12] + 8004268: 4313 orrs r3, r2 + 800426a: 60fb str r3, [r7, #12] + } + + /* Set the auto-reload preload */ + MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload); + 800426c: 68fb ldr r3, [r7, #12] + 800426e: f023 0280 bic.w r2, r3, #128 ; 0x80 + 8004272: 683b ldr r3, [r7, #0] + 8004274: 695b ldr r3, [r3, #20] + 8004276: 4313 orrs r3, r2 + 8004278: 60fb str r3, [r7, #12] + + TIMx->CR1 = tmpcr1; + 800427a: 687b ldr r3, [r7, #4] + 800427c: 68fa ldr r2, [r7, #12] + 800427e: 601a str r2, [r3, #0] + + /* Set the Autoreload value */ + TIMx->ARR = (uint32_t)Structure->Period ; + 8004280: 683b ldr r3, [r7, #0] + 8004282: 689a ldr r2, [r3, #8] + 8004284: 687b ldr r3, [r7, #4] + 8004286: 62da str r2, [r3, #44] ; 0x2c + + /* Set the Prescaler value */ + TIMx->PSC = Structure->Prescaler; + 8004288: 683b ldr r3, [r7, #0] + 800428a: 681a ldr r2, [r3, #0] + 800428c: 687b ldr r3, [r7, #4] + 800428e: 629a str r2, [r3, #40] ; 0x28 + + if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx)) + 8004290: 687b ldr r3, [r7, #4] + 8004292: 4a09 ldr r2, [pc, #36] ; (80042b8 ) + 8004294: 4293 cmp r3, r2 + 8004296: d003 beq.n 80042a0 + 8004298: 687b ldr r3, [r7, #4] + 800429a: 4a0b ldr r2, [pc, #44] ; (80042c8 ) + 800429c: 4293 cmp r3, r2 + 800429e: d103 bne.n 80042a8 + { + /* Set the Repetition Counter value */ + TIMx->RCR = Structure->RepetitionCounter; + 80042a0: 683b ldr r3, [r7, #0] + 80042a2: 691a ldr r2, [r3, #16] + 80042a4: 687b ldr r3, [r7, #4] + 80042a6: 631a str r2, [r3, #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; + 80042a8: 687b ldr r3, [r7, #4] + 80042aa: 2201 movs r2, #1 + 80042ac: 615a str r2, [r3, #20] +} + 80042ae: bf00 nop + 80042b0: 3714 adds r7, #20 + 80042b2: 46bd mov sp, r7 + 80042b4: bc80 pop {r7} + 80042b6: 4770 bx lr + 80042b8: 40010000 .word 0x40010000 + 80042bc: 40000400 .word 0x40000400 + 80042c0: 40000800 .word 0x40000800 + 80042c4: 40000c00 .word 0x40000c00 + 80042c8: 40010400 .word 0x40010400 + 80042cc: 40014000 .word 0x40014000 + 80042d0: 40014400 .word 0x40014400 + 80042d4: 40014800 .word 0x40014800 + 80042d8: 40001800 .word 0x40001800 + 80042dc: 40001c00 .word 0x40001c00 + 80042e0: 40002000 .word 0x40002000 + +080042e4 : + * @param TIMx to select the TIM peripheral + * @param OC_Config The output configuration structure + * @retval None + */ +static void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) +{ + 80042e4: b480 push {r7} + 80042e6: b087 sub sp, #28 + 80042e8: af00 add r7, sp, #0 + 80042ea: 6078 str r0, [r7, #4] + 80042ec: 6039 str r1, [r7, #0] + uint32_t tmpccmrx; + uint32_t tmpccer; + uint32_t tmpcr2; + + /* Get the TIMx CCER register value */ + tmpccer = TIMx->CCER; + 80042ee: 687b ldr r3, [r7, #4] + 80042f0: 6a1b ldr r3, [r3, #32] + 80042f2: 617b str r3, [r7, #20] + + /* Disable the Channel 1: Reset the CC1E Bit */ + TIMx->CCER &= ~TIM_CCER_CC1E; + 80042f4: 687b ldr r3, [r7, #4] + 80042f6: 6a1b ldr r3, [r3, #32] + 80042f8: f023 0201 bic.w r2, r3, #1 + 80042fc: 687b ldr r3, [r7, #4] + 80042fe: 621a str r2, [r3, #32] + + /* Get the TIMx CR2 register value */ + tmpcr2 = TIMx->CR2; + 8004300: 687b ldr r3, [r7, #4] + 8004302: 685b ldr r3, [r3, #4] + 8004304: 613b str r3, [r7, #16] + + /* Get the TIMx CCMR1 register value */ + tmpccmrx = TIMx->CCMR1; + 8004306: 687b ldr r3, [r7, #4] + 8004308: 699b ldr r3, [r3, #24] + 800430a: 60fb str r3, [r7, #12] + + /* Reset the Output Compare Mode Bits */ + tmpccmrx &= ~TIM_CCMR1_OC1M; + 800430c: 68fb ldr r3, [r7, #12] + 800430e: f023 0370 bic.w r3, r3, #112 ; 0x70 + 8004312: 60fb str r3, [r7, #12] + tmpccmrx &= ~TIM_CCMR1_CC1S; + 8004314: 68fb ldr r3, [r7, #12] + 8004316: f023 0303 bic.w r3, r3, #3 + 800431a: 60fb str r3, [r7, #12] + /* Select the Output Compare Mode */ + tmpccmrx |= OC_Config->OCMode; + 800431c: 683b ldr r3, [r7, #0] + 800431e: 681b ldr r3, [r3, #0] + 8004320: 68fa ldr r2, [r7, #12] + 8004322: 4313 orrs r3, r2 + 8004324: 60fb str r3, [r7, #12] + + /* Reset the Output Polarity level */ + tmpccer &= ~TIM_CCER_CC1P; + 8004326: 697b ldr r3, [r7, #20] + 8004328: f023 0302 bic.w r3, r3, #2 + 800432c: 617b str r3, [r7, #20] + /* Set the Output Compare Polarity */ + tmpccer |= OC_Config->OCPolarity; + 800432e: 683b ldr r3, [r7, #0] + 8004330: 689b ldr r3, [r3, #8] + 8004332: 697a ldr r2, [r7, #20] + 8004334: 4313 orrs r3, r2 + 8004336: 617b str r3, [r7, #20] + + if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_1)) + 8004338: 687b ldr r3, [r7, #4] + 800433a: 4a20 ldr r2, [pc, #128] ; (80043bc ) + 800433c: 4293 cmp r3, r2 + 800433e: d003 beq.n 8004348 + 8004340: 687b ldr r3, [r7, #4] + 8004342: 4a1f ldr r2, [pc, #124] ; (80043c0 ) + 8004344: 4293 cmp r3, r2 + 8004346: d10c bne.n 8004362 + { + /* Check parameters */ + assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity)); + + /* Reset the Output N Polarity level */ + tmpccer &= ~TIM_CCER_CC1NP; + 8004348: 697b ldr r3, [r7, #20] + 800434a: f023 0308 bic.w r3, r3, #8 + 800434e: 617b str r3, [r7, #20] + /* Set the Output N Polarity */ + tmpccer |= OC_Config->OCNPolarity; + 8004350: 683b ldr r3, [r7, #0] + 8004352: 68db ldr r3, [r3, #12] + 8004354: 697a ldr r2, [r7, #20] + 8004356: 4313 orrs r3, r2 + 8004358: 617b str r3, [r7, #20] + /* Reset the Output N State */ + tmpccer &= ~TIM_CCER_CC1NE; + 800435a: 697b ldr r3, [r7, #20] + 800435c: f023 0304 bic.w r3, r3, #4 + 8004360: 617b str r3, [r7, #20] + } + + if (IS_TIM_BREAK_INSTANCE(TIMx)) + 8004362: 687b ldr r3, [r7, #4] + 8004364: 4a15 ldr r2, [pc, #84] ; (80043bc ) + 8004366: 4293 cmp r3, r2 + 8004368: d003 beq.n 8004372 + 800436a: 687b ldr r3, [r7, #4] + 800436c: 4a14 ldr r2, [pc, #80] ; (80043c0 ) + 800436e: 4293 cmp r3, r2 + 8004370: d111 bne.n 8004396 + /* Check parameters */ + assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState)); + assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); + + /* Reset the Output Compare and Output Compare N IDLE State */ + tmpcr2 &= ~TIM_CR2_OIS1; + 8004372: 693b ldr r3, [r7, #16] + 8004374: f423 7380 bic.w r3, r3, #256 ; 0x100 + 8004378: 613b str r3, [r7, #16] + tmpcr2 &= ~TIM_CR2_OIS1N; + 800437a: 693b ldr r3, [r7, #16] + 800437c: f423 7300 bic.w r3, r3, #512 ; 0x200 + 8004380: 613b str r3, [r7, #16] + /* Set the Output Idle state */ + tmpcr2 |= OC_Config->OCIdleState; + 8004382: 683b ldr r3, [r7, #0] + 8004384: 695b ldr r3, [r3, #20] + 8004386: 693a ldr r2, [r7, #16] + 8004388: 4313 orrs r3, r2 + 800438a: 613b str r3, [r7, #16] + /* Set the Output N Idle state */ + tmpcr2 |= OC_Config->OCNIdleState; + 800438c: 683b ldr r3, [r7, #0] + 800438e: 699b ldr r3, [r3, #24] + 8004390: 693a ldr r2, [r7, #16] + 8004392: 4313 orrs r3, r2 + 8004394: 613b str r3, [r7, #16] + } + + /* Write to TIMx CR2 */ + TIMx->CR2 = tmpcr2; + 8004396: 687b ldr r3, [r7, #4] + 8004398: 693a ldr r2, [r7, #16] + 800439a: 605a str r2, [r3, #4] + + /* Write to TIMx CCMR1 */ + TIMx->CCMR1 = tmpccmrx; + 800439c: 687b ldr r3, [r7, #4] + 800439e: 68fa ldr r2, [r7, #12] + 80043a0: 619a str r2, [r3, #24] + + /* Set the Capture Compare Register value */ + TIMx->CCR1 = OC_Config->Pulse; + 80043a2: 683b ldr r3, [r7, #0] + 80043a4: 685a ldr r2, [r3, #4] + 80043a6: 687b ldr r3, [r7, #4] + 80043a8: 635a str r2, [r3, #52] ; 0x34 + + /* Write to TIMx CCER */ + TIMx->CCER = tmpccer; + 80043aa: 687b ldr r3, [r7, #4] + 80043ac: 697a ldr r2, [r7, #20] + 80043ae: 621a str r2, [r3, #32] +} + 80043b0: bf00 nop + 80043b2: 371c adds r7, #28 + 80043b4: 46bd mov sp, r7 + 80043b6: bc80 pop {r7} + 80043b8: 4770 bx lr + 80043ba: bf00 nop + 80043bc: 40010000 .word 0x40010000 + 80043c0: 40010400 .word 0x40010400 + +080043c4 : + * @param TIMx to select the TIM peripheral + * @param OC_Config The output configuration structure + * @retval None + */ +void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) +{ + 80043c4: b480 push {r7} + 80043c6: b087 sub sp, #28 + 80043c8: af00 add r7, sp, #0 + 80043ca: 6078 str r0, [r7, #4] + 80043cc: 6039 str r1, [r7, #0] + uint32_t tmpccmrx; + uint32_t tmpccer; + uint32_t tmpcr2; + + /* Get the TIMx CCER register value */ + tmpccer = TIMx->CCER; + 80043ce: 687b ldr r3, [r7, #4] + 80043d0: 6a1b ldr r3, [r3, #32] + 80043d2: 617b str r3, [r7, #20] + + /* Disable the Channel 2: Reset the CC2E Bit */ + TIMx->CCER &= ~TIM_CCER_CC2E; + 80043d4: 687b ldr r3, [r7, #4] + 80043d6: 6a1b ldr r3, [r3, #32] + 80043d8: f023 0210 bic.w r2, r3, #16 + 80043dc: 687b ldr r3, [r7, #4] + 80043de: 621a str r2, [r3, #32] + + /* Get the TIMx CR2 register value */ + tmpcr2 = TIMx->CR2; + 80043e0: 687b ldr r3, [r7, #4] + 80043e2: 685b ldr r3, [r3, #4] + 80043e4: 613b str r3, [r7, #16] + + /* Get the TIMx CCMR1 register value */ + tmpccmrx = TIMx->CCMR1; + 80043e6: 687b ldr r3, [r7, #4] + 80043e8: 699b ldr r3, [r3, #24] + 80043ea: 60fb str r3, [r7, #12] + + /* Reset the Output Compare mode and Capture/Compare selection Bits */ + tmpccmrx &= ~TIM_CCMR1_OC2M; + 80043ec: 68fb ldr r3, [r7, #12] + 80043ee: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 + 80043f2: 60fb str r3, [r7, #12] + tmpccmrx &= ~TIM_CCMR1_CC2S; + 80043f4: 68fb ldr r3, [r7, #12] + 80043f6: f423 7340 bic.w r3, r3, #768 ; 0x300 + 80043fa: 60fb str r3, [r7, #12] + + /* Select the Output Compare Mode */ + tmpccmrx |= (OC_Config->OCMode << 8U); + 80043fc: 683b ldr r3, [r7, #0] + 80043fe: 681b ldr r3, [r3, #0] + 8004400: 021b lsls r3, r3, #8 + 8004402: 68fa ldr r2, [r7, #12] + 8004404: 4313 orrs r3, r2 + 8004406: 60fb str r3, [r7, #12] + + /* Reset the Output Polarity level */ + tmpccer &= ~TIM_CCER_CC2P; + 8004408: 697b ldr r3, [r7, #20] + 800440a: f023 0320 bic.w r3, r3, #32 + 800440e: 617b str r3, [r7, #20] + /* Set the Output Compare Polarity */ + tmpccer |= (OC_Config->OCPolarity << 4U); + 8004410: 683b ldr r3, [r7, #0] + 8004412: 689b ldr r3, [r3, #8] + 8004414: 011b lsls r3, r3, #4 + 8004416: 697a ldr r2, [r7, #20] + 8004418: 4313 orrs r3, r2 + 800441a: 617b str r3, [r7, #20] + + if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_2)) + 800441c: 687b ldr r3, [r7, #4] + 800441e: 4a21 ldr r2, [pc, #132] ; (80044a4 ) + 8004420: 4293 cmp r3, r2 + 8004422: d003 beq.n 800442c + 8004424: 687b ldr r3, [r7, #4] + 8004426: 4a20 ldr r2, [pc, #128] ; (80044a8 ) + 8004428: 4293 cmp r3, r2 + 800442a: d10d bne.n 8004448 + { + assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity)); + + /* Reset the Output N Polarity level */ + tmpccer &= ~TIM_CCER_CC2NP; + 800442c: 697b ldr r3, [r7, #20] + 800442e: f023 0380 bic.w r3, r3, #128 ; 0x80 + 8004432: 617b str r3, [r7, #20] + /* Set the Output N Polarity */ + tmpccer |= (OC_Config->OCNPolarity << 4U); + 8004434: 683b ldr r3, [r7, #0] + 8004436: 68db ldr r3, [r3, #12] + 8004438: 011b lsls r3, r3, #4 + 800443a: 697a ldr r2, [r7, #20] + 800443c: 4313 orrs r3, r2 + 800443e: 617b str r3, [r7, #20] + /* Reset the Output N State */ + tmpccer &= ~TIM_CCER_CC2NE; + 8004440: 697b ldr r3, [r7, #20] + 8004442: f023 0340 bic.w r3, r3, #64 ; 0x40 + 8004446: 617b str r3, [r7, #20] + + } + + if (IS_TIM_BREAK_INSTANCE(TIMx)) + 8004448: 687b ldr r3, [r7, #4] + 800444a: 4a16 ldr r2, [pc, #88] ; (80044a4 ) + 800444c: 4293 cmp r3, r2 + 800444e: d003 beq.n 8004458 + 8004450: 687b ldr r3, [r7, #4] + 8004452: 4a15 ldr r2, [pc, #84] ; (80044a8 ) + 8004454: 4293 cmp r3, r2 + 8004456: d113 bne.n 8004480 + /* Check parameters */ + assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState)); + assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); + + /* Reset the Output Compare and Output Compare N IDLE State */ + tmpcr2 &= ~TIM_CR2_OIS2; + 8004458: 693b ldr r3, [r7, #16] + 800445a: f423 6380 bic.w r3, r3, #1024 ; 0x400 + 800445e: 613b str r3, [r7, #16] + tmpcr2 &= ~TIM_CR2_OIS2N; + 8004460: 693b ldr r3, [r7, #16] + 8004462: f423 6300 bic.w r3, r3, #2048 ; 0x800 + 8004466: 613b str r3, [r7, #16] + /* Set the Output Idle state */ + tmpcr2 |= (OC_Config->OCIdleState << 2U); + 8004468: 683b ldr r3, [r7, #0] + 800446a: 695b ldr r3, [r3, #20] + 800446c: 009b lsls r3, r3, #2 + 800446e: 693a ldr r2, [r7, #16] + 8004470: 4313 orrs r3, r2 + 8004472: 613b str r3, [r7, #16] + /* Set the Output N Idle state */ + tmpcr2 |= (OC_Config->OCNIdleState << 2U); + 8004474: 683b ldr r3, [r7, #0] + 8004476: 699b ldr r3, [r3, #24] + 8004478: 009b lsls r3, r3, #2 + 800447a: 693a ldr r2, [r7, #16] + 800447c: 4313 orrs r3, r2 + 800447e: 613b str r3, [r7, #16] + } + + /* Write to TIMx CR2 */ + TIMx->CR2 = tmpcr2; + 8004480: 687b ldr r3, [r7, #4] + 8004482: 693a ldr r2, [r7, #16] + 8004484: 605a str r2, [r3, #4] + + /* Write to TIMx CCMR1 */ + TIMx->CCMR1 = tmpccmrx; + 8004486: 687b ldr r3, [r7, #4] + 8004488: 68fa ldr r2, [r7, #12] + 800448a: 619a str r2, [r3, #24] + + /* Set the Capture Compare Register value */ + TIMx->CCR2 = OC_Config->Pulse; + 800448c: 683b ldr r3, [r7, #0] + 800448e: 685a ldr r2, [r3, #4] + 8004490: 687b ldr r3, [r7, #4] + 8004492: 639a str r2, [r3, #56] ; 0x38 + + /* Write to TIMx CCER */ + TIMx->CCER = tmpccer; + 8004494: 687b ldr r3, [r7, #4] + 8004496: 697a ldr r2, [r7, #20] + 8004498: 621a str r2, [r3, #32] +} + 800449a: bf00 nop + 800449c: 371c adds r7, #28 + 800449e: 46bd mov sp, r7 + 80044a0: bc80 pop {r7} + 80044a2: 4770 bx lr + 80044a4: 40010000 .word 0x40010000 + 80044a8: 40010400 .word 0x40010400 + +080044ac : + * @param TIMx to select the TIM peripheral + * @param OC_Config The output configuration structure + * @retval None + */ +static void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) +{ + 80044ac: b480 push {r7} + 80044ae: b087 sub sp, #28 + 80044b0: af00 add r7, sp, #0 + 80044b2: 6078 str r0, [r7, #4] + 80044b4: 6039 str r1, [r7, #0] + uint32_t tmpccmrx; + uint32_t tmpccer; + uint32_t tmpcr2; + + /* Get the TIMx CCER register value */ + tmpccer = TIMx->CCER; + 80044b6: 687b ldr r3, [r7, #4] + 80044b8: 6a1b ldr r3, [r3, #32] + 80044ba: 617b str r3, [r7, #20] + + /* Disable the Channel 3: Reset the CC2E Bit */ + TIMx->CCER &= ~TIM_CCER_CC3E; + 80044bc: 687b ldr r3, [r7, #4] + 80044be: 6a1b ldr r3, [r3, #32] + 80044c0: f423 7280 bic.w r2, r3, #256 ; 0x100 + 80044c4: 687b ldr r3, [r7, #4] + 80044c6: 621a str r2, [r3, #32] + + /* Get the TIMx CR2 register value */ + tmpcr2 = TIMx->CR2; + 80044c8: 687b ldr r3, [r7, #4] + 80044ca: 685b ldr r3, [r3, #4] + 80044cc: 613b str r3, [r7, #16] + + /* Get the TIMx CCMR2 register value */ + tmpccmrx = TIMx->CCMR2; + 80044ce: 687b ldr r3, [r7, #4] + 80044d0: 69db ldr r3, [r3, #28] + 80044d2: 60fb str r3, [r7, #12] + + /* Reset the Output Compare mode and Capture/Compare selection Bits */ + tmpccmrx &= ~TIM_CCMR2_OC3M; + 80044d4: 68fb ldr r3, [r7, #12] + 80044d6: f023 0370 bic.w r3, r3, #112 ; 0x70 + 80044da: 60fb str r3, [r7, #12] + tmpccmrx &= ~TIM_CCMR2_CC3S; + 80044dc: 68fb ldr r3, [r7, #12] + 80044de: f023 0303 bic.w r3, r3, #3 + 80044e2: 60fb str r3, [r7, #12] + /* Select the Output Compare Mode */ + tmpccmrx |= OC_Config->OCMode; + 80044e4: 683b ldr r3, [r7, #0] + 80044e6: 681b ldr r3, [r3, #0] + 80044e8: 68fa ldr r2, [r7, #12] + 80044ea: 4313 orrs r3, r2 + 80044ec: 60fb str r3, [r7, #12] + + /* Reset the Output Polarity level */ + tmpccer &= ~TIM_CCER_CC3P; + 80044ee: 697b ldr r3, [r7, #20] + 80044f0: f423 7300 bic.w r3, r3, #512 ; 0x200 + 80044f4: 617b str r3, [r7, #20] + /* Set the Output Compare Polarity */ + tmpccer |= (OC_Config->OCPolarity << 8U); + 80044f6: 683b ldr r3, [r7, #0] + 80044f8: 689b ldr r3, [r3, #8] + 80044fa: 021b lsls r3, r3, #8 + 80044fc: 697a ldr r2, [r7, #20] + 80044fe: 4313 orrs r3, r2 + 8004500: 617b str r3, [r7, #20] + + if (IS_TIM_CCXN_INSTANCE(TIMx, TIM_CHANNEL_3)) + 8004502: 687b ldr r3, [r7, #4] + 8004504: 4a21 ldr r2, [pc, #132] ; (800458c ) + 8004506: 4293 cmp r3, r2 + 8004508: d003 beq.n 8004512 + 800450a: 687b ldr r3, [r7, #4] + 800450c: 4a20 ldr r2, [pc, #128] ; (8004590 ) + 800450e: 4293 cmp r3, r2 + 8004510: d10d bne.n 800452e + { + assert_param(IS_TIM_OCN_POLARITY(OC_Config->OCNPolarity)); + + /* Reset the Output N Polarity level */ + tmpccer &= ~TIM_CCER_CC3NP; + 8004512: 697b ldr r3, [r7, #20] + 8004514: f423 6300 bic.w r3, r3, #2048 ; 0x800 + 8004518: 617b str r3, [r7, #20] + /* Set the Output N Polarity */ + tmpccer |= (OC_Config->OCNPolarity << 8U); + 800451a: 683b ldr r3, [r7, #0] + 800451c: 68db ldr r3, [r3, #12] + 800451e: 021b lsls r3, r3, #8 + 8004520: 697a ldr r2, [r7, #20] + 8004522: 4313 orrs r3, r2 + 8004524: 617b str r3, [r7, #20] + /* Reset the Output N State */ + tmpccer &= ~TIM_CCER_CC3NE; + 8004526: 697b ldr r3, [r7, #20] + 8004528: f423 6380 bic.w r3, r3, #1024 ; 0x400 + 800452c: 617b str r3, [r7, #20] + } + + if (IS_TIM_BREAK_INSTANCE(TIMx)) + 800452e: 687b ldr r3, [r7, #4] + 8004530: 4a16 ldr r2, [pc, #88] ; (800458c ) + 8004532: 4293 cmp r3, r2 + 8004534: d003 beq.n 800453e + 8004536: 687b ldr r3, [r7, #4] + 8004538: 4a15 ldr r2, [pc, #84] ; (8004590 ) + 800453a: 4293 cmp r3, r2 + 800453c: d113 bne.n 8004566 + /* Check parameters */ + assert_param(IS_TIM_OCNIDLE_STATE(OC_Config->OCNIdleState)); + assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); + + /* Reset the Output Compare and Output Compare N IDLE State */ + tmpcr2 &= ~TIM_CR2_OIS3; + 800453e: 693b ldr r3, [r7, #16] + 8004540: f423 5380 bic.w r3, r3, #4096 ; 0x1000 + 8004544: 613b str r3, [r7, #16] + tmpcr2 &= ~TIM_CR2_OIS3N; + 8004546: 693b ldr r3, [r7, #16] + 8004548: f423 5300 bic.w r3, r3, #8192 ; 0x2000 + 800454c: 613b str r3, [r7, #16] + /* Set the Output Idle state */ + tmpcr2 |= (OC_Config->OCIdleState << 4U); + 800454e: 683b ldr r3, [r7, #0] + 8004550: 695b ldr r3, [r3, #20] + 8004552: 011b lsls r3, r3, #4 + 8004554: 693a ldr r2, [r7, #16] + 8004556: 4313 orrs r3, r2 + 8004558: 613b str r3, [r7, #16] + /* Set the Output N Idle state */ + tmpcr2 |= (OC_Config->OCNIdleState << 4U); + 800455a: 683b ldr r3, [r7, #0] + 800455c: 699b ldr r3, [r3, #24] + 800455e: 011b lsls r3, r3, #4 + 8004560: 693a ldr r2, [r7, #16] + 8004562: 4313 orrs r3, r2 + 8004564: 613b str r3, [r7, #16] + } + + /* Write to TIMx CR2 */ + TIMx->CR2 = tmpcr2; + 8004566: 687b ldr r3, [r7, #4] + 8004568: 693a ldr r2, [r7, #16] + 800456a: 605a str r2, [r3, #4] + + /* Write to TIMx CCMR2 */ + TIMx->CCMR2 = tmpccmrx; + 800456c: 687b ldr r3, [r7, #4] + 800456e: 68fa ldr r2, [r7, #12] + 8004570: 61da str r2, [r3, #28] + + /* Set the Capture Compare Register value */ + TIMx->CCR3 = OC_Config->Pulse; + 8004572: 683b ldr r3, [r7, #0] + 8004574: 685a ldr r2, [r3, #4] + 8004576: 687b ldr r3, [r7, #4] + 8004578: 63da str r2, [r3, #60] ; 0x3c + + /* Write to TIMx CCER */ + TIMx->CCER = tmpccer; + 800457a: 687b ldr r3, [r7, #4] + 800457c: 697a ldr r2, [r7, #20] + 800457e: 621a str r2, [r3, #32] +} + 8004580: bf00 nop + 8004582: 371c adds r7, #28 + 8004584: 46bd mov sp, r7 + 8004586: bc80 pop {r7} + 8004588: 4770 bx lr + 800458a: bf00 nop + 800458c: 40010000 .word 0x40010000 + 8004590: 40010400 .word 0x40010400 + +08004594 : + * @param TIMx to select the TIM peripheral + * @param OC_Config The output configuration structure + * @retval None + */ +static void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, const TIM_OC_InitTypeDef *OC_Config) +{ + 8004594: b480 push {r7} + 8004596: b087 sub sp, #28 + 8004598: af00 add r7, sp, #0 + 800459a: 6078 str r0, [r7, #4] + 800459c: 6039 str r1, [r7, #0] + uint32_t tmpccmrx; + uint32_t tmpccer; + uint32_t tmpcr2; + + /* Get the TIMx CCER register value */ + tmpccer = TIMx->CCER; + 800459e: 687b ldr r3, [r7, #4] + 80045a0: 6a1b ldr r3, [r3, #32] + 80045a2: 613b str r3, [r7, #16] + + /* Disable the Channel 4: Reset the CC4E Bit */ + TIMx->CCER &= ~TIM_CCER_CC4E; + 80045a4: 687b ldr r3, [r7, #4] + 80045a6: 6a1b ldr r3, [r3, #32] + 80045a8: f423 5280 bic.w r2, r3, #4096 ; 0x1000 + 80045ac: 687b ldr r3, [r7, #4] + 80045ae: 621a str r2, [r3, #32] + + /* Get the TIMx CR2 register value */ + tmpcr2 = TIMx->CR2; + 80045b0: 687b ldr r3, [r7, #4] + 80045b2: 685b ldr r3, [r3, #4] + 80045b4: 617b str r3, [r7, #20] + + /* Get the TIMx CCMR2 register value */ + tmpccmrx = TIMx->CCMR2; + 80045b6: 687b ldr r3, [r7, #4] + 80045b8: 69db ldr r3, [r3, #28] + 80045ba: 60fb str r3, [r7, #12] + + /* Reset the Output Compare mode and Capture/Compare selection Bits */ + tmpccmrx &= ~TIM_CCMR2_OC4M; + 80045bc: 68fb ldr r3, [r7, #12] + 80045be: f423 43e0 bic.w r3, r3, #28672 ; 0x7000 + 80045c2: 60fb str r3, [r7, #12] + tmpccmrx &= ~TIM_CCMR2_CC4S; + 80045c4: 68fb ldr r3, [r7, #12] + 80045c6: f423 7340 bic.w r3, r3, #768 ; 0x300 + 80045ca: 60fb str r3, [r7, #12] + + /* Select the Output Compare Mode */ + tmpccmrx |= (OC_Config->OCMode << 8U); + 80045cc: 683b ldr r3, [r7, #0] + 80045ce: 681b ldr r3, [r3, #0] + 80045d0: 021b lsls r3, r3, #8 + 80045d2: 68fa ldr r2, [r7, #12] + 80045d4: 4313 orrs r3, r2 + 80045d6: 60fb str r3, [r7, #12] + + /* Reset the Output Polarity level */ + tmpccer &= ~TIM_CCER_CC4P; + 80045d8: 693b ldr r3, [r7, #16] + 80045da: f423 5300 bic.w r3, r3, #8192 ; 0x2000 + 80045de: 613b str r3, [r7, #16] + /* Set the Output Compare Polarity */ + tmpccer |= (OC_Config->OCPolarity << 12U); + 80045e0: 683b ldr r3, [r7, #0] + 80045e2: 689b ldr r3, [r3, #8] + 80045e4: 031b lsls r3, r3, #12 + 80045e6: 693a ldr r2, [r7, #16] + 80045e8: 4313 orrs r3, r2 + 80045ea: 613b str r3, [r7, #16] + + if (IS_TIM_BREAK_INSTANCE(TIMx)) + 80045ec: 687b ldr r3, [r7, #4] + 80045ee: 4a11 ldr r2, [pc, #68] ; (8004634 ) + 80045f0: 4293 cmp r3, r2 + 80045f2: d003 beq.n 80045fc + 80045f4: 687b ldr r3, [r7, #4] + 80045f6: 4a10 ldr r2, [pc, #64] ; (8004638 ) + 80045f8: 4293 cmp r3, r2 + 80045fa: d109 bne.n 8004610 + { + /* Check parameters */ + assert_param(IS_TIM_OCIDLE_STATE(OC_Config->OCIdleState)); + + /* Reset the Output Compare IDLE State */ + tmpcr2 &= ~TIM_CR2_OIS4; + 80045fc: 697b ldr r3, [r7, #20] + 80045fe: f423 4380 bic.w r3, r3, #16384 ; 0x4000 + 8004602: 617b str r3, [r7, #20] + + /* Set the Output Idle state */ + tmpcr2 |= (OC_Config->OCIdleState << 6U); + 8004604: 683b ldr r3, [r7, #0] + 8004606: 695b ldr r3, [r3, #20] + 8004608: 019b lsls r3, r3, #6 + 800460a: 697a ldr r2, [r7, #20] + 800460c: 4313 orrs r3, r2 + 800460e: 617b str r3, [r7, #20] + } + + /* Write to TIMx CR2 */ + TIMx->CR2 = tmpcr2; + 8004610: 687b ldr r3, [r7, #4] + 8004612: 697a ldr r2, [r7, #20] + 8004614: 605a str r2, [r3, #4] + + /* Write to TIMx CCMR2 */ + TIMx->CCMR2 = tmpccmrx; + 8004616: 687b ldr r3, [r7, #4] + 8004618: 68fa ldr r2, [r7, #12] + 800461a: 61da str r2, [r3, #28] + + /* Set the Capture Compare Register value */ + TIMx->CCR4 = OC_Config->Pulse; + 800461c: 683b ldr r3, [r7, #0] + 800461e: 685a ldr r2, [r3, #4] + 8004620: 687b ldr r3, [r7, #4] + 8004622: 641a str r2, [r3, #64] ; 0x40 + + /* Write to TIMx CCER */ + TIMx->CCER = tmpccer; + 8004624: 687b ldr r3, [r7, #4] + 8004626: 693a ldr r2, [r7, #16] + 8004628: 621a str r2, [r3, #32] +} + 800462a: bf00 nop + 800462c: 371c adds r7, #28 + 800462e: 46bd mov sp, r7 + 8004630: bc80 pop {r7} + 8004632: 4770 bx lr + 8004634: 40010000 .word 0x40010000 + 8004638: 40010400 .word 0x40010400 + +0800463c : + * @param TIM_ICFilter Specifies the Input Capture Filter. + * This parameter must be a value between 0x00 and 0x0F. + * @retval None + */ +static void TIM_TI1_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter) +{ + 800463c: b480 push {r7} + 800463e: b087 sub sp, #28 + 8004640: af00 add r7, sp, #0 + 8004642: 60f8 str r0, [r7, #12] + 8004644: 60b9 str r1, [r7, #8] + 8004646: 607a str r2, [r7, #4] + uint32_t tmpccmr1; + uint32_t tmpccer; + + /* Disable the Channel 1: Reset the CC1E Bit */ + tmpccer = TIMx->CCER; + 8004648: 68fb ldr r3, [r7, #12] + 800464a: 6a1b ldr r3, [r3, #32] + 800464c: 617b str r3, [r7, #20] + TIMx->CCER &= ~TIM_CCER_CC1E; + 800464e: 68fb ldr r3, [r7, #12] + 8004650: 6a1b ldr r3, [r3, #32] + 8004652: f023 0201 bic.w r2, r3, #1 + 8004656: 68fb ldr r3, [r7, #12] + 8004658: 621a str r2, [r3, #32] + tmpccmr1 = TIMx->CCMR1; + 800465a: 68fb ldr r3, [r7, #12] + 800465c: 699b ldr r3, [r3, #24] + 800465e: 613b str r3, [r7, #16] + + /* Set the filter */ + tmpccmr1 &= ~TIM_CCMR1_IC1F; + 8004660: 693b ldr r3, [r7, #16] + 8004662: f023 03f0 bic.w r3, r3, #240 ; 0xf0 + 8004666: 613b str r3, [r7, #16] + tmpccmr1 |= (TIM_ICFilter << 4U); + 8004668: 687b ldr r3, [r7, #4] + 800466a: 011b lsls r3, r3, #4 + 800466c: 693a ldr r2, [r7, #16] + 800466e: 4313 orrs r3, r2 + 8004670: 613b str r3, [r7, #16] + + /* Select the Polarity and set the CC1E Bit */ + tmpccer &= ~(TIM_CCER_CC1P | TIM_CCER_CC1NP); + 8004672: 697b ldr r3, [r7, #20] + 8004674: f023 030a bic.w r3, r3, #10 + 8004678: 617b str r3, [r7, #20] + tmpccer |= TIM_ICPolarity; + 800467a: 697a ldr r2, [r7, #20] + 800467c: 68bb ldr r3, [r7, #8] + 800467e: 4313 orrs r3, r2 + 8004680: 617b str r3, [r7, #20] + + /* Write to TIMx CCMR1 and CCER registers */ + TIMx->CCMR1 = tmpccmr1; + 8004682: 68fb ldr r3, [r7, #12] + 8004684: 693a ldr r2, [r7, #16] + 8004686: 619a str r2, [r3, #24] + TIMx->CCER = tmpccer; + 8004688: 68fb ldr r3, [r7, #12] + 800468a: 697a ldr r2, [r7, #20] + 800468c: 621a str r2, [r3, #32] +} + 800468e: bf00 nop + 8004690: 371c adds r7, #28 + 8004692: 46bd mov sp, r7 + 8004694: bc80 pop {r7} + 8004696: 4770 bx lr + +08004698 : + * @param TIM_ICFilter Specifies the Input Capture Filter. + * This parameter must be a value between 0x00 and 0x0F. + * @retval None + */ +static void TIM_TI2_ConfigInputStage(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICFilter) +{ + 8004698: b480 push {r7} + 800469a: b087 sub sp, #28 + 800469c: af00 add r7, sp, #0 + 800469e: 60f8 str r0, [r7, #12] + 80046a0: 60b9 str r1, [r7, #8] + 80046a2: 607a str r2, [r7, #4] + uint32_t tmpccmr1; + uint32_t tmpccer; + + /* Disable the Channel 2: Reset the CC2E Bit */ + tmpccer = TIMx->CCER; + 80046a4: 68fb ldr r3, [r7, #12] + 80046a6: 6a1b ldr r3, [r3, #32] + 80046a8: 617b str r3, [r7, #20] + TIMx->CCER &= ~TIM_CCER_CC2E; + 80046aa: 68fb ldr r3, [r7, #12] + 80046ac: 6a1b ldr r3, [r3, #32] + 80046ae: f023 0210 bic.w r2, r3, #16 + 80046b2: 68fb ldr r3, [r7, #12] + 80046b4: 621a str r2, [r3, #32] + tmpccmr1 = TIMx->CCMR1; + 80046b6: 68fb ldr r3, [r7, #12] + 80046b8: 699b ldr r3, [r3, #24] + 80046ba: 613b str r3, [r7, #16] + + /* Set the filter */ + tmpccmr1 &= ~TIM_CCMR1_IC2F; + 80046bc: 693b ldr r3, [r7, #16] + 80046be: f423 4370 bic.w r3, r3, #61440 ; 0xf000 + 80046c2: 613b str r3, [r7, #16] + tmpccmr1 |= (TIM_ICFilter << 12U); + 80046c4: 687b ldr r3, [r7, #4] + 80046c6: 031b lsls r3, r3, #12 + 80046c8: 693a ldr r2, [r7, #16] + 80046ca: 4313 orrs r3, r2 + 80046cc: 613b str r3, [r7, #16] + + /* Select the Polarity and set the CC2E Bit */ + tmpccer &= ~(TIM_CCER_CC2P | TIM_CCER_CC2NP); + 80046ce: 697b ldr r3, [r7, #20] + 80046d0: f023 03a0 bic.w r3, r3, #160 ; 0xa0 + 80046d4: 617b str r3, [r7, #20] + tmpccer |= (TIM_ICPolarity << 4U); + 80046d6: 68bb ldr r3, [r7, #8] + 80046d8: 011b lsls r3, r3, #4 + 80046da: 697a ldr r2, [r7, #20] + 80046dc: 4313 orrs r3, r2 + 80046de: 617b str r3, [r7, #20] + + /* Write to TIMx CCMR1 and CCER registers */ + TIMx->CCMR1 = tmpccmr1 ; + 80046e0: 68fb ldr r3, [r7, #12] + 80046e2: 693a ldr r2, [r7, #16] + 80046e4: 619a str r2, [r3, #24] + TIMx->CCER = tmpccer; + 80046e6: 68fb ldr r3, [r7, #12] + 80046e8: 697a ldr r2, [r7, #20] + 80046ea: 621a str r2, [r3, #32] +} + 80046ec: bf00 nop + 80046ee: 371c adds r7, #28 + 80046f0: 46bd mov sp, r7 + 80046f2: bc80 pop {r7} + 80046f4: 4770 bx lr + +080046f6 : + * @arg TIM_TS_TI2FP2: Filtered Timer Input 2 + * @arg TIM_TS_ETRF: External Trigger input + * @retval None + */ +static void TIM_ITRx_SetConfig(TIM_TypeDef *TIMx, uint32_t InputTriggerSource) +{ + 80046f6: b480 push {r7} + 80046f8: b085 sub sp, #20 + 80046fa: af00 add r7, sp, #0 + 80046fc: 6078 str r0, [r7, #4] + 80046fe: 6039 str r1, [r7, #0] + uint32_t tmpsmcr; + + /* Get the TIMx SMCR register value */ + tmpsmcr = TIMx->SMCR; + 8004700: 687b ldr r3, [r7, #4] + 8004702: 689b ldr r3, [r3, #8] + 8004704: 60fb str r3, [r7, #12] + /* Reset the TS Bits */ + tmpsmcr &= ~TIM_SMCR_TS; + 8004706: 68fb ldr r3, [r7, #12] + 8004708: f023 0370 bic.w r3, r3, #112 ; 0x70 + 800470c: 60fb str r3, [r7, #12] + /* Set the Input Trigger source and the slave mode*/ + tmpsmcr |= (InputTriggerSource | TIM_SLAVEMODE_EXTERNAL1); + 800470e: 683a ldr r2, [r7, #0] + 8004710: 68fb ldr r3, [r7, #12] + 8004712: 4313 orrs r3, r2 + 8004714: f043 0307 orr.w r3, r3, #7 + 8004718: 60fb str r3, [r7, #12] + /* Write to TIMx SMCR */ + TIMx->SMCR = tmpsmcr; + 800471a: 687b ldr r3, [r7, #4] + 800471c: 68fa ldr r2, [r7, #12] + 800471e: 609a str r2, [r3, #8] +} + 8004720: bf00 nop + 8004722: 3714 adds r7, #20 + 8004724: 46bd mov sp, r7 + 8004726: bc80 pop {r7} + 8004728: 4770 bx lr + +0800472a : + * This parameter must be a value between 0x00 and 0x0F + * @retval None + */ +void TIM_ETR_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ExtTRGPrescaler, + uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter) +{ + 800472a: b480 push {r7} + 800472c: b087 sub sp, #28 + 800472e: af00 add r7, sp, #0 + 8004730: 60f8 str r0, [r7, #12] + 8004732: 60b9 str r1, [r7, #8] + 8004734: 607a str r2, [r7, #4] + 8004736: 603b str r3, [r7, #0] + uint32_t tmpsmcr; + + tmpsmcr = TIMx->SMCR; + 8004738: 68fb ldr r3, [r7, #12] + 800473a: 689b ldr r3, [r3, #8] + 800473c: 617b str r3, [r7, #20] + + /* Reset the ETR Bits */ + tmpsmcr &= ~(TIM_SMCR_ETF | TIM_SMCR_ETPS | TIM_SMCR_ECE | TIM_SMCR_ETP); + 800473e: 697b ldr r3, [r7, #20] + 8004740: f423 437f bic.w r3, r3, #65280 ; 0xff00 + 8004744: 617b str r3, [r7, #20] + + /* Set the Prescaler, the Filter value and the Polarity */ + tmpsmcr |= (uint32_t)(TIM_ExtTRGPrescaler | (TIM_ExtTRGPolarity | (ExtTRGFilter << 8U))); + 8004746: 683b ldr r3, [r7, #0] + 8004748: 021a lsls r2, r3, #8 + 800474a: 687b ldr r3, [r7, #4] + 800474c: 431a orrs r2, r3 + 800474e: 68bb ldr r3, [r7, #8] + 8004750: 4313 orrs r3, r2 + 8004752: 697a ldr r2, [r7, #20] + 8004754: 4313 orrs r3, r2 + 8004756: 617b str r3, [r7, #20] + + /* Write to TIMx SMCR */ + TIMx->SMCR = tmpsmcr; + 8004758: 68fb ldr r3, [r7, #12] + 800475a: 697a ldr r2, [r7, #20] + 800475c: 609a str r2, [r3, #8] +} + 800475e: bf00 nop + 8004760: 371c adds r7, #28 + 8004762: 46bd mov sp, r7 + 8004764: bc80 pop {r7} + 8004766: 4770 bx lr + +08004768 : + * @param ChannelState specifies the TIM Channel CCxE bit new state. + * This parameter can be: TIM_CCx_ENABLE or TIM_CCx_DISABLE. + * @retval None + */ +void TIM_CCxChannelCmd(TIM_TypeDef *TIMx, uint32_t Channel, uint32_t ChannelState) +{ + 8004768: b480 push {r7} + 800476a: b087 sub sp, #28 + 800476c: af00 add r7, sp, #0 + 800476e: 60f8 str r0, [r7, #12] + 8004770: 60b9 str r1, [r7, #8] + 8004772: 607a str r2, [r7, #4] + + /* Check the parameters */ + assert_param(IS_TIM_CC1_INSTANCE(TIMx)); + assert_param(IS_TIM_CHANNELS(Channel)); + + tmp = TIM_CCER_CC1E << (Channel & 0x1FU); /* 0x1FU = 31 bits max shift */ + 8004774: 68bb ldr r3, [r7, #8] + 8004776: f003 031f and.w r3, r3, #31 + 800477a: 2201 movs r2, #1 + 800477c: fa02 f303 lsl.w r3, r2, r3 + 8004780: 617b str r3, [r7, #20] + + /* Reset the CCxE Bit */ + TIMx->CCER &= ~tmp; + 8004782: 68fb ldr r3, [r7, #12] + 8004784: 6a1a ldr r2, [r3, #32] + 8004786: 697b ldr r3, [r7, #20] + 8004788: 43db mvns r3, r3 + 800478a: 401a ands r2, r3 + 800478c: 68fb ldr r3, [r7, #12] + 800478e: 621a str r2, [r3, #32] + + /* Set or reset the CCxE Bit */ + TIMx->CCER |= (uint32_t)(ChannelState << (Channel & 0x1FU)); /* 0x1FU = 31 bits max shift */ + 8004790: 68fb ldr r3, [r7, #12] + 8004792: 6a1a ldr r2, [r3, #32] + 8004794: 68bb ldr r3, [r7, #8] + 8004796: f003 031f and.w r3, r3, #31 + 800479a: 6879 ldr r1, [r7, #4] + 800479c: fa01 f303 lsl.w r3, r1, r3 + 80047a0: 431a orrs r2, r3 + 80047a2: 68fb ldr r3, [r7, #12] + 80047a4: 621a str r2, [r3, #32] +} + 80047a6: bf00 nop + 80047a8: 371c adds r7, #28 + 80047aa: 46bd mov sp, r7 + 80047ac: bc80 pop {r7} + 80047ae: 4770 bx lr + +080047b0 : + * mode. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, + const TIM_MasterConfigTypeDef *sMasterConfig) +{ + 80047b0: b480 push {r7} + 80047b2: b085 sub sp, #20 + 80047b4: af00 add r7, sp, #0 + 80047b6: 6078 str r0, [r7, #4] + 80047b8: 6039 str r1, [r7, #0] + assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance)); + assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger)); + assert_param(IS_TIM_MSM_STATE(sMasterConfig->MasterSlaveMode)); + + /* Check input state */ + __HAL_LOCK(htim); + 80047ba: 687b ldr r3, [r7, #4] + 80047bc: f893 303c ldrb.w r3, [r3, #60] ; 0x3c + 80047c0: 2b01 cmp r3, #1 + 80047c2: d101 bne.n 80047c8 + 80047c4: 2302 movs r3, #2 + 80047c6: e05a b.n 800487e + 80047c8: 687b ldr r3, [r7, #4] + 80047ca: 2201 movs r2, #1 + 80047cc: f883 203c strb.w r2, [r3, #60] ; 0x3c + + /* Change the handler state */ + htim->State = HAL_TIM_STATE_BUSY; + 80047d0: 687b ldr r3, [r7, #4] + 80047d2: 2202 movs r2, #2 + 80047d4: f883 203d strb.w r2, [r3, #61] ; 0x3d + + /* Get the TIMx CR2 register value */ + tmpcr2 = htim->Instance->CR2; + 80047d8: 687b ldr r3, [r7, #4] + 80047da: 681b ldr r3, [r3, #0] + 80047dc: 685b ldr r3, [r3, #4] + 80047de: 60fb str r3, [r7, #12] + + /* Get the TIMx SMCR register value */ + tmpsmcr = htim->Instance->SMCR; + 80047e0: 687b ldr r3, [r7, #4] + 80047e2: 681b ldr r3, [r3, #0] + 80047e4: 689b ldr r3, [r3, #8] + 80047e6: 60bb str r3, [r7, #8] + + /* Reset the MMS Bits */ + tmpcr2 &= ~TIM_CR2_MMS; + 80047e8: 68fb ldr r3, [r7, #12] + 80047ea: f023 0370 bic.w r3, r3, #112 ; 0x70 + 80047ee: 60fb str r3, [r7, #12] + /* Select the TRGO source */ + tmpcr2 |= sMasterConfig->MasterOutputTrigger; + 80047f0: 683b ldr r3, [r7, #0] + 80047f2: 681b ldr r3, [r3, #0] + 80047f4: 68fa ldr r2, [r7, #12] + 80047f6: 4313 orrs r3, r2 + 80047f8: 60fb str r3, [r7, #12] + + /* Update TIMx CR2 */ + htim->Instance->CR2 = tmpcr2; + 80047fa: 687b ldr r3, [r7, #4] + 80047fc: 681b ldr r3, [r3, #0] + 80047fe: 68fa ldr r2, [r7, #12] + 8004800: 605a str r2, [r3, #4] + + if (IS_TIM_SLAVE_INSTANCE(htim->Instance)) + 8004802: 687b ldr r3, [r7, #4] + 8004804: 681b ldr r3, [r3, #0] + 8004806: 4a20 ldr r2, [pc, #128] ; (8004888 ) + 8004808: 4293 cmp r3, r2 + 800480a: d022 beq.n 8004852 + 800480c: 687b ldr r3, [r7, #4] + 800480e: 681b ldr r3, [r3, #0] + 8004810: f1b3 4f80 cmp.w r3, #1073741824 ; 0x40000000 + 8004814: d01d beq.n 8004852 + 8004816: 687b ldr r3, [r7, #4] + 8004818: 681b ldr r3, [r3, #0] + 800481a: 4a1c ldr r2, [pc, #112] ; (800488c ) + 800481c: 4293 cmp r3, r2 + 800481e: d018 beq.n 8004852 + 8004820: 687b ldr r3, [r7, #4] + 8004822: 681b ldr r3, [r3, #0] + 8004824: 4a1a ldr r2, [pc, #104] ; (8004890 ) + 8004826: 4293 cmp r3, r2 + 8004828: d013 beq.n 8004852 + 800482a: 687b ldr r3, [r7, #4] + 800482c: 681b ldr r3, [r3, #0] + 800482e: 4a19 ldr r2, [pc, #100] ; (8004894 ) + 8004830: 4293 cmp r3, r2 + 8004832: d00e beq.n 8004852 + 8004834: 687b ldr r3, [r7, #4] + 8004836: 681b ldr r3, [r3, #0] + 8004838: 4a17 ldr r2, [pc, #92] ; (8004898 ) + 800483a: 4293 cmp r3, r2 + 800483c: d009 beq.n 8004852 + 800483e: 687b ldr r3, [r7, #4] + 8004840: 681b ldr r3, [r3, #0] + 8004842: 4a16 ldr r2, [pc, #88] ; (800489c ) + 8004844: 4293 cmp r3, r2 + 8004846: d004 beq.n 8004852 + 8004848: 687b ldr r3, [r7, #4] + 800484a: 681b ldr r3, [r3, #0] + 800484c: 4a14 ldr r2, [pc, #80] ; (80048a0 ) + 800484e: 4293 cmp r3, r2 + 8004850: d10c bne.n 800486c + { + /* Reset the MSM Bit */ + tmpsmcr &= ~TIM_SMCR_MSM; + 8004852: 68bb ldr r3, [r7, #8] + 8004854: f023 0380 bic.w r3, r3, #128 ; 0x80 + 8004858: 60bb str r3, [r7, #8] + /* Set master mode */ + tmpsmcr |= sMasterConfig->MasterSlaveMode; + 800485a: 683b ldr r3, [r7, #0] + 800485c: 685b ldr r3, [r3, #4] + 800485e: 68ba ldr r2, [r7, #8] + 8004860: 4313 orrs r3, r2 + 8004862: 60bb str r3, [r7, #8] + + /* Update TIMx SMCR */ + htim->Instance->SMCR = tmpsmcr; + 8004864: 687b ldr r3, [r7, #4] + 8004866: 681b ldr r3, [r3, #0] + 8004868: 68ba ldr r2, [r7, #8] + 800486a: 609a str r2, [r3, #8] + } + + /* Change the htim state */ + htim->State = HAL_TIM_STATE_READY; + 800486c: 687b ldr r3, [r7, #4] + 800486e: 2201 movs r2, #1 + 8004870: f883 203d strb.w r2, [r3, #61] ; 0x3d + + __HAL_UNLOCK(htim); + 8004874: 687b ldr r3, [r7, #4] + 8004876: 2200 movs r2, #0 + 8004878: f883 203c strb.w r2, [r3, #60] ; 0x3c + + return HAL_OK; + 800487c: 2300 movs r3, #0 +} + 800487e: 4618 mov r0, r3 + 8004880: 3714 adds r7, #20 + 8004882: 46bd mov sp, r7 + 8004884: bc80 pop {r7} + 8004886: 4770 bx lr + 8004888: 40010000 .word 0x40010000 + 800488c: 40000400 .word 0x40000400 + 8004890: 40000800 .word 0x40000800 + 8004894: 40000c00 .word 0x40000c00 + 8004898: 40010400 .word 0x40010400 + 800489c: 40014000 .word 0x40014000 + 80048a0: 40001800 .word 0x40001800 + +080048a4 : + * interrupt can be enabled by calling the @ref __HAL_TIM_ENABLE_IT macro. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef *htim, + const TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig) +{ + 80048a4: b480 push {r7} + 80048a6: b085 sub sp, #20 + 80048a8: af00 add r7, sp, #0 + 80048aa: 6078 str r0, [r7, #4] + 80048ac: 6039 str r1, [r7, #0] + /* Keep this variable initialized to 0 as it is used to configure BDTR register */ + uint32_t tmpbdtr = 0U; + 80048ae: 2300 movs r3, #0 + 80048b0: 60fb str r3, [r7, #12] + assert_param(IS_TIM_BREAK_STATE(sBreakDeadTimeConfig->BreakState)); + assert_param(IS_TIM_BREAK_POLARITY(sBreakDeadTimeConfig->BreakPolarity)); + assert_param(IS_TIM_AUTOMATIC_OUTPUT_STATE(sBreakDeadTimeConfig->AutomaticOutput)); + + /* Check input state */ + __HAL_LOCK(htim); + 80048b2: 687b ldr r3, [r7, #4] + 80048b4: f893 303c ldrb.w r3, [r3, #60] ; 0x3c + 80048b8: 2b01 cmp r3, #1 + 80048ba: d101 bne.n 80048c0 + 80048bc: 2302 movs r3, #2 + 80048be: e03d b.n 800493c + 80048c0: 687b ldr r3, [r7, #4] + 80048c2: 2201 movs r2, #1 + 80048c4: f883 203c strb.w r2, [r3, #60] ; 0x3c + + /* Set the Lock level, the Break enable Bit and the Polarity, the OSSR State, + the OSSI State, the dead time value and the Automatic Output Enable Bit */ + + /* Set the BDTR bits */ + MODIFY_REG(tmpbdtr, TIM_BDTR_DTG, sBreakDeadTimeConfig->DeadTime); + 80048c8: 68fb ldr r3, [r7, #12] + 80048ca: f023 02ff bic.w r2, r3, #255 ; 0xff + 80048ce: 683b ldr r3, [r7, #0] + 80048d0: 68db ldr r3, [r3, #12] + 80048d2: 4313 orrs r3, r2 + 80048d4: 60fb str r3, [r7, #12] + MODIFY_REG(tmpbdtr, TIM_BDTR_LOCK, sBreakDeadTimeConfig->LockLevel); + 80048d6: 68fb ldr r3, [r7, #12] + 80048d8: f423 7240 bic.w r2, r3, #768 ; 0x300 + 80048dc: 683b ldr r3, [r7, #0] + 80048de: 689b ldr r3, [r3, #8] + 80048e0: 4313 orrs r3, r2 + 80048e2: 60fb str r3, [r7, #12] + MODIFY_REG(tmpbdtr, TIM_BDTR_OSSI, sBreakDeadTimeConfig->OffStateIDLEMode); + 80048e4: 68fb ldr r3, [r7, #12] + 80048e6: f423 6280 bic.w r2, r3, #1024 ; 0x400 + 80048ea: 683b ldr r3, [r7, #0] + 80048ec: 685b ldr r3, [r3, #4] + 80048ee: 4313 orrs r3, r2 + 80048f0: 60fb str r3, [r7, #12] + MODIFY_REG(tmpbdtr, TIM_BDTR_OSSR, sBreakDeadTimeConfig->OffStateRunMode); + 80048f2: 68fb ldr r3, [r7, #12] + 80048f4: f423 6200 bic.w r2, r3, #2048 ; 0x800 + 80048f8: 683b ldr r3, [r7, #0] + 80048fa: 681b ldr r3, [r3, #0] + 80048fc: 4313 orrs r3, r2 + 80048fe: 60fb str r3, [r7, #12] + MODIFY_REG(tmpbdtr, TIM_BDTR_BKE, sBreakDeadTimeConfig->BreakState); + 8004900: 68fb ldr r3, [r7, #12] + 8004902: f423 5280 bic.w r2, r3, #4096 ; 0x1000 + 8004906: 683b ldr r3, [r7, #0] + 8004908: 691b ldr r3, [r3, #16] + 800490a: 4313 orrs r3, r2 + 800490c: 60fb str r3, [r7, #12] + MODIFY_REG(tmpbdtr, TIM_BDTR_BKP, sBreakDeadTimeConfig->BreakPolarity); + 800490e: 68fb ldr r3, [r7, #12] + 8004910: f423 5200 bic.w r2, r3, #8192 ; 0x2000 + 8004914: 683b ldr r3, [r7, #0] + 8004916: 695b ldr r3, [r3, #20] + 8004918: 4313 orrs r3, r2 + 800491a: 60fb str r3, [r7, #12] + MODIFY_REG(tmpbdtr, TIM_BDTR_AOE, sBreakDeadTimeConfig->AutomaticOutput); + 800491c: 68fb ldr r3, [r7, #12] + 800491e: f423 4280 bic.w r2, r3, #16384 ; 0x4000 + 8004922: 683b ldr r3, [r7, #0] + 8004924: 69db ldr r3, [r3, #28] + 8004926: 4313 orrs r3, r2 + 8004928: 60fb str r3, [r7, #12] + + + /* Set TIMx_BDTR */ + htim->Instance->BDTR = tmpbdtr; + 800492a: 687b ldr r3, [r7, #4] + 800492c: 681b ldr r3, [r3, #0] + 800492e: 68fa ldr r2, [r7, #12] + 8004930: 645a str r2, [r3, #68] ; 0x44 + + __HAL_UNLOCK(htim); + 8004932: 687b ldr r3, [r7, #4] + 8004934: 2200 movs r2, #0 + 8004936: f883 203c strb.w r2, [r3, #60] ; 0x3c + + return HAL_OK; + 800493a: 2300 movs r3, #0 +} + 800493c: 4618 mov r0, r3 + 800493e: 3714 adds r7, #20 + 8004940: 46bd mov sp, r7 + 8004942: bc80 pop {r7} + 8004944: 4770 bx lr + +08004946 : + * @brief Hall commutation changed callback in non-blocking mode + * @param htim TIM handle + * @retval None + */ +__weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim) +{ + 8004946: b480 push {r7} + 8004948: b083 sub sp, #12 + 800494a: af00 add r7, sp, #0 + 800494c: 6078 str r0, [r7, #4] + 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 + */ +} + 800494e: bf00 nop + 8004950: 370c adds r7, #12 + 8004952: 46bd mov sp, r7 + 8004954: bc80 pop {r7} + 8004956: 4770 bx lr + +08004958 : + * @brief Hall Break detection callback in non-blocking mode + * @param htim TIM handle + * @retval None + */ +__weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim) +{ + 8004958: b480 push {r7} + 800495a: b083 sub sp, #12 + 800495c: af00 add r7, sp, #0 + 800495e: 6078 str r0, [r7, #4] + 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 + */ +} + 8004960: bf00 nop + 8004962: 370c adds r7, #12 + 8004964: 46bd mov sp, r7 + 8004966: bc80 pop {r7} + 8004968: 4770 bx lr + +0800496a : + * @param huart Pointer to a UART_HandleTypeDef structure that contains + * the configuration information for the specified UART module. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart) +{ + 800496a: b580 push {r7, lr} + 800496c: b082 sub sp, #8 + 800496e: af00 add r7, sp, #0 + 8004970: 6078 str r0, [r7, #4] + /* Check the UART handle allocation */ + if (huart == NULL) + 8004972: 687b ldr r3, [r7, #4] + 8004974: 2b00 cmp r3, #0 + 8004976: d101 bne.n 800497c + { + return HAL_ERROR; + 8004978: 2301 movs r3, #1 + 800497a: e042 b.n 8004a02 + assert_param(IS_UART_INSTANCE(huart->Instance)); + } + assert_param(IS_UART_WORD_LENGTH(huart->Init.WordLength)); + assert_param(IS_UART_OVERSAMPLING(huart->Init.OverSampling)); + + if (huart->gState == HAL_UART_STATE_RESET) + 800497c: 687b ldr r3, [r7, #4] + 800497e: f893 3041 ldrb.w r3, [r3, #65] ; 0x41 + 8004982: b2db uxtb r3, r3 + 8004984: 2b00 cmp r3, #0 + 8004986: d106 bne.n 8004996 + { + /* Allocate lock resource and initialize it */ + huart->Lock = HAL_UNLOCKED; + 8004988: 687b ldr r3, [r7, #4] + 800498a: 2200 movs r2, #0 + 800498c: f883 2040 strb.w r2, [r3, #64] ; 0x40 + + /* Init the low level hardware */ + huart->MspInitCallback(huart); +#else + /* Init the low level hardware : GPIO, CLOCK */ + HAL_UART_MspInit(huart); + 8004990: 6878 ldr r0, [r7, #4] + 8004992: f7fc fba5 bl 80010e0 +#endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ + } + + huart->gState = HAL_UART_STATE_BUSY; + 8004996: 687b ldr r3, [r7, #4] + 8004998: 2224 movs r2, #36 ; 0x24 + 800499a: f883 2041 strb.w r2, [r3, #65] ; 0x41 + + /* Disable the peripheral */ + __HAL_UART_DISABLE(huart); + 800499e: 687b ldr r3, [r7, #4] + 80049a0: 681b ldr r3, [r3, #0] + 80049a2: 68da ldr r2, [r3, #12] + 80049a4: 687b ldr r3, [r7, #4] + 80049a6: 681b ldr r3, [r3, #0] + 80049a8: f422 5200 bic.w r2, r2, #8192 ; 0x2000 + 80049ac: 60da str r2, [r3, #12] + + /* Set the UART Communication parameters */ + UART_SetConfig(huart); + 80049ae: 6878 ldr r0, [r7, #4] + 80049b0: f000 f82c bl 8004a0c + + /* In asynchronous mode, the following bits must be kept cleared: + - LINEN and CLKEN bits in the USART_CR2 register, + - SCEN, HDSEL and IREN bits in the USART_CR3 register.*/ + CLEAR_BIT(huart->Instance->CR2, (USART_CR2_LINEN | USART_CR2_CLKEN)); + 80049b4: 687b ldr r3, [r7, #4] + 80049b6: 681b ldr r3, [r3, #0] + 80049b8: 691a ldr r2, [r3, #16] + 80049ba: 687b ldr r3, [r7, #4] + 80049bc: 681b ldr r3, [r3, #0] + 80049be: f422 4290 bic.w r2, r2, #18432 ; 0x4800 + 80049c2: 611a str r2, [r3, #16] + CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN)); + 80049c4: 687b ldr r3, [r7, #4] + 80049c6: 681b ldr r3, [r3, #0] + 80049c8: 695a ldr r2, [r3, #20] + 80049ca: 687b ldr r3, [r7, #4] + 80049cc: 681b ldr r3, [r3, #0] + 80049ce: f022 022a bic.w r2, r2, #42 ; 0x2a + 80049d2: 615a str r2, [r3, #20] + + /* Enable the peripheral */ + __HAL_UART_ENABLE(huart); + 80049d4: 687b ldr r3, [r7, #4] + 80049d6: 681b ldr r3, [r3, #0] + 80049d8: 68da ldr r2, [r3, #12] + 80049da: 687b ldr r3, [r7, #4] + 80049dc: 681b ldr r3, [r3, #0] + 80049de: f442 5200 orr.w r2, r2, #8192 ; 0x2000 + 80049e2: 60da str r2, [r3, #12] + + /* Initialize the UART state */ + huart->ErrorCode = HAL_UART_ERROR_NONE; + 80049e4: 687b ldr r3, [r7, #4] + 80049e6: 2200 movs r2, #0 + 80049e8: 645a str r2, [r3, #68] ; 0x44 + huart->gState = HAL_UART_STATE_READY; + 80049ea: 687b ldr r3, [r7, #4] + 80049ec: 2220 movs r2, #32 + 80049ee: f883 2041 strb.w r2, [r3, #65] ; 0x41 + huart->RxState = HAL_UART_STATE_READY; + 80049f2: 687b ldr r3, [r7, #4] + 80049f4: 2220 movs r2, #32 + 80049f6: f883 2042 strb.w r2, [r3, #66] ; 0x42 + huart->RxEventType = HAL_UART_RXEVENT_TC; + 80049fa: 687b ldr r3, [r7, #4] + 80049fc: 2200 movs r2, #0 + 80049fe: 635a str r2, [r3, #52] ; 0x34 + + return HAL_OK; + 8004a00: 2300 movs r3, #0 +} + 8004a02: 4618 mov r0, r3 + 8004a04: 3708 adds r7, #8 + 8004a06: 46bd mov sp, r7 + 8004a08: bd80 pop {r7, pc} + ... + +08004a0c : + * @param huart Pointer to a UART_HandleTypeDef structure that contains + * the configuration information for the specified UART module. + * @retval None + */ +static void UART_SetConfig(UART_HandleTypeDef *huart) +{ + 8004a0c: b580 push {r7, lr} + 8004a0e: b084 sub sp, #16 + 8004a10: af00 add r7, sp, #0 + 8004a12: 6078 str r0, [r7, #4] + assert_param(IS_UART_MODE(huart->Init.Mode)); + + /*-------------------------- USART CR2 Configuration -----------------------*/ + /* Configure the UART Stop Bits: Set STOP[13:12] bits + according to huart->Init.StopBits value */ + MODIFY_REG(huart->Instance->CR2, USART_CR2_STOP, huart->Init.StopBits); + 8004a14: 687b ldr r3, [r7, #4] + 8004a16: 681b ldr r3, [r3, #0] + 8004a18: 691b ldr r3, [r3, #16] + 8004a1a: f423 5140 bic.w r1, r3, #12288 ; 0x3000 + 8004a1e: 687b ldr r3, [r7, #4] + 8004a20: 68da ldr r2, [r3, #12] + 8004a22: 687b ldr r3, [r7, #4] + 8004a24: 681b ldr r3, [r3, #0] + 8004a26: 430a orrs r2, r1 + 8004a28: 611a str r2, [r3, #16] + Set the M bits according to huart->Init.WordLength value + Set PCE and PS bits according to huart->Init.Parity value + Set TE and RE bits according to huart->Init.Mode value + Set OVER8 bit according to huart->Init.OverSampling value */ + + tmpreg = (uint32_t)huart->Init.WordLength | huart->Init.Parity | huart->Init.Mode | huart->Init.OverSampling; + 8004a2a: 687b ldr r3, [r7, #4] + 8004a2c: 689a ldr r2, [r3, #8] + 8004a2e: 687b ldr r3, [r7, #4] + 8004a30: 691b ldr r3, [r3, #16] + 8004a32: 431a orrs r2, r3 + 8004a34: 687b ldr r3, [r7, #4] + 8004a36: 695b ldr r3, [r3, #20] + 8004a38: 431a orrs r2, r3 + 8004a3a: 687b ldr r3, [r7, #4] + 8004a3c: 69db ldr r3, [r3, #28] + 8004a3e: 4313 orrs r3, r2 + 8004a40: 60bb str r3, [r7, #8] + MODIFY_REG(huart->Instance->CR1, + 8004a42: 687b ldr r3, [r7, #4] + 8004a44: 681b ldr r3, [r3, #0] + 8004a46: 68db ldr r3, [r3, #12] + 8004a48: f423 4316 bic.w r3, r3, #38400 ; 0x9600 + 8004a4c: f023 030c bic.w r3, r3, #12 + 8004a50: 687a ldr r2, [r7, #4] + 8004a52: 6812 ldr r2, [r2, #0] + 8004a54: 68b9 ldr r1, [r7, #8] + 8004a56: 430b orrs r3, r1 + 8004a58: 60d3 str r3, [r2, #12] + (uint32_t)(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS | USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8), + tmpreg); + + /*-------------------------- USART CR3 Configuration -----------------------*/ + /* Configure the UART HFC: Set CTSE and RTSE bits according to huart->Init.HwFlowCtl value */ + MODIFY_REG(huart->Instance->CR3, (USART_CR3_RTSE | USART_CR3_CTSE), huart->Init.HwFlowCtl); + 8004a5a: 687b ldr r3, [r7, #4] + 8004a5c: 681b ldr r3, [r3, #0] + 8004a5e: 695b ldr r3, [r3, #20] + 8004a60: f423 7140 bic.w r1, r3, #768 ; 0x300 + 8004a64: 687b ldr r3, [r7, #4] + 8004a66: 699a ldr r2, [r3, #24] + 8004a68: 687b ldr r3, [r7, #4] + 8004a6a: 681b ldr r3, [r3, #0] + 8004a6c: 430a orrs r2, r1 + 8004a6e: 615a str r2, [r3, #20] + + + if((huart->Instance == USART1) || (huart->Instance == USART6)) + 8004a70: 687b ldr r3, [r7, #4] + 8004a72: 681b ldr r3, [r3, #0] + 8004a74: 4a57 ldr r2, [pc, #348] ; (8004bd4 ) + 8004a76: 4293 cmp r3, r2 + 8004a78: d004 beq.n 8004a84 + 8004a7a: 687b ldr r3, [r7, #4] + 8004a7c: 681b ldr r3, [r3, #0] + 8004a7e: 4a56 ldr r2, [pc, #344] ; (8004bd8 ) + 8004a80: 4293 cmp r3, r2 + 8004a82: d103 bne.n 8004a8c + { + pclk = HAL_RCC_GetPCLK2Freq(); + 8004a84: f7fe fef2 bl 800386c + 8004a88: 60f8 str r0, [r7, #12] + 8004a8a: e002 b.n 8004a92 + } + else + { + pclk = HAL_RCC_GetPCLK1Freq(); + 8004a8c: f7fe fecc bl 8003828 + 8004a90: 60f8 str r0, [r7, #12] + } + + /*-------------------------- USART BRR Configuration ---------------------*/ + if (huart->Init.OverSampling == UART_OVERSAMPLING_8) + 8004a92: 687b ldr r3, [r7, #4] + 8004a94: 69db ldr r3, [r3, #28] + 8004a96: f5b3 4f00 cmp.w r3, #32768 ; 0x8000 + 8004a9a: d14c bne.n 8004b36 + { + huart->Instance->BRR = UART_BRR_SAMPLING8(pclk, huart->Init.BaudRate); + 8004a9c: 68fa ldr r2, [r7, #12] + 8004a9e: 4613 mov r3, r2 + 8004aa0: 009b lsls r3, r3, #2 + 8004aa2: 4413 add r3, r2 + 8004aa4: 009a lsls r2, r3, #2 + 8004aa6: 441a add r2, r3 + 8004aa8: 687b ldr r3, [r7, #4] + 8004aaa: 685b ldr r3, [r3, #4] + 8004aac: 005b lsls r3, r3, #1 + 8004aae: fbb2 f3f3 udiv r3, r2, r3 + 8004ab2: 4a4a ldr r2, [pc, #296] ; (8004bdc ) + 8004ab4: fba2 2303 umull r2, r3, r2, r3 + 8004ab8: 095b lsrs r3, r3, #5 + 8004aba: 0119 lsls r1, r3, #4 + 8004abc: 68fa ldr r2, [r7, #12] + 8004abe: 4613 mov r3, r2 + 8004ac0: 009b lsls r3, r3, #2 + 8004ac2: 4413 add r3, r2 + 8004ac4: 009a lsls r2, r3, #2 + 8004ac6: 441a add r2, r3 + 8004ac8: 687b ldr r3, [r7, #4] + 8004aca: 685b ldr r3, [r3, #4] + 8004acc: 005b lsls r3, r3, #1 + 8004ace: fbb2 f2f3 udiv r2, r2, r3 + 8004ad2: 4b42 ldr r3, [pc, #264] ; (8004bdc ) + 8004ad4: fba3 0302 umull r0, r3, r3, r2 + 8004ad8: 095b lsrs r3, r3, #5 + 8004ada: 2064 movs r0, #100 ; 0x64 + 8004adc: fb00 f303 mul.w r3, r0, r3 + 8004ae0: 1ad3 subs r3, r2, r3 + 8004ae2: 00db lsls r3, r3, #3 + 8004ae4: 3332 adds r3, #50 ; 0x32 + 8004ae6: 4a3d ldr r2, [pc, #244] ; (8004bdc ) + 8004ae8: fba2 2303 umull r2, r3, r2, r3 + 8004aec: 095b lsrs r3, r3, #5 + 8004aee: 005b lsls r3, r3, #1 + 8004af0: f403 73f8 and.w r3, r3, #496 ; 0x1f0 + 8004af4: 4419 add r1, r3 + 8004af6: 68fa ldr r2, [r7, #12] + 8004af8: 4613 mov r3, r2 + 8004afa: 009b lsls r3, r3, #2 + 8004afc: 4413 add r3, r2 + 8004afe: 009a lsls r2, r3, #2 + 8004b00: 441a add r2, r3 + 8004b02: 687b ldr r3, [r7, #4] + 8004b04: 685b ldr r3, [r3, #4] + 8004b06: 005b lsls r3, r3, #1 + 8004b08: fbb2 f2f3 udiv r2, r2, r3 + 8004b0c: 4b33 ldr r3, [pc, #204] ; (8004bdc ) + 8004b0e: fba3 0302 umull r0, r3, r3, r2 + 8004b12: 095b lsrs r3, r3, #5 + 8004b14: 2064 movs r0, #100 ; 0x64 + 8004b16: fb00 f303 mul.w r3, r0, r3 + 8004b1a: 1ad3 subs r3, r2, r3 + 8004b1c: 00db lsls r3, r3, #3 + 8004b1e: 3332 adds r3, #50 ; 0x32 + 8004b20: 4a2e ldr r2, [pc, #184] ; (8004bdc ) + 8004b22: fba2 2303 umull r2, r3, r2, r3 + 8004b26: 095b lsrs r3, r3, #5 + 8004b28: f003 0207 and.w r2, r3, #7 + 8004b2c: 687b ldr r3, [r7, #4] + 8004b2e: 681b ldr r3, [r3, #0] + 8004b30: 440a add r2, r1 + 8004b32: 609a str r2, [r3, #8] + } + else + { + huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate); + } +} + 8004b34: e04a b.n 8004bcc + huart->Instance->BRR = UART_BRR_SAMPLING16(pclk, huart->Init.BaudRate); + 8004b36: 68fa ldr r2, [r7, #12] + 8004b38: 4613 mov r3, r2 + 8004b3a: 009b lsls r3, r3, #2 + 8004b3c: 4413 add r3, r2 + 8004b3e: 009a lsls r2, r3, #2 + 8004b40: 441a add r2, r3 + 8004b42: 687b ldr r3, [r7, #4] + 8004b44: 685b ldr r3, [r3, #4] + 8004b46: 009b lsls r3, r3, #2 + 8004b48: fbb2 f3f3 udiv r3, r2, r3 + 8004b4c: 4a23 ldr r2, [pc, #140] ; (8004bdc ) + 8004b4e: fba2 2303 umull r2, r3, r2, r3 + 8004b52: 095b lsrs r3, r3, #5 + 8004b54: 0119 lsls r1, r3, #4 + 8004b56: 68fa ldr r2, [r7, #12] + 8004b58: 4613 mov r3, r2 + 8004b5a: 009b lsls r3, r3, #2 + 8004b5c: 4413 add r3, r2 + 8004b5e: 009a lsls r2, r3, #2 + 8004b60: 441a add r2, r3 + 8004b62: 687b ldr r3, [r7, #4] + 8004b64: 685b ldr r3, [r3, #4] + 8004b66: 009b lsls r3, r3, #2 + 8004b68: fbb2 f2f3 udiv r2, r2, r3 + 8004b6c: 4b1b ldr r3, [pc, #108] ; (8004bdc ) + 8004b6e: fba3 0302 umull r0, r3, r3, r2 + 8004b72: 095b lsrs r3, r3, #5 + 8004b74: 2064 movs r0, #100 ; 0x64 + 8004b76: fb00 f303 mul.w r3, r0, r3 + 8004b7a: 1ad3 subs r3, r2, r3 + 8004b7c: 011b lsls r3, r3, #4 + 8004b7e: 3332 adds r3, #50 ; 0x32 + 8004b80: 4a16 ldr r2, [pc, #88] ; (8004bdc ) + 8004b82: fba2 2303 umull r2, r3, r2, r3 + 8004b86: 095b lsrs r3, r3, #5 + 8004b88: f003 03f0 and.w r3, r3, #240 ; 0xf0 + 8004b8c: 4419 add r1, r3 + 8004b8e: 68fa ldr r2, [r7, #12] + 8004b90: 4613 mov r3, r2 + 8004b92: 009b lsls r3, r3, #2 + 8004b94: 4413 add r3, r2 + 8004b96: 009a lsls r2, r3, #2 + 8004b98: 441a add r2, r3 + 8004b9a: 687b ldr r3, [r7, #4] + 8004b9c: 685b ldr r3, [r3, #4] + 8004b9e: 009b lsls r3, r3, #2 + 8004ba0: fbb2 f2f3 udiv r2, r2, r3 + 8004ba4: 4b0d ldr r3, [pc, #52] ; (8004bdc ) + 8004ba6: fba3 0302 umull r0, r3, r3, r2 + 8004baa: 095b lsrs r3, r3, #5 + 8004bac: 2064 movs r0, #100 ; 0x64 + 8004bae: fb00 f303 mul.w r3, r0, r3 + 8004bb2: 1ad3 subs r3, r2, r3 + 8004bb4: 011b lsls r3, r3, #4 + 8004bb6: 3332 adds r3, #50 ; 0x32 + 8004bb8: 4a08 ldr r2, [pc, #32] ; (8004bdc ) + 8004bba: fba2 2303 umull r2, r3, r2, r3 + 8004bbe: 095b lsrs r3, r3, #5 + 8004bc0: f003 020f and.w r2, r3, #15 + 8004bc4: 687b ldr r3, [r7, #4] + 8004bc6: 681b ldr r3, [r3, #0] + 8004bc8: 440a add r2, r1 + 8004bca: 609a str r2, [r3, #8] +} + 8004bcc: bf00 nop + 8004bce: 3710 adds r7, #16 + 8004bd0: 46bd mov sp, r7 + 8004bd2: bd80 pop {r7, pc} + 8004bd4: 40011000 .word 0x40011000 + 8004bd8: 40011400 .word 0x40011400 + 8004bdc: 51eb851f .word 0x51eb851f + +08004be0 : + * @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains + * the configuration information for the specified USBx peripheral. + * @retval HAL status + */ +HAL_StatusTypeDef USB_CoreInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg) +{ + 8004be0: b084 sub sp, #16 + 8004be2: b580 push {r7, lr} + 8004be4: b084 sub sp, #16 + 8004be6: af00 add r7, sp, #0 + 8004be8: 6078 str r0, [r7, #4] + 8004bea: f107 001c add.w r0, r7, #28 + 8004bee: e880 000e stmia.w r0, {r1, r2, r3} + HAL_StatusTypeDef ret; + if (cfg.phy_itface == USB_OTG_ULPI_PHY) + 8004bf2: 6b3b ldr r3, [r7, #48] ; 0x30 + 8004bf4: 2b01 cmp r3, #1 + 8004bf6: d122 bne.n 8004c3e + { + USBx->GCCFG &= ~(USB_OTG_GCCFG_PWRDWN); + 8004bf8: 687b ldr r3, [r7, #4] + 8004bfa: 6b9b ldr r3, [r3, #56] ; 0x38 + 8004bfc: f423 3280 bic.w r2, r3, #65536 ; 0x10000 + 8004c00: 687b ldr r3, [r7, #4] + 8004c02: 639a str r2, [r3, #56] ; 0x38 + + /* Init The ULPI Interface */ + USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_TSDPS | USB_OTG_GUSBCFG_ULPIFSLS | USB_OTG_GUSBCFG_PHYSEL); + 8004c04: 687b ldr r3, [r7, #4] + 8004c06: 68db ldr r3, [r3, #12] + 8004c08: f423 0384 bic.w r3, r3, #4325376 ; 0x420000 + 8004c0c: f023 0340 bic.w r3, r3, #64 ; 0x40 + 8004c10: 687a ldr r2, [r7, #4] + 8004c12: 60d3 str r3, [r2, #12] + + /* Select vbus source */ + USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_ULPIEVBUSD | USB_OTG_GUSBCFG_ULPIEVBUSI); + 8004c14: 687b ldr r3, [r7, #4] + 8004c16: 68db ldr r3, [r3, #12] + 8004c18: f423 1240 bic.w r2, r3, #3145728 ; 0x300000 + 8004c1c: 687b ldr r3, [r7, #4] + 8004c1e: 60da str r2, [r3, #12] + if (cfg.use_external_vbus == 1U) + 8004c20: 6cfb ldr r3, [r7, #76] ; 0x4c + 8004c22: 2b01 cmp r3, #1 + 8004c24: d105 bne.n 8004c32 + { + USBx->GUSBCFG |= USB_OTG_GUSBCFG_ULPIEVBUSD; + 8004c26: 687b ldr r3, [r7, #4] + 8004c28: 68db ldr r3, [r3, #12] + 8004c2a: f443 1280 orr.w r2, r3, #1048576 ; 0x100000 + 8004c2e: 687b ldr r3, [r7, #4] + 8004c30: 60da str r2, [r3, #12] + } + + /* Reset after a PHY select */ + ret = USB_CoreReset(USBx); + 8004c32: 6878 ldr r0, [r7, #4] + 8004c34: f000 fa8c bl 8005150 + 8004c38: 4603 mov r3, r0 + 8004c3a: 73fb strb r3, [r7, #15] + 8004c3c: e010 b.n 8004c60 + } + else /* FS interface (embedded Phy) */ + { + /* Select FS Embedded PHY */ + USBx->GUSBCFG |= USB_OTG_GUSBCFG_PHYSEL; + 8004c3e: 687b ldr r3, [r7, #4] + 8004c40: 68db ldr r3, [r3, #12] + 8004c42: f043 0240 orr.w r2, r3, #64 ; 0x40 + 8004c46: 687b ldr r3, [r7, #4] + 8004c48: 60da str r2, [r3, #12] + + /* Reset after a PHY select */ + ret = USB_CoreReset(USBx); + 8004c4a: 6878 ldr r0, [r7, #4] + 8004c4c: f000 fa80 bl 8005150 + 8004c50: 4603 mov r3, r0 + 8004c52: 73fb strb r3, [r7, #15] + + /* Activate the USB Transceiver */ + USBx->GCCFG |= USB_OTG_GCCFG_PWRDWN; + 8004c54: 687b ldr r3, [r7, #4] + 8004c56: 6b9b ldr r3, [r3, #56] ; 0x38 + 8004c58: f443 3280 orr.w r2, r3, #65536 ; 0x10000 + 8004c5c: 687b ldr r3, [r7, #4] + 8004c5e: 639a str r2, [r3, #56] ; 0x38 + } + + if (cfg.dma_enable == 1U) + 8004c60: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004c62: 2b01 cmp r3, #1 + 8004c64: d10b bne.n 8004c7e + { + USBx->GAHBCFG |= USB_OTG_GAHBCFG_HBSTLEN_2; + 8004c66: 687b ldr r3, [r7, #4] + 8004c68: 689b ldr r3, [r3, #8] + 8004c6a: f043 0206 orr.w r2, r3, #6 + 8004c6e: 687b ldr r3, [r7, #4] + 8004c70: 609a str r2, [r3, #8] + USBx->GAHBCFG |= USB_OTG_GAHBCFG_DMAEN; + 8004c72: 687b ldr r3, [r7, #4] + 8004c74: 689b ldr r3, [r3, #8] + 8004c76: f043 0220 orr.w r2, r3, #32 + 8004c7a: 687b ldr r3, [r7, #4] + 8004c7c: 609a str r2, [r3, #8] + } + + return ret; + 8004c7e: 7bfb ldrb r3, [r7, #15] +} + 8004c80: 4618 mov r0, r3 + 8004c82: 3710 adds r7, #16 + 8004c84: 46bd mov sp, r7 + 8004c86: e8bd 4080 ldmia.w sp!, {r7, lr} + 8004c8a: b004 add sp, #16 + 8004c8c: 4770 bx lr + +08004c8e : + * Disable the controller's Global Int in the AHB Config reg + * @param USBx Selected device + * @retval HAL status + */ +HAL_StatusTypeDef USB_DisableGlobalInt(USB_OTG_GlobalTypeDef *USBx) +{ + 8004c8e: b480 push {r7} + 8004c90: b083 sub sp, #12 + 8004c92: af00 add r7, sp, #0 + 8004c94: 6078 str r0, [r7, #4] + USBx->GAHBCFG &= ~USB_OTG_GAHBCFG_GINT; + 8004c96: 687b ldr r3, [r7, #4] + 8004c98: 689b ldr r3, [r3, #8] + 8004c9a: f023 0201 bic.w r2, r3, #1 + 8004c9e: 687b ldr r3, [r7, #4] + 8004ca0: 609a str r2, [r3, #8] + return HAL_OK; + 8004ca2: 2300 movs r3, #0 +} + 8004ca4: 4618 mov r0, r3 + 8004ca6: 370c adds r7, #12 + 8004ca8: 46bd mov sp, r7 + 8004caa: bc80 pop {r7} + 8004cac: 4770 bx lr + +08004cae : + * @arg USB_DEVICE_MODE Peripheral mode + * @arg USB_HOST_MODE Host mode + * @retval HAL status + */ +HAL_StatusTypeDef USB_SetCurrentMode(USB_OTG_GlobalTypeDef *USBx, USB_OTG_ModeTypeDef mode) +{ + 8004cae: b580 push {r7, lr} + 8004cb0: b084 sub sp, #16 + 8004cb2: af00 add r7, sp, #0 + 8004cb4: 6078 str r0, [r7, #4] + 8004cb6: 460b mov r3, r1 + 8004cb8: 70fb strb r3, [r7, #3] + uint32_t ms = 0U; + 8004cba: 2300 movs r3, #0 + 8004cbc: 60fb str r3, [r7, #12] + + USBx->GUSBCFG &= ~(USB_OTG_GUSBCFG_FHMOD | USB_OTG_GUSBCFG_FDMOD); + 8004cbe: 687b ldr r3, [r7, #4] + 8004cc0: 68db ldr r3, [r3, #12] + 8004cc2: f023 42c0 bic.w r2, r3, #1610612736 ; 0x60000000 + 8004cc6: 687b ldr r3, [r7, #4] + 8004cc8: 60da str r2, [r3, #12] + + if (mode == USB_HOST_MODE) + 8004cca: 78fb ldrb r3, [r7, #3] + 8004ccc: 2b01 cmp r3, #1 + 8004cce: d115 bne.n 8004cfc + { + USBx->GUSBCFG |= USB_OTG_GUSBCFG_FHMOD; + 8004cd0: 687b ldr r3, [r7, #4] + 8004cd2: 68db ldr r3, [r3, #12] + 8004cd4: f043 5200 orr.w r2, r3, #536870912 ; 0x20000000 + 8004cd8: 687b ldr r3, [r7, #4] + 8004cda: 60da str r2, [r3, #12] + + do + { + HAL_Delay(1U); + 8004cdc: 2001 movs r0, #1 + 8004cde: f7fc fc39 bl 8001554 + ms++; + 8004ce2: 68fb ldr r3, [r7, #12] + 8004ce4: 3301 adds r3, #1 + 8004ce6: 60fb str r3, [r7, #12] + } while ((USB_GetMode(USBx) != (uint32_t)USB_HOST_MODE) && (ms < 50U)); + 8004ce8: 6878 ldr r0, [r7, #4] + 8004cea: f000 fa23 bl 8005134 + 8004cee: 4603 mov r3, r0 + 8004cf0: 2b01 cmp r3, #1 + 8004cf2: d01e beq.n 8004d32 + 8004cf4: 68fb ldr r3, [r7, #12] + 8004cf6: 2b31 cmp r3, #49 ; 0x31 + 8004cf8: d9f0 bls.n 8004cdc + 8004cfa: e01a b.n 8004d32 + } + else if (mode == USB_DEVICE_MODE) + 8004cfc: 78fb ldrb r3, [r7, #3] + 8004cfe: 2b00 cmp r3, #0 + 8004d00: d115 bne.n 8004d2e + { + USBx->GUSBCFG |= USB_OTG_GUSBCFG_FDMOD; + 8004d02: 687b ldr r3, [r7, #4] + 8004d04: 68db ldr r3, [r3, #12] + 8004d06: f043 4280 orr.w r2, r3, #1073741824 ; 0x40000000 + 8004d0a: 687b ldr r3, [r7, #4] + 8004d0c: 60da str r2, [r3, #12] + + do + { + HAL_Delay(1U); + 8004d0e: 2001 movs r0, #1 + 8004d10: f7fc fc20 bl 8001554 + ms++; + 8004d14: 68fb ldr r3, [r7, #12] + 8004d16: 3301 adds r3, #1 + 8004d18: 60fb str r3, [r7, #12] + } while ((USB_GetMode(USBx) != (uint32_t)USB_DEVICE_MODE) && (ms < 50U)); + 8004d1a: 6878 ldr r0, [r7, #4] + 8004d1c: f000 fa0a bl 8005134 + 8004d20: 4603 mov r3, r0 + 8004d22: 2b00 cmp r3, #0 + 8004d24: d005 beq.n 8004d32 + 8004d26: 68fb ldr r3, [r7, #12] + 8004d28: 2b31 cmp r3, #49 ; 0x31 + 8004d2a: d9f0 bls.n 8004d0e + 8004d2c: e001 b.n 8004d32 + } + else + { + return HAL_ERROR; + 8004d2e: 2301 movs r3, #1 + 8004d30: e005 b.n 8004d3e + } + + if (ms == 50U) + 8004d32: 68fb ldr r3, [r7, #12] + 8004d34: 2b32 cmp r3, #50 ; 0x32 + 8004d36: d101 bne.n 8004d3c + { + return HAL_ERROR; + 8004d38: 2301 movs r3, #1 + 8004d3a: e000 b.n 8004d3e + } + + return HAL_OK; + 8004d3c: 2300 movs r3, #0 +} + 8004d3e: 4618 mov r0, r3 + 8004d40: 3710 adds r7, #16 + 8004d42: 46bd mov sp, r7 + 8004d44: bd80 pop {r7, pc} + ... + +08004d48 : + * @param cfg pointer to a USB_OTG_CfgTypeDef structure that contains + * the configuration information for the specified USBx peripheral. + * @retval HAL status + */ +HAL_StatusTypeDef USB_DevInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg) +{ + 8004d48: b084 sub sp, #16 + 8004d4a: b580 push {r7, lr} + 8004d4c: b086 sub sp, #24 + 8004d4e: af00 add r7, sp, #0 + 8004d50: 6078 str r0, [r7, #4] + 8004d52: f107 0024 add.w r0, r7, #36 ; 0x24 + 8004d56: e880 000e stmia.w r0, {r1, r2, r3} + HAL_StatusTypeDef ret = HAL_OK; + 8004d5a: 2300 movs r3, #0 + 8004d5c: 75fb strb r3, [r7, #23] + uint32_t USBx_BASE = (uint32_t)USBx; + 8004d5e: 687b ldr r3, [r7, #4] + 8004d60: 60fb str r3, [r7, #12] + uint32_t i; + + for (i = 0U; i < 15U; i++) + 8004d62: 2300 movs r3, #0 + 8004d64: 613b str r3, [r7, #16] + 8004d66: e009 b.n 8004d7c + { + USBx->DIEPTXF[i] = 0U; + 8004d68: 687a ldr r2, [r7, #4] + 8004d6a: 693b ldr r3, [r7, #16] + 8004d6c: 3340 adds r3, #64 ; 0x40 + 8004d6e: 009b lsls r3, r3, #2 + 8004d70: 4413 add r3, r2 + 8004d72: 2200 movs r2, #0 + 8004d74: 605a str r2, [r3, #4] + for (i = 0U; i < 15U; i++) + 8004d76: 693b ldr r3, [r7, #16] + 8004d78: 3301 adds r3, #1 + 8004d7a: 613b str r3, [r7, #16] + 8004d7c: 693b ldr r3, [r7, #16] + 8004d7e: 2b0e cmp r3, #14 + 8004d80: d9f2 bls.n 8004d68 + } + + /* VBUS Sensing setup */ + if (cfg.vbus_sensing_enable == 0U) + 8004d82: 6cfb ldr r3, [r7, #76] ; 0x4c + 8004d84: 2b00 cmp r3, #0 + 8004d86: d11c bne.n 8004dc2 + { + /* + * disable HW VBUS sensing. VBUS is internally considered to be always + * at VBUS-Valid level (5V). + */ + USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS; + 8004d88: 68fb ldr r3, [r7, #12] + 8004d8a: f503 6300 add.w r3, r3, #2048 ; 0x800 + 8004d8e: 685b ldr r3, [r3, #4] + 8004d90: 68fa ldr r2, [r7, #12] + 8004d92: f502 6200 add.w r2, r2, #2048 ; 0x800 + 8004d96: f043 0302 orr.w r3, r3, #2 + 8004d9a: 6053 str r3, [r2, #4] + USBx->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS; + 8004d9c: 687b ldr r3, [r7, #4] + 8004d9e: 6b9b ldr r3, [r3, #56] ; 0x38 + 8004da0: f443 1200 orr.w r2, r3, #2097152 ; 0x200000 + 8004da4: 687b ldr r3, [r7, #4] + 8004da6: 639a str r2, [r3, #56] ; 0x38 + USBx->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN; + 8004da8: 687b ldr r3, [r7, #4] + 8004daa: 6b9b ldr r3, [r3, #56] ; 0x38 + 8004dac: f423 2200 bic.w r2, r3, #524288 ; 0x80000 + 8004db0: 687b ldr r3, [r7, #4] + 8004db2: 639a str r2, [r3, #56] ; 0x38 + USBx->GCCFG &= ~USB_OTG_GCCFG_VBUSASEN; + 8004db4: 687b ldr r3, [r7, #4] + 8004db6: 6b9b ldr r3, [r3, #56] ; 0x38 + 8004db8: f423 2280 bic.w r2, r3, #262144 ; 0x40000 + 8004dbc: 687b ldr r3, [r7, #4] + 8004dbe: 639a str r2, [r3, #56] ; 0x38 + 8004dc0: e00b b.n 8004dda + } + else + { + /* Enable HW VBUS sensing */ + USBx->GCCFG &= ~USB_OTG_GCCFG_NOVBUSSENS; + 8004dc2: 687b ldr r3, [r7, #4] + 8004dc4: 6b9b ldr r3, [r3, #56] ; 0x38 + 8004dc6: f423 1200 bic.w r2, r3, #2097152 ; 0x200000 + 8004dca: 687b ldr r3, [r7, #4] + 8004dcc: 639a str r2, [r3, #56] ; 0x38 + USBx->GCCFG |= USB_OTG_GCCFG_VBUSBSEN; + 8004dce: 687b ldr r3, [r7, #4] + 8004dd0: 6b9b ldr r3, [r3, #56] ; 0x38 + 8004dd2: f443 2200 orr.w r2, r3, #524288 ; 0x80000 + 8004dd6: 687b ldr r3, [r7, #4] + 8004dd8: 639a str r2, [r3, #56] ; 0x38 + } + + /* Restart the Phy Clock */ + USBx_PCGCCTL = 0U; + 8004dda: 68fb ldr r3, [r7, #12] + 8004ddc: f503 6360 add.w r3, r3, #3584 ; 0xe00 + 8004de0: 461a mov r2, r3 + 8004de2: 2300 movs r3, #0 + 8004de4: 6013 str r3, [r2, #0] + + if (cfg.phy_itface == USB_OTG_ULPI_PHY) + 8004de6: 6bbb ldr r3, [r7, #56] ; 0x38 + 8004de8: 2b01 cmp r3, #1 + 8004dea: d10c bne.n 8004e06 + { + if (cfg.speed == USBD_HS_SPEED) + 8004dec: 6b3b ldr r3, [r7, #48] ; 0x30 + 8004dee: 2b00 cmp r3, #0 + 8004df0: d104 bne.n 8004dfc + { + /* Set Core speed to High speed mode */ + (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_HIGH); + 8004df2: 2100 movs r1, #0 + 8004df4: 6878 ldr r0, [r7, #4] + 8004df6: f000 f965 bl 80050c4 + 8004dfa: e008 b.n 8004e0e + } + else + { + /* Set Core speed to Full speed mode */ + (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_HIGH_IN_FULL); + 8004dfc: 2101 movs r1, #1 + 8004dfe: 6878 ldr r0, [r7, #4] + 8004e00: f000 f960 bl 80050c4 + 8004e04: e003 b.n 8004e0e + } + } + else + { + /* Set Core speed to Full speed mode */ + (void)USB_SetDevSpeed(USBx, USB_OTG_SPEED_FULL); + 8004e06: 2103 movs r1, #3 + 8004e08: 6878 ldr r0, [r7, #4] + 8004e0a: f000 f95b bl 80050c4 + } + + /* Flush the FIFOs */ + if (USB_FlushTxFifo(USBx, 0x10U) != HAL_OK) /* all Tx FIFOs */ + 8004e0e: 2110 movs r1, #16 + 8004e10: 6878 ldr r0, [r7, #4] + 8004e12: f000 f8f3 bl 8004ffc + 8004e16: 4603 mov r3, r0 + 8004e18: 2b00 cmp r3, #0 + 8004e1a: d001 beq.n 8004e20 + { + ret = HAL_ERROR; + 8004e1c: 2301 movs r3, #1 + 8004e1e: 75fb strb r3, [r7, #23] + } + + if (USB_FlushRxFifo(USBx) != HAL_OK) + 8004e20: 6878 ldr r0, [r7, #4] + 8004e22: f000 f91f bl 8005064 + 8004e26: 4603 mov r3, r0 + 8004e28: 2b00 cmp r3, #0 + 8004e2a: d001 beq.n 8004e30 + { + ret = HAL_ERROR; + 8004e2c: 2301 movs r3, #1 + 8004e2e: 75fb strb r3, [r7, #23] + } + + /* Clear all pending Device Interrupts */ + USBx_DEVICE->DIEPMSK = 0U; + 8004e30: 68fb ldr r3, [r7, #12] + 8004e32: f503 6300 add.w r3, r3, #2048 ; 0x800 + 8004e36: 461a mov r2, r3 + 8004e38: 2300 movs r3, #0 + 8004e3a: 6113 str r3, [r2, #16] + USBx_DEVICE->DOEPMSK = 0U; + 8004e3c: 68fb ldr r3, [r7, #12] + 8004e3e: f503 6300 add.w r3, r3, #2048 ; 0x800 + 8004e42: 461a mov r2, r3 + 8004e44: 2300 movs r3, #0 + 8004e46: 6153 str r3, [r2, #20] + USBx_DEVICE->DAINTMSK = 0U; + 8004e48: 68fb ldr r3, [r7, #12] + 8004e4a: f503 6300 add.w r3, r3, #2048 ; 0x800 + 8004e4e: 461a mov r2, r3 + 8004e50: 2300 movs r3, #0 + 8004e52: 61d3 str r3, [r2, #28] + + for (i = 0U; i < cfg.dev_endpoints; i++) + 8004e54: 2300 movs r3, #0 + 8004e56: 613b str r3, [r7, #16] + 8004e58: e043 b.n 8004ee2 + { + if ((USBx_INEP(i)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) == USB_OTG_DIEPCTL_EPENA) + 8004e5a: 693b ldr r3, [r7, #16] + 8004e5c: 015a lsls r2, r3, #5 + 8004e5e: 68fb ldr r3, [r7, #12] + 8004e60: 4413 add r3, r2 + 8004e62: f503 6310 add.w r3, r3, #2304 ; 0x900 + 8004e66: 681b ldr r3, [r3, #0] + 8004e68: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000 + 8004e6c: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 + 8004e70: d118 bne.n 8004ea4 + { + if (i == 0U) + 8004e72: 693b ldr r3, [r7, #16] + 8004e74: 2b00 cmp r3, #0 + 8004e76: d10a bne.n 8004e8e + { + USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_SNAK; + 8004e78: 693b ldr r3, [r7, #16] + 8004e7a: 015a lsls r2, r3, #5 + 8004e7c: 68fb ldr r3, [r7, #12] + 8004e7e: 4413 add r3, r2 + 8004e80: f503 6310 add.w r3, r3, #2304 ; 0x900 + 8004e84: 461a mov r2, r3 + 8004e86: f04f 6300 mov.w r3, #134217728 ; 0x8000000 + 8004e8a: 6013 str r3, [r2, #0] + 8004e8c: e013 b.n 8004eb6 + } + else + { + USBx_INEP(i)->DIEPCTL = USB_OTG_DIEPCTL_EPDIS | USB_OTG_DIEPCTL_SNAK; + 8004e8e: 693b ldr r3, [r7, #16] + 8004e90: 015a lsls r2, r3, #5 + 8004e92: 68fb ldr r3, [r7, #12] + 8004e94: 4413 add r3, r2 + 8004e96: f503 6310 add.w r3, r3, #2304 ; 0x900 + 8004e9a: 461a mov r2, r3 + 8004e9c: f04f 4390 mov.w r3, #1207959552 ; 0x48000000 + 8004ea0: 6013 str r3, [r2, #0] + 8004ea2: e008 b.n 8004eb6 + } + } + else + { + USBx_INEP(i)->DIEPCTL = 0U; + 8004ea4: 693b ldr r3, [r7, #16] + 8004ea6: 015a lsls r2, r3, #5 + 8004ea8: 68fb ldr r3, [r7, #12] + 8004eaa: 4413 add r3, r2 + 8004eac: f503 6310 add.w r3, r3, #2304 ; 0x900 + 8004eb0: 461a mov r2, r3 + 8004eb2: 2300 movs r3, #0 + 8004eb4: 6013 str r3, [r2, #0] + } + + USBx_INEP(i)->DIEPTSIZ = 0U; + 8004eb6: 693b ldr r3, [r7, #16] + 8004eb8: 015a lsls r2, r3, #5 + 8004eba: 68fb ldr r3, [r7, #12] + 8004ebc: 4413 add r3, r2 + 8004ebe: f503 6310 add.w r3, r3, #2304 ; 0x900 + 8004ec2: 461a mov r2, r3 + 8004ec4: 2300 movs r3, #0 + 8004ec6: 6113 str r3, [r2, #16] + USBx_INEP(i)->DIEPINT = 0xFB7FU; + 8004ec8: 693b ldr r3, [r7, #16] + 8004eca: 015a lsls r2, r3, #5 + 8004ecc: 68fb ldr r3, [r7, #12] + 8004ece: 4413 add r3, r2 + 8004ed0: f503 6310 add.w r3, r3, #2304 ; 0x900 + 8004ed4: 461a mov r2, r3 + 8004ed6: f64f 337f movw r3, #64383 ; 0xfb7f + 8004eda: 6093 str r3, [r2, #8] + for (i = 0U; i < cfg.dev_endpoints; i++) + 8004edc: 693b ldr r3, [r7, #16] + 8004ede: 3301 adds r3, #1 + 8004ee0: 613b str r3, [r7, #16] + 8004ee2: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004ee4: 693a ldr r2, [r7, #16] + 8004ee6: 429a cmp r2, r3 + 8004ee8: d3b7 bcc.n 8004e5a + } + + for (i = 0U; i < cfg.dev_endpoints; i++) + 8004eea: 2300 movs r3, #0 + 8004eec: 613b str r3, [r7, #16] + 8004eee: e043 b.n 8004f78 + { + if ((USBx_OUTEP(i)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) == USB_OTG_DOEPCTL_EPENA) + 8004ef0: 693b ldr r3, [r7, #16] + 8004ef2: 015a lsls r2, r3, #5 + 8004ef4: 68fb ldr r3, [r7, #12] + 8004ef6: 4413 add r3, r2 + 8004ef8: f503 6330 add.w r3, r3, #2816 ; 0xb00 + 8004efc: 681b ldr r3, [r3, #0] + 8004efe: f003 4300 and.w r3, r3, #2147483648 ; 0x80000000 + 8004f02: f1b3 4f00 cmp.w r3, #2147483648 ; 0x80000000 + 8004f06: d118 bne.n 8004f3a + { + if (i == 0U) + 8004f08: 693b ldr r3, [r7, #16] + 8004f0a: 2b00 cmp r3, #0 + 8004f0c: d10a bne.n 8004f24 + { + USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_SNAK; + 8004f0e: 693b ldr r3, [r7, #16] + 8004f10: 015a lsls r2, r3, #5 + 8004f12: 68fb ldr r3, [r7, #12] + 8004f14: 4413 add r3, r2 + 8004f16: f503 6330 add.w r3, r3, #2816 ; 0xb00 + 8004f1a: 461a mov r2, r3 + 8004f1c: f04f 6300 mov.w r3, #134217728 ; 0x8000000 + 8004f20: 6013 str r3, [r2, #0] + 8004f22: e013 b.n 8004f4c + } + else + { + USBx_OUTEP(i)->DOEPCTL = USB_OTG_DOEPCTL_EPDIS | USB_OTG_DOEPCTL_SNAK; + 8004f24: 693b ldr r3, [r7, #16] + 8004f26: 015a lsls r2, r3, #5 + 8004f28: 68fb ldr r3, [r7, #12] + 8004f2a: 4413 add r3, r2 + 8004f2c: f503 6330 add.w r3, r3, #2816 ; 0xb00 + 8004f30: 461a mov r2, r3 + 8004f32: f04f 4390 mov.w r3, #1207959552 ; 0x48000000 + 8004f36: 6013 str r3, [r2, #0] + 8004f38: e008 b.n 8004f4c + } + } + else + { + USBx_OUTEP(i)->DOEPCTL = 0U; + 8004f3a: 693b ldr r3, [r7, #16] + 8004f3c: 015a lsls r2, r3, #5 + 8004f3e: 68fb ldr r3, [r7, #12] + 8004f40: 4413 add r3, r2 + 8004f42: f503 6330 add.w r3, r3, #2816 ; 0xb00 + 8004f46: 461a mov r2, r3 + 8004f48: 2300 movs r3, #0 + 8004f4a: 6013 str r3, [r2, #0] + } + + USBx_OUTEP(i)->DOEPTSIZ = 0U; + 8004f4c: 693b ldr r3, [r7, #16] + 8004f4e: 015a lsls r2, r3, #5 + 8004f50: 68fb ldr r3, [r7, #12] + 8004f52: 4413 add r3, r2 + 8004f54: f503 6330 add.w r3, r3, #2816 ; 0xb00 + 8004f58: 461a mov r2, r3 + 8004f5a: 2300 movs r3, #0 + 8004f5c: 6113 str r3, [r2, #16] + USBx_OUTEP(i)->DOEPINT = 0xFB7FU; + 8004f5e: 693b ldr r3, [r7, #16] + 8004f60: 015a lsls r2, r3, #5 + 8004f62: 68fb ldr r3, [r7, #12] + 8004f64: 4413 add r3, r2 + 8004f66: f503 6330 add.w r3, r3, #2816 ; 0xb00 + 8004f6a: 461a mov r2, r3 + 8004f6c: f64f 337f movw r3, #64383 ; 0xfb7f + 8004f70: 6093 str r3, [r2, #8] + for (i = 0U; i < cfg.dev_endpoints; i++) + 8004f72: 693b ldr r3, [r7, #16] + 8004f74: 3301 adds r3, #1 + 8004f76: 613b str r3, [r7, #16] + 8004f78: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004f7a: 693a ldr r2, [r7, #16] + 8004f7c: 429a cmp r2, r3 + 8004f7e: d3b7 bcc.n 8004ef0 + } + + USBx_DEVICE->DIEPMSK &= ~(USB_OTG_DIEPMSK_TXFURM); + 8004f80: 68fb ldr r3, [r7, #12] + 8004f82: f503 6300 add.w r3, r3, #2048 ; 0x800 + 8004f86: 691b ldr r3, [r3, #16] + 8004f88: 68fa ldr r2, [r7, #12] + 8004f8a: f502 6200 add.w r2, r2, #2048 ; 0x800 + 8004f8e: f423 7380 bic.w r3, r3, #256 ; 0x100 + 8004f92: 6113 str r3, [r2, #16] + + /* Disable all interrupts. */ + USBx->GINTMSK = 0U; + 8004f94: 687b ldr r3, [r7, #4] + 8004f96: 2200 movs r2, #0 + 8004f98: 619a str r2, [r3, #24] + + /* Clear any pending interrupts */ + USBx->GINTSTS = 0xBFFFFFFFU; + 8004f9a: 687b ldr r3, [r7, #4] + 8004f9c: f06f 4280 mvn.w r2, #1073741824 ; 0x40000000 + 8004fa0: 615a str r2, [r3, #20] + + /* Enable the common interrupts */ + if (cfg.dma_enable == 0U) + 8004fa2: 6afb ldr r3, [r7, #44] ; 0x2c + 8004fa4: 2b00 cmp r3, #0 + 8004fa6: d105 bne.n 8004fb4 + { + USBx->GINTMSK |= USB_OTG_GINTMSK_RXFLVLM; + 8004fa8: 687b ldr r3, [r7, #4] + 8004faa: 699b ldr r3, [r3, #24] + 8004fac: f043 0210 orr.w r2, r3, #16 + 8004fb0: 687b ldr r3, [r7, #4] + 8004fb2: 619a str r2, [r3, #24] + } + + /* Enable interrupts matching to the Device mode ONLY */ + USBx->GINTMSK |= USB_OTG_GINTMSK_USBSUSPM | USB_OTG_GINTMSK_USBRST | + 8004fb4: 687b ldr r3, [r7, #4] + 8004fb6: 699a ldr r2, [r3, #24] + 8004fb8: 4b0f ldr r3, [pc, #60] ; (8004ff8 ) + 8004fba: 4313 orrs r3, r2 + 8004fbc: 687a ldr r2, [r7, #4] + 8004fbe: 6193 str r3, [r2, #24] + USB_OTG_GINTMSK_ENUMDNEM | USB_OTG_GINTMSK_IEPINT | + USB_OTG_GINTMSK_OEPINT | USB_OTG_GINTMSK_IISOIXFRM | + USB_OTG_GINTMSK_PXFRM_IISOOXFRM | USB_OTG_GINTMSK_WUIM; + + if (cfg.Sof_enable != 0U) + 8004fc0: 6bfb ldr r3, [r7, #60] ; 0x3c + 8004fc2: 2b00 cmp r3, #0 + 8004fc4: d005 beq.n 8004fd2 + { + USBx->GINTMSK |= USB_OTG_GINTMSK_SOFM; + 8004fc6: 687b ldr r3, [r7, #4] + 8004fc8: 699b ldr r3, [r3, #24] + 8004fca: f043 0208 orr.w r2, r3, #8 + 8004fce: 687b ldr r3, [r7, #4] + 8004fd0: 619a str r2, [r3, #24] + } + + if (cfg.vbus_sensing_enable == 1U) + 8004fd2: 6cfb ldr r3, [r7, #76] ; 0x4c + 8004fd4: 2b01 cmp r3, #1 + 8004fd6: d107 bne.n 8004fe8 + { + USBx->GINTMSK |= (USB_OTG_GINTMSK_SRQIM | USB_OTG_GINTMSK_OTGINT); + 8004fd8: 687b ldr r3, [r7, #4] + 8004fda: 699b ldr r3, [r3, #24] + 8004fdc: f043 4380 orr.w r3, r3, #1073741824 ; 0x40000000 + 8004fe0: f043 0304 orr.w r3, r3, #4 + 8004fe4: 687a ldr r2, [r7, #4] + 8004fe6: 6193 str r3, [r2, #24] + } + + return ret; + 8004fe8: 7dfb ldrb r3, [r7, #23] +} + 8004fea: 4618 mov r0, r3 + 8004fec: 3718 adds r7, #24 + 8004fee: 46bd mov sp, r7 + 8004ff0: e8bd 4080 ldmia.w sp!, {r7, lr} + 8004ff4: b004 add sp, #16 + 8004ff6: 4770 bx lr + 8004ff8: 803c3800 .word 0x803c3800 + +08004ffc : + * This parameter can be a value from 1 to 15 + 15 means Flush all Tx FIFOs + * @retval HAL status + */ +HAL_StatusTypeDef USB_FlushTxFifo(USB_OTG_GlobalTypeDef *USBx, uint32_t num) +{ + 8004ffc: b480 push {r7} + 8004ffe: b085 sub sp, #20 + 8005000: af00 add r7, sp, #0 + 8005002: 6078 str r0, [r7, #4] + 8005004: 6039 str r1, [r7, #0] + __IO uint32_t count = 0U; + 8005006: 2300 movs r3, #0 + 8005008: 60fb str r3, [r7, #12] + + /* Wait for AHB master IDLE state. */ + do + { + count++; + 800500a: 68fb ldr r3, [r7, #12] + 800500c: 3301 adds r3, #1 + 800500e: 60fb str r3, [r7, #12] + + if (count > 200000U) + 8005010: 68fb ldr r3, [r7, #12] + 8005012: 4a13 ldr r2, [pc, #76] ; (8005060 ) + 8005014: 4293 cmp r3, r2 + 8005016: d901 bls.n 800501c + { + return HAL_TIMEOUT; + 8005018: 2303 movs r3, #3 + 800501a: e01b b.n 8005054 + } + } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); + 800501c: 687b ldr r3, [r7, #4] + 800501e: 691b ldr r3, [r3, #16] + 8005020: 2b00 cmp r3, #0 + 8005022: daf2 bge.n 800500a + + /* Flush TX Fifo */ + count = 0U; + 8005024: 2300 movs r3, #0 + 8005026: 60fb str r3, [r7, #12] + USBx->GRSTCTL = (USB_OTG_GRSTCTL_TXFFLSH | (num << 6)); + 8005028: 683b ldr r3, [r7, #0] + 800502a: 019b lsls r3, r3, #6 + 800502c: f043 0220 orr.w r2, r3, #32 + 8005030: 687b ldr r3, [r7, #4] + 8005032: 611a str r2, [r3, #16] + + do + { + count++; + 8005034: 68fb ldr r3, [r7, #12] + 8005036: 3301 adds r3, #1 + 8005038: 60fb str r3, [r7, #12] + + if (count > 200000U) + 800503a: 68fb ldr r3, [r7, #12] + 800503c: 4a08 ldr r2, [pc, #32] ; (8005060 ) + 800503e: 4293 cmp r3, r2 + 8005040: d901 bls.n 8005046 + { + return HAL_TIMEOUT; + 8005042: 2303 movs r3, #3 + 8005044: e006 b.n 8005054 + } + } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_TXFFLSH) == USB_OTG_GRSTCTL_TXFFLSH); + 8005046: 687b ldr r3, [r7, #4] + 8005048: 691b ldr r3, [r3, #16] + 800504a: f003 0320 and.w r3, r3, #32 + 800504e: 2b20 cmp r3, #32 + 8005050: d0f0 beq.n 8005034 + + return HAL_OK; + 8005052: 2300 movs r3, #0 +} + 8005054: 4618 mov r0, r3 + 8005056: 3714 adds r7, #20 + 8005058: 46bd mov sp, r7 + 800505a: bc80 pop {r7} + 800505c: 4770 bx lr + 800505e: bf00 nop + 8005060: 00030d40 .word 0x00030d40 + +08005064 : + * @brief USB_FlushRxFifo Flush Rx FIFO + * @param USBx Selected device + * @retval HAL status + */ +HAL_StatusTypeDef USB_FlushRxFifo(USB_OTG_GlobalTypeDef *USBx) +{ + 8005064: b480 push {r7} + 8005066: b085 sub sp, #20 + 8005068: af00 add r7, sp, #0 + 800506a: 6078 str r0, [r7, #4] + __IO uint32_t count = 0U; + 800506c: 2300 movs r3, #0 + 800506e: 60fb str r3, [r7, #12] + + /* Wait for AHB master IDLE state. */ + do + { + count++; + 8005070: 68fb ldr r3, [r7, #12] + 8005072: 3301 adds r3, #1 + 8005074: 60fb str r3, [r7, #12] + + if (count > 200000U) + 8005076: 68fb ldr r3, [r7, #12] + 8005078: 4a11 ldr r2, [pc, #68] ; (80050c0 ) + 800507a: 4293 cmp r3, r2 + 800507c: d901 bls.n 8005082 + { + return HAL_TIMEOUT; + 800507e: 2303 movs r3, #3 + 8005080: e018 b.n 80050b4 + } + } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); + 8005082: 687b ldr r3, [r7, #4] + 8005084: 691b ldr r3, [r3, #16] + 8005086: 2b00 cmp r3, #0 + 8005088: daf2 bge.n 8005070 + + /* Flush RX Fifo */ + count = 0U; + 800508a: 2300 movs r3, #0 + 800508c: 60fb str r3, [r7, #12] + USBx->GRSTCTL = USB_OTG_GRSTCTL_RXFFLSH; + 800508e: 687b ldr r3, [r7, #4] + 8005090: 2210 movs r2, #16 + 8005092: 611a str r2, [r3, #16] + + do + { + count++; + 8005094: 68fb ldr r3, [r7, #12] + 8005096: 3301 adds r3, #1 + 8005098: 60fb str r3, [r7, #12] + + if (count > 200000U) + 800509a: 68fb ldr r3, [r7, #12] + 800509c: 4a08 ldr r2, [pc, #32] ; (80050c0 ) + 800509e: 4293 cmp r3, r2 + 80050a0: d901 bls.n 80050a6 + { + return HAL_TIMEOUT; + 80050a2: 2303 movs r3, #3 + 80050a4: e006 b.n 80050b4 + } + } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_RXFFLSH) == USB_OTG_GRSTCTL_RXFFLSH); + 80050a6: 687b ldr r3, [r7, #4] + 80050a8: 691b ldr r3, [r3, #16] + 80050aa: f003 0310 and.w r3, r3, #16 + 80050ae: 2b10 cmp r3, #16 + 80050b0: d0f0 beq.n 8005094 + + return HAL_OK; + 80050b2: 2300 movs r3, #0 +} + 80050b4: 4618 mov r0, r3 + 80050b6: 3714 adds r7, #20 + 80050b8: 46bd mov sp, r7 + 80050ba: bc80 pop {r7} + 80050bc: 4770 bx lr + 80050be: bf00 nop + 80050c0: 00030d40 .word 0x00030d40 + +080050c4 : + * @arg USB_OTG_SPEED_HIGH_IN_FULL: High speed core in Full Speed mode + * @arg USB_OTG_SPEED_FULL: Full speed mode + * @retval Hal status + */ +HAL_StatusTypeDef USB_SetDevSpeed(USB_OTG_GlobalTypeDef *USBx, uint8_t speed) +{ + 80050c4: b480 push {r7} + 80050c6: b085 sub sp, #20 + 80050c8: af00 add r7, sp, #0 + 80050ca: 6078 str r0, [r7, #4] + 80050cc: 460b mov r3, r1 + 80050ce: 70fb strb r3, [r7, #3] + uint32_t USBx_BASE = (uint32_t)USBx; + 80050d0: 687b ldr r3, [r7, #4] + 80050d2: 60fb str r3, [r7, #12] + + USBx_DEVICE->DCFG |= speed; + 80050d4: 68fb ldr r3, [r7, #12] + 80050d6: f503 6300 add.w r3, r3, #2048 ; 0x800 + 80050da: 681a ldr r2, [r3, #0] + 80050dc: 78fb ldrb r3, [r7, #3] + 80050de: 68f9 ldr r1, [r7, #12] + 80050e0: f501 6100 add.w r1, r1, #2048 ; 0x800 + 80050e4: 4313 orrs r3, r2 + 80050e6: 600b str r3, [r1, #0] + return HAL_OK; + 80050e8: 2300 movs r3, #0 +} + 80050ea: 4618 mov r0, r3 + 80050ec: 3714 adds r7, #20 + 80050ee: 46bd mov sp, r7 + 80050f0: bc80 pop {r7} + 80050f2: 4770 bx lr + +080050f4 : + * @brief USB_DevDisconnect : Disconnect the USB device by disabling Rpu + * @param USBx Selected device + * @retval HAL status + */ +HAL_StatusTypeDef USB_DevDisconnect(USB_OTG_GlobalTypeDef *USBx) +{ + 80050f4: b480 push {r7} + 80050f6: b085 sub sp, #20 + 80050f8: af00 add r7, sp, #0 + 80050fa: 6078 str r0, [r7, #4] + uint32_t USBx_BASE = (uint32_t)USBx; + 80050fc: 687b ldr r3, [r7, #4] + 80050fe: 60fb str r3, [r7, #12] + + /* In case phy is stopped, ensure to ungate and restore the phy CLK */ + USBx_PCGCCTL &= ~(USB_OTG_PCGCCTL_STOPCLK | USB_OTG_PCGCCTL_GATECLK); + 8005100: 68fb ldr r3, [r7, #12] + 8005102: f503 6360 add.w r3, r3, #3584 ; 0xe00 + 8005106: 681b ldr r3, [r3, #0] + 8005108: 68fa ldr r2, [r7, #12] + 800510a: f502 6260 add.w r2, r2, #3584 ; 0xe00 + 800510e: f023 0303 bic.w r3, r3, #3 + 8005112: 6013 str r3, [r2, #0] + + USBx_DEVICE->DCTL |= USB_OTG_DCTL_SDIS; + 8005114: 68fb ldr r3, [r7, #12] + 8005116: f503 6300 add.w r3, r3, #2048 ; 0x800 + 800511a: 685b ldr r3, [r3, #4] + 800511c: 68fa ldr r2, [r7, #12] + 800511e: f502 6200 add.w r2, r2, #2048 ; 0x800 + 8005122: f043 0302 orr.w r3, r3, #2 + 8005126: 6053 str r3, [r2, #4] + + return HAL_OK; + 8005128: 2300 movs r3, #0 +} + 800512a: 4618 mov r0, r3 + 800512c: 3714 adds r7, #20 + 800512e: 46bd mov sp, r7 + 8005130: bc80 pop {r7} + 8005132: 4770 bx lr + +08005134 : + * This parameter can be one of these values: + * 0 : Host + * 1 : Device + */ +uint32_t USB_GetMode(USB_OTG_GlobalTypeDef *USBx) +{ + 8005134: b480 push {r7} + 8005136: b083 sub sp, #12 + 8005138: af00 add r7, sp, #0 + 800513a: 6078 str r0, [r7, #4] + return ((USBx->GINTSTS) & 0x1U); + 800513c: 687b ldr r3, [r7, #4] + 800513e: 695b ldr r3, [r3, #20] + 8005140: f003 0301 and.w r3, r3, #1 +} + 8005144: 4618 mov r0, r3 + 8005146: 370c adds r7, #12 + 8005148: 46bd mov sp, r7 + 800514a: bc80 pop {r7} + 800514c: 4770 bx lr + ... + +08005150 : + * @brief Reset the USB Core (needed after USB clock settings change) + * @param USBx Selected device + * @retval HAL status + */ +static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx) +{ + 8005150: b480 push {r7} + 8005152: b085 sub sp, #20 + 8005154: af00 add r7, sp, #0 + 8005156: 6078 str r0, [r7, #4] + __IO uint32_t count = 0U; + 8005158: 2300 movs r3, #0 + 800515a: 60fb str r3, [r7, #12] + + /* Wait for AHB master IDLE state. */ + do + { + count++; + 800515c: 68fb ldr r3, [r7, #12] + 800515e: 3301 adds r3, #1 + 8005160: 60fb str r3, [r7, #12] + + if (count > 200000U) + 8005162: 68fb ldr r3, [r7, #12] + 8005164: 4a12 ldr r2, [pc, #72] ; (80051b0 ) + 8005166: 4293 cmp r3, r2 + 8005168: d901 bls.n 800516e + { + return HAL_TIMEOUT; + 800516a: 2303 movs r3, #3 + 800516c: e01b b.n 80051a6 + } + } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); + 800516e: 687b ldr r3, [r7, #4] + 8005170: 691b ldr r3, [r3, #16] + 8005172: 2b00 cmp r3, #0 + 8005174: daf2 bge.n 800515c + + /* Core Soft Reset */ + count = 0U; + 8005176: 2300 movs r3, #0 + 8005178: 60fb str r3, [r7, #12] + USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST; + 800517a: 687b ldr r3, [r7, #4] + 800517c: 691b ldr r3, [r3, #16] + 800517e: f043 0201 orr.w r2, r3, #1 + 8005182: 687b ldr r3, [r7, #4] + 8005184: 611a str r2, [r3, #16] + + do + { + count++; + 8005186: 68fb ldr r3, [r7, #12] + 8005188: 3301 adds r3, #1 + 800518a: 60fb str r3, [r7, #12] + + if (count > 200000U) + 800518c: 68fb ldr r3, [r7, #12] + 800518e: 4a08 ldr r2, [pc, #32] ; (80051b0 ) + 8005190: 4293 cmp r3, r2 + 8005192: d901 bls.n 8005198 + { + return HAL_TIMEOUT; + 8005194: 2303 movs r3, #3 + 8005196: e006 b.n 80051a6 + } + } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST); + 8005198: 687b ldr r3, [r7, #4] + 800519a: 691b ldr r3, [r3, #16] + 800519c: f003 0301 and.w r3, r3, #1 + 80051a0: 2b01 cmp r3, #1 + 80051a2: d0f0 beq.n 8005186 + + return HAL_OK; + 80051a4: 2300 movs r3, #0 +} + 80051a6: 4618 mov r0, r3 + 80051a8: 3714 adds r7, #20 + 80051aa: 46bd mov sp, r7 + 80051ac: bc80 pop {r7} + 80051ae: 4770 bx lr + 80051b0: 00030d40 .word 0x00030d40 + +080051b4 : + +/** + * LwIP initialization function + */ +void MX_LWIP_Init(void) +{ + 80051b4: b580 push {r7, lr} + 80051b6: b084 sub sp, #16 + 80051b8: af04 add r7, sp, #16 + /* Initilialize the LwIP stack without RTOS */ + lwip_init(); + 80051ba: f001 ffb0 bl 800711e + + /* IP addresses initialization with DHCP (IPv4) */ + ipaddr.addr = 0; + 80051be: 4b19 ldr r3, [pc, #100] ; (8005224 ) + 80051c0: 2200 movs r2, #0 + 80051c2: 601a str r2, [r3, #0] + netmask.addr = 0; + 80051c4: 4b18 ldr r3, [pc, #96] ; (8005228 ) + 80051c6: 2200 movs r2, #0 + 80051c8: 601a str r2, [r3, #0] + gw.addr = 0; + 80051ca: 4b18 ldr r3, [pc, #96] ; (800522c ) + 80051cc: 2200 movs r2, #0 + 80051ce: 601a str r2, [r3, #0] + + /* add the network interface (IPv4/IPv6) without RTOS */ + netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, ðernet_input); + 80051d0: 4b17 ldr r3, [pc, #92] ; (8005230 ) + 80051d2: 9302 str r3, [sp, #8] + 80051d4: 4b17 ldr r3, [pc, #92] ; (8005234 ) + 80051d6: 9301 str r3, [sp, #4] + 80051d8: 2300 movs r3, #0 + 80051da: 9300 str r3, [sp, #0] + 80051dc: 4b13 ldr r3, [pc, #76] ; (800522c ) + 80051de: 4a12 ldr r2, [pc, #72] ; (8005228 ) + 80051e0: 4910 ldr r1, [pc, #64] ; (8005224 ) + 80051e2: 4815 ldr r0, [pc, #84] ; (8005238 ) + 80051e4: f002 fb9a bl 800791c + + /* Registers the default network interface */ + netif_set_default(&gnetif); + 80051e8: 4813 ldr r0, [pc, #76] ; (8005238 ) + 80051ea: f002 fc7f bl 8007aec + + if (netif_is_link_up(&gnetif)) + 80051ee: 4b12 ldr r3, [pc, #72] ; (8005238 ) + 80051f0: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 80051f4: 089b lsrs r3, r3, #2 + 80051f6: f003 0301 and.w r3, r3, #1 + 80051fa: b2db uxtb r3, r3 + 80051fc: 2b00 cmp r3, #0 + 80051fe: d003 beq.n 8005208 + { + /* When the netif is fully configured this function must be called */ + netif_set_up(&gnetif); + 8005200: 480d ldr r0, [pc, #52] ; (8005238 ) + 8005202: f002 fc81 bl 8007b08 + 8005206: e002 b.n 800520e + } + else + { + /* When the netif link is down this function must be called */ + netif_set_down(&gnetif); + 8005208: 480b ldr r0, [pc, #44] ; (8005238 ) + 800520a: f002 fcc1 bl 8007b90 + } + + /* Set the link callback function, this function is called on change of link status*/ + netif_set_link_callback(&gnetif, ethernetif_update_config); + 800520e: 490b ldr r1, [pc, #44] ; (800523c ) + 8005210: 4809 ldr r0, [pc, #36] ; (8005238 ) + 8005212: f002 fcdf bl 8007bd4 + + /* Create the Ethernet link handler thread */ + + /* Start DHCP negotiation for a network interface (IPv4) */ + dhcp_start(&gnetif); + 8005216: 4808 ldr r0, [pc, #32] ; (8005238 ) + 8005218: f009 fd9e bl 800ed58 + +/* USER CODE BEGIN 3 */ + +/* USER CODE END 3 */ +} + 800521c: bf00 nop + 800521e: 46bd mov sp, r7 + 8005220: bd80 pop {r7, pc} + 8005222: bf00 nop + 8005224: 200008f8 .word 0x200008f8 + 8005228: 200008fc .word 0x200008fc + 800522c: 20000900 .word 0x20000900 + 8005230: 080129c9 .word 0x080129c9 + 8005234: 08005839 .word 0x08005839 + 8005238: 200008c0 .word 0x200008c0 + 800523c: 080058a5 .word 0x080058a5 + +08005240 : + * Send it to the lwIP stack for handling + * Handle timeouts if LWIP_TIMERS is set and without RTOS + * Handle the llink status if LWIP_NETIF_LINK_CALLBACK is set and without RTOS + */ +void MX_LWIP_Process(void) +{ + 8005240: b580 push {r7, lr} + 8005242: af00 add r7, sp, #0 +/* USER CODE BEGIN 4_1 */ + if (gnetif.ip_addr.addr != 0U) + 8005244: 4b08 ldr r3, [pc, #32] ; (8005268 ) + 8005246: 685b ldr r3, [r3, #4] + 8005248: 2b00 cmp r3, #0 + 800524a: d003 beq.n 8005254 + { + LwipConnectionStatus_T = LWIP_CONNECTED; + 800524c: 4b07 ldr r3, [pc, #28] ; (800526c ) + 800524e: 2201 movs r2, #1 + 8005250: 701a strb r2, [r3, #0] + 8005252: e002 b.n 800525a + } + else + { + LwipConnectionStatus_T = LWIP_UNCONNECTED; + 8005254: 4b05 ldr r3, [pc, #20] ; (800526c ) + 8005256: 2200 movs r2, #0 + 8005258: 701a strb r2, [r3, #0] + } +/* USER CODE END 4_1 */ + ethernetif_input(&gnetif); + 800525a: 4803 ldr r0, [pc, #12] ; (8005268 ) + 800525c: f000 facc bl 80057f8 + +/* USER CODE BEGIN 4_2 */ +/* USER CODE END 4_2 */ + /* Handle timeouts */ + sys_check_timeouts(); + 8005260: f008 fe7e bl 800df60 + +/* USER CODE BEGIN 4_3 */ +/* USER CODE END 4_3 */ +} + 8005264: bf00 nop + 8005266: bd80 pop {r7, pc} + 8005268: 200008c0 .word 0x200008c0 + 800526c: 200008bc .word 0x200008bc + +08005270 : +/* USER CODE END 3 */ + +/* Private functions ---------------------------------------------------------*/ + +void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) +{ + 8005270: b580 push {r7, lr} + 8005272: b08e sub sp, #56 ; 0x38 + 8005274: af00 add r7, sp, #0 + 8005276: 6078 str r0, [r7, #4] + GPIO_InitTypeDef GPIO_InitStruct = {0}; + 8005278: f107 0324 add.w r3, r7, #36 ; 0x24 + 800527c: 2200 movs r2, #0 + 800527e: 601a str r2, [r3, #0] + 8005280: 605a str r2, [r3, #4] + 8005282: 609a str r2, [r3, #8] + 8005284: 60da str r2, [r3, #12] + 8005286: 611a str r2, [r3, #16] + if(ethHandle->Instance==ETH) + 8005288: 687b ldr r3, [r7, #4] + 800528a: 681b ldr r3, [r3, #0] + 800528c: 4a55 ldr r2, [pc, #340] ; (80053e4 ) + 800528e: 4293 cmp r3, r2 + 8005290: f040 80a4 bne.w 80053dc + { + /* USER CODE BEGIN ETH_MspInit 0 */ + + /* USER CODE END ETH_MspInit 0 */ + /* Enable Peripheral clock */ + __HAL_RCC_ETH_CLK_ENABLE(); + 8005294: 2300 movs r3, #0 + 8005296: 623b str r3, [r7, #32] + 8005298: 4b53 ldr r3, [pc, #332] ; (80053e8 ) + 800529a: 6b1b ldr r3, [r3, #48] ; 0x30 + 800529c: 4a52 ldr r2, [pc, #328] ; (80053e8 ) + 800529e: f043 7300 orr.w r3, r3, #33554432 ; 0x2000000 + 80052a2: 6313 str r3, [r2, #48] ; 0x30 + 80052a4: 4b50 ldr r3, [pc, #320] ; (80053e8 ) + 80052a6: 6b1b ldr r3, [r3, #48] ; 0x30 + 80052a8: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 + 80052ac: 623b str r3, [r7, #32] + 80052ae: 6a3b ldr r3, [r7, #32] + 80052b0: 2300 movs r3, #0 + 80052b2: 61fb str r3, [r7, #28] + 80052b4: 4b4c ldr r3, [pc, #304] ; (80053e8 ) + 80052b6: 6b1b ldr r3, [r3, #48] ; 0x30 + 80052b8: 4a4b ldr r2, [pc, #300] ; (80053e8 ) + 80052ba: f043 6380 orr.w r3, r3, #67108864 ; 0x4000000 + 80052be: 6313 str r3, [r2, #48] ; 0x30 + 80052c0: 4b49 ldr r3, [pc, #292] ; (80053e8 ) + 80052c2: 6b1b ldr r3, [r3, #48] ; 0x30 + 80052c4: f003 6380 and.w r3, r3, #67108864 ; 0x4000000 + 80052c8: 61fb str r3, [r7, #28] + 80052ca: 69fb ldr r3, [r7, #28] + 80052cc: 2300 movs r3, #0 + 80052ce: 61bb str r3, [r7, #24] + 80052d0: 4b45 ldr r3, [pc, #276] ; (80053e8 ) + 80052d2: 6b1b ldr r3, [r3, #48] ; 0x30 + 80052d4: 4a44 ldr r2, [pc, #272] ; (80053e8 ) + 80052d6: f043 6300 orr.w r3, r3, #134217728 ; 0x8000000 + 80052da: 6313 str r3, [r2, #48] ; 0x30 + 80052dc: 4b42 ldr r3, [pc, #264] ; (80053e8 ) + 80052de: 6b1b ldr r3, [r3, #48] ; 0x30 + 80052e0: f003 6300 and.w r3, r3, #134217728 ; 0x8000000 + 80052e4: 61bb str r3, [r7, #24] + 80052e6: 69bb ldr r3, [r7, #24] + + __HAL_RCC_GPIOC_CLK_ENABLE(); + 80052e8: 2300 movs r3, #0 + 80052ea: 617b str r3, [r7, #20] + 80052ec: 4b3e ldr r3, [pc, #248] ; (80053e8 ) + 80052ee: 6b1b ldr r3, [r3, #48] ; 0x30 + 80052f0: 4a3d ldr r2, [pc, #244] ; (80053e8 ) + 80052f2: f043 0304 orr.w r3, r3, #4 + 80052f6: 6313 str r3, [r2, #48] ; 0x30 + 80052f8: 4b3b ldr r3, [pc, #236] ; (80053e8 ) + 80052fa: 6b1b ldr r3, [r3, #48] ; 0x30 + 80052fc: f003 0304 and.w r3, r3, #4 + 8005300: 617b str r3, [r7, #20] + 8005302: 697b ldr r3, [r7, #20] + __HAL_RCC_GPIOA_CLK_ENABLE(); + 8005304: 2300 movs r3, #0 + 8005306: 613b str r3, [r7, #16] + 8005308: 4b37 ldr r3, [pc, #220] ; (80053e8 ) + 800530a: 6b1b ldr r3, [r3, #48] ; 0x30 + 800530c: 4a36 ldr r2, [pc, #216] ; (80053e8 ) + 800530e: f043 0301 orr.w r3, r3, #1 + 8005312: 6313 str r3, [r2, #48] ; 0x30 + 8005314: 4b34 ldr r3, [pc, #208] ; (80053e8 ) + 8005316: 6b1b ldr r3, [r3, #48] ; 0x30 + 8005318: f003 0301 and.w r3, r3, #1 + 800531c: 613b str r3, [r7, #16] + 800531e: 693b ldr r3, [r7, #16] + __HAL_RCC_GPIOB_CLK_ENABLE(); + 8005320: 2300 movs r3, #0 + 8005322: 60fb str r3, [r7, #12] + 8005324: 4b30 ldr r3, [pc, #192] ; (80053e8 ) + 8005326: 6b1b ldr r3, [r3, #48] ; 0x30 + 8005328: 4a2f ldr r2, [pc, #188] ; (80053e8 ) + 800532a: f043 0302 orr.w r3, r3, #2 + 800532e: 6313 str r3, [r2, #48] ; 0x30 + 8005330: 4b2d ldr r3, [pc, #180] ; (80053e8 ) + 8005332: 6b1b ldr r3, [r3, #48] ; 0x30 + 8005334: f003 0302 and.w r3, r3, #2 + 8005338: 60fb str r3, [r7, #12] + 800533a: 68fb ldr r3, [r7, #12] + __HAL_RCC_GPIOG_CLK_ENABLE(); + 800533c: 2300 movs r3, #0 + 800533e: 60bb str r3, [r7, #8] + 8005340: 4b29 ldr r3, [pc, #164] ; (80053e8 ) + 8005342: 6b1b ldr r3, [r3, #48] ; 0x30 + 8005344: 4a28 ldr r2, [pc, #160] ; (80053e8 ) + 8005346: f043 0340 orr.w r3, r3, #64 ; 0x40 + 800534a: 6313 str r3, [r2, #48] ; 0x30 + 800534c: 4b26 ldr r3, [pc, #152] ; (80053e8 ) + 800534e: 6b1b ldr r3, [r3, #48] ; 0x30 + 8005350: f003 0340 and.w r3, r3, #64 ; 0x40 + 8005354: 60bb str r3, [r7, #8] + 8005356: 68bb ldr r3, [r7, #8] + PC5 ------> ETH_RXD1 + PB13 ------> ETH_TXD1 + PG11 ------> ETH_TX_EN + PG13 ------> ETH_TXD0 + */ + GPIO_InitStruct.Pin = RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin; + 8005358: 2332 movs r3, #50 ; 0x32 + 800535a: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 800535c: 2302 movs r3, #2 + 800535e: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8005360: 2300 movs r3, #0 + 8005362: 62fb str r3, [r7, #44] ; 0x2c + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + 8005364: 2303 movs r3, #3 + 8005366: 633b str r3, [r7, #48] ; 0x30 + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + 8005368: 230b movs r3, #11 + 800536a: 637b str r3, [r7, #52] ; 0x34 + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + 800536c: f107 0324 add.w r3, r7, #36 ; 0x24 + 8005370: 4619 mov r1, r3 + 8005372: 481e ldr r0, [pc, #120] ; (80053ec ) + 8005374: f7fd fb18 bl 80029a8 + + GPIO_InitStruct.Pin = RMII_REF_CLK_Pin|RMII_MDIO_Pin|RMII_CRS_DV_Pin; + 8005378: 2386 movs r3, #134 ; 0x86 + 800537a: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 800537c: 2302 movs r3, #2 + 800537e: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Pull = GPIO_NOPULL; + 8005380: 2300 movs r3, #0 + 8005382: 62fb str r3, [r7, #44] ; 0x2c + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + 8005384: 2303 movs r3, #3 + 8005386: 633b str r3, [r7, #48] ; 0x30 + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + 8005388: 230b movs r3, #11 + 800538a: 637b str r3, [r7, #52] ; 0x34 + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + 800538c: f107 0324 add.w r3, r7, #36 ; 0x24 + 8005390: 4619 mov r1, r3 + 8005392: 4817 ldr r0, [pc, #92] ; (80053f0 ) + 8005394: f7fd fb08 bl 80029a8 + + GPIO_InitStruct.Pin = RMII_TXD1_Pin; + 8005398: f44f 5300 mov.w r3, #8192 ; 0x2000 + 800539c: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 800539e: 2302 movs r3, #2 + 80053a0: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Pull = GPIO_NOPULL; + 80053a2: 2300 movs r3, #0 + 80053a4: 62fb str r3, [r7, #44] ; 0x2c + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + 80053a6: 2303 movs r3, #3 + 80053a8: 633b str r3, [r7, #48] ; 0x30 + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + 80053aa: 230b movs r3, #11 + 80053ac: 637b str r3, [r7, #52] ; 0x34 + HAL_GPIO_Init(RMII_TXD1_GPIO_Port, &GPIO_InitStruct); + 80053ae: f107 0324 add.w r3, r7, #36 ; 0x24 + 80053b2: 4619 mov r1, r3 + 80053b4: 480f ldr r0, [pc, #60] ; (80053f4 ) + 80053b6: f7fd faf7 bl 80029a8 + + GPIO_InitStruct.Pin = RMII_TX_EN_Pin|RMII_TXD0_Pin; + 80053ba: f44f 5320 mov.w r3, #10240 ; 0x2800 + 80053be: 627b str r3, [r7, #36] ; 0x24 + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + 80053c0: 2302 movs r3, #2 + 80053c2: 62bb str r3, [r7, #40] ; 0x28 + GPIO_InitStruct.Pull = GPIO_NOPULL; + 80053c4: 2300 movs r3, #0 + 80053c6: 62fb str r3, [r7, #44] ; 0x2c + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + 80053c8: 2303 movs r3, #3 + 80053ca: 633b str r3, [r7, #48] ; 0x30 + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + 80053cc: 230b movs r3, #11 + 80053ce: 637b str r3, [r7, #52] ; 0x34 + HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); + 80053d0: f107 0324 add.w r3, r7, #36 ; 0x24 + 80053d4: 4619 mov r1, r3 + 80053d6: 4808 ldr r0, [pc, #32] ; (80053f8 ) + 80053d8: f7fd fae6 bl 80029a8 + + /* USER CODE BEGIN ETH_MspInit 1 */ + + /* USER CODE END ETH_MspInit 1 */ + } +} + 80053dc: bf00 nop + 80053de: 3738 adds r7, #56 ; 0x38 + 80053e0: 46bd mov sp, r7 + 80053e2: bd80 pop {r7, pc} + 80053e4: 40028000 .word 0x40028000 + 80053e8: 40023800 .word 0x40023800 + 80053ec: 40020800 .word 0x40020800 + 80053f0: 40020000 .word 0x40020000 + 80053f4: 40020400 .word 0x40020400 + 80053f8: 40021800 .word 0x40021800 + +080053fc : + * + * @param netif the already initialized lwip network interface structure + * for this ethernetif + */ +static void low_level_init(struct netif *netif) +{ + 80053fc: b580 push {r7, lr} + 80053fe: b086 sub sp, #24 + 8005400: af00 add r7, sp, #0 + 8005402: 6078 str r0, [r7, #4] + uint32_t regvalue = 0; + 8005404: 2300 movs r3, #0 + 8005406: 613b str r3, [r7, #16] + HAL_StatusTypeDef hal_eth_init_status; + +/* Init ETH */ + + uint8_t MACAddr[6] ; + heth.Instance = ETH; + 8005408: 4b4d ldr r3, [pc, #308] ; (8005540 ) + 800540a: 4a4e ldr r2, [pc, #312] ; (8005544 ) + 800540c: 601a str r2, [r3, #0] + heth.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; + 800540e: 4b4c ldr r3, [pc, #304] ; (8005540 ) + 8005410: 2201 movs r2, #1 + 8005412: 605a str r2, [r3, #4] + heth.Init.Speed = ETH_SPEED_100M; + 8005414: 4b4a ldr r3, [pc, #296] ; (8005540 ) + 8005416: f44f 4280 mov.w r2, #16384 ; 0x4000 + 800541a: 609a str r2, [r3, #8] + heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; + 800541c: 4b48 ldr r3, [pc, #288] ; (8005540 ) + 800541e: f44f 6200 mov.w r2, #2048 ; 0x800 + 8005422: 60da str r2, [r3, #12] + heth.Init.PhyAddress = LAN8742A_PHY_ADDRESS; + 8005424: 4b46 ldr r3, [pc, #280] ; (8005540 ) + 8005426: 2200 movs r2, #0 + 8005428: 821a strh r2, [r3, #16] + MACAddr[0] = 0x00; + 800542a: 2300 movs r3, #0 + 800542c: 723b strb r3, [r7, #8] + MACAddr[1] = 0x80; + 800542e: 2380 movs r3, #128 ; 0x80 + 8005430: 727b strb r3, [r7, #9] + MACAddr[2] = 0xE1; + 8005432: 23e1 movs r3, #225 ; 0xe1 + 8005434: 72bb strb r3, [r7, #10] + MACAddr[3] = 0x00; + 8005436: 2300 movs r3, #0 + 8005438: 72fb strb r3, [r7, #11] + MACAddr[4] = 0x00; + 800543a: 2300 movs r3, #0 + 800543c: 733b strb r3, [r7, #12] + MACAddr[5] = 0x00; + 800543e: 2300 movs r3, #0 + 8005440: 737b strb r3, [r7, #13] + heth.Init.MACAddr = &MACAddr[0]; + 8005442: 4a3f ldr r2, [pc, #252] ; (8005540 ) + 8005444: f107 0308 add.w r3, r7, #8 + 8005448: 6153 str r3, [r2, #20] + heth.Init.RxMode = ETH_RXPOLLING_MODE; + 800544a: 4b3d ldr r3, [pc, #244] ; (8005540 ) + 800544c: 2200 movs r2, #0 + 800544e: 619a str r2, [r3, #24] + heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; + 8005450: 4b3b ldr r3, [pc, #236] ; (8005540 ) + 8005452: 2200 movs r2, #0 + 8005454: 61da str r2, [r3, #28] + heth.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; + 8005456: 4b3a ldr r3, [pc, #232] ; (8005540 ) + 8005458: f44f 0200 mov.w r2, #8388608 ; 0x800000 + 800545c: 621a str r2, [r3, #32] + + /* USER CODE BEGIN MACADDRESS */ + + /* USER CODE END MACADDRESS */ + + hal_eth_init_status = HAL_ETH_Init(&heth); + 800545e: 4838 ldr r0, [pc, #224] ; (8005540 ) + 8005460: f7fc f9aa bl 80017b8 + 8005464: 4603 mov r3, r0 + 8005466: 75fb strb r3, [r7, #23] + + if (hal_eth_init_status == HAL_OK) + 8005468: 7dfb ldrb r3, [r7, #23] + 800546a: 2b00 cmp r3, #0 + 800546c: d108 bne.n 8005480 + { + /* Set netif link flag */ + netif->flags |= NETIF_FLAG_LINK_UP; + 800546e: 687b ldr r3, [r7, #4] + 8005470: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8005474: f043 0304 orr.w r3, r3, #4 + 8005478: b2da uxtb r2, r3 + 800547a: 687b ldr r3, [r7, #4] + 800547c: f883 2033 strb.w r2, [r3, #51] ; 0x33 + } + /* Initialize Tx Descriptors list: Chain Mode */ + HAL_ETH_DMATxDescListInit(&heth, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); + 8005480: 2304 movs r3, #4 + 8005482: 4a31 ldr r2, [pc, #196] ; (8005548 ) + 8005484: 4931 ldr r1, [pc, #196] ; (800554c ) + 8005486: 482e ldr r0, [pc, #184] ; (8005540 ) + 8005488: f7fc fb22 bl 8001ad0 + + /* Initialize Rx Descriptors list: Chain Mode */ + HAL_ETH_DMARxDescListInit(&heth, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); + 800548c: 2304 movs r3, #4 + 800548e: 4a30 ldr r2, [pc, #192] ; (8005550 ) + 8005490: 4930 ldr r1, [pc, #192] ; (8005554 ) + 8005492: 482b ldr r0, [pc, #172] ; (8005540 ) + 8005494: f7fc fb83 bl 8001b9e + +#if LWIP_ARP || LWIP_ETHERNET + + /* set MAC hardware address length */ + netif->hwaddr_len = ETH_HWADDR_LEN; + 8005498: 687b ldr r3, [r7, #4] + 800549a: 2206 movs r2, #6 + 800549c: f883 202c strb.w r2, [r3, #44] ; 0x2c + + /* set MAC hardware address */ + netif->hwaddr[0] = heth.Init.MACAddr[0]; + 80054a0: 4b27 ldr r3, [pc, #156] ; (8005540 ) + 80054a2: 695b ldr r3, [r3, #20] + 80054a4: 781a ldrb r2, [r3, #0] + 80054a6: 687b ldr r3, [r7, #4] + 80054a8: f883 202d strb.w r2, [r3, #45] ; 0x2d + netif->hwaddr[1] = heth.Init.MACAddr[1]; + 80054ac: 4b24 ldr r3, [pc, #144] ; (8005540 ) + 80054ae: 695b ldr r3, [r3, #20] + 80054b0: 785a ldrb r2, [r3, #1] + 80054b2: 687b ldr r3, [r7, #4] + 80054b4: f883 202e strb.w r2, [r3, #46] ; 0x2e + netif->hwaddr[2] = heth.Init.MACAddr[2]; + 80054b8: 4b21 ldr r3, [pc, #132] ; (8005540 ) + 80054ba: 695b ldr r3, [r3, #20] + 80054bc: 789a ldrb r2, [r3, #2] + 80054be: 687b ldr r3, [r7, #4] + 80054c0: f883 202f strb.w r2, [r3, #47] ; 0x2f + netif->hwaddr[3] = heth.Init.MACAddr[3]; + 80054c4: 4b1e ldr r3, [pc, #120] ; (8005540 ) + 80054c6: 695b ldr r3, [r3, #20] + 80054c8: 78da ldrb r2, [r3, #3] + 80054ca: 687b ldr r3, [r7, #4] + 80054cc: f883 2030 strb.w r2, [r3, #48] ; 0x30 + netif->hwaddr[4] = heth.Init.MACAddr[4]; + 80054d0: 4b1b ldr r3, [pc, #108] ; (8005540 ) + 80054d2: 695b ldr r3, [r3, #20] + 80054d4: 791a ldrb r2, [r3, #4] + 80054d6: 687b ldr r3, [r7, #4] + 80054d8: f883 2031 strb.w r2, [r3, #49] ; 0x31 + netif->hwaddr[5] = heth.Init.MACAddr[5]; + 80054dc: 4b18 ldr r3, [pc, #96] ; (8005540 ) + 80054de: 695b ldr r3, [r3, #20] + 80054e0: 795a ldrb r2, [r3, #5] + 80054e2: 687b ldr r3, [r7, #4] + 80054e4: f883 2032 strb.w r2, [r3, #50] ; 0x32 + + /* maximum transfer unit */ + netif->mtu = 1500; + 80054e8: 687b ldr r3, [r7, #4] + 80054ea: f240 52dc movw r2, #1500 ; 0x5dc + 80054ee: 855a strh r2, [r3, #42] ; 0x2a + + /* Accept broadcast address and ARP traffic */ + /* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */ + #if LWIP_ARP + netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; + 80054f0: 687b ldr r3, [r7, #4] + 80054f2: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 80054f6: f043 030a orr.w r3, r3, #10 + 80054fa: b2da uxtb r2, r3 + 80054fc: 687b ldr r3, [r7, #4] + 80054fe: f883 2033 strb.w r2, [r3, #51] ; 0x33 + #else + netif->flags |= NETIF_FLAG_BROADCAST; + #endif /* LWIP_ARP */ + + /* Enable MAC and DMA transmission and reception */ + HAL_ETH_Start(&heth); + 8005502: 480f ldr r0, [pc, #60] ; (8005540 ) + 8005504: f7fc fdef bl 80020e6 +/* USER CODE BEGIN PHY_PRE_CONFIG */ + +/* USER CODE END PHY_PRE_CONFIG */ + + /* Read Register Configuration */ + HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR, ®value); + 8005508: f107 0310 add.w r3, r7, #16 + 800550c: 461a mov r2, r3 + 800550e: 211d movs r1, #29 + 8005510: 480b ldr r0, [pc, #44] ; (8005540 ) + 8005512: f7fc fd1a bl 8001f4a + regvalue |= (PHY_ISFR_INT4); + 8005516: 693b ldr r3, [r7, #16] + 8005518: f043 030b orr.w r3, r3, #11 + 800551c: 613b str r3, [r7, #16] + + /* Enable Interrupt on change of link status */ + HAL_ETH_WritePHYRegister(&heth, PHY_ISFR , regvalue ); + 800551e: 693b ldr r3, [r7, #16] + 8005520: 461a mov r2, r3 + 8005522: 211d movs r1, #29 + 8005524: 4806 ldr r0, [pc, #24] ; (8005540 ) + 8005526: f7fc fd78 bl 800201a + + /* Read Register Configuration */ + HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR , ®value); + 800552a: f107 0310 add.w r3, r7, #16 + 800552e: 461a mov r2, r3 + 8005530: 211d movs r1, #29 + 8005532: 4803 ldr r0, [pc, #12] ; (8005540 ) + 8005534: f7fc fd09 bl 8001f4a +#endif /* LWIP_ARP || LWIP_ETHERNET */ + +/* USER CODE BEGIN LOW_LEVEL_INIT */ + +/* USER CODE END LOW_LEVEL_INIT */ +} + 8005538: bf00 nop + 800553a: 3718 adds r7, #24 + 800553c: 46bd mov sp, r7 + 800553e: bd80 pop {r7, pc} + 8005540: 200039a4 .word 0x200039a4 + 8005544: 40028000 .word 0x40028000 + 8005548: 200021d4 .word 0x200021d4 + 800554c: 20000984 .word 0x20000984 + 8005550: 20000a04 .word 0x20000a04 + 8005554: 20000904 .word 0x20000904 + +08005558 : + * to become available since the stack doesn't retry to send a packet + * dropped because of memory failure (except for the TCP timers). + */ + +static err_t low_level_output(struct netif *netif, struct pbuf *p) +{ + 8005558: b580 push {r7, lr} + 800555a: b08a sub sp, #40 ; 0x28 + 800555c: af00 add r7, sp, #0 + 800555e: 6078 str r0, [r7, #4] + 8005560: 6039 str r1, [r7, #0] + err_t errval; + struct pbuf *q; + uint8_t *buffer = (uint8_t *)(heth.TxDesc->Buffer1Addr); + 8005562: 4b4b ldr r3, [pc, #300] ; (8005690 ) + 8005564: 6adb ldr r3, [r3, #44] ; 0x2c + 8005566: 689b ldr r3, [r3, #8] + 8005568: 61fb str r3, [r7, #28] + __IO ETH_DMADescTypeDef *DmaTxDesc; + uint32_t framelength = 0; + 800556a: 2300 movs r3, #0 + 800556c: 617b str r3, [r7, #20] + uint32_t bufferoffset = 0; + 800556e: 2300 movs r3, #0 + 8005570: 613b str r3, [r7, #16] + uint32_t byteslefttocopy = 0; + 8005572: 2300 movs r3, #0 + 8005574: 60fb str r3, [r7, #12] + uint32_t payloadoffset = 0; + 8005576: 2300 movs r3, #0 + 8005578: 60bb str r3, [r7, #8] + DmaTxDesc = heth.TxDesc; + 800557a: 4b45 ldr r3, [pc, #276] ; (8005690 ) + 800557c: 6adb ldr r3, [r3, #44] ; 0x2c + 800557e: 61bb str r3, [r7, #24] + bufferoffset = 0; + 8005580: 2300 movs r3, #0 + 8005582: 613b str r3, [r7, #16] + + /* copy frame from pbufs to driver buffers */ + for(q = p; q != NULL; q = q->next) + 8005584: 683b ldr r3, [r7, #0] + 8005586: 623b str r3, [r7, #32] + 8005588: e05a b.n 8005640 + { + /* Is this buffer available? If not, goto error */ + if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) + 800558a: 69bb ldr r3, [r7, #24] + 800558c: 681b ldr r3, [r3, #0] + 800558e: 2b00 cmp r3, #0 + 8005590: da03 bge.n 800559a + { + errval = ERR_USE; + 8005592: 23f8 movs r3, #248 ; 0xf8 + 8005594: f887 3027 strb.w r3, [r7, #39] ; 0x27 + goto error; + 8005598: e05c b.n 8005654 + } + + /* Get bytes in current lwIP buffer */ + byteslefttocopy = q->len; + 800559a: 6a3b ldr r3, [r7, #32] + 800559c: 895b ldrh r3, [r3, #10] + 800559e: 60fb str r3, [r7, #12] + payloadoffset = 0; + 80055a0: 2300 movs r3, #0 + 80055a2: 60bb str r3, [r7, #8] + + /* Check if the length of data to copy is bigger than Tx buffer size*/ + while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE ) + 80055a4: e02f b.n 8005606 + { + /* Copy data to Tx buffer*/ + memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), (ETH_TX_BUF_SIZE - bufferoffset) ); + 80055a6: 69fa ldr r2, [r7, #28] + 80055a8: 693b ldr r3, [r7, #16] + 80055aa: 18d0 adds r0, r2, r3 + 80055ac: 6a3b ldr r3, [r7, #32] + 80055ae: 685a ldr r2, [r3, #4] + 80055b0: 68bb ldr r3, [r7, #8] + 80055b2: 18d1 adds r1, r2, r3 + 80055b4: 693b ldr r3, [r7, #16] + 80055b6: f5c3 63be rsb r3, r3, #1520 ; 0x5f0 + 80055ba: 3304 adds r3, #4 + 80055bc: 461a mov r2, r3 + 80055be: f00d fdac bl 801311a + + /* Point to next descriptor */ + DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr); + 80055c2: 69bb ldr r3, [r7, #24] + 80055c4: 68db ldr r3, [r3, #12] + 80055c6: 61bb str r3, [r7, #24] + + /* Check if the buffer is available */ + if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) + 80055c8: 69bb ldr r3, [r7, #24] + 80055ca: 681b ldr r3, [r3, #0] + 80055cc: 2b00 cmp r3, #0 + 80055ce: da03 bge.n 80055d8 + { + errval = ERR_USE; + 80055d0: 23f8 movs r3, #248 ; 0xf8 + 80055d2: f887 3027 strb.w r3, [r7, #39] ; 0x27 + goto error; + 80055d6: e03d b.n 8005654 + } + + buffer = (uint8_t *)(DmaTxDesc->Buffer1Addr); + 80055d8: 69bb ldr r3, [r7, #24] + 80055da: 689b ldr r3, [r3, #8] + 80055dc: 61fb str r3, [r7, #28] + + byteslefttocopy = byteslefttocopy - (ETH_TX_BUF_SIZE - bufferoffset); + 80055de: 693a ldr r2, [r7, #16] + 80055e0: 68fb ldr r3, [r7, #12] + 80055e2: 4413 add r3, r2 + 80055e4: f2a3 53f4 subw r3, r3, #1524 ; 0x5f4 + 80055e8: 60fb str r3, [r7, #12] + payloadoffset = payloadoffset + (ETH_TX_BUF_SIZE - bufferoffset); + 80055ea: 68ba ldr r2, [r7, #8] + 80055ec: 693b ldr r3, [r7, #16] + 80055ee: 1ad3 subs r3, r2, r3 + 80055f0: f203 53f4 addw r3, r3, #1524 ; 0x5f4 + 80055f4: 60bb str r3, [r7, #8] + framelength = framelength + (ETH_TX_BUF_SIZE - bufferoffset); + 80055f6: 697a ldr r2, [r7, #20] + 80055f8: 693b ldr r3, [r7, #16] + 80055fa: 1ad3 subs r3, r2, r3 + 80055fc: f203 53f4 addw r3, r3, #1524 ; 0x5f4 + 8005600: 617b str r3, [r7, #20] + bufferoffset = 0; + 8005602: 2300 movs r3, #0 + 8005604: 613b str r3, [r7, #16] + while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE ) + 8005606: 68fa ldr r2, [r7, #12] + 8005608: 693b ldr r3, [r7, #16] + 800560a: 4413 add r3, r2 + 800560c: f240 52f4 movw r2, #1524 ; 0x5f4 + 8005610: 4293 cmp r3, r2 + 8005612: d8c8 bhi.n 80055a6 + } + + /* Copy the remaining bytes */ + memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), byteslefttocopy ); + 8005614: 69fa ldr r2, [r7, #28] + 8005616: 693b ldr r3, [r7, #16] + 8005618: 18d0 adds r0, r2, r3 + 800561a: 6a3b ldr r3, [r7, #32] + 800561c: 685a ldr r2, [r3, #4] + 800561e: 68bb ldr r3, [r7, #8] + 8005620: 4413 add r3, r2 + 8005622: 68fa ldr r2, [r7, #12] + 8005624: 4619 mov r1, r3 + 8005626: f00d fd78 bl 801311a + bufferoffset = bufferoffset + byteslefttocopy; + 800562a: 693a ldr r2, [r7, #16] + 800562c: 68fb ldr r3, [r7, #12] + 800562e: 4413 add r3, r2 + 8005630: 613b str r3, [r7, #16] + framelength = framelength + byteslefttocopy; + 8005632: 697a ldr r2, [r7, #20] + 8005634: 68fb ldr r3, [r7, #12] + 8005636: 4413 add r3, r2 + 8005638: 617b str r3, [r7, #20] + for(q = p; q != NULL; q = q->next) + 800563a: 6a3b ldr r3, [r7, #32] + 800563c: 681b ldr r3, [r3, #0] + 800563e: 623b str r3, [r7, #32] + 8005640: 6a3b ldr r3, [r7, #32] + 8005642: 2b00 cmp r3, #0 + 8005644: d1a1 bne.n 800558a + } + + /* Prepare transmit descriptors to give to DMA */ + HAL_ETH_TransmitFrame(&heth, framelength); + 8005646: 6979 ldr r1, [r7, #20] + 8005648: 4811 ldr r0, [pc, #68] ; (8005690 ) + 800564a: f7fc fb13 bl 8001c74 + + errval = ERR_OK; + 800564e: 2300 movs r3, #0 + 8005650: f887 3027 strb.w r3, [r7, #39] ; 0x27 + +error: + + /* When Transmit Underflow flag is set, clear it and issue a Transmit Poll Demand to resume transmission */ + if ((heth.Instance->DMASR & ETH_DMASR_TUS) != (uint32_t)RESET) + 8005654: 4b0e ldr r3, [pc, #56] ; (8005690 ) + 8005656: 681b ldr r3, [r3, #0] + 8005658: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 800565c: 695b ldr r3, [r3, #20] + 800565e: f003 0320 and.w r3, r3, #32 + 8005662: 2b00 cmp r3, #0 + 8005664: d00d beq.n 8005682 + { + /* Clear TUS ETHERNET DMA flag */ + heth.Instance->DMASR = ETH_DMASR_TUS; + 8005666: 4b0a ldr r3, [pc, #40] ; (8005690 ) + 8005668: 681b ldr r3, [r3, #0] + 800566a: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 800566e: 461a mov r2, r3 + 8005670: 2320 movs r3, #32 + 8005672: 6153 str r3, [r2, #20] + + /* Resume DMA transmission*/ + heth.Instance->DMATPDR = 0; + 8005674: 4b06 ldr r3, [pc, #24] ; (8005690 ) + 8005676: 681b ldr r3, [r3, #0] + 8005678: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 800567c: 461a mov r2, r3 + 800567e: 2300 movs r3, #0 + 8005680: 6053 str r3, [r2, #4] + } + return errval; + 8005682: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 +} + 8005686: 4618 mov r0, r3 + 8005688: 3728 adds r7, #40 ; 0x28 + 800568a: 46bd mov sp, r7 + 800568c: bd80 pop {r7, pc} + 800568e: bf00 nop + 8005690: 200039a4 .word 0x200039a4 + +08005694 : + * @param netif the lwip network interface structure for this ethernetif + * @return a pbuf filled with the received packet (including MAC header) + * NULL on memory error + */ +static struct pbuf * low_level_input(struct netif *netif) +{ + 8005694: b580 push {r7, lr} + 8005696: b08c sub sp, #48 ; 0x30 + 8005698: af00 add r7, sp, #0 + 800569a: 6078 str r0, [r7, #4] + struct pbuf *p = NULL; + 800569c: 2300 movs r3, #0 + 800569e: 62fb str r3, [r7, #44] ; 0x2c + struct pbuf *q = NULL; + 80056a0: 2300 movs r3, #0 + 80056a2: 62bb str r3, [r7, #40] ; 0x28 + uint16_t len = 0; + 80056a4: 2300 movs r3, #0 + 80056a6: 81fb strh r3, [r7, #14] + uint8_t *buffer; + __IO ETH_DMADescTypeDef *dmarxdesc; + uint32_t bufferoffset = 0; + 80056a8: 2300 movs r3, #0 + 80056aa: 61fb str r3, [r7, #28] + uint32_t payloadoffset = 0; + 80056ac: 2300 movs r3, #0 + 80056ae: 61bb str r3, [r7, #24] + uint32_t byteslefttocopy = 0; + 80056b0: 2300 movs r3, #0 + 80056b2: 617b str r3, [r7, #20] + uint32_t i=0; + 80056b4: 2300 movs r3, #0 + 80056b6: 613b str r3, [r7, #16] + + /* get received frame */ + if (HAL_ETH_GetReceivedFrame(&heth) != HAL_OK) + 80056b8: 484e ldr r0, [pc, #312] ; (80057f4 ) + 80056ba: f7fc fbc3 bl 8001e44 + 80056be: 4603 mov r3, r0 + 80056c0: 2b00 cmp r3, #0 + 80056c2: d001 beq.n 80056c8 + + return NULL; + 80056c4: 2300 movs r3, #0 + 80056c6: e090 b.n 80057ea + + /* Obtain the size of the packet and put it into the "len" variable. */ + len = heth.RxFrameInfos.length; + 80056c8: 4b4a ldr r3, [pc, #296] ; (80057f4 ) + 80056ca: 6bdb ldr r3, [r3, #60] ; 0x3c + 80056cc: 81fb strh r3, [r7, #14] + buffer = (uint8_t *)heth.RxFrameInfos.buffer; + 80056ce: 4b49 ldr r3, [pc, #292] ; (80057f4 ) + 80056d0: 6c1b ldr r3, [r3, #64] ; 0x40 + 80056d2: 627b str r3, [r7, #36] ; 0x24 + + if (len > 0) + 80056d4: 89fb ldrh r3, [r7, #14] + 80056d6: 2b00 cmp r3, #0 + 80056d8: d006 beq.n 80056e8 + { + /* We allocate a pbuf chain of pbufs from the Lwip buffer pool */ + p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); + 80056da: 89fb ldrh r3, [r7, #14] + 80056dc: 2203 movs r2, #3 + 80056de: 4619 mov r1, r3 + 80056e0: 2004 movs r0, #4 + 80056e2: f002 fab7 bl 8007c54 + 80056e6: 62f8 str r0, [r7, #44] ; 0x2c + } + + if (p != NULL) + 80056e8: 6afb ldr r3, [r7, #44] ; 0x2c + 80056ea: 2b00 cmp r3, #0 + 80056ec: d04b beq.n 8005786 + { + dmarxdesc = heth.RxFrameInfos.FSRxDesc; + 80056ee: 4b41 ldr r3, [pc, #260] ; (80057f4 ) + 80056f0: 6b1b ldr r3, [r3, #48] ; 0x30 + 80056f2: 623b str r3, [r7, #32] + bufferoffset = 0; + 80056f4: 2300 movs r3, #0 + 80056f6: 61fb str r3, [r7, #28] + for(q = p; q != NULL; q = q->next) + 80056f8: 6afb ldr r3, [r7, #44] ; 0x2c + 80056fa: 62bb str r3, [r7, #40] ; 0x28 + 80056fc: e040 b.n 8005780 + { + byteslefttocopy = q->len; + 80056fe: 6abb ldr r3, [r7, #40] ; 0x28 + 8005700: 895b ldrh r3, [r3, #10] + 8005702: 617b str r3, [r7, #20] + payloadoffset = 0; + 8005704: 2300 movs r3, #0 + 8005706: 61bb str r3, [r7, #24] + + /* Check if the length of bytes to copy in current pbuf is bigger than Rx buffer size*/ + while( (byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE ) + 8005708: e021 b.n 800574e + { + /* Copy data to pbuf */ + memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), (ETH_RX_BUF_SIZE - bufferoffset)); + 800570a: 6abb ldr r3, [r7, #40] ; 0x28 + 800570c: 685a ldr r2, [r3, #4] + 800570e: 69bb ldr r3, [r7, #24] + 8005710: 18d0 adds r0, r2, r3 + 8005712: 6a7a ldr r2, [r7, #36] ; 0x24 + 8005714: 69fb ldr r3, [r7, #28] + 8005716: 18d1 adds r1, r2, r3 + 8005718: 69fb ldr r3, [r7, #28] + 800571a: f5c3 63be rsb r3, r3, #1520 ; 0x5f0 + 800571e: 3304 adds r3, #4 + 8005720: 461a mov r2, r3 + 8005722: f00d fcfa bl 801311a + + /* Point to next descriptor */ + dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr); + 8005726: 6a3b ldr r3, [r7, #32] + 8005728: 68db ldr r3, [r3, #12] + 800572a: 623b str r3, [r7, #32] + buffer = (uint8_t *)(dmarxdesc->Buffer1Addr); + 800572c: 6a3b ldr r3, [r7, #32] + 800572e: 689b ldr r3, [r3, #8] + 8005730: 627b str r3, [r7, #36] ; 0x24 + + byteslefttocopy = byteslefttocopy - (ETH_RX_BUF_SIZE - bufferoffset); + 8005732: 69fa ldr r2, [r7, #28] + 8005734: 697b ldr r3, [r7, #20] + 8005736: 4413 add r3, r2 + 8005738: f2a3 53f4 subw r3, r3, #1524 ; 0x5f4 + 800573c: 617b str r3, [r7, #20] + payloadoffset = payloadoffset + (ETH_RX_BUF_SIZE - bufferoffset); + 800573e: 69ba ldr r2, [r7, #24] + 8005740: 69fb ldr r3, [r7, #28] + 8005742: 1ad3 subs r3, r2, r3 + 8005744: f203 53f4 addw r3, r3, #1524 ; 0x5f4 + 8005748: 61bb str r3, [r7, #24] + bufferoffset = 0; + 800574a: 2300 movs r3, #0 + 800574c: 61fb str r3, [r7, #28] + while( (byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE ) + 800574e: 697a ldr r2, [r7, #20] + 8005750: 69fb ldr r3, [r7, #28] + 8005752: 4413 add r3, r2 + 8005754: f240 52f4 movw r2, #1524 ; 0x5f4 + 8005758: 4293 cmp r3, r2 + 800575a: d8d6 bhi.n 800570a + } + /* Copy remaining data in pbuf */ + memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), byteslefttocopy); + 800575c: 6abb ldr r3, [r7, #40] ; 0x28 + 800575e: 685a ldr r2, [r3, #4] + 8005760: 69bb ldr r3, [r7, #24] + 8005762: 18d0 adds r0, r2, r3 + 8005764: 6a7a ldr r2, [r7, #36] ; 0x24 + 8005766: 69fb ldr r3, [r7, #28] + 8005768: 4413 add r3, r2 + 800576a: 697a ldr r2, [r7, #20] + 800576c: 4619 mov r1, r3 + 800576e: f00d fcd4 bl 801311a + bufferoffset = bufferoffset + byteslefttocopy; + 8005772: 69fa ldr r2, [r7, #28] + 8005774: 697b ldr r3, [r7, #20] + 8005776: 4413 add r3, r2 + 8005778: 61fb str r3, [r7, #28] + for(q = p; q != NULL; q = q->next) + 800577a: 6abb ldr r3, [r7, #40] ; 0x28 + 800577c: 681b ldr r3, [r3, #0] + 800577e: 62bb str r3, [r7, #40] ; 0x28 + 8005780: 6abb ldr r3, [r7, #40] ; 0x28 + 8005782: 2b00 cmp r3, #0 + 8005784: d1bb bne.n 80056fe + } + } + + /* Release descriptors to DMA */ + /* Point to first descriptor */ + dmarxdesc = heth.RxFrameInfos.FSRxDesc; + 8005786: 4b1b ldr r3, [pc, #108] ; (80057f4 ) + 8005788: 6b1b ldr r3, [r3, #48] ; 0x30 + 800578a: 623b str r3, [r7, #32] + /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ + for (i=0; i< heth.RxFrameInfos.SegCount; i++) + 800578c: 2300 movs r3, #0 + 800578e: 613b str r3, [r7, #16] + 8005790: e00b b.n 80057aa + { + dmarxdesc->Status |= ETH_DMARXDESC_OWN; + 8005792: 6a3b ldr r3, [r7, #32] + 8005794: 681b ldr r3, [r3, #0] + 8005796: f043 4200 orr.w r2, r3, #2147483648 ; 0x80000000 + 800579a: 6a3b ldr r3, [r7, #32] + 800579c: 601a str r2, [r3, #0] + dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr); + 800579e: 6a3b ldr r3, [r7, #32] + 80057a0: 68db ldr r3, [r3, #12] + 80057a2: 623b str r3, [r7, #32] + for (i=0; i< heth.RxFrameInfos.SegCount; i++) + 80057a4: 693b ldr r3, [r7, #16] + 80057a6: 3301 adds r3, #1 + 80057a8: 613b str r3, [r7, #16] + 80057aa: 4b12 ldr r3, [pc, #72] ; (80057f4 ) + 80057ac: 6b9b ldr r3, [r3, #56] ; 0x38 + 80057ae: 693a ldr r2, [r7, #16] + 80057b0: 429a cmp r2, r3 + 80057b2: d3ee bcc.n 8005792 + } + + /* Clear Segment_Count */ + heth.RxFrameInfos.SegCount =0; + 80057b4: 4b0f ldr r3, [pc, #60] ; (80057f4 ) + 80057b6: 2200 movs r2, #0 + 80057b8: 639a str r2, [r3, #56] ; 0x38 + + /* When Rx Buffer unavailable flag is set: clear it and resume reception */ + if ((heth.Instance->DMASR & ETH_DMASR_RBUS) != (uint32_t)RESET) + 80057ba: 4b0e ldr r3, [pc, #56] ; (80057f4 ) + 80057bc: 681b ldr r3, [r3, #0] + 80057be: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80057c2: 695b ldr r3, [r3, #20] + 80057c4: f003 0380 and.w r3, r3, #128 ; 0x80 + 80057c8: 2b00 cmp r3, #0 + 80057ca: d00d beq.n 80057e8 + { + /* Clear RBUS ETHERNET DMA flag */ + heth.Instance->DMASR = ETH_DMASR_RBUS; + 80057cc: 4b09 ldr r3, [pc, #36] ; (80057f4 ) + 80057ce: 681b ldr r3, [r3, #0] + 80057d0: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80057d4: 461a mov r2, r3 + 80057d6: 2380 movs r3, #128 ; 0x80 + 80057d8: 6153 str r3, [r2, #20] + /* Resume DMA reception */ + heth.Instance->DMARPDR = 0; + 80057da: 4b06 ldr r3, [pc, #24] ; (80057f4 ) + 80057dc: 681b ldr r3, [r3, #0] + 80057de: f503 5380 add.w r3, r3, #4096 ; 0x1000 + 80057e2: 461a mov r2, r3 + 80057e4: 2300 movs r3, #0 + 80057e6: 6093 str r3, [r2, #8] + } + return p; + 80057e8: 6afb ldr r3, [r7, #44] ; 0x2c +} + 80057ea: 4618 mov r0, r3 + 80057ec: 3730 adds r7, #48 ; 0x30 + 80057ee: 46bd mov sp, r7 + 80057f0: bd80 pop {r7, pc} + 80057f2: bf00 nop + 80057f4: 200039a4 .word 0x200039a4 + +080057f8 : + * the appropriate input function is called. + * + * @param netif the lwip network interface structure for this ethernetif + */ +void ethernetif_input(struct netif *netif) +{ + 80057f8: b580 push {r7, lr} + 80057fa: b084 sub sp, #16 + 80057fc: af00 add r7, sp, #0 + 80057fe: 6078 str r0, [r7, #4] + err_t err; + struct pbuf *p; + + /* move received packet into a new pbuf */ + p = low_level_input(netif); + 8005800: 6878 ldr r0, [r7, #4] + 8005802: f7ff ff47 bl 8005694 + 8005806: 60f8 str r0, [r7, #12] + + /* no packet could be read, silently ignore this */ + if (p == NULL) return; + 8005808: 68fb ldr r3, [r7, #12] + 800580a: 2b00 cmp r3, #0 + 800580c: d010 beq.n 8005830 + + /* entry point to the LwIP stack */ + err = netif->input(p, netif); + 800580e: 687b ldr r3, [r7, #4] + 8005810: 691b ldr r3, [r3, #16] + 8005812: 6879 ldr r1, [r7, #4] + 8005814: 68f8 ldr r0, [r7, #12] + 8005816: 4798 blx r3 + 8005818: 4603 mov r3, r0 + 800581a: 72fb strb r3, [r7, #11] + + if (err != ERR_OK) + 800581c: f997 300b ldrsb.w r3, [r7, #11] + 8005820: 2b00 cmp r3, #0 + 8005822: d006 beq.n 8005832 + { + LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n")); + pbuf_free(p); + 8005824: 68f8 ldr r0, [r7, #12] + 8005826: f002 fd8d bl 8008344 + p = NULL; + 800582a: 2300 movs r3, #0 + 800582c: 60fb str r3, [r7, #12] + 800582e: e000 b.n 8005832 + if (p == NULL) return; + 8005830: bf00 nop + } +} + 8005832: 3710 adds r7, #16 + 8005834: 46bd mov sp, r7 + 8005836: bd80 pop {r7, pc} + +08005838 : + * @return ERR_OK if the loopif is initialized + * ERR_MEM if private data couldn't be allocated + * any other err_t on error + */ +err_t ethernetif_init(struct netif *netif) +{ + 8005838: b580 push {r7, lr} + 800583a: b082 sub sp, #8 + 800583c: af00 add r7, sp, #0 + 800583e: 6078 str r0, [r7, #4] + LWIP_ASSERT("netif != NULL", (netif != NULL)); + 8005840: 687b ldr r3, [r7, #4] + 8005842: 2b00 cmp r3, #0 + 8005844: d106 bne.n 8005854 + 8005846: 4b0e ldr r3, [pc, #56] ; (8005880 ) + 8005848: f44f 7205 mov.w r2, #532 ; 0x214 + 800584c: 490d ldr r1, [pc, #52] ; (8005884 ) + 800584e: 480e ldr r0, [pc, #56] ; (8005888 ) + 8005850: f00d fa98 bl 8012d84 +#if LWIP_NETIF_HOSTNAME + /* Initialize interface hostname */ + netif->hostname = "lwip"; +#endif /* LWIP_NETIF_HOSTNAME */ + + netif->name[0] = IFNAME0; + 8005854: 687b ldr r3, [r7, #4] + 8005856: 2273 movs r2, #115 ; 0x73 + 8005858: f883 2034 strb.w r2, [r3, #52] ; 0x34 + netif->name[1] = IFNAME1; + 800585c: 687b ldr r3, [r7, #4] + 800585e: 2274 movs r2, #116 ; 0x74 + 8005860: f883 2035 strb.w r2, [r3, #53] ; 0x35 + * is available...) */ + +#if LWIP_IPV4 +#if LWIP_ARP || LWIP_ETHERNET +#if LWIP_ARP + netif->output = etharp_output; + 8005864: 687b ldr r3, [r7, #4] + 8005866: 4a09 ldr r2, [pc, #36] ; (800588c ) + 8005868: 615a str r2, [r3, #20] + +#if LWIP_IPV6 + netif->output_ip6 = ethip6_output; +#endif /* LWIP_IPV6 */ + + netif->linkoutput = low_level_output; + 800586a: 687b ldr r3, [r7, #4] + 800586c: 4a08 ldr r2, [pc, #32] ; (8005890 ) + 800586e: 619a str r2, [r3, #24] + + /* initialize the hardware */ + low_level_init(netif); + 8005870: 6878 ldr r0, [r7, #4] + 8005872: f7ff fdc3 bl 80053fc + + return ERR_OK; + 8005876: 2300 movs r3, #0 +} + 8005878: 4618 mov r0, r3 + 800587a: 3708 adds r7, #8 + 800587c: 46bd mov sp, r7 + 800587e: bd80 pop {r7, pc} + 8005880: 08013e4c .word 0x08013e4c + 8005884: 08013e68 .word 0x08013e68 + 8005888: 08013e78 .word 0x08013e78 + 800588c: 08010cc9 .word 0x08010cc9 + 8005890: 08005559 .word 0x08005559 + +08005894 : +* when LWIP_TIMERS == 1 and NO_SYS == 1 +* @param None +* @retval Time +*/ +u32_t sys_now(void) +{ + 8005894: b580 push {r7, lr} + 8005896: af00 add r7, sp, #0 + return HAL_GetTick(); + 8005898: f7fb fe52 bl 8001540 + 800589c: 4603 mov r3, r0 +} + 800589e: 4618 mov r0, r3 + 80058a0: bd80 pop {r7, pc} + ... + +080058a4 : + * to update low level driver configuration. +* @param netif: The network interface + * @retval None + */ +void ethernetif_update_config(struct netif *netif) +{ + 80058a4: b580 push {r7, lr} + 80058a6: b084 sub sp, #16 + 80058a8: af00 add r7, sp, #0 + 80058aa: 6078 str r0, [r7, #4] + __IO uint32_t tickstart = 0; + 80058ac: 2300 movs r3, #0 + 80058ae: 60fb str r3, [r7, #12] + uint32_t regvalue = 0; + 80058b0: 2300 movs r3, #0 + 80058b2: 60bb str r3, [r7, #8] + + if(netif_is_link_up(netif)) + 80058b4: 687b ldr r3, [r7, #4] + 80058b6: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 80058ba: 089b lsrs r3, r3, #2 + 80058bc: f003 0301 and.w r3, r3, #1 + 80058c0: b2db uxtb r3, r3 + 80058c2: 2b00 cmp r3, #0 + 80058c4: d05d beq.n 8005982 + { + /* Restart the auto-negotiation */ + if(heth.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) + 80058c6: 4b34 ldr r3, [pc, #208] ; (8005998 ) + 80058c8: 685b ldr r3, [r3, #4] + 80058ca: 2b00 cmp r3, #0 + 80058cc: d03f beq.n 800594e + { + /* Enable Auto-Negotiation */ + HAL_ETH_WritePHYRegister(&heth, PHY_BCR, PHY_AUTONEGOTIATION); + 80058ce: f44f 5280 mov.w r2, #4096 ; 0x1000 + 80058d2: 2100 movs r1, #0 + 80058d4: 4830 ldr r0, [pc, #192] ; (8005998 ) + 80058d6: f7fc fba0 bl 800201a + + /* Get tick */ + tickstart = HAL_GetTick(); + 80058da: f7fb fe31 bl 8001540 + 80058de: 4603 mov r3, r0 + 80058e0: 60fb str r3, [r7, #12] + + /* Wait until the auto-negotiation will be completed */ + do + { + HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, ®value); + 80058e2: f107 0308 add.w r3, r7, #8 + 80058e6: 461a mov r2, r3 + 80058e8: 2101 movs r1, #1 + 80058ea: 482b ldr r0, [pc, #172] ; (8005998 ) + 80058ec: f7fc fb2d bl 8001f4a + + /* Check for the Timeout ( 1s ) */ + if((HAL_GetTick() - tickstart ) > 1000) + 80058f0: f7fb fe26 bl 8001540 + 80058f4: 4602 mov r2, r0 + 80058f6: 68fb ldr r3, [r7, #12] + 80058f8: 1ad3 subs r3, r2, r3 + 80058fa: f5b3 7f7a cmp.w r3, #1000 ; 0x3e8 + 80058fe: d828 bhi.n 8005952 + { + /* In case of timeout */ + goto error; + } + } while (((regvalue & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE)); + 8005900: 68bb ldr r3, [r7, #8] + 8005902: f003 0320 and.w r3, r3, #32 + 8005906: 2b00 cmp r3, #0 + 8005908: d0eb beq.n 80058e2 + + /* Read the result of the auto-negotiation */ + HAL_ETH_ReadPHYRegister(&heth, PHY_SR, ®value); + 800590a: f107 0308 add.w r3, r7, #8 + 800590e: 461a mov r2, r3 + 8005910: 2110 movs r1, #16 + 8005912: 4821 ldr r0, [pc, #132] ; (8005998 ) + 8005914: f7fc fb19 bl 8001f4a + + /* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */ + if((regvalue & PHY_DUPLEX_STATUS) != (uint32_t)RESET) + 8005918: 68bb ldr r3, [r7, #8] + 800591a: f003 0304 and.w r3, r3, #4 + 800591e: 2b00 cmp r3, #0 + 8005920: d004 beq.n 800592c + { + /* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */ + heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; + 8005922: 4b1d ldr r3, [pc, #116] ; (8005998 ) + 8005924: f44f 6200 mov.w r2, #2048 ; 0x800 + 8005928: 60da str r2, [r3, #12] + 800592a: e002 b.n 8005932 + } + else + { + /* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */ + heth.Init.DuplexMode = ETH_MODE_HALFDUPLEX; + 800592c: 4b1a ldr r3, [pc, #104] ; (8005998 ) + 800592e: 2200 movs r2, #0 + 8005930: 60da str r2, [r3, #12] + } + /* Configure the MAC with the speed fixed by the auto-negotiation process */ + if(regvalue & PHY_SPEED_STATUS) + 8005932: 68bb ldr r3, [r7, #8] + 8005934: f003 0302 and.w r3, r3, #2 + 8005938: 2b00 cmp r3, #0 + 800593a: d003 beq.n 8005944 + { + /* Set Ethernet speed to 10M following the auto-negotiation */ + heth.Init.Speed = ETH_SPEED_10M; + 800593c: 4b16 ldr r3, [pc, #88] ; (8005998 ) + 800593e: 2200 movs r2, #0 + 8005940: 609a str r2, [r3, #8] + 8005942: e016 b.n 8005972 + } + else + { + /* Set Ethernet speed to 100M following the auto-negotiation */ + heth.Init.Speed = ETH_SPEED_100M; + 8005944: 4b14 ldr r3, [pc, #80] ; (8005998 ) + 8005946: f44f 4280 mov.w r2, #16384 ; 0x4000 + 800594a: 609a str r2, [r3, #8] + 800594c: e011 b.n 8005972 + } + } + else /* AutoNegotiation Disable */ + { + error : + 800594e: bf00 nop + 8005950: e000 b.n 8005954 + goto error; + 8005952: bf00 nop + /* Check parameters */ + assert_param(IS_ETH_SPEED(heth.Init.Speed)); + assert_param(IS_ETH_DUPLEX_MODE(heth.Init.DuplexMode)); + + /* Set MAC Speed and Duplex Mode to PHY */ + HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) | + 8005954: 4b10 ldr r3, [pc, #64] ; (8005998 ) + 8005956: 68db ldr r3, [r3, #12] + 8005958: 08db lsrs r3, r3, #3 + 800595a: b29a uxth r2, r3 + (uint16_t)(heth.Init.Speed >> 1))); + 800595c: 4b0e ldr r3, [pc, #56] ; (8005998 ) + 800595e: 689b ldr r3, [r3, #8] + 8005960: 085b lsrs r3, r3, #1 + 8005962: b29b uxth r3, r3 + HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) | + 8005964: 4313 orrs r3, r2 + 8005966: b29b uxth r3, r3 + 8005968: 461a mov r2, r3 + 800596a: 2100 movs r1, #0 + 800596c: 480a ldr r0, [pc, #40] ; (8005998 ) + 800596e: f7fc fb54 bl 800201a + } + + /* ETHERNET MAC Re-Configuration */ + HAL_ETH_ConfigMAC(&heth, (ETH_MACInitTypeDef *) NULL); + 8005972: 2100 movs r1, #0 + 8005974: 4808 ldr r0, [pc, #32] ; (8005998 ) + 8005976: f7fc fc15 bl 80021a4 + + /* Restart MAC interface */ + HAL_ETH_Start(&heth); + 800597a: 4807 ldr r0, [pc, #28] ; (8005998 ) + 800597c: f7fc fbb3 bl 80020e6 + 8005980: e002 b.n 8005988 + } + else + { + /* Stop MAC interface */ + HAL_ETH_Stop(&heth); + 8005982: 4805 ldr r0, [pc, #20] ; (8005998 ) + 8005984: f7fc fbde bl 8002144 + } + + ethernetif_notify_conn_changed(netif); + 8005988: 6878 ldr r0, [r7, #4] + 800598a: f000 f807 bl 800599c +} + 800598e: bf00 nop + 8005990: 3710 adds r7, #16 + 8005992: 46bd mov sp, r7 + 8005994: bd80 pop {r7, pc} + 8005996: bf00 nop + 8005998: 200039a4 .word 0x200039a4 + +0800599c : + * @brief This function notify user about link status changement. + * @param netif: the network interface + * @retval None + */ +__weak void ethernetif_notify_conn_changed(struct netif *netif) +{ + 800599c: b480 push {r7} + 800599e: b083 sub sp, #12 + 80059a0: af00 add r7, sp, #0 + 80059a2: 6078 str r0, [r7, #4] + /* NOTE : This is function could be implemented in user file + when the callback is needed, + */ + +} + 80059a4: bf00 nop + 80059a6: 370c adds r7, #12 + 80059a8: 46bd mov sp, r7 + 80059aa: bc80 pop {r7} + 80059ac: 4770 bx lr + +080059ae : + * @param client MQTT client + * @return New packet identifier, range 1 to 65535 + */ +static u16_t +msg_generate_packet_id(mqtt_client_t *client) +{ + 80059ae: b480 push {r7} + 80059b0: b083 sub sp, #12 + 80059b2: af00 add r7, sp, #0 + 80059b4: 6078 str r0, [r7, #4] + client->pkt_id_seq++; + 80059b6: 687b ldr r3, [r7, #4] + 80059b8: 88db ldrh r3, [r3, #6] + 80059ba: 3301 adds r3, #1 + 80059bc: b29a uxth r2, r3 + 80059be: 687b ldr r3, [r7, #4] + 80059c0: 80da strh r2, [r3, #6] + if (client->pkt_id_seq == 0) { + 80059c2: 687b ldr r3, [r7, #4] + 80059c4: 88db ldrh r3, [r3, #6] + 80059c6: 2b00 cmp r3, #0 + 80059c8: d105 bne.n 80059d6 + client->pkt_id_seq++; + 80059ca: 687b ldr r3, [r7, #4] + 80059cc: 88db ldrh r3, [r3, #6] + 80059ce: 3301 adds r3, #1 + 80059d0: b29a uxth r2, r3 + 80059d2: 687b ldr r3, [r7, #4] + 80059d4: 80da strh r2, [r3, #6] + } + return client->pkt_id_seq; + 80059d6: 687b ldr r3, [r7, #4] + 80059d8: 88db ldrh r3, [r3, #6] +} + 80059da: 4618 mov r0, r3 + 80059dc: 370c adds r7, #12 + 80059de: 46bd mov sp, r7 + 80059e0: bc80 pop {r7} + 80059e2: 4770 bx lr + +080059e4 : + * @param rb Output ring buffer + * @param tpcb TCP connection handle + */ +static void +mqtt_output_send(struct mqtt_ringbuf_t *rb, struct tcp_pcb *tpcb) +{ + 80059e4: b580 push {r7, lr} + 80059e6: b084 sub sp, #16 + 80059e8: af00 add r7, sp, #0 + 80059ea: 6078 str r0, [r7, #4] + 80059ec: 6039 str r1, [r7, #0] + err_t err; + u8_t wrap = 0; + 80059ee: 2300 movs r3, #0 + 80059f0: 73bb strb r3, [r7, #14] + u16_t ringbuf_lin_len = mqtt_ringbuf_linear_read_length(rb); + 80059f2: 687b ldr r3, [r7, #4] + 80059f4: 885b ldrh r3, [r3, #2] + 80059f6: b2db uxtb r3, r3 + 80059f8: f5c3 7380 rsb r3, r3, #256 ; 0x100 + 80059fc: 687a ldr r2, [r7, #4] + 80059fe: 8811 ldrh r1, [r2, #0] + 8005a00: 687a ldr r2, [r7, #4] + 8005a02: 8852 ldrh r2, [r2, #2] + 8005a04: 1a8a subs r2, r1, r2 + 8005a06: b292 uxth r2, r2 + 8005a08: 4293 cmp r3, r2 + 8005a0a: bfa8 it ge + 8005a0c: 4613 movge r3, r2 + 8005a0e: 817b strh r3, [r7, #10] + u16_t send_len = tcp_sndbuf(tpcb); + 8005a10: 683b ldr r3, [r7, #0] + 8005a12: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 + 8005a16: 81bb strh r3, [r7, #12] + LWIP_ASSERT("mqtt_output_send: tpcb != NULL", tpcb != NULL); + 8005a18: 683b ldr r3, [r7, #0] + 8005a1a: 2b00 cmp r3, #0 + 8005a1c: d105 bne.n 8005a2a + 8005a1e: 4b3a ldr r3, [pc, #232] ; (8005b08 ) + 8005a20: 22d3 movs r2, #211 ; 0xd3 + 8005a22: 493a ldr r1, [pc, #232] ; (8005b0c ) + 8005a24: 483a ldr r0, [pc, #232] ; (8005b10 ) + 8005a26: f00d f9ad bl 8012d84 + + if (send_len == 0 || ringbuf_lin_len == 0) { + 8005a2a: 89bb ldrh r3, [r7, #12] + 8005a2c: 2b00 cmp r3, #0 + 8005a2e: d066 beq.n 8005afe + 8005a30: 897b ldrh r3, [r7, #10] + 8005a32: 2b00 cmp r3, #0 + 8005a34: d063 beq.n 8005afe + } + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_output_send: tcp_sndbuf: %d bytes, ringbuf_linear_available: %d, get %d, put %d\n", + send_len, ringbuf_lin_len, ((rb)->get & MQTT_RINGBUF_IDX_MASK), ((rb)->put & MQTT_RINGBUF_IDX_MASK))); + + if (send_len > ringbuf_lin_len) { + 8005a36: 89ba ldrh r2, [r7, #12] + 8005a38: 897b ldrh r3, [r7, #10] + 8005a3a: 429a cmp r2, r3 + 8005a3c: d90e bls.n 8005a5c + /* Space in TCP output buffer is larger than available in ring buffer linear portion */ + send_len = ringbuf_lin_len; + 8005a3e: 897b ldrh r3, [r7, #10] + 8005a40: 81bb strh r3, [r7, #12] + /* Wrap around if more data in ring buffer after linear portion */ + wrap = (mqtt_ringbuf_len(rb) > ringbuf_lin_len); + 8005a42: 687b ldr r3, [r7, #4] + 8005a44: 881a ldrh r2, [r3, #0] + 8005a46: 687b ldr r3, [r7, #4] + 8005a48: 885b ldrh r3, [r3, #2] + 8005a4a: 1ad3 subs r3, r2, r3 + 8005a4c: b29b uxth r3, r3 + 8005a4e: 897a ldrh r2, [r7, #10] + 8005a50: 429a cmp r2, r3 + 8005a52: bf34 ite cc + 8005a54: 2301 movcc r3, #1 + 8005a56: 2300 movcs r3, #0 + 8005a58: b2db uxtb r3, r3 + 8005a5a: 73bb strb r3, [r7, #14] + } + err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY | (wrap ? TCP_WRITE_FLAG_MORE : 0)); + 8005a5c: 687b ldr r3, [r7, #4] + 8005a5e: 885b ldrh r3, [r3, #2] + 8005a60: b2db uxtb r3, r3 + 8005a62: 687a ldr r2, [r7, #4] + 8005a64: 4413 add r3, r2 + 8005a66: 1d19 adds r1, r3, #4 + 8005a68: 7bbb ldrb r3, [r7, #14] + 8005a6a: 2b00 cmp r3, #0 + 8005a6c: d001 beq.n 8005a72 + 8005a6e: 2303 movs r3, #3 + 8005a70: e000 b.n 8005a74 + 8005a72: 2301 movs r3, #1 + 8005a74: 89ba ldrh r2, [r7, #12] + 8005a76: 6838 ldr r0, [r7, #0] + 8005a78: f006 ffac bl 800c9d4 + 8005a7c: 4603 mov r3, r0 + 8005a7e: 73fb strb r3, [r7, #15] + if ((err == ERR_OK) && wrap) { + 8005a80: f997 300f ldrsb.w r3, [r7, #15] + 8005a84: 2b00 cmp r3, #0 + 8005a86: d12b bne.n 8005ae0 + 8005a88: 7bbb ldrb r3, [r7, #14] + 8005a8a: 2b00 cmp r3, #0 + 8005a8c: d028 beq.n 8005ae0 + mqtt_ringbuf_advance_get_idx(rb, send_len); + 8005a8e: 687b ldr r3, [r7, #4] + 8005a90: 885a ldrh r2, [r3, #2] + 8005a92: 89bb ldrh r3, [r7, #12] + 8005a94: 4413 add r3, r2 + 8005a96: b29a uxth r2, r3 + 8005a98: 687b ldr r3, [r7, #4] + 8005a9a: 805a strh r2, [r3, #2] + /* Use the lesser one of ring buffer linear length and TCP send buffer size */ + send_len = LWIP_MIN(tcp_sndbuf(tpcb), mqtt_ringbuf_linear_read_length(rb)); + 8005a9c: 687b ldr r3, [r7, #4] + 8005a9e: 885b ldrh r3, [r3, #2] + 8005aa0: b2db uxtb r3, r3 + 8005aa2: f5c3 7380 rsb r3, r3, #256 ; 0x100 + 8005aa6: 687a ldr r2, [r7, #4] + 8005aa8: 8811 ldrh r1, [r2, #0] + 8005aaa: 687a ldr r2, [r7, #4] + 8005aac: 8852 ldrh r2, [r2, #2] + 8005aae: 1a8a subs r2, r1, r2 + 8005ab0: b292 uxth r2, r2 + 8005ab2: 4293 cmp r3, r2 + 8005ab4: bfa8 it ge + 8005ab6: 4613 movge r3, r2 + 8005ab8: 683a ldr r2, [r7, #0] + 8005aba: f8b2 2060 ldrh.w r2, [r2, #96] ; 0x60 + 8005abe: 4293 cmp r3, r2 + 8005ac0: bfa8 it ge + 8005ac2: 4613 movge r3, r2 + 8005ac4: 81bb strh r3, [r7, #12] + err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY); + 8005ac6: 687b ldr r3, [r7, #4] + 8005ac8: 885b ldrh r3, [r3, #2] + 8005aca: b2db uxtb r3, r3 + 8005acc: 687a ldr r2, [r7, #4] + 8005ace: 4413 add r3, r2 + 8005ad0: 1d19 adds r1, r3, #4 + 8005ad2: 89ba ldrh r2, [r7, #12] + 8005ad4: 2301 movs r3, #1 + 8005ad6: 6838 ldr r0, [r7, #0] + 8005ad8: f006 ff7c bl 800c9d4 + 8005adc: 4603 mov r3, r0 + 8005ade: 73fb strb r3, [r7, #15] + } + + if (err == ERR_OK) { + 8005ae0: f997 300f ldrsb.w r3, [r7, #15] + 8005ae4: 2b00 cmp r3, #0 + 8005ae6: d10b bne.n 8005b00 + mqtt_ringbuf_advance_get_idx(rb, send_len); + 8005ae8: 687b ldr r3, [r7, #4] + 8005aea: 885a ldrh r2, [r3, #2] + 8005aec: 89bb ldrh r3, [r7, #12] + 8005aee: 4413 add r3, r2 + 8005af0: b29a uxth r2, r3 + 8005af2: 687b ldr r3, [r7, #4] + 8005af4: 805a strh r2, [r3, #2] + /* Flush */ + tcp_output(tpcb); + 8005af6: 6838 ldr r0, [r7, #0] + 8005af8: f007 fc1e bl 800d338 + 8005afc: e000 b.n 8005b00 + return; + 8005afe: bf00 nop + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_output_send: Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); + } +} + 8005b00: 3710 adds r7, #16 + 8005b02: 46bd mov sp, r7 + 8005b04: bd80 pop {r7, pc} + 8005b06: bf00 nop + 8005b08: 08013ea0 .word 0x08013ea0 + 8005b0c: 08013ed8 .word 0x08013ed8 + 8005b10: 08013ef8 .word 0x08013ef8 + +08005b14 : + * @param arg Parameter following callback + * @return Request or NULL if failed to create + */ +static struct mqtt_request_t * +mqtt_create_request(struct mqtt_request_t *r_objs, u16_t pkt_id, mqtt_request_cb_t cb, void *arg) +{ + 8005b14: b580 push {r7, lr} + 8005b16: b086 sub sp, #24 + 8005b18: af00 add r7, sp, #0 + 8005b1a: 60f8 str r0, [r7, #12] + 8005b1c: 607a str r2, [r7, #4] + 8005b1e: 603b str r3, [r7, #0] + 8005b20: 460b mov r3, r1 + 8005b22: 817b strh r3, [r7, #10] + struct mqtt_request_t *r = NULL; + 8005b24: 2300 movs r3, #0 + 8005b26: 617b str r3, [r7, #20] + u8_t n; + LWIP_ASSERT("mqtt_create_request: r_objs != NULL", r_objs != NULL); + 8005b28: 68fb ldr r3, [r7, #12] + 8005b2a: 2b00 cmp r3, #0 + 8005b2c: d106 bne.n 8005b3c + 8005b2e: 4b19 ldr r3, [pc, #100] ; (8005b94 ) + 8005b30: f240 1205 movw r2, #261 ; 0x105 + 8005b34: 4918 ldr r1, [pc, #96] ; (8005b98 ) + 8005b36: 4819 ldr r0, [pc, #100] ; (8005b9c ) + 8005b38: f00d f924 bl 8012d84 + for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + 8005b3c: 2300 movs r3, #0 + 8005b3e: 74fb strb r3, [r7, #19] + 8005b40: e01f b.n 8005b82 + /* Item point to itself if not in use */ + if (r_objs[n].next == &r_objs[n]) { + 8005b42: 7cfb ldrb r3, [r7, #19] + 8005b44: 011b lsls r3, r3, #4 + 8005b46: 68fa ldr r2, [r7, #12] + 8005b48: 4413 add r3, r2 + 8005b4a: 681a ldr r2, [r3, #0] + 8005b4c: 7cfb ldrb r3, [r7, #19] + 8005b4e: 011b lsls r3, r3, #4 + 8005b50: 68f9 ldr r1, [r7, #12] + 8005b52: 440b add r3, r1 + 8005b54: 429a cmp r2, r3 + 8005b56: d111 bne.n 8005b7c + r = &r_objs[n]; + 8005b58: 7cfb ldrb r3, [r7, #19] + 8005b5a: 011b lsls r3, r3, #4 + 8005b5c: 68fa ldr r2, [r7, #12] + 8005b5e: 4413 add r3, r2 + 8005b60: 617b str r3, [r7, #20] + r->next = NULL; + 8005b62: 697b ldr r3, [r7, #20] + 8005b64: 2200 movs r2, #0 + 8005b66: 601a str r2, [r3, #0] + r->cb = cb; + 8005b68: 697b ldr r3, [r7, #20] + 8005b6a: 687a ldr r2, [r7, #4] + 8005b6c: 605a str r2, [r3, #4] + r->arg = arg; + 8005b6e: 697b ldr r3, [r7, #20] + 8005b70: 683a ldr r2, [r7, #0] + 8005b72: 609a str r2, [r3, #8] + r->pkt_id = pkt_id; + 8005b74: 697b ldr r3, [r7, #20] + 8005b76: 897a ldrh r2, [r7, #10] + 8005b78: 819a strh r2, [r3, #12] + break; + 8005b7a: e005 b.n 8005b88 + for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + 8005b7c: 7cfb ldrb r3, [r7, #19] + 8005b7e: 3301 adds r3, #1 + 8005b80: 74fb strb r3, [r7, #19] + 8005b82: 7cfb ldrb r3, [r7, #19] + 8005b84: 2b03 cmp r3, #3 + 8005b86: d9dc bls.n 8005b42 + } + } + return r; + 8005b88: 697b ldr r3, [r7, #20] +} + 8005b8a: 4618 mov r0, r3 + 8005b8c: 3718 adds r7, #24 + 8005b8e: 46bd mov sp, r7 + 8005b90: bd80 pop {r7, pc} + 8005b92: bf00 nop + 8005b94: 08013ea0 .word 0x08013ea0 + 8005b98: 08013f20 .word 0x08013f20 + 8005b9c: 08013ef8 .word 0x08013ef8 + +08005ba0 : + * @param tail Pointer to request queue tail pointer + * @param r Request to append + */ +static void +mqtt_append_request(struct mqtt_request_t **tail, struct mqtt_request_t *r) +{ + 8005ba0: b580 push {r7, lr} + 8005ba2: b086 sub sp, #24 + 8005ba4: af00 add r7, sp, #0 + 8005ba6: 6078 str r0, [r7, #4] + 8005ba8: 6039 str r1, [r7, #0] + struct mqtt_request_t *head = NULL; + 8005baa: 2300 movs r3, #0 + 8005bac: 617b str r3, [r7, #20] + s16_t time_before = 0; + 8005bae: 2300 movs r3, #0 + 8005bb0: 827b strh r3, [r7, #18] + struct mqtt_request_t *iter; + + LWIP_ASSERT("mqtt_append_request: tail != NULL", tail != NULL); + 8005bb2: 687b ldr r3, [r7, #4] + 8005bb4: 2b00 cmp r3, #0 + 8005bb6: d106 bne.n 8005bc6 + 8005bb8: 4b1b ldr r3, [pc, #108] ; (8005c28 ) + 8005bba: f240 1221 movw r2, #289 ; 0x121 + 8005bbe: 491b ldr r1, [pc, #108] ; (8005c2c ) + 8005bc0: 481b ldr r0, [pc, #108] ; (8005c30 ) + 8005bc2: f00d f8df bl 8012d84 + + /* Iterate trough queue to find head, and count total timeout time */ + for (iter = *tail; iter != NULL; iter = iter->next) { + 8005bc6: 687b ldr r3, [r7, #4] + 8005bc8: 681b ldr r3, [r3, #0] + 8005bca: 60fb str r3, [r7, #12] + 8005bcc: e00a b.n 8005be4 + time_before += iter->timeout_diff; + 8005bce: 68fb ldr r3, [r7, #12] + 8005bd0: 89da ldrh r2, [r3, #14] + 8005bd2: 8a7b ldrh r3, [r7, #18] + 8005bd4: 4413 add r3, r2 + 8005bd6: b29b uxth r3, r3 + 8005bd8: 827b strh r3, [r7, #18] + head = iter; + 8005bda: 68fb ldr r3, [r7, #12] + 8005bdc: 617b str r3, [r7, #20] + for (iter = *tail; iter != NULL; iter = iter->next) { + 8005bde: 68fb ldr r3, [r7, #12] + 8005be0: 681b ldr r3, [r3, #0] + 8005be2: 60fb str r3, [r7, #12] + 8005be4: 68fb ldr r3, [r7, #12] + 8005be6: 2b00 cmp r3, #0 + 8005be8: d1f1 bne.n 8005bce + } + + LWIP_ASSERT("mqtt_append_request: time_before <= MQTT_REQ_TIMEOUT", time_before <= MQTT_REQ_TIMEOUT); + 8005bea: f9b7 3012 ldrsh.w r3, [r7, #18] + 8005bee: 2b1e cmp r3, #30 + 8005bf0: dd06 ble.n 8005c00 + 8005bf2: 4b0d ldr r3, [pc, #52] ; (8005c28 ) + 8005bf4: f240 1229 movw r2, #297 ; 0x129 + 8005bf8: 490e ldr r1, [pc, #56] ; (8005c34 ) + 8005bfa: 480d ldr r0, [pc, #52] ; (8005c30 ) + 8005bfc: f00d f8c2 bl 8012d84 + r->timeout_diff = MQTT_REQ_TIMEOUT - time_before; + 8005c00: 8a7b ldrh r3, [r7, #18] + 8005c02: f1c3 031e rsb r3, r3, #30 + 8005c06: b29a uxth r2, r3 + 8005c08: 683b ldr r3, [r7, #0] + 8005c0a: 81da strh r2, [r3, #14] + if (head == NULL) { + 8005c0c: 697b ldr r3, [r7, #20] + 8005c0e: 2b00 cmp r3, #0 + 8005c10: d103 bne.n 8005c1a + *tail = r; + 8005c12: 687b ldr r3, [r7, #4] + 8005c14: 683a ldr r2, [r7, #0] + 8005c16: 601a str r2, [r3, #0] + } else { + head->next = r; + } +} + 8005c18: e002 b.n 8005c20 + head->next = r; + 8005c1a: 697b ldr r3, [r7, #20] + 8005c1c: 683a ldr r2, [r7, #0] + 8005c1e: 601a str r2, [r3, #0] +} + 8005c20: bf00 nop + 8005c22: 3718 adds r7, #24 + 8005c24: 46bd mov sp, r7 + 8005c26: bd80 pop {r7, pc} + 8005c28: 08013ea0 .word 0x08013ea0 + 8005c2c: 08013f44 .word 0x08013f44 + 8005c30: 08013ef8 .word 0x08013ef8 + 8005c34: 08013f68 .word 0x08013f68 + +08005c38 : + * Delete request item + * @param r Request item to delete + */ +static void +mqtt_delete_request(struct mqtt_request_t *r) +{ + 8005c38: b480 push {r7} + 8005c3a: b083 sub sp, #12 + 8005c3c: af00 add r7, sp, #0 + 8005c3e: 6078 str r0, [r7, #4] + if (r != NULL) { + 8005c40: 687b ldr r3, [r7, #4] + 8005c42: 2b00 cmp r3, #0 + 8005c44: d002 beq.n 8005c4c + r->next = r; + 8005c46: 687b ldr r3, [r7, #4] + 8005c48: 687a ldr r2, [r7, #4] + 8005c4a: 601a str r2, [r3, #0] + } +} + 8005c4c: bf00 nop + 8005c4e: 370c adds r7, #12 + 8005c50: 46bd mov sp, r7 + 8005c52: bc80 pop {r7} + 8005c54: 4770 bx lr + ... + +08005c58 : + * @param pkt_id Packet identifier of request to take + * @return Request item if found, NULL if not + */ +static struct mqtt_request_t * +mqtt_take_request(struct mqtt_request_t **tail, u16_t pkt_id) +{ + 8005c58: b580 push {r7, lr} + 8005c5a: b084 sub sp, #16 + 8005c5c: af00 add r7, sp, #0 + 8005c5e: 6078 str r0, [r7, #4] + 8005c60: 460b mov r3, r1 + 8005c62: 807b strh r3, [r7, #2] + struct mqtt_request_t *iter = NULL, *prev = NULL; + 8005c64: 2300 movs r3, #0 + 8005c66: 60fb str r3, [r7, #12] + 8005c68: 2300 movs r3, #0 + 8005c6a: 60bb str r3, [r7, #8] + LWIP_ASSERT("mqtt_take_request: tail != NULL", tail != NULL); + 8005c6c: 687b ldr r3, [r7, #4] + 8005c6e: 2b00 cmp r3, #0 + 8005c70: d106 bne.n 8005c80 + 8005c72: 4b1f ldr r3, [pc, #124] ; (8005cf0 ) + 8005c74: f240 1249 movw r2, #329 ; 0x149 + 8005c78: 491e ldr r1, [pc, #120] ; (8005cf4 ) + 8005c7a: 481f ldr r0, [pc, #124] ; (8005cf8 ) + 8005c7c: f00d f882 bl 8012d84 + /* Search all request for pkt_id */ + for (iter = *tail; iter != NULL; iter = iter->next) { + 8005c80: 687b ldr r3, [r7, #4] + 8005c82: 681b ldr r3, [r3, #0] + 8005c84: 60fb str r3, [r7, #12] + 8005c86: e009 b.n 8005c9c + if (iter->pkt_id == pkt_id) { + 8005c88: 68fb ldr r3, [r7, #12] + 8005c8a: 899b ldrh r3, [r3, #12] + 8005c8c: 887a ldrh r2, [r7, #2] + 8005c8e: 429a cmp r2, r3 + 8005c90: d008 beq.n 8005ca4 + break; + } + prev = iter; + 8005c92: 68fb ldr r3, [r7, #12] + 8005c94: 60bb str r3, [r7, #8] + for (iter = *tail; iter != NULL; iter = iter->next) { + 8005c96: 68fb ldr r3, [r7, #12] + 8005c98: 681b ldr r3, [r3, #0] + 8005c9a: 60fb str r3, [r7, #12] + 8005c9c: 68fb ldr r3, [r7, #12] + 8005c9e: 2b00 cmp r3, #0 + 8005ca0: d1f2 bne.n 8005c88 + 8005ca2: e000 b.n 8005ca6 + break; + 8005ca4: bf00 nop + } + + /* If request was found */ + if (iter != NULL) { + 8005ca6: 68fb ldr r3, [r7, #12] + 8005ca8: 2b00 cmp r3, #0 + 8005caa: d01c beq.n 8005ce6 + /* unchain */ + if (prev == NULL) { + 8005cac: 68bb ldr r3, [r7, #8] + 8005cae: 2b00 cmp r3, #0 + 8005cb0: d104 bne.n 8005cbc + *tail= iter->next; + 8005cb2: 68fb ldr r3, [r7, #12] + 8005cb4: 681a ldr r2, [r3, #0] + 8005cb6: 687b ldr r3, [r7, #4] + 8005cb8: 601a str r2, [r3, #0] + 8005cba: e003 b.n 8005cc4 + } else { + prev->next = iter->next; + 8005cbc: 68fb ldr r3, [r7, #12] + 8005cbe: 681a ldr r2, [r3, #0] + 8005cc0: 68bb ldr r3, [r7, #8] + 8005cc2: 601a str r2, [r3, #0] + } + /* If exists, add remaining timeout time for the request to next */ + if (iter->next != NULL) { + 8005cc4: 68fb ldr r3, [r7, #12] + 8005cc6: 681b ldr r3, [r3, #0] + 8005cc8: 2b00 cmp r3, #0 + 8005cca: d009 beq.n 8005ce0 + iter->next->timeout_diff += iter->timeout_diff; + 8005ccc: 68fb ldr r3, [r7, #12] + 8005cce: 681b ldr r3, [r3, #0] + 8005cd0: 89d9 ldrh r1, [r3, #14] + 8005cd2: 68fb ldr r3, [r7, #12] + 8005cd4: 89da ldrh r2, [r3, #14] + 8005cd6: 68fb ldr r3, [r7, #12] + 8005cd8: 681b ldr r3, [r3, #0] + 8005cda: 440a add r2, r1 + 8005cdc: b292 uxth r2, r2 + 8005cde: 81da strh r2, [r3, #14] + } + iter->next = NULL; + 8005ce0: 68fb ldr r3, [r7, #12] + 8005ce2: 2200 movs r2, #0 + 8005ce4: 601a str r2, [r3, #0] + } + return iter; + 8005ce6: 68fb ldr r3, [r7, #12] +} + 8005ce8: 4618 mov r0, r3 + 8005cea: 3710 adds r7, #16 + 8005cec: 46bd mov sp, r7 + 8005cee: bd80 pop {r7, pc} + 8005cf0: 08013ea0 .word 0x08013ea0 + 8005cf4: 08013fa0 .word 0x08013fa0 + 8005cf8: 08013ef8 .word 0x08013ef8 + +08005cfc : + * @param tail Pointer to request queue tail pointer + * @param t Time since last call in seconds + */ +static void +mqtt_request_time_elapsed(struct mqtt_request_t **tail, u8_t t) +{ + 8005cfc: b580 push {r7, lr} + 8005cfe: b084 sub sp, #16 + 8005d00: af00 add r7, sp, #0 + 8005d02: 6078 str r0, [r7, #4] + 8005d04: 460b mov r3, r1 + 8005d06: 70fb strb r3, [r7, #3] + struct mqtt_request_t *r; + LWIP_ASSERT("mqtt_request_time_elapsed: tail != NULL", tail != NULL); + 8005d08: 687b ldr r3, [r7, #4] + 8005d0a: 2b00 cmp r3, #0 + 8005d0c: d106 bne.n 8005d1c + 8005d0e: 4b21 ldr r3, [pc, #132] ; (8005d94 ) + 8005d10: f44f 72b6 mov.w r2, #364 ; 0x16c + 8005d14: 4920 ldr r1, [pc, #128] ; (8005d98 ) + 8005d16: 4821 ldr r0, [pc, #132] ; (8005d9c ) + 8005d18: f00d f834 bl 8012d84 + r = *tail; + 8005d1c: 687b ldr r3, [r7, #4] + 8005d1e: 681b ldr r3, [r3, #0] + 8005d20: 60fb str r3, [r7, #12] + while (t > 0 && r != NULL) { + 8005d22: e02c b.n 8005d7e + if (t >= r->timeout_diff) { + 8005d24: 78fb ldrb r3, [r7, #3] + 8005d26: b29a uxth r2, r3 + 8005d28: 68fb ldr r3, [r7, #12] + 8005d2a: 89db ldrh r3, [r3, #14] + 8005d2c: 429a cmp r2, r3 + 8005d2e: d31c bcc.n 8005d6a + t -= (u8_t)r->timeout_diff; + 8005d30: 68fb ldr r3, [r7, #12] + 8005d32: 89db ldrh r3, [r3, #14] + 8005d34: b2db uxtb r3, r3 + 8005d36: 78fa ldrb r2, [r7, #3] + 8005d38: 1ad3 subs r3, r2, r3 + 8005d3a: 70fb strb r3, [r7, #3] + /* Unchain */ + *tail = r->next; + 8005d3c: 68fb ldr r3, [r7, #12] + 8005d3e: 681a ldr r2, [r3, #0] + 8005d40: 687b ldr r3, [r7, #4] + 8005d42: 601a str r2, [r3, #0] + /* Notify upper layer about timeout */ + if (r->cb != NULL) { + 8005d44: 68fb ldr r3, [r7, #12] + 8005d46: 685b ldr r3, [r3, #4] + 8005d48: 2b00 cmp r3, #0 + 8005d4a: d007 beq.n 8005d5c + r->cb(r->arg, ERR_TIMEOUT); + 8005d4c: 68fb ldr r3, [r7, #12] + 8005d4e: 685b ldr r3, [r3, #4] + 8005d50: 68fa ldr r2, [r7, #12] + 8005d52: 6892 ldr r2, [r2, #8] + 8005d54: f06f 0102 mvn.w r1, #2 + 8005d58: 4610 mov r0, r2 + 8005d5a: 4798 blx r3 + } + mqtt_delete_request(r); + 8005d5c: 68f8 ldr r0, [r7, #12] + 8005d5e: f7ff ff6b bl 8005c38 + /* Tail might be be modified in callback, so re-read it in every iteration */ + r = *(struct mqtt_request_t * const volatile *)tail; + 8005d62: 687b ldr r3, [r7, #4] + 8005d64: 681b ldr r3, [r3, #0] + 8005d66: 60fb str r3, [r7, #12] + 8005d68: e009 b.n 8005d7e + } else { + r->timeout_diff -= t; + 8005d6a: 68fb ldr r3, [r7, #12] + 8005d6c: 89da ldrh r2, [r3, #14] + 8005d6e: 78fb ldrb r3, [r7, #3] + 8005d70: b29b uxth r3, r3 + 8005d72: 1ad3 subs r3, r2, r3 + 8005d74: b29a uxth r2, r3 + 8005d76: 68fb ldr r3, [r7, #12] + 8005d78: 81da strh r2, [r3, #14] + t = 0; + 8005d7a: 2300 movs r3, #0 + 8005d7c: 70fb strb r3, [r7, #3] + while (t > 0 && r != NULL) { + 8005d7e: 78fb ldrb r3, [r7, #3] + 8005d80: 2b00 cmp r3, #0 + 8005d82: d002 beq.n 8005d8a + 8005d84: 68fb ldr r3, [r7, #12] + 8005d86: 2b00 cmp r3, #0 + 8005d88: d1cc bne.n 8005d24 + } + } +} + 8005d8a: bf00 nop + 8005d8c: 3710 adds r7, #16 + 8005d8e: 46bd mov sp, r7 + 8005d90: bd80 pop {r7, pc} + 8005d92: bf00 nop + 8005d94: 08013ea0 .word 0x08013ea0 + 8005d98: 08013fc0 .word 0x08013fc0 + 8005d9c: 08013ef8 .word 0x08013ef8 + +08005da0 : + * Free all request items + * @param tail Pointer to request queue tail pointer + */ +static void +mqtt_clear_requests(struct mqtt_request_t **tail) +{ + 8005da0: b580 push {r7, lr} + 8005da2: b084 sub sp, #16 + 8005da4: af00 add r7, sp, #0 + 8005da6: 6078 str r0, [r7, #4] + struct mqtt_request_t *iter, *next; + LWIP_ASSERT("mqtt_clear_requests: tail != NULL", tail != NULL); + 8005da8: 687b ldr r3, [r7, #4] + 8005daa: 2b00 cmp r3, #0 + 8005dac: d106 bne.n 8005dbc + 8005dae: 4b0e ldr r3, [pc, #56] ; (8005de8 ) + 8005db0: f240 1289 movw r2, #393 ; 0x189 + 8005db4: 490d ldr r1, [pc, #52] ; (8005dec ) + 8005db6: 480e ldr r0, [pc, #56] ; (8005df0 ) + 8005db8: f00c ffe4 bl 8012d84 + for (iter = *tail; iter != NULL; iter = next) { + 8005dbc: 687b ldr r3, [r7, #4] + 8005dbe: 681b ldr r3, [r3, #0] + 8005dc0: 60fb str r3, [r7, #12] + 8005dc2: e007 b.n 8005dd4 + next = iter->next; + 8005dc4: 68fb ldr r3, [r7, #12] + 8005dc6: 681b ldr r3, [r3, #0] + 8005dc8: 60bb str r3, [r7, #8] + mqtt_delete_request(iter); + 8005dca: 68f8 ldr r0, [r7, #12] + 8005dcc: f7ff ff34 bl 8005c38 + for (iter = *tail; iter != NULL; iter = next) { + 8005dd0: 68bb ldr r3, [r7, #8] + 8005dd2: 60fb str r3, [r7, #12] + 8005dd4: 68fb ldr r3, [r7, #12] + 8005dd6: 2b00 cmp r3, #0 + 8005dd8: d1f4 bne.n 8005dc4 + } + *tail = NULL; + 8005dda: 687b ldr r3, [r7, #4] + 8005ddc: 2200 movs r2, #0 + 8005dde: 601a str r2, [r3, #0] +} + 8005de0: bf00 nop + 8005de2: 3710 adds r7, #16 + 8005de4: 46bd mov sp, r7 + 8005de6: bd80 pop {r7, pc} + 8005de8: 08013ea0 .word 0x08013ea0 + 8005dec: 08013fe8 .word 0x08013fe8 + 8005df0: 08013ef8 .word 0x08013ef8 + +08005df4 : + * Initialize all request items + * @param r_objs Pointer to request objects + */ +static void +mqtt_init_requests(struct mqtt_request_t *r_objs) +{ + 8005df4: b580 push {r7, lr} + 8005df6: b084 sub sp, #16 + 8005df8: af00 add r7, sp, #0 + 8005dfa: 6078 str r0, [r7, #4] + u8_t n; + LWIP_ASSERT("mqtt_init_requests: r_objs != NULL", r_objs != NULL); + 8005dfc: 687b ldr r3, [r7, #4] + 8005dfe: 2b00 cmp r3, #0 + 8005e00: d106 bne.n 8005e10 + 8005e02: 4b0f ldr r3, [pc, #60] ; (8005e40 ) + 8005e04: f44f 72cc mov.w r2, #408 ; 0x198 + 8005e08: 490e ldr r1, [pc, #56] ; (8005e44 ) + 8005e0a: 480f ldr r0, [pc, #60] ; (8005e48 ) + 8005e0c: f00c ffba bl 8012d84 + for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + 8005e10: 2300 movs r3, #0 + 8005e12: 73fb strb r3, [r7, #15] + 8005e14: e00b b.n 8005e2e + /* Item pointing to itself indicates unused */ + r_objs[n].next = &r_objs[n]; + 8005e16: 7bfb ldrb r3, [r7, #15] + 8005e18: 011a lsls r2, r3, #4 + 8005e1a: 7bfb ldrb r3, [r7, #15] + 8005e1c: 011b lsls r3, r3, #4 + 8005e1e: 6879 ldr r1, [r7, #4] + 8005e20: 440b add r3, r1 + 8005e22: 6879 ldr r1, [r7, #4] + 8005e24: 440a add r2, r1 + 8005e26: 601a str r2, [r3, #0] + for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + 8005e28: 7bfb ldrb r3, [r7, #15] + 8005e2a: 3301 adds r3, #1 + 8005e2c: 73fb strb r3, [r7, #15] + 8005e2e: 7bfb ldrb r3, [r7, #15] + 8005e30: 2b03 cmp r3, #3 + 8005e32: d9f0 bls.n 8005e16 + } +} + 8005e34: bf00 nop + 8005e36: bf00 nop + 8005e38: 3710 adds r7, #16 + 8005e3a: 46bd mov sp, r7 + 8005e3c: bd80 pop {r7, pc} + 8005e3e: bf00 nop + 8005e40: 08013ea0 .word 0x08013ea0 + 8005e44: 0801400c .word 0x0801400c + 8005e48: 08013ef8 .word 0x08013ef8 + +08005e4c : +/* Output message build helpers */ + + +static void +mqtt_output_append_u8(struct mqtt_ringbuf_t *rb, u8_t value) +{ + 8005e4c: b480 push {r7} + 8005e4e: b083 sub sp, #12 + 8005e50: af00 add r7, sp, #0 + 8005e52: 6078 str r0, [r7, #4] + 8005e54: 460b mov r3, r1 + 8005e56: 70fb strb r3, [r7, #3] + mqtt_ringbuf_put(rb, value); + 8005e58: 687b ldr r3, [r7, #4] + 8005e5a: 881b ldrh r3, [r3, #0] + 8005e5c: 1c5a adds r2, r3, #1 + 8005e5e: b291 uxth r1, r2 + 8005e60: 687a ldr r2, [r7, #4] + 8005e62: 8011 strh r1, [r2, #0] + 8005e64: b2db uxtb r3, r3 + 8005e66: 687a ldr r2, [r7, #4] + 8005e68: 4413 add r3, r2 + 8005e6a: 78fa ldrb r2, [r7, #3] + 8005e6c: 711a strb r2, [r3, #4] +} + 8005e6e: bf00 nop + 8005e70: 370c adds r7, #12 + 8005e72: 46bd mov sp, r7 + 8005e74: bc80 pop {r7} + 8005e76: 4770 bx lr + +08005e78 : + +static +void mqtt_output_append_u16(struct mqtt_ringbuf_t *rb, u16_t value) +{ + 8005e78: b480 push {r7} + 8005e7a: b083 sub sp, #12 + 8005e7c: af00 add r7, sp, #0 + 8005e7e: 6078 str r0, [r7, #4] + 8005e80: 460b mov r3, r1 + 8005e82: 807b strh r3, [r7, #2] + mqtt_ringbuf_put(rb, value >> 8); + 8005e84: 887b ldrh r3, [r7, #2] + 8005e86: 0a1b lsrs r3, r3, #8 + 8005e88: b299 uxth r1, r3 + 8005e8a: 687b ldr r3, [r7, #4] + 8005e8c: 881b ldrh r3, [r3, #0] + 8005e8e: 1c5a adds r2, r3, #1 + 8005e90: b290 uxth r0, r2 + 8005e92: 687a ldr r2, [r7, #4] + 8005e94: 8010 strh r0, [r2, #0] + 8005e96: b2db uxtb r3, r3 + 8005e98: b2c9 uxtb r1, r1 + 8005e9a: 687a ldr r2, [r7, #4] + 8005e9c: 4413 add r3, r2 + 8005e9e: 460a mov r2, r1 + 8005ea0: 711a strb r2, [r3, #4] + mqtt_ringbuf_put(rb, value & 0xff); + 8005ea2: 687b ldr r3, [r7, #4] + 8005ea4: 881b ldrh r3, [r3, #0] + 8005ea6: 1c5a adds r2, r3, #1 + 8005ea8: b291 uxth r1, r2 + 8005eaa: 687a ldr r2, [r7, #4] + 8005eac: 8011 strh r1, [r2, #0] + 8005eae: b2db uxtb r3, r3 + 8005eb0: 887a ldrh r2, [r7, #2] + 8005eb2: b2d1 uxtb r1, r2 + 8005eb4: 687a ldr r2, [r7, #4] + 8005eb6: 4413 add r3, r2 + 8005eb8: 460a mov r2, r1 + 8005eba: 711a strb r2, [r3, #4] +} + 8005ebc: bf00 nop + 8005ebe: 370c adds r7, #12 + 8005ec0: 46bd mov sp, r7 + 8005ec2: bc80 pop {r7} + 8005ec4: 4770 bx lr + +08005ec6 : + +static void +mqtt_output_append_buf(struct mqtt_ringbuf_t *rb, const void *data, u16_t length) +{ + 8005ec6: b480 push {r7} + 8005ec8: b087 sub sp, #28 + 8005eca: af00 add r7, sp, #0 + 8005ecc: 60f8 str r0, [r7, #12] + 8005ece: 60b9 str r1, [r7, #8] + 8005ed0: 4613 mov r3, r2 + 8005ed2: 80fb strh r3, [r7, #6] + u16_t n; + for (n = 0; n < length; n++) { + 8005ed4: 2300 movs r3, #0 + 8005ed6: 82fb strh r3, [r7, #22] + 8005ed8: e011 b.n 8005efe + mqtt_ringbuf_put(rb, ((const u8_t *)data)[n]); + 8005eda: 8afb ldrh r3, [r7, #22] + 8005edc: 68ba ldr r2, [r7, #8] + 8005ede: 441a add r2, r3 + 8005ee0: 68fb ldr r3, [r7, #12] + 8005ee2: 881b ldrh r3, [r3, #0] + 8005ee4: 1c59 adds r1, r3, #1 + 8005ee6: b288 uxth r0, r1 + 8005ee8: 68f9 ldr r1, [r7, #12] + 8005eea: 8008 strh r0, [r1, #0] + 8005eec: b2db uxtb r3, r3 + 8005eee: 7811 ldrb r1, [r2, #0] + 8005ef0: 68fa ldr r2, [r7, #12] + 8005ef2: 4413 add r3, r2 + 8005ef4: 460a mov r2, r1 + 8005ef6: 711a strb r2, [r3, #4] + for (n = 0; n < length; n++) { + 8005ef8: 8afb ldrh r3, [r7, #22] + 8005efa: 3301 adds r3, #1 + 8005efc: 82fb strh r3, [r7, #22] + 8005efe: 8afa ldrh r2, [r7, #22] + 8005f00: 88fb ldrh r3, [r7, #6] + 8005f02: 429a cmp r2, r3 + 8005f04: d3e9 bcc.n 8005eda + } +} + 8005f06: bf00 nop + 8005f08: bf00 nop + 8005f0a: 371c adds r7, #28 + 8005f0c: 46bd mov sp, r7 + 8005f0e: bc80 pop {r7} + 8005f10: 4770 bx lr + +08005f12 : + +static void +mqtt_output_append_string(struct mqtt_ringbuf_t *rb, const char *str, u16_t length) +{ + 8005f12: b480 push {r7} + 8005f14: b087 sub sp, #28 + 8005f16: af00 add r7, sp, #0 + 8005f18: 60f8 str r0, [r7, #12] + 8005f1a: 60b9 str r1, [r7, #8] + 8005f1c: 4613 mov r3, r2 + 8005f1e: 80fb strh r3, [r7, #6] + u16_t n; + mqtt_ringbuf_put(rb, length >> 8); + 8005f20: 88fb ldrh r3, [r7, #6] + 8005f22: 0a1b lsrs r3, r3, #8 + 8005f24: b299 uxth r1, r3 + 8005f26: 68fb ldr r3, [r7, #12] + 8005f28: 881b ldrh r3, [r3, #0] + 8005f2a: 1c5a adds r2, r3, #1 + 8005f2c: b290 uxth r0, r2 + 8005f2e: 68fa ldr r2, [r7, #12] + 8005f30: 8010 strh r0, [r2, #0] + 8005f32: b2db uxtb r3, r3 + 8005f34: b2c9 uxtb r1, r1 + 8005f36: 68fa ldr r2, [r7, #12] + 8005f38: 4413 add r3, r2 + 8005f3a: 460a mov r2, r1 + 8005f3c: 711a strb r2, [r3, #4] + mqtt_ringbuf_put(rb, length & 0xff); + 8005f3e: 68fb ldr r3, [r7, #12] + 8005f40: 881b ldrh r3, [r3, #0] + 8005f42: 1c5a adds r2, r3, #1 + 8005f44: b291 uxth r1, r2 + 8005f46: 68fa ldr r2, [r7, #12] + 8005f48: 8011 strh r1, [r2, #0] + 8005f4a: b2db uxtb r3, r3 + 8005f4c: 88fa ldrh r2, [r7, #6] + 8005f4e: b2d1 uxtb r1, r2 + 8005f50: 68fa ldr r2, [r7, #12] + 8005f52: 4413 add r3, r2 + 8005f54: 460a mov r2, r1 + 8005f56: 711a strb r2, [r3, #4] + for (n = 0; n < length; n++) { + 8005f58: 2300 movs r3, #0 + 8005f5a: 82fb strh r3, [r7, #22] + 8005f5c: e011 b.n 8005f82 + mqtt_ringbuf_put(rb, str[n]); + 8005f5e: 8afb ldrh r3, [r7, #22] + 8005f60: 68ba ldr r2, [r7, #8] + 8005f62: 441a add r2, r3 + 8005f64: 68fb ldr r3, [r7, #12] + 8005f66: 881b ldrh r3, [r3, #0] + 8005f68: 1c59 adds r1, r3, #1 + 8005f6a: b288 uxth r0, r1 + 8005f6c: 68f9 ldr r1, [r7, #12] + 8005f6e: 8008 strh r0, [r1, #0] + 8005f70: b2db uxtb r3, r3 + 8005f72: 7811 ldrb r1, [r2, #0] + 8005f74: 68fa ldr r2, [r7, #12] + 8005f76: 4413 add r3, r2 + 8005f78: 460a mov r2, r1 + 8005f7a: 711a strb r2, [r3, #4] + for (n = 0; n < length; n++) { + 8005f7c: 8afb ldrh r3, [r7, #22] + 8005f7e: 3301 adds r3, #1 + 8005f80: 82fb strh r3, [r7, #22] + 8005f82: 8afa ldrh r2, [r7, #22] + 8005f84: 88fb ldrh r3, [r7, #6] + 8005f86: 429a cmp r2, r3 + 8005f88: d3e9 bcc.n 8005f5e + } +} + 8005f8a: bf00 nop + 8005f8c: bf00 nop + 8005f8e: 371c adds r7, #28 + 8005f90: 46bd mov sp, r7 + 8005f92: bc80 pop {r7} + 8005f94: 4770 bx lr + +08005f96 : + */ + +static void +mqtt_output_append_fixed_header(struct mqtt_ringbuf_t *rb, u8_t msg_type, u8_t dup, + u8_t qos, u8_t retain, u16_t r_length) +{ + 8005f96: b580 push {r7, lr} + 8005f98: b082 sub sp, #8 + 8005f9a: af00 add r7, sp, #0 + 8005f9c: 6078 str r0, [r7, #4] + 8005f9e: 4608 mov r0, r1 + 8005fa0: 4611 mov r1, r2 + 8005fa2: 461a mov r2, r3 + 8005fa4: 4603 mov r3, r0 + 8005fa6: 70fb strb r3, [r7, #3] + 8005fa8: 460b mov r3, r1 + 8005faa: 70bb strb r3, [r7, #2] + 8005fac: 4613 mov r3, r2 + 8005fae: 707b strb r3, [r7, #1] + /* Start with control byte */ + mqtt_output_append_u8(rb, (((msg_type & 0x0f) << 4) | ((dup & 1) << 3) | ((qos & 3) << 1) | (retain & 1))); + 8005fb0: 78fb ldrb r3, [r7, #3] + 8005fb2: 011b lsls r3, r3, #4 + 8005fb4: b25a sxtb r2, r3 + 8005fb6: 78bb ldrb r3, [r7, #2] + 8005fb8: 00db lsls r3, r3, #3 + 8005fba: b25b sxtb r3, r3 + 8005fbc: f003 0308 and.w r3, r3, #8 + 8005fc0: b25b sxtb r3, r3 + 8005fc2: 4313 orrs r3, r2 + 8005fc4: b25a sxtb r2, r3 + 8005fc6: 787b ldrb r3, [r7, #1] + 8005fc8: 005b lsls r3, r3, #1 + 8005fca: b25b sxtb r3, r3 + 8005fcc: f003 0306 and.w r3, r3, #6 + 8005fd0: b25b sxtb r3, r3 + 8005fd2: 4313 orrs r3, r2 + 8005fd4: b25a sxtb r2, r3 + 8005fd6: f997 3010 ldrsb.w r3, [r7, #16] + 8005fda: f003 0301 and.w r3, r3, #1 + 8005fde: b25b sxtb r3, r3 + 8005fe0: 4313 orrs r3, r2 + 8005fe2: b25b sxtb r3, r3 + 8005fe4: b2db uxtb r3, r3 + 8005fe6: 4619 mov r1, r3 + 8005fe8: 6878 ldr r0, [r7, #4] + 8005fea: f7ff ff2f bl 8005e4c + /* Encode remaining length field */ + do { + mqtt_output_append_u8(rb, (r_length & 0x7f) | (r_length >= 128 ? 0x80 : 0)); + 8005fee: 8abb ldrh r3, [r7, #20] + 8005ff0: b25b sxtb r3, r3 + 8005ff2: f003 037f and.w r3, r3, #127 ; 0x7f + 8005ff6: b25b sxtb r3, r3 + 8005ff8: 8aba ldrh r2, [r7, #20] + 8005ffa: 2a7f cmp r2, #127 ; 0x7f + 8005ffc: d902 bls.n 8006004 + 8005ffe: f06f 027f mvn.w r2, #127 ; 0x7f + 8006002: e000 b.n 8006006 + 8006004: 2200 movs r2, #0 + 8006006: 4313 orrs r3, r2 + 8006008: b25b sxtb r3, r3 + 800600a: b2db uxtb r3, r3 + 800600c: 4619 mov r1, r3 + 800600e: 6878 ldr r0, [r7, #4] + 8006010: f7ff ff1c bl 8005e4c + r_length >>= 7; + 8006014: 8abb ldrh r3, [r7, #20] + 8006016: 09db lsrs r3, r3, #7 + 8006018: 82bb strh r3, [r7, #20] + } while (r_length > 0); + 800601a: 8abb ldrh r3, [r7, #20] + 800601c: 2b00 cmp r3, #0 + 800601e: d1e6 bne.n 8005fee +} + 8006020: bf00 nop + 8006022: bf00 nop + 8006024: 3708 adds r7, #8 + 8006026: 46bd mov sp, r7 + 8006028: bd80 pop {r7, pc} + ... + +0800602c : + * @param r_length Remaining length after fixed header + * @return 1 if message will fit, 0 if not enough buffer space + */ +static u8_t +mqtt_output_check_space(struct mqtt_ringbuf_t *rb, u16_t r_length) +{ + 800602c: b580 push {r7, lr} + 800602e: b084 sub sp, #16 + 8006030: af00 add r7, sp, #0 + 8006032: 6078 str r0, [r7, #4] + 8006034: 460b mov r3, r1 + 8006036: 807b strh r3, [r7, #2] + /* Start with length of type byte + remaining length */ + u16_t total_len = 1 + r_length; + 8006038: 887b ldrh r3, [r7, #2] + 800603a: 3301 adds r3, #1 + 800603c: 81fb strh r3, [r7, #14] + + LWIP_ASSERT("mqtt_output_check_space: rb != NULL", rb != NULL); + 800603e: 687b ldr r3, [r7, #4] + 8006040: 2b00 cmp r3, #0 + 8006042: d106 bne.n 8006052 + 8006044: 4b10 ldr r3, [pc, #64] ; (8006088 ) + 8006046: f44f 72f4 mov.w r2, #488 ; 0x1e8 + 800604a: 4910 ldr r1, [pc, #64] ; (800608c ) + 800604c: 4810 ldr r0, [pc, #64] ; (8006090 ) + 800604e: f00c fe99 bl 8012d84 + + /* Calculate number of required bytes to contain the remaining bytes field and add to total*/ + do { + total_len++; + 8006052: 89fb ldrh r3, [r7, #14] + 8006054: 3301 adds r3, #1 + 8006056: 81fb strh r3, [r7, #14] + r_length >>= 7; + 8006058: 887b ldrh r3, [r7, #2] + 800605a: 09db lsrs r3, r3, #7 + 800605c: 807b strh r3, [r7, #2] + } while (r_length > 0); + 800605e: 887b ldrh r3, [r7, #2] + 8006060: 2b00 cmp r3, #0 + 8006062: d1f6 bne.n 8006052 + + return (total_len <= mqtt_ringbuf_free(rb)); + 8006064: 89fa ldrh r2, [r7, #14] + 8006066: 687b ldr r3, [r7, #4] + 8006068: 8819 ldrh r1, [r3, #0] + 800606a: 687b ldr r3, [r7, #4] + 800606c: 885b ldrh r3, [r3, #2] + 800606e: 1acb subs r3, r1, r3 + 8006070: b29b uxth r3, r3 + 8006072: f5c3 7380 rsb r3, r3, #256 ; 0x100 + 8006076: 429a cmp r2, r3 + 8006078: bfd4 ite le + 800607a: 2301 movle r3, #1 + 800607c: 2300 movgt r3, #0 + 800607e: b2db uxtb r3, r3 +} + 8006080: 4618 mov r0, r3 + 8006082: 3710 adds r7, #16 + 8006084: 46bd mov sp, r7 + 8006086: bd80 pop {r7, pc} + 8006088: 08013ea0 .word 0x08013ea0 + 800608c: 08014030 .word 0x08014030 + 8006090: 08013ef8 .word 0x08013ef8 + +08006094 : + * @param client MQTT client + * @param reason Reason for disconnection + */ +static void +mqtt_close(mqtt_client_t *client, mqtt_connection_status_t reason) +{ + 8006094: b580 push {r7, lr} + 8006096: b084 sub sp, #16 + 8006098: af00 add r7, sp, #0 + 800609a: 6078 str r0, [r7, #4] + 800609c: 460b mov r3, r1 + 800609e: 807b strh r3, [r7, #2] + LWIP_ASSERT("mqtt_close: client != NULL", client != NULL); + 80060a0: 687b ldr r3, [r7, #4] + 80060a2: 2b00 cmp r3, #0 + 80060a4: d106 bne.n 80060b4 + 80060a6: 4b27 ldr r3, [pc, #156] ; (8006144 ) + 80060a8: f44f 72fe mov.w r2, #508 ; 0x1fc + 80060ac: 4926 ldr r1, [pc, #152] ; (8006148 ) + 80060ae: 4827 ldr r0, [pc, #156] ; (800614c ) + 80060b0: f00c fe68 bl 8012d84 + + /* Bring down TCP connection if not already done */ + if (client->conn != NULL) { + 80060b4: 687b ldr r3, [r7, #4] + 80060b6: 68db ldr r3, [r3, #12] + 80060b8: 2b00 cmp r3, #0 + 80060ba: d024 beq.n 8006106 + err_t res; + tcp_recv(client->conn, NULL); + 80060bc: 687b ldr r3, [r7, #4] + 80060be: 68db ldr r3, [r3, #12] + 80060c0: 2100 movs r1, #0 + 80060c2: 4618 mov r0, r3 + 80060c4: f003 fe74 bl 8009db0 + tcp_err(client->conn, NULL); + 80060c8: 687b ldr r3, [r7, #4] + 80060ca: 68db ldr r3, [r3, #12] + 80060cc: 2100 movs r1, #0 + 80060ce: 4618 mov r0, r3 + 80060d0: f003 feb0 bl 8009e34 + tcp_sent(client->conn, NULL); + 80060d4: 687b ldr r3, [r7, #4] + 80060d6: 68db ldr r3, [r3, #12] + 80060d8: 2100 movs r1, #0 + 80060da: 4618 mov r0, r3 + 80060dc: f003 fe8a bl 8009df4 + res = tcp_close(client->conn); + 80060e0: 687b ldr r3, [r7, #4] + 80060e2: 68db ldr r3, [r3, #12] + 80060e4: 4618 mov r0, r3 + 80060e6: f002 fdcb bl 8008c80 + 80060ea: 4603 mov r3, r0 + 80060ec: 73fb strb r3, [r7, #15] + if (res != ERR_OK) { + 80060ee: f997 300f ldrsb.w r3, [r7, #15] + 80060f2: 2b00 cmp r3, #0 + 80060f4: d004 beq.n 8006100 + tcp_abort(client->conn); + 80060f6: 687b ldr r3, [r7, #4] + 80060f8: 68db ldr r3, [r3, #12] + 80060fa: 4618 mov r0, r3 + 80060fc: f002 fe8a bl 8008e14 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_close: Close err=%s\n", lwip_strerr(res))); + } + client->conn = NULL; + 8006100: 687b ldr r3, [r7, #4] + 8006102: 2200 movs r2, #0 + 8006104: 60da str r2, [r3, #12] + } + + /* Remove all pending requests */ + mqtt_clear_requests(&client->pend_req_queue); + 8006106: 687b ldr r3, [r7, #4] + 8006108: 3318 adds r3, #24 + 800610a: 4618 mov r0, r3 + 800610c: f7ff fe48 bl 8005da0 + /* Stop cyclic timer */ + sys_untimeout(mqtt_cyclic_timer, client); + 8006110: 6879 ldr r1, [r7, #4] + 8006112: 480f ldr r0, [pc, #60] ; (8006150 ) + 8006114: f007 fede bl 800ded4 + + /* Notify upper layer of disconnection if changed state */ + if (client->conn_state != TCP_DISCONNECTED) { + 8006118: 687b ldr r3, [r7, #4] + 800611a: 7a9b ldrb r3, [r3, #10] + 800611c: 2b00 cmp r3, #0 + 800611e: d00d beq.n 800613c + + client->conn_state = TCP_DISCONNECTED; + 8006120: 687b ldr r3, [r7, #4] + 8006122: 2200 movs r2, #0 + 8006124: 729a strb r2, [r3, #10] + if (client->connect_cb != NULL) { + 8006126: 687b ldr r3, [r7, #4] + 8006128: 695b ldr r3, [r3, #20] + 800612a: 2b00 cmp r3, #0 + 800612c: d006 beq.n 800613c + client->connect_cb(client, client->connect_arg, reason); + 800612e: 687b ldr r3, [r7, #4] + 8006130: 695b ldr r3, [r3, #20] + 8006132: 687a ldr r2, [r7, #4] + 8006134: 6911 ldr r1, [r2, #16] + 8006136: 887a ldrh r2, [r7, #2] + 8006138: 6878 ldr r0, [r7, #4] + 800613a: 4798 blx r3 + } + } +} + 800613c: bf00 nop + 800613e: 3710 adds r7, #16 + 8006140: 46bd mov sp, r7 + 8006142: bd80 pop {r7, pc} + 8006144: 08013ea0 .word 0x08013ea0 + 8006148: 08014054 .word 0x08014054 + 800614c: 08013ef8 .word 0x08013ef8 + 8006150: 08006155 .word 0x08006155 + +08006154 : + * Interval timer, called every MQTT_CYCLIC_TIMER_INTERVAL seconds in MQTT_CONNECTING and MQTT_CONNECTED states + * @param arg MQTT client + */ +static void +mqtt_cyclic_timer(void *arg) +{ + 8006154: b580 push {r7, lr} + 8006156: b086 sub sp, #24 + 8006158: af02 add r7, sp, #8 + 800615a: 6078 str r0, [r7, #4] + u8_t restart_timer = 1; + 800615c: 2301 movs r3, #1 + 800615e: 73fb strb r3, [r7, #15] + mqtt_client_t *client = (mqtt_client_t *)arg; + 8006160: 687b ldr r3, [r7, #4] + 8006162: 60bb str r3, [r7, #8] + LWIP_ASSERT("mqtt_cyclic_timer: client != NULL", client != NULL); + 8006164: 68bb ldr r3, [r7, #8] + 8006166: 2b00 cmp r3, #0 + 8006168: d106 bne.n 8006178 + 800616a: 4b42 ldr r3, [pc, #264] ; (8006274 ) + 800616c: f240 2225 movw r2, #549 ; 0x225 + 8006170: 4941 ldr r1, [pc, #260] ; (8006278 ) + 8006172: 4842 ldr r0, [pc, #264] ; (800627c ) + 8006174: f00c fe06 bl 8012d84 + + if (client->conn_state == MQTT_CONNECTING) { + 8006178: 68bb ldr r3, [r7, #8] + 800617a: 7a9b ldrb r3, [r3, #10] + 800617c: 2b02 cmp r3, #2 + 800617e: d115 bne.n 80061ac + client->cyclic_tick++; + 8006180: 68bb ldr r3, [r7, #8] + 8006182: 881b ldrh r3, [r3, #0] + 8006184: 3301 adds r3, #1 + 8006186: b29a uxth r2, r3 + 8006188: 68bb ldr r3, [r7, #8] + 800618a: 801a strh r2, [r3, #0] + if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= MQTT_CONNECT_TIMOUT) { + 800618c: 68bb ldr r3, [r7, #8] + 800618e: 881b ldrh r3, [r3, #0] + 8006190: 461a mov r2, r3 + 8006192: 4613 mov r3, r2 + 8006194: 009b lsls r3, r3, #2 + 8006196: 4413 add r3, r2 + 8006198: 2b63 cmp r3, #99 ; 0x63 + 800619a: dd5e ble.n 800625a + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: CONNECT attempt to server timed out\n")); + /* Disconnect TCP */ + mqtt_close(client, MQTT_CONNECT_TIMEOUT); + 800619c: f240 1101 movw r1, #257 ; 0x101 + 80061a0: 68b8 ldr r0, [r7, #8] + 80061a2: f7ff ff77 bl 8006094 + restart_timer = 0; + 80061a6: 2300 movs r3, #0 + 80061a8: 73fb strb r3, [r7, #15] + 80061aa: e056 b.n 800625a + } + } else if (client->conn_state == MQTT_CONNECTED) { + 80061ac: 68bb ldr r3, [r7, #8] + 80061ae: 7a9b ldrb r3, [r3, #10] + 80061b0: 2b03 cmp r3, #3 + 80061b2: d150 bne.n 8006256 + /* Handle timeout for pending requests */ + mqtt_request_time_elapsed(&client->pend_req_queue, MQTT_CYCLIC_TIMER_INTERVAL); + 80061b4: 68bb ldr r3, [r7, #8] + 80061b6: 3318 adds r3, #24 + 80061b8: 2105 movs r1, #5 + 80061ba: 4618 mov r0, r3 + 80061bc: f7ff fd9e bl 8005cfc + + /* keep_alive > 0 means keep alive functionality shall be used */ + if (client->keep_alive > 0) { + 80061c0: 68bb ldr r3, [r7, #8] + 80061c2: 885b ldrh r3, [r3, #2] + 80061c4: 2b00 cmp r3, #0 + 80061c6: d048 beq.n 800625a + + client->server_watchdog++; + 80061c8: 68bb ldr r3, [r7, #8] + 80061ca: 889b ldrh r3, [r3, #4] + 80061cc: 3301 adds r3, #1 + 80061ce: b29a uxth r2, r3 + 80061d0: 68bb ldr r3, [r7, #8] + 80061d2: 809a strh r2, [r3, #4] + /* If reception from server has been idle for 1.5*keep_alive time, server is considered unresponsive */ + if ((client->server_watchdog * MQTT_CYCLIC_TIMER_INTERVAL) > (client->keep_alive + client->keep_alive/2)) { + 80061d4: 68bb ldr r3, [r7, #8] + 80061d6: 889b ldrh r3, [r3, #4] + 80061d8: 461a mov r2, r3 + 80061da: 4613 mov r3, r2 + 80061dc: 009b lsls r3, r3, #2 + 80061de: 441a add r2, r3 + 80061e0: 68bb ldr r3, [r7, #8] + 80061e2: 885b ldrh r3, [r3, #2] + 80061e4: 4619 mov r1, r3 + 80061e6: 68bb ldr r3, [r7, #8] + 80061e8: 885b ldrh r3, [r3, #2] + 80061ea: 085b lsrs r3, r3, #1 + 80061ec: b29b uxth r3, r3 + 80061ee: 440b add r3, r1 + 80061f0: 429a cmp r2, r3 + 80061f2: dd06 ble.n 8006202 + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Server incoming keep-alive timeout\n")); + mqtt_close(client, MQTT_CONNECT_TIMEOUT); + 80061f4: f240 1101 movw r1, #257 ; 0x101 + 80061f8: 68b8 ldr r0, [r7, #8] + 80061fa: f7ff ff4b bl 8006094 + restart_timer = 0; + 80061fe: 2300 movs r3, #0 + 8006200: 73fb strb r3, [r7, #15] + } + + /* If time for a keep alive message to be sent, transmission has been idle for keep_alive time */ + if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= client->keep_alive) { + 8006202: 68bb ldr r3, [r7, #8] + 8006204: 881b ldrh r3, [r3, #0] + 8006206: 461a mov r2, r3 + 8006208: 4613 mov r3, r2 + 800620a: 009b lsls r3, r3, #2 + 800620c: 4413 add r3, r2 + 800620e: 68ba ldr r2, [r7, #8] + 8006210: 8852 ldrh r2, [r2, #2] + 8006212: 4293 cmp r3, r2 + 8006214: db18 blt.n 8006248 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: Sending keep-alive message to server\n")); + if (mqtt_output_check_space(&client->output, 0) != 0) { + 8006216: 68bb ldr r3, [r7, #8] + 8006218: 33ec adds r3, #236 ; 0xec + 800621a: 2100 movs r1, #0 + 800621c: 4618 mov r0, r3 + 800621e: f7ff ff05 bl 800602c + 8006222: 4603 mov r3, r0 + 8006224: 2b00 cmp r3, #0 + 8006226: d018 beq.n 800625a + mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_PINGREQ, 0, 0, 0, 0); + 8006228: 68bb ldr r3, [r7, #8] + 800622a: f103 00ec add.w r0, r3, #236 ; 0xec + 800622e: 2300 movs r3, #0 + 8006230: 9301 str r3, [sp, #4] + 8006232: 2300 movs r3, #0 + 8006234: 9300 str r3, [sp, #0] + 8006236: 2300 movs r3, #0 + 8006238: 2200 movs r2, #0 + 800623a: 210c movs r1, #12 + 800623c: f7ff feab bl 8005f96 + client->cyclic_tick = 0; + 8006240: 68bb ldr r3, [r7, #8] + 8006242: 2200 movs r2, #0 + 8006244: 801a strh r2, [r3, #0] + 8006246: e008 b.n 800625a + } + } else { + client->cyclic_tick++; + 8006248: 68bb ldr r3, [r7, #8] + 800624a: 881b ldrh r3, [r3, #0] + 800624c: 3301 adds r3, #1 + 800624e: b29a uxth r2, r3 + 8006250: 68bb ldr r3, [r7, #8] + 8006252: 801a strh r2, [r3, #0] + 8006254: e001 b.n 800625a + } + } + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Timer should not be running in state %d\n", client->conn_state)); + restart_timer = 0; + 8006256: 2300 movs r3, #0 + 8006258: 73fb strb r3, [r7, #15] + } + if (restart_timer) { + 800625a: 7bfb ldrb r3, [r7, #15] + 800625c: 2b00 cmp r3, #0 + 800625e: d005 beq.n 800626c + sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, arg); + 8006260: 687a ldr r2, [r7, #4] + 8006262: 4907 ldr r1, [pc, #28] ; (8006280 ) + 8006264: f241 3088 movw r0, #5000 ; 0x1388 + 8006268: f007 fd90 bl 800dd8c + } +} + 800626c: bf00 nop + 800626e: 3710 adds r7, #16 + 8006270: 46bd mov sp, r7 + 8006272: bd80 pop {r7, pc} + 8006274: 08013ea0 .word 0x08013ea0 + 8006278: 08014070 .word 0x08014070 + 800627c: 08013ef8 .word 0x08013ef8 + 8006280: 08006155 .word 0x08006155 + +08006284 : + * @param qos QoS value + * @return ERR_OK if successful, ERR_MEM if out of memory + */ +static err_t +pub_ack_rec_rel_response(mqtt_client_t *client, u8_t msg, u16_t pkt_id, u8_t qos) +{ + 8006284: b580 push {r7, lr} + 8006286: b086 sub sp, #24 + 8006288: af02 add r7, sp, #8 + 800628a: 6078 str r0, [r7, #4] + 800628c: 4608 mov r0, r1 + 800628e: 4611 mov r1, r2 + 8006290: 461a mov r2, r3 + 8006292: 4603 mov r3, r0 + 8006294: 70fb strb r3, [r7, #3] + 8006296: 460b mov r3, r1 + 8006298: 803b strh r3, [r7, #0] + 800629a: 4613 mov r3, r2 + 800629c: 70bb strb r3, [r7, #2] + err_t err = ERR_OK; + 800629e: 2300 movs r3, #0 + 80062a0: 73fb strb r3, [r7, #15] + if (mqtt_output_check_space(&client->output, 2)) { + 80062a2: 687b ldr r3, [r7, #4] + 80062a4: 33ec adds r3, #236 ; 0xec + 80062a6: 2102 movs r1, #2 + 80062a8: 4618 mov r0, r3 + 80062aa: f7ff febf bl 800602c + 80062ae: 4603 mov r3, r0 + 80062b0: 2b00 cmp r3, #0 + 80062b2: d01c beq.n 80062ee + mqtt_output_append_fixed_header(&client->output, msg, 0, qos, 0, 2); + 80062b4: 687b ldr r3, [r7, #4] + 80062b6: f103 00ec add.w r0, r3, #236 ; 0xec + 80062ba: 78bb ldrb r3, [r7, #2] + 80062bc: 78f9 ldrb r1, [r7, #3] + 80062be: 2202 movs r2, #2 + 80062c0: 9201 str r2, [sp, #4] + 80062c2: 2200 movs r2, #0 + 80062c4: 9200 str r2, [sp, #0] + 80062c6: 2200 movs r2, #0 + 80062c8: f7ff fe65 bl 8005f96 + mqtt_output_append_u16(&client->output, pkt_id); + 80062cc: 687b ldr r3, [r7, #4] + 80062ce: 33ec adds r3, #236 ; 0xec + 80062d0: 883a ldrh r2, [r7, #0] + 80062d2: 4611 mov r1, r2 + 80062d4: 4618 mov r0, r3 + 80062d6: f7ff fdcf bl 8005e78 + mqtt_output_send(&client->output, client->conn); + 80062da: 687b ldr r3, [r7, #4] + 80062dc: f103 02ec add.w r2, r3, #236 ; 0xec + 80062e0: 687b ldr r3, [r7, #4] + 80062e2: 68db ldr r3, [r3, #12] + 80062e4: 4619 mov r1, r3 + 80062e6: 4610 mov r0, r2 + 80062e8: f7ff fb7c bl 80059e4 + 80062ec: e001 b.n 80062f2 + } else { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("pub_ack_rec_rel_response: OOM creating response: %s with pkt_id: %d\n", + mqtt_msg_type_to_str(msg), pkt_id)); + err = ERR_MEM; + 80062ee: 23ff movs r3, #255 ; 0xff + 80062f0: 73fb strb r3, [r7, #15] + } + return err; + 80062f2: f997 300f ldrsb.w r3, [r7, #15] +} + 80062f6: 4618 mov r0, r3 + 80062f8: 3710 adds r7, #16 + 80062fa: 46bd mov sp, r7 + 80062fc: bd80 pop {r7, pc} + +080062fe : + * @param r Matching request + * @param result Result code from server + */ +static void +mqtt_incomming_suback(struct mqtt_request_t *r, u8_t result) +{ + 80062fe: b580 push {r7, lr} + 8006300: b082 sub sp, #8 + 8006302: af00 add r7, sp, #0 + 8006304: 6078 str r0, [r7, #4] + 8006306: 460b mov r3, r1 + 8006308: 70fb strb r3, [r7, #3] + if (r->cb != NULL) { + 800630a: 687b ldr r3, [r7, #4] + 800630c: 685b ldr r3, [r3, #4] + 800630e: 2b00 cmp r3, #0 + 8006310: d00c beq.n 800632c + r->cb(r->arg, result < 3 ? ERR_OK : ERR_ABRT); + 8006312: 687b ldr r3, [r7, #4] + 8006314: 685b ldr r3, [r3, #4] + 8006316: 687a ldr r2, [r7, #4] + 8006318: 6890 ldr r0, [r2, #8] + 800631a: 78fa ldrb r2, [r7, #3] + 800631c: 2a02 cmp r2, #2 + 800631e: d801 bhi.n 8006324 + 8006320: 2200 movs r2, #0 + 8006322: e001 b.n 8006328 + 8006324: f06f 020c mvn.w r2, #12 + 8006328: 4611 mov r1, r2 + 800632a: 4798 blx r3 + } +} + 800632c: bf00 nop + 800632e: 3708 adds r7, #8 + 8006330: 46bd mov sp, r7 + 8006332: bd80 pop {r7, pc} + +08006334 : + * @param length length received part + * @param remaining_length Remaining length of complete message + */ +static mqtt_connection_status_t + mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u32_t remaining_length) +{ + 8006334: b590 push {r4, r7, lr} + 8006336: b08d sub sp, #52 ; 0x34 + 8006338: af00 add r7, sp, #0 + 800633a: 60f8 str r0, [r7, #12] + 800633c: 607b str r3, [r7, #4] + 800633e: 460b mov r3, r1 + 8006340: 72fb strb r3, [r7, #11] + 8006342: 4613 mov r3, r2 + 8006344: 813b strh r3, [r7, #8] + mqtt_connection_status_t res = MQTT_CONNECT_ACCEPTED; + 8006346: 2300 movs r3, #0 + 8006348: 85fb strh r3, [r7, #46] ; 0x2e + + u8_t *var_hdr_payload = client->rx_buffer + fixed_hdr_idx; + 800634a: 68fb ldr r3, [r7, #12] + 800634c: f103 026c add.w r2, r3, #108 ; 0x6c + 8006350: 7afb ldrb r3, [r7, #11] + 8006352: 4413 add r3, r2 + 8006354: 627b str r3, [r7, #36] ; 0x24 + + /* Control packet type */ + u8_t pkt_type = MQTT_CTL_PACKET_TYPE(client->rx_buffer[0]); + 8006356: 68fb ldr r3, [r7, #12] + 8006358: f893 306c ldrb.w r3, [r3, #108] ; 0x6c + 800635c: 091b lsrs r3, r3, #4 + 800635e: f887 3023 strb.w r3, [r7, #35] ; 0x23 + u16_t pkt_id = 0; + 8006362: 2300 movs r3, #0 + 8006364: 843b strh r3, [r7, #32] + + if (pkt_type == MQTT_MSG_TYPE_CONNACK) { + 8006366: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 800636a: 2b02 cmp r3, #2 + 800636c: d11f bne.n 80063ae + if (client->conn_state == MQTT_CONNECTING) { + 800636e: 68fb ldr r3, [r7, #12] + 8006370: 7a9b ldrb r3, [r3, #10] + 8006372: 2b02 cmp r3, #2 + 8006374: f040 8119 bne.w 80065aa + /* Get result code from CONNACK */ + res = (mqtt_connection_status_t)var_hdr_payload[1]; + 8006378: 6a7b ldr r3, [r7, #36] ; 0x24 + 800637a: 3301 adds r3, #1 + 800637c: 781b ldrb r3, [r3, #0] + 800637e: 85fb strh r3, [r7, #46] ; 0x2e + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: Connect response code %d\n", res)); + if (res == MQTT_CONNECT_ACCEPTED) { + 8006380: 8dfb ldrh r3, [r7, #46] ; 0x2e + 8006382: 2b00 cmp r3, #0 + 8006384: f040 8111 bne.w 80065aa + /* Reset cyclic_tick when changing to connected state */ + client->cyclic_tick = 0; + 8006388: 68fb ldr r3, [r7, #12] + 800638a: 2200 movs r2, #0 + 800638c: 801a strh r2, [r3, #0] + client->conn_state = MQTT_CONNECTED; + 800638e: 68fb ldr r3, [r7, #12] + 8006390: 2203 movs r2, #3 + 8006392: 729a strb r2, [r3, #10] + /* Notify upper layer */ + if (client->connect_cb != 0) { + 8006394: 68fb ldr r3, [r7, #12] + 8006396: 695b ldr r3, [r3, #20] + 8006398: 2b00 cmp r3, #0 + 800639a: f000 8106 beq.w 80065aa + client->connect_cb(client, client->connect_arg, res); + 800639e: 68fb ldr r3, [r7, #12] + 80063a0: 695b ldr r3, [r3, #20] + 80063a2: 68fa ldr r2, [r7, #12] + 80063a4: 6911 ldr r1, [r2, #16] + 80063a6: 8dfa ldrh r2, [r7, #46] ; 0x2e + 80063a8: 68f8 ldr r0, [r7, #12] + 80063aa: 4798 blx r3 + 80063ac: e0fd b.n 80065aa + } + } + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Received CONNACK in connected state\n")); + } + } else if (pkt_type == MQTT_MSG_TYPE_PINGRESP) { + 80063ae: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 80063b2: 2b0d cmp r3, #13 + 80063b4: f000 80f9 beq.w 80065aa + LWIP_DEBUGF(MQTT_DEBUG_TRACE,( "mqtt_message_received: Received PINGRESP from server\n")); + + } else if (pkt_type == MQTT_MSG_TYPE_PUBLISH) { + 80063b8: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 80063bc: 2b03 cmp r3, #3 + 80063be: f040 8096 bne.w 80064ee + u16_t payload_offset = 0; + 80063c2: 2300 movs r3, #0 + 80063c4: 85bb strh r3, [r7, #44] ; 0x2c + u16_t payload_length = length; + 80063c6: 893b ldrh r3, [r7, #8] + 80063c8: 857b strh r3, [r7, #42] ; 0x2a + u8_t qos = MQTT_CTL_PACKET_QOS(client->rx_buffer[0]); + 80063ca: 68fb ldr r3, [r7, #12] + 80063cc: f893 306c ldrb.w r3, [r3, #108] ; 0x6c + 80063d0: 105b asrs r3, r3, #1 + 80063d2: b2db uxtb r3, r3 + 80063d4: f003 0303 and.w r3, r3, #3 + 80063d8: 76fb strb r3, [r7, #27] + + if (client->msg_idx <= MQTT_VAR_HEADER_BUFFER_LEN) { + 80063da: 68fb ldr r3, [r7, #12] + 80063dc: 6e9b ldr r3, [r3, #104] ; 0x68 + 80063de: 2b80 cmp r3, #128 ; 0x80 + 80063e0: d85a bhi.n 8006498 + /* Should have topic and pkt id*/ + uint8_t *topic; + uint16_t after_topic; + u8_t bkp; + u16_t topic_len = var_hdr_payload[0]; + 80063e2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80063e4: 781b ldrb r3, [r3, #0] + 80063e6: 833b strh r3, [r7, #24] + topic_len = (topic_len << 8) + (u16_t)(var_hdr_payload[1]); + 80063e8: 8b3b ldrh r3, [r7, #24] + 80063ea: 021b lsls r3, r3, #8 + 80063ec: b29a uxth r2, r3 + 80063ee: 6a7b ldr r3, [r7, #36] ; 0x24 + 80063f0: 3301 adds r3, #1 + 80063f2: 781b ldrb r3, [r3, #0] + 80063f4: b29b uxth r3, r3 + 80063f6: 4413 add r3, r2 + 80063f8: 833b strh r3, [r7, #24] + + topic = var_hdr_payload + 2; + 80063fa: 6a7b ldr r3, [r7, #36] ; 0x24 + 80063fc: 3302 adds r3, #2 + 80063fe: 617b str r3, [r7, #20] + after_topic = 2 + topic_len; + 8006400: 8b3b ldrh r3, [r7, #24] + 8006402: 3302 adds r3, #2 + 8006404: 853b strh r3, [r7, #40] ; 0x28 + /* Check length, add one byte even for QoS 0 so that zero termination will fit */ + if ((after_topic + (qos? 2 : 1)) > length) { + 8006406: 8d3b ldrh r3, [r7, #40] ; 0x28 + 8006408: 7efa ldrb r2, [r7, #27] + 800640a: 2a00 cmp r2, #0 + 800640c: d001 beq.n 8006412 + 800640e: 2202 movs r2, #2 + 8006410: e000 b.n 8006414 + 8006412: 2201 movs r2, #1 + 8006414: 441a add r2, r3 + 8006416: 893b ldrh r3, [r7, #8] + 8006418: 429a cmp r2, r3 + 800641a: f300 80c8 bgt.w 80065ae + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n")); + goto out_disconnect; + } + + /* id for QoS 1 and 2 */ + if (qos > 0) { + 800641e: 7efb ldrb r3, [r7, #27] + 8006420: 2b00 cmp r3, #0 + 8006422: d014 beq.n 800644e + client->inpub_pkt_id = ((u16_t)var_hdr_payload[after_topic] << 8) + (u16_t)var_hdr_payload[after_topic + 1]; + 8006424: 8d3b ldrh r3, [r7, #40] ; 0x28 + 8006426: 6a7a ldr r2, [r7, #36] ; 0x24 + 8006428: 4413 add r3, r2 + 800642a: 781b ldrb r3, [r3, #0] + 800642c: b29b uxth r3, r3 + 800642e: 021b lsls r3, r3, #8 + 8006430: b29a uxth r2, r3 + 8006432: 8d3b ldrh r3, [r7, #40] ; 0x28 + 8006434: 3301 adds r3, #1 + 8006436: 6a79 ldr r1, [r7, #36] ; 0x24 + 8006438: 440b add r3, r1 + 800643a: 781b ldrb r3, [r3, #0] + 800643c: b29b uxth r3, r3 + 800643e: 4413 add r3, r2 + 8006440: b29a uxth r2, r3 + 8006442: 68fb ldr r3, [r7, #12] + 8006444: 811a strh r2, [r3, #8] + after_topic += 2; + 8006446: 8d3b ldrh r3, [r7, #40] ; 0x28 + 8006448: 3302 adds r3, #2 + 800644a: 853b strh r3, [r7, #40] ; 0x28 + 800644c: e002 b.n 8006454 + } else { + client->inpub_pkt_id = 0; + 800644e: 68fb ldr r3, [r7, #12] + 8006450: 2200 movs r2, #0 + 8006452: 811a strh r2, [r3, #8] + } + /* Take backup of byte after topic */ + bkp = topic[topic_len]; + 8006454: 8b3b ldrh r3, [r7, #24] + 8006456: 697a ldr r2, [r7, #20] + 8006458: 4413 add r3, r2 + 800645a: 781b ldrb r3, [r3, #0] + 800645c: 74fb strb r3, [r7, #19] + /* Zero terminate string */ + topic[topic_len] = 0; + 800645e: 8b3b ldrh r3, [r7, #24] + 8006460: 697a ldr r2, [r7, #20] + 8006462: 4413 add r3, r2 + 8006464: 2200 movs r2, #0 + 8006466: 701a strb r2, [r3, #0] + /* Payload data remaining in receive buffer */ + payload_length = length - after_topic; + 8006468: 893a ldrh r2, [r7, #8] + 800646a: 8d3b ldrh r3, [r7, #40] ; 0x28 + 800646c: 1ad3 subs r3, r2, r3 + 800646e: 857b strh r3, [r7, #42] ; 0x2a + payload_offset = after_topic; + 8006470: 8d3b ldrh r3, [r7, #40] ; 0x28 + 8006472: 85bb strh r3, [r7, #44] ; 0x2c + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Received message with QoS %d at topic: %s, payload length %d\n", + qos, topic, remaining_length + payload_length)); + if (client->pub_cb != NULL) { + 8006474: 68fb ldr r3, [r7, #12] + 8006476: 6e5b ldr r3, [r3, #100] ; 0x64 + 8006478: 2b00 cmp r3, #0 + 800647a: d008 beq.n 800648e + client->pub_cb(client->inpub_arg, (const char *)topic, remaining_length + payload_length); + 800647c: 68fb ldr r3, [r7, #12] + 800647e: 6e5b ldr r3, [r3, #100] ; 0x64 + 8006480: 68fa ldr r2, [r7, #12] + 8006482: 6dd0 ldr r0, [r2, #92] ; 0x5c + 8006484: 8d79 ldrh r1, [r7, #42] ; 0x2a + 8006486: 687a ldr r2, [r7, #4] + 8006488: 440a add r2, r1 + 800648a: 6979 ldr r1, [r7, #20] + 800648c: 4798 blx r3 + } + /* Restore byte after topic */ + topic[topic_len] = bkp; + 800648e: 8b3b ldrh r3, [r7, #24] + 8006490: 697a ldr r2, [r7, #20] + 8006492: 4413 add r3, r2 + 8006494: 7cfa ldrb r2, [r7, #19] + 8006496: 701a strb r2, [r3, #0] + } + if (payload_length > 0 || remaining_length == 0) { + 8006498: 8d7b ldrh r3, [r7, #42] ; 0x2a + 800649a: 2b00 cmp r3, #0 + 800649c: d103 bne.n 80064a6 + 800649e: 687b ldr r3, [r7, #4] + 80064a0: 2b00 cmp r3, #0 + 80064a2: f040 8082 bne.w 80065aa + client->data_cb(client->inpub_arg, var_hdr_payload + payload_offset, payload_length, remaining_length == 0 ? MQTT_DATA_FLAG_LAST : 0); + 80064a6: 68fb ldr r3, [r7, #12] + 80064a8: 6e1c ldr r4, [r3, #96] ; 0x60 + 80064aa: 68fb ldr r3, [r7, #12] + 80064ac: 6dd8 ldr r0, [r3, #92] ; 0x5c + 80064ae: 8dbb ldrh r3, [r7, #44] ; 0x2c + 80064b0: 6a7a ldr r2, [r7, #36] ; 0x24 + 80064b2: 18d1 adds r1, r2, r3 + 80064b4: 687b ldr r3, [r7, #4] + 80064b6: 2b00 cmp r3, #0 + 80064b8: bf0c ite eq + 80064ba: 2301 moveq r3, #1 + 80064bc: 2300 movne r3, #0 + 80064be: b2db uxtb r3, r3 + 80064c0: 8d7a ldrh r2, [r7, #42] ; 0x2a + 80064c2: 47a0 blx r4 + /* Reply if QoS > 0 */ + if (remaining_length == 0 && qos > 0) { + 80064c4: 687b ldr r3, [r7, #4] + 80064c6: 2b00 cmp r3, #0 + 80064c8: d16f bne.n 80065aa + 80064ca: 7efb ldrb r3, [r7, #27] + 80064cc: 2b00 cmp r3, #0 + 80064ce: d06c beq.n 80065aa + /* Send PUBACK for QoS 1 or PUBREC for QoS 2 */ + u8_t resp_msg = (qos == 1) ? MQTT_MSG_TYPE_PUBACK : MQTT_MSG_TYPE_PUBREC; + 80064d0: 7efb ldrb r3, [r7, #27] + 80064d2: 2b01 cmp r3, #1 + 80064d4: d101 bne.n 80064da + 80064d6: 2304 movs r3, #4 + 80064d8: e000 b.n 80064dc + 80064da: 2305 movs r3, #5 + 80064dc: 74bb strb r3, [r7, #18] + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Sending publish response: %s with pkt_id: %d\n", + mqtt_msg_type_to_str(resp_msg), client->inpub_pkt_id)); + pub_ack_rec_rel_response(client, resp_msg, client->inpub_pkt_id, 0); + 80064de: 68fb ldr r3, [r7, #12] + 80064e0: 891a ldrh r2, [r3, #8] + 80064e2: 7cb9 ldrb r1, [r7, #18] + 80064e4: 2300 movs r3, #0 + 80064e6: 68f8 ldr r0, [r7, #12] + 80064e8: f7ff fecc bl 8006284 + 80064ec: e05d b.n 80065aa + } + } + } else { + /* Get packet identifier */ + pkt_id = (u16_t)var_hdr_payload[0] << 8; + 80064ee: 6a7b ldr r3, [r7, #36] ; 0x24 + 80064f0: 781b ldrb r3, [r3, #0] + 80064f2: b29b uxth r3, r3 + 80064f4: 021b lsls r3, r3, #8 + 80064f6: 843b strh r3, [r7, #32] + pkt_id |= (u16_t)var_hdr_payload[1]; + 80064f8: 6a7b ldr r3, [r7, #36] ; 0x24 + 80064fa: 3301 adds r3, #1 + 80064fc: 781b ldrb r3, [r3, #0] + 80064fe: b29a uxth r2, r3 + 8006500: 8c3b ldrh r3, [r7, #32] + 8006502: 4313 orrs r3, r2 + 8006504: 843b strh r3, [r7, #32] + if (pkt_id == 0) { + 8006506: 8c3b ldrh r3, [r7, #32] + 8006508: 2b00 cmp r3, #0 + 800650a: d052 beq.n 80065b2 + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Got message with illegal packet identifier: 0\n")); + goto out_disconnect; + } + if (pkt_type == MQTT_MSG_TYPE_PUBREC) { + 800650c: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 8006510: 2b05 cmp r3, #5 + 8006512: d106 bne.n 8006522 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREC, sending PUBREL with pkt_id: %d\n",pkt_id)); + pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBREL, pkt_id, 1); + 8006514: 8c3a ldrh r2, [r7, #32] + 8006516: 2301 movs r3, #1 + 8006518: 2106 movs r1, #6 + 800651a: 68f8 ldr r0, [r7, #12] + 800651c: f7ff feb2 bl 8006284 + 8006520: e043 b.n 80065aa + + } else if (pkt_type == MQTT_MSG_TYPE_PUBREL) { + 8006522: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 8006526: 2b06 cmp r3, #6 + 8006528: d106 bne.n 8006538 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREL, sending PUBCOMP response with pkt_id: %d\n",pkt_id)); + pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBCOMP, pkt_id, 0); + 800652a: 8c3a ldrh r2, [r7, #32] + 800652c: 2300 movs r3, #0 + 800652e: 2107 movs r1, #7 + 8006530: 68f8 ldr r0, [r7, #12] + 8006532: f7ff fea7 bl 8006284 + 8006536: e038 b.n 80065aa + + } else if (pkt_type == MQTT_MSG_TYPE_SUBACK || pkt_type == MQTT_MSG_TYPE_UNSUBACK || + 8006538: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 800653c: 2b09 cmp r3, #9 + 800653e: d00b beq.n 8006558 + 8006540: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 8006544: 2b0b cmp r3, #11 + 8006546: d007 beq.n 8006558 + 8006548: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 800654c: 2b07 cmp r3, #7 + 800654e: d003 beq.n 8006558 + pkt_type == MQTT_MSG_TYPE_PUBCOMP || pkt_type == MQTT_MSG_TYPE_PUBACK) { + 8006550: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 8006554: 2b04 cmp r3, #4 + 8006556: d12e bne.n 80065b6 + struct mqtt_request_t *r = mqtt_take_request(&client->pend_req_queue, pkt_id); + 8006558: 68fb ldr r3, [r7, #12] + 800655a: 3318 adds r3, #24 + 800655c: 8c3a ldrh r2, [r7, #32] + 800655e: 4611 mov r1, r2 + 8006560: 4618 mov r0, r3 + 8006562: f7ff fb79 bl 8005c58 + 8006566: 61f8 str r0, [r7, #28] + if (r != NULL) { + 8006568: 69fb ldr r3, [r7, #28] + 800656a: 2b00 cmp r3, #0 + 800656c: d01c beq.n 80065a8 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: %s response with id %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); + if (pkt_type == MQTT_MSG_TYPE_SUBACK) { + 800656e: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 8006572: 2b09 cmp r3, #9 + 8006574: d10a bne.n 800658c + if (length < 3) { + 8006576: 893b ldrh r3, [r7, #8] + 8006578: 2b02 cmp r3, #2 + 800657a: d91e bls.n 80065ba + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: To small SUBACK packet\n")); + goto out_disconnect; + } else { + mqtt_incomming_suback(r, var_hdr_payload[2]); + 800657c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800657e: 3302 adds r3, #2 + 8006580: 781b ldrb r3, [r3, #0] + 8006582: 4619 mov r1, r3 + 8006584: 69f8 ldr r0, [r7, #28] + 8006586: f7ff feba bl 80062fe + 800658a: e00a b.n 80065a2 + } + } else if (r->cb != NULL) { + 800658c: 69fb ldr r3, [r7, #28] + 800658e: 685b ldr r3, [r3, #4] + 8006590: 2b00 cmp r3, #0 + 8006592: d006 beq.n 80065a2 + r->cb(r->arg, ERR_OK); + 8006594: 69fb ldr r3, [r7, #28] + 8006596: 685b ldr r3, [r3, #4] + 8006598: 69fa ldr r2, [r7, #28] + 800659a: 6892 ldr r2, [r2, #8] + 800659c: 2100 movs r1, #0 + 800659e: 4610 mov r0, r2 + 80065a0: 4798 blx r3 + } + mqtt_delete_request(r); + 80065a2: 69f8 ldr r0, [r7, #28] + 80065a4: f7ff fb48 bl 8005c38 + pkt_type == MQTT_MSG_TYPE_PUBCOMP || pkt_type == MQTT_MSG_TYPE_PUBACK) { + 80065a8: bf00 nop + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received unknown message type: %d\n", pkt_type)); + goto out_disconnect; + } + } + return res; + 80065aa: 8dfb ldrh r3, [r7, #46] ; 0x2e + 80065ac: e008 b.n 80065c0 + goto out_disconnect; + 80065ae: bf00 nop + 80065b0: e004 b.n 80065bc + goto out_disconnect; + 80065b2: bf00 nop + 80065b4: e002 b.n 80065bc + goto out_disconnect; + 80065b6: bf00 nop + 80065b8: e000 b.n 80065bc + goto out_disconnect; + 80065ba: bf00 nop +out_disconnect: + return MQTT_CONNECT_DISCONNECTED; + 80065bc: f44f 7380 mov.w r3, #256 ; 0x100 +} + 80065c0: 4618 mov r0, r3 + 80065c2: 3734 adds r7, #52 ; 0x34 + 80065c4: 46bd mov sp, r7 + 80065c6: bd90 pop {r4, r7, pc} + +080065c8 : + * @param p PBUF chain of received data + * @return Connection status + */ +static mqtt_connection_status_t +mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p) +{ + 80065c8: b580 push {r7, lr} + 80065ca: b088 sub sp, #32 + 80065cc: af00 add r7, sp, #0 + 80065ce: 6078 str r0, [r7, #4] + 80065d0: 6039 str r1, [r7, #0] + u16_t in_offset = 0; + 80065d2: 2300 movs r3, #0 + 80065d4: 83fb strh r3, [r7, #30] + u32_t msg_rem_len = 0; + 80065d6: 2300 movs r3, #0 + 80065d8: 61bb str r3, [r7, #24] + u8_t fixed_hdr_idx = 0; + 80065da: 2300 movs r3, #0 + 80065dc: 75fb strb r3, [r7, #23] + u8_t b = 0; + 80065de: 2300 movs r3, #0 + 80065e0: 75bb strb r3, [r7, #22] + + while (p->tot_len > in_offset) { + 80065e2: e0bc b.n 800675e + if ((fixed_hdr_idx < 2) || ((b & 0x80) != 0)) { + 80065e4: 7dfb ldrb r3, [r7, #23] + 80065e6: 2b01 cmp r3, #1 + 80065e8: d903 bls.n 80065f2 + 80065ea: f997 3016 ldrsb.w r3, [r7, #22] + 80065ee: 2b00 cmp r3, #0 + 80065f0: da4d bge.n 800668e + + if (fixed_hdr_idx < client->msg_idx) { + 80065f2: 7dfa ldrb r2, [r7, #23] + 80065f4: 687b ldr r3, [r7, #4] + 80065f6: 6e9b ldr r3, [r3, #104] ; 0x68 + 80065f8: 429a cmp r2, r3 + 80065fa: d206 bcs.n 800660a + b = client->rx_buffer[fixed_hdr_idx]; + 80065fc: 7dfb ldrb r3, [r7, #23] + 80065fe: 687a ldr r2, [r7, #4] + 8006600: 4413 add r3, r2 + 8006602: f893 306c ldrb.w r3, [r3, #108] ; 0x6c + 8006606: 75bb strb r3, [r7, #22] + 8006608: e012 b.n 8006630 + } else { + b = pbuf_get_at(p, in_offset++); + 800660a: 8bfb ldrh r3, [r7, #30] + 800660c: 1c5a adds r2, r3, #1 + 800660e: 83fa strh r2, [r7, #30] + 8006610: 4619 mov r1, r3 + 8006612: 6838 ldr r0, [r7, #0] + 8006614: f002 f936 bl 8008884 + 8006618: 4603 mov r3, r0 + 800661a: 75bb strb r3, [r7, #22] + client->rx_buffer[client->msg_idx++] = b; + 800661c: 687b ldr r3, [r7, #4] + 800661e: 6e9b ldr r3, [r3, #104] ; 0x68 + 8006620: 1c59 adds r1, r3, #1 + 8006622: 687a ldr r2, [r7, #4] + 8006624: 6691 str r1, [r2, #104] ; 0x68 + 8006626: 687a ldr r2, [r7, #4] + 8006628: 4413 add r3, r2 + 800662a: 7dba ldrb r2, [r7, #22] + 800662c: f883 206c strb.w r2, [r3, #108] ; 0x6c + } + fixed_hdr_idx++; + 8006630: 7dfb ldrb r3, [r7, #23] + 8006632: 3301 adds r3, #1 + 8006634: 75fb strb r3, [r7, #23] + + if (fixed_hdr_idx >= 2) { + 8006636: 7dfb ldrb r3, [r7, #23] + 8006638: 2b01 cmp r3, #1 + 800663a: f240 8090 bls.w 800675e + msg_rem_len |= (u32_t)(b & 0x7f) << ((fixed_hdr_idx - 2) * 7); + 800663e: 7dbb ldrb r3, [r7, #22] + 8006640: f003 017f and.w r1, r3, #127 ; 0x7f + 8006644: 7dfb ldrb r3, [r7, #23] + 8006646: 1e9a subs r2, r3, #2 + 8006648: 4613 mov r3, r2 + 800664a: 00db lsls r3, r3, #3 + 800664c: 1a9b subs r3, r3, r2 + 800664e: fa01 f303 lsl.w r3, r1, r3 + 8006652: 69ba ldr r2, [r7, #24] + 8006654: 4313 orrs r3, r2 + 8006656: 61bb str r3, [r7, #24] + if ((b & 0x80) == 0) { + 8006658: f997 3016 ldrsb.w r3, [r7, #22] + 800665c: 2b00 cmp r3, #0 + 800665e: db7e blt.n 800675e + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: Remaining length after fixed header: %d\n", msg_rem_len)); + if (msg_rem_len == 0) { + 8006660: 69bb ldr r3, [r7, #24] + 8006662: 2b00 cmp r3, #0 + 8006664: d10b bne.n 800667e + /* Complete message with no extra headers of payload received */ + mqtt_message_received(client, fixed_hdr_idx, 0, 0); + 8006666: 7df9 ldrb r1, [r7, #23] + 8006668: 2300 movs r3, #0 + 800666a: 2200 movs r2, #0 + 800666c: 6878 ldr r0, [r7, #4] + 800666e: f7ff fe61 bl 8006334 + client->msg_idx = 0; + 8006672: 687b ldr r3, [r7, #4] + 8006674: 2200 movs r2, #0 + 8006676: 669a str r2, [r3, #104] ; 0x68 + fixed_hdr_idx = 0; + 8006678: 2300 movs r3, #0 + 800667a: 75fb strb r3, [r7, #23] + 800667c: e06f b.n 800675e + } else { + /* Bytes remaining in message */ + msg_rem_len = (msg_rem_len + fixed_hdr_idx) - client->msg_idx; + 800667e: 7dfa ldrb r2, [r7, #23] + 8006680: 69bb ldr r3, [r7, #24] + 8006682: 441a add r2, r3 + 8006684: 687b ldr r3, [r7, #4] + 8006686: 6e9b ldr r3, [r3, #104] ; 0x68 + 8006688: 1ad3 subs r3, r2, r3 + 800668a: 61bb str r3, [r7, #24] + if (fixed_hdr_idx >= 2) { + 800668c: e067 b.n 800675e + } + } + } else { + u16_t cpy_len, cpy_start, buffer_space; + + cpy_start = (client->msg_idx - fixed_hdr_idx) % (MQTT_VAR_HEADER_BUFFER_LEN - fixed_hdr_idx) + fixed_hdr_idx; + 800668e: 687b ldr r3, [r7, #4] + 8006690: 6e9a ldr r2, [r3, #104] ; 0x68 + 8006692: 7dfb ldrb r3, [r7, #23] + 8006694: 1ad3 subs r3, r2, r3 + 8006696: 7dfa ldrb r2, [r7, #23] + 8006698: f1c2 0280 rsb r2, r2, #128 ; 0x80 + 800669c: fbb3 f1f2 udiv r1, r3, r2 + 80066a0: fb01 f202 mul.w r2, r1, r2 + 80066a4: 1a9b subs r3, r3, r2 + 80066a6: b29a uxth r2, r3 + 80066a8: 7dfb ldrb r3, [r7, #23] + 80066aa: b29b uxth r3, r3 + 80066ac: 4413 add r3, r2 + 80066ae: 827b strh r3, [r7, #18] + + /* Allow to copy the lesser one of available length in input data or bytes remaining in message */ + cpy_len = (u16_t)LWIP_MIN((u16_t)(p->tot_len - in_offset), msg_rem_len); + 80066b0: 683b ldr r3, [r7, #0] + 80066b2: 891a ldrh r2, [r3, #8] + 80066b4: 8bfb ldrh r3, [r7, #30] + 80066b6: 1ad3 subs r3, r2, r3 + 80066b8: b29b uxth r3, r3 + 80066ba: 461a mov r2, r3 + 80066bc: 69bb ldr r3, [r7, #24] + 80066be: 4293 cmp r3, r2 + 80066c0: d905 bls.n 80066ce + 80066c2: 683b ldr r3, [r7, #0] + 80066c4: 891a ldrh r2, [r3, #8] + 80066c6: 8bfb ldrh r3, [r7, #30] + 80066c8: 1ad3 subs r3, r2, r3 + 80066ca: b29b uxth r3, r3 + 80066cc: e001 b.n 80066d2 + 80066ce: 69bb ldr r3, [r7, #24] + 80066d0: b29b uxth r3, r3 + 80066d2: 82bb strh r3, [r7, #20] + + /* Limit to available space in buffer */ + buffer_space = MQTT_VAR_HEADER_BUFFER_LEN - cpy_start; + 80066d4: 8a7b ldrh r3, [r7, #18] + 80066d6: f1c3 0380 rsb r3, r3, #128 ; 0x80 + 80066da: 823b strh r3, [r7, #16] + if (cpy_len > buffer_space) { + 80066dc: 8aba ldrh r2, [r7, #20] + 80066de: 8a3b ldrh r3, [r7, #16] + 80066e0: 429a cmp r2, r3 + 80066e2: d901 bls.n 80066e8 + cpy_len = buffer_space; + 80066e4: 8a3b ldrh r3, [r7, #16] + 80066e6: 82bb strh r3, [r7, #20] + } + pbuf_copy_partial(p, client->rx_buffer+cpy_start, cpy_len, in_offset); + 80066e8: 687b ldr r3, [r7, #4] + 80066ea: f103 026c add.w r2, r3, #108 ; 0x6c + 80066ee: 8a7b ldrh r3, [r7, #18] + 80066f0: 18d1 adds r1, r2, r3 + 80066f2: 8bfb ldrh r3, [r7, #30] + 80066f4: 8aba ldrh r2, [r7, #20] + 80066f6: 6838 ldr r0, [r7, #0] + 80066f8: f002 f822 bl 8008740 + + /* Advance get and put indexes */ + client->msg_idx += cpy_len; + 80066fc: 687b ldr r3, [r7, #4] + 80066fe: 6e9a ldr r2, [r3, #104] ; 0x68 + 8006700: 8abb ldrh r3, [r7, #20] + 8006702: 441a add r2, r3 + 8006704: 687b ldr r3, [r7, #4] + 8006706: 669a str r2, [r3, #104] ; 0x68 + in_offset += cpy_len; + 8006708: 8bfa ldrh r2, [r7, #30] + 800670a: 8abb ldrh r3, [r7, #20] + 800670c: 4413 add r3, r2 + 800670e: 83fb strh r3, [r7, #30] + msg_rem_len -= cpy_len; + 8006710: 8abb ldrh r3, [r7, #20] + 8006712: 69ba ldr r2, [r7, #24] + 8006714: 1ad3 subs r3, r2, r3 + 8006716: 61bb str r3, [r7, #24] + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: msg_idx: %d, cpy_len: %d, remaining %d\n", client->msg_idx, cpy_len, msg_rem_len)); + if (msg_rem_len == 0 || cpy_len == buffer_space) { + 8006718: 69bb ldr r3, [r7, #24] + 800671a: 2b00 cmp r3, #0 + 800671c: d003 beq.n 8006726 + 800671e: 8aba ldrh r2, [r7, #20] + 8006720: 8a3b ldrh r3, [r7, #16] + 8006722: 429a cmp r2, r3 + 8006724: d11b bne.n 800675e + /* Whole message received or buffer is full */ + mqtt_connection_status_t res = mqtt_message_received(client, fixed_hdr_idx, (cpy_start + cpy_len) - fixed_hdr_idx, msg_rem_len); + 8006726: 8a7a ldrh r2, [r7, #18] + 8006728: 8abb ldrh r3, [r7, #20] + 800672a: 4413 add r3, r2 + 800672c: b29a uxth r2, r3 + 800672e: 7dfb ldrb r3, [r7, #23] + 8006730: b29b uxth r3, r3 + 8006732: 1ad3 subs r3, r2, r3 + 8006734: b29a uxth r2, r3 + 8006736: 7df9 ldrb r1, [r7, #23] + 8006738: 69bb ldr r3, [r7, #24] + 800673a: 6878 ldr r0, [r7, #4] + 800673c: f7ff fdfa bl 8006334 + 8006740: 4603 mov r3, r0 + 8006742: 81fb strh r3, [r7, #14] + if (res != MQTT_CONNECT_ACCEPTED) { + 8006744: 89fb ldrh r3, [r7, #14] + 8006746: 2b00 cmp r3, #0 + 8006748: d001 beq.n 800674e + return res; + 800674a: 89fb ldrh r3, [r7, #14] + 800674c: e00e b.n 800676c + } + if (msg_rem_len == 0) { + 800674e: 69bb ldr r3, [r7, #24] + 8006750: 2b00 cmp r3, #0 + 8006752: d104 bne.n 800675e + /* Reset parser state */ + client->msg_idx = 0; + 8006754: 687b ldr r3, [r7, #4] + 8006756: 2200 movs r2, #0 + 8006758: 669a str r2, [r3, #104] ; 0x68 + /* msg_tot_len = 0; */ + fixed_hdr_idx = 0; + 800675a: 2300 movs r3, #0 + 800675c: 75fb strb r3, [r7, #23] + while (p->tot_len > in_offset) { + 800675e: 683b ldr r3, [r7, #0] + 8006760: 891b ldrh r3, [r3, #8] + 8006762: 8bfa ldrh r2, [r7, #30] + 8006764: 429a cmp r2, r3 + 8006766: f4ff af3d bcc.w 80065e4 + } + } + } + } + return MQTT_CONNECT_ACCEPTED; + 800676a: 2300 movs r3, #0 +} + 800676c: 4618 mov r0, r3 + 800676e: 3720 adds r7, #32 + 8006770: 46bd mov sp, r7 + 8006772: bd80 pop {r7, pc} + +08006774 : + * @param err Passed as return value if not ERR_OK + * @return ERR_OK or err passed into callback + */ +static err_t +mqtt_tcp_recv_cb(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) +{ + 8006774: b580 push {r7, lr} + 8006776: b086 sub sp, #24 + 8006778: af00 add r7, sp, #0 + 800677a: 60f8 str r0, [r7, #12] + 800677c: 60b9 str r1, [r7, #8] + 800677e: 607a str r2, [r7, #4] + 8006780: 70fb strb r3, [r7, #3] + mqtt_client_t *client = (mqtt_client_t *)arg; + 8006782: 68fb ldr r3, [r7, #12] + 8006784: 617b str r3, [r7, #20] + LWIP_ASSERT("mqtt_tcp_recv_cb: client != NULL", client != NULL); + 8006786: 697b ldr r3, [r7, #20] + 8006788: 2b00 cmp r3, #0 + 800678a: d106 bne.n 800679a + 800678c: 4b24 ldr r3, [pc, #144] ; (8006820 ) + 800678e: f240 325f movw r2, #863 ; 0x35f + 8006792: 4924 ldr r1, [pc, #144] ; (8006824 ) + 8006794: 4824 ldr r0, [pc, #144] ; (8006828 ) + 8006796: f00c faf5 bl 8012d84 + LWIP_ASSERT("mqtt_tcp_recv_cb: client->conn == pcb", client->conn == pcb); + 800679a: 697b ldr r3, [r7, #20] + 800679c: 68db ldr r3, [r3, #12] + 800679e: 68ba ldr r2, [r7, #8] + 80067a0: 429a cmp r2, r3 + 80067a2: d006 beq.n 80067b2 + 80067a4: 4b1e ldr r3, [pc, #120] ; (8006820 ) + 80067a6: f44f 7258 mov.w r2, #864 ; 0x360 + 80067aa: 4920 ldr r1, [pc, #128] ; (800682c ) + 80067ac: 481e ldr r0, [pc, #120] ; (8006828 ) + 80067ae: f00c fae9 bl 8012d84 + + if (p == NULL) { + 80067b2: 687b ldr r3, [r7, #4] + 80067b4: 2b00 cmp r3, #0 + 80067b6: d105 bne.n 80067c4 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_recv_cb: Recv pbuf=NULL, remote has closed connection\n")); + mqtt_close(client, MQTT_CONNECT_DISCONNECTED); + 80067b8: f44f 7180 mov.w r1, #256 ; 0x100 + 80067bc: 6978 ldr r0, [r7, #20] + 80067be: f7ff fc69 bl 8006094 + 80067c2: e027 b.n 8006814 + } else { + mqtt_connection_status_t res; + if (err != ERR_OK) { + 80067c4: f997 3003 ldrsb.w r3, [r7, #3] + 80067c8: 2b00 cmp r3, #0 + 80067ca: d005 beq.n 80067d8 + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_recv_cb: Recv err=%d\n", err)); + pbuf_free(p); + 80067cc: 6878 ldr r0, [r7, #4] + 80067ce: f001 fdb9 bl 8008344 + return err; + 80067d2: f997 3003 ldrsb.w r3, [r7, #3] + 80067d6: e01e b.n 8006816 + } + + /* Tell remote that data has been received */ + tcp_recved(pcb, p->tot_len); + 80067d8: 687b ldr r3, [r7, #4] + 80067da: 891b ldrh r3, [r3, #8] + 80067dc: 4619 mov r1, r3 + 80067de: 68b8 ldr r0, [r7, #8] + 80067e0: f002 fc04 bl 8008fec + res = mqtt_parse_incoming(client, p); + 80067e4: 6879 ldr r1, [r7, #4] + 80067e6: 6978 ldr r0, [r7, #20] + 80067e8: f7ff feee bl 80065c8 + 80067ec: 4603 mov r3, r0 + 80067ee: 827b strh r3, [r7, #18] + pbuf_free(p); + 80067f0: 6878 ldr r0, [r7, #4] + 80067f2: f001 fda7 bl 8008344 + + if (res != MQTT_CONNECT_ACCEPTED) { + 80067f6: 8a7b ldrh r3, [r7, #18] + 80067f8: 2b00 cmp r3, #0 + 80067fa: d004 beq.n 8006806 + mqtt_close(client, res); + 80067fc: 8a7b ldrh r3, [r7, #18] + 80067fe: 4619 mov r1, r3 + 8006800: 6978 ldr r0, [r7, #20] + 8006802: f7ff fc47 bl 8006094 + } + /* If keep alive functionality is used */ + if (client->keep_alive != 0) { + 8006806: 697b ldr r3, [r7, #20] + 8006808: 885b ldrh r3, [r3, #2] + 800680a: 2b00 cmp r3, #0 + 800680c: d002 beq.n 8006814 + /* Reset server alive watchdog */ + client->server_watchdog = 0; + 800680e: 697b ldr r3, [r7, #20] + 8006810: 2200 movs r2, #0 + 8006812: 809a strh r2, [r3, #4] + } + + } + return ERR_OK; + 8006814: 2300 movs r3, #0 +} + 8006816: 4618 mov r0, r3 + 8006818: 3718 adds r7, #24 + 800681a: 46bd mov sp, r7 + 800681c: bd80 pop {r7, pc} + 800681e: bf00 nop + 8006820: 08013ea0 .word 0x08013ea0 + 8006824: 08014094 .word 0x08014094 + 8006828: 08013ef8 .word 0x08013ef8 + 800682c: 080140b8 .word 0x080140b8 + +08006830 : + * @param len Number of bytes sent + * @return ERR_OK + */ +static err_t +mqtt_tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len) +{ + 8006830: b580 push {r7, lr} + 8006832: b086 sub sp, #24 + 8006834: af00 add r7, sp, #0 + 8006836: 60f8 str r0, [r7, #12] + 8006838: 60b9 str r1, [r7, #8] + 800683a: 4613 mov r3, r2 + 800683c: 80fb strh r3, [r7, #6] + mqtt_client_t *client = (mqtt_client_t *)arg; + 800683e: 68fb ldr r3, [r7, #12] + 8006840: 617b str r3, [r7, #20] + + LWIP_UNUSED_ARG(tpcb); + LWIP_UNUSED_ARG(len); + + if (client->conn_state == MQTT_CONNECTED) { + 8006842: 697b ldr r3, [r7, #20] + 8006844: 7a9b ldrb r3, [r3, #10] + 8006846: 2b03 cmp r3, #3 + 8006848: d127 bne.n 800689a + struct mqtt_request_t *r; + + /* Reset keep-alive send timer and server watchdog */ + client->cyclic_tick = 0; + 800684a: 697b ldr r3, [r7, #20] + 800684c: 2200 movs r2, #0 + 800684e: 801a strh r2, [r3, #0] + client->server_watchdog = 0; + 8006850: 697b ldr r3, [r7, #20] + 8006852: 2200 movs r2, #0 + 8006854: 809a strh r2, [r3, #4] + /* QoS 0 publish has no response from server, so call its callbacks here */ + while ((r = mqtt_take_request(&client->pend_req_queue, 0)) != NULL) { + 8006856: e00d b.n 8006874 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_sent_cb: Calling QoS 0 publish complete callback\n")); + if (r->cb != NULL) { + 8006858: 693b ldr r3, [r7, #16] + 800685a: 685b ldr r3, [r3, #4] + 800685c: 2b00 cmp r3, #0 + 800685e: d006 beq.n 800686e + r->cb(r->arg, ERR_OK); + 8006860: 693b ldr r3, [r7, #16] + 8006862: 685b ldr r3, [r3, #4] + 8006864: 693a ldr r2, [r7, #16] + 8006866: 6892 ldr r2, [r2, #8] + 8006868: 2100 movs r1, #0 + 800686a: 4610 mov r0, r2 + 800686c: 4798 blx r3 + } + mqtt_delete_request(r); + 800686e: 6938 ldr r0, [r7, #16] + 8006870: f7ff f9e2 bl 8005c38 + while ((r = mqtt_take_request(&client->pend_req_queue, 0)) != NULL) { + 8006874: 697b ldr r3, [r7, #20] + 8006876: 3318 adds r3, #24 + 8006878: 2100 movs r1, #0 + 800687a: 4618 mov r0, r3 + 800687c: f7ff f9ec bl 8005c58 + 8006880: 6138 str r0, [r7, #16] + 8006882: 693b ldr r3, [r7, #16] + 8006884: 2b00 cmp r3, #0 + 8006886: d1e7 bne.n 8006858 + } + /* Try send any remaining buffers from output queue */ + mqtt_output_send(&client->output, client->conn); + 8006888: 697b ldr r3, [r7, #20] + 800688a: f103 02ec add.w r2, r3, #236 ; 0xec + 800688e: 697b ldr r3, [r7, #20] + 8006890: 68db ldr r3, [r3, #12] + 8006892: 4619 mov r1, r3 + 8006894: 4610 mov r0, r2 + 8006896: f7ff f8a5 bl 80059e4 + } + return ERR_OK; + 800689a: 2300 movs r3, #0 +} + 800689c: 4618 mov r0, r3 + 800689e: 3718 adds r7, #24 + 80068a0: 46bd mov sp, r7 + 80068a2: bd80 pop {r7, pc} + +080068a4 : + * @param arg MQTT client + * @param err Error encountered + */ +static void +mqtt_tcp_err_cb(void *arg, err_t err) +{ + 80068a4: b580 push {r7, lr} + 80068a6: b084 sub sp, #16 + 80068a8: af00 add r7, sp, #0 + 80068aa: 6078 str r0, [r7, #4] + 80068ac: 460b mov r3, r1 + 80068ae: 70fb strb r3, [r7, #3] + mqtt_client_t *client = (mqtt_client_t *)arg; + 80068b0: 687b ldr r3, [r7, #4] + 80068b2: 60fb str r3, [r7, #12] + LWIP_UNUSED_ARG(err); /* only used for debug output */ + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_err_cb: TCP error callback: error %d, arg: %p\n", err, arg)); + LWIP_ASSERT("mqtt_tcp_err_cb: client != NULL", client != NULL); + 80068b4: 68fb ldr r3, [r7, #12] + 80068b6: 2b00 cmp r3, #0 + 80068b8: d106 bne.n 80068c8 + 80068ba: 4b09 ldr r3, [pc, #36] ; (80068e0 ) + 80068bc: f240 32ae movw r2, #942 ; 0x3ae + 80068c0: 4908 ldr r1, [pc, #32] ; (80068e4 ) + 80068c2: 4809 ldr r0, [pc, #36] ; (80068e8 ) + 80068c4: f00c fa5e bl 8012d84 + /* Set conn to null before calling close as pcb is already deallocated*/ + client->conn = 0; + 80068c8: 68fb ldr r3, [r7, #12] + 80068ca: 2200 movs r2, #0 + 80068cc: 60da str r2, [r3, #12] + mqtt_close(client, MQTT_CONNECT_DISCONNECTED); + 80068ce: f44f 7180 mov.w r1, #256 ; 0x100 + 80068d2: 68f8 ldr r0, [r7, #12] + 80068d4: f7ff fbde bl 8006094 +} + 80068d8: bf00 nop + 80068da: 3710 adds r7, #16 + 80068dc: 46bd mov sp, r7 + 80068de: bd80 pop {r7, pc} + 80068e0: 08013ea0 .word 0x08013ea0 + 80068e4: 080140e0 .word 0x080140e0 + 80068e8: 08013ef8 .word 0x08013ef8 + +080068ec : + * @param tpcb TCP connection handle + * @return err ERR_OK + */ +static err_t +mqtt_tcp_poll_cb(void *arg, struct tcp_pcb *tpcb) +{ + 80068ec: b580 push {r7, lr} + 80068ee: b084 sub sp, #16 + 80068f0: af00 add r7, sp, #0 + 80068f2: 6078 str r0, [r7, #4] + 80068f4: 6039 str r1, [r7, #0] + mqtt_client_t *client = (mqtt_client_t *)arg; + 80068f6: 687b ldr r3, [r7, #4] + 80068f8: 60fb str r3, [r7, #12] + if (client->conn_state == MQTT_CONNECTED) { + 80068fa: 68fb ldr r3, [r7, #12] + 80068fc: 7a9b ldrb r3, [r3, #10] + 80068fe: 2b03 cmp r3, #3 + 8006900: d105 bne.n 800690e + /* Try send any remaining buffers from output queue */ + mqtt_output_send(&client->output, tpcb); + 8006902: 68fb ldr r3, [r7, #12] + 8006904: 33ec adds r3, #236 ; 0xec + 8006906: 6839 ldr r1, [r7, #0] + 8006908: 4618 mov r0, r3 + 800690a: f7ff f86b bl 80059e4 + } + return ERR_OK; + 800690e: 2300 movs r3, #0 +} + 8006910: 4618 mov r0, r3 + 8006912: 3710 adds r7, #16 + 8006914: 46bd mov sp, r7 + 8006916: bd80 pop {r7, pc} + +08006918 : + * @param err Always ERR_OK, mqtt_tcp_err_cb is called in case of error + * @return ERR_OK + */ +static err_t +mqtt_tcp_connect_cb(void *arg, struct tcp_pcb *tpcb, err_t err) +{ + 8006918: b580 push {r7, lr} + 800691a: b086 sub sp, #24 + 800691c: af00 add r7, sp, #0 + 800691e: 60f8 str r0, [r7, #12] + 8006920: 60b9 str r1, [r7, #8] + 8006922: 4613 mov r3, r2 + 8006924: 71fb strb r3, [r7, #7] + mqtt_client_t* client = (mqtt_client_t *)arg; + 8006926: 68fb ldr r3, [r7, #12] + 8006928: 617b str r3, [r7, #20] + + if (err != ERR_OK) { + 800692a: f997 3007 ldrsb.w r3, [r7, #7] + 800692e: 2b00 cmp r3, #0 + 8006930: d002 beq.n 8006938 + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_connect_cb: TCP connect error %d\n", err)); + return err; + 8006932: f997 3007 ldrsb.w r3, [r7, #7] + 8006936: e025 b.n 8006984 + } + + /* Initiate receiver state */ + client->msg_idx = 0; + 8006938: 697b ldr r3, [r7, #20] + 800693a: 2200 movs r2, #0 + 800693c: 669a str r2, [r3, #104] ; 0x68 + + /* Setup TCP callbacks */ + tcp_recv(tpcb, mqtt_tcp_recv_cb); + 800693e: 4913 ldr r1, [pc, #76] ; (800698c ) + 8006940: 68b8 ldr r0, [r7, #8] + 8006942: f003 fa35 bl 8009db0 + tcp_sent(tpcb, mqtt_tcp_sent_cb); + 8006946: 4912 ldr r1, [pc, #72] ; (8006990 ) + 8006948: 68b8 ldr r0, [r7, #8] + 800694a: f003 fa53 bl 8009df4 + tcp_poll(tpcb, mqtt_tcp_poll_cb, 2); + 800694e: 2202 movs r2, #2 + 8006950: 4910 ldr r1, [pc, #64] ; (8006994 ) + 8006952: 68b8 ldr r0, [r7, #8] + 8006954: f003 fa90 bl 8009e78 + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_connect_cb: TCP connection established to server\n")); + /* Enter MQTT connect state */ + client->conn_state = MQTT_CONNECTING; + 8006958: 697b ldr r3, [r7, #20] + 800695a: 2202 movs r2, #2 + 800695c: 729a strb r2, [r3, #10] + + /* Start cyclic timer */ + sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, client); + 800695e: 697a ldr r2, [r7, #20] + 8006960: 490d ldr r1, [pc, #52] ; (8006998 ) + 8006962: f241 3088 movw r0, #5000 ; 0x1388 + 8006966: f007 fa11 bl 800dd8c + client->cyclic_tick = 0; + 800696a: 697b ldr r3, [r7, #20] + 800696c: 2200 movs r2, #0 + 800696e: 801a strh r2, [r3, #0] + + /* Start transmission from output queue, connect message is the first one out*/ + mqtt_output_send(&client->output, client->conn); + 8006970: 697b ldr r3, [r7, #20] + 8006972: f103 02ec add.w r2, r3, #236 ; 0xec + 8006976: 697b ldr r3, [r7, #20] + 8006978: 68db ldr r3, [r3, #12] + 800697a: 4619 mov r1, r3 + 800697c: 4610 mov r0, r2 + 800697e: f7ff f831 bl 80059e4 + + return ERR_OK; + 8006982: 2300 movs r3, #0 +} + 8006984: 4618 mov r0, r3 + 8006986: 3718 adds r7, #24 + 8006988: 46bd mov sp, r7 + 800698a: bd80 pop {r7, pc} + 800698c: 08006775 .word 0x08006775 + 8006990: 08006831 .word 0x08006831 + 8006994: 080068ed .word 0x080068ed + 8006998: 08006155 .word 0x08006155 + +0800699c : + * ERR_MEM if short on memory + */ +err_t +mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, + mqtt_request_cb_t cb, void *arg) +{ + 800699c: b580 push {r7, lr} + 800699e: b08c sub sp, #48 ; 0x30 + 80069a0: af02 add r7, sp, #8 + 80069a2: 60f8 str r0, [r7, #12] + 80069a4: 60b9 str r1, [r7, #8] + 80069a6: 607a str r2, [r7, #4] + 80069a8: 807b strh r3, [r7, #2] + size_t topic_strlen; + size_t total_len; + u16_t topic_len; + u16_t remaining_length; + + LWIP_ASSERT("mqtt_publish: client != NULL", client); + 80069aa: 68fb ldr r3, [r7, #12] + 80069ac: 2b00 cmp r3, #0 + 80069ae: d106 bne.n 80069be + 80069b0: 4b5c ldr r3, [pc, #368] ; (8006b24 ) + 80069b2: f240 420b movw r2, #1035 ; 0x40b + 80069b6: 495c ldr r1, [pc, #368] ; (8006b28 ) + 80069b8: 485c ldr r0, [pc, #368] ; (8006b2c ) + 80069ba: f00c f9e3 bl 8012d84 + LWIP_ASSERT("mqtt_publish: topic != NULL", topic); + 80069be: 68bb ldr r3, [r7, #8] + 80069c0: 2b00 cmp r3, #0 + 80069c2: d106 bne.n 80069d2 + 80069c4: 4b57 ldr r3, [pc, #348] ; (8006b24 ) + 80069c6: f240 420c movw r2, #1036 ; 0x40c + 80069ca: 4959 ldr r1, [pc, #356] ; (8006b30 ) + 80069cc: 4857 ldr r0, [pc, #348] ; (8006b2c ) + 80069ce: f00c f9d9 bl 8012d84 + LWIP_ERROR("mqtt_publish: TCP disconnected", (client->conn_state != TCP_DISCONNECTED), return ERR_CONN); + 80069d2: 68fb ldr r3, [r7, #12] + 80069d4: 7a9b ldrb r3, [r3, #10] + 80069d6: 2b00 cmp r3, #0 + 80069d8: d109 bne.n 80069ee + 80069da: 4b52 ldr r3, [pc, #328] ; (8006b24 ) + 80069dc: f240 420d movw r2, #1037 ; 0x40d + 80069e0: 4954 ldr r1, [pc, #336] ; (8006b34 ) + 80069e2: 4852 ldr r0, [pc, #328] ; (8006b2c ) + 80069e4: f00c f9ce bl 8012d84 + 80069e8: f06f 030a mvn.w r3, #10 + 80069ec: e095 b.n 8006b1a + + topic_strlen = strlen(topic); + 80069ee: 68b8 ldr r0, [r7, #8] + 80069f0: f7f9 fbf2 bl 80001d8 + 80069f4: 6238 str r0, [r7, #32] + LWIP_ERROR("mqtt_publish: topic length overflow", (topic_strlen <= (0xFFFF - 2)), return ERR_ARG); + 80069f6: 6a3b ldr r3, [r7, #32] + 80069f8: f64f 72fd movw r2, #65533 ; 0xfffd + 80069fc: 4293 cmp r3, r2 + 80069fe: d909 bls.n 8006a14 + 8006a00: 4b48 ldr r3, [pc, #288] ; (8006b24 ) + 8006a02: f44f 6282 mov.w r2, #1040 ; 0x410 + 8006a06: 494c ldr r1, [pc, #304] ; (8006b38 ) + 8006a08: 4848 ldr r0, [pc, #288] ; (8006b2c ) + 8006a0a: f00c f9bb bl 8012d84 + 8006a0e: f06f 030f mvn.w r3, #15 + 8006a12: e082 b.n 8006b1a + topic_len = (u16_t)topic_strlen; + 8006a14: 6a3b ldr r3, [r7, #32] + 8006a16: 83fb strh r3, [r7, #30] + total_len = 2 + topic_len + payload_length; + 8006a18: 8bfb ldrh r3, [r7, #30] + 8006a1a: 1c9a adds r2, r3, #2 + 8006a1c: 887b ldrh r3, [r7, #2] + 8006a1e: 4413 add r3, r2 + 8006a20: 61bb str r3, [r7, #24] + LWIP_ERROR("mqtt_publish: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); + 8006a22: 69bb ldr r3, [r7, #24] + 8006a24: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8006a28: d309 bcc.n 8006a3e + 8006a2a: 4b3e ldr r3, [pc, #248] ; (8006b24 ) + 8006a2c: f240 4213 movw r2, #1043 ; 0x413 + 8006a30: 4942 ldr r1, [pc, #264] ; (8006b3c ) + 8006a32: 483e ldr r0, [pc, #248] ; (8006b2c ) + 8006a34: f00c f9a6 bl 8012d84 + 8006a38: f06f 030f mvn.w r3, #15 + 8006a3c: e06d b.n 8006b1a + remaining_length = (u16_t)total_len; + 8006a3e: 69bb ldr r3, [r7, #24] + 8006a40: 84bb strh r3, [r7, #36] ; 0x24 + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_publish: Publish with payload length %d to topic \"%s\"\n", payload_length, topic)); + + if (qos > 0) { + 8006a42: f897 3030 ldrb.w r3, [r7, #48] ; 0x30 + 8006a46: 2b00 cmp r3, #0 + 8006a48: d008 beq.n 8006a5c + remaining_length += 2; + 8006a4a: 8cbb ldrh r3, [r7, #36] ; 0x24 + 8006a4c: 3302 adds r3, #2 + 8006a4e: 84bb strh r3, [r7, #36] ; 0x24 + /* Generate pkt_id id for QoS1 and 2 */ + pkt_id = msg_generate_packet_id(client); + 8006a50: 68f8 ldr r0, [r7, #12] + 8006a52: f7fe ffac bl 80059ae + 8006a56: 4603 mov r3, r0 + 8006a58: 84fb strh r3, [r7, #38] ; 0x26 + 8006a5a: e001 b.n 8006a60 + } else { + /* Use reserved value pkt_id 0 for QoS 0 in request handle */ + pkt_id = 0; + 8006a5c: 2300 movs r3, #0 + 8006a5e: 84fb strh r3, [r7, #38] ; 0x26 + } + + r = mqtt_create_request(client->req_list, pkt_id, cb, arg); + 8006a60: 68fb ldr r3, [r7, #12] + 8006a62: f103 001c add.w r0, r3, #28 + 8006a66: 8cf9 ldrh r1, [r7, #38] ; 0x26 + 8006a68: 6bfb ldr r3, [r7, #60] ; 0x3c + 8006a6a: 6bba ldr r2, [r7, #56] ; 0x38 + 8006a6c: f7ff f852 bl 8005b14 + 8006a70: 6178 str r0, [r7, #20] + if (r == NULL) { + 8006a72: 697b ldr r3, [r7, #20] + 8006a74: 2b00 cmp r3, #0 + 8006a76: d102 bne.n 8006a7e + return ERR_MEM; + 8006a78: f04f 33ff mov.w r3, #4294967295 + 8006a7c: e04d b.n 8006b1a + } + + if (mqtt_output_check_space(&client->output, remaining_length) == 0) { + 8006a7e: 68fb ldr r3, [r7, #12] + 8006a80: 33ec adds r3, #236 ; 0xec + 8006a82: 8cba ldrh r2, [r7, #36] ; 0x24 + 8006a84: 4611 mov r1, r2 + 8006a86: 4618 mov r0, r3 + 8006a88: f7ff fad0 bl 800602c + 8006a8c: 4603 mov r3, r0 + 8006a8e: 2b00 cmp r3, #0 + 8006a90: d105 bne.n 8006a9e + mqtt_delete_request(r); + 8006a92: 6978 ldr r0, [r7, #20] + 8006a94: f7ff f8d0 bl 8005c38 + return ERR_MEM; + 8006a98: f04f 33ff mov.w r3, #4294967295 + 8006a9c: e03d b.n 8006b1a + } + /* Append fixed header */ + mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_PUBLISH, 0, qos, retain, remaining_length); + 8006a9e: 68fb ldr r3, [r7, #12] + 8006aa0: f103 00ec add.w r0, r3, #236 ; 0xec + 8006aa4: f897 2030 ldrb.w r2, [r7, #48] ; 0x30 + 8006aa8: 8cbb ldrh r3, [r7, #36] ; 0x24 + 8006aaa: 9301 str r3, [sp, #4] + 8006aac: f897 3034 ldrb.w r3, [r7, #52] ; 0x34 + 8006ab0: 9300 str r3, [sp, #0] + 8006ab2: 4613 mov r3, r2 + 8006ab4: 2200 movs r2, #0 + 8006ab6: 2103 movs r1, #3 + 8006ab8: f7ff fa6d bl 8005f96 + + /* Append Topic */ + mqtt_output_append_string(&client->output, topic, topic_len); + 8006abc: 68fb ldr r3, [r7, #12] + 8006abe: 33ec adds r3, #236 ; 0xec + 8006ac0: 8bfa ldrh r2, [r7, #30] + 8006ac2: 68b9 ldr r1, [r7, #8] + 8006ac4: 4618 mov r0, r3 + 8006ac6: f7ff fa24 bl 8005f12 + + /* Append packet if for QoS 1 and 2*/ + if (qos > 0) { + 8006aca: f897 3030 ldrb.w r3, [r7, #48] ; 0x30 + 8006ace: 2b00 cmp r3, #0 + 8006ad0: d006 beq.n 8006ae0 + mqtt_output_append_u16(&client->output, pkt_id); + 8006ad2: 68fb ldr r3, [r7, #12] + 8006ad4: 33ec adds r3, #236 ; 0xec + 8006ad6: 8cfa ldrh r2, [r7, #38] ; 0x26 + 8006ad8: 4611 mov r1, r2 + 8006ada: 4618 mov r0, r3 + 8006adc: f7ff f9cc bl 8005e78 + } + + /* Append optional publish payload */ + if ((payload != NULL) && (payload_length > 0)) { + 8006ae0: 687b ldr r3, [r7, #4] + 8006ae2: 2b00 cmp r3, #0 + 8006ae4: d009 beq.n 8006afa + 8006ae6: 887b ldrh r3, [r7, #2] + 8006ae8: 2b00 cmp r3, #0 + 8006aea: d006 beq.n 8006afa + mqtt_output_append_buf(&client->output, payload, payload_length); + 8006aec: 68fb ldr r3, [r7, #12] + 8006aee: 33ec adds r3, #236 ; 0xec + 8006af0: 887a ldrh r2, [r7, #2] + 8006af2: 6879 ldr r1, [r7, #4] + 8006af4: 4618 mov r0, r3 + 8006af6: f7ff f9e6 bl 8005ec6 + } + + mqtt_append_request(&client->pend_req_queue, r); + 8006afa: 68fb ldr r3, [r7, #12] + 8006afc: 3318 adds r3, #24 + 8006afe: 6979 ldr r1, [r7, #20] + 8006b00: 4618 mov r0, r3 + 8006b02: f7ff f84d bl 8005ba0 + mqtt_output_send(&client->output, client->conn); + 8006b06: 68fb ldr r3, [r7, #12] + 8006b08: f103 02ec add.w r2, r3, #236 ; 0xec + 8006b0c: 68fb ldr r3, [r7, #12] + 8006b0e: 68db ldr r3, [r3, #12] + 8006b10: 4619 mov r1, r3 + 8006b12: 4610 mov r0, r2 + 8006b14: f7fe ff66 bl 80059e4 + return ERR_OK; + 8006b18: 2300 movs r3, #0 +} + 8006b1a: 4618 mov r0, r3 + 8006b1c: 3728 adds r7, #40 ; 0x28 + 8006b1e: 46bd mov sp, r7 + 8006b20: bd80 pop {r7, pc} + 8006b22: bf00 nop + 8006b24: 08013ea0 .word 0x08013ea0 + 8006b28: 08014100 .word 0x08014100 + 8006b2c: 08013ef8 .word 0x08013ef8 + 8006b30: 08014120 .word 0x08014120 + 8006b34: 0801413c .word 0x0801413c + 8006b38: 0801415c .word 0x0801415c + 8006b3c: 08014180 .word 0x08014180 + +08006b40 : + * @param sub 1 for subscribe, 0 for unsubscribe + * @return ERR_OK if successful, @see err_t enum for other results + */ +err_t +mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub) +{ + 8006b40: b580 push {r7, lr} + 8006b42: b08c sub sp, #48 ; 0x30 + 8006b44: af02 add r7, sp, #8 + 8006b46: 60f8 str r0, [r7, #12] + 8006b48: 60b9 str r1, [r7, #8] + 8006b4a: 603b str r3, [r7, #0] + 8006b4c: 4613 mov r3, r2 + 8006b4e: 71fb strb r3, [r7, #7] + u16_t topic_len; + u16_t remaining_length; + u16_t pkt_id; + struct mqtt_request_t *r; + + LWIP_ASSERT("mqtt_sub_unsub: client != NULL", client); + 8006b50: 68fb ldr r3, [r7, #12] + 8006b52: 2b00 cmp r3, #0 + 8006b54: d106 bne.n 8006b64 + 8006b56: 4b5d ldr r3, [pc, #372] ; (8006ccc ) + 8006b58: f240 4255 movw r2, #1109 ; 0x455 + 8006b5c: 495c ldr r1, [pc, #368] ; (8006cd0 ) + 8006b5e: 485d ldr r0, [pc, #372] ; (8006cd4 ) + 8006b60: f00c f910 bl 8012d84 + LWIP_ASSERT("mqtt_sub_unsub: topic != NULL", topic); + 8006b64: 68bb ldr r3, [r7, #8] + 8006b66: 2b00 cmp r3, #0 + 8006b68: d106 bne.n 8006b78 + 8006b6a: 4b58 ldr r3, [pc, #352] ; (8006ccc ) + 8006b6c: f240 4256 movw r2, #1110 ; 0x456 + 8006b70: 4959 ldr r1, [pc, #356] ; (8006cd8 ) + 8006b72: 4858 ldr r0, [pc, #352] ; (8006cd4 ) + 8006b74: f00c f906 bl 8012d84 + + topic_strlen = strlen(topic); + 8006b78: 68b8 ldr r0, [r7, #8] + 8006b7a: f7f9 fb2d bl 80001d8 + 8006b7e: 6278 str r0, [r7, #36] ; 0x24 + LWIP_ERROR("mqtt_sub_unsub: topic length overflow", (topic_strlen <= (0xFFFF - 2)), return ERR_ARG); + 8006b80: 6a7b ldr r3, [r7, #36] ; 0x24 + 8006b82: f64f 72fd movw r2, #65533 ; 0xfffd + 8006b86: 4293 cmp r3, r2 + 8006b88: d909 bls.n 8006b9e + 8006b8a: 4b50 ldr r3, [pc, #320] ; (8006ccc ) + 8006b8c: f240 4259 movw r2, #1113 ; 0x459 + 8006b90: 4952 ldr r1, [pc, #328] ; (8006cdc ) + 8006b92: 4850 ldr r0, [pc, #320] ; (8006cd4 ) + 8006b94: f00c f8f6 bl 8012d84 + 8006b98: f06f 030f mvn.w r3, #15 + 8006b9c: e091 b.n 8006cc2 + topic_len = (u16_t)topic_strlen; + 8006b9e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8006ba0: 847b strh r3, [r7, #34] ; 0x22 + /* Topic string, pkt_id, qos for subscribe */ + total_len = topic_len + 2 + 2 + (sub != 0); + 8006ba2: 8c7b ldrh r3, [r7, #34] ; 0x22 + 8006ba4: 3304 adds r3, #4 + 8006ba6: f897 2034 ldrb.w r2, [r7, #52] ; 0x34 + 8006baa: 2a00 cmp r2, #0 + 8006bac: bf14 ite ne + 8006bae: 2201 movne r2, #1 + 8006bb0: 2200 moveq r2, #0 + 8006bb2: b2d2 uxtb r2, r2 + 8006bb4: 4413 add r3, r2 + 8006bb6: 61fb str r3, [r7, #28] + LWIP_ERROR("mqtt_sub_unsub: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); + 8006bb8: 69fb ldr r3, [r7, #28] + 8006bba: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8006bbe: d309 bcc.n 8006bd4 + 8006bc0: 4b42 ldr r3, [pc, #264] ; (8006ccc ) + 8006bc2: f240 425d movw r2, #1117 ; 0x45d + 8006bc6: 4946 ldr r1, [pc, #280] ; (8006ce0 ) + 8006bc8: 4842 ldr r0, [pc, #264] ; (8006cd4 ) + 8006bca: f00c f8db bl 8012d84 + 8006bce: f06f 030f mvn.w r3, #15 + 8006bd2: e076 b.n 8006cc2 + remaining_length = (u16_t)total_len; + 8006bd4: 69fb ldr r3, [r7, #28] + 8006bd6: 837b strh r3, [r7, #26] + + LWIP_ASSERT("mqtt_sub_unsub: qos < 3", qos < 3); + 8006bd8: 79fb ldrb r3, [r7, #7] + 8006bda: 2b02 cmp r3, #2 + 8006bdc: d906 bls.n 8006bec + 8006bde: 4b3b ldr r3, [pc, #236] ; (8006ccc ) + 8006be0: f44f 628c mov.w r2, #1120 ; 0x460 + 8006be4: 493f ldr r1, [pc, #252] ; (8006ce4 ) + 8006be6: 483b ldr r0, [pc, #236] ; (8006cd4 ) + 8006be8: f00c f8cc bl 8012d84 + if (client->conn_state == TCP_DISCONNECTED) { + 8006bec: 68fb ldr r3, [r7, #12] + 8006bee: 7a9b ldrb r3, [r3, #10] + 8006bf0: 2b00 cmp r3, #0 + 8006bf2: d102 bne.n 8006bfa + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_sub_unsub: Can not (un)subscribe in disconnected state\n")); + return ERR_CONN; + 8006bf4: f06f 030a mvn.w r3, #10 + 8006bf8: e063 b.n 8006cc2 + } + + pkt_id = msg_generate_packet_id(client); + 8006bfa: 68f8 ldr r0, [r7, #12] + 8006bfc: f7fe fed7 bl 80059ae + 8006c00: 4603 mov r3, r0 + 8006c02: 833b strh r3, [r7, #24] + r = mqtt_create_request(client->req_list, pkt_id, cb, arg); + 8006c04: 68fb ldr r3, [r7, #12] + 8006c06: f103 001c add.w r0, r3, #28 + 8006c0a: 8b39 ldrh r1, [r7, #24] + 8006c0c: 6b3b ldr r3, [r7, #48] ; 0x30 + 8006c0e: 683a ldr r2, [r7, #0] + 8006c10: f7fe ff80 bl 8005b14 + 8006c14: 6178 str r0, [r7, #20] + if (r == NULL) { + 8006c16: 697b ldr r3, [r7, #20] + 8006c18: 2b00 cmp r3, #0 + 8006c1a: d102 bne.n 8006c22 + return ERR_MEM; + 8006c1c: f04f 33ff mov.w r3, #4294967295 + 8006c20: e04f b.n 8006cc2 + } + + if (mqtt_output_check_space(&client->output, remaining_length) == 0) { + 8006c22: 68fb ldr r3, [r7, #12] + 8006c24: 33ec adds r3, #236 ; 0xec + 8006c26: 8b7a ldrh r2, [r7, #26] + 8006c28: 4611 mov r1, r2 + 8006c2a: 4618 mov r0, r3 + 8006c2c: f7ff f9fe bl 800602c + 8006c30: 4603 mov r3, r0 + 8006c32: 2b00 cmp r3, #0 + 8006c34: d105 bne.n 8006c42 + mqtt_delete_request(r); + 8006c36: 6978 ldr r0, [r7, #20] + 8006c38: f7fe fffe bl 8005c38 + return ERR_MEM; + 8006c3c: f04f 33ff mov.w r3, #4294967295 + 8006c40: e03f b.n 8006cc2 + } + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_sub_unsub: Client (un)subscribe to topic \"%s\", id: %d\n", topic, pkt_id)); + + mqtt_output_append_fixed_header(&client->output, sub ? MQTT_MSG_TYPE_SUBSCRIBE : MQTT_MSG_TYPE_UNSUBSCRIBE, 0, 1, 0, remaining_length); + 8006c42: 68fb ldr r3, [r7, #12] + 8006c44: f103 00ec add.w r0, r3, #236 ; 0xec + 8006c48: f897 3034 ldrb.w r3, [r7, #52] ; 0x34 + 8006c4c: 2b00 cmp r3, #0 + 8006c4e: d001 beq.n 8006c54 + 8006c50: 2108 movs r1, #8 + 8006c52: e000 b.n 8006c56 + 8006c54: 210a movs r1, #10 + 8006c56: 8b7b ldrh r3, [r7, #26] + 8006c58: 9301 str r3, [sp, #4] + 8006c5a: 2300 movs r3, #0 + 8006c5c: 9300 str r3, [sp, #0] + 8006c5e: 2301 movs r3, #1 + 8006c60: 2200 movs r2, #0 + 8006c62: f7ff f998 bl 8005f96 + /* Packet id */ + mqtt_output_append_u16(&client->output, pkt_id); + 8006c66: 68fb ldr r3, [r7, #12] + 8006c68: 33ec adds r3, #236 ; 0xec + 8006c6a: 8b3a ldrh r2, [r7, #24] + 8006c6c: 4611 mov r1, r2 + 8006c6e: 4618 mov r0, r3 + 8006c70: f7ff f902 bl 8005e78 + /* Topic */ + mqtt_output_append_string(&client->output, topic, topic_len); + 8006c74: 68fb ldr r3, [r7, #12] + 8006c76: 33ec adds r3, #236 ; 0xec + 8006c78: 8c7a ldrh r2, [r7, #34] ; 0x22 + 8006c7a: 68b9 ldr r1, [r7, #8] + 8006c7c: 4618 mov r0, r3 + 8006c7e: f7ff f948 bl 8005f12 + /* QoS */ + if (sub != 0) { + 8006c82: f897 3034 ldrb.w r3, [r7, #52] ; 0x34 + 8006c86: 2b00 cmp r3, #0 + 8006c88: d00b beq.n 8006ca2 + mqtt_output_append_u8(&client->output, LWIP_MIN(qos, 2)); + 8006c8a: 68fb ldr r3, [r7, #12] + 8006c8c: f103 02ec add.w r2, r3, #236 ; 0xec + 8006c90: 79fb ldrb r3, [r7, #7] + 8006c92: 2b02 cmp r3, #2 + 8006c94: bf28 it cs + 8006c96: 2302 movcs r3, #2 + 8006c98: b2db uxtb r3, r3 + 8006c9a: 4619 mov r1, r3 + 8006c9c: 4610 mov r0, r2 + 8006c9e: f7ff f8d5 bl 8005e4c + } + + mqtt_append_request(&client->pend_req_queue, r); + 8006ca2: 68fb ldr r3, [r7, #12] + 8006ca4: 3318 adds r3, #24 + 8006ca6: 6979 ldr r1, [r7, #20] + 8006ca8: 4618 mov r0, r3 + 8006caa: f7fe ff79 bl 8005ba0 + mqtt_output_send(&client->output, client->conn); + 8006cae: 68fb ldr r3, [r7, #12] + 8006cb0: f103 02ec add.w r2, r3, #236 ; 0xec + 8006cb4: 68fb ldr r3, [r7, #12] + 8006cb6: 68db ldr r3, [r3, #12] + 8006cb8: 4619 mov r1, r3 + 8006cba: 4610 mov r0, r2 + 8006cbc: f7fe fe92 bl 80059e4 + return ERR_OK; + 8006cc0: 2300 movs r3, #0 +} + 8006cc2: 4618 mov r0, r3 + 8006cc4: 3728 adds r7, #40 ; 0x28 + 8006cc6: 46bd mov sp, r7 + 8006cc8: bd80 pop {r7, pc} + 8006cca: bf00 nop + 8006ccc: 08013ea0 .word 0x08013ea0 + 8006cd0: 080141a4 .word 0x080141a4 + 8006cd4: 08013ef8 .word 0x08013ef8 + 8006cd8: 080141c4 .word 0x080141c4 + 8006cdc: 080141e4 .word 0x080141e4 + 8006ce0: 0801420c .word 0x0801420c + 8006ce4: 08014234 .word 0x08014234 + +08006ce8 : + * @param arg User supplied argument to both callbacks + */ +void +mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb, + mqtt_incoming_data_cb_t data_cb, void *arg) +{ + 8006ce8: b580 push {r7, lr} + 8006cea: b084 sub sp, #16 + 8006cec: af00 add r7, sp, #0 + 8006cee: 60f8 str r0, [r7, #12] + 8006cf0: 60b9 str r1, [r7, #8] + 8006cf2: 607a str r2, [r7, #4] + 8006cf4: 603b str r3, [r7, #0] + LWIP_ASSERT("mqtt_set_inpub_callback: client != NULL", client != NULL); + 8006cf6: 68fb ldr r3, [r7, #12] + 8006cf8: 2b00 cmp r3, #0 + 8006cfa: d106 bne.n 8006d0a + 8006cfc: 4b09 ldr r3, [pc, #36] ; (8006d24 ) + 8006cfe: f240 428f movw r2, #1167 ; 0x48f + 8006d02: 4909 ldr r1, [pc, #36] ; (8006d28 ) + 8006d04: 4809 ldr r0, [pc, #36] ; (8006d2c ) + 8006d06: f00c f83d bl 8012d84 + client->data_cb = data_cb; + 8006d0a: 68fb ldr r3, [r7, #12] + 8006d0c: 687a ldr r2, [r7, #4] + 8006d0e: 661a str r2, [r3, #96] ; 0x60 + client->pub_cb = pub_cb; + 8006d10: 68fb ldr r3, [r7, #12] + 8006d12: 68ba ldr r2, [r7, #8] + 8006d14: 665a str r2, [r3, #100] ; 0x64 + client->inpub_arg = arg; + 8006d16: 68fb ldr r3, [r7, #12] + 8006d18: 683a ldr r2, [r7, #0] + 8006d1a: 65da str r2, [r3, #92] ; 0x5c +} + 8006d1c: bf00 nop + 8006d1e: 3710 adds r7, #16 + 8006d20: 46bd mov sp, r7 + 8006d22: bd80 pop {r7, pc} + 8006d24: 08013ea0 .word 0x08013ea0 + 8006d28: 0801424c .word 0x0801424c + 8006d2c: 08013ef8 .word 0x08013ef8 + +08006d30 : + * @return ERR_OK if successful, @see err_t enum for other results + */ +err_t +mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, mqtt_connection_cb_t cb, void *arg, + const struct mqtt_connect_client_info_t *client_info) +{ + 8006d30: b580 push {r7, lr} + 8006d32: b08a sub sp, #40 ; 0x28 + 8006d34: af02 add r7, sp, #8 + 8006d36: 60f8 str r0, [r7, #12] + 8006d38: 60b9 str r1, [r7, #8] + 8006d3a: 603b str r3, [r7, #0] + 8006d3c: 4613 mov r3, r2 + 8006d3e: 80fb strh r3, [r7, #6] + err_t err; + size_t len; + u16_t client_id_length; + /* Length is the sum of 2+"MQTT", protocol level, flags and keep alive */ + u16_t remaining_length = 2 + 4 + 1 + 1 + 2; + 8006d40: 230a movs r3, #10 + 8006d42: 83bb strh r3, [r7, #28] + u8_t flags = 0, will_topic_len = 0, will_msg_len = 0; + 8006d44: 2300 movs r3, #0 + 8006d46: 76fb strb r3, [r7, #27] + 8006d48: 2300 movs r3, #0 + 8006d4a: 76bb strb r3, [r7, #26] + 8006d4c: 2300 movs r3, #0 + 8006d4e: 767b strb r3, [r7, #25] + + LWIP_ASSERT("mqtt_client_connect: client != NULL", client != NULL); + 8006d50: 68fb ldr r3, [r7, #12] + 8006d52: 2b00 cmp r3, #0 + 8006d54: d106 bne.n 8006d64 + 8006d56: 4b7c ldr r3, [pc, #496] ; (8006f48 ) + 8006d58: f240 42bb movw r2, #1211 ; 0x4bb + 8006d5c: 497b ldr r1, [pc, #492] ; (8006f4c ) + 8006d5e: 487c ldr r0, [pc, #496] ; (8006f50 ) + 8006d60: f00c f810 bl 8012d84 + LWIP_ASSERT("mqtt_client_connect: ip_addr != NULL", ip_addr != NULL); + 8006d64: 68bb ldr r3, [r7, #8] + 8006d66: 2b00 cmp r3, #0 + 8006d68: d106 bne.n 8006d78 + 8006d6a: 4b77 ldr r3, [pc, #476] ; (8006f48 ) + 8006d6c: f240 42bc movw r2, #1212 ; 0x4bc + 8006d70: 4978 ldr r1, [pc, #480] ; (8006f54 ) + 8006d72: 4877 ldr r0, [pc, #476] ; (8006f50 ) + 8006d74: f00c f806 bl 8012d84 + LWIP_ASSERT("mqtt_client_connect: client_info != NULL", client_info != NULL); + 8006d78: 6afb ldr r3, [r7, #44] ; 0x2c + 8006d7a: 2b00 cmp r3, #0 + 8006d7c: d106 bne.n 8006d8c + 8006d7e: 4b72 ldr r3, [pc, #456] ; (8006f48 ) + 8006d80: f240 42bd movw r2, #1213 ; 0x4bd + 8006d84: 4974 ldr r1, [pc, #464] ; (8006f58 ) + 8006d86: 4872 ldr r0, [pc, #456] ; (8006f50 ) + 8006d88: f00b fffc bl 8012d84 + LWIP_ASSERT("mqtt_client_connect: client_info->client_id != NULL", client_info->client_id != NULL); + 8006d8c: 6afb ldr r3, [r7, #44] ; 0x2c + 8006d8e: 681b ldr r3, [r3, #0] + 8006d90: 2b00 cmp r3, #0 + 8006d92: d106 bne.n 8006da2 + 8006d94: 4b6c ldr r3, [pc, #432] ; (8006f48 ) + 8006d96: f240 42be movw r2, #1214 ; 0x4be + 8006d9a: 4970 ldr r1, [pc, #448] ; (8006f5c ) + 8006d9c: 486c ldr r0, [pc, #432] ; (8006f50 ) + 8006d9e: f00b fff1 bl 8012d84 + + if (client->conn_state != TCP_DISCONNECTED) { + 8006da2: 68fb ldr r3, [r7, #12] + 8006da4: 7a9b ldrb r3, [r3, #10] + 8006da6: 2b00 cmp r3, #0 + 8006da8: d002 beq.n 8006db0 + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_client_connect: Already connected\n")); + return ERR_ISCONN; + 8006daa: f06f 0309 mvn.w r3, #9 + 8006dae: e164 b.n 800707a + } + + /* Wipe clean */ + memset(client, 0, sizeof(mqtt_client_t)); + 8006db0: f44f 72f8 mov.w r2, #496 ; 0x1f0 + 8006db4: 2100 movs r1, #0 + 8006db6: 68f8 ldr r0, [r7, #12] + 8006db8: f00c f93a bl 8013030 + client->connect_arg = arg; + 8006dbc: 68fb ldr r3, [r7, #12] + 8006dbe: 6aba ldr r2, [r7, #40] ; 0x28 + 8006dc0: 611a str r2, [r3, #16] + client->connect_cb = cb; + 8006dc2: 68fb ldr r3, [r7, #12] + 8006dc4: 683a ldr r2, [r7, #0] + 8006dc6: 615a str r2, [r3, #20] + client->keep_alive = client_info->keep_alive; + 8006dc8: 6afb ldr r3, [r7, #44] ; 0x2c + 8006dca: 899a ldrh r2, [r3, #12] + 8006dcc: 68fb ldr r3, [r7, #12] + 8006dce: 805a strh r2, [r3, #2] + mqtt_init_requests(client->req_list); + 8006dd0: 68fb ldr r3, [r7, #12] + 8006dd2: 331c adds r3, #28 + 8006dd4: 4618 mov r0, r3 + 8006dd6: f7ff f80d bl 8005df4 + + /* Build connect message */ + if (client_info->will_topic != NULL && client_info->will_msg != NULL) { + 8006dda: 6afb ldr r3, [r7, #44] ; 0x2c + 8006ddc: 691b ldr r3, [r3, #16] + 8006dde: 2b00 cmp r3, #0 + 8006de0: d06a beq.n 8006eb8 + 8006de2: 6afb ldr r3, [r7, #44] ; 0x2c + 8006de4: 695b ldr r3, [r3, #20] + 8006de6: 2b00 cmp r3, #0 + 8006de8: d066 beq.n 8006eb8 + flags |= MQTT_CONNECT_FLAG_WILL; + 8006dea: 7efb ldrb r3, [r7, #27] + 8006dec: f043 0304 orr.w r3, r3, #4 + 8006df0: 76fb strb r3, [r7, #27] + flags |= (client_info->will_qos & 3) << 3; + 8006df2: 6afb ldr r3, [r7, #44] ; 0x2c + 8006df4: 7e1b ldrb r3, [r3, #24] + 8006df6: 00db lsls r3, r3, #3 + 8006df8: b25b sxtb r3, r3 + 8006dfa: f003 0318 and.w r3, r3, #24 + 8006dfe: b25a sxtb r2, r3 + 8006e00: f997 301b ldrsb.w r3, [r7, #27] + 8006e04: 4313 orrs r3, r2 + 8006e06: b25b sxtb r3, r3 + 8006e08: 76fb strb r3, [r7, #27] + if (client_info->will_retain) { + 8006e0a: 6afb ldr r3, [r7, #44] ; 0x2c + 8006e0c: 7e5b ldrb r3, [r3, #25] + 8006e0e: 2b00 cmp r3, #0 + 8006e10: d003 beq.n 8006e1a + flags |= MQTT_CONNECT_FLAG_WILL_RETAIN; + 8006e12: 7efb ldrb r3, [r7, #27] + 8006e14: f043 0320 orr.w r3, r3, #32 + 8006e18: 76fb strb r3, [r7, #27] + } + len = strlen(client_info->will_topic); + 8006e1a: 6afb ldr r3, [r7, #44] ; 0x2c + 8006e1c: 691b ldr r3, [r3, #16] + 8006e1e: 4618 mov r0, r3 + 8006e20: f7f9 f9da bl 80001d8 + 8006e24: 6178 str r0, [r7, #20] + LWIP_ERROR("mqtt_client_connect: client_info->will_topic length overflow", len <= 0xFF, return ERR_VAL); + 8006e26: 697b ldr r3, [r7, #20] + 8006e28: 2bff cmp r3, #255 ; 0xff + 8006e2a: d909 bls.n 8006e40 + 8006e2c: 4b46 ldr r3, [pc, #280] ; (8006f48 ) + 8006e2e: f240 42d4 movw r2, #1236 ; 0x4d4 + 8006e32: 494b ldr r1, [pc, #300] ; (8006f60 ) + 8006e34: 4846 ldr r0, [pc, #280] ; (8006f50 ) + 8006e36: f00b ffa5 bl 8012d84 + 8006e3a: f06f 0305 mvn.w r3, #5 + 8006e3e: e11c b.n 800707a + LWIP_ERROR("mqtt_client_connect: client_info->will_topic length must be > 0", len > 0, return ERR_VAL); + 8006e40: 697b ldr r3, [r7, #20] + 8006e42: 2b00 cmp r3, #0 + 8006e44: d109 bne.n 8006e5a + 8006e46: 4b40 ldr r3, [pc, #256] ; (8006f48 ) + 8006e48: f240 42d5 movw r2, #1237 ; 0x4d5 + 8006e4c: 4945 ldr r1, [pc, #276] ; (8006f64 ) + 8006e4e: 4840 ldr r0, [pc, #256] ; (8006f50 ) + 8006e50: f00b ff98 bl 8012d84 + 8006e54: f06f 0305 mvn.w r3, #5 + 8006e58: e10f b.n 800707a + will_topic_len = (u8_t)len; + 8006e5a: 697b ldr r3, [r7, #20] + 8006e5c: 76bb strb r3, [r7, #26] + len = strlen(client_info->will_msg); + 8006e5e: 6afb ldr r3, [r7, #44] ; 0x2c + 8006e60: 695b ldr r3, [r3, #20] + 8006e62: 4618 mov r0, r3 + 8006e64: f7f9 f9b8 bl 80001d8 + 8006e68: 6178 str r0, [r7, #20] + LWIP_ERROR("mqtt_client_connect: client_info->will_msg length overflow", len <= 0xFF, return ERR_VAL); + 8006e6a: 697b ldr r3, [r7, #20] + 8006e6c: 2bff cmp r3, #255 ; 0xff + 8006e6e: d909 bls.n 8006e84 + 8006e70: 4b35 ldr r3, [pc, #212] ; (8006f48 ) + 8006e72: f44f 629b mov.w r2, #1240 ; 0x4d8 + 8006e76: 493c ldr r1, [pc, #240] ; (8006f68 ) + 8006e78: 4835 ldr r0, [pc, #212] ; (8006f50 ) + 8006e7a: f00b ff83 bl 8012d84 + 8006e7e: f06f 0305 mvn.w r3, #5 + 8006e82: e0fa b.n 800707a + will_msg_len = (u8_t)len; + 8006e84: 697b ldr r3, [r7, #20] + 8006e86: 767b strb r3, [r7, #25] + len = remaining_length + 2 + will_topic_len + 2 + will_msg_len; + 8006e88: 8bbb ldrh r3, [r7, #28] + 8006e8a: 1c9a adds r2, r3, #2 + 8006e8c: 7ebb ldrb r3, [r7, #26] + 8006e8e: 4413 add r3, r2 + 8006e90: 1c9a adds r2, r3, #2 + 8006e92: 7e7b ldrb r3, [r7, #25] + 8006e94: 4413 add r3, r2 + 8006e96: 617b str r3, [r7, #20] + LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); + 8006e98: 697b ldr r3, [r7, #20] + 8006e9a: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8006e9e: d309 bcc.n 8006eb4 + 8006ea0: 4b29 ldr r3, [pc, #164] ; (8006f48 ) + 8006ea2: f240 42db movw r2, #1243 ; 0x4db + 8006ea6: 4931 ldr r1, [pc, #196] ; (8006f6c ) + 8006ea8: 4829 ldr r0, [pc, #164] ; (8006f50 ) + 8006eaa: f00b ff6b bl 8012d84 + 8006eae: f06f 0305 mvn.w r3, #5 + 8006eb2: e0e2 b.n 800707a + remaining_length = (u16_t)len; + 8006eb4: 697b ldr r3, [r7, #20] + 8006eb6: 83bb strh r3, [r7, #28] + } + + /* Don't complicate things, always connect using clean session */ + flags |= MQTT_CONNECT_FLAG_CLEAN_SESSION; + 8006eb8: 7efb ldrb r3, [r7, #27] + 8006eba: f043 0302 orr.w r3, r3, #2 + 8006ebe: 76fb strb r3, [r7, #27] + + len = strlen(client_info->client_id); + 8006ec0: 6afb ldr r3, [r7, #44] ; 0x2c + 8006ec2: 681b ldr r3, [r3, #0] + 8006ec4: 4618 mov r0, r3 + 8006ec6: f7f9 f987 bl 80001d8 + 8006eca: 6178 str r0, [r7, #20] + LWIP_ERROR("mqtt_client_connect: client_info->client_id length overflow", len <= 0xFFFF, return ERR_VAL); + 8006ecc: 697b ldr r3, [r7, #20] + 8006ece: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8006ed2: d309 bcc.n 8006ee8 + 8006ed4: 4b1c ldr r3, [pc, #112] ; (8006f48 ) + 8006ed6: f240 42e3 movw r2, #1251 ; 0x4e3 + 8006eda: 4925 ldr r1, [pc, #148] ; (8006f70 ) + 8006edc: 481c ldr r0, [pc, #112] ; (8006f50 ) + 8006ede: f00b ff51 bl 8012d84 + 8006ee2: f06f 0305 mvn.w r3, #5 + 8006ee6: e0c8 b.n 800707a + client_id_length = (u16_t)len; + 8006ee8: 697b ldr r3, [r7, #20] + 8006eea: 827b strh r3, [r7, #18] + len = remaining_length + 2 + client_id_length; + 8006eec: 8bbb ldrh r3, [r7, #28] + 8006eee: 1c9a adds r2, r3, #2 + 8006ef0: 8a7b ldrh r3, [r7, #18] + 8006ef2: 4413 add r3, r2 + 8006ef4: 617b str r3, [r7, #20] + LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); + 8006ef6: 697b ldr r3, [r7, #20] + 8006ef8: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8006efc: d309 bcc.n 8006f12 + 8006efe: 4b12 ldr r3, [pc, #72] ; (8006f48 ) + 8006f00: f240 42e6 movw r2, #1254 ; 0x4e6 + 8006f04: 4919 ldr r1, [pc, #100] ; (8006f6c ) + 8006f06: 4812 ldr r0, [pc, #72] ; (8006f50 ) + 8006f08: f00b ff3c bl 8012d84 + 8006f0c: f06f 0305 mvn.w r3, #5 + 8006f10: e0b3 b.n 800707a + remaining_length = (u16_t)len; + 8006f12: 697b ldr r3, [r7, #20] + 8006f14: 83bb strh r3, [r7, #28] + + if (mqtt_output_check_space(&client->output, remaining_length) == 0) { + 8006f16: 68fb ldr r3, [r7, #12] + 8006f18: 33ec adds r3, #236 ; 0xec + 8006f1a: 8bba ldrh r2, [r7, #28] + 8006f1c: 4611 mov r1, r2 + 8006f1e: 4618 mov r0, r3 + 8006f20: f7ff f884 bl 800602c + 8006f24: 4603 mov r3, r0 + 8006f26: 2b00 cmp r3, #0 + 8006f28: d102 bne.n 8006f30 + return ERR_MEM; + 8006f2a: f04f 33ff mov.w r3, #4294967295 + 8006f2e: e0a4 b.n 800707a + } + + client->conn = tcp_new(); + 8006f30: f002 ff26 bl 8009d80 + 8006f34: 4602 mov r2, r0 + 8006f36: 68fb ldr r3, [r7, #12] + 8006f38: 60da str r2, [r3, #12] + if (client->conn == NULL) { + 8006f3a: 68fb ldr r3, [r7, #12] + 8006f3c: 68db ldr r3, [r3, #12] + 8006f3e: 2b00 cmp r3, #0 + 8006f40: d118 bne.n 8006f74 + return ERR_MEM; + 8006f42: f04f 33ff mov.w r3, #4294967295 + 8006f46: e098 b.n 800707a + 8006f48: 08013ea0 .word 0x08013ea0 + 8006f4c: 08014274 .word 0x08014274 + 8006f50: 08013ef8 .word 0x08013ef8 + 8006f54: 08014298 .word 0x08014298 + 8006f58: 080142c0 .word 0x080142c0 + 8006f5c: 080142ec .word 0x080142ec + 8006f60: 08014320 .word 0x08014320 + 8006f64: 08014360 .word 0x08014360 + 8006f68: 080143a0 .word 0x080143a0 + 8006f6c: 080143dc .word 0x080143dc + 8006f70: 0801440c .word 0x0801440c + } + + /* Set arg pointer for callbacks */ + tcp_arg(client->conn, client); + 8006f74: 68fb ldr r3, [r7, #12] + 8006f76: 68db ldr r3, [r3, #12] + 8006f78: 68f9 ldr r1, [r7, #12] + 8006f7a: 4618 mov r0, r3 + 8006f7c: f002 ff08 bl 8009d90 + /* Any local address, pick random local port number */ + err = tcp_bind(client->conn, IP_ADDR_ANY, 0); + 8006f80: 68fb ldr r3, [r7, #12] + 8006f82: 68db ldr r3, [r3, #12] + 8006f84: 2200 movs r2, #0 + 8006f86: 493f ldr r1, [pc, #252] ; (8007084 ) + 8006f88: 4618 mov r0, r3 + 8006f8a: f001 ff4f bl 8008e2c + 8006f8e: 4603 mov r3, r0 + 8006f90: 77fb strb r3, [r7, #31] + if (err != ERR_OK) { + 8006f92: f997 301f ldrsb.w r3, [r7, #31] + 8006f96: 2b00 cmp r3, #0 + 8006f98: d162 bne.n 8007060 + goto tcp_fail; + } + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Connecting to host: %s at port:%"U16_F"\n", ipaddr_ntoa(ip_addr), port)); + + /* Connect to server */ + err = tcp_connect(client->conn, ip_addr, port, mqtt_tcp_connect_cb); + 8006f9a: 68fb ldr r3, [r7, #12] + 8006f9c: 68d8 ldr r0, [r3, #12] + 8006f9e: 88fa ldrh r2, [r7, #6] + 8006fa0: 4b39 ldr r3, [pc, #228] ; (8007088 ) + 8006fa2: 68b9 ldr r1, [r7, #8] + 8006fa4: f002 f8c0 bl 8009128 + 8006fa8: 4603 mov r3, r0 + 8006faa: 77fb strb r3, [r7, #31] + if (err != ERR_OK) { + 8006fac: f997 301f ldrsb.w r3, [r7, #31] + 8006fb0: 2b00 cmp r3, #0 + 8006fb2: d157 bne.n 8007064 + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Error connecting to remote ip/port, %d\n", err)); + goto tcp_fail; + } + /* Set error callback */ + tcp_err(client->conn, mqtt_tcp_err_cb); + 8006fb4: 68fb ldr r3, [r7, #12] + 8006fb6: 68db ldr r3, [r3, #12] + 8006fb8: 4934 ldr r1, [pc, #208] ; (800708c ) + 8006fba: 4618 mov r0, r3 + 8006fbc: f002 ff3a bl 8009e34 + client->conn_state = TCP_CONNECTING; + 8006fc0: 68fb ldr r3, [r7, #12] + 8006fc2: 2201 movs r2, #1 + 8006fc4: 729a strb r2, [r3, #10] + + /* Append fixed header */ + mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_CONNECT, 0, 0, 0, remaining_length); + 8006fc6: 68fb ldr r3, [r7, #12] + 8006fc8: f103 00ec add.w r0, r3, #236 ; 0xec + 8006fcc: 8bbb ldrh r3, [r7, #28] + 8006fce: 9301 str r3, [sp, #4] + 8006fd0: 2300 movs r3, #0 + 8006fd2: 9300 str r3, [sp, #0] + 8006fd4: 2300 movs r3, #0 + 8006fd6: 2200 movs r2, #0 + 8006fd8: 2101 movs r1, #1 + 8006fda: f7fe ffdc bl 8005f96 + /* Append Protocol string */ + mqtt_output_append_string(&client->output, "MQTT", 4); + 8006fde: 68fb ldr r3, [r7, #12] + 8006fe0: 33ec adds r3, #236 ; 0xec + 8006fe2: 2204 movs r2, #4 + 8006fe4: 492a ldr r1, [pc, #168] ; (8007090 ) + 8006fe6: 4618 mov r0, r3 + 8006fe8: f7fe ff93 bl 8005f12 + /* Append Protocol level */ + mqtt_output_append_u8(&client->output, 4); + 8006fec: 68fb ldr r3, [r7, #12] + 8006fee: 33ec adds r3, #236 ; 0xec + 8006ff0: 2104 movs r1, #4 + 8006ff2: 4618 mov r0, r3 + 8006ff4: f7fe ff2a bl 8005e4c + /* Append connect flags */ + mqtt_output_append_u8(&client->output, flags); + 8006ff8: 68fb ldr r3, [r7, #12] + 8006ffa: 33ec adds r3, #236 ; 0xec + 8006ffc: 7efa ldrb r2, [r7, #27] + 8006ffe: 4611 mov r1, r2 + 8007000: 4618 mov r0, r3 + 8007002: f7fe ff23 bl 8005e4c + /* Append keep-alive */ + mqtt_output_append_u16(&client->output, client_info->keep_alive); + 8007006: 68fb ldr r3, [r7, #12] + 8007008: f103 02ec add.w r2, r3, #236 ; 0xec + 800700c: 6afb ldr r3, [r7, #44] ; 0x2c + 800700e: 899b ldrh r3, [r3, #12] + 8007010: 4619 mov r1, r3 + 8007012: 4610 mov r0, r2 + 8007014: f7fe ff30 bl 8005e78 + /* Append client id */ + mqtt_output_append_string(&client->output, client_info->client_id, client_id_length); + 8007018: 68fb ldr r3, [r7, #12] + 800701a: f103 00ec add.w r0, r3, #236 ; 0xec + 800701e: 6afb ldr r3, [r7, #44] ; 0x2c + 8007020: 681b ldr r3, [r3, #0] + 8007022: 8a7a ldrh r2, [r7, #18] + 8007024: 4619 mov r1, r3 + 8007026: f7fe ff74 bl 8005f12 + /* Append will message if used */ + if ((flags & MQTT_CONNECT_FLAG_WILL) != 0) { + 800702a: 7efb ldrb r3, [r7, #27] + 800702c: f003 0304 and.w r3, r3, #4 + 8007030: 2b00 cmp r3, #0 + 8007032: d013 beq.n 800705c + mqtt_output_append_string(&client->output, client_info->will_topic, will_topic_len); + 8007034: 68fb ldr r3, [r7, #12] + 8007036: f103 00ec add.w r0, r3, #236 ; 0xec + 800703a: 6afb ldr r3, [r7, #44] ; 0x2c + 800703c: 691b ldr r3, [r3, #16] + 800703e: 7eba ldrb r2, [r7, #26] + 8007040: b292 uxth r2, r2 + 8007042: 4619 mov r1, r3 + 8007044: f7fe ff65 bl 8005f12 + mqtt_output_append_string(&client->output, client_info->will_msg, will_msg_len); + 8007048: 68fb ldr r3, [r7, #12] + 800704a: f103 00ec add.w r0, r3, #236 ; 0xec + 800704e: 6afb ldr r3, [r7, #44] ; 0x2c + 8007050: 695b ldr r3, [r3, #20] + 8007052: 7e7a ldrb r2, [r7, #25] + 8007054: b292 uxth r2, r2 + 8007056: 4619 mov r1, r3 + 8007058: f7fe ff5b bl 8005f12 + } + return ERR_OK; + 800705c: 2300 movs r3, #0 + 800705e: e00c b.n 800707a + goto tcp_fail; + 8007060: bf00 nop + 8007062: e000 b.n 8007066 + goto tcp_fail; + 8007064: bf00 nop + +tcp_fail: + tcp_abort(client->conn); + 8007066: 68fb ldr r3, [r7, #12] + 8007068: 68db ldr r3, [r3, #12] + 800706a: 4618 mov r0, r3 + 800706c: f001 fed2 bl 8008e14 + client->conn = NULL; + 8007070: 68fb ldr r3, [r7, #12] + 8007072: 2200 movs r2, #0 + 8007074: 60da str r2, [r3, #12] + return err; + 8007076: f997 301f ldrsb.w r3, [r7, #31] +} + 800707a: 4618 mov r0, r3 + 800707c: 3720 adds r7, #32 + 800707e: 46bd mov sp, r7 + 8007080: bd80 pop {r7, pc} + 8007082: bf00 nop + 8007084: 08016768 .word 0x08016768 + 8007088: 08006919 .word 0x08006919 + 800708c: 080068a5 .word 0x080068a5 + 8007090: 08014448 .word 0x08014448 + +08007094 : + * @param client MQTT client + * @return 1 if connected to server, 0 otherwise + */ +u8_t +mqtt_client_is_connected(mqtt_client_t *client) +{ + 8007094: b580 push {r7, lr} + 8007096: b082 sub sp, #8 + 8007098: af00 add r7, sp, #0 + 800709a: 6078 str r0, [r7, #4] + LWIP_ASSERT("mqtt_client_is_connected: client != NULL", client); + 800709c: 687b ldr r3, [r7, #4] + 800709e: 2b00 cmp r3, #0 + 80070a0: d106 bne.n 80070b0 + 80070a2: 4b09 ldr r3, [pc, #36] ; (80070c8 ) + 80070a4: f240 523a movw r2, #1338 ; 0x53a + 80070a8: 4908 ldr r1, [pc, #32] ; (80070cc ) + 80070aa: 4809 ldr r0, [pc, #36] ; (80070d0 ) + 80070ac: f00b fe6a bl 8012d84 + return client->conn_state == MQTT_CONNECTED; + 80070b0: 687b ldr r3, [r7, #4] + 80070b2: 7a9b ldrb r3, [r3, #10] + 80070b4: 2b03 cmp r3, #3 + 80070b6: bf0c ite eq + 80070b8: 2301 moveq r3, #1 + 80070ba: 2300 movne r3, #0 + 80070bc: b2db uxtb r3, r3 +} + 80070be: 4618 mov r0, r3 + 80070c0: 3708 adds r7, #8 + 80070c2: 46bd mov sp, r7 + 80070c4: bd80 pop {r7, pc} + 80070c6: bf00 nop + 80070c8: 08013ea0 .word 0x08013ea0 + 80070cc: 08014470 .word 0x08014470 + 80070d0: 08013ef8 .word 0x08013ef8 + +080070d4 : + * @param n u16_t in host byte order + * @return n in network byte order + */ +u16_t +lwip_htons(u16_t n) +{ + 80070d4: b480 push {r7} + 80070d6: b083 sub sp, #12 + 80070d8: af00 add r7, sp, #0 + 80070da: 4603 mov r3, r0 + 80070dc: 80fb strh r3, [r7, #6] + return (u16_t)PP_HTONS(n); + 80070de: 88fb ldrh r3, [r7, #6] + 80070e0: ba5b rev16 r3, r3 + 80070e2: b29b uxth r3, r3 +} + 80070e4: 4618 mov r0, r3 + 80070e6: 370c adds r7, #12 + 80070e8: 46bd mov sp, r7 + 80070ea: bc80 pop {r7} + 80070ec: 4770 bx lr + +080070ee : + * @param n u32_t in host byte order + * @return n in network byte order + */ +u32_t +lwip_htonl(u32_t n) +{ + 80070ee: b480 push {r7} + 80070f0: b083 sub sp, #12 + 80070f2: af00 add r7, sp, #0 + 80070f4: 6078 str r0, [r7, #4] + return (u32_t)PP_HTONL(n); + 80070f6: 687b ldr r3, [r7, #4] + 80070f8: 061a lsls r2, r3, #24 + 80070fa: 687b ldr r3, [r7, #4] + 80070fc: 021b lsls r3, r3, #8 + 80070fe: f403 037f and.w r3, r3, #16711680 ; 0xff0000 + 8007102: 431a orrs r2, r3 + 8007104: 687b ldr r3, [r7, #4] + 8007106: 0a1b lsrs r3, r3, #8 + 8007108: f403 437f and.w r3, r3, #65280 ; 0xff00 + 800710c: 431a orrs r2, r3 + 800710e: 687b ldr r3, [r7, #4] + 8007110: 0e1b lsrs r3, r3, #24 + 8007112: 4313 orrs r3, r2 +} + 8007114: 4618 mov r0, r3 + 8007116: 370c adds r7, #12 + 8007118: 46bd mov sp, r7 + 800711a: bc80 pop {r7} + 800711c: 4770 bx lr + +0800711e : + * Initialize all modules. + * Use this in NO_SYS mode. Use tcpip_init() otherwise. + */ +void +lwip_init(void) +{ + 800711e: b580 push {r7, lr} + 8007120: b082 sub sp, #8 + 8007122: af00 add r7, sp, #0 +#ifndef LWIP_SKIP_CONST_CHECK + int a = 0; + 8007124: 2300 movs r3, #0 + 8007126: 607b str r3, [r7, #4] + /* Modules initialization */ + stats_init(); +#if !NO_SYS + sys_init(); +#endif /* !NO_SYS */ + mem_init(); + 8007128: f000 f8a6 bl 8007278 + memp_init(); + 800712c: f000 fb36 bl 800779c + pbuf_init(); + netif_init(); + 8007130: f000 fbee bl 8007910 +#endif /* LWIP_IPV4 */ +#if LWIP_RAW + raw_init(); +#endif /* LWIP_RAW */ +#if LWIP_UDP + udp_init(); + 8007134: f006 ff66 bl 800e004 +#endif /* LWIP_UDP */ +#if LWIP_TCP + tcp_init(); + 8007138: f001 fbdd bl 80088f6 +#if PPP_SUPPORT + ppp_init(); +#endif + +#if LWIP_TIMERS + sys_timeouts_init(); + 800713c: f006 fdfe bl 800dd3c +#endif /* LWIP_TIMERS */ +} + 8007140: bf00 nop + 8007142: 3708 adds r7, #8 + 8007144: 46bd mov sp, r7 + 8007146: bd80 pop {r7, pc} + +08007148 : + * This assumes access to the heap is protected by the calling function + * already. + */ +static void +plug_holes(struct mem *mem) +{ + 8007148: b580 push {r7, lr} + 800714a: b084 sub sp, #16 + 800714c: af00 add r7, sp, #0 + 800714e: 6078 str r0, [r7, #4] + struct mem *nmem; + struct mem *pmem; + + LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); + 8007150: 4b40 ldr r3, [pc, #256] ; (8007254 ) + 8007152: 681b ldr r3, [r3, #0] + 8007154: 687a ldr r2, [r7, #4] + 8007156: 429a cmp r2, r3 + 8007158: d206 bcs.n 8007168 + 800715a: 4b3f ldr r3, [pc, #252] ; (8007258 ) + 800715c: f240 125d movw r2, #349 ; 0x15d + 8007160: 493e ldr r1, [pc, #248] ; (800725c ) + 8007162: 483f ldr r0, [pc, #252] ; (8007260 ) + 8007164: f00b fe0e bl 8012d84 + LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); + 8007168: 4b3e ldr r3, [pc, #248] ; (8007264 ) + 800716a: 681b ldr r3, [r3, #0] + 800716c: 687a ldr r2, [r7, #4] + 800716e: 429a cmp r2, r3 + 8007170: d306 bcc.n 8007180 + 8007172: 4b39 ldr r3, [pc, #228] ; (8007258 ) + 8007174: f44f 72af mov.w r2, #350 ; 0x15e + 8007178: 493b ldr r1, [pc, #236] ; (8007268 ) + 800717a: 4839 ldr r0, [pc, #228] ; (8007260 ) + 800717c: f00b fe02 bl 8012d84 + LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); + 8007180: 687b ldr r3, [r7, #4] + 8007182: 791b ldrb r3, [r3, #4] + 8007184: 2b00 cmp r3, #0 + 8007186: d006 beq.n 8007196 + 8007188: 4b33 ldr r3, [pc, #204] ; (8007258 ) + 800718a: f240 125f movw r2, #351 ; 0x15f + 800718e: 4937 ldr r1, [pc, #220] ; (800726c ) + 8007190: 4833 ldr r0, [pc, #204] ; (8007260 ) + 8007192: f00b fdf7 bl 8012d84 + + /* plug hole forward */ + LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); + 8007196: 687b ldr r3, [r7, #4] + 8007198: 881b ldrh r3, [r3, #0] + 800719a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 + 800719e: d906 bls.n 80071ae + 80071a0: 4b2d ldr r3, [pc, #180] ; (8007258 ) + 80071a2: f44f 72b1 mov.w r2, #354 ; 0x162 + 80071a6: 4932 ldr r1, [pc, #200] ; (8007270 ) + 80071a8: 482d ldr r0, [pc, #180] ; (8007260 ) + 80071aa: f00b fdeb bl 8012d84 + + nmem = (struct mem *)(void *)&ram[mem->next]; + 80071ae: 4b29 ldr r3, [pc, #164] ; (8007254 ) + 80071b0: 681b ldr r3, [r3, #0] + 80071b2: 687a ldr r2, [r7, #4] + 80071b4: 8812 ldrh r2, [r2, #0] + 80071b6: 4413 add r3, r2 + 80071b8: 60fb str r3, [r7, #12] + if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { + 80071ba: 687a ldr r2, [r7, #4] + 80071bc: 68fb ldr r3, [r7, #12] + 80071be: 429a cmp r2, r3 + 80071c0: d01f beq.n 8007202 + 80071c2: 68fb ldr r3, [r7, #12] + 80071c4: 791b ldrb r3, [r3, #4] + 80071c6: 2b00 cmp r3, #0 + 80071c8: d11b bne.n 8007202 + 80071ca: 4b26 ldr r3, [pc, #152] ; (8007264 ) + 80071cc: 681b ldr r3, [r3, #0] + 80071ce: 68fa ldr r2, [r7, #12] + 80071d0: 429a cmp r2, r3 + 80071d2: d016 beq.n 8007202 + /* if mem->next is unused and not end of ram, combine mem and mem->next */ + if (lfree == nmem) { + 80071d4: 4b27 ldr r3, [pc, #156] ; (8007274 ) + 80071d6: 681b ldr r3, [r3, #0] + 80071d8: 68fa ldr r2, [r7, #12] + 80071da: 429a cmp r2, r3 + 80071dc: d102 bne.n 80071e4 + lfree = mem; + 80071de: 4a25 ldr r2, [pc, #148] ; (8007274 ) + 80071e0: 687b ldr r3, [r7, #4] + 80071e2: 6013 str r3, [r2, #0] + } + mem->next = nmem->next; + 80071e4: 68fb ldr r3, [r7, #12] + 80071e6: 881a ldrh r2, [r3, #0] + 80071e8: 687b ldr r3, [r7, #4] + 80071ea: 801a strh r2, [r3, #0] + ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); + 80071ec: 4b19 ldr r3, [pc, #100] ; (8007254 ) + 80071ee: 681b ldr r3, [r3, #0] + 80071f0: 687a ldr r2, [r7, #4] + 80071f2: 1ad1 subs r1, r2, r3 + 80071f4: 4b17 ldr r3, [pc, #92] ; (8007254 ) + 80071f6: 681b ldr r3, [r3, #0] + 80071f8: 68fa ldr r2, [r7, #12] + 80071fa: 8812 ldrh r2, [r2, #0] + 80071fc: 4413 add r3, r2 + 80071fe: b28a uxth r2, r1 + 8007200: 805a strh r2, [r3, #2] + } + + /* plug hole backward */ + pmem = (struct mem *)(void *)&ram[mem->prev]; + 8007202: 4b14 ldr r3, [pc, #80] ; (8007254 ) + 8007204: 681b ldr r3, [r3, #0] + 8007206: 687a ldr r2, [r7, #4] + 8007208: 8852 ldrh r2, [r2, #2] + 800720a: 4413 add r3, r2 + 800720c: 60bb str r3, [r7, #8] + if (pmem != mem && pmem->used == 0) { + 800720e: 68ba ldr r2, [r7, #8] + 8007210: 687b ldr r3, [r7, #4] + 8007212: 429a cmp r2, r3 + 8007214: d01a beq.n 800724c + 8007216: 68bb ldr r3, [r7, #8] + 8007218: 791b ldrb r3, [r3, #4] + 800721a: 2b00 cmp r3, #0 + 800721c: d116 bne.n 800724c + /* if mem->prev is unused, combine mem and mem->prev */ + if (lfree == mem) { + 800721e: 4b15 ldr r3, [pc, #84] ; (8007274 ) + 8007220: 681b ldr r3, [r3, #0] + 8007222: 687a ldr r2, [r7, #4] + 8007224: 429a cmp r2, r3 + 8007226: d102 bne.n 800722e + lfree = pmem; + 8007228: 4a12 ldr r2, [pc, #72] ; (8007274 ) + 800722a: 68bb ldr r3, [r7, #8] + 800722c: 6013 str r3, [r2, #0] + } + pmem->next = mem->next; + 800722e: 687b ldr r3, [r7, #4] + 8007230: 881a ldrh r2, [r3, #0] + 8007232: 68bb ldr r3, [r7, #8] + 8007234: 801a strh r2, [r3, #0] + ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); + 8007236: 4b07 ldr r3, [pc, #28] ; (8007254 ) + 8007238: 681b ldr r3, [r3, #0] + 800723a: 68ba ldr r2, [r7, #8] + 800723c: 1ad1 subs r1, r2, r3 + 800723e: 4b05 ldr r3, [pc, #20] ; (8007254 ) + 8007240: 681b ldr r3, [r3, #0] + 8007242: 687a ldr r2, [r7, #4] + 8007244: 8812 ldrh r2, [r2, #0] + 8007246: 4413 add r3, r2 + 8007248: b28a uxth r2, r1 + 800724a: 805a strh r2, [r3, #2] + } +} + 800724c: bf00 nop + 800724e: 3710 adds r7, #16 + 8007250: 46bd mov sp, r7 + 8007252: bd80 pop {r7, pc} + 8007254: 20004058 .word 0x20004058 + 8007258: 0801449c .word 0x0801449c + 800725c: 080144cc .word 0x080144cc + 8007260: 080144e4 .word 0x080144e4 + 8007264: 2000405c .word 0x2000405c + 8007268: 0801450c .word 0x0801450c + 800726c: 08014528 .word 0x08014528 + 8007270: 08014544 .word 0x08014544 + 8007274: 20004060 .word 0x20004060 + +08007278 : +/** + * Zero the heap and initialize start, end and lowest-free + */ +void +mem_init(void) +{ + 8007278: b480 push {r7} + 800727a: b083 sub sp, #12 + 800727c: af00 add r7, sp, #0 + + LWIP_ASSERT("Sanity check alignment", + (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); + + /* align the heap */ + ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); + 800727e: 4b18 ldr r3, [pc, #96] ; (80072e0 ) + 8007280: 3303 adds r3, #3 + 8007282: f023 0303 bic.w r3, r3, #3 + 8007286: 461a mov r2, r3 + 8007288: 4b16 ldr r3, [pc, #88] ; (80072e4 ) + 800728a: 601a str r2, [r3, #0] + /* initialize the start of the heap */ + mem = (struct mem *)(void *)ram; + 800728c: 4b15 ldr r3, [pc, #84] ; (80072e4 ) + 800728e: 681b ldr r3, [r3, #0] + 8007290: 607b str r3, [r7, #4] + mem->next = MEM_SIZE_ALIGNED; + 8007292: 687b ldr r3, [r7, #4] + 8007294: f44f 62c8 mov.w r2, #1600 ; 0x640 + 8007298: 801a strh r2, [r3, #0] + mem->prev = 0; + 800729a: 687b ldr r3, [r7, #4] + 800729c: 2200 movs r2, #0 + 800729e: 805a strh r2, [r3, #2] + mem->used = 0; + 80072a0: 687b ldr r3, [r7, #4] + 80072a2: 2200 movs r2, #0 + 80072a4: 711a strb r2, [r3, #4] + /* initialize the end of the heap */ + ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; + 80072a6: 4b0f ldr r3, [pc, #60] ; (80072e4 ) + 80072a8: 681b ldr r3, [r3, #0] + 80072aa: f503 63c8 add.w r3, r3, #1600 ; 0x640 + 80072ae: 4a0e ldr r2, [pc, #56] ; (80072e8 ) + 80072b0: 6013 str r3, [r2, #0] + ram_end->used = 1; + 80072b2: 4b0d ldr r3, [pc, #52] ; (80072e8 ) + 80072b4: 681b ldr r3, [r3, #0] + 80072b6: 2201 movs r2, #1 + 80072b8: 711a strb r2, [r3, #4] + ram_end->next = MEM_SIZE_ALIGNED; + 80072ba: 4b0b ldr r3, [pc, #44] ; (80072e8 ) + 80072bc: 681b ldr r3, [r3, #0] + 80072be: f44f 62c8 mov.w r2, #1600 ; 0x640 + 80072c2: 801a strh r2, [r3, #0] + ram_end->prev = MEM_SIZE_ALIGNED; + 80072c4: 4b08 ldr r3, [pc, #32] ; (80072e8 ) + 80072c6: 681b ldr r3, [r3, #0] + 80072c8: f44f 62c8 mov.w r2, #1600 ; 0x640 + 80072cc: 805a strh r2, [r3, #2] + + /* initialize the lowest-free pointer to the start of the heap */ + lfree = (struct mem *)(void *)ram; + 80072ce: 4b05 ldr r3, [pc, #20] ; (80072e4 ) + 80072d0: 681b ldr r3, [r3, #0] + 80072d2: 4a06 ldr r2, [pc, #24] ; (80072ec ) + 80072d4: 6013 str r3, [r2, #0] + MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); + + if (sys_mutex_new(&mem_mutex) != ERR_OK) { + LWIP_ASSERT("failed to create mem_mutex", 0); + } +} + 80072d6: bf00 nop + 80072d8: 370c adds r7, #12 + 80072da: 46bd mov sp, r7 + 80072dc: bc80 pop {r7} + 80072de: 4770 bx lr + 80072e0: 20003a04 .word 0x20003a04 + 80072e4: 20004058 .word 0x20004058 + 80072e8: 2000405c .word 0x2000405c + 80072ec: 20004060 .word 0x20004060 + +080072f0 : + * @param rmem is the data portion of a struct mem as returned by a previous + * call to mem_malloc() + */ +void +mem_free(void *rmem) +{ + 80072f0: b580 push {r7, lr} + 80072f2: b084 sub sp, #16 + 80072f4: af00 add r7, sp, #0 + 80072f6: 6078 str r0, [r7, #4] + struct mem *mem; + LWIP_MEM_FREE_DECL_PROTECT(); + + if (rmem == NULL) { + 80072f8: 687b ldr r3, [r7, #4] + 80072fa: 2b00 cmp r3, #0 + 80072fc: d043 beq.n 8007386 + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n")); + return; + } + LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0); + 80072fe: 687b ldr r3, [r7, #4] + 8007300: f003 0303 and.w r3, r3, #3 + 8007304: 2b00 cmp r3, #0 + 8007306: d006 beq.n 8007316 + 8007308: 4b22 ldr r3, [pc, #136] ; (8007394 ) + 800730a: f44f 72d6 mov.w r2, #428 ; 0x1ac + 800730e: 4922 ldr r1, [pc, #136] ; (8007398 ) + 8007310: 4822 ldr r0, [pc, #136] ; (800739c ) + 8007312: f00b fd37 bl 8012d84 + + LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram && + 8007316: 4b22 ldr r3, [pc, #136] ; (80073a0 ) + 8007318: 681b ldr r3, [r3, #0] + 800731a: 687a ldr r2, [r7, #4] + 800731c: 429a cmp r2, r3 + 800731e: d304 bcc.n 800732a + 8007320: 4b20 ldr r3, [pc, #128] ; (80073a4 ) + 8007322: 681b ldr r3, [r3, #0] + 8007324: 687a ldr r2, [r7, #4] + 8007326: 429a cmp r2, r3 + 8007328: d306 bcc.n 8007338 + 800732a: 4b1a ldr r3, [pc, #104] ; (8007394 ) + 800732c: f44f 72d7 mov.w r2, #430 ; 0x1ae + 8007330: 491d ldr r1, [pc, #116] ; (80073a8 ) + 8007332: 481a ldr r0, [pc, #104] ; (800739c ) + 8007334: f00b fd26 bl 8012d84 + (u8_t *)rmem < (u8_t *)ram_end); + + if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { + 8007338: 4b19 ldr r3, [pc, #100] ; (80073a0 ) + 800733a: 681b ldr r3, [r3, #0] + 800733c: 687a ldr r2, [r7, #4] + 800733e: 429a cmp r2, r3 + 8007340: d323 bcc.n 800738a + 8007342: 4b18 ldr r3, [pc, #96] ; (80073a4 ) + 8007344: 681b ldr r3, [r3, #0] + 8007346: 687a ldr r2, [r7, #4] + 8007348: 429a cmp r2, r3 + 800734a: d21e bcs.n 800738a + } + /* protect the heap from concurrent access */ + LWIP_MEM_FREE_PROTECT(); + /* Get the corresponding struct mem ... */ + /* cast through void* to get rid of alignment warnings */ + mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); + 800734c: 687b ldr r3, [r7, #4] + 800734e: 3b08 subs r3, #8 + 8007350: 60fb str r3, [r7, #12] + /* ... which has to be in a used state ... */ + LWIP_ASSERT("mem_free: mem->used", mem->used); + 8007352: 68fb ldr r3, [r7, #12] + 8007354: 791b ldrb r3, [r3, #4] + 8007356: 2b00 cmp r3, #0 + 8007358: d106 bne.n 8007368 + 800735a: 4b0e ldr r3, [pc, #56] ; (8007394 ) + 800735c: f44f 72e0 mov.w r2, #448 ; 0x1c0 + 8007360: 4912 ldr r1, [pc, #72] ; (80073ac ) + 8007362: 480e ldr r0, [pc, #56] ; (800739c ) + 8007364: f00b fd0e bl 8012d84 + /* ... and is now unused. */ + mem->used = 0; + 8007368: 68fb ldr r3, [r7, #12] + 800736a: 2200 movs r2, #0 + 800736c: 711a strb r2, [r3, #4] + + if (mem < lfree) { + 800736e: 4b10 ldr r3, [pc, #64] ; (80073b0 ) + 8007370: 681b ldr r3, [r3, #0] + 8007372: 68fa ldr r2, [r7, #12] + 8007374: 429a cmp r2, r3 + 8007376: d202 bcs.n 800737e + /* the newly freed struct is now the lowest */ + lfree = mem; + 8007378: 4a0d ldr r2, [pc, #52] ; (80073b0 ) + 800737a: 68fb ldr r3, [r7, #12] + 800737c: 6013 str r3, [r2, #0] + } + + MEM_STATS_DEC_USED(used, mem->next - (mem_size_t)(((u8_t *)mem - ram))); + + /* finally, see if prev or next are free also */ + plug_holes(mem); + 800737e: 68f8 ldr r0, [r7, #12] + 8007380: f7ff fee2 bl 8007148 + 8007384: e002 b.n 800738c + return; + 8007386: bf00 nop + 8007388: e000 b.n 800738c + return; + 800738a: bf00 nop +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + mem_free_count = 1; +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + LWIP_MEM_FREE_UNPROTECT(); +} + 800738c: 3710 adds r7, #16 + 800738e: 46bd mov sp, r7 + 8007390: bd80 pop {r7, pc} + 8007392: bf00 nop + 8007394: 0801449c .word 0x0801449c + 8007398: 08014570 .word 0x08014570 + 800739c: 080144e4 .word 0x080144e4 + 80073a0: 20004058 .word 0x20004058 + 80073a4: 2000405c .word 0x2000405c + 80073a8: 08014594 .word 0x08014594 + 80073ac: 080145ac .word 0x080145ac + 80073b0: 20004060 .word 0x20004060 + +080073b4 : + * or NULL if newsize is > old size, in which case rmem is NOT touched + * or freed! + */ +void * +mem_trim(void *rmem, mem_size_t newsize) +{ + 80073b4: b580 push {r7, lr} + 80073b6: b086 sub sp, #24 + 80073b8: af00 add r7, sp, #0 + 80073ba: 6078 str r0, [r7, #4] + 80073bc: 460b mov r3, r1 + 80073be: 807b strh r3, [r7, #2] + /* 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 = LWIP_MEM_ALIGN_SIZE(newsize); + 80073c0: 887b ldrh r3, [r7, #2] + 80073c2: 3303 adds r3, #3 + 80073c4: b29b uxth r3, r3 + 80073c6: f023 0303 bic.w r3, r3, #3 + 80073ca: 807b strh r3, [r7, #2] + + if (newsize < MIN_SIZE_ALIGNED) { + 80073cc: 887b ldrh r3, [r7, #2] + 80073ce: 2b0b cmp r3, #11 + 80073d0: d801 bhi.n 80073d6 + /* every data block must be at least MIN_SIZE_ALIGNED long */ + newsize = MIN_SIZE_ALIGNED; + 80073d2: 230c movs r3, #12 + 80073d4: 807b strh r3, [r7, #2] + } + + if (newsize > MEM_SIZE_ALIGNED) { + 80073d6: 887b ldrh r3, [r7, #2] + 80073d8: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 + 80073dc: d901 bls.n 80073e2 + return NULL; + 80073de: 2300 movs r3, #0 + 80073e0: e0b1 b.n 8007546 + } + + LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && + 80073e2: 4b5b ldr r3, [pc, #364] ; (8007550 ) + 80073e4: 681b ldr r3, [r3, #0] + 80073e6: 687a ldr r2, [r7, #4] + 80073e8: 429a cmp r2, r3 + 80073ea: d304 bcc.n 80073f6 + 80073ec: 4b59 ldr r3, [pc, #356] ; (8007554 ) + 80073ee: 681b ldr r3, [r3, #0] + 80073f0: 687a ldr r2, [r7, #4] + 80073f2: 429a cmp r2, r3 + 80073f4: d306 bcc.n 8007404 + 80073f6: 4b58 ldr r3, [pc, #352] ; (8007558 ) + 80073f8: f240 12f3 movw r2, #499 ; 0x1f3 + 80073fc: 4957 ldr r1, [pc, #348] ; (800755c ) + 80073fe: 4858 ldr r0, [pc, #352] ; (8007560 ) + 8007400: f00b fcc0 bl 8012d84 + (u8_t *)rmem < (u8_t *)ram_end); + + if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { + 8007404: 4b52 ldr r3, [pc, #328] ; (8007550 ) + 8007406: 681b ldr r3, [r3, #0] + 8007408: 687a ldr r2, [r7, #4] + 800740a: 429a cmp r2, r3 + 800740c: d304 bcc.n 8007418 + 800740e: 4b51 ldr r3, [pc, #324] ; (8007554 ) + 8007410: 681b ldr r3, [r3, #0] + 8007412: 687a ldr r2, [r7, #4] + 8007414: 429a cmp r2, r3 + 8007416: d301 bcc.n 800741c + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); + /* protect mem stats from concurrent access */ + SYS_ARCH_PROTECT(lev); + MEM_STATS_INC(illegal); + SYS_ARCH_UNPROTECT(lev); + return rmem; + 8007418: 687b ldr r3, [r7, #4] + 800741a: e094 b.n 8007546 + } + /* Get the corresponding struct mem ... */ + /* cast through void* to get rid of alignment warnings */ + mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); + 800741c: 687b ldr r3, [r7, #4] + 800741e: 3b08 subs r3, #8 + 8007420: 617b str r3, [r7, #20] + /* ... and its offset pointer */ + ptr = (mem_size_t)((u8_t *)mem - ram); + 8007422: 4b4b ldr r3, [pc, #300] ; (8007550 ) + 8007424: 681b ldr r3, [r3, #0] + 8007426: 697a ldr r2, [r7, #20] + 8007428: 1ad3 subs r3, r2, r3 + 800742a: 827b strh r3, [r7, #18] + + size = mem->next - ptr - SIZEOF_STRUCT_MEM; + 800742c: 697b ldr r3, [r7, #20] + 800742e: 881a ldrh r2, [r3, #0] + 8007430: 8a7b ldrh r3, [r7, #18] + 8007432: 1ad3 subs r3, r2, r3 + 8007434: b29b uxth r3, r3 + 8007436: 3b08 subs r3, #8 + 8007438: 823b strh r3, [r7, #16] + LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); + 800743a: 887a ldrh r2, [r7, #2] + 800743c: 8a3b ldrh r3, [r7, #16] + 800743e: 429a cmp r2, r3 + 8007440: d906 bls.n 8007450 + 8007442: 4b45 ldr r3, [pc, #276] ; (8007558 ) + 8007444: f240 2206 movw r2, #518 ; 0x206 + 8007448: 4946 ldr r1, [pc, #280] ; (8007564 ) + 800744a: 4845 ldr r0, [pc, #276] ; (8007560 ) + 800744c: f00b fc9a bl 8012d84 + if (newsize > size) { + 8007450: 887a ldrh r2, [r7, #2] + 8007452: 8a3b ldrh r3, [r7, #16] + 8007454: 429a cmp r2, r3 + 8007456: d901 bls.n 800745c + /* not supported */ + return NULL; + 8007458: 2300 movs r3, #0 + 800745a: e074 b.n 8007546 + } + if (newsize == size) { + 800745c: 887a ldrh r2, [r7, #2] + 800745e: 8a3b ldrh r3, [r7, #16] + 8007460: 429a cmp r2, r3 + 8007462: d101 bne.n 8007468 + /* No change in size, simply return */ + return rmem; + 8007464: 687b ldr r3, [r7, #4] + 8007466: e06e b.n 8007546 + } + + /* protect the heap from concurrent access */ + LWIP_MEM_FREE_PROTECT(); + + mem2 = (struct mem *)(void *)&ram[mem->next]; + 8007468: 4b39 ldr r3, [pc, #228] ; (8007550 ) + 800746a: 681b ldr r3, [r3, #0] + 800746c: 697a ldr r2, [r7, #20] + 800746e: 8812 ldrh r2, [r2, #0] + 8007470: 4413 add r3, r2 + 8007472: 60fb str r3, [r7, #12] + if (mem2->used == 0) { + 8007474: 68fb ldr r3, [r7, #12] + 8007476: 791b ldrb r3, [r3, #4] + 8007478: 2b00 cmp r3, #0 + 800747a: d131 bne.n 80074e0 + /* The next struct is unused, we can simply move it at little */ + mem_size_t next; + /* remember the old next pointer */ + next = mem2->next; + 800747c: 68fb ldr r3, [r7, #12] + 800747e: 881b ldrh r3, [r3, #0] + 8007480: 813b strh r3, [r7, #8] + /* create new struct mem which is moved directly after the shrinked mem */ + ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; + 8007482: 8a7a ldrh r2, [r7, #18] + 8007484: 887b ldrh r3, [r7, #2] + 8007486: 4413 add r3, r2 + 8007488: b29b uxth r3, r3 + 800748a: 3308 adds r3, #8 + 800748c: 817b strh r3, [r7, #10] + if (lfree == mem2) { + 800748e: 4b36 ldr r3, [pc, #216] ; (8007568 ) + 8007490: 681b ldr r3, [r3, #0] + 8007492: 68fa ldr r2, [r7, #12] + 8007494: 429a cmp r2, r3 + 8007496: d105 bne.n 80074a4 + lfree = (struct mem *)(void *)&ram[ptr2]; + 8007498: 4b2d ldr r3, [pc, #180] ; (8007550 ) + 800749a: 681a ldr r2, [r3, #0] + 800749c: 897b ldrh r3, [r7, #10] + 800749e: 4413 add r3, r2 + 80074a0: 4a31 ldr r2, [pc, #196] ; (8007568 ) + 80074a2: 6013 str r3, [r2, #0] + } + mem2 = (struct mem *)(void *)&ram[ptr2]; + 80074a4: 4b2a ldr r3, [pc, #168] ; (8007550 ) + 80074a6: 681a ldr r2, [r3, #0] + 80074a8: 897b ldrh r3, [r7, #10] + 80074aa: 4413 add r3, r2 + 80074ac: 60fb str r3, [r7, #12] + mem2->used = 0; + 80074ae: 68fb ldr r3, [r7, #12] + 80074b0: 2200 movs r2, #0 + 80074b2: 711a strb r2, [r3, #4] + /* restore the next pointer */ + mem2->next = next; + 80074b4: 68fb ldr r3, [r7, #12] + 80074b6: 893a ldrh r2, [r7, #8] + 80074b8: 801a strh r2, [r3, #0] + /* link it back to mem */ + mem2->prev = ptr; + 80074ba: 68fb ldr r3, [r7, #12] + 80074bc: 8a7a ldrh r2, [r7, #18] + 80074be: 805a strh r2, [r3, #2] + /* link mem to it */ + mem->next = ptr2; + 80074c0: 697b ldr r3, [r7, #20] + 80074c2: 897a ldrh r2, [r7, #10] + 80074c4: 801a strh r2, [r3, #0] + /* 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) { + 80074c6: 68fb ldr r3, [r7, #12] + 80074c8: 881b ldrh r3, [r3, #0] + 80074ca: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 + 80074ce: d039 beq.n 8007544 + ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + 80074d0: 4b1f ldr r3, [pc, #124] ; (8007550 ) + 80074d2: 681b ldr r3, [r3, #0] + 80074d4: 68fa ldr r2, [r7, #12] + 80074d6: 8812 ldrh r2, [r2, #0] + 80074d8: 4413 add r3, r2 + 80074da: 897a ldrh r2, [r7, #10] + 80074dc: 805a strh r2, [r3, #2] + 80074de: e031 b.n 8007544 + } + MEM_STATS_DEC_USED(used, (size - newsize)); + /* no need to plug holes, we've already done that */ + } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) { + 80074e0: 887b ldrh r3, [r7, #2] + 80074e2: f103 0214 add.w r2, r3, #20 + 80074e6: 8a3b ldrh r3, [r7, #16] + 80074e8: 429a cmp r2, r3 + 80074ea: d82b bhi.n 8007544 + * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem + * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). + * @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 = ptr + SIZEOF_STRUCT_MEM + newsize; + 80074ec: 8a7a ldrh r2, [r7, #18] + 80074ee: 887b ldrh r3, [r7, #2] + 80074f0: 4413 add r3, r2 + 80074f2: b29b uxth r3, r3 + 80074f4: 3308 adds r3, #8 + 80074f6: 817b strh r3, [r7, #10] + mem2 = (struct mem *)(void *)&ram[ptr2]; + 80074f8: 4b15 ldr r3, [pc, #84] ; (8007550 ) + 80074fa: 681a ldr r2, [r3, #0] + 80074fc: 897b ldrh r3, [r7, #10] + 80074fe: 4413 add r3, r2 + 8007500: 60fb str r3, [r7, #12] + if (mem2 < lfree) { + 8007502: 4b19 ldr r3, [pc, #100] ; (8007568 ) + 8007504: 681b ldr r3, [r3, #0] + 8007506: 68fa ldr r2, [r7, #12] + 8007508: 429a cmp r2, r3 + 800750a: d202 bcs.n 8007512 + lfree = mem2; + 800750c: 4a16 ldr r2, [pc, #88] ; (8007568 ) + 800750e: 68fb ldr r3, [r7, #12] + 8007510: 6013 str r3, [r2, #0] + } + mem2->used = 0; + 8007512: 68fb ldr r3, [r7, #12] + 8007514: 2200 movs r2, #0 + 8007516: 711a strb r2, [r3, #4] + mem2->next = mem->next; + 8007518: 697b ldr r3, [r7, #20] + 800751a: 881a ldrh r2, [r3, #0] + 800751c: 68fb ldr r3, [r7, #12] + 800751e: 801a strh r2, [r3, #0] + mem2->prev = ptr; + 8007520: 68fb ldr r3, [r7, #12] + 8007522: 8a7a ldrh r2, [r7, #18] + 8007524: 805a strh r2, [r3, #2] + mem->next = ptr2; + 8007526: 697b ldr r3, [r7, #20] + 8007528: 897a ldrh r2, [r7, #10] + 800752a: 801a strh r2, [r3, #0] + if (mem2->next != MEM_SIZE_ALIGNED) { + 800752c: 68fb ldr r3, [r7, #12] + 800752e: 881b ldrh r3, [r3, #0] + 8007530: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 + 8007534: d006 beq.n 8007544 + ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + 8007536: 4b06 ldr r3, [pc, #24] ; (8007550 ) + 8007538: 681b ldr r3, [r3, #0] + 800753a: 68fa ldr r2, [r7, #12] + 800753c: 8812 ldrh r2, [r2, #0] + 800753e: 4413 add r3, r2 + 8007540: 897a ldrh r2, [r7, #10] + 8007542: 805a strh r2, [r3, #2] + } */ +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + mem_free_count = 1; +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + LWIP_MEM_FREE_UNPROTECT(); + return rmem; + 8007544: 687b ldr r3, [r7, #4] +} + 8007546: 4618 mov r0, r3 + 8007548: 3718 adds r7, #24 + 800754a: 46bd mov sp, r7 + 800754c: bd80 pop {r7, pc} + 800754e: bf00 nop + 8007550: 20004058 .word 0x20004058 + 8007554: 2000405c .word 0x2000405c + 8007558: 0801449c .word 0x0801449c + 800755c: 080145c0 .word 0x080145c0 + 8007560: 080144e4 .word 0x080144e4 + 8007564: 080145d8 .word 0x080145d8 + 8007568: 20004060 .word 0x20004060 + +0800756c : + * + * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). + */ +void * +mem_malloc(mem_size_t size) +{ + 800756c: b580 push {r7, lr} + 800756e: b088 sub sp, #32 + 8007570: af00 add r7, sp, #0 + 8007572: 4603 mov r3, r0 + 8007574: 80fb strh r3, [r7, #6] +#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 == 0) { + 8007576: 88fb ldrh r3, [r7, #6] + 8007578: 2b00 cmp r3, #0 + 800757a: d101 bne.n 8007580 + return NULL; + 800757c: 2300 movs r3, #0 + 800757e: e0c7 b.n 8007710 + } + + /* Expand the size of the allocated memory region so that we can + adjust for alignment. */ + size = LWIP_MEM_ALIGN_SIZE(size); + 8007580: 88fb ldrh r3, [r7, #6] + 8007582: 3303 adds r3, #3 + 8007584: b29b uxth r3, r3 + 8007586: f023 0303 bic.w r3, r3, #3 + 800758a: 80fb strh r3, [r7, #6] + + if (size < MIN_SIZE_ALIGNED) { + 800758c: 88fb ldrh r3, [r7, #6] + 800758e: 2b0b cmp r3, #11 + 8007590: d801 bhi.n 8007596 + /* every data block must be at least MIN_SIZE_ALIGNED long */ + size = MIN_SIZE_ALIGNED; + 8007592: 230c movs r3, #12 + 8007594: 80fb strh r3, [r7, #6] + } + + if (size > MEM_SIZE_ALIGNED) { + 8007596: 88fb ldrh r3, [r7, #6] + 8007598: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 + 800759c: d901 bls.n 80075a2 + return NULL; + 800759e: 2300 movs r3, #0 + 80075a0: e0b6 b.n 8007710 +#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_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; + 80075a2: 4b5d ldr r3, [pc, #372] ; (8007718 ) + 80075a4: 681a ldr r2, [r3, #0] + 80075a6: 4b5d ldr r3, [pc, #372] ; (800771c ) + 80075a8: 681b ldr r3, [r3, #0] + 80075aa: 1ad3 subs r3, r2, r3 + 80075ac: 83fb strh r3, [r7, #30] + 80075ae: e0a7 b.n 8007700 + ptr = ((struct mem *)(void *)&ram[ptr])->next) { + mem = (struct mem *)(void *)&ram[ptr]; + 80075b0: 4b5a ldr r3, [pc, #360] ; (800771c ) + 80075b2: 681a ldr r2, [r3, #0] + 80075b4: 8bfb ldrh r3, [r7, #30] + 80075b6: 4413 add r3, r2 + 80075b8: 617b str r3, [r7, #20] + local_mem_free_count = 1; + break; + } +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + + if ((!mem->used) && + 80075ba: 697b ldr r3, [r7, #20] + 80075bc: 791b ldrb r3, [r3, #4] + 80075be: 2b00 cmp r3, #0 + 80075c0: f040 8098 bne.w 80076f4 + (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { + 80075c4: 697b ldr r3, [r7, #20] + 80075c6: 881b ldrh r3, [r3, #0] + 80075c8: 461a mov r2, r3 + 80075ca: 8bfb ldrh r3, [r7, #30] + 80075cc: 1ad3 subs r3, r2, r3 + 80075ce: f1a3 0208 sub.w r2, r3, #8 + 80075d2: 88fb ldrh r3, [r7, #6] + if ((!mem->used) && + 80075d4: 429a cmp r2, r3 + 80075d6: f0c0 808d bcc.w 80076f4 + /* mem is not used and at least perfect fit is possible: + * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */ + + if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) { + 80075da: 697b ldr r3, [r7, #20] + 80075dc: 881b ldrh r3, [r3, #0] + 80075de: 461a mov r2, r3 + 80075e0: 8bfb ldrh r3, [r7, #30] + 80075e2: 1ad3 subs r3, r2, r3 + 80075e4: f1a3 0208 sub.w r2, r3, #8 + 80075e8: 88fb ldrh r3, [r7, #6] + 80075ea: 3314 adds r3, #20 + 80075ec: 429a cmp r2, r3 + 80075ee: d327 bcc.n 8007640 + * struct mem would fit in but no data between mem2 and mem2->next + * @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 = ptr + SIZEOF_STRUCT_MEM + size; + 80075f0: 8bfa ldrh r2, [r7, #30] + 80075f2: 88fb ldrh r3, [r7, #6] + 80075f4: 4413 add r3, r2 + 80075f6: b29b uxth r3, r3 + 80075f8: 3308 adds r3, #8 + 80075fa: 827b strh r3, [r7, #18] + /* create mem2 struct */ + mem2 = (struct mem *)(void *)&ram[ptr2]; + 80075fc: 4b47 ldr r3, [pc, #284] ; (800771c ) + 80075fe: 681a ldr r2, [r3, #0] + 8007600: 8a7b ldrh r3, [r7, #18] + 8007602: 4413 add r3, r2 + 8007604: 60fb str r3, [r7, #12] + mem2->used = 0; + 8007606: 68fb ldr r3, [r7, #12] + 8007608: 2200 movs r2, #0 + 800760a: 711a strb r2, [r3, #4] + mem2->next = mem->next; + 800760c: 697b ldr r3, [r7, #20] + 800760e: 881a ldrh r2, [r3, #0] + 8007610: 68fb ldr r3, [r7, #12] + 8007612: 801a strh r2, [r3, #0] + mem2->prev = ptr; + 8007614: 68fb ldr r3, [r7, #12] + 8007616: 8bfa ldrh r2, [r7, #30] + 8007618: 805a strh r2, [r3, #2] + /* and insert it between mem and mem->next */ + mem->next = ptr2; + 800761a: 697b ldr r3, [r7, #20] + 800761c: 8a7a ldrh r2, [r7, #18] + 800761e: 801a strh r2, [r3, #0] + mem->used = 1; + 8007620: 697b ldr r3, [r7, #20] + 8007622: 2201 movs r2, #1 + 8007624: 711a strb r2, [r3, #4] + + if (mem2->next != MEM_SIZE_ALIGNED) { + 8007626: 68fb ldr r3, [r7, #12] + 8007628: 881b ldrh r3, [r3, #0] + 800762a: f5b3 6fc8 cmp.w r3, #1600 ; 0x640 + 800762e: d00a beq.n 8007646 + ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + 8007630: 4b3a ldr r3, [pc, #232] ; (800771c ) + 8007632: 681b ldr r3, [r3, #0] + 8007634: 68fa ldr r2, [r7, #12] + 8007636: 8812 ldrh r2, [r2, #0] + 8007638: 4413 add r3, r2 + 800763a: 8a7a ldrh r2, [r7, #18] + 800763c: 805a strh r2, [r3, #2] + 800763e: e002 b.n 8007646 + * 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; + 8007640: 697b ldr r3, [r7, #20] + 8007642: 2201 movs r2, #1 + 8007644: 711a strb r2, [r3, #4] + MEM_STATS_INC_USED(used, mem->next - (mem_size_t)((u8_t *)mem - ram)); + } +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT +mem_malloc_adjust_lfree: +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + if (mem == lfree) { + 8007646: 4b34 ldr r3, [pc, #208] ; (8007718 ) + 8007648: 681b ldr r3, [r3, #0] + 800764a: 697a ldr r2, [r7, #20] + 800764c: 429a cmp r2, r3 + 800764e: d127 bne.n 80076a0 + struct mem *cur = lfree; + 8007650: 4b31 ldr r3, [pc, #196] ; (8007718 ) + 8007652: 681b ldr r3, [r3, #0] + 8007654: 61bb str r3, [r7, #24] + /* Find next free block after mem and update lowest free pointer */ + while (cur->used && cur != ram_end) { + 8007656: e005 b.n 8007664 + /* If mem_free or mem_trim have run, we have to restart since they + could have altered our current struct mem or lfree. */ + goto mem_malloc_adjust_lfree; + } +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + cur = (struct mem *)(void *)&ram[cur->next]; + 8007658: 4b30 ldr r3, [pc, #192] ; (800771c ) + 800765a: 681b ldr r3, [r3, #0] + 800765c: 69ba ldr r2, [r7, #24] + 800765e: 8812 ldrh r2, [r2, #0] + 8007660: 4413 add r3, r2 + 8007662: 61bb str r3, [r7, #24] + while (cur->used && cur != ram_end) { + 8007664: 69bb ldr r3, [r7, #24] + 8007666: 791b ldrb r3, [r3, #4] + 8007668: 2b00 cmp r3, #0 + 800766a: d004 beq.n 8007676 + 800766c: 4b2c ldr r3, [pc, #176] ; (8007720 ) + 800766e: 681b ldr r3, [r3, #0] + 8007670: 69ba ldr r2, [r7, #24] + 8007672: 429a cmp r2, r3 + 8007674: d1f0 bne.n 8007658 + } + lfree = cur; + 8007676: 4a28 ldr r2, [pc, #160] ; (8007718 ) + 8007678: 69bb ldr r3, [r7, #24] + 800767a: 6013 str r3, [r2, #0] + LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); + 800767c: 4b26 ldr r3, [pc, #152] ; (8007718 ) + 800767e: 681a ldr r2, [r3, #0] + 8007680: 4b27 ldr r3, [pc, #156] ; (8007720 ) + 8007682: 681b ldr r3, [r3, #0] + 8007684: 429a cmp r2, r3 + 8007686: d00b beq.n 80076a0 + 8007688: 4b23 ldr r3, [pc, #140] ; (8007718 ) + 800768a: 681b ldr r3, [r3, #0] + 800768c: 791b ldrb r3, [r3, #4] + 800768e: 2b00 cmp r3, #0 + 8007690: d006 beq.n 80076a0 + 8007692: 4b24 ldr r3, [pc, #144] ; (8007724 ) + 8007694: f240 22cf movw r2, #719 ; 0x2cf + 8007698: 4923 ldr r1, [pc, #140] ; (8007728 ) + 800769a: 4824 ldr r0, [pc, #144] ; (800772c ) + 800769c: f00b fb72 bl 8012d84 + } + LWIP_MEM_ALLOC_UNPROTECT(); + sys_mutex_unlock(&mem_mutex); + LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", + 80076a0: 88fa ldrh r2, [r7, #6] + 80076a2: 697b ldr r3, [r7, #20] + 80076a4: 4413 add r3, r2 + 80076a6: 3308 adds r3, #8 + 80076a8: 4a1d ldr r2, [pc, #116] ; (8007720 ) + 80076aa: 6812 ldr r2, [r2, #0] + 80076ac: 4293 cmp r3, r2 + 80076ae: d906 bls.n 80076be + 80076b0: 4b1c ldr r3, [pc, #112] ; (8007724 ) + 80076b2: f240 22d3 movw r2, #723 ; 0x2d3 + 80076b6: 491e ldr r1, [pc, #120] ; (8007730 ) + 80076b8: 481c ldr r0, [pc, #112] ; (800772c ) + 80076ba: f00b fb63 bl 8012d84 + (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); + LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", + 80076be: 697b ldr r3, [r7, #20] + 80076c0: f003 0303 and.w r3, r3, #3 + 80076c4: 2b00 cmp r3, #0 + 80076c6: d006 beq.n 80076d6 + 80076c8: 4b16 ldr r3, [pc, #88] ; (8007724 ) + 80076ca: f240 22d5 movw r2, #725 ; 0x2d5 + 80076ce: 4919 ldr r1, [pc, #100] ; (8007734 ) + 80076d0: 4816 ldr r0, [pc, #88] ; (800772c ) + 80076d2: f00b fb57 bl 8012d84 + ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); + LWIP_ASSERT("mem_malloc: sanity check alignment", + 80076d6: 697b ldr r3, [r7, #20] + 80076d8: f003 0303 and.w r3, r3, #3 + 80076dc: 2b00 cmp r3, #0 + 80076de: d006 beq.n 80076ee + 80076e0: 4b10 ldr r3, [pc, #64] ; (8007724 ) + 80076e2: f240 22d7 movw r2, #727 ; 0x2d7 + 80076e6: 4914 ldr r1, [pc, #80] ; (8007738 ) + 80076e8: 4810 ldr r0, [pc, #64] ; (800772c ) + 80076ea: f00b fb4b bl 8012d84 + (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0); + + return (u8_t *)mem + SIZEOF_STRUCT_MEM; + 80076ee: 697b ldr r3, [r7, #20] + 80076f0: 3308 adds r3, #8 + 80076f2: e00d b.n 8007710 + ptr = ((struct mem *)(void *)&ram[ptr])->next) { + 80076f4: 4b09 ldr r3, [pc, #36] ; (800771c ) + 80076f6: 681a ldr r2, [r3, #0] + 80076f8: 8bfb ldrh r3, [r7, #30] + 80076fa: 4413 add r3, r2 + 80076fc: 881b ldrh r3, [r3, #0] + 80076fe: 83fb strh r3, [r7, #30] + for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; + 8007700: 8bfa ldrh r2, [r7, #30] + 8007702: 88fb ldrh r3, [r7, #6] + 8007704: f5c3 63c8 rsb r3, r3, #1600 ; 0x640 + 8007708: 429a cmp r2, r3 + 800770a: f4ff af51 bcc.w 80075b0 +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); + MEM_STATS_INC(err); + LWIP_MEM_ALLOC_UNPROTECT(); + sys_mutex_unlock(&mem_mutex); + return NULL; + 800770e: 2300 movs r3, #0 +} + 8007710: 4618 mov r0, r3 + 8007712: 3720 adds r7, #32 + 8007714: 46bd mov sp, r7 + 8007716: bd80 pop {r7, pc} + 8007718: 20004060 .word 0x20004060 + 800771c: 20004058 .word 0x20004058 + 8007720: 2000405c .word 0x2000405c + 8007724: 0801449c .word 0x0801449c + 8007728: 080145f8 .word 0x080145f8 + 800772c: 080144e4 .word 0x080144e4 + 8007730: 08014614 .word 0x08014614 + 8007734: 08014644 .word 0x08014644 + 8007738: 08014674 .word 0x08014674 + +0800773c : + * + * @param desc pool to initialize + */ +void +memp_init_pool(const struct memp_desc *desc) +{ + 800773c: b480 push {r7} + 800773e: b085 sub sp, #20 + 8007740: af00 add r7, sp, #0 + 8007742: 6078 str r0, [r7, #4] + LWIP_UNUSED_ARG(desc); +#else + int i; + struct memp *memp; + + *desc->tab = NULL; + 8007744: 687b ldr r3, [r7, #4] + 8007746: 689b ldr r3, [r3, #8] + 8007748: 2200 movs r2, #0 + 800774a: 601a str r2, [r3, #0] + memp = (struct memp*)LWIP_MEM_ALIGN(desc->base); + 800774c: 687b ldr r3, [r7, #4] + 800774e: 685b ldr r3, [r3, #4] + 8007750: 3303 adds r3, #3 + 8007752: f023 0303 bic.w r3, r3, #3 + 8007756: 60bb str r3, [r7, #8] + /* create a linked list of memp elements */ + for (i = 0; i < desc->num; ++i) { + 8007758: 2300 movs r3, #0 + 800775a: 60fb str r3, [r7, #12] + 800775c: e011 b.n 8007782 + memp->next = *desc->tab; + 800775e: 687b ldr r3, [r7, #4] + 8007760: 689b ldr r3, [r3, #8] + 8007762: 681a ldr r2, [r3, #0] + 8007764: 68bb ldr r3, [r7, #8] + 8007766: 601a str r2, [r3, #0] + *desc->tab = memp; + 8007768: 687b ldr r3, [r7, #4] + 800776a: 689b ldr r3, [r3, #8] + 800776c: 68ba ldr r2, [r7, #8] + 800776e: 601a str r2, [r3, #0] +#if MEMP_OVERFLOW_CHECK + memp_overflow_init_element(memp, desc); +#endif /* MEMP_OVERFLOW_CHECK */ + /* cast through void* to get rid of alignment warnings */ + memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size + 8007770: 687b ldr r3, [r7, #4] + 8007772: 881b ldrh r3, [r3, #0] + 8007774: 461a mov r2, r3 + 8007776: 68bb ldr r3, [r7, #8] + 8007778: 4413 add r3, r2 + 800777a: 60bb str r3, [r7, #8] + for (i = 0; i < desc->num; ++i) { + 800777c: 68fb ldr r3, [r7, #12] + 800777e: 3301 adds r3, #1 + 8007780: 60fb str r3, [r7, #12] + 8007782: 687b ldr r3, [r7, #4] + 8007784: 885b ldrh r3, [r3, #2] + 8007786: 461a mov r2, r3 + 8007788: 68fb ldr r3, [r7, #12] + 800778a: 4293 cmp r3, r2 + 800778c: dbe7 blt.n 800775e +#endif /* !MEMP_MEM_MALLOC */ + +#if MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) + desc->stats->name = desc->desc; +#endif /* MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) */ +} + 800778e: bf00 nop + 8007790: bf00 nop + 8007792: 3714 adds r7, #20 + 8007794: 46bd mov sp, r7 + 8007796: bc80 pop {r7} + 8007798: 4770 bx lr + ... + +0800779c : + * + * Carves out memp_memory into linked lists for each pool-type. + */ +void +memp_init(void) +{ + 800779c: b580 push {r7, lr} + 800779e: b082 sub sp, #8 + 80077a0: af00 add r7, sp, #0 + u16_t i; + + /* for every pool: */ + for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { + 80077a2: 2300 movs r3, #0 + 80077a4: 80fb strh r3, [r7, #6] + 80077a6: e009 b.n 80077bc + memp_init_pool(memp_pools[i]); + 80077a8: 88fb ldrh r3, [r7, #6] + 80077aa: 4a08 ldr r2, [pc, #32] ; (80077cc ) + 80077ac: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80077b0: 4618 mov r0, r3 + 80077b2: f7ff ffc3 bl 800773c + for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { + 80077b6: 88fb ldrh r3, [r7, #6] + 80077b8: 3301 adds r3, #1 + 80077ba: 80fb strh r3, [r7, #6] + 80077bc: 88fb ldrh r3, [r7, #6] + 80077be: 2b08 cmp r3, #8 + 80077c0: d9f2 bls.n 80077a8 + +#if MEMP_OVERFLOW_CHECK >= 2 + /* check everything a first time to see if it worked */ + memp_overflow_check_all(); +#endif /* MEMP_OVERFLOW_CHECK >= 2 */ +} + 80077c2: bf00 nop + 80077c4: bf00 nop + 80077c6: 3708 adds r7, #8 + 80077c8: 46bd mov sp, r7 + 80077ca: bd80 pop {r7, pc} + 80077cc: 080166f4 .word 0x080166f4 + +080077d0 : +#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 +{ + 80077d0: b580 push {r7, lr} + 80077d2: b084 sub sp, #16 + 80077d4: af00 add r7, sp, #0 + 80077d6: 6078 str r0, [r7, #4] + 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); + + memp = *desc->tab; + 80077d8: 687b ldr r3, [r7, #4] + 80077da: 689b ldr r3, [r3, #8] + 80077dc: 681b ldr r3, [r3, #0] + 80077de: 60fb str r3, [r7, #12] +#endif /* MEMP_MEM_MALLOC */ + + if (memp != NULL) { + 80077e0: 68fb ldr r3, [r7, #12] + 80077e2: 2b00 cmp r3, #0 + 80077e4: d012 beq.n 800780c +#if MEMP_OVERFLOW_CHECK == 1 + memp_overflow_check_element_overflow(memp, desc); + memp_overflow_check_element_underflow(memp, desc); +#endif /* MEMP_OVERFLOW_CHECK */ + + *desc->tab = memp->next; + 80077e6: 687b ldr r3, [r7, #4] + 80077e8: 689b ldr r3, [r3, #8] + 80077ea: 68fa ldr r2, [r7, #12] + 80077ec: 6812 ldr r2, [r2, #0] + 80077ee: 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", + 80077f0: 68fb ldr r3, [r7, #12] + 80077f2: f003 0303 and.w r3, r3, #3 + 80077f6: 2b00 cmp r3, #0 + 80077f8: d006 beq.n 8007808 + 80077fa: 4b07 ldr r3, [pc, #28] ; (8007818 ) + 80077fc: f44f 72a4 mov.w r2, #328 ; 0x148 + 8007800: 4906 ldr r1, [pc, #24] ; (800781c ) + 8007802: 4807 ldr r0, [pc, #28] ; (8007820 ) + 8007804: f00b fabe bl 8012d84 + desc->stats->max = desc->stats->used; + } +#endif + SYS_ARCH_UNPROTECT(old_level); + /* cast through u8_t* to get rid of alignment warnings */ + return ((u8_t*)memp + MEMP_SIZE); + 8007808: 68fb ldr r3, [r7, #12] + 800780a: e000 b.n 800780e + desc->stats->err++; +#endif + } + + SYS_ARCH_UNPROTECT(old_level); + return NULL; + 800780c: 2300 movs r3, #0 +} + 800780e: 4618 mov r0, r3 + 8007810: 3710 adds r7, #16 + 8007812: 46bd mov sp, r7 + 8007814: bd80 pop {r7, pc} + 8007816: bf00 nop + 8007818: 08014698 .word 0x08014698 + 800781c: 080146c8 .word 0x080146c8 + 8007820: 080146ec .word 0x080146ec + +08007824 : +#if !MEMP_OVERFLOW_CHECK +memp_malloc(memp_t type) +#else +memp_malloc_fn(memp_t type, const char* file, const int line) +#endif +{ + 8007824: b580 push {r7, lr} + 8007826: b084 sub sp, #16 + 8007828: af00 add r7, sp, #0 + 800782a: 4603 mov r3, r0 + 800782c: 71fb strb r3, [r7, #7] + void *memp; + LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); + 800782e: 79fb ldrb r3, [r7, #7] + 8007830: 2b08 cmp r3, #8 + 8007832: d908 bls.n 8007846 + 8007834: 4b0a ldr r3, [pc, #40] ; (8007860 ) + 8007836: f240 1287 movw r2, #391 ; 0x187 + 800783a: 490a ldr r1, [pc, #40] ; (8007864 ) + 800783c: 480a ldr r0, [pc, #40] ; (8007868 ) + 800783e: f00b faa1 bl 8012d84 + 8007842: 2300 movs r3, #0 + 8007844: e008 b.n 8007858 +#if MEMP_OVERFLOW_CHECK >= 2 + memp_overflow_check_all(); +#endif /* MEMP_OVERFLOW_CHECK >= 2 */ + +#if !MEMP_OVERFLOW_CHECK + memp = do_memp_malloc_pool(memp_pools[type]); + 8007846: 79fb ldrb r3, [r7, #7] + 8007848: 4a08 ldr r2, [pc, #32] ; (800786c ) + 800784a: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 800784e: 4618 mov r0, r3 + 8007850: f7ff ffbe bl 80077d0 + 8007854: 60f8 str r0, [r7, #12] +#else + memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); +#endif + + return memp; + 8007856: 68fb ldr r3, [r7, #12] +} + 8007858: 4618 mov r0, r3 + 800785a: 3710 adds r7, #16 + 800785c: 46bd mov sp, r7 + 800785e: bd80 pop {r7, pc} + 8007860: 08014698 .word 0x08014698 + 8007864: 08014728 .word 0x08014728 + 8007868: 080146ec .word 0x080146ec + 800786c: 080166f4 .word 0x080166f4 + +08007870 : + +static void +do_memp_free_pool(const struct memp_desc* desc, void *mem) +{ + 8007870: b580 push {r7, lr} + 8007872: b084 sub sp, #16 + 8007874: af00 add r7, sp, #0 + 8007876: 6078 str r0, [r7, #4] + 8007878: 6039 str r1, [r7, #0] + struct memp *memp; + SYS_ARCH_DECL_PROTECT(old_level); + + LWIP_ASSERT("memp_free: mem properly aligned", + 800787a: 683b ldr r3, [r7, #0] + 800787c: f003 0303 and.w r3, r3, #3 + 8007880: 2b00 cmp r3, #0 + 8007882: d006 beq.n 8007892 + 8007884: 4b0a ldr r3, [pc, #40] ; (80078b0 ) + 8007886: f44f 72ce mov.w r2, #412 ; 0x19c + 800788a: 490a ldr r1, [pc, #40] ; (80078b4 ) + 800788c: 480a ldr r0, [pc, #40] ; (80078b8 ) + 800788e: f00b fa79 bl 8012d84 + ((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); + 8007892: 683b ldr r3, [r7, #0] + 8007894: 60fb str r3, [r7, #12] +#if MEMP_MEM_MALLOC + LWIP_UNUSED_ARG(desc); + SYS_ARCH_UNPROTECT(old_level); + mem_free(memp); +#else /* MEMP_MEM_MALLOC */ + memp->next = *desc->tab; + 8007896: 687b ldr r3, [r7, #4] + 8007898: 689b ldr r3, [r3, #8] + 800789a: 681a ldr r2, [r3, #0] + 800789c: 68fb ldr r3, [r7, #12] + 800789e: 601a str r2, [r3, #0] + *desc->tab = memp; + 80078a0: 687b ldr r3, [r7, #4] + 80078a2: 689b ldr r3, [r3, #8] + 80078a4: 68fa ldr r2, [r7, #12] + 80078a6: 601a str r2, [r3, #0] + LWIP_ASSERT("memp sanity", memp_sanity(desc)); +#endif /* MEMP_SANITY_CHECK */ + + SYS_ARCH_UNPROTECT(old_level); +#endif /* !MEMP_MEM_MALLOC */ +} + 80078a8: bf00 nop + 80078aa: 3710 adds r7, #16 + 80078ac: 46bd mov sp, r7 + 80078ae: bd80 pop {r7, pc} + 80078b0: 08014698 .word 0x08014698 + 80078b4: 08014748 .word 0x08014748 + 80078b8: 080146ec .word 0x080146ec + +080078bc : + * @param type the pool where to put mem + * @param mem the memp element to free + */ +void +memp_free(memp_t type, void *mem) +{ + 80078bc: b580 push {r7, lr} + 80078be: b082 sub sp, #8 + 80078c0: af00 add r7, sp, #0 + 80078c2: 4603 mov r3, r0 + 80078c4: 6039 str r1, [r7, #0] + 80078c6: 71fb strb r3, [r7, #7] +#ifdef LWIP_HOOK_MEMP_AVAILABLE + struct memp *old_first; +#endif + + LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;); + 80078c8: 79fb ldrb r3, [r7, #7] + 80078ca: 2b08 cmp r3, #8 + 80078cc: d907 bls.n 80078de + 80078ce: 4b0c ldr r3, [pc, #48] ; (8007900 ) + 80078d0: f240 12db movw r2, #475 ; 0x1db + 80078d4: 490b ldr r1, [pc, #44] ; (8007904 ) + 80078d6: 480c ldr r0, [pc, #48] ; (8007908 ) + 80078d8: f00b fa54 bl 8012d84 + 80078dc: e00c b.n 80078f8 + + if (mem == NULL) { + 80078de: 683b ldr r3, [r7, #0] + 80078e0: 2b00 cmp r3, #0 + 80078e2: d008 beq.n 80078f6 + +#ifdef LWIP_HOOK_MEMP_AVAILABLE + old_first = *memp_pools[type]->tab; +#endif + + do_memp_free_pool(memp_pools[type], mem); + 80078e4: 79fb ldrb r3, [r7, #7] + 80078e6: 4a09 ldr r2, [pc, #36] ; (800790c ) + 80078e8: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80078ec: 6839 ldr r1, [r7, #0] + 80078ee: 4618 mov r0, r3 + 80078f0: f7ff ffbe bl 8007870 + 80078f4: e000 b.n 80078f8 + return; + 80078f6: bf00 nop +#ifdef LWIP_HOOK_MEMP_AVAILABLE + if (old_first == NULL) { + LWIP_HOOK_MEMP_AVAILABLE(type); + } +#endif +} + 80078f8: 3708 adds r7, #8 + 80078fa: 46bd mov sp, r7 + 80078fc: bd80 pop {r7, pc} + 80078fe: bf00 nop + 8007900: 08014698 .word 0x08014698 + 8007904: 08014768 .word 0x08014768 + 8007908: 080146ec .word 0x080146ec + 800790c: 080166f4 .word 0x080166f4 + +08007910 : +} +#endif /* LWIP_HAVE_LOOPIF */ + +void +netif_init(void) +{ + 8007910: b480 push {r7} + 8007912: af00 add r7, sp, #0 + + netif_set_link_up(&loop_netif); + netif_set_up(&loop_netif); + +#endif /* LWIP_HAVE_LOOPIF */ +} + 8007914: bf00 nop + 8007916: 46bd mov sp, r7 + 8007918: bc80 pop {r7} + 800791a: 4770 bx lr + +0800791c : +netif_add(struct netif *netif, +#if LWIP_IPV4 + const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, +#endif /* LWIP_IPV4 */ + void *state, netif_init_fn init, netif_input_fn input) +{ + 800791c: b580 push {r7, lr} + 800791e: b084 sub sp, #16 + 8007920: af00 add r7, sp, #0 + 8007922: 60f8 str r0, [r7, #12] + 8007924: 60b9 str r1, [r7, #8] + 8007926: 607a str r2, [r7, #4] + 8007928: 603b str r3, [r7, #0] +#if LWIP_IPV6 + s8_t i; +#endif + + LWIP_ASSERT("No init function given", init != NULL); + 800792a: 69fb ldr r3, [r7, #28] + 800792c: 2b00 cmp r3, #0 + 800792e: d105 bne.n 800793c + 8007930: 4b24 ldr r3, [pc, #144] ; (80079c4 ) + 8007932: 22fb movs r2, #251 ; 0xfb + 8007934: 4924 ldr r1, [pc, #144] ; (80079c8 ) + 8007936: 4825 ldr r0, [pc, #148] ; (80079cc ) + 8007938: f00b fa24 bl 8012d84 + + /* reset new interface configuration state */ +#if LWIP_IPV4 + ip_addr_set_zero_ip4(&netif->ip_addr); + 800793c: 68fb ldr r3, [r7, #12] + 800793e: 2200 movs r2, #0 + 8007940: 605a str r2, [r3, #4] + ip_addr_set_zero_ip4(&netif->netmask); + 8007942: 68fb ldr r3, [r7, #12] + 8007944: 2200 movs r2, #0 + 8007946: 609a str r2, [r3, #8] + ip_addr_set_zero_ip4(&netif->gw); + 8007948: 68fb ldr r3, [r7, #12] + 800794a: 2200 movs r2, #0 + 800794c: 60da str r2, [r3, #12] + netif->ip6_addr_state[i] = IP6_ADDR_INVALID; + } + netif->output_ip6 = netif_null_output_ip6; +#endif /* LWIP_IPV6 */ + NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_ENABLE_ALL); + netif->flags = 0; + 800794e: 68fb ldr r3, [r7, #12] + 8007950: 2200 movs r2, #0 + 8007952: f883 2033 strb.w r2, [r3, #51] ; 0x33 +#ifdef netif_get_client_data + memset(netif->client_data, 0, sizeof(netif->client_data)); + 8007956: 68fb ldr r3, [r7, #12] + 8007958: 3324 adds r3, #36 ; 0x24 + 800795a: 2204 movs r2, #4 + 800795c: 2100 movs r1, #0 + 800795e: 4618 mov r0, r3 + 8007960: f00b fb66 bl 8013030 +#if LWIP_IPV6_AUTOCONFIG + /* IPv6 address autoconfiguration not enabled by default */ + netif->ip6_autoconfig_enabled = 0; +#endif /* LWIP_IPV6_AUTOCONFIG */ +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; + 8007964: 68fb ldr r3, [r7, #12] + 8007966: 2203 movs r2, #3 + 8007968: f883 2028 strb.w r2, [r3, #40] ; 0x28 +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ +#if LWIP_NETIF_STATUS_CALLBACK + netif->status_callback = NULL; +#endif /* LWIP_NETIF_STATUS_CALLBACK */ +#if LWIP_NETIF_LINK_CALLBACK + netif->link_callback = NULL; + 800796c: 68fb ldr r3, [r7, #12] + 800796e: 2200 movs r2, #0 + 8007970: 61da str r2, [r3, #28] + netif->loop_first = NULL; + netif->loop_last = NULL; +#endif /* ENABLE_LOOPBACK */ + + /* remember netif specific state information data */ + netif->state = state; + 8007972: 68fb ldr r3, [r7, #12] + 8007974: 69ba ldr r2, [r7, #24] + 8007976: 621a str r2, [r3, #32] + netif->num = netif_num++; + 8007978: 4b15 ldr r3, [pc, #84] ; (80079d0 ) + 800797a: 781b ldrb r3, [r3, #0] + 800797c: 1c5a adds r2, r3, #1 + 800797e: b2d1 uxtb r1, r2 + 8007980: 4a13 ldr r2, [pc, #76] ; (80079d0 ) + 8007982: 7011 strb r1, [r2, #0] + 8007984: 68fa ldr r2, [r7, #12] + 8007986: f882 3036 strb.w r3, [r2, #54] ; 0x36 + netif->input = input; + 800798a: 68fb ldr r3, [r7, #12] + 800798c: 6a3a ldr r2, [r7, #32] + 800798e: 611a str r2, [r3, #16] +#if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS + netif->loop_cnt_current = 0; +#endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */ + +#if LWIP_IPV4 + netif_set_addr(netif, ipaddr, netmask, gw); + 8007990: 683b ldr r3, [r7, #0] + 8007992: 687a ldr r2, [r7, #4] + 8007994: 68b9 ldr r1, [r7, #8] + 8007996: 68f8 ldr r0, [r7, #12] + 8007998: f000 f81e bl 80079d8 +#endif /* LWIP_IPV4 */ + + /* call user specified initialization function for netif */ + if (init(netif) != ERR_OK) { + 800799c: 69fb ldr r3, [r7, #28] + 800799e: 68f8 ldr r0, [r7, #12] + 80079a0: 4798 blx r3 + 80079a2: 4603 mov r3, r0 + 80079a4: 2b00 cmp r3, #0 + 80079a6: d001 beq.n 80079ac + return NULL; + 80079a8: 2300 movs r3, #0 + 80079aa: e007 b.n 80079bc + } + + /* add this netif to the list */ + netif->next = netif_list; + 80079ac: 4b09 ldr r3, [pc, #36] ; (80079d4 ) + 80079ae: 681a ldr r2, [r3, #0] + 80079b0: 68fb ldr r3, [r7, #12] + 80079b2: 601a str r2, [r3, #0] + netif_list = netif; + 80079b4: 4a07 ldr r2, [pc, #28] ; (80079d4 ) + 80079b6: 68fb ldr r3, [r7, #12] + 80079b8: 6013 str r3, [r2, #0] + ip4_addr_debug_print(NETIF_DEBUG, netmask); + LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); + ip4_addr_debug_print(NETIF_DEBUG, gw); +#endif /* LWIP_IPV4 */ + LWIP_DEBUGF(NETIF_DEBUG, ("\n")); + return netif; + 80079ba: 68fb ldr r3, [r7, #12] +} + 80079bc: 4618 mov r0, r3 + 80079be: 3710 adds r7, #16 + 80079c0: 46bd mov sp, r7 + 80079c2: bd80 pop {r7, pc} + 80079c4: 08014784 .word 0x08014784 + 80079c8: 080147b8 .word 0x080147b8 + 80079cc: 080147d0 .word 0x080147d0 + 80079d0: 20006f64 .word 0x20006f64 + 80079d4: 20006f5c .word 0x20006f5c + +080079d8 : + * @param gw the new default gateway + */ +void +netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, + const ip4_addr_t *gw) +{ + 80079d8: b580 push {r7, lr} + 80079da: b084 sub sp, #16 + 80079dc: af00 add r7, sp, #0 + 80079de: 60f8 str r0, [r7, #12] + 80079e0: 60b9 str r1, [r7, #8] + 80079e2: 607a str r2, [r7, #4] + 80079e4: 603b str r3, [r7, #0] + if (ip4_addr_isany(ipaddr)) { + 80079e6: 68bb ldr r3, [r7, #8] + 80079e8: 2b00 cmp r3, #0 + 80079ea: d003 beq.n 80079f4 + 80079ec: 68bb ldr r3, [r7, #8] + 80079ee: 681b ldr r3, [r3, #0] + 80079f0: 2b00 cmp r3, #0 + 80079f2: d10c bne.n 8007a0e + /* when removing an address, we have to remove it *before* changing netmask/gw + to ensure that tcp RST segment can be sent correctly */ + netif_set_ipaddr(netif, ipaddr); + 80079f4: 68b9 ldr r1, [r7, #8] + 80079f6: 68f8 ldr r0, [r7, #12] + 80079f8: f000 f81a bl 8007a30 + netif_set_netmask(netif, netmask); + 80079fc: 6879 ldr r1, [r7, #4] + 80079fe: 68f8 ldr r0, [r7, #12] + 8007a00: f000 f861 bl 8007ac6 + netif_set_gw(netif, gw); + 8007a04: 6839 ldr r1, [r7, #0] + 8007a06: 68f8 ldr r0, [r7, #12] + 8007a08: f000 f84a bl 8007aa0 + 8007a0c: e00c b.n 8007a28 + } else { + netif_set_netmask(netif, netmask); + 8007a0e: 6879 ldr r1, [r7, #4] + 8007a10: 68f8 ldr r0, [r7, #12] + 8007a12: f000 f858 bl 8007ac6 + netif_set_gw(netif, gw); + 8007a16: 6839 ldr r1, [r7, #0] + 8007a18: 68f8 ldr r0, [r7, #12] + 8007a1a: f000 f841 bl 8007aa0 + /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ + netif_set_ipaddr(netif, ipaddr); + 8007a1e: 68b9 ldr r1, [r7, #8] + 8007a20: 68f8 ldr r0, [r7, #12] + 8007a22: f000 f805 bl 8007a30 + } +} + 8007a26: bf00 nop + 8007a28: bf00 nop + 8007a2a: 3710 adds r7, #16 + 8007a2c: 46bd mov sp, r7 + 8007a2e: bd80 pop {r7, pc} + +08007a30 : + * @note call netif_set_addr() if you also want to change netmask and + * default gateway + */ +void +netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) +{ + 8007a30: b580 push {r7, lr} + 8007a32: b084 sub sp, #16 + 8007a34: af00 add r7, sp, #0 + 8007a36: 6078 str r0, [r7, #4] + 8007a38: 6039 str r1, [r7, #0] + ip_addr_t new_addr; + *ip_2_ip4(&new_addr) = (ipaddr ? *ipaddr : *IP4_ADDR_ANY4); + 8007a3a: 683b ldr r3, [r7, #0] + 8007a3c: 2b00 cmp r3, #0 + 8007a3e: d003 beq.n 8007a48 + 8007a40: 683b ldr r3, [r7, #0] + 8007a42: 681b ldr r3, [r3, #0] + 8007a44: 60fb str r3, [r7, #12] + 8007a46: e002 b.n 8007a4e + 8007a48: 4b14 ldr r3, [pc, #80] ; (8007a9c ) + 8007a4a: 681b ldr r3, [r3, #0] + 8007a4c: 60fb str r3, [r7, #12] + IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); + + /* address is actually being changed? */ + if (ip4_addr_cmp(ip_2_ip4(&new_addr), netif_ip4_addr(netif)) == 0) { + 8007a4e: 68fa ldr r2, [r7, #12] + 8007a50: 687b ldr r3, [r7, #4] + 8007a52: 3304 adds r3, #4 + 8007a54: 681b ldr r3, [r3, #0] + 8007a56: 429a cmp r2, r3 + 8007a58: d01c beq.n 8007a94 + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); +#if LWIP_TCP + tcp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); + 8007a5a: 687b ldr r3, [r7, #4] + 8007a5c: 3304 adds r3, #4 + 8007a5e: f107 020c add.w r2, r7, #12 + 8007a62: 4611 mov r1, r2 + 8007a64: 4618 mov r0, r3 + 8007a66: f002 fb45 bl 800a0f4 +#endif /* LWIP_TCP */ +#if LWIP_UDP + udp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); + 8007a6a: 687b ldr r3, [r7, #4] + 8007a6c: 3304 adds r3, #4 + 8007a6e: f107 020c add.w r2, r7, #12 + 8007a72: 4611 mov r1, r2 + 8007a74: 4618 mov r0, r3 + 8007a76: f006 fe1d bl 800e6b4 +#endif /* LWIP_RAW */ + + mib2_remove_ip4(netif); + mib2_remove_route_ip4(0, netif); + /* set new IP address to netif */ + ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); + 8007a7a: 683b ldr r3, [r7, #0] + 8007a7c: 2b00 cmp r3, #0 + 8007a7e: d002 beq.n 8007a86 + 8007a80: 683b ldr r3, [r7, #0] + 8007a82: 681b ldr r3, [r3, #0] + 8007a84: e000 b.n 8007a88 + 8007a86: 2300 movs r3, #0 + 8007a88: 687a ldr r2, [r7, #4] + 8007a8a: 6053 str r3, [r2, #4] + IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4); + mib2_add_ip4(netif); + mib2_add_route_ip4(0, netif); + + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); + 8007a8c: 2101 movs r1, #1 + 8007a8e: 6878 ldr r0, [r7, #4] + 8007a90: f000 f85d bl 8007b4e + netif->name[0], netif->name[1], + ip4_addr1_16(netif_ip4_addr(netif)), + ip4_addr2_16(netif_ip4_addr(netif)), + ip4_addr3_16(netif_ip4_addr(netif)), + ip4_addr4_16(netif_ip4_addr(netif)))); +} + 8007a94: bf00 nop + 8007a96: 3710 adds r7, #16 + 8007a98: 46bd mov sp, r7 + 8007a9a: bd80 pop {r7, pc} + 8007a9c: 08016768 .word 0x08016768 + +08007aa0 : + * + * @note call netif_set_addr() if you also want to change ip address and netmask + */ +void +netif_set_gw(struct netif *netif, const ip4_addr_t *gw) +{ + 8007aa0: b480 push {r7} + 8007aa2: b083 sub sp, #12 + 8007aa4: af00 add r7, sp, #0 + 8007aa6: 6078 str r0, [r7, #4] + 8007aa8: 6039 str r1, [r7, #0] + ip4_addr_set(ip_2_ip4(&netif->gw), gw); + 8007aaa: 683b ldr r3, [r7, #0] + 8007aac: 2b00 cmp r3, #0 + 8007aae: d002 beq.n 8007ab6 + 8007ab0: 683b ldr r3, [r7, #0] + 8007ab2: 681b ldr r3, [r3, #0] + 8007ab4: e000 b.n 8007ab8 + 8007ab6: 2300 movs r3, #0 + 8007ab8: 687a ldr r2, [r7, #4] + 8007aba: 60d3 str r3, [r2, #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)))); +} + 8007abc: bf00 nop + 8007abe: 370c adds r7, #12 + 8007ac0: 46bd mov sp, r7 + 8007ac2: bc80 pop {r7} + 8007ac4: 4770 bx lr + +08007ac6 : + * @note call netif_set_addr() if you also want to change ip address and + * default gateway + */ +void +netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) +{ + 8007ac6: b480 push {r7} + 8007ac8: b083 sub sp, #12 + 8007aca: af00 add r7, sp, #0 + 8007acc: 6078 str r0, [r7, #4] + 8007ace: 6039 str r1, [r7, #0] + mib2_remove_route_ip4(0, netif); + /* set new netmask to netif */ + ip4_addr_set(ip_2_ip4(&netif->netmask), netmask); + 8007ad0: 683b ldr r3, [r7, #0] + 8007ad2: 2b00 cmp r3, #0 + 8007ad4: d002 beq.n 8007adc + 8007ad6: 683b ldr r3, [r7, #0] + 8007ad8: 681b ldr r3, [r3, #0] + 8007ada: e000 b.n 8007ade + 8007adc: 2300 movs r3, #0 + 8007ade: 687a ldr r2, [r7, #4] + 8007ae0: 6093 str r3, [r2, #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)))); +} + 8007ae2: bf00 nop + 8007ae4: 370c adds r7, #12 + 8007ae6: 46bd mov sp, r7 + 8007ae8: bc80 pop {r7} + 8007aea: 4770 bx lr + +08007aec : + * + * @param netif the default network interface + */ +void +netif_set_default(struct netif *netif) +{ + 8007aec: b480 push {r7} + 8007aee: b083 sub sp, #12 + 8007af0: af00 add r7, sp, #0 + 8007af2: 6078 str r0, [r7, #4] + mib2_remove_route_ip4(1, netif); + } else { + /* install default route */ + mib2_add_route_ip4(1, netif); + } + netif_default = netif; + 8007af4: 4a03 ldr r2, [pc, #12] ; (8007b04 ) + 8007af6: 687b ldr r3, [r7, #4] + 8007af8: 6013 str r3, [r2, #0] + LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", + netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); +} + 8007afa: bf00 nop + 8007afc: 370c adds r7, #12 + 8007afe: 46bd mov sp, r7 + 8007b00: bc80 pop {r7} + 8007b02: 4770 bx lr + 8007b04: 20006f60 .word 0x20006f60 + +08007b08 : + * Bring an interface up, available for processing + * traffic. + */ +void +netif_set_up(struct netif *netif) +{ + 8007b08: b580 push {r7, lr} + 8007b0a: b082 sub sp, #8 + 8007b0c: af00 add r7, sp, #0 + 8007b0e: 6078 str r0, [r7, #4] + if (!(netif->flags & NETIF_FLAG_UP)) { + 8007b10: 687b ldr r3, [r7, #4] + 8007b12: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8007b16: f003 0301 and.w r3, r3, #1 + 8007b1a: 2b00 cmp r3, #0 + 8007b1c: d113 bne.n 8007b46 + netif->flags |= NETIF_FLAG_UP; + 8007b1e: 687b ldr r3, [r7, #4] + 8007b20: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8007b24: f043 0301 orr.w r3, r3, #1 + 8007b28: b2da uxtb r2, r3 + 8007b2a: 687b ldr r3, [r7, #4] + 8007b2c: f883 2033 strb.w r2, [r3, #51] ; 0x33 + + MIB2_COPY_SYSUPTIME_TO(&netif->ts); + + NETIF_STATUS_CALLBACK(netif); + + if (netif->flags & NETIF_FLAG_LINK_UP) { + 8007b30: 687b ldr r3, [r7, #4] + 8007b32: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8007b36: f003 0304 and.w r3, r3, #4 + 8007b3a: 2b00 cmp r3, #0 + 8007b3c: d003 beq.n 8007b46 + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); + 8007b3e: 2103 movs r1, #3 + 8007b40: 6878 ldr r0, [r7, #4] + 8007b42: f000 f804 bl 8007b4e + } + } +} + 8007b46: bf00 nop + 8007b48: 3708 adds r7, #8 + 8007b4a: 46bd mov sp, r7 + 8007b4c: bd80 pop {r7, pc} + +08007b4e : + +/** Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change + */ +static void +netif_issue_reports(struct netif* netif, u8_t report_type) +{ + 8007b4e: b580 push {r7, lr} + 8007b50: b082 sub sp, #8 + 8007b52: af00 add r7, sp, #0 + 8007b54: 6078 str r0, [r7, #4] + 8007b56: 460b mov r3, r1 + 8007b58: 70fb strb r3, [r7, #3] +#if LWIP_IPV4 + if ((report_type & NETIF_REPORT_TYPE_IPV4) && + 8007b5a: 78fb ldrb r3, [r7, #3] + 8007b5c: f003 0301 and.w r3, r3, #1 + 8007b60: 2b00 cmp r3, #0 + 8007b62: d011 beq.n 8007b88 + !ip4_addr_isany_val(*netif_ip4_addr(netif))) { + 8007b64: 687b ldr r3, [r7, #4] + 8007b66: 3304 adds r3, #4 + 8007b68: 681b ldr r3, [r3, #0] + if ((report_type & NETIF_REPORT_TYPE_IPV4) && + 8007b6a: 2b00 cmp r3, #0 + 8007b6c: d00c beq.n 8007b88 +#if LWIP_ARP + /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ + if (netif->flags & (NETIF_FLAG_ETHARP)) { + 8007b6e: 687b ldr r3, [r7, #4] + 8007b70: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8007b74: f003 0308 and.w r3, r3, #8 + 8007b78: 2b00 cmp r3, #0 + 8007b7a: d005 beq.n 8007b88 + etharp_gratuitous(netif); + 8007b7c: 687b ldr r3, [r7, #4] + 8007b7e: 3304 adds r3, #4 + 8007b80: 4619 mov r1, r3 + 8007b82: 6878 ldr r0, [r7, #4] + 8007b84: f009 fb84 bl 8011290 + /* Send Router Solicitation messages. */ + netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ + } +#endif /* LWIP_IPV6 */ +} + 8007b88: bf00 nop + 8007b8a: 3708 adds r7, #8 + 8007b8c: 46bd mov sp, r7 + 8007b8e: bd80 pop {r7, pc} + +08007b90 : + * @ingroup netif + * Bring an interface down, disabling any traffic processing. + */ +void +netif_set_down(struct netif *netif) +{ + 8007b90: b580 push {r7, lr} + 8007b92: b082 sub sp, #8 + 8007b94: af00 add r7, sp, #0 + 8007b96: 6078 str r0, [r7, #4] + if (netif->flags & NETIF_FLAG_UP) { + 8007b98: 687b ldr r3, [r7, #4] + 8007b9a: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8007b9e: f003 0301 and.w r3, r3, #1 + 8007ba2: 2b00 cmp r3, #0 + 8007ba4: d012 beq.n 8007bcc + netif->flags &= ~NETIF_FLAG_UP; + 8007ba6: 687b ldr r3, [r7, #4] + 8007ba8: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8007bac: f023 0301 bic.w r3, r3, #1 + 8007bb0: b2da uxtb r2, r3 + 8007bb2: 687b ldr r3, [r7, #4] + 8007bb4: f883 2033 strb.w r2, [r3, #51] ; 0x33 + MIB2_COPY_SYSUPTIME_TO(&netif->ts); + +#if LWIP_IPV4 && LWIP_ARP + if (netif->flags & NETIF_FLAG_ETHARP) { + 8007bb8: 687b ldr r3, [r7, #4] + 8007bba: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8007bbe: f003 0308 and.w r3, r3, #8 + 8007bc2: 2b00 cmp r3, #0 + 8007bc4: d002 beq.n 8007bcc + etharp_cleanup_netif(netif); + 8007bc6: 6878 ldr r0, [r7, #4] + 8007bc8: f008 ff24 bl 8010a14 + nd6_cleanup_netif(netif); +#endif /* LWIP_IPV6 */ + + NETIF_STATUS_CALLBACK(netif); + } +} + 8007bcc: bf00 nop + 8007bce: 3708 adds r7, #8 + 8007bd0: 46bd mov sp, r7 + 8007bd2: bd80 pop {r7, pc} + +08007bd4 : + * @ingroup netif + * Set callback to be called when link is brought up/down + */ +void +netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback) +{ + 8007bd4: b480 push {r7} + 8007bd6: b083 sub sp, #12 + 8007bd8: af00 add r7, sp, #0 + 8007bda: 6078 str r0, [r7, #4] + 8007bdc: 6039 str r1, [r7, #0] + if (netif) { + 8007bde: 687b ldr r3, [r7, #4] + 8007be0: 2b00 cmp r3, #0 + 8007be2: d002 beq.n 8007bea + netif->link_callback = link_callback; + 8007be4: 687b ldr r3, [r7, #4] + 8007be6: 683a ldr r2, [r7, #0] + 8007be8: 61da str r2, [r3, #28] + } +} + 8007bea: bf00 nop + 8007bec: 370c adds r7, #12 + 8007bee: 46bd mov sp, r7 + 8007bf0: bc80 pop {r7} + 8007bf2: 4770 bx lr + +08007bf4 : +#if !NO_SYS +static +#endif /* !NO_SYS */ +void +pbuf_free_ooseq(void) +{ + 8007bf4: b580 push {r7, lr} + 8007bf6: b082 sub sp, #8 + 8007bf8: af00 add r7, sp, #0 + struct tcp_pcb* pcb; + SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); + 8007bfa: 4b0e ldr r3, [pc, #56] ; (8007c34 ) + 8007bfc: 2200 movs r2, #0 + 8007bfe: 701a strb r2, [r3, #0] + + for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { + 8007c00: 4b0d ldr r3, [pc, #52] ; (8007c38 ) + 8007c02: 681b ldr r3, [r3, #0] + 8007c04: 607b str r3, [r7, #4] + 8007c06: e00f b.n 8007c28 + if (NULL != pcb->ooseq) { + 8007c08: 687b ldr r3, [r7, #4] + 8007c0a: 6f1b ldr r3, [r3, #112] ; 0x70 + 8007c0c: 2b00 cmp r3, #0 + 8007c0e: d008 beq.n 8007c22 + /** Free the ooseq pbufs of one PCB only */ + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free_ooseq: freeing out-of-sequence pbufs\n")); + tcp_segs_free(pcb->ooseq); + 8007c10: 687b ldr r3, [r7, #4] + 8007c12: 6f1b ldr r3, [r3, #112] ; 0x70 + 8007c14: 4618 mov r0, r3 + 8007c16: f001 ff0a bl 8009a2e + pcb->ooseq = NULL; + 8007c1a: 687b ldr r3, [r7, #4] + 8007c1c: 2200 movs r2, #0 + 8007c1e: 671a str r2, [r3, #112] ; 0x70 + return; + 8007c20: e005 b.n 8007c2e + for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { + 8007c22: 687b ldr r3, [r7, #4] + 8007c24: 68db ldr r3, [r3, #12] + 8007c26: 607b str r3, [r7, #4] + 8007c28: 687b ldr r3, [r7, #4] + 8007c2a: 2b00 cmp r3, #0 + 8007c2c: d1ec bne.n 8007c08 + } + } +} + 8007c2e: 3708 adds r7, #8 + 8007c30: 46bd mov sp, r7 + 8007c32: bd80 pop {r7, pc} + 8007c34: 20006f65 .word 0x20006f65 + 8007c38: 20006f74 .word 0x20006f74 + +08007c3c : +#endif /* !NO_SYS */ + +/** Queue a call to pbuf_free_ooseq if not already queued. */ +static void +pbuf_pool_is_empty(void) +{ + 8007c3c: b480 push {r7} + 8007c3e: af00 add r7, sp, #0 +#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL + SYS_ARCH_SET(pbuf_free_ooseq_pending, 1); + 8007c40: 4b03 ldr r3, [pc, #12] ; (8007c50 ) + 8007c42: 2201 movs r2, #1 + 8007c44: 701a strb r2, [r3, #0] + if (!queued) { + /* queue a call to pbuf_free_ooseq if not already queued */ + PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); + } +#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ +} + 8007c46: bf00 nop + 8007c48: 46bd mov sp, r7 + 8007c4a: bc80 pop {r7} + 8007c4c: 4770 bx lr + 8007c4e: bf00 nop + 8007c50: 20006f65 .word 0x20006f65 + +08007c54 : + * @return the allocated pbuf. If multiple pbufs where allocated, this + * is the first pbuf of a pbuf chain. + */ +struct pbuf * +pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) +{ + 8007c54: b580 push {r7, lr} + 8007c56: b088 sub sp, #32 + 8007c58: af00 add r7, sp, #0 + 8007c5a: 4603 mov r3, r0 + 8007c5c: 71fb strb r3, [r7, #7] + 8007c5e: 460b mov r3, r1 + 8007c60: 80bb strh r3, [r7, #4] + 8007c62: 4613 mov r3, r2 + 8007c64: 71bb strb r3, [r7, #6] + u16_t offset; + s32_t rem_len; /* remaining length */ + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); + + /* determine header offset */ + switch (layer) { + 8007c66: 79fb ldrb r3, [r7, #7] + 8007c68: 2b04 cmp r3, #4 + 8007c6a: d81c bhi.n 8007ca6 + 8007c6c: a201 add r2, pc, #4 ; (adr r2, 8007c74 ) + 8007c6e: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8007c72: bf00 nop + 8007c74: 08007c89 .word 0x08007c89 + 8007c78: 08007c8f .word 0x08007c8f + 8007c7c: 08007c95 .word 0x08007c95 + 8007c80: 08007c9b .word 0x08007c9b + 8007c84: 08007ca1 .word 0x08007ca1 + case PBUF_TRANSPORT: + /* add room for transport (often TCP) layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; + 8007c88: 2336 movs r3, #54 ; 0x36 + 8007c8a: 82fb strh r3, [r7, #22] + break; + 8007c8c: e014 b.n 8007cb8 + case PBUF_IP: + /* add room for IP layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; + 8007c8e: 2322 movs r3, #34 ; 0x22 + 8007c90: 82fb strh r3, [r7, #22] + break; + 8007c92: e011 b.n 8007cb8 + case PBUF_LINK: + /* add room for link layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; + 8007c94: 230e movs r3, #14 + 8007c96: 82fb strh r3, [r7, #22] + break; + 8007c98: e00e b.n 8007cb8 + case PBUF_RAW_TX: + /* add room for encapsulating link layer headers (e.g. 802.11) */ + offset = PBUF_LINK_ENCAPSULATION_HLEN; + 8007c9a: 2300 movs r3, #0 + 8007c9c: 82fb strh r3, [r7, #22] + break; + 8007c9e: e00b b.n 8007cb8 + case PBUF_RAW: + /* no offset (e.g. RX buffers or chain successors) */ + offset = 0; + 8007ca0: 2300 movs r3, #0 + 8007ca2: 82fb strh r3, [r7, #22] + break; + 8007ca4: e008 b.n 8007cb8 + default: + LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); + 8007ca6: 4ba1 ldr r3, [pc, #644] ; (8007f2c ) + 8007ca8: f44f 728b mov.w r2, #278 ; 0x116 + 8007cac: 49a0 ldr r1, [pc, #640] ; (8007f30 ) + 8007cae: 48a1 ldr r0, [pc, #644] ; (8007f34 ) + 8007cb0: f00b f868 bl 8012d84 + return NULL; + 8007cb4: 2300 movs r3, #0 + 8007cb6: e15c b.n 8007f72 + } + + switch (type) { + 8007cb8: 79bb ldrb r3, [r7, #6] + 8007cba: 2b03 cmp r3, #3 + 8007cbc: d00d beq.n 8007cda + 8007cbe: 2b03 cmp r3, #3 + 8007cc0: f300 8146 bgt.w 8007f50 + 8007cc4: 2b00 cmp r3, #0 + 8007cc6: f000 80d0 beq.w 8007e6a + 8007cca: 2b00 cmp r3, #0 + 8007ccc: f2c0 8140 blt.w 8007f50 + 8007cd0: 3b01 subs r3, #1 + 8007cd2: 2b01 cmp r3, #1 + 8007cd4: f200 813c bhi.w 8007f50 + 8007cd8: e10d b.n 8007ef6 + case PBUF_POOL: + /* allocate head of pbuf chain into p */ + p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); + 8007cda: 2008 movs r0, #8 + 8007cdc: f7ff fda2 bl 8007824 + 8007ce0: 61f8 str r0, [r7, #28] + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); + if (p == NULL) { + 8007ce2: 69fb ldr r3, [r7, #28] + 8007ce4: 2b00 cmp r3, #0 + 8007ce6: d103 bne.n 8007cf0 + PBUF_POOL_IS_EMPTY(); + 8007ce8: f7ff ffa8 bl 8007c3c + return NULL; + 8007cec: 2300 movs r3, #0 + 8007cee: e140 b.n 8007f72 + } + p->type = type; + 8007cf0: 69fb ldr r3, [r7, #28] + 8007cf2: 79ba ldrb r2, [r7, #6] + 8007cf4: 731a strb r2, [r3, #12] + p->next = NULL; + 8007cf6: 69fb ldr r3, [r7, #28] + 8007cf8: 2200 movs r2, #0 + 8007cfa: 601a str r2, [r3, #0] + + /* make the payload pointer point 'offset' bytes into pbuf data memory */ + p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); + 8007cfc: 8afb ldrh r3, [r7, #22] + 8007cfe: 3310 adds r3, #16 + 8007d00: 69fa ldr r2, [r7, #28] + 8007d02: 4413 add r3, r2 + 8007d04: 3303 adds r3, #3 + 8007d06: f023 0303 bic.w r3, r3, #3 + 8007d0a: 461a mov r2, r3 + 8007d0c: 69fb ldr r3, [r7, #28] + 8007d0e: 605a str r2, [r3, #4] + LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", + 8007d10: 69fb ldr r3, [r7, #28] + 8007d12: 685b ldr r3, [r3, #4] + 8007d14: f003 0303 and.w r3, r3, #3 + 8007d18: 2b00 cmp r3, #0 + 8007d1a: d006 beq.n 8007d2a + 8007d1c: 4b83 ldr r3, [pc, #524] ; (8007f2c ) + 8007d1e: f44f 7294 mov.w r2, #296 ; 0x128 + 8007d22: 4985 ldr r1, [pc, #532] ; (8007f38 ) + 8007d24: 4883 ldr r0, [pc, #524] ; (8007f34 ) + 8007d26: f00b f82d bl 8012d84 + ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); + /* the total length of the pbuf chain is the requested size */ + p->tot_len = length; + 8007d2a: 69fb ldr r3, [r7, #28] + 8007d2c: 88ba ldrh r2, [r7, #4] + 8007d2e: 811a strh r2, [r3, #8] + /* set the length of the first pbuf in the chain */ + p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); + 8007d30: 8afb ldrh r3, [r7, #22] + 8007d32: 3303 adds r3, #3 + 8007d34: f023 0303 bic.w r3, r3, #3 + 8007d38: f5c3 7214 rsb r2, r3, #592 ; 0x250 + 8007d3c: 88bb ldrh r3, [r7, #4] + 8007d3e: 4293 cmp r3, r2 + 8007d40: bf28 it cs + 8007d42: 4613 movcs r3, r2 + 8007d44: b29a uxth r2, r3 + 8007d46: 69fb ldr r3, [r7, #28] + 8007d48: 815a strh r2, [r3, #10] + LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", + 8007d4a: 69fb ldr r3, [r7, #28] + 8007d4c: 685b ldr r3, [r3, #4] + 8007d4e: 69fa ldr r2, [r7, #28] + 8007d50: 8952 ldrh r2, [r2, #10] + 8007d52: 441a add r2, r3 + 8007d54: 69fb ldr r3, [r7, #28] + 8007d56: f503 7318 add.w r3, r3, #608 ; 0x260 + 8007d5a: 429a cmp r2, r3 + 8007d5c: d906 bls.n 8007d6c + 8007d5e: 4b73 ldr r3, [pc, #460] ; (8007f2c ) + 8007d60: f44f 7297 mov.w r2, #302 ; 0x12e + 8007d64: 4975 ldr r1, [pc, #468] ; (8007f3c ) + 8007d66: 4873 ldr r0, [pc, #460] ; (8007f34 ) + 8007d68: f00b f80c bl 8012d84 + ((u8_t*)p->payload + p->len <= + (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); + LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", + 8007d6c: 8afb ldrh r3, [r7, #22] + 8007d6e: 3303 adds r3, #3 + 8007d70: f023 0303 bic.w r3, r3, #3 + 8007d74: f5b3 7f14 cmp.w r3, #592 ; 0x250 + 8007d78: d106 bne.n 8007d88 + 8007d7a: 4b6c ldr r3, [pc, #432] ; (8007f2c ) + 8007d7c: f240 1231 movw r2, #305 ; 0x131 + 8007d80: 496f ldr r1, [pc, #444] ; (8007f40 ) + 8007d82: 486c ldr r0, [pc, #432] ; (8007f34 ) + 8007d84: f00a fffe bl 8012d84 + (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); + /* set reference count (needed here in case we fail) */ + p->ref = 1; + 8007d88: 69fb ldr r3, [r7, #28] + 8007d8a: 2201 movs r2, #1 + 8007d8c: 81da strh r2, [r3, #14] + + /* now allocate the tail of the pbuf chain */ + + /* remember first pbuf for linkage in next iteration */ + r = p; + 8007d8e: 69fb ldr r3, [r7, #28] + 8007d90: 61bb str r3, [r7, #24] + /* remaining length to be allocated */ + rem_len = length - p->len; + 8007d92: 88bb ldrh r3, [r7, #4] + 8007d94: 69fa ldr r2, [r7, #28] + 8007d96: 8952 ldrh r2, [r2, #10] + 8007d98: 1a9b subs r3, r3, r2 + 8007d9a: 613b str r3, [r7, #16] + /* any remaining pbufs to be allocated? */ + while (rem_len > 0) { + 8007d9c: e061 b.n 8007e62 + q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); + 8007d9e: 2008 movs r0, #8 + 8007da0: f7ff fd40 bl 8007824 + 8007da4: 60f8 str r0, [r7, #12] + if (q == NULL) { + 8007da6: 68fb ldr r3, [r7, #12] + 8007da8: 2b00 cmp r3, #0 + 8007daa: d106 bne.n 8007dba + PBUF_POOL_IS_EMPTY(); + 8007dac: f7ff ff46 bl 8007c3c + /* free chain so far allocated */ + pbuf_free(p); + 8007db0: 69f8 ldr r0, [r7, #28] + 8007db2: f000 fac7 bl 8008344 + /* bail out unsuccessfully */ + return NULL; + 8007db6: 2300 movs r3, #0 + 8007db8: e0db b.n 8007f72 + } + q->type = type; + 8007dba: 68fb ldr r3, [r7, #12] + 8007dbc: 79ba ldrb r2, [r7, #6] + 8007dbe: 731a strb r2, [r3, #12] + q->flags = 0; + 8007dc0: 68fb ldr r3, [r7, #12] + 8007dc2: 2200 movs r2, #0 + 8007dc4: 735a strb r2, [r3, #13] + q->next = NULL; + 8007dc6: 68fb ldr r3, [r7, #12] + 8007dc8: 2200 movs r2, #0 + 8007dca: 601a str r2, [r3, #0] + /* make previous pbuf point to this pbuf */ + r->next = q; + 8007dcc: 69bb ldr r3, [r7, #24] + 8007dce: 68fa ldr r2, [r7, #12] + 8007dd0: 601a str r2, [r3, #0] + /* set total length of this pbuf and next in chain */ + LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); + 8007dd2: 693b ldr r3, [r7, #16] + 8007dd4: f64f 72fe movw r2, #65534 ; 0xfffe + 8007dd8: 4293 cmp r3, r2 + 8007dda: dd06 ble.n 8007dea + 8007ddc: 4b53 ldr r3, [pc, #332] ; (8007f2c ) + 8007dde: f44f 72a6 mov.w r2, #332 ; 0x14c + 8007de2: 4958 ldr r1, [pc, #352] ; (8007f44 ) + 8007de4: 4853 ldr r0, [pc, #332] ; (8007f34 ) + 8007de6: f00a ffcd bl 8012d84 + q->tot_len = (u16_t)rem_len; + 8007dea: 693b ldr r3, [r7, #16] + 8007dec: b29a uxth r2, r3 + 8007dee: 68fb ldr r3, [r7, #12] + 8007df0: 811a strh r2, [r3, #8] + /* this pbuf length is pool size, unless smaller sized tail */ + q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); + 8007df2: 693b ldr r3, [r7, #16] + 8007df4: b29b uxth r3, r3 + 8007df6: f5b3 7f14 cmp.w r3, #592 ; 0x250 + 8007dfa: bf28 it cs + 8007dfc: f44f 7314 movcs.w r3, #592 ; 0x250 + 8007e00: b29a uxth r2, r3 + 8007e02: 68fb ldr r3, [r7, #12] + 8007e04: 815a strh r2, [r3, #10] + q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); + 8007e06: 68fb ldr r3, [r7, #12] + 8007e08: f103 0210 add.w r2, r3, #16 + 8007e0c: 68fb ldr r3, [r7, #12] + 8007e0e: 605a str r2, [r3, #4] + LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", + 8007e10: 68fb ldr r3, [r7, #12] + 8007e12: 685b ldr r3, [r3, #4] + 8007e14: f003 0303 and.w r3, r3, #3 + 8007e18: 2b00 cmp r3, #0 + 8007e1a: d006 beq.n 8007e2a + 8007e1c: 4b43 ldr r3, [pc, #268] ; (8007f2c ) + 8007e1e: f240 1251 movw r2, #337 ; 0x151 + 8007e22: 4949 ldr r1, [pc, #292] ; (8007f48 ) + 8007e24: 4843 ldr r0, [pc, #268] ; (8007f34 ) + 8007e26: f00a ffad bl 8012d84 + ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); + LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", + 8007e2a: 69fb ldr r3, [r7, #28] + 8007e2c: 685b ldr r3, [r3, #4] + 8007e2e: 69fa ldr r2, [r7, #28] + 8007e30: 8952 ldrh r2, [r2, #10] + 8007e32: 441a add r2, r3 + 8007e34: 69fb ldr r3, [r7, #28] + 8007e36: f503 7318 add.w r3, r3, #608 ; 0x260 + 8007e3a: 429a cmp r2, r3 + 8007e3c: d906 bls.n 8007e4c + 8007e3e: 4b3b ldr r3, [pc, #236] ; (8007f2c ) + 8007e40: f240 1253 movw r2, #339 ; 0x153 + 8007e44: 493d ldr r1, [pc, #244] ; (8007f3c ) + 8007e46: 483b ldr r0, [pc, #236] ; (8007f34 ) + 8007e48: f00a ff9c bl 8012d84 + ((u8_t*)p->payload + p->len <= + (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); + q->ref = 1; + 8007e4c: 68fb ldr r3, [r7, #12] + 8007e4e: 2201 movs r2, #1 + 8007e50: 81da strh r2, [r3, #14] + /* calculate remaining length to be allocated */ + rem_len -= q->len; + 8007e52: 68fb ldr r3, [r7, #12] + 8007e54: 895b ldrh r3, [r3, #10] + 8007e56: 461a mov r2, r3 + 8007e58: 693b ldr r3, [r7, #16] + 8007e5a: 1a9b subs r3, r3, r2 + 8007e5c: 613b str r3, [r7, #16] + /* remember this pbuf for linkage in next iteration */ + r = q; + 8007e5e: 68fb ldr r3, [r7, #12] + 8007e60: 61bb str r3, [r7, #24] + while (rem_len > 0) { + 8007e62: 693b ldr r3, [r7, #16] + 8007e64: 2b00 cmp r3, #0 + 8007e66: dc9a bgt.n 8007d9e + } + /* end of chain */ + /*r->next = NULL;*/ + + break; + 8007e68: e07c b.n 8007f64 + case PBUF_RAM: + { + mem_size_t alloc_len = LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length); + 8007e6a: 8afb ldrh r3, [r7, #22] + 8007e6c: 3313 adds r3, #19 + 8007e6e: b29b uxth r3, r3 + 8007e70: f023 0303 bic.w r3, r3, #3 + 8007e74: b29a uxth r2, r3 + 8007e76: 88bb ldrh r3, [r7, #4] + 8007e78: 3303 adds r3, #3 + 8007e7a: b29b uxth r3, r3 + 8007e7c: f023 0303 bic.w r3, r3, #3 + 8007e80: b29b uxth r3, r3 + 8007e82: 4413 add r3, r2 + 8007e84: 817b strh r3, [r7, #10] + + /* bug #50040: Check for integer overflow when calculating alloc_len */ + if (alloc_len < LWIP_MEM_ALIGN_SIZE(length)) { + 8007e86: 897a ldrh r2, [r7, #10] + 8007e88: 88bb ldrh r3, [r7, #4] + 8007e8a: 3303 adds r3, #3 + 8007e8c: f023 0303 bic.w r3, r3, #3 + 8007e90: 429a cmp r2, r3 + 8007e92: d201 bcs.n 8007e98 + return NULL; + 8007e94: 2300 movs r3, #0 + 8007e96: e06c b.n 8007f72 + } + + /* If pbuf is to be allocated in RAM, allocate memory for it. */ + p = (struct pbuf*)mem_malloc(alloc_len); + 8007e98: 897b ldrh r3, [r7, #10] + 8007e9a: 4618 mov r0, r3 + 8007e9c: f7ff fb66 bl 800756c + 8007ea0: 61f8 str r0, [r7, #28] + } + + if (p == NULL) { + 8007ea2: 69fb ldr r3, [r7, #28] + 8007ea4: 2b00 cmp r3, #0 + 8007ea6: d101 bne.n 8007eac + return NULL; + 8007ea8: 2300 movs r3, #0 + 8007eaa: e062 b.n 8007f72 + } + /* Set up internal structure of the pbuf. */ + p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); + 8007eac: 8afb ldrh r3, [r7, #22] + 8007eae: 3310 adds r3, #16 + 8007eb0: 69fa ldr r2, [r7, #28] + 8007eb2: 4413 add r3, r2 + 8007eb4: 3303 adds r3, #3 + 8007eb6: f023 0303 bic.w r3, r3, #3 + 8007eba: 461a mov r2, r3 + 8007ebc: 69fb ldr r3, [r7, #28] + 8007ebe: 605a str r2, [r3, #4] + p->len = p->tot_len = length; + 8007ec0: 69fb ldr r3, [r7, #28] + 8007ec2: 88ba ldrh r2, [r7, #4] + 8007ec4: 811a strh r2, [r3, #8] + 8007ec6: 69fb ldr r3, [r7, #28] + 8007ec8: 891a ldrh r2, [r3, #8] + 8007eca: 69fb ldr r3, [r7, #28] + 8007ecc: 815a strh r2, [r3, #10] + p->next = NULL; + 8007ece: 69fb ldr r3, [r7, #28] + 8007ed0: 2200 movs r2, #0 + 8007ed2: 601a str r2, [r3, #0] + p->type = type; + 8007ed4: 69fb ldr r3, [r7, #28] + 8007ed6: 79ba ldrb r2, [r7, #6] + 8007ed8: 731a strb r2, [r3, #12] + + LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", + 8007eda: 69fb ldr r3, [r7, #28] + 8007edc: 685b ldr r3, [r3, #4] + 8007ede: f003 0303 and.w r3, r3, #3 + 8007ee2: 2b00 cmp r3, #0 + 8007ee4: d03d beq.n 8007f62 + 8007ee6: 4b11 ldr r3, [pc, #68] ; (8007f2c ) + 8007ee8: f44f 72bb mov.w r2, #374 ; 0x176 + 8007eec: 4917 ldr r1, [pc, #92] ; (8007f4c ) + 8007eee: 4811 ldr r0, [pc, #68] ; (8007f34 ) + 8007ef0: f00a ff48 bl 8012d84 + ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); + break; + 8007ef4: e035 b.n 8007f62 + /* pbuf references existing (non-volatile static constant) ROM payload? */ + case PBUF_ROM: + /* pbuf references existing (externally allocated) RAM payload? */ + case PBUF_REF: + /* only allocate memory for the pbuf structure */ + p = (struct pbuf *)memp_malloc(MEMP_PBUF); + 8007ef6: 2007 movs r0, #7 + 8007ef8: f7ff fc94 bl 8007824 + 8007efc: 61f8 str r0, [r7, #28] + if (p == NULL) { + 8007efe: 69fb ldr r3, [r7, #28] + 8007f00: 2b00 cmp r3, #0 + 8007f02: d101 bne.n 8007f08 + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", + (type == PBUF_ROM) ? "ROM" : "REF")); + return NULL; + 8007f04: 2300 movs r3, #0 + 8007f06: e034 b.n 8007f72 + } + /* caller must set this field properly, afterwards */ + p->payload = NULL; + 8007f08: 69fb ldr r3, [r7, #28] + 8007f0a: 2200 movs r2, #0 + 8007f0c: 605a str r2, [r3, #4] + p->len = p->tot_len = length; + 8007f0e: 69fb ldr r3, [r7, #28] + 8007f10: 88ba ldrh r2, [r7, #4] + 8007f12: 811a strh r2, [r3, #8] + 8007f14: 69fb ldr r3, [r7, #28] + 8007f16: 891a ldrh r2, [r3, #8] + 8007f18: 69fb ldr r3, [r7, #28] + 8007f1a: 815a strh r2, [r3, #10] + p->next = NULL; + 8007f1c: 69fb ldr r3, [r7, #28] + 8007f1e: 2200 movs r2, #0 + 8007f20: 601a str r2, [r3, #0] + p->type = type; + 8007f22: 69fb ldr r3, [r7, #28] + 8007f24: 79ba ldrb r2, [r7, #6] + 8007f26: 731a strb r2, [r3, #12] + break; + 8007f28: e01c b.n 8007f64 + 8007f2a: bf00 nop + 8007f2c: 080147f8 .word 0x080147f8 + 8007f30: 08014828 .word 0x08014828 + 8007f34: 08014844 .word 0x08014844 + 8007f38: 0801486c .word 0x0801486c + 8007f3c: 0801489c .word 0x0801489c + 8007f40: 080148d0 .word 0x080148d0 + 8007f44: 08014904 .word 0x08014904 + 8007f48: 08014918 .word 0x08014918 + 8007f4c: 08014948 .word 0x08014948 + default: + LWIP_ASSERT("pbuf_alloc: erroneous type", 0); + 8007f50: 4b0a ldr r3, [pc, #40] ; (8007f7c ) + 8007f52: f44f 72c6 mov.w r2, #396 ; 0x18c + 8007f56: 490a ldr r1, [pc, #40] ; (8007f80 ) + 8007f58: 480a ldr r0, [pc, #40] ; (8007f84 ) + 8007f5a: f00a ff13 bl 8012d84 + return NULL; + 8007f5e: 2300 movs r3, #0 + 8007f60: e007 b.n 8007f72 + break; + 8007f62: bf00 nop + } + /* set reference count */ + p->ref = 1; + 8007f64: 69fb ldr r3, [r7, #28] + 8007f66: 2201 movs r2, #1 + 8007f68: 81da strh r2, [r3, #14] + /* set flags */ + p->flags = 0; + 8007f6a: 69fb ldr r3, [r7, #28] + 8007f6c: 2200 movs r2, #0 + 8007f6e: 735a strb r2, [r3, #13] + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); + return p; + 8007f70: 69fb ldr r3, [r7, #28] +} + 8007f72: 4618 mov r0, r3 + 8007f74: 3720 adds r7, #32 + 8007f76: 46bd mov sp, r7 + 8007f78: bd80 pop {r7, pc} + 8007f7a: bf00 nop + 8007f7c: 080147f8 .word 0x080147f8 + 8007f80: 08014974 .word 0x08014974 + 8007f84: 08014844 .word 0x08014844 + +08007f88 : + * big enough to hold 'length' plus the header size + */ +struct pbuf* +pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, + void *payload_mem, u16_t payload_mem_len) +{ + 8007f88: b580 push {r7, lr} + 8007f8a: b084 sub sp, #16 + 8007f8c: af00 add r7, sp, #0 + 8007f8e: 603b str r3, [r7, #0] + 8007f90: 4603 mov r3, r0 + 8007f92: 71fb strb r3, [r7, #7] + 8007f94: 460b mov r3, r1 + 8007f96: 80bb strh r3, [r7, #4] + 8007f98: 4613 mov r3, r2 + 8007f9a: 71bb strb r3, [r7, #6] + u16_t offset; + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length)); + + /* determine header offset */ + switch (l) { + 8007f9c: 79fb ldrb r3, [r7, #7] + 8007f9e: 2b04 cmp r3, #4 + 8007fa0: d81b bhi.n 8007fda + 8007fa2: a201 add r2, pc, #4 ; (adr r2, 8007fa8 ) + 8007fa4: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8007fa8: 08007fbd .word 0x08007fbd + 8007fac: 08007fc3 .word 0x08007fc3 + 8007fb0: 08007fc9 .word 0x08007fc9 + 8007fb4: 08007fcf .word 0x08007fcf + 8007fb8: 08007fd5 .word 0x08007fd5 + case PBUF_TRANSPORT: + /* add room for transport (often TCP) layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; + 8007fbc: 2336 movs r3, #54 ; 0x36 + 8007fbe: 81fb strh r3, [r7, #14] + break; + 8007fc0: e014 b.n 8007fec + case PBUF_IP: + /* add room for IP layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; + 8007fc2: 2322 movs r3, #34 ; 0x22 + 8007fc4: 81fb strh r3, [r7, #14] + break; + 8007fc6: e011 b.n 8007fec + case PBUF_LINK: + /* add room for link layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; + 8007fc8: 230e movs r3, #14 + 8007fca: 81fb strh r3, [r7, #14] + break; + 8007fcc: e00e b.n 8007fec + case PBUF_RAW_TX: + /* add room for encapsulating link layer headers (e.g. 802.11) */ + offset = PBUF_LINK_ENCAPSULATION_HLEN; + 8007fce: 2300 movs r3, #0 + 8007fd0: 81fb strh r3, [r7, #14] + break; + 8007fd2: e00b b.n 8007fec + case PBUF_RAW: + offset = 0; + 8007fd4: 2300 movs r3, #0 + 8007fd6: 81fb strh r3, [r7, #14] + break; + 8007fd8: e008 b.n 8007fec + default: + LWIP_ASSERT("pbuf_alloced_custom: bad pbuf layer", 0); + 8007fda: 4b1d ldr r3, [pc, #116] ; (8008050 ) + 8007fdc: f240 12c5 movw r2, #453 ; 0x1c5 + 8007fe0: 491c ldr r1, [pc, #112] ; (8008054 ) + 8007fe2: 481d ldr r0, [pc, #116] ; (8008058 ) + 8007fe4: f00a fece bl 8012d84 + return NULL; + 8007fe8: 2300 movs r3, #0 + 8007fea: e02d b.n 8008048 + } + + if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) { + 8007fec: 89fb ldrh r3, [r7, #14] + 8007fee: 3303 adds r3, #3 + 8007ff0: f023 0203 bic.w r2, r3, #3 + 8007ff4: 88bb ldrh r3, [r7, #4] + 8007ff6: 441a add r2, r3 + 8007ff8: 8bbb ldrh r3, [r7, #28] + 8007ffa: 429a cmp r2, r3 + 8007ffc: d901 bls.n 8008002 + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); + return NULL; + 8007ffe: 2300 movs r3, #0 + 8008000: e022 b.n 8008048 + } + + p->pbuf.next = NULL; + 8008002: 683b ldr r3, [r7, #0] + 8008004: 2200 movs r2, #0 + 8008006: 601a str r2, [r3, #0] + if (payload_mem != NULL) { + 8008008: 69bb ldr r3, [r7, #24] + 800800a: 2b00 cmp r3, #0 + 800800c: d008 beq.n 8008020 + p->pbuf.payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); + 800800e: 89fb ldrh r3, [r7, #14] + 8008010: 3303 adds r3, #3 + 8008012: f023 0303 bic.w r3, r3, #3 + 8008016: 69ba ldr r2, [r7, #24] + 8008018: 441a add r2, r3 + 800801a: 683b ldr r3, [r7, #0] + 800801c: 605a str r2, [r3, #4] + 800801e: e002 b.n 8008026 + } else { + p->pbuf.payload = NULL; + 8008020: 683b ldr r3, [r7, #0] + 8008022: 2200 movs r2, #0 + 8008024: 605a str r2, [r3, #4] + } + p->pbuf.flags = PBUF_FLAG_IS_CUSTOM; + 8008026: 683b ldr r3, [r7, #0] + 8008028: 2202 movs r2, #2 + 800802a: 735a strb r2, [r3, #13] + p->pbuf.len = p->pbuf.tot_len = length; + 800802c: 683b ldr r3, [r7, #0] + 800802e: 88ba ldrh r2, [r7, #4] + 8008030: 811a strh r2, [r3, #8] + 8008032: 683b ldr r3, [r7, #0] + 8008034: 891a ldrh r2, [r3, #8] + 8008036: 683b ldr r3, [r7, #0] + 8008038: 815a strh r2, [r3, #10] + p->pbuf.type = type; + 800803a: 683b ldr r3, [r7, #0] + 800803c: 79ba ldrb r2, [r7, #6] + 800803e: 731a strb r2, [r3, #12] + p->pbuf.ref = 1; + 8008040: 683b ldr r3, [r7, #0] + 8008042: 2201 movs r2, #1 + 8008044: 81da strh r2, [r3, #14] + return &p->pbuf; + 8008046: 683b ldr r3, [r7, #0] +} + 8008048: 4618 mov r0, r3 + 800804a: 3710 adds r7, #16 + 800804c: 46bd mov sp, r7 + 800804e: bd80 pop {r7, pc} + 8008050: 080147f8 .word 0x080147f8 + 8008054: 08014990 .word 0x08014990 + 8008058: 08014844 .word 0x08014844 + +0800805c : + * + * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). + */ +void +pbuf_realloc(struct pbuf *p, u16_t new_len) +{ + 800805c: b580 push {r7, lr} + 800805e: b086 sub sp, #24 + 8008060: af00 add r7, sp, #0 + 8008062: 6078 str r0, [r7, #4] + 8008064: 460b mov r3, r1 + 8008066: 807b strh r3, [r7, #2] + struct pbuf *q; + u16_t rem_len; /* remaining length */ + s32_t grow; + + LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL); + 8008068: 687b ldr r3, [r7, #4] + 800806a: 2b00 cmp r3, #0 + 800806c: d106 bne.n 800807c + 800806e: 4b4b ldr r3, [pc, #300] ; (800819c ) + 8008070: f240 12f3 movw r2, #499 ; 0x1f3 + 8008074: 494a ldr r1, [pc, #296] ; (80081a0 ) + 8008076: 484b ldr r0, [pc, #300] ; (80081a4 ) + 8008078: f00a fe84 bl 8012d84 + LWIP_ASSERT("pbuf_realloc: sane p->type", p->type == PBUF_POOL || + 800807c: 687b ldr r3, [r7, #4] + 800807e: 7b1b ldrb r3, [r3, #12] + 8008080: 2b03 cmp r3, #3 + 8008082: d012 beq.n 80080aa + 8008084: 687b ldr r3, [r7, #4] + 8008086: 7b1b ldrb r3, [r3, #12] + 8008088: 2b01 cmp r3, #1 + 800808a: d00e beq.n 80080aa + 800808c: 687b ldr r3, [r7, #4] + 800808e: 7b1b ldrb r3, [r3, #12] + 8008090: 2b00 cmp r3, #0 + 8008092: d00a beq.n 80080aa + 8008094: 687b ldr r3, [r7, #4] + 8008096: 7b1b ldrb r3, [r3, #12] + 8008098: 2b02 cmp r3, #2 + 800809a: d006 beq.n 80080aa + 800809c: 4b3f ldr r3, [pc, #252] ; (800819c ) + 800809e: f44f 72fa mov.w r2, #500 ; 0x1f4 + 80080a2: 4941 ldr r1, [pc, #260] ; (80081a8 ) + 80080a4: 483f ldr r0, [pc, #252] ; (80081a4 ) + 80080a6: f00a fe6d bl 8012d84 + p->type == PBUF_ROM || + p->type == PBUF_RAM || + p->type == PBUF_REF); + + /* desired length larger than current length? */ + if (new_len >= p->tot_len) { + 80080aa: 687b ldr r3, [r7, #4] + 80080ac: 891b ldrh r3, [r3, #8] + 80080ae: 887a ldrh r2, [r7, #2] + 80080b0: 429a cmp r2, r3 + 80080b2: d26e bcs.n 8008192 + return; + } + + /* the pbuf chain grows by (new_len - p->tot_len) bytes + * (which may be negative in case of shrinking) */ + grow = new_len - p->tot_len; + 80080b4: 887b ldrh r3, [r7, #2] + 80080b6: 687a ldr r2, [r7, #4] + 80080b8: 8912 ldrh r2, [r2, #8] + 80080ba: 1a9b subs r3, r3, r2 + 80080bc: 60fb str r3, [r7, #12] + + /* first, step over any pbufs that should remain in the chain */ + rem_len = new_len; + 80080be: 887b ldrh r3, [r7, #2] + 80080c0: 827b strh r3, [r7, #18] + q = p; + 80080c2: 687b ldr r3, [r7, #4] + 80080c4: 617b str r3, [r7, #20] + /* should this pbuf be kept? */ + while (rem_len > q->len) { + 80080c6: e025 b.n 8008114 + /* decrease remaining length by pbuf length */ + rem_len -= q->len; + 80080c8: 697b ldr r3, [r7, #20] + 80080ca: 895b ldrh r3, [r3, #10] + 80080cc: 8a7a ldrh r2, [r7, #18] + 80080ce: 1ad3 subs r3, r2, r3 + 80080d0: 827b strh r3, [r7, #18] + /* decrease total length indicator */ + LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); + 80080d2: 68fb ldr r3, [r7, #12] + 80080d4: f64f 72fe movw r2, #65534 ; 0xfffe + 80080d8: 4293 cmp r3, r2 + 80080da: dd06 ble.n 80080ea + 80080dc: 4b2f ldr r3, [pc, #188] ; (800819c ) + 80080de: f240 220b movw r2, #523 ; 0x20b + 80080e2: 4932 ldr r1, [pc, #200] ; (80081ac ) + 80080e4: 482f ldr r0, [pc, #188] ; (80081a4 ) + 80080e6: f00a fe4d bl 8012d84 + q->tot_len += (u16_t)grow; + 80080ea: 697b ldr r3, [r7, #20] + 80080ec: 891a ldrh r2, [r3, #8] + 80080ee: 68fb ldr r3, [r7, #12] + 80080f0: b29b uxth r3, r3 + 80080f2: 4413 add r3, r2 + 80080f4: b29a uxth r2, r3 + 80080f6: 697b ldr r3, [r7, #20] + 80080f8: 811a strh r2, [r3, #8] + /* proceed to next pbuf in chain */ + q = q->next; + 80080fa: 697b ldr r3, [r7, #20] + 80080fc: 681b ldr r3, [r3, #0] + 80080fe: 617b str r3, [r7, #20] + LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); + 8008100: 697b ldr r3, [r7, #20] + 8008102: 2b00 cmp r3, #0 + 8008104: d106 bne.n 8008114 + 8008106: 4b25 ldr r3, [pc, #148] ; (800819c ) + 8008108: f240 220f movw r2, #527 ; 0x20f + 800810c: 4928 ldr r1, [pc, #160] ; (80081b0 ) + 800810e: 4825 ldr r0, [pc, #148] ; (80081a4 ) + 8008110: f00a fe38 bl 8012d84 + while (rem_len > q->len) { + 8008114: 697b ldr r3, [r7, #20] + 8008116: 895b ldrh r3, [r3, #10] + 8008118: 8a7a ldrh r2, [r7, #18] + 800811a: 429a cmp r2, r3 + 800811c: d8d4 bhi.n 80080c8 + /* we have now reached the new last pbuf (in q) */ + /* rem_len == desired length for pbuf q */ + + /* shrink allocated memory for PBUF_RAM */ + /* (other types merely adjust their length fields */ + if ((q->type == PBUF_RAM) && (rem_len != q->len) + 800811e: 697b ldr r3, [r7, #20] + 8008120: 7b1b ldrb r3, [r3, #12] + 8008122: 2b00 cmp r3, #0 + 8008124: d121 bne.n 800816a + 8008126: 697b ldr r3, [r7, #20] + 8008128: 895b ldrh r3, [r3, #10] + 800812a: 8a7a ldrh r2, [r7, #18] + 800812c: 429a cmp r2, r3 + 800812e: d01c beq.n 800816a +#if LWIP_SUPPORT_CUSTOM_PBUF + && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) + 8008130: 697b ldr r3, [r7, #20] + 8008132: 7b5b ldrb r3, [r3, #13] + 8008134: f003 0302 and.w r3, r3, #2 + 8008138: 2b00 cmp r3, #0 + 800813a: d116 bne.n 800816a +#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ + ) { + /* reallocate and adjust the length of the pbuf that will be split */ + q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); + 800813c: 697b ldr r3, [r7, #20] + 800813e: 685a ldr r2, [r3, #4] + 8008140: 697b ldr r3, [r7, #20] + 8008142: 1ad3 subs r3, r2, r3 + 8008144: b29a uxth r2, r3 + 8008146: 8a7b ldrh r3, [r7, #18] + 8008148: 4413 add r3, r2 + 800814a: b29b uxth r3, r3 + 800814c: 4619 mov r1, r3 + 800814e: 6978 ldr r0, [r7, #20] + 8008150: f7ff f930 bl 80073b4 + 8008154: 6178 str r0, [r7, #20] + LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); + 8008156: 697b ldr r3, [r7, #20] + 8008158: 2b00 cmp r3, #0 + 800815a: d106 bne.n 800816a + 800815c: 4b0f ldr r3, [pc, #60] ; (800819c ) + 800815e: f240 221d movw r2, #541 ; 0x21d + 8008162: 4914 ldr r1, [pc, #80] ; (80081b4 ) + 8008164: 480f ldr r0, [pc, #60] ; (80081a4 ) + 8008166: f00a fe0d bl 8012d84 + } + /* adjust length fields for new last pbuf */ + q->len = rem_len; + 800816a: 697b ldr r3, [r7, #20] + 800816c: 8a7a ldrh r2, [r7, #18] + 800816e: 815a strh r2, [r3, #10] + q->tot_len = q->len; + 8008170: 697b ldr r3, [r7, #20] + 8008172: 895a ldrh r2, [r3, #10] + 8008174: 697b ldr r3, [r7, #20] + 8008176: 811a strh r2, [r3, #8] + + /* any remaining pbufs in chain? */ + if (q->next != NULL) { + 8008178: 697b ldr r3, [r7, #20] + 800817a: 681b ldr r3, [r3, #0] + 800817c: 2b00 cmp r3, #0 + 800817e: d004 beq.n 800818a + /* free remaining pbufs in chain */ + pbuf_free(q->next); + 8008180: 697b ldr r3, [r7, #20] + 8008182: 681b ldr r3, [r3, #0] + 8008184: 4618 mov r0, r3 + 8008186: f000 f8dd bl 8008344 + } + /* q is last packet in chain */ + q->next = NULL; + 800818a: 697b ldr r3, [r7, #20] + 800818c: 2200 movs r2, #0 + 800818e: 601a str r2, [r3, #0] + 8008190: e000 b.n 8008194 + return; + 8008192: bf00 nop + +} + 8008194: 3718 adds r7, #24 + 8008196: 46bd mov sp, r7 + 8008198: bd80 pop {r7, pc} + 800819a: bf00 nop + 800819c: 080147f8 .word 0x080147f8 + 80081a0: 080149b4 .word 0x080149b4 + 80081a4: 08014844 .word 0x08014844 + 80081a8: 080149cc .word 0x080149cc + 80081ac: 080149e8 .word 0x080149e8 + 80081b0: 080149fc .word 0x080149fc + 80081b4: 08014a14 .word 0x08014a14 + +080081b8 : + * @return non-zero on failure, zero on success. + * + */ +static u8_t +pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) +{ + 80081b8: b580 push {r7, lr} + 80081ba: b084 sub sp, #16 + 80081bc: af00 add r7, sp, #0 + 80081be: 6078 str r0, [r7, #4] + 80081c0: 460b mov r3, r1 + 80081c2: 807b strh r3, [r7, #2] + 80081c4: 4613 mov r3, r2 + 80081c6: 707b strb r3, [r7, #1] + u16_t type; + void *payload; + u16_t increment_magnitude; + + LWIP_ASSERT("p != NULL", p != NULL); + 80081c8: 687b ldr r3, [r7, #4] + 80081ca: 2b00 cmp r3, #0 + 80081cc: d106 bne.n 80081dc + 80081ce: 4b46 ldr r3, [pc, #280] ; (80082e8 ) + 80081d0: f240 223f movw r2, #575 ; 0x23f + 80081d4: 4945 ldr r1, [pc, #276] ; (80082ec ) + 80081d6: 4846 ldr r0, [pc, #280] ; (80082f0 ) + 80081d8: f00a fdd4 bl 8012d84 + if ((header_size_increment == 0) || (p == NULL)) { + 80081dc: f9b7 3002 ldrsh.w r3, [r7, #2] + 80081e0: 2b00 cmp r3, #0 + 80081e2: d002 beq.n 80081ea + 80081e4: 687b ldr r3, [r7, #4] + 80081e6: 2b00 cmp r3, #0 + 80081e8: d101 bne.n 80081ee + return 0; + 80081ea: 2300 movs r3, #0 + 80081ec: e078 b.n 80082e0 + } + + if (header_size_increment < 0) { + 80081ee: f9b7 3002 ldrsh.w r3, [r7, #2] + 80081f2: 2b00 cmp r3, #0 + 80081f4: da10 bge.n 8008218 + increment_magnitude = (u16_t)-header_size_increment; + 80081f6: 887b ldrh r3, [r7, #2] + 80081f8: 425b negs r3, r3 + 80081fa: 81fb strh r3, [r7, #14] + /* 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;); + 80081fc: 687b ldr r3, [r7, #4] + 80081fe: 895b ldrh r3, [r3, #10] + 8008200: 89fa ldrh r2, [r7, #14] + 8008202: 429a cmp r2, r3 + 8008204: d90a bls.n 800821c + 8008206: 4b38 ldr r3, [pc, #224] ; (80082e8 ) + 8008208: f240 2247 movw r2, #583 ; 0x247 + 800820c: 4939 ldr r1, [pc, #228] ; (80082f4 ) + 800820e: 4838 ldr r0, [pc, #224] ; (80082f0 ) + 8008210: f00a fdb8 bl 8012d84 + 8008214: 2301 movs r3, #1 + 8008216: e063 b.n 80082e0 + } else { + increment_magnitude = (u16_t)header_size_increment; + 8008218: 887b ldrh r3, [r7, #2] + 800821a: 81fb strh r3, [r7, #14] + LWIP_ASSERT("p->payload - increment_magnitude >= p + SIZEOF_STRUCT_PBUF", + (u8_t *)p->payload - increment_magnitude >= (u8_t *)p + SIZEOF_STRUCT_PBUF); +#endif + } + + type = p->type; + 800821c: 687b ldr r3, [r7, #4] + 800821e: 7b1b ldrb r3, [r3, #12] + 8008220: 81bb strh r3, [r7, #12] + /* remember current payload pointer */ + payload = p->payload; + 8008222: 687b ldr r3, [r7, #4] + 8008224: 685b ldr r3, [r3, #4] + 8008226: 60bb str r3, [r7, #8] + + /* pbuf types containing payloads? */ + if (type == PBUF_RAM || type == PBUF_POOL) { + 8008228: 89bb ldrh r3, [r7, #12] + 800822a: 2b00 cmp r3, #0 + 800822c: d002 beq.n 8008234 + 800822e: 89bb ldrh r3, [r7, #12] + 8008230: 2b03 cmp r3, #3 + 8008232: d112 bne.n 800825a + /* set new payload pointer */ + p->payload = (u8_t *)p->payload - header_size_increment; + 8008234: 687b ldr r3, [r7, #4] + 8008236: 685a ldr r2, [r3, #4] + 8008238: f9b7 3002 ldrsh.w r3, [r7, #2] + 800823c: 425b negs r3, r3 + 800823e: 441a add r2, r3 + 8008240: 687b ldr r3, [r7, #4] + 8008242: 605a str r2, [r3, #4] + /* boundary check fails? */ + if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { + 8008244: 687b ldr r3, [r7, #4] + 8008246: 685a ldr r2, [r3, #4] + 8008248: 687b ldr r3, [r7, #4] + 800824a: 3310 adds r3, #16 + 800824c: 429a cmp r2, r3 + 800824e: d238 bcs.n 80082c2 + LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, + ("pbuf_header: failed as %p < %p (not enough space for new header size)\n", + (void *)p->payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF))); + /* restore old payload pointer */ + p->payload = payload; + 8008250: 687b ldr r3, [r7, #4] + 8008252: 68ba ldr r2, [r7, #8] + 8008254: 605a str r2, [r3, #4] + /* bail out unsuccessfully */ + return 1; + 8008256: 2301 movs r3, #1 + 8008258: e042 b.n 80082e0 + } + /* pbuf types referring to external payloads? */ + } else if (type == PBUF_REF || type == PBUF_ROM) { + 800825a: 89bb ldrh r3, [r7, #12] + 800825c: 2b02 cmp r3, #2 + 800825e: d002 beq.n 8008266 + 8008260: 89bb ldrh r3, [r7, #12] + 8008262: 2b01 cmp r3, #1 + 8008264: d124 bne.n 80082b0 + /* hide a header in the payload? */ + if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { + 8008266: f9b7 3002 ldrsh.w r3, [r7, #2] + 800826a: 2b00 cmp r3, #0 + 800826c: da0d bge.n 800828a + 800826e: 687b ldr r3, [r7, #4] + 8008270: 895b ldrh r3, [r3, #10] + 8008272: 89fa ldrh r2, [r7, #14] + 8008274: 429a cmp r2, r3 + 8008276: d808 bhi.n 800828a + /* increase payload pointer */ + p->payload = (u8_t *)p->payload - header_size_increment; + 8008278: 687b ldr r3, [r7, #4] + 800827a: 685a ldr r2, [r3, #4] + 800827c: f9b7 3002 ldrsh.w r3, [r7, #2] + 8008280: 425b negs r3, r3 + 8008282: 441a add r2, r3 + 8008284: 687b ldr r3, [r7, #4] + 8008286: 605a str r2, [r3, #4] + 8008288: e011 b.n 80082ae + } else if ((header_size_increment > 0) && force) { + 800828a: f9b7 3002 ldrsh.w r3, [r7, #2] + 800828e: 2b00 cmp r3, #0 + 8008290: dd0b ble.n 80082aa + 8008292: 787b ldrb r3, [r7, #1] + 8008294: 2b00 cmp r3, #0 + 8008296: d008 beq.n 80082aa + p->payload = (u8_t *)p->payload - header_size_increment; + 8008298: 687b ldr r3, [r7, #4] + 800829a: 685a ldr r2, [r3, #4] + 800829c: f9b7 3002 ldrsh.w r3, [r7, #2] + 80082a0: 425b negs r3, r3 + 80082a2: 441a add r2, r3 + 80082a4: 687b ldr r3, [r7, #4] + 80082a6: 605a str r2, [r3, #4] + 80082a8: e001 b.n 80082ae + } else { + /* cannot expand payload to front (yet!) + * bail out unsuccessfully */ + return 1; + 80082aa: 2301 movs r3, #1 + 80082ac: e018 b.n 80082e0 + if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { + 80082ae: e008 b.n 80082c2 + } + } else { + /* Unknown type */ + LWIP_ASSERT("bad pbuf type", 0); + 80082b0: 4b0d ldr r3, [pc, #52] ; (80082e8 ) + 80082b2: f240 2277 movw r2, #631 ; 0x277 + 80082b6: 4910 ldr r1, [pc, #64] ; (80082f8 ) + 80082b8: 480d ldr r0, [pc, #52] ; (80082f0 ) + 80082ba: f00a fd63 bl 8012d84 + return 1; + 80082be: 2301 movs r3, #1 + 80082c0: e00e b.n 80082e0 + } + /* modify pbuf length fields */ + p->len += header_size_increment; + 80082c2: 687b ldr r3, [r7, #4] + 80082c4: 895a ldrh r2, [r3, #10] + 80082c6: 887b ldrh r3, [r7, #2] + 80082c8: 4413 add r3, r2 + 80082ca: b29a uxth r2, r3 + 80082cc: 687b ldr r3, [r7, #4] + 80082ce: 815a strh r2, [r3, #10] + p->tot_len += header_size_increment; + 80082d0: 687b ldr r3, [r7, #4] + 80082d2: 891a ldrh r2, [r3, #8] + 80082d4: 887b ldrh r3, [r7, #2] + 80082d6: 4413 add r3, r2 + 80082d8: b29a uxth r2, r3 + 80082da: 687b ldr r3, [r7, #4] + 80082dc: 811a strh r2, [r3, #8] + + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", + (void *)payload, (void *)p->payload, header_size_increment)); + + return 0; + 80082de: 2300 movs r3, #0 +} + 80082e0: 4618 mov r0, r3 + 80082e2: 3710 adds r7, #16 + 80082e4: 46bd mov sp, r7 + 80082e6: bd80 pop {r7, pc} + 80082e8: 080147f8 .word 0x080147f8 + 80082ec: 08014a30 .word 0x08014a30 + 80082f0: 08014844 .word 0x08014844 + 80082f4: 08014a3c .word 0x08014a3c + 80082f8: 08014a5c .word 0x08014a5c + +080082fc : + * @return non-zero on failure, zero on success. + * + */ +u8_t +pbuf_header(struct pbuf *p, s16_t header_size_increment) +{ + 80082fc: b580 push {r7, lr} + 80082fe: b082 sub sp, #8 + 8008300: af00 add r7, sp, #0 + 8008302: 6078 str r0, [r7, #4] + 8008304: 460b mov r3, r1 + 8008306: 807b strh r3, [r7, #2] + return pbuf_header_impl(p, header_size_increment, 0); + 8008308: f9b7 3002 ldrsh.w r3, [r7, #2] + 800830c: 2200 movs r2, #0 + 800830e: 4619 mov r1, r3 + 8008310: 6878 ldr r0, [r7, #4] + 8008312: f7ff ff51 bl 80081b8 + 8008316: 4603 mov r3, r0 +} + 8008318: 4618 mov r0, r3 + 800831a: 3708 adds r7, #8 + 800831c: 46bd mov sp, r7 + 800831e: bd80 pop {r7, pc} + +08008320 : + * 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) +{ + 8008320: b580 push {r7, lr} + 8008322: b082 sub sp, #8 + 8008324: af00 add r7, sp, #0 + 8008326: 6078 str r0, [r7, #4] + 8008328: 460b mov r3, r1 + 800832a: 807b strh r3, [r7, #2] + return pbuf_header_impl(p, header_size_increment, 1); + 800832c: f9b7 3002 ldrsh.w r3, [r7, #2] + 8008330: 2201 movs r2, #1 + 8008332: 4619 mov r1, r3 + 8008334: 6878 ldr r0, [r7, #4] + 8008336: f7ff ff3f bl 80081b8 + 800833a: 4603 mov r3, r0 +} + 800833c: 4618 mov r0, r3 + 800833e: 3708 adds r7, #8 + 8008340: 46bd mov sp, r7 + 8008342: bd80 pop {r7, pc} + +08008344 : + * 1->1->1 becomes ....... + * + */ +u8_t +pbuf_free(struct pbuf *p) +{ + 8008344: b580 push {r7, lr} + 8008346: b086 sub sp, #24 + 8008348: af00 add r7, sp, #0 + 800834a: 6078 str r0, [r7, #4] + u16_t type; + struct pbuf *q; + u8_t count; + + if (p == NULL) { + 800834c: 687b ldr r3, [r7, #4] + 800834e: 2b00 cmp r3, #0 + 8008350: d10b bne.n 800836a + LWIP_ASSERT("p != NULL", p != NULL); + 8008352: 687b ldr r3, [r7, #4] + 8008354: 2b00 cmp r3, #0 + 8008356: d106 bne.n 8008366 + 8008358: 4b3e ldr r3, [pc, #248] ; (8008454 ) + 800835a: f240 22d2 movw r2, #722 ; 0x2d2 + 800835e: 493e ldr r1, [pc, #248] ; (8008458 ) + 8008360: 483e ldr r0, [pc, #248] ; (800845c ) + 8008362: f00a fd0f bl 8012d84 + /* if assertions are disabled, proceed with debug output */ + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("pbuf_free(p == NULL) was called.\n")); + return 0; + 8008366: 2300 movs r3, #0 + 8008368: e070 b.n 800844c + } + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); + + PERF_START; + + LWIP_ASSERT("pbuf_free: sane type", + 800836a: 687b ldr r3, [r7, #4] + 800836c: 7b1b ldrb r3, [r3, #12] + 800836e: 2b00 cmp r3, #0 + 8008370: d012 beq.n 8008398 + 8008372: 687b ldr r3, [r7, #4] + 8008374: 7b1b ldrb r3, [r3, #12] + 8008376: 2b01 cmp r3, #1 + 8008378: d00e beq.n 8008398 + 800837a: 687b ldr r3, [r7, #4] + 800837c: 7b1b ldrb r3, [r3, #12] + 800837e: 2b02 cmp r3, #2 + 8008380: d00a beq.n 8008398 + 8008382: 687b ldr r3, [r7, #4] + 8008384: 7b1b ldrb r3, [r3, #12] + 8008386: 2b03 cmp r3, #3 + 8008388: d006 beq.n 8008398 + 800838a: 4b32 ldr r3, [pc, #200] ; (8008454 ) + 800838c: f44f 7237 mov.w r2, #732 ; 0x2dc + 8008390: 4933 ldr r1, [pc, #204] ; (8008460 ) + 8008392: 4832 ldr r0, [pc, #200] ; (800845c ) + 8008394: f00a fcf6 bl 8012d84 + p->type == PBUF_RAM || p->type == PBUF_ROM || + p->type == PBUF_REF || p->type == PBUF_POOL); + + count = 0; + 8008398: 2300 movs r3, #0 + 800839a: 75fb strb r3, [r7, #23] + /* de-allocate all consecutive pbufs from the head of the chain that + * obtain a zero reference count after decrementing*/ + while (p != NULL) { + 800839c: e052 b.n 8008444 + /* Since decrementing ref cannot be guaranteed to be a single machine operation + * we must protect it. We put the new ref into a local variable to prevent + * further protection. */ + SYS_ARCH_PROTECT(old_level); + /* all pbufs in a chain are referenced at least once */ + LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); + 800839e: 687b ldr r3, [r7, #4] + 80083a0: 89db ldrh r3, [r3, #14] + 80083a2: 2b00 cmp r3, #0 + 80083a4: d106 bne.n 80083b4 + 80083a6: 4b2b ldr r3, [pc, #172] ; (8008454 ) + 80083a8: f240 22eb movw r2, #747 ; 0x2eb + 80083ac: 492d ldr r1, [pc, #180] ; (8008464 ) + 80083ae: 482b ldr r0, [pc, #172] ; (800845c ) + 80083b0: f00a fce8 bl 8012d84 + /* decrease reference count (number of pointers to pbuf) */ + ref = --(p->ref); + 80083b4: 687b ldr r3, [r7, #4] + 80083b6: 89db ldrh r3, [r3, #14] + 80083b8: 3b01 subs r3, #1 + 80083ba: b29a uxth r2, r3 + 80083bc: 687b ldr r3, [r7, #4] + 80083be: 81da strh r2, [r3, #14] + 80083c0: 687b ldr r3, [r7, #4] + 80083c2: 89db ldrh r3, [r3, #14] + 80083c4: 82bb strh r3, [r7, #20] + SYS_ARCH_UNPROTECT(old_level); + /* this pbuf is no longer referenced to? */ + if (ref == 0) { + 80083c6: 8abb ldrh r3, [r7, #20] + 80083c8: 2b00 cmp r3, #0 + 80083ca: d139 bne.n 8008440 + /* remember next pbuf in chain for next iteration */ + q = p->next; + 80083cc: 687b ldr r3, [r7, #4] + 80083ce: 681b ldr r3, [r3, #0] + 80083d0: 613b str r3, [r7, #16] + LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p)); + type = p->type; + 80083d2: 687b ldr r3, [r7, #4] + 80083d4: 7b1b ldrb r3, [r3, #12] + 80083d6: 81fb strh r3, [r7, #14] +#if LWIP_SUPPORT_CUSTOM_PBUF + /* is this a custom pbuf? */ + if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { + 80083d8: 687b ldr r3, [r7, #4] + 80083da: 7b5b ldrb r3, [r3, #13] + 80083dc: f003 0302 and.w r3, r3, #2 + 80083e0: 2b00 cmp r3, #0 + 80083e2: d011 beq.n 8008408 + struct pbuf_custom *pc = (struct pbuf_custom*)p; + 80083e4: 687b ldr r3, [r7, #4] + 80083e6: 60bb str r3, [r7, #8] + LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); + 80083e8: 68bb ldr r3, [r7, #8] + 80083ea: 691b ldr r3, [r3, #16] + 80083ec: 2b00 cmp r3, #0 + 80083ee: d106 bne.n 80083fe + 80083f0: 4b18 ldr r3, [pc, #96] ; (8008454 ) + 80083f2: f240 22f9 movw r2, #761 ; 0x2f9 + 80083f6: 491c ldr r1, [pc, #112] ; (8008468 ) + 80083f8: 4818 ldr r0, [pc, #96] ; (800845c ) + 80083fa: f00a fcc3 bl 8012d84 + pc->custom_free_function(p); + 80083fe: 68bb ldr r3, [r7, #8] + 8008400: 691b ldr r3, [r3, #16] + 8008402: 6878 ldr r0, [r7, #4] + 8008404: 4798 blx r3 + 8008406: e015 b.n 8008434 + } else +#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ + { + /* is this a pbuf from the pool? */ + if (type == PBUF_POOL) { + 8008408: 89fb ldrh r3, [r7, #14] + 800840a: 2b03 cmp r3, #3 + 800840c: d104 bne.n 8008418 + memp_free(MEMP_PBUF_POOL, p); + 800840e: 6879 ldr r1, [r7, #4] + 8008410: 2008 movs r0, #8 + 8008412: f7ff fa53 bl 80078bc + 8008416: e00d b.n 8008434 + /* is this a ROM or RAM referencing pbuf? */ + } else if (type == PBUF_ROM || type == PBUF_REF) { + 8008418: 89fb ldrh r3, [r7, #14] + 800841a: 2b01 cmp r3, #1 + 800841c: d002 beq.n 8008424 + 800841e: 89fb ldrh r3, [r7, #14] + 8008420: 2b02 cmp r3, #2 + 8008422: d104 bne.n 800842e + memp_free(MEMP_PBUF, p); + 8008424: 6879 ldr r1, [r7, #4] + 8008426: 2007 movs r0, #7 + 8008428: f7ff fa48 bl 80078bc + 800842c: e002 b.n 8008434 + /* type == PBUF_RAM */ + } else { + mem_free(p); + 800842e: 6878 ldr r0, [r7, #4] + 8008430: f7fe ff5e bl 80072f0 + } + } + count++; + 8008434: 7dfb ldrb r3, [r7, #23] + 8008436: 3301 adds r3, #1 + 8008438: 75fb strb r3, [r7, #23] + /* proceed to next pbuf */ + p = q; + 800843a: 693b ldr r3, [r7, #16] + 800843c: 607b str r3, [r7, #4] + 800843e: e001 b.n 8008444 + /* p->ref > 0, this pbuf is still referenced to */ + /* (and so the remaining pbufs in chain as well) */ + } else { + LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, ref)); + /* stop walking through the chain */ + p = NULL; + 8008440: 2300 movs r3, #0 + 8008442: 607b str r3, [r7, #4] + while (p != NULL) { + 8008444: 687b ldr r3, [r7, #4] + 8008446: 2b00 cmp r3, #0 + 8008448: d1a9 bne.n 800839e + } + } + PERF_STOP("pbuf_free"); + /* return number of de-allocated pbufs */ + return count; + 800844a: 7dfb ldrb r3, [r7, #23] +} + 800844c: 4618 mov r0, r3 + 800844e: 3718 adds r7, #24 + 8008450: 46bd mov sp, r7 + 8008452: bd80 pop {r7, pc} + 8008454: 080147f8 .word 0x080147f8 + 8008458: 08014a30 .word 0x08014a30 + 800845c: 08014844 .word 0x08014844 + 8008460: 08014a6c .word 0x08014a6c + 8008464: 08014a84 .word 0x08014a84 + 8008468: 08014a9c .word 0x08014a9c + +0800846c : + * @param p first pbuf of chain + * @return the number of pbufs in a chain + */ +u16_t +pbuf_clen(const struct pbuf *p) +{ + 800846c: b480 push {r7} + 800846e: b085 sub sp, #20 + 8008470: af00 add r7, sp, #0 + 8008472: 6078 str r0, [r7, #4] + u16_t len; + + len = 0; + 8008474: 2300 movs r3, #0 + 8008476: 81fb strh r3, [r7, #14] + while (p != NULL) { + 8008478: e005 b.n 8008486 + ++len; + 800847a: 89fb ldrh r3, [r7, #14] + 800847c: 3301 adds r3, #1 + 800847e: 81fb strh r3, [r7, #14] + p = p->next; + 8008480: 687b ldr r3, [r7, #4] + 8008482: 681b ldr r3, [r3, #0] + 8008484: 607b str r3, [r7, #4] + while (p != NULL) { + 8008486: 687b ldr r3, [r7, #4] + 8008488: 2b00 cmp r3, #0 + 800848a: d1f6 bne.n 800847a + } + return len; + 800848c: 89fb ldrh r3, [r7, #14] +} + 800848e: 4618 mov r0, r3 + 8008490: 3714 adds r7, #20 + 8008492: 46bd mov sp, r7 + 8008494: bc80 pop {r7} + 8008496: 4770 bx lr + +08008498 : + * @param p pbuf to increase reference counter of + * + */ +void +pbuf_ref(struct pbuf *p) +{ + 8008498: b580 push {r7, lr} + 800849a: b082 sub sp, #8 + 800849c: af00 add r7, sp, #0 + 800849e: 6078 str r0, [r7, #4] + /* pbuf given? */ + if (p != NULL) { + 80084a0: 687b ldr r3, [r7, #4] + 80084a2: 2b00 cmp r3, #0 + 80084a4: d010 beq.n 80084c8 + SYS_ARCH_INC(p->ref, 1); + 80084a6: 687b ldr r3, [r7, #4] + 80084a8: 89db ldrh r3, [r3, #14] + 80084aa: 3301 adds r3, #1 + 80084ac: b29a uxth r2, r3 + 80084ae: 687b ldr r3, [r7, #4] + 80084b0: 81da strh r2, [r3, #14] + LWIP_ASSERT("pbuf ref overflow", p->ref > 0); + 80084b2: 687b ldr r3, [r7, #4] + 80084b4: 89db ldrh r3, [r3, #14] + 80084b6: 2b00 cmp r3, #0 + 80084b8: d106 bne.n 80084c8 + 80084ba: 4b05 ldr r3, [pc, #20] ; (80084d0 ) + 80084bc: f240 3239 movw r2, #825 ; 0x339 + 80084c0: 4904 ldr r1, [pc, #16] ; (80084d4 ) + 80084c2: 4805 ldr r0, [pc, #20] ; (80084d8 ) + 80084c4: f00a fc5e bl 8012d84 + } +} + 80084c8: bf00 nop + 80084ca: 3708 adds r7, #8 + 80084cc: 46bd mov sp, r7 + 80084ce: bd80 pop {r7, pc} + 80084d0: 080147f8 .word 0x080147f8 + 80084d4: 08014ac0 .word 0x08014ac0 + 80084d8: 08014844 .word 0x08014844 + +080084dc : + * + * @see pbuf_chain() + */ +void +pbuf_cat(struct pbuf *h, struct pbuf *t) +{ + 80084dc: b580 push {r7, lr} + 80084de: b084 sub sp, #16 + 80084e0: af00 add r7, sp, #0 + 80084e2: 6078 str r0, [r7, #4] + 80084e4: 6039 str r1, [r7, #0] + struct pbuf *p; + + LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", + 80084e6: 687b ldr r3, [r7, #4] + 80084e8: 2b00 cmp r3, #0 + 80084ea: d002 beq.n 80084f2 + 80084ec: 683b ldr r3, [r7, #0] + 80084ee: 2b00 cmp r3, #0 + 80084f0: d107 bne.n 8008502 + 80084f2: 4b20 ldr r3, [pc, #128] ; (8008574 ) + 80084f4: f44f 7253 mov.w r2, #844 ; 0x34c + 80084f8: 491f ldr r1, [pc, #124] ; (8008578 ) + 80084fa: 4820 ldr r0, [pc, #128] ; (800857c ) + 80084fc: f00a fc42 bl 8012d84 + 8008500: e034 b.n 800856c + ((h != NULL) && (t != NULL)), return;); + + /* proceed to last pbuf of chain */ + for (p = h; p->next != NULL; p = p->next) { + 8008502: 687b ldr r3, [r7, #4] + 8008504: 60fb str r3, [r7, #12] + 8008506: e00a b.n 800851e + /* add total length of second chain to all totals of first chain */ + p->tot_len += t->tot_len; + 8008508: 68fb ldr r3, [r7, #12] + 800850a: 891a ldrh r2, [r3, #8] + 800850c: 683b ldr r3, [r7, #0] + 800850e: 891b ldrh r3, [r3, #8] + 8008510: 4413 add r3, r2 + 8008512: b29a uxth r2, r3 + 8008514: 68fb ldr r3, [r7, #12] + 8008516: 811a strh r2, [r3, #8] + for (p = h; p->next != NULL; p = p->next) { + 8008518: 68fb ldr r3, [r7, #12] + 800851a: 681b ldr r3, [r3, #0] + 800851c: 60fb str r3, [r7, #12] + 800851e: 68fb ldr r3, [r7, #12] + 8008520: 681b ldr r3, [r3, #0] + 8008522: 2b00 cmp r3, #0 + 8008524: d1f0 bne.n 8008508 + } + /* { 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); + 8008526: 68fb ldr r3, [r7, #12] + 8008528: 891a ldrh r2, [r3, #8] + 800852a: 68fb ldr r3, [r7, #12] + 800852c: 895b ldrh r3, [r3, #10] + 800852e: 429a cmp r2, r3 + 8008530: d006 beq.n 8008540 + 8008532: 4b10 ldr r3, [pc, #64] ; (8008574 ) + 8008534: f240 3255 movw r2, #853 ; 0x355 + 8008538: 4911 ldr r1, [pc, #68] ; (8008580 ) + 800853a: 4810 ldr r0, [pc, #64] ; (800857c ) + 800853c: f00a fc22 bl 8012d84 + LWIP_ASSERT("p->next == NULL", p->next == NULL); + 8008540: 68fb ldr r3, [r7, #12] + 8008542: 681b ldr r3, [r3, #0] + 8008544: 2b00 cmp r3, #0 + 8008546: d006 beq.n 8008556 + 8008548: 4b0a ldr r3, [pc, #40] ; (8008574 ) + 800854a: f240 3256 movw r2, #854 ; 0x356 + 800854e: 490d ldr r1, [pc, #52] ; (8008584 ) + 8008550: 480a ldr r0, [pc, #40] ; (800857c ) + 8008552: f00a fc17 bl 8012d84 + /* add total length of second chain to last pbuf total of first chain */ + p->tot_len += t->tot_len; + 8008556: 68fb ldr r3, [r7, #12] + 8008558: 891a ldrh r2, [r3, #8] + 800855a: 683b ldr r3, [r7, #0] + 800855c: 891b ldrh r3, [r3, #8] + 800855e: 4413 add r3, r2 + 8008560: b29a uxth r2, r3 + 8008562: 68fb ldr r3, [r7, #12] + 8008564: 811a strh r2, [r3, #8] + /* chain last pbuf of head (p) with first of tail (t) */ + p->next = t; + 8008566: 68fb ldr r3, [r7, #12] + 8008568: 683a ldr r2, [r7, #0] + 800856a: 601a str r2, [r3, #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. + */ +} + 800856c: 3710 adds r7, #16 + 800856e: 46bd mov sp, r7 + 8008570: bd80 pop {r7, pc} + 8008572: bf00 nop + 8008574: 080147f8 .word 0x080147f8 + 8008578: 08014ad4 .word 0x08014ad4 + 800857c: 08014844 .word 0x08014844 + 8008580: 08014b0c .word 0x08014b0c + 8008584: 08014b3c .word 0x08014b3c + +08008588 : + * The ->ref field of the first pbuf of the tail chain is adjusted. + * + */ +void +pbuf_chain(struct pbuf *h, struct pbuf *t) +{ + 8008588: b580 push {r7, lr} + 800858a: b082 sub sp, #8 + 800858c: af00 add r7, sp, #0 + 800858e: 6078 str r0, [r7, #4] + 8008590: 6039 str r1, [r7, #0] + pbuf_cat(h, t); + 8008592: 6839 ldr r1, [r7, #0] + 8008594: 6878 ldr r0, [r7, #4] + 8008596: f7ff ffa1 bl 80084dc + /* t is now referenced by h */ + pbuf_ref(t); + 800859a: 6838 ldr r0, [r7, #0] + 800859c: f7ff ff7c bl 8008498 + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); +} + 80085a0: bf00 nop + 80085a2: 3708 adds r7, #8 + 80085a4: 46bd mov sp, r7 + 80085a6: bd80 pop {r7, pc} + +080085a8 : + * 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) +{ + 80085a8: b580 push {r7, lr} + 80085aa: b084 sub sp, #16 + 80085ac: af00 add r7, sp, #0 + 80085ae: 6078 str r0, [r7, #4] + 80085b0: 6039 str r1, [r7, #0] + u16_t offset_to=0, offset_from=0, len; + 80085b2: 2300 movs r3, #0 + 80085b4: 81fb strh r3, [r7, #14] + 80085b6: 2300 movs r3, #0 + 80085b8: 81bb strh r3, [r7, #12] + + 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) && + 80085ba: 687b ldr r3, [r7, #4] + 80085bc: 2b00 cmp r3, #0 + 80085be: d008 beq.n 80085d2 + 80085c0: 683b ldr r3, [r7, #0] + 80085c2: 2b00 cmp r3, #0 + 80085c4: d005 beq.n 80085d2 + 80085c6: 687b ldr r3, [r7, #4] + 80085c8: 891a ldrh r2, [r3, #8] + 80085ca: 683b ldr r3, [r7, #0] + 80085cc: 891b ldrh r3, [r3, #8] + 80085ce: 429a cmp r2, r3 + 80085d0: d209 bcs.n 80085e6 + 80085d2: 4b54 ldr r3, [pc, #336] ; (8008724 ) + 80085d4: f44f 726f mov.w r2, #956 ; 0x3bc + 80085d8: 4953 ldr r1, [pc, #332] ; (8008728 ) + 80085da: 4854 ldr r0, [pc, #336] ; (800872c ) + 80085dc: f00a fbd2 bl 8012d84 + 80085e0: f06f 030f mvn.w r3, #15 + 80085e4: e099 b.n 800871a + + /* iterate through pbuf chain */ + do + { + /* copy one part of the original chain */ + if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { + 80085e6: 687b ldr r3, [r7, #4] + 80085e8: 895b ldrh r3, [r3, #10] + 80085ea: 461a mov r2, r3 + 80085ec: 89fb ldrh r3, [r7, #14] + 80085ee: 1ad2 subs r2, r2, r3 + 80085f0: 683b ldr r3, [r7, #0] + 80085f2: 895b ldrh r3, [r3, #10] + 80085f4: 4619 mov r1, r3 + 80085f6: 89bb ldrh r3, [r7, #12] + 80085f8: 1acb subs r3, r1, r3 + 80085fa: 429a cmp r2, r3 + 80085fc: db05 blt.n 800860a + /* complete current p_from fits into current p_to */ + len = p_from->len - offset_from; + 80085fe: 683b ldr r3, [r7, #0] + 8008600: 895a ldrh r2, [r3, #10] + 8008602: 89bb ldrh r3, [r7, #12] + 8008604: 1ad3 subs r3, r2, r3 + 8008606: 817b strh r3, [r7, #10] + 8008608: e004 b.n 8008614 + } else { + /* current p_from does not fit into current p_to */ + len = p_to->len - offset_to; + 800860a: 687b ldr r3, [r7, #4] + 800860c: 895a ldrh r2, [r3, #10] + 800860e: 89fb ldrh r3, [r7, #14] + 8008610: 1ad3 subs r3, r2, r3 + 8008612: 817b strh r3, [r7, #10] + } + MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); + 8008614: 687b ldr r3, [r7, #4] + 8008616: 685a ldr r2, [r3, #4] + 8008618: 89fb ldrh r3, [r7, #14] + 800861a: 18d0 adds r0, r2, r3 + 800861c: 683b ldr r3, [r7, #0] + 800861e: 685a ldr r2, [r3, #4] + 8008620: 89bb ldrh r3, [r7, #12] + 8008622: 4413 add r3, r2 + 8008624: 897a ldrh r2, [r7, #10] + 8008626: 4619 mov r1, r3 + 8008628: f00a fd77 bl 801311a + offset_to += len; + 800862c: 89fa ldrh r2, [r7, #14] + 800862e: 897b ldrh r3, [r7, #10] + 8008630: 4413 add r3, r2 + 8008632: 81fb strh r3, [r7, #14] + offset_from += len; + 8008634: 89ba ldrh r2, [r7, #12] + 8008636: 897b ldrh r3, [r7, #10] + 8008638: 4413 add r3, r2 + 800863a: 81bb strh r3, [r7, #12] + LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); + 800863c: 687b ldr r3, [r7, #4] + 800863e: 895b ldrh r3, [r3, #10] + 8008640: 89fa ldrh r2, [r7, #14] + 8008642: 429a cmp r2, r3 + 8008644: d906 bls.n 8008654 + 8008646: 4b37 ldr r3, [pc, #220] ; (8008724 ) + 8008648: f240 32cd movw r2, #973 ; 0x3cd + 800864c: 4938 ldr r1, [pc, #224] ; (8008730 ) + 800864e: 4837 ldr r0, [pc, #220] ; (800872c ) + 8008650: f00a fb98 bl 8012d84 + LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); + 8008654: 683b ldr r3, [r7, #0] + 8008656: 895b ldrh r3, [r3, #10] + 8008658: 89ba ldrh r2, [r7, #12] + 800865a: 429a cmp r2, r3 + 800865c: d906 bls.n 800866c + 800865e: 4b31 ldr r3, [pc, #196] ; (8008724 ) + 8008660: f240 32ce movw r2, #974 ; 0x3ce + 8008664: 4933 ldr r1, [pc, #204] ; (8008734 ) + 8008666: 4831 ldr r0, [pc, #196] ; (800872c ) + 8008668: f00a fb8c bl 8012d84 + if (offset_from >= p_from->len) { + 800866c: 683b ldr r3, [r7, #0] + 800866e: 895b ldrh r3, [r3, #10] + 8008670: 89ba ldrh r2, [r7, #12] + 8008672: 429a cmp r2, r3 + 8008674: d304 bcc.n 8008680 + /* on to next p_from (if any) */ + offset_from = 0; + 8008676: 2300 movs r3, #0 + 8008678: 81bb strh r3, [r7, #12] + p_from = p_from->next; + 800867a: 683b ldr r3, [r7, #0] + 800867c: 681b ldr r3, [r3, #0] + 800867e: 603b str r3, [r7, #0] + } + if (offset_to == p_to->len) { + 8008680: 687b ldr r3, [r7, #4] + 8008682: 895b ldrh r3, [r3, #10] + 8008684: 89fa ldrh r2, [r7, #14] + 8008686: 429a cmp r2, r3 + 8008688: d114 bne.n 80086b4 + /* on to next p_to (if any) */ + offset_to = 0; + 800868a: 2300 movs r3, #0 + 800868c: 81fb strh r3, [r7, #14] + p_to = p_to->next; + 800868e: 687b ldr r3, [r7, #4] + 8008690: 681b ldr r3, [r3, #0] + 8008692: 607b str r3, [r7, #4] + LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); + 8008694: 687b ldr r3, [r7, #4] + 8008696: 2b00 cmp r3, #0 + 8008698: d10c bne.n 80086b4 + 800869a: 683b ldr r3, [r7, #0] + 800869c: 2b00 cmp r3, #0 + 800869e: d009 beq.n 80086b4 + 80086a0: 4b20 ldr r3, [pc, #128] ; (8008724 ) + 80086a2: f44f 7276 mov.w r2, #984 ; 0x3d8 + 80086a6: 4924 ldr r1, [pc, #144] ; (8008738 ) + 80086a8: 4820 ldr r0, [pc, #128] ; (800872c ) + 80086aa: f00a fb6b bl 8012d84 + 80086ae: f06f 030f mvn.w r3, #15 + 80086b2: e032 b.n 800871a + } + + if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { + 80086b4: 683b ldr r3, [r7, #0] + 80086b6: 2b00 cmp r3, #0 + 80086b8: d013 beq.n 80086e2 + 80086ba: 683b ldr r3, [r7, #0] + 80086bc: 895a ldrh r2, [r3, #10] + 80086be: 683b ldr r3, [r7, #0] + 80086c0: 891b ldrh r3, [r3, #8] + 80086c2: 429a cmp r2, r3 + 80086c4: d10d bne.n 80086e2 + /* don't copy more than one packet! */ + LWIP_ERROR("pbuf_copy() does not allow packet queues!", + 80086c6: 683b ldr r3, [r7, #0] + 80086c8: 681b ldr r3, [r3, #0] + 80086ca: 2b00 cmp r3, #0 + 80086cc: d009 beq.n 80086e2 + 80086ce: 4b15 ldr r3, [pc, #84] ; (8008724 ) + 80086d0: f240 32dd movw r2, #989 ; 0x3dd + 80086d4: 4919 ldr r1, [pc, #100] ; (800873c ) + 80086d6: 4815 ldr r0, [pc, #84] ; (800872c ) + 80086d8: f00a fb54 bl 8012d84 + 80086dc: f06f 0305 mvn.w r3, #5 + 80086e0: e01b b.n 800871a + (p_from->next == NULL), return ERR_VAL;); + } + if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { + 80086e2: 687b ldr r3, [r7, #4] + 80086e4: 2b00 cmp r3, #0 + 80086e6: d013 beq.n 8008710 + 80086e8: 687b ldr r3, [r7, #4] + 80086ea: 895a ldrh r2, [r3, #10] + 80086ec: 687b ldr r3, [r7, #4] + 80086ee: 891b ldrh r3, [r3, #8] + 80086f0: 429a cmp r2, r3 + 80086f2: d10d bne.n 8008710 + /* don't copy more than one packet! */ + LWIP_ERROR("pbuf_copy() does not allow packet queues!", + 80086f4: 687b ldr r3, [r7, #4] + 80086f6: 681b ldr r3, [r3, #0] + 80086f8: 2b00 cmp r3, #0 + 80086fa: d009 beq.n 8008710 + 80086fc: 4b09 ldr r3, [pc, #36] ; (8008724 ) + 80086fe: f240 32e2 movw r2, #994 ; 0x3e2 + 8008702: 490e ldr r1, [pc, #56] ; (800873c ) + 8008704: 4809 ldr r0, [pc, #36] ; (800872c ) + 8008706: f00a fb3d bl 8012d84 + 800870a: f06f 0305 mvn.w r3, #5 + 800870e: e004 b.n 800871a + (p_to->next == NULL), return ERR_VAL;); + } + } while (p_from); + 8008710: 683b ldr r3, [r7, #0] + 8008712: 2b00 cmp r3, #0 + 8008714: f47f af67 bne.w 80085e6 + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); + return ERR_OK; + 8008718: 2300 movs r3, #0 +} + 800871a: 4618 mov r0, r3 + 800871c: 3710 adds r7, #16 + 800871e: 46bd mov sp, r7 + 8008720: bd80 pop {r7, pc} + 8008722: bf00 nop + 8008724: 080147f8 .word 0x080147f8 + 8008728: 08014b88 .word 0x08014b88 + 800872c: 08014844 .word 0x08014844 + 8008730: 08014bb8 .word 0x08014bb8 + 8008734: 08014bd0 .word 0x08014bd0 + 8008738: 08014bec .word 0x08014bec + 800873c: 08014bfc .word 0x08014bfc + +08008740 : + * @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) +{ + 8008740: b580 push {r7, lr} + 8008742: b088 sub sp, #32 + 8008744: af00 add r7, sp, #0 + 8008746: 60f8 str r0, [r7, #12] + 8008748: 60b9 str r1, [r7, #8] + 800874a: 4611 mov r1, r2 + 800874c: 461a mov r2, r3 + 800874e: 460b mov r3, r1 + 8008750: 80fb strh r3, [r7, #6] + 8008752: 4613 mov r3, r2 + 8008754: 80bb strh r3, [r7, #4] + const struct pbuf *p; + u16_t left; + u16_t buf_copy_len; + u16_t copied_total = 0; + 8008756: 2300 movs r3, #0 + 8008758: 82fb strh r3, [r7, #22] + + LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); + 800875a: 68fb ldr r3, [r7, #12] + 800875c: 2b00 cmp r3, #0 + 800875e: d108 bne.n 8008772 + 8008760: 4b30 ldr r3, [pc, #192] ; (8008824 ) + 8008762: f240 32fe movw r2, #1022 ; 0x3fe + 8008766: 4930 ldr r1, [pc, #192] ; (8008828 ) + 8008768: 4830 ldr r0, [pc, #192] ; (800882c ) + 800876a: f00a fb0b bl 8012d84 + 800876e: 2300 movs r3, #0 + 8008770: e054 b.n 800881c + LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); + 8008772: 68bb ldr r3, [r7, #8] + 8008774: 2b00 cmp r3, #0 + 8008776: d108 bne.n 800878a + 8008778: 4b2a ldr r3, [pc, #168] ; (8008824 ) + 800877a: f240 32ff movw r2, #1023 ; 0x3ff + 800877e: 492c ldr r1, [pc, #176] ; (8008830 ) + 8008780: 482a ldr r0, [pc, #168] ; (800882c ) + 8008782: f00a faff bl 8012d84 + 8008786: 2300 movs r3, #0 + 8008788: e048 b.n 800881c + + left = 0; + 800878a: 2300 movs r3, #0 + 800878c: 837b strh r3, [r7, #26] + + if ((buf == NULL) || (dataptr == NULL)) { + 800878e: 68fb ldr r3, [r7, #12] + 8008790: 2b00 cmp r3, #0 + 8008792: d002 beq.n 800879a + 8008794: 68bb ldr r3, [r7, #8] + 8008796: 2b00 cmp r3, #0 + 8008798: d101 bne.n 800879e + return 0; + 800879a: 2300 movs r3, #0 + 800879c: e03e b.n 800881c + } + + /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ + for (p = buf; len != 0 && p != NULL; p = p->next) { + 800879e: 68fb ldr r3, [r7, #12] + 80087a0: 61fb str r3, [r7, #28] + 80087a2: e034 b.n 800880e + if ((offset != 0) && (offset >= p->len)) { + 80087a4: 88bb ldrh r3, [r7, #4] + 80087a6: 2b00 cmp r3, #0 + 80087a8: d00a beq.n 80087c0 + 80087aa: 69fb ldr r3, [r7, #28] + 80087ac: 895b ldrh r3, [r3, #10] + 80087ae: 88ba ldrh r2, [r7, #4] + 80087b0: 429a cmp r2, r3 + 80087b2: d305 bcc.n 80087c0 + /* don't copy from this buffer -> on to the next */ + offset -= p->len; + 80087b4: 69fb ldr r3, [r7, #28] + 80087b6: 895b ldrh r3, [r3, #10] + 80087b8: 88ba ldrh r2, [r7, #4] + 80087ba: 1ad3 subs r3, r2, r3 + 80087bc: 80bb strh r3, [r7, #4] + 80087be: e023 b.n 8008808 + } else { + /* copy from this buffer. maybe only partially. */ + buf_copy_len = p->len - offset; + 80087c0: 69fb ldr r3, [r7, #28] + 80087c2: 895a ldrh r2, [r3, #10] + 80087c4: 88bb ldrh r3, [r7, #4] + 80087c6: 1ad3 subs r3, r2, r3 + 80087c8: 833b strh r3, [r7, #24] + if (buf_copy_len > len) { + 80087ca: 8b3a ldrh r2, [r7, #24] + 80087cc: 88fb ldrh r3, [r7, #6] + 80087ce: 429a cmp r2, r3 + 80087d0: d901 bls.n 80087d6 + buf_copy_len = len; + 80087d2: 88fb ldrh r3, [r7, #6] + 80087d4: 833b strh r3, [r7, #24] + } + /* copy the necessary parts of the buffer */ + MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); + 80087d6: 8b7b ldrh r3, [r7, #26] + 80087d8: 68ba ldr r2, [r7, #8] + 80087da: 18d0 adds r0, r2, r3 + 80087dc: 69fb ldr r3, [r7, #28] + 80087de: 685a ldr r2, [r3, #4] + 80087e0: 88bb ldrh r3, [r7, #4] + 80087e2: 4413 add r3, r2 + 80087e4: 8b3a ldrh r2, [r7, #24] + 80087e6: 4619 mov r1, r3 + 80087e8: f00a fc97 bl 801311a + copied_total += buf_copy_len; + 80087ec: 8afa ldrh r2, [r7, #22] + 80087ee: 8b3b ldrh r3, [r7, #24] + 80087f0: 4413 add r3, r2 + 80087f2: 82fb strh r3, [r7, #22] + left += buf_copy_len; + 80087f4: 8b7a ldrh r2, [r7, #26] + 80087f6: 8b3b ldrh r3, [r7, #24] + 80087f8: 4413 add r3, r2 + 80087fa: 837b strh r3, [r7, #26] + len -= buf_copy_len; + 80087fc: 88fa ldrh r2, [r7, #6] + 80087fe: 8b3b ldrh r3, [r7, #24] + 8008800: 1ad3 subs r3, r2, r3 + 8008802: 80fb strh r3, [r7, #6] + offset = 0; + 8008804: 2300 movs r3, #0 + 8008806: 80bb strh r3, [r7, #4] + for (p = buf; len != 0 && p != NULL; p = p->next) { + 8008808: 69fb ldr r3, [r7, #28] + 800880a: 681b ldr r3, [r3, #0] + 800880c: 61fb str r3, [r7, #28] + 800880e: 88fb ldrh r3, [r7, #6] + 8008810: 2b00 cmp r3, #0 + 8008812: d002 beq.n 800881a + 8008814: 69fb ldr r3, [r7, #28] + 8008816: 2b00 cmp r3, #0 + 8008818: d1c4 bne.n 80087a4 + } + } + return copied_total; + 800881a: 8afb ldrh r3, [r7, #22] +} + 800881c: 4618 mov r0, r3 + 800881e: 3720 adds r7, #32 + 8008820: 46bd mov sp, r7 + 8008822: bd80 pop {r7, pc} + 8008824: 080147f8 .word 0x080147f8 + 8008828: 08014c28 .word 0x08014c28 + 800882c: 08014844 .word 0x08014844 + 8008830: 08014c48 .word 0x08014c48 + +08008834 : +#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + +/* Actual implementation of pbuf_skip() but returning const pointer... */ +static const struct pbuf* +pbuf_skip_const(const struct pbuf* in, u16_t in_offset, u16_t* out_offset) +{ + 8008834: b480 push {r7} + 8008836: b087 sub sp, #28 + 8008838: af00 add r7, sp, #0 + 800883a: 60f8 str r0, [r7, #12] + 800883c: 460b mov r3, r1 + 800883e: 607a str r2, [r7, #4] + 8008840: 817b strh r3, [r7, #10] + u16_t offset_left = in_offset; + 8008842: 897b ldrh r3, [r7, #10] + 8008844: 82fb strh r3, [r7, #22] + const struct pbuf* q = in; + 8008846: 68fb ldr r3, [r7, #12] + 8008848: 613b str r3, [r7, #16] + + /* get the correct pbuf */ + while ((q != NULL) && (q->len <= offset_left)) { + 800884a: e007 b.n 800885c + offset_left -= q->len; + 800884c: 693b ldr r3, [r7, #16] + 800884e: 895b ldrh r3, [r3, #10] + 8008850: 8afa ldrh r2, [r7, #22] + 8008852: 1ad3 subs r3, r2, r3 + 8008854: 82fb strh r3, [r7, #22] + q = q->next; + 8008856: 693b ldr r3, [r7, #16] + 8008858: 681b ldr r3, [r3, #0] + 800885a: 613b str r3, [r7, #16] + while ((q != NULL) && (q->len <= offset_left)) { + 800885c: 693b ldr r3, [r7, #16] + 800885e: 2b00 cmp r3, #0 + 8008860: d004 beq.n 800886c + 8008862: 693b ldr r3, [r7, #16] + 8008864: 895b ldrh r3, [r3, #10] + 8008866: 8afa ldrh r2, [r7, #22] + 8008868: 429a cmp r2, r3 + 800886a: d2ef bcs.n 800884c + } + if (out_offset != NULL) { + 800886c: 687b ldr r3, [r7, #4] + 800886e: 2b00 cmp r3, #0 + 8008870: d002 beq.n 8008878 + *out_offset = offset_left; + 8008872: 687b ldr r3, [r7, #4] + 8008874: 8afa ldrh r2, [r7, #22] + 8008876: 801a strh r2, [r3, #0] + } + return q; + 8008878: 693b ldr r3, [r7, #16] +} + 800887a: 4618 mov r0, r3 + 800887c: 371c adds r7, #28 + 800887e: 46bd mov sp, r7 + 8008880: bc80 pop {r7} + 8008882: 4770 bx lr + +08008884 : + * @param offset offset into p of the byte to return + * @return byte at an offset into p OR ZERO IF 'offset' >= p->tot_len + */ +u8_t +pbuf_get_at(const struct pbuf* p, u16_t offset) +{ + 8008884: b580 push {r7, lr} + 8008886: b084 sub sp, #16 + 8008888: af00 add r7, sp, #0 + 800888a: 6078 str r0, [r7, #4] + 800888c: 460b mov r3, r1 + 800888e: 807b strh r3, [r7, #2] + int ret = pbuf_try_get_at(p, offset); + 8008890: 887b ldrh r3, [r7, #2] + 8008892: 4619 mov r1, r3 + 8008894: 6878 ldr r0, [r7, #4] + 8008896: f000 f80c bl 80088b2 + 800889a: 60f8 str r0, [r7, #12] + if (ret >= 0) { + 800889c: 68fb ldr r3, [r7, #12] + 800889e: 2b00 cmp r3, #0 + 80088a0: db02 blt.n 80088a8 + return (u8_t)ret; + 80088a2: 68fb ldr r3, [r7, #12] + 80088a4: b2db uxtb r3, r3 + 80088a6: e000 b.n 80088aa + } + return 0; + 80088a8: 2300 movs r3, #0 +} + 80088aa: 4618 mov r0, r3 + 80088ac: 3710 adds r7, #16 + 80088ae: 46bd mov sp, r7 + 80088b0: bd80 pop {r7, pc} + +080088b2 : + * @param offset offset into p of the byte to return + * @return byte at an offset into p [0..0xFF] OR negative if 'offset' >= p->tot_len + */ +int +pbuf_try_get_at(const struct pbuf* p, u16_t offset) +{ + 80088b2: b580 push {r7, lr} + 80088b4: b084 sub sp, #16 + 80088b6: af00 add r7, sp, #0 + 80088b8: 6078 str r0, [r7, #4] + 80088ba: 460b mov r3, r1 + 80088bc: 807b strh r3, [r7, #2] + u16_t q_idx; + const struct pbuf* q = pbuf_skip_const(p, offset, &q_idx); + 80088be: f107 020a add.w r2, r7, #10 + 80088c2: 887b ldrh r3, [r7, #2] + 80088c4: 4619 mov r1, r3 + 80088c6: 6878 ldr r0, [r7, #4] + 80088c8: f7ff ffb4 bl 8008834 + 80088cc: 60f8 str r0, [r7, #12] + + /* return requested data if pbuf is OK */ + if ((q != NULL) && (q->len > q_idx)) { + 80088ce: 68fb ldr r3, [r7, #12] + 80088d0: 2b00 cmp r3, #0 + 80088d2: d00a beq.n 80088ea + 80088d4: 68fb ldr r3, [r7, #12] + 80088d6: 895a ldrh r2, [r3, #10] + 80088d8: 897b ldrh r3, [r7, #10] + 80088da: 429a cmp r2, r3 + 80088dc: d905 bls.n 80088ea + return ((u8_t*)q->payload)[q_idx]; + 80088de: 68fb ldr r3, [r7, #12] + 80088e0: 685b ldr r3, [r3, #4] + 80088e2: 897a ldrh r2, [r7, #10] + 80088e4: 4413 add r3, r2 + 80088e6: 781b ldrb r3, [r3, #0] + 80088e8: e001 b.n 80088ee + } + return -1; + 80088ea: f04f 33ff mov.w r3, #4294967295 +} + 80088ee: 4618 mov r0, r3 + 80088f0: 3710 adds r7, #16 + 80088f2: 46bd mov sp, r7 + 80088f4: bd80 pop {r7, pc} + +080088f6 : +/** + * Initialize this module. + */ +void +tcp_init(void) +{ + 80088f6: b480 push {r7} + 80088f8: af00 add r7, sp, #0 +#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) + tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); +#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ +} + 80088fa: bf00 nop + 80088fc: 46bd mov sp, r7 + 80088fe: bc80 pop {r7} + 8008900: 4770 bx lr + ... + +08008904 : +/** + * Called periodically to dispatch TCP timers. + */ +void +tcp_tmr(void) +{ + 8008904: b580 push {r7, lr} + 8008906: af00 add r7, sp, #0 + /* Call tcp_fasttmr() every 250 ms */ + tcp_fasttmr(); + 8008908: f000 ffc4 bl 8009894 + + if (++tcp_timer & 1) { + 800890c: 4b07 ldr r3, [pc, #28] ; (800892c ) + 800890e: 781b ldrb r3, [r3, #0] + 8008910: 3301 adds r3, #1 + 8008912: b2da uxtb r2, r3 + 8008914: 4b05 ldr r3, [pc, #20] ; (800892c ) + 8008916: 701a strb r2, [r3, #0] + 8008918: 4b04 ldr r3, [pc, #16] ; (800892c ) + 800891a: 781b ldrb r3, [r3, #0] + 800891c: f003 0301 and.w r3, r3, #1 + 8008920: 2b00 cmp r3, #0 + 8008922: d001 beq.n 8008928 + /* Call tcp_slowtmr() every 500 ms, i.e., every other timer + tcp_tmr() is called. */ + tcp_slowtmr(); + 8008924: f000 fcf4 bl 8009310 + } +} + 8008928: bf00 nop + 800892a: bd80 pop {r7, pc} + 800892c: 20006f7d .word 0x20006f7d + +08008930 : +/** Called when a listen pcb is closed. Iterates one pcb list and removes the + * closed listener pcb from pcb->listener if matching. + */ +static void +tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb) +{ + 8008930: b480 push {r7} + 8008932: b085 sub sp, #20 + 8008934: af00 add r7, sp, #0 + 8008936: 6078 str r0, [r7, #4] + 8008938: 6039 str r1, [r7, #0] + struct tcp_pcb *pcb; + for (pcb = list; pcb != NULL; pcb = pcb->next) { + 800893a: 687b ldr r3, [r7, #4] + 800893c: 60fb str r3, [r7, #12] + 800893e: e00a b.n 8008956 + if (pcb->listener == lpcb) { + 8008940: 68fb ldr r3, [r7, #12] + 8008942: 6f9b ldr r3, [r3, #120] ; 0x78 + 8008944: 683a ldr r2, [r7, #0] + 8008946: 429a cmp r2, r3 + 8008948: d102 bne.n 8008950 + pcb->listener = NULL; + 800894a: 68fb ldr r3, [r7, #12] + 800894c: 2200 movs r2, #0 + 800894e: 679a str r2, [r3, #120] ; 0x78 + for (pcb = list; pcb != NULL; pcb = pcb->next) { + 8008950: 68fb ldr r3, [r7, #12] + 8008952: 68db ldr r3, [r3, #12] + 8008954: 60fb str r3, [r7, #12] + 8008956: 68fb ldr r3, [r7, #12] + 8008958: 2b00 cmp r3, #0 + 800895a: d1f1 bne.n 8008940 + } + } +} + 800895c: bf00 nop + 800895e: bf00 nop + 8008960: 3714 adds r7, #20 + 8008962: 46bd mov sp, r7 + 8008964: bc80 pop {r7} + 8008966: 4770 bx lr + +08008968 : +/** Called when a listen pcb is closed. Iterates all pcb lists and removes the + * closed listener pcb from pcb->listener if matching. + */ +static void +tcp_listen_closed(struct tcp_pcb *pcb) +{ + 8008968: b580 push {r7, lr} + 800896a: b084 sub sp, #16 + 800896c: af00 add r7, sp, #0 + 800896e: 6078 str r0, [r7, #4] +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG + size_t i; + LWIP_ASSERT("pcb != NULL", pcb != NULL); + 8008970: 687b ldr r3, [r7, #4] + 8008972: 2b00 cmp r3, #0 + 8008974: d105 bne.n 8008982 + 8008976: 4b13 ldr r3, [pc, #76] ; (80089c4 ) + 8008978: 22c0 movs r2, #192 ; 0xc0 + 800897a: 4913 ldr r1, [pc, #76] ; (80089c8 ) + 800897c: 4813 ldr r0, [pc, #76] ; (80089cc ) + 800897e: f00a fa01 bl 8012d84 + LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); + 8008982: 687b ldr r3, [r7, #4] + 8008984: 7d1b ldrb r3, [r3, #20] + 8008986: 2b01 cmp r3, #1 + 8008988: d005 beq.n 8008996 + 800898a: 4b0e ldr r3, [pc, #56] ; (80089c4 ) + 800898c: 22c1 movs r2, #193 ; 0xc1 + 800898e: 4910 ldr r1, [pc, #64] ; (80089d0 ) + 8008990: 480e ldr r0, [pc, #56] ; (80089cc ) + 8008992: f00a f9f7 bl 8012d84 + for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { + 8008996: 2301 movs r3, #1 + 8008998: 60fb str r3, [r7, #12] + 800899a: e00b b.n 80089b4 + tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen*)pcb); + 800899c: 4a0d ldr r2, [pc, #52] ; (80089d4 ) + 800899e: 68fb ldr r3, [r7, #12] + 80089a0: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80089a4: 681b ldr r3, [r3, #0] + 80089a6: 6879 ldr r1, [r7, #4] + 80089a8: 4618 mov r0, r3 + 80089aa: f7ff ffc1 bl 8008930 + for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { + 80089ae: 68fb ldr r3, [r7, #12] + 80089b0: 3301 adds r3, #1 + 80089b2: 60fb str r3, [r7, #12] + 80089b4: 68fb ldr r3, [r7, #12] + 80089b6: 2b03 cmp r3, #3 + 80089b8: d9f0 bls.n 800899c + } +#endif + LWIP_UNUSED_ARG(pcb); +} + 80089ba: bf00 nop + 80089bc: bf00 nop + 80089be: 3710 adds r7, #16 + 80089c0: 46bd mov sp, r7 + 80089c2: bd80 pop {r7, pc} + 80089c4: 08014d7c .word 0x08014d7c + 80089c8: 08014dac .word 0x08014dac + 80089cc: 08014db8 .word 0x08014db8 + 80089d0: 08014de0 .word 0x08014de0 + 80089d4: 08016730 .word 0x08016730 + +080089d8 : + * @return ERR_OK if connection has been closed + * another err_t if closing failed and pcb is not freed + */ +static err_t +tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) +{ + 80089d8: b5b0 push {r4, r5, r7, lr} + 80089da: b086 sub sp, #24 + 80089dc: af02 add r7, sp, #8 + 80089de: 6078 str r0, [r7, #4] + 80089e0: 460b mov r3, r1 + 80089e2: 70fb strb r3, [r7, #3] + if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { + 80089e4: 78fb ldrb r3, [r7, #3] + 80089e6: 2b00 cmp r3, #0 + 80089e8: d075 beq.n 8008ad6 + 80089ea: 687b ldr r3, [r7, #4] + 80089ec: 7d1b ldrb r3, [r3, #20] + 80089ee: 2b04 cmp r3, #4 + 80089f0: d003 beq.n 80089fa + 80089f2: 687b ldr r3, [r7, #4] + 80089f4: 7d1b ldrb r3, [r3, #20] + 80089f6: 2b07 cmp r3, #7 + 80089f8: d16d bne.n 8008ad6 + if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { + 80089fa: 687b ldr r3, [r7, #4] + 80089fc: 6f5b ldr r3, [r3, #116] ; 0x74 + 80089fe: 2b00 cmp r3, #0 + 8008a00: d104 bne.n 8008a0c + 8008a02: 687b ldr r3, [r7, #4] + 8008a04: 8d1b ldrh r3, [r3, #40] ; 0x28 + 8008a06: f5b3 6f06 cmp.w r3, #2144 ; 0x860 + 8008a0a: d064 beq.n 8008ad6 + /* Not all data received by application, send RST to tell the remote + side about this. */ + LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); + 8008a0c: 687b ldr r3, [r7, #4] + 8008a0e: 7e9b ldrb r3, [r3, #26] + 8008a10: f003 0310 and.w r3, r3, #16 + 8008a14: 2b00 cmp r3, #0 + 8008a16: d106 bne.n 8008a26 + 8008a18: 4b5b ldr r3, [pc, #364] ; (8008b88 ) + 8008a1a: f240 120f movw r2, #271 ; 0x10f + 8008a1e: 495b ldr r1, [pc, #364] ; (8008b8c ) + 8008a20: 485b ldr r0, [pc, #364] ; (8008b90 ) + 8008a22: f00a f9af bl 8012d84 + + /* don't call tcp_abort here: we must not deallocate the pcb since + that might not be expected when calling tcp_close */ + tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, + 8008a26: 687b ldr r3, [r7, #4] + 8008a28: 6cd8 ldr r0, [r3, #76] ; 0x4c + 8008a2a: 687b ldr r3, [r7, #4] + 8008a2c: 6a59 ldr r1, [r3, #36] ; 0x24 + 8008a2e: 687c ldr r4, [r7, #4] + 8008a30: 687b ldr r3, [r7, #4] + 8008a32: 1d1d adds r5, r3, #4 + 8008a34: 687b ldr r3, [r7, #4] + 8008a36: 8adb ldrh r3, [r3, #22] + 8008a38: 687a ldr r2, [r7, #4] + 8008a3a: 8b12 ldrh r2, [r2, #24] + 8008a3c: 9201 str r2, [sp, #4] + 8008a3e: 9300 str r3, [sp, #0] + 8008a40: 462b mov r3, r5 + 8008a42: 4622 mov r2, r4 + 8008a44: f004 fefc bl 800d840 + pcb->local_port, pcb->remote_port); + + tcp_pcb_purge(pcb); + 8008a48: 6878 ldr r0, [r7, #4] + 8008a4a: f001 fa39 bl 8009ec0 + TCP_RMV_ACTIVE(pcb); + 8008a4e: 4b51 ldr r3, [pc, #324] ; (8008b94 ) + 8008a50: 681b ldr r3, [r3, #0] + 8008a52: 687a ldr r2, [r7, #4] + 8008a54: 429a cmp r2, r3 + 8008a56: d105 bne.n 8008a64 + 8008a58: 4b4e ldr r3, [pc, #312] ; (8008b94 ) + 8008a5a: 681b ldr r3, [r3, #0] + 8008a5c: 68db ldr r3, [r3, #12] + 8008a5e: 4a4d ldr r2, [pc, #308] ; (8008b94 ) + 8008a60: 6013 str r3, [r2, #0] + 8008a62: e013 b.n 8008a8c + 8008a64: 4b4b ldr r3, [pc, #300] ; (8008b94 ) + 8008a66: 681b ldr r3, [r3, #0] + 8008a68: 60fb str r3, [r7, #12] + 8008a6a: e00c b.n 8008a86 + 8008a6c: 68fb ldr r3, [r7, #12] + 8008a6e: 68db ldr r3, [r3, #12] + 8008a70: 687a ldr r2, [r7, #4] + 8008a72: 429a cmp r2, r3 + 8008a74: d104 bne.n 8008a80 + 8008a76: 687b ldr r3, [r7, #4] + 8008a78: 68da ldr r2, [r3, #12] + 8008a7a: 68fb ldr r3, [r7, #12] + 8008a7c: 60da str r2, [r3, #12] + 8008a7e: e005 b.n 8008a8c + 8008a80: 68fb ldr r3, [r7, #12] + 8008a82: 68db ldr r3, [r3, #12] + 8008a84: 60fb str r3, [r7, #12] + 8008a86: 68fb ldr r3, [r7, #12] + 8008a88: 2b00 cmp r3, #0 + 8008a8a: d1ef bne.n 8008a6c + 8008a8c: 687b ldr r3, [r7, #4] + 8008a8e: 2200 movs r2, #0 + 8008a90: 60da str r2, [r3, #12] + 8008a92: 4b41 ldr r3, [pc, #260] ; (8008b98 ) + 8008a94: 2201 movs r2, #1 + 8008a96: 701a strb r2, [r3, #0] + if (pcb->state == ESTABLISHED) { + 8008a98: 687b ldr r3, [r7, #4] + 8008a9a: 7d1b ldrb r3, [r3, #20] + 8008a9c: 2b04 cmp r3, #4 + 8008a9e: d10c bne.n 8008aba + /* move to TIME_WAIT since we close actively */ + pcb->state = TIME_WAIT; + 8008aa0: 687b ldr r3, [r7, #4] + 8008aa2: 220a movs r2, #10 + 8008aa4: 751a strb r2, [r3, #20] + TCP_REG(&tcp_tw_pcbs, pcb); + 8008aa6: 4b3d ldr r3, [pc, #244] ; (8008b9c ) + 8008aa8: 681a ldr r2, [r3, #0] + 8008aaa: 687b ldr r3, [r7, #4] + 8008aac: 60da str r2, [r3, #12] + 8008aae: 4a3b ldr r2, [pc, #236] ; (8008b9c ) + 8008ab0: 687b ldr r3, [r7, #4] + 8008ab2: 6013 str r3, [r2, #0] + 8008ab4: f005 f90c bl 800dcd0 + 8008ab8: e00b b.n 8008ad2 + } else { + /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ + if (tcp_input_pcb == pcb) { + 8008aba: 4b39 ldr r3, [pc, #228] ; (8008ba0 ) + 8008abc: 681b ldr r3, [r3, #0] + 8008abe: 687a ldr r2, [r7, #4] + 8008ac0: 429a cmp r2, r3 + 8008ac2: d102 bne.n 8008aca + /* prevent using a deallocated pcb: free it from tcp_input later */ + tcp_trigger_input_pcb_close(); + 8008ac4: f003 fd5c bl 800c580 + 8008ac8: e003 b.n 8008ad2 + } else { + memp_free(MEMP_TCP_PCB, pcb); + 8008aca: 6879 ldr r1, [r7, #4] + 8008acc: 2001 movs r0, #1 + 8008ace: f7fe fef5 bl 80078bc + } + } + return ERR_OK; + 8008ad2: 2300 movs r3, #0 + 8008ad4: e053 b.n 8008b7e + } + } + + /* - states which free the pcb are handled here, + - states which send FIN and change state are handled in tcp_close_shutdown_fin() */ + switch (pcb->state) { + 8008ad6: 687b ldr r3, [r7, #4] + 8008ad8: 7d1b ldrb r3, [r3, #20] + 8008ada: 2b02 cmp r3, #2 + 8008adc: d03d beq.n 8008b5a + 8008ade: 2b02 cmp r3, #2 + 8008ae0: dc47 bgt.n 8008b72 + 8008ae2: 2b00 cmp r3, #0 + 8008ae4: d002 beq.n 8008aec + 8008ae6: 2b01 cmp r3, #1 + 8008ae8: d02b beq.n 8008b42 + 8008aea: e042 b.n 8008b72 + * and the user needs some way to free it should the need arise. + * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) + * or for a pcb that has been used and then entered the CLOSED state + * is erroneous, but this should never happen as the pcb has in those cases + * been freed, and so any remaining handles are bogus. */ + if (pcb->local_port != 0) { + 8008aec: 687b ldr r3, [r7, #4] + 8008aee: 8adb ldrh r3, [r3, #22] + 8008af0: 2b00 cmp r3, #0 + 8008af2: d021 beq.n 8008b38 + TCP_RMV(&tcp_bound_pcbs, pcb); + 8008af4: 4b2b ldr r3, [pc, #172] ; (8008ba4 ) + 8008af6: 681b ldr r3, [r3, #0] + 8008af8: 687a ldr r2, [r7, #4] + 8008afa: 429a cmp r2, r3 + 8008afc: d105 bne.n 8008b0a + 8008afe: 4b29 ldr r3, [pc, #164] ; (8008ba4 ) + 8008b00: 681b ldr r3, [r3, #0] + 8008b02: 68db ldr r3, [r3, #12] + 8008b04: 4a27 ldr r2, [pc, #156] ; (8008ba4 ) + 8008b06: 6013 str r3, [r2, #0] + 8008b08: e013 b.n 8008b32 + 8008b0a: 4b26 ldr r3, [pc, #152] ; (8008ba4 ) + 8008b0c: 681b ldr r3, [r3, #0] + 8008b0e: 60bb str r3, [r7, #8] + 8008b10: e00c b.n 8008b2c + 8008b12: 68bb ldr r3, [r7, #8] + 8008b14: 68db ldr r3, [r3, #12] + 8008b16: 687a ldr r2, [r7, #4] + 8008b18: 429a cmp r2, r3 + 8008b1a: d104 bne.n 8008b26 + 8008b1c: 687b ldr r3, [r7, #4] + 8008b1e: 68da ldr r2, [r3, #12] + 8008b20: 68bb ldr r3, [r7, #8] + 8008b22: 60da str r2, [r3, #12] + 8008b24: e005 b.n 8008b32 + 8008b26: 68bb ldr r3, [r7, #8] + 8008b28: 68db ldr r3, [r3, #12] + 8008b2a: 60bb str r3, [r7, #8] + 8008b2c: 68bb ldr r3, [r7, #8] + 8008b2e: 2b00 cmp r3, #0 + 8008b30: d1ef bne.n 8008b12 + 8008b32: 687b ldr r3, [r7, #4] + 8008b34: 2200 movs r2, #0 + 8008b36: 60da str r2, [r3, #12] + } + memp_free(MEMP_TCP_PCB, pcb); + 8008b38: 6879 ldr r1, [r7, #4] + 8008b3a: 2001 movs r0, #1 + 8008b3c: f7fe febe bl 80078bc + break; + 8008b40: e01c b.n 8008b7c + case LISTEN: + tcp_listen_closed(pcb); + 8008b42: 6878 ldr r0, [r7, #4] + 8008b44: f7ff ff10 bl 8008968 + tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); + 8008b48: 6879 ldr r1, [r7, #4] + 8008b4a: 4817 ldr r0, [pc, #92] ; (8008ba8 ) + 8008b4c: f001 f9fa bl 8009f44 + memp_free(MEMP_TCP_PCB_LISTEN, pcb); + 8008b50: 6879 ldr r1, [r7, #4] + 8008b52: 2002 movs r0, #2 + 8008b54: f7fe feb2 bl 80078bc + break; + 8008b58: e010 b.n 8008b7c + case SYN_SENT: + TCP_PCB_REMOVE_ACTIVE(pcb); + 8008b5a: 6879 ldr r1, [r7, #4] + 8008b5c: 480d ldr r0, [pc, #52] ; (8008b94 ) + 8008b5e: f001 f9f1 bl 8009f44 + 8008b62: 4b0d ldr r3, [pc, #52] ; (8008b98 ) + 8008b64: 2201 movs r2, #1 + 8008b66: 701a strb r2, [r3, #0] + memp_free(MEMP_TCP_PCB, pcb); + 8008b68: 6879 ldr r1, [r7, #4] + 8008b6a: 2001 movs r0, #1 + 8008b6c: f7fe fea6 bl 80078bc + MIB2_STATS_INC(mib2.tcpattemptfails); + break; + 8008b70: e004 b.n 8008b7c + default: + return tcp_close_shutdown_fin(pcb); + 8008b72: 6878 ldr r0, [r7, #4] + 8008b74: f000 f81a bl 8008bac + 8008b78: 4603 mov r3, r0 + 8008b7a: e000 b.n 8008b7e + } + return ERR_OK; + 8008b7c: 2300 movs r3, #0 +} + 8008b7e: 4618 mov r0, r3 + 8008b80: 3710 adds r7, #16 + 8008b82: 46bd mov sp, r7 + 8008b84: bdb0 pop {r4, r5, r7, pc} + 8008b86: bf00 nop + 8008b88: 08014d7c .word 0x08014d7c + 8008b8c: 08014df8 .word 0x08014df8 + 8008b90: 08014db8 .word 0x08014db8 + 8008b94: 20006f74 .word 0x20006f74 + 8008b98: 20006f7c .word 0x20006f7c + 8008b9c: 20006f78 .word 0x20006f78 + 8008ba0: 20006fb4 .word 0x20006fb4 + 8008ba4: 20006f6c .word 0x20006f6c + 8008ba8: 20006f70 .word 0x20006f70 + +08008bac : + +static err_t +tcp_close_shutdown_fin(struct tcp_pcb *pcb) +{ + 8008bac: b580 push {r7, lr} + 8008bae: b084 sub sp, #16 + 8008bb0: af00 add r7, sp, #0 + 8008bb2: 6078 str r0, [r7, #4] + err_t err; + LWIP_ASSERT("pcb != NULL", pcb != NULL); + 8008bb4: 687b ldr r3, [r7, #4] + 8008bb6: 2b00 cmp r3, #0 + 8008bb8: d106 bne.n 8008bc8 + 8008bba: 4b2e ldr r3, [pc, #184] ; (8008c74 ) + 8008bbc: f240 124d movw r2, #333 ; 0x14d + 8008bc0: 492d ldr r1, [pc, #180] ; (8008c78 ) + 8008bc2: 482e ldr r0, [pc, #184] ; (8008c7c ) + 8008bc4: f00a f8de bl 8012d84 + + switch (pcb->state) { + 8008bc8: 687b ldr r3, [r7, #4] + 8008bca: 7d1b ldrb r3, [r3, #20] + 8008bcc: 2b07 cmp r3, #7 + 8008bce: d020 beq.n 8008c12 + 8008bd0: 2b07 cmp r3, #7 + 8008bd2: dc2b bgt.n 8008c2c + 8008bd4: 2b03 cmp r3, #3 + 8008bd6: d002 beq.n 8008bde + 8008bd8: 2b04 cmp r3, #4 + 8008bda: d00d beq.n 8008bf8 + 8008bdc: e026 b.n 8008c2c + case SYN_RCVD: + err = tcp_send_fin(pcb); + 8008bde: 6878 ldr r0, [r7, #4] + 8008be0: f003 fd58 bl 800c694 + 8008be4: 4603 mov r3, r0 + 8008be6: 73fb strb r3, [r7, #15] + if (err == ERR_OK) { + 8008be8: f997 300f ldrsb.w r3, [r7, #15] + 8008bec: 2b00 cmp r3, #0 + 8008bee: d11f bne.n 8008c30 + tcp_backlog_accepted(pcb); + MIB2_STATS_INC(mib2.tcpattemptfails); + pcb->state = FIN_WAIT_1; + 8008bf0: 687b ldr r3, [r7, #4] + 8008bf2: 2205 movs r2, #5 + 8008bf4: 751a strb r2, [r3, #20] + } + break; + 8008bf6: e01b b.n 8008c30 + case ESTABLISHED: + err = tcp_send_fin(pcb); + 8008bf8: 6878 ldr r0, [r7, #4] + 8008bfa: f003 fd4b bl 800c694 + 8008bfe: 4603 mov r3, r0 + 8008c00: 73fb strb r3, [r7, #15] + if (err == ERR_OK) { + 8008c02: f997 300f ldrsb.w r3, [r7, #15] + 8008c06: 2b00 cmp r3, #0 + 8008c08: d114 bne.n 8008c34 + MIB2_STATS_INC(mib2.tcpestabresets); + pcb->state = FIN_WAIT_1; + 8008c0a: 687b ldr r3, [r7, #4] + 8008c0c: 2205 movs r2, #5 + 8008c0e: 751a strb r2, [r3, #20] + } + break; + 8008c10: e010 b.n 8008c34 + case CLOSE_WAIT: + err = tcp_send_fin(pcb); + 8008c12: 6878 ldr r0, [r7, #4] + 8008c14: f003 fd3e bl 800c694 + 8008c18: 4603 mov r3, r0 + 8008c1a: 73fb strb r3, [r7, #15] + if (err == ERR_OK) { + 8008c1c: f997 300f ldrsb.w r3, [r7, #15] + 8008c20: 2b00 cmp r3, #0 + 8008c22: d109 bne.n 8008c38 + MIB2_STATS_INC(mib2.tcpestabresets); + pcb->state = LAST_ACK; + 8008c24: 687b ldr r3, [r7, #4] + 8008c26: 2209 movs r2, #9 + 8008c28: 751a strb r2, [r3, #20] + } + break; + 8008c2a: e005 b.n 8008c38 + default: + /* Has already been closed, do nothing. */ + return ERR_OK; + 8008c2c: 2300 movs r3, #0 + 8008c2e: e01c b.n 8008c6a + break; + 8008c30: bf00 nop + 8008c32: e002 b.n 8008c3a + break; + 8008c34: bf00 nop + 8008c36: e000 b.n 8008c3a + break; + 8008c38: bf00 nop + } + + if (err == ERR_OK) { + 8008c3a: f997 300f ldrsb.w r3, [r7, #15] + 8008c3e: 2b00 cmp r3, #0 + 8008c40: d103 bne.n 8008c4a + /* To ensure all data has been sent when tcp_close returns, we have + to make sure tcp_output doesn't fail. + Since we don't really have to ensure all data has been sent when tcp_close + returns (unsent data is sent from tcp timer functions, also), we don't care + for the return value of tcp_output for now. */ + tcp_output(pcb); + 8008c42: 6878 ldr r0, [r7, #4] + 8008c44: f004 fb78 bl 800d338 + 8008c48: e00d b.n 8008c66 + } else if (err == ERR_MEM) { + 8008c4a: f997 300f ldrsb.w r3, [r7, #15] + 8008c4e: f1b3 3fff cmp.w r3, #4294967295 + 8008c52: d108 bne.n 8008c66 + /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ + pcb->flags |= TF_CLOSEPEND; + 8008c54: 687b ldr r3, [r7, #4] + 8008c56: 7e9b ldrb r3, [r3, #26] + 8008c58: f043 0308 orr.w r3, r3, #8 + 8008c5c: b2da uxtb r2, r3 + 8008c5e: 687b ldr r3, [r7, #4] + 8008c60: 769a strb r2, [r3, #26] + /* We have to return ERR_OK from here to indicate to the callers that this + pcb should not be used any more as it will be freed soon via tcp_tmr. + This is OK here since sending FIN does not guarantee a time frime for + actually freeing the pcb, either (it is left in closure states for + remote ACK or timeout) */ + return ERR_OK; + 8008c62: 2300 movs r3, #0 + 8008c64: e001 b.n 8008c6a + } + return err; + 8008c66: f997 300f ldrsb.w r3, [r7, #15] +} + 8008c6a: 4618 mov r0, r3 + 8008c6c: 3710 adds r7, #16 + 8008c6e: 46bd mov sp, r7 + 8008c70: bd80 pop {r7, pc} + 8008c72: bf00 nop + 8008c74: 08014d7c .word 0x08014d7c + 8008c78: 08014dac .word 0x08014dac + 8008c7c: 08014db8 .word 0x08014db8 + +08008c80 : + * @return ERR_OK if connection has been closed + * another err_t if closing failed and pcb is not freed + */ +err_t +tcp_close(struct tcp_pcb *pcb) +{ + 8008c80: b580 push {r7, lr} + 8008c82: b082 sub sp, #8 + 8008c84: af00 add r7, sp, #0 + 8008c86: 6078 str r0, [r7, #4] + LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); + tcp_debug_print_state(pcb->state); + + if (pcb->state != LISTEN) { + 8008c88: 687b ldr r3, [r7, #4] + 8008c8a: 7d1b ldrb r3, [r3, #20] + 8008c8c: 2b01 cmp r3, #1 + 8008c8e: d006 beq.n 8008c9e + /* Set a flag not to receive any more data... */ + pcb->flags |= TF_RXCLOSED; + 8008c90: 687b ldr r3, [r7, #4] + 8008c92: 7e9b ldrb r3, [r3, #26] + 8008c94: f043 0310 orr.w r3, r3, #16 + 8008c98: b2da uxtb r2, r3 + 8008c9a: 687b ldr r3, [r7, #4] + 8008c9c: 769a strb r2, [r3, #26] + } + /* ... and close */ + return tcp_close_shutdown(pcb, 1); + 8008c9e: 2101 movs r1, #1 + 8008ca0: 6878 ldr r0, [r7, #4] + 8008ca2: f7ff fe99 bl 80089d8 + 8008ca6: 4603 mov r3, r0 +} + 8008ca8: 4618 mov r0, r3 + 8008caa: 3708 adds r7, #8 + 8008cac: 46bd mov sp, r7 + 8008cae: bd80 pop {r7, pc} + +08008cb0 : + * @param pcb the tcp_pcb to abort + * @param reset boolean to indicate whether a reset should be sent + */ +void +tcp_abandon(struct tcp_pcb *pcb, int reset) +{ + 8008cb0: b580 push {r7, lr} + 8008cb2: b08c sub sp, #48 ; 0x30 + 8008cb4: af02 add r7, sp, #8 + 8008cb6: 6078 str r0, [r7, #4] + 8008cb8: 6039 str r1, [r7, #0] + tcp_err_fn errf; +#endif /* LWIP_CALLBACK_API */ + void *errf_arg; + + /* pcb->state LISTEN not allowed here */ + LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", + 8008cba: 687b ldr r3, [r7, #4] + 8008cbc: 7d1b ldrb r3, [r3, #20] + 8008cbe: 2b01 cmp r3, #1 + 8008cc0: d106 bne.n 8008cd0 + 8008cc2: 4b4d ldr r3, [pc, #308] ; (8008df8 ) + 8008cc4: f240 12df movw r2, #479 ; 0x1df + 8008cc8: 494c ldr r1, [pc, #304] ; (8008dfc ) + 8008cca: 484d ldr r0, [pc, #308] ; (8008e00 ) + 8008ccc: f00a f85a bl 8012d84 + pcb->state != LISTEN); + /* Figure out on which TCP PCB list we are, and remove us. If we + are in an active state, call the receive function associated with + the PCB with a NULL argument, and send an RST to the remote end. */ + if (pcb->state == TIME_WAIT) { + 8008cd0: 687b ldr r3, [r7, #4] + 8008cd2: 7d1b ldrb r3, [r3, #20] + 8008cd4: 2b0a cmp r3, #10 + 8008cd6: d108 bne.n 8008cea + tcp_pcb_remove(&tcp_tw_pcbs, pcb); + 8008cd8: 6879 ldr r1, [r7, #4] + 8008cda: 484a ldr r0, [pc, #296] ; (8008e04 ) + 8008cdc: f001 f932 bl 8009f44 + memp_free(MEMP_TCP_PCB, pcb); + 8008ce0: 6879 ldr r1, [r7, #4] + 8008ce2: 2001 movs r0, #1 + 8008ce4: f7fe fdea bl 80078bc + } + last_state = pcb->state; + memp_free(MEMP_TCP_PCB, pcb); + TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); + } +} + 8008ce8: e081 b.n 8008dee + int send_rst = 0; + 8008cea: 2300 movs r3, #0 + 8008cec: 627b str r3, [r7, #36] ; 0x24 + u16_t local_port = 0; + 8008cee: 2300 movs r3, #0 + 8008cf0: 847b strh r3, [r7, #34] ; 0x22 + seqno = pcb->snd_nxt; + 8008cf2: 687b ldr r3, [r7, #4] + 8008cf4: 6cdb ldr r3, [r3, #76] ; 0x4c + 8008cf6: 61bb str r3, [r7, #24] + ackno = pcb->rcv_nxt; + 8008cf8: 687b ldr r3, [r7, #4] + 8008cfa: 6a5b ldr r3, [r3, #36] ; 0x24 + 8008cfc: 617b str r3, [r7, #20] + errf = pcb->errf; + 8008cfe: 687b ldr r3, [r7, #4] + 8008d00: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c + 8008d04: 613b str r3, [r7, #16] + errf_arg = pcb->callback_arg; + 8008d06: 687b ldr r3, [r7, #4] + 8008d08: 691b ldr r3, [r3, #16] + 8008d0a: 60fb str r3, [r7, #12] + if (pcb->state == CLOSED) { + 8008d0c: 687b ldr r3, [r7, #4] + 8008d0e: 7d1b ldrb r3, [r3, #20] + 8008d10: 2b00 cmp r3, #0 + 8008d12: d126 bne.n 8008d62 + if (pcb->local_port != 0) { + 8008d14: 687b ldr r3, [r7, #4] + 8008d16: 8adb ldrh r3, [r3, #22] + 8008d18: 2b00 cmp r3, #0 + 8008d1a: d02e beq.n 8008d7a + TCP_RMV(&tcp_bound_pcbs, pcb); + 8008d1c: 4b3a ldr r3, [pc, #232] ; (8008e08 ) + 8008d1e: 681b ldr r3, [r3, #0] + 8008d20: 687a ldr r2, [r7, #4] + 8008d22: 429a cmp r2, r3 + 8008d24: d105 bne.n 8008d32 + 8008d26: 4b38 ldr r3, [pc, #224] ; (8008e08 ) + 8008d28: 681b ldr r3, [r3, #0] + 8008d2a: 68db ldr r3, [r3, #12] + 8008d2c: 4a36 ldr r2, [pc, #216] ; (8008e08 ) + 8008d2e: 6013 str r3, [r2, #0] + 8008d30: e013 b.n 8008d5a + 8008d32: 4b35 ldr r3, [pc, #212] ; (8008e08 ) + 8008d34: 681b ldr r3, [r3, #0] + 8008d36: 61fb str r3, [r7, #28] + 8008d38: e00c b.n 8008d54 + 8008d3a: 69fb ldr r3, [r7, #28] + 8008d3c: 68db ldr r3, [r3, #12] + 8008d3e: 687a ldr r2, [r7, #4] + 8008d40: 429a cmp r2, r3 + 8008d42: d104 bne.n 8008d4e + 8008d44: 687b ldr r3, [r7, #4] + 8008d46: 68da ldr r2, [r3, #12] + 8008d48: 69fb ldr r3, [r7, #28] + 8008d4a: 60da str r2, [r3, #12] + 8008d4c: e005 b.n 8008d5a + 8008d4e: 69fb ldr r3, [r7, #28] + 8008d50: 68db ldr r3, [r3, #12] + 8008d52: 61fb str r3, [r7, #28] + 8008d54: 69fb ldr r3, [r7, #28] + 8008d56: 2b00 cmp r3, #0 + 8008d58: d1ef bne.n 8008d3a + 8008d5a: 687b ldr r3, [r7, #4] + 8008d5c: 2200 movs r2, #0 + 8008d5e: 60da str r2, [r3, #12] + 8008d60: e00b b.n 8008d7a + send_rst = reset; + 8008d62: 683b ldr r3, [r7, #0] + 8008d64: 627b str r3, [r7, #36] ; 0x24 + local_port = pcb->local_port; + 8008d66: 687b ldr r3, [r7, #4] + 8008d68: 8adb ldrh r3, [r3, #22] + 8008d6a: 847b strh r3, [r7, #34] ; 0x22 + TCP_PCB_REMOVE_ACTIVE(pcb); + 8008d6c: 6879 ldr r1, [r7, #4] + 8008d6e: 4827 ldr r0, [pc, #156] ; (8008e0c ) + 8008d70: f001 f8e8 bl 8009f44 + 8008d74: 4b26 ldr r3, [pc, #152] ; (8008e10 ) + 8008d76: 2201 movs r2, #1 + 8008d78: 701a strb r2, [r3, #0] + if (pcb->unacked != NULL) { + 8008d7a: 687b ldr r3, [r7, #4] + 8008d7c: 6edb ldr r3, [r3, #108] ; 0x6c + 8008d7e: 2b00 cmp r3, #0 + 8008d80: d004 beq.n 8008d8c + tcp_segs_free(pcb->unacked); + 8008d82: 687b ldr r3, [r7, #4] + 8008d84: 6edb ldr r3, [r3, #108] ; 0x6c + 8008d86: 4618 mov r0, r3 + 8008d88: f000 fe51 bl 8009a2e + if (pcb->unsent != NULL) { + 8008d8c: 687b ldr r3, [r7, #4] + 8008d8e: 6e9b ldr r3, [r3, #104] ; 0x68 + 8008d90: 2b00 cmp r3, #0 + 8008d92: d004 beq.n 8008d9e + tcp_segs_free(pcb->unsent); + 8008d94: 687b ldr r3, [r7, #4] + 8008d96: 6e9b ldr r3, [r3, #104] ; 0x68 + 8008d98: 4618 mov r0, r3 + 8008d9a: f000 fe48 bl 8009a2e + if (pcb->ooseq != NULL) { + 8008d9e: 687b ldr r3, [r7, #4] + 8008da0: 6f1b ldr r3, [r3, #112] ; 0x70 + 8008da2: 2b00 cmp r3, #0 + 8008da4: d004 beq.n 8008db0 + tcp_segs_free(pcb->ooseq); + 8008da6: 687b ldr r3, [r7, #4] + 8008da8: 6f1b ldr r3, [r3, #112] ; 0x70 + 8008daa: 4618 mov r0, r3 + 8008dac: f000 fe3f bl 8009a2e + if (send_rst) { + 8008db0: 6a7b ldr r3, [r7, #36] ; 0x24 + 8008db2: 2b00 cmp r3, #0 + 8008db4: d00c beq.n 8008dd0 + tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port); + 8008db6: 687a ldr r2, [r7, #4] + 8008db8: 687b ldr r3, [r7, #4] + 8008dba: 1d19 adds r1, r3, #4 + 8008dbc: 687b ldr r3, [r7, #4] + 8008dbe: 8b1b ldrh r3, [r3, #24] + 8008dc0: 9301 str r3, [sp, #4] + 8008dc2: 8c7b ldrh r3, [r7, #34] ; 0x22 + 8008dc4: 9300 str r3, [sp, #0] + 8008dc6: 460b mov r3, r1 + 8008dc8: 6979 ldr r1, [r7, #20] + 8008dca: 69b8 ldr r0, [r7, #24] + 8008dcc: f004 fd38 bl 800d840 + last_state = pcb->state; + 8008dd0: 687b ldr r3, [r7, #4] + 8008dd2: 7d1b ldrb r3, [r3, #20] + 8008dd4: 72fb strb r3, [r7, #11] + memp_free(MEMP_TCP_PCB, pcb); + 8008dd6: 6879 ldr r1, [r7, #4] + 8008dd8: 2001 movs r0, #1 + 8008dda: f7fe fd6f bl 80078bc + TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); + 8008dde: 693b ldr r3, [r7, #16] + 8008de0: 2b00 cmp r3, #0 + 8008de2: d004 beq.n 8008dee + 8008de4: 693b ldr r3, [r7, #16] + 8008de6: f06f 010c mvn.w r1, #12 + 8008dea: 68f8 ldr r0, [r7, #12] + 8008dec: 4798 blx r3 +} + 8008dee: bf00 nop + 8008df0: 3728 adds r7, #40 ; 0x28 + 8008df2: 46bd mov sp, r7 + 8008df4: bd80 pop {r7, pc} + 8008df6: bf00 nop + 8008df8: 08014d7c .word 0x08014d7c + 8008dfc: 08014e14 .word 0x08014e14 + 8008e00: 08014db8 .word 0x08014db8 + 8008e04: 20006f78 .word 0x20006f78 + 8008e08: 20006f6c .word 0x20006f6c + 8008e0c: 20006f74 .word 0x20006f74 + 8008e10: 20006f7c .word 0x20006f7c + +08008e14 : + * + * @param pcb the tcp pcb to abort + */ +void +tcp_abort(struct tcp_pcb *pcb) +{ + 8008e14: b580 push {r7, lr} + 8008e16: b082 sub sp, #8 + 8008e18: af00 add r7, sp, #0 + 8008e1a: 6078 str r0, [r7, #4] + tcp_abandon(pcb, 1); + 8008e1c: 2101 movs r1, #1 + 8008e1e: 6878 ldr r0, [r7, #4] + 8008e20: f7ff ff46 bl 8008cb0 +} + 8008e24: bf00 nop + 8008e26: 3708 adds r7, #8 + 8008e28: 46bd mov sp, r7 + 8008e2a: bd80 pop {r7, pc} + +08008e2c : + * ERR_VAL if bind failed because the PCB is not in a valid state + * ERR_OK if bound + */ +err_t +tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) +{ + 8008e2c: b580 push {r7, lr} + 8008e2e: b088 sub sp, #32 + 8008e30: af00 add r7, sp, #0 + 8008e32: 60f8 str r0, [r7, #12] + 8008e34: 60b9 str r1, [r7, #8] + 8008e36: 4613 mov r3, r2 + 8008e38: 80fb strh r3, [r7, #6] + int i; + int max_pcb_list = NUM_TCP_PCB_LISTS; + 8008e3a: 2304 movs r3, #4 + 8008e3c: 617b str r3, [r7, #20] + struct tcp_pcb *cpcb; + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (ipaddr == NULL) { + 8008e3e: 68bb ldr r3, [r7, #8] + 8008e40: 2b00 cmp r3, #0 + 8008e42: d101 bne.n 8008e48 + ipaddr = IP4_ADDR_ANY; + 8008e44: 4b3c ldr r3, [pc, #240] ; (8008f38 ) + 8008e46: 60bb str r3, [r7, #8] + } +#endif /* LWIP_IPV4 */ + + /* still need to check for ipaddr == NULL in IPv6 only case */ + if ((pcb == NULL) || (ipaddr == NULL)) { + 8008e48: 68fb ldr r3, [r7, #12] + 8008e4a: 2b00 cmp r3, #0 + 8008e4c: d002 beq.n 8008e54 + 8008e4e: 68bb ldr r3, [r7, #8] + 8008e50: 2b00 cmp r3, #0 + 8008e52: d102 bne.n 8008e5a + return ERR_VAL; + 8008e54: f06f 0305 mvn.w r3, #5 + 8008e58: e06a b.n 8008f30 + } + + LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); + 8008e5a: 68fb ldr r3, [r7, #12] + 8008e5c: 7d1b ldrb r3, [r3, #20] + 8008e5e: 2b00 cmp r3, #0 + 8008e60: d009 beq.n 8008e76 + 8008e62: 4b36 ldr r3, [pc, #216] ; (8008f3c ) + 8008e64: f44f 7211 mov.w r2, #580 ; 0x244 + 8008e68: 4935 ldr r1, [pc, #212] ; (8008f40 ) + 8008e6a: 4836 ldr r0, [pc, #216] ; (8008f44 ) + 8008e6c: f009 ff8a bl 8012d84 + 8008e70: f06f 0305 mvn.w r3, #5 + 8008e74: e05c b.n 8008f30 + if (ip_get_option(pcb, SOF_REUSEADDR)) { + max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; + } +#endif /* SO_REUSE */ + + if (port == 0) { + 8008e76: 88fb ldrh r3, [r7, #6] + 8008e78: 2b00 cmp r3, #0 + 8008e7a: d109 bne.n 8008e90 + port = tcp_new_port(); + 8008e7c: f000 f910 bl 80090a0 + 8008e80: 4603 mov r3, r0 + 8008e82: 80fb strh r3, [r7, #6] + if (port == 0) { + 8008e84: 88fb ldrh r3, [r7, #6] + 8008e86: 2b00 cmp r3, #0 + 8008e88: d135 bne.n 8008ef6 + return ERR_BUF; + 8008e8a: f06f 0301 mvn.w r3, #1 + 8008e8e: e04f b.n 8008f30 + } + } else { + /* Check if the address already is in use (on all lists) */ + for (i = 0; i < max_pcb_list; i++) { + 8008e90: 2300 movs r3, #0 + 8008e92: 61fb str r3, [r7, #28] + 8008e94: e02b b.n 8008eee + for (cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { + 8008e96: 4a2c ldr r2, [pc, #176] ; (8008f48 ) + 8008e98: 69fb ldr r3, [r7, #28] + 8008e9a: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 8008e9e: 681b ldr r3, [r3, #0] + 8008ea0: 61bb str r3, [r7, #24] + 8008ea2: e01e b.n 8008ee2 + if (cpcb->local_port == port) { + 8008ea4: 69bb ldr r3, [r7, #24] + 8008ea6: 8adb ldrh r3, [r3, #22] + 8008ea8: 88fa ldrh r2, [r7, #6] + 8008eaa: 429a cmp r2, r3 + 8008eac: d116 bne.n 8008edc + !ip_get_option(cpcb, SOF_REUSEADDR)) +#endif /* SO_REUSE */ + { + /* @todo: check accept_any_ip_version */ + if ((IP_IS_V6(ipaddr) == IP_IS_V6_VAL(cpcb->local_ip)) && + (ip_addr_isany(&cpcb->local_ip) || + 8008eae: 69bb ldr r3, [r7, #24] + if ((IP_IS_V6(ipaddr) == IP_IS_V6_VAL(cpcb->local_ip)) && + 8008eb0: 2b00 cmp r3, #0 + 8008eb2: d010 beq.n 8008ed6 + (ip_addr_isany(&cpcb->local_ip) || + 8008eb4: 69bb ldr r3, [r7, #24] + 8008eb6: 681b ldr r3, [r3, #0] + 8008eb8: 2b00 cmp r3, #0 + 8008eba: d00c beq.n 8008ed6 + 8008ebc: 68bb ldr r3, [r7, #8] + 8008ebe: 2b00 cmp r3, #0 + 8008ec0: d009 beq.n 8008ed6 + ip_addr_isany(ipaddr) || + 8008ec2: 68bb ldr r3, [r7, #8] + 8008ec4: 681b ldr r3, [r3, #0] + 8008ec6: 2b00 cmp r3, #0 + 8008ec8: d005 beq.n 8008ed6 + ip_addr_cmp(&cpcb->local_ip, ipaddr))) { + 8008eca: 69bb ldr r3, [r7, #24] + 8008ecc: 681a ldr r2, [r3, #0] + 8008ece: 68bb ldr r3, [r7, #8] + 8008ed0: 681b ldr r3, [r3, #0] + if ((IP_IS_V6(ipaddr) == IP_IS_V6_VAL(cpcb->local_ip)) && + 8008ed2: 429a cmp r2, r3 + 8008ed4: d102 bne.n 8008edc + return ERR_USE; + 8008ed6: f06f 0307 mvn.w r3, #7 + 8008eda: e029 b.n 8008f30 + for (cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { + 8008edc: 69bb ldr r3, [r7, #24] + 8008ede: 68db ldr r3, [r3, #12] + 8008ee0: 61bb str r3, [r7, #24] + 8008ee2: 69bb ldr r3, [r7, #24] + 8008ee4: 2b00 cmp r3, #0 + 8008ee6: d1dd bne.n 8008ea4 + for (i = 0; i < max_pcb_list; i++) { + 8008ee8: 69fb ldr r3, [r7, #28] + 8008eea: 3301 adds r3, #1 + 8008eec: 61fb str r3, [r7, #28] + 8008eee: 69fa ldr r2, [r7, #28] + 8008ef0: 697b ldr r3, [r7, #20] + 8008ef2: 429a cmp r2, r3 + 8008ef4: dbcf blt.n 8008e96 + } + } + } + } + + if (!ip_addr_isany(ipaddr)) { + 8008ef6: 68bb ldr r3, [r7, #8] + 8008ef8: 2b00 cmp r3, #0 + 8008efa: d00c beq.n 8008f16 + 8008efc: 68bb ldr r3, [r7, #8] + 8008efe: 681b ldr r3, [r3, #0] + 8008f00: 2b00 cmp r3, #0 + 8008f02: d008 beq.n 8008f16 + ip_addr_set(&pcb->local_ip, ipaddr); + 8008f04: 68bb ldr r3, [r7, #8] + 8008f06: 2b00 cmp r3, #0 + 8008f08: d002 beq.n 8008f10 + 8008f0a: 68bb ldr r3, [r7, #8] + 8008f0c: 681b ldr r3, [r3, #0] + 8008f0e: e000 b.n 8008f12 + 8008f10: 2300 movs r3, #0 + 8008f12: 68fa ldr r2, [r7, #12] + 8008f14: 6013 str r3, [r2, #0] + } + pcb->local_port = port; + 8008f16: 68fb ldr r3, [r7, #12] + 8008f18: 88fa ldrh r2, [r7, #6] + 8008f1a: 82da strh r2, [r3, #22] + TCP_REG(&tcp_bound_pcbs, pcb); + 8008f1c: 4b0b ldr r3, [pc, #44] ; (8008f4c ) + 8008f1e: 681a ldr r2, [r3, #0] + 8008f20: 68fb ldr r3, [r7, #12] + 8008f22: 60da str r2, [r3, #12] + 8008f24: 4a09 ldr r2, [pc, #36] ; (8008f4c ) + 8008f26: 68fb ldr r3, [r7, #12] + 8008f28: 6013 str r3, [r2, #0] + 8008f2a: f004 fed1 bl 800dcd0 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); + return ERR_OK; + 8008f2e: 2300 movs r3, #0 +} + 8008f30: 4618 mov r0, r3 + 8008f32: 3720 adds r7, #32 + 8008f34: 46bd mov sp, r7 + 8008f36: bd80 pop {r7, pc} + 8008f38: 08016768 .word 0x08016768 + 8008f3c: 08014d7c .word 0x08014d7c + 8008f40: 08014e48 .word 0x08014e48 + 8008f44: 08014db8 .word 0x08014db8 + 8008f48: 08016730 .word 0x08016730 + 8008f4c: 20006f6c .word 0x20006f6c + +08008f50 : + * Returns how much extra window would be advertised if we sent an + * update now. + */ +u32_t +tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) +{ + 8008f50: b580 push {r7, lr} + 8008f52: b084 sub sp, #16 + 8008f54: af00 add r7, sp, #0 + 8008f56: 6078 str r0, [r7, #4] + u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; + 8008f58: 687b ldr r3, [r7, #4] + 8008f5a: 6a5b ldr r3, [r3, #36] ; 0x24 + 8008f5c: 687a ldr r2, [r7, #4] + 8008f5e: 8d12 ldrh r2, [r2, #40] ; 0x28 + 8008f60: 4413 add r3, r2 + 8008f62: 60fb str r3, [r7, #12] + + if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { + 8008f64: 687b ldr r3, [r7, #4] + 8008f66: 6adb ldr r3, [r3, #44] ; 0x2c + 8008f68: 687a ldr r2, [r7, #4] + 8008f6a: 8e52 ldrh r2, [r2, #50] ; 0x32 + 8008f6c: f5b2 6f86 cmp.w r2, #1072 ; 0x430 + 8008f70: bf28 it cs + 8008f72: f44f 6286 movcs.w r2, #1072 ; 0x430 + 8008f76: b292 uxth r2, r2 + 8008f78: 4413 add r3, r2 + 8008f7a: 68fa ldr r2, [r7, #12] + 8008f7c: 1ad3 subs r3, r2, r3 + 8008f7e: 2b00 cmp r3, #0 + 8008f80: db08 blt.n 8008f94 + /* we can advertise more window */ + pcb->rcv_ann_wnd = pcb->rcv_wnd; + 8008f82: 687b ldr r3, [r7, #4] + 8008f84: 8d1a ldrh r2, [r3, #40] ; 0x28 + 8008f86: 687b ldr r3, [r7, #4] + 8008f88: 855a strh r2, [r3, #42] ; 0x2a + return new_right_edge - pcb->rcv_ann_right_edge; + 8008f8a: 687b ldr r3, [r7, #4] + 8008f8c: 6adb ldr r3, [r3, #44] ; 0x2c + 8008f8e: 68fa ldr r2, [r7, #12] + 8008f90: 1ad3 subs r3, r2, r3 + 8008f92: e020 b.n 8008fd6 + } else { + if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { + 8008f94: 687b ldr r3, [r7, #4] + 8008f96: 6a5a ldr r2, [r3, #36] ; 0x24 + 8008f98: 687b ldr r3, [r7, #4] + 8008f9a: 6adb ldr r3, [r3, #44] ; 0x2c + 8008f9c: 1ad3 subs r3, r2, r3 + 8008f9e: 2b00 cmp r3, #0 + 8008fa0: dd03 ble.n 8008faa + /* Can happen due to other end sending out of advertised window, + * but within actual available (but not yet advertised) window */ + pcb->rcv_ann_wnd = 0; + 8008fa2: 687b ldr r3, [r7, #4] + 8008fa4: 2200 movs r2, #0 + 8008fa6: 855a strh r2, [r3, #42] ; 0x2a + 8008fa8: e014 b.n 8008fd4 + } else { + /* keep the right edge of window constant */ + u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; + 8008faa: 687b ldr r3, [r7, #4] + 8008fac: 6ada ldr r2, [r3, #44] ; 0x2c + 8008fae: 687b ldr r3, [r7, #4] + 8008fb0: 6a5b ldr r3, [r3, #36] ; 0x24 + 8008fb2: 1ad3 subs r3, r2, r3 + 8008fb4: 60bb str r3, [r7, #8] +#if !LWIP_WND_SCALE + LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); + 8008fb6: 68bb ldr r3, [r7, #8] + 8008fb8: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8008fbc: d306 bcc.n 8008fcc + 8008fbe: 4b08 ldr r3, [pc, #32] ; (8008fe0 ) + 8008fc0: f44f 7242 mov.w r2, #776 ; 0x308 + 8008fc4: 4907 ldr r1, [pc, #28] ; (8008fe4 ) + 8008fc6: 4808 ldr r0, [pc, #32] ; (8008fe8 ) + 8008fc8: f009 fedc bl 8012d84 +#endif + pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; + 8008fcc: 68bb ldr r3, [r7, #8] + 8008fce: b29a uxth r2, r3 + 8008fd0: 687b ldr r3, [r7, #4] + 8008fd2: 855a strh r2, [r3, #42] ; 0x2a + } + return 0; + 8008fd4: 2300 movs r3, #0 + } +} + 8008fd6: 4618 mov r0, r3 + 8008fd8: 3710 adds r7, #16 + 8008fda: 46bd mov sp, r7 + 8008fdc: bd80 pop {r7, pc} + 8008fde: bf00 nop + 8008fe0: 08014d7c .word 0x08014d7c + 8008fe4: 08014e94 .word 0x08014e94 + 8008fe8: 08014db8 .word 0x08014db8 + +08008fec : + * @param pcb the tcp_pcb for which data is read + * @param len the amount of bytes that have been read by the application + */ +void +tcp_recved(struct tcp_pcb *pcb, u16_t len) +{ + 8008fec: b580 push {r7, lr} + 8008fee: b084 sub sp, #16 + 8008ff0: af00 add r7, sp, #0 + 8008ff2: 6078 str r0, [r7, #4] + 8008ff4: 460b mov r3, r1 + 8008ff6: 807b strh r3, [r7, #2] + int wnd_inflation; + + /* pcb->state LISTEN not allowed here */ + LWIP_ASSERT("don't call tcp_recved for listen-pcbs", + 8008ff8: 687b ldr r3, [r7, #4] + 8008ffa: 7d1b ldrb r3, [r3, #20] + 8008ffc: 2b01 cmp r3, #1 + 8008ffe: d106 bne.n 800900e + 8009000: 4b23 ldr r3, [pc, #140] ; (8009090 ) + 8009002: f240 321f movw r2, #799 ; 0x31f + 8009006: 4923 ldr r1, [pc, #140] ; (8009094 ) + 8009008: 4823 ldr r0, [pc, #140] ; (8009098 ) + 800900a: f009 febb bl 8012d84 + pcb->state != LISTEN); + + pcb->rcv_wnd += len; + 800900e: 687b ldr r3, [r7, #4] + 8009010: 8d1a ldrh r2, [r3, #40] ; 0x28 + 8009012: 887b ldrh r3, [r7, #2] + 8009014: 4413 add r3, r2 + 8009016: b29a uxth r2, r3 + 8009018: 687b ldr r3, [r7, #4] + 800901a: 851a strh r2, [r3, #40] ; 0x28 + if (pcb->rcv_wnd > TCP_WND_MAX(pcb)) { + 800901c: 687b ldr r3, [r7, #4] + 800901e: 8d1b ldrh r3, [r3, #40] ; 0x28 + 8009020: f5b3 6f06 cmp.w r3, #2144 ; 0x860 + 8009024: d904 bls.n 8009030 + pcb->rcv_wnd = TCP_WND_MAX(pcb); + 8009026: 687b ldr r3, [r7, #4] + 8009028: f44f 6206 mov.w r2, #2144 ; 0x860 + 800902c: 851a strh r2, [r3, #40] ; 0x28 + 800902e: e017 b.n 8009060 + } else if (pcb->rcv_wnd == 0) { + 8009030: 687b ldr r3, [r7, #4] + 8009032: 8d1b ldrh r3, [r3, #40] ; 0x28 + 8009034: 2b00 cmp r3, #0 + 8009036: d113 bne.n 8009060 + /* rcv_wnd overflowed */ + if ((pcb->state == CLOSE_WAIT) || (pcb->state == LAST_ACK)) { + 8009038: 687b ldr r3, [r7, #4] + 800903a: 7d1b ldrb r3, [r3, #20] + 800903c: 2b07 cmp r3, #7 + 800903e: d003 beq.n 8009048 + 8009040: 687b ldr r3, [r7, #4] + 8009042: 7d1b ldrb r3, [r3, #20] + 8009044: 2b09 cmp r3, #9 + 8009046: d104 bne.n 8009052 + /* In passive close, we allow this, since the FIN bit is added to rcv_wnd + by the stack itself, since it is not mandatory for an application + to call tcp_recved() for the FIN bit, but e.g. the netconn API does so. */ + pcb->rcv_wnd = TCP_WND_MAX(pcb); + 8009048: 687b ldr r3, [r7, #4] + 800904a: f44f 6206 mov.w r2, #2144 ; 0x860 + 800904e: 851a strh r2, [r3, #40] ; 0x28 + 8009050: e006 b.n 8009060 + } else { + LWIP_ASSERT("tcp_recved: len wrapped rcv_wnd\n", 0); + 8009052: 4b0f ldr r3, [pc, #60] ; (8009090 ) + 8009054: f240 322d movw r2, #813 ; 0x32d + 8009058: 4910 ldr r1, [pc, #64] ; (800909c ) + 800905a: 480f ldr r0, [pc, #60] ; (8009098 ) + 800905c: f009 fe92 bl 8012d84 + } + } + + wnd_inflation = tcp_update_rcv_ann_wnd(pcb); + 8009060: 6878 ldr r0, [r7, #4] + 8009062: f7ff ff75 bl 8008f50 + 8009066: 4603 mov r3, r0 + 8009068: 60fb str r3, [r7, #12] + + /* If the change in the right edge of window is significant (default + * watermark is TCP_WND/4), then send an explicit update now. + * Otherwise wait for a packet to be sent in the normal course of + * events (or more window to be available later) */ + if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { + 800906a: 68fb ldr r3, [r7, #12] + 800906c: f5b3 7f06 cmp.w r3, #536 ; 0x218 + 8009070: db09 blt.n 8009086 + tcp_ack_now(pcb); + 8009072: 687b ldr r3, [r7, #4] + 8009074: 7e9b ldrb r3, [r3, #26] + 8009076: f043 0302 orr.w r3, r3, #2 + 800907a: b2da uxtb r2, r3 + 800907c: 687b ldr r3, [r7, #4] + 800907e: 769a strb r2, [r3, #26] + tcp_output(pcb); + 8009080: 6878 ldr r0, [r7, #4] + 8009082: f004 f959 bl 800d338 + } + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n", + len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd))); +} + 8009086: bf00 nop + 8009088: 3710 adds r7, #16 + 800908a: 46bd mov sp, r7 + 800908c: bd80 pop {r7, pc} + 800908e: bf00 nop + 8009090: 08014d7c .word 0x08014d7c + 8009094: 08014eb0 .word 0x08014eb0 + 8009098: 08014db8 .word 0x08014db8 + 800909c: 08014ed8 .word 0x08014ed8 + +080090a0 : + * + * @return a new (free) local TCP port number + */ +static u16_t +tcp_new_port(void) +{ + 80090a0: b480 push {r7} + 80090a2: b083 sub sp, #12 + 80090a4: af00 add r7, sp, #0 + u8_t i; + u16_t n = 0; + 80090a6: 2300 movs r3, #0 + 80090a8: 80bb strh r3, [r7, #4] + struct tcp_pcb *pcb; + +again: + if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { + 80090aa: 4b1d ldr r3, [pc, #116] ; (8009120 ) + 80090ac: 881b ldrh r3, [r3, #0] + 80090ae: 1c5a adds r2, r3, #1 + 80090b0: b291 uxth r1, r2 + 80090b2: 4a1b ldr r2, [pc, #108] ; (8009120 ) + 80090b4: 8011 strh r1, [r2, #0] + 80090b6: f64f 72ff movw r2, #65535 ; 0xffff + 80090ba: 4293 cmp r3, r2 + 80090bc: d103 bne.n 80090c6 + tcp_port = TCP_LOCAL_PORT_RANGE_START; + 80090be: 4b18 ldr r3, [pc, #96] ; (8009120 ) + 80090c0: f44f 4240 mov.w r2, #49152 ; 0xc000 + 80090c4: 801a strh r2, [r3, #0] + } + /* Check all PCB lists. */ + for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { + 80090c6: 2300 movs r3, #0 + 80090c8: 71fb strb r3, [r7, #7] + 80090ca: e01e b.n 800910a + for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { + 80090cc: 79fb ldrb r3, [r7, #7] + 80090ce: 4a15 ldr r2, [pc, #84] ; (8009124 ) + 80090d0: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80090d4: 681b ldr r3, [r3, #0] + 80090d6: 603b str r3, [r7, #0] + 80090d8: e011 b.n 80090fe + if (pcb->local_port == tcp_port) { + 80090da: 683b ldr r3, [r7, #0] + 80090dc: 8ada ldrh r2, [r3, #22] + 80090de: 4b10 ldr r3, [pc, #64] ; (8009120 ) + 80090e0: 881b ldrh r3, [r3, #0] + 80090e2: 429a cmp r2, r3 + 80090e4: d108 bne.n 80090f8 + if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { + 80090e6: 88bb ldrh r3, [r7, #4] + 80090e8: 3301 adds r3, #1 + 80090ea: 80bb strh r3, [r7, #4] + 80090ec: 88bb ldrh r3, [r7, #4] + 80090ee: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 + 80090f2: d3da bcc.n 80090aa + return 0; + 80090f4: 2300 movs r3, #0 + 80090f6: e00d b.n 8009114 + for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { + 80090f8: 683b ldr r3, [r7, #0] + 80090fa: 68db ldr r3, [r3, #12] + 80090fc: 603b str r3, [r7, #0] + 80090fe: 683b ldr r3, [r7, #0] + 8009100: 2b00 cmp r3, #0 + 8009102: d1ea bne.n 80090da + for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { + 8009104: 79fb ldrb r3, [r7, #7] + 8009106: 3301 adds r3, #1 + 8009108: 71fb strb r3, [r7, #7] + 800910a: 79fb ldrb r3, [r7, #7] + 800910c: 2b03 cmp r3, #3 + 800910e: d9dd bls.n 80090cc + } + goto again; + } + } + } + return tcp_port; + 8009110: 4b03 ldr r3, [pc, #12] ; (8009120 ) + 8009112: 881b ldrh r3, [r3, #0] +} + 8009114: 4618 mov r0, r3 + 8009116: 370c adds r7, #12 + 8009118: 46bd mov sp, r7 + 800911a: bc80 pop {r7} + 800911c: 4770 bx lr + 800911e: bf00 nop + 8009120: 2000000a .word 0x2000000a + 8009124: 08016730 .word 0x08016730 + +08009128 : + * other err_t values if connect request couldn't be sent + */ +err_t +tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, + tcp_connected_fn connected) +{ + 8009128: b580 push {r7, lr} + 800912a: b08a sub sp, #40 ; 0x28 + 800912c: af00 add r7, sp, #0 + 800912e: 60f8 str r0, [r7, #12] + 8009130: 60b9 str r1, [r7, #8] + 8009132: 603b str r3, [r7, #0] + 8009134: 4613 mov r3, r2 + 8009136: 80fb strh r3, [r7, #6] + err_t ret; + u32_t iss; + u16_t old_local_port; + + if ((pcb == NULL) || (ipaddr == NULL)) { + 8009138: 68fb ldr r3, [r7, #12] + 800913a: 2b00 cmp r3, #0 + 800913c: d002 beq.n 8009144 + 800913e: 68bb ldr r3, [r7, #8] + 8009140: 2b00 cmp r3, #0 + 8009142: d102 bne.n 800914a + return ERR_VAL; + 8009144: f06f 0305 mvn.w r3, #5 + 8009148: e0d1 b.n 80092ee + } + + LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); + 800914a: 68fb ldr r3, [r7, #12] + 800914c: 7d1b ldrb r3, [r3, #20] + 800914e: 2b00 cmp r3, #0 + 8009150: d009 beq.n 8009166 + 8009152: 4b69 ldr r3, [pc, #420] ; (80092f8 ) + 8009154: f44f 725e mov.w r2, #888 ; 0x378 + 8009158: 4968 ldr r1, [pc, #416] ; (80092fc ) + 800915a: 4869 ldr r0, [pc, #420] ; (8009300 ) + 800915c: f009 fe12 bl 8012d84 + 8009160: f06f 0309 mvn.w r3, #9 + 8009164: e0c3 b.n 80092ee + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); + ip_addr_set(&pcb->remote_ip, ipaddr); + 8009166: 68bb ldr r3, [r7, #8] + 8009168: 2b00 cmp r3, #0 + 800916a: d002 beq.n 8009172 + 800916c: 68bb ldr r3, [r7, #8] + 800916e: 681b ldr r3, [r3, #0] + 8009170: e000 b.n 8009174 + 8009172: 2300 movs r3, #0 + 8009174: 68fa ldr r2, [r7, #12] + 8009176: 6053 str r3, [r2, #4] + pcb->remote_port = port; + 8009178: 68fb ldr r3, [r7, #12] + 800917a: 88fa ldrh r2, [r7, #6] + 800917c: 831a strh r2, [r3, #24] + + /* check if we have a route to the remote host */ + if (ip_addr_isany(&pcb->local_ip)) { + 800917e: 68fb ldr r3, [r7, #12] + 8009180: 2b00 cmp r3, #0 + 8009182: d003 beq.n 800918c + 8009184: 68fb ldr r3, [r7, #12] + 8009186: 681b ldr r3, [r3, #0] + 8009188: 2b00 cmp r3, #0 + 800918a: d11a bne.n 80091c2 + /* no local IP address set, yet. */ + struct netif *netif; + const ip_addr_t *local_ip; + ip_route_get_local_ip(&pcb->local_ip, &pcb->remote_ip, netif, local_ip); + 800918c: 68fb ldr r3, [r7, #12] + 800918e: 3304 adds r3, #4 + 8009190: 4618 mov r0, r3 + 8009192: f008 fa1d bl 80115d0 + 8009196: 6238 str r0, [r7, #32] + 8009198: 6a3b ldr r3, [r7, #32] + 800919a: 2b00 cmp r3, #0 + 800919c: d002 beq.n 80091a4 + 800919e: 6a3b ldr r3, [r7, #32] + 80091a0: 3304 adds r3, #4 + 80091a2: e000 b.n 80091a6 + 80091a4: 2300 movs r3, #0 + 80091a6: 61fb str r3, [r7, #28] + if ((netif == NULL) || (local_ip == NULL)) { + 80091a8: 6a3b ldr r3, [r7, #32] + 80091aa: 2b00 cmp r3, #0 + 80091ac: d002 beq.n 80091b4 + 80091ae: 69fb ldr r3, [r7, #28] + 80091b0: 2b00 cmp r3, #0 + 80091b2: d102 bne.n 80091ba + /* Don't even try to send a SYN packet if we have no route + since that will fail. */ + return ERR_RTE; + 80091b4: f06f 0303 mvn.w r3, #3 + 80091b8: e099 b.n 80092ee + } + /* Use the address as local address of the pcb. */ + ip_addr_copy(pcb->local_ip, *local_ip); + 80091ba: 69fb ldr r3, [r7, #28] + 80091bc: 681a ldr r2, [r3, #0] + 80091be: 68fb ldr r3, [r7, #12] + 80091c0: 601a str r2, [r3, #0] + } + + old_local_port = pcb->local_port; + 80091c2: 68fb ldr r3, [r7, #12] + 80091c4: 8adb ldrh r3, [r3, #22] + 80091c6: 837b strh r3, [r7, #26] + if (pcb->local_port == 0) { + 80091c8: 68fb ldr r3, [r7, #12] + 80091ca: 8adb ldrh r3, [r3, #22] + 80091cc: 2b00 cmp r3, #0 + 80091ce: d10c bne.n 80091ea + pcb->local_port = tcp_new_port(); + 80091d0: f7ff ff66 bl 80090a0 + 80091d4: 4603 mov r3, r0 + 80091d6: 461a mov r2, r3 + 80091d8: 68fb ldr r3, [r7, #12] + 80091da: 82da strh r2, [r3, #22] + if (pcb->local_port == 0) { + 80091dc: 68fb ldr r3, [r7, #12] + 80091de: 8adb ldrh r3, [r3, #22] + 80091e0: 2b00 cmp r3, #0 + 80091e2: d102 bne.n 80091ea + return ERR_BUF; + 80091e4: f06f 0301 mvn.w r3, #1 + 80091e8: e081 b.n 80092ee + } + } +#endif /* SO_REUSE */ + } + + iss = tcp_next_iss(pcb); + 80091ea: 68f8 ldr r0, [r7, #12] + 80091ec: f000 ff26 bl 800a03c + 80091f0: 6178 str r0, [r7, #20] + pcb->rcv_nxt = 0; + 80091f2: 68fb ldr r3, [r7, #12] + 80091f4: 2200 movs r2, #0 + 80091f6: 625a str r2, [r3, #36] ; 0x24 + pcb->snd_nxt = iss; + 80091f8: 68fb ldr r3, [r7, #12] + 80091fa: 697a ldr r2, [r7, #20] + 80091fc: 64da str r2, [r3, #76] ; 0x4c + pcb->lastack = iss - 1; + 80091fe: 697b ldr r3, [r7, #20] + 8009200: 1e5a subs r2, r3, #1 + 8009202: 68fb ldr r3, [r7, #12] + 8009204: 645a str r2, [r3, #68] ; 0x44 + pcb->snd_wl2 = iss - 1; + 8009206: 697b ldr r3, [r7, #20] + 8009208: 1e5a subs r2, r3, #1 + 800920a: 68fb ldr r3, [r7, #12] + 800920c: 655a str r2, [r3, #84] ; 0x54 + pcb->snd_lbb = iss - 1; + 800920e: 697b ldr r3, [r7, #20] + 8009210: 1e5a subs r2, r3, #1 + 8009212: 68fb ldr r3, [r7, #12] + 8009214: 659a str r2, [r3, #88] ; 0x58 + /* Start with a window that does not need scaling. When window scaling is + enabled and used, the window is enlarged when both sides agree on scaling. */ + pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); + 8009216: 68fb ldr r3, [r7, #12] + 8009218: f44f 6206 mov.w r2, #2144 ; 0x860 + 800921c: 855a strh r2, [r3, #42] ; 0x2a + 800921e: 68fb ldr r3, [r7, #12] + 8009220: 8d5a ldrh r2, [r3, #42] ; 0x2a + 8009222: 68fb ldr r3, [r7, #12] + 8009224: 851a strh r2, [r3, #40] ; 0x28 + pcb->rcv_ann_right_edge = pcb->rcv_nxt; + 8009226: 68fb ldr r3, [r7, #12] + 8009228: 6a5a ldr r2, [r3, #36] ; 0x24 + 800922a: 68fb ldr r3, [r7, #12] + 800922c: 62da str r2, [r3, #44] ; 0x2c + pcb->snd_wnd = TCP_WND; + 800922e: 68fb ldr r3, [r7, #12] + 8009230: f44f 6206 mov.w r2, #2144 ; 0x860 + 8009234: f8a3 205c strh.w r2, [r3, #92] ; 0x5c + /* As initial send MSS, we use TCP_MSS but limit it to 536. + The send MSS is updated when an MSS option is received. */ + pcb->mss = INITIAL_MSS; + 8009238: 68fb ldr r3, [r7, #12] + 800923a: f44f 7206 mov.w r2, #536 ; 0x218 + 800923e: 865a strh r2, [r3, #50] ; 0x32 +#if TCP_CALCULATE_EFF_SEND_MSS + pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); + 8009240: 68fb ldr r3, [r7, #12] + 8009242: 8e5a ldrh r2, [r3, #50] ; 0x32 + 8009244: 68fb ldr r3, [r7, #12] + 8009246: 3304 adds r3, #4 + 8009248: 4619 mov r1, r3 + 800924a: 4610 mov r0, r2 + 800924c: f000 ff0c bl 800a068 + 8009250: 4603 mov r3, r0 + 8009252: 461a mov r2, r3 + 8009254: 68fb ldr r3, [r7, #12] + 8009256: 865a strh r2, [r3, #50] ; 0x32 +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + pcb->cwnd = 1; + 8009258: 68fb ldr r3, [r7, #12] + 800925a: 2201 movs r2, #1 + 800925c: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 +#if LWIP_CALLBACK_API + pcb->connected = connected; + 8009260: 68fb ldr r3, [r7, #12] + 8009262: 683a ldr r2, [r7, #0] + 8009264: f8c3 2084 str.w r2, [r3, #132] ; 0x84 +#else /* LWIP_CALLBACK_API */ + LWIP_UNUSED_ARG(connected); +#endif /* LWIP_CALLBACK_API */ + + /* Send a SYN together with the MSS option. */ + ret = tcp_enqueue_flags(pcb, TCP_SYN); + 8009268: 2102 movs r1, #2 + 800926a: 68f8 ldr r0, [r7, #12] + 800926c: f003 ff0c bl 800d088 + 8009270: 4603 mov r3, r0 + 8009272: 74fb strb r3, [r7, #19] + if (ret == ERR_OK) { + 8009274: f997 3013 ldrsb.w r3, [r7, #19] + 8009278: 2b00 cmp r3, #0 + 800927a: d136 bne.n 80092ea + /* SYN segment was enqueued, changed the pcbs state now */ + pcb->state = SYN_SENT; + 800927c: 68fb ldr r3, [r7, #12] + 800927e: 2202 movs r2, #2 + 8009280: 751a strb r2, [r3, #20] + if (old_local_port != 0) { + 8009282: 8b7b ldrh r3, [r7, #26] + 8009284: 2b00 cmp r3, #0 + 8009286: d021 beq.n 80092cc + TCP_RMV(&tcp_bound_pcbs, pcb); + 8009288: 4b1e ldr r3, [pc, #120] ; (8009304 ) + 800928a: 681b ldr r3, [r3, #0] + 800928c: 68fa ldr r2, [r7, #12] + 800928e: 429a cmp r2, r3 + 8009290: d105 bne.n 800929e + 8009292: 4b1c ldr r3, [pc, #112] ; (8009304 ) + 8009294: 681b ldr r3, [r3, #0] + 8009296: 68db ldr r3, [r3, #12] + 8009298: 4a1a ldr r2, [pc, #104] ; (8009304 ) + 800929a: 6013 str r3, [r2, #0] + 800929c: e013 b.n 80092c6 + 800929e: 4b19 ldr r3, [pc, #100] ; (8009304 ) + 80092a0: 681b ldr r3, [r3, #0] + 80092a2: 627b str r3, [r7, #36] ; 0x24 + 80092a4: e00c b.n 80092c0 + 80092a6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80092a8: 68db ldr r3, [r3, #12] + 80092aa: 68fa ldr r2, [r7, #12] + 80092ac: 429a cmp r2, r3 + 80092ae: d104 bne.n 80092ba + 80092b0: 68fb ldr r3, [r7, #12] + 80092b2: 68da ldr r2, [r3, #12] + 80092b4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80092b6: 60da str r2, [r3, #12] + 80092b8: e005 b.n 80092c6 + 80092ba: 6a7b ldr r3, [r7, #36] ; 0x24 + 80092bc: 68db ldr r3, [r3, #12] + 80092be: 627b str r3, [r7, #36] ; 0x24 + 80092c0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80092c2: 2b00 cmp r3, #0 + 80092c4: d1ef bne.n 80092a6 + 80092c6: 68fb ldr r3, [r7, #12] + 80092c8: 2200 movs r2, #0 + 80092ca: 60da str r2, [r3, #12] + } + TCP_REG_ACTIVE(pcb); + 80092cc: 4b0e ldr r3, [pc, #56] ; (8009308 ) + 80092ce: 681a ldr r2, [r3, #0] + 80092d0: 68fb ldr r3, [r7, #12] + 80092d2: 60da str r2, [r3, #12] + 80092d4: 4a0c ldr r2, [pc, #48] ; (8009308 ) + 80092d6: 68fb ldr r3, [r7, #12] + 80092d8: 6013 str r3, [r2, #0] + 80092da: f004 fcf9 bl 800dcd0 + 80092de: 4b0b ldr r3, [pc, #44] ; (800930c ) + 80092e0: 2201 movs r2, #1 + 80092e2: 701a strb r2, [r3, #0] + MIB2_STATS_INC(mib2.tcpactiveopens); + + tcp_output(pcb); + 80092e4: 68f8 ldr r0, [r7, #12] + 80092e6: f004 f827 bl 800d338 + } + return ret; + 80092ea: f997 3013 ldrsb.w r3, [r7, #19] +} + 80092ee: 4618 mov r0, r3 + 80092f0: 3728 adds r7, #40 ; 0x28 + 80092f2: 46bd mov sp, r7 + 80092f4: bd80 pop {r7, pc} + 80092f6: bf00 nop + 80092f8: 08014d7c .word 0x08014d7c + 80092fc: 08014efc .word 0x08014efc + 8009300: 08014db8 .word 0x08014db8 + 8009304: 20006f6c .word 0x20006f6c + 8009308: 20006f74 .word 0x20006f74 + 800930c: 20006f7c .word 0x20006f7c + +08009310 : + * + * Automatically called from tcp_tmr(). + */ +void +tcp_slowtmr(void) +{ + 8009310: b5b0 push {r4, r5, r7, lr} + 8009312: b08c sub sp, #48 ; 0x30 + 8009314: af02 add r7, sp, #8 + tcpwnd_size_t eff_wnd; + u8_t pcb_remove; /* flag if a PCB should be removed */ + u8_t pcb_reset; /* flag if a RST should be sent when removing */ + err_t err; + + err = ERR_OK; + 8009316: 2300 movs r3, #0 + 8009318: 777b strb r3, [r7, #29] + + ++tcp_ticks; + 800931a: 4b97 ldr r3, [pc, #604] ; (8009578 ) + 800931c: 681b ldr r3, [r3, #0] + 800931e: 3301 adds r3, #1 + 8009320: 4a95 ldr r2, [pc, #596] ; (8009578 ) + 8009322: 6013 str r3, [r2, #0] + ++tcp_timer_ctr; + 8009324: 4b95 ldr r3, [pc, #596] ; (800957c ) + 8009326: 781b ldrb r3, [r3, #0] + 8009328: 3301 adds r3, #1 + 800932a: b2da uxtb r2, r3 + 800932c: 4b93 ldr r3, [pc, #588] ; (800957c ) + 800932e: 701a strb r2, [r3, #0] + +tcp_slowtmr_start: + /* Steps through all of the active PCBs. */ + prev = NULL; + 8009330: 2300 movs r3, #0 + 8009332: 623b str r3, [r7, #32] + pcb = tcp_active_pcbs; + 8009334: 4b92 ldr r3, [pc, #584] ; (8009580 ) + 8009336: 681b ldr r3, [r3, #0] + 8009338: 627b str r3, [r7, #36] ; 0x24 + if (pcb == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); + } + while (pcb != NULL) { + 800933a: e227 b.n 800978c + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); + LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); + 800933c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800933e: 7d1b ldrb r3, [r3, #20] + 8009340: 2b00 cmp r3, #0 + 8009342: d106 bne.n 8009352 + 8009344: 4b8f ldr r3, [pc, #572] ; (8009584 ) + 8009346: f44f 727c mov.w r2, #1008 ; 0x3f0 + 800934a: 498f ldr r1, [pc, #572] ; (8009588 ) + 800934c: 488f ldr r0, [pc, #572] ; (800958c ) + 800934e: f009 fd19 bl 8012d84 + LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); + 8009352: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009354: 7d1b ldrb r3, [r3, #20] + 8009356: 2b01 cmp r3, #1 + 8009358: d106 bne.n 8009368 + 800935a: 4b8a ldr r3, [pc, #552] ; (8009584 ) + 800935c: f240 32f1 movw r2, #1009 ; 0x3f1 + 8009360: 498b ldr r1, [pc, #556] ; (8009590 ) + 8009362: 488a ldr r0, [pc, #552] ; (800958c ) + 8009364: f009 fd0e bl 8012d84 + LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); + 8009368: 6a7b ldr r3, [r7, #36] ; 0x24 + 800936a: 7d1b ldrb r3, [r3, #20] + 800936c: 2b0a cmp r3, #10 + 800936e: d106 bne.n 800937e + 8009370: 4b84 ldr r3, [pc, #528] ; (8009584 ) + 8009372: f240 32f2 movw r2, #1010 ; 0x3f2 + 8009376: 4987 ldr r1, [pc, #540] ; (8009594 ) + 8009378: 4884 ldr r0, [pc, #528] ; (800958c ) + 800937a: f009 fd03 bl 8012d84 + if (pcb->last_timer == tcp_timer_ctr) { + 800937e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009380: 7f5a ldrb r2, [r3, #29] + 8009382: 4b7e ldr r3, [pc, #504] ; (800957c ) + 8009384: 781b ldrb r3, [r3, #0] + 8009386: 429a cmp r2, r3 + 8009388: d103 bne.n 8009392 + /* skip this pcb, we have already processed it */ + pcb = pcb->next; + 800938a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800938c: 68db ldr r3, [r3, #12] + 800938e: 627b str r3, [r7, #36] ; 0x24 + continue; + 8009390: e1fc b.n 800978c + } + pcb->last_timer = tcp_timer_ctr; + 8009392: 4b7a ldr r3, [pc, #488] ; (800957c ) + 8009394: 781a ldrb r2, [r3, #0] + 8009396: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009398: 775a strb r2, [r3, #29] + + pcb_remove = 0; + 800939a: 2300 movs r3, #0 + 800939c: 77fb strb r3, [r7, #31] + pcb_reset = 0; + 800939e: 2300 movs r3, #0 + 80093a0: 77bb strb r3, [r7, #30] + + if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { + 80093a2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093a4: 7d1b ldrb r3, [r3, #20] + 80093a6: 2b02 cmp r3, #2 + 80093a8: d108 bne.n 80093bc + 80093aa: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093ac: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 80093b0: 2b05 cmp r3, #5 + 80093b2: d903 bls.n 80093bc + ++pcb_remove; + 80093b4: 7ffb ldrb r3, [r7, #31] + 80093b6: 3301 adds r3, #1 + 80093b8: 77fb strb r3, [r7, #31] + 80093ba: e0a2 b.n 8009502 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); + } + else if (pcb->nrtx >= TCP_MAXRTX) { + 80093bc: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093be: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 80093c2: 2b0b cmp r3, #11 + 80093c4: d903 bls.n 80093ce + ++pcb_remove; + 80093c6: 7ffb ldrb r3, [r7, #31] + 80093c8: 3301 adds r3, #1 + 80093ca: 77fb strb r3, [r7, #31] + 80093cc: e099 b.n 8009502 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); + } else { + if (pcb->persist_backoff > 0) { + 80093ce: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093d0: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 + 80093d4: 2b00 cmp r3, #0 + 80093d6: d032 beq.n 800943e + /* If snd_wnd is zero, use persist timer to send 1 byte probes + * instead of using the standard retransmission mechanism. */ + u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff-1]; + 80093d8: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093da: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 + 80093de: 3b01 subs r3, #1 + 80093e0: 4a6d ldr r2, [pc, #436] ; (8009598 ) + 80093e2: 5cd3 ldrb r3, [r2, r3] + 80093e4: 74fb strb r3, [r7, #19] + if (pcb->persist_cnt < backoff_cnt) { + 80093e6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093e8: f893 3094 ldrb.w r3, [r3, #148] ; 0x94 + 80093ec: 7cfa ldrb r2, [r7, #19] + 80093ee: 429a cmp r2, r3 + 80093f0: d907 bls.n 8009402 + pcb->persist_cnt++; + 80093f2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093f4: f893 3094 ldrb.w r3, [r3, #148] ; 0x94 + 80093f8: 3301 adds r3, #1 + 80093fa: b2da uxtb r2, r3 + 80093fc: 6a7b ldr r3, [r7, #36] ; 0x24 + 80093fe: f883 2094 strb.w r2, [r3, #148] ; 0x94 + } + if (pcb->persist_cnt >= backoff_cnt) { + 8009402: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009404: f893 3094 ldrb.w r3, [r3, #148] ; 0x94 + 8009408: 7cfa ldrb r2, [r7, #19] + 800940a: 429a cmp r2, r3 + 800940c: d879 bhi.n 8009502 + if (tcp_zero_window_probe(pcb) == ERR_OK) { + 800940e: 6a78 ldr r0, [r7, #36] ; 0x24 + 8009410: f004 fb9d bl 800db4e + 8009414: 4603 mov r3, r0 + 8009416: 2b00 cmp r3, #0 + 8009418: d173 bne.n 8009502 + pcb->persist_cnt = 0; + 800941a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800941c: 2200 movs r2, #0 + 800941e: f883 2094 strb.w r2, [r3, #148] ; 0x94 + if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { + 8009422: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009424: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 + 8009428: 2b06 cmp r3, #6 + 800942a: d86a bhi.n 8009502 + pcb->persist_backoff++; + 800942c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800942e: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 + 8009432: 3301 adds r3, #1 + 8009434: b2da uxtb r2, r3 + 8009436: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009438: f883 2095 strb.w r2, [r3, #149] ; 0x95 + 800943c: e061 b.n 8009502 + } + } + } + } else { + /* Increase the retransmission timer if it is running */ + if (pcb->rtime >= 0) { + 800943e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009440: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 + 8009444: 2b00 cmp r3, #0 + 8009446: db08 blt.n 800945a + ++pcb->rtime; + 8009448: 6a7b ldr r3, [r7, #36] ; 0x24 + 800944a: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 + 800944e: b29b uxth r3, r3 + 8009450: 3301 adds r3, #1 + 8009452: b29b uxth r3, r3 + 8009454: b21a sxth r2, r3 + 8009456: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009458: 861a strh r2, [r3, #48] ; 0x30 + } + + if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { + 800945a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800945c: 6edb ldr r3, [r3, #108] ; 0x6c + 800945e: 2b00 cmp r3, #0 + 8009460: d04f beq.n 8009502 + 8009462: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009464: f9b3 2030 ldrsh.w r2, [r3, #48] ; 0x30 + 8009468: 6a7b ldr r3, [r7, #36] ; 0x24 + 800946a: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40 + 800946e: 429a cmp r2, r3 + 8009470: db47 blt.n 8009502 + " pcb->rto %"S16_F"\n", + pcb->rtime, pcb->rto)); + + /* Double retransmission time-out unless we are trying to + * connect to somebody (i.e., we are in SYN_SENT). */ + if (pcb->state != SYN_SENT) { + 8009472: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009474: 7d1b ldrb r3, [r3, #20] + 8009476: 2b02 cmp r3, #2 + 8009478: d018 beq.n 80094ac + u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff)-1); + 800947a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800947c: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 8009480: 2b0c cmp r3, #12 + 8009482: bf28 it cs + 8009484: 230c movcs r3, #12 + 8009486: 75fb strb r3, [r7, #23] + pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; + 8009488: 6a7b ldr r3, [r7, #36] ; 0x24 + 800948a: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c + 800948e: 10db asrs r3, r3, #3 + 8009490: b21b sxth r3, r3 + 8009492: 461a mov r2, r3 + 8009494: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009496: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e + 800949a: 4413 add r3, r2 + 800949c: 7dfa ldrb r2, [r7, #23] + 800949e: 493f ldr r1, [pc, #252] ; (800959c ) + 80094a0: 5c8a ldrb r2, [r1, r2] + 80094a2: 4093 lsls r3, r2 + 80094a4: b21a sxth r2, r3 + 80094a6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094a8: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 + } + + /* Reset the retransmission timer. */ + pcb->rtime = 0; + 80094ac: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094ae: 2200 movs r2, #0 + 80094b0: 861a strh r2, [r3, #48] ; 0x30 + + /* Reduce congestion window and ssthresh. */ + eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); + 80094b2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094b4: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c + 80094b8: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094ba: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 + 80094be: 4293 cmp r3, r2 + 80094c0: bf28 it cs + 80094c2: 4613 movcs r3, r2 + 80094c4: 82bb strh r3, [r7, #20] + pcb->ssthresh = eff_wnd >> 1; + 80094c6: 8abb ldrh r3, [r7, #20] + 80094c8: 085b lsrs r3, r3, #1 + 80094ca: b29a uxth r2, r3 + 80094cc: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094ce: f8a3 204a strh.w r2, [r3, #74] ; 0x4a + if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { + 80094d2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094d4: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a + 80094d8: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094da: 8e5b ldrh r3, [r3, #50] ; 0x32 + 80094dc: 005b lsls r3, r3, #1 + 80094de: b29b uxth r3, r3 + 80094e0: 429a cmp r2, r3 + 80094e2: d206 bcs.n 80094f2 + pcb->ssthresh = (pcb->mss << 1); + 80094e4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094e6: 8e5b ldrh r3, [r3, #50] ; 0x32 + 80094e8: 005b lsls r3, r3, #1 + 80094ea: b29a uxth r2, r3 + 80094ec: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094ee: f8a3 204a strh.w r2, [r3, #74] ; 0x4a + } + pcb->cwnd = pcb->mss; + 80094f2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094f4: 8e5a ldrh r2, [r3, #50] ; 0x32 + 80094f6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80094f8: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + + /* The following needs to be called AFTER cwnd is set to one + mss - STJ */ + tcp_rexmit_rto(pcb); + 80094fc: 6a78 ldr r0, [r7, #36] ; 0x24 + 80094fe: f004 fa15 bl 800d92c + } + } + } + /* Check if this PCB has stayed too long in FIN-WAIT-2 */ + if (pcb->state == FIN_WAIT_2) { + 8009502: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009504: 7d1b ldrb r3, [r3, #20] + 8009506: 2b06 cmp r3, #6 + 8009508: d10f bne.n 800952a + /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ + if (pcb->flags & TF_RXCLOSED) { + 800950a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800950c: 7e9b ldrb r3, [r3, #26] + 800950e: f003 0310 and.w r3, r3, #16 + 8009512: 2b00 cmp r3, #0 + 8009514: d009 beq.n 800952a + /* PCB was fully closed (either through close() or SHUT_RDWR): + normal FIN-WAIT timeout handling. */ + if ((u32_t)(tcp_ticks - pcb->tmr) > + 8009516: 4b18 ldr r3, [pc, #96] ; (8009578 ) + 8009518: 681a ldr r2, [r3, #0] + 800951a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800951c: 6a1b ldr r3, [r3, #32] + 800951e: 1ad3 subs r3, r2, r3 + 8009520: 2b28 cmp r3, #40 ; 0x28 + 8009522: d902 bls.n 800952a + TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { + ++pcb_remove; + 8009524: 7ffb ldrb r3, [r7, #31] + 8009526: 3301 adds r3, #1 + 8009528: 77fb strb r3, [r7, #31] + } + } + } + + /* Check if KEEPALIVE should be sent */ + if (ip_get_option(pcb, SOF_KEEPALIVE) && + 800952a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800952c: 7a1b ldrb r3, [r3, #8] + 800952e: f003 0308 and.w r3, r3, #8 + 8009532: 2b00 cmp r3, #0 + 8009534: d05d beq.n 80095f2 + ((pcb->state == ESTABLISHED) || + 8009536: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009538: 7d1b ldrb r3, [r3, #20] + if (ip_get_option(pcb, SOF_KEEPALIVE) && + 800953a: 2b04 cmp r3, #4 + 800953c: d003 beq.n 8009546 + (pcb->state == CLOSE_WAIT))) { + 800953e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009540: 7d1b ldrb r3, [r3, #20] + ((pcb->state == ESTABLISHED) || + 8009542: 2b07 cmp r3, #7 + 8009544: d155 bne.n 80095f2 + if ((u32_t)(tcp_ticks - pcb->tmr) > + 8009546: 4b0c ldr r3, [pc, #48] ; (8009578 ) + 8009548: 681a ldr r2, [r3, #0] + 800954a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800954c: 6a1b ldr r3, [r3, #32] + 800954e: 1ad2 subs r2, r2, r3 + (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) + 8009550: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009552: f8d3 3090 ldr.w r3, [r3, #144] ; 0x90 + 8009556: f503 2324 add.w r3, r3, #671744 ; 0xa4000 + 800955a: f603 43b8 addw r3, r3, #3256 ; 0xcb8 + 800955e: 4910 ldr r1, [pc, #64] ; (80095a0 ) + 8009560: fba1 1303 umull r1, r3, r1, r3 + 8009564: 095b lsrs r3, r3, #5 + if ((u32_t)(tcp_ticks - pcb->tmr) > + 8009566: 429a cmp r2, r3 + 8009568: d91c bls.n 80095a4 + { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to ")); + ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); + LWIP_DEBUGF(TCP_DEBUG, ("\n")); + + ++pcb_remove; + 800956a: 7ffb ldrb r3, [r7, #31] + 800956c: 3301 adds r3, #1 + 800956e: 77fb strb r3, [r7, #31] + ++pcb_reset; + 8009570: 7fbb ldrb r3, [r7, #30] + 8009572: 3301 adds r3, #1 + 8009574: 77bb strb r3, [r7, #30] + 8009576: e03c b.n 80095f2 + 8009578: 20006f68 .word 0x20006f68 + 800957c: 20006f7e .word 0x20006f7e + 8009580: 20006f74 .word 0x20006f74 + 8009584: 08014d7c .word 0x08014d7c + 8009588: 08014f2c .word 0x08014f2c + 800958c: 08014db8 .word 0x08014db8 + 8009590: 08014f58 .word 0x08014f58 + 8009594: 08014f84 .word 0x08014f84 + 8009598: 08016728 .word 0x08016728 + 800959c: 08016718 .word 0x08016718 + 80095a0: 10624dd3 .word 0x10624dd3 + } else if ((u32_t)(tcp_ticks - pcb->tmr) > + 80095a4: 4b97 ldr r3, [pc, #604] ; (8009804 ) + 80095a6: 681a ldr r2, [r3, #0] + 80095a8: 6a7b ldr r3, [r7, #36] ; 0x24 + 80095aa: 6a1b ldr r3, [r3, #32] + 80095ac: 1ad2 subs r2, r2, r3 + (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) + 80095ae: 6a7b ldr r3, [r7, #36] ; 0x24 + 80095b0: f8d3 1090 ldr.w r1, [r3, #144] ; 0x90 + 80095b4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80095b6: f893 3096 ldrb.w r3, [r3, #150] ; 0x96 + 80095ba: 4618 mov r0, r3 + 80095bc: 4b92 ldr r3, [pc, #584] ; (8009808 ) + 80095be: fb00 f303 mul.w r3, r0, r3 + 80095c2: 440b add r3, r1 + / TCP_SLOW_INTERVAL) + 80095c4: 4991 ldr r1, [pc, #580] ; (800980c ) + 80095c6: fba1 1303 umull r1, r3, r1, r3 + 80095ca: 095b lsrs r3, r3, #5 + } else if ((u32_t)(tcp_ticks - pcb->tmr) > + 80095cc: 429a cmp r2, r3 + 80095ce: d910 bls.n 80095f2 + { + err = tcp_keepalive(pcb); + 80095d0: 6a78 ldr r0, [r7, #36] ; 0x24 + 80095d2: f004 fa7f bl 800dad4 + 80095d6: 4603 mov r3, r0 + 80095d8: 777b strb r3, [r7, #29] + if (err == ERR_OK) { + 80095da: f997 301d ldrsb.w r3, [r7, #29] + 80095de: 2b00 cmp r3, #0 + 80095e0: d107 bne.n 80095f2 + pcb->keep_cnt_sent++; + 80095e2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80095e4: f893 3096 ldrb.w r3, [r3, #150] ; 0x96 + 80095e8: 3301 adds r3, #1 + 80095ea: b2da uxtb r2, r3 + 80095ec: 6a7b ldr r3, [r7, #36] ; 0x24 + 80095ee: f883 2096 strb.w r2, [r3, #150] ; 0x96 + + /* If this PCB has queued out of sequence data, but has been + inactive for too long, will drop the data (it will eventually + be retransmitted). */ +#if TCP_QUEUE_OOSEQ + if (pcb->ooseq != NULL && + 80095f2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80095f4: 6f1b ldr r3, [r3, #112] ; 0x70 + 80095f6: 2b00 cmp r3, #0 + 80095f8: d016 beq.n 8009628 + (u32_t)tcp_ticks - pcb->tmr >= pcb->rto * TCP_OOSEQ_TIMEOUT) { + 80095fa: 4b82 ldr r3, [pc, #520] ; (8009804 ) + 80095fc: 681a ldr r2, [r3, #0] + 80095fe: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009600: 6a1b ldr r3, [r3, #32] + 8009602: 1ad2 subs r2, r2, r3 + 8009604: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009606: f9b3 3040 ldrsh.w r3, [r3, #64] ; 0x40 + 800960a: 4619 mov r1, r3 + 800960c: 460b mov r3, r1 + 800960e: 005b lsls r3, r3, #1 + 8009610: 440b add r3, r1 + 8009612: 005b lsls r3, r3, #1 + if (pcb->ooseq != NULL && + 8009614: 429a cmp r2, r3 + 8009616: d307 bcc.n 8009628 + tcp_segs_free(pcb->ooseq); + 8009618: 6a7b ldr r3, [r7, #36] ; 0x24 + 800961a: 6f1b ldr r3, [r3, #112] ; 0x70 + 800961c: 4618 mov r0, r3 + 800961e: f000 fa06 bl 8009a2e + pcb->ooseq = NULL; + 8009622: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009624: 2200 movs r2, #0 + 8009626: 671a str r2, [r3, #112] ; 0x70 + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); + } +#endif /* TCP_QUEUE_OOSEQ */ + + /* Check if this PCB has stayed too long in SYN-RCVD */ + if (pcb->state == SYN_RCVD) { + 8009628: 6a7b ldr r3, [r7, #36] ; 0x24 + 800962a: 7d1b ldrb r3, [r3, #20] + 800962c: 2b03 cmp r3, #3 + 800962e: d109 bne.n 8009644 + if ((u32_t)(tcp_ticks - pcb->tmr) > + 8009630: 4b74 ldr r3, [pc, #464] ; (8009804 ) + 8009632: 681a ldr r2, [r3, #0] + 8009634: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009636: 6a1b ldr r3, [r3, #32] + 8009638: 1ad3 subs r3, r2, r3 + 800963a: 2b28 cmp r3, #40 ; 0x28 + 800963c: d902 bls.n 8009644 + TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { + ++pcb_remove; + 800963e: 7ffb ldrb r3, [r7, #31] + 8009640: 3301 adds r3, #1 + 8009642: 77fb strb r3, [r7, #31] + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n")); + } + } + + /* Check if this PCB has stayed too long in LAST-ACK */ + if (pcb->state == LAST_ACK) { + 8009644: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009646: 7d1b ldrb r3, [r3, #20] + 8009648: 2b09 cmp r3, #9 + 800964a: d109 bne.n 8009660 + if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { + 800964c: 4b6d ldr r3, [pc, #436] ; (8009804 ) + 800964e: 681a ldr r2, [r3, #0] + 8009650: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009652: 6a1b ldr r3, [r3, #32] + 8009654: 1ad3 subs r3, r2, r3 + 8009656: 2bf0 cmp r3, #240 ; 0xf0 + 8009658: d902 bls.n 8009660 + ++pcb_remove; + 800965a: 7ffb ldrb r3, [r7, #31] + 800965c: 3301 adds r3, #1 + 800965e: 77fb strb r3, [r7, #31] + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); + } + } + + /* If the PCB should be removed, do it. */ + if (pcb_remove) { + 8009660: 7ffb ldrb r3, [r7, #31] + 8009662: 2b00 cmp r3, #0 + 8009664: d05d beq.n 8009722 + struct tcp_pcb *pcb2; +#if LWIP_CALLBACK_API + tcp_err_fn err_fn = pcb->errf; + 8009666: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009668: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c + 800966c: 60fb str r3, [r7, #12] +#endif /* LWIP_CALLBACK_API */ + void *err_arg; + enum tcp_state last_state; + tcp_pcb_purge(pcb); + 800966e: 6a78 ldr r0, [r7, #36] ; 0x24 + 8009670: f000 fc26 bl 8009ec0 + /* Remove PCB from tcp_active_pcbs list. */ + if (prev != NULL) { + 8009674: 6a3b ldr r3, [r7, #32] + 8009676: 2b00 cmp r3, #0 + 8009678: d010 beq.n 800969c + LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); + 800967a: 4b65 ldr r3, [pc, #404] ; (8009810 ) + 800967c: 681b ldr r3, [r3, #0] + 800967e: 6a7a ldr r2, [r7, #36] ; 0x24 + 8009680: 429a cmp r2, r3 + 8009682: d106 bne.n 8009692 + 8009684: 4b63 ldr r3, [pc, #396] ; (8009814 ) + 8009686: f240 4289 movw r2, #1161 ; 0x489 + 800968a: 4963 ldr r1, [pc, #396] ; (8009818 ) + 800968c: 4863 ldr r0, [pc, #396] ; (800981c ) + 800968e: f009 fb79 bl 8012d84 + prev->next = pcb->next; + 8009692: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009694: 68da ldr r2, [r3, #12] + 8009696: 6a3b ldr r3, [r7, #32] + 8009698: 60da str r2, [r3, #12] + 800969a: e00f b.n 80096bc + } else { + /* This PCB was the first. */ + LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); + 800969c: 4b5c ldr r3, [pc, #368] ; (8009810 ) + 800969e: 681b ldr r3, [r3, #0] + 80096a0: 6a7a ldr r2, [r7, #36] ; 0x24 + 80096a2: 429a cmp r2, r3 + 80096a4: d006 beq.n 80096b4 + 80096a6: 4b5b ldr r3, [pc, #364] ; (8009814 ) + 80096a8: f240 428d movw r2, #1165 ; 0x48d + 80096ac: 495c ldr r1, [pc, #368] ; (8009820 ) + 80096ae: 485b ldr r0, [pc, #364] ; (800981c ) + 80096b0: f009 fb68 bl 8012d84 + tcp_active_pcbs = pcb->next; + 80096b4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096b6: 68db ldr r3, [r3, #12] + 80096b8: 4a55 ldr r2, [pc, #340] ; (8009810 ) + 80096ba: 6013 str r3, [r2, #0] + } + + if (pcb_reset) { + 80096bc: 7fbb ldrb r3, [r7, #30] + 80096be: 2b00 cmp r3, #0 + 80096c0: d010 beq.n 80096e4 + tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, + 80096c2: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096c4: 6cd8 ldr r0, [r3, #76] ; 0x4c + 80096c6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096c8: 6a59 ldr r1, [r3, #36] ; 0x24 + 80096ca: 6a7c ldr r4, [r7, #36] ; 0x24 + 80096cc: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096ce: 1d1d adds r5, r3, #4 + 80096d0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096d2: 8adb ldrh r3, [r3, #22] + 80096d4: 6a7a ldr r2, [r7, #36] ; 0x24 + 80096d6: 8b12 ldrh r2, [r2, #24] + 80096d8: 9201 str r2, [sp, #4] + 80096da: 9300 str r3, [sp, #0] + 80096dc: 462b mov r3, r5 + 80096de: 4622 mov r2, r4 + 80096e0: f004 f8ae bl 800d840 + pcb->local_port, pcb->remote_port); + } + + err_arg = pcb->callback_arg; + 80096e4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096e6: 691b ldr r3, [r3, #16] + 80096e8: 60bb str r3, [r7, #8] + last_state = pcb->state; + 80096ea: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096ec: 7d1b ldrb r3, [r3, #20] + 80096ee: 71fb strb r3, [r7, #7] + pcb2 = pcb; + 80096f0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096f2: 603b str r3, [r7, #0] + pcb = pcb->next; + 80096f4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80096f6: 68db ldr r3, [r3, #12] + 80096f8: 627b str r3, [r7, #36] ; 0x24 + memp_free(MEMP_TCP_PCB, pcb2); + 80096fa: 6839 ldr r1, [r7, #0] + 80096fc: 2001 movs r0, #1 + 80096fe: f7fe f8dd bl 80078bc + + tcp_active_pcbs_changed = 0; + 8009702: 4b48 ldr r3, [pc, #288] ; (8009824 ) + 8009704: 2200 movs r2, #0 + 8009706: 701a strb r2, [r3, #0] + TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); + 8009708: 68fb ldr r3, [r7, #12] + 800970a: 2b00 cmp r3, #0 + 800970c: d004 beq.n 8009718 + 800970e: 68fb ldr r3, [r7, #12] + 8009710: f06f 010c mvn.w r1, #12 + 8009714: 68b8 ldr r0, [r7, #8] + 8009716: 4798 blx r3 + if (tcp_active_pcbs_changed) { + 8009718: 4b42 ldr r3, [pc, #264] ; (8009824 ) + 800971a: 781b ldrb r3, [r3, #0] + 800971c: 2b00 cmp r3, #0 + 800971e: d035 beq.n 800978c + goto tcp_slowtmr_start; + 8009720: e606 b.n 8009330 + } + } else { + /* get the 'next' element now and work with 'prev' below (in case of abort) */ + prev = pcb; + 8009722: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009724: 623b str r3, [r7, #32] + pcb = pcb->next; + 8009726: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009728: 68db ldr r3, [r3, #12] + 800972a: 627b str r3, [r7, #36] ; 0x24 + + /* We check if we should poll the connection. */ + ++prev->polltmr; + 800972c: 6a3b ldr r3, [r7, #32] + 800972e: 7edb ldrb r3, [r3, #27] + 8009730: 3301 adds r3, #1 + 8009732: b2da uxtb r2, r3 + 8009734: 6a3b ldr r3, [r7, #32] + 8009736: 76da strb r2, [r3, #27] + if (prev->polltmr >= prev->pollinterval) { + 8009738: 6a3b ldr r3, [r7, #32] + 800973a: 7eda ldrb r2, [r3, #27] + 800973c: 6a3b ldr r3, [r7, #32] + 800973e: 7f1b ldrb r3, [r3, #28] + 8009740: 429a cmp r2, r3 + 8009742: d323 bcc.n 800978c + prev->polltmr = 0; + 8009744: 6a3b ldr r3, [r7, #32] + 8009746: 2200 movs r2, #0 + 8009748: 76da strb r2, [r3, #27] + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); + tcp_active_pcbs_changed = 0; + 800974a: 4b36 ldr r3, [pc, #216] ; (8009824 ) + 800974c: 2200 movs r2, #0 + 800974e: 701a strb r2, [r3, #0] + TCP_EVENT_POLL(prev, err); + 8009750: 6a3b ldr r3, [r7, #32] + 8009752: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 + 8009756: 2b00 cmp r3, #0 + 8009758: d00a beq.n 8009770 + 800975a: 6a3b ldr r3, [r7, #32] + 800975c: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 + 8009760: 6a3a ldr r2, [r7, #32] + 8009762: 6912 ldr r2, [r2, #16] + 8009764: 6a39 ldr r1, [r7, #32] + 8009766: 4610 mov r0, r2 + 8009768: 4798 blx r3 + 800976a: 4603 mov r3, r0 + 800976c: 777b strb r3, [r7, #29] + 800976e: e001 b.n 8009774 + 8009770: 2300 movs r3, #0 + 8009772: 777b strb r3, [r7, #29] + if (tcp_active_pcbs_changed) { + 8009774: 4b2b ldr r3, [pc, #172] ; (8009824 ) + 8009776: 781b ldrb r3, [r3, #0] + 8009778: 2b00 cmp r3, #0 + 800977a: d000 beq.n 800977e + goto tcp_slowtmr_start; + 800977c: e5d8 b.n 8009330 + } + /* if err == ERR_ABRT, 'prev' is already deallocated */ + if (err == ERR_OK) { + 800977e: f997 301d ldrsb.w r3, [r7, #29] + 8009782: 2b00 cmp r3, #0 + 8009784: d102 bne.n 800978c + tcp_output(prev); + 8009786: 6a38 ldr r0, [r7, #32] + 8009788: f003 fdd6 bl 800d338 + while (pcb != NULL) { + 800978c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800978e: 2b00 cmp r3, #0 + 8009790: f47f add4 bne.w 800933c + } + } + + + /* Steps through all of the TIME-WAIT PCBs. */ + prev = NULL; + 8009794: 2300 movs r3, #0 + 8009796: 623b str r3, [r7, #32] + pcb = tcp_tw_pcbs; + 8009798: 4b23 ldr r3, [pc, #140] ; (8009828 ) + 800979a: 681b ldr r3, [r3, #0] + 800979c: 627b str r3, [r7, #36] ; 0x24 + while (pcb != NULL) { + 800979e: e068 b.n 8009872 + LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); + 80097a0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80097a2: 7d1b ldrb r3, [r3, #20] + 80097a4: 2b0a cmp r3, #10 + 80097a6: d006 beq.n 80097b6 + 80097a8: 4b1a ldr r3, [pc, #104] ; (8009814 ) + 80097aa: f240 42bd movw r2, #1213 ; 0x4bd + 80097ae: 491f ldr r1, [pc, #124] ; (800982c ) + 80097b0: 481a ldr r0, [pc, #104] ; (800981c ) + 80097b2: f009 fae7 bl 8012d84 + pcb_remove = 0; + 80097b6: 2300 movs r3, #0 + 80097b8: 77fb strb r3, [r7, #31] + + /* Check if this PCB has stayed long enough in TIME-WAIT */ + if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { + 80097ba: 4b12 ldr r3, [pc, #72] ; (8009804 ) + 80097bc: 681a ldr r2, [r3, #0] + 80097be: 6a7b ldr r3, [r7, #36] ; 0x24 + 80097c0: 6a1b ldr r3, [r3, #32] + 80097c2: 1ad3 subs r3, r2, r3 + 80097c4: 2bf0 cmp r3, #240 ; 0xf0 + 80097c6: d902 bls.n 80097ce + ++pcb_remove; + 80097c8: 7ffb ldrb r3, [r7, #31] + 80097ca: 3301 adds r3, #1 + 80097cc: 77fb strb r3, [r7, #31] + } + + /* If the PCB should be removed, do it. */ + if (pcb_remove) { + 80097ce: 7ffb ldrb r3, [r7, #31] + 80097d0: 2b00 cmp r3, #0 + 80097d2: d049 beq.n 8009868 + struct tcp_pcb *pcb2; + tcp_pcb_purge(pcb); + 80097d4: 6a78 ldr r0, [r7, #36] ; 0x24 + 80097d6: f000 fb73 bl 8009ec0 + /* Remove PCB from tcp_tw_pcbs list. */ + if (prev != NULL) { + 80097da: 6a3b ldr r3, [r7, #32] + 80097dc: 2b00 cmp r3, #0 + 80097de: d029 beq.n 8009834 + LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); + 80097e0: 4b11 ldr r3, [pc, #68] ; (8009828 ) + 80097e2: 681b ldr r3, [r3, #0] + 80097e4: 6a7a ldr r2, [r7, #36] ; 0x24 + 80097e6: 429a cmp r2, r3 + 80097e8: d106 bne.n 80097f8 + 80097ea: 4b0a ldr r3, [pc, #40] ; (8009814 ) + 80097ec: f240 42cb movw r2, #1227 ; 0x4cb + 80097f0: 490f ldr r1, [pc, #60] ; (8009830 ) + 80097f2: 480a ldr r0, [pc, #40] ; (800981c ) + 80097f4: f009 fac6 bl 8012d84 + prev->next = pcb->next; + 80097f8: 6a7b ldr r3, [r7, #36] ; 0x24 + 80097fa: 68da ldr r2, [r3, #12] + 80097fc: 6a3b ldr r3, [r7, #32] + 80097fe: 60da str r2, [r3, #12] + 8009800: e028 b.n 8009854 + 8009802: bf00 nop + 8009804: 20006f68 .word 0x20006f68 + 8009808: 000124f8 .word 0x000124f8 + 800980c: 10624dd3 .word 0x10624dd3 + 8009810: 20006f74 .word 0x20006f74 + 8009814: 08014d7c .word 0x08014d7c + 8009818: 08014fb4 .word 0x08014fb4 + 800981c: 08014db8 .word 0x08014db8 + 8009820: 08014fe0 .word 0x08014fe0 + 8009824: 20006f7c .word 0x20006f7c + 8009828: 20006f78 .word 0x20006f78 + 800982c: 0801500c .word 0x0801500c + 8009830: 0801503c .word 0x0801503c + } else { + /* This PCB was the first. */ + LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); + 8009834: 4b13 ldr r3, [pc, #76] ; (8009884 ) + 8009836: 681b ldr r3, [r3, #0] + 8009838: 6a7a ldr r2, [r7, #36] ; 0x24 + 800983a: 429a cmp r2, r3 + 800983c: d006 beq.n 800984c + 800983e: 4b12 ldr r3, [pc, #72] ; (8009888 ) + 8009840: f240 42cf movw r2, #1231 ; 0x4cf + 8009844: 4911 ldr r1, [pc, #68] ; (800988c ) + 8009846: 4812 ldr r0, [pc, #72] ; (8009890 ) + 8009848: f009 fa9c bl 8012d84 + tcp_tw_pcbs = pcb->next; + 800984c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800984e: 68db ldr r3, [r3, #12] + 8009850: 4a0c ldr r2, [pc, #48] ; (8009884 ) + 8009852: 6013 str r3, [r2, #0] + } + pcb2 = pcb; + 8009854: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009856: 61bb str r3, [r7, #24] + pcb = pcb->next; + 8009858: 6a7b ldr r3, [r7, #36] ; 0x24 + 800985a: 68db ldr r3, [r3, #12] + 800985c: 627b str r3, [r7, #36] ; 0x24 + memp_free(MEMP_TCP_PCB, pcb2); + 800985e: 69b9 ldr r1, [r7, #24] + 8009860: 2001 movs r0, #1 + 8009862: f7fe f82b bl 80078bc + 8009866: e004 b.n 8009872 + } else { + prev = pcb; + 8009868: 6a7b ldr r3, [r7, #36] ; 0x24 + 800986a: 623b str r3, [r7, #32] + pcb = pcb->next; + 800986c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800986e: 68db ldr r3, [r3, #12] + 8009870: 627b str r3, [r7, #36] ; 0x24 + while (pcb != NULL) { + 8009872: 6a7b ldr r3, [r7, #36] ; 0x24 + 8009874: 2b00 cmp r3, #0 + 8009876: d193 bne.n 80097a0 + } + } +} + 8009878: bf00 nop + 800987a: bf00 nop + 800987c: 3728 adds r7, #40 ; 0x28 + 800987e: 46bd mov sp, r7 + 8009880: bdb0 pop {r4, r5, r7, pc} + 8009882: bf00 nop + 8009884: 20006f78 .word 0x20006f78 + 8009888: 08014d7c .word 0x08014d7c + 800988c: 08015064 .word 0x08015064 + 8009890: 08014db8 .word 0x08014db8 + +08009894 : + * + * Automatically called from tcp_tmr(). + */ +void +tcp_fasttmr(void) +{ + 8009894: b580 push {r7, lr} + 8009896: b082 sub sp, #8 + 8009898: af00 add r7, sp, #0 + struct tcp_pcb *pcb; + + ++tcp_timer_ctr; + 800989a: 4b2d ldr r3, [pc, #180] ; (8009950 ) + 800989c: 781b ldrb r3, [r3, #0] + 800989e: 3301 adds r3, #1 + 80098a0: b2da uxtb r2, r3 + 80098a2: 4b2b ldr r3, [pc, #172] ; (8009950 ) + 80098a4: 701a strb r2, [r3, #0] + +tcp_fasttmr_start: + pcb = tcp_active_pcbs; + 80098a6: 4b2b ldr r3, [pc, #172] ; (8009954 ) + 80098a8: 681b ldr r3, [r3, #0] + 80098aa: 607b str r3, [r7, #4] + + while (pcb != NULL) { + 80098ac: e048 b.n 8009940 + if (pcb->last_timer != tcp_timer_ctr) { + 80098ae: 687b ldr r3, [r7, #4] + 80098b0: 7f5a ldrb r2, [r3, #29] + 80098b2: 4b27 ldr r3, [pc, #156] ; (8009950 ) + 80098b4: 781b ldrb r3, [r3, #0] + 80098b6: 429a cmp r2, r3 + 80098b8: d03f beq.n 800993a + struct tcp_pcb *next; + pcb->last_timer = tcp_timer_ctr; + 80098ba: 4b25 ldr r3, [pc, #148] ; (8009950 ) + 80098bc: 781a ldrb r2, [r3, #0] + 80098be: 687b ldr r3, [r7, #4] + 80098c0: 775a strb r2, [r3, #29] + /* send delayed ACKs */ + if (pcb->flags & TF_ACK_DELAY) { + 80098c2: 687b ldr r3, [r7, #4] + 80098c4: 7e9b ldrb r3, [r3, #26] + 80098c6: f003 0301 and.w r3, r3, #1 + 80098ca: 2b00 cmp r3, #0 + 80098cc: d010 beq.n 80098f0 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); + tcp_ack_now(pcb); + 80098ce: 687b ldr r3, [r7, #4] + 80098d0: 7e9b ldrb r3, [r3, #26] + 80098d2: f043 0302 orr.w r3, r3, #2 + 80098d6: b2da uxtb r2, r3 + 80098d8: 687b ldr r3, [r7, #4] + 80098da: 769a strb r2, [r3, #26] + tcp_output(pcb); + 80098dc: 6878 ldr r0, [r7, #4] + 80098de: f003 fd2b bl 800d338 + pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + 80098e2: 687b ldr r3, [r7, #4] + 80098e4: 7e9b ldrb r3, [r3, #26] + 80098e6: f023 0303 bic.w r3, r3, #3 + 80098ea: b2da uxtb r2, r3 + 80098ec: 687b ldr r3, [r7, #4] + 80098ee: 769a strb r2, [r3, #26] + } + /* send pending FIN */ + if (pcb->flags & TF_CLOSEPEND) { + 80098f0: 687b ldr r3, [r7, #4] + 80098f2: 7e9b ldrb r3, [r3, #26] + 80098f4: f003 0308 and.w r3, r3, #8 + 80098f8: 2b00 cmp r3, #0 + 80098fa: d009 beq.n 8009910 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); + pcb->flags &= ~(TF_CLOSEPEND); + 80098fc: 687b ldr r3, [r7, #4] + 80098fe: 7e9b ldrb r3, [r3, #26] + 8009900: f023 0308 bic.w r3, r3, #8 + 8009904: b2da uxtb r2, r3 + 8009906: 687b ldr r3, [r7, #4] + 8009908: 769a strb r2, [r3, #26] + tcp_close_shutdown_fin(pcb); + 800990a: 6878 ldr r0, [r7, #4] + 800990c: f7ff f94e bl 8008bac + } + + next = pcb->next; + 8009910: 687b ldr r3, [r7, #4] + 8009912: 68db ldr r3, [r3, #12] + 8009914: 603b str r3, [r7, #0] + + /* If there is data which was previously "refused" by upper layer */ + if (pcb->refused_data != NULL) { + 8009916: 687b ldr r3, [r7, #4] + 8009918: 6f5b ldr r3, [r3, #116] ; 0x74 + 800991a: 2b00 cmp r3, #0 + 800991c: d00a beq.n 8009934 + tcp_active_pcbs_changed = 0; + 800991e: 4b0e ldr r3, [pc, #56] ; (8009958 ) + 8009920: 2200 movs r2, #0 + 8009922: 701a strb r2, [r3, #0] + tcp_process_refused_data(pcb); + 8009924: 6878 ldr r0, [r7, #4] + 8009926: f000 f819 bl 800995c + if (tcp_active_pcbs_changed) { + 800992a: 4b0b ldr r3, [pc, #44] ; (8009958 ) + 800992c: 781b ldrb r3, [r3, #0] + 800992e: 2b00 cmp r3, #0 + 8009930: d000 beq.n 8009934 + /* application callback has changed the pcb list: restart the loop */ + goto tcp_fasttmr_start; + 8009932: e7b8 b.n 80098a6 + } + } + pcb = next; + 8009934: 683b ldr r3, [r7, #0] + 8009936: 607b str r3, [r7, #4] + 8009938: e002 b.n 8009940 + } else { + pcb = pcb->next; + 800993a: 687b ldr r3, [r7, #4] + 800993c: 68db ldr r3, [r3, #12] + 800993e: 607b str r3, [r7, #4] + while (pcb != NULL) { + 8009940: 687b ldr r3, [r7, #4] + 8009942: 2b00 cmp r3, #0 + 8009944: d1b3 bne.n 80098ae + } + } +} + 8009946: bf00 nop + 8009948: bf00 nop + 800994a: 3708 adds r7, #8 + 800994c: 46bd mov sp, r7 + 800994e: bd80 pop {r7, pc} + 8009950: 20006f7e .word 0x20006f7e + 8009954: 20006f74 .word 0x20006f74 + 8009958: 20006f7c .word 0x20006f7c + +0800995c : +} + +/** Pass pcb->refused_data to the recv callback */ +err_t +tcp_process_refused_data(struct tcp_pcb *pcb) +{ + 800995c: b590 push {r4, r7, lr} + 800995e: b085 sub sp, #20 + 8009960: af00 add r7, sp, #0 + 8009962: 6078 str r0, [r7, #4] + struct pbuf *rest; + while (pcb->refused_data != NULL) +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + { + err_t err; + u8_t refused_flags = pcb->refused_data->flags; + 8009964: 687b ldr r3, [r7, #4] + 8009966: 6f5b ldr r3, [r3, #116] ; 0x74 + 8009968: 7b5b ldrb r3, [r3, #13] + 800996a: 73bb strb r3, [r7, #14] + /* set pcb->refused_data to NULL in case the callback frees it and then + closes the pcb */ + struct pbuf *refused_data = pcb->refused_data; + 800996c: 687b ldr r3, [r7, #4] + 800996e: 6f5b ldr r3, [r3, #116] ; 0x74 + 8009970: 60bb str r3, [r7, #8] +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + pbuf_split_64k(refused_data, &rest); + pcb->refused_data = rest; +#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + pcb->refused_data = NULL; + 8009972: 687b ldr r3, [r7, #4] + 8009974: 2200 movs r2, #0 + 8009976: 675a str r2, [r3, #116] ; 0x74 +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + /* Notify again application with data previously received. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); + TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); + 8009978: 687b ldr r3, [r7, #4] + 800997a: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 + 800997e: 2b00 cmp r3, #0 + 8009980: d00b beq.n 800999a + 8009982: 687b ldr r3, [r7, #4] + 8009984: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 + 8009988: 687b ldr r3, [r7, #4] + 800998a: 6918 ldr r0, [r3, #16] + 800998c: 2300 movs r3, #0 + 800998e: 68ba ldr r2, [r7, #8] + 8009990: 6879 ldr r1, [r7, #4] + 8009992: 47a0 blx r4 + 8009994: 4603 mov r3, r0 + 8009996: 73fb strb r3, [r7, #15] + 8009998: e007 b.n 80099aa + 800999a: 2300 movs r3, #0 + 800999c: 68ba ldr r2, [r7, #8] + 800999e: 6879 ldr r1, [r7, #4] + 80099a0: 2000 movs r0, #0 + 80099a2: f000 f88d bl 8009ac0 + 80099a6: 4603 mov r3, r0 + 80099a8: 73fb strb r3, [r7, #15] + if (err == ERR_OK) { + 80099aa: f997 300f ldrsb.w r3, [r7, #15] + 80099ae: 2b00 cmp r3, #0 + 80099b0: d12a bne.n 8009a08 + /* did refused_data include a FIN? */ + if (refused_flags & PBUF_FLAG_TCP_FIN + 80099b2: 7bbb ldrb r3, [r7, #14] + 80099b4: f003 0320 and.w r3, r3, #32 + 80099b8: 2b00 cmp r3, #0 + 80099ba: d033 beq.n 8009a24 + && (rest == NULL) +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + ) { + /* correct rcv_wnd as the application won't call tcp_recved() + for the FIN's seqno */ + if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { + 80099bc: 687b ldr r3, [r7, #4] + 80099be: 8d1b ldrh r3, [r3, #40] ; 0x28 + 80099c0: f5b3 6f06 cmp.w r3, #2144 ; 0x860 + 80099c4: d005 beq.n 80099d2 + pcb->rcv_wnd++; + 80099c6: 687b ldr r3, [r7, #4] + 80099c8: 8d1b ldrh r3, [r3, #40] ; 0x28 + 80099ca: 3301 adds r3, #1 + 80099cc: b29a uxth r2, r3 + 80099ce: 687b ldr r3, [r7, #4] + 80099d0: 851a strh r2, [r3, #40] ; 0x28 + } + TCP_EVENT_CLOSED(pcb, err); + 80099d2: 687b ldr r3, [r7, #4] + 80099d4: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 + 80099d8: 2b00 cmp r3, #0 + 80099da: d00b beq.n 80099f4 + 80099dc: 687b ldr r3, [r7, #4] + 80099de: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 + 80099e2: 687b ldr r3, [r7, #4] + 80099e4: 6918 ldr r0, [r3, #16] + 80099e6: 2300 movs r3, #0 + 80099e8: 2200 movs r2, #0 + 80099ea: 6879 ldr r1, [r7, #4] + 80099ec: 47a0 blx r4 + 80099ee: 4603 mov r3, r0 + 80099f0: 73fb strb r3, [r7, #15] + 80099f2: e001 b.n 80099f8 + 80099f4: 2300 movs r3, #0 + 80099f6: 73fb strb r3, [r7, #15] + if (err == ERR_ABRT) { + 80099f8: f997 300f ldrsb.w r3, [r7, #15] + 80099fc: f113 0f0d cmn.w r3, #13 + 8009a00: d110 bne.n 8009a24 + return ERR_ABRT; + 8009a02: f06f 030c mvn.w r3, #12 + 8009a06: e00e b.n 8009a26 + } + } + } else if (err == ERR_ABRT) { + 8009a08: f997 300f ldrsb.w r3, [r7, #15] + 8009a0c: f113 0f0d cmn.w r3, #13 + 8009a10: d102 bne.n 8009a18 + /* if err == ERR_ABRT, 'pcb' is already deallocated */ + /* Drop incoming packets because pcb is "full" (only if the incoming + segment contains data). */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n")); + return ERR_ABRT; + 8009a12: f06f 030c mvn.w r3, #12 + 8009a16: e006 b.n 8009a26 +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + if (rest != NULL) { + pbuf_cat(refused_data, rest); + } +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + pcb->refused_data = refused_data; + 8009a18: 687b ldr r3, [r7, #4] + 8009a1a: 68ba ldr r2, [r7, #8] + 8009a1c: 675a str r2, [r3, #116] ; 0x74 + return ERR_INPROGRESS; + 8009a1e: f06f 0304 mvn.w r3, #4 + 8009a22: e000 b.n 8009a26 + } + } + return ERR_OK; + 8009a24: 2300 movs r3, #0 +} + 8009a26: 4618 mov r0, r3 + 8009a28: 3714 adds r7, #20 + 8009a2a: 46bd mov sp, r7 + 8009a2c: bd90 pop {r4, r7, pc} + +08009a2e : + * + * @param seg tcp_seg list of TCP segments to free + */ +void +tcp_segs_free(struct tcp_seg *seg) +{ + 8009a2e: b580 push {r7, lr} + 8009a30: b084 sub sp, #16 + 8009a32: af00 add r7, sp, #0 + 8009a34: 6078 str r0, [r7, #4] + while (seg != NULL) { + 8009a36: e007 b.n 8009a48 + struct tcp_seg *next = seg->next; + 8009a38: 687b ldr r3, [r7, #4] + 8009a3a: 681b ldr r3, [r3, #0] + 8009a3c: 60fb str r3, [r7, #12] + tcp_seg_free(seg); + 8009a3e: 6878 ldr r0, [r7, #4] + 8009a40: f000 f80a bl 8009a58 + seg = next; + 8009a44: 68fb ldr r3, [r7, #12] + 8009a46: 607b str r3, [r7, #4] + while (seg != NULL) { + 8009a48: 687b ldr r3, [r7, #4] + 8009a4a: 2b00 cmp r3, #0 + 8009a4c: d1f4 bne.n 8009a38 + } +} + 8009a4e: bf00 nop + 8009a50: bf00 nop + 8009a52: 3710 adds r7, #16 + 8009a54: 46bd mov sp, r7 + 8009a56: bd80 pop {r7, pc} + +08009a58 : + * + * @param seg single tcp_seg to free + */ +void +tcp_seg_free(struct tcp_seg *seg) +{ + 8009a58: b580 push {r7, lr} + 8009a5a: b082 sub sp, #8 + 8009a5c: af00 add r7, sp, #0 + 8009a5e: 6078 str r0, [r7, #4] + if (seg != NULL) { + 8009a60: 687b ldr r3, [r7, #4] + 8009a62: 2b00 cmp r3, #0 + 8009a64: d00c beq.n 8009a80 + if (seg->p != NULL) { + 8009a66: 687b ldr r3, [r7, #4] + 8009a68: 685b ldr r3, [r3, #4] + 8009a6a: 2b00 cmp r3, #0 + 8009a6c: d004 beq.n 8009a78 + pbuf_free(seg->p); + 8009a6e: 687b ldr r3, [r7, #4] + 8009a70: 685b ldr r3, [r3, #4] + 8009a72: 4618 mov r0, r3 + 8009a74: f7fe fc66 bl 8008344 +#if TCP_DEBUG + seg->p = NULL; +#endif /* TCP_DEBUG */ + } + memp_free(MEMP_TCP_SEG, seg); + 8009a78: 6879 ldr r1, [r7, #4] + 8009a7a: 2003 movs r0, #3 + 8009a7c: f7fd ff1e bl 80078bc + } +} + 8009a80: bf00 nop + 8009a82: 3708 adds r7, #8 + 8009a84: 46bd mov sp, r7 + 8009a86: bd80 pop {r7, pc} + +08009a88 : + * @param seg the old tcp_seg + * @return a copy of seg + */ +struct tcp_seg * +tcp_seg_copy(struct tcp_seg *seg) +{ + 8009a88: b580 push {r7, lr} + 8009a8a: b084 sub sp, #16 + 8009a8c: af00 add r7, sp, #0 + 8009a8e: 6078 str r0, [r7, #4] + struct tcp_seg *cseg; + + cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); + 8009a90: 2003 movs r0, #3 + 8009a92: f7fd fec7 bl 8007824 + 8009a96: 60f8 str r0, [r7, #12] + if (cseg == NULL) { + 8009a98: 68fb ldr r3, [r7, #12] + 8009a9a: 2b00 cmp r3, #0 + 8009a9c: d101 bne.n 8009aa2 + return NULL; + 8009a9e: 2300 movs r3, #0 + 8009aa0: e00a b.n 8009ab8 + } + SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); + 8009aa2: 2210 movs r2, #16 + 8009aa4: 6879 ldr r1, [r7, #4] + 8009aa6: 68f8 ldr r0, [r7, #12] + 8009aa8: f009 fb37 bl 801311a + pbuf_ref(cseg->p); + 8009aac: 68fb ldr r3, [r7, #12] + 8009aae: 685b ldr r3, [r3, #4] + 8009ab0: 4618 mov r0, r3 + 8009ab2: f7fe fcf1 bl 8008498 + return cseg; + 8009ab6: 68fb ldr r3, [r7, #12] +} + 8009ab8: 4618 mov r0, r3 + 8009aba: 3710 adds r7, #16 + 8009abc: 46bd mov sp, r7 + 8009abe: bd80 pop {r7, pc} + +08009ac0 : + * Default receive callback that is called if the user didn't register + * a recv callback for the pcb. + */ +err_t +tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) +{ + 8009ac0: b580 push {r7, lr} + 8009ac2: b084 sub sp, #16 + 8009ac4: af00 add r7, sp, #0 + 8009ac6: 60f8 str r0, [r7, #12] + 8009ac8: 60b9 str r1, [r7, #8] + 8009aca: 607a str r2, [r7, #4] + 8009acc: 70fb strb r3, [r7, #3] + LWIP_UNUSED_ARG(arg); + if (p != NULL) { + 8009ace: 687b ldr r3, [r7, #4] + 8009ad0: 2b00 cmp r3, #0 + 8009ad2: d009 beq.n 8009ae8 + tcp_recved(pcb, p->tot_len); + 8009ad4: 687b ldr r3, [r7, #4] + 8009ad6: 891b ldrh r3, [r3, #8] + 8009ad8: 4619 mov r1, r3 + 8009ada: 68b8 ldr r0, [r7, #8] + 8009adc: f7ff fa86 bl 8008fec + pbuf_free(p); + 8009ae0: 6878 ldr r0, [r7, #4] + 8009ae2: f7fe fc2f bl 8008344 + 8009ae6: e008 b.n 8009afa + } else if (err == ERR_OK) { + 8009ae8: f997 3003 ldrsb.w r3, [r7, #3] + 8009aec: 2b00 cmp r3, #0 + 8009aee: d104 bne.n 8009afa + return tcp_close(pcb); + 8009af0: 68b8 ldr r0, [r7, #8] + 8009af2: f7ff f8c5 bl 8008c80 + 8009af6: 4603 mov r3, r0 + 8009af8: e000 b.n 8009afc + } + return ERR_OK; + 8009afa: 2300 movs r3, #0 +} + 8009afc: 4618 mov r0, r3 + 8009afe: 3710 adds r7, #16 + 8009b00: 46bd mov sp, r7 + 8009b02: bd80 pop {r7, pc} + +08009b04 : + * + * @param prio minimum priority + */ +static void +tcp_kill_prio(u8_t prio) +{ + 8009b04: b580 push {r7, lr} + 8009b06: b086 sub sp, #24 + 8009b08: af00 add r7, sp, #0 + 8009b0a: 4603 mov r3, r0 + 8009b0c: 71fb strb r3, [r7, #7] + struct tcp_pcb *pcb, *inactive; + u32_t inactivity; + u8_t mprio; + + mprio = LWIP_MIN(TCP_PRIO_MAX, prio); + 8009b0e: f997 3007 ldrsb.w r3, [r7, #7] + 8009b12: 2b00 cmp r3, #0 + 8009b14: db01 blt.n 8009b1a + 8009b16: 79fb ldrb r3, [r7, #7] + 8009b18: e000 b.n 8009b1c + 8009b1a: 237f movs r3, #127 ; 0x7f + 8009b1c: 72fb strb r3, [r7, #11] + + /* We kill the oldest active connection that has lower priority than prio. */ + inactivity = 0; + 8009b1e: 2300 movs r3, #0 + 8009b20: 60fb str r3, [r7, #12] + inactive = NULL; + 8009b22: 2300 movs r3, #0 + 8009b24: 613b str r3, [r7, #16] + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + 8009b26: 4b16 ldr r3, [pc, #88] ; (8009b80 ) + 8009b28: 681b ldr r3, [r3, #0] + 8009b2a: 617b str r3, [r7, #20] + 8009b2c: e01a b.n 8009b64 + if (pcb->prio <= mprio && + 8009b2e: 697b ldr r3, [r7, #20] + 8009b30: 7d5b ldrb r3, [r3, #21] + 8009b32: 7afa ldrb r2, [r7, #11] + 8009b34: 429a cmp r2, r3 + 8009b36: d312 bcc.n 8009b5e + (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { + 8009b38: 4b12 ldr r3, [pc, #72] ; (8009b84 ) + 8009b3a: 681a ldr r2, [r3, #0] + 8009b3c: 697b ldr r3, [r7, #20] + 8009b3e: 6a1b ldr r3, [r3, #32] + 8009b40: 1ad3 subs r3, r2, r3 + if (pcb->prio <= mprio && + 8009b42: 68fa ldr r2, [r7, #12] + 8009b44: 429a cmp r2, r3 + 8009b46: d80a bhi.n 8009b5e + inactivity = tcp_ticks - pcb->tmr; + 8009b48: 4b0e ldr r3, [pc, #56] ; (8009b84 ) + 8009b4a: 681a ldr r2, [r3, #0] + 8009b4c: 697b ldr r3, [r7, #20] + 8009b4e: 6a1b ldr r3, [r3, #32] + 8009b50: 1ad3 subs r3, r2, r3 + 8009b52: 60fb str r3, [r7, #12] + inactive = pcb; + 8009b54: 697b ldr r3, [r7, #20] + 8009b56: 613b str r3, [r7, #16] + mprio = pcb->prio; + 8009b58: 697b ldr r3, [r7, #20] + 8009b5a: 7d5b ldrb r3, [r3, #21] + 8009b5c: 72fb strb r3, [r7, #11] + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + 8009b5e: 697b ldr r3, [r7, #20] + 8009b60: 68db ldr r3, [r3, #12] + 8009b62: 617b str r3, [r7, #20] + 8009b64: 697b ldr r3, [r7, #20] + 8009b66: 2b00 cmp r3, #0 + 8009b68: d1e1 bne.n 8009b2e + } + } + if (inactive != NULL) { + 8009b6a: 693b ldr r3, [r7, #16] + 8009b6c: 2b00 cmp r3, #0 + 8009b6e: d002 beq.n 8009b76 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", + (void *)inactive, inactivity)); + tcp_abort(inactive); + 8009b70: 6938 ldr r0, [r7, #16] + 8009b72: f7ff f94f bl 8008e14 + } +} + 8009b76: bf00 nop + 8009b78: 3718 adds r7, #24 + 8009b7a: 46bd mov sp, r7 + 8009b7c: bd80 pop {r7, pc} + 8009b7e: bf00 nop + 8009b80: 20006f74 .word 0x20006f74 + 8009b84: 20006f68 .word 0x20006f68 + +08009b88 : + * Kills the oldest connection that is in specific state. + * Called from tcp_alloc() for LAST_ACK and CLOSING if no more connections are available. + */ +static void +tcp_kill_state(enum tcp_state state) +{ + 8009b88: b580 push {r7, lr} + 8009b8a: b086 sub sp, #24 + 8009b8c: af00 add r7, sp, #0 + 8009b8e: 4603 mov r3, r0 + 8009b90: 71fb strb r3, [r7, #7] + struct tcp_pcb *pcb, *inactive; + u32_t inactivity; + + LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); + 8009b92: 79fb ldrb r3, [r7, #7] + 8009b94: 2b08 cmp r3, #8 + 8009b96: d009 beq.n 8009bac + 8009b98: 79fb ldrb r3, [r7, #7] + 8009b9a: 2b09 cmp r3, #9 + 8009b9c: d006 beq.n 8009bac + 8009b9e: 4b1a ldr r3, [pc, #104] ; (8009c08 ) + 8009ba0: f240 52dc movw r2, #1500 ; 0x5dc + 8009ba4: 4919 ldr r1, [pc, #100] ; (8009c0c ) + 8009ba6: 481a ldr r0, [pc, #104] ; (8009c10 ) + 8009ba8: f009 f8ec bl 8012d84 + + inactivity = 0; + 8009bac: 2300 movs r3, #0 + 8009bae: 60fb str r3, [r7, #12] + inactive = NULL; + 8009bb0: 2300 movs r3, #0 + 8009bb2: 613b str r3, [r7, #16] + /* Go through the list of active pcbs and get the oldest pcb that is in state + CLOSING/LAST_ACK. */ + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + 8009bb4: 4b17 ldr r3, [pc, #92] ; (8009c14 ) + 8009bb6: 681b ldr r3, [r3, #0] + 8009bb8: 617b str r3, [r7, #20] + 8009bba: e017 b.n 8009bec + if (pcb->state == state) { + 8009bbc: 697b ldr r3, [r7, #20] + 8009bbe: 7d1b ldrb r3, [r3, #20] + 8009bc0: 79fa ldrb r2, [r7, #7] + 8009bc2: 429a cmp r2, r3 + 8009bc4: d10f bne.n 8009be6 + if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { + 8009bc6: 4b14 ldr r3, [pc, #80] ; (8009c18 ) + 8009bc8: 681a ldr r2, [r3, #0] + 8009bca: 697b ldr r3, [r7, #20] + 8009bcc: 6a1b ldr r3, [r3, #32] + 8009bce: 1ad3 subs r3, r2, r3 + 8009bd0: 68fa ldr r2, [r7, #12] + 8009bd2: 429a cmp r2, r3 + 8009bd4: d807 bhi.n 8009be6 + inactivity = tcp_ticks - pcb->tmr; + 8009bd6: 4b10 ldr r3, [pc, #64] ; (8009c18 ) + 8009bd8: 681a ldr r2, [r3, #0] + 8009bda: 697b ldr r3, [r7, #20] + 8009bdc: 6a1b ldr r3, [r3, #32] + 8009bde: 1ad3 subs r3, r2, r3 + 8009be0: 60fb str r3, [r7, #12] + inactive = pcb; + 8009be2: 697b ldr r3, [r7, #20] + 8009be4: 613b str r3, [r7, #16] + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + 8009be6: 697b ldr r3, [r7, #20] + 8009be8: 68db ldr r3, [r3, #12] + 8009bea: 617b str r3, [r7, #20] + 8009bec: 697b ldr r3, [r7, #20] + 8009bee: 2b00 cmp r3, #0 + 8009bf0: d1e4 bne.n 8009bbc + } + } + } + if (inactive != NULL) { + 8009bf2: 693b ldr r3, [r7, #16] + 8009bf4: 2b00 cmp r3, #0 + 8009bf6: d003 beq.n 8009c00 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n", + tcp_state_str[state], (void *)inactive, inactivity)); + /* Don't send a RST, since no data is lost. */ + tcp_abandon(inactive, 0); + 8009bf8: 2100 movs r1, #0 + 8009bfa: 6938 ldr r0, [r7, #16] + 8009bfc: f7ff f858 bl 8008cb0 + } +} + 8009c00: bf00 nop + 8009c02: 3718 adds r7, #24 + 8009c04: 46bd mov sp, r7 + 8009c06: bd80 pop {r7, pc} + 8009c08: 08014d7c .word 0x08014d7c + 8009c0c: 0801508c .word 0x0801508c + 8009c10: 08014db8 .word 0x08014db8 + 8009c14: 20006f74 .word 0x20006f74 + 8009c18: 20006f68 .word 0x20006f68 + +08009c1c : + * Kills the oldest connection that is in TIME_WAIT state. + * Called from tcp_alloc() if no more connections are available. + */ +static void +tcp_kill_timewait(void) +{ + 8009c1c: b580 push {r7, lr} + 8009c1e: b084 sub sp, #16 + 8009c20: af00 add r7, sp, #0 + struct tcp_pcb *pcb, *inactive; + u32_t inactivity; + + inactivity = 0; + 8009c22: 2300 movs r3, #0 + 8009c24: 607b str r3, [r7, #4] + inactive = NULL; + 8009c26: 2300 movs r3, #0 + 8009c28: 60bb str r3, [r7, #8] + /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + 8009c2a: 4b12 ldr r3, [pc, #72] ; (8009c74 ) + 8009c2c: 681b ldr r3, [r3, #0] + 8009c2e: 60fb str r3, [r7, #12] + 8009c30: e012 b.n 8009c58 + if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { + 8009c32: 4b11 ldr r3, [pc, #68] ; (8009c78 ) + 8009c34: 681a ldr r2, [r3, #0] + 8009c36: 68fb ldr r3, [r7, #12] + 8009c38: 6a1b ldr r3, [r3, #32] + 8009c3a: 1ad3 subs r3, r2, r3 + 8009c3c: 687a ldr r2, [r7, #4] + 8009c3e: 429a cmp r2, r3 + 8009c40: d807 bhi.n 8009c52 + inactivity = tcp_ticks - pcb->tmr; + 8009c42: 4b0d ldr r3, [pc, #52] ; (8009c78 ) + 8009c44: 681a ldr r2, [r3, #0] + 8009c46: 68fb ldr r3, [r7, #12] + 8009c48: 6a1b ldr r3, [r3, #32] + 8009c4a: 1ad3 subs r3, r2, r3 + 8009c4c: 607b str r3, [r7, #4] + inactive = pcb; + 8009c4e: 68fb ldr r3, [r7, #12] + 8009c50: 60bb str r3, [r7, #8] + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + 8009c52: 68fb ldr r3, [r7, #12] + 8009c54: 68db ldr r3, [r3, #12] + 8009c56: 60fb str r3, [r7, #12] + 8009c58: 68fb ldr r3, [r7, #12] + 8009c5a: 2b00 cmp r3, #0 + 8009c5c: d1e9 bne.n 8009c32 + } + } + if (inactive != NULL) { + 8009c5e: 68bb ldr r3, [r7, #8] + 8009c60: 2b00 cmp r3, #0 + 8009c62: d002 beq.n 8009c6a + LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", + (void *)inactive, inactivity)); + tcp_abort(inactive); + 8009c64: 68b8 ldr r0, [r7, #8] + 8009c66: f7ff f8d5 bl 8008e14 + } +} + 8009c6a: bf00 nop + 8009c6c: 3710 adds r7, #16 + 8009c6e: 46bd mov sp, r7 + 8009c70: bd80 pop {r7, pc} + 8009c72: bf00 nop + 8009c74: 20006f78 .word 0x20006f78 + 8009c78: 20006f68 .word 0x20006f68 + +08009c7c : + * @param prio priority for the new pcb + * @return a new tcp_pcb that initially is in state CLOSED + */ +struct tcp_pcb * +tcp_alloc(u8_t prio) +{ + 8009c7c: b580 push {r7, lr} + 8009c7e: b084 sub sp, #16 + 8009c80: af00 add r7, sp, #0 + 8009c82: 4603 mov r3, r0 + 8009c84: 71fb strb r3, [r7, #7] + struct tcp_pcb *pcb; + + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + 8009c86: 2001 movs r0, #1 + 8009c88: f7fd fdcc bl 8007824 + 8009c8c: 60f8 str r0, [r7, #12] + if (pcb == NULL) { + 8009c8e: 68fb ldr r3, [r7, #12] + 8009c90: 2b00 cmp r3, #0 + 8009c92: d124 bne.n 8009cde + /* Try killing oldest connection in TIME-WAIT. */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); + tcp_kill_timewait(); + 8009c94: f7ff ffc2 bl 8009c1c + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + 8009c98: 2001 movs r0, #1 + 8009c9a: f7fd fdc3 bl 8007824 + 8009c9e: 60f8 str r0, [r7, #12] + if (pcb == NULL) { + 8009ca0: 68fb ldr r3, [r7, #12] + 8009ca2: 2b00 cmp r3, #0 + 8009ca4: d11b bne.n 8009cde + /* Try killing oldest connection in LAST-ACK (these wouldn't go to TIME-WAIT). */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest LAST-ACK connection\n")); + tcp_kill_state(LAST_ACK); + 8009ca6: 2009 movs r0, #9 + 8009ca8: f7ff ff6e bl 8009b88 + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + 8009cac: 2001 movs r0, #1 + 8009cae: f7fd fdb9 bl 8007824 + 8009cb2: 60f8 str r0, [r7, #12] + if (pcb == NULL) { + 8009cb4: 68fb ldr r3, [r7, #12] + 8009cb6: 2b00 cmp r3, #0 + 8009cb8: d111 bne.n 8009cde + /* Try killing oldest connection in CLOSING. */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); + tcp_kill_state(CLOSING); + 8009cba: 2008 movs r0, #8 + 8009cbc: f7ff ff64 bl 8009b88 + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + 8009cc0: 2001 movs r0, #1 + 8009cc2: f7fd fdaf bl 8007824 + 8009cc6: 60f8 str r0, [r7, #12] + if (pcb == NULL) { + 8009cc8: 68fb ldr r3, [r7, #12] + 8009cca: 2b00 cmp r3, #0 + 8009ccc: d107 bne.n 8009cde + /* Try killing active connections with lower priority than the new one. */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio)); + tcp_kill_prio(prio); + 8009cce: 79fb ldrb r3, [r7, #7] + 8009cd0: 4618 mov r0, r3 + 8009cd2: f7ff ff17 bl 8009b04 + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + 8009cd6: 2001 movs r0, #1 + 8009cd8: f7fd fda4 bl 8007824 + 8009cdc: 60f8 str r0, [r7, #12] + if (pcb != NULL) { + /* adjust err stats: memp_malloc failed above */ + MEMP_STATS_DEC(err, MEMP_TCP_PCB); + } + } + if (pcb != NULL) { + 8009cde: 68fb ldr r3, [r7, #12] + 8009ce0: 2b00 cmp r3, #0 + 8009ce2: d03f beq.n 8009d64 + /* zero out the whole pcb, so there is no need to initialize members to zero */ + memset(pcb, 0, sizeof(struct tcp_pcb)); + 8009ce4: 2298 movs r2, #152 ; 0x98 + 8009ce6: 2100 movs r1, #0 + 8009ce8: 68f8 ldr r0, [r7, #12] + 8009cea: f009 f9a1 bl 8013030 + pcb->prio = prio; + 8009cee: 68fb ldr r3, [r7, #12] + 8009cf0: 79fa ldrb r2, [r7, #7] + 8009cf2: 755a strb r2, [r3, #21] + pcb->snd_buf = TCP_SND_BUF; + 8009cf4: 68fb ldr r3, [r7, #12] + 8009cf6: f44f 6286 mov.w r2, #1072 ; 0x430 + 8009cfa: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 + /* Start with a window that does not need scaling. When window scaling is + enabled and used, the window is enlarged when both sides agree on scaling. */ + pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); + 8009cfe: 68fb ldr r3, [r7, #12] + 8009d00: f44f 6206 mov.w r2, #2144 ; 0x860 + 8009d04: 855a strh r2, [r3, #42] ; 0x2a + 8009d06: 68fb ldr r3, [r7, #12] + 8009d08: 8d5a ldrh r2, [r3, #42] ; 0x2a + 8009d0a: 68fb ldr r3, [r7, #12] + 8009d0c: 851a strh r2, [r3, #40] ; 0x28 + pcb->ttl = TCP_TTL; + 8009d0e: 68fb ldr r3, [r7, #12] + 8009d10: 22ff movs r2, #255 ; 0xff + 8009d12: 729a strb r2, [r3, #10] + /* As initial send MSS, we use TCP_MSS but limit it to 536. + The send MSS is updated when an MSS option is received. */ + pcb->mss = INITIAL_MSS; + 8009d14: 68fb ldr r3, [r7, #12] + 8009d16: f44f 7206 mov.w r2, #536 ; 0x218 + 8009d1a: 865a strh r2, [r3, #50] ; 0x32 + pcb->rto = 3000 / TCP_SLOW_INTERVAL; + 8009d1c: 68fb ldr r3, [r7, #12] + 8009d1e: 2206 movs r2, #6 + 8009d20: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 + pcb->sv = 3000 / TCP_SLOW_INTERVAL; + 8009d24: 68fb ldr r3, [r7, #12] + 8009d26: 2206 movs r2, #6 + 8009d28: 87da strh r2, [r3, #62] ; 0x3e + pcb->rtime = -1; + 8009d2a: 68fb ldr r3, [r7, #12] + 8009d2c: f64f 72ff movw r2, #65535 ; 0xffff + 8009d30: 861a strh r2, [r3, #48] ; 0x30 + pcb->cwnd = 1; + 8009d32: 68fb ldr r3, [r7, #12] + 8009d34: 2201 movs r2, #1 + 8009d36: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + pcb->tmr = tcp_ticks; + 8009d3a: 4b0d ldr r3, [pc, #52] ; (8009d70 ) + 8009d3c: 681a ldr r2, [r3, #0] + 8009d3e: 68fb ldr r3, [r7, #12] + 8009d40: 621a str r2, [r3, #32] + pcb->last_timer = tcp_timer_ctr; + 8009d42: 4b0c ldr r3, [pc, #48] ; (8009d74 ) + 8009d44: 781a ldrb r2, [r3, #0] + 8009d46: 68fb ldr r3, [r7, #12] + 8009d48: 775a strb r2, [r3, #29] + of using the largest advertised receive window. We've seen complications with + receiving TCPs that use window scaling and/or window auto-tuning where the + initial advertised window is very small and then grows rapidly once the + connection is established. To avoid these complications, we set ssthresh to the + largest effective cwnd (amount of in-flight data) that the sender can have. */ + pcb->ssthresh = TCP_SND_BUF; + 8009d4a: 68fb ldr r3, [r7, #12] + 8009d4c: f44f 6286 mov.w r2, #1072 ; 0x430 + 8009d50: f8a3 204a strh.w r2, [r3, #74] ; 0x4a + +#if LWIP_CALLBACK_API + pcb->recv = tcp_recv_null; + 8009d54: 68fb ldr r3, [r7, #12] + 8009d56: 4a08 ldr r2, [pc, #32] ; (8009d78 ) + 8009d58: f8c3 2080 str.w r2, [r3, #128] ; 0x80 +#endif /* LWIP_CALLBACK_API */ + + /* Init KEEPALIVE timer */ + pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; + 8009d5c: 68fb ldr r3, [r7, #12] + 8009d5e: 4a07 ldr r2, [pc, #28] ; (8009d7c ) + 8009d60: f8c3 2090 str.w r2, [r3, #144] ; 0x90 +#if LWIP_TCP_KEEPALIVE + pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT; + pcb->keep_cnt = TCP_KEEPCNT_DEFAULT; +#endif /* LWIP_TCP_KEEPALIVE */ + } + return pcb; + 8009d64: 68fb ldr r3, [r7, #12] +} + 8009d66: 4618 mov r0, r3 + 8009d68: 3710 adds r7, #16 + 8009d6a: 46bd mov sp, r7 + 8009d6c: bd80 pop {r7, pc} + 8009d6e: bf00 nop + 8009d70: 20006f68 .word 0x20006f68 + 8009d74: 20006f7e .word 0x20006f7e + 8009d78: 08009ac1 .word 0x08009ac1 + 8009d7c: 006ddd00 .word 0x006ddd00 + +08009d80 : + * + * @return a new tcp_pcb that initially is in state CLOSED + */ +struct tcp_pcb * +tcp_new(void) +{ + 8009d80: b580 push {r7, lr} + 8009d82: af00 add r7, sp, #0 + return tcp_alloc(TCP_PRIO_NORMAL); + 8009d84: 2040 movs r0, #64 ; 0x40 + 8009d86: f7ff ff79 bl 8009c7c + 8009d8a: 4603 mov r3, r0 +} + 8009d8c: 4618 mov r0, r3 + 8009d8e: bd80 pop {r7, pc} + +08009d90 : + * @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) +{ + 8009d90: b480 push {r7} + 8009d92: b083 sub sp, #12 + 8009d94: af00 add r7, sp, #0 + 8009d96: 6078 str r0, [r7, #4] + 8009d98: 6039 str r1, [r7, #0] + /* This function is allowed to be called for both listen pcbs and + connection pcbs. */ + if (pcb != NULL) { + 8009d9a: 687b ldr r3, [r7, #4] + 8009d9c: 2b00 cmp r3, #0 + 8009d9e: d002 beq.n 8009da6 + pcb->callback_arg = arg; + 8009da0: 687b ldr r3, [r7, #4] + 8009da2: 683a ldr r2, [r7, #0] + 8009da4: 611a str r2, [r3, #16] + } +} + 8009da6: bf00 nop + 8009da8: 370c adds r7, #12 + 8009daa: 46bd mov sp, r7 + 8009dac: bc80 pop {r7} + 8009dae: 4770 bx lr + +08009db0 : + * @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) +{ + 8009db0: b580 push {r7, lr} + 8009db2: b082 sub sp, #8 + 8009db4: af00 add r7, sp, #0 + 8009db6: 6078 str r0, [r7, #4] + 8009db8: 6039 str r1, [r7, #0] + if (pcb != NULL) { + 8009dba: 687b ldr r3, [r7, #4] + 8009dbc: 2b00 cmp r3, #0 + 8009dbe: d00e beq.n 8009dde + LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); + 8009dc0: 687b ldr r3, [r7, #4] + 8009dc2: 7d1b ldrb r3, [r3, #20] + 8009dc4: 2b01 cmp r3, #1 + 8009dc6: d106 bne.n 8009dd6 + 8009dc8: 4b07 ldr r3, [pc, #28] ; (8009de8 ) + 8009dca: f240 62bb movw r2, #1723 ; 0x6bb + 8009dce: 4907 ldr r1, [pc, #28] ; (8009dec ) + 8009dd0: 4807 ldr r0, [pc, #28] ; (8009df0 ) + 8009dd2: f008 ffd7 bl 8012d84 + pcb->recv = recv; + 8009dd6: 687b ldr r3, [r7, #4] + 8009dd8: 683a ldr r2, [r7, #0] + 8009dda: f8c3 2080 str.w r2, [r3, #128] ; 0x80 + } +} + 8009dde: bf00 nop + 8009de0: 3708 adds r7, #8 + 8009de2: 46bd mov sp, r7 + 8009de4: bd80 pop {r7, pc} + 8009de6: bf00 nop + 8009de8: 08014d7c .word 0x08014d7c + 8009dec: 0801509c .word 0x0801509c + 8009df0: 08014db8 .word 0x08014db8 + +08009df4 : + * @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) +{ + 8009df4: b580 push {r7, lr} + 8009df6: b082 sub sp, #8 + 8009df8: af00 add r7, sp, #0 + 8009dfa: 6078 str r0, [r7, #4] + 8009dfc: 6039 str r1, [r7, #0] + if (pcb != NULL) { + 8009dfe: 687b ldr r3, [r7, #4] + 8009e00: 2b00 cmp r3, #0 + 8009e02: d00d beq.n 8009e20 + LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); + 8009e04: 687b ldr r3, [r7, #4] + 8009e06: 7d1b ldrb r3, [r3, #20] + 8009e08: 2b01 cmp r3, #1 + 8009e0a: d106 bne.n 8009e1a + 8009e0c: 4b06 ldr r3, [pc, #24] ; (8009e28 ) + 8009e0e: f240 62cc movw r2, #1740 ; 0x6cc + 8009e12: 4906 ldr r1, [pc, #24] ; (8009e2c ) + 8009e14: 4806 ldr r0, [pc, #24] ; (8009e30 ) + 8009e16: f008 ffb5 bl 8012d84 + pcb->sent = sent; + 8009e1a: 687b ldr r3, [r7, #4] + 8009e1c: 683a ldr r2, [r7, #0] + 8009e1e: 67da str r2, [r3, #124] ; 0x7c + } +} + 8009e20: bf00 nop + 8009e22: 3708 adds r7, #8 + 8009e24: 46bd mov sp, r7 + 8009e26: bd80 pop {r7, pc} + 8009e28: 08014d7c .word 0x08014d7c + 8009e2c: 080150c4 .word 0x080150c4 + 8009e30: 08014db8 .word 0x08014db8 + +08009e34 : + * @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) +{ + 8009e34: b580 push {r7, lr} + 8009e36: b082 sub sp, #8 + 8009e38: af00 add r7, sp, #0 + 8009e3a: 6078 str r0, [r7, #4] + 8009e3c: 6039 str r1, [r7, #0] + if (pcb != NULL) { + 8009e3e: 687b ldr r3, [r7, #4] + 8009e40: 2b00 cmp r3, #0 + 8009e42: d00e beq.n 8009e62 + LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); + 8009e44: 687b ldr r3, [r7, #4] + 8009e46: 7d1b ldrb r3, [r3, #20] + 8009e48: 2b01 cmp r3, #1 + 8009e4a: d106 bne.n 8009e5a + 8009e4c: 4b07 ldr r3, [pc, #28] ; (8009e6c ) + 8009e4e: f44f 62dc mov.w r2, #1760 ; 0x6e0 + 8009e52: 4907 ldr r1, [pc, #28] ; (8009e70 ) + 8009e54: 4807 ldr r0, [pc, #28] ; (8009e74 ) + 8009e56: f008 ff95 bl 8012d84 + pcb->errf = err; + 8009e5a: 687b ldr r3, [r7, #4] + 8009e5c: 683a ldr r2, [r7, #0] + 8009e5e: f8c3 208c str.w r2, [r3, #140] ; 0x8c + } +} + 8009e62: bf00 nop + 8009e64: 3708 adds r7, #8 + 8009e66: 46bd mov sp, r7 + 8009e68: bd80 pop {r7, pc} + 8009e6a: bf00 nop + 8009e6c: 08014d7c .word 0x08014d7c + 8009e70: 080150ec .word 0x080150ec + 8009e74: 08014db8 .word 0x08014db8 + +08009e78 : + * timer interval, which is called twice a second. + * + */ +void +tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) +{ + 8009e78: b580 push {r7, lr} + 8009e7a: b084 sub sp, #16 + 8009e7c: af00 add r7, sp, #0 + 8009e7e: 60f8 str r0, [r7, #12] + 8009e80: 60b9 str r1, [r7, #8] + 8009e82: 4613 mov r3, r2 + 8009e84: 71fb strb r3, [r7, #7] + LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); + 8009e86: 68fb ldr r3, [r7, #12] + 8009e88: 7d1b ldrb r3, [r3, #20] + 8009e8a: 2b01 cmp r3, #1 + 8009e8c: d106 bne.n 8009e9c + 8009e8e: 4b09 ldr r3, [pc, #36] ; (8009eb4 ) + 8009e90: f240 7203 movw r2, #1795 ; 0x703 + 8009e94: 4908 ldr r1, [pc, #32] ; (8009eb8 ) + 8009e96: 4809 ldr r0, [pc, #36] ; (8009ebc ) + 8009e98: f008 ff74 bl 8012d84 +#if LWIP_CALLBACK_API + pcb->poll = poll; + 8009e9c: 68fb ldr r3, [r7, #12] + 8009e9e: 68ba ldr r2, [r7, #8] + 8009ea0: f8c3 2088 str.w r2, [r3, #136] ; 0x88 +#else /* LWIP_CALLBACK_API */ + LWIP_UNUSED_ARG(poll); +#endif /* LWIP_CALLBACK_API */ + pcb->pollinterval = interval; + 8009ea4: 68fb ldr r3, [r7, #12] + 8009ea6: 79fa ldrb r2, [r7, #7] + 8009ea8: 771a strb r2, [r3, #28] +} + 8009eaa: bf00 nop + 8009eac: 3710 adds r7, #16 + 8009eae: 46bd mov sp, r7 + 8009eb0: bd80 pop {r7, pc} + 8009eb2: bf00 nop + 8009eb4: 08014d7c .word 0x08014d7c + 8009eb8: 08015114 .word 0x08015114 + 8009ebc: 08014db8 .word 0x08014db8 + +08009ec0 : + * + * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! + */ +void +tcp_pcb_purge(struct tcp_pcb *pcb) +{ + 8009ec0: b580 push {r7, lr} + 8009ec2: b082 sub sp, #8 + 8009ec4: af00 add r7, sp, #0 + 8009ec6: 6078 str r0, [r7, #4] + if (pcb->state != CLOSED && + 8009ec8: 687b ldr r3, [r7, #4] + 8009eca: 7d1b ldrb r3, [r3, #20] + 8009ecc: 2b00 cmp r3, #0 + 8009ece: d034 beq.n 8009f3a + pcb->state != TIME_WAIT && + 8009ed0: 687b ldr r3, [r7, #4] + 8009ed2: 7d1b ldrb r3, [r3, #20] + if (pcb->state != CLOSED && + 8009ed4: 2b0a cmp r3, #10 + 8009ed6: d030 beq.n 8009f3a + pcb->state != LISTEN) { + 8009ed8: 687b ldr r3, [r7, #4] + 8009eda: 7d1b ldrb r3, [r3, #20] + pcb->state != TIME_WAIT && + 8009edc: 2b01 cmp r3, #1 + 8009ede: d02c beq.n 8009f3a + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); + + tcp_backlog_accepted(pcb); + + if (pcb->refused_data != NULL) { + 8009ee0: 687b ldr r3, [r7, #4] + 8009ee2: 6f5b ldr r3, [r3, #116] ; 0x74 + 8009ee4: 2b00 cmp r3, #0 + 8009ee6: d007 beq.n 8009ef8 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); + pbuf_free(pcb->refused_data); + 8009ee8: 687b ldr r3, [r7, #4] + 8009eea: 6f5b ldr r3, [r3, #116] ; 0x74 + 8009eec: 4618 mov r0, r3 + 8009eee: f7fe fa29 bl 8008344 + pcb->refused_data = NULL; + 8009ef2: 687b ldr r3, [r7, #4] + 8009ef4: 2200 movs r2, #0 + 8009ef6: 675a str r2, [r3, #116] ; 0x74 + } +#if TCP_QUEUE_OOSEQ + if (pcb->ooseq != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); + } + tcp_segs_free(pcb->ooseq); + 8009ef8: 687b ldr r3, [r7, #4] + 8009efa: 6f1b ldr r3, [r3, #112] ; 0x70 + 8009efc: 4618 mov r0, r3 + 8009efe: f7ff fd96 bl 8009a2e + pcb->ooseq = NULL; + 8009f02: 687b ldr r3, [r7, #4] + 8009f04: 2200 movs r2, #0 + 8009f06: 671a str r2, [r3, #112] ; 0x70 +#endif /* TCP_QUEUE_OOSEQ */ + + /* Stop the retransmission timer as it will expect data on unacked + queue if it fires */ + pcb->rtime = -1; + 8009f08: 687b ldr r3, [r7, #4] + 8009f0a: f64f 72ff movw r2, #65535 ; 0xffff + 8009f0e: 861a strh r2, [r3, #48] ; 0x30 + + tcp_segs_free(pcb->unsent); + 8009f10: 687b ldr r3, [r7, #4] + 8009f12: 6e9b ldr r3, [r3, #104] ; 0x68 + 8009f14: 4618 mov r0, r3 + 8009f16: f7ff fd8a bl 8009a2e + tcp_segs_free(pcb->unacked); + 8009f1a: 687b ldr r3, [r7, #4] + 8009f1c: 6edb ldr r3, [r3, #108] ; 0x6c + 8009f1e: 4618 mov r0, r3 + 8009f20: f7ff fd85 bl 8009a2e + pcb->unacked = pcb->unsent = NULL; + 8009f24: 687b ldr r3, [r7, #4] + 8009f26: 2200 movs r2, #0 + 8009f28: 669a str r2, [r3, #104] ; 0x68 + 8009f2a: 687b ldr r3, [r7, #4] + 8009f2c: 6e9a ldr r2, [r3, #104] ; 0x68 + 8009f2e: 687b ldr r3, [r7, #4] + 8009f30: 66da str r2, [r3, #108] ; 0x6c +#if TCP_OVERSIZE + pcb->unsent_oversize = 0; + 8009f32: 687b ldr r3, [r7, #4] + 8009f34: 2200 movs r2, #0 + 8009f36: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 +#endif /* TCP_OVERSIZE */ + } +} + 8009f3a: bf00 nop + 8009f3c: 3708 adds r7, #8 + 8009f3e: 46bd mov sp, r7 + 8009f40: bd80 pop {r7, pc} + ... + +08009f44 : + * @param pcblist PCB list to purge. + * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! + */ +void +tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) +{ + 8009f44: b580 push {r7, lr} + 8009f46: b084 sub sp, #16 + 8009f48: af00 add r7, sp, #0 + 8009f4a: 6078 str r0, [r7, #4] + 8009f4c: 6039 str r1, [r7, #0] + TCP_RMV(pcblist, pcb); + 8009f4e: 687b ldr r3, [r7, #4] + 8009f50: 681b ldr r3, [r3, #0] + 8009f52: 683a ldr r2, [r7, #0] + 8009f54: 429a cmp r2, r3 + 8009f56: d105 bne.n 8009f64 + 8009f58: 687b ldr r3, [r7, #4] + 8009f5a: 681b ldr r3, [r3, #0] + 8009f5c: 68da ldr r2, [r3, #12] + 8009f5e: 687b ldr r3, [r7, #4] + 8009f60: 601a str r2, [r3, #0] + 8009f62: e013 b.n 8009f8c + 8009f64: 687b ldr r3, [r7, #4] + 8009f66: 681b ldr r3, [r3, #0] + 8009f68: 60fb str r3, [r7, #12] + 8009f6a: e00c b.n 8009f86 + 8009f6c: 68fb ldr r3, [r7, #12] + 8009f6e: 68db ldr r3, [r3, #12] + 8009f70: 683a ldr r2, [r7, #0] + 8009f72: 429a cmp r2, r3 + 8009f74: d104 bne.n 8009f80 + 8009f76: 683b ldr r3, [r7, #0] + 8009f78: 68da ldr r2, [r3, #12] + 8009f7a: 68fb ldr r3, [r7, #12] + 8009f7c: 60da str r2, [r3, #12] + 8009f7e: e005 b.n 8009f8c + 8009f80: 68fb ldr r3, [r7, #12] + 8009f82: 68db ldr r3, [r3, #12] + 8009f84: 60fb str r3, [r7, #12] + 8009f86: 68fb ldr r3, [r7, #12] + 8009f88: 2b00 cmp r3, #0 + 8009f8a: d1ef bne.n 8009f6c + 8009f8c: 683b ldr r3, [r7, #0] + 8009f8e: 2200 movs r2, #0 + 8009f90: 60da str r2, [r3, #12] + + tcp_pcb_purge(pcb); + 8009f92: 6838 ldr r0, [r7, #0] + 8009f94: f7ff ff94 bl 8009ec0 + + /* if there is an outstanding delayed ACKs, send it */ + if (pcb->state != TIME_WAIT && + 8009f98: 683b ldr r3, [r7, #0] + 8009f9a: 7d1b ldrb r3, [r3, #20] + 8009f9c: 2b0a cmp r3, #10 + 8009f9e: d013 beq.n 8009fc8 + pcb->state != LISTEN && + 8009fa0: 683b ldr r3, [r7, #0] + 8009fa2: 7d1b ldrb r3, [r3, #20] + if (pcb->state != TIME_WAIT && + 8009fa4: 2b01 cmp r3, #1 + 8009fa6: d00f beq.n 8009fc8 + pcb->flags & TF_ACK_DELAY) { + 8009fa8: 683b ldr r3, [r7, #0] + 8009faa: 7e9b ldrb r3, [r3, #26] + 8009fac: f003 0301 and.w r3, r3, #1 + pcb->state != LISTEN && + 8009fb0: 2b00 cmp r3, #0 + 8009fb2: d009 beq.n 8009fc8 + pcb->flags |= TF_ACK_NOW; + 8009fb4: 683b ldr r3, [r7, #0] + 8009fb6: 7e9b ldrb r3, [r3, #26] + 8009fb8: f043 0302 orr.w r3, r3, #2 + 8009fbc: b2da uxtb r2, r3 + 8009fbe: 683b ldr r3, [r7, #0] + 8009fc0: 769a strb r2, [r3, #26] + tcp_output(pcb); + 8009fc2: 6838 ldr r0, [r7, #0] + 8009fc4: f003 f9b8 bl 800d338 + } + + if (pcb->state != LISTEN) { + 8009fc8: 683b ldr r3, [r7, #0] + 8009fca: 7d1b ldrb r3, [r3, #20] + 8009fcc: 2b01 cmp r3, #1 + 8009fce: d020 beq.n 800a012 + LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); + 8009fd0: 683b ldr r3, [r7, #0] + 8009fd2: 6e9b ldr r3, [r3, #104] ; 0x68 + 8009fd4: 2b00 cmp r3, #0 + 8009fd6: d006 beq.n 8009fe6 + 8009fd8: 4b13 ldr r3, [pc, #76] ; (800a028 ) + 8009fda: f240 7253 movw r2, #1875 ; 0x753 + 8009fde: 4913 ldr r1, [pc, #76] ; (800a02c ) + 8009fe0: 4813 ldr r0, [pc, #76] ; (800a030 ) + 8009fe2: f008 fecf bl 8012d84 + LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); + 8009fe6: 683b ldr r3, [r7, #0] + 8009fe8: 6edb ldr r3, [r3, #108] ; 0x6c + 8009fea: 2b00 cmp r3, #0 + 8009fec: d006 beq.n 8009ffc + 8009fee: 4b0e ldr r3, [pc, #56] ; (800a028 ) + 8009ff0: f240 7254 movw r2, #1876 ; 0x754 + 8009ff4: 490f ldr r1, [pc, #60] ; (800a034 ) + 8009ff6: 480e ldr r0, [pc, #56] ; (800a030 ) + 8009ff8: f008 fec4 bl 8012d84 +#if TCP_QUEUE_OOSEQ + LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); + 8009ffc: 683b ldr r3, [r7, #0] + 8009ffe: 6f1b ldr r3, [r3, #112] ; 0x70 + 800a000: 2b00 cmp r3, #0 + 800a002: d006 beq.n 800a012 + 800a004: 4b08 ldr r3, [pc, #32] ; (800a028 ) + 800a006: f240 7256 movw r2, #1878 ; 0x756 + 800a00a: 490b ldr r1, [pc, #44] ; (800a038 ) + 800a00c: 4808 ldr r0, [pc, #32] ; (800a030 ) + 800a00e: f008 feb9 bl 8012d84 +#endif /* TCP_QUEUE_OOSEQ */ + } + + pcb->state = CLOSED; + 800a012: 683b ldr r3, [r7, #0] + 800a014: 2200 movs r2, #0 + 800a016: 751a strb r2, [r3, #20] + /* reset the local port to prevent the pcb from being 'bound' */ + pcb->local_port = 0; + 800a018: 683b ldr r3, [r7, #0] + 800a01a: 2200 movs r2, #0 + 800a01c: 82da strh r2, [r3, #22] + + LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); +} + 800a01e: bf00 nop + 800a020: 3710 adds r7, #16 + 800a022: 46bd mov sp, r7 + 800a024: bd80 pop {r7, pc} + 800a026: bf00 nop + 800a028: 08014d7c .word 0x08014d7c + 800a02c: 08015134 .word 0x08015134 + 800a030: 08014db8 .word 0x08014db8 + 800a034: 0801514c .word 0x0801514c + 800a038: 08015168 .word 0x08015168 + +0800a03c : + * + * @return u32_t pseudo random sequence number + */ +u32_t +tcp_next_iss(struct tcp_pcb *pcb) +{ + 800a03c: b480 push {r7} + 800a03e: b083 sub sp, #12 + 800a040: af00 add r7, sp, #0 + 800a042: 6078 str r0, [r7, #4] +#else /* LWIP_HOOK_TCP_ISN */ + static u32_t iss = 6510; + + LWIP_UNUSED_ARG(pcb); + + iss += tcp_ticks; /* XXX */ + 800a044: 4b06 ldr r3, [pc, #24] ; (800a060 ) + 800a046: 681a ldr r2, [r3, #0] + 800a048: 4b06 ldr r3, [pc, #24] ; (800a064 ) + 800a04a: 681b ldr r3, [r3, #0] + 800a04c: 4413 add r3, r2 + 800a04e: 4a04 ldr r2, [pc, #16] ; (800a060 ) + 800a050: 6013 str r3, [r2, #0] + return iss; + 800a052: 4b03 ldr r3, [pc, #12] ; (800a060 ) + 800a054: 681b ldr r3, [r3, #0] +#endif /* LWIP_HOOK_TCP_ISN */ +} + 800a056: 4618 mov r0, r3 + 800a058: 370c adds r7, #12 + 800a05a: 46bd mov sp, r7 + 800a05c: bc80 pop {r7} + 800a05e: 4770 bx lr + 800a060: 2000000c .word 0x2000000c + 800a064: 20006f68 .word 0x20006f68 + +0800a068 : +tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest +#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING + , const ip_addr_t *src +#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ + ) +{ + 800a068: b580 push {r7, lr} + 800a06a: b084 sub sp, #16 + 800a06c: af00 add r7, sp, #0 + 800a06e: 4603 mov r3, r0 + 800a070: 6039 str r1, [r7, #0] + 800a072: 80fb strh r3, [r7, #6] + u16_t mss_s; + struct netif *outif; + s16_t mtu; + + outif = ip_route(src, dest); + 800a074: 6838 ldr r0, [r7, #0] + 800a076: f007 faab bl 80115d0 + 800a07a: 60f8 str r0, [r7, #12] + else +#endif /* LWIP_IPV4 */ +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + { + if (outif == NULL) { + 800a07c: 68fb ldr r3, [r7, #12] + 800a07e: 2b00 cmp r3, #0 + 800a080: d101 bne.n 800a086 + return sendmss; + 800a082: 88fb ldrh r3, [r7, #6] + 800a084: e010 b.n 800a0a8 + } + mtu = outif->mtu; + 800a086: 68fb ldr r3, [r7, #12] + 800a088: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800a08a: 817b strh r3, [r7, #10] + } +#endif /* LWIP_IPV4 */ + + if (mtu != 0) { + 800a08c: f9b7 300a ldrsh.w r3, [r7, #10] + 800a090: 2b00 cmp r3, #0 + 800a092: d008 beq.n 800a0a6 + else +#endif /* LWIP_IPV4 */ +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + { + mss_s = mtu - IP_HLEN - TCP_HLEN; + 800a094: 897b ldrh r3, [r7, #10] + 800a096: 3b28 subs r3, #40 ; 0x28 + 800a098: 813b strh r3, [r7, #8] +#endif /* LWIP_IPV4 */ + /* 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); + 800a09a: 893a ldrh r2, [r7, #8] + 800a09c: 88fb ldrh r3, [r7, #6] + 800a09e: 4293 cmp r3, r2 + 800a0a0: bf28 it cs + 800a0a2: 4613 movcs r3, r2 + 800a0a4: 80fb strh r3, [r7, #6] + } + return sendmss; + 800a0a6: 88fb ldrh r3, [r7, #6] +} + 800a0a8: 4618 mov r0, r3 + 800a0aa: 3710 adds r7, #16 + 800a0ac: 46bd mov sp, r7 + 800a0ae: bd80 pop {r7, pc} + +0800a0b0 : +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + +/** Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list */ +static void +tcp_netif_ip_addr_changed_pcblist(const ip_addr_t* old_addr, struct tcp_pcb* pcb_list) +{ + 800a0b0: b580 push {r7, lr} + 800a0b2: b084 sub sp, #16 + 800a0b4: af00 add r7, sp, #0 + 800a0b6: 6078 str r0, [r7, #4] + 800a0b8: 6039 str r1, [r7, #0] + struct tcp_pcb *pcb; + pcb = pcb_list; + 800a0ba: 683b ldr r3, [r7, #0] + 800a0bc: 60fb str r3, [r7, #12] + while (pcb != NULL) { + 800a0be: e011 b.n 800a0e4 + /* PCB bound to current local interface address? */ + if (ip_addr_cmp(&pcb->local_ip, old_addr) + 800a0c0: 68fb ldr r3, [r7, #12] + 800a0c2: 681a ldr r2, [r3, #0] + 800a0c4: 687b ldr r3, [r7, #4] + 800a0c6: 681b ldr r3, [r3, #0] + 800a0c8: 429a cmp r2, r3 + 800a0ca: d108 bne.n 800a0de + /* connections to link-local addresses must persist (RFC3927 ch. 1.9) */ + && (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip))) +#endif /* LWIP_AUTOIP */ + ) { + /* this connection must be aborted */ + struct tcp_pcb *next = pcb->next; + 800a0cc: 68fb ldr r3, [r7, #12] + 800a0ce: 68db ldr r3, [r3, #12] + 800a0d0: 60bb str r3, [r7, #8] + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); + tcp_abort(pcb); + 800a0d2: 68f8 ldr r0, [r7, #12] + 800a0d4: f7fe fe9e bl 8008e14 + pcb = next; + 800a0d8: 68bb ldr r3, [r7, #8] + 800a0da: 60fb str r3, [r7, #12] + 800a0dc: e002 b.n 800a0e4 + } else { + pcb = pcb->next; + 800a0de: 68fb ldr r3, [r7, #12] + 800a0e0: 68db ldr r3, [r3, #12] + 800a0e2: 60fb str r3, [r7, #12] + while (pcb != NULL) { + 800a0e4: 68fb ldr r3, [r7, #12] + 800a0e6: 2b00 cmp r3, #0 + 800a0e8: d1ea bne.n 800a0c0 + } + } +} + 800a0ea: bf00 nop + 800a0ec: bf00 nop + 800a0ee: 3710 adds r7, #16 + 800a0f0: 46bd mov sp, r7 + 800a0f2: bd80 pop {r7, pc} + +0800a0f4 : + * @param old_addr IP address of the netif before change + * @param new_addr IP address of the netif after change or NULL if netif has been removed + */ +void +tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) +{ + 800a0f4: b580 push {r7, lr} + 800a0f6: b084 sub sp, #16 + 800a0f8: af00 add r7, sp, #0 + 800a0fa: 6078 str r0, [r7, #4] + 800a0fc: 6039 str r1, [r7, #0] + struct tcp_pcb_listen *lpcb, *next; + + if (!ip_addr_isany(old_addr)) { + 800a0fe: 687b ldr r3, [r7, #4] + 800a100: 2b00 cmp r3, #0 + 800a102: d02c beq.n 800a15e + 800a104: 687b ldr r3, [r7, #4] + 800a106: 681b ldr r3, [r3, #0] + 800a108: 2b00 cmp r3, #0 + 800a10a: d028 beq.n 800a15e + tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); + 800a10c: 4b16 ldr r3, [pc, #88] ; (800a168 ) + 800a10e: 681b ldr r3, [r3, #0] + 800a110: 4619 mov r1, r3 + 800a112: 6878 ldr r0, [r7, #4] + 800a114: f7ff ffcc bl 800a0b0 + tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); + 800a118: 4b14 ldr r3, [pc, #80] ; (800a16c ) + 800a11a: 681b ldr r3, [r3, #0] + 800a11c: 4619 mov r1, r3 + 800a11e: 6878 ldr r0, [r7, #4] + 800a120: f7ff ffc6 bl 800a0b0 + + if (!ip_addr_isany(new_addr)) { + 800a124: 683b ldr r3, [r7, #0] + 800a126: 2b00 cmp r3, #0 + 800a128: d019 beq.n 800a15e + 800a12a: 683b ldr r3, [r7, #0] + 800a12c: 681b ldr r3, [r3, #0] + 800a12e: 2b00 cmp r3, #0 + 800a130: d015 beq.n 800a15e + /* PCB bound to current local interface address? */ + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { + 800a132: 4b0f ldr r3, [pc, #60] ; (800a170 ) + 800a134: 681b ldr r3, [r3, #0] + 800a136: 60fb str r3, [r7, #12] + 800a138: e00e b.n 800a158 + next = lpcb->next; + 800a13a: 68fb ldr r3, [r7, #12] + 800a13c: 68db ldr r3, [r3, #12] + 800a13e: 60bb str r3, [r7, #8] + /* PCB bound to current local interface address? */ + if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { + 800a140: 68fb ldr r3, [r7, #12] + 800a142: 681a ldr r2, [r3, #0] + 800a144: 687b ldr r3, [r7, #4] + 800a146: 681b ldr r3, [r3, #0] + 800a148: 429a cmp r2, r3 + 800a14a: d103 bne.n 800a154 + /* The PCB is listening to the old ipaddr and + * is set to listen to the new one instead */ + ip_addr_copy(lpcb->local_ip, *new_addr); + 800a14c: 683b ldr r3, [r7, #0] + 800a14e: 681a ldr r2, [r3, #0] + 800a150: 68fb ldr r3, [r7, #12] + 800a152: 601a str r2, [r3, #0] + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { + 800a154: 68bb ldr r3, [r7, #8] + 800a156: 60fb str r3, [r7, #12] + 800a158: 68fb ldr r3, [r7, #12] + 800a15a: 2b00 cmp r3, #0 + 800a15c: d1ed bne.n 800a13a + } + } + } + } +} + 800a15e: bf00 nop + 800a160: 3710 adds r7, #16 + 800a162: 46bd mov sp, r7 + 800a164: bd80 pop {r7, pc} + 800a166: bf00 nop + 800a168: 20006f74 .word 0x20006f74 + 800a16c: 20006f6c .word 0x20006f6c + 800a170: 20006f70 .word 0x20006f70 + +0800a174 : + * @param p received TCP segment to process (p->payload pointing to the TCP header) + * @param inp network interface on which this segment was received + */ +void +tcp_input(struct pbuf *p, struct netif *inp) +{ + 800a174: b590 push {r4, r7, lr} + 800a176: b08b sub sp, #44 ; 0x2c + 800a178: af02 add r7, sp, #8 + 800a17a: 6078 str r0, [r7, #4] + 800a17c: 6039 str r1, [r7, #0] + PERF_START; + + TCP_STATS_INC(tcp.recv); + MIB2_STATS_INC(mib2.tcpinsegs); + + tcphdr = (struct tcp_hdr *)p->payload; + 800a17e: 687b ldr r3, [r7, #4] + 800a180: 685b ldr r3, [r3, #4] + 800a182: 4a82 ldr r2, [pc, #520] ; (800a38c ) + 800a184: 6013 str r3, [r2, #0] +#if TCP_INPUT_DEBUG + tcp_debug_print(tcphdr); +#endif + + /* Check that TCP header fits in payload */ + if (p->len < TCP_HLEN) { + 800a186: 687b ldr r3, [r7, #4] + 800a188: 895b ldrh r3, [r3, #10] + 800a18a: 2b13 cmp r3, #19 + 800a18c: f240 8398 bls.w 800a8c0 + TCP_STATS_INC(tcp.lenerr); + goto dropped; + } + + /* Don't even process incoming broadcasts/multicasts. */ + if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || + 800a190: 4b7f ldr r3, [pc, #508] ; (800a390 ) + 800a192: 695b ldr r3, [r3, #20] + 800a194: 4a7e ldr r2, [pc, #504] ; (800a390 ) + 800a196: 6812 ldr r2, [r2, #0] + 800a198: 4611 mov r1, r2 + 800a19a: 4618 mov r0, r3 + 800a19c: f007 fcb2 bl 8011b04 + 800a1a0: 4603 mov r3, r0 + 800a1a2: 2b00 cmp r3, #0 + 800a1a4: f040 838e bne.w 800a8c4 + ip_addr_ismulticast(ip_current_dest_addr())) { + 800a1a8: 4b79 ldr r3, [pc, #484] ; (800a390 ) + 800a1aa: 695b ldr r3, [r3, #20] + 800a1ac: f003 03f0 and.w r3, r3, #240 ; 0xf0 + if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || + 800a1b0: 2be0 cmp r3, #224 ; 0xe0 + 800a1b2: f000 8387 beq.w 800a8c4 + } + } +#endif /* CHECKSUM_CHECK_TCP */ + + /* sanity-check header length */ + hdrlen_bytes = TCPH_HDRLEN(tcphdr) * 4; + 800a1b6: 4b75 ldr r3, [pc, #468] ; (800a38c ) + 800a1b8: 681b ldr r3, [r3, #0] + 800a1ba: 899b ldrh r3, [r3, #12] + 800a1bc: b29b uxth r3, r3 + 800a1be: 4618 mov r0, r3 + 800a1c0: f7fc ff88 bl 80070d4 + 800a1c4: 4603 mov r3, r0 + 800a1c6: 0b1b lsrs r3, r3, #12 + 800a1c8: b29b uxth r3, r3 + 800a1ca: b2db uxtb r3, r3 + 800a1cc: 009b lsls r3, r3, #2 + 800a1ce: 74bb strb r3, [r7, #18] + if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { + 800a1d0: 7cbb ldrb r3, [r7, #18] + 800a1d2: 2b13 cmp r3, #19 + 800a1d4: f240 8378 bls.w 800a8c8 + 800a1d8: 7cbb ldrb r3, [r7, #18] + 800a1da: b29a uxth r2, r3 + 800a1dc: 687b ldr r3, [r7, #4] + 800a1de: 891b ldrh r3, [r3, #8] + 800a1e0: 429a cmp r2, r3 + 800a1e2: f200 8371 bhi.w 800a8c8 + goto dropped; + } + + /* Move the payload pointer in the pbuf so that it points to the + TCP data instead of the TCP header. */ + tcphdr_optlen = hdrlen_bytes - TCP_HLEN; + 800a1e6: 7cbb ldrb r3, [r7, #18] + 800a1e8: b29b uxth r3, r3 + 800a1ea: 3b14 subs r3, #20 + 800a1ec: b29a uxth r2, r3 + 800a1ee: 4b69 ldr r3, [pc, #420] ; (800a394 ) + 800a1f0: 801a strh r2, [r3, #0] + tcphdr_opt2 = NULL; + 800a1f2: 4b69 ldr r3, [pc, #420] ; (800a398 ) + 800a1f4: 2200 movs r2, #0 + 800a1f6: 601a str r2, [r3, #0] + if (p->len >= hdrlen_bytes) { + 800a1f8: 687b ldr r3, [r7, #4] + 800a1fa: 895a ldrh r2, [r3, #10] + 800a1fc: 7cbb ldrb r3, [r7, #18] + 800a1fe: b29b uxth r3, r3 + 800a200: 429a cmp r2, r3 + 800a202: d30d bcc.n 800a220 + /* all options are in the first pbuf */ + tcphdr_opt1len = tcphdr_optlen; + 800a204: 4b63 ldr r3, [pc, #396] ; (800a394 ) + 800a206: 881a ldrh r2, [r3, #0] + 800a208: 4b64 ldr r3, [pc, #400] ; (800a39c ) + 800a20a: 801a strh r2, [r3, #0] + pbuf_header(p, -(s16_t)hdrlen_bytes); /* cannot fail */ + 800a20c: 7cbb ldrb r3, [r7, #18] + 800a20e: b29b uxth r3, r3 + 800a210: 425b negs r3, r3 + 800a212: b29b uxth r3, r3 + 800a214: b21b sxth r3, r3 + 800a216: 4619 mov r1, r3 + 800a218: 6878 ldr r0, [r7, #4] + 800a21a: f7fe f86f bl 80082fc + 800a21e: e055 b.n 800a2cc + } else { + u16_t opt2len; + /* TCP header fits into first pbuf, options don't - data is in the next pbuf */ + /* there must be a next pbuf, due to hdrlen_bytes sanity check above */ + LWIP_ASSERT("p->next != NULL", p->next != NULL); + 800a220: 687b ldr r3, [r7, #4] + 800a222: 681b ldr r3, [r3, #0] + 800a224: 2b00 cmp r3, #0 + 800a226: d105 bne.n 800a234 + 800a228: 4b5d ldr r3, [pc, #372] ; (800a3a0 ) + 800a22a: 22b2 movs r2, #178 ; 0xb2 + 800a22c: 495d ldr r1, [pc, #372] ; (800a3a4 ) + 800a22e: 485e ldr r0, [pc, #376] ; (800a3a8 ) + 800a230: f008 fda8 bl 8012d84 + + /* advance over the TCP header (cannot fail) */ + pbuf_header(p, -TCP_HLEN); + 800a234: f06f 0113 mvn.w r1, #19 + 800a238: 6878 ldr r0, [r7, #4] + 800a23a: f7fe f85f bl 80082fc + + /* determine how long the first and second parts of the options are */ + tcphdr_opt1len = p->len; + 800a23e: 687b ldr r3, [r7, #4] + 800a240: 895a ldrh r2, [r3, #10] + 800a242: 4b56 ldr r3, [pc, #344] ; (800a39c ) + 800a244: 801a strh r2, [r3, #0] + opt2len = tcphdr_optlen - tcphdr_opt1len; + 800a246: 4b53 ldr r3, [pc, #332] ; (800a394 ) + 800a248: 881a ldrh r2, [r3, #0] + 800a24a: 4b54 ldr r3, [pc, #336] ; (800a39c ) + 800a24c: 881b ldrh r3, [r3, #0] + 800a24e: 1ad3 subs r3, r2, r3 + 800a250: 823b strh r3, [r7, #16] + + /* options continue in the next pbuf: set p to zero length and hide the + options in the next pbuf (adjusting p->tot_len) */ + pbuf_header(p, -(s16_t)tcphdr_opt1len); + 800a252: 4b52 ldr r3, [pc, #328] ; (800a39c ) + 800a254: 881b ldrh r3, [r3, #0] + 800a256: 425b negs r3, r3 + 800a258: b29b uxth r3, r3 + 800a25a: b21b sxth r3, r3 + 800a25c: 4619 mov r1, r3 + 800a25e: 6878 ldr r0, [r7, #4] + 800a260: f7fe f84c bl 80082fc + + /* check that the options fit in the second pbuf */ + if (opt2len > p->next->len) { + 800a264: 687b ldr r3, [r7, #4] + 800a266: 681b ldr r3, [r3, #0] + 800a268: 895b ldrh r3, [r3, #10] + 800a26a: 8a3a ldrh r2, [r7, #16] + 800a26c: 429a cmp r2, r3 + 800a26e: f200 832d bhi.w 800a8cc + TCP_STATS_INC(tcp.lenerr); + goto dropped; + } + + /* remember the pointer to the second part of the options */ + tcphdr_opt2 = (u8_t*)p->next->payload; + 800a272: 687b ldr r3, [r7, #4] + 800a274: 681b ldr r3, [r3, #0] + 800a276: 685b ldr r3, [r3, #4] + 800a278: 4a47 ldr r2, [pc, #284] ; (800a398 ) + 800a27a: 6013 str r3, [r2, #0] + + /* advance p->next to point after the options, and manually + adjust p->tot_len to keep it consistent with the changed p->next */ + pbuf_header(p->next, -(s16_t)opt2len); + 800a27c: 687b ldr r3, [r7, #4] + 800a27e: 681a ldr r2, [r3, #0] + 800a280: 8a3b ldrh r3, [r7, #16] + 800a282: 425b negs r3, r3 + 800a284: b29b uxth r3, r3 + 800a286: b21b sxth r3, r3 + 800a288: 4619 mov r1, r3 + 800a28a: 4610 mov r0, r2 + 800a28c: f7fe f836 bl 80082fc + p->tot_len -= opt2len; + 800a290: 687b ldr r3, [r7, #4] + 800a292: 891a ldrh r2, [r3, #8] + 800a294: 8a3b ldrh r3, [r7, #16] + 800a296: 1ad3 subs r3, r2, r3 + 800a298: b29a uxth r2, r3 + 800a29a: 687b ldr r3, [r7, #4] + 800a29c: 811a strh r2, [r3, #8] + + LWIP_ASSERT("p->len == 0", p->len == 0); + 800a29e: 687b ldr r3, [r7, #4] + 800a2a0: 895b ldrh r3, [r3, #10] + 800a2a2: 2b00 cmp r3, #0 + 800a2a4: d005 beq.n 800a2b2 + 800a2a6: 4b3e ldr r3, [pc, #248] ; (800a3a0 ) + 800a2a8: 22cf movs r2, #207 ; 0xcf + 800a2aa: 4940 ldr r1, [pc, #256] ; (800a3ac ) + 800a2ac: 483e ldr r0, [pc, #248] ; (800a3a8 ) + 800a2ae: f008 fd69 bl 8012d84 + LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); + 800a2b2: 687b ldr r3, [r7, #4] + 800a2b4: 891a ldrh r2, [r3, #8] + 800a2b6: 687b ldr r3, [r7, #4] + 800a2b8: 681b ldr r3, [r3, #0] + 800a2ba: 891b ldrh r3, [r3, #8] + 800a2bc: 429a cmp r2, r3 + 800a2be: d005 beq.n 800a2cc + 800a2c0: 4b37 ldr r3, [pc, #220] ; (800a3a0 ) + 800a2c2: 22d0 movs r2, #208 ; 0xd0 + 800a2c4: 493a ldr r1, [pc, #232] ; (800a3b0 ) + 800a2c6: 4838 ldr r0, [pc, #224] ; (800a3a8 ) + 800a2c8: f008 fd5c bl 8012d84 + } + + /* Convert fields in TCP header to host byte order. */ + tcphdr->src = lwip_ntohs(tcphdr->src); + 800a2cc: 4b2f ldr r3, [pc, #188] ; (800a38c ) + 800a2ce: 681b ldr r3, [r3, #0] + 800a2d0: 881b ldrh r3, [r3, #0] + 800a2d2: b29b uxth r3, r3 + 800a2d4: 4a2d ldr r2, [pc, #180] ; (800a38c ) + 800a2d6: 6814 ldr r4, [r2, #0] + 800a2d8: 4618 mov r0, r3 + 800a2da: f7fc fefb bl 80070d4 + 800a2de: 4603 mov r3, r0 + 800a2e0: 8023 strh r3, [r4, #0] + tcphdr->dest = lwip_ntohs(tcphdr->dest); + 800a2e2: 4b2a ldr r3, [pc, #168] ; (800a38c ) + 800a2e4: 681b ldr r3, [r3, #0] + 800a2e6: 885b ldrh r3, [r3, #2] + 800a2e8: b29b uxth r3, r3 + 800a2ea: 4a28 ldr r2, [pc, #160] ; (800a38c ) + 800a2ec: 6814 ldr r4, [r2, #0] + 800a2ee: 4618 mov r0, r3 + 800a2f0: f7fc fef0 bl 80070d4 + 800a2f4: 4603 mov r3, r0 + 800a2f6: 8063 strh r3, [r4, #2] + seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); + 800a2f8: 4b24 ldr r3, [pc, #144] ; (800a38c ) + 800a2fa: 681b ldr r3, [r3, #0] + 800a2fc: 685b ldr r3, [r3, #4] + 800a2fe: 4a23 ldr r2, [pc, #140] ; (800a38c ) + 800a300: 6814 ldr r4, [r2, #0] + 800a302: 4618 mov r0, r3 + 800a304: f7fc fef3 bl 80070ee + 800a308: 4603 mov r3, r0 + 800a30a: 6063 str r3, [r4, #4] + 800a30c: 6863 ldr r3, [r4, #4] + 800a30e: 4a29 ldr r2, [pc, #164] ; (800a3b4 ) + 800a310: 6013 str r3, [r2, #0] + ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); + 800a312: 4b1e ldr r3, [pc, #120] ; (800a38c ) + 800a314: 681b ldr r3, [r3, #0] + 800a316: 689b ldr r3, [r3, #8] + 800a318: 4a1c ldr r2, [pc, #112] ; (800a38c ) + 800a31a: 6814 ldr r4, [r2, #0] + 800a31c: 4618 mov r0, r3 + 800a31e: f7fc fee6 bl 80070ee + 800a322: 4603 mov r3, r0 + 800a324: 60a3 str r3, [r4, #8] + 800a326: 68a3 ldr r3, [r4, #8] + 800a328: 4a23 ldr r2, [pc, #140] ; (800a3b8 ) + 800a32a: 6013 str r3, [r2, #0] + tcphdr->wnd = lwip_ntohs(tcphdr->wnd); + 800a32c: 4b17 ldr r3, [pc, #92] ; (800a38c ) + 800a32e: 681b ldr r3, [r3, #0] + 800a330: 89db ldrh r3, [r3, #14] + 800a332: b29b uxth r3, r3 + 800a334: 4a15 ldr r2, [pc, #84] ; (800a38c ) + 800a336: 6814 ldr r4, [r2, #0] + 800a338: 4618 mov r0, r3 + 800a33a: f7fc fecb bl 80070d4 + 800a33e: 4603 mov r3, r0 + 800a340: 81e3 strh r3, [r4, #14] + + flags = TCPH_FLAGS(tcphdr); + 800a342: 4b12 ldr r3, [pc, #72] ; (800a38c ) + 800a344: 681b ldr r3, [r3, #0] + 800a346: 899b ldrh r3, [r3, #12] + 800a348: b29b uxth r3, r3 + 800a34a: 4618 mov r0, r3 + 800a34c: f7fc fec2 bl 80070d4 + 800a350: 4603 mov r3, r0 + 800a352: b2db uxtb r3, r3 + 800a354: f003 033f and.w r3, r3, #63 ; 0x3f + 800a358: b2da uxtb r2, r3 + 800a35a: 4b18 ldr r3, [pc, #96] ; (800a3bc ) + 800a35c: 701a strb r2, [r3, #0] + tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); + 800a35e: 687b ldr r3, [r7, #4] + 800a360: 891a ldrh r2, [r3, #8] + 800a362: 4b16 ldr r3, [pc, #88] ; (800a3bc ) + 800a364: 781b ldrb r3, [r3, #0] + 800a366: f003 0303 and.w r3, r3, #3 + 800a36a: 2b00 cmp r3, #0 + 800a36c: bf14 ite ne + 800a36e: 2301 movne r3, #1 + 800a370: 2300 moveq r3, #0 + 800a372: b2db uxtb r3, r3 + 800a374: b29b uxth r3, r3 + 800a376: 4413 add r3, r2 + 800a378: b29a uxth r2, r3 + 800a37a: 4b11 ldr r3, [pc, #68] ; (800a3c0 ) + 800a37c: 801a strh r2, [r3, #0] + + /* Demultiplex an incoming segment. First, we check if it is destined + for an active connection. */ + prev = NULL; + 800a37e: 2300 movs r3, #0 + 800a380: 61bb str r3, [r7, #24] + + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + 800a382: 4b10 ldr r3, [pc, #64] ; (800a3c4 ) + 800a384: 681b ldr r3, [r3, #0] + 800a386: 61fb str r3, [r7, #28] + 800a388: e082 b.n 800a490 + 800a38a: bf00 nop + 800a38c: 20006f90 .word 0x20006f90 + 800a390: 200039ec .word 0x200039ec + 800a394: 20006f94 .word 0x20006f94 + 800a398: 20006f98 .word 0x20006f98 + 800a39c: 20006f96 .word 0x20006f96 + 800a3a0: 08015180 .word 0x08015180 + 800a3a4: 080151b4 .word 0x080151b4 + 800a3a8: 080151c4 .word 0x080151c4 + 800a3ac: 080151ec .word 0x080151ec + 800a3b0: 080151f8 .word 0x080151f8 + 800a3b4: 20006fa0 .word 0x20006fa0 + 800a3b8: 20006fa4 .word 0x20006fa4 + 800a3bc: 20006fac .word 0x20006fac + 800a3c0: 20006faa .word 0x20006faa + 800a3c4: 20006f74 .word 0x20006f74 + LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); + 800a3c8: 69fb ldr r3, [r7, #28] + 800a3ca: 7d1b ldrb r3, [r3, #20] + 800a3cc: 2b00 cmp r3, #0 + 800a3ce: d105 bne.n 800a3dc + 800a3d0: 4b6e ldr r3, [pc, #440] ; (800a58c ) + 800a3d2: 22e2 movs r2, #226 ; 0xe2 + 800a3d4: 496e ldr r1, [pc, #440] ; (800a590 ) + 800a3d6: 486f ldr r0, [pc, #444] ; (800a594 ) + 800a3d8: f008 fcd4 bl 8012d84 + LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); + 800a3dc: 69fb ldr r3, [r7, #28] + 800a3de: 7d1b ldrb r3, [r3, #20] + 800a3e0: 2b0a cmp r3, #10 + 800a3e2: d105 bne.n 800a3f0 + 800a3e4: 4b69 ldr r3, [pc, #420] ; (800a58c ) + 800a3e6: 22e3 movs r2, #227 ; 0xe3 + 800a3e8: 496b ldr r1, [pc, #428] ; (800a598 ) + 800a3ea: 486a ldr r0, [pc, #424] ; (800a594 ) + 800a3ec: f008 fcca bl 8012d84 + LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); + 800a3f0: 69fb ldr r3, [r7, #28] + 800a3f2: 7d1b ldrb r3, [r3, #20] + 800a3f4: 2b01 cmp r3, #1 + 800a3f6: d105 bne.n 800a404 + 800a3f8: 4b64 ldr r3, [pc, #400] ; (800a58c ) + 800a3fa: 22e4 movs r2, #228 ; 0xe4 + 800a3fc: 4967 ldr r1, [pc, #412] ; (800a59c ) + 800a3fe: 4865 ldr r0, [pc, #404] ; (800a594 ) + 800a400: f008 fcc0 bl 8012d84 + if (pcb->remote_port == tcphdr->src && + 800a404: 69fb ldr r3, [r7, #28] + 800a406: 8b1a ldrh r2, [r3, #24] + 800a408: 4b65 ldr r3, [pc, #404] ; (800a5a0 ) + 800a40a: 681b ldr r3, [r3, #0] + 800a40c: 881b ldrh r3, [r3, #0] + 800a40e: b29b uxth r3, r3 + 800a410: 429a cmp r2, r3 + 800a412: d138 bne.n 800a486 + pcb->local_port == tcphdr->dest && + 800a414: 69fb ldr r3, [r7, #28] + 800a416: 8ada ldrh r2, [r3, #22] + 800a418: 4b61 ldr r3, [pc, #388] ; (800a5a0 ) + 800a41a: 681b ldr r3, [r3, #0] + 800a41c: 885b ldrh r3, [r3, #2] + 800a41e: b29b uxth r3, r3 + if (pcb->remote_port == tcphdr->src && + 800a420: 429a cmp r2, r3 + 800a422: d130 bne.n 800a486 + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && + 800a424: 69fb ldr r3, [r7, #28] + 800a426: 685a ldr r2, [r3, #4] + 800a428: 4b5e ldr r3, [pc, #376] ; (800a5a4 ) + 800a42a: 691b ldr r3, [r3, #16] + pcb->local_port == tcphdr->dest && + 800a42c: 429a cmp r2, r3 + 800a42e: d12a bne.n 800a486 + ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + 800a430: 69fb ldr r3, [r7, #28] + 800a432: 681a ldr r2, [r3, #0] + 800a434: 4b5b ldr r3, [pc, #364] ; (800a5a4 ) + 800a436: 695b ldr r3, [r3, #20] + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && + 800a438: 429a cmp r2, r3 + 800a43a: d124 bne.n 800a486 + /* Move this PCB to the front of the list so that subsequent + lookups will be faster (we exploit locality in TCP segment + arrivals). */ + LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); + 800a43c: 69fb ldr r3, [r7, #28] + 800a43e: 68db ldr r3, [r3, #12] + 800a440: 69fa ldr r2, [r7, #28] + 800a442: 429a cmp r2, r3 + 800a444: d105 bne.n 800a452 + 800a446: 4b51 ldr r3, [pc, #324] ; (800a58c ) + 800a448: 22ec movs r2, #236 ; 0xec + 800a44a: 4957 ldr r1, [pc, #348] ; (800a5a8 ) + 800a44c: 4851 ldr r0, [pc, #324] ; (800a594 ) + 800a44e: f008 fc99 bl 8012d84 + if (prev != NULL) { + 800a452: 69bb ldr r3, [r7, #24] + 800a454: 2b00 cmp r3, #0 + 800a456: d00a beq.n 800a46e + prev->next = pcb->next; + 800a458: 69fb ldr r3, [r7, #28] + 800a45a: 68da ldr r2, [r3, #12] + 800a45c: 69bb ldr r3, [r7, #24] + 800a45e: 60da str r2, [r3, #12] + pcb->next = tcp_active_pcbs; + 800a460: 4b52 ldr r3, [pc, #328] ; (800a5ac ) + 800a462: 681a ldr r2, [r3, #0] + 800a464: 69fb ldr r3, [r7, #28] + 800a466: 60da str r2, [r3, #12] + tcp_active_pcbs = pcb; + 800a468: 4a50 ldr r2, [pc, #320] ; (800a5ac ) + 800a46a: 69fb ldr r3, [r7, #28] + 800a46c: 6013 str r3, [r2, #0] + } else { + TCP_STATS_INC(tcp.cachehit); + } + LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); + 800a46e: 69fb ldr r3, [r7, #28] + 800a470: 68db ldr r3, [r3, #12] + 800a472: 69fa ldr r2, [r7, #28] + 800a474: 429a cmp r2, r3 + 800a476: d10f bne.n 800a498 + 800a478: 4b44 ldr r3, [pc, #272] ; (800a58c ) + 800a47a: 22f4 movs r2, #244 ; 0xf4 + 800a47c: 494c ldr r1, [pc, #304] ; (800a5b0 ) + 800a47e: 4845 ldr r0, [pc, #276] ; (800a594 ) + 800a480: f008 fc80 bl 8012d84 + break; + 800a484: e008 b.n 800a498 + } + prev = pcb; + 800a486: 69fb ldr r3, [r7, #28] + 800a488: 61bb str r3, [r7, #24] + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + 800a48a: 69fb ldr r3, [r7, #28] + 800a48c: 68db ldr r3, [r3, #12] + 800a48e: 61fb str r3, [r7, #28] + 800a490: 69fb ldr r3, [r7, #28] + 800a492: 2b00 cmp r3, #0 + 800a494: d198 bne.n 800a3c8 + 800a496: e000 b.n 800a49a + break; + 800a498: bf00 nop + } + + if (pcb == NULL) { + 800a49a: 69fb ldr r3, [r7, #28] + 800a49c: 2b00 cmp r3, #0 + 800a49e: f040 808f bne.w 800a5c0 + /* If it did not go to an active connection, we check the connections + in the TIME-WAIT state. */ + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + 800a4a2: 4b44 ldr r3, [pc, #272] ; (800a5b4 ) + 800a4a4: 681b ldr r3, [r3, #0] + 800a4a6: 61fb str r3, [r7, #28] + 800a4a8: e02f b.n 800a50a + LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); + 800a4aa: 69fb ldr r3, [r7, #28] + 800a4ac: 7d1b ldrb r3, [r3, #20] + 800a4ae: 2b0a cmp r3, #10 + 800a4b0: d005 beq.n 800a4be + 800a4b2: 4b36 ldr r3, [pc, #216] ; (800a58c ) + 800a4b4: 22fe movs r2, #254 ; 0xfe + 800a4b6: 4940 ldr r1, [pc, #256] ; (800a5b8 ) + 800a4b8: 4836 ldr r0, [pc, #216] ; (800a594 ) + 800a4ba: f008 fc63 bl 8012d84 + if (pcb->remote_port == tcphdr->src && + 800a4be: 69fb ldr r3, [r7, #28] + 800a4c0: 8b1a ldrh r2, [r3, #24] + 800a4c2: 4b37 ldr r3, [pc, #220] ; (800a5a0 ) + 800a4c4: 681b ldr r3, [r3, #0] + 800a4c6: 881b ldrh r3, [r3, #0] + 800a4c8: b29b uxth r3, r3 + 800a4ca: 429a cmp r2, r3 + 800a4cc: d11a bne.n 800a504 + pcb->local_port == tcphdr->dest && + 800a4ce: 69fb ldr r3, [r7, #28] + 800a4d0: 8ada ldrh r2, [r3, #22] + 800a4d2: 4b33 ldr r3, [pc, #204] ; (800a5a0 ) + 800a4d4: 681b ldr r3, [r3, #0] + 800a4d6: 885b ldrh r3, [r3, #2] + 800a4d8: b29b uxth r3, r3 + if (pcb->remote_port == tcphdr->src && + 800a4da: 429a cmp r2, r3 + 800a4dc: d112 bne.n 800a504 + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && + 800a4de: 69fb ldr r3, [r7, #28] + 800a4e0: 685a ldr r2, [r3, #4] + 800a4e2: 4b30 ldr r3, [pc, #192] ; (800a5a4 ) + 800a4e4: 691b ldr r3, [r3, #16] + pcb->local_port == tcphdr->dest && + 800a4e6: 429a cmp r2, r3 + 800a4e8: d10c bne.n 800a504 + ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + 800a4ea: 69fb ldr r3, [r7, #28] + 800a4ec: 681a ldr r2, [r3, #0] + 800a4ee: 4b2d ldr r3, [pc, #180] ; (800a5a4 ) + 800a4f0: 695b ldr r3, [r3, #20] + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && + 800a4f2: 429a cmp r2, r3 + 800a4f4: d106 bne.n 800a504 + /* We don't really care enough to move this PCB to the front + of the list since we are not very likely to receive that + many segments for connections in TIME-WAIT. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for TIME_WAITing connection.\n")); + tcp_timewait_input(pcb); + 800a4f6: 69f8 ldr r0, [r7, #28] + 800a4f8: f000 fb16 bl 800ab28 + pbuf_free(p); + 800a4fc: 6878 ldr r0, [r7, #4] + 800a4fe: f7fd ff21 bl 8008344 + return; + 800a502: e1e9 b.n 800a8d8 + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + 800a504: 69fb ldr r3, [r7, #28] + 800a506: 68db ldr r3, [r3, #12] + 800a508: 61fb str r3, [r7, #28] + 800a50a: 69fb ldr r3, [r7, #28] + 800a50c: 2b00 cmp r3, #0 + 800a50e: d1cc bne.n 800a4aa + } + } + + /* Finally, if we still did not get a match, we check all PCBs that + are LISTENing for incoming connections. */ + prev = NULL; + 800a510: 2300 movs r3, #0 + 800a512: 61bb str r3, [r7, #24] + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { + 800a514: 4b29 ldr r3, [pc, #164] ; (800a5bc ) + 800a516: 681b ldr r3, [r3, #0] + 800a518: 617b str r3, [r7, #20] + 800a51a: e019 b.n 800a550 + if (lpcb->local_port == tcphdr->dest) { + 800a51c: 697b ldr r3, [r7, #20] + 800a51e: 8ada ldrh r2, [r3, #22] + 800a520: 4b1f ldr r3, [pc, #124] ; (800a5a0 ) + 800a522: 681b ldr r3, [r3, #0] + 800a524: 885b ldrh r3, [r3, #2] + 800a526: b29b uxth r3, r3 + 800a528: 429a cmp r2, r3 + 800a52a: d10c bne.n 800a546 + lpcb_prev = prev; +#else /* SO_REUSE */ + break; +#endif /* SO_REUSE */ + } else if (IP_ADDR_PCB_VERSION_MATCH_EXACT(lpcb, ip_current_dest_addr())) { + if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) { + 800a52c: 697b ldr r3, [r7, #20] + 800a52e: 681a ldr r2, [r3, #0] + 800a530: 4b1c ldr r3, [pc, #112] ; (800a5a4 ) + 800a532: 695b ldr r3, [r3, #20] + 800a534: 429a cmp r2, r3 + 800a536: d00f beq.n 800a558 + /* found an exact match */ + break; + } else if (ip_addr_isany(&lpcb->local_ip)) { + 800a538: 697b ldr r3, [r7, #20] + 800a53a: 2b00 cmp r3, #0 + 800a53c: d00d beq.n 800a55a + 800a53e: 697b ldr r3, [r7, #20] + 800a540: 681b ldr r3, [r3, #0] + 800a542: 2b00 cmp r3, #0 + 800a544: d009 beq.n 800a55a + break; + #endif /* SO_REUSE */ + } + } + } + prev = (struct tcp_pcb *)lpcb; + 800a546: 697b ldr r3, [r7, #20] + 800a548: 61bb str r3, [r7, #24] + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { + 800a54a: 697b ldr r3, [r7, #20] + 800a54c: 68db ldr r3, [r3, #12] + 800a54e: 617b str r3, [r7, #20] + 800a550: 697b ldr r3, [r7, #20] + 800a552: 2b00 cmp r3, #0 + 800a554: d1e2 bne.n 800a51c + 800a556: e000 b.n 800a55a + break; + 800a558: bf00 nop + /* only pass to ANY if no specific local IP has been found */ + lpcb = lpcb_any; + prev = lpcb_prev; + } +#endif /* SO_REUSE */ + if (lpcb != NULL) { + 800a55a: 697b ldr r3, [r7, #20] + 800a55c: 2b00 cmp r3, #0 + 800a55e: d02f beq.n 800a5c0 + /* Move this PCB to the front of the list so that subsequent + lookups will be faster (we exploit locality in TCP segment + arrivals). */ + if (prev != NULL) { + 800a560: 69bb ldr r3, [r7, #24] + 800a562: 2b00 cmp r3, #0 + 800a564: d00a beq.n 800a57c + ((struct tcp_pcb_listen *)prev)->next = lpcb->next; + 800a566: 697b ldr r3, [r7, #20] + 800a568: 68da ldr r2, [r3, #12] + 800a56a: 69bb ldr r3, [r7, #24] + 800a56c: 60da str r2, [r3, #12] + /* our successor is the remainder of the listening list */ + lpcb->next = tcp_listen_pcbs.listen_pcbs; + 800a56e: 4b13 ldr r3, [pc, #76] ; (800a5bc ) + 800a570: 681a ldr r2, [r3, #0] + 800a572: 697b ldr r3, [r7, #20] + 800a574: 60da str r2, [r3, #12] + /* put this listening pcb at the head of the listening list */ + tcp_listen_pcbs.listen_pcbs = lpcb; + 800a576: 4a11 ldr r2, [pc, #68] ; (800a5bc ) + 800a578: 697b ldr r3, [r7, #20] + 800a57a: 6013 str r3, [r2, #0] + } else { + TCP_STATS_INC(tcp.cachehit); + } + + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for LISTENing connection.\n")); + tcp_listen_input(lpcb); + 800a57c: 6978 ldr r0, [r7, #20] + 800a57e: f000 f9f3 bl 800a968 + pbuf_free(p); + 800a582: 6878 ldr r0, [r7, #4] + 800a584: f7fd fede bl 8008344 + return; + 800a588: e1a6 b.n 800a8d8 + 800a58a: bf00 nop + 800a58c: 08015180 .word 0x08015180 + 800a590: 08015218 .word 0x08015218 + 800a594: 080151c4 .word 0x080151c4 + 800a598: 08015240 .word 0x08015240 + 800a59c: 0801526c .word 0x0801526c + 800a5a0: 20006f90 .word 0x20006f90 + 800a5a4: 200039ec .word 0x200039ec + 800a5a8: 08015294 .word 0x08015294 + 800a5ac: 20006f74 .word 0x20006f74 + 800a5b0: 080152c0 .word 0x080152c0 + 800a5b4: 20006f78 .word 0x20006f78 + 800a5b8: 080152ec .word 0x080152ec + 800a5bc: 20006f70 .word 0x20006f70 + tcp_debug_print_flags(TCPH_FLAGS(tcphdr)); + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n")); +#endif /* TCP_INPUT_DEBUG */ + + + if (pcb != NULL) { + 800a5c0: 69fb ldr r3, [r7, #28] + 800a5c2: 2b00 cmp r3, #0 + 800a5c4: f000 8156 beq.w 800a874 +#if TCP_INPUT_DEBUG + tcp_debug_print_state(pcb->state); +#endif /* TCP_INPUT_DEBUG */ + + /* Set up a tcp_seg structure. */ + inseg.next = NULL; + 800a5c8: 4b94 ldr r3, [pc, #592] ; (800a81c ) + 800a5ca: 2200 movs r2, #0 + 800a5cc: 601a str r2, [r3, #0] + inseg.len = p->tot_len; + 800a5ce: 687b ldr r3, [r7, #4] + 800a5d0: 891a ldrh r2, [r3, #8] + 800a5d2: 4b92 ldr r3, [pc, #584] ; (800a81c ) + 800a5d4: 811a strh r2, [r3, #8] + inseg.p = p; + 800a5d6: 4a91 ldr r2, [pc, #580] ; (800a81c ) + 800a5d8: 687b ldr r3, [r7, #4] + 800a5da: 6053 str r3, [r2, #4] + inseg.tcphdr = tcphdr; + 800a5dc: 4b90 ldr r3, [pc, #576] ; (800a820 ) + 800a5de: 681b ldr r3, [r3, #0] + 800a5e0: 4a8e ldr r2, [pc, #568] ; (800a81c ) + 800a5e2: 60d3 str r3, [r2, #12] + + recv_data = NULL; + 800a5e4: 4b8f ldr r3, [pc, #572] ; (800a824 ) + 800a5e6: 2200 movs r2, #0 + 800a5e8: 601a str r2, [r3, #0] + recv_flags = 0; + 800a5ea: 4b8f ldr r3, [pc, #572] ; (800a828 ) + 800a5ec: 2200 movs r2, #0 + 800a5ee: 701a strb r2, [r3, #0] + recv_acked = 0; + 800a5f0: 4b8e ldr r3, [pc, #568] ; (800a82c ) + 800a5f2: 2200 movs r2, #0 + 800a5f4: 801a strh r2, [r3, #0] + + if (flags & TCP_PSH) { + 800a5f6: 4b8e ldr r3, [pc, #568] ; (800a830 ) + 800a5f8: 781b ldrb r3, [r3, #0] + 800a5fa: f003 0308 and.w r3, r3, #8 + 800a5fe: 2b00 cmp r3, #0 + 800a600: d006 beq.n 800a610 + p->flags |= PBUF_FLAG_PUSH; + 800a602: 687b ldr r3, [r7, #4] + 800a604: 7b5b ldrb r3, [r3, #13] + 800a606: f043 0301 orr.w r3, r3, #1 + 800a60a: b2da uxtb r2, r3 + 800a60c: 687b ldr r3, [r7, #4] + 800a60e: 735a strb r2, [r3, #13] + } + + /* If there is data which was previously "refused" by upper layer */ + if (pcb->refused_data != NULL) { + 800a610: 69fb ldr r3, [r7, #28] + 800a612: 6f5b ldr r3, [r3, #116] ; 0x74 + 800a614: 2b00 cmp r3, #0 + 800a616: d017 beq.n 800a648 + if ((tcp_process_refused_data(pcb) == ERR_ABRT) || + 800a618: 69f8 ldr r0, [r7, #28] + 800a61a: f7ff f99f bl 800995c + 800a61e: 4603 mov r3, r0 + 800a620: f113 0f0d cmn.w r3, #13 + 800a624: d007 beq.n 800a636 + ((pcb->refused_data != NULL) && (tcplen > 0))) { + 800a626: 69fb ldr r3, [r7, #28] + 800a628: 6f5b ldr r3, [r3, #116] ; 0x74 + if ((tcp_process_refused_data(pcb) == ERR_ABRT) || + 800a62a: 2b00 cmp r3, #0 + 800a62c: d00c beq.n 800a648 + ((pcb->refused_data != NULL) && (tcplen > 0))) { + 800a62e: 4b81 ldr r3, [pc, #516] ; (800a834 ) + 800a630: 881b ldrh r3, [r3, #0] + 800a632: 2b00 cmp r3, #0 + 800a634: d008 beq.n 800a648 + /* pcb has been aborted or refused data is still refused and the new + segment contains data */ + if (pcb->rcv_ann_wnd == 0) { + 800a636: 69fb ldr r3, [r7, #28] + 800a638: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800a63a: 2b00 cmp r3, #0 + 800a63c: f040 80e2 bne.w 800a804 + /* this is a zero-window probe, we respond to it with current RCV.NXT + and drop the data segment */ + tcp_send_empty_ack(pcb); + 800a640: 69f8 ldr r0, [r7, #28] + 800a642: f002 fe1d bl 800d280 + } + TCP_STATS_INC(tcp.drop); + MIB2_STATS_INC(mib2.tcpinerrs); + goto aborted; + 800a646: e0dd b.n 800a804 + } + } + tcp_input_pcb = pcb; + 800a648: 4a7b ldr r2, [pc, #492] ; (800a838 ) + 800a64a: 69fb ldr r3, [r7, #28] + 800a64c: 6013 str r3, [r2, #0] + err = tcp_process(pcb); + 800a64e: 69f8 ldr r0, [r7, #28] + 800a650: f000 fad2 bl 800abf8 + 800a654: 4603 mov r3, r0 + 800a656: 74fb strb r3, [r7, #19] + /* A return value of ERR_ABRT means that tcp_abort() was called + and that the pcb has been freed. If so, we don't do anything. */ + if (err != ERR_ABRT) { + 800a658: f997 3013 ldrsb.w r3, [r7, #19] + 800a65c: f113 0f0d cmn.w r3, #13 + 800a660: f000 80d2 beq.w 800a808 + if (recv_flags & TF_RESET) { + 800a664: 4b70 ldr r3, [pc, #448] ; (800a828 ) + 800a666: 781b ldrb r3, [r3, #0] + 800a668: f003 0308 and.w r3, r3, #8 + 800a66c: 2b00 cmp r3, #0 + 800a66e: d016 beq.n 800a69e + /* TF_RESET means that the connection was reset by the other + end. We then call the error callback to inform the + application that the connection is dead before we + deallocate the PCB. */ + TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST); + 800a670: 69fb ldr r3, [r7, #28] + 800a672: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c + 800a676: 2b00 cmp r3, #0 + 800a678: d008 beq.n 800a68c + 800a67a: 69fb ldr r3, [r7, #28] + 800a67c: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c + 800a680: 69fa ldr r2, [r7, #28] + 800a682: 6912 ldr r2, [r2, #16] + 800a684: f06f 010d mvn.w r1, #13 + 800a688: 4610 mov r0, r2 + 800a68a: 4798 blx r3 + tcp_pcb_remove(&tcp_active_pcbs, pcb); + 800a68c: 69f9 ldr r1, [r7, #28] + 800a68e: 486b ldr r0, [pc, #428] ; (800a83c ) + 800a690: f7ff fc58 bl 8009f44 + memp_free(MEMP_TCP_PCB, pcb); + 800a694: 69f9 ldr r1, [r7, #28] + 800a696: 2001 movs r0, #1 + 800a698: f7fd f910 bl 80078bc + 800a69c: e0d7 b.n 800a84e + } else { + err = ERR_OK; + 800a69e: 2300 movs r3, #0 + 800a6a0: 74fb strb r3, [r7, #19] + /* If the application has registered a "sent" function to be + called when new send buffer space is available, we call it + now. */ + if (recv_acked > 0) { + 800a6a2: 4b62 ldr r3, [pc, #392] ; (800a82c ) + 800a6a4: 881b ldrh r3, [r3, #0] + 800a6a6: 2b00 cmp r3, #0 + 800a6a8: d01b beq.n 800a6e2 + while (acked > 0) { + acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); + acked -= acked16; +#else + { + acked16 = recv_acked; + 800a6aa: 4b60 ldr r3, [pc, #384] ; (800a82c ) + 800a6ac: 881b ldrh r3, [r3, #0] + 800a6ae: 81fb strh r3, [r7, #14] +#endif + TCP_EVENT_SENT(pcb, (u16_t)acked16, err); + 800a6b0: 69fb ldr r3, [r7, #28] + 800a6b2: 6fdb ldr r3, [r3, #124] ; 0x7c + 800a6b4: 2b00 cmp r3, #0 + 800a6b6: d009 beq.n 800a6cc + 800a6b8: 69fb ldr r3, [r7, #28] + 800a6ba: 6fdb ldr r3, [r3, #124] ; 0x7c + 800a6bc: 69fa ldr r2, [r7, #28] + 800a6be: 6910 ldr r0, [r2, #16] + 800a6c0: 89fa ldrh r2, [r7, #14] + 800a6c2: 69f9 ldr r1, [r7, #28] + 800a6c4: 4798 blx r3 + 800a6c6: 4603 mov r3, r0 + 800a6c8: 74fb strb r3, [r7, #19] + 800a6ca: e001 b.n 800a6d0 + 800a6cc: 2300 movs r3, #0 + 800a6ce: 74fb strb r3, [r7, #19] + if (err == ERR_ABRT) { + 800a6d0: f997 3013 ldrsb.w r3, [r7, #19] + 800a6d4: f113 0f0d cmn.w r3, #13 + 800a6d8: f000 8098 beq.w 800a80c + goto aborted; + } + } + recv_acked = 0; + 800a6dc: 4b53 ldr r3, [pc, #332] ; (800a82c ) + 800a6de: 2200 movs r2, #0 + 800a6e0: 801a strh r2, [r3, #0] + } + if (tcp_input_delayed_close(pcb)) { + 800a6e2: 69f8 ldr r0, [r7, #28] + 800a6e4: f000 f90e bl 800a904 + 800a6e8: 4603 mov r3, r0 + 800a6ea: 2b00 cmp r3, #0 + 800a6ec: f040 8090 bne.w 800a810 +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + while (recv_data != NULL) { + struct pbuf *rest = NULL; + pbuf_split_64k(recv_data, &rest); +#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + if (recv_data != NULL) { + 800a6f0: 4b4c ldr r3, [pc, #304] ; (800a824 ) + 800a6f2: 681b ldr r3, [r3, #0] + 800a6f4: 2b00 cmp r3, #0 + 800a6f6: d041 beq.n 800a77c +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + + LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); + 800a6f8: 69fb ldr r3, [r7, #28] + 800a6fa: 6f5b ldr r3, [r3, #116] ; 0x74 + 800a6fc: 2b00 cmp r3, #0 + 800a6fe: d006 beq.n 800a70e + 800a700: 4b4f ldr r3, [pc, #316] ; (800a840 ) + 800a702: f44f 72d2 mov.w r2, #420 ; 0x1a4 + 800a706: 494f ldr r1, [pc, #316] ; (800a844 ) + 800a708: 484f ldr r0, [pc, #316] ; (800a848 ) + 800a70a: f008 fb3b bl 8012d84 + if (pcb->flags & TF_RXCLOSED) { + 800a70e: 69fb ldr r3, [r7, #28] + 800a710: 7e9b ldrb r3, [r3, #26] + 800a712: f003 0310 and.w r3, r3, #16 + 800a716: 2b00 cmp r3, #0 + 800a718: d008 beq.n 800a72c + /* received data although already closed -> abort (send RST) to + notify the remote host that not all data has been processed */ + pbuf_free(recv_data); + 800a71a: 4b42 ldr r3, [pc, #264] ; (800a824 ) + 800a71c: 681b ldr r3, [r3, #0] + 800a71e: 4618 mov r0, r3 + 800a720: f7fd fe10 bl 8008344 +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + if (rest != NULL) { + pbuf_free(rest); + } +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + tcp_abort(pcb); + 800a724: 69f8 ldr r0, [r7, #28] + 800a726: f7fe fb75 bl 8008e14 + goto aborted; + 800a72a: e090 b.n 800a84e + } + + /* Notify application that data has been received. */ + TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); + 800a72c: 69fb ldr r3, [r7, #28] + 800a72e: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 + 800a732: 2b00 cmp r3, #0 + 800a734: d00c beq.n 800a750 + 800a736: 69fb ldr r3, [r7, #28] + 800a738: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 + 800a73c: 69fb ldr r3, [r7, #28] + 800a73e: 6918 ldr r0, [r3, #16] + 800a740: 4b38 ldr r3, [pc, #224] ; (800a824 ) + 800a742: 681a ldr r2, [r3, #0] + 800a744: 2300 movs r3, #0 + 800a746: 69f9 ldr r1, [r7, #28] + 800a748: 47a0 blx r4 + 800a74a: 4603 mov r3, r0 + 800a74c: 74fb strb r3, [r7, #19] + 800a74e: e008 b.n 800a762 + 800a750: 4b34 ldr r3, [pc, #208] ; (800a824 ) + 800a752: 681a ldr r2, [r3, #0] + 800a754: 2300 movs r3, #0 + 800a756: 69f9 ldr r1, [r7, #28] + 800a758: 2000 movs r0, #0 + 800a75a: f7ff f9b1 bl 8009ac0 + 800a75e: 4603 mov r3, r0 + 800a760: 74fb strb r3, [r7, #19] + if (err == ERR_ABRT) { + 800a762: f997 3013 ldrsb.w r3, [r7, #19] + 800a766: f113 0f0d cmn.w r3, #13 + 800a76a: d053 beq.n 800a814 +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + goto aborted; + } + + /* If the upper layer can't receive this data, store it */ + if (err != ERR_OK) { + 800a76c: f997 3013 ldrsb.w r3, [r7, #19] + 800a770: 2b00 cmp r3, #0 + 800a772: d003 beq.n 800a77c +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + if (rest != NULL) { + pbuf_cat(recv_data, rest); + } +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + pcb->refused_data = recv_data; + 800a774: 4b2b ldr r3, [pc, #172] ; (800a824 ) + 800a776: 681a ldr r2, [r3, #0] + 800a778: 69fb ldr r3, [r7, #28] + 800a77a: 675a str r2, [r3, #116] ; 0x74 + } + } + + /* If a FIN segment was received, we call the callback + function with a NULL buffer to indicate EOF. */ + if (recv_flags & TF_GOT_FIN) { + 800a77c: 4b2a ldr r3, [pc, #168] ; (800a828 ) + 800a77e: 781b ldrb r3, [r3, #0] + 800a780: f003 0320 and.w r3, r3, #32 + 800a784: 2b00 cmp r3, #0 + 800a786: d030 beq.n 800a7ea + if (pcb->refused_data != NULL) { + 800a788: 69fb ldr r3, [r7, #28] + 800a78a: 6f5b ldr r3, [r3, #116] ; 0x74 + 800a78c: 2b00 cmp r3, #0 + 800a78e: d009 beq.n 800a7a4 + /* Delay this if we have refused data. */ + pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; + 800a790: 69fb ldr r3, [r7, #28] + 800a792: 6f5b ldr r3, [r3, #116] ; 0x74 + 800a794: 7b5a ldrb r2, [r3, #13] + 800a796: 69fb ldr r3, [r7, #28] + 800a798: 6f5b ldr r3, [r3, #116] ; 0x74 + 800a79a: f042 0220 orr.w r2, r2, #32 + 800a79e: b2d2 uxtb r2, r2 + 800a7a0: 735a strb r2, [r3, #13] + 800a7a2: e022 b.n 800a7ea + } else { + /* correct rcv_wnd as the application won't call tcp_recved() + for the FIN's seqno */ + if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { + 800a7a4: 69fb ldr r3, [r7, #28] + 800a7a6: 8d1b ldrh r3, [r3, #40] ; 0x28 + 800a7a8: f5b3 6f06 cmp.w r3, #2144 ; 0x860 + 800a7ac: d005 beq.n 800a7ba + pcb->rcv_wnd++; + 800a7ae: 69fb ldr r3, [r7, #28] + 800a7b0: 8d1b ldrh r3, [r3, #40] ; 0x28 + 800a7b2: 3301 adds r3, #1 + 800a7b4: b29a uxth r2, r3 + 800a7b6: 69fb ldr r3, [r7, #28] + 800a7b8: 851a strh r2, [r3, #40] ; 0x28 + } + TCP_EVENT_CLOSED(pcb, err); + 800a7ba: 69fb ldr r3, [r7, #28] + 800a7bc: f8d3 3080 ldr.w r3, [r3, #128] ; 0x80 + 800a7c0: 2b00 cmp r3, #0 + 800a7c2: d00b beq.n 800a7dc + 800a7c4: 69fb ldr r3, [r7, #28] + 800a7c6: f8d3 4080 ldr.w r4, [r3, #128] ; 0x80 + 800a7ca: 69fb ldr r3, [r7, #28] + 800a7cc: 6918 ldr r0, [r3, #16] + 800a7ce: 2300 movs r3, #0 + 800a7d0: 2200 movs r2, #0 + 800a7d2: 69f9 ldr r1, [r7, #28] + 800a7d4: 47a0 blx r4 + 800a7d6: 4603 mov r3, r0 + 800a7d8: 74fb strb r3, [r7, #19] + 800a7da: e001 b.n 800a7e0 + 800a7dc: 2300 movs r3, #0 + 800a7de: 74fb strb r3, [r7, #19] + if (err == ERR_ABRT) { + 800a7e0: f997 3013 ldrsb.w r3, [r7, #19] + 800a7e4: f113 0f0d cmn.w r3, #13 + 800a7e8: d016 beq.n 800a818 + goto aborted; + } + } + } + + tcp_input_pcb = NULL; + 800a7ea: 4b13 ldr r3, [pc, #76] ; (800a838 ) + 800a7ec: 2200 movs r2, #0 + 800a7ee: 601a str r2, [r3, #0] + if (tcp_input_delayed_close(pcb)) { + 800a7f0: 69f8 ldr r0, [r7, #28] + 800a7f2: f000 f887 bl 800a904 + 800a7f6: 4603 mov r3, r0 + 800a7f8: 2b00 cmp r3, #0 + 800a7fa: d127 bne.n 800a84c + goto aborted; + } + /* Try to send something out. */ + tcp_output(pcb); + 800a7fc: 69f8 ldr r0, [r7, #28] + 800a7fe: f002 fd9b bl 800d338 + 800a802: e024 b.n 800a84e + goto aborted; + 800a804: bf00 nop + 800a806: e022 b.n 800a84e +#endif /* TCP_INPUT_DEBUG */ + } + } + /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). + Below this line, 'pcb' may not be dereferenced! */ +aborted: + 800a808: bf00 nop + 800a80a: e020 b.n 800a84e + goto aborted; + 800a80c: bf00 nop + 800a80e: e01e b.n 800a84e + goto aborted; + 800a810: bf00 nop + 800a812: e01c b.n 800a84e + goto aborted; + 800a814: bf00 nop + 800a816: e01a b.n 800a84e + goto aborted; + 800a818: bf00 nop + 800a81a: e018 b.n 800a84e + 800a81c: 20006f80 .word 0x20006f80 + 800a820: 20006f90 .word 0x20006f90 + 800a824: 20006fb0 .word 0x20006fb0 + 800a828: 20006fad .word 0x20006fad + 800a82c: 20006fa8 .word 0x20006fa8 + 800a830: 20006fac .word 0x20006fac + 800a834: 20006faa .word 0x20006faa + 800a838: 20006fb4 .word 0x20006fb4 + 800a83c: 20006f74 .word 0x20006f74 + 800a840: 08015180 .word 0x08015180 + 800a844: 0801531c .word 0x0801531c + 800a848: 080151c4 .word 0x080151c4 + goto aborted; + 800a84c: bf00 nop + tcp_input_pcb = NULL; + 800a84e: 4b24 ldr r3, [pc, #144] ; (800a8e0 ) + 800a850: 2200 movs r2, #0 + 800a852: 601a str r2, [r3, #0] + recv_data = NULL; + 800a854: 4b23 ldr r3, [pc, #140] ; (800a8e4 ) + 800a856: 2200 movs r2, #0 + 800a858: 601a str r2, [r3, #0] + + /* give up our reference to inseg.p */ + if (inseg.p != NULL) + 800a85a: 4b23 ldr r3, [pc, #140] ; (800a8e8 ) + 800a85c: 685b ldr r3, [r3, #4] + 800a85e: 2b00 cmp r3, #0 + 800a860: d039 beq.n 800a8d6 + { + pbuf_free(inseg.p); + 800a862: 4b21 ldr r3, [pc, #132] ; (800a8e8 ) + 800a864: 685b ldr r3, [r3, #4] + 800a866: 4618 mov r0, r3 + 800a868: f7fd fd6c bl 8008344 + inseg.p = NULL; + 800a86c: 4b1e ldr r3, [pc, #120] ; (800a8e8 ) + 800a86e: 2200 movs r2, #0 + 800a870: 605a str r2, [r3, #4] + pbuf_free(p); + } + + LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); + PERF_STOP("tcp_input"); + return; + 800a872: e030 b.n 800a8d6 + if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { + 800a874: 4b1d ldr r3, [pc, #116] ; (800a8ec ) + 800a876: 681b ldr r3, [r3, #0] + 800a878: 899b ldrh r3, [r3, #12] + 800a87a: b29b uxth r3, r3 + 800a87c: 4618 mov r0, r3 + 800a87e: f7fc fc29 bl 80070d4 + 800a882: 4603 mov r3, r0 + 800a884: f003 0304 and.w r3, r3, #4 + 800a888: 2b00 cmp r3, #0 + 800a88a: d115 bne.n 800a8b8 + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800a88c: 4b18 ldr r3, [pc, #96] ; (800a8f0 ) + 800a88e: 6818 ldr r0, [r3, #0] + 800a890: 4b18 ldr r3, [pc, #96] ; (800a8f4 ) + 800a892: 881b ldrh r3, [r3, #0] + 800a894: 461a mov r2, r3 + 800a896: 4b18 ldr r3, [pc, #96] ; (800a8f8 ) + 800a898: 681b ldr r3, [r3, #0] + 800a89a: 18d1 adds r1, r2, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800a89c: 4b13 ldr r3, [pc, #76] ; (800a8ec ) + 800a89e: 681b ldr r3, [r3, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800a8a0: 885b ldrh r3, [r3, #2] + 800a8a2: b29b uxth r3, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800a8a4: 4a11 ldr r2, [pc, #68] ; (800a8ec ) + 800a8a6: 6812 ldr r2, [r2, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800a8a8: 8812 ldrh r2, [r2, #0] + 800a8aa: b292 uxth r2, r2 + 800a8ac: 9201 str r2, [sp, #4] + 800a8ae: 9300 str r3, [sp, #0] + 800a8b0: 4b12 ldr r3, [pc, #72] ; (800a8fc ) + 800a8b2: 4a13 ldr r2, [pc, #76] ; (800a900 ) + 800a8b4: f002 ffc4 bl 800d840 + pbuf_free(p); + 800a8b8: 6878 ldr r0, [r7, #4] + 800a8ba: f7fd fd43 bl 8008344 + return; + 800a8be: e00a b.n 800a8d6 + goto dropped; + 800a8c0: bf00 nop + 800a8c2: e004 b.n 800a8ce + goto dropped; + 800a8c4: bf00 nop + 800a8c6: e002 b.n 800a8ce + goto dropped; + 800a8c8: bf00 nop + 800a8ca: e000 b.n 800a8ce + goto dropped; + 800a8cc: bf00 nop +dropped: + TCP_STATS_INC(tcp.drop); + MIB2_STATS_INC(mib2.tcpinerrs); + pbuf_free(p); + 800a8ce: 6878 ldr r0, [r7, #4] + 800a8d0: f7fd fd38 bl 8008344 + 800a8d4: e000 b.n 800a8d8 + return; + 800a8d6: bf00 nop +} + 800a8d8: 3724 adds r7, #36 ; 0x24 + 800a8da: 46bd mov sp, r7 + 800a8dc: bd90 pop {r4, r7, pc} + 800a8de: bf00 nop + 800a8e0: 20006fb4 .word 0x20006fb4 + 800a8e4: 20006fb0 .word 0x20006fb0 + 800a8e8: 20006f80 .word 0x20006f80 + 800a8ec: 20006f90 .word 0x20006f90 + 800a8f0: 20006fa4 .word 0x20006fa4 + 800a8f4: 20006faa .word 0x20006faa + 800a8f8: 20006fa0 .word 0x20006fa0 + 800a8fc: 200039fc .word 0x200039fc + 800a900: 20003a00 .word 0x20003a00 + +0800a904 : + * any more. + * @returns 1 if the pcb has been closed and deallocated, 0 otherwise + */ +static int +tcp_input_delayed_close(struct tcp_pcb *pcb) +{ + 800a904: b580 push {r7, lr} + 800a906: b082 sub sp, #8 + 800a908: af00 add r7, sp, #0 + 800a90a: 6078 str r0, [r7, #4] + if (recv_flags & TF_CLOSED) { + 800a90c: 4b14 ldr r3, [pc, #80] ; (800a960 ) + 800a90e: 781b ldrb r3, [r3, #0] + 800a910: f003 0310 and.w r3, r3, #16 + 800a914: 2b00 cmp r3, #0 + 800a916: d01d beq.n 800a954 + /* The connection has been closed and we will deallocate the + PCB. */ + if (!(pcb->flags & TF_RXCLOSED)) { + 800a918: 687b ldr r3, [r7, #4] + 800a91a: 7e9b ldrb r3, [r3, #26] + 800a91c: f003 0310 and.w r3, r3, #16 + 800a920: 2b00 cmp r3, #0 + 800a922: d10d bne.n 800a940 + /* Connection closed although the application has only shut down the + tx side: call the PCB's err callback and indicate the closure to + ensure the application doesn't continue using the PCB. */ + TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD); + 800a924: 687b ldr r3, [r7, #4] + 800a926: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c + 800a92a: 2b00 cmp r3, #0 + 800a92c: d008 beq.n 800a940 + 800a92e: 687b ldr r3, [r7, #4] + 800a930: f8d3 308c ldr.w r3, [r3, #140] ; 0x8c + 800a934: 687a ldr r2, [r7, #4] + 800a936: 6912 ldr r2, [r2, #16] + 800a938: f06f 010e mvn.w r1, #14 + 800a93c: 4610 mov r0, r2 + 800a93e: 4798 blx r3 + } + tcp_pcb_remove(&tcp_active_pcbs, pcb); + 800a940: 6879 ldr r1, [r7, #4] + 800a942: 4808 ldr r0, [pc, #32] ; (800a964 ) + 800a944: f7ff fafe bl 8009f44 + memp_free(MEMP_TCP_PCB, pcb); + 800a948: 6879 ldr r1, [r7, #4] + 800a94a: 2001 movs r0, #1 + 800a94c: f7fc ffb6 bl 80078bc + return 1; + 800a950: 2301 movs r3, #1 + 800a952: e000 b.n 800a956 + } + return 0; + 800a954: 2300 movs r3, #0 +} + 800a956: 4618 mov r0, r3 + 800a958: 3708 adds r7, #8 + 800a95a: 46bd mov sp, r7 + 800a95c: bd80 pop {r7, pc} + 800a95e: bf00 nop + 800a960: 20006fad .word 0x20006fad + 800a964: 20006f74 .word 0x20006f74 + +0800a968 : + * @note the segment which arrived is saved in global variables, therefore only the pcb + * involved is passed as a parameter to this function + */ +static void +tcp_listen_input(struct tcp_pcb_listen *pcb) +{ + 800a968: b580 push {r7, lr} + 800a96a: b088 sub sp, #32 + 800a96c: af02 add r7, sp, #8 + 800a96e: 6078 str r0, [r7, #4] + struct tcp_pcb *npcb; + u32_t iss; + err_t rc; + + if (flags & TCP_RST) { + 800a970: 4b63 ldr r3, [pc, #396] ; (800ab00 ) + 800a972: 781b ldrb r3, [r3, #0] + 800a974: f003 0304 and.w r3, r3, #4 + 800a978: 2b00 cmp r3, #0 + 800a97a: f040 80bb bne.w 800aaf4 + return; + } + + /* In the LISTEN state, we check for incoming SYN segments, + creates a new PCB, and responds with a SYN|ACK. */ + if (flags & TCP_ACK) { + 800a97e: 4b60 ldr r3, [pc, #384] ; (800ab00 ) + 800a980: 781b ldrb r3, [r3, #0] + 800a982: f003 0310 and.w r3, r3, #16 + 800a986: 2b00 cmp r3, #0 + 800a988: d016 beq.n 800a9b8 + /* For incoming segments with the ACK flag set, respond with a + RST. */ + LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n")); + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800a98a: 4b5e ldr r3, [pc, #376] ; (800ab04 ) + 800a98c: 6818 ldr r0, [r3, #0] + 800a98e: 4b5e ldr r3, [pc, #376] ; (800ab08 ) + 800a990: 881b ldrh r3, [r3, #0] + 800a992: 461a mov r2, r3 + 800a994: 4b5d ldr r3, [pc, #372] ; (800ab0c ) + 800a996: 681b ldr r3, [r3, #0] + 800a998: 18d1 adds r1, r2, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800a99a: 4b5d ldr r3, [pc, #372] ; (800ab10 ) + 800a99c: 681b ldr r3, [r3, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800a99e: 885b ldrh r3, [r3, #2] + 800a9a0: b29b uxth r3, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800a9a2: 4a5b ldr r2, [pc, #364] ; (800ab10 ) + 800a9a4: 6812 ldr r2, [r2, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800a9a6: 8812 ldrh r2, [r2, #0] + 800a9a8: b292 uxth r2, r2 + 800a9aa: 9201 str r2, [sp, #4] + 800a9ac: 9300 str r3, [sp, #0] + 800a9ae: 4b59 ldr r3, [pc, #356] ; (800ab14 ) + 800a9b0: 4a59 ldr r2, [pc, #356] ; (800ab18 ) + 800a9b2: f002 ff45 bl 800d840 + tcp_abandon(npcb, 0); + return; + } + tcp_output(npcb); + } + return; + 800a9b6: e09f b.n 800aaf8 + } else if (flags & TCP_SYN) { + 800a9b8: 4b51 ldr r3, [pc, #324] ; (800ab00 ) + 800a9ba: 781b ldrb r3, [r3, #0] + 800a9bc: f003 0302 and.w r3, r3, #2 + 800a9c0: 2b00 cmp r3, #0 + 800a9c2: f000 8099 beq.w 800aaf8 + npcb = tcp_alloc(pcb->prio); + 800a9c6: 687b ldr r3, [r7, #4] + 800a9c8: 7d5b ldrb r3, [r3, #21] + 800a9ca: 4618 mov r0, r3 + 800a9cc: f7ff f956 bl 8009c7c + 800a9d0: 6178 str r0, [r7, #20] + if (npcb == NULL) { + 800a9d2: 697b ldr r3, [r7, #20] + 800a9d4: 2b00 cmp r3, #0 + 800a9d6: d111 bne.n 800a9fc + TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); + 800a9d8: 687b ldr r3, [r7, #4] + 800a9da: 699b ldr r3, [r3, #24] + 800a9dc: 2b00 cmp r3, #0 + 800a9de: d00a beq.n 800a9f6 + 800a9e0: 687b ldr r3, [r7, #4] + 800a9e2: 699b ldr r3, [r3, #24] + 800a9e4: 687a ldr r2, [r7, #4] + 800a9e6: 6910 ldr r0, [r2, #16] + 800a9e8: f04f 32ff mov.w r2, #4294967295 + 800a9ec: 2100 movs r1, #0 + 800a9ee: 4798 blx r3 + 800a9f0: 4603 mov r3, r0 + 800a9f2: 73bb strb r3, [r7, #14] + return; + 800a9f4: e081 b.n 800aafa + TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); + 800a9f6: 23f0 movs r3, #240 ; 0xf0 + 800a9f8: 73bb strb r3, [r7, #14] + return; + 800a9fa: e07e b.n 800aafa + ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); + 800a9fc: 4b47 ldr r3, [pc, #284] ; (800ab1c ) + 800a9fe: 695a ldr r2, [r3, #20] + 800aa00: 697b ldr r3, [r7, #20] + 800aa02: 601a str r2, [r3, #0] + ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); + 800aa04: 4b45 ldr r3, [pc, #276] ; (800ab1c ) + 800aa06: 691a ldr r2, [r3, #16] + 800aa08: 697b ldr r3, [r7, #20] + 800aa0a: 605a str r2, [r3, #4] + npcb->local_port = pcb->local_port; + 800aa0c: 687b ldr r3, [r7, #4] + 800aa0e: 8ada ldrh r2, [r3, #22] + 800aa10: 697b ldr r3, [r7, #20] + 800aa12: 82da strh r2, [r3, #22] + npcb->remote_port = tcphdr->src; + 800aa14: 4b3e ldr r3, [pc, #248] ; (800ab10 ) + 800aa16: 681b ldr r3, [r3, #0] + 800aa18: 881b ldrh r3, [r3, #0] + 800aa1a: b29a uxth r2, r3 + 800aa1c: 697b ldr r3, [r7, #20] + 800aa1e: 831a strh r2, [r3, #24] + npcb->state = SYN_RCVD; + 800aa20: 697b ldr r3, [r7, #20] + 800aa22: 2203 movs r2, #3 + 800aa24: 751a strb r2, [r3, #20] + npcb->rcv_nxt = seqno + 1; + 800aa26: 4b39 ldr r3, [pc, #228] ; (800ab0c ) + 800aa28: 681b ldr r3, [r3, #0] + 800aa2a: 1c5a adds r2, r3, #1 + 800aa2c: 697b ldr r3, [r7, #20] + 800aa2e: 625a str r2, [r3, #36] ; 0x24 + npcb->rcv_ann_right_edge = npcb->rcv_nxt; + 800aa30: 697b ldr r3, [r7, #20] + 800aa32: 6a5a ldr r2, [r3, #36] ; 0x24 + 800aa34: 697b ldr r3, [r7, #20] + 800aa36: 62da str r2, [r3, #44] ; 0x2c + iss = tcp_next_iss(npcb); + 800aa38: 6978 ldr r0, [r7, #20] + 800aa3a: f7ff faff bl 800a03c + 800aa3e: 6138 str r0, [r7, #16] + npcb->snd_wl2 = iss; + 800aa40: 697b ldr r3, [r7, #20] + 800aa42: 693a ldr r2, [r7, #16] + 800aa44: 655a str r2, [r3, #84] ; 0x54 + npcb->snd_nxt = iss; + 800aa46: 697b ldr r3, [r7, #20] + 800aa48: 693a ldr r2, [r7, #16] + 800aa4a: 64da str r2, [r3, #76] ; 0x4c + npcb->lastack = iss; + 800aa4c: 697b ldr r3, [r7, #20] + 800aa4e: 693a ldr r2, [r7, #16] + 800aa50: 645a str r2, [r3, #68] ; 0x44 + npcb->snd_lbb = iss; + 800aa52: 697b ldr r3, [r7, #20] + 800aa54: 693a ldr r2, [r7, #16] + 800aa56: 659a str r2, [r3, #88] ; 0x58 + npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ + 800aa58: 4b2c ldr r3, [pc, #176] ; (800ab0c ) + 800aa5a: 681b ldr r3, [r3, #0] + 800aa5c: 1e5a subs r2, r3, #1 + 800aa5e: 697b ldr r3, [r7, #20] + 800aa60: 651a str r2, [r3, #80] ; 0x50 + npcb->callback_arg = pcb->callback_arg; + 800aa62: 687b ldr r3, [r7, #4] + 800aa64: 691a ldr r2, [r3, #16] + 800aa66: 697b ldr r3, [r7, #20] + 800aa68: 611a str r2, [r3, #16] + npcb->listener = pcb; + 800aa6a: 697b ldr r3, [r7, #20] + 800aa6c: 687a ldr r2, [r7, #4] + 800aa6e: 679a str r2, [r3, #120] ; 0x78 + npcb->so_options = pcb->so_options & SOF_INHERITED; + 800aa70: 687b ldr r3, [r7, #4] + 800aa72: 7a1b ldrb r3, [r3, #8] + 800aa74: f003 030c and.w r3, r3, #12 + 800aa78: b2da uxtb r2, r3 + 800aa7a: 697b ldr r3, [r7, #20] + 800aa7c: 721a strb r2, [r3, #8] + TCP_REG_ACTIVE(npcb); + 800aa7e: 4b28 ldr r3, [pc, #160] ; (800ab20 ) + 800aa80: 681a ldr r2, [r3, #0] + 800aa82: 697b ldr r3, [r7, #20] + 800aa84: 60da str r2, [r3, #12] + 800aa86: 4a26 ldr r2, [pc, #152] ; (800ab20 ) + 800aa88: 697b ldr r3, [r7, #20] + 800aa8a: 6013 str r3, [r2, #0] + 800aa8c: f003 f920 bl 800dcd0 + 800aa90: 4b24 ldr r3, [pc, #144] ; (800ab24 ) + 800aa92: 2201 movs r2, #1 + 800aa94: 701a strb r2, [r3, #0] + tcp_parseopt(npcb); + 800aa96: 6978 ldr r0, [r7, #20] + 800aa98: f001 fd0c bl 800c4b4 + npcb->snd_wnd = tcphdr->wnd; + 800aa9c: 4b1c ldr r3, [pc, #112] ; (800ab10 ) + 800aa9e: 681b ldr r3, [r3, #0] + 800aaa0: 89db ldrh r3, [r3, #14] + 800aaa2: b29a uxth r2, r3 + 800aaa4: 697b ldr r3, [r7, #20] + 800aaa6: f8a3 205c strh.w r2, [r3, #92] ; 0x5c + npcb->snd_wnd_max = npcb->snd_wnd; + 800aaaa: 697b ldr r3, [r7, #20] + 800aaac: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c + 800aab0: 697b ldr r3, [r7, #20] + 800aab2: f8a3 205e strh.w r2, [r3, #94] ; 0x5e + npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); + 800aab6: 697b ldr r3, [r7, #20] + 800aab8: 8e5a ldrh r2, [r3, #50] ; 0x32 + 800aaba: 697b ldr r3, [r7, #20] + 800aabc: 3304 adds r3, #4 + 800aabe: 4619 mov r1, r3 + 800aac0: 4610 mov r0, r2 + 800aac2: f7ff fad1 bl 800a068 + 800aac6: 4603 mov r3, r0 + 800aac8: 461a mov r2, r3 + 800aaca: 697b ldr r3, [r7, #20] + 800aacc: 865a strh r2, [r3, #50] ; 0x32 + rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); + 800aace: 2112 movs r1, #18 + 800aad0: 6978 ldr r0, [r7, #20] + 800aad2: f002 fad9 bl 800d088 + 800aad6: 4603 mov r3, r0 + 800aad8: 73fb strb r3, [r7, #15] + if (rc != ERR_OK) { + 800aada: f997 300f ldrsb.w r3, [r7, #15] + 800aade: 2b00 cmp r3, #0 + 800aae0: d004 beq.n 800aaec + tcp_abandon(npcb, 0); + 800aae2: 2100 movs r1, #0 + 800aae4: 6978 ldr r0, [r7, #20] + 800aae6: f7fe f8e3 bl 8008cb0 + return; + 800aaea: e006 b.n 800aafa + tcp_output(npcb); + 800aaec: 6978 ldr r0, [r7, #20] + 800aaee: f002 fc23 bl 800d338 + return; + 800aaf2: e001 b.n 800aaf8 + return; + 800aaf4: bf00 nop + 800aaf6: e000 b.n 800aafa + return; + 800aaf8: bf00 nop +} + 800aafa: 3718 adds r7, #24 + 800aafc: 46bd mov sp, r7 + 800aafe: bd80 pop {r7, pc} + 800ab00: 20006fac .word 0x20006fac + 800ab04: 20006fa4 .word 0x20006fa4 + 800ab08: 20006faa .word 0x20006faa + 800ab0c: 20006fa0 .word 0x20006fa0 + 800ab10: 20006f90 .word 0x20006f90 + 800ab14: 200039fc .word 0x200039fc + 800ab18: 20003a00 .word 0x20003a00 + 800ab1c: 200039ec .word 0x200039ec + 800ab20: 20006f74 .word 0x20006f74 + 800ab24: 20006f7c .word 0x20006f7c + +0800ab28 : + * @note the segment which arrived is saved in global variables, therefore only the pcb + * involved is passed as a parameter to this function + */ +static void +tcp_timewait_input(struct tcp_pcb *pcb) +{ + 800ab28: b580 push {r7, lr} + 800ab2a: b084 sub sp, #16 + 800ab2c: af02 add r7, sp, #8 + 800ab2e: 6078 str r0, [r7, #4] + /* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */ + /* RFC 793 3.9 Event Processing - Segment Arrives: + * - first check sequence number - we skip that one in TIME_WAIT (always + * acceptable since we only send ACKs) + * - second check the RST bit (... return) */ + if (flags & TCP_RST) { + 800ab30: 4b29 ldr r3, [pc, #164] ; (800abd8 ) + 800ab32: 781b ldrb r3, [r3, #0] + 800ab34: f003 0304 and.w r3, r3, #4 + 800ab38: 2b00 cmp r3, #0 + 800ab3a: d146 bne.n 800abca + return; + } + /* - fourth, check the SYN bit, */ + if (flags & TCP_SYN) { + 800ab3c: 4b26 ldr r3, [pc, #152] ; (800abd8 ) + 800ab3e: 781b ldrb r3, [r3, #0] + 800ab40: f003 0302 and.w r3, r3, #2 + 800ab44: 2b00 cmp r3, #0 + 800ab46: d027 beq.n 800ab98 + /* If an incoming segment is not acceptable, an acknowledgment + should be sent in reply */ + if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) { + 800ab48: 4b24 ldr r3, [pc, #144] ; (800abdc ) + 800ab4a: 681a ldr r2, [r3, #0] + 800ab4c: 687b ldr r3, [r7, #4] + 800ab4e: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ab50: 1ad3 subs r3, r2, r3 + 800ab52: 2b00 cmp r3, #0 + 800ab54: db2a blt.n 800abac + 800ab56: 4b21 ldr r3, [pc, #132] ; (800abdc ) + 800ab58: 681a ldr r2, [r3, #0] + 800ab5a: 687b ldr r3, [r7, #4] + 800ab5c: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ab5e: 6879 ldr r1, [r7, #4] + 800ab60: 8d09 ldrh r1, [r1, #40] ; 0x28 + 800ab62: 440b add r3, r1 + 800ab64: 1ad3 subs r3, r2, r3 + 800ab66: 2b00 cmp r3, #0 + 800ab68: dc20 bgt.n 800abac + /* If the SYN is in the window it is an error, send a reset */ + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800ab6a: 4b1d ldr r3, [pc, #116] ; (800abe0 ) + 800ab6c: 6818 ldr r0, [r3, #0] + 800ab6e: 4b1d ldr r3, [pc, #116] ; (800abe4 ) + 800ab70: 881b ldrh r3, [r3, #0] + 800ab72: 461a mov r2, r3 + 800ab74: 4b19 ldr r3, [pc, #100] ; (800abdc ) + 800ab76: 681b ldr r3, [r3, #0] + 800ab78: 18d1 adds r1, r2, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800ab7a: 4b1b ldr r3, [pc, #108] ; (800abe8 ) + 800ab7c: 681b ldr r3, [r3, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800ab7e: 885b ldrh r3, [r3, #2] + 800ab80: b29b uxth r3, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800ab82: 4a19 ldr r2, [pc, #100] ; (800abe8 ) + 800ab84: 6812 ldr r2, [r2, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800ab86: 8812 ldrh r2, [r2, #0] + 800ab88: b292 uxth r2, r2 + 800ab8a: 9201 str r2, [sp, #4] + 800ab8c: 9300 str r3, [sp, #0] + 800ab8e: 4b17 ldr r3, [pc, #92] ; (800abec ) + 800ab90: 4a17 ldr r2, [pc, #92] ; (800abf0 ) + 800ab92: f002 fe55 bl 800d840 + return; + 800ab96: e01b b.n 800abd0 + } + } else if (flags & TCP_FIN) { + 800ab98: 4b0f ldr r3, [pc, #60] ; (800abd8 ) + 800ab9a: 781b ldrb r3, [r3, #0] + 800ab9c: f003 0301 and.w r3, r3, #1 + 800aba0: 2b00 cmp r3, #0 + 800aba2: d003 beq.n 800abac + /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. + Restart the 2 MSL time-wait timeout.*/ + pcb->tmr = tcp_ticks; + 800aba4: 4b13 ldr r3, [pc, #76] ; (800abf4 ) + 800aba6: 681a ldr r2, [r3, #0] + 800aba8: 687b ldr r3, [r7, #4] + 800abaa: 621a str r2, [r3, #32] + } + + if ((tcplen > 0)) { + 800abac: 4b0d ldr r3, [pc, #52] ; (800abe4 ) + 800abae: 881b ldrh r3, [r3, #0] + 800abb0: 2b00 cmp r3, #0 + 800abb2: d00c beq.n 800abce + /* Acknowledge data, FIN or out-of-window SYN */ + pcb->flags |= TF_ACK_NOW; + 800abb4: 687b ldr r3, [r7, #4] + 800abb6: 7e9b ldrb r3, [r3, #26] + 800abb8: f043 0302 orr.w r3, r3, #2 + 800abbc: b2da uxtb r2, r3 + 800abbe: 687b ldr r3, [r7, #4] + 800abc0: 769a strb r2, [r3, #26] + tcp_output(pcb); + 800abc2: 6878 ldr r0, [r7, #4] + 800abc4: f002 fbb8 bl 800d338 + } + return; + 800abc8: e001 b.n 800abce + return; + 800abca: bf00 nop + 800abcc: e000 b.n 800abd0 + return; + 800abce: bf00 nop +} + 800abd0: 3708 adds r7, #8 + 800abd2: 46bd mov sp, r7 + 800abd4: bd80 pop {r7, pc} + 800abd6: bf00 nop + 800abd8: 20006fac .word 0x20006fac + 800abdc: 20006fa0 .word 0x20006fa0 + 800abe0: 20006fa4 .word 0x20006fa4 + 800abe4: 20006faa .word 0x20006faa + 800abe8: 20006f90 .word 0x20006f90 + 800abec: 200039fc .word 0x200039fc + 800abf0: 20003a00 .word 0x20003a00 + 800abf4: 20006f68 .word 0x20006f68 + +0800abf8 : + * @note the segment which arrived is saved in global variables, therefore only the pcb + * involved is passed as a parameter to this function + */ +static err_t +tcp_process(struct tcp_pcb *pcb) +{ + 800abf8: b580 push {r7, lr} + 800abfa: b08a sub sp, #40 ; 0x28 + 800abfc: af02 add r7, sp, #8 + 800abfe: 6078 str r0, [r7, #4] + struct tcp_seg *rseg; + u8_t acceptable = 0; + 800ac00: 2300 movs r3, #0 + 800ac02: 76fb strb r3, [r7, #27] + err_t err; + + err = ERR_OK; + 800ac04: 2300 movs r3, #0 + 800ac06: 76bb strb r3, [r7, #26] + + /* Process incoming RST segments. */ + if (flags & TCP_RST) { + 800ac08: 4b93 ldr r3, [pc, #588] ; (800ae58 ) + 800ac0a: 781b ldrb r3, [r3, #0] + 800ac0c: f003 0304 and.w r3, r3, #4 + 800ac10: 2b00 cmp r3, #0 + 800ac12: d04e beq.n 800acb2 + /* First, determine if the reset is acceptable. */ + if (pcb->state == SYN_SENT) { + 800ac14: 687b ldr r3, [r7, #4] + 800ac16: 7d1b ldrb r3, [r3, #20] + 800ac18: 2b02 cmp r3, #2 + 800ac1a: d108 bne.n 800ac2e + /* "In the SYN-SENT state (a RST received in response to an initial SYN), + the RST is acceptable if the ACK field acknowledges the SYN." */ + if (ackno == pcb->snd_nxt) { + 800ac1c: 687b ldr r3, [r7, #4] + 800ac1e: 6cda ldr r2, [r3, #76] ; 0x4c + 800ac20: 4b8e ldr r3, [pc, #568] ; (800ae5c ) + 800ac22: 681b ldr r3, [r3, #0] + 800ac24: 429a cmp r2, r3 + 800ac26: d123 bne.n 800ac70 + acceptable = 1; + 800ac28: 2301 movs r3, #1 + 800ac2a: 76fb strb r3, [r7, #27] + 800ac2c: e020 b.n 800ac70 + } + } else { + /* "In all states except SYN-SENT, all reset (RST) segments are validated + by checking their SEQ-fields." */ + if (seqno == pcb->rcv_nxt) { + 800ac2e: 687b ldr r3, [r7, #4] + 800ac30: 6a5a ldr r2, [r3, #36] ; 0x24 + 800ac32: 4b8b ldr r3, [pc, #556] ; (800ae60 ) + 800ac34: 681b ldr r3, [r3, #0] + 800ac36: 429a cmp r2, r3 + 800ac38: d102 bne.n 800ac40 + acceptable = 1; + 800ac3a: 2301 movs r3, #1 + 800ac3c: 76fb strb r3, [r7, #27] + 800ac3e: e017 b.n 800ac70 + } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, + 800ac40: 4b87 ldr r3, [pc, #540] ; (800ae60 ) + 800ac42: 681a ldr r2, [r3, #0] + 800ac44: 687b ldr r3, [r7, #4] + 800ac46: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ac48: 1ad3 subs r3, r2, r3 + 800ac4a: 2b00 cmp r3, #0 + 800ac4c: db10 blt.n 800ac70 + 800ac4e: 4b84 ldr r3, [pc, #528] ; (800ae60 ) + 800ac50: 681a ldr r2, [r3, #0] + 800ac52: 687b ldr r3, [r7, #4] + 800ac54: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ac56: 6879 ldr r1, [r7, #4] + 800ac58: 8d09 ldrh r1, [r1, #40] ; 0x28 + 800ac5a: 440b add r3, r1 + 800ac5c: 1ad3 subs r3, r2, r3 + 800ac5e: 2b00 cmp r3, #0 + 800ac60: dc06 bgt.n 800ac70 + pcb->rcv_nxt + pcb->rcv_wnd)) { + /* If the sequence number is inside the window, we only send an ACK + and wait for a re-send with matching sequence number. + This violates RFC 793, but is required to protection against + CVE-2004-0230 (RST spoofing attack). */ + tcp_ack_now(pcb); + 800ac62: 687b ldr r3, [r7, #4] + 800ac64: 7e9b ldrb r3, [r3, #26] + 800ac66: f043 0302 orr.w r3, r3, #2 + 800ac6a: b2da uxtb r2, r3 + 800ac6c: 687b ldr r3, [r7, #4] + 800ac6e: 769a strb r2, [r3, #26] + } + } + + if (acceptable) { + 800ac70: 7efb ldrb r3, [r7, #27] + 800ac72: 2b00 cmp r3, #0 + 800ac74: d01b beq.n 800acae + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); + LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); + 800ac76: 687b ldr r3, [r7, #4] + 800ac78: 7d1b ldrb r3, [r3, #20] + 800ac7a: 2b00 cmp r3, #0 + 800ac7c: d106 bne.n 800ac8c + 800ac7e: 4b79 ldr r3, [pc, #484] ; (800ae64 ) + 800ac80: f240 22e7 movw r2, #743 ; 0x2e7 + 800ac84: 4978 ldr r1, [pc, #480] ; (800ae68 ) + 800ac86: 4879 ldr r0, [pc, #484] ; (800ae6c ) + 800ac88: f008 f87c bl 8012d84 + recv_flags |= TF_RESET; + 800ac8c: 4b78 ldr r3, [pc, #480] ; (800ae70 ) + 800ac8e: 781b ldrb r3, [r3, #0] + 800ac90: f043 0308 orr.w r3, r3, #8 + 800ac94: b2da uxtb r2, r3 + 800ac96: 4b76 ldr r3, [pc, #472] ; (800ae70 ) + 800ac98: 701a strb r2, [r3, #0] + pcb->flags &= ~TF_ACK_DELAY; + 800ac9a: 687b ldr r3, [r7, #4] + 800ac9c: 7e9b ldrb r3, [r3, #26] + 800ac9e: f023 0301 bic.w r3, r3, #1 + 800aca2: b2da uxtb r2, r3 + 800aca4: 687b ldr r3, [r7, #4] + 800aca6: 769a strb r2, [r3, #26] + return ERR_RST; + 800aca8: f06f 030d mvn.w r3, #13 + 800acac: e348 b.n 800b340 + } else { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", + seqno, pcb->rcv_nxt)); + LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", + seqno, pcb->rcv_nxt)); + return ERR_OK; + 800acae: 2300 movs r3, #0 + 800acb0: e346 b.n 800b340 + } + } + + if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { + 800acb2: 4b69 ldr r3, [pc, #420] ; (800ae58 ) + 800acb4: 781b ldrb r3, [r3, #0] + 800acb6: f003 0302 and.w r3, r3, #2 + 800acba: 2b00 cmp r3, #0 + 800acbc: d010 beq.n 800ace0 + 800acbe: 687b ldr r3, [r7, #4] + 800acc0: 7d1b ldrb r3, [r3, #20] + 800acc2: 2b02 cmp r3, #2 + 800acc4: d00c beq.n 800ace0 + 800acc6: 687b ldr r3, [r7, #4] + 800acc8: 7d1b ldrb r3, [r3, #20] + 800acca: 2b03 cmp r3, #3 + 800accc: d008 beq.n 800ace0 + /* Cope with new connection attempt after remote end crashed */ + tcp_ack_now(pcb); + 800acce: 687b ldr r3, [r7, #4] + 800acd0: 7e9b ldrb r3, [r3, #26] + 800acd2: f043 0302 orr.w r3, r3, #2 + 800acd6: b2da uxtb r2, r3 + 800acd8: 687b ldr r3, [r7, #4] + 800acda: 769a strb r2, [r3, #26] + return ERR_OK; + 800acdc: 2300 movs r3, #0 + 800acde: e32f b.n 800b340 + } + + if ((pcb->flags & TF_RXCLOSED) == 0) { + 800ace0: 687b ldr r3, [r7, #4] + 800ace2: 7e9b ldrb r3, [r3, #26] + 800ace4: f003 0310 and.w r3, r3, #16 + 800ace8: 2b00 cmp r3, #0 + 800acea: d103 bne.n 800acf4 + /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ + pcb->tmr = tcp_ticks; + 800acec: 4b61 ldr r3, [pc, #388] ; (800ae74 ) + 800acee: 681a ldr r2, [r3, #0] + 800acf0: 687b ldr r3, [r7, #4] + 800acf2: 621a str r2, [r3, #32] + } + pcb->keep_cnt_sent = 0; + 800acf4: 687b ldr r3, [r7, #4] + 800acf6: 2200 movs r2, #0 + 800acf8: f883 2096 strb.w r2, [r3, #150] ; 0x96 + + tcp_parseopt(pcb); + 800acfc: 6878 ldr r0, [r7, #4] + 800acfe: f001 fbd9 bl 800c4b4 + + /* Do different things depending on the TCP state. */ + switch (pcb->state) { + 800ad02: 687b ldr r3, [r7, #4] + 800ad04: 7d1b ldrb r3, [r3, #20] + 800ad06: 3b02 subs r3, #2 + 800ad08: 2b07 cmp r3, #7 + 800ad0a: f200 8309 bhi.w 800b320 + 800ad0e: a201 add r2, pc, #4 ; (adr r2, 800ad14 ) + 800ad10: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 800ad14: 0800ad35 .word 0x0800ad35 + 800ad18: 0800af2b .word 0x0800af2b + 800ad1c: 0800b083 .word 0x0800b083 + 800ad20: 0800b0ad .word 0x0800b0ad + 800ad24: 0800b1cf .word 0x0800b1cf + 800ad28: 0800b083 .word 0x0800b083 + 800ad2c: 0800b25b .word 0x0800b25b + 800ad30: 0800b2eb .word 0x0800b2eb + case SYN_SENT: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, + pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno))); + /* received SYN ACK with expected sequence number? */ + if ((flags & TCP_ACK) && (flags & TCP_SYN) + 800ad34: 4b48 ldr r3, [pc, #288] ; (800ae58 ) + 800ad36: 781b ldrb r3, [r3, #0] + 800ad38: f003 0310 and.w r3, r3, #16 + 800ad3c: 2b00 cmp r3, #0 + 800ad3e: f000 80ca beq.w 800aed6 + 800ad42: 4b45 ldr r3, [pc, #276] ; (800ae58 ) + 800ad44: 781b ldrb r3, [r3, #0] + 800ad46: f003 0302 and.w r3, r3, #2 + 800ad4a: 2b00 cmp r3, #0 + 800ad4c: f000 80c3 beq.w 800aed6 + && (ackno == pcb->lastack + 1)) { + 800ad50: 687b ldr r3, [r7, #4] + 800ad52: 6c5b ldr r3, [r3, #68] ; 0x44 + 800ad54: 1c5a adds r2, r3, #1 + 800ad56: 4b41 ldr r3, [pc, #260] ; (800ae5c ) + 800ad58: 681b ldr r3, [r3, #0] + 800ad5a: 429a cmp r2, r3 + 800ad5c: f040 80bb bne.w 800aed6 + pcb->rcv_nxt = seqno + 1; + 800ad60: 4b3f ldr r3, [pc, #252] ; (800ae60 ) + 800ad62: 681b ldr r3, [r3, #0] + 800ad64: 1c5a adds r2, r3, #1 + 800ad66: 687b ldr r3, [r7, #4] + 800ad68: 625a str r2, [r3, #36] ; 0x24 + pcb->rcv_ann_right_edge = pcb->rcv_nxt; + 800ad6a: 687b ldr r3, [r7, #4] + 800ad6c: 6a5a ldr r2, [r3, #36] ; 0x24 + 800ad6e: 687b ldr r3, [r7, #4] + 800ad70: 62da str r2, [r3, #44] ; 0x2c + pcb->lastack = ackno; + 800ad72: 4b3a ldr r3, [pc, #232] ; (800ae5c ) + 800ad74: 681a ldr r2, [r3, #0] + 800ad76: 687b ldr r3, [r7, #4] + 800ad78: 645a str r2, [r3, #68] ; 0x44 + pcb->snd_wnd = tcphdr->wnd; + 800ad7a: 4b3f ldr r3, [pc, #252] ; (800ae78 ) + 800ad7c: 681b ldr r3, [r3, #0] + 800ad7e: 89db ldrh r3, [r3, #14] + 800ad80: b29a uxth r2, r3 + 800ad82: 687b ldr r3, [r7, #4] + 800ad84: f8a3 205c strh.w r2, [r3, #92] ; 0x5c + pcb->snd_wnd_max = pcb->snd_wnd; + 800ad88: 687b ldr r3, [r7, #4] + 800ad8a: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c + 800ad8e: 687b ldr r3, [r7, #4] + 800ad90: f8a3 205e strh.w r2, [r3, #94] ; 0x5e + pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ + 800ad94: 4b32 ldr r3, [pc, #200] ; (800ae60 ) + 800ad96: 681b ldr r3, [r3, #0] + 800ad98: 1e5a subs r2, r3, #1 + 800ad9a: 687b ldr r3, [r7, #4] + 800ad9c: 651a str r2, [r3, #80] ; 0x50 + pcb->state = ESTABLISHED; + 800ad9e: 687b ldr r3, [r7, #4] + 800ada0: 2204 movs r2, #4 + 800ada2: 751a strb r2, [r3, #20] + +#if TCP_CALCULATE_EFF_SEND_MSS + pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); + 800ada4: 687b ldr r3, [r7, #4] + 800ada6: 8e5a ldrh r2, [r3, #50] ; 0x32 + 800ada8: 687b ldr r3, [r7, #4] + 800adaa: 3304 adds r3, #4 + 800adac: 4619 mov r1, r3 + 800adae: 4610 mov r0, r2 + 800adb0: f7ff f95a bl 800a068 + 800adb4: 4603 mov r3, r0 + 800adb6: 461a mov r2, r3 + 800adb8: 687b ldr r3, [r7, #4] + 800adba: 865a strh r2, [r3, #50] ; 0x32 +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + + pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); + 800adbc: 687b ldr r3, [r7, #4] + 800adbe: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800adc0: 005b lsls r3, r3, #1 + 800adc2: f241 121c movw r2, #4380 ; 0x111c + 800adc6: 429a cmp r2, r3 + 800adc8: bf38 it cc + 800adca: 461a movcc r2, r3 + 800adcc: 687b ldr r3, [r7, #4] + 800adce: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800add0: 009b lsls r3, r3, #2 + 800add2: 4293 cmp r3, r2 + 800add4: bf28 it cs + 800add6: 4613 movcs r3, r2 + 800add8: b29a uxth r2, r3 + 800adda: 687b ldr r3, [r7, #4] + 800addc: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); + 800ade0: 687b ldr r3, [r7, #4] + 800ade2: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800ade6: 2b00 cmp r3, #0 + 800ade8: d106 bne.n 800adf8 + 800adea: 4b1e ldr r3, [pc, #120] ; (800ae64 ) + 800adec: f240 321a movw r2, #794 ; 0x31a + 800adf0: 4922 ldr r1, [pc, #136] ; (800ae7c ) + 800adf2: 481e ldr r0, [pc, #120] ; (800ae6c ) + 800adf4: f007 ffc6 bl 8012d84 + --pcb->snd_queuelen; + 800adf8: 687b ldr r3, [r7, #4] + 800adfa: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800adfe: 3b01 subs r3, #1 + 800ae00: b29a uxth r2, r3 + 800ae02: 687b ldr r3, [r7, #4] + 800ae04: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); + rseg = pcb->unacked; + 800ae08: 687b ldr r3, [r7, #4] + 800ae0a: 6edb ldr r3, [r3, #108] ; 0x6c + 800ae0c: 61fb str r3, [r7, #28] + if (rseg == NULL) { + 800ae0e: 69fb ldr r3, [r7, #28] + 800ae10: 2b00 cmp r3, #0 + 800ae12: d111 bne.n 800ae38 + /* might happen if tcp_output fails in tcp_rexmit_rto() + in which case the segment is on the unsent list */ + rseg = pcb->unsent; + 800ae14: 687b ldr r3, [r7, #4] + 800ae16: 6e9b ldr r3, [r3, #104] ; 0x68 + 800ae18: 61fb str r3, [r7, #28] + LWIP_ASSERT("no segment to free", rseg != NULL); + 800ae1a: 69fb ldr r3, [r7, #28] + 800ae1c: 2b00 cmp r3, #0 + 800ae1e: d106 bne.n 800ae2e + 800ae20: 4b10 ldr r3, [pc, #64] ; (800ae64 ) + 800ae22: f240 3222 movw r2, #802 ; 0x322 + 800ae26: 4916 ldr r1, [pc, #88] ; (800ae80 ) + 800ae28: 4810 ldr r0, [pc, #64] ; (800ae6c ) + 800ae2a: f007 ffab bl 8012d84 + pcb->unsent = rseg->next; + 800ae2e: 69fb ldr r3, [r7, #28] + 800ae30: 681a ldr r2, [r3, #0] + 800ae32: 687b ldr r3, [r7, #4] + 800ae34: 669a str r2, [r3, #104] ; 0x68 + 800ae36: e003 b.n 800ae40 + } else { + pcb->unacked = rseg->next; + 800ae38: 69fb ldr r3, [r7, #28] + 800ae3a: 681a ldr r2, [r3, #0] + 800ae3c: 687b ldr r3, [r7, #4] + 800ae3e: 66da str r2, [r3, #108] ; 0x6c + } + tcp_seg_free(rseg); + 800ae40: 69f8 ldr r0, [r7, #28] + 800ae42: f7fe fe09 bl 8009a58 + + /* If there's nothing left to acknowledge, stop the retransmit + timer, otherwise reset it to start again */ + if (pcb->unacked == NULL) { + 800ae46: 687b ldr r3, [r7, #4] + 800ae48: 6edb ldr r3, [r3, #108] ; 0x6c + 800ae4a: 2b00 cmp r3, #0 + 800ae4c: d11a bne.n 800ae84 + pcb->rtime = -1; + 800ae4e: 687b ldr r3, [r7, #4] + 800ae50: f64f 72ff movw r2, #65535 ; 0xffff + 800ae54: 861a strh r2, [r3, #48] ; 0x30 + 800ae56: e01c b.n 800ae92 + 800ae58: 20006fac .word 0x20006fac + 800ae5c: 20006fa4 .word 0x20006fa4 + 800ae60: 20006fa0 .word 0x20006fa0 + 800ae64: 08015180 .word 0x08015180 + 800ae68: 08015338 .word 0x08015338 + 800ae6c: 080151c4 .word 0x080151c4 + 800ae70: 20006fad .word 0x20006fad + 800ae74: 20006f68 .word 0x20006f68 + 800ae78: 20006f90 .word 0x20006f90 + 800ae7c: 08015358 .word 0x08015358 + 800ae80: 08015370 .word 0x08015370 + } else { + pcb->rtime = 0; + 800ae84: 687b ldr r3, [r7, #4] + 800ae86: 2200 movs r2, #0 + 800ae88: 861a strh r2, [r3, #48] ; 0x30 + pcb->nrtx = 0; + 800ae8a: 687b ldr r3, [r7, #4] + 800ae8c: 2200 movs r2, #0 + 800ae8e: f883 2042 strb.w r2, [r3, #66] ; 0x42 + } + + /* Call the user specified function to call when successfully + * connected. */ + TCP_EVENT_CONNECTED(pcb, ERR_OK, err); + 800ae92: 687b ldr r3, [r7, #4] + 800ae94: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 + 800ae98: 2b00 cmp r3, #0 + 800ae9a: d00a beq.n 800aeb2 + 800ae9c: 687b ldr r3, [r7, #4] + 800ae9e: f8d3 3084 ldr.w r3, [r3, #132] ; 0x84 + 800aea2: 687a ldr r2, [r7, #4] + 800aea4: 6910 ldr r0, [r2, #16] + 800aea6: 2200 movs r2, #0 + 800aea8: 6879 ldr r1, [r7, #4] + 800aeaa: 4798 blx r3 + 800aeac: 4603 mov r3, r0 + 800aeae: 76bb strb r3, [r7, #26] + 800aeb0: e001 b.n 800aeb6 + 800aeb2: 2300 movs r3, #0 + 800aeb4: 76bb strb r3, [r7, #26] + if (err == ERR_ABRT) { + 800aeb6: f997 301a ldrsb.w r3, [r7, #26] + 800aeba: f113 0f0d cmn.w r3, #13 + 800aebe: d102 bne.n 800aec6 + return ERR_ABRT; + 800aec0: f06f 030c mvn.w r3, #12 + 800aec4: e23c b.n 800b340 + } + tcp_ack_now(pcb); + 800aec6: 687b ldr r3, [r7, #4] + 800aec8: 7e9b ldrb r3, [r3, #26] + 800aeca: f043 0302 orr.w r3, r3, #2 + 800aece: b2da uxtb r2, r3 + 800aed0: 687b ldr r3, [r7, #4] + 800aed2: 769a strb r2, [r3, #26] + if (pcb->nrtx < TCP_SYNMAXRTX) { + pcb->rtime = 0; + tcp_rexmit_rto(pcb); + } + } + break; + 800aed4: e226 b.n 800b324 + else if (flags & TCP_ACK) { + 800aed6: 4b93 ldr r3, [pc, #588] ; (800b124 ) + 800aed8: 781b ldrb r3, [r3, #0] + 800aeda: f003 0310 and.w r3, r3, #16 + 800aede: 2b00 cmp r3, #0 + 800aee0: f000 8220 beq.w 800b324 + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800aee4: 4b90 ldr r3, [pc, #576] ; (800b128 ) + 800aee6: 6818 ldr r0, [r3, #0] + 800aee8: 4b90 ldr r3, [pc, #576] ; (800b12c ) + 800aeea: 881b ldrh r3, [r3, #0] + 800aeec: 461a mov r2, r3 + 800aeee: 4b90 ldr r3, [pc, #576] ; (800b130 ) + 800aef0: 681b ldr r3, [r3, #0] + 800aef2: 18d1 adds r1, r2, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800aef4: 4b8f ldr r3, [pc, #572] ; (800b134 ) + 800aef6: 681b ldr r3, [r3, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800aef8: 885b ldrh r3, [r3, #2] + 800aefa: b29b uxth r3, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800aefc: 4a8d ldr r2, [pc, #564] ; (800b134 ) + 800aefe: 6812 ldr r2, [r2, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800af00: 8812 ldrh r2, [r2, #0] + 800af02: b292 uxth r2, r2 + 800af04: 9201 str r2, [sp, #4] + 800af06: 9300 str r3, [sp, #0] + 800af08: 4b8b ldr r3, [pc, #556] ; (800b138 ) + 800af0a: 4a8c ldr r2, [pc, #560] ; (800b13c ) + 800af0c: f002 fc98 bl 800d840 + if (pcb->nrtx < TCP_SYNMAXRTX) { + 800af10: 687b ldr r3, [r7, #4] + 800af12: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 800af16: 2b05 cmp r3, #5 + 800af18: f200 8204 bhi.w 800b324 + pcb->rtime = 0; + 800af1c: 687b ldr r3, [r7, #4] + 800af1e: 2200 movs r2, #0 + 800af20: 861a strh r2, [r3, #48] ; 0x30 + tcp_rexmit_rto(pcb); + 800af22: 6878 ldr r0, [r7, #4] + 800af24: f002 fd02 bl 800d92c + break; + 800af28: e1fc b.n 800b324 + case SYN_RCVD: + if (flags & TCP_ACK) { + 800af2a: 4b7e ldr r3, [pc, #504] ; (800b124 ) + 800af2c: 781b ldrb r3, [r3, #0] + 800af2e: f003 0310 and.w r3, r3, #16 + 800af32: 2b00 cmp r3, #0 + 800af34: f000 8091 beq.w 800b05a + /* expected ACK number? */ + if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { + 800af38: 4b7b ldr r3, [pc, #492] ; (800b128 ) + 800af3a: 681a ldr r2, [r3, #0] + 800af3c: 687b ldr r3, [r7, #4] + 800af3e: 6c5b ldr r3, [r3, #68] ; 0x44 + 800af40: 1ad3 subs r3, r2, r3 + 800af42: 3b01 subs r3, #1 + 800af44: 2b00 cmp r3, #0 + 800af46: db71 blt.n 800b02c + 800af48: 4b77 ldr r3, [pc, #476] ; (800b128 ) + 800af4a: 681a ldr r2, [r3, #0] + 800af4c: 687b ldr r3, [r7, #4] + 800af4e: 6cdb ldr r3, [r3, #76] ; 0x4c + 800af50: 1ad3 subs r3, r2, r3 + 800af52: 2b00 cmp r3, #0 + 800af54: dc6a bgt.n 800b02c + pcb->state = ESTABLISHED; + 800af56: 687b ldr r3, [r7, #4] + 800af58: 2204 movs r2, #4 + 800af5a: 751a strb r2, [r3, #20] + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG +#if LWIP_CALLBACK_API + LWIP_ASSERT("pcb->listener->accept != NULL", + 800af5c: 687b ldr r3, [r7, #4] + 800af5e: 6f9b ldr r3, [r3, #120] ; 0x78 + 800af60: 2b00 cmp r3, #0 + 800af62: d00b beq.n 800af7c + 800af64: 687b ldr r3, [r7, #4] + 800af66: 6f9b ldr r3, [r3, #120] ; 0x78 + 800af68: 699b ldr r3, [r3, #24] + 800af6a: 2b00 cmp r3, #0 + 800af6c: d106 bne.n 800af7c + 800af6e: 4b74 ldr r3, [pc, #464] ; (800b140 ) + 800af70: f44f 7254 mov.w r2, #848 ; 0x350 + 800af74: 4973 ldr r1, [pc, #460] ; (800b144 ) + 800af76: 4874 ldr r0, [pc, #464] ; (800b148 ) + 800af78: f007 ff04 bl 8012d84 + (pcb->listener == NULL) || (pcb->listener->accept != NULL)); +#endif + if (pcb->listener == NULL) { + 800af7c: 687b ldr r3, [r7, #4] + 800af7e: 6f9b ldr r3, [r3, #120] ; 0x78 + 800af80: 2b00 cmp r3, #0 + 800af82: d102 bne.n 800af8a + /* listen pcb might be closed by now */ + err = ERR_VAL; + 800af84: 23fa movs r3, #250 ; 0xfa + 800af86: 76bb strb r3, [r7, #26] + 800af88: e011 b.n 800afae + } else +#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ + { + tcp_backlog_accepted(pcb); + /* Call the accept function. */ + TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); + 800af8a: 687b ldr r3, [r7, #4] + 800af8c: 6f9b ldr r3, [r3, #120] ; 0x78 + 800af8e: 699b ldr r3, [r3, #24] + 800af90: 2b00 cmp r3, #0 + 800af92: d00a beq.n 800afaa + 800af94: 687b ldr r3, [r7, #4] + 800af96: 6f9b ldr r3, [r3, #120] ; 0x78 + 800af98: 699b ldr r3, [r3, #24] + 800af9a: 687a ldr r2, [r7, #4] + 800af9c: 6910 ldr r0, [r2, #16] + 800af9e: 2200 movs r2, #0 + 800afa0: 6879 ldr r1, [r7, #4] + 800afa2: 4798 blx r3 + 800afa4: 4603 mov r3, r0 + 800afa6: 76bb strb r3, [r7, #26] + 800afa8: e001 b.n 800afae + 800afaa: 23f0 movs r3, #240 ; 0xf0 + 800afac: 76bb strb r3, [r7, #26] + } + if (err != ERR_OK) { + 800afae: f997 301a ldrsb.w r3, [r7, #26] + 800afb2: 2b00 cmp r3, #0 + 800afb4: d00a beq.n 800afcc + /* If the accept function returns with an error, we abort + * the connection. */ + /* Already aborted? */ + if (err != ERR_ABRT) { + 800afb6: f997 301a ldrsb.w r3, [r7, #26] + 800afba: f113 0f0d cmn.w r3, #13 + 800afbe: d002 beq.n 800afc6 + tcp_abort(pcb); + 800afc0: 6878 ldr r0, [r7, #4] + 800afc2: f7fd ff27 bl 8008e14 + } + return ERR_ABRT; + 800afc6: f06f 030c mvn.w r3, #12 + 800afca: e1b9 b.n 800b340 + } + /* If there was any data contained within this ACK, + * we'd better pass it on to the application as well. */ + tcp_receive(pcb); + 800afcc: 6878 ldr r0, [r7, #4] + 800afce: f000 fa3d bl 800b44c + + /* Prevent ACK for SYN to generate a sent event */ + if (recv_acked != 0) { + 800afd2: 4b5e ldr r3, [pc, #376] ; (800b14c ) + 800afd4: 881b ldrh r3, [r3, #0] + 800afd6: 2b00 cmp r3, #0 + 800afd8: d005 beq.n 800afe6 + recv_acked--; + 800afda: 4b5c ldr r3, [pc, #368] ; (800b14c ) + 800afdc: 881b ldrh r3, [r3, #0] + 800afde: 3b01 subs r3, #1 + 800afe0: b29a uxth r2, r3 + 800afe2: 4b5a ldr r3, [pc, #360] ; (800b14c ) + 800afe4: 801a strh r2, [r3, #0] + } + + pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); + 800afe6: 687b ldr r3, [r7, #4] + 800afe8: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800afea: 005b lsls r3, r3, #1 + 800afec: f241 121c movw r2, #4380 ; 0x111c + 800aff0: 429a cmp r2, r3 + 800aff2: bf38 it cc + 800aff4: 461a movcc r2, r3 + 800aff6: 687b ldr r3, [r7, #4] + 800aff8: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800affa: 009b lsls r3, r3, #2 + 800affc: 4293 cmp r3, r2 + 800affe: bf28 it cs + 800b000: 4613 movcs r3, r2 + 800b002: b29a uxth r2, r3 + 800b004: 687b ldr r3, [r7, #4] + 800b006: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + + if (recv_flags & TF_GOT_FIN) { + 800b00a: 4b51 ldr r3, [pc, #324] ; (800b150 ) + 800b00c: 781b ldrb r3, [r3, #0] + 800b00e: f003 0320 and.w r3, r3, #32 + 800b012: 2b00 cmp r3, #0 + 800b014: d034 beq.n 800b080 + tcp_ack_now(pcb); + 800b016: 687b ldr r3, [r7, #4] + 800b018: 7e9b ldrb r3, [r3, #26] + 800b01a: f043 0302 orr.w r3, r3, #2 + 800b01e: b2da uxtb r2, r3 + 800b020: 687b ldr r3, [r7, #4] + 800b022: 769a strb r2, [r3, #26] + pcb->state = CLOSE_WAIT; + 800b024: 687b ldr r3, [r7, #4] + 800b026: 2207 movs r2, #7 + 800b028: 751a strb r2, [r3, #20] + if (recv_flags & TF_GOT_FIN) { + 800b02a: e029 b.n 800b080 + } + } else { + /* incorrect ACK number, send RST */ + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800b02c: 4b3e ldr r3, [pc, #248] ; (800b128 ) + 800b02e: 6818 ldr r0, [r3, #0] + 800b030: 4b3e ldr r3, [pc, #248] ; (800b12c ) + 800b032: 881b ldrh r3, [r3, #0] + 800b034: 461a mov r2, r3 + 800b036: 4b3e ldr r3, [pc, #248] ; (800b130 ) + 800b038: 681b ldr r3, [r3, #0] + 800b03a: 18d1 adds r1, r2, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800b03c: 4b3d ldr r3, [pc, #244] ; (800b134 ) + 800b03e: 681b ldr r3, [r3, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800b040: 885b ldrh r3, [r3, #2] + 800b042: b29b uxth r3, r3 + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + 800b044: 4a3b ldr r2, [pc, #236] ; (800b134 ) + 800b046: 6812 ldr r2, [r2, #0] + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + 800b048: 8812 ldrh r2, [r2, #0] + 800b04a: b292 uxth r2, r2 + 800b04c: 9201 str r2, [sp, #4] + 800b04e: 9300 str r3, [sp, #0] + 800b050: 4b39 ldr r3, [pc, #228] ; (800b138 ) + 800b052: 4a3a ldr r2, [pc, #232] ; (800b13c ) + 800b054: f002 fbf4 bl 800d840 + } + } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { + /* Looks like another copy of the SYN - retransmit our SYN-ACK */ + tcp_rexmit(pcb); + } + break; + 800b058: e166 b.n 800b328 + } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { + 800b05a: 4b32 ldr r3, [pc, #200] ; (800b124 ) + 800b05c: 781b ldrb r3, [r3, #0] + 800b05e: f003 0302 and.w r3, r3, #2 + 800b062: 2b00 cmp r3, #0 + 800b064: f000 8160 beq.w 800b328 + 800b068: 687b ldr r3, [r7, #4] + 800b06a: 6a5b ldr r3, [r3, #36] ; 0x24 + 800b06c: 1e5a subs r2, r3, #1 + 800b06e: 4b30 ldr r3, [pc, #192] ; (800b130 ) + 800b070: 681b ldr r3, [r3, #0] + 800b072: 429a cmp r2, r3 + 800b074: f040 8158 bne.w 800b328 + tcp_rexmit(pcb); + 800b078: 6878 ldr r0, [r7, #4] + 800b07a: f002 fc8d bl 800d998 + break; + 800b07e: e153 b.n 800b328 + 800b080: e152 b.n 800b328 + case CLOSE_WAIT: + /* FALLTHROUGH */ + case ESTABLISHED: + tcp_receive(pcb); + 800b082: 6878 ldr r0, [r7, #4] + 800b084: f000 f9e2 bl 800b44c + if (recv_flags & TF_GOT_FIN) { /* passive close */ + 800b088: 4b31 ldr r3, [pc, #196] ; (800b150 ) + 800b08a: 781b ldrb r3, [r3, #0] + 800b08c: f003 0320 and.w r3, r3, #32 + 800b090: 2b00 cmp r3, #0 + 800b092: f000 814b beq.w 800b32c + tcp_ack_now(pcb); + 800b096: 687b ldr r3, [r7, #4] + 800b098: 7e9b ldrb r3, [r3, #26] + 800b09a: f043 0302 orr.w r3, r3, #2 + 800b09e: b2da uxtb r2, r3 + 800b0a0: 687b ldr r3, [r7, #4] + 800b0a2: 769a strb r2, [r3, #26] + pcb->state = CLOSE_WAIT; + 800b0a4: 687b ldr r3, [r7, #4] + 800b0a6: 2207 movs r2, #7 + 800b0a8: 751a strb r2, [r3, #20] + } + break; + 800b0aa: e13f b.n 800b32c + case FIN_WAIT_1: + tcp_receive(pcb); + 800b0ac: 6878 ldr r0, [r7, #4] + 800b0ae: f000 f9cd bl 800b44c + if (recv_flags & TF_GOT_FIN) { + 800b0b2: 4b27 ldr r3, [pc, #156] ; (800b150 ) + 800b0b4: 781b ldrb r3, [r3, #0] + 800b0b6: f003 0320 and.w r3, r3, #32 + 800b0ba: 2b00 cmp r3, #0 + 800b0bc: d070 beq.n 800b1a0 + if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + 800b0be: 4b19 ldr r3, [pc, #100] ; (800b124 ) + 800b0c0: 781b ldrb r3, [r3, #0] + 800b0c2: f003 0310 and.w r3, r3, #16 + 800b0c6: 2b00 cmp r3, #0 + 800b0c8: d05f beq.n 800b18a + 800b0ca: 687b ldr r3, [r7, #4] + 800b0cc: 6cda ldr r2, [r3, #76] ; 0x4c + 800b0ce: 4b16 ldr r3, [pc, #88] ; (800b128 ) + 800b0d0: 681b ldr r3, [r3, #0] + 800b0d2: 429a cmp r2, r3 + 800b0d4: d159 bne.n 800b18a + pcb->unsent == NULL) { + 800b0d6: 687b ldr r3, [r7, #4] + 800b0d8: 6e9b ldr r3, [r3, #104] ; 0x68 + if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + 800b0da: 2b00 cmp r3, #0 + 800b0dc: d155 bne.n 800b18a + LWIP_DEBUGF(TCP_DEBUG, + ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_ack_now(pcb); + 800b0de: 687b ldr r3, [r7, #4] + 800b0e0: 7e9b ldrb r3, [r3, #26] + 800b0e2: f043 0302 orr.w r3, r3, #2 + 800b0e6: b2da uxtb r2, r3 + 800b0e8: 687b ldr r3, [r7, #4] + 800b0ea: 769a strb r2, [r3, #26] + tcp_pcb_purge(pcb); + 800b0ec: 6878 ldr r0, [r7, #4] + 800b0ee: f7fe fee7 bl 8009ec0 + TCP_RMV_ACTIVE(pcb); + 800b0f2: 4b18 ldr r3, [pc, #96] ; (800b154 ) + 800b0f4: 681b ldr r3, [r3, #0] + 800b0f6: 687a ldr r2, [r7, #4] + 800b0f8: 429a cmp r2, r3 + 800b0fa: d105 bne.n 800b108 + 800b0fc: 4b15 ldr r3, [pc, #84] ; (800b154 ) + 800b0fe: 681b ldr r3, [r3, #0] + 800b100: 68db ldr r3, [r3, #12] + 800b102: 4a14 ldr r2, [pc, #80] ; (800b154 ) + 800b104: 6013 str r3, [r2, #0] + 800b106: e02d b.n 800b164 + 800b108: 4b12 ldr r3, [pc, #72] ; (800b154 ) + 800b10a: 681b ldr r3, [r3, #0] + 800b10c: 617b str r3, [r7, #20] + 800b10e: e026 b.n 800b15e + 800b110: 697b ldr r3, [r7, #20] + 800b112: 68db ldr r3, [r3, #12] + 800b114: 687a ldr r2, [r7, #4] + 800b116: 429a cmp r2, r3 + 800b118: d11e bne.n 800b158 + 800b11a: 687b ldr r3, [r7, #4] + 800b11c: 68da ldr r2, [r3, #12] + 800b11e: 697b ldr r3, [r7, #20] + 800b120: 60da str r2, [r3, #12] + 800b122: e01f b.n 800b164 + 800b124: 20006fac .word 0x20006fac + 800b128: 20006fa4 .word 0x20006fa4 + 800b12c: 20006faa .word 0x20006faa + 800b130: 20006fa0 .word 0x20006fa0 + 800b134: 20006f90 .word 0x20006f90 + 800b138: 200039fc .word 0x200039fc + 800b13c: 20003a00 .word 0x20003a00 + 800b140: 08015180 .word 0x08015180 + 800b144: 08015384 .word 0x08015384 + 800b148: 080151c4 .word 0x080151c4 + 800b14c: 20006fa8 .word 0x20006fa8 + 800b150: 20006fad .word 0x20006fad + 800b154: 20006f74 .word 0x20006f74 + 800b158: 697b ldr r3, [r7, #20] + 800b15a: 68db ldr r3, [r3, #12] + 800b15c: 617b str r3, [r7, #20] + 800b15e: 697b ldr r3, [r7, #20] + 800b160: 2b00 cmp r3, #0 + 800b162: d1d5 bne.n 800b110 + 800b164: 687b ldr r3, [r7, #4] + 800b166: 2200 movs r2, #0 + 800b168: 60da str r2, [r3, #12] + 800b16a: 4b77 ldr r3, [pc, #476] ; (800b348 ) + 800b16c: 2201 movs r2, #1 + 800b16e: 701a strb r2, [r3, #0] + pcb->state = TIME_WAIT; + 800b170: 687b ldr r3, [r7, #4] + 800b172: 220a movs r2, #10 + 800b174: 751a strb r2, [r3, #20] + TCP_REG(&tcp_tw_pcbs, pcb); + 800b176: 4b75 ldr r3, [pc, #468] ; (800b34c ) + 800b178: 681a ldr r2, [r3, #0] + 800b17a: 687b ldr r3, [r7, #4] + 800b17c: 60da str r2, [r3, #12] + 800b17e: 4a73 ldr r2, [pc, #460] ; (800b34c ) + 800b180: 687b ldr r3, [r7, #4] + 800b182: 6013 str r3, [r2, #0] + 800b184: f002 fda4 bl 800dcd0 + } + } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + pcb->unsent == NULL) { + pcb->state = FIN_WAIT_2; + } + break; + 800b188: e0d2 b.n 800b330 + tcp_ack_now(pcb); + 800b18a: 687b ldr r3, [r7, #4] + 800b18c: 7e9b ldrb r3, [r3, #26] + 800b18e: f043 0302 orr.w r3, r3, #2 + 800b192: b2da uxtb r2, r3 + 800b194: 687b ldr r3, [r7, #4] + 800b196: 769a strb r2, [r3, #26] + pcb->state = CLOSING; + 800b198: 687b ldr r3, [r7, #4] + 800b19a: 2208 movs r2, #8 + 800b19c: 751a strb r2, [r3, #20] + break; + 800b19e: e0c7 b.n 800b330 + } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + 800b1a0: 4b6b ldr r3, [pc, #428] ; (800b350 ) + 800b1a2: 781b ldrb r3, [r3, #0] + 800b1a4: f003 0310 and.w r3, r3, #16 + 800b1a8: 2b00 cmp r3, #0 + 800b1aa: f000 80c1 beq.w 800b330 + 800b1ae: 687b ldr r3, [r7, #4] + 800b1b0: 6cda ldr r2, [r3, #76] ; 0x4c + 800b1b2: 4b68 ldr r3, [pc, #416] ; (800b354 ) + 800b1b4: 681b ldr r3, [r3, #0] + 800b1b6: 429a cmp r2, r3 + 800b1b8: f040 80ba bne.w 800b330 + pcb->unsent == NULL) { + 800b1bc: 687b ldr r3, [r7, #4] + 800b1be: 6e9b ldr r3, [r3, #104] ; 0x68 + } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + 800b1c0: 2b00 cmp r3, #0 + 800b1c2: f040 80b5 bne.w 800b330 + pcb->state = FIN_WAIT_2; + 800b1c6: 687b ldr r3, [r7, #4] + 800b1c8: 2206 movs r2, #6 + 800b1ca: 751a strb r2, [r3, #20] + break; + 800b1cc: e0b0 b.n 800b330 + case FIN_WAIT_2: + tcp_receive(pcb); + 800b1ce: 6878 ldr r0, [r7, #4] + 800b1d0: f000 f93c bl 800b44c + if (recv_flags & TF_GOT_FIN) { + 800b1d4: 4b60 ldr r3, [pc, #384] ; (800b358 ) + 800b1d6: 781b ldrb r3, [r3, #0] + 800b1d8: f003 0320 and.w r3, r3, #32 + 800b1dc: 2b00 cmp r3, #0 + 800b1de: f000 80a9 beq.w 800b334 + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_ack_now(pcb); + 800b1e2: 687b ldr r3, [r7, #4] + 800b1e4: 7e9b ldrb r3, [r3, #26] + 800b1e6: f043 0302 orr.w r3, r3, #2 + 800b1ea: b2da uxtb r2, r3 + 800b1ec: 687b ldr r3, [r7, #4] + 800b1ee: 769a strb r2, [r3, #26] + tcp_pcb_purge(pcb); + 800b1f0: 6878 ldr r0, [r7, #4] + 800b1f2: f7fe fe65 bl 8009ec0 + TCP_RMV_ACTIVE(pcb); + 800b1f6: 4b59 ldr r3, [pc, #356] ; (800b35c ) + 800b1f8: 681b ldr r3, [r3, #0] + 800b1fa: 687a ldr r2, [r7, #4] + 800b1fc: 429a cmp r2, r3 + 800b1fe: d105 bne.n 800b20c + 800b200: 4b56 ldr r3, [pc, #344] ; (800b35c ) + 800b202: 681b ldr r3, [r3, #0] + 800b204: 68db ldr r3, [r3, #12] + 800b206: 4a55 ldr r2, [pc, #340] ; (800b35c ) + 800b208: 6013 str r3, [r2, #0] + 800b20a: e013 b.n 800b234 + 800b20c: 4b53 ldr r3, [pc, #332] ; (800b35c ) + 800b20e: 681b ldr r3, [r3, #0] + 800b210: 613b str r3, [r7, #16] + 800b212: e00c b.n 800b22e + 800b214: 693b ldr r3, [r7, #16] + 800b216: 68db ldr r3, [r3, #12] + 800b218: 687a ldr r2, [r7, #4] + 800b21a: 429a cmp r2, r3 + 800b21c: d104 bne.n 800b228 + 800b21e: 687b ldr r3, [r7, #4] + 800b220: 68da ldr r2, [r3, #12] + 800b222: 693b ldr r3, [r7, #16] + 800b224: 60da str r2, [r3, #12] + 800b226: e005 b.n 800b234 + 800b228: 693b ldr r3, [r7, #16] + 800b22a: 68db ldr r3, [r3, #12] + 800b22c: 613b str r3, [r7, #16] + 800b22e: 693b ldr r3, [r7, #16] + 800b230: 2b00 cmp r3, #0 + 800b232: d1ef bne.n 800b214 + 800b234: 687b ldr r3, [r7, #4] + 800b236: 2200 movs r2, #0 + 800b238: 60da str r2, [r3, #12] + 800b23a: 4b43 ldr r3, [pc, #268] ; (800b348 ) + 800b23c: 2201 movs r2, #1 + 800b23e: 701a strb r2, [r3, #0] + pcb->state = TIME_WAIT; + 800b240: 687b ldr r3, [r7, #4] + 800b242: 220a movs r2, #10 + 800b244: 751a strb r2, [r3, #20] + TCP_REG(&tcp_tw_pcbs, pcb); + 800b246: 4b41 ldr r3, [pc, #260] ; (800b34c ) + 800b248: 681a ldr r2, [r3, #0] + 800b24a: 687b ldr r3, [r7, #4] + 800b24c: 60da str r2, [r3, #12] + 800b24e: 4a3f ldr r2, [pc, #252] ; (800b34c ) + 800b250: 687b ldr r3, [r7, #4] + 800b252: 6013 str r3, [r2, #0] + 800b254: f002 fd3c bl 800dcd0 + } + break; + 800b258: e06c b.n 800b334 + case CLOSING: + tcp_receive(pcb); + 800b25a: 6878 ldr r0, [r7, #4] + 800b25c: f000 f8f6 bl 800b44c + if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { + 800b260: 4b3b ldr r3, [pc, #236] ; (800b350 ) + 800b262: 781b ldrb r3, [r3, #0] + 800b264: f003 0310 and.w r3, r3, #16 + 800b268: 2b00 cmp r3, #0 + 800b26a: d065 beq.n 800b338 + 800b26c: 687b ldr r3, [r7, #4] + 800b26e: 6cda ldr r2, [r3, #76] ; 0x4c + 800b270: 4b38 ldr r3, [pc, #224] ; (800b354 ) + 800b272: 681b ldr r3, [r3, #0] + 800b274: 429a cmp r2, r3 + 800b276: d15f bne.n 800b338 + 800b278: 687b ldr r3, [r7, #4] + 800b27a: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b27c: 2b00 cmp r3, #0 + 800b27e: d15b bne.n 800b338 + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_pcb_purge(pcb); + 800b280: 6878 ldr r0, [r7, #4] + 800b282: f7fe fe1d bl 8009ec0 + TCP_RMV_ACTIVE(pcb); + 800b286: 4b35 ldr r3, [pc, #212] ; (800b35c ) + 800b288: 681b ldr r3, [r3, #0] + 800b28a: 687a ldr r2, [r7, #4] + 800b28c: 429a cmp r2, r3 + 800b28e: d105 bne.n 800b29c + 800b290: 4b32 ldr r3, [pc, #200] ; (800b35c ) + 800b292: 681b ldr r3, [r3, #0] + 800b294: 68db ldr r3, [r3, #12] + 800b296: 4a31 ldr r2, [pc, #196] ; (800b35c ) + 800b298: 6013 str r3, [r2, #0] + 800b29a: e013 b.n 800b2c4 + 800b29c: 4b2f ldr r3, [pc, #188] ; (800b35c ) + 800b29e: 681b ldr r3, [r3, #0] + 800b2a0: 60fb str r3, [r7, #12] + 800b2a2: e00c b.n 800b2be + 800b2a4: 68fb ldr r3, [r7, #12] + 800b2a6: 68db ldr r3, [r3, #12] + 800b2a8: 687a ldr r2, [r7, #4] + 800b2aa: 429a cmp r2, r3 + 800b2ac: d104 bne.n 800b2b8 + 800b2ae: 687b ldr r3, [r7, #4] + 800b2b0: 68da ldr r2, [r3, #12] + 800b2b2: 68fb ldr r3, [r7, #12] + 800b2b4: 60da str r2, [r3, #12] + 800b2b6: e005 b.n 800b2c4 + 800b2b8: 68fb ldr r3, [r7, #12] + 800b2ba: 68db ldr r3, [r3, #12] + 800b2bc: 60fb str r3, [r7, #12] + 800b2be: 68fb ldr r3, [r7, #12] + 800b2c0: 2b00 cmp r3, #0 + 800b2c2: d1ef bne.n 800b2a4 + 800b2c4: 687b ldr r3, [r7, #4] + 800b2c6: 2200 movs r2, #0 + 800b2c8: 60da str r2, [r3, #12] + 800b2ca: 4b1f ldr r3, [pc, #124] ; (800b348 ) + 800b2cc: 2201 movs r2, #1 + 800b2ce: 701a strb r2, [r3, #0] + pcb->state = TIME_WAIT; + 800b2d0: 687b ldr r3, [r7, #4] + 800b2d2: 220a movs r2, #10 + 800b2d4: 751a strb r2, [r3, #20] + TCP_REG(&tcp_tw_pcbs, pcb); + 800b2d6: 4b1d ldr r3, [pc, #116] ; (800b34c ) + 800b2d8: 681a ldr r2, [r3, #0] + 800b2da: 687b ldr r3, [r7, #4] + 800b2dc: 60da str r2, [r3, #12] + 800b2de: 4a1b ldr r2, [pc, #108] ; (800b34c ) + 800b2e0: 687b ldr r3, [r7, #4] + 800b2e2: 6013 str r3, [r2, #0] + 800b2e4: f002 fcf4 bl 800dcd0 + } + break; + 800b2e8: e026 b.n 800b338 + case LAST_ACK: + tcp_receive(pcb); + 800b2ea: 6878 ldr r0, [r7, #4] + 800b2ec: f000 f8ae bl 800b44c + if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { + 800b2f0: 4b17 ldr r3, [pc, #92] ; (800b350 ) + 800b2f2: 781b ldrb r3, [r3, #0] + 800b2f4: f003 0310 and.w r3, r3, #16 + 800b2f8: 2b00 cmp r3, #0 + 800b2fa: d01f beq.n 800b33c + 800b2fc: 687b ldr r3, [r7, #4] + 800b2fe: 6cda ldr r2, [r3, #76] ; 0x4c + 800b300: 4b14 ldr r3, [pc, #80] ; (800b354 ) + 800b302: 681b ldr r3, [r3, #0] + 800b304: 429a cmp r2, r3 + 800b306: d119 bne.n 800b33c + 800b308: 687b ldr r3, [r7, #4] + 800b30a: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b30c: 2b00 cmp r3, #0 + 800b30e: d115 bne.n 800b33c + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ + recv_flags |= TF_CLOSED; + 800b310: 4b11 ldr r3, [pc, #68] ; (800b358 ) + 800b312: 781b ldrb r3, [r3, #0] + 800b314: f043 0310 orr.w r3, r3, #16 + 800b318: b2da uxtb r2, r3 + 800b31a: 4b0f ldr r3, [pc, #60] ; (800b358 ) + 800b31c: 701a strb r2, [r3, #0] + } + break; + 800b31e: e00d b.n 800b33c + default: + break; + 800b320: bf00 nop + 800b322: e00c b.n 800b33e + break; + 800b324: bf00 nop + 800b326: e00a b.n 800b33e + break; + 800b328: bf00 nop + 800b32a: e008 b.n 800b33e + break; + 800b32c: bf00 nop + 800b32e: e006 b.n 800b33e + break; + 800b330: bf00 nop + 800b332: e004 b.n 800b33e + break; + 800b334: bf00 nop + 800b336: e002 b.n 800b33e + break; + 800b338: bf00 nop + 800b33a: e000 b.n 800b33e + break; + 800b33c: bf00 nop + } + return ERR_OK; + 800b33e: 2300 movs r3, #0 +} + 800b340: 4618 mov r0, r3 + 800b342: 3720 adds r7, #32 + 800b344: 46bd mov sp, r7 + 800b346: bd80 pop {r7, pc} + 800b348: 20006f7c .word 0x20006f7c + 800b34c: 20006f78 .word 0x20006f78 + 800b350: 20006fac .word 0x20006fac + 800b354: 20006fa4 .word 0x20006fa4 + 800b358: 20006fad .word 0x20006fad + 800b35c: 20006f74 .word 0x20006f74 + +0800b360 : + * + * Called from tcp_receive() + */ +static void +tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) +{ + 800b360: b590 push {r4, r7, lr} + 800b362: b085 sub sp, #20 + 800b364: af00 add r7, sp, #0 + 800b366: 6078 str r0, [r7, #4] + 800b368: 6039 str r1, [r7, #0] + struct tcp_seg *old_seg; + + if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { + 800b36a: 687b ldr r3, [r7, #4] + 800b36c: 68db ldr r3, [r3, #12] + 800b36e: 899b ldrh r3, [r3, #12] + 800b370: b29b uxth r3, r3 + 800b372: 4618 mov r0, r3 + 800b374: f7fb feae bl 80070d4 + 800b378: 4603 mov r3, r0 + 800b37a: f003 0301 and.w r3, r3, #1 + 800b37e: 2b00 cmp r3, #0 + 800b380: d027 beq.n 800b3d2 + /* received segment overlaps all following segments */ + tcp_segs_free(next); + 800b382: 6838 ldr r0, [r7, #0] + 800b384: f7fe fb53 bl 8009a2e + next = NULL; + 800b388: 2300 movs r3, #0 + 800b38a: 603b str r3, [r7, #0] + 800b38c: e055 b.n 800b43a + oos queue may have segments with FIN flag */ + while (next && + TCP_SEQ_GEQ((seqno + cseg->len), + (next->tcphdr->seqno + next->len))) { + /* cseg with FIN already processed */ + if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { + 800b38e: 683b ldr r3, [r7, #0] + 800b390: 68db ldr r3, [r3, #12] + 800b392: 899b ldrh r3, [r3, #12] + 800b394: b29b uxth r3, r3 + 800b396: 4618 mov r0, r3 + 800b398: f7fb fe9c bl 80070d4 + 800b39c: 4603 mov r3, r0 + 800b39e: f003 0301 and.w r3, r3, #1 + 800b3a2: 2b00 cmp r3, #0 + 800b3a4: d00d beq.n 800b3c2 + TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); + 800b3a6: 687b ldr r3, [r7, #4] + 800b3a8: 68db ldr r3, [r3, #12] + 800b3aa: 899b ldrh r3, [r3, #12] + 800b3ac: b29c uxth r4, r3 + 800b3ae: 2001 movs r0, #1 + 800b3b0: f7fb fe90 bl 80070d4 + 800b3b4: 4603 mov r3, r0 + 800b3b6: 461a mov r2, r3 + 800b3b8: 687b ldr r3, [r7, #4] + 800b3ba: 68db ldr r3, [r3, #12] + 800b3bc: 4322 orrs r2, r4 + 800b3be: b292 uxth r2, r2 + 800b3c0: 819a strh r2, [r3, #12] + } + old_seg = next; + 800b3c2: 683b ldr r3, [r7, #0] + 800b3c4: 60fb str r3, [r7, #12] + next = next->next; + 800b3c6: 683b ldr r3, [r7, #0] + 800b3c8: 681b ldr r3, [r3, #0] + 800b3ca: 603b str r3, [r7, #0] + tcp_seg_free(old_seg); + 800b3cc: 68f8 ldr r0, [r7, #12] + 800b3ce: f7fe fb43 bl 8009a58 + while (next && + 800b3d2: 683b ldr r3, [r7, #0] + 800b3d4: 2b00 cmp r3, #0 + 800b3d6: d00e beq.n 800b3f6 + TCP_SEQ_GEQ((seqno + cseg->len), + 800b3d8: 687b ldr r3, [r7, #4] + 800b3da: 891b ldrh r3, [r3, #8] + 800b3dc: 461a mov r2, r3 + 800b3de: 4b1a ldr r3, [pc, #104] ; (800b448 ) + 800b3e0: 681b ldr r3, [r3, #0] + 800b3e2: 441a add r2, r3 + 800b3e4: 683b ldr r3, [r7, #0] + 800b3e6: 68db ldr r3, [r3, #12] + 800b3e8: 685b ldr r3, [r3, #4] + 800b3ea: 6839 ldr r1, [r7, #0] + 800b3ec: 8909 ldrh r1, [r1, #8] + 800b3ee: 440b add r3, r1 + 800b3f0: 1ad3 subs r3, r2, r3 + while (next && + 800b3f2: 2b00 cmp r3, #0 + 800b3f4: dacb bge.n 800b38e + } + if (next && + 800b3f6: 683b ldr r3, [r7, #0] + 800b3f8: 2b00 cmp r3, #0 + 800b3fa: d01e beq.n 800b43a + TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { + 800b3fc: 687b ldr r3, [r7, #4] + 800b3fe: 891b ldrh r3, [r3, #8] + 800b400: 461a mov r2, r3 + 800b402: 4b11 ldr r3, [pc, #68] ; (800b448 ) + 800b404: 681b ldr r3, [r3, #0] + 800b406: 441a add r2, r3 + 800b408: 683b ldr r3, [r7, #0] + 800b40a: 68db ldr r3, [r3, #12] + 800b40c: 685b ldr r3, [r3, #4] + 800b40e: 1ad3 subs r3, r2, r3 + if (next && + 800b410: 2b00 cmp r3, #0 + 800b412: dd12 ble.n 800b43a + /* We need to trim the incoming segment. */ + cseg->len = (u16_t)(next->tcphdr->seqno - seqno); + 800b414: 683b ldr r3, [r7, #0] + 800b416: 68db ldr r3, [r3, #12] + 800b418: 685b ldr r3, [r3, #4] + 800b41a: b29a uxth r2, r3 + 800b41c: 4b0a ldr r3, [pc, #40] ; (800b448 ) + 800b41e: 681b ldr r3, [r3, #0] + 800b420: b29b uxth r3, r3 + 800b422: 1ad3 subs r3, r2, r3 + 800b424: b29a uxth r2, r3 + 800b426: 687b ldr r3, [r7, #4] + 800b428: 811a strh r2, [r3, #8] + pbuf_realloc(cseg->p, cseg->len); + 800b42a: 687b ldr r3, [r7, #4] + 800b42c: 685a ldr r2, [r3, #4] + 800b42e: 687b ldr r3, [r7, #4] + 800b430: 891b ldrh r3, [r3, #8] + 800b432: 4619 mov r1, r3 + 800b434: 4610 mov r0, r2 + 800b436: f7fc fe11 bl 800805c + } + } + cseg->next = next; + 800b43a: 687b ldr r3, [r7, #4] + 800b43c: 683a ldr r2, [r7, #0] + 800b43e: 601a str r2, [r3, #0] +} + 800b440: bf00 nop + 800b442: 3714 adds r7, #20 + 800b444: 46bd mov sp, r7 + 800b446: bd90 pop {r4, r7, pc} + 800b448: 20006fa0 .word 0x20006fa0 + +0800b44c : + * + * Called from tcp_process(). + */ +static void +tcp_receive(struct tcp_pcb *pcb) +{ + 800b44c: b5f0 push {r4, r5, r6, r7, lr} + 800b44e: b08d sub sp, #52 ; 0x34 + 800b450: af00 add r7, sp, #0 + 800b452: 6078 str r0, [r7, #4] +#endif /* TCP_QUEUE_OOSEQ */ + s32_t off; + s16_t m; + u32_t right_wnd_edge; + u16_t new_tot_len; + int found_dupack = 0; + 800b454: 2300 movs r3, #0 + 800b456: 61fb str r3, [r7, #28] +#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS + u32_t ooseq_blen; + u16_t ooseq_qlen; +#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ + + LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); + 800b458: 687b ldr r3, [r7, #4] + 800b45a: 7d1b ldrb r3, [r3, #20] + 800b45c: 2b03 cmp r3, #3 + 800b45e: d806 bhi.n 800b46e + 800b460: 4b98 ldr r3, [pc, #608] ; (800b6c4 ) + 800b462: f44f 6281 mov.w r2, #1032 ; 0x408 + 800b466: 4998 ldr r1, [pc, #608] ; (800b6c8 ) + 800b468: 4898 ldr r0, [pc, #608] ; (800b6cc ) + 800b46a: f007 fc8b bl 8012d84 + + if (flags & TCP_ACK) { + 800b46e: 4b98 ldr r3, [pc, #608] ; (800b6d0 ) + 800b470: 781b ldrb r3, [r3, #0] + 800b472: f003 0310 and.w r3, r3, #16 + 800b476: 2b00 cmp r3, #0 + 800b478: f000 82c1 beq.w 800b9fe + right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; + 800b47c: 687b ldr r3, [r7, #4] + 800b47e: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c + 800b482: 461a mov r2, r3 + 800b484: 687b ldr r3, [r7, #4] + 800b486: 6d5b ldr r3, [r3, #84] ; 0x54 + 800b488: 4413 add r3, r2 + 800b48a: 617b str r3, [r7, #20] + + /* Update window. */ + if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || + 800b48c: 687b ldr r3, [r7, #4] + 800b48e: 6d1a ldr r2, [r3, #80] ; 0x50 + 800b490: 4b90 ldr r3, [pc, #576] ; (800b6d4 ) + 800b492: 681b ldr r3, [r3, #0] + 800b494: 1ad3 subs r3, r2, r3 + 800b496: 2b00 cmp r3, #0 + 800b498: db1b blt.n 800b4d2 + (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || + 800b49a: 687b ldr r3, [r7, #4] + 800b49c: 6d1a ldr r2, [r3, #80] ; 0x50 + 800b49e: 4b8d ldr r3, [pc, #564] ; (800b6d4 ) + 800b4a0: 681b ldr r3, [r3, #0] + if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || + 800b4a2: 429a cmp r2, r3 + 800b4a4: d106 bne.n 800b4b4 + (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || + 800b4a6: 687b ldr r3, [r7, #4] + 800b4a8: 6d5a ldr r2, [r3, #84] ; 0x54 + 800b4aa: 4b8b ldr r3, [pc, #556] ; (800b6d8 ) + 800b4ac: 681b ldr r3, [r3, #0] + 800b4ae: 1ad3 subs r3, r2, r3 + 800b4b0: 2b00 cmp r3, #0 + 800b4b2: db0e blt.n 800b4d2 + (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { + 800b4b4: 687b ldr r3, [r7, #4] + 800b4b6: 6d5a ldr r2, [r3, #84] ; 0x54 + 800b4b8: 4b87 ldr r3, [pc, #540] ; (800b6d8 ) + 800b4ba: 681b ldr r3, [r3, #0] + (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || + 800b4bc: 429a cmp r2, r3 + 800b4be: d141 bne.n 800b544 + (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { + 800b4c0: 4b86 ldr r3, [pc, #536] ; (800b6dc ) + 800b4c2: 681b ldr r3, [r3, #0] + 800b4c4: 89db ldrh r3, [r3, #14] + 800b4c6: b29a uxth r2, r3 + 800b4c8: 687b ldr r3, [r7, #4] + 800b4ca: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c + 800b4ce: 429a cmp r2, r3 + 800b4d0: d938 bls.n 800b544 + pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); + 800b4d2: 4b82 ldr r3, [pc, #520] ; (800b6dc ) + 800b4d4: 681b ldr r3, [r3, #0] + 800b4d6: 89db ldrh r3, [r3, #14] + 800b4d8: b29a uxth r2, r3 + 800b4da: 687b ldr r3, [r7, #4] + 800b4dc: f8a3 205c strh.w r2, [r3, #92] ; 0x5c + /* keep track of the biggest window announced by the remote host to calculate + the maximum segment size */ + if (pcb->snd_wnd_max < pcb->snd_wnd) { + 800b4e0: 687b ldr r3, [r7, #4] + 800b4e2: f8b3 205e ldrh.w r2, [r3, #94] ; 0x5e + 800b4e6: 687b ldr r3, [r7, #4] + 800b4e8: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c + 800b4ec: 429a cmp r2, r3 + 800b4ee: d205 bcs.n 800b4fc + pcb->snd_wnd_max = pcb->snd_wnd; + 800b4f0: 687b ldr r3, [r7, #4] + 800b4f2: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c + 800b4f6: 687b ldr r3, [r7, #4] + 800b4f8: f8a3 205e strh.w r2, [r3, #94] ; 0x5e + } + pcb->snd_wl1 = seqno; + 800b4fc: 4b75 ldr r3, [pc, #468] ; (800b6d4 ) + 800b4fe: 681a ldr r2, [r3, #0] + 800b500: 687b ldr r3, [r7, #4] + 800b502: 651a str r2, [r3, #80] ; 0x50 + pcb->snd_wl2 = ackno; + 800b504: 4b74 ldr r3, [pc, #464] ; (800b6d8 ) + 800b506: 681a ldr r2, [r3, #0] + 800b508: 687b ldr r3, [r7, #4] + 800b50a: 655a str r2, [r3, #84] ; 0x54 + if (pcb->snd_wnd == 0) { + 800b50c: 687b ldr r3, [r7, #4] + 800b50e: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c + 800b512: 2b00 cmp r3, #0 + 800b514: d10d bne.n 800b532 + if (pcb->persist_backoff == 0) { + 800b516: 687b ldr r3, [r7, #4] + 800b518: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 + 800b51c: 2b00 cmp r3, #0 + 800b51e: d111 bne.n 800b544 + /* start persist timer */ + pcb->persist_cnt = 0; + 800b520: 687b ldr r3, [r7, #4] + 800b522: 2200 movs r2, #0 + 800b524: f883 2094 strb.w r2, [r3, #148] ; 0x94 + pcb->persist_backoff = 1; + 800b528: 687b ldr r3, [r7, #4] + 800b52a: 2201 movs r2, #1 + 800b52c: f883 2095 strb.w r2, [r3, #149] ; 0x95 + 800b530: e008 b.n 800b544 + } + } else if (pcb->persist_backoff > 0) { + 800b532: 687b ldr r3, [r7, #4] + 800b534: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 + 800b538: 2b00 cmp r3, #0 + 800b53a: d003 beq.n 800b544 + /* stop persist timer */ + pcb->persist_backoff = 0; + 800b53c: 687b ldr r3, [r7, #4] + 800b53e: 2200 movs r2, #0 + 800b540: f883 2095 strb.w r2, [r3, #149] ; 0x95 + * If it only passes 1, should reset dupack counter + * + */ + + /* Clause 1 */ + if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { + 800b544: 4b64 ldr r3, [pc, #400] ; (800b6d8 ) + 800b546: 681a ldr r2, [r3, #0] + 800b548: 687b ldr r3, [r7, #4] + 800b54a: 6c5b ldr r3, [r3, #68] ; 0x44 + 800b54c: 1ad3 subs r3, r2, r3 + 800b54e: 2b00 cmp r3, #0 + 800b550: dc53 bgt.n 800b5fa + /* Clause 2 */ + if (tcplen == 0) { + 800b552: 4b63 ldr r3, [pc, #396] ; (800b6e0 ) + 800b554: 881b ldrh r3, [r3, #0] + 800b556: 2b00 cmp r3, #0 + 800b558: d146 bne.n 800b5e8 + /* Clause 3 */ + if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { + 800b55a: 687b ldr r3, [r7, #4] + 800b55c: 6d5b ldr r3, [r3, #84] ; 0x54 + 800b55e: 687a ldr r2, [r7, #4] + 800b560: f8b2 205c ldrh.w r2, [r2, #92] ; 0x5c + 800b564: 4413 add r3, r2 + 800b566: 697a ldr r2, [r7, #20] + 800b568: 429a cmp r2, r3 + 800b56a: d13d bne.n 800b5e8 + /* Clause 4 */ + if (pcb->rtime >= 0) { + 800b56c: 687b ldr r3, [r7, #4] + 800b56e: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 + 800b572: 2b00 cmp r3, #0 + 800b574: db38 blt.n 800b5e8 + /* Clause 5 */ + if (pcb->lastack == ackno) { + 800b576: 687b ldr r3, [r7, #4] + 800b578: 6c5a ldr r2, [r3, #68] ; 0x44 + 800b57a: 4b57 ldr r3, [pc, #348] ; (800b6d8 ) + 800b57c: 681b ldr r3, [r3, #0] + 800b57e: 429a cmp r2, r3 + 800b580: d132 bne.n 800b5e8 + found_dupack = 1; + 800b582: 2301 movs r3, #1 + 800b584: 61fb str r3, [r7, #28] + if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { + 800b586: 687b ldr r3, [r7, #4] + 800b588: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 + 800b58c: 2bff cmp r3, #255 ; 0xff + 800b58e: d007 beq.n 800b5a0 + ++pcb->dupacks; + 800b590: 687b ldr r3, [r7, #4] + 800b592: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 + 800b596: 3301 adds r3, #1 + 800b598: b2da uxtb r2, r3 + 800b59a: 687b ldr r3, [r7, #4] + 800b59c: f883 2043 strb.w r2, [r3, #67] ; 0x43 + } + if (pcb->dupacks > 3) { + 800b5a0: 687b ldr r3, [r7, #4] + 800b5a2: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 + 800b5a6: 2b03 cmp r3, #3 + 800b5a8: d916 bls.n 800b5d8 + /* Inflate the congestion window, but not if it means that + the value overflows. */ + if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { + 800b5aa: 687b ldr r3, [r7, #4] + 800b5ac: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 + 800b5b0: 687b ldr r3, [r7, #4] + 800b5b2: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800b5b4: 4413 add r3, r2 + 800b5b6: b29a uxth r2, r3 + 800b5b8: 687b ldr r3, [r7, #4] + 800b5ba: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 + 800b5be: 429a cmp r2, r3 + 800b5c0: d912 bls.n 800b5e8 + pcb->cwnd += pcb->mss; + 800b5c2: 687b ldr r3, [r7, #4] + 800b5c4: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 + 800b5c8: 687b ldr r3, [r7, #4] + 800b5ca: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800b5cc: 4413 add r3, r2 + 800b5ce: b29a uxth r2, r3 + 800b5d0: 687b ldr r3, [r7, #4] + 800b5d2: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + 800b5d6: e007 b.n 800b5e8 + } + } else if (pcb->dupacks == 3) { + 800b5d8: 687b ldr r3, [r7, #4] + 800b5da: f893 3043 ldrb.w r3, [r3, #67] ; 0x43 + 800b5de: 2b03 cmp r3, #3 + 800b5e0: d102 bne.n 800b5e8 + /* Do fast retransmit */ + tcp_rexmit_fast(pcb); + 800b5e2: 6878 ldr r0, [r7, #4] + 800b5e4: f002 fa28 bl 800da38 + } + } + } + /* If Clause (1) or more is true, but not a duplicate ack, reset + * count of consecutive duplicate acks */ + if (!found_dupack) { + 800b5e8: 69fb ldr r3, [r7, #28] + 800b5ea: 2b00 cmp r3, #0 + 800b5ec: f040 816a bne.w 800b8c4 + pcb->dupacks = 0; + 800b5f0: 687b ldr r3, [r7, #4] + 800b5f2: 2200 movs r2, #0 + 800b5f4: f883 2043 strb.w r2, [r3, #67] ; 0x43 + 800b5f8: e164 b.n 800b8c4 + } + } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { + 800b5fa: 4b37 ldr r3, [pc, #220] ; (800b6d8 ) + 800b5fc: 681a ldr r2, [r3, #0] + 800b5fe: 687b ldr r3, [r7, #4] + 800b600: 6c5b ldr r3, [r3, #68] ; 0x44 + 800b602: 1ad3 subs r3, r2, r3 + 800b604: 3b01 subs r3, #1 + 800b606: 2b00 cmp r3, #0 + 800b608: f2c0 8108 blt.w 800b81c + 800b60c: 4b32 ldr r3, [pc, #200] ; (800b6d8 ) + 800b60e: 681a ldr r2, [r3, #0] + 800b610: 687b ldr r3, [r7, #4] + 800b612: 6cdb ldr r3, [r3, #76] ; 0x4c + 800b614: 1ad3 subs r3, r2, r3 + 800b616: 2b00 cmp r3, #0 + 800b618: f300 8100 bgt.w 800b81c + /* We come here when the ACK acknowledges new data. */ + + /* Reset the "IN Fast Retransmit" flag, since we are no longer + in fast retransmit. Also reset the congestion window to the + slow start threshold. */ + if (pcb->flags & TF_INFR) { + 800b61c: 687b ldr r3, [r7, #4] + 800b61e: 7e9b ldrb r3, [r3, #26] + 800b620: f003 0304 and.w r3, r3, #4 + 800b624: 2b00 cmp r3, #0 + 800b626: d00c beq.n 800b642 + pcb->flags &= ~TF_INFR; + 800b628: 687b ldr r3, [r7, #4] + 800b62a: 7e9b ldrb r3, [r3, #26] + 800b62c: f023 0304 bic.w r3, r3, #4 + 800b630: b2da uxtb r2, r3 + 800b632: 687b ldr r3, [r7, #4] + 800b634: 769a strb r2, [r3, #26] + pcb->cwnd = pcb->ssthresh; + 800b636: 687b ldr r3, [r7, #4] + 800b638: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a + 800b63c: 687b ldr r3, [r7, #4] + 800b63e: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + } + + /* Reset the number of retransmissions. */ + pcb->nrtx = 0; + 800b642: 687b ldr r3, [r7, #4] + 800b644: 2200 movs r2, #0 + 800b646: f883 2042 strb.w r2, [r3, #66] ; 0x42 + + /* Reset the retransmission time-out. */ + pcb->rto = (pcb->sa >> 3) + pcb->sv; + 800b64a: 687b ldr r3, [r7, #4] + 800b64c: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c + 800b650: 10db asrs r3, r3, #3 + 800b652: b21b sxth r3, r3 + 800b654: b29a uxth r2, r3 + 800b656: 687b ldr r3, [r7, #4] + 800b658: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e + 800b65c: b29b uxth r3, r3 + 800b65e: 4413 add r3, r2 + 800b660: b29b uxth r3, r3 + 800b662: b21a sxth r2, r3 + 800b664: 687b ldr r3, [r7, #4] + 800b666: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 + + /* Reset the fast retransmit variables. */ + pcb->dupacks = 0; + 800b66a: 687b ldr r3, [r7, #4] + 800b66c: 2200 movs r2, #0 + 800b66e: f883 2043 strb.w r2, [r3, #67] ; 0x43 + pcb->lastack = ackno; + 800b672: 4b19 ldr r3, [pc, #100] ; (800b6d8 ) + 800b674: 681a ldr r2, [r3, #0] + 800b676: 687b ldr r3, [r7, #4] + 800b678: 645a str r2, [r3, #68] ; 0x44 + + /* Update the congestion control variables (cwnd and + ssthresh). */ + if (pcb->state >= ESTABLISHED) { + 800b67a: 687b ldr r3, [r7, #4] + 800b67c: 7d1b ldrb r3, [r3, #20] + 800b67e: 2b03 cmp r3, #3 + 800b680: f240 8095 bls.w 800b7ae + if (pcb->cwnd < pcb->ssthresh) { + 800b684: 687b ldr r3, [r7, #4] + 800b686: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 + 800b68a: 687b ldr r3, [r7, #4] + 800b68c: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a + 800b690: 429a cmp r2, r3 + 800b692: d227 bcs.n 800b6e4 + if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { + 800b694: 687b ldr r3, [r7, #4] + 800b696: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 + 800b69a: 687b ldr r3, [r7, #4] + 800b69c: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800b69e: 4413 add r3, r2 + 800b6a0: b29a uxth r2, r3 + 800b6a2: 687b ldr r3, [r7, #4] + 800b6a4: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 + 800b6a8: 429a cmp r2, r3 + 800b6aa: f240 8080 bls.w 800b7ae + pcb->cwnd += pcb->mss; + 800b6ae: 687b ldr r3, [r7, #4] + 800b6b0: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 + 800b6b4: 687b ldr r3, [r7, #4] + 800b6b6: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800b6b8: 4413 add r3, r2 + 800b6ba: b29a uxth r2, r3 + 800b6bc: 687b ldr r3, [r7, #4] + 800b6be: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + 800b6c2: e074 b.n 800b7ae + 800b6c4: 08015180 .word 0x08015180 + 800b6c8: 080153a4 .word 0x080153a4 + 800b6cc: 080151c4 .word 0x080151c4 + 800b6d0: 20006fac .word 0x20006fac + 800b6d4: 20006fa0 .word 0x20006fa0 + 800b6d8: 20006fa4 .word 0x20006fa4 + 800b6dc: 20006f90 .word 0x20006f90 + 800b6e0: 20006faa .word 0x20006faa + } + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); + } else { + tcpwnd_size_t new_cwnd = (pcb->cwnd + pcb->mss * pcb->mss / pcb->cwnd); + 800b6e4: 687b ldr r3, [r7, #4] + 800b6e6: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 + 800b6ea: 687b ldr r3, [r7, #4] + 800b6ec: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800b6ee: 4619 mov r1, r3 + 800b6f0: 687b ldr r3, [r7, #4] + 800b6f2: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800b6f4: fb01 f303 mul.w r3, r1, r3 + 800b6f8: 6879 ldr r1, [r7, #4] + 800b6fa: f8b1 1048 ldrh.w r1, [r1, #72] ; 0x48 + 800b6fe: fb93 f3f1 sdiv r3, r3, r1 + 800b702: b29b uxth r3, r3 + 800b704: 4413 add r3, r2 + 800b706: 827b strh r3, [r7, #18] + if (new_cwnd > pcb->cwnd) { + 800b708: 687b ldr r3, [r7, #4] + 800b70a: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 + 800b70e: 8a7a ldrh r2, [r7, #18] + 800b710: 429a cmp r2, r3 + 800b712: d94c bls.n 800b7ae + pcb->cwnd = new_cwnd; + 800b714: 687b ldr r3, [r7, #4] + 800b716: 8a7a ldrh r2, [r7, #18] + 800b718: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + pcb->unacked != NULL? + lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); + + /* Remove segment from the unacknowledged list if the incoming + ACK acknowledges them. */ + while (pcb->unacked != NULL && + 800b71c: e047 b.n 800b7ae + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unacked\n", + lwip_ntohl(pcb->unacked->tcphdr->seqno), + lwip_ntohl(pcb->unacked->tcphdr->seqno) + + TCP_TCPLEN(pcb->unacked))); + + next = pcb->unacked; + 800b71e: 687b ldr r3, [r7, #4] + 800b720: 6edb ldr r3, [r3, #108] ; 0x6c + 800b722: 62fb str r3, [r7, #44] ; 0x2c + pcb->unacked = pcb->unacked->next; + 800b724: 687b ldr r3, [r7, #4] + 800b726: 6edb ldr r3, [r3, #108] ; 0x6c + 800b728: 681a ldr r2, [r3, #0] + 800b72a: 687b ldr r3, [r7, #4] + 800b72c: 66da str r2, [r3, #108] ; 0x6c + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); + LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); + 800b72e: 687b ldr r3, [r7, #4] + 800b730: f8b3 4062 ldrh.w r4, [r3, #98] ; 0x62 + 800b734: 6afb ldr r3, [r7, #44] ; 0x2c + 800b736: 685b ldr r3, [r3, #4] + 800b738: 4618 mov r0, r3 + 800b73a: f7fc fe97 bl 800846c + 800b73e: 4603 mov r3, r0 + 800b740: 429c cmp r4, r3 + 800b742: d206 bcs.n 800b752 + 800b744: 4b70 ldr r3, [pc, #448] ; (800b908 ) + 800b746: f240 429e movw r2, #1182 ; 0x49e + 800b74a: 4970 ldr r1, [pc, #448] ; (800b90c ) + 800b74c: 4870 ldr r0, [pc, #448] ; (800b910 ) + 800b74e: f007 fb19 bl 8012d84 + + pcb->snd_queuelen -= pbuf_clen(next->p); + 800b752: 6afb ldr r3, [r7, #44] ; 0x2c + 800b754: 685b ldr r3, [r3, #4] + 800b756: 4618 mov r0, r3 + 800b758: f7fc fe88 bl 800846c + 800b75c: 4603 mov r3, r0 + 800b75e: 461a mov r2, r3 + 800b760: 687b ldr r3, [r7, #4] + 800b762: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800b766: 1a9b subs r3, r3, r2 + 800b768: b29a uxth r2, r3 + 800b76a: 687b ldr r3, [r7, #4] + 800b76c: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 + recv_acked += next->len; + 800b770: 6afb ldr r3, [r7, #44] ; 0x2c + 800b772: 891a ldrh r2, [r3, #8] + 800b774: 4b67 ldr r3, [pc, #412] ; (800b914 ) + 800b776: 881b ldrh r3, [r3, #0] + 800b778: 4413 add r3, r2 + 800b77a: b29a uxth r2, r3 + 800b77c: 4b65 ldr r3, [pc, #404] ; (800b914 ) + 800b77e: 801a strh r2, [r3, #0] + tcp_seg_free(next); + 800b780: 6af8 ldr r0, [r7, #44] ; 0x2c + 800b782: f7fe f969 bl 8009a58 + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unacked)\n", (tcpwnd_size_t)pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + 800b786: 687b ldr r3, [r7, #4] + 800b788: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800b78c: 2b00 cmp r3, #0 + 800b78e: d00e beq.n 800b7ae + LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL || + 800b790: 687b ldr r3, [r7, #4] + 800b792: 6edb ldr r3, [r3, #108] ; 0x6c + 800b794: 2b00 cmp r3, #0 + 800b796: d10a bne.n 800b7ae + 800b798: 687b ldr r3, [r7, #4] + 800b79a: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b79c: 2b00 cmp r3, #0 + 800b79e: d106 bne.n 800b7ae + 800b7a0: 4b59 ldr r3, [pc, #356] ; (800b908 ) + 800b7a2: f240 42a6 movw r2, #1190 ; 0x4a6 + 800b7a6: 495c ldr r1, [pc, #368] ; (800b918 ) + 800b7a8: 4859 ldr r0, [pc, #356] ; (800b910 ) + 800b7aa: f007 faeb bl 8012d84 + while (pcb->unacked != NULL && + 800b7ae: 687b ldr r3, [r7, #4] + 800b7b0: 6edb ldr r3, [r3, #108] ; 0x6c + 800b7b2: 2b00 cmp r3, #0 + 800b7b4: d022 beq.n 800b7fc + TCP_SEQ_LEQ(lwip_ntohl(pcb->unacked->tcphdr->seqno) + + 800b7b6: 687b ldr r3, [r7, #4] + 800b7b8: 6edb ldr r3, [r3, #108] ; 0x6c + 800b7ba: 68db ldr r3, [r3, #12] + 800b7bc: 685b ldr r3, [r3, #4] + 800b7be: 4618 mov r0, r3 + 800b7c0: f7fb fc95 bl 80070ee + 800b7c4: 4604 mov r4, r0 + 800b7c6: 687b ldr r3, [r7, #4] + 800b7c8: 6edb ldr r3, [r3, #108] ; 0x6c + 800b7ca: 891b ldrh r3, [r3, #8] + 800b7cc: 461d mov r5, r3 + 800b7ce: 687b ldr r3, [r7, #4] + 800b7d0: 6edb ldr r3, [r3, #108] ; 0x6c + 800b7d2: 68db ldr r3, [r3, #12] + 800b7d4: 899b ldrh r3, [r3, #12] + 800b7d6: b29b uxth r3, r3 + 800b7d8: 4618 mov r0, r3 + 800b7da: f7fb fc7b bl 80070d4 + 800b7de: 4603 mov r3, r0 + 800b7e0: f003 0303 and.w r3, r3, #3 + 800b7e4: 2b00 cmp r3, #0 + 800b7e6: d001 beq.n 800b7ec + 800b7e8: 2301 movs r3, #1 + 800b7ea: e000 b.n 800b7ee + 800b7ec: 2300 movs r3, #0 + 800b7ee: 442b add r3, r5 + 800b7f0: 18e2 adds r2, r4, r3 + 800b7f2: 4b4a ldr r3, [pc, #296] ; (800b91c ) + 800b7f4: 681b ldr r3, [r3, #0] + 800b7f6: 1ad3 subs r3, r2, r3 + while (pcb->unacked != NULL && + 800b7f8: 2b00 cmp r3, #0 + 800b7fa: dd90 ble.n 800b71e + } + } + + /* If there's nothing left to acknowledge, stop the retransmit + timer, otherwise reset it to start again */ + if (pcb->unacked == NULL) { + 800b7fc: 687b ldr r3, [r7, #4] + 800b7fe: 6edb ldr r3, [r3, #108] ; 0x6c + 800b800: 2b00 cmp r3, #0 + 800b802: d104 bne.n 800b80e + pcb->rtime = -1; + 800b804: 687b ldr r3, [r7, #4] + 800b806: f64f 72ff movw r2, #65535 ; 0xffff + 800b80a: 861a strh r2, [r3, #48] ; 0x30 + 800b80c: e002 b.n 800b814 + } else { + pcb->rtime = 0; + 800b80e: 687b ldr r3, [r7, #4] + 800b810: 2200 movs r2, #0 + 800b812: 861a strh r2, [r3, #48] ; 0x30 + } + + pcb->polltmr = 0; + 800b814: 687b ldr r3, [r7, #4] + 800b816: 2200 movs r2, #0 + 800b818: 76da strb r2, [r3, #27] + 800b81a: e002 b.n 800b822 + nd6_reachability_hint(ip6_current_src_addr()); + } +#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ + } else { + /* Out of sequence ACK, didn't really ack anything */ + tcp_send_empty_ack(pcb); + 800b81c: 6878 ldr r0, [r7, #4] + 800b81e: f001 fd2f bl 800d280 + on the list are acknowledged by the ACK. This may seem + strange since an "unsent" segment shouldn't be acked. The + rationale is that lwIP puts all outstanding segments on the + ->unsent list after a retransmission, so these segments may + in fact have been sent once. */ + while (pcb->unsent != NULL && + 800b822: e04f b.n 800b8c4 + TCP_TCPLEN(pcb->unsent), pcb->snd_nxt)) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unsent\n", + lwip_ntohl(pcb->unsent->tcphdr->seqno), lwip_ntohl(pcb->unsent->tcphdr->seqno) + + TCP_TCPLEN(pcb->unsent))); + + next = pcb->unsent; + 800b824: 687b ldr r3, [r7, #4] + 800b826: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b828: 62fb str r3, [r7, #44] ; 0x2c + pcb->unsent = pcb->unsent->next; + 800b82a: 687b ldr r3, [r7, #4] + 800b82c: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b82e: 681a ldr r2, [r3, #0] + 800b830: 687b ldr r3, [r7, #4] + 800b832: 669a str r2, [r3, #104] ; 0x68 +#if TCP_OVERSIZE + if (pcb->unsent == NULL) { + 800b834: 687b ldr r3, [r7, #4] + 800b836: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b838: 2b00 cmp r3, #0 + 800b83a: d103 bne.n 800b844 + pcb->unsent_oversize = 0; + 800b83c: 687b ldr r3, [r7, #4] + 800b83e: 2200 movs r2, #0 + 800b840: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 + } +#endif /* TCP_OVERSIZE */ + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); + LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); + 800b844: 687b ldr r3, [r7, #4] + 800b846: f8b3 4062 ldrh.w r4, [r3, #98] ; 0x62 + 800b84a: 6afb ldr r3, [r7, #44] ; 0x2c + 800b84c: 685b ldr r3, [r3, #4] + 800b84e: 4618 mov r0, r3 + 800b850: f7fc fe0c bl 800846c + 800b854: 4603 mov r3, r0 + 800b856: 429c cmp r4, r3 + 800b858: d206 bcs.n 800b868 + 800b85a: 4b2b ldr r3, [pc, #172] ; (800b908 ) + 800b85c: f240 42d5 movw r2, #1237 ; 0x4d5 + 800b860: 492a ldr r1, [pc, #168] ; (800b90c ) + 800b862: 482b ldr r0, [pc, #172] ; (800b910 ) + 800b864: f007 fa8e bl 8012d84 + /* Prevent ACK for FIN to generate a sent event */ + pcb->snd_queuelen -= pbuf_clen(next->p); + 800b868: 6afb ldr r3, [r7, #44] ; 0x2c + 800b86a: 685b ldr r3, [r3, #4] + 800b86c: 4618 mov r0, r3 + 800b86e: f7fc fdfd bl 800846c + 800b872: 4603 mov r3, r0 + 800b874: 461a mov r2, r3 + 800b876: 687b ldr r3, [r7, #4] + 800b878: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800b87c: 1a9b subs r3, r3, r2 + 800b87e: b29a uxth r2, r3 + 800b880: 687b ldr r3, [r7, #4] + 800b882: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 + recv_acked += next->len; + 800b886: 6afb ldr r3, [r7, #44] ; 0x2c + 800b888: 891a ldrh r2, [r3, #8] + 800b88a: 4b22 ldr r3, [pc, #136] ; (800b914 ) + 800b88c: 881b ldrh r3, [r3, #0] + 800b88e: 4413 add r3, r2 + 800b890: b29a uxth r2, r3 + 800b892: 4b20 ldr r3, [pc, #128] ; (800b914 ) + 800b894: 801a strh r2, [r3, #0] + tcp_seg_free(next); + 800b896: 6af8 ldr r0, [r7, #44] ; 0x2c + 800b898: f7fe f8de bl 8009a58 + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unsent)\n", (tcpwnd_size_t)pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + 800b89c: 687b ldr r3, [r7, #4] + 800b89e: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800b8a2: 2b00 cmp r3, #0 + 800b8a4: d00e beq.n 800b8c4 + LWIP_ASSERT("tcp_receive: valid queue length", + 800b8a6: 687b ldr r3, [r7, #4] + 800b8a8: 6edb ldr r3, [r3, #108] ; 0x6c + 800b8aa: 2b00 cmp r3, #0 + 800b8ac: d10a bne.n 800b8c4 + 800b8ae: 687b ldr r3, [r7, #4] + 800b8b0: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b8b2: 2b00 cmp r3, #0 + 800b8b4: d106 bne.n 800b8c4 + 800b8b6: 4b14 ldr r3, [pc, #80] ; (800b908 ) + 800b8b8: f240 42dc movw r2, #1244 ; 0x4dc + 800b8bc: 4916 ldr r1, [pc, #88] ; (800b918 ) + 800b8be: 4814 ldr r0, [pc, #80] ; (800b910 ) + 800b8c0: f007 fa60 bl 8012d84 + while (pcb->unsent != NULL && + 800b8c4: 687b ldr r3, [r7, #4] + 800b8c6: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b8c8: 2b00 cmp r3, #0 + 800b8ca: d037 beq.n 800b93c + TCP_SEQ_BETWEEN(ackno, lwip_ntohl(pcb->unsent->tcphdr->seqno) + + 800b8cc: 4b13 ldr r3, [pc, #76] ; (800b91c ) + 800b8ce: 681c ldr r4, [r3, #0] + 800b8d0: 687b ldr r3, [r7, #4] + 800b8d2: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b8d4: 68db ldr r3, [r3, #12] + 800b8d6: 685b ldr r3, [r3, #4] + 800b8d8: 4618 mov r0, r3 + 800b8da: f7fb fc08 bl 80070ee + 800b8de: 4605 mov r5, r0 + 800b8e0: 687b ldr r3, [r7, #4] + 800b8e2: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b8e4: 891b ldrh r3, [r3, #8] + 800b8e6: 461e mov r6, r3 + 800b8e8: 687b ldr r3, [r7, #4] + 800b8ea: 6e9b ldr r3, [r3, #104] ; 0x68 + 800b8ec: 68db ldr r3, [r3, #12] + 800b8ee: 899b ldrh r3, [r3, #12] + 800b8f0: b29b uxth r3, r3 + 800b8f2: 4618 mov r0, r3 + 800b8f4: f7fb fbee bl 80070d4 + 800b8f8: 4603 mov r3, r0 + 800b8fa: f003 0303 and.w r3, r3, #3 + 800b8fe: 2b00 cmp r3, #0 + 800b900: d00e beq.n 800b920 + 800b902: 2301 movs r3, #1 + 800b904: e00d b.n 800b922 + 800b906: bf00 nop + 800b908: 08015180 .word 0x08015180 + 800b90c: 080153c0 .word 0x080153c0 + 800b910: 080151c4 .word 0x080151c4 + 800b914: 20006fa8 .word 0x20006fa8 + 800b918: 080153e8 .word 0x080153e8 + 800b91c: 20006fa4 .word 0x20006fa4 + 800b920: 2300 movs r3, #0 + 800b922: 4433 add r3, r6 + 800b924: 442b add r3, r5 + 800b926: 1ae3 subs r3, r4, r3 + while (pcb->unsent != NULL && + 800b928: 2b00 cmp r3, #0 + 800b92a: db07 blt.n 800b93c + TCP_SEQ_BETWEEN(ackno, lwip_ntohl(pcb->unsent->tcphdr->seqno) + + 800b92c: 4b8d ldr r3, [pc, #564] ; (800bb64 ) + 800b92e: 681a ldr r2, [r3, #0] + 800b930: 687b ldr r3, [r7, #4] + 800b932: 6cdb ldr r3, [r3, #76] ; 0x4c + 800b934: 1ad3 subs r3, r2, r3 + 800b936: 2b00 cmp r3, #0 + 800b938: f77f af74 ble.w 800b824 + pcb->unacked != NULL || pcb->unsent != NULL); + } + } + pcb->snd_buf += recv_acked; + 800b93c: 687b ldr r3, [r7, #4] + 800b93e: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 + 800b942: 4b89 ldr r3, [pc, #548] ; (800bb68 ) + 800b944: 881b ldrh r3, [r3, #0] + 800b946: 4413 add r3, r2 + 800b948: b29a uxth r2, r3 + 800b94a: 687b ldr r3, [r7, #4] + 800b94c: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 + pcb->rttest, pcb->rtseq, ackno)); + + /* RTT estimation calculations. This is done by checking if the + incoming segment acknowledges the segment we use to take a + round-trip time measurement. */ + if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { + 800b950: 687b ldr r3, [r7, #4] + 800b952: 6b5b ldr r3, [r3, #52] ; 0x34 + 800b954: 2b00 cmp r3, #0 + 800b956: d052 beq.n 800b9fe + 800b958: 687b ldr r3, [r7, #4] + 800b95a: 6b9a ldr r2, [r3, #56] ; 0x38 + 800b95c: 4b81 ldr r3, [pc, #516] ; (800bb64 ) + 800b95e: 681b ldr r3, [r3, #0] + 800b960: 1ad3 subs r3, r2, r3 + 800b962: 2b00 cmp r3, #0 + 800b964: da4b bge.n 800b9fe + /* diff between this shouldn't exceed 32K since this are tcp timer ticks + and a round-trip shouldn't be that long... */ + m = (s16_t)(tcp_ticks - pcb->rttest); + 800b966: 4b81 ldr r3, [pc, #516] ; (800bb6c ) + 800b968: 681b ldr r3, [r3, #0] + 800b96a: b29a uxth r2, r3 + 800b96c: 687b ldr r3, [r7, #4] + 800b96e: 6b5b ldr r3, [r3, #52] ; 0x34 + 800b970: b29b uxth r3, r3 + 800b972: 1ad3 subs r3, r2, r3 + 800b974: b29b uxth r3, r3 + 800b976: 847b strh r3, [r7, #34] ; 0x22 + + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", + m, (u16_t)(m * TCP_SLOW_INTERVAL))); + + /* This is taken directly from VJs original code in his paper */ + m = m - (pcb->sa >> 3); + 800b978: 8c7a ldrh r2, [r7, #34] ; 0x22 + 800b97a: 687b ldr r3, [r7, #4] + 800b97c: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c + 800b980: 10db asrs r3, r3, #3 + 800b982: b21b sxth r3, r3 + 800b984: b29b uxth r3, r3 + 800b986: 1ad3 subs r3, r2, r3 + 800b988: b29b uxth r3, r3 + 800b98a: 847b strh r3, [r7, #34] ; 0x22 + pcb->sa += m; + 800b98c: 687b ldr r3, [r7, #4] + 800b98e: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c + 800b992: b29a uxth r2, r3 + 800b994: 8c7b ldrh r3, [r7, #34] ; 0x22 + 800b996: 4413 add r3, r2 + 800b998: b29b uxth r3, r3 + 800b99a: b21a sxth r2, r3 + 800b99c: 687b ldr r3, [r7, #4] + 800b99e: 879a strh r2, [r3, #60] ; 0x3c + if (m < 0) { + 800b9a0: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22 + 800b9a4: 2b00 cmp r3, #0 + 800b9a6: da03 bge.n 800b9b0 + m = -m; + 800b9a8: 8c7b ldrh r3, [r7, #34] ; 0x22 + 800b9aa: 425b negs r3, r3 + 800b9ac: b29b uxth r3, r3 + 800b9ae: 847b strh r3, [r7, #34] ; 0x22 + } + m = m - (pcb->sv >> 2); + 800b9b0: 8c7a ldrh r2, [r7, #34] ; 0x22 + 800b9b2: 687b ldr r3, [r7, #4] + 800b9b4: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e + 800b9b8: 109b asrs r3, r3, #2 + 800b9ba: b21b sxth r3, r3 + 800b9bc: b29b uxth r3, r3 + 800b9be: 1ad3 subs r3, r2, r3 + 800b9c0: b29b uxth r3, r3 + 800b9c2: 847b strh r3, [r7, #34] ; 0x22 + pcb->sv += m; + 800b9c4: 687b ldr r3, [r7, #4] + 800b9c6: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e + 800b9ca: b29a uxth r2, r3 + 800b9cc: 8c7b ldrh r3, [r7, #34] ; 0x22 + 800b9ce: 4413 add r3, r2 + 800b9d0: b29b uxth r3, r3 + 800b9d2: b21a sxth r2, r3 + 800b9d4: 687b ldr r3, [r7, #4] + 800b9d6: 87da strh r2, [r3, #62] ; 0x3e + pcb->rto = (pcb->sa >> 3) + pcb->sv; + 800b9d8: 687b ldr r3, [r7, #4] + 800b9da: f9b3 303c ldrsh.w r3, [r3, #60] ; 0x3c + 800b9de: 10db asrs r3, r3, #3 + 800b9e0: b21b sxth r3, r3 + 800b9e2: b29a uxth r2, r3 + 800b9e4: 687b ldr r3, [r7, #4] + 800b9e6: f9b3 303e ldrsh.w r3, [r3, #62] ; 0x3e + 800b9ea: b29b uxth r3, r3 + 800b9ec: 4413 add r3, r2 + 800b9ee: b29b uxth r3, r3 + 800b9f0: b21a sxth r2, r3 + 800b9f2: 687b ldr r3, [r7, #4] + 800b9f4: f8a3 2040 strh.w r2, [r3, #64] ; 0x40 + + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n", + pcb->rto, (u16_t)(pcb->rto * TCP_SLOW_INTERVAL))); + + pcb->rttest = 0; + 800b9f8: 687b ldr r3, [r7, #4] + 800b9fa: 2200 movs r2, #0 + 800b9fc: 635a str r2, [r3, #52] ; 0x34 + + /* If the incoming segment contains data, we must process it + further unless the pcb already received a FIN. + (RFC 793, chapter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING, + LAST-ACK and TIME-WAIT: "Ignore the segment text.") */ + if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) { + 800b9fe: 4b5c ldr r3, [pc, #368] ; (800bb70 ) + 800ba00: 881b ldrh r3, [r3, #0] + 800ba02: 2b00 cmp r3, #0 + 800ba04: f000 84f1 beq.w 800c3ea + 800ba08: 687b ldr r3, [r7, #4] + 800ba0a: 7d1b ldrb r3, [r3, #20] + 800ba0c: 2b06 cmp r3, #6 + 800ba0e: f200 84ec bhi.w 800c3ea + this if the sequence number of the incoming segment is less + than rcv_nxt, and the sequence number plus the length of the + segment is larger than rcv_nxt. */ + /* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { + if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/ + if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { + 800ba12: 687b ldr r3, [r7, #4] + 800ba14: 6a5a ldr r2, [r3, #36] ; 0x24 + 800ba16: 4b57 ldr r3, [pc, #348] ; (800bb74 ) + 800ba18: 681b ldr r3, [r3, #0] + 800ba1a: 1ad3 subs r3, r2, r3 + 800ba1c: 3b01 subs r3, #1 + 800ba1e: 2b00 cmp r3, #0 + 800ba20: f2c0 80b8 blt.w 800bb94 + 800ba24: 687b ldr r3, [r7, #4] + 800ba26: 6a5a ldr r2, [r3, #36] ; 0x24 + 800ba28: 4b51 ldr r3, [pc, #324] ; (800bb70 ) + 800ba2a: 881b ldrh r3, [r3, #0] + 800ba2c: 4619 mov r1, r3 + 800ba2e: 4b51 ldr r3, [pc, #324] ; (800bb74 ) + 800ba30: 681b ldr r3, [r3, #0] + 800ba32: 440b add r3, r1 + 800ba34: 1ad3 subs r3, r2, r3 + 800ba36: 3301 adds r3, #1 + 800ba38: 2b00 cmp r3, #0 + 800ba3a: f300 80ab bgt.w 800bb94 + + After we are done with adjusting the pbuf pointers we must + adjust the ->data pointer in the seg and the segment + length.*/ + + struct pbuf *p = inseg.p; + 800ba3e: 4b4e ldr r3, [pc, #312] ; (800bb78 ) + 800ba40: 685b ldr r3, [r3, #4] + 800ba42: 61bb str r3, [r7, #24] + off = pcb->rcv_nxt - seqno; + 800ba44: 687b ldr r3, [r7, #4] + 800ba46: 6a5a ldr r2, [r3, #36] ; 0x24 + 800ba48: 4b4a ldr r3, [pc, #296] ; (800bb74 ) + 800ba4a: 681b ldr r3, [r3, #0] + 800ba4c: 1ad3 subs r3, r2, r3 + 800ba4e: 627b str r3, [r7, #36] ; 0x24 + LWIP_ASSERT("inseg.p != NULL", inseg.p); + 800ba50: 4b49 ldr r3, [pc, #292] ; (800bb78 ) + 800ba52: 685b ldr r3, [r3, #4] + 800ba54: 2b00 cmp r3, #0 + 800ba56: d106 bne.n 800ba66 + 800ba58: 4b48 ldr r3, [pc, #288] ; (800bb7c ) + 800ba5a: f240 523c movw r2, #1340 ; 0x53c + 800ba5e: 4948 ldr r1, [pc, #288] ; (800bb80 ) + 800ba60: 4848 ldr r0, [pc, #288] ; (800bb84 ) + 800ba62: f007 f98f bl 8012d84 + LWIP_ASSERT("insane offset!", (off < 0x7fff)); + 800ba66: 6a7b ldr r3, [r7, #36] ; 0x24 + 800ba68: f647 72fe movw r2, #32766 ; 0x7ffe + 800ba6c: 4293 cmp r3, r2 + 800ba6e: dd06 ble.n 800ba7e + 800ba70: 4b42 ldr r3, [pc, #264] ; (800bb7c ) + 800ba72: f240 523d movw r2, #1341 ; 0x53d + 800ba76: 4944 ldr r1, [pc, #272] ; (800bb88 ) + 800ba78: 4842 ldr r0, [pc, #264] ; (800bb84 ) + 800ba7a: f007 f983 bl 8012d84 + if (inseg.p->len < off) { + 800ba7e: 4b3e ldr r3, [pc, #248] ; (800bb78 ) + 800ba80: 685b ldr r3, [r3, #4] + 800ba82: 895b ldrh r3, [r3, #10] + 800ba84: 461a mov r2, r3 + 800ba86: 6a7b ldr r3, [r7, #36] ; 0x24 + 800ba88: 4293 cmp r3, r2 + 800ba8a: dd3e ble.n 800bb0a + LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); + 800ba8c: 4b3a ldr r3, [pc, #232] ; (800bb78 ) + 800ba8e: 685b ldr r3, [r3, #4] + 800ba90: 891b ldrh r3, [r3, #8] + 800ba92: 461a mov r2, r3 + 800ba94: 6a7b ldr r3, [r7, #36] ; 0x24 + 800ba96: 4293 cmp r3, r2 + 800ba98: dd06 ble.n 800baa8 + 800ba9a: 4b38 ldr r3, [pc, #224] ; (800bb7c ) + 800ba9c: f240 523f movw r2, #1343 ; 0x53f + 800baa0: 493a ldr r1, [pc, #232] ; (800bb8c ) + 800baa2: 4838 ldr r0, [pc, #224] ; (800bb84 ) + 800baa4: f007 f96e bl 8012d84 + new_tot_len = (u16_t)(inseg.p->tot_len - off); + 800baa8: 4b33 ldr r3, [pc, #204] ; (800bb78 ) + 800baaa: 685b ldr r3, [r3, #4] + 800baac: 891a ldrh r2, [r3, #8] + 800baae: 6a7b ldr r3, [r7, #36] ; 0x24 + 800bab0: b29b uxth r3, r3 + 800bab2: 1ad3 subs r3, r2, r3 + 800bab4: 823b strh r3, [r7, #16] + while (p->len < off) { + 800bab6: e00e b.n 800bad6 + off -= p->len; + 800bab8: 69bb ldr r3, [r7, #24] + 800baba: 895b ldrh r3, [r3, #10] + 800babc: 461a mov r2, r3 + 800babe: 6a7b ldr r3, [r7, #36] ; 0x24 + 800bac0: 1a9b subs r3, r3, r2 + 800bac2: 627b str r3, [r7, #36] ; 0x24 + /* KJM following line changed (with addition of new_tot_len var) + to fix bug #9076 + inseg.p->tot_len -= p->len; */ + p->tot_len = new_tot_len; + 800bac4: 69bb ldr r3, [r7, #24] + 800bac6: 8a3a ldrh r2, [r7, #16] + 800bac8: 811a strh r2, [r3, #8] + p->len = 0; + 800baca: 69bb ldr r3, [r7, #24] + 800bacc: 2200 movs r2, #0 + 800bace: 815a strh r2, [r3, #10] + p = p->next; + 800bad0: 69bb ldr r3, [r7, #24] + 800bad2: 681b ldr r3, [r3, #0] + 800bad4: 61bb str r3, [r7, #24] + while (p->len < off) { + 800bad6: 69bb ldr r3, [r7, #24] + 800bad8: 895b ldrh r3, [r3, #10] + 800bada: 461a mov r2, r3 + 800badc: 6a7b ldr r3, [r7, #36] ; 0x24 + 800bade: 4293 cmp r3, r2 + 800bae0: dcea bgt.n 800bab8 + } + if (pbuf_header(p, (s16_t)-off)) { + 800bae2: 6a7b ldr r3, [r7, #36] ; 0x24 + 800bae4: b29b uxth r3, r3 + 800bae6: 425b negs r3, r3 + 800bae8: b29b uxth r3, r3 + 800baea: b21b sxth r3, r3 + 800baec: 4619 mov r1, r3 + 800baee: 69b8 ldr r0, [r7, #24] + 800baf0: f7fc fc04 bl 80082fc + 800baf4: 4603 mov r3, r0 + 800baf6: 2b00 cmp r3, #0 + 800baf8: d01c beq.n 800bb34 + /* Do we need to cope with this failing? Assert for now */ + LWIP_ASSERT("pbuf_header failed", 0); + 800bafa: 4b20 ldr r3, [pc, #128] ; (800bb7c ) + 800bafc: f240 524c movw r2, #1356 ; 0x54c + 800bb00: 4923 ldr r1, [pc, #140] ; (800bb90 ) + 800bb02: 4820 ldr r0, [pc, #128] ; (800bb84 ) + 800bb04: f007 f93e bl 8012d84 + 800bb08: e014 b.n 800bb34 + } + } else { + if (pbuf_header(inseg.p, (s16_t)-off)) { + 800bb0a: 4b1b ldr r3, [pc, #108] ; (800bb78 ) + 800bb0c: 685b ldr r3, [r3, #4] + 800bb0e: 6a7a ldr r2, [r7, #36] ; 0x24 + 800bb10: b292 uxth r2, r2 + 800bb12: 4252 negs r2, r2 + 800bb14: b292 uxth r2, r2 + 800bb16: b212 sxth r2, r2 + 800bb18: 4611 mov r1, r2 + 800bb1a: 4618 mov r0, r3 + 800bb1c: f7fc fbee bl 80082fc + 800bb20: 4603 mov r3, r0 + 800bb22: 2b00 cmp r3, #0 + 800bb24: d006 beq.n 800bb34 + /* Do we need to cope with this failing? Assert for now */ + LWIP_ASSERT("pbuf_header failed", 0); + 800bb26: 4b15 ldr r3, [pc, #84] ; (800bb7c ) + 800bb28: f240 5251 movw r2, #1361 ; 0x551 + 800bb2c: 4918 ldr r1, [pc, #96] ; (800bb90 ) + 800bb2e: 4815 ldr r0, [pc, #84] ; (800bb84 ) + 800bb30: f007 f928 bl 8012d84 + } + } + inseg.len -= (u16_t)(pcb->rcv_nxt - seqno); + 800bb34: 4b10 ldr r3, [pc, #64] ; (800bb78 ) + 800bb36: 891a ldrh r2, [r3, #8] + 800bb38: 4b0e ldr r3, [pc, #56] ; (800bb74 ) + 800bb3a: 681b ldr r3, [r3, #0] + 800bb3c: b299 uxth r1, r3 + 800bb3e: 687b ldr r3, [r7, #4] + 800bb40: 6a5b ldr r3, [r3, #36] ; 0x24 + 800bb42: b29b uxth r3, r3 + 800bb44: 1acb subs r3, r1, r3 + 800bb46: b29b uxth r3, r3 + 800bb48: 4413 add r3, r2 + 800bb4a: b29a uxth r2, r3 + 800bb4c: 4b0a ldr r3, [pc, #40] ; (800bb78 ) + 800bb4e: 811a strh r2, [r3, #8] + inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; + 800bb50: 687b ldr r3, [r7, #4] + 800bb52: 6a5b ldr r3, [r3, #36] ; 0x24 + 800bb54: 4a07 ldr r2, [pc, #28] ; (800bb74 ) + 800bb56: 6013 str r3, [r2, #0] + 800bb58: 4b07 ldr r3, [pc, #28] ; (800bb78 ) + 800bb5a: 68db ldr r3, [r3, #12] + 800bb5c: 4a05 ldr r2, [pc, #20] ; (800bb74 ) + 800bb5e: 6812 ldr r2, [r2, #0] + 800bb60: 605a str r2, [r3, #4] + if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { + 800bb62: e025 b.n 800bbb0 + 800bb64: 20006fa4 .word 0x20006fa4 + 800bb68: 20006fa8 .word 0x20006fa8 + 800bb6c: 20006f68 .word 0x20006f68 + 800bb70: 20006faa .word 0x20006faa + 800bb74: 20006fa0 .word 0x20006fa0 + 800bb78: 20006f80 .word 0x20006f80 + 800bb7c: 08015180 .word 0x08015180 + 800bb80: 08015408 .word 0x08015408 + 800bb84: 080151c4 .word 0x080151c4 + 800bb88: 08015418 .word 0x08015418 + 800bb8c: 08015428 .word 0x08015428 + 800bb90: 08015438 .word 0x08015438 + } + else { + if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { + 800bb94: 4b87 ldr r3, [pc, #540] ; (800bdb4 ) + 800bb96: 681a ldr r2, [r3, #0] + 800bb98: 687b ldr r3, [r7, #4] + 800bb9a: 6a5b ldr r3, [r3, #36] ; 0x24 + 800bb9c: 1ad3 subs r3, r2, r3 + 800bb9e: 2b00 cmp r3, #0 + 800bba0: da06 bge.n 800bbb0 + /* the whole segment is < rcv_nxt */ + /* must be a duplicate of a packet that has already been correctly handled */ + + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno)); + tcp_ack_now(pcb); + 800bba2: 687b ldr r3, [r7, #4] + 800bba4: 7e9b ldrb r3, [r3, #26] + 800bba6: f043 0302 orr.w r3, r3, #2 + 800bbaa: b2da uxtb r2, r3 + 800bbac: 687b ldr r3, [r7, #4] + 800bbae: 769a strb r2, [r3, #26] + } + + /* The sequence number must be within the window (above rcv_nxt + and below rcv_nxt + rcv_wnd) in order to be further + processed. */ + if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, + 800bbb0: 4b80 ldr r3, [pc, #512] ; (800bdb4 ) + 800bbb2: 681a ldr r2, [r3, #0] + 800bbb4: 687b ldr r3, [r7, #4] + 800bbb6: 6a5b ldr r3, [r3, #36] ; 0x24 + 800bbb8: 1ad3 subs r3, r2, r3 + 800bbba: 2b00 cmp r3, #0 + 800bbbc: f2c0 8410 blt.w 800c3e0 + 800bbc0: 4b7c ldr r3, [pc, #496] ; (800bdb4 ) + 800bbc2: 681a ldr r2, [r3, #0] + 800bbc4: 687b ldr r3, [r7, #4] + 800bbc6: 6a5b ldr r3, [r3, #36] ; 0x24 + 800bbc8: 6879 ldr r1, [r7, #4] + 800bbca: 8d09 ldrh r1, [r1, #40] ; 0x28 + 800bbcc: 440b add r3, r1 + 800bbce: 1ad3 subs r3, r2, r3 + 800bbd0: 3301 adds r3, #1 + 800bbd2: 2b00 cmp r3, #0 + 800bbd4: f300 8404 bgt.w 800c3e0 + pcb->rcv_nxt + pcb->rcv_wnd - 1)) { + if (pcb->rcv_nxt == seqno) { + 800bbd8: 687b ldr r3, [r7, #4] + 800bbda: 6a5a ldr r2, [r3, #36] ; 0x24 + 800bbdc: 4b75 ldr r3, [pc, #468] ; (800bdb4 ) + 800bbde: 681b ldr r3, [r3, #0] + 800bbe0: 429a cmp r2, r3 + 800bbe2: f040 8287 bne.w 800c0f4 + /* The incoming segment is the next in sequence. We check if + we have to trim the end of the segment and update rcv_nxt + and pass the data to the application. */ + tcplen = TCP_TCPLEN(&inseg); + 800bbe6: 4b74 ldr r3, [pc, #464] ; (800bdb8 ) + 800bbe8: 891c ldrh r4, [r3, #8] + 800bbea: 4b73 ldr r3, [pc, #460] ; (800bdb8 ) + 800bbec: 68db ldr r3, [r3, #12] + 800bbee: 899b ldrh r3, [r3, #12] + 800bbf0: b29b uxth r3, r3 + 800bbf2: 4618 mov r0, r3 + 800bbf4: f7fb fa6e bl 80070d4 + 800bbf8: 4603 mov r3, r0 + 800bbfa: f003 0303 and.w r3, r3, #3 + 800bbfe: 2b00 cmp r3, #0 + 800bc00: d001 beq.n 800bc06 + 800bc02: 2301 movs r3, #1 + 800bc04: e000 b.n 800bc08 + 800bc06: 2300 movs r3, #0 + 800bc08: 4423 add r3, r4 + 800bc0a: b29a uxth r2, r3 + 800bc0c: 4b6b ldr r3, [pc, #428] ; (800bdbc ) + 800bc0e: 801a strh r2, [r3, #0] + + if (tcplen > pcb->rcv_wnd) { + 800bc10: 687b ldr r3, [r7, #4] + 800bc12: 8d1a ldrh r2, [r3, #40] ; 0x28 + 800bc14: 4b69 ldr r3, [pc, #420] ; (800bdbc ) + 800bc16: 881b ldrh r3, [r3, #0] + 800bc18: 429a cmp r2, r3 + 800bc1a: d26e bcs.n 800bcfa + LWIP_DEBUGF(TCP_INPUT_DEBUG, + ("tcp_receive: other end overran receive window" + "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", + seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); + if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { + 800bc1c: 4b66 ldr r3, [pc, #408] ; (800bdb8 ) + 800bc1e: 68db ldr r3, [r3, #12] + 800bc20: 899b ldrh r3, [r3, #12] + 800bc22: b29b uxth r3, r3 + 800bc24: 4618 mov r0, r3 + 800bc26: f7fb fa55 bl 80070d4 + 800bc2a: 4603 mov r3, r0 + 800bc2c: f003 0301 and.w r3, r3, #1 + 800bc30: 2b00 cmp r3, #0 + 800bc32: d01b beq.n 800bc6c + /* Must remove the FIN from the header as we're trimming + * that byte of sequence-space from the packet */ + TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN); + 800bc34: 4b60 ldr r3, [pc, #384] ; (800bdb8 ) + 800bc36: 68db ldr r3, [r3, #12] + 800bc38: 899b ldrh r3, [r3, #12] + 800bc3a: b29b uxth r3, r3 + 800bc3c: f423 537c bic.w r3, r3, #16128 ; 0x3f00 + 800bc40: b29c uxth r4, r3 + 800bc42: 4b5d ldr r3, [pc, #372] ; (800bdb8 ) + 800bc44: 68db ldr r3, [r3, #12] + 800bc46: 899b ldrh r3, [r3, #12] + 800bc48: b29b uxth r3, r3 + 800bc4a: 4618 mov r0, r3 + 800bc4c: f7fb fa42 bl 80070d4 + 800bc50: 4603 mov r3, r0 + 800bc52: f003 033e and.w r3, r3, #62 ; 0x3e + 800bc56: b29b uxth r3, r3 + 800bc58: 4618 mov r0, r3 + 800bc5a: f7fb fa3b bl 80070d4 + 800bc5e: 4603 mov r3, r0 + 800bc60: 461a mov r2, r3 + 800bc62: 4b55 ldr r3, [pc, #340] ; (800bdb8 ) + 800bc64: 68db ldr r3, [r3, #12] + 800bc66: 4322 orrs r2, r4 + 800bc68: b292 uxth r2, r2 + 800bc6a: 819a strh r2, [r3, #12] + } + /* Adjust length of segment to fit in the window. */ + TCPWND_CHECK16(pcb->rcv_wnd); + inseg.len = (u16_t)pcb->rcv_wnd; + 800bc6c: 687b ldr r3, [r7, #4] + 800bc6e: 8d1a ldrh r2, [r3, #40] ; 0x28 + 800bc70: 4b51 ldr r3, [pc, #324] ; (800bdb8 ) + 800bc72: 811a strh r2, [r3, #8] + if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { + 800bc74: 4b50 ldr r3, [pc, #320] ; (800bdb8 ) + 800bc76: 68db ldr r3, [r3, #12] + 800bc78: 899b ldrh r3, [r3, #12] + 800bc7a: b29b uxth r3, r3 + 800bc7c: 4618 mov r0, r3 + 800bc7e: f7fb fa29 bl 80070d4 + 800bc82: 4603 mov r3, r0 + 800bc84: f003 0302 and.w r3, r3, #2 + 800bc88: 2b00 cmp r3, #0 + 800bc8a: d005 beq.n 800bc98 + inseg.len -= 1; + 800bc8c: 4b4a ldr r3, [pc, #296] ; (800bdb8 ) + 800bc8e: 891b ldrh r3, [r3, #8] + 800bc90: 3b01 subs r3, #1 + 800bc92: b29a uxth r2, r3 + 800bc94: 4b48 ldr r3, [pc, #288] ; (800bdb8 ) + 800bc96: 811a strh r2, [r3, #8] + } + pbuf_realloc(inseg.p, inseg.len); + 800bc98: 4b47 ldr r3, [pc, #284] ; (800bdb8 ) + 800bc9a: 685b ldr r3, [r3, #4] + 800bc9c: 4a46 ldr r2, [pc, #280] ; (800bdb8 ) + 800bc9e: 8912 ldrh r2, [r2, #8] + 800bca0: 4611 mov r1, r2 + 800bca2: 4618 mov r0, r3 + 800bca4: f7fc f9da bl 800805c + tcplen = TCP_TCPLEN(&inseg); + 800bca8: 4b43 ldr r3, [pc, #268] ; (800bdb8 ) + 800bcaa: 891c ldrh r4, [r3, #8] + 800bcac: 4b42 ldr r3, [pc, #264] ; (800bdb8 ) + 800bcae: 68db ldr r3, [r3, #12] + 800bcb0: 899b ldrh r3, [r3, #12] + 800bcb2: b29b uxth r3, r3 + 800bcb4: 4618 mov r0, r3 + 800bcb6: f7fb fa0d bl 80070d4 + 800bcba: 4603 mov r3, r0 + 800bcbc: f003 0303 and.w r3, r3, #3 + 800bcc0: 2b00 cmp r3, #0 + 800bcc2: d001 beq.n 800bcc8 + 800bcc4: 2301 movs r3, #1 + 800bcc6: e000 b.n 800bcca + 800bcc8: 2300 movs r3, #0 + 800bcca: 4423 add r3, r4 + 800bccc: b29a uxth r2, r3 + 800bcce: 4b3b ldr r3, [pc, #236] ; (800bdbc ) + 800bcd0: 801a strh r2, [r3, #0] + LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", + 800bcd2: 4b3a ldr r3, [pc, #232] ; (800bdbc ) + 800bcd4: 881b ldrh r3, [r3, #0] + 800bcd6: 461a mov r2, r3 + 800bcd8: 4b36 ldr r3, [pc, #216] ; (800bdb4 ) + 800bcda: 681b ldr r3, [r3, #0] + 800bcdc: 441a add r2, r3 + 800bcde: 687b ldr r3, [r7, #4] + 800bce0: 6a5b ldr r3, [r3, #36] ; 0x24 + 800bce2: 6879 ldr r1, [r7, #4] + 800bce4: 8d09 ldrh r1, [r1, #40] ; 0x28 + 800bce6: 440b add r3, r1 + 800bce8: 429a cmp r2, r3 + 800bcea: d006 beq.n 800bcfa + 800bcec: 4b34 ldr r3, [pc, #208] ; (800bdc0 ) + 800bcee: f240 527e movw r2, #1406 ; 0x57e + 800bcf2: 4934 ldr r1, [pc, #208] ; (800bdc4 ) + 800bcf4: 4834 ldr r0, [pc, #208] ; (800bdc8 ) + 800bcf6: f007 f845 bl 8012d84 + } +#if TCP_QUEUE_OOSEQ + /* Received in-sequence data, adjust ooseq data if: + - FIN has been received or + - inseq overlaps with ooseq */ + if (pcb->ooseq != NULL) { + 800bcfa: 687b ldr r3, [r7, #4] + 800bcfc: 6f1b ldr r3, [r3, #112] ; 0x70 + 800bcfe: 2b00 cmp r3, #0 + 800bd00: f000 80e1 beq.w 800bec6 + if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { + 800bd04: 4b2c ldr r3, [pc, #176] ; (800bdb8 ) + 800bd06: 68db ldr r3, [r3, #12] + 800bd08: 899b ldrh r3, [r3, #12] + 800bd0a: b29b uxth r3, r3 + 800bd0c: 4618 mov r0, r3 + 800bd0e: f7fb f9e1 bl 80070d4 + 800bd12: 4603 mov r3, r0 + 800bd14: f003 0301 and.w r3, r3, #1 + 800bd18: 2b00 cmp r3, #0 + 800bd1a: d010 beq.n 800bd3e + LWIP_DEBUGF(TCP_INPUT_DEBUG, + ("tcp_receive: received in-order FIN, binning ooseq queue\n")); + /* Received in-order FIN means anything that was received + * out of order must now have been received in-order, so + * bin the ooseq queue */ + while (pcb->ooseq != NULL) { + 800bd1c: e00a b.n 800bd34 + struct tcp_seg *old_ooseq = pcb->ooseq; + 800bd1e: 687b ldr r3, [r7, #4] + 800bd20: 6f1b ldr r3, [r3, #112] ; 0x70 + 800bd22: 60bb str r3, [r7, #8] + pcb->ooseq = pcb->ooseq->next; + 800bd24: 687b ldr r3, [r7, #4] + 800bd26: 6f1b ldr r3, [r3, #112] ; 0x70 + 800bd28: 681a ldr r2, [r3, #0] + 800bd2a: 687b ldr r3, [r7, #4] + 800bd2c: 671a str r2, [r3, #112] ; 0x70 + tcp_seg_free(old_ooseq); + 800bd2e: 68b8 ldr r0, [r7, #8] + 800bd30: f7fd fe92 bl 8009a58 + while (pcb->ooseq != NULL) { + 800bd34: 687b ldr r3, [r7, #4] + 800bd36: 6f1b ldr r3, [r3, #112] ; 0x70 + 800bd38: 2b00 cmp r3, #0 + 800bd3a: d1f0 bne.n 800bd1e + 800bd3c: e0c3 b.n 800bec6 + } + } else { + next = pcb->ooseq; + 800bd3e: 687b ldr r3, [r7, #4] + 800bd40: 6f1b ldr r3, [r3, #112] ; 0x70 + 800bd42: 62fb str r3, [r7, #44] ; 0x2c + /* Remove all segments on ooseq that are covered by inseg already. + * FIN is copied from ooseq to inseg if present. */ + while (next && + 800bd44: e04f b.n 800bde6 + TCP_SEQ_GEQ(seqno + tcplen, + next->tcphdr->seqno + next->len)) { + /* inseg cannot have FIN here (already processed above) */ + if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && + 800bd46: 6afb ldr r3, [r7, #44] ; 0x2c + 800bd48: 68db ldr r3, [r3, #12] + 800bd4a: 899b ldrh r3, [r3, #12] + 800bd4c: b29b uxth r3, r3 + 800bd4e: 4618 mov r0, r3 + 800bd50: f7fb f9c0 bl 80070d4 + 800bd54: 4603 mov r3, r0 + 800bd56: f003 0301 and.w r3, r3, #1 + 800bd5a: 2b00 cmp r3, #0 + 800bd5c: d03b beq.n 800bdd6 + (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { + 800bd5e: 4b16 ldr r3, [pc, #88] ; (800bdb8 ) + 800bd60: 68db ldr r3, [r3, #12] + 800bd62: 899b ldrh r3, [r3, #12] + 800bd64: b29b uxth r3, r3 + 800bd66: 4618 mov r0, r3 + 800bd68: f7fb f9b4 bl 80070d4 + 800bd6c: 4603 mov r3, r0 + 800bd6e: f003 0302 and.w r3, r3, #2 + if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && + 800bd72: 2b00 cmp r3, #0 + 800bd74: d12f bne.n 800bdd6 + TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); + 800bd76: 4b10 ldr r3, [pc, #64] ; (800bdb8 ) + 800bd78: 68db ldr r3, [r3, #12] + 800bd7a: 899b ldrh r3, [r3, #12] + 800bd7c: b29c uxth r4, r3 + 800bd7e: 2001 movs r0, #1 + 800bd80: f7fb f9a8 bl 80070d4 + 800bd84: 4603 mov r3, r0 + 800bd86: 461a mov r2, r3 + 800bd88: 4b0b ldr r3, [pc, #44] ; (800bdb8 ) + 800bd8a: 68db ldr r3, [r3, #12] + 800bd8c: 4322 orrs r2, r4 + 800bd8e: b292 uxth r2, r2 + 800bd90: 819a strh r2, [r3, #12] + tcplen = TCP_TCPLEN(&inseg); + 800bd92: 4b09 ldr r3, [pc, #36] ; (800bdb8 ) + 800bd94: 891c ldrh r4, [r3, #8] + 800bd96: 4b08 ldr r3, [pc, #32] ; (800bdb8 ) + 800bd98: 68db ldr r3, [r3, #12] + 800bd9a: 899b ldrh r3, [r3, #12] + 800bd9c: b29b uxth r3, r3 + 800bd9e: 4618 mov r0, r3 + 800bda0: f7fb f998 bl 80070d4 + 800bda4: 4603 mov r3, r0 + 800bda6: f003 0303 and.w r3, r3, #3 + 800bdaa: 2b00 cmp r3, #0 + 800bdac: d00e beq.n 800bdcc + 800bdae: 2301 movs r3, #1 + 800bdb0: e00d b.n 800bdce + 800bdb2: bf00 nop + 800bdb4: 20006fa0 .word 0x20006fa0 + 800bdb8: 20006f80 .word 0x20006f80 + 800bdbc: 20006faa .word 0x20006faa + 800bdc0: 08015180 .word 0x08015180 + 800bdc4: 0801544c .word 0x0801544c + 800bdc8: 080151c4 .word 0x080151c4 + 800bdcc: 2300 movs r3, #0 + 800bdce: 4423 add r3, r4 + 800bdd0: b29a uxth r2, r3 + 800bdd2: 4b95 ldr r3, [pc, #596] ; (800c028 ) + 800bdd4: 801a strh r2, [r3, #0] + } + prev = next; + 800bdd6: 6afb ldr r3, [r7, #44] ; 0x2c + 800bdd8: 62bb str r3, [r7, #40] ; 0x28 + next = next->next; + 800bdda: 6afb ldr r3, [r7, #44] ; 0x2c + 800bddc: 681b ldr r3, [r3, #0] + 800bdde: 62fb str r3, [r7, #44] ; 0x2c + tcp_seg_free(prev); + 800bde0: 6ab8 ldr r0, [r7, #40] ; 0x28 + 800bde2: f7fd fe39 bl 8009a58 + while (next && + 800bde6: 6afb ldr r3, [r7, #44] ; 0x2c + 800bde8: 2b00 cmp r3, #0 + 800bdea: d00e beq.n 800be0a + TCP_SEQ_GEQ(seqno + tcplen, + 800bdec: 4b8e ldr r3, [pc, #568] ; (800c028 ) + 800bdee: 881b ldrh r3, [r3, #0] + 800bdf0: 461a mov r2, r3 + 800bdf2: 4b8e ldr r3, [pc, #568] ; (800c02c ) + 800bdf4: 681b ldr r3, [r3, #0] + 800bdf6: 441a add r2, r3 + 800bdf8: 6afb ldr r3, [r7, #44] ; 0x2c + 800bdfa: 68db ldr r3, [r3, #12] + 800bdfc: 685b ldr r3, [r3, #4] + 800bdfe: 6af9 ldr r1, [r7, #44] ; 0x2c + 800be00: 8909 ldrh r1, [r1, #8] + 800be02: 440b add r3, r1 + 800be04: 1ad3 subs r3, r2, r3 + while (next && + 800be06: 2b00 cmp r3, #0 + 800be08: da9d bge.n 800bd46 + } + /* Now trim right side of inseg if it overlaps with the first + * segment on ooseq */ + if (next && + 800be0a: 6afb ldr r3, [r7, #44] ; 0x2c + 800be0c: 2b00 cmp r3, #0 + 800be0e: d057 beq.n 800bec0 + TCP_SEQ_GT(seqno + tcplen, + 800be10: 4b85 ldr r3, [pc, #532] ; (800c028 ) + 800be12: 881b ldrh r3, [r3, #0] + 800be14: 461a mov r2, r3 + 800be16: 4b85 ldr r3, [pc, #532] ; (800c02c ) + 800be18: 681b ldr r3, [r3, #0] + 800be1a: 441a add r2, r3 + 800be1c: 6afb ldr r3, [r7, #44] ; 0x2c + 800be1e: 68db ldr r3, [r3, #12] + 800be20: 685b ldr r3, [r3, #4] + 800be22: 1ad3 subs r3, r2, r3 + if (next && + 800be24: 2b00 cmp r3, #0 + 800be26: dd4b ble.n 800bec0 + next->tcphdr->seqno)) { + /* inseg cannot have FIN here (already processed above) */ + inseg.len = (u16_t)(next->tcphdr->seqno - seqno); + 800be28: 6afb ldr r3, [r7, #44] ; 0x2c + 800be2a: 68db ldr r3, [r3, #12] + 800be2c: 685b ldr r3, [r3, #4] + 800be2e: b29a uxth r2, r3 + 800be30: 4b7e ldr r3, [pc, #504] ; (800c02c ) + 800be32: 681b ldr r3, [r3, #0] + 800be34: b29b uxth r3, r3 + 800be36: 1ad3 subs r3, r2, r3 + 800be38: b29a uxth r2, r3 + 800be3a: 4b7d ldr r3, [pc, #500] ; (800c030 ) + 800be3c: 811a strh r2, [r3, #8] + if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { + 800be3e: 4b7c ldr r3, [pc, #496] ; (800c030 ) + 800be40: 68db ldr r3, [r3, #12] + 800be42: 899b ldrh r3, [r3, #12] + 800be44: b29b uxth r3, r3 + 800be46: 4618 mov r0, r3 + 800be48: f7fb f944 bl 80070d4 + 800be4c: 4603 mov r3, r0 + 800be4e: f003 0302 and.w r3, r3, #2 + 800be52: 2b00 cmp r3, #0 + 800be54: d005 beq.n 800be62 + inseg.len -= 1; + 800be56: 4b76 ldr r3, [pc, #472] ; (800c030 ) + 800be58: 891b ldrh r3, [r3, #8] + 800be5a: 3b01 subs r3, #1 + 800be5c: b29a uxth r2, r3 + 800be5e: 4b74 ldr r3, [pc, #464] ; (800c030 ) + 800be60: 811a strh r2, [r3, #8] + } + pbuf_realloc(inseg.p, inseg.len); + 800be62: 4b73 ldr r3, [pc, #460] ; (800c030 ) + 800be64: 685b ldr r3, [r3, #4] + 800be66: 4a72 ldr r2, [pc, #456] ; (800c030 ) + 800be68: 8912 ldrh r2, [r2, #8] + 800be6a: 4611 mov r1, r2 + 800be6c: 4618 mov r0, r3 + 800be6e: f7fc f8f5 bl 800805c + tcplen = TCP_TCPLEN(&inseg); + 800be72: 4b6f ldr r3, [pc, #444] ; (800c030 ) + 800be74: 891c ldrh r4, [r3, #8] + 800be76: 4b6e ldr r3, [pc, #440] ; (800c030 ) + 800be78: 68db ldr r3, [r3, #12] + 800be7a: 899b ldrh r3, [r3, #12] + 800be7c: b29b uxth r3, r3 + 800be7e: 4618 mov r0, r3 + 800be80: f7fb f928 bl 80070d4 + 800be84: 4603 mov r3, r0 + 800be86: f003 0303 and.w r3, r3, #3 + 800be8a: 2b00 cmp r3, #0 + 800be8c: d001 beq.n 800be92 + 800be8e: 2301 movs r3, #1 + 800be90: e000 b.n 800be94 + 800be92: 2300 movs r3, #0 + 800be94: 4423 add r3, r4 + 800be96: b29a uxth r2, r3 + 800be98: 4b63 ldr r3, [pc, #396] ; (800c028 ) + 800be9a: 801a strh r2, [r3, #0] + LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", + 800be9c: 4b62 ldr r3, [pc, #392] ; (800c028 ) + 800be9e: 881b ldrh r3, [r3, #0] + 800bea0: 461a mov r2, r3 + 800bea2: 4b62 ldr r3, [pc, #392] ; (800c02c ) + 800bea4: 681b ldr r3, [r3, #0] + 800bea6: 441a add r2, r3 + 800bea8: 6afb ldr r3, [r7, #44] ; 0x2c + 800beaa: 68db ldr r3, [r3, #12] + 800beac: 685b ldr r3, [r3, #4] + 800beae: 429a cmp r2, r3 + 800beb0: d006 beq.n 800bec0 + 800beb2: 4b60 ldr r3, [pc, #384] ; (800c034 ) + 800beb4: f240 52ae movw r2, #1454 ; 0x5ae + 800beb8: 495f ldr r1, [pc, #380] ; (800c038 ) + 800beba: 4860 ldr r0, [pc, #384] ; (800c03c ) + 800bebc: f006 ff62 bl 8012d84 + (seqno + tcplen) == next->tcphdr->seqno); + } + pcb->ooseq = next; + 800bec0: 687b ldr r3, [r7, #4] + 800bec2: 6afa ldr r2, [r7, #44] ; 0x2c + 800bec4: 671a str r2, [r3, #112] ; 0x70 + } + } +#endif /* TCP_QUEUE_OOSEQ */ + + pcb->rcv_nxt = seqno + tcplen; + 800bec6: 4b58 ldr r3, [pc, #352] ; (800c028 ) + 800bec8: 881b ldrh r3, [r3, #0] + 800beca: 461a mov r2, r3 + 800becc: 4b57 ldr r3, [pc, #348] ; (800c02c ) + 800bece: 681b ldr r3, [r3, #0] + 800bed0: 441a add r2, r3 + 800bed2: 687b ldr r3, [r7, #4] + 800bed4: 625a str r2, [r3, #36] ; 0x24 + + /* Update the receiver's (our) window. */ + LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); + 800bed6: 687b ldr r3, [r7, #4] + 800bed8: 8d1a ldrh r2, [r3, #40] ; 0x28 + 800beda: 4b53 ldr r3, [pc, #332] ; (800c028 ) + 800bedc: 881b ldrh r3, [r3, #0] + 800bede: 429a cmp r2, r3 + 800bee0: d206 bcs.n 800bef0 + 800bee2: 4b54 ldr r3, [pc, #336] ; (800c034 ) + 800bee4: f240 52b9 movw r2, #1465 ; 0x5b9 + 800bee8: 4955 ldr r1, [pc, #340] ; (800c040 ) + 800beea: 4854 ldr r0, [pc, #336] ; (800c03c ) + 800beec: f006 ff4a bl 8012d84 + pcb->rcv_wnd -= tcplen; + 800bef0: 687b ldr r3, [r7, #4] + 800bef2: 8d1a ldrh r2, [r3, #40] ; 0x28 + 800bef4: 4b4c ldr r3, [pc, #304] ; (800c028 ) + 800bef6: 881b ldrh r3, [r3, #0] + 800bef8: 1ad3 subs r3, r2, r3 + 800befa: b29a uxth r2, r3 + 800befc: 687b ldr r3, [r7, #4] + 800befe: 851a strh r2, [r3, #40] ; 0x28 + + tcp_update_rcv_ann_wnd(pcb); + 800bf00: 6878 ldr r0, [r7, #4] + 800bf02: f7fd f825 bl 8008f50 + chains its data on this pbuf as well. + + If the segment was a FIN, we set the TF_GOT_FIN flag that will + be used to indicate to the application that the remote side has + closed its end of the connection. */ + if (inseg.p->tot_len > 0) { + 800bf06: 4b4a ldr r3, [pc, #296] ; (800c030 ) + 800bf08: 685b ldr r3, [r3, #4] + 800bf0a: 891b ldrh r3, [r3, #8] + 800bf0c: 2b00 cmp r3, #0 + 800bf0e: d006 beq.n 800bf1e + recv_data = inseg.p; + 800bf10: 4b47 ldr r3, [pc, #284] ; (800c030 ) + 800bf12: 685b ldr r3, [r3, #4] + 800bf14: 4a4b ldr r2, [pc, #300] ; (800c044 ) + 800bf16: 6013 str r3, [r2, #0] + /* Since this pbuf now is the responsibility of the + application, we delete our reference to it so that we won't + (mistakingly) deallocate it. */ + inseg.p = NULL; + 800bf18: 4b45 ldr r3, [pc, #276] ; (800c030 ) + 800bf1a: 2200 movs r2, #0 + 800bf1c: 605a str r2, [r3, #4] + } + if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { + 800bf1e: 4b44 ldr r3, [pc, #272] ; (800c030 ) + 800bf20: 68db ldr r3, [r3, #12] + 800bf22: 899b ldrh r3, [r3, #12] + 800bf24: b29b uxth r3, r3 + 800bf26: 4618 mov r0, r3 + 800bf28: f7fb f8d4 bl 80070d4 + 800bf2c: 4603 mov r3, r0 + 800bf2e: f003 0301 and.w r3, r3, #1 + 800bf32: 2b00 cmp r3, #0 + 800bf34: f000 80b4 beq.w 800c0a0 + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); + recv_flags |= TF_GOT_FIN; + 800bf38: 4b43 ldr r3, [pc, #268] ; (800c048 ) + 800bf3a: 781b ldrb r3, [r3, #0] + 800bf3c: f043 0320 orr.w r3, r3, #32 + 800bf40: b2da uxtb r2, r3 + 800bf42: 4b41 ldr r3, [pc, #260] ; (800c048 ) + 800bf44: 701a strb r2, [r3, #0] + } + +#if TCP_QUEUE_OOSEQ + /* We now check if we have segments on the ->ooseq queue that + are now in sequence. */ + while (pcb->ooseq != NULL && + 800bf46: e0ab b.n 800c0a0 + pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { + + cseg = pcb->ooseq; + 800bf48: 687b ldr r3, [r7, #4] + 800bf4a: 6f1b ldr r3, [r3, #112] ; 0x70 + 800bf4c: 60fb str r3, [r7, #12] + seqno = pcb->ooseq->tcphdr->seqno; + 800bf4e: 687b ldr r3, [r7, #4] + 800bf50: 6f1b ldr r3, [r3, #112] ; 0x70 + 800bf52: 68db ldr r3, [r3, #12] + 800bf54: 685b ldr r3, [r3, #4] + 800bf56: 4a35 ldr r2, [pc, #212] ; (800c02c ) + 800bf58: 6013 str r3, [r2, #0] + + pcb->rcv_nxt += TCP_TCPLEN(cseg); + 800bf5a: 68fb ldr r3, [r7, #12] + 800bf5c: 891b ldrh r3, [r3, #8] + 800bf5e: 461c mov r4, r3 + 800bf60: 68fb ldr r3, [r7, #12] + 800bf62: 68db ldr r3, [r3, #12] + 800bf64: 899b ldrh r3, [r3, #12] + 800bf66: b29b uxth r3, r3 + 800bf68: 4618 mov r0, r3 + 800bf6a: f7fb f8b3 bl 80070d4 + 800bf6e: 4603 mov r3, r0 + 800bf70: f003 0303 and.w r3, r3, #3 + 800bf74: 2b00 cmp r3, #0 + 800bf76: d001 beq.n 800bf7c + 800bf78: 2301 movs r3, #1 + 800bf7a: e000 b.n 800bf7e + 800bf7c: 2300 movs r3, #0 + 800bf7e: 191a adds r2, r3, r4 + 800bf80: 687b ldr r3, [r7, #4] + 800bf82: 6a5b ldr r3, [r3, #36] ; 0x24 + 800bf84: 441a add r2, r3 + 800bf86: 687b ldr r3, [r7, #4] + 800bf88: 625a str r2, [r3, #36] ; 0x24 + LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", + 800bf8a: 687b ldr r3, [r7, #4] + 800bf8c: 8d1b ldrh r3, [r3, #40] ; 0x28 + 800bf8e: 461c mov r4, r3 + 800bf90: 68fb ldr r3, [r7, #12] + 800bf92: 891b ldrh r3, [r3, #8] + 800bf94: 461d mov r5, r3 + 800bf96: 68fb ldr r3, [r7, #12] + 800bf98: 68db ldr r3, [r3, #12] + 800bf9a: 899b ldrh r3, [r3, #12] + 800bf9c: b29b uxth r3, r3 + 800bf9e: 4618 mov r0, r3 + 800bfa0: f7fb f898 bl 80070d4 + 800bfa4: 4603 mov r3, r0 + 800bfa6: f003 0303 and.w r3, r3, #3 + 800bfaa: 2b00 cmp r3, #0 + 800bfac: d001 beq.n 800bfb2 + 800bfae: 2301 movs r3, #1 + 800bfb0: e000 b.n 800bfb4 + 800bfb2: 2300 movs r3, #0 + 800bfb4: 442b add r3, r5 + 800bfb6: 429c cmp r4, r3 + 800bfb8: d206 bcs.n 800bfc8 + 800bfba: 4b1e ldr r3, [pc, #120] ; (800c034 ) + 800bfbc: f240 52dd movw r2, #1501 ; 0x5dd + 800bfc0: 4922 ldr r1, [pc, #136] ; (800c04c ) + 800bfc2: 481e ldr r0, [pc, #120] ; (800c03c ) + 800bfc4: f006 fede bl 8012d84 + pcb->rcv_wnd >= TCP_TCPLEN(cseg)); + pcb->rcv_wnd -= TCP_TCPLEN(cseg); + 800bfc8: 68fb ldr r3, [r7, #12] + 800bfca: 891b ldrh r3, [r3, #8] + 800bfcc: 461c mov r4, r3 + 800bfce: 68fb ldr r3, [r7, #12] + 800bfd0: 68db ldr r3, [r3, #12] + 800bfd2: 899b ldrh r3, [r3, #12] + 800bfd4: b29b uxth r3, r3 + 800bfd6: 4618 mov r0, r3 + 800bfd8: f7fb f87c bl 80070d4 + 800bfdc: 4603 mov r3, r0 + 800bfde: f003 0303 and.w r3, r3, #3 + 800bfe2: 2b00 cmp r3, #0 + 800bfe4: d001 beq.n 800bfea + 800bfe6: 2301 movs r3, #1 + 800bfe8: e000 b.n 800bfec + 800bfea: 2300 movs r3, #0 + 800bfec: 1919 adds r1, r3, r4 + 800bfee: 687b ldr r3, [r7, #4] + 800bff0: 8d1a ldrh r2, [r3, #40] ; 0x28 + 800bff2: b28b uxth r3, r1 + 800bff4: 1ad3 subs r3, r2, r3 + 800bff6: b29a uxth r2, r3 + 800bff8: 687b ldr r3, [r7, #4] + 800bffa: 851a strh r2, [r3, #40] ; 0x28 + + tcp_update_rcv_ann_wnd(pcb); + 800bffc: 6878 ldr r0, [r7, #4] + 800bffe: f7fc ffa7 bl 8008f50 + + if (cseg->p->tot_len > 0) { + 800c002: 68fb ldr r3, [r7, #12] + 800c004: 685b ldr r3, [r3, #4] + 800c006: 891b ldrh r3, [r3, #8] + 800c008: 2b00 cmp r3, #0 + 800c00a: d028 beq.n 800c05e + /* Chain this pbuf onto the pbuf that we will pass to + the application. */ + /* With window scaling, this can overflow recv_data->tot_len, but + that's not a problem since we explicitly fix that before passing + recv_data to the application. */ + if (recv_data) { + 800c00c: 4b0d ldr r3, [pc, #52] ; (800c044 ) + 800c00e: 681b ldr r3, [r3, #0] + 800c010: 2b00 cmp r3, #0 + 800c012: d01d beq.n 800c050 + pbuf_cat(recv_data, cseg->p); + 800c014: 4b0b ldr r3, [pc, #44] ; (800c044 ) + 800c016: 681a ldr r2, [r3, #0] + 800c018: 68fb ldr r3, [r7, #12] + 800c01a: 685b ldr r3, [r3, #4] + 800c01c: 4619 mov r1, r3 + 800c01e: 4610 mov r0, r2 + 800c020: f7fc fa5c bl 80084dc + 800c024: e018 b.n 800c058 + 800c026: bf00 nop + 800c028: 20006faa .word 0x20006faa + 800c02c: 20006fa0 .word 0x20006fa0 + 800c030: 20006f80 .word 0x20006f80 + 800c034: 08015180 .word 0x08015180 + 800c038: 08015484 .word 0x08015484 + 800c03c: 080151c4 .word 0x080151c4 + 800c040: 080154c0 .word 0x080154c0 + 800c044: 20006fb0 .word 0x20006fb0 + 800c048: 20006fad .word 0x20006fad + 800c04c: 080154e0 .word 0x080154e0 + } else { + recv_data = cseg->p; + 800c050: 68fb ldr r3, [r7, #12] + 800c052: 685b ldr r3, [r3, #4] + 800c054: 4a71 ldr r2, [pc, #452] ; (800c21c ) + 800c056: 6013 str r3, [r2, #0] + } + cseg->p = NULL; + 800c058: 68fb ldr r3, [r7, #12] + 800c05a: 2200 movs r2, #0 + 800c05c: 605a str r2, [r3, #4] + } + if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { + 800c05e: 68fb ldr r3, [r7, #12] + 800c060: 68db ldr r3, [r3, #12] + 800c062: 899b ldrh r3, [r3, #12] + 800c064: b29b uxth r3, r3 + 800c066: 4618 mov r0, r3 + 800c068: f7fb f834 bl 80070d4 + 800c06c: 4603 mov r3, r0 + 800c06e: f003 0301 and.w r3, r3, #1 + 800c072: 2b00 cmp r3, #0 + 800c074: d00d beq.n 800c092 + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); + recv_flags |= TF_GOT_FIN; + 800c076: 4b6a ldr r3, [pc, #424] ; (800c220 ) + 800c078: 781b ldrb r3, [r3, #0] + 800c07a: f043 0320 orr.w r3, r3, #32 + 800c07e: b2da uxtb r2, r3 + 800c080: 4b67 ldr r3, [pc, #412] ; (800c220 ) + 800c082: 701a strb r2, [r3, #0] + if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ + 800c084: 687b ldr r3, [r7, #4] + 800c086: 7d1b ldrb r3, [r3, #20] + 800c088: 2b04 cmp r3, #4 + 800c08a: d102 bne.n 800c092 + pcb->state = CLOSE_WAIT; + 800c08c: 687b ldr r3, [r7, #4] + 800c08e: 2207 movs r2, #7 + 800c090: 751a strb r2, [r3, #20] + } + } + + pcb->ooseq = cseg->next; + 800c092: 68fb ldr r3, [r7, #12] + 800c094: 681a ldr r2, [r3, #0] + 800c096: 687b ldr r3, [r7, #4] + 800c098: 671a str r2, [r3, #112] ; 0x70 + tcp_seg_free(cseg); + 800c09a: 68f8 ldr r0, [r7, #12] + 800c09c: f7fd fcdc bl 8009a58 + while (pcb->ooseq != NULL && + 800c0a0: 687b ldr r3, [r7, #4] + 800c0a2: 6f1b ldr r3, [r3, #112] ; 0x70 + 800c0a4: 2b00 cmp r3, #0 + 800c0a6: d008 beq.n 800c0ba + pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { + 800c0a8: 687b ldr r3, [r7, #4] + 800c0aa: 6f1b ldr r3, [r3, #112] ; 0x70 + 800c0ac: 68db ldr r3, [r3, #12] + 800c0ae: 685a ldr r2, [r3, #4] + 800c0b0: 687b ldr r3, [r7, #4] + 800c0b2: 6a5b ldr r3, [r3, #36] ; 0x24 + while (pcb->ooseq != NULL && + 800c0b4: 429a cmp r2, r3 + 800c0b6: f43f af47 beq.w 800bf48 + } +#endif /* TCP_QUEUE_OOSEQ */ + + + /* Acknowledge the segment(s). */ + tcp_ack(pcb); + 800c0ba: 687b ldr r3, [r7, #4] + 800c0bc: 7e9b ldrb r3, [r3, #26] + 800c0be: f003 0301 and.w r3, r3, #1 + 800c0c2: 2b00 cmp r3, #0 + 800c0c4: d00e beq.n 800c0e4 + 800c0c6: 687b ldr r3, [r7, #4] + 800c0c8: 7e9b ldrb r3, [r3, #26] + 800c0ca: f023 0301 bic.w r3, r3, #1 + 800c0ce: b2da uxtb r2, r3 + 800c0d0: 687b ldr r3, [r7, #4] + 800c0d2: 769a strb r2, [r3, #26] + 800c0d4: 687b ldr r3, [r7, #4] + 800c0d6: 7e9b ldrb r3, [r3, #26] + 800c0d8: f043 0302 orr.w r3, r3, #2 + 800c0dc: b2da uxtb r2, r3 + 800c0de: 687b ldr r3, [r7, #4] + 800c0e0: 769a strb r2, [r3, #26] + if (pcb->rcv_nxt == seqno) { + 800c0e2: e181 b.n 800c3e8 + tcp_ack(pcb); + 800c0e4: 687b ldr r3, [r7, #4] + 800c0e6: 7e9b ldrb r3, [r3, #26] + 800c0e8: f043 0301 orr.w r3, r3, #1 + 800c0ec: b2da uxtb r2, r3 + 800c0ee: 687b ldr r3, [r7, #4] + 800c0f0: 769a strb r2, [r3, #26] + if (pcb->rcv_nxt == seqno) { + 800c0f2: e179 b.n 800c3e8 + } +#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ + + } else { + /* We get here if the incoming segment is out-of-sequence. */ + tcp_send_empty_ack(pcb); + 800c0f4: 6878 ldr r0, [r7, #4] + 800c0f6: f001 f8c3 bl 800d280 +#if TCP_QUEUE_OOSEQ + /* We queue the segment on the ->ooseq queue. */ + if (pcb->ooseq == NULL) { + 800c0fa: 687b ldr r3, [r7, #4] + 800c0fc: 6f1b ldr r3, [r3, #112] ; 0x70 + 800c0fe: 2b00 cmp r3, #0 + 800c100: d106 bne.n 800c110 + pcb->ooseq = tcp_seg_copy(&inseg); + 800c102: 4848 ldr r0, [pc, #288] ; (800c224 ) + 800c104: f7fd fcc0 bl 8009a88 + 800c108: 4602 mov r2, r0 + 800c10a: 687b ldr r3, [r7, #4] + 800c10c: 671a str r2, [r3, #112] ; 0x70 + if (pcb->rcv_nxt == seqno) { + 800c10e: e16b b.n 800c3e8 + + If the incoming segment has the same sequence number as a + segment on the ->ooseq queue, we discard the segment that + contains less data. */ + + prev = NULL; + 800c110: 2300 movs r3, #0 + 800c112: 62bb str r3, [r7, #40] ; 0x28 + for (next = pcb->ooseq; next != NULL; next = next->next) { + 800c114: 687b ldr r3, [r7, #4] + 800c116: 6f1b ldr r3, [r3, #112] ; 0x70 + 800c118: 62fb str r3, [r7, #44] ; 0x2c + 800c11a: e150 b.n 800c3be + if (seqno == next->tcphdr->seqno) { + 800c11c: 6afb ldr r3, [r7, #44] ; 0x2c + 800c11e: 68db ldr r3, [r3, #12] + 800c120: 685a ldr r2, [r3, #4] + 800c122: 4b41 ldr r3, [pc, #260] ; (800c228 ) + 800c124: 681b ldr r3, [r3, #0] + 800c126: 429a cmp r2, r3 + 800c128: d11d bne.n 800c166 + /* The sequence number of the incoming segment is the + same as the sequence number of the segment on + ->ooseq. We check the lengths to see which one to + discard. */ + if (inseg.len > next->len) { + 800c12a: 4b3e ldr r3, [pc, #248] ; (800c224 ) + 800c12c: 891a ldrh r2, [r3, #8] + 800c12e: 6afb ldr r3, [r7, #44] ; 0x2c + 800c130: 891b ldrh r3, [r3, #8] + 800c132: 429a cmp r2, r3 + 800c134: f240 8148 bls.w 800c3c8 + /* The incoming segment is larger than the old + segment. We replace some segments with the new + one. */ + cseg = tcp_seg_copy(&inseg); + 800c138: 483a ldr r0, [pc, #232] ; (800c224 ) + 800c13a: f7fd fca5 bl 8009a88 + 800c13e: 60f8 str r0, [r7, #12] + if (cseg != NULL) { + 800c140: 68fb ldr r3, [r7, #12] + 800c142: 2b00 cmp r3, #0 + 800c144: f000 8142 beq.w 800c3cc + if (prev != NULL) { + 800c148: 6abb ldr r3, [r7, #40] ; 0x28 + 800c14a: 2b00 cmp r3, #0 + 800c14c: d003 beq.n 800c156 + prev->next = cseg; + 800c14e: 6abb ldr r3, [r7, #40] ; 0x28 + 800c150: 68fa ldr r2, [r7, #12] + 800c152: 601a str r2, [r3, #0] + 800c154: e002 b.n 800c15c + } else { + pcb->ooseq = cseg; + 800c156: 687b ldr r3, [r7, #4] + 800c158: 68fa ldr r2, [r7, #12] + 800c15a: 671a str r2, [r3, #112] ; 0x70 + } + tcp_oos_insert_segment(cseg, next); + 800c15c: 6af9 ldr r1, [r7, #44] ; 0x2c + 800c15e: 68f8 ldr r0, [r7, #12] + 800c160: f7ff f8fe bl 800b360 + } + break; + 800c164: e132 b.n 800c3cc + segment was smaller than the old one; in either + case, we ditch the incoming segment. */ + break; + } + } else { + if (prev == NULL) { + 800c166: 6abb ldr r3, [r7, #40] ; 0x28 + 800c168: 2b00 cmp r3, #0 + 800c16a: d117 bne.n 800c19c + if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { + 800c16c: 4b2e ldr r3, [pc, #184] ; (800c228 ) + 800c16e: 681a ldr r2, [r3, #0] + 800c170: 6afb ldr r3, [r7, #44] ; 0x2c + 800c172: 68db ldr r3, [r3, #12] + 800c174: 685b ldr r3, [r3, #4] + 800c176: 1ad3 subs r3, r2, r3 + 800c178: 2b00 cmp r3, #0 + 800c17a: da57 bge.n 800c22c + /* The sequence number of the incoming segment is lower + than the sequence number of the first segment on the + queue. We put the incoming segment first on the + queue. */ + cseg = tcp_seg_copy(&inseg); + 800c17c: 4829 ldr r0, [pc, #164] ; (800c224 ) + 800c17e: f7fd fc83 bl 8009a88 + 800c182: 60f8 str r0, [r7, #12] + if (cseg != NULL) { + 800c184: 68fb ldr r3, [r7, #12] + 800c186: 2b00 cmp r3, #0 + 800c188: f000 8122 beq.w 800c3d0 + pcb->ooseq = cseg; + 800c18c: 687b ldr r3, [r7, #4] + 800c18e: 68fa ldr r2, [r7, #12] + 800c190: 671a str r2, [r3, #112] ; 0x70 + tcp_oos_insert_segment(cseg, next); + 800c192: 6af9 ldr r1, [r7, #44] ; 0x2c + 800c194: 68f8 ldr r0, [r7, #12] + 800c196: f7ff f8e3 bl 800b360 + } + break; + 800c19a: e119 b.n 800c3d0 + } + } else { + /*if (TCP_SEQ_LT(prev->tcphdr->seqno, seqno) && + TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/ + if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno+1, next->tcphdr->seqno-1)) { + 800c19c: 4b22 ldr r3, [pc, #136] ; (800c228 ) + 800c19e: 681a ldr r2, [r3, #0] + 800c1a0: 6abb ldr r3, [r7, #40] ; 0x28 + 800c1a2: 68db ldr r3, [r3, #12] + 800c1a4: 685b ldr r3, [r3, #4] + 800c1a6: 1ad3 subs r3, r2, r3 + 800c1a8: 3b01 subs r3, #1 + 800c1aa: 2b00 cmp r3, #0 + 800c1ac: db3e blt.n 800c22c + 800c1ae: 4b1e ldr r3, [pc, #120] ; (800c228 ) + 800c1b0: 681a ldr r2, [r3, #0] + 800c1b2: 6afb ldr r3, [r7, #44] ; 0x2c + 800c1b4: 68db ldr r3, [r3, #12] + 800c1b6: 685b ldr r3, [r3, #4] + 800c1b8: 1ad3 subs r3, r2, r3 + 800c1ba: 3301 adds r3, #1 + 800c1bc: 2b00 cmp r3, #0 + 800c1be: dc35 bgt.n 800c22c + /* The sequence number of the incoming segment is in + between the sequence numbers of the previous and + the next segment on ->ooseq. We trim trim the previous + segment, delete next segments that included in received segment + and trim received, if needed. */ + cseg = tcp_seg_copy(&inseg); + 800c1c0: 4818 ldr r0, [pc, #96] ; (800c224 ) + 800c1c2: f7fd fc61 bl 8009a88 + 800c1c6: 60f8 str r0, [r7, #12] + if (cseg != NULL) { + 800c1c8: 68fb ldr r3, [r7, #12] + 800c1ca: 2b00 cmp r3, #0 + 800c1cc: f000 8102 beq.w 800c3d4 + if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { + 800c1d0: 6abb ldr r3, [r7, #40] ; 0x28 + 800c1d2: 68db ldr r3, [r3, #12] + 800c1d4: 685b ldr r3, [r3, #4] + 800c1d6: 6aba ldr r2, [r7, #40] ; 0x28 + 800c1d8: 8912 ldrh r2, [r2, #8] + 800c1da: 441a add r2, r3 + 800c1dc: 4b12 ldr r3, [pc, #72] ; (800c228 ) + 800c1de: 681b ldr r3, [r3, #0] + 800c1e0: 1ad3 subs r3, r2, r3 + 800c1e2: 2b00 cmp r3, #0 + 800c1e4: dd12 ble.n 800c20c + /* We need to trim the prev segment. */ + prev->len = (u16_t)(seqno - prev->tcphdr->seqno); + 800c1e6: 4b10 ldr r3, [pc, #64] ; (800c228 ) + 800c1e8: 681b ldr r3, [r3, #0] + 800c1ea: b29a uxth r2, r3 + 800c1ec: 6abb ldr r3, [r7, #40] ; 0x28 + 800c1ee: 68db ldr r3, [r3, #12] + 800c1f0: 685b ldr r3, [r3, #4] + 800c1f2: b29b uxth r3, r3 + 800c1f4: 1ad3 subs r3, r2, r3 + 800c1f6: b29a uxth r2, r3 + 800c1f8: 6abb ldr r3, [r7, #40] ; 0x28 + 800c1fa: 811a strh r2, [r3, #8] + pbuf_realloc(prev->p, prev->len); + 800c1fc: 6abb ldr r3, [r7, #40] ; 0x28 + 800c1fe: 685a ldr r2, [r3, #4] + 800c200: 6abb ldr r3, [r7, #40] ; 0x28 + 800c202: 891b ldrh r3, [r3, #8] + 800c204: 4619 mov r1, r3 + 800c206: 4610 mov r0, r2 + 800c208: f7fb ff28 bl 800805c + } + prev->next = cseg; + 800c20c: 6abb ldr r3, [r7, #40] ; 0x28 + 800c20e: 68fa ldr r2, [r7, #12] + 800c210: 601a str r2, [r3, #0] + tcp_oos_insert_segment(cseg, next); + 800c212: 6af9 ldr r1, [r7, #44] ; 0x2c + 800c214: 68f8 ldr r0, [r7, #12] + 800c216: f7ff f8a3 bl 800b360 + } + break; + 800c21a: e0db b.n 800c3d4 + 800c21c: 20006fb0 .word 0x20006fb0 + 800c220: 20006fad .word 0x20006fad + 800c224: 20006f80 .word 0x20006f80 + 800c228: 20006fa0 .word 0x20006fa0 + } + } + /* If the "next" segment is the last segment on the + ooseq queue, we add the incoming segment to the end + of the list. */ + if (next->next == NULL && + 800c22c: 6afb ldr r3, [r7, #44] ; 0x2c + 800c22e: 681b ldr r3, [r3, #0] + 800c230: 2b00 cmp r3, #0 + 800c232: f040 80bf bne.w 800c3b4 + TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { + 800c236: 4b7c ldr r3, [pc, #496] ; (800c428 ) + 800c238: 681a ldr r2, [r3, #0] + 800c23a: 6afb ldr r3, [r7, #44] ; 0x2c + 800c23c: 68db ldr r3, [r3, #12] + 800c23e: 685b ldr r3, [r3, #4] + 800c240: 1ad3 subs r3, r2, r3 + if (next->next == NULL && + 800c242: 2b00 cmp r3, #0 + 800c244: f340 80b6 ble.w 800c3b4 + if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { + 800c248: 6afb ldr r3, [r7, #44] ; 0x2c + 800c24a: 68db ldr r3, [r3, #12] + 800c24c: 899b ldrh r3, [r3, #12] + 800c24e: b29b uxth r3, r3 + 800c250: 4618 mov r0, r3 + 800c252: f7fa ff3f bl 80070d4 + 800c256: 4603 mov r3, r0 + 800c258: f003 0301 and.w r3, r3, #1 + 800c25c: 2b00 cmp r3, #0 + 800c25e: f040 80bb bne.w 800c3d8 + /* segment "next" already contains all data */ + break; + } + next->next = tcp_seg_copy(&inseg); + 800c262: 4872 ldr r0, [pc, #456] ; (800c42c ) + 800c264: f7fd fc10 bl 8009a88 + 800c268: 4602 mov r2, r0 + 800c26a: 6afb ldr r3, [r7, #44] ; 0x2c + 800c26c: 601a str r2, [r3, #0] + if (next->next != NULL) { + 800c26e: 6afb ldr r3, [r7, #44] ; 0x2c + 800c270: 681b ldr r3, [r3, #0] + 800c272: 2b00 cmp r3, #0 + 800c274: f000 80b2 beq.w 800c3dc + if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { + 800c278: 6afb ldr r3, [r7, #44] ; 0x2c + 800c27a: 68db ldr r3, [r3, #12] + 800c27c: 685b ldr r3, [r3, #4] + 800c27e: 6afa ldr r2, [r7, #44] ; 0x2c + 800c280: 8912 ldrh r2, [r2, #8] + 800c282: 441a add r2, r3 + 800c284: 4b68 ldr r3, [pc, #416] ; (800c428 ) + 800c286: 681b ldr r3, [r3, #0] + 800c288: 1ad3 subs r3, r2, r3 + 800c28a: 2b00 cmp r3, #0 + 800c28c: dd12 ble.n 800c2b4 + /* We need to trim the last segment. */ + next->len = (u16_t)(seqno - next->tcphdr->seqno); + 800c28e: 4b66 ldr r3, [pc, #408] ; (800c428 ) + 800c290: 681b ldr r3, [r3, #0] + 800c292: b29a uxth r2, r3 + 800c294: 6afb ldr r3, [r7, #44] ; 0x2c + 800c296: 68db ldr r3, [r3, #12] + 800c298: 685b ldr r3, [r3, #4] + 800c29a: b29b uxth r3, r3 + 800c29c: 1ad3 subs r3, r2, r3 + 800c29e: b29a uxth r2, r3 + 800c2a0: 6afb ldr r3, [r7, #44] ; 0x2c + 800c2a2: 811a strh r2, [r3, #8] + pbuf_realloc(next->p, next->len); + 800c2a4: 6afb ldr r3, [r7, #44] ; 0x2c + 800c2a6: 685a ldr r2, [r3, #4] + 800c2a8: 6afb ldr r3, [r7, #44] ; 0x2c + 800c2aa: 891b ldrh r3, [r3, #8] + 800c2ac: 4619 mov r1, r3 + 800c2ae: 4610 mov r0, r2 + 800c2b0: f7fb fed4 bl 800805c + } + /* check if the remote side overruns our receive window */ + if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) { + 800c2b4: 4b5e ldr r3, [pc, #376] ; (800c430 ) + 800c2b6: 881b ldrh r3, [r3, #0] + 800c2b8: 461a mov r2, r3 + 800c2ba: 4b5b ldr r3, [pc, #364] ; (800c428 ) + 800c2bc: 681b ldr r3, [r3, #0] + 800c2be: 441a add r2, r3 + 800c2c0: 687b ldr r3, [r7, #4] + 800c2c2: 6a5b ldr r3, [r3, #36] ; 0x24 + 800c2c4: 6879 ldr r1, [r7, #4] + 800c2c6: 8d09 ldrh r1, [r1, #40] ; 0x28 + 800c2c8: 440b add r3, r1 + 800c2ca: 1ad3 subs r3, r2, r3 + 800c2cc: 2b00 cmp r3, #0 + 800c2ce: f340 8085 ble.w 800c3dc + LWIP_DEBUGF(TCP_INPUT_DEBUG, + ("tcp_receive: other end overran receive window" + "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", + seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); + if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) { + 800c2d2: 6afb ldr r3, [r7, #44] ; 0x2c + 800c2d4: 681b ldr r3, [r3, #0] + 800c2d6: 68db ldr r3, [r3, #12] + 800c2d8: 899b ldrh r3, [r3, #12] + 800c2da: b29b uxth r3, r3 + 800c2dc: 4618 mov r0, r3 + 800c2de: f7fa fef9 bl 80070d4 + 800c2e2: 4603 mov r3, r0 + 800c2e4: f003 0301 and.w r3, r3, #1 + 800c2e8: 2b00 cmp r3, #0 + 800c2ea: d01e beq.n 800c32a + /* Must remove the FIN from the header as we're trimming + * that byte of sequence-space from the packet */ + TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN); + 800c2ec: 6afb ldr r3, [r7, #44] ; 0x2c + 800c2ee: 681b ldr r3, [r3, #0] + 800c2f0: 68db ldr r3, [r3, #12] + 800c2f2: 899b ldrh r3, [r3, #12] + 800c2f4: b29b uxth r3, r3 + 800c2f6: f423 537c bic.w r3, r3, #16128 ; 0x3f00 + 800c2fa: b29c uxth r4, r3 + 800c2fc: 6afb ldr r3, [r7, #44] ; 0x2c + 800c2fe: 681b ldr r3, [r3, #0] + 800c300: 68db ldr r3, [r3, #12] + 800c302: 899b ldrh r3, [r3, #12] + 800c304: b29b uxth r3, r3 + 800c306: 4618 mov r0, r3 + 800c308: f7fa fee4 bl 80070d4 + 800c30c: 4603 mov r3, r0 + 800c30e: f003 033e and.w r3, r3, #62 ; 0x3e + 800c312: b29b uxth r3, r3 + 800c314: 4618 mov r0, r3 + 800c316: f7fa fedd bl 80070d4 + 800c31a: 4603 mov r3, r0 + 800c31c: 461a mov r2, r3 + 800c31e: 6afb ldr r3, [r7, #44] ; 0x2c + 800c320: 681b ldr r3, [r3, #0] + 800c322: 68db ldr r3, [r3, #12] + 800c324: 4322 orrs r2, r4 + 800c326: b292 uxth r2, r2 + 800c328: 819a strh r2, [r3, #12] + } + /* Adjust length of segment to fit in the window. */ + next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno); + 800c32a: 687b ldr r3, [r7, #4] + 800c32c: 6a5b ldr r3, [r3, #36] ; 0x24 + 800c32e: b29a uxth r2, r3 + 800c330: 687b ldr r3, [r7, #4] + 800c332: 8d1b ldrh r3, [r3, #40] ; 0x28 + 800c334: 4413 add r3, r2 + 800c336: b299 uxth r1, r3 + 800c338: 4b3b ldr r3, [pc, #236] ; (800c428 ) + 800c33a: 681b ldr r3, [r3, #0] + 800c33c: b29a uxth r2, r3 + 800c33e: 6afb ldr r3, [r7, #44] ; 0x2c + 800c340: 681b ldr r3, [r3, #0] + 800c342: 1a8a subs r2, r1, r2 + 800c344: b292 uxth r2, r2 + 800c346: 811a strh r2, [r3, #8] + pbuf_realloc(next->next->p, next->next->len); + 800c348: 6afb ldr r3, [r7, #44] ; 0x2c + 800c34a: 681b ldr r3, [r3, #0] + 800c34c: 685a ldr r2, [r3, #4] + 800c34e: 6afb ldr r3, [r7, #44] ; 0x2c + 800c350: 681b ldr r3, [r3, #0] + 800c352: 891b ldrh r3, [r3, #8] + 800c354: 4619 mov r1, r3 + 800c356: 4610 mov r0, r2 + 800c358: f7fb fe80 bl 800805c + tcplen = TCP_TCPLEN(next->next); + 800c35c: 6afb ldr r3, [r7, #44] ; 0x2c + 800c35e: 681b ldr r3, [r3, #0] + 800c360: 891c ldrh r4, [r3, #8] + 800c362: 6afb ldr r3, [r7, #44] ; 0x2c + 800c364: 681b ldr r3, [r3, #0] + 800c366: 68db ldr r3, [r3, #12] + 800c368: 899b ldrh r3, [r3, #12] + 800c36a: b29b uxth r3, r3 + 800c36c: 4618 mov r0, r3 + 800c36e: f7fa feb1 bl 80070d4 + 800c372: 4603 mov r3, r0 + 800c374: f003 0303 and.w r3, r3, #3 + 800c378: 2b00 cmp r3, #0 + 800c37a: d001 beq.n 800c380 + 800c37c: 2301 movs r3, #1 + 800c37e: e000 b.n 800c382 + 800c380: 2300 movs r3, #0 + 800c382: 4423 add r3, r4 + 800c384: b29a uxth r2, r3 + 800c386: 4b2a ldr r3, [pc, #168] ; (800c430 ) + 800c388: 801a strh r2, [r3, #0] + LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", + 800c38a: 4b29 ldr r3, [pc, #164] ; (800c430 ) + 800c38c: 881b ldrh r3, [r3, #0] + 800c38e: 461a mov r2, r3 + 800c390: 4b25 ldr r3, [pc, #148] ; (800c428 ) + 800c392: 681b ldr r3, [r3, #0] + 800c394: 441a add r2, r3 + 800c396: 687b ldr r3, [r7, #4] + 800c398: 6a5b ldr r3, [r3, #36] ; 0x24 + 800c39a: 6879 ldr r1, [r7, #4] + 800c39c: 8d09 ldrh r1, [r1, #40] ; 0x28 + 800c39e: 440b add r3, r1 + 800c3a0: 429a cmp r2, r3 + 800c3a2: d01b beq.n 800c3dc + 800c3a4: 4b23 ldr r3, [pc, #140] ; (800c434 ) + 800c3a6: f240 627a movw r2, #1658 ; 0x67a + 800c3aa: 4923 ldr r1, [pc, #140] ; (800c438 ) + 800c3ac: 4823 ldr r0, [pc, #140] ; (800c43c ) + 800c3ae: f006 fce9 bl 8012d84 + (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); + } + } + break; + 800c3b2: e013 b.n 800c3dc + } + } + prev = next; + 800c3b4: 6afb ldr r3, [r7, #44] ; 0x2c + 800c3b6: 62bb str r3, [r7, #40] ; 0x28 + for (next = pcb->ooseq; next != NULL; next = next->next) { + 800c3b8: 6afb ldr r3, [r7, #44] ; 0x2c + 800c3ba: 681b ldr r3, [r3, #0] + 800c3bc: 62fb str r3, [r7, #44] ; 0x2c + 800c3be: 6afb ldr r3, [r7, #44] ; 0x2c + 800c3c0: 2b00 cmp r3, #0 + 800c3c2: f47f aeab bne.w 800c11c + if (pcb->rcv_nxt == seqno) { + 800c3c6: e00f b.n 800c3e8 + break; + 800c3c8: bf00 nop + 800c3ca: e00d b.n 800c3e8 + break; + 800c3cc: bf00 nop + 800c3ce: e00b b.n 800c3e8 + break; + 800c3d0: bf00 nop + 800c3d2: e009 b.n 800c3e8 + break; + 800c3d4: bf00 nop + 800c3d6: e007 b.n 800c3e8 + break; + 800c3d8: bf00 nop + 800c3da: e005 b.n 800c3e8 + break; + 800c3dc: bf00 nop + if (pcb->rcv_nxt == seqno) { + 800c3de: e003 b.n 800c3e8 +#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ +#endif /* TCP_QUEUE_OOSEQ */ + } + } else { + /* The incoming segment is not within the window. */ + tcp_send_empty_ack(pcb); + 800c3e0: 6878 ldr r0, [r7, #4] + 800c3e2: f000 ff4d bl 800d280 + if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, + 800c3e6: e01a b.n 800c41e + 800c3e8: e019 b.n 800c41e + } + } else { + /* Segments with length 0 is taken care of here. Segments that + fall out of the window are ACKed. */ + if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) { + 800c3ea: 4b0f ldr r3, [pc, #60] ; (800c428 ) + 800c3ec: 681a ldr r2, [r3, #0] + 800c3ee: 687b ldr r3, [r7, #4] + 800c3f0: 6a5b ldr r3, [r3, #36] ; 0x24 + 800c3f2: 1ad3 subs r3, r2, r3 + 800c3f4: 2b00 cmp r3, #0 + 800c3f6: db0a blt.n 800c40e + 800c3f8: 4b0b ldr r3, [pc, #44] ; (800c428 ) + 800c3fa: 681a ldr r2, [r3, #0] + 800c3fc: 687b ldr r3, [r7, #4] + 800c3fe: 6a5b ldr r3, [r3, #36] ; 0x24 + 800c400: 6879 ldr r1, [r7, #4] + 800c402: 8d09 ldrh r1, [r1, #40] ; 0x28 + 800c404: 440b add r3, r1 + 800c406: 1ad3 subs r3, r2, r3 + 800c408: 3301 adds r3, #1 + 800c40a: 2b00 cmp r3, #0 + 800c40c: dd07 ble.n 800c41e + tcp_ack_now(pcb); + 800c40e: 687b ldr r3, [r7, #4] + 800c410: 7e9b ldrb r3, [r3, #26] + 800c412: f043 0302 orr.w r3, r3, #2 + 800c416: b2da uxtb r2, r3 + 800c418: 687b ldr r3, [r7, #4] + 800c41a: 769a strb r2, [r3, #26] + } + } +} + 800c41c: e7ff b.n 800c41e + 800c41e: bf00 nop + 800c420: 3734 adds r7, #52 ; 0x34 + 800c422: 46bd mov sp, r7 + 800c424: bdf0 pop {r4, r5, r6, r7, pc} + 800c426: bf00 nop + 800c428: 20006fa0 .word 0x20006fa0 + 800c42c: 20006f80 .word 0x20006f80 + 800c430: 20006faa .word 0x20006faa + 800c434: 08015180 .word 0x08015180 + 800c438: 0801544c .word 0x0801544c + 800c43c: 080151c4 .word 0x080151c4 + +0800c440 : + +static u8_t +tcp_getoptbyte(void) +{ + 800c440: b480 push {r7} + 800c442: b083 sub sp, #12 + 800c444: af00 add r7, sp, #0 + if ((tcphdr_opt2 == NULL) || (tcp_optidx < tcphdr_opt1len)) { + 800c446: 4b17 ldr r3, [pc, #92] ; (800c4a4 ) + 800c448: 681b ldr r3, [r3, #0] + 800c44a: 2b00 cmp r3, #0 + 800c44c: d005 beq.n 800c45a + 800c44e: 4b16 ldr r3, [pc, #88] ; (800c4a8 ) + 800c450: 881a ldrh r2, [r3, #0] + 800c452: 4b16 ldr r3, [pc, #88] ; (800c4ac ) + 800c454: 881b ldrh r3, [r3, #0] + 800c456: 429a cmp r2, r3 + 800c458: d20e bcs.n 800c478 + u8_t* opts = (u8_t *)tcphdr + TCP_HLEN; + 800c45a: 4b15 ldr r3, [pc, #84] ; (800c4b0 ) + 800c45c: 681b ldr r3, [r3, #0] + 800c45e: 3314 adds r3, #20 + 800c460: 603b str r3, [r7, #0] + return opts[tcp_optidx++]; + 800c462: 4b11 ldr r3, [pc, #68] ; (800c4a8 ) + 800c464: 881b ldrh r3, [r3, #0] + 800c466: 1c5a adds r2, r3, #1 + 800c468: b291 uxth r1, r2 + 800c46a: 4a0f ldr r2, [pc, #60] ; (800c4a8 ) + 800c46c: 8011 strh r1, [r2, #0] + 800c46e: 461a mov r2, r3 + 800c470: 683b ldr r3, [r7, #0] + 800c472: 4413 add r3, r2 + 800c474: 781b ldrb r3, [r3, #0] + 800c476: e010 b.n 800c49a + } else { + u8_t idx = (u8_t)(tcp_optidx++ - tcphdr_opt1len); + 800c478: 4b0b ldr r3, [pc, #44] ; (800c4a8 ) + 800c47a: 881b ldrh r3, [r3, #0] + 800c47c: 1c5a adds r2, r3, #1 + 800c47e: b291 uxth r1, r2 + 800c480: 4a09 ldr r2, [pc, #36] ; (800c4a8 ) + 800c482: 8011 strh r1, [r2, #0] + 800c484: b2da uxtb r2, r3 + 800c486: 4b09 ldr r3, [pc, #36] ; (800c4ac ) + 800c488: 881b ldrh r3, [r3, #0] + 800c48a: b2db uxtb r3, r3 + 800c48c: 1ad3 subs r3, r2, r3 + 800c48e: 71fb strb r3, [r7, #7] + return tcphdr_opt2[idx]; + 800c490: 4b04 ldr r3, [pc, #16] ; (800c4a4 ) + 800c492: 681a ldr r2, [r3, #0] + 800c494: 79fb ldrb r3, [r7, #7] + 800c496: 4413 add r3, r2 + 800c498: 781b ldrb r3, [r3, #0] + } +} + 800c49a: 4618 mov r0, r3 + 800c49c: 370c adds r7, #12 + 800c49e: 46bd mov sp, r7 + 800c4a0: bc80 pop {r7} + 800c4a2: 4770 bx lr + 800c4a4: 20006f98 .word 0x20006f98 + 800c4a8: 20006f9c .word 0x20006f9c + 800c4ac: 20006f96 .word 0x20006f96 + 800c4b0: 20006f90 .word 0x20006f90 + +0800c4b4 : + * + * @param pcb the tcp_pcb for which a segment arrived + */ +static void +tcp_parseopt(struct tcp_pcb *pcb) +{ + 800c4b4: b580 push {r7, lr} + 800c4b6: b084 sub sp, #16 + 800c4b8: af00 add r7, sp, #0 + 800c4ba: 6078 str r0, [r7, #4] +#if LWIP_TCP_TIMESTAMPS + u32_t tsval; +#endif + + /* Parse the TCP MSS option, if present. */ + if (tcphdr_optlen != 0) { + 800c4bc: 4b2e ldr r3, [pc, #184] ; (800c578 ) + 800c4be: 881b ldrh r3, [r3, #0] + 800c4c0: 2b00 cmp r3, #0 + 800c4c2: d055 beq.n 800c570 + for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { + 800c4c4: 4b2d ldr r3, [pc, #180] ; (800c57c ) + 800c4c6: 2200 movs r2, #0 + 800c4c8: 801a strh r2, [r3, #0] + 800c4ca: e045 b.n 800c558 + u8_t opt = tcp_getoptbyte(); + 800c4cc: f7ff ffb8 bl 800c440 + 800c4d0: 4603 mov r3, r0 + 800c4d2: 73fb strb r3, [r7, #15] + switch (opt) { + 800c4d4: 7bfb ldrb r3, [r7, #15] + 800c4d6: 2b02 cmp r3, #2 + 800c4d8: d006 beq.n 800c4e8 + 800c4da: 2b02 cmp r3, #2 + 800c4dc: dc2b bgt.n 800c536 + 800c4de: 2b00 cmp r3, #0 + 800c4e0: d041 beq.n 800c566 + 800c4e2: 2b01 cmp r3, #1 + 800c4e4: d127 bne.n 800c536 + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); + return; + case LWIP_TCP_OPT_NOP: + /* NOP option. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); + break; + 800c4e6: e037 b.n 800c558 + case LWIP_TCP_OPT_MSS: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); + if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) { + 800c4e8: f7ff ffaa bl 800c440 + 800c4ec: 4603 mov r3, r0 + 800c4ee: 2b04 cmp r3, #4 + 800c4f0: d13b bne.n 800c56a + 800c4f2: 4b22 ldr r3, [pc, #136] ; (800c57c ) + 800c4f4: 881b ldrh r3, [r3, #0] + 800c4f6: 3301 adds r3, #1 + 800c4f8: 4a1f ldr r2, [pc, #124] ; (800c578 ) + 800c4fa: 8812 ldrh r2, [r2, #0] + 800c4fc: 4293 cmp r3, r2 + 800c4fe: da34 bge.n 800c56a + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; + } + /* An MSS option with the right option length. */ + mss = (tcp_getoptbyte() << 8); + 800c500: f7ff ff9e bl 800c440 + 800c504: 4603 mov r3, r0 + 800c506: b29b uxth r3, r3 + 800c508: 021b lsls r3, r3, #8 + 800c50a: 81bb strh r3, [r7, #12] + mss |= tcp_getoptbyte(); + 800c50c: f7ff ff98 bl 800c440 + 800c510: 4603 mov r3, r0 + 800c512: b29a uxth r2, r3 + 800c514: 89bb ldrh r3, [r7, #12] + 800c516: 4313 orrs r3, r2 + 800c518: 81bb strh r3, [r7, #12] + /* Limit the mss to the configured TCP_MSS and prevent division by zero */ + pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; + 800c51a: 89bb ldrh r3, [r7, #12] + 800c51c: f5b3 7f06 cmp.w r3, #536 ; 0x218 + 800c520: d804 bhi.n 800c52c + 800c522: 89bb ldrh r3, [r7, #12] + 800c524: 2b00 cmp r3, #0 + 800c526: d001 beq.n 800c52c + 800c528: 89ba ldrh r2, [r7, #12] + 800c52a: e001 b.n 800c530 + 800c52c: f44f 7206 mov.w r2, #536 ; 0x218 + 800c530: 687b ldr r3, [r7, #4] + 800c532: 865a strh r2, [r3, #50] ; 0x32 + break; + 800c534: e010 b.n 800c558 + tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6; + break; +#endif + default: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); + data = tcp_getoptbyte(); + 800c536: f7ff ff83 bl 800c440 + 800c53a: 4603 mov r3, r0 + 800c53c: 72fb strb r3, [r7, #11] + if (data < 2) { + 800c53e: 7afb ldrb r3, [r7, #11] + 800c540: 2b01 cmp r3, #1 + 800c542: d914 bls.n 800c56e + 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; + 800c544: 7afb ldrb r3, [r7, #11] + 800c546: b29a uxth r2, r3 + 800c548: 4b0c ldr r3, [pc, #48] ; (800c57c ) + 800c54a: 881b ldrh r3, [r3, #0] + 800c54c: 4413 add r3, r2 + 800c54e: b29b uxth r3, r3 + 800c550: 3b02 subs r3, #2 + 800c552: b29a uxth r2, r3 + 800c554: 4b09 ldr r3, [pc, #36] ; (800c57c ) + 800c556: 801a strh r2, [r3, #0] + for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { + 800c558: 4b08 ldr r3, [pc, #32] ; (800c57c ) + 800c55a: 881a ldrh r2, [r3, #0] + 800c55c: 4b06 ldr r3, [pc, #24] ; (800c578 ) + 800c55e: 881b ldrh r3, [r3, #0] + 800c560: 429a cmp r2, r3 + 800c562: d3b3 bcc.n 800c4cc + 800c564: e004 b.n 800c570 + return; + 800c566: bf00 nop + 800c568: e002 b.n 800c570 + return; + 800c56a: bf00 nop + 800c56c: e000 b.n 800c570 + return; + 800c56e: bf00 nop + } + } + } +} + 800c570: 3710 adds r7, #16 + 800c572: 46bd mov sp, r7 + 800c574: bd80 pop {r7, pc} + 800c576: bf00 nop + 800c578: 20006f94 .word 0x20006f94 + 800c57c: 20006f9c .word 0x20006f9c + +0800c580 : + +void +tcp_trigger_input_pcb_close(void) +{ + 800c580: b480 push {r7} + 800c582: af00 add r7, sp, #0 + recv_flags |= TF_CLOSED; + 800c584: 4b05 ldr r3, [pc, #20] ; (800c59c ) + 800c586: 781b ldrb r3, [r3, #0] + 800c588: f043 0310 orr.w r3, r3, #16 + 800c58c: b2da uxtb r2, r3 + 800c58e: 4b03 ldr r3, [pc, #12] ; (800c59c ) + 800c590: 701a strb r2, [r3, #0] +} + 800c592: bf00 nop + 800c594: 46bd mov sp, r7 + 800c596: bc80 pop {r7} + 800c598: 4770 bx lr + 800c59a: bf00 nop + 800c59c: 20006fad .word 0x20006fad + +0800c5a0 : + * @return pbuf with p->payload being the tcp_hdr + */ +static struct pbuf * +tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, + u32_t seqno_be /* already in network byte order */) +{ + 800c5a0: b580 push {r7, lr} + 800c5a2: b086 sub sp, #24 + 800c5a4: af00 add r7, sp, #0 + 800c5a6: 60f8 str r0, [r7, #12] + 800c5a8: 607b str r3, [r7, #4] + 800c5aa: 460b mov r3, r1 + 800c5ac: 817b strh r3, [r7, #10] + 800c5ae: 4613 mov r3, r2 + 800c5b0: 813b strh r3, [r7, #8] + struct tcp_hdr *tcphdr; + struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); + 800c5b2: 897a ldrh r2, [r7, #10] + 800c5b4: 893b ldrh r3, [r7, #8] + 800c5b6: 4413 add r3, r2 + 800c5b8: b29b uxth r3, r3 + 800c5ba: 3314 adds r3, #20 + 800c5bc: b29b uxth r3, r3 + 800c5be: 2200 movs r2, #0 + 800c5c0: 4619 mov r1, r3 + 800c5c2: 2001 movs r0, #1 + 800c5c4: f7fb fb46 bl 8007c54 + 800c5c8: 6178 str r0, [r7, #20] + if (p != NULL) { + 800c5ca: 697b ldr r3, [r7, #20] + 800c5cc: 2b00 cmp r3, #0 + 800c5ce: d056 beq.n 800c67e + LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", + 800c5d0: 897b ldrh r3, [r7, #10] + 800c5d2: 3313 adds r3, #19 + 800c5d4: 697a ldr r2, [r7, #20] + 800c5d6: 8952 ldrh r2, [r2, #10] + 800c5d8: 4293 cmp r3, r2 + 800c5da: db05 blt.n 800c5e8 + 800c5dc: 4b2a ldr r3, [pc, #168] ; (800c688 ) + 800c5de: 2272 movs r2, #114 ; 0x72 + 800c5e0: 492a ldr r1, [pc, #168] ; (800c68c ) + 800c5e2: 482b ldr r0, [pc, #172] ; (800c690 ) + 800c5e4: f006 fbce bl 8012d84 + (p->len >= TCP_HLEN + optlen)); + tcphdr = (struct tcp_hdr *)p->payload; + 800c5e8: 697b ldr r3, [r7, #20] + 800c5ea: 685b ldr r3, [r3, #4] + 800c5ec: 613b str r3, [r7, #16] + tcphdr->src = lwip_htons(pcb->local_port); + 800c5ee: 68fb ldr r3, [r7, #12] + 800c5f0: 8adb ldrh r3, [r3, #22] + 800c5f2: 4618 mov r0, r3 + 800c5f4: f7fa fd6e bl 80070d4 + 800c5f8: 4603 mov r3, r0 + 800c5fa: 461a mov r2, r3 + 800c5fc: 693b ldr r3, [r7, #16] + 800c5fe: 801a strh r2, [r3, #0] + tcphdr->dest = lwip_htons(pcb->remote_port); + 800c600: 68fb ldr r3, [r7, #12] + 800c602: 8b1b ldrh r3, [r3, #24] + 800c604: 4618 mov r0, r3 + 800c606: f7fa fd65 bl 80070d4 + 800c60a: 4603 mov r3, r0 + 800c60c: 461a mov r2, r3 + 800c60e: 693b ldr r3, [r7, #16] + 800c610: 805a strh r2, [r3, #2] + tcphdr->seqno = seqno_be; + 800c612: 693b ldr r3, [r7, #16] + 800c614: 687a ldr r2, [r7, #4] + 800c616: 605a str r2, [r3, #4] + tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); + 800c618: 68fb ldr r3, [r7, #12] + 800c61a: 6a5b ldr r3, [r3, #36] ; 0x24 + 800c61c: 4618 mov r0, r3 + 800c61e: f7fa fd66 bl 80070ee + 800c622: 4602 mov r2, r0 + 800c624: 693b ldr r3, [r7, #16] + 800c626: 609a str r2, [r3, #8] + TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); + 800c628: 897b ldrh r3, [r7, #10] + 800c62a: 089b lsrs r3, r3, #2 + 800c62c: b29b uxth r3, r3 + 800c62e: 3305 adds r3, #5 + 800c630: b29b uxth r3, r3 + 800c632: 031b lsls r3, r3, #12 + 800c634: b29b uxth r3, r3 + 800c636: f043 0310 orr.w r3, r3, #16 + 800c63a: b29b uxth r3, r3 + 800c63c: 4618 mov r0, r3 + 800c63e: f7fa fd49 bl 80070d4 + 800c642: 4603 mov r3, r0 + 800c644: 461a mov r2, r3 + 800c646: 693b ldr r3, [r7, #16] + 800c648: 819a strh r2, [r3, #12] + tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); + 800c64a: 68fb ldr r3, [r7, #12] + 800c64c: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800c64e: 4618 mov r0, r3 + 800c650: f7fa fd40 bl 80070d4 + 800c654: 4603 mov r3, r0 + 800c656: 461a mov r2, r3 + 800c658: 693b ldr r3, [r7, #16] + 800c65a: 81da strh r2, [r3, #14] + tcphdr->chksum = 0; + 800c65c: 693b ldr r3, [r7, #16] + 800c65e: 2200 movs r2, #0 + 800c660: 741a strb r2, [r3, #16] + 800c662: 2200 movs r2, #0 + 800c664: 745a strb r2, [r3, #17] + tcphdr->urgp = 0; + 800c666: 693b ldr r3, [r7, #16] + 800c668: 2200 movs r2, #0 + 800c66a: 749a strb r2, [r3, #18] + 800c66c: 2200 movs r2, #0 + 800c66e: 74da strb r2, [r3, #19] + + /* If we're sending a packet, update the announced right window edge */ + pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; + 800c670: 68fb ldr r3, [r7, #12] + 800c672: 6a5b ldr r3, [r3, #36] ; 0x24 + 800c674: 68fa ldr r2, [r7, #12] + 800c676: 8d52 ldrh r2, [r2, #42] ; 0x2a + 800c678: 441a add r2, r3 + 800c67a: 68fb ldr r3, [r7, #12] + 800c67c: 62da str r2, [r3, #44] ; 0x2c + } + return p; + 800c67e: 697b ldr r3, [r7, #20] +} + 800c680: 4618 mov r0, r3 + 800c682: 3718 adds r7, #24 + 800c684: 46bd mov sp, r7 + 800c686: bd80 pop {r7, pc} + 800c688: 08015508 .word 0x08015508 + 800c68c: 0801553c .word 0x0801553c + 800c690: 0801556c .word 0x0801556c + +0800c694 : + * @param pcb the tcp_pcb over which to send a segment + * @return ERR_OK if sent, another err_t otherwise + */ +err_t +tcp_send_fin(struct tcp_pcb *pcb) +{ + 800c694: b590 push {r4, r7, lr} + 800c696: b085 sub sp, #20 + 800c698: af00 add r7, sp, #0 + 800c69a: 6078 str r0, [r7, #4] + /* first, try to add the fin to the last unsent segment */ + if (pcb->unsent != NULL) { + 800c69c: 687b ldr r3, [r7, #4] + 800c69e: 6e9b ldr r3, [r3, #104] ; 0x68 + 800c6a0: 2b00 cmp r3, #0 + 800c6a2: d02d beq.n 800c700 + struct tcp_seg *last_unsent; + for (last_unsent = pcb->unsent; last_unsent->next != NULL; + 800c6a4: 687b ldr r3, [r7, #4] + 800c6a6: 6e9b ldr r3, [r3, #104] ; 0x68 + 800c6a8: 60fb str r3, [r7, #12] + 800c6aa: e002 b.n 800c6b2 + last_unsent = last_unsent->next); + 800c6ac: 68fb ldr r3, [r7, #12] + 800c6ae: 681b ldr r3, [r3, #0] + 800c6b0: 60fb str r3, [r7, #12] + for (last_unsent = pcb->unsent; last_unsent->next != NULL; + 800c6b2: 68fb ldr r3, [r7, #12] + 800c6b4: 681b ldr r3, [r3, #0] + 800c6b6: 2b00 cmp r3, #0 + 800c6b8: d1f8 bne.n 800c6ac + + if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { + 800c6ba: 68fb ldr r3, [r7, #12] + 800c6bc: 68db ldr r3, [r3, #12] + 800c6be: 899b ldrh r3, [r3, #12] + 800c6c0: b29b uxth r3, r3 + 800c6c2: 4618 mov r0, r3 + 800c6c4: f7fa fd06 bl 80070d4 + 800c6c8: 4603 mov r3, r0 + 800c6ca: f003 0307 and.w r3, r3, #7 + 800c6ce: 2b00 cmp r3, #0 + 800c6d0: d116 bne.n 800c700 + /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ + TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); + 800c6d2: 68fb ldr r3, [r7, #12] + 800c6d4: 68db ldr r3, [r3, #12] + 800c6d6: 899b ldrh r3, [r3, #12] + 800c6d8: b29c uxth r4, r3 + 800c6da: 2001 movs r0, #1 + 800c6dc: f7fa fcfa bl 80070d4 + 800c6e0: 4603 mov r3, r0 + 800c6e2: 461a mov r2, r3 + 800c6e4: 68fb ldr r3, [r7, #12] + 800c6e6: 68db ldr r3, [r3, #12] + 800c6e8: 4322 orrs r2, r4 + 800c6ea: b292 uxth r2, r2 + 800c6ec: 819a strh r2, [r3, #12] + pcb->flags |= TF_FIN; + 800c6ee: 687b ldr r3, [r7, #4] + 800c6f0: 7e9b ldrb r3, [r3, #26] + 800c6f2: f043 0320 orr.w r3, r3, #32 + 800c6f6: b2da uxtb r2, r3 + 800c6f8: 687b ldr r3, [r7, #4] + 800c6fa: 769a strb r2, [r3, #26] + return ERR_OK; + 800c6fc: 2300 movs r3, #0 + 800c6fe: e004 b.n 800c70a + } + } + /* no data, no length, flags, copy=1, no optdata */ + return tcp_enqueue_flags(pcb, TCP_FIN); + 800c700: 2101 movs r1, #1 + 800c702: 6878 ldr r0, [r7, #4] + 800c704: f000 fcc0 bl 800d088 + 800c708: 4603 mov r3, r0 +} + 800c70a: 4618 mov r0, r3 + 800c70c: 3714 adds r7, #20 + 800c70e: 46bd mov sp, r7 + 800c710: bd90 pop {r4, r7, pc} + ... + +0800c714 : + * The TCP header is filled in except ackno and wnd. + * p is freed on failure. + */ +static struct tcp_seg * +tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) +{ + 800c714: b590 push {r4, r7, lr} + 800c716: b087 sub sp, #28 + 800c718: af00 add r7, sp, #0 + 800c71a: 60f8 str r0, [r7, #12] + 800c71c: 60b9 str r1, [r7, #8] + 800c71e: 603b str r3, [r7, #0] + 800c720: 4613 mov r3, r2 + 800c722: 71fb strb r3, [r7, #7] + struct tcp_seg *seg; + u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); + 800c724: f897 3028 ldrb.w r3, [r7, #40] ; 0x28 + 800c728: 009b lsls r3, r3, #2 + 800c72a: b2db uxtb r3, r3 + 800c72c: f003 0304 and.w r3, r3, #4 + 800c730: 75fb strb r3, [r7, #23] + + if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { + 800c732: 2003 movs r0, #3 + 800c734: f7fb f876 bl 8007824 + 800c738: 6138 str r0, [r7, #16] + 800c73a: 693b ldr r3, [r7, #16] + 800c73c: 2b00 cmp r3, #0 + 800c73e: d104 bne.n 800c74a + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); + pbuf_free(p); + 800c740: 68b8 ldr r0, [r7, #8] + 800c742: f7fb fdff bl 8008344 + return NULL; + 800c746: 2300 movs r3, #0 + 800c748: e061 b.n 800c80e + } + seg->flags = optflags; + 800c74a: 693b ldr r3, [r7, #16] + 800c74c: f897 2028 ldrb.w r2, [r7, #40] ; 0x28 + 800c750: 729a strb r2, [r3, #10] + seg->next = NULL; + 800c752: 693b ldr r3, [r7, #16] + 800c754: 2200 movs r2, #0 + 800c756: 601a str r2, [r3, #0] + seg->p = p; + 800c758: 693b ldr r3, [r7, #16] + 800c75a: 68ba ldr r2, [r7, #8] + 800c75c: 605a str r2, [r3, #4] + LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); + 800c75e: 68bb ldr r3, [r7, #8] + 800c760: 891a ldrh r2, [r3, #8] + 800c762: 7dfb ldrb r3, [r7, #23] + 800c764: b29b uxth r3, r3 + 800c766: 429a cmp r2, r3 + 800c768: d205 bcs.n 800c776 + 800c76a: 4b2b ldr r3, [pc, #172] ; (800c818 ) + 800c76c: 22ba movs r2, #186 ; 0xba + 800c76e: 492b ldr r1, [pc, #172] ; (800c81c ) + 800c770: 482b ldr r0, [pc, #172] ; (800c820 ) + 800c772: f006 fb07 bl 8012d84 + seg->len = p->tot_len - optlen; + 800c776: 68bb ldr r3, [r7, #8] + 800c778: 891a ldrh r2, [r3, #8] + 800c77a: 7dfb ldrb r3, [r7, #23] + 800c77c: b29b uxth r3, r3 + 800c77e: 1ad3 subs r3, r2, r3 + 800c780: b29a uxth r2, r3 + 800c782: 693b ldr r3, [r7, #16] + 800c784: 811a strh r2, [r3, #8] + LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED", + (optflags & TF_SEG_DATA_CHECKSUMMED) == 0); +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* build TCP header */ + if (pbuf_header(p, TCP_HLEN)) { + 800c786: 2114 movs r1, #20 + 800c788: 68b8 ldr r0, [r7, #8] + 800c78a: f7fb fdb7 bl 80082fc + 800c78e: 4603 mov r3, r0 + 800c790: 2b00 cmp r3, #0 + 800c792: d004 beq.n 800c79e + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no room for TCP header in pbuf.\n")); + TCP_STATS_INC(tcp.err); + tcp_seg_free(seg); + 800c794: 6938 ldr r0, [r7, #16] + 800c796: f7fd f95f bl 8009a58 + return NULL; + 800c79a: 2300 movs r3, #0 + 800c79c: e037 b.n 800c80e + } + seg->tcphdr = (struct tcp_hdr *)seg->p->payload; + 800c79e: 693b ldr r3, [r7, #16] + 800c7a0: 685b ldr r3, [r3, #4] + 800c7a2: 685a ldr r2, [r3, #4] + 800c7a4: 693b ldr r3, [r7, #16] + 800c7a6: 60da str r2, [r3, #12] + seg->tcphdr->src = lwip_htons(pcb->local_port); + 800c7a8: 68fb ldr r3, [r7, #12] + 800c7aa: 8ada ldrh r2, [r3, #22] + 800c7ac: 693b ldr r3, [r7, #16] + 800c7ae: 68dc ldr r4, [r3, #12] + 800c7b0: 4610 mov r0, r2 + 800c7b2: f7fa fc8f bl 80070d4 + 800c7b6: 4603 mov r3, r0 + 800c7b8: 8023 strh r3, [r4, #0] + seg->tcphdr->dest = lwip_htons(pcb->remote_port); + 800c7ba: 68fb ldr r3, [r7, #12] + 800c7bc: 8b1a ldrh r2, [r3, #24] + 800c7be: 693b ldr r3, [r7, #16] + 800c7c0: 68dc ldr r4, [r3, #12] + 800c7c2: 4610 mov r0, r2 + 800c7c4: f7fa fc86 bl 80070d4 + 800c7c8: 4603 mov r3, r0 + 800c7ca: 8063 strh r3, [r4, #2] + seg->tcphdr->seqno = lwip_htonl(seqno); + 800c7cc: 693b ldr r3, [r7, #16] + 800c7ce: 68dc ldr r4, [r3, #12] + 800c7d0: 6838 ldr r0, [r7, #0] + 800c7d2: f7fa fc8c bl 80070ee + 800c7d6: 4603 mov r3, r0 + 800c7d8: 6063 str r3, [r4, #4] + /* ackno is set in tcp_output */ + TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); + 800c7da: 7dfb ldrb r3, [r7, #23] + 800c7dc: 089b lsrs r3, r3, #2 + 800c7de: b2db uxtb r3, r3 + 800c7e0: b29b uxth r3, r3 + 800c7e2: 3305 adds r3, #5 + 800c7e4: b29b uxth r3, r3 + 800c7e6: 031b lsls r3, r3, #12 + 800c7e8: b29a uxth r2, r3 + 800c7ea: 79fb ldrb r3, [r7, #7] + 800c7ec: b29b uxth r3, r3 + 800c7ee: 4313 orrs r3, r2 + 800c7f0: b29a uxth r2, r3 + 800c7f2: 693b ldr r3, [r7, #16] + 800c7f4: 68dc ldr r4, [r3, #12] + 800c7f6: 4610 mov r0, r2 + 800c7f8: f7fa fc6c bl 80070d4 + 800c7fc: 4603 mov r3, r0 + 800c7fe: 81a3 strh r3, [r4, #12] + /* wnd and chksum are set in tcp_output */ + seg->tcphdr->urgp = 0; + 800c800: 693b ldr r3, [r7, #16] + 800c802: 68db ldr r3, [r3, #12] + 800c804: 2200 movs r2, #0 + 800c806: 749a strb r2, [r3, #18] + 800c808: 2200 movs r2, #0 + 800c80a: 74da strb r2, [r3, #19] + return seg; + 800c80c: 693b ldr r3, [r7, #16] +} + 800c80e: 4618 mov r0, r3 + 800c810: 371c adds r7, #28 + 800c812: 46bd mov sp, r7 + 800c814: bd90 pop {r4, r7, pc} + 800c816: bf00 nop + 800c818: 08015508 .word 0x08015508 + 800c81c: 08015594 .word 0x08015594 + 800c820: 0801556c .word 0x0801556c + +0800c824 : +#if TCP_OVERSIZE +static struct pbuf * +tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, + u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, + u8_t first_seg) +{ + 800c824: b580 push {r7, lr} + 800c826: b086 sub sp, #24 + 800c828: af00 add r7, sp, #0 + 800c82a: 607b str r3, [r7, #4] + 800c82c: 4603 mov r3, r0 + 800c82e: 73fb strb r3, [r7, #15] + 800c830: 460b mov r3, r1 + 800c832: 81bb strh r3, [r7, #12] + 800c834: 4613 mov r3, r2 + 800c836: 817b strh r3, [r7, #10] + struct pbuf *p; + u16_t alloc = length; + 800c838: 89bb ldrh r3, [r7, #12] + 800c83a: 82fb strh r3, [r7, #22] + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(apiflags); + LWIP_UNUSED_ARG(first_seg); + alloc = max_length; +#else /* LWIP_NETIF_TX_SINGLE_PBUF */ + if (length < max_length) { + 800c83c: 89ba ldrh r2, [r7, #12] + 800c83e: 897b ldrh r3, [r7, #10] + 800c840: 429a cmp r2, r3 + 800c842: d221 bcs.n 800c888 + * + * Did the user set TCP_WRITE_FLAG_MORE? + * + * Will the Nagle algorithm defer transmission of this segment? + */ + if ((apiflags & TCP_WRITE_FLAG_MORE) || + 800c844: f897 3024 ldrb.w r3, [r7, #36] ; 0x24 + 800c848: f003 0302 and.w r3, r3, #2 + 800c84c: 2b00 cmp r3, #0 + 800c84e: d111 bne.n 800c874 + (!(pcb->flags & TF_NODELAY) && + 800c850: 6a3b ldr r3, [r7, #32] + 800c852: 7e9b ldrb r3, [r3, #26] + 800c854: f003 0340 and.w r3, r3, #64 ; 0x40 + if ((apiflags & TCP_WRITE_FLAG_MORE) || + 800c858: 2b00 cmp r3, #0 + 800c85a: d115 bne.n 800c888 + (!(pcb->flags & TF_NODELAY) && + 800c85c: f897 3028 ldrb.w r3, [r7, #40] ; 0x28 + 800c860: 2b00 cmp r3, #0 + 800c862: d007 beq.n 800c874 + (!first_seg || + pcb->unsent != NULL || + 800c864: 6a3b ldr r3, [r7, #32] + 800c866: 6e9b ldr r3, [r3, #104] ; 0x68 + (!first_seg || + 800c868: 2b00 cmp r3, #0 + 800c86a: d103 bne.n 800c874 + pcb->unacked != NULL))) { + 800c86c: 6a3b ldr r3, [r7, #32] + 800c86e: 6edb ldr r3, [r3, #108] ; 0x6c + pcb->unsent != NULL || + 800c870: 2b00 cmp r3, #0 + 800c872: d009 beq.n 800c888 + alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); + 800c874: 89bb ldrh r3, [r7, #12] + 800c876: f203 231b addw r3, r3, #539 ; 0x21b + 800c87a: f023 0203 bic.w r2, r3, #3 + 800c87e: 897b ldrh r3, [r7, #10] + 800c880: 4293 cmp r3, r2 + 800c882: bf28 it cs + 800c884: 4613 movcs r3, r2 + 800c886: 82fb strh r3, [r7, #22] + } + } +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + p = pbuf_alloc(layer, alloc, PBUF_RAM); + 800c888: 8af9 ldrh r1, [r7, #22] + 800c88a: 7bfb ldrb r3, [r7, #15] + 800c88c: 2200 movs r2, #0 + 800c88e: 4618 mov r0, r3 + 800c890: f7fb f9e0 bl 8007c54 + 800c894: 6138 str r0, [r7, #16] + if (p == NULL) { + 800c896: 693b ldr r3, [r7, #16] + 800c898: 2b00 cmp r3, #0 + 800c89a: d101 bne.n 800c8a0 + return NULL; + 800c89c: 2300 movs r3, #0 + 800c89e: e019 b.n 800c8d4 + } + LWIP_ASSERT("need unchained pbuf", p->next == NULL); + 800c8a0: 693b ldr r3, [r7, #16] + 800c8a2: 681b ldr r3, [r3, #0] + 800c8a4: 2b00 cmp r3, #0 + 800c8a6: d006 beq.n 800c8b6 + 800c8a8: 4b0c ldr r3, [pc, #48] ; (800c8dc ) + 800c8aa: f44f 7288 mov.w r2, #272 ; 0x110 + 800c8ae: 490c ldr r1, [pc, #48] ; (800c8e0 ) + 800c8b0: 480c ldr r0, [pc, #48] ; (800c8e4 ) + 800c8b2: f006 fa67 bl 8012d84 + *oversize = p->len - length; + 800c8b6: 693b ldr r3, [r7, #16] + 800c8b8: 895a ldrh r2, [r3, #10] + 800c8ba: 89bb ldrh r3, [r7, #12] + 800c8bc: 1ad3 subs r3, r2, r3 + 800c8be: b29a uxth r2, r3 + 800c8c0: 687b ldr r3, [r7, #4] + 800c8c2: 801a strh r2, [r3, #0] + /* trim p->len to the currently used size */ + p->len = p->tot_len = length; + 800c8c4: 693b ldr r3, [r7, #16] + 800c8c6: 89ba ldrh r2, [r7, #12] + 800c8c8: 811a strh r2, [r3, #8] + 800c8ca: 693b ldr r3, [r7, #16] + 800c8cc: 891a ldrh r2, [r3, #8] + 800c8ce: 693b ldr r3, [r7, #16] + 800c8d0: 815a strh r2, [r3, #10] + return p; + 800c8d2: 693b ldr r3, [r7, #16] +} + 800c8d4: 4618 mov r0, r3 + 800c8d6: 3718 adds r7, #24 + 800c8d8: 46bd mov sp, r7 + 800c8da: bd80 pop {r7, pc} + 800c8dc: 08015508 .word 0x08015508 + 800c8e0: 080155ac .word 0x080155ac + 800c8e4: 0801556c .word 0x0801556c + +0800c8e8 : + * @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) +{ + 800c8e8: b580 push {r7, lr} + 800c8ea: b082 sub sp, #8 + 800c8ec: af00 add r7, sp, #0 + 800c8ee: 6078 str r0, [r7, #4] + 800c8f0: 460b mov r3, r1 + 800c8f2: 807b strh r3, [r7, #2] + /* connection is in invalid state for data transmission? */ + if ((pcb->state != ESTABLISHED) && + 800c8f4: 687b ldr r3, [r7, #4] + 800c8f6: 7d1b ldrb r3, [r3, #20] + 800c8f8: 2b04 cmp r3, #4 + 800c8fa: d00e beq.n 800c91a + (pcb->state != CLOSE_WAIT) && + 800c8fc: 687b ldr r3, [r7, #4] + 800c8fe: 7d1b ldrb r3, [r3, #20] + if ((pcb->state != ESTABLISHED) && + 800c900: 2b07 cmp r3, #7 + 800c902: d00a beq.n 800c91a + (pcb->state != SYN_SENT) && + 800c904: 687b ldr r3, [r7, #4] + 800c906: 7d1b ldrb r3, [r3, #20] + (pcb->state != CLOSE_WAIT) && + 800c908: 2b02 cmp r3, #2 + 800c90a: d006 beq.n 800c91a + (pcb->state != SYN_RCVD)) { + 800c90c: 687b ldr r3, [r7, #4] + 800c90e: 7d1b ldrb r3, [r3, #20] + (pcb->state != SYN_SENT) && + 800c910: 2b03 cmp r3, #3 + 800c912: d002 beq.n 800c91a + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); + return ERR_CONN; + 800c914: f06f 030a mvn.w r3, #10 + 800c918: e04f b.n 800c9ba + } else if (len == 0) { + 800c91a: 887b ldrh r3, [r7, #2] + 800c91c: 2b00 cmp r3, #0 + 800c91e: d101 bne.n 800c924 + return ERR_OK; + 800c920: 2300 movs r3, #0 + 800c922: e04a b.n 800c9ba + } + + /* fail on too much data */ + if (len > pcb->snd_buf) { + 800c924: 687b ldr r3, [r7, #4] + 800c926: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 + 800c92a: 887a ldrh r2, [r7, #2] + 800c92c: 429a cmp r2, r3 + 800c92e: d909 bls.n 800c944 + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n", + len, pcb->snd_buf)); + pcb->flags |= TF_NAGLEMEMERR; + 800c930: 687b ldr r3, [r7, #4] + 800c932: 7e9b ldrb r3, [r3, #26] + 800c934: f063 037f orn r3, r3, #127 ; 0x7f + 800c938: b2da uxtb r2, r3 + 800c93a: 687b ldr r3, [r7, #4] + 800c93c: 769a strb r2, [r3, #26] + return ERR_MEM; + 800c93e: f04f 33ff mov.w r3, #4294967295 + 800c942: e03a b.n 800c9ba + 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 >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { + 800c944: 687b ldr r3, [r7, #4] + 800c946: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800c94a: 2b08 cmp r3, #8 + 800c94c: d806 bhi.n 800c95c + 800c94e: 687b ldr r3, [r7, #4] + 800c950: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800c954: f64f 72fc movw r2, #65532 ; 0xfffc + 800c958: 4293 cmp r3, r2 + 800c95a: d909 bls.n 800c970 + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", + pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); + TCP_STATS_INC(tcp.memerr); + pcb->flags |= TF_NAGLEMEMERR; + 800c95c: 687b ldr r3, [r7, #4] + 800c95e: 7e9b ldrb r3, [r3, #26] + 800c960: f063 037f orn r3, r3, #127 ; 0x7f + 800c964: b2da uxtb r2, r3 + 800c966: 687b ldr r3, [r7, #4] + 800c968: 769a strb r2, [r3, #26] + return ERR_MEM; + 800c96a: f04f 33ff mov.w r3, #4294967295 + 800c96e: e024 b.n 800c9ba + } + if (pcb->snd_queuelen != 0) { + 800c970: 687b ldr r3, [r7, #4] + 800c972: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800c976: 2b00 cmp r3, #0 + 800c978: d00f beq.n 800c99a + LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", + 800c97a: 687b ldr r3, [r7, #4] + 800c97c: 6edb ldr r3, [r3, #108] ; 0x6c + 800c97e: 2b00 cmp r3, #0 + 800c980: d11a bne.n 800c9b8 + 800c982: 687b ldr r3, [r7, #4] + 800c984: 6e9b ldr r3, [r3, #104] ; 0x68 + 800c986: 2b00 cmp r3, #0 + 800c988: d116 bne.n 800c9b8 + 800c98a: 4b0e ldr r3, [pc, #56] ; (800c9c4 ) + 800c98c: f240 1255 movw r2, #341 ; 0x155 + 800c990: 490d ldr r1, [pc, #52] ; (800c9c8 ) + 800c992: 480e ldr r0, [pc, #56] ; (800c9cc ) + 800c994: f006 f9f6 bl 8012d84 + 800c998: e00e b.n 800c9b8 + pcb->unacked != NULL || pcb->unsent != NULL); + } else { + LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", + 800c99a: 687b ldr r3, [r7, #4] + 800c99c: 6edb ldr r3, [r3, #108] ; 0x6c + 800c99e: 2b00 cmp r3, #0 + 800c9a0: d103 bne.n 800c9aa + 800c9a2: 687b ldr r3, [r7, #4] + 800c9a4: 6e9b ldr r3, [r3, #104] ; 0x68 + 800c9a6: 2b00 cmp r3, #0 + 800c9a8: d006 beq.n 800c9b8 + 800c9aa: 4b06 ldr r3, [pc, #24] ; (800c9c4 ) + 800c9ac: f44f 72ac mov.w r2, #344 ; 0x158 + 800c9b0: 4907 ldr r1, [pc, #28] ; (800c9d0 ) + 800c9b2: 4806 ldr r0, [pc, #24] ; (800c9cc ) + 800c9b4: f006 f9e6 bl 8012d84 + pcb->unacked == NULL && pcb->unsent == NULL); + } + return ERR_OK; + 800c9b8: 2300 movs r3, #0 +} + 800c9ba: 4618 mov r0, r3 + 800c9bc: 3708 adds r7, #8 + 800c9be: 46bd mov sp, r7 + 800c9c0: bd80 pop {r7, pc} + 800c9c2: bf00 nop + 800c9c4: 08015508 .word 0x08015508 + 800c9c8: 080155c0 .word 0x080155c0 + 800c9cc: 0801556c .word 0x0801556c + 800c9d0: 080155fc .word 0x080155fc + +0800c9d4 : + * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will not be set on last segment sent, + * @return ERR_OK if enqueued, another err_t on error + */ +err_t +tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) +{ + 800c9d4: b590 push {r4, r7, lr} + 800c9d6: b09b sub sp, #108 ; 0x6c + 800c9d8: af04 add r7, sp, #16 + 800c9da: 60f8 str r0, [r7, #12] + 800c9dc: 60b9 str r1, [r7, #8] + 800c9de: 4611 mov r1, r2 + 800c9e0: 461a mov r2, r3 + 800c9e2: 460b mov r3, r1 + 800c9e4: 80fb strh r3, [r7, #6] + 800c9e6: 4613 mov r3, r2 + 800c9e8: 717b strb r3, [r7, #5] + struct pbuf *concat_p = NULL; + 800c9ea: 2300 movs r3, #0 + 800c9ec: 657b str r3, [r7, #84] ; 0x54 + struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; + 800c9ee: 2300 movs r3, #0 + 800c9f0: 653b str r3, [r7, #80] ; 0x50 + 800c9f2: 2300 movs r3, #0 + 800c9f4: 64fb str r3, [r7, #76] ; 0x4c + 800c9f6: 2300 movs r3, #0 + 800c9f8: 64bb str r3, [r7, #72] ; 0x48 + 800c9fa: 2300 movs r3, #0 + 800c9fc: 647b str r3, [r7, #68] ; 0x44 + u16_t pos = 0; /* position in 'arg' data */ + 800c9fe: 2300 movs r3, #0 + 800ca00: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 + u16_t queuelen; + u8_t optlen = 0; + 800ca04: 2300 movs r3, #0 + 800ca06: f887 3027 strb.w r3, [r7, #39] ; 0x27 + u8_t optflags = 0; + 800ca0a: 2300 movs r3, #0 + 800ca0c: f887 3026 strb.w r3, [r7, #38] ; 0x26 +#if TCP_OVERSIZE + u16_t oversize = 0; + 800ca10: 2300 movs r3, #0 + 800ca12: 827b strh r3, [r7, #18] + u16_t oversize_used = 0; + 800ca14: 2300 movs r3, #0 + 800ca16: 87fb strh r3, [r7, #62] ; 0x3e +#if TCP_OVERSIZE_DBGCHECK + u16_t oversize_add = 0; +#endif /* TCP_OVERSIZE_DBGCHECK*/ +#endif /* TCP_OVERSIZE */ + u16_t extendlen = 0; + 800ca18: 2300 movs r3, #0 + 800ca1a: 87bb strh r3, [r7, #60] ; 0x3c + u8_t concat_chksum_swapped = 0; + u16_t concat_chksummed = 0; +#endif /* TCP_CHECKSUM_ON_COPY */ + err_t err; + /* don't allocate segments bigger than half the maximum window we ever received */ + u16_t mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max/2)); + 800ca1c: 68fb ldr r3, [r7, #12] + 800ca1e: f8b3 305e ldrh.w r3, [r3, #94] ; 0x5e + 800ca22: 085b lsrs r3, r3, #1 + 800ca24: b29a uxth r2, r3 + 800ca26: 68fb ldr r3, [r7, #12] + 800ca28: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800ca2a: 4293 cmp r3, r2 + 800ca2c: bf28 it cs + 800ca2e: 4613 movcs r3, r2 + 800ca30: 84bb strh r3, [r7, #36] ; 0x24 + mss_local = mss_local ? mss_local : pcb->mss; + 800ca32: 8cbb ldrh r3, [r7, #36] ; 0x24 + 800ca34: 2b00 cmp r3, #0 + 800ca36: d102 bne.n 800ca3e + 800ca38: 68fb ldr r3, [r7, #12] + 800ca3a: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800ca3c: e000 b.n 800ca40 + 800ca3e: 8cbb ldrh r3, [r7, #36] ; 0x24 + 800ca40: 84bb strh r3, [r7, #36] ; 0x24 + apiflags |= TCP_WRITE_FLAG_COPY; +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", + (void *)pcb, arg, len, (u16_t)apiflags)); + LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", + 800ca42: 68bb ldr r3, [r7, #8] + 800ca44: 2b00 cmp r3, #0 + 800ca46: d109 bne.n 800ca5c + 800ca48: 4b92 ldr r3, [pc, #584] ; (800cc94 ) + 800ca4a: f240 1291 movw r2, #401 ; 0x191 + 800ca4e: 4992 ldr r1, [pc, #584] ; (800cc98 ) + 800ca50: 4892 ldr r0, [pc, #584] ; (800cc9c ) + 800ca52: f006 f997 bl 8012d84 + 800ca56: f06f 030f mvn.w r3, #15 + 800ca5a: e30a b.n 800d072 + arg != NULL, return ERR_ARG;); + + err = tcp_write_checks(pcb, len); + 800ca5c: 88fb ldrh r3, [r7, #6] + 800ca5e: 4619 mov r1, r3 + 800ca60: 68f8 ldr r0, [r7, #12] + 800ca62: f7ff ff41 bl 800c8e8 + 800ca66: 4603 mov r3, r0 + 800ca68: f887 3023 strb.w r3, [r7, #35] ; 0x23 + if (err != ERR_OK) { + 800ca6c: f997 3023 ldrsb.w r3, [r7, #35] ; 0x23 + 800ca70: 2b00 cmp r3, #0 + 800ca72: d002 beq.n 800ca7a + return err; + 800ca74: f997 3023 ldrsb.w r3, [r7, #35] ; 0x23 + 800ca78: e2fb b.n 800d072 + } + queuelen = pcb->snd_queuelen; + 800ca7a: 68fb ldr r3, [r7, #12] + 800ca7c: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800ca80: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 + * + * pos records progress as data is segmented. + */ + + /* Find the tail of the unsent queue. */ + if (pcb->unsent != NULL) { + 800ca84: 68fb ldr r3, [r7, #12] + 800ca86: 6e9b ldr r3, [r3, #104] ; 0x68 + 800ca88: 2b00 cmp r3, #0 + 800ca8a: f000 80f4 beq.w 800cc76 + u16_t space; + u16_t unsent_optlen; + + /* @todo: this could be sped up by keeping last_unsent in the pcb */ + for (last_unsent = pcb->unsent; last_unsent->next != NULL; + 800ca8e: 68fb ldr r3, [r7, #12] + 800ca90: 6e9b ldr r3, [r3, #104] ; 0x68 + 800ca92: 653b str r3, [r7, #80] ; 0x50 + 800ca94: e002 b.n 800ca9c + last_unsent = last_unsent->next); + 800ca96: 6d3b ldr r3, [r7, #80] ; 0x50 + 800ca98: 681b ldr r3, [r3, #0] + 800ca9a: 653b str r3, [r7, #80] ; 0x50 + for (last_unsent = pcb->unsent; last_unsent->next != NULL; + 800ca9c: 6d3b ldr r3, [r7, #80] ; 0x50 + 800ca9e: 681b ldr r3, [r3, #0] + 800caa0: 2b00 cmp r3, #0 + 800caa2: d1f8 bne.n 800ca96 + + /* Usable space at the end of the last unsent segment */ + unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); + 800caa4: 6d3b ldr r3, [r7, #80] ; 0x50 + 800caa6: 7a9b ldrb r3, [r3, #10] + 800caa8: 009b lsls r3, r3, #2 + 800caaa: b29b uxth r3, r3 + 800caac: f003 0304 and.w r3, r3, #4 + 800cab0: 843b strh r3, [r7, #32] + LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); + 800cab2: 8cba ldrh r2, [r7, #36] ; 0x24 + 800cab4: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cab6: 891b ldrh r3, [r3, #8] + 800cab8: 4619 mov r1, r3 + 800caba: 8c3b ldrh r3, [r7, #32] + 800cabc: 440b add r3, r1 + 800cabe: 429a cmp r2, r3 + 800cac0: da06 bge.n 800cad0 + 800cac2: 4b74 ldr r3, [pc, #464] ; (800cc94 ) + 800cac4: f240 12c7 movw r2, #455 ; 0x1c7 + 800cac8: 4975 ldr r1, [pc, #468] ; (800cca0 ) + 800caca: 4874 ldr r0, [pc, #464] ; (800cc9c ) + 800cacc: f006 f95a bl 8012d84 + space = mss_local - (last_unsent->len + unsent_optlen); + 800cad0: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cad2: 891a ldrh r2, [r3, #8] + 800cad4: 8c3b ldrh r3, [r7, #32] + 800cad6: 4413 add r3, r2 + 800cad8: b29b uxth r3, r3 + 800cada: 8cba ldrh r2, [r7, #36] ; 0x24 + 800cadc: 1ad3 subs r3, r2, r3 + 800cade: 877b strh r3, [r7, #58] ; 0x3a +#if TCP_OVERSIZE_DBGCHECK + /* check that pcb->unsent_oversize matches last_unsent->oversize_left */ + LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", + pcb->unsent_oversize == last_unsent->oversize_left); +#endif /* TCP_OVERSIZE_DBGCHECK */ + oversize = pcb->unsent_oversize; + 800cae0: 68fb ldr r3, [r7, #12] + 800cae2: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64 + 800cae6: 827b strh r3, [r7, #18] + if (oversize > 0) { + 800cae8: 8a7b ldrh r3, [r7, #18] + 800caea: 2b00 cmp r3, #0 + 800caec: d026 beq.n 800cb3c + LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); + 800caee: 8a7b ldrh r3, [r7, #18] + 800caf0: 8f7a ldrh r2, [r7, #58] ; 0x3a + 800caf2: 429a cmp r2, r3 + 800caf4: d206 bcs.n 800cb04 + 800caf6: 4b67 ldr r3, [pc, #412] ; (800cc94 ) + 800caf8: f240 12d9 movw r2, #473 ; 0x1d9 + 800cafc: 4969 ldr r1, [pc, #420] ; (800cca4 ) + 800cafe: 4867 ldr r0, [pc, #412] ; (800cc9c ) + 800cb00: f006 f940 bl 8012d84 + seg = last_unsent; + 800cb04: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cb06: 64fb str r3, [r7, #76] ; 0x4c + oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); + 800cb08: 8a7b ldrh r3, [r7, #18] + 800cb0a: 88fa ldrh r2, [r7, #6] + 800cb0c: 4293 cmp r3, r2 + 800cb0e: bf28 it cs + 800cb10: 4613 movcs r3, r2 + 800cb12: b29b uxth r3, r3 + 800cb14: 8f7a ldrh r2, [r7, #58] ; 0x3a + 800cb16: 4293 cmp r3, r2 + 800cb18: bf28 it cs + 800cb1a: 4613 movcs r3, r2 + 800cb1c: 87fb strh r3, [r7, #62] ; 0x3e + pos += oversize_used; + 800cb1e: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 + 800cb22: 8ffb ldrh r3, [r7, #62] ; 0x3e + 800cb24: 4413 add r3, r2 + 800cb26: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 + oversize -= oversize_used; + 800cb2a: 8a7a ldrh r2, [r7, #18] + 800cb2c: 8ffb ldrh r3, [r7, #62] ; 0x3e + 800cb2e: 1ad3 subs r3, r2, r3 + 800cb30: b29b uxth r3, r3 + 800cb32: 827b strh r3, [r7, #18] + space -= oversize_used; + 800cb34: 8f7a ldrh r2, [r7, #58] ; 0x3a + 800cb36: 8ffb ldrh r3, [r7, #62] ; 0x3e + 800cb38: 1ad3 subs r3, r2, r3 + 800cb3a: 877b strh r3, [r7, #58] ; 0x3a + } + /* now we are either finished or oversize is zero */ + LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); + 800cb3c: 8a7b ldrh r3, [r7, #18] + 800cb3e: 2b00 cmp r3, #0 + 800cb40: d00b beq.n 800cb5a + 800cb42: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 + 800cb46: 88fb ldrh r3, [r7, #6] + 800cb48: 429a cmp r2, r3 + 800cb4a: d006 beq.n 800cb5a + 800cb4c: 4b51 ldr r3, [pc, #324] ; (800cc94 ) + 800cb4e: f240 12e1 movw r2, #481 ; 0x1e1 + 800cb52: 4955 ldr r1, [pc, #340] ; (800cca8 ) + 800cb54: 4851 ldr r0, [pc, #324] ; (800cc9c ) + 800cb56: f006 f915 bl 8012d84 + * + * We don't extend segments containing SYN/FIN flags or options + * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at + * the end. + */ + if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { + 800cb5a: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 + 800cb5e: 88fb ldrh r3, [r7, #6] + 800cb60: 429a cmp r2, r3 + 800cb62: f080 8169 bcs.w 800ce38 + 800cb66: 8f7b ldrh r3, [r7, #58] ; 0x3a + 800cb68: 2b00 cmp r3, #0 + 800cb6a: f000 8165 beq.w 800ce38 + 800cb6e: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cb70: 891b ldrh r3, [r3, #8] + 800cb72: 2b00 cmp r3, #0 + 800cb74: f000 8160 beq.w 800ce38 + u16_t seglen = LWIP_MIN(space, len - pos); + 800cb78: 88fa ldrh r2, [r7, #6] + 800cb7a: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800cb7e: 1ad2 subs r2, r2, r3 + 800cb80: 8f7b ldrh r3, [r7, #58] ; 0x3a + 800cb82: 4293 cmp r3, r2 + 800cb84: bfa8 it ge + 800cb86: 4613 movge r3, r2 + 800cb88: 83fb strh r3, [r7, #30] + seg = last_unsent; + 800cb8a: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cb8c: 64fb str r3, [r7, #76] ; 0x4c + + /* Create a pbuf with a copy or reference to seglen bytes. We + * can use PBUF_RAW here since the data appears in the middle of + * a segment. A header will never be prepended. */ + if (apiflags & TCP_WRITE_FLAG_COPY) { + 800cb8e: 797b ldrb r3, [r7, #5] + 800cb90: f003 0301 and.w r3, r3, #1 + 800cb94: 2b00 cmp r3, #0 + 800cb96: d027 beq.n 800cbe8 + /* Data is copied */ + if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { + 800cb98: f107 0012 add.w r0, r7, #18 + 800cb9c: 8f7a ldrh r2, [r7, #58] ; 0x3a + 800cb9e: 8bf9 ldrh r1, [r7, #30] + 800cba0: 2301 movs r3, #1 + 800cba2: 9302 str r3, [sp, #8] + 800cba4: 797b ldrb r3, [r7, #5] + 800cba6: 9301 str r3, [sp, #4] + 800cba8: 68fb ldr r3, [r7, #12] + 800cbaa: 9300 str r3, [sp, #0] + 800cbac: 4603 mov r3, r0 + 800cbae: 2004 movs r0, #4 + 800cbb0: f7ff fe38 bl 800c824 + 800cbb4: 6578 str r0, [r7, #84] ; 0x54 + 800cbb6: 6d7b ldr r3, [r7, #84] ; 0x54 + 800cbb8: 2b00 cmp r3, #0 + 800cbba: f000 8228 beq.w 800d00e + goto memerr; + } +#if TCP_OVERSIZE_DBGCHECK + oversize_add = oversize; +#endif /* TCP_OVERSIZE_DBGCHECK */ + TCP_DATA_COPY2(concat_p->payload, (const u8_t*)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); + 800cbbe: 6d7b ldr r3, [r7, #84] ; 0x54 + 800cbc0: 6858 ldr r0, [r3, #4] + 800cbc2: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800cbc6: 68ba ldr r2, [r7, #8] + 800cbc8: 4413 add r3, r2 + 800cbca: 8bfa ldrh r2, [r7, #30] + 800cbcc: 4619 mov r1, r3 + 800cbce: f006 faa4 bl 801311a +#if TCP_CHECKSUM_ON_COPY + concat_chksummed += seglen; +#endif /* TCP_CHECKSUM_ON_COPY */ + queuelen += pbuf_clen(concat_p); + 800cbd2: 6d78 ldr r0, [r7, #84] ; 0x54 + 800cbd4: f7fb fc4a bl 800846c + 800cbd8: 4603 mov r3, r0 + 800cbda: 461a mov r2, r3 + 800cbdc: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 + 800cbe0: 4413 add r3, r2 + 800cbe2: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 + 800cbe6: e03f b.n 800cc68 + } else { + /* Data is not copied */ + /* If the last unsent pbuf is of type PBUF_ROM, try to extend it. */ + struct pbuf *p; + for (p = last_unsent->p; p->next != NULL; p = p->next); + 800cbe8: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cbea: 685b ldr r3, [r3, #4] + 800cbec: 637b str r3, [r7, #52] ; 0x34 + 800cbee: e002 b.n 800cbf6 + 800cbf0: 6b7b ldr r3, [r7, #52] ; 0x34 + 800cbf2: 681b ldr r3, [r3, #0] + 800cbf4: 637b str r3, [r7, #52] ; 0x34 + 800cbf6: 6b7b ldr r3, [r7, #52] ; 0x34 + 800cbf8: 681b ldr r3, [r3, #0] + 800cbfa: 2b00 cmp r3, #0 + 800cbfc: d1f8 bne.n 800cbf0 + if (p->type == PBUF_ROM && (const u8_t *)p->payload + p->len == (const u8_t *)arg) { + 800cbfe: 6b7b ldr r3, [r7, #52] ; 0x34 + 800cc00: 7b1b ldrb r3, [r3, #12] + 800cc02: 2b01 cmp r3, #1 + 800cc04: d115 bne.n 800cc32 + 800cc06: 6b7b ldr r3, [r7, #52] ; 0x34 + 800cc08: 685b ldr r3, [r3, #4] + 800cc0a: 6b7a ldr r2, [r7, #52] ; 0x34 + 800cc0c: 8952 ldrh r2, [r2, #10] + 800cc0e: 4413 add r3, r2 + 800cc10: 68ba ldr r2, [r7, #8] + 800cc12: 429a cmp r2, r3 + 800cc14: d10d bne.n 800cc32 + LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); + 800cc16: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800cc1a: 2b00 cmp r3, #0 + 800cc1c: d006 beq.n 800cc2c + 800cc1e: 4b1d ldr r3, [pc, #116] ; (800cc94 ) + 800cc20: f44f 7203 mov.w r2, #524 ; 0x20c + 800cc24: 4921 ldr r1, [pc, #132] ; (800ccac ) + 800cc26: 481d ldr r0, [pc, #116] ; (800cc9c ) + 800cc28: f006 f8ac bl 8012d84 + extendlen = seglen; + 800cc2c: 8bfb ldrh r3, [r7, #30] + 800cc2e: 87bb strh r3, [r7, #60] ; 0x3c + 800cc30: e01a b.n 800cc68 + } else { + if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { + 800cc32: 8bfb ldrh r3, [r7, #30] + 800cc34: 2201 movs r2, #1 + 800cc36: 4619 mov r1, r3 + 800cc38: 2004 movs r0, #4 + 800cc3a: f7fb f80b bl 8007c54 + 800cc3e: 6578 str r0, [r7, #84] ; 0x54 + 800cc40: 6d7b ldr r3, [r7, #84] ; 0x54 + 800cc42: 2b00 cmp r3, #0 + 800cc44: f000 81e5 beq.w 800d012 + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("tcp_write: could not allocate memory for zero-copy pbuf\n")); + goto memerr; + } + /* reference the non-volatile payload data */ + ((struct pbuf_rom*)concat_p)->payload = (const u8_t*)arg + pos; + 800cc48: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800cc4c: 68ba ldr r2, [r7, #8] + 800cc4e: 441a add r2, r3 + 800cc50: 6d7b ldr r3, [r7, #84] ; 0x54 + 800cc52: 605a str r2, [r3, #4] + queuelen += pbuf_clen(concat_p); + 800cc54: 6d78 ldr r0, [r7, #84] ; 0x54 + 800cc56: f7fb fc09 bl 800846c + 800cc5a: 4603 mov r3, r0 + 800cc5c: 461a mov r2, r3 + 800cc5e: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 + 800cc62: 4413 add r3, r2 + 800cc64: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 + &concat_chksum, &concat_chksum_swapped); + concat_chksummed += seglen; +#endif /* TCP_CHECKSUM_ON_COPY */ + } + + pos += seglen; + 800cc68: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 + 800cc6c: 8bfb ldrh r3, [r7, #30] + 800cc6e: 4413 add r3, r2 + 800cc70: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 + 800cc74: e0e0 b.n 800ce38 + } + } else { +#if TCP_OVERSIZE + LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", + 800cc76: 68fb ldr r3, [r7, #12] + 800cc78: f8b3 3064 ldrh.w r3, [r3, #100] ; 0x64 + 800cc7c: 2b00 cmp r3, #0 + 800cc7e: f000 80db beq.w 800ce38 + 800cc82: 4b04 ldr r3, [pc, #16] ; (800cc94 ) + 800cc84: f44f 7209 mov.w r2, #548 ; 0x224 + 800cc88: 4909 ldr r1, [pc, #36] ; (800ccb0 ) + 800cc8a: 4804 ldr r0, [pc, #16] ; (800cc9c ) + 800cc8c: f006 f87a bl 8012d84 + * Phase 3: Create new segments. + * + * The new segments are chained together in the local 'queue' + * variable, ready to be appended to pcb->unsent. + */ + while (pos < len) { + 800cc90: e0d2 b.n 800ce38 + 800cc92: bf00 nop + 800cc94: 08015508 .word 0x08015508 + 800cc98: 08015630 .word 0x08015630 + 800cc9c: 0801556c .word 0x0801556c + 800cca0: 08015664 .word 0x08015664 + 800cca4: 0801567c .word 0x0801567c + 800cca8: 0801569c .word 0x0801569c + 800ccac: 080156bc .word 0x080156bc + 800ccb0: 080156e8 .word 0x080156e8 + struct pbuf *p; + u16_t left = len - pos; + 800ccb4: 88fa ldrh r2, [r7, #6] + 800ccb6: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800ccba: 1ad3 subs r3, r2, r3 + 800ccbc: 83bb strh r3, [r7, #28] + u16_t max_len = mss_local - optlen; + 800ccbe: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800ccc2: b29b uxth r3, r3 + 800ccc4: 8cba ldrh r2, [r7, #36] ; 0x24 + 800ccc6: 1ad3 subs r3, r2, r3 + 800ccc8: 837b strh r3, [r7, #26] + u16_t seglen = LWIP_MIN(left, max_len); + 800ccca: 8b7a ldrh r2, [r7, #26] + 800cccc: 8bbb ldrh r3, [r7, #28] + 800ccce: 4293 cmp r3, r2 + 800ccd0: bf28 it cs + 800ccd2: 4613 movcs r3, r2 + 800ccd4: 833b strh r3, [r7, #24] +#if TCP_CHECKSUM_ON_COPY + u16_t chksum = 0; + u8_t chksum_swapped = 0; +#endif /* TCP_CHECKSUM_ON_COPY */ + + if (apiflags & TCP_WRITE_FLAG_COPY) { + 800ccd6: 797b ldrb r3, [r7, #5] + 800ccd8: f003 0301 and.w r3, r3, #1 + 800ccdc: 2b00 cmp r3, #0 + 800ccde: d036 beq.n 800cd4e + /* If copy is set, memory should be allocated and data copied + * into pbuf */ + if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { + 800cce0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800cce4: b29a uxth r2, r3 + 800cce6: 8b3b ldrh r3, [r7, #24] + 800cce8: 4413 add r3, r2 + 800ccea: b299 uxth r1, r3 + 800ccec: 6c7b ldr r3, [r7, #68] ; 0x44 + 800ccee: 2b00 cmp r3, #0 + 800ccf0: bf0c ite eq + 800ccf2: 2301 moveq r3, #1 + 800ccf4: 2300 movne r3, #0 + 800ccf6: b2db uxtb r3, r3 + 800ccf8: f107 0012 add.w r0, r7, #18 + 800ccfc: 8cba ldrh r2, [r7, #36] ; 0x24 + 800ccfe: 9302 str r3, [sp, #8] + 800cd00: 797b ldrb r3, [r7, #5] + 800cd02: 9301 str r3, [sp, #4] + 800cd04: 68fb ldr r3, [r7, #12] + 800cd06: 9300 str r3, [sp, #0] + 800cd08: 4603 mov r3, r0 + 800cd0a: 2000 movs r0, #0 + 800cd0c: f7ff fd8a bl 800c824 + 800cd10: 6338 str r0, [r7, #48] ; 0x30 + 800cd12: 6b3b ldr r3, [r7, #48] ; 0x30 + 800cd14: 2b00 cmp r3, #0 + 800cd16: f000 817e beq.w 800d016 + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); + goto memerr; + } + LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", + 800cd1a: 6b3b ldr r3, [r7, #48] ; 0x30 + 800cd1c: 895b ldrh r3, [r3, #10] + 800cd1e: 8b3a ldrh r2, [r7, #24] + 800cd20: 429a cmp r2, r3 + 800cd22: d906 bls.n 800cd32 + 800cd24: 4b8f ldr r3, [pc, #572] ; (800cf64 ) + 800cd26: f44f 7210 mov.w r2, #576 ; 0x240 + 800cd2a: 498f ldr r1, [pc, #572] ; (800cf68 ) + 800cd2c: 488f ldr r0, [pc, #572] ; (800cf6c ) + 800cd2e: f006 f829 bl 8012d84 + (p->len >= seglen)); + TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t*)arg + pos, seglen, &chksum, &chksum_swapped); + 800cd32: 6b3b ldr r3, [r7, #48] ; 0x30 + 800cd34: 685a ldr r2, [r3, #4] + 800cd36: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800cd3a: 18d0 adds r0, r2, r3 + 800cd3c: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800cd40: 68ba ldr r2, [r7, #8] + 800cd42: 4413 add r3, r2 + 800cd44: 8b3a ldrh r2, [r7, #24] + 800cd46: 4619 mov r1, r3 + 800cd48: f006 f9e7 bl 801311a + 800cd4c: e02e b.n 800cdac + * sent out on the link (as it has to be ACKed by the remote + * party) we can safely use PBUF_ROM instead of PBUF_REF here. + */ + struct pbuf *p2; +#if TCP_OVERSIZE + LWIP_ASSERT("oversize == 0", oversize == 0); + 800cd4e: 8a7b ldrh r3, [r7, #18] + 800cd50: 2b00 cmp r3, #0 + 800cd52: d006 beq.n 800cd62 + 800cd54: 4b83 ldr r3, [pc, #524] ; (800cf64 ) + 800cd56: f240 224b movw r2, #587 ; 0x24b + 800cd5a: 4985 ldr r1, [pc, #532] ; (800cf70 ) + 800cd5c: 4883 ldr r0, [pc, #524] ; (800cf6c ) + 800cd5e: f006 f811 bl 8012d84 +#endif /* TCP_OVERSIZE */ + if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { + 800cd62: 8b3b ldrh r3, [r7, #24] + 800cd64: 2201 movs r2, #1 + 800cd66: 4619 mov r1, r3 + 800cd68: 2000 movs r0, #0 + 800cd6a: f7fa ff73 bl 8007c54 + 800cd6e: 6178 str r0, [r7, #20] + 800cd70: 697b ldr r3, [r7, #20] + 800cd72: 2b00 cmp r3, #0 + 800cd74: f000 8151 beq.w 800d01a + chksum_swapped = 1; + chksum = SWAP_BYTES_IN_WORD(chksum); + } +#endif /* TCP_CHECKSUM_ON_COPY */ + /* reference the non-volatile payload data */ + ((struct pbuf_rom*)p2)->payload = (const u8_t*)arg + pos; + 800cd78: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800cd7c: 68ba ldr r2, [r7, #8] + 800cd7e: 441a add r2, r3 + 800cd80: 697b ldr r3, [r7, #20] + 800cd82: 605a str r2, [r3, #4] + + /* Second, allocate a pbuf for the headers. */ + if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { + 800cd84: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800cd88: b29b uxth r3, r3 + 800cd8a: 2200 movs r2, #0 + 800cd8c: 4619 mov r1, r3 + 800cd8e: 2000 movs r0, #0 + 800cd90: f7fa ff60 bl 8007c54 + 800cd94: 6338 str r0, [r7, #48] ; 0x30 + 800cd96: 6b3b ldr r3, [r7, #48] ; 0x30 + 800cd98: 2b00 cmp r3, #0 + 800cd9a: d103 bne.n 800cda4 + /* If allocation fails, we have to deallocate the data pbuf as + * well. */ + pbuf_free(p2); + 800cd9c: 6978 ldr r0, [r7, #20] + 800cd9e: f7fb fad1 bl 8008344 + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for header pbuf\n")); + goto memerr; + 800cda2: e13d b.n 800d020 + } + /* Concatenate the headers and data pbufs together. */ + pbuf_cat(p/*header*/, p2/*data*/); + 800cda4: 6979 ldr r1, [r7, #20] + 800cda6: 6b38 ldr r0, [r7, #48] ; 0x30 + 800cda8: f7fb fb98 bl 80084dc + } + + queuelen += pbuf_clen(p); + 800cdac: 6b38 ldr r0, [r7, #48] ; 0x30 + 800cdae: f7fb fb5d bl 800846c + 800cdb2: 4603 mov r3, r0 + 800cdb4: 461a mov r2, r3 + 800cdb6: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 + 800cdba: 4413 add r3, r2 + 800cdbc: f8a7 3040 strh.w r3, [r7, #64] ; 0x40 + + /* Now that there are more segments queued, we check again if the + * length of the queue exceeds the configured maximum or + * overflows. */ + if ((queuelen > TCP_SND_QUEUELEN) || (queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { + 800cdc0: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 + 800cdc4: 2b09 cmp r3, #9 + 800cdc6: d805 bhi.n 800cdd4 + 800cdc8: f8b7 3040 ldrh.w r3, [r7, #64] ; 0x40 + 800cdcc: f64f 72fc movw r2, #65532 ; 0xfffc + 800cdd0: 4293 cmp r3, r2 + 800cdd2: d903 bls.n 800cddc + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: queue too long %"U16_F" (%d)\n", + queuelen, (int)TCP_SND_QUEUELEN)); + pbuf_free(p); + 800cdd4: 6b38 ldr r0, [r7, #48] ; 0x30 + 800cdd6: f7fb fab5 bl 8008344 + goto memerr; + 800cdda: e121 b.n 800d020 + } + + if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { + 800cddc: 68fb ldr r3, [r7, #12] + 800cdde: 6d9a ldr r2, [r3, #88] ; 0x58 + 800cde0: f8b7 3042 ldrh.w r3, [r7, #66] ; 0x42 + 800cde4: 441a add r2, r3 + 800cde6: f897 3026 ldrb.w r3, [r7, #38] ; 0x26 + 800cdea: 9300 str r3, [sp, #0] + 800cdec: 4613 mov r3, r2 + 800cdee: 2200 movs r2, #0 + 800cdf0: 6b39 ldr r1, [r7, #48] ; 0x30 + 800cdf2: 68f8 ldr r0, [r7, #12] + 800cdf4: f7ff fc8e bl 800c714 + 800cdf8: 64f8 str r0, [r7, #76] ; 0x4c + 800cdfa: 6cfb ldr r3, [r7, #76] ; 0x4c + 800cdfc: 2b00 cmp r3, #0 + 800cdfe: f000 810e beq.w 800d01e + seg->chksum_swapped = chksum_swapped; + seg->flags |= TF_SEG_DATA_CHECKSUMMED; +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* first segment of to-be-queued data? */ + if (queue == NULL) { + 800ce02: 6c7b ldr r3, [r7, #68] ; 0x44 + 800ce04: 2b00 cmp r3, #0 + 800ce06: d102 bne.n 800ce0e + queue = seg; + 800ce08: 6cfb ldr r3, [r7, #76] ; 0x4c + 800ce0a: 647b str r3, [r7, #68] ; 0x44 + 800ce0c: e00c b.n 800ce28 + } else { + /* Attach the segment to the end of the queued segments */ + LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); + 800ce0e: 6cbb ldr r3, [r7, #72] ; 0x48 + 800ce10: 2b00 cmp r3, #0 + 800ce12: d106 bne.n 800ce22 + 800ce14: 4b53 ldr r3, [pc, #332] ; (800cf64 ) + 800ce16: f240 2285 movw r2, #645 ; 0x285 + 800ce1a: 4956 ldr r1, [pc, #344] ; (800cf74 ) + 800ce1c: 4853 ldr r0, [pc, #332] ; (800cf6c ) + 800ce1e: f005 ffb1 bl 8012d84 + prev_seg->next = seg; + 800ce22: 6cbb ldr r3, [r7, #72] ; 0x48 + 800ce24: 6cfa ldr r2, [r7, #76] ; 0x4c + 800ce26: 601a str r2, [r3, #0] + } + /* remember last segment of to-be-queued data for next iteration */ + prev_seg = seg; + 800ce28: 6cfb ldr r3, [r7, #76] ; 0x4c + 800ce2a: 64bb str r3, [r7, #72] ; 0x48 + + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", + lwip_ntohl(seg->tcphdr->seqno), + lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); + + pos += seglen; + 800ce2c: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 + 800ce30: 8b3b ldrh r3, [r7, #24] + 800ce32: 4413 add r3, r2 + 800ce34: f8a7 3042 strh.w r3, [r7, #66] ; 0x42 + while (pos < len) { + 800ce38: f8b7 2042 ldrh.w r2, [r7, #66] ; 0x42 + 800ce3c: 88fb ldrh r3, [r7, #6] + 800ce3e: 429a cmp r2, r3 + 800ce40: f4ff af38 bcc.w 800ccb4 + /* + * Phase 1: If data has been added to the preallocated tail of + * last_unsent, we update the length fields of the pbuf chain. + */ +#if TCP_OVERSIZE + if (oversize_used > 0) { + 800ce44: 8ffb ldrh r3, [r7, #62] ; 0x3e + 800ce46: 2b00 cmp r3, #0 + 800ce48: d02c beq.n 800cea4 + struct pbuf *p; + /* Bump tot_len of whole chain, len of tail */ + for (p = last_unsent->p; p; p = p->next) { + 800ce4a: 6d3b ldr r3, [r7, #80] ; 0x50 + 800ce4c: 685b ldr r3, [r3, #4] + 800ce4e: 62fb str r3, [r7, #44] ; 0x2c + 800ce50: e01e b.n 800ce90 + p->tot_len += oversize_used; + 800ce52: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce54: 891a ldrh r2, [r3, #8] + 800ce56: 8ffb ldrh r3, [r7, #62] ; 0x3e + 800ce58: 4413 add r3, r2 + 800ce5a: b29a uxth r2, r3 + 800ce5c: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce5e: 811a strh r2, [r3, #8] + if (p->next == NULL) { + 800ce60: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce62: 681b ldr r3, [r3, #0] + 800ce64: 2b00 cmp r3, #0 + 800ce66: d110 bne.n 800ce8a + TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); + 800ce68: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce6a: 685b ldr r3, [r3, #4] + 800ce6c: 6afa ldr r2, [r7, #44] ; 0x2c + 800ce6e: 8952 ldrh r2, [r2, #10] + 800ce70: 4413 add r3, r2 + 800ce72: 8ffa ldrh r2, [r7, #62] ; 0x3e + 800ce74: 68b9 ldr r1, [r7, #8] + 800ce76: 4618 mov r0, r3 + 800ce78: f006 f94f bl 801311a + p->len += oversize_used; + 800ce7c: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce7e: 895a ldrh r2, [r3, #10] + 800ce80: 8ffb ldrh r3, [r7, #62] ; 0x3e + 800ce82: 4413 add r3, r2 + 800ce84: b29a uxth r2, r3 + 800ce86: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce88: 815a strh r2, [r3, #10] + for (p = last_unsent->p; p; p = p->next) { + 800ce8a: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce8c: 681b ldr r3, [r3, #0] + 800ce8e: 62fb str r3, [r7, #44] ; 0x2c + 800ce90: 6afb ldr r3, [r7, #44] ; 0x2c + 800ce92: 2b00 cmp r3, #0 + 800ce94: d1dd bne.n 800ce52 + } + } + last_unsent->len += oversize_used; + 800ce96: 6d3b ldr r3, [r7, #80] ; 0x50 + 800ce98: 891a ldrh r2, [r3, #8] + 800ce9a: 8ffb ldrh r3, [r7, #62] ; 0x3e + 800ce9c: 4413 add r3, r2 + 800ce9e: b29a uxth r2, r3 + 800cea0: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cea2: 811a strh r2, [r3, #8] + LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", + last_unsent->oversize_left >= oversize_used); + last_unsent->oversize_left -= oversize_used; +#endif /* TCP_OVERSIZE_DBGCHECK */ + } + pcb->unsent_oversize = oversize; + 800cea4: 8a7a ldrh r2, [r7, #18] + 800cea6: 68fb ldr r3, [r7, #12] + 800cea8: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 + + /* + * Phase 2: concat_p can be concatenated onto last_unsent->p, unless we + * determined that the last ROM pbuf can be extended to include the new data. + */ + if (concat_p != NULL) { + 800ceac: 6d7b ldr r3, [r7, #84] ; 0x54 + 800ceae: 2b00 cmp r3, #0 + 800ceb0: d018 beq.n 800cee4 + LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", + 800ceb2: 6d3b ldr r3, [r7, #80] ; 0x50 + 800ceb4: 2b00 cmp r3, #0 + 800ceb6: d106 bne.n 800cec6 + 800ceb8: 4b2a ldr r3, [pc, #168] ; (800cf64 ) + 800ceba: f240 22ba movw r2, #698 ; 0x2ba + 800cebe: 492e ldr r1, [pc, #184] ; (800cf78 ) + 800cec0: 482a ldr r0, [pc, #168] ; (800cf6c ) + 800cec2: f005 ff5f bl 8012d84 + (last_unsent != NULL)); + pbuf_cat(last_unsent->p, concat_p); + 800cec6: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cec8: 685b ldr r3, [r3, #4] + 800ceca: 6d79 ldr r1, [r7, #84] ; 0x54 + 800cecc: 4618 mov r0, r3 + 800cece: f7fb fb05 bl 80084dc + last_unsent->len += concat_p->tot_len; + 800ced2: 6d3b ldr r3, [r7, #80] ; 0x50 + 800ced4: 891a ldrh r2, [r3, #8] + 800ced6: 6d7b ldr r3, [r7, #84] ; 0x54 + 800ced8: 891b ldrh r3, [r3, #8] + 800ceda: 4413 add r3, r2 + 800cedc: b29a uxth r2, r3 + 800cede: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cee0: 811a strh r2, [r3, #8] + 800cee2: e037 b.n 800cf54 + } else if (extendlen > 0) { + 800cee4: 8fbb ldrh r3, [r7, #60] ; 0x3c + 800cee6: 2b00 cmp r3, #0 + 800cee8: d034 beq.n 800cf54 + struct pbuf *p; + LWIP_ASSERT("tcp_write: extension of reference requires reference", + 800ceea: 6d3b ldr r3, [r7, #80] ; 0x50 + 800ceec: 2b00 cmp r3, #0 + 800ceee: d003 beq.n 800cef8 + 800cef0: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cef2: 685b ldr r3, [r3, #4] + 800cef4: 2b00 cmp r3, #0 + 800cef6: d106 bne.n 800cf06 + 800cef8: 4b1a ldr r3, [pc, #104] ; (800cf64 ) + 800cefa: f44f 7230 mov.w r2, #704 ; 0x2c0 + 800cefe: 491f ldr r1, [pc, #124] ; (800cf7c ) + 800cf00: 481a ldr r0, [pc, #104] ; (800cf6c ) + 800cf02: f005 ff3f bl 8012d84 + last_unsent != NULL && last_unsent->p != NULL); + for (p = last_unsent->p; p->next != NULL; p = p->next) { + 800cf06: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cf08: 685b ldr r3, [r3, #4] + 800cf0a: 62bb str r3, [r7, #40] ; 0x28 + 800cf0c: e009 b.n 800cf22 + p->tot_len += extendlen; + 800cf0e: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf10: 891a ldrh r2, [r3, #8] + 800cf12: 8fbb ldrh r3, [r7, #60] ; 0x3c + 800cf14: 4413 add r3, r2 + 800cf16: b29a uxth r2, r3 + 800cf18: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf1a: 811a strh r2, [r3, #8] + for (p = last_unsent->p; p->next != NULL; p = p->next) { + 800cf1c: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf1e: 681b ldr r3, [r3, #0] + 800cf20: 62bb str r3, [r7, #40] ; 0x28 + 800cf22: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf24: 681b ldr r3, [r3, #0] + 800cf26: 2b00 cmp r3, #0 + 800cf28: d1f1 bne.n 800cf0e + } + p->tot_len += extendlen; + 800cf2a: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf2c: 891a ldrh r2, [r3, #8] + 800cf2e: 8fbb ldrh r3, [r7, #60] ; 0x3c + 800cf30: 4413 add r3, r2 + 800cf32: b29a uxth r2, r3 + 800cf34: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf36: 811a strh r2, [r3, #8] + p->len += extendlen; + 800cf38: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf3a: 895a ldrh r2, [r3, #10] + 800cf3c: 8fbb ldrh r3, [r7, #60] ; 0x3c + 800cf3e: 4413 add r3, r2 + 800cf40: b29a uxth r2, r3 + 800cf42: 6abb ldr r3, [r7, #40] ; 0x28 + 800cf44: 815a strh r2, [r3, #10] + last_unsent->len += extendlen; + 800cf46: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cf48: 891a ldrh r2, [r3, #8] + 800cf4a: 8fbb ldrh r3, [r7, #60] ; 0x3c + 800cf4c: 4413 add r3, r2 + 800cf4e: b29a uxth r2, r3 + 800cf50: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cf52: 811a strh r2, [r3, #8] + + /* + * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that + * is harmless + */ + if (last_unsent == NULL) { + 800cf54: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cf56: 2b00 cmp r3, #0 + 800cf58: d112 bne.n 800cf80 + pcb->unsent = queue; + 800cf5a: 68fb ldr r3, [r7, #12] + 800cf5c: 6c7a ldr r2, [r7, #68] ; 0x44 + 800cf5e: 669a str r2, [r3, #104] ; 0x68 + 800cf60: e011 b.n 800cf86 + 800cf62: bf00 nop + 800cf64: 08015508 .word 0x08015508 + 800cf68: 08015718 .word 0x08015718 + 800cf6c: 0801556c .word 0x0801556c + 800cf70: 08015758 .word 0x08015758 + 800cf74: 08015768 .word 0x08015768 + 800cf78: 0801577c .word 0x0801577c + 800cf7c: 080157b4 .word 0x080157b4 + } else { + last_unsent->next = queue; + 800cf80: 6d3b ldr r3, [r7, #80] ; 0x50 + 800cf82: 6c7a ldr r2, [r7, #68] ; 0x44 + 800cf84: 601a str r2, [r3, #0] + } + + /* + * Finally update the pcb state. + */ + pcb->snd_lbb += len; + 800cf86: 68fb ldr r3, [r7, #12] + 800cf88: 6d9a ldr r2, [r3, #88] ; 0x58 + 800cf8a: 88fb ldrh r3, [r7, #6] + 800cf8c: 441a add r2, r3 + 800cf8e: 68fb ldr r3, [r7, #12] + 800cf90: 659a str r2, [r3, #88] ; 0x58 + pcb->snd_buf -= len; + 800cf92: 68fb ldr r3, [r7, #12] + 800cf94: f8b3 2060 ldrh.w r2, [r3, #96] ; 0x60 + 800cf98: 88fb ldrh r3, [r7, #6] + 800cf9a: 1ad3 subs r3, r2, r3 + 800cf9c: b29a uxth r2, r3 + 800cf9e: 68fb ldr r3, [r7, #12] + 800cfa0: f8a3 2060 strh.w r2, [r3, #96] ; 0x60 + pcb->snd_queuelen = queuelen; + 800cfa4: 68fb ldr r3, [r7, #12] + 800cfa6: f8b7 2040 ldrh.w r2, [r7, #64] ; 0x40 + 800cfaa: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: %"S16_F" (after enqueued)\n", + pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + 800cfae: 68fb ldr r3, [r7, #12] + 800cfb0: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800cfb4: 2b00 cmp r3, #0 + 800cfb6: d00e beq.n 800cfd6 + LWIP_ASSERT("tcp_write: valid queue length", + 800cfb8: 68fb ldr r3, [r7, #12] + 800cfba: 6edb ldr r3, [r3, #108] ; 0x6c + 800cfbc: 2b00 cmp r3, #0 + 800cfbe: d10a bne.n 800cfd6 + 800cfc0: 68fb ldr r3, [r7, #12] + 800cfc2: 6e9b ldr r3, [r3, #104] ; 0x68 + 800cfc4: 2b00 cmp r3, #0 + 800cfc6: d106 bne.n 800cfd6 + 800cfc8: 4b2c ldr r3, [pc, #176] ; (800d07c ) + 800cfca: f44f 723b mov.w r2, #748 ; 0x2ec + 800cfce: 492c ldr r1, [pc, #176] ; (800d080 ) + 800cfd0: 482c ldr r0, [pc, #176] ; (800d084 ) + 800cfd2: f005 fed7 bl 8012d84 + pcb->unacked != NULL || pcb->unsent != NULL); + } + + /* Set the PSH flag in the last segment that we enqueued. */ + if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { + 800cfd6: 6cfb ldr r3, [r7, #76] ; 0x4c + 800cfd8: 2b00 cmp r3, #0 + 800cfda: d016 beq.n 800d00a + 800cfdc: 6cfb ldr r3, [r7, #76] ; 0x4c + 800cfde: 68db ldr r3, [r3, #12] + 800cfe0: 2b00 cmp r3, #0 + 800cfe2: d012 beq.n 800d00a + 800cfe4: 797b ldrb r3, [r7, #5] + 800cfe6: f003 0302 and.w r3, r3, #2 + 800cfea: 2b00 cmp r3, #0 + 800cfec: d10d bne.n 800d00a + TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); + 800cfee: 6cfb ldr r3, [r7, #76] ; 0x4c + 800cff0: 68db ldr r3, [r3, #12] + 800cff2: 899b ldrh r3, [r3, #12] + 800cff4: b29c uxth r4, r3 + 800cff6: 2008 movs r0, #8 + 800cff8: f7fa f86c bl 80070d4 + 800cffc: 4603 mov r3, r0 + 800cffe: 461a mov r2, r3 + 800d000: 6cfb ldr r3, [r7, #76] ; 0x4c + 800d002: 68db ldr r3, [r3, #12] + 800d004: 4322 orrs r2, r4 + 800d006: b292 uxth r2, r2 + 800d008: 819a strh r2, [r3, #12] + } + + return ERR_OK; + 800d00a: 2300 movs r3, #0 + 800d00c: e031 b.n 800d072 + goto memerr; + 800d00e: bf00 nop + 800d010: e006 b.n 800d020 + goto memerr; + 800d012: bf00 nop + 800d014: e004 b.n 800d020 + goto memerr; + 800d016: bf00 nop + 800d018: e002 b.n 800d020 + goto memerr; + 800d01a: bf00 nop + 800d01c: e000 b.n 800d020 + goto memerr; + 800d01e: bf00 nop +memerr: + pcb->flags |= TF_NAGLEMEMERR; + 800d020: 68fb ldr r3, [r7, #12] + 800d022: 7e9b ldrb r3, [r3, #26] + 800d024: f063 037f orn r3, r3, #127 ; 0x7f + 800d028: b2da uxtb r2, r3 + 800d02a: 68fb ldr r3, [r7, #12] + 800d02c: 769a strb r2, [r3, #26] + TCP_STATS_INC(tcp.memerr); + + if (concat_p != NULL) { + 800d02e: 6d7b ldr r3, [r7, #84] ; 0x54 + 800d030: 2b00 cmp r3, #0 + 800d032: d002 beq.n 800d03a + pbuf_free(concat_p); + 800d034: 6d78 ldr r0, [r7, #84] ; 0x54 + 800d036: f7fb f985 bl 8008344 + } + if (queue != NULL) { + 800d03a: 6c7b ldr r3, [r7, #68] ; 0x44 + 800d03c: 2b00 cmp r3, #0 + 800d03e: d002 beq.n 800d046 + tcp_segs_free(queue); + 800d040: 6c78 ldr r0, [r7, #68] ; 0x44 + 800d042: f7fc fcf4 bl 8009a2e + } + if (pcb->snd_queuelen != 0) { + 800d046: 68fb ldr r3, [r7, #12] + 800d048: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800d04c: 2b00 cmp r3, #0 + 800d04e: d00e beq.n 800d06e + LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || + 800d050: 68fb ldr r3, [r7, #12] + 800d052: 6edb ldr r3, [r3, #108] ; 0x6c + 800d054: 2b00 cmp r3, #0 + 800d056: d10a bne.n 800d06e + 800d058: 68fb ldr r3, [r7, #12] + 800d05a: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d05c: 2b00 cmp r3, #0 + 800d05e: d106 bne.n 800d06e + 800d060: 4b06 ldr r3, [pc, #24] ; (800d07c ) + 800d062: f240 3201 movw r2, #769 ; 0x301 + 800d066: 4906 ldr r1, [pc, #24] ; (800d080 ) + 800d068: 4806 ldr r0, [pc, #24] ; (800d084 ) + 800d06a: f005 fe8b bl 8012d84 + pcb->unsent != NULL); + } + LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); + return ERR_MEM; + 800d06e: f04f 33ff mov.w r3, #4294967295 +} + 800d072: 4618 mov r0, r3 + 800d074: 375c adds r7, #92 ; 0x5c + 800d076: 46bd mov sp, r7 + 800d078: bd90 pop {r4, r7, pc} + 800d07a: bf00 nop + 800d07c: 08015508 .word 0x08015508 + 800d080: 080157ec .word 0x080157ec + 800d084: 0801556c .word 0x0801556c + +0800d088 : + * @param pcb Protocol control block for the TCP connection. + * @param flags TCP header flags to set in the outgoing segment. + */ +err_t +tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) +{ + 800d088: b580 push {r7, lr} + 800d08a: b08a sub sp, #40 ; 0x28 + 800d08c: af02 add r7, sp, #8 + 800d08e: 6078 str r0, [r7, #4] + 800d090: 460b mov r3, r1 + 800d092: 70fb strb r3, [r7, #3] + struct pbuf *p; + struct tcp_seg *seg; + u8_t optflags = 0; + 800d094: 2300 movs r3, #0 + 800d096: 77fb strb r3, [r7, #31] + u8_t optlen = 0; + 800d098: 2300 movs r3, #0 + 800d09a: 75fb strb r3, [r7, #23] + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen)); + + LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", + 800d09c: 78fb ldrb r3, [r7, #3] + 800d09e: f003 0303 and.w r3, r3, #3 + 800d0a2: 2b00 cmp r3, #0 + 800d0a4: d106 bne.n 800d0b4 + 800d0a6: 4b6f ldr r3, [pc, #444] ; (800d264 ) + 800d0a8: f240 321a movw r2, #794 ; 0x31a + 800d0ac: 496e ldr r1, [pc, #440] ; (800d268 ) + 800d0ae: 486f ldr r0, [pc, #444] ; (800d26c ) + 800d0b0: f005 fe68 bl 8012d84 + (flags & (TCP_SYN | TCP_FIN)) != 0); + + /* check for configured max queuelen and possible overflow (FIN flag should always come through!) */ + if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) && + 800d0b4: 687b ldr r3, [r7, #4] + 800d0b6: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800d0ba: 2b08 cmp r3, #8 + 800d0bc: d806 bhi.n 800d0cc + 800d0be: 687b ldr r3, [r7, #4] + 800d0c0: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800d0c4: f64f 72fc movw r2, #65532 ; 0xfffc + 800d0c8: 4293 cmp r3, r2 + 800d0ca: d90e bls.n 800d0ea + ((flags & TCP_FIN) == 0)) { + 800d0cc: 78fb ldrb r3, [r7, #3] + 800d0ce: f003 0301 and.w r3, r3, #1 + if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) && + 800d0d2: 2b00 cmp r3, #0 + 800d0d4: d109 bne.n 800d0ea + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n", + pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); + TCP_STATS_INC(tcp.memerr); + pcb->flags |= TF_NAGLEMEMERR; + 800d0d6: 687b ldr r3, [r7, #4] + 800d0d8: 7e9b ldrb r3, [r3, #26] + 800d0da: f063 037f orn r3, r3, #127 ; 0x7f + 800d0de: b2da uxtb r2, r3 + 800d0e0: 687b ldr r3, [r7, #4] + 800d0e2: 769a strb r2, [r3, #26] + return ERR_MEM; + 800d0e4: f04f 33ff mov.w r3, #4294967295 + 800d0e8: e0b7 b.n 800d25a + } + + if (flags & TCP_SYN) { + 800d0ea: 78fb ldrb r3, [r7, #3] + 800d0ec: f003 0302 and.w r3, r3, #2 + 800d0f0: 2b00 cmp r3, #0 + 800d0f2: d001 beq.n 800d0f8 + optflags = TF_SEG_OPTS_MSS; + 800d0f4: 2301 movs r3, #1 + 800d0f6: 77fb strb r3, [r7, #31] + /* Make sure the timestamp option is only included in data segments if we + agreed about it with the remote host. */ + optflags |= TF_SEG_OPTS_TS; + } +#endif /* LWIP_TCP_TIMESTAMPS */ + optlen = LWIP_TCP_OPT_LENGTH(optflags); + 800d0f8: 7ffb ldrb r3, [r7, #31] + 800d0fa: 009b lsls r3, r3, #2 + 800d0fc: b2db uxtb r3, r3 + 800d0fe: f003 0304 and.w r3, r3, #4 + 800d102: 75fb strb r3, [r7, #23] + + /* Allocate pbuf with room for TCP header + options */ + if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { + 800d104: 7dfb ldrb r3, [r7, #23] + 800d106: b29b uxth r3, r3 + 800d108: 2200 movs r2, #0 + 800d10a: 4619 mov r1, r3 + 800d10c: 2000 movs r0, #0 + 800d10e: f7fa fda1 bl 8007c54 + 800d112: 6138 str r0, [r7, #16] + 800d114: 693b ldr r3, [r7, #16] + 800d116: 2b00 cmp r3, #0 + 800d118: d109 bne.n 800d12e + pcb->flags |= TF_NAGLEMEMERR; + 800d11a: 687b ldr r3, [r7, #4] + 800d11c: 7e9b ldrb r3, [r3, #26] + 800d11e: f063 037f orn r3, r3, #127 ; 0x7f + 800d122: b2da uxtb r2, r3 + 800d124: 687b ldr r3, [r7, #4] + 800d126: 769a strb r2, [r3, #26] + TCP_STATS_INC(tcp.memerr); + return ERR_MEM; + 800d128: f04f 33ff mov.w r3, #4294967295 + 800d12c: e095 b.n 800d25a + } + LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", + 800d12e: 693b ldr r3, [r7, #16] + 800d130: 895a ldrh r2, [r3, #10] + 800d132: 7dfb ldrb r3, [r7, #23] + 800d134: b29b uxth r3, r3 + 800d136: 429a cmp r2, r3 + 800d138: d206 bcs.n 800d148 + 800d13a: 4b4a ldr r3, [pc, #296] ; (800d264 ) + 800d13c: f44f 7250 mov.w r2, #832 ; 0x340 + 800d140: 494b ldr r1, [pc, #300] ; (800d270 ) + 800d142: 484a ldr r0, [pc, #296] ; (800d26c ) + 800d144: f005 fe1e bl 8012d84 + (p->len >= optlen)); + + /* Allocate memory for tcp_seg, and fill in fields. */ + if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { + 800d148: 687b ldr r3, [r7, #4] + 800d14a: 6d99 ldr r1, [r3, #88] ; 0x58 + 800d14c: 78fa ldrb r2, [r7, #3] + 800d14e: 7ffb ldrb r3, [r7, #31] + 800d150: 9300 str r3, [sp, #0] + 800d152: 460b mov r3, r1 + 800d154: 6939 ldr r1, [r7, #16] + 800d156: 6878 ldr r0, [r7, #4] + 800d158: f7ff fadc bl 800c714 + 800d15c: 60f8 str r0, [r7, #12] + 800d15e: 68fb ldr r3, [r7, #12] + 800d160: 2b00 cmp r3, #0 + 800d162: d109 bne.n 800d178 + pcb->flags |= TF_NAGLEMEMERR; + 800d164: 687b ldr r3, [r7, #4] + 800d166: 7e9b ldrb r3, [r3, #26] + 800d168: f063 037f orn r3, r3, #127 ; 0x7f + 800d16c: b2da uxtb r2, r3 + 800d16e: 687b ldr r3, [r7, #4] + 800d170: 769a strb r2, [r3, #26] + TCP_STATS_INC(tcp.memerr); + return ERR_MEM; + 800d172: f04f 33ff mov.w r3, #4294967295 + 800d176: e070 b.n 800d25a + } + LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); + 800d178: 68fb ldr r3, [r7, #12] + 800d17a: 68db ldr r3, [r3, #12] + 800d17c: f003 0303 and.w r3, r3, #3 + 800d180: 2b00 cmp r3, #0 + 800d182: d006 beq.n 800d192 + 800d184: 4b37 ldr r3, [pc, #220] ; (800d264 ) + 800d186: f240 3249 movw r2, #841 ; 0x349 + 800d18a: 493a ldr r1, [pc, #232] ; (800d274 ) + 800d18c: 4837 ldr r0, [pc, #220] ; (800d26c ) + 800d18e: f005 fdf9 bl 8012d84 + LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); + 800d192: 68fb ldr r3, [r7, #12] + 800d194: 891b ldrh r3, [r3, #8] + 800d196: 2b00 cmp r3, #0 + 800d198: d006 beq.n 800d1a8 + 800d19a: 4b32 ldr r3, [pc, #200] ; (800d264 ) + 800d19c: f240 324a movw r2, #842 ; 0x34a + 800d1a0: 4935 ldr r1, [pc, #212] ; (800d278 ) + 800d1a2: 4832 ldr r0, [pc, #200] ; (800d26c ) + 800d1a4: f005 fdee bl 8012d84 + lwip_ntohl(seg->tcphdr->seqno), + lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg), + (u16_t)flags)); + + /* Now append seg to pcb->unsent queue */ + if (pcb->unsent == NULL) { + 800d1a8: 687b ldr r3, [r7, #4] + 800d1aa: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d1ac: 2b00 cmp r3, #0 + 800d1ae: d103 bne.n 800d1b8 + pcb->unsent = seg; + 800d1b0: 687b ldr r3, [r7, #4] + 800d1b2: 68fa ldr r2, [r7, #12] + 800d1b4: 669a str r2, [r3, #104] ; 0x68 + 800d1b6: e00d b.n 800d1d4 + } else { + struct tcp_seg *useg; + for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); + 800d1b8: 687b ldr r3, [r7, #4] + 800d1ba: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d1bc: 61bb str r3, [r7, #24] + 800d1be: e002 b.n 800d1c6 + 800d1c0: 69bb ldr r3, [r7, #24] + 800d1c2: 681b ldr r3, [r3, #0] + 800d1c4: 61bb str r3, [r7, #24] + 800d1c6: 69bb ldr r3, [r7, #24] + 800d1c8: 681b ldr r3, [r3, #0] + 800d1ca: 2b00 cmp r3, #0 + 800d1cc: d1f8 bne.n 800d1c0 + useg->next = seg; + 800d1ce: 69bb ldr r3, [r7, #24] + 800d1d0: 68fa ldr r2, [r7, #12] + 800d1d2: 601a str r2, [r3, #0] + } +#if TCP_OVERSIZE + /* The new unsent tail has no space */ + pcb->unsent_oversize = 0; + 800d1d4: 687b ldr r3, [r7, #4] + 800d1d6: 2200 movs r2, #0 + 800d1d8: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 +#endif /* TCP_OVERSIZE */ + + /* SYN and FIN bump the sequence number */ + if ((flags & TCP_SYN) || (flags & TCP_FIN)) { + 800d1dc: 78fb ldrb r3, [r7, #3] + 800d1de: f003 0302 and.w r3, r3, #2 + 800d1e2: 2b00 cmp r3, #0 + 800d1e4: d104 bne.n 800d1f0 + 800d1e6: 78fb ldrb r3, [r7, #3] + 800d1e8: f003 0301 and.w r3, r3, #1 + 800d1ec: 2b00 cmp r3, #0 + 800d1ee: d004 beq.n 800d1fa + pcb->snd_lbb++; + 800d1f0: 687b ldr r3, [r7, #4] + 800d1f2: 6d9b ldr r3, [r3, #88] ; 0x58 + 800d1f4: 1c5a adds r2, r3, #1 + 800d1f6: 687b ldr r3, [r7, #4] + 800d1f8: 659a str r2, [r3, #88] ; 0x58 + /* optlen does not influence snd_buf */ + } + if (flags & TCP_FIN) { + 800d1fa: 78fb ldrb r3, [r7, #3] + 800d1fc: f003 0301 and.w r3, r3, #1 + 800d200: 2b00 cmp r3, #0 + 800d202: d006 beq.n 800d212 + pcb->flags |= TF_FIN; + 800d204: 687b ldr r3, [r7, #4] + 800d206: 7e9b ldrb r3, [r3, #26] + 800d208: f043 0320 orr.w r3, r3, #32 + 800d20c: b2da uxtb r2, r3 + 800d20e: 687b ldr r3, [r7, #4] + 800d210: 769a strb r2, [r3, #26] + } + + /* update number of segments on the queues */ + pcb->snd_queuelen += pbuf_clen(seg->p); + 800d212: 68fb ldr r3, [r7, #12] + 800d214: 685b ldr r3, [r3, #4] + 800d216: 4618 mov r0, r3 + 800d218: f7fb f928 bl 800846c + 800d21c: 4603 mov r3, r0 + 800d21e: 461a mov r2, r3 + 800d220: 687b ldr r3, [r7, #4] + 800d222: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800d226: 4413 add r3, r2 + 800d228: b29a uxth r2, r3 + 800d22a: 687b ldr r3, [r7, #4] + 800d22c: f8a3 2062 strh.w r2, [r3, #98] ; 0x62 + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: %"S16_F" (after enqueued)\n", pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + 800d230: 687b ldr r3, [r7, #4] + 800d232: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800d236: 2b00 cmp r3, #0 + 800d238: d00e beq.n 800d258 + LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", + 800d23a: 687b ldr r3, [r7, #4] + 800d23c: 6edb ldr r3, [r3, #108] ; 0x6c + 800d23e: 2b00 cmp r3, #0 + 800d240: d10a bne.n 800d258 + 800d242: 687b ldr r3, [r7, #4] + 800d244: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d246: 2b00 cmp r3, #0 + 800d248: d106 bne.n 800d258 + 800d24a: 4b06 ldr r3, [pc, #24] ; (800d264 ) + 800d24c: f44f 725b mov.w r2, #876 ; 0x36c + 800d250: 490a ldr r1, [pc, #40] ; (800d27c ) + 800d252: 4806 ldr r0, [pc, #24] ; (800d26c ) + 800d254: f005 fd96 bl 8012d84 + pcb->unacked != NULL || pcb->unsent != NULL); + } + + return ERR_OK; + 800d258: 2300 movs r3, #0 +} + 800d25a: 4618 mov r0, r3 + 800d25c: 3720 adds r7, #32 + 800d25e: 46bd mov sp, r7 + 800d260: bd80 pop {r7, pc} + 800d262: bf00 nop + 800d264: 08015508 .word 0x08015508 + 800d268: 0801580c .word 0x0801580c + 800d26c: 0801556c .word 0x0801556c + 800d270: 08015864 .word 0x08015864 + 800d274: 080158a0 .word 0x080158a0 + 800d278: 080158b8 .word 0x080158b8 + 800d27c: 080158e4 .word 0x080158e4 + +0800d280 : + * + * @param pcb Protocol control block for the TCP connection to send the ACK + */ +err_t +tcp_send_empty_ack(struct tcp_pcb *pcb) +{ + 800d280: b590 push {r4, r7, lr} + 800d282: b08b sub sp, #44 ; 0x2c + 800d284: af04 add r7, sp, #16 + 800d286: 6078 str r0, [r7, #4] + err_t err; + struct pbuf *p; + u8_t optlen = 0; + 800d288: 2300 movs r3, #0 + 800d28a: 75bb strb r3, [r7, #22] + if (pcb->flags & TF_TIMESTAMP) { + optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); + } +#endif + + p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt)); + 800d28c: 7dbb ldrb r3, [r7, #22] + 800d28e: b29c uxth r4, r3 + 800d290: 687b ldr r3, [r7, #4] + 800d292: 6cdb ldr r3, [r3, #76] ; 0x4c + 800d294: 4618 mov r0, r3 + 800d296: f7f9 ff2a bl 80070ee + 800d29a: 4603 mov r3, r0 + 800d29c: 2200 movs r2, #0 + 800d29e: 4621 mov r1, r4 + 800d2a0: 6878 ldr r0, [r7, #4] + 800d2a2: f7ff f97d bl 800c5a0 + 800d2a6: 6138 str r0, [r7, #16] + if (p == NULL) { + 800d2a8: 693b ldr r3, [r7, #16] + 800d2aa: 2b00 cmp r3, #0 + 800d2ac: d109 bne.n 800d2c2 + /* let tcp_fasttmr retry sending this ACK */ + pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); + 800d2ae: 687b ldr r3, [r7, #4] + 800d2b0: 7e9b ldrb r3, [r3, #26] + 800d2b2: f043 0303 orr.w r3, r3, #3 + 800d2b6: b2da uxtb r2, r3 + 800d2b8: 687b ldr r3, [r7, #4] + 800d2ba: 769a strb r2, [r3, #26] + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); + return ERR_BUF; + 800d2bc: f06f 0301 mvn.w r3, #1 + 800d2c0: e036 b.n 800d330 + if (pcb->flags & TF_TIMESTAMP) { + tcp_build_timestamp_option(pcb, (u32_t *)(tcphdr + 1)); + } +#endif + + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + 800d2c2: 687b ldr r3, [r7, #4] + 800d2c4: 3304 adds r3, #4 + 800d2c6: 4618 mov r0, r3 + 800d2c8: f004 f982 bl 80115d0 + 800d2cc: 60f8 str r0, [r7, #12] + if (netif == NULL) { + 800d2ce: 68fb ldr r3, [r7, #12] + 800d2d0: 2b00 cmp r3, #0 + 800d2d2: d102 bne.n 800d2da + err = ERR_RTE; + 800d2d4: 23fc movs r3, #252 ; 0xfc + 800d2d6: 75fb strb r3, [r7, #23] + 800d2d8: e012 b.n 800d300 + tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + &pcb->local_ip, &pcb->remote_ip); + } +#endif + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, + 800d2da: 6879 ldr r1, [r7, #4] + 800d2dc: 687b ldr r3, [r7, #4] + 800d2de: 1d18 adds r0, r3, #4 + 800d2e0: 687b ldr r3, [r7, #4] + 800d2e2: 7a9c ldrb r4, [r3, #10] + 800d2e4: 687b ldr r3, [r7, #4] + 800d2e6: 7a5b ldrb r3, [r3, #9] + 800d2e8: 68fa ldr r2, [r7, #12] + 800d2ea: 9202 str r2, [sp, #8] + 800d2ec: 2206 movs r2, #6 + 800d2ee: 9201 str r2, [sp, #4] + 800d2f0: 9300 str r3, [sp, #0] + 800d2f2: 4623 mov r3, r4 + 800d2f4: 4602 mov r2, r0 + 800d2f6: 6938 ldr r0, [r7, #16] + 800d2f8: f004 fb32 bl 8011960 + 800d2fc: 4603 mov r3, r0 + 800d2fe: 75fb strb r3, [r7, #23] + pcb->ttl, pcb->tos, IP_PROTO_TCP, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + } + pbuf_free(p); + 800d300: 6938 ldr r0, [r7, #16] + 800d302: f7fb f81f bl 8008344 + + if (err != ERR_OK) { + 800d306: f997 3017 ldrsb.w r3, [r7, #23] + 800d30a: 2b00 cmp r3, #0 + 800d30c: d007 beq.n 800d31e + /* let tcp_fasttmr retry sending this ACK */ + pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); + 800d30e: 687b ldr r3, [r7, #4] + 800d310: 7e9b ldrb r3, [r3, #26] + 800d312: f043 0303 orr.w r3, r3, #3 + 800d316: b2da uxtb r2, r3 + 800d318: 687b ldr r3, [r7, #4] + 800d31a: 769a strb r2, [r3, #26] + 800d31c: e006 b.n 800d32c + } else { + /* remove ACK flags from the PCB, as we sent an empty ACK now */ + pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + 800d31e: 687b ldr r3, [r7, #4] + 800d320: 7e9b ldrb r3, [r3, #26] + 800d322: f023 0303 bic.w r3, r3, #3 + 800d326: b2da uxtb r2, r3 + 800d328: 687b ldr r3, [r7, #4] + 800d32a: 769a strb r2, [r3, #26] + } + + return err; + 800d32c: f997 3017 ldrsb.w r3, [r7, #23] +} + 800d330: 4618 mov r0, r3 + 800d332: 371c adds r7, #28 + 800d334: 46bd mov sp, r7 + 800d336: bd90 pop {r4, r7, pc} + +0800d338 : + * @return ERR_OK if data has been sent or nothing to send + * another err_t on error + */ +err_t +tcp_output(struct tcp_pcb *pcb) +{ + 800d338: b5b0 push {r4, r5, r7, lr} + 800d33a: b08a sub sp, #40 ; 0x28 + 800d33c: af00 add r7, sp, #0 + 800d33e: 6078 str r0, [r7, #4] +#if TCP_CWND_DEBUG + s16_t i = 0; +#endif /* TCP_CWND_DEBUG */ + + /* pcb->state LISTEN not allowed here */ + LWIP_ASSERT("don't call tcp_output for listen-pcbs", + 800d340: 687b ldr r3, [r7, #4] + 800d342: 7d1b ldrb r3, [r3, #20] + 800d344: 2b01 cmp r3, #1 + 800d346: d106 bne.n 800d356 + 800d348: 4b99 ldr r3, [pc, #612] ; (800d5b0 ) + 800d34a: f44f 727b mov.w r2, #1004 ; 0x3ec + 800d34e: 4999 ldr r1, [pc, #612] ; (800d5b4 ) + 800d350: 4899 ldr r0, [pc, #612] ; (800d5b8 ) + 800d352: f005 fd17 bl 8012d84 + + /* First, check if we are invoked by the TCP input processing + code. If so, we do not output anything. Instead, we rely on the + input processing code to call us when input processing is done + with. */ + if (tcp_input_pcb == pcb) { + 800d356: 4b99 ldr r3, [pc, #612] ; (800d5bc ) + 800d358: 681b ldr r3, [r3, #0] + 800d35a: 687a ldr r2, [r7, #4] + 800d35c: 429a cmp r2, r3 + 800d35e: d101 bne.n 800d364 + return ERR_OK; + 800d360: 2300 movs r3, #0 + 800d362: e1cb b.n 800d6fc + } + + wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); + 800d364: 687b ldr r3, [r7, #4] + 800d366: f8b3 2048 ldrh.w r2, [r3, #72] ; 0x48 + 800d36a: 687b ldr r3, [r7, #4] + 800d36c: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c + 800d370: 4293 cmp r3, r2 + 800d372: bf28 it cs + 800d374: 4613 movcs r3, r2 + 800d376: b29b uxth r3, r3 + 800d378: 61bb str r3, [r7, #24] + + seg = pcb->unsent; + 800d37a: 687b ldr r3, [r7, #4] + 800d37c: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d37e: 627b str r3, [r7, #36] ; 0x24 + * because the ->unsent queue is empty or because the window does + * not allow it), construct an empty ACK segment and send it. + * + * If data is to be sent, we will just piggyback the ACK (see below). + */ + if (pcb->flags & TF_ACK_NOW && + 800d380: 687b ldr r3, [r7, #4] + 800d382: 7e9b ldrb r3, [r3, #26] + 800d384: f003 0302 and.w r3, r3, #2 + 800d388: 2b00 cmp r3, #0 + 800d38a: d017 beq.n 800d3bc + 800d38c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d38e: 2b00 cmp r3, #0 + 800d390: d00f beq.n 800d3b2 + (seg == NULL || + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { + 800d392: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d394: 68db ldr r3, [r3, #12] + 800d396: 685b ldr r3, [r3, #4] + 800d398: 4618 mov r0, r3 + 800d39a: f7f9 fea8 bl 80070ee + 800d39e: 4602 mov r2, r0 + 800d3a0: 687b ldr r3, [r7, #4] + 800d3a2: 6c5b ldr r3, [r3, #68] ; 0x44 + 800d3a4: 1ad3 subs r3, r2, r3 + 800d3a6: 6a7a ldr r2, [r7, #36] ; 0x24 + 800d3a8: 8912 ldrh r2, [r2, #8] + 800d3aa: 4413 add r3, r2 + (seg == NULL || + 800d3ac: 69ba ldr r2, [r7, #24] + 800d3ae: 429a cmp r2, r3 + 800d3b0: d204 bcs.n 800d3bc + return tcp_send_empty_ack(pcb); + 800d3b2: 6878 ldr r0, [r7, #4] + 800d3b4: f7ff ff64 bl 800d280 + 800d3b8: 4603 mov r3, r0 + 800d3ba: e19f b.n 800d6fc + } + + /* useg should point to last segment on unacked queue */ + useg = pcb->unacked; + 800d3bc: 687b ldr r3, [r7, #4] + 800d3be: 6edb ldr r3, [r3, #108] ; 0x6c + 800d3c0: 623b str r3, [r7, #32] + if (useg != NULL) { + 800d3c2: 6a3b ldr r3, [r7, #32] + 800d3c4: 2b00 cmp r3, #0 + 800d3c6: d007 beq.n 800d3d8 + for (; useg->next != NULL; useg = useg->next); + 800d3c8: e002 b.n 800d3d0 + 800d3ca: 6a3b ldr r3, [r7, #32] + 800d3cc: 681b ldr r3, [r3, #0] + 800d3ce: 623b str r3, [r7, #32] + 800d3d0: 6a3b ldr r3, [r7, #32] + 800d3d2: 681b ldr r3, [r3, #0] + 800d3d4: 2b00 cmp r3, #0 + 800d3d6: d1f8 bne.n 800d3ca + } + + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + 800d3d8: 687b ldr r3, [r7, #4] + 800d3da: 3304 adds r3, #4 + 800d3dc: 4618 mov r0, r3 + 800d3de: f004 f8f7 bl 80115d0 + 800d3e2: 6178 str r0, [r7, #20] + if (netif == NULL) { + 800d3e4: 697b ldr r3, [r7, #20] + 800d3e6: 2b00 cmp r3, #0 + 800d3e8: d102 bne.n 800d3f0 + return ERR_RTE; + 800d3ea: f06f 0303 mvn.w r3, #3 + 800d3ee: e185 b.n 800d6fc + } + + /* If we don't have a local IP address, we get one from netif */ + if (ip_addr_isany(&pcb->local_ip)) { + 800d3f0: 687b ldr r3, [r7, #4] + 800d3f2: 2b00 cmp r3, #0 + 800d3f4: d003 beq.n 800d3fe + 800d3f6: 687b ldr r3, [r7, #4] + 800d3f8: 681b ldr r3, [r3, #0] + 800d3fa: 2b00 cmp r3, #0 + 800d3fc: d111 bne.n 800d422 + const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); + 800d3fe: 697b ldr r3, [r7, #20] + 800d400: 2b00 cmp r3, #0 + 800d402: d002 beq.n 800d40a + 800d404: 697b ldr r3, [r7, #20] + 800d406: 3304 adds r3, #4 + 800d408: e000 b.n 800d40c + 800d40a: 2300 movs r3, #0 + 800d40c: 613b str r3, [r7, #16] + if (local_ip == NULL) { + 800d40e: 693b ldr r3, [r7, #16] + 800d410: 2b00 cmp r3, #0 + 800d412: d102 bne.n 800d41a + return ERR_RTE; + 800d414: f06f 0303 mvn.w r3, #3 + 800d418: e170 b.n 800d6fc + } + ip_addr_copy(pcb->local_ip, *local_ip); + 800d41a: 693b ldr r3, [r7, #16] + 800d41c: 681a ldr r2, [r3, #0] + 800d41e: 687b ldr r3, [r7, #4] + 800d420: 601a str r2, [r3, #0] + * with part of the unsent segment (which will engage zero-window probing upon + * reception of the zero window update from the receiver). This ensures the + * subsequent window update is reliably received. With the goal of being lightweight, + * we avoid splitting the unsent segment and treat the window as already zero. + */ + if (seg != NULL && + 800d422: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d424: 2b00 cmp r3, #0 + 800d426: f000 813f beq.w 800d6a8 + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd && + 800d42a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d42c: 68db ldr r3, [r3, #12] + 800d42e: 685b ldr r3, [r3, #4] + 800d430: 4618 mov r0, r3 + 800d432: f7f9 fe5c bl 80070ee + 800d436: 4602 mov r2, r0 + 800d438: 687b ldr r3, [r7, #4] + 800d43a: 6c5b ldr r3, [r3, #68] ; 0x44 + 800d43c: 1ad3 subs r3, r2, r3 + 800d43e: 6a7a ldr r2, [r7, #36] ; 0x24 + 800d440: 8912 ldrh r2, [r2, #8] + 800d442: 4413 add r3, r2 + if (seg != NULL && + 800d444: 69ba ldr r2, [r7, #24] + 800d446: 429a cmp r2, r3 + 800d448: f080 812e bcs.w 800d6a8 + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd && + 800d44c: 69bb ldr r3, [r7, #24] + 800d44e: 2b00 cmp r3, #0 + 800d450: f000 812a beq.w 800d6a8 + wnd > 0 && wnd == pcb->snd_wnd && pcb->unacked == NULL) { + 800d454: 687b ldr r3, [r7, #4] + 800d456: f8b3 305c ldrh.w r3, [r3, #92] ; 0x5c + 800d45a: 461a mov r2, r3 + 800d45c: 69bb ldr r3, [r7, #24] + 800d45e: 4293 cmp r3, r2 + 800d460: f040 8122 bne.w 800d6a8 + 800d464: 687b ldr r3, [r7, #4] + 800d466: 6edb ldr r3, [r3, #108] ; 0x6c + 800d468: 2b00 cmp r3, #0 + 800d46a: f040 811d bne.w 800d6a8 + /* Start the persist timer */ + if (pcb->persist_backoff == 0) { + 800d46e: 687b ldr r3, [r7, #4] + 800d470: f893 3095 ldrb.w r3, [r3, #149] ; 0x95 + 800d474: 2b00 cmp r3, #0 + 800d476: f040 812c bne.w 800d6d2 + pcb->persist_cnt = 0; + 800d47a: 687b ldr r3, [r7, #4] + 800d47c: 2200 movs r2, #0 + 800d47e: f883 2094 strb.w r2, [r3, #148] ; 0x94 + pcb->persist_backoff = 1; + 800d482: 687b ldr r3, [r7, #4] + 800d484: 2201 movs r2, #1 + 800d486: f883 2095 strb.w r2, [r3, #149] ; 0x95 + } + goto output_done; + 800d48a: e122 b.n 800d6d2 + } + /* data available and window allows it to be sent? */ + while (seg != NULL && + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { + LWIP_ASSERT("RST not expected here!", + 800d48c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d48e: 68db ldr r3, [r3, #12] + 800d490: 899b ldrh r3, [r3, #12] + 800d492: b29b uxth r3, r3 + 800d494: 4618 mov r0, r3 + 800d496: f7f9 fe1d bl 80070d4 + 800d49a: 4603 mov r3, r0 + 800d49c: f003 0304 and.w r3, r3, #4 + 800d4a0: 2b00 cmp r3, #0 + 800d4a2: d006 beq.n 800d4b2 + 800d4a4: 4b42 ldr r3, [pc, #264] ; (800d5b0 ) + 800d4a6: f240 4245 movw r2, #1093 ; 0x445 + 800d4aa: 4945 ldr r1, [pc, #276] ; (800d5c0 ) + 800d4ac: 4842 ldr r0, [pc, #264] ; (800d5b8 ) + 800d4ae: f005 fc69 bl 8012d84 + * - if tcp_write had a memory error before (prevent delayed ACK timeout) or + * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - + * either seg->next != NULL or pcb->unacked == NULL; + * RST is no sent using tcp_write/tcp_output. + */ + if ((tcp_do_output_nagle(pcb) == 0) && + 800d4b2: 687b ldr r3, [r7, #4] + 800d4b4: 6edb ldr r3, [r3, #108] ; 0x6c + 800d4b6: 2b00 cmp r3, #0 + 800d4b8: d01f beq.n 800d4fa + 800d4ba: 687b ldr r3, [r7, #4] + 800d4bc: 7e9b ldrb r3, [r3, #26] + 800d4be: f003 0344 and.w r3, r3, #68 ; 0x44 + 800d4c2: 2b00 cmp r3, #0 + 800d4c4: d119 bne.n 800d4fa + 800d4c6: 687b ldr r3, [r7, #4] + 800d4c8: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d4ca: 2b00 cmp r3, #0 + 800d4cc: d00b beq.n 800d4e6 + 800d4ce: 687b ldr r3, [r7, #4] + 800d4d0: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d4d2: 681b ldr r3, [r3, #0] + 800d4d4: 2b00 cmp r3, #0 + 800d4d6: d110 bne.n 800d4fa + 800d4d8: 687b ldr r3, [r7, #4] + 800d4da: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d4dc: 891a ldrh r2, [r3, #8] + 800d4de: 687b ldr r3, [r7, #4] + 800d4e0: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800d4e2: 429a cmp r2, r3 + 800d4e4: d209 bcs.n 800d4fa + 800d4e6: 687b ldr r3, [r7, #4] + 800d4e8: f8b3 3060 ldrh.w r3, [r3, #96] ; 0x60 + 800d4ec: 2b00 cmp r3, #0 + 800d4ee: d004 beq.n 800d4fa + 800d4f0: 687b ldr r3, [r7, #4] + 800d4f2: f8b3 3062 ldrh.w r3, [r3, #98] ; 0x62 + 800d4f6: 2b08 cmp r3, #8 + 800d4f8: d901 bls.n 800d4fe + 800d4fa: 2301 movs r3, #1 + 800d4fc: e000 b.n 800d500 + 800d4fe: 2300 movs r3, #0 + 800d500: 2b00 cmp r3, #0 + 800d502: d106 bne.n 800d512 + ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { + 800d504: 687b ldr r3, [r7, #4] + 800d506: 7e9b ldrb r3, [r3, #26] + 800d508: f003 03a0 and.w r3, r3, #160 ; 0xa0 + if ((tcp_do_output_nagle(pcb) == 0) && + 800d50c: 2b00 cmp r3, #0 + 800d50e: f000 80e2 beq.w 800d6d6 + pcb->lastack, + lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); + ++i; +#endif /* TCP_CWND_DEBUG */ + + if (pcb->state != SYN_SENT) { + 800d512: 687b ldr r3, [r7, #4] + 800d514: 7d1b ldrb r3, [r3, #20] + 800d516: 2b02 cmp r3, #2 + 800d518: d00d beq.n 800d536 + TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); + 800d51a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d51c: 68db ldr r3, [r3, #12] + 800d51e: 899b ldrh r3, [r3, #12] + 800d520: b29c uxth r4, r3 + 800d522: 2010 movs r0, #16 + 800d524: f7f9 fdd6 bl 80070d4 + 800d528: 4603 mov r3, r0 + 800d52a: 461a mov r2, r3 + 800d52c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d52e: 68db ldr r3, [r3, #12] + 800d530: 4322 orrs r2, r4 + 800d532: b292 uxth r2, r2 + 800d534: 819a strh r2, [r3, #12] + } + +#if TCP_OVERSIZE_DBGCHECK + seg->oversize_left = 0; +#endif /* TCP_OVERSIZE_DBGCHECK */ + err = tcp_output_segment(seg, pcb, netif); + 800d536: 697a ldr r2, [r7, #20] + 800d538: 6879 ldr r1, [r7, #4] + 800d53a: 6a78 ldr r0, [r7, #36] ; 0x24 + 800d53c: f000 f8e2 bl 800d704 + 800d540: 4603 mov r3, r0 + 800d542: 73fb strb r3, [r7, #15] + if (err != ERR_OK) { + 800d544: f997 300f ldrsb.w r3, [r7, #15] + 800d548: 2b00 cmp r3, #0 + 800d54a: d009 beq.n 800d560 + /* segment could not be sent, for whatever reason */ + pcb->flags |= TF_NAGLEMEMERR; + 800d54c: 687b ldr r3, [r7, #4] + 800d54e: 7e9b ldrb r3, [r3, #26] + 800d550: f063 037f orn r3, r3, #127 ; 0x7f + 800d554: b2da uxtb r2, r3 + 800d556: 687b ldr r3, [r7, #4] + 800d558: 769a strb r2, [r3, #26] + return err; + 800d55a: f997 300f ldrsb.w r3, [r7, #15] + 800d55e: e0cd b.n 800d6fc + } + pcb->unsent = seg->next; + 800d560: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d562: 681a ldr r2, [r3, #0] + 800d564: 687b ldr r3, [r7, #4] + 800d566: 669a str r2, [r3, #104] ; 0x68 + if (pcb->state != SYN_SENT) { + 800d568: 687b ldr r3, [r7, #4] + 800d56a: 7d1b ldrb r3, [r3, #20] + 800d56c: 2b02 cmp r3, #2 + 800d56e: d006 beq.n 800d57e + pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + 800d570: 687b ldr r3, [r7, #4] + 800d572: 7e9b ldrb r3, [r3, #26] + 800d574: f023 0303 bic.w r3, r3, #3 + 800d578: b2da uxtb r2, r3 + 800d57a: 687b ldr r3, [r7, #4] + 800d57c: 769a strb r2, [r3, #26] + } + snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); + 800d57e: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d580: 68db ldr r3, [r3, #12] + 800d582: 685b ldr r3, [r3, #4] + 800d584: 4618 mov r0, r3 + 800d586: f7f9 fdb2 bl 80070ee + 800d58a: 4604 mov r4, r0 + 800d58c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d58e: 891b ldrh r3, [r3, #8] + 800d590: 461d mov r5, r3 + 800d592: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d594: 68db ldr r3, [r3, #12] + 800d596: 899b ldrh r3, [r3, #12] + 800d598: b29b uxth r3, r3 + 800d59a: 4618 mov r0, r3 + 800d59c: f7f9 fd9a bl 80070d4 + 800d5a0: 4603 mov r3, r0 + 800d5a2: f003 0303 and.w r3, r3, #3 + 800d5a6: 2b00 cmp r3, #0 + 800d5a8: d00c beq.n 800d5c4 + 800d5aa: 2301 movs r3, #1 + 800d5ac: e00b b.n 800d5c6 + 800d5ae: bf00 nop + 800d5b0: 08015508 .word 0x08015508 + 800d5b4: 0801590c .word 0x0801590c + 800d5b8: 0801556c .word 0x0801556c + 800d5bc: 20006fb4 .word 0x20006fb4 + 800d5c0: 08015934 .word 0x08015934 + 800d5c4: 2300 movs r3, #0 + 800d5c6: 442b add r3, r5 + 800d5c8: 4423 add r3, r4 + 800d5ca: 60bb str r3, [r7, #8] + if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { + 800d5cc: 687b ldr r3, [r7, #4] + 800d5ce: 6cda ldr r2, [r3, #76] ; 0x4c + 800d5d0: 68bb ldr r3, [r7, #8] + 800d5d2: 1ad3 subs r3, r2, r3 + 800d5d4: 2b00 cmp r3, #0 + 800d5d6: da02 bge.n 800d5de + pcb->snd_nxt = snd_nxt; + 800d5d8: 687b ldr r3, [r7, #4] + 800d5da: 68ba ldr r2, [r7, #8] + 800d5dc: 64da str r2, [r3, #76] ; 0x4c + } + /* put segment on unacknowledged list if length > 0 */ + if (TCP_TCPLEN(seg) > 0) { + 800d5de: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d5e0: 891b ldrh r3, [r3, #8] + 800d5e2: 461c mov r4, r3 + 800d5e4: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d5e6: 68db ldr r3, [r3, #12] + 800d5e8: 899b ldrh r3, [r3, #12] + 800d5ea: b29b uxth r3, r3 + 800d5ec: 4618 mov r0, r3 + 800d5ee: f7f9 fd71 bl 80070d4 + 800d5f2: 4603 mov r3, r0 + 800d5f4: f003 0303 and.w r3, r3, #3 + 800d5f8: 2b00 cmp r3, #0 + 800d5fa: d001 beq.n 800d600 + 800d5fc: 2301 movs r3, #1 + 800d5fe: e000 b.n 800d602 + 800d600: 2300 movs r3, #0 + 800d602: 4423 add r3, r4 + 800d604: 2b00 cmp r3, #0 + 800d606: d049 beq.n 800d69c + seg->next = NULL; + 800d608: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d60a: 2200 movs r2, #0 + 800d60c: 601a str r2, [r3, #0] + /* unacked list is empty? */ + if (pcb->unacked == NULL) { + 800d60e: 687b ldr r3, [r7, #4] + 800d610: 6edb ldr r3, [r3, #108] ; 0x6c + 800d612: 2b00 cmp r3, #0 + 800d614: d105 bne.n 800d622 + pcb->unacked = seg; + 800d616: 687b ldr r3, [r7, #4] + 800d618: 6a7a ldr r2, [r7, #36] ; 0x24 + 800d61a: 66da str r2, [r3, #108] ; 0x6c + useg = seg; + 800d61c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d61e: 623b str r3, [r7, #32] + 800d620: e03f b.n 800d6a2 + /* unacked list is not empty? */ + } else { + /* In the case of fast retransmit, the packet should not go to the tail + * of the unacked queue, but rather somewhere before it. We need to check for + * this case. -STJ Jul 27, 2004 */ + if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) { + 800d622: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d624: 68db ldr r3, [r3, #12] + 800d626: 685b ldr r3, [r3, #4] + 800d628: 4618 mov r0, r3 + 800d62a: f7f9 fd60 bl 80070ee + 800d62e: 4604 mov r4, r0 + 800d630: 6a3b ldr r3, [r7, #32] + 800d632: 68db ldr r3, [r3, #12] + 800d634: 685b ldr r3, [r3, #4] + 800d636: 4618 mov r0, r3 + 800d638: f7f9 fd59 bl 80070ee + 800d63c: 4603 mov r3, r0 + 800d63e: 1ae3 subs r3, r4, r3 + 800d640: 2b00 cmp r3, #0 + 800d642: da24 bge.n 800d68e + /* add segment to before tail of unacked list, keeping the list sorted */ + struct tcp_seg **cur_seg = &(pcb->unacked); + 800d644: 687b ldr r3, [r7, #4] + 800d646: 336c adds r3, #108 ; 0x6c + 800d648: 61fb str r3, [r7, #28] + while (*cur_seg && + 800d64a: e002 b.n 800d652 + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + cur_seg = &((*cur_seg)->next ); + 800d64c: 69fb ldr r3, [r7, #28] + 800d64e: 681b ldr r3, [r3, #0] + 800d650: 61fb str r3, [r7, #28] + while (*cur_seg && + 800d652: 69fb ldr r3, [r7, #28] + 800d654: 681b ldr r3, [r3, #0] + 800d656: 2b00 cmp r3, #0 + 800d658: d011 beq.n 800d67e + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + 800d65a: 69fb ldr r3, [r7, #28] + 800d65c: 681b ldr r3, [r3, #0] + 800d65e: 68db ldr r3, [r3, #12] + 800d660: 685b ldr r3, [r3, #4] + 800d662: 4618 mov r0, r3 + 800d664: f7f9 fd43 bl 80070ee + 800d668: 4604 mov r4, r0 + 800d66a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d66c: 68db ldr r3, [r3, #12] + 800d66e: 685b ldr r3, [r3, #4] + 800d670: 4618 mov r0, r3 + 800d672: f7f9 fd3c bl 80070ee + 800d676: 4603 mov r3, r0 + 800d678: 1ae3 subs r3, r4, r3 + while (*cur_seg && + 800d67a: 2b00 cmp r3, #0 + 800d67c: dbe6 blt.n 800d64c + } + seg->next = (*cur_seg); + 800d67e: 69fb ldr r3, [r7, #28] + 800d680: 681a ldr r2, [r3, #0] + 800d682: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d684: 601a str r2, [r3, #0] + (*cur_seg) = seg; + 800d686: 69fb ldr r3, [r7, #28] + 800d688: 6a7a ldr r2, [r7, #36] ; 0x24 + 800d68a: 601a str r2, [r3, #0] + 800d68c: e009 b.n 800d6a2 + } else { + /* add segment to tail of unacked list */ + useg->next = seg; + 800d68e: 6a3b ldr r3, [r7, #32] + 800d690: 6a7a ldr r2, [r7, #36] ; 0x24 + 800d692: 601a str r2, [r3, #0] + useg = useg->next; + 800d694: 6a3b ldr r3, [r7, #32] + 800d696: 681b ldr r3, [r3, #0] + 800d698: 623b str r3, [r7, #32] + 800d69a: e002 b.n 800d6a2 + } + } + /* do not queue empty segments on the unacked list */ + } else { + tcp_seg_free(seg); + 800d69c: 6a78 ldr r0, [r7, #36] ; 0x24 + 800d69e: f7fc f9db bl 8009a58 + } + seg = pcb->unsent; + 800d6a2: 687b ldr r3, [r7, #4] + 800d6a4: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d6a6: 627b str r3, [r7, #36] ; 0x24 + while (seg != NULL && + 800d6a8: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d6aa: 2b00 cmp r3, #0 + 800d6ac: d015 beq.n 800d6da + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { + 800d6ae: 6a7b ldr r3, [r7, #36] ; 0x24 + 800d6b0: 68db ldr r3, [r3, #12] + 800d6b2: 685b ldr r3, [r3, #4] + 800d6b4: 4618 mov r0, r3 + 800d6b6: f7f9 fd1a bl 80070ee + 800d6ba: 4602 mov r2, r0 + 800d6bc: 687b ldr r3, [r7, #4] + 800d6be: 6c5b ldr r3, [r3, #68] ; 0x44 + 800d6c0: 1ad3 subs r3, r2, r3 + 800d6c2: 6a7a ldr r2, [r7, #36] ; 0x24 + 800d6c4: 8912 ldrh r2, [r2, #8] + 800d6c6: 4413 add r3, r2 + while (seg != NULL && + 800d6c8: 69ba ldr r2, [r7, #24] + 800d6ca: 429a cmp r2, r3 + 800d6cc: f4bf aede bcs.w 800d48c + } +output_done: + 800d6d0: e003 b.n 800d6da + goto output_done; + 800d6d2: bf00 nop + 800d6d4: e002 b.n 800d6dc + break; + 800d6d6: bf00 nop + 800d6d8: e000 b.n 800d6dc +output_done: + 800d6da: bf00 nop +#if TCP_OVERSIZE + if (pcb->unsent == NULL) { + 800d6dc: 687b ldr r3, [r7, #4] + 800d6de: 6e9b ldr r3, [r3, #104] ; 0x68 + 800d6e0: 2b00 cmp r3, #0 + 800d6e2: d103 bne.n 800d6ec + /* last unsent has been removed, reset unsent_oversize */ + pcb->unsent_oversize = 0; + 800d6e4: 687b ldr r3, [r7, #4] + 800d6e6: 2200 movs r2, #0 + 800d6e8: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 + } +#endif /* TCP_OVERSIZE */ + + pcb->flags &= ~TF_NAGLEMEMERR; + 800d6ec: 687b ldr r3, [r7, #4] + 800d6ee: 7e9b ldrb r3, [r3, #26] + 800d6f0: f003 037f and.w r3, r3, #127 ; 0x7f + 800d6f4: b2da uxtb r2, r3 + 800d6f6: 687b ldr r3, [r7, #4] + 800d6f8: 769a strb r2, [r3, #26] + return ERR_OK; + 800d6fa: 2300 movs r3, #0 +} + 800d6fc: 4618 mov r0, r3 + 800d6fe: 3728 adds r7, #40 ; 0x28 + 800d700: 46bd mov sp, r7 + 800d702: bdb0 pop {r4, r5, r7, pc} + +0800d704 : + * @param pcb the tcp_pcb for the TCP connection used to send the segment + * @param netif the netif used to send the segment + */ +static err_t +tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif) +{ + 800d704: b5b0 push {r4, r5, r7, lr} + 800d706: b08c sub sp, #48 ; 0x30 + 800d708: af04 add r7, sp, #16 + 800d70a: 60f8 str r0, [r7, #12] + 800d70c: 60b9 str r1, [r7, #8] + 800d70e: 607a str r2, [r7, #4] + err_t err; + u16_t len; + u32_t *opts; + + if (seg->p->ref != 1) { + 800d710: 68fb ldr r3, [r7, #12] + 800d712: 685b ldr r3, [r3, #4] + 800d714: 89db ldrh r3, [r3, #14] + 800d716: 2b01 cmp r3, #1 + 800d718: d001 beq.n 800d71e + /* This can happen if the pbuf of this segment is still referenced by the + netif driver due to deferred transmission. Since this function modifies + p->len, we must not continue in this case. */ + return ERR_OK; + 800d71a: 2300 movs r3, #0 + 800d71c: e08a b.n 800d834 + } + + /* The TCP header has already been constructed, but the ackno and + wnd fields remain. */ + seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); + 800d71e: 68bb ldr r3, [r7, #8] + 800d720: 6a5a ldr r2, [r3, #36] ; 0x24 + 800d722: 68fb ldr r3, [r7, #12] + 800d724: 68dc ldr r4, [r3, #12] + 800d726: 4610 mov r0, r2 + 800d728: f7f9 fce1 bl 80070ee + 800d72c: 4603 mov r3, r0 + 800d72e: 60a3 str r3, [r4, #8] + the window scale option) is never scaled. */ + seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(pcb->rcv_ann_wnd)); + } else +#endif /* LWIP_WND_SCALE */ + { + seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); + 800d730: 68bb ldr r3, [r7, #8] + 800d732: 8d5a ldrh r2, [r3, #42] ; 0x2a + 800d734: 68fb ldr r3, [r7, #12] + 800d736: 68dc ldr r4, [r3, #12] + 800d738: 4610 mov r0, r2 + 800d73a: f7f9 fccb bl 80070d4 + 800d73e: 4603 mov r3, r0 + 800d740: 81e3 strh r3, [r4, #14] + } + + pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; + 800d742: 68bb ldr r3, [r7, #8] + 800d744: 6a5b ldr r3, [r3, #36] ; 0x24 + 800d746: 68ba ldr r2, [r7, #8] + 800d748: 8d52 ldrh r2, [r2, #42] ; 0x2a + 800d74a: 441a add r2, r3 + 800d74c: 68bb ldr r3, [r7, #8] + 800d74e: 62da str r2, [r3, #44] ; 0x2c + + /* Add any requested options. NB MSS option is only set on SYN + packets, so ignore it here */ + /* cast through void* to get rid of alignment warnings */ + opts = (u32_t *)(void *)(seg->tcphdr + 1); + 800d750: 68fb ldr r3, [r7, #12] + 800d752: 68db ldr r3, [r3, #12] + 800d754: 3314 adds r3, #20 + 800d756: 61fb str r3, [r7, #28] + if (seg->flags & TF_SEG_OPTS_MSS) { + 800d758: 68fb ldr r3, [r7, #12] + 800d75a: 7a9b ldrb r3, [r3, #10] + 800d75c: f003 0301 and.w r3, r3, #1 + 800d760: 2b00 cmp r3, #0 + 800d762: d014 beq.n 800d78e + u16_t mss; +#if TCP_CALCULATE_EFF_SEND_MSS + mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip); + 800d764: 68bb ldr r3, [r7, #8] + 800d766: 3304 adds r3, #4 + 800d768: 4619 mov r1, r3 + 800d76a: f44f 7006 mov.w r0, #536 ; 0x218 + 800d76e: f7fc fc7b bl 800a068 + 800d772: 4603 mov r3, r0 + 800d774: 837b strh r3, [r7, #26] +#else /* TCP_CALCULATE_EFF_SEND_MSS */ + mss = TCP_MSS; +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + *opts = TCP_BUILD_MSS_OPTION(mss); + 800d776: 8b7b ldrh r3, [r7, #26] + 800d778: f043 7301 orr.w r3, r3, #33816576 ; 0x2040000 + 800d77c: 4618 mov r0, r3 + 800d77e: f7f9 fcb6 bl 80070ee + 800d782: 4602 mov r2, r0 + 800d784: 69fb ldr r3, [r7, #28] + 800d786: 601a str r2, [r3, #0] + opts += 1; + 800d788: 69fb ldr r3, [r7, #28] + 800d78a: 3304 adds r3, #4 + 800d78c: 61fb str r3, [r7, #28] + } +#endif + + /* Set retransmission timer running if it is not currently enabled + This must be set before checking the route. */ + if (pcb->rtime < 0) { + 800d78e: 68bb ldr r3, [r7, #8] + 800d790: f9b3 3030 ldrsh.w r3, [r3, #48] ; 0x30 + 800d794: 2b00 cmp r3, #0 + 800d796: da02 bge.n 800d79e + pcb->rtime = 0; + 800d798: 68bb ldr r3, [r7, #8] + 800d79a: 2200 movs r2, #0 + 800d79c: 861a strh r2, [r3, #48] ; 0x30 + } + + if (pcb->rttest == 0) { + 800d79e: 68bb ldr r3, [r7, #8] + 800d7a0: 6b5b ldr r3, [r3, #52] ; 0x34 + 800d7a2: 2b00 cmp r3, #0 + 800d7a4: d10c bne.n 800d7c0 + pcb->rttest = tcp_ticks; + 800d7a6: 4b25 ldr r3, [pc, #148] ; (800d83c ) + 800d7a8: 681a ldr r2, [r3, #0] + 800d7aa: 68bb ldr r3, [r7, #8] + 800d7ac: 635a str r2, [r3, #52] ; 0x34 + pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); + 800d7ae: 68fb ldr r3, [r7, #12] + 800d7b0: 68db ldr r3, [r3, #12] + 800d7b2: 685b ldr r3, [r3, #4] + 800d7b4: 4618 mov r0, r3 + 800d7b6: f7f9 fc9a bl 80070ee + 800d7ba: 4602 mov r2, r0 + 800d7bc: 68bb ldr r3, [r7, #8] + 800d7be: 639a str r2, [r3, #56] ; 0x38 + } + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", + lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) + + seg->len)); + + len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); + 800d7c0: 68fb ldr r3, [r7, #12] + 800d7c2: 68da ldr r2, [r3, #12] + 800d7c4: 68fb ldr r3, [r7, #12] + 800d7c6: 685b ldr r3, [r3, #4] + 800d7c8: 685b ldr r3, [r3, #4] + 800d7ca: 1ad3 subs r3, r2, r3 + 800d7cc: 833b strh r3, [r7, #24] + if (len == 0) { + /** Exclude retransmitted segments from this count. */ + MIB2_STATS_INC(mib2.tcpoutsegs); + } + + seg->p->len -= len; + 800d7ce: 68fb ldr r3, [r7, #12] + 800d7d0: 685b ldr r3, [r3, #4] + 800d7d2: 8959 ldrh r1, [r3, #10] + 800d7d4: 68fb ldr r3, [r7, #12] + 800d7d6: 685b ldr r3, [r3, #4] + 800d7d8: 8b3a ldrh r2, [r7, #24] + 800d7da: 1a8a subs r2, r1, r2 + 800d7dc: b292 uxth r2, r2 + 800d7de: 815a strh r2, [r3, #10] + seg->p->tot_len -= len; + 800d7e0: 68fb ldr r3, [r7, #12] + 800d7e2: 685b ldr r3, [r3, #4] + 800d7e4: 8919 ldrh r1, [r3, #8] + 800d7e6: 68fb ldr r3, [r7, #12] + 800d7e8: 685b ldr r3, [r3, #4] + 800d7ea: 8b3a ldrh r2, [r7, #24] + 800d7ec: 1a8a subs r2, r1, r2 + 800d7ee: b292 uxth r2, r2 + 800d7f0: 811a strh r2, [r3, #8] + + seg->p->payload = seg->tcphdr; + 800d7f2: 68fb ldr r3, [r7, #12] + 800d7f4: 685b ldr r3, [r3, #4] + 800d7f6: 68fa ldr r2, [r7, #12] + 800d7f8: 68d2 ldr r2, [r2, #12] + 800d7fa: 605a str r2, [r3, #4] + + seg->tcphdr->chksum = 0; + 800d7fc: 68fb ldr r3, [r7, #12] + 800d7fe: 68db ldr r3, [r3, #12] + 800d800: 2200 movs r2, #0 + 800d802: 741a strb r2, [r3, #16] + 800d804: 2200 movs r2, #0 + 800d806: 745a strb r2, [r3, #17] + } +#endif /* CHECKSUM_GEN_TCP */ + TCP_STATS_INC(tcp.xmit); + + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, + 800d808: 68fb ldr r3, [r7, #12] + 800d80a: 6858 ldr r0, [r3, #4] + 800d80c: 68b9 ldr r1, [r7, #8] + 800d80e: 68bb ldr r3, [r7, #8] + 800d810: 1d1c adds r4, r3, #4 + 800d812: 68bb ldr r3, [r7, #8] + 800d814: 7a9d ldrb r5, [r3, #10] + 800d816: 68bb ldr r3, [r7, #8] + 800d818: 7a5b ldrb r3, [r3, #9] + 800d81a: 687a ldr r2, [r7, #4] + 800d81c: 9202 str r2, [sp, #8] + 800d81e: 2206 movs r2, #6 + 800d820: 9201 str r2, [sp, #4] + 800d822: 9300 str r3, [sp, #0] + 800d824: 462b mov r3, r5 + 800d826: 4622 mov r2, r4 + 800d828: f004 f89a bl 8011960 + 800d82c: 4603 mov r3, r0 + 800d82e: 75fb strb r3, [r7, #23] + pcb->tos, IP_PROTO_TCP, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + return err; + 800d830: f997 3017 ldrsb.w r3, [r7, #23] +} + 800d834: 4618 mov r0, r3 + 800d836: 3720 adds r7, #32 + 800d838: 46bd mov sp, r7 + 800d83a: bdb0 pop {r4, r5, r7, pc} + 800d83c: 20006f68 .word 0x20006f68 + +0800d840 : + */ +void +tcp_rst(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) +{ + 800d840: b580 push {r7, lr} + 800d842: b08c sub sp, #48 ; 0x30 + 800d844: af04 add r7, sp, #16 + 800d846: 60f8 str r0, [r7, #12] + 800d848: 60b9 str r1, [r7, #8] + 800d84a: 607a str r2, [r7, #4] + 800d84c: 603b str r3, [r7, #0] + struct pbuf *p; + struct tcp_hdr *tcphdr; + struct netif *netif; + p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); + 800d84e: 2200 movs r2, #0 + 800d850: 2114 movs r1, #20 + 800d852: 2001 movs r0, #1 + 800d854: f7fa f9fe bl 8007c54 + 800d858: 61f8 str r0, [r7, #28] + if (p == NULL) { + 800d85a: 69fb ldr r3, [r7, #28] + 800d85c: 2b00 cmp r3, #0 + 800d85e: d05b beq.n 800d918 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); + return; + } + LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", + 800d860: 69fb ldr r3, [r7, #28] + 800d862: 895b ldrh r3, [r3, #10] + 800d864: 2b13 cmp r3, #19 + 800d866: d806 bhi.n 800d876 + 800d868: 4b2d ldr r3, [pc, #180] ; (800d920 ) + 800d86a: f240 524c movw r2, #1356 ; 0x54c + 800d86e: 492d ldr r1, [pc, #180] ; (800d924 ) + 800d870: 482d ldr r0, [pc, #180] ; (800d928 ) + 800d872: f005 fa87 bl 8012d84 + (p->len >= sizeof(struct tcp_hdr))); + + tcphdr = (struct tcp_hdr *)p->payload; + 800d876: 69fb ldr r3, [r7, #28] + 800d878: 685b ldr r3, [r3, #4] + 800d87a: 61bb str r3, [r7, #24] + tcphdr->src = lwip_htons(local_port); + 800d87c: 8d3b ldrh r3, [r7, #40] ; 0x28 + 800d87e: 4618 mov r0, r3 + 800d880: f7f9 fc28 bl 80070d4 + 800d884: 4603 mov r3, r0 + 800d886: 461a mov r2, r3 + 800d888: 69bb ldr r3, [r7, #24] + 800d88a: 801a strh r2, [r3, #0] + tcphdr->dest = lwip_htons(remote_port); + 800d88c: 8dbb ldrh r3, [r7, #44] ; 0x2c + 800d88e: 4618 mov r0, r3 + 800d890: f7f9 fc20 bl 80070d4 + 800d894: 4603 mov r3, r0 + 800d896: 461a mov r2, r3 + 800d898: 69bb ldr r3, [r7, #24] + 800d89a: 805a strh r2, [r3, #2] + tcphdr->seqno = lwip_htonl(seqno); + 800d89c: 68f8 ldr r0, [r7, #12] + 800d89e: f7f9 fc26 bl 80070ee + 800d8a2: 4602 mov r2, r0 + 800d8a4: 69bb ldr r3, [r7, #24] + 800d8a6: 605a str r2, [r3, #4] + tcphdr->ackno = lwip_htonl(ackno); + 800d8a8: 68b8 ldr r0, [r7, #8] + 800d8aa: f7f9 fc20 bl 80070ee + 800d8ae: 4602 mov r2, r0 + 800d8b0: 69bb ldr r3, [r7, #24] + 800d8b2: 609a str r2, [r3, #8] + TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); + 800d8b4: f245 0014 movw r0, #20500 ; 0x5014 + 800d8b8: f7f9 fc0c bl 80070d4 + 800d8bc: 4603 mov r3, r0 + 800d8be: 461a mov r2, r3 + 800d8c0: 69bb ldr r3, [r7, #24] + 800d8c2: 819a strh r2, [r3, #12] +#if LWIP_WND_SCALE + tcphdr->wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); +#else + tcphdr->wnd = PP_HTONS(TCP_WND); + 800d8c4: 69bb ldr r3, [r7, #24] + 800d8c6: 2200 movs r2, #0 + 800d8c8: f042 0208 orr.w r2, r2, #8 + 800d8cc: 739a strb r2, [r3, #14] + 800d8ce: 2200 movs r2, #0 + 800d8d0: f042 0260 orr.w r2, r2, #96 ; 0x60 + 800d8d4: 73da strb r2, [r3, #15] +#endif + tcphdr->chksum = 0; + 800d8d6: 69bb ldr r3, [r7, #24] + 800d8d8: 2200 movs r2, #0 + 800d8da: 741a strb r2, [r3, #16] + 800d8dc: 2200 movs r2, #0 + 800d8de: 745a strb r2, [r3, #17] + tcphdr->urgp = 0; + 800d8e0: 69bb ldr r3, [r7, #24] + 800d8e2: 2200 movs r2, #0 + 800d8e4: 749a strb r2, [r3, #18] + 800d8e6: 2200 movs r2, #0 + 800d8e8: 74da strb r2, [r3, #19] + + TCP_STATS_INC(tcp.xmit); + MIB2_STATS_INC(mib2.tcpoutrsts); + + netif = ip_route(local_ip, remote_ip); + 800d8ea: 6838 ldr r0, [r7, #0] + 800d8ec: f003 fe70 bl 80115d0 + 800d8f0: 6178 str r0, [r7, #20] + if (netif != NULL) { + 800d8f2: 697b ldr r3, [r7, #20] + 800d8f4: 2b00 cmp r3, #0 + 800d8f6: d00b beq.n 800d910 + tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + local_ip, remote_ip); + } +#endif + /* Send output with hardcoded TTL/HL since we have no access to the pcb */ + ip_output_if(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP, netif); + 800d8f8: 697b ldr r3, [r7, #20] + 800d8fa: 9302 str r3, [sp, #8] + 800d8fc: 2306 movs r3, #6 + 800d8fe: 9301 str r3, [sp, #4] + 800d900: 2300 movs r3, #0 + 800d902: 9300 str r3, [sp, #0] + 800d904: 23ff movs r3, #255 ; 0xff + 800d906: 683a ldr r2, [r7, #0] + 800d908: 6879 ldr r1, [r7, #4] + 800d90a: 69f8 ldr r0, [r7, #28] + 800d90c: f004 f828 bl 8011960 + } + pbuf_free(p); + 800d910: 69f8 ldr r0, [r7, #28] + 800d912: f7fa fd17 bl 8008344 + 800d916: e000 b.n 800d91a + return; + 800d918: bf00 nop + LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); +} + 800d91a: 3720 adds r7, #32 + 800d91c: 46bd mov sp, r7 + 800d91e: bd80 pop {r7, pc} + 800d920: 08015508 .word 0x08015508 + 800d924: 0801553c .word 0x0801553c + 800d928: 0801556c .word 0x0801556c + +0800d92c : + * + * @param pcb the tcp_pcb for which to re-enqueue all unacked segments + */ +void +tcp_rexmit_rto(struct tcp_pcb *pcb) +{ + 800d92c: b580 push {r7, lr} + 800d92e: b084 sub sp, #16 + 800d930: af00 add r7, sp, #0 + 800d932: 6078 str r0, [r7, #4] + struct tcp_seg *seg; + + if (pcb->unacked == NULL) { + 800d934: 687b ldr r3, [r7, #4] + 800d936: 6edb ldr r3, [r3, #108] ; 0x6c + 800d938: 2b00 cmp r3, #0 + 800d93a: d029 beq.n 800d990 + return; + } + + /* Move all unacked segments to the head of the unsent queue */ + for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); + 800d93c: 687b ldr r3, [r7, #4] + 800d93e: 6edb ldr r3, [r3, #108] ; 0x6c + 800d940: 60fb str r3, [r7, #12] + 800d942: e002 b.n 800d94a + 800d944: 68fb ldr r3, [r7, #12] + 800d946: 681b ldr r3, [r3, #0] + 800d948: 60fb str r3, [r7, #12] + 800d94a: 68fb ldr r3, [r7, #12] + 800d94c: 681b ldr r3, [r3, #0] + 800d94e: 2b00 cmp r3, #0 + 800d950: d1f8 bne.n 800d944 + /* concatenate unsent queue after unacked queue */ + seg->next = pcb->unsent; + 800d952: 687b ldr r3, [r7, #4] + 800d954: 6e9a ldr r2, [r3, #104] ; 0x68 + 800d956: 68fb ldr r3, [r7, #12] + 800d958: 601a str r2, [r3, #0] + if (pcb->unsent == NULL) { + pcb->unsent_oversize = seg->oversize_left; + } +#endif /* TCP_OVERSIZE_DBGCHECK */ + /* unsent queue is the concatenated queue (of unacked, unsent) */ + pcb->unsent = pcb->unacked; + 800d95a: 687b ldr r3, [r7, #4] + 800d95c: 6eda ldr r2, [r3, #108] ; 0x6c + 800d95e: 687b ldr r3, [r7, #4] + 800d960: 669a str r2, [r3, #104] ; 0x68 + /* unacked queue is now empty */ + pcb->unacked = NULL; + 800d962: 687b ldr r3, [r7, #4] + 800d964: 2200 movs r2, #0 + 800d966: 66da str r2, [r3, #108] ; 0x6c + + /* increment number of retransmissions */ + if (pcb->nrtx < 0xFF) { + 800d968: 687b ldr r3, [r7, #4] + 800d96a: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 800d96e: 2bff cmp r3, #255 ; 0xff + 800d970: d007 beq.n 800d982 + ++pcb->nrtx; + 800d972: 687b ldr r3, [r7, #4] + 800d974: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 800d978: 3301 adds r3, #1 + 800d97a: b2da uxtb r2, r3 + 800d97c: 687b ldr r3, [r7, #4] + 800d97e: f883 2042 strb.w r2, [r3, #66] ; 0x42 + } + + /* Don't take any RTT measurements after retransmitting. */ + pcb->rttest = 0; + 800d982: 687b ldr r3, [r7, #4] + 800d984: 2200 movs r2, #0 + 800d986: 635a str r2, [r3, #52] ; 0x34 + + /* Do the actual retransmission */ + tcp_output(pcb); + 800d988: 6878 ldr r0, [r7, #4] + 800d98a: f7ff fcd5 bl 800d338 + 800d98e: e000 b.n 800d992 + return; + 800d990: bf00 nop +} + 800d992: 3710 adds r7, #16 + 800d994: 46bd mov sp, r7 + 800d996: bd80 pop {r7, pc} + +0800d998 : + * + * @param pcb the tcp_pcb for which to retransmit the first unacked segment + */ +void +tcp_rexmit(struct tcp_pcb *pcb) +{ + 800d998: b590 push {r4, r7, lr} + 800d99a: b085 sub sp, #20 + 800d99c: af00 add r7, sp, #0 + 800d99e: 6078 str r0, [r7, #4] + struct tcp_seg *seg; + struct tcp_seg **cur_seg; + + if (pcb->unacked == NULL) { + 800d9a0: 687b ldr r3, [r7, #4] + 800d9a2: 6edb ldr r3, [r3, #108] ; 0x6c + 800d9a4: 2b00 cmp r3, #0 + 800d9a6: d043 beq.n 800da30 + return; + } + + /* Move the first unacked segment to the unsent queue */ + /* Keep the unsent queue sorted. */ + seg = pcb->unacked; + 800d9a8: 687b ldr r3, [r7, #4] + 800d9aa: 6edb ldr r3, [r3, #108] ; 0x6c + 800d9ac: 60bb str r3, [r7, #8] + pcb->unacked = seg->next; + 800d9ae: 68bb ldr r3, [r7, #8] + 800d9b0: 681a ldr r2, [r3, #0] + 800d9b2: 687b ldr r3, [r7, #4] + 800d9b4: 66da str r2, [r3, #108] ; 0x6c + + cur_seg = &(pcb->unsent); + 800d9b6: 687b ldr r3, [r7, #4] + 800d9b8: 3368 adds r3, #104 ; 0x68 + 800d9ba: 60fb str r3, [r7, #12] + while (*cur_seg && + 800d9bc: e002 b.n 800d9c4 + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + cur_seg = &((*cur_seg)->next ); + 800d9be: 68fb ldr r3, [r7, #12] + 800d9c0: 681b ldr r3, [r3, #0] + 800d9c2: 60fb str r3, [r7, #12] + while (*cur_seg && + 800d9c4: 68fb ldr r3, [r7, #12] + 800d9c6: 681b ldr r3, [r3, #0] + 800d9c8: 2b00 cmp r3, #0 + 800d9ca: d011 beq.n 800d9f0 + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + 800d9cc: 68fb ldr r3, [r7, #12] + 800d9ce: 681b ldr r3, [r3, #0] + 800d9d0: 68db ldr r3, [r3, #12] + 800d9d2: 685b ldr r3, [r3, #4] + 800d9d4: 4618 mov r0, r3 + 800d9d6: f7f9 fb8a bl 80070ee + 800d9da: 4604 mov r4, r0 + 800d9dc: 68bb ldr r3, [r7, #8] + 800d9de: 68db ldr r3, [r3, #12] + 800d9e0: 685b ldr r3, [r3, #4] + 800d9e2: 4618 mov r0, r3 + 800d9e4: f7f9 fb83 bl 80070ee + 800d9e8: 4603 mov r3, r0 + 800d9ea: 1ae3 subs r3, r4, r3 + while (*cur_seg && + 800d9ec: 2b00 cmp r3, #0 + 800d9ee: dbe6 blt.n 800d9be + } + seg->next = *cur_seg; + 800d9f0: 68fb ldr r3, [r7, #12] + 800d9f2: 681a ldr r2, [r3, #0] + 800d9f4: 68bb ldr r3, [r7, #8] + 800d9f6: 601a str r2, [r3, #0] + *cur_seg = seg; + 800d9f8: 68fb ldr r3, [r7, #12] + 800d9fa: 68ba ldr r2, [r7, #8] + 800d9fc: 601a str r2, [r3, #0] +#if TCP_OVERSIZE + if (seg->next == NULL) { + 800d9fe: 68bb ldr r3, [r7, #8] + 800da00: 681b ldr r3, [r3, #0] + 800da02: 2b00 cmp r3, #0 + 800da04: d103 bne.n 800da0e + /* the retransmitted segment is last in unsent, so reset unsent_oversize */ + pcb->unsent_oversize = 0; + 800da06: 687b ldr r3, [r7, #4] + 800da08: 2200 movs r2, #0 + 800da0a: f8a3 2064 strh.w r2, [r3, #100] ; 0x64 + } +#endif /* TCP_OVERSIZE */ + + if (pcb->nrtx < 0xFF) { + 800da0e: 687b ldr r3, [r7, #4] + 800da10: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 800da14: 2bff cmp r3, #255 ; 0xff + 800da16: d007 beq.n 800da28 + ++pcb->nrtx; + 800da18: 687b ldr r3, [r7, #4] + 800da1a: f893 3042 ldrb.w r3, [r3, #66] ; 0x42 + 800da1e: 3301 adds r3, #1 + 800da20: b2da uxtb r2, r3 + 800da22: 687b ldr r3, [r7, #4] + 800da24: f883 2042 strb.w r2, [r3, #66] ; 0x42 + } + + /* Don't take any rtt measurements after retransmitting. */ + pcb->rttest = 0; + 800da28: 687b ldr r3, [r7, #4] + 800da2a: 2200 movs r2, #0 + 800da2c: 635a str r2, [r3, #52] ; 0x34 + 800da2e: e000 b.n 800da32 + return; + 800da30: bf00 nop + + /* Do the actual retransmission. */ + MIB2_STATS_INC(mib2.tcpretranssegs); + /* No need to call tcp_output: we are always called from tcp_input() + and thus tcp_output directly returns. */ +} + 800da32: 3714 adds r7, #20 + 800da34: 46bd mov sp, r7 + 800da36: bd90 pop {r4, r7, pc} + +0800da38 : + * + * @param pcb the tcp_pcb for which to retransmit the first unacked segment + */ +void +tcp_rexmit_fast(struct tcp_pcb *pcb) +{ + 800da38: b580 push {r7, lr} + 800da3a: b082 sub sp, #8 + 800da3c: af00 add r7, sp, #0 + 800da3e: 6078 str r0, [r7, #4] + if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { + 800da40: 687b ldr r3, [r7, #4] + 800da42: 6edb ldr r3, [r3, #108] ; 0x6c + 800da44: 2b00 cmp r3, #0 + 800da46: d041 beq.n 800dacc + 800da48: 687b ldr r3, [r7, #4] + 800da4a: 7e9b ldrb r3, [r3, #26] + 800da4c: f003 0304 and.w r3, r3, #4 + 800da50: 2b00 cmp r3, #0 + 800da52: d13b bne.n 800dacc + LWIP_DEBUGF(TCP_FR_DEBUG, + ("tcp_receive: dupacks %"U16_F" (%"U32_F + "), fast retransmit %"U32_F"\n", + (u16_t)pcb->dupacks, pcb->lastack, + lwip_ntohl(pcb->unacked->tcphdr->seqno))); + tcp_rexmit(pcb); + 800da54: 6878 ldr r0, [r7, #4] + 800da56: f7ff ff9f bl 800d998 + + /* Set ssthresh to half of the minimum of the current + * cwnd and the advertised window */ + pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2; + 800da5a: 687b ldr r3, [r7, #4] + 800da5c: f8b3 205c ldrh.w r2, [r3, #92] ; 0x5c + 800da60: 687b ldr r3, [r7, #4] + 800da62: f8b3 3048 ldrh.w r3, [r3, #72] ; 0x48 + 800da66: 4293 cmp r3, r2 + 800da68: bf28 it cs + 800da6a: 4613 movcs r3, r2 + 800da6c: b29b uxth r3, r3 + 800da6e: 0fda lsrs r2, r3, #31 + 800da70: 4413 add r3, r2 + 800da72: 105b asrs r3, r3, #1 + 800da74: b29a uxth r2, r3 + 800da76: 687b ldr r3, [r7, #4] + 800da78: f8a3 204a strh.w r2, [r3, #74] ; 0x4a + + /* The minimum value for ssthresh should be 2 MSS */ + if (pcb->ssthresh < (2U * pcb->mss)) { + 800da7c: 687b ldr r3, [r7, #4] + 800da7e: f8b3 304a ldrh.w r3, [r3, #74] ; 0x4a + 800da82: 461a mov r2, r3 + 800da84: 687b ldr r3, [r7, #4] + 800da86: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800da88: 005b lsls r3, r3, #1 + 800da8a: 429a cmp r2, r3 + 800da8c: d206 bcs.n 800da9c + LWIP_DEBUGF(TCP_FR_DEBUG, + ("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F + " should be min 2 mss %"U16_F"...\n", + pcb->ssthresh, (u16_t)(2*pcb->mss))); + pcb->ssthresh = 2*pcb->mss; + 800da8e: 687b ldr r3, [r7, #4] + 800da90: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800da92: 005b lsls r3, r3, #1 + 800da94: b29a uxth r2, r3 + 800da96: 687b ldr r3, [r7, #4] + 800da98: f8a3 204a strh.w r2, [r3, #74] ; 0x4a + } + + pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; + 800da9c: 687b ldr r3, [r7, #4] + 800da9e: f8b3 204a ldrh.w r2, [r3, #74] ; 0x4a + 800daa2: 687b ldr r3, [r7, #4] + 800daa4: 8e5b ldrh r3, [r3, #50] ; 0x32 + 800daa6: 4619 mov r1, r3 + 800daa8: 0049 lsls r1, r1, #1 + 800daaa: 440b add r3, r1 + 800daac: b29b uxth r3, r3 + 800daae: 4413 add r3, r2 + 800dab0: b29a uxth r2, r3 + 800dab2: 687b ldr r3, [r7, #4] + 800dab4: f8a3 2048 strh.w r2, [r3, #72] ; 0x48 + pcb->flags |= TF_INFR; + 800dab8: 687b ldr r3, [r7, #4] + 800daba: 7e9b ldrb r3, [r3, #26] + 800dabc: f043 0304 orr.w r3, r3, #4 + 800dac0: b2da uxtb r2, r3 + 800dac2: 687b ldr r3, [r7, #4] + 800dac4: 769a strb r2, [r3, #26] + + /* Reset the retransmission timer to prevent immediate rto retransmissions */ + pcb->rtime = 0; + 800dac6: 687b ldr r3, [r7, #4] + 800dac8: 2200 movs r2, #0 + 800daca: 861a strh r2, [r3, #48] ; 0x30 + } +} + 800dacc: bf00 nop + 800dace: 3708 adds r7, #8 + 800dad0: 46bd mov sp, r7 + 800dad2: bd80 pop {r7, pc} + +0800dad4 : + * + * @param pcb the tcp_pcb for which to send a keepalive packet + */ +err_t +tcp_keepalive(struct tcp_pcb *pcb) +{ + 800dad4: b580 push {r7, lr} + 800dad6: b08a sub sp, #40 ; 0x28 + 800dad8: af04 add r7, sp, #16 + 800dada: 6078 str r0, [r7, #4] + 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, 0, 0, lwip_htonl(pcb->snd_nxt - 1)); + 800dadc: 687b ldr r3, [r7, #4] + 800dade: 6cdb ldr r3, [r3, #76] ; 0x4c + 800dae0: 3b01 subs r3, #1 + 800dae2: 4618 mov r0, r3 + 800dae4: f7f9 fb03 bl 80070ee + 800dae8: 4603 mov r3, r0 + 800daea: 2200 movs r2, #0 + 800daec: 2100 movs r1, #0 + 800daee: 6878 ldr r0, [r7, #4] + 800daf0: f7fe fd56 bl 800c5a0 + 800daf4: 6138 str r0, [r7, #16] + if (p == NULL) { + 800daf6: 693b ldr r3, [r7, #16] + 800daf8: 2b00 cmp r3, #0 + 800dafa: d102 bne.n 800db02 + LWIP_DEBUGF(TCP_DEBUG, + ("tcp_keepalive: could not allocate memory for pbuf\n")); + return ERR_MEM; + 800dafc: f04f 33ff mov.w r3, #4294967295 + 800db00: e021 b.n 800db46 + } + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + 800db02: 687b ldr r3, [r7, #4] + 800db04: 3304 adds r3, #4 + 800db06: 4618 mov r0, r3 + 800db08: f003 fd62 bl 80115d0 + 800db0c: 60f8 str r0, [r7, #12] + if (netif == NULL) { + 800db0e: 68fb ldr r3, [r7, #12] + 800db10: 2b00 cmp r3, #0 + 800db12: d102 bne.n 800db1a + err = ERR_RTE; + 800db14: 23fc movs r3, #252 ; 0xfc + 800db16: 75fb strb r3, [r7, #23] + 800db18: e010 b.n 800db3c +#endif /* CHECKSUM_GEN_TCP */ + TCP_STATS_INC(tcp.xmit); + + /* Send output to IP */ + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, netif); + 800db1a: 6879 ldr r1, [r7, #4] + 800db1c: 687b ldr r3, [r7, #4] + 800db1e: 1d1a adds r2, r3, #4 + 800db20: 687b ldr r3, [r7, #4] + 800db22: 7a98 ldrb r0, [r3, #10] + 800db24: 68fb ldr r3, [r7, #12] + 800db26: 9302 str r3, [sp, #8] + 800db28: 2306 movs r3, #6 + 800db2a: 9301 str r3, [sp, #4] + 800db2c: 2300 movs r3, #0 + 800db2e: 9300 str r3, [sp, #0] + 800db30: 4603 mov r3, r0 + 800db32: 6938 ldr r0, [r7, #16] + 800db34: f003 ff14 bl 8011960 + 800db38: 4603 mov r3, r0 + 800db3a: 75fb strb r3, [r7, #23] + NETIF_SET_HWADDRHINT(netif, NULL); + } + pbuf_free(p); + 800db3c: 6938 ldr r0, [r7, #16] + 800db3e: f7fa fc01 bl 8008344 + + 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; + 800db42: f997 3017 ldrsb.w r3, [r7, #23] +} + 800db46: 4618 mov r0, r3 + 800db48: 3718 adds r7, #24 + 800db4a: 46bd mov sp, r7 + 800db4c: bd80 pop {r7, pc} + +0800db4e : + * + * @param pcb the tcp_pcb for which to send a zero-window probe packet + */ +err_t +tcp_zero_window_probe(struct tcp_pcb *pcb) +{ + 800db4e: b590 push {r4, r7, lr} + 800db50: b08f sub sp, #60 ; 0x3c + 800db52: af04 add r7, sp, #16 + 800db54: 6078 str r0, [r7, #4] + LWIP_DEBUGF(TCP_DEBUG, + ("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)); + + seg = pcb->unacked; + 800db56: 687b ldr r3, [r7, #4] + 800db58: 6edb ldr r3, [r3, #108] ; 0x6c + 800db5a: 623b str r3, [r7, #32] + + if (seg == NULL) { + 800db5c: 6a3b ldr r3, [r7, #32] + 800db5e: 2b00 cmp r3, #0 + 800db60: d102 bne.n 800db68 + seg = pcb->unsent; + 800db62: 687b ldr r3, [r7, #4] + 800db64: 6e9b ldr r3, [r3, #104] ; 0x68 + 800db66: 623b str r3, [r7, #32] + } + if (seg == NULL) { + 800db68: 6a3b ldr r3, [r7, #32] + 800db6a: 2b00 cmp r3, #0 + 800db6c: d101 bne.n 800db72 + /* nothing to send, zero window probe not needed */ + return ERR_OK; + 800db6e: 2300 movs r3, #0 + 800db70: e085 b.n 800dc7e + } + + is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); + 800db72: 6a3b ldr r3, [r7, #32] + 800db74: 68db ldr r3, [r3, #12] + 800db76: 899b ldrh r3, [r3, #12] + 800db78: b29b uxth r3, r3 + 800db7a: 4618 mov r0, r3 + 800db7c: f7f9 faaa bl 80070d4 + 800db80: 4603 mov r3, r0 + 800db82: f003 0301 and.w r3, r3, #1 + 800db86: 2b00 cmp r3, #0 + 800db88: d005 beq.n 800db96 + 800db8a: 6a3b ldr r3, [r7, #32] + 800db8c: 891b ldrh r3, [r3, #8] + 800db8e: 2b00 cmp r3, #0 + 800db90: d101 bne.n 800db96 + 800db92: 2301 movs r3, #1 + 800db94: e000 b.n 800db98 + 800db96: 2300 movs r3, #0 + 800db98: 77fb strb r3, [r7, #31] + /* we want to send one seqno: either FIN or data (no options) */ + len = is_fin ? 0 : 1; + 800db9a: 7ffb ldrb r3, [r7, #31] + 800db9c: 2b00 cmp r3, #0 + 800db9e: bf0c ite eq + 800dba0: 2301 moveq r3, #1 + 800dba2: 2300 movne r3, #0 + 800dba4: b2db uxtb r3, r3 + 800dba6: 83bb strh r3, [r7, #28] + + p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); + 800dba8: 6a3b ldr r3, [r7, #32] + 800dbaa: 68db ldr r3, [r3, #12] + 800dbac: 685b ldr r3, [r3, #4] + 800dbae: 8bba ldrh r2, [r7, #28] + 800dbb0: 2100 movs r1, #0 + 800dbb2: 6878 ldr r0, [r7, #4] + 800dbb4: f7fe fcf4 bl 800c5a0 + 800dbb8: 61b8 str r0, [r7, #24] + if (p == NULL) { + 800dbba: 69bb ldr r3, [r7, #24] + 800dbbc: 2b00 cmp r3, #0 + 800dbbe: d102 bne.n 800dbc6 + LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); + return ERR_MEM; + 800dbc0: f04f 33ff mov.w r3, #4294967295 + 800dbc4: e05b b.n 800dc7e + } + tcphdr = (struct tcp_hdr *)p->payload; + 800dbc6: 69bb ldr r3, [r7, #24] + 800dbc8: 685b ldr r3, [r3, #4] + 800dbca: 617b str r3, [r7, #20] + + if (is_fin) { + 800dbcc: 7ffb ldrb r3, [r7, #31] + 800dbce: 2b00 cmp r3, #0 + 800dbd0: d00e beq.n 800dbf0 + /* FIN segment, no data */ + TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); + 800dbd2: 697b ldr r3, [r7, #20] + 800dbd4: 899b ldrh r3, [r3, #12] + 800dbd6: b29b uxth r3, r3 + 800dbd8: f423 537c bic.w r3, r3, #16128 ; 0x3f00 + 800dbdc: b29c uxth r4, r3 + 800dbde: 2011 movs r0, #17 + 800dbe0: f7f9 fa78 bl 80070d4 + 800dbe4: 4603 mov r3, r0 + 800dbe6: 4323 orrs r3, r4 + 800dbe8: b29a uxth r2, r3 + 800dbea: 697b ldr r3, [r7, #20] + 800dbec: 819a strh r2, [r3, #12] + 800dbee: e010 b.n 800dc12 + } else { + /* Data segment, copy in one byte from the head of the unacked queue */ + char *d = ((char *)p->payload + TCP_HLEN); + 800dbf0: 69bb ldr r3, [r7, #24] + 800dbf2: 685b ldr r3, [r3, #4] + 800dbf4: 3314 adds r3, #20 + 800dbf6: 613b str r3, [r7, #16] + /* Depending on whether the segment has already been sent (unacked) or not + (unsent), seg->p->payload points to the IP header or TCP header. + Ensure we copy the first TCP data byte: */ + pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len); + 800dbf8: 6a3b ldr r3, [r7, #32] + 800dbfa: 6858 ldr r0, [r3, #4] + 800dbfc: 6a3b ldr r3, [r7, #32] + 800dbfe: 685b ldr r3, [r3, #4] + 800dc00: 891a ldrh r2, [r3, #8] + 800dc02: 6a3b ldr r3, [r7, #32] + 800dc04: 891b ldrh r3, [r3, #8] + 800dc06: 1ad3 subs r3, r2, r3 + 800dc08: b29b uxth r3, r3 + 800dc0a: 2201 movs r2, #1 + 800dc0c: 6939 ldr r1, [r7, #16] + 800dc0e: f7fa fd97 bl 8008740 + } + + /* The byte may be acknowledged without the window being opened. */ + snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1; + 800dc12: 6a3b ldr r3, [r7, #32] + 800dc14: 68db ldr r3, [r3, #12] + 800dc16: 685b ldr r3, [r3, #4] + 800dc18: 4618 mov r0, r3 + 800dc1a: f7f9 fa68 bl 80070ee + 800dc1e: 4603 mov r3, r0 + 800dc20: 3301 adds r3, #1 + 800dc22: 60fb str r3, [r7, #12] + if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { + 800dc24: 687b ldr r3, [r7, #4] + 800dc26: 6cda ldr r2, [r3, #76] ; 0x4c + 800dc28: 68fb ldr r3, [r7, #12] + 800dc2a: 1ad3 subs r3, r2, r3 + 800dc2c: 2b00 cmp r3, #0 + 800dc2e: da02 bge.n 800dc36 + pcb->snd_nxt = snd_nxt; + 800dc30: 687b ldr r3, [r7, #4] + 800dc32: 68fa ldr r2, [r7, #12] + 800dc34: 64da str r2, [r3, #76] ; 0x4c + } + + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + 800dc36: 687b ldr r3, [r7, #4] + 800dc38: 3304 adds r3, #4 + 800dc3a: 4618 mov r0, r3 + 800dc3c: f003 fcc8 bl 80115d0 + 800dc40: 60b8 str r0, [r7, #8] + if (netif == NULL) { + 800dc42: 68bb ldr r3, [r7, #8] + 800dc44: 2b00 cmp r3, #0 + 800dc46: d103 bne.n 800dc50 + err = ERR_RTE; + 800dc48: 23fc movs r3, #252 ; 0xfc + 800dc4a: f887 3027 strb.w r3, [r7, #39] ; 0x27 + 800dc4e: e011 b.n 800dc74 +#endif + TCP_STATS_INC(tcp.xmit); + + /* Send output to IP */ + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, + 800dc50: 6879 ldr r1, [r7, #4] + 800dc52: 687b ldr r3, [r7, #4] + 800dc54: 1d1a adds r2, r3, #4 + 800dc56: 687b ldr r3, [r7, #4] + 800dc58: 7a98 ldrb r0, [r3, #10] + 800dc5a: 68bb ldr r3, [r7, #8] + 800dc5c: 9302 str r3, [sp, #8] + 800dc5e: 2306 movs r3, #6 + 800dc60: 9301 str r3, [sp, #4] + 800dc62: 2300 movs r3, #0 + 800dc64: 9300 str r3, [sp, #0] + 800dc66: 4603 mov r3, r0 + 800dc68: 69b8 ldr r0, [r7, #24] + 800dc6a: f003 fe79 bl 8011960 + 800dc6e: 4603 mov r3, r0 + 800dc70: f887 3027 strb.w r3, [r7, #39] ; 0x27 + 0, IP_PROTO_TCP, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + } + + pbuf_free(p); + 800dc74: 69b8 ldr r0, [r7, #24] + 800dc76: f7fa fb65 bl 8008344 + + 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; + 800dc7a: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 +} + 800dc7e: 4618 mov r0, r3 + 800dc80: 372c adds r7, #44 ; 0x2c + 800dc82: 46bd mov sp, r7 + 800dc84: bd90 pop {r4, r7, pc} + ... + +0800dc88 : + * + * @param arg unused argument + */ +static void +tcpip_tcp_timer(void *arg) +{ + 800dc88: b580 push {r7, lr} + 800dc8a: b082 sub sp, #8 + 800dc8c: af00 add r7, sp, #0 + 800dc8e: 6078 str r0, [r7, #4] + LWIP_UNUSED_ARG(arg); + + /* call TCP timer handler */ + tcp_tmr(); + 800dc90: f7fa fe38 bl 8008904 + /* timer still needed? */ + if (tcp_active_pcbs || tcp_tw_pcbs) { + 800dc94: 4b0a ldr r3, [pc, #40] ; (800dcc0 ) + 800dc96: 681b ldr r3, [r3, #0] + 800dc98: 2b00 cmp r3, #0 + 800dc9a: d103 bne.n 800dca4 + 800dc9c: 4b09 ldr r3, [pc, #36] ; (800dcc4 ) + 800dc9e: 681b ldr r3, [r3, #0] + 800dca0: 2b00 cmp r3, #0 + 800dca2: d005 beq.n 800dcb0 + /* restart timer */ + sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); + 800dca4: 2200 movs r2, #0 + 800dca6: 4908 ldr r1, [pc, #32] ; (800dcc8 ) + 800dca8: 20fa movs r0, #250 ; 0xfa + 800dcaa: f000 f86f bl 800dd8c + 800dcae: e003 b.n 800dcb8 + } else { + /* disable timer */ + tcpip_tcp_timer_active = 0; + 800dcb0: 4b06 ldr r3, [pc, #24] ; (800dccc ) + 800dcb2: 2200 movs r2, #0 + 800dcb4: 601a str r2, [r3, #0] + } +} + 800dcb6: bf00 nop + 800dcb8: bf00 nop + 800dcba: 3708 adds r7, #8 + 800dcbc: 46bd mov sp, r7 + 800dcbe: bd80 pop {r7, pc} + 800dcc0: 20006f74 .word 0x20006f74 + 800dcc4: 20006f78 .word 0x20006f78 + 800dcc8: 0800dc89 .word 0x0800dc89 + 800dccc: 20006fc0 .word 0x20006fc0 + +0800dcd0 : + * the reason is to have the TCP timer only running when + * there are active (or time-wait) PCBs. + */ +void +tcp_timer_needed(void) +{ + 800dcd0: b580 push {r7, lr} + 800dcd2: af00 add r7, sp, #0 + /* timer is off but needed again? */ + if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { + 800dcd4: 4b0a ldr r3, [pc, #40] ; (800dd00 ) + 800dcd6: 681b ldr r3, [r3, #0] + 800dcd8: 2b00 cmp r3, #0 + 800dcda: d10f bne.n 800dcfc + 800dcdc: 4b09 ldr r3, [pc, #36] ; (800dd04 ) + 800dcde: 681b ldr r3, [r3, #0] + 800dce0: 2b00 cmp r3, #0 + 800dce2: d103 bne.n 800dcec + 800dce4: 4b08 ldr r3, [pc, #32] ; (800dd08 ) + 800dce6: 681b ldr r3, [r3, #0] + 800dce8: 2b00 cmp r3, #0 + 800dcea: d007 beq.n 800dcfc + /* enable and start timer */ + tcpip_tcp_timer_active = 1; + 800dcec: 4b04 ldr r3, [pc, #16] ; (800dd00 ) + 800dcee: 2201 movs r2, #1 + 800dcf0: 601a str r2, [r3, #0] + sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); + 800dcf2: 2200 movs r2, #0 + 800dcf4: 4905 ldr r1, [pc, #20] ; (800dd0c ) + 800dcf6: 20fa movs r0, #250 ; 0xfa + 800dcf8: f000 f848 bl 800dd8c + } +} + 800dcfc: bf00 nop + 800dcfe: bd80 pop {r7, pc} + 800dd00: 20006fc0 .word 0x20006fc0 + 800dd04: 20006f74 .word 0x20006f74 + 800dd08: 20006f78 .word 0x20006f78 + 800dd0c: 0800dc89 .word 0x0800dc89 + +0800dd10 : + * + * @param arg unused argument + */ +static void +cyclic_timer(void *arg) +{ + 800dd10: b580 push {r7, lr} + 800dd12: b084 sub sp, #16 + 800dd14: af00 add r7, sp, #0 + 800dd16: 6078 str r0, [r7, #4] + const struct lwip_cyclic_timer* cyclic = (const struct lwip_cyclic_timer*)arg; + 800dd18: 687b ldr r3, [r7, #4] + 800dd1a: 60fb str r3, [r7, #12] +#if LWIP_DEBUG_TIMERNAMES + LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); +#endif + cyclic->handler(); + 800dd1c: 68fb ldr r3, [r7, #12] + 800dd1e: 685b ldr r3, [r3, #4] + 800dd20: 4798 blx r3 + sys_timeout(cyclic->interval_ms, cyclic_timer, arg); + 800dd22: 68fb ldr r3, [r7, #12] + 800dd24: 681b ldr r3, [r3, #0] + 800dd26: 687a ldr r2, [r7, #4] + 800dd28: 4903 ldr r1, [pc, #12] ; (800dd38 ) + 800dd2a: 4618 mov r0, r3 + 800dd2c: f000 f82e bl 800dd8c +} + 800dd30: bf00 nop + 800dd32: 3710 adds r7, #16 + 800dd34: 46bd mov sp, r7 + 800dd36: bd80 pop {r7, pc} + 800dd38: 0800dd11 .word 0x0800dd11 + +0800dd3c : + +/** Initialize this module */ +void sys_timeouts_init(void) +{ + 800dd3c: b580 push {r7, lr} + 800dd3e: b082 sub sp, #8 + 800dd40: af00 add r7, sp, #0 + size_t i; + /* tcp_tmr() at index 0 is started on demand */ + for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { + 800dd42: 2301 movs r3, #1 + 800dd44: 607b str r3, [r7, #4] + 800dd46: e00e b.n 800dd66 + /* we have to cast via size_t to get rid of const warning + (this is OK as cyclic_timer() casts back to const* */ + sys_timeout(lwip_cyclic_timers[i].interval_ms, cyclic_timer, LWIP_CONST_CAST(void*, &lwip_cyclic_timers[i])); + 800dd48: 4a0d ldr r2, [pc, #52] ; (800dd80 ) + 800dd4a: 687b ldr r3, [r7, #4] + 800dd4c: f852 0033 ldr.w r0, [r2, r3, lsl #3] + 800dd50: 687b ldr r3, [r7, #4] + 800dd52: 00db lsls r3, r3, #3 + 800dd54: 4a0a ldr r2, [pc, #40] ; (800dd80 ) + 800dd56: 4413 add r3, r2 + 800dd58: 461a mov r2, r3 + 800dd5a: 490a ldr r1, [pc, #40] ; (800dd84 ) + 800dd5c: f000 f816 bl 800dd8c + for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { + 800dd60: 687b ldr r3, [r7, #4] + 800dd62: 3301 adds r3, #1 + 800dd64: 607b str r3, [r7, #4] + 800dd66: 687b ldr r3, [r7, #4] + 800dd68: 2b04 cmp r3, #4 + 800dd6a: d9ed bls.n 800dd48 + } + + /* Initialise timestamp for sys_check_timeouts */ + timeouts_last_time = sys_now(); + 800dd6c: f7f7 fd92 bl 8005894 + 800dd70: 4603 mov r3, r0 + 800dd72: 4a05 ldr r2, [pc, #20] ; (800dd88 ) + 800dd74: 6013 str r3, [r2, #0] +} + 800dd76: bf00 nop + 800dd78: 3708 adds r7, #8 + 800dd7a: 46bd mov sp, r7 + 800dd7c: bd80 pop {r7, pc} + 800dd7e: bf00 nop + 800dd80: 08016740 .word 0x08016740 + 800dd84: 0800dd11 .word 0x0800dd11 + 800dd88: 20006fbc .word 0x20006fbc + +0800dd8c : +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 */ +{ + 800dd8c: b580 push {r7, lr} + 800dd8e: b088 sub sp, #32 + 800dd90: af00 add r7, sp, #0 + 800dd92: 60f8 str r0, [r7, #12] + 800dd94: 60b9 str r1, [r7, #8] + 800dd96: 607a str r2, [r7, #4] + struct sys_timeo *timeout, *t; + u32_t now, diff; + + timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); + 800dd98: 2006 movs r0, #6 + 800dd9a: f7f9 fd43 bl 8007824 + 800dd9e: 6178 str r0, [r7, #20] + if (timeout == NULL) { + 800dda0: 697b ldr r3, [r7, #20] + 800dda2: 2b00 cmp r3, #0 + 800dda4: d10a bne.n 800ddbc + LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); + 800dda6: 697b ldr r3, [r7, #20] + 800dda8: 2b00 cmp r3, #0 + 800ddaa: f040 8084 bne.w 800deb6 + 800ddae: 4b44 ldr r3, [pc, #272] ; (800dec0 ) + 800ddb0: 22d4 movs r2, #212 ; 0xd4 + 800ddb2: 4944 ldr r1, [pc, #272] ; (800dec4 ) + 800ddb4: 4844 ldr r0, [pc, #272] ; (800dec8 ) + 800ddb6: f004 ffe5 bl 8012d84 + return; + 800ddba: e07c b.n 800deb6 + } + + now = sys_now(); + 800ddbc: f7f7 fd6a bl 8005894 + 800ddc0: 6138 str r0, [r7, #16] + if (next_timeout == NULL) { + 800ddc2: 4b42 ldr r3, [pc, #264] ; (800decc ) + 800ddc4: 681b ldr r3, [r3, #0] + 800ddc6: 2b00 cmp r3, #0 + 800ddc8: d105 bne.n 800ddd6 + diff = 0; + 800ddca: 2300 movs r3, #0 + 800ddcc: 61bb str r3, [r7, #24] + timeouts_last_time = now; + 800ddce: 4a40 ldr r2, [pc, #256] ; (800ded0 ) + 800ddd0: 693b ldr r3, [r7, #16] + 800ddd2: 6013 str r3, [r2, #0] + 800ddd4: e004 b.n 800dde0 + } else { + diff = now - timeouts_last_time; + 800ddd6: 4b3e ldr r3, [pc, #248] ; (800ded0 ) + 800ddd8: 681b ldr r3, [r3, #0] + 800ddda: 693a ldr r2, [r7, #16] + 800dddc: 1ad3 subs r3, r2, r3 + 800ddde: 61bb str r3, [r7, #24] + } + + timeout->next = NULL; + 800dde0: 697b ldr r3, [r7, #20] + 800dde2: 2200 movs r2, #0 + 800dde4: 601a str r2, [r3, #0] + timeout->h = handler; + 800dde6: 697b ldr r3, [r7, #20] + 800dde8: 68ba ldr r2, [r7, #8] + 800ddea: 609a str r2, [r3, #8] + timeout->arg = arg; + 800ddec: 697b ldr r3, [r7, #20] + 800ddee: 687a ldr r2, [r7, #4] + 800ddf0: 60da str r2, [r3, #12] + timeout->time = msecs + diff; + 800ddf2: 68fa ldr r2, [r7, #12] + 800ddf4: 69bb ldr r3, [r7, #24] + 800ddf6: 441a add r2, r3 + 800ddf8: 697b ldr r3, [r7, #20] + 800ddfa: 605a str r2, [r3, #4] + timeout->handler_name = handler_name; + LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", + (void *)timeout, msecs, handler_name, (void *)arg)); +#endif /* LWIP_DEBUG_TIMERNAMES */ + + if (next_timeout == NULL) { + 800ddfc: 4b33 ldr r3, [pc, #204] ; (800decc ) + 800ddfe: 681b ldr r3, [r3, #0] + 800de00: 2b00 cmp r3, #0 + 800de02: d103 bne.n 800de0c + next_timeout = timeout; + 800de04: 4a31 ldr r2, [pc, #196] ; (800decc ) + 800de06: 697b ldr r3, [r7, #20] + 800de08: 6013 str r3, [r2, #0] + return; + 800de0a: e055 b.n 800deb8 + } + + if (next_timeout->time > msecs) { + 800de0c: 4b2f ldr r3, [pc, #188] ; (800decc ) + 800de0e: 681b ldr r3, [r3, #0] + 800de10: 685b ldr r3, [r3, #4] + 800de12: 68fa ldr r2, [r7, #12] + 800de14: 429a cmp r2, r3 + 800de16: d20f bcs.n 800de38 + next_timeout->time -= msecs; + 800de18: 4b2c ldr r3, [pc, #176] ; (800decc ) + 800de1a: 681b ldr r3, [r3, #0] + 800de1c: 6859 ldr r1, [r3, #4] + 800de1e: 4b2b ldr r3, [pc, #172] ; (800decc ) + 800de20: 681b ldr r3, [r3, #0] + 800de22: 68fa ldr r2, [r7, #12] + 800de24: 1a8a subs r2, r1, r2 + 800de26: 605a str r2, [r3, #4] + timeout->next = next_timeout; + 800de28: 4b28 ldr r3, [pc, #160] ; (800decc ) + 800de2a: 681a ldr r2, [r3, #0] + 800de2c: 697b ldr r3, [r7, #20] + 800de2e: 601a str r2, [r3, #0] + next_timeout = timeout; + 800de30: 4a26 ldr r2, [pc, #152] ; (800decc ) + 800de32: 697b ldr r3, [r7, #20] + 800de34: 6013 str r3, [r2, #0] + 800de36: e03f b.n 800deb8 + } else { + for (t = next_timeout; t != NULL; t = t->next) { + 800de38: 4b24 ldr r3, [pc, #144] ; (800decc ) + 800de3a: 681b ldr r3, [r3, #0] + 800de3c: 61fb str r3, [r7, #28] + 800de3e: e036 b.n 800deae + timeout->time -= t->time; + 800de40: 697b ldr r3, [r7, #20] + 800de42: 685a ldr r2, [r3, #4] + 800de44: 69fb ldr r3, [r7, #28] + 800de46: 685b ldr r3, [r3, #4] + 800de48: 1ad2 subs r2, r2, r3 + 800de4a: 697b ldr r3, [r7, #20] + 800de4c: 605a str r2, [r3, #4] + if (t->next == NULL || t->next->time > timeout->time) { + 800de4e: 69fb ldr r3, [r7, #28] + 800de50: 681b ldr r3, [r3, #0] + 800de52: 2b00 cmp r3, #0 + 800de54: d006 beq.n 800de64 + 800de56: 69fb ldr r3, [r7, #28] + 800de58: 681b ldr r3, [r3, #0] + 800de5a: 685a ldr r2, [r3, #4] + 800de5c: 697b ldr r3, [r7, #20] + 800de5e: 685b ldr r3, [r3, #4] + 800de60: 429a cmp r2, r3 + 800de62: d921 bls.n 800dea8 + if (t->next != NULL) { + 800de64: 69fb ldr r3, [r7, #28] + 800de66: 681b ldr r3, [r3, #0] + 800de68: 2b00 cmp r3, #0 + 800de6a: d009 beq.n 800de80 + t->next->time -= timeout->time; + 800de6c: 69fb ldr r3, [r7, #28] + 800de6e: 681b ldr r3, [r3, #0] + 800de70: 6859 ldr r1, [r3, #4] + 800de72: 697b ldr r3, [r7, #20] + 800de74: 685a ldr r2, [r3, #4] + 800de76: 69fb ldr r3, [r7, #28] + 800de78: 681b ldr r3, [r3, #0] + 800de7a: 1a8a subs r2, r1, r2 + 800de7c: 605a str r2, [r3, #4] + 800de7e: e00b b.n 800de98 + } else if (timeout->time > msecs) { + 800de80: 697b ldr r3, [r7, #20] + 800de82: 685b ldr r3, [r3, #4] + 800de84: 68fa ldr r2, [r7, #12] + 800de86: 429a cmp r2, r3 + 800de88: d206 bcs.n 800de98 + /* If this is the case, 'timeouts_last_time' and 'now' differs too much. + This can be due to sys_check_timeouts() not being called at the right + times, but also when stopping in a breakpoint. Anyway, let's assume + this is not wanted, so add the first timer's time instead of 'diff' */ + timeout->time = msecs + next_timeout->time; + 800de8a: 4b10 ldr r3, [pc, #64] ; (800decc ) + 800de8c: 681b ldr r3, [r3, #0] + 800de8e: 685a ldr r2, [r3, #4] + 800de90: 68fb ldr r3, [r7, #12] + 800de92: 441a add r2, r3 + 800de94: 697b ldr r3, [r7, #20] + 800de96: 605a str r2, [r3, #4] + } + timeout->next = t->next; + 800de98: 69fb ldr r3, [r7, #28] + 800de9a: 681a ldr r2, [r3, #0] + 800de9c: 697b ldr r3, [r7, #20] + 800de9e: 601a str r2, [r3, #0] + t->next = timeout; + 800dea0: 69fb ldr r3, [r7, #28] + 800dea2: 697a ldr r2, [r7, #20] + 800dea4: 601a str r2, [r3, #0] + break; + 800dea6: e007 b.n 800deb8 + for (t = next_timeout; t != NULL; t = t->next) { + 800dea8: 69fb ldr r3, [r7, #28] + 800deaa: 681b ldr r3, [r3, #0] + 800deac: 61fb str r3, [r7, #28] + 800deae: 69fb ldr r3, [r7, #28] + 800deb0: 2b00 cmp r3, #0 + 800deb2: d1c5 bne.n 800de40 + 800deb4: e000 b.n 800deb8 + return; + 800deb6: bf00 nop + } + } + } +} + 800deb8: 3720 adds r7, #32 + 800deba: 46bd mov sp, r7 + 800debc: bd80 pop {r7, pc} + 800debe: bf00 nop + 800dec0: 0801594c .word 0x0801594c + 800dec4: 08015980 .word 0x08015980 + 800dec8: 080159c0 .word 0x080159c0 + 800decc: 20006fb8 .word 0x20006fb8 + 800ded0: 20006fbc .word 0x20006fbc + +0800ded4 : + * @param handler callback function that would be called by the timeout + * @param arg callback argument that would be passed to handler +*/ +void +sys_untimeout(sys_timeout_handler handler, void *arg) +{ + 800ded4: b580 push {r7, lr} + 800ded6: b084 sub sp, #16 + 800ded8: af00 add r7, sp, #0 + 800deda: 6078 str r0, [r7, #4] + 800dedc: 6039 str r1, [r7, #0] + struct sys_timeo *prev_t, *t; + + if (next_timeout == NULL) { + 800dede: 4b1f ldr r3, [pc, #124] ; (800df5c ) + 800dee0: 681b ldr r3, [r3, #0] + 800dee2: 2b00 cmp r3, #0 + 800dee4: d036 beq.n 800df54 + return; + } + + for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { + 800dee6: 4b1d ldr r3, [pc, #116] ; (800df5c ) + 800dee8: 681b ldr r3, [r3, #0] + 800deea: 60bb str r3, [r7, #8] + 800deec: 2300 movs r3, #0 + 800deee: 60fb str r3, [r7, #12] + 800def0: e02c b.n 800df4c + if ((t->h == handler) && (t->arg == arg)) { + 800def2: 68bb ldr r3, [r7, #8] + 800def4: 689b ldr r3, [r3, #8] + 800def6: 687a ldr r2, [r7, #4] + 800def8: 429a cmp r2, r3 + 800defa: d122 bne.n 800df42 + 800defc: 68bb ldr r3, [r7, #8] + 800defe: 68db ldr r3, [r3, #12] + 800df00: 683a ldr r2, [r7, #0] + 800df02: 429a cmp r2, r3 + 800df04: d11d bne.n 800df42 + /* We have a match */ + /* Unlink from previous in list */ + if (prev_t == NULL) { + 800df06: 68fb ldr r3, [r7, #12] + 800df08: 2b00 cmp r3, #0 + 800df0a: d104 bne.n 800df16 + next_timeout = t->next; + 800df0c: 68bb ldr r3, [r7, #8] + 800df0e: 681b ldr r3, [r3, #0] + 800df10: 4a12 ldr r2, [pc, #72] ; (800df5c ) + 800df12: 6013 str r3, [r2, #0] + 800df14: e003 b.n 800df1e + } else { + prev_t->next = t->next; + 800df16: 68bb ldr r3, [r7, #8] + 800df18: 681a ldr r2, [r3, #0] + 800df1a: 68fb ldr r3, [r7, #12] + 800df1c: 601a str r2, [r3, #0] + } + /* If not the last one, add time of this one back to next */ + if (t->next != NULL) { + 800df1e: 68bb ldr r3, [r7, #8] + 800df20: 681b ldr r3, [r3, #0] + 800df22: 2b00 cmp r3, #0 + 800df24: d008 beq.n 800df38 + t->next->time += t->time; + 800df26: 68bb ldr r3, [r7, #8] + 800df28: 681b ldr r3, [r3, #0] + 800df2a: 6859 ldr r1, [r3, #4] + 800df2c: 68bb ldr r3, [r7, #8] + 800df2e: 685a ldr r2, [r3, #4] + 800df30: 68bb ldr r3, [r7, #8] + 800df32: 681b ldr r3, [r3, #0] + 800df34: 440a add r2, r1 + 800df36: 605a str r2, [r3, #4] + } + memp_free(MEMP_SYS_TIMEOUT, t); + 800df38: 68b9 ldr r1, [r7, #8] + 800df3a: 2006 movs r0, #6 + 800df3c: f7f9 fcbe bl 80078bc + return; + 800df40: e009 b.n 800df56 + for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { + 800df42: 68bb ldr r3, [r7, #8] + 800df44: 60fb str r3, [r7, #12] + 800df46: 68bb ldr r3, [r7, #8] + 800df48: 681b ldr r3, [r3, #0] + 800df4a: 60bb str r3, [r7, #8] + 800df4c: 68bb ldr r3, [r7, #8] + 800df4e: 2b00 cmp r3, #0 + 800df50: d1cf bne.n 800def2 + } + } + return; + 800df52: e000 b.n 800df56 + return; + 800df54: bf00 nop +} + 800df56: 3710 adds r7, #16 + 800df58: 46bd mov sp, r7 + 800df5a: bd80 pop {r7, pc} + 800df5c: 20006fb8 .word 0x20006fb8 + +0800df60 : +#if !NO_SYS && !defined __DOXYGEN__ +static +#endif /* !NO_SYS */ +void +sys_check_timeouts(void) +{ + 800df60: b580 push {r7, lr} + 800df62: b086 sub sp, #24 + 800df64: af00 add r7, sp, #0 + if (next_timeout) { + 800df66: 4b24 ldr r3, [pc, #144] ; (800dff8 ) + 800df68: 681b ldr r3, [r3, #0] + 800df6a: 2b00 cmp r3, #0 + 800df6c: d040 beq.n 800dff0 + sys_timeout_handler handler; + void *arg; + u8_t had_one; + u32_t now; + + now = sys_now(); + 800df6e: f7f7 fc91 bl 8005894 + 800df72: 60f8 str r0, [r7, #12] + /* this cares for wraparounds */ + diff = now - timeouts_last_time; + 800df74: 4b21 ldr r3, [pc, #132] ; (800dffc ) + 800df76: 681b ldr r3, [r3, #0] + 800df78: 68fa ldr r2, [r7, #12] + 800df7a: 1ad3 subs r3, r2, r3 + 800df7c: 617b str r3, [r7, #20] + do { + PBUF_CHECK_FREE_OOSEQ(); + 800df7e: 4b20 ldr r3, [pc, #128] ; (800e000 ) + 800df80: 781b ldrb r3, [r3, #0] + 800df82: b2db uxtb r3, r3 + 800df84: 2b00 cmp r3, #0 + 800df86: d001 beq.n 800df8c + 800df88: f7f9 fe34 bl 8007bf4 + had_one = 0; + 800df8c: 2300 movs r3, #0 + 800df8e: 74fb strb r3, [r7, #19] + tmptimeout = next_timeout; + 800df90: 4b19 ldr r3, [pc, #100] ; (800dff8 ) + 800df92: 681b ldr r3, [r3, #0] + 800df94: 60bb str r3, [r7, #8] + if (tmptimeout && (tmptimeout->time <= diff)) { + 800df96: 68bb ldr r3, [r7, #8] + 800df98: 2b00 cmp r3, #0 + 800df9a: d026 beq.n 800dfea + 800df9c: 68bb ldr r3, [r7, #8] + 800df9e: 685b ldr r3, [r3, #4] + 800dfa0: 697a ldr r2, [r7, #20] + 800dfa2: 429a cmp r2, r3 + 800dfa4: d321 bcc.n 800dfea + /* timeout has expired */ + had_one = 1; + 800dfa6: 2301 movs r3, #1 + 800dfa8: 74fb strb r3, [r7, #19] + timeouts_last_time += tmptimeout->time; + 800dfaa: 68bb ldr r3, [r7, #8] + 800dfac: 685a ldr r2, [r3, #4] + 800dfae: 4b13 ldr r3, [pc, #76] ; (800dffc ) + 800dfb0: 681b ldr r3, [r3, #0] + 800dfb2: 4413 add r3, r2 + 800dfb4: 4a11 ldr r2, [pc, #68] ; (800dffc ) + 800dfb6: 6013 str r3, [r2, #0] + diff -= tmptimeout->time; + 800dfb8: 68bb ldr r3, [r7, #8] + 800dfba: 685b ldr r3, [r3, #4] + 800dfbc: 697a ldr r2, [r7, #20] + 800dfbe: 1ad3 subs r3, r2, r3 + 800dfc0: 617b str r3, [r7, #20] + next_timeout = tmptimeout->next; + 800dfc2: 68bb ldr r3, [r7, #8] + 800dfc4: 681b ldr r3, [r3, #0] + 800dfc6: 4a0c ldr r2, [pc, #48] ; (800dff8 ) + 800dfc8: 6013 str r3, [r2, #0] + handler = tmptimeout->h; + 800dfca: 68bb ldr r3, [r7, #8] + 800dfcc: 689b ldr r3, [r3, #8] + 800dfce: 607b str r3, [r7, #4] + arg = tmptimeout->arg; + 800dfd0: 68bb ldr r3, [r7, #8] + 800dfd2: 68db ldr r3, [r3, #12] + 800dfd4: 603b str r3, [r7, #0] + if (handler != NULL) { + LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s arg=%p\n", + tmptimeout->handler_name, arg)); + } +#endif /* LWIP_DEBUG_TIMERNAMES */ + memp_free(MEMP_SYS_TIMEOUT, tmptimeout); + 800dfd6: 68b9 ldr r1, [r7, #8] + 800dfd8: 2006 movs r0, #6 + 800dfda: f7f9 fc6f bl 80078bc + if (handler != NULL) { + 800dfde: 687b ldr r3, [r7, #4] + 800dfe0: 2b00 cmp r3, #0 + 800dfe2: d002 beq.n 800dfea +#if !NO_SYS + /* For LWIP_TCPIP_CORE_LOCKING, lock the core before calling the + timeout handler function. */ + LOCK_TCPIP_CORE(); +#endif /* !NO_SYS */ + handler(arg); + 800dfe4: 687b ldr r3, [r7, #4] + 800dfe6: 6838 ldr r0, [r7, #0] + 800dfe8: 4798 blx r3 +#endif /* !NO_SYS */ + } + LWIP_TCPIP_THREAD_ALIVE(); + } + /* repeat until all expired timers have been called */ + } while (had_one); + 800dfea: 7cfb ldrb r3, [r7, #19] + 800dfec: 2b00 cmp r3, #0 + 800dfee: d1c6 bne.n 800df7e + } +} + 800dff0: bf00 nop + 800dff2: 3718 adds r7, #24 + 800dff4: 46bd mov sp, r7 + 800dff6: bd80 pop {r7, pc} + 800dff8: 20006fb8 .word 0x20006fb8 + 800dffc: 20006fbc .word 0x20006fbc + 800e000: 20006f65 .word 0x20006f65 + +0800e004 : +/** + * Initialize this module. + */ +void +udp_init(void) +{ + 800e004: b480 push {r7} + 800e006: af00 add r7, sp, #0 +#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) + udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); +#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ +} + 800e008: bf00 nop + 800e00a: 46bd mov sp, r7 + 800e00c: bc80 pop {r7} + 800e00e: 4770 bx lr + +0800e010 : + * + * @return a new (free) local UDP port number + */ +static u16_t +udp_new_port(void) +{ + 800e010: b480 push {r7} + 800e012: b083 sub sp, #12 + 800e014: af00 add r7, sp, #0 + u16_t n = 0; + 800e016: 2300 movs r3, #0 + 800e018: 80fb strh r3, [r7, #6] + struct udp_pcb *pcb; + +again: + if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { + 800e01a: 4b17 ldr r3, [pc, #92] ; (800e078 ) + 800e01c: 881b ldrh r3, [r3, #0] + 800e01e: 1c5a adds r2, r3, #1 + 800e020: b291 uxth r1, r2 + 800e022: 4a15 ldr r2, [pc, #84] ; (800e078 ) + 800e024: 8011 strh r1, [r2, #0] + 800e026: f64f 72ff movw r2, #65535 ; 0xffff + 800e02a: 4293 cmp r3, r2 + 800e02c: d103 bne.n 800e036 + udp_port = UDP_LOCAL_PORT_RANGE_START; + 800e02e: 4b12 ldr r3, [pc, #72] ; (800e078 ) + 800e030: f44f 4240 mov.w r2, #49152 ; 0xc000 + 800e034: 801a strh r2, [r3, #0] + } + /* Check all PCBs. */ + for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { + 800e036: 4b11 ldr r3, [pc, #68] ; (800e07c ) + 800e038: 681b ldr r3, [r3, #0] + 800e03a: 603b str r3, [r7, #0] + 800e03c: e011 b.n 800e062 + if (pcb->local_port == udp_port) { + 800e03e: 683b ldr r3, [r7, #0] + 800e040: 8a5a ldrh r2, [r3, #18] + 800e042: 4b0d ldr r3, [pc, #52] ; (800e078 ) + 800e044: 881b ldrh r3, [r3, #0] + 800e046: 429a cmp r2, r3 + 800e048: d108 bne.n 800e05c + if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { + 800e04a: 88fb ldrh r3, [r7, #6] + 800e04c: 3301 adds r3, #1 + 800e04e: 80fb strh r3, [r7, #6] + 800e050: 88fb ldrh r3, [r7, #6] + 800e052: f5b3 4f80 cmp.w r3, #16384 ; 0x4000 + 800e056: d3e0 bcc.n 800e01a + return 0; + 800e058: 2300 movs r3, #0 + 800e05a: e007 b.n 800e06c + for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { + 800e05c: 683b ldr r3, [r7, #0] + 800e05e: 68db ldr r3, [r3, #12] + 800e060: 603b str r3, [r7, #0] + 800e062: 683b ldr r3, [r7, #0] + 800e064: 2b00 cmp r3, #0 + 800e066: d1ea bne.n 800e03e + } + goto again; + } + } + return udp_port; + 800e068: 4b03 ldr r3, [pc, #12] ; (800e078 ) + 800e06a: 881b ldrh r3, [r3, #0] +} + 800e06c: 4618 mov r0, r3 + 800e06e: 370c adds r7, #12 + 800e070: 46bd mov sp, r7 + 800e072: bc80 pop {r7} + 800e074: 4770 bx lr + 800e076: bf00 nop + 800e078: 20000010 .word 0x20000010 + 800e07c: 20006fc4 .word 0x20006fc4 + +0800e080 : + * @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) +{ + 800e080: b480 push {r7} + 800e082: b085 sub sp, #20 + 800e084: af00 add r7, sp, #0 + 800e086: 60f8 str r0, [r7, #12] + 800e088: 60b9 str r1, [r7, #8] + 800e08a: 4613 mov r3, r2 + 800e08c: 71fb strb r3, [r7, #7] + /* 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) { + 800e08e: 79fb ldrb r3, [r7, #7] + 800e090: 2b00 cmp r3, #0 + 800e092: d018 beq.n 800e0c6 +#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)) || + 800e094: 68fb ldr r3, [r7, #12] + 800e096: 2b00 cmp r3, #0 + 800e098: d013 beq.n 800e0c2 + 800e09a: 68fb ldr r3, [r7, #12] + 800e09c: 681b ldr r3, [r3, #0] + 800e09e: 2b00 cmp r3, #0 + 800e0a0: d00f beq.n 800e0c2 + ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || + 800e0a2: 4b13 ldr r3, [pc, #76] ; (800e0f0 ) + 800e0a4: 695b ldr r3, [r3, #20] + if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || + 800e0a6: f1b3 3fff cmp.w r3, #4294967295 + 800e0aa: d00a beq.n 800e0c2 + ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { + 800e0ac: 68fb ldr r3, [r7, #12] + 800e0ae: 681a ldr r2, [r3, #0] + 800e0b0: 4b0f ldr r3, [pc, #60] ; (800e0f0 ) + 800e0b2: 695b ldr r3, [r3, #20] + 800e0b4: 405a eors r2, r3 + 800e0b6: 68bb ldr r3, [r7, #8] + 800e0b8: 3308 adds r3, #8 + 800e0ba: 681b ldr r3, [r3, #0] + 800e0bc: 4013 ands r3, r2 + ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || + 800e0be: 2b00 cmp r3, #0 + 800e0c0: d110 bne.n 800e0e4 + return 1; + 800e0c2: 2301 movs r3, #1 + 800e0c4: e00f b.n 800e0e6 + } + } + } else +#endif /* LWIP_IPV4 */ + /* Handle IPv4 and IPv6: all or exact match */ + if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + 800e0c6: 68fb ldr r3, [r7, #12] + 800e0c8: 2b00 cmp r3, #0 + 800e0ca: d009 beq.n 800e0e0 + 800e0cc: 68fb ldr r3, [r7, #12] + 800e0ce: 681b ldr r3, [r3, #0] + 800e0d0: 2b00 cmp r3, #0 + 800e0d2: d005 beq.n 800e0e0 + 800e0d4: 68fb ldr r3, [r7, #12] + 800e0d6: 681a ldr r2, [r3, #0] + 800e0d8: 4b05 ldr r3, [pc, #20] ; (800e0f0 ) + 800e0da: 695b ldr r3, [r3, #20] + 800e0dc: 429a cmp r2, r3 + 800e0de: d101 bne.n 800e0e4 + return 1; + 800e0e0: 2301 movs r3, #1 + 800e0e2: e000 b.n 800e0e6 + } + } + + return 0; + 800e0e4: 2300 movs r3, #0 +} + 800e0e6: 4618 mov r0, r3 + 800e0e8: 3714 adds r7, #20 + 800e0ea: 46bd mov sp, r7 + 800e0ec: bc80 pop {r7} + 800e0ee: 4770 bx lr + 800e0f0: 200039ec .word 0x200039ec + +0800e0f4 : + * @param inp network interface on which the datagram was received. + * + */ +void +udp_input(struct pbuf *p, struct netif *inp) +{ + 800e0f4: b590 push {r4, r7, lr} + 800e0f6: b08d sub sp, #52 ; 0x34 + 800e0f8: af02 add r7, sp, #8 + 800e0fa: 6078 str r0, [r7, #4] + 800e0fc: 6039 str r1, [r7, #0] + struct udp_hdr *udphdr; + struct udp_pcb *pcb, *prev; + struct udp_pcb *uncon_pcb; + u16_t src, dest; + u8_t broadcast; + u8_t for_us = 0; + 800e0fe: 2300 movs r3, #0 + 800e100: 76fb strb r3, [r7, #27] + PERF_START; + + UDP_STATS_INC(udp.recv); + + /* Check minimum length (UDP header) */ + if (p->len < UDP_HLEN) { + 800e102: 687b ldr r3, [r7, #4] + 800e104: 895b ldrh r3, [r3, #10] + 800e106: 2b07 cmp r3, #7 + 800e108: d803 bhi.n 800e112 + LWIP_DEBUGF(UDP_DEBUG, + ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len)); + UDP_STATS_INC(udp.lenerr); + UDP_STATS_INC(udp.drop); + MIB2_STATS_INC(mib2.udpinerrors); + pbuf_free(p); + 800e10a: 6878 ldr r0, [r7, #4] + 800e10c: f7fa f91a bl 8008344 + goto end; + 800e110: e0c6 b.n 800e2a0 + } + + udphdr = (struct udp_hdr *)p->payload; + 800e112: 687b ldr r3, [r7, #4] + 800e114: 685b ldr r3, [r3, #4] + 800e116: 617b str r3, [r7, #20] + + /* is broadcast packet ? */ + broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); + 800e118: 4b63 ldr r3, [pc, #396] ; (800e2a8 ) + 800e11a: 695b ldr r3, [r3, #20] + 800e11c: 4a62 ldr r2, [pc, #392] ; (800e2a8 ) + 800e11e: 6812 ldr r2, [r2, #0] + 800e120: 4611 mov r1, r2 + 800e122: 4618 mov r0, r3 + 800e124: f003 fcee bl 8011b04 + 800e128: 4603 mov r3, r0 + 800e12a: 74fb strb r3, [r7, #19] + + 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); + 800e12c: 697b ldr r3, [r7, #20] + 800e12e: 881b ldrh r3, [r3, #0] + 800e130: b29b uxth r3, r3 + 800e132: 4618 mov r0, r3 + 800e134: f7f8 ffce bl 80070d4 + 800e138: 4603 mov r3, r0 + 800e13a: 823b strh r3, [r7, #16] + dest = lwip_ntohs(udphdr->dest); + 800e13c: 697b ldr r3, [r7, #20] + 800e13e: 885b ldrh r3, [r3, #2] + 800e140: b29b uxth r3, r3 + 800e142: 4618 mov r0, r3 + 800e144: f7f8 ffc6 bl 80070d4 + 800e148: 4603 mov r3, r0 + 800e14a: 81fb strh r3, [r7, #14] + ip_addr_debug_print(UDP_DEBUG, ip_current_dest_addr()); + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", lwip_ntohs(udphdr->dest))); + ip_addr_debug_print(UDP_DEBUG, ip_current_src_addr()); + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", lwip_ntohs(udphdr->src))); + + pcb = NULL; + 800e14c: 2300 movs r3, #0 + 800e14e: 627b str r3, [r7, #36] ; 0x24 + prev = NULL; + 800e150: 2300 movs r3, #0 + 800e152: 623b str r3, [r7, #32] + uncon_pcb = NULL; + 800e154: 2300 movs r3, #0 + 800e156: 61fb str r3, [r7, #28] + /* 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) { + 800e158: 4b54 ldr r3, [pc, #336] ; (800e2ac ) + 800e15a: 681b ldr r3, [r3, #0] + 800e15c: 627b str r3, [r7, #36] ; 0x24 + 800e15e: e03b b.n 800e1d8 + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", pcb->local_port)); + ip_addr_debug_print(UDP_DEBUG, &pcb->remote_ip); + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port)); + + /* compare PCB local addr+port to UDP destination addr+port */ + if ((pcb->local_port == dest) && + 800e160: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e162: 8a5b ldrh r3, [r3, #18] + 800e164: 89fa ldrh r2, [r7, #14] + 800e166: 429a cmp r2, r3 + 800e168: d131 bne.n 800e1ce + (udp_input_local_match(pcb, inp, broadcast) != 0)) { + 800e16a: 7cfb ldrb r3, [r7, #19] + 800e16c: 461a mov r2, r3 + 800e16e: 6839 ldr r1, [r7, #0] + 800e170: 6a78 ldr r0, [r7, #36] ; 0x24 + 800e172: f7ff ff85 bl 800e080 + 800e176: 4603 mov r3, r0 + if ((pcb->local_port == dest) && + 800e178: 2b00 cmp r3, #0 + 800e17a: d028 beq.n 800e1ce + if (((pcb->flags & UDP_FLAGS_CONNECTED) == 0) && + 800e17c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e17e: 7c1b ldrb r3, [r3, #16] + 800e180: f003 0304 and.w r3, r3, #4 + 800e184: 2b00 cmp r3, #0 + 800e186: d104 bne.n 800e192 + 800e188: 69fb ldr r3, [r7, #28] + 800e18a: 2b00 cmp r3, #0 + 800e18c: d101 bne.n 800e192 + /* prefer specific IPs over cath-all */ + || !ip_addr_isany(&pcb->local_ip) +#endif /* SO_REUSE */ + )) { + /* the first unconnected matching PCB */ + uncon_pcb = pcb; + 800e18e: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e190: 61fb str r3, [r7, #28] + } + + /* compare PCB remote addr+port to UDP source addr+port */ + if ((pcb->remote_port == src) && + 800e192: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e194: 8a9b ldrh r3, [r3, #20] + 800e196: 8a3a ldrh r2, [r7, #16] + 800e198: 429a cmp r2, r3 + 800e19a: d118 bne.n 800e1ce + (ip_addr_isany_val(pcb->remote_ip) || + 800e19c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e19e: 685b ldr r3, [r3, #4] + if ((pcb->remote_port == src) && + 800e1a0: 2b00 cmp r3, #0 + 800e1a2: d005 beq.n 800e1b0 + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { + 800e1a4: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1a6: 685a ldr r2, [r3, #4] + 800e1a8: 4b3f ldr r3, [pc, #252] ; (800e2a8 ) + 800e1aa: 691b ldr r3, [r3, #16] + (ip_addr_isany_val(pcb->remote_ip) || + 800e1ac: 429a cmp r2, r3 + 800e1ae: d10e bne.n 800e1ce + /* the first fully matching PCB */ + if (prev != NULL) { + 800e1b0: 6a3b ldr r3, [r7, #32] + 800e1b2: 2b00 cmp r3, #0 + 800e1b4: d014 beq.n 800e1e0 + /* move the pcb to the front of udp_pcbs so that is + found faster next time */ + prev->next = pcb->next; + 800e1b6: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1b8: 68da ldr r2, [r3, #12] + 800e1ba: 6a3b ldr r3, [r7, #32] + 800e1bc: 60da str r2, [r3, #12] + pcb->next = udp_pcbs; + 800e1be: 4b3b ldr r3, [pc, #236] ; (800e2ac ) + 800e1c0: 681a ldr r2, [r3, #0] + 800e1c2: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1c4: 60da str r2, [r3, #12] + udp_pcbs = pcb; + 800e1c6: 4a39 ldr r2, [pc, #228] ; (800e2ac ) + 800e1c8: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1ca: 6013 str r3, [r2, #0] + } else { + UDP_STATS_INC(udp.cachehit); + } + break; + 800e1cc: e008 b.n 800e1e0 + } + } + + prev = pcb; + 800e1ce: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1d0: 623b str r3, [r7, #32] + for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { + 800e1d2: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1d4: 68db ldr r3, [r3, #12] + 800e1d6: 627b str r3, [r7, #36] ; 0x24 + 800e1d8: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1da: 2b00 cmp r3, #0 + 800e1dc: d1c0 bne.n 800e160 + 800e1de: e000 b.n 800e1e2 + break; + 800e1e0: bf00 nop + } + /* no fully matching pcb found? then look for an unconnected pcb */ + if (pcb == NULL) { + 800e1e2: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1e4: 2b00 cmp r3, #0 + 800e1e6: d101 bne.n 800e1ec + pcb = uncon_pcb; + 800e1e8: 69fb ldr r3, [r7, #28] + 800e1ea: 627b str r3, [r7, #36] ; 0x24 + } + + /* Check checksum if this is a match or if it was directed at us. */ + if (pcb != NULL) { + 800e1ec: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e1ee: 2b00 cmp r3, #0 + 800e1f0: d002 beq.n 800e1f8 + for_us = 1; + 800e1f2: 2301 movs r3, #1 + 800e1f4: 76fb strb r3, [r7, #27] + 800e1f6: e00a b.n 800e20e + for_us = netif_get_ip6_addr_match(inp, ip6_current_dest_addr()) >= 0; + } +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + if (!ip_current_is_v6()) { + for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr()); + 800e1f8: 683b ldr r3, [r7, #0] + 800e1fa: 3304 adds r3, #4 + 800e1fc: 681a ldr r2, [r3, #0] + 800e1fe: 4b2a ldr r3, [pc, #168] ; (800e2a8 ) + 800e200: 695b ldr r3, [r3, #20] + 800e202: 429a cmp r2, r3 + 800e204: bf0c ite eq + 800e206: 2301 moveq r3, #1 + 800e208: 2300 movne r3, #0 + 800e20a: b2db uxtb r3, r3 + 800e20c: 76fb strb r3, [r7, #27] + } +#endif /* LWIP_IPV4 */ + } + + if (for_us) { + 800e20e: 7efb ldrb r3, [r7, #27] + 800e210: 2b00 cmp r3, #0 + 800e212: d042 beq.n 800e29a + } + } + } + } +#endif /* CHECKSUM_CHECK_UDP */ + if (pbuf_header(p, -UDP_HLEN)) { + 800e214: f06f 0107 mvn.w r1, #7 + 800e218: 6878 ldr r0, [r7, #4] + 800e21a: f7fa f86f bl 80082fc + 800e21e: 4603 mov r3, r0 + 800e220: 2b00 cmp r3, #0 + 800e222: d00a beq.n 800e23a + /* Can we cope with this failing? Just assert for now */ + LWIP_ASSERT("pbuf_header failed\n", 0); + 800e224: 4b22 ldr r3, [pc, #136] ; (800e2b0 ) + 800e226: f240 1255 movw r2, #341 ; 0x155 + 800e22a: 4922 ldr r1, [pc, #136] ; (800e2b4 ) + 800e22c: 4822 ldr r0, [pc, #136] ; (800e2b8 ) + 800e22e: f004 fda9 bl 8012d84 + UDP_STATS_INC(udp.drop); + MIB2_STATS_INC(mib2.udpinerrors); + pbuf_free(p); + 800e232: 6878 ldr r0, [r7, #4] + 800e234: f7fa f886 bl 8008344 + goto end; + 800e238: e032 b.n 800e2a0 + } + + if (pcb != NULL) { + 800e23a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e23c: 2b00 cmp r3, #0 + 800e23e: d012 beq.n 800e266 + pbuf_header(p, -hdrs_len); + } + } +#endif /* SO_REUSE && SO_REUSE_RXTOALL */ + /* callback */ + if (pcb->recv != NULL) { + 800e240: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e242: 699b ldr r3, [r3, #24] + 800e244: 2b00 cmp r3, #0 + 800e246: d00a beq.n 800e25e + /* now the recv function is responsible for freeing p */ + pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); + 800e248: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e24a: 699c ldr r4, [r3, #24] + 800e24c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800e24e: 69d8 ldr r0, [r3, #28] + 800e250: 8a3b ldrh r3, [r7, #16] + 800e252: 9300 str r3, [sp, #0] + 800e254: 4b19 ldr r3, [pc, #100] ; (800e2bc ) + 800e256: 687a ldr r2, [r7, #4] + 800e258: 6a79 ldr r1, [r7, #36] ; 0x24 + 800e25a: 47a0 blx r4 + } else { + pbuf_free(p); + } +end: + PERF_STOP("udp_input"); + return; + 800e25c: e021 b.n 800e2a2 + pbuf_free(p); + 800e25e: 6878 ldr r0, [r7, #4] + 800e260: f7fa f870 bl 8008344 + goto end; + 800e264: e01c b.n 800e2a0 + if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { + 800e266: 7cfb ldrb r3, [r7, #19] + 800e268: 2b00 cmp r3, #0 + 800e26a: d112 bne.n 800e292 + 800e26c: 4b0e ldr r3, [pc, #56] ; (800e2a8 ) + 800e26e: 695b ldr r3, [r3, #20] + 800e270: f003 03f0 and.w r3, r3, #240 ; 0xf0 + 800e274: 2be0 cmp r3, #224 ; 0xe0 + 800e276: d00c beq.n 800e292 + pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); + 800e278: 4b0b ldr r3, [pc, #44] ; (800e2a8 ) + 800e27a: 899b ldrh r3, [r3, #12] + 800e27c: 3308 adds r3, #8 + 800e27e: b29b uxth r3, r3 + 800e280: b21b sxth r3, r3 + 800e282: 4619 mov r1, r3 + 800e284: 6878 ldr r0, [r7, #4] + 800e286: f7fa f84b bl 8008320 + icmp_port_unreach(ip_current_is_v6(), p); + 800e28a: 2103 movs r1, #3 + 800e28c: 6878 ldr r0, [r7, #4] + 800e28e: f003 f917 bl 80114c0 + pbuf_free(p); + 800e292: 6878 ldr r0, [r7, #4] + 800e294: f7fa f856 bl 8008344 + return; + 800e298: e003 b.n 800e2a2 + pbuf_free(p); + 800e29a: 6878 ldr r0, [r7, #4] + 800e29c: f7fa f852 bl 8008344 + return; + 800e2a0: bf00 nop + UDP_STATS_INC(udp.drop); + MIB2_STATS_INC(mib2.udpinerrors); + pbuf_free(p); + PERF_STOP("udp_input"); +#endif /* CHECKSUM_CHECK_UDP */ +} + 800e2a2: 372c adds r7, #44 ; 0x2c + 800e2a4: 46bd mov sp, r7 + 800e2a6: bd90 pop {r4, r7, pc} + 800e2a8: 200039ec .word 0x200039ec + 800e2ac: 20006fc4 .word 0x20006fc4 + 800e2b0: 080159e8 .word 0x080159e8 + 800e2b4: 08015a18 .word 0x08015a18 + 800e2b8: 08015a2c .word 0x08015a2c + 800e2bc: 200039fc .word 0x200039fc + +0800e2c0 : + * @see udp_disconnect() udp_send() + */ +err_t +udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) +{ + 800e2c0: b580 push {r7, lr} + 800e2c2: b088 sub sp, #32 + 800e2c4: af02 add r7, sp, #8 + 800e2c6: 60f8 str r0, [r7, #12] + 800e2c8: 60b9 str r1, [r7, #8] + 800e2ca: 607a str r2, [r7, #4] + 800e2cc: 807b strh r3, [r7, #2] + u16_t chksum) +{ +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + const ip_addr_t *src_ip; + + if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + 800e2ce: 68fb ldr r3, [r7, #12] + 800e2d0: 2b00 cmp r3, #0 + 800e2d2: d002 beq.n 800e2da + 800e2d4: 687b ldr r3, [r7, #4] + 800e2d6: 2b00 cmp r3, #0 + 800e2d8: d102 bne.n 800e2e0 + return ERR_VAL; + 800e2da: f06f 0305 mvn.w r3, #5 + 800e2de: e028 b.n 800e332 +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 && LWIP_IPV6 + else +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#if LWIP_IPV4 + if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || + 800e2e0: 68fb ldr r3, [r7, #12] + 800e2e2: 2b00 cmp r3, #0 + 800e2e4: d009 beq.n 800e2fa + 800e2e6: 68fb ldr r3, [r7, #12] + 800e2e8: 681b ldr r3, [r3, #0] + 800e2ea: 2b00 cmp r3, #0 + 800e2ec: d005 beq.n 800e2fa + ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { + 800e2ee: 68fb ldr r3, [r7, #12] + 800e2f0: 681b ldr r3, [r3, #0] + 800e2f2: f003 03f0 and.w r3, r3, #240 ; 0xf0 + if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || + 800e2f6: 2be0 cmp r3, #224 ; 0xe0 + 800e2f8: d103 bne.n 800e302 + /* if the local_ip is any or multicast + * use the outgoing network interface IP address as source address */ + src_ip = netif_ip_addr4(netif); + 800e2fa: 6a3b ldr r3, [r7, #32] + 800e2fc: 3304 adds r3, #4 + 800e2fe: 617b str r3, [r7, #20] + 800e300: e00b b.n 800e31a + } else { + /* check if UDP PCB local IP address is correct + * this could be an old address if netif->ip_addr has changed */ + if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) { + 800e302: 68fb ldr r3, [r7, #12] + 800e304: 681a ldr r2, [r3, #0] + 800e306: 6a3b ldr r3, [r7, #32] + 800e308: 3304 adds r3, #4 + 800e30a: 681b ldr r3, [r3, #0] + 800e30c: 429a cmp r2, r3 + 800e30e: d002 beq.n 800e316 + /* local_ip doesn't match, drop the packet */ + return ERR_RTE; + 800e310: f06f 0303 mvn.w r3, #3 + 800e314: e00d b.n 800e332 + } + /* use UDP PCB local IP address as source address */ + src_ip = &pcb->local_ip; + 800e316: 68fb ldr r3, [r7, #12] + 800e318: 617b str r3, [r7, #20] + } +#endif /* LWIP_IPV4 */ +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP + return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum, src_ip); +#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip); + 800e31a: 887a ldrh r2, [r7, #2] + 800e31c: 697b ldr r3, [r7, #20] + 800e31e: 9301 str r3, [sp, #4] + 800e320: 6a3b ldr r3, [r7, #32] + 800e322: 9300 str r3, [sp, #0] + 800e324: 4613 mov r3, r2 + 800e326: 687a ldr r2, [r7, #4] + 800e328: 68b9 ldr r1, [r7, #8] + 800e32a: 68f8 ldr r0, [r7, #12] + 800e32c: f000 f806 bl 800e33c + 800e330: 4603 mov r3, r0 +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ +} + 800e332: 4618 mov r0, r3 + 800e334: 3718 adds r7, #24 + 800e336: 46bd mov sp, r7 + 800e338: bd80 pop {r7, pc} + ... + +0800e33c : +/** @ingroup udp_raw + * Same as @ref udp_sendto_if, but with source address */ +err_t +udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip) +{ + 800e33c: b580 push {r7, lr} + 800e33e: b08c sub sp, #48 ; 0x30 + 800e340: af04 add r7, sp, #16 + 800e342: 60f8 str r0, [r7, #12] + 800e344: 60b9 str r1, [r7, #8] + 800e346: 607a str r2, [r7, #4] + 800e348: 807b strh r3, [r7, #2] + err_t err; + struct pbuf *q; /* q will be sent down the stack */ + u8_t ip_proto; + u8_t ttl; + + if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, src_ip) || + 800e34a: 68fb ldr r3, [r7, #12] + 800e34c: 2b00 cmp r3, #0 + 800e34e: d002 beq.n 800e356 + 800e350: 687b ldr r3, [r7, #4] + 800e352: 2b00 cmp r3, #0 + 800e354: d102 bne.n 800e35c + !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + return ERR_VAL; + 800e356: f06f 0305 mvn.w r3, #5 + 800e35a: e07e b.n 800e45a + return ERR_VAL; + } +#endif /* LWIP_IPV4 && IP_SOF_BROADCAST */ + + /* if the PCB is not yet bound to a port, bind it here */ + if (pcb->local_port == 0) { + 800e35c: 68fb ldr r3, [r7, #12] + 800e35e: 8a5b ldrh r3, [r3, #18] + 800e360: 2b00 cmp r3, #0 + 800e362: d10f bne.n 800e384 + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n")); + err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); + 800e364: 68f9 ldr r1, [r7, #12] + 800e366: 68fb ldr r3, [r7, #12] + 800e368: 8a5b ldrh r3, [r3, #18] + 800e36a: 461a mov r2, r3 + 800e36c: 68f8 ldr r0, [r7, #12] + 800e36e: f000 f87f bl 800e470 + 800e372: 4603 mov r3, r0 + 800e374: 76fb strb r3, [r7, #27] + if (err != ERR_OK) { + 800e376: f997 301b ldrsb.w r3, [r7, #27] + 800e37a: 2b00 cmp r3, #0 + 800e37c: d002 beq.n 800e384 + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n")); + return err; + 800e37e: f997 301b ldrsb.w r3, [r7, #27] + 800e382: e06a b.n 800e45a + } + } + + /* not enough space to add an UDP header to first pbuf in given p chain? */ + if (pbuf_header(p, UDP_HLEN)) { + 800e384: 2108 movs r1, #8 + 800e386: 68b8 ldr r0, [r7, #8] + 800e388: f7f9 ffb8 bl 80082fc + 800e38c: 4603 mov r3, r0 + 800e38e: 2b00 cmp r3, #0 + 800e390: d014 beq.n 800e3bc + /* allocate header in a separate new pbuf */ + q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); + 800e392: 2200 movs r2, #0 + 800e394: 2108 movs r1, #8 + 800e396: 2001 movs r0, #1 + 800e398: f7f9 fc5c bl 8007c54 + 800e39c: 61f8 str r0, [r7, #28] + /* new header pbuf could not be allocated? */ + if (q == NULL) { + 800e39e: 69fb ldr r3, [r7, #28] + 800e3a0: 2b00 cmp r3, #0 + 800e3a2: d102 bne.n 800e3aa + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); + return ERR_MEM; + 800e3a4: f04f 33ff mov.w r3, #4294967295 + 800e3a8: e057 b.n 800e45a + } + if (p->tot_len != 0) { + 800e3aa: 68bb ldr r3, [r7, #8] + 800e3ac: 891b ldrh r3, [r3, #8] + 800e3ae: 2b00 cmp r3, #0 + 800e3b0: d006 beq.n 800e3c0 + /* chain header q in front of given pbuf p (only if p contains data) */ + pbuf_chain(q, p); + 800e3b2: 68b9 ldr r1, [r7, #8] + 800e3b4: 69f8 ldr r0, [r7, #28] + 800e3b6: f7fa f8e7 bl 8008588 + 800e3ba: e001 b.n 800e3c0 + LWIP_DEBUGF(UDP_DEBUG, + ("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); + } else { + /* adding space for header within p succeeded */ + /* first pbuf q equals given pbuf */ + q = p; + 800e3bc: 68bb ldr r3, [r7, #8] + 800e3be: 61fb str r3, [r7, #28] + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p)); + } + LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", + 800e3c0: 69fb ldr r3, [r7, #28] + 800e3c2: 895b ldrh r3, [r3, #10] + 800e3c4: 2b07 cmp r3, #7 + 800e3c6: d806 bhi.n 800e3d6 + 800e3c8: 4b26 ldr r3, [pc, #152] ; (800e464 ) + 800e3ca: f240 22db movw r2, #731 ; 0x2db + 800e3ce: 4926 ldr r1, [pc, #152] ; (800e468 ) + 800e3d0: 4826 ldr r0, [pc, #152] ; (800e46c ) + 800e3d2: f004 fcd7 bl 8012d84 + (q->len >= sizeof(struct udp_hdr))); + /* q now represents the packet to be sent */ + udphdr = (struct udp_hdr *)q->payload; + 800e3d6: 69fb ldr r3, [r7, #28] + 800e3d8: 685b ldr r3, [r3, #4] + 800e3da: 617b str r3, [r7, #20] + udphdr->src = lwip_htons(pcb->local_port); + 800e3dc: 68fb ldr r3, [r7, #12] + 800e3de: 8a5b ldrh r3, [r3, #18] + 800e3e0: 4618 mov r0, r3 + 800e3e2: f7f8 fe77 bl 80070d4 + 800e3e6: 4603 mov r3, r0 + 800e3e8: 461a mov r2, r3 + 800e3ea: 697b ldr r3, [r7, #20] + 800e3ec: 801a strh r2, [r3, #0] + udphdr->dest = lwip_htons(dst_port); + 800e3ee: 887b ldrh r3, [r7, #2] + 800e3f0: 4618 mov r0, r3 + 800e3f2: f7f8 fe6f bl 80070d4 + 800e3f6: 4603 mov r3, r0 + 800e3f8: 461a mov r2, r3 + 800e3fa: 697b ldr r3, [r7, #20] + 800e3fc: 805a strh r2, [r3, #2] + /* in UDP, 0 checksum means 'no checksum' */ + udphdr->chksum = 0x0000; + 800e3fe: 697b ldr r3, [r7, #20] + 800e400: 2200 movs r2, #0 + 800e402: 719a strb r2, [r3, #6] + 800e404: 2200 movs r2, #0 + 800e406: 71da strb r2, [r3, #7] + ip_proto = IP_PROTO_UDPLITE; + } else +#endif /* LWIP_UDPLITE */ + { /* UDP */ + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len)); + udphdr->len = lwip_htons(q->tot_len); + 800e408: 69fb ldr r3, [r7, #28] + 800e40a: 891b ldrh r3, [r3, #8] + 800e40c: 4618 mov r0, r3 + 800e40e: f7f8 fe61 bl 80070d4 + 800e412: 4603 mov r3, r0 + 800e414: 461a mov r2, r3 + 800e416: 697b ldr r3, [r7, #20] + 800e418: 809a strh r2, [r3, #4] + } + udphdr->chksum = udpchksum; + } + } +#endif /* CHECKSUM_GEN_UDP */ + ip_proto = IP_PROTO_UDP; + 800e41a: 2311 movs r3, #17 + 800e41c: 74fb strb r3, [r7, #19] + + /* Determine TTL to use */ +#if LWIP_MULTICAST_TX_OPTIONS + ttl = (ip_addr_ismulticast(dst_ip) ? udp_get_multicast_ttl(pcb) : pcb->ttl); +#else /* LWIP_MULTICAST_TX_OPTIONS */ + ttl = pcb->ttl; + 800e41e: 68fb ldr r3, [r7, #12] + 800e420: 7a9b ldrb r3, [r3, #10] + 800e422: 74bb strb r3, [r7, #18] + + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum)); + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto)); + /* output to IP */ + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); + 800e424: 68fb ldr r3, [r7, #12] + 800e426: 7a5b ldrb r3, [r3, #9] + 800e428: 7cb9 ldrb r1, [r7, #18] + 800e42a: 6aba ldr r2, [r7, #40] ; 0x28 + 800e42c: 9202 str r2, [sp, #8] + 800e42e: 7cfa ldrb r2, [r7, #19] + 800e430: 9201 str r2, [sp, #4] + 800e432: 9300 str r3, [sp, #0] + 800e434: 460b mov r3, r1 + 800e436: 687a ldr r2, [r7, #4] + 800e438: 6af9 ldr r1, [r7, #44] ; 0x2c + 800e43a: 69f8 ldr r0, [r7, #28] + 800e43c: f003 faba bl 80119b4 + 800e440: 4603 mov r3, r0 + 800e442: 76fb strb r3, [r7, #27] + + /* @todo: must this be increased even if error occurred? */ + MIB2_STATS_INC(mib2.udpoutdatagrams); + + /* did we chain a separate header pbuf earlier? */ + if (q != p) { + 800e444: 69fa ldr r2, [r7, #28] + 800e446: 68bb ldr r3, [r7, #8] + 800e448: 429a cmp r2, r3 + 800e44a: d004 beq.n 800e456 + /* free the header pbuf */ + pbuf_free(q); + 800e44c: 69f8 ldr r0, [r7, #28] + 800e44e: f7f9 ff79 bl 8008344 + q = NULL; + 800e452: 2300 movs r3, #0 + 800e454: 61fb str r3, [r7, #28] + /* p is still referenced by the caller, and will live on */ + } + + UDP_STATS_INC(udp.xmit); + return err; + 800e456: f997 301b ldrsb.w r3, [r7, #27] +} + 800e45a: 4618 mov r0, r3 + 800e45c: 3720 adds r7, #32 + 800e45e: 46bd mov sp, r7 + 800e460: bd80 pop {r7, pc} + 800e462: bf00 nop + 800e464: 080159e8 .word 0x080159e8 + 800e468: 08015a54 .word 0x08015a54 + 800e46c: 08015a2c .word 0x08015a2c + +0800e470 : + * + * @see udp_disconnect() + */ +err_t +udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) +{ + 800e470: b580 push {r7, lr} + 800e472: b086 sub sp, #24 + 800e474: af00 add r7, sp, #0 + 800e476: 60f8 str r0, [r7, #12] + 800e478: 60b9 str r1, [r7, #8] + 800e47a: 4613 mov r3, r2 + 800e47c: 80fb strh r3, [r7, #6] + struct udp_pcb *ipcb; + u8_t rebind; + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (ipaddr == NULL) { + 800e47e: 68bb ldr r3, [r7, #8] + 800e480: 2b00 cmp r3, #0 + 800e482: d101 bne.n 800e488 + ipaddr = IP4_ADDR_ANY; + 800e484: 4b30 ldr r3, [pc, #192] ; (800e548 ) + 800e486: 60bb str r3, [r7, #8] + } +#endif /* LWIP_IPV4 */ + + /* still need to check for ipaddr == NULL in IPv6 only case */ + if ((pcb == NULL) || (ipaddr == NULL)) { + 800e488: 68fb ldr r3, [r7, #12] + 800e48a: 2b00 cmp r3, #0 + 800e48c: d002 beq.n 800e494 + 800e48e: 68bb ldr r3, [r7, #8] + 800e490: 2b00 cmp r3, #0 + 800e492: d102 bne.n 800e49a + return ERR_VAL; + 800e494: f06f 0305 mvn.w r3, #5 + 800e498: e052 b.n 800e540 + + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = ")); + ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr); + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); + + rebind = 0; + 800e49a: 2300 movs r3, #0 + 800e49c: 74fb strb r3, [r7, #19] + /* Check for double bind and rebind of the same pcb */ + for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { + 800e49e: 4b2b ldr r3, [pc, #172] ; (800e54c ) + 800e4a0: 681b ldr r3, [r3, #0] + 800e4a2: 617b str r3, [r7, #20] + 800e4a4: e009 b.n 800e4ba + /* is this UDP PCB already on active list? */ + if (pcb == ipcb) { + 800e4a6: 68fa ldr r2, [r7, #12] + 800e4a8: 697b ldr r3, [r7, #20] + 800e4aa: 429a cmp r2, r3 + 800e4ac: d102 bne.n 800e4b4 + rebind = 1; + 800e4ae: 2301 movs r3, #1 + 800e4b0: 74fb strb r3, [r7, #19] + break; + 800e4b2: e005 b.n 800e4c0 + for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { + 800e4b4: 697b ldr r3, [r7, #20] + 800e4b6: 68db ldr r3, [r3, #12] + 800e4b8: 617b str r3, [r7, #20] + 800e4ba: 697b ldr r3, [r7, #20] + 800e4bc: 2b00 cmp r3, #0 + 800e4be: d1f2 bne.n 800e4a6 + } + } + + /* no port specified? */ + if (port == 0) { + 800e4c0: 88fb ldrh r3, [r7, #6] + 800e4c2: 2b00 cmp r3, #0 + 800e4c4: d109 bne.n 800e4da + port = udp_new_port(); + 800e4c6: f7ff fda3 bl 800e010 + 800e4ca: 4603 mov r3, r0 + 800e4cc: 80fb strh r3, [r7, #6] + if (port == 0) { + 800e4ce: 88fb ldrh r3, [r7, #6] + 800e4d0: 2b00 cmp r3, #0 + 800e4d2: d11e bne.n 800e512 + /* no more ports available in local range */ + LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); + return ERR_USE; + 800e4d4: f06f 0307 mvn.w r3, #7 + 800e4d8: e032 b.n 800e540 + } + } else { + for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { + 800e4da: 4b1c ldr r3, [pc, #112] ; (800e54c ) + 800e4dc: 681b ldr r3, [r3, #0] + 800e4de: 617b str r3, [r7, #20] + 800e4e0: e014 b.n 800e50c + if (pcb != ipcb) { + 800e4e2: 68fa ldr r2, [r7, #12] + 800e4e4: 697b ldr r3, [r7, #20] + 800e4e6: 429a cmp r2, r3 + 800e4e8: d00d beq.n 800e506 + if (!ip_get_option(pcb, SOF_REUSEADDR) || + !ip_get_option(ipcb, SOF_REUSEADDR)) +#endif /* SO_REUSE */ + { + /* port matches that of PCB in list and REUSEADDR not set -> reject */ + if ((ipcb->local_port == port) && + 800e4ea: 697b ldr r3, [r7, #20] + 800e4ec: 8a5b ldrh r3, [r3, #18] + 800e4ee: 88fa ldrh r2, [r7, #6] + 800e4f0: 429a cmp r2, r3 + 800e4f2: d108 bne.n 800e506 + /* IP address matches? */ + ip_addr_cmp(&ipcb->local_ip, ipaddr)) { + 800e4f4: 697b ldr r3, [r7, #20] + 800e4f6: 681a ldr r2, [r3, #0] + 800e4f8: 68bb ldr r3, [r7, #8] + 800e4fa: 681b ldr r3, [r3, #0] + if ((ipcb->local_port == port) && + 800e4fc: 429a cmp r2, r3 + 800e4fe: d102 bne.n 800e506 + /* other PCB already binds to this local IP and port */ + LWIP_DEBUGF(UDP_DEBUG, + ("udp_bind: local port %"U16_F" already bound by another pcb\n", port)); + return ERR_USE; + 800e500: f06f 0307 mvn.w r3, #7 + 800e504: e01c b.n 800e540 + for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { + 800e506: 697b ldr r3, [r7, #20] + 800e508: 68db ldr r3, [r3, #12] + 800e50a: 617b str r3, [r7, #20] + 800e50c: 697b ldr r3, [r7, #20] + 800e50e: 2b00 cmp r3, #0 + 800e510: d1e7 bne.n 800e4e2 + } + } + } + } + + ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); + 800e512: 68bb ldr r3, [r7, #8] + 800e514: 2b00 cmp r3, #0 + 800e516: d002 beq.n 800e51e + 800e518: 68bb ldr r3, [r7, #8] + 800e51a: 681b ldr r3, [r3, #0] + 800e51c: e000 b.n 800e520 + 800e51e: 2300 movs r3, #0 + 800e520: 68fa ldr r2, [r7, #12] + 800e522: 6013 str r3, [r2, #0] + + pcb->local_port = port; + 800e524: 68fb ldr r3, [r7, #12] + 800e526: 88fa ldrh r2, [r7, #6] + 800e528: 825a strh r2, [r3, #18] + mib2_udp_bind(pcb); + /* pcb not active yet? */ + if (rebind == 0) { + 800e52a: 7cfb ldrb r3, [r7, #19] + 800e52c: 2b00 cmp r3, #0 + 800e52e: d106 bne.n 800e53e + /* place the PCB on the active list if not already there */ + pcb->next = udp_pcbs; + 800e530: 4b06 ldr r3, [pc, #24] ; (800e54c ) + 800e532: 681a ldr r2, [r3, #0] + 800e534: 68fb ldr r3, [r7, #12] + 800e536: 60da str r2, [r3, #12] + udp_pcbs = pcb; + 800e538: 4a04 ldr r2, [pc, #16] ; (800e54c ) + 800e53a: 68fb ldr r3, [r7, #12] + 800e53c: 6013 str r3, [r2, #0] + } + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to ")); + ip_addr_debug_print(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; + 800e53e: 2300 movs r3, #0 +} + 800e540: 4618 mov r0, r3 + 800e542: 3718 adds r7, #24 + 800e544: 46bd mov sp, r7 + 800e546: bd80 pop {r7, pc} + 800e548: 08016768 .word 0x08016768 + 800e54c: 20006fc4 .word 0x20006fc4 + +0800e550 : + * + * @see udp_disconnect() + */ +err_t +udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) +{ + 800e550: b580 push {r7, lr} + 800e552: b086 sub sp, #24 + 800e554: af00 add r7, sp, #0 + 800e556: 60f8 str r0, [r7, #12] + 800e558: 60b9 str r1, [r7, #8] + 800e55a: 4613 mov r3, r2 + 800e55c: 80fb strh r3, [r7, #6] + struct udp_pcb *ipcb; + + if ((pcb == NULL) || (ipaddr == NULL)) { + 800e55e: 68fb ldr r3, [r7, #12] + 800e560: 2b00 cmp r3, #0 + 800e562: d002 beq.n 800e56a + 800e564: 68bb ldr r3, [r7, #8] + 800e566: 2b00 cmp r3, #0 + 800e568: d102 bne.n 800e570 + return ERR_VAL; + 800e56a: f06f 0305 mvn.w r3, #5 + 800e56e: e03e b.n 800e5ee + } + + if (pcb->local_port == 0) { + 800e570: 68fb ldr r3, [r7, #12] + 800e572: 8a5b ldrh r3, [r3, #18] + 800e574: 2b00 cmp r3, #0 + 800e576: d10f bne.n 800e598 + err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); + 800e578: 68f9 ldr r1, [r7, #12] + 800e57a: 68fb ldr r3, [r7, #12] + 800e57c: 8a5b ldrh r3, [r3, #18] + 800e57e: 461a mov r2, r3 + 800e580: 68f8 ldr r0, [r7, #12] + 800e582: f7ff ff75 bl 800e470 + 800e586: 4603 mov r3, r0 + 800e588: 74fb strb r3, [r7, #19] + if (err != ERR_OK) { + 800e58a: f997 3013 ldrsb.w r3, [r7, #19] + 800e58e: 2b00 cmp r3, #0 + 800e590: d002 beq.n 800e598 + return err; + 800e592: f997 3013 ldrsb.w r3, [r7, #19] + 800e596: e02a b.n 800e5ee + } + } + + ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); + 800e598: 68bb ldr r3, [r7, #8] + 800e59a: 2b00 cmp r3, #0 + 800e59c: d002 beq.n 800e5a4 + 800e59e: 68bb ldr r3, [r7, #8] + 800e5a0: 681b ldr r3, [r3, #0] + 800e5a2: e000 b.n 800e5a6 + 800e5a4: 2300 movs r3, #0 + 800e5a6: 68fa ldr r2, [r7, #12] + 800e5a8: 6053 str r3, [r2, #4] + pcb->remote_port = port; + 800e5aa: 68fb ldr r3, [r7, #12] + 800e5ac: 88fa ldrh r2, [r7, #6] + 800e5ae: 829a strh r2, [r3, #20] + pcb->flags |= UDP_FLAGS_CONNECTED; + 800e5b0: 68fb ldr r3, [r7, #12] + 800e5b2: 7c1b ldrb r3, [r3, #16] + 800e5b4: f043 0304 orr.w r3, r3, #4 + 800e5b8: b2da uxtb r2, r3 + 800e5ba: 68fb ldr r3, [r7, #12] + 800e5bc: 741a strb r2, [r3, #16] + ip_addr_debug_print(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) { + 800e5be: 4b0e ldr r3, [pc, #56] ; (800e5f8 ) + 800e5c0: 681b ldr r3, [r3, #0] + 800e5c2: 617b str r3, [r7, #20] + 800e5c4: e008 b.n 800e5d8 + if (pcb == ipcb) { + 800e5c6: 68fa ldr r2, [r7, #12] + 800e5c8: 697b ldr r3, [r7, #20] + 800e5ca: 429a cmp r2, r3 + 800e5cc: d101 bne.n 800e5d2 + /* already on the list, just return */ + return ERR_OK; + 800e5ce: 2300 movs r3, #0 + 800e5d0: e00d b.n 800e5ee + for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { + 800e5d2: 697b ldr r3, [r7, #20] + 800e5d4: 68db ldr r3, [r3, #12] + 800e5d6: 617b str r3, [r7, #20] + 800e5d8: 697b ldr r3, [r7, #20] + 800e5da: 2b00 cmp r3, #0 + 800e5dc: d1f3 bne.n 800e5c6 + } + } + /* PCB not yet on the list, add PCB now */ + pcb->next = udp_pcbs; + 800e5de: 4b06 ldr r3, [pc, #24] ; (800e5f8 ) + 800e5e0: 681a ldr r2, [r3, #0] + 800e5e2: 68fb ldr r3, [r7, #12] + 800e5e4: 60da str r2, [r3, #12] + udp_pcbs = pcb; + 800e5e6: 4a04 ldr r2, [pc, #16] ; (800e5f8 ) + 800e5e8: 68fb ldr r3, [r7, #12] + 800e5ea: 6013 str r3, [r2, #0] + return ERR_OK; + 800e5ec: 2300 movs r3, #0 +} + 800e5ee: 4618 mov r0, r3 + 800e5f0: 3718 adds r7, #24 + 800e5f2: 46bd mov sp, r7 + 800e5f4: bd80 pop {r7, pc} + 800e5f6: bf00 nop + 800e5f8: 20006fc4 .word 0x20006fc4 + +0800e5fc : + * @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) +{ + 800e5fc: b480 push {r7} + 800e5fe: b085 sub sp, #20 + 800e600: af00 add r7, sp, #0 + 800e602: 60f8 str r0, [r7, #12] + 800e604: 60b9 str r1, [r7, #8] + 800e606: 607a str r2, [r7, #4] + /* remember recv() callback and user data */ + pcb->recv = recv; + 800e608: 68fb ldr r3, [r7, #12] + 800e60a: 68ba ldr r2, [r7, #8] + 800e60c: 619a str r2, [r3, #24] + pcb->recv_arg = recv_arg; + 800e60e: 68fb ldr r3, [r7, #12] + 800e610: 687a ldr r2, [r7, #4] + 800e612: 61da str r2, [r3, #28] +} + 800e614: bf00 nop + 800e616: 3714 adds r7, #20 + 800e618: 46bd mov sp, r7 + 800e61a: bc80 pop {r7} + 800e61c: 4770 bx lr + ... + +0800e620 : + * + * @see udp_new() + */ +void +udp_remove(struct udp_pcb *pcb) +{ + 800e620: b580 push {r7, lr} + 800e622: b084 sub sp, #16 + 800e624: af00 add r7, sp, #0 + 800e626: 6078 str r0, [r7, #4] + struct udp_pcb *pcb2; + + mib2_udp_unbind(pcb); + /* pcb to be removed is first in list? */ + if (udp_pcbs == pcb) { + 800e628: 4b15 ldr r3, [pc, #84] ; (800e680 ) + 800e62a: 681b ldr r3, [r3, #0] + 800e62c: 687a ldr r2, [r7, #4] + 800e62e: 429a cmp r2, r3 + 800e630: d105 bne.n 800e63e + /* make list start at 2nd pcb */ + udp_pcbs = udp_pcbs->next; + 800e632: 4b13 ldr r3, [pc, #76] ; (800e680 ) + 800e634: 681b ldr r3, [r3, #0] + 800e636: 68db ldr r3, [r3, #12] + 800e638: 4a11 ldr r2, [pc, #68] ; (800e680 ) + 800e63a: 6013 str r3, [r2, #0] + 800e63c: e017 b.n 800e66e + /* pcb not 1st in list */ + } else { + for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { + 800e63e: 4b10 ldr r3, [pc, #64] ; (800e680 ) + 800e640: 681b ldr r3, [r3, #0] + 800e642: 60fb str r3, [r7, #12] + 800e644: e010 b.n 800e668 + /* find pcb in udp_pcbs list */ + if (pcb2->next != NULL && pcb2->next == pcb) { + 800e646: 68fb ldr r3, [r7, #12] + 800e648: 68db ldr r3, [r3, #12] + 800e64a: 2b00 cmp r3, #0 + 800e64c: d009 beq.n 800e662 + 800e64e: 68fb ldr r3, [r7, #12] + 800e650: 68db ldr r3, [r3, #12] + 800e652: 687a ldr r2, [r7, #4] + 800e654: 429a cmp r2, r3 + 800e656: d104 bne.n 800e662 + /* remove pcb from list */ + pcb2->next = pcb->next; + 800e658: 687b ldr r3, [r7, #4] + 800e65a: 68da ldr r2, [r3, #12] + 800e65c: 68fb ldr r3, [r7, #12] + 800e65e: 60da str r2, [r3, #12] + break; + 800e660: e005 b.n 800e66e + for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { + 800e662: 68fb ldr r3, [r7, #12] + 800e664: 68db ldr r3, [r3, #12] + 800e666: 60fb str r3, [r7, #12] + 800e668: 68fb ldr r3, [r7, #12] + 800e66a: 2b00 cmp r3, #0 + 800e66c: d1eb bne.n 800e646 + } + } + } + memp_free(MEMP_UDP_PCB, pcb); + 800e66e: 6879 ldr r1, [r7, #4] + 800e670: 2000 movs r0, #0 + 800e672: f7f9 f923 bl 80078bc +} + 800e676: bf00 nop + 800e678: 3710 adds r7, #16 + 800e67a: 46bd mov sp, r7 + 800e67c: bd80 pop {r7, pc} + 800e67e: bf00 nop + 800e680: 20006fc4 .word 0x20006fc4 + +0800e684 : + * + * @see udp_remove() + */ +struct udp_pcb * +udp_new(void) +{ + 800e684: b580 push {r7, lr} + 800e686: b082 sub sp, #8 + 800e688: af00 add r7, sp, #0 + struct udp_pcb *pcb; + pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); + 800e68a: 2000 movs r0, #0 + 800e68c: f7f9 f8ca bl 8007824 + 800e690: 6078 str r0, [r7, #4] + /* could allocate UDP PCB? */ + if (pcb != NULL) { + 800e692: 687b ldr r3, [r7, #4] + 800e694: 2b00 cmp r3, #0 + 800e696: d007 beq.n 800e6a8 + /* 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)); + 800e698: 2220 movs r2, #32 + 800e69a: 2100 movs r1, #0 + 800e69c: 6878 ldr r0, [r7, #4] + 800e69e: f004 fcc7 bl 8013030 + pcb->ttl = UDP_TTL; + 800e6a2: 687b ldr r3, [r7, #4] + 800e6a4: 22ff movs r2, #255 ; 0xff + 800e6a6: 729a strb r2, [r3, #10] +#if LWIP_MULTICAST_TX_OPTIONS + udp_set_multicast_ttl(pcb, UDP_TTL); +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + } + return pcb; + 800e6a8: 687b ldr r3, [r7, #4] +} + 800e6aa: 4618 mov r0, r3 + 800e6ac: 3708 adds r7, #8 + 800e6ae: 46bd mov sp, r7 + 800e6b0: bd80 pop {r7, pc} + ... + +0800e6b4 : + * + * @param old_addr IP address of the netif before change + * @param new_addr IP address of the netif after change + */ +void udp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) +{ + 800e6b4: b480 push {r7} + 800e6b6: b085 sub sp, #20 + 800e6b8: af00 add r7, sp, #0 + 800e6ba: 6078 str r0, [r7, #4] + 800e6bc: 6039 str r1, [r7, #0] + struct udp_pcb* upcb; + + if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { + 800e6be: 687b ldr r3, [r7, #4] + 800e6c0: 2b00 cmp r3, #0 + 800e6c2: d01e beq.n 800e702 + 800e6c4: 687b ldr r3, [r7, #4] + 800e6c6: 681b ldr r3, [r3, #0] + 800e6c8: 2b00 cmp r3, #0 + 800e6ca: d01a beq.n 800e702 + 800e6cc: 683b ldr r3, [r7, #0] + 800e6ce: 2b00 cmp r3, #0 + 800e6d0: d017 beq.n 800e702 + 800e6d2: 683b ldr r3, [r7, #0] + 800e6d4: 681b ldr r3, [r3, #0] + 800e6d6: 2b00 cmp r3, #0 + 800e6d8: d013 beq.n 800e702 + for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { + 800e6da: 4b0c ldr r3, [pc, #48] ; (800e70c ) + 800e6dc: 681b ldr r3, [r3, #0] + 800e6de: 60fb str r3, [r7, #12] + 800e6e0: e00c b.n 800e6fc + /* PCB bound to current local interface address? */ + if (ip_addr_cmp(&upcb->local_ip, old_addr)) { + 800e6e2: 68fb ldr r3, [r7, #12] + 800e6e4: 681a ldr r2, [r3, #0] + 800e6e6: 687b ldr r3, [r7, #4] + 800e6e8: 681b ldr r3, [r3, #0] + 800e6ea: 429a cmp r2, r3 + 800e6ec: d103 bne.n 800e6f6 + /* 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); + 800e6ee: 683b ldr r3, [r7, #0] + 800e6f0: 681a ldr r2, [r3, #0] + 800e6f2: 68fb ldr r3, [r7, #12] + 800e6f4: 601a str r2, [r3, #0] + for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { + 800e6f6: 68fb ldr r3, [r7, #12] + 800e6f8: 68db ldr r3, [r3, #12] + 800e6fa: 60fb str r3, [r7, #12] + 800e6fc: 68fb ldr r3, [r7, #12] + 800e6fe: 2b00 cmp r3, #0 + 800e700: d1ef bne.n 800e6e2 + } + } + } +} + 800e702: bf00 nop + 800e704: 3714 adds r7, #20 + 800e706: 46bd mov sp, r7 + 800e708: bc80 pop {r7} + 800e70a: 4770 bx lr + 800e70c: 20006fc4 .word 0x20006fc4 + +0800e710 : +static void dhcp_option_trailer(struct dhcp *dhcp); + +/** Ensure DHCP PCB is allocated and bound */ +static err_t +dhcp_inc_pcb_refcount(void) +{ + 800e710: b580 push {r7, lr} + 800e712: af00 add r7, sp, #0 + if (dhcp_pcb_refcount == 0) { + 800e714: 4b20 ldr r3, [pc, #128] ; (800e798 ) + 800e716: 781b ldrb r3, [r3, #0] + 800e718: 2b00 cmp r3, #0 + 800e71a: d133 bne.n 800e784 + LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); + 800e71c: 4b1f ldr r3, [pc, #124] ; (800e79c ) + 800e71e: 681b ldr r3, [r3, #0] + 800e720: 2b00 cmp r3, #0 + 800e722: d005 beq.n 800e730 + 800e724: 4b1e ldr r3, [pc, #120] ; (800e7a0 ) + 800e726: 22d9 movs r2, #217 ; 0xd9 + 800e728: 491e ldr r1, [pc, #120] ; (800e7a4 ) + 800e72a: 481f ldr r0, [pc, #124] ; (800e7a8 ) + 800e72c: f004 fb2a bl 8012d84 + + /* allocate UDP PCB */ + dhcp_pcb = udp_new(); + 800e730: f7ff ffa8 bl 800e684 + 800e734: 4603 mov r3, r0 + 800e736: 4a19 ldr r2, [pc, #100] ; (800e79c ) + 800e738: 6013 str r3, [r2, #0] + + if (dhcp_pcb == NULL) { + 800e73a: 4b18 ldr r3, [pc, #96] ; (800e79c ) + 800e73c: 681b ldr r3, [r3, #0] + 800e73e: 2b00 cmp r3, #0 + 800e740: d102 bne.n 800e748 + return ERR_MEM; + 800e742: f04f 33ff mov.w r3, #4294967295 + 800e746: e024 b.n 800e792 + } + + ip_set_option(dhcp_pcb, SOF_BROADCAST); + 800e748: 4b14 ldr r3, [pc, #80] ; (800e79c ) + 800e74a: 681b ldr r3, [r3, #0] + 800e74c: 7a1a ldrb r2, [r3, #8] + 800e74e: 4b13 ldr r3, [pc, #76] ; (800e79c ) + 800e750: 681b ldr r3, [r3, #0] + 800e752: f042 0220 orr.w r2, r2, #32 + 800e756: b2d2 uxtb r2, r2 + 800e758: 721a strb r2, [r3, #8] + + /* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */ + udp_bind(dhcp_pcb, IP4_ADDR_ANY, DHCP_CLIENT_PORT); + 800e75a: 4b10 ldr r3, [pc, #64] ; (800e79c ) + 800e75c: 681b ldr r3, [r3, #0] + 800e75e: 2244 movs r2, #68 ; 0x44 + 800e760: 4912 ldr r1, [pc, #72] ; (800e7ac ) + 800e762: 4618 mov r0, r3 + 800e764: f7ff fe84 bl 800e470 + udp_connect(dhcp_pcb, IP4_ADDR_ANY, DHCP_SERVER_PORT); + 800e768: 4b0c ldr r3, [pc, #48] ; (800e79c ) + 800e76a: 681b ldr r3, [r3, #0] + 800e76c: 2243 movs r2, #67 ; 0x43 + 800e76e: 490f ldr r1, [pc, #60] ; (800e7ac ) + 800e770: 4618 mov r0, r3 + 800e772: f7ff feed bl 800e550 + udp_recv(dhcp_pcb, dhcp_recv, NULL); + 800e776: 4b09 ldr r3, [pc, #36] ; (800e79c ) + 800e778: 681b ldr r3, [r3, #0] + 800e77a: 2200 movs r2, #0 + 800e77c: 490c ldr r1, [pc, #48] ; (800e7b0 ) + 800e77e: 4618 mov r0, r3 + 800e780: f7ff ff3c bl 800e5fc + } + + dhcp_pcb_refcount++; + 800e784: 4b04 ldr r3, [pc, #16] ; (800e798 ) + 800e786: 781b ldrb r3, [r3, #0] + 800e788: 3301 adds r3, #1 + 800e78a: b2da uxtb r2, r3 + 800e78c: 4b02 ldr r3, [pc, #8] ; (800e798 ) + 800e78e: 701a strb r2, [r3, #0] + + return ERR_OK; + 800e790: 2300 movs r3, #0 +} + 800e792: 4618 mov r0, r3 + 800e794: bd80 pop {r7, pc} + 800e796: bf00 nop + 800e798: 20006ff4 .word 0x20006ff4 + 800e79c: 20006ff0 .word 0x20006ff0 + 800e7a0: 08015a84 .word 0x08015a84 + 800e7a4: 08015abc .word 0x08015abc + 800e7a8: 08015ae4 .word 0x08015ae4 + 800e7ac: 08016768 .word 0x08016768 + 800e7b0: 0800fe6d .word 0x0800fe6d + +0800e7b4 : + +/** Free DHCP PCB if the last netif stops using it */ +static void +dhcp_dec_pcb_refcount(void) +{ + 800e7b4: b580 push {r7, lr} + 800e7b6: af00 add r7, sp, #0 + LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); + 800e7b8: 4b0e ldr r3, [pc, #56] ; (800e7f4 ) + 800e7ba: 781b ldrb r3, [r3, #0] + 800e7bc: 2b00 cmp r3, #0 + 800e7be: d105 bne.n 800e7cc + 800e7c0: 4b0d ldr r3, [pc, #52] ; (800e7f8 ) + 800e7c2: 22f3 movs r2, #243 ; 0xf3 + 800e7c4: 490d ldr r1, [pc, #52] ; (800e7fc ) + 800e7c6: 480e ldr r0, [pc, #56] ; (800e800 ) + 800e7c8: f004 fadc bl 8012d84 + dhcp_pcb_refcount--; + 800e7cc: 4b09 ldr r3, [pc, #36] ; (800e7f4 ) + 800e7ce: 781b ldrb r3, [r3, #0] + 800e7d0: 3b01 subs r3, #1 + 800e7d2: b2da uxtb r2, r3 + 800e7d4: 4b07 ldr r3, [pc, #28] ; (800e7f4 ) + 800e7d6: 701a strb r2, [r3, #0] + + if (dhcp_pcb_refcount == 0) { + 800e7d8: 4b06 ldr r3, [pc, #24] ; (800e7f4 ) + 800e7da: 781b ldrb r3, [r3, #0] + 800e7dc: 2b00 cmp r3, #0 + 800e7de: d107 bne.n 800e7f0 + udp_remove(dhcp_pcb); + 800e7e0: 4b08 ldr r3, [pc, #32] ; (800e804 ) + 800e7e2: 681b ldr r3, [r3, #0] + 800e7e4: 4618 mov r0, r3 + 800e7e6: f7ff ff1b bl 800e620 + dhcp_pcb = NULL; + 800e7ea: 4b06 ldr r3, [pc, #24] ; (800e804 ) + 800e7ec: 2200 movs r2, #0 + 800e7ee: 601a str r2, [r3, #0] + } +} + 800e7f0: bf00 nop + 800e7f2: bd80 pop {r7, pc} + 800e7f4: 20006ff4 .word 0x20006ff4 + 800e7f8: 08015a84 .word 0x08015a84 + 800e7fc: 08015b0c .word 0x08015b0c + 800e800: 08015ae4 .word 0x08015ae4 + 800e804: 20006ff0 .word 0x20006ff0 + +0800e808 : + * + * @param netif the netif under DHCP control + */ +static void +dhcp_handle_nak(struct netif *netif) +{ + 800e808: b580 push {r7, lr} + 800e80a: b084 sub sp, #16 + 800e80c: af00 add r7, sp, #0 + 800e80e: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800e810: 687b ldr r3, [r7, #4] + 800e812: 6a5b ldr r3, [r3, #36] ; 0x24 + 800e814: 60fb str r3, [r7, #12] + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", + (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + /* Change to a defined state - set this before assigning the address + to ensure the callback can use dhcp_supplied_address() */ + dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); + 800e816: 210c movs r1, #12 + 800e818: 68f8 ldr r0, [r7, #12] + 800e81a: f000 ff85 bl 800f728 + /* remove IP address from interface (must no longer be used, as per RFC2131) */ + netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); + 800e81e: 4b06 ldr r3, [pc, #24] ; (800e838 ) + 800e820: 4a05 ldr r2, [pc, #20] ; (800e838 ) + 800e822: 4905 ldr r1, [pc, #20] ; (800e838 ) + 800e824: 6878 ldr r0, [r7, #4] + 800e826: f7f9 f8d7 bl 80079d8 + /* We can immediately restart discovery */ + dhcp_discover(netif); + 800e82a: 6878 ldr r0, [r7, #4] + 800e82c: f000 fbb6 bl 800ef9c +} + 800e830: bf00 nop + 800e832: 3710 adds r7, #16 + 800e834: 46bd mov sp, r7 + 800e836: bd80 pop {r7, pc} + 800e838: 08016768 .word 0x08016768 + +0800e83c : + * + * @param netif the netif under DHCP control + */ +static void +dhcp_check(struct netif *netif) +{ + 800e83c: b580 push {r7, lr} + 800e83e: b084 sub sp, #16 + 800e840: af00 add r7, sp, #0 + 800e842: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800e844: 687b ldr r3, [r7, #4] + 800e846: 6a5b ldr r3, [r3, #36] ; 0x24 + 800e848: 60fb str r3, [r7, #12] + err_t result; + u16_t msecs; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0], + (s16_t)netif->name[1])); + dhcp_set_state(dhcp, DHCP_STATE_CHECKING); + 800e84a: 2108 movs r1, #8 + 800e84c: 68f8 ldr r0, [r7, #12] + 800e84e: f000 ff6b bl 800f728 + /* create an ARP query for the offered IP address, expecting that no host + responds, as the IP address should not be in use. */ + result = etharp_query(netif, &dhcp->offered_ip_addr, NULL); + 800e852: 68fb ldr r3, [r7, #12] + 800e854: 3328 adds r3, #40 ; 0x28 + 800e856: 2200 movs r2, #0 + 800e858: 4619 mov r1, r3 + 800e85a: 6878 ldr r0, [r7, #4] + 800e85c: f002 fb22 bl 8010ea4 + 800e860: 4603 mov r3, r0 + 800e862: 72fb strb r3, [r7, #11] + if (result != ERR_OK) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n")); + } + if (dhcp->tries < 255) { + 800e864: 68fb ldr r3, [r7, #12] + 800e866: 7a9b ldrb r3, [r3, #10] + 800e868: 2bff cmp r3, #255 ; 0xff + 800e86a: d005 beq.n 800e878 + dhcp->tries++; + 800e86c: 68fb ldr r3, [r7, #12] + 800e86e: 7a9b ldrb r3, [r3, #10] + 800e870: 3301 adds r3, #1 + 800e872: b2da uxtb r2, r3 + 800e874: 68fb ldr r3, [r7, #12] + 800e876: 729a strb r2, [r3, #10] + } + msecs = 500; + 800e878: f44f 73fa mov.w r3, #500 ; 0x1f4 + 800e87c: 813b strh r3, [r7, #8] + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + 800e87e: 893b ldrh r3, [r7, #8] + 800e880: f203 13f3 addw r3, r3, #499 ; 0x1f3 + 800e884: 4a06 ldr r2, [pc, #24] ; (800e8a0 ) + 800e886: fb82 1203 smull r1, r2, r2, r3 + 800e88a: 1152 asrs r2, r2, #5 + 800e88c: 17db asrs r3, r3, #31 + 800e88e: 1ad3 subs r3, r2, r3 + 800e890: b29a uxth r2, r3 + 800e892: 68fb ldr r3, [r7, #12] + 800e894: 82da strh r2, [r3, #22] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs)); +} + 800e896: bf00 nop + 800e898: 3710 adds r7, #16 + 800e89a: 46bd mov sp, r7 + 800e89c: bd80 pop {r7, pc} + 800e89e: bf00 nop + 800e8a0: 10624dd3 .word 0x10624dd3 + +0800e8a4 : + * + * @param netif the netif under DHCP control + */ +static void +dhcp_handle_offer(struct netif *netif) +{ + 800e8a4: b580 push {r7, lr} + 800e8a6: b084 sub sp, #16 + 800e8a8: af00 add r7, sp, #0 + 800e8aa: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800e8ac: 687b ldr r3, [r7, #4] + 800e8ae: 6a5b ldr r3, [r3, #36] ; 0x24 + 800e8b0: 60fb str r3, [r7, #12] + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", + (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + /* obtain the server address */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { + 800e8b2: 4b0c ldr r3, [pc, #48] ; (800e8e4 ) + 800e8b4: 789b ldrb r3, [r3, #2] + 800e8b6: 2b00 cmp r3, #0 + 800e8b8: d00f beq.n 800e8da + ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); + 800e8ba: 4b0b ldr r3, [pc, #44] ; (800e8e8 ) + 800e8bc: 689b ldr r3, [r3, #8] + 800e8be: 4618 mov r0, r3 + 800e8c0: f7f8 fc15 bl 80070ee + 800e8c4: 4602 mov r2, r0 + 800e8c6: 68fb ldr r3, [r7, #12] + 800e8c8: 625a str r2, [r3, #36] ; 0x24 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", + ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); + /* remember offered address */ + ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); + 800e8ca: 68fb ldr r3, [r7, #12] + 800e8cc: 685b ldr r3, [r3, #4] + 800e8ce: 691a ldr r2, [r3, #16] + 800e8d0: 68fb ldr r3, [r7, #12] + 800e8d2: 629a str r2, [r3, #40] ; 0x28 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", + ip4_addr_get_u32(&dhcp->offered_ip_addr))); + + dhcp_select(netif); + 800e8d4: 6878 ldr r0, [r7, #4] + 800e8d6: f000 f809 bl 800e8ec + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void*)netif)); + } +} + 800e8da: bf00 nop + 800e8dc: 3710 adds r7, #16 + 800e8de: 46bd mov sp, r7 + 800e8e0: bd80 pop {r7, pc} + 800e8e2: bf00 nop + 800e8e4: 20006fe8 .word 0x20006fe8 + 800e8e8: 20006fc8 .word 0x20006fc8 + +0800e8ec : + * @param netif the netif under DHCP control + * @return lwIP specific error (see error.h) + */ +static err_t +dhcp_select(struct netif *netif) +{ + 800e8ec: b580 push {r7, lr} + 800e8ee: b088 sub sp, #32 + 800e8f0: af02 add r7, sp, #8 + 800e8f2: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800e8f4: 687b ldr r3, [r7, #4] + 800e8f6: 6a5b ldr r3, [r3, #36] ; 0x24 + 800e8f8: 613b str r3, [r7, #16] + err_t result; + u16_t msecs; + u8_t i; + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + dhcp_set_state(dhcp, DHCP_STATE_REQUESTING); + 800e8fa: 2101 movs r1, #1 + 800e8fc: 6938 ldr r0, [r7, #16] + 800e8fe: f000 ff13 bl 800f728 + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + 800e902: 2203 movs r2, #3 + 800e904: 6939 ldr r1, [r7, #16] + 800e906: 6878 ldr r0, [r7, #4] + 800e908: f001 fb96 bl 8010038 + 800e90c: 4603 mov r3, r0 + 800e90e: 73fb strb r3, [r7, #15] + if (result == ERR_OK) { + 800e910: f997 300f ldrsb.w r3, [r7, #15] + 800e914: 2b00 cmp r3, #0 + 800e916: d159 bne.n 800e9cc + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + 800e918: 2202 movs r2, #2 + 800e91a: 2139 movs r1, #57 ; 0x39 + 800e91c: 6938 ldr r0, [r7, #16] + 800e91e: f000 ff1d bl 800f75c + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + 800e922: 687b ldr r3, [r7, #4] + 800e924: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800e926: 4619 mov r1, r3 + 800e928: 6938 ldr r0, [r7, #16] + 800e92a: f000 ff79 bl 800f820 + + /* MUST request the offered IP address */ + dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); + 800e92e: 2204 movs r2, #4 + 800e930: 2132 movs r1, #50 ; 0x32 + 800e932: 6938 ldr r0, [r7, #16] + 800e934: f000 ff12 bl 800f75c + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + 800e938: 693b ldr r3, [r7, #16] + 800e93a: 6a9b ldr r3, [r3, #40] ; 0x28 + 800e93c: 4618 mov r0, r3 + 800e93e: f7f8 fbd6 bl 80070ee + 800e942: 4603 mov r3, r0 + 800e944: 4619 mov r1, r3 + 800e946: 6938 ldr r0, [r7, #16] + 800e948: f000 ffa4 bl 800f894 + + dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); + 800e94c: 2204 movs r2, #4 + 800e94e: 2136 movs r1, #54 ; 0x36 + 800e950: 6938 ldr r0, [r7, #16] + 800e952: f000 ff03 bl 800f75c + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); + 800e956: 693b ldr r3, [r7, #16] + 800e958: 6a5b ldr r3, [r3, #36] ; 0x24 + 800e95a: 4618 mov r0, r3 + 800e95c: f7f8 fbc7 bl 80070ee + 800e960: 4603 mov r3, r0 + 800e962: 4619 mov r1, r3 + 800e964: 6938 ldr r0, [r7, #16] + 800e966: f000 ff95 bl 800f894 + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + 800e96a: 2203 movs r2, #3 + 800e96c: 2137 movs r1, #55 ; 0x37 + 800e96e: 6938 ldr r0, [r7, #16] + 800e970: f000 fef4 bl 800f75c + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800e974: 2300 movs r3, #0 + 800e976: 75fb strb r3, [r7, #23] + 800e978: e009 b.n 800e98e + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + 800e97a: 7dfb ldrb r3, [r7, #23] + 800e97c: 4a29 ldr r2, [pc, #164] ; (800ea24 ) + 800e97e: 5cd3 ldrb r3, [r2, r3] + 800e980: 4619 mov r1, r3 + 800e982: 6938 ldr r0, [r7, #16] + 800e984: f000 ff24 bl 800f7d0 + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800e988: 7dfb ldrb r3, [r7, #23] + 800e98a: 3301 adds r3, #1 + 800e98c: 75fb strb r3, [r7, #23] + 800e98e: 7dfb ldrb r3, [r7, #23] + 800e990: 2b02 cmp r3, #2 + 800e992: d9f2 bls.n 800e97a + +#if LWIP_NETIF_HOSTNAME + dhcp_option_hostname(dhcp, netif); +#endif /* LWIP_NETIF_HOSTNAME */ + + dhcp_option_trailer(dhcp); + 800e994: 6938 ldr r0, [r7, #16] + 800e996: f001 fcf3 bl 8010380 + /* shrink the pbuf to the actual content length */ + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + 800e99a: 693b ldr r3, [r7, #16] + 800e99c: 68da ldr r2, [r3, #12] + 800e99e: 693b ldr r3, [r7, #16] + 800e9a0: 8a9b ldrh r3, [r3, #20] + 800e9a2: 33f0 adds r3, #240 ; 0xf0 + 800e9a4: b29b uxth r3, r3 + 800e9a6: 4619 mov r1, r3 + 800e9a8: 4610 mov r0, r2 + 800e9aa: f7f9 fb57 bl 800805c + + /* send broadcast to any DHCP server */ + udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); + 800e9ae: 4b1e ldr r3, [pc, #120] ; (800ea28 ) + 800e9b0: 6818 ldr r0, [r3, #0] + 800e9b2: 693b ldr r3, [r7, #16] + 800e9b4: 68d9 ldr r1, [r3, #12] + 800e9b6: 4b1d ldr r3, [pc, #116] ; (800ea2c ) + 800e9b8: 9301 str r3, [sp, #4] + 800e9ba: 687b ldr r3, [r7, #4] + 800e9bc: 9300 str r3, [sp, #0] + 800e9be: 2343 movs r3, #67 ; 0x43 + 800e9c0: 4a1b ldr r2, [pc, #108] ; (800ea30 ) + 800e9c2: f7ff fcbb bl 800e33c + dhcp_delete_msg(dhcp); + 800e9c6: 6938 ldr r0, [r7, #16] + 800e9c8: f001 fc98 bl 80102fc + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + 800e9cc: 693b ldr r3, [r7, #16] + 800e9ce: 7a9b ldrb r3, [r3, #10] + 800e9d0: 2bff cmp r3, #255 ; 0xff + 800e9d2: d005 beq.n 800e9e0 + dhcp->tries++; + 800e9d4: 693b ldr r3, [r7, #16] + 800e9d6: 7a9b ldrb r3, [r3, #10] + 800e9d8: 3301 adds r3, #1 + 800e9da: b2da uxtb r2, r3 + 800e9dc: 693b ldr r3, [r7, #16] + 800e9de: 729a strb r2, [r3, #10] + } + msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; + 800e9e0: 693b ldr r3, [r7, #16] + 800e9e2: 7a9b ldrb r3, [r3, #10] + 800e9e4: 2b05 cmp r3, #5 + 800e9e6: d807 bhi.n 800e9f8 + 800e9e8: 693b ldr r3, [r7, #16] + 800e9ea: 7a9b ldrb r3, [r3, #10] + 800e9ec: 461a mov r2, r3 + 800e9ee: f44f 737a mov.w r3, #1000 ; 0x3e8 + 800e9f2: 4093 lsls r3, r2 + 800e9f4: b29b uxth r3, r3 + 800e9f6: e001 b.n 800e9fc + 800e9f8: f64e 2360 movw r3, #60000 ; 0xea60 + 800e9fc: 81bb strh r3, [r7, #12] + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + 800e9fe: 89bb ldrh r3, [r7, #12] + 800ea00: f203 13f3 addw r3, r3, #499 ; 0x1f3 + 800ea04: 4a0b ldr r2, [pc, #44] ; (800ea34 ) + 800ea06: fb82 1203 smull r1, r2, r2, r3 + 800ea0a: 1152 asrs r2, r2, #5 + 800ea0c: 17db asrs r3, r3, #31 + 800ea0e: 1ad3 subs r3, r2, r3 + 800ea10: b29a uxth r2, r3 + 800ea12: 693b ldr r3, [r7, #16] + 800ea14: 82da strh r2, [r3, #22] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); + return result; + 800ea16: f997 300f ldrsb.w r3, [r7, #15] +} + 800ea1a: 4618 mov r0, r3 + 800ea1c: 3718 adds r7, #24 + 800ea1e: 46bd mov sp, r7 + 800ea20: bd80 pop {r7, pc} + 800ea22: bf00 nop + 800ea24: 20000014 .word 0x20000014 + 800ea28: 20006ff0 .word 0x20006ff0 + 800ea2c: 08016768 .word 0x08016768 + 800ea30: 0801676c .word 0x0801676c + 800ea34: 10624dd3 .word 0x10624dd3 + +0800ea38 : + * The DHCP timer that checks for lease renewal/rebind timeouts. + * Must be called once a minute (see @ref DHCP_COARSE_TIMER_SECS). + */ +void +dhcp_coarse_tmr(void) +{ + 800ea38: b580 push {r7, lr} + 800ea3a: b082 sub sp, #8 + 800ea3c: af00 add r7, sp, #0 + struct netif *netif = netif_list; + 800ea3e: 4b27 ldr r3, [pc, #156] ; (800eadc ) + 800ea40: 681b ldr r3, [r3, #0] + 800ea42: 607b str r3, [r7, #4] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); + /* iterate through all network interfaces */ + while (netif != NULL) { + 800ea44: e042 b.n 800eacc + /* only act on DHCP configured interfaces */ + struct dhcp *dhcp = netif_dhcp_data(netif); + 800ea46: 687b ldr r3, [r7, #4] + 800ea48: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ea4a: 603b str r3, [r7, #0] + if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { + 800ea4c: 683b ldr r3, [r7, #0] + 800ea4e: 2b00 cmp r3, #0 + 800ea50: d039 beq.n 800eac6 + 800ea52: 683b ldr r3, [r7, #0] + 800ea54: 7a5b ldrb r3, [r3, #9] + 800ea56: 2b00 cmp r3, #0 + 800ea58: d035 beq.n 800eac6 + /* compare lease time to expire timeout */ + if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { + 800ea5a: 683b ldr r3, [r7, #0] + 800ea5c: 8c5b ldrh r3, [r3, #34] ; 0x22 + 800ea5e: 2b00 cmp r3, #0 + 800ea60: d012 beq.n 800ea88 + 800ea62: 683b ldr r3, [r7, #0] + 800ea64: 8c1b ldrh r3, [r3, #32] + 800ea66: 3301 adds r3, #1 + 800ea68: b29a uxth r2, r3 + 800ea6a: 683b ldr r3, [r7, #0] + 800ea6c: 841a strh r2, [r3, #32] + 800ea6e: 683b ldr r3, [r7, #0] + 800ea70: 8c1a ldrh r2, [r3, #32] + 800ea72: 683b ldr r3, [r7, #0] + 800ea74: 8c5b ldrh r3, [r3, #34] ; 0x22 + 800ea76: 429a cmp r2, r3 + 800ea78: d106 bne.n 800ea88 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t0 timeout\n")); + /* this clients' lease time has expired */ + dhcp_release(netif); + 800ea7a: 6878 ldr r0, [r7, #4] + 800ea7c: f000 fd94 bl 800f5a8 + dhcp_discover(netif); + 800ea80: 6878 ldr r0, [r7, #4] + 800ea82: f000 fa8b bl 800ef9c + 800ea86: e01e b.n 800eac6 + /* timer is active (non zero), and triggers (zeroes) now? */ + } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { + 800ea88: 683b ldr r3, [r7, #0] + 800ea8a: 8bdb ldrh r3, [r3, #30] + 800ea8c: 2b00 cmp r3, #0 + 800ea8e: d00b beq.n 800eaa8 + 800ea90: 683b ldr r3, [r7, #0] + 800ea92: 8bdb ldrh r3, [r3, #30] + 800ea94: 1e5a subs r2, r3, #1 + 800ea96: b291 uxth r1, r2 + 800ea98: 683a ldr r2, [r7, #0] + 800ea9a: 83d1 strh r1, [r2, #30] + 800ea9c: 2b01 cmp r3, #1 + 800ea9e: d103 bne.n 800eaa8 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n")); + /* this clients' rebind timeout triggered */ + dhcp_t2_timeout(netif); + 800eaa0: 6878 ldr r0, [r7, #4] + 800eaa2: f000 f8c6 bl 800ec32 + 800eaa6: e00e b.n 800eac6 + /* timer is active (non zero), and triggers (zeroes) now */ + } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { + 800eaa8: 683b ldr r3, [r7, #0] + 800eaaa: 8b9b ldrh r3, [r3, #28] + 800eaac: 2b00 cmp r3, #0 + 800eaae: d00a beq.n 800eac6 + 800eab0: 683b ldr r3, [r7, #0] + 800eab2: 8b9b ldrh r3, [r3, #28] + 800eab4: 1e5a subs r2, r3, #1 + 800eab6: b291 uxth r1, r2 + 800eab8: 683a ldr r2, [r7, #0] + 800eaba: 8391 strh r1, [r2, #28] + 800eabc: 2b01 cmp r3, #1 + 800eabe: d102 bne.n 800eac6 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t1 timeout\n")); + /* this clients' renewal timeout triggered */ + dhcp_t1_timeout(netif); + 800eac0: 6878 ldr r0, [r7, #4] + 800eac2: f000 f888 bl 800ebd6 + } + } + /* proceed to next netif */ + netif = netif->next; + 800eac6: 687b ldr r3, [r7, #4] + 800eac8: 681b ldr r3, [r3, #0] + 800eaca: 607b str r3, [r7, #4] + while (netif != NULL) { + 800eacc: 687b ldr r3, [r7, #4] + 800eace: 2b00 cmp r3, #0 + 800ead0: d1b9 bne.n 800ea46 + } +} + 800ead2: bf00 nop + 800ead4: bf00 nop + 800ead6: 3708 adds r7, #8 + 800ead8: 46bd mov sp, r7 + 800eada: bd80 pop {r7, pc} + 800eadc: 20006f5c .word 0x20006f5c + +0800eae0 : + * A DHCP server is expected to respond within a short period of time. + * This timer checks whether an outstanding DHCP request is timed out. + */ +void +dhcp_fine_tmr(void) +{ + 800eae0: b580 push {r7, lr} + 800eae2: b082 sub sp, #8 + 800eae4: af00 add r7, sp, #0 + struct netif *netif = netif_list; + 800eae6: 4b16 ldr r3, [pc, #88] ; (800eb40 ) + 800eae8: 681b ldr r3, [r3, #0] + 800eaea: 607b str r3, [r7, #4] + /* loop through netif's */ + while (netif != NULL) { + 800eaec: e020 b.n 800eb30 + struct dhcp *dhcp = netif_dhcp_data(netif); + 800eaee: 687b ldr r3, [r7, #4] + 800eaf0: 6a5b ldr r3, [r3, #36] ; 0x24 + 800eaf2: 603b str r3, [r7, #0] + /* only act on DHCP configured interfaces */ + if (dhcp != NULL) { + 800eaf4: 683b ldr r3, [r7, #0] + 800eaf6: 2b00 cmp r3, #0 + 800eaf8: d017 beq.n 800eb2a + /* timer is active (non zero), and is about to trigger now */ + if (dhcp->request_timeout > 1) { + 800eafa: 683b ldr r3, [r7, #0] + 800eafc: 8adb ldrh r3, [r3, #22] + 800eafe: 2b01 cmp r3, #1 + 800eb00: d906 bls.n 800eb10 + dhcp->request_timeout--; + 800eb02: 683b ldr r3, [r7, #0] + 800eb04: 8adb ldrh r3, [r3, #22] + 800eb06: 3b01 subs r3, #1 + 800eb08: b29a uxth r2, r3 + 800eb0a: 683b ldr r3, [r7, #0] + 800eb0c: 82da strh r2, [r3, #22] + 800eb0e: e00c b.n 800eb2a + } + else if (dhcp->request_timeout == 1) { + 800eb10: 683b ldr r3, [r7, #0] + 800eb12: 8adb ldrh r3, [r3, #22] + 800eb14: 2b01 cmp r3, #1 + 800eb16: d108 bne.n 800eb2a + dhcp->request_timeout--; + 800eb18: 683b ldr r3, [r7, #0] + 800eb1a: 8adb ldrh r3, [r3, #22] + 800eb1c: 3b01 subs r3, #1 + 800eb1e: b29a uxth r2, r3 + 800eb20: 683b ldr r3, [r7, #0] + 800eb22: 82da strh r2, [r3, #22] + /* { netif->dhcp->request_timeout == 0 } */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_fine_tmr(): request timeout\n")); + /* this client's request timeout triggered */ + dhcp_timeout(netif); + 800eb24: 6878 ldr r0, [r7, #4] + 800eb26: f000 f80d bl 800eb44 + } + } + /* proceed to next network interface */ + netif = netif->next; + 800eb2a: 687b ldr r3, [r7, #4] + 800eb2c: 681b ldr r3, [r3, #0] + 800eb2e: 607b str r3, [r7, #4] + while (netif != NULL) { + 800eb30: 687b ldr r3, [r7, #4] + 800eb32: 2b00 cmp r3, #0 + 800eb34: d1db bne.n 800eaee + } +} + 800eb36: bf00 nop + 800eb38: bf00 nop + 800eb3a: 3708 adds r7, #8 + 800eb3c: 46bd mov sp, r7 + 800eb3e: bd80 pop {r7, pc} + 800eb40: 20006f5c .word 0x20006f5c + +0800eb44 : + * + * @param netif the netif under DHCP control + */ +static void +dhcp_timeout(struct netif *netif) +{ + 800eb44: b580 push {r7, lr} + 800eb46: b084 sub sp, #16 + 800eb48: af00 add r7, sp, #0 + 800eb4a: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800eb4c: 687b ldr r3, [r7, #4] + 800eb4e: 6a5b ldr r3, [r3, #36] ; 0x24 + 800eb50: 60fb str r3, [r7, #12] + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); + /* back-off period has passed, or server selection timed out */ + if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) { + 800eb52: 68fb ldr r3, [r7, #12] + 800eb54: 7a5b ldrb r3, [r3, #9] + 800eb56: 2b0c cmp r3, #12 + 800eb58: d003 beq.n 800eb62 + 800eb5a: 68fb ldr r3, [r7, #12] + 800eb5c: 7a5b ldrb r3, [r3, #9] + 800eb5e: 2b06 cmp r3, #6 + 800eb60: d103 bne.n 800eb6a + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); + dhcp_discover(netif); + 800eb62: 6878 ldr r0, [r7, #4] + 800eb64: f000 fa1a bl 800ef9c + dhcp_reboot(netif); + } else { + dhcp_discover(netif); + } + } +} + 800eb68: e031 b.n 800ebce + } else if (dhcp->state == DHCP_STATE_REQUESTING) { + 800eb6a: 68fb ldr r3, [r7, #12] + 800eb6c: 7a5b ldrb r3, [r3, #9] + 800eb6e: 2b01 cmp r3, #1 + 800eb70: d10e bne.n 800eb90 + if (dhcp->tries <= 5) { + 800eb72: 68fb ldr r3, [r7, #12] + 800eb74: 7a9b ldrb r3, [r3, #10] + 800eb76: 2b05 cmp r3, #5 + 800eb78: d803 bhi.n 800eb82 + dhcp_select(netif); + 800eb7a: 6878 ldr r0, [r7, #4] + 800eb7c: f7ff feb6 bl 800e8ec +} + 800eb80: e025 b.n 800ebce + dhcp_release(netif); + 800eb82: 6878 ldr r0, [r7, #4] + 800eb84: f000 fd10 bl 800f5a8 + dhcp_discover(netif); + 800eb88: 6878 ldr r0, [r7, #4] + 800eb8a: f000 fa07 bl 800ef9c +} + 800eb8e: e01e b.n 800ebce + } else if (dhcp->state == DHCP_STATE_CHECKING) { + 800eb90: 68fb ldr r3, [r7, #12] + 800eb92: 7a5b ldrb r3, [r3, #9] + 800eb94: 2b08 cmp r3, #8 + 800eb96: d10b bne.n 800ebb0 + if (dhcp->tries <= 1) { + 800eb98: 68fb ldr r3, [r7, #12] + 800eb9a: 7a9b ldrb r3, [r3, #10] + 800eb9c: 2b01 cmp r3, #1 + 800eb9e: d803 bhi.n 800eba8 + dhcp_check(netif); + 800eba0: 6878 ldr r0, [r7, #4] + 800eba2: f7ff fe4b bl 800e83c +} + 800eba6: e012 b.n 800ebce + dhcp_bind(netif); + 800eba8: 6878 ldr r0, [r7, #4] + 800ebaa: f000 fa83 bl 800f0b4 +} + 800ebae: e00e b.n 800ebce + } else if (dhcp->state == DHCP_STATE_REBOOTING) { + 800ebb0: 68fb ldr r3, [r7, #12] + 800ebb2: 7a5b ldrb r3, [r3, #9] + 800ebb4: 2b03 cmp r3, #3 + 800ebb6: d10a bne.n 800ebce + if (dhcp->tries < REBOOT_TRIES) { + 800ebb8: 68fb ldr r3, [r7, #12] + 800ebba: 7a9b ldrb r3, [r3, #10] + 800ebbc: 2b01 cmp r3, #1 + 800ebbe: d803 bhi.n 800ebc8 + dhcp_reboot(netif); + 800ebc0: 6878 ldr r0, [r7, #4] + 800ebc2: f000 fc5d bl 800f480 +} + 800ebc6: e002 b.n 800ebce + dhcp_discover(netif); + 800ebc8: 6878 ldr r0, [r7, #4] + 800ebca: f000 f9e7 bl 800ef9c +} + 800ebce: bf00 nop + 800ebd0: 3710 adds r7, #16 + 800ebd2: 46bd mov sp, r7 + 800ebd4: bd80 pop {r7, pc} + +0800ebd6 : + * + * @param netif the netif under DHCP control + */ +static void +dhcp_t1_timeout(struct netif *netif) +{ + 800ebd6: b580 push {r7, lr} + 800ebd8: b084 sub sp, #16 + 800ebda: af00 add r7, sp, #0 + 800ebdc: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800ebde: 687b ldr r3, [r7, #4] + 800ebe0: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ebe2: 60fb str r3, [r7, #12] + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_t1_timeout()\n")); + if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || + 800ebe4: 68fb ldr r3, [r7, #12] + 800ebe6: 7a5b ldrb r3, [r3, #9] + 800ebe8: 2b01 cmp r3, #1 + 800ebea: d007 beq.n 800ebfc + 800ebec: 68fb ldr r3, [r7, #12] + 800ebee: 7a5b ldrb r3, [r3, #9] + 800ebf0: 2b0a cmp r3, #10 + 800ebf2: d003 beq.n 800ebfc + (dhcp->state == DHCP_STATE_RENEWING)) { + 800ebf4: 68fb ldr r3, [r7, #12] + 800ebf6: 7a5b ldrb r3, [r3, #9] + if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || + 800ebf8: 2b05 cmp r3, #5 + 800ebfa: d116 bne.n 800ec2a + * eventually time-out if renew tries fail. */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("dhcp_t1_timeout(): must renew\n")); + /* This slightly different to RFC2131: DHCPREQUEST will be sent from state + DHCP_STATE_RENEWING, not DHCP_STATE_BOUND */ + dhcp_renew(netif); + 800ebfc: 6878 ldr r0, [r7, #4] + 800ebfe: f000 fb33 bl 800f268 + /* Calculate next timeout */ + if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) + 800ec02: 68fb ldr r3, [r7, #12] + 800ec04: 8b5b ldrh r3, [r3, #26] + 800ec06: 461a mov r2, r3 + 800ec08: 68fb ldr r3, [r7, #12] + 800ec0a: 8c1b ldrh r3, [r3, #32] + 800ec0c: 1ad3 subs r3, r2, r3 + 800ec0e: 2b01 cmp r3, #1 + 800ec10: dd0b ble.n 800ec2a + { + dhcp->t1_renew_time = ((dhcp->t2_timeout - dhcp->lease_used) / 2); + 800ec12: 68fb ldr r3, [r7, #12] + 800ec14: 8b5b ldrh r3, [r3, #26] + 800ec16: 461a mov r2, r3 + 800ec18: 68fb ldr r3, [r7, #12] + 800ec1a: 8c1b ldrh r3, [r3, #32] + 800ec1c: 1ad3 subs r3, r2, r3 + 800ec1e: 0fda lsrs r2, r3, #31 + 800ec20: 4413 add r3, r2 + 800ec22: 105b asrs r3, r3, #1 + 800ec24: b29a uxth r2, r3 + 800ec26: 68fb ldr r3, [r7, #12] + 800ec28: 839a strh r2, [r3, #28] + } + } +} + 800ec2a: bf00 nop + 800ec2c: 3710 adds r7, #16 + 800ec2e: 46bd mov sp, r7 + 800ec30: bd80 pop {r7, pc} + +0800ec32 : + * + * @param netif the netif under DHCP control + */ +static void +dhcp_t2_timeout(struct netif *netif) +{ + 800ec32: b580 push {r7, lr} + 800ec34: b084 sub sp, #16 + 800ec36: af00 add r7, sp, #0 + 800ec38: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800ec3a: 687b ldr r3, [r7, #4] + 800ec3c: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ec3e: 60fb str r3, [r7, #12] + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout()\n")); + if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || + 800ec40: 68fb ldr r3, [r7, #12] + 800ec42: 7a5b ldrb r3, [r3, #9] + 800ec44: 2b01 cmp r3, #1 + 800ec46: d00b beq.n 800ec60 + 800ec48: 68fb ldr r3, [r7, #12] + 800ec4a: 7a5b ldrb r3, [r3, #9] + 800ec4c: 2b0a cmp r3, #10 + 800ec4e: d007 beq.n 800ec60 + (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { + 800ec50: 68fb ldr r3, [r7, #12] + 800ec52: 7a5b ldrb r3, [r3, #9] + if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || + 800ec54: 2b05 cmp r3, #5 + 800ec56: d003 beq.n 800ec60 + (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { + 800ec58: 68fb ldr r3, [r7, #12] + 800ec5a: 7a5b ldrb r3, [r3, #9] + 800ec5c: 2b04 cmp r3, #4 + 800ec5e: d116 bne.n 800ec8e + /* just retry to rebind */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("dhcp_t2_timeout(): must rebind\n")); + /* This slightly different to RFC2131: DHCPREQUEST will be sent from state + DHCP_STATE_REBINDING, not DHCP_STATE_BOUND */ + dhcp_rebind(netif); + 800ec60: 6878 ldr r0, [r7, #4] + 800ec62: f000 fb87 bl 800f374 + /* Calculate next timeout */ + if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) + 800ec66: 68fb ldr r3, [r7, #12] + 800ec68: 8c5b ldrh r3, [r3, #34] ; 0x22 + 800ec6a: 461a mov r2, r3 + 800ec6c: 68fb ldr r3, [r7, #12] + 800ec6e: 8c1b ldrh r3, [r3, #32] + 800ec70: 1ad3 subs r3, r2, r3 + 800ec72: 2b01 cmp r3, #1 + 800ec74: dd0b ble.n 800ec8e + { + dhcp->t2_rebind_time = ((dhcp->t0_timeout - dhcp->lease_used) / 2); + 800ec76: 68fb ldr r3, [r7, #12] + 800ec78: 8c5b ldrh r3, [r3, #34] ; 0x22 + 800ec7a: 461a mov r2, r3 + 800ec7c: 68fb ldr r3, [r7, #12] + 800ec7e: 8c1b ldrh r3, [r3, #32] + 800ec80: 1ad3 subs r3, r2, r3 + 800ec82: 0fda lsrs r2, r3, #31 + 800ec84: 4413 add r3, r2 + 800ec86: 105b asrs r3, r3, #1 + 800ec88: b29a uxth r2, r3 + 800ec8a: 68fb ldr r3, [r7, #12] + 800ec8c: 83da strh r2, [r3, #30] + } + } +} + 800ec8e: bf00 nop + 800ec90: 3710 adds r7, #16 + 800ec92: 46bd mov sp, r7 + 800ec94: bd80 pop {r7, pc} + ... + +0800ec98 : + * + * @param netif the netif under DHCP control + */ +static void +dhcp_handle_ack(struct netif *netif) +{ + 800ec98: b580 push {r7, lr} + 800ec9a: b084 sub sp, #16 + 800ec9c: af00 add r7, sp, #0 + 800ec9e: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800eca0: 687b ldr r3, [r7, #4] + 800eca2: 6a5b ldr r3, [r3, #36] ; 0x24 + 800eca4: 60fb str r3, [r7, #12] +#if LWIP_DHCP_GET_NTP_SRV + ip4_addr_t ntp_server_addrs[LWIP_DHCP_MAX_NTP_SERVERS]; +#endif + + /* clear options we might not get from the ACK */ + ip4_addr_set_zero(&dhcp->offered_sn_mask); + 800eca6: 68fb ldr r3, [r7, #12] + 800eca8: 2200 movs r2, #0 + 800ecaa: 62da str r2, [r3, #44] ; 0x2c + ip4_addr_set_zero(&dhcp->offered_gw_addr); + 800ecac: 68fb ldr r3, [r7, #12] + 800ecae: 2200 movs r2, #0 + 800ecb0: 631a str r2, [r3, #48] ; 0x30 +#if LWIP_DHCP_BOOTP_FILE + ip4_addr_set_zero(&dhcp->offered_si_addr); +#endif /* LWIP_DHCP_BOOTP_FILE */ + + /* lease time given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { + 800ecb2: 4b27 ldr r3, [pc, #156] ; (800ed50 ) + 800ecb4: 78db ldrb r3, [r3, #3] + 800ecb6: 2b00 cmp r3, #0 + 800ecb8: d003 beq.n 800ecc2 + /* remember offered lease time */ + dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); + 800ecba: 4b26 ldr r3, [pc, #152] ; (800ed54 ) + 800ecbc: 68da ldr r2, [r3, #12] + 800ecbe: 68fb ldr r3, [r7, #12] + 800ecc0: 635a str r2, [r3, #52] ; 0x34 + } + /* renewal period given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { + 800ecc2: 4b23 ldr r3, [pc, #140] ; (800ed50 ) + 800ecc4: 791b ldrb r3, [r3, #4] + 800ecc6: 2b00 cmp r3, #0 + 800ecc8: d004 beq.n 800ecd4 + /* remember given renewal period */ + dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); + 800ecca: 4b22 ldr r3, [pc, #136] ; (800ed54 ) + 800eccc: 691a ldr r2, [r3, #16] + 800ecce: 68fb ldr r3, [r7, #12] + 800ecd0: 639a str r2, [r3, #56] ; 0x38 + 800ecd2: e004 b.n 800ecde + } else { + /* calculate safe periods for renewal */ + dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; + 800ecd4: 68fb ldr r3, [r7, #12] + 800ecd6: 6b5b ldr r3, [r3, #52] ; 0x34 + 800ecd8: 085a lsrs r2, r3, #1 + 800ecda: 68fb ldr r3, [r7, #12] + 800ecdc: 639a str r2, [r3, #56] ; 0x38 + } + + /* renewal period given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { + 800ecde: 4b1c ldr r3, [pc, #112] ; (800ed50 ) + 800ece0: 795b ldrb r3, [r3, #5] + 800ece2: 2b00 cmp r3, #0 + 800ece4: d004 beq.n 800ecf0 + /* remember given rebind period */ + dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); + 800ece6: 4b1b ldr r3, [pc, #108] ; (800ed54 ) + 800ece8: 695a ldr r2, [r3, #20] + 800ecea: 68fb ldr r3, [r7, #12] + 800ecec: 63da str r2, [r3, #60] ; 0x3c + 800ecee: e007 b.n 800ed00 + } else { + /* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/ + dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; + 800ecf0: 68fb ldr r3, [r7, #12] + 800ecf2: 6b5a ldr r2, [r3, #52] ; 0x34 + 800ecf4: 4613 mov r3, r2 + 800ecf6: 00db lsls r3, r3, #3 + 800ecf8: 1a9b subs r3, r3, r2 + 800ecfa: 08da lsrs r2, r3, #3 + 800ecfc: 68fb ldr r3, [r7, #12] + 800ecfe: 63da str r2, [r3, #60] ; 0x3c + } + + /* (y)our internet address */ + ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); + 800ed00: 68fb ldr r3, [r7, #12] + 800ed02: 685b ldr r3, [r3, #4] + 800ed04: 691a ldr r2, [r3, #16] + 800ed06: 68fb ldr r3, [r7, #12] + 800ed08: 629a str r2, [r3, #40] ; 0x28 + boot file name copied in dhcp_parse_reply if not overloaded */ + ip4_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); +#endif /* LWIP_DHCP_BOOTP_FILE */ + + /* subnet mask given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { + 800ed0a: 4b11 ldr r3, [pc, #68] ; (800ed50 ) + 800ed0c: 799b ldrb r3, [r3, #6] + 800ed0e: 2b00 cmp r3, #0 + 800ed10: d00b beq.n 800ed2a + /* remember given subnet mask */ + ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); + 800ed12: 4b10 ldr r3, [pc, #64] ; (800ed54 ) + 800ed14: 699b ldr r3, [r3, #24] + 800ed16: 4618 mov r0, r3 + 800ed18: f7f8 f9e9 bl 80070ee + 800ed1c: 4602 mov r2, r0 + 800ed1e: 68fb ldr r3, [r7, #12] + 800ed20: 62da str r2, [r3, #44] ; 0x2c + dhcp->subnet_mask_given = 1; + 800ed22: 68fb ldr r3, [r7, #12] + 800ed24: 2201 movs r2, #1 + 800ed26: 72da strb r2, [r3, #11] + 800ed28: e002 b.n 800ed30 + } else { + dhcp->subnet_mask_given = 0; + 800ed2a: 68fb ldr r3, [r7, #12] + 800ed2c: 2200 movs r2, #0 + 800ed2e: 72da strb r2, [r3, #11] + } + + /* gateway router */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { + 800ed30: 4b07 ldr r3, [pc, #28] ; (800ed50 ) + 800ed32: 79db ldrb r3, [r3, #7] + 800ed34: 2b00 cmp r3, #0 + 800ed36: d007 beq.n 800ed48 + ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); + 800ed38: 4b06 ldr r3, [pc, #24] ; (800ed54 ) + 800ed3a: 69db ldr r3, [r3, #28] + 800ed3c: 4618 mov r0, r3 + 800ed3e: f7f8 f9d6 bl 80070ee + 800ed42: 4602 mov r2, r0 + 800ed44: 68fb ldr r3, [r7, #12] + 800ed46: 631a str r2, [r3, #48] ; 0x30 + ip_addr_t dns_addr; + ip_addr_set_ip4_u32(&dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n))); + dns_setserver(n, &dns_addr); + } +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ +} + 800ed48: bf00 nop + 800ed4a: 3710 adds r7, #16 + 800ed4c: 46bd mov sp, r7 + 800ed4e: bd80 pop {r7, pc} + 800ed50: 20006fe8 .word 0x20006fe8 + 800ed54: 20006fc8 .word 0x20006fc8 + +0800ed58 : + * - ERR_OK - No error + * - ERR_MEM - Out of memory + */ +err_t +dhcp_start(struct netif *netif) +{ + 800ed58: b580 push {r7, lr} + 800ed5a: b084 sub sp, #16 + 800ed5c: af00 add r7, sp, #0 + 800ed5e: 6078 str r0, [r7, #4] + struct dhcp *dhcp; + err_t result; + + LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); + 800ed60: 687b ldr r3, [r7, #4] + 800ed62: 2b00 cmp r3, #0 + 800ed64: d109 bne.n 800ed7a + 800ed66: 4b3c ldr r3, [pc, #240] ; (800ee58 ) + 800ed68: f240 22d6 movw r2, #726 ; 0x2d6 + 800ed6c: 493b ldr r1, [pc, #236] ; (800ee5c ) + 800ed6e: 483c ldr r0, [pc, #240] ; (800ee60 ) + 800ed70: f004 f808 bl 8012d84 + 800ed74: f06f 030f mvn.w r3, #15 + 800ed78: e069 b.n 800ee4e + LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); + 800ed7a: 687b ldr r3, [r7, #4] + 800ed7c: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 800ed80: f003 0301 and.w r3, r3, #1 + 800ed84: 2b00 cmp r3, #0 + 800ed86: d109 bne.n 800ed9c + 800ed88: 4b33 ldr r3, [pc, #204] ; (800ee58 ) + 800ed8a: f240 22d7 movw r2, #727 ; 0x2d7 + 800ed8e: 4935 ldr r1, [pc, #212] ; (800ee64 ) + 800ed90: 4833 ldr r0, [pc, #204] ; (800ee60 ) + 800ed92: f003 fff7 bl 8012d84 + 800ed96: f06f 030f mvn.w r3, #15 + 800ed9a: e058 b.n 800ee4e + dhcp = netif_dhcp_data(netif); + 800ed9c: 687b ldr r3, [r7, #4] + 800ed9e: 6a5b ldr r3, [r3, #36] ; 0x24 + 800eda0: 60fb str r3, [r7, #12] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + + /* check MTU of the netif */ + if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { + 800eda2: 687b ldr r3, [r7, #4] + 800eda4: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800eda6: f5b3 7f10 cmp.w r3, #576 ; 0x240 + 800edaa: d202 bcs.n 800edb2 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); + return ERR_MEM; + 800edac: f04f 33ff mov.w r3, #4294967295 + 800edb0: e04d b.n 800ee4e + } + + /* no DHCP client attached yet? */ + if (dhcp == NULL) { + 800edb2: 68fb ldr r3, [r7, #12] + 800edb4: 2b00 cmp r3, #0 + 800edb6: d10d bne.n 800edd4 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n")); + dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); + 800edb8: 2040 movs r0, #64 ; 0x40 + 800edba: f7f8 fbd7 bl 800756c + 800edbe: 60f8 str r0, [r7, #12] + if (dhcp == NULL) { + 800edc0: 68fb ldr r3, [r7, #12] + 800edc2: 2b00 cmp r3, #0 + 800edc4: d102 bne.n 800edcc + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); + return ERR_MEM; + 800edc6: f04f 33ff mov.w r3, #4294967295 + 800edca: e040 b.n 800ee4e + } + + /* store this dhcp client in the netif */ + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); + 800edcc: 687b ldr r3, [r7, #4] + 800edce: 68fa ldr r2, [r7, #12] + 800edd0: 625a str r2, [r3, #36] ; 0x24 + 800edd2: e01b b.n 800ee0c + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); + /* already has DHCP client attached */ + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n")); + LWIP_ASSERT("pbuf p_out wasn't freed", dhcp->p_out == NULL); + 800edd4: 68fb ldr r3, [r7, #12] + 800edd6: 68db ldr r3, [r3, #12] + 800edd8: 2b00 cmp r3, #0 + 800edda: d006 beq.n 800edea + 800eddc: 4b1e ldr r3, [pc, #120] ; (800ee58 ) + 800edde: f44f 723c mov.w r2, #752 ; 0x2f0 + 800ede2: 4921 ldr r1, [pc, #132] ; (800ee68 ) + 800ede4: 481e ldr r0, [pc, #120] ; (800ee60 ) + 800ede6: f003 ffcd bl 8012d84 + LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL ); + 800edea: 68fb ldr r3, [r7, #12] + 800edec: 685b ldr r3, [r3, #4] + 800edee: 2b00 cmp r3, #0 + 800edf0: d006 beq.n 800ee00 + 800edf2: 4b19 ldr r3, [pc, #100] ; (800ee58 ) + 800edf4: f240 22f1 movw r2, #753 ; 0x2f1 + 800edf8: 491c ldr r1, [pc, #112] ; (800ee6c ) + 800edfa: 4819 ldr r0, [pc, #100] ; (800ee60 ) + 800edfc: f003 ffc2 bl 8012d84 + + if (dhcp->pcb_allocated != 0) { + 800ee00: 68fb ldr r3, [r7, #12] + 800ee02: 7a1b ldrb r3, [r3, #8] + 800ee04: 2b00 cmp r3, #0 + 800ee06: d001 beq.n 800ee0c + dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ + 800ee08: f7ff fcd4 bl 800e7b4 + } + /* dhcp is cleared below, no need to reset flag*/ + } + + /* clear data structure */ + memset(dhcp, 0, sizeof(struct dhcp)); + 800ee0c: 2240 movs r2, #64 ; 0x40 + 800ee0e: 2100 movs r1, #0 + 800ee10: 68f8 ldr r0, [r7, #12] + 800ee12: f004 f90d bl 8013030 + /* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */ + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); + + if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ + 800ee16: f7ff fc7b bl 800e710 + 800ee1a: 4603 mov r3, r0 + 800ee1c: 2b00 cmp r3, #0 + 800ee1e: d002 beq.n 800ee26 + return ERR_MEM; + 800ee20: f04f 33ff mov.w r3, #4294967295 + 800ee24: e013 b.n 800ee4e + } + dhcp->pcb_allocated = 1; + 800ee26: 68fb ldr r3, [r7, #12] + 800ee28: 2201 movs r2, #1 + 800ee2a: 721a strb r2, [r3, #8] + } +#endif /* LWIP_DHCP_CHECK_LINK_UP */ + + + /* (re)start the DHCP negotiation */ + result = dhcp_discover(netif); + 800ee2c: 6878 ldr r0, [r7, #4] + 800ee2e: f000 f8b5 bl 800ef9c + 800ee32: 4603 mov r3, r0 + 800ee34: 72fb strb r3, [r7, #11] + if (result != ERR_OK) { + 800ee36: f997 300b ldrsb.w r3, [r7, #11] + 800ee3a: 2b00 cmp r3, #0 + 800ee3c: d005 beq.n 800ee4a + /* free resources allocated above */ + dhcp_stop(netif); + 800ee3e: 6878 ldr r0, [r7, #4] + 800ee40: f000 fc3a bl 800f6b8 + return ERR_MEM; + 800ee44: f04f 33ff mov.w r3, #4294967295 + 800ee48: e001 b.n 800ee4e + } + return result; + 800ee4a: f997 300b ldrsb.w r3, [r7, #11] +} + 800ee4e: 4618 mov r0, r3 + 800ee50: 3710 adds r7, #16 + 800ee52: 46bd mov sp, r7 + 800ee54: bd80 pop {r7, pc} + 800ee56: bf00 nop + 800ee58: 08015a84 .word 0x08015a84 + 800ee5c: 08015b30 .word 0x08015b30 + 800ee60: 08015ae4 .word 0x08015ae4 + 800ee64: 08015b74 .word 0x08015b74 + 800ee68: 08015b98 .word 0x08015b98 + 800ee6c: 08015bb0 .word 0x08015bb0 + +0800ee70 : + * @param netif the network interface on which the reply was received + * @param addr The IP address we received a reply from + */ +void +dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr) +{ + 800ee70: b580 push {r7, lr} + 800ee72: b084 sub sp, #16 + 800ee74: af00 add r7, sp, #0 + 800ee76: 6078 str r0, [r7, #4] + 800ee78: 6039 str r1, [r7, #0] + struct dhcp *dhcp; + + LWIP_ERROR("netif != NULL", (netif != NULL), return;); + 800ee7a: 687b ldr r3, [r7, #4] + 800ee7c: 2b00 cmp r3, #0 + 800ee7e: d107 bne.n 800ee90 + 800ee80: 4b0e ldr r3, [pc, #56] ; (800eebc ) + 800ee82: f240 327b movw r2, #891 ; 0x37b + 800ee86: 490e ldr r1, [pc, #56] ; (800eec0 ) + 800ee88: 480e ldr r0, [pc, #56] ; (800eec4 ) + 800ee8a: f003 ff7b bl 8012d84 + 800ee8e: e012 b.n 800eeb6 + dhcp = netif_dhcp_data(netif); + 800ee90: 687b ldr r3, [r7, #4] + 800ee92: 6a5b ldr r3, [r3, #36] ; 0x24 + 800ee94: 60fb str r3, [r7, #12] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n")); + /* is a DHCP client doing an ARP check? */ + if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) { + 800ee96: 68fb ldr r3, [r7, #12] + 800ee98: 2b00 cmp r3, #0 + 800ee9a: d00c beq.n 800eeb6 + 800ee9c: 68fb ldr r3, [r7, #12] + 800ee9e: 7a5b ldrb r3, [r3, #9] + 800eea0: 2b08 cmp r3, #8 + 800eea2: d108 bne.n 800eeb6 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n", + ip4_addr_get_u32(addr))); + /* did a host respond with the address we + were offered by the DHCP server? */ + if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) { + 800eea4: 683b ldr r3, [r7, #0] + 800eea6: 681a ldr r2, [r3, #0] + 800eea8: 68fb ldr r3, [r7, #12] + 800eeaa: 6a9b ldr r3, [r3, #40] ; 0x28 + 800eeac: 429a cmp r2, r3 + 800eeae: d102 bne.n 800eeb6 + /* we will not accept the offered address */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, + ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); + dhcp_decline(netif); + 800eeb0: 6878 ldr r0, [r7, #4] + 800eeb2: f000 f809 bl 800eec8 + } + } +} + 800eeb6: 3710 adds r7, #16 + 800eeb8: 46bd mov sp, r7 + 800eeba: bd80 pop {r7, pc} + 800eebc: 08015a84 .word 0x08015a84 + 800eec0: 08015b30 .word 0x08015b30 + 800eec4: 08015ae4 .word 0x08015ae4 + +0800eec8 : + * + * @param netif the netif under DHCP control + */ +static err_t +dhcp_decline(struct netif *netif) +{ + 800eec8: b580 push {r7, lr} + 800eeca: b086 sub sp, #24 + 800eecc: af02 add r7, sp, #8 + 800eece: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800eed0: 687b ldr r3, [r7, #4] + 800eed2: 6a5b ldr r3, [r3, #36] ; 0x24 + 800eed4: 60fb str r3, [r7, #12] + err_t result = ERR_OK; + 800eed6: 2300 movs r3, #0 + 800eed8: 72fb strb r3, [r7, #11] + u16_t msecs; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n")); + dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); + 800eeda: 210c movs r1, #12 + 800eedc: 68f8 ldr r0, [r7, #12] + 800eede: f000 fc23 bl 800f728 + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); + 800eee2: 2204 movs r2, #4 + 800eee4: 68f9 ldr r1, [r7, #12] + 800eee6: 6878 ldr r0, [r7, #4] + 800eee8: f001 f8a6 bl 8010038 + 800eeec: 4603 mov r3, r0 + 800eeee: 72fb strb r3, [r7, #11] + if (result == ERR_OK) { + 800eef0: f997 300b ldrsb.w r3, [r7, #11] + 800eef4: 2b00 cmp r3, #0 + 800eef6: d12a bne.n 800ef4e + dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); + 800eef8: 2204 movs r2, #4 + 800eefa: 2132 movs r1, #50 ; 0x32 + 800eefc: 68f8 ldr r0, [r7, #12] + 800eefe: f000 fc2d bl 800f75c + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + 800ef02: 68fb ldr r3, [r7, #12] + 800ef04: 6a9b ldr r3, [r3, #40] ; 0x28 + 800ef06: 4618 mov r0, r3 + 800ef08: f7f8 f8f1 bl 80070ee + 800ef0c: 4603 mov r3, r0 + 800ef0e: 4619 mov r1, r3 + 800ef10: 68f8 ldr r0, [r7, #12] + 800ef12: f000 fcbf bl 800f894 + + dhcp_option_trailer(dhcp); + 800ef16: 68f8 ldr r0, [r7, #12] + 800ef18: f001 fa32 bl 8010380 + /* resize pbuf to reflect true size of options */ + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + 800ef1c: 68fb ldr r3, [r7, #12] + 800ef1e: 68da ldr r2, [r3, #12] + 800ef20: 68fb ldr r3, [r7, #12] + 800ef22: 8a9b ldrh r3, [r3, #20] + 800ef24: 33f0 adds r3, #240 ; 0xf0 + 800ef26: b29b uxth r3, r3 + 800ef28: 4619 mov r1, r3 + 800ef2a: 4610 mov r0, r2 + 800ef2c: f7f9 f896 bl 800805c + + /* per section 4.4.4, broadcast DECLINE messages */ + udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); + 800ef30: 4b16 ldr r3, [pc, #88] ; (800ef8c ) + 800ef32: 6818 ldr r0, [r3, #0] + 800ef34: 68fb ldr r3, [r7, #12] + 800ef36: 68d9 ldr r1, [r3, #12] + 800ef38: 4b15 ldr r3, [pc, #84] ; (800ef90 ) + 800ef3a: 9301 str r3, [sp, #4] + 800ef3c: 687b ldr r3, [r7, #4] + 800ef3e: 9300 str r3, [sp, #0] + 800ef40: 2343 movs r3, #67 ; 0x43 + 800ef42: 4a14 ldr r2, [pc, #80] ; (800ef94 ) + 800ef44: f7ff f9fa bl 800e33c + dhcp_delete_msg(dhcp); + 800ef48: 68f8 ldr r0, [r7, #12] + 800ef4a: f001 f9d7 bl 80102fc + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("dhcp_decline: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + 800ef4e: 68fb ldr r3, [r7, #12] + 800ef50: 7a9b ldrb r3, [r3, #10] + 800ef52: 2bff cmp r3, #255 ; 0xff + 800ef54: d005 beq.n 800ef62 + dhcp->tries++; + 800ef56: 68fb ldr r3, [r7, #12] + 800ef58: 7a9b ldrb r3, [r3, #10] + 800ef5a: 3301 adds r3, #1 + 800ef5c: b2da uxtb r2, r3 + 800ef5e: 68fb ldr r3, [r7, #12] + 800ef60: 729a strb r2, [r3, #10] + } + msecs = 10*1000; + 800ef62: f242 7310 movw r3, #10000 ; 0x2710 + 800ef66: 813b strh r3, [r7, #8] + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + 800ef68: 893b ldrh r3, [r7, #8] + 800ef6a: f203 13f3 addw r3, r3, #499 ; 0x1f3 + 800ef6e: 4a0a ldr r2, [pc, #40] ; (800ef98 ) + 800ef70: fb82 1203 smull r1, r2, r2, r3 + 800ef74: 1152 asrs r2, r2, #5 + 800ef76: 17db asrs r3, r3, #31 + 800ef78: 1ad3 subs r3, r2, r3 + 800ef7a: b29a uxth r2, r3 + 800ef7c: 68fb ldr r3, [r7, #12] + 800ef7e: 82da strh r2, [r3, #22] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); + return result; + 800ef80: f997 300b ldrsb.w r3, [r7, #11] +} + 800ef84: 4618 mov r0, r3 + 800ef86: 3710 adds r7, #16 + 800ef88: 46bd mov sp, r7 + 800ef8a: bd80 pop {r7, pc} + 800ef8c: 20006ff0 .word 0x20006ff0 + 800ef90: 08016768 .word 0x08016768 + 800ef94: 0801676c .word 0x0801676c + 800ef98: 10624dd3 .word 0x10624dd3 + +0800ef9c : + * + * @param netif the netif under DHCP control + */ +static err_t +dhcp_discover(struct netif *netif) +{ + 800ef9c: b580 push {r7, lr} + 800ef9e: b088 sub sp, #32 + 800efa0: af02 add r7, sp, #8 + 800efa2: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800efa4: 687b ldr r3, [r7, #4] + 800efa6: 6a5b ldr r3, [r3, #36] ; 0x24 + 800efa8: 613b str r3, [r7, #16] + err_t result = ERR_OK; + 800efaa: 2300 movs r3, #0 + 800efac: 73fb strb r3, [r7, #15] + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); + ip4_addr_set_any(&dhcp->offered_ip_addr); + 800efae: 693b ldr r3, [r7, #16] + 800efb0: 2200 movs r2, #0 + 800efb2: 629a str r2, [r3, #40] ; 0x28 + dhcp_set_state(dhcp, DHCP_STATE_SELECTING); + 800efb4: 2106 movs r1, #6 + 800efb6: 6938 ldr r0, [r7, #16] + 800efb8: f000 fbb6 bl 800f728 + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); + 800efbc: 2201 movs r2, #1 + 800efbe: 6939 ldr r1, [r7, #16] + 800efc0: 6878 ldr r0, [r7, #4] + 800efc2: f001 f839 bl 8010038 + 800efc6: 4603 mov r3, r0 + 800efc8: 73fb strb r3, [r7, #15] + if (result == ERR_OK) { + 800efca: f997 300f ldrsb.w r3, [r7, #15] + 800efce: 2b00 cmp r3, #0 + 800efd0: d13b bne.n 800f04a + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n")); + + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + 800efd2: 2202 movs r2, #2 + 800efd4: 2139 movs r1, #57 ; 0x39 + 800efd6: 6938 ldr r0, [r7, #16] + 800efd8: f000 fbc0 bl 800f75c + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + 800efdc: 687b ldr r3, [r7, #4] + 800efde: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800efe0: 4619 mov r1, r3 + 800efe2: 6938 ldr r0, [r7, #16] + 800efe4: f000 fc1c bl 800f820 + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + 800efe8: 2203 movs r2, #3 + 800efea: 2137 movs r1, #55 ; 0x37 + 800efec: 6938 ldr r0, [r7, #16] + 800efee: f000 fbb5 bl 800f75c + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800eff2: 2300 movs r3, #0 + 800eff4: 75fb strb r3, [r7, #23] + 800eff6: e009 b.n 800f00c + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + 800eff8: 7dfb ldrb r3, [r7, #23] + 800effa: 4a29 ldr r2, [pc, #164] ; (800f0a0 ) + 800effc: 5cd3 ldrb r3, [r2, r3] + 800effe: 4619 mov r1, r3 + 800f000: 6938 ldr r0, [r7, #16] + 800f002: f000 fbe5 bl 800f7d0 + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800f006: 7dfb ldrb r3, [r7, #23] + 800f008: 3301 adds r3, #1 + 800f00a: 75fb strb r3, [r7, #23] + 800f00c: 7dfb ldrb r3, [r7, #23] + 800f00e: 2b02 cmp r3, #2 + 800f010: d9f2 bls.n 800eff8 + } + dhcp_option_trailer(dhcp); + 800f012: 6938 ldr r0, [r7, #16] + 800f014: f001 f9b4 bl 8010380 + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: realloc()ing\n")); + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + 800f018: 693b ldr r3, [r7, #16] + 800f01a: 68da ldr r2, [r3, #12] + 800f01c: 693b ldr r3, [r7, #16] + 800f01e: 8a9b ldrh r3, [r3, #20] + 800f020: 33f0 adds r3, #240 ; 0xf0 + 800f022: b29b uxth r3, r3 + 800f024: 4619 mov r1, r3 + 800f026: 4610 mov r0, r2 + 800f028: f7f9 f818 bl 800805c + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)\n")); + udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); + 800f02c: 4b1d ldr r3, [pc, #116] ; (800f0a4 ) + 800f02e: 6818 ldr r0, [r3, #0] + 800f030: 693b ldr r3, [r7, #16] + 800f032: 68d9 ldr r1, [r3, #12] + 800f034: 4b1c ldr r3, [pc, #112] ; (800f0a8 ) + 800f036: 9301 str r3, [sp, #4] + 800f038: 687b ldr r3, [r7, #4] + 800f03a: 9300 str r3, [sp, #0] + 800f03c: 2343 movs r3, #67 ; 0x43 + 800f03e: 4a1b ldr r2, [pc, #108] ; (800f0ac ) + 800f040: f7ff f97c bl 800e33c + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); + dhcp_delete_msg(dhcp); + 800f044: 6938 ldr r0, [r7, #16] + 800f046: f001 f959 bl 80102fc + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + 800f04a: 693b ldr r3, [r7, #16] + 800f04c: 7a9b ldrb r3, [r3, #10] + 800f04e: 2bff cmp r3, #255 ; 0xff + 800f050: d005 beq.n 800f05e + dhcp->tries++; + 800f052: 693b ldr r3, [r7, #16] + 800f054: 7a9b ldrb r3, [r3, #10] + 800f056: 3301 adds r3, #1 + 800f058: b2da uxtb r2, r3 + 800f05a: 693b ldr r3, [r7, #16] + 800f05c: 729a strb r2, [r3, #10] + if (dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; + autoip_start(netif); + } +#endif /* LWIP_DHCP_AUTOIP_COOP */ + msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; + 800f05e: 693b ldr r3, [r7, #16] + 800f060: 7a9b ldrb r3, [r3, #10] + 800f062: 2b05 cmp r3, #5 + 800f064: d807 bhi.n 800f076 + 800f066: 693b ldr r3, [r7, #16] + 800f068: 7a9b ldrb r3, [r3, #10] + 800f06a: 461a mov r2, r3 + 800f06c: f44f 737a mov.w r3, #1000 ; 0x3e8 + 800f070: 4093 lsls r3, r2 + 800f072: b29b uxth r3, r3 + 800f074: e001 b.n 800f07a + 800f076: f64e 2360 movw r3, #60000 ; 0xea60 + 800f07a: 81bb strh r3, [r7, #12] + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + 800f07c: 89bb ldrh r3, [r7, #12] + 800f07e: f203 13f3 addw r3, r3, #499 ; 0x1f3 + 800f082: 4a0b ldr r2, [pc, #44] ; (800f0b0 ) + 800f084: fb82 1203 smull r1, r2, r2, r3 + 800f088: 1152 asrs r2, r2, #5 + 800f08a: 17db asrs r3, r3, #31 + 800f08c: 1ad3 subs r3, r2, r3 + 800f08e: b29a uxth r2, r3 + 800f090: 693b ldr r3, [r7, #16] + 800f092: 82da strh r2, [r3, #22] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs)); + return result; + 800f094: f997 300f ldrsb.w r3, [r7, #15] +} + 800f098: 4618 mov r0, r3 + 800f09a: 3718 adds r7, #24 + 800f09c: 46bd mov sp, r7 + 800f09e: bd80 pop {r7, pc} + 800f0a0: 20000014 .word 0x20000014 + 800f0a4: 20006ff0 .word 0x20006ff0 + 800f0a8: 08016768 .word 0x08016768 + 800f0ac: 0801676c .word 0x0801676c + 800f0b0: 10624dd3 .word 0x10624dd3 + +0800f0b4 : + * + * @param netif network interface to bind to the offered address + */ +static void +dhcp_bind(struct netif *netif) +{ + 800f0b4: b580 push {r7, lr} + 800f0b6: b088 sub sp, #32 + 800f0b8: af00 add r7, sp, #0 + 800f0ba: 6078 str r0, [r7, #4] + u32_t timeout; + struct dhcp *dhcp; + ip4_addr_t sn_mask, gw_addr; + LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); + 800f0bc: 687b ldr r3, [r7, #4] + 800f0be: 2b00 cmp r3, #0 + 800f0c0: d107 bne.n 800f0d2 + 800f0c2: 4b64 ldr r3, [pc, #400] ; (800f254 ) + 800f0c4: f240 32fe movw r2, #1022 ; 0x3fe + 800f0c8: 4963 ldr r1, [pc, #396] ; (800f258 ) + 800f0ca: 4864 ldr r0, [pc, #400] ; (800f25c ) + 800f0cc: f003 fe5a bl 8012d84 + 800f0d0: e0bc b.n 800f24c + dhcp = netif_dhcp_data(netif); + 800f0d2: 687b ldr r3, [r7, #4] + 800f0d4: 6a5b ldr r3, [r3, #36] ; 0x24 + 800f0d6: 61bb str r3, [r7, #24] + LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); + 800f0d8: 69bb ldr r3, [r7, #24] + 800f0da: 2b00 cmp r3, #0 + 800f0dc: d107 bne.n 800f0ee + 800f0de: 4b5d ldr r3, [pc, #372] ; (800f254 ) + 800f0e0: f44f 6280 mov.w r2, #1024 ; 0x400 + 800f0e4: 495e ldr r1, [pc, #376] ; (800f260 ) + 800f0e6: 485d ldr r0, [pc, #372] ; (800f25c ) + 800f0e8: f003 fe4c bl 8012d84 + 800f0ec: e0ae b.n 800f24c + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + + /* reset time used of lease */ + dhcp->lease_used = 0; + 800f0ee: 69bb ldr r3, [r7, #24] + 800f0f0: 2200 movs r2, #0 + 800f0f2: 841a strh r2, [r3, #32] + + if (dhcp->offered_t0_lease != 0xffffffffUL) { + 800f0f4: 69bb ldr r3, [r7, #24] + 800f0f6: 6b5b ldr r3, [r3, #52] ; 0x34 + 800f0f8: f1b3 3fff cmp.w r3, #4294967295 + 800f0fc: d019 beq.n 800f132 + /* set renewal period timer */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease)); + timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; + 800f0fe: 69bb ldr r3, [r7, #24] + 800f100: 6b5b ldr r3, [r3, #52] ; 0x34 + 800f102: 331e adds r3, #30 + 800f104: 4a57 ldr r2, [pc, #348] ; (800f264 ) + 800f106: fba2 2303 umull r2, r3, r2, r3 + 800f10a: 095b lsrs r3, r3, #5 + 800f10c: 61fb str r3, [r7, #28] + if (timeout > 0xffff) { + 800f10e: 69fb ldr r3, [r7, #28] + 800f110: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 800f114: d302 bcc.n 800f11c + timeout = 0xffff; + 800f116: f64f 73ff movw r3, #65535 ; 0xffff + 800f11a: 61fb str r3, [r7, #28] + } + dhcp->t0_timeout = (u16_t)timeout; + 800f11c: 69fb ldr r3, [r7, #28] + 800f11e: b29a uxth r2, r3 + 800f120: 69bb ldr r3, [r7, #24] + 800f122: 845a strh r2, [r3, #34] ; 0x22 + if (dhcp->t0_timeout == 0) { + 800f124: 69bb ldr r3, [r7, #24] + 800f126: 8c5b ldrh r3, [r3, #34] ; 0x22 + 800f128: 2b00 cmp r3, #0 + 800f12a: d102 bne.n 800f132 + dhcp->t0_timeout = 1; + 800f12c: 69bb ldr r3, [r7, #24] + 800f12e: 2201 movs r2, #1 + 800f130: 845a strh r2, [r3, #34] ; 0x22 + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease*1000)); + } + + /* temporary DHCP lease? */ + if (dhcp->offered_t1_renew != 0xffffffffUL) { + 800f132: 69bb ldr r3, [r7, #24] + 800f134: 6b9b ldr r3, [r3, #56] ; 0x38 + 800f136: f1b3 3fff cmp.w r3, #4294967295 + 800f13a: d01d beq.n 800f178 + /* set renewal period timer */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew)); + timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; + 800f13c: 69bb ldr r3, [r7, #24] + 800f13e: 6b9b ldr r3, [r3, #56] ; 0x38 + 800f140: 331e adds r3, #30 + 800f142: 4a48 ldr r2, [pc, #288] ; (800f264 ) + 800f144: fba2 2303 umull r2, r3, r2, r3 + 800f148: 095b lsrs r3, r3, #5 + 800f14a: 61fb str r3, [r7, #28] + if (timeout > 0xffff) { + 800f14c: 69fb ldr r3, [r7, #28] + 800f14e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 800f152: d302 bcc.n 800f15a + timeout = 0xffff; + 800f154: f64f 73ff movw r3, #65535 ; 0xffff + 800f158: 61fb str r3, [r7, #28] + } + dhcp->t1_timeout = (u16_t)timeout; + 800f15a: 69fb ldr r3, [r7, #28] + 800f15c: b29a uxth r2, r3 + 800f15e: 69bb ldr r3, [r7, #24] + 800f160: 831a strh r2, [r3, #24] + if (dhcp->t1_timeout == 0) { + 800f162: 69bb ldr r3, [r7, #24] + 800f164: 8b1b ldrh r3, [r3, #24] + 800f166: 2b00 cmp r3, #0 + 800f168: d102 bne.n 800f170 + dhcp->t1_timeout = 1; + 800f16a: 69bb ldr r3, [r7, #24] + 800f16c: 2201 movs r2, #1 + 800f16e: 831a strh r2, [r3, #24] + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew*1000)); + dhcp->t1_renew_time = dhcp->t1_timeout; + 800f170: 69bb ldr r3, [r7, #24] + 800f172: 8b1a ldrh r2, [r3, #24] + 800f174: 69bb ldr r3, [r7, #24] + 800f176: 839a strh r2, [r3, #28] + } + /* set renewal period timer */ + if (dhcp->offered_t2_rebind != 0xffffffffUL) { + 800f178: 69bb ldr r3, [r7, #24] + 800f17a: 6bdb ldr r3, [r3, #60] ; 0x3c + 800f17c: f1b3 3fff cmp.w r3, #4294967295 + 800f180: d01d beq.n 800f1be + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind)); + timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; + 800f182: 69bb ldr r3, [r7, #24] + 800f184: 6bdb ldr r3, [r3, #60] ; 0x3c + 800f186: 331e adds r3, #30 + 800f188: 4a36 ldr r2, [pc, #216] ; (800f264 ) + 800f18a: fba2 2303 umull r2, r3, r2, r3 + 800f18e: 095b lsrs r3, r3, #5 + 800f190: 61fb str r3, [r7, #28] + if (timeout > 0xffff) { + 800f192: 69fb ldr r3, [r7, #28] + 800f194: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 800f198: d302 bcc.n 800f1a0 + timeout = 0xffff; + 800f19a: f64f 73ff movw r3, #65535 ; 0xffff + 800f19e: 61fb str r3, [r7, #28] + } + dhcp->t2_timeout = (u16_t)timeout; + 800f1a0: 69fb ldr r3, [r7, #28] + 800f1a2: b29a uxth r2, r3 + 800f1a4: 69bb ldr r3, [r7, #24] + 800f1a6: 835a strh r2, [r3, #26] + if (dhcp->t2_timeout == 0) { + 800f1a8: 69bb ldr r3, [r7, #24] + 800f1aa: 8b5b ldrh r3, [r3, #26] + 800f1ac: 2b00 cmp r3, #0 + 800f1ae: d102 bne.n 800f1b6 + dhcp->t2_timeout = 1; + 800f1b0: 69bb ldr r3, [r7, #24] + 800f1b2: 2201 movs r2, #1 + 800f1b4: 835a strh r2, [r3, #26] + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind*1000)); + dhcp->t2_rebind_time = dhcp->t2_timeout; + 800f1b6: 69bb ldr r3, [r7, #24] + 800f1b8: 8b5a ldrh r2, [r3, #26] + 800f1ba: 69bb ldr r3, [r7, #24] + 800f1bc: 83da strh r2, [r3, #30] + } + + /* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */ + if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) { + 800f1be: 69bb ldr r3, [r7, #24] + 800f1c0: 8b1a ldrh r2, [r3, #24] + 800f1c2: 69bb ldr r3, [r7, #24] + 800f1c4: 8b5b ldrh r3, [r3, #26] + 800f1c6: 429a cmp r2, r3 + 800f1c8: d306 bcc.n 800f1d8 + 800f1ca: 69bb ldr r3, [r7, #24] + 800f1cc: 8b5b ldrh r3, [r3, #26] + 800f1ce: 2b00 cmp r3, #0 + 800f1d0: d002 beq.n 800f1d8 + dhcp->t1_timeout = 0; + 800f1d2: 69bb ldr r3, [r7, #24] + 800f1d4: 2200 movs r2, #0 + 800f1d6: 831a strh r2, [r3, #24] + } + + if (dhcp->subnet_mask_given) { + 800f1d8: 69bb ldr r3, [r7, #24] + 800f1da: 7adb ldrb r3, [r3, #11] + 800f1dc: 2b00 cmp r3, #0 + 800f1de: d003 beq.n 800f1e8 + /* copy offered network mask */ + ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); + 800f1e0: 69bb ldr r3, [r7, #24] + 800f1e2: 6adb ldr r3, [r3, #44] ; 0x2c + 800f1e4: 613b str r3, [r7, #16] + 800f1e6: e014 b.n 800f212 + } else { + /* subnet mask not given, choose a safe subnet mask given the network class */ + u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); + 800f1e8: 69bb ldr r3, [r7, #24] + 800f1ea: 3328 adds r3, #40 ; 0x28 + 800f1ec: 781b ldrb r3, [r3, #0] + 800f1ee: 75fb strb r3, [r7, #23] + if (first_octet <= 127) { + 800f1f0: f997 3017 ldrsb.w r3, [r7, #23] + 800f1f4: 2b00 cmp r3, #0 + 800f1f6: db02 blt.n 800f1fe + ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); + 800f1f8: 23ff movs r3, #255 ; 0xff + 800f1fa: 613b str r3, [r7, #16] + 800f1fc: e009 b.n 800f212 + } else if (first_octet >= 192) { + 800f1fe: 7dfb ldrb r3, [r7, #23] + 800f200: 2bbf cmp r3, #191 ; 0xbf + 800f202: d903 bls.n 800f20c + ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); + 800f204: f06f 437f mvn.w r3, #4278190080 ; 0xff000000 + 800f208: 613b str r3, [r7, #16] + 800f20a: e002 b.n 800f212 + } else { + ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); + 800f20c: f64f 73ff movw r3, #65535 ; 0xffff + 800f210: 613b str r3, [r7, #16] + } + } + + ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); + 800f212: 69bb ldr r3, [r7, #24] + 800f214: 6b1b ldr r3, [r3, #48] ; 0x30 + 800f216: 60fb str r3, [r7, #12] + /* gateway address not given? */ + if (ip4_addr_isany_val(gw_addr)) { + 800f218: 68fb ldr r3, [r7, #12] + 800f21a: 2b00 cmp r3, #0 + 800f21c: d108 bne.n 800f230 + /* copy network address */ + ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); + 800f21e: 69bb ldr r3, [r7, #24] + 800f220: 6a9a ldr r2, [r3, #40] ; 0x28 + 800f222: 693b ldr r3, [r7, #16] + 800f224: 4013 ands r3, r2 + 800f226: 60fb str r3, [r7, #12] + /* use first host address on network as gateway */ + ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL)); + 800f228: 68fb ldr r3, [r7, #12] + 800f22a: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 + 800f22e: 60fb str r3, [r7, #12] + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F" SN: 0x%08"X32_F" GW: 0x%08"X32_F"\n", + ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr))); + /* netif is now bound to DHCP leased address - set this before assigning the address + to ensure the callback can use dhcp_supplied_address() */ + dhcp_set_state(dhcp, DHCP_STATE_BOUND); + 800f230: 210a movs r1, #10 + 800f232: 69b8 ldr r0, [r7, #24] + 800f234: f000 fa78 bl 800f728 + + netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); + 800f238: 69bb ldr r3, [r7, #24] + 800f23a: f103 0128 add.w r1, r3, #40 ; 0x28 + 800f23e: f107 030c add.w r3, r7, #12 + 800f242: f107 0210 add.w r2, r7, #16 + 800f246: 6878 ldr r0, [r7, #4] + 800f248: f7f8 fbc6 bl 80079d8 + /* interface is used by routing now that an address is set */ +} + 800f24c: 3720 adds r7, #32 + 800f24e: 46bd mov sp, r7 + 800f250: bd80 pop {r7, pc} + 800f252: bf00 nop + 800f254: 08015a84 .word 0x08015a84 + 800f258: 08015bc4 .word 0x08015bc4 + 800f25c: 08015ae4 .word 0x08015ae4 + 800f260: 08015be0 .word 0x08015be0 + 800f264: 88888889 .word 0x88888889 + +0800f268 : + * + * @param netif network interface which must renew its lease + */ +err_t +dhcp_renew(struct netif *netif) +{ + 800f268: b580 push {r7, lr} + 800f26a: b088 sub sp, #32 + 800f26c: af02 add r7, sp, #8 + 800f26e: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800f270: 687b ldr r3, [r7, #4] + 800f272: 6a5b ldr r3, [r3, #36] ; 0x24 + 800f274: 613b str r3, [r7, #16] + err_t result; + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); + dhcp_set_state(dhcp, DHCP_STATE_RENEWING); + 800f276: 2105 movs r1, #5 + 800f278: 6938 ldr r0, [r7, #16] + 800f27a: f000 fa55 bl 800f728 + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + 800f27e: 2203 movs r2, #3 + 800f280: 6939 ldr r1, [r7, #16] + 800f282: 6878 ldr r0, [r7, #4] + 800f284: f000 fed8 bl 8010038 + 800f288: 4603 mov r3, r0 + 800f28a: 73fb strb r3, [r7, #15] + if (result == ERR_OK) { + 800f28c: f997 300f ldrsb.w r3, [r7, #15] + 800f290: 2b00 cmp r3, #0 + 800f292: d13b bne.n 800f30c + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + 800f294: 2202 movs r2, #2 + 800f296: 2139 movs r1, #57 ; 0x39 + 800f298: 6938 ldr r0, [r7, #16] + 800f29a: f000 fa5f bl 800f75c + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + 800f29e: 687b ldr r3, [r7, #4] + 800f2a0: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800f2a2: 4619 mov r1, r3 + 800f2a4: 6938 ldr r0, [r7, #16] + 800f2a6: f000 fabb bl 800f820 + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + 800f2aa: 2203 movs r2, #3 + 800f2ac: 2137 movs r1, #55 ; 0x37 + 800f2ae: 6938 ldr r0, [r7, #16] + 800f2b0: f000 fa54 bl 800f75c + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800f2b4: 2300 movs r3, #0 + 800f2b6: 75fb strb r3, [r7, #23] + 800f2b8: e009 b.n 800f2ce + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + 800f2ba: 7dfb ldrb r3, [r7, #23] + 800f2bc: 4a2a ldr r2, [pc, #168] ; (800f368 ) + 800f2be: 5cd3 ldrb r3, [r2, r3] + 800f2c0: 4619 mov r1, r3 + 800f2c2: 6938 ldr r0, [r7, #16] + 800f2c4: f000 fa84 bl 800f7d0 + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800f2c8: 7dfb ldrb r3, [r7, #23] + 800f2ca: 3301 adds r3, #1 + 800f2cc: 75fb strb r3, [r7, #23] + 800f2ce: 7dfb ldrb r3, [r7, #23] + 800f2d0: 2b02 cmp r3, #2 + 800f2d2: d9f2 bls.n 800f2ba +#if LWIP_NETIF_HOSTNAME + dhcp_option_hostname(dhcp, netif); +#endif /* LWIP_NETIF_HOSTNAME */ + + /* append DHCP message trailer */ + dhcp_option_trailer(dhcp); + 800f2d4: 6938 ldr r0, [r7, #16] + 800f2d6: f001 f853 bl 8010380 + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + 800f2da: 693b ldr r3, [r7, #16] + 800f2dc: 68da ldr r2, [r3, #12] + 800f2de: 693b ldr r3, [r7, #16] + 800f2e0: 8a9b ldrh r3, [r3, #20] + 800f2e2: 33f0 adds r3, #240 ; 0xf0 + 800f2e4: b29b uxth r3, r3 + 800f2e6: 4619 mov r1, r3 + 800f2e8: 4610 mov r0, r2 + 800f2ea: f7f8 feb7 bl 800805c + + udp_sendto_if(dhcp_pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); + 800f2ee: 4b1f ldr r3, [pc, #124] ; (800f36c ) + 800f2f0: 6818 ldr r0, [r3, #0] + 800f2f2: 693b ldr r3, [r7, #16] + 800f2f4: 68d9 ldr r1, [r3, #12] + 800f2f6: 693b ldr r3, [r7, #16] + 800f2f8: f103 0224 add.w r2, r3, #36 ; 0x24 + 800f2fc: 687b ldr r3, [r7, #4] + 800f2fe: 9300 str r3, [sp, #0] + 800f300: 2343 movs r3, #67 ; 0x43 + 800f302: f7fe ffdd bl 800e2c0 + dhcp_delete_msg(dhcp); + 800f306: 6938 ldr r0, [r7, #16] + 800f308: f000 fff8 bl 80102fc + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + 800f30c: 693b ldr r3, [r7, #16] + 800f30e: 7a9b ldrb r3, [r3, #10] + 800f310: 2bff cmp r3, #255 ; 0xff + 800f312: d005 beq.n 800f320 + dhcp->tries++; + 800f314: 693b ldr r3, [r7, #16] + 800f316: 7a9b ldrb r3, [r3, #10] + 800f318: 3301 adds r3, #1 + 800f31a: b2da uxtb r2, r3 + 800f31c: 693b ldr r3, [r7, #16] + 800f31e: 729a strb r2, [r3, #10] + } + /* back-off on retries, but to a maximum of 20 seconds */ + msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; + 800f320: 693b ldr r3, [r7, #16] + 800f322: 7a9b ldrb r3, [r3, #10] + 800f324: 2b09 cmp r3, #9 + 800f326: d80a bhi.n 800f33e + 800f328: 693b ldr r3, [r7, #16] + 800f32a: 7a9b ldrb r3, [r3, #10] + 800f32c: b29b uxth r3, r3 + 800f32e: 461a mov r2, r3 + 800f330: 0152 lsls r2, r2, #5 + 800f332: 1ad2 subs r2, r2, r3 + 800f334: 0092 lsls r2, r2, #2 + 800f336: 4413 add r3, r2 + 800f338: 011b lsls r3, r3, #4 + 800f33a: b29b uxth r3, r3 + 800f33c: e001 b.n 800f342 + 800f33e: f644 6320 movw r3, #20000 ; 0x4e20 + 800f342: 81bb strh r3, [r7, #12] + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + 800f344: 89bb ldrh r3, [r7, #12] + 800f346: f203 13f3 addw r3, r3, #499 ; 0x1f3 + 800f34a: 4a09 ldr r2, [pc, #36] ; (800f370 ) + 800f34c: fb82 1203 smull r1, r2, r2, r3 + 800f350: 1152 asrs r2, r2, #5 + 800f352: 17db asrs r3, r3, #31 + 800f354: 1ad3 subs r3, r2, r3 + 800f356: b29a uxth r2, r3 + 800f358: 693b ldr r3, [r7, #16] + 800f35a: 82da strh r2, [r3, #22] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs)); + return result; + 800f35c: f997 300f ldrsb.w r3, [r7, #15] +} + 800f360: 4618 mov r0, r3 + 800f362: 3718 adds r7, #24 + 800f364: 46bd mov sp, r7 + 800f366: bd80 pop {r7, pc} + 800f368: 20000014 .word 0x20000014 + 800f36c: 20006ff0 .word 0x20006ff0 + 800f370: 10624dd3 .word 0x10624dd3 + +0800f374 : + * + * @param netif network interface which must rebind with a DHCP server + */ +static err_t +dhcp_rebind(struct netif *netif) +{ + 800f374: b580 push {r7, lr} + 800f376: b088 sub sp, #32 + 800f378: af02 add r7, sp, #8 + 800f37a: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800f37c: 687b ldr r3, [r7, #4] + 800f37e: 6a5b ldr r3, [r3, #36] ; 0x24 + 800f380: 613b str r3, [r7, #16] + err_t result; + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n")); + dhcp_set_state(dhcp, DHCP_STATE_REBINDING); + 800f382: 2104 movs r1, #4 + 800f384: 6938 ldr r0, [r7, #16] + 800f386: f000 f9cf bl 800f728 + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + 800f38a: 2203 movs r2, #3 + 800f38c: 6939 ldr r1, [r7, #16] + 800f38e: 6878 ldr r0, [r7, #4] + 800f390: f000 fe52 bl 8010038 + 800f394: 4603 mov r3, r0 + 800f396: 73fb strb r3, [r7, #15] + if (result == ERR_OK) { + 800f398: f997 300f ldrsb.w r3, [r7, #15] + 800f39c: 2b00 cmp r3, #0 + 800f39e: d139 bne.n 800f414 + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + 800f3a0: 2202 movs r2, #2 + 800f3a2: 2139 movs r1, #57 ; 0x39 + 800f3a4: 6938 ldr r0, [r7, #16] + 800f3a6: f000 f9d9 bl 800f75c + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + 800f3aa: 687b ldr r3, [r7, #4] + 800f3ac: 8d5b ldrh r3, [r3, #42] ; 0x2a + 800f3ae: 4619 mov r1, r3 + 800f3b0: 6938 ldr r0, [r7, #16] + 800f3b2: f000 fa35 bl 800f820 + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + 800f3b6: 2203 movs r2, #3 + 800f3b8: 2137 movs r1, #55 ; 0x37 + 800f3ba: 6938 ldr r0, [r7, #16] + 800f3bc: f000 f9ce bl 800f75c + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800f3c0: 2300 movs r3, #0 + 800f3c2: 75fb strb r3, [r7, #23] + 800f3c4: e009 b.n 800f3da + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + 800f3c6: 7dfb ldrb r3, [r7, #23] + 800f3c8: 4a29 ldr r2, [pc, #164] ; (800f470 ) + 800f3ca: 5cd3 ldrb r3, [r2, r3] + 800f3cc: 4619 mov r1, r3 + 800f3ce: 6938 ldr r0, [r7, #16] + 800f3d0: f000 f9fe bl 800f7d0 + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800f3d4: 7dfb ldrb r3, [r7, #23] + 800f3d6: 3301 adds r3, #1 + 800f3d8: 75fb strb r3, [r7, #23] + 800f3da: 7dfb ldrb r3, [r7, #23] + 800f3dc: 2b02 cmp r3, #2 + 800f3de: d9f2 bls.n 800f3c6 + +#if LWIP_NETIF_HOSTNAME + dhcp_option_hostname(dhcp, netif); +#endif /* LWIP_NETIF_HOSTNAME */ + + dhcp_option_trailer(dhcp); + 800f3e0: 6938 ldr r0, [r7, #16] + 800f3e2: f000 ffcd bl 8010380 + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + 800f3e6: 693b ldr r3, [r7, #16] + 800f3e8: 68da ldr r2, [r3, #12] + 800f3ea: 693b ldr r3, [r7, #16] + 800f3ec: 8a9b ldrh r3, [r3, #20] + 800f3ee: 33f0 adds r3, #240 ; 0xf0 + 800f3f0: b29b uxth r3, r3 + 800f3f2: 4619 mov r1, r3 + 800f3f4: 4610 mov r0, r2 + 800f3f6: f7f8 fe31 bl 800805c + + /* broadcast to server */ + udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); + 800f3fa: 4b1e ldr r3, [pc, #120] ; (800f474 ) + 800f3fc: 6818 ldr r0, [r3, #0] + 800f3fe: 693b ldr r3, [r7, #16] + 800f400: 68d9 ldr r1, [r3, #12] + 800f402: 687b ldr r3, [r7, #4] + 800f404: 9300 str r3, [sp, #0] + 800f406: 2343 movs r3, #67 ; 0x43 + 800f408: 4a1b ldr r2, [pc, #108] ; (800f478 ) + 800f40a: f7fe ff59 bl 800e2c0 + dhcp_delete_msg(dhcp); + 800f40e: 6938 ldr r0, [r7, #16] + 800f410: f000 ff74 bl 80102fc + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + 800f414: 693b ldr r3, [r7, #16] + 800f416: 7a9b ldrb r3, [r3, #10] + 800f418: 2bff cmp r3, #255 ; 0xff + 800f41a: d005 beq.n 800f428 + dhcp->tries++; + 800f41c: 693b ldr r3, [r7, #16] + 800f41e: 7a9b ldrb r3, [r3, #10] + 800f420: 3301 adds r3, #1 + 800f422: b2da uxtb r2, r3 + 800f424: 693b ldr r3, [r7, #16] + 800f426: 729a strb r2, [r3, #10] + } + msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; + 800f428: 693b ldr r3, [r7, #16] + 800f42a: 7a9b ldrb r3, [r3, #10] + 800f42c: 2b09 cmp r3, #9 + 800f42e: d80a bhi.n 800f446 + 800f430: 693b ldr r3, [r7, #16] + 800f432: 7a9b ldrb r3, [r3, #10] + 800f434: b29b uxth r3, r3 + 800f436: 461a mov r2, r3 + 800f438: 0152 lsls r2, r2, #5 + 800f43a: 1ad2 subs r2, r2, r3 + 800f43c: 0092 lsls r2, r2, #2 + 800f43e: 4413 add r3, r2 + 800f440: 00db lsls r3, r3, #3 + 800f442: b29b uxth r3, r3 + 800f444: e001 b.n 800f44a + 800f446: f242 7310 movw r3, #10000 ; 0x2710 + 800f44a: 81bb strh r3, [r7, #12] + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + 800f44c: 89bb ldrh r3, [r7, #12] + 800f44e: f203 13f3 addw r3, r3, #499 ; 0x1f3 + 800f452: 4a0a ldr r2, [pc, #40] ; (800f47c ) + 800f454: fb82 1203 smull r1, r2, r2, r3 + 800f458: 1152 asrs r2, r2, #5 + 800f45a: 17db asrs r3, r3, #31 + 800f45c: 1ad3 subs r3, r2, r3 + 800f45e: b29a uxth r2, r3 + 800f460: 693b ldr r3, [r7, #16] + 800f462: 82da strh r2, [r3, #22] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs)); + return result; + 800f464: f997 300f ldrsb.w r3, [r7, #15] +} + 800f468: 4618 mov r0, r3 + 800f46a: 3718 adds r7, #24 + 800f46c: 46bd mov sp, r7 + 800f46e: bd80 pop {r7, pc} + 800f470: 20000014 .word 0x20000014 + 800f474: 20006ff0 .word 0x20006ff0 + 800f478: 0801676c .word 0x0801676c + 800f47c: 10624dd3 .word 0x10624dd3 + +0800f480 : + * + * @param netif network interface which must reboot + */ +static err_t +dhcp_reboot(struct netif *netif) +{ + 800f480: b580 push {r7, lr} + 800f482: b088 sub sp, #32 + 800f484: af02 add r7, sp, #8 + 800f486: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800f488: 687b ldr r3, [r7, #4] + 800f48a: 6a5b ldr r3, [r3, #36] ; 0x24 + 800f48c: 613b str r3, [r7, #16] + err_t result; + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); + dhcp_set_state(dhcp, DHCP_STATE_REBOOTING); + 800f48e: 2103 movs r1, #3 + 800f490: 6938 ldr r0, [r7, #16] + 800f492: f000 f949 bl 800f728 + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + 800f496: 2203 movs r2, #3 + 800f498: 6939 ldr r1, [r7, #16] + 800f49a: 6878 ldr r0, [r7, #4] + 800f49c: f000 fdcc bl 8010038 + 800f4a0: 4603 mov r3, r0 + 800f4a2: 73fb strb r3, [r7, #15] + if (result == ERR_OK) { + 800f4a4: f997 300f ldrsb.w r3, [r7, #15] + 800f4a8: 2b00 cmp r3, #0 + 800f4aa: d147 bne.n 800f53c + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + 800f4ac: 2202 movs r2, #2 + 800f4ae: 2139 movs r1, #57 ; 0x39 + 800f4b0: 6938 ldr r0, [r7, #16] + 800f4b2: f000 f953 bl 800f75c + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN_MIN_REQUIRED); + 800f4b6: f44f 7110 mov.w r1, #576 ; 0x240 + 800f4ba: 6938 ldr r0, [r7, #16] + 800f4bc: f000 f9b0 bl 800f820 + + dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); + 800f4c0: 2204 movs r2, #4 + 800f4c2: 2132 movs r1, #50 ; 0x32 + 800f4c4: 6938 ldr r0, [r7, #16] + 800f4c6: f000 f949 bl 800f75c + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + 800f4ca: 693b ldr r3, [r7, #16] + 800f4cc: 6a9b ldr r3, [r3, #40] ; 0x28 + 800f4ce: 4618 mov r0, r3 + 800f4d0: f7f7 fe0d bl 80070ee + 800f4d4: 4603 mov r3, r0 + 800f4d6: 4619 mov r1, r3 + 800f4d8: 6938 ldr r0, [r7, #16] + 800f4da: f000 f9db bl 800f894 + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + 800f4de: 2203 movs r2, #3 + 800f4e0: 2137 movs r1, #55 ; 0x37 + 800f4e2: 6938 ldr r0, [r7, #16] + 800f4e4: f000 f93a bl 800f75c + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800f4e8: 2300 movs r3, #0 + 800f4ea: 75fb strb r3, [r7, #23] + 800f4ec: e009 b.n 800f502 + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + 800f4ee: 7dfb ldrb r3, [r7, #23] + 800f4f0: 4a29 ldr r2, [pc, #164] ; (800f598 ) + 800f4f2: 5cd3 ldrb r3, [r2, r3] + 800f4f4: 4619 mov r1, r3 + 800f4f6: 6938 ldr r0, [r7, #16] + 800f4f8: f000 f96a bl 800f7d0 + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + 800f4fc: 7dfb ldrb r3, [r7, #23] + 800f4fe: 3301 adds r3, #1 + 800f500: 75fb strb r3, [r7, #23] + 800f502: 7dfb ldrb r3, [r7, #23] + 800f504: 2b02 cmp r3, #2 + 800f506: d9f2 bls.n 800f4ee + } + + dhcp_option_trailer(dhcp); + 800f508: 6938 ldr r0, [r7, #16] + 800f50a: f000 ff39 bl 8010380 + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + 800f50e: 693b ldr r3, [r7, #16] + 800f510: 68da ldr r2, [r3, #12] + 800f512: 693b ldr r3, [r7, #16] + 800f514: 8a9b ldrh r3, [r3, #20] + 800f516: 33f0 adds r3, #240 ; 0xf0 + 800f518: b29b uxth r3, r3 + 800f51a: 4619 mov r1, r3 + 800f51c: 4610 mov r0, r2 + 800f51e: f7f8 fd9d bl 800805c + + /* broadcast to server */ + udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); + 800f522: 4b1e ldr r3, [pc, #120] ; (800f59c ) + 800f524: 6818 ldr r0, [r3, #0] + 800f526: 693b ldr r3, [r7, #16] + 800f528: 68d9 ldr r1, [r3, #12] + 800f52a: 687b ldr r3, [r7, #4] + 800f52c: 9300 str r3, [sp, #0] + 800f52e: 2343 movs r3, #67 ; 0x43 + 800f530: 4a1b ldr r2, [pc, #108] ; (800f5a0 ) + 800f532: f7fe fec5 bl 800e2c0 + dhcp_delete_msg(dhcp); + 800f536: 6938 ldr r0, [r7, #16] + 800f538: f000 fee0 bl 80102fc + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + 800f53c: 693b ldr r3, [r7, #16] + 800f53e: 7a9b ldrb r3, [r3, #10] + 800f540: 2bff cmp r3, #255 ; 0xff + 800f542: d005 beq.n 800f550 + dhcp->tries++; + 800f544: 693b ldr r3, [r7, #16] + 800f546: 7a9b ldrb r3, [r3, #10] + 800f548: 3301 adds r3, #1 + 800f54a: b2da uxtb r2, r3 + 800f54c: 693b ldr r3, [r7, #16] + 800f54e: 729a strb r2, [r3, #10] + } + msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; + 800f550: 693b ldr r3, [r7, #16] + 800f552: 7a9b ldrb r3, [r3, #10] + 800f554: 2b09 cmp r3, #9 + 800f556: d80a bhi.n 800f56e + 800f558: 693b ldr r3, [r7, #16] + 800f55a: 7a9b ldrb r3, [r3, #10] + 800f55c: b29b uxth r3, r3 + 800f55e: 461a mov r2, r3 + 800f560: 0152 lsls r2, r2, #5 + 800f562: 1ad2 subs r2, r2, r3 + 800f564: 0092 lsls r2, r2, #2 + 800f566: 4413 add r3, r2 + 800f568: 00db lsls r3, r3, #3 + 800f56a: b29b uxth r3, r3 + 800f56c: e001 b.n 800f572 + 800f56e: f242 7310 movw r3, #10000 ; 0x2710 + 800f572: 81bb strh r3, [r7, #12] + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + 800f574: 89bb ldrh r3, [r7, #12] + 800f576: f203 13f3 addw r3, r3, #499 ; 0x1f3 + 800f57a: 4a0a ldr r2, [pc, #40] ; (800f5a4 ) + 800f57c: fb82 1203 smull r1, r2, r2, r3 + 800f580: 1152 asrs r2, r2, #5 + 800f582: 17db asrs r3, r3, #31 + 800f584: 1ad3 subs r3, r2, r3 + 800f586: b29a uxth r2, r3 + 800f588: 693b ldr r3, [r7, #16] + 800f58a: 82da strh r2, [r3, #22] + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs)); + return result; + 800f58c: f997 300f ldrsb.w r3, [r7, #15] +} + 800f590: 4618 mov r0, r3 + 800f592: 3718 adds r7, #24 + 800f594: 46bd mov sp, r7 + 800f596: bd80 pop {r7, pc} + 800f598: 20000014 .word 0x20000014 + 800f59c: 20006ff0 .word 0x20006ff0 + 800f5a0: 0801676c .word 0x0801676c + 800f5a4: 10624dd3 .word 0x10624dd3 + +0800f5a8 : + * + * @param netif network interface which must release its lease + */ +err_t +dhcp_release(struct netif *netif) +{ + 800f5a8: b580 push {r7, lr} + 800f5aa: b088 sub sp, #32 + 800f5ac: af02 add r7, sp, #8 + 800f5ae: 6078 str r0, [r7, #4] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800f5b0: 687b ldr r3, [r7, #4] + 800f5b2: 6a5b ldr r3, [r3, #36] ; 0x24 + 800f5b4: 617b str r3, [r7, #20] + err_t result; + ip_addr_t server_ip_addr; + u8_t is_dhcp_supplied_address; + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n")); + if (dhcp == NULL) { + 800f5b6: 697b ldr r3, [r7, #20] + 800f5b8: 2b00 cmp r3, #0 + 800f5ba: d102 bne.n 800f5c2 + return ERR_ARG; + 800f5bc: f06f 030f mvn.w r3, #15 + 800f5c0: e072 b.n 800f6a8 + } + ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); + 800f5c2: 697b ldr r3, [r7, #20] + 800f5c4: 6a5b ldr r3, [r3, #36] ; 0x24 + 800f5c6: 60fb str r3, [r7, #12] + + is_dhcp_supplied_address = dhcp_supplied_address(netif); + 800f5c8: 6878 ldr r0, [r7, #4] + 800f5ca: f000 ff33 bl 8010434 + 800f5ce: 4603 mov r3, r0 + 800f5d0: 74fb strb r3, [r7, #19] + + /* idle DHCP client */ + dhcp_set_state(dhcp, DHCP_STATE_OFF); + 800f5d2: 2100 movs r1, #0 + 800f5d4: 6978 ldr r0, [r7, #20] + 800f5d6: f000 f8a7 bl 800f728 + /* clean old DHCP offer */ + ip_addr_set_zero_ip4(&dhcp->server_ip_addr); + 800f5da: 697b ldr r3, [r7, #20] + 800f5dc: 2200 movs r2, #0 + 800f5de: 625a str r2, [r3, #36] ; 0x24 + ip4_addr_set_zero(&dhcp->offered_ip_addr); + 800f5e0: 697b ldr r3, [r7, #20] + 800f5e2: 2200 movs r2, #0 + 800f5e4: 629a str r2, [r3, #40] ; 0x28 + ip4_addr_set_zero(&dhcp->offered_sn_mask); + 800f5e6: 697b ldr r3, [r7, #20] + 800f5e8: 2200 movs r2, #0 + 800f5ea: 62da str r2, [r3, #44] ; 0x2c + ip4_addr_set_zero(&dhcp->offered_gw_addr); + 800f5ec: 697b ldr r3, [r7, #20] + 800f5ee: 2200 movs r2, #0 + 800f5f0: 631a str r2, [r3, #48] ; 0x30 +#if LWIP_DHCP_BOOTP_FILE + ip4_addr_set_zero(&dhcp->offered_si_addr); +#endif /* LWIP_DHCP_BOOTP_FILE */ + dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; + 800f5f2: 697b ldr r3, [r7, #20] + 800f5f4: 2200 movs r2, #0 + 800f5f6: 63da str r2, [r3, #60] ; 0x3c + 800f5f8: 697b ldr r3, [r7, #20] + 800f5fa: 6bda ldr r2, [r3, #60] ; 0x3c + 800f5fc: 697b ldr r3, [r7, #20] + 800f5fe: 639a str r2, [r3, #56] ; 0x38 + 800f600: 697b ldr r3, [r7, #20] + 800f602: 6b9a ldr r2, [r3, #56] ; 0x38 + 800f604: 697b ldr r3, [r7, #20] + 800f606: 635a str r2, [r3, #52] ; 0x34 + dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; + 800f608: 697b ldr r3, [r7, #20] + 800f60a: 2200 movs r2, #0 + 800f60c: 845a strh r2, [r3, #34] ; 0x22 + 800f60e: 697b ldr r3, [r7, #20] + 800f610: 8c5a ldrh r2, [r3, #34] ; 0x22 + 800f612: 697b ldr r3, [r7, #20] + 800f614: 841a strh r2, [r3, #32] + 800f616: 697b ldr r3, [r7, #20] + 800f618: 8c1a ldrh r2, [r3, #32] + 800f61a: 697b ldr r3, [r7, #20] + 800f61c: 83da strh r2, [r3, #30] + 800f61e: 697b ldr r3, [r7, #20] + 800f620: 8bda ldrh r2, [r3, #30] + 800f622: 697b ldr r3, [r7, #20] + 800f624: 839a strh r2, [r3, #28] + + if (!is_dhcp_supplied_address) { + 800f626: 7cfb ldrb r3, [r7, #19] + 800f628: 2b00 cmp r3, #0 + 800f62a: d101 bne.n 800f630 + /* don't issue release message when address is not dhcp-assigned */ + return ERR_OK; + 800f62c: 2300 movs r3, #0 + 800f62e: e03b b.n 800f6a8 + } + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); + 800f630: 2207 movs r2, #7 + 800f632: 6979 ldr r1, [r7, #20] + 800f634: 6878 ldr r0, [r7, #4] + 800f636: f000 fcff bl 8010038 + 800f63a: 4603 mov r3, r0 + 800f63c: 74bb strb r3, [r7, #18] + if (result == ERR_OK) { + 800f63e: f997 3012 ldrsb.w r3, [r7, #18] + 800f642: 2b00 cmp r3, #0 + 800f644: d128 bne.n 800f698 + dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); + 800f646: 2204 movs r2, #4 + 800f648: 2136 movs r1, #54 ; 0x36 + 800f64a: 6978 ldr r0, [r7, #20] + 800f64c: f000 f886 bl 800f75c + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr)))); + 800f650: 68fb ldr r3, [r7, #12] + 800f652: 4618 mov r0, r3 + 800f654: f7f7 fd4b bl 80070ee + 800f658: 4603 mov r3, r0 + 800f65a: 4619 mov r1, r3 + 800f65c: 6978 ldr r0, [r7, #20] + 800f65e: f000 f919 bl 800f894 + + dhcp_option_trailer(dhcp); + 800f662: 6978 ldr r0, [r7, #20] + 800f664: f000 fe8c bl 8010380 + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + 800f668: 697b ldr r3, [r7, #20] + 800f66a: 68da ldr r2, [r3, #12] + 800f66c: 697b ldr r3, [r7, #20] + 800f66e: 8a9b ldrh r3, [r3, #20] + 800f670: 33f0 adds r3, #240 ; 0xf0 + 800f672: b29b uxth r3, r3 + 800f674: 4619 mov r1, r3 + 800f676: 4610 mov r0, r2 + 800f678: f7f8 fcf0 bl 800805c + + udp_sendto_if(dhcp_pcb, dhcp->p_out, &server_ip_addr, DHCP_SERVER_PORT, netif); + 800f67c: 4b0c ldr r3, [pc, #48] ; (800f6b0 ) + 800f67e: 6818 ldr r0, [r3, #0] + 800f680: 697b ldr r3, [r7, #20] + 800f682: 68d9 ldr r1, [r3, #12] + 800f684: f107 020c add.w r2, r7, #12 + 800f688: 687b ldr r3, [r7, #4] + 800f68a: 9300 str r3, [sp, #0] + 800f68c: 2343 movs r3, #67 ; 0x43 + 800f68e: f7fe fe17 bl 800e2c0 + dhcp_delete_msg(dhcp); + 800f692: 6978 ldr r0, [r7, #20] + 800f694: f000 fe32 bl 80102fc + } else { + /* sending release failed, but that's not a problem since the correct behaviour of dhcp does not rely on release */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); + } + /* remove IP address from interface (prevents routing from selecting this interface) */ + netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); + 800f698: 4b06 ldr r3, [pc, #24] ; (800f6b4 ) + 800f69a: 4a06 ldr r2, [pc, #24] ; (800f6b4 ) + 800f69c: 4905 ldr r1, [pc, #20] ; (800f6b4 ) + 800f69e: 6878 ldr r0, [r7, #4] + 800f6a0: f7f8 f99a bl 80079d8 + + return result; + 800f6a4: f997 3012 ldrsb.w r3, [r7, #18] +} + 800f6a8: 4618 mov r0, r3 + 800f6aa: 3718 adds r7, #24 + 800f6ac: 46bd mov sp, r7 + 800f6ae: bd80 pop {r7, pc} + 800f6b0: 20006ff0 .word 0x20006ff0 + 800f6b4: 08016768 .word 0x08016768 + +0800f6b8 : + * + * @param netif The network interface to stop DHCP on + */ +void +dhcp_stop(struct netif *netif) +{ + 800f6b8: b580 push {r7, lr} + 800f6ba: b084 sub sp, #16 + 800f6bc: af00 add r7, sp, #0 + 800f6be: 6078 str r0, [r7, #4] + struct dhcp *dhcp; + LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); + 800f6c0: 687b ldr r3, [r7, #4] + 800f6c2: 2b00 cmp r3, #0 + 800f6c4: d107 bne.n 800f6d6 + 800f6c6: 4b14 ldr r3, [pc, #80] ; (800f718 ) + 800f6c8: f240 5242 movw r2, #1346 ; 0x542 + 800f6cc: 4913 ldr r1, [pc, #76] ; (800f71c ) + 800f6ce: 4814 ldr r0, [pc, #80] ; (800f720 ) + 800f6d0: f003 fb58 bl 8012d84 + 800f6d4: e01d b.n 800f712 + dhcp = netif_dhcp_data(netif); + 800f6d6: 687b ldr r3, [r7, #4] + 800f6d8: 6a5b ldr r3, [r3, #36] ; 0x24 + 800f6da: 60fb str r3, [r7, #12] + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); + /* netif is DHCP configured? */ + if (dhcp != NULL) { + 800f6dc: 68fb ldr r3, [r7, #12] + 800f6de: 2b00 cmp r3, #0 + 800f6e0: d017 beq.n 800f712 + autoip_stop(netif); + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + } +#endif /* LWIP_DHCP_AUTOIP_COOP */ + + LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); + 800f6e2: 68fb ldr r3, [r7, #12] + 800f6e4: 685b ldr r3, [r3, #4] + 800f6e6: 2b00 cmp r3, #0 + 800f6e8: d006 beq.n 800f6f8 + 800f6ea: 4b0b ldr r3, [pc, #44] ; (800f718 ) + 800f6ec: f240 524f movw r2, #1359 ; 0x54f + 800f6f0: 490c ldr r1, [pc, #48] ; (800f724 ) + 800f6f2: 480b ldr r0, [pc, #44] ; (800f720 ) + 800f6f4: f003 fb46 bl 8012d84 + dhcp_set_state(dhcp, DHCP_STATE_OFF); + 800f6f8: 2100 movs r1, #0 + 800f6fa: 68f8 ldr r0, [r7, #12] + 800f6fc: f000 f814 bl 800f728 + + if (dhcp->pcb_allocated != 0) { + 800f700: 68fb ldr r3, [r7, #12] + 800f702: 7a1b ldrb r3, [r3, #8] + 800f704: 2b00 cmp r3, #0 + 800f706: d004 beq.n 800f712 + dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ + 800f708: f7ff f854 bl 800e7b4 + dhcp->pcb_allocated = 0; + 800f70c: 68fb ldr r3, [r7, #12] + 800f70e: 2200 movs r2, #0 + 800f710: 721a strb r2, [r3, #8] + } + } +} + 800f712: 3710 adds r7, #16 + 800f714: 46bd mov sp, r7 + 800f716: bd80 pop {r7, pc} + 800f718: 08015a84 .word 0x08015a84 + 800f71c: 08015bf8 .word 0x08015bf8 + 800f720: 08015ae4 .word 0x08015ae4 + 800f724: 08015bb0 .word 0x08015bb0 + +0800f728 : + * + * If the state changed, reset the number of tries. + */ +static void +dhcp_set_state(struct dhcp *dhcp, u8_t new_state) +{ + 800f728: b480 push {r7} + 800f72a: b083 sub sp, #12 + 800f72c: af00 add r7, sp, #0 + 800f72e: 6078 str r0, [r7, #4] + 800f730: 460b mov r3, r1 + 800f732: 70fb strb r3, [r7, #3] + if (new_state != dhcp->state) { + 800f734: 687b ldr r3, [r7, #4] + 800f736: 7a5b ldrb r3, [r3, #9] + 800f738: 78fa ldrb r2, [r7, #3] + 800f73a: 429a cmp r2, r3 + 800f73c: d008 beq.n 800f750 + dhcp->state = new_state; + 800f73e: 687b ldr r3, [r7, #4] + 800f740: 78fa ldrb r2, [r7, #3] + 800f742: 725a strb r2, [r3, #9] + dhcp->tries = 0; + 800f744: 687b ldr r3, [r7, #4] + 800f746: 2200 movs r2, #0 + 800f748: 729a strb r2, [r3, #10] + dhcp->request_timeout = 0; + 800f74a: 687b ldr r3, [r7, #4] + 800f74c: 2200 movs r2, #0 + 800f74e: 82da strh r2, [r3, #22] + } +} + 800f750: bf00 nop + 800f752: 370c adds r7, #12 + 800f754: 46bd mov sp, r7 + 800f756: bc80 pop {r7} + 800f758: 4770 bx lr + ... + +0800f75c : + * DHCP message. + * + */ +static void +dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) +{ + 800f75c: b580 push {r7, lr} + 800f75e: b082 sub sp, #8 + 800f760: af00 add r7, sp, #0 + 800f762: 6078 str r0, [r7, #4] + 800f764: 460b mov r3, r1 + 800f766: 70fb strb r3, [r7, #3] + 800f768: 4613 mov r3, r2 + 800f76a: 70bb strb r3, [r7, #2] + LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); + 800f76c: 687b ldr r3, [r7, #4] + 800f76e: 8a9b ldrh r3, [r3, #20] + 800f770: 461a mov r2, r3 + 800f772: 78bb ldrb r3, [r7, #2] + 800f774: 4413 add r3, r2 + 800f776: 3302 adds r3, #2 + 800f778: 2b44 cmp r3, #68 ; 0x44 + 800f77a: d906 bls.n 800f78a + 800f77c: 4b11 ldr r3, [pc, #68] ; (800f7c4 ) + 800f77e: f44f 62ae mov.w r2, #1392 ; 0x570 + 800f782: 4911 ldr r1, [pc, #68] ; (800f7c8 ) + 800f784: 4811 ldr r0, [pc, #68] ; (800f7cc ) + 800f786: f003 fafd bl 8012d84 + dhcp->msg_out->options[dhcp->options_out_len++] = option_type; + 800f78a: 687b ldr r3, [r7, #4] + 800f78c: 691a ldr r2, [r3, #16] + 800f78e: 687b ldr r3, [r7, #4] + 800f790: 8a9b ldrh r3, [r3, #20] + 800f792: 1c59 adds r1, r3, #1 + 800f794: b288 uxth r0, r1 + 800f796: 6879 ldr r1, [r7, #4] + 800f798: 8288 strh r0, [r1, #20] + 800f79a: 4413 add r3, r2 + 800f79c: 78fa ldrb r2, [r7, #3] + 800f79e: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + dhcp->msg_out->options[dhcp->options_out_len++] = option_len; + 800f7a2: 687b ldr r3, [r7, #4] + 800f7a4: 691a ldr r2, [r3, #16] + 800f7a6: 687b ldr r3, [r7, #4] + 800f7a8: 8a9b ldrh r3, [r3, #20] + 800f7aa: 1c59 adds r1, r3, #1 + 800f7ac: b288 uxth r0, r1 + 800f7ae: 6879 ldr r1, [r7, #4] + 800f7b0: 8288 strh r0, [r1, #20] + 800f7b2: 4413 add r3, r2 + 800f7b4: 78ba ldrb r2, [r7, #2] + 800f7b6: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 +} + 800f7ba: bf00 nop + 800f7bc: 3708 adds r7, #8 + 800f7be: 46bd mov sp, r7 + 800f7c0: bd80 pop {r7, pc} + 800f7c2: bf00 nop + 800f7c4: 08015a84 .word 0x08015a84 + 800f7c8: 08015c14 .word 0x08015c14 + 800f7cc: 08015ae4 .word 0x08015ae4 + +0800f7d0 : + * Concatenate a single byte to the outgoing DHCP message. + * + */ +static void +dhcp_option_byte(struct dhcp *dhcp, u8_t value) +{ + 800f7d0: b580 push {r7, lr} + 800f7d2: b082 sub sp, #8 + 800f7d4: af00 add r7, sp, #0 + 800f7d6: 6078 str r0, [r7, #4] + 800f7d8: 460b mov r3, r1 + 800f7da: 70fb strb r3, [r7, #3] + LWIP_ASSERT("dhcp_option_byte: dhcp->options_out_len < DHCP_OPTIONS_LEN", dhcp->options_out_len < DHCP_OPTIONS_LEN); + 800f7dc: 687b ldr r3, [r7, #4] + 800f7de: 8a9b ldrh r3, [r3, #20] + 800f7e0: 2b43 cmp r3, #67 ; 0x43 + 800f7e2: d906 bls.n 800f7f2 + 800f7e4: 4b0b ldr r3, [pc, #44] ; (800f814 ) + 800f7e6: f240 527b movw r2, #1403 ; 0x57b + 800f7ea: 490b ldr r1, [pc, #44] ; (800f818 ) + 800f7ec: 480b ldr r0, [pc, #44] ; (800f81c ) + 800f7ee: f003 fac9 bl 8012d84 + dhcp->msg_out->options[dhcp->options_out_len++] = value; + 800f7f2: 687b ldr r3, [r7, #4] + 800f7f4: 691a ldr r2, [r3, #16] + 800f7f6: 687b ldr r3, [r7, #4] + 800f7f8: 8a9b ldrh r3, [r3, #20] + 800f7fa: 1c59 adds r1, r3, #1 + 800f7fc: b288 uxth r0, r1 + 800f7fe: 6879 ldr r1, [r7, #4] + 800f800: 8288 strh r0, [r1, #20] + 800f802: 4413 add r3, r2 + 800f804: 78fa ldrb r2, [r7, #3] + 800f806: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 +} + 800f80a: bf00 nop + 800f80c: 3708 adds r7, #8 + 800f80e: 46bd mov sp, r7 + 800f810: bd80 pop {r7, pc} + 800f812: bf00 nop + 800f814: 08015a84 .word 0x08015a84 + 800f818: 08015c5c .word 0x08015c5c + 800f81c: 08015ae4 .word 0x08015ae4 + +0800f820 : + +static void +dhcp_option_short(struct dhcp *dhcp, u16_t value) +{ + 800f820: b590 push {r4, r7, lr} + 800f822: b083 sub sp, #12 + 800f824: af00 add r7, sp, #0 + 800f826: 6078 str r0, [r7, #4] + 800f828: 460b mov r3, r1 + 800f82a: 807b strh r3, [r7, #2] + LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); + 800f82c: 687b ldr r3, [r7, #4] + 800f82e: 8a9b ldrh r3, [r3, #20] + 800f830: 3302 adds r3, #2 + 800f832: 2b44 cmp r3, #68 ; 0x44 + 800f834: d906 bls.n 800f844 + 800f836: 4b14 ldr r3, [pc, #80] ; (800f888 ) + 800f838: f240 5282 movw r2, #1410 ; 0x582 + 800f83c: 4913 ldr r1, [pc, #76] ; (800f88c ) + 800f83e: 4814 ldr r0, [pc, #80] ; (800f890 ) + 800f840: f003 faa0 bl 8012d84 + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); + 800f844: 887b ldrh r3, [r7, #2] + 800f846: 0a1b lsrs r3, r3, #8 + 800f848: b298 uxth r0, r3 + 800f84a: 687b ldr r3, [r7, #4] + 800f84c: 691a ldr r2, [r3, #16] + 800f84e: 687b ldr r3, [r7, #4] + 800f850: 8a9b ldrh r3, [r3, #20] + 800f852: 1c59 adds r1, r3, #1 + 800f854: b28c uxth r4, r1 + 800f856: 6879 ldr r1, [r7, #4] + 800f858: 828c strh r4, [r1, #20] + 800f85a: b2c1 uxtb r1, r0 + 800f85c: 4413 add r3, r2 + 800f85e: 460a mov r2, r1 + 800f860: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); + 800f864: 687b ldr r3, [r7, #4] + 800f866: 691a ldr r2, [r3, #16] + 800f868: 687b ldr r3, [r7, #4] + 800f86a: 8a9b ldrh r3, [r3, #20] + 800f86c: 1c59 adds r1, r3, #1 + 800f86e: b288 uxth r0, r1 + 800f870: 6879 ldr r1, [r7, #4] + 800f872: 8288 strh r0, [r1, #20] + 800f874: 8879 ldrh r1, [r7, #2] + 800f876: b2c9 uxtb r1, r1 + 800f878: 4413 add r3, r2 + 800f87a: 460a mov r2, r1 + 800f87c: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 +} + 800f880: bf00 nop + 800f882: 370c adds r7, #12 + 800f884: 46bd mov sp, r7 + 800f886: bd90 pop {r4, r7, pc} + 800f888: 08015a84 .word 0x08015a84 + 800f88c: 08015c98 .word 0x08015c98 + 800f890: 08015ae4 .word 0x08015ae4 + +0800f894 : + +static void +dhcp_option_long(struct dhcp *dhcp, u32_t value) +{ + 800f894: b590 push {r4, r7, lr} + 800f896: b083 sub sp, #12 + 800f898: af00 add r7, sp, #0 + 800f89a: 6078 str r0, [r7, #4] + 800f89c: 6039 str r1, [r7, #0] + LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); + 800f89e: 687b ldr r3, [r7, #4] + 800f8a0: 8a9b ldrh r3, [r3, #20] + 800f8a2: 3304 adds r3, #4 + 800f8a4: 2b44 cmp r3, #68 ; 0x44 + 800f8a6: d906 bls.n 800f8b6 + 800f8a8: 4b22 ldr r3, [pc, #136] ; (800f934 ) + 800f8aa: f240 528a movw r2, #1418 ; 0x58a + 800f8ae: 4922 ldr r1, [pc, #136] ; (800f938 ) + 800f8b0: 4822 ldr r0, [pc, #136] ; (800f93c ) + 800f8b2: f003 fa67 bl 8012d84 + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); + 800f8b6: 683b ldr r3, [r7, #0] + 800f8b8: 0e18 lsrs r0, r3, #24 + 800f8ba: 687b ldr r3, [r7, #4] + 800f8bc: 691a ldr r2, [r3, #16] + 800f8be: 687b ldr r3, [r7, #4] + 800f8c0: 8a9b ldrh r3, [r3, #20] + 800f8c2: 1c59 adds r1, r3, #1 + 800f8c4: b28c uxth r4, r1 + 800f8c6: 6879 ldr r1, [r7, #4] + 800f8c8: 828c strh r4, [r1, #20] + 800f8ca: b2c1 uxtb r1, r0 + 800f8cc: 4413 add r3, r2 + 800f8ce: 460a mov r2, r1 + 800f8d0: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); + 800f8d4: 683b ldr r3, [r7, #0] + 800f8d6: 0c18 lsrs r0, r3, #16 + 800f8d8: 687b ldr r3, [r7, #4] + 800f8da: 691a ldr r2, [r3, #16] + 800f8dc: 687b ldr r3, [r7, #4] + 800f8de: 8a9b ldrh r3, [r3, #20] + 800f8e0: 1c59 adds r1, r3, #1 + 800f8e2: b28c uxth r4, r1 + 800f8e4: 6879 ldr r1, [r7, #4] + 800f8e6: 828c strh r4, [r1, #20] + 800f8e8: b2c1 uxtb r1, r0 + 800f8ea: 4413 add r3, r2 + 800f8ec: 460a mov r2, r1 + 800f8ee: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); + 800f8f2: 683b ldr r3, [r7, #0] + 800f8f4: 0a18 lsrs r0, r3, #8 + 800f8f6: 687b ldr r3, [r7, #4] + 800f8f8: 691a ldr r2, [r3, #16] + 800f8fa: 687b ldr r3, [r7, #4] + 800f8fc: 8a9b ldrh r3, [r3, #20] + 800f8fe: 1c59 adds r1, r3, #1 + 800f900: b28c uxth r4, r1 + 800f902: 6879 ldr r1, [r7, #4] + 800f904: 828c strh r4, [r1, #20] + 800f906: b2c1 uxtb r1, r0 + 800f908: 4413 add r3, r2 + 800f90a: 460a mov r2, r1 + 800f90c: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); + 800f910: 687b ldr r3, [r7, #4] + 800f912: 691a ldr r2, [r3, #16] + 800f914: 687b ldr r3, [r7, #4] + 800f916: 8a9b ldrh r3, [r3, #20] + 800f918: 1c59 adds r1, r3, #1 + 800f91a: b288 uxth r0, r1 + 800f91c: 6879 ldr r1, [r7, #4] + 800f91e: 8288 strh r0, [r1, #20] + 800f920: 6839 ldr r1, [r7, #0] + 800f922: b2c9 uxtb r1, r1 + 800f924: 4413 add r3, r2 + 800f926: 460a mov r2, r1 + 800f928: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 +} + 800f92c: bf00 nop + 800f92e: 370c adds r7, #12 + 800f930: 46bd mov sp, r7 + 800f932: bd90 pop {r4, r7, pc} + 800f934: 08015a84 .word 0x08015a84 + 800f938: 08015cdc .word 0x08015cdc + 800f93c: 08015ae4 .word 0x08015ae4 + +0800f940 : + * use that further on. + * + */ +static err_t +dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) +{ + 800f940: b580 push {r7, lr} + 800f942: b08e sub sp, #56 ; 0x38 + 800f944: af00 add r7, sp, #0 + 800f946: 6078 str r0, [r7, #4] + 800f948: 6039 str r1, [r7, #0] + u16_t offset; + u16_t offset_max; + u16_t options_idx; + u16_t options_idx_max; + struct pbuf *q; + int parse_file_as_options = 0; + 800f94a: 2300 movs r3, #0 + 800f94c: 627b str r3, [r7, #36] ; 0x24 + int parse_sname_as_options = 0; + 800f94e: 2300 movs r3, #0 + 800f950: 623b str r3, [r7, #32] + + /* clear received options */ + dhcp_clear_all_options(dhcp); + 800f952: 2208 movs r2, #8 + 800f954: 2100 movs r1, #0 + 800f956: 48b3 ldr r0, [pc, #716] ; (800fc24 ) + 800f958: f003 fb6a bl 8013030 + /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ + if (p->len < DHCP_SNAME_OFS) { + 800f95c: 683b ldr r3, [r7, #0] + 800f95e: 895b ldrh r3, [r3, #10] + 800f960: 2b2b cmp r3, #43 ; 0x2b + 800f962: d802 bhi.n 800f96a + return ERR_BUF; + 800f964: f06f 0301 mvn.w r3, #1 + 800f968: e26a b.n 800fe40 + } + dhcp->msg_in = (struct dhcp_msg *)p->payload; + 800f96a: 683b ldr r3, [r7, #0] + 800f96c: 685a ldr r2, [r3, #4] + 800f96e: 687b ldr r3, [r7, #4] + 800f970: 605a str r2, [r3, #4] +#endif /* LWIP_DHCP_BOOTP_FILE */ + + /* parse options */ + + /* start with options field */ + options_idx = DHCP_OPTIONS_OFS; + 800f972: 23f0 movs r3, #240 ; 0xf0 + 800f974: 85fb strh r3, [r7, #46] ; 0x2e + /* parse options to the end of the received packet */ + options_idx_max = p->tot_len; + 800f976: 683b ldr r3, [r7, #0] + 800f978: 891b ldrh r3, [r3, #8] + 800f97a: 85bb strh r3, [r7, #44] ; 0x2c +again: + q = p; + 800f97c: 683b ldr r3, [r7, #0] + 800f97e: 62bb str r3, [r7, #40] ; 0x28 + while ((q != NULL) && (options_idx >= q->len)) { + 800f980: e00c b.n 800f99c + options_idx -= q->len; + 800f982: 6abb ldr r3, [r7, #40] ; 0x28 + 800f984: 895b ldrh r3, [r3, #10] + 800f986: 8dfa ldrh r2, [r7, #46] ; 0x2e + 800f988: 1ad3 subs r3, r2, r3 + 800f98a: 85fb strh r3, [r7, #46] ; 0x2e + options_idx_max -= q->len; + 800f98c: 6abb ldr r3, [r7, #40] ; 0x28 + 800f98e: 895b ldrh r3, [r3, #10] + 800f990: 8dba ldrh r2, [r7, #44] ; 0x2c + 800f992: 1ad3 subs r3, r2, r3 + 800f994: 85bb strh r3, [r7, #44] ; 0x2c + q = q->next; + 800f996: 6abb ldr r3, [r7, #40] ; 0x28 + 800f998: 681b ldr r3, [r3, #0] + 800f99a: 62bb str r3, [r7, #40] ; 0x28 + while ((q != NULL) && (options_idx >= q->len)) { + 800f99c: 6abb ldr r3, [r7, #40] ; 0x28 + 800f99e: 2b00 cmp r3, #0 + 800f9a0: d004 beq.n 800f9ac + 800f9a2: 6abb ldr r3, [r7, #40] ; 0x28 + 800f9a4: 895b ldrh r3, [r3, #10] + 800f9a6: 8dfa ldrh r2, [r7, #46] ; 0x2e + 800f9a8: 429a cmp r2, r3 + 800f9aa: d2ea bcs.n 800f982 + } + if (q == NULL) { + 800f9ac: 6abb ldr r3, [r7, #40] ; 0x28 + 800f9ae: 2b00 cmp r3, #0 + 800f9b0: d102 bne.n 800f9b8 + return ERR_BUF; + 800f9b2: f06f 0301 mvn.w r3, #1 + 800f9b6: e243 b.n 800fe40 + } + offset = options_idx; + 800f9b8: 8dfb ldrh r3, [r7, #46] ; 0x2e + 800f9ba: 867b strh r3, [r7, #50] ; 0x32 + offset_max = options_idx_max; + 800f9bc: 8dbb ldrh r3, [r7, #44] ; 0x2c + 800f9be: 863b strh r3, [r7, #48] ; 0x30 + options = (u8_t*)q->payload; + 800f9c0: 6abb ldr r3, [r7, #40] ; 0x28 + 800f9c2: 685b ldr r3, [r3, #4] + 800f9c4: 637b str r3, [r7, #52] ; 0x34 + /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ + while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { + 800f9c6: e1fb b.n 800fdc0 + u8_t op = options[offset]; + 800f9c8: 8e7b ldrh r3, [r7, #50] ; 0x32 + 800f9ca: 6b7a ldr r2, [r7, #52] ; 0x34 + 800f9cc: 4413 add r3, r2 + 800f9ce: 781b ldrb r3, [r3, #0] + 800f9d0: 757b strb r3, [r7, #21] + u8_t len; + u8_t decode_len = 0; + 800f9d2: 2300 movs r3, #0 + 800f9d4: 77bb strb r3, [r7, #30] + int decode_idx = -1; + 800f9d6: f04f 33ff mov.w r3, #4294967295 + 800f9da: 61bb str r3, [r7, #24] + u16_t val_offset = offset + 2; + 800f9dc: 8e7b ldrh r3, [r7, #50] ; 0x32 + 800f9de: 3302 adds r3, #2 + 800f9e0: 82fb strh r3, [r7, #22] + /* len byte might be in the next pbuf */ + if ((offset + 1) < q->len) { + 800f9e2: 8e7b ldrh r3, [r7, #50] ; 0x32 + 800f9e4: 3301 adds r3, #1 + 800f9e6: 6aba ldr r2, [r7, #40] ; 0x28 + 800f9e8: 8952 ldrh r2, [r2, #10] + 800f9ea: 4293 cmp r3, r2 + 800f9ec: da06 bge.n 800f9fc + len = options[offset + 1]; + 800f9ee: 8e7b ldrh r3, [r7, #50] ; 0x32 + 800f9f0: 3301 adds r3, #1 + 800f9f2: 6b7a ldr r2, [r7, #52] ; 0x34 + 800f9f4: 4413 add r3, r2 + 800f9f6: 781b ldrb r3, [r3, #0] + 800f9f8: 77fb strb r3, [r7, #31] + 800f9fa: e00a b.n 800fa12 + } else { + len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); + 800f9fc: 6abb ldr r3, [r7, #40] ; 0x28 + 800f9fe: 681b ldr r3, [r3, #0] + 800fa00: 2b00 cmp r3, #0 + 800fa02: d004 beq.n 800fa0e + 800fa04: 6abb ldr r3, [r7, #40] ; 0x28 + 800fa06: 681b ldr r3, [r3, #0] + 800fa08: 685b ldr r3, [r3, #4] + 800fa0a: 781b ldrb r3, [r3, #0] + 800fa0c: e000 b.n 800fa10 + 800fa0e: 2300 movs r3, #0 + 800fa10: 77fb strb r3, [r7, #31] + } + /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ + decode_len = len; + 800fa12: 7ffb ldrb r3, [r7, #31] + 800fa14: 77bb strb r3, [r7, #30] + switch(op) { + 800fa16: 7d7b ldrb r3, [r7, #21] + 800fa18: 2b3b cmp r3, #59 ; 0x3b + 800fa1a: f200 8121 bhi.w 800fc60 + 800fa1e: a201 add r2, pc, #4 ; (adr r2, 800fa24 ) + 800fa20: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 800fa24: 0800fb15 .word 0x0800fb15 + 800fa28: 0800fb25 .word 0x0800fb25 + 800fa2c: 0800fc61 .word 0x0800fc61 + 800fa30: 0800fb45 .word 0x0800fb45 + 800fa34: 0800fc61 .word 0x0800fc61 + 800fa38: 0800fc61 .word 0x0800fc61 + 800fa3c: 0800fc61 .word 0x0800fc61 + 800fa40: 0800fc61 .word 0x0800fc61 + 800fa44: 0800fc61 .word 0x0800fc61 + 800fa48: 0800fc61 .word 0x0800fc61 + 800fa4c: 0800fc61 .word 0x0800fc61 + 800fa50: 0800fc61 .word 0x0800fc61 + 800fa54: 0800fc61 .word 0x0800fc61 + 800fa58: 0800fc61 .word 0x0800fc61 + 800fa5c: 0800fc61 .word 0x0800fc61 + 800fa60: 0800fc61 .word 0x0800fc61 + 800fa64: 0800fc61 .word 0x0800fc61 + 800fa68: 0800fc61 .word 0x0800fc61 + 800fa6c: 0800fc61 .word 0x0800fc61 + 800fa70: 0800fc61 .word 0x0800fc61 + 800fa74: 0800fc61 .word 0x0800fc61 + 800fa78: 0800fc61 .word 0x0800fc61 + 800fa7c: 0800fc61 .word 0x0800fc61 + 800fa80: 0800fc61 .word 0x0800fc61 + 800fa84: 0800fc61 .word 0x0800fc61 + 800fa88: 0800fc61 .word 0x0800fc61 + 800fa8c: 0800fc61 .word 0x0800fc61 + 800fa90: 0800fc61 .word 0x0800fc61 + 800fa94: 0800fc61 .word 0x0800fc61 + 800fa98: 0800fc61 .word 0x0800fc61 + 800fa9c: 0800fc61 .word 0x0800fc61 + 800faa0: 0800fc61 .word 0x0800fc61 + 800faa4: 0800fc61 .word 0x0800fc61 + 800faa8: 0800fc61 .word 0x0800fc61 + 800faac: 0800fc61 .word 0x0800fc61 + 800fab0: 0800fc61 .word 0x0800fc61 + 800fab4: 0800fc61 .word 0x0800fc61 + 800fab8: 0800fc61 .word 0x0800fc61 + 800fabc: 0800fc61 .word 0x0800fc61 + 800fac0: 0800fc61 .word 0x0800fc61 + 800fac4: 0800fc61 .word 0x0800fc61 + 800fac8: 0800fc61 .word 0x0800fc61 + 800facc: 0800fc61 .word 0x0800fc61 + 800fad0: 0800fc61 .word 0x0800fc61 + 800fad4: 0800fc61 .word 0x0800fc61 + 800fad8: 0800fc61 .word 0x0800fc61 + 800fadc: 0800fc61 .word 0x0800fc61 + 800fae0: 0800fc61 .word 0x0800fc61 + 800fae4: 0800fc61 .word 0x0800fc61 + 800fae8: 0800fc61 .word 0x0800fc61 + 800faec: 0800fc61 .word 0x0800fc61 + 800faf0: 0800fb6b .word 0x0800fb6b + 800faf4: 0800fb8b .word 0x0800fb8b + 800faf8: 0800fbc5 .word 0x0800fbc5 + 800fafc: 0800fbe5 .word 0x0800fbe5 + 800fb00: 0800fc61 .word 0x0800fc61 + 800fb04: 0800fc61 .word 0x0800fc61 + 800fb08: 0800fc61 .word 0x0800fc61 + 800fb0c: 0800fc05 .word 0x0800fc05 + 800fb10: 0800fc41 .word 0x0800fc41 + /* case(DHCP_OPTION_END): handled above */ + case(DHCP_OPTION_PAD): + /* special option: no len encoded */ + decode_len = len = 0; + 800fb14: 2300 movs r3, #0 + 800fb16: 77fb strb r3, [r7, #31] + 800fb18: 7ffb ldrb r3, [r7, #31] + 800fb1a: 77bb strb r3, [r7, #30] + /* will be increased below */ + offset--; + 800fb1c: 8e7b ldrh r3, [r7, #50] ; 0x32 + 800fb1e: 3b01 subs r3, #1 + 800fb20: 867b strh r3, [r7, #50] ; 0x32 + break; + 800fb22: e0a0 b.n 800fc66 + case(DHCP_OPTION_SUBNET_MASK): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + 800fb24: 7ffb ldrb r3, [r7, #31] + 800fb26: 2b04 cmp r3, #4 + 800fb28: d009 beq.n 800fb3e + 800fb2a: 4b3f ldr r3, [pc, #252] ; (800fc28 ) + 800fb2c: f240 52f6 movw r2, #1526 ; 0x5f6 + 800fb30: 493e ldr r1, [pc, #248] ; (800fc2c ) + 800fb32: 483f ldr r0, [pc, #252] ; (800fc30 ) + 800fb34: f003 f926 bl 8012d84 + 800fb38: f06f 0305 mvn.w r3, #5 + 800fb3c: e180 b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; + 800fb3e: 2306 movs r3, #6 + 800fb40: 61bb str r3, [r7, #24] + break; + 800fb42: e090 b.n 800fc66 + case(DHCP_OPTION_ROUTER): + decode_len = 4; /* only copy the first given router */ + 800fb44: 2304 movs r3, #4 + 800fb46: 77bb strb r3, [r7, #30] + LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); + 800fb48: 7ffa ldrb r2, [r7, #31] + 800fb4a: 7fbb ldrb r3, [r7, #30] + 800fb4c: 429a cmp r2, r3 + 800fb4e: d209 bcs.n 800fb64 + 800fb50: 4b35 ldr r3, [pc, #212] ; (800fc28 ) + 800fb52: f240 52fb movw r2, #1531 ; 0x5fb + 800fb56: 4937 ldr r1, [pc, #220] ; (800fc34 ) + 800fb58: 4835 ldr r0, [pc, #212] ; (800fc30 ) + 800fb5a: f003 f913 bl 8012d84 + 800fb5e: f06f 0305 mvn.w r3, #5 + 800fb62: e16d b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_ROUTER; + 800fb64: 2307 movs r3, #7 + 800fb66: 61bb str r3, [r7, #24] + break; + 800fb68: e07d b.n 800fc66 + LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_DNS_SERVER; + break; +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ + case(DHCP_OPTION_LEASE_TIME): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + 800fb6a: 7ffb ldrb r3, [r7, #31] + 800fb6c: 2b04 cmp r3, #4 + 800fb6e: d009 beq.n 800fb84 + 800fb70: 4b2d ldr r3, [pc, #180] ; (800fc28 ) + 800fb72: f240 6209 movw r2, #1545 ; 0x609 + 800fb76: 492d ldr r1, [pc, #180] ; (800fc2c ) + 800fb78: 482d ldr r0, [pc, #180] ; (800fc30 ) + 800fb7a: f003 f903 bl 8012d84 + 800fb7e: f06f 0305 mvn.w r3, #5 + 800fb82: e15d b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_LEASE_TIME; + 800fb84: 2303 movs r3, #3 + 800fb86: 61bb str r3, [r7, #24] + break; + 800fb88: e06d b.n 800fc66 + LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_NTP_SERVER; + break; +#endif /* LWIP_DHCP_GET_NTP_SRV*/ + case(DHCP_OPTION_OVERLOAD): + LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); + 800fb8a: 7ffb ldrb r3, [r7, #31] + 800fb8c: 2b01 cmp r3, #1 + 800fb8e: d009 beq.n 800fba4 + 800fb90: 4b25 ldr r3, [pc, #148] ; (800fc28 ) + 800fb92: f240 6217 movw r2, #1559 ; 0x617 + 800fb96: 4928 ldr r1, [pc, #160] ; (800fc38 ) + 800fb98: 4825 ldr r0, [pc, #148] ; (800fc30 ) + 800fb9a: f003 f8f3 bl 8012d84 + 800fb9e: f06f 0305 mvn.w r3, #5 + 800fba2: e14d b.n 800fe40 + /* decode overload only in options, not in file/sname: invalid packet */ + LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;); + 800fba4: 8dfb ldrh r3, [r7, #46] ; 0x2e + 800fba6: 2bf0 cmp r3, #240 ; 0xf0 + 800fba8: d009 beq.n 800fbbe + 800fbaa: 4b1f ldr r3, [pc, #124] ; (800fc28 ) + 800fbac: f240 6219 movw r2, #1561 ; 0x619 + 800fbb0: 4922 ldr r1, [pc, #136] ; (800fc3c ) + 800fbb2: 481f ldr r0, [pc, #124] ; (800fc30 ) + 800fbb4: f003 f8e6 bl 8012d84 + 800fbb8: f06f 0305 mvn.w r3, #5 + 800fbbc: e140 b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_OVERLOAD; + 800fbbe: 2300 movs r3, #0 + 800fbc0: 61bb str r3, [r7, #24] + break; + 800fbc2: e050 b.n 800fc66 + case(DHCP_OPTION_MESSAGE_TYPE): + LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); + 800fbc4: 7ffb ldrb r3, [r7, #31] + 800fbc6: 2b01 cmp r3, #1 + 800fbc8: d009 beq.n 800fbde + 800fbca: 4b17 ldr r3, [pc, #92] ; (800fc28 ) + 800fbcc: f240 621d movw r2, #1565 ; 0x61d + 800fbd0: 4919 ldr r1, [pc, #100] ; (800fc38 ) + 800fbd2: 4817 ldr r0, [pc, #92] ; (800fc30 ) + 800fbd4: f003 f8d6 bl 8012d84 + 800fbd8: f06f 0305 mvn.w r3, #5 + 800fbdc: e130 b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_MSG_TYPE; + 800fbde: 2301 movs r3, #1 + 800fbe0: 61bb str r3, [r7, #24] + break; + 800fbe2: e040 b.n 800fc66 + case(DHCP_OPTION_SERVER_ID): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + 800fbe4: 7ffb ldrb r3, [r7, #31] + 800fbe6: 2b04 cmp r3, #4 + 800fbe8: d009 beq.n 800fbfe + 800fbea: 4b0f ldr r3, [pc, #60] ; (800fc28 ) + 800fbec: f240 6221 movw r2, #1569 ; 0x621 + 800fbf0: 490e ldr r1, [pc, #56] ; (800fc2c ) + 800fbf2: 480f ldr r0, [pc, #60] ; (800fc30 ) + 800fbf4: f003 f8c6 bl 8012d84 + 800fbf8: f06f 0305 mvn.w r3, #5 + 800fbfc: e120 b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_SERVER_ID; + 800fbfe: 2302 movs r3, #2 + 800fc00: 61bb str r3, [r7, #24] + break; + 800fc02: e030 b.n 800fc66 + case(DHCP_OPTION_T1): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + 800fc04: 7ffb ldrb r3, [r7, #31] + 800fc06: 2b04 cmp r3, #4 + 800fc08: d009 beq.n 800fc1e + 800fc0a: 4b07 ldr r3, [pc, #28] ; (800fc28 ) + 800fc0c: f240 6225 movw r2, #1573 ; 0x625 + 800fc10: 4906 ldr r1, [pc, #24] ; (800fc2c ) + 800fc12: 4807 ldr r0, [pc, #28] ; (800fc30 ) + 800fc14: f003 f8b6 bl 8012d84 + 800fc18: f06f 0305 mvn.w r3, #5 + 800fc1c: e110 b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_T1; + 800fc1e: 2304 movs r3, #4 + 800fc20: 61bb str r3, [r7, #24] + break; + 800fc22: e020 b.n 800fc66 + 800fc24: 20006fe8 .word 0x20006fe8 + 800fc28: 08015a84 .word 0x08015a84 + 800fc2c: 08015d1c .word 0x08015d1c + 800fc30: 08015ae4 .word 0x08015ae4 + 800fc34: 08015d28 .word 0x08015d28 + 800fc38: 08015d3c .word 0x08015d3c + 800fc3c: 08015d48 .word 0x08015d48 + case(DHCP_OPTION_T2): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + 800fc40: 7ffb ldrb r3, [r7, #31] + 800fc42: 2b04 cmp r3, #4 + 800fc44: d009 beq.n 800fc5a + 800fc46: 4b80 ldr r3, [pc, #512] ; (800fe48 ) + 800fc48: f240 6229 movw r2, #1577 ; 0x629 + 800fc4c: 497f ldr r1, [pc, #508] ; (800fe4c ) + 800fc4e: 4880 ldr r0, [pc, #512] ; (800fe50 ) + 800fc50: f003 f898 bl 8012d84 + 800fc54: f06f 0305 mvn.w r3, #5 + 800fc58: e0f2 b.n 800fe40 + decode_idx = DHCP_OPTION_IDX_T2; + 800fc5a: 2305 movs r3, #5 + 800fc5c: 61bb str r3, [r7, #24] + break; + 800fc5e: e002 b.n 800fc66 + default: + decode_len = 0; + 800fc60: 2300 movs r3, #0 + 800fc62: 77bb strb r3, [r7, #30] + LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", (u16_t)op)); + break; + 800fc64: bf00 nop + } + offset += len + 2; + 800fc66: 7ffb ldrb r3, [r7, #31] + 800fc68: b29a uxth r2, r3 + 800fc6a: 8e7b ldrh r3, [r7, #50] ; 0x32 + 800fc6c: 4413 add r3, r2 + 800fc6e: b29b uxth r3, r3 + 800fc70: 3302 adds r3, #2 + 800fc72: 867b strh r3, [r7, #50] ; 0x32 + if (decode_len > 0) { + 800fc74: 7fbb ldrb r3, [r7, #30] + 800fc76: 2b00 cmp r3, #0 + 800fc78: d079 beq.n 800fd6e + u32_t value = 0; + 800fc7a: 2300 movs r3, #0 + 800fc7c: 60bb str r3, [r7, #8] + u16_t copy_len; +decode_next: + LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); + 800fc7e: 69bb ldr r3, [r7, #24] + 800fc80: 2b00 cmp r3, #0 + 800fc82: db02 blt.n 800fc8a + 800fc84: 69bb ldr r3, [r7, #24] + 800fc86: 2b07 cmp r3, #7 + 800fc88: dd06 ble.n 800fc98 + 800fc8a: 4b6f ldr r3, [pc, #444] ; (800fe48 ) + 800fc8c: f240 6236 movw r2, #1590 ; 0x636 + 800fc90: 4970 ldr r1, [pc, #448] ; (800fe54 ) + 800fc92: 486f ldr r0, [pc, #444] ; (800fe50 ) + 800fc94: f003 f876 bl 8012d84 + if (!dhcp_option_given(dhcp, decode_idx)) { + 800fc98: 4a6f ldr r2, [pc, #444] ; (800fe58 ) + 800fc9a: 69bb ldr r3, [r7, #24] + 800fc9c: 4413 add r3, r2 + 800fc9e: 781b ldrb r3, [r3, #0] + 800fca0: 2b00 cmp r3, #0 + 800fca2: d164 bne.n 800fd6e + copy_len = LWIP_MIN(decode_len, 4); + 800fca4: 7fbb ldrb r3, [r7, #30] + 800fca6: 2b04 cmp r3, #4 + 800fca8: bf28 it cs + 800fcaa: 2304 movcs r3, #4 + 800fcac: b2db uxtb r3, r3 + 800fcae: 827b strh r3, [r7, #18] + if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { + 800fcb0: 8afb ldrh r3, [r7, #22] + 800fcb2: 8a7a ldrh r2, [r7, #18] + 800fcb4: f107 0108 add.w r1, r7, #8 + 800fcb8: 6ab8 ldr r0, [r7, #40] ; 0x28 + 800fcba: f7f8 fd41 bl 8008740 + 800fcbe: 4603 mov r3, r0 + 800fcc0: 461a mov r2, r3 + 800fcc2: 8a7b ldrh r3, [r7, #18] + 800fcc4: 4293 cmp r3, r2 + 800fcc6: d002 beq.n 800fcce + return ERR_BUF; + 800fcc8: f06f 0301 mvn.w r3, #1 + 800fccc: e0b8 b.n 800fe40 + } + if (decode_len > 4) { + 800fcce: 7fbb ldrb r3, [r7, #30] + 800fcd0: 2b04 cmp r3, #4 + 800fcd2: d927 bls.n 800fd24 + /* decode more than one u32_t */ + LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); + 800fcd4: 7fbb ldrb r3, [r7, #30] + 800fcd6: f003 0303 and.w r3, r3, #3 + 800fcda: b2db uxtb r3, r3 + 800fcdc: 2b00 cmp r3, #0 + 800fcde: d009 beq.n 800fcf4 + 800fce0: 4b59 ldr r3, [pc, #356] ; (800fe48 ) + 800fce2: f240 623e movw r2, #1598 ; 0x63e + 800fce6: 495d ldr r1, [pc, #372] ; (800fe5c ) + 800fce8: 4859 ldr r0, [pc, #356] ; (800fe50 ) + 800fcea: f003 f84b bl 8012d84 + 800fcee: f06f 0305 mvn.w r3, #5 + 800fcf2: e0a5 b.n 800fe40 + dhcp_got_option(dhcp, decode_idx); + 800fcf4: 4a58 ldr r2, [pc, #352] ; (800fe58 ) + 800fcf6: 69bb ldr r3, [r7, #24] + 800fcf8: 4413 add r3, r2 + 800fcfa: 2201 movs r2, #1 + 800fcfc: 701a strb r2, [r3, #0] + dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); + 800fcfe: 68bb ldr r3, [r7, #8] + 800fd00: 4618 mov r0, r3 + 800fd02: f7f7 f9f4 bl 80070ee + 800fd06: 4602 mov r2, r0 + 800fd08: 4955 ldr r1, [pc, #340] ; (800fe60 ) + 800fd0a: 69bb ldr r3, [r7, #24] + 800fd0c: f841 2023 str.w r2, [r1, r3, lsl #2] + decode_len -= 4; + 800fd10: 7fbb ldrb r3, [r7, #30] + 800fd12: 3b04 subs r3, #4 + 800fd14: 77bb strb r3, [r7, #30] + val_offset += 4; + 800fd16: 8afb ldrh r3, [r7, #22] + 800fd18: 3304 adds r3, #4 + 800fd1a: 82fb strh r3, [r7, #22] + decode_idx++; + 800fd1c: 69bb ldr r3, [r7, #24] + 800fd1e: 3301 adds r3, #1 + 800fd20: 61bb str r3, [r7, #24] + goto decode_next; + 800fd22: e7ac b.n 800fc7e + } else if (decode_len == 4) { + 800fd24: 7fbb ldrb r3, [r7, #30] + 800fd26: 2b04 cmp r3, #4 + 800fd28: d106 bne.n 800fd38 + value = lwip_ntohl(value); + 800fd2a: 68bb ldr r3, [r7, #8] + 800fd2c: 4618 mov r0, r3 + 800fd2e: f7f7 f9de bl 80070ee + 800fd32: 4603 mov r3, r0 + 800fd34: 60bb str r3, [r7, #8] + 800fd36: e010 b.n 800fd5a + } else { + LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); + 800fd38: 7fbb ldrb r3, [r7, #30] + 800fd3a: 2b01 cmp r3, #1 + 800fd3c: d009 beq.n 800fd52 + 800fd3e: 4b42 ldr r3, [pc, #264] ; (800fe48 ) + 800fd40: f44f 62c9 mov.w r2, #1608 ; 0x648 + 800fd44: 4947 ldr r1, [pc, #284] ; (800fe64 ) + 800fd46: 4842 ldr r0, [pc, #264] ; (800fe50 ) + 800fd48: f003 f81c bl 8012d84 + 800fd4c: f06f 0305 mvn.w r3, #5 + 800fd50: e076 b.n 800fe40 + value = ((u8_t*)&value)[0]; + 800fd52: f107 0308 add.w r3, r7, #8 + 800fd56: 781b ldrb r3, [r3, #0] + 800fd58: 60bb str r3, [r7, #8] + } + dhcp_got_option(dhcp, decode_idx); + 800fd5a: 4a3f ldr r2, [pc, #252] ; (800fe58 ) + 800fd5c: 69bb ldr r3, [r7, #24] + 800fd5e: 4413 add r3, r2 + 800fd60: 2201 movs r2, #1 + 800fd62: 701a strb r2, [r3, #0] + dhcp_set_option_value(dhcp, decode_idx, value); + 800fd64: 68ba ldr r2, [r7, #8] + 800fd66: 493e ldr r1, [pc, #248] ; (800fe60 ) + 800fd68: 69bb ldr r3, [r7, #24] + 800fd6a: f841 2023 str.w r2, [r1, r3, lsl #2] + } + } + if (offset >= q->len) { + 800fd6e: 6abb ldr r3, [r7, #40] ; 0x28 + 800fd70: 895b ldrh r3, [r3, #10] + 800fd72: 8e7a ldrh r2, [r7, #50] ; 0x32 + 800fd74: 429a cmp r2, r3 + 800fd76: d323 bcc.n 800fdc0 + offset -= q->len; + 800fd78: 6abb ldr r3, [r7, #40] ; 0x28 + 800fd7a: 895b ldrh r3, [r3, #10] + 800fd7c: 8e7a ldrh r2, [r7, #50] ; 0x32 + 800fd7e: 1ad3 subs r3, r2, r3 + 800fd80: 867b strh r3, [r7, #50] ; 0x32 + offset_max -= q->len; + 800fd82: 6abb ldr r3, [r7, #40] ; 0x28 + 800fd84: 895b ldrh r3, [r3, #10] + 800fd86: 8e3a ldrh r2, [r7, #48] ; 0x30 + 800fd88: 1ad3 subs r3, r2, r3 + 800fd8a: 863b strh r3, [r7, #48] ; 0x30 + if ((offset < offset_max) && offset_max) { + 800fd8c: 8e7a ldrh r2, [r7, #50] ; 0x32 + 800fd8e: 8e3b ldrh r3, [r7, #48] ; 0x30 + 800fd90: 429a cmp r2, r3 + 800fd92: d223 bcs.n 800fddc + 800fd94: 8e3b ldrh r3, [r7, #48] ; 0x30 + 800fd96: 2b00 cmp r3, #0 + 800fd98: d020 beq.n 800fddc + q = q->next; + 800fd9a: 6abb ldr r3, [r7, #40] ; 0x28 + 800fd9c: 681b ldr r3, [r3, #0] + 800fd9e: 62bb str r3, [r7, #40] ; 0x28 + LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); + 800fda0: 6abb ldr r3, [r7, #40] ; 0x28 + 800fda2: 2b00 cmp r3, #0 + 800fda4: d109 bne.n 800fdba + 800fda6: 4b28 ldr r3, [pc, #160] ; (800fe48 ) + 800fda8: f240 6254 movw r2, #1620 ; 0x654 + 800fdac: 492e ldr r1, [pc, #184] ; (800fe68 ) + 800fdae: 4828 ldr r0, [pc, #160] ; (800fe50 ) + 800fdb0: f002 ffe8 bl 8012d84 + 800fdb4: f06f 0305 mvn.w r3, #5 + 800fdb8: e042 b.n 800fe40 + options = (u8_t*)q->payload; + 800fdba: 6abb ldr r3, [r7, #40] ; 0x28 + 800fdbc: 685b ldr r3, [r3, #4] + 800fdbe: 637b str r3, [r7, #52] ; 0x34 + while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { + 800fdc0: 6abb ldr r3, [r7, #40] ; 0x28 + 800fdc2: 2b00 cmp r3, #0 + 800fdc4: d00a beq.n 800fddc + 800fdc6: 8e7a ldrh r2, [r7, #50] ; 0x32 + 800fdc8: 8e3b ldrh r3, [r7, #48] ; 0x30 + 800fdca: 429a cmp r2, r3 + 800fdcc: d206 bcs.n 800fddc + 800fdce: 8e7b ldrh r3, [r7, #50] ; 0x32 + 800fdd0: 6b7a ldr r2, [r7, #52] ; 0x34 + 800fdd2: 4413 add r3, r2 + 800fdd4: 781b ldrb r3, [r3, #0] + 800fdd6: 2bff cmp r3, #255 ; 0xff + 800fdd8: f47f adf6 bne.w 800f9c8 + break; + } + } + } + /* is this an overloaded message? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { + 800fddc: 4b1e ldr r3, [pc, #120] ; (800fe58 ) + 800fdde: 781b ldrb r3, [r3, #0] + 800fde0: 2b00 cmp r3, #0 + 800fde2: d018 beq.n 800fe16 + u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); + 800fde4: 4b1e ldr r3, [pc, #120] ; (800fe60 ) + 800fde6: 681b ldr r3, [r3, #0] + 800fde8: 60fb str r3, [r7, #12] + dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); + 800fdea: 4b1b ldr r3, [pc, #108] ; (800fe58 ) + 800fdec: 2200 movs r2, #0 + 800fdee: 701a strb r2, [r3, #0] + if (overload == DHCP_OVERLOAD_FILE) { + 800fdf0: 68fb ldr r3, [r7, #12] + 800fdf2: 2b01 cmp r3, #1 + 800fdf4: d102 bne.n 800fdfc + parse_file_as_options = 1; + 800fdf6: 2301 movs r3, #1 + 800fdf8: 627b str r3, [r7, #36] ; 0x24 + 800fdfa: e00c b.n 800fe16 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); + } else if (overload == DHCP_OVERLOAD_SNAME) { + 800fdfc: 68fb ldr r3, [r7, #12] + 800fdfe: 2b02 cmp r3, #2 + 800fe00: d102 bne.n 800fe08 + parse_sname_as_options = 1; + 800fe02: 2301 movs r3, #1 + 800fe04: 623b str r3, [r7, #32] + 800fe06: e006 b.n 800fe16 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); + } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { + 800fe08: 68fb ldr r3, [r7, #12] + 800fe0a: 2b03 cmp r3, #3 + 800fe0c: d103 bne.n 800fe16 + parse_sname_as_options = 1; + 800fe0e: 2301 movs r3, #1 + 800fe10: 623b str r3, [r7, #32] + parse_file_as_options = 1; + 800fe12: 2301 movs r3, #1 + 800fe14: 627b str r3, [r7, #36] ; 0x24 + /* make sure the string is really NULL-terminated */ + dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0; + } +#endif /* LWIP_DHCP_BOOTP_FILE */ + } + if (parse_file_as_options) { + 800fe16: 6a7b ldr r3, [r7, #36] ; 0x24 + 800fe18: 2b00 cmp r3, #0 + 800fe1a: d006 beq.n 800fe2a + /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ + parse_file_as_options = 0; + 800fe1c: 2300 movs r3, #0 + 800fe1e: 627b str r3, [r7, #36] ; 0x24 + options_idx = DHCP_FILE_OFS; + 800fe20: 236c movs r3, #108 ; 0x6c + 800fe22: 85fb strh r3, [r7, #46] ; 0x2e + options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; + 800fe24: 23ec movs r3, #236 ; 0xec + 800fe26: 85bb strh r3, [r7, #44] ; 0x2c + goto again; + 800fe28: e5a8 b.n 800f97c + } else if (parse_sname_as_options) { + 800fe2a: 6a3b ldr r3, [r7, #32] + 800fe2c: 2b00 cmp r3, #0 + 800fe2e: d006 beq.n 800fe3e + parse_sname_as_options = 0; + 800fe30: 2300 movs r3, #0 + 800fe32: 623b str r3, [r7, #32] + options_idx = DHCP_SNAME_OFS; + 800fe34: 232c movs r3, #44 ; 0x2c + 800fe36: 85fb strh r3, [r7, #46] ; 0x2e + options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; + 800fe38: 236c movs r3, #108 ; 0x6c + 800fe3a: 85bb strh r3, [r7, #44] ; 0x2c + goto again; + 800fe3c: e59e b.n 800f97c + } + return ERR_OK; + 800fe3e: 2300 movs r3, #0 +} + 800fe40: 4618 mov r0, r3 + 800fe42: 3738 adds r7, #56 ; 0x38 + 800fe44: 46bd mov sp, r7 + 800fe46: bd80 pop {r7, pc} + 800fe48: 08015a84 .word 0x08015a84 + 800fe4c: 08015d1c .word 0x08015d1c + 800fe50: 08015ae4 .word 0x08015ae4 + 800fe54: 08015d60 .word 0x08015d60 + 800fe58: 20006fe8 .word 0x20006fe8 + 800fe5c: 08015d74 .word 0x08015d74 + 800fe60: 20006fc8 .word 0x20006fc8 + 800fe64: 08015d8c .word 0x08015d8c + 800fe68: 08015da0 .word 0x08015da0 + +0800fe6c : +/** + * If an incoming DHCP message is in response to us, then trigger the state machine + */ +static void +dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) +{ + 800fe6c: b580 push {r7, lr} + 800fe6e: b08a sub sp, #40 ; 0x28 + 800fe70: af00 add r7, sp, #0 + 800fe72: 60f8 str r0, [r7, #12] + 800fe74: 60b9 str r1, [r7, #8] + 800fe76: 607a str r2, [r7, #4] + 800fe78: 603b str r3, [r7, #0] + struct netif *netif = ip_current_input_netif(); + 800fe7a: 4b69 ldr r3, [pc, #420] ; (8010020 ) + 800fe7c: 685b ldr r3, [r3, #4] + 800fe7e: 623b str r3, [r7, #32] + struct dhcp *dhcp = netif_dhcp_data(netif); + 800fe80: 6a3b ldr r3, [r7, #32] + 800fe82: 6a5b ldr r3, [r3, #36] ; 0x24 + 800fe84: 61fb str r3, [r7, #28] + struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; + 800fe86: 687b ldr r3, [r7, #4] + 800fe88: 685b ldr r3, [r3, #4] + 800fe8a: 61bb str r3, [r7, #24] + u8_t i; + + LWIP_UNUSED_ARG(arg); + + /* Caught DHCP message from netif that does not have DHCP enabled? -> not interested */ + if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) { + 800fe8c: 69fb ldr r3, [r7, #28] + 800fe8e: 2b00 cmp r3, #0 + 800fe90: f000 80a9 beq.w 800ffe6 + 800fe94: 69fb ldr r3, [r7, #28] + 800fe96: 7a1b ldrb r3, [r3, #8] + 800fe98: 2b00 cmp r3, #0 + 800fe9a: f000 80a4 beq.w 800ffe6 + /* prevent warnings about unused arguments */ + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(addr); + LWIP_UNUSED_ARG(port); + + LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); + 800fe9e: 69fb ldr r3, [r7, #28] + 800fea0: 685b ldr r3, [r3, #4] + 800fea2: 2b00 cmp r3, #0 + 800fea4: d006 beq.n 800feb4 + 800fea6: 4b5f ldr r3, [pc, #380] ; (8010024 ) + 800fea8: f44f 62d5 mov.w r2, #1704 ; 0x6a8 + 800feac: 495e ldr r1, [pc, #376] ; (8010028 ) + 800feae: 485f ldr r0, [pc, #380] ; (801002c ) + 800feb0: f002 ff68 bl 8012d84 + + if (p->len < DHCP_MIN_REPLY_LEN) { + 800feb4: 687b ldr r3, [r7, #4] + 800feb6: 895b ldrh r3, [r3, #10] + 800feb8: 2b2b cmp r3, #43 ; 0x2b + 800feba: f240 8096 bls.w 800ffea + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n")); + goto free_pbuf_and_return; + } + + if (reply_msg->op != DHCP_BOOTREPLY) { + 800febe: 69bb ldr r3, [r7, #24] + 800fec0: 781b ldrb r3, [r3, #0] + 800fec2: 2b02 cmp r3, #2 + 800fec4: f040 8093 bne.w 800ffee + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); + goto free_pbuf_and_return; + } + /* iterate through hardware address and match against DHCP message */ + for (i = 0; i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN && i < DHCP_CHADDR_LEN; i++) { + 800fec8: 2300 movs r3, #0 + 800feca: f887 3027 strb.w r3, [r7, #39] ; 0x27 + 800fece: e012 b.n 800fef6 + if (netif->hwaddr[i] != reply_msg->chaddr[i]) { + 800fed0: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800fed4: 6a3a ldr r2, [r7, #32] + 800fed6: 4413 add r3, r2 + 800fed8: f893 202d ldrb.w r2, [r3, #45] ; 0x2d + 800fedc: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800fee0: 69b9 ldr r1, [r7, #24] + 800fee2: 440b add r3, r1 + 800fee4: 7f1b ldrb r3, [r3, #28] + 800fee6: 429a cmp r2, r3 + 800fee8: f040 8083 bne.w 800fff2 + for (i = 0; i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN && i < DHCP_CHADDR_LEN; i++) { + 800feec: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800fef0: 3301 adds r3, #1 + 800fef2: f887 3027 strb.w r3, [r7, #39] ; 0x27 + 800fef6: 6a3b ldr r3, [r7, #32] + 800fef8: f893 302c ldrb.w r3, [r3, #44] ; 0x2c + 800fefc: f897 2027 ldrb.w r2, [r7, #39] ; 0x27 + 800ff00: 429a cmp r2, r3 + 800ff02: d207 bcs.n 800ff14 + 800ff04: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800ff08: 2b05 cmp r3, #5 + 800ff0a: d803 bhi.n 800ff14 + 800ff0c: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 800ff10: 2b0f cmp r3, #15 + 800ff12: d9dd bls.n 800fed0 + (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); + goto free_pbuf_and_return; + } + } + /* match transaction ID against what we expected */ + if (lwip_ntohl(reply_msg->xid) != dhcp->xid) { + 800ff14: 69bb ldr r3, [r7, #24] + 800ff16: 685b ldr r3, [r3, #4] + 800ff18: 4618 mov r0, r3 + 800ff1a: f7f7 f8e8 bl 80070ee + 800ff1e: 4602 mov r2, r0 + 800ff20: 69fb ldr r3, [r7, #28] + 800ff22: 681b ldr r3, [r3, #0] + 800ff24: 429a cmp r2, r3 + 800ff26: d166 bne.n 800fff6 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n",lwip_ntohl(reply_msg->xid),dhcp->xid)); + goto free_pbuf_and_return; + } + /* option fields could be unfold? */ + if (dhcp_parse_reply(dhcp, p) != ERR_OK) { + 800ff28: 6879 ldr r1, [r7, #4] + 800ff2a: 69f8 ldr r0, [r7, #28] + 800ff2c: f7ff fd08 bl 800f940 + 800ff30: 4603 mov r3, r0 + 800ff32: 2b00 cmp r3, #0 + 800ff34: d161 bne.n 800fffa + goto free_pbuf_and_return; + } + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n")); + /* obtain pointer to DHCP message type */ + if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) { + 800ff36: 4b3e ldr r3, [pc, #248] ; (8010030 ) + 800ff38: 785b ldrb r3, [r3, #1] + 800ff3a: 2b00 cmp r3, #0 + 800ff3c: d05f beq.n 800fffe + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n")); + goto free_pbuf_and_return; + } + + /* read DHCP message type */ + msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); + 800ff3e: 4b3d ldr r3, [pc, #244] ; (8010034 ) + 800ff40: 685b ldr r3, [r3, #4] + 800ff42: 75fb strb r3, [r7, #23] + /* message type is DHCP ACK? */ + if (msg_type == DHCP_ACK) { + 800ff44: 7dfb ldrb r3, [r7, #23] + 800ff46: 2b05 cmp r3, #5 + 800ff48: d128 bne.n 800ff9c + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); + /* in requesting state? */ + if (dhcp->state == DHCP_STATE_REQUESTING) { + 800ff4a: 69fb ldr r3, [r7, #28] + 800ff4c: 7a5b ldrb r3, [r3, #9] + 800ff4e: 2b01 cmp r3, #1 + 800ff50: d111 bne.n 800ff76 + dhcp_handle_ack(netif); + 800ff52: 6a38 ldr r0, [r7, #32] + 800ff54: f7fe fea0 bl 800ec98 +#if DHCP_DOES_ARP_CHECK + if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { + 800ff58: 6a3b ldr r3, [r7, #32] + 800ff5a: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 800ff5e: f003 0308 and.w r3, r3, #8 + 800ff62: 2b00 cmp r3, #0 + 800ff64: d003 beq.n 800ff6e + /* check if the acknowledged lease address is already in use */ + dhcp_check(netif); + 800ff66: 6a38 ldr r0, [r7, #32] + 800ff68: f7fe fc68 bl 800e83c + 800ff6c: e04a b.n 8010004 + } else { + /* bind interface to the acknowledged lease address */ + dhcp_bind(netif); + 800ff6e: 6a38 ldr r0, [r7, #32] + 800ff70: f7ff f8a0 bl 800f0b4 + 800ff74: e046 b.n 8010004 + /* bind interface to the acknowledged lease address */ + dhcp_bind(netif); +#endif + } + /* already bound to the given lease address? */ + else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || + 800ff76: 69fb ldr r3, [r7, #28] + 800ff78: 7a5b ldrb r3, [r3, #9] + 800ff7a: 2b03 cmp r3, #3 + 800ff7c: d007 beq.n 800ff8e + 800ff7e: 69fb ldr r3, [r7, #28] + 800ff80: 7a5b ldrb r3, [r3, #9] + 800ff82: 2b04 cmp r3, #4 + 800ff84: d003 beq.n 800ff8e + (dhcp->state == DHCP_STATE_RENEWING)) { + 800ff86: 69fb ldr r3, [r7, #28] + 800ff88: 7a5b ldrb r3, [r3, #9] + else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || + 800ff8a: 2b05 cmp r3, #5 + 800ff8c: d13a bne.n 8010004 + dhcp_handle_ack(netif); + 800ff8e: 6a38 ldr r0, [r7, #32] + 800ff90: f7fe fe82 bl 800ec98 + dhcp_bind(netif); + 800ff94: 6a38 ldr r0, [r7, #32] + 800ff96: f7ff f88d bl 800f0b4 + 800ff9a: e033 b.n 8010004 + } + } + /* received a DHCP_NAK in appropriate state? */ + else if ((msg_type == DHCP_NAK) && + 800ff9c: 7dfb ldrb r3, [r7, #23] + 800ff9e: 2b06 cmp r3, #6 + 800ffa0: d113 bne.n 800ffca + ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || + 800ffa2: 69fb ldr r3, [r7, #28] + 800ffa4: 7a5b ldrb r3, [r3, #9] + else if ((msg_type == DHCP_NAK) && + 800ffa6: 2b03 cmp r3, #3 + 800ffa8: d00b beq.n 800ffc2 + ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || + 800ffaa: 69fb ldr r3, [r7, #28] + 800ffac: 7a5b ldrb r3, [r3, #9] + 800ffae: 2b01 cmp r3, #1 + 800ffb0: d007 beq.n 800ffc2 + (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { + 800ffb2: 69fb ldr r3, [r7, #28] + 800ffb4: 7a5b ldrb r3, [r3, #9] + ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || + 800ffb6: 2b04 cmp r3, #4 + 800ffb8: d003 beq.n 800ffc2 + (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { + 800ffba: 69fb ldr r3, [r7, #28] + 800ffbc: 7a5b ldrb r3, [r3, #9] + 800ffbe: 2b05 cmp r3, #5 + 800ffc0: d103 bne.n 800ffca + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); + dhcp_handle_nak(netif); + 800ffc2: 6a38 ldr r0, [r7, #32] + 800ffc4: f7fe fc20 bl 800e808 + 800ffc8: e01c b.n 8010004 + } + /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ + else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { + 800ffca: 7dfb ldrb r3, [r7, #23] + 800ffcc: 2b02 cmp r3, #2 + 800ffce: d118 bne.n 8010002 + 800ffd0: 69fb ldr r3, [r7, #28] + 800ffd2: 7a5b ldrb r3, [r3, #9] + 800ffd4: 2b06 cmp r3, #6 + 800ffd6: d114 bne.n 8010002 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_STATE_SELECTING state\n")); + dhcp->request_timeout = 0; + 800ffd8: 69fb ldr r3, [r7, #28] + 800ffda: 2200 movs r2, #0 + 800ffdc: 82da strh r2, [r3, #22] + /* remember offered lease */ + dhcp_handle_offer(netif); + 800ffde: 6a38 ldr r0, [r7, #32] + 800ffe0: f7fe fc60 bl 800e8a4 + 800ffe4: e00e b.n 8010004 + goto free_pbuf_and_return; + 800ffe6: bf00 nop + 800ffe8: e00c b.n 8010004 + goto free_pbuf_and_return; + 800ffea: bf00 nop + 800ffec: e00a b.n 8010004 + goto free_pbuf_and_return; + 800ffee: bf00 nop + 800fff0: e008 b.n 8010004 + goto free_pbuf_and_return; + 800fff2: bf00 nop + 800fff4: e006 b.n 8010004 + goto free_pbuf_and_return; + 800fff6: bf00 nop + 800fff8: e004 b.n 8010004 + goto free_pbuf_and_return; + 800fffa: bf00 nop + 800fffc: e002 b.n 8010004 + goto free_pbuf_and_return; + 800fffe: bf00 nop + 8010000: e000 b.n 8010004 + } + +free_pbuf_and_return: + 8010002: bf00 nop + if (dhcp != NULL) { + 8010004: 69fb ldr r3, [r7, #28] + 8010006: 2b00 cmp r3, #0 + 8010008: d002 beq.n 8010010 + dhcp->msg_in = NULL; + 801000a: 69fb ldr r3, [r7, #28] + 801000c: 2200 movs r2, #0 + 801000e: 605a str r2, [r3, #4] + } + pbuf_free(p); + 8010010: 6878 ldr r0, [r7, #4] + 8010012: f7f8 f997 bl 8008344 +} + 8010016: bf00 nop + 8010018: 3728 adds r7, #40 ; 0x28 + 801001a: 46bd mov sp, r7 + 801001c: bd80 pop {r7, pc} + 801001e: bf00 nop + 8010020: 200039ec .word 0x200039ec + 8010024: 08015a84 .word 0x08015a84 + 8010028: 08015bb0 .word 0x08015bb0 + 801002c: 08015ae4 .word 0x08015ae4 + 8010030: 20006fe8 .word 0x20006fe8 + 8010034: 20006fc8 .word 0x20006fc8 + +08010038 : + * @param dhcp dhcp control struct + * @param message_type message type of the request + */ +static err_t +dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) +{ + 8010038: b590 push {r4, r7, lr} + 801003a: b087 sub sp, #28 + 801003c: af00 add r7, sp, #0 + 801003e: 60f8 str r0, [r7, #12] + 8010040: 60b9 str r1, [r7, #8] + 8010042: 4613 mov r3, r2 + 8010044: 71fb strb r3, [r7, #7] + if (!xid_initialised) { + xid = DHCP_GLOBAL_XID; + xid_initialised = !xid_initialised; + } +#endif + LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); + 8010046: 68fb ldr r3, [r7, #12] + 8010048: 2b00 cmp r3, #0 + 801004a: d109 bne.n 8010060 + 801004c: 4ba3 ldr r3, [pc, #652] ; (80102dc ) + 801004e: f240 721d movw r2, #1821 ; 0x71d + 8010052: 49a3 ldr r1, [pc, #652] ; (80102e0 ) + 8010054: 48a3 ldr r0, [pc, #652] ; (80102e4 ) + 8010056: f002 fe95 bl 8012d84 + 801005a: f06f 030f mvn.w r3, #15 + 801005e: e138 b.n 80102d2 + LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); + 8010060: 68bb ldr r3, [r7, #8] + 8010062: 2b00 cmp r3, #0 + 8010064: d109 bne.n 801007a + 8010066: 4b9d ldr r3, [pc, #628] ; (80102dc ) + 8010068: f240 721e movw r2, #1822 ; 0x71e + 801006c: 499e ldr r1, [pc, #632] ; (80102e8 ) + 801006e: 489d ldr r0, [pc, #628] ; (80102e4 ) + 8010070: f002 fe88 bl 8012d84 + 8010074: f06f 0305 mvn.w r3, #5 + 8010078: e12b b.n 80102d2 + LWIP_ASSERT("dhcp_create_msg: dhcp->p_out == NULL", dhcp->p_out == NULL); + 801007a: 68bb ldr r3, [r7, #8] + 801007c: 68db ldr r3, [r3, #12] + 801007e: 2b00 cmp r3, #0 + 8010080: d006 beq.n 8010090 + 8010082: 4b96 ldr r3, [pc, #600] ; (80102dc ) + 8010084: f240 721f movw r2, #1823 ; 0x71f + 8010088: 4998 ldr r1, [pc, #608] ; (80102ec ) + 801008a: 4896 ldr r0, [pc, #600] ; (80102e4 ) + 801008c: f002 fe7a bl 8012d84 + LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); + 8010090: 68bb ldr r3, [r7, #8] + 8010092: 691b ldr r3, [r3, #16] + 8010094: 2b00 cmp r3, #0 + 8010096: d006 beq.n 80100a6 + 8010098: 4b90 ldr r3, [pc, #576] ; (80102dc ) + 801009a: f44f 62e4 mov.w r2, #1824 ; 0x720 + 801009e: 4994 ldr r1, [pc, #592] ; (80102f0 ) + 80100a0: 4890 ldr r0, [pc, #576] ; (80102e4 ) + 80100a2: f002 fe6f bl 8012d84 + dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); + 80100a6: 2200 movs r2, #0 + 80100a8: f44f 719a mov.w r1, #308 ; 0x134 + 80100ac: 2000 movs r0, #0 + 80100ae: f7f7 fdd1 bl 8007c54 + 80100b2: 4602 mov r2, r0 + 80100b4: 68bb ldr r3, [r7, #8] + 80100b6: 60da str r2, [r3, #12] + if (dhcp->p_out == NULL) { + 80100b8: 68bb ldr r3, [r7, #8] + 80100ba: 68db ldr r3, [r3, #12] + 80100bc: 2b00 cmp r3, #0 + 80100be: d102 bne.n 80100c6 + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("dhcp_create_msg(): could not allocate pbuf\n")); + return ERR_MEM; + 80100c0: f04f 33ff mov.w r3, #4294967295 + 80100c4: e105 b.n 80102d2 + } + LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", + 80100c6: 68bb ldr r3, [r7, #8] + 80100c8: 68db ldr r3, [r3, #12] + 80100ca: 895b ldrh r3, [r3, #10] + 80100cc: f5b3 7f9a cmp.w r3, #308 ; 0x134 + 80100d0: d206 bcs.n 80100e0 + 80100d2: 4b82 ldr r3, [pc, #520] ; (80102dc ) + 80100d4: f240 7227 movw r2, #1831 ; 0x727 + 80100d8: 4986 ldr r1, [pc, #536] ; (80102f4 ) + 80100da: 4882 ldr r0, [pc, #520] ; (80102e4 ) + 80100dc: f002 fe52 bl 8012d84 + (dhcp->p_out->len >= sizeof(struct dhcp_msg))); + + /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ + if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { + 80100e0: 79fb ldrb r3, [r7, #7] + 80100e2: 2b03 cmp r3, #3 + 80100e4: d103 bne.n 80100ee + 80100e6: 68bb ldr r3, [r7, #8] + 80100e8: 7a5b ldrb r3, [r3, #9] + 80100ea: 2b03 cmp r3, #3 + 80100ec: d10d bne.n 801010a + /* reuse transaction identifier in retransmissions */ + if (dhcp->tries == 0) { + 80100ee: 68bb ldr r3, [r7, #8] + 80100f0: 7a9b ldrb r3, [r3, #10] + 80100f2: 2b00 cmp r3, #0 + 80100f4: d105 bne.n 8010102 +#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) + xid = LWIP_RAND(); + 80100f6: f002 fd45 bl 8012b84 + 80100fa: 4603 mov r3, r0 + 80100fc: 461a mov r2, r3 + 80100fe: 4b7e ldr r3, [pc, #504] ; (80102f8 ) + 8010100: 601a str r2, [r3, #0] +#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ + xid++; +#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ + } + dhcp->xid = xid; + 8010102: 4b7d ldr r3, [pc, #500] ; (80102f8 ) + 8010104: 681a ldr r2, [r3, #0] + 8010106: 68bb ldr r3, [r7, #8] + 8010108: 601a str r2, [r3, #0] + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, + ("transaction id xid(%"X32_F")\n", xid)); + + dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; + 801010a: 68bb ldr r3, [r7, #8] + 801010c: 68db ldr r3, [r3, #12] + 801010e: 685a ldr r2, [r3, #4] + 8010110: 68bb ldr r3, [r7, #8] + 8010112: 611a str r2, [r3, #16] + + dhcp->msg_out->op = DHCP_BOOTREQUEST; + 8010114: 68bb ldr r3, [r7, #8] + 8010116: 691b ldr r3, [r3, #16] + 8010118: 2201 movs r2, #1 + 801011a: 701a strb r2, [r3, #0] + /* @todo: make link layer independent */ + dhcp->msg_out->htype = DHCP_HTYPE_ETH; + 801011c: 68bb ldr r3, [r7, #8] + 801011e: 691b ldr r3, [r3, #16] + 8010120: 2201 movs r2, #1 + 8010122: 705a strb r2, [r3, #1] + dhcp->msg_out->hlen = netif->hwaddr_len; + 8010124: 68bb ldr r3, [r7, #8] + 8010126: 691b ldr r3, [r3, #16] + 8010128: 68fa ldr r2, [r7, #12] + 801012a: f892 202c ldrb.w r2, [r2, #44] ; 0x2c + 801012e: 709a strb r2, [r3, #2] + dhcp->msg_out->hops = 0; + 8010130: 68bb ldr r3, [r7, #8] + 8010132: 691b ldr r3, [r3, #16] + 8010134: 2200 movs r2, #0 + 8010136: 70da strb r2, [r3, #3] + dhcp->msg_out->xid = lwip_htonl(dhcp->xid); + 8010138: 68bb ldr r3, [r7, #8] + 801013a: 681a ldr r2, [r3, #0] + 801013c: 68bb ldr r3, [r7, #8] + 801013e: 691c ldr r4, [r3, #16] + 8010140: 4610 mov r0, r2 + 8010142: f7f6 ffd4 bl 80070ee + 8010146: 4603 mov r3, r0 + 8010148: 6063 str r3, [r4, #4] + dhcp->msg_out->secs = 0; + 801014a: 68bb ldr r3, [r7, #8] + 801014c: 691b ldr r3, [r3, #16] + 801014e: 2200 movs r2, #0 + 8010150: 721a strb r2, [r3, #8] + 8010152: 2200 movs r2, #0 + 8010154: 725a strb r2, [r3, #9] + /* we don't need the broadcast flag since we can receive unicast traffic + before being fully configured! */ + dhcp->msg_out->flags = 0; + 8010156: 68bb ldr r3, [r7, #8] + 8010158: 691b ldr r3, [r3, #16] + 801015a: 2200 movs r2, #0 + 801015c: 729a strb r2, [r3, #10] + 801015e: 2200 movs r2, #0 + 8010160: 72da strb r2, [r3, #11] + ip4_addr_set_zero(&dhcp->msg_out->ciaddr); + 8010162: 68bb ldr r3, [r7, #8] + 8010164: 691b ldr r3, [r3, #16] + 8010166: 2200 movs r2, #0 + 8010168: 731a strb r2, [r3, #12] + 801016a: 2200 movs r2, #0 + 801016c: 735a strb r2, [r3, #13] + 801016e: 2200 movs r2, #0 + 8010170: 739a strb r2, [r3, #14] + 8010172: 2200 movs r2, #0 + 8010174: 73da strb r2, [r3, #15] + /* 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) || + 8010176: 79fb ldrb r3, [r7, #7] + 8010178: 2b08 cmp r3, #8 + 801017a: d010 beq.n 801019e + 801017c: 79fb ldrb r3, [r7, #7] + 801017e: 2b04 cmp r3, #4 + 8010180: d00d beq.n 801019e + 8010182: 79fb ldrb r3, [r7, #7] + 8010184: 2b07 cmp r3, #7 + 8010186: d00a beq.n 801019e + 8010188: 79fb ldrb r3, [r7, #7] + 801018a: 2b03 cmp r3, #3 + 801018c: d10d bne.n 80101aa + ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ + ((dhcp->state== DHCP_STATE_RENEWING) || dhcp->state== DHCP_STATE_REBINDING))) { + 801018e: 68bb ldr r3, [r7, #8] + 8010190: 7a5b ldrb r3, [r3, #9] + ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ + 8010192: 2b05 cmp r3, #5 + 8010194: d003 beq.n 801019e + ((dhcp->state== DHCP_STATE_RENEWING) || dhcp->state== DHCP_STATE_REBINDING))) { + 8010196: 68bb ldr r3, [r7, #8] + 8010198: 7a5b ldrb r3, [r3, #9] + 801019a: 2b04 cmp r3, #4 + 801019c: d105 bne.n 80101aa + ip4_addr_copy(dhcp->msg_out->ciaddr, *netif_ip4_addr(netif)); + 801019e: 68fb ldr r3, [r7, #12] + 80101a0: 1d1a adds r2, r3, #4 + 80101a2: 68bb ldr r3, [r7, #8] + 80101a4: 691b ldr r3, [r3, #16] + 80101a6: 6812 ldr r2, [r2, #0] + 80101a8: 60da str r2, [r3, #12] + } + ip4_addr_set_zero(&dhcp->msg_out->yiaddr); + 80101aa: 68bb ldr r3, [r7, #8] + 80101ac: 691b ldr r3, [r3, #16] + 80101ae: 2200 movs r2, #0 + 80101b0: 741a strb r2, [r3, #16] + 80101b2: 2200 movs r2, #0 + 80101b4: 745a strb r2, [r3, #17] + 80101b6: 2200 movs r2, #0 + 80101b8: 749a strb r2, [r3, #18] + 80101ba: 2200 movs r2, #0 + 80101bc: 74da strb r2, [r3, #19] + ip4_addr_set_zero(&dhcp->msg_out->siaddr); + 80101be: 68bb ldr r3, [r7, #8] + 80101c0: 691b ldr r3, [r3, #16] + 80101c2: 2200 movs r2, #0 + 80101c4: 751a strb r2, [r3, #20] + 80101c6: 2200 movs r2, #0 + 80101c8: 755a strb r2, [r3, #21] + 80101ca: 2200 movs r2, #0 + 80101cc: 759a strb r2, [r3, #22] + 80101ce: 2200 movs r2, #0 + 80101d0: 75da strb r2, [r3, #23] + ip4_addr_set_zero(&dhcp->msg_out->giaddr); + 80101d2: 68bb ldr r3, [r7, #8] + 80101d4: 691b ldr r3, [r3, #16] + 80101d6: 2200 movs r2, #0 + 80101d8: 761a strb r2, [r3, #24] + 80101da: 2200 movs r2, #0 + 80101dc: 765a strb r2, [r3, #25] + 80101de: 2200 movs r2, #0 + 80101e0: 769a strb r2, [r3, #26] + 80101e2: 2200 movs r2, #0 + 80101e4: 76da strb r2, [r3, #27] + for (i = 0; i < DHCP_CHADDR_LEN; i++) { + 80101e6: 2300 movs r3, #0 + 80101e8: 82fb strh r3, [r7, #22] + 80101ea: e019 b.n 8010220 + /* copy netif hardware address, pad with zeroes */ + dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN) ? netif->hwaddr[i] : 0/* pad byte*/; + 80101ec: 68fb ldr r3, [r7, #12] + 80101ee: f893 302c ldrb.w r3, [r3, #44] ; 0x2c + 80101f2: b29b uxth r3, r3 + 80101f4: 8afa ldrh r2, [r7, #22] + 80101f6: 429a cmp r2, r3 + 80101f8: d208 bcs.n 801020c + 80101fa: 8afb ldrh r3, [r7, #22] + 80101fc: 2b05 cmp r3, #5 + 80101fe: d805 bhi.n 801020c + 8010200: 8afb ldrh r3, [r7, #22] + 8010202: 68fa ldr r2, [r7, #12] + 8010204: 4413 add r3, r2 + 8010206: f893 102d ldrb.w r1, [r3, #45] ; 0x2d + 801020a: e000 b.n 801020e + 801020c: 2100 movs r1, #0 + 801020e: 68bb ldr r3, [r7, #8] + 8010210: 691a ldr r2, [r3, #16] + 8010212: 8afb ldrh r3, [r7, #22] + 8010214: 4413 add r3, r2 + 8010216: 460a mov r2, r1 + 8010218: 771a strb r2, [r3, #28] + for (i = 0; i < DHCP_CHADDR_LEN; i++) { + 801021a: 8afb ldrh r3, [r7, #22] + 801021c: 3301 adds r3, #1 + 801021e: 82fb strh r3, [r7, #22] + 8010220: 8afb ldrh r3, [r7, #22] + 8010222: 2b0f cmp r3, #15 + 8010224: d9e2 bls.n 80101ec + } + for (i = 0; i < DHCP_SNAME_LEN; i++) { + 8010226: 2300 movs r3, #0 + 8010228: 82fb strh r3, [r7, #22] + 801022a: e009 b.n 8010240 + dhcp->msg_out->sname[i] = 0; + 801022c: 68bb ldr r3, [r7, #8] + 801022e: 691a ldr r2, [r3, #16] + 8010230: 8afb ldrh r3, [r7, #22] + 8010232: 4413 add r3, r2 + 8010234: 2200 movs r2, #0 + 8010236: f883 202c strb.w r2, [r3, #44] ; 0x2c + for (i = 0; i < DHCP_SNAME_LEN; i++) { + 801023a: 8afb ldrh r3, [r7, #22] + 801023c: 3301 adds r3, #1 + 801023e: 82fb strh r3, [r7, #22] + 8010240: 8afb ldrh r3, [r7, #22] + 8010242: 2b3f cmp r3, #63 ; 0x3f + 8010244: d9f2 bls.n 801022c + } + for (i = 0; i < DHCP_FILE_LEN; i++) { + 8010246: 2300 movs r3, #0 + 8010248: 82fb strh r3, [r7, #22] + 801024a: e009 b.n 8010260 + dhcp->msg_out->file[i] = 0; + 801024c: 68bb ldr r3, [r7, #8] + 801024e: 691a ldr r2, [r3, #16] + 8010250: 8afb ldrh r3, [r7, #22] + 8010252: 4413 add r3, r2 + 8010254: 2200 movs r2, #0 + 8010256: f883 206c strb.w r2, [r3, #108] ; 0x6c + for (i = 0; i < DHCP_FILE_LEN; i++) { + 801025a: 8afb ldrh r3, [r7, #22] + 801025c: 3301 adds r3, #1 + 801025e: 82fb strh r3, [r7, #22] + 8010260: 8afb ldrh r3, [r7, #22] + 8010262: 2b7f cmp r3, #127 ; 0x7f + 8010264: d9f2 bls.n 801024c + } + dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); + 8010266: 68bb ldr r3, [r7, #8] + 8010268: 691b ldr r3, [r3, #16] + 801026a: 2200 movs r2, #0 + 801026c: f042 0263 orr.w r2, r2, #99 ; 0x63 + 8010270: f883 20ec strb.w r2, [r3, #236] ; 0xec + 8010274: 2200 movs r2, #0 + 8010276: f062 027d orn r2, r2, #125 ; 0x7d + 801027a: f883 20ed strb.w r2, [r3, #237] ; 0xed + 801027e: 2200 movs r2, #0 + 8010280: f042 0253 orr.w r2, r2, #83 ; 0x53 + 8010284: f883 20ee strb.w r2, [r3, #238] ; 0xee + 8010288: 2200 movs r2, #0 + 801028a: f042 0263 orr.w r2, r2, #99 ; 0x63 + 801028e: f883 20ef strb.w r2, [r3, #239] ; 0xef + dhcp->options_out_len = 0; + 8010292: 68bb ldr r3, [r7, #8] + 8010294: 2200 movs r2, #0 + 8010296: 829a strh r2, [r3, #20] + /* fill options field with an incrementing array (for debugging purposes) */ + for (i = 0; i < DHCP_OPTIONS_LEN; i++) { + 8010298: 2300 movs r3, #0 + 801029a: 82fb strh r3, [r7, #22] + 801029c: e00b b.n 80102b6 + dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ + 801029e: 68bb ldr r3, [r7, #8] + 80102a0: 691a ldr r2, [r3, #16] + 80102a2: 8afb ldrh r3, [r7, #22] + 80102a4: 8af9 ldrh r1, [r7, #22] + 80102a6: b2c9 uxtb r1, r1 + 80102a8: 4413 add r3, r2 + 80102aa: 460a mov r2, r1 + 80102ac: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + for (i = 0; i < DHCP_OPTIONS_LEN; i++) { + 80102b0: 8afb ldrh r3, [r7, #22] + 80102b2: 3301 adds r3, #1 + 80102b4: 82fb strh r3, [r7, #22] + 80102b6: 8afb ldrh r3, [r7, #22] + 80102b8: 2b43 cmp r3, #67 ; 0x43 + 80102ba: d9f0 bls.n 801029e + } + /* Add option MESSAGE_TYPE */ + dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); + 80102bc: 2201 movs r2, #1 + 80102be: 2135 movs r1, #53 ; 0x35 + 80102c0: 68b8 ldr r0, [r7, #8] + 80102c2: f7ff fa4b bl 800f75c + dhcp_option_byte(dhcp, message_type); + 80102c6: 79fb ldrb r3, [r7, #7] + 80102c8: 4619 mov r1, r3 + 80102ca: 68b8 ldr r0, [r7, #8] + 80102cc: f7ff fa80 bl 800f7d0 + return ERR_OK; + 80102d0: 2300 movs r3, #0 +} + 80102d2: 4618 mov r0, r3 + 80102d4: 371c adds r7, #28 + 80102d6: 46bd mov sp, r7 + 80102d8: bd90 pop {r4, r7, pc} + 80102da: bf00 nop + 80102dc: 08015a84 .word 0x08015a84 + 80102e0: 08015db4 .word 0x08015db4 + 80102e4: 08015ae4 .word 0x08015ae4 + 80102e8: 08015dd4 .word 0x08015dd4 + 80102ec: 08015df4 .word 0x08015df4 + 80102f0: 08015e1c .word 0x08015e1c + 80102f4: 08015e44 .word 0x08015e44 + 80102f8: 20006ff8 .word 0x20006ff8 + +080102fc : + * + * @param dhcp the dhcp struct to free the request from + */ +static void +dhcp_delete_msg(struct dhcp *dhcp) +{ + 80102fc: b580 push {r7, lr} + 80102fe: b082 sub sp, #8 + 8010300: af00 add r7, sp, #0 + 8010302: 6078 str r0, [r7, #4] + LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); + 8010304: 687b ldr r3, [r7, #4] + 8010306: 2b00 cmp r3, #0 + 8010308: d107 bne.n 801031a + 801030a: 4b18 ldr r3, [pc, #96] ; (801036c ) + 801030c: f240 726d movw r2, #1901 ; 0x76d + 8010310: 4917 ldr r1, [pc, #92] ; (8010370 ) + 8010312: 4818 ldr r0, [pc, #96] ; (8010374 ) + 8010314: f002 fd36 bl 8012d84 + 8010318: e024 b.n 8010364 + LWIP_ASSERT("dhcp_delete_msg: dhcp->p_out != NULL", dhcp->p_out != NULL); + 801031a: 687b ldr r3, [r7, #4] + 801031c: 68db ldr r3, [r3, #12] + 801031e: 2b00 cmp r3, #0 + 8010320: d106 bne.n 8010330 + 8010322: 4b12 ldr r3, [pc, #72] ; (801036c ) + 8010324: f240 726e movw r2, #1902 ; 0x76e + 8010328: 4913 ldr r1, [pc, #76] ; (8010378 ) + 801032a: 4812 ldr r0, [pc, #72] ; (8010374 ) + 801032c: f002 fd2a bl 8012d84 + LWIP_ASSERT("dhcp_delete_msg: dhcp->msg_out != NULL", dhcp->msg_out != NULL); + 8010330: 687b ldr r3, [r7, #4] + 8010332: 691b ldr r3, [r3, #16] + 8010334: 2b00 cmp r3, #0 + 8010336: d106 bne.n 8010346 + 8010338: 4b0c ldr r3, [pc, #48] ; (801036c ) + 801033a: f240 726f movw r2, #1903 ; 0x76f + 801033e: 490f ldr r1, [pc, #60] ; (801037c ) + 8010340: 480c ldr r0, [pc, #48] ; (8010374 ) + 8010342: f002 fd1f bl 8012d84 + if (dhcp->p_out != NULL) { + 8010346: 687b ldr r3, [r7, #4] + 8010348: 68db ldr r3, [r3, #12] + 801034a: 2b00 cmp r3, #0 + 801034c: d004 beq.n 8010358 + pbuf_free(dhcp->p_out); + 801034e: 687b ldr r3, [r7, #4] + 8010350: 68db ldr r3, [r3, #12] + 8010352: 4618 mov r0, r3 + 8010354: f7f7 fff6 bl 8008344 + } + dhcp->p_out = NULL; + 8010358: 687b ldr r3, [r7, #4] + 801035a: 2200 movs r2, #0 + 801035c: 60da str r2, [r3, #12] + dhcp->msg_out = NULL; + 801035e: 687b ldr r3, [r7, #4] + 8010360: 2200 movs r2, #0 + 8010362: 611a str r2, [r3, #16] +} + 8010364: 3708 adds r7, #8 + 8010366: 46bd mov sp, r7 + 8010368: bd80 pop {r7, pc} + 801036a: bf00 nop + 801036c: 08015a84 .word 0x08015a84 + 8010370: 08015e84 .word 0x08015e84 + 8010374: 08015ae4 .word 0x08015ae4 + 8010378: 08015ea4 .word 0x08015ea4 + 801037c: 08015ecc .word 0x08015ecc + +08010380 : + * + * @param dhcp DHCP state structure + */ +static void +dhcp_option_trailer(struct dhcp *dhcp) +{ + 8010380: b580 push {r7, lr} + 8010382: b082 sub sp, #8 + 8010384: af00 add r7, sp, #0 + 8010386: 6078 str r0, [r7, #4] + LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); + 8010388: 687b ldr r3, [r7, #4] + 801038a: 2b00 cmp r3, #0 + 801038c: d107 bne.n 801039e + 801038e: 4b24 ldr r3, [pc, #144] ; (8010420 ) + 8010390: f240 7282 movw r2, #1922 ; 0x782 + 8010394: 4923 ldr r1, [pc, #140] ; (8010424 ) + 8010396: 4824 ldr r0, [pc, #144] ; (8010428 ) + 8010398: f002 fcf4 bl 8012d84 + 801039c: e03c b.n 8010418 + LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); + 801039e: 687b ldr r3, [r7, #4] + 80103a0: 691b ldr r3, [r3, #16] + 80103a2: 2b00 cmp r3, #0 + 80103a4: d106 bne.n 80103b4 + 80103a6: 4b1e ldr r3, [pc, #120] ; (8010420 ) + 80103a8: f240 7283 movw r2, #1923 ; 0x783 + 80103ac: 491f ldr r1, [pc, #124] ; (801042c ) + 80103ae: 481e ldr r0, [pc, #120] ; (8010428 ) + 80103b0: f002 fce8 bl 8012d84 + LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); + 80103b4: 687b ldr r3, [r7, #4] + 80103b6: 8a9b ldrh r3, [r3, #20] + 80103b8: 2b43 cmp r3, #67 ; 0x43 + 80103ba: d906 bls.n 80103ca + 80103bc: 4b18 ldr r3, [pc, #96] ; (8010420 ) + 80103be: f240 7284 movw r2, #1924 ; 0x784 + 80103c2: 491b ldr r1, [pc, #108] ; (8010430 ) + 80103c4: 4818 ldr r0, [pc, #96] ; (8010428 ) + 80103c6: f002 fcdd bl 8012d84 + dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; + 80103ca: 687b ldr r3, [r7, #4] + 80103cc: 691a ldr r2, [r3, #16] + 80103ce: 687b ldr r3, [r7, #4] + 80103d0: 8a9b ldrh r3, [r3, #20] + 80103d2: 1c59 adds r1, r3, #1 + 80103d4: b288 uxth r0, r1 + 80103d6: 6879 ldr r1, [r7, #4] + 80103d8: 8288 strh r0, [r1, #20] + 80103da: 4413 add r3, r2 + 80103dc: 22ff movs r2, #255 ; 0xff + 80103de: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + /* packet is too small, or not 4 byte aligned? */ + while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && + 80103e2: e00b b.n 80103fc + (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { + /* add a fill/padding byte */ + dhcp->msg_out->options[dhcp->options_out_len++] = 0; + 80103e4: 687b ldr r3, [r7, #4] + 80103e6: 691a ldr r2, [r3, #16] + 80103e8: 687b ldr r3, [r7, #4] + 80103ea: 8a9b ldrh r3, [r3, #20] + 80103ec: 1c59 adds r1, r3, #1 + 80103ee: b288 uxth r0, r1 + 80103f0: 6879 ldr r1, [r7, #4] + 80103f2: 8288 strh r0, [r1, #20] + 80103f4: 4413 add r3, r2 + 80103f6: 2200 movs r2, #0 + 80103f8: f883 20f0 strb.w r2, [r3, #240] ; 0xf0 + while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && + 80103fc: 687b ldr r3, [r7, #4] + 80103fe: 8a9b ldrh r3, [r3, #20] + 8010400: 2b43 cmp r3, #67 ; 0x43 + 8010402: d905 bls.n 8010410 + 8010404: 687b ldr r3, [r7, #4] + 8010406: 8a9b ldrh r3, [r3, #20] + 8010408: f003 0303 and.w r3, r3, #3 + 801040c: 2b00 cmp r3, #0 + 801040e: d003 beq.n 8010418 + (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { + 8010410: 687b ldr r3, [r7, #4] + 8010412: 8a9b ldrh r3, [r3, #20] + while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && + 8010414: 2b43 cmp r3, #67 ; 0x43 + 8010416: d9e5 bls.n 80103e4 + } +} + 8010418: 3708 adds r7, #8 + 801041a: 46bd mov sp, r7 + 801041c: bd80 pop {r7, pc} + 801041e: bf00 nop + 8010420: 08015a84 .word 0x08015a84 + 8010424: 08015ef4 .word 0x08015ef4 + 8010428: 08015ae4 .word 0x08015ae4 + 801042c: 08015f18 .word 0x08015f18 + 8010430: 08015f44 .word 0x08015f44 + +08010434 : + * @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), + * 0 otherwise + */ +u8_t +dhcp_supplied_address(const struct netif *netif) +{ + 8010434: b480 push {r7} + 8010436: b085 sub sp, #20 + 8010438: af00 add r7, sp, #0 + 801043a: 6078 str r0, [r7, #4] + if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { + 801043c: 687b ldr r3, [r7, #4] + 801043e: 2b00 cmp r3, #0 + 8010440: d017 beq.n 8010472 + 8010442: 687b ldr r3, [r7, #4] + 8010444: 6a5b ldr r3, [r3, #36] ; 0x24 + 8010446: 2b00 cmp r3, #0 + 8010448: d013 beq.n 8010472 + struct dhcp* dhcp = netif_dhcp_data(netif); + 801044a: 687b ldr r3, [r7, #4] + 801044c: 6a5b ldr r3, [r3, #36] ; 0x24 + 801044e: 60fb str r3, [r7, #12] + return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || + 8010450: 68fb ldr r3, [r7, #12] + 8010452: 7a5b ldrb r3, [r3, #9] + 8010454: 2b0a cmp r3, #10 + 8010456: d007 beq.n 8010468 + 8010458: 68fb ldr r3, [r7, #12] + 801045a: 7a5b ldrb r3, [r3, #9] + 801045c: 2b05 cmp r3, #5 + 801045e: d003 beq.n 8010468 + (dhcp->state == DHCP_STATE_REBINDING); + 8010460: 68fb ldr r3, [r7, #12] + 8010462: 7a5b ldrb r3, [r3, #9] + return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || + 8010464: 2b04 cmp r3, #4 + 8010466: d101 bne.n 801046c + 8010468: 2301 movs r3, #1 + 801046a: e000 b.n 801046e + 801046c: 2300 movs r3, #0 + 801046e: b2db uxtb r3, r3 + 8010470: e000 b.n 8010474 + } + return 0; + 8010472: 2300 movs r3, #0 +} + 8010474: 4618 mov r0, r3 + 8010476: 3714 adds r7, #20 + 8010478: 46bd mov sp, r7 + 801047a: bc80 pop {r7} + 801047c: 4770 bx lr + ... + +08010480 : +#endif /* ARP_QUEUEING */ + +/** Clean up ARP table entries */ +static void +etharp_free_entry(int i) +{ + 8010480: b580 push {r7, lr} + 8010482: b082 sub sp, #8 + 8010484: af00 add r7, sp, #0 + 8010486: 6078 str r0, [r7, #4] + /* 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) { + 8010488: 4915 ldr r1, [pc, #84] ; (80104e0 ) + 801048a: 687a ldr r2, [r7, #4] + 801048c: 4613 mov r3, r2 + 801048e: 005b lsls r3, r3, #1 + 8010490: 4413 add r3, r2 + 8010492: 00db lsls r3, r3, #3 + 8010494: 440b add r3, r1 + 8010496: 681b ldr r3, [r3, #0] + 8010498: 2b00 cmp r3, #0 + 801049a: d013 beq.n 80104c4 + /* 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); + 801049c: 4910 ldr r1, [pc, #64] ; (80104e0 ) + 801049e: 687a ldr r2, [r7, #4] + 80104a0: 4613 mov r3, r2 + 80104a2: 005b lsls r3, r3, #1 + 80104a4: 4413 add r3, r2 + 80104a6: 00db lsls r3, r3, #3 + 80104a8: 440b add r3, r1 + 80104aa: 681b ldr r3, [r3, #0] + 80104ac: 4618 mov r0, r3 + 80104ae: f7f7 ff49 bl 8008344 + arp_table[i].q = NULL; + 80104b2: 490b ldr r1, [pc, #44] ; (80104e0 ) + 80104b4: 687a ldr r2, [r7, #4] + 80104b6: 4613 mov r3, r2 + 80104b8: 005b lsls r3, r3, #1 + 80104ba: 4413 add r3, r2 + 80104bc: 00db lsls r3, r3, #3 + 80104be: 440b add r3, r1 + 80104c0: 2200 movs r2, #0 + 80104c2: 601a str r2, [r3, #0] + } + /* recycle entry for re-use */ + arp_table[i].state = ETHARP_STATE_EMPTY; + 80104c4: 4906 ldr r1, [pc, #24] ; (80104e0 ) + 80104c6: 687a ldr r2, [r7, #4] + 80104c8: 4613 mov r3, r2 + 80104ca: 005b lsls r3, r3, #1 + 80104cc: 4413 add r3, r2 + 80104ce: 00db lsls r3, r3, #3 + 80104d0: 440b add r3, r1 + 80104d2: 3314 adds r3, #20 + 80104d4: 2200 movs r2, #0 + 80104d6: 701a strb r2, [r3, #0] + arp_table[i].ctime = 0; + arp_table[i].netif = NULL; + ip4_addr_set_zero(&arp_table[i].ipaddr); + arp_table[i].ethaddr = ethzero; +#endif /* LWIP_DEBUG */ +} + 80104d8: bf00 nop + 80104da: 3708 adds r7, #8 + 80104dc: 46bd mov sp, r7 + 80104de: bd80 pop {r7, pc} + 80104e0: 20006ffc .word 0x20006ffc + +080104e4 : + * This function should be called every ARP_TMR_INTERVAL milliseconds (1 second), + * in order to expire entries in the ARP table. + */ +void +etharp_tmr(void) +{ + 80104e4: b580 push {r7, lr} + 80104e6: b082 sub sp, #8 + 80104e8: af00 add r7, sp, #0 + u8_t i; + + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); + /* remove expired entries from the ARP table */ + for (i = 0; i < ARP_TABLE_SIZE; ++i) { + 80104ea: 2300 movs r3, #0 + 80104ec: 71fb strb r3, [r7, #7] + 80104ee: e096 b.n 801061e + u8_t state = arp_table[i].state; + 80104f0: 79fa ldrb r2, [r7, #7] + 80104f2: 494f ldr r1, [pc, #316] ; (8010630 ) + 80104f4: 4613 mov r3, r2 + 80104f6: 005b lsls r3, r3, #1 + 80104f8: 4413 add r3, r2 + 80104fa: 00db lsls r3, r3, #3 + 80104fc: 440b add r3, r1 + 80104fe: 3314 adds r3, #20 + 8010500: 781b ldrb r3, [r3, #0] + 8010502: 71bb strb r3, [r7, #6] + if (state != ETHARP_STATE_EMPTY + 8010504: 79bb ldrb r3, [r7, #6] + 8010506: 2b00 cmp r3, #0 + 8010508: f000 8086 beq.w 8010618 +#if ETHARP_SUPPORT_STATIC_ENTRIES + && (state != ETHARP_STATE_STATIC) +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ + ) { + arp_table[i].ctime++; + 801050c: 79fa ldrb r2, [r7, #7] + 801050e: 4948 ldr r1, [pc, #288] ; (8010630 ) + 8010510: 4613 mov r3, r2 + 8010512: 005b lsls r3, r3, #1 + 8010514: 4413 add r3, r2 + 8010516: 00db lsls r3, r3, #3 + 8010518: 440b add r3, r1 + 801051a: 3312 adds r3, #18 + 801051c: 881b ldrh r3, [r3, #0] + 801051e: 3301 adds r3, #1 + 8010520: b298 uxth r0, r3 + 8010522: 4943 ldr r1, [pc, #268] ; (8010630 ) + 8010524: 4613 mov r3, r2 + 8010526: 005b lsls r3, r3, #1 + 8010528: 4413 add r3, r2 + 801052a: 00db lsls r3, r3, #3 + 801052c: 440b add r3, r1 + 801052e: 3312 adds r3, #18 + 8010530: 4602 mov r2, r0 + 8010532: 801a strh r2, [r3, #0] + if ((arp_table[i].ctime >= ARP_MAXAGE) || + 8010534: 79fa ldrb r2, [r7, #7] + 8010536: 493e ldr r1, [pc, #248] ; (8010630 ) + 8010538: 4613 mov r3, r2 + 801053a: 005b lsls r3, r3, #1 + 801053c: 4413 add r3, r2 + 801053e: 00db lsls r3, r3, #3 + 8010540: 440b add r3, r1 + 8010542: 3312 adds r3, #18 + 8010544: 881b ldrh r3, [r3, #0] + 8010546: f5b3 7f96 cmp.w r3, #300 ; 0x12c + 801054a: d215 bcs.n 8010578 + ((arp_table[i].state == ETHARP_STATE_PENDING) && + 801054c: 79fa ldrb r2, [r7, #7] + 801054e: 4938 ldr r1, [pc, #224] ; (8010630 ) + 8010550: 4613 mov r3, r2 + 8010552: 005b lsls r3, r3, #1 + 8010554: 4413 add r3, r2 + 8010556: 00db lsls r3, r3, #3 + 8010558: 440b add r3, r1 + 801055a: 3314 adds r3, #20 + 801055c: 781b ldrb r3, [r3, #0] + if ((arp_table[i].ctime >= ARP_MAXAGE) || + 801055e: 2b01 cmp r3, #1 + 8010560: d10f bne.n 8010582 + (arp_table[i].ctime >= ARP_MAXPENDING))) { + 8010562: 79fa ldrb r2, [r7, #7] + 8010564: 4932 ldr r1, [pc, #200] ; (8010630 ) + 8010566: 4613 mov r3, r2 + 8010568: 005b lsls r3, r3, #1 + 801056a: 4413 add r3, r2 + 801056c: 00db lsls r3, r3, #3 + 801056e: 440b add r3, r1 + 8010570: 3312 adds r3, #18 + 8010572: 881b ldrh r3, [r3, #0] + ((arp_table[i].state == ETHARP_STATE_PENDING) && + 8010574: 2b04 cmp r3, #4 + 8010576: d904 bls.n 8010582 + /* pending or stable entry has become old! */ + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %"U16_F".\n", + arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", (u16_t)i)); + /* clean up entries that have just been expired */ + etharp_free_entry(i); + 8010578: 79fb ldrb r3, [r7, #7] + 801057a: 4618 mov r0, r3 + 801057c: f7ff ff80 bl 8010480 + 8010580: e04a b.n 8010618 + } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { + 8010582: 79fa ldrb r2, [r7, #7] + 8010584: 492a ldr r1, [pc, #168] ; (8010630 ) + 8010586: 4613 mov r3, r2 + 8010588: 005b lsls r3, r3, #1 + 801058a: 4413 add r3, r2 + 801058c: 00db lsls r3, r3, #3 + 801058e: 440b add r3, r1 + 8010590: 3314 adds r3, #20 + 8010592: 781b ldrb r3, [r3, #0] + 8010594: 2b03 cmp r3, #3 + 8010596: d10a bne.n 80105ae + /* Don't send more than one request every 2 seconds. */ + arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; + 8010598: 79fa ldrb r2, [r7, #7] + 801059a: 4925 ldr r1, [pc, #148] ; (8010630 ) + 801059c: 4613 mov r3, r2 + 801059e: 005b lsls r3, r3, #1 + 80105a0: 4413 add r3, r2 + 80105a2: 00db lsls r3, r3, #3 + 80105a4: 440b add r3, r1 + 80105a6: 3314 adds r3, #20 + 80105a8: 2204 movs r2, #4 + 80105aa: 701a strb r2, [r3, #0] + 80105ac: e034 b.n 8010618 + } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { + 80105ae: 79fa ldrb r2, [r7, #7] + 80105b0: 491f ldr r1, [pc, #124] ; (8010630 ) + 80105b2: 4613 mov r3, r2 + 80105b4: 005b lsls r3, r3, #1 + 80105b6: 4413 add r3, r2 + 80105b8: 00db lsls r3, r3, #3 + 80105ba: 440b add r3, r1 + 80105bc: 3314 adds r3, #20 + 80105be: 781b ldrb r3, [r3, #0] + 80105c0: 2b04 cmp r3, #4 + 80105c2: d10a bne.n 80105da + /* Reset state to stable, so that the next transmitted packet will + re-send an ARP request. */ + arp_table[i].state = ETHARP_STATE_STABLE; + 80105c4: 79fa ldrb r2, [r7, #7] + 80105c6: 491a ldr r1, [pc, #104] ; (8010630 ) + 80105c8: 4613 mov r3, r2 + 80105ca: 005b lsls r3, r3, #1 + 80105cc: 4413 add r3, r2 + 80105ce: 00db lsls r3, r3, #3 + 80105d0: 440b add r3, r1 + 80105d2: 3314 adds r3, #20 + 80105d4: 2202 movs r2, #2 + 80105d6: 701a strb r2, [r3, #0] + 80105d8: e01e b.n 8010618 + } else if (arp_table[i].state == ETHARP_STATE_PENDING) { + 80105da: 79fa ldrb r2, [r7, #7] + 80105dc: 4914 ldr r1, [pc, #80] ; (8010630 ) + 80105de: 4613 mov r3, r2 + 80105e0: 005b lsls r3, r3, #1 + 80105e2: 4413 add r3, r2 + 80105e4: 00db lsls r3, r3, #3 + 80105e6: 440b add r3, r1 + 80105e8: 3314 adds r3, #20 + 80105ea: 781b ldrb r3, [r3, #0] + 80105ec: 2b01 cmp r3, #1 + 80105ee: d113 bne.n 8010618 + /* still pending, resend an ARP query */ + etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); + 80105f0: 79fa ldrb r2, [r7, #7] + 80105f2: 490f ldr r1, [pc, #60] ; (8010630 ) + 80105f4: 4613 mov r3, r2 + 80105f6: 005b lsls r3, r3, #1 + 80105f8: 4413 add r3, r2 + 80105fa: 00db lsls r3, r3, #3 + 80105fc: 440b add r3, r1 + 80105fe: 3308 adds r3, #8 + 8010600: 6818 ldr r0, [r3, #0] + 8010602: 79fa ldrb r2, [r7, #7] + 8010604: 4613 mov r3, r2 + 8010606: 005b lsls r3, r3, #1 + 8010608: 4413 add r3, r2 + 801060a: 00db lsls r3, r3, #3 + 801060c: 4a08 ldr r2, [pc, #32] ; (8010630 ) + 801060e: 4413 add r3, r2 + 8010610: 3304 adds r3, #4 + 8010612: 4619 mov r1, r3 + 8010614: f000 fe3c bl 8011290 + for (i = 0; i < ARP_TABLE_SIZE; ++i) { + 8010618: 79fb ldrb r3, [r7, #7] + 801061a: 3301 adds r3, #1 + 801061c: 71fb strb r3, [r7, #7] + 801061e: 79fb ldrb r3, [r7, #7] + 8010620: 2b09 cmp r3, #9 + 8010622: f67f af65 bls.w 80104f0 + } + } + } +} + 8010626: bf00 nop + 8010628: bf00 nop + 801062a: 3708 adds r7, #8 + 801062c: 46bd mov sp, r7 + 801062e: bd80 pop {r7, pc} + 8010630: 20006ffc .word 0x20006ffc + +08010634 : + * @return The ARP entry index that matched or is created, ERR_MEM if no + * entry is found or could be recycled. + */ +static s8_t +etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) +{ + 8010634: b580 push {r7, lr} + 8010636: b088 sub sp, #32 + 8010638: af00 add r7, sp, #0 + 801063a: 60f8 str r0, [r7, #12] + 801063c: 460b mov r3, r1 + 801063e: 607a str r2, [r7, #4] + 8010640: 72fb strb r3, [r7, #11] + s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; + 8010642: 230a movs r3, #10 + 8010644: 77fb strb r3, [r7, #31] + 8010646: 230a movs r3, #10 + 8010648: 77bb strb r3, [r7, #30] + s8_t empty = ARP_TABLE_SIZE; + 801064a: 230a movs r3, #10 + 801064c: 777b strb r3, [r7, #29] + u8_t i = 0; + 801064e: 2300 movs r3, #0 + 8010650: 773b strb r3, [r7, #28] + /* oldest entry with packets on queue */ + s8_t old_queue = ARP_TABLE_SIZE; + 8010652: 230a movs r3, #10 + 8010654: 76fb strb r3, [r7, #27] + /* its age */ + u16_t age_queue = 0, age_pending = 0, age_stable = 0; + 8010656: 2300 movs r3, #0 + 8010658: 833b strh r3, [r7, #24] + 801065a: 2300 movs r3, #0 + 801065c: 82fb strh r3, [r7, #22] + 801065e: 2300 movs r3, #0 + 8010660: 82bb strh r3, [r7, #20] + * 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) { + 8010662: 2300 movs r3, #0 + 8010664: 773b strb r3, [r7, #28] + 8010666: e093 b.n 8010790 + u8_t state = arp_table[i].state; + 8010668: 7f3a ldrb r2, [r7, #28] + 801066a: 4990 ldr r1, [pc, #576] ; (80108ac ) + 801066c: 4613 mov r3, r2 + 801066e: 005b lsls r3, r3, #1 + 8010670: 4413 add r3, r2 + 8010672: 00db lsls r3, r3, #3 + 8010674: 440b add r3, r1 + 8010676: 3314 adds r3, #20 + 8010678: 781b ldrb r3, [r3, #0] + 801067a: 74fb strb r3, [r7, #19] + /* no empty entry found yet and now we do find one? */ + if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { + 801067c: f997 301d ldrsb.w r3, [r7, #29] + 8010680: 2b0a cmp r3, #10 + 8010682: d105 bne.n 8010690 + 8010684: 7cfb ldrb r3, [r7, #19] + 8010686: 2b00 cmp r3, #0 + 8010688: d102 bne.n 8010690 + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); + /* remember first empty entry */ + empty = i; + 801068a: 7f3b ldrb r3, [r7, #28] + 801068c: 777b strb r3, [r7, #29] + 801068e: e07c b.n 801078a + } else if (state != ETHARP_STATE_EMPTY) { + 8010690: 7cfb ldrb r3, [r7, #19] + 8010692: 2b00 cmp r3, #0 + 8010694: d079 beq.n 801078a + LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", + 8010696: 7cfb ldrb r3, [r7, #19] + 8010698: 2b01 cmp r3, #1 + 801069a: d009 beq.n 80106b0 + 801069c: 7cfb ldrb r3, [r7, #19] + 801069e: 2b01 cmp r3, #1 + 80106a0: d806 bhi.n 80106b0 + 80106a2: 4b83 ldr r3, [pc, #524] ; (80108b0 ) + 80106a4: f240 1225 movw r2, #293 ; 0x125 + 80106a8: 4982 ldr r1, [pc, #520] ; (80108b4 ) + 80106aa: 4883 ldr r0, [pc, #524] ; (80108b8 ) + 80106ac: f002 fb6a bl 8012d84 + 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) + 80106b0: 68fb ldr r3, [r7, #12] + 80106b2: 2b00 cmp r3, #0 + 80106b4: d00f beq.n 80106d6 + 80106b6: 68fb ldr r3, [r7, #12] + 80106b8: 6819 ldr r1, [r3, #0] + 80106ba: 7f3a ldrb r2, [r7, #28] + 80106bc: 487b ldr r0, [pc, #492] ; (80108ac ) + 80106be: 4613 mov r3, r2 + 80106c0: 005b lsls r3, r3, #1 + 80106c2: 4413 add r3, r2 + 80106c4: 00db lsls r3, r3, #3 + 80106c6: 4403 add r3, r0 + 80106c8: 3304 adds r3, #4 + 80106ca: 681b ldr r3, [r3, #0] + 80106cc: 4299 cmp r1, r3 + 80106ce: d102 bne.n 80106d6 + && ((netif == NULL) || (netif == arp_table[i].netif)) +#endif /* ETHARP_TABLE_MATCH_NETIF */ + ) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %"U16_F"\n", (u16_t)i)); + /* found exact IP address match, simply bail out */ + return i; + 80106d0: f997 301c ldrsb.w r3, [r7, #28] + 80106d4: e0e5 b.n 80108a2 + } + /* pending entry? */ + if (state == ETHARP_STATE_PENDING) { + 80106d6: 7cfb ldrb r3, [r7, #19] + 80106d8: 2b01 cmp r3, #1 + 80106da: d13b bne.n 8010754 + /* pending with queued packets? */ + if (arp_table[i].q != NULL) { + 80106dc: 7f3a ldrb r2, [r7, #28] + 80106de: 4973 ldr r1, [pc, #460] ; (80108ac ) + 80106e0: 4613 mov r3, r2 + 80106e2: 005b lsls r3, r3, #1 + 80106e4: 4413 add r3, r2 + 80106e6: 00db lsls r3, r3, #3 + 80106e8: 440b add r3, r1 + 80106ea: 681b ldr r3, [r3, #0] + 80106ec: 2b00 cmp r3, #0 + 80106ee: d018 beq.n 8010722 + if (arp_table[i].ctime >= age_queue) { + 80106f0: 7f3a ldrb r2, [r7, #28] + 80106f2: 496e ldr r1, [pc, #440] ; (80108ac ) + 80106f4: 4613 mov r3, r2 + 80106f6: 005b lsls r3, r3, #1 + 80106f8: 4413 add r3, r2 + 80106fa: 00db lsls r3, r3, #3 + 80106fc: 440b add r3, r1 + 80106fe: 3312 adds r3, #18 + 8010700: 881b ldrh r3, [r3, #0] + 8010702: 8b3a ldrh r2, [r7, #24] + 8010704: 429a cmp r2, r3 + 8010706: d840 bhi.n 801078a + old_queue = i; + 8010708: 7f3b ldrb r3, [r7, #28] + 801070a: 76fb strb r3, [r7, #27] + age_queue = arp_table[i].ctime; + 801070c: 7f3a ldrb r2, [r7, #28] + 801070e: 4967 ldr r1, [pc, #412] ; (80108ac ) + 8010710: 4613 mov r3, r2 + 8010712: 005b lsls r3, r3, #1 + 8010714: 4413 add r3, r2 + 8010716: 00db lsls r3, r3, #3 + 8010718: 440b add r3, r1 + 801071a: 3312 adds r3, #18 + 801071c: 881b ldrh r3, [r3, #0] + 801071e: 833b strh r3, [r7, #24] + 8010720: e033 b.n 801078a + } + } else + /* pending without queued packets? */ + { + if (arp_table[i].ctime >= age_pending) { + 8010722: 7f3a ldrb r2, [r7, #28] + 8010724: 4961 ldr r1, [pc, #388] ; (80108ac ) + 8010726: 4613 mov r3, r2 + 8010728: 005b lsls r3, r3, #1 + 801072a: 4413 add r3, r2 + 801072c: 00db lsls r3, r3, #3 + 801072e: 440b add r3, r1 + 8010730: 3312 adds r3, #18 + 8010732: 881b ldrh r3, [r3, #0] + 8010734: 8afa ldrh r2, [r7, #22] + 8010736: 429a cmp r2, r3 + 8010738: d827 bhi.n 801078a + old_pending = i; + 801073a: 7f3b ldrb r3, [r7, #28] + 801073c: 77fb strb r3, [r7, #31] + age_pending = arp_table[i].ctime; + 801073e: 7f3a ldrb r2, [r7, #28] + 8010740: 495a ldr r1, [pc, #360] ; (80108ac ) + 8010742: 4613 mov r3, r2 + 8010744: 005b lsls r3, r3, #1 + 8010746: 4413 add r3, r2 + 8010748: 00db lsls r3, r3, #3 + 801074a: 440b add r3, r1 + 801074c: 3312 adds r3, #18 + 801074e: 881b ldrh r3, [r3, #0] + 8010750: 82fb strh r3, [r7, #22] + 8010752: e01a b.n 801078a + } + } + /* stable entry? */ + } else if (state >= ETHARP_STATE_STABLE) { + 8010754: 7cfb ldrb r3, [r7, #19] + 8010756: 2b01 cmp r3, #1 + 8010758: d917 bls.n 801078a + /* 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) { + 801075a: 7f3a ldrb r2, [r7, #28] + 801075c: 4953 ldr r1, [pc, #332] ; (80108ac ) + 801075e: 4613 mov r3, r2 + 8010760: 005b lsls r3, r3, #1 + 8010762: 4413 add r3, r2 + 8010764: 00db lsls r3, r3, #3 + 8010766: 440b add r3, r1 + 8010768: 3312 adds r3, #18 + 801076a: 881b ldrh r3, [r3, #0] + 801076c: 8aba ldrh r2, [r7, #20] + 801076e: 429a cmp r2, r3 + 8010770: d80b bhi.n 801078a + old_stable = i; + 8010772: 7f3b ldrb r3, [r7, #28] + 8010774: 77bb strb r3, [r7, #30] + age_stable = arp_table[i].ctime; + 8010776: 7f3a ldrb r2, [r7, #28] + 8010778: 494c ldr r1, [pc, #304] ; (80108ac ) + 801077a: 4613 mov r3, r2 + 801077c: 005b lsls r3, r3, #1 + 801077e: 4413 add r3, r2 + 8010780: 00db lsls r3, r3, #3 + 8010782: 440b add r3, r1 + 8010784: 3312 adds r3, #18 + 8010786: 881b ldrh r3, [r3, #0] + 8010788: 82bb strh r3, [r7, #20] + for (i = 0; i < ARP_TABLE_SIZE; ++i) { + 801078a: 7f3b ldrb r3, [r7, #28] + 801078c: 3301 adds r3, #1 + 801078e: 773b strb r3, [r7, #28] + 8010790: 7f3b ldrb r3, [r7, #28] + 8010792: 2b09 cmp r3, #9 + 8010794: f67f af68 bls.w 8010668 + } + } + /* { we have no match } => try to create a new entry */ + + /* don't create new entry, only search? */ + if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || + 8010798: 7afb ldrb r3, [r7, #11] + 801079a: f003 0302 and.w r3, r3, #2 + 801079e: 2b00 cmp r3, #0 + 80107a0: d108 bne.n 80107b4 + 80107a2: f997 301d ldrsb.w r3, [r7, #29] + 80107a6: 2b0a cmp r3, #10 + 80107a8: d107 bne.n 80107ba + /* or no empty entry found and not allowed to recycle? */ + ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { + 80107aa: 7afb ldrb r3, [r7, #11] + 80107ac: f003 0301 and.w r3, r3, #1 + 80107b0: 2b00 cmp r3, #0 + 80107b2: d102 bne.n 80107ba + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n")); + return (s8_t)ERR_MEM; + 80107b4: f04f 33ff mov.w r3, #4294967295 + 80107b8: e073 b.n 80108a2 + * + * { ETHARP_FLAG_TRY_HARD is set at this point } + */ + + /* 1) empty entry available? */ + if (empty < ARP_TABLE_SIZE) { + 80107ba: f997 301d ldrsb.w r3, [r7, #29] + 80107be: 2b09 cmp r3, #9 + 80107c0: dc02 bgt.n 80107c8 + i = empty; + 80107c2: 7f7b ldrb r3, [r7, #29] + 80107c4: 773b strb r3, [r7, #28] + 80107c6: e036 b.n 8010836 + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %"U16_F"\n", (u16_t)i)); + } else { + /* 2) found recyclable stable entry? */ + if (old_stable < ARP_TABLE_SIZE) { + 80107c8: f997 301e ldrsb.w r3, [r7, #30] + 80107cc: 2b09 cmp r3, #9 + 80107ce: dc13 bgt.n 80107f8 + /* recycle oldest stable*/ + i = old_stable; + 80107d0: 7fbb ldrb r3, [r7, #30] + 80107d2: 773b strb r3, [r7, #28] + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %"U16_F"\n", (u16_t)i)); + /* no queued packets should exist on stable entries */ + LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); + 80107d4: 7f3a ldrb r2, [r7, #28] + 80107d6: 4935 ldr r1, [pc, #212] ; (80108ac ) + 80107d8: 4613 mov r3, r2 + 80107da: 005b lsls r3, r3, #1 + 80107dc: 4413 add r3, r2 + 80107de: 00db lsls r3, r3, #3 + 80107e0: 440b add r3, r1 + 80107e2: 681b ldr r3, [r3, #0] + 80107e4: 2b00 cmp r3, #0 + 80107e6: d018 beq.n 801081a + 80107e8: 4b31 ldr r3, [pc, #196] ; (80108b0 ) + 80107ea: f240 126f movw r2, #367 ; 0x16f + 80107ee: 4933 ldr r1, [pc, #204] ; (80108bc ) + 80107f0: 4831 ldr r0, [pc, #196] ; (80108b8 ) + 80107f2: f002 fac7 bl 8012d84 + 80107f6: e010 b.n 801081a + /* 3) found recyclable pending entry without queued packets? */ + } else if (old_pending < ARP_TABLE_SIZE) { + 80107f8: f997 301f ldrsb.w r3, [r7, #31] + 80107fc: 2b09 cmp r3, #9 + 80107fe: dc02 bgt.n 8010806 + /* recycle oldest pending */ + i = old_pending; + 8010800: 7ffb ldrb r3, [r7, #31] + 8010802: 773b strb r3, [r7, #28] + 8010804: e009 b.n 801081a + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F" (without queue)\n", (u16_t)i)); + /* 4) found recyclable pending entry with queued packets? */ + } else if (old_queue < ARP_TABLE_SIZE) { + 8010806: f997 301b ldrsb.w r3, [r7, #27] + 801080a: 2b09 cmp r3, #9 + 801080c: dc02 bgt.n 8010814 + /* recycle oldest pending (queued packets are free in etharp_free_entry) */ + i = old_queue; + 801080e: 7efb ldrb r3, [r7, #27] + 8010810: 773b strb r3, [r7, #28] + 8010812: e002 b.n 801081a + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F", freeing packet queue %p\n", (u16_t)i, (void *)(arp_table[i].q))); + /* no empty or recyclable entries found */ + } else { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty or recyclable entries found\n")); + return (s8_t)ERR_MEM; + 8010814: f04f 33ff mov.w r3, #4294967295 + 8010818: e043 b.n 80108a2 + } + + /* { empty or recyclable entry found } */ + LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); + 801081a: 7f3b ldrb r3, [r7, #28] + 801081c: 2b09 cmp r3, #9 + 801081e: d906 bls.n 801082e + 8010820: 4b23 ldr r3, [pc, #140] ; (80108b0 ) + 8010822: f240 1281 movw r2, #385 ; 0x181 + 8010826: 4926 ldr r1, [pc, #152] ; (80108c0 ) + 8010828: 4823 ldr r0, [pc, #140] ; (80108b8 ) + 801082a: f002 faab bl 8012d84 + etharp_free_entry(i); + 801082e: 7f3b ldrb r3, [r7, #28] + 8010830: 4618 mov r0, r3 + 8010832: f7ff fe25 bl 8010480 + } + + LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); + 8010836: 7f3b ldrb r3, [r7, #28] + 8010838: 2b09 cmp r3, #9 + 801083a: d906 bls.n 801084a + 801083c: 4b1c ldr r3, [pc, #112] ; (80108b0 ) + 801083e: f240 1285 movw r2, #389 ; 0x185 + 8010842: 491f ldr r1, [pc, #124] ; (80108c0 ) + 8010844: 481c ldr r0, [pc, #112] ; (80108b8 ) + 8010846: f002 fa9d bl 8012d84 + LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", + 801084a: 7f3a ldrb r2, [r7, #28] + 801084c: 4917 ldr r1, [pc, #92] ; (80108ac ) + 801084e: 4613 mov r3, r2 + 8010850: 005b lsls r3, r3, #1 + 8010852: 4413 add r3, r2 + 8010854: 00db lsls r3, r3, #3 + 8010856: 440b add r3, r1 + 8010858: 3314 adds r3, #20 + 801085a: 781b ldrb r3, [r3, #0] + 801085c: 2b00 cmp r3, #0 + 801085e: d006 beq.n 801086e + 8010860: 4b13 ldr r3, [pc, #76] ; (80108b0 ) + 8010862: f44f 72c3 mov.w r2, #390 ; 0x186 + 8010866: 4917 ldr r1, [pc, #92] ; (80108c4 ) + 8010868: 4813 ldr r0, [pc, #76] ; (80108b8 ) + 801086a: f002 fa8b bl 8012d84 + arp_table[i].state == ETHARP_STATE_EMPTY); + + /* IP address given? */ + if (ipaddr != NULL) { + 801086e: 68fb ldr r3, [r7, #12] + 8010870: 2b00 cmp r3, #0 + 8010872: d00a beq.n 801088a + /* set IP address */ + ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); + 8010874: 7f3a ldrb r2, [r7, #28] + 8010876: 68fb ldr r3, [r7, #12] + 8010878: 6819 ldr r1, [r3, #0] + 801087a: 480c ldr r0, [pc, #48] ; (80108ac ) + 801087c: 4613 mov r3, r2 + 801087e: 005b lsls r3, r3, #1 + 8010880: 4413 add r3, r2 + 8010882: 00db lsls r3, r3, #3 + 8010884: 4403 add r3, r0 + 8010886: 3304 adds r3, #4 + 8010888: 6019 str r1, [r3, #0] + } + arp_table[i].ctime = 0; + 801088a: 7f3a ldrb r2, [r7, #28] + 801088c: 4907 ldr r1, [pc, #28] ; (80108ac ) + 801088e: 4613 mov r3, r2 + 8010890: 005b lsls r3, r3, #1 + 8010892: 4413 add r3, r2 + 8010894: 00db lsls r3, r3, #3 + 8010896: 440b add r3, r1 + 8010898: 3312 adds r3, #18 + 801089a: 2200 movs r2, #0 + 801089c: 801a strh r2, [r3, #0] +#if ETHARP_TABLE_MATCH_NETIF + arp_table[i].netif = netif; +#endif /* ETHARP_TABLE_MATCH_NETIF*/ + return (err_t)i; + 801089e: f997 301c ldrsb.w r3, [r7, #28] +} + 80108a2: 4618 mov r0, r3 + 80108a4: 3720 adds r7, #32 + 80108a6: 46bd mov sp, r7 + 80108a8: bd80 pop {r7, pc} + 80108aa: bf00 nop + 80108ac: 20006ffc .word 0x20006ffc + 80108b0: 08015f84 .word 0x08015f84 + 80108b4: 08015fbc .word 0x08015fbc + 80108b8: 08015ffc .word 0x08015ffc + 80108bc: 08016024 .word 0x08016024 + 80108c0: 0801603c .word 0x0801603c + 80108c4: 08016050 .word 0x08016050 + +080108c8 : + * + * @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) +{ + 80108c8: b580 push {r7, lr} + 80108ca: b088 sub sp, #32 + 80108cc: af02 add r7, sp, #8 + 80108ce: 60f8 str r0, [r7, #12] + 80108d0: 60b9 str r1, [r7, #8] + 80108d2: 607a str r2, [r7, #4] + 80108d4: 70fb strb r3, [r7, #3] + s8_t i; + LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); + 80108d6: 68fb ldr r3, [r7, #12] + 80108d8: f893 302c ldrb.w r3, [r3, #44] ; 0x2c + 80108dc: 2b06 cmp r3, #6 + 80108de: d006 beq.n 80108ee + 80108e0: 4b48 ldr r3, [pc, #288] ; (8010a04 ) + 80108e2: f240 12ab movw r2, #427 ; 0x1ab + 80108e6: 4948 ldr r1, [pc, #288] ; (8010a08 ) + 80108e8: 4848 ldr r0, [pc, #288] ; (8010a0c ) + 80108ea: f002 fa4b bl 8012d84 + 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) || + 80108ee: 68bb ldr r3, [r7, #8] + 80108f0: 2b00 cmp r3, #0 + 80108f2: d012 beq.n 801091a + 80108f4: 68bb ldr r3, [r7, #8] + 80108f6: 681b ldr r3, [r3, #0] + 80108f8: 2b00 cmp r3, #0 + 80108fa: d00e beq.n 801091a + ip4_addr_isbroadcast(ipaddr, netif) || + 80108fc: 68bb ldr r3, [r7, #8] + 80108fe: 681b ldr r3, [r3, #0] + 8010900: 68f9 ldr r1, [r7, #12] + 8010902: 4618 mov r0, r3 + 8010904: f001 f8fe bl 8011b04 + 8010908: 4603 mov r3, r0 + if (ip4_addr_isany(ipaddr) || + 801090a: 2b00 cmp r3, #0 + 801090c: d105 bne.n 801091a + ip4_addr_ismulticast(ipaddr)) { + 801090e: 68bb ldr r3, [r7, #8] + 8010910: 681b ldr r3, [r3, #0] + 8010912: f003 03f0 and.w r3, r3, #240 ; 0xf0 + ip4_addr_isbroadcast(ipaddr, netif) || + 8010916: 2be0 cmp r3, #224 ; 0xe0 + 8010918: d102 bne.n 8010920 + 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; + 801091a: f06f 030f mvn.w r3, #15 + 801091e: e06c b.n 80109fa + } + /* find or create ARP entry */ + i = etharp_find_entry(ipaddr, flags, netif); + 8010920: 78fb ldrb r3, [r7, #3] + 8010922: 68fa ldr r2, [r7, #12] + 8010924: 4619 mov r1, r3 + 8010926: 68b8 ldr r0, [r7, #8] + 8010928: f7ff fe84 bl 8010634 + 801092c: 4603 mov r3, r0 + 801092e: 75fb strb r3, [r7, #23] + /* bail out if no entry could be found */ + if (i < 0) { + 8010930: f997 3017 ldrsb.w r3, [r7, #23] + 8010934: 2b00 cmp r3, #0 + 8010936: da02 bge.n 801093e + return (err_t)i; + 8010938: f997 3017 ldrsb.w r3, [r7, #23] + 801093c: e05d b.n 80109fa + return ERR_VAL; + } else +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ + { + /* mark it stable */ + arp_table[i].state = ETHARP_STATE_STABLE; + 801093e: f997 2017 ldrsb.w r2, [r7, #23] + 8010942: 4933 ldr r1, [pc, #204] ; (8010a10 ) + 8010944: 4613 mov r3, r2 + 8010946: 005b lsls r3, r3, #1 + 8010948: 4413 add r3, r2 + 801094a: 00db lsls r3, r3, #3 + 801094c: 440b add r3, r1 + 801094e: 3314 adds r3, #20 + 8010950: 2202 movs r2, #2 + 8010952: 701a strb r2, [r3, #0] + } + + /* record network interface */ + arp_table[i].netif = netif; + 8010954: f997 2017 ldrsb.w r2, [r7, #23] + 8010958: 492d ldr r1, [pc, #180] ; (8010a10 ) + 801095a: 4613 mov r3, r2 + 801095c: 005b lsls r3, r3, #1 + 801095e: 4413 add r3, r2 + 8010960: 00db lsls r3, r3, #3 + 8010962: 440b add r3, r1 + 8010964: 3308 adds r3, #8 + 8010966: 68fa ldr r2, [r7, #12] + 8010968: 601a str r2, [r3, #0] + /* 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", (s16_t)i)); + /* update address */ + ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); + 801096a: f997 2017 ldrsb.w r2, [r7, #23] + 801096e: 4613 mov r3, r2 + 8010970: 005b lsls r3, r3, #1 + 8010972: 4413 add r3, r2 + 8010974: 00db lsls r3, r3, #3 + 8010976: 3308 adds r3, #8 + 8010978: 4a25 ldr r2, [pc, #148] ; (8010a10 ) + 801097a: 4413 add r3, r2 + 801097c: 3304 adds r3, #4 + 801097e: 2206 movs r2, #6 + 8010980: 6879 ldr r1, [r7, #4] + 8010982: 4618 mov r0, r3 + 8010984: f002 fbc9 bl 801311a + /* reset time stamp */ + arp_table[i].ctime = 0; + 8010988: f997 2017 ldrsb.w r2, [r7, #23] + 801098c: 4920 ldr r1, [pc, #128] ; (8010a10 ) + 801098e: 4613 mov r3, r2 + 8010990: 005b lsls r3, r3, #1 + 8010992: 4413 add r3, r2 + 8010994: 00db lsls r3, r3, #3 + 8010996: 440b add r3, r1 + 8010998: 3312 adds r3, #18 + 801099a: 2200 movs r2, #0 + 801099c: 801a strh r2, [r3, #0] + /* 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) { + 801099e: f997 2017 ldrsb.w r2, [r7, #23] + 80109a2: 491b ldr r1, [pc, #108] ; (8010a10 ) + 80109a4: 4613 mov r3, r2 + 80109a6: 005b lsls r3, r3, #1 + 80109a8: 4413 add r3, r2 + 80109aa: 00db lsls r3, r3, #3 + 80109ac: 440b add r3, r1 + 80109ae: 681b ldr r3, [r3, #0] + 80109b0: 2b00 cmp r3, #0 + 80109b2: d021 beq.n 80109f8 + struct pbuf *p = arp_table[i].q; + 80109b4: f997 2017 ldrsb.w r2, [r7, #23] + 80109b8: 4915 ldr r1, [pc, #84] ; (8010a10 ) + 80109ba: 4613 mov r3, r2 + 80109bc: 005b lsls r3, r3, #1 + 80109be: 4413 add r3, r2 + 80109c0: 00db lsls r3, r3, #3 + 80109c2: 440b add r3, r1 + 80109c4: 681b ldr r3, [r3, #0] + 80109c6: 613b str r3, [r7, #16] + arp_table[i].q = NULL; + 80109c8: f997 2017 ldrsb.w r2, [r7, #23] + 80109cc: 4910 ldr r1, [pc, #64] ; (8010a10 ) + 80109ce: 4613 mov r3, r2 + 80109d0: 005b lsls r3, r3, #1 + 80109d2: 4413 add r3, r2 + 80109d4: 00db lsls r3, r3, #3 + 80109d6: 440b add r3, r1 + 80109d8: 2200 movs r2, #0 + 80109da: 601a str r2, [r3, #0] +#endif /* ARP_QUEUEING */ + /* send the queued IP packet */ + ethernet_output(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr, ETHTYPE_IP); + 80109dc: 68fb ldr r3, [r7, #12] + 80109de: f103 022d add.w r2, r3, #45 ; 0x2d + 80109e2: f44f 6300 mov.w r3, #2048 ; 0x800 + 80109e6: 9300 str r3, [sp, #0] + 80109e8: 687b ldr r3, [r7, #4] + 80109ea: 6939 ldr r1, [r7, #16] + 80109ec: 68f8 ldr r0, [r7, #12] + 80109ee: f002 f881 bl 8012af4 + /* free the queued IP packet */ + pbuf_free(p); + 80109f2: 6938 ldr r0, [r7, #16] + 80109f4: f7f7 fca6 bl 8008344 + } + return ERR_OK; + 80109f8: 2300 movs r3, #0 +} + 80109fa: 4618 mov r0, r3 + 80109fc: 3718 adds r7, #24 + 80109fe: 46bd mov sp, r7 + 8010a00: bd80 pop {r7, pc} + 8010a02: bf00 nop + 8010a04: 08015f84 .word 0x08015f84 + 8010a08: 0801607c .word 0x0801607c + 8010a0c: 08015ffc .word 0x08015ffc + 8010a10: 20006ffc .word 0x20006ffc + +08010a14 : + * + * @param netif points to a network interface + */ +void +etharp_cleanup_netif(struct netif *netif) +{ + 8010a14: b580 push {r7, lr} + 8010a16: b084 sub sp, #16 + 8010a18: af00 add r7, sp, #0 + 8010a1a: 6078 str r0, [r7, #4] + u8_t i; + + for (i = 0; i < ARP_TABLE_SIZE; ++i) { + 8010a1c: 2300 movs r3, #0 + 8010a1e: 73fb strb r3, [r7, #15] + 8010a20: e01f b.n 8010a62 + u8_t state = arp_table[i].state; + 8010a22: 7bfa ldrb r2, [r7, #15] + 8010a24: 4913 ldr r1, [pc, #76] ; (8010a74 ) + 8010a26: 4613 mov r3, r2 + 8010a28: 005b lsls r3, r3, #1 + 8010a2a: 4413 add r3, r2 + 8010a2c: 00db lsls r3, r3, #3 + 8010a2e: 440b add r3, r1 + 8010a30: 3314 adds r3, #20 + 8010a32: 781b ldrb r3, [r3, #0] + 8010a34: 73bb strb r3, [r7, #14] + if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { + 8010a36: 7bbb ldrb r3, [r7, #14] + 8010a38: 2b00 cmp r3, #0 + 8010a3a: d00f beq.n 8010a5c + 8010a3c: 7bfa ldrb r2, [r7, #15] + 8010a3e: 490d ldr r1, [pc, #52] ; (8010a74 ) + 8010a40: 4613 mov r3, r2 + 8010a42: 005b lsls r3, r3, #1 + 8010a44: 4413 add r3, r2 + 8010a46: 00db lsls r3, r3, #3 + 8010a48: 440b add r3, r1 + 8010a4a: 3308 adds r3, #8 + 8010a4c: 681b ldr r3, [r3, #0] + 8010a4e: 687a ldr r2, [r7, #4] + 8010a50: 429a cmp r2, r3 + 8010a52: d103 bne.n 8010a5c + etharp_free_entry(i); + 8010a54: 7bfb ldrb r3, [r7, #15] + 8010a56: 4618 mov r0, r3 + 8010a58: f7ff fd12 bl 8010480 + for (i = 0; i < ARP_TABLE_SIZE; ++i) { + 8010a5c: 7bfb ldrb r3, [r7, #15] + 8010a5e: 3301 adds r3, #1 + 8010a60: 73fb strb r3, [r7, #15] + 8010a62: 7bfb ldrb r3, [r7, #15] + 8010a64: 2b09 cmp r3, #9 + 8010a66: d9dc bls.n 8010a22 + } + } +} + 8010a68: bf00 nop + 8010a6a: bf00 nop + 8010a6c: 3710 adds r7, #16 + 8010a6e: 46bd mov sp, r7 + 8010a70: bd80 pop {r7, pc} + 8010a72: bf00 nop + 8010a74: 20006ffc .word 0x20006ffc + +08010a78 : + * + * @see pbuf_free() + */ +void +etharp_input(struct pbuf *p, struct netif *netif) +{ + 8010a78: b5b0 push {r4, r5, r7, lr} + 8010a7a: b08a sub sp, #40 ; 0x28 + 8010a7c: af04 add r7, sp, #16 + 8010a7e: 6078 str r0, [r7, #4] + 8010a80: 6039 str r1, [r7, #0] + struct etharp_hdr *hdr; + /* these are aligned properly, whereas the ARP header fields might not be */ + ip4_addr_t sipaddr, dipaddr; + u8_t for_us; + + LWIP_ERROR("netif != NULL", (netif != NULL), return;); + 8010a82: 683b ldr r3, [r7, #0] + 8010a84: 2b00 cmp r3, #0 + 8010a86: d107 bne.n 8010a98 + 8010a88: 4b3f ldr r3, [pc, #252] ; (8010b88 ) + 8010a8a: f44f 7222 mov.w r2, #648 ; 0x288 + 8010a8e: 493f ldr r1, [pc, #252] ; (8010b8c ) + 8010a90: 483f ldr r0, [pc, #252] ; (8010b90 ) + 8010a92: f002 f977 bl 8012d84 + 8010a96: e074 b.n 8010b82 + + hdr = (struct etharp_hdr *)p->payload; + 8010a98: 687b ldr r3, [r7, #4] + 8010a9a: 685b ldr r3, [r3, #4] + 8010a9c: 613b str r3, [r7, #16] + + /* RFC 826 "Packet Reception": */ + if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || + 8010a9e: 693b ldr r3, [r7, #16] + 8010aa0: 881b ldrh r3, [r3, #0] + 8010aa2: b29b uxth r3, r3 + 8010aa4: f5b3 7f80 cmp.w r3, #256 ; 0x100 + 8010aa8: d10c bne.n 8010ac4 + (hdr->hwlen != ETH_HWADDR_LEN) || + 8010aaa: 693b ldr r3, [r7, #16] + 8010aac: 791b ldrb r3, [r3, #4] + if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || + 8010aae: 2b06 cmp r3, #6 + 8010ab0: d108 bne.n 8010ac4 + (hdr->protolen != sizeof(ip4_addr_t)) || + 8010ab2: 693b ldr r3, [r7, #16] + 8010ab4: 795b ldrb r3, [r3, #5] + (hdr->hwlen != ETH_HWADDR_LEN) || + 8010ab6: 2b04 cmp r3, #4 + 8010ab8: d104 bne.n 8010ac4 + (hdr->proto != PP_HTONS(ETHTYPE_IP))) { + 8010aba: 693b ldr r3, [r7, #16] + 8010abc: 885b ldrh r3, [r3, #2] + 8010abe: b29b uxth r3, r3 + (hdr->protolen != sizeof(ip4_addr_t)) || + 8010ac0: 2b08 cmp r3, #8 + 8010ac2: d003 beq.n 8010acc + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n", + hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen)); + ETHARP_STATS_INC(etharp.proterr); + ETHARP_STATS_INC(etharp.drop); + pbuf_free(p); + 8010ac4: 6878 ldr r0, [r7, #4] + 8010ac6: f7f7 fc3d bl 8008344 + return; + 8010aca: e05a b.n 8010b82 + autoip_arp_reply(netif, hdr); +#endif /* LWIP_AUTOIP */ + + /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + * structure packing (not using structure copy which breaks strict-aliasing rules). */ + IPADDR2_COPY(&sipaddr, &hdr->sipaddr); + 8010acc: 693b ldr r3, [r7, #16] + 8010ace: 330e adds r3, #14 + 8010ad0: 681b ldr r3, [r3, #0] + 8010ad2: 60fb str r3, [r7, #12] + IPADDR2_COPY(&dipaddr, &hdr->dipaddr); + 8010ad4: 693b ldr r3, [r7, #16] + 8010ad6: 3318 adds r3, #24 + 8010ad8: 681b ldr r3, [r3, #0] + 8010ada: 60bb str r3, [r7, #8] + + /* this interface is not configured? */ + if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { + 8010adc: 683b ldr r3, [r7, #0] + 8010ade: 3304 adds r3, #4 + 8010ae0: 681b ldr r3, [r3, #0] + 8010ae2: 2b00 cmp r3, #0 + 8010ae4: d102 bne.n 8010aec + for_us = 0; + 8010ae6: 2300 movs r3, #0 + 8010ae8: 75fb strb r3, [r7, #23] + 8010aea: e009 b.n 8010b00 + } else { + /* ARP packet directed to us? */ + for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); + 8010aec: 68ba ldr r2, [r7, #8] + 8010aee: 683b ldr r3, [r7, #0] + 8010af0: 3304 adds r3, #4 + 8010af2: 681b ldr r3, [r3, #0] + 8010af4: 429a cmp r2, r3 + 8010af6: bf0c ite eq + 8010af8: 2301 moveq r3, #1 + 8010afa: 2300 movne r3, #0 + 8010afc: b2db uxtb r3, r3 + 8010afe: 75fb strb r3, [r7, #23] + /* ARP message directed to us? + -> add IP address in ARP cache; assume requester wants to talk to us, + can result in directly sending the queued packets for this host. + ARP message not directed to us? + -> update the source IP address in the cache, if present */ + etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), + 8010b00: 693b ldr r3, [r7, #16] + 8010b02: f103 0208 add.w r2, r3, #8 + 8010b06: 7dfb ldrb r3, [r7, #23] + 8010b08: 2b00 cmp r3, #0 + 8010b0a: d001 beq.n 8010b10 + 8010b0c: 2301 movs r3, #1 + 8010b0e: e000 b.n 8010b12 + 8010b10: 2302 movs r3, #2 + 8010b12: f107 010c add.w r1, r7, #12 + 8010b16: 6838 ldr r0, [r7, #0] + 8010b18: f7ff fed6 bl 80108c8 + for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); + + /* now act on the message itself */ + switch (hdr->opcode) { + 8010b1c: 693b ldr r3, [r7, #16] + 8010b1e: 88db ldrh r3, [r3, #6] + 8010b20: b29b uxth r3, r3 + 8010b22: f5b3 7f80 cmp.w r3, #256 ; 0x100 + 8010b26: d003 beq.n 8010b30 + 8010b28: f5b3 7f00 cmp.w r3, #512 ; 0x200 + 8010b2c: d01e beq.n 8010b6c +#endif /* (LWIP_DHCP && DHCP_DOES_ARP_CHECK) */ + break; + default: + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode))); + ETHARP_STATS_INC(etharp.err); + break; + 8010b2e: e025 b.n 8010b7c + if (for_us) { + 8010b30: 7dfb ldrb r3, [r7, #23] + 8010b32: 2b00 cmp r3, #0 + 8010b34: d021 beq.n 8010b7a + (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, + 8010b36: 683b ldr r3, [r7, #0] + 8010b38: f103 002d add.w r0, r3, #45 ; 0x2d + 8010b3c: 693b ldr r3, [r7, #16] + 8010b3e: f103 0408 add.w r4, r3, #8 + (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), + 8010b42: 683b ldr r3, [r7, #0] + 8010b44: f103 052d add.w r5, r3, #45 ; 0x2d + 8010b48: 683b ldr r3, [r7, #0] + 8010b4a: 3304 adds r3, #4 + &hdr->shwaddr, &sipaddr, + 8010b4c: 693a ldr r2, [r7, #16] + 8010b4e: 3208 adds r2, #8 + etharp_raw(netif, + 8010b50: 2102 movs r1, #2 + 8010b52: 9103 str r1, [sp, #12] + 8010b54: f107 010c add.w r1, r7, #12 + 8010b58: 9102 str r1, [sp, #8] + 8010b5a: 9201 str r2, [sp, #4] + 8010b5c: 9300 str r3, [sp, #0] + 8010b5e: 462b mov r3, r5 + 8010b60: 4622 mov r2, r4 + 8010b62: 4601 mov r1, r0 + 8010b64: 6838 ldr r0, [r7, #0] + 8010b66: f000 fae5 bl 8011134 + break; + 8010b6a: e006 b.n 8010b7a + dhcp_arp_reply(netif, &sipaddr); + 8010b6c: f107 030c add.w r3, r7, #12 + 8010b70: 4619 mov r1, r3 + 8010b72: 6838 ldr r0, [r7, #0] + 8010b74: f7fe f97c bl 800ee70 + break; + 8010b78: e000 b.n 8010b7c + break; + 8010b7a: bf00 nop + } + /* free ARP packet */ + pbuf_free(p); + 8010b7c: 6878 ldr r0, [r7, #4] + 8010b7e: f7f7 fbe1 bl 8008344 +} + 8010b82: 3718 adds r7, #24 + 8010b84: 46bd mov sp, r7 + 8010b86: bdb0 pop {r4, r5, r7, pc} + 8010b88: 08015f84 .word 0x08015f84 + 8010b8c: 080160d4 .word 0x080160d4 + 8010b90: 08015ffc .word 0x08015ffc + +08010b94 : +/** Just a small helper function that sends a pbuf to an ethernet address + * in the arp_table specified by the index 'arp_idx'. + */ +static err_t +etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) +{ + 8010b94: b580 push {r7, lr} + 8010b96: b086 sub sp, #24 + 8010b98: af02 add r7, sp, #8 + 8010b9a: 60f8 str r0, [r7, #12] + 8010b9c: 60b9 str r1, [r7, #8] + 8010b9e: 4613 mov r3, r2 + 8010ba0: 71fb strb r3, [r7, #7] + LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", + 8010ba2: 79fa ldrb r2, [r7, #7] + 8010ba4: 4944 ldr r1, [pc, #272] ; (8010cb8 ) + 8010ba6: 4613 mov r3, r2 + 8010ba8: 005b lsls r3, r3, #1 + 8010baa: 4413 add r3, r2 + 8010bac: 00db lsls r3, r3, #3 + 8010bae: 440b add r3, r1 + 8010bb0: 3314 adds r3, #20 + 8010bb2: 781b ldrb r3, [r3, #0] + 8010bb4: 2b01 cmp r3, #1 + 8010bb6: d806 bhi.n 8010bc6 + 8010bb8: 4b40 ldr r3, [pc, #256] ; (8010cbc ) + 8010bba: f44f 723b mov.w r2, #748 ; 0x2ec + 8010bbe: 4940 ldr r1, [pc, #256] ; (8010cc0 ) + 8010bc0: 4840 ldr r0, [pc, #256] ; (8010cc4 ) + 8010bc2: f002 f8df bl 8012d84 + arp_table[arp_idx].state >= ETHARP_STATE_STABLE); + /* if arp table entry is about to expire: re-request it, + but only if its state is ETHARP_STATE_STABLE to prevent flooding the + network with ARP requests if this address is used frequently. */ + if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) { + 8010bc6: 79fa ldrb r2, [r7, #7] + 8010bc8: 493b ldr r1, [pc, #236] ; (8010cb8 ) + 8010bca: 4613 mov r3, r2 + 8010bcc: 005b lsls r3, r3, #1 + 8010bce: 4413 add r3, r2 + 8010bd0: 00db lsls r3, r3, #3 + 8010bd2: 440b add r3, r1 + 8010bd4: 3314 adds r3, #20 + 8010bd6: 781b ldrb r3, [r3, #0] + 8010bd8: 2b02 cmp r3, #2 + 8010bda: d153 bne.n 8010c84 + if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { + 8010bdc: 79fa ldrb r2, [r7, #7] + 8010bde: 4936 ldr r1, [pc, #216] ; (8010cb8 ) + 8010be0: 4613 mov r3, r2 + 8010be2: 005b lsls r3, r3, #1 + 8010be4: 4413 add r3, r2 + 8010be6: 00db lsls r3, r3, #3 + 8010be8: 440b add r3, r1 + 8010bea: 3312 adds r3, #18 + 8010bec: 881b ldrh r3, [r3, #0] + 8010bee: f5b3 7f8e cmp.w r3, #284 ; 0x11c + 8010bf2: d919 bls.n 8010c28 + /* issue a standard request using broadcast */ + if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { + 8010bf4: 79fa ldrb r2, [r7, #7] + 8010bf6: 4613 mov r3, r2 + 8010bf8: 005b lsls r3, r3, #1 + 8010bfa: 4413 add r3, r2 + 8010bfc: 00db lsls r3, r3, #3 + 8010bfe: 4a2e ldr r2, [pc, #184] ; (8010cb8 ) + 8010c00: 4413 add r3, r2 + 8010c02: 3304 adds r3, #4 + 8010c04: 4619 mov r1, r3 + 8010c06: 68f8 ldr r0, [r7, #12] + 8010c08: f000 fb42 bl 8011290 + 8010c0c: 4603 mov r3, r0 + 8010c0e: 2b00 cmp r3, #0 + 8010c10: d138 bne.n 8010c84 + arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; + 8010c12: 79fa ldrb r2, [r7, #7] + 8010c14: 4928 ldr r1, [pc, #160] ; (8010cb8 ) + 8010c16: 4613 mov r3, r2 + 8010c18: 005b lsls r3, r3, #1 + 8010c1a: 4413 add r3, r2 + 8010c1c: 00db lsls r3, r3, #3 + 8010c1e: 440b add r3, r1 + 8010c20: 3314 adds r3, #20 + 8010c22: 2203 movs r2, #3 + 8010c24: 701a strb r2, [r3, #0] + 8010c26: e02d b.n 8010c84 + } + } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { + 8010c28: 79fa ldrb r2, [r7, #7] + 8010c2a: 4923 ldr r1, [pc, #140] ; (8010cb8 ) + 8010c2c: 4613 mov r3, r2 + 8010c2e: 005b lsls r3, r3, #1 + 8010c30: 4413 add r3, r2 + 8010c32: 00db lsls r3, r3, #3 + 8010c34: 440b add r3, r1 + 8010c36: 3312 adds r3, #18 + 8010c38: 881b ldrh r3, [r3, #0] + 8010c3a: f5b3 7f87 cmp.w r3, #270 ; 0x10e + 8010c3e: d321 bcc.n 8010c84 + /* issue a unicast request (for 15 seconds) to prevent unnecessary broadcast */ + if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) { + 8010c40: 79fa ldrb r2, [r7, #7] + 8010c42: 4613 mov r3, r2 + 8010c44: 005b lsls r3, r3, #1 + 8010c46: 4413 add r3, r2 + 8010c48: 00db lsls r3, r3, #3 + 8010c4a: 4a1b ldr r2, [pc, #108] ; (8010cb8 ) + 8010c4c: 4413 add r3, r2 + 8010c4e: 1d19 adds r1, r3, #4 + 8010c50: 79fa ldrb r2, [r7, #7] + 8010c52: 4613 mov r3, r2 + 8010c54: 005b lsls r3, r3, #1 + 8010c56: 4413 add r3, r2 + 8010c58: 00db lsls r3, r3, #3 + 8010c5a: 3308 adds r3, #8 + 8010c5c: 4a16 ldr r2, [pc, #88] ; (8010cb8 ) + 8010c5e: 4413 add r3, r2 + 8010c60: 3304 adds r3, #4 + 8010c62: 461a mov r2, r3 + 8010c64: 68f8 ldr r0, [r7, #12] + 8010c66: f000 faf1 bl 801124c + 8010c6a: 4603 mov r3, r0 + 8010c6c: 2b00 cmp r3, #0 + 8010c6e: d109 bne.n 8010c84 + arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; + 8010c70: 79fa ldrb r2, [r7, #7] + 8010c72: 4911 ldr r1, [pc, #68] ; (8010cb8 ) + 8010c74: 4613 mov r3, r2 + 8010c76: 005b lsls r3, r3, #1 + 8010c78: 4413 add r3, r2 + 8010c7a: 00db lsls r3, r3, #3 + 8010c7c: 440b add r3, r1 + 8010c7e: 3314 adds r3, #20 + 8010c80: 2203 movs r2, #3 + 8010c82: 701a strb r2, [r3, #0] + } + } + } + + return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); + 8010c84: 68fb ldr r3, [r7, #12] + 8010c86: f103 012d add.w r1, r3, #45 ; 0x2d + 8010c8a: 79fa ldrb r2, [r7, #7] + 8010c8c: 4613 mov r3, r2 + 8010c8e: 005b lsls r3, r3, #1 + 8010c90: 4413 add r3, r2 + 8010c92: 00db lsls r3, r3, #3 + 8010c94: 3308 adds r3, #8 + 8010c96: 4a08 ldr r2, [pc, #32] ; (8010cb8 ) + 8010c98: 4413 add r3, r2 + 8010c9a: 3304 adds r3, #4 + 8010c9c: f44f 6200 mov.w r2, #2048 ; 0x800 + 8010ca0: 9200 str r2, [sp, #0] + 8010ca2: 460a mov r2, r1 + 8010ca4: 68b9 ldr r1, [r7, #8] + 8010ca6: 68f8 ldr r0, [r7, #12] + 8010ca8: f001 ff24 bl 8012af4 + 8010cac: 4603 mov r3, r0 +} + 8010cae: 4618 mov r0, r3 + 8010cb0: 3710 adds r7, #16 + 8010cb2: 46bd mov sp, r7 + 8010cb4: bd80 pop {r7, pc} + 8010cb6: bf00 nop + 8010cb8: 20006ffc .word 0x20006ffc + 8010cbc: 08015f84 .word 0x08015f84 + 8010cc0: 080160f4 .word 0x080160f4 + 8010cc4: 08015ffc .word 0x08015ffc + +08010cc8 : + * - ERR_RTE No route to destination (no gateway to external networks), + * or the return type of either etharp_query() or ethernet_output(). + */ +err_t +etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) +{ + 8010cc8: b580 push {r7, lr} + 8010cca: b08a sub sp, #40 ; 0x28 + 8010ccc: af02 add r7, sp, #8 + 8010cce: 60f8 str r0, [r7, #12] + 8010cd0: 60b9 str r1, [r7, #8] + 8010cd2: 607a str r2, [r7, #4] + const struct eth_addr *dest; + struct eth_addr mcastaddr; + const ip4_addr_t *dst_addr = ipaddr; + 8010cd4: 687b ldr r3, [r7, #4] + 8010cd6: 61bb str r3, [r7, #24] + + LWIP_ASSERT("netif != NULL", netif != NULL); + 8010cd8: 68fb ldr r3, [r7, #12] + 8010cda: 2b00 cmp r3, #0 + 8010cdc: d106 bne.n 8010cec + 8010cde: 4b69 ldr r3, [pc, #420] ; (8010e84 ) + 8010ce0: f240 321b movw r2, #795 ; 0x31b + 8010ce4: 4968 ldr r1, [pc, #416] ; (8010e88 ) + 8010ce6: 4869 ldr r0, [pc, #420] ; (8010e8c ) + 8010ce8: f002 f84c bl 8012d84 + LWIP_ASSERT("q != NULL", q != NULL); + 8010cec: 68bb ldr r3, [r7, #8] + 8010cee: 2b00 cmp r3, #0 + 8010cf0: d106 bne.n 8010d00 + 8010cf2: 4b64 ldr r3, [pc, #400] ; (8010e84 ) + 8010cf4: f44f 7247 mov.w r2, #796 ; 0x31c + 8010cf8: 4965 ldr r1, [pc, #404] ; (8010e90 ) + 8010cfa: 4864 ldr r0, [pc, #400] ; (8010e8c ) + 8010cfc: f002 f842 bl 8012d84 + LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); + 8010d00: 687b ldr r3, [r7, #4] + 8010d02: 2b00 cmp r3, #0 + 8010d04: d106 bne.n 8010d14 + 8010d06: 4b5f ldr r3, [pc, #380] ; (8010e84 ) + 8010d08: f240 321d movw r2, #797 ; 0x31d + 8010d0c: 4961 ldr r1, [pc, #388] ; (8010e94 ) + 8010d0e: 485f ldr r0, [pc, #380] ; (8010e8c ) + 8010d10: f002 f838 bl 8012d84 + + /* Determine on destination hardware address. Broadcasts and multicasts + * are special, other IP addresses are looked up in the ARP table. */ + + /* broadcast destination IP address? */ + if (ip4_addr_isbroadcast(ipaddr, netif)) { + 8010d14: 687b ldr r3, [r7, #4] + 8010d16: 681b ldr r3, [r3, #0] + 8010d18: 68f9 ldr r1, [r7, #12] + 8010d1a: 4618 mov r0, r3 + 8010d1c: f000 fef2 bl 8011b04 + 8010d20: 4603 mov r3, r0 + 8010d22: 2b00 cmp r3, #0 + 8010d24: d002 beq.n 8010d2c + /* broadcast on Ethernet also */ + dest = (const struct eth_addr *)ðbroadcast; + 8010d26: 4b5c ldr r3, [pc, #368] ; (8010e98 ) + 8010d28: 61fb str r3, [r7, #28] + 8010d2a: e09b b.n 8010e64 + /* multicast destination IP address? */ + } else if (ip4_addr_ismulticast(ipaddr)) { + 8010d2c: 687b ldr r3, [r7, #4] + 8010d2e: 681b ldr r3, [r3, #0] + 8010d30: f003 03f0 and.w r3, r3, #240 ; 0xf0 + 8010d34: 2be0 cmp r3, #224 ; 0xe0 + 8010d36: d118 bne.n 8010d6a + /* Hash IP multicast address to MAC address.*/ + mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; + 8010d38: 2301 movs r3, #1 + 8010d3a: 743b strb r3, [r7, #16] + mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; + 8010d3c: 2300 movs r3, #0 + 8010d3e: 747b strb r3, [r7, #17] + mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; + 8010d40: 235e movs r3, #94 ; 0x5e + 8010d42: 74bb strb r3, [r7, #18] + mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; + 8010d44: 687b ldr r3, [r7, #4] + 8010d46: 3301 adds r3, #1 + 8010d48: 781b ldrb r3, [r3, #0] + 8010d4a: f003 037f and.w r3, r3, #127 ; 0x7f + 8010d4e: b2db uxtb r3, r3 + 8010d50: 74fb strb r3, [r7, #19] + mcastaddr.addr[4] = ip4_addr3(ipaddr); + 8010d52: 687b ldr r3, [r7, #4] + 8010d54: 3302 adds r3, #2 + 8010d56: 781b ldrb r3, [r3, #0] + 8010d58: 753b strb r3, [r7, #20] + mcastaddr.addr[5] = ip4_addr4(ipaddr); + 8010d5a: 687b ldr r3, [r7, #4] + 8010d5c: 3303 adds r3, #3 + 8010d5e: 781b ldrb r3, [r3, #0] + 8010d60: 757b strb r3, [r7, #21] + /* destination Ethernet address is multicast */ + dest = &mcastaddr; + 8010d62: f107 0310 add.w r3, r7, #16 + 8010d66: 61fb str r3, [r7, #28] + 8010d68: e07c b.n 8010e64 + /* unicast destination IP address? */ + } else { + s8_t i; + /* outside local network? if so, this can neither be a global broadcast nor + a subnet broadcast. */ + if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && + 8010d6a: 687b ldr r3, [r7, #4] + 8010d6c: 681a ldr r2, [r3, #0] + 8010d6e: 68fb ldr r3, [r7, #12] + 8010d70: 3304 adds r3, #4 + 8010d72: 681b ldr r3, [r3, #0] + 8010d74: 405a eors r2, r3 + 8010d76: 68fb ldr r3, [r7, #12] + 8010d78: 3308 adds r3, #8 + 8010d7a: 681b ldr r3, [r3, #0] + 8010d7c: 4013 ands r3, r2 + 8010d7e: 2b00 cmp r3, #0 + 8010d80: d012 beq.n 8010da8 + !ip4_addr_islinklocal(ipaddr)) { + 8010d82: 687b ldr r3, [r7, #4] + 8010d84: 681b ldr r3, [r3, #0] + 8010d86: b29b uxth r3, r3 + if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && + 8010d88: f64f 62a9 movw r2, #65193 ; 0xfea9 + 8010d8c: 4293 cmp r3, r2 + 8010d8e: d00b beq.n 8010da8 + dst_addr = LWIP_HOOK_ETHARP_GET_GW(netif, ipaddr); + if (dst_addr == NULL) +#endif /* LWIP_HOOK_ETHARP_GET_GW */ + { + /* interface has default gateway? */ + if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) { + 8010d90: 68fb ldr r3, [r7, #12] + 8010d92: 330c adds r3, #12 + 8010d94: 681b ldr r3, [r3, #0] + 8010d96: 2b00 cmp r3, #0 + 8010d98: d003 beq.n 8010da2 + /* send to hardware address of default gateway IP address */ + dst_addr = netif_ip4_gw(netif); + 8010d9a: 68fb ldr r3, [r7, #12] + 8010d9c: 330c adds r3, #12 + 8010d9e: 61bb str r3, [r7, #24] + 8010da0: e002 b.n 8010da8 + /* no default gateway available */ + } else { + /* no route to destination error (default gateway missing) */ + return ERR_RTE; + 8010da2: f06f 0303 mvn.w r3, #3 + 8010da6: e069 b.n 8010e7c + if (netif->addr_hint != NULL) { + /* per-pcb cached entry was given */ + u8_t etharp_cached_entry = *(netif->addr_hint); + if (etharp_cached_entry < ARP_TABLE_SIZE) { +#endif /* LWIP_NETIF_HWADDRHINT */ + if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && + 8010da8: 4b3c ldr r3, [pc, #240] ; (8010e9c ) + 8010daa: 781b ldrb r3, [r3, #0] + 8010dac: 4619 mov r1, r3 + 8010dae: 4a3c ldr r2, [pc, #240] ; (8010ea0 ) + 8010db0: 460b mov r3, r1 + 8010db2: 005b lsls r3, r3, #1 + 8010db4: 440b add r3, r1 + 8010db6: 00db lsls r3, r3, #3 + 8010db8: 4413 add r3, r2 + 8010dba: 3314 adds r3, #20 + 8010dbc: 781b ldrb r3, [r3, #0] + 8010dbe: 2b01 cmp r3, #1 + 8010dc0: d917 bls.n 8010df2 +#if ETHARP_TABLE_MATCH_NETIF + (arp_table[etharp_cached_entry].netif == netif) && +#endif + (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { + 8010dc2: 69bb ldr r3, [r7, #24] + 8010dc4: 681a ldr r2, [r3, #0] + 8010dc6: 4b35 ldr r3, [pc, #212] ; (8010e9c ) + 8010dc8: 781b ldrb r3, [r3, #0] + 8010dca: 4618 mov r0, r3 + 8010dcc: 4934 ldr r1, [pc, #208] ; (8010ea0 ) + 8010dce: 4603 mov r3, r0 + 8010dd0: 005b lsls r3, r3, #1 + 8010dd2: 4403 add r3, r0 + 8010dd4: 00db lsls r3, r3, #3 + 8010dd6: 440b add r3, r1 + 8010dd8: 3304 adds r3, #4 + 8010dda: 681b ldr r3, [r3, #0] + if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && + 8010ddc: 429a cmp r2, r3 + 8010dde: d108 bne.n 8010df2 + /* the per-pcb-cached entry is stable and the right one! */ + ETHARP_STATS_INC(etharp.cachehit); + return etharp_output_to_arp_index(netif, q, etharp_cached_entry); + 8010de0: 4b2e ldr r3, [pc, #184] ; (8010e9c ) + 8010de2: 781b ldrb r3, [r3, #0] + 8010de4: 461a mov r2, r3 + 8010de6: 68b9 ldr r1, [r7, #8] + 8010de8: 68f8 ldr r0, [r7, #12] + 8010dea: f7ff fed3 bl 8010b94 + 8010dee: 4603 mov r3, r0 + 8010df0: e044 b.n 8010e7c + } +#endif /* LWIP_NETIF_HWADDRHINT */ + + /* find stable entry: do this here since this is a critical path for + throughput and etharp_find_entry() is kind of slow */ + for (i = 0; i < ARP_TABLE_SIZE; i++) { + 8010df2: 2300 movs r3, #0 + 8010df4: 75fb strb r3, [r7, #23] + 8010df6: e02a b.n 8010e4e + if ((arp_table[i].state >= ETHARP_STATE_STABLE) && + 8010df8: f997 2017 ldrsb.w r2, [r7, #23] + 8010dfc: 4928 ldr r1, [pc, #160] ; (8010ea0 ) + 8010dfe: 4613 mov r3, r2 + 8010e00: 005b lsls r3, r3, #1 + 8010e02: 4413 add r3, r2 + 8010e04: 00db lsls r3, r3, #3 + 8010e06: 440b add r3, r1 + 8010e08: 3314 adds r3, #20 + 8010e0a: 781b ldrb r3, [r3, #0] + 8010e0c: 2b01 cmp r3, #1 + 8010e0e: d918 bls.n 8010e42 +#if ETHARP_TABLE_MATCH_NETIF + (arp_table[i].netif == netif) && +#endif + (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { + 8010e10: 69bb ldr r3, [r7, #24] + 8010e12: 6819 ldr r1, [r3, #0] + 8010e14: f997 2017 ldrsb.w r2, [r7, #23] + 8010e18: 4821 ldr r0, [pc, #132] ; (8010ea0 ) + 8010e1a: 4613 mov r3, r2 + 8010e1c: 005b lsls r3, r3, #1 + 8010e1e: 4413 add r3, r2 + 8010e20: 00db lsls r3, r3, #3 + 8010e22: 4403 add r3, r0 + 8010e24: 3304 adds r3, #4 + 8010e26: 681b ldr r3, [r3, #0] + if ((arp_table[i].state >= ETHARP_STATE_STABLE) && + 8010e28: 4299 cmp r1, r3 + 8010e2a: d10a bne.n 8010e42 + /* found an existing, stable entry */ + ETHARP_SET_HINT(netif, i); + 8010e2c: 7dfa ldrb r2, [r7, #23] + 8010e2e: 4b1b ldr r3, [pc, #108] ; (8010e9c ) + 8010e30: 701a strb r2, [r3, #0] + return etharp_output_to_arp_index(netif, q, i); + 8010e32: 7dfb ldrb r3, [r7, #23] + 8010e34: 461a mov r2, r3 + 8010e36: 68b9 ldr r1, [r7, #8] + 8010e38: 68f8 ldr r0, [r7, #12] + 8010e3a: f7ff feab bl 8010b94 + 8010e3e: 4603 mov r3, r0 + 8010e40: e01c b.n 8010e7c + for (i = 0; i < ARP_TABLE_SIZE; i++) { + 8010e42: f997 3017 ldrsb.w r3, [r7, #23] + 8010e46: b2db uxtb r3, r3 + 8010e48: 3301 adds r3, #1 + 8010e4a: b2db uxtb r3, r3 + 8010e4c: 75fb strb r3, [r7, #23] + 8010e4e: f997 3017 ldrsb.w r3, [r7, #23] + 8010e52: 2b09 cmp r3, #9 + 8010e54: ddd0 ble.n 8010df8 + } + } + /* no stable entry found, use the (slower) query function: + queue on destination Ethernet address belonging to ipaddr */ + return etharp_query(netif, dst_addr, q); + 8010e56: 68ba ldr r2, [r7, #8] + 8010e58: 69b9 ldr r1, [r7, #24] + 8010e5a: 68f8 ldr r0, [r7, #12] + 8010e5c: f000 f822 bl 8010ea4 + 8010e60: 4603 mov r3, r0 + 8010e62: e00b b.n 8010e7c + } + + /* continuation for multicast/broadcast destinations */ + /* obtain source Ethernet address of the given interface */ + /* send packet directly on the link */ + return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), dest, ETHTYPE_IP); + 8010e64: 68fb ldr r3, [r7, #12] + 8010e66: f103 022d add.w r2, r3, #45 ; 0x2d + 8010e6a: f44f 6300 mov.w r3, #2048 ; 0x800 + 8010e6e: 9300 str r3, [sp, #0] + 8010e70: 69fb ldr r3, [r7, #28] + 8010e72: 68b9 ldr r1, [r7, #8] + 8010e74: 68f8 ldr r0, [r7, #12] + 8010e76: f001 fe3d bl 8012af4 + 8010e7a: 4603 mov r3, r0 +} + 8010e7c: 4618 mov r0, r3 + 8010e7e: 3720 adds r7, #32 + 8010e80: 46bd mov sp, r7 + 8010e82: bd80 pop {r7, pc} + 8010e84: 08015f84 .word 0x08015f84 + 8010e88: 080160d4 .word 0x080160d4 + 8010e8c: 08015ffc .word 0x08015ffc + 8010e90: 08016124 .word 0x08016124 + 8010e94: 080160c4 .word 0x080160c4 + 8010e98: 08016770 .word 0x08016770 + 8010e9c: 200070ec .word 0x200070ec + 8010ea0: 20006ffc .word 0x20006ffc + +08010ea4 : + * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. + * + */ +err_t +etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) +{ + 8010ea4: b580 push {r7, lr} + 8010ea6: b08c sub sp, #48 ; 0x30 + 8010ea8: af02 add r7, sp, #8 + 8010eaa: 60f8 str r0, [r7, #12] + 8010eac: 60b9 str r1, [r7, #8] + 8010eae: 607a str r2, [r7, #4] + struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; + 8010eb0: 68fb ldr r3, [r7, #12] + 8010eb2: 332d adds r3, #45 ; 0x2d + 8010eb4: 617b str r3, [r7, #20] + err_t result = ERR_MEM; + 8010eb6: 23ff movs r3, #255 ; 0xff + 8010eb8: f887 3027 strb.w r3, [r7, #39] ; 0x27 + int is_new_entry = 0; + 8010ebc: 2300 movs r3, #0 + 8010ebe: 623b str r3, [r7, #32] + s8_t i; /* ARP entry index */ + + /* non-unicast address? */ + if (ip4_addr_isbroadcast(ipaddr, netif) || + 8010ec0: 68bb ldr r3, [r7, #8] + 8010ec2: 681b ldr r3, [r3, #0] + 8010ec4: 68f9 ldr r1, [r7, #12] + 8010ec6: 4618 mov r0, r3 + 8010ec8: f000 fe1c bl 8011b04 + 8010ecc: 4603 mov r3, r0 + 8010ece: 2b00 cmp r3, #0 + 8010ed0: d10c bne.n 8010eec + ip4_addr_ismulticast(ipaddr) || + 8010ed2: 68bb ldr r3, [r7, #8] + 8010ed4: 681b ldr r3, [r3, #0] + 8010ed6: f003 03f0 and.w r3, r3, #240 ; 0xf0 + if (ip4_addr_isbroadcast(ipaddr, netif) || + 8010eda: 2be0 cmp r3, #224 ; 0xe0 + 8010edc: d006 beq.n 8010eec + ip4_addr_ismulticast(ipaddr) || + 8010ede: 68bb ldr r3, [r7, #8] + 8010ee0: 2b00 cmp r3, #0 + 8010ee2: d003 beq.n 8010eec + ip4_addr_isany(ipaddr)) { + 8010ee4: 68bb ldr r3, [r7, #8] + 8010ee6: 681b ldr r3, [r3, #0] + 8010ee8: 2b00 cmp r3, #0 + 8010eea: d102 bne.n 8010ef2 + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); + return ERR_ARG; + 8010eec: f06f 030f mvn.w r3, #15 + 8010ef0: e10e b.n 8011110 + } + + /* find entry in ARP cache, ask to create entry if queueing packet */ + i = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); + 8010ef2: 68fa ldr r2, [r7, #12] + 8010ef4: 2101 movs r1, #1 + 8010ef6: 68b8 ldr r0, [r7, #8] + 8010ef8: f7ff fb9c bl 8010634 + 8010efc: 4603 mov r3, r0 + 8010efe: 74fb strb r3, [r7, #19] + + /* could not find or create entry? */ + if (i < 0) { + 8010f00: f997 3013 ldrsb.w r3, [r7, #19] + 8010f04: 2b00 cmp r3, #0 + 8010f06: da02 bge.n 8010f0e + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not create ARP entry\n")); + if (q) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: packet dropped\n")); + ETHARP_STATS_INC(etharp.memerr); + } + return (err_t)i; + 8010f08: f997 3013 ldrsb.w r3, [r7, #19] + 8010f0c: e100 b.n 8011110 + } + + /* mark a fresh entry as pending (we just sent a request) */ + if (arp_table[i].state == ETHARP_STATE_EMPTY) { + 8010f0e: f997 2013 ldrsb.w r2, [r7, #19] + 8010f12: 4981 ldr r1, [pc, #516] ; (8011118 ) + 8010f14: 4613 mov r3, r2 + 8010f16: 005b lsls r3, r3, #1 + 8010f18: 4413 add r3, r2 + 8010f1a: 00db lsls r3, r3, #3 + 8010f1c: 440b add r3, r1 + 8010f1e: 3314 adds r3, #20 + 8010f20: 781b ldrb r3, [r3, #0] + 8010f22: 2b00 cmp r3, #0 + 8010f24: d117 bne.n 8010f56 + is_new_entry = 1; + 8010f26: 2301 movs r3, #1 + 8010f28: 623b str r3, [r7, #32] + arp_table[i].state = ETHARP_STATE_PENDING; + 8010f2a: f997 2013 ldrsb.w r2, [r7, #19] + 8010f2e: 497a ldr r1, [pc, #488] ; (8011118 ) + 8010f30: 4613 mov r3, r2 + 8010f32: 005b lsls r3, r3, #1 + 8010f34: 4413 add r3, r2 + 8010f36: 00db lsls r3, r3, #3 + 8010f38: 440b add r3, r1 + 8010f3a: 3314 adds r3, #20 + 8010f3c: 2201 movs r2, #1 + 8010f3e: 701a strb r2, [r3, #0] + /* record network interface for re-sending arp request in etharp_tmr */ + arp_table[i].netif = netif; + 8010f40: f997 2013 ldrsb.w r2, [r7, #19] + 8010f44: 4974 ldr r1, [pc, #464] ; (8011118 ) + 8010f46: 4613 mov r3, r2 + 8010f48: 005b lsls r3, r3, #1 + 8010f4a: 4413 add r3, r2 + 8010f4c: 00db lsls r3, r3, #3 + 8010f4e: 440b add r3, r1 + 8010f50: 3308 adds r3, #8 + 8010f52: 68fa ldr r2, [r7, #12] + 8010f54: 601a str r2, [r3, #0] + } + + /* { i is either a STABLE or (new or existing) PENDING entry } */ + LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", + 8010f56: f997 2013 ldrsb.w r2, [r7, #19] + 8010f5a: 496f ldr r1, [pc, #444] ; (8011118 ) + 8010f5c: 4613 mov r3, r2 + 8010f5e: 005b lsls r3, r3, #1 + 8010f60: 4413 add r3, r2 + 8010f62: 00db lsls r3, r3, #3 + 8010f64: 440b add r3, r1 + 8010f66: 3314 adds r3, #20 + 8010f68: 781b ldrb r3, [r3, #0] + 8010f6a: 2b01 cmp r3, #1 + 8010f6c: d012 beq.n 8010f94 + 8010f6e: f997 2013 ldrsb.w r2, [r7, #19] + 8010f72: 4969 ldr r1, [pc, #420] ; (8011118 ) + 8010f74: 4613 mov r3, r2 + 8010f76: 005b lsls r3, r3, #1 + 8010f78: 4413 add r3, r2 + 8010f7a: 00db lsls r3, r3, #3 + 8010f7c: 440b add r3, r1 + 8010f7e: 3314 adds r3, #20 + 8010f80: 781b ldrb r3, [r3, #0] + 8010f82: 2b01 cmp r3, #1 + 8010f84: d806 bhi.n 8010f94 + 8010f86: 4b65 ldr r3, [pc, #404] ; (801111c ) + 8010f88: f240 32c7 movw r2, #967 ; 0x3c7 + 8010f8c: 4964 ldr r1, [pc, #400] ; (8011120 ) + 8010f8e: 4865 ldr r0, [pc, #404] ; (8011124 ) + 8010f90: f001 fef8 bl 8012d84 + ((arp_table[i].state == ETHARP_STATE_PENDING) || + (arp_table[i].state >= ETHARP_STATE_STABLE))); + + /* do we have a new entry? or an implicit query request? */ + if (is_new_entry || (q == NULL)) { + 8010f94: 6a3b ldr r3, [r7, #32] + 8010f96: 2b00 cmp r3, #0 + 8010f98: d102 bne.n 8010fa0 + 8010f9a: 687b ldr r3, [r7, #4] + 8010f9c: 2b00 cmp r3, #0 + 8010f9e: d10c bne.n 8010fba + /* try to resolve it; send out ARP request */ + result = etharp_request(netif, ipaddr); + 8010fa0: 68b9 ldr r1, [r7, #8] + 8010fa2: 68f8 ldr r0, [r7, #12] + 8010fa4: f000 f974 bl 8011290 + 8010fa8: 4603 mov r3, r0 + 8010faa: f887 3027 strb.w r3, [r7, #39] ; 0x27 + /* ARP request couldn't be sent */ + /* We don't re-send arp request in etharp_tmr, but we still queue packets, + since this failure could be temporary, and the next packet calling + etharp_query again could lead to sending the queued packets. */ + } + if (q == NULL) { + 8010fae: 687b ldr r3, [r7, #4] + 8010fb0: 2b00 cmp r3, #0 + 8010fb2: d102 bne.n 8010fba + return result; + 8010fb4: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 + 8010fb8: e0aa b.n 8011110 + } + } + + /* packet given? */ + LWIP_ASSERT("q != NULL", q != NULL); + 8010fba: 687b ldr r3, [r7, #4] + 8010fbc: 2b00 cmp r3, #0 + 8010fbe: d106 bne.n 8010fce + 8010fc0: 4b56 ldr r3, [pc, #344] ; (801111c ) + 8010fc2: f240 32db movw r2, #987 ; 0x3db + 8010fc6: 4958 ldr r1, [pc, #352] ; (8011128 ) + 8010fc8: 4856 ldr r0, [pc, #344] ; (8011124 ) + 8010fca: f001 fedb bl 8012d84 + /* stable entry? */ + if (arp_table[i].state >= ETHARP_STATE_STABLE) { + 8010fce: f997 2013 ldrsb.w r2, [r7, #19] + 8010fd2: 4951 ldr r1, [pc, #324] ; (8011118 ) + 8010fd4: 4613 mov r3, r2 + 8010fd6: 005b lsls r3, r3, #1 + 8010fd8: 4413 add r3, r2 + 8010fda: 00db lsls r3, r3, #3 + 8010fdc: 440b add r3, r1 + 8010fde: 3314 adds r3, #20 + 8010fe0: 781b ldrb r3, [r3, #0] + 8010fe2: 2b01 cmp r3, #1 + 8010fe4: d918 bls.n 8011018 + /* we have a valid IP->Ethernet address mapping */ + ETHARP_SET_HINT(netif, i); + 8010fe6: 7cfa ldrb r2, [r7, #19] + 8010fe8: 4b50 ldr r3, [pc, #320] ; (801112c ) + 8010fea: 701a strb r2, [r3, #0] + /* send the packet */ + result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); + 8010fec: f997 2013 ldrsb.w r2, [r7, #19] + 8010ff0: 4613 mov r3, r2 + 8010ff2: 005b lsls r3, r3, #1 + 8010ff4: 4413 add r3, r2 + 8010ff6: 00db lsls r3, r3, #3 + 8010ff8: 3308 adds r3, #8 + 8010ffa: 4a47 ldr r2, [pc, #284] ; (8011118 ) + 8010ffc: 4413 add r3, r2 + 8010ffe: 3304 adds r3, #4 + 8011000: f44f 6200 mov.w r2, #2048 ; 0x800 + 8011004: 9200 str r2, [sp, #0] + 8011006: 697a ldr r2, [r7, #20] + 8011008: 6879 ldr r1, [r7, #4] + 801100a: 68f8 ldr r0, [r7, #12] + 801100c: f001 fd72 bl 8012af4 + 8011010: 4603 mov r3, r0 + 8011012: f887 3027 strb.w r3, [r7, #39] ; 0x27 + 8011016: e079 b.n 801110c + /* pending entry? (either just created or already pending */ + } else if (arp_table[i].state == ETHARP_STATE_PENDING) { + 8011018: f997 2013 ldrsb.w r2, [r7, #19] + 801101c: 493e ldr r1, [pc, #248] ; (8011118 ) + 801101e: 4613 mov r3, r2 + 8011020: 005b lsls r3, r3, #1 + 8011022: 4413 add r3, r2 + 8011024: 00db lsls r3, r3, #3 + 8011026: 440b add r3, r1 + 8011028: 3314 adds r3, #20 + 801102a: 781b ldrb r3, [r3, #0] + 801102c: 2b01 cmp r3, #1 + 801102e: d16d bne.n 801110c + /* entry is still pending, queue the given packet 'q' */ + struct pbuf *p; + int copy_needed = 0; + 8011030: 2300 movs r3, #0 + 8011032: 61bb str r3, [r7, #24] + /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but + * to copy the whole queue into a new PBUF_RAM (see bug #11400) + * PBUF_ROMs can be left as they are, since ROM must not get changed. */ + p = q; + 8011034: 687b ldr r3, [r7, #4] + 8011036: 61fb str r3, [r7, #28] + while (p) { + 8011038: e01a b.n 8011070 + LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); + 801103a: 69fb ldr r3, [r7, #28] + 801103c: 895a ldrh r2, [r3, #10] + 801103e: 69fb ldr r3, [r7, #28] + 8011040: 891b ldrh r3, [r3, #8] + 8011042: 429a cmp r2, r3 + 8011044: d10a bne.n 801105c + 8011046: 69fb ldr r3, [r7, #28] + 8011048: 681b ldr r3, [r3, #0] + 801104a: 2b00 cmp r3, #0 + 801104c: d006 beq.n 801105c + 801104e: 4b33 ldr r3, [pc, #204] ; (801111c ) + 8011050: f44f 727b mov.w r2, #1004 ; 0x3ec + 8011054: 4936 ldr r1, [pc, #216] ; (8011130 ) + 8011056: 4833 ldr r0, [pc, #204] ; (8011124 ) + 8011058: f001 fe94 bl 8012d84 + if (p->type != PBUF_ROM) { + 801105c: 69fb ldr r3, [r7, #28] + 801105e: 7b1b ldrb r3, [r3, #12] + 8011060: 2b01 cmp r3, #1 + 8011062: d002 beq.n 801106a + copy_needed = 1; + 8011064: 2301 movs r3, #1 + 8011066: 61bb str r3, [r7, #24] + break; + 8011068: e005 b.n 8011076 + } + p = p->next; + 801106a: 69fb ldr r3, [r7, #28] + 801106c: 681b ldr r3, [r3, #0] + 801106e: 61fb str r3, [r7, #28] + while (p) { + 8011070: 69fb ldr r3, [r7, #28] + 8011072: 2b00 cmp r3, #0 + 8011074: d1e1 bne.n 801103a + } + if (copy_needed) { + 8011076: 69bb ldr r3, [r7, #24] + 8011078: 2b00 cmp r3, #0 + 801107a: d017 beq.n 80110ac + /* copy the whole packet into new pbufs */ + p = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); + 801107c: 69fb ldr r3, [r7, #28] + 801107e: 891b ldrh r3, [r3, #8] + 8011080: 2200 movs r2, #0 + 8011082: 4619 mov r1, r3 + 8011084: 2002 movs r0, #2 + 8011086: f7f6 fde5 bl 8007c54 + 801108a: 61f8 str r0, [r7, #28] + if (p != NULL) { + 801108c: 69fb ldr r3, [r7, #28] + 801108e: 2b00 cmp r3, #0 + 8011090: d011 beq.n 80110b6 + if (pbuf_copy(p, q) != ERR_OK) { + 8011092: 6879 ldr r1, [r7, #4] + 8011094: 69f8 ldr r0, [r7, #28] + 8011096: f7f7 fa87 bl 80085a8 + 801109a: 4603 mov r3, r0 + 801109c: 2b00 cmp r3, #0 + 801109e: d00a beq.n 80110b6 + pbuf_free(p); + 80110a0: 69f8 ldr r0, [r7, #28] + 80110a2: f7f7 f94f bl 8008344 + p = NULL; + 80110a6: 2300 movs r3, #0 + 80110a8: 61fb str r3, [r7, #28] + 80110aa: e004 b.n 80110b6 + } + } + } else { + /* referencing the old pbuf is enough */ + p = q; + 80110ac: 687b ldr r3, [r7, #4] + 80110ae: 61fb str r3, [r7, #28] + pbuf_ref(p); + 80110b0: 69f8 ldr r0, [r7, #28] + 80110b2: f7f7 f9f1 bl 8008498 + } + /* packet could be taken over? */ + if (p != NULL) { + 80110b6: 69fb ldr r3, [r7, #28] + 80110b8: 2b00 cmp r3, #0 + 80110ba: d024 beq.n 8011106 + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); + result = ERR_MEM; + } +#else /* ARP_QUEUEING */ + /* always queue one packet per ARP request only, freeing a previously queued packet */ + if (arp_table[i].q != NULL) { + 80110bc: f997 2013 ldrsb.w r2, [r7, #19] + 80110c0: 4915 ldr r1, [pc, #84] ; (8011118 ) + 80110c2: 4613 mov r3, r2 + 80110c4: 005b lsls r3, r3, #1 + 80110c6: 4413 add r3, r2 + 80110c8: 00db lsls r3, r3, #3 + 80110ca: 440b add r3, r1 + 80110cc: 681b ldr r3, [r3, #0] + 80110ce: 2b00 cmp r3, #0 + 80110d0: d00b beq.n 80110ea + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); + pbuf_free(arp_table[i].q); + 80110d2: f997 2013 ldrsb.w r2, [r7, #19] + 80110d6: 4910 ldr r1, [pc, #64] ; (8011118 ) + 80110d8: 4613 mov r3, r2 + 80110da: 005b lsls r3, r3, #1 + 80110dc: 4413 add r3, r2 + 80110de: 00db lsls r3, r3, #3 + 80110e0: 440b add r3, r1 + 80110e2: 681b ldr r3, [r3, #0] + 80110e4: 4618 mov r0, r3 + 80110e6: f7f7 f92d bl 8008344 + } + arp_table[i].q = p; + 80110ea: f997 2013 ldrsb.w r2, [r7, #19] + 80110ee: 490a ldr r1, [pc, #40] ; (8011118 ) + 80110f0: 4613 mov r3, r2 + 80110f2: 005b lsls r3, r3, #1 + 80110f4: 4413 add r3, r2 + 80110f6: 00db lsls r3, r3, #3 + 80110f8: 440b add r3, r1 + 80110fa: 69fa ldr r2, [r7, #28] + 80110fc: 601a str r2, [r3, #0] + result = ERR_OK; + 80110fe: 2300 movs r3, #0 + 8011100: f887 3027 strb.w r3, [r7, #39] ; 0x27 + 8011104: e002 b.n 801110c + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); +#endif /* ARP_QUEUEING */ + } else { + ETHARP_STATS_INC(etharp.memerr); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); + result = ERR_MEM; + 8011106: 23ff movs r3, #255 ; 0xff + 8011108: f887 3027 strb.w r3, [r7, #39] ; 0x27 + } + } + return result; + 801110c: f997 3027 ldrsb.w r3, [r7, #39] ; 0x27 +} + 8011110: 4618 mov r0, r3 + 8011112: 3728 adds r7, #40 ; 0x28 + 8011114: 46bd mov sp, r7 + 8011116: bd80 pop {r7, pc} + 8011118: 20006ffc .word 0x20006ffc + 801111c: 08015f84 .word 0x08015f84 + 8011120: 08016130 .word 0x08016130 + 8011124: 08015ffc .word 0x08015ffc + 8011128: 08016124 .word 0x08016124 + 801112c: 200070ec .word 0x200070ec + 8011130: 08016158 .word 0x08016158 + +08011134 : +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) +{ + 8011134: b580 push {r7, lr} + 8011136: b08a sub sp, #40 ; 0x28 + 8011138: af02 add r7, sp, #8 + 801113a: 60f8 str r0, [r7, #12] + 801113c: 60b9 str r1, [r7, #8] + 801113e: 607a str r2, [r7, #4] + 8011140: 603b str r3, [r7, #0] + struct pbuf *p; + err_t result = ERR_OK; + 8011142: 2300 movs r3, #0 + 8011144: 77fb strb r3, [r7, #31] + struct etharp_hdr *hdr; + + LWIP_ASSERT("netif != NULL", netif != NULL); + 8011146: 68fb ldr r3, [r7, #12] + 8011148: 2b00 cmp r3, #0 + 801114a: d106 bne.n 801115a + 801114c: 4b3a ldr r3, [pc, #232] ; (8011238 ) + 801114e: f44f 628b mov.w r2, #1112 ; 0x458 + 8011152: 493a ldr r1, [pc, #232] ; (801123c ) + 8011154: 483a ldr r0, [pc, #232] ; (8011240 ) + 8011156: f001 fe15 bl 8012d84 + + /* allocate a pbuf for the outgoing ARP request packet */ + p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); + 801115a: 2200 movs r2, #0 + 801115c: 211c movs r1, #28 + 801115e: 2002 movs r0, #2 + 8011160: f7f6 fd78 bl 8007c54 + 8011164: 61b8 str r0, [r7, #24] + /* could allocate a pbuf for an ARP request? */ + if (p == NULL) { + 8011166: 69bb ldr r3, [r7, #24] + 8011168: 2b00 cmp r3, #0 + 801116a: d102 bne.n 8011172 + 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; + 801116c: f04f 33ff mov.w r3, #4294967295 + 8011170: e05d b.n 801122e + } + LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", + 8011172: 69bb ldr r3, [r7, #24] + 8011174: 895b ldrh r3, [r3, #10] + 8011176: 2b1b cmp r3, #27 + 8011178: d806 bhi.n 8011188 + 801117a: 4b2f ldr r3, [pc, #188] ; (8011238 ) + 801117c: f240 4263 movw r2, #1123 ; 0x463 + 8011180: 4930 ldr r1, [pc, #192] ; (8011244 ) + 8011182: 482f ldr r0, [pc, #188] ; (8011240 ) + 8011184: f001 fdfe bl 8012d84 + (p->len >= SIZEOF_ETHARP_HDR)); + + hdr = (struct etharp_hdr *)p->payload; + 8011188: 69bb ldr r3, [r7, #24] + 801118a: 685b ldr r3, [r3, #4] + 801118c: 617b str r3, [r7, #20] + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); + hdr->opcode = lwip_htons(opcode); + 801118e: 8ebb ldrh r3, [r7, #52] ; 0x34 + 8011190: 4618 mov r0, r3 + 8011192: f7f5 ff9f bl 80070d4 + 8011196: 4603 mov r3, r0 + 8011198: 461a mov r2, r3 + 801119a: 697b ldr r3, [r7, #20] + 801119c: 80da strh r2, [r3, #6] + + LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", + 801119e: 68fb ldr r3, [r7, #12] + 80111a0: f893 302c ldrb.w r3, [r3, #44] ; 0x2c + 80111a4: 2b06 cmp r3, #6 + 80111a6: d006 beq.n 80111b6 + 80111a8: 4b23 ldr r3, [pc, #140] ; (8011238 ) + 80111aa: f240 426a movw r2, #1130 ; 0x46a + 80111ae: 4926 ldr r1, [pc, #152] ; (8011248 ) + 80111b0: 4823 ldr r0, [pc, #140] ; (8011240 ) + 80111b2: f001 fde7 bl 8012d84 + (netif->hwaddr_len == ETH_HWADDR_LEN)); + + /* Write the ARP MAC-Addresses */ + ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); + 80111b6: 697b ldr r3, [r7, #20] + 80111b8: 3308 adds r3, #8 + 80111ba: 2206 movs r2, #6 + 80111bc: 6839 ldr r1, [r7, #0] + 80111be: 4618 mov r0, r3 + 80111c0: f001 ffab bl 801311a + ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); + 80111c4: 697b ldr r3, [r7, #20] + 80111c6: 3312 adds r3, #18 + 80111c8: 2206 movs r2, #6 + 80111ca: 6af9 ldr r1, [r7, #44] ; 0x2c + 80111cc: 4618 mov r0, r3 + 80111ce: f001 ffa4 bl 801311a + /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + * structure packing. */ + IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); + 80111d2: 697b ldr r3, [r7, #20] + 80111d4: 330e adds r3, #14 + 80111d6: 6aba ldr r2, [r7, #40] ; 0x28 + 80111d8: 6812 ldr r2, [r2, #0] + 80111da: 601a str r2, [r3, #0] + IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); + 80111dc: 697b ldr r3, [r7, #20] + 80111de: 3318 adds r3, #24 + 80111e0: 6b3a ldr r2, [r7, #48] ; 0x30 + 80111e2: 6812 ldr r2, [r2, #0] + 80111e4: 601a str r2, [r3, #0] + + hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); + 80111e6: 697b ldr r3, [r7, #20] + 80111e8: 2200 movs r2, #0 + 80111ea: 701a strb r2, [r3, #0] + 80111ec: 2200 movs r2, #0 + 80111ee: f042 0201 orr.w r2, r2, #1 + 80111f2: 705a strb r2, [r3, #1] + hdr->proto = PP_HTONS(ETHTYPE_IP); + 80111f4: 697b ldr r3, [r7, #20] + 80111f6: 2200 movs r2, #0 + 80111f8: f042 0208 orr.w r2, r2, #8 + 80111fc: 709a strb r2, [r3, #2] + 80111fe: 2200 movs r2, #0 + 8011200: 70da strb r2, [r3, #3] + /* set hwlen and protolen */ + hdr->hwlen = ETH_HWADDR_LEN; + 8011202: 697b ldr r3, [r7, #20] + 8011204: 2206 movs r2, #6 + 8011206: 711a strb r2, [r3, #4] + hdr->protolen = sizeof(ip4_addr_t); + 8011208: 697b ldr r3, [r7, #20] + 801120a: 2204 movs r2, #4 + 801120c: 715a strb r2, [r3, #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); + 801120e: f640 0306 movw r3, #2054 ; 0x806 + 8011212: 9300 str r3, [sp, #0] + 8011214: 687b ldr r3, [r7, #4] + 8011216: 68ba ldr r2, [r7, #8] + 8011218: 69b9 ldr r1, [r7, #24] + 801121a: 68f8 ldr r0, [r7, #12] + 801121c: f001 fc6a bl 8012af4 + } + + ETHARP_STATS_INC(etharp.xmit); + /* free ARP query packet */ + pbuf_free(p); + 8011220: 69b8 ldr r0, [r7, #24] + 8011222: f7f7 f88f bl 8008344 + p = NULL; + 8011226: 2300 movs r3, #0 + 8011228: 61bb str r3, [r7, #24] + /* could not allocate pbuf for ARP request */ + + return result; + 801122a: f997 301f ldrsb.w r3, [r7, #31] +} + 801122e: 4618 mov r0, r3 + 8011230: 3720 adds r7, #32 + 8011232: 46bd mov sp, r7 + 8011234: bd80 pop {r7, pc} + 8011236: bf00 nop + 8011238: 08015f84 .word 0x08015f84 + 801123c: 080160d4 .word 0x080160d4 + 8011240: 08015ffc .word 0x08015ffc + 8011244: 08016174 .word 0x08016174 + 8011248: 080161a8 .word 0x080161a8 + +0801124c : + * 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) +{ + 801124c: b580 push {r7, lr} + 801124e: b088 sub sp, #32 + 8011250: af04 add r7, sp, #16 + 8011252: 60f8 str r0, [r7, #12] + 8011254: 60b9 str r1, [r7, #8] + 8011256: 607a str r2, [r7, #4] + return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, + 8011258: 68fb ldr r3, [r7, #12] + 801125a: f103 012d add.w r1, r3, #45 ; 0x2d + (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, + 801125e: 68fb ldr r3, [r7, #12] + 8011260: f103 002d add.w r0, r3, #45 ; 0x2d + 8011264: 68fb ldr r3, [r7, #12] + 8011266: 3304 adds r3, #4 + return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, + 8011268: 2201 movs r2, #1 + 801126a: 9203 str r2, [sp, #12] + 801126c: 68ba ldr r2, [r7, #8] + 801126e: 9202 str r2, [sp, #8] + 8011270: 4a06 ldr r2, [pc, #24] ; (801128c ) + 8011272: 9201 str r2, [sp, #4] + 8011274: 9300 str r3, [sp, #0] + 8011276: 4603 mov r3, r0 + 8011278: 687a ldr r2, [r7, #4] + 801127a: 68f8 ldr r0, [r7, #12] + 801127c: f7ff ff5a bl 8011134 + 8011280: 4603 mov r3, r0 + ipaddr, ARP_REQUEST); +} + 8011282: 4618 mov r0, r3 + 8011284: 3710 adds r7, #16 + 8011286: 46bd mov sp, r7 + 8011288: bd80 pop {r7, pc} + 801128a: bf00 nop + 801128c: 08016778 .word 0x08016778 + +08011290 : + * 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) +{ + 8011290: b580 push {r7, lr} + 8011292: b082 sub sp, #8 + 8011294: af00 add r7, sp, #0 + 8011296: 6078 str r0, [r7, #4] + 8011298: 6039 str r1, [r7, #0] + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); + return etharp_request_dst(netif, ipaddr, ðbroadcast); + 801129a: 4a05 ldr r2, [pc, #20] ; (80112b0 ) + 801129c: 6839 ldr r1, [r7, #0] + 801129e: 6878 ldr r0, [r7, #4] + 80112a0: f7ff ffd4 bl 801124c + 80112a4: 4603 mov r3, r0 +} + 80112a6: 4618 mov r0, r3 + 80112a8: 3708 adds r7, #8 + 80112aa: 46bd mov sp, r7 + 80112ac: bd80 pop {r7, pc} + 80112ae: bf00 nop + 80112b0: 08016770 .word 0x08016770 + +080112b4 : + * @param p the icmp echo request packet, p->payload pointing to the icmp header + * @param inp the netif on which this packet was received + */ +void +icmp_input(struct pbuf *p, struct netif *inp) +{ + 80112b4: b580 push {r7, lr} + 80112b6: b08e sub sp, #56 ; 0x38 + 80112b8: af04 add r7, sp, #16 + 80112ba: 6078 str r0, [r7, #4] + 80112bc: 6039 str r1, [r7, #0] + const ip4_addr_t* src; + + ICMP_STATS_INC(icmp.recv); + MIB2_STATS_INC(mib2.icmpinmsgs); + + iphdr_in = ip4_current_header(); + 80112be: 4b7a ldr r3, [pc, #488] ; (80114a8 ) + 80112c0: 689b ldr r3, [r3, #8] + 80112c2: 627b str r3, [r7, #36] ; 0x24 + hlen = IPH_HL(iphdr_in) * 4; + 80112c4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80112c6: 781b ldrb r3, [r3, #0] + 80112c8: b29b uxth r3, r3 + 80112ca: f003 030f and.w r3, r3, #15 + 80112ce: b29b uxth r3, r3 + 80112d0: 009b lsls r3, r3, #2 + 80112d2: 847b strh r3, [r7, #34] ; 0x22 + if (hlen < IP_HLEN) { + 80112d4: 8c7b ldrh r3, [r7, #34] ; 0x22 + 80112d6: 2b13 cmp r3, #19 + 80112d8: f240 80d1 bls.w 801147e + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); + goto lenerr; + } + if (p->len < sizeof(u16_t)*2) { + 80112dc: 687b ldr r3, [r7, #4] + 80112de: 895b ldrh r3, [r3, #10] + 80112e0: 2b03 cmp r3, #3 + 80112e2: f240 80ce bls.w 8011482 + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); + goto lenerr; + } + + type = *((u8_t *)p->payload); + 80112e6: 687b ldr r3, [r7, #4] + 80112e8: 685b ldr r3, [r3, #4] + 80112ea: 781b ldrb r3, [r3, #0] + 80112ec: f887 3021 strb.w r3, [r7, #33] ; 0x21 +#ifdef LWIP_DEBUG + code = *(((u8_t *)p->payload)+1); +#endif /* LWIP_DEBUG */ + switch (type) { + 80112f0: f897 3021 ldrb.w r3, [r7, #33] ; 0x21 + 80112f4: 2b00 cmp r3, #0 + 80112f6: f000 80bb beq.w 8011470 + 80112fa: 2b08 cmp r3, #8 + 80112fc: f040 80bb bne.w 8011476 + (as obviously, an echo request has been sent, too). */ + MIB2_STATS_INC(mib2.icmpinechoreps); + break; + case ICMP_ECHO: + MIB2_STATS_INC(mib2.icmpinechos); + src = ip4_current_dest_addr(); + 8011300: 4b6a ldr r3, [pc, #424] ; (80114ac ) + 8011302: 61fb str r3, [r7, #28] + /* multicast destination address? */ + if (ip4_addr_ismulticast(ip4_current_dest_addr())) { + 8011304: 4b68 ldr r3, [pc, #416] ; (80114a8 ) + 8011306: 695b ldr r3, [r3, #20] + 8011308: f003 03f0 and.w r3, r3, #240 ; 0xf0 + 801130c: 2be0 cmp r3, #224 ; 0xe0 + 801130e: f000 80bf beq.w 8011490 + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n")); + goto icmperr; +#endif /* LWIP_MULTICAST_PING */ + } + /* broadcast destination address? */ + if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { + 8011312: 4b65 ldr r3, [pc, #404] ; (80114a8 ) + 8011314: 695b ldr r3, [r3, #20] + 8011316: 4a64 ldr r2, [pc, #400] ; (80114a8 ) + 8011318: 6812 ldr r2, [r2, #0] + 801131a: 4611 mov r1, r2 + 801131c: 4618 mov r0, r3 + 801131e: f000 fbf1 bl 8011b04 + 8011322: 4603 mov r3, r0 + 8011324: 2b00 cmp r3, #0 + 8011326: f040 80b5 bne.w 8011494 + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n")); + goto icmperr; +#endif /* LWIP_BROADCAST_PING */ + } + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); + if (p->tot_len < sizeof(struct icmp_echo_hdr)) { + 801132a: 687b ldr r3, [r7, #4] + 801132c: 891b ldrh r3, [r3, #8] + 801132e: 2b07 cmp r3, #7 + 8011330: f240 80a9 bls.w 8011486 + return; + } + } +#endif +#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN + if (pbuf_header(p, (s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { + 8011334: 8c7b ldrh r3, [r7, #34] ; 0x22 + 8011336: 330e adds r3, #14 + 8011338: b29b uxth r3, r3 + 801133a: b21b sxth r3, r3 + 801133c: 4619 mov r1, r3 + 801133e: 6878 ldr r0, [r7, #4] + 8011340: f7f6 ffdc bl 80082fc + 8011344: 4603 mov r3, r0 + 8011346: 2b00 cmp r3, #0 + 8011348: d046 beq.n 80113d8 + /* p is not big enough to contain link headers + * allocate a new one and copy p into it + */ + struct pbuf *r; + /* allocate new packet buffer with space for link headers */ + r = pbuf_alloc(PBUF_LINK, p->tot_len + hlen, PBUF_RAM); + 801134a: 687b ldr r3, [r7, #4] + 801134c: 891a ldrh r2, [r3, #8] + 801134e: 8c7b ldrh r3, [r7, #34] ; 0x22 + 8011350: 4413 add r3, r2 + 8011352: b29b uxth r3, r3 + 8011354: 2200 movs r2, #0 + 8011356: 4619 mov r1, r3 + 8011358: 2002 movs r0, #2 + 801135a: f7f6 fc7b bl 8007c54 + 801135e: 61b8 str r0, [r7, #24] + if (r == NULL) { + 8011360: 69bb ldr r3, [r7, #24] + 8011362: 2b00 cmp r3, #0 + 8011364: f000 8098 beq.w 8011498 + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); + goto icmperr; + } + if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { + 8011368: 69bb ldr r3, [r7, #24] + 801136a: 895b ldrh r3, [r3, #10] + 801136c: 461a mov r2, r3 + 801136e: 8c7b ldrh r3, [r7, #34] ; 0x22 + 8011370: 3308 adds r3, #8 + 8011372: 429a cmp r2, r3 + 8011374: d203 bcs.n 801137e + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); + pbuf_free(r); + 8011376: 69b8 ldr r0, [r7, #24] + 8011378: f7f6 ffe4 bl 8008344 + goto icmperr; + 801137c: e08d b.n 801149a + } + /* copy the ip header */ + MEMCPY(r->payload, iphdr_in, hlen); + 801137e: 69bb ldr r3, [r7, #24] + 8011380: 685b ldr r3, [r3, #4] + 8011382: 8c7a ldrh r2, [r7, #34] ; 0x22 + 8011384: 6a79 ldr r1, [r7, #36] ; 0x24 + 8011386: 4618 mov r0, r3 + 8011388: f001 fec7 bl 801311a + /* switch r->payload back to icmp header (cannot fail) */ + if (pbuf_header(r, (s16_t)-hlen)) { + 801138c: 8c7b ldrh r3, [r7, #34] ; 0x22 + 801138e: 425b negs r3, r3 + 8011390: b29b uxth r3, r3 + 8011392: b21b sxth r3, r3 + 8011394: 4619 mov r1, r3 + 8011396: 69b8 ldr r0, [r7, #24] + 8011398: f7f6 ffb0 bl 80082fc + 801139c: 4603 mov r3, r0 + 801139e: 2b00 cmp r3, #0 + 80113a0: d009 beq.n 80113b6 + LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); + 80113a2: 4b43 ldr r3, [pc, #268] ; (80114b0 ) + 80113a4: 22af movs r2, #175 ; 0xaf + 80113a6: 4943 ldr r1, [pc, #268] ; (80114b4 ) + 80113a8: 4843 ldr r0, [pc, #268] ; (80114b8 ) + 80113aa: f001 fceb bl 8012d84 + pbuf_free(r); + 80113ae: 69b8 ldr r0, [r7, #24] + 80113b0: f7f6 ffc8 bl 8008344 + goto icmperr; + 80113b4: e071 b.n 801149a + } + /* copy the rest of the packet without ip header */ + if (pbuf_copy(r, p) != ERR_OK) { + 80113b6: 6879 ldr r1, [r7, #4] + 80113b8: 69b8 ldr r0, [r7, #24] + 80113ba: f7f7 f8f5 bl 80085a8 + 80113be: 4603 mov r3, r0 + 80113c0: 2b00 cmp r3, #0 + 80113c2: d003 beq.n 80113cc + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); + pbuf_free(r); + 80113c4: 69b8 ldr r0, [r7, #24] + 80113c6: f7f6 ffbd bl 8008344 + goto icmperr; + 80113ca: e066 b.n 801149a + } + /* free the original p */ + pbuf_free(p); + 80113cc: 6878 ldr r0, [r7, #4] + 80113ce: f7f6 ffb9 bl 8008344 + /* we now have an identical copy of p that has room for link headers */ + p = r; + 80113d2: 69bb ldr r3, [r7, #24] + 80113d4: 607b str r3, [r7, #4] + 80113d6: e015 b.n 8011404 + } else { + /* restore p->payload to point to icmp header (cannot fail) */ + if (pbuf_header(p, -(s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { + 80113d8: 8c7b ldrh r3, [r7, #34] ; 0x22 + 80113da: f1c3 23ff rsb r3, r3, #4278255360 ; 0xff00ff00 + 80113de: f503 037f add.w r3, r3, #16711680 ; 0xff0000 + 80113e2: 33f2 adds r3, #242 ; 0xf2 + 80113e4: b29b uxth r3, r3 + 80113e6: b21b sxth r3, r3 + 80113e8: 4619 mov r1, r3 + 80113ea: 6878 ldr r0, [r7, #4] + 80113ec: f7f6 ff86 bl 80082fc + 80113f0: 4603 mov r3, r0 + 80113f2: 2b00 cmp r3, #0 + 80113f4: d006 beq.n 8011404 + LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); + 80113f6: 4b2e ldr r3, [pc, #184] ; (80114b0 ) + 80113f8: 22c0 movs r2, #192 ; 0xc0 + 80113fa: 4930 ldr r1, [pc, #192] ; (80114bc ) + 80113fc: 482e ldr r0, [pc, #184] ; (80114b8 ) + 80113fe: f001 fcc1 bl 8012d84 + goto icmperr; + 8011402: e04a b.n 801149a + } +#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ + /* At this point, all checks are OK. */ + /* We generate an answer by switching the dest and src ip addresses, + * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ + iecho = (struct icmp_echo_hdr *)p->payload; + 8011404: 687b ldr r3, [r7, #4] + 8011406: 685b ldr r3, [r3, #4] + 8011408: 617b str r3, [r7, #20] + if (pbuf_header(p, (s16_t)hlen)) { + 801140a: f9b7 3022 ldrsh.w r3, [r7, #34] ; 0x22 + 801140e: 4619 mov r1, r3 + 8011410: 6878 ldr r0, [r7, #4] + 8011412: f7f6 ff73 bl 80082fc + 8011416: 4603 mov r3, r0 + 8011418: 2b00 cmp r3, #0 + 801141a: d12b bne.n 8011474 + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet")); + } else { + err_t ret; + struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; + 801141c: 687b ldr r3, [r7, #4] + 801141e: 685b ldr r3, [r3, #4] + 8011420: 613b str r3, [r7, #16] + ip4_addr_copy(iphdr->src, *src); + 8011422: 69fb ldr r3, [r7, #28] + 8011424: 681a ldr r2, [r3, #0] + 8011426: 693b ldr r3, [r7, #16] + 8011428: 60da str r2, [r3, #12] + ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); + 801142a: 4b1f ldr r3, [pc, #124] ; (80114a8 ) + 801142c: 691a ldr r2, [r3, #16] + 801142e: 693b ldr r3, [r7, #16] + 8011430: 611a str r2, [r3, #16] + ICMPH_TYPE_SET(iecho, ICMP_ER); + 8011432: 697b ldr r3, [r7, #20] + 8011434: 2200 movs r2, #0 + 8011436: 701a strb r2, [r3, #0] + else { + iecho->chksum = 0; + } +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ +#else /* CHECKSUM_GEN_ICMP */ + iecho->chksum = 0; + 8011438: 697b ldr r3, [r7, #20] + 801143a: 2200 movs r2, #0 + 801143c: 709a strb r2, [r3, #2] + 801143e: 2200 movs r2, #0 + 8011440: 70da strb r2, [r3, #3] +#endif /* CHECKSUM_GEN_ICMP */ + + /* Set the correct TTL and recalculate the header checksum. */ + IPH_TTL_SET(iphdr, ICMP_TTL); + 8011442: 693b ldr r3, [r7, #16] + 8011444: 22ff movs r2, #255 ; 0xff + 8011446: 721a strb r2, [r3, #8] + IPH_CHKSUM_SET(iphdr, 0); + 8011448: 693b ldr r3, [r7, #16] + 801144a: 2200 movs r2, #0 + 801144c: 729a strb r2, [r3, #10] + 801144e: 2200 movs r2, #0 + 8011450: 72da strb r2, [r3, #11] + MIB2_STATS_INC(mib2.icmpoutmsgs); + /* increase number of echo replies attempted to send */ + MIB2_STATS_INC(mib2.icmpoutechoreps); + + /* send an ICMP packet */ + ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, + 8011452: 683b ldr r3, [r7, #0] + 8011454: 9302 str r3, [sp, #8] + 8011456: 2301 movs r3, #1 + 8011458: 9301 str r3, [sp, #4] + 801145a: 2300 movs r3, #0 + 801145c: 9300 str r3, [sp, #0] + 801145e: 23ff movs r3, #255 ; 0xff + 8011460: 2200 movs r2, #0 + 8011462: 69f9 ldr r1, [r7, #28] + 8011464: 6878 ldr r0, [r7, #4] + 8011466: f000 fa7b bl 8011960 + 801146a: 4603 mov r3, r0 + 801146c: 73fb strb r3, [r7, #15] + ICMP_TTL, 0, IP_PROTO_ICMP, inp); + if (ret != ERR_OK) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret))); + } + } + break; + 801146e: e001 b.n 8011474 + break; + 8011470: bf00 nop + 8011472: e000 b.n 8011476 + break; + 8011474: bf00 nop + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", + (s16_t)type, (s16_t)code)); + ICMP_STATS_INC(icmp.proterr); + ICMP_STATS_INC(icmp.drop); + } + pbuf_free(p); + 8011476: 6878 ldr r0, [r7, #4] + 8011478: f7f6 ff64 bl 8008344 + return; + 801147c: e011 b.n 80114a2 + goto lenerr; + 801147e: bf00 nop + 8011480: e002 b.n 8011488 + goto lenerr; + 8011482: bf00 nop + 8011484: e000 b.n 8011488 + goto lenerr; + 8011486: bf00 nop +lenerr: + pbuf_free(p); + 8011488: 6878 ldr r0, [r7, #4] + 801148a: f7f6 ff5b bl 8008344 + ICMP_STATS_INC(icmp.lenerr); + MIB2_STATS_INC(mib2.icmpinerrors); + return; + 801148e: e008 b.n 80114a2 + goto icmperr; + 8011490: bf00 nop + 8011492: e002 b.n 801149a + goto icmperr; + 8011494: bf00 nop + 8011496: e000 b.n 801149a + goto icmperr; + 8011498: bf00 nop +#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING +icmperr: + pbuf_free(p); + 801149a: 6878 ldr r0, [r7, #4] + 801149c: f7f6 ff52 bl 8008344 + ICMP_STATS_INC(icmp.err); + MIB2_STATS_INC(mib2.icmpinerrors); + return; + 80114a0: bf00 nop +#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ +} + 80114a2: 3728 adds r7, #40 ; 0x28 + 80114a4: 46bd mov sp, r7 + 80114a6: bd80 pop {r7, pc} + 80114a8: 200039ec .word 0x200039ec + 80114ac: 20003a00 .word 0x20003a00 + 80114b0: 080161ec .word 0x080161ec + 80114b4: 08016224 .word 0x08016224 + 80114b8: 0801625c .word 0x0801625c + 80114bc: 08016284 .word 0x08016284 + +080114c0 : + * p->payload pointing to the IP header + * @param t type of the 'unreachable' packet + */ +void +icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) +{ + 80114c0: b580 push {r7, lr} + 80114c2: b082 sub sp, #8 + 80114c4: af00 add r7, sp, #0 + 80114c6: 6078 str r0, [r7, #4] + 80114c8: 460b mov r3, r1 + 80114ca: 70fb strb r3, [r7, #3] + MIB2_STATS_INC(mib2.icmpoutdestunreachs); + icmp_send_response(p, ICMP_DUR, t); + 80114cc: 78fb ldrb r3, [r7, #3] + 80114ce: 461a mov r2, r3 + 80114d0: 2103 movs r1, #3 + 80114d2: 6878 ldr r0, [r7, #4] + 80114d4: f000 f814 bl 8011500 +} + 80114d8: bf00 nop + 80114da: 3708 adds r7, #8 + 80114dc: 46bd mov sp, r7 + 80114de: bd80 pop {r7, pc} + +080114e0 : + * p->payload pointing to the IP header + * @param t type of the 'time exceeded' packet + */ +void +icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t) +{ + 80114e0: b580 push {r7, lr} + 80114e2: b082 sub sp, #8 + 80114e4: af00 add r7, sp, #0 + 80114e6: 6078 str r0, [r7, #4] + 80114e8: 460b mov r3, r1 + 80114ea: 70fb strb r3, [r7, #3] + MIB2_STATS_INC(mib2.icmpouttimeexcds); + icmp_send_response(p, ICMP_TE, t); + 80114ec: 78fb ldrb r3, [r7, #3] + 80114ee: 461a mov r2, r3 + 80114f0: 210b movs r1, #11 + 80114f2: 6878 ldr r0, [r7, #4] + 80114f4: f000 f804 bl 8011500 +} + 80114f8: bf00 nop + 80114fa: 3708 adds r7, #8 + 80114fc: 46bd mov sp, r7 + 80114fe: bd80 pop {r7, pc} + +08011500 : + * @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) +{ + 8011500: b580 push {r7, lr} + 8011502: b08c sub sp, #48 ; 0x30 + 8011504: af04 add r7, sp, #16 + 8011506: 6078 str r0, [r7, #4] + 8011508: 460b mov r3, r1 + 801150a: 70fb strb r3, [r7, #3] + 801150c: 4613 mov r3, r2 + 801150e: 70bb strb r3, [r7, #2] + + /* 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, + 8011510: 2200 movs r2, #0 + 8011512: 2124 movs r1, #36 ; 0x24 + 8011514: 2001 movs r0, #1 + 8011516: f7f6 fb9d bl 8007c54 + 801151a: 61f8 str r0, [r7, #28] + PBUF_RAM); + if (q == NULL) { + 801151c: 69fb ldr r3, [r7, #28] + 801151e: 2b00 cmp r3, #0 + 8011520: d04c beq.n 80115bc + 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", + 8011522: 69fb ldr r3, [r7, #28] + 8011524: 895b ldrh r3, [r3, #10] + 8011526: 2b23 cmp r3, #35 ; 0x23 + 8011528: d806 bhi.n 8011538 + 801152a: 4b26 ldr r3, [pc, #152] ; (80115c4 ) + 801152c: f240 1261 movw r2, #353 ; 0x161 + 8011530: 4925 ldr r1, [pc, #148] ; (80115c8 ) + 8011532: 4826 ldr r0, [pc, #152] ; (80115cc ) + 8011534: f001 fc26 bl 8012d84 + (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); + + iphdr = (struct ip_hdr *)p->payload; + 8011538: 687b ldr r3, [r7, #4] + 801153a: 685b ldr r3, [r3, #4] + 801153c: 61bb str r3, [r7, #24] + 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; + 801153e: 69fb ldr r3, [r7, #28] + 8011540: 685b ldr r3, [r3, #4] + 8011542: 617b str r3, [r7, #20] + icmphdr->type = type; + 8011544: 697b ldr r3, [r7, #20] + 8011546: 78fa ldrb r2, [r7, #3] + 8011548: 701a strb r2, [r3, #0] + icmphdr->code = code; + 801154a: 697b ldr r3, [r7, #20] + 801154c: 78ba ldrb r2, [r7, #2] + 801154e: 705a strb r2, [r3, #1] + icmphdr->id = 0; + 8011550: 697b ldr r3, [r7, #20] + 8011552: 2200 movs r2, #0 + 8011554: 711a strb r2, [r3, #4] + 8011556: 2200 movs r2, #0 + 8011558: 715a strb r2, [r3, #5] + icmphdr->seqno = 0; + 801155a: 697b ldr r3, [r7, #20] + 801155c: 2200 movs r2, #0 + 801155e: 719a strb r2, [r3, #6] + 8011560: 2200 movs r2, #0 + 8011562: 71da strb r2, [r3, #7] + + /* copy fields from original packet */ + SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, + 8011564: 69fb ldr r3, [r7, #28] + 8011566: 685b ldr r3, [r3, #4] + 8011568: f103 0008 add.w r0, r3, #8 + 801156c: 687b ldr r3, [r7, #4] + 801156e: 685b ldr r3, [r3, #4] + 8011570: 221c movs r2, #28 + 8011572: 4619 mov r1, r3 + 8011574: f001 fdd1 bl 801311a + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); + + ip4_addr_copy(iphdr_src, iphdr->src); + 8011578: 69bb ldr r3, [r7, #24] + 801157a: 68db ldr r3, [r3, #12] + 801157c: 60fb str r3, [r7, #12] + ip4_addr_t iphdr_dst; + ip4_addr_copy(iphdr_dst, iphdr->dest); + netif = ip4_route_src(&iphdr_src, &iphdr_dst); + } +#else + netif = ip4_route(&iphdr_src); + 801157e: f107 030c add.w r3, r7, #12 + 8011582: 4618 mov r0, r3 + 8011584: f000 f824 bl 80115d0 + 8011588: 6138 str r0, [r7, #16] +#endif + if (netif != NULL) { + 801158a: 693b ldr r3, [r7, #16] + 801158c: 2b00 cmp r3, #0 + 801158e: d011 beq.n 80115b4 + /* calculate checksum */ + icmphdr->chksum = 0; + 8011590: 697b ldr r3, [r7, #20] + 8011592: 2200 movs r2, #0 + 8011594: 709a strb r2, [r3, #2] + 8011596: 2200 movs r2, #0 + 8011598: 70da strb r2, [r3, #3] + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) { + icmphdr->chksum = inet_chksum(icmphdr, q->len); + } +#endif + ICMP_STATS_INC(icmp.xmit); + ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif); + 801159a: f107 020c add.w r2, r7, #12 + 801159e: 693b ldr r3, [r7, #16] + 80115a0: 9302 str r3, [sp, #8] + 80115a2: 2301 movs r3, #1 + 80115a4: 9301 str r3, [sp, #4] + 80115a6: 2300 movs r3, #0 + 80115a8: 9300 str r3, [sp, #0] + 80115aa: 23ff movs r3, #255 ; 0xff + 80115ac: 2100 movs r1, #0 + 80115ae: 69f8 ldr r0, [r7, #28] + 80115b0: f000 f9d6 bl 8011960 + } + pbuf_free(q); + 80115b4: 69f8 ldr r0, [r7, #28] + 80115b6: f7f6 fec5 bl 8008344 + 80115ba: e000 b.n 80115be + return; + 80115bc: bf00 nop +} + 80115be: 3720 adds r7, #32 + 80115c0: 46bd mov sp, r7 + 80115c2: bd80 pop {r7, pc} + 80115c4: 080161ec .word 0x080161ec + 80115c8: 080162b8 .word 0x080162b8 + 80115cc: 0801625c .word 0x0801625c + +080115d0 : + * @param dest the destination IP address for which to find the route + * @return the netif on which to send to reach dest + */ +struct netif * +ip4_route(const ip4_addr_t *dest) +{ + 80115d0: b480 push {r7} + 80115d2: b085 sub sp, #20 + 80115d4: af00 add r7, sp, #0 + 80115d6: 6078 str r0, [r7, #4] + return ip4_default_multicast_netif; + } +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + + /* iterate through netifs */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + 80115d8: 4b30 ldr r3, [pc, #192] ; (801169c ) + 80115da: 681b ldr r3, [r3, #0] + 80115dc: 60fb str r3, [r7, #12] + 80115de: e036 b.n 801164e + /* is the netif up, does it have a link and a valid address? */ + if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { + 80115e0: 68fb ldr r3, [r7, #12] + 80115e2: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 80115e6: f003 0301 and.w r3, r3, #1 + 80115ea: b2db uxtb r3, r3 + 80115ec: 2b00 cmp r3, #0 + 80115ee: d02b beq.n 8011648 + 80115f0: 68fb ldr r3, [r7, #12] + 80115f2: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 80115f6: 089b lsrs r3, r3, #2 + 80115f8: f003 0301 and.w r3, r3, #1 + 80115fc: b2db uxtb r3, r3 + 80115fe: 2b00 cmp r3, #0 + 8011600: d022 beq.n 8011648 + 8011602: 68fb ldr r3, [r7, #12] + 8011604: 3304 adds r3, #4 + 8011606: 681b ldr r3, [r3, #0] + 8011608: 2b00 cmp r3, #0 + 801160a: d01d beq.n 8011648 + /* network mask matches? */ + if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { + 801160c: 687b ldr r3, [r7, #4] + 801160e: 681a ldr r2, [r3, #0] + 8011610: 68fb ldr r3, [r7, #12] + 8011612: 3304 adds r3, #4 + 8011614: 681b ldr r3, [r3, #0] + 8011616: 405a eors r2, r3 + 8011618: 68fb ldr r3, [r7, #12] + 801161a: 3308 adds r3, #8 + 801161c: 681b ldr r3, [r3, #0] + 801161e: 4013 ands r3, r2 + 8011620: 2b00 cmp r3, #0 + 8011622: d101 bne.n 8011628 + /* return netif on which to forward IP packet */ + return netif; + 8011624: 68fb ldr r3, [r7, #12] + 8011626: e033 b.n 8011690 + } + /* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */ + if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) { + 8011628: 68fb ldr r3, [r7, #12] + 801162a: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 801162e: f003 0302 and.w r3, r3, #2 + 8011632: 2b00 cmp r3, #0 + 8011634: d108 bne.n 8011648 + 8011636: 687b ldr r3, [r7, #4] + 8011638: 681a ldr r2, [r3, #0] + 801163a: 68fb ldr r3, [r7, #12] + 801163c: 330c adds r3, #12 + 801163e: 681b ldr r3, [r3, #0] + 8011640: 429a cmp r2, r3 + 8011642: d101 bne.n 8011648 + /* return netif on which to forward IP packet */ + return netif; + 8011644: 68fb ldr r3, [r7, #12] + 8011646: e023 b.n 8011690 + for (netif = netif_list; netif != NULL; netif = netif->next) { + 8011648: 68fb ldr r3, [r7, #12] + 801164a: 681b ldr r3, [r3, #0] + 801164c: 60fb str r3, [r7, #12] + 801164e: 68fb ldr r3, [r7, #12] + 8011650: 2b00 cmp r3, #0 + 8011652: d1c5 bne.n 80115e0 + if (netif != NULL) { + return netif; + } +#endif + + if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || + 8011654: 4b12 ldr r3, [pc, #72] ; (80116a0 ) + 8011656: 681b ldr r3, [r3, #0] + 8011658: 2b00 cmp r3, #0 + 801165a: d015 beq.n 8011688 + 801165c: 4b10 ldr r3, [pc, #64] ; (80116a0 ) + 801165e: 681b ldr r3, [r3, #0] + 8011660: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8011664: f003 0301 and.w r3, r3, #1 + 8011668: 2b00 cmp r3, #0 + 801166a: d00d beq.n 8011688 + 801166c: 4b0c ldr r3, [pc, #48] ; (80116a0 ) + 801166e: 681b ldr r3, [r3, #0] + 8011670: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8011674: f003 0304 and.w r3, r3, #4 + 8011678: 2b00 cmp r3, #0 + 801167a: d005 beq.n 8011688 + ip4_addr_isany_val(*netif_ip4_addr(netif_default))) { + 801167c: 4b08 ldr r3, [pc, #32] ; (80116a0 ) + 801167e: 681b ldr r3, [r3, #0] + 8011680: 3304 adds r3, #4 + 8011682: 681b ldr r3, [r3, #0] + if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || + 8011684: 2b00 cmp r3, #0 + 8011686: d101 bne.n 801168c + If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */ + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); + IP_STATS_INC(ip.rterr); + MIB2_STATS_INC(mib2.ipoutnoroutes); + return NULL; + 8011688: 2300 movs r3, #0 + 801168a: e001 b.n 8011690 + } + + return netif_default; + 801168c: 4b04 ldr r3, [pc, #16] ; (80116a0 ) + 801168e: 681b ldr r3, [r3, #0] +} + 8011690: 4618 mov r0, r3 + 8011692: 3714 adds r7, #20 + 8011694: 46bd mov sp, r7 + 8011696: bc80 pop {r7} + 8011698: 4770 bx lr + 801169a: bf00 nop + 801169c: 20006f5c .word 0x20006f5c + 80116a0: 20006f60 .word 0x20006f60 + +080116a4 : + * @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) +{ + 80116a4: b580 push {r7, lr} + 80116a6: b088 sub sp, #32 + 80116a8: af00 add r7, sp, #0 + 80116aa: 6078 str r0, [r7, #4] + 80116ac: 6039 str r1, [r7, #0] + struct ip_hdr *iphdr; + struct netif *netif; + u16_t iphdr_hlen; + u16_t iphdr_len; +#if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP + int check_ip_src = 1; + 80116ae: 2301 movs r3, #1 + 80116b0: 617b str r3, [r7, #20] + + IP_STATS_INC(ip.recv); + MIB2_STATS_INC(mib2.ipinreceives); + + /* identify the IP header */ + iphdr = (struct ip_hdr *)p->payload; + 80116b2: 687b ldr r3, [r7, #4] + 80116b4: 685b ldr r3, [r3, #4] + 80116b6: 61fb str r3, [r7, #28] + if (IPH_V(iphdr) != 4) { + 80116b8: 69fb ldr r3, [r7, #28] + 80116ba: 781b ldrb r3, [r3, #0] + 80116bc: 091b lsrs r3, r3, #4 + 80116be: b2db uxtb r3, r3 + 80116c0: 2b04 cmp r3, #4 + 80116c2: d004 beq.n 80116ce + 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); + 80116c4: 6878 ldr r0, [r7, #4] + 80116c6: f7f6 fe3d bl 8008344 + IP_STATS_INC(ip.err); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinhdrerrors); + return ERR_OK; + 80116ca: 2300 movs r3, #0 + 80116cc: e140 b.n 8011950 + return ERR_OK; + } +#endif + + /* obtain IP header length in number of 32-bit words */ + iphdr_hlen = IPH_HL(iphdr); + 80116ce: 69fb ldr r3, [r7, #28] + 80116d0: 781b ldrb r3, [r3, #0] + 80116d2: b29b uxth r3, r3 + 80116d4: f003 030f and.w r3, r3, #15 + 80116d8: 81fb strh r3, [r7, #14] + /* calculate IP header length in bytes */ + iphdr_hlen *= 4; + 80116da: 89fb ldrh r3, [r7, #14] + 80116dc: 009b lsls r3, r3, #2 + 80116de: 81fb strh r3, [r7, #14] + /* obtain ip length in bytes */ + iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); + 80116e0: 69fb ldr r3, [r7, #28] + 80116e2: 885b ldrh r3, [r3, #2] + 80116e4: b29b uxth r3, r3 + 80116e6: 4618 mov r0, r3 + 80116e8: f7f5 fcf4 bl 80070d4 + 80116ec: 4603 mov r3, r0 + 80116ee: 81bb strh r3, [r7, #12] + + /* Trim pbuf. This is especially required for packets < 60 bytes. */ + if (iphdr_len < p->tot_len) { + 80116f0: 687b ldr r3, [r7, #4] + 80116f2: 891b ldrh r3, [r3, #8] + 80116f4: 89ba ldrh r2, [r7, #12] + 80116f6: 429a cmp r2, r3 + 80116f8: d204 bcs.n 8011704 + pbuf_realloc(p, iphdr_len); + 80116fa: 89bb ldrh r3, [r7, #12] + 80116fc: 4619 mov r1, r3 + 80116fe: 6878 ldr r0, [r7, #4] + 8011700: f7f6 fcac bl 800805c + } + + /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ + if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) { + 8011704: 687b ldr r3, [r7, #4] + 8011706: 895b ldrh r3, [r3, #10] + 8011708: 89fa ldrh r2, [r7, #14] + 801170a: 429a cmp r2, r3 + 801170c: d807 bhi.n 801171e + 801170e: 687b ldr r3, [r7, #4] + 8011710: 891b ldrh r3, [r3, #8] + 8011712: 89ba ldrh r2, [r7, #12] + 8011714: 429a cmp r2, r3 + 8011716: d802 bhi.n 801171e + 8011718: 89fb ldrh r3, [r7, #14] + 801171a: 2b13 cmp r3, #19 + 801171c: d804 bhi.n 8011728 + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", + iphdr_len, p->tot_len)); + } + /* free (drop) packet pbufs */ + pbuf_free(p); + 801171e: 6878 ldr r0, [r7, #4] + 8011720: f7f6 fe10 bl 8008344 + IP_STATS_INC(ip.lenerr); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipindiscards); + return ERR_OK; + 8011724: 2300 movs r3, #0 + 8011726: e113 b.n 8011950 + } + } +#endif + + /* copy IP addresses to aligned ip_addr_t */ + ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); + 8011728: 69fb ldr r3, [r7, #28] + 801172a: 691b ldr r3, [r3, #16] + 801172c: 4a8a ldr r2, [pc, #552] ; (8011958 ) + 801172e: 6153 str r3, [r2, #20] + ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); + 8011730: 69fb ldr r3, [r7, #28] + 8011732: 68db ldr r3, [r3, #12] + 8011734: 4a88 ldr r2, [pc, #544] ; (8011958 ) + 8011736: 6113 str r3, [r2, #16] + + /* match packet against an interface, i.e. is this packet for us? */ + if (ip4_addr_ismulticast(ip4_current_dest_addr())) { + 8011738: 4b87 ldr r3, [pc, #540] ; (8011958 ) + 801173a: 695b ldr r3, [r3, #20] + 801173c: f003 03f0 and.w r3, r3, #240 ; 0xf0 + 8011740: 2be0 cmp r3, #224 ; 0xe0 + 8011742: d112 bne.n 801176a + netif = inp; + } else { + netif = NULL; + } +#else /* LWIP_IGMP */ + if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { + 8011744: 683b ldr r3, [r7, #0] + 8011746: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 801174a: f003 0301 and.w r3, r3, #1 + 801174e: b2db uxtb r3, r3 + 8011750: 2b00 cmp r3, #0 + 8011752: d007 beq.n 8011764 + 8011754: 683b ldr r3, [r7, #0] + 8011756: 3304 adds r3, #4 + 8011758: 681b ldr r3, [r3, #0] + 801175a: 2b00 cmp r3, #0 + 801175c: d002 beq.n 8011764 + netif = inp; + 801175e: 683b ldr r3, [r7, #0] + 8011760: 61bb str r3, [r7, #24] + 8011762: e041 b.n 80117e8 + } else { + netif = NULL; + 8011764: 2300 movs r3, #0 + 8011766: 61bb str r3, [r7, #24] + 8011768: e03e b.n 80117e8 +#endif /* LWIP_IGMP */ + } else { + /* start trying with inp. if that's not acceptable, start walking the + list of configured netifs. + 'first' is used as a boolean to mark whether we started walking the list */ + int first = 1; + 801176a: 2301 movs r3, #1 + 801176c: 613b str r3, [r7, #16] + netif = inp; + 801176e: 683b ldr r3, [r7, #0] + 8011770: 61bb str r3, [r7, #24] + ip4_addr_get_u32(&iphdr->dest) & 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(&iphdr->dest) & ~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)))) { + 8011772: 69bb ldr r3, [r7, #24] + 8011774: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8011778: f003 0301 and.w r3, r3, #1 + 801177c: b2db uxtb r3, r3 + 801177e: 2b00 cmp r3, #0 + 8011780: d014 beq.n 80117ac + 8011782: 69bb ldr r3, [r7, #24] + 8011784: 3304 adds r3, #4 + 8011786: 681b ldr r3, [r3, #0] + 8011788: 2b00 cmp r3, #0 + 801178a: d00f beq.n 80117ac + /* unicast to this interface address? */ + if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || + 801178c: 4b72 ldr r3, [pc, #456] ; (8011958 ) + 801178e: 695a ldr r2, [r3, #20] + 8011790: 69bb ldr r3, [r7, #24] + 8011792: 3304 adds r3, #4 + 8011794: 681b ldr r3, [r3, #0] + 8011796: 429a cmp r2, r3 + 8011798: d026 beq.n 80117e8 + /* or broadcast on this interface network address? */ + ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) + 801179a: 4b6f ldr r3, [pc, #444] ; (8011958 ) + 801179c: 695b ldr r3, [r3, #20] + 801179e: 69b9 ldr r1, [r7, #24] + 80117a0: 4618 mov r0, r3 + 80117a2: f000 f9af bl 8011b04 + 80117a6: 4603 mov r3, r0 + if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || + 80117a8: 2b00 cmp r3, #0 + 80117aa: d11d bne.n 80117e8 + /* break out of for loop */ + break; + } +#endif /* LWIP_AUTOIP */ + } + if (first) { + 80117ac: 693b ldr r3, [r7, #16] + 80117ae: 2b00 cmp r3, #0 + 80117b0: d00d beq.n 80117ce +#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF + /* Packets sent to the loopback address must not be accepted on an + * interface that does not have the loopback address assigned to it, + * unless a non-loopback interface is used for loopback traffic. */ + if (ip4_addr_isloopback(ip4_current_dest_addr())) { + 80117b2: 4b69 ldr r3, [pc, #420] ; (8011958 ) + 80117b4: 695b ldr r3, [r3, #20] + 80117b6: b2db uxtb r3, r3 + 80117b8: 2b7f cmp r3, #127 ; 0x7f + 80117ba: d102 bne.n 80117c2 + netif = NULL; + 80117bc: 2300 movs r3, #0 + 80117be: 61bb str r3, [r7, #24] + break; + 80117c0: e012 b.n 80117e8 + } +#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ + first = 0; + 80117c2: 2300 movs r3, #0 + 80117c4: 613b str r3, [r7, #16] + netif = netif_list; + 80117c6: 4b65 ldr r3, [pc, #404] ; (801195c ) + 80117c8: 681b ldr r3, [r3, #0] + 80117ca: 61bb str r3, [r7, #24] + 80117cc: e002 b.n 80117d4 + } else { + netif = netif->next; + 80117ce: 69bb ldr r3, [r7, #24] + 80117d0: 681b ldr r3, [r3, #0] + 80117d2: 61bb str r3, [r7, #24] + } + if (netif == inp) { + 80117d4: 69ba ldr r2, [r7, #24] + 80117d6: 683b ldr r3, [r7, #0] + 80117d8: 429a cmp r2, r3 + 80117da: d102 bne.n 80117e2 + netif = netif->next; + 80117dc: 69bb ldr r3, [r7, #24] + 80117de: 681b ldr r3, [r3, #0] + 80117e0: 61bb str r3, [r7, #24] + } + } while (netif != NULL); + 80117e2: 69bb ldr r3, [r7, #24] + 80117e4: 2b00 cmp r3, #0 + 80117e6: d1c4 bne.n 8011772 + * If you want to accept private broadcast communication while a netif is down, + * define LWIP_IP_ACCEPT_UDP_PORT(dst_port), e.g.: + * + * #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345)) + */ + if (netif == NULL) { + 80117e8: 69bb ldr r3, [r7, #24] + 80117ea: 2b00 cmp r3, #0 + 80117ec: d111 bne.n 8011812 + /* remote port is DHCP server? */ + if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { + 80117ee: 69fb ldr r3, [r7, #28] + 80117f0: 7a5b ldrb r3, [r3, #9] + 80117f2: 2b11 cmp r3, #17 + 80117f4: d10d bne.n 8011812 + struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); + 80117f6: 89fb ldrh r3, [r7, #14] + 80117f8: 69fa ldr r2, [r7, #28] + 80117fa: 4413 add r3, r2 + 80117fc: 60bb str r3, [r7, #8] + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: UDP packet to DHCP client port %"U16_F"\n", + lwip_ntohs(udphdr->dest))); + if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { + 80117fe: 68bb ldr r3, [r7, #8] + 8011800: 885b ldrh r3, [r3, #2] + 8011802: b29b uxth r3, r3 + 8011804: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 + 8011808: d103 bne.n 8011812 + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); + netif = inp; + 801180a: 683b ldr r3, [r7, #0] + 801180c: 61bb str r3, [r7, #24] + check_ip_src = 0; + 801180e: 2300 movs r3, #0 + 8011810: 617b str r3, [r7, #20] + } +#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ + + /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ +#if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING + if (check_ip_src + 8011812: 697b ldr r3, [r7, #20] + 8011814: 2b00 cmp r3, #0 + 8011816: d017 beq.n 8011848 +#if IP_ACCEPT_LINK_LAYER_ADDRESSING + /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ + && !ip4_addr_isany_val(*ip4_current_src_addr()) + 8011818: 4b4f ldr r3, [pc, #316] ; (8011958 ) + 801181a: 691b ldr r3, [r3, #16] + 801181c: 2b00 cmp r3, #0 + 801181e: d013 beq.n 8011848 +#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ + ) +#endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ + { + if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || + 8011820: 4b4d ldr r3, [pc, #308] ; (8011958 ) + 8011822: 691b ldr r3, [r3, #16] + 8011824: 6839 ldr r1, [r7, #0] + 8011826: 4618 mov r0, r3 + 8011828: f000 f96c bl 8011b04 + 801182c: 4603 mov r3, r0 + 801182e: 2b00 cmp r3, #0 + 8011830: d105 bne.n 801183e + (ip4_addr_ismulticast(ip4_current_src_addr()))) { + 8011832: 4b49 ldr r3, [pc, #292] ; (8011958 ) + 8011834: 691b ldr r3, [r3, #16] + 8011836: f003 03f0 and.w r3, r3, #240 ; 0xf0 + if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || + 801183a: 2be0 cmp r3, #224 ; 0xe0 + 801183c: d104 bne.n 8011848 + /* packet source is not valid */ + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip4_input: packet source is not valid.\n")); + /* free (drop) packet pbufs */ + pbuf_free(p); + 801183e: 6878 ldr r0, [r7, #4] + 8011840: f7f6 fd80 bl 8008344 + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinaddrerrors); + MIB2_STATS_INC(mib2.ipindiscards); + return ERR_OK; + 8011844: 2300 movs r3, #0 + 8011846: e083 b.n 8011950 + } + } + + /* packet not for us? */ + if (netif == NULL) { + 8011848: 69bb ldr r3, [r7, #24] + 801184a: 2b00 cmp r3, #0 + 801184c: d104 bne.n 8011858 + { + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinaddrerrors); + MIB2_STATS_INC(mib2.ipindiscards); + } + pbuf_free(p); + 801184e: 6878 ldr r0, [r7, #4] + 8011850: f7f6 fd78 bl 8008344 + return ERR_OK; + 8011854: 2300 movs r3, #0 + 8011856: e07b b.n 8011950 + } + /* packet consists of multiple fragments? */ + if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { + 8011858: 69fb ldr r3, [r7, #28] + 801185a: 88db ldrh r3, [r3, #6] + 801185c: b29b uxth r3, r3 + 801185e: 461a mov r2, r3 + 8011860: f64f 733f movw r3, #65343 ; 0xff3f + 8011864: 4013 ands r3, r2 + 8011866: 2b00 cmp r3, #0 + 8011868: d00b beq.n 8011882 +#if IP_REASSEMBLY /* packet fragment reassembly code present? */ + LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip4_reass()\n", + lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK)*8))); + /* reassemble the packet*/ + p = ip4_reass(p); + 801186a: 6878 ldr r0, [r7, #4] + 801186c: f000 fde4 bl 8012438 + 8011870: 6078 str r0, [r7, #4] + /* packet not fully reassembled yet? */ + if (p == NULL) { + 8011872: 687b ldr r3, [r7, #4] + 8011874: 2b00 cmp r3, #0 + 8011876: d101 bne.n 801187c + return ERR_OK; + 8011878: 2300 movs r3, #0 + 801187a: e069 b.n 8011950 + } + iphdr = (struct ip_hdr *)p->payload; + 801187c: 687b ldr r3, [r7, #4] + 801187e: 685b ldr r3, [r3, #4] + 8011880: 61fb str r3, [r7, #28] + /* send to upper layers */ + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: \n")); + ip4_debug_print(p); + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); + + ip_data.current_netif = netif; + 8011882: 4a35 ldr r2, [pc, #212] ; (8011958 ) + 8011884: 69bb ldr r3, [r7, #24] + 8011886: 6013 str r3, [r2, #0] + ip_data.current_input_netif = inp; + 8011888: 4a33 ldr r2, [pc, #204] ; (8011958 ) + 801188a: 683b ldr r3, [r7, #0] + 801188c: 6053 str r3, [r2, #4] + ip_data.current_ip4_header = iphdr; + 801188e: 4a32 ldr r2, [pc, #200] ; (8011958 ) + 8011890: 69fb ldr r3, [r7, #28] + 8011892: 6093 str r3, [r2, #8] + ip_data.current_ip_header_tot_len = IPH_HL(iphdr) * 4; + 8011894: 69fb ldr r3, [r7, #28] + 8011896: 781b ldrb r3, [r3, #0] + 8011898: b29b uxth r3, r3 + 801189a: f003 030f and.w r3, r3, #15 + 801189e: b29b uxth r3, r3 + 80118a0: 009b lsls r3, r3, #2 + 80118a2: b29a uxth r2, r3 + 80118a4: 4b2c ldr r3, [pc, #176] ; (8011958 ) + 80118a6: 819a strh r2, [r3, #12] +#if LWIP_RAW + /* raw input did not eat the packet? */ + if (raw_input(p, inp) == 0) +#endif /* LWIP_RAW */ + { + pbuf_header(p, -(s16_t)iphdr_hlen); /* Move to payload, no check necessary. */ + 80118a8: 89fb ldrh r3, [r7, #14] + 80118aa: 425b negs r3, r3 + 80118ac: b29b uxth r3, r3 + 80118ae: b21b sxth r3, r3 + 80118b0: 4619 mov r1, r3 + 80118b2: 6878 ldr r0, [r7, #4] + 80118b4: f7f6 fd22 bl 80082fc + + switch (IPH_PROTO(iphdr)) { + 80118b8: 69fb ldr r3, [r7, #28] + 80118ba: 7a5b ldrb r3, [r3, #9] + 80118bc: 2b11 cmp r3, #17 + 80118be: d006 beq.n 80118ce + 80118c0: 2b11 cmp r3, #17 + 80118c2: dc13 bgt.n 80118ec + 80118c4: 2b01 cmp r3, #1 + 80118c6: d00c beq.n 80118e2 + 80118c8: 2b06 cmp r3, #6 + 80118ca: d005 beq.n 80118d8 + 80118cc: e00e b.n 80118ec + case IP_PROTO_UDP: +#if LWIP_UDPLITE + case IP_PROTO_UDPLITE: +#endif /* LWIP_UDPLITE */ + MIB2_STATS_INC(mib2.ipindelivers); + udp_input(p, inp); + 80118ce: 6839 ldr r1, [r7, #0] + 80118d0: 6878 ldr r0, [r7, #4] + 80118d2: f7fc fc0f bl 800e0f4 + break; + 80118d6: e028 b.n 801192a +#endif /* LWIP_UDP */ +#if LWIP_TCP + case IP_PROTO_TCP: + MIB2_STATS_INC(mib2.ipindelivers); + tcp_input(p, inp); + 80118d8: 6839 ldr r1, [r7, #0] + 80118da: 6878 ldr r0, [r7, #4] + 80118dc: f7f8 fc4a bl 800a174 + break; + 80118e0: e023 b.n 801192a +#endif /* LWIP_TCP */ +#if LWIP_ICMP + case IP_PROTO_ICMP: + MIB2_STATS_INC(mib2.ipindelivers); + icmp_input(p, inp); + 80118e2: 6839 ldr r1, [r7, #0] + 80118e4: 6878 ldr r0, [r7, #4] + 80118e6: f7ff fce5 bl 80112b4 + break; + 80118ea: e01e b.n 801192a + break; +#endif /* LWIP_IGMP */ + default: +#if LWIP_ICMP + /* send ICMP destination protocol unreachable unless is was a broadcast */ + if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && + 80118ec: 4b1a ldr r3, [pc, #104] ; (8011958 ) + 80118ee: 695b ldr r3, [r3, #20] + 80118f0: 69b9 ldr r1, [r7, #24] + 80118f2: 4618 mov r0, r3 + 80118f4: f000 f906 bl 8011b04 + 80118f8: 4603 mov r3, r0 + 80118fa: 2b00 cmp r3, #0 + 80118fc: d112 bne.n 8011924 + !ip4_addr_ismulticast(ip4_current_dest_addr())) { + 80118fe: 4b16 ldr r3, [pc, #88] ; (8011958 ) + 8011900: 695b ldr r3, [r3, #20] + 8011902: f003 03f0 and.w r3, r3, #240 ; 0xf0 + if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && + 8011906: 2be0 cmp r3, #224 ; 0xe0 + 8011908: d00c beq.n 8011924 + pbuf_header_force(p, iphdr_hlen); /* Move to ip header, no check necessary. */ + 801190a: f9b7 300e ldrsh.w r3, [r7, #14] + 801190e: 4619 mov r1, r3 + 8011910: 6878 ldr r0, [r7, #4] + 8011912: f7f6 fd05 bl 8008320 + p->payload = iphdr; + 8011916: 687b ldr r3, [r7, #4] + 8011918: 69fa ldr r2, [r7, #28] + 801191a: 605a str r2, [r3, #4] + icmp_dest_unreach(p, ICMP_DUR_PROTO); + 801191c: 2102 movs r1, #2 + 801191e: 6878 ldr r0, [r7, #4] + 8011920: f7ff fdce bl 80114c0 + } +#endif /* LWIP_ICMP */ + pbuf_free(p); + 8011924: 6878 ldr r0, [r7, #4] + 8011926: f7f6 fd0d bl 8008344 + MIB2_STATS_INC(mib2.ipinunknownprotos); + } + } + + /* @todo: this is not really necessary... */ + ip_data.current_netif = NULL; + 801192a: 4b0b ldr r3, [pc, #44] ; (8011958 ) + 801192c: 2200 movs r2, #0 + 801192e: 601a str r2, [r3, #0] + ip_data.current_input_netif = NULL; + 8011930: 4b09 ldr r3, [pc, #36] ; (8011958 ) + 8011932: 2200 movs r2, #0 + 8011934: 605a str r2, [r3, #4] + ip_data.current_ip4_header = NULL; + 8011936: 4b08 ldr r3, [pc, #32] ; (8011958 ) + 8011938: 2200 movs r2, #0 + 801193a: 609a str r2, [r3, #8] + ip_data.current_ip_header_tot_len = 0; + 801193c: 4b06 ldr r3, [pc, #24] ; (8011958 ) + 801193e: 2200 movs r2, #0 + 8011940: 819a strh r2, [r3, #12] + ip4_addr_set_any(ip4_current_src_addr()); + 8011942: 4b05 ldr r3, [pc, #20] ; (8011958 ) + 8011944: 2200 movs r2, #0 + 8011946: 611a str r2, [r3, #16] + ip4_addr_set_any(ip4_current_dest_addr()); + 8011948: 4b03 ldr r3, [pc, #12] ; (8011958 ) + 801194a: 2200 movs r2, #0 + 801194c: 615a str r2, [r3, #20] + + return ERR_OK; + 801194e: 2300 movs r3, #0 +} + 8011950: 4618 mov r0, r3 + 8011952: 3720 adds r7, #32 + 8011954: 46bd mov sp, r7 + 8011956: bd80 pop {r7, pc} + 8011958: 200039ec .word 0x200039ec + 801195c: 20006f5c .word 0x20006f5c + +08011960 : + */ +err_t +ip4_output_if(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) +{ + 8011960: b580 push {r7, lr} + 8011962: b08a sub sp, #40 ; 0x28 + 8011964: af04 add r7, sp, #16 + 8011966: 60f8 str r0, [r7, #12] + 8011968: 60b9 str r1, [r7, #8] + 801196a: 607a str r2, [r7, #4] + 801196c: 70fb strb r3, [r7, #3] +ip4_output_if_opt(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, void *ip_options, + u16_t optlen) +{ +#endif /* IP_OPTIONS_SEND */ + const ip4_addr_t *src_used = src; + 801196e: 68bb ldr r3, [r7, #8] + 8011970: 617b str r3, [r7, #20] + if (dest != LWIP_IP_HDRINCL) { + 8011972: 687b ldr r3, [r7, #4] + 8011974: 2b00 cmp r3, #0 + 8011976: d009 beq.n 801198c + if (ip4_addr_isany(src)) { + 8011978: 68bb ldr r3, [r7, #8] + 801197a: 2b00 cmp r3, #0 + 801197c: d003 beq.n 8011986 + 801197e: 68bb ldr r3, [r7, #8] + 8011980: 681b ldr r3, [r3, #0] + 8011982: 2b00 cmp r3, #0 + 8011984: d102 bne.n 801198c + src_used = netif_ip4_addr(netif); + 8011986: 6abb ldr r3, [r7, #40] ; 0x28 + 8011988: 3304 adds r3, #4 + 801198a: 617b str r3, [r7, #20] + +#if IP_OPTIONS_SEND + return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto, netif, + ip_options, optlen); +#else /* IP_OPTIONS_SEND */ + return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif); + 801198c: 78fa ldrb r2, [r7, #3] + 801198e: 6abb ldr r3, [r7, #40] ; 0x28 + 8011990: 9302 str r3, [sp, #8] + 8011992: f897 3024 ldrb.w r3, [r7, #36] ; 0x24 + 8011996: 9301 str r3, [sp, #4] + 8011998: f897 3020 ldrb.w r3, [r7, #32] + 801199c: 9300 str r3, [sp, #0] + 801199e: 4613 mov r3, r2 + 80119a0: 687a ldr r2, [r7, #4] + 80119a2: 6979 ldr r1, [r7, #20] + 80119a4: 68f8 ldr r0, [r7, #12] + 80119a6: f000 f805 bl 80119b4 + 80119aa: 4603 mov r3, r0 +#endif /* IP_OPTIONS_SEND */ +} + 80119ac: 4618 mov r0, r3 + 80119ae: 3718 adds r7, #24 + 80119b0: 46bd mov sp, r7 + 80119b2: bd80 pop {r7, pc} + +080119b4 : + */ +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) +{ + 80119b4: b580 push {r7, lr} + 80119b6: b088 sub sp, #32 + 80119b8: af00 add r7, sp, #0 + 80119ba: 60f8 str r0, [r7, #12] + 80119bc: 60b9 str r1, [r7, #8] + 80119be: 607a str r2, [r7, #4] + 80119c0: 70fb strb r3, [r7, #3] + ip4_addr_t dest_addr; +#if CHECKSUM_GEN_IP_INLINE + u32_t chk_sum = 0; +#endif /* CHECKSUM_GEN_IP_INLINE */ + + LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); + 80119c2: 68fb ldr r3, [r7, #12] + 80119c4: 89db ldrh r3, [r3, #14] + 80119c6: 2b01 cmp r3, #1 + 80119c8: d006 beq.n 80119d8 + 80119ca: 4b48 ldr r3, [pc, #288] ; (8011aec ) + 80119cc: f240 3233 movw r2, #819 ; 0x333 + 80119d0: 4947 ldr r1, [pc, #284] ; (8011af0 ) + 80119d2: 4848 ldr r0, [pc, #288] ; (8011af4 ) + 80119d4: f001 f9d6 bl 8012d84 + + MIB2_STATS_INC(mib2.ipoutrequests); + + /* Should the IP header be generated or is it already included in p? */ + if (dest != LWIP_IP_HDRINCL) { + 80119d8: 687b ldr r3, [r7, #4] + 80119da: 2b00 cmp r3, #0 + 80119dc: d060 beq.n 8011aa0 + u16_t ip_hlen = IP_HLEN; + 80119de: 2314 movs r3, #20 + 80119e0: 837b strh r3, [r7, #26] + } +#endif /* CHECKSUM_GEN_IP_INLINE */ + } +#endif /* IP_OPTIONS_SEND */ + /* generate IP header */ + if (pbuf_header(p, IP_HLEN)) { + 80119e2: 2114 movs r1, #20 + 80119e4: 68f8 ldr r0, [r7, #12] + 80119e6: f7f6 fc89 bl 80082fc + 80119ea: 4603 mov r3, r0 + 80119ec: 2b00 cmp r3, #0 + 80119ee: d002 beq.n 80119f6 + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: not enough room for IP header in pbuf\n")); + + IP_STATS_INC(ip.err); + MIB2_STATS_INC(mib2.ipoutdiscards); + return ERR_BUF; + 80119f0: f06f 0301 mvn.w r3, #1 + 80119f4: e075 b.n 8011ae2 + } + + iphdr = (struct ip_hdr *)p->payload; + 80119f6: 68fb ldr r3, [r7, #12] + 80119f8: 685b ldr r3, [r3, #4] + 80119fa: 61fb str r3, [r7, #28] + LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", + 80119fc: 68fb ldr r3, [r7, #12] + 80119fe: 895b ldrh r3, [r3, #10] + 8011a00: 2b13 cmp r3, #19 + 8011a02: d806 bhi.n 8011a12 + 8011a04: 4b39 ldr r3, [pc, #228] ; (8011aec ) + 8011a06: f44f 7258 mov.w r2, #864 ; 0x360 + 8011a0a: 493b ldr r1, [pc, #236] ; (8011af8 ) + 8011a0c: 4839 ldr r0, [pc, #228] ; (8011af4 ) + 8011a0e: f001 f9b9 bl 8012d84 + (p->len >= sizeof(struct ip_hdr))); + + IPH_TTL_SET(iphdr, ttl); + 8011a12: 69fb ldr r3, [r7, #28] + 8011a14: 78fa ldrb r2, [r7, #3] + 8011a16: 721a strb r2, [r3, #8] + IPH_PROTO_SET(iphdr, proto); + 8011a18: 69fb ldr r3, [r7, #28] + 8011a1a: f897 202c ldrb.w r2, [r7, #44] ; 0x2c + 8011a1e: 725a strb r2, [r3, #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); + 8011a20: 687b ldr r3, [r7, #4] + 8011a22: 681a ldr r2, [r3, #0] + 8011a24: 69fb ldr r3, [r7, #28] + 8011a26: 611a str r2, [r3, #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); + 8011a28: 8b7b ldrh r3, [r7, #26] + 8011a2a: 089b lsrs r3, r3, #2 + 8011a2c: b29b uxth r3, r3 + 8011a2e: b2db uxtb r3, r3 + 8011a30: f043 0340 orr.w r3, r3, #64 ; 0x40 + 8011a34: b2da uxtb r2, r3 + 8011a36: 69fb ldr r3, [r7, #28] + 8011a38: 701a strb r2, [r3, #0] + IPH_TOS_SET(iphdr, tos); + 8011a3a: 69fb ldr r3, [r7, #28] + 8011a3c: f897 2028 ldrb.w r2, [r7, #40] ; 0x28 + 8011a40: 705a strb r2, [r3, #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)); + 8011a42: 68fb ldr r3, [r7, #12] + 8011a44: 891b ldrh r3, [r3, #8] + 8011a46: 4618 mov r0, r3 + 8011a48: f7f5 fb44 bl 80070d4 + 8011a4c: 4603 mov r3, r0 + 8011a4e: 461a mov r2, r3 + 8011a50: 69fb ldr r3, [r7, #28] + 8011a52: 805a strh r2, [r3, #2] +#if CHECKSUM_GEN_IP_INLINE + chk_sum += iphdr->_len; +#endif /* CHECKSUM_GEN_IP_INLINE */ + IPH_OFFSET_SET(iphdr, 0); + 8011a54: 69fb ldr r3, [r7, #28] + 8011a56: 2200 movs r2, #0 + 8011a58: 719a strb r2, [r3, #6] + 8011a5a: 2200 movs r2, #0 + 8011a5c: 71da strb r2, [r3, #7] + IPH_ID_SET(iphdr, lwip_htons(ip_id)); + 8011a5e: 4b27 ldr r3, [pc, #156] ; (8011afc ) + 8011a60: 881b ldrh r3, [r3, #0] + 8011a62: 4618 mov r0, r3 + 8011a64: f7f5 fb36 bl 80070d4 + 8011a68: 4603 mov r3, r0 + 8011a6a: 461a mov r2, r3 + 8011a6c: 69fb ldr r3, [r7, #28] + 8011a6e: 809a strh r2, [r3, #4] +#if CHECKSUM_GEN_IP_INLINE + chk_sum += iphdr->_id; +#endif /* CHECKSUM_GEN_IP_INLINE */ + ++ip_id; + 8011a70: 4b22 ldr r3, [pc, #136] ; (8011afc ) + 8011a72: 881b ldrh r3, [r3, #0] + 8011a74: 3301 adds r3, #1 + 8011a76: b29a uxth r2, r3 + 8011a78: 4b20 ldr r3, [pc, #128] ; (8011afc ) + 8011a7a: 801a strh r2, [r3, #0] + + if (src == NULL) { + 8011a7c: 68bb ldr r3, [r7, #8] + 8011a7e: 2b00 cmp r3, #0 + 8011a80: d104 bne.n 8011a8c + ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); + 8011a82: 4b1f ldr r3, [pc, #124] ; (8011b00 ) + 8011a84: 681a ldr r2, [r3, #0] + 8011a86: 69fb ldr r3, [r7, #28] + 8011a88: 60da str r2, [r3, #12] + 8011a8a: e003 b.n 8011a94 + } else { + /* src cannot be NULL here */ + ip4_addr_copy(iphdr->src, *src); + 8011a8c: 68bb ldr r3, [r7, #8] + 8011a8e: 681a ldr r2, [r3, #0] + 8011a90: 69fb ldr r3, [r7, #28] + 8011a92: 60da str r2, [r3, #12] + else { + IPH_CHKSUM_SET(iphdr, 0); + } +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ +#else /* CHECKSUM_GEN_IP_INLINE */ + IPH_CHKSUM_SET(iphdr, 0); + 8011a94: 69fb ldr r3, [r7, #28] + 8011a96: 2200 movs r2, #0 + 8011a98: 729a strb r2, [r3, #10] + 8011a9a: 2200 movs r2, #0 + 8011a9c: 72da strb r2, [r3, #11] + 8011a9e: e008 b.n 8011ab2 + } +#endif /* CHECKSUM_GEN_IP */ +#endif /* CHECKSUM_GEN_IP_INLINE */ + } else { + /* IP header already included in p */ + iphdr = (struct ip_hdr *)p->payload; + 8011aa0: 68fb ldr r3, [r7, #12] + 8011aa2: 685b ldr r3, [r3, #4] + 8011aa4: 61fb str r3, [r7, #28] + ip4_addr_copy(dest_addr, iphdr->dest); + 8011aa6: 69fb ldr r3, [r7, #28] + 8011aa8: 691b ldr r3, [r3, #16] + 8011aaa: 617b str r3, [r7, #20] + dest = &dest_addr; + 8011aac: f107 0314 add.w r3, r7, #20 + 8011ab0: 607b str r3, [r7, #4] + } +#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)) { + 8011ab2: 6b3b ldr r3, [r7, #48] ; 0x30 + 8011ab4: 8d5b ldrh r3, [r3, #42] ; 0x2a + 8011ab6: 2b00 cmp r3, #0 + 8011ab8: d00c beq.n 8011ad4 + 8011aba: 68fb ldr r3, [r7, #12] + 8011abc: 891a ldrh r2, [r3, #8] + 8011abe: 6b3b ldr r3, [r7, #48] ; 0x30 + 8011ac0: 8d5b ldrh r3, [r3, #42] ; 0x2a + 8011ac2: 429a cmp r2, r3 + 8011ac4: d906 bls.n 8011ad4 + return ip4_frag(p, netif, dest); + 8011ac6: 687a ldr r2, [r7, #4] + 8011ac8: 6b39 ldr r1, [r7, #48] ; 0x30 + 8011aca: 68f8 ldr r0, [r7, #12] + 8011acc: f000 fe5e bl 801278c + 8011ad0: 4603 mov r3, r0 + 8011ad2: e006 b.n 8011ae2 + } +#endif /* IP_FRAG */ + + LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n")); + return netif->output(netif, p, dest); + 8011ad4: 6b3b ldr r3, [r7, #48] ; 0x30 + 8011ad6: 695b ldr r3, [r3, #20] + 8011ad8: 687a ldr r2, [r7, #4] + 8011ada: 68f9 ldr r1, [r7, #12] + 8011adc: 6b38 ldr r0, [r7, #48] ; 0x30 + 8011ade: 4798 blx r3 + 8011ae0: 4603 mov r3, r0 +} + 8011ae2: 4618 mov r0, r3 + 8011ae4: 3720 adds r7, #32 + 8011ae6: 46bd mov sp, r7 + 8011ae8: bd80 pop {r7, pc} + 8011aea: bf00 nop + 8011aec: 080162e4 .word 0x080162e4 + 8011af0: 08016318 .word 0x08016318 + 8011af4: 08016324 .word 0x08016324 + 8011af8: 0801634c .word 0x0801634c + 8011afc: 200070ee .word 0x200070ee + 8011b00: 08016768 .word 0x08016768 + +08011b04 : + * @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) +{ + 8011b04: b480 push {r7} + 8011b06: b085 sub sp, #20 + 8011b08: af00 add r7, sp, #0 + 8011b0a: 6078 str r0, [r7, #4] + 8011b0c: 6039 str r1, [r7, #0] + ip4_addr_t ipaddr; + ip4_addr_set_u32(&ipaddr, addr); + 8011b0e: 687b ldr r3, [r7, #4] + 8011b10: 60fb str r3, [r7, #12] + + /* all ones (broadcast) or all zeroes (old skool broadcast) */ + if ((~addr == IPADDR_ANY) || + 8011b12: 687b ldr r3, [r7, #4] + 8011b14: f1b3 3fff cmp.w r3, #4294967295 + 8011b18: d002 beq.n 8011b20 + 8011b1a: 687b ldr r3, [r7, #4] + 8011b1c: 2b00 cmp r3, #0 + 8011b1e: d101 bne.n 8011b24 + (addr == IPADDR_ANY)) { + return 1; + 8011b20: 2301 movs r3, #1 + 8011b22: e02a b.n 8011b7a + /* no broadcast support on this network interface? */ + } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { + 8011b24: 683b ldr r3, [r7, #0] + 8011b26: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8011b2a: f003 0302 and.w r3, r3, #2 + 8011b2e: 2b00 cmp r3, #0 + 8011b30: d101 bne.n 8011b36 + /* the given address cannot be a broadcast address + * nor can we check against any broadcast addresses */ + return 0; + 8011b32: 2300 movs r3, #0 + 8011b34: e021 b.n 8011b7a + /* address matches network interface address exactly? => no broadcast */ + } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { + 8011b36: 683b ldr r3, [r7, #0] + 8011b38: 3304 adds r3, #4 + 8011b3a: 681b ldr r3, [r3, #0] + 8011b3c: 687a ldr r2, [r7, #4] + 8011b3e: 429a cmp r2, r3 + 8011b40: d101 bne.n 8011b46 + return 0; + 8011b42: 2300 movs r3, #0 + 8011b44: e019 b.n 8011b7a + /* on the same (sub) network... */ + } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) + 8011b46: 68fa ldr r2, [r7, #12] + 8011b48: 683b ldr r3, [r7, #0] + 8011b4a: 3304 adds r3, #4 + 8011b4c: 681b ldr r3, [r3, #0] + 8011b4e: 405a eors r2, r3 + 8011b50: 683b ldr r3, [r7, #0] + 8011b52: 3308 adds r3, #8 + 8011b54: 681b ldr r3, [r3, #0] + 8011b56: 4013 ands r3, r2 + 8011b58: 2b00 cmp r3, #0 + 8011b5a: d10d bne.n 8011b78 + /* ...and host identifier bits are all ones? =>... */ + && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == + 8011b5c: 683b ldr r3, [r7, #0] + 8011b5e: 3308 adds r3, #8 + 8011b60: 681b ldr r3, [r3, #0] + 8011b62: 43da mvns r2, r3 + 8011b64: 687b ldr r3, [r7, #4] + 8011b66: 401a ands r2, r3 + (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { + 8011b68: 683b ldr r3, [r7, #0] + 8011b6a: 3308 adds r3, #8 + 8011b6c: 681b ldr r3, [r3, #0] + 8011b6e: 43db mvns r3, r3 + && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == + 8011b70: 429a cmp r2, r3 + 8011b72: d101 bne.n 8011b78 + /* => network broadcast address */ + return 1; + 8011b74: 2301 movs r3, #1 + 8011b76: e000 b.n 8011b7a + } else { + return 0; + 8011b78: 2300 movs r3, #0 + } +} + 8011b7a: 4618 mov r0, r3 + 8011b7c: 3714 adds r7, #20 + 8011b7e: 46bd mov sp, r7 + 8011b80: bc80 pop {r7} + 8011b82: 4770 bx lr + +08011b84 : + * @param cp IP address in ascii representation (e.g. "127.0.0.1") + * @return ip address in network order + */ +u32_t +ipaddr_addr(const char *cp) +{ + 8011b84: b580 push {r7, lr} + 8011b86: b084 sub sp, #16 + 8011b88: af00 add r7, sp, #0 + 8011b8a: 6078 str r0, [r7, #4] + ip4_addr_t val; + + if (ip4addr_aton(cp, &val)) { + 8011b8c: f107 030c add.w r3, r7, #12 + 8011b90: 4619 mov r1, r3 + 8011b92: 6878 ldr r0, [r7, #4] + 8011b94: f000 f80c bl 8011bb0 + 8011b98: 4603 mov r3, r0 + 8011b9a: 2b00 cmp r3, #0 + 8011b9c: d001 beq.n 8011ba2 + return ip4_addr_get_u32(&val); + 8011b9e: 68fb ldr r3, [r7, #12] + 8011ba0: e001 b.n 8011ba6 + } + return (IPADDR_NONE); + 8011ba2: f04f 33ff mov.w r3, #4294967295 +} + 8011ba6: 4618 mov r0, r3 + 8011ba8: 3710 adds r7, #16 + 8011baa: 46bd mov sp, r7 + 8011bac: bd80 pop {r7, pc} + ... + +08011bb0 : + * @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) +{ + 8011bb0: b580 push {r7, lr} + 8011bb2: b08a sub sp, #40 ; 0x28 + 8011bb4: af00 add r7, sp, #0 + 8011bb6: 6078 str r0, [r7, #4] + 8011bb8: 6039 str r1, [r7, #0] + u32_t val; + u8_t base; + char c; + u32_t parts[4]; + u32_t *pp = parts; + 8011bba: f107 030c add.w r3, r7, #12 + 8011bbe: 61fb str r3, [r7, #28] + + c = *cp; + 8011bc0: 687b ldr r3, [r7, #4] + 8011bc2: 781b ldrb r3, [r3, #0] + 8011bc4: f887 3022 strb.w r3, [r7, #34] ; 0x22 + /* + * Collect number up to ``.''. + * Values are specified as for C: + * 0x=hex, 0=octal, 1-9=decimal. + */ + if (!isdigit(c)) { + 8011bc8: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011bcc: 2b2f cmp r3, #47 ; 0x2f + 8011bce: d903 bls.n 8011bd8 + 8011bd0: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011bd4: 2b39 cmp r3, #57 ; 0x39 + 8011bd6: d901 bls.n 8011bdc + return 0; + 8011bd8: 2300 movs r3, #0 + 8011bda: e11e b.n 8011e1a + } + val = 0; + 8011bdc: 2300 movs r3, #0 + 8011bde: 627b str r3, [r7, #36] ; 0x24 + base = 10; + 8011be0: 230a movs r3, #10 + 8011be2: f887 3023 strb.w r3, [r7, #35] ; 0x23 + if (c == '0') { + 8011be6: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011bea: 2b30 cmp r3, #48 ; 0x30 + 8011bec: d11c bne.n 8011c28 + c = *++cp; + 8011bee: 687b ldr r3, [r7, #4] + 8011bf0: 3301 adds r3, #1 + 8011bf2: 607b str r3, [r7, #4] + 8011bf4: 687b ldr r3, [r7, #4] + 8011bf6: 781b ldrb r3, [r3, #0] + 8011bf8: f887 3022 strb.w r3, [r7, #34] ; 0x22 + if (c == 'x' || c == 'X') { + 8011bfc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c00: 2b78 cmp r3, #120 ; 0x78 + 8011c02: d003 beq.n 8011c0c + 8011c04: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c08: 2b58 cmp r3, #88 ; 0x58 + 8011c0a: d10a bne.n 8011c22 + base = 16; + 8011c0c: 2310 movs r3, #16 + 8011c0e: f887 3023 strb.w r3, [r7, #35] ; 0x23 + c = *++cp; + 8011c12: 687b ldr r3, [r7, #4] + 8011c14: 3301 adds r3, #1 + 8011c16: 607b str r3, [r7, #4] + 8011c18: 687b ldr r3, [r7, #4] + 8011c1a: 781b ldrb r3, [r3, #0] + 8011c1c: f887 3022 strb.w r3, [r7, #34] ; 0x22 + 8011c20: e002 b.n 8011c28 + } else { + base = 8; + 8011c22: 2308 movs r3, #8 + 8011c24: f887 3023 strb.w r3, [r7, #35] ; 0x23 + } + } + for (;;) { + if (isdigit(c)) { + 8011c28: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c2c: 2b2f cmp r3, #47 ; 0x2f + 8011c2e: d915 bls.n 8011c5c + 8011c30: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c34: 2b39 cmp r3, #57 ; 0x39 + 8011c36: d811 bhi.n 8011c5c + val = (val * base) + (u32_t)(c - '0'); + 8011c38: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 8011c3c: 6a7a ldr r2, [r7, #36] ; 0x24 + 8011c3e: fb03 f202 mul.w r2, r3, r2 + 8011c42: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c46: 4413 add r3, r2 + 8011c48: 3b30 subs r3, #48 ; 0x30 + 8011c4a: 627b str r3, [r7, #36] ; 0x24 + c = *++cp; + 8011c4c: 687b ldr r3, [r7, #4] + 8011c4e: 3301 adds r3, #1 + 8011c50: 607b str r3, [r7, #4] + 8011c52: 687b ldr r3, [r7, #4] + 8011c54: 781b ldrb r3, [r3, #0] + 8011c56: f887 3022 strb.w r3, [r7, #34] ; 0x22 + 8011c5a: e036 b.n 8011cca + } else if (base == 16 && isxdigit(c)) { + 8011c5c: f897 3023 ldrb.w r3, [r7, #35] ; 0x23 + 8011c60: 2b10 cmp r3, #16 + 8011c62: d133 bne.n 8011ccc + 8011c64: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c68: 2b2f cmp r3, #47 ; 0x2f + 8011c6a: d903 bls.n 8011c74 + 8011c6c: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c70: 2b39 cmp r3, #57 ; 0x39 + 8011c72: d90f bls.n 8011c94 + 8011c74: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c78: 2b60 cmp r3, #96 ; 0x60 + 8011c7a: d903 bls.n 8011c84 + 8011c7c: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c80: 2b66 cmp r3, #102 ; 0x66 + 8011c82: d907 bls.n 8011c94 + 8011c84: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c88: 2b40 cmp r3, #64 ; 0x40 + 8011c8a: d91f bls.n 8011ccc + 8011c8c: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011c90: 2b46 cmp r3, #70 ; 0x46 + 8011c92: d81b bhi.n 8011ccc + val = (val << 4) | (u32_t)(c + 10 - (islower(c) ? 'a' : 'A')); + 8011c94: 6a7b ldr r3, [r7, #36] ; 0x24 + 8011c96: 011b lsls r3, r3, #4 + 8011c98: f897 2022 ldrb.w r2, [r7, #34] ; 0x22 + 8011c9c: f102 010a add.w r1, r2, #10 + 8011ca0: f897 2022 ldrb.w r2, [r7, #34] ; 0x22 + 8011ca4: 2a60 cmp r2, #96 ; 0x60 + 8011ca6: d905 bls.n 8011cb4 + 8011ca8: f897 2022 ldrb.w r2, [r7, #34] ; 0x22 + 8011cac: 2a7a cmp r2, #122 ; 0x7a + 8011cae: d801 bhi.n 8011cb4 + 8011cb0: 2261 movs r2, #97 ; 0x61 + 8011cb2: e000 b.n 8011cb6 + 8011cb4: 2241 movs r2, #65 ; 0x41 + 8011cb6: 1a8a subs r2, r1, r2 + 8011cb8: 4313 orrs r3, r2 + 8011cba: 627b str r3, [r7, #36] ; 0x24 + c = *++cp; + 8011cbc: 687b ldr r3, [r7, #4] + 8011cbe: 3301 adds r3, #1 + 8011cc0: 607b str r3, [r7, #4] + 8011cc2: 687b ldr r3, [r7, #4] + 8011cc4: 781b ldrb r3, [r3, #0] + 8011cc6: f887 3022 strb.w r3, [r7, #34] ; 0x22 + if (isdigit(c)) { + 8011cca: e7ad b.n 8011c28 + } else { + break; + } + } + if (c == '.') { + 8011ccc: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011cd0: 2b2e cmp r3, #46 ; 0x2e + 8011cd2: d114 bne.n 8011cfe + * 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) { + 8011cd4: f107 030c add.w r3, r7, #12 + 8011cd8: 330c adds r3, #12 + 8011cda: 69fa ldr r2, [r7, #28] + 8011cdc: 429a cmp r2, r3 + 8011cde: d301 bcc.n 8011ce4 + return 0; + 8011ce0: 2300 movs r3, #0 + 8011ce2: e09a b.n 8011e1a + } + *pp++ = val; + 8011ce4: 69fb ldr r3, [r7, #28] + 8011ce6: 1d1a adds r2, r3, #4 + 8011ce8: 61fa str r2, [r7, #28] + 8011cea: 6a7a ldr r2, [r7, #36] ; 0x24 + 8011cec: 601a str r2, [r3, #0] + c = *++cp; + 8011cee: 687b ldr r3, [r7, #4] + 8011cf0: 3301 adds r3, #1 + 8011cf2: 607b str r3, [r7, #4] + 8011cf4: 687b ldr r3, [r7, #4] + 8011cf6: 781b ldrb r3, [r3, #0] + 8011cf8: f887 3022 strb.w r3, [r7, #34] ; 0x22 + if (!isdigit(c)) { + 8011cfc: e764 b.n 8011bc8 + } else { + break; + 8011cfe: bf00 nop + } + } + /* + * Check for trailing characters. + */ + if (c != '\0' && !isspace(c)) { + 8011d00: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011d04: 2b00 cmp r3, #0 + 8011d06: d019 beq.n 8011d3c + 8011d08: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011d0c: 2b20 cmp r3, #32 + 8011d0e: d015 beq.n 8011d3c + 8011d10: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011d14: 2b0c cmp r3, #12 + 8011d16: d011 beq.n 8011d3c + 8011d18: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011d1c: 2b0a cmp r3, #10 + 8011d1e: d00d beq.n 8011d3c + 8011d20: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011d24: 2b0d cmp r3, #13 + 8011d26: d009 beq.n 8011d3c + 8011d28: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011d2c: 2b09 cmp r3, #9 + 8011d2e: d005 beq.n 8011d3c + 8011d30: f897 3022 ldrb.w r3, [r7, #34] ; 0x22 + 8011d34: 2b0b cmp r3, #11 + 8011d36: d001 beq.n 8011d3c + return 0; + 8011d38: 2300 movs r3, #0 + 8011d3a: e06e b.n 8011e1a + } + /* + * Concoct the address according to + * the number of parts specified. + */ + switch (pp - parts + 1) { + 8011d3c: f107 030c add.w r3, r7, #12 + 8011d40: 69fa ldr r2, [r7, #28] + 8011d42: 1ad3 subs r3, r2, r3 + 8011d44: 109b asrs r3, r3, #2 + 8011d46: 3301 adds r3, #1 + 8011d48: 2b04 cmp r3, #4 + 8011d4a: d853 bhi.n 8011df4 + 8011d4c: a201 add r2, pc, #4 ; (adr r2, 8011d54 ) + 8011d4e: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8011d52: bf00 nop + 8011d54: 08011d69 .word 0x08011d69 + 8011d58: 08011e05 .word 0x08011e05 + 8011d5c: 08011d6d .word 0x08011d6d + 8011d60: 08011d8f .word 0x08011d8f + 8011d64: 08011dbd .word 0x08011dbd + + case 0: + return 0; /* initial nondigit */ + 8011d68: 2300 movs r3, #0 + 8011d6a: e056 b.n 8011e1a + + case 1: /* a -- 32 bits */ + break; + + case 2: /* a.b -- 8.24 bits */ + if (val > 0xffffffUL) { + 8011d6c: 6a7b ldr r3, [r7, #36] ; 0x24 + 8011d6e: f1b3 7f80 cmp.w r3, #16777216 ; 0x1000000 + 8011d72: d301 bcc.n 8011d78 + return 0; + 8011d74: 2300 movs r3, #0 + 8011d76: e050 b.n 8011e1a + } + if (parts[0] > 0xff) { + 8011d78: 68fb ldr r3, [r7, #12] + 8011d7a: 2bff cmp r3, #255 ; 0xff + 8011d7c: d901 bls.n 8011d82 + return 0; + 8011d7e: 2300 movs r3, #0 + 8011d80: e04b b.n 8011e1a + } + val |= parts[0] << 24; + 8011d82: 68fb ldr r3, [r7, #12] + 8011d84: 061b lsls r3, r3, #24 + 8011d86: 6a7a ldr r2, [r7, #36] ; 0x24 + 8011d88: 4313 orrs r3, r2 + 8011d8a: 627b str r3, [r7, #36] ; 0x24 + break; + 8011d8c: e03b b.n 8011e06 + + case 3: /* a.b.c -- 8.8.16 bits */ + if (val > 0xffff) { + 8011d8e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8011d90: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8011d94: d301 bcc.n 8011d9a + return 0; + 8011d96: 2300 movs r3, #0 + 8011d98: e03f b.n 8011e1a + } + if ((parts[0] > 0xff) || (parts[1] > 0xff)) { + 8011d9a: 68fb ldr r3, [r7, #12] + 8011d9c: 2bff cmp r3, #255 ; 0xff + 8011d9e: d802 bhi.n 8011da6 + 8011da0: 693b ldr r3, [r7, #16] + 8011da2: 2bff cmp r3, #255 ; 0xff + 8011da4: d901 bls.n 8011daa + return 0; + 8011da6: 2300 movs r3, #0 + 8011da8: e037 b.n 8011e1a + } + val |= (parts[0] << 24) | (parts[1] << 16); + 8011daa: 68fb ldr r3, [r7, #12] + 8011dac: 061a lsls r2, r3, #24 + 8011dae: 693b ldr r3, [r7, #16] + 8011db0: 041b lsls r3, r3, #16 + 8011db2: 4313 orrs r3, r2 + 8011db4: 6a7a ldr r2, [r7, #36] ; 0x24 + 8011db6: 4313 orrs r3, r2 + 8011db8: 627b str r3, [r7, #36] ; 0x24 + break; + 8011dba: e024 b.n 8011e06 + + case 4: /* a.b.c.d -- 8.8.8.8 bits */ + if (val > 0xff) { + 8011dbc: 6a7b ldr r3, [r7, #36] ; 0x24 + 8011dbe: 2bff cmp r3, #255 ; 0xff + 8011dc0: d901 bls.n 8011dc6 + return 0; + 8011dc2: 2300 movs r3, #0 + 8011dc4: e029 b.n 8011e1a + } + if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { + 8011dc6: 68fb ldr r3, [r7, #12] + 8011dc8: 2bff cmp r3, #255 ; 0xff + 8011dca: d805 bhi.n 8011dd8 + 8011dcc: 693b ldr r3, [r7, #16] + 8011dce: 2bff cmp r3, #255 ; 0xff + 8011dd0: d802 bhi.n 8011dd8 + 8011dd2: 697b ldr r3, [r7, #20] + 8011dd4: 2bff cmp r3, #255 ; 0xff + 8011dd6: d901 bls.n 8011ddc + return 0; + 8011dd8: 2300 movs r3, #0 + 8011dda: e01e b.n 8011e1a + } + val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); + 8011ddc: 68fb ldr r3, [r7, #12] + 8011dde: 061a lsls r2, r3, #24 + 8011de0: 693b ldr r3, [r7, #16] + 8011de2: 041b lsls r3, r3, #16 + 8011de4: 431a orrs r2, r3 + 8011de6: 697b ldr r3, [r7, #20] + 8011de8: 021b lsls r3, r3, #8 + 8011dea: 4313 orrs r3, r2 + 8011dec: 6a7a ldr r2, [r7, #36] ; 0x24 + 8011dee: 4313 orrs r3, r2 + 8011df0: 627b str r3, [r7, #36] ; 0x24 + break; + 8011df2: e008 b.n 8011e06 + default: + LWIP_ASSERT("unhandled", 0); + 8011df4: 4b0b ldr r3, [pc, #44] ; (8011e24 ) + 8011df6: f240 1203 movw r2, #259 ; 0x103 + 8011dfa: 490b ldr r1, [pc, #44] ; (8011e28 ) + 8011dfc: 480b ldr r0, [pc, #44] ; (8011e2c ) + 8011dfe: f000 ffc1 bl 8012d84 + break; + 8011e02: e000 b.n 8011e06 + break; + 8011e04: bf00 nop + } + if (addr) { + 8011e06: 683b ldr r3, [r7, #0] + 8011e08: 2b00 cmp r3, #0 + 8011e0a: d005 beq.n 8011e18 + ip4_addr_set_u32(addr, lwip_htonl(val)); + 8011e0c: 6a78 ldr r0, [r7, #36] ; 0x24 + 8011e0e: f7f5 f96e bl 80070ee + 8011e12: 4602 mov r2, r0 + 8011e14: 683b ldr r3, [r7, #0] + 8011e16: 601a str r2, [r3, #0] + } + return 1; + 8011e18: 2301 movs r3, #1 +} + 8011e1a: 4618 mov r0, r3 + 8011e1c: 3728 adds r7, #40 ; 0x28 + 8011e1e: 46bd mov sp, r7 + 8011e20: bd80 pop {r7, pc} + 8011e22: bf00 nop + 8011e24: 0801637c .word 0x0801637c + 8011e28: 080163b8 .word 0x080163b8 + 8011e2c: 080163c4 .word 0x080163c4 + +08011e30 : + * + * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). + */ +void +ip_reass_tmr(void) +{ + 8011e30: b580 push {r7, lr} + 8011e32: b084 sub sp, #16 + 8011e34: af00 add r7, sp, #0 + struct ip_reassdata *r, *prev = NULL; + 8011e36: 2300 movs r3, #0 + 8011e38: 60bb str r3, [r7, #8] + + r = reassdatagrams; + 8011e3a: 4b12 ldr r3, [pc, #72] ; (8011e84 ) + 8011e3c: 681b ldr r3, [r3, #0] + 8011e3e: 60fb str r3, [r7, #12] + while (r != NULL) { + 8011e40: e018 b.n 8011e74 + /* Decrement the timer. Once it reaches 0, + * clean up the incomplete fragment assembly */ + if (r->timer > 0) { + 8011e42: 68fb ldr r3, [r7, #12] + 8011e44: 7fdb ldrb r3, [r3, #31] + 8011e46: 2b00 cmp r3, #0 + 8011e48: d00b beq.n 8011e62 + r->timer--; + 8011e4a: 68fb ldr r3, [r7, #12] + 8011e4c: 7fdb ldrb r3, [r3, #31] + 8011e4e: 3b01 subs r3, #1 + 8011e50: b2da uxtb r2, r3 + 8011e52: 68fb ldr r3, [r7, #12] + 8011e54: 77da strb r2, [r3, #31] + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n",(u16_t)r->timer)); + prev = r; + 8011e56: 68fb ldr r3, [r7, #12] + 8011e58: 60bb str r3, [r7, #8] + r = r->next; + 8011e5a: 68fb ldr r3, [r7, #12] + 8011e5c: 681b ldr r3, [r3, #0] + 8011e5e: 60fb str r3, [r7, #12] + 8011e60: e008 b.n 8011e74 + } else { + /* reassembly timed out */ + struct ip_reassdata *tmp; + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); + tmp = r; + 8011e62: 68fb ldr r3, [r7, #12] + 8011e64: 607b str r3, [r7, #4] + /* get the next pointer before freeing */ + r = r->next; + 8011e66: 68fb ldr r3, [r7, #12] + 8011e68: 681b ldr r3, [r3, #0] + 8011e6a: 60fb str r3, [r7, #12] + /* free the helper struct and all enqueued pbufs */ + ip_reass_free_complete_datagram(tmp, prev); + 8011e6c: 68b9 ldr r1, [r7, #8] + 8011e6e: 6878 ldr r0, [r7, #4] + 8011e70: f000 f80a bl 8011e88 + while (r != NULL) { + 8011e74: 68fb ldr r3, [r7, #12] + 8011e76: 2b00 cmp r3, #0 + 8011e78: d1e3 bne.n 8011e42 + } + } +} + 8011e7a: bf00 nop + 8011e7c: bf00 nop + 8011e7e: 3710 adds r7, #16 + 8011e80: 46bd mov sp, r7 + 8011e82: bd80 pop {r7, pc} + 8011e84: 200070f0 .word 0x200070f0 + +08011e88 : + * @param prev the previous datagram in the linked list + * @return the number of pbufs freed + */ +static int +ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev) +{ + 8011e88: b580 push {r7, lr} + 8011e8a: b088 sub sp, #32 + 8011e8c: af00 add r7, sp, #0 + 8011e8e: 6078 str r0, [r7, #4] + 8011e90: 6039 str r1, [r7, #0] + u16_t pbufs_freed = 0; + 8011e92: 2300 movs r3, #0 + 8011e94: 83fb strh r3, [r7, #30] + u16_t clen; + struct pbuf *p; + struct ip_reass_helper *iprh; + + LWIP_ASSERT("prev != ipr", prev != ipr); + 8011e96: 683a ldr r2, [r7, #0] + 8011e98: 687b ldr r3, [r7, #4] + 8011e9a: 429a cmp r2, r3 + 8011e9c: d105 bne.n 8011eaa + 8011e9e: 4b45 ldr r3, [pc, #276] ; (8011fb4 ) + 8011ea0: 22ab movs r2, #171 ; 0xab + 8011ea2: 4945 ldr r1, [pc, #276] ; (8011fb8 ) + 8011ea4: 4845 ldr r0, [pc, #276] ; (8011fbc ) + 8011ea6: f000 ff6d bl 8012d84 + if (prev != NULL) { + 8011eaa: 683b ldr r3, [r7, #0] + 8011eac: 2b00 cmp r3, #0 + 8011eae: d00a beq.n 8011ec6 + LWIP_ASSERT("prev->next == ipr", prev->next == ipr); + 8011eb0: 683b ldr r3, [r7, #0] + 8011eb2: 681b ldr r3, [r3, #0] + 8011eb4: 687a ldr r2, [r7, #4] + 8011eb6: 429a cmp r2, r3 + 8011eb8: d005 beq.n 8011ec6 + 8011eba: 4b3e ldr r3, [pc, #248] ; (8011fb4 ) + 8011ebc: 22ad movs r2, #173 ; 0xad + 8011ebe: 4940 ldr r1, [pc, #256] ; (8011fc0 ) + 8011ec0: 483e ldr r0, [pc, #248] ; (8011fbc ) + 8011ec2: f000 ff5f bl 8012d84 + } + + MIB2_STATS_INC(mib2.ipreasmfails); +#if LWIP_ICMP + iprh = (struct ip_reass_helper *)ipr->p->payload; + 8011ec6: 687b ldr r3, [r7, #4] + 8011ec8: 685b ldr r3, [r3, #4] + 8011eca: 685b ldr r3, [r3, #4] + 8011ecc: 617b str r3, [r7, #20] + if (iprh->start == 0) { + 8011ece: 697b ldr r3, [r7, #20] + 8011ed0: 889b ldrh r3, [r3, #4] + 8011ed2: b29b uxth r3, r3 + 8011ed4: 2b00 cmp r3, #0 + 8011ed6: d12a bne.n 8011f2e + /* The first fragment was received, send ICMP time exceeded. */ + /* First, de-queue the first pbuf from r->p. */ + p = ipr->p; + 8011ed8: 687b ldr r3, [r7, #4] + 8011eda: 685b ldr r3, [r3, #4] + 8011edc: 61bb str r3, [r7, #24] + ipr->p = iprh->next_pbuf; + 8011ede: 697b ldr r3, [r7, #20] + 8011ee0: 681a ldr r2, [r3, #0] + 8011ee2: 687b ldr r3, [r7, #4] + 8011ee4: 605a str r2, [r3, #4] + /* Then, copy the original header into it. */ + SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); + 8011ee6: 69bb ldr r3, [r7, #24] + 8011ee8: 6858 ldr r0, [r3, #4] + 8011eea: 687b ldr r3, [r7, #4] + 8011eec: 3308 adds r3, #8 + 8011eee: 2214 movs r2, #20 + 8011ef0: 4619 mov r1, r3 + 8011ef2: f001 f912 bl 801311a + icmp_time_exceeded(p, ICMP_TE_FRAG); + 8011ef6: 2101 movs r1, #1 + 8011ef8: 69b8 ldr r0, [r7, #24] + 8011efa: f7ff faf1 bl 80114e0 + clen = pbuf_clen(p); + 8011efe: 69b8 ldr r0, [r7, #24] + 8011f00: f7f6 fab4 bl 800846c + 8011f04: 4603 mov r3, r0 + 8011f06: 827b strh r3, [r7, #18] + LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); + 8011f08: 8bfa ldrh r2, [r7, #30] + 8011f0a: 8a7b ldrh r3, [r7, #18] + 8011f0c: 4413 add r3, r2 + 8011f0e: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8011f12: db05 blt.n 8011f20 + 8011f14: 4b27 ldr r3, [pc, #156] ; (8011fb4 ) + 8011f16: 22bc movs r2, #188 ; 0xbc + 8011f18: 492a ldr r1, [pc, #168] ; (8011fc4 ) + 8011f1a: 4828 ldr r0, [pc, #160] ; (8011fbc ) + 8011f1c: f000 ff32 bl 8012d84 + pbufs_freed += clen; + 8011f20: 8bfa ldrh r2, [r7, #30] + 8011f22: 8a7b ldrh r3, [r7, #18] + 8011f24: 4413 add r3, r2 + 8011f26: 83fb strh r3, [r7, #30] + pbuf_free(p); + 8011f28: 69b8 ldr r0, [r7, #24] + 8011f2a: f7f6 fa0b bl 8008344 + } +#endif /* LWIP_ICMP */ + + /* First, free all received pbufs. The individual pbufs need to be released + separately as they have not yet been chained */ + p = ipr->p; + 8011f2e: 687b ldr r3, [r7, #4] + 8011f30: 685b ldr r3, [r3, #4] + 8011f32: 61bb str r3, [r7, #24] + while (p != NULL) { + 8011f34: e01f b.n 8011f76 + struct pbuf *pcur; + iprh = (struct ip_reass_helper *)p->payload; + 8011f36: 69bb ldr r3, [r7, #24] + 8011f38: 685b ldr r3, [r3, #4] + 8011f3a: 617b str r3, [r7, #20] + pcur = p; + 8011f3c: 69bb ldr r3, [r7, #24] + 8011f3e: 60fb str r3, [r7, #12] + /* get the next pointer before freeing */ + p = iprh->next_pbuf; + 8011f40: 697b ldr r3, [r7, #20] + 8011f42: 681b ldr r3, [r3, #0] + 8011f44: 61bb str r3, [r7, #24] + clen = pbuf_clen(pcur); + 8011f46: 68f8 ldr r0, [r7, #12] + 8011f48: f7f6 fa90 bl 800846c + 8011f4c: 4603 mov r3, r0 + 8011f4e: 827b strh r3, [r7, #18] + LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); + 8011f50: 8bfa ldrh r2, [r7, #30] + 8011f52: 8a7b ldrh r3, [r7, #18] + 8011f54: 4413 add r3, r2 + 8011f56: f5b3 3f80 cmp.w r3, #65536 ; 0x10000 + 8011f5a: db05 blt.n 8011f68 + 8011f5c: 4b15 ldr r3, [pc, #84] ; (8011fb4 ) + 8011f5e: 22cc movs r2, #204 ; 0xcc + 8011f60: 4918 ldr r1, [pc, #96] ; (8011fc4 ) + 8011f62: 4816 ldr r0, [pc, #88] ; (8011fbc ) + 8011f64: f000 ff0e bl 8012d84 + pbufs_freed += clen; + 8011f68: 8bfa ldrh r2, [r7, #30] + 8011f6a: 8a7b ldrh r3, [r7, #18] + 8011f6c: 4413 add r3, r2 + 8011f6e: 83fb strh r3, [r7, #30] + pbuf_free(pcur); + 8011f70: 68f8 ldr r0, [r7, #12] + 8011f72: f7f6 f9e7 bl 8008344 + while (p != NULL) { + 8011f76: 69bb ldr r3, [r7, #24] + 8011f78: 2b00 cmp r3, #0 + 8011f7a: d1dc bne.n 8011f36 + } + /* Then, unchain the struct ip_reassdata from the list and free it. */ + ip_reass_dequeue_datagram(ipr, prev); + 8011f7c: 6839 ldr r1, [r7, #0] + 8011f7e: 6878 ldr r0, [r7, #4] + 8011f80: f000 f8c2 bl 8012108 + LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= pbufs_freed); + 8011f84: 4b10 ldr r3, [pc, #64] ; (8011fc8 ) + 8011f86: 881b ldrh r3, [r3, #0] + 8011f88: 8bfa ldrh r2, [r7, #30] + 8011f8a: 429a cmp r2, r3 + 8011f8c: d905 bls.n 8011f9a + 8011f8e: 4b09 ldr r3, [pc, #36] ; (8011fb4 ) + 8011f90: 22d2 movs r2, #210 ; 0xd2 + 8011f92: 490e ldr r1, [pc, #56] ; (8011fcc ) + 8011f94: 4809 ldr r0, [pc, #36] ; (8011fbc ) + 8011f96: f000 fef5 bl 8012d84 + ip_reass_pbufcount -= pbufs_freed; + 8011f9a: 4b0b ldr r3, [pc, #44] ; (8011fc8 ) + 8011f9c: 881a ldrh r2, [r3, #0] + 8011f9e: 8bfb ldrh r3, [r7, #30] + 8011fa0: 1ad3 subs r3, r2, r3 + 8011fa2: b29a uxth r2, r3 + 8011fa4: 4b08 ldr r3, [pc, #32] ; (8011fc8 ) + 8011fa6: 801a strh r2, [r3, #0] + + return pbufs_freed; + 8011fa8: 8bfb ldrh r3, [r7, #30] +} + 8011faa: 4618 mov r0, r3 + 8011fac: 3720 adds r7, #32 + 8011fae: 46bd mov sp, r7 + 8011fb0: bd80 pop {r7, pc} + 8011fb2: bf00 nop + 8011fb4: 080163ec .word 0x080163ec + 8011fb8: 08016428 .word 0x08016428 + 8011fbc: 08016434 .word 0x08016434 + 8011fc0: 0801645c .word 0x0801645c + 8011fc4: 08016470 .word 0x08016470 + 8011fc8: 200070f4 .word 0x200070f4 + 8011fcc: 08016490 .word 0x08016490 + +08011fd0 : + * (used for freeing other datagrams if not enough space) + * @return the number of pbufs freed + */ +static int +ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed) +{ + 8011fd0: b580 push {r7, lr} + 8011fd2: b08a sub sp, #40 ; 0x28 + 8011fd4: af00 add r7, sp, #0 + 8011fd6: 6078 str r0, [r7, #4] + 8011fd8: 6039 str r1, [r7, #0] + /* @todo Can't we simply remove the last datagram in the + * linked list behind reassdatagrams? + */ + struct ip_reassdata *r, *oldest, *prev, *oldest_prev; + int pbufs_freed = 0, pbufs_freed_current; + 8011fda: 2300 movs r3, #0 + 8011fdc: 617b str r3, [r7, #20] + int other_datagrams; + + /* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs, + * but don't free the datagram that 'fraghdr' belongs to! */ + do { + oldest = NULL; + 8011fde: 2300 movs r3, #0 + 8011fe0: 623b str r3, [r7, #32] + prev = NULL; + 8011fe2: 2300 movs r3, #0 + 8011fe4: 61fb str r3, [r7, #28] + oldest_prev = NULL; + 8011fe6: 2300 movs r3, #0 + 8011fe8: 61bb str r3, [r7, #24] + other_datagrams = 0; + 8011fea: 2300 movs r3, #0 + 8011fec: 613b str r3, [r7, #16] + r = reassdatagrams; + 8011fee: 4b28 ldr r3, [pc, #160] ; (8012090 ) + 8011ff0: 681b ldr r3, [r3, #0] + 8011ff2: 627b str r3, [r7, #36] ; 0x24 + while (r != NULL) { + 8011ff4: e030 b.n 8012058 + if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { + 8011ff6: 6a7b ldr r3, [r7, #36] ; 0x24 + 8011ff8: 695a ldr r2, [r3, #20] + 8011ffa: 687b ldr r3, [r7, #4] + 8011ffc: 68db ldr r3, [r3, #12] + 8011ffe: 429a cmp r2, r3 + 8012000: d10c bne.n 801201c + 8012002: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012004: 699a ldr r2, [r3, #24] + 8012006: 687b ldr r3, [r7, #4] + 8012008: 691b ldr r3, [r3, #16] + 801200a: 429a cmp r2, r3 + 801200c: d106 bne.n 801201c + 801200e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012010: 899a ldrh r2, [r3, #12] + 8012012: 687b ldr r3, [r7, #4] + 8012014: 889b ldrh r3, [r3, #4] + 8012016: b29b uxth r3, r3 + 8012018: 429a cmp r2, r3 + 801201a: d014 beq.n 8012046 + /* Not the same datagram as fraghdr */ + other_datagrams++; + 801201c: 693b ldr r3, [r7, #16] + 801201e: 3301 adds r3, #1 + 8012020: 613b str r3, [r7, #16] + if (oldest == NULL) { + 8012022: 6a3b ldr r3, [r7, #32] + 8012024: 2b00 cmp r3, #0 + 8012026: d104 bne.n 8012032 + oldest = r; + 8012028: 6a7b ldr r3, [r7, #36] ; 0x24 + 801202a: 623b str r3, [r7, #32] + oldest_prev = prev; + 801202c: 69fb ldr r3, [r7, #28] + 801202e: 61bb str r3, [r7, #24] + 8012030: e009 b.n 8012046 + } else if (r->timer <= oldest->timer) { + 8012032: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012034: 7fda ldrb r2, [r3, #31] + 8012036: 6a3b ldr r3, [r7, #32] + 8012038: 7fdb ldrb r3, [r3, #31] + 801203a: 429a cmp r2, r3 + 801203c: d803 bhi.n 8012046 + /* older than the previous oldest */ + oldest = r; + 801203e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012040: 623b str r3, [r7, #32] + oldest_prev = prev; + 8012042: 69fb ldr r3, [r7, #28] + 8012044: 61bb str r3, [r7, #24] + } + } + if (r->next != NULL) { + 8012046: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012048: 681b ldr r3, [r3, #0] + 801204a: 2b00 cmp r3, #0 + 801204c: d001 beq.n 8012052 + prev = r; + 801204e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012050: 61fb str r3, [r7, #28] + } + r = r->next; + 8012052: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012054: 681b ldr r3, [r3, #0] + 8012056: 627b str r3, [r7, #36] ; 0x24 + while (r != NULL) { + 8012058: 6a7b ldr r3, [r7, #36] ; 0x24 + 801205a: 2b00 cmp r3, #0 + 801205c: d1cb bne.n 8011ff6 + } + if (oldest != NULL) { + 801205e: 6a3b ldr r3, [r7, #32] + 8012060: 2b00 cmp r3, #0 + 8012062: d008 beq.n 8012076 + pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); + 8012064: 69b9 ldr r1, [r7, #24] + 8012066: 6a38 ldr r0, [r7, #32] + 8012068: f7ff ff0e bl 8011e88 + 801206c: 60f8 str r0, [r7, #12] + pbufs_freed += pbufs_freed_current; + 801206e: 697a ldr r2, [r7, #20] + 8012070: 68fb ldr r3, [r7, #12] + 8012072: 4413 add r3, r2 + 8012074: 617b str r3, [r7, #20] + } + } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); + 8012076: 697a ldr r2, [r7, #20] + 8012078: 683b ldr r3, [r7, #0] + 801207a: 429a cmp r2, r3 + 801207c: da02 bge.n 8012084 + 801207e: 693b ldr r3, [r7, #16] + 8012080: 2b01 cmp r3, #1 + 8012082: dcac bgt.n 8011fde + return pbufs_freed; + 8012084: 697b ldr r3, [r7, #20] +} + 8012086: 4618 mov r0, r3 + 8012088: 3728 adds r7, #40 ; 0x28 + 801208a: 46bd mov sp, r7 + 801208c: bd80 pop {r7, pc} + 801208e: bf00 nop + 8012090: 200070f0 .word 0x200070f0 + +08012094 : + * @param clen number of pbufs needed to enqueue (used for freeing other datagrams if not enough space) + * @return A pointer to the queue location into which the fragment was enqueued + */ +static struct ip_reassdata* +ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen) +{ + 8012094: b580 push {r7, lr} + 8012096: b084 sub sp, #16 + 8012098: af00 add r7, sp, #0 + 801209a: 6078 str r0, [r7, #4] + 801209c: 6039 str r1, [r7, #0] +#if ! IP_REASS_FREE_OLDEST + LWIP_UNUSED_ARG(clen); +#endif + + /* No matching previous fragment found, allocate a new reassdata struct */ + ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); + 801209e: 2004 movs r0, #4 + 80120a0: f7f5 fbc0 bl 8007824 + 80120a4: 60f8 str r0, [r7, #12] + if (ipr == NULL) { + 80120a6: 68fb ldr r3, [r7, #12] + 80120a8: 2b00 cmp r3, #0 + 80120aa: d110 bne.n 80120ce +#if IP_REASS_FREE_OLDEST + if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { + 80120ac: 6839 ldr r1, [r7, #0] + 80120ae: 6878 ldr r0, [r7, #4] + 80120b0: f7ff ff8e bl 8011fd0 + 80120b4: 4602 mov r2, r0 + 80120b6: 683b ldr r3, [r7, #0] + 80120b8: 4293 cmp r3, r2 + 80120ba: dc03 bgt.n 80120c4 + ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); + 80120bc: 2004 movs r0, #4 + 80120be: f7f5 fbb1 bl 8007824 + 80120c2: 60f8 str r0, [r7, #12] + } + if (ipr == NULL) + 80120c4: 68fb ldr r3, [r7, #12] + 80120c6: 2b00 cmp r3, #0 + 80120c8: d101 bne.n 80120ce +#endif /* IP_REASS_FREE_OLDEST */ + { + IPFRAG_STATS_INC(ip_frag.memerr); + LWIP_DEBUGF(IP_REASS_DEBUG,("Failed to alloc reassdata struct\n")); + return NULL; + 80120ca: 2300 movs r3, #0 + 80120cc: e016 b.n 80120fc + } + } + memset(ipr, 0, sizeof(struct ip_reassdata)); + 80120ce: 2220 movs r2, #32 + 80120d0: 2100 movs r1, #0 + 80120d2: 68f8 ldr r0, [r7, #12] + 80120d4: f000 ffac bl 8013030 + ipr->timer = IP_REASS_MAXAGE; + 80120d8: 68fb ldr r3, [r7, #12] + 80120da: 2203 movs r2, #3 + 80120dc: 77da strb r2, [r3, #31] + + /* enqueue the new structure to the front of the list */ + ipr->next = reassdatagrams; + 80120de: 4b09 ldr r3, [pc, #36] ; (8012104 ) + 80120e0: 681a ldr r2, [r3, #0] + 80120e2: 68fb ldr r3, [r7, #12] + 80120e4: 601a str r2, [r3, #0] + reassdatagrams = ipr; + 80120e6: 4a07 ldr r2, [pc, #28] ; (8012104 ) + 80120e8: 68fb ldr r3, [r7, #12] + 80120ea: 6013 str r3, [r2, #0] + /* copy the ip header for later tests and input */ + /* @todo: no ip options supported? */ + SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN); + 80120ec: 68fb ldr r3, [r7, #12] + 80120ee: 3308 adds r3, #8 + 80120f0: 2214 movs r2, #20 + 80120f2: 6879 ldr r1, [r7, #4] + 80120f4: 4618 mov r0, r3 + 80120f6: f001 f810 bl 801311a + return ipr; + 80120fa: 68fb ldr r3, [r7, #12] +} + 80120fc: 4618 mov r0, r3 + 80120fe: 3710 adds r7, #16 + 8012100: 46bd mov sp, r7 + 8012102: bd80 pop {r7, pc} + 8012104: 200070f0 .word 0x200070f0 + +08012108 : + * 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) +{ + 8012108: b580 push {r7, lr} + 801210a: b082 sub sp, #8 + 801210c: af00 add r7, sp, #0 + 801210e: 6078 str r0, [r7, #4] + 8012110: 6039 str r1, [r7, #0] + /* dequeue the reass struct */ + if (reassdatagrams == ipr) { + 8012112: 4b10 ldr r3, [pc, #64] ; (8012154 ) + 8012114: 681b ldr r3, [r3, #0] + 8012116: 687a ldr r2, [r7, #4] + 8012118: 429a cmp r2, r3 + 801211a: d104 bne.n 8012126 + /* it was the first in the list */ + reassdatagrams = ipr->next; + 801211c: 687b ldr r3, [r7, #4] + 801211e: 681b ldr r3, [r3, #0] + 8012120: 4a0c ldr r2, [pc, #48] ; (8012154 ) + 8012122: 6013 str r3, [r2, #0] + 8012124: e00d b.n 8012142 + } else { + /* it wasn't the first, so it must have a valid 'prev' */ + LWIP_ASSERT("sanity check linked list", prev != NULL); + 8012126: 683b ldr r3, [r7, #0] + 8012128: 2b00 cmp r3, #0 + 801212a: d106 bne.n 801213a + 801212c: 4b0a ldr r3, [pc, #40] ; (8012158 ) + 801212e: f240 1245 movw r2, #325 ; 0x145 + 8012132: 490a ldr r1, [pc, #40] ; (801215c ) + 8012134: 480a ldr r0, [pc, #40] ; (8012160 ) + 8012136: f000 fe25 bl 8012d84 + prev->next = ipr->next; + 801213a: 687b ldr r3, [r7, #4] + 801213c: 681a ldr r2, [r3, #0] + 801213e: 683b ldr r3, [r7, #0] + 8012140: 601a str r2, [r3, #0] + } + + /* now we can free the ip_reassdata struct */ + memp_free(MEMP_REASSDATA, ipr); + 8012142: 6879 ldr r1, [r7, #4] + 8012144: 2004 movs r0, #4 + 8012146: f7f5 fbb9 bl 80078bc +} + 801214a: bf00 nop + 801214c: 3708 adds r7, #8 + 801214e: 46bd mov sp, r7 + 8012150: bd80 pop {r7, pc} + 8012152: bf00 nop + 8012154: 200070f0 .word 0x200070f0 + 8012158: 080163ec .word 0x080163ec + 801215c: 080164ac .word 0x080164ac + 8012160: 08016434 .word 0x08016434 + +08012164 : + * @param is_last is 1 if this pbuf has MF==0 (ipr->flags not updated yet) + * @return see IP_REASS_VALIDATE_* defines + */ +static int +ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct pbuf *new_p, int is_last) +{ + 8012164: b580 push {r7, lr} + 8012166: b08c sub sp, #48 ; 0x30 + 8012168: af00 add r7, sp, #0 + 801216a: 60f8 str r0, [r7, #12] + 801216c: 60b9 str r1, [r7, #8] + 801216e: 607a str r2, [r7, #4] + struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; + 8012170: 2300 movs r3, #0 + 8012172: 62bb str r3, [r7, #40] ; 0x28 + struct pbuf *q; + u16_t offset, len; + struct ip_hdr *fraghdr; + int valid = 1; + 8012174: 2301 movs r3, #1 + 8012176: 623b str r3, [r7, #32] + + /* Extract length and fragment offset from current fragment */ + fraghdr = (struct ip_hdr*)new_p->payload; + 8012178: 68bb ldr r3, [r7, #8] + 801217a: 685b ldr r3, [r3, #4] + 801217c: 61fb str r3, [r7, #28] + len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; + 801217e: 69fb ldr r3, [r7, #28] + 8012180: 885b ldrh r3, [r3, #2] + 8012182: b29b uxth r3, r3 + 8012184: 4618 mov r0, r3 + 8012186: f7f4 ffa5 bl 80070d4 + 801218a: 4603 mov r3, r0 + 801218c: 461a mov r2, r3 + 801218e: 69fb ldr r3, [r7, #28] + 8012190: 781b ldrb r3, [r3, #0] + 8012192: b29b uxth r3, r3 + 8012194: f003 030f and.w r3, r3, #15 + 8012198: b29b uxth r3, r3 + 801219a: 009b lsls r3, r3, #2 + 801219c: b29b uxth r3, r3 + 801219e: 1ad3 subs r3, r2, r3 + 80121a0: 837b strh r3, [r7, #26] + offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; + 80121a2: 69fb ldr r3, [r7, #28] + 80121a4: 88db ldrh r3, [r3, #6] + 80121a6: b29b uxth r3, r3 + 80121a8: 4618 mov r0, r3 + 80121aa: f7f4 ff93 bl 80070d4 + 80121ae: 4603 mov r3, r0 + 80121b0: f3c3 030c ubfx r3, r3, #0, #13 + 80121b4: b29b uxth r3, r3 + 80121b6: 00db lsls r3, r3, #3 + 80121b8: 833b strh r3, [r7, #24] + /* overwrite the fragment's ip header from the pbuf with our helper struct, + * and setup the embedded helper structure. */ + /* make sure the struct ip_reass_helper fits into the IP header */ + LWIP_ASSERT("sizeof(struct ip_reass_helper) <= IP_HLEN", + sizeof(struct ip_reass_helper) <= IP_HLEN); + iprh = (struct ip_reass_helper*)new_p->payload; + 80121ba: 68bb ldr r3, [r7, #8] + 80121bc: 685b ldr r3, [r3, #4] + 80121be: 62fb str r3, [r7, #44] ; 0x2c + iprh->next_pbuf = NULL; + 80121c0: 6afb ldr r3, [r7, #44] ; 0x2c + 80121c2: 2200 movs r2, #0 + 80121c4: 701a strb r2, [r3, #0] + 80121c6: 2200 movs r2, #0 + 80121c8: 705a strb r2, [r3, #1] + 80121ca: 2200 movs r2, #0 + 80121cc: 709a strb r2, [r3, #2] + 80121ce: 2200 movs r2, #0 + 80121d0: 70da strb r2, [r3, #3] + iprh->start = offset; + 80121d2: 6afb ldr r3, [r7, #44] ; 0x2c + 80121d4: 8b3a ldrh r2, [r7, #24] + 80121d6: 809a strh r2, [r3, #4] + iprh->end = offset + len; + 80121d8: 8b3a ldrh r2, [r7, #24] + 80121da: 8b7b ldrh r3, [r7, #26] + 80121dc: 4413 add r3, r2 + 80121de: b29a uxth r2, r3 + 80121e0: 6afb ldr r3, [r7, #44] ; 0x2c + 80121e2: 80da strh r2, [r3, #6] + + /* Iterate through until we either get to the end of the list (append), + * or we find one with a larger offset (insert). */ + for (q = ipr->p; q != NULL;) { + 80121e4: 68fb ldr r3, [r7, #12] + 80121e6: 685b ldr r3, [r3, #4] + 80121e8: 627b str r3, [r7, #36] ; 0x24 + 80121ea: e061 b.n 80122b0 + iprh_tmp = (struct ip_reass_helper*)q->payload; + 80121ec: 6a7b ldr r3, [r7, #36] ; 0x24 + 80121ee: 685b ldr r3, [r3, #4] + 80121f0: 617b str r3, [r7, #20] + if (iprh->start < iprh_tmp->start) { + 80121f2: 6afb ldr r3, [r7, #44] ; 0x2c + 80121f4: 889b ldrh r3, [r3, #4] + 80121f6: b29a uxth r2, r3 + 80121f8: 697b ldr r3, [r7, #20] + 80121fa: 889b ldrh r3, [r3, #4] + 80121fc: b29b uxth r3, r3 + 80121fe: 429a cmp r2, r3 + 8012200: d232 bcs.n 8012268 + /* the new pbuf should be inserted before this */ + iprh->next_pbuf = q; + 8012202: 6afb ldr r3, [r7, #44] ; 0x2c + 8012204: 6a7a ldr r2, [r7, #36] ; 0x24 + 8012206: 601a str r2, [r3, #0] + if (iprh_prev != NULL) { + 8012208: 6abb ldr r3, [r7, #40] ; 0x28 + 801220a: 2b00 cmp r3, #0 + 801220c: d01f beq.n 801224e + /* not the fragment with the lowest offset */ +#if IP_REASS_CHECK_OVERLAP + if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { + 801220e: 6afb ldr r3, [r7, #44] ; 0x2c + 8012210: 889b ldrh r3, [r3, #4] + 8012212: b29a uxth r2, r3 + 8012214: 6abb ldr r3, [r7, #40] ; 0x28 + 8012216: 88db ldrh r3, [r3, #6] + 8012218: b29b uxth r3, r3 + 801221a: 429a cmp r2, r3 + 801221c: f0c0 80e3 bcc.w 80123e6 + 8012220: 6afb ldr r3, [r7, #44] ; 0x2c + 8012222: 88db ldrh r3, [r3, #6] + 8012224: b29a uxth r2, r3 + 8012226: 697b ldr r3, [r7, #20] + 8012228: 889b ldrh r3, [r3, #4] + 801222a: b29b uxth r3, r3 + 801222c: 429a cmp r2, r3 + 801222e: f200 80da bhi.w 80123e6 + /* fragment overlaps with previous or following, throw away */ + goto freepbuf; + } +#endif /* IP_REASS_CHECK_OVERLAP */ + iprh_prev->next_pbuf = new_p; + 8012232: 6abb ldr r3, [r7, #40] ; 0x28 + 8012234: 68ba ldr r2, [r7, #8] + 8012236: 601a str r2, [r3, #0] + if (iprh_prev->end != iprh->start) { + 8012238: 6abb ldr r3, [r7, #40] ; 0x28 + 801223a: 88db ldrh r3, [r3, #6] + 801223c: b29a uxth r2, r3 + 801223e: 6afb ldr r3, [r7, #44] ; 0x2c + 8012240: 889b ldrh r3, [r3, #4] + 8012242: b29b uxth r3, r3 + 8012244: 429a cmp r2, r3 + 8012246: d037 beq.n 80122b8 + /* There is a fragment missing between the current + * and the previous fragment */ + valid = 0; + 8012248: 2300 movs r3, #0 + 801224a: 623b str r3, [r7, #32] + } +#endif /* IP_REASS_CHECK_OVERLAP */ + /* fragment with the lowest offset */ + ipr->p = new_p; + } + break; + 801224c: e034 b.n 80122b8 + if (iprh->end > iprh_tmp->start) { + 801224e: 6afb ldr r3, [r7, #44] ; 0x2c + 8012250: 88db ldrh r3, [r3, #6] + 8012252: b29a uxth r2, r3 + 8012254: 697b ldr r3, [r7, #20] + 8012256: 889b ldrh r3, [r3, #4] + 8012258: b29b uxth r3, r3 + 801225a: 429a cmp r2, r3 + 801225c: f200 80c5 bhi.w 80123ea + ipr->p = new_p; + 8012260: 68fb ldr r3, [r7, #12] + 8012262: 68ba ldr r2, [r7, #8] + 8012264: 605a str r2, [r3, #4] + break; + 8012266: e027 b.n 80122b8 + } else if (iprh->start == iprh_tmp->start) { + 8012268: 6afb ldr r3, [r7, #44] ; 0x2c + 801226a: 889b ldrh r3, [r3, #4] + 801226c: b29a uxth r2, r3 + 801226e: 697b ldr r3, [r7, #20] + 8012270: 889b ldrh r3, [r3, #4] + 8012272: b29b uxth r3, r3 + 8012274: 429a cmp r2, r3 + 8012276: f000 80ba beq.w 80123ee + /* received the same datagram twice: no need to keep the datagram */ + goto freepbuf; +#if IP_REASS_CHECK_OVERLAP + } else if (iprh->start < iprh_tmp->end) { + 801227a: 6afb ldr r3, [r7, #44] ; 0x2c + 801227c: 889b ldrh r3, [r3, #4] + 801227e: b29a uxth r2, r3 + 8012280: 697b ldr r3, [r7, #20] + 8012282: 88db ldrh r3, [r3, #6] + 8012284: b29b uxth r3, r3 + 8012286: 429a cmp r2, r3 + 8012288: f0c0 80b3 bcc.w 80123f2 + /* overlap: no need to keep the new datagram */ + goto freepbuf; +#endif /* IP_REASS_CHECK_OVERLAP */ + } else { + /* Check if the fragments received so far have no holes. */ + if (iprh_prev != NULL) { + 801228c: 6abb ldr r3, [r7, #40] ; 0x28 + 801228e: 2b00 cmp r3, #0 + 8012290: d009 beq.n 80122a6 + if (iprh_prev->end != iprh_tmp->start) { + 8012292: 6abb ldr r3, [r7, #40] ; 0x28 + 8012294: 88db ldrh r3, [r3, #6] + 8012296: b29a uxth r2, r3 + 8012298: 697b ldr r3, [r7, #20] + 801229a: 889b ldrh r3, [r3, #4] + 801229c: b29b uxth r3, r3 + 801229e: 429a cmp r2, r3 + 80122a0: d001 beq.n 80122a6 + /* There is a fragment missing between the current + * and the previous fragment */ + valid = 0; + 80122a2: 2300 movs r3, #0 + 80122a4: 623b str r3, [r7, #32] + } + } + } + q = iprh_tmp->next_pbuf; + 80122a6: 697b ldr r3, [r7, #20] + 80122a8: 681b ldr r3, [r3, #0] + 80122aa: 627b str r3, [r7, #36] ; 0x24 + iprh_prev = iprh_tmp; + 80122ac: 697b ldr r3, [r7, #20] + 80122ae: 62bb str r3, [r7, #40] ; 0x28 + for (q = ipr->p; q != NULL;) { + 80122b0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80122b2: 2b00 cmp r3, #0 + 80122b4: d19a bne.n 80121ec + 80122b6: e000 b.n 80122ba + break; + 80122b8: bf00 nop + } + + /* If q is NULL, then we made it to the end of the list. Determine what to do now */ + if (q == NULL) { + 80122ba: 6a7b ldr r3, [r7, #36] ; 0x24 + 80122bc: 2b00 cmp r3, #0 + 80122be: d12d bne.n 801231c + if (iprh_prev != NULL) { + 80122c0: 6abb ldr r3, [r7, #40] ; 0x28 + 80122c2: 2b00 cmp r3, #0 + 80122c4: d01c beq.n 8012300 + /* this is (for now), the fragment with the highest offset: + * chain it to the last fragment */ +#if IP_REASS_CHECK_OVERLAP + LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); + 80122c6: 6abb ldr r3, [r7, #40] ; 0x28 + 80122c8: 88db ldrh r3, [r3, #6] + 80122ca: b29a uxth r2, r3 + 80122cc: 6afb ldr r3, [r7, #44] ; 0x2c + 80122ce: 889b ldrh r3, [r3, #4] + 80122d0: b29b uxth r3, r3 + 80122d2: 429a cmp r2, r3 + 80122d4: d906 bls.n 80122e4 + 80122d6: 4b51 ldr r3, [pc, #324] ; (801241c ) + 80122d8: f240 12ab movw r2, #427 ; 0x1ab + 80122dc: 4950 ldr r1, [pc, #320] ; (8012420 ) + 80122de: 4851 ldr r0, [pc, #324] ; (8012424 ) + 80122e0: f000 fd50 bl 8012d84 +#endif /* IP_REASS_CHECK_OVERLAP */ + iprh_prev->next_pbuf = new_p; + 80122e4: 6abb ldr r3, [r7, #40] ; 0x28 + 80122e6: 68ba ldr r2, [r7, #8] + 80122e8: 601a str r2, [r3, #0] + if (iprh_prev->end != iprh->start) { + 80122ea: 6abb ldr r3, [r7, #40] ; 0x28 + 80122ec: 88db ldrh r3, [r3, #6] + 80122ee: b29a uxth r2, r3 + 80122f0: 6afb ldr r3, [r7, #44] ; 0x2c + 80122f2: 889b ldrh r3, [r3, #4] + 80122f4: b29b uxth r3, r3 + 80122f6: 429a cmp r2, r3 + 80122f8: d010 beq.n 801231c + valid = 0; + 80122fa: 2300 movs r3, #0 + 80122fc: 623b str r3, [r7, #32] + 80122fe: e00d b.n 801231c + } + } else { +#if IP_REASS_CHECK_OVERLAP + LWIP_ASSERT("no previous fragment, this must be the first fragment!", + 8012300: 68fb ldr r3, [r7, #12] + 8012302: 685b ldr r3, [r3, #4] + 8012304: 2b00 cmp r3, #0 + 8012306: d006 beq.n 8012316 + 8012308: 4b44 ldr r3, [pc, #272] ; (801241c ) + 801230a: f240 12b3 movw r2, #435 ; 0x1b3 + 801230e: 4946 ldr r1, [pc, #280] ; (8012428 ) + 8012310: 4844 ldr r0, [pc, #272] ; (8012424 ) + 8012312: f000 fd37 bl 8012d84 + ipr->p == NULL); +#endif /* IP_REASS_CHECK_OVERLAP */ + /* this is the first fragment we ever received for this ip datagram */ + ipr->p = new_p; + 8012316: 68fb ldr r3, [r7, #12] + 8012318: 68ba ldr r2, [r7, #8] + 801231a: 605a str r2, [r3, #4] + } + } + + /* At this point, the validation part begins: */ + /* If we already received the last fragment */ + if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) { + 801231c: 687b ldr r3, [r7, #4] + 801231e: 2b00 cmp r3, #0 + 8012320: d105 bne.n 801232e + 8012322: 68fb ldr r3, [r7, #12] + 8012324: 7f9b ldrb r3, [r3, #30] + 8012326: f003 0301 and.w r3, r3, #1 + 801232a: 2b00 cmp r3, #0 + 801232c: d059 beq.n 80123e2 + /* and had no holes so far */ + if (valid) { + 801232e: 6a3b ldr r3, [r7, #32] + 8012330: 2b00 cmp r3, #0 + 8012332: d04f beq.n 80123d4 + /* then check if the rest of the fragments is here */ + /* Check if the queue starts with the first datagram */ + if ((ipr->p == NULL) || (((struct ip_reass_helper*)ipr->p->payload)->start != 0)) { + 8012334: 68fb ldr r3, [r7, #12] + 8012336: 685b ldr r3, [r3, #4] + 8012338: 2b00 cmp r3, #0 + 801233a: d006 beq.n 801234a + 801233c: 68fb ldr r3, [r7, #12] + 801233e: 685b ldr r3, [r3, #4] + 8012340: 685b ldr r3, [r3, #4] + 8012342: 889b ldrh r3, [r3, #4] + 8012344: b29b uxth r3, r3 + 8012346: 2b00 cmp r3, #0 + 8012348: d002 beq.n 8012350 + valid = 0; + 801234a: 2300 movs r3, #0 + 801234c: 623b str r3, [r7, #32] + 801234e: e041 b.n 80123d4 + } else { + /* and check that there are no holes after this datagram */ + iprh_prev = iprh; + 8012350: 6afb ldr r3, [r7, #44] ; 0x2c + 8012352: 62bb str r3, [r7, #40] ; 0x28 + q = iprh->next_pbuf; + 8012354: 6afb ldr r3, [r7, #44] ; 0x2c + 8012356: 681b ldr r3, [r3, #0] + 8012358: 627b str r3, [r7, #36] ; 0x24 + while (q != NULL) { + 801235a: e012 b.n 8012382 + iprh = (struct ip_reass_helper*)q->payload; + 801235c: 6a7b ldr r3, [r7, #36] ; 0x24 + 801235e: 685b ldr r3, [r3, #4] + 8012360: 62fb str r3, [r7, #44] ; 0x2c + if (iprh_prev->end != iprh->start) { + 8012362: 6abb ldr r3, [r7, #40] ; 0x28 + 8012364: 88db ldrh r3, [r3, #6] + 8012366: b29a uxth r2, r3 + 8012368: 6afb ldr r3, [r7, #44] ; 0x2c + 801236a: 889b ldrh r3, [r3, #4] + 801236c: b29b uxth r3, r3 + 801236e: 429a cmp r2, r3 + 8012370: d002 beq.n 8012378 + valid = 0; + 8012372: 2300 movs r3, #0 + 8012374: 623b str r3, [r7, #32] + break; + 8012376: e007 b.n 8012388 + } + iprh_prev = iprh; + 8012378: 6afb ldr r3, [r7, #44] ; 0x2c + 801237a: 62bb str r3, [r7, #40] ; 0x28 + q = iprh->next_pbuf; + 801237c: 6afb ldr r3, [r7, #44] ; 0x2c + 801237e: 681b ldr r3, [r3, #0] + 8012380: 627b str r3, [r7, #36] ; 0x24 + while (q != NULL) { + 8012382: 6a7b ldr r3, [r7, #36] ; 0x24 + 8012384: 2b00 cmp r3, #0 + 8012386: d1e9 bne.n 801235c + } + /* if still valid, all fragments are received + * (because to the MF==0 already arrived */ + if (valid) { + 8012388: 6a3b ldr r3, [r7, #32] + 801238a: 2b00 cmp r3, #0 + 801238c: d022 beq.n 80123d4 + LWIP_ASSERT("sanity check", ipr->p != NULL); + 801238e: 68fb ldr r3, [r7, #12] + 8012390: 685b ldr r3, [r3, #4] + 8012392: 2b00 cmp r3, #0 + 8012394: d106 bne.n 80123a4 + 8012396: 4b21 ldr r3, [pc, #132] ; (801241c ) + 8012398: f44f 72ea mov.w r2, #468 ; 0x1d4 + 801239c: 4923 ldr r1, [pc, #140] ; (801242c ) + 801239e: 4821 ldr r0, [pc, #132] ; (8012424 ) + 80123a0: f000 fcf0 bl 8012d84 + LWIP_ASSERT("sanity check", + 80123a4: 68fb ldr r3, [r7, #12] + 80123a6: 685b ldr r3, [r3, #4] + 80123a8: 685b ldr r3, [r3, #4] + 80123aa: 6afa ldr r2, [r7, #44] ; 0x2c + 80123ac: 429a cmp r2, r3 + 80123ae: d106 bne.n 80123be + 80123b0: 4b1a ldr r3, [pc, #104] ; (801241c ) + 80123b2: f240 12d5 movw r2, #469 ; 0x1d5 + 80123b6: 491d ldr r1, [pc, #116] ; (801242c ) + 80123b8: 481a ldr r0, [pc, #104] ; (8012424 ) + 80123ba: f000 fce3 bl 8012d84 + ((struct ip_reass_helper*)ipr->p->payload) != iprh); + LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", + 80123be: 6afb ldr r3, [r7, #44] ; 0x2c + 80123c0: 681b ldr r3, [r3, #0] + 80123c2: 2b00 cmp r3, #0 + 80123c4: d006 beq.n 80123d4 + 80123c6: 4b15 ldr r3, [pc, #84] ; (801241c ) + 80123c8: f240 12d7 movw r2, #471 ; 0x1d7 + 80123cc: 4918 ldr r1, [pc, #96] ; (8012430 ) + 80123ce: 4815 ldr r0, [pc, #84] ; (8012424 ) + 80123d0: f000 fcd8 bl 8012d84 + } + } + /* If valid is 0 here, there are some fragments missing in the middle + * (since MF == 0 has already arrived). Such datagrams simply time out if + * no more fragments are received... */ + return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED; + 80123d4: 6a3b ldr r3, [r7, #32] + 80123d6: 2b00 cmp r3, #0 + 80123d8: bf14 ite ne + 80123da: 2301 movne r3, #1 + 80123dc: 2300 moveq r3, #0 + 80123de: b2db uxtb r3, r3 + 80123e0: e018 b.n 8012414 + } + /* If we come here, not all fragments were received, yet! */ + return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ + 80123e2: 2300 movs r3, #0 + 80123e4: e016 b.n 8012414 + goto freepbuf; + 80123e6: bf00 nop + 80123e8: e004 b.n 80123f4 + goto freepbuf; + 80123ea: bf00 nop + 80123ec: e002 b.n 80123f4 + goto freepbuf; + 80123ee: bf00 nop + 80123f0: e000 b.n 80123f4 + goto freepbuf; + 80123f2: bf00 nop +#if IP_REASS_CHECK_OVERLAP +freepbuf: + ip_reass_pbufcount -= pbuf_clen(new_p); + 80123f4: 68b8 ldr r0, [r7, #8] + 80123f6: f7f6 f839 bl 800846c + 80123fa: 4603 mov r3, r0 + 80123fc: 461a mov r2, r3 + 80123fe: 4b0d ldr r3, [pc, #52] ; (8012434 ) + 8012400: 881b ldrh r3, [r3, #0] + 8012402: 1a9b subs r3, r3, r2 + 8012404: b29a uxth r2, r3 + 8012406: 4b0b ldr r3, [pc, #44] ; (8012434 ) + 8012408: 801a strh r2, [r3, #0] + pbuf_free(new_p); + 801240a: 68b8 ldr r0, [r7, #8] + 801240c: f7f5 ff9a bl 8008344 + return IP_REASS_VALIDATE_PBUF_DROPPED; + 8012410: f04f 33ff mov.w r3, #4294967295 +#endif /* IP_REASS_CHECK_OVERLAP */ +} + 8012414: 4618 mov r0, r3 + 8012416: 3730 adds r7, #48 ; 0x30 + 8012418: 46bd mov sp, r7 + 801241a: bd80 pop {r7, pc} + 801241c: 080163ec .word 0x080163ec + 8012420: 080164c8 .word 0x080164c8 + 8012424: 08016434 .word 0x08016434 + 8012428: 080164e8 .word 0x080164e8 + 801242c: 08016520 .word 0x08016520 + 8012430: 08016530 .word 0x08016530 + 8012434: 200070f4 .word 0x200070f4 + +08012438 : + * @param p points to a pbuf chain of the fragment + * @return NULL if reassembly is incomplete, ? otherwise + */ +struct pbuf * +ip4_reass(struct pbuf *p) +{ + 8012438: b580 push {r7, lr} + 801243a: b08e sub sp, #56 ; 0x38 + 801243c: af00 add r7, sp, #0 + 801243e: 6078 str r0, [r7, #4] + int is_last; + + IPFRAG_STATS_INC(ip_frag.recv); + MIB2_STATS_INC(mib2.ipreasmreqds); + + fraghdr = (struct ip_hdr*)p->payload; + 8012440: 687b ldr r3, [r7, #4] + 8012442: 685b ldr r3, [r3, #4] + 8012444: 62bb str r3, [r7, #40] ; 0x28 + + if ((IPH_HL(fraghdr) * 4) != IP_HLEN) { + 8012446: 6abb ldr r3, [r7, #40] ; 0x28 + 8012448: 781b ldrb r3, [r3, #0] + 801244a: f003 030f and.w r3, r3, #15 + 801244e: 2b05 cmp r3, #5 + 8012450: f040 8131 bne.w 80126b6 + LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: IP options currently not supported!\n")); + IPFRAG_STATS_INC(ip_frag.err); + goto nullreturn; + } + + offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; + 8012454: 6abb ldr r3, [r7, #40] ; 0x28 + 8012456: 88db ldrh r3, [r3, #6] + 8012458: b29b uxth r3, r3 + 801245a: 4618 mov r0, r3 + 801245c: f7f4 fe3a bl 80070d4 + 8012460: 4603 mov r3, r0 + 8012462: f3c3 030c ubfx r3, r3, #0, #13 + 8012466: b29b uxth r3, r3 + 8012468: 00db lsls r3, r3, #3 + 801246a: 84fb strh r3, [r7, #38] ; 0x26 + len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; + 801246c: 6abb ldr r3, [r7, #40] ; 0x28 + 801246e: 885b ldrh r3, [r3, #2] + 8012470: b29b uxth r3, r3 + 8012472: 4618 mov r0, r3 + 8012474: f7f4 fe2e bl 80070d4 + 8012478: 4603 mov r3, r0 + 801247a: 461a mov r2, r3 + 801247c: 6abb ldr r3, [r7, #40] ; 0x28 + 801247e: 781b ldrb r3, [r3, #0] + 8012480: b29b uxth r3, r3 + 8012482: f003 030f and.w r3, r3, #15 + 8012486: b29b uxth r3, r3 + 8012488: 009b lsls r3, r3, #2 + 801248a: b29b uxth r3, r3 + 801248c: 1ad3 subs r3, r2, r3 + 801248e: 84bb strh r3, [r7, #36] ; 0x24 + + /* Check if we are allowed to enqueue more datagrams. */ + clen = pbuf_clen(p); + 8012490: 6878 ldr r0, [r7, #4] + 8012492: f7f5 ffeb bl 800846c + 8012496: 4603 mov r3, r0 + 8012498: 847b strh r3, [r7, #34] ; 0x22 + if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { + 801249a: 4b8e ldr r3, [pc, #568] ; (80126d4 ) + 801249c: 881b ldrh r3, [r3, #0] + 801249e: 461a mov r2, r3 + 80124a0: 8c7b ldrh r3, [r7, #34] ; 0x22 + 80124a2: 4413 add r3, r2 + 80124a4: 2b0a cmp r3, #10 + 80124a6: dd10 ble.n 80124ca +#if IP_REASS_FREE_OLDEST + if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || + 80124a8: 8c7b ldrh r3, [r7, #34] ; 0x22 + 80124aa: 4619 mov r1, r3 + 80124ac: 6ab8 ldr r0, [r7, #40] ; 0x28 + 80124ae: f7ff fd8f bl 8011fd0 + 80124b2: 4603 mov r3, r0 + 80124b4: 2b00 cmp r3, #0 + 80124b6: f000 8100 beq.w 80126ba + ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) + 80124ba: 4b86 ldr r3, [pc, #536] ; (80126d4 ) + 80124bc: 881b ldrh r3, [r3, #0] + 80124be: 461a mov r2, r3 + 80124c0: 8c7b ldrh r3, [r7, #34] ; 0x22 + 80124c2: 4413 add r3, r2 + if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || + 80124c4: 2b0a cmp r3, #10 + 80124c6: f300 80f8 bgt.w 80126ba + } + } + + /* Look for the datagram the fragment belongs to in the current datagram queue, + * remembering the previous in the queue for later dequeueing. */ + for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { + 80124ca: 4b83 ldr r3, [pc, #524] ; (80126d8 ) + 80124cc: 681b ldr r3, [r3, #0] + 80124ce: 633b str r3, [r7, #48] ; 0x30 + 80124d0: e015 b.n 80124fe + /* Check if the incoming fragment matches the one currently present + in the reassembly buffer. If so, we proceed with copying the + fragment into the buffer. */ + if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) { + 80124d2: 6b3b ldr r3, [r7, #48] ; 0x30 + 80124d4: 695a ldr r2, [r3, #20] + 80124d6: 6abb ldr r3, [r7, #40] ; 0x28 + 80124d8: 68db ldr r3, [r3, #12] + 80124da: 429a cmp r2, r3 + 80124dc: d10c bne.n 80124f8 + 80124de: 6b3b ldr r3, [r7, #48] ; 0x30 + 80124e0: 699a ldr r2, [r3, #24] + 80124e2: 6abb ldr r3, [r7, #40] ; 0x28 + 80124e4: 691b ldr r3, [r3, #16] + 80124e6: 429a cmp r2, r3 + 80124e8: d106 bne.n 80124f8 + 80124ea: 6b3b ldr r3, [r7, #48] ; 0x30 + 80124ec: 899a ldrh r2, [r3, #12] + 80124ee: 6abb ldr r3, [r7, #40] ; 0x28 + 80124f0: 889b ldrh r3, [r3, #4] + 80124f2: b29b uxth r3, r3 + 80124f4: 429a cmp r2, r3 + 80124f6: d006 beq.n 8012506 + for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { + 80124f8: 6b3b ldr r3, [r7, #48] ; 0x30 + 80124fa: 681b ldr r3, [r3, #0] + 80124fc: 633b str r3, [r7, #48] ; 0x30 + 80124fe: 6b3b ldr r3, [r7, #48] ; 0x30 + 8012500: 2b00 cmp r3, #0 + 8012502: d1e6 bne.n 80124d2 + 8012504: e000 b.n 8012508 + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: matching previous fragment ID=%"X16_F"\n", + lwip_ntohs(IPH_ID(fraghdr)))); + IPFRAG_STATS_INC(ip_frag.cachehit); + break; + 8012506: bf00 nop + } + } + + if (ipr == NULL) { + 8012508: 6b3b ldr r3, [r7, #48] ; 0x30 + 801250a: 2b00 cmp r3, #0 + 801250c: d109 bne.n 8012522 + /* Enqueue a new datagram into the datagram queue */ + ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); + 801250e: 8c7b ldrh r3, [r7, #34] ; 0x22 + 8012510: 4619 mov r1, r3 + 8012512: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8012514: f7ff fdbe bl 8012094 + 8012518: 6338 str r0, [r7, #48] ; 0x30 + /* Bail if unable to enqueue */ + if (ipr == NULL) { + 801251a: 6b3b ldr r3, [r7, #48] ; 0x30 + 801251c: 2b00 cmp r3, #0 + 801251e: d11c bne.n 801255a + goto nullreturn; + 8012520: e0d0 b.n 80126c4 + } + } else { + if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && + 8012522: 6abb ldr r3, [r7, #40] ; 0x28 + 8012524: 88db ldrh r3, [r3, #6] + 8012526: b29b uxth r3, r3 + 8012528: 4618 mov r0, r3 + 801252a: f7f4 fdd3 bl 80070d4 + 801252e: 4603 mov r3, r0 + 8012530: f3c3 030c ubfx r3, r3, #0, #13 + 8012534: 2b00 cmp r3, #0 + 8012536: d110 bne.n 801255a + ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { + 8012538: 6b3b ldr r3, [r7, #48] ; 0x30 + 801253a: 89db ldrh r3, [r3, #14] + 801253c: 4618 mov r0, r3 + 801253e: f7f4 fdc9 bl 80070d4 + 8012542: 4603 mov r3, r0 + 8012544: f3c3 030c ubfx r3, r3, #0, #13 + if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && + 8012548: 2b00 cmp r3, #0 + 801254a: d006 beq.n 801255a + /* ipr->iphdr is not the header from the first fragment, but fraghdr is + * -> copy fraghdr into ipr->iphdr since we want to have the header + * of the first fragment (for ICMP time exceeded and later, for copying + * all options, if supported)*/ + SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN); + 801254c: 6b3b ldr r3, [r7, #48] ; 0x30 + 801254e: 3308 adds r3, #8 + 8012550: 2214 movs r2, #20 + 8012552: 6ab9 ldr r1, [r7, #40] ; 0x28 + 8012554: 4618 mov r0, r3 + 8012556: f000 fde0 bl 801311a + + /* At this point, we have either created a new entry or pointing + * to an existing one */ + + /* check for 'no more fragments', and update queue entry*/ + is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0; + 801255a: 6abb ldr r3, [r7, #40] ; 0x28 + 801255c: 88db ldrh r3, [r3, #6] + 801255e: b29b uxth r3, r3 + 8012560: f003 0320 and.w r3, r3, #32 + 8012564: 2b00 cmp r3, #0 + 8012566: bf0c ite eq + 8012568: 2301 moveq r3, #1 + 801256a: 2300 movne r3, #0 + 801256c: b2db uxtb r3, r3 + 801256e: 61fb str r3, [r7, #28] + if (is_last) { + 8012570: 69fb ldr r3, [r7, #28] + 8012572: 2b00 cmp r3, #0 + 8012574: d00e beq.n 8012594 + u16_t datagram_len = (u16_t)(offset + len); + 8012576: 8cfa ldrh r2, [r7, #38] ; 0x26 + 8012578: 8cbb ldrh r3, [r7, #36] ; 0x24 + 801257a: 4413 add r3, r2 + 801257c: 837b strh r3, [r7, #26] + if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { + 801257e: 8b7a ldrh r2, [r7, #26] + 8012580: 8cfb ldrh r3, [r7, #38] ; 0x26 + 8012582: 429a cmp r2, r3 + 8012584: f0c0 809b bcc.w 80126be + 8012588: 8b7b ldrh r3, [r7, #26] + 801258a: f64f 72eb movw r2, #65515 ; 0xffeb + 801258e: 4293 cmp r3, r2 + 8012590: f200 8095 bhi.w 80126be + goto nullreturn; + } + } + /* find the right place to insert this pbuf */ + /* @todo: trim pbufs if fragments are overlapping */ + valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last); + 8012594: 69fa ldr r2, [r7, #28] + 8012596: 6879 ldr r1, [r7, #4] + 8012598: 6b38 ldr r0, [r7, #48] ; 0x30 + 801259a: f7ff fde3 bl 8012164 + 801259e: 6178 str r0, [r7, #20] + if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { + 80125a0: 697b ldr r3, [r7, #20] + 80125a2: f1b3 3fff cmp.w r3, #4294967295 + 80125a6: f000 808c beq.w 80126c2 + /* if we come here, the pbuf has been enqueued */ + + /* Track the current number of pbufs current 'in-flight', in order to limit + the number of fragments that may be enqueued at any one time + (overflow checked by testing against IP_REASS_MAX_PBUFS) */ + ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen); + 80125aa: 4b4a ldr r3, [pc, #296] ; (80126d4 ) + 80125ac: 881a ldrh r2, [r3, #0] + 80125ae: 8c7b ldrh r3, [r7, #34] ; 0x22 + 80125b0: 4413 add r3, r2 + 80125b2: b29a uxth r2, r3 + 80125b4: 4b47 ldr r3, [pc, #284] ; (80126d4 ) + 80125b6: 801a strh r2, [r3, #0] + if (is_last) { + 80125b8: 69fb ldr r3, [r7, #28] + 80125ba: 2b00 cmp r3, #0 + 80125bc: d00d beq.n 80125da + u16_t datagram_len = (u16_t)(offset + len); + 80125be: 8cfa ldrh r2, [r7, #38] ; 0x26 + 80125c0: 8cbb ldrh r3, [r7, #36] ; 0x24 + 80125c2: 4413 add r3, r2 + 80125c4: 827b strh r3, [r7, #18] + ipr->datagram_len = datagram_len; + 80125c6: 6b3b ldr r3, [r7, #48] ; 0x30 + 80125c8: 8a7a ldrh r2, [r7, #18] + 80125ca: 839a strh r2, [r3, #28] + ipr->flags |= IP_REASS_FLAG_LASTFRAG; + 80125cc: 6b3b ldr r3, [r7, #48] ; 0x30 + 80125ce: 7f9b ldrb r3, [r3, #30] + 80125d0: f043 0301 orr.w r3, r3, #1 + 80125d4: b2da uxtb r2, r3 + 80125d6: 6b3b ldr r3, [r7, #48] ; 0x30 + 80125d8: 779a strb r2, [r3, #30] + LWIP_DEBUGF(IP_REASS_DEBUG, + ("ip4_reass: last fragment seen, total len %"S16_F"\n", + ipr->datagram_len)); + } + + if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) { + 80125da: 697b ldr r3, [r7, #20] + 80125dc: 2b01 cmp r3, #1 + 80125de: d168 bne.n 80126b2 + struct ip_reassdata *ipr_prev; + /* the totally last fragment (flag more fragments = 0) was received at least + * once AND all fragments are received */ + ipr->datagram_len += IP_HLEN; + 80125e0: 6b3b ldr r3, [r7, #48] ; 0x30 + 80125e2: 8b9b ldrh r3, [r3, #28] + 80125e4: 3314 adds r3, #20 + 80125e6: b29a uxth r2, r3 + 80125e8: 6b3b ldr r3, [r7, #48] ; 0x30 + 80125ea: 839a strh r2, [r3, #28] + + /* save the second pbuf before copying the header over the pointer */ + r = ((struct ip_reass_helper*)ipr->p->payload)->next_pbuf; + 80125ec: 6b3b ldr r3, [r7, #48] ; 0x30 + 80125ee: 685b ldr r3, [r3, #4] + 80125f0: 685b ldr r3, [r3, #4] + 80125f2: 681b ldr r3, [r3, #0] + 80125f4: 637b str r3, [r7, #52] ; 0x34 + + /* copy the original ip header back to the first pbuf */ + fraghdr = (struct ip_hdr*)(ipr->p->payload); + 80125f6: 6b3b ldr r3, [r7, #48] ; 0x30 + 80125f8: 685b ldr r3, [r3, #4] + 80125fa: 685b ldr r3, [r3, #4] + 80125fc: 62bb str r3, [r7, #40] ; 0x28 + SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); + 80125fe: 6b3b ldr r3, [r7, #48] ; 0x30 + 8012600: 3308 adds r3, #8 + 8012602: 2214 movs r2, #20 + 8012604: 4619 mov r1, r3 + 8012606: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8012608: f000 fd87 bl 801311a + IPH_LEN_SET(fraghdr, lwip_htons(ipr->datagram_len)); + 801260c: 6b3b ldr r3, [r7, #48] ; 0x30 + 801260e: 8b9b ldrh r3, [r3, #28] + 8012610: 4618 mov r0, r3 + 8012612: f7f4 fd5f bl 80070d4 + 8012616: 4603 mov r3, r0 + 8012618: 461a mov r2, r3 + 801261a: 6abb ldr r3, [r7, #40] ; 0x28 + 801261c: 805a strh r2, [r3, #2] + IPH_OFFSET_SET(fraghdr, 0); + 801261e: 6abb ldr r3, [r7, #40] ; 0x28 + 8012620: 2200 movs r2, #0 + 8012622: 719a strb r2, [r3, #6] + 8012624: 2200 movs r2, #0 + 8012626: 71da strb r2, [r3, #7] + IPH_CHKSUM_SET(fraghdr, 0); + 8012628: 6abb ldr r3, [r7, #40] ; 0x28 + 801262a: 2200 movs r2, #0 + 801262c: 729a strb r2, [r3, #10] + 801262e: 2200 movs r2, #0 + 8012630: 72da strb r2, [r3, #11] + IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) { + IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN)); + } +#endif /* CHECKSUM_GEN_IP */ + + p = ipr->p; + 8012632: 6b3b ldr r3, [r7, #48] ; 0x30 + 8012634: 685b ldr r3, [r3, #4] + 8012636: 607b str r3, [r7, #4] + + /* chain together the pbufs contained within the reass_data list. */ + while (r != NULL) { + 8012638: e00e b.n 8012658 + iprh = (struct ip_reass_helper*)r->payload; + 801263a: 6b7b ldr r3, [r7, #52] ; 0x34 + 801263c: 685b ldr r3, [r3, #4] + 801263e: 60fb str r3, [r7, #12] + + /* hide the ip header for every succeeding fragment */ + pbuf_header(r, -IP_HLEN); + 8012640: f06f 0113 mvn.w r1, #19 + 8012644: 6b78 ldr r0, [r7, #52] ; 0x34 + 8012646: f7f5 fe59 bl 80082fc + pbuf_cat(p, r); + 801264a: 6b79 ldr r1, [r7, #52] ; 0x34 + 801264c: 6878 ldr r0, [r7, #4] + 801264e: f7f5 ff45 bl 80084dc + r = iprh->next_pbuf; + 8012652: 68fb ldr r3, [r7, #12] + 8012654: 681b ldr r3, [r3, #0] + 8012656: 637b str r3, [r7, #52] ; 0x34 + while (r != NULL) { + 8012658: 6b7b ldr r3, [r7, #52] ; 0x34 + 801265a: 2b00 cmp r3, #0 + 801265c: d1ed bne.n 801263a + } + + /* find the previous entry in the linked list */ + if (ipr == reassdatagrams) { + 801265e: 4b1e ldr r3, [pc, #120] ; (80126d8 ) + 8012660: 681b ldr r3, [r3, #0] + 8012662: 6b3a ldr r2, [r7, #48] ; 0x30 + 8012664: 429a cmp r2, r3 + 8012666: d102 bne.n 801266e + ipr_prev = NULL; + 8012668: 2300 movs r3, #0 + 801266a: 62fb str r3, [r7, #44] ; 0x2c + 801266c: e010 b.n 8012690 + } else { + for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { + 801266e: 4b1a ldr r3, [pc, #104] ; (80126d8 ) + 8012670: 681b ldr r3, [r3, #0] + 8012672: 62fb str r3, [r7, #44] ; 0x2c + 8012674: e007 b.n 8012686 + if (ipr_prev->next == ipr) { + 8012676: 6afb ldr r3, [r7, #44] ; 0x2c + 8012678: 681b ldr r3, [r3, #0] + 801267a: 6b3a ldr r2, [r7, #48] ; 0x30 + 801267c: 429a cmp r2, r3 + 801267e: d006 beq.n 801268e + for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { + 8012680: 6afb ldr r3, [r7, #44] ; 0x2c + 8012682: 681b ldr r3, [r3, #0] + 8012684: 62fb str r3, [r7, #44] ; 0x2c + 8012686: 6afb ldr r3, [r7, #44] ; 0x2c + 8012688: 2b00 cmp r3, #0 + 801268a: d1f4 bne.n 8012676 + 801268c: e000 b.n 8012690 + break; + 801268e: bf00 nop + } + } + } + + /* release the sources allocate for the fragment queue entry */ + ip_reass_dequeue_datagram(ipr, ipr_prev); + 8012690: 6af9 ldr r1, [r7, #44] ; 0x2c + 8012692: 6b38 ldr r0, [r7, #48] ; 0x30 + 8012694: f7ff fd38 bl 8012108 + + /* and adjust the number of pbufs currently queued for reassembly. */ + ip_reass_pbufcount -= pbuf_clen(p); + 8012698: 6878 ldr r0, [r7, #4] + 801269a: f7f5 fee7 bl 800846c + 801269e: 4603 mov r3, r0 + 80126a0: 461a mov r2, r3 + 80126a2: 4b0c ldr r3, [pc, #48] ; (80126d4 ) + 80126a4: 881b ldrh r3, [r3, #0] + 80126a6: 1a9b subs r3, r3, r2 + 80126a8: b29a uxth r2, r3 + 80126aa: 4b0a ldr r3, [pc, #40] ; (80126d4 ) + 80126ac: 801a strh r2, [r3, #0] + + MIB2_STATS_INC(mib2.ipreasmoks); + + /* Return the pbuf chain */ + return p; + 80126ae: 687b ldr r3, [r7, #4] + 80126b0: e00c b.n 80126cc + } + /* the datagram is not (yet?) reassembled completely */ + LWIP_DEBUGF(IP_REASS_DEBUG,("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); + return NULL; + 80126b2: 2300 movs r3, #0 + 80126b4: e00a b.n 80126cc + goto nullreturn; + 80126b6: bf00 nop + 80126b8: e004 b.n 80126c4 + goto nullreturn; + 80126ba: bf00 nop + 80126bc: e002 b.n 80126c4 + goto nullreturn; + 80126be: bf00 nop + 80126c0: e000 b.n 80126c4 + goto nullreturn; + 80126c2: bf00 nop + +nullreturn: + LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: nullreturn\n")); + IPFRAG_STATS_INC(ip_frag.drop); + pbuf_free(p); + 80126c4: 6878 ldr r0, [r7, #4] + 80126c6: f7f5 fe3d bl 8008344 + return NULL; + 80126ca: 2300 movs r3, #0 +} + 80126cc: 4618 mov r0, r3 + 80126ce: 3738 adds r7, #56 ; 0x38 + 80126d0: 46bd mov sp, r7 + 80126d2: bd80 pop {r7, pc} + 80126d4: 200070f4 .word 0x200070f4 + 80126d8: 200070f0 .word 0x200070f0 + +080126dc : +#if IP_FRAG +#if !LWIP_NETIF_TX_SINGLE_PBUF +/** Allocate a new struct pbuf_custom_ref */ +static struct pbuf_custom_ref* +ip_frag_alloc_pbuf_custom_ref(void) +{ + 80126dc: b580 push {r7, lr} + 80126de: af00 add r7, sp, #0 + return (struct pbuf_custom_ref*)memp_malloc(MEMP_FRAG_PBUF); + 80126e0: 2005 movs r0, #5 + 80126e2: f7f5 f89f bl 8007824 + 80126e6: 4603 mov r3, r0 +} + 80126e8: 4618 mov r0, r3 + 80126ea: bd80 pop {r7, pc} + +080126ec : + +/** Free a struct pbuf_custom_ref */ +static void +ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) +{ + 80126ec: b580 push {r7, lr} + 80126ee: b082 sub sp, #8 + 80126f0: af00 add r7, sp, #0 + 80126f2: 6078 str r0, [r7, #4] + LWIP_ASSERT("p != NULL", p != NULL); + 80126f4: 687b ldr r3, [r7, #4] + 80126f6: 2b00 cmp r3, #0 + 80126f8: d106 bne.n 8012708 + 80126fa: 4b07 ldr r3, [pc, #28] ; (8012718 ) + 80126fc: f240 22ae movw r2, #686 ; 0x2ae + 8012700: 4906 ldr r1, [pc, #24] ; (801271c ) + 8012702: 4807 ldr r0, [pc, #28] ; (8012720 ) + 8012704: f000 fb3e bl 8012d84 + memp_free(MEMP_FRAG_PBUF, p); + 8012708: 6879 ldr r1, [r7, #4] + 801270a: 2005 movs r0, #5 + 801270c: f7f5 f8d6 bl 80078bc +} + 8012710: bf00 nop + 8012712: 3708 adds r7, #8 + 8012714: 46bd mov sp, r7 + 8012716: bd80 pop {r7, pc} + 8012718: 080163ec .word 0x080163ec + 801271c: 08016554 .word 0x08016554 + 8012720: 08016434 .word 0x08016434 + +08012724 : + +/** Free-callback function to free a 'struct pbuf_custom_ref', called by + * pbuf_free. */ +static void +ipfrag_free_pbuf_custom(struct pbuf *p) +{ + 8012724: b580 push {r7, lr} + 8012726: b084 sub sp, #16 + 8012728: af00 add r7, sp, #0 + 801272a: 6078 str r0, [r7, #4] + struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p; + 801272c: 687b ldr r3, [r7, #4] + 801272e: 60fb str r3, [r7, #12] + LWIP_ASSERT("pcr != NULL", pcr != NULL); + 8012730: 68fb ldr r3, [r7, #12] + 8012732: 2b00 cmp r3, #0 + 8012734: d106 bne.n 8012744 + 8012736: 4b11 ldr r3, [pc, #68] ; (801277c ) + 8012738: f44f 722e mov.w r2, #696 ; 0x2b8 + 801273c: 4910 ldr r1, [pc, #64] ; (8012780 ) + 801273e: 4811 ldr r0, [pc, #68] ; (8012784 ) + 8012740: f000 fb20 bl 8012d84 + LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p); + 8012744: 68fa ldr r2, [r7, #12] + 8012746: 687b ldr r3, [r7, #4] + 8012748: 429a cmp r2, r3 + 801274a: d006 beq.n 801275a + 801274c: 4b0b ldr r3, [pc, #44] ; (801277c ) + 801274e: f240 22b9 movw r2, #697 ; 0x2b9 + 8012752: 490d ldr r1, [pc, #52] ; (8012788 ) + 8012754: 480b ldr r0, [pc, #44] ; (8012784 ) + 8012756: f000 fb15 bl 8012d84 + if (pcr->original != NULL) { + 801275a: 68fb ldr r3, [r7, #12] + 801275c: 695b ldr r3, [r3, #20] + 801275e: 2b00 cmp r3, #0 + 8012760: d004 beq.n 801276c + pbuf_free(pcr->original); + 8012762: 68fb ldr r3, [r7, #12] + 8012764: 695b ldr r3, [r3, #20] + 8012766: 4618 mov r0, r3 + 8012768: f7f5 fdec bl 8008344 + } + ip_frag_free_pbuf_custom_ref(pcr); + 801276c: 68f8 ldr r0, [r7, #12] + 801276e: f7ff ffbd bl 80126ec +} + 8012772: bf00 nop + 8012774: 3710 adds r7, #16 + 8012776: 46bd mov sp, r7 + 8012778: bd80 pop {r7, pc} + 801277a: bf00 nop + 801277c: 080163ec .word 0x080163ec + 8012780: 08016560 .word 0x08016560 + 8012784: 08016434 .word 0x08016434 + 8012788: 0801656c .word 0x0801656c + +0801278c : + * + * @return ERR_OK if sent successfully, err_t otherwise + */ +err_t +ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) +{ + 801278c: b580 push {r7, lr} + 801278e: b092 sub sp, #72 ; 0x48 + 8012790: af02 add r7, sp, #8 + 8012792: 60f8 str r0, [r7, #12] + 8012794: 60b9 str r1, [r7, #8] + 8012796: 607a str r2, [r7, #4] + struct pbuf *rambuf; +#if !LWIP_NETIF_TX_SINGLE_PBUF + struct pbuf *newpbuf; + u16_t newpbuflen = 0; + 8012798: 2300 movs r3, #0 + 801279a: 87fb strh r3, [r7, #62] ; 0x3e + u16_t left_to_copy; +#endif + struct ip_hdr *original_iphdr; + struct ip_hdr *iphdr; + const u16_t nfb = (netif->mtu - IP_HLEN) / 8; + 801279c: 68bb ldr r3, [r7, #8] + 801279e: 8d5b ldrh r3, [r3, #42] ; 0x2a + 80127a0: 3b14 subs r3, #20 + 80127a2: 2b00 cmp r3, #0 + 80127a4: da00 bge.n 80127a8 + 80127a6: 3307 adds r3, #7 + 80127a8: 10db asrs r3, r3, #3 + 80127aa: 867b strh r3, [r7, #50] ; 0x32 + u16_t left, fragsize; + u16_t ofo; + int last; + u16_t poff = IP_HLEN; + 80127ac: 2314 movs r3, #20 + 80127ae: 86fb strh r3, [r7, #54] ; 0x36 + u16_t tmp; + + original_iphdr = (struct ip_hdr *)p->payload; + 80127b0: 68fb ldr r3, [r7, #12] + 80127b2: 685b ldr r3, [r3, #4] + 80127b4: 62fb str r3, [r7, #44] ; 0x2c + iphdr = original_iphdr; + 80127b6: 6afb ldr r3, [r7, #44] ; 0x2c + 80127b8: 62bb str r3, [r7, #40] ; 0x28 + LWIP_ERROR("ip4_frag() does not support IP options", IPH_HL(iphdr) * 4 == IP_HLEN, return ERR_VAL); + 80127ba: 6abb ldr r3, [r7, #40] ; 0x28 + 80127bc: 781b ldrb r3, [r3, #0] + 80127be: f003 030f and.w r3, r3, #15 + 80127c2: 2b05 cmp r3, #5 + 80127c4: d009 beq.n 80127da + 80127c6: 4b7a ldr r3, [pc, #488] ; (80129b0 ) + 80127c8: f240 22e1 movw r2, #737 ; 0x2e1 + 80127cc: 4979 ldr r1, [pc, #484] ; (80129b4 ) + 80127ce: 487a ldr r0, [pc, #488] ; (80129b8 ) + 80127d0: f000 fad8 bl 8012d84 + 80127d4: f06f 0305 mvn.w r3, #5 + 80127d8: e0e6 b.n 80129a8 + + /* Save original offset */ + tmp = lwip_ntohs(IPH_OFFSET(iphdr)); + 80127da: 6abb ldr r3, [r7, #40] ; 0x28 + 80127dc: 88db ldrh r3, [r3, #6] + 80127de: b29b uxth r3, r3 + 80127e0: 4618 mov r0, r3 + 80127e2: f7f4 fc77 bl 80070d4 + 80127e6: 4603 mov r3, r0 + 80127e8: 86bb strh r3, [r7, #52] ; 0x34 + ofo = tmp & IP_OFFMASK; + 80127ea: 8ebb ldrh r3, [r7, #52] ; 0x34 + 80127ec: f3c3 030c ubfx r3, r3, #0, #13 + 80127f0: 873b strh r3, [r7, #56] ; 0x38 + LWIP_ERROR("ip_frag(): MF already set", (tmp & IP_MF) == 0, return ERR_VAL); + 80127f2: 8ebb ldrh r3, [r7, #52] ; 0x34 + 80127f4: f403 5300 and.w r3, r3, #8192 ; 0x2000 + 80127f8: 2b00 cmp r3, #0 + 80127fa: d009 beq.n 8012810 + 80127fc: 4b6c ldr r3, [pc, #432] ; (80129b0 ) + 80127fe: f240 22e6 movw r2, #742 ; 0x2e6 + 8012802: 496e ldr r1, [pc, #440] ; (80129bc ) + 8012804: 486c ldr r0, [pc, #432] ; (80129b8 ) + 8012806: f000 fabd bl 8012d84 + 801280a: f06f 0305 mvn.w r3, #5 + 801280e: e0cb b.n 80129a8 + + left = p->tot_len - IP_HLEN; + 8012810: 68fb ldr r3, [r7, #12] + 8012812: 891b ldrh r3, [r3, #8] + 8012814: 3b14 subs r3, #20 + 8012816: 877b strh r3, [r7, #58] ; 0x3a + + while (left) { + 8012818: e0bd b.n 8012996 + /* Fill this fragment */ + fragsize = LWIP_MIN(left, nfb * 8); + 801281a: 8e7b ldrh r3, [r7, #50] ; 0x32 + 801281c: 00da lsls r2, r3, #3 + 801281e: 8f7b ldrh r3, [r7, #58] ; 0x3a + 8012820: 4293 cmp r3, r2 + 8012822: bfa8 it ge + 8012824: 4613 movge r3, r2 + 8012826: 84fb strh r3, [r7, #38] ; 0x26 + /* 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); + 8012828: 2200 movs r2, #0 + 801282a: 2114 movs r1, #20 + 801282c: 2002 movs r0, #2 + 801282e: f7f5 fa11 bl 8007c54 + 8012832: 6238 str r0, [r7, #32] + if (rambuf == NULL) { + 8012834: 6a3b ldr r3, [r7, #32] + 8012836: 2b00 cmp r3, #0 + 8012838: f000 80b3 beq.w 80129a2 + goto memerr; + } + LWIP_ASSERT("this needs a pbuf in one piece!", + 801283c: 68fb ldr r3, [r7, #12] + 801283e: 895b ldrh r3, [r3, #10] + 8012840: 2b13 cmp r3, #19 + 8012842: d806 bhi.n 8012852 + 8012844: 4b5a ldr r3, [pc, #360] ; (80129b0 ) + 8012846: f44f 7242 mov.w r2, #776 ; 0x308 + 801284a: 495d ldr r1, [pc, #372] ; (80129c0 ) + 801284c: 485a ldr r0, [pc, #360] ; (80129b8 ) + 801284e: f000 fa99 bl 8012d84 + (p->len >= (IP_HLEN))); + SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); + 8012852: 6a3b ldr r3, [r7, #32] + 8012854: 685b ldr r3, [r3, #4] + 8012856: 2214 movs r2, #20 + 8012858: 6af9 ldr r1, [r7, #44] ; 0x2c + 801285a: 4618 mov r0, r3 + 801285c: f000 fc5d bl 801311a + iphdr = (struct ip_hdr *)rambuf->payload; + 8012860: 6a3b ldr r3, [r7, #32] + 8012862: 685b ldr r3, [r3, #4] + 8012864: 62bb str r3, [r7, #40] ; 0x28 + + left_to_copy = fragsize; + 8012866: 8cfb ldrh r3, [r7, #38] ; 0x26 + 8012868: 87bb strh r3, [r7, #60] ; 0x3c + while (left_to_copy) { + 801286a: e04f b.n 801290c + struct pbuf_custom_ref *pcr; + u16_t plen = p->len - poff; + 801286c: 68fb ldr r3, [r7, #12] + 801286e: 895a ldrh r2, [r3, #10] + 8012870: 8efb ldrh r3, [r7, #54] ; 0x36 + 8012872: 1ad3 subs r3, r2, r3 + 8012874: 837b strh r3, [r7, #26] + newpbuflen = LWIP_MIN(left_to_copy, plen); + 8012876: 8b7a ldrh r2, [r7, #26] + 8012878: 8fbb ldrh r3, [r7, #60] ; 0x3c + 801287a: 4293 cmp r3, r2 + 801287c: bf28 it cs + 801287e: 4613 movcs r3, r2 + 8012880: 87fb strh r3, [r7, #62] ; 0x3e + /* Is this pbuf already empty? */ + if (!newpbuflen) { + 8012882: 8ffb ldrh r3, [r7, #62] ; 0x3e + 8012884: 2b00 cmp r3, #0 + 8012886: d105 bne.n 8012894 + poff = 0; + 8012888: 2300 movs r3, #0 + 801288a: 86fb strh r3, [r7, #54] ; 0x36 + p = p->next; + 801288c: 68fb ldr r3, [r7, #12] + 801288e: 681b ldr r3, [r3, #0] + 8012890: 60fb str r3, [r7, #12] + continue; + 8012892: e03b b.n 801290c + } + pcr = ip_frag_alloc_pbuf_custom_ref(); + 8012894: f7ff ff22 bl 80126dc + 8012898: 6178 str r0, [r7, #20] + if (pcr == NULL) { + 801289a: 697b ldr r3, [r7, #20] + 801289c: 2b00 cmp r3, #0 + 801289e: d103 bne.n 80128a8 + pbuf_free(rambuf); + 80128a0: 6a38 ldr r0, [r7, #32] + 80128a2: f7f5 fd4f bl 8008344 + goto memerr; + 80128a6: e07d b.n 80129a4 + } + /* Mirror this pbuf, although we might not need all of it. */ + newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, + 80128a8: 6978 ldr r0, [r7, #20] + (u8_t*)p->payload + poff, newpbuflen); + 80128aa: 68fb ldr r3, [r7, #12] + 80128ac: 685a ldr r2, [r3, #4] + newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, + 80128ae: 8efb ldrh r3, [r7, #54] ; 0x36 + 80128b0: 4413 add r3, r2 + 80128b2: 8ff9 ldrh r1, [r7, #62] ; 0x3e + 80128b4: 8ffa ldrh r2, [r7, #62] ; 0x3e + 80128b6: 9201 str r2, [sp, #4] + 80128b8: 9300 str r3, [sp, #0] + 80128ba: 4603 mov r3, r0 + 80128bc: 2202 movs r2, #2 + 80128be: 2004 movs r0, #4 + 80128c0: f7f5 fb62 bl 8007f88 + 80128c4: 6138 str r0, [r7, #16] + if (newpbuf == NULL) { + 80128c6: 693b ldr r3, [r7, #16] + 80128c8: 2b00 cmp r3, #0 + 80128ca: d106 bne.n 80128da + ip_frag_free_pbuf_custom_ref(pcr); + 80128cc: 6978 ldr r0, [r7, #20] + 80128ce: f7ff ff0d bl 80126ec + pbuf_free(rambuf); + 80128d2: 6a38 ldr r0, [r7, #32] + 80128d4: f7f5 fd36 bl 8008344 + goto memerr; + 80128d8: e064 b.n 80129a4 + } + pbuf_ref(p); + 80128da: 68f8 ldr r0, [r7, #12] + 80128dc: f7f5 fddc bl 8008498 + pcr->original = p; + 80128e0: 697b ldr r3, [r7, #20] + 80128e2: 68fa ldr r2, [r7, #12] + 80128e4: 615a str r2, [r3, #20] + pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; + 80128e6: 697b ldr r3, [r7, #20] + 80128e8: 4a36 ldr r2, [pc, #216] ; (80129c4 ) + 80128ea: 611a str r2, [r3, #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); + 80128ec: 6939 ldr r1, [r7, #16] + 80128ee: 6a38 ldr r0, [r7, #32] + 80128f0: f7f5 fdf4 bl 80084dc + left_to_copy -= newpbuflen; + 80128f4: 8fba ldrh r2, [r7, #60] ; 0x3c + 80128f6: 8ffb ldrh r3, [r7, #62] ; 0x3e + 80128f8: 1ad3 subs r3, r2, r3 + 80128fa: 87bb strh r3, [r7, #60] ; 0x3c + if (left_to_copy) { + 80128fc: 8fbb ldrh r3, [r7, #60] ; 0x3c + 80128fe: 2b00 cmp r3, #0 + 8012900: d004 beq.n 801290c + poff = 0; + 8012902: 2300 movs r3, #0 + 8012904: 86fb strh r3, [r7, #54] ; 0x36 + p = p->next; + 8012906: 68fb ldr r3, [r7, #12] + 8012908: 681b ldr r3, [r3, #0] + 801290a: 60fb str r3, [r7, #12] + while (left_to_copy) { + 801290c: 8fbb ldrh r3, [r7, #60] ; 0x3c + 801290e: 2b00 cmp r3, #0 + 8012910: d1ac bne.n 801286c + } + } + poff += newpbuflen; + 8012912: 8efa ldrh r2, [r7, #54] ; 0x36 + 8012914: 8ffb ldrh r3, [r7, #62] ; 0x3e + 8012916: 4413 add r3, r2 + 8012918: 86fb strh r3, [r7, #54] ; 0x36 +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + + /* Correct header */ + last = (left <= netif->mtu - IP_HLEN); + 801291a: 68bb ldr r3, [r7, #8] + 801291c: 8d5b ldrh r3, [r3, #42] ; 0x2a + 801291e: f1a3 0213 sub.w r2, r3, #19 + 8012922: 8f7b ldrh r3, [r7, #58] ; 0x3a + 8012924: 429a cmp r2, r3 + 8012926: bfcc ite gt + 8012928: 2301 movgt r3, #1 + 801292a: 2300 movle r3, #0 + 801292c: b2db uxtb r3, r3 + 801292e: 61fb str r3, [r7, #28] + + /* Set new offset and MF flag */ + tmp = (IP_OFFMASK & (ofo)); + 8012930: 8f3b ldrh r3, [r7, #56] ; 0x38 + 8012932: f3c3 030c ubfx r3, r3, #0, #13 + 8012936: 86bb strh r3, [r7, #52] ; 0x34 + if (!last) { + 8012938: 69fb ldr r3, [r7, #28] + 801293a: 2b00 cmp r3, #0 + 801293c: d103 bne.n 8012946 + tmp = tmp | IP_MF; + 801293e: 8ebb ldrh r3, [r7, #52] ; 0x34 + 8012940: f443 5300 orr.w r3, r3, #8192 ; 0x2000 + 8012944: 86bb strh r3, [r7, #52] ; 0x34 + } + IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); + 8012946: 8ebb ldrh r3, [r7, #52] ; 0x34 + 8012948: 4618 mov r0, r3 + 801294a: f7f4 fbc3 bl 80070d4 + 801294e: 4603 mov r3, r0 + 8012950: 461a mov r2, r3 + 8012952: 6abb ldr r3, [r7, #40] ; 0x28 + 8012954: 80da strh r2, [r3, #6] + IPH_LEN_SET(iphdr, lwip_htons(fragsize + IP_HLEN)); + 8012956: 8cfb ldrh r3, [r7, #38] ; 0x26 + 8012958: 3314 adds r3, #20 + 801295a: b29b uxth r3, r3 + 801295c: 4618 mov r0, r3 + 801295e: f7f4 fbb9 bl 80070d4 + 8012962: 4603 mov r3, r0 + 8012964: 461a mov r2, r3 + 8012966: 6abb ldr r3, [r7, #40] ; 0x28 + 8012968: 805a strh r2, [r3, #2] + IPH_CHKSUM_SET(iphdr, 0); + 801296a: 6abb ldr r3, [r7, #40] ; 0x28 + 801296c: 2200 movs r2, #0 + 801296e: 729a strb r2, [r3, #10] + 8012970: 2200 movs r2, #0 + 8012972: 72da strb r2, [r3, #11] +#endif /* CHECKSUM_GEN_IP */ + + /* No need for separate header pbuf - we allowed room for it in rambuf + * when allocated. + */ + netif->output(netif, rambuf, dest); + 8012974: 68bb ldr r3, [r7, #8] + 8012976: 695b ldr r3, [r3, #20] + 8012978: 687a ldr r2, [r7, #4] + 801297a: 6a39 ldr r1, [r7, #32] + 801297c: 68b8 ldr r0, [r7, #8] + 801297e: 4798 blx r3 + * recreate it next time round the loop. If we're lucky the hardware + * will have already sent the packet, the free will really free, and + * there will be zero memory penalty. + */ + + pbuf_free(rambuf); + 8012980: 6a38 ldr r0, [r7, #32] + 8012982: f7f5 fcdf bl 8008344 + left -= fragsize; + 8012986: 8f7a ldrh r2, [r7, #58] ; 0x3a + 8012988: 8cfb ldrh r3, [r7, #38] ; 0x26 + 801298a: 1ad3 subs r3, r2, r3 + 801298c: 877b strh r3, [r7, #58] ; 0x3a + ofo += nfb; + 801298e: 8f3a ldrh r2, [r7, #56] ; 0x38 + 8012990: 8e7b ldrh r3, [r7, #50] ; 0x32 + 8012992: 4413 add r3, r2 + 8012994: 873b strh r3, [r7, #56] ; 0x38 + while (left) { + 8012996: 8f7b ldrh r3, [r7, #58] ; 0x3a + 8012998: 2b00 cmp r3, #0 + 801299a: f47f af3e bne.w 801281a + } + MIB2_STATS_INC(mib2.ipfragoks); + return ERR_OK; + 801299e: 2300 movs r3, #0 + 80129a0: e002 b.n 80129a8 + goto memerr; + 80129a2: bf00 nop +memerr: + MIB2_STATS_INC(mib2.ipfragfails); + return ERR_MEM; + 80129a4: f04f 33ff mov.w r3, #4294967295 +} + 80129a8: 4618 mov r0, r3 + 80129aa: 3740 adds r7, #64 ; 0x40 + 80129ac: 46bd mov sp, r7 + 80129ae: bd80 pop {r7, pc} + 80129b0: 080163ec .word 0x080163ec + 80129b4: 08016578 .word 0x08016578 + 80129b8: 08016434 .word 0x08016434 + 80129bc: 080165a0 .word 0x080165a0 + 80129c0: 080165bc .word 0x080165bc + 80129c4: 08012725 .word 0x08012725 + +080129c8 : + * @see ETHARP_SUPPORT_VLAN + * @see LWIP_HOOK_VLAN_CHECK + */ +err_t +ethernet_input(struct pbuf *p, struct netif *netif) +{ + 80129c8: b580 push {r7, lr} + 80129ca: b086 sub sp, #24 + 80129cc: af00 add r7, sp, #0 + 80129ce: 6078 str r0, [r7, #4] + 80129d0: 6039 str r1, [r7, #0] + struct eth_hdr* ethhdr; + u16_t type; +#if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6 + s16_t ip_hdr_offset = SIZEOF_ETH_HDR; + 80129d2: 230e movs r3, #14 + 80129d4: 82fb strh r3, [r7, #22] +#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ + + if (p->len <= SIZEOF_ETH_HDR) { + 80129d6: 687b ldr r3, [r7, #4] + 80129d8: 895b ldrh r3, [r3, #10] + 80129da: 2b0e cmp r3, #14 + 80129dc: d977 bls.n 8012ace + MIB2_STATS_NETIF_INC(netif, ifinerrors); + goto free_and_return; + } + + /* points to packet payload, which starts with an Ethernet header */ + ethhdr = (struct eth_hdr *)p->payload; + 80129de: 687b ldr r3, [r7, #4] + 80129e0: 685b ldr r3, [r3, #4] + 80129e2: 613b str r3, [r7, #16] + (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], + (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], + (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], + lwip_htons(ethhdr->type))); + + type = ethhdr->type; + 80129e4: 693b ldr r3, [r7, #16] + 80129e6: 7b1a ldrb r2, [r3, #12] + 80129e8: 7b5b ldrb r3, [r3, #13] + 80129ea: 021b lsls r3, r3, #8 + 80129ec: 4313 orrs r3, r2 + 80129ee: 81fb strh r3, [r7, #14] + +#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) { + 80129f0: 693b ldr r3, [r7, #16] + 80129f2: 781b ldrb r3, [r3, #0] + 80129f4: f003 0301 and.w r3, r3, #1 + 80129f8: 2b00 cmp r3, #0 + 80129fa: d023 beq.n 8012a44 + /* this might be a multicast or broadcast packet */ + if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { + 80129fc: 693b ldr r3, [r7, #16] + 80129fe: 781b ldrb r3, [r3, #0] + 8012a00: 2b01 cmp r3, #1 + 8012a02: d10f bne.n 8012a24 +#if LWIP_IPV4 + if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && + 8012a04: 693b ldr r3, [r7, #16] + 8012a06: 785b ldrb r3, [r3, #1] + 8012a08: 2b00 cmp r3, #0 + 8012a0a: d11b bne.n 8012a44 + (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { + 8012a0c: 693b ldr r3, [r7, #16] + 8012a0e: 789b ldrb r3, [r3, #2] + if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && + 8012a10: 2b5e cmp r3, #94 ; 0x5e + 8012a12: d117 bne.n 8012a44 + /* mark the pbuf as link-layer multicast */ + p->flags |= PBUF_FLAG_LLMCAST; + 8012a14: 687b ldr r3, [r7, #4] + 8012a16: 7b5b ldrb r3, [r3, #13] + 8012a18: f043 0310 orr.w r3, r3, #16 + 8012a1c: b2da uxtb r2, r3 + 8012a1e: 687b ldr r3, [r7, #4] + 8012a20: 735a strb r2, [r3, #13] + 8012a22: e00f b.n 8012a44 + (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)) { + 8012a24: 693b ldr r3, [r7, #16] + 8012a26: 2206 movs r2, #6 + 8012a28: 4931 ldr r1, [pc, #196] ; (8012af0 ) + 8012a2a: 4618 mov r0, r3 + 8012a2c: f000 faf0 bl 8013010 + 8012a30: 4603 mov r3, r0 + 8012a32: 2b00 cmp r3, #0 + 8012a34: d106 bne.n 8012a44 + /* mark the pbuf as link-layer broadcast */ + p->flags |= PBUF_FLAG_LLBCAST; + 8012a36: 687b ldr r3, [r7, #4] + 8012a38: 7b5b ldrb r3, [r3, #13] + 8012a3a: f043 0308 orr.w r3, r3, #8 + 8012a3e: b2da uxtb r2, r3 + 8012a40: 687b ldr r3, [r7, #4] + 8012a42: 735a strb r2, [r3, #13] + } + } + + switch (type) { + 8012a44: 89fb ldrh r3, [r7, #14] + 8012a46: 2b08 cmp r3, #8 + 8012a48: d003 beq.n 8012a52 + 8012a4a: f5b3 6fc1 cmp.w r3, #1544 ; 0x608 + 8012a4e: d01e beq.n 8012a8e + } +#endif + ETHARP_STATS_INC(etharp.proterr); + ETHARP_STATS_INC(etharp.drop); + MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); + goto free_and_return; + 8012a50: e046 b.n 8012ae0 + if (!(netif->flags & NETIF_FLAG_ETHARP)) { + 8012a52: 683b ldr r3, [r7, #0] + 8012a54: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8012a58: f003 0308 and.w r3, r3, #8 + 8012a5c: 2b00 cmp r3, #0 + 8012a5e: d038 beq.n 8012ad2 + if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + 8012a60: 687b ldr r3, [r7, #4] + 8012a62: 895b ldrh r3, [r3, #10] + 8012a64: 461a mov r2, r3 + 8012a66: f9b7 3016 ldrsh.w r3, [r7, #22] + 8012a6a: 429a cmp r2, r3 + 8012a6c: db33 blt.n 8012ad6 + 8012a6e: 8afb ldrh r3, [r7, #22] + 8012a70: 425b negs r3, r3 + 8012a72: b29b uxth r3, r3 + 8012a74: b21b sxth r3, r3 + 8012a76: 4619 mov r1, r3 + 8012a78: 6878 ldr r0, [r7, #4] + 8012a7a: f7f5 fc3f bl 80082fc + 8012a7e: 4603 mov r3, r0 + 8012a80: 2b00 cmp r3, #0 + 8012a82: d128 bne.n 8012ad6 + ip4_input(p, netif); + 8012a84: 6839 ldr r1, [r7, #0] + 8012a86: 6878 ldr r0, [r7, #4] + 8012a88: f7fe fe0c bl 80116a4 + break; + 8012a8c: e01d b.n 8012aca + if (!(netif->flags & NETIF_FLAG_ETHARP)) { + 8012a8e: 683b ldr r3, [r7, #0] + 8012a90: f893 3033 ldrb.w r3, [r3, #51] ; 0x33 + 8012a94: f003 0308 and.w r3, r3, #8 + 8012a98: 2b00 cmp r3, #0 + 8012a9a: d01e beq.n 8012ada + if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + 8012a9c: 687b ldr r3, [r7, #4] + 8012a9e: 895b ldrh r3, [r3, #10] + 8012aa0: 461a mov r2, r3 + 8012aa2: f9b7 3016 ldrsh.w r3, [r7, #22] + 8012aa6: 429a cmp r2, r3 + 8012aa8: db19 blt.n 8012ade + 8012aaa: 8afb ldrh r3, [r7, #22] + 8012aac: 425b negs r3, r3 + 8012aae: b29b uxth r3, r3 + 8012ab0: b21b sxth r3, r3 + 8012ab2: 4619 mov r1, r3 + 8012ab4: 6878 ldr r0, [r7, #4] + 8012ab6: f7f5 fc21 bl 80082fc + 8012aba: 4603 mov r3, r0 + 8012abc: 2b00 cmp r3, #0 + 8012abe: d10e bne.n 8012ade + etharp_input(p, netif); + 8012ac0: 6839 ldr r1, [r7, #0] + 8012ac2: 6878 ldr r0, [r7, #4] + 8012ac4: f7fd ffd8 bl 8010a78 + break; + 8012ac8: bf00 nop + } + + /* This means the pbuf is freed or consumed, + so the caller doesn't have to free it again */ + return ERR_OK; + 8012aca: 2300 movs r3, #0 + 8012acc: e00c b.n 8012ae8 + goto free_and_return; + 8012ace: bf00 nop + 8012ad0: e006 b.n 8012ae0 + goto free_and_return; + 8012ad2: bf00 nop + 8012ad4: e004 b.n 8012ae0 + goto free_and_return; + 8012ad6: bf00 nop + 8012ad8: e002 b.n 8012ae0 + goto free_and_return; + 8012ada: bf00 nop + 8012adc: e000 b.n 8012ae0 + goto free_and_return; + 8012ade: bf00 nop + +free_and_return: + pbuf_free(p); + 8012ae0: 6878 ldr r0, [r7, #4] + 8012ae2: f7f5 fc2f bl 8008344 + return ERR_OK; + 8012ae6: 2300 movs r3, #0 +} + 8012ae8: 4618 mov r0, r3 + 8012aea: 3718 adds r7, #24 + 8012aec: 46bd mov sp, r7 + 8012aee: bd80 pop {r7, pc} + 8012af0: 08016770 .word 0x08016770 + +08012af4 : + */ +err_t +ethernet_output(struct netif* netif, struct pbuf* p, + const struct eth_addr* src, const struct eth_addr* dst, + u16_t eth_type) +{ + 8012af4: b580 push {r7, lr} + 8012af6: b086 sub sp, #24 + 8012af8: af00 add r7, sp, #0 + 8012afa: 60f8 str r0, [r7, #12] + 8012afc: 60b9 str r1, [r7, #8] + 8012afe: 607a str r2, [r7, #4] + 8012b00: 603b str r3, [r7, #0] + struct eth_hdr* ethhdr; + u16_t eth_type_be = lwip_htons(eth_type); + 8012b02: 8c3b ldrh r3, [r7, #32] + 8012b04: 4618 mov r0, r3 + 8012b06: f7f4 fae5 bl 80070d4 + 8012b0a: 4603 mov r3, r0 + 8012b0c: 82fb strh r3, [r7, #22] + + eth_type_be = PP_HTONS(ETHTYPE_VLAN); + } else +#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ + { + if (pbuf_header(p, SIZEOF_ETH_HDR) != 0) { + 8012b0e: 210e movs r1, #14 + 8012b10: 68b8 ldr r0, [r7, #8] + 8012b12: f7f5 fbf3 bl 80082fc + 8012b16: 4603 mov r3, r0 + 8012b18: 2b00 cmp r3, #0 + 8012b1a: d125 bne.n 8012b68 + goto pbuf_header_failed; + } + } + + ethhdr = (struct eth_hdr*)p->payload; + 8012b1c: 68bb ldr r3, [r7, #8] + 8012b1e: 685b ldr r3, [r3, #4] + 8012b20: 613b str r3, [r7, #16] + ethhdr->type = eth_type_be; + 8012b22: 693b ldr r3, [r7, #16] + 8012b24: 8afa ldrh r2, [r7, #22] + 8012b26: 819a strh r2, [r3, #12] + ETHADDR32_COPY(ðhdr->dest, dst); + 8012b28: 693b ldr r3, [r7, #16] + 8012b2a: 2206 movs r2, #6 + 8012b2c: 6839 ldr r1, [r7, #0] + 8012b2e: 4618 mov r0, r3 + 8012b30: f000 faf3 bl 801311a + ETHADDR16_COPY(ðhdr->src, src); + 8012b34: 693b ldr r3, [r7, #16] + 8012b36: 3306 adds r3, #6 + 8012b38: 2206 movs r2, #6 + 8012b3a: 6879 ldr r1, [r7, #4] + 8012b3c: 4618 mov r0, r3 + 8012b3e: f000 faec bl 801311a + + LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", + 8012b42: 68fb ldr r3, [r7, #12] + 8012b44: f893 302c ldrb.w r3, [r3, #44] ; 0x2c + 8012b48: 2b06 cmp r3, #6 + 8012b4a: d006 beq.n 8012b5a + 8012b4c: 4b0a ldr r3, [pc, #40] ; (8012b78 ) + 8012b4e: f240 122b movw r2, #299 ; 0x12b + 8012b52: 490a ldr r1, [pc, #40] ; (8012b7c ) + 8012b54: 480a ldr r0, [pc, #40] ; (8012b80 ) + 8012b56: f000 f915 bl 8012d84 + (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); + 8012b5a: 68fb ldr r3, [r7, #12] + 8012b5c: 699b ldr r3, [r3, #24] + 8012b5e: 68b9 ldr r1, [r7, #8] + 8012b60: 68f8 ldr r0, [r7, #12] + 8012b62: 4798 blx r3 + 8012b64: 4603 mov r3, r0 + 8012b66: e002 b.n 8012b6e + goto pbuf_header_failed; + 8012b68: bf00 nop + +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; + 8012b6a: f06f 0301 mvn.w r3, #1 +} + 8012b6e: 4618 mov r0, r3 + 8012b70: 3718 adds r7, #24 + 8012b72: 46bd mov sp, r7 + 8012b74: bd80 pop {r7, pc} + 8012b76: bf00 nop + 8012b78: 080165dc .word 0x080165dc + 8012b7c: 08016614 .word 0x08016614 + 8012b80: 08016648 .word 0x08016648 + +08012b84 : + 8012b84: 4b16 ldr r3, [pc, #88] ; (8012be0 ) + 8012b86: b510 push {r4, lr} + 8012b88: 681c ldr r4, [r3, #0] + 8012b8a: 6b23 ldr r3, [r4, #48] ; 0x30 + 8012b8c: b9b3 cbnz r3, 8012bbc + 8012b8e: 2018 movs r0, #24 + 8012b90: f000 fb38 bl 8013204 + 8012b94: 4602 mov r2, r0 + 8012b96: 6320 str r0, [r4, #48] ; 0x30 + 8012b98: b920 cbnz r0, 8012ba4 + 8012b9a: 2152 movs r1, #82 ; 0x52 + 8012b9c: 4b11 ldr r3, [pc, #68] ; (8012be4 ) + 8012b9e: 4812 ldr r0, [pc, #72] ; (8012be8 ) + 8012ba0: f000 faca bl 8013138 <__assert_func> + 8012ba4: 4911 ldr r1, [pc, #68] ; (8012bec ) + 8012ba6: 4b12 ldr r3, [pc, #72] ; (8012bf0 ) + 8012ba8: e9c0 1300 strd r1, r3, [r0] + 8012bac: 4b11 ldr r3, [pc, #68] ; (8012bf4 ) + 8012bae: 2100 movs r1, #0 + 8012bb0: 6083 str r3, [r0, #8] + 8012bb2: 230b movs r3, #11 + 8012bb4: 8183 strh r3, [r0, #12] + 8012bb6: 2001 movs r0, #1 + 8012bb8: e9c2 0104 strd r0, r1, [r2, #16] + 8012bbc: 6b21 ldr r1, [r4, #48] ; 0x30 + 8012bbe: 480e ldr r0, [pc, #56] ; (8012bf8 ) + 8012bc0: 690b ldr r3, [r1, #16] + 8012bc2: 694c ldr r4, [r1, #20] + 8012bc4: 4358 muls r0, r3 + 8012bc6: 4a0d ldr r2, [pc, #52] ; (8012bfc ) + 8012bc8: fb02 0004 mla r0, r2, r4, r0 + 8012bcc: fba3 3202 umull r3, r2, r3, r2 + 8012bd0: 3301 adds r3, #1 + 8012bd2: eb40 0002 adc.w r0, r0, r2 + 8012bd6: e9c1 3004 strd r3, r0, [r1, #16] + 8012bda: f020 4000 bic.w r0, r0, #2147483648 ; 0x80000000 + 8012bde: bd10 pop {r4, pc} + 8012be0: 20000070 .word 0x20000070 + 8012be4: 0801677e .word 0x0801677e + 8012be8: 08016795 .word 0x08016795 + 8012bec: abcd330e .word 0xabcd330e + 8012bf0: e66d1234 .word 0xe66d1234 + 8012bf4: 0005deec .word 0x0005deec + 8012bf8: 5851f42d .word 0x5851f42d + 8012bfc: 4c957f2d .word 0x4c957f2d + +08012c00 : + 8012c00: 2300 movs r3, #0 + 8012c02: b510 push {r4, lr} + 8012c04: 4604 mov r4, r0 + 8012c06: e9c0 3300 strd r3, r3, [r0] + 8012c0a: e9c0 3304 strd r3, r3, [r0, #16] + 8012c0e: 6083 str r3, [r0, #8] + 8012c10: 8181 strh r1, [r0, #12] + 8012c12: 6643 str r3, [r0, #100] ; 0x64 + 8012c14: 81c2 strh r2, [r0, #14] + 8012c16: 6183 str r3, [r0, #24] + 8012c18: 4619 mov r1, r3 + 8012c1a: 2208 movs r2, #8 + 8012c1c: 305c adds r0, #92 ; 0x5c + 8012c1e: f000 fa07 bl 8013030 + 8012c22: 4b0d ldr r3, [pc, #52] ; (8012c58 ) + 8012c24: 6224 str r4, [r4, #32] + 8012c26: 6263 str r3, [r4, #36] ; 0x24 + 8012c28: 4b0c ldr r3, [pc, #48] ; (8012c5c ) + 8012c2a: 62a3 str r3, [r4, #40] ; 0x28 + 8012c2c: 4b0c ldr r3, [pc, #48] ; (8012c60 ) + 8012c2e: 62e3 str r3, [r4, #44] ; 0x2c + 8012c30: 4b0c ldr r3, [pc, #48] ; (8012c64 ) + 8012c32: 6323 str r3, [r4, #48] ; 0x30 + 8012c34: 4b0c ldr r3, [pc, #48] ; (8012c68 ) + 8012c36: 429c cmp r4, r3 + 8012c38: d006 beq.n 8012c48 + 8012c3a: f103 0268 add.w r2, r3, #104 ; 0x68 + 8012c3e: 4294 cmp r4, r2 + 8012c40: d002 beq.n 8012c48 + 8012c42: 33d0 adds r3, #208 ; 0xd0 + 8012c44: 429c cmp r4, r3 + 8012c46: d105 bne.n 8012c54 + 8012c48: f104 0058 add.w r0, r4, #88 ; 0x58 + 8012c4c: e8bd 4010 ldmia.w sp!, {r4, lr} + 8012c50: f000 ba60 b.w 8013114 <__retarget_lock_init_recursive> + 8012c54: bd10 pop {r4, pc} + 8012c56: bf00 nop + 8012c58: 08012e61 .word 0x08012e61 + 8012c5c: 08012e83 .word 0x08012e83 + 8012c60: 08012ebb .word 0x08012ebb + 8012c64: 08012edf .word 0x08012edf + 8012c68: 200070f8 .word 0x200070f8 + +08012c6c : + 8012c6c: 4a02 ldr r2, [pc, #8] ; (8012c78 ) + 8012c6e: 4903 ldr r1, [pc, #12] ; (8012c7c ) + 8012c70: 4803 ldr r0, [pc, #12] ; (8012c80 ) + 8012c72: f000 b869 b.w 8012d48 <_fwalk_sglue> + 8012c76: bf00 nop + 8012c78: 20000018 .word 0x20000018 + 8012c7c: 08013a1d .word 0x08013a1d + 8012c80: 20000024 .word 0x20000024 + +08012c84 : + 8012c84: 6841 ldr r1, [r0, #4] + 8012c86: 4b0c ldr r3, [pc, #48] ; (8012cb8 ) + 8012c88: b510 push {r4, lr} + 8012c8a: 4299 cmp r1, r3 + 8012c8c: 4604 mov r4, r0 + 8012c8e: d001 beq.n 8012c94 + 8012c90: f000 fec4 bl 8013a1c <_fflush_r> + 8012c94: 68a1 ldr r1, [r4, #8] + 8012c96: 4b09 ldr r3, [pc, #36] ; (8012cbc ) + 8012c98: 4299 cmp r1, r3 + 8012c9a: d002 beq.n 8012ca2 + 8012c9c: 4620 mov r0, r4 + 8012c9e: f000 febd bl 8013a1c <_fflush_r> + 8012ca2: 68e1 ldr r1, [r4, #12] + 8012ca4: 4b06 ldr r3, [pc, #24] ; (8012cc0 ) + 8012ca6: 4299 cmp r1, r3 + 8012ca8: d004 beq.n 8012cb4 + 8012caa: 4620 mov r0, r4 + 8012cac: e8bd 4010 ldmia.w sp!, {r4, lr} + 8012cb0: f000 beb4 b.w 8013a1c <_fflush_r> + 8012cb4: bd10 pop {r4, pc} + 8012cb6: bf00 nop + 8012cb8: 200070f8 .word 0x200070f8 + 8012cbc: 20007160 .word 0x20007160 + 8012cc0: 200071c8 .word 0x200071c8 + +08012cc4 : + 8012cc4: b510 push {r4, lr} + 8012cc6: 4b0b ldr r3, [pc, #44] ; (8012cf4 ) + 8012cc8: 4c0b ldr r4, [pc, #44] ; (8012cf8 ) + 8012cca: 4a0c ldr r2, [pc, #48] ; (8012cfc ) + 8012ccc: 4620 mov r0, r4 + 8012cce: 601a str r2, [r3, #0] + 8012cd0: 2104 movs r1, #4 + 8012cd2: 2200 movs r2, #0 + 8012cd4: f7ff ff94 bl 8012c00 + 8012cd8: f104 0068 add.w r0, r4, #104 ; 0x68 + 8012cdc: 2201 movs r2, #1 + 8012cde: 2109 movs r1, #9 + 8012ce0: f7ff ff8e bl 8012c00 + 8012ce4: f104 00d0 add.w r0, r4, #208 ; 0xd0 + 8012ce8: 2202 movs r2, #2 + 8012cea: e8bd 4010 ldmia.w sp!, {r4, lr} + 8012cee: 2112 movs r1, #18 + 8012cf0: f7ff bf86 b.w 8012c00 + 8012cf4: 20007230 .word 0x20007230 + 8012cf8: 200070f8 .word 0x200070f8 + 8012cfc: 08012c6d .word 0x08012c6d + +08012d00 <__sfp_lock_acquire>: + 8012d00: 4801 ldr r0, [pc, #4] ; (8012d08 <__sfp_lock_acquire+0x8>) + 8012d02: f000 ba08 b.w 8013116 <__retarget_lock_acquire_recursive> + 8012d06: bf00 nop + 8012d08: 20007239 .word 0x20007239 + +08012d0c <__sfp_lock_release>: + 8012d0c: 4801 ldr r0, [pc, #4] ; (8012d14 <__sfp_lock_release+0x8>) + 8012d0e: f000 ba03 b.w 8013118 <__retarget_lock_release_recursive> + 8012d12: bf00 nop + 8012d14: 20007239 .word 0x20007239 + +08012d18 <__sinit>: + 8012d18: b510 push {r4, lr} + 8012d1a: 4604 mov r4, r0 + 8012d1c: f7ff fff0 bl 8012d00 <__sfp_lock_acquire> + 8012d20: 6a23 ldr r3, [r4, #32] + 8012d22: b11b cbz r3, 8012d2c <__sinit+0x14> + 8012d24: e8bd 4010 ldmia.w sp!, {r4, lr} + 8012d28: f7ff bff0 b.w 8012d0c <__sfp_lock_release> + 8012d2c: 4b04 ldr r3, [pc, #16] ; (8012d40 <__sinit+0x28>) + 8012d2e: 6223 str r3, [r4, #32] + 8012d30: 4b04 ldr r3, [pc, #16] ; (8012d44 <__sinit+0x2c>) + 8012d32: 681b ldr r3, [r3, #0] + 8012d34: 2b00 cmp r3, #0 + 8012d36: d1f5 bne.n 8012d24 <__sinit+0xc> + 8012d38: f7ff ffc4 bl 8012cc4 + 8012d3c: e7f2 b.n 8012d24 <__sinit+0xc> + 8012d3e: bf00 nop + 8012d40: 08012c85 .word 0x08012c85 + 8012d44: 20007230 .word 0x20007230 + +08012d48 <_fwalk_sglue>: + 8012d48: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} + 8012d4c: 4607 mov r7, r0 + 8012d4e: 4688 mov r8, r1 + 8012d50: 4614 mov r4, r2 + 8012d52: 2600 movs r6, #0 + 8012d54: e9d4 9501 ldrd r9, r5, [r4, #4] + 8012d58: f1b9 0901 subs.w r9, r9, #1 + 8012d5c: d505 bpl.n 8012d6a <_fwalk_sglue+0x22> + 8012d5e: 6824 ldr r4, [r4, #0] + 8012d60: 2c00 cmp r4, #0 + 8012d62: d1f7 bne.n 8012d54 <_fwalk_sglue+0xc> + 8012d64: 4630 mov r0, r6 + 8012d66: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} + 8012d6a: 89ab ldrh r3, [r5, #12] + 8012d6c: 2b01 cmp r3, #1 + 8012d6e: d907 bls.n 8012d80 <_fwalk_sglue+0x38> + 8012d70: f9b5 300e ldrsh.w r3, [r5, #14] + 8012d74: 3301 adds r3, #1 + 8012d76: d003 beq.n 8012d80 <_fwalk_sglue+0x38> + 8012d78: 4629 mov r1, r5 + 8012d7a: 4638 mov r0, r7 + 8012d7c: 47c0 blx r8 + 8012d7e: 4306 orrs r6, r0 + 8012d80: 3568 adds r5, #104 ; 0x68 + 8012d82: e7e9 b.n 8012d58 <_fwalk_sglue+0x10> + +08012d84 : + 8012d84: b40f push {r0, r1, r2, r3} + 8012d86: b507 push {r0, r1, r2, lr} + 8012d88: 4906 ldr r1, [pc, #24] ; (8012da4 ) + 8012d8a: ab04 add r3, sp, #16 + 8012d8c: 6808 ldr r0, [r1, #0] + 8012d8e: f853 2b04 ldr.w r2, [r3], #4 + 8012d92: 6881 ldr r1, [r0, #8] + 8012d94: 9301 str r3, [sp, #4] + 8012d96: f000 fb11 bl 80133bc <_vfiprintf_r> + 8012d9a: b003 add sp, #12 + 8012d9c: f85d eb04 ldr.w lr, [sp], #4 + 8012da0: b004 add sp, #16 + 8012da2: 4770 bx lr + 8012da4: 20000070 .word 0x20000070 + +08012da8 <_puts_r>: + 8012da8: 6a03 ldr r3, [r0, #32] + 8012daa: b570 push {r4, r5, r6, lr} + 8012dac: 4605 mov r5, r0 + 8012dae: 460e mov r6, r1 + 8012db0: 6884 ldr r4, [r0, #8] + 8012db2: b90b cbnz r3, 8012db8 <_puts_r+0x10> + 8012db4: f7ff ffb0 bl 8012d18 <__sinit> + 8012db8: 6e63 ldr r3, [r4, #100] ; 0x64 + 8012dba: 07db lsls r3, r3, #31 + 8012dbc: d405 bmi.n 8012dca <_puts_r+0x22> + 8012dbe: 89a3 ldrh r3, [r4, #12] + 8012dc0: 0598 lsls r0, r3, #22 + 8012dc2: d402 bmi.n 8012dca <_puts_r+0x22> + 8012dc4: 6da0 ldr r0, [r4, #88] ; 0x58 + 8012dc6: f000 f9a6 bl 8013116 <__retarget_lock_acquire_recursive> + 8012dca: 89a3 ldrh r3, [r4, #12] + 8012dcc: 0719 lsls r1, r3, #28 + 8012dce: d513 bpl.n 8012df8 <_puts_r+0x50> + 8012dd0: 6923 ldr r3, [r4, #16] + 8012dd2: b18b cbz r3, 8012df8 <_puts_r+0x50> + 8012dd4: 3e01 subs r6, #1 + 8012dd6: 68a3 ldr r3, [r4, #8] + 8012dd8: f816 1f01 ldrb.w r1, [r6, #1]! + 8012ddc: 3b01 subs r3, #1 + 8012dde: 60a3 str r3, [r4, #8] + 8012de0: b9e9 cbnz r1, 8012e1e <_puts_r+0x76> + 8012de2: 2b00 cmp r3, #0 + 8012de4: da2e bge.n 8012e44 <_puts_r+0x9c> + 8012de6: 4622 mov r2, r4 + 8012de8: 210a movs r1, #10 + 8012dea: 4628 mov r0, r5 + 8012dec: f000 f87b bl 8012ee6 <__swbuf_r> + 8012df0: 3001 adds r0, #1 + 8012df2: d007 beq.n 8012e04 <_puts_r+0x5c> + 8012df4: 250a movs r5, #10 + 8012df6: e007 b.n 8012e08 <_puts_r+0x60> + 8012df8: 4621 mov r1, r4 + 8012dfa: 4628 mov r0, r5 + 8012dfc: f000 f8b0 bl 8012f60 <__swsetup_r> + 8012e00: 2800 cmp r0, #0 + 8012e02: d0e7 beq.n 8012dd4 <_puts_r+0x2c> + 8012e04: f04f 35ff mov.w r5, #4294967295 + 8012e08: 6e63 ldr r3, [r4, #100] ; 0x64 + 8012e0a: 07da lsls r2, r3, #31 + 8012e0c: d405 bmi.n 8012e1a <_puts_r+0x72> + 8012e0e: 89a3 ldrh r3, [r4, #12] + 8012e10: 059b lsls r3, r3, #22 + 8012e12: d402 bmi.n 8012e1a <_puts_r+0x72> + 8012e14: 6da0 ldr r0, [r4, #88] ; 0x58 + 8012e16: f000 f97f bl 8013118 <__retarget_lock_release_recursive> + 8012e1a: 4628 mov r0, r5 + 8012e1c: bd70 pop {r4, r5, r6, pc} + 8012e1e: 2b00 cmp r3, #0 + 8012e20: da04 bge.n 8012e2c <_puts_r+0x84> + 8012e22: 69a2 ldr r2, [r4, #24] + 8012e24: 429a cmp r2, r3 + 8012e26: dc06 bgt.n 8012e36 <_puts_r+0x8e> + 8012e28: 290a cmp r1, #10 + 8012e2a: d004 beq.n 8012e36 <_puts_r+0x8e> + 8012e2c: 6823 ldr r3, [r4, #0] + 8012e2e: 1c5a adds r2, r3, #1 + 8012e30: 6022 str r2, [r4, #0] + 8012e32: 7019 strb r1, [r3, #0] + 8012e34: e7cf b.n 8012dd6 <_puts_r+0x2e> + 8012e36: 4622 mov r2, r4 + 8012e38: 4628 mov r0, r5 + 8012e3a: f000 f854 bl 8012ee6 <__swbuf_r> + 8012e3e: 3001 adds r0, #1 + 8012e40: d1c9 bne.n 8012dd6 <_puts_r+0x2e> + 8012e42: e7df b.n 8012e04 <_puts_r+0x5c> + 8012e44: 250a movs r5, #10 + 8012e46: 6823 ldr r3, [r4, #0] + 8012e48: 1c5a adds r2, r3, #1 + 8012e4a: 6022 str r2, [r4, #0] + 8012e4c: 701d strb r5, [r3, #0] + 8012e4e: e7db b.n 8012e08 <_puts_r+0x60> + +08012e50 : + 8012e50: 4b02 ldr r3, [pc, #8] ; (8012e5c ) + 8012e52: 4601 mov r1, r0 + 8012e54: 6818 ldr r0, [r3, #0] + 8012e56: f7ff bfa7 b.w 8012da8 <_puts_r> + 8012e5a: bf00 nop + 8012e5c: 20000070 .word 0x20000070 + +08012e60 <__sread>: + 8012e60: b510 push {r4, lr} + 8012e62: 460c mov r4, r1 + 8012e64: f9b1 100e ldrsh.w r1, [r1, #14] + 8012e68: f000 f90c bl 8013084 <_read_r> + 8012e6c: 2800 cmp r0, #0 + 8012e6e: bfab itete ge + 8012e70: 6d63 ldrge r3, [r4, #84] ; 0x54 + 8012e72: 89a3 ldrhlt r3, [r4, #12] + 8012e74: 181b addge r3, r3, r0 + 8012e76: f423 5380 biclt.w r3, r3, #4096 ; 0x1000 + 8012e7a: bfac ite ge + 8012e7c: 6563 strge r3, [r4, #84] ; 0x54 + 8012e7e: 81a3 strhlt r3, [r4, #12] + 8012e80: bd10 pop {r4, pc} + +08012e82 <__swrite>: + 8012e82: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} + 8012e86: 461f mov r7, r3 + 8012e88: 898b ldrh r3, [r1, #12] + 8012e8a: 4605 mov r5, r0 + 8012e8c: 05db lsls r3, r3, #23 + 8012e8e: 460c mov r4, r1 + 8012e90: 4616 mov r6, r2 + 8012e92: d505 bpl.n 8012ea0 <__swrite+0x1e> + 8012e94: 2302 movs r3, #2 + 8012e96: 2200 movs r2, #0 + 8012e98: f9b1 100e ldrsh.w r1, [r1, #14] + 8012e9c: f000 f8e0 bl 8013060 <_lseek_r> + 8012ea0: 89a3 ldrh r3, [r4, #12] + 8012ea2: 4632 mov r2, r6 + 8012ea4: f423 5380 bic.w r3, r3, #4096 ; 0x1000 + 8012ea8: 81a3 strh r3, [r4, #12] + 8012eaa: 4628 mov r0, r5 + 8012eac: 463b mov r3, r7 + 8012eae: f9b4 100e ldrsh.w r1, [r4, #14] + 8012eb2: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} + 8012eb6: f000 b8f7 b.w 80130a8 <_write_r> + +08012eba <__sseek>: + 8012eba: b510 push {r4, lr} + 8012ebc: 460c mov r4, r1 + 8012ebe: f9b1 100e ldrsh.w r1, [r1, #14] + 8012ec2: f000 f8cd bl 8013060 <_lseek_r> + 8012ec6: 1c43 adds r3, r0, #1 + 8012ec8: 89a3 ldrh r3, [r4, #12] + 8012eca: bf15 itete ne + 8012ecc: 6560 strne r0, [r4, #84] ; 0x54 + 8012ece: f423 5380 biceq.w r3, r3, #4096 ; 0x1000 + 8012ed2: f443 5380 orrne.w r3, r3, #4096 ; 0x1000 + 8012ed6: 81a3 strheq r3, [r4, #12] + 8012ed8: bf18 it ne + 8012eda: 81a3 strhne r3, [r4, #12] + 8012edc: bd10 pop {r4, pc} + +08012ede <__sclose>: + 8012ede: f9b1 100e ldrsh.w r1, [r1, #14] + 8012ee2: f000 b8ad b.w 8013040 <_close_r> + +08012ee6 <__swbuf_r>: + 8012ee6: b5f8 push {r3, r4, r5, r6, r7, lr} + 8012ee8: 460e mov r6, r1 + 8012eea: 4614 mov r4, r2 + 8012eec: 4605 mov r5, r0 + 8012eee: b118 cbz r0, 8012ef8 <__swbuf_r+0x12> + 8012ef0: 6a03 ldr r3, [r0, #32] + 8012ef2: b90b cbnz r3, 8012ef8 <__swbuf_r+0x12> + 8012ef4: f7ff ff10 bl 8012d18 <__sinit> + 8012ef8: 69a3 ldr r3, [r4, #24] + 8012efa: 60a3 str r3, [r4, #8] + 8012efc: 89a3 ldrh r3, [r4, #12] + 8012efe: 071a lsls r2, r3, #28 + 8012f00: d525 bpl.n 8012f4e <__swbuf_r+0x68> + 8012f02: 6923 ldr r3, [r4, #16] + 8012f04: b31b cbz r3, 8012f4e <__swbuf_r+0x68> + 8012f06: 6823 ldr r3, [r4, #0] + 8012f08: 6922 ldr r2, [r4, #16] + 8012f0a: b2f6 uxtb r6, r6 + 8012f0c: 1a98 subs r0, r3, r2 + 8012f0e: 6963 ldr r3, [r4, #20] + 8012f10: 4637 mov r7, r6 + 8012f12: 4283 cmp r3, r0 + 8012f14: dc04 bgt.n 8012f20 <__swbuf_r+0x3a> + 8012f16: 4621 mov r1, r4 + 8012f18: 4628 mov r0, r5 + 8012f1a: f000 fd7f bl 8013a1c <_fflush_r> + 8012f1e: b9e0 cbnz r0, 8012f5a <__swbuf_r+0x74> + 8012f20: 68a3 ldr r3, [r4, #8] + 8012f22: 3b01 subs r3, #1 + 8012f24: 60a3 str r3, [r4, #8] + 8012f26: 6823 ldr r3, [r4, #0] + 8012f28: 1c5a adds r2, r3, #1 + 8012f2a: 6022 str r2, [r4, #0] + 8012f2c: 701e strb r6, [r3, #0] + 8012f2e: 6962 ldr r2, [r4, #20] + 8012f30: 1c43 adds r3, r0, #1 + 8012f32: 429a cmp r2, r3 + 8012f34: d004 beq.n 8012f40 <__swbuf_r+0x5a> + 8012f36: 89a3 ldrh r3, [r4, #12] + 8012f38: 07db lsls r3, r3, #31 + 8012f3a: d506 bpl.n 8012f4a <__swbuf_r+0x64> + 8012f3c: 2e0a cmp r6, #10 + 8012f3e: d104 bne.n 8012f4a <__swbuf_r+0x64> + 8012f40: 4621 mov r1, r4 + 8012f42: 4628 mov r0, r5 + 8012f44: f000 fd6a bl 8013a1c <_fflush_r> + 8012f48: b938 cbnz r0, 8012f5a <__swbuf_r+0x74> + 8012f4a: 4638 mov r0, r7 + 8012f4c: bdf8 pop {r3, r4, r5, r6, r7, pc} + 8012f4e: 4621 mov r1, r4 + 8012f50: 4628 mov r0, r5 + 8012f52: f000 f805 bl 8012f60 <__swsetup_r> + 8012f56: 2800 cmp r0, #0 + 8012f58: d0d5 beq.n 8012f06 <__swbuf_r+0x20> + 8012f5a: f04f 37ff mov.w r7, #4294967295 + 8012f5e: e7f4 b.n 8012f4a <__swbuf_r+0x64> + +08012f60 <__swsetup_r>: + 8012f60: b538 push {r3, r4, r5, lr} + 8012f62: 4b2a ldr r3, [pc, #168] ; (801300c <__swsetup_r+0xac>) + 8012f64: 4605 mov r5, r0 + 8012f66: 6818 ldr r0, [r3, #0] + 8012f68: 460c mov r4, r1 + 8012f6a: b118 cbz r0, 8012f74 <__swsetup_r+0x14> + 8012f6c: 6a03 ldr r3, [r0, #32] + 8012f6e: b90b cbnz r3, 8012f74 <__swsetup_r+0x14> + 8012f70: f7ff fed2 bl 8012d18 <__sinit> + 8012f74: 89a3 ldrh r3, [r4, #12] + 8012f76: f9b4 200c ldrsh.w r2, [r4, #12] + 8012f7a: 0718 lsls r0, r3, #28 + 8012f7c: d422 bmi.n 8012fc4 <__swsetup_r+0x64> + 8012f7e: 06d9 lsls r1, r3, #27 + 8012f80: d407 bmi.n 8012f92 <__swsetup_r+0x32> + 8012f82: 2309 movs r3, #9 + 8012f84: 602b str r3, [r5, #0] + 8012f86: f042 0340 orr.w r3, r2, #64 ; 0x40 + 8012f8a: f04f 30ff mov.w r0, #4294967295 + 8012f8e: 81a3 strh r3, [r4, #12] + 8012f90: e034 b.n 8012ffc <__swsetup_r+0x9c> + 8012f92: 0758 lsls r0, r3, #29 + 8012f94: d512 bpl.n 8012fbc <__swsetup_r+0x5c> + 8012f96: 6b61 ldr r1, [r4, #52] ; 0x34 + 8012f98: b141 cbz r1, 8012fac <__swsetup_r+0x4c> + 8012f9a: f104 0344 add.w r3, r4, #68 ; 0x44 + 8012f9e: 4299 cmp r1, r3 + 8012fa0: d002 beq.n 8012fa8 <__swsetup_r+0x48> + 8012fa2: 4628 mov r0, r5 + 8012fa4: f000 f8e6 bl 8013174 <_free_r> + 8012fa8: 2300 movs r3, #0 + 8012faa: 6363 str r3, [r4, #52] ; 0x34 + 8012fac: 89a3 ldrh r3, [r4, #12] + 8012fae: f023 0324 bic.w r3, r3, #36 ; 0x24 + 8012fb2: 81a3 strh r3, [r4, #12] + 8012fb4: 2300 movs r3, #0 + 8012fb6: 6063 str r3, [r4, #4] + 8012fb8: 6923 ldr r3, [r4, #16] + 8012fba: 6023 str r3, [r4, #0] + 8012fbc: 89a3 ldrh r3, [r4, #12] + 8012fbe: f043 0308 orr.w r3, r3, #8 + 8012fc2: 81a3 strh r3, [r4, #12] + 8012fc4: 6923 ldr r3, [r4, #16] + 8012fc6: b94b cbnz r3, 8012fdc <__swsetup_r+0x7c> + 8012fc8: 89a3 ldrh r3, [r4, #12] + 8012fca: f403 7320 and.w r3, r3, #640 ; 0x280 + 8012fce: f5b3 7f00 cmp.w r3, #512 ; 0x200 + 8012fd2: d003 beq.n 8012fdc <__swsetup_r+0x7c> + 8012fd4: 4621 mov r1, r4 + 8012fd6: 4628 mov r0, r5 + 8012fd8: f000 fd7f bl 8013ada <__smakebuf_r> + 8012fdc: 89a0 ldrh r0, [r4, #12] + 8012fde: f9b4 200c ldrsh.w r2, [r4, #12] + 8012fe2: f010 0301 ands.w r3, r0, #1 + 8012fe6: d00a beq.n 8012ffe <__swsetup_r+0x9e> + 8012fe8: 2300 movs r3, #0 + 8012fea: 60a3 str r3, [r4, #8] + 8012fec: 6963 ldr r3, [r4, #20] + 8012fee: 425b negs r3, r3 + 8012ff0: 61a3 str r3, [r4, #24] + 8012ff2: 6923 ldr r3, [r4, #16] + 8012ff4: b943 cbnz r3, 8013008 <__swsetup_r+0xa8> + 8012ff6: f010 0080 ands.w r0, r0, #128 ; 0x80 + 8012ffa: d1c4 bne.n 8012f86 <__swsetup_r+0x26> + 8012ffc: bd38 pop {r3, r4, r5, pc} + 8012ffe: 0781 lsls r1, r0, #30 + 8013000: bf58 it pl + 8013002: 6963 ldrpl r3, [r4, #20] + 8013004: 60a3 str r3, [r4, #8] + 8013006: e7f4 b.n 8012ff2 <__swsetup_r+0x92> + 8013008: 2000 movs r0, #0 + 801300a: e7f7 b.n 8012ffc <__swsetup_r+0x9c> + 801300c: 20000070 .word 0x20000070 + +08013010 : + 8013010: b510 push {r4, lr} + 8013012: 3901 subs r1, #1 + 8013014: 4402 add r2, r0 + 8013016: 4290 cmp r0, r2 + 8013018: d101 bne.n 801301e + 801301a: 2000 movs r0, #0 + 801301c: e005 b.n 801302a + 801301e: 7803 ldrb r3, [r0, #0] + 8013020: f811 4f01 ldrb.w r4, [r1, #1]! + 8013024: 42a3 cmp r3, r4 + 8013026: d001 beq.n 801302c + 8013028: 1b18 subs r0, r3, r4 + 801302a: bd10 pop {r4, pc} + 801302c: 3001 adds r0, #1 + 801302e: e7f2 b.n 8013016 + +08013030 : + 8013030: 4603 mov r3, r0 + 8013032: 4402 add r2, r0 + 8013034: 4293 cmp r3, r2 + 8013036: d100 bne.n 801303a + 8013038: 4770 bx lr + 801303a: f803 1b01 strb.w r1, [r3], #1 + 801303e: e7f9 b.n 8013034 + +08013040 <_close_r>: + 8013040: b538 push {r3, r4, r5, lr} + 8013042: 2300 movs r3, #0 + 8013044: 4d05 ldr r5, [pc, #20] ; (801305c <_close_r+0x1c>) + 8013046: 4604 mov r4, r0 + 8013048: 4608 mov r0, r1 + 801304a: 602b str r3, [r5, #0] + 801304c: f7ee f97b bl 8001346 <_close> + 8013050: 1c43 adds r3, r0, #1 + 8013052: d102 bne.n 801305a <_close_r+0x1a> + 8013054: 682b ldr r3, [r5, #0] + 8013056: b103 cbz r3, 801305a <_close_r+0x1a> + 8013058: 6023 str r3, [r4, #0] + 801305a: bd38 pop {r3, r4, r5, pc} + 801305c: 20007234 .word 0x20007234 + +08013060 <_lseek_r>: + 8013060: b538 push {r3, r4, r5, lr} + 8013062: 4604 mov r4, r0 + 8013064: 4608 mov r0, r1 + 8013066: 4611 mov r1, r2 + 8013068: 2200 movs r2, #0 + 801306a: 4d05 ldr r5, [pc, #20] ; (8013080 <_lseek_r+0x20>) + 801306c: 602a str r2, [r5, #0] + 801306e: 461a mov r2, r3 + 8013070: f7ee f98d bl 800138e <_lseek> + 8013074: 1c43 adds r3, r0, #1 + 8013076: d102 bne.n 801307e <_lseek_r+0x1e> + 8013078: 682b ldr r3, [r5, #0] + 801307a: b103 cbz r3, 801307e <_lseek_r+0x1e> + 801307c: 6023 str r3, [r4, #0] + 801307e: bd38 pop {r3, r4, r5, pc} + 8013080: 20007234 .word 0x20007234 + +08013084 <_read_r>: + 8013084: b538 push {r3, r4, r5, lr} + 8013086: 4604 mov r4, r0 + 8013088: 4608 mov r0, r1 + 801308a: 4611 mov r1, r2 + 801308c: 2200 movs r2, #0 + 801308e: 4d05 ldr r5, [pc, #20] ; (80130a4 <_read_r+0x20>) + 8013090: 602a str r2, [r5, #0] + 8013092: 461a mov r2, r3 + 8013094: f7ee f91e bl 80012d4 <_read> + 8013098: 1c43 adds r3, r0, #1 + 801309a: d102 bne.n 80130a2 <_read_r+0x1e> + 801309c: 682b ldr r3, [r5, #0] + 801309e: b103 cbz r3, 80130a2 <_read_r+0x1e> + 80130a0: 6023 str r3, [r4, #0] + 80130a2: bd38 pop {r3, r4, r5, pc} + 80130a4: 20007234 .word 0x20007234 + +080130a8 <_write_r>: + 80130a8: b538 push {r3, r4, r5, lr} + 80130aa: 4604 mov r4, r0 + 80130ac: 4608 mov r0, r1 + 80130ae: 4611 mov r1, r2 + 80130b0: 2200 movs r2, #0 + 80130b2: 4d05 ldr r5, [pc, #20] ; (80130c8 <_write_r+0x20>) + 80130b4: 602a str r2, [r5, #0] + 80130b6: 461a mov r2, r3 + 80130b8: f7ee f929 bl 800130e <_write> + 80130bc: 1c43 adds r3, r0, #1 + 80130be: d102 bne.n 80130c6 <_write_r+0x1e> + 80130c0: 682b ldr r3, [r5, #0] + 80130c2: b103 cbz r3, 80130c6 <_write_r+0x1e> + 80130c4: 6023 str r3, [r4, #0] + 80130c6: bd38 pop {r3, r4, r5, pc} + 80130c8: 20007234 .word 0x20007234 + +080130cc <__libc_init_array>: + 80130cc: b570 push {r4, r5, r6, lr} + 80130ce: 2600 movs r6, #0 + 80130d0: 4d0c ldr r5, [pc, #48] ; (8013104 <__libc_init_array+0x38>) + 80130d2: 4c0d ldr r4, [pc, #52] ; (8013108 <__libc_init_array+0x3c>) + 80130d4: 1b64 subs r4, r4, r5 + 80130d6: 10a4 asrs r4, r4, #2 + 80130d8: 42a6 cmp r6, r4 + 80130da: d109 bne.n 80130f0 <__libc_init_array+0x24> + 80130dc: f000 fdc6 bl 8013c6c <_init> + 80130e0: 2600 movs r6, #0 + 80130e2: 4d0a ldr r5, [pc, #40] ; (801310c <__libc_init_array+0x40>) + 80130e4: 4c0a ldr r4, [pc, #40] ; (8013110 <__libc_init_array+0x44>) + 80130e6: 1b64 subs r4, r4, r5 + 80130e8: 10a4 asrs r4, r4, #2 + 80130ea: 42a6 cmp r6, r4 + 80130ec: d105 bne.n 80130fa <__libc_init_array+0x2e> + 80130ee: bd70 pop {r4, r5, r6, pc} + 80130f0: f855 3b04 ldr.w r3, [r5], #4 + 80130f4: 4798 blx r3 + 80130f6: 3601 adds r6, #1 + 80130f8: e7ee b.n 80130d8 <__libc_init_array+0xc> + 80130fa: f855 3b04 ldr.w r3, [r5], #4 + 80130fe: 4798 blx r3 + 8013100: 3601 adds r6, #1 + 8013102: e7f2 b.n 80130ea <__libc_init_array+0x1e> + 8013104: 08016864 .word 0x08016864 + 8013108: 08016864 .word 0x08016864 + 801310c: 08016864 .word 0x08016864 + 8013110: 08016868 .word 0x08016868 + +08013114 <__retarget_lock_init_recursive>: + 8013114: 4770 bx lr + +08013116 <__retarget_lock_acquire_recursive>: + 8013116: 4770 bx lr + +08013118 <__retarget_lock_release_recursive>: + 8013118: 4770 bx lr + +0801311a : + 801311a: 440a add r2, r1 + 801311c: 4291 cmp r1, r2 + 801311e: f100 33ff add.w r3, r0, #4294967295 + 8013122: d100 bne.n 8013126 + 8013124: 4770 bx lr + 8013126: b510 push {r4, lr} + 8013128: f811 4b01 ldrb.w r4, [r1], #1 + 801312c: 4291 cmp r1, r2 + 801312e: f803 4f01 strb.w r4, [r3, #1]! + 8013132: d1f9 bne.n 8013128 + 8013134: bd10 pop {r4, pc} + ... + +08013138 <__assert_func>: + 8013138: b51f push {r0, r1, r2, r3, r4, lr} + 801313a: 4614 mov r4, r2 + 801313c: 461a mov r2, r3 + 801313e: 4b09 ldr r3, [pc, #36] ; (8013164 <__assert_func+0x2c>) + 8013140: 4605 mov r5, r0 + 8013142: 681b ldr r3, [r3, #0] + 8013144: 68d8 ldr r0, [r3, #12] + 8013146: b14c cbz r4, 801315c <__assert_func+0x24> + 8013148: 4b07 ldr r3, [pc, #28] ; (8013168 <__assert_func+0x30>) + 801314a: e9cd 3401 strd r3, r4, [sp, #4] + 801314e: 9100 str r1, [sp, #0] + 8013150: 462b mov r3, r5 + 8013152: 4906 ldr r1, [pc, #24] ; (801316c <__assert_func+0x34>) + 8013154: f000 fc8a bl 8013a6c + 8013158: f000 fd3c bl 8013bd4 + 801315c: 4b04 ldr r3, [pc, #16] ; (8013170 <__assert_func+0x38>) + 801315e: 461c mov r4, r3 + 8013160: e7f3 b.n 801314a <__assert_func+0x12> + 8013162: bf00 nop + 8013164: 20000070 .word 0x20000070 + 8013168: 080167ed .word 0x080167ed + 801316c: 080167fa .word 0x080167fa + 8013170: 08016828 .word 0x08016828 + +08013174 <_free_r>: + 8013174: b538 push {r3, r4, r5, lr} + 8013176: 4605 mov r5, r0 + 8013178: 2900 cmp r1, #0 + 801317a: d040 beq.n 80131fe <_free_r+0x8a> + 801317c: f851 3c04 ldr.w r3, [r1, #-4] + 8013180: 1f0c subs r4, r1, #4 + 8013182: 2b00 cmp r3, #0 + 8013184: bfb8 it lt + 8013186: 18e4 addlt r4, r4, r3 + 8013188: f000 f8e4 bl 8013354 <__malloc_lock> + 801318c: 4a1c ldr r2, [pc, #112] ; (8013200 <_free_r+0x8c>) + 801318e: 6813 ldr r3, [r2, #0] + 8013190: b933 cbnz r3, 80131a0 <_free_r+0x2c> + 8013192: 6063 str r3, [r4, #4] + 8013194: 6014 str r4, [r2, #0] + 8013196: 4628 mov r0, r5 + 8013198: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} + 801319c: f000 b8e0 b.w 8013360 <__malloc_unlock> + 80131a0: 42a3 cmp r3, r4 + 80131a2: d908 bls.n 80131b6 <_free_r+0x42> + 80131a4: 6820 ldr r0, [r4, #0] + 80131a6: 1821 adds r1, r4, r0 + 80131a8: 428b cmp r3, r1 + 80131aa: bf01 itttt eq + 80131ac: 6819 ldreq r1, [r3, #0] + 80131ae: 685b ldreq r3, [r3, #4] + 80131b0: 1809 addeq r1, r1, r0 + 80131b2: 6021 streq r1, [r4, #0] + 80131b4: e7ed b.n 8013192 <_free_r+0x1e> + 80131b6: 461a mov r2, r3 + 80131b8: 685b ldr r3, [r3, #4] + 80131ba: b10b cbz r3, 80131c0 <_free_r+0x4c> + 80131bc: 42a3 cmp r3, r4 + 80131be: d9fa bls.n 80131b6 <_free_r+0x42> + 80131c0: 6811 ldr r1, [r2, #0] + 80131c2: 1850 adds r0, r2, r1 + 80131c4: 42a0 cmp r0, r4 + 80131c6: d10b bne.n 80131e0 <_free_r+0x6c> + 80131c8: 6820 ldr r0, [r4, #0] + 80131ca: 4401 add r1, r0 + 80131cc: 1850 adds r0, r2, r1 + 80131ce: 4283 cmp r3, r0 + 80131d0: 6011 str r1, [r2, #0] + 80131d2: d1e0 bne.n 8013196 <_free_r+0x22> + 80131d4: 6818 ldr r0, [r3, #0] + 80131d6: 685b ldr r3, [r3, #4] + 80131d8: 4408 add r0, r1 + 80131da: 6010 str r0, [r2, #0] + 80131dc: 6053 str r3, [r2, #4] + 80131de: e7da b.n 8013196 <_free_r+0x22> + 80131e0: d902 bls.n 80131e8 <_free_r+0x74> + 80131e2: 230c movs r3, #12 + 80131e4: 602b str r3, [r5, #0] + 80131e6: e7d6 b.n 8013196 <_free_r+0x22> + 80131e8: 6820 ldr r0, [r4, #0] + 80131ea: 1821 adds r1, r4, r0 + 80131ec: 428b cmp r3, r1 + 80131ee: bf01 itttt eq + 80131f0: 6819 ldreq r1, [r3, #0] + 80131f2: 685b ldreq r3, [r3, #4] + 80131f4: 1809 addeq r1, r1, r0 + 80131f6: 6021 streq r1, [r4, #0] + 80131f8: 6063 str r3, [r4, #4] + 80131fa: 6054 str r4, [r2, #4] + 80131fc: e7cb b.n 8013196 <_free_r+0x22> + 80131fe: bd38 pop {r3, r4, r5, pc} + 8013200: 2000723c .word 0x2000723c + +08013204 : + 8013204: 4b02 ldr r3, [pc, #8] ; (8013210 ) + 8013206: 4601 mov r1, r0 + 8013208: 6818 ldr r0, [r3, #0] + 801320a: f000 b823 b.w 8013254 <_malloc_r> + 801320e: bf00 nop + 8013210: 20000070 .word 0x20000070 + +08013214 : + 8013214: b570 push {r4, r5, r6, lr} + 8013216: 4e0e ldr r6, [pc, #56] ; (8013250 ) + 8013218: 460c mov r4, r1 + 801321a: 6831 ldr r1, [r6, #0] + 801321c: 4605 mov r5, r0 + 801321e: b911 cbnz r1, 8013226 + 8013220: f000 fcba bl 8013b98 <_sbrk_r> + 8013224: 6030 str r0, [r6, #0] + 8013226: 4621 mov r1, r4 + 8013228: 4628 mov r0, r5 + 801322a: f000 fcb5 bl 8013b98 <_sbrk_r> + 801322e: 1c43 adds r3, r0, #1 + 8013230: d00a beq.n 8013248 + 8013232: 1cc4 adds r4, r0, #3 + 8013234: f024 0403 bic.w r4, r4, #3 + 8013238: 42a0 cmp r0, r4 + 801323a: d007 beq.n 801324c + 801323c: 1a21 subs r1, r4, r0 + 801323e: 4628 mov r0, r5 + 8013240: f000 fcaa bl 8013b98 <_sbrk_r> + 8013244: 3001 adds r0, #1 + 8013246: d101 bne.n 801324c + 8013248: f04f 34ff mov.w r4, #4294967295 + 801324c: 4620 mov r0, r4 + 801324e: bd70 pop {r4, r5, r6, pc} + 8013250: 20007240 .word 0x20007240 + +08013254 <_malloc_r>: + 8013254: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} + 8013258: 1ccd adds r5, r1, #3 + 801325a: f025 0503 bic.w r5, r5, #3 + 801325e: 3508 adds r5, #8 + 8013260: 2d0c cmp r5, #12 + 8013262: bf38 it cc + 8013264: 250c movcc r5, #12 + 8013266: 2d00 cmp r5, #0 + 8013268: 4607 mov r7, r0 + 801326a: db01 blt.n 8013270 <_malloc_r+0x1c> + 801326c: 42a9 cmp r1, r5 + 801326e: d905 bls.n 801327c <_malloc_r+0x28> + 8013270: 230c movs r3, #12 + 8013272: 2600 movs r6, #0 + 8013274: 603b str r3, [r7, #0] + 8013276: 4630 mov r0, r6 + 8013278: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} + 801327c: f8df 80d0 ldr.w r8, [pc, #208] ; 8013350 <_malloc_r+0xfc> + 8013280: f000 f868 bl 8013354 <__malloc_lock> + 8013284: f8d8 3000 ldr.w r3, [r8] + 8013288: 461c mov r4, r3 + 801328a: bb5c cbnz r4, 80132e4 <_malloc_r+0x90> + 801328c: 4629 mov r1, r5 + 801328e: 4638 mov r0, r7 + 8013290: f7ff ffc0 bl 8013214 + 8013294: 1c43 adds r3, r0, #1 + 8013296: 4604 mov r4, r0 + 8013298: d155 bne.n 8013346 <_malloc_r+0xf2> + 801329a: f8d8 4000 ldr.w r4, [r8] + 801329e: 4626 mov r6, r4 + 80132a0: 2e00 cmp r6, #0 + 80132a2: d145 bne.n 8013330 <_malloc_r+0xdc> + 80132a4: 2c00 cmp r4, #0 + 80132a6: d048 beq.n 801333a <_malloc_r+0xe6> + 80132a8: 6823 ldr r3, [r4, #0] + 80132aa: 4631 mov r1, r6 + 80132ac: 4638 mov r0, r7 + 80132ae: eb04 0903 add.w r9, r4, r3 + 80132b2: f000 fc71 bl 8013b98 <_sbrk_r> + 80132b6: 4581 cmp r9, r0 + 80132b8: d13f bne.n 801333a <_malloc_r+0xe6> + 80132ba: 6821 ldr r1, [r4, #0] + 80132bc: 4638 mov r0, r7 + 80132be: 1a6d subs r5, r5, r1 + 80132c0: 4629 mov r1, r5 + 80132c2: f7ff ffa7 bl 8013214 + 80132c6: 3001 adds r0, #1 + 80132c8: d037 beq.n 801333a <_malloc_r+0xe6> + 80132ca: 6823 ldr r3, [r4, #0] + 80132cc: 442b add r3, r5 + 80132ce: 6023 str r3, [r4, #0] + 80132d0: f8d8 3000 ldr.w r3, [r8] + 80132d4: 2b00 cmp r3, #0 + 80132d6: d038 beq.n 801334a <_malloc_r+0xf6> + 80132d8: 685a ldr r2, [r3, #4] + 80132da: 42a2 cmp r2, r4 + 80132dc: d12b bne.n 8013336 <_malloc_r+0xe2> + 80132de: 2200 movs r2, #0 + 80132e0: 605a str r2, [r3, #4] + 80132e2: e00f b.n 8013304 <_malloc_r+0xb0> + 80132e4: 6822 ldr r2, [r4, #0] + 80132e6: 1b52 subs r2, r2, r5 + 80132e8: d41f bmi.n 801332a <_malloc_r+0xd6> + 80132ea: 2a0b cmp r2, #11 + 80132ec: d917 bls.n 801331e <_malloc_r+0xca> + 80132ee: 1961 adds r1, r4, r5 + 80132f0: 42a3 cmp r3, r4 + 80132f2: 6025 str r5, [r4, #0] + 80132f4: bf18 it ne + 80132f6: 6059 strne r1, [r3, #4] + 80132f8: 6863 ldr r3, [r4, #4] + 80132fa: bf08 it eq + 80132fc: f8c8 1000 streq.w r1, [r8] + 8013300: 5162 str r2, [r4, r5] + 8013302: 604b str r3, [r1, #4] + 8013304: 4638 mov r0, r7 + 8013306: f104 060b add.w r6, r4, #11 + 801330a: f000 f829 bl 8013360 <__malloc_unlock> + 801330e: f026 0607 bic.w r6, r6, #7 + 8013312: 1d23 adds r3, r4, #4 + 8013314: 1af2 subs r2, r6, r3 + 8013316: d0ae beq.n 8013276 <_malloc_r+0x22> + 8013318: 1b9b subs r3, r3, r6 + 801331a: 50a3 str r3, [r4, r2] + 801331c: e7ab b.n 8013276 <_malloc_r+0x22> + 801331e: 42a3 cmp r3, r4 + 8013320: 6862 ldr r2, [r4, #4] + 8013322: d1dd bne.n 80132e0 <_malloc_r+0x8c> + 8013324: f8c8 2000 str.w r2, [r8] + 8013328: e7ec b.n 8013304 <_malloc_r+0xb0> + 801332a: 4623 mov r3, r4 + 801332c: 6864 ldr r4, [r4, #4] + 801332e: e7ac b.n 801328a <_malloc_r+0x36> + 8013330: 4634 mov r4, r6 + 8013332: 6876 ldr r6, [r6, #4] + 8013334: e7b4 b.n 80132a0 <_malloc_r+0x4c> + 8013336: 4613 mov r3, r2 + 8013338: e7cc b.n 80132d4 <_malloc_r+0x80> + 801333a: 230c movs r3, #12 + 801333c: 4638 mov r0, r7 + 801333e: 603b str r3, [r7, #0] + 8013340: f000 f80e bl 8013360 <__malloc_unlock> + 8013344: e797 b.n 8013276 <_malloc_r+0x22> + 8013346: 6025 str r5, [r4, #0] + 8013348: e7dc b.n 8013304 <_malloc_r+0xb0> + 801334a: 605b str r3, [r3, #4] + 801334c: deff udf #255 ; 0xff + 801334e: bf00 nop + 8013350: 2000723c .word 0x2000723c + +08013354 <__malloc_lock>: + 8013354: 4801 ldr r0, [pc, #4] ; (801335c <__malloc_lock+0x8>) + 8013356: f7ff bede b.w 8013116 <__retarget_lock_acquire_recursive> + 801335a: bf00 nop + 801335c: 20007238 .word 0x20007238 + +08013360 <__malloc_unlock>: + 8013360: 4801 ldr r0, [pc, #4] ; (8013368 <__malloc_unlock+0x8>) + 8013362: f7ff bed9 b.w 8013118 <__retarget_lock_release_recursive> + 8013366: bf00 nop + 8013368: 20007238 .word 0x20007238 + +0801336c <__sfputc_r>: + 801336c: 6893 ldr r3, [r2, #8] + 801336e: b410 push {r4} + 8013370: 3b01 subs r3, #1 + 8013372: 2b00 cmp r3, #0 + 8013374: 6093 str r3, [r2, #8] + 8013376: da07 bge.n 8013388 <__sfputc_r+0x1c> + 8013378: 6994 ldr r4, [r2, #24] + 801337a: 42a3 cmp r3, r4 + 801337c: db01 blt.n 8013382 <__sfputc_r+0x16> + 801337e: 290a cmp r1, #10 + 8013380: d102 bne.n 8013388 <__sfputc_r+0x1c> + 8013382: bc10 pop {r4} + 8013384: f7ff bdaf b.w 8012ee6 <__swbuf_r> + 8013388: 6813 ldr r3, [r2, #0] + 801338a: 1c58 adds r0, r3, #1 + 801338c: 6010 str r0, [r2, #0] + 801338e: 7019 strb r1, [r3, #0] + 8013390: 4608 mov r0, r1 + 8013392: bc10 pop {r4} + 8013394: 4770 bx lr + +08013396 <__sfputs_r>: + 8013396: b5f8 push {r3, r4, r5, r6, r7, lr} + 8013398: 4606 mov r6, r0 + 801339a: 460f mov r7, r1 + 801339c: 4614 mov r4, r2 + 801339e: 18d5 adds r5, r2, r3 + 80133a0: 42ac cmp r4, r5 + 80133a2: d101 bne.n 80133a8 <__sfputs_r+0x12> + 80133a4: 2000 movs r0, #0 + 80133a6: e007 b.n 80133b8 <__sfputs_r+0x22> + 80133a8: 463a mov r2, r7 + 80133aa: 4630 mov r0, r6 + 80133ac: f814 1b01 ldrb.w r1, [r4], #1 + 80133b0: f7ff ffdc bl 801336c <__sfputc_r> + 80133b4: 1c43 adds r3, r0, #1 + 80133b6: d1f3 bne.n 80133a0 <__sfputs_r+0xa> + 80133b8: bdf8 pop {r3, r4, r5, r6, r7, pc} + ... + +080133bc <_vfiprintf_r>: + 80133bc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} + 80133c0: 460d mov r5, r1 + 80133c2: 4614 mov r4, r2 + 80133c4: 4698 mov r8, r3 + 80133c6: 4606 mov r6, r0 + 80133c8: b09d sub sp, #116 ; 0x74 + 80133ca: b118 cbz r0, 80133d4 <_vfiprintf_r+0x18> + 80133cc: 6a03 ldr r3, [r0, #32] + 80133ce: b90b cbnz r3, 80133d4 <_vfiprintf_r+0x18> + 80133d0: f7ff fca2 bl 8012d18 <__sinit> + 80133d4: 6e6b ldr r3, [r5, #100] ; 0x64 + 80133d6: 07d9 lsls r1, r3, #31 + 80133d8: d405 bmi.n 80133e6 <_vfiprintf_r+0x2a> + 80133da: 89ab ldrh r3, [r5, #12] + 80133dc: 059a lsls r2, r3, #22 + 80133de: d402 bmi.n 80133e6 <_vfiprintf_r+0x2a> + 80133e0: 6da8 ldr r0, [r5, #88] ; 0x58 + 80133e2: f7ff fe98 bl 8013116 <__retarget_lock_acquire_recursive> + 80133e6: 89ab ldrh r3, [r5, #12] + 80133e8: 071b lsls r3, r3, #28 + 80133ea: d501 bpl.n 80133f0 <_vfiprintf_r+0x34> + 80133ec: 692b ldr r3, [r5, #16] + 80133ee: b99b cbnz r3, 8013418 <_vfiprintf_r+0x5c> + 80133f0: 4629 mov r1, r5 + 80133f2: 4630 mov r0, r6 + 80133f4: f7ff fdb4 bl 8012f60 <__swsetup_r> + 80133f8: b170 cbz r0, 8013418 <_vfiprintf_r+0x5c> + 80133fa: 6e6b ldr r3, [r5, #100] ; 0x64 + 80133fc: 07dc lsls r4, r3, #31 + 80133fe: d504 bpl.n 801340a <_vfiprintf_r+0x4e> + 8013400: f04f 30ff mov.w r0, #4294967295 + 8013404: b01d add sp, #116 ; 0x74 + 8013406: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} + 801340a: 89ab ldrh r3, [r5, #12] + 801340c: 0598 lsls r0, r3, #22 + 801340e: d4f7 bmi.n 8013400 <_vfiprintf_r+0x44> + 8013410: 6da8 ldr r0, [r5, #88] ; 0x58 + 8013412: f7ff fe81 bl 8013118 <__retarget_lock_release_recursive> + 8013416: e7f3 b.n 8013400 <_vfiprintf_r+0x44> + 8013418: 2300 movs r3, #0 + 801341a: 9309 str r3, [sp, #36] ; 0x24 + 801341c: 2320 movs r3, #32 + 801341e: f88d 3029 strb.w r3, [sp, #41] ; 0x29 + 8013422: 2330 movs r3, #48 ; 0x30 + 8013424: f04f 0901 mov.w r9, #1 + 8013428: f8cd 800c str.w r8, [sp, #12] + 801342c: f8df 81ac ldr.w r8, [pc, #428] ; 80135dc <_vfiprintf_r+0x220> + 8013430: f88d 302a strb.w r3, [sp, #42] ; 0x2a + 8013434: 4623 mov r3, r4 + 8013436: 469a mov sl, r3 + 8013438: f813 2b01 ldrb.w r2, [r3], #1 + 801343c: b10a cbz r2, 8013442 <_vfiprintf_r+0x86> + 801343e: 2a25 cmp r2, #37 ; 0x25 + 8013440: d1f9 bne.n 8013436 <_vfiprintf_r+0x7a> + 8013442: ebba 0b04 subs.w fp, sl, r4 + 8013446: d00b beq.n 8013460 <_vfiprintf_r+0xa4> + 8013448: 465b mov r3, fp + 801344a: 4622 mov r2, r4 + 801344c: 4629 mov r1, r5 + 801344e: 4630 mov r0, r6 + 8013450: f7ff ffa1 bl 8013396 <__sfputs_r> + 8013454: 3001 adds r0, #1 + 8013456: f000 80a9 beq.w 80135ac <_vfiprintf_r+0x1f0> + 801345a: 9a09 ldr r2, [sp, #36] ; 0x24 + 801345c: 445a add r2, fp + 801345e: 9209 str r2, [sp, #36] ; 0x24 + 8013460: f89a 3000 ldrb.w r3, [sl] + 8013464: 2b00 cmp r3, #0 + 8013466: f000 80a1 beq.w 80135ac <_vfiprintf_r+0x1f0> + 801346a: 2300 movs r3, #0 + 801346c: f04f 32ff mov.w r2, #4294967295 + 8013470: e9cd 2305 strd r2, r3, [sp, #20] + 8013474: f10a 0a01 add.w sl, sl, #1 + 8013478: 9304 str r3, [sp, #16] + 801347a: 9307 str r3, [sp, #28] + 801347c: f88d 3053 strb.w r3, [sp, #83] ; 0x53 + 8013480: 931a str r3, [sp, #104] ; 0x68 + 8013482: 4654 mov r4, sl + 8013484: 2205 movs r2, #5 + 8013486: f814 1b01 ldrb.w r1, [r4], #1 + 801348a: 4854 ldr r0, [pc, #336] ; (80135dc <_vfiprintf_r+0x220>) + 801348c: f000 fb94 bl 8013bb8 + 8013490: 9a04 ldr r2, [sp, #16] + 8013492: b9d8 cbnz r0, 80134cc <_vfiprintf_r+0x110> + 8013494: 06d1 lsls r1, r2, #27 + 8013496: bf44 itt mi + 8013498: 2320 movmi r3, #32 + 801349a: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53 + 801349e: 0713 lsls r3, r2, #28 + 80134a0: bf44 itt mi + 80134a2: 232b movmi r3, #43 ; 0x2b + 80134a4: f88d 3053 strbmi.w r3, [sp, #83] ; 0x53 + 80134a8: f89a 3000 ldrb.w r3, [sl] + 80134ac: 2b2a cmp r3, #42 ; 0x2a + 80134ae: d015 beq.n 80134dc <_vfiprintf_r+0x120> + 80134b0: 4654 mov r4, sl + 80134b2: 2000 movs r0, #0 + 80134b4: f04f 0c0a mov.w ip, #10 + 80134b8: 9a07 ldr r2, [sp, #28] + 80134ba: 4621 mov r1, r4 + 80134bc: f811 3b01 ldrb.w r3, [r1], #1 + 80134c0: 3b30 subs r3, #48 ; 0x30 + 80134c2: 2b09 cmp r3, #9 + 80134c4: d94d bls.n 8013562 <_vfiprintf_r+0x1a6> + 80134c6: b1b0 cbz r0, 80134f6 <_vfiprintf_r+0x13a> + 80134c8: 9207 str r2, [sp, #28] + 80134ca: e014 b.n 80134f6 <_vfiprintf_r+0x13a> + 80134cc: eba0 0308 sub.w r3, r0, r8 + 80134d0: fa09 f303 lsl.w r3, r9, r3 + 80134d4: 4313 orrs r3, r2 + 80134d6: 46a2 mov sl, r4 + 80134d8: 9304 str r3, [sp, #16] + 80134da: e7d2 b.n 8013482 <_vfiprintf_r+0xc6> + 80134dc: 9b03 ldr r3, [sp, #12] + 80134de: 1d19 adds r1, r3, #4 + 80134e0: 681b ldr r3, [r3, #0] + 80134e2: 9103 str r1, [sp, #12] + 80134e4: 2b00 cmp r3, #0 + 80134e6: bfbb ittet lt + 80134e8: 425b neglt r3, r3 + 80134ea: f042 0202 orrlt.w r2, r2, #2 + 80134ee: 9307 strge r3, [sp, #28] + 80134f0: 9307 strlt r3, [sp, #28] + 80134f2: bfb8 it lt + 80134f4: 9204 strlt r2, [sp, #16] + 80134f6: 7823 ldrb r3, [r4, #0] + 80134f8: 2b2e cmp r3, #46 ; 0x2e + 80134fa: d10c bne.n 8013516 <_vfiprintf_r+0x15a> + 80134fc: 7863 ldrb r3, [r4, #1] + 80134fe: 2b2a cmp r3, #42 ; 0x2a + 8013500: d134 bne.n 801356c <_vfiprintf_r+0x1b0> + 8013502: 9b03 ldr r3, [sp, #12] + 8013504: 3402 adds r4, #2 + 8013506: 1d1a adds r2, r3, #4 + 8013508: 681b ldr r3, [r3, #0] + 801350a: 9203 str r2, [sp, #12] + 801350c: 2b00 cmp r3, #0 + 801350e: bfb8 it lt + 8013510: f04f 33ff movlt.w r3, #4294967295 + 8013514: 9305 str r3, [sp, #20] + 8013516: f8df a0c8 ldr.w sl, [pc, #200] ; 80135e0 <_vfiprintf_r+0x224> + 801351a: 2203 movs r2, #3 + 801351c: 4650 mov r0, sl + 801351e: 7821 ldrb r1, [r4, #0] + 8013520: f000 fb4a bl 8013bb8 + 8013524: b138 cbz r0, 8013536 <_vfiprintf_r+0x17a> + 8013526: 2240 movs r2, #64 ; 0x40 + 8013528: 9b04 ldr r3, [sp, #16] + 801352a: eba0 000a sub.w r0, r0, sl + 801352e: 4082 lsls r2, r0 + 8013530: 4313 orrs r3, r2 + 8013532: 3401 adds r4, #1 + 8013534: 9304 str r3, [sp, #16] + 8013536: f814 1b01 ldrb.w r1, [r4], #1 + 801353a: 2206 movs r2, #6 + 801353c: 4829 ldr r0, [pc, #164] ; (80135e4 <_vfiprintf_r+0x228>) + 801353e: f88d 1028 strb.w r1, [sp, #40] ; 0x28 + 8013542: f000 fb39 bl 8013bb8 + 8013546: 2800 cmp r0, #0 + 8013548: d03f beq.n 80135ca <_vfiprintf_r+0x20e> + 801354a: 4b27 ldr r3, [pc, #156] ; (80135e8 <_vfiprintf_r+0x22c>) + 801354c: bb1b cbnz r3, 8013596 <_vfiprintf_r+0x1da> + 801354e: 9b03 ldr r3, [sp, #12] + 8013550: 3307 adds r3, #7 + 8013552: f023 0307 bic.w r3, r3, #7 + 8013556: 3308 adds r3, #8 + 8013558: 9303 str r3, [sp, #12] + 801355a: 9b09 ldr r3, [sp, #36] ; 0x24 + 801355c: 443b add r3, r7 + 801355e: 9309 str r3, [sp, #36] ; 0x24 + 8013560: e768 b.n 8013434 <_vfiprintf_r+0x78> + 8013562: 460c mov r4, r1 + 8013564: 2001 movs r0, #1 + 8013566: fb0c 3202 mla r2, ip, r2, r3 + 801356a: e7a6 b.n 80134ba <_vfiprintf_r+0xfe> + 801356c: 2300 movs r3, #0 + 801356e: f04f 0c0a mov.w ip, #10 + 8013572: 4619 mov r1, r3 + 8013574: 3401 adds r4, #1 + 8013576: 9305 str r3, [sp, #20] + 8013578: 4620 mov r0, r4 + 801357a: f810 2b01 ldrb.w r2, [r0], #1 + 801357e: 3a30 subs r2, #48 ; 0x30 + 8013580: 2a09 cmp r2, #9 + 8013582: d903 bls.n 801358c <_vfiprintf_r+0x1d0> + 8013584: 2b00 cmp r3, #0 + 8013586: d0c6 beq.n 8013516 <_vfiprintf_r+0x15a> + 8013588: 9105 str r1, [sp, #20] + 801358a: e7c4 b.n 8013516 <_vfiprintf_r+0x15a> + 801358c: 4604 mov r4, r0 + 801358e: 2301 movs r3, #1 + 8013590: fb0c 2101 mla r1, ip, r1, r2 + 8013594: e7f0 b.n 8013578 <_vfiprintf_r+0x1bc> + 8013596: ab03 add r3, sp, #12 + 8013598: 9300 str r3, [sp, #0] + 801359a: 462a mov r2, r5 + 801359c: 4630 mov r0, r6 + 801359e: 4b13 ldr r3, [pc, #76] ; (80135ec <_vfiprintf_r+0x230>) + 80135a0: a904 add r1, sp, #16 + 80135a2: f3af 8000 nop.w + 80135a6: 4607 mov r7, r0 + 80135a8: 1c78 adds r0, r7, #1 + 80135aa: d1d6 bne.n 801355a <_vfiprintf_r+0x19e> + 80135ac: 6e6b ldr r3, [r5, #100] ; 0x64 + 80135ae: 07d9 lsls r1, r3, #31 + 80135b0: d405 bmi.n 80135be <_vfiprintf_r+0x202> + 80135b2: 89ab ldrh r3, [r5, #12] + 80135b4: 059a lsls r2, r3, #22 + 80135b6: d402 bmi.n 80135be <_vfiprintf_r+0x202> + 80135b8: 6da8 ldr r0, [r5, #88] ; 0x58 + 80135ba: f7ff fdad bl 8013118 <__retarget_lock_release_recursive> + 80135be: 89ab ldrh r3, [r5, #12] + 80135c0: 065b lsls r3, r3, #25 + 80135c2: f53f af1d bmi.w 8013400 <_vfiprintf_r+0x44> + 80135c6: 9809 ldr r0, [sp, #36] ; 0x24 + 80135c8: e71c b.n 8013404 <_vfiprintf_r+0x48> + 80135ca: ab03 add r3, sp, #12 + 80135cc: 9300 str r3, [sp, #0] + 80135ce: 462a mov r2, r5 + 80135d0: 4630 mov r0, r6 + 80135d2: 4b06 ldr r3, [pc, #24] ; (80135ec <_vfiprintf_r+0x230>) + 80135d4: a904 add r1, sp, #16 + 80135d6: f000 f87d bl 80136d4 <_printf_i> + 80135da: e7e4 b.n 80135a6 <_vfiprintf_r+0x1ea> + 80135dc: 08016829 .word 0x08016829 + 80135e0: 0801682f .word 0x0801682f + 80135e4: 08016833 .word 0x08016833 + 80135e8: 00000000 .word 0x00000000 + 80135ec: 08013397 .word 0x08013397 + +080135f0 <_printf_common>: + 80135f0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 80135f4: 4616 mov r6, r2 + 80135f6: 4699 mov r9, r3 + 80135f8: 688a ldr r2, [r1, #8] + 80135fa: 690b ldr r3, [r1, #16] + 80135fc: 4607 mov r7, r0 + 80135fe: 4293 cmp r3, r2 + 8013600: bfb8 it lt + 8013602: 4613 movlt r3, r2 + 8013604: 6033 str r3, [r6, #0] + 8013606: f891 2043 ldrb.w r2, [r1, #67] ; 0x43 + 801360a: 460c mov r4, r1 + 801360c: f8dd 8020 ldr.w r8, [sp, #32] + 8013610: b10a cbz r2, 8013616 <_printf_common+0x26> + 8013612: 3301 adds r3, #1 + 8013614: 6033 str r3, [r6, #0] + 8013616: 6823 ldr r3, [r4, #0] + 8013618: 0699 lsls r1, r3, #26 + 801361a: bf42 ittt mi + 801361c: 6833 ldrmi r3, [r6, #0] + 801361e: 3302 addmi r3, #2 + 8013620: 6033 strmi r3, [r6, #0] + 8013622: 6825 ldr r5, [r4, #0] + 8013624: f015 0506 ands.w r5, r5, #6 + 8013628: d106 bne.n 8013638 <_printf_common+0x48> + 801362a: f104 0a19 add.w sl, r4, #25 + 801362e: 68e3 ldr r3, [r4, #12] + 8013630: 6832 ldr r2, [r6, #0] + 8013632: 1a9b subs r3, r3, r2 + 8013634: 42ab cmp r3, r5 + 8013636: dc2b bgt.n 8013690 <_printf_common+0xa0> + 8013638: f894 2043 ldrb.w r2, [r4, #67] ; 0x43 + 801363c: 1e13 subs r3, r2, #0 + 801363e: 6822 ldr r2, [r4, #0] + 8013640: bf18 it ne + 8013642: 2301 movne r3, #1 + 8013644: 0692 lsls r2, r2, #26 + 8013646: d430 bmi.n 80136aa <_printf_common+0xba> + 8013648: 4649 mov r1, r9 + 801364a: 4638 mov r0, r7 + 801364c: f104 0243 add.w r2, r4, #67 ; 0x43 + 8013650: 47c0 blx r8 + 8013652: 3001 adds r0, #1 + 8013654: d023 beq.n 801369e <_printf_common+0xae> + 8013656: 6823 ldr r3, [r4, #0] + 8013658: 6922 ldr r2, [r4, #16] + 801365a: f003 0306 and.w r3, r3, #6 + 801365e: 2b04 cmp r3, #4 + 8013660: bf14 ite ne + 8013662: 2500 movne r5, #0 + 8013664: 6833 ldreq r3, [r6, #0] + 8013666: f04f 0600 mov.w r6, #0 + 801366a: bf08 it eq + 801366c: 68e5 ldreq r5, [r4, #12] + 801366e: f104 041a add.w r4, r4, #26 + 8013672: bf08 it eq + 8013674: 1aed subeq r5, r5, r3 + 8013676: f854 3c12 ldr.w r3, [r4, #-18] + 801367a: bf08 it eq + 801367c: ea25 75e5 biceq.w r5, r5, r5, asr #31 + 8013680: 4293 cmp r3, r2 + 8013682: bfc4 itt gt + 8013684: 1a9b subgt r3, r3, r2 + 8013686: 18ed addgt r5, r5, r3 + 8013688: 42b5 cmp r5, r6 + 801368a: d11a bne.n 80136c2 <_printf_common+0xd2> + 801368c: 2000 movs r0, #0 + 801368e: e008 b.n 80136a2 <_printf_common+0xb2> + 8013690: 2301 movs r3, #1 + 8013692: 4652 mov r2, sl + 8013694: 4649 mov r1, r9 + 8013696: 4638 mov r0, r7 + 8013698: 47c0 blx r8 + 801369a: 3001 adds r0, #1 + 801369c: d103 bne.n 80136a6 <_printf_common+0xb6> + 801369e: f04f 30ff mov.w r0, #4294967295 + 80136a2: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 80136a6: 3501 adds r5, #1 + 80136a8: e7c1 b.n 801362e <_printf_common+0x3e> + 80136aa: 2030 movs r0, #48 ; 0x30 + 80136ac: 18e1 adds r1, r4, r3 + 80136ae: f881 0043 strb.w r0, [r1, #67] ; 0x43 + 80136b2: 1c5a adds r2, r3, #1 + 80136b4: f894 1045 ldrb.w r1, [r4, #69] ; 0x45 + 80136b8: 4422 add r2, r4 + 80136ba: 3302 adds r3, #2 + 80136bc: f882 1043 strb.w r1, [r2, #67] ; 0x43 + 80136c0: e7c2 b.n 8013648 <_printf_common+0x58> + 80136c2: 2301 movs r3, #1 + 80136c4: 4622 mov r2, r4 + 80136c6: 4649 mov r1, r9 + 80136c8: 4638 mov r0, r7 + 80136ca: 47c0 blx r8 + 80136cc: 3001 adds r0, #1 + 80136ce: d0e6 beq.n 801369e <_printf_common+0xae> + 80136d0: 3601 adds r6, #1 + 80136d2: e7d9 b.n 8013688 <_printf_common+0x98> + +080136d4 <_printf_i>: + 80136d4: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} + 80136d8: 7e0f ldrb r7, [r1, #24] + 80136da: 4691 mov r9, r2 + 80136dc: 2f78 cmp r7, #120 ; 0x78 + 80136de: 4680 mov r8, r0 + 80136e0: 460c mov r4, r1 + 80136e2: 469a mov sl, r3 + 80136e4: 9d0c ldr r5, [sp, #48] ; 0x30 + 80136e6: f101 0243 add.w r2, r1, #67 ; 0x43 + 80136ea: d807 bhi.n 80136fc <_printf_i+0x28> + 80136ec: 2f62 cmp r7, #98 ; 0x62 + 80136ee: d80a bhi.n 8013706 <_printf_i+0x32> + 80136f0: 2f00 cmp r7, #0 + 80136f2: f000 80d5 beq.w 80138a0 <_printf_i+0x1cc> + 80136f6: 2f58 cmp r7, #88 ; 0x58 + 80136f8: f000 80c1 beq.w 801387e <_printf_i+0x1aa> + 80136fc: f104 0542 add.w r5, r4, #66 ; 0x42 + 8013700: f884 7042 strb.w r7, [r4, #66] ; 0x42 + 8013704: e03a b.n 801377c <_printf_i+0xa8> + 8013706: f1a7 0363 sub.w r3, r7, #99 ; 0x63 + 801370a: 2b15 cmp r3, #21 + 801370c: d8f6 bhi.n 80136fc <_printf_i+0x28> + 801370e: a101 add r1, pc, #4 ; (adr r1, 8013714 <_printf_i+0x40>) + 8013710: f851 f023 ldr.w pc, [r1, r3, lsl #2] + 8013714: 0801376d .word 0x0801376d + 8013718: 08013781 .word 0x08013781 + 801371c: 080136fd .word 0x080136fd + 8013720: 080136fd .word 0x080136fd + 8013724: 080136fd .word 0x080136fd + 8013728: 080136fd .word 0x080136fd + 801372c: 08013781 .word 0x08013781 + 8013730: 080136fd .word 0x080136fd + 8013734: 080136fd .word 0x080136fd + 8013738: 080136fd .word 0x080136fd + 801373c: 080136fd .word 0x080136fd + 8013740: 08013887 .word 0x08013887 + 8013744: 080137ad .word 0x080137ad + 8013748: 08013841 .word 0x08013841 + 801374c: 080136fd .word 0x080136fd + 8013750: 080136fd .word 0x080136fd + 8013754: 080138a9 .word 0x080138a9 + 8013758: 080136fd .word 0x080136fd + 801375c: 080137ad .word 0x080137ad + 8013760: 080136fd .word 0x080136fd + 8013764: 080136fd .word 0x080136fd + 8013768: 08013849 .word 0x08013849 + 801376c: 682b ldr r3, [r5, #0] + 801376e: 1d1a adds r2, r3, #4 + 8013770: 681b ldr r3, [r3, #0] + 8013772: 602a str r2, [r5, #0] + 8013774: f104 0542 add.w r5, r4, #66 ; 0x42 + 8013778: f884 3042 strb.w r3, [r4, #66] ; 0x42 + 801377c: 2301 movs r3, #1 + 801377e: e0a0 b.n 80138c2 <_printf_i+0x1ee> + 8013780: 6820 ldr r0, [r4, #0] + 8013782: 682b ldr r3, [r5, #0] + 8013784: 0607 lsls r7, r0, #24 + 8013786: f103 0104 add.w r1, r3, #4 + 801378a: 6029 str r1, [r5, #0] + 801378c: d501 bpl.n 8013792 <_printf_i+0xbe> + 801378e: 681e ldr r6, [r3, #0] + 8013790: e003 b.n 801379a <_printf_i+0xc6> + 8013792: 0646 lsls r6, r0, #25 + 8013794: d5fb bpl.n 801378e <_printf_i+0xba> + 8013796: f9b3 6000 ldrsh.w r6, [r3] + 801379a: 2e00 cmp r6, #0 + 801379c: da03 bge.n 80137a6 <_printf_i+0xd2> + 801379e: 232d movs r3, #45 ; 0x2d + 80137a0: 4276 negs r6, r6 + 80137a2: f884 3043 strb.w r3, [r4, #67] ; 0x43 + 80137a6: 230a movs r3, #10 + 80137a8: 4859 ldr r0, [pc, #356] ; (8013910 <_printf_i+0x23c>) + 80137aa: e012 b.n 80137d2 <_printf_i+0xfe> + 80137ac: 682b ldr r3, [r5, #0] + 80137ae: 6820 ldr r0, [r4, #0] + 80137b0: 1d19 adds r1, r3, #4 + 80137b2: 6029 str r1, [r5, #0] + 80137b4: 0605 lsls r5, r0, #24 + 80137b6: d501 bpl.n 80137bc <_printf_i+0xe8> + 80137b8: 681e ldr r6, [r3, #0] + 80137ba: e002 b.n 80137c2 <_printf_i+0xee> + 80137bc: 0641 lsls r1, r0, #25 + 80137be: d5fb bpl.n 80137b8 <_printf_i+0xe4> + 80137c0: 881e ldrh r6, [r3, #0] + 80137c2: 2f6f cmp r7, #111 ; 0x6f + 80137c4: bf0c ite eq + 80137c6: 2308 moveq r3, #8 + 80137c8: 230a movne r3, #10 + 80137ca: 4851 ldr r0, [pc, #324] ; (8013910 <_printf_i+0x23c>) + 80137cc: 2100 movs r1, #0 + 80137ce: f884 1043 strb.w r1, [r4, #67] ; 0x43 + 80137d2: 6865 ldr r5, [r4, #4] + 80137d4: 2d00 cmp r5, #0 + 80137d6: bfa8 it ge + 80137d8: 6821 ldrge r1, [r4, #0] + 80137da: 60a5 str r5, [r4, #8] + 80137dc: bfa4 itt ge + 80137de: f021 0104 bicge.w r1, r1, #4 + 80137e2: 6021 strge r1, [r4, #0] + 80137e4: b90e cbnz r6, 80137ea <_printf_i+0x116> + 80137e6: 2d00 cmp r5, #0 + 80137e8: d04b beq.n 8013882 <_printf_i+0x1ae> + 80137ea: 4615 mov r5, r2 + 80137ec: fbb6 f1f3 udiv r1, r6, r3 + 80137f0: fb03 6711 mls r7, r3, r1, r6 + 80137f4: 5dc7 ldrb r7, [r0, r7] + 80137f6: f805 7d01 strb.w r7, [r5, #-1]! + 80137fa: 4637 mov r7, r6 + 80137fc: 42bb cmp r3, r7 + 80137fe: 460e mov r6, r1 + 8013800: d9f4 bls.n 80137ec <_printf_i+0x118> + 8013802: 2b08 cmp r3, #8 + 8013804: d10b bne.n 801381e <_printf_i+0x14a> + 8013806: 6823 ldr r3, [r4, #0] + 8013808: 07de lsls r6, r3, #31 + 801380a: d508 bpl.n 801381e <_printf_i+0x14a> + 801380c: 6923 ldr r3, [r4, #16] + 801380e: 6861 ldr r1, [r4, #4] + 8013810: 4299 cmp r1, r3 + 8013812: bfde ittt le + 8013814: 2330 movle r3, #48 ; 0x30 + 8013816: f805 3c01 strble.w r3, [r5, #-1] + 801381a: f105 35ff addle.w r5, r5, #4294967295 + 801381e: 1b52 subs r2, r2, r5 + 8013820: 6122 str r2, [r4, #16] + 8013822: 464b mov r3, r9 + 8013824: 4621 mov r1, r4 + 8013826: 4640 mov r0, r8 + 8013828: f8cd a000 str.w sl, [sp] + 801382c: aa03 add r2, sp, #12 + 801382e: f7ff fedf bl 80135f0 <_printf_common> + 8013832: 3001 adds r0, #1 + 8013834: d14a bne.n 80138cc <_printf_i+0x1f8> + 8013836: f04f 30ff mov.w r0, #4294967295 + 801383a: b004 add sp, #16 + 801383c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 8013840: 6823 ldr r3, [r4, #0] + 8013842: f043 0320 orr.w r3, r3, #32 + 8013846: 6023 str r3, [r4, #0] + 8013848: 2778 movs r7, #120 ; 0x78 + 801384a: 4832 ldr r0, [pc, #200] ; (8013914 <_printf_i+0x240>) + 801384c: f884 7045 strb.w r7, [r4, #69] ; 0x45 + 8013850: 6823 ldr r3, [r4, #0] + 8013852: 6829 ldr r1, [r5, #0] + 8013854: 061f lsls r7, r3, #24 + 8013856: f851 6b04 ldr.w r6, [r1], #4 + 801385a: d402 bmi.n 8013862 <_printf_i+0x18e> + 801385c: 065f lsls r7, r3, #25 + 801385e: bf48 it mi + 8013860: b2b6 uxthmi r6, r6 + 8013862: 07df lsls r7, r3, #31 + 8013864: bf48 it mi + 8013866: f043 0320 orrmi.w r3, r3, #32 + 801386a: 6029 str r1, [r5, #0] + 801386c: bf48 it mi + 801386e: 6023 strmi r3, [r4, #0] + 8013870: b91e cbnz r6, 801387a <_printf_i+0x1a6> + 8013872: 6823 ldr r3, [r4, #0] + 8013874: f023 0320 bic.w r3, r3, #32 + 8013878: 6023 str r3, [r4, #0] + 801387a: 2310 movs r3, #16 + 801387c: e7a6 b.n 80137cc <_printf_i+0xf8> + 801387e: 4824 ldr r0, [pc, #144] ; (8013910 <_printf_i+0x23c>) + 8013880: e7e4 b.n 801384c <_printf_i+0x178> + 8013882: 4615 mov r5, r2 + 8013884: e7bd b.n 8013802 <_printf_i+0x12e> + 8013886: 682b ldr r3, [r5, #0] + 8013888: 6826 ldr r6, [r4, #0] + 801388a: 1d18 adds r0, r3, #4 + 801388c: 6961 ldr r1, [r4, #20] + 801388e: 6028 str r0, [r5, #0] + 8013890: 0635 lsls r5, r6, #24 + 8013892: 681b ldr r3, [r3, #0] + 8013894: d501 bpl.n 801389a <_printf_i+0x1c6> + 8013896: 6019 str r1, [r3, #0] + 8013898: e002 b.n 80138a0 <_printf_i+0x1cc> + 801389a: 0670 lsls r0, r6, #25 + 801389c: d5fb bpl.n 8013896 <_printf_i+0x1c2> + 801389e: 8019 strh r1, [r3, #0] + 80138a0: 2300 movs r3, #0 + 80138a2: 4615 mov r5, r2 + 80138a4: 6123 str r3, [r4, #16] + 80138a6: e7bc b.n 8013822 <_printf_i+0x14e> + 80138a8: 682b ldr r3, [r5, #0] + 80138aa: 2100 movs r1, #0 + 80138ac: 1d1a adds r2, r3, #4 + 80138ae: 602a str r2, [r5, #0] + 80138b0: 681d ldr r5, [r3, #0] + 80138b2: 6862 ldr r2, [r4, #4] + 80138b4: 4628 mov r0, r5 + 80138b6: f000 f97f bl 8013bb8 + 80138ba: b108 cbz r0, 80138c0 <_printf_i+0x1ec> + 80138bc: 1b40 subs r0, r0, r5 + 80138be: 6060 str r0, [r4, #4] + 80138c0: 6863 ldr r3, [r4, #4] + 80138c2: 6123 str r3, [r4, #16] + 80138c4: 2300 movs r3, #0 + 80138c6: f884 3043 strb.w r3, [r4, #67] ; 0x43 + 80138ca: e7aa b.n 8013822 <_printf_i+0x14e> + 80138cc: 462a mov r2, r5 + 80138ce: 4649 mov r1, r9 + 80138d0: 4640 mov r0, r8 + 80138d2: 6923 ldr r3, [r4, #16] + 80138d4: 47d0 blx sl + 80138d6: 3001 adds r0, #1 + 80138d8: d0ad beq.n 8013836 <_printf_i+0x162> + 80138da: 6823 ldr r3, [r4, #0] + 80138dc: 079b lsls r3, r3, #30 + 80138de: d413 bmi.n 8013908 <_printf_i+0x234> + 80138e0: 68e0 ldr r0, [r4, #12] + 80138e2: 9b03 ldr r3, [sp, #12] + 80138e4: 4298 cmp r0, r3 + 80138e6: bfb8 it lt + 80138e8: 4618 movlt r0, r3 + 80138ea: e7a6 b.n 801383a <_printf_i+0x166> + 80138ec: 2301 movs r3, #1 + 80138ee: 4632 mov r2, r6 + 80138f0: 4649 mov r1, r9 + 80138f2: 4640 mov r0, r8 + 80138f4: 47d0 blx sl + 80138f6: 3001 adds r0, #1 + 80138f8: d09d beq.n 8013836 <_printf_i+0x162> + 80138fa: 3501 adds r5, #1 + 80138fc: 68e3 ldr r3, [r4, #12] + 80138fe: 9903 ldr r1, [sp, #12] + 8013900: 1a5b subs r3, r3, r1 + 8013902: 42ab cmp r3, r5 + 8013904: dcf2 bgt.n 80138ec <_printf_i+0x218> + 8013906: e7eb b.n 80138e0 <_printf_i+0x20c> + 8013908: 2500 movs r5, #0 + 801390a: f104 0619 add.w r6, r4, #25 + 801390e: e7f5 b.n 80138fc <_printf_i+0x228> + 8013910: 0801683a .word 0x0801683a + 8013914: 0801684b .word 0x0801684b + +08013918 <__sflush_r>: + 8013918: 898a ldrh r2, [r1, #12] + 801391a: b5f8 push {r3, r4, r5, r6, r7, lr} + 801391c: 4605 mov r5, r0 + 801391e: 0710 lsls r0, r2, #28 + 8013920: 460c mov r4, r1 + 8013922: d457 bmi.n 80139d4 <__sflush_r+0xbc> + 8013924: 684b ldr r3, [r1, #4] + 8013926: 2b00 cmp r3, #0 + 8013928: dc04 bgt.n 8013934 <__sflush_r+0x1c> + 801392a: 6c0b ldr r3, [r1, #64] ; 0x40 + 801392c: 2b00 cmp r3, #0 + 801392e: dc01 bgt.n 8013934 <__sflush_r+0x1c> + 8013930: 2000 movs r0, #0 + 8013932: bdf8 pop {r3, r4, r5, r6, r7, pc} + 8013934: 6ae6 ldr r6, [r4, #44] ; 0x2c + 8013936: 2e00 cmp r6, #0 + 8013938: d0fa beq.n 8013930 <__sflush_r+0x18> + 801393a: 2300 movs r3, #0 + 801393c: f412 5280 ands.w r2, r2, #4096 ; 0x1000 + 8013940: 682f ldr r7, [r5, #0] + 8013942: 6a21 ldr r1, [r4, #32] + 8013944: 602b str r3, [r5, #0] + 8013946: d032 beq.n 80139ae <__sflush_r+0x96> + 8013948: 6d60 ldr r0, [r4, #84] ; 0x54 + 801394a: 89a3 ldrh r3, [r4, #12] + 801394c: 075a lsls r2, r3, #29 + 801394e: d505 bpl.n 801395c <__sflush_r+0x44> + 8013950: 6863 ldr r3, [r4, #4] + 8013952: 1ac0 subs r0, r0, r3 + 8013954: 6b63 ldr r3, [r4, #52] ; 0x34 + 8013956: b10b cbz r3, 801395c <__sflush_r+0x44> + 8013958: 6c23 ldr r3, [r4, #64] ; 0x40 + 801395a: 1ac0 subs r0, r0, r3 + 801395c: 2300 movs r3, #0 + 801395e: 4602 mov r2, r0 + 8013960: 6ae6 ldr r6, [r4, #44] ; 0x2c + 8013962: 4628 mov r0, r5 + 8013964: 6a21 ldr r1, [r4, #32] + 8013966: 47b0 blx r6 + 8013968: 1c43 adds r3, r0, #1 + 801396a: 89a3 ldrh r3, [r4, #12] + 801396c: d106 bne.n 801397c <__sflush_r+0x64> + 801396e: 6829 ldr r1, [r5, #0] + 8013970: 291d cmp r1, #29 + 8013972: d82b bhi.n 80139cc <__sflush_r+0xb4> + 8013974: 4a28 ldr r2, [pc, #160] ; (8013a18 <__sflush_r+0x100>) + 8013976: 410a asrs r2, r1 + 8013978: 07d6 lsls r6, r2, #31 + 801397a: d427 bmi.n 80139cc <__sflush_r+0xb4> + 801397c: 2200 movs r2, #0 + 801397e: 6062 str r2, [r4, #4] + 8013980: 6922 ldr r2, [r4, #16] + 8013982: 04d9 lsls r1, r3, #19 + 8013984: 6022 str r2, [r4, #0] + 8013986: d504 bpl.n 8013992 <__sflush_r+0x7a> + 8013988: 1c42 adds r2, r0, #1 + 801398a: d101 bne.n 8013990 <__sflush_r+0x78> + 801398c: 682b ldr r3, [r5, #0] + 801398e: b903 cbnz r3, 8013992 <__sflush_r+0x7a> + 8013990: 6560 str r0, [r4, #84] ; 0x54 + 8013992: 6b61 ldr r1, [r4, #52] ; 0x34 + 8013994: 602f str r7, [r5, #0] + 8013996: 2900 cmp r1, #0 + 8013998: d0ca beq.n 8013930 <__sflush_r+0x18> + 801399a: f104 0344 add.w r3, r4, #68 ; 0x44 + 801399e: 4299 cmp r1, r3 + 80139a0: d002 beq.n 80139a8 <__sflush_r+0x90> + 80139a2: 4628 mov r0, r5 + 80139a4: f7ff fbe6 bl 8013174 <_free_r> + 80139a8: 2000 movs r0, #0 + 80139aa: 6360 str r0, [r4, #52] ; 0x34 + 80139ac: e7c1 b.n 8013932 <__sflush_r+0x1a> + 80139ae: 2301 movs r3, #1 + 80139b0: 4628 mov r0, r5 + 80139b2: 47b0 blx r6 + 80139b4: 1c41 adds r1, r0, #1 + 80139b6: d1c8 bne.n 801394a <__sflush_r+0x32> + 80139b8: 682b ldr r3, [r5, #0] + 80139ba: 2b00 cmp r3, #0 + 80139bc: d0c5 beq.n 801394a <__sflush_r+0x32> + 80139be: 2b1d cmp r3, #29 + 80139c0: d001 beq.n 80139c6 <__sflush_r+0xae> + 80139c2: 2b16 cmp r3, #22 + 80139c4: d101 bne.n 80139ca <__sflush_r+0xb2> + 80139c6: 602f str r7, [r5, #0] + 80139c8: e7b2 b.n 8013930 <__sflush_r+0x18> + 80139ca: 89a3 ldrh r3, [r4, #12] + 80139cc: f043 0340 orr.w r3, r3, #64 ; 0x40 + 80139d0: 81a3 strh r3, [r4, #12] + 80139d2: e7ae b.n 8013932 <__sflush_r+0x1a> + 80139d4: 690f ldr r7, [r1, #16] + 80139d6: 2f00 cmp r7, #0 + 80139d8: d0aa beq.n 8013930 <__sflush_r+0x18> + 80139da: 0793 lsls r3, r2, #30 + 80139dc: bf18 it ne + 80139de: 2300 movne r3, #0 + 80139e0: 680e ldr r6, [r1, #0] + 80139e2: bf08 it eq + 80139e4: 694b ldreq r3, [r1, #20] + 80139e6: 1bf6 subs r6, r6, r7 + 80139e8: 600f str r7, [r1, #0] + 80139ea: 608b str r3, [r1, #8] + 80139ec: 2e00 cmp r6, #0 + 80139ee: dd9f ble.n 8013930 <__sflush_r+0x18> + 80139f0: 4633 mov r3, r6 + 80139f2: 463a mov r2, r7 + 80139f4: 4628 mov r0, r5 + 80139f6: 6a21 ldr r1, [r4, #32] + 80139f8: f8d4 c028 ldr.w ip, [r4, #40] ; 0x28 + 80139fc: 47e0 blx ip + 80139fe: 2800 cmp r0, #0 + 8013a00: dc06 bgt.n 8013a10 <__sflush_r+0xf8> + 8013a02: 89a3 ldrh r3, [r4, #12] + 8013a04: f04f 30ff mov.w r0, #4294967295 + 8013a08: f043 0340 orr.w r3, r3, #64 ; 0x40 + 8013a0c: 81a3 strh r3, [r4, #12] + 8013a0e: e790 b.n 8013932 <__sflush_r+0x1a> + 8013a10: 4407 add r7, r0 + 8013a12: 1a36 subs r6, r6, r0 + 8013a14: e7ea b.n 80139ec <__sflush_r+0xd4> + 8013a16: bf00 nop + 8013a18: dfbffffe .word 0xdfbffffe + +08013a1c <_fflush_r>: + 8013a1c: b538 push {r3, r4, r5, lr} + 8013a1e: 690b ldr r3, [r1, #16] + 8013a20: 4605 mov r5, r0 + 8013a22: 460c mov r4, r1 + 8013a24: b913 cbnz r3, 8013a2c <_fflush_r+0x10> + 8013a26: 2500 movs r5, #0 + 8013a28: 4628 mov r0, r5 + 8013a2a: bd38 pop {r3, r4, r5, pc} + 8013a2c: b118 cbz r0, 8013a36 <_fflush_r+0x1a> + 8013a2e: 6a03 ldr r3, [r0, #32] + 8013a30: b90b cbnz r3, 8013a36 <_fflush_r+0x1a> + 8013a32: f7ff f971 bl 8012d18 <__sinit> + 8013a36: f9b4 300c ldrsh.w r3, [r4, #12] + 8013a3a: 2b00 cmp r3, #0 + 8013a3c: d0f3 beq.n 8013a26 <_fflush_r+0xa> + 8013a3e: 6e62 ldr r2, [r4, #100] ; 0x64 + 8013a40: 07d0 lsls r0, r2, #31 + 8013a42: d404 bmi.n 8013a4e <_fflush_r+0x32> + 8013a44: 0599 lsls r1, r3, #22 + 8013a46: d402 bmi.n 8013a4e <_fflush_r+0x32> + 8013a48: 6da0 ldr r0, [r4, #88] ; 0x58 + 8013a4a: f7ff fb64 bl 8013116 <__retarget_lock_acquire_recursive> + 8013a4e: 4628 mov r0, r5 + 8013a50: 4621 mov r1, r4 + 8013a52: f7ff ff61 bl 8013918 <__sflush_r> + 8013a56: 6e63 ldr r3, [r4, #100] ; 0x64 + 8013a58: 4605 mov r5, r0 + 8013a5a: 07da lsls r2, r3, #31 + 8013a5c: d4e4 bmi.n 8013a28 <_fflush_r+0xc> + 8013a5e: 89a3 ldrh r3, [r4, #12] + 8013a60: 059b lsls r3, r3, #22 + 8013a62: d4e1 bmi.n 8013a28 <_fflush_r+0xc> + 8013a64: 6da0 ldr r0, [r4, #88] ; 0x58 + 8013a66: f7ff fb57 bl 8013118 <__retarget_lock_release_recursive> + 8013a6a: e7dd b.n 8013a28 <_fflush_r+0xc> + +08013a6c : + 8013a6c: b40e push {r1, r2, r3} + 8013a6e: b503 push {r0, r1, lr} + 8013a70: 4601 mov r1, r0 + 8013a72: ab03 add r3, sp, #12 + 8013a74: 4805 ldr r0, [pc, #20] ; (8013a8c ) + 8013a76: f853 2b04 ldr.w r2, [r3], #4 + 8013a7a: 6800 ldr r0, [r0, #0] + 8013a7c: 9301 str r3, [sp, #4] + 8013a7e: f7ff fc9d bl 80133bc <_vfiprintf_r> + 8013a82: b002 add sp, #8 + 8013a84: f85d eb04 ldr.w lr, [sp], #4 + 8013a88: b003 add sp, #12 + 8013a8a: 4770 bx lr + 8013a8c: 20000070 .word 0x20000070 + +08013a90 <__swhatbuf_r>: + 8013a90: b570 push {r4, r5, r6, lr} + 8013a92: 460c mov r4, r1 + 8013a94: f9b1 100e ldrsh.w r1, [r1, #14] + 8013a98: 4615 mov r5, r2 + 8013a9a: 2900 cmp r1, #0 + 8013a9c: 461e mov r6, r3 + 8013a9e: b096 sub sp, #88 ; 0x58 + 8013aa0: da0c bge.n 8013abc <__swhatbuf_r+0x2c> + 8013aa2: 89a3 ldrh r3, [r4, #12] + 8013aa4: 2100 movs r1, #0 + 8013aa6: f013 0f80 tst.w r3, #128 ; 0x80 + 8013aaa: bf0c ite eq + 8013aac: f44f 6380 moveq.w r3, #1024 ; 0x400 + 8013ab0: 2340 movne r3, #64 ; 0x40 + 8013ab2: 2000 movs r0, #0 + 8013ab4: 6031 str r1, [r6, #0] + 8013ab6: 602b str r3, [r5, #0] + 8013ab8: b016 add sp, #88 ; 0x58 + 8013aba: bd70 pop {r4, r5, r6, pc} + 8013abc: 466a mov r2, sp + 8013abe: f000 f849 bl 8013b54 <_fstat_r> + 8013ac2: 2800 cmp r0, #0 + 8013ac4: dbed blt.n 8013aa2 <__swhatbuf_r+0x12> + 8013ac6: 9901 ldr r1, [sp, #4] + 8013ac8: f401 4170 and.w r1, r1, #61440 ; 0xf000 + 8013acc: f5a1 5300 sub.w r3, r1, #8192 ; 0x2000 + 8013ad0: 4259 negs r1, r3 + 8013ad2: 4159 adcs r1, r3 + 8013ad4: f44f 6380 mov.w r3, #1024 ; 0x400 + 8013ad8: e7eb b.n 8013ab2 <__swhatbuf_r+0x22> + +08013ada <__smakebuf_r>: + 8013ada: 898b ldrh r3, [r1, #12] + 8013adc: b573 push {r0, r1, r4, r5, r6, lr} + 8013ade: 079d lsls r5, r3, #30 + 8013ae0: 4606 mov r6, r0 + 8013ae2: 460c mov r4, r1 + 8013ae4: d507 bpl.n 8013af6 <__smakebuf_r+0x1c> + 8013ae6: f104 0347 add.w r3, r4, #71 ; 0x47 + 8013aea: 6023 str r3, [r4, #0] + 8013aec: 6123 str r3, [r4, #16] + 8013aee: 2301 movs r3, #1 + 8013af0: 6163 str r3, [r4, #20] + 8013af2: b002 add sp, #8 + 8013af4: bd70 pop {r4, r5, r6, pc} + 8013af6: 466a mov r2, sp + 8013af8: ab01 add r3, sp, #4 + 8013afa: f7ff ffc9 bl 8013a90 <__swhatbuf_r> + 8013afe: 9900 ldr r1, [sp, #0] + 8013b00: 4605 mov r5, r0 + 8013b02: 4630 mov r0, r6 + 8013b04: f7ff fba6 bl 8013254 <_malloc_r> + 8013b08: b948 cbnz r0, 8013b1e <__smakebuf_r+0x44> + 8013b0a: f9b4 300c ldrsh.w r3, [r4, #12] + 8013b0e: 059a lsls r2, r3, #22 + 8013b10: d4ef bmi.n 8013af2 <__smakebuf_r+0x18> + 8013b12: f023 0303 bic.w r3, r3, #3 + 8013b16: f043 0302 orr.w r3, r3, #2 + 8013b1a: 81a3 strh r3, [r4, #12] + 8013b1c: e7e3 b.n 8013ae6 <__smakebuf_r+0xc> + 8013b1e: 89a3 ldrh r3, [r4, #12] + 8013b20: 6020 str r0, [r4, #0] + 8013b22: f043 0380 orr.w r3, r3, #128 ; 0x80 + 8013b26: 81a3 strh r3, [r4, #12] + 8013b28: 9b00 ldr r3, [sp, #0] + 8013b2a: 6120 str r0, [r4, #16] + 8013b2c: 6163 str r3, [r4, #20] + 8013b2e: 9b01 ldr r3, [sp, #4] + 8013b30: b15b cbz r3, 8013b4a <__smakebuf_r+0x70> + 8013b32: 4630 mov r0, r6 + 8013b34: f9b4 100e ldrsh.w r1, [r4, #14] + 8013b38: f000 f81e bl 8013b78 <_isatty_r> + 8013b3c: b128 cbz r0, 8013b4a <__smakebuf_r+0x70> + 8013b3e: 89a3 ldrh r3, [r4, #12] + 8013b40: f023 0303 bic.w r3, r3, #3 + 8013b44: f043 0301 orr.w r3, r3, #1 + 8013b48: 81a3 strh r3, [r4, #12] + 8013b4a: 89a3 ldrh r3, [r4, #12] + 8013b4c: 431d orrs r5, r3 + 8013b4e: 81a5 strh r5, [r4, #12] + 8013b50: e7cf b.n 8013af2 <__smakebuf_r+0x18> + ... + +08013b54 <_fstat_r>: + 8013b54: b538 push {r3, r4, r5, lr} + 8013b56: 2300 movs r3, #0 + 8013b58: 4d06 ldr r5, [pc, #24] ; (8013b74 <_fstat_r+0x20>) + 8013b5a: 4604 mov r4, r0 + 8013b5c: 4608 mov r0, r1 + 8013b5e: 4611 mov r1, r2 + 8013b60: 602b str r3, [r5, #0] + 8013b62: f7ed fbfb bl 800135c <_fstat> + 8013b66: 1c43 adds r3, r0, #1 + 8013b68: d102 bne.n 8013b70 <_fstat_r+0x1c> + 8013b6a: 682b ldr r3, [r5, #0] + 8013b6c: b103 cbz r3, 8013b70 <_fstat_r+0x1c> + 8013b6e: 6023 str r3, [r4, #0] + 8013b70: bd38 pop {r3, r4, r5, pc} + 8013b72: bf00 nop + 8013b74: 20007234 .word 0x20007234 + +08013b78 <_isatty_r>: + 8013b78: b538 push {r3, r4, r5, lr} + 8013b7a: 2300 movs r3, #0 + 8013b7c: 4d05 ldr r5, [pc, #20] ; (8013b94 <_isatty_r+0x1c>) + 8013b7e: 4604 mov r4, r0 + 8013b80: 4608 mov r0, r1 + 8013b82: 602b str r3, [r5, #0] + 8013b84: f7ed fbf9 bl 800137a <_isatty> + 8013b88: 1c43 adds r3, r0, #1 + 8013b8a: d102 bne.n 8013b92 <_isatty_r+0x1a> + 8013b8c: 682b ldr r3, [r5, #0] + 8013b8e: b103 cbz r3, 8013b92 <_isatty_r+0x1a> + 8013b90: 6023 str r3, [r4, #0] + 8013b92: bd38 pop {r3, r4, r5, pc} + 8013b94: 20007234 .word 0x20007234 + +08013b98 <_sbrk_r>: + 8013b98: b538 push {r3, r4, r5, lr} + 8013b9a: 2300 movs r3, #0 + 8013b9c: 4d05 ldr r5, [pc, #20] ; (8013bb4 <_sbrk_r+0x1c>) + 8013b9e: 4604 mov r4, r0 + 8013ba0: 4608 mov r0, r1 + 8013ba2: 602b str r3, [r5, #0] + 8013ba4: f7ed fc00 bl 80013a8 <_sbrk> + 8013ba8: 1c43 adds r3, r0, #1 + 8013baa: d102 bne.n 8013bb2 <_sbrk_r+0x1a> + 8013bac: 682b ldr r3, [r5, #0] + 8013bae: b103 cbz r3, 8013bb2 <_sbrk_r+0x1a> + 8013bb0: 6023 str r3, [r4, #0] + 8013bb2: bd38 pop {r3, r4, r5, pc} + 8013bb4: 20007234 .word 0x20007234 + +08013bb8 : + 8013bb8: 4603 mov r3, r0 + 8013bba: b510 push {r4, lr} + 8013bbc: b2c9 uxtb r1, r1 + 8013bbe: 4402 add r2, r0 + 8013bc0: 4293 cmp r3, r2 + 8013bc2: 4618 mov r0, r3 + 8013bc4: d101 bne.n 8013bca + 8013bc6: 2000 movs r0, #0 + 8013bc8: e003 b.n 8013bd2 + 8013bca: 7804 ldrb r4, [r0, #0] + 8013bcc: 3301 adds r3, #1 + 8013bce: 428c cmp r4, r1 + 8013bd0: d1f6 bne.n 8013bc0 + 8013bd2: bd10 pop {r4, pc} + +08013bd4 : + 8013bd4: 2006 movs r0, #6 + 8013bd6: b508 push {r3, lr} + 8013bd8: f000 f82c bl 8013c34 + 8013bdc: 2001 movs r0, #1 + 8013bde: f7ed fb6f bl 80012c0 <_exit> + +08013be2 <_raise_r>: + 8013be2: 291f cmp r1, #31 + 8013be4: b538 push {r3, r4, r5, lr} + 8013be6: 4604 mov r4, r0 + 8013be8: 460d mov r5, r1 + 8013bea: d904 bls.n 8013bf6 <_raise_r+0x14> + 8013bec: 2316 movs r3, #22 + 8013bee: 6003 str r3, [r0, #0] + 8013bf0: f04f 30ff mov.w r0, #4294967295 + 8013bf4: bd38 pop {r3, r4, r5, pc} + 8013bf6: 6bc2 ldr r2, [r0, #60] ; 0x3c + 8013bf8: b112 cbz r2, 8013c00 <_raise_r+0x1e> + 8013bfa: f852 3021 ldr.w r3, [r2, r1, lsl #2] + 8013bfe: b94b cbnz r3, 8013c14 <_raise_r+0x32> + 8013c00: 4620 mov r0, r4 + 8013c02: f000 f831 bl 8013c68 <_getpid_r> + 8013c06: 462a mov r2, r5 + 8013c08: 4601 mov r1, r0 + 8013c0a: 4620 mov r0, r4 + 8013c0c: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} + 8013c10: f000 b818 b.w 8013c44 <_kill_r> + 8013c14: 2b01 cmp r3, #1 + 8013c16: d00a beq.n 8013c2e <_raise_r+0x4c> + 8013c18: 1c59 adds r1, r3, #1 + 8013c1a: d103 bne.n 8013c24 <_raise_r+0x42> + 8013c1c: 2316 movs r3, #22 + 8013c1e: 6003 str r3, [r0, #0] + 8013c20: 2001 movs r0, #1 + 8013c22: e7e7 b.n 8013bf4 <_raise_r+0x12> + 8013c24: 2400 movs r4, #0 + 8013c26: 4628 mov r0, r5 + 8013c28: f842 4025 str.w r4, [r2, r5, lsl #2] + 8013c2c: 4798 blx r3 + 8013c2e: 2000 movs r0, #0 + 8013c30: e7e0 b.n 8013bf4 <_raise_r+0x12> + ... + +08013c34 : + 8013c34: 4b02 ldr r3, [pc, #8] ; (8013c40 ) + 8013c36: 4601 mov r1, r0 + 8013c38: 6818 ldr r0, [r3, #0] + 8013c3a: f7ff bfd2 b.w 8013be2 <_raise_r> + 8013c3e: bf00 nop + 8013c40: 20000070 .word 0x20000070 + +08013c44 <_kill_r>: + 8013c44: b538 push {r3, r4, r5, lr} + 8013c46: 2300 movs r3, #0 + 8013c48: 4d06 ldr r5, [pc, #24] ; (8013c64 <_kill_r+0x20>) + 8013c4a: 4604 mov r4, r0 + 8013c4c: 4608 mov r0, r1 + 8013c4e: 4611 mov r1, r2 + 8013c50: 602b str r3, [r5, #0] + 8013c52: f7ed fb23 bl 800129c <_kill> + 8013c56: 1c43 adds r3, r0, #1 + 8013c58: d102 bne.n 8013c60 <_kill_r+0x1c> + 8013c5a: 682b ldr r3, [r5, #0] + 8013c5c: b103 cbz r3, 8013c60 <_kill_r+0x1c> + 8013c5e: 6023 str r3, [r4, #0] + 8013c60: bd38 pop {r3, r4, r5, pc} + 8013c62: bf00 nop + 8013c64: 20007234 .word 0x20007234 + +08013c68 <_getpid_r>: + 8013c68: f7ed bb10 b.w 800128c <_getpid> + +08013c6c <_init>: + 8013c6c: b5f8 push {r3, r4, r5, r6, r7, lr} + 8013c6e: bf00 nop + 8013c70: bcf8 pop {r3, r4, r5, r6, r7} + 8013c72: bc08 pop {r3} + 8013c74: 469e mov lr, r3 + 8013c76: 4770 bx lr + +08013c78 <_fini>: + 8013c78: b5f8 push {r3, r4, r5, r6, r7, lr} + 8013c7a: bf00 nop + 8013c7c: bcf8 pop {r3, r4, r5, r6, r7} + 8013c7e: bc08 pop {r3} + 8013c80: 469e mov lr, r3 + 8013c82: 4770 bx lr diff --git a/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.map b/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.map index 2ad18e0..a6f15a9 100644 --- a/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.map +++ b/STM32_Nucleo207ZG/Debug/LightControlConvi_Nucleo207ZG.map @@ -1,22470 +1,22680 @@ -Archive member included to satisfy reference by file (symbol) - -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o (exit) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o (rand) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) (__stdio_exit_handler) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (_fwalk_sglue) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - ./Core/Src/main.o (printf) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - ./Core/Src/main.o (puts) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (__sread) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) (__swbuf_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) (__swsetup_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) - ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o (memcmp) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o (memset) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) - ./Middlewares/Third_Party/LwIP/src/core/def.o (strncmp) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_close_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - ./Core/Src/syscalls.o (errno) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) (_impure_ptr) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_lseek_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_read_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_write_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o (__libc_init_array) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (__retarget_lock_init_recursive) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) - ./Core/Src/main.o (strcmp) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) - ./LWIP/Target/ethernetif.o (memcpy) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) - ./Core/Src/main.o (strlen) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) (__assert_func) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) (_free_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) (malloc) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (_malloc_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) (__malloc_lock) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) (_vfprintf_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) (_printf_i) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (_fflush_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) (fiprintf) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) (__sfvwrite_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) (__smakebuf_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) (memmove) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) (_fstat_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) (_isatty_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) (_sbrk_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) (memchr) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) (abort) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) (_realloc_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) (raise) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) (_kill_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) (_malloc_usable_size_r) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) - ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o (__aeabi_uldivmod) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) (__udivmoddi4) -C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) - C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) (__aeabi_ldiv0) - -Discarded input sections - - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o - .data 0x0000000000000000 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - .rodata 0x0000000000000000 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - .text 0x0000000000000000 0x7c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .ARM.extab 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .ARM.exidx 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .debug_line 0x0000000000000000 0x76 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .debug_line_str - 0x0000000000000000 0xd9 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .debug_info 0x0000000000000000 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .debug_abbrev 0x0000000000000000 0x14 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .debug_aranges - 0x0000000000000000 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .debug_str 0x0000000000000000 0xde C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .ARM.attributes - 0x0000000000000000 0x1b C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/main.o - .text 0x0000000000000000 0x0 ./Core/Src/main.o - .data 0x0000000000000000 0x0 ./Core/Src/main.o - .bss 0x0000000000000000 0x0 ./Core/Src/main.o - .rodata.cMqttServerIpAddr_u32 - 0x0000000000000000 0x4 ./Core/Src/main.o - .bss.mqtt_static_client - 0x0000000000000000 0x1f0 ./Core/Src/main.o - .bss.inpub_id 0x0000000000000000 0x4 ./Core/Src/main.o - .rodata 0x0000000000000000 0x1c4 ./Core/Src/main.o - .text.MQTTConnect - 0x0000000000000000 0x68 ./Core/Src/main.o - .text.mqtt_connection_cb - 0x0000000000000000 0x88 ./Core/Src/main.o - .text.mqtt_sub_request_cb - 0x0000000000000000 0x24 ./Core/Src/main.o - .text.mqtt_incoming_publish_cb - 0x0000000000000000 0x58 ./Core/Src/main.o - .text.mqtt_incoming_data_cb - 0x0000000000000000 0x74 ./Core/Src/main.o - .text.example_publish - 0x0000000000000000 0x6c ./Core/Src/main.o - .text.mqtt_pub_request_cb - 0x0000000000000000 0x2c ./Core/Src/main.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o - .text 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_hal_msp.o - .data 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_hal_msp.o - .bss 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_hal_msp.o - .text.HAL_TIM_Base_MspDeInit - 0x0000000000000000 0x6c ./Core/Src/stm32f2xx_hal_msp.o - .text.HAL_UART_MspDeInit - 0x0000000000000000 0x3c ./Core/Src/stm32f2xx_hal_msp.o - .text.HAL_PCD_MspDeInit - 0x0000000000000000 0x38 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0xa9c ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x258 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x8e ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x51 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x103 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x6a ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x1df ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0xbd ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0xe49 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x11f ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x6d ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x174 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x55 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x1056 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x153 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x170 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x115 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x108 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0xa5 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x16a ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x5f ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x236 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0xcce ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x126 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x216 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x113 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x82 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x8ed ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x4c ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x2aa ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0xba ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x12d ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000000000 0x19e ./Core/Src/stm32f2xx_hal_msp.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o - .text 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_it.o - .data 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_it.o - .bss 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0xa9c ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x258 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x8e ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x51 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x103 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x6a ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x1df ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0xbd ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0xe49 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x11f ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x6d ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x174 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x55 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x1056 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x153 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x170 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x115 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x108 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0xa5 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x16a ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x5f ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x236 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0xcce ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x126 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x216 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x113 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x82 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x8ed ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x4c ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x2aa ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0xba ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x12d ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000000000 0x19e ./Core/Src/stm32f2xx_it.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/syscalls.o - .text 0x0000000000000000 0x0 ./Core/Src/syscalls.o - .data 0x0000000000000000 0x0 ./Core/Src/syscalls.o - .bss 0x0000000000000000 0x0 ./Core/Src/syscalls.o - .bss.__env 0x0000000000000000 0x4 ./Core/Src/syscalls.o - .data.environ 0x0000000000000000 0x4 ./Core/Src/syscalls.o - .text.initialise_monitor_handles - 0x0000000000000000 0xc ./Core/Src/syscalls.o - .text._open 0x0000000000000000 0x1a ./Core/Src/syscalls.o - .text._wait 0x0000000000000000 0x20 ./Core/Src/syscalls.o - .text._unlink 0x0000000000000000 0x20 ./Core/Src/syscalls.o - .text._times 0x0000000000000000 0x16 ./Core/Src/syscalls.o - .text._stat 0x0000000000000000 0x1e ./Core/Src/syscalls.o - .text._link 0x0000000000000000 0x24 ./Core/Src/syscalls.o - .text._fork 0x0000000000000000 0x1c ./Core/Src/syscalls.o - .text._execve 0x0000000000000000 0x24 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0xa9c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x24 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x43 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x34 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x174 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x369 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x43 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x34 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x58 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x8e ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x177 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x35 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x6a ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x52 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x52 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x3d ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x35 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x29 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x258 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x103 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x1df ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0xbd ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0xe49 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x11f ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x6d ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x1056 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x153 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x170 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x115 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x108 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0xa5 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x16a ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x5f ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x236 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0xcce ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x126 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x216 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x113 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x82 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x8ed ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x4c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x2aa ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0xba ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x12d ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x19e ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x147 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x28 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x11 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x460 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x43 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x7c ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x17 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x118 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x4a ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x66 ./Core/Src/syscalls.o - .debug_macro 0x0000000000000000 0x6a0 ./Core/Src/syscalls.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/sysmem.o - .text 0x0000000000000000 0x0 ./Core/Src/sysmem.o - .data 0x0000000000000000 0x0 ./Core/Src/sysmem.o - .bss 0x0000000000000000 0x0 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xa9c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x258 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x8e ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x51 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x103 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x6a ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1df ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xbd ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xe49 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x11f ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x6d ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x174 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x55 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1056 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x153 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x170 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x115 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x108 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xa5 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x16a ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x5f ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x236 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xcce ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x126 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x216 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x113 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x82 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x8ed ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x4c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x2aa ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xba ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x12d ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x19e ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xac ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x24 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x61 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x43 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x34 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x35 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x43 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x34 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x58 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x8e ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x177 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x369 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x29 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x147 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x52 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x52 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xc1 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x3d ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0xc8 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x35 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x28 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x11 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x460 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x43 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x7c ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x17 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x118 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x4a ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x66 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x6a0 ./Core/Src/sysmem.o - .debug_macro 0x0000000000000000 0x31a ./Core/Src/sysmem.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o - .text 0x0000000000000000 0x0 ./Core/Src/system_stm32f2xx.o - .data 0x0000000000000000 0x0 ./Core/Src/system_stm32f2xx.o - .bss 0x0000000000000000 0x0 ./Core/Src/system_stm32f2xx.o - .text.SystemCoreClockUpdate - 0x0000000000000000 0x100 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0xa9c ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x8e ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x51 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x103 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x6a ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x1df ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x1c ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0xbd ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0xe49 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x11f ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x6d ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x258 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x174 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x55 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x1056 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x153 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x170 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x115 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x108 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0xa5 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x16a ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x5f ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x236 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0xcce ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x126 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x216 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x2e ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x113 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x82 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x8ed ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x4c ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x2aa ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x287 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0xba ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000000000 0x12d ./Core/Src/system_stm32f2xx.o - .text 0x0000000000000000 0x14 ./Core/Startup/startup_stm32f207zgtx.o - .data 0x0000000000000000 0x0 ./Core/Startup/startup_stm32f207zgtx.o - .bss 0x0000000000000000 0x0 ./Core/Startup/startup_stm32f207zgtx.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DeInit - 0x0000000000000000 0x58 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_MspInit - 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_MspDeInit - 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetTickPrio - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_SetTickFreq - 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetTickFreq - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_SuspendTick - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_ResumeTick - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetHalVersion - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetREVID - 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetDEVID - 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DBGMCU_EnableDBGSleepMode - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DBGMCU_DisableDBGSleepMode - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DBGMCU_EnableDBGStopMode - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DBGMCU_DisableDBGStopMode - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DBGMCU_EnableDBGStandbyMode - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DBGMCU_DisableDBGStandbyMode - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_EnableCompensationCell - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_DisableCompensationCell - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetUIDw0 - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetUIDw1 - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .text.HAL_GetUIDw2 - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_DisableIRQ - 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_GetPendingIRQ - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_SetPendingIRQ - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_ClearPendingIRQ - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_GetActive - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_GetPriority - 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.NVIC_DecodePriority - 0x0000000000000000 0x6c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_SystemReset - 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_DisableIRQ - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_SystemReset - 0x0000000000000000 0x8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_MPU_Disable - 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_MPU_Enable - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_MPU_ConfigRegion - 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_GetPriorityGrouping - 0x0000000000000000 0xe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_GetPriority - 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_SetPendingIRQ - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_GetPendingIRQ - 0x0000000000000000 0x1e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_ClearPendingIRQ - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_GetActive - 0x0000000000000000 0x1e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_SYSTICK_CLKSourceConfig - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_SYSTICK_IRQHandler - 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_SYSTICK_Callback - 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_Init - 0x0000000000000000 0x15c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_DeInit - 0x0000000000000000 0xbc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_Start - 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_Start_IT - 0x0000000000000000 0xb0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_Abort - 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_Abort_IT - 0x0000000000000000 0x42 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_PollForTransfer - 0x0000000000000000 0x1be ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_IRQHandler - 0x0000000000000000 0x314 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_RegisterCallback - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_UnRegisterCallback - 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.HAL_DMA_GetError - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.DMA_SetConfig - 0x0000000000000000 0x5a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.DMA_CalcBaseAndBitshift - 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .text.DMA_CheckFifoParam - 0x0000000000000000 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .rodata.flagBitshiftOffset.0 - 0x0000000000000000 0x8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_info 0x0000000000000000 0x8e7 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_abbrev 0x0000000000000000 0x264 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_aranges - 0x0000000000000000 0x90 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_rnglists - 0x0000000000000000 0x70 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_line 0x0000000000000000 0xfcf ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_str 0x0000000000000000 0xc4df5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .debug_frame 0x0000000000000000 0x250 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .text.HAL_DMAEx_MultiBufferStart - 0x0000000000000000 0x96 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .text.HAL_DMAEx_MultiBufferStart_IT - 0x0000000000000000 0x1290 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .text.HAL_DMAEx_ChangeMemory - 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .text.DMA_MultiBufferSetConfig - 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_info 0x0000000000000000 0x4df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_abbrev 0x0000000000000000 0x1a3 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_aranges - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_rnglists - 0x0000000000000000 0x27 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_line 0x0000000000000000 0x13fe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_str 0x0000000000000000 0xc4baf ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .debug_frame 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_DeInit - 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_GetReceivedFrame - 0x0000000000000000 0x106 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_GetReceivedFrame_IT - 0x0000000000000000 0x10e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_IRQHandler - 0x0000000000000000 0xc8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_TxCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_RxCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_ErrorCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_ConfigDMA - 0x0000000000000000 0x120 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_ETH_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_SetConfigLine - 0x0000000000000000 0x14c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_GetConfigLine - 0x0000000000000000 0xf0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_ClearConfigLine - 0x0000000000000000 0xc0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_RegisterCallback - 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_GetHandle - 0x0000000000000000 0x26 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_IRQHandler - 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_GetPending - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_ClearPending - 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .text.HAL_EXTI_GenerateSWI - 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_info 0x0000000000000000 0x4f4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_abbrev 0x0000000000000000 0x1c6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_aranges - 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_rnglists - 0x0000000000000000 0x46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_line 0x0000000000000000 0xa57 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_str 0x0000000000000000 0xc4a47 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .debug_frame 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .bss.pFlash 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_Program - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_Program_IT - 0x0000000000000000 0x9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_IRQHandler - 0x0000000000000000 0x140 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_EndOfOperationCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_OperationErrorCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_Unlock - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_Lock - 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_OB_Unlock - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_OB_Lock - 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_OB_Launch - 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.HAL_FLASH_GetError - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.FLASH_WaitForLastOperation - 0x0000000000000000 0x80 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.FLASH_Program_DoubleWord - 0x0000000000000000 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.FLASH_Program_Word - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.FLASH_Program_HalfWord - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.FLASH_Program_Byte - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .text.FLASH_SetErrorCode - 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_info 0x0000000000000000 0x570 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_abbrev 0x0000000000000000 0x28c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_aranges - 0x0000000000000000 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_rnglists - 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_line 0x0000000000000000 0xafe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_str 0x0000000000000000 0xc4bc4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .debug_frame 0x0000000000000000 0x274 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.HAL_FLASHEx_Erase - 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.HAL_FLASHEx_Erase_IT - 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.HAL_FLASHEx_OBProgram - 0x0000000000000000 0xdc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.HAL_FLASHEx_OBGetConfig - 0x0000000000000000 0x46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_Erase_Sector - 0x0000000000000000 0xa4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_FlushCaches - 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_MassErase - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_EnableWRP - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_DisableWRP - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_RDP_LevelConfig - 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_UserConfig - 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_BOR_LevelConfig - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_GetUser - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_GetWRP - 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_GetRDP - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .text.FLASH_OB_GetBOR - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_info 0x0000000000000000 0x6be ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_abbrev 0x0000000000000000 0x29d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_aranges - 0x0000000000000000 0x98 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_rnglists - 0x0000000000000000 0x72 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_line 0x0000000000000000 0xb26 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_str 0x0000000000000000 0xc4c28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .debug_frame 0x0000000000000000 0x250 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .text.HAL_GPIO_DeInit - 0x0000000000000000 0x1fc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .text.HAL_GPIO_ReadPin - 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .text.HAL_GPIO_TogglePin - 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .text.HAL_GPIO_LockPin - 0x0000000000000000 0x4e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .text.HAL_GPIO_EXTI_IRQHandler - 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .text.HAL_GPIO_EXTI_Callback - 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_DeInit - 0x0000000000000000 0x46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_Start - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_Stop - 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_IRQHandler - 0x0000000000000000 0x922 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_WKUP_IRQHandler - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_DataOutStageCallback - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_DataInStageCallback - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_SetupStageCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_SOFCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_ResetCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_SuspendCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_ResumeCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_ISOOUTIncompleteCallback - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_ISOINIncompleteCallback - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_ConnectCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_DisconnectCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_DevConnect - 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_DevDisconnect - 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_SetAddress - 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_Open - 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_Close - 0x0000000000000000 0x94 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_Receive - 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_GetRxCount - 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_Transmit - 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_SetStall - 0x0000000000000000 0xc8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_ClrStall - 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_Abort - 0x0000000000000000 0x62 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_EP_Flush - 0x0000000000000000 0x5a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_ActivateRemoteWakeup - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_DeActivateRemoteWakeup - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.HAL_PCD_SetTestMode - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.PCD_WriteEmptyTxFifo - 0x0000000000000000 0x11a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.PCD_EP_OutXfrComplete_int - 0x0000000000000000 0x1d0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .text.PCD_EP_OutSetupPacket_int - 0x0000000000000000 0x8c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .text.HAL_PCDEx_SetTxFiFo - 0x0000000000000000 0x8c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .text.HAL_PCDEx_SetRxFiFo - 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .text.HAL_PCDEx_LPM_Callback - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .text.HAL_PCDEx_BCD_Callback - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_info 0x0000000000000000 0x6cc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_abbrev 0x0000000000000000 0x1c7 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_aranges - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_rnglists - 0x0000000000000000 0x26 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_line 0x0000000000000000 0x84e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_str 0x0000000000000000 0xc4d86 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .debug_frame 0x0000000000000000 0xb0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_DeInit - 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnableBkUpAccess - 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_DisableBkUpAccess - 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_ConfigPVD - 0x0000000000000000 0xbc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnablePVD - 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_DisablePVD - 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnableWakeUpPin - 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_DisableWakeUpPin - 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnterSLEEPMode - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnterSTOPMode - 0x0000000000000000 0x58 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnterSTANDBYMode - 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_PVD_IRQHandler - 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_PVDCallback - 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnableSleepOnExit - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_DisableSleepOnExit - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_EnableSEVOnPend - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .text.HAL_PWR_DisableSEVOnPend - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_info 0x0000000000000000 0x78d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_abbrev 0x0000000000000000 0x203 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_aranges - 0x0000000000000000 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_rnglists - 0x0000000000000000 0x74 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x20d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_line 0x0000000000000000 0x9bb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_str 0x0000000000000000 0xc4c1b ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .debug_frame 0x0000000000000000 0x274 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .text.HAL_PWREx_EnableBkUpReg - 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .text.HAL_PWREx_DisableBkUpReg - 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .text.HAL_PWREx_EnableFlashPowerDown - 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .text.HAL_PWREx_DisableFlashPowerDown - 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_info 0x0000000000000000 0x263 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_abbrev 0x0000000000000000 0x155 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_aranges - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_rnglists - 0x0000000000000000 0x25 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_line 0x0000000000000000 0x878 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_str 0x0000000000000000 0xc4951 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .debug_frame 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_DeInit - 0x0000000000000000 0x164 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_MCOConfig - 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_EnableCSS - 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_DisableCSS - 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_GetOscConfig - 0x0000000000000000 0x184 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_GetClockConfig - 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_NMI_IRQHandler - 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .text.HAL_RCC_CSSCallback - 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .text.HAL_RCCEx_PeriphCLKConfig - 0x0000000000000000 0x1ec ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .text.HAL_RCCEx_GetPeriphCLKConfig - 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .text.HAL_RCCEx_EnablePLLI2S - 0x0000000000000000 0xb4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .text.HAL_RCCEx_DisablePLLI2S - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_info 0x0000000000000000 0x535 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_abbrev 0x0000000000000000 0x22a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_aranges - 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_rnglists - 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_line 0x0000000000000000 0x9bc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_str 0x0000000000000000 0xc4ad2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .debug_frame 0x0000000000000000 0xa4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .ARM.attributes - 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_DeInit - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_Start - 0x0000000000000000 0xcc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_Stop - 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_Start_IT - 0x0000000000000000 0xdc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_Stop_IT - 0x0000000000000000 0x5c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_Start_DMA - 0x0000000000000000 0x144 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_Stop_DMA - 0x0000000000000000 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_Init - 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_DeInit - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_Start - 0x0000000000000000 0x190 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_Stop - 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_Start_IT - 0x0000000000000000 0x22c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_Stop_IT - 0x0000000000000000 0x17c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_Start_DMA - 0x0000000000000000 0x390 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_Stop_DMA - 0x0000000000000000 0x1a4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_DeInit - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_Start - 0x0000000000000000 0x190 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_Stop - 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_Start_IT - 0x0000000000000000 0x22c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_Stop_IT - 0x0000000000000000 0x17c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_Start_DMA - 0x0000000000000000 0x390 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_Stop_DMA - 0x0000000000000000 0x1a4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_Init - 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_DeInit - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_Start - 0x0000000000000000 0x1b8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_Stop - 0x0000000000000000 0xc2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_Start_IT - 0x0000000000000000 0x250 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_Stop_IT - 0x0000000000000000 0x15c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_Start_DMA - 0x0000000000000000 0x354 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_Stop_DMA - 0x0000000000000000 0x184 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_Init - 0x0000000000000000 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_DeInit - 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_Start - 0x0000000000000000 0xc4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_Stop - 0x0000000000000000 0xd8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_Start_IT - 0x0000000000000000 0xe4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_Stop_IT - 0x0000000000000000 0xf8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_Init - 0x0000000000000000 0x14c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_DeInit - 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_Start - 0x0000000000000000 0x11c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_Stop - 0x0000000000000000 0x12e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_Start_IT - 0x0000000000000000 0x15c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_Stop_IT - 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_Start_DMA - 0x0000000000000000 0x2d8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_Stop_DMA - 0x0000000000000000 0x192 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_ConfigChannel - 0x0000000000000000 0xb8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_ConfigChannel - 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_ConfigChannel - 0x0000000000000000 0x1a4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_DMABurst_WriteStart - 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_DMABurst_MultiWriteStart - 0x0000000000000000 0x2a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_DMABurst_WriteStop - 0x0000000000000000 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_DMABurst_ReadStart - 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_DMABurst_MultiReadStart - 0x0000000000000000 0x2a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_DMABurst_ReadStop - 0x0000000000000000 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_GenerateEvent - 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_ConfigOCrefClear - 0x0000000000000000 0x198 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_ConfigTI1Input - 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_SlaveConfigSynchro - 0x0000000000000000 0x84 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_SlaveConfigSynchro_IT - 0x0000000000000000 0x84 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_ReadCapturedValue - 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PeriodElapsedHalfCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_CaptureHalfCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_PulseFinishedHalfCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_TriggerHalfCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_ErrorCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Base_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OC_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_PWM_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_IC_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_OnePulse_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_Encoder_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_GetActiveChannel - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_GetChannelState - 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.HAL_TIM_DMABurstState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMAError - 0x0000000000000000 0x92 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMADelayPulseCplt - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMADelayPulseHalfCplt - 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMACaptureCplt - 0x0000000000000000 0xc8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMACaptureHalfCplt - 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMAPeriodElapsedCplt - 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMAPeriodElapsedHalfCplt - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMATriggerCplt - 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_DMATriggerHalfCplt - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_SlaveTimer_SetConfig - 0x0000000000000000 0x122 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_TI1_SetConfig - 0x0000000000000000 0xe4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_TI2_SetConfig - 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_TI3_SetConfig - 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_TI4_SetConfig - 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_CCxChannelCmd - 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_Init - 0x0000000000000000 0x152 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_DeInit - 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_Start - 0x0000000000000000 0x11c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_Stop - 0x0000000000000000 0x70 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_Start_IT - 0x0000000000000000 0x12c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_Stop_IT - 0x0000000000000000 0x80 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_Start_DMA - 0x0000000000000000 0x16c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_Stop_DMA - 0x0000000000000000 0x7a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OCN_Start - 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OCN_Stop - 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OCN_Start_IT - 0x0000000000000000 0x1e4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OCN_Stop_IT - 0x0000000000000000 0x13e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OCN_Start_DMA - 0x0000000000000000 0x300 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OCN_Stop_DMA - 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_PWMN_Start - 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_PWMN_Stop - 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_PWMN_Start_IT - 0x0000000000000000 0x1e4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_PWMN_Stop_IT - 0x0000000000000000 0x13e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_PWMN_Start_DMA - 0x0000000000000000 0x300 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_PWMN_Stop_DMA - 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OnePulseN_Start - 0x0000000000000000 0xaa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OnePulseN_Stop - 0x0000000000000000 0xbe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OnePulseN_Start_IT - 0x0000000000000000 0xca ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_OnePulseN_Stop_IT - 0x0000000000000000 0xde ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_ConfigCommutEvent - 0x0000000000000000 0xbe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_ConfigCommutEvent_IT - 0x0000000000000000 0xbe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_ConfigCommutEvent_DMA - 0x0000000000000000 0xe4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_RemapConfig - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_CommutHalfCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_HallSensor_GetState - 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.HAL_TIMEx_GetChannelNState - 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.TIMEx_DMACommutationCplt - 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.TIMEx_DMACommutationHalfCplt - 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.TIM_DMADelayPulseNCplt - 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.TIM_DMAErrorCCxN - 0x0000000000000000 0x6e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .text.TIM_CCxNChannelCmd - 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_HalfDuplex_Init - 0x0000000000000000 0xb0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_LIN_Init - 0x0000000000000000 0xd2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_MultiProcessor_Init - 0x0000000000000000 0xe6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_DeInit - 0x0000000000000000 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_MspInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_MspDeInit - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Transmit - 0x0000000000000000 0x106 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Receive - 0x0000000000000000 0x124 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Transmit_IT - 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Receive_IT - 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Transmit_DMA - 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Receive_DMA - 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_DMAPause - 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_DMAResume - 0x0000000000000000 0x11a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_DMAStop - 0x0000000000000000 0xfe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UARTEx_ReceiveToIdle - 0x0000000000000000 0x1a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UARTEx_ReceiveToIdle_IT - 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UARTEx_ReceiveToIdle_DMA - 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UARTEx_GetRxEventType - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Abort - 0x0000000000000000 0x1d6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_AbortTransmit - 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_AbortReceive - 0x0000000000000000 0x146 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_Abort_IT - 0x0000000000000000 0x228 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_AbortTransmit_IT - 0x0000000000000000 0xe8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_AbortReceive_IT - 0x0000000000000000 0x164 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_IRQHandler - 0x0000000000000000 0x524 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_TxCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_TxHalfCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_RxCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_RxHalfCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_ErrorCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_AbortCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_AbortTransmitCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_AbortReceiveCpltCallback - 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UARTEx_RxEventCallback - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_LIN_SendBreak - 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_MultiProcessor_EnterMuteMode - 0x0000000000000000 0x7c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_MultiProcessor_ExitMuteMode - 0x0000000000000000 0x7c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_HalfDuplex_EnableTransmitter - 0x0000000000000000 0x66 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_HalfDuplex_EnableReceiver - 0x0000000000000000 0x66 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_GetState - 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.HAL_UART_GetError - 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMATransmitCplt - 0x0000000000000000 0x9a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMATxHalfCplt - 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMAReceiveCplt - 0x0000000000000000 0x12c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMARxHalfCplt - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMAError - 0x0000000000000000 0x94 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_WaitOnFlagUntilTimeout - 0x0000000000000000 0xdc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_Start_Receive_IT - 0x0000000000000000 0x72 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_Start_Receive_DMA - 0x0000000000000000 0x134 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_EndTxTransfer - 0x0000000000000000 0x4e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_EndRxTransfer - 0x0000000000000000 0xc4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMAAbortOnError - 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMATxAbortCallback - 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMARxAbortCallback - 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMATxOnlyAbortCallback - 0x0000000000000000 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_DMARxOnlyAbortCallback - 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_Transmit_IT - 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_EndTransmit_IT - 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.UART_Receive_IT - 0x0000000000000000 0x17c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_SetTurnaroundTime - 0x0000000000000000 0x144 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_EnableGlobalInt - 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_GetDevSpeed - 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ActivateEndpoint - 0x0000000000000000 0x10c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ActivateDedicatedEndpoint - 0x0000000000000000 0x10e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_DeactivateEndpoint - 0x0000000000000000 0x1b8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_DeactivateDedicatedEndpoint - 0x0000000000000000 0x162 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_EPStartXfer - 0x0000000000000000 0x530 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_EPStopXfer - 0x0000000000000000 0x152 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_WritePacket - 0x0000000000000000 0x7a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ReadPacket - 0x0000000000000000 0xae ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_EPSetStall - 0x0000000000000000 0xda ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_EPClearStall - 0x0000000000000000 0xca ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_StopDevice - 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_SetDevAddress - 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_DevConnect - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ReadInterrupts - 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ReadChInterrupts - 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ReadDevAllOutEpInterrupt - 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ReadDevAllInEpInterrupt - 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ReadDevOutEPInterrupt - 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ReadDevInEPInterrupt - 0x0000000000000000 0x5a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ClearInterrupts - 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ActivateSetup - 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_EP0_OutStart - 0x0000000000000000 0xb8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_HostInit - 0x0000000000000000 0x180 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_InitFSLSPClkSel - 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ResetPort - 0x0000000000000000 0x54 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_DriveVbus - 0x0000000000000000 0x70 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_GetHostSpeed - 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_GetCurrentFrame - 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_HC_Init - 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_HC_StartXfer - 0x0000000000000000 0x4ec ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_HC_ReadInterrupt - 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_HC_Halt - 0x0000000000000000 0x23e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_DoPing - 0x0000000000000000 0x74 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_StopHost - 0x0000000000000000 0x124 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_ActivateRemoteWakeup - 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.USB_DeActivateRemoteWakeup - 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/App/lwip.o - .text 0x0000000000000000 0x0 ./LWIP/App/lwip.o - .data 0x0000000000000000 0x0 ./LWIP/App/lwip.o - .bss 0x0000000000000000 0x0 ./LWIP/App/lwip.o - .bss.DHCPfineTimer - 0x0000000000000000 0x4 ./LWIP/App/lwip.o - .bss.DHCPcoarseTimer - 0x0000000000000000 0x4 ./LWIP/App/lwip.o - .text.MX_LWIP_Process - 0x0000000000000000 0x18 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xa9c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x258 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x2e ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x8e ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x51 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x103 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x6a ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1df ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xbd ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xe49 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x11f ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x14fe1 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x6d ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x35a5 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x174 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x55 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1056 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x153 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x170 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x115 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x108 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xa5 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16a ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x287 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x5f ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x236 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xcce ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x126 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x216 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x2e ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x113 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x82 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x8ed ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x4c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x2aa ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x287 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xba ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x12d ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x19e ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xac ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x24 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x61 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x43 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x34 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x35 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x43 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x34 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x58 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x8e ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x177 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x369 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x29 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x147 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x52 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x52 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xc1 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x3d ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xc8 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x35 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x28 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x11 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x460 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x43 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x7c ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x17 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x118 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x4a ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x66 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x6a0 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x3f ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x2b ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x15b ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x55 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x6a ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x185 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x14d ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x8f ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x8e ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x28 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x5a ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x2e ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0xe3 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x38 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x29 ./LWIP/App/lwip.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o - .text 0x0000000000000000 0x0 ./LWIP/Target/ethernetif.o - .data 0x0000000000000000 0x0 ./LWIP/Target/ethernetif.o - .bss 0x0000000000000000 0x0 ./LWIP/Target/ethernetif.o - .text.HAL_ETH_MspDeInit - 0x0000000000000000 0x7c ./LWIP/Target/ethernetif.o - .text.low_level_input - 0x0000000000000000 0x164 ./LWIP/Target/ethernetif.o - .text.ethernetif_input - 0x0000000000000000 0x40 ./LWIP/Target/ethernetif.o - .text.sys_jiffies - 0x0000000000000000 0xe ./LWIP/Target/ethernetif.o - .bss.EthernetLinkTimer - 0x0000000000000000 0x4 ./LWIP/Target/ethernetif.o - .text.ethernetif_set_link - 0x0000000000000000 0x88 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xa9c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x258 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x2e ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x8e ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x51 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x103 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x6a ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1df ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xbd ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xe49 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x11f ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x14fe1 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x6d ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x35a5 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x174 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x55 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1056 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x153 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x170 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x115 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x108 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xa5 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16a ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x287 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x5f ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x236 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xcce ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x126 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x216 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x2e ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x113 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x82 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x8ed ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x4c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x2aa ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x287 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xba ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x12d ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x19e ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xb2 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x24 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x61 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x43 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x34 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x35 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x43 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x34 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x58 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x8e ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x177 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x369 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x29 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x147 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x52 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x52 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xc1 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x3d ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0xc8 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x35 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x28 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x11 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x460 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x43 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x7c ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x17 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x118 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x4a ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x66 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x6a0 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x3f ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x2b ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x15b ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x6a ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x14d ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x8f ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x5a ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x8e ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x28 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_line 0x0000000000000000 0xb6b ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .debug_str 0x0000000000000000 0xccd29 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_line 0x0000000000000000 0xb6b ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .debug_str 0x0000000000000000 0xccd29 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/err.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/err.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x4bc ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_macro 0x0000000000000000 0x320 ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_line 0x0000000000000000 0xb8d ./Middlewares/Third_Party/LwIP/src/api/err.o - .debug_str 0x0000000000000000 0xcdab6 ./Middlewares/Third_Party/LwIP/src/api/err.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/err.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/err.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_line 0x0000000000000000 0xb6a ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .debug_str 0x0000000000000000 0xccd28 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x49c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_line 0x0000000000000000 0xb74 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .debug_str 0x0000000000000000 0xccd39 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/netdb.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_line 0x0000000000000000 0xb6c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .debug_str 0x0000000000000000 0xccd2a ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_line 0x0000000000000000 0xb6b ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .debug_str 0x0000000000000000 0xccd29 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/sockets.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_line 0x0000000000000000 0xb69 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .debug_str 0x0000000000000000 0xccd27 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.msg_generate_packet_id - 0x0000000000000000 0x36 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .rodata 0x0000000000000000 0x5f9 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_output_send - 0x0000000000000000 0x130 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_create_request - 0x0000000000000000 0x8c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_append_request - 0x0000000000000000 0x98 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_delete_request - 0x0000000000000000 0x1e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_take_request - 0x0000000000000000 0xa4 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_request_time_elapsed - 0x0000000000000000 0xa4 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_clear_requests - 0x0000000000000000 0x54 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_init_requests - 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_output_append_u8 - 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_output_append_u16 - 0x0000000000000000 0x4e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_output_append_buf - 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_output_append_string - 0x0000000000000000 0x84 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_output_append_fixed_header - 0x0000000000000000 0x94 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_output_check_space - 0x0000000000000000 0x68 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_close - 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_cyclic_timer - 0x0000000000000000 0x130 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.pub_ack_rec_rel_response - 0x0000000000000000 0x7a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_incomming_suback - 0x0000000000000000 0x36 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_message_received - 0x0000000000000000 0x294 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_parse_incoming - 0x0000000000000000 0x1ac ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_tcp_recv_cb - 0x0000000000000000 0xbc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_tcp_sent_cb - 0x0000000000000000 0x74 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_tcp_err_cb - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_tcp_poll_cb - 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_tcp_connect_cb - 0x0000000000000000 0x84 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_publish - 0x0000000000000000 0x1a4 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_sub_unsub - 0x0000000000000000 0x1a8 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_set_inpub_callback - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_client_new - 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_client_connect - 0x0000000000000000 0x364 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_disconnect - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .text.mqtt_client_is_connected - 0x0000000000000000 0x40 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_info 0x0000000000000000 0x1a39 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_abbrev 0x0000000000000000 0x32f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_aranges - 0x0000000000000000 0x120 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_rnglists - 0x0000000000000000 0x10d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x63c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_line 0x0000000000000000 0x197b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_str 0x0000000000000000 0xd1bf8 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .debug_frame 0x0000000000000000 0x4e0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/def.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/def.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/def.o - .text.lwip_strnstr - 0x0000000000000000 0x6c ./Middlewares/Third_Party/LwIP/src/core/def.o - .text.lwip_stricmp - 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/def.o - .text.lwip_strnicmp - 0x0000000000000000 0x72 ./Middlewares/Third_Party/LwIP/src/core/def.o - .rodata 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/def.o - .text.lwip_itoa - 0x0000000000000000 0x98 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/def.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_line 0x0000000000000000 0xb68 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .debug_str 0x0000000000000000 0xccd26 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/dns.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/dns.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.lwip_standard_chksum - 0x0000000000000000 0xb8 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.inet_cksum_pseudo_base - 0x0000000000000000 0xd8 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.inet_chksum_pseudo - 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.ip_chksum_pseudo - 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .rodata 0x0000000000000000 0x6c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.inet_cksum_pseudo_partial_base - 0x0000000000000000 0x124 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.inet_chksum_pseudo_partial - 0x0000000000000000 0x7e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.ip_chksum_pseudo_partial - 0x0000000000000000 0x3a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.inet_chksum - 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .text.inet_chksum_pbuf - 0x0000000000000000 0x94 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_info 0x0000000000000000 0x5fa ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_abbrev 0x0000000000000000 0x186 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_aranges - 0x0000000000000000 0x60 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_rnglists - 0x0000000000000000 0x47 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x51a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_line 0x0000000000000000 0xea4 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_str 0x0000000000000000 0xceb5c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .debug_frame 0x0000000000000000 0x158 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/init.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/init.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x5e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .text.mem_calloc - 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .text.memp_malloc_pool - 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .text.memp_free_pool - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .text.netif_input - 0x0000000000000000 0x36 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .text.netif_remove - 0x0000000000000000 0xa8 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .text.netif_find - 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .text.netif_set_link_up - 0x0000000000000000 0x5c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .text.netif_set_link_down - 0x0000000000000000 0x40 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_free_ooseq - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_dechain - 0x0000000000000000 0xa4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_skip_const - 0x0000000000000000 0x50 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_skip - 0x0000000000000000 0x26 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_take - 0x0000000000000000 0x124 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_take_at - 0x0000000000000000 0xa4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_coalesce - 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_get_at - 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_try_get_at - 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_put_at - 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_memcmp - 0x0000000000000000 0x9e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_memfind - 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_strstr - 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_line 0x0000000000000000 0xb68 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .debug_str 0x0000000000000000 0xccd26 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/raw.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/raw.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_line 0x0000000000000000 0xb6a ./Middlewares/Third_Party/LwIP/src/core/stats.o - .debug_str 0x0000000000000000 0xccd28 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/stats.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/stats.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x49b ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_line 0x0000000000000000 0xb71 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .debug_str 0x0000000000000000 0xcd218 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/sys.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/sys.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .rodata.tcp_state_str - 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .data.tcp_port - 0x0000000000000000 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_shutdown - 0x0000000000000000 0x90 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_bind - 0x0000000000000000 0x124 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_accept_null - 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_listen_with_backlog - 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_listen_with_backlog_and_err - 0x0000000000000000 0x130 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_new_port - 0x0000000000000000 0x88 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_connect - 0x0000000000000000 0x1e8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_txnow - 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_setprio - 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_new 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_new_ip_type - 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_arg 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_recv - 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_sent - 0x0000000000000000 0x40 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_err 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_accept - 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_poll - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_debug_state_str - 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x9b ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .text.tcp_pbuf_prealloc - 0x0000000000000000 0xc4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .text.tcp_write_checks - 0x0000000000000000 0xec ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .text.tcp_write - 0x0000000000000000 0x6b4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .text.sys_untimeout - 0x0000000000000000 0x8c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .text.sys_check_timeouts - 0x0000000000000000 0xa4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .text.sys_restart_timeouts - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .text.sys_timeouts_sleeptime - 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .text.udp_send - 0x0000000000000000 0x30 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .text.udp_sendto - 0x0000000000000000 0x54 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .text.udp_disconnect - 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .text.udp_new_ip_type - 0x0000000000000000 0x1a ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x2f ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_line 0x0000000000000000 0xb70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .debug_str 0x0000000000000000 0xccd2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_set_struct - 0x0000000000000000 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_cleanup - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_inform - 0x0000000000000000 0xdc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_network_changed - 0x0000000000000000 0x56 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x2f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_find_addr - 0x0000000000000000 0xa8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_get_entry - 0x0000000000000000 0xd0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x185 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_line 0x0000000000000000 0xb6e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .debug_str 0x0000000000000000 0xccd2c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .text.ip4_output - 0x0000000000000000 0x6c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .text.ip4_addr_netmask_valid - 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .text.ipaddr_addr - 0x0000000000000000 0x2a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .rodata 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .text.ip4addr_aton - 0x0000000000000000 0x280 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .text.ip4addr_ntoa - 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .text.ip4addr_ntoa_r - 0x0000000000000000 0x100 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .bss.str.0 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_line 0x0000000000000000 0xb6f ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .debug_str 0x0000000000000000 0xccd2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_line 0x0000000000000000 0xb70 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .debug_str 0x0000000000000000 0xccd2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_line 0x0000000000000000 0xb6f ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .debug_str 0x0000000000000000 0xccd2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_line 0x0000000000000000 0xb6f ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .debug_str 0x0000000000000000 0xccd2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_line 0x0000000000000000 0xb6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .debug_str 0x0000000000000000 0xccd2b ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_line 0x0000000000000000 0xb72 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .debug_str 0x0000000000000000 0xccd30 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x5ba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_line 0x0000000000000000 0xce6 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .debug_str 0x0000000000000000 0xd02ca ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_line 0x0000000000000000 0xb6e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .debug_str 0x0000000000000000 0xccd2c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_line 0x0000000000000000 0xb6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .debug_str 0x0000000000000000 0xccd2b ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x4ab ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_line 0x0000000000000000 0xbbe ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .debug_str 0x0000000000000000 0xccdec ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .rodata 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .text.slipif_output - 0x0000000000000000 0x104 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .text.slipif_output_v4 - 0x0000000000000000 0x1e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .text.slipif_rxbyte - 0x0000000000000000 0x19c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .text.slipif_rxbyte_input - 0x0000000000000000 0x3c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .text.slipif_init - 0x0000000000000000 0xa8 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .text.slipif_poll - 0x0000000000000000 0x74 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_info 0x0000000000000000 0x79b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_abbrev 0x0000000000000000 0x25c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_aranges - 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_rnglists - 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x57b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_line 0x0000000000000000 0xeec ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_str 0x0000000000000000 0xd047b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .debug_frame 0x0000000000000000 0xe8 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_line 0x0000000000000000 0xbb2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .debug_str 0x0000000000000000 0xccdee ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_line 0x0000000000000000 0xbb1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .debug_str 0x0000000000000000 0xccded ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_line 0x0000000000000000 0xbb6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .debug_str 0x0000000000000000 0xccdf2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_line 0x0000000000000000 0xbb6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .debug_str 0x0000000000000000 0xccdf2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_line 0x0000000000000000 0xbb5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .debug_str 0x0000000000000000 0xccdf1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_line 0x0000000000000000 0xbb4 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .debug_str 0x0000000000000000 0xccdf0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_line 0x0000000000000000 0xbb1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .debug_str 0x0000000000000000 0xccded ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_line 0x0000000000000000 0xbb1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .debug_str 0x0000000000000000 0xccded ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_line 0x0000000000000000 0xbb3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .debug_str 0x0000000000000000 0xccdef ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_line 0x0000000000000000 0xbb1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .debug_str 0x0000000000000000 0xccded ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_line 0x0000000000000000 0xbb2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .debug_str 0x0000000000000000 0xccdee ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x4a2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_line 0x0000000000000000 0xbb4 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .debug_str 0x0000000000000000 0xccdf0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_line 0x0000000000000000 0xbb1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .debug_str 0x0000000000000000 0xccded ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_line 0x0000000000000000 0xbb3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .debug_str 0x0000000000000000 0xccdef ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_line 0x0000000000000000 0xbb2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .debug_str 0x0000000000000000 0xccdee ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_line 0x0000000000000000 0xbb7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .debug_str 0x0000000000000000 0xccdf3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_line 0x0000000000000000 0xbb1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .debug_str 0x0000000000000000 0xccded ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_line 0x0000000000000000 0xbb4 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .debug_str 0x0000000000000000 0xccdf0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_line 0x0000000000000000 0xbb6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .debug_str 0x0000000000000000 0xccdf2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_line 0x0000000000000000 0xbb3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .debug_str 0x0000000000000000 0xccdef ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_line 0x0000000000000000 0xbb6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .debug_str 0x0000000000000000 0xccdf2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_line 0x0000000000000000 0xbb3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .debug_str 0x0000000000000000 0xccdef ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_line 0x0000000000000000 0xbb2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .debug_str 0x0000000000000000 0xccdee ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_line 0x0000000000000000 0xbb3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .debug_str 0x0000000000000000 0xccdef ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_aranges - 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_line 0x0000000000000000 0xbb0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .debug_str 0x0000000000000000 0xccdec ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .ARM.attributes - 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) - .text.exit 0x0000000000000000 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) - .debug_frame 0x0000000000000000 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - .text.srand 0x0000000000000000 0x5c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.__fp_lock - 0x0000000000000000 0x18 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.__fp_unlock - 0x0000000000000000 0x18 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.__sfp 0x0000000000000000 0xa8 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.__fp_lock_all - 0x0000000000000000 0x1c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.__fp_unlock_all - 0x0000000000000000 0x1c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - .text._printf_r - 0x0000000000000000 0x1c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - .text._puts_r 0x0000000000000000 0xa8 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - .text.puts 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - .debug_frame 0x0000000000000000 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - .text.__seofread - 0x0000000000000000 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - .text.__swbuf 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) - .text.strncmp 0x0000000000000000 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) - .debug_frame 0x0000000000000000 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - .text._reclaim_reent - 0x0000000000000000 0xac C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_init - 0x0000000000000000 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_init_recursive - 0x0000000000000000 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_close - 0x0000000000000000 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_close_recursive - 0x0000000000000000 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_acquire - 0x0000000000000000 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_try_acquire - 0x0000000000000000 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_try_acquire_recursive - 0x0000000000000000 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text.__retarget_lock_release - 0x0000000000000000 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .bss.__lock___arc4random_mutex - 0x0000000000000000 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .bss.__lock___at_quick_exit_mutex - 0x0000000000000000 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .bss.__lock___atexit_recursive_mutex - 0x0000000000000000 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .bss.__lock___dd_hash_mutex - 0x0000000000000000 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .bss.__lock___env_recursive_mutex - 0x0000000000000000 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .bss.__lock___tz_mutex - 0x0000000000000000 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .text 0x0000000000000000 0x14 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) - .debug_frame 0x0000000000000000 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) - .ARM.attributes - 0x0000000000000000 0x1b C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) - .text 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) - .ARM.attributes - 0x0000000000000000 0x17 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - .text.__assert - 0x0000000000000000 0xa C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - .text.free 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .text.__sprint_r - 0x0000000000000000 0x1a C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .text.vfprintf - 0x0000000000000000 0x14 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - .text.fflush 0x0000000000000000 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - .text._fprintf_r - 0x0000000000000000 0x1a C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) - .text.__sfvwrite_r - 0x0000000000000000 0x294 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) - .debug_frame 0x0000000000000000 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) - .text.memmove 0x0000000000000000 0x34 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) - .debug_frame 0x0000000000000000 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) - .text._realloc_r - 0x0000000000000000 0x5e C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) - .debug_frame 0x0000000000000000 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .text._init_signal_r - 0x0000000000000000 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .text._signal_r - 0x0000000000000000 0x30 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .text.__sigtramp_r - 0x0000000000000000 0x48 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .text.signal 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .text._init_signal - 0x0000000000000000 0xc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .text.__sigtramp - 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) - .text._malloc_usable_size_r - 0x0000000000000000 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) - .debug_frame 0x0000000000000000 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - .ARM.extab 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o - .rodata 0x0000000000000000 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o - .eh_frame 0x0000000000000000 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o - .comment 0x0000000000000000 0x44 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o - .ARM.attributes - 0x0000000000000000 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o - .text 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o - .data 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o - .bss 0x0000000000000000 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o - -Memory Configuration - -Name Origin Length Attributes -RAM 0x0000000020000000 0x0000000000020000 xrw -FLASH 0x0000000008000000 0x0000000000100000 xr -*default* 0x0000000000000000 0xffffffffffffffff - -Linker script and memory map - -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o -LOAD ./Core/Src/main.o -LOAD ./Core/Src/stm32f2xx_hal_msp.o -LOAD ./Core/Src/stm32f2xx_it.o -LOAD ./Core/Src/syscalls.o -LOAD ./Core/Src/sysmem.o -LOAD ./Core/Src/system_stm32f2xx.o -LOAD ./Core/Startup/startup_stm32f207zgtx.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o -LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o -LOAD ./LWIP/App/lwip.o -LOAD ./LWIP/Target/ethernetif.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/api_lib.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/api_msg.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/err.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/netbuf.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/netdb.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/netifapi.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/sockets.o -LOAD ./Middlewares/Third_Party/LwIP/src/api/tcpip.o -LOAD ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/def.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/dns.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/init.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ip.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/mem.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/memp.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/netif.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/pbuf.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/raw.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/stats.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/sys.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/tcp.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/timeouts.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/udp.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o -LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/slipif.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o -LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o -START GROUP -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libstdc++_nano.a -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libsupc++_nano.a -END GROUP -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libstdc++_nano.a -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libm.a -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a -START GROUP -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a -END GROUP -START GROUP -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a -END GROUP -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o - 0x0000000020020000 _estack = (ORIGIN (RAM) + LENGTH (RAM)) - 0x0000000000000200 _Min_Heap_Size = 0x200 - 0x0000000000000400 _Min_Stack_Size = 0x400 - -.isr_vector 0x0000000008000000 0x184 - 0x0000000008000000 . = ALIGN (0x4) - *(.isr_vector) - .isr_vector 0x0000000008000000 0x184 ./Core/Startup/startup_stm32f207zgtx.o - 0x0000000008000000 g_pfnVectors - 0x0000000008000184 . = ALIGN (0x4) - -.text 0x0000000008000184 0x10784 - 0x0000000008000184 . = ALIGN (0x4) - *(.text) - .text 0x0000000008000184 0x40 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - .text 0x00000000080001c4 0x30 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) - 0x00000000080001c4 __aeabi_uldivmod - .text 0x00000000080001f4 0x2cc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - 0x00000000080001f4 __udivmoddi4 - .text 0x00000000080004c0 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) - 0x00000000080004c0 __aeabi_idiv0 - 0x00000000080004c0 __aeabi_ldiv0 - *(.text*) - .text.main 0x00000000080004c4 0x2a ./Core/Src/main.o - 0x00000000080004c4 main - .text.SystemClock_Config - 0x00000000080004ee 0x8e ./Core/Src/main.o - 0x00000000080004ee SystemClock_Config - .text.MX_TIM1_Init - 0x000000000800057c 0x188 ./Core/Src/main.o - .text.MX_TIM3_Init - 0x0000000008000704 0x130 ./Core/Src/main.o - .text.MX_TIM7_Init - 0x0000000008000834 0x6c ./Core/Src/main.o - .text.MX_USART3_UART_Init - 0x00000000080008a0 0x54 ./Core/Src/main.o - .text.MX_USB_OTG_FS_PCD_Init - 0x00000000080008f4 0x54 ./Core/Src/main.o - .text.MX_GPIO_Init - 0x0000000008000948 0x178 ./Core/Src/main.o - .text.Error_Handler - 0x0000000008000ac0 0xa ./Core/Src/main.o - 0x0000000008000ac0 Error_Handler - *fill* 0x0000000008000aca 0x2 - .text.HAL_MspInit - 0x0000000008000acc 0x4c ./Core/Src/stm32f2xx_hal_msp.o - 0x0000000008000acc HAL_MspInit - .text.HAL_TIM_Base_MspInit - 0x0000000008000b18 0xa8 ./Core/Src/stm32f2xx_hal_msp.o - 0x0000000008000b18 HAL_TIM_Base_MspInit - .text.HAL_TIM_MspPostInit - 0x0000000008000bc0 0x148 ./Core/Src/stm32f2xx_hal_msp.o - 0x0000000008000bc0 HAL_TIM_MspPostInit - .text.HAL_UART_MspInit - 0x0000000008000d08 0x90 ./Core/Src/stm32f2xx_hal_msp.o - 0x0000000008000d08 HAL_UART_MspInit - .text.HAL_PCD_MspInit - 0x0000000008000d98 0xb4 ./Core/Src/stm32f2xx_hal_msp.o - 0x0000000008000d98 HAL_PCD_MspInit - .text.NMI_Handler - 0x0000000008000e4c 0x6 ./Core/Src/stm32f2xx_it.o - 0x0000000008000e4c NMI_Handler - .text.HardFault_Handler - 0x0000000008000e52 0x6 ./Core/Src/stm32f2xx_it.o - 0x0000000008000e52 HardFault_Handler - .text.MemManage_Handler - 0x0000000008000e58 0x6 ./Core/Src/stm32f2xx_it.o - 0x0000000008000e58 MemManage_Handler - .text.BusFault_Handler - 0x0000000008000e5e 0x6 ./Core/Src/stm32f2xx_it.o - 0x0000000008000e5e BusFault_Handler - .text.UsageFault_Handler - 0x0000000008000e64 0x6 ./Core/Src/stm32f2xx_it.o - 0x0000000008000e64 UsageFault_Handler - .text.SVC_Handler - 0x0000000008000e6a 0xc ./Core/Src/stm32f2xx_it.o - 0x0000000008000e6a SVC_Handler - .text.DebugMon_Handler - 0x0000000008000e76 0xc ./Core/Src/stm32f2xx_it.o - 0x0000000008000e76 DebugMon_Handler - .text.PendSV_Handler - 0x0000000008000e82 0xc ./Core/Src/stm32f2xx_it.o - 0x0000000008000e82 PendSV_Handler - .text.SysTick_Handler - 0x0000000008000e8e 0xc ./Core/Src/stm32f2xx_it.o - 0x0000000008000e8e SysTick_Handler - *fill* 0x0000000008000e9a 0x2 - .text.TIM7_IRQHandler - 0x0000000008000e9c 0x14 ./Core/Src/stm32f2xx_it.o - 0x0000000008000e9c TIM7_IRQHandler - .text._getpid 0x0000000008000eb0 0xe ./Core/Src/syscalls.o - 0x0000000008000eb0 _getpid - *fill* 0x0000000008000ebe 0x2 - .text._kill 0x0000000008000ec0 0x24 ./Core/Src/syscalls.o - 0x0000000008000ec0 _kill - .text._exit 0x0000000008000ee4 0x14 ./Core/Src/syscalls.o - 0x0000000008000ee4 _exit - .text._read 0x0000000008000ef8 0x3a ./Core/Src/syscalls.o - 0x0000000008000ef8 _read - .text._write 0x0000000008000f32 0x38 ./Core/Src/syscalls.o - 0x0000000008000f32 _write - .text._close 0x0000000008000f6a 0x16 ./Core/Src/syscalls.o - 0x0000000008000f6a _close - .text._fstat 0x0000000008000f80 0x1e ./Core/Src/syscalls.o - 0x0000000008000f80 _fstat - .text._isatty 0x0000000008000f9e 0x14 ./Core/Src/syscalls.o - 0x0000000008000f9e _isatty - .text._lseek 0x0000000008000fb2 0x18 ./Core/Src/syscalls.o - 0x0000000008000fb2 _lseek - *fill* 0x0000000008000fca 0x2 - .text._sbrk 0x0000000008000fcc 0x70 ./Core/Src/sysmem.o - 0x0000000008000fcc _sbrk - .text.SystemInit - 0x000000000800103c 0xc ./Core/Src/system_stm32f2xx.o - 0x000000000800103c SystemInit - .text.Reset_Handler - 0x0000000008001048 0x50 ./Core/Startup/startup_stm32f207zgtx.o - 0x0000000008001048 Reset_Handler - .text.Default_Handler - 0x0000000008001098 0x2 ./Core/Startup/startup_stm32f207zgtx.o - 0x0000000008001098 RTC_Alarm_IRQHandler - 0x0000000008001098 HASH_RNG_IRQHandler - 0x0000000008001098 EXTI2_IRQHandler - 0x0000000008001098 TIM8_CC_IRQHandler - 0x0000000008001098 TIM1_CC_IRQHandler - 0x0000000008001098 DMA2_Stream5_IRQHandler - 0x0000000008001098 DMA1_Stream5_IRQHandler - 0x0000000008001098 PVD_IRQHandler - 0x0000000008001098 SDIO_IRQHandler - 0x0000000008001098 TAMP_STAMP_IRQHandler - 0x0000000008001098 CAN2_RX1_IRQHandler - 0x0000000008001098 EXTI3_IRQHandler - 0x0000000008001098 TIM8_TRG_COM_TIM14_IRQHandler - 0x0000000008001098 TIM1_UP_TIM10_IRQHandler - 0x0000000008001098 TIM8_UP_TIM13_IRQHandler - 0x0000000008001098 I2C3_ER_IRQHandler - 0x0000000008001098 EXTI0_IRQHandler - 0x0000000008001098 I2C2_EV_IRQHandler - 0x0000000008001098 DMA1_Stream2_IRQHandler - 0x0000000008001098 CAN1_RX0_IRQHandler - 0x0000000008001098 OTG_HS_WKUP_IRQHandler - 0x0000000008001098 CAN2_SCE_IRQHandler - 0x0000000008001098 DMA2_Stream2_IRQHandler - 0x0000000008001098 SPI1_IRQHandler - 0x0000000008001098 TIM6_DAC_IRQHandler - 0x0000000008001098 TIM1_BRK_TIM9_IRQHandler - 0x0000000008001098 DCMI_IRQHandler - 0x0000000008001098 CAN2_RX0_IRQHandler - 0x0000000008001098 DMA2_Stream3_IRQHandler - 0x0000000008001098 USART6_IRQHandler - 0x0000000008001098 USART3_IRQHandler - 0x0000000008001098 CAN1_RX1_IRQHandler - 0x0000000008001098 UART5_IRQHandler - 0x0000000008001098 DMA2_Stream0_IRQHandler - 0x0000000008001098 TIM4_IRQHandler - 0x0000000008001098 I2C1_EV_IRQHandler - 0x0000000008001098 DMA1_Stream6_IRQHandler - 0x0000000008001098 DMA1_Stream1_IRQHandler - 0x0000000008001098 UART4_IRQHandler - 0x0000000008001098 TIM3_IRQHandler - 0x0000000008001098 RCC_IRQHandler - 0x0000000008001098 TIM8_BRK_TIM12_IRQHandler - 0x0000000008001098 Default_Handler - 0x0000000008001098 EXTI15_10_IRQHandler - 0x0000000008001098 ADC_IRQHandler - 0x0000000008001098 DMA1_Stream7_IRQHandler - 0x0000000008001098 CAN2_TX_IRQHandler - 0x0000000008001098 TIM5_IRQHandler - 0x0000000008001098 DMA2_Stream7_IRQHandler - 0x0000000008001098 I2C3_EV_IRQHandler - 0x0000000008001098 EXTI9_5_IRQHandler - 0x0000000008001098 RTC_WKUP_IRQHandler - 0x0000000008001098 ETH_WKUP_IRQHandler - 0x0000000008001098 SPI2_IRQHandler - 0x0000000008001098 OTG_HS_EP1_IN_IRQHandler - 0x0000000008001098 DMA1_Stream0_IRQHandler - 0x0000000008001098 CAN1_TX_IRQHandler - 0x0000000008001098 EXTI4_IRQHandler - 0x0000000008001098 FSMC_IRQHandler - 0x0000000008001098 ETH_IRQHandler - 0x0000000008001098 OTG_HS_EP1_OUT_IRQHandler - 0x0000000008001098 WWDG_IRQHandler - 0x0000000008001098 TIM2_IRQHandler - 0x0000000008001098 OTG_FS_WKUP_IRQHandler - 0x0000000008001098 TIM1_TRG_COM_TIM11_IRQHandler - 0x0000000008001098 OTG_HS_IRQHandler - 0x0000000008001098 EXTI1_IRQHandler - 0x0000000008001098 USART2_IRQHandler - 0x0000000008001098 I2C2_ER_IRQHandler - 0x0000000008001098 DMA2_Stream1_IRQHandler - 0x0000000008001098 CAN1_SCE_IRQHandler - 0x0000000008001098 FLASH_IRQHandler - 0x0000000008001098 DMA2_Stream4_IRQHandler - 0x0000000008001098 USART1_IRQHandler - 0x0000000008001098 OTG_FS_IRQHandler - 0x0000000008001098 SPI3_IRQHandler - 0x0000000008001098 DMA1_Stream4_IRQHandler - 0x0000000008001098 I2C1_ER_IRQHandler - 0x0000000008001098 DMA2_Stream6_IRQHandler - 0x0000000008001098 DMA1_Stream3_IRQHandler - *fill* 0x000000000800109a 0x2 - .text.HAL_Init - 0x000000000800109c 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x000000000800109c HAL_Init - .text.HAL_InitTick - 0x00000000080010e0 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x00000000080010e0 HAL_InitTick - .text.HAL_IncTick - 0x0000000008001140 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x0000000008001140 HAL_IncTick - .text.HAL_GetTick - 0x0000000008001164 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x0000000008001164 HAL_GetTick - .text.HAL_Delay - 0x0000000008001178 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x0000000008001178 HAL_Delay - .text.__NVIC_SetPriorityGrouping - 0x00000000080011c0 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_GetPriorityGrouping - 0x0000000008001208 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_EnableIRQ - 0x0000000008001224 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.__NVIC_SetPriority - 0x000000000800125c 0x54 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.NVIC_EncodePriority - 0x00000000080012b0 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.SysTick_Config - 0x0000000008001314 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .text.HAL_NVIC_SetPriorityGrouping - 0x0000000008001358 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - 0x0000000008001358 HAL_NVIC_SetPriorityGrouping - .text.HAL_NVIC_SetPriority - 0x000000000800136e 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - 0x000000000800136e HAL_NVIC_SetPriority - .text.HAL_NVIC_EnableIRQ - 0x00000000080013a6 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - 0x00000000080013a6 HAL_NVIC_EnableIRQ - .text.HAL_SYSTICK_Config - 0x00000000080013c2 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - 0x00000000080013c2 HAL_SYSTICK_Config - *fill* 0x00000000080013da 0x2 - .text.HAL_ETH_Init - 0x00000000080013dc 0x318 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x00000000080013dc HAL_ETH_Init - .text.HAL_ETH_DMATxDescListInit - 0x00000000080016f4 0xce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x00000000080016f4 HAL_ETH_DMATxDescListInit - .text.HAL_ETH_DMARxDescListInit - 0x00000000080017c2 0xd6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x00000000080017c2 HAL_ETH_DMARxDescListInit - .text.HAL_ETH_TransmitFrame - 0x0000000008001898 0x1d0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x0000000008001898 HAL_ETH_TransmitFrame - .text.HAL_ETH_ReadPHYRegister - 0x0000000008001a68 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x0000000008001a68 HAL_ETH_ReadPHYRegister - .text.HAL_ETH_WritePHYRegister - 0x0000000008001b38 0xcc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x0000000008001b38 HAL_ETH_WritePHYRegister - .text.HAL_ETH_Start - 0x0000000008001c04 0x5e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x0000000008001c04 HAL_ETH_Start - .text.HAL_ETH_Stop - 0x0000000008001c62 0x5e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x0000000008001c62 HAL_ETH_Stop - .text.HAL_ETH_ConfigMAC - 0x0000000008001cc0 0x1f4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0x0000000008001cc0 HAL_ETH_ConfigMAC - .text.ETH_MACDMAConfig - 0x0000000008001eb4 0x38c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_MACAddressConfig - 0x0000000008002240 0x6c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_MACTransmissionEnable - 0x00000000080022ac 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_MACTransmissionDisable - 0x00000000080022e6 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_MACReceptionEnable - 0x0000000008002320 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_MACReceptionDisable - 0x000000000800235a 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_DMATransmissionEnable - 0x0000000008002394 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_DMATransmissionDisable - 0x00000000080023be 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_DMAReceptionEnable - 0x00000000080023e8 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_DMAReceptionDisable - 0x0000000008002412 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.ETH_FlushTransmitFIFO - 0x000000000800243c 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - *fill* 0x0000000008002486 0x2 - .text.ETH_Delay - 0x0000000008002488 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .text.HAL_GPIO_Init - 0x00000000080024c4 0x33c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - 0x00000000080024c4 HAL_GPIO_Init - .text.HAL_GPIO_WritePin - 0x0000000008002800 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - 0x0000000008002800 HAL_GPIO_WritePin - .text.HAL_PCD_Init - 0x0000000008002830 0x23a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - 0x0000000008002830 HAL_PCD_Init - *fill* 0x0000000008002a6a 0x2 - .text.HAL_RCC_OscConfig - 0x0000000008002a6c 0x4a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - 0x0000000008002a6c HAL_RCC_OscConfig - .text.HAL_RCC_ClockConfig - 0x0000000008002f14 0x1d8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - 0x0000000008002f14 HAL_RCC_ClockConfig - .text.HAL_RCC_GetSysClockFreq - 0x00000000080030ec 0x218 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - 0x00000000080030ec HAL_RCC_GetSysClockFreq - .text.HAL_RCC_GetHCLKFreq - 0x0000000008003304 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - 0x0000000008003304 HAL_RCC_GetHCLKFreq - .text.HAL_RCC_GetPCLK1Freq - 0x0000000008003318 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - 0x0000000008003318 HAL_RCC_GetPCLK1Freq - .text.HAL_RCC_GetPCLK2Freq - 0x000000000800335c 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - 0x000000000800335c HAL_RCC_GetPCLK2Freq - .text.HAL_TIM_Base_Init - 0x00000000080033a0 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x00000000080033a0 HAL_TIM_Base_Init - .text.HAL_TIM_PWM_Init - 0x000000000800343e 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x000000000800343e HAL_TIM_PWM_Init - .text.HAL_TIM_PWM_MspInit - 0x00000000080034dc 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x00000000080034dc HAL_TIM_PWM_MspInit - .text.HAL_TIM_IRQHandler - 0x00000000080034ee 0x210 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x00000000080034ee HAL_TIM_IRQHandler - *fill* 0x00000000080036fe 0x2 - .text.HAL_TIM_PWM_ConfigChannel - 0x0000000008003700 0x184 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003700 HAL_TIM_PWM_ConfigChannel - .text.HAL_TIM_ConfigClockSource - 0x0000000008003884 0x18e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003884 HAL_TIM_ConfigClockSource - .text.HAL_TIM_PeriodElapsedCallback - 0x0000000008003a12 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003a12 HAL_TIM_PeriodElapsedCallback - .text.HAL_TIM_OC_DelayElapsedCallback - 0x0000000008003a24 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003a24 HAL_TIM_OC_DelayElapsedCallback - .text.HAL_TIM_IC_CaptureCallback - 0x0000000008003a36 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003a36 HAL_TIM_IC_CaptureCallback - .text.HAL_TIM_PWM_PulseFinishedCallback - 0x0000000008003a48 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003a48 HAL_TIM_PWM_PulseFinishedCallback - .text.HAL_TIM_TriggerCallback - 0x0000000008003a5a 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003a5a HAL_TIM_TriggerCallback - .text.TIM_Base_SetConfig - 0x0000000008003a6c 0x13c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003a6c TIM_Base_SetConfig - .text.TIM_OC1_SetConfig - 0x0000000008003ba8 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_OC2_SetConfig - 0x0000000008003c88 0xe8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003c88 TIM_OC2_SetConfig - .text.TIM_OC3_SetConfig - 0x0000000008003d70 0xe8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_OC4_SetConfig - 0x0000000008003e58 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_TI1_ConfigInputStage - 0x0000000008003f00 0x5c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_TI2_ConfigInputStage - 0x0000000008003f5c 0x5e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_ITRx_SetConfig - 0x0000000008003fba 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .text.TIM_ETR_SetConfig - 0x0000000008003fee 0x3e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0x0000000008003fee TIM_ETR_SetConfig - .text.HAL_TIMEx_MasterConfigSynchronization - 0x000000000800402c 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - 0x000000000800402c HAL_TIMEx_MasterConfigSynchronization - .text.HAL_TIMEx_ConfigBreakDeadTime - 0x0000000008004120 0xa2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - 0x0000000008004120 HAL_TIMEx_ConfigBreakDeadTime - .text.HAL_TIMEx_CommutCallback - 0x00000000080041c2 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - 0x00000000080041c2 HAL_TIMEx_CommutCallback - .text.HAL_TIMEx_BreakCallback - 0x00000000080041d4 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - 0x00000000080041d4 HAL_TIMEx_BreakCallback - .text.HAL_UART_Init - 0x00000000080041e6 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - 0x00000000080041e6 HAL_UART_Init - *fill* 0x0000000008004286 0x2 - .text.UART_SetConfig - 0x0000000008004288 0x1d4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .text.USB_CoreInit - 0x000000000800445c 0xae ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x000000000800445c USB_CoreInit - .text.USB_DisableGlobalInt - 0x000000000800450a 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x000000000800450a USB_DisableGlobalInt - .text.USB_SetCurrentMode - 0x000000000800452a 0x98 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x000000000800452a USB_SetCurrentMode - *fill* 0x00000000080045c2 0x2 - .text.USB_DevInit - 0x00000000080045c4 0x2b4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x00000000080045c4 USB_DevInit - .text.USB_FlushTxFifo - 0x0000000008004878 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x0000000008004878 USB_FlushTxFifo - .text.USB_FlushRxFifo - 0x00000000080048e0 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x00000000080048e0 USB_FlushRxFifo - .text.USB_SetDevSpeed - 0x0000000008004940 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x0000000008004940 USB_SetDevSpeed - .text.USB_DevDisconnect - 0x0000000008004970 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x0000000008004970 USB_DevDisconnect - .text.USB_GetMode - 0x00000000080049b0 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0x00000000080049b0 USB_GetMode - *fill* 0x00000000080049ca 0x2 - .text.USB_CoreReset - 0x00000000080049cc 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .text.MX_LWIP_Init - 0x0000000008004a30 0x8c ./LWIP/App/lwip.o - 0x0000000008004a30 MX_LWIP_Init - .text.HAL_ETH_MspInit - 0x0000000008004abc 0x18c ./LWIP/Target/ethernetif.o - 0x0000000008004abc HAL_ETH_MspInit - .text.low_level_init - 0x0000000008004c48 0x15c ./LWIP/Target/ethernetif.o - .text.low_level_output - 0x0000000008004da4 0x13c ./LWIP/Target/ethernetif.o - .text.ethernetif_init - 0x0000000008004ee0 0x5c ./LWIP/Target/ethernetif.o - 0x0000000008004ee0 ethernetif_init - .text.sys_now 0x0000000008004f3c 0xe ./LWIP/Target/ethernetif.o - 0x0000000008004f3c sys_now - *fill* 0x0000000008004f4a 0x2 - .text.ethernetif_update_config - 0x0000000008004f4c 0xf8 ./LWIP/Target/ethernetif.o - 0x0000000008004f4c ethernetif_update_config - .text.ethernetif_notify_conn_changed - 0x0000000008005044 0x12 ./LWIP/Target/ethernetif.o - 0x0000000008005044 ethernetif_notify_conn_changed - .text.lwip_htons - 0x0000000008005056 0x1a ./Middlewares/Third_Party/LwIP/src/core/def.o - 0x0000000008005056 lwip_htons - .text.lwip_htonl - 0x0000000008005070 0x30 ./Middlewares/Third_Party/LwIP/src/core/def.o - 0x0000000008005070 lwip_htonl - .text.lwip_init - 0x00000000080050a0 0x2a ./Middlewares/Third_Party/LwIP/src/core/init.o - 0x00000000080050a0 lwip_init - *fill* 0x00000000080050ca 0x2 - .text.plug_holes - 0x00000000080050cc 0x130 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .text.mem_init - 0x00000000080051fc 0x78 ./Middlewares/Third_Party/LwIP/src/core/mem.o - 0x00000000080051fc mem_init - .text.mem_free - 0x0000000008005274 0xc4 ./Middlewares/Third_Party/LwIP/src/core/mem.o - 0x0000000008005274 mem_free - .text.mem_trim - 0x0000000008005338 0x1b8 ./Middlewares/Third_Party/LwIP/src/core/mem.o - 0x0000000008005338 mem_trim - .text.mem_malloc - 0x00000000080054f0 0x1d0 ./Middlewares/Third_Party/LwIP/src/core/mem.o - 0x00000000080054f0 mem_malloc - .text.memp_init_pool - 0x00000000080056c0 0x5e ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x00000000080056c0 memp_init_pool - *fill* 0x000000000800571e 0x2 - .text.memp_init - 0x0000000008005720 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008005720 memp_init - .text.do_memp_malloc_pool - 0x0000000008005754 0x54 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .text.memp_malloc - 0x00000000080057a8 0x4c ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x00000000080057a8 memp_malloc - .text.do_memp_free_pool - 0x00000000080057f4 0x4c ./Middlewares/Third_Party/LwIP/src/core/memp.o - .text.memp_free - 0x0000000008005840 0x54 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008005840 memp_free - .text.netif_init - 0x0000000008005894 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000008005894 netif_init - .text.netif_add - 0x00000000080058a0 0xbc ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x00000000080058a0 netif_add - .text.netif_set_addr - 0x000000000800595c 0x58 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x000000000800595c netif_set_addr - .text.netif_set_ipaddr - 0x00000000080059b4 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x00000000080059b4 netif_set_ipaddr - .text.netif_set_gw - 0x0000000008005a24 0x26 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000008005a24 netif_set_gw - .text.netif_set_netmask - 0x0000000008005a4a 0x26 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000008005a4a netif_set_netmask - .text.netif_set_default - 0x0000000008005a70 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000008005a70 netif_set_default - .text.netif_set_up - 0x0000000008005a8c 0x46 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000008005a8c netif_set_up - .text.netif_issue_reports - 0x0000000008005ad2 0x42 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .text.netif_set_down - 0x0000000008005b14 0x44 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000008005b14 netif_set_down - .text.netif_set_link_callback - 0x0000000008005b58 0x20 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000008005b58 netif_set_link_callback - .text.pbuf_pool_is_empty - 0x0000000008005b78 0x18 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_alloc - 0x0000000008005b90 0x334 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x0000000008005b90 pbuf_alloc - .text.pbuf_alloced_custom - 0x0000000008005ec4 0xd4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x0000000008005ec4 pbuf_alloced_custom - .text.pbuf_realloc - 0x0000000008005f98 0x15c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x0000000008005f98 pbuf_realloc - .text.pbuf_header_impl - 0x00000000080060f4 0x144 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .text.pbuf_header - 0x0000000008006238 0x24 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x0000000008006238 pbuf_header - .text.pbuf_header_force - 0x000000000800625c 0x24 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x000000000800625c pbuf_header_force - .text.pbuf_free - 0x0000000008006280 0x128 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x0000000008006280 pbuf_free - .text.pbuf_clen - 0x00000000080063a8 0x2c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x00000000080063a8 pbuf_clen - .text.pbuf_ref - 0x00000000080063d4 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x00000000080063d4 pbuf_ref - .text.pbuf_cat - 0x0000000008006418 0xac ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x0000000008006418 pbuf_cat - .text.pbuf_chain - 0x00000000080064c4 0x20 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x00000000080064c4 pbuf_chain - .text.pbuf_copy - 0x00000000080064e4 0x198 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x00000000080064e4 pbuf_copy - .text.pbuf_copy_partial - 0x000000000800667c 0xf4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x000000000800667c pbuf_copy_partial - .text.tcp_init - 0x0000000008006770 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008006770 tcp_init - .text.tcp_tmr 0x000000000800677c 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x000000000800677c tcp_tmr - .text.tcp_remove_listener - 0x00000000080067a8 0x38 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_listen_closed - 0x00000000080067e0 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_close_shutdown - 0x0000000008006850 0x1d4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_close_shutdown_fin - 0x0000000008006a24 0xd4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_close - 0x0000000008006af8 0x30 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008006af8 tcp_close - .text.tcp_abandon - 0x0000000008006b28 0x164 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008006b28 tcp_abandon - .text.tcp_abort - 0x0000000008006c8c 0x18 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008006c8c tcp_abort - .text.tcp_update_rcv_ann_wnd - 0x0000000008006ca4 0x9c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008006ca4 tcp_update_rcv_ann_wnd - .text.tcp_recved - 0x0000000008006d40 0xb4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008006d40 tcp_recved - .text.tcp_slowtmr - 0x0000000008006df4 0x584 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008006df4 tcp_slowtmr - .text.tcp_fasttmr - 0x0000000008007378 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008007378 tcp_fasttmr - .text.tcp_process_refused_data - 0x0000000008007440 0xd2 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008007440 tcp_process_refused_data - .text.tcp_segs_free - 0x0000000008007512 0x2a ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008007512 tcp_segs_free - .text.tcp_seg_free - 0x000000000800753c 0x30 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x000000000800753c tcp_seg_free - .text.tcp_seg_copy - 0x000000000800756c 0x38 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x000000000800756c tcp_seg_copy - .text.tcp_recv_null - 0x00000000080075a4 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x00000000080075a4 tcp_recv_null - .text.tcp_kill_prio - 0x00000000080075e8 0x84 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_kill_state - 0x000000000800766c 0x94 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_kill_timewait - 0x0000000008007700 0x60 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_alloc - 0x0000000008007760 0x104 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008007760 tcp_alloc - .text.tcp_pcb_purge - 0x0000000008007864 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008007864 tcp_pcb_purge - *fill* 0x00000000080078e6 0x2 - .text.tcp_pcb_remove - 0x00000000080078e8 0xf8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x00000000080078e8 tcp_pcb_remove - .text.tcp_next_iss - 0x00000000080079e0 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x00000000080079e0 tcp_next_iss - .text.tcp_eff_send_mss_impl - 0x0000000008007a0c 0x48 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008007a0c tcp_eff_send_mss_impl - .text.tcp_netif_ip_addr_changed_pcblist - 0x0000000008007a54 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .text.tcp_netif_ip_addr_changed - 0x0000000008007a98 0x80 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008007a98 tcp_netif_ip_addr_changed - .text.tcp_input - 0x0000000008007b18 0x790 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - 0x0000000008007b18 tcp_input - .text.tcp_input_delayed_close - 0x00000000080082a8 0x64 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_listen_input - 0x000000000800830c 0x1c0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_timewait_input - 0x00000000080084cc 0xd0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_process - 0x000000000800859c 0x768 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_oos_insert_segment - 0x0000000008008d04 0xec ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_receive - 0x0000000008008df0 0xff4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_getoptbyte - 0x0000000008009de4 0x74 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_parseopt - 0x0000000008009e58 0xcc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .text.tcp_trigger_input_pcb_close - 0x0000000008009f24 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - 0x0000000008009f24 tcp_trigger_input_pcb_close - .text.tcp_output_alloc_header - 0x0000000008009f44 0xf4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .text.tcp_send_fin - 0x000000000800a038 0x7e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800a038 tcp_send_fin - *fill* 0x000000000800a0b6 0x2 - .text.tcp_create_segment - 0x000000000800a0b8 0x110 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .text.tcp_enqueue_flags - 0x000000000800a1c8 0x1f8 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800a1c8 tcp_enqueue_flags - .text.tcp_send_empty_ack - 0x000000000800a3c0 0xb8 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800a3c0 tcp_send_empty_ack - .text.tcp_output - 0x000000000800a478 0x3cc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800a478 tcp_output - .text.tcp_output_segment - 0x000000000800a844 0x13c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .text.tcp_rst 0x000000000800a980 0xec ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800a980 tcp_rst - .text.tcp_rexmit_rto - 0x000000000800aa6c 0x6c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800aa6c tcp_rexmit_rto - .text.tcp_rexmit - 0x000000000800aad8 0xa0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800aad8 tcp_rexmit - .text.tcp_rexmit_fast - 0x000000000800ab78 0x9c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800ab78 tcp_rexmit_fast - .text.tcp_keepalive - 0x000000000800ac14 0x7a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800ac14 tcp_keepalive - .text.tcp_zero_window_probe - 0x000000000800ac8e 0x138 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0x000000000800ac8e tcp_zero_window_probe - *fill* 0x000000000800adc6 0x2 - .text.tcpip_tcp_timer - 0x000000000800adc8 0x48 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .text.tcp_timer_needed - 0x000000000800ae10 0x40 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - 0x000000000800ae10 tcp_timer_needed - .text.cyclic_timer - 0x000000000800ae50 0x2c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .text.sys_timeouts_init - 0x000000000800ae7c 0x50 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - 0x000000000800ae7c sys_timeouts_init - .text.sys_timeout - 0x000000000800aecc 0x148 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - 0x000000000800aecc sys_timeout - .text.udp_init - 0x000000000800b014 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b014 udp_init - .text.udp_new_port - 0x000000000800b020 0x70 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .text.udp_input_local_match - 0x000000000800b090 0x74 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .text.udp_input - 0x000000000800b104 0x1cc ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b104 udp_input - .text.udp_sendto_if - 0x000000000800b2d0 0x7a ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b2d0 udp_sendto_if - *fill* 0x000000000800b34a 0x2 - .text.udp_sendto_if_src - 0x000000000800b34c 0x134 ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b34c udp_sendto_if_src - .text.udp_bind - 0x000000000800b480 0xe0 ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b480 udp_bind - .text.udp_connect - 0x000000000800b560 0xac ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b560 udp_connect - .text.udp_recv - 0x000000000800b60c 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b60c udp_recv - *fill* 0x000000000800b62e 0x2 - .text.udp_remove - 0x000000000800b630 0x64 ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b630 udp_remove - .text.udp_new 0x000000000800b694 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b694 udp_new - *fill* 0x000000000800b6c2 0x2 - .text.udp_netif_ip_addr_changed - 0x000000000800b6c4 0x5c ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x000000000800b6c4 udp_netif_ip_addr_changed - .text.dhcp_inc_pcb_refcount - 0x000000000800b720 0xa4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_dec_pcb_refcount - 0x000000000800b7c4 0x54 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_handle_nak - 0x000000000800b818 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_check - 0x000000000800b84c 0x68 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_handle_offer - 0x000000000800b8b4 0x48 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_select - 0x000000000800b8fc 0x14c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_coarse_tmr - 0x000000000800ba48 0xa8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800ba48 dhcp_coarse_tmr - .text.dhcp_fine_tmr - 0x000000000800baf0 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800baf0 dhcp_fine_tmr - .text.dhcp_timeout - 0x000000000800bb54 0x92 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_t1_timeout - 0x000000000800bbe6 0x5c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_t2_timeout - 0x000000000800bc42 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - *fill* 0x000000000800bca6 0x2 - .text.dhcp_handle_ack - 0x000000000800bca8 0xc0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_start - 0x000000000800bd68 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800bd68 dhcp_start - .text.dhcp_arp_reply - 0x000000000800be80 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800be80 dhcp_arp_reply - .text.dhcp_decline - 0x000000000800bed8 0xd4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_discover - 0x000000000800bfac 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_bind - 0x000000000800c0c4 0x1b4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_renew - 0x000000000800c278 0x10c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800c278 dhcp_renew - .text.dhcp_rebind - 0x000000000800c384 0x10c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_reboot - 0x000000000800c490 0x128 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_release - 0x000000000800c5b8 0x110 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800c5b8 dhcp_release - .text.dhcp_stop - 0x000000000800c6c8 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800c6c8 dhcp_stop - .text.dhcp_set_state - 0x000000000800c738 0x32 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - *fill* 0x000000000800c76a 0x2 - .text.dhcp_option - 0x000000000800c76c 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_option_byte - 0x000000000800c7e0 0x50 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_option_short - 0x000000000800c830 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_option_long - 0x000000000800c8a4 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_parse_reply - 0x000000000800c950 0x52c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_recv - 0x000000000800ce7c 0x1cc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_create_msg - 0x000000000800d048 0x2c4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_delete_msg - 0x000000000800d30c 0x84 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_option_trailer - 0x000000000800d390 0xb4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .text.dhcp_supplied_address - 0x000000000800d444 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x000000000800d444 dhcp_supplied_address - *fill* 0x000000000800d48e 0x2 - .text.etharp_free_entry - 0x000000000800d490 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_tmr - 0x000000000800d4f4 0x150 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - 0x000000000800d4f4 etharp_tmr - .text.etharp_find_entry - 0x000000000800d644 0x294 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_update_arp_entry - 0x000000000800d8d8 0x14c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_cleanup_netif - 0x000000000800da24 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - 0x000000000800da24 etharp_cleanup_netif - .text.etharp_input - 0x000000000800da88 0x11c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - 0x000000000800da88 etharp_input - .text.etharp_output_to_arp_index - 0x000000000800dba4 0x134 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_output - 0x000000000800dcd8 0x1dc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - 0x000000000800dcd8 etharp_output - .text.etharp_query - 0x000000000800deb4 0x290 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - 0x000000000800deb4 etharp_query - .text.etharp_raw - 0x000000000800e144 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_request_dst - 0x000000000800e25c 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .text.etharp_request - 0x000000000800e2a0 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - 0x000000000800e2a0 etharp_request - .text.icmp_input - 0x000000000800e2c4 0x20c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - 0x000000000800e2c4 icmp_input - .text.icmp_dest_unreach - 0x000000000800e4d0 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - 0x000000000800e4d0 icmp_dest_unreach - .text.icmp_time_exceeded - 0x000000000800e4f0 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - 0x000000000800e4f0 icmp_time_exceeded - .text.icmp_send_response - 0x000000000800e510 0xd0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .text.ip4_route - 0x000000000800e5e0 0xd4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - 0x000000000800e5e0 ip4_route - .text.ip4_input - 0x000000000800e6b4 0x2bc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - 0x000000000800e6b4 ip4_input - .text.ip4_output_if - 0x000000000800e970 0x54 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - 0x000000000800e970 ip4_output_if - .text.ip4_output_if_src - 0x000000000800e9c4 0x150 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - 0x000000000800e9c4 ip4_output_if_src - .text.ip4_addr_isbroadcast_u32 - 0x000000000800eb14 0x80 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - 0x000000000800eb14 ip4_addr_isbroadcast_u32 - .text.ip_reass_tmr - 0x000000000800eb94 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - 0x000000000800eb94 ip_reass_tmr - .text.ip_reass_free_complete_datagram - 0x000000000800ebec 0x148 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ip_reass_remove_oldest_datagram - 0x000000000800ed34 0xc4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ip_reass_enqueue_new_datagram - 0x000000000800edf8 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ip_reass_dequeue_datagram - 0x000000000800ee6c 0x5c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ip_reass_chain_frag_into_datagram_and_validate - 0x000000000800eec8 0x2d4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ip4_reass - 0x000000000800f19c 0x2a4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - 0x000000000800f19c ip4_reass - .text.ip_frag_alloc_pbuf_custom_ref - 0x000000000800f440 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ip_frag_free_pbuf_custom_ref - 0x000000000800f450 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ipfrag_free_pbuf_custom - 0x000000000800f488 0x68 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .text.ip4_frag - 0x000000000800f4f0 0x23c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - 0x000000000800f4f0 ip4_frag - .text.ethernet_input - 0x000000000800f72c 0x12c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - 0x000000000800f72c ethernet_input - .text.ethernet_output - 0x000000000800f858 0x90 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - 0x000000000800f858 ethernet_output - .text.rand 0x000000000800f8e8 0x7c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - 0x000000000800f8e8 rand - .text.std 0x000000000800f964 0x48 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.stdio_exit_handler - 0x000000000800f9ac 0x18 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.cleanup_stdio - 0x000000000800f9c4 0x40 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.global_stdio_init.part.0 - 0x000000000800fa04 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .text.__sfp_lock_acquire - 0x000000000800fa40 0xc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - 0x000000000800fa40 __sfp_lock_acquire - .text.__sfp_lock_release - 0x000000000800fa4c 0xc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - 0x000000000800fa4c __sfp_lock_release - .text.__sinit 0x000000000800fa58 0x30 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - 0x000000000800fa58 __sinit - .text._fwalk_sglue - 0x000000000800fa88 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) - 0x000000000800fa88 _fwalk_sglue - .text.printf 0x000000000800fac4 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - 0x000000000800fac4 iprintf - 0x000000000800fac4 printf - .text.__sread 0x000000000800fae8 0x22 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - 0x000000000800fae8 __sread - .text.__swrite - 0x000000000800fb0a 0x38 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - 0x000000000800fb0a __swrite - .text.__sseek 0x000000000800fb42 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - 0x000000000800fb42 __sseek - .text.__sclose - 0x000000000800fb66 0x8 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - 0x000000000800fb66 __sclose - .text.__swbuf_r - 0x000000000800fb6e 0x7a C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - 0x000000000800fb6e __swbuf_r - .text.__swsetup_r - 0x000000000800fbe8 0xb0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) - 0x000000000800fbe8 __swsetup_r - .text.memcmp 0x000000000800fc98 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) - 0x000000000800fc98 memcmp - .text.memset 0x000000000800fcb8 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) - 0x000000000800fcb8 memset - .text._close_r - 0x000000000800fcc8 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) - 0x000000000800fcc8 _close_r - .text._lseek_r - 0x000000000800fce8 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) - 0x000000000800fce8 _lseek_r - .text._read_r 0x000000000800fd0c 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) - 0x000000000800fd0c _read_r - .text._write_r - 0x000000000800fd30 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) - 0x000000000800fd30 _write_r - .text.__libc_init_array - 0x000000000800fd54 0x48 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) - 0x000000000800fd54 __libc_init_array - .text.__retarget_lock_acquire_recursive - 0x000000000800fd9c 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - 0x000000000800fd9c __retarget_lock_acquire_recursive - .text.__retarget_lock_release_recursive - 0x000000000800fd9e 0x2 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - 0x000000000800fd9e __retarget_lock_release_recursive - .text.memcpy 0x000000000800fda0 0x1c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) - 0x000000000800fda0 memcpy - .text.__assert_func - 0x000000000800fdbc 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - 0x000000000800fdbc __assert_func - .text._free_r 0x000000000800fdf8 0x90 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) - 0x000000000800fdf8 _free_r - .text.malloc 0x000000000800fe88 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - 0x000000000800fe88 malloc - .text.sbrk_aligned - 0x000000000800fe98 0x40 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - .text._malloc_r - 0x000000000800fed8 0x100 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - 0x000000000800fed8 _malloc_r - .text.__malloc_lock - 0x000000000800ffd8 0xc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - 0x000000000800ffd8 __malloc_lock - .text.__malloc_unlock - 0x000000000800ffe4 0xc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - 0x000000000800ffe4 __malloc_unlock - .text.__sfputc_r - 0x000000000800fff0 0x2a C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .text.__sfputs_r - 0x000000000801001a 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - 0x000000000801001a __sfputs_r - *fill* 0x000000000801003e 0x2 - .text._vfprintf_r - 0x0000000008010040 0x234 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - 0x0000000008010040 _vfprintf_r - 0x0000000008010040 _vfiprintf_r - .text._printf_common - 0x0000000008010274 0xe4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - 0x0000000008010274 _printf_common - .text._printf_i - 0x0000000008010358 0x244 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - 0x0000000008010358 _printf_i - .text.__sflush_r - 0x000000000801059c 0x104 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - 0x000000000801059c __sflush_r - .text._fflush_r - 0x00000000080106a0 0x50 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - 0x00000000080106a0 _fflush_r - .text.fprintf 0x00000000080106f0 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - 0x00000000080106f0 fiprintf - 0x00000000080106f0 fprintf - .text.__swhatbuf_r - 0x0000000008010714 0x4a C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - 0x0000000008010714 __swhatbuf_r - .text.__smakebuf_r - 0x000000000801075e 0x78 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - 0x000000000801075e __smakebuf_r - *fill* 0x00000000080107d6 0x2 - .text._fstat_r - 0x00000000080107d8 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) - 0x00000000080107d8 _fstat_r - .text._isatty_r - 0x00000000080107fc 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) - 0x00000000080107fc _isatty_r - .text._sbrk_r 0x000000000801081c 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) - 0x000000000801081c _sbrk_r - .text.memchr 0x000000000801083c 0x1c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) - 0x000000000801083c memchr - .text.abort 0x0000000008010858 0xe C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) - 0x0000000008010858 abort - .text._raise_r - 0x0000000008010866 0x50 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - 0x0000000008010866 _raise_r - *fill* 0x00000000080108b6 0x2 - .text.raise 0x00000000080108b8 0x10 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - 0x00000000080108b8 raise - .text._kill_r 0x00000000080108c8 0x24 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - 0x00000000080108c8 _kill_r - .text._getpid_r - 0x00000000080108ec 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - 0x00000000080108ec _getpid_r - *(.glue_7) - .glue_7 0x00000000080108f0 0x0 linker stubs - *(.glue_7t) - .glue_7t 0x00000000080108f0 0x0 linker stubs - *(.eh_frame) - .eh_frame 0x00000000080108f0 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - *(.init) - .init 0x00000000080108f0 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o - 0x00000000080108f0 _init - .init 0x00000000080108f4 0x8 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o - *(.fini) - .fini 0x00000000080108fc 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o - 0x00000000080108fc _fini - .fini 0x0000000008010900 0x8 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o - 0x0000000008010908 . = ALIGN (0x4) - 0x0000000008010908 _etext = . - -.vfp11_veneer 0x0000000008010908 0x0 - .vfp11_veneer 0x0000000008010908 0x0 linker stubs - -.v4_bx 0x0000000008010908 0x0 - .v4_bx 0x0000000008010908 0x0 linker stubs - -.iplt 0x0000000008010908 0x0 - .iplt 0x0000000008010908 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - -.rodata 0x0000000008010908 0x23a4 - 0x0000000008010908 . = ALIGN (0x4) - *(.rodata) - .rodata 0x0000000008010908 0x54 ./LWIP/Target/ethernetif.o - .rodata 0x000000000801095c 0x1fb ./Middlewares/Third_Party/LwIP/src/core/mem.o - *fill* 0x0000000008010b57 0x1 - .rodata 0x0000000008010b58 0xeb ./Middlewares/Third_Party/LwIP/src/core/memp.o - *fill* 0x0000000008010c43 0x1 - .rodata 0x0000000008010c44 0x74 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .rodata 0x0000000008010cb8 0x509 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - *fill* 0x00000000080111c1 0x3 - .rodata 0x00000000080111c4 0x47b ./Middlewares/Third_Party/LwIP/src/core/tcp.o - *fill* 0x000000000801163f 0x1 - .rodata 0x0000000008011640 0x385 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - *fill* 0x00000000080119c5 0x3 - .rodata 0x00000000080119c8 0x443 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - *fill* 0x0000000008011e0b 0x1 - .rodata 0x0000000008011e0c 0x9c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .rodata 0x0000000008011ea8 0x9a ./Middlewares/Third_Party/LwIP/src/core/udp.o - *fill* 0x0000000008011f42 0x2 - .rodata 0x0000000008011f44 0x4ff ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - *fill* 0x0000000008012443 0x1 - .rodata 0x0000000008012444 0x265 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - *fill* 0x00000000080126a9 0x3 - .rodata 0x00000000080126ac 0xf8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .rodata 0x00000000080127a4 0x95 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - *fill* 0x0000000008012839 0x3 - .rodata 0x000000000801283c 0x1f0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .rodata 0x0000000008012a2c 0x94 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - *(.rodata*) - .rodata.AHBPrescTable - 0x0000000008012ac0 0x10 ./Core/Src/system_stm32f2xx.o - 0x0000000008012ac0 AHBPrescTable - .rodata.APBPrescTable - 0x0000000008012ad0 0x8 ./Core/Src/system_stm32f2xx.o - 0x0000000008012ad0 APBPrescTable - .rodata.memp_UDP_PCB - 0x0000000008012ad8 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012ad8 memp_UDP_PCB - .rodata.memp_TCP_PCB - 0x0000000008012ae4 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012ae4 memp_TCP_PCB - .rodata.memp_TCP_PCB_LISTEN - 0x0000000008012af0 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012af0 memp_TCP_PCB_LISTEN - .rodata.memp_TCP_SEG - 0x0000000008012afc 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012afc memp_TCP_SEG - .rodata.memp_REASSDATA - 0x0000000008012b08 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012b08 memp_REASSDATA - .rodata.memp_FRAG_PBUF - 0x0000000008012b14 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012b14 memp_FRAG_PBUF - .rodata.memp_SYS_TIMEOUT - 0x0000000008012b20 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012b20 memp_SYS_TIMEOUT - .rodata.memp_PBUF - 0x0000000008012b2c 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012b2c memp_PBUF - .rodata.memp_PBUF_POOL - 0x0000000008012b38 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012b38 memp_PBUF_POOL - .rodata.memp_pools - 0x0000000008012b44 0x24 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000008012b44 memp_pools - .rodata.tcp_backoff - 0x0000000008012b68 0xd ./Middlewares/Third_Party/LwIP/src/core/tcp.o - *fill* 0x0000000008012b75 0x3 - .rodata.tcp_persist_backoff - 0x0000000008012b78 0x7 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - *fill* 0x0000000008012b7f 0x1 - .rodata.tcp_pcb_lists - 0x0000000008012b80 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000008012b80 tcp_pcb_lists - .rodata.lwip_cyclic_timers - 0x0000000008012b90 0x28 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - 0x0000000008012b90 lwip_cyclic_timers - .rodata.ip_addr_any - 0x0000000008012bb8 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - 0x0000000008012bb8 ip_addr_any - .rodata.ip_addr_broadcast - 0x0000000008012bbc 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - 0x0000000008012bbc ip_addr_broadcast - .rodata.ethbroadcast - 0x0000000008012bc0 0x6 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - 0x0000000008012bc0 ethbroadcast - *fill* 0x0000000008012bc6 0x2 - .rodata.ethzero - 0x0000000008012bc8 0x6 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - 0x0000000008012bc8 ethzero - .rodata.srand.str1.1 - 0x0000000008012bce 0x6f C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - .rodata.__assert_func.str1.1 - 0x0000000008012c3d 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - 0x3d (size before relaxing) - .rodata._vfprintf_r.str1.1 - 0x0000000008012c79 0x11 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .rodata._printf_i.str1.1 - 0x0000000008012c8a 0x22 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - 0x0000000008012cac . = ALIGN (0x4) - -.ARM.extab 0x0000000008012cac 0x0 - 0x0000000008012cac . = ALIGN (0x4) - *(.ARM.extab* .gnu.linkonce.armextab.*) - 0x0000000008012cac . = ALIGN (0x4) - -.ARM 0x0000000008012cac 0x8 - 0x0000000008012cac . = ALIGN (0x4) - 0x0000000008012cac __exidx_start = . - *(.ARM.exidx*) - .ARM.exidx 0x0000000008012cac 0x8 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - 0x0000000008012cb4 __exidx_end = . - 0x0000000008012cb4 . = ALIGN (0x4) - -.rel.dyn 0x0000000008012cb4 0x0 - .rel.iplt 0x0000000008012cb4 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - -.preinit_array 0x0000000008012cb4 0x0 - 0x0000000008012cb4 . = ALIGN (0x4) - 0x0000000008012cb4 PROVIDE (__preinit_array_start = .) - *(.preinit_array*) - 0x0000000008012cb4 PROVIDE (__preinit_array_end = .) - 0x0000000008012cb4 . = ALIGN (0x4) - -.init_array 0x0000000008012cb4 0x4 - 0x0000000008012cb4 . = ALIGN (0x4) - 0x0000000008012cb4 PROVIDE (__init_array_start = .) - *(SORT_BY_NAME(.init_array.*)) - *(.init_array*) - .init_array 0x0000000008012cb4 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - 0x0000000008012cb8 PROVIDE (__init_array_end = .) - 0x0000000008012cb8 . = ALIGN (0x4) - -.fini_array 0x0000000008012cb8 0x4 - 0x0000000008012cb8 . = ALIGN (0x4) - [!provide] PROVIDE (__fini_array_start = .) - *(SORT_BY_NAME(.fini_array.*)) - *(.fini_array*) - .fini_array 0x0000000008012cb8 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - [!provide] PROVIDE (__fini_array_end = .) - 0x0000000008012cbc . = ALIGN (0x4) - 0x0000000008012cbc _sidata = LOADADDR (.data) - -.data 0x0000000020000000 0x74 load address 0x0000000008012cbc - 0x0000000020000000 . = ALIGN (0x4) - 0x0000000020000000 _sdata = . - *(.data) - *(.data*) - .data.SystemCoreClock - 0x0000000020000000 0x4 ./Core/Src/system_stm32f2xx.o - 0x0000000020000000 SystemCoreClock - .data.uwTickPrio - 0x0000000020000004 0x4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x0000000020000004 uwTickPrio - .data.uwTickFreq - 0x0000000020000008 0x1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x0000000020000008 uwTickFreq - *fill* 0x0000000020000009 0x3 - .data.iss.0 0x000000002000000c 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .data.udp_port - 0x0000000020000010 0x2 ./Middlewares/Third_Party/LwIP/src/core/udp.o - *fill* 0x0000000020000012 0x2 - .data.dhcp_discover_request_options - 0x0000000020000014 0x3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - *fill* 0x0000000020000017 0x1 - .data.__sglue 0x0000000020000018 0xc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - 0x0000000020000018 __sglue - .data._impure_data - 0x0000000020000024 0x4c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) - 0x0000000020000024 _impure_data - .data._impure_ptr - 0x0000000020000070 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) - 0x0000000020000070 _impure_ptr - *(.RamFunc) - *(.RamFunc*) - 0x0000000020000074 . = ALIGN (0x4) - 0x0000000020000074 _edata = . - -.igot.plt 0x0000000020000074 0x0 load address 0x0000000008012d30 - .igot.plt 0x0000000020000074 0x0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - 0x0000000020000074 . = ALIGN (0x4) - -.bss 0x0000000020000074 0x6fcc load address 0x0000000008012d30 - 0x0000000020000074 _sbss = . - 0x0000000020000074 __bss_start__ = _sbss - *(.bss) - .bss 0x0000000020000074 0x1c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - *(.bss*) - .bss.htim1 0x0000000020000090 0x48 ./Core/Src/main.o - 0x0000000020000090 htim1 - .bss.htim3 0x00000000200000d8 0x48 ./Core/Src/main.o - 0x00000000200000d8 htim3 - .bss.htim7 0x0000000020000120 0x48 ./Core/Src/main.o - 0x0000000020000120 htim7 - .bss.huart3 0x0000000020000168 0x48 ./Core/Src/main.o - 0x0000000020000168 huart3 - .bss.hpcd_USB_OTG_FS - 0x00000000200001b0 0x504 ./Core/Src/main.o - 0x00000000200001b0 hpcd_USB_OTG_FS - .bss.__sbrk_heap_end - 0x00000000200006b4 0x4 ./Core/Src/sysmem.o - .bss.uwTick 0x00000000200006b8 0x4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0x00000000200006b8 uwTick - .bss.gnetif 0x00000000200006bc 0x38 ./LWIP/App/lwip.o - 0x00000000200006bc gnetif - .bss.ipaddr 0x00000000200006f4 0x4 ./LWIP/App/lwip.o - 0x00000000200006f4 ipaddr - .bss.netmask 0x00000000200006f8 0x4 ./LWIP/App/lwip.o - 0x00000000200006f8 netmask - .bss.gw 0x00000000200006fc 0x4 ./LWIP/App/lwip.o - 0x00000000200006fc gw - .bss.DMARxDscrTab - 0x0000000020000700 0x80 ./LWIP/Target/ethernetif.o - 0x0000000020000700 DMARxDscrTab - .bss.DMATxDscrTab - 0x0000000020000780 0x80 ./LWIP/Target/ethernetif.o - 0x0000000020000780 DMATxDscrTab - .bss.Rx_Buff 0x0000000020000800 0x17d0 ./LWIP/Target/ethernetif.o - 0x0000000020000800 Rx_Buff - .bss.Tx_Buff 0x0000000020001fd0 0x17d0 ./LWIP/Target/ethernetif.o - 0x0000000020001fd0 Tx_Buff - .bss.heth 0x00000000200037a0 0x48 ./LWIP/Target/ethernetif.o - 0x00000000200037a0 heth - .bss.ip_data 0x00000000200037e8 0x18 ./Middlewares/Third_Party/LwIP/src/core/ip.o - 0x00000000200037e8 ip_data - .bss.ram_heap 0x0000000020003800 0x653 ./Middlewares/Third_Party/LwIP/src/core/mem.o - 0x0000000020003800 ram_heap - *fill* 0x0000000020003e53 0x1 - .bss.ram 0x0000000020003e54 0x4 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .bss.ram_end 0x0000000020003e58 0x4 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .bss.lfree 0x0000000020003e5c 0x4 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .bss.memp_memory_UDP_PCB_base - 0x0000000020003e60 0x83 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000020003e60 memp_memory_UDP_PCB_base - *fill* 0x0000000020003ee3 0x1 - .bss.memp_tab_UDP_PCB - 0x0000000020003ee4 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_TCP_PCB_base - 0x0000000020003ee8 0x2fb ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000020003ee8 memp_memory_TCP_PCB_base - *fill* 0x00000000200041e3 0x1 - .bss.memp_tab_TCP_PCB - 0x00000000200041e4 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_TCP_PCB_LISTEN_base - 0x00000000200041e8 0xe3 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x00000000200041e8 memp_memory_TCP_PCB_LISTEN_base - *fill* 0x00000000200042cb 0x1 - .bss.memp_tab_TCP_PCB_LISTEN - 0x00000000200042cc 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_TCP_SEG_base - 0x00000000200042d0 0x103 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x00000000200042d0 memp_memory_TCP_SEG_base - *fill* 0x00000000200043d3 0x1 - .bss.memp_tab_TCP_SEG - 0x00000000200043d4 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_REASSDATA_base - 0x00000000200043d8 0xa3 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x00000000200043d8 memp_memory_REASSDATA_base - *fill* 0x000000002000447b 0x1 - .bss.memp_tab_REASSDATA - 0x000000002000447c 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_FRAG_PBUF_base - 0x0000000020004480 0x16b ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000020004480 memp_memory_FRAG_PBUF_base - *fill* 0x00000000200045eb 0x1 - .bss.memp_tab_FRAG_PBUF - 0x00000000200045ec 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_SYS_TIMEOUT_base - 0x00000000200045f0 0x53 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x00000000200045f0 memp_memory_SYS_TIMEOUT_base - *fill* 0x0000000020004643 0x1 - .bss.memp_tab_SYS_TIMEOUT - 0x0000000020004644 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_PBUF_base - 0x0000000020004648 0x103 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000020004648 memp_memory_PBUF_base - *fill* 0x000000002000474b 0x1 - .bss.memp_tab_PBUF - 0x000000002000474c 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.memp_memory_PBUF_POOL_base - 0x0000000020004750 0x2603 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0x0000000020004750 memp_memory_PBUF_POOL_base - *fill* 0x0000000020006d53 0x1 - .bss.memp_tab_PBUF_POOL - 0x0000000020006d54 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .bss.netif_list - 0x0000000020006d58 0x4 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000020006d58 netif_list - .bss.netif_default - 0x0000000020006d5c 0x4 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0x0000000020006d5c netif_default - .bss.netif_num - 0x0000000020006d60 0x1 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .bss.pbuf_free_ooseq_pending - 0x0000000020006d61 0x1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0x0000000020006d61 pbuf_free_ooseq_pending - *fill* 0x0000000020006d62 0x2 - .bss.tcp_ticks - 0x0000000020006d64 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000020006d64 tcp_ticks - .bss.tcp_bound_pcbs - 0x0000000020006d68 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000020006d68 tcp_bound_pcbs - .bss.tcp_listen_pcbs - 0x0000000020006d6c 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000020006d6c tcp_listen_pcbs - .bss.tcp_active_pcbs - 0x0000000020006d70 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000020006d70 tcp_active_pcbs - .bss.tcp_tw_pcbs - 0x0000000020006d74 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000020006d74 tcp_tw_pcbs - .bss.tcp_active_pcbs_changed - 0x0000000020006d78 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0x0000000020006d78 tcp_active_pcbs_changed - .bss.tcp_timer - 0x0000000020006d79 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .bss.tcp_timer_ctr - 0x0000000020006d7a 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - *fill* 0x0000000020006d7b 0x1 - .bss.inseg 0x0000000020006d7c 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.tcphdr 0x0000000020006d8c 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.tcphdr_optlen - 0x0000000020006d90 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.tcphdr_opt1len - 0x0000000020006d92 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.tcphdr_opt2 - 0x0000000020006d94 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.tcp_optidx - 0x0000000020006d98 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - *fill* 0x0000000020006d9a 0x2 - .bss.seqno 0x0000000020006d9c 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.ackno 0x0000000020006da0 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.recv_acked - 0x0000000020006da4 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.tcplen 0x0000000020006da6 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.flags 0x0000000020006da8 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.recv_flags - 0x0000000020006da9 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - *fill* 0x0000000020006daa 0x2 - .bss.recv_data - 0x0000000020006dac 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .bss.tcp_input_pcb - 0x0000000020006db0 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - 0x0000000020006db0 tcp_input_pcb - .bss.next_timeout - 0x0000000020006db4 0x4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .bss.timeouts_last_time - 0x0000000020006db8 0x4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .bss.tcpip_tcp_timer_active - 0x0000000020006dbc 0x4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .bss.udp_pcbs 0x0000000020006dc0 0x4 ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0x0000000020006dc0 udp_pcbs - .bss.dhcp_rx_options_val - 0x0000000020006dc4 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x0000000020006dc4 dhcp_rx_options_val - .bss.dhcp_rx_options_given - 0x0000000020006de4 0x8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0x0000000020006de4 dhcp_rx_options_given - .bss.dhcp_pcb 0x0000000020006dec 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .bss.dhcp_pcb_refcount - 0x0000000020006df0 0x1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - *fill* 0x0000000020006df1 0x3 - .bss.xid.0 0x0000000020006df4 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .bss.arp_table - 0x0000000020006df8 0xf0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .bss.etharp_cached_entry - 0x0000000020006ee8 0x1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - *fill* 0x0000000020006ee9 0x1 - .bss.ip_id 0x0000000020006eea 0x2 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .bss.reassdatagrams - 0x0000000020006eec 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .bss.ip_reass_pbufcount - 0x0000000020006ef0 0x2 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - *fill* 0x0000000020006ef2 0x2 - .bss.__sf 0x0000000020006ef4 0x138 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - 0x0000000020006ef4 __sf - .bss.__stdio_exit_handler - 0x000000002000702c 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - 0x000000002000702c __stdio_exit_handler - .bss.errno 0x0000000020007030 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - 0x0000000020007030 errno - .bss.__lock___malloc_recursive_mutex - 0x0000000020007034 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - 0x0000000020007034 __lock___malloc_recursive_mutex - .bss.__lock___sfp_recursive_mutex - 0x0000000020007035 0x1 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - 0x0000000020007035 __lock___sfp_recursive_mutex - *fill* 0x0000000020007036 0x2 - .bss.__malloc_free_list - 0x0000000020007038 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - 0x0000000020007038 __malloc_free_list - .bss.__malloc_sbrk_start - 0x000000002000703c 0x4 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - 0x000000002000703c __malloc_sbrk_start - *(COMMON) - 0x0000000020007040 . = ALIGN (0x4) - 0x0000000020007040 _ebss = . - 0x0000000020007040 __bss_end__ = _ebss - -._user_heap_stack - 0x0000000020007040 0x600 load address 0x0000000008012d30 - 0x0000000020007040 . = ALIGN (0x8) - [!provide] PROVIDE (end = .) - 0x0000000020007040 PROVIDE (_end = .) - 0x0000000020007240 . = (. + _Min_Heap_Size) - *fill* 0x0000000020007040 0x200 - 0x0000000020007640 . = (. + _Min_Stack_Size) - *fill* 0x0000000020007240 0x400 - 0x0000000020007640 . = ALIGN (0x8) - -/DISCARD/ - libc.a(*) - libm.a(*) - libgcc.a(*) - -.ARM.attributes - 0x0000000000000000 0x29 - *(.ARM.attributes) - .ARM.attributes - 0x0000000000000000 0x1d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o - .ARM.attributes - 0x000000000000001d 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - .ARM.attributes - 0x000000000000004a 0x2d ./Core/Src/main.o - .ARM.attributes - 0x0000000000000077 0x2d ./Core/Src/stm32f2xx_hal_msp.o - .ARM.attributes - 0x00000000000000a4 0x2d ./Core/Src/stm32f2xx_it.o - .ARM.attributes - 0x00000000000000d1 0x2d ./Core/Src/syscalls.o - .ARM.attributes - 0x00000000000000fe 0x2d ./Core/Src/sysmem.o - .ARM.attributes - 0x000000000000012b 0x2d ./Core/Src/system_stm32f2xx.o - .ARM.attributes - 0x0000000000000158 0x21 ./Core/Startup/startup_stm32f207zgtx.o - .ARM.attributes - 0x0000000000000179 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .ARM.attributes - 0x00000000000001a6 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .ARM.attributes - 0x00000000000001d3 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .ARM.attributes - 0x0000000000000200 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .ARM.attributes - 0x000000000000022d 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .ARM.attributes - 0x000000000000025a 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .ARM.attributes - 0x0000000000000287 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .ARM.attributes - 0x00000000000002b4 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .ARM.attributes - 0x00000000000002e1 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .ARM.attributes - 0x000000000000030e 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .ARM.attributes - 0x000000000000033b 0x2d ./LWIP/App/lwip.o - .ARM.attributes - 0x0000000000000368 0x2d ./LWIP/Target/ethernetif.o - .ARM.attributes - 0x0000000000000395 0x2d ./Middlewares/Third_Party/LwIP/src/core/def.o - .ARM.attributes - 0x00000000000003c2 0x2d ./Middlewares/Third_Party/LwIP/src/core/init.o - .ARM.attributes - 0x00000000000003ef 0x2d ./Middlewares/Third_Party/LwIP/src/core/ip.o - .ARM.attributes - 0x000000000000041c 0x2d ./Middlewares/Third_Party/LwIP/src/core/mem.o - .ARM.attributes - 0x0000000000000449 0x2d ./Middlewares/Third_Party/LwIP/src/core/memp.o - .ARM.attributes - 0x0000000000000476 0x2d ./Middlewares/Third_Party/LwIP/src/core/netif.o - .ARM.attributes - 0x00000000000004a3 0x2d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .ARM.attributes - 0x00000000000004d0 0x2d ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .ARM.attributes - 0x00000000000004fd 0x2d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .ARM.attributes - 0x000000000000052a 0x2d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .ARM.attributes - 0x0000000000000557 0x2d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .ARM.attributes - 0x0000000000000584 0x2d ./Middlewares/Third_Party/LwIP/src/core/udp.o - .ARM.attributes - 0x00000000000005b1 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .ARM.attributes - 0x00000000000005de 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .ARM.attributes - 0x000000000000060b 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .ARM.attributes - 0x0000000000000638 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .ARM.attributes - 0x0000000000000665 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .ARM.attributes - 0x0000000000000692 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .ARM.attributes - 0x00000000000006bf 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .ARM.attributes - 0x00000000000006ec 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - .ARM.attributes - 0x0000000000000719 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .ARM.attributes - 0x0000000000000746 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) - .ARM.attributes - 0x0000000000000773 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - .ARM.attributes - 0x00000000000007a0 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - .ARM.attributes - 0x00000000000007cd 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - .ARM.attributes - 0x00000000000007fa 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) - .ARM.attributes - 0x0000000000000827 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) - .ARM.attributes - 0x0000000000000854 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) - .ARM.attributes - 0x0000000000000881 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) - .ARM.attributes - 0x00000000000008ae 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - .ARM.attributes - 0x00000000000008db 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) - .ARM.attributes - 0x0000000000000908 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) - .ARM.attributes - 0x0000000000000935 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) - .ARM.attributes - 0x0000000000000962 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) - .ARM.attributes - 0x000000000000098f 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) - .ARM.attributes - 0x00000000000009bc 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .ARM.attributes - 0x00000000000009e9 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) - .ARM.attributes - 0x0000000000000a16 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - .ARM.attributes - 0x0000000000000a43 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) - .ARM.attributes - 0x0000000000000a70 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - .ARM.attributes - 0x0000000000000a9d 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - .ARM.attributes - 0x0000000000000aca 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - .ARM.attributes - 0x0000000000000af7 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .ARM.attributes - 0x0000000000000b24 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - .ARM.attributes - 0x0000000000000b51 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - .ARM.attributes - 0x0000000000000b7e 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - .ARM.attributes - 0x0000000000000bab 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - .ARM.attributes - 0x0000000000000bd8 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) - .ARM.attributes - 0x0000000000000c05 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) - .ARM.attributes - 0x0000000000000c32 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) - .ARM.attributes - 0x0000000000000c5f 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) - .ARM.attributes - 0x0000000000000c8c 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) - .ARM.attributes - 0x0000000000000cb9 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .ARM.attributes - 0x0000000000000ce6 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - .ARM.attributes - 0x0000000000000d13 0x1d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .ARM.attributes - 0x0000000000000d30 0x2d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - .ARM.attributes - 0x0000000000000d5d 0x1d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) - .ARM.attributes - 0x0000000000000d7a 0x1d C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o -OUTPUT(LightControlConvi_Nucleo207ZG.elf elf32-littlearm) -LOAD linker stubs -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc.a -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libm.a -LOAD C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a - -.comment 0x0000000000000000 0x43 - .comment 0x0000000000000000 0x43 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o - 0x44 (size before relaxing) - .comment 0x0000000000000043 0x44 ./Core/Src/main.o - .comment 0x0000000000000043 0x44 ./Core/Src/stm32f2xx_hal_msp.o - .comment 0x0000000000000043 0x44 ./Core/Src/stm32f2xx_it.o - .comment 0x0000000000000043 0x44 ./Core/Src/syscalls.o - .comment 0x0000000000000043 0x44 ./Core/Src/sysmem.o - .comment 0x0000000000000043 0x44 ./Core/Src/system_stm32f2xx.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .comment 0x0000000000000043 0x44 ./LWIP/App/lwip.o - .comment 0x0000000000000043 0x44 ./LWIP/Target/ethernetif.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/def.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/init.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - -.debug_info 0x0000000000000000 0x22076 - .debug_info 0x0000000000000000 0x1f02 ./Core/Src/main.o - .debug_info 0x0000000000001f02 0x14ec ./Core/Src/stm32f2xx_hal_msp.o - .debug_info 0x00000000000033ee 0x6e1 ./Core/Src/stm32f2xx_it.o - .debug_info 0x0000000000003acf 0x698 ./Core/Src/syscalls.o - .debug_info 0x0000000000004167 0x162 ./Core/Src/sysmem.o - .debug_info 0x00000000000042c9 0x31f ./Core/Src/system_stm32f2xx.o - .debug_info 0x00000000000045e8 0x23 ./Core/Startup/startup_stm32f207zgtx.o - .debug_info 0x000000000000460b 0x9c3 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_info 0x0000000000004fce 0xd46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_info 0x0000000000005d14 0x1455 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_info 0x0000000000007169 0x68e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_info 0x00000000000077f7 0x14ce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_info 0x0000000000008cc5 0xa39 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_info 0x00000000000096fe 0x297d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_info 0x000000000000c07b 0x14db ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_info 0x000000000000d556 0x2ff2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_info 0x0000000000010548 0x197f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_info 0x0000000000011ec7 0x574 ./LWIP/App/lwip.o - .debug_info 0x000000000001243b 0x16ee ./LWIP/Target/ethernetif.o - .debug_info 0x0000000000013b29 0x35f ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_info 0x0000000000013e88 0xde ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_info 0x0000000000013f66 0x505 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_info 0x000000000001446b 0x49a ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_info 0x0000000000014905 0x615 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_info 0x0000000000014f1a 0x91d ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_info 0x0000000000015837 0x1446 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_info 0x0000000000016c7d 0x1b48 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_info 0x00000000000187c5 0x13c3 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_info 0x0000000000019b88 0x1571 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_info 0x000000000001b0f9 0xbe1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_info 0x000000000001bcda 0xe5c ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_info 0x000000000001cb36 0x179f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_info 0x000000000001e2d5 0xe37 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_info 0x000000000001f10c 0x928 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_info 0x000000000001fa34 0xa4d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_info 0x0000000000020481 0x6c3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_info 0x0000000000020b44 0xdd0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_info 0x0000000000021914 0x762 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - -.debug_abbrev 0x0000000000000000 0x5818 - .debug_abbrev 0x0000000000000000 0x3a0 ./Core/Src/main.o - .debug_abbrev 0x00000000000003a0 0x262 ./Core/Src/stm32f2xx_hal_msp.o - .debug_abbrev 0x0000000000000602 0x192 ./Core/Src/stm32f2xx_it.o - .debug_abbrev 0x0000000000000794 0x1b1 ./Core/Src/syscalls.o - .debug_abbrev 0x0000000000000945 0xa4 ./Core/Src/sysmem.o - .debug_abbrev 0x00000000000009e9 0x11c ./Core/Src/system_stm32f2xx.o - .debug_abbrev 0x0000000000000b05 0x12 ./Core/Startup/startup_stm32f207zgtx.o - .debug_abbrev 0x0000000000000b17 0x286 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_abbrev 0x0000000000000d9d 0x327 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_abbrev 0x00000000000010c4 0x2ab ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_abbrev 0x000000000000136f 0x1cb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_abbrev 0x000000000000153a 0x2c1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_abbrev 0x00000000000017fb 0x2d6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_abbrev 0x0000000000001ad1 0x28f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_abbrev 0x0000000000001d60 0x283 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_abbrev 0x0000000000001fe3 0x30e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_abbrev 0x00000000000022f1 0x2b3 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_abbrev 0x00000000000025a4 0x1bc ./LWIP/App/lwip.o - .debug_abbrev 0x0000000000002760 0x3b3 ./LWIP/Target/ethernetif.o - .debug_abbrev 0x0000000000002b13 0x12e ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_abbrev 0x0000000000002c41 0x8b ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_abbrev 0x0000000000002ccc 0x127 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_abbrev 0x0000000000002df3 0x1a1 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_abbrev 0x0000000000002f94 0x233 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_abbrev 0x00000000000031c7 0x2ac ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_abbrev 0x0000000000003473 0x2e0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_abbrev 0x0000000000003753 0x3ce ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_abbrev 0x0000000000003b21 0x317 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_abbrev 0x0000000000003e38 0x2fc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_abbrev 0x0000000000004134 0x2ed ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_abbrev 0x0000000000004421 0x2da ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_abbrev 0x00000000000046fb 0x316 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_abbrev 0x0000000000004a11 0x27a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_abbrev 0x0000000000004c8b 0x23f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_abbrev 0x0000000000004eca 0x215 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_abbrev 0x00000000000050df 0x24f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_abbrev 0x000000000000532e 0x2b0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_abbrev 0x00000000000055de 0x23a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - -.debug_aranges 0x0000000000000000 0x1a80 - .debug_aranges - 0x0000000000000000 0x98 ./Core/Src/main.o - .debug_aranges - 0x0000000000000098 0x58 ./Core/Src/stm32f2xx_hal_msp.o - .debug_aranges - 0x00000000000000f0 0x68 ./Core/Src/stm32f2xx_it.o - .debug_aranges - 0x0000000000000158 0xa8 ./Core/Src/syscalls.o - .debug_aranges - 0x0000000000000200 0x20 ./Core/Src/sysmem.o - .debug_aranges - 0x0000000000000220 0x28 ./Core/Src/system_stm32f2xx.o - .debug_aranges - 0x0000000000000248 0x28 ./Core/Startup/startup_stm32f207zgtx.o - .debug_aranges - 0x0000000000000270 0xf0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_aranges - 0x0000000000000360 0x118 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_aranges - 0x0000000000000478 0x118 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_aranges - 0x0000000000000590 0x58 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_aranges - 0x00000000000005e8 0x148 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_aranges - 0x0000000000000730 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_aranges - 0x00000000000007b8 0x3d0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_aranges - 0x0000000000000b88 0x168 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_aranges - 0x0000000000000cf0 0x208 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_aranges - 0x0000000000000ef8 0x1a0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_aranges - 0x0000000000001098 0x28 ./LWIP/App/lwip.o - .debug_aranges - 0x00000000000010c0 0x78 ./LWIP/Target/ethernetif.o - .debug_aranges - 0x0000000000001138 0x48 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_aranges - 0x0000000000001180 0x20 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_aranges - 0x00000000000011a0 0x18 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_aranges - 0x00000000000011b8 0x48 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_aranges - 0x0000000000001200 0x58 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_aranges - 0x0000000000001258 0x98 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_aranges - 0x00000000000012f0 0xf0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_aranges - 0x00000000000013e0 0x188 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_aranges - 0x0000000000001568 0x68 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_aranges - 0x00000000000015d0 0x98 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_aranges - 0x0000000000001668 0x60 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_aranges - 0x00000000000016c8 0x98 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_aranges - 0x0000000000001760 0x140 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_aranges - 0x00000000000018a0 0x88 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_aranges - 0x0000000000001928 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_aranges - 0x0000000000001960 0x40 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_aranges - 0x00000000000019a0 0x48 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_aranges - 0x00000000000019e8 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_aranges - 0x0000000000001a58 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - -.debug_rnglists - 0x0000000000000000 0x1502 - .debug_rnglists - 0x0000000000000000 0x81 ./Core/Src/main.o - .debug_rnglists - 0x0000000000000081 0x41 ./Core/Src/stm32f2xx_hal_msp.o - .debug_rnglists - 0x00000000000000c2 0x49 ./Core/Src/stm32f2xx_it.o - .debug_rnglists - 0x000000000000010b 0x79 ./Core/Src/syscalls.o - .debug_rnglists - 0x0000000000000184 0x13 ./Core/Src/sysmem.o - .debug_rnglists - 0x0000000000000197 0x1a ./Core/Src/system_stm32f2xx.o - .debug_rnglists - 0x00000000000001b1 0x19 ./Core/Startup/startup_stm32f207zgtx.o - .debug_rnglists - 0x00000000000001ca 0xaf ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_rnglists - 0x0000000000000279 0xce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_rnglists - 0x0000000000000347 0xd9 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_rnglists - 0x0000000000000420 0x3f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_rnglists - 0x000000000000045f 0xfa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_rnglists - 0x0000000000000559 0x67 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_rnglists - 0x00000000000005c0 0x31a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_rnglists - 0x00000000000008da 0x125 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_rnglists - 0x00000000000009ff 0x1bc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_rnglists - 0x0000000000000bbb 0x147 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_rnglists - 0x0000000000000d02 0x1a ./LWIP/App/lwip.o - .debug_rnglists - 0x0000000000000d1c 0x5b ./LWIP/Target/ethernetif.o - .debug_rnglists - 0x0000000000000d77 0x32 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_rnglists - 0x0000000000000da9 0x13 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_rnglists - 0x0000000000000dbc 0x35 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_rnglists - 0x0000000000000df1 0x3d ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_rnglists - 0x0000000000000e2e 0x6f ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_rnglists - 0x0000000000000e9d 0xbb ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_rnglists - 0x0000000000000f58 0x134 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_rnglists - 0x000000000000108c 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_rnglists - 0x0000000000001108 0xc4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_rnglists - 0x00000000000011cc 0x46 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_rnglists - 0x0000000000001212 0x71 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_rnglists - 0x0000000000001283 0xff ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_rnglists - 0x0000000000001382 0x6b ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_rnglists - 0x00000000000013ed 0x36 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_rnglists - 0x0000000000001423 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_rnglists - 0x0000000000001451 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_rnglists - 0x0000000000001485 0x62 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_rnglists - 0x00000000000014e7 0x1b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - -.debug_macro 0x0000000000000000 0x2c82d - .debug_macro 0x0000000000000000 0x5f6 ./Core/Src/main.o - .debug_macro 0x00000000000005f6 0xa9c ./Core/Src/main.o - .debug_macro 0x0000000000001092 0x258 ./Core/Src/main.o - .debug_macro 0x00000000000012ea 0x2e ./Core/Src/main.o - .debug_macro 0x0000000000001318 0x22 ./Core/Src/main.o - .debug_macro 0x000000000000133a 0x22 ./Core/Src/main.o - .debug_macro 0x000000000000135c 0x8e ./Core/Src/main.o - .debug_macro 0x00000000000013ea 0x51 ./Core/Src/main.o - .debug_macro 0x000000000000143b 0x103 ./Core/Src/main.o - .debug_macro 0x000000000000153e 0x6a ./Core/Src/main.o - .debug_macro 0x00000000000015a8 0x1df ./Core/Src/main.o - .debug_macro 0x0000000000001787 0x1c ./Core/Src/main.o - .debug_macro 0x00000000000017a3 0x22 ./Core/Src/main.o - .debug_macro 0x00000000000017c5 0xbd ./Core/Src/main.o - .debug_macro 0x0000000000001882 0xe49 ./Core/Src/main.o - .debug_macro 0x00000000000026cb 0x11f ./Core/Src/main.o - .debug_macro 0x00000000000027ea 0x14fe1 ./Core/Src/main.o - .debug_macro 0x00000000000177cb 0x6d ./Core/Src/main.o - .debug_macro 0x0000000000017838 0x35a5 ./Core/Src/main.o - .debug_macro 0x000000000001addd 0x174 ./Core/Src/main.o - .debug_macro 0x000000000001af51 0x55 ./Core/Src/main.o - .debug_macro 0x000000000001afa6 0x1056 ./Core/Src/main.o - .debug_macro 0x000000000001bffc 0x153 ./Core/Src/main.o - .debug_macro 0x000000000001c14f 0x170 ./Core/Src/main.o - .debug_macro 0x000000000001c2bf 0x115 ./Core/Src/main.o - .debug_macro 0x000000000001c3d4 0x108 ./Core/Src/main.o - .debug_macro 0x000000000001c4dc 0xa5 ./Core/Src/main.o - .debug_macro 0x000000000001c581 0x16a ./Core/Src/main.o - .debug_macro 0x000000000001c6eb 0x287 ./Core/Src/main.o - .debug_macro 0x000000000001c972 0x5f ./Core/Src/main.o - .debug_macro 0x000000000001c9d1 0x236 ./Core/Src/main.o - .debug_macro 0x000000000001cc07 0xcce ./Core/Src/main.o - .debug_macro 0x000000000001d8d5 0x126 ./Core/Src/main.o - .debug_macro 0x000000000001d9fb 0x216 ./Core/Src/main.o - .debug_macro 0x000000000001dc11 0x2e ./Core/Src/main.o - .debug_macro 0x000000000001dc3f 0x113 ./Core/Src/main.o - .debug_macro 0x000000000001dd52 0x22 ./Core/Src/main.o - .debug_macro 0x000000000001dd74 0x82 ./Core/Src/main.o - .debug_macro 0x000000000001ddf6 0x8ed ./Core/Src/main.o - .debug_macro 0x000000000001e6e3 0x4c ./Core/Src/main.o - .debug_macro 0x000000000001e72f 0x2aa ./Core/Src/main.o - .debug_macro 0x000000000001e9d9 0x287 ./Core/Src/main.o - .debug_macro 0x000000000001ec60 0xba ./Core/Src/main.o - .debug_macro 0x000000000001ed1a 0x12d ./Core/Src/main.o - .debug_macro 0x000000000001ee47 0x19e ./Core/Src/main.o - .debug_macro 0x000000000001efe5 0xb2 ./Core/Src/main.o - .debug_macro 0x000000000001f097 0x16 ./Core/Src/main.o - .debug_macro 0x000000000001f0ad 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001f0bd 0x24 ./Core/Src/main.o - .debug_macro 0x000000000001f0e1 0x61 ./Core/Src/main.o - .debug_macro 0x000000000001f142 0x43 ./Core/Src/main.o - .debug_macro 0x000000000001f185 0x34 ./Core/Src/main.o - .debug_macro 0x000000000001f1b9 0x16 ./Core/Src/main.o - .debug_macro 0x000000000001f1cf 0x35 ./Core/Src/main.o - .debug_macro 0x000000000001f204 0x16 ./Core/Src/main.o - .debug_macro 0x000000000001f21a 0x43 ./Core/Src/main.o - .debug_macro 0x000000000001f25d 0x34 ./Core/Src/main.o - .debug_macro 0x000000000001f291 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001f2a1 0x58 ./Core/Src/main.o - .debug_macro 0x000000000001f2f9 0x8e ./Core/Src/main.o - .debug_macro 0x000000000001f387 0x1c ./Core/Src/main.o - .debug_macro 0x000000000001f3a3 0x177 ./Core/Src/main.o - .debug_macro 0x000000000001f51a 0x369 ./Core/Src/main.o - .debug_macro 0x000000000001f883 0x16 ./Core/Src/main.o - .debug_macro 0x000000000001f899 0x29 ./Core/Src/main.o - .debug_macro 0x000000000001f8c2 0x1c ./Core/Src/main.o - .debug_macro 0x000000000001f8de 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001f8ee 0x1c ./Core/Src/main.o - .debug_macro 0x000000000001f90a 0x16 ./Core/Src/main.o - .debug_macro 0x000000000001f920 0x147 ./Core/Src/main.o - .debug_macro 0x000000000001fa67 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001fa77 0x22 ./Core/Src/main.o - .debug_macro 0x000000000001fa99 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001faa9 0x1c ./Core/Src/main.o - .debug_macro 0x000000000001fac5 0x52 ./Core/Src/main.o - .debug_macro 0x000000000001fb17 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001fb27 0x52 ./Core/Src/main.o - .debug_macro 0x000000000001fb79 0xc1 ./Core/Src/main.o - .debug_macro 0x000000000001fc3a 0x1c ./Core/Src/main.o - .debug_macro 0x000000000001fc56 0x3d ./Core/Src/main.o - .debug_macro 0x000000000001fc93 0xc8 ./Core/Src/main.o - .debug_macro 0x000000000001fd5b 0x16 ./Core/Src/main.o - .debug_macro 0x000000000001fd71 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001fd81 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001fd91 0x35 ./Core/Src/main.o - .debug_macro 0x000000000001fdc6 0x28 ./Core/Src/main.o - .debug_macro 0x000000000001fdee 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001fdfe 0x11 ./Core/Src/main.o - .debug_macro 0x000000000001fe0f 0x10 ./Core/Src/main.o - .debug_macro 0x000000000001fe1f 0x460 ./Core/Src/main.o - .debug_macro 0x000000000002027f 0x43 ./Core/Src/main.o - .debug_macro 0x00000000000202c2 0x7c ./Core/Src/main.o - .debug_macro 0x000000000002033e 0x17 ./Core/Src/main.o - .debug_macro 0x0000000000020355 0x118 ./Core/Src/main.o - .debug_macro 0x000000000002046d 0x4a ./Core/Src/main.o - .debug_macro 0x00000000000204b7 0x66 ./Core/Src/main.o - .debug_macro 0x000000000002051d 0x6a0 ./Core/Src/main.o - .debug_macro 0x0000000000020bbd 0x10 ./Core/Src/main.o - .debug_macro 0x0000000000020bcd 0x10 ./Core/Src/main.o - .debug_macro 0x0000000000020bdd 0x3f ./Core/Src/main.o - .debug_macro 0x0000000000020c1c 0x2b ./Core/Src/main.o - .debug_macro 0x0000000000020c47 0x15b ./Core/Src/main.o - .debug_macro 0x0000000000020da2 0x22 ./Core/Src/main.o - .debug_macro 0x0000000000020dc4 0x16 ./Core/Src/main.o - .debug_macro 0x0000000000020dda 0x55 ./Core/Src/main.o - .debug_macro 0x0000000000020e2f 0x6a ./Core/Src/main.o - .debug_macro 0x0000000000020e99 0x185 ./Core/Src/main.o - .debug_macro 0x000000000002101e 0x10 ./Core/Src/main.o - .debug_macro 0x000000000002102e 0x14d ./Core/Src/main.o - .debug_macro 0x000000000002117b 0x8f ./Core/Src/main.o - .debug_macro 0x000000000002120a 0x8e ./Core/Src/main.o - .debug_macro 0x0000000000021298 0x28 ./Core/Src/main.o - .debug_macro 0x00000000000212c0 0x5a ./Core/Src/main.o - .debug_macro 0x000000000002131a 0x16 ./Core/Src/main.o - .debug_macro 0x0000000000021330 0x16 ./Core/Src/main.o - .debug_macro 0x0000000000021346 0x10 ./Core/Src/main.o - .debug_macro 0x0000000000021356 0x2e ./Core/Src/main.o - .debug_macro 0x0000000000021384 0xe3 ./Core/Src/main.o - .debug_macro 0x0000000000021467 0x10 ./Core/Src/main.o - .debug_macro 0x0000000000021477 0x38 ./Core/Src/main.o - .debug_macro 0x00000000000214af 0x29 ./Core/Src/main.o - .debug_macro 0x00000000000214d8 0x10 ./Core/Src/main.o - .debug_macro 0x00000000000214e8 0x2e ./Core/Src/main.o - .debug_macro 0x0000000000021516 0x18 ./Core/Src/main.o - .debug_macro 0x000000000002152e 0x204 ./Core/Src/stm32f2xx_hal_msp.o - .debug_macro 0x0000000000021732 0x20e ./Core/Src/stm32f2xx_it.o - .debug_macro 0x0000000000021940 0x4cd ./Core/Src/syscalls.o - .debug_macro 0x0000000000021e0d 0x5b ./Core/Src/syscalls.o - .debug_macro 0x0000000000021e68 0x94 ./Core/Src/syscalls.o - .debug_macro 0x0000000000021efc 0x57 ./Core/Src/syscalls.o - .debug_macro 0x0000000000021f53 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000021f63 0xcf ./Core/Src/syscalls.o - .debug_macro 0x0000000000022032 0x12c ./Core/Src/syscalls.o - .debug_macro 0x000000000002215e 0x4f ./Core/Src/syscalls.o - .debug_macro 0x00000000000221ad 0xac ./Core/Src/syscalls.o - .debug_macro 0x0000000000022259 0x10 ./Core/Src/syscalls.o - .debug_macro 0x0000000000022269 0xce ./Core/Src/syscalls.o - .debug_macro 0x0000000000022337 0x31a ./Core/Src/syscalls.o - .debug_macro 0x0000000000022651 0x190 ./Core/Src/syscalls.o - .debug_macro 0x00000000000227e1 0x16 ./Core/Src/syscalls.o - .debug_macro 0x00000000000227f7 0x4a1 ./Core/Src/sysmem.o - .debug_macro 0x0000000000022c98 0x1f5 ./Core/Src/system_stm32f2xx.o - .debug_macro 0x0000000000022e8d 0x243 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_macro 0x00000000000230d0 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_macro 0x00000000000232c5 0x20b ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_macro 0x00000000000234d0 0x1fc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_macro 0x00000000000236cc 0x201 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_macro 0x00000000000238cd 0x21f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_macro 0x0000000000023aec 0x1f6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_macro 0x0000000000023ce2 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_macro 0x0000000000023ed7 0x1f6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_macro 0x00000000000240cd 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_macro 0x00000000000242c2 0x5ed ./LWIP/App/lwip.o - .debug_macro 0x00000000000248af 0x5e ./LWIP/App/lwip.o - .debug_macro 0x000000000002490d 0x5c9 ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000024ed6 0x5b ./LWIP/Target/ethernetif.o - .debug_macro 0x0000000000024f31 0x18b ./LWIP/Target/ethernetif.o - .debug_macro 0x00000000000250bc 0x16 ./LWIP/Target/ethernetif.o - .debug_macro 0x00000000000250d2 0x20 ./LWIP/Target/ethernetif.o - .debug_macro 0x00000000000250f2 0x4c1 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_macro 0x00000000000255b3 0x66d ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000025c20 0x70 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000025c90 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000025e51 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_macro 0x0000000000025e85 0x56c ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_macro 0x00000000000263f1 0x56b ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_macro 0x000000000002695c 0x6d9 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000027035 0x25 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x000000000002705a 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_macro 0x0000000000027070 0x655 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x00000000000276c5 0xc0 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x0000000000027785 0x2f ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_macro 0x00000000000277b4 0x5eb ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000027d9f 0x9b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_macro 0x0000000000027e3a 0x5fb ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_macro 0x0000000000028435 0x5c5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x00000000000289fa 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_macro 0x0000000000028a16 0x5f3 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_macro 0x0000000000029009 0x65c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_macro 0x0000000000029665 0x604 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_macro 0x0000000000029c69 0x63f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x000000000002a2a8 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_macro 0x000000000002a412 0x627 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_macro 0x000000000002aa39 0x5c0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_macro 0x000000000002aff9 0x635 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x000000000002b62e 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_macro 0x000000000002b711 0x550 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_macro 0x000000000002bc61 0x5e7 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x000000000002c248 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_macro 0x000000000002c258 0x5d5 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - -.debug_line 0x0000000000000000 0x2c4f9 - .debug_line 0x0000000000000000 0x1183 ./Core/Src/main.o - .debug_line 0x0000000000001183 0x917 ./Core/Src/stm32f2xx_hal_msp.o - .debug_line 0x0000000000001a9a 0x85e ./Core/Src/stm32f2xx_it.o - .debug_line 0x00000000000022f8 0xd9d ./Core/Src/syscalls.o - .debug_line 0x0000000000003095 0xb95 ./Core/Src/sysmem.o - .debug_line 0x0000000000003c2a 0x800 ./Core/Src/system_stm32f2xx.o - .debug_line 0x000000000000442a 0x7a ./Core/Startup/startup_stm32f207zgtx.o - .debug_line 0x00000000000044a4 0xa97 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_line 0x0000000000004f3b 0xd1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_line 0x0000000000005c55 0x1782 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_line 0x00000000000073d7 0xbe5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_line 0x0000000000007fbc 0x1490 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_line 0x000000000000944c 0xf2b ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_line 0x000000000000a377 0x37dc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_line 0x000000000000db53 0x1a75 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_line 0x000000000000f5c8 0x2989 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_line 0x0000000000011f51 0x1c26 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_line 0x0000000000013b77 0xd79 ./LWIP/App/lwip.o - .debug_line 0x00000000000148f0 0x1191 ./LWIP/Target/ethernetif.o - .debug_line 0x0000000000015a81 0xd52 ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_line 0x00000000000167d3 0xdd5 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_line 0x00000000000175a8 0xc89 ./Middlewares/Third_Party/LwIP/src/core/ip.o - .debug_line 0x0000000000018231 0xfc5 ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_line 0x00000000000191f6 0xff6 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_line 0x000000000001a1ec 0x10f7 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_line 0x000000000001b2e3 0x1731 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_line 0x000000000001ca14 0x1d2b ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_line 0x000000000001e73f 0x1f24 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_line 0x0000000000020663 0x1918 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_line 0x0000000000021f7b 0x1060 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_line 0x0000000000022fdb 0x1282 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_line 0x000000000002425d 0x1e98 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_line 0x00000000000260f5 0x1410 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_line 0x0000000000027505 0xe59 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_line 0x000000000002835e 0x1065 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_line 0x00000000000293c3 0xf88 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_line 0x000000000002a34b 0x132e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_line 0x000000000002b679 0xe80 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - -.debug_str 0x0000000000000000 0xdd677 - .debug_str 0x0000000000000000 0xd1b7a ./Core/Src/main.o - 0xd208e (size before relaxing) - .debug_str 0x00000000000d1b7a 0x5f8 ./Core/Src/stm32f2xx_hal_msp.o - 0xc6058 (size before relaxing) - .debug_str 0x00000000000d2172 0xec ./Core/Src/stm32f2xx_it.o - 0xc5442 (size before relaxing) - .debug_str 0x00000000000d225e 0xfd8 ./Core/Src/syscalls.o - 0xcdd27 (size before relaxing) - .debug_str 0x00000000000d3236 0x6b ./Core/Src/sysmem.o - 0xcd342 (size before relaxing) - .debug_str 0x00000000000d32a1 0x87 ./Core/Src/system_stm32f2xx.o - 0xc4987 (size before relaxing) - .debug_str 0x00000000000d3328 0x34 ./Core/Startup/startup_stm32f207zgtx.o - 0x90 (size before relaxing) - .debug_str 0x00000000000d335c 0x561 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - 0xc54d3 (size before relaxing) - .debug_str 0x00000000000d38bd 0x36a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - 0xc5298 (size before relaxing) - .debug_str 0x00000000000d3c27 0xba7 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - 0xc55c9 (size before relaxing) - .debug_str 0x00000000000d47ce 0xfc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - 0xc4b45 (size before relaxing) - .debug_str 0x00000000000d48ca 0x7ae ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - 0xc5448 (size before relaxing) - .debug_str 0x00000000000d5078 0x248 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - 0xc4e39 (size before relaxing) - .debug_str 0x00000000000d52c0 0xd64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - 0xc5d55 (size before relaxing) - .debug_str 0x00000000000d6024 0x3e1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - 0xc5571 (size before relaxing) - .debug_str 0x00000000000d6405 0x62a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - 0xc53dc (size before relaxing) - .debug_str 0x00000000000d6a2f 0x4a6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - 0xc5394 (size before relaxing) - .debug_str 0x00000000000d6ed5 0x493 ./LWIP/App/lwip.o - 0xd0e38 (size before relaxing) - .debug_str 0x00000000000d7368 0x28c ./LWIP/Target/ethernetif.o - 0xd0c82 (size before relaxing) - .debug_str 0x00000000000d75f4 0xcd ./Middlewares/Third_Party/LwIP/src/core/def.o - 0xcd142 (size before relaxing) - .debug_str 0x00000000000d76c1 0x204a ./Middlewares/Third_Party/LwIP/src/core/init.o - 0xd2969 (size before relaxing) - .debug_str 0x00000000000d970b 0xf1 ./Middlewares/Third_Party/LwIP/src/core/ip.o - 0xd0541 (size before relaxing) - .debug_str 0x00000000000d97fc 0x252 ./Middlewares/Third_Party/LwIP/src/core/mem.o - 0xce32c (size before relaxing) - .debug_str 0x00000000000d9a4e 0x407 ./Middlewares/Third_Party/LwIP/src/core/memp.o - 0xd2b53 (size before relaxing) - .debug_str 0x00000000000d9e55 0x698 ./Middlewares/Third_Party/LwIP/src/core/netif.o - 0xd3085 (size before relaxing) - .debug_str 0x00000000000da4ed 0x636 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - 0xd2ae7 (size before relaxing) - .debug_str 0x00000000000dab23 0x662 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - 0xd2914 (size before relaxing) - .debug_str 0x00000000000db185 0x2f5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - 0xd272d (size before relaxing) - .debug_str 0x00000000000db47a 0x253 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - 0xd2659 (size before relaxing) - .debug_str 0x00000000000db6cd 0x1a7 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - 0xd2d6d (size before relaxing) - .debug_str 0x00000000000db874 0x2c6 ./Middlewares/Third_Party/LwIP/src/core/udp.o - 0xd140f (size before relaxing) - .debug_str 0x00000000000dbb3a 0xdaf ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - 0xd1bba (size before relaxing) - .debug_str 0x00000000000dc8e9 0x512 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - 0xd15ed (size before relaxing) - .debug_str 0x00000000000dcdfb 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - 0xd09f4 (size before relaxing) - .debug_str 0x00000000000dcefe 0x13f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - 0xd2918 (size before relaxing) - .debug_str 0x00000000000dd03d 0x1d9 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - 0xcfad4 (size before relaxing) - .debug_str 0x00000000000dd216 0x3e0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - 0xd0def (size before relaxing) - .debug_str 0x00000000000dd5f6 0x81 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - 0xd0fb0 (size before relaxing) - -.debug_frame 0x0000000000000000 0x779c - .debug_frame 0x0000000000000000 0x22c ./Core/Src/main.o - .debug_frame 0x000000000000022c 0x134 ./Core/Src/stm32f2xx_hal_msp.o - .debug_frame 0x0000000000000360 0x120 ./Core/Src/stm32f2xx_it.o - .debug_frame 0x0000000000000480 0x2c4 ./Core/Src/syscalls.o - .debug_frame 0x0000000000000744 0x38 ./Core/Src/sysmem.o - .debug_frame 0x000000000000077c 0x58 ./Core/Src/system_stm32f2xx.o - .debug_frame 0x00000000000007d4 0x384 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o - .debug_frame 0x0000000000000b58 0x498 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o - .debug_frame 0x0000000000000ff0 0x4dc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o - .debug_frame 0x00000000000014cc 0x14c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o - .debug_frame 0x0000000000001618 0x5bc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o - .debug_frame 0x0000000000001bd4 0x208 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o - .debug_frame 0x0000000000001ddc 0x11c4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o - .debug_frame 0x0000000000002fa0 0x638 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o - .debug_frame 0x00000000000035d8 0x944 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o - .debug_frame 0x0000000000003f1c 0x7c0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o - .debug_frame 0x00000000000046dc 0x50 ./LWIP/App/lwip.o - .debug_frame 0x000000000000472c 0x1b4 ./LWIP/Target/ethernetif.o - .debug_frame 0x00000000000048e0 0xfc ./Middlewares/Third_Party/LwIP/src/core/def.o - .debug_frame 0x00000000000049dc 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o - .debug_frame 0x0000000000004a10 0xec ./Middlewares/Third_Party/LwIP/src/core/mem.o - .debug_frame 0x0000000000004afc 0x134 ./Middlewares/Third_Party/LwIP/src/core/memp.o - .debug_frame 0x0000000000004c30 0x260 ./Middlewares/Third_Party/LwIP/src/core/netif.o - .debug_frame 0x0000000000004e90 0x3e4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o - .debug_frame 0x0000000000005274 0x6a8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o - .debug_frame 0x000000000000591c 0x194 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o - .debug_frame 0x0000000000005ab0 0x280 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o - .debug_frame 0x0000000000005d30 0x144 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o - .debug_frame 0x0000000000005e74 0x268 ./Middlewares/Third_Party/LwIP/src/core/udp.o - .debug_frame 0x00000000000060dc 0x56c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o - .debug_frame 0x0000000000006648 0x228 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o - .debug_frame 0x0000000000006870 0xa8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o - .debug_frame 0x0000000000006918 0xcc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o - .debug_frame 0x00000000000069e4 0xf4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o - .debug_frame 0x0000000000006ad8 0x1a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - .debug_frame 0x0000000000006c78 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o - .debug_frame 0x0000000000006cd0 0x44 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) - .debug_frame 0x0000000000006d14 0x13c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) - .debug_frame 0x0000000000006e50 0x34 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) - .debug_frame 0x0000000000006e84 0x6c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) - .debug_frame 0x0000000000006ef0 0x88 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) - .debug_frame 0x0000000000006f78 0x40 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) - .debug_frame 0x0000000000006fb8 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) - .debug_frame 0x0000000000006fe4 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) - .debug_frame 0x000000000000700c 0x20 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) - .debug_frame 0x000000000000702c 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) - .debug_frame 0x0000000000007058 0x38 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) - .debug_frame 0x0000000000007090 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) - .debug_frame 0x00000000000070bc 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) - .debug_frame 0x00000000000070e8 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) - .debug_frame 0x0000000000007114 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) - .debug_frame 0x0000000000007140 0xb0 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) - .debug_frame 0x00000000000071f0 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) - .debug_frame 0x0000000000007218 0x40 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) - .debug_frame 0x0000000000007258 0x38 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) - .debug_frame 0x0000000000007290 0x30 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) - .debug_frame 0x00000000000072c0 0x50 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) - .debug_frame 0x0000000000007310 0x30 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) - .debug_frame 0x0000000000007340 0xa8 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) - .debug_frame 0x00000000000073e8 0x60 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) - .debug_frame 0x0000000000007448 0x5c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) - .debug_frame 0x00000000000074a4 0x64 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) - .debug_frame 0x0000000000007508 0x58 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) - .debug_frame 0x0000000000007560 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) - .debug_frame 0x000000000000758c 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) - .debug_frame 0x00000000000075b8 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) - .debug_frame 0x00000000000075e4 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) - .debug_frame 0x000000000000760c 0x28 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) - .debug_frame 0x0000000000007634 0xcc C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) - .debug_frame 0x0000000000007700 0x3c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) - .debug_frame 0x000000000000773c 0x2c C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) - .debug_frame 0x0000000000007768 0x34 C:/ST/STM32CubeIDE_1.11.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.0.202305231506/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) - -.debug_line_str - 0x0000000000000000 0x84 - .debug_line_str - 0x0000000000000000 0x84 ./Core/Startup/startup_stm32f207zgtx.o - 0x9c (size before relaxing) +Archive member included to satisfy reference by file (symbol) + +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o (exit) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o (rand) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) (__stdio_exit_handler) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (_fwalk_sglue) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + ./Core/Src/main.o (printf) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + ./Core/Src/main.o (puts) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (__sread) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) (__swbuf_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) (__swsetup_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) + ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o (memcmp) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o (memset) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) + ./Middlewares/Third_Party/LwIP/src/core/def.o (strncmp) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_close_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + ./Core/Src/syscalls.o (errno) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) (_impure_ptr) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_lseek_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_read_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) (_write_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o (__libc_init_array) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (__retarget_lock_init_recursive) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) + ./Core/Src/main.o (strcmp) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) + ./LWIP/Target/ethernetif.o (memcpy) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) + ./Core/Src/main.o (strlen) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) (__assert_func) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) (_free_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) (malloc) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (_malloc_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) (__malloc_lock) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) (_vfprintf_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) (_printf_i) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) (_fflush_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) (fiprintf) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) (__sfvwrite_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) (__smakebuf_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) (memmove) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) (_fstat_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) (_isatty_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) (_sbrk_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) (memchr) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) (abort) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) (_realloc_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) (raise) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) (_kill_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) (_malloc_usable_size_r) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) + ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o (__aeabi_uldivmod) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) (__udivmoddi4) +C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) + C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) (__aeabi_ldiv0) + +Discarded input sections + + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o + .data 0x0000000000000000 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + .rodata 0x0000000000000000 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + .text 0x0000000000000000 0x7c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .ARM.extab 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .ARM.exidx 0x0000000000000000 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .debug_line 0x0000000000000000 0x76 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .debug_line_str + 0x0000000000000000 0xd9 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .debug_info 0x0000000000000000 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .debug_abbrev 0x0000000000000000 0x14 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .debug_aranges + 0x0000000000000000 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .debug_str 0x0000000000000000 0xde C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .ARM.attributes + 0x0000000000000000 0x1b C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/main.o + .text 0x0000000000000000 0x0 ./Core/Src/main.o + .data 0x0000000000000000 0x0 ./Core/Src/main.o + .bss 0x0000000000000000 0x0 ./Core/Src/main.o + .rodata.cMqttServerIpAddr_u32 + 0x0000000000000000 0x4 ./Core/Src/main.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_hal_msp.o + .text 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_hal_msp.o + .data 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_hal_msp.o + .bss 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_hal_msp.o + .text.HAL_TIM_Base_MspDeInit + 0x0000000000000000 0x6c ./Core/Src/stm32f2xx_hal_msp.o + .text.HAL_UART_MspDeInit + 0x0000000000000000 0x3c ./Core/Src/stm32f2xx_hal_msp.o + .text.HAL_PCD_MspDeInit + 0x0000000000000000 0x38 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0xa9c ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x258 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x51 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x103 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x6a ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x1df ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0xbd ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0xe49 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x11f ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x6d ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x174 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x55 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x1056 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x153 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x170 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x115 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x108 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0xa5 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x16a ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x5f ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x236 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0xcce ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x126 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x216 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x113 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x82 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x8ed ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x4c ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x2aa ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0xba ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x12d ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x0000000000000000 0x19e ./Core/Src/stm32f2xx_hal_msp.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/stm32f2xx_it.o + .text 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_it.o + .data 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_it.o + .bss 0x0000000000000000 0x0 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xa9c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x258 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x51 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x103 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x6a ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1df ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xbd ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xe49 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x11f ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x6d ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x174 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x55 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1056 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x153 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x170 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x115 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x108 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xa5 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16a ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x5f ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x236 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xcce ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x126 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x216 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x113 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x82 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x8ed ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x4c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x2aa ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xba ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x12d ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x19e ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xb2 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x24 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x61 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x34 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x35 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x34 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x58 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x177 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x369 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x29 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x147 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x52 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x52 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xc1 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x3d ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xc8 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x35 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x28 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x11 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x460 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x7c ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x17 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x118 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x4a ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x66 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x6a0 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x3f ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x2b ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x15b ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x55 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x6a ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x185 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x14d ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x8f ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x28 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x5a ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0xe3 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x38 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x29 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/stm32f2xx_it.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/syscalls.o + .text 0x0000000000000000 0x0 ./Core/Src/syscalls.o + .data 0x0000000000000000 0x0 ./Core/Src/syscalls.o + .bss 0x0000000000000000 0x0 ./Core/Src/syscalls.o + .bss.__env 0x0000000000000000 0x4 ./Core/Src/syscalls.o + .data.environ 0x0000000000000000 0x4 ./Core/Src/syscalls.o + .text.initialise_monitor_handles + 0x0000000000000000 0xc ./Core/Src/syscalls.o + .text._open 0x0000000000000000 0x1a ./Core/Src/syscalls.o + .text._wait 0x0000000000000000 0x20 ./Core/Src/syscalls.o + .text._unlink 0x0000000000000000 0x20 ./Core/Src/syscalls.o + .text._times 0x0000000000000000 0x16 ./Core/Src/syscalls.o + .text._stat 0x0000000000000000 0x1e ./Core/Src/syscalls.o + .text._link 0x0000000000000000 0x24 ./Core/Src/syscalls.o + .text._fork 0x0000000000000000 0x1c ./Core/Src/syscalls.o + .text._execve 0x0000000000000000 0x24 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0xa9c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x24 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x34 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x174 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x369 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x34 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x58 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x177 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x35 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x6a ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x52 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x52 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x3d ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x35 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x29 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x258 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x103 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x1df ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0xbd ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0xe49 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x11f ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x6d ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x1056 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x153 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x170 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x115 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x108 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0xa5 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x16a ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x5f ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x236 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0xcce ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x126 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x216 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x113 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x82 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x8ed ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x4c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x2aa ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0xba ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x12d ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x19e ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x147 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x28 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x11 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x460 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x7c ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x17 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x118 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x4a ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x66 ./Core/Src/syscalls.o + .debug_macro 0x0000000000000000 0x6a0 ./Core/Src/syscalls.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/sysmem.o + .text 0x0000000000000000 0x0 ./Core/Src/sysmem.o + .data 0x0000000000000000 0x0 ./Core/Src/sysmem.o + .bss 0x0000000000000000 0x0 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xa9c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x258 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x51 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x103 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x6a ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1df ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xbd ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xe49 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x11f ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x6d ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x174 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x55 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1056 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x153 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x170 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x115 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x108 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xa5 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x16a ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x5f ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x236 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xcce ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x126 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x216 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x113 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x82 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x8ed ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x4c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x2aa ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xba ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x12d ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x19e ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xac ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x24 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x61 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x34 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x35 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x34 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x58 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x177 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x369 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x29 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x147 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x52 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x52 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xc1 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x3d ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0xc8 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x16 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x35 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x28 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x11 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x460 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x43 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x7c ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x17 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x118 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x4a ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x66 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x6a0 ./Core/Src/sysmem.o + .debug_macro 0x0000000000000000 0x31a ./Core/Src/sysmem.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .group 0x0000000000000000 0xc ./Core/Src/system_stm32f2xx.o + .text 0x0000000000000000 0x0 ./Core/Src/system_stm32f2xx.o + .data 0x0000000000000000 0x0 ./Core/Src/system_stm32f2xx.o + .bss 0x0000000000000000 0x0 ./Core/Src/system_stm32f2xx.o + .text.SystemCoreClockUpdate + 0x0000000000000000 0x100 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0xa9c ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x8e ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x51 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x103 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x6a ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x1df ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x1c ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0xbd ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0xe49 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x11f ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x14fe1 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x6d ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x258 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x35a5 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x174 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x55 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x1056 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x153 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x170 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x115 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x108 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0xa5 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x16a ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x5f ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x236 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0xcce ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x126 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x216 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x2e ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x113 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x22 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x82 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x8ed ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x4c ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x2aa ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x287 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0xba ./Core/Src/system_stm32f2xx.o + .debug_macro 0x0000000000000000 0x12d ./Core/Src/system_stm32f2xx.o + .text 0x0000000000000000 0x14 ./Core/Startup/startup_stm32f207zgtx.o + .data 0x0000000000000000 0x0 ./Core/Startup/startup_stm32f207zgtx.o + .bss 0x0000000000000000 0x0 ./Core/Startup/startup_stm32f207zgtx.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DeInit + 0x0000000000000000 0x58 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_MspInit + 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_MspDeInit + 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetTickPrio + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_SetTickFreq + 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetTickFreq + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_SuspendTick + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_ResumeTick + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetHalVersion + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetREVID + 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetDEVID + 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DBGMCU_EnableDBGSleepMode + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DBGMCU_DisableDBGSleepMode + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DBGMCU_EnableDBGStopMode + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DBGMCU_DisableDBGStopMode + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DBGMCU_EnableDBGStandbyMode + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DBGMCU_DisableDBGStandbyMode + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_EnableCompensationCell + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_DisableCompensationCell + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetUIDw0 + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetUIDw1 + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .text.HAL_GetUIDw2 + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_DisableIRQ + 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_GetPendingIRQ + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_SetPendingIRQ + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_ClearPendingIRQ + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_GetActive + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_GetPriority + 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.NVIC_DecodePriority + 0x0000000000000000 0x6c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_SystemReset + 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_DisableIRQ + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_SystemReset + 0x0000000000000000 0x8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_MPU_Disable + 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_MPU_Enable + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_MPU_ConfigRegion + 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_GetPriorityGrouping + 0x0000000000000000 0xe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_GetPriority + 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_SetPendingIRQ + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_GetPendingIRQ + 0x0000000000000000 0x1e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_ClearPendingIRQ + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_GetActive + 0x0000000000000000 0x1e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_SYSTICK_CLKSourceConfig + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_SYSTICK_IRQHandler + 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_SYSTICK_Callback + 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_Init + 0x0000000000000000 0x15c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_DeInit + 0x0000000000000000 0xbc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_Start + 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_Start_IT + 0x0000000000000000 0xb0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_Abort + 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_Abort_IT + 0x0000000000000000 0x42 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_PollForTransfer + 0x0000000000000000 0x1be ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_IRQHandler + 0x0000000000000000 0x314 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_RegisterCallback + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_UnRegisterCallback + 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.HAL_DMA_GetError + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.DMA_SetConfig + 0x0000000000000000 0x5a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.DMA_CalcBaseAndBitshift + 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .text.DMA_CheckFifoParam + 0x0000000000000000 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .rodata.flagBitshiftOffset.0 + 0x0000000000000000 0x8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_info 0x0000000000000000 0x8e7 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_abbrev 0x0000000000000000 0x264 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_aranges + 0x0000000000000000 0x90 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_rnglists + 0x0000000000000000 0x70 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_line 0x0000000000000000 0xfdb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_str 0x0000000000000000 0xc4def ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .debug_frame 0x0000000000000000 0x250 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .text.HAL_DMAEx_MultiBufferStart + 0x0000000000000000 0x96 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .text.HAL_DMAEx_MultiBufferStart_IT + 0x0000000000000000 0x1290 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .text.HAL_DMAEx_ChangeMemory + 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .text.DMA_MultiBufferSetConfig + 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_info 0x0000000000000000 0x4df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_abbrev 0x0000000000000000 0x1a3 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_aranges + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_rnglists + 0x0000000000000000 0x27 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_line 0x0000000000000000 0x140a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_str 0x0000000000000000 0xc4ba9 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .debug_frame 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_DeInit + 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_GetReceivedFrame_IT + 0x0000000000000000 0x10e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_IRQHandler + 0x0000000000000000 0xc8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_TxCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_RxCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_ErrorCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_ConfigDMA + 0x0000000000000000 0x120 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_ETH_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_SetConfigLine + 0x0000000000000000 0x14c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_GetConfigLine + 0x0000000000000000 0xf0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_ClearConfigLine + 0x0000000000000000 0xc0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_RegisterCallback + 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_GetHandle + 0x0000000000000000 0x26 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_IRQHandler + 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_GetPending + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_ClearPending + 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .text.HAL_EXTI_GenerateSWI + 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_info 0x0000000000000000 0x4f4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_abbrev 0x0000000000000000 0x1c6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_aranges + 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_rnglists + 0x0000000000000000 0x46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_line 0x0000000000000000 0xa63 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_str 0x0000000000000000 0xc4a41 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .debug_frame 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .bss.pFlash 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_Program + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_Program_IT + 0x0000000000000000 0x9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_IRQHandler + 0x0000000000000000 0x140 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_EndOfOperationCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_OperationErrorCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_Unlock + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_Lock + 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_OB_Unlock + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_OB_Lock + 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_OB_Launch + 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.HAL_FLASH_GetError + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.FLASH_WaitForLastOperation + 0x0000000000000000 0x80 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.FLASH_Program_DoubleWord + 0x0000000000000000 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.FLASH_Program_Word + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.FLASH_Program_HalfWord + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.FLASH_Program_Byte + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .text.FLASH_SetErrorCode + 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_info 0x0000000000000000 0x570 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_abbrev 0x0000000000000000 0x28c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_aranges + 0x0000000000000000 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_rnglists + 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_line 0x0000000000000000 0xb0a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_str 0x0000000000000000 0xc4bbe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .debug_frame 0x0000000000000000 0x274 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.HAL_FLASHEx_Erase + 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.HAL_FLASHEx_Erase_IT + 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.HAL_FLASHEx_OBProgram + 0x0000000000000000 0xdc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.HAL_FLASHEx_OBGetConfig + 0x0000000000000000 0x46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_Erase_Sector + 0x0000000000000000 0xa4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_FlushCaches + 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_MassErase + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_EnableWRP + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_DisableWRP + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_RDP_LevelConfig + 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_UserConfig + 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_BOR_LevelConfig + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_GetUser + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_GetWRP + 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_GetRDP + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .text.FLASH_OB_GetBOR + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_info 0x0000000000000000 0x6be ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_abbrev 0x0000000000000000 0x29d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_aranges + 0x0000000000000000 0x98 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_rnglists + 0x0000000000000000 0x72 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_line 0x0000000000000000 0xb32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_str 0x0000000000000000 0xc4c22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .debug_frame 0x0000000000000000 0x250 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .text.HAL_GPIO_DeInit + 0x0000000000000000 0x1fc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .text.HAL_GPIO_TogglePin + 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .text.HAL_GPIO_LockPin + 0x0000000000000000 0x4e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .text.HAL_GPIO_EXTI_IRQHandler + 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .text.HAL_GPIO_EXTI_Callback + 0x0000000000000000 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_DeInit + 0x0000000000000000 0x46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_Start + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_Stop + 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_IRQHandler + 0x0000000000000000 0x922 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_WKUP_IRQHandler + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_DataOutStageCallback + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_DataInStageCallback + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_SetupStageCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_SOFCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_ResetCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_SuspendCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_ResumeCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_ISOOUTIncompleteCallback + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_ISOINIncompleteCallback + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_ConnectCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_DisconnectCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_DevConnect + 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_DevDisconnect + 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_SetAddress + 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_Open + 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_Close + 0x0000000000000000 0x94 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_Receive + 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_GetRxCount + 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_Transmit + 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_SetStall + 0x0000000000000000 0xc8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_ClrStall + 0x0000000000000000 0xac ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_Abort + 0x0000000000000000 0x62 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_EP_Flush + 0x0000000000000000 0x5a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_ActivateRemoteWakeup + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_DeActivateRemoteWakeup + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.HAL_PCD_SetTestMode + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.PCD_WriteEmptyTxFifo + 0x0000000000000000 0x11a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.PCD_EP_OutXfrComplete_int + 0x0000000000000000 0x1d0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .text.PCD_EP_OutSetupPacket_int + 0x0000000000000000 0x8c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .text.HAL_PCDEx_SetTxFiFo + 0x0000000000000000 0x8c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .text.HAL_PCDEx_SetRxFiFo + 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .text.HAL_PCDEx_LPM_Callback + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .text.HAL_PCDEx_BCD_Callback + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_info 0x0000000000000000 0x6cc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_abbrev 0x0000000000000000 0x1c7 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_aranges + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_rnglists + 0x0000000000000000 0x26 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_line 0x0000000000000000 0x85a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_str 0x0000000000000000 0xc4d80 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .debug_frame 0x0000000000000000 0xb0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_DeInit + 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnableBkUpAccess + 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_DisableBkUpAccess + 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_ConfigPVD + 0x0000000000000000 0xbc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnablePVD + 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_DisablePVD + 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnableWakeUpPin + 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_DisableWakeUpPin + 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnterSLEEPMode + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnterSTOPMode + 0x0000000000000000 0x58 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnterSTANDBYMode + 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_PVD_IRQHandler + 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_PVDCallback + 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnableSleepOnExit + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_DisableSleepOnExit + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_EnableSEVOnPend + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .text.HAL_PWR_DisableSEVOnPend + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_info 0x0000000000000000 0x78d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_abbrev 0x0000000000000000 0x203 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_aranges + 0x0000000000000000 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_rnglists + 0x0000000000000000 0x74 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x20d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_line 0x0000000000000000 0x9c7 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_str 0x0000000000000000 0xc4c15 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .debug_frame 0x0000000000000000 0x274 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .text.HAL_PWREx_EnableBkUpReg + 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .text.HAL_PWREx_DisableBkUpReg + 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .text.HAL_PWREx_EnableFlashPowerDown + 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .text.HAL_PWREx_DisableFlashPowerDown + 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_info 0x0000000000000000 0x263 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_abbrev 0x0000000000000000 0x155 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_aranges + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_rnglists + 0x0000000000000000 0x25 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x1fb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_line 0x0000000000000000 0x884 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_str 0x0000000000000000 0xc494b ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .debug_frame 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_DeInit + 0x0000000000000000 0x164 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_MCOConfig + 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_EnableCSS + 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_DisableCSS + 0x0000000000000000 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_GetOscConfig + 0x0000000000000000 0x184 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_GetClockConfig + 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_NMI_IRQHandler + 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .text.HAL_RCC_CSSCallback + 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .text.HAL_RCCEx_PeriphCLKConfig + 0x0000000000000000 0x1ec ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .text.HAL_RCCEx_GetPeriphCLKConfig + 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .text.HAL_RCCEx_EnablePLLI2S + 0x0000000000000000 0xb4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .text.HAL_RCCEx_DisablePLLI2S + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_info 0x0000000000000000 0x535 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_abbrev 0x0000000000000000 0x22a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_aranges + 0x0000000000000000 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_rnglists + 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_line 0x0000000000000000 0x9c8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_str 0x0000000000000000 0xc4acc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .comment 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .debug_frame 0x0000000000000000 0xa4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .ARM.attributes + 0x0000000000000000 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_DeInit + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_Start + 0x0000000000000000 0xcc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_Stop + 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_Start_IT + 0x0000000000000000 0xdc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_Stop_IT + 0x0000000000000000 0x5c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_Start_DMA + 0x0000000000000000 0x144 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_Stop_DMA + 0x0000000000000000 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_Init + 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_DeInit + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_Start + 0x0000000000000000 0x190 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_Stop + 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_Start_IT + 0x0000000000000000 0x22c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_Stop_IT + 0x0000000000000000 0x17c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_Start_DMA + 0x0000000000000000 0x390 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_Stop_DMA + 0x0000000000000000 0x1a4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_DeInit + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_Start + 0x0000000000000000 0x190 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_Stop + 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_Stop_IT + 0x0000000000000000 0x17c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_Start_DMA + 0x0000000000000000 0x390 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_Stop_DMA + 0x0000000000000000 0x1a4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_Init + 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_DeInit + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_Start + 0x0000000000000000 0x1b8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_Stop + 0x0000000000000000 0xc2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_Start_IT + 0x0000000000000000 0x250 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_Stop_IT + 0x0000000000000000 0x15c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_Start_DMA + 0x0000000000000000 0x354 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_Stop_DMA + 0x0000000000000000 0x184 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_Init + 0x0000000000000000 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_DeInit + 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_Start + 0x0000000000000000 0xc4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_Stop + 0x0000000000000000 0xd8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_Start_IT + 0x0000000000000000 0xe4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_Stop_IT + 0x0000000000000000 0xf8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_Init + 0x0000000000000000 0x14c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_DeInit + 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_Start + 0x0000000000000000 0x11c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_Stop + 0x0000000000000000 0x12e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_Start_IT + 0x0000000000000000 0x15c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_Stop_IT + 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_Start_DMA + 0x0000000000000000 0x2d8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_Stop_DMA + 0x0000000000000000 0x192 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_ConfigChannel + 0x0000000000000000 0xb8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_ConfigChannel + 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_ConfigChannel + 0x0000000000000000 0x1a4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_DMABurst_WriteStart + 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_DMABurst_MultiWriteStart + 0x0000000000000000 0x2a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_DMABurst_WriteStop + 0x0000000000000000 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_DMABurst_ReadStart + 0x0000000000000000 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_DMABurst_MultiReadStart + 0x0000000000000000 0x2a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_DMABurst_ReadStop + 0x0000000000000000 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_GenerateEvent + 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_ConfigOCrefClear + 0x0000000000000000 0x198 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_ConfigTI1Input + 0x0000000000000000 0x36 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_SlaveConfigSynchro + 0x0000000000000000 0x84 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_SlaveConfigSynchro_IT + 0x0000000000000000 0x84 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_ReadCapturedValue + 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PeriodElapsedHalfCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_CaptureHalfCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_PulseFinishedHalfCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_TriggerHalfCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_ErrorCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Base_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OC_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_PWM_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_IC_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_OnePulse_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_Encoder_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_GetActiveChannel + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_GetChannelState + 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.HAL_TIM_DMABurstState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMAError + 0x0000000000000000 0x92 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMADelayPulseCplt + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMADelayPulseHalfCplt + 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMACaptureCplt + 0x0000000000000000 0xc8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMACaptureHalfCplt + 0x0000000000000000 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMAPeriodElapsedCplt + 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMAPeriodElapsedHalfCplt + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMATriggerCplt + 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_DMATriggerHalfCplt + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_SlaveTimer_SetConfig + 0x0000000000000000 0x122 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_TI1_SetConfig + 0x0000000000000000 0xe4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_TI2_SetConfig + 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_TI3_SetConfig + 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_TI4_SetConfig + 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_Init + 0x0000000000000000 0x152 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_DeInit + 0x0000000000000000 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_Start + 0x0000000000000000 0x11c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_Stop + 0x0000000000000000 0x70 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_Start_IT + 0x0000000000000000 0x12c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_Stop_IT + 0x0000000000000000 0x80 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_Start_DMA + 0x0000000000000000 0x16c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_Stop_DMA + 0x0000000000000000 0x7a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OCN_Start + 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OCN_Stop + 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OCN_Start_IT + 0x0000000000000000 0x1e4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OCN_Stop_IT + 0x0000000000000000 0x13e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OCN_Start_DMA + 0x0000000000000000 0x300 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OCN_Stop_DMA + 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_PWMN_Start + 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_PWMN_Stop + 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_PWMN_Start_IT + 0x0000000000000000 0x1e4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_PWMN_Stop_IT + 0x0000000000000000 0x13e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_PWMN_Start_DMA + 0x0000000000000000 0x300 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_PWMN_Stop_DMA + 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OnePulseN_Start + 0x0000000000000000 0xaa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OnePulseN_Stop + 0x0000000000000000 0xbe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OnePulseN_Start_IT + 0x0000000000000000 0xca ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_OnePulseN_Stop_IT + 0x0000000000000000 0xde ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_ConfigCommutEvent + 0x0000000000000000 0xbe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_ConfigCommutEvent_IT + 0x0000000000000000 0xbe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_ConfigCommutEvent_DMA + 0x0000000000000000 0xe4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_RemapConfig + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_CommutHalfCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_HallSensor_GetState + 0x0000000000000000 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.HAL_TIMEx_GetChannelNState + 0x0000000000000000 0x50 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.TIMEx_DMACommutationCplt + 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.TIMEx_DMACommutationHalfCplt + 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.TIM_DMADelayPulseNCplt + 0x0000000000000000 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.TIM_DMAErrorCCxN + 0x0000000000000000 0x6e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .text.TIM_CCxNChannelCmd + 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_HalfDuplex_Init + 0x0000000000000000 0xb0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_LIN_Init + 0x0000000000000000 0xd2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_MultiProcessor_Init + 0x0000000000000000 0xe6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_DeInit + 0x0000000000000000 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_MspInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_MspDeInit + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Transmit + 0x0000000000000000 0x106 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Receive + 0x0000000000000000 0x124 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Transmit_IT + 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Receive_IT + 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Transmit_DMA + 0x0000000000000000 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Receive_DMA + 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_DMAPause + 0x0000000000000000 0x138 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_DMAResume + 0x0000000000000000 0x11a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_DMAStop + 0x0000000000000000 0xfe ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UARTEx_ReceiveToIdle + 0x0000000000000000 0x1a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UARTEx_ReceiveToIdle_IT + 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UARTEx_ReceiveToIdle_DMA + 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UARTEx_GetRxEventType + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Abort + 0x0000000000000000 0x1d6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_AbortTransmit + 0x0000000000000000 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_AbortReceive + 0x0000000000000000 0x146 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_Abort_IT + 0x0000000000000000 0x228 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_AbortTransmit_IT + 0x0000000000000000 0xe8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_AbortReceive_IT + 0x0000000000000000 0x164 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_IRQHandler + 0x0000000000000000 0x524 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_TxCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_TxHalfCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_RxCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_RxHalfCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_ErrorCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_AbortCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_AbortTransmitCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_AbortReceiveCpltCallback + 0x0000000000000000 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UARTEx_RxEventCallback + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_LIN_SendBreak + 0x0000000000000000 0x76 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_MultiProcessor_EnterMuteMode + 0x0000000000000000 0x7c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_MultiProcessor_ExitMuteMode + 0x0000000000000000 0x7c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_HalfDuplex_EnableTransmitter + 0x0000000000000000 0x66 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_HalfDuplex_EnableReceiver + 0x0000000000000000 0x66 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_GetState + 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.HAL_UART_GetError + 0x0000000000000000 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMATransmitCplt + 0x0000000000000000 0x9a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMATxHalfCplt + 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMAReceiveCplt + 0x0000000000000000 0x12c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMARxHalfCplt + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMAError + 0x0000000000000000 0x94 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_WaitOnFlagUntilTimeout + 0x0000000000000000 0xdc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_Start_Receive_IT + 0x0000000000000000 0x72 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_Start_Receive_DMA + 0x0000000000000000 0x134 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_EndTxTransfer + 0x0000000000000000 0x4e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_EndRxTransfer + 0x0000000000000000 0xc4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMAAbortOnError + 0x0000000000000000 0x28 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMATxAbortCallback + 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMARxAbortCallback + 0x0000000000000000 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMATxOnlyAbortCallback + 0x0000000000000000 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_DMARxOnlyAbortCallback + 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_Transmit_IT + 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_EndTransmit_IT + 0x0000000000000000 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.UART_Receive_IT + 0x0000000000000000 0x17c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .data 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .bss 0x0000000000000000 0x0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_SetTurnaroundTime + 0x0000000000000000 0x144 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_EnableGlobalInt + 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_GetDevSpeed + 0x0000000000000000 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ActivateEndpoint + 0x0000000000000000 0x10c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ActivateDedicatedEndpoint + 0x0000000000000000 0x10e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_DeactivateEndpoint + 0x0000000000000000 0x1b8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_DeactivateDedicatedEndpoint + 0x0000000000000000 0x162 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_EPStartXfer + 0x0000000000000000 0x530 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_EPStopXfer + 0x0000000000000000 0x152 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_WritePacket + 0x0000000000000000 0x7a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ReadPacket + 0x0000000000000000 0xae ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_EPSetStall + 0x0000000000000000 0xda ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_EPClearStall + 0x0000000000000000 0xca ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_StopDevice + 0x0000000000000000 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_SetDevAddress + 0x0000000000000000 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_DevConnect + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ReadInterrupts + 0x0000000000000000 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ReadChInterrupts + 0x0000000000000000 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ReadDevAllOutEpInterrupt + 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ReadDevAllInEpInterrupt + 0x0000000000000000 0x32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ReadDevOutEPInterrupt + 0x0000000000000000 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ReadDevInEPInterrupt + 0x0000000000000000 0x5a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ClearInterrupts + 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ActivateSetup + 0x0000000000000000 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_EP0_OutStart + 0x0000000000000000 0xb8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_HostInit + 0x0000000000000000 0x180 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_InitFSLSPClkSel + 0x0000000000000000 0x78 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ResetPort + 0x0000000000000000 0x54 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_DriveVbus + 0x0000000000000000 0x70 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_GetHostSpeed + 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_GetCurrentFrame + 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_HC_Init + 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_HC_StartXfer + 0x0000000000000000 0x4ec ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_HC_ReadInterrupt + 0x0000000000000000 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_HC_Halt + 0x0000000000000000 0x23e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_DoPing + 0x0000000000000000 0x74 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_StopHost + 0x0000000000000000 0x124 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_ActivateRemoteWakeup + 0x0000000000000000 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.USB_DeActivateRemoteWakeup + 0x0000000000000000 0x2c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0xa9c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x258 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x8e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x51 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x103 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x6a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x1df ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0xbd ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0xe49 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x11f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x14fe1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x6d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x35a5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x174 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x55 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x1056 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x153 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x170 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x115 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x108 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0xa5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x16a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x5f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x236 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0xcce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x126 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x216 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x113 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x22 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x82 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x8ed ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x4c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x2aa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x287 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0xba ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x0000000000000000 0x12d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/App/lwip.o + .text 0x0000000000000000 0x0 ./LWIP/App/lwip.o + .data 0x0000000000000000 0x0 ./LWIP/App/lwip.o + .bss 0x0000000000000000 0x0 ./LWIP/App/lwip.o + .bss.DHCPfineTimer + 0x0000000000000000 0x4 ./LWIP/App/lwip.o + .bss.DHCPcoarseTimer + 0x0000000000000000 0x4 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xa9c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x258 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x2e ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x8e ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x51 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x103 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x6a ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1df ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xbd ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xe49 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x11f ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x14fe1 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x6d ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x35a5 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x174 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x55 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1056 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x153 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x170 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x115 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x108 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xa5 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16a ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x287 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x5f ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x236 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xcce ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x126 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x216 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x2e ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x113 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x82 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x8ed ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x4c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x2aa ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x287 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xba ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x12d ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x19e ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xac ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x24 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x61 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x43 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x34 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x35 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x43 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x34 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x58 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x8e ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x177 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x369 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x29 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x147 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x52 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x52 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xc1 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x3d ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xc8 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x35 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x28 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x11 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x460 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x43 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x7c ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x17 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x118 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x4a ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x66 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x6a0 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x3f ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x2b ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x15b ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x55 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x6a ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x185 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x14d ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x8f ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x8e ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x28 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x5a ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x2e ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0xe3 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x38 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x29 ./LWIP/App/lwip.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/App/lwip.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./LWIP/Target/ethernetif.o + .text 0x0000000000000000 0x0 ./LWIP/Target/ethernetif.o + .data 0x0000000000000000 0x0 ./LWIP/Target/ethernetif.o + .bss 0x0000000000000000 0x0 ./LWIP/Target/ethernetif.o + .text.HAL_ETH_MspDeInit + 0x0000000000000000 0x7c ./LWIP/Target/ethernetif.o + .text.sys_jiffies + 0x0000000000000000 0xe ./LWIP/Target/ethernetif.o + .bss.EthernetLinkTimer + 0x0000000000000000 0x4 ./LWIP/Target/ethernetif.o + .text.ethernetif_set_link + 0x0000000000000000 0x88 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xa9c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x258 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x2e ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x8e ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x51 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x103 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x6a ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1df ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xbd ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xe49 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x11f ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x14fe1 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x6d ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x35a5 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x174 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x55 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1056 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x153 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x170 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x115 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x108 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xa5 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16a ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x287 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x5f ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x236 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xcce ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x126 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x216 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x2e ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x113 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x82 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x8ed ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x4c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x2aa ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x287 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xba ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x12d ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x19e ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xb2 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x24 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x61 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x43 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x34 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x35 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x43 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x34 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x58 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x8e ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x177 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x369 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x29 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x147 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x52 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x52 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xc1 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x1c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x3d ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0xc8 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x35 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x28 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x11 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x460 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x43 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x7c ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x17 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x118 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x4a ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x66 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x6a0 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x3f ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x2b ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x15b ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x22 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x10 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x6a ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x14d ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x8f ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x5a ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x8e ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x28 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x16 ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000000000 0x20 ./LWIP/Target/ethernetif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_line 0x0000000000000000 0xb7d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .debug_str 0x0000000000000000 0xccd23 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_line 0x0000000000000000 0xb7d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .debug_str 0x0000000000000000 0xccd23 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/err.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/err.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/err.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x4bc ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_macro 0x0000000000000000 0x320 ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_line 0x0000000000000000 0xb9f ./Middlewares/Third_Party/LwIP/src/api/err.o + .debug_str 0x0000000000000000 0xcdab0 ./Middlewares/Third_Party/LwIP/src/api/err.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/err.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/err.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_line 0x0000000000000000 0xb7c ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .debug_str 0x0000000000000000 0xccd22 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x49c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_line 0x0000000000000000 0xb86 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .debug_str 0x0000000000000000 0xccd33 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/netdb.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_line 0x0000000000000000 0xb7e ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .debug_str 0x0000000000000000 0xccd24 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_line 0x0000000000000000 0xb7d ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .debug_str 0x0000000000000000 0xccd23 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/sockets.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_line 0x0000000000000000 0xb7b ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .debug_str 0x0000000000000000 0xccd21 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_client_new + 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_disconnect + 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/def.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/def.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/def.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/def.o + .text.lwip_strnstr + 0x0000000000000000 0x6c ./Middlewares/Third_Party/LwIP/src/core/def.o + .text.lwip_stricmp + 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/def.o + .text.lwip_strnicmp + 0x0000000000000000 0x72 ./Middlewares/Third_Party/LwIP/src/core/def.o + .rodata 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/def.o + .text.lwip_itoa + 0x0000000000000000 0x98 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/def.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/dns.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_line 0x0000000000000000 0xb7a ./Middlewares/Third_Party/LwIP/src/core/dns.o + .debug_str 0x0000000000000000 0xccd20 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/dns.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/dns.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.lwip_standard_chksum + 0x0000000000000000 0xb8 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.inet_cksum_pseudo_base + 0x0000000000000000 0xd8 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.inet_chksum_pseudo + 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.ip_chksum_pseudo + 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .rodata 0x0000000000000000 0x6c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.inet_cksum_pseudo_partial_base + 0x0000000000000000 0x124 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.inet_chksum_pseudo_partial + 0x0000000000000000 0x7e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.ip_chksum_pseudo_partial + 0x0000000000000000 0x3a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.inet_chksum + 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .text.inet_chksum_pbuf + 0x0000000000000000 0x94 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_info 0x0000000000000000 0x5fa ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_abbrev 0x0000000000000000 0x186 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_aranges + 0x0000000000000000 0x60 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_rnglists + 0x0000000000000000 0x47 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x51a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_line 0x0000000000000000 0xeb6 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_str 0x0000000000000000 0xceb56 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .debug_frame 0x0000000000000000 0x158 ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/init.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/init.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/init.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x5e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/init.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ip.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/mem.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .text.mem_calloc + 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .text.memp_malloc_pool + 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .text.memp_free_pool + 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .text.netif_input + 0x0000000000000000 0x36 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .text.netif_remove + 0x0000000000000000 0xa8 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .text.netif_find + 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .text.netif_set_link_up + 0x0000000000000000 0x5c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .text.netif_set_link_down + 0x0000000000000000 0x40 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_dechain + 0x0000000000000000 0xa4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_skip + 0x0000000000000000 0x26 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_take + 0x0000000000000000 0x124 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_take_at + 0x0000000000000000 0xa4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_coalesce + 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_put_at + 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_memcmp + 0x0000000000000000 0x9e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_memfind + 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_strstr + 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/raw.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_line 0x0000000000000000 0xb7a ./Middlewares/Third_Party/LwIP/src/core/raw.o + .debug_str 0x0000000000000000 0xccd20 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/raw.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/raw.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/stats.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_line 0x0000000000000000 0xb7c ./Middlewares/Third_Party/LwIP/src/core/stats.o + .debug_str 0x0000000000000000 0xccd22 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/stats.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/stats.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/sys.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x49b ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_line 0x0000000000000000 0xb83 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .debug_str 0x0000000000000000 0xcd212 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/sys.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/sys.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .rodata.tcp_state_str + 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_shutdown + 0x0000000000000000 0x90 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_accept_null + 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_listen_with_backlog + 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_listen_with_backlog_and_err + 0x0000000000000000 0x130 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_txnow + 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_setprio + 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_new_ip_type + 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_accept + 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_debug_state_str + 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x9b ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .text.sys_restart_timeouts + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .text.sys_timeouts_sleeptime + 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .text.udp_send + 0x0000000000000000 0x30 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .text.udp_sendto + 0x0000000000000000 0x54 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .text.udp_disconnect + 0x0000000000000000 0x2c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .text.udp_new_ip_type + 0x0000000000000000 0x1a ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x2f ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_line 0x0000000000000000 0xb82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .debug_str 0x0000000000000000 0xccd28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_set_struct + 0x0000000000000000 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_cleanup + 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_inform + 0x0000000000000000 0xdc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_network_changed + 0x0000000000000000 0x56 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x2f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_find_addr + 0x0000000000000000 0xa8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_get_entry + 0x0000000000000000 0xd0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x185 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_line 0x0000000000000000 0xb80 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .debug_str 0x0000000000000000 0xccd26 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .text.ip4_output + 0x0000000000000000 0x6c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .text.ip4_addr_netmask_valid + 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .text.ip4addr_ntoa + 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .text.ip4addr_ntoa_r + 0x0000000000000000 0x100 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .bss.str.0 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_line 0x0000000000000000 0xb81 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .debug_str 0x0000000000000000 0xccd27 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_line 0x0000000000000000 0xb82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .debug_str 0x0000000000000000 0xccd28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_line 0x0000000000000000 0xb81 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .debug_str 0x0000000000000000 0xccd27 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_line 0x0000000000000000 0xb81 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .debug_str 0x0000000000000000 0xccd27 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_line 0x0000000000000000 0xb7f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .debug_str 0x0000000000000000 0xccd25 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_line 0x0000000000000000 0xb84 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .debug_str 0x0000000000000000 0xccd2a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x5ba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_line 0x0000000000000000 0xcf8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .debug_str 0x0000000000000000 0xd02c4 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_line 0x0000000000000000 0xb80 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .debug_str 0x0000000000000000 0xccd26 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x492 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_line 0x0000000000000000 0xb7f ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .debug_str 0x0000000000000000 0xccd25 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x5a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xe3 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x20 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x4ab ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_line 0x0000000000000000 0xbd0 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .debug_str 0x0000000000000000 0xccde6 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .rodata 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .text.slipif_output + 0x0000000000000000 0x104 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .text.slipif_output_v4 + 0x0000000000000000 0x1e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .text.slipif_rxbyte + 0x0000000000000000 0x19c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .text.slipif_rxbyte_input + 0x0000000000000000 0x3c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .text.slipif_init + 0x0000000000000000 0xa8 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .text.slipif_poll + 0x0000000000000000 0x74 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_info 0x0000000000000000 0x79b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_abbrev 0x0000000000000000 0x25c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_aranges + 0x0000000000000000 0x48 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_rnglists + 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x57b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x18b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x14d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x5b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x3f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x2b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x15b ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x8f ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xc0 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_macro 0x0000000000000000 0xdd ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_line 0x0000000000000000 0xefe ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_str 0x0000000000000000 0xd0475 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .debug_frame 0x0000000000000000 0xe8 ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_line 0x0000000000000000 0xbc4 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .debug_str 0x0000000000000000 0xccde8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_line 0x0000000000000000 0xbc3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .debug_str 0x0000000000000000 0xccde7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_line 0x0000000000000000 0xbc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .debug_str 0x0000000000000000 0xccdec ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_line 0x0000000000000000 0xbc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .debug_str 0x0000000000000000 0xccdec ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_line 0x0000000000000000 0xbc7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .debug_str 0x0000000000000000 0xccdeb ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_line 0x0000000000000000 0xbc6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .debug_str 0x0000000000000000 0xccdea ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_line 0x0000000000000000 0xbc3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .debug_str 0x0000000000000000 0xccde7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_line 0x0000000000000000 0xbc3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .debug_str 0x0000000000000000 0xccde7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_line 0x0000000000000000 0xbc5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .debug_str 0x0000000000000000 0xccde9 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_line 0x0000000000000000 0xbc3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .debug_str 0x0000000000000000 0xccde7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_line 0x0000000000000000 0xbc4 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .debug_str 0x0000000000000000 0xccde8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x4a2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_line 0x0000000000000000 0xbc6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .debug_str 0x0000000000000000 0xccdea ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_line 0x0000000000000000 0xbc3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .debug_str 0x0000000000000000 0xccde7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_line 0x0000000000000000 0xbc5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .debug_str 0x0000000000000000 0xccde9 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_line 0x0000000000000000 0xbc4 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .debug_str 0x0000000000000000 0xccde8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_line 0x0000000000000000 0xbc9 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .debug_str 0x0000000000000000 0xccded ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_line 0x0000000000000000 0xbc3 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .debug_str 0x0000000000000000 0xccde7 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_line 0x0000000000000000 0xbc6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .debug_str 0x0000000000000000 0xccdea ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_line 0x0000000000000000 0xbc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .debug_str 0x0000000000000000 0xccdec ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_line 0x0000000000000000 0xbc5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .debug_str 0x0000000000000000 0xccde9 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_line 0x0000000000000000 0xbc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .debug_str 0x0000000000000000 0xccdec ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_line 0x0000000000000000 0xbc5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .debug_str 0x0000000000000000 0xccde9 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_line 0x0000000000000000 0xbc4 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .debug_str 0x0000000000000000 0xccde8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_line 0x0000000000000000 0xbc5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .debug_str 0x0000000000000000 0xccde9 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .group 0x0000000000000000 0xc ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .text 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .data 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .bss 0x0000000000000000 0x0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_info 0x0000000000000000 0x77 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_abbrev 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_aranges + 0x0000000000000000 0x18 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x4a1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xa9c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x258 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x51 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x103 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x6a ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1df ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xbd ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xe49 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x11f ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x14fe1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x6d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x35a5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x174 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x55 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1056 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x153 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x170 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x115 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x108 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xa5 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x16a ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x5f ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x236 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xcce ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x126 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x216 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x113 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x82 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x8ed ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x4c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x2aa ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x287 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xba ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x12d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x19e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xac ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x24 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x61 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x34 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x8e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x177 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x369 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x29 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x147 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x22 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x52 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xc1 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x1c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x3d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0xc8 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x16 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x35 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x11 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x10 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x460 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x43 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x7c ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x17 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x118 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x4a ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x66 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x6a0 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_macro 0x0000000000000000 0x2e ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_line 0x0000000000000000 0xbc2 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .debug_str 0x0000000000000000 0xccde6 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .comment 0x0000000000000000 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .ARM.attributes + 0x0000000000000000 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) + .text.exit 0x0000000000000000 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) + .debug_frame 0x0000000000000000 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) + .ARM.attributes + 0x0000000000000000 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-exit.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + .text.srand 0x0000000000000000 0x5c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.__fp_lock + 0x0000000000000000 0x18 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.__fp_unlock + 0x0000000000000000 0x18 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.__sfp 0x0000000000000000 0xa8 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.__fp_lock_all + 0x0000000000000000 0x1c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.__fp_unlock_all + 0x0000000000000000 0x1c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + .text._printf_r + 0x0000000000000000 0x1c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + .text.__seofread + 0x0000000000000000 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + .text.__swbuf 0x0000000000000000 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) + .text.strncmp 0x0000000000000000 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) + .debug_frame 0x0000000000000000 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) + .ARM.attributes + 0x0000000000000000 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strncmp.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + .text._reclaim_reent + 0x0000000000000000 0xac C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_init + 0x0000000000000000 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_close + 0x0000000000000000 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_close_recursive + 0x0000000000000000 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_acquire + 0x0000000000000000 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_try_acquire + 0x0000000000000000 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_try_acquire_recursive + 0x0000000000000000 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_release + 0x0000000000000000 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .bss.__lock___arc4random_mutex + 0x0000000000000000 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .bss.__lock___at_quick_exit_mutex + 0x0000000000000000 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .bss.__lock___atexit_recursive_mutex + 0x0000000000000000 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .bss.__lock___dd_hash_mutex + 0x0000000000000000 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .bss.__lock___env_recursive_mutex + 0x0000000000000000 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .bss.__lock___tz_mutex + 0x0000000000000000 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + .text.__assert + 0x0000000000000000 0xa C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + .text.free 0x0000000000000000 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .text.__sprint_r + 0x0000000000000000 0x1a C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .text.vfprintf + 0x0000000000000000 0x14 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + .text.fflush 0x0000000000000000 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + .text._fprintf_r + 0x0000000000000000 0x1a C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) + .text.__sfvwrite_r + 0x0000000000000000 0x294 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) + .debug_frame 0x0000000000000000 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) + .ARM.attributes + 0x0000000000000000 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fvwrite.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) + .text.memmove 0x0000000000000000 0x34 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) + .debug_frame 0x0000000000000000 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) + .ARM.attributes + 0x0000000000000000 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memmove.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) + .text._realloc_r + 0x0000000000000000 0x5e C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) + .debug_frame 0x0000000000000000 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) + .ARM.attributes + 0x0000000000000000 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reallocr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .text._init_signal_r + 0x0000000000000000 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .text._signal_r + 0x0000000000000000 0x30 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .text.__sigtramp_r + 0x0000000000000000 0x48 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .text.signal 0x0000000000000000 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .text._init_signal + 0x0000000000000000 0xc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .text.__sigtramp + 0x0000000000000000 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) + .text._malloc_usable_size_r + 0x0000000000000000 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) + .debug_frame 0x0000000000000000 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) + .ARM.attributes + 0x0000000000000000 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-msizer.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + .ARM.extab 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o + .rodata 0x0000000000000000 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o + .eh_frame 0x0000000000000000 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o + .comment 0x0000000000000000 0x44 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o + .ARM.attributes + 0x0000000000000000 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o + .text 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o + .data 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o + .bss 0x0000000000000000 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o + +Memory Configuration + +Name Origin Length Attributes +RAM 0x0000000020000000 0x0000000000020000 xrw +FLASH 0x0000000008000000 0x0000000000100000 xr +*default* 0x0000000000000000 0xffffffffffffffff + +Linker script and memory map + +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/crt0.o +LOAD ./Core/Src/main.o +LOAD ./Core/Src/stm32f2xx_hal_msp.o +LOAD ./Core/Src/stm32f2xx_it.o +LOAD ./Core/Src/syscalls.o +LOAD ./Core/Src/sysmem.o +LOAD ./Core/Src/system_stm32f2xx.o +LOAD ./Core/Startup/startup_stm32f207zgtx.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o +LOAD ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o +LOAD ./LWIP/App/lwip.o +LOAD ./LWIP/Target/ethernetif.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/api_lib.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/api_msg.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/err.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/netbuf.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/netdb.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/netifapi.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/sockets.o +LOAD ./Middlewares/Third_Party/LwIP/src/api/tcpip.o +LOAD ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/def.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/dns.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/init.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ip.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/mem.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/memp.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/netif.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/pbuf.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/raw.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/stats.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/sys.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/tcp.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/timeouts.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/udp.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o +LOAD ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/slipif.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o +LOAD ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o +START GROUP +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libstdc++_nano.a +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libsupc++_nano.a +END GROUP +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libstdc++_nano.a +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libm.a +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a +START GROUP +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a +END GROUP +START GROUP +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a +END GROUP +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtend.o +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o + 0x0000000020020000 _estack = (ORIGIN (RAM) + LENGTH (RAM)) + 0x0000000000000200 _Min_Heap_Size = 0x200 + 0x0000000000000400 _Min_Stack_Size = 0x400 + +.isr_vector 0x0000000008000000 0x184 + 0x0000000008000000 . = ALIGN (0x4) + *(.isr_vector) + .isr_vector 0x0000000008000000 0x184 ./Core/Startup/startup_stm32f207zgtx.o + 0x0000000008000000 g_pfnVectors + 0x0000000008000184 . = ALIGN (0x4) + +.text 0x0000000008000184 0x13b00 + 0x0000000008000184 . = ALIGN (0x4) + *(.text) + .text 0x0000000008000184 0x40 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + .text 0x00000000080001c4 0x14 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) + 0x00000000080001c4 strcmp + .text 0x00000000080001d8 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) + 0x00000000080001d8 strlen + .text 0x00000000080001e8 0x30 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) + 0x00000000080001e8 __aeabi_uldivmod + .text 0x0000000008000218 0x2cc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + 0x0000000008000218 __udivmoddi4 + .text 0x00000000080004e4 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) + 0x00000000080004e4 __aeabi_idiv0 + 0x00000000080004e4 __aeabi_ldiv0 + *(.text*) + .text.main 0x00000000080004e8 0x15c ./Core/Src/main.o + 0x00000000080004e8 main + .text.SystemClock_Config + 0x0000000008000644 0x8e ./Core/Src/main.o + 0x0000000008000644 SystemClock_Config + *fill* 0x00000000080006d2 0x2 + .text.MX_TIM1_Init + 0x00000000080006d4 0x188 ./Core/Src/main.o + .text.MX_TIM3_Init + 0x000000000800085c 0x130 ./Core/Src/main.o + .text.MX_TIM7_Init + 0x000000000800098c 0x6c ./Core/Src/main.o + .text.MX_USART3_UART_Init + 0x00000000080009f8 0x54 ./Core/Src/main.o + .text.MX_USB_OTG_FS_PCD_Init + 0x0000000008000a4c 0x54 ./Core/Src/main.o + .text.MX_GPIO_Init + 0x0000000008000aa0 0x178 ./Core/Src/main.o + .text.MQTTConnect + 0x0000000008000c18 0x70 ./Core/Src/main.o + .text.mqtt_connection_cb + 0x0000000008000c88 0x88 ./Core/Src/main.o + .text.mqtt_sub_request_cb + 0x0000000008000d10 0x24 ./Core/Src/main.o + .text.mqtt_incoming_publish_cb + 0x0000000008000d34 0x58 ./Core/Src/main.o + .text.mqtt_incoming_data_cb + 0x0000000008000d8c 0x74 ./Core/Src/main.o + .text.example_publish + 0x0000000008000e00 0x6c ./Core/Src/main.o + .text.mqtt_pub_request_cb + 0x0000000008000e6c 0x2c ./Core/Src/main.o + .text.Error_Handler + 0x0000000008000e98 0xa ./Core/Src/main.o + 0x0000000008000e98 Error_Handler + *fill* 0x0000000008000ea2 0x2 + .text.HAL_MspInit + 0x0000000008000ea4 0x4c ./Core/Src/stm32f2xx_hal_msp.o + 0x0000000008000ea4 HAL_MspInit + .text.HAL_TIM_Base_MspInit + 0x0000000008000ef0 0xa8 ./Core/Src/stm32f2xx_hal_msp.o + 0x0000000008000ef0 HAL_TIM_Base_MspInit + .text.HAL_TIM_MspPostInit + 0x0000000008000f98 0x148 ./Core/Src/stm32f2xx_hal_msp.o + 0x0000000008000f98 HAL_TIM_MspPostInit + .text.HAL_UART_MspInit + 0x00000000080010e0 0x90 ./Core/Src/stm32f2xx_hal_msp.o + 0x00000000080010e0 HAL_UART_MspInit + .text.HAL_PCD_MspInit + 0x0000000008001170 0xb4 ./Core/Src/stm32f2xx_hal_msp.o + 0x0000000008001170 HAL_PCD_MspInit + .text.NMI_Handler + 0x0000000008001224 0x6 ./Core/Src/stm32f2xx_it.o + 0x0000000008001224 NMI_Handler + .text.HardFault_Handler + 0x000000000800122a 0x6 ./Core/Src/stm32f2xx_it.o + 0x000000000800122a HardFault_Handler + .text.MemManage_Handler + 0x0000000008001230 0x6 ./Core/Src/stm32f2xx_it.o + 0x0000000008001230 MemManage_Handler + .text.BusFault_Handler + 0x0000000008001236 0x6 ./Core/Src/stm32f2xx_it.o + 0x0000000008001236 BusFault_Handler + .text.UsageFault_Handler + 0x000000000800123c 0x6 ./Core/Src/stm32f2xx_it.o + 0x000000000800123c UsageFault_Handler + .text.SVC_Handler + 0x0000000008001242 0xc ./Core/Src/stm32f2xx_it.o + 0x0000000008001242 SVC_Handler + .text.DebugMon_Handler + 0x000000000800124e 0xc ./Core/Src/stm32f2xx_it.o + 0x000000000800124e DebugMon_Handler + .text.PendSV_Handler + 0x000000000800125a 0xc ./Core/Src/stm32f2xx_it.o + 0x000000000800125a PendSV_Handler + .text.SysTick_Handler + 0x0000000008001266 0xc ./Core/Src/stm32f2xx_it.o + 0x0000000008001266 SysTick_Handler + *fill* 0x0000000008001272 0x2 + .text.TIM7_IRQHandler + 0x0000000008001274 0x18 ./Core/Src/stm32f2xx_it.o + 0x0000000008001274 TIM7_IRQHandler + .text._getpid 0x000000000800128c 0xe ./Core/Src/syscalls.o + 0x000000000800128c _getpid + *fill* 0x000000000800129a 0x2 + .text._kill 0x000000000800129c 0x24 ./Core/Src/syscalls.o + 0x000000000800129c _kill + .text._exit 0x00000000080012c0 0x14 ./Core/Src/syscalls.o + 0x00000000080012c0 _exit + .text._read 0x00000000080012d4 0x3a ./Core/Src/syscalls.o + 0x00000000080012d4 _read + .text._write 0x000000000800130e 0x38 ./Core/Src/syscalls.o + 0x000000000800130e _write + .text._close 0x0000000008001346 0x16 ./Core/Src/syscalls.o + 0x0000000008001346 _close + .text._fstat 0x000000000800135c 0x1e ./Core/Src/syscalls.o + 0x000000000800135c _fstat + .text._isatty 0x000000000800137a 0x14 ./Core/Src/syscalls.o + 0x000000000800137a _isatty + .text._lseek 0x000000000800138e 0x18 ./Core/Src/syscalls.o + 0x000000000800138e _lseek + *fill* 0x00000000080013a6 0x2 + .text._sbrk 0x00000000080013a8 0x70 ./Core/Src/sysmem.o + 0x00000000080013a8 _sbrk + .text.SystemInit + 0x0000000008001418 0xc ./Core/Src/system_stm32f2xx.o + 0x0000000008001418 SystemInit + .text.Reset_Handler + 0x0000000008001424 0x50 ./Core/Startup/startup_stm32f207zgtx.o + 0x0000000008001424 Reset_Handler + .text.Default_Handler + 0x0000000008001474 0x2 ./Core/Startup/startup_stm32f207zgtx.o + 0x0000000008001474 RTC_Alarm_IRQHandler + 0x0000000008001474 HASH_RNG_IRQHandler + 0x0000000008001474 EXTI2_IRQHandler + 0x0000000008001474 TIM8_CC_IRQHandler + 0x0000000008001474 TIM1_CC_IRQHandler + 0x0000000008001474 DMA2_Stream5_IRQHandler + 0x0000000008001474 DMA1_Stream5_IRQHandler + 0x0000000008001474 PVD_IRQHandler + 0x0000000008001474 SDIO_IRQHandler + 0x0000000008001474 TAMP_STAMP_IRQHandler + 0x0000000008001474 CAN2_RX1_IRQHandler + 0x0000000008001474 EXTI3_IRQHandler + 0x0000000008001474 TIM8_TRG_COM_TIM14_IRQHandler + 0x0000000008001474 TIM1_UP_TIM10_IRQHandler + 0x0000000008001474 TIM8_UP_TIM13_IRQHandler + 0x0000000008001474 I2C3_ER_IRQHandler + 0x0000000008001474 EXTI0_IRQHandler + 0x0000000008001474 I2C2_EV_IRQHandler + 0x0000000008001474 DMA1_Stream2_IRQHandler + 0x0000000008001474 CAN1_RX0_IRQHandler + 0x0000000008001474 OTG_HS_WKUP_IRQHandler + 0x0000000008001474 CAN2_SCE_IRQHandler + 0x0000000008001474 DMA2_Stream2_IRQHandler + 0x0000000008001474 SPI1_IRQHandler + 0x0000000008001474 TIM6_DAC_IRQHandler + 0x0000000008001474 TIM1_BRK_TIM9_IRQHandler + 0x0000000008001474 DCMI_IRQHandler + 0x0000000008001474 CAN2_RX0_IRQHandler + 0x0000000008001474 DMA2_Stream3_IRQHandler + 0x0000000008001474 USART6_IRQHandler + 0x0000000008001474 USART3_IRQHandler + 0x0000000008001474 CAN1_RX1_IRQHandler + 0x0000000008001474 UART5_IRQHandler + 0x0000000008001474 DMA2_Stream0_IRQHandler + 0x0000000008001474 TIM4_IRQHandler + 0x0000000008001474 I2C1_EV_IRQHandler + 0x0000000008001474 DMA1_Stream6_IRQHandler + 0x0000000008001474 DMA1_Stream1_IRQHandler + 0x0000000008001474 UART4_IRQHandler + 0x0000000008001474 TIM3_IRQHandler + 0x0000000008001474 RCC_IRQHandler + 0x0000000008001474 TIM8_BRK_TIM12_IRQHandler + 0x0000000008001474 Default_Handler + 0x0000000008001474 EXTI15_10_IRQHandler + 0x0000000008001474 ADC_IRQHandler + 0x0000000008001474 DMA1_Stream7_IRQHandler + 0x0000000008001474 CAN2_TX_IRQHandler + 0x0000000008001474 TIM5_IRQHandler + 0x0000000008001474 DMA2_Stream7_IRQHandler + 0x0000000008001474 I2C3_EV_IRQHandler + 0x0000000008001474 EXTI9_5_IRQHandler + 0x0000000008001474 RTC_WKUP_IRQHandler + 0x0000000008001474 ETH_WKUP_IRQHandler + 0x0000000008001474 SPI2_IRQHandler + 0x0000000008001474 OTG_HS_EP1_IN_IRQHandler + 0x0000000008001474 DMA1_Stream0_IRQHandler + 0x0000000008001474 CAN1_TX_IRQHandler + 0x0000000008001474 EXTI4_IRQHandler + 0x0000000008001474 FSMC_IRQHandler + 0x0000000008001474 ETH_IRQHandler + 0x0000000008001474 OTG_HS_EP1_OUT_IRQHandler + 0x0000000008001474 WWDG_IRQHandler + 0x0000000008001474 TIM2_IRQHandler + 0x0000000008001474 OTG_FS_WKUP_IRQHandler + 0x0000000008001474 TIM1_TRG_COM_TIM11_IRQHandler + 0x0000000008001474 OTG_HS_IRQHandler + 0x0000000008001474 EXTI1_IRQHandler + 0x0000000008001474 USART2_IRQHandler + 0x0000000008001474 I2C2_ER_IRQHandler + 0x0000000008001474 DMA2_Stream1_IRQHandler + 0x0000000008001474 CAN1_SCE_IRQHandler + 0x0000000008001474 FLASH_IRQHandler + 0x0000000008001474 DMA2_Stream4_IRQHandler + 0x0000000008001474 USART1_IRQHandler + 0x0000000008001474 OTG_FS_IRQHandler + 0x0000000008001474 SPI3_IRQHandler + 0x0000000008001474 DMA1_Stream4_IRQHandler + 0x0000000008001474 I2C1_ER_IRQHandler + 0x0000000008001474 DMA2_Stream6_IRQHandler + 0x0000000008001474 DMA1_Stream3_IRQHandler + *fill* 0x0000000008001476 0x2 + .text.HAL_Init + 0x0000000008001478 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x0000000008001478 HAL_Init + .text.HAL_InitTick + 0x00000000080014bc 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x00000000080014bc HAL_InitTick + .text.HAL_IncTick + 0x000000000800151c 0x24 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x000000000800151c HAL_IncTick + .text.HAL_GetTick + 0x0000000008001540 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x0000000008001540 HAL_GetTick + .text.HAL_Delay + 0x0000000008001554 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x0000000008001554 HAL_Delay + .text.__NVIC_SetPriorityGrouping + 0x000000000800159c 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_GetPriorityGrouping + 0x00000000080015e4 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_EnableIRQ + 0x0000000008001600 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.__NVIC_SetPriority + 0x0000000008001638 0x54 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.NVIC_EncodePriority + 0x000000000800168c 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.SysTick_Config + 0x00000000080016f0 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .text.HAL_NVIC_SetPriorityGrouping + 0x0000000008001734 0x16 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + 0x0000000008001734 HAL_NVIC_SetPriorityGrouping + .text.HAL_NVIC_SetPriority + 0x000000000800174a 0x38 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + 0x000000000800174a HAL_NVIC_SetPriority + .text.HAL_NVIC_EnableIRQ + 0x0000000008001782 0x1c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + 0x0000000008001782 HAL_NVIC_EnableIRQ + .text.HAL_SYSTICK_Config + 0x000000000800179e 0x18 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + 0x000000000800179e HAL_SYSTICK_Config + *fill* 0x00000000080017b6 0x2 + .text.HAL_ETH_Init + 0x00000000080017b8 0x318 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x00000000080017b8 HAL_ETH_Init + .text.HAL_ETH_DMATxDescListInit + 0x0000000008001ad0 0xce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x0000000008001ad0 HAL_ETH_DMATxDescListInit + .text.HAL_ETH_DMARxDescListInit + 0x0000000008001b9e 0xd6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x0000000008001b9e HAL_ETH_DMARxDescListInit + .text.HAL_ETH_TransmitFrame + 0x0000000008001c74 0x1d0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x0000000008001c74 HAL_ETH_TransmitFrame + .text.HAL_ETH_GetReceivedFrame + 0x0000000008001e44 0x106 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x0000000008001e44 HAL_ETH_GetReceivedFrame + .text.HAL_ETH_ReadPHYRegister + 0x0000000008001f4a 0xd0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x0000000008001f4a HAL_ETH_ReadPHYRegister + .text.HAL_ETH_WritePHYRegister + 0x000000000800201a 0xcc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x000000000800201a HAL_ETH_WritePHYRegister + .text.HAL_ETH_Start + 0x00000000080020e6 0x5e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x00000000080020e6 HAL_ETH_Start + .text.HAL_ETH_Stop + 0x0000000008002144 0x5e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x0000000008002144 HAL_ETH_Stop + *fill* 0x00000000080021a2 0x2 + .text.HAL_ETH_ConfigMAC + 0x00000000080021a4 0x1f4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0x00000000080021a4 HAL_ETH_ConfigMAC + .text.ETH_MACDMAConfig + 0x0000000008002398 0x38c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_MACAddressConfig + 0x0000000008002724 0x6c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_MACTransmissionEnable + 0x0000000008002790 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_MACTransmissionDisable + 0x00000000080027ca 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_MACReceptionEnable + 0x0000000008002804 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_MACReceptionDisable + 0x000000000800283e 0x3a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_DMATransmissionEnable + 0x0000000008002878 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_DMATransmissionDisable + 0x00000000080028a2 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_DMAReceptionEnable + 0x00000000080028cc 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_DMAReceptionDisable + 0x00000000080028f6 0x2a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.ETH_FlushTransmitFIFO + 0x0000000008002920 0x4a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + *fill* 0x000000000800296a 0x2 + .text.ETH_Delay + 0x000000000800296c 0x3c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .text.HAL_GPIO_Init + 0x00000000080029a8 0x33c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + 0x00000000080029a8 HAL_GPIO_Init + .text.HAL_GPIO_ReadPin + 0x0000000008002ce4 0x2e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + 0x0000000008002ce4 HAL_GPIO_ReadPin + .text.HAL_GPIO_WritePin + 0x0000000008002d12 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + 0x0000000008002d12 HAL_GPIO_WritePin + .text.HAL_PCD_Init + 0x0000000008002d42 0x23a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + 0x0000000008002d42 HAL_PCD_Init + .text.HAL_RCC_OscConfig + 0x0000000008002f7c 0x4a8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + 0x0000000008002f7c HAL_RCC_OscConfig + .text.HAL_RCC_ClockConfig + 0x0000000008003424 0x1d8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + 0x0000000008003424 HAL_RCC_ClockConfig + .text.HAL_RCC_GetSysClockFreq + 0x00000000080035fc 0x218 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + 0x00000000080035fc HAL_RCC_GetSysClockFreq + .text.HAL_RCC_GetHCLKFreq + 0x0000000008003814 0x14 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + 0x0000000008003814 HAL_RCC_GetHCLKFreq + .text.HAL_RCC_GetPCLK1Freq + 0x0000000008003828 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + 0x0000000008003828 HAL_RCC_GetPCLK1Freq + .text.HAL_RCC_GetPCLK2Freq + 0x000000000800386c 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + 0x000000000800386c HAL_RCC_GetPCLK2Freq + .text.HAL_TIM_Base_Init + 0x00000000080038b0 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x00000000080038b0 HAL_TIM_Base_Init + .text.HAL_TIM_PWM_Init + 0x000000000800394e 0x9e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x000000000800394e HAL_TIM_PWM_Init + .text.HAL_TIM_PWM_MspInit + 0x00000000080039ec 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x00000000080039ec HAL_TIM_PWM_MspInit + *fill* 0x00000000080039fe 0x2 + .text.HAL_TIM_PWM_Start_IT + 0x0000000008003a00 0x22c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008003a00 HAL_TIM_PWM_Start_IT + .text.HAL_TIM_IRQHandler + 0x0000000008003c2c 0x210 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008003c2c HAL_TIM_IRQHandler + .text.HAL_TIM_PWM_ConfigChannel + 0x0000000008003e3c 0x184 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008003e3c HAL_TIM_PWM_ConfigChannel + .text.HAL_TIM_ConfigClockSource + 0x0000000008003fc0 0x18e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008003fc0 HAL_TIM_ConfigClockSource + .text.HAL_TIM_PeriodElapsedCallback + 0x000000000800414e 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x000000000800414e HAL_TIM_PeriodElapsedCallback + .text.HAL_TIM_OC_DelayElapsedCallback + 0x0000000008004160 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008004160 HAL_TIM_OC_DelayElapsedCallback + .text.HAL_TIM_IC_CaptureCallback + 0x0000000008004172 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008004172 HAL_TIM_IC_CaptureCallback + .text.HAL_TIM_PWM_PulseFinishedCallback + 0x0000000008004184 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008004184 HAL_TIM_PWM_PulseFinishedCallback + .text.HAL_TIM_TriggerCallback + 0x0000000008004196 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008004196 HAL_TIM_TriggerCallback + .text.TIM_Base_SetConfig + 0x00000000080041a8 0x13c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x00000000080041a8 TIM_Base_SetConfig + .text.TIM_OC1_SetConfig + 0x00000000080042e4 0xe0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_OC2_SetConfig + 0x00000000080043c4 0xe8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x00000000080043c4 TIM_OC2_SetConfig + .text.TIM_OC3_SetConfig + 0x00000000080044ac 0xe8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_OC4_SetConfig + 0x0000000008004594 0xa8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_TI1_ConfigInputStage + 0x000000000800463c 0x5c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_TI2_ConfigInputStage + 0x0000000008004698 0x5e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_ITRx_SetConfig + 0x00000000080046f6 0x34 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .text.TIM_ETR_SetConfig + 0x000000000800472a 0x3e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x000000000800472a TIM_ETR_SetConfig + .text.TIM_CCxChannelCmd + 0x0000000008004768 0x48 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0x0000000008004768 TIM_CCxChannelCmd + .text.HAL_TIMEx_MasterConfigSynchronization + 0x00000000080047b0 0xf4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + 0x00000000080047b0 HAL_TIMEx_MasterConfigSynchronization + .text.HAL_TIMEx_ConfigBreakDeadTime + 0x00000000080048a4 0xa2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + 0x00000000080048a4 HAL_TIMEx_ConfigBreakDeadTime + .text.HAL_TIMEx_CommutCallback + 0x0000000008004946 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + 0x0000000008004946 HAL_TIMEx_CommutCallback + .text.HAL_TIMEx_BreakCallback + 0x0000000008004958 0x12 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + 0x0000000008004958 HAL_TIMEx_BreakCallback + .text.HAL_UART_Init + 0x000000000800496a 0xa0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + 0x000000000800496a HAL_UART_Init + *fill* 0x0000000008004a0a 0x2 + .text.UART_SetConfig + 0x0000000008004a0c 0x1d4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .text.USB_CoreInit + 0x0000000008004be0 0xae ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x0000000008004be0 USB_CoreInit + .text.USB_DisableGlobalInt + 0x0000000008004c8e 0x20 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x0000000008004c8e USB_DisableGlobalInt + .text.USB_SetCurrentMode + 0x0000000008004cae 0x98 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x0000000008004cae USB_SetCurrentMode + *fill* 0x0000000008004d46 0x2 + .text.USB_DevInit + 0x0000000008004d48 0x2b4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x0000000008004d48 USB_DevInit + .text.USB_FlushTxFifo + 0x0000000008004ffc 0x68 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x0000000008004ffc USB_FlushTxFifo + .text.USB_FlushRxFifo + 0x0000000008005064 0x60 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x0000000008005064 USB_FlushRxFifo + .text.USB_SetDevSpeed + 0x00000000080050c4 0x30 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x00000000080050c4 USB_SetDevSpeed + .text.USB_DevDisconnect + 0x00000000080050f4 0x40 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x00000000080050f4 USB_DevDisconnect + .text.USB_GetMode + 0x0000000008005134 0x1a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0x0000000008005134 USB_GetMode + *fill* 0x000000000800514e 0x2 + .text.USB_CoreReset + 0x0000000008005150 0x64 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .text.MX_LWIP_Init + 0x00000000080051b4 0x8c ./LWIP/App/lwip.o + 0x00000000080051b4 MX_LWIP_Init + .text.MX_LWIP_Process + 0x0000000008005240 0x30 ./LWIP/App/lwip.o + 0x0000000008005240 MX_LWIP_Process + .text.HAL_ETH_MspInit + 0x0000000008005270 0x18c ./LWIP/Target/ethernetif.o + 0x0000000008005270 HAL_ETH_MspInit + .text.low_level_init + 0x00000000080053fc 0x15c ./LWIP/Target/ethernetif.o + .text.low_level_output + 0x0000000008005558 0x13c ./LWIP/Target/ethernetif.o + .text.low_level_input + 0x0000000008005694 0x164 ./LWIP/Target/ethernetif.o + .text.ethernetif_input + 0x00000000080057f8 0x40 ./LWIP/Target/ethernetif.o + 0x00000000080057f8 ethernetif_input + .text.ethernetif_init + 0x0000000008005838 0x5c ./LWIP/Target/ethernetif.o + 0x0000000008005838 ethernetif_init + .text.sys_now 0x0000000008005894 0xe ./LWIP/Target/ethernetif.o + 0x0000000008005894 sys_now + *fill* 0x00000000080058a2 0x2 + .text.ethernetif_update_config + 0x00000000080058a4 0xf8 ./LWIP/Target/ethernetif.o + 0x00000000080058a4 ethernetif_update_config + .text.ethernetif_notify_conn_changed + 0x000000000800599c 0x12 ./LWIP/Target/ethernetif.o + 0x000000000800599c ethernetif_notify_conn_changed + .text.msg_generate_packet_id + 0x00000000080059ae 0x36 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_output_send + 0x00000000080059e4 0x130 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_create_request + 0x0000000008005b14 0x8c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_append_request + 0x0000000008005ba0 0x98 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_delete_request + 0x0000000008005c38 0x1e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + *fill* 0x0000000008005c56 0x2 + .text.mqtt_take_request + 0x0000000008005c58 0xa4 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_request_time_elapsed + 0x0000000008005cfc 0xa4 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_clear_requests + 0x0000000008005da0 0x54 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_init_requests + 0x0000000008005df4 0x58 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_output_append_u8 + 0x0000000008005e4c 0x2c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_output_append_u16 + 0x0000000008005e78 0x4e ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_output_append_buf + 0x0000000008005ec6 0x4c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_output_append_string + 0x0000000008005f12 0x84 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_output_append_fixed_header + 0x0000000008005f96 0x94 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + *fill* 0x000000000800602a 0x2 + .text.mqtt_output_check_space + 0x000000000800602c 0x68 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_close + 0x0000000008006094 0xc0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_cyclic_timer + 0x0000000008006154 0x130 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.pub_ack_rec_rel_response + 0x0000000008006284 0x7a ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_incomming_suback + 0x00000000080062fe 0x36 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_message_received + 0x0000000008006334 0x294 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_parse_incoming + 0x00000000080065c8 0x1ac ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_tcp_recv_cb + 0x0000000008006774 0xbc ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_tcp_sent_cb + 0x0000000008006830 0x74 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_tcp_err_cb + 0x00000000080068a4 0x48 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_tcp_poll_cb + 0x00000000080068ec 0x2c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_tcp_connect_cb + 0x0000000008006918 0x84 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .text.mqtt_publish + 0x000000000800699c 0x1a4 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + 0x000000000800699c mqtt_publish + .text.mqtt_sub_unsub + 0x0000000008006b40 0x1a8 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + 0x0000000008006b40 mqtt_sub_unsub + .text.mqtt_set_inpub_callback + 0x0000000008006ce8 0x48 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + 0x0000000008006ce8 mqtt_set_inpub_callback + .text.mqtt_client_connect + 0x0000000008006d30 0x364 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + 0x0000000008006d30 mqtt_client_connect + .text.mqtt_client_is_connected + 0x0000000008007094 0x40 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + 0x0000000008007094 mqtt_client_is_connected + .text.lwip_htons + 0x00000000080070d4 0x1a ./Middlewares/Third_Party/LwIP/src/core/def.o + 0x00000000080070d4 lwip_htons + .text.lwip_htonl + 0x00000000080070ee 0x30 ./Middlewares/Third_Party/LwIP/src/core/def.o + 0x00000000080070ee lwip_htonl + .text.lwip_init + 0x000000000800711e 0x2a ./Middlewares/Third_Party/LwIP/src/core/init.o + 0x000000000800711e lwip_init + .text.plug_holes + 0x0000000008007148 0x130 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .text.mem_init + 0x0000000008007278 0x78 ./Middlewares/Third_Party/LwIP/src/core/mem.o + 0x0000000008007278 mem_init + .text.mem_free + 0x00000000080072f0 0xc4 ./Middlewares/Third_Party/LwIP/src/core/mem.o + 0x00000000080072f0 mem_free + .text.mem_trim + 0x00000000080073b4 0x1b8 ./Middlewares/Third_Party/LwIP/src/core/mem.o + 0x00000000080073b4 mem_trim + .text.mem_malloc + 0x000000000800756c 0x1d0 ./Middlewares/Third_Party/LwIP/src/core/mem.o + 0x000000000800756c mem_malloc + .text.memp_init_pool + 0x000000000800773c 0x5e ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x000000000800773c memp_init_pool + *fill* 0x000000000800779a 0x2 + .text.memp_init + 0x000000000800779c 0x34 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x000000000800779c memp_init + .text.do_memp_malloc_pool + 0x00000000080077d0 0x54 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .text.memp_malloc + 0x0000000008007824 0x4c ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x0000000008007824 memp_malloc + .text.do_memp_free_pool + 0x0000000008007870 0x4c ./Middlewares/Third_Party/LwIP/src/core/memp.o + .text.memp_free + 0x00000000080078bc 0x54 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080078bc memp_free + .text.netif_init + 0x0000000008007910 0xc ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007910 netif_init + .text.netif_add + 0x000000000800791c 0xbc ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x000000000800791c netif_add + .text.netif_set_addr + 0x00000000080079d8 0x58 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x00000000080079d8 netif_set_addr + .text.netif_set_ipaddr + 0x0000000008007a30 0x70 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007a30 netif_set_ipaddr + .text.netif_set_gw + 0x0000000008007aa0 0x26 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007aa0 netif_set_gw + .text.netif_set_netmask + 0x0000000008007ac6 0x26 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007ac6 netif_set_netmask + .text.netif_set_default + 0x0000000008007aec 0x1c ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007aec netif_set_default + .text.netif_set_up + 0x0000000008007b08 0x46 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007b08 netif_set_up + .text.netif_issue_reports + 0x0000000008007b4e 0x42 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .text.netif_set_down + 0x0000000008007b90 0x44 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007b90 netif_set_down + .text.netif_set_link_callback + 0x0000000008007bd4 0x20 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000008007bd4 netif_set_link_callback + .text.pbuf_free_ooseq + 0x0000000008007bf4 0x48 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008007bf4 pbuf_free_ooseq + .text.pbuf_pool_is_empty + 0x0000000008007c3c 0x18 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_alloc + 0x0000000008007c54 0x334 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008007c54 pbuf_alloc + .text.pbuf_alloced_custom + 0x0000000008007f88 0xd4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008007f88 pbuf_alloced_custom + .text.pbuf_realloc + 0x000000000800805c 0x15c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x000000000800805c pbuf_realloc + .text.pbuf_header_impl + 0x00000000080081b8 0x144 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_header + 0x00000000080082fc 0x24 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x00000000080082fc pbuf_header + .text.pbuf_header_force + 0x0000000008008320 0x24 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008008320 pbuf_header_force + .text.pbuf_free + 0x0000000008008344 0x128 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008008344 pbuf_free + .text.pbuf_clen + 0x000000000800846c 0x2c ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x000000000800846c pbuf_clen + .text.pbuf_ref + 0x0000000008008498 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008008498 pbuf_ref + .text.pbuf_cat + 0x00000000080084dc 0xac ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x00000000080084dc pbuf_cat + .text.pbuf_chain + 0x0000000008008588 0x20 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008008588 pbuf_chain + .text.pbuf_copy + 0x00000000080085a8 0x198 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x00000000080085a8 pbuf_copy + .text.pbuf_copy_partial + 0x0000000008008740 0xf4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008008740 pbuf_copy_partial + .text.pbuf_skip_const + 0x0000000008008834 0x50 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .text.pbuf_get_at + 0x0000000008008884 0x2e ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000008008884 pbuf_get_at + .text.pbuf_try_get_at + 0x00000000080088b2 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x00000000080088b2 pbuf_try_get_at + .text.tcp_init + 0x00000000080088f6 0xc ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x00000000080088f6 tcp_init + *fill* 0x0000000008008902 0x2 + .text.tcp_tmr 0x0000000008008904 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008008904 tcp_tmr + .text.tcp_remove_listener + 0x0000000008008930 0x38 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_listen_closed + 0x0000000008008968 0x70 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_close_shutdown + 0x00000000080089d8 0x1d4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_close_shutdown_fin + 0x0000000008008bac 0xd4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_close + 0x0000000008008c80 0x30 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008008c80 tcp_close + .text.tcp_abandon + 0x0000000008008cb0 0x164 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008008cb0 tcp_abandon + .text.tcp_abort + 0x0000000008008e14 0x18 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008008e14 tcp_abort + .text.tcp_bind + 0x0000000008008e2c 0x124 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008008e2c tcp_bind + .text.tcp_update_rcv_ann_wnd + 0x0000000008008f50 0x9c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008008f50 tcp_update_rcv_ann_wnd + .text.tcp_recved + 0x0000000008008fec 0xb4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008008fec tcp_recved + .text.tcp_new_port + 0x00000000080090a0 0x88 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_connect + 0x0000000008009128 0x1e8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009128 tcp_connect + .text.tcp_slowtmr + 0x0000000008009310 0x584 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009310 tcp_slowtmr + .text.tcp_fasttmr + 0x0000000008009894 0xc8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009894 tcp_fasttmr + .text.tcp_process_refused_data + 0x000000000800995c 0xd2 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x000000000800995c tcp_process_refused_data + .text.tcp_segs_free + 0x0000000008009a2e 0x2a ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009a2e tcp_segs_free + .text.tcp_seg_free + 0x0000000008009a58 0x30 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009a58 tcp_seg_free + .text.tcp_seg_copy + 0x0000000008009a88 0x38 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009a88 tcp_seg_copy + .text.tcp_recv_null + 0x0000000008009ac0 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009ac0 tcp_recv_null + .text.tcp_kill_prio + 0x0000000008009b04 0x84 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_kill_state + 0x0000000008009b88 0x94 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_kill_timewait + 0x0000000008009c1c 0x60 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_alloc + 0x0000000008009c7c 0x104 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009c7c tcp_alloc + .text.tcp_new 0x0000000008009d80 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009d80 tcp_new + .text.tcp_arg 0x0000000008009d90 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009d90 tcp_arg + .text.tcp_recv + 0x0000000008009db0 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009db0 tcp_recv + .text.tcp_sent + 0x0000000008009df4 0x40 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009df4 tcp_sent + .text.tcp_err 0x0000000008009e34 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009e34 tcp_err + .text.tcp_poll + 0x0000000008009e78 0x48 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009e78 tcp_poll + .text.tcp_pcb_purge + 0x0000000008009ec0 0x82 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009ec0 tcp_pcb_purge + *fill* 0x0000000008009f42 0x2 + .text.tcp_pcb_remove + 0x0000000008009f44 0xf8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008009f44 tcp_pcb_remove + .text.tcp_next_iss + 0x000000000800a03c 0x2c ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x000000000800a03c tcp_next_iss + .text.tcp_eff_send_mss_impl + 0x000000000800a068 0x48 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x000000000800a068 tcp_eff_send_mss_impl + .text.tcp_netif_ip_addr_changed_pcblist + 0x000000000800a0b0 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .text.tcp_netif_ip_addr_changed + 0x000000000800a0f4 0x80 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x000000000800a0f4 tcp_netif_ip_addr_changed + .text.tcp_input + 0x000000000800a174 0x790 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + 0x000000000800a174 tcp_input + .text.tcp_input_delayed_close + 0x000000000800a904 0x64 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_listen_input + 0x000000000800a968 0x1c0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_timewait_input + 0x000000000800ab28 0xd0 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_process + 0x000000000800abf8 0x768 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_oos_insert_segment + 0x000000000800b360 0xec ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_receive + 0x000000000800b44c 0xff4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_getoptbyte + 0x000000000800c440 0x74 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_parseopt + 0x000000000800c4b4 0xcc ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .text.tcp_trigger_input_pcb_close + 0x000000000800c580 0x20 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + 0x000000000800c580 tcp_trigger_input_pcb_close + .text.tcp_output_alloc_header + 0x000000000800c5a0 0xf4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .text.tcp_send_fin + 0x000000000800c694 0x7e ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800c694 tcp_send_fin + *fill* 0x000000000800c712 0x2 + .text.tcp_create_segment + 0x000000000800c714 0x110 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .text.tcp_pbuf_prealloc + 0x000000000800c824 0xc4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .text.tcp_write_checks + 0x000000000800c8e8 0xec ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .text.tcp_write + 0x000000000800c9d4 0x6b4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800c9d4 tcp_write + .text.tcp_enqueue_flags + 0x000000000800d088 0x1f8 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800d088 tcp_enqueue_flags + .text.tcp_send_empty_ack + 0x000000000800d280 0xb8 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800d280 tcp_send_empty_ack + .text.tcp_output + 0x000000000800d338 0x3cc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800d338 tcp_output + .text.tcp_output_segment + 0x000000000800d704 0x13c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .text.tcp_rst 0x000000000800d840 0xec ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800d840 tcp_rst + .text.tcp_rexmit_rto + 0x000000000800d92c 0x6c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800d92c tcp_rexmit_rto + .text.tcp_rexmit + 0x000000000800d998 0xa0 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800d998 tcp_rexmit + .text.tcp_rexmit_fast + 0x000000000800da38 0x9c ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800da38 tcp_rexmit_fast + .text.tcp_keepalive + 0x000000000800dad4 0x7a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800dad4 tcp_keepalive + .text.tcp_zero_window_probe + 0x000000000800db4e 0x138 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0x000000000800db4e tcp_zero_window_probe + *fill* 0x000000000800dc86 0x2 + .text.tcpip_tcp_timer + 0x000000000800dc88 0x48 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .text.tcp_timer_needed + 0x000000000800dcd0 0x40 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + 0x000000000800dcd0 tcp_timer_needed + .text.cyclic_timer + 0x000000000800dd10 0x2c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .text.sys_timeouts_init + 0x000000000800dd3c 0x50 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + 0x000000000800dd3c sys_timeouts_init + .text.sys_timeout + 0x000000000800dd8c 0x148 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + 0x000000000800dd8c sys_timeout + .text.sys_untimeout + 0x000000000800ded4 0x8c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + 0x000000000800ded4 sys_untimeout + .text.sys_check_timeouts + 0x000000000800df60 0xa4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + 0x000000000800df60 sys_check_timeouts + .text.udp_init + 0x000000000800e004 0xc ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e004 udp_init + .text.udp_new_port + 0x000000000800e010 0x70 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .text.udp_input_local_match + 0x000000000800e080 0x74 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .text.udp_input + 0x000000000800e0f4 0x1cc ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e0f4 udp_input + .text.udp_sendto_if + 0x000000000800e2c0 0x7a ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e2c0 udp_sendto_if + *fill* 0x000000000800e33a 0x2 + .text.udp_sendto_if_src + 0x000000000800e33c 0x134 ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e33c udp_sendto_if_src + .text.udp_bind + 0x000000000800e470 0xe0 ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e470 udp_bind + .text.udp_connect + 0x000000000800e550 0xac ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e550 udp_connect + .text.udp_recv + 0x000000000800e5fc 0x22 ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e5fc udp_recv + *fill* 0x000000000800e61e 0x2 + .text.udp_remove + 0x000000000800e620 0x64 ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e620 udp_remove + .text.udp_new 0x000000000800e684 0x2e ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e684 udp_new + *fill* 0x000000000800e6b2 0x2 + .text.udp_netif_ip_addr_changed + 0x000000000800e6b4 0x5c ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x000000000800e6b4 udp_netif_ip_addr_changed + .text.dhcp_inc_pcb_refcount + 0x000000000800e710 0xa4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_dec_pcb_refcount + 0x000000000800e7b4 0x54 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_handle_nak + 0x000000000800e808 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_check + 0x000000000800e83c 0x68 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_handle_offer + 0x000000000800e8a4 0x48 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_select + 0x000000000800e8ec 0x14c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_coarse_tmr + 0x000000000800ea38 0xa8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x000000000800ea38 dhcp_coarse_tmr + .text.dhcp_fine_tmr + 0x000000000800eae0 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x000000000800eae0 dhcp_fine_tmr + .text.dhcp_timeout + 0x000000000800eb44 0x92 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_t1_timeout + 0x000000000800ebd6 0x5c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_t2_timeout + 0x000000000800ec32 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + *fill* 0x000000000800ec96 0x2 + .text.dhcp_handle_ack + 0x000000000800ec98 0xc0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_start + 0x000000000800ed58 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x000000000800ed58 dhcp_start + .text.dhcp_arp_reply + 0x000000000800ee70 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x000000000800ee70 dhcp_arp_reply + .text.dhcp_decline + 0x000000000800eec8 0xd4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_discover + 0x000000000800ef9c 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_bind + 0x000000000800f0b4 0x1b4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_renew + 0x000000000800f268 0x10c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x000000000800f268 dhcp_renew + .text.dhcp_rebind + 0x000000000800f374 0x10c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_reboot + 0x000000000800f480 0x128 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_release + 0x000000000800f5a8 0x110 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x000000000800f5a8 dhcp_release + .text.dhcp_stop + 0x000000000800f6b8 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x000000000800f6b8 dhcp_stop + .text.dhcp_set_state + 0x000000000800f728 0x32 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + *fill* 0x000000000800f75a 0x2 + .text.dhcp_option + 0x000000000800f75c 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_option_byte + 0x000000000800f7d0 0x50 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_option_short + 0x000000000800f820 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_option_long + 0x000000000800f894 0xac ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_parse_reply + 0x000000000800f940 0x52c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_recv + 0x000000000800fe6c 0x1cc ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_create_msg + 0x0000000008010038 0x2c4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_delete_msg + 0x00000000080102fc 0x84 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_option_trailer + 0x0000000008010380 0xb4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .text.dhcp_supplied_address + 0x0000000008010434 0x4a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x0000000008010434 dhcp_supplied_address + *fill* 0x000000000801047e 0x2 + .text.etharp_free_entry + 0x0000000008010480 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_tmr + 0x00000000080104e4 0x150 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + 0x00000000080104e4 etharp_tmr + .text.etharp_find_entry + 0x0000000008010634 0x294 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_update_arp_entry + 0x00000000080108c8 0x14c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_cleanup_netif + 0x0000000008010a14 0x64 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + 0x0000000008010a14 etharp_cleanup_netif + .text.etharp_input + 0x0000000008010a78 0x11c ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + 0x0000000008010a78 etharp_input + .text.etharp_output_to_arp_index + 0x0000000008010b94 0x134 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_output + 0x0000000008010cc8 0x1dc ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + 0x0000000008010cc8 etharp_output + .text.etharp_query + 0x0000000008010ea4 0x290 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + 0x0000000008010ea4 etharp_query + .text.etharp_raw + 0x0000000008011134 0x118 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_request_dst + 0x000000000801124c 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .text.etharp_request + 0x0000000008011290 0x24 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + 0x0000000008011290 etharp_request + .text.icmp_input + 0x00000000080112b4 0x20c ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + 0x00000000080112b4 icmp_input + .text.icmp_dest_unreach + 0x00000000080114c0 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + 0x00000000080114c0 icmp_dest_unreach + .text.icmp_time_exceeded + 0x00000000080114e0 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + 0x00000000080114e0 icmp_time_exceeded + .text.icmp_send_response + 0x0000000008011500 0xd0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .text.ip4_route + 0x00000000080115d0 0xd4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + 0x00000000080115d0 ip4_route + .text.ip4_input + 0x00000000080116a4 0x2bc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + 0x00000000080116a4 ip4_input + .text.ip4_output_if + 0x0000000008011960 0x54 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + 0x0000000008011960 ip4_output_if + .text.ip4_output_if_src + 0x00000000080119b4 0x150 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + 0x00000000080119b4 ip4_output_if_src + .text.ip4_addr_isbroadcast_u32 + 0x0000000008011b04 0x80 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + 0x0000000008011b04 ip4_addr_isbroadcast_u32 + .text.ipaddr_addr + 0x0000000008011b84 0x2a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + 0x0000000008011b84 ipaddr_addr + *fill* 0x0000000008011bae 0x2 + .text.ip4addr_aton + 0x0000000008011bb0 0x280 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + 0x0000000008011bb0 ip4addr_aton + .text.ip_reass_tmr + 0x0000000008011e30 0x58 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + 0x0000000008011e30 ip_reass_tmr + .text.ip_reass_free_complete_datagram + 0x0000000008011e88 0x148 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ip_reass_remove_oldest_datagram + 0x0000000008011fd0 0xc4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ip_reass_enqueue_new_datagram + 0x0000000008012094 0x74 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ip_reass_dequeue_datagram + 0x0000000008012108 0x5c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ip_reass_chain_frag_into_datagram_and_validate + 0x0000000008012164 0x2d4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ip4_reass + 0x0000000008012438 0x2a4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + 0x0000000008012438 ip4_reass + .text.ip_frag_alloc_pbuf_custom_ref + 0x00000000080126dc 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ip_frag_free_pbuf_custom_ref + 0x00000000080126ec 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ipfrag_free_pbuf_custom + 0x0000000008012724 0x68 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .text.ip4_frag + 0x000000000801278c 0x23c ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + 0x000000000801278c ip4_frag + .text.ethernet_input + 0x00000000080129c8 0x12c ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + 0x00000000080129c8 ethernet_input + .text.ethernet_output + 0x0000000008012af4 0x90 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + 0x0000000008012af4 ethernet_output + .text.rand 0x0000000008012b84 0x7c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + 0x0000000008012b84 rand + .text.std 0x0000000008012c00 0x6c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.stdio_exit_handler + 0x0000000008012c6c 0x18 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.cleanup_stdio + 0x0000000008012c84 0x40 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.global_stdio_init.part.0 + 0x0000000008012cc4 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .text.__sfp_lock_acquire + 0x0000000008012d00 0xc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + 0x0000000008012d00 __sfp_lock_acquire + .text.__sfp_lock_release + 0x0000000008012d0c 0xc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + 0x0000000008012d0c __sfp_lock_release + .text.__sinit 0x0000000008012d18 0x30 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + 0x0000000008012d18 __sinit + .text._fwalk_sglue + 0x0000000008012d48 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) + 0x0000000008012d48 _fwalk_sglue + .text.printf 0x0000000008012d84 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + 0x0000000008012d84 iprintf + 0x0000000008012d84 printf + .text._puts_r 0x0000000008012da8 0xa8 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + 0x0000000008012da8 _puts_r + .text.puts 0x0000000008012e50 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + 0x0000000008012e50 puts + .text.__sread 0x0000000008012e60 0x22 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + 0x0000000008012e60 __sread + .text.__swrite + 0x0000000008012e82 0x38 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + 0x0000000008012e82 __swrite + .text.__sseek 0x0000000008012eba 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + 0x0000000008012eba __sseek + .text.__sclose + 0x0000000008012ede 0x8 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + 0x0000000008012ede __sclose + .text.__swbuf_r + 0x0000000008012ee6 0x7a C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + 0x0000000008012ee6 __swbuf_r + .text.__swsetup_r + 0x0000000008012f60 0xb0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) + 0x0000000008012f60 __swsetup_r + .text.memcmp 0x0000000008013010 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) + 0x0000000008013010 memcmp + .text.memset 0x0000000008013030 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) + 0x0000000008013030 memset + .text._close_r + 0x0000000008013040 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) + 0x0000000008013040 _close_r + .text._lseek_r + 0x0000000008013060 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) + 0x0000000008013060 _lseek_r + .text._read_r 0x0000000008013084 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) + 0x0000000008013084 _read_r + .text._write_r + 0x00000000080130a8 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) + 0x00000000080130a8 _write_r + .text.__libc_init_array + 0x00000000080130cc 0x48 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) + 0x00000000080130cc __libc_init_array + .text.__retarget_lock_init_recursive + 0x0000000008013114 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + 0x0000000008013114 __retarget_lock_init_recursive + .text.__retarget_lock_acquire_recursive + 0x0000000008013116 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + 0x0000000008013116 __retarget_lock_acquire_recursive + .text.__retarget_lock_release_recursive + 0x0000000008013118 0x2 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + 0x0000000008013118 __retarget_lock_release_recursive + .text.memcpy 0x000000000801311a 0x1c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) + 0x000000000801311a memcpy + *fill* 0x0000000008013136 0x2 + .text.__assert_func + 0x0000000008013138 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + 0x0000000008013138 __assert_func + .text._free_r 0x0000000008013174 0x90 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) + 0x0000000008013174 _free_r + .text.malloc 0x0000000008013204 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + 0x0000000008013204 malloc + .text.sbrk_aligned + 0x0000000008013214 0x40 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + .text._malloc_r + 0x0000000008013254 0x100 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + 0x0000000008013254 _malloc_r + .text.__malloc_lock + 0x0000000008013354 0xc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + 0x0000000008013354 __malloc_lock + .text.__malloc_unlock + 0x0000000008013360 0xc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + 0x0000000008013360 __malloc_unlock + .text.__sfputc_r + 0x000000000801336c 0x2a C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .text.__sfputs_r + 0x0000000008013396 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + 0x0000000008013396 __sfputs_r + *fill* 0x00000000080133ba 0x2 + .text._vfprintf_r + 0x00000000080133bc 0x234 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + 0x00000000080133bc _vfprintf_r + 0x00000000080133bc _vfiprintf_r + .text._printf_common + 0x00000000080135f0 0xe4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + 0x00000000080135f0 _printf_common + .text._printf_i + 0x00000000080136d4 0x244 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + 0x00000000080136d4 _printf_i + .text.__sflush_r + 0x0000000008013918 0x104 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + 0x0000000008013918 __sflush_r + .text._fflush_r + 0x0000000008013a1c 0x50 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + 0x0000000008013a1c _fflush_r + .text.fprintf 0x0000000008013a6c 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + 0x0000000008013a6c fiprintf + 0x0000000008013a6c fprintf + .text.__swhatbuf_r + 0x0000000008013a90 0x4a C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + 0x0000000008013a90 __swhatbuf_r + .text.__smakebuf_r + 0x0000000008013ada 0x78 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + 0x0000000008013ada __smakebuf_r + *fill* 0x0000000008013b52 0x2 + .text._fstat_r + 0x0000000008013b54 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) + 0x0000000008013b54 _fstat_r + .text._isatty_r + 0x0000000008013b78 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) + 0x0000000008013b78 _isatty_r + .text._sbrk_r 0x0000000008013b98 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) + 0x0000000008013b98 _sbrk_r + .text.memchr 0x0000000008013bb8 0x1c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) + 0x0000000008013bb8 memchr + .text.abort 0x0000000008013bd4 0xe C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) + 0x0000000008013bd4 abort + .text._raise_r + 0x0000000008013be2 0x50 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + 0x0000000008013be2 _raise_r + *fill* 0x0000000008013c32 0x2 + .text.raise 0x0000000008013c34 0x10 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + 0x0000000008013c34 raise + .text._kill_r 0x0000000008013c44 0x24 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + 0x0000000008013c44 _kill_r + .text._getpid_r + 0x0000000008013c68 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + 0x0000000008013c68 _getpid_r + *(.glue_7) + .glue_7 0x0000000008013c6c 0x0 linker stubs + *(.glue_7t) + .glue_7t 0x0000000008013c6c 0x0 linker stubs + *(.eh_frame) + .eh_frame 0x0000000008013c6c 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + *(.init) + .init 0x0000000008013c6c 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o + 0x0000000008013c6c _init + .init 0x0000000008013c70 0x8 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o + *(.fini) + .fini 0x0000000008013c78 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o + 0x0000000008013c78 _fini + .fini 0x0000000008013c7c 0x8 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o + 0x0000000008013c84 . = ALIGN (0x4) + 0x0000000008013c84 _etext = . + +.vfp11_veneer 0x0000000008013c84 0x0 + .vfp11_veneer 0x0000000008013c84 0x0 linker stubs + +.v4_bx 0x0000000008013c84 0x0 + .v4_bx 0x0000000008013c84 0x0 linker stubs + +.iplt 0x0000000008013c84 0x0 + .iplt 0x0000000008013c84 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + +.rodata 0x0000000008013c84 0x2bd8 + 0x0000000008013c84 . = ALIGN (0x4) + *(.rodata) + .rodata 0x0000000008013c84 0x1c8 ./Core/Src/main.o + .rodata 0x0000000008013e4c 0x54 ./LWIP/Target/ethernetif.o + .rodata 0x0000000008013ea0 0x5f9 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + *fill* 0x0000000008014499 0x3 + .rodata 0x000000000801449c 0x1fb ./Middlewares/Third_Party/LwIP/src/core/mem.o + *fill* 0x0000000008014697 0x1 + .rodata 0x0000000008014698 0xeb ./Middlewares/Third_Party/LwIP/src/core/memp.o + *fill* 0x0000000008014783 0x1 + .rodata 0x0000000008014784 0x74 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .rodata 0x00000000080147f8 0x509 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + *fill* 0x0000000008014d01 0x3 + .rodata 0x0000000008014d04 0x47b ./Middlewares/Third_Party/LwIP/src/core/tcp.o + *fill* 0x000000000801517f 0x1 + .rodata 0x0000000008015180 0x385 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + *fill* 0x0000000008015505 0x3 + .rodata 0x0000000008015508 0x443 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + *fill* 0x000000000801594b 0x1 + .rodata 0x000000000801594c 0x9c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .rodata 0x00000000080159e8 0x9a ./Middlewares/Third_Party/LwIP/src/core/udp.o + *fill* 0x0000000008015a82 0x2 + .rodata 0x0000000008015a84 0x4ff ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + *fill* 0x0000000008015f83 0x1 + .rodata 0x0000000008015f84 0x265 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + *fill* 0x00000000080161e9 0x3 + .rodata 0x00000000080161ec 0xf8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .rodata 0x00000000080162e4 0x95 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + *fill* 0x0000000008016379 0x3 + .rodata 0x000000000801637c 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .rodata 0x00000000080163ec 0x1f0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .rodata 0x00000000080165dc 0x94 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + *(.rodata*) + .rodata.AHBPrescTable + 0x0000000008016670 0x10 ./Core/Src/system_stm32f2xx.o + 0x0000000008016670 AHBPrescTable + .rodata.APBPrescTable + 0x0000000008016680 0x8 ./Core/Src/system_stm32f2xx.o + 0x0000000008016680 APBPrescTable + .rodata.memp_UDP_PCB + 0x0000000008016688 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x0000000008016688 memp_UDP_PCB + .rodata.memp_TCP_PCB + 0x0000000008016694 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x0000000008016694 memp_TCP_PCB + .rodata.memp_TCP_PCB_LISTEN + 0x00000000080166a0 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166a0 memp_TCP_PCB_LISTEN + .rodata.memp_TCP_SEG + 0x00000000080166ac 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166ac memp_TCP_SEG + .rodata.memp_REASSDATA + 0x00000000080166b8 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166b8 memp_REASSDATA + .rodata.memp_FRAG_PBUF + 0x00000000080166c4 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166c4 memp_FRAG_PBUF + .rodata.memp_SYS_TIMEOUT + 0x00000000080166d0 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166d0 memp_SYS_TIMEOUT + .rodata.memp_PBUF + 0x00000000080166dc 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166dc memp_PBUF + .rodata.memp_PBUF_POOL + 0x00000000080166e8 0xc ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166e8 memp_PBUF_POOL + .rodata.memp_pools + 0x00000000080166f4 0x24 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000080166f4 memp_pools + .rodata.tcp_backoff + 0x0000000008016718 0xd ./Middlewares/Third_Party/LwIP/src/core/tcp.o + *fill* 0x0000000008016725 0x3 + .rodata.tcp_persist_backoff + 0x0000000008016728 0x7 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + *fill* 0x000000000801672f 0x1 + .rodata.tcp_pcb_lists + 0x0000000008016730 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000008016730 tcp_pcb_lists + .rodata.lwip_cyclic_timers + 0x0000000008016740 0x28 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + 0x0000000008016740 lwip_cyclic_timers + .rodata.ip_addr_any + 0x0000000008016768 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + 0x0000000008016768 ip_addr_any + .rodata.ip_addr_broadcast + 0x000000000801676c 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + 0x000000000801676c ip_addr_broadcast + .rodata.ethbroadcast + 0x0000000008016770 0x6 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + 0x0000000008016770 ethbroadcast + *fill* 0x0000000008016776 0x2 + .rodata.ethzero + 0x0000000008016778 0x6 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + 0x0000000008016778 ethzero + .rodata.srand.str1.1 + 0x000000000801677e 0x6f C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + .rodata.__assert_func.str1.1 + 0x00000000080167ed 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + 0x3d (size before relaxing) + .rodata._vfprintf_r.str1.1 + 0x0000000008016829 0x11 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .rodata._printf_i.str1.1 + 0x000000000801683a 0x22 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + 0x000000000801685c . = ALIGN (0x4) + +.ARM.extab 0x000000000801685c 0x0 + 0x000000000801685c . = ALIGN (0x4) + *(.ARM.extab* .gnu.linkonce.armextab.*) + 0x000000000801685c . = ALIGN (0x4) + +.ARM 0x000000000801685c 0x8 + 0x000000000801685c . = ALIGN (0x4) + 0x000000000801685c __exidx_start = . + *(.ARM.exidx*) + .ARM.exidx 0x000000000801685c 0x8 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + 0x0000000008016864 __exidx_end = . + 0x0000000008016864 . = ALIGN (0x4) + +.rel.dyn 0x0000000008016864 0x0 + .rel.iplt 0x0000000008016864 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + +.preinit_array 0x0000000008016864 0x0 + 0x0000000008016864 . = ALIGN (0x4) + 0x0000000008016864 PROVIDE (__preinit_array_start = .) + *(.preinit_array*) + 0x0000000008016864 PROVIDE (__preinit_array_end = .) + 0x0000000008016864 . = ALIGN (0x4) + +.init_array 0x0000000008016864 0x4 + 0x0000000008016864 . = ALIGN (0x4) + 0x0000000008016864 PROVIDE (__init_array_start = .) + *(SORT_BY_NAME(.init_array.*)) + *(.init_array*) + .init_array 0x0000000008016864 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + 0x0000000008016868 PROVIDE (__init_array_end = .) + 0x0000000008016868 . = ALIGN (0x4) + +.fini_array 0x0000000008016868 0x4 + 0x0000000008016868 . = ALIGN (0x4) + [!provide] PROVIDE (__fini_array_start = .) + *(SORT_BY_NAME(.fini_array.*)) + *(.fini_array*) + .fini_array 0x0000000008016868 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + [!provide] PROVIDE (__fini_array_end = .) + 0x000000000801686c . = ALIGN (0x4) + 0x000000000801686c _sidata = LOADADDR (.data) + +.data 0x0000000020000000 0x74 load address 0x000000000801686c + 0x0000000020000000 . = ALIGN (0x4) + 0x0000000020000000 _sdata = . + *(.data) + *(.data*) + .data.SystemCoreClock + 0x0000000020000000 0x4 ./Core/Src/system_stm32f2xx.o + 0x0000000020000000 SystemCoreClock + .data.uwTickPrio + 0x0000000020000004 0x4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x0000000020000004 uwTickPrio + .data.uwTickFreq + 0x0000000020000008 0x1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x0000000020000008 uwTickFreq + *fill* 0x0000000020000009 0x1 + .data.tcp_port + 0x000000002000000a 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .data.iss.0 0x000000002000000c 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .data.udp_port + 0x0000000020000010 0x2 ./Middlewares/Third_Party/LwIP/src/core/udp.o + *fill* 0x0000000020000012 0x2 + .data.dhcp_discover_request_options + 0x0000000020000014 0x3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + *fill* 0x0000000020000017 0x1 + .data.__sglue 0x0000000020000018 0xc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + 0x0000000020000018 __sglue + .data._impure_data + 0x0000000020000024 0x4c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) + 0x0000000020000024 _impure_data + .data._impure_ptr + 0x0000000020000070 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) + 0x0000000020000070 _impure_ptr + *(.RamFunc) + *(.RamFunc*) + 0x0000000020000074 . = ALIGN (0x4) + 0x0000000020000074 _edata = . + +.igot.plt 0x0000000020000074 0x0 load address 0x00000000080168e0 + .igot.plt 0x0000000020000074 0x0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + 0x0000000020000074 . = ALIGN (0x4) + +.bss 0x0000000020000074 0x71d0 load address 0x00000000080168e0 + 0x0000000020000074 _sbss = . + 0x0000000020000074 __bss_start__ = _sbss + *(.bss) + .bss 0x0000000020000074 0x1c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + *(.bss*) + .bss.htim1 0x0000000020000090 0x48 ./Core/Src/main.o + 0x0000000020000090 htim1 + .bss.htim3 0x00000000200000d8 0x48 ./Core/Src/main.o + 0x00000000200000d8 htim3 + .bss.htim7 0x0000000020000120 0x48 ./Core/Src/main.o + 0x0000000020000120 htim7 + .bss.huart3 0x0000000020000168 0x48 ./Core/Src/main.o + 0x0000000020000168 huart3 + .bss.hpcd_USB_OTG_FS + 0x00000000200001b0 0x504 ./Core/Src/main.o + 0x00000000200001b0 hpcd_USB_OTG_FS + .bss.mqtt_static_client + 0x00000000200006b4 0x1f0 ./Core/Src/main.o + .bss.inpub_id 0x00000000200008a4 0x4 ./Core/Src/main.o + .bss.connected_U8 + 0x00000000200008a8 0x1 ./Core/Src/main.o + .bss.MqttState_T + 0x00000000200008a9 0x1 ./Core/Src/main.o + *fill* 0x00000000200008aa 0x2 + .bss.cnt_u32 0x00000000200008ac 0x4 ./Core/Src/main.o + .bss.lock_u8 0x00000000200008b0 0x1 ./Core/Src/main.o + *fill* 0x00000000200008b1 0x3 + .bss.__sbrk_heap_end + 0x00000000200008b4 0x4 ./Core/Src/sysmem.o + .bss.uwTick 0x00000000200008b8 0x4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0x00000000200008b8 uwTick + .bss.LwipConnectionStatus_T + 0x00000000200008bc 0x1 ./LWIP/App/lwip.o + 0x00000000200008bc LwipConnectionStatus_T + *fill* 0x00000000200008bd 0x3 + .bss.gnetif 0x00000000200008c0 0x38 ./LWIP/App/lwip.o + 0x00000000200008c0 gnetif + .bss.ipaddr 0x00000000200008f8 0x4 ./LWIP/App/lwip.o + 0x00000000200008f8 ipaddr + .bss.netmask 0x00000000200008fc 0x4 ./LWIP/App/lwip.o + 0x00000000200008fc netmask + .bss.gw 0x0000000020000900 0x4 ./LWIP/App/lwip.o + 0x0000000020000900 gw + .bss.DMARxDscrTab + 0x0000000020000904 0x80 ./LWIP/Target/ethernetif.o + 0x0000000020000904 DMARxDscrTab + .bss.DMATxDscrTab + 0x0000000020000984 0x80 ./LWIP/Target/ethernetif.o + 0x0000000020000984 DMATxDscrTab + .bss.Rx_Buff 0x0000000020000a04 0x17d0 ./LWIP/Target/ethernetif.o + 0x0000000020000a04 Rx_Buff + .bss.Tx_Buff 0x00000000200021d4 0x17d0 ./LWIP/Target/ethernetif.o + 0x00000000200021d4 Tx_Buff + .bss.heth 0x00000000200039a4 0x48 ./LWIP/Target/ethernetif.o + 0x00000000200039a4 heth + .bss.ip_data 0x00000000200039ec 0x18 ./Middlewares/Third_Party/LwIP/src/core/ip.o + 0x00000000200039ec ip_data + .bss.ram_heap 0x0000000020003a04 0x653 ./Middlewares/Third_Party/LwIP/src/core/mem.o + 0x0000000020003a04 ram_heap + *fill* 0x0000000020004057 0x1 + .bss.ram 0x0000000020004058 0x4 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .bss.ram_end 0x000000002000405c 0x4 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .bss.lfree 0x0000000020004060 0x4 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .bss.memp_memory_UDP_PCB_base + 0x0000000020004064 0x83 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x0000000020004064 memp_memory_UDP_PCB_base + *fill* 0x00000000200040e7 0x1 + .bss.memp_tab_UDP_PCB + 0x00000000200040e8 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_TCP_PCB_base + 0x00000000200040ec 0x2fb ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000200040ec memp_memory_TCP_PCB_base + *fill* 0x00000000200043e7 0x1 + .bss.memp_tab_TCP_PCB + 0x00000000200043e8 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_TCP_PCB_LISTEN_base + 0x00000000200043ec 0xe3 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000200043ec memp_memory_TCP_PCB_LISTEN_base + *fill* 0x00000000200044cf 0x1 + .bss.memp_tab_TCP_PCB_LISTEN + 0x00000000200044d0 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_TCP_SEG_base + 0x00000000200044d4 0x103 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000200044d4 memp_memory_TCP_SEG_base + *fill* 0x00000000200045d7 0x1 + .bss.memp_tab_TCP_SEG + 0x00000000200045d8 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_REASSDATA_base + 0x00000000200045dc 0xa3 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000200045dc memp_memory_REASSDATA_base + *fill* 0x000000002000467f 0x1 + .bss.memp_tab_REASSDATA + 0x0000000020004680 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_FRAG_PBUF_base + 0x0000000020004684 0x16b ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x0000000020004684 memp_memory_FRAG_PBUF_base + *fill* 0x00000000200047ef 0x1 + .bss.memp_tab_FRAG_PBUF + 0x00000000200047f0 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_SYS_TIMEOUT_base + 0x00000000200047f4 0x53 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x00000000200047f4 memp_memory_SYS_TIMEOUT_base + *fill* 0x0000000020004847 0x1 + .bss.memp_tab_SYS_TIMEOUT + 0x0000000020004848 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_PBUF_base + 0x000000002000484c 0x103 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x000000002000484c memp_memory_PBUF_base + *fill* 0x000000002000494f 0x1 + .bss.memp_tab_PBUF + 0x0000000020004950 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.memp_memory_PBUF_POOL_base + 0x0000000020004954 0x2603 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0x0000000020004954 memp_memory_PBUF_POOL_base + *fill* 0x0000000020006f57 0x1 + .bss.memp_tab_PBUF_POOL + 0x0000000020006f58 0x4 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .bss.netif_list + 0x0000000020006f5c 0x4 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000020006f5c netif_list + .bss.netif_default + 0x0000000020006f60 0x4 ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0x0000000020006f60 netif_default + .bss.netif_num + 0x0000000020006f64 0x1 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .bss.pbuf_free_ooseq_pending + 0x0000000020006f65 0x1 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0x0000000020006f65 pbuf_free_ooseq_pending + *fill* 0x0000000020006f66 0x2 + .bss.tcp_ticks + 0x0000000020006f68 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000020006f68 tcp_ticks + .bss.tcp_bound_pcbs + 0x0000000020006f6c 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000020006f6c tcp_bound_pcbs + .bss.tcp_listen_pcbs + 0x0000000020006f70 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000020006f70 tcp_listen_pcbs + .bss.tcp_active_pcbs + 0x0000000020006f74 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000020006f74 tcp_active_pcbs + .bss.tcp_tw_pcbs + 0x0000000020006f78 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000020006f78 tcp_tw_pcbs + .bss.tcp_active_pcbs_changed + 0x0000000020006f7c 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0x0000000020006f7c tcp_active_pcbs_changed + .bss.tcp_timer + 0x0000000020006f7d 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .bss.tcp_timer_ctr + 0x0000000020006f7e 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + *fill* 0x0000000020006f7f 0x1 + .bss.inseg 0x0000000020006f80 0x10 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.tcphdr 0x0000000020006f90 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.tcphdr_optlen + 0x0000000020006f94 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.tcphdr_opt1len + 0x0000000020006f96 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.tcphdr_opt2 + 0x0000000020006f98 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.tcp_optidx + 0x0000000020006f9c 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + *fill* 0x0000000020006f9e 0x2 + .bss.seqno 0x0000000020006fa0 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.ackno 0x0000000020006fa4 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.recv_acked + 0x0000000020006fa8 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.tcplen 0x0000000020006faa 0x2 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.flags 0x0000000020006fac 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.recv_flags + 0x0000000020006fad 0x1 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + *fill* 0x0000000020006fae 0x2 + .bss.recv_data + 0x0000000020006fb0 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .bss.tcp_input_pcb + 0x0000000020006fb4 0x4 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + 0x0000000020006fb4 tcp_input_pcb + .bss.next_timeout + 0x0000000020006fb8 0x4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .bss.timeouts_last_time + 0x0000000020006fbc 0x4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .bss.tcpip_tcp_timer_active + 0x0000000020006fc0 0x4 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .bss.udp_pcbs 0x0000000020006fc4 0x4 ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0x0000000020006fc4 udp_pcbs + .bss.dhcp_rx_options_val + 0x0000000020006fc8 0x20 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x0000000020006fc8 dhcp_rx_options_val + .bss.dhcp_rx_options_given + 0x0000000020006fe8 0x8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0x0000000020006fe8 dhcp_rx_options_given + .bss.dhcp_pcb 0x0000000020006ff0 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .bss.dhcp_pcb_refcount + 0x0000000020006ff4 0x1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + *fill* 0x0000000020006ff5 0x3 + .bss.xid.0 0x0000000020006ff8 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .bss.arp_table + 0x0000000020006ffc 0xf0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .bss.etharp_cached_entry + 0x00000000200070ec 0x1 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + *fill* 0x00000000200070ed 0x1 + .bss.ip_id 0x00000000200070ee 0x2 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .bss.reassdatagrams + 0x00000000200070f0 0x4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .bss.ip_reass_pbufcount + 0x00000000200070f4 0x2 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + *fill* 0x00000000200070f6 0x2 + .bss.__sf 0x00000000200070f8 0x138 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + 0x00000000200070f8 __sf + .bss.__stdio_exit_handler + 0x0000000020007230 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + 0x0000000020007230 __stdio_exit_handler + .bss.errno 0x0000000020007234 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + 0x0000000020007234 errno + .bss.__lock___malloc_recursive_mutex + 0x0000000020007238 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + 0x0000000020007238 __lock___malloc_recursive_mutex + .bss.__lock___sfp_recursive_mutex + 0x0000000020007239 0x1 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + 0x0000000020007239 __lock___sfp_recursive_mutex + *fill* 0x000000002000723a 0x2 + .bss.__malloc_free_list + 0x000000002000723c 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + 0x000000002000723c __malloc_free_list + .bss.__malloc_sbrk_start + 0x0000000020007240 0x4 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + 0x0000000020007240 __malloc_sbrk_start + *(COMMON) + 0x0000000020007244 . = ALIGN (0x4) + 0x0000000020007244 _ebss = . + 0x0000000020007244 __bss_end__ = _ebss + +._user_heap_stack + 0x0000000020007244 0x604 load address 0x00000000080168e0 + 0x0000000020007248 . = ALIGN (0x8) + *fill* 0x0000000020007244 0x4 + [!provide] PROVIDE (end = .) + 0x0000000020007248 PROVIDE (_end = .) + 0x0000000020007448 . = (. + _Min_Heap_Size) + *fill* 0x0000000020007248 0x200 + 0x0000000020007848 . = (. + _Min_Stack_Size) + *fill* 0x0000000020007448 0x400 + 0x0000000020007848 . = ALIGN (0x8) + +/DISCARD/ + libc.a(*) + libm.a(*) + libgcc.a(*) + +.ARM.attributes + 0x0000000000000000 0x29 + *(.ARM.attributes) + .ARM.attributes + 0x0000000000000000 0x1d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crti.o + .ARM.attributes + 0x000000000000001d 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + .ARM.attributes + 0x000000000000004a 0x2d ./Core/Src/main.o + .ARM.attributes + 0x0000000000000077 0x2d ./Core/Src/stm32f2xx_hal_msp.o + .ARM.attributes + 0x00000000000000a4 0x2d ./Core/Src/stm32f2xx_it.o + .ARM.attributes + 0x00000000000000d1 0x2d ./Core/Src/syscalls.o + .ARM.attributes + 0x00000000000000fe 0x2d ./Core/Src/sysmem.o + .ARM.attributes + 0x000000000000012b 0x2d ./Core/Src/system_stm32f2xx.o + .ARM.attributes + 0x0000000000000158 0x21 ./Core/Startup/startup_stm32f207zgtx.o + .ARM.attributes + 0x0000000000000179 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .ARM.attributes + 0x00000000000001a6 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .ARM.attributes + 0x00000000000001d3 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .ARM.attributes + 0x0000000000000200 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .ARM.attributes + 0x000000000000022d 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .ARM.attributes + 0x000000000000025a 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .ARM.attributes + 0x0000000000000287 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .ARM.attributes + 0x00000000000002b4 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .ARM.attributes + 0x00000000000002e1 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .ARM.attributes + 0x000000000000030e 0x2d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .ARM.attributes + 0x000000000000033b 0x2d ./LWIP/App/lwip.o + .ARM.attributes + 0x0000000000000368 0x2d ./LWIP/Target/ethernetif.o + .ARM.attributes + 0x0000000000000395 0x2d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .ARM.attributes + 0x00000000000003c2 0x2d ./Middlewares/Third_Party/LwIP/src/core/def.o + .ARM.attributes + 0x00000000000003ef 0x2d ./Middlewares/Third_Party/LwIP/src/core/init.o + .ARM.attributes + 0x000000000000041c 0x2d ./Middlewares/Third_Party/LwIP/src/core/ip.o + .ARM.attributes + 0x0000000000000449 0x2d ./Middlewares/Third_Party/LwIP/src/core/mem.o + .ARM.attributes + 0x0000000000000476 0x2d ./Middlewares/Third_Party/LwIP/src/core/memp.o + .ARM.attributes + 0x00000000000004a3 0x2d ./Middlewares/Third_Party/LwIP/src/core/netif.o + .ARM.attributes + 0x00000000000004d0 0x2d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .ARM.attributes + 0x00000000000004fd 0x2d ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .ARM.attributes + 0x000000000000052a 0x2d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .ARM.attributes + 0x0000000000000557 0x2d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .ARM.attributes + 0x0000000000000584 0x2d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .ARM.attributes + 0x00000000000005b1 0x2d ./Middlewares/Third_Party/LwIP/src/core/udp.o + .ARM.attributes + 0x00000000000005de 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .ARM.attributes + 0x000000000000060b 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .ARM.attributes + 0x0000000000000638 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .ARM.attributes + 0x0000000000000665 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .ARM.attributes + 0x0000000000000692 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .ARM.attributes + 0x00000000000006bf 0x2d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .ARM.attributes + 0x00000000000006ec 0x2d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .ARM.attributes + 0x0000000000000719 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + .ARM.attributes + 0x0000000000000746 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .ARM.attributes + 0x0000000000000773 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) + .ARM.attributes + 0x00000000000007a0 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + .ARM.attributes + 0x00000000000007cd 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + .ARM.attributes + 0x00000000000007fa 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + .ARM.attributes + 0x0000000000000827 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + .ARM.attributes + 0x0000000000000854 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) + .ARM.attributes + 0x0000000000000881 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) + .ARM.attributes + 0x00000000000008ae 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) + .ARM.attributes + 0x00000000000008db 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) + .ARM.attributes + 0x0000000000000908 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + .ARM.attributes + 0x0000000000000935 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-impure.o) + .ARM.attributes + 0x0000000000000962 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) + .ARM.attributes + 0x000000000000098f 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) + .ARM.attributes + 0x00000000000009bc 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) + .ARM.attributes + 0x00000000000009e9 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) + .ARM.attributes + 0x0000000000000a16 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .ARM.attributes + 0x0000000000000a43 0x1b C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) + .ARM.attributes + 0x0000000000000a5e 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) + .ARM.attributes + 0x0000000000000a8b 0x17 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strlen.o) + .ARM.attributes + 0x0000000000000aa2 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + .ARM.attributes + 0x0000000000000acf 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) + .ARM.attributes + 0x0000000000000afc 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + .ARM.attributes + 0x0000000000000b29 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + .ARM.attributes + 0x0000000000000b56 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + .ARM.attributes + 0x0000000000000b83 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .ARM.attributes + 0x0000000000000bb0 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + .ARM.attributes + 0x0000000000000bdd 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + .ARM.attributes + 0x0000000000000c0a 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + .ARM.attributes + 0x0000000000000c37 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + .ARM.attributes + 0x0000000000000c64 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) + .ARM.attributes + 0x0000000000000c91 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) + .ARM.attributes + 0x0000000000000cbe 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) + .ARM.attributes + 0x0000000000000ceb 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) + .ARM.attributes + 0x0000000000000d18 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) + .ARM.attributes + 0x0000000000000d45 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .ARM.attributes + 0x0000000000000d72 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + .ARM.attributes + 0x0000000000000d9f 0x1d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) + .ARM.attributes + 0x0000000000000dbc 0x2d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + .ARM.attributes + 0x0000000000000de9 0x1d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_dvmd_tls.o) + .ARM.attributes + 0x0000000000000e06 0x1d C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtn.o +OUTPUT(LightControlConvi_Nucleo207ZG.elf elf32-littlearm) +LOAD linker stubs +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc.a +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libm.a +LOAD C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a + +.comment 0x0000000000000000 0x43 + .comment 0x0000000000000000 0x43 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp/crtbegin.o + 0x44 (size before relaxing) + .comment 0x0000000000000043 0x44 ./Core/Src/main.o + .comment 0x0000000000000043 0x44 ./Core/Src/stm32f2xx_hal_msp.o + .comment 0x0000000000000043 0x44 ./Core/Src/stm32f2xx_it.o + .comment 0x0000000000000043 0x44 ./Core/Src/syscalls.o + .comment 0x0000000000000043 0x44 ./Core/Src/sysmem.o + .comment 0x0000000000000043 0x44 ./Core/Src/system_stm32f2xx.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .comment 0x0000000000000043 0x44 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .comment 0x0000000000000043 0x44 ./LWIP/App/lwip.o + .comment 0x0000000000000043 0x44 ./LWIP/Target/ethernetif.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/def.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/init.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .comment 0x0000000000000043 0x44 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + +.debug_info 0x0000000000000000 0x23c51 + .debug_info 0x0000000000000000 0x205a ./Core/Src/main.o + .debug_info 0x000000000000205a 0x14ec ./Core/Src/stm32f2xx_hal_msp.o + .debug_info 0x0000000000003546 0x6ee ./Core/Src/stm32f2xx_it.o + .debug_info 0x0000000000003c34 0x698 ./Core/Src/syscalls.o + .debug_info 0x00000000000042cc 0x162 ./Core/Src/sysmem.o + .debug_info 0x000000000000442e 0x31f ./Core/Src/system_stm32f2xx.o + .debug_info 0x000000000000474d 0x23 ./Core/Startup/startup_stm32f207zgtx.o + .debug_info 0x0000000000004770 0x9c3 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_info 0x0000000000005133 0xd46 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_info 0x0000000000005e79 0x1455 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_info 0x00000000000072ce 0x68e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_info 0x000000000000795c 0x14ce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_info 0x0000000000008e2a 0xa39 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_info 0x0000000000009863 0x297d ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_info 0x000000000000c1e0 0x14db ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_info 0x000000000000d6bb 0x2ff2 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_info 0x00000000000106ad 0x197f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_info 0x000000000001202c 0x5b1 ./LWIP/App/lwip.o + .debug_info 0x00000000000125dd 0x16ee ./LWIP/Target/ethernetif.o + .debug_info 0x0000000000013ccb 0x1a39 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_info 0x0000000000015704 0x35f ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_info 0x0000000000015a63 0xde ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_info 0x0000000000015b41 0x505 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_info 0x0000000000016046 0x49a ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_info 0x00000000000164e0 0x615 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_info 0x0000000000016af5 0x91d ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_info 0x0000000000017412 0x1446 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_info 0x0000000000018858 0x1b48 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_info 0x000000000001a3a0 0x13c3 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_info 0x000000000001b763 0x1571 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_info 0x000000000001ccd4 0xbe1 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_info 0x000000000001d8b5 0xe5c ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_info 0x000000000001e711 0x179f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_info 0x000000000001feb0 0xe37 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_info 0x0000000000020ce7 0x928 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_info 0x000000000002160f 0xa4d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_info 0x000000000002205c 0x6c3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_info 0x000000000002271f 0xdd0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_info 0x00000000000234ef 0x762 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + +.debug_abbrev 0x0000000000000000 0x5b39 + .debug_abbrev 0x0000000000000000 0x36d ./Core/Src/main.o + .debug_abbrev 0x000000000000036d 0x262 ./Core/Src/stm32f2xx_hal_msp.o + .debug_abbrev 0x00000000000005cf 0x193 ./Core/Src/stm32f2xx_it.o + .debug_abbrev 0x0000000000000762 0x1b1 ./Core/Src/syscalls.o + .debug_abbrev 0x0000000000000913 0xa4 ./Core/Src/sysmem.o + .debug_abbrev 0x00000000000009b7 0x11c ./Core/Src/system_stm32f2xx.o + .debug_abbrev 0x0000000000000ad3 0x12 ./Core/Startup/startup_stm32f207zgtx.o + .debug_abbrev 0x0000000000000ae5 0x286 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_abbrev 0x0000000000000d6b 0x327 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_abbrev 0x0000000000001092 0x2ab ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_abbrev 0x000000000000133d 0x1cb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_abbrev 0x0000000000001508 0x2c1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_abbrev 0x00000000000017c9 0x2d6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_abbrev 0x0000000000001a9f 0x28f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_abbrev 0x0000000000001d2e 0x283 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_abbrev 0x0000000000001fb1 0x30e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_abbrev 0x00000000000022bf 0x2b3 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_abbrev 0x0000000000002572 0x1e0 ./LWIP/App/lwip.o + .debug_abbrev 0x0000000000002752 0x3b3 ./LWIP/Target/ethernetif.o + .debug_abbrev 0x0000000000002b05 0x32f ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_abbrev 0x0000000000002e34 0x12e ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_abbrev 0x0000000000002f62 0x8b ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_abbrev 0x0000000000002fed 0x127 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_abbrev 0x0000000000003114 0x1a1 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_abbrev 0x00000000000032b5 0x233 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_abbrev 0x00000000000034e8 0x2ac ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_abbrev 0x0000000000003794 0x2e0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_abbrev 0x0000000000003a74 0x3ce ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_abbrev 0x0000000000003e42 0x317 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_abbrev 0x0000000000004159 0x2fc ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_abbrev 0x0000000000004455 0x2ed ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_abbrev 0x0000000000004742 0x2da ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_abbrev 0x0000000000004a1c 0x316 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_abbrev 0x0000000000004d32 0x27a ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_abbrev 0x0000000000004fac 0x23f ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_abbrev 0x00000000000051eb 0x215 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_abbrev 0x0000000000005400 0x24f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_abbrev 0x000000000000564f 0x2b0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_abbrev 0x00000000000058ff 0x23a ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + +.debug_aranges 0x0000000000000000 0x1ba0 + .debug_aranges + 0x0000000000000000 0x98 ./Core/Src/main.o + .debug_aranges + 0x0000000000000098 0x58 ./Core/Src/stm32f2xx_hal_msp.o + .debug_aranges + 0x00000000000000f0 0x68 ./Core/Src/stm32f2xx_it.o + .debug_aranges + 0x0000000000000158 0xa8 ./Core/Src/syscalls.o + .debug_aranges + 0x0000000000000200 0x20 ./Core/Src/sysmem.o + .debug_aranges + 0x0000000000000220 0x28 ./Core/Src/system_stm32f2xx.o + .debug_aranges + 0x0000000000000248 0x28 ./Core/Startup/startup_stm32f207zgtx.o + .debug_aranges + 0x0000000000000270 0xf0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_aranges + 0x0000000000000360 0x118 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_aranges + 0x0000000000000478 0x118 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_aranges + 0x0000000000000590 0x58 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_aranges + 0x00000000000005e8 0x148 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_aranges + 0x0000000000000730 0x88 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_aranges + 0x00000000000007b8 0x3d0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_aranges + 0x0000000000000b88 0x168 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_aranges + 0x0000000000000cf0 0x208 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_aranges + 0x0000000000000ef8 0x1a0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_aranges + 0x0000000000001098 0x28 ./LWIP/App/lwip.o + .debug_aranges + 0x00000000000010c0 0x78 ./LWIP/Target/ethernetif.o + .debug_aranges + 0x0000000000001138 0x120 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_aranges + 0x0000000000001258 0x48 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_aranges + 0x00000000000012a0 0x20 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_aranges + 0x00000000000012c0 0x18 ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_aranges + 0x00000000000012d8 0x48 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_aranges + 0x0000000000001320 0x58 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_aranges + 0x0000000000001378 0x98 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_aranges + 0x0000000000001410 0xf0 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_aranges + 0x0000000000001500 0x188 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_aranges + 0x0000000000001688 0x68 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_aranges + 0x00000000000016f0 0x98 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_aranges + 0x0000000000001788 0x60 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_aranges + 0x00000000000017e8 0x98 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_aranges + 0x0000000000001880 0x140 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_aranges + 0x00000000000019c0 0x88 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_aranges + 0x0000000000001a48 0x38 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_aranges + 0x0000000000001a80 0x40 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_aranges + 0x0000000000001ac0 0x48 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_aranges + 0x0000000000001b08 0x70 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_aranges + 0x0000000000001b78 0x28 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + +.debug_rnglists + 0x0000000000000000 0x1601 + .debug_rnglists + 0x0000000000000000 0x73 ./Core/Src/main.o + .debug_rnglists + 0x0000000000000073 0x41 ./Core/Src/stm32f2xx_hal_msp.o + .debug_rnglists + 0x00000000000000b4 0x49 ./Core/Src/stm32f2xx_it.o + .debug_rnglists + 0x00000000000000fd 0x79 ./Core/Src/syscalls.o + .debug_rnglists + 0x0000000000000176 0x13 ./Core/Src/sysmem.o + .debug_rnglists + 0x0000000000000189 0x1a ./Core/Src/system_stm32f2xx.o + .debug_rnglists + 0x00000000000001a3 0x19 ./Core/Startup/startup_stm32f207zgtx.o + .debug_rnglists + 0x00000000000001bc 0xaf ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_rnglists + 0x000000000000026b 0xce ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_rnglists + 0x0000000000000339 0xd9 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_rnglists + 0x0000000000000412 0x3f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_rnglists + 0x0000000000000451 0xfa ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_rnglists + 0x000000000000054b 0x67 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_rnglists + 0x00000000000005b2 0x31a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_rnglists + 0x00000000000008cc 0x125 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_rnglists + 0x00000000000009f1 0x1bc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_rnglists + 0x0000000000000bad 0x147 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_rnglists + 0x0000000000000cf4 0x1a ./LWIP/App/lwip.o + .debug_rnglists + 0x0000000000000d0e 0x5b ./LWIP/Target/ethernetif.o + .debug_rnglists + 0x0000000000000d69 0x10d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_rnglists + 0x0000000000000e76 0x32 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_rnglists + 0x0000000000000ea8 0x13 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_rnglists + 0x0000000000000ebb 0x35 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_rnglists + 0x0000000000000ef0 0x3d ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_rnglists + 0x0000000000000f2d 0x6f ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_rnglists + 0x0000000000000f9c 0xbb ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_rnglists + 0x0000000000001057 0x134 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_rnglists + 0x000000000000118b 0x7c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_rnglists + 0x0000000000001207 0xc4 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_rnglists + 0x00000000000012cb 0x46 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_rnglists + 0x0000000000001311 0x71 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_rnglists + 0x0000000000001382 0xff ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_rnglists + 0x0000000000001481 0x6b ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_rnglists + 0x00000000000014ec 0x36 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_rnglists + 0x0000000000001522 0x2e ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_rnglists + 0x0000000000001550 0x34 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_rnglists + 0x0000000000001584 0x62 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_rnglists + 0x00000000000015e6 0x1b ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + +.debug_macro 0x0000000000000000 0x2d3de + .debug_macro 0x0000000000000000 0x61c ./Core/Src/main.o + .debug_macro 0x000000000000061c 0xa9c ./Core/Src/main.o + .debug_macro 0x00000000000010b8 0x258 ./Core/Src/main.o + .debug_macro 0x0000000000001310 0x2e ./Core/Src/main.o + .debug_macro 0x000000000000133e 0x22 ./Core/Src/main.o + .debug_macro 0x0000000000001360 0x22 ./Core/Src/main.o + .debug_macro 0x0000000000001382 0x8e ./Core/Src/main.o + .debug_macro 0x0000000000001410 0x51 ./Core/Src/main.o + .debug_macro 0x0000000000001461 0x103 ./Core/Src/main.o + .debug_macro 0x0000000000001564 0x6a ./Core/Src/main.o + .debug_macro 0x00000000000015ce 0x1df ./Core/Src/main.o + .debug_macro 0x00000000000017ad 0x1c ./Core/Src/main.o + .debug_macro 0x00000000000017c9 0x22 ./Core/Src/main.o + .debug_macro 0x00000000000017eb 0xbd ./Core/Src/main.o + .debug_macro 0x00000000000018a8 0xe49 ./Core/Src/main.o + .debug_macro 0x00000000000026f1 0x11f ./Core/Src/main.o + .debug_macro 0x0000000000002810 0x14fe1 ./Core/Src/main.o + .debug_macro 0x00000000000177f1 0x6d ./Core/Src/main.o + .debug_macro 0x000000000001785e 0x35a5 ./Core/Src/main.o + .debug_macro 0x000000000001ae03 0x174 ./Core/Src/main.o + .debug_macro 0x000000000001af77 0x55 ./Core/Src/main.o + .debug_macro 0x000000000001afcc 0x1056 ./Core/Src/main.o + .debug_macro 0x000000000001c022 0x153 ./Core/Src/main.o + .debug_macro 0x000000000001c175 0x170 ./Core/Src/main.o + .debug_macro 0x000000000001c2e5 0x115 ./Core/Src/main.o + .debug_macro 0x000000000001c3fa 0x108 ./Core/Src/main.o + .debug_macro 0x000000000001c502 0xa5 ./Core/Src/main.o + .debug_macro 0x000000000001c5a7 0x16a ./Core/Src/main.o + .debug_macro 0x000000000001c711 0x287 ./Core/Src/main.o + .debug_macro 0x000000000001c998 0x5f ./Core/Src/main.o + .debug_macro 0x000000000001c9f7 0x236 ./Core/Src/main.o + .debug_macro 0x000000000001cc2d 0xcce ./Core/Src/main.o + .debug_macro 0x000000000001d8fb 0x126 ./Core/Src/main.o + .debug_macro 0x000000000001da21 0x216 ./Core/Src/main.o + .debug_macro 0x000000000001dc37 0x2e ./Core/Src/main.o + .debug_macro 0x000000000001dc65 0x113 ./Core/Src/main.o + .debug_macro 0x000000000001dd78 0x22 ./Core/Src/main.o + .debug_macro 0x000000000001dd9a 0x82 ./Core/Src/main.o + .debug_macro 0x000000000001de1c 0x8ed ./Core/Src/main.o + .debug_macro 0x000000000001e709 0x4c ./Core/Src/main.o + .debug_macro 0x000000000001e755 0x2aa ./Core/Src/main.o + .debug_macro 0x000000000001e9ff 0x287 ./Core/Src/main.o + .debug_macro 0x000000000001ec86 0xba ./Core/Src/main.o + .debug_macro 0x000000000001ed40 0x12d ./Core/Src/main.o + .debug_macro 0x000000000001ee6d 0x19e ./Core/Src/main.o + .debug_macro 0x000000000001f00b 0xb2 ./Core/Src/main.o + .debug_macro 0x000000000001f0bd 0x16 ./Core/Src/main.o + .debug_macro 0x000000000001f0d3 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001f0e3 0x24 ./Core/Src/main.o + .debug_macro 0x000000000001f107 0x61 ./Core/Src/main.o + .debug_macro 0x000000000001f168 0x43 ./Core/Src/main.o + .debug_macro 0x000000000001f1ab 0x34 ./Core/Src/main.o + .debug_macro 0x000000000001f1df 0x16 ./Core/Src/main.o + .debug_macro 0x000000000001f1f5 0x35 ./Core/Src/main.o + .debug_macro 0x000000000001f22a 0x16 ./Core/Src/main.o + .debug_macro 0x000000000001f240 0x43 ./Core/Src/main.o + .debug_macro 0x000000000001f283 0x34 ./Core/Src/main.o + .debug_macro 0x000000000001f2b7 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001f2c7 0x58 ./Core/Src/main.o + .debug_macro 0x000000000001f31f 0x8e ./Core/Src/main.o + .debug_macro 0x000000000001f3ad 0x1c ./Core/Src/main.o + .debug_macro 0x000000000001f3c9 0x177 ./Core/Src/main.o + .debug_macro 0x000000000001f540 0x369 ./Core/Src/main.o + .debug_macro 0x000000000001f8a9 0x16 ./Core/Src/main.o + .debug_macro 0x000000000001f8bf 0x29 ./Core/Src/main.o + .debug_macro 0x000000000001f8e8 0x1c ./Core/Src/main.o + .debug_macro 0x000000000001f904 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001f914 0x1c ./Core/Src/main.o + .debug_macro 0x000000000001f930 0x16 ./Core/Src/main.o + .debug_macro 0x000000000001f946 0x147 ./Core/Src/main.o + .debug_macro 0x000000000001fa8d 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001fa9d 0x22 ./Core/Src/main.o + .debug_macro 0x000000000001fabf 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001facf 0x1c ./Core/Src/main.o + .debug_macro 0x000000000001faeb 0x52 ./Core/Src/main.o + .debug_macro 0x000000000001fb3d 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001fb4d 0x52 ./Core/Src/main.o + .debug_macro 0x000000000001fb9f 0xc1 ./Core/Src/main.o + .debug_macro 0x000000000001fc60 0x1c ./Core/Src/main.o + .debug_macro 0x000000000001fc7c 0x3d ./Core/Src/main.o + .debug_macro 0x000000000001fcb9 0xc8 ./Core/Src/main.o + .debug_macro 0x000000000001fd81 0x16 ./Core/Src/main.o + .debug_macro 0x000000000001fd97 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001fda7 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001fdb7 0x35 ./Core/Src/main.o + .debug_macro 0x000000000001fdec 0x28 ./Core/Src/main.o + .debug_macro 0x000000000001fe14 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001fe24 0x11 ./Core/Src/main.o + .debug_macro 0x000000000001fe35 0x10 ./Core/Src/main.o + .debug_macro 0x000000000001fe45 0x460 ./Core/Src/main.o + .debug_macro 0x00000000000202a5 0x43 ./Core/Src/main.o + .debug_macro 0x00000000000202e8 0x7c ./Core/Src/main.o + .debug_macro 0x0000000000020364 0x17 ./Core/Src/main.o + .debug_macro 0x000000000002037b 0x118 ./Core/Src/main.o + .debug_macro 0x0000000000020493 0x4a ./Core/Src/main.o + .debug_macro 0x00000000000204dd 0x66 ./Core/Src/main.o + .debug_macro 0x0000000000020543 0x6a0 ./Core/Src/main.o + .debug_macro 0x0000000000020be3 0x10 ./Core/Src/main.o + .debug_macro 0x0000000000020bf3 0x10 ./Core/Src/main.o + .debug_macro 0x0000000000020c03 0x3f ./Core/Src/main.o + .debug_macro 0x0000000000020c42 0x2b ./Core/Src/main.o + .debug_macro 0x0000000000020c6d 0x15b ./Core/Src/main.o + .debug_macro 0x0000000000020dc8 0x22 ./Core/Src/main.o + .debug_macro 0x0000000000020dea 0x16 ./Core/Src/main.o + .debug_macro 0x0000000000020e00 0x55 ./Core/Src/main.o + .debug_macro 0x0000000000020e55 0x6a ./Core/Src/main.o + .debug_macro 0x0000000000020ebf 0x185 ./Core/Src/main.o + .debug_macro 0x0000000000021044 0x10 ./Core/Src/main.o + .debug_macro 0x0000000000021054 0x14d ./Core/Src/main.o + .debug_macro 0x00000000000211a1 0x8f ./Core/Src/main.o + .debug_macro 0x0000000000021230 0x8e ./Core/Src/main.o + .debug_macro 0x00000000000212be 0x28 ./Core/Src/main.o + .debug_macro 0x00000000000212e6 0x5a ./Core/Src/main.o + .debug_macro 0x0000000000021340 0x16 ./Core/Src/main.o + .debug_macro 0x0000000000021356 0x16 ./Core/Src/main.o + .debug_macro 0x000000000002136c 0x10 ./Core/Src/main.o + .debug_macro 0x000000000002137c 0x2e ./Core/Src/main.o + .debug_macro 0x00000000000213aa 0xe3 ./Core/Src/main.o + .debug_macro 0x000000000002148d 0x10 ./Core/Src/main.o + .debug_macro 0x000000000002149d 0x38 ./Core/Src/main.o + .debug_macro 0x00000000000214d5 0x29 ./Core/Src/main.o + .debug_macro 0x00000000000214fe 0x10 ./Core/Src/main.o + .debug_macro 0x000000000002150e 0x2e ./Core/Src/main.o + .debug_macro 0x000000000002153c 0x18 ./Core/Src/main.o + .debug_macro 0x0000000000021554 0x16 ./Core/Src/main.o + .debug_macro 0x000000000002156a 0x20 ./Core/Src/main.o + .debug_macro 0x000000000002158a 0x204 ./Core/Src/stm32f2xx_hal_msp.o + .debug_macro 0x000000000002178e 0x5e8 ./Core/Src/stm32f2xx_it.o + .debug_macro 0x0000000000021d76 0x4cd ./Core/Src/syscalls.o + .debug_macro 0x0000000000022243 0x5b ./Core/Src/syscalls.o + .debug_macro 0x000000000002229e 0x94 ./Core/Src/syscalls.o + .debug_macro 0x0000000000022332 0x57 ./Core/Src/syscalls.o + .debug_macro 0x0000000000022389 0x10 ./Core/Src/syscalls.o + .debug_macro 0x0000000000022399 0xcf ./Core/Src/syscalls.o + .debug_macro 0x0000000000022468 0x12c ./Core/Src/syscalls.o + .debug_macro 0x0000000000022594 0x4f ./Core/Src/syscalls.o + .debug_macro 0x00000000000225e3 0xac ./Core/Src/syscalls.o + .debug_macro 0x000000000002268f 0x10 ./Core/Src/syscalls.o + .debug_macro 0x000000000002269f 0xce ./Core/Src/syscalls.o + .debug_macro 0x000000000002276d 0x31a ./Core/Src/syscalls.o + .debug_macro 0x0000000000022a87 0x190 ./Core/Src/syscalls.o + .debug_macro 0x0000000000022c17 0x16 ./Core/Src/syscalls.o + .debug_macro 0x0000000000022c2d 0x4a1 ./Core/Src/sysmem.o + .debug_macro 0x00000000000230ce 0x1f5 ./Core/Src/system_stm32f2xx.o + .debug_macro 0x00000000000232c3 0x243 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_macro 0x0000000000023506 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_macro 0x00000000000236fb 0x20b ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_macro 0x0000000000023906 0x1fc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_macro 0x0000000000023b02 0x201 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_macro 0x0000000000023d03 0x21f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_macro 0x0000000000023f22 0x1f6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_macro 0x0000000000024118 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_macro 0x000000000002430d 0x1f6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_macro 0x0000000000024503 0x1f5 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_macro 0x00000000000246f8 0x5ed ./LWIP/App/lwip.o + .debug_macro 0x0000000000024ce5 0x5e ./LWIP/App/lwip.o + .debug_macro 0x0000000000024d43 0x5c9 ./LWIP/Target/ethernetif.o + .debug_macro 0x000000000002530c 0x5b ./LWIP/Target/ethernetif.o + .debug_macro 0x0000000000025367 0x18b ./LWIP/Target/ethernetif.o + .debug_macro 0x00000000000254f2 0x63c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000025b2e 0x28 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000025b56 0x70 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000025bc6 0xdd ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_macro 0x0000000000025ca3 0x4c1 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_macro 0x0000000000026164 0x66d ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x00000000000267d1 0x70 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000026841 0x1c1 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000026a02 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_macro 0x0000000000026a36 0x56c ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_macro 0x0000000000026fa2 0x56b ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_macro 0x000000000002750d 0x6d9 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000027be6 0x25 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000027c0b 0x16 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_macro 0x0000000000027c21 0x655 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000028276 0xc0 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000028336 0x2f ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_macro 0x0000000000028365 0x5eb ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x0000000000028950 0x9b ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_macro 0x00000000000289eb 0x5fb ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_macro 0x0000000000028fe6 0x5c5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x00000000000295ab 0x1c ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_macro 0x00000000000295c7 0x5f3 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_macro 0x0000000000029bba 0x65c ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_macro 0x000000000002a216 0x604 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_macro 0x000000000002a81a 0x63f ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x000000000002ae59 0x16a ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_macro 0x000000000002afc3 0x627 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_macro 0x000000000002b5ea 0x5c0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_macro 0x000000000002bbaa 0x635 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x000000000002c1df 0xe3 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_macro 0x000000000002c2c2 0x550 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_macro 0x000000000002c812 0x5e7 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x000000000002cdf9 0x10 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_macro 0x000000000002ce09 0x5d5 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + +.debug_line 0x0000000000000000 0x2e75e + .debug_line 0x0000000000000000 0x123e ./Core/Src/main.o + .debug_line 0x000000000000123e 0x923 ./Core/Src/stm32f2xx_hal_msp.o + .debug_line 0x0000000000001b61 0xe43 ./Core/Src/stm32f2xx_it.o + .debug_line 0x00000000000029a4 0xdaf ./Core/Src/syscalls.o + .debug_line 0x0000000000003753 0xba7 ./Core/Src/sysmem.o + .debug_line 0x00000000000042fa 0x80c ./Core/Src/system_stm32f2xx.o + .debug_line 0x0000000000004b06 0x7a ./Core/Startup/startup_stm32f207zgtx.o + .debug_line 0x0000000000004b80 0xaa3 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_line 0x0000000000005623 0xd26 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_line 0x0000000000006349 0x178e ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_line 0x0000000000007ad7 0xbf1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_line 0x00000000000086c8 0x149c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_line 0x0000000000009b64 0xf37 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_line 0x000000000000aa9b 0x37e8 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_line 0x000000000000e283 0x1a81 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_line 0x000000000000fd04 0x2995 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_line 0x0000000000012699 0x1c32 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_line 0x00000000000142cb 0xd95 ./LWIP/App/lwip.o + .debug_line 0x0000000000015060 0x11a3 ./LWIP/Target/ethernetif.o + .debug_line 0x0000000000016203 0x198d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_line 0x0000000000017b90 0xd64 ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_line 0x00000000000188f4 0xde7 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_line 0x00000000000196db 0xc9b ./Middlewares/Third_Party/LwIP/src/core/ip.o + .debug_line 0x000000000001a376 0xfd7 ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_line 0x000000000001b34d 0x1008 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_line 0x000000000001c355 0x1109 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_line 0x000000000001d45e 0x1743 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_line 0x000000000001eba1 0x1d3d ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_line 0x00000000000208de 0x1f36 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_line 0x0000000000022814 0x192a ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_line 0x000000000002413e 0x1072 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_line 0x00000000000251b0 0x1294 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_line 0x0000000000026444 0x1eaa ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_line 0x00000000000282ee 0x1422 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_line 0x0000000000029710 0xe6b ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_line 0x000000000002a57b 0x1077 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_line 0x000000000002b5f2 0xf9a ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_line 0x000000000002c58c 0x1340 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_line 0x000000000002d8cc 0xe92 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + +.debug_str 0x0000000000000000 0xde13d + .debug_str 0x0000000000000000 0xd1d3a ./Core/Src/main.o + 0xd2267 (size before relaxing) + .debug_str 0x00000000000d1d3a 0x5f8 ./Core/Src/stm32f2xx_hal_msp.o + 0xc6052 (size before relaxing) + .debug_str 0x00000000000d2332 0xfc ./Core/Src/stm32f2xx_it.o + 0xd0ddc (size before relaxing) + .debug_str 0x00000000000d242e 0xfd8 ./Core/Src/syscalls.o + 0xcdd21 (size before relaxing) + .debug_str 0x00000000000d3406 0x6b ./Core/Src/sysmem.o + 0xcd33c (size before relaxing) + .debug_str 0x00000000000d3471 0x87 ./Core/Src/system_stm32f2xx.o + 0xc4981 (size before relaxing) + .debug_str 0x00000000000d34f8 0x34 ./Core/Startup/startup_stm32f207zgtx.o + 0x8a (size before relaxing) + .debug_str 0x00000000000d352c 0x561 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + 0xc54cd (size before relaxing) + .debug_str 0x00000000000d3a8d 0x36a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + 0xc5292 (size before relaxing) + .debug_str 0x00000000000d3df7 0xba7 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + 0xc55c3 (size before relaxing) + .debug_str 0x00000000000d499e 0xeb ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + 0xc4b3f (size before relaxing) + .debug_str 0x00000000000d4a89 0x7ae ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + 0xc5442 (size before relaxing) + .debug_str 0x00000000000d5237 0x248 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + 0xc4e33 (size before relaxing) + .debug_str 0x00000000000d547f 0xd4f ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + 0xc5d4f (size before relaxing) + .debug_str 0x00000000000d61ce 0x3e1 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + 0xc556b (size before relaxing) + .debug_str 0x00000000000d65af 0x62a ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + 0xc53d6 (size before relaxing) + .debug_str 0x00000000000d6bd9 0x4a6 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + 0xc538e (size before relaxing) + .debug_str 0x00000000000d707f 0x483 ./LWIP/App/lwip.o + 0xd0e75 (size before relaxing) + .debug_str 0x00000000000d7502 0x223 ./LWIP/Target/ethernetif.o + 0xd0c7c (size before relaxing) + .debug_str 0x00000000000d7725 0x127c ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + 0xd1bf2 (size before relaxing) + .debug_str 0x00000000000d89a1 0xcd ./Middlewares/Third_Party/LwIP/src/core/def.o + 0xcd13c (size before relaxing) + .debug_str 0x00000000000d8a6e 0x1abf ./Middlewares/Third_Party/LwIP/src/core/init.o + 0xd2963 (size before relaxing) + .debug_str 0x00000000000da52d 0xf1 ./Middlewares/Third_Party/LwIP/src/core/ip.o + 0xd053b (size before relaxing) + .debug_str 0x00000000000da61e 0x23c ./Middlewares/Third_Party/LwIP/src/core/mem.o + 0xce326 (size before relaxing) + .debug_str 0x00000000000da85a 0x407 ./Middlewares/Third_Party/LwIP/src/core/memp.o + 0xd2b4d (size before relaxing) + .debug_str 0x00000000000dac61 0x68c ./Middlewares/Third_Party/LwIP/src/core/netif.o + 0xd307f (size before relaxing) + .debug_str 0x00000000000db2ed 0x3ce ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + 0xd2ae1 (size before relaxing) + .debug_str 0x00000000000db6bb 0x5f0 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + 0xd290e (size before relaxing) + .debug_str 0x00000000000dbcab 0x2f5 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + 0xd2727 (size before relaxing) + .debug_str 0x00000000000dbfa0 0x243 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + 0xd2653 (size before relaxing) + .debug_str 0x00000000000dc1e3 0x179 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + 0xd2d67 (size before relaxing) + .debug_str 0x00000000000dc35c 0x2c6 ./Middlewares/Third_Party/LwIP/src/core/udp.o + 0xd1409 (size before relaxing) + .debug_str 0x00000000000dc622 0xd99 ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + 0xd1bb4 (size before relaxing) + .debug_str 0x00000000000dd3bb 0x512 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + 0xd15e7 (size before relaxing) + .debug_str 0x00000000000dd8cd 0x103 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + 0xd09ee (size before relaxing) + .debug_str 0x00000000000dd9d0 0x13f ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + 0xd2912 (size before relaxing) + .debug_str 0x00000000000ddb0f 0x1cd ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + 0xcface (size before relaxing) + .debug_str 0x00000000000ddcdc 0x3e0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + 0xd0de9 (size before relaxing) + .debug_str 0x00000000000de0bc 0x81 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + 0xd0faa (size before relaxing) + +.debug_frame 0x0000000000000000 0x7ce0 + .debug_frame 0x0000000000000000 0x22c ./Core/Src/main.o + .debug_frame 0x000000000000022c 0x134 ./Core/Src/stm32f2xx_hal_msp.o + .debug_frame 0x0000000000000360 0x120 ./Core/Src/stm32f2xx_it.o + .debug_frame 0x0000000000000480 0x2c4 ./Core/Src/syscalls.o + .debug_frame 0x0000000000000744 0x38 ./Core/Src/sysmem.o + .debug_frame 0x000000000000077c 0x58 ./Core/Src/system_stm32f2xx.o + .debug_frame 0x00000000000007d4 0x384 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o + .debug_frame 0x0000000000000b58 0x498 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o + .debug_frame 0x0000000000000ff0 0x4dc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o + .debug_frame 0x00000000000014cc 0x14c ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o + .debug_frame 0x0000000000001618 0x5bc ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o + .debug_frame 0x0000000000001bd4 0x208 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o + .debug_frame 0x0000000000001ddc 0x11c4 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o + .debug_frame 0x0000000000002fa0 0x638 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o + .debug_frame 0x00000000000035d8 0x944 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o + .debug_frame 0x0000000000003f1c 0x7c0 ./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o + .debug_frame 0x00000000000046dc 0x50 ./LWIP/App/lwip.o + .debug_frame 0x000000000000472c 0x1b4 ./LWIP/Target/ethernetif.o + .debug_frame 0x00000000000048e0 0x4e0 ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + .debug_frame 0x0000000000004dc0 0xfc ./Middlewares/Third_Party/LwIP/src/core/def.o + .debug_frame 0x0000000000004ebc 0x34 ./Middlewares/Third_Party/LwIP/src/core/init.o + .debug_frame 0x0000000000004ef0 0xec ./Middlewares/Third_Party/LwIP/src/core/mem.o + .debug_frame 0x0000000000004fdc 0x134 ./Middlewares/Third_Party/LwIP/src/core/memp.o + .debug_frame 0x0000000000005110 0x260 ./Middlewares/Third_Party/LwIP/src/core/netif.o + .debug_frame 0x0000000000005370 0x3e4 ./Middlewares/Third_Party/LwIP/src/core/pbuf.o + .debug_frame 0x0000000000005754 0x6a8 ./Middlewares/Third_Party/LwIP/src/core/tcp.o + .debug_frame 0x0000000000005dfc 0x194 ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o + .debug_frame 0x0000000000005f90 0x280 ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o + .debug_frame 0x0000000000006210 0x144 ./Middlewares/Third_Party/LwIP/src/core/timeouts.o + .debug_frame 0x0000000000006354 0x268 ./Middlewares/Third_Party/LwIP/src/core/udp.o + .debug_frame 0x00000000000065bc 0x56c ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o + .debug_frame 0x0000000000006b28 0x228 ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o + .debug_frame 0x0000000000006d50 0xa8 ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o + .debug_frame 0x0000000000006df8 0xcc ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o + .debug_frame 0x0000000000006ec4 0xf4 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o + .debug_frame 0x0000000000006fb8 0x1a0 ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + .debug_frame 0x0000000000007158 0x58 ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o + .debug_frame 0x00000000000071b0 0x44 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-rand.o) + .debug_frame 0x00000000000071f4 0x144 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-findfp.o) + .debug_frame 0x0000000000007338 0x34 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fwalk.o) + .debug_frame 0x000000000000736c 0x6c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-printf.o) + .debug_frame 0x00000000000073d8 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-puts.o) + .debug_frame 0x0000000000007414 0x88 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-stdio.o) + .debug_frame 0x000000000000749c 0x40 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wbuf.o) + .debug_frame 0x00000000000074dc 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-wsetup.o) + .debug_frame 0x0000000000007508 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcmp.o) + .debug_frame 0x0000000000007530 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memset.o) + .debug_frame 0x0000000000007550 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-closer.o) + .debug_frame 0x000000000000757c 0x38 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-reent.o) + .debug_frame 0x00000000000075b4 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lseekr.o) + .debug_frame 0x00000000000075e0 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-readr.o) + .debug_frame 0x000000000000760c 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-writer.o) + .debug_frame 0x0000000000007638 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-init.o) + .debug_frame 0x0000000000007664 0xb0 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-lock.o) + .debug_frame 0x0000000000007714 0x20 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-strcmp.o) + .debug_frame 0x0000000000007734 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memcpy-stub.o) + .debug_frame 0x000000000000775c 0x40 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-assert.o) + .debug_frame 0x000000000000779c 0x38 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-freer.o) + .debug_frame 0x00000000000077d4 0x30 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-malloc.o) + .debug_frame 0x0000000000007804 0x50 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mallocr.o) + .debug_frame 0x0000000000007854 0x30 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-mlock.o) + .debug_frame 0x0000000000007884 0xa8 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf.o) + .debug_frame 0x000000000000792c 0x60 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-nano-vfprintf_i.o) + .debug_frame 0x000000000000798c 0x5c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fflush.o) + .debug_frame 0x00000000000079e8 0x64 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fprintf.o) + .debug_frame 0x0000000000007a4c 0x58 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-makebuf.o) + .debug_frame 0x0000000000007aa4 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-fstatr.o) + .debug_frame 0x0000000000007ad0 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-isattyr.o) + .debug_frame 0x0000000000007afc 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-sbrkr.o) + .debug_frame 0x0000000000007b28 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-memchr-stub.o) + .debug_frame 0x0000000000007b50 0x28 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-abort.o) + .debug_frame 0x0000000000007b78 0xcc C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signal.o) + .debug_frame 0x0000000000007c44 0x3c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp\libc_nano.a(libc_a-signalr.o) + .debug_frame 0x0000000000007c80 0x2c C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_aeabi_uldivmod.o) + .debug_frame 0x0000000000007cac 0x34 C:/Dev/ST/STM32CubeIDE_1.8.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/thumb/v7-m/nofp\libgcc.a(_udivmoddi4.o) + +.debug_line_str + 0x0000000000000000 0x7e + .debug_line_str + 0x0000000000000000 0x7e ./Core/Startup/startup_stm32f207zgtx.o + 0x96 (size before relaxing) diff --git a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/api/subdir.mk b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/api/subdir.mk index a95297c..792c3ce 100644 --- a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/api/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/api/subdir.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/api/api_lib.c \ ../Middlewares/Third_Party/LwIP/src/api/api_msg.c \ @@ -12,8 +12,8 @@ C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/api/netdb.c \ ../Middlewares/Third_Party/LwIP/src/api/netifapi.c \ ../Middlewares/Third_Party/LwIP/src/api/sockets.c \ -../Middlewares/Third_Party/LwIP/src/api/tcpip.c - +../Middlewares/Third_Party/LwIP/src/api/tcpip.c + C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/api/api_lib.d \ ./Middlewares/Third_Party/LwIP/src/api/api_msg.d \ @@ -22,8 +22,8 @@ C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/api/netdb.d \ ./Middlewares/Third_Party/LwIP/src/api/netifapi.d \ ./Middlewares/Third_Party/LwIP/src/api/sockets.d \ -./Middlewares/Third_Party/LwIP/src/api/tcpip.d - +./Middlewares/Third_Party/LwIP/src/api/tcpip.d + OBJS += \ ./Middlewares/Third_Party/LwIP/src/api/api_lib.o \ ./Middlewares/Third_Party/LwIP/src/api/api_msg.o \ @@ -32,17 +32,17 @@ OBJS += \ ./Middlewares/Third_Party/LwIP/src/api/netdb.o \ ./Middlewares/Third_Party/LwIP/src/api/netifapi.o \ ./Middlewares/Third_Party/LwIP/src/api/sockets.o \ -./Middlewares/Third_Party/LwIP/src/api/tcpip.o - - -# Each subdirectory must supply rules for building sources it contributes -Middlewares/Third_Party/LwIP/src/api/%.o Middlewares/Third_Party/LwIP/src/api/%.su Middlewares/Third_Party/LwIP/src/api/%.cyclo: ../Middlewares/Third_Party/LwIP/src/api/%.c Middlewares/Third_Party/LwIP/src/api/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-api - -clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-api: - -$(RM) ./Middlewares/Third_Party/LwIP/src/api/api_lib.cyclo ./Middlewares/Third_Party/LwIP/src/api/api_lib.d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o ./Middlewares/Third_Party/LwIP/src/api/api_lib.su ./Middlewares/Third_Party/LwIP/src/api/api_msg.cyclo ./Middlewares/Third_Party/LwIP/src/api/api_msg.d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o ./Middlewares/Third_Party/LwIP/src/api/api_msg.su ./Middlewares/Third_Party/LwIP/src/api/err.cyclo ./Middlewares/Third_Party/LwIP/src/api/err.d ./Middlewares/Third_Party/LwIP/src/api/err.o ./Middlewares/Third_Party/LwIP/src/api/err.su ./Middlewares/Third_Party/LwIP/src/api/netbuf.cyclo ./Middlewares/Third_Party/LwIP/src/api/netbuf.d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o ./Middlewares/Third_Party/LwIP/src/api/netbuf.su ./Middlewares/Third_Party/LwIP/src/api/netdb.cyclo ./Middlewares/Third_Party/LwIP/src/api/netdb.d ./Middlewares/Third_Party/LwIP/src/api/netdb.o ./Middlewares/Third_Party/LwIP/src/api/netdb.su ./Middlewares/Third_Party/LwIP/src/api/netifapi.cyclo ./Middlewares/Third_Party/LwIP/src/api/netifapi.d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o ./Middlewares/Third_Party/LwIP/src/api/netifapi.su ./Middlewares/Third_Party/LwIP/src/api/sockets.cyclo ./Middlewares/Third_Party/LwIP/src/api/sockets.d ./Middlewares/Third_Party/LwIP/src/api/sockets.o ./Middlewares/Third_Party/LwIP/src/api/sockets.su ./Middlewares/Third_Party/LwIP/src/api/tcpip.cyclo ./Middlewares/Third_Party/LwIP/src/api/tcpip.d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o ./Middlewares/Third_Party/LwIP/src/api/tcpip.su - -.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-api - +./Middlewares/Third_Party/LwIP/src/api/tcpip.o + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/LwIP/src/api/%.o Middlewares/Third_Party/LwIP/src/api/%.su Middlewares/Third_Party/LwIP/src/api/%.cyclo: ../Middlewares/Third_Party/LwIP/src/api/%.c Middlewares/Third_Party/LwIP/src/api/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-api + +clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-api: + -$(RM) ./Middlewares/Third_Party/LwIP/src/api/api_lib.cyclo ./Middlewares/Third_Party/LwIP/src/api/api_lib.d ./Middlewares/Third_Party/LwIP/src/api/api_lib.o ./Middlewares/Third_Party/LwIP/src/api/api_lib.su ./Middlewares/Third_Party/LwIP/src/api/api_msg.cyclo ./Middlewares/Third_Party/LwIP/src/api/api_msg.d ./Middlewares/Third_Party/LwIP/src/api/api_msg.o ./Middlewares/Third_Party/LwIP/src/api/api_msg.su ./Middlewares/Third_Party/LwIP/src/api/err.cyclo ./Middlewares/Third_Party/LwIP/src/api/err.d ./Middlewares/Third_Party/LwIP/src/api/err.o ./Middlewares/Third_Party/LwIP/src/api/err.su ./Middlewares/Third_Party/LwIP/src/api/netbuf.cyclo ./Middlewares/Third_Party/LwIP/src/api/netbuf.d ./Middlewares/Third_Party/LwIP/src/api/netbuf.o ./Middlewares/Third_Party/LwIP/src/api/netbuf.su ./Middlewares/Third_Party/LwIP/src/api/netdb.cyclo ./Middlewares/Third_Party/LwIP/src/api/netdb.d ./Middlewares/Third_Party/LwIP/src/api/netdb.o ./Middlewares/Third_Party/LwIP/src/api/netdb.su ./Middlewares/Third_Party/LwIP/src/api/netifapi.cyclo ./Middlewares/Third_Party/LwIP/src/api/netifapi.d ./Middlewares/Third_Party/LwIP/src/api/netifapi.o ./Middlewares/Third_Party/LwIP/src/api/netifapi.su ./Middlewares/Third_Party/LwIP/src/api/sockets.cyclo ./Middlewares/Third_Party/LwIP/src/api/sockets.d ./Middlewares/Third_Party/LwIP/src/api/sockets.o ./Middlewares/Third_Party/LwIP/src/api/sockets.su ./Middlewares/Third_Party/LwIP/src/api/tcpip.cyclo ./Middlewares/Third_Party/LwIP/src/api/tcpip.d ./Middlewares/Third_Party/LwIP/src/api/tcpip.o ./Middlewares/Third_Party/LwIP/src/api/tcpip.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-api + diff --git a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk index 9987235..079dfca 100644 --- a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk @@ -1,27 +1,27 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ -../Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c - +../Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c + C_DEPS += \ -./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.d - +./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.d + OBJS += \ -./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o - - -# Each subdirectory must supply rules for building sources it contributes -Middlewares/Third_Party/LwIP/src/apps/mqtt/%.o Middlewares/Third_Party/LwIP/src/apps/mqtt/%.su Middlewares/Third_Party/LwIP/src/apps/mqtt/%.cyclo: ../Middlewares/Third_Party/LwIP/src/apps/mqtt/%.c Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-apps-2f-mqtt - -clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-apps-2f-mqtt: - -$(RM) ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.cyclo ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.su - -.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-apps-2f-mqtt - +./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/LwIP/src/apps/mqtt/%.o Middlewares/Third_Party/LwIP/src/apps/mqtt/%.su Middlewares/Third_Party/LwIP/src/apps/mqtt/%.cyclo: ../Middlewares/Third_Party/LwIP/src/apps/mqtt/%.c Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-apps-2f-mqtt + +clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-apps-2f-mqtt: + -$(RM) ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.cyclo ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.d ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o ./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-apps-2f-mqtt + diff --git a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk index b69ed76..d745de0 100644 --- a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.c \ ../Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c \ @@ -12,8 +12,8 @@ C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c \ ../Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.c \ ../Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.c \ -../Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.c - +../Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.c + C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.d \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.d \ @@ -22,8 +22,8 @@ C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.d \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.d \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.d \ -./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.d - +./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.d + OBJS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o \ @@ -32,17 +32,17 @@ OBJS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o \ ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o \ -./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o - - -# Each subdirectory must supply rules for building sources it contributes -Middlewares/Third_Party/LwIP/src/core/ipv4/%.o Middlewares/Third_Party/LwIP/src/core/ipv4/%.su Middlewares/Third_Party/LwIP/src/core/ipv4/%.cyclo: ../Middlewares/Third_Party/LwIP/src/core/ipv4/%.c Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv4 - -clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv4: - -$(RM) ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.su - -.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv4 - +./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/LwIP/src/core/ipv4/%.o Middlewares/Third_Party/LwIP/src/core/ipv4/%.su Middlewares/Third_Party/LwIP/src/core/ipv4/%.cyclo: ../Middlewares/Third_Party/LwIP/src/core/ipv4/%.c Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv4 + +clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv4: + -$(RM) ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.su ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.d ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o ./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv4 + diff --git a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk index 5ed80f9..96d1a00 100644 --- a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.c \ ../Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.c \ @@ -13,8 +13,8 @@ C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.c \ ../Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.c \ ../Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.c \ -../Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c - +../Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c + C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.d \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.d \ @@ -24,8 +24,8 @@ C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.d \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.d \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.d \ -./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.d - +./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.d + OBJS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o \ @@ -35,17 +35,17 @@ OBJS += \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o \ ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o \ -./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o - - -# Each subdirectory must supply rules for building sources it contributes -Middlewares/Third_Party/LwIP/src/core/ipv6/%.o Middlewares/Third_Party/LwIP/src/core/ipv6/%.su Middlewares/Third_Party/LwIP/src/core/ipv6/%.cyclo: ../Middlewares/Third_Party/LwIP/src/core/ipv6/%.c Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv6 - -clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv6: - -$(RM) ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.su - -.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv6 - +./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/LwIP/src/core/ipv6/%.o Middlewares/Third_Party/LwIP/src/core/ipv6/%.su Middlewares/Third_Party/LwIP/src/core/ipv6/%.cyclo: ../Middlewares/Third_Party/LwIP/src/core/ipv6/%.c Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv6 + +clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv6: + -$(RM) ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.su ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.cyclo ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.d ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o ./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core-2f-ipv6 + diff --git a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/subdir.mk b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/subdir.mk index bda532d..fd47e64 100644 --- a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/core/subdir.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/core/def.c \ ../Middlewares/Third_Party/LwIP/src/core/dns.c \ @@ -21,8 +21,8 @@ C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/core/tcp_in.c \ ../Middlewares/Third_Party/LwIP/src/core/tcp_out.c \ ../Middlewares/Third_Party/LwIP/src/core/timeouts.c \ -../Middlewares/Third_Party/LwIP/src/core/udp.c - +../Middlewares/Third_Party/LwIP/src/core/udp.c + C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/core/def.d \ ./Middlewares/Third_Party/LwIP/src/core/dns.d \ @@ -40,8 +40,8 @@ C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/core/tcp_in.d \ ./Middlewares/Third_Party/LwIP/src/core/tcp_out.d \ ./Middlewares/Third_Party/LwIP/src/core/timeouts.d \ -./Middlewares/Third_Party/LwIP/src/core/udp.d - +./Middlewares/Third_Party/LwIP/src/core/udp.d + OBJS += \ ./Middlewares/Third_Party/LwIP/src/core/def.o \ ./Middlewares/Third_Party/LwIP/src/core/dns.o \ @@ -59,17 +59,17 @@ OBJS += \ ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o \ ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o \ ./Middlewares/Third_Party/LwIP/src/core/timeouts.o \ -./Middlewares/Third_Party/LwIP/src/core/udp.o - - -# Each subdirectory must supply rules for building sources it contributes -Middlewares/Third_Party/LwIP/src/core/%.o Middlewares/Third_Party/LwIP/src/core/%.su Middlewares/Third_Party/LwIP/src/core/%.cyclo: ../Middlewares/Third_Party/LwIP/src/core/%.c Middlewares/Third_Party/LwIP/src/core/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core - -clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core: - -$(RM) ./Middlewares/Third_Party/LwIP/src/core/def.cyclo ./Middlewares/Third_Party/LwIP/src/core/def.d ./Middlewares/Third_Party/LwIP/src/core/def.o ./Middlewares/Third_Party/LwIP/src/core/def.su ./Middlewares/Third_Party/LwIP/src/core/dns.cyclo ./Middlewares/Third_Party/LwIP/src/core/dns.d ./Middlewares/Third_Party/LwIP/src/core/dns.o ./Middlewares/Third_Party/LwIP/src/core/dns.su ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.cyclo ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.su ./Middlewares/Third_Party/LwIP/src/core/init.cyclo ./Middlewares/Third_Party/LwIP/src/core/init.d ./Middlewares/Third_Party/LwIP/src/core/init.o ./Middlewares/Third_Party/LwIP/src/core/init.su ./Middlewares/Third_Party/LwIP/src/core/ip.cyclo ./Middlewares/Third_Party/LwIP/src/core/ip.d ./Middlewares/Third_Party/LwIP/src/core/ip.o ./Middlewares/Third_Party/LwIP/src/core/ip.su ./Middlewares/Third_Party/LwIP/src/core/mem.cyclo ./Middlewares/Third_Party/LwIP/src/core/mem.d ./Middlewares/Third_Party/LwIP/src/core/mem.o ./Middlewares/Third_Party/LwIP/src/core/mem.su ./Middlewares/Third_Party/LwIP/src/core/memp.cyclo ./Middlewares/Third_Party/LwIP/src/core/memp.d ./Middlewares/Third_Party/LwIP/src/core/memp.o ./Middlewares/Third_Party/LwIP/src/core/memp.su ./Middlewares/Third_Party/LwIP/src/core/netif.cyclo ./Middlewares/Third_Party/LwIP/src/core/netif.d ./Middlewares/Third_Party/LwIP/src/core/netif.o ./Middlewares/Third_Party/LwIP/src/core/netif.su ./Middlewares/Third_Party/LwIP/src/core/pbuf.cyclo ./Middlewares/Third_Party/LwIP/src/core/pbuf.d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o ./Middlewares/Third_Party/LwIP/src/core/pbuf.su ./Middlewares/Third_Party/LwIP/src/core/raw.cyclo ./Middlewares/Third_Party/LwIP/src/core/raw.d ./Middlewares/Third_Party/LwIP/src/core/raw.o ./Middlewares/Third_Party/LwIP/src/core/raw.su ./Middlewares/Third_Party/LwIP/src/core/stats.cyclo ./Middlewares/Third_Party/LwIP/src/core/stats.d ./Middlewares/Third_Party/LwIP/src/core/stats.o ./Middlewares/Third_Party/LwIP/src/core/stats.su ./Middlewares/Third_Party/LwIP/src/core/sys.cyclo ./Middlewares/Third_Party/LwIP/src/core/sys.d ./Middlewares/Third_Party/LwIP/src/core/sys.o ./Middlewares/Third_Party/LwIP/src/core/sys.su ./Middlewares/Third_Party/LwIP/src/core/tcp.cyclo ./Middlewares/Third_Party/LwIP/src/core/tcp.d ./Middlewares/Third_Party/LwIP/src/core/tcp.o ./Middlewares/Third_Party/LwIP/src/core/tcp.su ./Middlewares/Third_Party/LwIP/src/core/tcp_in.cyclo ./Middlewares/Third_Party/LwIP/src/core/tcp_in.d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o ./Middlewares/Third_Party/LwIP/src/core/tcp_in.su ./Middlewares/Third_Party/LwIP/src/core/tcp_out.cyclo ./Middlewares/Third_Party/LwIP/src/core/tcp_out.d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o ./Middlewares/Third_Party/LwIP/src/core/tcp_out.su ./Middlewares/Third_Party/LwIP/src/core/timeouts.cyclo ./Middlewares/Third_Party/LwIP/src/core/timeouts.d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o ./Middlewares/Third_Party/LwIP/src/core/timeouts.su ./Middlewares/Third_Party/LwIP/src/core/udp.cyclo ./Middlewares/Third_Party/LwIP/src/core/udp.d ./Middlewares/Third_Party/LwIP/src/core/udp.o ./Middlewares/Third_Party/LwIP/src/core/udp.su - -.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core - +./Middlewares/Third_Party/LwIP/src/core/udp.o + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/LwIP/src/core/%.o Middlewares/Third_Party/LwIP/src/core/%.su Middlewares/Third_Party/LwIP/src/core/%.cyclo: ../Middlewares/Third_Party/LwIP/src/core/%.c Middlewares/Third_Party/LwIP/src/core/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core + +clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core: + -$(RM) ./Middlewares/Third_Party/LwIP/src/core/def.cyclo ./Middlewares/Third_Party/LwIP/src/core/def.d ./Middlewares/Third_Party/LwIP/src/core/def.o ./Middlewares/Third_Party/LwIP/src/core/def.su ./Middlewares/Third_Party/LwIP/src/core/dns.cyclo ./Middlewares/Third_Party/LwIP/src/core/dns.d ./Middlewares/Third_Party/LwIP/src/core/dns.o ./Middlewares/Third_Party/LwIP/src/core/dns.su ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.cyclo ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.d ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o ./Middlewares/Third_Party/LwIP/src/core/inet_chksum.su ./Middlewares/Third_Party/LwIP/src/core/init.cyclo ./Middlewares/Third_Party/LwIP/src/core/init.d ./Middlewares/Third_Party/LwIP/src/core/init.o ./Middlewares/Third_Party/LwIP/src/core/init.su ./Middlewares/Third_Party/LwIP/src/core/ip.cyclo ./Middlewares/Third_Party/LwIP/src/core/ip.d ./Middlewares/Third_Party/LwIP/src/core/ip.o ./Middlewares/Third_Party/LwIP/src/core/ip.su ./Middlewares/Third_Party/LwIP/src/core/mem.cyclo ./Middlewares/Third_Party/LwIP/src/core/mem.d ./Middlewares/Third_Party/LwIP/src/core/mem.o ./Middlewares/Third_Party/LwIP/src/core/mem.su ./Middlewares/Third_Party/LwIP/src/core/memp.cyclo ./Middlewares/Third_Party/LwIP/src/core/memp.d ./Middlewares/Third_Party/LwIP/src/core/memp.o ./Middlewares/Third_Party/LwIP/src/core/memp.su ./Middlewares/Third_Party/LwIP/src/core/netif.cyclo ./Middlewares/Third_Party/LwIP/src/core/netif.d ./Middlewares/Third_Party/LwIP/src/core/netif.o ./Middlewares/Third_Party/LwIP/src/core/netif.su ./Middlewares/Third_Party/LwIP/src/core/pbuf.cyclo ./Middlewares/Third_Party/LwIP/src/core/pbuf.d ./Middlewares/Third_Party/LwIP/src/core/pbuf.o ./Middlewares/Third_Party/LwIP/src/core/pbuf.su ./Middlewares/Third_Party/LwIP/src/core/raw.cyclo ./Middlewares/Third_Party/LwIP/src/core/raw.d ./Middlewares/Third_Party/LwIP/src/core/raw.o ./Middlewares/Third_Party/LwIP/src/core/raw.su ./Middlewares/Third_Party/LwIP/src/core/stats.cyclo ./Middlewares/Third_Party/LwIP/src/core/stats.d ./Middlewares/Third_Party/LwIP/src/core/stats.o ./Middlewares/Third_Party/LwIP/src/core/stats.su ./Middlewares/Third_Party/LwIP/src/core/sys.cyclo ./Middlewares/Third_Party/LwIP/src/core/sys.d ./Middlewares/Third_Party/LwIP/src/core/sys.o ./Middlewares/Third_Party/LwIP/src/core/sys.su ./Middlewares/Third_Party/LwIP/src/core/tcp.cyclo ./Middlewares/Third_Party/LwIP/src/core/tcp.d ./Middlewares/Third_Party/LwIP/src/core/tcp.o ./Middlewares/Third_Party/LwIP/src/core/tcp.su ./Middlewares/Third_Party/LwIP/src/core/tcp_in.cyclo ./Middlewares/Third_Party/LwIP/src/core/tcp_in.d ./Middlewares/Third_Party/LwIP/src/core/tcp_in.o ./Middlewares/Third_Party/LwIP/src/core/tcp_in.su ./Middlewares/Third_Party/LwIP/src/core/tcp_out.cyclo ./Middlewares/Third_Party/LwIP/src/core/tcp_out.d ./Middlewares/Third_Party/LwIP/src/core/tcp_out.o ./Middlewares/Third_Party/LwIP/src/core/tcp_out.su ./Middlewares/Third_Party/LwIP/src/core/timeouts.cyclo ./Middlewares/Third_Party/LwIP/src/core/timeouts.d ./Middlewares/Third_Party/LwIP/src/core/timeouts.o ./Middlewares/Third_Party/LwIP/src/core/timeouts.su ./Middlewares/Third_Party/LwIP/src/core/udp.cyclo ./Middlewares/Third_Party/LwIP/src/core/udp.d ./Middlewares/Third_Party/LwIP/src/core/udp.o ./Middlewares/Third_Party/LwIP/src/core/udp.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-core + diff --git a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk index 385a8e7..a90eec4 100644 --- a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/netif/ppp/auth.c \ ../Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.c \ @@ -29,8 +29,8 @@ C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.c \ ../Middlewares/Third_Party/LwIP/src/netif/ppp/upap.c \ ../Middlewares/Third_Party/LwIP/src/netif/ppp/utils.c \ -../Middlewares/Third_Party/LwIP/src/netif/ppp/vj.c - +../Middlewares/Third_Party/LwIP/src/netif/ppp/vj.c + C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.d \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.d \ @@ -56,8 +56,8 @@ C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.d \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.d \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.d \ -./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.d - +./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.d + OBJS += \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o \ @@ -83,17 +83,17 @@ OBJS += \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o \ ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o \ -./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o - - -# Each subdirectory must supply rules for building sources it contributes -Middlewares/Third_Party/LwIP/src/netif/ppp/%.o Middlewares/Third_Party/LwIP/src/netif/ppp/%.su Middlewares/Third_Party/LwIP/src/netif/ppp/%.cyclo: ../Middlewares/Third_Party/LwIP/src/netif/ppp/%.c Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif-2f-ppp - -clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif-2f-ppp: - -$(RM) ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.su - -.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif-2f-ppp - +./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/LwIP/src/netif/ppp/%.o Middlewares/Third_Party/LwIP/src/netif/ppp/%.su Middlewares/Third_Party/LwIP/src/netif/ppp/%.cyclo: ../Middlewares/Third_Party/LwIP/src/netif/ppp/%.c Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif-2f-ppp + +clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif-2f-ppp: + -$(RM) ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.su ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.d ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o ./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif-2f-ppp + diff --git a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/subdir.mk b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/subdir.mk index 45c3b70..61ffbbd 100644 --- a/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/subdir.mk +++ b/STM32_Nucleo207ZG/Debug/Middlewares/Third_Party/LwIP/src/netif/subdir.mk @@ -1,33 +1,33 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../Middlewares/Third_Party/LwIP/src/netif/ethernet.c \ ../Middlewares/Third_Party/LwIP/src/netif/lowpan6.c \ -../Middlewares/Third_Party/LwIP/src/netif/slipif.c - +../Middlewares/Third_Party/LwIP/src/netif/slipif.c + C_DEPS += \ ./Middlewares/Third_Party/LwIP/src/netif/ethernet.d \ ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.d \ -./Middlewares/Third_Party/LwIP/src/netif/slipif.d - +./Middlewares/Third_Party/LwIP/src/netif/slipif.d + OBJS += \ ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o \ ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o \ -./Middlewares/Third_Party/LwIP/src/netif/slipif.o - - -# Each subdirectory must supply rules for building sources it contributes -Middlewares/Third_Party/LwIP/src/netif/%.o Middlewares/Third_Party/LwIP/src/netif/%.su Middlewares/Third_Party/LwIP/src/netif/%.cyclo: ../Middlewares/Third_Party/LwIP/src/netif/%.c Middlewares/Third_Party/LwIP/src/netif/subdir.mk - arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" - -clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif - -clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif: - -$(RM) ./Middlewares/Third_Party/LwIP/src/netif/ethernet.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ethernet.d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o ./Middlewares/Third_Party/LwIP/src/netif/ethernet.su ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.cyclo ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.su ./Middlewares/Third_Party/LwIP/src/netif/slipif.cyclo ./Middlewares/Third_Party/LwIP/src/netif/slipif.d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o ./Middlewares/Third_Party/LwIP/src/netif/slipif.su - -.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif - +./Middlewares/Third_Party/LwIP/src/netif/slipif.o + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/Third_Party/LwIP/src/netif/%.o Middlewares/Third_Party/LwIP/src/netif/%.su Middlewares/Third_Party/LwIP/src/netif/%.cyclo: ../Middlewares/Third_Party/LwIP/src/netif/%.c Middlewares/Third_Party/LwIP/src/netif/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F207xx -c -I../Core/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc -I../Drivers/STM32F2xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F2xx/Include -I../Drivers/CMSIS/Include -I../LWIP/App -I../LWIP/Target -I../Middlewares/Third_Party/LwIP/src/include -I../Middlewares/Third_Party/LwIP/system -I../Middlewares/Third_Party/LwIP/src/include/netif/ppp -I../Middlewares/Third_Party/LwIP/src/include/lwip -I../Middlewares/Third_Party/LwIP/src/include/lwip/apps -I../Middlewares/Third_Party/LwIP/src/include/lwip/priv -I../Middlewares/Third_Party/LwIP/src/include/lwip/prot -I../Middlewares/Third_Party/LwIP/src/include/netif -I../Middlewares/Third_Party/LwIP/src/include/posix -I../Middlewares/Third_Party/LwIP/src/include/posix/sys -I../Middlewares/Third_Party/LwIP/system/arch -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfloat-abi=soft -mthumb -o "$@" + +clean: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif + +clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif: + -$(RM) ./Middlewares/Third_Party/LwIP/src/netif/ethernet.cyclo ./Middlewares/Third_Party/LwIP/src/netif/ethernet.d ./Middlewares/Third_Party/LwIP/src/netif/ethernet.o ./Middlewares/Third_Party/LwIP/src/netif/ethernet.su ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.cyclo ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.d ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o ./Middlewares/Third_Party/LwIP/src/netif/lowpan6.su ./Middlewares/Third_Party/LwIP/src/netif/slipif.cyclo ./Middlewares/Third_Party/LwIP/src/netif/slipif.d ./Middlewares/Third_Party/LwIP/src/netif/slipif.o ./Middlewares/Third_Party/LwIP/src/netif/slipif.su + +.PHONY: clean-Middlewares-2f-Third_Party-2f-LwIP-2f-src-2f-netif + diff --git a/STM32_Nucleo207ZG/Debug/makefile b/STM32_Nucleo207ZG/Debug/makefile index 1a9fb73..2a4ccf5 100644 --- a/STM32_Nucleo207ZG/Debug/makefile +++ b/STM32_Nucleo207ZG/Debug/makefile @@ -1,118 +1,118 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - --include ../makefile.init - -RM := rm -rf - -# All of the sources participating in the build are defined here --include sources.mk --include Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk --include Middlewares/Third_Party/LwIP/src/netif/subdir.mk --include Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk --include Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk --include Middlewares/Third_Party/LwIP/src/core/subdir.mk --include Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk --include Middlewares/Third_Party/LwIP/src/api/subdir.mk --include LWIP/Target/subdir.mk --include LWIP/App/subdir.mk --include Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk --include Core/Startup/subdir.mk --include Core/Src/subdir.mk --include objects.mk - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(CC_DEPS)),) --include $(CC_DEPS) -endif -ifneq ($(strip $(C++_DEPS)),) --include $(C++_DEPS) -endif -ifneq ($(strip $(C_UPPER_DEPS)),) --include $(C_UPPER_DEPS) -endif -ifneq ($(strip $(CXX_DEPS)),) --include $(CXX_DEPS) -endif -ifneq ($(strip $(S_DEPS)),) --include $(S_DEPS) -endif -ifneq ($(strip $(S_UPPER_DEPS)),) --include $(S_UPPER_DEPS) -endif -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) -endif -ifneq ($(strip $(CPP_DEPS)),) --include $(CPP_DEPS) -endif -endif - --include ../makefile.defs - +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +-include ../makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include Middlewares/Third_Party/LwIP/src/netif/ppp/subdir.mk +-include Middlewares/Third_Party/LwIP/src/netif/subdir.mk +-include Middlewares/Third_Party/LwIP/src/core/ipv6/subdir.mk +-include Middlewares/Third_Party/LwIP/src/core/ipv4/subdir.mk +-include Middlewares/Third_Party/LwIP/src/core/subdir.mk +-include Middlewares/Third_Party/LwIP/src/apps/mqtt/subdir.mk +-include Middlewares/Third_Party/LwIP/src/api/subdir.mk +-include LWIP/Target/subdir.mk +-include LWIP/App/subdir.mk +-include Drivers/STM32F2xx_HAL_Driver/Src/subdir.mk +-include Core/Startup/subdir.mk +-include Core/Src/subdir.mk +-include objects.mk + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(CC_DEPS)),) +-include $(CC_DEPS) +endif +ifneq ($(strip $(C++_DEPS)),) +-include $(C++_DEPS) +endif +ifneq ($(strip $(C_UPPER_DEPS)),) +-include $(C_UPPER_DEPS) +endif +ifneq ($(strip $(CXX_DEPS)),) +-include $(CXX_DEPS) +endif +ifneq ($(strip $(S_DEPS)),) +-include $(S_DEPS) +endif +ifneq ($(strip $(S_UPPER_DEPS)),) +-include $(S_UPPER_DEPS) +endif +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +ifneq ($(strip $(CPP_DEPS)),) +-include $(CPP_DEPS) +endif +endif + +-include ../makefile.defs + OPTIONAL_TOOL_DEPS := \ $(wildcard ../makefile.defs) \ $(wildcard ../makefile.init) \ $(wildcard ../makefile.targets) \ - - -BUILD_ARTIFACT_NAME := LightControlConvi_Nucleo207ZG -BUILD_ARTIFACT_EXTENSION := elf -BUILD_ARTIFACT_PREFIX := -BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),) - -# Add inputs and outputs from these tool invocations to the build variables + + +BUILD_ARTIFACT_NAME := LightControlConvi_Nucleo207ZG +BUILD_ARTIFACT_EXTENSION := elf +BUILD_ARTIFACT_PREFIX := +BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),) + +# Add inputs and outputs from these tool invocations to the build variables EXECUTABLES += \ LightControlConvi_Nucleo207ZG.elf \ - + MAP_FILES += \ LightControlConvi_Nucleo207ZG.map \ - + SIZE_OUTPUT += \ default.size.stdout \ - + OBJDUMP_LIST += \ LightControlConvi_Nucleo207ZG.list \ - - -# All Target -all: main-build - -# Main-build Target -main-build: LightControlConvi_Nucleo207ZG.elf secondary-outputs - -# Tool invocations -LightControlConvi_Nucleo207ZG.elf LightControlConvi_Nucleo207ZG.map: $(OBJS) $(USER_OBJS) C:\Users\savard\Documents\perso\Dev\electrolab\lightcontrolconvi_sw\STM32_Nucleo207ZG\STM32F207ZGTX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS) - arm-none-eabi-g++ -o "LightControlConvi_Nucleo207ZG.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m3 -T"C:\Users\savard\Documents\perso\Dev\electrolab\lightcontrolconvi_sw\STM32_Nucleo207ZG\STM32F207ZGTX_FLASH.ld" -Wl,-Map="LightControlConvi_Nucleo207ZG.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group - @echo 'Finished building target: $@' - @echo ' ' - -default.size.stdout: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) - arm-none-eabi-size $(EXECUTABLES) - @echo 'Finished building: $@' - @echo ' ' - -LightControlConvi_Nucleo207ZG.list: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) - arm-none-eabi-objdump -h -S $(EXECUTABLES) > "LightControlConvi_Nucleo207ZG.list" - @echo 'Finished building: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) LightControlConvi_Nucleo207ZG.elf LightControlConvi_Nucleo207ZG.list LightControlConvi_Nucleo207ZG.map default.size.stdout - -@echo ' ' - -secondary-outputs: $(SIZE_OUTPUT) $(OBJDUMP_LIST) - -fail-specified-linker-script-missing: - @echo 'Error: Cannot find the specified linker script. Check the linker settings in the build configuration.' - @exit 2 - -warn-no-linker-script-specified: - @echo 'Warning: No linker script specified. Check the linker settings in the build configuration.' - -.PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified - --include ../makefile.targets + + +# All Target +all: main-build + +# Main-build Target +main-build: LightControlConvi_Nucleo207ZG.elf secondary-outputs + +# Tool invocations +LightControlConvi_Nucleo207ZG.elf LightControlConvi_Nucleo207ZG.map: $(OBJS) $(USER_OBJS) C:\Users\kiatoo\Documents\dev\electrolab\lightcontrolconvi_sw\STM32_Nucleo207ZG\STM32F207ZGTX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-g++ -o "LightControlConvi_Nucleo207ZG.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m3 -T"C:\Users\kiatoo\Documents\dev\electrolab\lightcontrolconvi_sw\STM32_Nucleo207ZG\STM32F207ZGTX_FLASH.ld" -Wl,-Map="LightControlConvi_Nucleo207ZG.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group + @echo 'Finished building target: $@' + @echo ' ' + +default.size.stdout: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-size $(EXECUTABLES) + @echo 'Finished building: $@' + @echo ' ' + +LightControlConvi_Nucleo207ZG.list: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-objdump -h -S $(EXECUTABLES) > "LightControlConvi_Nucleo207ZG.list" + @echo 'Finished building: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) LightControlConvi_Nucleo207ZG.elf LightControlConvi_Nucleo207ZG.list LightControlConvi_Nucleo207ZG.map default.size.stdout + -@echo ' ' + +secondary-outputs: $(SIZE_OUTPUT) $(OBJDUMP_LIST) + +fail-specified-linker-script-missing: + @echo 'Error: Cannot find the specified linker script. Check the linker settings in the build configuration.' + @exit 2 + +warn-no-linker-script-specified: + @echo 'Warning: No linker script specified. Check the linker settings in the build configuration.' + +.PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified + +-include ../makefile.targets diff --git a/STM32_Nucleo207ZG/Debug/objects.list b/STM32_Nucleo207ZG/Debug/objects.list index f619b18..91fa3bb 100644 --- a/STM32_Nucleo207ZG/Debug/objects.list +++ b/STM32_Nucleo207ZG/Debug/objects.list @@ -1,99 +1,99 @@ -"./Core/Src/main.o" -"./Core/Src/stm32f2xx_hal_msp.o" -"./Core/Src/stm32f2xx_it.o" -"./Core/Src/syscalls.o" -"./Core/Src/sysmem.o" -"./Core/Src/system_stm32f2xx.o" -"./Core/Startup/startup_stm32f207zgtx.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o" -"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o" -"./LWIP/App/lwip.o" -"./LWIP/Target/ethernetif.o" -"./Middlewares/Third_Party/LwIP/src/api/api_lib.o" -"./Middlewares/Third_Party/LwIP/src/api/api_msg.o" -"./Middlewares/Third_Party/LwIP/src/api/err.o" -"./Middlewares/Third_Party/LwIP/src/api/netbuf.o" -"./Middlewares/Third_Party/LwIP/src/api/netdb.o" -"./Middlewares/Third_Party/LwIP/src/api/netifapi.o" -"./Middlewares/Third_Party/LwIP/src/api/sockets.o" -"./Middlewares/Third_Party/LwIP/src/api/tcpip.o" -"./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o" -"./Middlewares/Third_Party/LwIP/src/core/def.o" -"./Middlewares/Third_Party/LwIP/src/core/dns.o" -"./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o" -"./Middlewares/Third_Party/LwIP/src/core/init.o" -"./Middlewares/Third_Party/LwIP/src/core/ip.o" -"./Middlewares/Third_Party/LwIP/src/core/mem.o" -"./Middlewares/Third_Party/LwIP/src/core/memp.o" -"./Middlewares/Third_Party/LwIP/src/core/netif.o" -"./Middlewares/Third_Party/LwIP/src/core/pbuf.o" -"./Middlewares/Third_Party/LwIP/src/core/raw.o" -"./Middlewares/Third_Party/LwIP/src/core/stats.o" -"./Middlewares/Third_Party/LwIP/src/core/sys.o" -"./Middlewares/Third_Party/LwIP/src/core/tcp.o" -"./Middlewares/Third_Party/LwIP/src/core/tcp_in.o" -"./Middlewares/Third_Party/LwIP/src/core/tcp_out.o" -"./Middlewares/Third_Party/LwIP/src/core/timeouts.o" -"./Middlewares/Third_Party/LwIP/src/core/udp.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o" -"./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o" -"./Middlewares/Third_Party/LwIP/src/netif/ethernet.o" -"./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o" -"./Middlewares/Third_Party/LwIP/src/netif/slipif.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o" -"./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o" +"./Core/Src/main.o" +"./Core/Src/stm32f2xx_hal_msp.o" +"./Core/Src/stm32f2xx_it.o" +"./Core/Src/syscalls.o" +"./Core/Src/sysmem.o" +"./Core/Src/system_stm32f2xx.o" +"./Core/Startup/startup_stm32f207zgtx.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_cortex.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_dma_ex.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_eth.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_exti.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_flash_ex.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_gpio.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pcd_ex.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_pwr_ex.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_rcc_ex.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_tim_ex.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_hal_uart.o" +"./Drivers/STM32F2xx_HAL_Driver/Src/stm32f2xx_ll_usb.o" +"./LWIP/App/lwip.o" +"./LWIP/Target/ethernetif.o" +"./Middlewares/Third_Party/LwIP/src/api/api_lib.o" +"./Middlewares/Third_Party/LwIP/src/api/api_msg.o" +"./Middlewares/Third_Party/LwIP/src/api/err.o" +"./Middlewares/Third_Party/LwIP/src/api/netbuf.o" +"./Middlewares/Third_Party/LwIP/src/api/netdb.o" +"./Middlewares/Third_Party/LwIP/src/api/netifapi.o" +"./Middlewares/Third_Party/LwIP/src/api/sockets.o" +"./Middlewares/Third_Party/LwIP/src/api/tcpip.o" +"./Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.o" +"./Middlewares/Third_Party/LwIP/src/core/def.o" +"./Middlewares/Third_Party/LwIP/src/core/dns.o" +"./Middlewares/Third_Party/LwIP/src/core/inet_chksum.o" +"./Middlewares/Third_Party/LwIP/src/core/init.o" +"./Middlewares/Third_Party/LwIP/src/core/ip.o" +"./Middlewares/Third_Party/LwIP/src/core/mem.o" +"./Middlewares/Third_Party/LwIP/src/core/memp.o" +"./Middlewares/Third_Party/LwIP/src/core/netif.o" +"./Middlewares/Third_Party/LwIP/src/core/pbuf.o" +"./Middlewares/Third_Party/LwIP/src/core/raw.o" +"./Middlewares/Third_Party/LwIP/src/core/stats.o" +"./Middlewares/Third_Party/LwIP/src/core/sys.o" +"./Middlewares/Third_Party/LwIP/src/core/tcp.o" +"./Middlewares/Third_Party/LwIP/src/core/tcp_in.o" +"./Middlewares/Third_Party/LwIP/src/core/tcp_out.o" +"./Middlewares/Third_Party/LwIP/src/core/timeouts.o" +"./Middlewares/Third_Party/LwIP/src/core/udp.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.o" +"./Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.o" +"./Middlewares/Third_Party/LwIP/src/netif/ethernet.o" +"./Middlewares/Third_Party/LwIP/src/netif/lowpan6.o" +"./Middlewares/Third_Party/LwIP/src/netif/slipif.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/auth.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/demand.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/eap.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/magic.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/mppe.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/upap.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/utils.o" +"./Middlewares/Third_Party/LwIP/src/netif/ppp/vj.o" diff --git a/STM32_Nucleo207ZG/Debug/objects.mk b/STM32_Nucleo207ZG/Debug/objects.mk index 820854b..5e6c2bd 100644 --- a/STM32_Nucleo207ZG/Debug/objects.mk +++ b/STM32_Nucleo207ZG/Debug/objects.mk @@ -1,9 +1,9 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -USER_OBJS := - -LIBS := - +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +USER_OBJS := + +LIBS := + diff --git a/STM32_Nucleo207ZG/Debug/sources.mk b/STM32_Nucleo207ZG/Debug/sources.mk index 456869d..a7971df 100644 --- a/STM32_Nucleo207ZG/Debug/sources.mk +++ b/STM32_Nucleo207ZG/Debug/sources.mk @@ -1,36 +1,36 @@ -################################################################################ -# Automatically-generated file. Do not edit! -# Toolchain: GNU Tools for STM32 (11.3.rel1) -################################################################################ - -ELF_SRCS := -C_UPPER_SRCS := -CXX_SRCS := -C++_SRCS := -OBJ_SRCS := -S_SRCS := -CC_SRCS := -C_SRCS := -CPP_SRCS := -S_UPPER_SRCS := -O_SRCS := -CYCLO_FILES := -OBJDUMP_LIST := -C_UPPER_DEPS := -S_DEPS := -C_DEPS := -CC_DEPS := -SIZE_OUTPUT := -C++_DEPS := -SU_FILES := -EXECUTABLES := -OBJS := -CXX_DEPS := -MAP_FILES := -S_UPPER_DEPS := -CPP_DEPS := - -# Every subdirectory with source files must be described here +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (11.3.rel1) +################################################################################ + +ELF_SRCS := +C_UPPER_SRCS := +CXX_SRCS := +C++_SRCS := +OBJ_SRCS := +S_SRCS := +CC_SRCS := +C_SRCS := +CPP_SRCS := +S_UPPER_SRCS := +O_SRCS := +CYCLO_FILES := +OBJDUMP_LIST := +C_UPPER_DEPS := +S_DEPS := +C_DEPS := +CC_DEPS := +SIZE_OUTPUT := +C++_DEPS := +SU_FILES := +EXECUTABLES := +OBJS := +CXX_DEPS := +MAP_FILES := +S_UPPER_DEPS := +CPP_DEPS := + +# Every subdirectory with source files must be described here SUBDIRS := \ Core/Src \ Core/Startup \ @@ -44,4 +44,4 @@ Middlewares/Third_Party/LwIP/src/core/ipv4 \ Middlewares/Third_Party/LwIP/src/core/ipv6 \ Middlewares/Third_Party/LwIP/src/netif \ Middlewares/Third_Party/LwIP/src/netif/ppp \ - + diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armcc.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armcc.h index 4d9d064..7d751fb 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armcc.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armcc.h @@ -1,865 +1,865 @@ -/**************************************************************************//** - * @file cmsis_armcc.h - * @brief CMSIS compiler ARMCC (Arm Compiler 5) header file - * @version V5.0.4 - * @date 10. January 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __CMSIS_ARMCC_H -#define __CMSIS_ARMCC_H - - -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677) - #error "Please use Arm Compiler Toolchain V4.0.677 or later!" -#endif - -/* CMSIS compiler control architecture macros */ -#if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \ - (defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) ) - #define __ARM_ARCH_6M__ 1 -#endif - -#if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1)) - #define __ARM_ARCH_7M__ 1 -#endif - -#if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1)) - #define __ARM_ARCH_7EM__ 1 -#endif - - /* __ARM_ARCH_8M_BASE__ not applicable */ - /* __ARM_ARCH_8M_MAIN__ not applicable */ - - -/* CMSIS compiler specific defines */ -#ifndef __ASM - #define __ASM __asm -#endif -#ifndef __INLINE - #define __INLINE __inline -#endif -#ifndef __STATIC_INLINE - #define __STATIC_INLINE static __inline -#endif -#ifndef __STATIC_FORCEINLINE - #define __STATIC_FORCEINLINE static __forceinline -#endif -#ifndef __NO_RETURN - #define __NO_RETURN __declspec(noreturn) -#endif -#ifndef __USED - #define __USED __attribute__((used)) -#endif -#ifndef __WEAK - #define __WEAK __attribute__((weak)) -#endif -#ifndef __PACKED - #define __PACKED __attribute__((packed)) -#endif -#ifndef __PACKED_STRUCT - #define __PACKED_STRUCT __packed struct -#endif -#ifndef __PACKED_UNION - #define __PACKED_UNION __packed union -#endif -#ifndef __UNALIGNED_UINT32 /* deprecated */ - #define __UNALIGNED_UINT32(x) (*((__packed uint32_t *)(x))) -#endif -#ifndef __UNALIGNED_UINT16_WRITE - #define __UNALIGNED_UINT16_WRITE(addr, val) ((*((__packed uint16_t *)(addr))) = (val)) -#endif -#ifndef __UNALIGNED_UINT16_READ - #define __UNALIGNED_UINT16_READ(addr) (*((const __packed uint16_t *)(addr))) -#endif -#ifndef __UNALIGNED_UINT32_WRITE - #define __UNALIGNED_UINT32_WRITE(addr, val) ((*((__packed uint32_t *)(addr))) = (val)) -#endif -#ifndef __UNALIGNED_UINT32_READ - #define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr))) -#endif -#ifndef __ALIGNED - #define __ALIGNED(x) __attribute__((aligned(x))) -#endif -#ifndef __RESTRICT - #define __RESTRICT __restrict -#endif - -/* ########################### Core Function Access ########################### */ -/** \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions - @{ - */ - -/** - \brief Enable IRQ Interrupts - \details Enables IRQ interrupts by clearing the I-bit in the CPSR. - Can only be executed in Privileged modes. - */ -/* intrinsic void __enable_irq(); */ - - -/** - \brief Disable IRQ Interrupts - \details Disables IRQ interrupts by setting the I-bit in the CPSR. - Can only be executed in Privileged modes. - */ -/* intrinsic void __disable_irq(); */ - -/** - \brief Get Control Register - \details Returns the content of the Control Register. - \return Control Register value - */ -__STATIC_INLINE uint32_t __get_CONTROL(void) -{ - register uint32_t __regControl __ASM("control"); - return(__regControl); -} - - -/** - \brief Set Control Register - \details Writes the given value to the Control Register. - \param [in] control Control Register value to set - */ -__STATIC_INLINE void __set_CONTROL(uint32_t control) -{ - register uint32_t __regControl __ASM("control"); - __regControl = control; -} - - -/** - \brief Get IPSR Register - \details Returns the content of the IPSR Register. - \return IPSR Register value - */ -__STATIC_INLINE uint32_t __get_IPSR(void) -{ - register uint32_t __regIPSR __ASM("ipsr"); - return(__regIPSR); -} - - -/** - \brief Get APSR Register - \details Returns the content of the APSR Register. - \return APSR Register value - */ -__STATIC_INLINE uint32_t __get_APSR(void) -{ - register uint32_t __regAPSR __ASM("apsr"); - return(__regAPSR); -} - - -/** - \brief Get xPSR Register - \details Returns the content of the xPSR Register. - \return xPSR Register value - */ -__STATIC_INLINE uint32_t __get_xPSR(void) -{ - register uint32_t __regXPSR __ASM("xpsr"); - return(__regXPSR); -} - - -/** - \brief Get Process Stack Pointer - \details Returns the current value of the Process Stack Pointer (PSP). - \return PSP Register value - */ -__STATIC_INLINE uint32_t __get_PSP(void) -{ - register uint32_t __regProcessStackPointer __ASM("psp"); - return(__regProcessStackPointer); -} - - -/** - \brief Set Process Stack Pointer - \details Assigns the given value to the Process Stack Pointer (PSP). - \param [in] topOfProcStack Process Stack Pointer value to set - */ -__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack) -{ - register uint32_t __regProcessStackPointer __ASM("psp"); - __regProcessStackPointer = topOfProcStack; -} - - -/** - \brief Get Main Stack Pointer - \details Returns the current value of the Main Stack Pointer (MSP). - \return MSP Register value - */ -__STATIC_INLINE uint32_t __get_MSP(void) -{ - register uint32_t __regMainStackPointer __ASM("msp"); - return(__regMainStackPointer); -} - - -/** - \brief Set Main Stack Pointer - \details Assigns the given value to the Main Stack Pointer (MSP). - \param [in] topOfMainStack Main Stack Pointer value to set - */ -__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack) -{ - register uint32_t __regMainStackPointer __ASM("msp"); - __regMainStackPointer = topOfMainStack; -} - - -/** - \brief Get Priority Mask - \details Returns the current state of the priority mask bit from the Priority Mask Register. - \return Priority Mask value - */ -__STATIC_INLINE uint32_t __get_PRIMASK(void) -{ - register uint32_t __regPriMask __ASM("primask"); - return(__regPriMask); -} - - -/** - \brief Set Priority Mask - \details Assigns the given value to the Priority Mask Register. - \param [in] priMask Priority Mask - */ -__STATIC_INLINE void __set_PRIMASK(uint32_t priMask) -{ - register uint32_t __regPriMask __ASM("primask"); - __regPriMask = (priMask); -} - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) - -/** - \brief Enable FIQ - \details Enables FIQ interrupts by clearing the F-bit in the CPSR. - Can only be executed in Privileged modes. - */ -#define __enable_fault_irq __enable_fiq - - -/** - \brief Disable FIQ - \details Disables FIQ interrupts by setting the F-bit in the CPSR. - Can only be executed in Privileged modes. - */ -#define __disable_fault_irq __disable_fiq - - -/** - \brief Get Base Priority - \details Returns the current value of the Base Priority register. - \return Base Priority register value - */ -__STATIC_INLINE uint32_t __get_BASEPRI(void) -{ - register uint32_t __regBasePri __ASM("basepri"); - return(__regBasePri); -} - - -/** - \brief Set Base Priority - \details Assigns the given value to the Base Priority register. - \param [in] basePri Base Priority value to set - */ -__STATIC_INLINE void __set_BASEPRI(uint32_t basePri) -{ - register uint32_t __regBasePri __ASM("basepri"); - __regBasePri = (basePri & 0xFFU); -} - - -/** - \brief Set Base Priority with condition - \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, - or the new value increases the BASEPRI priority level. - \param [in] basePri Base Priority value to set - */ -__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri) -{ - register uint32_t __regBasePriMax __ASM("basepri_max"); - __regBasePriMax = (basePri & 0xFFU); -} - - -/** - \brief Get Fault Mask - \details Returns the current value of the Fault Mask register. - \return Fault Mask register value - */ -__STATIC_INLINE uint32_t __get_FAULTMASK(void) -{ - register uint32_t __regFaultMask __ASM("faultmask"); - return(__regFaultMask); -} - - -/** - \brief Set Fault Mask - \details Assigns the given value to the Fault Mask register. - \param [in] faultMask Fault Mask value to set - */ -__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask) -{ - register uint32_t __regFaultMask __ASM("faultmask"); - __regFaultMask = (faultMask & (uint32_t)1U); -} - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ - - -/** - \brief Get FPSCR - \details Returns the current value of the Floating Point Status/Control register. - \return Floating Point Status/Control register value - */ -__STATIC_INLINE uint32_t __get_FPSCR(void) -{ -#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) - register uint32_t __regfpscr __ASM("fpscr"); - return(__regfpscr); -#else - return(0U); -#endif -} - - -/** - \brief Set FPSCR - \details Assigns the given value to the Floating Point Status/Control register. - \param [in] fpscr Floating Point Status/Control value to set - */ -__STATIC_INLINE void __set_FPSCR(uint32_t fpscr) -{ -#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) - register uint32_t __regfpscr __ASM("fpscr"); - __regfpscr = (fpscr); -#else - (void)fpscr; -#endif -} - - -/*@} end of CMSIS_Core_RegAccFunctions */ - - -/* ########################## Core Instruction Access ######################### */ -/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface - Access to dedicated instructions - @{ -*/ - -/** - \brief No Operation - \details No Operation does nothing. This instruction can be used for code alignment purposes. - */ -#define __NOP __nop - - -/** - \brief Wait For Interrupt - \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. - */ -#define __WFI __wfi - - -/** - \brief Wait For Event - \details Wait For Event is a hint instruction that permits the processor to enter - a low-power state until one of a number of events occurs. - */ -#define __WFE __wfe - - -/** - \brief Send Event - \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. - */ -#define __SEV __sev - - -/** - \brief Instruction Synchronization Barrier - \details Instruction Synchronization Barrier flushes the pipeline in the processor, - so that all instructions following the ISB are fetched from cache or memory, - after the instruction has been completed. - */ -#define __ISB() do {\ - __schedule_barrier();\ - __isb(0xF);\ - __schedule_barrier();\ - } while (0U) - -/** - \brief Data Synchronization Barrier - \details Acts as a special kind of Data Memory Barrier. - It completes when all explicit memory accesses before this instruction complete. - */ -#define __DSB() do {\ - __schedule_barrier();\ - __dsb(0xF);\ - __schedule_barrier();\ - } while (0U) - -/** - \brief Data Memory Barrier - \details Ensures the apparent order of the explicit memory operations before - and after the instruction, without ensuring their completion. - */ -#define __DMB() do {\ - __schedule_barrier();\ - __dmb(0xF);\ - __schedule_barrier();\ - } while (0U) - - -/** - \brief Reverse byte order (32 bit) - \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. - \param [in] value Value to reverse - \return Reversed value - */ -#define __REV __rev - - -/** - \brief Reverse byte order (16 bit) - \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. - \param [in] value Value to reverse - \return Reversed value - */ -#ifndef __NO_EMBEDDED_ASM -__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value) -{ - rev16 r0, r0 - bx lr -} -#endif - - -/** - \brief Reverse byte order (16 bit) - \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. - \param [in] value Value to reverse - \return Reversed value - */ -#ifndef __NO_EMBEDDED_ASM -__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int16_t __REVSH(int16_t value) -{ - revsh r0, r0 - bx lr -} -#endif - - -/** - \brief Rotate Right in unsigned value (32 bit) - \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. - \param [in] op1 Value to rotate - \param [in] op2 Number of Bits to rotate - \return Rotated value - */ -#define __ROR __ror - - -/** - \brief Breakpoint - \details Causes the processor to enter Debug state. - Debug tools can use this to investigate system state when the instruction at a particular address is reached. - \param [in] value is ignored by the processor. - If required, a debugger can use it to store additional information about the breakpoint. - */ -#define __BKPT(value) __breakpoint(value) - - -/** - \brief Reverse bit order of value - \details Reverses the bit order of the given value. - \param [in] value Value to reverse - \return Reversed value - */ -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) - #define __RBIT __rbit -#else -__attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value) -{ - uint32_t result; - uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ - - result = value; /* r will be reversed bits of v; first get LSB of v */ - for (value >>= 1U; value != 0U; value >>= 1U) - { - result <<= 1U; - result |= value & 1U; - s--; - } - result <<= s; /* shift when v's highest bits are zero */ - return result; -} -#endif - - -/** - \brief Count leading zeros - \details Counts the number of leading zeros of a data value. - \param [in] value Value to count the leading zeros - \return number of leading zeros in value - */ -#define __CLZ __clz - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) - -/** - \brief LDR Exclusive (8 bit) - \details Executes a exclusive LDR instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) - #define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr)) -#else - #define __LDREXB(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr)) _Pragma("pop") -#endif - - -/** - \brief LDR Exclusive (16 bit) - \details Executes a exclusive LDR instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) - #define __LDREXH(ptr) ((uint16_t) __ldrex(ptr)) -#else - #define __LDREXH(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr)) _Pragma("pop") -#endif - - -/** - \brief LDR Exclusive (32 bit) - \details Executes a exclusive LDR instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) - #define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr)) -#else - #define __LDREXW(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr)) _Pragma("pop") -#endif - - -/** - \brief STR Exclusive (8 bit) - \details Executes a exclusive STR instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) - #define __STREXB(value, ptr) __strex(value, ptr) -#else - #define __STREXB(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") -#endif - - -/** - \brief STR Exclusive (16 bit) - \details Executes a exclusive STR instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) - #define __STREXH(value, ptr) __strex(value, ptr) -#else - #define __STREXH(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") -#endif - - -/** - \brief STR Exclusive (32 bit) - \details Executes a exclusive STR instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) - #define __STREXW(value, ptr) __strex(value, ptr) -#else - #define __STREXW(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") -#endif - - -/** - \brief Remove the exclusive lock - \details Removes the exclusive lock which is created by LDREX. - */ -#define __CLREX __clrex - - -/** - \brief Signed Saturate - \details Saturates a signed value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (1..32) - \return Saturated value - */ -#define __SSAT __ssat - - -/** - \brief Unsigned Saturate - \details Saturates an unsigned value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (0..31) - \return Saturated value - */ -#define __USAT __usat - - -/** - \brief Rotate Right with Extend (32 bit) - \details Moves each bit of a bitstring right by one bit. - The carry input is shifted in at the left end of the bitstring. - \param [in] value Value to rotate - \return Rotated value - */ -#ifndef __NO_EMBEDDED_ASM -__attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value) -{ - rrx r0, r0 - bx lr -} -#endif - - -/** - \brief LDRT Unprivileged (8 bit) - \details Executes a Unprivileged LDRT instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -#define __LDRBT(ptr) ((uint8_t ) __ldrt(ptr)) - - -/** - \brief LDRT Unprivileged (16 bit) - \details Executes a Unprivileged LDRT instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -#define __LDRHT(ptr) ((uint16_t) __ldrt(ptr)) - - -/** - \brief LDRT Unprivileged (32 bit) - \details Executes a Unprivileged LDRT instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -#define __LDRT(ptr) ((uint32_t ) __ldrt(ptr)) - - -/** - \brief STRT Unprivileged (8 bit) - \details Executes a Unprivileged STRT instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -#define __STRBT(value, ptr) __strt(value, ptr) - - -/** - \brief STRT Unprivileged (16 bit) - \details Executes a Unprivileged STRT instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -#define __STRHT(value, ptr) __strt(value, ptr) - - -/** - \brief STRT Unprivileged (32 bit) - \details Executes a Unprivileged STRT instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -#define __STRT(value, ptr) __strt(value, ptr) - -#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ - -/** - \brief Signed Saturate - \details Saturates a signed value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (1..32) - \return Saturated value - */ -__attribute__((always_inline)) __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) -{ - if ((sat >= 1U) && (sat <= 32U)) - { - const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); - const int32_t min = -1 - max ; - if (val > max) - { - return max; - } - else if (val < min) - { - return min; - } - } - return val; -} - -/** - \brief Unsigned Saturate - \details Saturates an unsigned value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (0..31) - \return Saturated value - */ -__attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) -{ - if (sat <= 31U) - { - const uint32_t max = ((1U << sat) - 1U); - if (val > (int32_t)max) - { - return max; - } - else if (val < 0) - { - return 0U; - } - } - return (uint32_t)val; -} - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ - -/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ - - -/* ################### Compiler specific Intrinsics ########################### */ -/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics - Access to dedicated SIMD instructions - @{ -*/ - -#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) - -#define __SADD8 __sadd8 -#define __QADD8 __qadd8 -#define __SHADD8 __shadd8 -#define __UADD8 __uadd8 -#define __UQADD8 __uqadd8 -#define __UHADD8 __uhadd8 -#define __SSUB8 __ssub8 -#define __QSUB8 __qsub8 -#define __SHSUB8 __shsub8 -#define __USUB8 __usub8 -#define __UQSUB8 __uqsub8 -#define __UHSUB8 __uhsub8 -#define __SADD16 __sadd16 -#define __QADD16 __qadd16 -#define __SHADD16 __shadd16 -#define __UADD16 __uadd16 -#define __UQADD16 __uqadd16 -#define __UHADD16 __uhadd16 -#define __SSUB16 __ssub16 -#define __QSUB16 __qsub16 -#define __SHSUB16 __shsub16 -#define __USUB16 __usub16 -#define __UQSUB16 __uqsub16 -#define __UHSUB16 __uhsub16 -#define __SASX __sasx -#define __QASX __qasx -#define __SHASX __shasx -#define __UASX __uasx -#define __UQASX __uqasx -#define __UHASX __uhasx -#define __SSAX __ssax -#define __QSAX __qsax -#define __SHSAX __shsax -#define __USAX __usax -#define __UQSAX __uqsax -#define __UHSAX __uhsax -#define __USAD8 __usad8 -#define __USADA8 __usada8 -#define __SSAT16 __ssat16 -#define __USAT16 __usat16 -#define __UXTB16 __uxtb16 -#define __UXTAB16 __uxtab16 -#define __SXTB16 __sxtb16 -#define __SXTAB16 __sxtab16 -#define __SMUAD __smuad -#define __SMUADX __smuadx -#define __SMLAD __smlad -#define __SMLADX __smladx -#define __SMLALD __smlald -#define __SMLALDX __smlaldx -#define __SMUSD __smusd -#define __SMUSDX __smusdx -#define __SMLSD __smlsd -#define __SMLSDX __smlsdx -#define __SMLSLD __smlsld -#define __SMLSLDX __smlsldx -#define __SEL __sel -#define __QADD __qadd -#define __QSUB __qsub - -#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ - ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) - -#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ - ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) - -#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \ - ((int64_t)(ARG3) << 32U) ) >> 32U)) - -#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ -/*@} end of group CMSIS_SIMD_intrinsics */ - - -#endif /* __CMSIS_ARMCC_H */ +/**************************************************************************//** + * @file cmsis_armcc.h + * @brief CMSIS compiler ARMCC (Arm Compiler 5) header file + * @version V5.0.4 + * @date 10. January 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_ARMCC_H +#define __CMSIS_ARMCC_H + + +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677) + #error "Please use Arm Compiler Toolchain V4.0.677 or later!" +#endif + +/* CMSIS compiler control architecture macros */ +#if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \ + (defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) ) + #define __ARM_ARCH_6M__ 1 +#endif + +#if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1)) + #define __ARM_ARCH_7M__ 1 +#endif + +#if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1)) + #define __ARM_ARCH_7EM__ 1 +#endif + + /* __ARM_ARCH_8M_BASE__ not applicable */ + /* __ARM_ARCH_8M_MAIN__ not applicable */ + + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE static __forceinline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __declspec(noreturn) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed)) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT __packed struct +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION __packed union +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #define __UNALIGNED_UINT32(x) (*((__packed uint32_t *)(x))) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #define __UNALIGNED_UINT16_WRITE(addr, val) ((*((__packed uint16_t *)(addr))) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #define __UNALIGNED_UINT16_READ(addr) (*((const __packed uint16_t *)(addr))) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #define __UNALIGNED_UINT32_WRITE(addr, val) ((*((__packed uint32_t *)(addr))) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr))) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __enable_irq(); */ + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __disable_irq(); */ + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_INLINE uint32_t __get_CONTROL(void) +{ + register uint32_t __regControl __ASM("control"); + return(__regControl); +} + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_INLINE void __set_CONTROL(uint32_t control) +{ + register uint32_t __regControl __ASM("control"); + __regControl = control; +} + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_INLINE uint32_t __get_IPSR(void) +{ + register uint32_t __regIPSR __ASM("ipsr"); + return(__regIPSR); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_INLINE uint32_t __get_APSR(void) +{ + register uint32_t __regAPSR __ASM("apsr"); + return(__regAPSR); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_INLINE uint32_t __get_xPSR(void) +{ + register uint32_t __regXPSR __ASM("xpsr"); + return(__regXPSR); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_INLINE uint32_t __get_PSP(void) +{ + register uint32_t __regProcessStackPointer __ASM("psp"); + return(__regProcessStackPointer); +} + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack) +{ + register uint32_t __regProcessStackPointer __ASM("psp"); + __regProcessStackPointer = topOfProcStack; +} + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_INLINE uint32_t __get_MSP(void) +{ + register uint32_t __regMainStackPointer __ASM("msp"); + return(__regMainStackPointer); +} + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack) +{ + register uint32_t __regMainStackPointer __ASM("msp"); + __regMainStackPointer = topOfMainStack; +} + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_INLINE uint32_t __get_PRIMASK(void) +{ + register uint32_t __regPriMask __ASM("primask"); + return(__regPriMask); +} + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_INLINE void __set_PRIMASK(uint32_t priMask) +{ + register uint32_t __regPriMask __ASM("primask"); + __regPriMask = (priMask); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __enable_fault_irq __enable_fiq + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __disable_fault_irq __disable_fiq + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_INLINE uint32_t __get_BASEPRI(void) +{ + register uint32_t __regBasePri __ASM("basepri"); + return(__regBasePri); +} + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_INLINE void __set_BASEPRI(uint32_t basePri) +{ + register uint32_t __regBasePri __ASM("basepri"); + __regBasePri = (basePri & 0xFFU); +} + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + register uint32_t __regBasePriMax __ASM("basepri_max"); + __regBasePriMax = (basePri & 0xFFU); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_INLINE uint32_t __get_FAULTMASK(void) +{ + register uint32_t __regFaultMask __ASM("faultmask"); + return(__regFaultMask); +} + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask) +{ + register uint32_t __regFaultMask __ASM("faultmask"); + __regFaultMask = (faultMask & (uint32_t)1U); +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +__STATIC_INLINE uint32_t __get_FPSCR(void) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + register uint32_t __regfpscr __ASM("fpscr"); + return(__regfpscr); +#else + return(0U); +#endif +} + + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +__STATIC_INLINE void __set_FPSCR(uint32_t fpscr) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + register uint32_t __regfpscr __ASM("fpscr"); + __regfpscr = (fpscr); +#else + (void)fpscr; +#endif +} + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __nop + + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() do {\ + __schedule_barrier();\ + __isb(0xF);\ + __schedule_barrier();\ + } while (0U) + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() do {\ + __schedule_barrier();\ + __dsb(0xF);\ + __schedule_barrier();\ + } while (0U) + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() do {\ + __schedule_barrier();\ + __dmb(0xF);\ + __schedule_barrier();\ + } while (0U) + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV __rev + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value) +{ + rev16 r0, r0 + bx lr +} +#endif + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int16_t __REVSH(int16_t value) +{ + revsh r0, r0 + bx lr +} +#endif + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +#define __ROR __ror + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __breakpoint(value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + #define __RBIT __rbit +#else +__attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value) +{ + uint32_t result; + uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ + + result = value; /* r will be reversed bits of v; first get LSB of v */ + for (value >>= 1U; value != 0U; value >>= 1U) + { + result <<= 1U; + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ + return result; +} +#endif + + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +#define __CLZ __clz + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr)) +#else + #define __LDREXB(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXH(ptr) ((uint16_t) __ldrex(ptr)) +#else + #define __LDREXH(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr)) +#else + #define __LDREXW(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXB(value, ptr) __strex(value, ptr) +#else + #define __STREXB(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXH(value, ptr) __strex(value, ptr) +#else + #define __STREXH(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXW(value, ptr) __strex(value, ptr) +#else + #define __STREXW(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __clrex + + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value) +{ + rrx r0, r0 + bx lr +} +#endif + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDRBT(ptr) ((uint8_t ) __ldrt(ptr)) + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDRHT(ptr) ((uint16_t) __ldrt(ptr)) + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDRT(ptr) ((uint32_t ) __ldrt(ptr)) + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRBT(value, ptr) __strt(value, ptr) + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRHT(value, ptr) __strt(value, ptr) + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRT(value, ptr) __strt(value, ptr) + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__attribute__((always_inline)) __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +#define __SADD8 __sadd8 +#define __QADD8 __qadd8 +#define __SHADD8 __shadd8 +#define __UADD8 __uadd8 +#define __UQADD8 __uqadd8 +#define __UHADD8 __uhadd8 +#define __SSUB8 __ssub8 +#define __QSUB8 __qsub8 +#define __SHSUB8 __shsub8 +#define __USUB8 __usub8 +#define __UQSUB8 __uqsub8 +#define __UHSUB8 __uhsub8 +#define __SADD16 __sadd16 +#define __QADD16 __qadd16 +#define __SHADD16 __shadd16 +#define __UADD16 __uadd16 +#define __UQADD16 __uqadd16 +#define __UHADD16 __uhadd16 +#define __SSUB16 __ssub16 +#define __QSUB16 __qsub16 +#define __SHSUB16 __shsub16 +#define __USUB16 __usub16 +#define __UQSUB16 __uqsub16 +#define __UHSUB16 __uhsub16 +#define __SASX __sasx +#define __QASX __qasx +#define __SHASX __shasx +#define __UASX __uasx +#define __UQASX __uqasx +#define __UHASX __uhasx +#define __SSAX __ssax +#define __QSAX __qsax +#define __SHSAX __shsax +#define __USAX __usax +#define __UQSAX __uqsax +#define __UHSAX __uhsax +#define __USAD8 __usad8 +#define __USADA8 __usada8 +#define __SSAT16 __ssat16 +#define __USAT16 __usat16 +#define __UXTB16 __uxtb16 +#define __UXTAB16 __uxtab16 +#define __SXTB16 __sxtb16 +#define __SXTAB16 __sxtab16 +#define __SMUAD __smuad +#define __SMUADX __smuadx +#define __SMLAD __smlad +#define __SMLADX __smladx +#define __SMLALD __smlald +#define __SMLALDX __smlaldx +#define __SMUSD __smusd +#define __SMUSDX __smusdx +#define __SMLSD __smlsd +#define __SMLSDX __smlsdx +#define __SMLSLD __smlsld +#define __SMLSLDX __smlsldx +#define __SEL __sel +#define __QADD __qadd +#define __QSUB __qsub + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \ + ((int64_t)(ARG3) << 32U) ) >> 32U)) + +#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCC_H */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armclang.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armclang.h index 162a400..d8031b0 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armclang.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_armclang.h @@ -1,1869 +1,1869 @@ -/**************************************************************************//** - * @file cmsis_armclang.h - * @brief CMSIS compiler armclang (Arm Compiler 6) header file - * @version V5.0.4 - * @date 10. January 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*lint -esym(9058, IRQn)*/ /* disable MISRA 2012 Rule 2.4 for IRQn */ - -#ifndef __CMSIS_ARMCLANG_H -#define __CMSIS_ARMCLANG_H - -#pragma clang system_header /* treat file as system include file */ - -#ifndef __ARM_COMPAT_H -#include /* Compatibility header for Arm Compiler 5 intrinsics */ -#endif - -/* CMSIS compiler specific defines */ -#ifndef __ASM - #define __ASM __asm -#endif -#ifndef __INLINE - #define __INLINE __inline -#endif -#ifndef __STATIC_INLINE - #define __STATIC_INLINE static __inline -#endif -#ifndef __STATIC_FORCEINLINE - #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline -#endif -#ifndef __NO_RETURN - #define __NO_RETURN __attribute__((__noreturn__)) -#endif -#ifndef __USED - #define __USED __attribute__((used)) -#endif -#ifndef __WEAK - #define __WEAK __attribute__((weak)) -#endif -#ifndef __PACKED - #define __PACKED __attribute__((packed, aligned(1))) -#endif -#ifndef __PACKED_STRUCT - #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) -#endif -#ifndef __PACKED_UNION - #define __PACKED_UNION union __attribute__((packed, aligned(1))) -#endif -#ifndef __UNALIGNED_UINT32 /* deprecated */ - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wpacked" -/*lint -esym(9058, T_UINT32)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32 */ - struct __attribute__((packed)) T_UINT32 { uint32_t v; }; - #pragma clang diagnostic pop - #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) -#endif -#ifndef __UNALIGNED_UINT16_WRITE - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wpacked" -/*lint -esym(9058, T_UINT16_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_WRITE */ - __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; - #pragma clang diagnostic pop - #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) -#endif -#ifndef __UNALIGNED_UINT16_READ - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wpacked" -/*lint -esym(9058, T_UINT16_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_READ */ - __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; - #pragma clang diagnostic pop - #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) -#endif -#ifndef __UNALIGNED_UINT32_WRITE - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wpacked" -/*lint -esym(9058, T_UINT32_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_WRITE */ - __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; - #pragma clang diagnostic pop - #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) -#endif -#ifndef __UNALIGNED_UINT32_READ - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wpacked" -/*lint -esym(9058, T_UINT32_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_READ */ - __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; - #pragma clang diagnostic pop - #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) -#endif -#ifndef __ALIGNED - #define __ALIGNED(x) __attribute__((aligned(x))) -#endif -#ifndef __RESTRICT - #define __RESTRICT __restrict -#endif - - -/* ########################### Core Function Access ########################### */ -/** \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions - @{ - */ - -/** - \brief Enable IRQ Interrupts - \details Enables IRQ interrupts by clearing the I-bit in the CPSR. - Can only be executed in Privileged modes. - */ -/* intrinsic void __enable_irq(); see arm_compat.h */ - - -/** - \brief Disable IRQ Interrupts - \details Disables IRQ interrupts by setting the I-bit in the CPSR. - Can only be executed in Privileged modes. - */ -/* intrinsic void __disable_irq(); see arm_compat.h */ - - -/** - \brief Get Control Register - \details Returns the content of the Control Register. - \return Control Register value - */ -__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, control" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Control Register (non-secure) - \details Returns the content of the non-secure Control Register when in secure mode. - \return non-secure Control Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Control Register - \details Writes the given value to the Control Register. - \param [in] control Control Register value to set - */ -__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) -{ - __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Control Register (non-secure) - \details Writes the given value to the non-secure Control Register when in secure state. - \param [in] control Control Register value to set - */ -__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) -{ - __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); -} -#endif - - -/** - \brief Get IPSR Register - \details Returns the content of the IPSR Register. - \return IPSR Register value - */ -__STATIC_FORCEINLINE uint32_t __get_IPSR(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); - return(result); -} - - -/** - \brief Get APSR Register - \details Returns the content of the APSR Register. - \return APSR Register value - */ -__STATIC_FORCEINLINE uint32_t __get_APSR(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, apsr" : "=r" (result) ); - return(result); -} - - -/** - \brief Get xPSR Register - \details Returns the content of the xPSR Register. - \return xPSR Register value - */ -__STATIC_FORCEINLINE uint32_t __get_xPSR(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); - return(result); -} - - -/** - \brief Get Process Stack Pointer - \details Returns the current value of the Process Stack Pointer (PSP). - \return PSP Register value - */ -__STATIC_FORCEINLINE uint32_t __get_PSP(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, psp" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Process Stack Pointer (non-secure) - \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. - \return PSP Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Process Stack Pointer - \details Assigns the given value to the Process Stack Pointer (PSP). - \param [in] topOfProcStack Process Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) -{ - __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Process Stack Pointer (non-secure) - \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. - \param [in] topOfProcStack Process Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) -{ - __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); -} -#endif - - -/** - \brief Get Main Stack Pointer - \details Returns the current value of the Main Stack Pointer (MSP). - \return MSP Register value - */ -__STATIC_FORCEINLINE uint32_t __get_MSP(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, msp" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Main Stack Pointer (non-secure) - \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. - \return MSP Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Main Stack Pointer - \details Assigns the given value to the Main Stack Pointer (MSP). - \param [in] topOfMainStack Main Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) -{ - __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Main Stack Pointer (non-secure) - \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. - \param [in] topOfMainStack Main Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) -{ - __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); -} -#endif - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Stack Pointer (non-secure) - \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. - \return SP Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); - return(result); -} - - -/** - \brief Set Stack Pointer (non-secure) - \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. - \param [in] topOfStack Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) -{ - __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); -} -#endif - - -/** - \brief Get Priority Mask - \details Returns the current state of the priority mask bit from the Priority Mask Register. - \return Priority Mask value - */ -__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, primask" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Priority Mask (non-secure) - \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. - \return Priority Mask value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, primask_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Priority Mask - \details Assigns the given value to the Priority Mask Register. - \param [in] priMask Priority Mask - */ -__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) -{ - __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Priority Mask (non-secure) - \details Assigns the given value to the non-secure Priority Mask Register when in secure state. - \param [in] priMask Priority Mask - */ -__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) -{ - __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); -} -#endif - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) -/** - \brief Enable FIQ - \details Enables FIQ interrupts by clearing the F-bit in the CPSR. - Can only be executed in Privileged modes. - */ -#define __enable_fault_irq __enable_fiq /* see arm_compat.h */ - - -/** - \brief Disable FIQ - \details Disables FIQ interrupts by setting the F-bit in the CPSR. - Can only be executed in Privileged modes. - */ -#define __disable_fault_irq __disable_fiq /* see arm_compat.h */ - - -/** - \brief Get Base Priority - \details Returns the current value of the Base Priority register. - \return Base Priority register value - */ -__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, basepri" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Base Priority (non-secure) - \details Returns the current value of the non-secure Base Priority register when in secure state. - \return Base Priority register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Base Priority - \details Assigns the given value to the Base Priority register. - \param [in] basePri Base Priority value to set - */ -__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) -{ - __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Base Priority (non-secure) - \details Assigns the given value to the non-secure Base Priority register when in secure state. - \param [in] basePri Base Priority value to set - */ -__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) -{ - __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); -} -#endif - - -/** - \brief Set Base Priority with condition - \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, - or the new value increases the BASEPRI priority level. - \param [in] basePri Base Priority value to set - */ -__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) -{ - __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); -} - - -/** - \brief Get Fault Mask - \details Returns the current value of the Fault Mask register. - \return Fault Mask register value - */ -__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Fault Mask (non-secure) - \details Returns the current value of the non-secure Fault Mask register when in secure state. - \return Fault Mask register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Fault Mask - \details Assigns the given value to the Fault Mask register. - \param [in] faultMask Fault Mask value to set - */ -__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) -{ - __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Fault Mask (non-secure) - \details Assigns the given value to the non-secure Fault Mask register when in secure state. - \param [in] faultMask Fault Mask value to set - */ -__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) -{ - __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); -} -#endif - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ - - -#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) - -/** - \brief Get Process Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always in non-secure - mode. - - \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). - \return PSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, psplim" : "=r" (result) ); - return result; -#endif -} - -#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Process Stack Pointer Limit (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always in non-secure - mode. - - \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. - \return PSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); - return result; -#endif -} -#endif - - -/** - \brief Set Process Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored in non-secure - mode. - - \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). - \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set - */ -__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - (void)ProcStackPtrLimit; -#else - __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); -#endif -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Process Stack Pointer (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored in non-secure - mode. - - \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. - \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set - */ -__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - (void)ProcStackPtrLimit; -#else - __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); -#endif -} -#endif - - -/** - \brief Get Main Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always. - - \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). - \return MSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, msplim" : "=r" (result) ); - return result; -#endif -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Main Stack Pointer Limit (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always. - - \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. - \return MSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); - return result; -#endif -} -#endif - - -/** - \brief Set Main Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored. - - \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). - \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set - */ -__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - (void)MainStackPtrLimit; -#else - __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); -#endif -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Main Stack Pointer Limit (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored. - - \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. - \param [in] MainStackPtrLimit Main Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - (void)MainStackPtrLimit; -#else - __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); -#endif -} -#endif - -#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ - -/** - \brief Get FPSCR - \details Returns the current value of the Floating Point Status/Control register. - \return Floating Point Status/Control register value - */ -#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) -#define __get_FPSCR (uint32_t)__builtin_arm_get_fpscr -#else -#define __get_FPSCR() ((uint32_t)0U) -#endif - -/** - \brief Set FPSCR - \details Assigns the given value to the Floating Point Status/Control register. - \param [in] fpscr Floating Point Status/Control value to set - */ -#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) -#define __set_FPSCR __builtin_arm_set_fpscr -#else -#define __set_FPSCR(x) ((void)(x)) -#endif - - -/*@} end of CMSIS_Core_RegAccFunctions */ - - -/* ########################## Core Instruction Access ######################### */ -/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface - Access to dedicated instructions - @{ -*/ - -/* Define macros for porting to both thumb1 and thumb2. - * For thumb1, use low register (r0-r7), specified by constraint "l" - * Otherwise, use general registers, specified by constraint "r" */ -#if defined (__thumb__) && !defined (__thumb2__) -#define __CMSIS_GCC_OUT_REG(r) "=l" (r) -#define __CMSIS_GCC_USE_REG(r) "l" (r) -#else -#define __CMSIS_GCC_OUT_REG(r) "=r" (r) -#define __CMSIS_GCC_USE_REG(r) "r" (r) -#endif - -/** - \brief No Operation - \details No Operation does nothing. This instruction can be used for code alignment purposes. - */ -#define __NOP __builtin_arm_nop - -/** - \brief Wait For Interrupt - \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. - */ -#define __WFI __builtin_arm_wfi - - -/** - \brief Wait For Event - \details Wait For Event is a hint instruction that permits the processor to enter - a low-power state until one of a number of events occurs. - */ -#define __WFE __builtin_arm_wfe - - -/** - \brief Send Event - \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. - */ -#define __SEV __builtin_arm_sev - - -/** - \brief Instruction Synchronization Barrier - \details Instruction Synchronization Barrier flushes the pipeline in the processor, - so that all instructions following the ISB are fetched from cache or memory, - after the instruction has been completed. - */ -#define __ISB() __builtin_arm_isb(0xF); - -/** - \brief Data Synchronization Barrier - \details Acts as a special kind of Data Memory Barrier. - It completes when all explicit memory accesses before this instruction complete. - */ -#define __DSB() __builtin_arm_dsb(0xF); - - -/** - \brief Data Memory Barrier - \details Ensures the apparent order of the explicit memory operations before - and after the instruction, without ensuring their completion. - */ -#define __DMB() __builtin_arm_dmb(0xF); - - -/** - \brief Reverse byte order (32 bit) - \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. - \param [in] value Value to reverse - \return Reversed value - */ -#define __REV(value) __builtin_bswap32(value) - - -/** - \brief Reverse byte order (16 bit) - \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. - \param [in] value Value to reverse - \return Reversed value - */ -#define __REV16(value) __ROR(__REV(value), 16) - - -/** - \brief Reverse byte order (16 bit) - \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. - \param [in] value Value to reverse - \return Reversed value - */ -#define __REVSH(value) (int16_t)__builtin_bswap16(value) - - -/** - \brief Rotate Right in unsigned value (32 bit) - \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. - \param [in] op1 Value to rotate - \param [in] op2 Number of Bits to rotate - \return Rotated value - */ -__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) -{ - op2 %= 32U; - if (op2 == 0U) - { - return op1; - } - return (op1 >> op2) | (op1 << (32U - op2)); -} - - -/** - \brief Breakpoint - \details Causes the processor to enter Debug state. - Debug tools can use this to investigate system state when the instruction at a particular address is reached. - \param [in] value is ignored by the processor. - If required, a debugger can use it to store additional information about the breakpoint. - */ -#define __BKPT(value) __ASM volatile ("bkpt "#value) - - -/** - \brief Reverse bit order of value - \details Reverses the bit order of the given value. - \param [in] value Value to reverse - \return Reversed value - */ -#define __RBIT __builtin_arm_rbit - -/** - \brief Count leading zeros - \details Counts the number of leading zeros of a data value. - \param [in] value Value to count the leading zeros - \return number of leading zeros in value - */ -#define __CLZ (uint8_t)__builtin_clz - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) -/** - \brief LDR Exclusive (8 bit) - \details Executes a exclusive LDR instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -#define __LDREXB (uint8_t)__builtin_arm_ldrex - - -/** - \brief LDR Exclusive (16 bit) - \details Executes a exclusive LDR instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -#define __LDREXH (uint16_t)__builtin_arm_ldrex - - -/** - \brief LDR Exclusive (32 bit) - \details Executes a exclusive LDR instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -#define __LDREXW (uint32_t)__builtin_arm_ldrex - - -/** - \brief STR Exclusive (8 bit) - \details Executes a exclusive STR instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#define __STREXB (uint32_t)__builtin_arm_strex - - -/** - \brief STR Exclusive (16 bit) - \details Executes a exclusive STR instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#define __STREXH (uint32_t)__builtin_arm_strex - - -/** - \brief STR Exclusive (32 bit) - \details Executes a exclusive STR instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#define __STREXW (uint32_t)__builtin_arm_strex - - -/** - \brief Remove the exclusive lock - \details Removes the exclusive lock which is created by LDREX. - */ -#define __CLREX __builtin_arm_clrex - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) - -/** - \brief Signed Saturate - \details Saturates a signed value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (1..32) - \return Saturated value - */ -#define __SSAT __builtin_arm_ssat - - -/** - \brief Unsigned Saturate - \details Saturates an unsigned value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (0..31) - \return Saturated value - */ -#define __USAT __builtin_arm_usat - - -/** - \brief Rotate Right with Extend (32 bit) - \details Moves each bit of a bitstring right by one bit. - The carry input is shifted in at the left end of the bitstring. - \param [in] value Value to rotate - \return Rotated value - */ -__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) -{ - uint32_t result; - - __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); - return(result); -} - - -/** - \brief LDRT Unprivileged (8 bit) - \details Executes a Unprivileged LDRT instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint8_t) result); /* Add explicit type cast here */ -} - - -/** - \brief LDRT Unprivileged (16 bit) - \details Executes a Unprivileged LDRT instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint16_t) result); /* Add explicit type cast here */ -} - - -/** - \brief LDRT Unprivileged (32 bit) - \details Executes a Unprivileged LDRT instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); - return(result); -} - - -/** - \brief STRT Unprivileged (8 bit) - \details Executes a Unprivileged STRT instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) -{ - __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief STRT Unprivileged (16 bit) - \details Executes a Unprivileged STRT instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) -{ - __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief STRT Unprivileged (32 bit) - \details Executes a Unprivileged STRT instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) -{ - __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); -} - -#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ - -/** - \brief Signed Saturate - \details Saturates a signed value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (1..32) - \return Saturated value - */ -__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) -{ - if ((sat >= 1U) && (sat <= 32U)) - { - const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); - const int32_t min = -1 - max ; - if (val > max) - { - return max; - } - else if (val < min) - { - return min; - } - } - return val; -} - -/** - \brief Unsigned Saturate - \details Saturates an unsigned value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (0..31) - \return Saturated value - */ -__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) -{ - if (sat <= 31U) - { - const uint32_t max = ((1U << sat) - 1U); - if (val > (int32_t)max) - { - return max; - } - else if (val < 0) - { - return 0U; - } - } - return (uint32_t)val; -} - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ - - -#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) -/** - \brief Load-Acquire (8 bit) - \details Executes a LDAB instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint8_t) result); -} - - -/** - \brief Load-Acquire (16 bit) - \details Executes a LDAH instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint16_t) result); -} - - -/** - \brief Load-Acquire (32 bit) - \details Executes a LDA instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) -{ - uint32_t result; - - __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) ); - return(result); -} - - -/** - \brief Store-Release (8 bit) - \details Executes a STLB instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) -{ - __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief Store-Release (16 bit) - \details Executes a STLH instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) -{ - __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief Store-Release (32 bit) - \details Executes a STL instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) -{ - __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief Load-Acquire Exclusive (8 bit) - \details Executes a LDAB exclusive instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -#define __LDAEXB (uint8_t)__builtin_arm_ldaex - - -/** - \brief Load-Acquire Exclusive (16 bit) - \details Executes a LDAH exclusive instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -#define __LDAEXH (uint16_t)__builtin_arm_ldaex - - -/** - \brief Load-Acquire Exclusive (32 bit) - \details Executes a LDA exclusive instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -#define __LDAEX (uint32_t)__builtin_arm_ldaex - - -/** - \brief Store-Release Exclusive (8 bit) - \details Executes a STLB exclusive instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#define __STLEXB (uint32_t)__builtin_arm_stlex - - -/** - \brief Store-Release Exclusive (16 bit) - \details Executes a STLH exclusive instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#define __STLEXH (uint32_t)__builtin_arm_stlex - - -/** - \brief Store-Release Exclusive (32 bit) - \details Executes a STL exclusive instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -#define __STLEX (uint32_t)__builtin_arm_stlex - -#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ - -/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ - - -/* ################### Compiler specific Intrinsics ########################### */ -/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics - Access to dedicated SIMD instructions - @{ -*/ - -#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) - -__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - - -__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - - -__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -#define __SSAT16(ARG1,ARG2) \ -({ \ - int32_t __RES, __ARG1 = (ARG1); \ - __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ - __RES; \ - }) - -#define __USAT16(ARG1,ARG2) \ -({ \ - uint32_t __RES, __ARG1 = (ARG1); \ - __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ - __RES; \ - }) - -__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) -{ - uint32_t result; - - __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) -{ - uint32_t result; - - __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) -{ - int32_t result; - - __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) -{ - int32_t result; - - __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -#if 0 -#define __PKHBT(ARG1,ARG2,ARG3) \ -({ \ - uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ - __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ - __RES; \ - }) - -#define __PKHTB(ARG1,ARG2,ARG3) \ -({ \ - uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ - if (ARG3 == 0) \ - __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \ - else \ - __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ - __RES; \ - }) -#endif - -#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ - ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) - -#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ - ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) - -__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) -{ - int32_t result; - - __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -#endif /* (__ARM_FEATURE_DSP == 1) */ -/*@} end of group CMSIS_SIMD_intrinsics */ - - -#endif /* __CMSIS_ARMCLANG_H */ +/**************************************************************************//** + * @file cmsis_armclang.h + * @brief CMSIS compiler armclang (Arm Compiler 6) header file + * @version V5.0.4 + * @date 10. January 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*lint -esym(9058, IRQn)*/ /* disable MISRA 2012 Rule 2.4 for IRQn */ + +#ifndef __CMSIS_ARMCLANG_H +#define __CMSIS_ARMCLANG_H + +#pragma clang system_header /* treat file as system include file */ + +#ifndef __ARM_COMPAT_H +#include /* Compatibility header for Arm Compiler 5 intrinsics */ +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32 */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_WRITE */ + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_READ */ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_WRITE */ + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_READ */ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif + + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __enable_irq(); see arm_compat.h */ + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __disable_irq(); see arm_compat.h */ + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __enable_fault_irq __enable_fiq /* see arm_compat.h */ + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __disable_fault_irq __disable_fiq /* see arm_compat.h */ + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __get_FPSCR (uint32_t)__builtin_arm_get_fpscr +#else +#define __get_FPSCR() ((uint32_t)0U) +#endif + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __set_FPSCR __builtin_arm_set_fpscr +#else +#define __set_FPSCR(x) ((void)(x)) +#endif + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __builtin_arm_nop + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __builtin_arm_wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __builtin_arm_wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __builtin_arm_sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() __builtin_arm_isb(0xF); + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() __builtin_arm_dsb(0xF); + + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() __builtin_arm_dmb(0xF); + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV(value) __builtin_bswap32(value) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV16(value) __ROR(__REV(value), 16) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REVSH(value) (int16_t)__builtin_bswap16(value) + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#define __RBIT __builtin_arm_rbit + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +#define __CLZ (uint8_t)__builtin_clz + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDREXB (uint8_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDREXH (uint16_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDREXW (uint32_t)__builtin_arm_ldrex + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXB (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXH (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXW (uint32_t)__builtin_arm_strex + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __builtin_arm_clrex + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __builtin_arm_ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __builtin_arm_usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDAEXB (uint8_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDAEXH (uint16_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDAEX (uint32_t)__builtin_arm_ldaex + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXB (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXH (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEX (uint32_t)__builtin_arm_stlex + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#define __SSAT16(ARG1,ARG2) \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +#define __USAT16(ARG1,ARG2) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +#if 0 +#define __PKHBT(ARG1,ARG2,ARG3) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) + +#define __PKHTB(ARG1,ARG2,ARG3) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + if (ARG3 == 0) \ + __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \ + else \ + __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) +#endif + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCLANG_H */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_compiler.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_compiler.h index 94212eb..79a2cac 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_compiler.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_compiler.h @@ -1,266 +1,266 @@ -/**************************************************************************//** - * @file cmsis_compiler.h - * @brief CMSIS compiler generic header file - * @version V5.0.4 - * @date 10. January 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __CMSIS_COMPILER_H -#define __CMSIS_COMPILER_H - -#include - -/* - * Arm Compiler 4/5 - */ -#if defined ( __CC_ARM ) - #include "cmsis_armcc.h" - - -/* - * Arm Compiler 6 (armclang) - */ -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #include "cmsis_armclang.h" - - -/* - * GNU Compiler - */ -#elif defined ( __GNUC__ ) - #include "cmsis_gcc.h" - - -/* - * IAR Compiler - */ -#elif defined ( __ICCARM__ ) - #include - - -/* - * TI Arm Compiler - */ -#elif defined ( __TI_ARM__ ) - #include - - #ifndef __ASM - #define __ASM __asm - #endif - #ifndef __INLINE - #define __INLINE inline - #endif - #ifndef __STATIC_INLINE - #define __STATIC_INLINE static inline - #endif - #ifndef __STATIC_FORCEINLINE - #define __STATIC_FORCEINLINE __STATIC_INLINE - #endif - #ifndef __NO_RETURN - #define __NO_RETURN __attribute__((noreturn)) - #endif - #ifndef __USED - #define __USED __attribute__((used)) - #endif - #ifndef __WEAK - #define __WEAK __attribute__((weak)) - #endif - #ifndef __PACKED - #define __PACKED __attribute__((packed)) - #endif - #ifndef __PACKED_STRUCT - #define __PACKED_STRUCT struct __attribute__((packed)) - #endif - #ifndef __PACKED_UNION - #define __PACKED_UNION union __attribute__((packed)) - #endif - #ifndef __UNALIGNED_UINT32 /* deprecated */ - struct __attribute__((packed)) T_UINT32 { uint32_t v; }; - #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) - #endif - #ifndef __UNALIGNED_UINT16_WRITE - __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; - #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val)) - #endif - #ifndef __UNALIGNED_UINT16_READ - __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; - #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) - #endif - #ifndef __UNALIGNED_UINT32_WRITE - __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; - #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) - #endif - #ifndef __UNALIGNED_UINT32_READ - __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; - #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) - #endif - #ifndef __ALIGNED - #define __ALIGNED(x) __attribute__((aligned(x))) - #endif - #ifndef __RESTRICT - #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. - #define __RESTRICT - #endif - - -/* - * TASKING Compiler - */ -#elif defined ( __TASKING__ ) - /* - * The CMSIS functions have been implemented as intrinsics in the compiler. - * Please use "carm -?i" to get an up to date list of all intrinsics, - * Including the CMSIS ones. - */ - - #ifndef __ASM - #define __ASM __asm - #endif - #ifndef __INLINE - #define __INLINE inline - #endif - #ifndef __STATIC_INLINE - #define __STATIC_INLINE static inline - #endif - #ifndef __STATIC_FORCEINLINE - #define __STATIC_FORCEINLINE __STATIC_INLINE - #endif - #ifndef __NO_RETURN - #define __NO_RETURN __attribute__((noreturn)) - #endif - #ifndef __USED - #define __USED __attribute__((used)) - #endif - #ifndef __WEAK - #define __WEAK __attribute__((weak)) - #endif - #ifndef __PACKED - #define __PACKED __packed__ - #endif - #ifndef __PACKED_STRUCT - #define __PACKED_STRUCT struct __packed__ - #endif - #ifndef __PACKED_UNION - #define __PACKED_UNION union __packed__ - #endif - #ifndef __UNALIGNED_UINT32 /* deprecated */ - struct __packed__ T_UINT32 { uint32_t v; }; - #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) - #endif - #ifndef __UNALIGNED_UINT16_WRITE - __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; - #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) - #endif - #ifndef __UNALIGNED_UINT16_READ - __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; - #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) - #endif - #ifndef __UNALIGNED_UINT32_WRITE - __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; - #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) - #endif - #ifndef __UNALIGNED_UINT32_READ - __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; - #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) - #endif - #ifndef __ALIGNED - #define __ALIGNED(x) __align(x) - #endif - #ifndef __RESTRICT - #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. - #define __RESTRICT - #endif - - -/* - * COSMIC Compiler - */ -#elif defined ( __CSMC__ ) - #include - - #ifndef __ASM - #define __ASM _asm - #endif - #ifndef __INLINE - #define __INLINE inline - #endif - #ifndef __STATIC_INLINE - #define __STATIC_INLINE static inline - #endif - #ifndef __STATIC_FORCEINLINE - #define __STATIC_FORCEINLINE __STATIC_INLINE - #endif - #ifndef __NO_RETURN - // NO RETURN is automatically detected hence no warning here - #define __NO_RETURN - #endif - #ifndef __USED - #warning No compiler specific solution for __USED. __USED is ignored. - #define __USED - #endif - #ifndef __WEAK - #define __WEAK __weak - #endif - #ifndef __PACKED - #define __PACKED @packed - #endif - #ifndef __PACKED_STRUCT - #define __PACKED_STRUCT @packed struct - #endif - #ifndef __PACKED_UNION - #define __PACKED_UNION @packed union - #endif - #ifndef __UNALIGNED_UINT32 /* deprecated */ - @packed struct T_UINT32 { uint32_t v; }; - #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) - #endif - #ifndef __UNALIGNED_UINT16_WRITE - __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; - #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) - #endif - #ifndef __UNALIGNED_UINT16_READ - __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; - #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) - #endif - #ifndef __UNALIGNED_UINT32_WRITE - __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; - #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) - #endif - #ifndef __UNALIGNED_UINT32_READ - __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; - #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) - #endif - #ifndef __ALIGNED - #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored. - #define __ALIGNED(x) - #endif - #ifndef __RESTRICT - #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. - #define __RESTRICT - #endif - - -#else - #error Unknown compiler. -#endif - - -#endif /* __CMSIS_COMPILER_H */ - +/**************************************************************************//** + * @file cmsis_compiler.h + * @brief CMSIS compiler generic header file + * @version V5.0.4 + * @date 10. January 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_COMPILER_H +#define __CMSIS_COMPILER_H + +#include + +/* + * Arm Compiler 4/5 + */ +#if defined ( __CC_ARM ) + #include "cmsis_armcc.h" + + +/* + * Arm Compiler 6 (armclang) + */ +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #include "cmsis_armclang.h" + + +/* + * GNU Compiler + */ +#elif defined ( __GNUC__ ) + #include "cmsis_gcc.h" + + +/* + * IAR Compiler + */ +#elif defined ( __ICCARM__ ) + #include + + +/* + * TI Arm Compiler + */ +#elif defined ( __TI_ARM__ ) + #include + + #ifndef __ASM + #define __ASM __asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + #define __NO_RETURN __attribute__((noreturn)) + #endif + #ifndef __USED + #define __USED __attribute__((used)) + #endif + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + #ifndef __PACKED + #define __PACKED __attribute__((packed)) + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed)) + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed)) + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) + #endif + #ifndef __RESTRICT + #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. + #define __RESTRICT + #endif + + +/* + * TASKING Compiler + */ +#elif defined ( __TASKING__ ) + /* + * The CMSIS functions have been implemented as intrinsics in the compiler. + * Please use "carm -?i" to get an up to date list of all intrinsics, + * Including the CMSIS ones. + */ + + #ifndef __ASM + #define __ASM __asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + #define __NO_RETURN __attribute__((noreturn)) + #endif + #ifndef __USED + #define __USED __attribute__((used)) + #endif + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + #ifndef __PACKED + #define __PACKED __packed__ + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __packed__ + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION union __packed__ + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + struct __packed__ T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #define __ALIGNED(x) __align(x) + #endif + #ifndef __RESTRICT + #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. + #define __RESTRICT + #endif + + +/* + * COSMIC Compiler + */ +#elif defined ( __CSMC__ ) + #include + + #ifndef __ASM + #define __ASM _asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + // NO RETURN is automatically detected hence no warning here + #define __NO_RETURN + #endif + #ifndef __USED + #warning No compiler specific solution for __USED. __USED is ignored. + #define __USED + #endif + #ifndef __WEAK + #define __WEAK __weak + #endif + #ifndef __PACKED + #define __PACKED @packed + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT @packed struct + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION @packed union + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + @packed struct T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored. + #define __ALIGNED(x) + #endif + #ifndef __RESTRICT + #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. + #define __RESTRICT + #endif + + +#else + #error Unknown compiler. +#endif + + +#endif /* __CMSIS_COMPILER_H */ + diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_gcc.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_gcc.h index 2d9db15..1bd41a4 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_gcc.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_gcc.h @@ -1,2085 +1,2085 @@ -/**************************************************************************//** - * @file cmsis_gcc.h - * @brief CMSIS compiler GCC header file - * @version V5.0.4 - * @date 09. April 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __CMSIS_GCC_H -#define __CMSIS_GCC_H - -/* ignore some GCC warnings */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-conversion" -#pragma GCC diagnostic ignored "-Wconversion" -#pragma GCC diagnostic ignored "-Wunused-parameter" - -/* Fallback for __has_builtin */ -#ifndef __has_builtin - #define __has_builtin(x) (0) -#endif - -/* CMSIS compiler specific defines */ -#ifndef __ASM - #define __ASM __asm -#endif -#ifndef __INLINE - #define __INLINE inline -#endif -#ifndef __STATIC_INLINE - #define __STATIC_INLINE static inline -#endif -#ifndef __STATIC_FORCEINLINE - #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline -#endif -#ifndef __NO_RETURN - #define __NO_RETURN __attribute__((__noreturn__)) -#endif -#ifndef __USED - #define __USED __attribute__((used)) -#endif -#ifndef __WEAK - #define __WEAK __attribute__((weak)) -#endif -#ifndef __PACKED - #define __PACKED __attribute__((packed, aligned(1))) -#endif -#ifndef __PACKED_STRUCT - #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) -#endif -#ifndef __PACKED_UNION - #define __PACKED_UNION union __attribute__((packed, aligned(1))) -#endif -#ifndef __UNALIGNED_UINT32 /* deprecated */ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wpacked" - #pragma GCC diagnostic ignored "-Wattributes" - struct __attribute__((packed)) T_UINT32 { uint32_t v; }; - #pragma GCC diagnostic pop - #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) -#endif -#ifndef __UNALIGNED_UINT16_WRITE - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wpacked" - #pragma GCC diagnostic ignored "-Wattributes" - __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; - #pragma GCC diagnostic pop - #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) -#endif -#ifndef __UNALIGNED_UINT16_READ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wpacked" - #pragma GCC diagnostic ignored "-Wattributes" - __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; - #pragma GCC diagnostic pop - #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) -#endif -#ifndef __UNALIGNED_UINT32_WRITE - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wpacked" - #pragma GCC diagnostic ignored "-Wattributes" - __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; - #pragma GCC diagnostic pop - #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) -#endif -#ifndef __UNALIGNED_UINT32_READ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wpacked" - #pragma GCC diagnostic ignored "-Wattributes" - __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; - #pragma GCC diagnostic pop - #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) -#endif -#ifndef __ALIGNED - #define __ALIGNED(x) __attribute__((aligned(x))) -#endif -#ifndef __RESTRICT - #define __RESTRICT __restrict -#endif - - -/* ########################### Core Function Access ########################### */ -/** \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions - @{ - */ - -/** - \brief Enable IRQ Interrupts - \details Enables IRQ interrupts by clearing the I-bit in the CPSR. - Can only be executed in Privileged modes. - */ -__STATIC_FORCEINLINE void __enable_irq(void) -{ - __ASM volatile ("cpsie i" : : : "memory"); -} - - -/** - \brief Disable IRQ Interrupts - \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"); -} - - -/** - \brief Get Control Register - \details Returns the content of the Control Register. - \return Control Register value - */ -__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, control" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Control Register (non-secure) - \details Returns the content of the non-secure Control Register when in secure mode. - \return non-secure Control Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Control Register - \details Writes the given value to the Control Register. - \param [in] control Control Register value to set - */ -__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) -{ - __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Control Register (non-secure) - \details Writes the given value to the non-secure Control Register when in secure state. - \param [in] control Control Register value to set - */ -__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) -{ - __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); -} -#endif - - -/** - \brief Get IPSR Register - \details Returns the content of the IPSR Register. - \return IPSR Register value - */ -__STATIC_FORCEINLINE uint32_t __get_IPSR(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); - return(result); -} - - -/** - \brief Get APSR Register - \details Returns the content of the APSR Register. - \return APSR Register value - */ -__STATIC_FORCEINLINE uint32_t __get_APSR(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, apsr" : "=r" (result) ); - return(result); -} - - -/** - \brief Get xPSR Register - \details Returns the content of the xPSR Register. - \return xPSR Register value - */ -__STATIC_FORCEINLINE uint32_t __get_xPSR(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); - return(result); -} - - -/** - \brief Get Process Stack Pointer - \details Returns the current value of the Process Stack Pointer (PSP). - \return PSP Register value - */ -__STATIC_FORCEINLINE uint32_t __get_PSP(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, psp" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Process Stack Pointer (non-secure) - \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. - \return PSP Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Process Stack Pointer - \details Assigns the given value to the Process Stack Pointer (PSP). - \param [in] topOfProcStack Process Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) -{ - __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Process Stack Pointer (non-secure) - \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. - \param [in] topOfProcStack Process Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) -{ - __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); -} -#endif - - -/** - \brief Get Main Stack Pointer - \details Returns the current value of the Main Stack Pointer (MSP). - \return MSP Register value - */ -__STATIC_FORCEINLINE uint32_t __get_MSP(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, msp" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Main Stack Pointer (non-secure) - \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. - \return MSP Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Main Stack Pointer - \details Assigns the given value to the Main Stack Pointer (MSP). - \param [in] topOfMainStack Main Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) -{ - __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Main Stack Pointer (non-secure) - \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. - \param [in] topOfMainStack Main Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) -{ - __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); -} -#endif - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Stack Pointer (non-secure) - \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. - \return SP Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); - return(result); -} - - -/** - \brief Set Stack Pointer (non-secure) - \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. - \param [in] topOfStack Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) -{ - __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); -} -#endif - - -/** - \brief Get Priority Mask - \details Returns the current state of the priority mask bit from the Priority Mask Register. - \return Priority Mask value - */ -__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Priority Mask (non-secure) - \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. - \return Priority Mask value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, primask_ns" : "=r" (result) :: "memory"); - return(result); -} -#endif - - -/** - \brief Set Priority Mask - \details Assigns the given value to the Priority Mask Register. - \param [in] priMask Priority Mask - */ -__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) -{ - __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Priority Mask (non-secure) - \details Assigns the given value to the non-secure Priority Mask Register when in secure state. - \param [in] priMask Priority Mask - */ -__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) -{ - __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); -} -#endif - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) -/** - \brief Enable FIQ - \details Enables FIQ interrupts by clearing the F-bit in the CPSR. - Can only be executed in Privileged modes. - */ -__STATIC_FORCEINLINE void __enable_fault_irq(void) -{ - __ASM volatile ("cpsie f" : : : "memory"); -} - - -/** - \brief Disable FIQ - \details Disables FIQ interrupts by setting the F-bit in the CPSR. - Can only be executed in Privileged modes. - */ -__STATIC_FORCEINLINE void __disable_fault_irq(void) -{ - __ASM volatile ("cpsid f" : : : "memory"); -} - - -/** - \brief Get Base Priority - \details Returns the current value of the Base Priority register. - \return Base Priority register value - */ -__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, basepri" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Base Priority (non-secure) - \details Returns the current value of the non-secure Base Priority register when in secure state. - \return Base Priority register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Base Priority - \details Assigns the given value to the Base Priority register. - \param [in] basePri Base Priority value to set - */ -__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) -{ - __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Base Priority (non-secure) - \details Assigns the given value to the non-secure Base Priority register when in secure state. - \param [in] basePri Base Priority value to set - */ -__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) -{ - __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); -} -#endif - - -/** - \brief Set Base Priority with condition - \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, - or the new value increases the BASEPRI priority level. - \param [in] basePri Base Priority value to set - */ -__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) -{ - __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); -} - - -/** - \brief Get Fault Mask - \details Returns the current value of the Fault Mask register. - \return Fault Mask register value - */ -__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); - return(result); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Fault Mask (non-secure) - \details Returns the current value of the non-secure Fault Mask register when in secure state. - \return Fault Mask register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) -{ - uint32_t result; - - __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); - return(result); -} -#endif - - -/** - \brief Set Fault Mask - \details Assigns the given value to the Fault Mask register. - \param [in] faultMask Fault Mask value to set - */ -__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) -{ - __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Fault Mask (non-secure) - \details Assigns the given value to the non-secure Fault Mask register when in secure state. - \param [in] faultMask Fault Mask value to set - */ -__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) -{ - __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); -} -#endif - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ - - -#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) - -/** - \brief Get Process Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always in non-secure - mode. - - \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). - \return PSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, psplim" : "=r" (result) ); - return result; -#endif -} - -#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Process Stack Pointer Limit (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always. - - \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. - \return PSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); - return result; -#endif -} -#endif - - -/** - \brief Set Process Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored in non-secure - mode. - - \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). - \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set - */ -__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - (void)ProcStackPtrLimit; -#else - __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); -#endif -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Process Stack Pointer (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored. - - \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. - \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set - */ -__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - (void)ProcStackPtrLimit; -#else - __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); -#endif -} -#endif - - -/** - \brief Get Main Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always in non-secure - mode. - - \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). - \return MSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, msplim" : "=r" (result) ); - return result; -#endif -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Get Main Stack Pointer Limit (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence zero is returned always. - - \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. - \return MSPLIM Register value - */ -__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - return 0U; -#else - uint32_t result; - __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); - return result; -#endif -} -#endif - - -/** - \brief Set Main Stack Pointer Limit - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored in non-secure - mode. - - \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). - \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set - */ -__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - (void)MainStackPtrLimit; -#else - __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); -#endif -} - - -#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) -/** - \brief Set Main Stack Pointer Limit (non-secure) - Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure - Stack Pointer Limit register hence the write is silently ignored. - - \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. - \param [in] MainStackPtrLimit Main Stack Pointer value to set - */ -__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) -{ -#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - (void)MainStackPtrLimit; -#else - __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); -#endif -} -#endif - -#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ - - -/** - \brief Get FPSCR - \details Returns the current value of the Floating Point Status/Control register. - \return Floating Point Status/Control register value - */ -__STATIC_FORCEINLINE uint32_t __get_FPSCR(void) -{ -#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) -#if __has_builtin(__builtin_arm_get_fpscr) -// Re-enable using built-in when GCC has been fixed -// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) - /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ - return __builtin_arm_get_fpscr(); -#else - uint32_t result; - - __ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); - return(result); -#endif -#else - return(0U); -#endif -} - - -/** - \brief Set FPSCR - \details Assigns the given value to the Floating Point Status/Control register. - \param [in] fpscr Floating Point Status/Control value to set - */ -__STATIC_FORCEINLINE void __set_FPSCR(uint32_t fpscr) -{ -#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) -#if __has_builtin(__builtin_arm_set_fpscr) -// Re-enable using built-in when GCC has been fixed -// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) - /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ - __builtin_arm_set_fpscr(fpscr); -#else - __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory"); -#endif -#else - (void)fpscr; -#endif -} - - -/*@} end of CMSIS_Core_RegAccFunctions */ - - -/* ########################## Core Instruction Access ######################### */ -/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface - Access to dedicated instructions - @{ -*/ - -/* Define macros for porting to both thumb1 and thumb2. - * For thumb1, use low register (r0-r7), specified by constraint "l" - * Otherwise, use general registers, specified by constraint "r" */ -#if defined (__thumb__) && !defined (__thumb2__) -#define __CMSIS_GCC_OUT_REG(r) "=l" (r) -#define __CMSIS_GCC_RW_REG(r) "+l" (r) -#define __CMSIS_GCC_USE_REG(r) "l" (r) -#else -#define __CMSIS_GCC_OUT_REG(r) "=r" (r) -#define __CMSIS_GCC_RW_REG(r) "+r" (r) -#define __CMSIS_GCC_USE_REG(r) "r" (r) -#endif - -/** - \brief No Operation - \details No Operation does nothing. This instruction can be used for code alignment purposes. - */ -#define __NOP() __ASM volatile ("nop") - -/** - \brief Wait For Interrupt - \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. - */ -#define __WFI() __ASM volatile ("wfi") - - -/** - \brief Wait For Event - \details Wait For Event is a hint instruction that permits the processor to enter - a low-power state until one of a number of events occurs. - */ -#define __WFE() __ASM volatile ("wfe") - - -/** - \brief Send Event - \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. - */ -#define __SEV() __ASM volatile ("sev") - - -/** - \brief Instruction Synchronization Barrier - \details Instruction Synchronization Barrier flushes the pipeline in the processor, - so that all instructions following the ISB are fetched from cache or memory, - after the instruction has been completed. - */ -__STATIC_FORCEINLINE void __ISB(void) -{ - __ASM volatile ("isb 0xF":::"memory"); -} - - -/** - \brief Data Synchronization Barrier - \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"); -} - - -/** - \brief Data Memory Barrier - \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"); -} - - -/** - \brief Reverse byte order (32 bit) - \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. - \param [in] value Value to reverse - \return Reversed value - */ -__STATIC_FORCEINLINE uint32_t __REV(uint32_t value) -{ -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) - return __builtin_bswap32(value); -#else - uint32_t result; - - __ASM volatile ("rev %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); - return result; -#endif -} - - -/** - \brief Reverse byte order (16 bit) - \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. - \param [in] value Value to reverse - \return Reversed value - */ -__STATIC_FORCEINLINE uint32_t __REV16(uint32_t value) -{ - uint32_t result; - - __ASM volatile ("rev16 %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); - return result; -} - - -/** - \brief Reverse byte order (16 bit) - \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. - \param [in] value Value to reverse - \return Reversed value - */ -__STATIC_FORCEINLINE int16_t __REVSH(int16_t value) -{ -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) - return (int16_t)__builtin_bswap16(value); -#else - int16_t result; - - __ASM volatile ("revsh %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); - return result; -#endif -} - - -/** - \brief Rotate Right in unsigned value (32 bit) - \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. - \param [in] op1 Value to rotate - \param [in] op2 Number of Bits to rotate - \return Rotated value - */ -__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) -{ - op2 %= 32U; - if (op2 == 0U) - { - return op1; - } - return (op1 >> op2) | (op1 << (32U - op2)); -} - - -/** - \brief Breakpoint - \details Causes the processor to enter Debug state. - Debug tools can use this to investigate system state when the instruction at a particular address is reached. - \param [in] value is ignored by the processor. - If required, a debugger can use it to store additional information about the breakpoint. - */ -#define __BKPT(value) __ASM volatile ("bkpt "#value) - - -/** - \brief Reverse bit order of value - \details Reverses the bit order of the given value. - \param [in] value Value to reverse - \return Reversed value - */ -__STATIC_FORCEINLINE uint32_t __RBIT(uint32_t value) -{ - uint32_t result; - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) - __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); -#else - uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ - - result = value; /* r will be reversed bits of v; first get LSB of v */ - for (value >>= 1U; value != 0U; value >>= 1U) - { - result <<= 1U; - result |= value & 1U; - s--; - } - result <<= s; /* shift when v's highest bits are zero */ -#endif - return result; -} - - -/** - \brief Count leading zeros - \details Counts the number of leading zeros of a data value. - \param [in] value Value to count the leading zeros - \return number of leading zeros in value - */ -#define __CLZ (uint8_t)__builtin_clz - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) -/** - \brief LDR Exclusive (8 bit) - \details Executes a exclusive LDR instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -__STATIC_FORCEINLINE uint8_t __LDREXB(volatile uint8_t *addr) -{ - uint32_t result; - -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) - __ASM volatile ("ldrexb %0, %1" : "=r" (result) : "Q" (*addr) ); -#else - /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not - accepted by assembler. So has to use following less efficient pattern. - */ - __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); -#endif - return ((uint8_t) result); /* Add explicit type cast here */ -} - - -/** - \brief LDR Exclusive (16 bit) - \details Executes a exclusive LDR instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -__STATIC_FORCEINLINE uint16_t __LDREXH(volatile uint16_t *addr) -{ - uint32_t result; - -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) - __ASM volatile ("ldrexh %0, %1" : "=r" (result) : "Q" (*addr) ); -#else - /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not - accepted by assembler. So has to use following less efficient pattern. - */ - __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); -#endif - return ((uint16_t) result); /* Add explicit type cast here */ -} - - -/** - \brief LDR Exclusive (32 bit) - \details Executes a exclusive LDR instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -__STATIC_FORCEINLINE uint32_t __LDREXW(volatile uint32_t *addr) -{ - uint32_t result; - - __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); - return(result); -} - - -/** - \brief STR Exclusive (8 bit) - \details Executes a exclusive STR instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -__STATIC_FORCEINLINE uint32_t __STREXB(uint8_t value, volatile uint8_t *addr) -{ - uint32_t result; - - __ASM volatile ("strexb %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); - return(result); -} - - -/** - \brief STR Exclusive (16 bit) - \details Executes a exclusive STR instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -__STATIC_FORCEINLINE uint32_t __STREXH(uint16_t value, volatile uint16_t *addr) -{ - uint32_t result; - - __ASM volatile ("strexh %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); - return(result); -} - - -/** - \brief STR Exclusive (32 bit) - \details Executes a exclusive STR instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -__STATIC_FORCEINLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr) -{ - uint32_t result; - - __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); - return(result); -} - - -/** - \brief Remove the exclusive lock - \details Removes the exclusive lock which is created by LDREX. - */ -__STATIC_FORCEINLINE void __CLREX(void) -{ - __ASM volatile ("clrex" ::: "memory"); -} - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ - - -#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) -/** - \brief Signed Saturate - \details Saturates a signed value. - \param [in] ARG1 Value to be saturated - \param [in] ARG2 Bit position to saturate to (1..32) - \return Saturated value - */ -#define __SSAT(ARG1,ARG2) \ -__extension__ \ -({ \ - int32_t __RES, __ARG1 = (ARG1); \ - __ASM ("ssat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ - __RES; \ - }) - - -/** - \brief Unsigned Saturate - \details Saturates an unsigned value. - \param [in] ARG1 Value to be saturated - \param [in] ARG2 Bit position to saturate to (0..31) - \return Saturated value - */ -#define __USAT(ARG1,ARG2) \ - __extension__ \ -({ \ - uint32_t __RES, __ARG1 = (ARG1); \ - __ASM ("usat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ - __RES; \ - }) - - -/** - \brief Rotate Right with Extend (32 bit) - \details Moves each bit of a bitstring right by one bit. - The carry input is shifted in at the left end of the bitstring. - \param [in] value Value to rotate - \return Rotated value - */ -__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) -{ - uint32_t result; - - __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); - return(result); -} - - -/** - \brief LDRT Unprivileged (8 bit) - \details Executes a Unprivileged LDRT instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) -{ - uint32_t result; - -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) - __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); -#else - /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not - accepted by assembler. So has to use following less efficient pattern. - */ - __ASM volatile ("ldrbt %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); -#endif - return ((uint8_t) result); /* Add explicit type cast here */ -} - - -/** - \brief LDRT Unprivileged (16 bit) - \details Executes a Unprivileged LDRT instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) -{ - uint32_t result; - -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) - __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); -#else - /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not - accepted by assembler. So has to use following less efficient pattern. - */ - __ASM volatile ("ldrht %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); -#endif - return ((uint16_t) result); /* Add explicit type cast here */ -} - - -/** - \brief LDRT Unprivileged (32 bit) - \details Executes a Unprivileged LDRT instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); - return(result); -} - - -/** - \brief STRT Unprivileged (8 bit) - \details Executes a Unprivileged STRT instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) -{ - __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief STRT Unprivileged (16 bit) - \details Executes a Unprivileged STRT instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) -{ - __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief STRT Unprivileged (32 bit) - \details Executes a Unprivileged STRT instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) -{ - __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); -} - -#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ - -/** - \brief Signed Saturate - \details Saturates a signed value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (1..32) - \return Saturated value - */ -__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) -{ - if ((sat >= 1U) && (sat <= 32U)) - { - const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); - const int32_t min = -1 - max ; - if (val > max) - { - return max; - } - else if (val < min) - { - return min; - } - } - return val; -} - -/** - \brief Unsigned Saturate - \details Saturates an unsigned value. - \param [in] value Value to be saturated - \param [in] sat Bit position to saturate to (0..31) - \return Saturated value - */ -__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) -{ - if (sat <= 31U) - { - const uint32_t max = ((1U << sat) - 1U); - if (val > (int32_t)max) - { - return max; - } - else if (val < 0) - { - return 0U; - } - } - return (uint32_t)val; -} - -#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ - (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ - (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ - - -#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) -/** - \brief Load-Acquire (8 bit) - \details Executes a LDAB instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint8_t) result); -} - - -/** - \brief Load-Acquire (16 bit) - \details Executes a LDAH instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint16_t) result); -} - - -/** - \brief Load-Acquire (32 bit) - \details Executes a LDA instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) -{ - uint32_t result; - - __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) ); - return(result); -} - - -/** - \brief Store-Release (8 bit) - \details Executes a STLB instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) -{ - __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief Store-Release (16 bit) - \details Executes a STLH instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) -{ - __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief Store-Release (32 bit) - \details Executes a STL instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - */ -__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) -{ - __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); -} - - -/** - \brief Load-Acquire Exclusive (8 bit) - \details Executes a LDAB exclusive instruction for 8 bit value. - \param [in] ptr Pointer to data - \return value of type uint8_t at (*ptr) - */ -__STATIC_FORCEINLINE uint8_t __LDAEXB(volatile uint8_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldaexb %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint8_t) result); -} - - -/** - \brief Load-Acquire Exclusive (16 bit) - \details Executes a LDAH exclusive instruction for 16 bit values. - \param [in] ptr Pointer to data - \return value of type uint16_t at (*ptr) - */ -__STATIC_FORCEINLINE uint16_t __LDAEXH(volatile uint16_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldaexh %0, %1" : "=r" (result) : "Q" (*ptr) ); - return ((uint16_t) result); -} - - -/** - \brief Load-Acquire Exclusive (32 bit) - \details Executes a LDA exclusive instruction for 32 bit values. - \param [in] ptr Pointer to data - \return value of type uint32_t at (*ptr) - */ -__STATIC_FORCEINLINE uint32_t __LDAEX(volatile uint32_t *ptr) -{ - uint32_t result; - - __ASM volatile ("ldaex %0, %1" : "=r" (result) : "Q" (*ptr) ); - return(result); -} - - -/** - \brief Store-Release Exclusive (8 bit) - \details Executes a STLB exclusive instruction for 8 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -__STATIC_FORCEINLINE uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) -{ - uint32_t result; - - __ASM volatile ("stlexb %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); - return(result); -} - - -/** - \brief Store-Release Exclusive (16 bit) - \details Executes a STLH exclusive instruction for 16 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -__STATIC_FORCEINLINE uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) -{ - uint32_t result; - - __ASM volatile ("stlexh %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); - return(result); -} - - -/** - \brief Store-Release Exclusive (32 bit) - \details Executes a STL exclusive instruction for 32 bit values. - \param [in] value Value to store - \param [in] ptr Pointer to location - \return 0 Function succeeded - \return 1 Function failed - */ -__STATIC_FORCEINLINE uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) -{ - uint32_t result; - - __ASM volatile ("stlex %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); - return(result); -} - -#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ - -/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ - - -/* ################### Compiler specific Intrinsics ########################### */ -/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics - Access to dedicated SIMD instructions - @{ -*/ - -#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) - -__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - - -__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - - -__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -#define __SSAT16(ARG1,ARG2) \ -({ \ - int32_t __RES, __ARG1 = (ARG1); \ - __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ - __RES; \ - }) - -#define __USAT16(ARG1,ARG2) \ -({ \ - uint32_t __RES, __ARG1 = (ARG1); \ - __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ - __RES; \ - }) - -__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) -{ - uint32_t result; - - __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) -{ - uint32_t result; - - __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) -{ - uint32_t result; - - __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) -{ - union llreg_u{ - uint32_t w32[2]; - uint64_t w64; - } llr; - llr.w64 = acc; - -#ifndef __ARMEB__ /* Little endian */ - __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); -#else /* Big endian */ - __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); -#endif - - return(llr.w64); -} - -__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) -{ - uint32_t result; - - __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) -{ - int32_t result; - - __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) -{ - int32_t result; - - __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); - return(result); -} - -#if 0 -#define __PKHBT(ARG1,ARG2,ARG3) \ -({ \ - uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ - __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ - __RES; \ - }) - -#define __PKHTB(ARG1,ARG2,ARG3) \ -({ \ - uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ - if (ARG3 == 0) \ - __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \ - else \ - __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ - __RES; \ - }) -#endif - -#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ - ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) - -#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ - ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) - -__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) -{ - int32_t result; - - __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); - return(result); -} - -#endif /* (__ARM_FEATURE_DSP == 1) */ -/*@} end of group CMSIS_SIMD_intrinsics */ - - -#pragma GCC diagnostic pop - -#endif /* __CMSIS_GCC_H */ +/**************************************************************************//** + * @file cmsis_gcc.h + * @brief CMSIS compiler GCC header file + * @version V5.0.4 + * @date 09. April 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_GCC_H +#define __CMSIS_GCC_H + +/* ignore some GCC warnings */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wconversion" +#pragma GCC diagnostic ignored "-Wunused-parameter" + +/* Fallback for __has_builtin */ +#ifndef __has_builtin + #define __has_builtin(x) (0) +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif + + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_irq(void) +{ + __ASM volatile ("cpsie i" : : : "memory"); +} + + +/** + \brief Disable IRQ Interrupts + \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"); +} + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) :: "memory"); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_fault_irq(void) +{ + __ASM volatile ("cpsie f" : : : "memory"); +} + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __disable_fault_irq(void) +{ + __ASM volatile ("cpsid f" : : : "memory"); +} + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +__STATIC_FORCEINLINE uint32_t __get_FPSCR(void) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#if __has_builtin(__builtin_arm_get_fpscr) +// Re-enable using built-in when GCC has been fixed +// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) + /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ + return __builtin_arm_get_fpscr(); +#else + uint32_t result; + + __ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); + return(result); +#endif +#else + return(0U); +#endif +} + + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +__STATIC_FORCEINLINE void __set_FPSCR(uint32_t fpscr) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#if __has_builtin(__builtin_arm_set_fpscr) +// Re-enable using built-in when GCC has been fixed +// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) + /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ + __builtin_arm_set_fpscr(fpscr); +#else + __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory"); +#endif +#else + (void)fpscr; +#endif +} + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_RW_REG(r) "+l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_RW_REG(r) "+r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP() __ASM volatile ("nop") + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI() __ASM volatile ("wfi") + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE() __ASM volatile ("wfe") + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV() __ASM volatile ("sev") + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +__STATIC_FORCEINLINE void __ISB(void) +{ + __ASM volatile ("isb 0xF":::"memory"); +} + + +/** + \brief Data Synchronization Barrier + \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"); +} + + +/** + \brief Data Memory Barrier + \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"); +} + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __REV(uint32_t value) +{ +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) + return __builtin_bswap32(value); +#else + uint32_t result; + + __ASM volatile ("rev %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +#endif +} + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __REV16(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rev16 %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +} + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE int16_t __REVSH(int16_t value) +{ +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + return (int16_t)__builtin_bswap16(value); +#else + int16_t result; + + __ASM volatile ("revsh %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +#endif +} + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __RBIT(uint32_t value) +{ + uint32_t result; + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); +#else + uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ + + result = value; /* r will be reversed bits of v; first get LSB of v */ + for (value >>= 1U; value != 0U; value >>= 1U) + { + result <<= 1U; + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ +#endif + return result; +} + + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +#define __CLZ (uint8_t)__builtin_clz + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDREXB(volatile uint8_t *addr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrexb %0, %1" : "=r" (result) : "Q" (*addr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); +#endif + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDREXH(volatile uint16_t *addr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrexh %0, %1" : "=r" (result) : "Q" (*addr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); +#endif + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDREXW(volatile uint32_t *addr) +{ + uint32_t result; + + __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); + return(result); +} + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXB(uint8_t value, volatile uint8_t *addr) +{ + uint32_t result; + + __ASM volatile ("strexb %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXH(uint16_t value, volatile uint16_t *addr) +{ + uint32_t result; + + __ASM volatile ("strexh %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr) +{ + uint32_t result; + + __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); + return(result); +} + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +__STATIC_FORCEINLINE void __CLREX(void) +{ + __ASM volatile ("clrex" ::: "memory"); +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] ARG1 Value to be saturated + \param [in] ARG2 Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT(ARG1,ARG2) \ +__extension__ \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM ("ssat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] ARG1 Value to be saturated + \param [in] ARG2 Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT(ARG1,ARG2) \ + __extension__ \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM ("usat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrbt %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); +#endif + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrht %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); +#endif + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAEXB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaexb %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAEXH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaexh %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDAEX(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaex %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlexb %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlexh %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlex %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); + return(result); +} + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#define __SSAT16(ARG1,ARG2) \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +#define __USAT16(ARG1,ARG2) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +#if 0 +#define __PKHBT(ARG1,ARG2,ARG3) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) + +#define __PKHTB(ARG1,ARG2,ARG3) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + if (ARG3 == 0) \ + __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \ + else \ + __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) +#endif + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#pragma GCC diagnostic pop + +#endif /* __CMSIS_GCC_H */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_iccarm.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_iccarm.h index 11c4af0..3c90a2c 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_iccarm.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_iccarm.h @@ -1,935 +1,935 @@ -/**************************************************************************//** - * @file cmsis_iccarm.h - * @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file - * @version V5.0.7 - * @date 19. June 2018 - ******************************************************************************/ - -//------------------------------------------------------------------------------ -// -// Copyright (c) 2017-2018 IAR Systems -// -// Licensed under the Apache License, Version 2.0 (the "License") -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//------------------------------------------------------------------------------ - - -#ifndef __CMSIS_ICCARM_H__ -#define __CMSIS_ICCARM_H__ - -#ifndef __ICCARM__ - #error This file should only be compiled by ICCARM -#endif - -#pragma system_include - -#define __IAR_FT _Pragma("inline=forced") __intrinsic - -#if (__VER__ >= 8000000) - #define __ICCARM_V8 1 -#else - #define __ICCARM_V8 0 -#endif - -#ifndef __ALIGNED - #if __ICCARM_V8 - #define __ALIGNED(x) __attribute__((aligned(x))) - #elif (__VER__ >= 7080000) - /* Needs IAR language extensions */ - #define __ALIGNED(x) __attribute__((aligned(x))) - #else - #warning No compiler specific solution for __ALIGNED.__ALIGNED is ignored. - #define __ALIGNED(x) - #endif -#endif - - -/* Define compiler macros for CPU architecture, used in CMSIS 5. - */ -#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__ || __ARM_ARCH_8M_BASE__ || __ARM_ARCH_8M_MAIN__ -/* Macros already defined */ -#else - #if defined(__ARM8M_MAINLINE__) || defined(__ARM8EM_MAINLINE__) - #define __ARM_ARCH_8M_MAIN__ 1 - #elif defined(__ARM8M_BASELINE__) - #define __ARM_ARCH_8M_BASE__ 1 - #elif defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'M' - #if __ARM_ARCH == 6 - #define __ARM_ARCH_6M__ 1 - #elif __ARM_ARCH == 7 - #if __ARM_FEATURE_DSP - #define __ARM_ARCH_7EM__ 1 - #else - #define __ARM_ARCH_7M__ 1 - #endif - #endif /* __ARM_ARCH */ - #endif /* __ARM_ARCH_PROFILE == 'M' */ -#endif - -/* Alternativ core deduction for older ICCARM's */ -#if !defined(__ARM_ARCH_6M__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__) && \ - !defined(__ARM_ARCH_8M_BASE__) && !defined(__ARM_ARCH_8M_MAIN__) - #if defined(__ARM6M__) && (__CORE__ == __ARM6M__) - #define __ARM_ARCH_6M__ 1 - #elif defined(__ARM7M__) && (__CORE__ == __ARM7M__) - #define __ARM_ARCH_7M__ 1 - #elif defined(__ARM7EM__) && (__CORE__ == __ARM7EM__) - #define __ARM_ARCH_7EM__ 1 - #elif defined(__ARM8M_BASELINE__) && (__CORE == __ARM8M_BASELINE__) - #define __ARM_ARCH_8M_BASE__ 1 - #elif defined(__ARM8M_MAINLINE__) && (__CORE == __ARM8M_MAINLINE__) - #define __ARM_ARCH_8M_MAIN__ 1 - #elif defined(__ARM8EM_MAINLINE__) && (__CORE == __ARM8EM_MAINLINE__) - #define __ARM_ARCH_8M_MAIN__ 1 - #else - #error "Unknown target." - #endif -#endif - - - -#if defined(__ARM_ARCH_6M__) && __ARM_ARCH_6M__==1 - #define __IAR_M0_FAMILY 1 -#elif defined(__ARM_ARCH_8M_BASE__) && __ARM_ARCH_8M_BASE__==1 - #define __IAR_M0_FAMILY 1 -#else - #define __IAR_M0_FAMILY 0 -#endif - - -#ifndef __ASM - #define __ASM __asm -#endif - -#ifndef __INLINE - #define __INLINE inline -#endif - -#ifndef __NO_RETURN - #if __ICCARM_V8 - #define __NO_RETURN __attribute__((__noreturn__)) - #else - #define __NO_RETURN _Pragma("object_attribute=__noreturn") - #endif -#endif - -#ifndef __PACKED - #if __ICCARM_V8 - #define __PACKED __attribute__((packed, aligned(1))) - #else - /* Needs IAR language extensions */ - #define __PACKED __packed - #endif -#endif - -#ifndef __PACKED_STRUCT - #if __ICCARM_V8 - #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) - #else - /* Needs IAR language extensions */ - #define __PACKED_STRUCT __packed struct - #endif -#endif - -#ifndef __PACKED_UNION - #if __ICCARM_V8 - #define __PACKED_UNION union __attribute__((packed, aligned(1))) - #else - /* Needs IAR language extensions */ - #define __PACKED_UNION __packed union - #endif -#endif - -#ifndef __RESTRICT - #define __RESTRICT __restrict -#endif - -#ifndef __STATIC_INLINE - #define __STATIC_INLINE static inline -#endif - -#ifndef __FORCEINLINE - #define __FORCEINLINE _Pragma("inline=forced") -#endif - -#ifndef __STATIC_FORCEINLINE - #define __STATIC_FORCEINLINE __FORCEINLINE __STATIC_INLINE -#endif - -#ifndef __UNALIGNED_UINT16_READ -#pragma language=save -#pragma language=extended -__IAR_FT uint16_t __iar_uint16_read(void const *ptr) -{ - return *(__packed uint16_t*)(ptr); -} -#pragma language=restore -#define __UNALIGNED_UINT16_READ(PTR) __iar_uint16_read(PTR) -#endif - - -#ifndef __UNALIGNED_UINT16_WRITE -#pragma language=save -#pragma language=extended -__IAR_FT void __iar_uint16_write(void const *ptr, uint16_t val) -{ - *(__packed uint16_t*)(ptr) = val;; -} -#pragma language=restore -#define __UNALIGNED_UINT16_WRITE(PTR,VAL) __iar_uint16_write(PTR,VAL) -#endif - -#ifndef __UNALIGNED_UINT32_READ -#pragma language=save -#pragma language=extended -__IAR_FT uint32_t __iar_uint32_read(void const *ptr) -{ - return *(__packed uint32_t*)(ptr); -} -#pragma language=restore -#define __UNALIGNED_UINT32_READ(PTR) __iar_uint32_read(PTR) -#endif - -#ifndef __UNALIGNED_UINT32_WRITE -#pragma language=save -#pragma language=extended -__IAR_FT void __iar_uint32_write(void const *ptr, uint32_t val) -{ - *(__packed uint32_t*)(ptr) = val;; -} -#pragma language=restore -#define __UNALIGNED_UINT32_WRITE(PTR,VAL) __iar_uint32_write(PTR,VAL) -#endif - -#ifndef __UNALIGNED_UINT32 /* deprecated */ -#pragma language=save -#pragma language=extended -__packed struct __iar_u32 { uint32_t v; }; -#pragma language=restore -#define __UNALIGNED_UINT32(PTR) (((struct __iar_u32 *)(PTR))->v) -#endif - -#ifndef __USED - #if __ICCARM_V8 - #define __USED __attribute__((used)) - #else - #define __USED _Pragma("__root") - #endif -#endif - -#ifndef __WEAK - #if __ICCARM_V8 - #define __WEAK __attribute__((weak)) - #else - #define __WEAK _Pragma("__weak") - #endif -#endif - - -#ifndef __ICCARM_INTRINSICS_VERSION__ - #define __ICCARM_INTRINSICS_VERSION__ 0 -#endif - -#if __ICCARM_INTRINSICS_VERSION__ == 2 - - #if defined(__CLZ) - #undef __CLZ - #endif - #if defined(__REVSH) - #undef __REVSH - #endif - #if defined(__RBIT) - #undef __RBIT - #endif - #if defined(__SSAT) - #undef __SSAT - #endif - #if defined(__USAT) - #undef __USAT - #endif - - #include "iccarm_builtin.h" - - #define __disable_fault_irq __iar_builtin_disable_fiq - #define __disable_irq __iar_builtin_disable_interrupt - #define __enable_fault_irq __iar_builtin_enable_fiq - #define __enable_irq __iar_builtin_enable_interrupt - #define __arm_rsr __iar_builtin_rsr - #define __arm_wsr __iar_builtin_wsr - - - #define __get_APSR() (__arm_rsr("APSR")) - #define __get_BASEPRI() (__arm_rsr("BASEPRI")) - #define __get_CONTROL() (__arm_rsr("CONTROL")) - #define __get_FAULTMASK() (__arm_rsr("FAULTMASK")) - - #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) - #define __get_FPSCR() (__arm_rsr("FPSCR")) - #define __set_FPSCR(VALUE) (__arm_wsr("FPSCR", (VALUE))) - #else - #define __get_FPSCR() ( 0 ) - #define __set_FPSCR(VALUE) ((void)VALUE) - #endif - - #define __get_IPSR() (__arm_rsr("IPSR")) - #define __get_MSP() (__arm_rsr("MSP")) - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - #define __get_MSPLIM() (0U) - #else - #define __get_MSPLIM() (__arm_rsr("MSPLIM")) - #endif - #define __get_PRIMASK() (__arm_rsr("PRIMASK")) - #define __get_PSP() (__arm_rsr("PSP")) - - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - #define __get_PSPLIM() (0U) - #else - #define __get_PSPLIM() (__arm_rsr("PSPLIM")) - #endif - - #define __get_xPSR() (__arm_rsr("xPSR")) - - #define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE))) - #define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE))) - #define __set_CONTROL(VALUE) (__arm_wsr("CONTROL", (VALUE))) - #define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE))) - #define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE))) - - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - #define __set_MSPLIM(VALUE) ((void)(VALUE)) - #else - #define __set_MSPLIM(VALUE) (__arm_wsr("MSPLIM", (VALUE))) - #endif - #define __set_PRIMASK(VALUE) (__arm_wsr("PRIMASK", (VALUE))) - #define __set_PSP(VALUE) (__arm_wsr("PSP", (VALUE))) - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - #define __set_PSPLIM(VALUE) ((void)(VALUE)) - #else - #define __set_PSPLIM(VALUE) (__arm_wsr("PSPLIM", (VALUE))) - #endif - - #define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS")) - #define __TZ_set_CONTROL_NS(VALUE) (__arm_wsr("CONTROL_NS", (VALUE))) - #define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS")) - #define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE))) - #define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS")) - #define __TZ_set_MSP_NS(VALUE) (__arm_wsr("MSP_NS", (VALUE))) - #define __TZ_get_SP_NS() (__arm_rsr("SP_NS")) - #define __TZ_set_SP_NS(VALUE) (__arm_wsr("SP_NS", (VALUE))) - #define __TZ_get_PRIMASK_NS() (__arm_rsr("PRIMASK_NS")) - #define __TZ_set_PRIMASK_NS(VALUE) (__arm_wsr("PRIMASK_NS", (VALUE))) - #define __TZ_get_BASEPRI_NS() (__arm_rsr("BASEPRI_NS")) - #define __TZ_set_BASEPRI_NS(VALUE) (__arm_wsr("BASEPRI_NS", (VALUE))) - #define __TZ_get_FAULTMASK_NS() (__arm_rsr("FAULTMASK_NS")) - #define __TZ_set_FAULTMASK_NS(VALUE)(__arm_wsr("FAULTMASK_NS", (VALUE))) - - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - #define __TZ_get_PSPLIM_NS() (0U) - #define __TZ_set_PSPLIM_NS(VALUE) ((void)(VALUE)) - #else - #define __TZ_get_PSPLIM_NS() (__arm_rsr("PSPLIM_NS")) - #define __TZ_set_PSPLIM_NS(VALUE) (__arm_wsr("PSPLIM_NS", (VALUE))) - #endif - - #define __TZ_get_MSPLIM_NS() (__arm_rsr("MSPLIM_NS")) - #define __TZ_set_MSPLIM_NS(VALUE) (__arm_wsr("MSPLIM_NS", (VALUE))) - - #define __NOP __iar_builtin_no_operation - - #define __CLZ __iar_builtin_CLZ - #define __CLREX __iar_builtin_CLREX - - #define __DMB __iar_builtin_DMB - #define __DSB __iar_builtin_DSB - #define __ISB __iar_builtin_ISB - - #define __LDREXB __iar_builtin_LDREXB - #define __LDREXH __iar_builtin_LDREXH - #define __LDREXW __iar_builtin_LDREX - - #define __RBIT __iar_builtin_RBIT - #define __REV __iar_builtin_REV - #define __REV16 __iar_builtin_REV16 - - __IAR_FT int16_t __REVSH(int16_t val) - { - return (int16_t) __iar_builtin_REVSH(val); - } - - #define __ROR __iar_builtin_ROR - #define __RRX __iar_builtin_RRX - - #define __SEV __iar_builtin_SEV - - #if !__IAR_M0_FAMILY - #define __SSAT __iar_builtin_SSAT - #endif - - #define __STREXB __iar_builtin_STREXB - #define __STREXH __iar_builtin_STREXH - #define __STREXW __iar_builtin_STREX - - #if !__IAR_M0_FAMILY - #define __USAT __iar_builtin_USAT - #endif - - #define __WFE __iar_builtin_WFE - #define __WFI __iar_builtin_WFI - - #if __ARM_MEDIA__ - #define __SADD8 __iar_builtin_SADD8 - #define __QADD8 __iar_builtin_QADD8 - #define __SHADD8 __iar_builtin_SHADD8 - #define __UADD8 __iar_builtin_UADD8 - #define __UQADD8 __iar_builtin_UQADD8 - #define __UHADD8 __iar_builtin_UHADD8 - #define __SSUB8 __iar_builtin_SSUB8 - #define __QSUB8 __iar_builtin_QSUB8 - #define __SHSUB8 __iar_builtin_SHSUB8 - #define __USUB8 __iar_builtin_USUB8 - #define __UQSUB8 __iar_builtin_UQSUB8 - #define __UHSUB8 __iar_builtin_UHSUB8 - #define __SADD16 __iar_builtin_SADD16 - #define __QADD16 __iar_builtin_QADD16 - #define __SHADD16 __iar_builtin_SHADD16 - #define __UADD16 __iar_builtin_UADD16 - #define __UQADD16 __iar_builtin_UQADD16 - #define __UHADD16 __iar_builtin_UHADD16 - #define __SSUB16 __iar_builtin_SSUB16 - #define __QSUB16 __iar_builtin_QSUB16 - #define __SHSUB16 __iar_builtin_SHSUB16 - #define __USUB16 __iar_builtin_USUB16 - #define __UQSUB16 __iar_builtin_UQSUB16 - #define __UHSUB16 __iar_builtin_UHSUB16 - #define __SASX __iar_builtin_SASX - #define __QASX __iar_builtin_QASX - #define __SHASX __iar_builtin_SHASX - #define __UASX __iar_builtin_UASX - #define __UQASX __iar_builtin_UQASX - #define __UHASX __iar_builtin_UHASX - #define __SSAX __iar_builtin_SSAX - #define __QSAX __iar_builtin_QSAX - #define __SHSAX __iar_builtin_SHSAX - #define __USAX __iar_builtin_USAX - #define __UQSAX __iar_builtin_UQSAX - #define __UHSAX __iar_builtin_UHSAX - #define __USAD8 __iar_builtin_USAD8 - #define __USADA8 __iar_builtin_USADA8 - #define __SSAT16 __iar_builtin_SSAT16 - #define __USAT16 __iar_builtin_USAT16 - #define __UXTB16 __iar_builtin_UXTB16 - #define __UXTAB16 __iar_builtin_UXTAB16 - #define __SXTB16 __iar_builtin_SXTB16 - #define __SXTAB16 __iar_builtin_SXTAB16 - #define __SMUAD __iar_builtin_SMUAD - #define __SMUADX __iar_builtin_SMUADX - #define __SMMLA __iar_builtin_SMMLA - #define __SMLAD __iar_builtin_SMLAD - #define __SMLADX __iar_builtin_SMLADX - #define __SMLALD __iar_builtin_SMLALD - #define __SMLALDX __iar_builtin_SMLALDX - #define __SMUSD __iar_builtin_SMUSD - #define __SMUSDX __iar_builtin_SMUSDX - #define __SMLSD __iar_builtin_SMLSD - #define __SMLSDX __iar_builtin_SMLSDX - #define __SMLSLD __iar_builtin_SMLSLD - #define __SMLSLDX __iar_builtin_SMLSLDX - #define __SEL __iar_builtin_SEL - #define __QADD __iar_builtin_QADD - #define __QSUB __iar_builtin_QSUB - #define __PKHBT __iar_builtin_PKHBT - #define __PKHTB __iar_builtin_PKHTB - #endif - -#else /* __ICCARM_INTRINSICS_VERSION__ == 2 */ - - #if __IAR_M0_FAMILY - /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ - #define __CLZ __cmsis_iar_clz_not_active - #define __SSAT __cmsis_iar_ssat_not_active - #define __USAT __cmsis_iar_usat_not_active - #define __RBIT __cmsis_iar_rbit_not_active - #define __get_APSR __cmsis_iar_get_APSR_not_active - #endif - - - #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) - #define __get_FPSCR __cmsis_iar_get_FPSR_not_active - #define __set_FPSCR __cmsis_iar_set_FPSR_not_active - #endif - - #ifdef __INTRINSICS_INCLUDED - #error intrinsics.h is already included previously! - #endif - - #include - - #if __IAR_M0_FAMILY - /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ - #undef __CLZ - #undef __SSAT - #undef __USAT - #undef __RBIT - #undef __get_APSR - - __STATIC_INLINE uint8_t __CLZ(uint32_t data) - { - if (data == 0U) { return 32U; } - - uint32_t count = 0U; - uint32_t mask = 0x80000000U; - - while ((data & mask) == 0U) - { - count += 1U; - mask = mask >> 1U; - } - return count; - } - - __STATIC_INLINE uint32_t __RBIT(uint32_t v) - { - uint8_t sc = 31U; - uint32_t r = v; - for (v >>= 1U; v; v >>= 1U) - { - r <<= 1U; - r |= v & 1U; - sc--; - } - return (r << sc); - } - - __STATIC_INLINE uint32_t __get_APSR(void) - { - uint32_t res; - __asm("MRS %0,APSR" : "=r" (res)); - return res; - } - - #endif - - #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ - (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) - #undef __get_FPSCR - #undef __set_FPSCR - #define __get_FPSCR() (0) - #define __set_FPSCR(VALUE) ((void)VALUE) - #endif - - #pragma diag_suppress=Pe940 - #pragma diag_suppress=Pe177 - - #define __enable_irq __enable_interrupt - #define __disable_irq __disable_interrupt - #define __NOP __no_operation - - #define __get_xPSR __get_PSR - - #if (!defined(__ARM_ARCH_6M__) || __ARM_ARCH_6M__==0) - - __IAR_FT uint32_t __LDREXW(uint32_t volatile *ptr) - { - return __LDREX((unsigned long *)ptr); - } - - __IAR_FT uint32_t __STREXW(uint32_t value, uint32_t volatile *ptr) - { - return __STREX(value, (unsigned long *)ptr); - } - #endif - - - /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ - #if (__CORTEX_M >= 0x03) - - __IAR_FT uint32_t __RRX(uint32_t value) - { - uint32_t result; - __ASM("RRX %0, %1" : "=r"(result) : "r" (value) : "cc"); - return(result); - } - - __IAR_FT void __set_BASEPRI_MAX(uint32_t value) - { - __asm volatile("MSR BASEPRI_MAX,%0"::"r" (value)); - } - - - #define __enable_fault_irq __enable_fiq - #define __disable_fault_irq __disable_fiq - - - #endif /* (__CORTEX_M >= 0x03) */ - - __IAR_FT uint32_t __ROR(uint32_t op1, uint32_t op2) - { - return (op1 >> op2) | (op1 << ((sizeof(op1)*8)-op2)); - } - - #if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) - - __IAR_FT uint32_t __get_MSPLIM(void) - { - uint32_t res; - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - res = 0U; - #else - __asm volatile("MRS %0,MSPLIM" : "=r" (res)); - #endif - return res; - } - - __IAR_FT void __set_MSPLIM(uint32_t value) - { - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure MSPLIM is RAZ/WI - (void)value; - #else - __asm volatile("MSR MSPLIM,%0" :: "r" (value)); - #endif - } - - __IAR_FT uint32_t __get_PSPLIM(void) - { - uint32_t res; - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - res = 0U; - #else - __asm volatile("MRS %0,PSPLIM" : "=r" (res)); - #endif - return res; - } - - __IAR_FT void __set_PSPLIM(uint32_t value) - { - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - (void)value; - #else - __asm volatile("MSR PSPLIM,%0" :: "r" (value)); - #endif - } - - __IAR_FT uint32_t __TZ_get_CONTROL_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,CONTROL_NS" : "=r" (res)); - return res; - } - - __IAR_FT void __TZ_set_CONTROL_NS(uint32_t value) - { - __asm volatile("MSR CONTROL_NS,%0" :: "r" (value)); - } - - __IAR_FT uint32_t __TZ_get_PSP_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,PSP_NS" : "=r" (res)); - return res; - } - - __IAR_FT void __TZ_set_PSP_NS(uint32_t value) - { - __asm volatile("MSR PSP_NS,%0" :: "r" (value)); - } - - __IAR_FT uint32_t __TZ_get_MSP_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,MSP_NS" : "=r" (res)); - return res; - } - - __IAR_FT void __TZ_set_MSP_NS(uint32_t value) - { - __asm volatile("MSR MSP_NS,%0" :: "r" (value)); - } - - __IAR_FT uint32_t __TZ_get_SP_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,SP_NS" : "=r" (res)); - return res; - } - __IAR_FT void __TZ_set_SP_NS(uint32_t value) - { - __asm volatile("MSR SP_NS,%0" :: "r" (value)); - } - - __IAR_FT uint32_t __TZ_get_PRIMASK_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,PRIMASK_NS" : "=r" (res)); - return res; - } - - __IAR_FT void __TZ_set_PRIMASK_NS(uint32_t value) - { - __asm volatile("MSR PRIMASK_NS,%0" :: "r" (value)); - } - - __IAR_FT uint32_t __TZ_get_BASEPRI_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,BASEPRI_NS" : "=r" (res)); - return res; - } - - __IAR_FT void __TZ_set_BASEPRI_NS(uint32_t value) - { - __asm volatile("MSR BASEPRI_NS,%0" :: "r" (value)); - } - - __IAR_FT uint32_t __TZ_get_FAULTMASK_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,FAULTMASK_NS" : "=r" (res)); - return res; - } - - __IAR_FT void __TZ_set_FAULTMASK_NS(uint32_t value) - { - __asm volatile("MSR FAULTMASK_NS,%0" :: "r" (value)); - } - - __IAR_FT uint32_t __TZ_get_PSPLIM_NS(void) - { - uint32_t res; - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - res = 0U; - #else - __asm volatile("MRS %0,PSPLIM_NS" : "=r" (res)); - #endif - return res; - } - - __IAR_FT void __TZ_set_PSPLIM_NS(uint32_t value) - { - #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ - (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) - // without main extensions, the non-secure PSPLIM is RAZ/WI - (void)value; - #else - __asm volatile("MSR PSPLIM_NS,%0" :: "r" (value)); - #endif - } - - __IAR_FT uint32_t __TZ_get_MSPLIM_NS(void) - { - uint32_t res; - __asm volatile("MRS %0,MSPLIM_NS" : "=r" (res)); - return res; - } - - __IAR_FT void __TZ_set_MSPLIM_NS(uint32_t value) - { - __asm volatile("MSR MSPLIM_NS,%0" :: "r" (value)); - } - - #endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ - -#endif /* __ICCARM_INTRINSICS_VERSION__ == 2 */ - -#define __BKPT(value) __asm volatile ("BKPT %0" : : "i"(value)) - -#if __IAR_M0_FAMILY - __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) - { - if ((sat >= 1U) && (sat <= 32U)) - { - const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); - const int32_t min = -1 - max ; - if (val > max) - { - return max; - } - else if (val < min) - { - return min; - } - } - return val; - } - - __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) - { - if (sat <= 31U) - { - const uint32_t max = ((1U << sat) - 1U); - if (val > (int32_t)max) - { - return max; - } - else if (val < 0) - { - return 0U; - } - } - return (uint32_t)val; - } -#endif - -#if (__CORTEX_M >= 0x03) /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ - - __IAR_FT uint8_t __LDRBT(volatile uint8_t *addr) - { - uint32_t res; - __ASM("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); - return ((uint8_t)res); - } - - __IAR_FT uint16_t __LDRHT(volatile uint16_t *addr) - { - uint32_t res; - __ASM("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); - return ((uint16_t)res); - } - - __IAR_FT uint32_t __LDRT(volatile uint32_t *addr) - { - uint32_t res; - __ASM("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); - return res; - } - - __IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr) - { - __ASM("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); - } - - __IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr) - { - __ASM("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); - } - - __IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr) - { - __ASM("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory"); - } - -#endif /* (__CORTEX_M >= 0x03) */ - -#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ - (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) - - - __IAR_FT uint8_t __LDAB(volatile uint8_t *ptr) - { - uint32_t res; - __ASM volatile ("LDAB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); - return ((uint8_t)res); - } - - __IAR_FT uint16_t __LDAH(volatile uint16_t *ptr) - { - uint32_t res; - __ASM volatile ("LDAH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); - return ((uint16_t)res); - } - - __IAR_FT uint32_t __LDA(volatile uint32_t *ptr) - { - uint32_t res; - __ASM volatile ("LDA %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); - return res; - } - - __IAR_FT void __STLB(uint8_t value, volatile uint8_t *ptr) - { - __ASM volatile ("STLB %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); - } - - __IAR_FT void __STLH(uint16_t value, volatile uint16_t *ptr) - { - __ASM volatile ("STLH %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); - } - - __IAR_FT void __STL(uint32_t value, volatile uint32_t *ptr) - { - __ASM volatile ("STL %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); - } - - __IAR_FT uint8_t __LDAEXB(volatile uint8_t *ptr) - { - uint32_t res; - __ASM volatile ("LDAEXB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); - return ((uint8_t)res); - } - - __IAR_FT uint16_t __LDAEXH(volatile uint16_t *ptr) - { - uint32_t res; - __ASM volatile ("LDAEXH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); - return ((uint16_t)res); - } - - __IAR_FT uint32_t __LDAEX(volatile uint32_t *ptr) - { - uint32_t res; - __ASM volatile ("LDAEX %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); - return res; - } - - __IAR_FT uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) - { - uint32_t res; - __ASM volatile ("STLEXB %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); - return res; - } - - __IAR_FT uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) - { - uint32_t res; - __ASM volatile ("STLEXH %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); - return res; - } - - __IAR_FT uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) - { - uint32_t res; - __ASM volatile ("STLEX %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); - return res; - } - -#endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ - -#undef __IAR_FT -#undef __IAR_M0_FAMILY -#undef __ICCARM_V8 - -#pragma diag_default=Pe940 -#pragma diag_default=Pe177 - -#endif /* __CMSIS_ICCARM_H__ */ +/**************************************************************************//** + * @file cmsis_iccarm.h + * @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file + * @version V5.0.7 + * @date 19. June 2018 + ******************************************************************************/ + +//------------------------------------------------------------------------------ +// +// Copyright (c) 2017-2018 IAR Systems +// +// Licensed under the Apache License, Version 2.0 (the "License") +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//------------------------------------------------------------------------------ + + +#ifndef __CMSIS_ICCARM_H__ +#define __CMSIS_ICCARM_H__ + +#ifndef __ICCARM__ + #error This file should only be compiled by ICCARM +#endif + +#pragma system_include + +#define __IAR_FT _Pragma("inline=forced") __intrinsic + +#if (__VER__ >= 8000000) + #define __ICCARM_V8 1 +#else + #define __ICCARM_V8 0 +#endif + +#ifndef __ALIGNED + #if __ICCARM_V8 + #define __ALIGNED(x) __attribute__((aligned(x))) + #elif (__VER__ >= 7080000) + /* Needs IAR language extensions */ + #define __ALIGNED(x) __attribute__((aligned(x))) + #else + #warning No compiler specific solution for __ALIGNED.__ALIGNED is ignored. + #define __ALIGNED(x) + #endif +#endif + + +/* Define compiler macros for CPU architecture, used in CMSIS 5. + */ +#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__ || __ARM_ARCH_8M_BASE__ || __ARM_ARCH_8M_MAIN__ +/* Macros already defined */ +#else + #if defined(__ARM8M_MAINLINE__) || defined(__ARM8EM_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #elif defined(__ARM8M_BASELINE__) + #define __ARM_ARCH_8M_BASE__ 1 + #elif defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'M' + #if __ARM_ARCH == 6 + #define __ARM_ARCH_6M__ 1 + #elif __ARM_ARCH == 7 + #if __ARM_FEATURE_DSP + #define __ARM_ARCH_7EM__ 1 + #else + #define __ARM_ARCH_7M__ 1 + #endif + #endif /* __ARM_ARCH */ + #endif /* __ARM_ARCH_PROFILE == 'M' */ +#endif + +/* Alternativ core deduction for older ICCARM's */ +#if !defined(__ARM_ARCH_6M__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__) && \ + !defined(__ARM_ARCH_8M_BASE__) && !defined(__ARM_ARCH_8M_MAIN__) + #if defined(__ARM6M__) && (__CORE__ == __ARM6M__) + #define __ARM_ARCH_6M__ 1 + #elif defined(__ARM7M__) && (__CORE__ == __ARM7M__) + #define __ARM_ARCH_7M__ 1 + #elif defined(__ARM7EM__) && (__CORE__ == __ARM7EM__) + #define __ARM_ARCH_7EM__ 1 + #elif defined(__ARM8M_BASELINE__) && (__CORE == __ARM8M_BASELINE__) + #define __ARM_ARCH_8M_BASE__ 1 + #elif defined(__ARM8M_MAINLINE__) && (__CORE == __ARM8M_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #elif defined(__ARM8EM_MAINLINE__) && (__CORE == __ARM8EM_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #else + #error "Unknown target." + #endif +#endif + + + +#if defined(__ARM_ARCH_6M__) && __ARM_ARCH_6M__==1 + #define __IAR_M0_FAMILY 1 +#elif defined(__ARM_ARCH_8M_BASE__) && __ARM_ARCH_8M_BASE__==1 + #define __IAR_M0_FAMILY 1 +#else + #define __IAR_M0_FAMILY 0 +#endif + + +#ifndef __ASM + #define __ASM __asm +#endif + +#ifndef __INLINE + #define __INLINE inline +#endif + +#ifndef __NO_RETURN + #if __ICCARM_V8 + #define __NO_RETURN __attribute__((__noreturn__)) + #else + #define __NO_RETURN _Pragma("object_attribute=__noreturn") + #endif +#endif + +#ifndef __PACKED + #if __ICCARM_V8 + #define __PACKED __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED __packed + #endif +#endif + +#ifndef __PACKED_STRUCT + #if __ICCARM_V8 + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED_STRUCT __packed struct + #endif +#endif + +#ifndef __PACKED_UNION + #if __ICCARM_V8 + #define __PACKED_UNION union __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED_UNION __packed union + #endif +#endif + +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif + +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline +#endif + +#ifndef __FORCEINLINE + #define __FORCEINLINE _Pragma("inline=forced") +#endif + +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __FORCEINLINE __STATIC_INLINE +#endif + +#ifndef __UNALIGNED_UINT16_READ +#pragma language=save +#pragma language=extended +__IAR_FT uint16_t __iar_uint16_read(void const *ptr) +{ + return *(__packed uint16_t*)(ptr); +} +#pragma language=restore +#define __UNALIGNED_UINT16_READ(PTR) __iar_uint16_read(PTR) +#endif + + +#ifndef __UNALIGNED_UINT16_WRITE +#pragma language=save +#pragma language=extended +__IAR_FT void __iar_uint16_write(void const *ptr, uint16_t val) +{ + *(__packed uint16_t*)(ptr) = val;; +} +#pragma language=restore +#define __UNALIGNED_UINT16_WRITE(PTR,VAL) __iar_uint16_write(PTR,VAL) +#endif + +#ifndef __UNALIGNED_UINT32_READ +#pragma language=save +#pragma language=extended +__IAR_FT uint32_t __iar_uint32_read(void const *ptr) +{ + return *(__packed uint32_t*)(ptr); +} +#pragma language=restore +#define __UNALIGNED_UINT32_READ(PTR) __iar_uint32_read(PTR) +#endif + +#ifndef __UNALIGNED_UINT32_WRITE +#pragma language=save +#pragma language=extended +__IAR_FT void __iar_uint32_write(void const *ptr, uint32_t val) +{ + *(__packed uint32_t*)(ptr) = val;; +} +#pragma language=restore +#define __UNALIGNED_UINT32_WRITE(PTR,VAL) __iar_uint32_write(PTR,VAL) +#endif + +#ifndef __UNALIGNED_UINT32 /* deprecated */ +#pragma language=save +#pragma language=extended +__packed struct __iar_u32 { uint32_t v; }; +#pragma language=restore +#define __UNALIGNED_UINT32(PTR) (((struct __iar_u32 *)(PTR))->v) +#endif + +#ifndef __USED + #if __ICCARM_V8 + #define __USED __attribute__((used)) + #else + #define __USED _Pragma("__root") + #endif +#endif + +#ifndef __WEAK + #if __ICCARM_V8 + #define __WEAK __attribute__((weak)) + #else + #define __WEAK _Pragma("__weak") + #endif +#endif + + +#ifndef __ICCARM_INTRINSICS_VERSION__ + #define __ICCARM_INTRINSICS_VERSION__ 0 +#endif + +#if __ICCARM_INTRINSICS_VERSION__ == 2 + + #if defined(__CLZ) + #undef __CLZ + #endif + #if defined(__REVSH) + #undef __REVSH + #endif + #if defined(__RBIT) + #undef __RBIT + #endif + #if defined(__SSAT) + #undef __SSAT + #endif + #if defined(__USAT) + #undef __USAT + #endif + + #include "iccarm_builtin.h" + + #define __disable_fault_irq __iar_builtin_disable_fiq + #define __disable_irq __iar_builtin_disable_interrupt + #define __enable_fault_irq __iar_builtin_enable_fiq + #define __enable_irq __iar_builtin_enable_interrupt + #define __arm_rsr __iar_builtin_rsr + #define __arm_wsr __iar_builtin_wsr + + + #define __get_APSR() (__arm_rsr("APSR")) + #define __get_BASEPRI() (__arm_rsr("BASEPRI")) + #define __get_CONTROL() (__arm_rsr("CONTROL")) + #define __get_FAULTMASK() (__arm_rsr("FAULTMASK")) + + #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + #define __get_FPSCR() (__arm_rsr("FPSCR")) + #define __set_FPSCR(VALUE) (__arm_wsr("FPSCR", (VALUE))) + #else + #define __get_FPSCR() ( 0 ) + #define __set_FPSCR(VALUE) ((void)VALUE) + #endif + + #define __get_IPSR() (__arm_rsr("IPSR")) + #define __get_MSP() (__arm_rsr("MSP")) + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + #define __get_MSPLIM() (0U) + #else + #define __get_MSPLIM() (__arm_rsr("MSPLIM")) + #endif + #define __get_PRIMASK() (__arm_rsr("PRIMASK")) + #define __get_PSP() (__arm_rsr("PSP")) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __get_PSPLIM() (0U) + #else + #define __get_PSPLIM() (__arm_rsr("PSPLIM")) + #endif + + #define __get_xPSR() (__arm_rsr("xPSR")) + + #define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE))) + #define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE))) + #define __set_CONTROL(VALUE) (__arm_wsr("CONTROL", (VALUE))) + #define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE))) + #define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE))) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + #define __set_MSPLIM(VALUE) ((void)(VALUE)) + #else + #define __set_MSPLIM(VALUE) (__arm_wsr("MSPLIM", (VALUE))) + #endif + #define __set_PRIMASK(VALUE) (__arm_wsr("PRIMASK", (VALUE))) + #define __set_PSP(VALUE) (__arm_wsr("PSP", (VALUE))) + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __set_PSPLIM(VALUE) ((void)(VALUE)) + #else + #define __set_PSPLIM(VALUE) (__arm_wsr("PSPLIM", (VALUE))) + #endif + + #define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS")) + #define __TZ_set_CONTROL_NS(VALUE) (__arm_wsr("CONTROL_NS", (VALUE))) + #define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS")) + #define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE))) + #define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS")) + #define __TZ_set_MSP_NS(VALUE) (__arm_wsr("MSP_NS", (VALUE))) + #define __TZ_get_SP_NS() (__arm_rsr("SP_NS")) + #define __TZ_set_SP_NS(VALUE) (__arm_wsr("SP_NS", (VALUE))) + #define __TZ_get_PRIMASK_NS() (__arm_rsr("PRIMASK_NS")) + #define __TZ_set_PRIMASK_NS(VALUE) (__arm_wsr("PRIMASK_NS", (VALUE))) + #define __TZ_get_BASEPRI_NS() (__arm_rsr("BASEPRI_NS")) + #define __TZ_set_BASEPRI_NS(VALUE) (__arm_wsr("BASEPRI_NS", (VALUE))) + #define __TZ_get_FAULTMASK_NS() (__arm_rsr("FAULTMASK_NS")) + #define __TZ_set_FAULTMASK_NS(VALUE)(__arm_wsr("FAULTMASK_NS", (VALUE))) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __TZ_get_PSPLIM_NS() (0U) + #define __TZ_set_PSPLIM_NS(VALUE) ((void)(VALUE)) + #else + #define __TZ_get_PSPLIM_NS() (__arm_rsr("PSPLIM_NS")) + #define __TZ_set_PSPLIM_NS(VALUE) (__arm_wsr("PSPLIM_NS", (VALUE))) + #endif + + #define __TZ_get_MSPLIM_NS() (__arm_rsr("MSPLIM_NS")) + #define __TZ_set_MSPLIM_NS(VALUE) (__arm_wsr("MSPLIM_NS", (VALUE))) + + #define __NOP __iar_builtin_no_operation + + #define __CLZ __iar_builtin_CLZ + #define __CLREX __iar_builtin_CLREX + + #define __DMB __iar_builtin_DMB + #define __DSB __iar_builtin_DSB + #define __ISB __iar_builtin_ISB + + #define __LDREXB __iar_builtin_LDREXB + #define __LDREXH __iar_builtin_LDREXH + #define __LDREXW __iar_builtin_LDREX + + #define __RBIT __iar_builtin_RBIT + #define __REV __iar_builtin_REV + #define __REV16 __iar_builtin_REV16 + + __IAR_FT int16_t __REVSH(int16_t val) + { + return (int16_t) __iar_builtin_REVSH(val); + } + + #define __ROR __iar_builtin_ROR + #define __RRX __iar_builtin_RRX + + #define __SEV __iar_builtin_SEV + + #if !__IAR_M0_FAMILY + #define __SSAT __iar_builtin_SSAT + #endif + + #define __STREXB __iar_builtin_STREXB + #define __STREXH __iar_builtin_STREXH + #define __STREXW __iar_builtin_STREX + + #if !__IAR_M0_FAMILY + #define __USAT __iar_builtin_USAT + #endif + + #define __WFE __iar_builtin_WFE + #define __WFI __iar_builtin_WFI + + #if __ARM_MEDIA__ + #define __SADD8 __iar_builtin_SADD8 + #define __QADD8 __iar_builtin_QADD8 + #define __SHADD8 __iar_builtin_SHADD8 + #define __UADD8 __iar_builtin_UADD8 + #define __UQADD8 __iar_builtin_UQADD8 + #define __UHADD8 __iar_builtin_UHADD8 + #define __SSUB8 __iar_builtin_SSUB8 + #define __QSUB8 __iar_builtin_QSUB8 + #define __SHSUB8 __iar_builtin_SHSUB8 + #define __USUB8 __iar_builtin_USUB8 + #define __UQSUB8 __iar_builtin_UQSUB8 + #define __UHSUB8 __iar_builtin_UHSUB8 + #define __SADD16 __iar_builtin_SADD16 + #define __QADD16 __iar_builtin_QADD16 + #define __SHADD16 __iar_builtin_SHADD16 + #define __UADD16 __iar_builtin_UADD16 + #define __UQADD16 __iar_builtin_UQADD16 + #define __UHADD16 __iar_builtin_UHADD16 + #define __SSUB16 __iar_builtin_SSUB16 + #define __QSUB16 __iar_builtin_QSUB16 + #define __SHSUB16 __iar_builtin_SHSUB16 + #define __USUB16 __iar_builtin_USUB16 + #define __UQSUB16 __iar_builtin_UQSUB16 + #define __UHSUB16 __iar_builtin_UHSUB16 + #define __SASX __iar_builtin_SASX + #define __QASX __iar_builtin_QASX + #define __SHASX __iar_builtin_SHASX + #define __UASX __iar_builtin_UASX + #define __UQASX __iar_builtin_UQASX + #define __UHASX __iar_builtin_UHASX + #define __SSAX __iar_builtin_SSAX + #define __QSAX __iar_builtin_QSAX + #define __SHSAX __iar_builtin_SHSAX + #define __USAX __iar_builtin_USAX + #define __UQSAX __iar_builtin_UQSAX + #define __UHSAX __iar_builtin_UHSAX + #define __USAD8 __iar_builtin_USAD8 + #define __USADA8 __iar_builtin_USADA8 + #define __SSAT16 __iar_builtin_SSAT16 + #define __USAT16 __iar_builtin_USAT16 + #define __UXTB16 __iar_builtin_UXTB16 + #define __UXTAB16 __iar_builtin_UXTAB16 + #define __SXTB16 __iar_builtin_SXTB16 + #define __SXTAB16 __iar_builtin_SXTAB16 + #define __SMUAD __iar_builtin_SMUAD + #define __SMUADX __iar_builtin_SMUADX + #define __SMMLA __iar_builtin_SMMLA + #define __SMLAD __iar_builtin_SMLAD + #define __SMLADX __iar_builtin_SMLADX + #define __SMLALD __iar_builtin_SMLALD + #define __SMLALDX __iar_builtin_SMLALDX + #define __SMUSD __iar_builtin_SMUSD + #define __SMUSDX __iar_builtin_SMUSDX + #define __SMLSD __iar_builtin_SMLSD + #define __SMLSDX __iar_builtin_SMLSDX + #define __SMLSLD __iar_builtin_SMLSLD + #define __SMLSLDX __iar_builtin_SMLSLDX + #define __SEL __iar_builtin_SEL + #define __QADD __iar_builtin_QADD + #define __QSUB __iar_builtin_QSUB + #define __PKHBT __iar_builtin_PKHBT + #define __PKHTB __iar_builtin_PKHTB + #endif + +#else /* __ICCARM_INTRINSICS_VERSION__ == 2 */ + + #if __IAR_M0_FAMILY + /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ + #define __CLZ __cmsis_iar_clz_not_active + #define __SSAT __cmsis_iar_ssat_not_active + #define __USAT __cmsis_iar_usat_not_active + #define __RBIT __cmsis_iar_rbit_not_active + #define __get_APSR __cmsis_iar_get_APSR_not_active + #endif + + + #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) + #define __get_FPSCR __cmsis_iar_get_FPSR_not_active + #define __set_FPSCR __cmsis_iar_set_FPSR_not_active + #endif + + #ifdef __INTRINSICS_INCLUDED + #error intrinsics.h is already included previously! + #endif + + #include + + #if __IAR_M0_FAMILY + /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ + #undef __CLZ + #undef __SSAT + #undef __USAT + #undef __RBIT + #undef __get_APSR + + __STATIC_INLINE uint8_t __CLZ(uint32_t data) + { + if (data == 0U) { return 32U; } + + uint32_t count = 0U; + uint32_t mask = 0x80000000U; + + while ((data & mask) == 0U) + { + count += 1U; + mask = mask >> 1U; + } + return count; + } + + __STATIC_INLINE uint32_t __RBIT(uint32_t v) + { + uint8_t sc = 31U; + uint32_t r = v; + for (v >>= 1U; v; v >>= 1U) + { + r <<= 1U; + r |= v & 1U; + sc--; + } + return (r << sc); + } + + __STATIC_INLINE uint32_t __get_APSR(void) + { + uint32_t res; + __asm("MRS %0,APSR" : "=r" (res)); + return res; + } + + #endif + + #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) + #undef __get_FPSCR + #undef __set_FPSCR + #define __get_FPSCR() (0) + #define __set_FPSCR(VALUE) ((void)VALUE) + #endif + + #pragma diag_suppress=Pe940 + #pragma diag_suppress=Pe177 + + #define __enable_irq __enable_interrupt + #define __disable_irq __disable_interrupt + #define __NOP __no_operation + + #define __get_xPSR __get_PSR + + #if (!defined(__ARM_ARCH_6M__) || __ARM_ARCH_6M__==0) + + __IAR_FT uint32_t __LDREXW(uint32_t volatile *ptr) + { + return __LDREX((unsigned long *)ptr); + } + + __IAR_FT uint32_t __STREXW(uint32_t value, uint32_t volatile *ptr) + { + return __STREX(value, (unsigned long *)ptr); + } + #endif + + + /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ + #if (__CORTEX_M >= 0x03) + + __IAR_FT uint32_t __RRX(uint32_t value) + { + uint32_t result; + __ASM("RRX %0, %1" : "=r"(result) : "r" (value) : "cc"); + return(result); + } + + __IAR_FT void __set_BASEPRI_MAX(uint32_t value) + { + __asm volatile("MSR BASEPRI_MAX,%0"::"r" (value)); + } + + + #define __enable_fault_irq __enable_fiq + #define __disable_fault_irq __disable_fiq + + + #endif /* (__CORTEX_M >= 0x03) */ + + __IAR_FT uint32_t __ROR(uint32_t op1, uint32_t op2) + { + return (op1 >> op2) | (op1 << ((sizeof(op1)*8)-op2)); + } + + #if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + + __IAR_FT uint32_t __get_MSPLIM(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,MSPLIM" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __set_MSPLIM(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR MSPLIM,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __get_PSPLIM(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,PSPLIM" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __set_PSPLIM(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR PSPLIM,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __TZ_get_CONTROL_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,CONTROL_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_CONTROL_NS(uint32_t value) + { + __asm volatile("MSR CONTROL_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PSP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,PSP_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_PSP_NS(uint32_t value) + { + __asm volatile("MSR PSP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_MSP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,MSP_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_MSP_NS(uint32_t value) + { + __asm volatile("MSR MSP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_SP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,SP_NS" : "=r" (res)); + return res; + } + __IAR_FT void __TZ_set_SP_NS(uint32_t value) + { + __asm volatile("MSR SP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PRIMASK_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,PRIMASK_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_PRIMASK_NS(uint32_t value) + { + __asm volatile("MSR PRIMASK_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_BASEPRI_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,BASEPRI_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_BASEPRI_NS(uint32_t value) + { + __asm volatile("MSR BASEPRI_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_FAULTMASK_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,FAULTMASK_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_FAULTMASK_NS(uint32_t value) + { + __asm volatile("MSR FAULTMASK_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PSPLIM_NS(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,PSPLIM_NS" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __TZ_set_PSPLIM_NS(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR PSPLIM_NS,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __TZ_get_MSPLIM_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,MSPLIM_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_MSPLIM_NS(uint32_t value) + { + __asm volatile("MSR MSPLIM_NS,%0" :: "r" (value)); + } + + #endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ + +#endif /* __ICCARM_INTRINSICS_VERSION__ == 2 */ + +#define __BKPT(value) __asm volatile ("BKPT %0" : : "i"(value)) + +#if __IAR_M0_FAMILY + __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) + { + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; + } + + __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) + { + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; + } +#endif + +#if (__CORTEX_M >= 0x03) /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ + + __IAR_FT uint8_t __LDRBT(volatile uint8_t *addr) + { + uint32_t res; + __ASM("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDRHT(volatile uint16_t *addr) + { + uint32_t res; + __ASM("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDRT(volatile uint32_t *addr) + { + uint32_t res; + __ASM("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return res; + } + + __IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr) + { + __ASM("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); + } + + __IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr) + { + __ASM("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); + } + + __IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr) + { + __ASM("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory"); + } + +#endif /* (__CORTEX_M >= 0x03) */ + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + + + __IAR_FT uint8_t __LDAB(volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDAH(volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDA(volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("LDA %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return res; + } + + __IAR_FT void __STLB(uint8_t value, volatile uint8_t *ptr) + { + __ASM volatile ("STLB %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT void __STLH(uint16_t value, volatile uint16_t *ptr) + { + __ASM volatile ("STLH %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT void __STL(uint32_t value, volatile uint32_t *ptr) + { + __ASM volatile ("STL %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT uint8_t __LDAEXB(volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEXB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDAEXH(volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEXH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDAEX(volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEX %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEXB %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEXH %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEX %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + +#endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ + +#undef __IAR_FT +#undef __IAR_M0_FAMILY +#undef __ICCARM_V8 + +#pragma diag_default=Pe940 +#pragma diag_default=Pe177 + +#endif /* __CMSIS_ICCARM_H__ */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_version.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_version.h index 660f612..ae3f2e3 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_version.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/cmsis_version.h @@ -1,39 +1,39 @@ -/**************************************************************************//** - * @file cmsis_version.h - * @brief CMSIS Core(M) Version definitions - * @version V5.0.2 - * @date 19. April 2017 - ******************************************************************************/ -/* - * Copyright (c) 2009-2017 ARM Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CMSIS_VERSION_H -#define __CMSIS_VERSION_H - -/* CMSIS Version definitions */ -#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ -#define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ -#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ - __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ -#endif +/**************************************************************************//** + * @file cmsis_version.h + * @brief CMSIS Core(M) Version definitions + * @version V5.0.2 + * @date 19. April 2017 + ******************************************************************************/ +/* + * Copyright (c) 2009-2017 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CMSIS_VERSION_H +#define __CMSIS_VERSION_H + +/* CMSIS Version definitions */ +#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ +#define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ +#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ + __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ +#endif diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mbl.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mbl.h index 251e4ed..ec76ab2 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mbl.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mbl.h @@ -1,1918 +1,1918 @@ -/**************************************************************************//** - * @file core_armv8mbl.h - * @brief CMSIS Armv8-M Baseline Core Peripheral Access Layer Header File - * @version V5.0.7 - * @date 22. June 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_ARMV8MBL_H_GENERIC -#define __CORE_ARMV8MBL_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_ARMv8MBL - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS definitions */ -#define __ARMv8MBL_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __ARMv8MBL_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __ARMv8MBL_CMSIS_VERSION ((__ARMv8MBL_CMSIS_VERSION_MAIN << 16U) | \ - __ARMv8MBL_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M ( 2U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_ARMV8MBL_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_ARMV8MBL_H_DEPENDANT -#define __CORE_ARMV8MBL_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __ARMv8MBL_REV - #define __ARMv8MBL_REV 0x0000U - #warning "__ARMv8MBL_REV not defined in device header file; using default!" - #endif - - #ifndef __FPU_PRESENT - #define __FPU_PRESENT 0U - #warning "__FPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __SAUREGION_PRESENT - #define __SAUREGION_PRESENT 0U - #warning "__SAUREGION_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __VTOR_PRESENT - #define __VTOR_PRESENT 0U - #warning "__VTOR_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 2U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif - - #ifndef __ETM_PRESENT - #define __ETM_PRESENT 0U - #warning "__ETM_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MTB_PRESENT - #define __MTB_PRESENT 0U - #warning "__MTB_PRESENT not defined in device header file; using default!" - #endif - -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group ARMv8MBL */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - - Core SAU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[16U]; - __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[16U]; - __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[16U]; - __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[16U]; - __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[16U]; - __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ - uint32_t RESERVED5[16U]; - __IOM uint32_t IPR[124U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ -} NVIC_Type; - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ -#else - uint32_t RESERVED0; -#endif - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - uint32_t RESERVED1; - __IOM uint32_t SHPR[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ -#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ - -#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ -#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ - -#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ -#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ -#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) -/* SCB Vector Table Offset Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ -#endif - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ -#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ - -#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ -#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ - -#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ -#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ -#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ -#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ - -#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ -#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ - -#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ -#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ - -#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ -#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ -#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ -#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ - -#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ -#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - uint32_t RESERVED0[6U]; - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - uint32_t RESERVED3[1U]; - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED4[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - uint32_t RESERVED5[1U]; - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED6[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - uint32_t RESERVED7[1U]; - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ - uint32_t RESERVED8[1U]; - __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ - uint32_t RESERVED9[1U]; - __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ - uint32_t RESERVED10[1U]; - __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ - uint32_t RESERVED11[1U]; - __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ - uint32_t RESERVED12[1U]; - __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ - uint32_t RESERVED13[1U]; - __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ - uint32_t RESERVED14[1U]; - __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ - uint32_t RESERVED15[1U]; - __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ - uint32_t RESERVED16[1U]; - __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ - uint32_t RESERVED17[1U]; - __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ - uint32_t RESERVED18[1U]; - __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ - uint32_t RESERVED19[1U]; - __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ - uint32_t RESERVED20[1U]; - __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ - uint32_t RESERVED21[1U]; - __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ - uint32_t RESERVED22[1U]; - __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ - uint32_t RESERVED23[1U]; - __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ - uint32_t RESERVED24[1U]; - __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ - uint32_t RESERVED25[1U]; - __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ - uint32_t RESERVED26[1U]; - __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ - uint32_t RESERVED27[1U]; - __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ - uint32_t RESERVED28[1U]; - __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ - uint32_t RESERVED29[1U]; - __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ - uint32_t RESERVED30[1U]; - __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ - uint32_t RESERVED31[1U]; - __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ -#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ - -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ -#define DWT_FUNCTION_ACTION_Msk (0x3UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ - -#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ -#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Sizes Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Sizes Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ - uint32_t RESERVED3[809U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) Software Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) Software Lock Status Register */ - uint32_t RESERVED4[4U]; - __IM uint32_t TYPE; /*!< Offset: 0xFC8 (R/ ) Device Identifier Register */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Register */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_SWOSCALER_Pos 0U /*!< TPI ACPR: SWOSCALER Position */ -#define TPI_ACPR_SWOSCALER_Msk (0xFFFFUL /*<< TPI_ACPR_SWOSCALER_Pos*/) /*!< TPI ACPR: SWOSCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ -#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI Periodic Synchronization Control Register Definitions */ -#define TPI_PSCR_PSCount_Pos 0U /*!< TPI PSCR: PSCount Position */ -#define TPI_PSCR_PSCount_Msk (0x1FUL /*<< TPI_PSCR_PSCount_Pos*/) /*!< TPI PSCR: TPSCount Mask */ - -/* TPI Software Lock Status Register Definitions */ -#define TPI_LSR_nTT_Pos 1U /*!< TPI LSR: Not thirty-two bit. Position */ -#define TPI_LSR_nTT_Msk (0x1UL << TPI_LSR_nTT_Pos) /*!< TPI LSR: Not thirty-two bit. Mask */ - -#define TPI_LSR_SLK_Pos 1U /*!< TPI LSR: Software Lock status Position */ -#define TPI_LSR_SLK_Msk (0x1UL << TPI_LSR_SLK_Pos) /*!< TPI LSR: Software Lock status Mask */ - -#define TPI_LSR_SLI_Pos 0U /*!< TPI LSR: Software Lock implemented Position */ -#define TPI_LSR_SLI_Msk (0x1UL /*<< TPI_LSR_SLI_Pos*/) /*!< TPI LSR: Software Lock implemented Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFO depth Position */ -#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFO depth Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ - uint32_t RESERVED0[7U]; - union { - __IOM uint32_t MAIR[2]; - struct { - __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ - __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ - }; - }; -} MPU_Type; - -#define MPU_TYPE_RALIASES 1U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ -#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ - -#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ -#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ - -#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ -#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ - -#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ -#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ - -/* MPU Region Limit Address Register Definitions */ -#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ -#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ - -#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ -#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ - -#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: EN Position */ -#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: EN Mask */ - -/* MPU Memory Attribute Indirection Register 0 Definitions */ -#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ -#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ - -#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ -#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ - -#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ -#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ - -#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ -#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ - -/* MPU Memory Attribute Indirection Register 1 Definitions */ -#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ -#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ - -#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ -#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ - -#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ -#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ - -#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ -#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SAU Security Attribution Unit (SAU) - \brief Type definitions for the Security Attribution Unit (SAU) - @{ - */ - -/** - \brief Structure type to access the Security Attribution Unit (SAU). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ - __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ -#endif -} SAU_Type; - -/* SAU Control Register Definitions */ -#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ -#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ - -#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ -#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ - -/* SAU Type Register Definitions */ -#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ -#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ - -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) -/* SAU Region Number Register Definitions */ -#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ -#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ - -/* SAU Region Base Address Register Definitions */ -#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ -#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ - -/* SAU Region Limit Address Register Definitions */ -#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ -#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ - -#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ -#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ - -#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ -#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ - -#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ - -/*@} end of group CMSIS_SAU */ -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ - uint32_t RESERVED4[1U]; - __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ - __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ -#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register */ -#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */ -#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/* Debug Authentication Control Register Definitions */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ - -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ - -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ - -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ - -/* Debug Security Control and Status Register Definitions */ -#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ -#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ - -#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ -#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ - -#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ -#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ - #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ - #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ - #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ - #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ - #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ - #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ - #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - - - #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ - #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ - #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ - #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ - #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ - #endif - - #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ - #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ - #endif - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ - #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ - #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ - #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ - #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ - - #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ - #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ - #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ - #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ - #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ - #endif - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* Special LR values for Secure/Non-Secure call handling and exception handling */ - -/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ -#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ - -/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ -#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ -#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ -#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ -#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ -#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ -#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ -#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ - -/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ -#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ -#else -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ -#endif - - -/* Interrupt Priorities are WORD accessible only under Armv6-M */ -/* The following MACROS handle generation of the register offset and byte masks */ -#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) -#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) -#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) - -#define __NVIC_SetPriorityGrouping(X) (void)(X) -#define __NVIC_GetPriorityGrouping() (0U) - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Get Interrupt Target State - \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - \return 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Target State - \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Clear Interrupt Target State - \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - If VTOR is not present address 0 must be mapped to SRAM. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - uint32_t *vectors = (uint32_t *)SCB->VTOR; -#else - uint32_t *vectors = (uint32_t *)0x0U; -#endif - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - uint32_t *vectors = (uint32_t *)SCB->VTOR; -#else - uint32_t *vectors = (uint32_t *)0x0U; -#endif - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - SCB_AIRCR_SYSRESETREQ_Msk); - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Enable Interrupt (non-secure) - \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status (non-secure) - \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt (non-secure) - \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Pending Interrupt (non-secure) - \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt (non-secure) - \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt (non-secure) - \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt (non-secure) - \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority (non-secure) - \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every non-secure processor exception. - */ -__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC_NS->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB_NS->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB_NS->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority (non-secure) - \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB_NS->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv8.h" - -#endif - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ########################## SAU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SAUFunctions SAU Functions - \brief Functions that configure the SAU. - @{ - */ - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - -/** - \brief Enable SAU - \details Enables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Enable(void) -{ - SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); -} - - - -/** - \brief Disable SAU - \details Disables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Disable(void) -{ - SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); -} - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_SAUFunctions */ - - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief System Tick Configuration (non-secure) - \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function TZ_SysTick_Config_NS is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - - */ -__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_ARMV8MBL_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_armv8mbl.h + * @brief CMSIS Armv8-M Baseline Core Peripheral Access Layer Header File + * @version V5.0.7 + * @date 22. June 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_ARMV8MBL_H_GENERIC +#define __CORE_ARMV8MBL_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_ARMv8MBL + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS definitions */ +#define __ARMv8MBL_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __ARMv8MBL_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __ARMv8MBL_CMSIS_VERSION ((__ARMv8MBL_CMSIS_VERSION_MAIN << 16U) | \ + __ARMv8MBL_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M ( 2U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MBL_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_ARMV8MBL_H_DEPENDANT +#define __CORE_ARMV8MBL_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __ARMv8MBL_REV + #define __ARMv8MBL_REV 0x0000U + #warning "__ARMv8MBL_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __VTOR_PRESENT + #define __VTOR_PRESENT 0U + #warning "__VTOR_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif + + #ifndef __ETM_PRESENT + #define __ETM_PRESENT 0U + #warning "__ETM_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MTB_PRESENT + #define __MTB_PRESENT 0U + #warning "__MTB_PRESENT not defined in device header file; using default!" + #endif + +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group ARMv8MBL */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint32_t IPR[124U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ +#else + uint32_t RESERVED0; +#endif + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHPR[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + uint32_t RESERVED0[6U]; + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x3UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Sizes Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Sizes Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[809U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) Software Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) Software Lock Status Register */ + uint32_t RESERVED4[4U]; + __IM uint32_t TYPE; /*!< Offset: 0xFC8 (R/ ) Device Identifier Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_SWOSCALER_Pos 0U /*!< TPI ACPR: SWOSCALER Position */ +#define TPI_ACPR_SWOSCALER_Msk (0xFFFFUL /*<< TPI_ACPR_SWOSCALER_Pos*/) /*!< TPI ACPR: SWOSCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI Periodic Synchronization Control Register Definitions */ +#define TPI_PSCR_PSCount_Pos 0U /*!< TPI PSCR: PSCount Position */ +#define TPI_PSCR_PSCount_Msk (0x1FUL /*<< TPI_PSCR_PSCount_Pos*/) /*!< TPI PSCR: TPSCount Mask */ + +/* TPI Software Lock Status Register Definitions */ +#define TPI_LSR_nTT_Pos 1U /*!< TPI LSR: Not thirty-two bit. Position */ +#define TPI_LSR_nTT_Msk (0x1UL << TPI_LSR_nTT_Pos) /*!< TPI LSR: Not thirty-two bit. Mask */ + +#define TPI_LSR_SLK_Pos 1U /*!< TPI LSR: Software Lock status Position */ +#define TPI_LSR_SLK_Msk (0x1UL << TPI_LSR_SLK_Pos) /*!< TPI LSR: Software Lock status Mask */ + +#define TPI_LSR_SLI_Pos 0U /*!< TPI LSR: Software Lock implemented Position */ +#define TPI_LSR_SLI_Msk (0x1UL /*<< TPI_LSR_SLI_Pos*/) /*!< TPI LSR: Software Lock implemented Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFO depth Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFO depth Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + uint32_t RESERVED0[7U]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 1U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: EN Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: EN Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#endif +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register */ +#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */ +#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + If VTOR is not present address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC_NS->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB_NS->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB_NS->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB_NS->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MBL_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mml.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mml.h index 3a3148e..2d0f106 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mml.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_armv8mml.h @@ -1,2927 +1,2927 @@ -/**************************************************************************//** - * @file core_armv8mml.h - * @brief CMSIS Armv8-M Mainline Core Peripheral Access Layer Header File - * @version V5.0.7 - * @date 06. July 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_ARMV8MML_H_GENERIC -#define __CORE_ARMV8MML_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_ARMv8MML - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS Armv8MML definitions */ -#define __ARMv8MML_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __ARMv8MML_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \ - __ARMv8MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (81U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. -*/ -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined(__ARM_FEATURE_DSP) - #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined(__ARM_FEATURE_DSP) - #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined(__ARM_FEATURE_DSP) - #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined(__ARM_FEATURE_DSP) - #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_ARMV8MML_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_ARMV8MML_H_DEPENDANT -#define __CORE_ARMV8MML_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __ARMv8MML_REV - #define __ARMv8MML_REV 0x0000U - #warning "__ARMv8MML_REV not defined in device header file; using default!" - #endif - - #ifndef __FPU_PRESENT - #define __FPU_PRESENT 0U - #warning "__FPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __SAUREGION_PRESENT - #define __SAUREGION_PRESENT 0U - #warning "__SAUREGION_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __DSP_PRESENT - #define __DSP_PRESENT 0U - #warning "__DSP_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 3U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group ARMv8MML */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - - Core SAU Register - - Core FPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - -#define APSR_Q_Pos 27U /*!< APSR: Q Position */ -#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ - -#define APSR_GE_Pos 16U /*!< APSR: GE Position */ -#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ -#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ - -#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ -#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ -#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ - uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ - uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ - uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ -#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ - -#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ -#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ - -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[16U]; - __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[16U]; - __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[16U]; - __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[16U]; - __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[16U]; - __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ - uint32_t RESERVED5[16U]; - __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ - uint32_t RESERVED6[580U]; - __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ -} NVIC_Type; - -/* Software Triggered Interrupt Register Definitions */ -#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ -#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ - __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ - __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ - __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ - __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ - __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ - __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ - __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ - __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ - __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ - __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ - __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ - __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ - __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ - __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ - __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ - __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ - __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ - uint32_t RESERVED3[92U]; - __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ - uint32_t RESERVED4[15U]; - __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ - __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ - __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ - uint32_t RESERVED5[1U]; - __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ - uint32_t RESERVED6[1U]; - __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ - __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ - __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ - __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ - __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ - __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ - __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ - __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ - uint32_t RESERVED7[6U]; - __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ - __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ - __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ - __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ - __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ - uint32_t RESERVED8[1U]; - __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ -#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ - -#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ -#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ - -#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ -#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ -#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Vector Table Offset Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ -#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ - -#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ -#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ - -#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ -#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ - -#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ -#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ -#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ -#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ - -#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ -#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ - -#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ -#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ - -#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ -#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ -#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ - -#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ -#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ - -#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ -#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ - -#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ -#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ - -#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ -#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ - -#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ -#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ -#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ - -#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ -#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ - -#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ -#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ -#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ -#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ - -#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ -#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ - -#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ -#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ - -#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ -#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ - -#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ -#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ - -#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ -#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ - -/* SCB Configurable Fault Status Register Definitions */ -#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ -#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ - -#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ -#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ - -#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ -#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ - -/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ -#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ - -#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ -#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ - -#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ -#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ - -#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ -#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ - -#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ -#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ - -#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ -#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ - -/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ -#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ - -#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ -#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ - -#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ -#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ - -#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ -#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ - -#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ -#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ - -#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ -#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ - -#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ -#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ - -/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ -#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ - -#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ -#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ - -#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ -#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ - -#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ -#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ - -#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ -#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ - -#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ -#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ - -#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ -#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ - -/* SCB Hard Fault Status Register Definitions */ -#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ -#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ - -#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ -#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ - -#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ -#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ - -/* SCB Debug Fault Status Register Definitions */ -#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ -#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ - -#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ -#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ - -#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ -#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ - -#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ -#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ - -#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ -#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ - -/* SCB Non-Secure Access Control Register Definitions */ -#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ -#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ - -#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ -#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ - -#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ -#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ - -/* SCB Cache Level ID Register Definitions */ -#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ -#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ - -#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ -#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ - -/* SCB Cache Type Register Definitions */ -#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ -#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ - -#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ -#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ - -#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ -#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ - -#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ -#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ - -#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ -#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ - -/* SCB Cache Size ID Register Definitions */ -#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ -#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ - -#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ -#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ - -#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ -#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ - -#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ -#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ - -#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ -#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ - -#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ -#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ - -#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ -#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ - -/* SCB Cache Size Selection Register Definitions */ -#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ -#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ - -#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ -#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ - -/* SCB Software Triggered Interrupt Register Definitions */ -#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ -#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ - -/* SCB D-Cache Invalidate by Set-way Register Definitions */ -#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ -#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ - -#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ -#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ - -/* SCB D-Cache Clean by Set-way Register Definitions */ -#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ -#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ - -#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ -#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ - -/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ -#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ -#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ - -#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ -#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ - -/* Instruction Tightly-Coupled Memory Control Register Definitions */ -#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ -#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ - -#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ -#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ - -#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ -#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ - -#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ -#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ - -/* Data Tightly-Coupled Memory Control Register Definitions */ -#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ -#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ - -#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ -#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ - -#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ -#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ - -#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ -#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ - -/* AHBP Control Register Definitions */ -#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ -#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ - -#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ -#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ - -/* L1 Cache Control Register Definitions */ -#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ -#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ - -#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ -#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ - -#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ -#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ - -/* AHBS Control Register Definitions */ -#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ -#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ - -#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ -#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ - -#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ -#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ - -/* Auxiliary Bus Fault Status Register Definitions */ -#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ -#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ - -#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ -#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ - -#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ -#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ - -#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ -#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ - -#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ -#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ - -#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ -#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ - __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ - __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ -} SCnSCB_Type; - -/* Interrupt Controller Type Register Definitions */ -#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ -#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) - \brief Type definitions for the Instrumentation Trace Macrocell (ITM) - @{ - */ - -/** - \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). - */ -typedef struct -{ - __OM union - { - __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ - __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ - __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ - } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ - uint32_t RESERVED0[864U]; - __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ - uint32_t RESERVED1[15U]; - __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ - uint32_t RESERVED2[15U]; - __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ - uint32_t RESERVED3[29U]; - __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ - __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ - __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ - uint32_t RESERVED4[43U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ - uint32_t RESERVED5[1U]; - __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ - uint32_t RESERVED6[4U]; - __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ - __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ - __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ - __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ - __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ - __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ - __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ - __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ - __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ - __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ - __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ - __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ -} ITM_Type; - -/* ITM Stimulus Port Register Definitions */ -#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ -#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ - -#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ -#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ - -/* ITM Trace Privilege Register Definitions */ -#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ -#define ITM_TPR_PRIVMASK_Msk (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ - -/* ITM Trace Control Register Definitions */ -#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ -#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ - -#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ -#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ - -#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ -#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ - -#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ -#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ - -#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ -#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ - -#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ -#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ - -#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ -#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ - -#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ -#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ - -#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ -#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ - -#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ -#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ - -/* ITM Integration Write Register Definitions */ -#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ -#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ - -/* ITM Integration Read Register Definitions */ -#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ -#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ - -/* ITM Integration Mode Control Register Definitions */ -#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ -#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ - -/* ITM Lock Status Register Definitions */ -#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ -#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ - -#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ -#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ - -#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ -#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ - -/*@}*/ /* end of group CMSIS_ITM */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ - __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ - __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ - __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ - __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ - __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - uint32_t RESERVED3[1U]; - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED4[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - uint32_t RESERVED5[1U]; - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED6[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - uint32_t RESERVED7[1U]; - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ - uint32_t RESERVED8[1U]; - __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ - uint32_t RESERVED9[1U]; - __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ - uint32_t RESERVED10[1U]; - __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ - uint32_t RESERVED11[1U]; - __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ - uint32_t RESERVED12[1U]; - __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ - uint32_t RESERVED13[1U]; - __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ - uint32_t RESERVED14[1U]; - __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ - uint32_t RESERVED15[1U]; - __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ - uint32_t RESERVED16[1U]; - __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ - uint32_t RESERVED17[1U]; - __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ - uint32_t RESERVED18[1U]; - __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ - uint32_t RESERVED19[1U]; - __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ - uint32_t RESERVED20[1U]; - __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ - uint32_t RESERVED21[1U]; - __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ - uint32_t RESERVED22[1U]; - __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ - uint32_t RESERVED23[1U]; - __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ - uint32_t RESERVED24[1U]; - __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ - uint32_t RESERVED25[1U]; - __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ - uint32_t RESERVED26[1U]; - __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ - uint32_t RESERVED27[1U]; - __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ - uint32_t RESERVED28[1U]; - __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ - uint32_t RESERVED29[1U]; - __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ - uint32_t RESERVED30[1U]; - __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ - uint32_t RESERVED31[1U]; - __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ - uint32_t RESERVED32[934U]; - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ - uint32_t RESERVED33[1U]; - __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ -#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ - -#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ -#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ - -#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ -#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ - -#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ -#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ - -#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ -#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ - -#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ -#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ - -#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ -#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ - -#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ -#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ - -#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ -#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ - -#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ -#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ - -#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ -#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ - -#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ -#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ - -#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ -#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ - -#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ -#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ - -/* DWT CPI Count Register Definitions */ -#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ -#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ - -/* DWT Exception Overhead Count Register Definitions */ -#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ -#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ - -/* DWT Sleep Count Register Definitions */ -#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ -#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ - -/* DWT LSU Count Register Definitions */ -#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ -#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ - -/* DWT Folded-instruction Count Register Definitions */ -#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ -#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ -#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ - -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ -#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ - -#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ -#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Sizes Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Sizes Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ - uint32_t RESERVED3[809U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) Software Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) Software Lock Status Register */ - uint32_t RESERVED4[4U]; - __IM uint32_t TYPE; /*!< Offset: 0xFC8 (R/ ) Device Identifier Register */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Register */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_SWOSCALER_Pos 0U /*!< TPI ACPR: SWOSCALER Position */ -#define TPI_ACPR_SWOSCALER_Msk (0xFFFFUL /*<< TPI_ACPR_SWOSCALER_Pos*/) /*!< TPI ACPR: SWOSCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ -#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI Periodic Synchronization Control Register Definitions */ -#define TPI_PSCR_PSCount_Pos 0U /*!< TPI PSCR: PSCount Position */ -#define TPI_PSCR_PSCount_Msk (0x1FUL /*<< TPI_PSCR_PSCount_Pos*/) /*!< TPI PSCR: TPSCount Mask */ - -/* TPI Software Lock Status Register Definitions */ -#define TPI_LSR_nTT_Pos 1U /*!< TPI LSR: Not thirty-two bit. Position */ -#define TPI_LSR_nTT_Msk (0x1UL << TPI_LSR_nTT_Pos) /*!< TPI LSR: Not thirty-two bit. Mask */ - -#define TPI_LSR_SLK_Pos 1U /*!< TPI LSR: Software Lock status Position */ -#define TPI_LSR_SLK_Msk (0x1UL << TPI_LSR_SLK_Pos) /*!< TPI LSR: Software Lock status Mask */ - -#define TPI_LSR_SLI_Pos 0U /*!< TPI LSR: Software Lock implemented Position */ -#define TPI_LSR_SLI_Msk (0x1UL /*<< TPI_LSR_SLI_Pos*/) /*!< TPI LSR: Software Lock implemented Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFO depth Position */ -#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFO depth Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ - __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ - __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ - __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ - __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ - __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ - __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ - uint32_t RESERVED0[1]; - union { - __IOM uint32_t MAIR[2]; - struct { - __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ - __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ - }; - }; -} MPU_Type; - -#define MPU_TYPE_RALIASES 4U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ -#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ - -#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ -#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ - -#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ -#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ - -#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ -#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ - -/* MPU Region Limit Address Register Definitions */ -#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ -#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ - -#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ -#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ - -#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ -#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ - -/* MPU Memory Attribute Indirection Register 0 Definitions */ -#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ -#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ - -#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ -#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ - -#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ -#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ - -#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ -#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ - -/* MPU Memory Attribute Indirection Register 1 Definitions */ -#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ -#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ - -#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ -#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ - -#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ -#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ - -#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ -#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SAU Security Attribution Unit (SAU) - \brief Type definitions for the Security Attribution Unit (SAU) - @{ - */ - -/** - \brief Structure type to access the Security Attribution Unit (SAU). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ - __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ -#else - uint32_t RESERVED0[3]; -#endif - __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ - __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ -} SAU_Type; - -/* SAU Control Register Definitions */ -#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ -#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ - -#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ -#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ - -/* SAU Type Register Definitions */ -#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ -#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ - -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) -/* SAU Region Number Register Definitions */ -#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ -#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ - -/* SAU Region Base Address Register Definitions */ -#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ -#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ - -/* SAU Region Limit Address Register Definitions */ -#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ -#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ - -#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ -#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ - -#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ -#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ - -#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ - -/* Secure Fault Status Register Definitions */ -#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ -#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ - -#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ -#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ - -#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ -#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ - -#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ -#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ - -#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ -#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ - -#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ -#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ - -#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ -#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ - -#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ -#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ - -/*@} end of group CMSIS_SAU */ -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_FPU Floating Point Unit (FPU) - \brief Type definitions for the Floating Point Unit (FPU) - @{ - */ - -/** - \brief Structure type to access the Floating Point Unit (FPU). - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ - __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ - __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ - __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ - __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ -} FPU_Type; - -/* Floating-Point Context Control Register Definitions */ -#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ -#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ - -#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ -#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ - -#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ -#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ - -#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ -#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ - -#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ -#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ - -#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ -#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ - -#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ -#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ - -#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ -#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ - -#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ -#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ - -#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ -#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ - -#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ -#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ - -#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ -#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ - -#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ -#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ - -#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ -#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ - -#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ -#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ - -#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ -#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ - -#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ -#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ - -/* Floating-Point Context Address Register Definitions */ -#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ -#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ - -/* Floating-Point Default Status Control Register Definitions */ -#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ -#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ - -#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ -#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ - -#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ -#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ - -#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ -#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ - -/* Media and FP Feature Register 0 Definitions */ -#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ -#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ - -#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ -#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ - -#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ -#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ - -#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ -#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ - -#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ -#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ - -#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ -#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ - -#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ -#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ - -#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ -#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ - -/* Media and FP Feature Register 1 Definitions */ -#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ -#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ - -#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ -#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ - -#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ -#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ - -#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ -#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ - -/*@} end of group CMSIS_FPU */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ - uint32_t RESERVED4[1U]; - __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ - __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ -#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ -#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register Definitions */ -#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ -#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ - -#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ -#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ - -#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ -#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ - -#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ -#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ - -#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ -#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ -#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ - -#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ -#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ - -#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ -#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ - -#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ -#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ - -#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ -#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ - -#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ -#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/* Debug Authentication Control Register Definitions */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ - -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ - -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ - -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ - -/* Debug Security Control and Status Register Definitions */ -#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ -#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ - -#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ -#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ - -#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ -#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ - #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ - #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ - #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ - #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ - #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ - #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ - #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ - #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - - #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ - #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ - #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ - #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ - #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ - #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ - #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ - #endif - - #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ - #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ - #endif - - #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ - #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ - #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ - #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ - #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ - #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ - - #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ - #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ - #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ - #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ - #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ - #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ - #endif - - #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ - #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Debug Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* Special LR values for Secure/Non-Secure call handling and exception handling */ - -/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ -#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ - -/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ -#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ -#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ -#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ -#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ -#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ -#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ -#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ - -/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ -#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ -#else -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ -#endif - - -/** - \brief Set Priority Grouping - \details Sets the priority grouping field using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ - SCB->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping - \details Reads the priority grouping field from the NVIC Interrupt Controller. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) -{ - return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Get Interrupt Target State - \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - \return 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Target State - \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Clear Interrupt Target State - \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | - SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Set Priority Grouping (non-secure) - \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB_NS->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ - SCB_NS->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping (non-secure) - \details Reads the priority grouping field from the non-secure NVIC when in secure state. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) -{ - return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt (non-secure) - \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status (non-secure) - \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt (non-secure) - \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Pending Interrupt (non-secure) - \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt (non-secure) - \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt (non-secure) - \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt (non-secure) - \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority (non-secure) - \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every non-secure processor exception. - */ -__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority (non-secure) - \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv8.h" - -#endif - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - uint32_t mvfr0; - - mvfr0 = FPU->MVFR0; - if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) - { - return 2U; /* Double + Single precision FPU */ - } - else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) - { - return 1U; /* Single precision FPU */ - } - else - { - return 0U; /* No FPU */ - } -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ########################## SAU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SAUFunctions SAU Functions - \brief Functions that configure the SAU. - @{ - */ - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - -/** - \brief Enable SAU - \details Enables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Enable(void) -{ - SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); -} - - - -/** - \brief Disable SAU - \details Disables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Disable(void) -{ - SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); -} - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_SAUFunctions */ - - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief System Tick Configuration (non-secure) - \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function TZ_SysTick_Config_NS is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - - */ -__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - -/* ##################################### Debug In/Output function ########################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_core_DebugFunctions ITM Functions - \brief Functions that access the ITM debug interface. - @{ - */ - -extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ -#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ - - -/** - \brief ITM Send Character - \details Transmits a character via the ITM channel 0, and - \li Just returns when no debugger is connected that has booked the output. - \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. - \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 */ - ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ - { - while (ITM->PORT[0U].u32 == 0UL) - { - __NOP(); - } - ITM->PORT[0U].u8 = (uint8_t)ch; - } - return (ch); -} - - -/** - \brief ITM Receive Character - \details Inputs a character via the external variable \ref ITM_RxBuffer. - \return Received character. - \return -1 No character pending. - */ -__STATIC_INLINE int32_t ITM_ReceiveChar (void) -{ - int32_t ch = -1; /* no character available */ - - if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) - { - ch = ITM_RxBuffer; - ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ - } - - return (ch); -} - - -/** - \brief ITM Check Character - \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. - \return 0 No character available. - \return 1 Character available. - */ -__STATIC_INLINE int32_t ITM_CheckChar (void) -{ - - if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) - { - return (0); /* no character available */ - } - else - { - return (1); /* character available */ - } -} - -/*@} end of CMSIS_core_DebugFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_ARMV8MML_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_armv8mml.h + * @brief CMSIS Armv8-M Mainline Core Peripheral Access Layer Header File + * @version V5.0.7 + * @date 06. July 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_ARMV8MML_H_GENERIC +#define __CORE_ARMV8MML_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_ARMv8MML + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS Armv8MML definitions */ +#define __ARMv8MML_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __ARMv8MML_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \ + __ARMv8MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (81U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MML_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_ARMV8MML_H_DEPENDANT +#define __CORE_ARMV8MML_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __ARMv8MML_REV + #define __ARMv8MML_REV 0x0000U + #warning "__ARMv8MML_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DSP_PRESENT + #define __DSP_PRESENT 0U + #warning "__DSP_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group ARMv8MML */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ +#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ + uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ + uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ +#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ + +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED6[580U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ + uint32_t RESERVED3[92U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ + uint32_t RESERVED7[6U]; + __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ + __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ + __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ + __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ + __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ + uint32_t RESERVED8[1U]; + __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ +#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ +#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ + +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ +#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ +#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Non-Secure Access Control Register Definitions */ +#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ +#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ + +#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ +#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ + +#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ +#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/* Instruction Tightly-Coupled Memory Control Register Definitions */ +#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ +#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ + +#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ +#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ + +#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ +#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ + +#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ +#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ + +/* Data Tightly-Coupled Memory Control Register Definitions */ +#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ +#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ + +#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ +#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ + +#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ +#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ + +#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ +#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ + +/* AHBP Control Register Definitions */ +#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ +#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ + +#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ +#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ + +/* L1 Cache Control Register Definitions */ +#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ +#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ + +#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ +#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ + +#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ +#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ + +/* AHBS Control Register Definitions */ +#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ +#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ + +#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ +#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ + +#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ +#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ + +/* Auxiliary Bus Fault Status Register Definitions */ +#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ +#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ + +#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ +#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ + +#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ +#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ + +#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ +#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ + +#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ +#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ + +#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ +#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ + __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[29U]; + __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ + __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ + __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ + uint32_t RESERVED6[4U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Stimulus Port Register Definitions */ +#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ +#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ + +#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ +#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ +#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ + +#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ +#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Integration Write Register Definitions */ +#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ +#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ + +/* ITM Integration Read Register Definitions */ +#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ +#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ + +/* ITM Integration Mode Control Register Definitions */ +#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ +#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ + uint32_t RESERVED32[934U]; + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ + uint32_t RESERVED33[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ +#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Sizes Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Sizes Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[809U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) Software Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) Software Lock Status Register */ + uint32_t RESERVED4[4U]; + __IM uint32_t TYPE; /*!< Offset: 0xFC8 (R/ ) Device Identifier Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_SWOSCALER_Pos 0U /*!< TPI ACPR: SWOSCALER Position */ +#define TPI_ACPR_SWOSCALER_Msk (0xFFFFUL /*<< TPI_ACPR_SWOSCALER_Pos*/) /*!< TPI ACPR: SWOSCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI Periodic Synchronization Control Register Definitions */ +#define TPI_PSCR_PSCount_Pos 0U /*!< TPI PSCR: PSCount Position */ +#define TPI_PSCR_PSCount_Msk (0x1FUL /*<< TPI_PSCR_PSCount_Pos*/) /*!< TPI PSCR: TPSCount Mask */ + +/* TPI Software Lock Status Register Definitions */ +#define TPI_LSR_nTT_Pos 1U /*!< TPI LSR: Not thirty-two bit. Position */ +#define TPI_LSR_nTT_Msk (0x1UL << TPI_LSR_nTT_Pos) /*!< TPI LSR: Not thirty-two bit. Mask */ + +#define TPI_LSR_SLK_Pos 1U /*!< TPI LSR: Software Lock status Position */ +#define TPI_LSR_SLK_Msk (0x1UL << TPI_LSR_SLK_Pos) /*!< TPI LSR: Software Lock status Mask */ + +#define TPI_LSR_SLI_Pos 0U /*!< TPI LSR: Software Lock implemented Position */ +#define TPI_LSR_SLI_Msk (0x1UL /*<< TPI_LSR_SLI_Pos*/) /*!< TPI LSR: Software Lock implemented Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFO depth Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFO depth Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ + __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ + __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ + __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ + uint32_t RESERVED0[1]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#else + uint32_t RESERVED0[3]; +#endif + __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ + __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/* Secure Fault Status Register Definitions */ +#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ +#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ + +#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ +#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ + +#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ +#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ + +#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ +#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ + +#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ +#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ + +#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ +#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ + +#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ +#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ + +#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ +#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ +#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ + +#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ +#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ + +#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ +#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ + +#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ +#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ + +#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ +#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ + +#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ +#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ +#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ +#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + + #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ + #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + + #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ + #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Set Priority Grouping (non-secure) + \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB_NS->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ + SCB_NS->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping (non-secure) + \details Reads the priority grouping field from the non-secure NVIC when in secure state. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) +{ + return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \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 */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MML_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0.h index f929bba..6f82227 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0.h @@ -1,949 +1,949 @@ -/**************************************************************************//** - * @file core_cm0.h - * @brief CMSIS Cortex-M0 Core Peripheral Access Layer Header File - * @version V5.0.5 - * @date 28. May 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM0_H_GENERIC -#define __CORE_CM0_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_M0 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS CM0 definitions */ -#define __CM0_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM0_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM0_CMSIS_VERSION ((__CM0_CMSIS_VERSION_MAIN << 16U) | \ - __CM0_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (0U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM0_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM0_H_DEPENDANT -#define __CORE_CM0_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM0_REV - #define __CM0_REV 0x0000U - #warning "__CM0_REV not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 2U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex_M0 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t _reserved0:1; /*!< bit: 0 Reserved */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[31U]; - __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[31U]; - __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[31U]; - __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[31U]; - uint32_t RESERVED4[64U]; - __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ -} NVIC_Type; - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - uint32_t RESERVED0; - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - uint32_t RESERVED1; - __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Cortex-M0 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. - Therefore they are not covered by the Cortex-M0 header file. - @{ - */ -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ -/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M0 */ - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ - - -/* Interrupt Priorities are WORD accessible only under Armv6-M */ -/* The following MACROS handle generation of the register offset and byte masks */ -#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) -#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) -#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) - -#define __NVIC_SetPriorityGrouping(X) (void)(X) -#define __NVIC_GetPriorityGrouping() (0U) - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - Address 0 must be mapped to SRAM. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)0x0U; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)0x0U; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - SCB_AIRCR_SYSRESETREQ_Msk); - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM0_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm0.h + * @brief CMSIS Cortex-M0 Core Peripheral Access Layer Header File + * @version V5.0.5 + * @date 28. May 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM0_H_GENERIC +#define __CORE_CM0_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M0 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM0 definitions */ +#define __CM0_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM0_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM0_CMSIS_VERSION ((__CM0_CMSIS_VERSION_MAIN << 16U) | \ + __CM0_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (0U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM0_H_DEPENDANT +#define __CORE_CM0_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM0_REV + #define __CM0_REV 0x0000U + #warning "__CM0_REV not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M0 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t _reserved0:1; /*!< bit: 0 Reserved */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + uint32_t RESERVED0; + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Cortex-M0 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the Cortex-M0 header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M0 */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + Address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)0x0U; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)0x0U; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0plus.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0plus.h index 424011a..b9377e8 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0plus.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm0plus.h @@ -1,1083 +1,1083 @@ -/**************************************************************************//** - * @file core_cm0plus.h - * @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File - * @version V5.0.6 - * @date 28. May 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM0PLUS_H_GENERIC -#define __CORE_CM0PLUS_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex-M0+ - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS CM0+ definitions */ -#define __CM0PLUS_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM0PLUS_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM0PLUS_CMSIS_VERSION ((__CM0PLUS_CMSIS_VERSION_MAIN << 16U) | \ - __CM0PLUS_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (0U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM0PLUS_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM0PLUS_H_DEPENDANT -#define __CORE_CM0PLUS_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM0PLUS_REV - #define __CM0PLUS_REV 0x0000U - #warning "__CM0PLUS_REV not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __VTOR_PRESENT - #define __VTOR_PRESENT 0U - #warning "__VTOR_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 2U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex-M0+ */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core MPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[31U]; - __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[31U]; - __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[31U]; - __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[31U]; - uint32_t RESERVED4[64U]; - __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ -} NVIC_Type; - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ -#else - uint32_t RESERVED0; -#endif - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - uint32_t RESERVED1; - __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) -/* SCB Interrupt Control State Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 8U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0xFFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ -#endif - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ -} MPU_Type; - -#define MPU_TYPE_RALIASES 1U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_ADDR_Pos 8U /*!< MPU RBAR: ADDR Position */ -#define MPU_RBAR_ADDR_Msk (0xFFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ - -#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ -#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ - -#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ -#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ - -/* MPU Region Attribute and Size Register Definitions */ -#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ -#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ - -#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ -#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ - -#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ -#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ - -#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ -#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ - -#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ -#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ - -#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ -#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ - -#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ -#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ - -#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ -#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ - -#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ -#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ - -#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ -#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Cortex-M0+ Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. - Therefore they are not covered by the Cortex-M0+ header file. - @{ - */ -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ -#endif - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ -/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M0+ */ - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ - - -/* Interrupt Priorities are WORD accessible only under Armv6-M */ -/* The following MACROS handle generation of the register offset and byte masks */ -#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) -#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) -#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) - -#define __NVIC_SetPriorityGrouping(X) (void)(X) -#define __NVIC_GetPriorityGrouping() (0U) - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - If VTOR is not present address 0 must be mapped to SRAM. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - uint32_t *vectors = (uint32_t *)SCB->VTOR; -#else - uint32_t *vectors = (uint32_t *)0x0U; -#endif - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - uint32_t *vectors = (uint32_t *)SCB->VTOR; -#else - uint32_t *vectors = (uint32_t *)0x0U; -#endif - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; - -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - SCB_AIRCR_SYSRESETREQ_Msk); - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv7.h" - -#endif - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM0PLUS_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm0plus.h + * @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File + * @version V5.0.6 + * @date 28. May 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM0PLUS_H_GENERIC +#define __CORE_CM0PLUS_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex-M0+ + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM0+ definitions */ +#define __CM0PLUS_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM0PLUS_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM0PLUS_CMSIS_VERSION ((__CM0PLUS_CMSIS_VERSION_MAIN << 16U) | \ + __CM0PLUS_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (0U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0PLUS_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM0PLUS_H_DEPENDANT +#define __CORE_CM0PLUS_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM0PLUS_REV + #define __CM0PLUS_REV 0x0000U + #warning "__CM0PLUS_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __VTOR_PRESENT + #define __VTOR_PRESENT 0U + #warning "__VTOR_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex-M0+ */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ +#else + uint32_t RESERVED0; +#endif + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) +/* SCB Interrupt Control State Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 8U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0xFFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 1U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 8U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0xFFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Cortex-M0+ Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the Cortex-M0+ header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M0+ */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + If VTOR is not present address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; + +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0PLUS_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm1.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm1.h index 0ed678e..fd1c407 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm1.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm1.h @@ -1,976 +1,976 @@ -/**************************************************************************//** - * @file core_cm1.h - * @brief CMSIS Cortex-M1 Core Peripheral Access Layer Header File - * @version V1.0.0 - * @date 23. July 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM1_H_GENERIC -#define __CORE_CM1_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_M1 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS CM1 definitions */ -#define __CM1_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM1_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM1_CMSIS_VERSION ((__CM1_CMSIS_VERSION_MAIN << 16U) | \ - __CM1_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (1U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM1_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM1_H_DEPENDANT -#define __CORE_CM1_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM1_REV - #define __CM1_REV 0x0100U - #warning "__CM1_REV not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 2U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex_M1 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t _reserved0:1; /*!< bit: 0 Reserved */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[31U]; - __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[31U]; - __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[31U]; - __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[31U]; - uint32_t RESERVED4[64U]; - __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ -} NVIC_Type; - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - uint32_t RESERVED0; - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - uint32_t RESERVED1; - __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ -} SCnSCB_Type; - -/* Auxiliary Control Register Definitions */ -#define SCnSCB_ACTLR_ITCMUAEN_Pos 4U /*!< ACTLR: Instruction TCM Upper Alias Enable Position */ -#define SCnSCB_ACTLR_ITCMUAEN_Msk (1UL << SCnSCB_ACTLR_ITCMUAEN_Pos) /*!< ACTLR: Instruction TCM Upper Alias Enable Mask */ - -#define SCnSCB_ACTLR_ITCMLAEN_Pos 3U /*!< ACTLR: Instruction TCM Lower Alias Enable Position */ -#define SCnSCB_ACTLR_ITCMLAEN_Msk (1UL << SCnSCB_ACTLR_ITCMLAEN_Pos) /*!< ACTLR: Instruction TCM Lower Alias Enable Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Cortex-M1 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. - Therefore they are not covered by the Cortex-M1 header file. - @{ - */ -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ -/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M1 */ - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ - - -/* Interrupt Priorities are WORD accessible only under Armv6-M */ -/* The following MACROS handle generation of the register offset and byte masks */ -#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) -#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) -#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) - -#define __NVIC_SetPriorityGrouping(X) (void)(X) -#define __NVIC_GetPriorityGrouping() (0U) - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - Address 0 must be mapped to SRAM. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)0x0U; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)0x0U; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - SCB_AIRCR_SYSRESETREQ_Msk); - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM1_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm1.h + * @brief CMSIS Cortex-M1 Core Peripheral Access Layer Header File + * @version V1.0.0 + * @date 23. July 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM1_H_GENERIC +#define __CORE_CM1_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M1 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM1 definitions */ +#define __CM1_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM1_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM1_CMSIS_VERSION ((__CM1_CMSIS_VERSION_MAIN << 16U) | \ + __CM1_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (1U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM1_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM1_H_DEPENDANT +#define __CORE_CM1_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM1_REV + #define __CM1_REV 0x0100U + #warning "__CM1_REV not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M1 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t _reserved0:1; /*!< bit: 0 Reserved */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + uint32_t RESERVED0; + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_ITCMUAEN_Pos 4U /*!< ACTLR: Instruction TCM Upper Alias Enable Position */ +#define SCnSCB_ACTLR_ITCMUAEN_Msk (1UL << SCnSCB_ACTLR_ITCMUAEN_Pos) /*!< ACTLR: Instruction TCM Upper Alias Enable Mask */ + +#define SCnSCB_ACTLR_ITCMLAEN_Pos 3U /*!< ACTLR: Instruction TCM Lower Alias Enable Position */ +#define SCnSCB_ACTLR_ITCMLAEN_Msk (1UL << SCnSCB_ACTLR_ITCMLAEN_Pos) /*!< ACTLR: Instruction TCM Lower Alias Enable Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Cortex-M1 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the Cortex-M1 header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M1 */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + Address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)0x0U; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)0x0U; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM1_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm23.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm23.h index acbc5df..8202a8d 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm23.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm23.h @@ -1,1993 +1,1993 @@ -/**************************************************************************//** - * @file core_cm23.h - * @brief CMSIS Cortex-M23 Core Peripheral Access Layer Header File - * @version V5.0.7 - * @date 22. June 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM23_H_GENERIC -#define __CORE_CM23_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_M23 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS definitions */ -#define __CM23_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM23_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM23_CMSIS_VERSION ((__CM23_CMSIS_VERSION_MAIN << 16U) | \ - __CM23_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (23U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM23_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM23_H_DEPENDANT -#define __CORE_CM23_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM23_REV - #define __CM23_REV 0x0000U - #warning "__CM23_REV not defined in device header file; using default!" - #endif - - #ifndef __FPU_PRESENT - #define __FPU_PRESENT 0U - #warning "__FPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __SAUREGION_PRESENT - #define __SAUREGION_PRESENT 0U - #warning "__SAUREGION_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __VTOR_PRESENT - #define __VTOR_PRESENT 0U - #warning "__VTOR_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 2U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif - - #ifndef __ETM_PRESENT - #define __ETM_PRESENT 0U - #warning "__ETM_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MTB_PRESENT - #define __MTB_PRESENT 0U - #warning "__MTB_PRESENT not defined in device header file; using default!" - #endif - -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex_M23 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - - Core SAU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[16U]; - __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[16U]; - __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[16U]; - __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[16U]; - __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[16U]; - __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ - uint32_t RESERVED5[16U]; - __IOM uint32_t IPR[124U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ -} NVIC_Type; - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ -#else - uint32_t RESERVED0; -#endif - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - uint32_t RESERVED1; - __IOM uint32_t SHPR[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ -#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ - -#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ -#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ - -#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ -#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ -#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) -/* SCB Vector Table Offset Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ -#endif - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ -#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ - -#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ -#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ - -#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ -#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ -#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ -#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ - -#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ -#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ - -#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ -#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ - -#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ -#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ -#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ -#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ - -#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ -#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - uint32_t RESERVED0[6U]; - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - uint32_t RESERVED3[1U]; - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED4[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - uint32_t RESERVED5[1U]; - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED6[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - uint32_t RESERVED7[1U]; - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ - uint32_t RESERVED8[1U]; - __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ - uint32_t RESERVED9[1U]; - __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ - uint32_t RESERVED10[1U]; - __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ - uint32_t RESERVED11[1U]; - __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ - uint32_t RESERVED12[1U]; - __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ - uint32_t RESERVED13[1U]; - __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ - uint32_t RESERVED14[1U]; - __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ - uint32_t RESERVED15[1U]; - __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ - uint32_t RESERVED16[1U]; - __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ - uint32_t RESERVED17[1U]; - __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ - uint32_t RESERVED18[1U]; - __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ - uint32_t RESERVED19[1U]; - __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ - uint32_t RESERVED20[1U]; - __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ - uint32_t RESERVED21[1U]; - __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ - uint32_t RESERVED22[1U]; - __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ - uint32_t RESERVED23[1U]; - __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ - uint32_t RESERVED24[1U]; - __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ - uint32_t RESERVED25[1U]; - __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ - uint32_t RESERVED26[1U]; - __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ - uint32_t RESERVED27[1U]; - __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ - uint32_t RESERVED28[1U]; - __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ - uint32_t RESERVED29[1U]; - __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ - uint32_t RESERVED30[1U]; - __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ - uint32_t RESERVED31[1U]; - __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ -#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ - -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ -#define DWT_FUNCTION_ACTION_Msk (0x3UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ - -#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ -#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ - uint32_t RESERVED3[759U]; - __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ - __IM uint32_t ITFTTD0; /*!< Offset: 0xEEC (R/ ) Integration Test FIFO Test Data 0 Register */ - __IOM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/W) Integration Test ATB Control Register 2 */ - uint32_t RESERVED4[1U]; - __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) Integration Test ATB Control Register 0 */ - __IM uint32_t ITFTTD1; /*!< Offset: 0xEFC (R/ ) Integration Test FIFO Test Data 1 Register */ - __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ - uint32_t RESERVED5[39U]; - __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ - __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ - uint32_t RESERVED7[8U]; - __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) Device Configuration Register */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Identifier Register */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ -#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ -#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI TRIGGER Register Definitions */ -#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ -#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ - -/* TPI Integration Test FIFO Test Data 0 Register Definitions */ -#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD0: ATB Interface 2 ATVALIDPosition */ -#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 2 ATVALID Mask */ - -#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD0: ATB Interface 2 byte count Position */ -#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 2 byte count Mask */ - -#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Position */ -#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Mask */ - -#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD0: ATB Interface 1 byte count Position */ -#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 1 byte countt Mask */ - -#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U /*!< TPI ITFTTD0: ATB Interface 1 data2 Position */ -#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data2 Mask */ - -#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U /*!< TPI ITFTTD0: ATB Interface 1 data1 Position */ -#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data1 Mask */ - -#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U /*!< TPI ITFTTD0: ATB Interface 1 data0 Position */ -#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/) /*!< TPI ITFTTD0: ATB Interface 1 data0 Mask */ - -/* TPI Integration Test ATB Control Register 2 Register Definitions */ -#define TPI_ITATBCTR2_AFVALID2S_Pos 1U /*!< TPI ITATBCTR2: AFVALID2S Position */ -#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos) /*!< TPI ITATBCTR2: AFVALID2SS Mask */ - -#define TPI_ITATBCTR2_AFVALID1S_Pos 1U /*!< TPI ITATBCTR2: AFVALID1S Position */ -#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos) /*!< TPI ITATBCTR2: AFVALID1SS Mask */ - -#define TPI_ITATBCTR2_ATREADY2S_Pos 0U /*!< TPI ITATBCTR2: ATREADY2S Position */ -#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/) /*!< TPI ITATBCTR2: ATREADY2S Mask */ - -#define TPI_ITATBCTR2_ATREADY1S_Pos 0U /*!< TPI ITATBCTR2: ATREADY1S Position */ -#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/) /*!< TPI ITATBCTR2: ATREADY1S Mask */ - -/* TPI Integration Test FIFO Test Data 1 Register Definitions */ -#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Position */ -#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Mask */ - -#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD1: ATB Interface 2 byte count Position */ -#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 2 byte count Mask */ - -#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Position */ -#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Mask */ - -#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD1: ATB Interface 1 byte count Position */ -#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 1 byte countt Mask */ - -#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U /*!< TPI ITFTTD1: ATB Interface 2 data2 Position */ -#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data2 Mask */ - -#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U /*!< TPI ITFTTD1: ATB Interface 2 data1 Position */ -#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data1 Mask */ - -#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U /*!< TPI ITFTTD1: ATB Interface 2 data0 Position */ -#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/) /*!< TPI ITFTTD1: ATB Interface 2 data0 Mask */ - -/* TPI Integration Test ATB Control Register 0 Definitions */ -#define TPI_ITATBCTR0_AFVALID2S_Pos 1U /*!< TPI ITATBCTR0: AFVALID2S Position */ -#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos) /*!< TPI ITATBCTR0: AFVALID2SS Mask */ - -#define TPI_ITATBCTR0_AFVALID1S_Pos 1U /*!< TPI ITATBCTR0: AFVALID1S Position */ -#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos) /*!< TPI ITATBCTR0: AFVALID1SS Mask */ - -#define TPI_ITATBCTR0_ATREADY2S_Pos 0U /*!< TPI ITATBCTR0: ATREADY2S Position */ -#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/) /*!< TPI ITATBCTR0: ATREADY2S Mask */ - -#define TPI_ITATBCTR0_ATREADY1S_Pos 0U /*!< TPI ITATBCTR0: ATREADY1S Position */ -#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/) /*!< TPI ITATBCTR0: ATREADY1S Mask */ - -/* TPI Integration Mode Control Register Definitions */ -#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ -#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFOSZ Position */ -#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFOSZ Mask */ - -#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ -#define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ - uint32_t RESERVED0[7U]; - union { - __IOM uint32_t MAIR[2]; - struct { - __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ - __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ - }; - }; -} MPU_Type; - -#define MPU_TYPE_RALIASES 1U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ -#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ - -#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ -#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ - -#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ -#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ - -#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ -#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ - -/* MPU Region Limit Address Register Definitions */ -#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ -#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ - -#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ -#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ - -#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: EN Position */ -#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: EN Mask */ - -/* MPU Memory Attribute Indirection Register 0 Definitions */ -#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ -#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ - -#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ -#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ - -#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ -#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ - -#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ -#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ - -/* MPU Memory Attribute Indirection Register 1 Definitions */ -#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ -#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ - -#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ -#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ - -#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ -#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ - -#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ -#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SAU Security Attribution Unit (SAU) - \brief Type definitions for the Security Attribution Unit (SAU) - @{ - */ - -/** - \brief Structure type to access the Security Attribution Unit (SAU). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ - __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ -#endif -} SAU_Type; - -/* SAU Control Register Definitions */ -#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ -#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ - -#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ -#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ - -/* SAU Type Register Definitions */ -#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ -#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ - -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) -/* SAU Region Number Register Definitions */ -#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ -#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ - -/* SAU Region Base Address Register Definitions */ -#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ -#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ - -/* SAU Region Limit Address Register Definitions */ -#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ -#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ - -#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ -#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ - -#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ -#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ - -#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ - -/*@} end of group CMSIS_SAU */ -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ - uint32_t RESERVED4[1U]; - __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ - __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ -#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register */ -#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */ -#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/* Debug Authentication Control Register Definitions */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ - -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ - -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ - -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ - -/* Debug Security Control and Status Register Definitions */ -#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ -#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ - -#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ -#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ - -#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ -#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ - #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ - #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ - #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ - #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ - #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ - #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ - #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - - - #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ - #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ - #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ - #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ - #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ - #endif - - #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ - #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ - #endif - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ - #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ - #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ - #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ - #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ - - #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ - #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ - #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ - #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ - #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ - #endif - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else -/*#define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping not available for Cortex-M23 */ -/*#define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping not available for Cortex-M23 */ - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* Special LR values for Secure/Non-Secure call handling and exception handling */ - -/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ -#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ - -/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ -#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ -#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ -#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ -#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ -#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ -#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ -#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ - -/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ -#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ -#else -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ -#endif - - -/* Interrupt Priorities are WORD accessible only under Armv6-M */ -/* The following MACROS handle generation of the register offset and byte masks */ -#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) -#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) -#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) - -#define __NVIC_SetPriorityGrouping(X) (void)(X) -#define __NVIC_GetPriorityGrouping() (0U) - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Get Interrupt Target State - \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - \return 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Target State - \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Clear Interrupt Target State - \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - If VTOR is not present address 0 must be mapped to SRAM. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - uint32_t *vectors = (uint32_t *)SCB->VTOR; -#else - uint32_t *vectors = (uint32_t *)0x0U; -#endif - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ -#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) - uint32_t *vectors = (uint32_t *)SCB->VTOR; -#else - uint32_t *vectors = (uint32_t *)0x0U; -#endif - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - SCB_AIRCR_SYSRESETREQ_Msk); - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Enable Interrupt (non-secure) - \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status (non-secure) - \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt (non-secure) - \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Pending Interrupt (non-secure) - \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt (non-secure) - \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt (non-secure) - \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt (non-secure) - \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority (non-secure) - \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every non-secure processor exception. - */ -__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC_NS->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB_NS->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB_NS->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority (non-secure) - \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB_NS->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv8.h" - -#endif - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ########################## SAU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SAUFunctions SAU Functions - \brief Functions that configure the SAU. - @{ - */ - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - -/** - \brief Enable SAU - \details Enables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Enable(void) -{ - SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); -} - - - -/** - \brief Disable SAU - \details Disables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Disable(void) -{ - SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); -} - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_SAUFunctions */ - - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief System Tick Configuration (non-secure) - \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function TZ_SysTick_Config_NS is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - - */ -__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM23_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm23.h + * @brief CMSIS Cortex-M23 Core Peripheral Access Layer Header File + * @version V5.0.7 + * @date 22. June 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM23_H_GENERIC +#define __CORE_CM23_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M23 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS definitions */ +#define __CM23_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM23_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM23_CMSIS_VERSION ((__CM23_CMSIS_VERSION_MAIN << 16U) | \ + __CM23_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (23U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM23_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM23_H_DEPENDANT +#define __CORE_CM23_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM23_REV + #define __CM23_REV 0x0000U + #warning "__CM23_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __VTOR_PRESENT + #define __VTOR_PRESENT 0U + #warning "__VTOR_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif + + #ifndef __ETM_PRESENT + #define __ETM_PRESENT 0U + #warning "__ETM_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MTB_PRESENT + #define __MTB_PRESENT 0U + #warning "__MTB_PRESENT not defined in device header file; using default!" + #endif + +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M23 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint32_t IPR[124U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ +#else + uint32_t RESERVED0; +#endif + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHPR[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + uint32_t RESERVED0[6U]; + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x3UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t ITFTTD0; /*!< Offset: 0xEEC (R/ ) Integration Test FIFO Test Data 0 Register */ + __IOM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/W) Integration Test ATB Control Register 2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) Integration Test ATB Control Register 0 */ + __IM uint32_t ITFTTD1; /*!< Offset: 0xEFC (R/ ) Integration Test FIFO Test Data 1 Register */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) Device Configuration Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Identifier Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration Test FIFO Test Data 0 Register Definitions */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD0: ATB Interface 2 ATVALIDPosition */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD0: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD0: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U /*!< TPI ITFTTD0: ATB Interface 1 data2 Position */ +#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data2 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U /*!< TPI ITFTTD0: ATB Interface 1 data1 Position */ +#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data1 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U /*!< TPI ITFTTD0: ATB Interface 1 data0 Position */ +#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/) /*!< TPI ITFTTD0: ATB Interface 1 data0 Mask */ + +/* TPI Integration Test ATB Control Register 2 Register Definitions */ +#define TPI_ITATBCTR2_AFVALID2S_Pos 1U /*!< TPI ITATBCTR2: AFVALID2S Position */ +#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos) /*!< TPI ITATBCTR2: AFVALID2SS Mask */ + +#define TPI_ITATBCTR2_AFVALID1S_Pos 1U /*!< TPI ITATBCTR2: AFVALID1S Position */ +#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos) /*!< TPI ITATBCTR2: AFVALID1SS Mask */ + +#define TPI_ITATBCTR2_ATREADY2S_Pos 0U /*!< TPI ITATBCTR2: ATREADY2S Position */ +#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/) /*!< TPI ITATBCTR2: ATREADY2S Mask */ + +#define TPI_ITATBCTR2_ATREADY1S_Pos 0U /*!< TPI ITATBCTR2: ATREADY1S Position */ +#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/) /*!< TPI ITATBCTR2: ATREADY1S Mask */ + +/* TPI Integration Test FIFO Test Data 1 Register Definitions */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD1: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD1: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U /*!< TPI ITFTTD1: ATB Interface 2 data2 Position */ +#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data2 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U /*!< TPI ITFTTD1: ATB Interface 2 data1 Position */ +#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data1 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U /*!< TPI ITFTTD1: ATB Interface 2 data0 Position */ +#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/) /*!< TPI ITFTTD1: ATB Interface 2 data0 Mask */ + +/* TPI Integration Test ATB Control Register 0 Definitions */ +#define TPI_ITATBCTR0_AFVALID2S_Pos 1U /*!< TPI ITATBCTR0: AFVALID2S Position */ +#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos) /*!< TPI ITATBCTR0: AFVALID2SS Mask */ + +#define TPI_ITATBCTR0_AFVALID1S_Pos 1U /*!< TPI ITATBCTR0: AFVALID1S Position */ +#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos) /*!< TPI ITATBCTR0: AFVALID1SS Mask */ + +#define TPI_ITATBCTR0_ATREADY2S_Pos 0U /*!< TPI ITATBCTR0: ATREADY2S Position */ +#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/) /*!< TPI ITATBCTR0: ATREADY2S Mask */ + +#define TPI_ITATBCTR0_ATREADY1S_Pos 0U /*!< TPI ITATBCTR0: ATREADY1S Position */ +#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/) /*!< TPI ITATBCTR0: ATREADY1S Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFOSZ Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFOSZ Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + uint32_t RESERVED0[7U]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 1U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: EN Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: EN Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#endif +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register */ +#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */ +#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else +/*#define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping not available for Cortex-M23 */ +/*#define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping not available for Cortex-M23 */ + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + If VTOR is not present address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC_NS->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB_NS->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB_NS->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB_NS->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM23_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm3.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm3.h index 74bff64..b0dfbd3 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm3.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm3.h @@ -1,1941 +1,1941 @@ -/**************************************************************************//** - * @file core_cm3.h - * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File - * @version V5.0.8 - * @date 04. June 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM3_H_GENERIC -#define __CORE_CM3_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_M3 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS CM3 definitions */ -#define __CM3_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM3_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16U) | \ - __CM3_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (3U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM3_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM3_H_DEPENDANT -#define __CORE_CM3_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM3_REV - #define __CM3_REV 0x0200U - #warning "__CM3_REV not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 3U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex_M3 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:27; /*!< bit: 0..26 Reserved */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - -#define APSR_Q_Pos 27U /*!< APSR: Q Position */ -#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:1; /*!< bit: 9 Reserved */ - uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ - uint32_t _reserved1:8; /*!< bit: 16..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit */ - uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ -#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ - -#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ -#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ -#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[24U]; - __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[24U]; - __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[24U]; - __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[24U]; - __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[56U]; - __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ - uint32_t RESERVED5[644U]; - __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ -} NVIC_Type; - -/* Software Triggered Interrupt Register Definitions */ -#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ -#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ - __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ - __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ - __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ - __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ - __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ - __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ - __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ - __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ - __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ - __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ - __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ - uint32_t RESERVED0[5U]; - __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Vector Table Offset Register Definitions */ -#if defined (__CM3_REV) && (__CM3_REV < 0x0201U) /* core r2p1 */ -#define SCB_VTOR_TBLBASE_Pos 29U /*!< SCB VTOR: TBLBASE Position */ -#define SCB_VTOR_TBLBASE_Msk (1UL << SCB_VTOR_TBLBASE_Pos) /*!< SCB VTOR: TBLBASE Mask */ - -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x3FFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ -#else -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ -#endif - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ -#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ -#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ -#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ -#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ - -#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ -#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ - -#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ -#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ -#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ - -#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ -#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ - -#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ -#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ -#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ -#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ - -#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ -#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ - -#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ -#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ - -/* SCB Configurable Fault Status Register Definitions */ -#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ -#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ - -#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ -#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ - -#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ -#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ - -/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ -#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ - -#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ -#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ - -#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ -#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ - -#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ -#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ - -#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ -#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ - -/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ -#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ - -#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ -#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ - -#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ -#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ - -#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ -#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ - -#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ -#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ - -#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ -#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ - -/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ -#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ - -#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ -#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ - -#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ -#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ - -#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ -#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ - -#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ -#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ - -#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ -#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ - -/* SCB Hard Fault Status Register Definitions */ -#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ -#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ - -#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ -#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ - -#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ -#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ - -/* SCB Debug Fault Status Register Definitions */ -#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ -#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ - -#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ -#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ - -#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ -#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ - -#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ -#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ - -#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ -#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ -#if defined (__CM3_REV) && (__CM3_REV >= 0x200U) - __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ -#else - uint32_t RESERVED1[1U]; -#endif -} SCnSCB_Type; - -/* Interrupt Controller Type Register Definitions */ -#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ -#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ - -/* Auxiliary Control Register Definitions */ - -#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ -#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ - -#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */ -#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */ - -#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ -#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) - \brief Type definitions for the Instrumentation Trace Macrocell (ITM) - @{ - */ - -/** - \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). - */ -typedef struct -{ - __OM union - { - __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ - __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ - __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ - } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ - uint32_t RESERVED0[864U]; - __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ - uint32_t RESERVED1[15U]; - __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ - uint32_t RESERVED2[15U]; - __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ - uint32_t RESERVED3[29U]; - __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ - __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ - __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ - uint32_t RESERVED4[43U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ - uint32_t RESERVED5[6U]; - __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ - __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ - __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ - __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ - __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ - __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ - __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ - __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ - __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ - __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ - __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ - __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ -} ITM_Type; - -/* ITM Trace Privilege Register Definitions */ -#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ -#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ - -/* ITM Trace Control Register Definitions */ -#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ -#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ - -#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ -#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ - -#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ -#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ - -#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ -#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ - -#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ -#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ - -#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ -#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ - -#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ -#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ - -#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ -#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ - -#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ -#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ - -/* ITM Integration Write Register Definitions */ -#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ -#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ - -/* ITM Integration Read Register Definitions */ -#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ -#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ - -/* ITM Integration Mode Control Register Definitions */ -#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ -#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ - -/* ITM Lock Status Register Definitions */ -#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ -#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ - -#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ -#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ - -#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ -#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ - -/*@}*/ /* end of group CMSIS_ITM */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ - __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ - __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ - __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ - __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ - __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED0[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ -#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ - -#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ -#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ - -#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ -#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ - -#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ -#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ - -#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ -#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ - -#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ -#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ - -#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ -#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ - -#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ -#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ - -#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ -#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ - -#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ -#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ - -#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ -#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ - -#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ -#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ - -#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ -#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ - -/* DWT CPI Count Register Definitions */ -#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ -#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ - -/* DWT Exception Overhead Count Register Definitions */ -#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ -#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ - -/* DWT Sleep Count Register Definitions */ -#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ -#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ - -/* DWT LSU Count Register Definitions */ -#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ -#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ - -/* DWT Folded-instruction Count Register Definitions */ -#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ -#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ - -/* DWT Comparator Mask Register Definitions */ -#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ -#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ -#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ - -#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ -#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ -#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ - -#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ -#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ - -#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ -#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ - -#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ -#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ - -#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ -#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ - uint32_t RESERVED3[759U]; - __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ - __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ - __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ - uint32_t RESERVED4[1U]; - __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ - __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ - __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ - uint32_t RESERVED5[39U]; - __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ - __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ - uint32_t RESERVED7[8U]; - __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ -#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI TRIGGER Register Definitions */ -#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ -#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ - -/* TPI Integration ETM Data Register Definitions (FIFO0) */ -#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ -#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ - -#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ -#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ - -#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ -#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ - -#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ -#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ - -#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ -#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ - -#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ -#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ - -#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ -#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ - -/* TPI ITATBCTR2 Register Definitions */ -#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ -#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ - -#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ -#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ - -/* TPI Integration ITM Data Register Definitions (FIFO1) */ -#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ -#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ - -#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ -#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ - -#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ -#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ - -#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ -#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ - -#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ -#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ - -#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ -#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ - -#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ -#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ - -/* TPI ITATBCTR0 Register Definitions */ -#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ -#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ - -#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ -#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ - -/* TPI Integration Mode Control Register Definitions */ -#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ -#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ -#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ - -#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ -#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ - -#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ -#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ - __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ - __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ - __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ - __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ -} MPU_Type; - -#define MPU_TYPE_RALIASES 4U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ -#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ - -#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ -#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ - -#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ -#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ - -/* MPU Region Attribute and Size Register Definitions */ -#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ -#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ - -#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ -#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ - -#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ -#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ - -#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ -#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ - -#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ -#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ - -#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ -#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ - -#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ -#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ - -#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ -#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ - -#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ -#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ - -#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ -#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ -#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register Definitions */ -#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ -#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ - -#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ -#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ - -#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ -#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ - -#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ -#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ - -#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ -#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ -#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ - -#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ -#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ - -#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ -#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ - -#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ -#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ - -#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ -#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ - -#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ -#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ -#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ -#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ -#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ -#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ -#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ -#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ -#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ -#endif - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Debug Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ - - -/** - \brief Set Priority Grouping - \details Sets the priority grouping field using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ - SCB->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping - \details Reads the priority grouping field from the NVIC Interrupt Controller. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) -{ - return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | - SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv7.h" - -#endif - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - -/* ##################################### Debug In/Output function ########################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_core_DebugFunctions ITM Functions - \brief Functions that access the ITM debug interface. - @{ - */ - -extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ -#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ - - -/** - \brief ITM Send Character - \details Transmits a character via the ITM channel 0, and - \li Just returns when no debugger is connected that has booked the output. - \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. - \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 */ - ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ - { - while (ITM->PORT[0U].u32 == 0UL) - { - __NOP(); - } - ITM->PORT[0U].u8 = (uint8_t)ch; - } - return (ch); -} - - -/** - \brief ITM Receive Character - \details Inputs a character via the external variable \ref ITM_RxBuffer. - \return Received character. - \return -1 No character pending. - */ -__STATIC_INLINE int32_t ITM_ReceiveChar (void) -{ - int32_t ch = -1; /* no character available */ - - if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) - { - ch = ITM_RxBuffer; - ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ - } - - return (ch); -} - - -/** - \brief ITM Check Character - \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. - \return 0 No character available. - \return 1 Character available. - */ -__STATIC_INLINE int32_t ITM_CheckChar (void) -{ - - if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) - { - return (0); /* no character available */ - } - else - { - return (1); /* character available */ - } -} - -/*@} end of CMSIS_core_DebugFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM3_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm3.h + * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File + * @version V5.0.8 + * @date 04. June 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM3_H_GENERIC +#define __CORE_CM3_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M3 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM3 definitions */ +#define __CM3_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM3_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16U) | \ + __CM3_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (3U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM3_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM3_H_DEPENDANT +#define __CORE_CM3_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM3_REV + #define __CM3_REV 0x0200U + #warning "__CM3_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M3 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:27; /*!< bit: 0..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t _reserved1:8; /*!< bit: 16..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[5U]; + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#if defined (__CM3_REV) && (__CM3_REV < 0x0201U) /* core r2p1 */ +#define SCB_VTOR_TBLBASE_Pos 29U /*!< SCB VTOR: TBLBASE Position */ +#define SCB_VTOR_TBLBASE_Msk (1UL << SCB_VTOR_TBLBASE_Pos) /*!< SCB VTOR: TBLBASE Mask */ + +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x3FFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#else +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ +#if defined (__CM3_REV) && (__CM3_REV >= 0x200U) + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +#else + uint32_t RESERVED1[1U]; +#endif +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/* Auxiliary Control Register Definitions */ + +#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ +#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ + +#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */ +#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */ + +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[29U]; + __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ + __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ + __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Integration Write Register Definitions */ +#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ +#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ + +/* ITM Integration Read Register Definitions */ +#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ +#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ + +/* ITM Integration Mode Control Register Definitions */ +#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ +#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \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 */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM3_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm33.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm33.h index 6cd2db7..02f82e2 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm33.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm33.h @@ -1,3002 +1,3002 @@ -/**************************************************************************//** - * @file core_cm33.h - * @brief CMSIS Cortex-M33 Core Peripheral Access Layer Header File - * @version V5.0.9 - * @date 06. July 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM33_H_GENERIC -#define __CORE_CM33_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_M33 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS CM33 definitions */ -#define __CM33_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM33_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM33_CMSIS_VERSION ((__CM33_CMSIS_VERSION_MAIN << 16U) | \ - __CM33_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (33U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. -*/ -#if defined ( __CC_ARM ) - #if defined (__TARGET_FPU_VFP) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) - #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined (__ARM_PCS_VFP) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) - #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) - #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined ( __ICCARM__ ) - #if defined (__ARMVFP__) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - - #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) - #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) - #define __DSP_USED 1U - #else - #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" - #define __DSP_USED 0U - #endif - #else - #define __DSP_USED 0U - #endif - -#elif defined ( __TI_ARM__ ) - #if defined (__TI_VFP_SUPPORT__) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __TASKING__ ) - #if defined (__FPU_VFP__) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM33_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM33_H_DEPENDANT -#define __CORE_CM33_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM33_REV - #define __CM33_REV 0x0000U - #warning "__CM33_REV not defined in device header file; using default!" - #endif - - #ifndef __FPU_PRESENT - #define __FPU_PRESENT 0U - #warning "__FPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __SAUREGION_PRESENT - #define __SAUREGION_PRESENT 0U - #warning "__SAUREGION_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __DSP_PRESENT - #define __DSP_PRESENT 0U - #warning "__DSP_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 3U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex_M33 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - - Core SAU Register - - Core FPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - -#define APSR_Q_Pos 27U /*!< APSR: Q Position */ -#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ - -#define APSR_GE_Pos 16U /*!< APSR: GE Position */ -#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ -#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ - -#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ -#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ -#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ - uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ - uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ - uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ -#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ - -#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ -#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ - -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[16U]; - __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[16U]; - __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[16U]; - __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[16U]; - __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[16U]; - __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ - uint32_t RESERVED5[16U]; - __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ - uint32_t RESERVED6[580U]; - __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ -} NVIC_Type; - -/* Software Triggered Interrupt Register Definitions */ -#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ -#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ - __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ - __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ - __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ - __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ - __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ - __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ - __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ - __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ - __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ - __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ - __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ - __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ - __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ - __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ - __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ - __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ - __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ - uint32_t RESERVED3[92U]; - __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ - uint32_t RESERVED4[15U]; - __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ - __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ - __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ - uint32_t RESERVED5[1U]; - __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ - uint32_t RESERVED6[1U]; - __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ - __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ - __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ - __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ - __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ - __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ - __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ - __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ - uint32_t RESERVED7[6U]; - __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ - __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ - __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ - __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ - __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ - uint32_t RESERVED8[1U]; - __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ -#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ - -#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ -#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ - -#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ -#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ -#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Vector Table Offset Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ -#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ - -#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ -#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ - -#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ -#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ - -#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ -#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ -#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ -#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ - -#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ -#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ - -#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ -#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ - -#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ -#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ -#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ - -#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ -#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ - -#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ -#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ - -#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ -#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ - -#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ -#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ - -#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ -#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ -#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ - -#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ -#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ - -#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ -#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ -#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ -#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ - -#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ -#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ - -#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ -#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ - -#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ -#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ - -#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ -#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ - -#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ -#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ - -/* SCB Configurable Fault Status Register Definitions */ -#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ -#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ - -#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ -#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ - -#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ -#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ - -/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ -#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ - -#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ -#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ - -#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ -#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ - -#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ -#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ - -#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ -#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ - -#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ -#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ - -/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ -#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ - -#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ -#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ - -#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ -#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ - -#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ -#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ - -#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ -#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ - -#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ -#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ - -#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ -#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ - -/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ -#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ - -#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ -#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ - -#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ -#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ - -#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ -#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ - -#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ -#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ - -#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ -#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ - -#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ -#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ - -/* SCB Hard Fault Status Register Definitions */ -#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ -#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ - -#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ -#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ - -#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ -#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ - -/* SCB Debug Fault Status Register Definitions */ -#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ -#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ - -#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ -#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ - -#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ -#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ - -#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ -#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ - -#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ -#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ - -/* SCB Non-Secure Access Control Register Definitions */ -#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ -#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ - -#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ -#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ - -#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ -#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ - -/* SCB Cache Level ID Register Definitions */ -#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ -#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ - -#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ -#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ - -/* SCB Cache Type Register Definitions */ -#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ -#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ - -#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ -#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ - -#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ -#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ - -#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ -#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ - -#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ -#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ - -/* SCB Cache Size ID Register Definitions */ -#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ -#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ - -#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ -#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ - -#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ -#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ - -#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ -#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ - -#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ -#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ - -#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ -#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ - -#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ -#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ - -/* SCB Cache Size Selection Register Definitions */ -#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ -#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ - -#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ -#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ - -/* SCB Software Triggered Interrupt Register Definitions */ -#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ -#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ - -/* SCB D-Cache Invalidate by Set-way Register Definitions */ -#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ -#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ - -#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ -#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ - -/* SCB D-Cache Clean by Set-way Register Definitions */ -#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ -#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ - -#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ -#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ - -/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ -#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ -#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ - -#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ -#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ - -/* Instruction Tightly-Coupled Memory Control Register Definitions */ -#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ -#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ - -#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ -#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ - -#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ -#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ - -#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ -#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ - -/* Data Tightly-Coupled Memory Control Register Definitions */ -#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ -#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ - -#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ -#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ - -#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ -#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ - -#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ -#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ - -/* AHBP Control Register Definitions */ -#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ -#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ - -#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ -#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ - -/* L1 Cache Control Register Definitions */ -#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ -#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ - -#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ -#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ - -#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ -#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ - -/* AHBS Control Register Definitions */ -#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ -#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ - -#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ -#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ - -#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ -#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ - -/* Auxiliary Bus Fault Status Register Definitions */ -#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ -#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ - -#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ -#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ - -#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ -#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ - -#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ -#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ - -#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ -#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ - -#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ -#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ - __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ - __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ -} SCnSCB_Type; - -/* Interrupt Controller Type Register Definitions */ -#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ -#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) - \brief Type definitions for the Instrumentation Trace Macrocell (ITM) - @{ - */ - -/** - \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). - */ -typedef struct -{ - __OM union - { - __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ - __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ - __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ - } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ - uint32_t RESERVED0[864U]; - __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ - uint32_t RESERVED1[15U]; - __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ - uint32_t RESERVED2[15U]; - __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ - uint32_t RESERVED3[29U]; - __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ - __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ - __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ - uint32_t RESERVED4[43U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ - uint32_t RESERVED5[1U]; - __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ - uint32_t RESERVED6[4U]; - __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ - __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ - __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ - __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ - __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ - __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ - __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ - __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ - __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ - __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ - __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ - __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ -} ITM_Type; - -/* ITM Stimulus Port Register Definitions */ -#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ -#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ - -#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ -#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ - -/* ITM Trace Privilege Register Definitions */ -#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ -#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ - -/* ITM Trace Control Register Definitions */ -#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ -#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ - -#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ -#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ - -#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ -#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ - -#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ -#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ - -#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ -#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ - -#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ -#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ - -#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ -#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ - -#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ -#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ - -#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ -#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ - -#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ -#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ - -/* ITM Integration Write Register Definitions */ -#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ -#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ - -/* ITM Integration Read Register Definitions */ -#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ -#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ - -/* ITM Integration Mode Control Register Definitions */ -#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ -#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ - -/* ITM Lock Status Register Definitions */ -#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ -#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ - -#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ -#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ - -#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ -#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ - -/*@}*/ /* end of group CMSIS_ITM */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ - __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ - __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ - __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ - __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ - __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - uint32_t RESERVED3[1U]; - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED4[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - uint32_t RESERVED5[1U]; - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED6[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - uint32_t RESERVED7[1U]; - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ - uint32_t RESERVED8[1U]; - __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ - uint32_t RESERVED9[1U]; - __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ - uint32_t RESERVED10[1U]; - __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ - uint32_t RESERVED11[1U]; - __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ - uint32_t RESERVED12[1U]; - __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ - uint32_t RESERVED13[1U]; - __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ - uint32_t RESERVED14[1U]; - __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ - uint32_t RESERVED15[1U]; - __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ - uint32_t RESERVED16[1U]; - __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ - uint32_t RESERVED17[1U]; - __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ - uint32_t RESERVED18[1U]; - __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ - uint32_t RESERVED19[1U]; - __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ - uint32_t RESERVED20[1U]; - __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ - uint32_t RESERVED21[1U]; - __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ - uint32_t RESERVED22[1U]; - __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ - uint32_t RESERVED23[1U]; - __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ - uint32_t RESERVED24[1U]; - __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ - uint32_t RESERVED25[1U]; - __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ - uint32_t RESERVED26[1U]; - __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ - uint32_t RESERVED27[1U]; - __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ - uint32_t RESERVED28[1U]; - __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ - uint32_t RESERVED29[1U]; - __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ - uint32_t RESERVED30[1U]; - __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ - uint32_t RESERVED31[1U]; - __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ - uint32_t RESERVED32[934U]; - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ - uint32_t RESERVED33[1U]; - __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ -#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ - -#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ -#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ - -#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ -#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ - -#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ -#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ - -#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ -#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ - -#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ -#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ - -#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ -#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ - -#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ -#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ - -#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ -#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ - -#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ -#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ - -#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ -#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ - -#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ -#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ - -#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ -#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ - -#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ -#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ - -/* DWT CPI Count Register Definitions */ -#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ -#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ - -/* DWT Exception Overhead Count Register Definitions */ -#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ -#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ - -/* DWT Sleep Count Register Definitions */ -#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ -#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ - -/* DWT LSU Count Register Definitions */ -#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ -#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ - -/* DWT Folded-instruction Count Register Definitions */ -#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ -#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ -#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ - -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ -#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ - -#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ -#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ - uint32_t RESERVED3[759U]; - __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ - __IM uint32_t ITFTTD0; /*!< Offset: 0xEEC (R/ ) Integration Test FIFO Test Data 0 Register */ - __IOM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/W) Integration Test ATB Control Register 2 */ - uint32_t RESERVED4[1U]; - __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) Integration Test ATB Control Register 0 */ - __IM uint32_t ITFTTD1; /*!< Offset: 0xEFC (R/ ) Integration Test FIFO Test Data 1 Register */ - __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ - uint32_t RESERVED5[39U]; - __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ - __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ - uint32_t RESERVED7[8U]; - __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) Device Configuration Register */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Identifier Register */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ -#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ -#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI TRIGGER Register Definitions */ -#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ -#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ - -/* TPI Integration Test FIFO Test Data 0 Register Definitions */ -#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD0: ATB Interface 2 ATVALIDPosition */ -#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 2 ATVALID Mask */ - -#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD0: ATB Interface 2 byte count Position */ -#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 2 byte count Mask */ - -#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Position */ -#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Mask */ - -#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD0: ATB Interface 1 byte count Position */ -#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 1 byte countt Mask */ - -#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U /*!< TPI ITFTTD0: ATB Interface 1 data2 Position */ -#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data2 Mask */ - -#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U /*!< TPI ITFTTD0: ATB Interface 1 data1 Position */ -#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data1 Mask */ - -#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U /*!< TPI ITFTTD0: ATB Interface 1 data0 Position */ -#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/) /*!< TPI ITFTTD0: ATB Interface 1 data0 Mask */ - -/* TPI Integration Test ATB Control Register 2 Register Definitions */ -#define TPI_ITATBCTR2_AFVALID2S_Pos 1U /*!< TPI ITATBCTR2: AFVALID2S Position */ -#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos) /*!< TPI ITATBCTR2: AFVALID2SS Mask */ - -#define TPI_ITATBCTR2_AFVALID1S_Pos 1U /*!< TPI ITATBCTR2: AFVALID1S Position */ -#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos) /*!< TPI ITATBCTR2: AFVALID1SS Mask */ - -#define TPI_ITATBCTR2_ATREADY2S_Pos 0U /*!< TPI ITATBCTR2: ATREADY2S Position */ -#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/) /*!< TPI ITATBCTR2: ATREADY2S Mask */ - -#define TPI_ITATBCTR2_ATREADY1S_Pos 0U /*!< TPI ITATBCTR2: ATREADY1S Position */ -#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/) /*!< TPI ITATBCTR2: ATREADY1S Mask */ - -/* TPI Integration Test FIFO Test Data 1 Register Definitions */ -#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Position */ -#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Mask */ - -#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD1: ATB Interface 2 byte count Position */ -#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 2 byte count Mask */ - -#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Position */ -#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Mask */ - -#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD1: ATB Interface 1 byte count Position */ -#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 1 byte countt Mask */ - -#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U /*!< TPI ITFTTD1: ATB Interface 2 data2 Position */ -#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data2 Mask */ - -#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U /*!< TPI ITFTTD1: ATB Interface 2 data1 Position */ -#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data1 Mask */ - -#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U /*!< TPI ITFTTD1: ATB Interface 2 data0 Position */ -#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/) /*!< TPI ITFTTD1: ATB Interface 2 data0 Mask */ - -/* TPI Integration Test ATB Control Register 0 Definitions */ -#define TPI_ITATBCTR0_AFVALID2S_Pos 1U /*!< TPI ITATBCTR0: AFVALID2S Position */ -#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos) /*!< TPI ITATBCTR0: AFVALID2SS Mask */ - -#define TPI_ITATBCTR0_AFVALID1S_Pos 1U /*!< TPI ITATBCTR0: AFVALID1S Position */ -#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos) /*!< TPI ITATBCTR0: AFVALID1SS Mask */ - -#define TPI_ITATBCTR0_ATREADY2S_Pos 0U /*!< TPI ITATBCTR0: ATREADY2S Position */ -#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/) /*!< TPI ITATBCTR0: ATREADY2S Mask */ - -#define TPI_ITATBCTR0_ATREADY1S_Pos 0U /*!< TPI ITATBCTR0: ATREADY1S Position */ -#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/) /*!< TPI ITATBCTR0: ATREADY1S Mask */ - -/* TPI Integration Mode Control Register Definitions */ -#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ -#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFOSZ Position */ -#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFOSZ Mask */ - -#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ -#define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ - __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ - __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ - __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ - __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ - __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ - __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ - uint32_t RESERVED0[1]; - union { - __IOM uint32_t MAIR[2]; - struct { - __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ - __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ - }; - }; -} MPU_Type; - -#define MPU_TYPE_RALIASES 4U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ -#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ - -#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ -#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ - -#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ -#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ - -#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ -#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ - -/* MPU Region Limit Address Register Definitions */ -#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ -#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ - -#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ -#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ - -#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ -#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ - -/* MPU Memory Attribute Indirection Register 0 Definitions */ -#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ -#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ - -#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ -#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ - -#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ -#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ - -#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ -#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ - -/* MPU Memory Attribute Indirection Register 1 Definitions */ -#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ -#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ - -#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ -#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ - -#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ -#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ - -#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ -#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SAU Security Attribution Unit (SAU) - \brief Type definitions for the Security Attribution Unit (SAU) - @{ - */ - -/** - \brief Structure type to access the Security Attribution Unit (SAU). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ - __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ - __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ -#else - uint32_t RESERVED0[3]; -#endif - __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ - __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ -} SAU_Type; - -/* SAU Control Register Definitions */ -#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ -#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ - -#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ -#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ - -/* SAU Type Register Definitions */ -#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ -#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ - -#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) -/* SAU Region Number Register Definitions */ -#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ -#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ - -/* SAU Region Base Address Register Definitions */ -#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ -#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ - -/* SAU Region Limit Address Register Definitions */ -#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ -#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ - -#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ -#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ - -#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ -#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ - -#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ - -/* Secure Fault Status Register Definitions */ -#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ -#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ - -#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ -#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ - -#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ -#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ - -#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ -#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ - -#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ -#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ - -#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ -#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ - -#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ -#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ - -#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ -#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ - -/*@} end of group CMSIS_SAU */ -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_FPU Floating Point Unit (FPU) - \brief Type definitions for the Floating Point Unit (FPU) - @{ - */ - -/** - \brief Structure type to access the Floating Point Unit (FPU). - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ - __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ - __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ - __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ - __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ -} FPU_Type; - -/* Floating-Point Context Control Register Definitions */ -#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ -#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ - -#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ -#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ - -#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ -#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ - -#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ -#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ - -#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ -#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ - -#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ -#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ - -#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ -#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ - -#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ -#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ - -#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ -#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ - -#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ -#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ - -#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ -#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ - -#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ -#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ - -#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ -#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ - -#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ -#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ - -#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ -#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ - -#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ -#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ - -#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ -#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ - -/* Floating-Point Context Address Register Definitions */ -#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ -#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ - -/* Floating-Point Default Status Control Register Definitions */ -#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ -#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ - -#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ -#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ - -#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ -#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ - -#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ -#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ - -/* Media and FP Feature Register 0 Definitions */ -#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ -#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ - -#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ -#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ - -#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ -#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ - -#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ -#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ - -#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ -#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ - -#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ -#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ - -#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ -#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ - -#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ -#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ - -/* Media and FP Feature Register 1 Definitions */ -#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ -#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ - -#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ -#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ - -#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ -#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ - -#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ -#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ - -/*@} end of group CMSIS_FPU */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ - uint32_t RESERVED4[1U]; - __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ - __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ -#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ -#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register Definitions */ -#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ -#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ - -#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ -#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ - -#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ -#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ - -#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ -#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ - -#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ -#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ -#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ - -#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ -#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ - -#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ -#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ - -#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ -#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ - -#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ -#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ - -#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ -#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/* Debug Authentication Control Register Definitions */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ -#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ - -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ - -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ -#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ - -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ -#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ - -/* Debug Security Control and Status Register Definitions */ -#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ -#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ - -#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ -#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ - -#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ -#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ - #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ - #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ - #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ - #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ - #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ - #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ - #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ - #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - - #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ - #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ - #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ - #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ - #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ - #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ - #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ - #endif - - #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ - #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ - #endif - - #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ - #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ - #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ - #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ - #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ - #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ - - #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ - #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ - #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ - #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ - #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ - - #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ - #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ - #endif - - #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ - #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Debug Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* Special LR values for Secure/Non-Secure call handling and exception handling */ - -/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ -#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ - -/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ -#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ -#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ -#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ -#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ -#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ -#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ -#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ - -/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ -#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ -#else -#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ -#endif - - -/** - \brief Set Priority Grouping - \details Sets the priority grouping field using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << 8U) ); /* Insert write key and priority group */ - SCB->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping - \details Reads the priority grouping field from the NVIC Interrupt Controller. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) -{ - return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Get Interrupt Target State - \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - \return 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Target State - \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Clear Interrupt Target State - \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 if interrupt is assigned to Secure - 1 if interrupt is assigned to Non Secure - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); - return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | - SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief Set Priority Grouping (non-secure) - \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB_NS->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ - SCB_NS->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping (non-secure) - \details Reads the priority grouping field from the non-secure NVIC when in secure state. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) -{ - return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt (non-secure) - \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status (non-secure) - \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt (non-secure) - \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Pending Interrupt (non-secure) - \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt (non-secure) - \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt (non-secure) - \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt (non-secure) - \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority (non-secure) - \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every non-secure processor exception. - */ -__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority (non-secure) - \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} -#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv8.h" - -#endif - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - uint32_t mvfr0; - - mvfr0 = FPU->MVFR0; - if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) - { - return 2U; /* Double + Single precision FPU */ - } - else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) - { - return 1U; /* Single precision FPU */ - } - else - { - return 0U; /* No FPU */ - } -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ########################## SAU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SAUFunctions SAU Functions - \brief Functions that configure the SAU. - @{ - */ - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) - -/** - \brief Enable SAU - \details Enables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Enable(void) -{ - SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); -} - - - -/** - \brief Disable SAU - \details Disables the Security Attribution Unit (SAU). - */ -__STATIC_INLINE void TZ_SAU_Disable(void) -{ - SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); -} - -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -/*@} end of CMSIS_Core_SAUFunctions */ - - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) -/** - \brief System Tick Configuration (non-secure) - \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function TZ_SysTick_Config_NS is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - - */ -__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} -#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - -/* ##################################### Debug In/Output function ########################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_core_DebugFunctions ITM Functions - \brief Functions that access the ITM debug interface. - @{ - */ - -extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ -#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ - - -/** - \brief ITM Send Character - \details Transmits a character via the ITM channel 0, and - \li Just returns when no debugger is connected that has booked the output. - \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. - \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 */ - ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ - { - while (ITM->PORT[0U].u32 == 0UL) - { - __NOP(); - } - ITM->PORT[0U].u8 = (uint8_t)ch; - } - return (ch); -} - - -/** - \brief ITM Receive Character - \details Inputs a character via the external variable \ref ITM_RxBuffer. - \return Received character. - \return -1 No character pending. - */ -__STATIC_INLINE int32_t ITM_ReceiveChar (void) -{ - int32_t ch = -1; /* no character available */ - - if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) - { - ch = ITM_RxBuffer; - ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ - } - - return (ch); -} - - -/** - \brief ITM Check Character - \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. - \return 0 No character available. - \return 1 Character available. - */ -__STATIC_INLINE int32_t ITM_CheckChar (void) -{ - - if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) - { - return (0); /* no character available */ - } - else - { - return (1); /* character available */ - } -} - -/*@} end of CMSIS_core_DebugFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM33_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm33.h + * @brief CMSIS Cortex-M33 Core Peripheral Access Layer Header File + * @version V5.0.9 + * @date 06. July 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM33_H_GENERIC +#define __CORE_CM33_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M33 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM33 definitions */ +#define __CM33_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM33_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM33_CMSIS_VERSION ((__CM33_CMSIS_VERSION_MAIN << 16U) | \ + __CM33_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (33U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined (__TARGET_FPU_VFP) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined (__ARM_PCS_VFP) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined (__ARMVFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined (__TI_VFP_SUPPORT__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined (__FPU_VFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM33_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM33_H_DEPENDANT +#define __CORE_CM33_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM33_REV + #define __CM33_REV 0x0000U + #warning "__CM33_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DSP_PRESENT + #define __DSP_PRESENT 0U + #warning "__DSP_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M33 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ +#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ + uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ + uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ +#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ + +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED6[580U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ + uint32_t RESERVED3[92U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ + uint32_t RESERVED7[6U]; + __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ + __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ + __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ + __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ + __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ + uint32_t RESERVED8[1U]; + __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ +#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ +#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ + +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ +#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ +#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Non-Secure Access Control Register Definitions */ +#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ +#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ + +#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ +#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ + +#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ +#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/* Instruction Tightly-Coupled Memory Control Register Definitions */ +#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ +#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ + +#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ +#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ + +#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ +#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ + +#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ +#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ + +/* Data Tightly-Coupled Memory Control Register Definitions */ +#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ +#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ + +#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ +#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ + +#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ +#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ + +#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ +#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ + +/* AHBP Control Register Definitions */ +#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ +#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ + +#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ +#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ + +/* L1 Cache Control Register Definitions */ +#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ +#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ + +#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ +#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ + +#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ +#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ + +/* AHBS Control Register Definitions */ +#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ +#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ + +#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ +#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ + +#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ +#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ + +/* Auxiliary Bus Fault Status Register Definitions */ +#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ +#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ + +#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ +#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ + +#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ +#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ + +#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ +#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ + +#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ +#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ + +#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ +#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ + __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[29U]; + __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ + __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ + __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ + uint32_t RESERVED6[4U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Stimulus Port Register Definitions */ +#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ +#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ + +#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ +#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ +#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ + +#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ +#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Integration Write Register Definitions */ +#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ +#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ + +/* ITM Integration Read Register Definitions */ +#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ +#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ + +/* ITM Integration Mode Control Register Definitions */ +#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ +#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ + uint32_t RESERVED32[934U]; + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ + uint32_t RESERVED33[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ +#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t ITFTTD0; /*!< Offset: 0xEEC (R/ ) Integration Test FIFO Test Data 0 Register */ + __IOM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/W) Integration Test ATB Control Register 2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) Integration Test ATB Control Register 0 */ + __IM uint32_t ITFTTD1; /*!< Offset: 0xEFC (R/ ) Integration Test FIFO Test Data 1 Register */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) Device Configuration Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Identifier Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration Test FIFO Test Data 0 Register Definitions */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD0: ATB Interface 2 ATVALIDPosition */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD0: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD0: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U /*!< TPI ITFTTD0: ATB Interface 1 data2 Position */ +#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data2 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U /*!< TPI ITFTTD0: ATB Interface 1 data1 Position */ +#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data1 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U /*!< TPI ITFTTD0: ATB Interface 1 data0 Position */ +#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/) /*!< TPI ITFTTD0: ATB Interface 1 data0 Mask */ + +/* TPI Integration Test ATB Control Register 2 Register Definitions */ +#define TPI_ITATBCTR2_AFVALID2S_Pos 1U /*!< TPI ITATBCTR2: AFVALID2S Position */ +#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos) /*!< TPI ITATBCTR2: AFVALID2SS Mask */ + +#define TPI_ITATBCTR2_AFVALID1S_Pos 1U /*!< TPI ITATBCTR2: AFVALID1S Position */ +#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos) /*!< TPI ITATBCTR2: AFVALID1SS Mask */ + +#define TPI_ITATBCTR2_ATREADY2S_Pos 0U /*!< TPI ITATBCTR2: ATREADY2S Position */ +#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/) /*!< TPI ITATBCTR2: ATREADY2S Mask */ + +#define TPI_ITATBCTR2_ATREADY1S_Pos 0U /*!< TPI ITATBCTR2: ATREADY1S Position */ +#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/) /*!< TPI ITATBCTR2: ATREADY1S Mask */ + +/* TPI Integration Test FIFO Test Data 1 Register Definitions */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD1: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD1: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U /*!< TPI ITFTTD1: ATB Interface 2 data2 Position */ +#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data2 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U /*!< TPI ITFTTD1: ATB Interface 2 data1 Position */ +#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data1 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U /*!< TPI ITFTTD1: ATB Interface 2 data0 Position */ +#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/) /*!< TPI ITFTTD1: ATB Interface 2 data0 Mask */ + +/* TPI Integration Test ATB Control Register 0 Definitions */ +#define TPI_ITATBCTR0_AFVALID2S_Pos 1U /*!< TPI ITATBCTR0: AFVALID2S Position */ +#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos) /*!< TPI ITATBCTR0: AFVALID2SS Mask */ + +#define TPI_ITATBCTR0_AFVALID1S_Pos 1U /*!< TPI ITATBCTR0: AFVALID1S Position */ +#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos) /*!< TPI ITATBCTR0: AFVALID1SS Mask */ + +#define TPI_ITATBCTR0_ATREADY2S_Pos 0U /*!< TPI ITATBCTR0: ATREADY2S Position */ +#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/) /*!< TPI ITATBCTR0: ATREADY2S Mask */ + +#define TPI_ITATBCTR0_ATREADY1S_Pos 0U /*!< TPI ITATBCTR0: ATREADY1S Position */ +#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/) /*!< TPI ITATBCTR0: ATREADY1S Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFOSZ Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFOSZ Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ + __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ + __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ + __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ + uint32_t RESERVED0[1]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#else + uint32_t RESERVED0[3]; +#endif + __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ + __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/* Secure Fault Status Register Definitions */ +#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ +#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ + +#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ +#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ + +#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ +#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ + +#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ +#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ + +#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ +#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ + +#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ +#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ + +#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ +#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ + +#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ +#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ +#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ + +#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ +#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ + +#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ +#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ + +#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ +#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ + +#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ +#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ + +#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ +#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ +#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ +#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + + #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ + #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + + #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ + #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000002UL) /* bit [1] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << 8U) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Set Priority Grouping (non-secure) + \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB_NS->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB_NS->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping (non-secure) + \details Reads the priority grouping field from the non-secure NVIC when in secure state. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) +{ + return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \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 */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM33_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm4.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm4.h index 7d56873..308b868 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm4.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm4.h @@ -1,2129 +1,2129 @@ -/**************************************************************************//** - * @file core_cm4.h - * @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File - * @version V5.0.8 - * @date 04. June 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM4_H_GENERIC -#define __CORE_CM4_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_M4 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS CM4 definitions */ -#define __CM4_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM4_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM4_CMSIS_VERSION ((__CM4_CMSIS_VERSION_MAIN << 16U) | \ - __CM4_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (4U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. -*/ -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM4_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM4_H_DEPENDANT -#define __CORE_CM4_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM4_REV - #define __CM4_REV 0x0000U - #warning "__CM4_REV not defined in device header file; using default!" - #endif - - #ifndef __FPU_PRESENT - #define __FPU_PRESENT 0U - #warning "__FPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 3U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex_M4 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - - Core FPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - -#define APSR_Q_Pos 27U /*!< APSR: Q Position */ -#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ - -#define APSR_GE_Pos 16U /*!< APSR: GE Position */ -#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:1; /*!< bit: 9 Reserved */ - uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit */ - uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ -#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ - -#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ -#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ -#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ - -#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ -#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t FPCA:1; /*!< bit: 2 FP extension active flag */ - uint32_t _reserved0:29; /*!< bit: 3..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ -#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ - -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[24U]; - __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[24U]; - __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[24U]; - __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[24U]; - __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[56U]; - __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ - uint32_t RESERVED5[644U]; - __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ -} NVIC_Type; - -/* Software Triggered Interrupt Register Definitions */ -#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ -#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ - __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ - __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ - __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ - __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ - __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ - __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ - __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ - __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ - __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ - __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ - __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ - uint32_t RESERVED0[5U]; - __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Vector Table Offset Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ -#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ -#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ -#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ -#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ - -#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ -#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ - -#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ -#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ -#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ - -#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ -#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ - -#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ -#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ -#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ -#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ - -#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ -#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ - -#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ -#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ - -/* SCB Configurable Fault Status Register Definitions */ -#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ -#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ - -#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ -#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ - -#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ -#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ - -/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ -#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ - -#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ -#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ - -#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ -#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ - -#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ -#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ - -#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ -#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ - -#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ -#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ - -/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ -#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ - -#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ -#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ - -#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ -#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ - -#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ -#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ - -#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ -#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ - -#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ -#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ - -#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ -#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ - -/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ -#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ - -#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ -#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ - -#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ -#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ - -#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ -#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ - -#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ -#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ - -#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ -#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ - -/* SCB Hard Fault Status Register Definitions */ -#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ -#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ - -#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ -#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ - -#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ -#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ - -/* SCB Debug Fault Status Register Definitions */ -#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ -#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ - -#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ -#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ - -#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ -#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ - -#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ -#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ - -#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ -#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ - __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ -} SCnSCB_Type; - -/* Interrupt Controller Type Register Definitions */ -#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ -#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ - -/* Auxiliary Control Register Definitions */ -#define SCnSCB_ACTLR_DISOOFP_Pos 9U /*!< ACTLR: DISOOFP Position */ -#define SCnSCB_ACTLR_DISOOFP_Msk (1UL << SCnSCB_ACTLR_DISOOFP_Pos) /*!< ACTLR: DISOOFP Mask */ - -#define SCnSCB_ACTLR_DISFPCA_Pos 8U /*!< ACTLR: DISFPCA Position */ -#define SCnSCB_ACTLR_DISFPCA_Msk (1UL << SCnSCB_ACTLR_DISFPCA_Pos) /*!< ACTLR: DISFPCA Mask */ - -#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ -#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ - -#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */ -#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */ - -#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ -#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) - \brief Type definitions for the Instrumentation Trace Macrocell (ITM) - @{ - */ - -/** - \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). - */ -typedef struct -{ - __OM union - { - __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ - __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ - __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ - } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ - uint32_t RESERVED0[864U]; - __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ - uint32_t RESERVED1[15U]; - __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ - uint32_t RESERVED2[15U]; - __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ - uint32_t RESERVED3[29U]; - __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ - __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ - __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ - uint32_t RESERVED4[43U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ - uint32_t RESERVED5[6U]; - __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ - __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ - __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ - __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ - __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ - __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ - __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ - __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ - __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ - __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ - __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ - __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ -} ITM_Type; - -/* ITM Trace Privilege Register Definitions */ -#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ -#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ - -/* ITM Trace Control Register Definitions */ -#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ -#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ - -#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ -#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ - -#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ -#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ - -#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ -#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ - -#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ -#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ - -#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ -#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ - -#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ -#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ - -#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ -#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ - -#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ -#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ - -/* ITM Integration Write Register Definitions */ -#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ -#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ - -/* ITM Integration Read Register Definitions */ -#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ -#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ - -/* ITM Integration Mode Control Register Definitions */ -#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ -#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ - -/* ITM Lock Status Register Definitions */ -#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ -#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ - -#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ -#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ - -#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ -#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ - -/*@}*/ /* end of group CMSIS_ITM */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ - __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ - __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ - __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ - __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ - __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED0[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ -#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ - -#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ -#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ - -#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ -#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ - -#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ -#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ - -#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ -#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ - -#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ -#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ - -#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ -#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ - -#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ -#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ - -#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ -#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ - -#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ -#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ - -#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ -#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ - -#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ -#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ - -#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ -#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ - -/* DWT CPI Count Register Definitions */ -#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ -#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ - -/* DWT Exception Overhead Count Register Definitions */ -#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ -#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ - -/* DWT Sleep Count Register Definitions */ -#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ -#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ - -/* DWT LSU Count Register Definitions */ -#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ -#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ - -/* DWT Folded-instruction Count Register Definitions */ -#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ -#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ - -/* DWT Comparator Mask Register Definitions */ -#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ -#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ -#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ - -#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ -#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ -#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ - -#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ -#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ - -#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ -#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ - -#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ -#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ - -#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ -#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ - uint32_t RESERVED3[759U]; - __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ - __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ - __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ - uint32_t RESERVED4[1U]; - __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ - __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ - __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ - uint32_t RESERVED5[39U]; - __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ - __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ - uint32_t RESERVED7[8U]; - __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ -#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI TRIGGER Register Definitions */ -#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ -#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ - -/* TPI Integration ETM Data Register Definitions (FIFO0) */ -#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ -#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ - -#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ -#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ - -#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ -#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ - -#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ -#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ - -#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ -#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ - -#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ -#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ - -#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ -#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ - -/* TPI ITATBCTR2 Register Definitions */ -#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ -#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ - -#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ -#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ - -/* TPI Integration ITM Data Register Definitions (FIFO1) */ -#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ -#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ - -#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ -#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ - -#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ -#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ - -#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ -#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ - -#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ -#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ - -#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ -#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ - -#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ -#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ - -/* TPI ITATBCTR0 Register Definitions */ -#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ -#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ - -#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ -#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ - -/* TPI Integration Mode Control Register Definitions */ -#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ -#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ -#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ - -#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ -#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ - -#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ -#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ - __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ - __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ - __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ - __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ -} MPU_Type; - -#define MPU_TYPE_RALIASES 4U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ -#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ - -#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ -#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ - -#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ -#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ - -/* MPU Region Attribute and Size Register Definitions */ -#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ -#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ - -#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ -#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ - -#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ -#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ - -#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ -#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ - -#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ -#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ - -#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ -#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ - -#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ -#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ - -#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ -#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ - -#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ -#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ - -#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ -#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ - -/*@} end of group CMSIS_MPU */ -#endif /* defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_FPU Floating Point Unit (FPU) - \brief Type definitions for the Floating Point Unit (FPU) - @{ - */ - -/** - \brief Structure type to access the Floating Point Unit (FPU). - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ - __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ - __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ - __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ - __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ -} FPU_Type; - -/* Floating-Point Context Control Register Definitions */ -#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ -#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ - -#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ -#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ - -#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ -#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ - -#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ -#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ - -#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ -#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ - -#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ -#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ - -#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ -#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ - -#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ -#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ - -#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ -#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ - -/* Floating-Point Context Address Register Definitions */ -#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ -#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ - -/* Floating-Point Default Status Control Register Definitions */ -#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ -#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ - -#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ -#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ - -#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ -#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ - -#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ -#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ - -/* Media and FP Feature Register 0 Definitions */ -#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ -#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ - -#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ -#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ - -#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ -#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ - -#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ -#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ - -#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ -#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ - -#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ -#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ - -#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ -#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ - -#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ -#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ - -/* Media and FP Feature Register 1 Definitions */ -#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ -#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ - -#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ -#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ - -#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ -#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ - -#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ -#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ - -/*@} end of group CMSIS_FPU */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ -#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register Definitions */ -#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ -#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ - -#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ -#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ - -#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ -#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ - -#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ -#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ - -#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ -#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ -#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ - -#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ -#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ - -#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ -#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ - -#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ -#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ - -#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ -#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ - -#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ -#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ -#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ -#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ -#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ -#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ -#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ -#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ -#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ -#endif - -#define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ -#define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Debug Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ -#define EXC_RETURN_HANDLER_FPU (0xFFFFFFE1UL) /* return to Handler mode, uses MSP after return, restore floating-point state */ -#define EXC_RETURN_THREAD_MSP_FPU (0xFFFFFFE9UL) /* return to Thread mode, uses MSP after return, restore floating-point state */ -#define EXC_RETURN_THREAD_PSP_FPU (0xFFFFFFEDUL) /* return to Thread mode, uses PSP after return, restore floating-point state */ - - -/** - \brief Set Priority Grouping - \details Sets the priority grouping field using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ - SCB->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping - \details Reads the priority grouping field from the NVIC Interrupt Controller. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) -{ - return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | - SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv7.h" - -#endif - - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - uint32_t mvfr0; - - mvfr0 = FPU->MVFR0; - if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) - { - return 1U; /* Single precision FPU */ - } - else - { - return 0U; /* No FPU */ - } -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - -/* ##################################### Debug In/Output function ########################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_core_DebugFunctions ITM Functions - \brief Functions that access the ITM debug interface. - @{ - */ - -extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ -#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ - - -/** - \brief ITM Send Character - \details Transmits a character via the ITM channel 0, and - \li Just returns when no debugger is connected that has booked the output. - \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. - \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 */ - ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ - { - while (ITM->PORT[0U].u32 == 0UL) - { - __NOP(); - } - ITM->PORT[0U].u8 = (uint8_t)ch; - } - return (ch); -} - - -/** - \brief ITM Receive Character - \details Inputs a character via the external variable \ref ITM_RxBuffer. - \return Received character. - \return -1 No character pending. - */ -__STATIC_INLINE int32_t ITM_ReceiveChar (void) -{ - int32_t ch = -1; /* no character available */ - - if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) - { - ch = ITM_RxBuffer; - ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ - } - - return (ch); -} - - -/** - \brief ITM Check Character - \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. - \return 0 No character available. - \return 1 Character available. - */ -__STATIC_INLINE int32_t ITM_CheckChar (void) -{ - - if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) - { - return (0); /* no character available */ - } - else - { - return (1); /* character available */ - } -} - -/*@} end of CMSIS_core_DebugFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM4_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm4.h + * @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File + * @version V5.0.8 + * @date 04. June 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM4_H_GENERIC +#define __CORE_CM4_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M4 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM4 definitions */ +#define __CM4_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM4_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM4_CMSIS_VERSION ((__CM4_CMSIS_VERSION_MAIN << 16U) | \ + __CM4_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (4U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM4_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM4_H_DEPENDANT +#define __CORE_CM4_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM4_REV + #define __CM4_REV 0x0000U + #warning "__CM4_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M4 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t FPCA:1; /*!< bit: 2 FP extension active flag */ + uint32_t _reserved0:29; /*!< bit: 3..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[5U]; + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_DISOOFP_Pos 9U /*!< ACTLR: DISOOFP Position */ +#define SCnSCB_ACTLR_DISOOFP_Msk (1UL << SCnSCB_ACTLR_DISOOFP_Pos) /*!< ACTLR: DISOOFP Mask */ + +#define SCnSCB_ACTLR_DISFPCA_Pos 8U /*!< ACTLR: DISFPCA Position */ +#define SCnSCB_ACTLR_DISFPCA_Msk (1UL << SCnSCB_ACTLR_DISFPCA_Pos) /*!< ACTLR: DISFPCA Mask */ + +#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ +#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ + +#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */ +#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */ + +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[29U]; + __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ + __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ + __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Integration Write Register Definitions */ +#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ +#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ + +/* ITM Integration Read Register Definitions */ +#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ +#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ + +/* ITM Integration Mode Control Register Definitions */ +#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ +#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif /* defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +#define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ +#define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ +#define EXC_RETURN_HANDLER_FPU (0xFFFFFFE1UL) /* return to Handler mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_MSP_FPU (0xFFFFFFE9UL) /* return to Thread mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_PSP_FPU (0xFFFFFFEDUL) /* return to Thread mode, uses PSP after return, restore floating-point state */ + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \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 */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM4_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm7.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm7.h index a14dc62..ada6c2a 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm7.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_cm7.h @@ -1,2671 +1,2671 @@ -/**************************************************************************//** - * @file core_cm7.h - * @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File - * @version V5.0.8 - * @date 04. June 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_CM7_H_GENERIC -#define __CORE_CM7_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup Cortex_M7 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS CM7 definitions */ -#define __CM7_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __CM7_CMSIS_VERSION_SUB ( __CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __CM7_CMSIS_VERSION ((__CM7_CMSIS_VERSION_MAIN << 16U) | \ - __CM7_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_M (7U) /*!< Cortex-M Core */ - -/** __FPU_USED indicates whether an FPU is used or not. - For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. -*/ -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) - #define __FPU_USED 1U - #else - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #define __FPU_USED 0U - #endif - #else - #define __FPU_USED 0U - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM7_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_CM7_H_DEPENDANT -#define __CORE_CM7_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __CM7_REV - #define __CM7_REV 0x0000U - #warning "__CM7_REV not defined in device header file; using default!" - #endif - - #ifndef __FPU_PRESENT - #define __FPU_PRESENT 0U - #warning "__FPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __ICACHE_PRESENT - #define __ICACHE_PRESENT 0U - #warning "__ICACHE_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __DCACHE_PRESENT - #define __DCACHE_PRESENT 0U - #warning "__DCACHE_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __DTCM_PRESENT - #define __DTCM_PRESENT 0U - #warning "__DTCM_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 3U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group Cortex_M7 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - - Core FPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - -#define APSR_Q_Pos 27U /*!< APSR: Q Position */ -#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ - -#define APSR_GE_Pos 16U /*!< APSR: GE Position */ -#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:1; /*!< bit: 9 Reserved */ - uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ - uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ - uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit */ - uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ -#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ - -#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ -#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ -#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ - -#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ -#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t FPCA:1; /*!< bit: 2 FP extension active flag */ - uint32_t _reserved0:29; /*!< bit: 3..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ -#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ - -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[24U]; - __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[24U]; - __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[24U]; - __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[24U]; - __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[56U]; - __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ - uint32_t RESERVED5[644U]; - __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ -} NVIC_Type; - -/* Software Triggered Interrupt Register Definitions */ -#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ -#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ - __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ - __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ - __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ - __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ - __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ - __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ - __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ - __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ - __IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ - __IM uint32_t ID_MFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ - __IM uint32_t ID_ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ - uint32_t RESERVED0[1U]; - __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ - __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ - __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ - __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ - __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ - uint32_t RESERVED3[93U]; - __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ - uint32_t RESERVED4[15U]; - __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ - __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ - __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ - uint32_t RESERVED5[1U]; - __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ - uint32_t RESERVED6[1U]; - __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ - __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ - __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ - __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ - __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ - __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ - __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ - __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ - uint32_t RESERVED7[6U]; - __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ - __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ - __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ - __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ - __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ - uint32_t RESERVED8[1U]; - __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Vector Table Offset Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ -#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ -#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: Branch prediction enable bit Position */ -#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: Branch prediction enable bit Mask */ - -#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: Instruction cache enable bit Position */ -#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: Instruction cache enable bit Mask */ - -#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: Cache enable bit Position */ -#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: Cache enable bit Mask */ - -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ -#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ -#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ - -#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ -#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ - -#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ -#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ -#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ - -#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ -#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ - -#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ -#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ -#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ -#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ - -#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ -#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ - -#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ -#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ - -/* SCB Configurable Fault Status Register Definitions */ -#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ -#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ - -#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ -#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ - -#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ -#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ - -/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ -#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ - -#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ -#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ - -#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ -#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ - -#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ -#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ - -#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ -#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ - -#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ -#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ - -/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ -#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ - -#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ -#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ - -#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ -#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ - -#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ -#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ - -#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ -#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ - -#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ -#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ - -#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ -#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ - -/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ -#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ - -#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ -#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ - -#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ -#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ - -#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ -#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ - -#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ -#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ - -#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ -#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ - -/* SCB Hard Fault Status Register Definitions */ -#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ -#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ - -#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ -#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ - -#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ -#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ - -/* SCB Debug Fault Status Register Definitions */ -#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ -#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ - -#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ -#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ - -#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ -#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ - -#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ -#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ - -#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ -#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ - -/* SCB Cache Level ID Register Definitions */ -#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ -#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ - -#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ -#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ - -/* SCB Cache Type Register Definitions */ -#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ -#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ - -#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ -#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ - -#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ -#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ - -#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ -#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ - -#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ -#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ - -/* SCB Cache Size ID Register Definitions */ -#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ -#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ - -#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ -#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ - -#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ -#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ - -#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ -#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ - -#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ -#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ - -#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ -#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ - -#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ -#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ - -/* SCB Cache Size Selection Register Definitions */ -#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ -#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ - -#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ -#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ - -/* SCB Software Triggered Interrupt Register Definitions */ -#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ -#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ - -/* SCB D-Cache Invalidate by Set-way Register Definitions */ -#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ -#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ - -#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ -#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ - -/* SCB D-Cache Clean by Set-way Register Definitions */ -#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ -#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ - -#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ -#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ - -/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ -#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ -#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ - -#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ -#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ - -/* Instruction Tightly-Coupled Memory Control Register Definitions */ -#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ -#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ - -#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ -#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ - -#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ -#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ - -#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ -#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ - -/* Data Tightly-Coupled Memory Control Register Definitions */ -#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ -#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ - -#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ -#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ - -#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ -#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ - -#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ -#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ - -/* AHBP Control Register Definitions */ -#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ -#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ - -#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ -#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ - -/* L1 Cache Control Register Definitions */ -#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ -#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ - -#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ -#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ - -#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ -#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ - -/* AHBS Control Register Definitions */ -#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ -#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ - -#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ -#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ - -#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ -#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ - -/* Auxiliary Bus Fault Status Register Definitions */ -#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ -#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ - -#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ -#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ - -#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ -#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ - -#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ -#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ - -#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ -#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ - -#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ -#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ - __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ -} SCnSCB_Type; - -/* Interrupt Controller Type Register Definitions */ -#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ -#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ - -/* Auxiliary Control Register Definitions */ -#define SCnSCB_ACTLR_DISITMATBFLUSH_Pos 12U /*!< ACTLR: DISITMATBFLUSH Position */ -#define SCnSCB_ACTLR_DISITMATBFLUSH_Msk (1UL << SCnSCB_ACTLR_DISITMATBFLUSH_Pos) /*!< ACTLR: DISITMATBFLUSH Mask */ - -#define SCnSCB_ACTLR_DISRAMODE_Pos 11U /*!< ACTLR: DISRAMODE Position */ -#define SCnSCB_ACTLR_DISRAMODE_Msk (1UL << SCnSCB_ACTLR_DISRAMODE_Pos) /*!< ACTLR: DISRAMODE Mask */ - -#define SCnSCB_ACTLR_FPEXCODIS_Pos 10U /*!< ACTLR: FPEXCODIS Position */ -#define SCnSCB_ACTLR_FPEXCODIS_Msk (1UL << SCnSCB_ACTLR_FPEXCODIS_Pos) /*!< ACTLR: FPEXCODIS Mask */ - -#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ -#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ - -#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ -#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) - \brief Type definitions for the Instrumentation Trace Macrocell (ITM) - @{ - */ - -/** - \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). - */ -typedef struct -{ - __OM union - { - __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ - __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ - __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ - } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ - uint32_t RESERVED0[864U]; - __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ - uint32_t RESERVED1[15U]; - __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ - uint32_t RESERVED2[15U]; - __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ - uint32_t RESERVED3[29U]; - __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ - __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ - __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ - uint32_t RESERVED4[43U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ - uint32_t RESERVED5[6U]; - __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ - __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ - __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ - __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ - __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ - __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ - __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ - __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ - __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ - __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ - __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ - __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ -} ITM_Type; - -/* ITM Trace Privilege Register Definitions */ -#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ -#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ - -/* ITM Trace Control Register Definitions */ -#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ -#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ - -#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ -#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ - -#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ -#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ - -#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ -#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ - -#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ -#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ - -#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ -#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ - -#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ -#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ - -#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ -#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ - -#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ -#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ - -/* ITM Integration Write Register Definitions */ -#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ -#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ - -/* ITM Integration Read Register Definitions */ -#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ -#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ - -/* ITM Integration Mode Control Register Definitions */ -#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ -#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ - -/* ITM Lock Status Register Definitions */ -#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ -#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ - -#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ -#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ - -#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ -#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ - -/*@}*/ /* end of group CMSIS_ITM */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ - __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ - __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ - __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ - __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ - __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED0[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ - uint32_t RESERVED3[981U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( W) Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ -#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ - -#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ -#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ - -#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ -#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ - -#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ -#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ - -#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ -#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ - -#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ -#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ - -#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ -#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ - -#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ -#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ - -#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ -#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ - -#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ -#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ - -#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ -#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ - -#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ -#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ - -#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ -#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ - -/* DWT CPI Count Register Definitions */ -#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ -#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ - -/* DWT Exception Overhead Count Register Definitions */ -#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ -#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ - -/* DWT Sleep Count Register Definitions */ -#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ -#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ - -/* DWT LSU Count Register Definitions */ -#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ -#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ - -/* DWT Folded-instruction Count Register Definitions */ -#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ -#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ - -/* DWT Comparator Mask Register Definitions */ -#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ -#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ -#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ - -#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ -#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ -#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ - -#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ -#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ - -#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ -#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ - -#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ -#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ - -#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ -#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ - uint32_t RESERVED3[759U]; - __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ - __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ - __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ - uint32_t RESERVED4[1U]; - __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ - __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ - __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ - uint32_t RESERVED5[39U]; - __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ - __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ - uint32_t RESERVED7[8U]; - __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ -#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI TRIGGER Register Definitions */ -#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ -#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ - -/* TPI Integration ETM Data Register Definitions (FIFO0) */ -#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ -#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ - -#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ -#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ - -#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ -#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ - -#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ -#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ - -#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ -#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ - -#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ -#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ - -#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ -#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ - -/* TPI ITATBCTR2 Register Definitions */ -#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ -#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ - -#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ -#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ - -/* TPI Integration ITM Data Register Definitions (FIFO1) */ -#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ -#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ - -#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ -#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ - -#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ -#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ - -#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ -#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ - -#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ -#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ - -#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ -#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ - -#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ -#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ - -/* TPI ITATBCTR0 Register Definitions */ -#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ -#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ - -#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ -#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ - -/* TPI Integration Mode Control Register Definitions */ -#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ -#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ -#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ - -#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ -#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ - -#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ -#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ - __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ - __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ - __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ - __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ -} MPU_Type; - -#define MPU_TYPE_RALIASES 4U - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ -#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ - -#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ -#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ - -#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ -#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ - -/* MPU Region Attribute and Size Register Definitions */ -#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ -#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ - -#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ -#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ - -#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ -#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ - -#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ -#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ - -#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ -#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ - -#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ -#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ - -#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ -#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ - -#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ -#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ - -#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ -#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ - -#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ -#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ - -/*@} end of group CMSIS_MPU */ -#endif /* defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_FPU Floating Point Unit (FPU) - \brief Type definitions for the Floating Point Unit (FPU) - @{ - */ - -/** - \brief Structure type to access the Floating Point Unit (FPU). - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ - __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ - __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ - __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ - __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ - __IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and FP Feature Register 2 */ -} FPU_Type; - -/* Floating-Point Context Control Register Definitions */ -#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ -#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ - -#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ -#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ - -#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ -#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ - -#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ -#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ - -#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ -#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ - -#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ -#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ - -#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ -#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ - -#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ -#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ - -#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ -#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ - -/* Floating-Point Context Address Register Definitions */ -#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ -#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ - -/* Floating-Point Default Status Control Register Definitions */ -#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ -#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ - -#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ -#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ - -#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ -#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ - -#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ -#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ - -/* Media and FP Feature Register 0 Definitions */ -#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ -#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ - -#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ -#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ - -#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ -#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ - -#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ -#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ - -#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ -#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ - -#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ -#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ - -#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ -#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ - -#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ -#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ - -/* Media and FP Feature Register 1 Definitions */ -#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ -#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ - -#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ -#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ - -#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ -#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ - -#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ -#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ - -/* Media and FP Feature Register 2 Definitions */ - -/*@} end of group CMSIS_FPU */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ -#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register Definitions */ -#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ -#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ - -#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ -#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ - -#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ -#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ - -#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ -#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ - -#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ -#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ -#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ - -#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ -#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ - -#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ -#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ - -#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ -#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ - -#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ -#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ - -#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ -#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ -#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ -#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ -#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ -#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ -#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ -#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ -#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ -#endif - -#define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ -#define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Debug Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ -#define EXC_RETURN_HANDLER_FPU (0xFFFFFFE1UL) /* return to Handler mode, uses MSP after return, restore floating-point state */ -#define EXC_RETURN_THREAD_MSP_FPU (0xFFFFFFE9UL) /* return to Thread mode, uses MSP after return, restore floating-point state */ -#define EXC_RETURN_THREAD_PSP_FPU (0xFFFFFFEDUL) /* return to Thread mode, uses PSP after return, restore floating-point state */ - - -/** - \brief Set Priority Grouping - \details Sets the priority grouping field using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ - SCB->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping - \details Reads the priority grouping field from the NVIC Interrupt Controller. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) -{ - return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | - SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - -/* ########################## MPU functions #################################### */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - -#include "mpu_armv7.h" - -#endif - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - uint32_t mvfr0; - - mvfr0 = SCB->MVFR0; - if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) - { - return 2U; /* Double + Single precision FPU */ - } - else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) - { - return 1U; /* Single precision FPU */ - } - else - { - return 0U; /* No FPU */ - } -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ########################## Cache functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_CacheFunctions Cache Functions - \brief Functions that configure Instruction and Data cache. - @{ - */ - -/* Cache Size ID Register Macros */ -#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos) -#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos ) - - -/** - \brief Enable I-Cache - \details Turns on I-Cache - */ -__STATIC_INLINE void SCB_EnableICache (void) -{ - #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) - __DSB(); - __ISB(); - SCB->ICIALLU = 0UL; /* invalidate I-Cache */ - __DSB(); - __ISB(); - SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ - __DSB(); - __ISB(); - #endif -} - - -/** - \brief Disable I-Cache - \details Turns off I-Cache - */ -__STATIC_INLINE void SCB_DisableICache (void) -{ - #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) - __DSB(); - __ISB(); - SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */ - SCB->ICIALLU = 0UL; /* invalidate I-Cache */ - __DSB(); - __ISB(); - #endif -} - - -/** - \brief Invalidate I-Cache - \details Invalidates I-Cache - */ -__STATIC_INLINE void SCB_InvalidateICache (void) -{ - #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) - __DSB(); - __ISB(); - SCB->ICIALLU = 0UL; - __DSB(); - __ISB(); - #endif -} - - -/** - \brief Enable D-Cache - \details Turns on D-Cache - */ -__STATIC_INLINE void SCB_EnableDCache (void) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - uint32_t ccsidr; - uint32_t sets; - uint32_t ways; - - SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ - __DSB(); - - ccsidr = SCB->CCSIDR; - - /* invalidate D-Cache */ - sets = (uint32_t)(CCSIDR_SETS(ccsidr)); - do { - ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); - do { - SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | - ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); - #if defined ( __CC_ARM ) - __schedule_barrier(); - #endif - } while (ways-- != 0U); - } while(sets-- != 0U); - __DSB(); - - SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ - - __DSB(); - __ISB(); - #endif -} - - -/** - \brief Disable D-Cache - \details Turns off D-Cache - */ -__STATIC_INLINE void SCB_DisableDCache (void) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - uint32_t ccsidr; - uint32_t sets; - uint32_t ways; - - SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ - __DSB(); - - SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */ - __DSB(); - - ccsidr = SCB->CCSIDR; - - /* clean & invalidate D-Cache */ - sets = (uint32_t)(CCSIDR_SETS(ccsidr)); - do { - ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); - do { - SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | - ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); - #if defined ( __CC_ARM ) - __schedule_barrier(); - #endif - } while (ways-- != 0U); - } while(sets-- != 0U); - - __DSB(); - __ISB(); - #endif -} - - -/** - \brief Invalidate D-Cache - \details Invalidates D-Cache - */ -__STATIC_INLINE void SCB_InvalidateDCache (void) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - uint32_t ccsidr; - uint32_t sets; - uint32_t ways; - - SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ - __DSB(); - - ccsidr = SCB->CCSIDR; - - /* invalidate D-Cache */ - sets = (uint32_t)(CCSIDR_SETS(ccsidr)); - do { - ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); - do { - SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | - ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); - #if defined ( __CC_ARM ) - __schedule_barrier(); - #endif - } while (ways-- != 0U); - } while(sets-- != 0U); - - __DSB(); - __ISB(); - #endif -} - - -/** - \brief Clean D-Cache - \details Cleans D-Cache - */ -__STATIC_INLINE void SCB_CleanDCache (void) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - uint32_t ccsidr; - uint32_t sets; - uint32_t ways; - - SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ - __DSB(); - - ccsidr = SCB->CCSIDR; - - /* clean D-Cache */ - sets = (uint32_t)(CCSIDR_SETS(ccsidr)); - do { - ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); - do { - SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) | - ((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) ); - #if defined ( __CC_ARM ) - __schedule_barrier(); - #endif - } while (ways-- != 0U); - } while(sets-- != 0U); - - __DSB(); - __ISB(); - #endif -} - - -/** - \brief Clean & Invalidate D-Cache - \details Cleans and Invalidates D-Cache - */ -__STATIC_INLINE void SCB_CleanInvalidateDCache (void) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - uint32_t ccsidr; - uint32_t sets; - uint32_t ways; - - SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ - __DSB(); - - ccsidr = SCB->CCSIDR; - - /* clean & invalidate D-Cache */ - sets = (uint32_t)(CCSIDR_SETS(ccsidr)); - do { - ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); - do { - SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | - ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); - #if defined ( __CC_ARM ) - __schedule_barrier(); - #endif - } while (ways-- != 0U); - } while(sets-- != 0U); - - __DSB(); - __ISB(); - #endif -} - - -/** - \brief D-Cache Invalidate by address - \details Invalidates D-Cache for the given address - \param[in] addr address (aligned to 32-byte boundary) - \param[in] dsize size of memory block (in number of bytes) -*/ -__STATIC_INLINE void SCB_InvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - int32_t op_size = dsize; - uint32_t op_addr = (uint32_t)addr; - int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */ - - __DSB(); - - while (op_size > 0) { - SCB->DCIMVAC = op_addr; - op_addr += (uint32_t)linesize; - op_size -= linesize; - } - - __DSB(); - __ISB(); - #endif -} - - -/** - \brief D-Cache Clean by address - \details Cleans D-Cache for the given address - \param[in] addr address (aligned to 32-byte boundary) - \param[in] dsize size of memory block (in number of bytes) -*/ -__STATIC_INLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - int32_t op_size = dsize; - uint32_t op_addr = (uint32_t) addr; - int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */ - - __DSB(); - - while (op_size > 0) { - SCB->DCCMVAC = op_addr; - op_addr += (uint32_t)linesize; - op_size -= linesize; - } - - __DSB(); - __ISB(); - #endif -} - - -/** - \brief D-Cache Clean and Invalidate by address - \details Cleans and invalidates D_Cache for the given address - \param[in] addr address (aligned to 32-byte boundary) - \param[in] dsize size of memory block (in number of bytes) -*/ -__STATIC_INLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize) -{ - #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) - int32_t op_size = dsize; - uint32_t op_addr = (uint32_t) addr; - int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */ - - __DSB(); - - while (op_size > 0) { - SCB->DCCIMVAC = op_addr; - op_addr += (uint32_t)linesize; - op_size -= linesize; - } - - __DSB(); - __ISB(); - #endif -} - - -/*@} end of CMSIS_Core_CacheFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - -/* ##################################### Debug In/Output function ########################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_core_DebugFunctions ITM Functions - \brief Functions that access the ITM debug interface. - @{ - */ - -extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ -#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ - - -/** - \brief ITM Send Character - \details Transmits a character via the ITM channel 0, and - \li Just returns when no debugger is connected that has booked the output. - \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. - \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 */ - ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ - { - while (ITM->PORT[0U].u32 == 0UL) - { - __NOP(); - } - ITM->PORT[0U].u8 = (uint8_t)ch; - } - return (ch); -} - - -/** - \brief ITM Receive Character - \details Inputs a character via the external variable \ref ITM_RxBuffer. - \return Received character. - \return -1 No character pending. - */ -__STATIC_INLINE int32_t ITM_ReceiveChar (void) -{ - int32_t ch = -1; /* no character available */ - - if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) - { - ch = ITM_RxBuffer; - ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ - } - - return (ch); -} - - -/** - \brief ITM Check Character - \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. - \return 0 No character available. - \return 1 Character available. - */ -__STATIC_INLINE int32_t ITM_CheckChar (void) -{ - - if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) - { - return (0); /* no character available */ - } - else - { - return (1); /* character available */ - } -} - -/*@} end of CMSIS_core_DebugFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_CM7_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_cm7.h + * @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File + * @version V5.0.8 + * @date 04. June 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM7_H_GENERIC +#define __CORE_CM7_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M7 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM7 definitions */ +#define __CM7_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM7_CMSIS_VERSION_SUB ( __CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM7_CMSIS_VERSION ((__CM7_CMSIS_VERSION_MAIN << 16U) | \ + __CM7_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (7U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM7_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM7_H_DEPENDANT +#define __CORE_CM7_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM7_REV + #define __CM7_REV 0x0000U + #warning "__CM7_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __ICACHE_PRESENT + #define __ICACHE_PRESENT 0U + #warning "__ICACHE_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DCACHE_PRESENT + #define __DCACHE_PRESENT 0U + #warning "__DCACHE_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DTCM_PRESENT + #define __DTCM_PRESENT 0U + #warning "__DTCM_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M7 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t FPCA:1; /*!< bit: 2 FP extension active flag */ + uint32_t _reserved0:29; /*!< bit: 3..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[1U]; + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + uint32_t RESERVED3[93U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ + uint32_t RESERVED7[6U]; + __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ + __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ + __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ + __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ + __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ + uint32_t RESERVED8[1U]; + __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: Branch prediction enable bit Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: Branch prediction enable bit Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: Instruction cache enable bit Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: Instruction cache enable bit Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: Cache enable bit Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: Cache enable bit Mask */ + +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/* Instruction Tightly-Coupled Memory Control Register Definitions */ +#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ +#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ + +#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ +#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ + +#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ +#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ + +#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ +#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ + +/* Data Tightly-Coupled Memory Control Register Definitions */ +#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ +#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ + +#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ +#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ + +#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ +#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ + +#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ +#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ + +/* AHBP Control Register Definitions */ +#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ +#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ + +#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ +#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ + +/* L1 Cache Control Register Definitions */ +#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ +#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ + +#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ +#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ + +#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ +#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ + +/* AHBS Control Register Definitions */ +#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ +#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ + +#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ +#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ + +#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ +#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ + +/* Auxiliary Bus Fault Status Register Definitions */ +#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ +#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ + +#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ +#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ + +#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ +#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ + +#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ +#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ + +#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ +#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ + +#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ +#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_DISITMATBFLUSH_Pos 12U /*!< ACTLR: DISITMATBFLUSH Position */ +#define SCnSCB_ACTLR_DISITMATBFLUSH_Msk (1UL << SCnSCB_ACTLR_DISITMATBFLUSH_Pos) /*!< ACTLR: DISITMATBFLUSH Mask */ + +#define SCnSCB_ACTLR_DISRAMODE_Pos 11U /*!< ACTLR: DISRAMODE Position */ +#define SCnSCB_ACTLR_DISRAMODE_Msk (1UL << SCnSCB_ACTLR_DISRAMODE_Pos) /*!< ACTLR: DISRAMODE Mask */ + +#define SCnSCB_ACTLR_FPEXCODIS_Pos 10U /*!< ACTLR: FPEXCODIS Position */ +#define SCnSCB_ACTLR_FPEXCODIS_Msk (1UL << SCnSCB_ACTLR_FPEXCODIS_Pos) /*!< ACTLR: FPEXCODIS Mask */ + +#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ +#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ + +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[29U]; + __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ + __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ + __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Integration Write Register Definitions */ +#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ +#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ + +/* ITM Integration Read Register Definitions */ +#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ +#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ + +/* ITM Integration Mode Control Register Definitions */ +#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ +#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED3[981U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( W) Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif /* defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and FP Feature Register 2 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/* Media and FP Feature Register 2 Definitions */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +#define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ +#define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ +#define EXC_RETURN_HANDLER_FPU (0xFFFFFFE1UL) /* return to Handler mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_MSP_FPU (0xFFFFFFE9UL) /* return to Thread mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_PSP_FPU (0xFFFFFFEDUL) /* return to Thread mode, uses PSP after return, restore floating-point state */ + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = SCB->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## Cache functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_CacheFunctions Cache Functions + \brief Functions that configure Instruction and Data cache. + @{ + */ + +/* Cache Size ID Register Macros */ +#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos) +#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos ) + + +/** + \brief Enable I-Cache + \details Turns on I-Cache + */ +__STATIC_INLINE void SCB_EnableICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + __DSB(); + __ISB(); + SCB->ICIALLU = 0UL; /* invalidate I-Cache */ + __DSB(); + __ISB(); + SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Disable I-Cache + \details Turns off I-Cache + */ +__STATIC_INLINE void SCB_DisableICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + __DSB(); + __ISB(); + SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */ + SCB->ICIALLU = 0UL; /* invalidate I-Cache */ + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Invalidate I-Cache + \details Invalidates I-Cache + */ +__STATIC_INLINE void SCB_InvalidateICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + __DSB(); + __ISB(); + SCB->ICIALLU = 0UL; + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Enable D-Cache + \details Turns on D-Cache + */ +__STATIC_INLINE void SCB_EnableDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | + ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + __DSB(); + + SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Disable D-Cache + \details Turns off D-Cache + */ +__STATIC_INLINE void SCB_DisableDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ + __DSB(); + + SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean & invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | + ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Invalidate D-Cache + \details Invalidates D-Cache + */ +__STATIC_INLINE void SCB_InvalidateDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | + ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Clean D-Cache + \details Cleans D-Cache + */ +__STATIC_INLINE void SCB_CleanDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) | + ((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Clean & Invalidate D-Cache + \details Cleans and Invalidates D-Cache + */ +__STATIC_INLINE void SCB_CleanInvalidateDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /*(0U << 1U) | 0U;*/ /* Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean & invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | + ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief D-Cache Invalidate by address + \details Invalidates D-Cache for the given address + \param[in] addr address (aligned to 32-byte boundary) + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_INLINE void SCB_InvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + int32_t op_size = dsize; + uint32_t op_addr = (uint32_t)addr; + int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */ + + __DSB(); + + while (op_size > 0) { + SCB->DCIMVAC = op_addr; + op_addr += (uint32_t)linesize; + op_size -= linesize; + } + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief D-Cache Clean by address + \details Cleans D-Cache for the given address + \param[in] addr address (aligned to 32-byte boundary) + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_INLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + int32_t op_size = dsize; + uint32_t op_addr = (uint32_t) addr; + int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */ + + __DSB(); + + while (op_size > 0) { + SCB->DCCMVAC = op_addr; + op_addr += (uint32_t)linesize; + op_size -= linesize; + } + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief D-Cache Clean and Invalidate by address + \details Cleans and invalidates D_Cache for the given address + \param[in] addr address (aligned to 32-byte boundary) + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_INLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + int32_t op_size = dsize; + uint32_t op_addr = (uint32_t) addr; + int32_t linesize = 32; /* in Cortex-M7 size of cache line is fixed to 8 words (32 bytes) */ + + __DSB(); + + while (op_size > 0) { + SCB->DCCIMVAC = op_addr; + op_addr += (uint32_t)linesize; + op_size -= linesize; + } + + __DSB(); + __ISB(); + #endif +} + + +/*@} end of CMSIS_Core_CacheFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \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 */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM7_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc000.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc000.h index 9b67c92..9086c64 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc000.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc000.h @@ -1,1022 +1,1022 @@ -/**************************************************************************//** - * @file core_sc000.h - * @brief CMSIS SC000 Core Peripheral Access Layer Header File - * @version V5.0.5 - * @date 28. May 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_SC000_H_GENERIC -#define __CORE_SC000_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup SC000 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS SC000 definitions */ -#define __SC000_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __SC000_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __SC000_CMSIS_VERSION ((__SC000_CMSIS_VERSION_MAIN << 16U) | \ - __SC000_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_SC (000U) /*!< Cortex secure core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_SC000_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_SC000_H_DEPENDANT -#define __CORE_SC000_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __SC000_REV - #define __SC000_REV 0x0000U - #warning "__SC000_REV not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 2U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group SC000 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core MPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ - uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t _reserved0:1; /*!< bit: 0 Reserved */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[31U]; - __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[31U]; - __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[31U]; - __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[31U]; - uint32_t RESERVED4[64U]; - __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ -} NVIC_Type; - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - uint32_t RESERVED0[1U]; - __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ - uint32_t RESERVED1[154U]; - __IOM uint32_t SFCR; /*!< Offset: 0x290 (R/W) Security Features Control Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ -} SCnSCB_Type; - -/* Auxiliary Control Register Definitions */ -#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ -#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ -} MPU_Type; - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_ADDR_Pos 8U /*!< MPU RBAR: ADDR Position */ -#define MPU_RBAR_ADDR_Msk (0xFFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ - -#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ -#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ - -#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ -#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ - -/* MPU Region Attribute and Size Register Definitions */ -#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ -#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ - -#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ -#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ - -#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ -#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ - -#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ -#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ - -#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ -#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ - -#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ -#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ - -#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ -#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ - -#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ -#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ - -#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ -#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ - -#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ -#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief SC000 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. - Therefore they are not covered by the SC000 header file. - @{ - */ -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ -#endif - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else -/*#define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping not available for SC000 */ -/*#define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping not available for SC000 */ - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ -/*#define NVIC_GetActive __NVIC_GetActive not available for SC000 */ - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ - - -/* Interrupt Priorities are WORD accessible only under Armv6-M */ -/* The following MACROS handle generation of the register offset and byte masks */ -#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) -#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) -#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) - - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } - else - { - SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | - (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - SCB_AIRCR_SYSRESETREQ_Msk); - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_SC000_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_sc000.h + * @brief CMSIS SC000 Core Peripheral Access Layer Header File + * @version V5.0.5 + * @date 28. May 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_SC000_H_GENERIC +#define __CORE_SC000_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup SC000 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS SC000 definitions */ +#define __SC000_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __SC000_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __SC000_CMSIS_VERSION ((__SC000_CMSIS_VERSION_MAIN << 16U) | \ + __SC000_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_SC (000U) /*!< Cortex secure core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC000_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_SC000_H_DEPENDANT +#define __CORE_SC000_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __SC000_REV + #define __SC000_REV 0x0000U + #warning "__SC000_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group SC000 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t _reserved0:1; /*!< bit: 0 Reserved */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED0[1U]; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + uint32_t RESERVED1[154U]; + __IOM uint32_t SFCR; /*!< Offset: 0x290 (R/W) Security Features Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ +} MPU_Type; + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 8U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0xFFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief SC000 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the SC000 header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else +/*#define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping not available for SC000 */ +/*#define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping not available for SC000 */ + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for SC000 */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC000_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc300.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc300.h index 3e8a471..665822d 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc300.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/core_sc300.h @@ -1,1915 +1,1915 @@ -/**************************************************************************//** - * @file core_sc300.h - * @brief CMSIS SC300 Core Peripheral Access Layer Header File - * @version V5.0.6 - * @date 04. June 2018 - ******************************************************************************/ -/* - * Copyright (c) 2009-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef __CORE_SC300_H_GENERIC -#define __CORE_SC300_H_GENERIC - -#include - -#ifdef __cplusplus - extern "C" { -#endif - -/** - \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions - CMSIS violates the following MISRA-C:2004 rules: - - \li Required Rule 8.5, object/function definition in header file.
- Function definitions in header files are used to allow 'inlining'. - - \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
- Unions are used for effective representation of core registers. - - \li Advisory Rule 19.7, Function-like macro defined.
- Function-like macros are used to allow more efficient code. - */ - - -/******************************************************************************* - * CMSIS definitions - ******************************************************************************/ -/** - \ingroup SC3000 - @{ - */ - -#include "cmsis_version.h" - -/* CMSIS SC300 definitions */ -#define __SC300_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ -#define __SC300_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ -#define __SC300_CMSIS_VERSION ((__SC300_CMSIS_VERSION_MAIN << 16U) | \ - __SC300_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ - -#define __CORTEX_SC (300U) /*!< Cortex secure core */ - -/** __FPU_USED indicates whether an FPU is used or not. - This core does not support an FPU at all -*/ -#define __FPU_USED 0U - -#if defined ( __CC_ARM ) - #if defined __TARGET_FPU_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - #if defined __ARM_PCS_VFP - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __GNUC__ ) - #if defined (__VFP_FP__) && !defined(__SOFTFP__) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __ICCARM__ ) - #if defined __ARMVFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TI_ARM__ ) - #if defined __TI_VFP_SUPPORT__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __TASKING__ ) - #if defined __FPU_VFP__ - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#elif defined ( __CSMC__ ) - #if ( __CSMC__ & 0x400U) - #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" - #endif - -#endif - -#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_SC300_H_GENERIC */ - -#ifndef __CMSIS_GENERIC - -#ifndef __CORE_SC300_H_DEPENDANT -#define __CORE_SC300_H_DEPENDANT - -#ifdef __cplusplus - extern "C" { -#endif - -/* check device defines and use defaults */ -#if defined __CHECK_DEVICE_DEFINES - #ifndef __SC300_REV - #define __SC300_REV 0x0000U - #warning "__SC300_REV not defined in device header file; using default!" - #endif - - #ifndef __MPU_PRESENT - #define __MPU_PRESENT 0U - #warning "__MPU_PRESENT not defined in device header file; using default!" - #endif - - #ifndef __NVIC_PRIO_BITS - #define __NVIC_PRIO_BITS 3U - #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" - #endif - - #ifndef __Vendor_SysTickConfig - #define __Vendor_SysTickConfig 0U - #warning "__Vendor_SysTickConfig not defined in device header file; using default!" - #endif -#endif - -/* IO definitions (access restrictions to peripheral registers) */ -/** - \defgroup CMSIS_glob_defs CMSIS Global Defines - - IO Type Qualifiers are used - \li to specify the access to peripheral variables. - \li for automatic generation of peripheral register debug information. -*/ -#ifdef __cplusplus - #define __I volatile /*!< Defines 'read only' permissions */ -#else - #define __I volatile const /*!< Defines 'read only' permissions */ -#endif -#define __O volatile /*!< Defines 'write only' permissions */ -#define __IO volatile /*!< Defines 'read / write' permissions */ - -/* following defines should be used for structure members */ -#define __IM volatile const /*! Defines 'read only' structure member permissions */ -#define __OM volatile /*! Defines 'write only' structure member permissions */ -#define __IOM volatile /*! Defines 'read / write' structure member permissions */ - -/*@} end of group SC300 */ - - - -/******************************************************************************* - * Register Abstraction - Core Register contain: - - Core Register - - Core NVIC Register - - Core SCB Register - - Core SysTick Register - - Core Debug Register - - Core MPU Register - ******************************************************************************/ -/** - \defgroup CMSIS_core_register Defines and Type Definitions - \brief Type definitions and defines for Cortex-M processor based devices. -*/ - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CORE Status and Control Registers - \brief Core Register type definitions. - @{ - */ - -/** - \brief Union type to access the Application Program Status Register (APSR). - */ -typedef union -{ - struct - { - uint32_t _reserved0:27; /*!< bit: 0..26 Reserved */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} APSR_Type; - -/* APSR Register Definitions */ -#define APSR_N_Pos 31U /*!< APSR: N Position */ -#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ - -#define APSR_Z_Pos 30U /*!< APSR: Z Position */ -#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ - -#define APSR_C_Pos 29U /*!< APSR: C Position */ -#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ - -#define APSR_V_Pos 28U /*!< APSR: V Position */ -#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ - -#define APSR_Q_Pos 27U /*!< APSR: Q Position */ -#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ - - -/** - \brief Union type to access the Interrupt Program Status Register (IPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} IPSR_Type; - -/* IPSR Register Definitions */ -#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ -#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ - - -/** - \brief Union type to access the Special-Purpose Program Status Registers (xPSR). - */ -typedef union -{ - struct - { - uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ - uint32_t _reserved0:1; /*!< bit: 9 Reserved */ - uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ - uint32_t _reserved1:8; /*!< bit: 16..23 Reserved */ - uint32_t T:1; /*!< bit: 24 Thumb bit */ - uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ - uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ - uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ - uint32_t C:1; /*!< bit: 29 Carry condition code flag */ - uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ - uint32_t N:1; /*!< bit: 31 Negative condition code flag */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} xPSR_Type; - -/* xPSR Register Definitions */ -#define xPSR_N_Pos 31U /*!< xPSR: N Position */ -#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ - -#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ -#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ - -#define xPSR_C_Pos 29U /*!< xPSR: C Position */ -#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ - -#define xPSR_V_Pos 28U /*!< xPSR: V Position */ -#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ - -#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ -#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ - -#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ -#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ - -#define xPSR_T_Pos 24U /*!< xPSR: T Position */ -#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ - -#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ -#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ - -#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ -#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ - - -/** - \brief Union type to access the Control Registers (CONTROL). - */ -typedef union -{ - struct - { - uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ - uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ - uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ - } b; /*!< Structure used for bit access */ - uint32_t w; /*!< Type used for word access */ -} CONTROL_Type; - -/* CONTROL Register Definitions */ -#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ -#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ - -#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ -#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ - -/*@} end of group CMSIS_CORE */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) - \brief Type definitions for the NVIC Registers - @{ - */ - -/** - \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). - */ -typedef struct -{ - __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ - uint32_t RESERVED0[24U]; - __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ - uint32_t RSERVED1[24U]; - __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ - uint32_t RESERVED2[24U]; - __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ - uint32_t RESERVED3[24U]; - __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ - uint32_t RESERVED4[56U]; - __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ - uint32_t RESERVED5[644U]; - __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ -} NVIC_Type; - -/* Software Triggered Interrupt Register Definitions */ -#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ -#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_NVIC */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCB System Control Block (SCB) - \brief Type definitions for the System Control Block Registers - @{ - */ - -/** - \brief Structure type to access the System Control Block (SCB). - */ -typedef struct -{ - __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ - __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ - __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ - __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ - __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ - __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ - __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ - __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ - __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ - __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ - __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ - __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ - __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ - __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ - __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ - __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ - __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ - __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ - __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ - uint32_t RESERVED0[5U]; - __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ - uint32_t RESERVED1[129U]; - __IOM uint32_t SFCR; /*!< Offset: 0x290 (R/W) Security Features Control Register */ -} SCB_Type; - -/* SCB CPUID Register Definitions */ -#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ -#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ - -#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ -#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ - -#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ -#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ - -#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ -#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ - -#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ -#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ - -/* SCB Interrupt Control State Register Definitions */ -#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ -#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ - -#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ -#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ - -#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ -#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ - -#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ -#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ - -#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ -#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ - -#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ -#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ - -#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ -#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ - -#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ -#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ - -#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ -#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ - -#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ -#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ - -/* SCB Vector Table Offset Register Definitions */ -#define SCB_VTOR_TBLBASE_Pos 29U /*!< SCB VTOR: TBLBASE Position */ -#define SCB_VTOR_TBLBASE_Msk (1UL << SCB_VTOR_TBLBASE_Pos) /*!< SCB VTOR: TBLBASE Mask */ - -#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ -#define SCB_VTOR_TBLOFF_Msk (0x3FFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ - -/* SCB Application Interrupt and Reset Control Register Definitions */ -#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ -#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ - -#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ -#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ - -#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ -#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ - -#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ -#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ - -#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ -#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ - -#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ -#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ - -#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ -#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ - -/* SCB System Control Register Definitions */ -#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ -#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ - -#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ -#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ - -#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ -#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ - -/* SCB Configuration Control Register Definitions */ -#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ -#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ - -#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ -#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ - -#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ -#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ - -#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ -#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ - -#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ -#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ - -#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ -#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ - -/* SCB System Handler Control and State Register Definitions */ -#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ -#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ - -#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ -#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ - -#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ -#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ - -#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ -#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ - -#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ -#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ - -#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ -#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ - -#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ -#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ - -#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ -#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ - -#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ -#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ - -#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ -#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ - -#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ -#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ - -#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ -#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ - -#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ -#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ - -#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ -#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ - -/* SCB Configurable Fault Status Register Definitions */ -#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ -#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ - -#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ -#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ - -#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ -#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ - -/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ -#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ - -#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ -#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ - -#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ -#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ - -#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ -#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ - -#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ -#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ - -/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ -#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ - -#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ -#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ - -#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ -#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ - -#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ -#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ - -#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ -#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ - -#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ -#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ - -/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ -#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ -#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ - -#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ -#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ - -#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ -#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ - -#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ -#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ - -#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ -#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ - -#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ -#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ - -/* SCB Hard Fault Status Register Definitions */ -#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ -#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ - -#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ -#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ - -#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ -#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ - -/* SCB Debug Fault Status Register Definitions */ -#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ -#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ - -#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ -#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ - -#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ -#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ - -#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ -#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ - -#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ -#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ - -/*@} end of group CMSIS_SCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) - \brief Type definitions for the System Control and ID Register not in the SCB - @{ - */ - -/** - \brief Structure type to access the System Control and ID Register not in the SCB. - */ -typedef struct -{ - uint32_t RESERVED0[1U]; - __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ - uint32_t RESERVED1[1U]; -} SCnSCB_Type; - -/* Interrupt Controller Type Register Definitions */ -#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ -#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ - -/*@} end of group CMSIS_SCnotSCB */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_SysTick System Tick Timer (SysTick) - \brief Type definitions for the System Timer Registers. - @{ - */ - -/** - \brief Structure type to access the System Timer (SysTick). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ - __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ - __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ - __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ -} SysTick_Type; - -/* SysTick Control / Status Register Definitions */ -#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ -#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ - -#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ -#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ - -#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ -#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ - -#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ -#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ - -/* SysTick Reload Register Definitions */ -#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ -#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ - -/* SysTick Current Register Definitions */ -#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ -#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ - -/* SysTick Calibration Register Definitions */ -#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ -#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ - -#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ -#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ - -#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ -#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ - -/*@} end of group CMSIS_SysTick */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) - \brief Type definitions for the Instrumentation Trace Macrocell (ITM) - @{ - */ - -/** - \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). - */ -typedef struct -{ - __OM union - { - __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ - __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ - __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ - } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ - uint32_t RESERVED0[864U]; - __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ - uint32_t RESERVED1[15U]; - __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ - uint32_t RESERVED2[15U]; - __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ - uint32_t RESERVED3[29U]; - __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ - __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ - __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ - uint32_t RESERVED4[43U]; - __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ - __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ - uint32_t RESERVED5[6U]; - __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ - __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ - __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ - __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ - __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ - __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ - __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ - __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ - __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ - __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ - __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ - __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ -} ITM_Type; - -/* ITM Trace Privilege Register Definitions */ -#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ -#define ITM_TPR_PRIVMASK_Msk (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ - -/* ITM Trace Control Register Definitions */ -#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ -#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ - -#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ -#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ - -#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ -#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ - -#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ -#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ - -#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ -#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ - -#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ -#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ - -#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ -#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ - -#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ -#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ - -#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ -#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ - -/* ITM Integration Write Register Definitions */ -#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ -#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ - -/* ITM Integration Read Register Definitions */ -#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ -#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ - -/* ITM Integration Mode Control Register Definitions */ -#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ -#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ - -/* ITM Lock Status Register Definitions */ -#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ -#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ - -#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ -#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ - -#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ -#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ - -/*@}*/ /* end of group CMSIS_ITM */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) - \brief Type definitions for the Data Watchpoint and Trace (DWT) - @{ - */ - -/** - \brief Structure type to access the Data Watchpoint and Trace Register (DWT). - */ -typedef struct -{ - __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ - __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ - __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ - __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ - __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ - __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ - __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ - __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ - __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ - __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ - __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ - uint32_t RESERVED0[1U]; - __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ - __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ - __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ - uint32_t RESERVED1[1U]; - __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ - __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ - __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ - uint32_t RESERVED2[1U]; - __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ - __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ - __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ -} DWT_Type; - -/* DWT Control Register Definitions */ -#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ -#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ - -#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ -#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ - -#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ -#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ - -#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ -#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ - -#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ -#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ - -#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ -#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ - -#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ -#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ - -#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ -#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ - -#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ -#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ - -#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ -#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ - -#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ -#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ - -#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ -#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ - -#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ -#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ - -#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ -#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ - -#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ -#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ - -#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ -#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ - -#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ -#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ - -#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ -#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ - -/* DWT CPI Count Register Definitions */ -#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ -#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ - -/* DWT Exception Overhead Count Register Definitions */ -#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ -#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ - -/* DWT Sleep Count Register Definitions */ -#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ -#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ - -/* DWT LSU Count Register Definitions */ -#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ -#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ - -/* DWT Folded-instruction Count Register Definitions */ -#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ -#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ - -/* DWT Comparator Mask Register Definitions */ -#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ -#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ - -/* DWT Comparator Function Register Definitions */ -#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ -#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ - -#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ -#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ - -#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ -#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ - -#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ -#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ - -#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ -#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ - -#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ -#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ - -#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ -#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ - -#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ -#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ - -#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ -#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ - -/*@}*/ /* end of group CMSIS_DWT */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_TPI Trace Port Interface (TPI) - \brief Type definitions for the Trace Port Interface (TPI) - @{ - */ - -/** - \brief Structure type to access the Trace Port Interface Register (TPI). - */ -typedef struct -{ - __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ - __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ - uint32_t RESERVED0[2U]; - __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ - uint32_t RESERVED1[55U]; - __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ - uint32_t RESERVED2[131U]; - __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ - __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ - __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ - uint32_t RESERVED3[759U]; - __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ - __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ - __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ - uint32_t RESERVED4[1U]; - __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ - __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ - __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ - uint32_t RESERVED5[39U]; - __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ - __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ - uint32_t RESERVED7[8U]; - __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ - __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ -} TPI_Type; - -/* TPI Asynchronous Clock Prescaler Register Definitions */ -#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ -#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ - -/* TPI Selected Pin Protocol Register Definitions */ -#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ -#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ - -/* TPI Formatter and Flush Status Register Definitions */ -#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ -#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ - -#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ -#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ - -#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ -#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ - -#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ -#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ - -/* TPI Formatter and Flush Control Register Definitions */ -#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ -#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ - -#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ -#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ - -/* TPI TRIGGER Register Definitions */ -#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ -#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ - -/* TPI Integration ETM Data Register Definitions (FIFO0) */ -#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ -#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ - -#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ -#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ - -#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ -#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ - -#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ -#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ - -#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ -#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ - -#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ -#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ - -#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ -#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ - -/* TPI ITATBCTR2 Register Definitions */ -#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ -#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ - -#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ -#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ - -/* TPI Integration ITM Data Register Definitions (FIFO1) */ -#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ -#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ - -#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ -#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ - -#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ -#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ - -#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ -#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ - -#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ -#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ - -#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ -#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ - -#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ -#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ - -/* TPI ITATBCTR0 Register Definitions */ -#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ -#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ - -#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ -#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ - -/* TPI Integration Mode Control Register Definitions */ -#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ -#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ - -/* TPI DEVID Register Definitions */ -#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ -#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ - -#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ -#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ - -#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ -#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ - -#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ -#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ - -#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ -#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ - -#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ -#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ - -/* TPI DEVTYPE Register Definitions */ -#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ -#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ - -#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ -#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ - -/*@}*/ /* end of group CMSIS_TPI */ - - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_MPU Memory Protection Unit (MPU) - \brief Type definitions for the Memory Protection Unit (MPU) - @{ - */ - -/** - \brief Structure type to access the Memory Protection Unit (MPU). - */ -typedef struct -{ - __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ - __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ - __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ - __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ - __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ - __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ - __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ - __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ - __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ - __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ -} MPU_Type; - -/* MPU Type Register Definitions */ -#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ -#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ - -#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ -#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ - -#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ -#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ - -/* MPU Control Register Definitions */ -#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ -#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ - -#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ -#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ - -#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ -#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ - -/* MPU Region Number Register Definitions */ -#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ -#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ - -/* MPU Region Base Address Register Definitions */ -#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ -#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ - -#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ -#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ - -#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ -#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ - -/* MPU Region Attribute and Size Register Definitions */ -#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ -#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ - -#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ -#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ - -#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ -#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ - -#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ -#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ - -#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ -#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ - -#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ -#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ - -#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ -#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ - -#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ -#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ - -#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ -#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ - -#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ -#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ - -/*@} end of group CMSIS_MPU */ -#endif - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) - \brief Type definitions for the Core Debug Registers - @{ - */ - -/** - \brief Structure type to access the Core Debug Register (CoreDebug). - */ -typedef struct -{ - __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ - __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ - __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ - __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ -} CoreDebug_Type; - -/* Debug Halting Control and Status Register Definitions */ -#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ -#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ - -#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ -#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ - -#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ -#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ - -#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ -#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ - -#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ -#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ - -#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ -#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ - -#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ -#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ - -#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ -#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ - -#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ -#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ - -#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ -#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ - -#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ -#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ - -#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ -#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ - -/* Debug Core Register Selector Register Definitions */ -#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ -#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ - -#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ -#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ - -/* Debug Exception and Monitor Control Register Definitions */ -#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ -#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ - -#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ -#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ - -#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ -#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ - -#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ -#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ - -#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ -#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ - -#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ -#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ - -#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ -#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ - -#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ -#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ - -#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ -#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ - -#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ -#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ - -#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ -#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ - -#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ -#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ - -#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ -#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ - -/*@} end of group CMSIS_CoreDebug */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_bitfield Core register bit field macros - \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). - @{ - */ - -/** - \brief Mask and shift a bit field value for use in a register bit range. - \param[in] field Name of the register bit field. - \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. - \return Masked and shifted value. -*/ -#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) - -/** - \brief Mask and shift a register value to extract a bit filed value. - \param[in] field Name of the register bit field. - \param[in] value Value of register. This parameter is interpreted as an uint32_t type. - \return Masked and shifted bit field value. -*/ -#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) - -/*@} end of group CMSIS_core_bitfield */ - - -/** - \ingroup CMSIS_core_register - \defgroup CMSIS_core_base Core Definitions - \brief Definitions for base addresses, unions, and structures. - @{ - */ - -/* Memory mapping of Core Hardware */ -#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ -#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ -#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ -#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ -#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ -#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ -#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ -#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ - -#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ -#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ -#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ -#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ -#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ -#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ -#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ -#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ - -#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) - #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ - #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ -#endif - -/*@} */ - - - -/******************************************************************************* - * Hardware Abstraction Layer - Core Function Interface contains: - - Core NVIC Functions - - Core SysTick Functions - - Core Debug Functions - - Core Register Access Functions - ******************************************************************************/ -/** - \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference -*/ - - - -/* ########################## NVIC functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_NVICFunctions NVIC Functions - \brief Functions that manage interrupts and exceptions via the NVIC. - @{ - */ - -#ifdef CMSIS_NVIC_VIRTUAL - #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE - #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" - #endif - #include CMSIS_NVIC_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping - #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping - #define NVIC_EnableIRQ __NVIC_EnableIRQ - #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ - #define NVIC_DisableIRQ __NVIC_DisableIRQ - #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ - #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ - #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ - #define NVIC_GetActive __NVIC_GetActive - #define NVIC_SetPriority __NVIC_SetPriority - #define NVIC_GetPriority __NVIC_GetPriority - #define NVIC_SystemReset __NVIC_SystemReset -#endif /* CMSIS_NVIC_VIRTUAL */ - -#ifdef CMSIS_VECTAB_VIRTUAL - #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE - #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" - #endif - #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE -#else - #define NVIC_SetVector __NVIC_SetVector - #define NVIC_GetVector __NVIC_GetVector -#endif /* (CMSIS_VECTAB_VIRTUAL) */ - -#define NVIC_USER_IRQ_OFFSET 16 - - -/* The following EXC_RETURN values are saved the LR on exception entry */ -#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ -#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ -#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ - - - -/** - \brief Set Priority Grouping - \details Sets the priority grouping field using the required unlock sequence. - The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. - Only values from 0..7 are used. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Priority grouping field. - */ -__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) -{ - uint32_t reg_value; - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - - reg_value = SCB->AIRCR; /* read old register configuration */ - reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ - reg_value = (reg_value | - ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ - SCB->AIRCR = reg_value; -} - - -/** - \brief Get Priority Grouping - \details Reads the priority grouping field from the NVIC Interrupt Controller. - \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). - */ -__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) -{ - return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); -} - - -/** - \brief Enable Interrupt - \details Enables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Interrupt Enable status - \details Returns a device specific interrupt enable status from the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt is not enabled. - \return 1 Interrupt is enabled. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Disable Interrupt - \details Disables a device specific interrupt in the NVIC interrupt controller. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - __DSB(); - __ISB(); - } -} - - -/** - \brief Get Pending Interrupt - \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not pending. - \return 1 Interrupt status is pending. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Pending Interrupt - \details Sets the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Clear Pending Interrupt - \details Clears the pending bit of a device specific interrupt in the NVIC pending register. - \param [in] IRQn Device specific interrupt number. - \note IRQn must not be negative. - */ -__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); - } -} - - -/** - \brief Get Active Interrupt - \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. - \param [in] IRQn Device specific interrupt number. - \return 0 Interrupt status is not active. - \return 1 Interrupt status is active. - \note IRQn must not be negative. - */ -__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) -{ - if ((int32_t)(IRQn) >= 0) - { - return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); - } - else - { - return(0U); - } -} - - -/** - \brief Set Interrupt Priority - \details Sets the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \param [in] priority Priority to set. - \note The priority cannot be set for every processor exception. - */ -__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) -{ - if ((int32_t)(IRQn) >= 0) - { - NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } - else - { - SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); - } -} - - -/** - \brief Get Interrupt Priority - \details Reads the priority of a device specific interrupt or a processor exception. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Interrupt Priority. - Value is aligned automatically to the implemented priority bits of the microcontroller. - */ -__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) -{ - - if ((int32_t)(IRQn) >= 0) - { - return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); - } - else - { - return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); - } -} - - -/** - \brief Encode Priority - \details Encodes the priority for an interrupt with the given priority group, - preemptive priority value, and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. - \param [in] PriorityGroup Used priority group. - \param [in] PreemptPriority Preemptive priority value (starting from 0). - \param [in] SubPriority Subpriority value (starting from 0). - \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). - */ -__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - return ( - ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | - ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) - ); -} - - -/** - \brief Decode Priority - \details Decodes an interrupt priority value with a given priority group to - preemptive priority value and subpriority value. - In case of a conflict between priority grouping and available - priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. - \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). - \param [in] PriorityGroup Used priority group. - \param [out] pPreemptPriority Preemptive priority value (starting from 0). - \param [out] pSubPriority Subpriority value (starting from 0). - */ -__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) -{ - uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ - uint32_t PreemptPriorityBits; - uint32_t SubPriorityBits; - - PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); - SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); - - *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); - *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); -} - - -/** - \brief Set Interrupt Vector - \details Sets an interrupt vector in SRAM based interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - VTOR must been relocated to SRAM before. - \param [in] IRQn Interrupt number - \param [in] vector Address of interrupt handler function - */ -__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; -} - - -/** - \brief Get Interrupt Vector - \details Reads an interrupt vector from interrupt vector table. - The interrupt number can be positive to specify a device specific interrupt, - or negative to specify a processor exception. - \param [in] IRQn Interrupt number. - \return Address of interrupt handler function - */ -__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) -{ - uint32_t *vectors = (uint32_t *)SCB->VTOR; - return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; -} - - -/** - \brief System Reset - \details Initiates a system reset request to reset the MCU. - */ -__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) -{ - __DSB(); /* Ensure all outstanding memory accesses included - buffered write are completed before reset */ - SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | - (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | - SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ - __DSB(); /* Ensure completion of memory access */ - - for(;;) /* wait until reset */ - { - __NOP(); - } -} - -/*@} end of CMSIS_Core_NVICFunctions */ - - -/* ########################## FPU functions #################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_FpuFunctions FPU Functions - \brief Function that provides FPU type. - @{ - */ - -/** - \brief get FPU type - \details returns the FPU type - \returns - - \b 0: No FPU - - \b 1: Single precision FPU - - \b 2: Double + Single precision FPU - */ -__STATIC_INLINE uint32_t SCB_GetFPUType(void) -{ - return 0U; /* No FPU */ -} - - -/*@} end of CMSIS_Core_FpuFunctions */ - - - -/* ################################## SysTick function ############################################ */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_Core_SysTickFunctions SysTick Functions - \brief Functions that configure the System. - @{ - */ - -#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) - -/** - \brief System Tick Configuration - \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. - Counter is in free running mode to generate periodic interrupts. - \param [in] ticks Number of ticks between two interrupts. - \return 0 Function succeeded. - \return 1 Function failed. - \note When the variable __Vendor_SysTickConfig is set to 1, then the - function SysTick_Config is not included. In this case, the file device.h - must contain a vendor-specific implementation of this function. - */ -__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) -{ - if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) - { - return (1UL); /* Reload value impossible */ - } - - SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ - NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ - SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_TICKINT_Msk | - SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ - return (0UL); /* Function successful */ -} - -#endif - -/*@} end of CMSIS_Core_SysTickFunctions */ - - - -/* ##################################### Debug In/Output function ########################################### */ -/** - \ingroup CMSIS_Core_FunctionInterface - \defgroup CMSIS_core_DebugFunctions ITM Functions - \brief Functions that access the ITM debug interface. - @{ - */ - -extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ -#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ - - -/** - \brief ITM Send Character - \details Transmits a character via the ITM channel 0, and - \li Just returns when no debugger is connected that has booked the output. - \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. - \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 */ - ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ - { - while (ITM->PORT[0U].u32 == 0UL) - { - __NOP(); - } - ITM->PORT[0U].u8 = (uint8_t)ch; - } - return (ch); -} - - -/** - \brief ITM Receive Character - \details Inputs a character via the external variable \ref ITM_RxBuffer. - \return Received character. - \return -1 No character pending. - */ -__STATIC_INLINE int32_t ITM_ReceiveChar (void) -{ - int32_t ch = -1; /* no character available */ - - if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) - { - ch = ITM_RxBuffer; - ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ - } - - return (ch); -} - - -/** - \brief ITM Check Character - \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. - \return 0 No character available. - \return 1 Character available. - */ -__STATIC_INLINE int32_t ITM_CheckChar (void) -{ - - if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) - { - return (0); /* no character available */ - } - else - { - return (1); /* character available */ - } -} - -/*@} end of CMSIS_core_DebugFunctions */ - - - - -#ifdef __cplusplus -} -#endif - -#endif /* __CORE_SC300_H_DEPENDANT */ - -#endif /* __CMSIS_GENERIC */ +/**************************************************************************//** + * @file core_sc300.h + * @brief CMSIS SC300 Core Peripheral Access Layer Header File + * @version V5.0.6 + * @date 04. June 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_SC300_H_GENERIC +#define __CORE_SC300_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup SC3000 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS SC300 definitions */ +#define __SC300_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __SC300_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __SC300_CMSIS_VERSION ((__SC300_CMSIS_VERSION_MAIN << 16U) | \ + __SC300_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_SC (300U) /*!< Cortex secure core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_PCS_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC300_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_SC300_H_DEPENDANT +#define __CORE_SC300_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __SC300_REV + #define __SC300_REV 0x0000U + #warning "__SC300_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group SC300 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:27; /*!< bit: 0..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t _reserved1:8; /*!< bit: 16..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[5U]; + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + uint32_t RESERVED1[129U]; + __IOM uint32_t SFCR; /*!< Offset: 0x290 (R/W) Security Features Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLBASE_Pos 29U /*!< SCB VTOR: TBLBASE Position */ +#define SCB_VTOR_TBLBASE_Msk (1UL << SCB_VTOR_TBLBASE_Pos) /*!< SCB VTOR: TBLBASE Mask */ + +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x3FFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + uint32_t RESERVED1[1U]; +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[29U]; + __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ + __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ + __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Integration Write Register Definitions */ +#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ +#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ + +/* ITM Integration Read Register Definitions */ +#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ +#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ + +/* ITM Integration Mode Control Register Definitions */ +#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ +#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \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 */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC300_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv7.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv7.h index 0142203..7d4b600 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv7.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv7.h @@ -1,270 +1,270 @@ -/****************************************************************************** - * @file mpu_armv7.h - * @brief CMSIS MPU API for Armv7-M MPU - * @version V5.0.4 - * @date 10. January 2018 - ******************************************************************************/ -/* - * Copyright (c) 2017-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef ARM_MPU_ARMV7_H -#define ARM_MPU_ARMV7_H - -#define ARM_MPU_REGION_SIZE_32B ((uint8_t)0x04U) ///!< MPU Region Size 32 Bytes -#define ARM_MPU_REGION_SIZE_64B ((uint8_t)0x05U) ///!< MPU Region Size 64 Bytes -#define ARM_MPU_REGION_SIZE_128B ((uint8_t)0x06U) ///!< MPU Region Size 128 Bytes -#define ARM_MPU_REGION_SIZE_256B ((uint8_t)0x07U) ///!< MPU Region Size 256 Bytes -#define ARM_MPU_REGION_SIZE_512B ((uint8_t)0x08U) ///!< MPU Region Size 512 Bytes -#define ARM_MPU_REGION_SIZE_1KB ((uint8_t)0x09U) ///!< MPU Region Size 1 KByte -#define ARM_MPU_REGION_SIZE_2KB ((uint8_t)0x0AU) ///!< MPU Region Size 2 KBytes -#define ARM_MPU_REGION_SIZE_4KB ((uint8_t)0x0BU) ///!< MPU Region Size 4 KBytes -#define ARM_MPU_REGION_SIZE_8KB ((uint8_t)0x0CU) ///!< MPU Region Size 8 KBytes -#define ARM_MPU_REGION_SIZE_16KB ((uint8_t)0x0DU) ///!< MPU Region Size 16 KBytes -#define ARM_MPU_REGION_SIZE_32KB ((uint8_t)0x0EU) ///!< MPU Region Size 32 KBytes -#define ARM_MPU_REGION_SIZE_64KB ((uint8_t)0x0FU) ///!< MPU Region Size 64 KBytes -#define ARM_MPU_REGION_SIZE_128KB ((uint8_t)0x10U) ///!< MPU Region Size 128 KBytes -#define ARM_MPU_REGION_SIZE_256KB ((uint8_t)0x11U) ///!< MPU Region Size 256 KBytes -#define ARM_MPU_REGION_SIZE_512KB ((uint8_t)0x12U) ///!< MPU Region Size 512 KBytes -#define ARM_MPU_REGION_SIZE_1MB ((uint8_t)0x13U) ///!< MPU Region Size 1 MByte -#define ARM_MPU_REGION_SIZE_2MB ((uint8_t)0x14U) ///!< MPU Region Size 2 MBytes -#define ARM_MPU_REGION_SIZE_4MB ((uint8_t)0x15U) ///!< MPU Region Size 4 MBytes -#define ARM_MPU_REGION_SIZE_8MB ((uint8_t)0x16U) ///!< MPU Region Size 8 MBytes -#define ARM_MPU_REGION_SIZE_16MB ((uint8_t)0x17U) ///!< MPU Region Size 16 MBytes -#define ARM_MPU_REGION_SIZE_32MB ((uint8_t)0x18U) ///!< MPU Region Size 32 MBytes -#define ARM_MPU_REGION_SIZE_64MB ((uint8_t)0x19U) ///!< MPU Region Size 64 MBytes -#define ARM_MPU_REGION_SIZE_128MB ((uint8_t)0x1AU) ///!< MPU Region Size 128 MBytes -#define ARM_MPU_REGION_SIZE_256MB ((uint8_t)0x1BU) ///!< MPU Region Size 256 MBytes -#define ARM_MPU_REGION_SIZE_512MB ((uint8_t)0x1CU) ///!< MPU Region Size 512 MBytes -#define ARM_MPU_REGION_SIZE_1GB ((uint8_t)0x1DU) ///!< MPU Region Size 1 GByte -#define ARM_MPU_REGION_SIZE_2GB ((uint8_t)0x1EU) ///!< MPU Region Size 2 GBytes -#define ARM_MPU_REGION_SIZE_4GB ((uint8_t)0x1FU) ///!< MPU Region Size 4 GBytes - -#define ARM_MPU_AP_NONE 0U ///!< MPU Access Permission no access -#define ARM_MPU_AP_PRIV 1U ///!< MPU Access Permission privileged access only -#define ARM_MPU_AP_URO 2U ///!< MPU Access Permission unprivileged access read-only -#define ARM_MPU_AP_FULL 3U ///!< MPU Access Permission full access -#define ARM_MPU_AP_PRO 5U ///!< MPU Access Permission privileged access read-only -#define ARM_MPU_AP_RO 6U ///!< MPU Access Permission read-only access - -/** MPU Region Base Address Register Value -* -* \param Region The region to be configured, number 0 to 15. -* \param BaseAddress The base address for the region. -*/ -#define ARM_MPU_RBAR(Region, BaseAddress) \ - (((BaseAddress) & MPU_RBAR_ADDR_Msk) | \ - ((Region) & MPU_RBAR_REGION_Msk) | \ - (MPU_RBAR_VALID_Msk)) - -/** -* MPU Memory Access Attributes -* -* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. -* \param IsShareable Region is shareable between multiple bus masters. -* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. -* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. -*/ -#define ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable) \ - ((((TypeExtField ) << MPU_RASR_TEX_Pos) & MPU_RASR_TEX_Msk) | \ - (((IsShareable ) << MPU_RASR_S_Pos) & MPU_RASR_S_Msk) | \ - (((IsCacheable ) << MPU_RASR_C_Pos) & MPU_RASR_C_Msk) | \ - (((IsBufferable ) << MPU_RASR_B_Pos) & MPU_RASR_B_Msk)) - -/** -* MPU Region Attribute and Size Register Value -* -* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. -* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. -* \param AccessAttributes Memory access attribution, see \ref ARM_MPU_ACCESS_. -* \param SubRegionDisable Sub-region disable field. -* \param Size Region size of the region to be configured, for example 4K, 8K. -*/ -#define ARM_MPU_RASR_EX(DisableExec, AccessPermission, AccessAttributes, SubRegionDisable, Size) \ - ((((DisableExec ) << MPU_RASR_XN_Pos) & MPU_RASR_XN_Msk) | \ - (((AccessPermission) << MPU_RASR_AP_Pos) & MPU_RASR_AP_Msk) | \ - (((AccessAttributes) ) & (MPU_RASR_TEX_Msk | MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk))) - -/** -* MPU Region Attribute and Size Register Value -* -* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. -* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. -* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. -* \param IsShareable Region is shareable between multiple bus masters. -* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. -* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. -* \param SubRegionDisable Sub-region disable field. -* \param Size Region size of the region to be configured, for example 4K, 8K. -*/ -#define ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable, SubRegionDisable, Size) \ - ARM_MPU_RASR_EX(DisableExec, AccessPermission, ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable), SubRegionDisable, Size) - -/** -* MPU Memory Access Attribute for strongly ordered memory. -* - TEX: 000b -* - Shareable -* - Non-cacheable -* - Non-bufferable -*/ -#define ARM_MPU_ACCESS_ORDERED ARM_MPU_ACCESS_(0U, 1U, 0U, 0U) - -/** -* MPU Memory Access Attribute for device memory. -* - TEX: 000b (if non-shareable) or 010b (if shareable) -* - Shareable or non-shareable -* - Non-cacheable -* - Bufferable (if shareable) or non-bufferable (if non-shareable) -* -* \param IsShareable Configures the device memory as shareable or non-shareable. -*/ -#define ARM_MPU_ACCESS_DEVICE(IsShareable) ((IsShareable) ? ARM_MPU_ACCESS_(0U, 1U, 0U, 1U) : ARM_MPU_ACCESS_(2U, 0U, 0U, 0U)) - -/** -* MPU Memory Access Attribute for normal memory. -* - TEX: 1BBb (reflecting outer cacheability rules) -* - Shareable or non-shareable -* - Cacheable or non-cacheable (reflecting inner cacheability rules) -* - Bufferable or non-bufferable (reflecting inner cacheability rules) -* -* \param OuterCp Configures the outer cache policy. -* \param InnerCp Configures the inner cache policy. -* \param IsShareable Configures the memory as shareable or non-shareable. -*/ -#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) & 2U), ((InnerCp) & 1U)) - -/** -* MPU Memory Access Attribute non-cacheable policy. -*/ -#define ARM_MPU_CACHEP_NOCACHE 0U - -/** -* MPU Memory Access Attribute write-back, write and read allocate policy. -*/ -#define ARM_MPU_CACHEP_WB_WRA 1U - -/** -* MPU Memory Access Attribute write-through, no write allocate policy. -*/ -#define ARM_MPU_CACHEP_WT_NWA 2U - -/** -* MPU Memory Access Attribute write-back, no write allocate policy. -*/ -#define ARM_MPU_CACHEP_WB_NWA 3U - - -/** -* Struct for a single MPU Region -*/ -typedef struct { - uint32_t RBAR; //!< The region base address register value (RBAR) - uint32_t RASR; //!< The region attribute and size register value (RASR) \ref MPU_RASR -} ARM_MPU_Region_t; - -/** Enable the MPU. -* \param MPU_Control Default access permissions for unconfigured regions. -*/ -__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control) -{ - __DSB(); - __ISB(); - MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; -#ifdef SCB_SHCSR_MEMFAULTENA_Msk - SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; -#endif -} - -/** Disable the MPU. -*/ -__STATIC_INLINE void ARM_MPU_Disable(void) -{ - __DSB(); - __ISB(); -#ifdef SCB_SHCSR_MEMFAULTENA_Msk - SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; -#endif - MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk; -} - -/** Clear and disable the given MPU region. -* \param rnr Region number to be cleared. -*/ -__STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr) -{ - MPU->RNR = rnr; - MPU->RASR = 0U; -} - -/** Configure an MPU region. -* \param rbar Value for RBAR register. -* \param rsar Value for RSAR register. -*/ -__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr) -{ - MPU->RBAR = rbar; - MPU->RASR = rasr; -} - -/** Configure the given MPU region. -* \param rnr Region number to be configured. -* \param rbar Value for RBAR register. -* \param rsar Value for RSAR register. -*/ -__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr) -{ - MPU->RNR = rnr; - MPU->RBAR = rbar; - MPU->RASR = rasr; -} - -/** Memcopy with strictly ordered memory access, e.g. for register targets. -* \param dst Destination data is copied to. -* \param src Source data is copied from. -* \param len Amount of data words to be copied. -*/ -__STATIC_INLINE void orderedCpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len) -{ - uint32_t i; - for (i = 0U; i < len; ++i) - { - dst[i] = src[i]; - } -} - -/** Load the given number of MPU regions from a table. -* \param table Pointer to the MPU configuration table. -* \param cnt Amount of regions to be configured. -*/ -__STATIC_INLINE void ARM_MPU_Load(ARM_MPU_Region_t const* table, uint32_t cnt) -{ - const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U; - while (cnt > MPU_TYPE_RALIASES) { - orderedCpy(&(MPU->RBAR), &(table->RBAR), MPU_TYPE_RALIASES*rowWordSize); - table += MPU_TYPE_RALIASES; - cnt -= MPU_TYPE_RALIASES; - } - orderedCpy(&(MPU->RBAR), &(table->RBAR), cnt*rowWordSize); -} - -#endif +/****************************************************************************** + * @file mpu_armv7.h + * @brief CMSIS MPU API for Armv7-M MPU + * @version V5.0.4 + * @date 10. January 2018 + ******************************************************************************/ +/* + * Copyright (c) 2017-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef ARM_MPU_ARMV7_H +#define ARM_MPU_ARMV7_H + +#define ARM_MPU_REGION_SIZE_32B ((uint8_t)0x04U) ///!< MPU Region Size 32 Bytes +#define ARM_MPU_REGION_SIZE_64B ((uint8_t)0x05U) ///!< MPU Region Size 64 Bytes +#define ARM_MPU_REGION_SIZE_128B ((uint8_t)0x06U) ///!< MPU Region Size 128 Bytes +#define ARM_MPU_REGION_SIZE_256B ((uint8_t)0x07U) ///!< MPU Region Size 256 Bytes +#define ARM_MPU_REGION_SIZE_512B ((uint8_t)0x08U) ///!< MPU Region Size 512 Bytes +#define ARM_MPU_REGION_SIZE_1KB ((uint8_t)0x09U) ///!< MPU Region Size 1 KByte +#define ARM_MPU_REGION_SIZE_2KB ((uint8_t)0x0AU) ///!< MPU Region Size 2 KBytes +#define ARM_MPU_REGION_SIZE_4KB ((uint8_t)0x0BU) ///!< MPU Region Size 4 KBytes +#define ARM_MPU_REGION_SIZE_8KB ((uint8_t)0x0CU) ///!< MPU Region Size 8 KBytes +#define ARM_MPU_REGION_SIZE_16KB ((uint8_t)0x0DU) ///!< MPU Region Size 16 KBytes +#define ARM_MPU_REGION_SIZE_32KB ((uint8_t)0x0EU) ///!< MPU Region Size 32 KBytes +#define ARM_MPU_REGION_SIZE_64KB ((uint8_t)0x0FU) ///!< MPU Region Size 64 KBytes +#define ARM_MPU_REGION_SIZE_128KB ((uint8_t)0x10U) ///!< MPU Region Size 128 KBytes +#define ARM_MPU_REGION_SIZE_256KB ((uint8_t)0x11U) ///!< MPU Region Size 256 KBytes +#define ARM_MPU_REGION_SIZE_512KB ((uint8_t)0x12U) ///!< MPU Region Size 512 KBytes +#define ARM_MPU_REGION_SIZE_1MB ((uint8_t)0x13U) ///!< MPU Region Size 1 MByte +#define ARM_MPU_REGION_SIZE_2MB ((uint8_t)0x14U) ///!< MPU Region Size 2 MBytes +#define ARM_MPU_REGION_SIZE_4MB ((uint8_t)0x15U) ///!< MPU Region Size 4 MBytes +#define ARM_MPU_REGION_SIZE_8MB ((uint8_t)0x16U) ///!< MPU Region Size 8 MBytes +#define ARM_MPU_REGION_SIZE_16MB ((uint8_t)0x17U) ///!< MPU Region Size 16 MBytes +#define ARM_MPU_REGION_SIZE_32MB ((uint8_t)0x18U) ///!< MPU Region Size 32 MBytes +#define ARM_MPU_REGION_SIZE_64MB ((uint8_t)0x19U) ///!< MPU Region Size 64 MBytes +#define ARM_MPU_REGION_SIZE_128MB ((uint8_t)0x1AU) ///!< MPU Region Size 128 MBytes +#define ARM_MPU_REGION_SIZE_256MB ((uint8_t)0x1BU) ///!< MPU Region Size 256 MBytes +#define ARM_MPU_REGION_SIZE_512MB ((uint8_t)0x1CU) ///!< MPU Region Size 512 MBytes +#define ARM_MPU_REGION_SIZE_1GB ((uint8_t)0x1DU) ///!< MPU Region Size 1 GByte +#define ARM_MPU_REGION_SIZE_2GB ((uint8_t)0x1EU) ///!< MPU Region Size 2 GBytes +#define ARM_MPU_REGION_SIZE_4GB ((uint8_t)0x1FU) ///!< MPU Region Size 4 GBytes + +#define ARM_MPU_AP_NONE 0U ///!< MPU Access Permission no access +#define ARM_MPU_AP_PRIV 1U ///!< MPU Access Permission privileged access only +#define ARM_MPU_AP_URO 2U ///!< MPU Access Permission unprivileged access read-only +#define ARM_MPU_AP_FULL 3U ///!< MPU Access Permission full access +#define ARM_MPU_AP_PRO 5U ///!< MPU Access Permission privileged access read-only +#define ARM_MPU_AP_RO 6U ///!< MPU Access Permission read-only access + +/** MPU Region Base Address Register Value +* +* \param Region The region to be configured, number 0 to 15. +* \param BaseAddress The base address for the region. +*/ +#define ARM_MPU_RBAR(Region, BaseAddress) \ + (((BaseAddress) & MPU_RBAR_ADDR_Msk) | \ + ((Region) & MPU_RBAR_REGION_Msk) | \ + (MPU_RBAR_VALID_Msk)) + +/** +* MPU Memory Access Attributes +* +* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. +* \param IsShareable Region is shareable between multiple bus masters. +* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. +* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. +*/ +#define ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable) \ + ((((TypeExtField ) << MPU_RASR_TEX_Pos) & MPU_RASR_TEX_Msk) | \ + (((IsShareable ) << MPU_RASR_S_Pos) & MPU_RASR_S_Msk) | \ + (((IsCacheable ) << MPU_RASR_C_Pos) & MPU_RASR_C_Msk) | \ + (((IsBufferable ) << MPU_RASR_B_Pos) & MPU_RASR_B_Msk)) + +/** +* MPU Region Attribute and Size Register Value +* +* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. +* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. +* \param AccessAttributes Memory access attribution, see \ref ARM_MPU_ACCESS_. +* \param SubRegionDisable Sub-region disable field. +* \param Size Region size of the region to be configured, for example 4K, 8K. +*/ +#define ARM_MPU_RASR_EX(DisableExec, AccessPermission, AccessAttributes, SubRegionDisable, Size) \ + ((((DisableExec ) << MPU_RASR_XN_Pos) & MPU_RASR_XN_Msk) | \ + (((AccessPermission) << MPU_RASR_AP_Pos) & MPU_RASR_AP_Msk) | \ + (((AccessAttributes) ) & (MPU_RASR_TEX_Msk | MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk))) + +/** +* MPU Region Attribute and Size Register Value +* +* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. +* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. +* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. +* \param IsShareable Region is shareable between multiple bus masters. +* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. +* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. +* \param SubRegionDisable Sub-region disable field. +* \param Size Region size of the region to be configured, for example 4K, 8K. +*/ +#define ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable, SubRegionDisable, Size) \ + ARM_MPU_RASR_EX(DisableExec, AccessPermission, ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable), SubRegionDisable, Size) + +/** +* MPU Memory Access Attribute for strongly ordered memory. +* - TEX: 000b +* - Shareable +* - Non-cacheable +* - Non-bufferable +*/ +#define ARM_MPU_ACCESS_ORDERED ARM_MPU_ACCESS_(0U, 1U, 0U, 0U) + +/** +* MPU Memory Access Attribute for device memory. +* - TEX: 000b (if non-shareable) or 010b (if shareable) +* - Shareable or non-shareable +* - Non-cacheable +* - Bufferable (if shareable) or non-bufferable (if non-shareable) +* +* \param IsShareable Configures the device memory as shareable or non-shareable. +*/ +#define ARM_MPU_ACCESS_DEVICE(IsShareable) ((IsShareable) ? ARM_MPU_ACCESS_(0U, 1U, 0U, 1U) : ARM_MPU_ACCESS_(2U, 0U, 0U, 0U)) + +/** +* MPU Memory Access Attribute for normal memory. +* - TEX: 1BBb (reflecting outer cacheability rules) +* - Shareable or non-shareable +* - Cacheable or non-cacheable (reflecting inner cacheability rules) +* - Bufferable or non-bufferable (reflecting inner cacheability rules) +* +* \param OuterCp Configures the outer cache policy. +* \param InnerCp Configures the inner cache policy. +* \param IsShareable Configures the memory as shareable or non-shareable. +*/ +#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) & 2U), ((InnerCp) & 1U)) + +/** +* MPU Memory Access Attribute non-cacheable policy. +*/ +#define ARM_MPU_CACHEP_NOCACHE 0U + +/** +* MPU Memory Access Attribute write-back, write and read allocate policy. +*/ +#define ARM_MPU_CACHEP_WB_WRA 1U + +/** +* MPU Memory Access Attribute write-through, no write allocate policy. +*/ +#define ARM_MPU_CACHEP_WT_NWA 2U + +/** +* MPU Memory Access Attribute write-back, no write allocate policy. +*/ +#define ARM_MPU_CACHEP_WB_NWA 3U + + +/** +* Struct for a single MPU Region +*/ +typedef struct { + uint32_t RBAR; //!< The region base address register value (RBAR) + uint32_t RASR; //!< The region attribute and size register value (RASR) \ref MPU_RASR +} ARM_MPU_Region_t; + +/** Enable the MPU. +* \param MPU_Control Default access permissions for unconfigured regions. +*/ +__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control) +{ + __DSB(); + __ISB(); + MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; +#endif +} + +/** Disable the MPU. +*/ +__STATIC_INLINE void ARM_MPU_Disable(void) +{ + __DSB(); + __ISB(); +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; +#endif + MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk; +} + +/** Clear and disable the given MPU region. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr) +{ + MPU->RNR = rnr; + MPU->RASR = 0U; +} + +/** Configure an MPU region. +* \param rbar Value for RBAR register. +* \param rsar Value for RSAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr) +{ + MPU->RBAR = rbar; + MPU->RASR = rasr; +} + +/** Configure the given MPU region. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rsar Value for RSAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr) +{ + MPU->RNR = rnr; + MPU->RBAR = rbar; + MPU->RASR = rasr; +} + +/** Memcopy with strictly ordered memory access, e.g. for register targets. +* \param dst Destination data is copied to. +* \param src Source data is copied from. +* \param len Amount of data words to be copied. +*/ +__STATIC_INLINE void orderedCpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len) +{ + uint32_t i; + for (i = 0U; i < len; ++i) + { + dst[i] = src[i]; + } +} + +/** Load the given number of MPU regions from a table. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_Load(ARM_MPU_Region_t const* table, uint32_t cnt) +{ + const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U; + while (cnt > MPU_TYPE_RALIASES) { + orderedCpy(&(MPU->RBAR), &(table->RBAR), MPU_TYPE_RALIASES*rowWordSize); + table += MPU_TYPE_RALIASES; + cnt -= MPU_TYPE_RALIASES; + } + orderedCpy(&(MPU->RBAR), &(table->RBAR), cnt*rowWordSize); +} + +#endif diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv8.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv8.h index 62571da..99ee9f9 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv8.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/mpu_armv8.h @@ -1,333 +1,333 @@ -/****************************************************************************** - * @file mpu_armv8.h - * @brief CMSIS MPU API for Armv8-M MPU - * @version V5.0.4 - * @date 10. January 2018 - ******************************************************************************/ -/* - * Copyright (c) 2017-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef ARM_MPU_ARMV8_H -#define ARM_MPU_ARMV8_H - -/** \brief Attribute for device memory (outer only) */ -#define ARM_MPU_ATTR_DEVICE ( 0U ) - -/** \brief Attribute for non-cacheable, normal memory */ -#define ARM_MPU_ATTR_NON_CACHEABLE ( 4U ) - -/** \brief Attribute for normal memory (outer and inner) -* \param NT Non-Transient: Set to 1 for non-transient data. -* \param WB Write-Back: Set to 1 to use write-back update policy. -* \param RA Read Allocation: Set to 1 to use cache allocation on read miss. -* \param WA Write Allocation: Set to 1 to use cache allocation on write miss. -*/ -#define ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) \ - (((NT & 1U) << 3U) | ((WB & 1U) << 2U) | ((RA & 1U) << 1U) | (WA & 1U)) - -/** \brief Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement */ -#define ARM_MPU_ATTR_DEVICE_nGnRnE (0U) - -/** \brief Device memory type non Gathering, non Re-ordering, Early Write Acknowledgement */ -#define ARM_MPU_ATTR_DEVICE_nGnRE (1U) - -/** \brief Device memory type non Gathering, Re-ordering, Early Write Acknowledgement */ -#define ARM_MPU_ATTR_DEVICE_nGRE (2U) - -/** \brief Device memory type Gathering, Re-ordering, Early Write Acknowledgement */ -#define ARM_MPU_ATTR_DEVICE_GRE (3U) - -/** \brief Memory Attribute -* \param O Outer memory attributes -* \param I O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes -*/ -#define ARM_MPU_ATTR(O, I) (((O & 0xFU) << 4U) | (((O & 0xFU) != 0U) ? (I & 0xFU) : ((I & 0x3U) << 2U))) - -/** \brief Normal memory non-shareable */ -#define ARM_MPU_SH_NON (0U) - -/** \brief Normal memory outer shareable */ -#define ARM_MPU_SH_OUTER (2U) - -/** \brief Normal memory inner shareable */ -#define ARM_MPU_SH_INNER (3U) - -/** \brief Memory access permissions -* \param RO Read-Only: Set to 1 for read-only memory. -* \param NP Non-Privileged: Set to 1 for non-privileged memory. -*/ -#define ARM_MPU_AP_(RO, NP) (((RO & 1U) << 1U) | (NP & 1U)) - -/** \brief Region Base Address Register value -* \param BASE The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned. -* \param SH Defines the Shareability domain for this memory region. -* \param RO Read-Only: Set to 1 for a read-only memory region. -* \param NP Non-Privileged: Set to 1 for a non-privileged memory region. -* \oaram XN eXecute Never: Set to 1 for a non-executable memory region. -*/ -#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \ - ((BASE & MPU_RBAR_BASE_Msk) | \ - ((SH << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | \ - ((ARM_MPU_AP_(RO, NP) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | \ - ((XN << MPU_RBAR_XN_Pos) & MPU_RBAR_XN_Msk)) - -/** \brief Region Limit Address Register value -* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended. -* \param IDX The attribute index to be associated with this memory region. -*/ -#define ARM_MPU_RLAR(LIMIT, IDX) \ - ((LIMIT & MPU_RLAR_LIMIT_Msk) | \ - ((IDX << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \ - (MPU_RLAR_EN_Msk)) - -/** -* Struct for a single MPU Region -*/ -typedef struct { - uint32_t RBAR; /*!< Region Base Address Register value */ - uint32_t RLAR; /*!< Region Limit Address Register value */ -} ARM_MPU_Region_t; - -/** Enable the MPU. -* \param MPU_Control Default access permissions for unconfigured regions. -*/ -__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control) -{ - __DSB(); - __ISB(); - MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; -#ifdef SCB_SHCSR_MEMFAULTENA_Msk - SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; -#endif -} - -/** Disable the MPU. -*/ -__STATIC_INLINE void ARM_MPU_Disable(void) -{ - __DSB(); - __ISB(); -#ifdef SCB_SHCSR_MEMFAULTENA_Msk - SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; -#endif - MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk; -} - -#ifdef MPU_NS -/** Enable the Non-secure MPU. -* \param MPU_Control Default access permissions for unconfigured regions. -*/ -__STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control) -{ - __DSB(); - __ISB(); - MPU_NS->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; -#ifdef SCB_SHCSR_MEMFAULTENA_Msk - SCB_NS->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; -#endif -} - -/** Disable the Non-secure MPU. -*/ -__STATIC_INLINE void ARM_MPU_Disable_NS(void) -{ - __DSB(); - __ISB(); -#ifdef SCB_SHCSR_MEMFAULTENA_Msk - SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; -#endif - MPU_NS->CTRL &= ~MPU_CTRL_ENABLE_Msk; -} -#endif - -/** Set the memory attribute encoding to the given MPU. -* \param mpu Pointer to the MPU to be configured. -* \param idx The attribute index to be set [0-7] -* \param attr The attribute value to be set. -*/ -__STATIC_INLINE void ARM_MPU_SetMemAttrEx(MPU_Type* mpu, uint8_t idx, uint8_t attr) -{ - const uint8_t reg = idx / 4U; - const uint32_t pos = ((idx % 4U) * 8U); - const uint32_t mask = 0xFFU << pos; - - if (reg >= (sizeof(mpu->MAIR) / sizeof(mpu->MAIR[0]))) { - return; // invalid index - } - - mpu->MAIR[reg] = ((mpu->MAIR[reg] & ~mask) | ((attr << pos) & mask)); -} - -/** Set the memory attribute encoding. -* \param idx The attribute index to be set [0-7] -* \param attr The attribute value to be set. -*/ -__STATIC_INLINE void ARM_MPU_SetMemAttr(uint8_t idx, uint8_t attr) -{ - ARM_MPU_SetMemAttrEx(MPU, idx, attr); -} - -#ifdef MPU_NS -/** Set the memory attribute encoding to the Non-secure MPU. -* \param idx The attribute index to be set [0-7] -* \param attr The attribute value to be set. -*/ -__STATIC_INLINE void ARM_MPU_SetMemAttr_NS(uint8_t idx, uint8_t attr) -{ - ARM_MPU_SetMemAttrEx(MPU_NS, idx, attr); -} -#endif - -/** Clear and disable the given MPU region of the given MPU. -* \param mpu Pointer to MPU to be used. -* \param rnr Region number to be cleared. -*/ -__STATIC_INLINE void ARM_MPU_ClrRegionEx(MPU_Type* mpu, uint32_t rnr) -{ - mpu->RNR = rnr; - mpu->RLAR = 0U; -} - -/** Clear and disable the given MPU region. -* \param rnr Region number to be cleared. -*/ -__STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr) -{ - ARM_MPU_ClrRegionEx(MPU, rnr); -} - -#ifdef MPU_NS -/** Clear and disable the given Non-secure MPU region. -* \param rnr Region number to be cleared. -*/ -__STATIC_INLINE void ARM_MPU_ClrRegion_NS(uint32_t rnr) -{ - ARM_MPU_ClrRegionEx(MPU_NS, rnr); -} -#endif - -/** Configure the given MPU region of the given MPU. -* \param mpu Pointer to MPU to be used. -* \param rnr Region number to be configured. -* \param rbar Value for RBAR register. -* \param rlar Value for RLAR register. -*/ -__STATIC_INLINE void ARM_MPU_SetRegionEx(MPU_Type* mpu, uint32_t rnr, uint32_t rbar, uint32_t rlar) -{ - mpu->RNR = rnr; - mpu->RBAR = rbar; - mpu->RLAR = rlar; -} - -/** Configure the given MPU region. -* \param rnr Region number to be configured. -* \param rbar Value for RBAR register. -* \param rlar Value for RLAR register. -*/ -__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rnr, uint32_t rbar, uint32_t rlar) -{ - ARM_MPU_SetRegionEx(MPU, rnr, rbar, rlar); -} - -#ifdef MPU_NS -/** Configure the given Non-secure MPU region. -* \param rnr Region number to be configured. -* \param rbar Value for RBAR register. -* \param rlar Value for RLAR register. -*/ -__STATIC_INLINE void ARM_MPU_SetRegion_NS(uint32_t rnr, uint32_t rbar, uint32_t rlar) -{ - ARM_MPU_SetRegionEx(MPU_NS, rnr, rbar, rlar); -} -#endif - -/** Memcopy with strictly ordered memory access, e.g. for register targets. -* \param dst Destination data is copied to. -* \param src Source data is copied from. -* \param len Amount of data words to be copied. -*/ -__STATIC_INLINE void orderedCpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len) -{ - uint32_t i; - for (i = 0U; i < len; ++i) - { - dst[i] = src[i]; - } -} - -/** Load the given number of MPU regions from a table to the given MPU. -* \param mpu Pointer to the MPU registers to be used. -* \param rnr First region number to be configured. -* \param table Pointer to the MPU configuration table. -* \param cnt Amount of regions to be configured. -*/ -__STATIC_INLINE void ARM_MPU_LoadEx(MPU_Type* mpu, uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) -{ - const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U; - if (cnt == 1U) { - mpu->RNR = rnr; - orderedCpy(&(mpu->RBAR), &(table->RBAR), rowWordSize); - } else { - uint32_t rnrBase = rnr & ~(MPU_TYPE_RALIASES-1U); - uint32_t rnrOffset = rnr % MPU_TYPE_RALIASES; - - mpu->RNR = rnrBase; - while ((rnrOffset + cnt) > MPU_TYPE_RALIASES) { - uint32_t c = MPU_TYPE_RALIASES - rnrOffset; - orderedCpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), c*rowWordSize); - table += c; - cnt -= c; - rnrOffset = 0U; - rnrBase += MPU_TYPE_RALIASES; - mpu->RNR = rnrBase; - } - - orderedCpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), cnt*rowWordSize); - } -} - -/** Load the given number of MPU regions from a table. -* \param rnr First region number to be configured. -* \param table Pointer to the MPU configuration table. -* \param cnt Amount of regions to be configured. -*/ -__STATIC_INLINE void ARM_MPU_Load(uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) -{ - ARM_MPU_LoadEx(MPU, rnr, table, cnt); -} - -#ifdef MPU_NS -/** Load the given number of MPU regions from a table to the Non-secure MPU. -* \param rnr First region number to be configured. -* \param table Pointer to the MPU configuration table. -* \param cnt Amount of regions to be configured. -*/ -__STATIC_INLINE void ARM_MPU_Load_NS(uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) -{ - ARM_MPU_LoadEx(MPU_NS, rnr, table, cnt); -} -#endif - -#endif - +/****************************************************************************** + * @file mpu_armv8.h + * @brief CMSIS MPU API for Armv8-M MPU + * @version V5.0.4 + * @date 10. January 2018 + ******************************************************************************/ +/* + * Copyright (c) 2017-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef ARM_MPU_ARMV8_H +#define ARM_MPU_ARMV8_H + +/** \brief Attribute for device memory (outer only) */ +#define ARM_MPU_ATTR_DEVICE ( 0U ) + +/** \brief Attribute for non-cacheable, normal memory */ +#define ARM_MPU_ATTR_NON_CACHEABLE ( 4U ) + +/** \brief Attribute for normal memory (outer and inner) +* \param NT Non-Transient: Set to 1 for non-transient data. +* \param WB Write-Back: Set to 1 to use write-back update policy. +* \param RA Read Allocation: Set to 1 to use cache allocation on read miss. +* \param WA Write Allocation: Set to 1 to use cache allocation on write miss. +*/ +#define ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) \ + (((NT & 1U) << 3U) | ((WB & 1U) << 2U) | ((RA & 1U) << 1U) | (WA & 1U)) + +/** \brief Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_nGnRnE (0U) + +/** \brief Device memory type non Gathering, non Re-ordering, Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_nGnRE (1U) + +/** \brief Device memory type non Gathering, Re-ordering, Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_nGRE (2U) + +/** \brief Device memory type Gathering, Re-ordering, Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_GRE (3U) + +/** \brief Memory Attribute +* \param O Outer memory attributes +* \param I O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes +*/ +#define ARM_MPU_ATTR(O, I) (((O & 0xFU) << 4U) | (((O & 0xFU) != 0U) ? (I & 0xFU) : ((I & 0x3U) << 2U))) + +/** \brief Normal memory non-shareable */ +#define ARM_MPU_SH_NON (0U) + +/** \brief Normal memory outer shareable */ +#define ARM_MPU_SH_OUTER (2U) + +/** \brief Normal memory inner shareable */ +#define ARM_MPU_SH_INNER (3U) + +/** \brief Memory access permissions +* \param RO Read-Only: Set to 1 for read-only memory. +* \param NP Non-Privileged: Set to 1 for non-privileged memory. +*/ +#define ARM_MPU_AP_(RO, NP) (((RO & 1U) << 1U) | (NP & 1U)) + +/** \brief Region Base Address Register value +* \param BASE The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned. +* \param SH Defines the Shareability domain for this memory region. +* \param RO Read-Only: Set to 1 for a read-only memory region. +* \param NP Non-Privileged: Set to 1 for a non-privileged memory region. +* \oaram XN eXecute Never: Set to 1 for a non-executable memory region. +*/ +#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \ + ((BASE & MPU_RBAR_BASE_Msk) | \ + ((SH << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | \ + ((ARM_MPU_AP_(RO, NP) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | \ + ((XN << MPU_RBAR_XN_Pos) & MPU_RBAR_XN_Msk)) + +/** \brief Region Limit Address Register value +* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended. +* \param IDX The attribute index to be associated with this memory region. +*/ +#define ARM_MPU_RLAR(LIMIT, IDX) \ + ((LIMIT & MPU_RLAR_LIMIT_Msk) | \ + ((IDX << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \ + (MPU_RLAR_EN_Msk)) + +/** +* Struct for a single MPU Region +*/ +typedef struct { + uint32_t RBAR; /*!< Region Base Address Register value */ + uint32_t RLAR; /*!< Region Limit Address Register value */ +} ARM_MPU_Region_t; + +/** Enable the MPU. +* \param MPU_Control Default access permissions for unconfigured regions. +*/ +__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control) +{ + __DSB(); + __ISB(); + MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; +#endif +} + +/** Disable the MPU. +*/ +__STATIC_INLINE void ARM_MPU_Disable(void) +{ + __DSB(); + __ISB(); +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; +#endif + MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk; +} + +#ifdef MPU_NS +/** Enable the Non-secure MPU. +* \param MPU_Control Default access permissions for unconfigured regions. +*/ +__STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control) +{ + __DSB(); + __ISB(); + MPU_NS->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB_NS->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; +#endif +} + +/** Disable the Non-secure MPU. +*/ +__STATIC_INLINE void ARM_MPU_Disable_NS(void) +{ + __DSB(); + __ISB(); +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; +#endif + MPU_NS->CTRL &= ~MPU_CTRL_ENABLE_Msk; +} +#endif + +/** Set the memory attribute encoding to the given MPU. +* \param mpu Pointer to the MPU to be configured. +* \param idx The attribute index to be set [0-7] +* \param attr The attribute value to be set. +*/ +__STATIC_INLINE void ARM_MPU_SetMemAttrEx(MPU_Type* mpu, uint8_t idx, uint8_t attr) +{ + const uint8_t reg = idx / 4U; + const uint32_t pos = ((idx % 4U) * 8U); + const uint32_t mask = 0xFFU << pos; + + if (reg >= (sizeof(mpu->MAIR) / sizeof(mpu->MAIR[0]))) { + return; // invalid index + } + + mpu->MAIR[reg] = ((mpu->MAIR[reg] & ~mask) | ((attr << pos) & mask)); +} + +/** Set the memory attribute encoding. +* \param idx The attribute index to be set [0-7] +* \param attr The attribute value to be set. +*/ +__STATIC_INLINE void ARM_MPU_SetMemAttr(uint8_t idx, uint8_t attr) +{ + ARM_MPU_SetMemAttrEx(MPU, idx, attr); +} + +#ifdef MPU_NS +/** Set the memory attribute encoding to the Non-secure MPU. +* \param idx The attribute index to be set [0-7] +* \param attr The attribute value to be set. +*/ +__STATIC_INLINE void ARM_MPU_SetMemAttr_NS(uint8_t idx, uint8_t attr) +{ + ARM_MPU_SetMemAttrEx(MPU_NS, idx, attr); +} +#endif + +/** Clear and disable the given MPU region of the given MPU. +* \param mpu Pointer to MPU to be used. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegionEx(MPU_Type* mpu, uint32_t rnr) +{ + mpu->RNR = rnr; + mpu->RLAR = 0U; +} + +/** Clear and disable the given MPU region. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr) +{ + ARM_MPU_ClrRegionEx(MPU, rnr); +} + +#ifdef MPU_NS +/** Clear and disable the given Non-secure MPU region. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegion_NS(uint32_t rnr) +{ + ARM_MPU_ClrRegionEx(MPU_NS, rnr); +} +#endif + +/** Configure the given MPU region of the given MPU. +* \param mpu Pointer to MPU to be used. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rlar Value for RLAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegionEx(MPU_Type* mpu, uint32_t rnr, uint32_t rbar, uint32_t rlar) +{ + mpu->RNR = rnr; + mpu->RBAR = rbar; + mpu->RLAR = rlar; +} + +/** Configure the given MPU region. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rlar Value for RLAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rnr, uint32_t rbar, uint32_t rlar) +{ + ARM_MPU_SetRegionEx(MPU, rnr, rbar, rlar); +} + +#ifdef MPU_NS +/** Configure the given Non-secure MPU region. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rlar Value for RLAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegion_NS(uint32_t rnr, uint32_t rbar, uint32_t rlar) +{ + ARM_MPU_SetRegionEx(MPU_NS, rnr, rbar, rlar); +} +#endif + +/** Memcopy with strictly ordered memory access, e.g. for register targets. +* \param dst Destination data is copied to. +* \param src Source data is copied from. +* \param len Amount of data words to be copied. +*/ +__STATIC_INLINE void orderedCpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len) +{ + uint32_t i; + for (i = 0U; i < len; ++i) + { + dst[i] = src[i]; + } +} + +/** Load the given number of MPU regions from a table to the given MPU. +* \param mpu Pointer to the MPU registers to be used. +* \param rnr First region number to be configured. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_LoadEx(MPU_Type* mpu, uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) +{ + const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U; + if (cnt == 1U) { + mpu->RNR = rnr; + orderedCpy(&(mpu->RBAR), &(table->RBAR), rowWordSize); + } else { + uint32_t rnrBase = rnr & ~(MPU_TYPE_RALIASES-1U); + uint32_t rnrOffset = rnr % MPU_TYPE_RALIASES; + + mpu->RNR = rnrBase; + while ((rnrOffset + cnt) > MPU_TYPE_RALIASES) { + uint32_t c = MPU_TYPE_RALIASES - rnrOffset; + orderedCpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), c*rowWordSize); + table += c; + cnt -= c; + rnrOffset = 0U; + rnrBase += MPU_TYPE_RALIASES; + mpu->RNR = rnrBase; + } + + orderedCpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), cnt*rowWordSize); + } +} + +/** Load the given number of MPU regions from a table. +* \param rnr First region number to be configured. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_Load(uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) +{ + ARM_MPU_LoadEx(MPU, rnr, table, cnt); +} + +#ifdef MPU_NS +/** Load the given number of MPU regions from a table to the Non-secure MPU. +* \param rnr First region number to be configured. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_Load_NS(uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) +{ + ARM_MPU_LoadEx(MPU_NS, rnr, table, cnt); +} +#endif + +#endif + diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/tz_context.h b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/tz_context.h index 0d09749..d4c1474 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/Include/tz_context.h +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/Include/tz_context.h @@ -1,70 +1,70 @@ -/****************************************************************************** - * @file tz_context.h - * @brief Context Management for Armv8-M TrustZone - * @version V1.0.1 - * @date 10. January 2018 - ******************************************************************************/ -/* - * Copyright (c) 2017-2018 Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the License); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if defined ( __ICCARM__ ) - #pragma system_include /* treat file as system include file for MISRA check */ -#elif defined (__clang__) - #pragma clang system_header /* treat file as system include file */ -#endif - -#ifndef TZ_CONTEXT_H -#define TZ_CONTEXT_H - -#include - -#ifndef TZ_MODULEID_T -#define TZ_MODULEID_T -/// \details Data type that identifies secure software modules called by a process. -typedef uint32_t TZ_ModuleId_t; -#endif - -/// \details TZ Memory ID identifies an allocated memory slot. -typedef uint32_t TZ_MemoryId_t; - -/// Initialize secure context memory system -/// \return execution status (1: success, 0: error) -uint32_t TZ_InitContextSystem_S (void); - -/// Allocate context memory for calling secure software modules in TrustZone -/// \param[in] module identifies software modules called from non-secure mode -/// \return value != 0 id TrustZone memory slot identifier -/// \return value 0 no memory available or internal error -TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); - -/// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S -/// \param[in] id TrustZone memory slot identifier -/// \return execution status (1: success, 0: error) -uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); - -/// Load secure context (called on RTOS thread context switch) -/// \param[in] id TrustZone memory slot identifier -/// \return execution status (1: success, 0: error) -uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); - -/// Store secure context (called on RTOS thread context switch) -/// \param[in] id TrustZone memory slot identifier -/// \return execution status (1: success, 0: error) -uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); - -#endif // TZ_CONTEXT_H +/****************************************************************************** + * @file tz_context.h + * @brief Context Management for Armv8-M TrustZone + * @version V1.0.1 + * @date 10. January 2018 + ******************************************************************************/ +/* + * Copyright (c) 2017-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef TZ_CONTEXT_H +#define TZ_CONTEXT_H + +#include + +#ifndef TZ_MODULEID_T +#define TZ_MODULEID_T +/// \details Data type that identifies secure software modules called by a process. +typedef uint32_t TZ_ModuleId_t; +#endif + +/// \details TZ Memory ID identifies an allocated memory slot. +typedef uint32_t TZ_MemoryId_t; + +/// Initialize secure context memory system +/// \return execution status (1: success, 0: error) +uint32_t TZ_InitContextSystem_S (void); + +/// Allocate context memory for calling secure software modules in TrustZone +/// \param[in] module identifies software modules called from non-secure mode +/// \return value != 0 id TrustZone memory slot identifier +/// \return value 0 no memory available or internal error +TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); + +/// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S +/// \param[in] id TrustZone memory slot identifier +/// \return execution status (1: success, 0: error) +uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); + +/// Load secure context (called on RTOS thread context switch) +/// \param[in] id TrustZone memory slot identifier +/// \return execution status (1: success, 0: error) +uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); + +/// Store secure context (called on RTOS thread context switch) +/// \param[in] id TrustZone memory slot identifier +/// \return execution status (1: success, 0: error) +uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); + +#endif // TZ_CONTEXT_H diff --git a/STM32_Nucleo207ZG/Drivers/CMSIS/LICENSE.txt b/STM32_Nucleo207ZG/Drivers/CMSIS/LICENSE.txt index 8dada3e..c0ee812 100644 --- a/STM32_Nucleo207ZG/Drivers/CMSIS/LICENSE.txt +++ b/STM32_Nucleo207ZG/Drivers/CMSIS/LICENSE.txt @@ -1,201 +1,201 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/STM32_Nucleo207ZG/LWIP/App/lwip.c b/STM32_Nucleo207ZG/LWIP/App/lwip.c index 8ce6418..87c922a 100644 --- a/STM32_Nucleo207ZG/LWIP/App/lwip.c +++ b/STM32_Nucleo207ZG/LWIP/App/lwip.c @@ -1,202 +1,210 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * File Name : LWIP.c - * Description : This file provides initialization code for LWIP - * middleWare. - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "lwip.h" -#include "lwip/init.h" -#include "lwip/netif.h" -#if defined ( __CC_ARM ) /* MDK ARM Compiler */ -#include "lwip/sio.h" -#endif /* MDK ARM Compiler */ -#include "ethernetif.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/* Private function prototypes -----------------------------------------------*/ -/* ETH Variables initialization ----------------------------------------------*/ -void Error_Handler(void); - -/* DHCP Variables initialization ---------------------------------------------*/ -uint32_t DHCPfineTimer = 0; -uint32_t DHCPcoarseTimer = 0; -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/* Variables Initialization */ -struct netif gnetif; -ip4_addr_t ipaddr; -ip4_addr_t netmask; -ip4_addr_t gw; - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/** - * LwIP initialization function - */ -void MX_LWIP_Init(void) -{ - /* Initilialize the LwIP stack without RTOS */ - lwip_init(); - - /* IP addresses initialization with DHCP (IPv4) */ - ipaddr.addr = 0; - netmask.addr = 0; - gw.addr = 0; - - /* add the network interface (IPv4/IPv6) without RTOS */ - netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, ðernet_input); - - /* Registers the default network interface */ - netif_set_default(&gnetif); - - if (netif_is_link_up(&gnetif)) - { - /* When the netif is fully configured this function must be called */ - netif_set_up(&gnetif); - } - else - { - /* When the netif link is down this function must be called */ - netif_set_down(&gnetif); - } - - /* Set the link callback function, this function is called on change of link status*/ - netif_set_link_callback(&gnetif, ethernetif_update_config); - - /* Create the Ethernet link handler thread */ - - /* Start DHCP negotiation for a network interface (IPv4) */ - dhcp_start(&gnetif); - -/* USER CODE BEGIN 3 */ - -/* USER CODE END 3 */ -} - -#ifdef USE_OBSOLETE_USER_CODE_SECTION_4 -/* Kept to help code migration. (See new 4_1, 4_2... sections) */ -/* Avoid to use this user section which will become obsolete. */ -/* USER CODE BEGIN 4 */ -/* USER CODE END 4 */ -#endif - -/** - * ---------------------------------------------------------------------- - * Function given to help user to continue LwIP Initialization - * Up to user to complete or change this function ... - * Up to user to call this function in main.c in while (1) of main(void) - *----------------------------------------------------------------------- - * Read a received packet from the Ethernet buffers - * Send it to the lwIP stack for handling - * Handle timeouts if LWIP_TIMERS is set and without RTOS - * Handle the llink status if LWIP_NETIF_LINK_CALLBACK is set and without RTOS - */ -void MX_LWIP_Process(void) -{ -/* USER CODE BEGIN 4_1 */ -/* USER CODE END 4_1 */ - ethernetif_input(&gnetif); - -/* USER CODE BEGIN 4_2 */ -/* USER CODE END 4_2 */ - /* Handle timeouts */ - sys_check_timeouts(); - -/* USER CODE BEGIN 4_3 */ -/* USER CODE END 4_3 */ -} - -#if defined ( __CC_ARM ) /* MDK ARM Compiler */ -/** - * Opens a serial device for communication. - * - * @param devnum device number - * @return handle to serial device if successful, NULL otherwise - */ -sio_fd_t sio_open(u8_t devnum) -{ - sio_fd_t sd; - -/* USER CODE BEGIN 7 */ - sd = 0; // dummy code -/* USER CODE END 7 */ - - return sd; -} - -/** - * Sends a single character to the serial device. - * - * @param c character to send - * @param fd serial device handle - * - * @note This function will block until the character can be sent. - */ -void sio_send(u8_t c, sio_fd_t fd) -{ -/* USER CODE BEGIN 8 */ -/* USER CODE END 8 */ -} - -/** - * Reads from the serial device. - * - * @param fd serial device handle - * @param data pointer to data buffer for receiving - * @param len maximum length (in bytes) of data to receive - * @return number of bytes actually received - may be 0 if aborted by sio_read_abort - * - * @note This function will block until data can be received. The blocking - * can be cancelled by calling sio_read_abort(). - */ -u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len) -{ - u32_t recved_bytes; - -/* USER CODE BEGIN 9 */ - recved_bytes = 0; // dummy code -/* USER CODE END 9 */ - return recved_bytes; -} - -/** - * Tries to read from the serial device. Same as sio_read but returns - * immediately if no data is available and never blocks. - * - * @param fd serial device handle - * @param data pointer to data buffer for receiving - * @param len maximum length (in bytes) of data to receive - * @return number of bytes actually received - */ -u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len) -{ - u32_t recved_bytes; - -/* USER CODE BEGIN 10 */ - recved_bytes = 0; // dummy code -/* USER CODE END 10 */ - return recved_bytes; -} -#endif /* MDK ARM Compiler */ - +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : LWIP.c + * Description : This file provides initialization code for LWIP + * middleWare. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "lwip.h" +#include "lwip/init.h" +#include "lwip/netif.h" +#if defined ( __CC_ARM ) /* MDK ARM Compiler */ +#include "lwip/sio.h" +#endif /* MDK ARM Compiler */ +#include "ethernetif.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ +/* Private function prototypes -----------------------------------------------*/ +/* ETH Variables initialization ----------------------------------------------*/ +void Error_Handler(void); + +/* DHCP Variables initialization ---------------------------------------------*/ +uint32_t DHCPfineTimer = 0; +uint32_t DHCPcoarseTimer = 0; +/* USER CODE BEGIN 1 */ +eLwipStatus LwipConnectionStatus_T; +/* USER CODE END 1 */ + +/* Variables Initialization */ +struct netif gnetif; +ip4_addr_t ipaddr; +ip4_addr_t netmask; +ip4_addr_t gw; + +/* USER CODE BEGIN 2 */ + +/* USER CODE END 2 */ + +/** + * LwIP initialization function + */ +void MX_LWIP_Init(void) +{ + /* Initilialize the LwIP stack without RTOS */ + lwip_init(); + + /* IP addresses initialization with DHCP (IPv4) */ + ipaddr.addr = 0; + netmask.addr = 0; + gw.addr = 0; + + /* add the network interface (IPv4/IPv6) without RTOS */ + netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, ðernet_input); + + /* Registers the default network interface */ + netif_set_default(&gnetif); + + if (netif_is_link_up(&gnetif)) + { + /* When the netif is fully configured this function must be called */ + netif_set_up(&gnetif); + } + else + { + /* When the netif link is down this function must be called */ + netif_set_down(&gnetif); + } + + /* Set the link callback function, this function is called on change of link status*/ + netif_set_link_callback(&gnetif, ethernetif_update_config); + + /* Create the Ethernet link handler thread */ + + /* Start DHCP negotiation for a network interface (IPv4) */ + dhcp_start(&gnetif); + +/* USER CODE BEGIN 3 */ + +/* USER CODE END 3 */ +} + +#ifdef USE_OBSOLETE_USER_CODE_SECTION_4 +/* Kept to help code migration. (See new 4_1, 4_2... sections) */ +/* Avoid to use this user section which will become obsolete. */ +/* USER CODE BEGIN 4 */ +/* USER CODE END 4 */ +#endif + +/** + * ---------------------------------------------------------------------- + * Function given to help user to continue LwIP Initialization + * Up to user to complete or change this function ... + * Up to user to call this function in main.c in while (1) of main(void) + *----------------------------------------------------------------------- + * Read a received packet from the Ethernet buffers + * Send it to the lwIP stack for handling + * Handle timeouts if LWIP_TIMERS is set and without RTOS + * Handle the llink status if LWIP_NETIF_LINK_CALLBACK is set and without RTOS + */ +void MX_LWIP_Process(void) +{ +/* USER CODE BEGIN 4_1 */ + if (gnetif.ip_addr.addr != 0U) + { + LwipConnectionStatus_T = LWIP_CONNECTED; + } + else + { + LwipConnectionStatus_T = LWIP_UNCONNECTED; + } +/* USER CODE END 4_1 */ + ethernetif_input(&gnetif); + +/* USER CODE BEGIN 4_2 */ +/* USER CODE END 4_2 */ + /* Handle timeouts */ + sys_check_timeouts(); + +/* USER CODE BEGIN 4_3 */ +/* USER CODE END 4_3 */ +} + +#if defined ( __CC_ARM ) /* MDK ARM Compiler */ +/** + * Opens a serial device for communication. + * + * @param devnum device number + * @return handle to serial device if successful, NULL otherwise + */ +sio_fd_t sio_open(u8_t devnum) +{ + sio_fd_t sd; + +/* USER CODE BEGIN 7 */ + sd = 0; // dummy code +/* USER CODE END 7 */ + + return sd; +} + +/** + * Sends a single character to the serial device. + * + * @param c character to send + * @param fd serial device handle + * + * @note This function will block until the character can be sent. + */ +void sio_send(u8_t c, sio_fd_t fd) +{ +/* USER CODE BEGIN 8 */ +/* USER CODE END 8 */ +} + +/** + * Reads from the serial device. + * + * @param fd serial device handle + * @param data pointer to data buffer for receiving + * @param len maximum length (in bytes) of data to receive + * @return number of bytes actually received - may be 0 if aborted by sio_read_abort + * + * @note This function will block until data can be received. The blocking + * can be cancelled by calling sio_read_abort(). + */ +u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len) +{ + u32_t recved_bytes; + +/* USER CODE BEGIN 9 */ + recved_bytes = 0; // dummy code +/* USER CODE END 9 */ + return recved_bytes; +} + +/** + * Tries to read from the serial device. Same as sio_read but returns + * immediately if no data is available and never blocks. + * + * @param fd serial device handle + * @param data pointer to data buffer for receiving + * @param len maximum length (in bytes) of data to receive + * @return number of bytes actually received + */ +u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len) +{ + u32_t recved_bytes; + +/* USER CODE BEGIN 10 */ + recved_bytes = 0; // dummy code +/* USER CODE END 10 */ + return recved_bytes; +} +#endif /* MDK ARM Compiler */ + diff --git a/STM32_Nucleo207ZG/LWIP/App/lwip.h b/STM32_Nucleo207ZG/LWIP/App/lwip.h index a066f1f..294b03d 100644 --- a/STM32_Nucleo207ZG/LWIP/App/lwip.h +++ b/STM32_Nucleo207ZG/LWIP/App/lwip.h @@ -1,76 +1,82 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * File Name : LWIP.h - * Description : This file provides code for the configuration - * of the LWIP. - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ************************************************************************* - - */ -/* USER CODE END Header */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __mx_lwip_H -#define __mx_lwip_H -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "lwip/opt.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "netif/etharp.h" -#include "lwip/dhcp.h" -#include "lwip/netif.h" -#include "lwip/timeouts.h" -#include "ethernetif.h" - -/* Includes for RTOS ---------------------------------------------------------*/ -#if WITH_RTOS -#include "lwip/tcpip.h" -#endif /* WITH_RTOS */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* Global Variables ----------------------------------------------------------*/ -extern ETH_HandleTypeDef heth; - -/* LWIP init function */ -void MX_LWIP_Init(void); - -#if !WITH_RTOS -/* USER CODE BEGIN 1 */ -/* Function defined in lwip.c to: - * - Read a received packet from the Ethernet buffers - * - Send it to the lwIP stack for handling - * - Handle timeouts if NO_SYS_NO_TIMERS not set - */ -void MX_LWIP_Process(void); - -/* USER CODE END 1 */ -#endif /* WITH_RTOS */ - -#ifdef __cplusplus -} -#endif -#endif /*__ mx_lwip_H */ - -/** - * @} - */ - -/** - * @} - */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : LWIP.h + * Description : This file provides code for the configuration + * of the LWIP. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ************************************************************************* + + */ +/* USER CODE END Header */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __mx_lwip_H +#define __mx_lwip_H +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "lwip/opt.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "netif/etharp.h" +#include "lwip/dhcp.h" +#include "lwip/netif.h" +#include "lwip/timeouts.h" +#include "ethernetif.h" + +/* Includes for RTOS ---------------------------------------------------------*/ +#if WITH_RTOS +#include "lwip/tcpip.h" +#endif /* WITH_RTOS */ + +/* USER CODE BEGIN 0 */ + typedef enum + { + LWIP_UNCONNECTED, + LWIP_CONNECTED, + } eLwipStatus; + +extern eLwipStatus LwipConnectionStatus_T; +/* USER CODE END 0 */ + +/* Global Variables ----------------------------------------------------------*/ +extern ETH_HandleTypeDef heth; + +/* LWIP init function */ +void MX_LWIP_Init(void); + +#if !WITH_RTOS +/* USER CODE BEGIN 1 */ +/* Function defined in lwip.c to: + * - Read a received packet from the Ethernet buffers + * - Send it to the lwIP stack for handling + * - Handle timeouts if NO_SYS_NO_TIMERS not set + */ +void MX_LWIP_Process(void); + +/* USER CODE END 1 */ +#endif /* WITH_RTOS */ + +#ifdef __cplusplus +} +#endif +#endif /*__ mx_lwip_H */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/STM32_Nucleo207ZG/LWIP/Target/ethernetif.c b/STM32_Nucleo207ZG/LWIP/Target/ethernetif.c index a56d60e..69eba16 100644 --- a/STM32_Nucleo207ZG/LWIP/Target/ethernetif.c +++ b/STM32_Nucleo207ZG/LWIP/Target/ethernetif.c @@ -1,742 +1,742 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * File Name : ethernetif.c - * Description : This file provides code for the configuration - * of the Target/ethernetif.c MiddleWare. - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "lwip/opt.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/timeouts.h" -#include "netif/ethernet.h" -#include "netif/etharp.h" -#include "lwip/ethip6.h" -#include "ethernetif.h" -#include - -/* Within 'USER CODE' section, code will be kept by default at each generation */ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* Private define ------------------------------------------------------------*/ - -/* Network interface name */ -#define IFNAME0 's' -#define IFNAME1 't' - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/* Private variables ---------------------------------------------------------*/ -#if defined ( __ICCARM__ ) /*!< IAR Compiler */ - #pragma data_alignment=4 -#endif -__ALIGN_BEGIN ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __ALIGN_END;/* Ethernet Rx MA Descriptor */ - -#if defined ( __ICCARM__ ) /*!< IAR Compiler */ - #pragma data_alignment=4 -#endif -__ALIGN_BEGIN ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __ALIGN_END;/* Ethernet Tx DMA Descriptor */ - -#if defined ( __ICCARM__ ) /*!< IAR Compiler */ - #pragma data_alignment=4 -#endif -__ALIGN_BEGIN uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __ALIGN_END; /* Ethernet Receive Buffer */ - -#if defined ( __ICCARM__ ) /*!< IAR Compiler */ - #pragma data_alignment=4 -#endif -__ALIGN_BEGIN uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __ALIGN_END; /* Ethernet Transmit Buffer */ - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/* Global Ethernet handle */ -ETH_HandleTypeDef heth; - -/* Private function prototypes -----------------------------------------------*/ - -/* USER CODE BEGIN 3 */ - -/* USER CODE END 3 */ - -/* Private functions ---------------------------------------------------------*/ - -void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(ethHandle->Instance==ETH) - { - /* USER CODE BEGIN ETH_MspInit 0 */ - - /* USER CODE END ETH_MspInit 0 */ - /* Enable Peripheral clock */ - __HAL_RCC_ETH_CLK_ENABLE(); - - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - __HAL_RCC_GPIOG_CLK_ENABLE(); - /**ETH GPIO Configuration - PC1 ------> ETH_MDC - PA1 ------> ETH_REF_CLK - PA2 ------> ETH_MDIO - PA7 ------> ETH_CRS_DV - PC4 ------> ETH_RXD0 - PC5 ------> ETH_RXD1 - PB13 ------> ETH_TXD1 - PG11 ------> ETH_TX_EN - PG13 ------> ETH_TXD0 - */ - GPIO_InitStruct.Pin = RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = RMII_REF_CLK_Pin|RMII_MDIO_Pin|RMII_CRS_DV_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = RMII_TXD1_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - HAL_GPIO_Init(RMII_TXD1_GPIO_Port, &GPIO_InitStruct); - - GPIO_InitStruct.Pin = RMII_TX_EN_Pin|RMII_TXD0_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF11_ETH; - HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); - - /* USER CODE BEGIN ETH_MspInit 1 */ - - /* USER CODE END ETH_MspInit 1 */ - } -} - -void HAL_ETH_MspDeInit(ETH_HandleTypeDef* ethHandle) -{ - if(ethHandle->Instance==ETH) - { - /* USER CODE BEGIN ETH_MspDeInit 0 */ - - /* USER CODE END ETH_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_ETH_CLK_DISABLE(); - - /**ETH GPIO Configuration - PC1 ------> ETH_MDC - PA1 ------> ETH_REF_CLK - PA2 ------> ETH_MDIO - PA7 ------> ETH_CRS_DV - PC4 ------> ETH_RXD0 - PC5 ------> ETH_RXD1 - PB13 ------> ETH_TXD1 - PG11 ------> ETH_TX_EN - PG13 ------> ETH_TXD0 - */ - HAL_GPIO_DeInit(GPIOC, RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin); - - HAL_GPIO_DeInit(GPIOA, RMII_REF_CLK_Pin|RMII_MDIO_Pin|RMII_CRS_DV_Pin); - - HAL_GPIO_DeInit(RMII_TXD1_GPIO_Port, RMII_TXD1_Pin); - - HAL_GPIO_DeInit(GPIOG, RMII_TX_EN_Pin|RMII_TXD0_Pin); - - /* USER CODE BEGIN ETH_MspDeInit 1 */ - - /* USER CODE END ETH_MspDeInit 1 */ - } -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/******************************************************************************* - LL Driver Interface ( LwIP stack --> ETH) -*******************************************************************************/ -/** - * In this function, the hardware should be initialized. - * Called from ethernetif_init(). - * - * @param netif the already initialized lwip network interface structure - * for this ethernetif - */ -static void low_level_init(struct netif *netif) -{ - uint32_t regvalue = 0; - HAL_StatusTypeDef hal_eth_init_status; - -/* Init ETH */ - - uint8_t MACAddr[6] ; - heth.Instance = ETH; - heth.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; - heth.Init.Speed = ETH_SPEED_100M; - heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - heth.Init.PhyAddress = LAN8742A_PHY_ADDRESS; - MACAddr[0] = 0x00; - MACAddr[1] = 0x80; - MACAddr[2] = 0xE1; - MACAddr[3] = 0x00; - MACAddr[4] = 0x00; - MACAddr[5] = 0x00; - heth.Init.MACAddr = &MACAddr[0]; - heth.Init.RxMode = ETH_RXPOLLING_MODE; - heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; - heth.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; - - /* USER CODE BEGIN MACADDRESS */ - - /* USER CODE END MACADDRESS */ - - hal_eth_init_status = HAL_ETH_Init(&heth); - - if (hal_eth_init_status == HAL_OK) - { - /* Set netif link flag */ - netif->flags |= NETIF_FLAG_LINK_UP; - } - /* Initialize Tx Descriptors list: Chain Mode */ - HAL_ETH_DMATxDescListInit(&heth, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); - - /* Initialize Rx Descriptors list: Chain Mode */ - HAL_ETH_DMARxDescListInit(&heth, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); - -#if LWIP_ARP || LWIP_ETHERNET - - /* set MAC hardware address length */ - netif->hwaddr_len = ETH_HWADDR_LEN; - - /* set MAC hardware address */ - netif->hwaddr[0] = heth.Init.MACAddr[0]; - netif->hwaddr[1] = heth.Init.MACAddr[1]; - netif->hwaddr[2] = heth.Init.MACAddr[2]; - netif->hwaddr[3] = heth.Init.MACAddr[3]; - netif->hwaddr[4] = heth.Init.MACAddr[4]; - netif->hwaddr[5] = heth.Init.MACAddr[5]; - - /* maximum transfer unit */ - netif->mtu = 1500; - - /* Accept broadcast address and ARP traffic */ - /* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */ - #if LWIP_ARP - netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; - #else - netif->flags |= NETIF_FLAG_BROADCAST; - #endif /* LWIP_ARP */ - - /* Enable MAC and DMA transmission and reception */ - HAL_ETH_Start(&heth); - -/* USER CODE BEGIN PHY_PRE_CONFIG */ - -/* USER CODE END PHY_PRE_CONFIG */ - - /* Read Register Configuration */ - HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR, ®value); - regvalue |= (PHY_ISFR_INT4); - - /* Enable Interrupt on change of link status */ - HAL_ETH_WritePHYRegister(&heth, PHY_ISFR , regvalue ); - - /* Read Register Configuration */ - HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR , ®value); - -/* USER CODE BEGIN PHY_POST_CONFIG */ - -/* USER CODE END PHY_POST_CONFIG */ - -#endif /* LWIP_ARP || LWIP_ETHERNET */ - -/* USER CODE BEGIN LOW_LEVEL_INIT */ - -/* USER CODE END LOW_LEVEL_INIT */ -} - -/** - * This function should do the actual transmission of the packet. The packet is - * contained in the pbuf that is passed to the function. This pbuf - * might be chained. - * - * @param netif the lwip network interface structure for this ethernetif - * @param p the MAC packet to send (e.g. IP packet including MAC addresses and type) - * @return ERR_OK if the packet could be sent - * an err_t value if the packet couldn't be sent - * - * @note Returning ERR_MEM here if a DMA queue of your MAC is full can lead to - * strange results. You might consider waiting for space in the DMA queue - * to become available since the stack doesn't retry to send a packet - * dropped because of memory failure (except for the TCP timers). - */ - -static err_t low_level_output(struct netif *netif, struct pbuf *p) -{ - err_t errval; - struct pbuf *q; - uint8_t *buffer = (uint8_t *)(heth.TxDesc->Buffer1Addr); - __IO ETH_DMADescTypeDef *DmaTxDesc; - uint32_t framelength = 0; - uint32_t bufferoffset = 0; - uint32_t byteslefttocopy = 0; - uint32_t payloadoffset = 0; - DmaTxDesc = heth.TxDesc; - bufferoffset = 0; - - /* copy frame from pbufs to driver buffers */ - for(q = p; q != NULL; q = q->next) - { - /* Is this buffer available? If not, goto error */ - if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) - { - errval = ERR_USE; - goto error; - } - - /* Get bytes in current lwIP buffer */ - byteslefttocopy = q->len; - payloadoffset = 0; - - /* Check if the length of data to copy is bigger than Tx buffer size*/ - while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE ) - { - /* Copy data to Tx buffer*/ - memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), (ETH_TX_BUF_SIZE - bufferoffset) ); - - /* Point to next descriptor */ - DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr); - - /* Check if the buffer is available */ - if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) - { - errval = ERR_USE; - goto error; - } - - buffer = (uint8_t *)(DmaTxDesc->Buffer1Addr); - - byteslefttocopy = byteslefttocopy - (ETH_TX_BUF_SIZE - bufferoffset); - payloadoffset = payloadoffset + (ETH_TX_BUF_SIZE - bufferoffset); - framelength = framelength + (ETH_TX_BUF_SIZE - bufferoffset); - bufferoffset = 0; - } - - /* Copy the remaining bytes */ - memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), byteslefttocopy ); - bufferoffset = bufferoffset + byteslefttocopy; - framelength = framelength + byteslefttocopy; - } - - /* Prepare transmit descriptors to give to DMA */ - HAL_ETH_TransmitFrame(&heth, framelength); - - errval = ERR_OK; - -error: - - /* When Transmit Underflow flag is set, clear it and issue a Transmit Poll Demand to resume transmission */ - if ((heth.Instance->DMASR & ETH_DMASR_TUS) != (uint32_t)RESET) - { - /* Clear TUS ETHERNET DMA flag */ - heth.Instance->DMASR = ETH_DMASR_TUS; - - /* Resume DMA transmission*/ - heth.Instance->DMATPDR = 0; - } - return errval; -} - -/** - * Should allocate a pbuf and transfer the bytes of the incoming - * packet from the interface into the pbuf. - * - * @param netif the lwip network interface structure for this ethernetif - * @return a pbuf filled with the received packet (including MAC header) - * NULL on memory error - */ -static struct pbuf * low_level_input(struct netif *netif) -{ - struct pbuf *p = NULL; - struct pbuf *q = NULL; - uint16_t len = 0; - uint8_t *buffer; - __IO ETH_DMADescTypeDef *dmarxdesc; - uint32_t bufferoffset = 0; - uint32_t payloadoffset = 0; - uint32_t byteslefttocopy = 0; - uint32_t i=0; - - /* get received frame */ - if (HAL_ETH_GetReceivedFrame(&heth) != HAL_OK) - - return NULL; - - /* Obtain the size of the packet and put it into the "len" variable. */ - len = heth.RxFrameInfos.length; - buffer = (uint8_t *)heth.RxFrameInfos.buffer; - - if (len > 0) - { - /* We allocate a pbuf chain of pbufs from the Lwip buffer pool */ - p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); - } - - if (p != NULL) - { - dmarxdesc = heth.RxFrameInfos.FSRxDesc; - bufferoffset = 0; - for(q = p; q != NULL; q = q->next) - { - byteslefttocopy = q->len; - payloadoffset = 0; - - /* Check if the length of bytes to copy in current pbuf is bigger than Rx buffer size*/ - while( (byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE ) - { - /* Copy data to pbuf */ - memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), (ETH_RX_BUF_SIZE - bufferoffset)); - - /* Point to next descriptor */ - dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr); - buffer = (uint8_t *)(dmarxdesc->Buffer1Addr); - - byteslefttocopy = byteslefttocopy - (ETH_RX_BUF_SIZE - bufferoffset); - payloadoffset = payloadoffset + (ETH_RX_BUF_SIZE - bufferoffset); - bufferoffset = 0; - } - /* Copy remaining data in pbuf */ - memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), byteslefttocopy); - bufferoffset = bufferoffset + byteslefttocopy; - } - } - - /* Release descriptors to DMA */ - /* Point to first descriptor */ - dmarxdesc = heth.RxFrameInfos.FSRxDesc; - /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ - for (i=0; i< heth.RxFrameInfos.SegCount; i++) - { - dmarxdesc->Status |= ETH_DMARXDESC_OWN; - dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr); - } - - /* Clear Segment_Count */ - heth.RxFrameInfos.SegCount =0; - - /* When Rx Buffer unavailable flag is set: clear it and resume reception */ - if ((heth.Instance->DMASR & ETH_DMASR_RBUS) != (uint32_t)RESET) - { - /* Clear RBUS ETHERNET DMA flag */ - heth.Instance->DMASR = ETH_DMASR_RBUS; - /* Resume DMA reception */ - heth.Instance->DMARPDR = 0; - } - return p; -} - -/** - * This function should be called when a packet is ready to be read - * from the interface. It uses the function low_level_input() that - * should handle the actual reception of bytes from the network - * interface. Then the type of the received packet is determined and - * the appropriate input function is called. - * - * @param netif the lwip network interface structure for this ethernetif - */ -void ethernetif_input(struct netif *netif) -{ - err_t err; - struct pbuf *p; - - /* move received packet into a new pbuf */ - p = low_level_input(netif); - - /* no packet could be read, silently ignore this */ - if (p == NULL) return; - - /* entry point to the LwIP stack */ - err = netif->input(p, netif); - - if (err != ERR_OK) - { - LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n")); - pbuf_free(p); - p = NULL; - } -} - -#if !LWIP_ARP -/** - * This function has to be completed by user in case of ARP OFF. - * - * @param netif the lwip network interface structure for this ethernetif - * @return ERR_OK if ... - */ -static err_t low_level_output_arp_off(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) -{ - err_t errval; - errval = ERR_OK; - -/* USER CODE BEGIN 5 */ - -/* USER CODE END 5 */ - - return errval; - -} -#endif /* LWIP_ARP */ - -/** - * Should be called at the beginning of the program to set up the - * network interface. It calls the function low_level_init() to do the - * actual setup of the hardware. - * - * This function should be passed as a parameter to netif_add(). - * - * @param netif the lwip network interface structure for this ethernetif - * @return ERR_OK if the loopif is initialized - * ERR_MEM if private data couldn't be allocated - * any other err_t on error - */ -err_t ethernetif_init(struct netif *netif) -{ - LWIP_ASSERT("netif != NULL", (netif != NULL)); - -#if LWIP_NETIF_HOSTNAME - /* Initialize interface hostname */ - netif->hostname = "lwip"; -#endif /* LWIP_NETIF_HOSTNAME */ - - netif->name[0] = IFNAME0; - netif->name[1] = IFNAME1; - /* We directly use etharp_output() here to save a function call. - * You can instead declare your own function an call etharp_output() - * from it if you have to do some checks before sending (e.g. if link - * is available...) */ - -#if LWIP_IPV4 -#if LWIP_ARP || LWIP_ETHERNET -#if LWIP_ARP - netif->output = etharp_output; -#else - /* The user should write its own code in low_level_output_arp_off function */ - netif->output = low_level_output_arp_off; -#endif /* LWIP_ARP */ -#endif /* LWIP_ARP || LWIP_ETHERNET */ -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 - netif->output_ip6 = ethip6_output; -#endif /* LWIP_IPV6 */ - - netif->linkoutput = low_level_output; - - /* initialize the hardware */ - low_level_init(netif); - - return ERR_OK; -} - -/* USER CODE BEGIN 6 */ - -/** -* @brief Returns the current time in milliseconds -* when LWIP_TIMERS == 1 and NO_SYS == 1 -* @param None -* @retval Time -*/ -u32_t sys_jiffies(void) -{ - return HAL_GetTick(); -} - -/** -* @brief Returns the current time in milliseconds -* when LWIP_TIMERS == 1 and NO_SYS == 1 -* @param None -* @retval Time -*/ -u32_t sys_now(void) -{ - return HAL_GetTick(); -} - -/* USER CODE END 6 */ - -/** - * @brief This function sets the netif link status. - * @note This function should be included in the main loop to poll - * for the link status update - * @param netif: the network interface - * @retval None - */ -uint32_t EthernetLinkTimer=0; - -void ethernetif_set_link(struct netif *netif) -{ - uint32_t regvalue = 0; - /* Ethernet Link every 200ms */ - if (HAL_GetTick() - EthernetLinkTimer >= 200) - { - EthernetLinkTimer = HAL_GetTick(); - - /* Read PHY_BSR*/ - HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, ®value); - - regvalue &= PHY_LINKED_STATUS; - - /* Check whether the netif link down and the PHY link is up */ - if(!netif_is_link_up(netif) && (regvalue)) - { - /* network cable is connected */ - netif_set_link_up(netif); - } - else if(netif_is_link_up(netif) && (!regvalue)) - { - /* network cable is disconnected */ - netif_set_link_down(netif); - } - } -} - -/* USER CODE BEGIN 7 */ - -/* USER CODE END 7 */ - -#if LWIP_NETIF_LINK_CALLBACK -/** - * @brief Link callback function, this function is called on change of link status - * to update low level driver configuration. -* @param netif: The network interface - * @retval None - */ -void ethernetif_update_config(struct netif *netif) -{ - __IO uint32_t tickstart = 0; - uint32_t regvalue = 0; - - if(netif_is_link_up(netif)) - { - /* Restart the auto-negotiation */ - if(heth.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) - { - /* Enable Auto-Negotiation */ - HAL_ETH_WritePHYRegister(&heth, PHY_BCR, PHY_AUTONEGOTIATION); - - /* Get tick */ - tickstart = HAL_GetTick(); - - /* Wait until the auto-negotiation will be completed */ - do - { - HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, ®value); - - /* Check for the Timeout ( 1s ) */ - if((HAL_GetTick() - tickstart ) > 1000) - { - /* In case of timeout */ - goto error; - } - } while (((regvalue & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE)); - - /* Read the result of the auto-negotiation */ - HAL_ETH_ReadPHYRegister(&heth, PHY_SR, ®value); - - /* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */ - if((regvalue & PHY_DUPLEX_STATUS) != (uint32_t)RESET) - { - /* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */ - heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; - } - else - { - /* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */ - heth.Init.DuplexMode = ETH_MODE_HALFDUPLEX; - } - /* Configure the MAC with the speed fixed by the auto-negotiation process */ - if(regvalue & PHY_SPEED_STATUS) - { - /* Set Ethernet speed to 10M following the auto-negotiation */ - heth.Init.Speed = ETH_SPEED_10M; - } - else - { - /* Set Ethernet speed to 100M following the auto-negotiation */ - heth.Init.Speed = ETH_SPEED_100M; - } - } - else /* AutoNegotiation Disable */ - { - error : - /* Check parameters */ - assert_param(IS_ETH_SPEED(heth.Init.Speed)); - assert_param(IS_ETH_DUPLEX_MODE(heth.Init.DuplexMode)); - - /* Set MAC Speed and Duplex Mode to PHY */ - HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) | - (uint16_t)(heth.Init.Speed >> 1))); - } - - /* ETHERNET MAC Re-Configuration */ - HAL_ETH_ConfigMAC(&heth, (ETH_MACInitTypeDef *) NULL); - - /* Restart MAC interface */ - HAL_ETH_Start(&heth); - } - else - { - /* Stop MAC interface */ - HAL_ETH_Stop(&heth); - } - - ethernetif_notify_conn_changed(netif); -} - -/* USER CODE BEGIN 8 */ -/** - * @brief This function notify user about link status changement. - * @param netif: the network interface - * @retval None - */ -__weak void ethernetif_notify_conn_changed(struct netif *netif) -{ - /* NOTE : This is function could be implemented in user file - when the callback is needed, - */ - -} -/* USER CODE END 8 */ -#endif /* LWIP_NETIF_LINK_CALLBACK */ - -/* USER CODE BEGIN 9 */ - -/* USER CODE END 9 */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : ethernetif.c + * Description : This file provides code for the configuration + * of the Target/ethernetif.c MiddleWare. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#include "lwip/opt.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/timeouts.h" +#include "netif/ethernet.h" +#include "netif/etharp.h" +#include "lwip/ethip6.h" +#include "ethernetif.h" +#include + +/* Within 'USER CODE' section, code will be kept by default at each generation */ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* Private define ------------------------------------------------------------*/ + +/* Network interface name */ +#define IFNAME0 's' +#define IFNAME1 't' + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +/* Private variables ---------------------------------------------------------*/ +#if defined ( __ICCARM__ ) /*!< IAR Compiler */ + #pragma data_alignment=4 +#endif +__ALIGN_BEGIN ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __ALIGN_END;/* Ethernet Rx MA Descriptor */ + +#if defined ( __ICCARM__ ) /*!< IAR Compiler */ + #pragma data_alignment=4 +#endif +__ALIGN_BEGIN ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __ALIGN_END;/* Ethernet Tx DMA Descriptor */ + +#if defined ( __ICCARM__ ) /*!< IAR Compiler */ + #pragma data_alignment=4 +#endif +__ALIGN_BEGIN uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __ALIGN_END; /* Ethernet Receive Buffer */ + +#if defined ( __ICCARM__ ) /*!< IAR Compiler */ + #pragma data_alignment=4 +#endif +__ALIGN_BEGIN uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __ALIGN_END; /* Ethernet Transmit Buffer */ + +/* USER CODE BEGIN 2 */ + +/* USER CODE END 2 */ + +/* Global Ethernet handle */ +ETH_HandleTypeDef heth; + +/* Private function prototypes -----------------------------------------------*/ + +/* USER CODE BEGIN 3 */ + +/* USER CODE END 3 */ + +/* Private functions ---------------------------------------------------------*/ + +void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(ethHandle->Instance==ETH) + { + /* USER CODE BEGIN ETH_MspInit 0 */ + + /* USER CODE END ETH_MspInit 0 */ + /* Enable Peripheral clock */ + __HAL_RCC_ETH_CLK_ENABLE(); + + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_GPIOG_CLK_ENABLE(); + /**ETH GPIO Configuration + PC1 ------> ETH_MDC + PA1 ------> ETH_REF_CLK + PA2 ------> ETH_MDIO + PA7 ------> ETH_CRS_DV + PC4 ------> ETH_RXD0 + PC5 ------> ETH_RXD1 + PB13 ------> ETH_TXD1 + PG11 ------> ETH_TX_EN + PG13 ------> ETH_TXD0 + */ + GPIO_InitStruct.Pin = RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = RMII_REF_CLK_Pin|RMII_MDIO_Pin|RMII_CRS_DV_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = RMII_TXD1_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + HAL_GPIO_Init(RMII_TXD1_GPIO_Port, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = RMII_TX_EN_Pin|RMII_TXD0_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF11_ETH; + HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); + + /* USER CODE BEGIN ETH_MspInit 1 */ + + /* USER CODE END ETH_MspInit 1 */ + } +} + +void HAL_ETH_MspDeInit(ETH_HandleTypeDef* ethHandle) +{ + if(ethHandle->Instance==ETH) + { + /* USER CODE BEGIN ETH_MspDeInit 0 */ + + /* USER CODE END ETH_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_ETH_CLK_DISABLE(); + + /**ETH GPIO Configuration + PC1 ------> ETH_MDC + PA1 ------> ETH_REF_CLK + PA2 ------> ETH_MDIO + PA7 ------> ETH_CRS_DV + PC4 ------> ETH_RXD0 + PC5 ------> ETH_RXD1 + PB13 ------> ETH_TXD1 + PG11 ------> ETH_TX_EN + PG13 ------> ETH_TXD0 + */ + HAL_GPIO_DeInit(GPIOC, RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin); + + HAL_GPIO_DeInit(GPIOA, RMII_REF_CLK_Pin|RMII_MDIO_Pin|RMII_CRS_DV_Pin); + + HAL_GPIO_DeInit(RMII_TXD1_GPIO_Port, RMII_TXD1_Pin); + + HAL_GPIO_DeInit(GPIOG, RMII_TX_EN_Pin|RMII_TXD0_Pin); + + /* USER CODE BEGIN ETH_MspDeInit 1 */ + + /* USER CODE END ETH_MspDeInit 1 */ + } +} + +/* USER CODE BEGIN 4 */ + +/* USER CODE END 4 */ + +/******************************************************************************* + LL Driver Interface ( LwIP stack --> ETH) +*******************************************************************************/ +/** + * In this function, the hardware should be initialized. + * Called from ethernetif_init(). + * + * @param netif the already initialized lwip network interface structure + * for this ethernetif + */ +static void low_level_init(struct netif *netif) +{ + uint32_t regvalue = 0; + HAL_StatusTypeDef hal_eth_init_status; + +/* Init ETH */ + + uint8_t MACAddr[6] ; + heth.Instance = ETH; + heth.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; + heth.Init.Speed = ETH_SPEED_100M; + heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; + heth.Init.PhyAddress = LAN8742A_PHY_ADDRESS; + MACAddr[0] = 0x00; + MACAddr[1] = 0x80; + MACAddr[2] = 0xE1; + MACAddr[3] = 0x00; + MACAddr[4] = 0x00; + MACAddr[5] = 0x00; + heth.Init.MACAddr = &MACAddr[0]; + heth.Init.RxMode = ETH_RXPOLLING_MODE; + heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE; + heth.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII; + + /* USER CODE BEGIN MACADDRESS */ + + /* USER CODE END MACADDRESS */ + + hal_eth_init_status = HAL_ETH_Init(&heth); + + if (hal_eth_init_status == HAL_OK) + { + /* Set netif link flag */ + netif->flags |= NETIF_FLAG_LINK_UP; + } + /* Initialize Tx Descriptors list: Chain Mode */ + HAL_ETH_DMATxDescListInit(&heth, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); + + /* Initialize Rx Descriptors list: Chain Mode */ + HAL_ETH_DMARxDescListInit(&heth, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); + +#if LWIP_ARP || LWIP_ETHERNET + + /* set MAC hardware address length */ + netif->hwaddr_len = ETH_HWADDR_LEN; + + /* set MAC hardware address */ + netif->hwaddr[0] = heth.Init.MACAddr[0]; + netif->hwaddr[1] = heth.Init.MACAddr[1]; + netif->hwaddr[2] = heth.Init.MACAddr[2]; + netif->hwaddr[3] = heth.Init.MACAddr[3]; + netif->hwaddr[4] = heth.Init.MACAddr[4]; + netif->hwaddr[5] = heth.Init.MACAddr[5]; + + /* maximum transfer unit */ + netif->mtu = 1500; + + /* Accept broadcast address and ARP traffic */ + /* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */ + #if LWIP_ARP + netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; + #else + netif->flags |= NETIF_FLAG_BROADCAST; + #endif /* LWIP_ARP */ + + /* Enable MAC and DMA transmission and reception */ + HAL_ETH_Start(&heth); + +/* USER CODE BEGIN PHY_PRE_CONFIG */ + +/* USER CODE END PHY_PRE_CONFIG */ + + /* Read Register Configuration */ + HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR, ®value); + regvalue |= (PHY_ISFR_INT4); + + /* Enable Interrupt on change of link status */ + HAL_ETH_WritePHYRegister(&heth, PHY_ISFR , regvalue ); + + /* Read Register Configuration */ + HAL_ETH_ReadPHYRegister(&heth, PHY_ISFR , ®value); + +/* USER CODE BEGIN PHY_POST_CONFIG */ + +/* USER CODE END PHY_POST_CONFIG */ + +#endif /* LWIP_ARP || LWIP_ETHERNET */ + +/* USER CODE BEGIN LOW_LEVEL_INIT */ + +/* USER CODE END LOW_LEVEL_INIT */ +} + +/** + * This function should do the actual transmission of the packet. The packet is + * contained in the pbuf that is passed to the function. This pbuf + * might be chained. + * + * @param netif the lwip network interface structure for this ethernetif + * @param p the MAC packet to send (e.g. IP packet including MAC addresses and type) + * @return ERR_OK if the packet could be sent + * an err_t value if the packet couldn't be sent + * + * @note Returning ERR_MEM here if a DMA queue of your MAC is full can lead to + * strange results. You might consider waiting for space in the DMA queue + * to become available since the stack doesn't retry to send a packet + * dropped because of memory failure (except for the TCP timers). + */ + +static err_t low_level_output(struct netif *netif, struct pbuf *p) +{ + err_t errval; + struct pbuf *q; + uint8_t *buffer = (uint8_t *)(heth.TxDesc->Buffer1Addr); + __IO ETH_DMADescTypeDef *DmaTxDesc; + uint32_t framelength = 0; + uint32_t bufferoffset = 0; + uint32_t byteslefttocopy = 0; + uint32_t payloadoffset = 0; + DmaTxDesc = heth.TxDesc; + bufferoffset = 0; + + /* copy frame from pbufs to driver buffers */ + for(q = p; q != NULL; q = q->next) + { + /* Is this buffer available? If not, goto error */ + if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) + { + errval = ERR_USE; + goto error; + } + + /* Get bytes in current lwIP buffer */ + byteslefttocopy = q->len; + payloadoffset = 0; + + /* Check if the length of data to copy is bigger than Tx buffer size*/ + while( (byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE ) + { + /* Copy data to Tx buffer*/ + memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), (ETH_TX_BUF_SIZE - bufferoffset) ); + + /* Point to next descriptor */ + DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr); + + /* Check if the buffer is available */ + if((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) + { + errval = ERR_USE; + goto error; + } + + buffer = (uint8_t *)(DmaTxDesc->Buffer1Addr); + + byteslefttocopy = byteslefttocopy - (ETH_TX_BUF_SIZE - bufferoffset); + payloadoffset = payloadoffset + (ETH_TX_BUF_SIZE - bufferoffset); + framelength = framelength + (ETH_TX_BUF_SIZE - bufferoffset); + bufferoffset = 0; + } + + /* Copy the remaining bytes */ + memcpy( (uint8_t*)((uint8_t*)buffer + bufferoffset), (uint8_t*)((uint8_t*)q->payload + payloadoffset), byteslefttocopy ); + bufferoffset = bufferoffset + byteslefttocopy; + framelength = framelength + byteslefttocopy; + } + + /* Prepare transmit descriptors to give to DMA */ + HAL_ETH_TransmitFrame(&heth, framelength); + + errval = ERR_OK; + +error: + + /* When Transmit Underflow flag is set, clear it and issue a Transmit Poll Demand to resume transmission */ + if ((heth.Instance->DMASR & ETH_DMASR_TUS) != (uint32_t)RESET) + { + /* Clear TUS ETHERNET DMA flag */ + heth.Instance->DMASR = ETH_DMASR_TUS; + + /* Resume DMA transmission*/ + heth.Instance->DMATPDR = 0; + } + return errval; +} + +/** + * Should allocate a pbuf and transfer the bytes of the incoming + * packet from the interface into the pbuf. + * + * @param netif the lwip network interface structure for this ethernetif + * @return a pbuf filled with the received packet (including MAC header) + * NULL on memory error + */ +static struct pbuf * low_level_input(struct netif *netif) +{ + struct pbuf *p = NULL; + struct pbuf *q = NULL; + uint16_t len = 0; + uint8_t *buffer; + __IO ETH_DMADescTypeDef *dmarxdesc; + uint32_t bufferoffset = 0; + uint32_t payloadoffset = 0; + uint32_t byteslefttocopy = 0; + uint32_t i=0; + + /* get received frame */ + if (HAL_ETH_GetReceivedFrame(&heth) != HAL_OK) + + return NULL; + + /* Obtain the size of the packet and put it into the "len" variable. */ + len = heth.RxFrameInfos.length; + buffer = (uint8_t *)heth.RxFrameInfos.buffer; + + if (len > 0) + { + /* We allocate a pbuf chain of pbufs from the Lwip buffer pool */ + p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); + } + + if (p != NULL) + { + dmarxdesc = heth.RxFrameInfos.FSRxDesc; + bufferoffset = 0; + for(q = p; q != NULL; q = q->next) + { + byteslefttocopy = q->len; + payloadoffset = 0; + + /* Check if the length of bytes to copy in current pbuf is bigger than Rx buffer size*/ + while( (byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE ) + { + /* Copy data to pbuf */ + memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), (ETH_RX_BUF_SIZE - bufferoffset)); + + /* Point to next descriptor */ + dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr); + buffer = (uint8_t *)(dmarxdesc->Buffer1Addr); + + byteslefttocopy = byteslefttocopy - (ETH_RX_BUF_SIZE - bufferoffset); + payloadoffset = payloadoffset + (ETH_RX_BUF_SIZE - bufferoffset); + bufferoffset = 0; + } + /* Copy remaining data in pbuf */ + memcpy( (uint8_t*)((uint8_t*)q->payload + payloadoffset), (uint8_t*)((uint8_t*)buffer + bufferoffset), byteslefttocopy); + bufferoffset = bufferoffset + byteslefttocopy; + } + } + + /* Release descriptors to DMA */ + /* Point to first descriptor */ + dmarxdesc = heth.RxFrameInfos.FSRxDesc; + /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ + for (i=0; i< heth.RxFrameInfos.SegCount; i++) + { + dmarxdesc->Status |= ETH_DMARXDESC_OWN; + dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr); + } + + /* Clear Segment_Count */ + heth.RxFrameInfos.SegCount =0; + + /* When Rx Buffer unavailable flag is set: clear it and resume reception */ + if ((heth.Instance->DMASR & ETH_DMASR_RBUS) != (uint32_t)RESET) + { + /* Clear RBUS ETHERNET DMA flag */ + heth.Instance->DMASR = ETH_DMASR_RBUS; + /* Resume DMA reception */ + heth.Instance->DMARPDR = 0; + } + return p; +} + +/** + * This function should be called when a packet is ready to be read + * from the interface. It uses the function low_level_input() that + * should handle the actual reception of bytes from the network + * interface. Then the type of the received packet is determined and + * the appropriate input function is called. + * + * @param netif the lwip network interface structure for this ethernetif + */ +void ethernetif_input(struct netif *netif) +{ + err_t err; + struct pbuf *p; + + /* move received packet into a new pbuf */ + p = low_level_input(netif); + + /* no packet could be read, silently ignore this */ + if (p == NULL) return; + + /* entry point to the LwIP stack */ + err = netif->input(p, netif); + + if (err != ERR_OK) + { + LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n")); + pbuf_free(p); + p = NULL; + } +} + +#if !LWIP_ARP +/** + * This function has to be completed by user in case of ARP OFF. + * + * @param netif the lwip network interface structure for this ethernetif + * @return ERR_OK if ... + */ +static err_t low_level_output_arp_off(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) +{ + err_t errval; + errval = ERR_OK; + +/* USER CODE BEGIN 5 */ + +/* USER CODE END 5 */ + + return errval; + +} +#endif /* LWIP_ARP */ + +/** + * Should be called at the beginning of the program to set up the + * network interface. It calls the function low_level_init() to do the + * actual setup of the hardware. + * + * This function should be passed as a parameter to netif_add(). + * + * @param netif the lwip network interface structure for this ethernetif + * @return ERR_OK if the loopif is initialized + * ERR_MEM if private data couldn't be allocated + * any other err_t on error + */ +err_t ethernetif_init(struct netif *netif) +{ + LWIP_ASSERT("netif != NULL", (netif != NULL)); + +#if LWIP_NETIF_HOSTNAME + /* Initialize interface hostname */ + netif->hostname = "lwip"; +#endif /* LWIP_NETIF_HOSTNAME */ + + netif->name[0] = IFNAME0; + netif->name[1] = IFNAME1; + /* We directly use etharp_output() here to save a function call. + * You can instead declare your own function an call etharp_output() + * from it if you have to do some checks before sending (e.g. if link + * is available...) */ + +#if LWIP_IPV4 +#if LWIP_ARP || LWIP_ETHERNET +#if LWIP_ARP + netif->output = etharp_output; +#else + /* The user should write its own code in low_level_output_arp_off function */ + netif->output = low_level_output_arp_off; +#endif /* LWIP_ARP */ +#endif /* LWIP_ARP || LWIP_ETHERNET */ +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 + netif->output_ip6 = ethip6_output; +#endif /* LWIP_IPV6 */ + + netif->linkoutput = low_level_output; + + /* initialize the hardware */ + low_level_init(netif); + + return ERR_OK; +} + +/* USER CODE BEGIN 6 */ + +/** +* @brief Returns the current time in milliseconds +* when LWIP_TIMERS == 1 and NO_SYS == 1 +* @param None +* @retval Time +*/ +u32_t sys_jiffies(void) +{ + return HAL_GetTick(); +} + +/** +* @brief Returns the current time in milliseconds +* when LWIP_TIMERS == 1 and NO_SYS == 1 +* @param None +* @retval Time +*/ +u32_t sys_now(void) +{ + return HAL_GetTick(); +} + +/* USER CODE END 6 */ + +/** + * @brief This function sets the netif link status. + * @note This function should be included in the main loop to poll + * for the link status update + * @param netif: the network interface + * @retval None + */ +uint32_t EthernetLinkTimer=0; + +void ethernetif_set_link(struct netif *netif) +{ + uint32_t regvalue = 0; + /* Ethernet Link every 200ms */ + if (HAL_GetTick() - EthernetLinkTimer >= 200) + { + EthernetLinkTimer = HAL_GetTick(); + + /* Read PHY_BSR*/ + HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, ®value); + + regvalue &= PHY_LINKED_STATUS; + + /* Check whether the netif link down and the PHY link is up */ + if(!netif_is_link_up(netif) && (regvalue)) + { + /* network cable is connected */ + netif_set_link_up(netif); + } + else if(netif_is_link_up(netif) && (!regvalue)) + { + /* network cable is disconnected */ + netif_set_link_down(netif); + } + } +} + +/* USER CODE BEGIN 7 */ + +/* USER CODE END 7 */ + +#if LWIP_NETIF_LINK_CALLBACK +/** + * @brief Link callback function, this function is called on change of link status + * to update low level driver configuration. +* @param netif: The network interface + * @retval None + */ +void ethernetif_update_config(struct netif *netif) +{ + __IO uint32_t tickstart = 0; + uint32_t regvalue = 0; + + if(netif_is_link_up(netif)) + { + /* Restart the auto-negotiation */ + if(heth.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) + { + /* Enable Auto-Negotiation */ + HAL_ETH_WritePHYRegister(&heth, PHY_BCR, PHY_AUTONEGOTIATION); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait until the auto-negotiation will be completed */ + do + { + HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, ®value); + + /* Check for the Timeout ( 1s ) */ + if((HAL_GetTick() - tickstart ) > 1000) + { + /* In case of timeout */ + goto error; + } + } while (((regvalue & PHY_AUTONEGO_COMPLETE) != PHY_AUTONEGO_COMPLETE)); + + /* Read the result of the auto-negotiation */ + HAL_ETH_ReadPHYRegister(&heth, PHY_SR, ®value); + + /* Configure the MAC with the Duplex Mode fixed by the auto-negotiation process */ + if((regvalue & PHY_DUPLEX_STATUS) != (uint32_t)RESET) + { + /* Set Ethernet duplex mode to Full-duplex following the auto-negotiation */ + heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX; + } + else + { + /* Set Ethernet duplex mode to Half-duplex following the auto-negotiation */ + heth.Init.DuplexMode = ETH_MODE_HALFDUPLEX; + } + /* Configure the MAC with the speed fixed by the auto-negotiation process */ + if(regvalue & PHY_SPEED_STATUS) + { + /* Set Ethernet speed to 10M following the auto-negotiation */ + heth.Init.Speed = ETH_SPEED_10M; + } + else + { + /* Set Ethernet speed to 100M following the auto-negotiation */ + heth.Init.Speed = ETH_SPEED_100M; + } + } + else /* AutoNegotiation Disable */ + { + error : + /* Check parameters */ + assert_param(IS_ETH_SPEED(heth.Init.Speed)); + assert_param(IS_ETH_DUPLEX_MODE(heth.Init.DuplexMode)); + + /* Set MAC Speed and Duplex Mode to PHY */ + HAL_ETH_WritePHYRegister(&heth, PHY_BCR, ((uint16_t)(heth.Init.DuplexMode >> 3) | + (uint16_t)(heth.Init.Speed >> 1))); + } + + /* ETHERNET MAC Re-Configuration */ + HAL_ETH_ConfigMAC(&heth, (ETH_MACInitTypeDef *) NULL); + + /* Restart MAC interface */ + HAL_ETH_Start(&heth); + } + else + { + /* Stop MAC interface */ + HAL_ETH_Stop(&heth); + } + + ethernetif_notify_conn_changed(netif); +} + +/* USER CODE BEGIN 8 */ +/** + * @brief This function notify user about link status changement. + * @param netif: the network interface + * @retval None + */ +__weak void ethernetif_notify_conn_changed(struct netif *netif) +{ + /* NOTE : This is function could be implemented in user file + when the callback is needed, + */ + +} +/* USER CODE END 8 */ +#endif /* LWIP_NETIF_LINK_CALLBACK */ + +/* USER CODE BEGIN 9 */ + +/* USER CODE END 9 */ diff --git a/STM32_Nucleo207ZG/LWIP/Target/ethernetif.h b/STM32_Nucleo207ZG/LWIP/Target/ethernetif.h index 5f5815b..b6c8547 100644 --- a/STM32_Nucleo207ZG/LWIP/Target/ethernetif.h +++ b/STM32_Nucleo207ZG/LWIP/Target/ethernetif.h @@ -1,47 +1,47 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * File Name : ethernetif.h - * Description : This file provides initialization code for LWIP - * middleWare. - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -#ifndef __ETHERNETIF_H__ -#define __ETHERNETIF_H__ - -#include "lwip/err.h" -#include "lwip/netif.h" - -/* Within 'USER CODE' section, code will be kept by default at each generation */ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* Exported functions ------------------------------------------------------- */ -err_t ethernetif_init(struct netif *netif); - -void ethernetif_input(struct netif *netif); -void ethernetif_set_link(struct netif *netif); -void ethernetif_update_config(struct netif *netif); -void ethernetif_notify_conn_changed(struct netif *netif); - -void Error_Handler(void); -u32_t sys_jiffies(void); -u32_t sys_now(void); - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ -#endif +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : ethernetif.h + * Description : This file provides initialization code for LWIP + * middleWare. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +#ifndef __ETHERNETIF_H__ +#define __ETHERNETIF_H__ + +#include "lwip/err.h" +#include "lwip/netif.h" + +/* Within 'USER CODE' section, code will be kept by default at each generation */ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* Exported functions ------------------------------------------------------- */ +err_t ethernetif_init(struct netif *netif); + +void ethernetif_input(struct netif *netif); +void ethernetif_set_link(struct netif *netif); +void ethernetif_update_config(struct netif *netif); +void ethernetif_notify_conn_changed(struct netif *netif); + +void Error_Handler(void); +u32_t sys_jiffies(void); +u32_t sys_now(void); + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ +#endif diff --git a/STM32_Nucleo207ZG/LWIP/Target/lwipopts.h b/STM32_Nucleo207ZG/LWIP/Target/lwipopts.h index 54efdfa..f561c60 100644 --- a/STM32_Nucleo207ZG/LWIP/Target/lwipopts.h +++ b/STM32_Nucleo207ZG/LWIP/Target/lwipopts.h @@ -1,110 +1,110 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * File Name : Target/lwipopts.h - * Description : This file overrides LwIP stack default configuration - * done in opt.h file. - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion --------------------------------------*/ -#ifndef __LWIPOPTS__H__ -#define __LWIPOPTS__H__ - -#include "main.h" - -/*-----------------------------------------------------------------------------*/ -/* Current version of LwIP supported by CubeMx: 2.0.3 -*/ -/*-----------------------------------------------------------------------------*/ - -/* Within 'USER CODE' section, code will be kept by default at each generation */ -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -#ifdef __cplusplus - extern "C" { -#endif - -/* STM32CubeMX Specific Parameters (not defined in opt.h) ---------------------*/ -/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/ -/*----- WITH_RTOS disabled (Since FREERTOS is not set) -----*/ -#define WITH_RTOS 0 -/*----- CHECKSUM_BY_HARDWARE enabled -----*/ -#define CHECKSUM_BY_HARDWARE 1 -/*-----------------------------------------------------------------------------*/ - -/* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/ -/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/ -/*----- Value in opt.h for LWIP_DHCP: 0 -----*/ -#define LWIP_DHCP 1 -/*----- Value in opt.h for NO_SYS: 0 -----*/ -#define NO_SYS 1 -/*----- Value in opt.h for SYS_LIGHTWEIGHT_PROT: 1 -----*/ -#define SYS_LIGHTWEIGHT_PROT 0 -/*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/ -#define MEM_ALIGNMENT 4 -/*----- Value in opt.h for MEMP_NUM_SYS_TIMEOUT: (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) -*/ -#define MEMP_NUM_SYS_TIMEOUT 5 -/*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/ -#define LWIP_ETHERNET 1 -/*----- Value in opt.h for LWIP_DNS_SECURE: (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) -*/ -#define LWIP_DNS_SECURE 7 -/*----- Value in opt.h for TCP_SND_QUEUELEN: (4*TCP_SND_BUF + (TCP_MSS - 1))/TCP_MSS -----*/ -#define TCP_SND_QUEUELEN 9 -/*----- Value in opt.h for TCP_SNDLOWAT: LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -*/ -#define TCP_SNDLOWAT 1071 -/*----- Value in opt.h for TCP_SNDQUEUELOWAT: LWIP_MAX(TCP_SND_QUEUELEN)/2, 5) -*/ -#define TCP_SNDQUEUELOWAT 5 -/*----- Value in opt.h for TCP_WND_UPDATE_THRESHOLD: LWIP_MIN(TCP_WND/4, TCP_MSS*4) -----*/ -#define TCP_WND_UPDATE_THRESHOLD 536 -/*----- Value in opt.h for LWIP_NETIF_LINK_CALLBACK: 0 -----*/ -#define LWIP_NETIF_LINK_CALLBACK 1 -/*----- Value in opt.h for LWIP_NETCONN: 1 -----*/ -#define LWIP_NETCONN 0 -/*----- Value in opt.h for LWIP_SOCKET: 1 -----*/ -#define LWIP_SOCKET 0 -/*----- Value in opt.h for RECV_BUFSIZE_DEFAULT: INT_MAX -----*/ -#define RECV_BUFSIZE_DEFAULT 2000000000 -/*----- Value in opt.h for LWIP_STATS: 1 -----*/ -#define LWIP_STATS 0 -/*----- Value in opt.h for CHECKSUM_GEN_IP: 1 -----*/ -#define CHECKSUM_GEN_IP 0 -/*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/ -#define CHECKSUM_GEN_UDP 0 -/*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/ -#define CHECKSUM_GEN_TCP 0 -/*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/ -#define CHECKSUM_GEN_ICMP 0 -/*----- Value in opt.h for CHECKSUM_GEN_ICMP6: 1 -----*/ -#define CHECKSUM_GEN_ICMP6 0 -/*----- Value in opt.h for CHECKSUM_CHECK_IP: 1 -----*/ -#define CHECKSUM_CHECK_IP 0 -/*----- Value in opt.h for CHECKSUM_CHECK_UDP: 1 -----*/ -#define CHECKSUM_CHECK_UDP 0 -/*----- Value in opt.h for CHECKSUM_CHECK_TCP: 1 -----*/ -#define CHECKSUM_CHECK_TCP 0 -/*----- Value in opt.h for CHECKSUM_CHECK_ICMP: 1 -----*/ -#define CHECKSUM_CHECK_ICMP 0 -/*----- Value in opt.h for CHECKSUM_CHECK_ICMP6: 1 -----*/ -#define CHECKSUM_CHECK_ICMP6 0 -/*-----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -#ifdef __cplusplus -} -#endif -#endif /*__LWIPOPTS__H__ */ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * File Name : Target/lwipopts.h + * Description : This file overrides LwIP stack default configuration + * done in opt.h file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion --------------------------------------*/ +#ifndef __LWIPOPTS__H__ +#define __LWIPOPTS__H__ + +#include "main.h" + +/*-----------------------------------------------------------------------------*/ +/* Current version of LwIP supported by CubeMx: 2.0.3 -*/ +/*-----------------------------------------------------------------------------*/ + +/* Within 'USER CODE' section, code will be kept by default at each generation */ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +#ifdef __cplusplus + extern "C" { +#endif + +/* STM32CubeMX Specific Parameters (not defined in opt.h) ---------------------*/ +/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/ +/*----- WITH_RTOS disabled (Since FREERTOS is not set) -----*/ +#define WITH_RTOS 0 +/*----- CHECKSUM_BY_HARDWARE enabled -----*/ +#define CHECKSUM_BY_HARDWARE 1 +/*-----------------------------------------------------------------------------*/ + +/* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/ +/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/ +/*----- Value in opt.h for LWIP_DHCP: 0 -----*/ +#define LWIP_DHCP 1 +/*----- Value in opt.h for NO_SYS: 0 -----*/ +#define NO_SYS 1 +/*----- Value in opt.h for SYS_LIGHTWEIGHT_PROT: 1 -----*/ +#define SYS_LIGHTWEIGHT_PROT 0 +/*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/ +#define MEM_ALIGNMENT 4 +/*----- Value in opt.h for MEMP_NUM_SYS_TIMEOUT: (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) -*/ +#define MEMP_NUM_SYS_TIMEOUT 5 +/*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/ +#define LWIP_ETHERNET 1 +/*----- Value in opt.h for LWIP_DNS_SECURE: (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) -*/ +#define LWIP_DNS_SECURE 7 +/*----- Value in opt.h for TCP_SND_QUEUELEN: (4*TCP_SND_BUF + (TCP_MSS - 1))/TCP_MSS -----*/ +#define TCP_SND_QUEUELEN 9 +/*----- Value in opt.h for TCP_SNDLOWAT: LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -*/ +#define TCP_SNDLOWAT 1071 +/*----- Value in opt.h for TCP_SNDQUEUELOWAT: LWIP_MAX(TCP_SND_QUEUELEN)/2, 5) -*/ +#define TCP_SNDQUEUELOWAT 5 +/*----- Value in opt.h for TCP_WND_UPDATE_THRESHOLD: LWIP_MIN(TCP_WND/4, TCP_MSS*4) -----*/ +#define TCP_WND_UPDATE_THRESHOLD 536 +/*----- Value in opt.h for LWIP_NETIF_LINK_CALLBACK: 0 -----*/ +#define LWIP_NETIF_LINK_CALLBACK 1 +/*----- Value in opt.h for LWIP_NETCONN: 1 -----*/ +#define LWIP_NETCONN 0 +/*----- Value in opt.h for LWIP_SOCKET: 1 -----*/ +#define LWIP_SOCKET 0 +/*----- Value in opt.h for RECV_BUFSIZE_DEFAULT: INT_MAX -----*/ +#define RECV_BUFSIZE_DEFAULT 2000000000 +/*----- Value in opt.h for LWIP_STATS: 1 -----*/ +#define LWIP_STATS 0 +/*----- Value in opt.h for CHECKSUM_GEN_IP: 1 -----*/ +#define CHECKSUM_GEN_IP 0 +/*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/ +#define CHECKSUM_GEN_UDP 0 +/*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/ +#define CHECKSUM_GEN_TCP 0 +/*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/ +#define CHECKSUM_GEN_ICMP 0 +/*----- Value in opt.h for CHECKSUM_GEN_ICMP6: 1 -----*/ +#define CHECKSUM_GEN_ICMP6 0 +/*----- Value in opt.h for CHECKSUM_CHECK_IP: 1 -----*/ +#define CHECKSUM_CHECK_IP 0 +/*----- Value in opt.h for CHECKSUM_CHECK_UDP: 1 -----*/ +#define CHECKSUM_CHECK_UDP 0 +/*----- Value in opt.h for CHECKSUM_CHECK_TCP: 1 -----*/ +#define CHECKSUM_CHECK_TCP 0 +/*----- Value in opt.h for CHECKSUM_CHECK_ICMP: 1 -----*/ +#define CHECKSUM_CHECK_ICMP 0 +/*----- Value in opt.h for CHECKSUM_CHECK_ICMP6: 1 -----*/ +#define CHECKSUM_CHECK_ICMP6 0 +/*-----------------------------------------------------------------------------*/ +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +#ifdef __cplusplus +} +#endif +#endif /*__LWIPOPTS__H__ */ diff --git a/STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.ioc b/STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.ioc index a47c8d8..f88636d 100644 --- a/STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.ioc +++ b/STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.ioc @@ -1,383 +1,383 @@ -#MicroXplorer Configuration settings - do not modify -CAD.formats= -CAD.pinconfig= -CAD.provider= -ETH.IPParameters=MediaInterface,PHY_Name,PHY_Value,PhyAddress -ETH.MediaInterface=ETH_MEDIA_INTERFACE_RMII -ETH.PHY_Name=LAN8742A_PHY_ADDRESS -ETH.PHY_Value=0 -ETH.PhyAddress=0 -File.Version=6 -GPIO.groupedBy=Group By Peripherals -KeepUserPlacement=false -LWIP.Version=v2.0.3_Cube -Mcu.CPN=STM32F207ZGT6 -Mcu.Family=STM32F2 -Mcu.IP0=ETH -Mcu.IP1=LWIP -Mcu.IP2=NVIC -Mcu.IP3=RCC -Mcu.IP4=SYS -Mcu.IP5=TIM1 -Mcu.IP6=TIM3 -Mcu.IP7=TIM7 -Mcu.IP8=USART3 -Mcu.IP9=USB_OTG_FS -Mcu.IPNb=10 -Mcu.Name=STM32F207Z(C-E-F-G)Tx -Mcu.Package=LQFP144 -Mcu.Pin0=PC13 -Mcu.Pin1=PC14-OSC32_IN -Mcu.Pin10=PC4 -Mcu.Pin11=PC5 -Mcu.Pin12=PB0 -Mcu.Pin13=PB1 -Mcu.Pin14=PE9 -Mcu.Pin15=PE11 -Mcu.Pin16=PE13 -Mcu.Pin17=PE14 -Mcu.Pin18=PB13 -Mcu.Pin19=PB14 -Mcu.Pin2=PC15-OSC32_OUT -Mcu.Pin20=PD8 -Mcu.Pin21=PD9 -Mcu.Pin22=PG6 -Mcu.Pin23=PG7 -Mcu.Pin24=PC7 -Mcu.Pin25=PC8 -Mcu.Pin26=PA8 -Mcu.Pin27=PA9 -Mcu.Pin28=PA10 -Mcu.Pin29=PA11 -Mcu.Pin3=PH0-OSC_IN -Mcu.Pin30=PA12 -Mcu.Pin31=PA13 -Mcu.Pin32=PA14 -Mcu.Pin33=PG11 -Mcu.Pin34=PG13 -Mcu.Pin35=PB3 -Mcu.Pin36=PB7 -Mcu.Pin37=VP_LWIP_VS_Enabled -Mcu.Pin38=VP_SYS_VS_Systick -Mcu.Pin39=VP_TIM1_VS_ClockSourceINT -Mcu.Pin4=PH1-OSC_OUT -Mcu.Pin40=VP_TIM3_VS_ClockSourceINT -Mcu.Pin41=VP_TIM7_VS_ClockSourceINT -Mcu.Pin5=PC1 -Mcu.Pin6=PA1 -Mcu.Pin7=PA2 -Mcu.Pin8=PA6 -Mcu.Pin9=PA7 -Mcu.PinsNb=42 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32F207ZGTx -MxCube.Version=6.9.1 -MxDb.Version=DB.6.0.91 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -NVIC.ForceEnableDMAVector=true -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:false -NVIC.TIM7_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false -PA1.GPIOParameters=GPIO_Label -PA1.GPIO_Label=RMII_REF_CLK [LAN8742A-CZ-TR_REFCLK0] -PA1.Locked=true -PA1.Mode=RMII -PA1.Signal=ETH_REF_CLK -PA10.GPIOParameters=GPIO_Label -PA10.GPIO_Label=USB_ID -PA10.Locked=true -PA10.Signal=USB_OTG_FS_ID -PA11.GPIOParameters=GPIO_Label -PA11.GPIO_Label=USB_DM -PA11.Locked=true -PA11.Mode=Device_Only -PA11.Signal=USB_OTG_FS_DM -PA12.GPIOParameters=GPIO_Label -PA12.GPIO_Label=USB_DP -PA12.Locked=true -PA12.Mode=Device_Only -PA12.Signal=USB_OTG_FS_DP -PA13.GPIOParameters=GPIO_Label -PA13.GPIO_Label=TMS -PA13.Locked=true -PA13.Mode=Serial_Wire -PA13.Signal=SYS_JTMS-SWDIO -PA14.GPIOParameters=GPIO_Label -PA14.GPIO_Label=TCK -PA14.Locked=true -PA14.Mode=Serial_Wire -PA14.Signal=SYS_JTCK-SWCLK -PA2.GPIOParameters=GPIO_Label -PA2.GPIO_Label=RMII_MDIO [LAN8742A-CZ-TR_MDIO] -PA2.Locked=true -PA2.Mode=RMII -PA2.Signal=ETH_MDIO -PA6.GPIOParameters=GPIO_Label -PA6.GPIO_Label=PWM5 -PA6.Signal=S_TIM3_CH1 -PA7.GPIOParameters=GPIO_Label -PA7.GPIO_Label=RMII_CRS_DV [LAN8742A-CZ-TR_CRS_DV] -PA7.Locked=true -PA7.Mode=RMII -PA7.Signal=ETH_CRS_DV -PA8.GPIOParameters=GPIO_Label -PA8.GPIO_Label=USB_SOF [TP1] -PA8.Locked=true -PA8.Mode=Activate_SOF_FS -PA8.Signal=USB_OTG_FS_SOF -PA9.GPIOParameters=GPIO_Label -PA9.GPIO_Label=USB_VBUS -PA9.Locked=true -PA9.Mode=Activate_VBUS -PA9.Signal=USB_OTG_FS_VBUS -PB0.GPIOParameters=GPIO_Label -PB0.GPIO_Label=LD1 [Green] -PB0.Locked=true -PB0.Signal=GPIO_Output -PB1.GPIOParameters=GPIO_Label -PB1.GPIO_Label=PWM6 -PB1.Signal=S_TIM3_CH4 -PB13.GPIOParameters=GPIO_Label -PB13.GPIO_Label=RMII_TXD1 [LAN8742A-CZ-TR_TXD1] -PB13.Locked=true -PB13.Mode=RMII -PB13.Signal=ETH_TXD1 -PB14.GPIOParameters=GPIO_Label -PB14.GPIO_Label=LD3 [Red] -PB14.Locked=true -PB14.Signal=GPIO_Output -PB3.GPIOParameters=GPIO_Label -PB3.GPIO_Label=SWO -PB3.Locked=true -PB3.Signal=SYS_JTDO-SWO -PB7.GPIOParameters=GPIO_Label -PB7.GPIO_Label=LD2 [Blue] -PB7.Locked=true -PB7.Signal=GPIO_Output -PC1.GPIOParameters=GPIO_Label -PC1.GPIO_Label=RMII_MDC [LAN8742A-CZ-TR_MDC] -PC1.Locked=true -PC1.Mode=RMII -PC1.Signal=ETH_MDC -PC13.GPIOParameters=GPIO_Label -PC13.GPIO_Label=USER_Btn [B1] -PC13.Locked=true -PC13.Signal=GPXTI13 -PC14-OSC32_IN.Locked=true -PC14-OSC32_IN.Mode=LSE-External-Oscillator -PC14-OSC32_IN.Signal=RCC_OSC32_IN -PC15-OSC32_OUT.Locked=true -PC15-OSC32_OUT.Mode=LSE-External-Oscillator -PC15-OSC32_OUT.Signal=RCC_OSC32_OUT -PC4.GPIOParameters=GPIO_Label -PC4.GPIO_Label=RMII_RXD0 [LAN8742A-CZ-TR_RXD0] -PC4.Locked=true -PC4.Mode=RMII -PC4.Signal=ETH_RXD0 -PC5.GPIOParameters=GPIO_Label -PC5.GPIO_Label=RMII_RXD1 [LAN8742A-CZ-TR_RXD1] -PC5.Locked=true -PC5.Mode=RMII -PC5.Signal=ETH_RXD1 -PC7.GPIOParameters=GPIO_Label -PC7.GPIO_Label=PWM7 -PC7.Signal=S_TIM3_CH2 -PC8.GPIOParameters=GPIO_Label -PC8.GPIO_Label=PWM8 -PC8.Signal=S_TIM3_CH3 -PD8.GPIOParameters=GPIO_Label -PD8.GPIO_Label=STLK_RX [STM32F103CBT6_PA2] -PD8.Locked=true -PD8.Mode=Asynchronous -PD8.Signal=USART3_TX -PD9.GPIOParameters=GPIO_Label -PD9.GPIO_Label=STLK_TX [STM32F103CBT6_PA3] -PD9.Locked=true -PD9.Mode=Asynchronous -PD9.Signal=USART3_RX -PE11.GPIOParameters=GPIO_Label -PE11.GPIO_Label=PWM2 -PE11.Signal=S_TIM1_CH2 -PE13.GPIOParameters=GPIO_Label -PE13.GPIO_Label=PWM3 -PE13.Signal=S_TIM1_CH3 -PE14.GPIOParameters=GPIO_Label -PE14.GPIO_Label=PWM4 -PE14.Signal=S_TIM1_CH4 -PE9.GPIOParameters=GPIO_Label -PE9.GPIO_Label=PWM1 -PE9.Signal=S_TIM1_CH1 -PG11.GPIOParameters=GPIO_Label -PG11.GPIO_Label=RMII_TX_EN [LAN8742A-CZ-TR_TXEN] -PG11.Locked=true -PG11.Mode=RMII -PG11.Signal=ETH_TX_EN -PG13.GPIOParameters=GPIO_Label -PG13.GPIO_Label=RMII_TXD0 [LAN8742A-CZ-TR_TXD0] -PG13.Locked=true -PG13.Mode=RMII -PG13.Signal=ETH_TXD0 -PG6.GPIOParameters=GPIO_Label -PG6.GPIO_Label=USB_PowerSwitchOn [STMPS2151STR_EN] -PG6.Locked=true -PG6.Signal=GPIO_Output -PG7.GPIOParameters=GPIO_Label -PG7.GPIO_Label=USB_OverCurrent [STMPS2151STR_FAULT] -PG7.Locked=true -PG7.Signal=GPIO_Input -PH0-OSC_IN.GPIOParameters=GPIO_Label -PH0-OSC_IN.GPIO_Label=MCO [STM32F103CBT6_PA8] -PH0-OSC_IN.Locked=true -PH0-OSC_IN.Mode=HSE-External-Clock-Source -PH0-OSC_IN.Signal=RCC_OSC_IN -PH1-OSC_OUT.Locked=true -PH1-OSC_OUT.Mode=HSE-External-Clock-Source -PH1-OSC_OUT.Signal=RCC_OSC_OUT -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=6 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=false -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32F207ZGTx -ProjectManager.FirmwarePackage=STM32Cube FW_F2 V1.9.4 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x200 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Core/Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain= -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=LightControlConvi_Nucleo207ZG.ioc -ProjectManager.ProjectName=LightControlConvi_Nucleo207ZG -ProjectManager.ProjectStructure= -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=STM32CubeIDE -ProjectManager.ToolChainLocation= -ProjectManager.UAScriptAfterPath= -ProjectManager.UAScriptBeforePath= -ProjectManager.UnderRoot=true -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_ETH_Init-ETH-false-HAL-true,3-MX_USART3_UART_Init-USART3-false-HAL-true,4-MX_USB_OTG_FS_PCD_Init-USB_OTG_FS-false-HAL-true,5-MX_TIM1_Init-TIM1-false-HAL-true,6-MX_TIM3_Init-TIM3-false-HAL-true -RCC.48MHZClocksFreq_Value=48000000 -RCC.ADC12outputFreq_Value=72000000 -RCC.ADC34outputFreq_Value=72000000 -RCC.AHBFreq_Value=120000000 -RCC.APB1CLKDivider=RCC_HCLK_DIV4 -RCC.APB1Freq_Value=30000000 -RCC.APB1TimFreq_Value=60000000 -RCC.APB2CLKDivider=RCC_HCLK_DIV2 -RCC.APB2Freq_Value=60000000 -RCC.APB2TimFreq_Value=120000000 -RCC.CortexFreq_Value=120000000 -RCC.EthernetFreq_Value=120000000 -RCC.FCLKCortexFreq_Value=120000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=120000000 -RCC.HSE_VALUE=8000000 -RCC.HSI_VALUE=16000000 -RCC.I2C1Freq_Value=8000000 -RCC.I2C2Freq_Value=8000000 -RCC.I2C3Freq_Value=8000000 -RCC.I2SClocksFreq_Value=118153846.15384614 -RCC.IPParameters=48MHZClocksFreq_Value,ADC12outputFreq_Value,ADC34outputFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2SClocksFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLM,PLLMCOFreq_Value,PLLMUL,PLLN,PLLQ,PRESCALERUSB,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,SYSCLKSourceVirtual,TIM15Freq_Value,TIM16Freq_Value,TIM17Freq_Value,TIM1Freq_Value,TIM20Freq_Value,TIM2Freq_Value,TIM3Freq_Value,TIM8Freq_Value,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutput2Freq_Value,VCOOutputFreq_Value,VcooutputI2S,WatchDogFreq_Value -RCC.LSI_VALUE=32000 -RCC.MCO1PinFreq_Value=16000000 -RCC.MCO2PinFreq_Value=120000000 -RCC.MCOFreq_Value=72000000 -RCC.PLLCLKFreq_Value=120000000 -RCC.PLLM=13 -RCC.PLLMCOFreq_Value=72000000 -RCC.PLLMUL=RCC_PLL_MUL9 -RCC.PLLN=195 -RCC.PLLQ=5 -RCC.PRESCALERUSB=RCC_USBCLKSOURCE_PLL_DIV1_5 -RCC.RTCFreq_Value=32000 -RCC.RTCHSEDivFreq_Value=4000000 -RCC.SYSCLKFreq_VALUE=120000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.SYSCLKSourceVirtual=RCC_SYSCLKSOURCE_PLLCLK -RCC.TIM15Freq_Value=72000000 -RCC.TIM16Freq_Value=72000000 -RCC.TIM17Freq_Value=72000000 -RCC.TIM1Freq_Value=72000000 -RCC.TIM20Freq_Value=72000000 -RCC.TIM2Freq_Value=72000000 -RCC.TIM3Freq_Value=72000000 -RCC.TIM8Freq_Value=72000000 -RCC.UART4Freq_Value=36000000 -RCC.UART5Freq_Value=36000000 -RCC.USART1Freq_Value=72000000 -RCC.USART2Freq_Value=36000000 -RCC.USART3Freq_Value=36000000 -RCC.USBFreq_Value=48000000 -RCC.VCOI2SOutputFreq_Value=236307692.3076923 -RCC.VCOInputFreq_Value=1230769.2307692308 -RCC.VCOOutput2Freq_Value=8000000 -RCC.VCOOutputFreq_Value=240000000 -RCC.VcooutputI2S=118153846.15384614 -RCC.WatchDogFreq_Value=32000 -SH.GPXTI13.0=GPIO_EXTI13 -SH.GPXTI13.ConfNb=1 -SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1 -SH.S_TIM1_CH1.ConfNb=1 -SH.S_TIM1_CH2.0=TIM1_CH2,PWM Generation2 CH2 -SH.S_TIM1_CH2.ConfNb=1 -SH.S_TIM1_CH3.0=TIM1_CH3,PWM Generation3 CH3 -SH.S_TIM1_CH3.ConfNb=1 -SH.S_TIM1_CH4.0=TIM1_CH4,PWM Generation4 CH4 -SH.S_TIM1_CH4.ConfNb=1 -SH.S_TIM3_CH1.0=TIM3_CH1,PWM Generation1 CH1 -SH.S_TIM3_CH1.ConfNb=1 -SH.S_TIM3_CH2.0=TIM3_CH2,PWM Generation2 CH2 -SH.S_TIM3_CH2.ConfNb=1 -SH.S_TIM3_CH3.0=TIM3_CH3,PWM Generation3 CH3 -SH.S_TIM3_CH3.ConfNb=1 -SH.S_TIM3_CH4.0=TIM3_CH4,PWM Generation4 CH4 -SH.S_TIM3_CH4.ConfNb=1 -TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 -TIM1.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 -TIM1.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 -TIM1.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 -TIM1.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4,Period -TIM1.Period=16383 -TIM3.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 -TIM3.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 -TIM3.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 -TIM3.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 -TIM3.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4,Period -TIM3.Period=16383 -TIM7.IPParameters=Prescaler,Period -TIM7.Period=1000 -TIM7.Prescaler=120 -USART3.IPParameters=VirtualMode -USART3.VirtualMode=VM_ASYNC -USB_OTG_FS.IPParameters=VirtualMode -USB_OTG_FS.VirtualMode=Device_Only -VP_LWIP_VS_Enabled.Mode=Enabled -VP_LWIP_VS_Enabled.Signal=LWIP_VS_Enabled -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -VP_TIM1_VS_ClockSourceINT.Mode=Internal -VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT -VP_TIM3_VS_ClockSourceINT.Mode=Internal -VP_TIM3_VS_ClockSourceINT.Signal=TIM3_VS_ClockSourceINT -VP_TIM7_VS_ClockSourceINT.Mode=Enable_Timer -VP_TIM7_VS_ClockSourceINT.Signal=TIM7_VS_ClockSourceINT -board=NUCLEO-F207ZG -boardIOC=true -isbadioc=false +#MicroXplorer Configuration settings - do not modify +CAD.formats= +CAD.pinconfig= +CAD.provider= +ETH.IPParameters=MediaInterface,PHY_Name,PHY_Value,PhyAddress +ETH.MediaInterface=ETH_MEDIA_INTERFACE_RMII +ETH.PHY_Name=LAN8742A_PHY_ADDRESS +ETH.PHY_Value=0 +ETH.PhyAddress=0 +File.Version=6 +GPIO.groupedBy=Group By Peripherals +KeepUserPlacement=false +LWIP.Version=v2.0.3_Cube +Mcu.CPN=STM32F207ZGT6 +Mcu.Family=STM32F2 +Mcu.IP0=ETH +Mcu.IP1=LWIP +Mcu.IP2=NVIC +Mcu.IP3=RCC +Mcu.IP4=SYS +Mcu.IP5=TIM1 +Mcu.IP6=TIM3 +Mcu.IP7=TIM7 +Mcu.IP8=USART3 +Mcu.IP9=USB_OTG_FS +Mcu.IPNb=10 +Mcu.Name=STM32F207Z(C-E-F-G)Tx +Mcu.Package=LQFP144 +Mcu.Pin0=PC13 +Mcu.Pin1=PC14-OSC32_IN +Mcu.Pin10=PC4 +Mcu.Pin11=PC5 +Mcu.Pin12=PB0 +Mcu.Pin13=PB1 +Mcu.Pin14=PE9 +Mcu.Pin15=PE11 +Mcu.Pin16=PE13 +Mcu.Pin17=PE14 +Mcu.Pin18=PB13 +Mcu.Pin19=PB14 +Mcu.Pin2=PC15-OSC32_OUT +Mcu.Pin20=PD8 +Mcu.Pin21=PD9 +Mcu.Pin22=PG6 +Mcu.Pin23=PG7 +Mcu.Pin24=PC7 +Mcu.Pin25=PC8 +Mcu.Pin26=PA8 +Mcu.Pin27=PA9 +Mcu.Pin28=PA10 +Mcu.Pin29=PA11 +Mcu.Pin3=PH0-OSC_IN +Mcu.Pin30=PA12 +Mcu.Pin31=PA13 +Mcu.Pin32=PA14 +Mcu.Pin33=PG11 +Mcu.Pin34=PG13 +Mcu.Pin35=PB3 +Mcu.Pin36=PB7 +Mcu.Pin37=VP_LWIP_VS_Enabled +Mcu.Pin38=VP_SYS_VS_Systick +Mcu.Pin39=VP_TIM1_VS_ClockSourceINT +Mcu.Pin4=PH1-OSC_OUT +Mcu.Pin40=VP_TIM3_VS_ClockSourceINT +Mcu.Pin41=VP_TIM7_VS_ClockSourceINT +Mcu.Pin5=PC1 +Mcu.Pin6=PA1 +Mcu.Pin7=PA2 +Mcu.Pin8=PA6 +Mcu.Pin9=PA7 +Mcu.PinsNb=42 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32F207ZGTx +MxCube.Version=6.9.2 +MxDb.Version=DB.6.0.92 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:false +NVIC.TIM7_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false +PA1.GPIOParameters=GPIO_Label +PA1.GPIO_Label=RMII_REF_CLK [LAN8742A-CZ-TR_REFCLK0] +PA1.Locked=true +PA1.Mode=RMII +PA1.Signal=ETH_REF_CLK +PA10.GPIOParameters=GPIO_Label +PA10.GPIO_Label=USB_ID +PA10.Locked=true +PA10.Signal=USB_OTG_FS_ID +PA11.GPIOParameters=GPIO_Label +PA11.GPIO_Label=USB_DM +PA11.Locked=true +PA11.Mode=Device_Only +PA11.Signal=USB_OTG_FS_DM +PA12.GPIOParameters=GPIO_Label +PA12.GPIO_Label=USB_DP +PA12.Locked=true +PA12.Mode=Device_Only +PA12.Signal=USB_OTG_FS_DP +PA13.GPIOParameters=GPIO_Label +PA13.GPIO_Label=TMS +PA13.Locked=true +PA13.Mode=Serial_Wire +PA13.Signal=SYS_JTMS-SWDIO +PA14.GPIOParameters=GPIO_Label +PA14.GPIO_Label=TCK +PA14.Locked=true +PA14.Mode=Serial_Wire +PA14.Signal=SYS_JTCK-SWCLK +PA2.GPIOParameters=GPIO_Label +PA2.GPIO_Label=RMII_MDIO [LAN8742A-CZ-TR_MDIO] +PA2.Locked=true +PA2.Mode=RMII +PA2.Signal=ETH_MDIO +PA6.GPIOParameters=GPIO_Label +PA6.GPIO_Label=PWM5 +PA6.Signal=S_TIM3_CH1 +PA7.GPIOParameters=GPIO_Label +PA7.GPIO_Label=RMII_CRS_DV [LAN8742A-CZ-TR_CRS_DV] +PA7.Locked=true +PA7.Mode=RMII +PA7.Signal=ETH_CRS_DV +PA8.GPIOParameters=GPIO_Label +PA8.GPIO_Label=USB_SOF [TP1] +PA8.Locked=true +PA8.Mode=Activate_SOF_FS +PA8.Signal=USB_OTG_FS_SOF +PA9.GPIOParameters=GPIO_Label +PA9.GPIO_Label=USB_VBUS +PA9.Locked=true +PA9.Mode=Activate_VBUS +PA9.Signal=USB_OTG_FS_VBUS +PB0.GPIOParameters=GPIO_Label +PB0.GPIO_Label=LD1 [Green] +PB0.Locked=true +PB0.Signal=GPIO_Output +PB1.GPIOParameters=GPIO_Label +PB1.GPIO_Label=PWM6 +PB1.Signal=S_TIM3_CH4 +PB13.GPIOParameters=GPIO_Label +PB13.GPIO_Label=RMII_TXD1 [LAN8742A-CZ-TR_TXD1] +PB13.Locked=true +PB13.Mode=RMII +PB13.Signal=ETH_TXD1 +PB14.GPIOParameters=GPIO_Label +PB14.GPIO_Label=LD3 [Red] +PB14.Locked=true +PB14.Signal=GPIO_Output +PB3.GPIOParameters=GPIO_Label +PB3.GPIO_Label=SWO +PB3.Locked=true +PB3.Signal=SYS_JTDO-SWO +PB7.GPIOParameters=GPIO_Label +PB7.GPIO_Label=LD2 [Blue] +PB7.Locked=true +PB7.Signal=GPIO_Output +PC1.GPIOParameters=GPIO_Label +PC1.GPIO_Label=RMII_MDC [LAN8742A-CZ-TR_MDC] +PC1.Locked=true +PC1.Mode=RMII +PC1.Signal=ETH_MDC +PC13.GPIOParameters=GPIO_Label +PC13.GPIO_Label=USER_Btn [B1] +PC13.Locked=true +PC13.Signal=GPXTI13 +PC14-OSC32_IN.Locked=true +PC14-OSC32_IN.Mode=LSE-External-Oscillator +PC14-OSC32_IN.Signal=RCC_OSC32_IN +PC15-OSC32_OUT.Locked=true +PC15-OSC32_OUT.Mode=LSE-External-Oscillator +PC15-OSC32_OUT.Signal=RCC_OSC32_OUT +PC4.GPIOParameters=GPIO_Label +PC4.GPIO_Label=RMII_RXD0 [LAN8742A-CZ-TR_RXD0] +PC4.Locked=true +PC4.Mode=RMII +PC4.Signal=ETH_RXD0 +PC5.GPIOParameters=GPIO_Label +PC5.GPIO_Label=RMII_RXD1 [LAN8742A-CZ-TR_RXD1] +PC5.Locked=true +PC5.Mode=RMII +PC5.Signal=ETH_RXD1 +PC7.GPIOParameters=GPIO_Label +PC7.GPIO_Label=PWM7 +PC7.Signal=S_TIM3_CH2 +PC8.GPIOParameters=GPIO_Label +PC8.GPIO_Label=PWM8 +PC8.Signal=S_TIM3_CH3 +PD8.GPIOParameters=GPIO_Label +PD8.GPIO_Label=STLK_RX [STM32F103CBT6_PA2] +PD8.Locked=true +PD8.Mode=Asynchronous +PD8.Signal=USART3_TX +PD9.GPIOParameters=GPIO_Label +PD9.GPIO_Label=STLK_TX [STM32F103CBT6_PA3] +PD9.Locked=true +PD9.Mode=Asynchronous +PD9.Signal=USART3_RX +PE11.GPIOParameters=GPIO_Label +PE11.GPIO_Label=PWM2 +PE11.Signal=S_TIM1_CH2 +PE13.GPIOParameters=GPIO_Label +PE13.GPIO_Label=PWM3 +PE13.Signal=S_TIM1_CH3 +PE14.GPIOParameters=GPIO_Label +PE14.GPIO_Label=PWM4 +PE14.Signal=S_TIM1_CH4 +PE9.GPIOParameters=GPIO_Label +PE9.GPIO_Label=PWM1 +PE9.Signal=S_TIM1_CH1 +PG11.GPIOParameters=GPIO_Label +PG11.GPIO_Label=RMII_TX_EN [LAN8742A-CZ-TR_TXEN] +PG11.Locked=true +PG11.Mode=RMII +PG11.Signal=ETH_TX_EN +PG13.GPIOParameters=GPIO_Label +PG13.GPIO_Label=RMII_TXD0 [LAN8742A-CZ-TR_TXD0] +PG13.Locked=true +PG13.Mode=RMII +PG13.Signal=ETH_TXD0 +PG6.GPIOParameters=GPIO_Label +PG6.GPIO_Label=USB_PowerSwitchOn [STMPS2151STR_EN] +PG6.Locked=true +PG6.Signal=GPIO_Output +PG7.GPIOParameters=GPIO_Label +PG7.GPIO_Label=USB_OverCurrent [STMPS2151STR_FAULT] +PG7.Locked=true +PG7.Signal=GPIO_Input +PH0-OSC_IN.GPIOParameters=GPIO_Label +PH0-OSC_IN.GPIO_Label=MCO [STM32F103CBT6_PA8] +PH0-OSC_IN.Locked=true +PH0-OSC_IN.Mode=HSE-External-Clock-Source +PH0-OSC_IN.Signal=RCC_OSC_IN +PH1-OSC_OUT.Locked=true +PH1-OSC_OUT.Mode=HSE-External-Clock-Source +PH1-OSC_OUT.Signal=RCC_OSC_OUT +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=false +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32F207ZGTx +ProjectManager.FirmwarePackage=STM32Cube FW_F2 V1.9.4 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=1 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=LightControlConvi_Nucleo207ZG.ioc +ProjectManager.ProjectName=LightControlConvi_Nucleo207ZG +ProjectManager.ProjectStructure= +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=STM32CubeIDE +ProjectManager.ToolChainLocation= +ProjectManager.UAScriptAfterPath= +ProjectManager.UAScriptBeforePath= +ProjectManager.UnderRoot=true +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USART3_UART_Init-USART3-false-HAL-true,4-MX_USB_OTG_FS_PCD_Init-USB_OTG_FS-false-HAL-true,5-MX_TIM1_Init-TIM1-false-HAL-true,6-MX_TIM3_Init-TIM3-false-HAL-true,7-MX_TIM7_Init-TIM7-false-HAL-true,8-MX_LWIP_Init-LWIP-false-HAL-false +RCC.48MHZClocksFreq_Value=48000000 +RCC.ADC12outputFreq_Value=72000000 +RCC.ADC34outputFreq_Value=72000000 +RCC.AHBFreq_Value=120000000 +RCC.APB1CLKDivider=RCC_HCLK_DIV4 +RCC.APB1Freq_Value=30000000 +RCC.APB1TimFreq_Value=60000000 +RCC.APB2CLKDivider=RCC_HCLK_DIV2 +RCC.APB2Freq_Value=60000000 +RCC.APB2TimFreq_Value=120000000 +RCC.CortexFreq_Value=120000000 +RCC.EthernetFreq_Value=120000000 +RCC.FCLKCortexFreq_Value=120000000 +RCC.FamilyName=M +RCC.HCLKFreq_Value=120000000 +RCC.HSE_VALUE=8000000 +RCC.HSI_VALUE=16000000 +RCC.I2C1Freq_Value=8000000 +RCC.I2C2Freq_Value=8000000 +RCC.I2C3Freq_Value=8000000 +RCC.I2SClocksFreq_Value=118153846.15384614 +RCC.IPParameters=48MHZClocksFreq_Value,ADC12outputFreq_Value,ADC34outputFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2SClocksFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLM,PLLMCOFreq_Value,PLLMUL,PLLN,PLLQ,PRESCALERUSB,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,SYSCLKSourceVirtual,TIM15Freq_Value,TIM16Freq_Value,TIM17Freq_Value,TIM1Freq_Value,TIM20Freq_Value,TIM2Freq_Value,TIM3Freq_Value,TIM8Freq_Value,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutput2Freq_Value,VCOOutputFreq_Value,VcooutputI2S,WatchDogFreq_Value +RCC.LSI_VALUE=32000 +RCC.MCO1PinFreq_Value=16000000 +RCC.MCO2PinFreq_Value=120000000 +RCC.MCOFreq_Value=72000000 +RCC.PLLCLKFreq_Value=120000000 +RCC.PLLM=13 +RCC.PLLMCOFreq_Value=72000000 +RCC.PLLMUL=RCC_PLL_MUL9 +RCC.PLLN=195 +RCC.PLLQ=5 +RCC.PRESCALERUSB=RCC_USBCLKSOURCE_PLL_DIV1_5 +RCC.RTCFreq_Value=32000 +RCC.RTCHSEDivFreq_Value=4000000 +RCC.SYSCLKFreq_VALUE=120000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.SYSCLKSourceVirtual=RCC_SYSCLKSOURCE_PLLCLK +RCC.TIM15Freq_Value=72000000 +RCC.TIM16Freq_Value=72000000 +RCC.TIM17Freq_Value=72000000 +RCC.TIM1Freq_Value=72000000 +RCC.TIM20Freq_Value=72000000 +RCC.TIM2Freq_Value=72000000 +RCC.TIM3Freq_Value=72000000 +RCC.TIM8Freq_Value=72000000 +RCC.UART4Freq_Value=36000000 +RCC.UART5Freq_Value=36000000 +RCC.USART1Freq_Value=72000000 +RCC.USART2Freq_Value=36000000 +RCC.USART3Freq_Value=36000000 +RCC.USBFreq_Value=48000000 +RCC.VCOI2SOutputFreq_Value=236307692.3076923 +RCC.VCOInputFreq_Value=1230769.2307692308 +RCC.VCOOutput2Freq_Value=8000000 +RCC.VCOOutputFreq_Value=240000000 +RCC.VcooutputI2S=118153846.15384614 +RCC.WatchDogFreq_Value=32000 +SH.GPXTI13.0=GPIO_EXTI13 +SH.GPXTI13.ConfNb=1 +SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1 +SH.S_TIM1_CH1.ConfNb=1 +SH.S_TIM1_CH2.0=TIM1_CH2,PWM Generation2 CH2 +SH.S_TIM1_CH2.ConfNb=1 +SH.S_TIM1_CH3.0=TIM1_CH3,PWM Generation3 CH3 +SH.S_TIM1_CH3.ConfNb=1 +SH.S_TIM1_CH4.0=TIM1_CH4,PWM Generation4 CH4 +SH.S_TIM1_CH4.ConfNb=1 +SH.S_TIM3_CH1.0=TIM3_CH1,PWM Generation1 CH1 +SH.S_TIM3_CH1.ConfNb=1 +SH.S_TIM3_CH2.0=TIM3_CH2,PWM Generation2 CH2 +SH.S_TIM3_CH2.ConfNb=1 +SH.S_TIM3_CH3.0=TIM3_CH3,PWM Generation3 CH3 +SH.S_TIM3_CH3.ConfNb=1 +SH.S_TIM3_CH4.0=TIM3_CH4,PWM Generation4 CH4 +SH.S_TIM3_CH4.ConfNb=1 +TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM1.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 +TIM1.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 +TIM1.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 +TIM1.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4,Period +TIM1.Period=16383 +TIM3.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM3.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 +TIM3.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 +TIM3.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 +TIM3.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4,Period +TIM3.Period=16383 +TIM7.IPParameters=Prescaler,Period +TIM7.Period=1000 +TIM7.Prescaler=120 +USART3.IPParameters=VirtualMode +USART3.VirtualMode=VM_ASYNC +USB_OTG_FS.IPParameters=VirtualMode +USB_OTG_FS.VirtualMode=Device_Only +VP_LWIP_VS_Enabled.Mode=Enabled +VP_LWIP_VS_Enabled.Signal=LWIP_VS_Enabled +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +VP_TIM1_VS_ClockSourceINT.Mode=Internal +VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT +VP_TIM3_VS_ClockSourceINT.Mode=Internal +VP_TIM3_VS_ClockSourceINT.Signal=TIM3_VS_ClockSourceINT +VP_TIM7_VS_ClockSourceINT.Mode=Enable_Timer +VP_TIM7_VS_ClockSourceINT.Signal=TIM7_VS_ClockSourceINT +board=NUCLEO-F207ZG +boardIOC=true +isbadioc=false diff --git a/STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.launch b/STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.launch new file mode 100644 index 0000000..f3e3c4a --- /dev/null +++ b/STM32_Nucleo207ZG/LightControlConvi_Nucleo207ZG.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_lib.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_lib.c index 3c1d6a6..dda05d3 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_lib.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_lib.c @@ -1,1010 +1,1010 @@ -/** - * @file - * Sequential API External module - * - * @defgroup netconn Netconn API - * @ingroup sequential_api - * Thread-safe, to be called from non-TCPIP threads only. - * TX/RX handling based on @ref netbuf (containing @ref pbuf) - * to avoid copying data around. - * - * @defgroup netconn_common Common functions - * @ingroup netconn - * For use with TCP and UDP - * - * @defgroup netconn_tcp TCP only - * @ingroup netconn - * TCP only functions - * - * @defgroup netconn_udp UDP only - * @ingroup netconn - * UDP only functions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - */ - -/* This is the part of the API that is linked with - the application */ - -#include "lwip/opt.h" - -#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/api.h" -#include "lwip/memp.h" - -#include "lwip/ip.h" -#include "lwip/raw.h" -#include "lwip/udp.h" -#include "lwip/priv/api_msg.h" -#include "lwip/priv/tcp_priv.h" -#include "lwip/priv/tcpip_priv.h" - -#include - -#define API_MSG_VAR_REF(name) API_VAR_REF(name) -#define API_MSG_VAR_DECLARE(name) API_VAR_DECLARE(struct api_msg, name) -#define API_MSG_VAR_ALLOC(name) API_VAR_ALLOC(struct api_msg, MEMP_API_MSG, name, ERR_MEM) -#define API_MSG_VAR_ALLOC_RETURN_NULL(name) API_VAR_ALLOC(struct api_msg, MEMP_API_MSG, name, NULL) -#define API_MSG_VAR_FREE(name) API_VAR_FREE(MEMP_API_MSG, name) - -static err_t netconn_close_shutdown(struct netconn *conn, u8_t how); - -/** - * Call the lower part of a netconn_* function - * This function is then running in the thread context - * of tcpip_thread and has exclusive access to lwIP core code. - * - * @param fn function to call - * @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) -{ - err_t err; - -#ifdef LWIP_DEBUG - /* catch functions that don't set err */ - apimsg->err = ERR_VAL; -#endif /* LWIP_DEBUG */ - -#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)); - if (err == ERR_OK) { - return apimsg->err; - } - return err; -} - -/** - * Create a new netconn (of a specific type) that has a callback function. - * The corresponding pcb is also created. - * - * @param t the type of 'connection' to create (@see enum netconn_type) - * @param proto the IP protocol for RAW IP pcbs - * @param callback a function to call on status changes (RX available, TX'ed) - * @return a newly allocated struct netconn or - * NULL on memory error - */ -struct netconn* -netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback) -{ - struct netconn *conn; - API_MSG_VAR_DECLARE(msg); - API_MSG_VAR_ALLOC_RETURN_NULL(msg); - - conn = netconn_alloc(t, callback); - if (conn != NULL) { - err_t err; - - API_MSG_VAR_REF(msg).msg.n.proto = proto; - API_MSG_VAR_REF(msg).conn = conn; - err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg)); - if (err != ERR_OK) { - LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL); - LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); -#if LWIP_TCP - LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); -#endif /* LWIP_TCP */ -#if !LWIP_NETCONN_SEM_PER_THREAD - LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); - sys_sem_free(&conn->op_completed); -#endif /* !LWIP_NETCONN_SEM_PER_THREAD */ - sys_mbox_free(&conn->recvmbox); - memp_free(MEMP_NETCONN, conn); - API_MSG_VAR_FREE(msg); - return NULL; - } - } - API_MSG_VAR_FREE(msg); - return conn; -} - -/** - * @ingroup netconn_common - * Close a netconn 'connection' and free its resources. - * UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate - * after this returns. - * - * @param conn the netconn to delete - * @return ERR_OK if the connection was deleted - */ -err_t -netconn_delete(struct netconn *conn) -{ - err_t err; - API_MSG_VAR_DECLARE(msg); - - /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */ - if (conn == NULL) { - return ERR_OK; - } - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; -#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 */ -#if LWIP_TCP - API_MSG_VAR_REF(msg).msg.sd.polls_left = - ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; -#endif /* LWIP_TCP */ -#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ - err = netconn_apimsg(lwip_netconn_do_delconn, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - if (err != ERR_OK) { - return err; - } - - netconn_free(conn); - - return ERR_OK; -} - -/** - * Get the local or remote IP address and port of a netconn. - * For RAW netconns, this returns the protocol instead of a port! - * - * @param conn the netconn to query - * @param addr a pointer to which to save the IP address - * @param port a pointer to which to save the port (or protocol for RAW) - * @param local 1 to get the local IP address, 0 to get the remote one - * @return ERR_CONN for invalid connections - * ERR_OK if the information was retrieved - */ -err_t -netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - - LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;); - LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;); - LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;); - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; - API_MSG_VAR_REF(msg).msg.ad.local = local; -#if LWIP_MPU_COMPATIBLE - err = netconn_apimsg(lwip_netconn_do_getaddr, &API_MSG_VAR_REF(msg)); - *addr = msg->msg.ad.ipaddr; - *port = msg->msg.ad.port; -#else /* LWIP_MPU_COMPATIBLE */ - msg.msg.ad.ipaddr = addr; - msg.msg.ad.port = port; - err = netconn_apimsg(lwip_netconn_do_getaddr, &msg); -#endif /* LWIP_MPU_COMPATIBLE */ - API_MSG_VAR_FREE(msg); - - return err; -} - -/** - * @ingroup netconn_common - * Bind a netconn to a specific local IP address and port. - * Binding one netconn twice might not always be checked correctly! - * - * @param conn the netconn to bind - * @param addr the local IP address to bind the netconn to - * (use IP4_ADDR_ANY/IP6_ADDR_ANY to bind to all addresses) - * @param port the local port to bind the netconn to (not used for RAW) - * @return ERR_OK if bound, any other err_t on failure - */ -err_t -netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - - LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); - -#if LWIP_IPV4 - /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ - if (addr == NULL) { - addr = IP4_ADDR_ANY; - } -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV4 && LWIP_IPV6 - /* "Socket API like" dual-stack support: If IP to bind to is IP6_ADDR_ANY, - * and NETCONN_FLAG_IPV6_V6ONLY is 0, use IP_ANY_TYPE to bind - */ - if ((netconn_get_ipv6only(conn) == 0) && - ip_addr_cmp(addr, IP6_ADDR_ANY)) { - addr = IP_ANY_TYPE; - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; - API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); - API_MSG_VAR_REF(msg).msg.bc.port = port; - err = netconn_apimsg(lwip_netconn_do_bind, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - return err; -} - -/** - * @ingroup netconn_common - * Connect a netconn to a specific remote IP address and port. - * - * @param conn the netconn to connect - * @param addr the remote IP address to connect to - * @param port the remote port to connect to (no used for RAW) - * @return ERR_OK if connected, return value of tcp_/udp_/raw_connect otherwise - */ -err_t -netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - - LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); - -#if LWIP_IPV4 - /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ - if (addr == NULL) { - addr = IP4_ADDR_ANY; - } -#endif /* LWIP_IPV4 */ - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; - API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); - API_MSG_VAR_REF(msg).msg.bc.port = port; - err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - return err; -} - -/** - * @ingroup netconn_udp - * Disconnect a netconn from its current peer (only valid for UDP netconns). - * - * @param conn the netconn to disconnect - * @return See @ref err_t - */ -err_t -netconn_disconnect(struct netconn *conn) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - - LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; - err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - return err; -} - -/** - * @ingroup netconn_tcp - * Set a TCP netconn into listen mode - * - * @param conn the tcp netconn to set to listen mode - * @param backlog the listen backlog, only used if TCP_LISTEN_BACKLOG==1 - * @return ERR_OK if the netconn was set to listen (UDP and RAW netconns - * don't return any error (yet?)) - */ -err_t -netconn_listen_with_backlog(struct netconn *conn, u8_t backlog) -{ -#if LWIP_TCP - API_MSG_VAR_DECLARE(msg); - err_t err; - - /* This does no harm. If TCP_LISTEN_BACKLOG is off, backlog is unused. */ - LWIP_UNUSED_ARG(backlog); - - LWIP_ERROR("netconn_listen: invalid conn", (conn != NULL), return ERR_ARG;); - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_REF(msg).msg.lb.backlog = backlog; -#endif /* TCP_LISTEN_BACKLOG */ - err = netconn_apimsg(lwip_netconn_do_listen, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - return err; -#else /* LWIP_TCP */ - LWIP_UNUSED_ARG(conn); - LWIP_UNUSED_ARG(backlog); - return ERR_ARG; -#endif /* LWIP_TCP */ -} - -/** - * @ingroup netconn_tcp - * Accept a new connection on a TCP listening netconn. - * - * @param conn the TCP listen netconn - * @param new_conn pointer where the new connection is stored - * @return ERR_OK if a new connection has been received or an error - * code otherwise - */ -err_t -netconn_accept(struct netconn *conn, struct netconn **new_conn) -{ -#if LWIP_TCP - void *accept_ptr; - struct netconn *newconn; -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_DECLARE(msg); -#endif /* TCP_LISTEN_BACKLOG */ - - LWIP_ERROR("netconn_accept: invalid pointer", (new_conn != NULL), return ERR_ARG;); - *new_conn = NULL; - LWIP_ERROR("netconn_accept: invalid conn", (conn != NULL), return ERR_ARG;); - - if (ERR_IS_FATAL(conn->last_err)) { - /* don't recv on fatal errors: this might block the application task - waiting on acceptmbox forever! */ - return conn->last_err; - } - if (!sys_mbox_valid(&conn->acceptmbox)) { - return ERR_CLSD; - } - -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_ALLOC(msg); -#endif /* TCP_LISTEN_BACKLOG */ - -#if LWIP_SO_RCVTIMEO - if (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_FREE(msg); -#endif /* TCP_LISTEN_BACKLOG */ - return ERR_TIMEOUT; - } -#else - sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); -#endif /* LWIP_SO_RCVTIMEO*/ - newconn = (struct netconn *)accept_ptr; - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); - - if (accept_ptr == &netconn_aborted) { - /* a connection has been aborted: out of pcbs or out of netconns during accept */ - /* @todo: set netconn error, but this would be fatal and thus block further accepts */ -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_FREE(msg); -#endif /* TCP_LISTEN_BACKLOG */ - return ERR_ABRT; - } - if (newconn == NULL) { - /* connection has been aborted */ - /* in this special case, we set the netconn error from application thread, as - on a ready-to-accept listening netconn, there should not be anything running - in tcpip_thread */ - NETCONN_SET_SAFE_ERR(conn, ERR_CLSD); -#if TCP_LISTEN_BACKLOG - API_MSG_VAR_FREE(msg); -#endif /* TCP_LISTEN_BACKLOG */ - return ERR_CLSD; - } -#if TCP_LISTEN_BACKLOG - /* Let the stack know that we have accepted the connection. */ - API_MSG_VAR_REF(msg).conn = newconn; - /* don't care for the return value of lwip_netconn_do_recv */ - netconn_apimsg(lwip_netconn_do_accepted, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); -#endif /* TCP_LISTEN_BACKLOG */ - - *new_conn = newconn; - /* don't set conn->last_err: it's only ERR_OK, anyway */ - return ERR_OK; -#else /* LWIP_TCP */ - LWIP_UNUSED_ARG(conn); - LWIP_UNUSED_ARG(new_conn); - return ERR_ARG; -#endif /* LWIP_TCP */ -} - -/** - * @ingroup netconn_common - * Receive data: actual implementation that doesn't care whether pbuf or netbuf - * is received - * - * @param conn the netconn from which to receive data - * @param new_buf pointer where a new pbuf/netbuf is stored when received data - * @return ERR_OK if data has been received, an error code otherwise (timeout, - * memory error or another error) - */ -static err_t -netconn_recv_data(struct netconn *conn, void **new_buf) -{ - void *buf = NULL; - u16_t len; -#if LWIP_TCP - API_MSG_VAR_DECLARE(msg); -#if LWIP_MPU_COMPATIBLE - msg = NULL; -#endif -#endif /* LWIP_TCP */ - - LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); - *new_buf = NULL; - LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - if (!sys_mbox_valid(&conn->recvmbox)) { - /* This happens when calling this function after receiving FIN */ - return sys_mbox_valid(&conn->acceptmbox) ? ERR_CONN : ERR_CLSD; - } - } -#endif /* LWIP_TCP */ - LWIP_ERROR("netconn_recv: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); - - if (ERR_IS_FATAL(conn->last_err)) { - /* don't recv on fatal errors: this might block the application task - waiting on recvmbox forever! */ - /* @todo: this does not allow us to fetch data that has been put into recvmbox - before the fatal error occurred - is that a problem? */ - return conn->last_err; - } -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - API_MSG_VAR_ALLOC(msg); - } -#endif /* LWIP_TCP */ - -#if LWIP_SO_RCVTIMEO - if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - API_MSG_VAR_FREE(msg); - } -#endif /* LWIP_TCP */ - return ERR_TIMEOUT; - } -#else - sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); -#endif /* LWIP_SO_RCVTIMEO*/ - -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - /* Let the stack know that we have taken the data. */ - /* @todo: Speedup: Don't block and wait for the answer here - (to prevent multiple thread-switches). */ - API_MSG_VAR_REF(msg).conn = conn; - if (buf != NULL) { - API_MSG_VAR_REF(msg).msg.r.len = ((struct pbuf *)buf)->tot_len; - } else { - API_MSG_VAR_REF(msg).msg.r.len = 1; - } - - /* don't care for the return value of lwip_netconn_do_recv */ - netconn_apimsg(lwip_netconn_do_recv, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - /* If we are closed, we indicate that we no longer wish to use the socket */ - if (buf == NULL) { - API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); - if (conn->pcb.ip == NULL) { - /* race condition: RST during recv */ - return conn->last_err == ERR_OK ? ERR_RST : conn->last_err; - } - /* RX side is closed, so deallocate the recvmbox */ - netconn_close_shutdown(conn, NETCONN_SHUT_RD); - /* Don' store ERR_CLSD as conn->err since we are only half-closed */ - return ERR_CLSD; - } - len = ((struct pbuf *)buf)->tot_len; - } -#endif /* LWIP_TCP */ -#if LWIP_TCP && (LWIP_UDP || LWIP_RAW) - else -#endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ -#if (LWIP_UDP || LWIP_RAW) - { - LWIP_ASSERT("buf != NULL", buf != NULL); - len = netbuf_len((struct netbuf*)buf); - } -#endif /* (LWIP_UDP || LWIP_RAW) */ - -#if LWIP_SO_RCVBUF - SYS_ARCH_DEC(conn->recv_avail, len); -#endif /* LWIP_SO_RCVBUF */ - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); - - LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); - - *new_buf = buf; - /* don't set conn->last_err: it's only ERR_OK, anyway */ - return ERR_OK; -} - -/** - * @ingroup netconn_tcp - * Receive data (in form of a pbuf) from a TCP netconn - * - * @param conn the netconn from which to receive data - * @param new_buf pointer where a new pbuf is stored when received data - * @return ERR_OK if data has been received, an error code otherwise (timeout, - * memory error or another error) - * ERR_ARG if conn is not a TCP netconn - */ -err_t -netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf) -{ - LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL) && - NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); - - return netconn_recv_data(conn, (void **)new_buf); -} - -/** - * @ingroup netconn_common - * Receive data (in form of a netbuf containing a packet buffer) from a netconn - * - * @param conn the netconn from which to receive data - * @param new_buf pointer where a new netbuf is stored when received data - * @return ERR_OK if data has been received, an error code otherwise (timeout, - * memory error or another error) - */ -err_t -netconn_recv(struct netconn *conn, struct netbuf **new_buf) -{ -#if LWIP_TCP - struct netbuf *buf = NULL; - err_t err; -#endif /* LWIP_TCP */ - - LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); - *new_buf = NULL; - LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); - -#if LWIP_TCP -#if (LWIP_UDP || LWIP_RAW) - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) -#endif /* (LWIP_UDP || LWIP_RAW) */ - { - struct pbuf *p = NULL; - /* This is not a listening netconn, since recvmbox is set */ - - buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); - if (buf == NULL) { - return ERR_MEM; - } - - err = netconn_recv_data(conn, (void **)&p); - if (err != ERR_OK) { - memp_free(MEMP_NETBUF, buf); - return err; - } - LWIP_ASSERT("p != NULL", p != NULL); - - buf->p = p; - buf->ptr = p; - buf->port = 0; - ip_addr_set_zero(&buf->addr); - *new_buf = buf; - /* don't set conn->last_err: it's only ERR_OK, anyway */ - return ERR_OK; - } -#endif /* LWIP_TCP */ -#if LWIP_TCP && (LWIP_UDP || LWIP_RAW) - else -#endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ - { -#if (LWIP_UDP || LWIP_RAW) - return netconn_recv_data(conn, (void **)new_buf); -#endif /* (LWIP_UDP || LWIP_RAW) */ - } -} - -/** - * @ingroup netconn_udp - * Send data (in form of a netbuf) to a specific remote IP address and port. - * Only to be used for UDP and RAW netconns (not TCP). - * - * @param conn the netconn over which to send data - * @param buf a netbuf containing the data to send - * @param addr the remote IP address to which to send the data - * @param port the remote port to which to send the data - * @return ERR_OK if data was sent, any other err_t on error - */ -err_t -netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port) -{ - if (buf != NULL) { - ip_addr_set(&buf->addr, addr); - buf->port = port; - return netconn_send(conn, buf); - } - return ERR_VAL; -} - -/** - * @ingroup netconn_udp - * Send data over a UDP or RAW netconn (that is already connected). - * - * @param conn the UDP or RAW netconn over which to send data - * @param buf a netbuf containing the data to send - * @return ERR_OK if data was sent, any other err_t on error - */ -err_t -netconn_send(struct netconn *conn, struct netbuf *buf) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - - LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); - - LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len)); - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; - API_MSG_VAR_REF(msg).msg.b = buf; - err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - return err; -} - -/** - * @ingroup netconn_tcp - * Send data over a TCP netconn. - * - * @param conn the TCP netconn over which to send data - * @param dataptr pointer to the application buffer that contains the data to send - * @param size size of the application data to send - * @param apiflags combination of following flags : - * - NETCONN_COPY: data will be copied into memory belonging to the stack - * - NETCONN_MORE: for TCP connection, PSH flag will be set on last segment sent - * - NETCONN_DONTBLOCK: only write the data if all data can be written at once - * @param bytes_written pointer to a location that receives the number of written bytes - * @return ERR_OK if data was sent, any other err_t on error - */ -err_t -netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, - u8_t apiflags, size_t *bytes_written) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - u8_t dontblock; - - LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;); - LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type)== NETCONN_TCP), return ERR_VAL;); - if (size == 0) { - return ERR_OK; - } - dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); -#if LWIP_SO_SNDTIMEO - if (conn->send_timeout != 0) { - dontblock = 1; - } -#endif /* LWIP_SO_SNDTIMEO */ - if (dontblock && !bytes_written) { - /* This implies netconn_write() cannot be used for non-blocking send, since - it has no way to return the number of bytes written. */ - return ERR_VAL; - } - - API_MSG_VAR_ALLOC(msg); - /* non-blocking write sends as much */ - API_MSG_VAR_REF(msg).conn = conn; - API_MSG_VAR_REF(msg).msg.w.dataptr = dataptr; - API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; - API_MSG_VAR_REF(msg).msg.w.len = size; -#if LWIP_SO_SNDTIMEO - if (conn->send_timeout != 0) { - /* get the time we started, which is later compared to - sys_now() + conn->send_timeout */ - API_MSG_VAR_REF(msg).msg.w.time_started = sys_now(); - } else { - API_MSG_VAR_REF(msg).msg.w.time_started = 0; - } -#endif /* LWIP_SO_SNDTIMEO */ - - /* For locking the core: this _can_ be delayed on low memory/low send buffer, - but if it is, this is done inside api_msg.c:do_write(), so we can use the - non-blocking version here. */ - err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg)); - if ((err == ERR_OK) && (bytes_written != NULL)) { - if (dontblock) { - /* nonblocking write: maybe the data has been sent partly */ - *bytes_written = API_MSG_VAR_REF(msg).msg.w.len; - } else { - /* blocking call succeeded: all data has been sent if it */ - *bytes_written = size; - } - } - API_MSG_VAR_FREE(msg); - - return err; -} - -/** - * @ingroup netconn_tcp - * Close or shutdown a TCP netconn (doesn't delete it). - * - * @param conn the TCP netconn to close or shutdown - * @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) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - LWIP_UNUSED_ARG(how); - - LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;); - - API_MSG_VAR_ALLOC(msg); - API_MSG_VAR_REF(msg).conn = conn; -#if LWIP_TCP - /* shutting down both ends is the same as closing */ - API_MSG_VAR_REF(msg).msg.sd.shut = how; -#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 = - ((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)); - API_MSG_VAR_FREE(msg); - - return err; -} - -/** - * @ingroup netconn_tcp - * Close a TCP netconn (doesn't delete it). - * - * @param conn the TCP netconn to close - * @return ERR_OK if the netconn was closed, any other err_t on error - */ -err_t -netconn_close(struct netconn *conn) -{ - /* shutting down both ends is the same as closing */ - return netconn_close_shutdown(conn, NETCONN_SHUT_RDWR); -} - -/** - * @ingroup netconn_tcp - * Shut down one or both sides of a TCP netconn (doesn't delete it). - * - * @param conn the TCP netconn to shut down - * @param shut_rx shut down the RX side (no more read possible after this) - * @param shut_tx shut down the TX side (no more write possible after this) - * @return ERR_OK if the netconn was closed, any other err_t on error - */ -err_t -netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx) -{ - return netconn_close_shutdown(conn, (shut_rx ? NETCONN_SHUT_RD : 0) | (shut_tx ? NETCONN_SHUT_WR : 0)); -} - -#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) -/** - * @ingroup netconn_udp - * Join multicast groups for UDP netconns. - * - * @param conn the UDP netconn for which to change multicast addresses - * @param multiaddr IP address of the multicast group to join or leave - * @param netif_addr the IP address of the network interface on which to send - * the igmp message - * @param join_or_leave flag whether to send a join- or leave-message - * @return ERR_OK if the action was taken, any err_t on error - */ -err_t -netconn_join_leave_group(struct netconn *conn, - const ip_addr_t *multiaddr, - const ip_addr_t *netif_addr, - enum netconn_igmp join_or_leave) -{ - API_MSG_VAR_DECLARE(msg); - err_t err; - - LWIP_ERROR("netconn_join_leave_group: invalid conn", (conn != NULL), return ERR_ARG;); - - API_MSG_VAR_ALLOC(msg); - -#if LWIP_IPV4 - /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ - if (multiaddr == NULL) { - multiaddr = IP4_ADDR_ANY; - } - if (netif_addr == NULL) { - netif_addr = IP4_ADDR_ANY; - } -#endif /* LWIP_IPV4 */ - - API_MSG_VAR_REF(msg).conn = conn; - API_MSG_VAR_REF(msg).msg.jl.multiaddr = API_MSG_VAR_REF(multiaddr); - API_MSG_VAR_REF(msg).msg.jl.netif_addr = API_MSG_VAR_REF(netif_addr); - API_MSG_VAR_REF(msg).msg.jl.join_or_leave = join_or_leave; - err = netconn_apimsg(lwip_netconn_do_join_leave_group, &API_MSG_VAR_REF(msg)); - API_MSG_VAR_FREE(msg); - - return err; -} -#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ - -#if LWIP_DNS -/** - * @ingroup netconn_common - * Execute a DNS query, only one IP address is returned - * - * @param name a string representation of the DNS host name to query - * @param addr a preallocated ip_addr_t where to store the resolved IP address - * @param dns_addrtype IP address type (IPv4 / IPv6) - * @return ERR_OK: resolving succeeded - * ERR_MEM: memory error, try again later - * ERR_ARG: dns client not initialized or invalid hostname - * ERR_VAL: dns server response was invalid - */ -#if LWIP_IPV4 && LWIP_IPV6 -err_t -netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype) -#else -err_t -netconn_gethostbyname(const char *name, ip_addr_t *addr) -#endif -{ - API_VAR_DECLARE(struct dns_api_msg, msg); -#if !LWIP_MPU_COMPATIBLE - sys_sem_t sem; -#endif /* LWIP_MPU_COMPATIBLE */ - err_t err; - err_t cberr; - - LWIP_ERROR("netconn_gethostbyname: invalid name", (name != NULL), return ERR_ARG;); - LWIP_ERROR("netconn_gethostbyname: invalid addr", (addr != NULL), return ERR_ARG;); -#if LWIP_MPU_COMPATIBLE - if (strlen(name) >= DNS_MAX_NAME_LENGTH) { - return ERR_ARG; - } -#endif - - API_VAR_ALLOC(struct dns_api_msg, MEMP_DNS_API_MSG, msg, ERR_MEM); -#if LWIP_MPU_COMPATIBLE - strncpy(API_VAR_REF(msg).name, name, DNS_MAX_NAME_LENGTH-1); - API_VAR_REF(msg).name[DNS_MAX_NAME_LENGTH-1] = 0; -#else /* LWIP_MPU_COMPATIBLE */ - msg.err = &err; - msg.sem = &sem; - API_VAR_REF(msg).addr = API_VAR_REF(addr); - API_VAR_REF(msg).name = name; -#endif /* LWIP_MPU_COMPATIBLE */ -#if LWIP_IPV4 && LWIP_IPV6 - API_VAR_REF(msg).dns_addrtype = dns_addrtype; -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -#if LWIP_NETCONN_SEM_PER_THREAD - API_VAR_REF(msg).sem = LWIP_NETCONN_THREAD_SEM_GET(); -#else /* LWIP_NETCONN_SEM_PER_THREAD*/ - err = sys_sem_new(API_EXPR_REF(API_VAR_REF(msg).sem), 0); - if (err != ERR_OK) { - API_VAR_FREE(MEMP_DNS_API_MSG, msg); - return err; - } -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - - cberr = tcpip_callback(lwip_netconn_do_gethostbyname, &API_VAR_REF(msg)); - if (cberr != ERR_OK) { -#if !LWIP_NETCONN_SEM_PER_THREAD - sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); -#endif /* !LWIP_NETCONN_SEM_PER_THREAD */ - API_VAR_FREE(MEMP_DNS_API_MSG, msg); - return cberr; - } - sys_sem_wait(API_EXPR_REF_SEM(API_VAR_REF(msg).sem)); -#if !LWIP_NETCONN_SEM_PER_THREAD - sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); -#endif /* !LWIP_NETCONN_SEM_PER_THREAD */ - -#if LWIP_MPU_COMPATIBLE - *addr = msg->addr; - err = msg->err; -#endif /* LWIP_MPU_COMPATIBLE */ - - API_VAR_FREE(MEMP_DNS_API_MSG, msg); - return err; -} -#endif /* LWIP_DNS*/ - -#if LWIP_NETCONN_SEM_PER_THREAD -void -netconn_thread_init(void) -{ - sys_sem_t *sem = LWIP_NETCONN_THREAD_SEM_GET(); - if ((sem == NULL) || !sys_sem_valid(sem)) { - /* call alloc only once */ - LWIP_NETCONN_THREAD_SEM_ALLOC(); - LWIP_ASSERT("LWIP_NETCONN_THREAD_SEM_ALLOC() failed", sys_sem_valid(LWIP_NETCONN_THREAD_SEM_GET())); - } -} - -void -netconn_thread_cleanup(void) -{ - sys_sem_t *sem = LWIP_NETCONN_THREAD_SEM_GET(); - if ((sem != NULL) && sys_sem_valid(sem)) { - /* call free only once */ - LWIP_NETCONN_THREAD_SEM_FREE(); - } -} -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - -#endif /* LWIP_NETCONN */ +/** + * @file + * Sequential API External module + * + * @defgroup netconn Netconn API + * @ingroup sequential_api + * Thread-safe, to be called from non-TCPIP threads only. + * TX/RX handling based on @ref netbuf (containing @ref pbuf) + * to avoid copying data around. + * + * @defgroup netconn_common Common functions + * @ingroup netconn + * For use with TCP and UDP + * + * @defgroup netconn_tcp TCP only + * @ingroup netconn + * TCP only functions + * + * @defgroup netconn_udp UDP only + * @ingroup netconn + * UDP only functions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + */ + +/* This is the part of the API that is linked with + the application */ + +#include "lwip/opt.h" + +#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/api.h" +#include "lwip/memp.h" + +#include "lwip/ip.h" +#include "lwip/raw.h" +#include "lwip/udp.h" +#include "lwip/priv/api_msg.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/priv/tcpip_priv.h" + +#include + +#define API_MSG_VAR_REF(name) API_VAR_REF(name) +#define API_MSG_VAR_DECLARE(name) API_VAR_DECLARE(struct api_msg, name) +#define API_MSG_VAR_ALLOC(name) API_VAR_ALLOC(struct api_msg, MEMP_API_MSG, name, ERR_MEM) +#define API_MSG_VAR_ALLOC_RETURN_NULL(name) API_VAR_ALLOC(struct api_msg, MEMP_API_MSG, name, NULL) +#define API_MSG_VAR_FREE(name) API_VAR_FREE(MEMP_API_MSG, name) + +static err_t netconn_close_shutdown(struct netconn *conn, u8_t how); + +/** + * Call the lower part of a netconn_* function + * This function is then running in the thread context + * of tcpip_thread and has exclusive access to lwIP core code. + * + * @param fn function to call + * @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) +{ + err_t err; + +#ifdef LWIP_DEBUG + /* catch functions that don't set err */ + apimsg->err = ERR_VAL; +#endif /* LWIP_DEBUG */ + +#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)); + if (err == ERR_OK) { + return apimsg->err; + } + return err; +} + +/** + * Create a new netconn (of a specific type) that has a callback function. + * The corresponding pcb is also created. + * + * @param t the type of 'connection' to create (@see enum netconn_type) + * @param proto the IP protocol for RAW IP pcbs + * @param callback a function to call on status changes (RX available, TX'ed) + * @return a newly allocated struct netconn or + * NULL on memory error + */ +struct netconn* +netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback) +{ + struct netconn *conn; + API_MSG_VAR_DECLARE(msg); + API_MSG_VAR_ALLOC_RETURN_NULL(msg); + + conn = netconn_alloc(t, callback); + if (conn != NULL) { + err_t err; + + API_MSG_VAR_REF(msg).msg.n.proto = proto; + API_MSG_VAR_REF(msg).conn = conn; + err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg)); + if (err != ERR_OK) { + LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL); + LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); +#if LWIP_TCP + LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); +#endif /* LWIP_TCP */ +#if !LWIP_NETCONN_SEM_PER_THREAD + LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); + sys_sem_free(&conn->op_completed); +#endif /* !LWIP_NETCONN_SEM_PER_THREAD */ + sys_mbox_free(&conn->recvmbox); + memp_free(MEMP_NETCONN, conn); + API_MSG_VAR_FREE(msg); + return NULL; + } + } + API_MSG_VAR_FREE(msg); + return conn; +} + +/** + * @ingroup netconn_common + * Close a netconn 'connection' and free its resources. + * UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate + * after this returns. + * + * @param conn the netconn to delete + * @return ERR_OK if the connection was deleted + */ +err_t +netconn_delete(struct netconn *conn) +{ + err_t err; + API_MSG_VAR_DECLARE(msg); + + /* No ASSERT here because possible to get a (conn == NULL) if we got an accept error */ + if (conn == NULL) { + return ERR_OK; + } + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; +#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 */ +#if LWIP_TCP + API_MSG_VAR_REF(msg).msg.sd.polls_left = + ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; +#endif /* LWIP_TCP */ +#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ + err = netconn_apimsg(lwip_netconn_do_delconn, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + if (err != ERR_OK) { + return err; + } + + netconn_free(conn); + + return ERR_OK; +} + +/** + * Get the local or remote IP address and port of a netconn. + * For RAW netconns, this returns the protocol instead of a port! + * + * @param conn the netconn to query + * @param addr a pointer to which to save the IP address + * @param port a pointer to which to save the port (or protocol for RAW) + * @param local 1 to get the local IP address, 0 to get the remote one + * @return ERR_CONN for invalid connections + * ERR_OK if the information was retrieved + */ +err_t +netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;); + LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;); + LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.ad.local = local; +#if LWIP_MPU_COMPATIBLE + err = netconn_apimsg(lwip_netconn_do_getaddr, &API_MSG_VAR_REF(msg)); + *addr = msg->msg.ad.ipaddr; + *port = msg->msg.ad.port; +#else /* LWIP_MPU_COMPATIBLE */ + msg.msg.ad.ipaddr = addr; + msg.msg.ad.port = port; + err = netconn_apimsg(lwip_netconn_do_getaddr, &msg); +#endif /* LWIP_MPU_COMPATIBLE */ + API_MSG_VAR_FREE(msg); + + return err; +} + +/** + * @ingroup netconn_common + * Bind a netconn to a specific local IP address and port. + * Binding one netconn twice might not always be checked correctly! + * + * @param conn the netconn to bind + * @param addr the local IP address to bind the netconn to + * (use IP4_ADDR_ANY/IP6_ADDR_ANY to bind to all addresses) + * @param port the local port to bind the netconn to (not used for RAW) + * @return ERR_OK if bound, any other err_t on failure + */ +err_t +netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_bind: invalid conn", (conn != NULL), return ERR_ARG;); + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ + if (addr == NULL) { + addr = IP4_ADDR_ANY; + } +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV4 && LWIP_IPV6 + /* "Socket API like" dual-stack support: If IP to bind to is IP6_ADDR_ANY, + * and NETCONN_FLAG_IPV6_V6ONLY is 0, use IP_ANY_TYPE to bind + */ + if ((netconn_get_ipv6only(conn) == 0) && + ip_addr_cmp(addr, IP6_ADDR_ANY)) { + addr = IP_ANY_TYPE; + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); + API_MSG_VAR_REF(msg).msg.bc.port = port; + err = netconn_apimsg(lwip_netconn_do_bind, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +} + +/** + * @ingroup netconn_common + * Connect a netconn to a specific remote IP address and port. + * + * @param conn the netconn to connect + * @param addr the remote IP address to connect to + * @param port the remote port to connect to (no used for RAW) + * @return ERR_OK if connected, return value of tcp_/udp_/raw_connect otherwise + */ +err_t +netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ + if (addr == NULL) { + addr = IP4_ADDR_ANY; + } +#endif /* LWIP_IPV4 */ + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); + API_MSG_VAR_REF(msg).msg.bc.port = port; + err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +} + +/** + * @ingroup netconn_udp + * Disconnect a netconn from its current peer (only valid for UDP netconns). + * + * @param conn the netconn to disconnect + * @return See @ref err_t + */ +err_t +netconn_disconnect(struct netconn *conn) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; + err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +} + +/** + * @ingroup netconn_tcp + * Set a TCP netconn into listen mode + * + * @param conn the tcp netconn to set to listen mode + * @param backlog the listen backlog, only used if TCP_LISTEN_BACKLOG==1 + * @return ERR_OK if the netconn was set to listen (UDP and RAW netconns + * don't return any error (yet?)) + */ +err_t +netconn_listen_with_backlog(struct netconn *conn, u8_t backlog) +{ +#if LWIP_TCP + API_MSG_VAR_DECLARE(msg); + err_t err; + + /* This does no harm. If TCP_LISTEN_BACKLOG is off, backlog is unused. */ + LWIP_UNUSED_ARG(backlog); + + LWIP_ERROR("netconn_listen: invalid conn", (conn != NULL), return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; +#if TCP_LISTEN_BACKLOG + API_MSG_VAR_REF(msg).msg.lb.backlog = backlog; +#endif /* TCP_LISTEN_BACKLOG */ + err = netconn_apimsg(lwip_netconn_do_listen, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +#else /* LWIP_TCP */ + LWIP_UNUSED_ARG(conn); + LWIP_UNUSED_ARG(backlog); + return ERR_ARG; +#endif /* LWIP_TCP */ +} + +/** + * @ingroup netconn_tcp + * Accept a new connection on a TCP listening netconn. + * + * @param conn the TCP listen netconn + * @param new_conn pointer where the new connection is stored + * @return ERR_OK if a new connection has been received or an error + * code otherwise + */ +err_t +netconn_accept(struct netconn *conn, struct netconn **new_conn) +{ +#if LWIP_TCP + void *accept_ptr; + struct netconn *newconn; +#if TCP_LISTEN_BACKLOG + API_MSG_VAR_DECLARE(msg); +#endif /* TCP_LISTEN_BACKLOG */ + + LWIP_ERROR("netconn_accept: invalid pointer", (new_conn != NULL), return ERR_ARG;); + *new_conn = NULL; + LWIP_ERROR("netconn_accept: invalid conn", (conn != NULL), return ERR_ARG;); + + if (ERR_IS_FATAL(conn->last_err)) { + /* don't recv on fatal errors: this might block the application task + waiting on acceptmbox forever! */ + return conn->last_err; + } + if (!sys_mbox_valid(&conn->acceptmbox)) { + return ERR_CLSD; + } + +#if TCP_LISTEN_BACKLOG + API_MSG_VAR_ALLOC(msg); +#endif /* TCP_LISTEN_BACKLOG */ + +#if LWIP_SO_RCVTIMEO + if (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { +#if TCP_LISTEN_BACKLOG + API_MSG_VAR_FREE(msg); +#endif /* TCP_LISTEN_BACKLOG */ + return ERR_TIMEOUT; + } +#else + sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); +#endif /* LWIP_SO_RCVTIMEO*/ + newconn = (struct netconn *)accept_ptr; + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); + + if (accept_ptr == &netconn_aborted) { + /* a connection has been aborted: out of pcbs or out of netconns during accept */ + /* @todo: set netconn error, but this would be fatal and thus block further accepts */ +#if TCP_LISTEN_BACKLOG + API_MSG_VAR_FREE(msg); +#endif /* TCP_LISTEN_BACKLOG */ + return ERR_ABRT; + } + if (newconn == NULL) { + /* connection has been aborted */ + /* in this special case, we set the netconn error from application thread, as + on a ready-to-accept listening netconn, there should not be anything running + in tcpip_thread */ + NETCONN_SET_SAFE_ERR(conn, ERR_CLSD); +#if TCP_LISTEN_BACKLOG + API_MSG_VAR_FREE(msg); +#endif /* TCP_LISTEN_BACKLOG */ + return ERR_CLSD; + } +#if TCP_LISTEN_BACKLOG + /* Let the stack know that we have accepted the connection. */ + API_MSG_VAR_REF(msg).conn = newconn; + /* don't care for the return value of lwip_netconn_do_recv */ + netconn_apimsg(lwip_netconn_do_accepted, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); +#endif /* TCP_LISTEN_BACKLOG */ + + *new_conn = newconn; + /* don't set conn->last_err: it's only ERR_OK, anyway */ + return ERR_OK; +#else /* LWIP_TCP */ + LWIP_UNUSED_ARG(conn); + LWIP_UNUSED_ARG(new_conn); + return ERR_ARG; +#endif /* LWIP_TCP */ +} + +/** + * @ingroup netconn_common + * Receive data: actual implementation that doesn't care whether pbuf or netbuf + * is received + * + * @param conn the netconn from which to receive data + * @param new_buf pointer where a new pbuf/netbuf is stored when received data + * @return ERR_OK if data has been received, an error code otherwise (timeout, + * memory error or another error) + */ +static err_t +netconn_recv_data(struct netconn *conn, void **new_buf) +{ + void *buf = NULL; + u16_t len; +#if LWIP_TCP + API_MSG_VAR_DECLARE(msg); +#if LWIP_MPU_COMPATIBLE + msg = NULL; +#endif +#endif /* LWIP_TCP */ + + LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); + *new_buf = NULL; + LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); +#if LWIP_TCP +#if (LWIP_UDP || LWIP_RAW) + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) +#endif /* (LWIP_UDP || LWIP_RAW) */ + { + if (!sys_mbox_valid(&conn->recvmbox)) { + /* This happens when calling this function after receiving FIN */ + return sys_mbox_valid(&conn->acceptmbox) ? ERR_CONN : ERR_CLSD; + } + } +#endif /* LWIP_TCP */ + LWIP_ERROR("netconn_recv: invalid recvmbox", sys_mbox_valid(&conn->recvmbox), return ERR_CONN;); + + if (ERR_IS_FATAL(conn->last_err)) { + /* don't recv on fatal errors: this might block the application task + waiting on recvmbox forever! */ + /* @todo: this does not allow us to fetch data that has been put into recvmbox + before the fatal error occurred - is that a problem? */ + return conn->last_err; + } +#if LWIP_TCP +#if (LWIP_UDP || LWIP_RAW) + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) +#endif /* (LWIP_UDP || LWIP_RAW) */ + { + API_MSG_VAR_ALLOC(msg); + } +#endif /* LWIP_TCP */ + +#if LWIP_SO_RCVTIMEO + if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { +#if LWIP_TCP +#if (LWIP_UDP || LWIP_RAW) + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) +#endif /* (LWIP_UDP || LWIP_RAW) */ + { + API_MSG_VAR_FREE(msg); + } +#endif /* LWIP_TCP */ + return ERR_TIMEOUT; + } +#else + sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); +#endif /* LWIP_SO_RCVTIMEO*/ + +#if LWIP_TCP +#if (LWIP_UDP || LWIP_RAW) + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) +#endif /* (LWIP_UDP || LWIP_RAW) */ + { + /* Let the stack know that we have taken the data. */ + /* @todo: Speedup: Don't block and wait for the answer here + (to prevent multiple thread-switches). */ + API_MSG_VAR_REF(msg).conn = conn; + if (buf != NULL) { + API_MSG_VAR_REF(msg).msg.r.len = ((struct pbuf *)buf)->tot_len; + } else { + API_MSG_VAR_REF(msg).msg.r.len = 1; + } + + /* don't care for the return value of lwip_netconn_do_recv */ + netconn_apimsg(lwip_netconn_do_recv, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + /* If we are closed, we indicate that we no longer wish to use the socket */ + if (buf == NULL) { + API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); + if (conn->pcb.ip == NULL) { + /* race condition: RST during recv */ + return conn->last_err == ERR_OK ? ERR_RST : conn->last_err; + } + /* RX side is closed, so deallocate the recvmbox */ + netconn_close_shutdown(conn, NETCONN_SHUT_RD); + /* Don' store ERR_CLSD as conn->err since we are only half-closed */ + return ERR_CLSD; + } + len = ((struct pbuf *)buf)->tot_len; + } +#endif /* LWIP_TCP */ +#if LWIP_TCP && (LWIP_UDP || LWIP_RAW) + else +#endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ +#if (LWIP_UDP || LWIP_RAW) + { + LWIP_ASSERT("buf != NULL", buf != NULL); + len = netbuf_len((struct netbuf*)buf); + } +#endif /* (LWIP_UDP || LWIP_RAW) */ + +#if LWIP_SO_RCVBUF + SYS_ARCH_DEC(conn->recv_avail, len); +#endif /* LWIP_SO_RCVBUF */ + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); + + LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); + + *new_buf = buf; + /* don't set conn->last_err: it's only ERR_OK, anyway */ + return ERR_OK; +} + +/** + * @ingroup netconn_tcp + * Receive data (in form of a pbuf) from a TCP netconn + * + * @param conn the netconn from which to receive data + * @param new_buf pointer where a new pbuf is stored when received data + * @return ERR_OK if data has been received, an error code otherwise (timeout, + * memory error or another error) + * ERR_ARG if conn is not a TCP netconn + */ +err_t +netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf) +{ + LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL) && + NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); + + return netconn_recv_data(conn, (void **)new_buf); +} + +/** + * @ingroup netconn_common + * Receive data (in form of a netbuf containing a packet buffer) from a netconn + * + * @param conn the netconn from which to receive data + * @param new_buf pointer where a new netbuf is stored when received data + * @return ERR_OK if data has been received, an error code otherwise (timeout, + * memory error or another error) + */ +err_t +netconn_recv(struct netconn *conn, struct netbuf **new_buf) +{ +#if LWIP_TCP + struct netbuf *buf = NULL; + err_t err; +#endif /* LWIP_TCP */ + + LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); + *new_buf = NULL; + LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); + +#if LWIP_TCP +#if (LWIP_UDP || LWIP_RAW) + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) +#endif /* (LWIP_UDP || LWIP_RAW) */ + { + struct pbuf *p = NULL; + /* This is not a listening netconn, since recvmbox is set */ + + buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); + if (buf == NULL) { + return ERR_MEM; + } + + err = netconn_recv_data(conn, (void **)&p); + if (err != ERR_OK) { + memp_free(MEMP_NETBUF, buf); + return err; + } + LWIP_ASSERT("p != NULL", p != NULL); + + buf->p = p; + buf->ptr = p; + buf->port = 0; + ip_addr_set_zero(&buf->addr); + *new_buf = buf; + /* don't set conn->last_err: it's only ERR_OK, anyway */ + return ERR_OK; + } +#endif /* LWIP_TCP */ +#if LWIP_TCP && (LWIP_UDP || LWIP_RAW) + else +#endif /* LWIP_TCP && (LWIP_UDP || LWIP_RAW) */ + { +#if (LWIP_UDP || LWIP_RAW) + return netconn_recv_data(conn, (void **)new_buf); +#endif /* (LWIP_UDP || LWIP_RAW) */ + } +} + +/** + * @ingroup netconn_udp + * Send data (in form of a netbuf) to a specific remote IP address and port. + * Only to be used for UDP and RAW netconns (not TCP). + * + * @param conn the netconn over which to send data + * @param buf a netbuf containing the data to send + * @param addr the remote IP address to which to send the data + * @param port the remote port to which to send the data + * @return ERR_OK if data was sent, any other err_t on error + */ +err_t +netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, u16_t port) +{ + if (buf != NULL) { + ip_addr_set(&buf->addr, addr); + buf->port = port; + return netconn_send(conn, buf); + } + return ERR_VAL; +} + +/** + * @ingroup netconn_udp + * Send data over a UDP or RAW netconn (that is already connected). + * + * @param conn the UDP or RAW netconn over which to send data + * @param buf a netbuf containing the data to send + * @return ERR_OK if data was sent, any other err_t on error + */ +err_t +netconn_send(struct netconn *conn, struct netbuf *buf) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); + + LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %"U16_F" bytes\n", buf->p->tot_len)); + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.b = buf; + err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +} + +/** + * @ingroup netconn_tcp + * Send data over a TCP netconn. + * + * @param conn the TCP netconn over which to send data + * @param dataptr pointer to the application buffer that contains the data to send + * @param size size of the application data to send + * @param apiflags combination of following flags : + * - NETCONN_COPY: data will be copied into memory belonging to the stack + * - NETCONN_MORE: for TCP connection, PSH flag will be set on last segment sent + * - NETCONN_DONTBLOCK: only write the data if all data can be written at once + * @param bytes_written pointer to a location that receives the number of written bytes + * @return ERR_OK if data was sent, any other err_t on error + */ +err_t +netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, + u8_t apiflags, size_t *bytes_written) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + u8_t dontblock; + + LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;); + LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type)== NETCONN_TCP), return ERR_VAL;); + if (size == 0) { + return ERR_OK; + } + dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); +#if LWIP_SO_SNDTIMEO + if (conn->send_timeout != 0) { + dontblock = 1; + } +#endif /* LWIP_SO_SNDTIMEO */ + if (dontblock && !bytes_written) { + /* This implies netconn_write() cannot be used for non-blocking send, since + it has no way to return the number of bytes written. */ + return ERR_VAL; + } + + API_MSG_VAR_ALLOC(msg); + /* non-blocking write sends as much */ + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.w.dataptr = dataptr; + API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; + API_MSG_VAR_REF(msg).msg.w.len = size; +#if LWIP_SO_SNDTIMEO + if (conn->send_timeout != 0) { + /* get the time we started, which is later compared to + sys_now() + conn->send_timeout */ + API_MSG_VAR_REF(msg).msg.w.time_started = sys_now(); + } else { + API_MSG_VAR_REF(msg).msg.w.time_started = 0; + } +#endif /* LWIP_SO_SNDTIMEO */ + + /* For locking the core: this _can_ be delayed on low memory/low send buffer, + but if it is, this is done inside api_msg.c:do_write(), so we can use the + non-blocking version here. */ + err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg)); + if ((err == ERR_OK) && (bytes_written != NULL)) { + if (dontblock) { + /* nonblocking write: maybe the data has been sent partly */ + *bytes_written = API_MSG_VAR_REF(msg).msg.w.len; + } else { + /* blocking call succeeded: all data has been sent if it */ + *bytes_written = size; + } + } + API_MSG_VAR_FREE(msg); + + return err; +} + +/** + * @ingroup netconn_tcp + * Close or shutdown a TCP netconn (doesn't delete it). + * + * @param conn the TCP netconn to close or shutdown + * @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) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + LWIP_UNUSED_ARG(how); + + LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + API_MSG_VAR_REF(msg).conn = conn; +#if LWIP_TCP + /* shutting down both ends is the same as closing */ + API_MSG_VAR_REF(msg).msg.sd.shut = how; +#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 = + ((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)); + API_MSG_VAR_FREE(msg); + + return err; +} + +/** + * @ingroup netconn_tcp + * Close a TCP netconn (doesn't delete it). + * + * @param conn the TCP netconn to close + * @return ERR_OK if the netconn was closed, any other err_t on error + */ +err_t +netconn_close(struct netconn *conn) +{ + /* shutting down both ends is the same as closing */ + return netconn_close_shutdown(conn, NETCONN_SHUT_RDWR); +} + +/** + * @ingroup netconn_tcp + * Shut down one or both sides of a TCP netconn (doesn't delete it). + * + * @param conn the TCP netconn to shut down + * @param shut_rx shut down the RX side (no more read possible after this) + * @param shut_tx shut down the TX side (no more write possible after this) + * @return ERR_OK if the netconn was closed, any other err_t on error + */ +err_t +netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx) +{ + return netconn_close_shutdown(conn, (shut_rx ? NETCONN_SHUT_RD : 0) | (shut_tx ? NETCONN_SHUT_WR : 0)); +} + +#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) +/** + * @ingroup netconn_udp + * Join multicast groups for UDP netconns. + * + * @param conn the UDP netconn for which to change multicast addresses + * @param multiaddr IP address of the multicast group to join or leave + * @param netif_addr the IP address of the network interface on which to send + * the igmp message + * @param join_or_leave flag whether to send a join- or leave-message + * @return ERR_OK if the action was taken, any err_t on error + */ +err_t +netconn_join_leave_group(struct netconn *conn, + const ip_addr_t *multiaddr, + const ip_addr_t *netif_addr, + enum netconn_igmp join_or_leave) +{ + API_MSG_VAR_DECLARE(msg); + err_t err; + + LWIP_ERROR("netconn_join_leave_group: invalid conn", (conn != NULL), return ERR_ARG;); + + API_MSG_VAR_ALLOC(msg); + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ + if (multiaddr == NULL) { + multiaddr = IP4_ADDR_ANY; + } + if (netif_addr == NULL) { + netif_addr = IP4_ADDR_ANY; + } +#endif /* LWIP_IPV4 */ + + API_MSG_VAR_REF(msg).conn = conn; + API_MSG_VAR_REF(msg).msg.jl.multiaddr = API_MSG_VAR_REF(multiaddr); + API_MSG_VAR_REF(msg).msg.jl.netif_addr = API_MSG_VAR_REF(netif_addr); + API_MSG_VAR_REF(msg).msg.jl.join_or_leave = join_or_leave; + err = netconn_apimsg(lwip_netconn_do_join_leave_group, &API_MSG_VAR_REF(msg)); + API_MSG_VAR_FREE(msg); + + return err; +} +#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ + +#if LWIP_DNS +/** + * @ingroup netconn_common + * Execute a DNS query, only one IP address is returned + * + * @param name a string representation of the DNS host name to query + * @param addr a preallocated ip_addr_t where to store the resolved IP address + * @param dns_addrtype IP address type (IPv4 / IPv6) + * @return ERR_OK: resolving succeeded + * ERR_MEM: memory error, try again later + * ERR_ARG: dns client not initialized or invalid hostname + * ERR_VAL: dns server response was invalid + */ +#if LWIP_IPV4 && LWIP_IPV6 +err_t +netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype) +#else +err_t +netconn_gethostbyname(const char *name, ip_addr_t *addr) +#endif +{ + API_VAR_DECLARE(struct dns_api_msg, msg); +#if !LWIP_MPU_COMPATIBLE + sys_sem_t sem; +#endif /* LWIP_MPU_COMPATIBLE */ + err_t err; + err_t cberr; + + LWIP_ERROR("netconn_gethostbyname: invalid name", (name != NULL), return ERR_ARG;); + LWIP_ERROR("netconn_gethostbyname: invalid addr", (addr != NULL), return ERR_ARG;); +#if LWIP_MPU_COMPATIBLE + if (strlen(name) >= DNS_MAX_NAME_LENGTH) { + return ERR_ARG; + } +#endif + + API_VAR_ALLOC(struct dns_api_msg, MEMP_DNS_API_MSG, msg, ERR_MEM); +#if LWIP_MPU_COMPATIBLE + strncpy(API_VAR_REF(msg).name, name, DNS_MAX_NAME_LENGTH-1); + API_VAR_REF(msg).name[DNS_MAX_NAME_LENGTH-1] = 0; +#else /* LWIP_MPU_COMPATIBLE */ + msg.err = &err; + msg.sem = &sem; + API_VAR_REF(msg).addr = API_VAR_REF(addr); + API_VAR_REF(msg).name = name; +#endif /* LWIP_MPU_COMPATIBLE */ +#if LWIP_IPV4 && LWIP_IPV6 + API_VAR_REF(msg).dns_addrtype = dns_addrtype; +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#if LWIP_NETCONN_SEM_PER_THREAD + API_VAR_REF(msg).sem = LWIP_NETCONN_THREAD_SEM_GET(); +#else /* LWIP_NETCONN_SEM_PER_THREAD*/ + err = sys_sem_new(API_EXPR_REF(API_VAR_REF(msg).sem), 0); + if (err != ERR_OK) { + API_VAR_FREE(MEMP_DNS_API_MSG, msg); + return err; + } +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + cberr = tcpip_callback(lwip_netconn_do_gethostbyname, &API_VAR_REF(msg)); + if (cberr != ERR_OK) { +#if !LWIP_NETCONN_SEM_PER_THREAD + sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); +#endif /* !LWIP_NETCONN_SEM_PER_THREAD */ + API_VAR_FREE(MEMP_DNS_API_MSG, msg); + return cberr; + } + sys_sem_wait(API_EXPR_REF_SEM(API_VAR_REF(msg).sem)); +#if !LWIP_NETCONN_SEM_PER_THREAD + sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); +#endif /* !LWIP_NETCONN_SEM_PER_THREAD */ + +#if LWIP_MPU_COMPATIBLE + *addr = msg->addr; + err = msg->err; +#endif /* LWIP_MPU_COMPATIBLE */ + + API_VAR_FREE(MEMP_DNS_API_MSG, msg); + return err; +} +#endif /* LWIP_DNS*/ + +#if LWIP_NETCONN_SEM_PER_THREAD +void +netconn_thread_init(void) +{ + sys_sem_t *sem = LWIP_NETCONN_THREAD_SEM_GET(); + if ((sem == NULL) || !sys_sem_valid(sem)) { + /* call alloc only once */ + LWIP_NETCONN_THREAD_SEM_ALLOC(); + LWIP_ASSERT("LWIP_NETCONN_THREAD_SEM_ALLOC() failed", sys_sem_valid(LWIP_NETCONN_THREAD_SEM_GET())); + } +} + +void +netconn_thread_cleanup(void) +{ + sys_sem_t *sem = LWIP_NETCONN_THREAD_SEM_GET(); + if ((sem != NULL) && sys_sem_valid(sem)) { + /* call free only once */ + LWIP_NETCONN_THREAD_SEM_FREE(); + } +} +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + +#endif /* LWIP_NETCONN */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_msg.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_msg.c index 5a8dad9..a609017 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_msg.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/api_msg.c @@ -1,1953 +1,1953 @@ -/** - * @file - * Sequential API Internal module - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/priv/api_msg.h" - -#include "lwip/ip.h" -#include "lwip/ip_addr.h" -#include "lwip/udp.h" -#include "lwip/tcp.h" -#include "lwip/raw.h" - -#include "lwip/memp.h" -#include "lwip/igmp.h" -#include "lwip/dns.h" -#include "lwip/mld6.h" -#include "lwip/priv/tcpip_priv.h" - -#include - -/* netconns are polled once per second (e.g. continue write on memory error) */ -#define NETCONN_TCP_POLL_INTERVAL 2 - -#define SET_NONBLOCKING_CONNECT(conn, val) do { if (val) { \ - (conn)->flags |= NETCONN_FLAG_IN_NONBLOCKING_CONNECT; \ -} else { \ - (conn)->flags &= ~ NETCONN_FLAG_IN_NONBLOCKING_CONNECT; }} while(0) -#define IN_NONBLOCKING_CONNECT(conn) (((conn)->flags & NETCONN_FLAG_IN_NONBLOCKING_CONNECT) != 0) - -/* forward declarations */ -#if LWIP_TCP -#if LWIP_TCPIP_CORE_LOCKING -#define WRITE_DELAYED , 1 -#define WRITE_DELAYED_PARAM , u8_t delayed -#else /* LWIP_TCPIP_CORE_LOCKING */ -#define WRITE_DELAYED -#define WRITE_DELAYED_PARAM -#endif /* LWIP_TCPIP_CORE_LOCKING */ -static err_t lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM); -static err_t lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM); -#endif - -#if LWIP_TCPIP_CORE_LOCKING -#define TCPIP_APIMSG_ACK(m) NETCONN_SET_SAFE_ERR((m)->conn, (m)->err) -#else /* LWIP_TCPIP_CORE_LOCKING */ -#define TCPIP_APIMSG_ACK(m) do { NETCONN_SET_SAFE_ERR((m)->conn, (m)->err); sys_sem_signal(LWIP_API_MSG_SEM(m)); } while(0) -#endif /* LWIP_TCPIP_CORE_LOCKING */ - -#if LWIP_TCP -u8_t netconn_aborted; -#endif /* LWIP_TCP */ - -#if LWIP_RAW -/** - * Receive callback function for RAW netconns. - * Doesn't 'eat' the packet, only copies it and sends it to - * conn->recvmbox - * - * @see raw.h (struct raw_pcb.recv) for parameters and return value - */ -static u8_t -recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, - const ip_addr_t *addr) -{ - struct pbuf *q; - struct netbuf *buf; - struct netconn *conn; - - LWIP_UNUSED_ARG(addr); - conn = (struct netconn *)arg; - - if ((conn != NULL) && sys_mbox_valid(&conn->recvmbox)) { -#if LWIP_SO_RCVBUF - int recv_avail; - SYS_ARCH_GET(conn->recv_avail, recv_avail); - if ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize) { - return 0; - } -#endif /* LWIP_SO_RCVBUF */ - /* copy the whole packet into new pbufs */ - q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); - if (q != NULL) { - if (pbuf_copy(q, p) != ERR_OK) { - pbuf_free(q); - q = NULL; - } - } - - if (q != NULL) { - u16_t len; - buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); - if (buf == NULL) { - pbuf_free(q); - return 0; - } - - buf->p = q; - buf->ptr = q; - ip_addr_copy(buf->addr, *ip_current_src_addr()); - buf->port = pcb->protocol; - - len = q->tot_len; - if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { - netbuf_delete(buf); - return 0; - } else { -#if LWIP_SO_RCVBUF - SYS_ARCH_INC(conn->recv_avail, len); -#endif /* LWIP_SO_RCVBUF */ - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); - } - } - } - - return 0; /* do not eat the packet */ -} -#endif /* LWIP_RAW*/ - -#if LWIP_UDP -/** - * Receive callback function for UDP netconns. - * Posts the packet to conn->recvmbox or deletes it on memory error. - * - * @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) -{ - struct netbuf *buf; - struct netconn *conn; - u16_t len; -#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); - LWIP_ASSERT("recv_udp must have an argument", arg != NULL); - conn = (struct netconn *)arg; - - if (conn == NULL) { - pbuf_free(p); - return; - } - - LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb); - -#if LWIP_SO_RCVBUF - SYS_ARCH_GET(conn->recv_avail, recv_avail); - if (!sys_mbox_valid(&conn->recvmbox) || - ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { -#else /* LWIP_SO_RCVBUF */ - if (!sys_mbox_valid(&conn->recvmbox)) { -#endif /* LWIP_SO_RCVBUF */ - pbuf_free(p); - return; - } - - buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); - if (buf == NULL) { - pbuf_free(p); - return; - } else { - buf->p = p; - buf->ptr = p; - ip_addr_set(&buf->addr, addr); - buf->port = port; -#if LWIP_NETBUF_RECVINFO - { - /* get the UDP header - always in the first pbuf, ensured by udp_input */ - const struct udp_hdr* udphdr = (const struct udp_hdr*)ip_next_header_ptr(); -#if LWIP_CHECKSUM_ON_COPY - buf->flags = NETBUF_FLAG_DESTADDR; -#endif /* LWIP_CHECKSUM_ON_COPY */ - ip_addr_set(&buf->toaddr, ip_current_dest_addr()); - buf->toport_chksum = udphdr->dest; - } -#endif /* LWIP_NETBUF_RECVINFO */ - } - - len = p->tot_len; - if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { - netbuf_delete(buf); - return; - } else { -#if LWIP_SO_RCVBUF - SYS_ARCH_INC(conn->recv_avail, len); -#endif /* LWIP_SO_RCVBUF */ - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); - } -} -#endif /* LWIP_UDP */ - -#if LWIP_TCP -/** - * Receive callback function for TCP netconns. - * Posts the packet to conn->recvmbox, but doesn't delete it on errors. - * - * @see tcp.h (struct tcp_pcb.recv) for parameters and return value - */ -static err_t -recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) -{ - struct netconn *conn; - u16_t len; - - LWIP_UNUSED_ARG(pcb); - LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); - LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); - conn = (struct netconn *)arg; - - if (conn == NULL) { - return ERR_VAL; - } - LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); - - if (!sys_mbox_valid(&conn->recvmbox)) { - /* recvmbox already deleted */ - if (p != NULL) { - tcp_recved(pcb, p->tot_len); - pbuf_free(p); - } - return ERR_OK; - } - /* Unlike for UDP or RAW pcbs, don't check for available space - using recv_avail since that could break the connection - (data is already ACKed) */ - - /* don't overwrite fatal errors! */ - if (err != ERR_OK) { - NETCONN_SET_SAFE_ERR(conn, err); - } - - if (p != NULL) { - len = p->tot_len; - } else { - len = 0; - } - - if (sys_mbox_trypost(&conn->recvmbox, p) != ERR_OK) { - /* don't deallocate p: it is presented to us later again from tcp_fasttmr! */ - return ERR_MEM; - } else { -#if LWIP_SO_RCVBUF - SYS_ARCH_INC(conn->recv_avail, len); -#endif /* LWIP_SO_RCVBUF */ - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); - } - - return ERR_OK; -} - -/** - * Poll callback function for TCP netconns. - * Wakes up an application thread that waits for a connection to close - * or data to be sent. The application thread then takes the - * appropriate action to go on. - * - * Signals the conn->sem. - * netconn_close waits for conn->sem if closing failed. - * - * @see tcp.h (struct tcp_pcb.poll) for parameters and return value - */ -static err_t -poll_tcp(void *arg, struct tcp_pcb *pcb) -{ - struct netconn *conn = (struct netconn *)arg; - - LWIP_UNUSED_ARG(pcb); - LWIP_ASSERT("conn != NULL", (conn != NULL)); - - if (conn->state == NETCONN_WRITE) { - lwip_netconn_do_writemore(conn WRITE_DELAYED); - } else if (conn->state == NETCONN_CLOSE) { -#if !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER - if (conn->current_msg && conn->current_msg->msg.sd.polls_left) { - conn->current_msg->msg.sd.polls_left--; - } -#endif /* !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER */ - lwip_netconn_do_close_internal(conn WRITE_DELAYED); - } - /* @todo: implement connect timeout here? */ - - /* Did a nonblocking write fail before? Then check available write-space. */ - if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { - /* If the queued byte- or pbuf-count drops below the configured low-water limit, - let select mark this pcb as writable again. */ - if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && - (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { - conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; - API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); - } - } - - return ERR_OK; -} - -/** - * Sent callback function for TCP netconns. - * Signals the conn->sem and calls API_EVENT. - * netconn_write waits for conn->sem if send buffer is low. - * - * @see tcp.h (struct tcp_pcb.sent) for parameters and return value - */ -static err_t -sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len) -{ - struct netconn *conn = (struct netconn *)arg; - - LWIP_UNUSED_ARG(pcb); - LWIP_ASSERT("conn != NULL", (conn != NULL)); - - if (conn) { - if (conn->state == NETCONN_WRITE) { - lwip_netconn_do_writemore(conn WRITE_DELAYED); - } else if (conn->state == NETCONN_CLOSE) { - lwip_netconn_do_close_internal(conn WRITE_DELAYED); - } - - /* If the queued byte- or pbuf-count drops below the configured low-water limit, - let select mark this pcb as writable again. */ - if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && - (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { - conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; - API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); - } - } - - return ERR_OK; -} - -/** - * Error callback function for TCP netconns. - * Signals conn->sem, posts to all conn mboxes and calls API_EVENT. - * The application thread has then to decide what to do. - * - * @see tcp.h (struct tcp_pcb.err) for parameters - */ -static void -err_tcp(void *arg, err_t err) -{ - struct netconn *conn; - enum netconn_state old_state; - - conn = (struct netconn *)arg; - LWIP_ASSERT("conn != NULL", (conn != NULL)); - - conn->pcb.tcp = NULL; - - /* reset conn->state now before waking up other threads */ - old_state = conn->state; - conn->state = NETCONN_NONE; - - if (old_state == NETCONN_CLOSE) { - /* RST during close: let close return success & dealloc the netconn */ - err = ERR_OK; - NETCONN_SET_SAFE_ERR(conn, ERR_OK); - } else { - /* no check since this is always fatal! */ - SYS_ARCH_SET(conn->last_err, err); - } - - /* @todo: the type of NETCONN_EVT created should depend on 'old_state' */ - - /* Notify the user layer about a connection error. Used to signal select. */ - API_EVENT(conn, NETCONN_EVT_ERROR, 0); - /* Try to release selects pending on 'read' or 'write', too. - They will get an error if they actually try to read or write. */ - API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); - API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); - - /* pass NULL-message to recvmbox to wake up pending recv */ - if (sys_mbox_valid(&conn->recvmbox)) { - /* use trypost to prevent deadlock */ - sys_mbox_trypost(&conn->recvmbox, NULL); - } - /* pass NULL-message to acceptmbox to wake up pending accept */ - if (sys_mbox_valid(&conn->acceptmbox)) { - /* use trypost to preven deadlock */ - sys_mbox_trypost(&conn->acceptmbox, NULL); - } - - if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || - (old_state == NETCONN_CONNECT)) { - /* calling lwip_netconn_do_writemore/lwip_netconn_do_close_internal is not necessary - since the pcb has already been deleted! */ - int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn); - SET_NONBLOCKING_CONNECT(conn, 0); - - if (!was_nonblocking_connect) { - sys_sem_t* op_completed_sem; - /* set error return code */ - LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); - conn->current_msg->err = err; - op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); - LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); - conn->current_msg = NULL; - /* wake up the waiting task */ - NETCONN_SET_SAFE_ERR(conn, err); - sys_sem_signal(op_completed_sem); - } - } else { - LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); - } -} - -/** - * Setup a tcp_pcb with the correct callback function pointers - * and their arguments. - * - * @param conn the TCP netconn to setup - */ -static void -setup_tcp(struct netconn *conn) -{ - struct tcp_pcb *pcb; - - pcb = conn->pcb.tcp; - tcp_arg(pcb, conn); - tcp_recv(pcb, recv_tcp); - tcp_sent(pcb, sent_tcp); - tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL); - tcp_err(pcb, err_tcp); -} - -/** - * Accept callback function for TCP netconns. - * Allocates a new netconn and posts that to conn->acceptmbox. - * - * @see tcp.h (struct tcp_pcb_listen.accept) for parameters and return value - */ -static err_t -accept_function(void *arg, struct tcp_pcb *newpcb, err_t err) -{ - struct netconn *newconn; - struct netconn *conn = (struct netconn *)arg; - - if (conn == NULL) { - return ERR_VAL; - } - if (!sys_mbox_valid(&conn->acceptmbox)) { - LWIP_DEBUGF(API_MSG_DEBUG, ("accept_function: acceptmbox already deleted\n")); - return ERR_VAL; - } - - if (newpcb == NULL) { - /* out-of-pcbs during connect: pass on this error to the application */ - if (sys_mbox_trypost(&conn->acceptmbox, &netconn_aborted) == ERR_OK) { - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); - } - return ERR_VAL; - } - - LWIP_DEBUGF(API_MSG_DEBUG, ("accept_function: newpcb->tate: %s\n", tcp_debug_state_str(newpcb->state))); - - /* We have to set the callback here even though - * the new socket is unknown. newconn->socket is marked as -1. */ - newconn = netconn_alloc(conn->type, conn->callback); - if (newconn == NULL) { - /* outof netconns: pass on this error to the application */ - if (sys_mbox_trypost(&conn->acceptmbox, &netconn_aborted) == ERR_OK) { - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); - } - return ERR_MEM; - } - newconn->pcb.tcp = newpcb; - setup_tcp(newconn); - /* no protection: when creating the pcb, the netconn is not yet known - to the application thread */ - newconn->last_err = err; - - /* handle backlog counter */ - tcp_backlog_delayed(newpcb); - - if (sys_mbox_trypost(&conn->acceptmbox, newconn) != ERR_OK) { - /* When returning != ERR_OK, the pcb is aborted in tcp_process(), - so do nothing here! */ - /* remove all references to this netconn from the pcb */ - struct tcp_pcb* pcb = newconn->pcb.tcp; - tcp_arg(pcb, NULL); - tcp_recv(pcb, NULL); - tcp_sent(pcb, NULL); - tcp_poll(pcb, NULL, 0); - tcp_err(pcb, NULL); - /* remove reference from to the pcb from this netconn */ - newconn->pcb.tcp = NULL; - /* no need to drain since we know the recvmbox is empty. */ - sys_mbox_free(&newconn->recvmbox); - sys_mbox_set_invalid(&newconn->recvmbox); - netconn_free(newconn); - return ERR_MEM; - } else { - /* Register event with callback */ - API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); - } - - return ERR_OK; -} -#endif /* LWIP_TCP */ - -/** - * Create a new pcb of a specific type. - * Called from lwip_netconn_do_newconn(). - * - * @param msg the api_msg_msg describing the connection type - */ -static void -pcb_new(struct api_msg *msg) -{ - enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4; - - LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); - -#if LWIP_IPV6 && LWIP_IPV4 - /* IPv6: Dual-stack by default, unless netconn_set_ipv6only() is called */ - if(NETCONNTYPE_ISIPV6(netconn_type(msg->conn))) { - iptype = IPADDR_TYPE_ANY; - } -#endif - - /* Allocate a PCB for this connection */ - switch(NETCONNTYPE_GROUP(msg->conn->type)) { -#if LWIP_RAW - case NETCONN_RAW: - msg->conn->pcb.raw = raw_new_ip_type(iptype, msg->msg.n.proto); - if (msg->conn->pcb.raw != NULL) { -#if LWIP_IPV6 - /* ICMPv6 packets should always have checksum calculated by the stack as per RFC 3542 chapter 3.1 */ - if (NETCONNTYPE_ISIPV6(msg->conn->type) && msg->conn->pcb.raw->protocol == IP6_NEXTH_ICMP6) { - msg->conn->pcb.raw->chksum_reqd = 1; - msg->conn->pcb.raw->chksum_offset = 2; - } -#endif /* LWIP_IPV6 */ - raw_recv(msg->conn->pcb.raw, recv_raw, msg->conn); - } - break; -#endif /* LWIP_RAW */ -#if LWIP_UDP - case NETCONN_UDP: - msg->conn->pcb.udp = udp_new_ip_type(iptype); - if (msg->conn->pcb.udp != NULL) { -#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)) { - udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); - } - udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); - } - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case NETCONN_TCP: - msg->conn->pcb.tcp = tcp_new_ip_type(iptype); - if (msg->conn->pcb.tcp != NULL) { - setup_tcp(msg->conn); - } - break; -#endif /* LWIP_TCP */ - default: - /* Unsupported netconn type, e.g. protocol disabled */ - msg->err = ERR_VAL; - return; - } - if (msg->conn->pcb.ip == NULL) { - msg->err = ERR_MEM; - } -} - -/** - * Create a new pcb of a specific type inside a netconn. - * Called from netconn_new_with_proto_and_callback. - * - * @param m the api_msg_msg describing the connection type - */ -void -lwip_netconn_do_newconn(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - msg->err = ERR_OK; - if (msg->conn->pcb.tcp == NULL) { - pcb_new(msg); - } - /* Else? This "new" connection already has a PCB allocated. */ - /* Is this an error condition? Should it be deleted? */ - /* We currently just are happy and return. */ - - TCPIP_APIMSG_ACK(msg); -} - -/** - * Create a new netconn (of a specific type) that has a callback function. - * The corresponding pcb is NOT created! - * - * @param t the type of 'connection' to create (@see enum netconn_type) - * @param callback a function to call on status changes (RX available, TX'ed) - * @return a newly allocated struct netconn or - * NULL on memory error - */ -struct netconn* -netconn_alloc(enum netconn_type t, netconn_callback callback) -{ - struct netconn *conn; - int size; - - conn = (struct netconn *)memp_malloc(MEMP_NETCONN); - if (conn == NULL) { - return NULL; - } - - conn->last_err = ERR_OK; - conn->type = t; - conn->pcb.tcp = NULL; - - /* If all sizes are the same, every compiler should optimize this switch to nothing */ - switch(NETCONNTYPE_GROUP(t)) { -#if LWIP_RAW - case NETCONN_RAW: - size = DEFAULT_RAW_RECVMBOX_SIZE; - break; -#endif /* LWIP_RAW */ -#if LWIP_UDP - case NETCONN_UDP: - size = DEFAULT_UDP_RECVMBOX_SIZE; - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case NETCONN_TCP: - size = DEFAULT_TCP_RECVMBOX_SIZE; - break; -#endif /* LWIP_TCP */ - default: - LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); - goto free_and_return; - } - - if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { - goto free_and_return; - } -#if !LWIP_NETCONN_SEM_PER_THREAD - if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) { - sys_mbox_free(&conn->recvmbox); - goto free_and_return; - } -#endif - -#if LWIP_TCP - sys_mbox_set_invalid(&conn->acceptmbox); -#endif - conn->state = NETCONN_NONE; -#if LWIP_SOCKET - /* initialize socket to -1 since 0 is a valid socket */ - conn->socket = -1; -#endif /* LWIP_SOCKET */ - conn->callback = callback; -#if LWIP_TCP - conn->current_msg = NULL; - conn->write_offset = 0; -#endif /* LWIP_TCP */ -#if LWIP_SO_SNDTIMEO - conn->send_timeout = 0; -#endif /* LWIP_SO_SNDTIMEO */ -#if LWIP_SO_RCVTIMEO - conn->recv_timeout = 0; -#endif /* LWIP_SO_RCVTIMEO */ -#if LWIP_SO_RCVBUF - conn->recv_bufsize = RECV_BUFSIZE_DEFAULT; - conn->recv_avail = 0; -#endif /* LWIP_SO_RCVBUF */ -#if LWIP_SO_LINGER - conn->linger = -1; -#endif /* LWIP_SO_LINGER */ - conn->flags = 0; - return conn; -free_and_return: - memp_free(MEMP_NETCONN, conn); - return NULL; -} - -/** - * Delete a netconn and all its resources. - * The pcb is NOT freed (since we might not be in the right thread context do this). - * - * @param conn the netconn to free - */ -void -netconn_free(struct netconn *conn) -{ - LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL); - LWIP_ASSERT("recvmbox must be deallocated before calling this function", - !sys_mbox_valid(&conn->recvmbox)); -#if LWIP_TCP - LWIP_ASSERT("acceptmbox must be deallocated before calling this function", - !sys_mbox_valid(&conn->acceptmbox)); -#endif /* LWIP_TCP */ - -#if !LWIP_NETCONN_SEM_PER_THREAD - sys_sem_free(&conn->op_completed); - sys_sem_set_invalid(&conn->op_completed); -#endif - - memp_free(MEMP_NETCONN, conn); -} - -/** - * Delete rcvmbox and acceptmbox of a netconn and free the left-over data in - * these mboxes - * - * @param conn the netconn to free - * @bytes_drained bytes drained from recvmbox - * @accepts_drained pending connections drained from acceptmbox - */ -static void -netconn_drain(struct netconn *conn) -{ - void *mem; -#if LWIP_TCP - struct pbuf *p; -#endif /* LWIP_TCP */ - - /* This runs in tcpip_thread, so we don't need to lock against rx packets */ - - /* Delete and drain the recvmbox. */ - if (sys_mbox_valid(&conn->recvmbox)) { - while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { -#if LWIP_TCP - if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) { - if (mem != NULL) { - p = (struct pbuf*)mem; - /* pcb might be set to NULL already by err_tcp() */ - if (conn->pcb.tcp != NULL) { - tcp_recved(conn->pcb.tcp, p->tot_len); - } - pbuf_free(p); - } - } else -#endif /* LWIP_TCP */ - { - netbuf_delete((struct netbuf *)mem); - } - } - sys_mbox_free(&conn->recvmbox); - sys_mbox_set_invalid(&conn->recvmbox); - } - - /* Delete and drain the acceptmbox. */ -#if LWIP_TCP - if (sys_mbox_valid(&conn->acceptmbox)) { - while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { - if (mem != &netconn_aborted) { - struct netconn *newconn = (struct netconn *)mem; - /* Only tcp pcbs have an acceptmbox, so no need to check conn->type */ - /* pcb might be set to NULL already by err_tcp() */ - /* drain recvmbox */ - netconn_drain(newconn); - if (newconn->pcb.tcp != NULL) { - tcp_abort(newconn->pcb.tcp); - newconn->pcb.tcp = NULL; - } - netconn_free(newconn); - } - } - sys_mbox_free(&conn->acceptmbox); - sys_mbox_set_invalid(&conn->acceptmbox); - } -#endif /* LWIP_TCP */ -} - -#if LWIP_TCP -/** - * Internal helper function to close a TCP netconn: since this sometimes - * doesn't work at the first attempt, this function is called from multiple - * places. - * - * @param conn the TCP netconn to close - */ -static err_t -lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) -{ - err_t err; - u8_t shut, shut_rx, shut_tx, close; - u8_t close_finished = 0; - struct tcp_pcb* tpcb; -#if LWIP_SO_LINGER - u8_t linger_wait_required = 0; -#endif /* LWIP_SO_LINGER */ - - LWIP_ASSERT("invalid conn", (conn != NULL)); - LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)); - LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); - LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); - LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); - - tpcb = conn->pcb.tcp; - shut = conn->current_msg->msg.sd.shut; - shut_rx = shut & NETCONN_SHUT_RD; - shut_tx = shut & NETCONN_SHUT_WR; - /* shutting down both ends is the same as closing - (also if RD or WR side was shut down before already) */ - if (shut == NETCONN_SHUT_RDWR) { - close = 1; - } else if (shut_rx && - ((tpcb->state == FIN_WAIT_1) || - (tpcb->state == FIN_WAIT_2) || - (tpcb->state == CLOSING))) { - close = 1; - } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) { - close = 1; - } else { - close = 0; - } - - /* Set back some callback pointers */ - if (close) { - tcp_arg(tpcb, NULL); - } - if (tpcb->state == LISTEN) { - tcp_accept(tpcb, NULL); - } else { - /* some callbacks have to be reset if tcp_close is not successful */ - if (shut_rx) { - tcp_recv(tpcb, NULL); - tcp_accept(tpcb, NULL); - } - if (shut_tx) { - tcp_sent(tpcb, NULL); - } - if (close) { - tcp_poll(tpcb, NULL, 0); - tcp_err(tpcb, NULL); - } - } - /* Try to close the connection */ - if (close) { -#if LWIP_SO_LINGER - /* check linger possibilites before calling tcp_close */ - err = ERR_OK; - /* linger enabled/required at all? (i.e. is there untransmitted data left?) */ - if ((conn->linger >= 0) && (conn->pcb.tcp->unsent || conn->pcb.tcp->unacked)) { - if ((conn->linger == 0)) { - /* data left but linger prevents waiting */ - tcp_abort(tpcb); - tpcb = NULL; - } else if (conn->linger > 0) { - /* data left and linger says we should wait */ - if (netconn_is_nonblocking(conn)) { - /* data left on a nonblocking netconn -> cannot linger */ - err = ERR_WOULDBLOCK; - } else if ((s32_t)(sys_now() - conn->current_msg->msg.sd.time_started) >= - (conn->linger * 1000)) { - /* data left but linger timeout has expired (this happens on further - calls to this function through poll_tcp */ - tcp_abort(tpcb); - tpcb = NULL; - } else { - /* data left -> need to wait for ACK after successful close */ - linger_wait_required = 1; - } - } - } - if ((err == ERR_OK) && (tpcb != NULL)) -#endif /* LWIP_SO_LINGER */ - { - err = tcp_close(tpcb); - } - } else { - err = tcp_shutdown(tpcb, shut_rx, shut_tx); - } - if (err == ERR_OK) { - close_finished = 1; -#if LWIP_SO_LINGER - if (linger_wait_required) { - /* wait for ACK of all unsent/unacked data by just getting called again */ - close_finished = 0; - err = ERR_INPROGRESS; - } -#endif /* LWIP_SO_LINGER */ - } else { - if (err == ERR_MEM) { - /* Closing failed because of memory shortage, try again later. Even for - nonblocking netconns, we have to wait since no standard socket application - is prepared for close failing because of resource shortage. - Check the timeout: this is kind of an lwip addition to the standard sockets: - we wait for some time when failing to allocate a segment for the FIN */ -#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER - s32_t close_timeout = LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT; -#if LWIP_SO_SNDTIMEO - if (conn->send_timeout > 0) { - close_timeout = conn->send_timeout; - } -#endif /* LWIP_SO_SNDTIMEO */ -#if LWIP_SO_LINGER - if (conn->linger >= 0) { - /* use linger timeout (seconds) */ - close_timeout = conn->linger * 1000U; - } -#endif - if ((s32_t)(sys_now() - conn->current_msg->msg.sd.time_started) >= close_timeout) { -#else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ - if (conn->current_msg->msg.sd.polls_left == 0) { -#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ - close_finished = 1; - if (close) { - /* in this case, we want to RST the connection */ - tcp_abort(tpcb); - err = ERR_OK; - } - } - } else { - /* Closing failed for a non-memory error: give up */ - close_finished = 1; - } - } - if (close_finished) { - /* Closing done (succeeded, non-memory error, nonblocking error or timeout) */ - sys_sem_t* op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); - conn->current_msg->err = err; - conn->current_msg = NULL; - conn->state = NETCONN_NONE; - if (err == ERR_OK) { - if (close) { - /* Set back some callback pointers as conn is going away */ - conn->pcb.tcp = NULL; - /* Trigger select() in socket layer. Make sure everybody notices activity - on the connection, error first! */ - API_EVENT(conn, NETCONN_EVT_ERROR, 0); - } - if (shut_rx) { - API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); - } - if (shut_tx) { - API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); - } - } - NETCONN_SET_SAFE_ERR(conn, err); -#if LWIP_TCPIP_CORE_LOCKING - if (delayed) -#endif - { - /* wake up the application task */ - sys_sem_signal(op_completed_sem); - } - return ERR_OK; - } - if (!close_finished) { - /* Closing failed and we want to wait: restore some of the callbacks */ - /* Closing of listen pcb will never fail! */ - LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN)); - if (shut_tx) { - tcp_sent(tpcb, sent_tcp); - } - /* when waiting for close, set up poll interval to 500ms */ - tcp_poll(tpcb, poll_tcp, 1); - tcp_err(tpcb, err_tcp); - tcp_arg(tpcb, conn); - /* don't restore recv callback: we don't want to receive any more data */ - } - /* If closing didn't succeed, we get called again either - from poll_tcp or from sent_tcp */ - LWIP_ASSERT("err != ERR_OK", err != ERR_OK); - return err; -} -#endif /* LWIP_TCP */ - -/** - * Delete the pcb inside a netconn. - * Called from netconn_delete. - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_delconn(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - enum netconn_state state = msg->conn->state; - LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ - (state == NETCONN_NONE) || (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP)); -#if LWIP_NETCONN_FULLDUPLEX - /* In full duplex mode, blocking write/connect is aborted with ERR_CLSD */ - if (state != NETCONN_NONE) { - if ((state == NETCONN_WRITE) || - ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { - /* close requested, abort running write/connect */ - sys_sem_t* op_completed_sem; - LWIP_ASSERT("msg->conn->current_msg != NULL", msg->conn->current_msg != NULL); - op_completed_sem = LWIP_API_MSG_SEM(msg->conn->current_msg); - msg->conn->current_msg->err = ERR_CLSD; - msg->conn->current_msg = NULL; - msg->conn->write_offset = 0; - msg->conn->state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(msg->conn, ERR_CLSD); - sys_sem_signal(op_completed_sem); - } - } -#else /* LWIP_NETCONN_FULLDUPLEX */ - if (((state != NETCONN_NONE) && - (state != NETCONN_LISTEN) && - (state != NETCONN_CONNECT)) || - ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { - /* This means either a blocking write or blocking connect is running - (nonblocking write returns and sets state to NONE) */ - msg->err = ERR_INPROGRESS; - } else -#endif /* LWIP_NETCONN_FULLDUPLEX */ - { - LWIP_ASSERT("blocking connect in progress", - (state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); - msg->err = ERR_OK; - /* Drain and delete mboxes */ - netconn_drain(msg->conn); - - if (msg->conn->pcb.tcp != NULL) { - - switch (NETCONNTYPE_GROUP(msg->conn->type)) { -#if LWIP_RAW - case NETCONN_RAW: - raw_remove(msg->conn->pcb.raw); - break; -#endif /* LWIP_RAW */ -#if LWIP_UDP - case NETCONN_UDP: - msg->conn->pcb.udp->recv_arg = NULL; - udp_remove(msg->conn->pcb.udp); - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case NETCONN_TCP: - LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && - msg->conn->write_offset == 0); - msg->conn->state = NETCONN_CLOSE; - msg->msg.sd.shut = NETCONN_SHUT_RDWR; - msg->conn->current_msg = msg; -#if LWIP_TCPIP_CORE_LOCKING - if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { - LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); - UNLOCK_TCPIP_CORE(); - sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); - LOCK_TCPIP_CORE(); - LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); - } -#else /* LWIP_TCPIP_CORE_LOCKING */ - lwip_netconn_do_close_internal(msg->conn); -#endif /* LWIP_TCPIP_CORE_LOCKING */ - /* API_EVENT is called inside lwip_netconn_do_close_internal, before releasing - the application thread, so we can return at this point! */ - return; -#endif /* LWIP_TCP */ - default: - break; - } - msg->conn->pcb.tcp = NULL; - } - /* tcp netconns don't come here! */ - - /* @todo: this lets select make the socket readable and writable, - which is wrong! errfd instead? */ - API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0); - API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); - } - if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) { - TCPIP_APIMSG_ACK(msg); - } -} - -/** - * Bind a pcb contained in a netconn - * Called from netconn_bind. - * - * @param m the api_msg_msg pointing to the connection and containing - * the IP address and port to bind to - */ -void -lwip_netconn_do_bind(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - msg->err = ERR_VAL; - if (msg->conn->pcb.tcp != NULL) { - switch (NETCONNTYPE_GROUP(msg->conn->type)) { -#if LWIP_RAW - case NETCONN_RAW: - msg->err = raw_bind(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); - break; -#endif /* LWIP_RAW */ -#if LWIP_UDP - case NETCONN_UDP: - msg->err = udp_bind(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case NETCONN_TCP: - msg->err = tcp_bind(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); - break; -#endif /* LWIP_TCP */ - default: - break; - } - } - } - TCPIP_APIMSG_ACK(msg); -} - -#if LWIP_TCP -/** - * TCP callback function if a connection (opened by tcp_connect/lwip_netconn_do_connect) has - * been established (or reset by the remote host). - * - * @see tcp.h (struct tcp_pcb.connected) for parameters and return values - */ -static err_t -lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err) -{ - struct netconn *conn; - int was_blocking; - sys_sem_t* op_completed_sem = NULL; - - LWIP_UNUSED_ARG(pcb); - - conn = (struct netconn *)arg; - - if (conn == NULL) { - return ERR_VAL; - } - - LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); - LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", - (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); - - if (conn->current_msg != NULL) { - conn->current_msg->err = err; - op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); - } - if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) { - setup_tcp(conn); - } - was_blocking = !IN_NONBLOCKING_CONNECT(conn); - SET_NONBLOCKING_CONNECT(conn, 0); - LWIP_ASSERT("blocking connect state error", - (was_blocking && op_completed_sem != NULL) || - (!was_blocking && op_completed_sem == NULL)); - conn->current_msg = NULL; - conn->state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(conn, ERR_OK); - API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); - - if (was_blocking) { - sys_sem_signal(op_completed_sem); - } - return ERR_OK; -} -#endif /* LWIP_TCP */ - -/** - * Connect a pcb contained inside a netconn - * Called from netconn_connect. - * - * @param m the api_msg_msg pointing to the connection and containing - * the IP address and port to connect to - */ -void -lwip_netconn_do_connect(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - if (msg->conn->pcb.tcp == NULL) { - /* This may happen when calling netconn_connect() a second time */ - msg->err = ERR_CLSD; - } else { - switch (NETCONNTYPE_GROUP(msg->conn->type)) { -#if LWIP_RAW - case NETCONN_RAW: - msg->err = raw_connect(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); - break; -#endif /* LWIP_RAW */ -#if LWIP_UDP - case NETCONN_UDP: - msg->err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case NETCONN_TCP: - /* Prevent connect while doing any other action. */ - if (msg->conn->state == NETCONN_CONNECT) { - msg->err = ERR_ALREADY; - } else if (msg->conn->state != NETCONN_NONE) { - msg->err = ERR_ISCONN; - } else { - setup_tcp(msg->conn); - msg->err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), - msg->msg.bc.port, lwip_netconn_do_connected); - if (msg->err == ERR_OK) { - u8_t non_blocking = netconn_is_nonblocking(msg->conn); - msg->conn->state = NETCONN_CONNECT; - SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); - if (non_blocking) { - msg->err = ERR_INPROGRESS; - } else { - msg->conn->current_msg = msg; - /* sys_sem_signal() is called from lwip_netconn_do_connected (or err_tcp()), - when the connection is established! */ -#if LWIP_TCPIP_CORE_LOCKING - LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); - UNLOCK_TCPIP_CORE(); - sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); - LOCK_TCPIP_CORE(); - LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); -#endif /* LWIP_TCPIP_CORE_LOCKING */ - return; - } - } - } - break; -#endif /* LWIP_TCP */ - default: - LWIP_ERROR("Invalid netconn type", 0, do{ msg->err = ERR_VAL; }while(0)); - break; - } - } - /* For all other protocols, netconn_connect() calls TCPIP_APIMSG(), - so use TCPIP_APIMSG_ACK() here. */ - TCPIP_APIMSG_ACK(msg); -} - -/** - * Disconnect a pcb contained inside a netconn - * Only used for UDP netconns. - * Called from netconn_disconnect. - * - * @param m the api_msg_msg pointing to the connection to disconnect - */ -void -lwip_netconn_do_disconnect(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - -#if LWIP_UDP - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { - udp_disconnect(msg->conn->pcb.udp); - msg->err = ERR_OK; - } else -#endif /* LWIP_UDP */ - { - msg->err = ERR_VAL; - } - TCPIP_APIMSG_ACK(msg); -} - -#if LWIP_TCP -/** - * Set a TCP pcb contained in a netconn into listen mode - * Called from netconn_listen. - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_listen(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - msg->err = ERR_CONN; - if (msg->conn->pcb.tcp != NULL) { - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { - if (msg->conn->state == NETCONN_NONE) { - struct tcp_pcb* lpcb; - if (msg->conn->pcb.tcp->state != CLOSED) { - /* connection is not closed, cannot listen */ - msg->err = ERR_VAL; - } else { - err_t err; - u8_t backlog; -#if TCP_LISTEN_BACKLOG - backlog = msg->msg.lb.backlog; -#else /* TCP_LISTEN_BACKLOG */ - backlog = TCP_DEFAULT_LISTEN_BACKLOG; -#endif /* TCP_LISTEN_BACKLOG */ -#if LWIP_IPV4 && LWIP_IPV6 - /* "Socket API like" dual-stack support: If IP to listen to is IP6_ADDR_ANY, - * and NETCONN_FLAG_IPV6_V6ONLY is NOT set, use IP_ANY_TYPE to listen - */ - if (ip_addr_cmp(&msg->conn->pcb.ip->local_ip, IP6_ADDR_ANY) && - (netconn_get_ipv6only(msg->conn) == 0)) { - /* change PCB type to IPADDR_TYPE_ANY */ - IP_SET_TYPE_VAL(msg->conn->pcb.tcp->local_ip, IPADDR_TYPE_ANY); - IP_SET_TYPE_VAL(msg->conn->pcb.tcp->remote_ip, IPADDR_TYPE_ANY); - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - lpcb = tcp_listen_with_backlog_and_err(msg->conn->pcb.tcp, backlog, &err); - - if (lpcb == NULL) { - /* in this case, the old pcb is still allocated */ - msg->err = err; - } else { - /* delete the recvmbox and allocate the acceptmbox */ - if (sys_mbox_valid(&msg->conn->recvmbox)) { - /** @todo: should we drain the recvmbox here? */ - sys_mbox_free(&msg->conn->recvmbox); - sys_mbox_set_invalid(&msg->conn->recvmbox); - } - msg->err = ERR_OK; - if (!sys_mbox_valid(&msg->conn->acceptmbox)) { - msg->err = sys_mbox_new(&msg->conn->acceptmbox, DEFAULT_ACCEPTMBOX_SIZE); - } - if (msg->err == ERR_OK) { - msg->conn->state = NETCONN_LISTEN; - msg->conn->pcb.tcp = lpcb; - tcp_arg(msg->conn->pcb.tcp, msg->conn); - tcp_accept(msg->conn->pcb.tcp, accept_function); - } else { - /* since the old pcb is already deallocated, free lpcb now */ - tcp_close(lpcb); - msg->conn->pcb.tcp = NULL; - } - } - } - } else if (msg->conn->state == NETCONN_LISTEN) { - /* already listening, allow updating of the backlog */ - msg->err = ERR_OK; - tcp_backlog_set(msg->conn->pcb.tcp, msg->msg.lb.backlog); - } - } else { - msg->err = ERR_ARG; - } - } - } - TCPIP_APIMSG_ACK(msg); -} -#endif /* LWIP_TCP */ - -/** - * Send some data on a RAW or UDP pcb contained in a netconn - * Called from netconn_send - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_send(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - msg->err = ERR_CONN; - if (msg->conn->pcb.tcp != NULL) { - switch (NETCONNTYPE_GROUP(msg->conn->type)) { -#if LWIP_RAW - case NETCONN_RAW: - if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { - msg->err = raw_send(msg->conn->pcb.raw, msg->msg.b->p); - } else { - msg->err = raw_sendto(msg->conn->pcb.raw, msg->msg.b->p, &msg->msg.b->addr); - } - break; -#endif -#if LWIP_UDP - case NETCONN_UDP: -#if LWIP_CHECKSUM_ON_COPY - if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { - msg->err = udp_send_chksum(msg->conn->pcb.udp, msg->msg.b->p, - msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); - } else { - msg->err = udp_sendto_chksum(msg->conn->pcb.udp, msg->msg.b->p, - &msg->msg.b->addr, msg->msg.b->port, - msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); - } -#else /* LWIP_CHECKSUM_ON_COPY */ - if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { - msg->err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); - } else { - msg->err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); - } -#endif /* LWIP_CHECKSUM_ON_COPY */ - break; -#endif /* LWIP_UDP */ - default: - break; - } - } - } - TCPIP_APIMSG_ACK(msg); -} - -#if LWIP_TCP -/** - * Indicate data has been received from a TCP pcb contained in a netconn - * Called from netconn_recv - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_recv(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - msg->err = ERR_OK; - if (msg->conn->pcb.tcp != NULL) { - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { - u32_t remaining = msg->msg.r.len; - do { - u16_t recved = (remaining > 0xffff) ? 0xffff : (u16_t)remaining; - tcp_recved(msg->conn->pcb.tcp, recved); - remaining -= recved; - } while (remaining != 0); - } - } - TCPIP_APIMSG_ACK(msg); -} - -#if TCP_LISTEN_BACKLOG -/** Indicate that a TCP pcb has been accepted - * Called from netconn_accept - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_accepted(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - msg->err = ERR_OK; - if (msg->conn->pcb.tcp != NULL) { - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { - tcp_backlog_accepted(msg->conn->pcb.tcp); - } - } - TCPIP_APIMSG_ACK(msg); -} -#endif /* TCP_LISTEN_BACKLOG */ - -/** - * See if more data needs to be written from a previous call to netconn_write. - * Called initially from lwip_netconn_do_write. If the first call can't send all data - * (because of low memory or empty send-buffer), this function is called again - * from sent_tcp() or poll_tcp() to send more data. If all data is sent, the - * blocking application thread (waiting in netconn_write) is released. - * - * @param conn netconn (that is currently in state NETCONN_WRITE) to process - * @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) -{ - err_t err; - const void *dataptr; - u16_t len, available; - u8_t write_finished = 0; - size_t diff; - u8_t dontblock; - u8_t apiflags; - - LWIP_ASSERT("conn != NULL", conn != NULL); - LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); - LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); - LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); - LWIP_ASSERT("conn->write_offset < conn->current_msg->msg.w.len", - conn->write_offset < conn->current_msg->msg.w.len); - - apiflags = conn->current_msg->msg.w.apiflags; - dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); - -#if LWIP_SO_SNDTIMEO - if ((conn->send_timeout != 0) && - ((s32_t)(sys_now() - conn->current_msg->msg.w.time_started) >= conn->send_timeout)) { - write_finished = 1; - if (conn->write_offset == 0) { - /* nothing has been written */ - err = ERR_WOULDBLOCK; - conn->current_msg->msg.w.len = 0; - } else { - /* partial write */ - err = ERR_OK; - conn->current_msg->msg.w.len = conn->write_offset; - conn->write_offset = 0; - } - } else -#endif /* LWIP_SO_SNDTIMEO */ - { - dataptr = (const u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; - diff = conn->current_msg->msg.w.len - conn->write_offset; - if (diff > 0xffffUL) { /* max_u16_t */ - len = 0xffff; - apiflags |= TCP_WRITE_FLAG_MORE; - } else { - len = (u16_t)diff; - } - available = tcp_sndbuf(conn->pcb.tcp); - if (available < len) { - /* don't try to write more than sendbuf */ - len = available; - if (dontblock) { - if (!len) { - err = ERR_WOULDBLOCK; - goto err_mem; - } - } else { - apiflags |= TCP_WRITE_FLAG_MORE; - } - } - LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", ((conn->write_offset + len) <= conn->current_msg->msg.w.len)); - err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); - /* if OK or memory error, check available space */ - if ((err == ERR_OK) || (err == ERR_MEM)) { -err_mem: - if (dontblock && (len < conn->current_msg->msg.w.len)) { - /* 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, len); - conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; - } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || - (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { - /* The queued byte- or pbuf-count exceeds the configured low-water limit, - let select mark this pcb as non-writable. */ - API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); - } - } - - if (err == ERR_OK) { - err_t out_err; - conn->write_offset += len; - if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { - /* return sent length */ - conn->current_msg->msg.w.len = conn->write_offset; - /* everything was written */ - write_finished = 1; - } - out_err = tcp_output(conn->pcb.tcp); - if (ERR_IS_FATAL(out_err) || (out_err == ERR_RTE)) { - /* If tcp_output fails with fatal error or no route is found, - don't try writing any more but return the error - to the application thread. */ - err = out_err; - write_finished = 1; - conn->current_msg->msg.w.len = 0; - } - } else if (err == ERR_MEM) { - /* If ERR_MEM, we wait for sent_tcp or poll_tcp to be called. - For blocking sockets, we do NOT return to the application - thread, since ERR_MEM is only a temporary error! Non-blocking - will remain non-writable until sent_tcp/poll_tcp is called */ - - /* tcp_write returned ERR_MEM, try tcp_output anyway */ - err_t out_err = tcp_output(conn->pcb.tcp); - if (ERR_IS_FATAL(out_err) || (out_err == ERR_RTE)) { - /* If tcp_output fails with fatal error or no route is found, - don't try writing any more but return the error - to the application thread. */ - err = out_err; - write_finished = 1; - conn->current_msg->msg.w.len = 0; - } else if (dontblock) { - /* non-blocking write is done on ERR_MEM */ - err = ERR_WOULDBLOCK; - write_finished = 1; - conn->current_msg->msg.w.len = 0; - } - } else { - /* On errors != ERR_MEM, we don't try writing any more but return - the error to the application thread. */ - write_finished = 1; - conn->current_msg->msg.w.len = 0; - } - } - 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); - conn->current_msg->err = err; - conn->current_msg = NULL; - conn->write_offset = 0; - conn->state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(conn, err); -#if LWIP_TCPIP_CORE_LOCKING - if (delayed) -#endif - { - sys_sem_signal(op_completed_sem); - } - } -#if LWIP_TCPIP_CORE_LOCKING - else { - return ERR_MEM; - } -#endif - return ERR_OK; -} -#endif /* LWIP_TCP */ - -/** - * Send some data on a TCP pcb contained in a netconn - * Called from netconn_write - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_write(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { -#if LWIP_TCP - if (msg->conn->state != NETCONN_NONE) { - /* netconn is connecting, closing or in blocking write */ - msg->err = ERR_INPROGRESS; - } else if (msg->conn->pcb.tcp != NULL) { - msg->conn->state = NETCONN_WRITE; - /* set all the variables used by lwip_netconn_do_writemore */ - LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && - msg->conn->write_offset == 0); - LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); - msg->conn->current_msg = msg; - msg->conn->write_offset = 0; -#if LWIP_TCPIP_CORE_LOCKING - if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) { - LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); - UNLOCK_TCPIP_CORE(); - sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); - LOCK_TCPIP_CORE(); - LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE); - } -#else /* LWIP_TCPIP_CORE_LOCKING */ - lwip_netconn_do_writemore(msg->conn); -#endif /* LWIP_TCPIP_CORE_LOCKING */ - /* for both cases: if lwip_netconn_do_writemore was called, don't ACK the APIMSG - since lwip_netconn_do_writemore ACKs it! */ - return; - } else { - msg->err = ERR_CONN; - } -#else /* LWIP_TCP */ - msg->err = ERR_VAL; -#endif /* LWIP_TCP */ -#if (LWIP_UDP || LWIP_RAW) - } else { - msg->err = ERR_VAL; -#endif /* (LWIP_UDP || LWIP_RAW) */ - } - } - TCPIP_APIMSG_ACK(msg); -} - -/** - * Return a connection's local or remote address - * Called from netconn_getaddr - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_getaddr(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - if (msg->conn->pcb.ip != NULL) { - if (msg->msg.ad.local) { - ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), - msg->conn->pcb.ip->local_ip); - } else { - ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), - msg->conn->pcb.ip->remote_ip); - } - - msg->err = ERR_OK; - switch (NETCONNTYPE_GROUP(msg->conn->type)) { -#if LWIP_RAW - case NETCONN_RAW: - if (msg->msg.ad.local) { - API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.raw->protocol; - } else { - /* return an error as connecting is only a helper for upper layers */ - msg->err = ERR_CONN; - } - break; -#endif /* LWIP_RAW */ -#if LWIP_UDP - case NETCONN_UDP: - if (msg->msg.ad.local) { - API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; - } else { - if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { - msg->err = ERR_CONN; - } else { - API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; - } - } - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case NETCONN_TCP: - if ((msg->msg.ad.local == 0) && - ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { - /* 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); - } - break; -#endif /* LWIP_TCP */ - default: - LWIP_ASSERT("invalid netconn_type", 0); - break; - } - } else { - msg->err = ERR_CONN; - } - TCPIP_APIMSG_ACK(msg); -} - -/** - * Close or half-shutdown a TCP pcb contained in a netconn - * Called from netconn_close - * In contrast to closing sockets, the netconn is not deallocated. - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_close(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - -#if LWIP_TCP - enum netconn_state state = msg->conn->state; - /* 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) && - (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && - ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { - /* Check if we are in a connected state */ - if (state == NETCONN_CONNECT) { - /* TCP connect in progress: cannot shutdown */ - msg->err = ERR_CONN; - } else if (state == NETCONN_WRITE) { -#if LWIP_NETCONN_FULLDUPLEX - if (msg->msg.sd.shut & NETCONN_SHUT_WR) { - /* close requested, abort running write */ - sys_sem_t* write_completed_sem; - LWIP_ASSERT("msg->conn->current_msg != NULL", msg->conn->current_msg != NULL); - write_completed_sem = LWIP_API_MSG_SEM(msg->conn->current_msg); - msg->conn->current_msg->err = ERR_CLSD; - msg->conn->current_msg = NULL; - msg->conn->write_offset = 0; - msg->conn->state = NETCONN_NONE; - state = NETCONN_NONE; - NETCONN_SET_SAFE_ERR(msg->conn, ERR_CLSD); - sys_sem_signal(write_completed_sem); - } else { - LWIP_ASSERT("msg->msg.sd.shut == NETCONN_SHUT_RD", msg->msg.sd.shut == NETCONN_SHUT_RD); - /* In this case, let the write continue and do not interfere with - conn->current_msg or conn->state! */ - msg->err = tcp_shutdown(msg->conn->pcb.tcp, 1, 0); - } - } - if (state == NETCONN_NONE) { -#else /* LWIP_NETCONN_FULLDUPLEX */ - msg->err = ERR_INPROGRESS; - } else { -#endif /* LWIP_NETCONN_FULLDUPLEX */ - if (msg->msg.sd.shut & NETCONN_SHUT_RD) { - /* Drain and delete mboxes */ - netconn_drain(msg->conn); - } - LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && - msg->conn->write_offset == 0); - msg->conn->state = NETCONN_CLOSE; - msg->conn->current_msg = msg; -#if LWIP_TCPIP_CORE_LOCKING - if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { - LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); - UNLOCK_TCPIP_CORE(); - sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); - LOCK_TCPIP_CORE(); - LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); - } -#else /* LWIP_TCPIP_CORE_LOCKING */ - lwip_netconn_do_close_internal(msg->conn); -#endif /* LWIP_TCPIP_CORE_LOCKING */ - /* for tcp netconns, lwip_netconn_do_close_internal ACKs the message */ - return; - } - } else -#endif /* LWIP_TCP */ - { - msg->err = ERR_CONN; - } - TCPIP_APIMSG_ACK(msg); -} - -#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) -/** - * Join multicast groups for UDP netconns. - * Called from netconn_join_leave_group - * - * @param m the api_msg_msg pointing to the connection - */ -void -lwip_netconn_do_join_leave_group(void *m) -{ - struct api_msg *msg = (struct api_msg*)m; - - if (ERR_IS_FATAL(msg->conn->last_err)) { - msg->err = msg->conn->last_err; - } else { - if (msg->conn->pcb.tcp != NULL) { - if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { -#if LWIP_UDP -#if LWIP_IPV6 && LWIP_IPV6_MLD - if (NETCONNTYPE_ISIPV6(msg->conn->type)) { - if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { - msg->err = mld6_joingroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); - } else { - msg->err = mld6_leavegroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); - } - } - else -#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ - { -#if LWIP_IGMP - if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { - msg->err = igmp_joingroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); - } else { - msg->err = igmp_leavegroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), - ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); - } -#endif /* LWIP_IGMP */ - } -#endif /* LWIP_UDP */ -#if (LWIP_TCP || LWIP_RAW) - } else { - msg->err = ERR_VAL; -#endif /* (LWIP_TCP || LWIP_RAW) */ - } - } else { - msg->err = ERR_CONN; - } - } - TCPIP_APIMSG_ACK(msg); -} -#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ - -#if LWIP_DNS -/** - * Callback function that is called when DNS name is resolved - * (or on timeout). A waiting application thread is waked up by - * signaling the semaphore. - */ -static void -lwip_netconn_do_dns_found(const char *name, const ip_addr_t *ipaddr, void *arg) -{ - struct dns_api_msg *msg = (struct dns_api_msg*)arg; - - /* we trust the internal implementation to be correct :-) */ - LWIP_UNUSED_ARG(name); - - if (ipaddr == NULL) { - /* timeout or memory error */ - API_EXPR_DEREF(msg->err) = ERR_VAL; - } else { - /* address was resolved */ - API_EXPR_DEREF(msg->err) = ERR_OK; - API_EXPR_DEREF(msg->addr) = *ipaddr; - } - /* wake up the application task waiting in netconn_gethostbyname */ - sys_sem_signal(API_EXPR_REF_SEM(msg->sem)); -} - -/** - * Execute a DNS query - * Called from netconn_gethostbyname - * - * @param arg the dns_api_msg pointing to the query - */ -void -lwip_netconn_do_gethostbyname(void *arg) -{ - struct dns_api_msg *msg = (struct dns_api_msg*)arg; - u8_t addrtype = -#if LWIP_IPV4 && LWIP_IPV6 - msg->dns_addrtype; -#else - LWIP_DNS_ADDRTYPE_DEFAULT; -#endif - - API_EXPR_DEREF(msg->err) = dns_gethostbyname_addrtype(msg->name, - API_EXPR_REF(msg->addr), lwip_netconn_do_dns_found, msg, addrtype); - if (API_EXPR_DEREF(msg->err) != ERR_INPROGRESS) { - /* on error or immediate success, wake up the application - * task waiting in netconn_gethostbyname */ - sys_sem_signal(API_EXPR_REF_SEM(msg->sem)); - } -} -#endif /* LWIP_DNS */ - -#endif /* LWIP_NETCONN */ +/** + * @file + * Sequential API Internal module + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/priv/api_msg.h" + +#include "lwip/ip.h" +#include "lwip/ip_addr.h" +#include "lwip/udp.h" +#include "lwip/tcp.h" +#include "lwip/raw.h" + +#include "lwip/memp.h" +#include "lwip/igmp.h" +#include "lwip/dns.h" +#include "lwip/mld6.h" +#include "lwip/priv/tcpip_priv.h" + +#include + +/* netconns are polled once per second (e.g. continue write on memory error) */ +#define NETCONN_TCP_POLL_INTERVAL 2 + +#define SET_NONBLOCKING_CONNECT(conn, val) do { if (val) { \ + (conn)->flags |= NETCONN_FLAG_IN_NONBLOCKING_CONNECT; \ +} else { \ + (conn)->flags &= ~ NETCONN_FLAG_IN_NONBLOCKING_CONNECT; }} while(0) +#define IN_NONBLOCKING_CONNECT(conn) (((conn)->flags & NETCONN_FLAG_IN_NONBLOCKING_CONNECT) != 0) + +/* forward declarations */ +#if LWIP_TCP +#if LWIP_TCPIP_CORE_LOCKING +#define WRITE_DELAYED , 1 +#define WRITE_DELAYED_PARAM , u8_t delayed +#else /* LWIP_TCPIP_CORE_LOCKING */ +#define WRITE_DELAYED +#define WRITE_DELAYED_PARAM +#endif /* LWIP_TCPIP_CORE_LOCKING */ +static err_t lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM); +static err_t lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM); +#endif + +#if LWIP_TCPIP_CORE_LOCKING +#define TCPIP_APIMSG_ACK(m) NETCONN_SET_SAFE_ERR((m)->conn, (m)->err) +#else /* LWIP_TCPIP_CORE_LOCKING */ +#define TCPIP_APIMSG_ACK(m) do { NETCONN_SET_SAFE_ERR((m)->conn, (m)->err); sys_sem_signal(LWIP_API_MSG_SEM(m)); } while(0) +#endif /* LWIP_TCPIP_CORE_LOCKING */ + +#if LWIP_TCP +u8_t netconn_aborted; +#endif /* LWIP_TCP */ + +#if LWIP_RAW +/** + * Receive callback function for RAW netconns. + * Doesn't 'eat' the packet, only copies it and sends it to + * conn->recvmbox + * + * @see raw.h (struct raw_pcb.recv) for parameters and return value + */ +static u8_t +recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, + const ip_addr_t *addr) +{ + struct pbuf *q; + struct netbuf *buf; + struct netconn *conn; + + LWIP_UNUSED_ARG(addr); + conn = (struct netconn *)arg; + + if ((conn != NULL) && sys_mbox_valid(&conn->recvmbox)) { +#if LWIP_SO_RCVBUF + int recv_avail; + SYS_ARCH_GET(conn->recv_avail, recv_avail); + if ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize) { + return 0; + } +#endif /* LWIP_SO_RCVBUF */ + /* copy the whole packet into new pbufs */ + q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); + if (q != NULL) { + if (pbuf_copy(q, p) != ERR_OK) { + pbuf_free(q); + q = NULL; + } + } + + if (q != NULL) { + u16_t len; + buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); + if (buf == NULL) { + pbuf_free(q); + return 0; + } + + buf->p = q; + buf->ptr = q; + ip_addr_copy(buf->addr, *ip_current_src_addr()); + buf->port = pcb->protocol; + + len = q->tot_len; + if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { + netbuf_delete(buf); + return 0; + } else { +#if LWIP_SO_RCVBUF + SYS_ARCH_INC(conn->recv_avail, len); +#endif /* LWIP_SO_RCVBUF */ + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); + } + } + } + + return 0; /* do not eat the packet */ +} +#endif /* LWIP_RAW*/ + +#if LWIP_UDP +/** + * Receive callback function for UDP netconns. + * Posts the packet to conn->recvmbox or deletes it on memory error. + * + * @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) +{ + struct netbuf *buf; + struct netconn *conn; + u16_t len; +#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); + LWIP_ASSERT("recv_udp must have an argument", arg != NULL); + conn = (struct netconn *)arg; + + if (conn == NULL) { + pbuf_free(p); + return; + } + + LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb); + +#if LWIP_SO_RCVBUF + SYS_ARCH_GET(conn->recv_avail, recv_avail); + if (!sys_mbox_valid(&conn->recvmbox) || + ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { +#else /* LWIP_SO_RCVBUF */ + if (!sys_mbox_valid(&conn->recvmbox)) { +#endif /* LWIP_SO_RCVBUF */ + pbuf_free(p); + return; + } + + buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); + if (buf == NULL) { + pbuf_free(p); + return; + } else { + buf->p = p; + buf->ptr = p; + ip_addr_set(&buf->addr, addr); + buf->port = port; +#if LWIP_NETBUF_RECVINFO + { + /* get the UDP header - always in the first pbuf, ensured by udp_input */ + const struct udp_hdr* udphdr = (const struct udp_hdr*)ip_next_header_ptr(); +#if LWIP_CHECKSUM_ON_COPY + buf->flags = NETBUF_FLAG_DESTADDR; +#endif /* LWIP_CHECKSUM_ON_COPY */ + ip_addr_set(&buf->toaddr, ip_current_dest_addr()); + buf->toport_chksum = udphdr->dest; + } +#endif /* LWIP_NETBUF_RECVINFO */ + } + + len = p->tot_len; + if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { + netbuf_delete(buf); + return; + } else { +#if LWIP_SO_RCVBUF + SYS_ARCH_INC(conn->recv_avail, len); +#endif /* LWIP_SO_RCVBUF */ + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); + } +} +#endif /* LWIP_UDP */ + +#if LWIP_TCP +/** + * Receive callback function for TCP netconns. + * Posts the packet to conn->recvmbox, but doesn't delete it on errors. + * + * @see tcp.h (struct tcp_pcb.recv) for parameters and return value + */ +static err_t +recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) +{ + struct netconn *conn; + u16_t len; + + LWIP_UNUSED_ARG(pcb); + LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); + LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); + conn = (struct netconn *)arg; + + if (conn == NULL) { + return ERR_VAL; + } + LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); + + if (!sys_mbox_valid(&conn->recvmbox)) { + /* recvmbox already deleted */ + if (p != NULL) { + tcp_recved(pcb, p->tot_len); + pbuf_free(p); + } + return ERR_OK; + } + /* Unlike for UDP or RAW pcbs, don't check for available space + using recv_avail since that could break the connection + (data is already ACKed) */ + + /* don't overwrite fatal errors! */ + if (err != ERR_OK) { + NETCONN_SET_SAFE_ERR(conn, err); + } + + if (p != NULL) { + len = p->tot_len; + } else { + len = 0; + } + + if (sys_mbox_trypost(&conn->recvmbox, p) != ERR_OK) { + /* don't deallocate p: it is presented to us later again from tcp_fasttmr! */ + return ERR_MEM; + } else { +#if LWIP_SO_RCVBUF + SYS_ARCH_INC(conn->recv_avail, len); +#endif /* LWIP_SO_RCVBUF */ + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); + } + + return ERR_OK; +} + +/** + * Poll callback function for TCP netconns. + * Wakes up an application thread that waits for a connection to close + * or data to be sent. The application thread then takes the + * appropriate action to go on. + * + * Signals the conn->sem. + * netconn_close waits for conn->sem if closing failed. + * + * @see tcp.h (struct tcp_pcb.poll) for parameters and return value + */ +static err_t +poll_tcp(void *arg, struct tcp_pcb *pcb) +{ + struct netconn *conn = (struct netconn *)arg; + + LWIP_UNUSED_ARG(pcb); + LWIP_ASSERT("conn != NULL", (conn != NULL)); + + if (conn->state == NETCONN_WRITE) { + lwip_netconn_do_writemore(conn WRITE_DELAYED); + } else if (conn->state == NETCONN_CLOSE) { +#if !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER + if (conn->current_msg && conn->current_msg->msg.sd.polls_left) { + conn->current_msg->msg.sd.polls_left--; + } +#endif /* !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER */ + lwip_netconn_do_close_internal(conn WRITE_DELAYED); + } + /* @todo: implement connect timeout here? */ + + /* Did a nonblocking write fail before? Then check available write-space. */ + if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { + /* If the queued byte- or pbuf-count drops below the configured low-water limit, + let select mark this pcb as writable again. */ + if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && + (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { + conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; + API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); + } + } + + return ERR_OK; +} + +/** + * Sent callback function for TCP netconns. + * Signals the conn->sem and calls API_EVENT. + * netconn_write waits for conn->sem if send buffer is low. + * + * @see tcp.h (struct tcp_pcb.sent) for parameters and return value + */ +static err_t +sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len) +{ + struct netconn *conn = (struct netconn *)arg; + + LWIP_UNUSED_ARG(pcb); + LWIP_ASSERT("conn != NULL", (conn != NULL)); + + if (conn) { + if (conn->state == NETCONN_WRITE) { + lwip_netconn_do_writemore(conn WRITE_DELAYED); + } else if (conn->state == NETCONN_CLOSE) { + lwip_netconn_do_close_internal(conn WRITE_DELAYED); + } + + /* If the queued byte- or pbuf-count drops below the configured low-water limit, + let select mark this pcb as writable again. */ + if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && + (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { + conn->flags &= ~NETCONN_FLAG_CHECK_WRITESPACE; + API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); + } + } + + return ERR_OK; +} + +/** + * Error callback function for TCP netconns. + * Signals conn->sem, posts to all conn mboxes and calls API_EVENT. + * The application thread has then to decide what to do. + * + * @see tcp.h (struct tcp_pcb.err) for parameters + */ +static void +err_tcp(void *arg, err_t err) +{ + struct netconn *conn; + enum netconn_state old_state; + + conn = (struct netconn *)arg; + LWIP_ASSERT("conn != NULL", (conn != NULL)); + + conn->pcb.tcp = NULL; + + /* reset conn->state now before waking up other threads */ + old_state = conn->state; + conn->state = NETCONN_NONE; + + if (old_state == NETCONN_CLOSE) { + /* RST during close: let close return success & dealloc the netconn */ + err = ERR_OK; + NETCONN_SET_SAFE_ERR(conn, ERR_OK); + } else { + /* no check since this is always fatal! */ + SYS_ARCH_SET(conn->last_err, err); + } + + /* @todo: the type of NETCONN_EVT created should depend on 'old_state' */ + + /* Notify the user layer about a connection error. Used to signal select. */ + API_EVENT(conn, NETCONN_EVT_ERROR, 0); + /* Try to release selects pending on 'read' or 'write', too. + They will get an error if they actually try to read or write. */ + API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); + API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); + + /* pass NULL-message to recvmbox to wake up pending recv */ + if (sys_mbox_valid(&conn->recvmbox)) { + /* use trypost to prevent deadlock */ + sys_mbox_trypost(&conn->recvmbox, NULL); + } + /* pass NULL-message to acceptmbox to wake up pending accept */ + if (sys_mbox_valid(&conn->acceptmbox)) { + /* use trypost to preven deadlock */ + sys_mbox_trypost(&conn->acceptmbox, NULL); + } + + if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || + (old_state == NETCONN_CONNECT)) { + /* calling lwip_netconn_do_writemore/lwip_netconn_do_close_internal is not necessary + since the pcb has already been deleted! */ + int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn); + SET_NONBLOCKING_CONNECT(conn, 0); + + if (!was_nonblocking_connect) { + sys_sem_t* op_completed_sem; + /* set error return code */ + LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); + conn->current_msg->err = err; + op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); + LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); + conn->current_msg = NULL; + /* wake up the waiting task */ + NETCONN_SET_SAFE_ERR(conn, err); + sys_sem_signal(op_completed_sem); + } + } else { + LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); + } +} + +/** + * Setup a tcp_pcb with the correct callback function pointers + * and their arguments. + * + * @param conn the TCP netconn to setup + */ +static void +setup_tcp(struct netconn *conn) +{ + struct tcp_pcb *pcb; + + pcb = conn->pcb.tcp; + tcp_arg(pcb, conn); + tcp_recv(pcb, recv_tcp); + tcp_sent(pcb, sent_tcp); + tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL); + tcp_err(pcb, err_tcp); +} + +/** + * Accept callback function for TCP netconns. + * Allocates a new netconn and posts that to conn->acceptmbox. + * + * @see tcp.h (struct tcp_pcb_listen.accept) for parameters and return value + */ +static err_t +accept_function(void *arg, struct tcp_pcb *newpcb, err_t err) +{ + struct netconn *newconn; + struct netconn *conn = (struct netconn *)arg; + + if (conn == NULL) { + return ERR_VAL; + } + if (!sys_mbox_valid(&conn->acceptmbox)) { + LWIP_DEBUGF(API_MSG_DEBUG, ("accept_function: acceptmbox already deleted\n")); + return ERR_VAL; + } + + if (newpcb == NULL) { + /* out-of-pcbs during connect: pass on this error to the application */ + if (sys_mbox_trypost(&conn->acceptmbox, &netconn_aborted) == ERR_OK) { + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); + } + return ERR_VAL; + } + + LWIP_DEBUGF(API_MSG_DEBUG, ("accept_function: newpcb->tate: %s\n", tcp_debug_state_str(newpcb->state))); + + /* We have to set the callback here even though + * the new socket is unknown. newconn->socket is marked as -1. */ + newconn = netconn_alloc(conn->type, conn->callback); + if (newconn == NULL) { + /* outof netconns: pass on this error to the application */ + if (sys_mbox_trypost(&conn->acceptmbox, &netconn_aborted) == ERR_OK) { + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); + } + return ERR_MEM; + } + newconn->pcb.tcp = newpcb; + setup_tcp(newconn); + /* no protection: when creating the pcb, the netconn is not yet known + to the application thread */ + newconn->last_err = err; + + /* handle backlog counter */ + tcp_backlog_delayed(newpcb); + + if (sys_mbox_trypost(&conn->acceptmbox, newconn) != ERR_OK) { + /* When returning != ERR_OK, the pcb is aborted in tcp_process(), + so do nothing here! */ + /* remove all references to this netconn from the pcb */ + struct tcp_pcb* pcb = newconn->pcb.tcp; + tcp_arg(pcb, NULL); + tcp_recv(pcb, NULL); + tcp_sent(pcb, NULL); + tcp_poll(pcb, NULL, 0); + tcp_err(pcb, NULL); + /* remove reference from to the pcb from this netconn */ + newconn->pcb.tcp = NULL; + /* no need to drain since we know the recvmbox is empty. */ + sys_mbox_free(&newconn->recvmbox); + sys_mbox_set_invalid(&newconn->recvmbox); + netconn_free(newconn); + return ERR_MEM; + } else { + /* Register event with callback */ + API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); + } + + return ERR_OK; +} +#endif /* LWIP_TCP */ + +/** + * Create a new pcb of a specific type. + * Called from lwip_netconn_do_newconn(). + * + * @param msg the api_msg_msg describing the connection type + */ +static void +pcb_new(struct api_msg *msg) +{ + enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4; + + LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); + +#if LWIP_IPV6 && LWIP_IPV4 + /* IPv6: Dual-stack by default, unless netconn_set_ipv6only() is called */ + if(NETCONNTYPE_ISIPV6(netconn_type(msg->conn))) { + iptype = IPADDR_TYPE_ANY; + } +#endif + + /* Allocate a PCB for this connection */ + switch(NETCONNTYPE_GROUP(msg->conn->type)) { +#if LWIP_RAW + case NETCONN_RAW: + msg->conn->pcb.raw = raw_new_ip_type(iptype, msg->msg.n.proto); + if (msg->conn->pcb.raw != NULL) { +#if LWIP_IPV6 + /* ICMPv6 packets should always have checksum calculated by the stack as per RFC 3542 chapter 3.1 */ + if (NETCONNTYPE_ISIPV6(msg->conn->type) && msg->conn->pcb.raw->protocol == IP6_NEXTH_ICMP6) { + msg->conn->pcb.raw->chksum_reqd = 1; + msg->conn->pcb.raw->chksum_offset = 2; + } +#endif /* LWIP_IPV6 */ + raw_recv(msg->conn->pcb.raw, recv_raw, msg->conn); + } + break; +#endif /* LWIP_RAW */ +#if LWIP_UDP + case NETCONN_UDP: + msg->conn->pcb.udp = udp_new_ip_type(iptype); + if (msg->conn->pcb.udp != NULL) { +#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)) { + udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); + } + udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); + } + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case NETCONN_TCP: + msg->conn->pcb.tcp = tcp_new_ip_type(iptype); + if (msg->conn->pcb.tcp != NULL) { + setup_tcp(msg->conn); + } + break; +#endif /* LWIP_TCP */ + default: + /* Unsupported netconn type, e.g. protocol disabled */ + msg->err = ERR_VAL; + return; + } + if (msg->conn->pcb.ip == NULL) { + msg->err = ERR_MEM; + } +} + +/** + * Create a new pcb of a specific type inside a netconn. + * Called from netconn_new_with_proto_and_callback. + * + * @param m the api_msg_msg describing the connection type + */ +void +lwip_netconn_do_newconn(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + msg->err = ERR_OK; + if (msg->conn->pcb.tcp == NULL) { + pcb_new(msg); + } + /* Else? This "new" connection already has a PCB allocated. */ + /* Is this an error condition? Should it be deleted? */ + /* We currently just are happy and return. */ + + TCPIP_APIMSG_ACK(msg); +} + +/** + * Create a new netconn (of a specific type) that has a callback function. + * The corresponding pcb is NOT created! + * + * @param t the type of 'connection' to create (@see enum netconn_type) + * @param callback a function to call on status changes (RX available, TX'ed) + * @return a newly allocated struct netconn or + * NULL on memory error + */ +struct netconn* +netconn_alloc(enum netconn_type t, netconn_callback callback) +{ + struct netconn *conn; + int size; + + conn = (struct netconn *)memp_malloc(MEMP_NETCONN); + if (conn == NULL) { + return NULL; + } + + conn->last_err = ERR_OK; + conn->type = t; + conn->pcb.tcp = NULL; + + /* If all sizes are the same, every compiler should optimize this switch to nothing */ + switch(NETCONNTYPE_GROUP(t)) { +#if LWIP_RAW + case NETCONN_RAW: + size = DEFAULT_RAW_RECVMBOX_SIZE; + break; +#endif /* LWIP_RAW */ +#if LWIP_UDP + case NETCONN_UDP: + size = DEFAULT_UDP_RECVMBOX_SIZE; + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case NETCONN_TCP: + size = DEFAULT_TCP_RECVMBOX_SIZE; + break; +#endif /* LWIP_TCP */ + default: + LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); + goto free_and_return; + } + + if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { + goto free_and_return; + } +#if !LWIP_NETCONN_SEM_PER_THREAD + if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) { + sys_mbox_free(&conn->recvmbox); + goto free_and_return; + } +#endif + +#if LWIP_TCP + sys_mbox_set_invalid(&conn->acceptmbox); +#endif + conn->state = NETCONN_NONE; +#if LWIP_SOCKET + /* initialize socket to -1 since 0 is a valid socket */ + conn->socket = -1; +#endif /* LWIP_SOCKET */ + conn->callback = callback; +#if LWIP_TCP + conn->current_msg = NULL; + conn->write_offset = 0; +#endif /* LWIP_TCP */ +#if LWIP_SO_SNDTIMEO + conn->send_timeout = 0; +#endif /* LWIP_SO_SNDTIMEO */ +#if LWIP_SO_RCVTIMEO + conn->recv_timeout = 0; +#endif /* LWIP_SO_RCVTIMEO */ +#if LWIP_SO_RCVBUF + conn->recv_bufsize = RECV_BUFSIZE_DEFAULT; + conn->recv_avail = 0; +#endif /* LWIP_SO_RCVBUF */ +#if LWIP_SO_LINGER + conn->linger = -1; +#endif /* LWIP_SO_LINGER */ + conn->flags = 0; + return conn; +free_and_return: + memp_free(MEMP_NETCONN, conn); + return NULL; +} + +/** + * Delete a netconn and all its resources. + * The pcb is NOT freed (since we might not be in the right thread context do this). + * + * @param conn the netconn to free + */ +void +netconn_free(struct netconn *conn) +{ + LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL); + LWIP_ASSERT("recvmbox must be deallocated before calling this function", + !sys_mbox_valid(&conn->recvmbox)); +#if LWIP_TCP + LWIP_ASSERT("acceptmbox must be deallocated before calling this function", + !sys_mbox_valid(&conn->acceptmbox)); +#endif /* LWIP_TCP */ + +#if !LWIP_NETCONN_SEM_PER_THREAD + sys_sem_free(&conn->op_completed); + sys_sem_set_invalid(&conn->op_completed); +#endif + + memp_free(MEMP_NETCONN, conn); +} + +/** + * Delete rcvmbox and acceptmbox of a netconn and free the left-over data in + * these mboxes + * + * @param conn the netconn to free + * @bytes_drained bytes drained from recvmbox + * @accepts_drained pending connections drained from acceptmbox + */ +static void +netconn_drain(struct netconn *conn) +{ + void *mem; +#if LWIP_TCP + struct pbuf *p; +#endif /* LWIP_TCP */ + + /* This runs in tcpip_thread, so we don't need to lock against rx packets */ + + /* Delete and drain the recvmbox. */ + if (sys_mbox_valid(&conn->recvmbox)) { + while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { +#if LWIP_TCP + if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) { + if (mem != NULL) { + p = (struct pbuf*)mem; + /* pcb might be set to NULL already by err_tcp() */ + if (conn->pcb.tcp != NULL) { + tcp_recved(conn->pcb.tcp, p->tot_len); + } + pbuf_free(p); + } + } else +#endif /* LWIP_TCP */ + { + netbuf_delete((struct netbuf *)mem); + } + } + sys_mbox_free(&conn->recvmbox); + sys_mbox_set_invalid(&conn->recvmbox); + } + + /* Delete and drain the acceptmbox. */ +#if LWIP_TCP + if (sys_mbox_valid(&conn->acceptmbox)) { + while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { + if (mem != &netconn_aborted) { + struct netconn *newconn = (struct netconn *)mem; + /* Only tcp pcbs have an acceptmbox, so no need to check conn->type */ + /* pcb might be set to NULL already by err_tcp() */ + /* drain recvmbox */ + netconn_drain(newconn); + if (newconn->pcb.tcp != NULL) { + tcp_abort(newconn->pcb.tcp); + newconn->pcb.tcp = NULL; + } + netconn_free(newconn); + } + } + sys_mbox_free(&conn->acceptmbox); + sys_mbox_set_invalid(&conn->acceptmbox); + } +#endif /* LWIP_TCP */ +} + +#if LWIP_TCP +/** + * Internal helper function to close a TCP netconn: since this sometimes + * doesn't work at the first attempt, this function is called from multiple + * places. + * + * @param conn the TCP netconn to close + */ +static err_t +lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) +{ + err_t err; + u8_t shut, shut_rx, shut_tx, close; + u8_t close_finished = 0; + struct tcp_pcb* tpcb; +#if LWIP_SO_LINGER + u8_t linger_wait_required = 0; +#endif /* LWIP_SO_LINGER */ + + LWIP_ASSERT("invalid conn", (conn != NULL)); + LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)); + LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); + LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); + LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); + + tpcb = conn->pcb.tcp; + shut = conn->current_msg->msg.sd.shut; + shut_rx = shut & NETCONN_SHUT_RD; + shut_tx = shut & NETCONN_SHUT_WR; + /* shutting down both ends is the same as closing + (also if RD or WR side was shut down before already) */ + if (shut == NETCONN_SHUT_RDWR) { + close = 1; + } else if (shut_rx && + ((tpcb->state == FIN_WAIT_1) || + (tpcb->state == FIN_WAIT_2) || + (tpcb->state == CLOSING))) { + close = 1; + } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) { + close = 1; + } else { + close = 0; + } + + /* Set back some callback pointers */ + if (close) { + tcp_arg(tpcb, NULL); + } + if (tpcb->state == LISTEN) { + tcp_accept(tpcb, NULL); + } else { + /* some callbacks have to be reset if tcp_close is not successful */ + if (shut_rx) { + tcp_recv(tpcb, NULL); + tcp_accept(tpcb, NULL); + } + if (shut_tx) { + tcp_sent(tpcb, NULL); + } + if (close) { + tcp_poll(tpcb, NULL, 0); + tcp_err(tpcb, NULL); + } + } + /* Try to close the connection */ + if (close) { +#if LWIP_SO_LINGER + /* check linger possibilites before calling tcp_close */ + err = ERR_OK; + /* linger enabled/required at all? (i.e. is there untransmitted data left?) */ + if ((conn->linger >= 0) && (conn->pcb.tcp->unsent || conn->pcb.tcp->unacked)) { + if ((conn->linger == 0)) { + /* data left but linger prevents waiting */ + tcp_abort(tpcb); + tpcb = NULL; + } else if (conn->linger > 0) { + /* data left and linger says we should wait */ + if (netconn_is_nonblocking(conn)) { + /* data left on a nonblocking netconn -> cannot linger */ + err = ERR_WOULDBLOCK; + } else if ((s32_t)(sys_now() - conn->current_msg->msg.sd.time_started) >= + (conn->linger * 1000)) { + /* data left but linger timeout has expired (this happens on further + calls to this function through poll_tcp */ + tcp_abort(tpcb); + tpcb = NULL; + } else { + /* data left -> need to wait for ACK after successful close */ + linger_wait_required = 1; + } + } + } + if ((err == ERR_OK) && (tpcb != NULL)) +#endif /* LWIP_SO_LINGER */ + { + err = tcp_close(tpcb); + } + } else { + err = tcp_shutdown(tpcb, shut_rx, shut_tx); + } + if (err == ERR_OK) { + close_finished = 1; +#if LWIP_SO_LINGER + if (linger_wait_required) { + /* wait for ACK of all unsent/unacked data by just getting called again */ + close_finished = 0; + err = ERR_INPROGRESS; + } +#endif /* LWIP_SO_LINGER */ + } else { + if (err == ERR_MEM) { + /* Closing failed because of memory shortage, try again later. Even for + nonblocking netconns, we have to wait since no standard socket application + is prepared for close failing because of resource shortage. + Check the timeout: this is kind of an lwip addition to the standard sockets: + we wait for some time when failing to allocate a segment for the FIN */ +#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER + s32_t close_timeout = LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT; +#if LWIP_SO_SNDTIMEO + if (conn->send_timeout > 0) { + close_timeout = conn->send_timeout; + } +#endif /* LWIP_SO_SNDTIMEO */ +#if LWIP_SO_LINGER + if (conn->linger >= 0) { + /* use linger timeout (seconds) */ + close_timeout = conn->linger * 1000U; + } +#endif + if ((s32_t)(sys_now() - conn->current_msg->msg.sd.time_started) >= close_timeout) { +#else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ + if (conn->current_msg->msg.sd.polls_left == 0) { +#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ + close_finished = 1; + if (close) { + /* in this case, we want to RST the connection */ + tcp_abort(tpcb); + err = ERR_OK; + } + } + } else { + /* Closing failed for a non-memory error: give up */ + close_finished = 1; + } + } + if (close_finished) { + /* Closing done (succeeded, non-memory error, nonblocking error or timeout) */ + sys_sem_t* op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); + conn->current_msg->err = err; + conn->current_msg = NULL; + conn->state = NETCONN_NONE; + if (err == ERR_OK) { + if (close) { + /* Set back some callback pointers as conn is going away */ + conn->pcb.tcp = NULL; + /* Trigger select() in socket layer. Make sure everybody notices activity + on the connection, error first! */ + API_EVENT(conn, NETCONN_EVT_ERROR, 0); + } + if (shut_rx) { + API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); + } + if (shut_tx) { + API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); + } + } + NETCONN_SET_SAFE_ERR(conn, err); +#if LWIP_TCPIP_CORE_LOCKING + if (delayed) +#endif + { + /* wake up the application task */ + sys_sem_signal(op_completed_sem); + } + return ERR_OK; + } + if (!close_finished) { + /* Closing failed and we want to wait: restore some of the callbacks */ + /* Closing of listen pcb will never fail! */ + LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN)); + if (shut_tx) { + tcp_sent(tpcb, sent_tcp); + } + /* when waiting for close, set up poll interval to 500ms */ + tcp_poll(tpcb, poll_tcp, 1); + tcp_err(tpcb, err_tcp); + tcp_arg(tpcb, conn); + /* don't restore recv callback: we don't want to receive any more data */ + } + /* If closing didn't succeed, we get called again either + from poll_tcp or from sent_tcp */ + LWIP_ASSERT("err != ERR_OK", err != ERR_OK); + return err; +} +#endif /* LWIP_TCP */ + +/** + * Delete the pcb inside a netconn. + * Called from netconn_delete. + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_delconn(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + enum netconn_state state = msg->conn->state; + LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ + (state == NETCONN_NONE) || (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP)); +#if LWIP_NETCONN_FULLDUPLEX + /* In full duplex mode, blocking write/connect is aborted with ERR_CLSD */ + if (state != NETCONN_NONE) { + if ((state == NETCONN_WRITE) || + ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { + /* close requested, abort running write/connect */ + sys_sem_t* op_completed_sem; + LWIP_ASSERT("msg->conn->current_msg != NULL", msg->conn->current_msg != NULL); + op_completed_sem = LWIP_API_MSG_SEM(msg->conn->current_msg); + msg->conn->current_msg->err = ERR_CLSD; + msg->conn->current_msg = NULL; + msg->conn->write_offset = 0; + msg->conn->state = NETCONN_NONE; + NETCONN_SET_SAFE_ERR(msg->conn, ERR_CLSD); + sys_sem_signal(op_completed_sem); + } + } +#else /* LWIP_NETCONN_FULLDUPLEX */ + if (((state != NETCONN_NONE) && + (state != NETCONN_LISTEN) && + (state != NETCONN_CONNECT)) || + ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { + /* This means either a blocking write or blocking connect is running + (nonblocking write returns and sets state to NONE) */ + msg->err = ERR_INPROGRESS; + } else +#endif /* LWIP_NETCONN_FULLDUPLEX */ + { + LWIP_ASSERT("blocking connect in progress", + (state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); + msg->err = ERR_OK; + /* Drain and delete mboxes */ + netconn_drain(msg->conn); + + if (msg->conn->pcb.tcp != NULL) { + + switch (NETCONNTYPE_GROUP(msg->conn->type)) { +#if LWIP_RAW + case NETCONN_RAW: + raw_remove(msg->conn->pcb.raw); + break; +#endif /* LWIP_RAW */ +#if LWIP_UDP + case NETCONN_UDP: + msg->conn->pcb.udp->recv_arg = NULL; + udp_remove(msg->conn->pcb.udp); + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case NETCONN_TCP: + LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && + msg->conn->write_offset == 0); + msg->conn->state = NETCONN_CLOSE; + msg->msg.sd.shut = NETCONN_SHUT_RDWR; + msg->conn->current_msg = msg; +#if LWIP_TCPIP_CORE_LOCKING + if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { + LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); + UNLOCK_TCPIP_CORE(); + sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); + LOCK_TCPIP_CORE(); + LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); + } +#else /* LWIP_TCPIP_CORE_LOCKING */ + lwip_netconn_do_close_internal(msg->conn); +#endif /* LWIP_TCPIP_CORE_LOCKING */ + /* API_EVENT is called inside lwip_netconn_do_close_internal, before releasing + the application thread, so we can return at this point! */ + return; +#endif /* LWIP_TCP */ + default: + break; + } + msg->conn->pcb.tcp = NULL; + } + /* tcp netconns don't come here! */ + + /* @todo: this lets select make the socket readable and writable, + which is wrong! errfd instead? */ + API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0); + API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); + } + if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) { + TCPIP_APIMSG_ACK(msg); + } +} + +/** + * Bind a pcb contained in a netconn + * Called from netconn_bind. + * + * @param m the api_msg_msg pointing to the connection and containing + * the IP address and port to bind to + */ +void +lwip_netconn_do_bind(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + if (ERR_IS_FATAL(msg->conn->last_err)) { + msg->err = msg->conn->last_err; + } else { + msg->err = ERR_VAL; + if (msg->conn->pcb.tcp != NULL) { + switch (NETCONNTYPE_GROUP(msg->conn->type)) { +#if LWIP_RAW + case NETCONN_RAW: + msg->err = raw_bind(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); + break; +#endif /* LWIP_RAW */ +#if LWIP_UDP + case NETCONN_UDP: + msg->err = udp_bind(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case NETCONN_TCP: + msg->err = tcp_bind(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); + break; +#endif /* LWIP_TCP */ + default: + break; + } + } + } + TCPIP_APIMSG_ACK(msg); +} + +#if LWIP_TCP +/** + * TCP callback function if a connection (opened by tcp_connect/lwip_netconn_do_connect) has + * been established (or reset by the remote host). + * + * @see tcp.h (struct tcp_pcb.connected) for parameters and return values + */ +static err_t +lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err) +{ + struct netconn *conn; + int was_blocking; + sys_sem_t* op_completed_sem = NULL; + + LWIP_UNUSED_ARG(pcb); + + conn = (struct netconn *)arg; + + if (conn == NULL) { + return ERR_VAL; + } + + LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); + LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", + (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); + + if (conn->current_msg != NULL) { + conn->current_msg->err = err; + op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); + } + if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) { + setup_tcp(conn); + } + was_blocking = !IN_NONBLOCKING_CONNECT(conn); + SET_NONBLOCKING_CONNECT(conn, 0); + LWIP_ASSERT("blocking connect state error", + (was_blocking && op_completed_sem != NULL) || + (!was_blocking && op_completed_sem == NULL)); + conn->current_msg = NULL; + conn->state = NETCONN_NONE; + NETCONN_SET_SAFE_ERR(conn, ERR_OK); + API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); + + if (was_blocking) { + sys_sem_signal(op_completed_sem); + } + return ERR_OK; +} +#endif /* LWIP_TCP */ + +/** + * Connect a pcb contained inside a netconn + * Called from netconn_connect. + * + * @param m the api_msg_msg pointing to the connection and containing + * the IP address and port to connect to + */ +void +lwip_netconn_do_connect(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + if (msg->conn->pcb.tcp == NULL) { + /* This may happen when calling netconn_connect() a second time */ + msg->err = ERR_CLSD; + } else { + switch (NETCONNTYPE_GROUP(msg->conn->type)) { +#if LWIP_RAW + case NETCONN_RAW: + msg->err = raw_connect(msg->conn->pcb.raw, API_EXPR_REF(msg->msg.bc.ipaddr)); + break; +#endif /* LWIP_RAW */ +#if LWIP_UDP + case NETCONN_UDP: + msg->err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case NETCONN_TCP: + /* Prevent connect while doing any other action. */ + if (msg->conn->state == NETCONN_CONNECT) { + msg->err = ERR_ALREADY; + } else if (msg->conn->state != NETCONN_NONE) { + msg->err = ERR_ISCONN; + } else { + setup_tcp(msg->conn); + msg->err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), + msg->msg.bc.port, lwip_netconn_do_connected); + if (msg->err == ERR_OK) { + u8_t non_blocking = netconn_is_nonblocking(msg->conn); + msg->conn->state = NETCONN_CONNECT; + SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); + if (non_blocking) { + msg->err = ERR_INPROGRESS; + } else { + msg->conn->current_msg = msg; + /* sys_sem_signal() is called from lwip_netconn_do_connected (or err_tcp()), + when the connection is established! */ +#if LWIP_TCPIP_CORE_LOCKING + LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); + UNLOCK_TCPIP_CORE(); + sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); + LOCK_TCPIP_CORE(); + LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); +#endif /* LWIP_TCPIP_CORE_LOCKING */ + return; + } + } + } + break; +#endif /* LWIP_TCP */ + default: + LWIP_ERROR("Invalid netconn type", 0, do{ msg->err = ERR_VAL; }while(0)); + break; + } + } + /* For all other protocols, netconn_connect() calls TCPIP_APIMSG(), + so use TCPIP_APIMSG_ACK() here. */ + TCPIP_APIMSG_ACK(msg); +} + +/** + * Disconnect a pcb contained inside a netconn + * Only used for UDP netconns. + * Called from netconn_disconnect. + * + * @param m the api_msg_msg pointing to the connection to disconnect + */ +void +lwip_netconn_do_disconnect(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + +#if LWIP_UDP + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { + udp_disconnect(msg->conn->pcb.udp); + msg->err = ERR_OK; + } else +#endif /* LWIP_UDP */ + { + msg->err = ERR_VAL; + } + TCPIP_APIMSG_ACK(msg); +} + +#if LWIP_TCP +/** + * Set a TCP pcb contained in a netconn into listen mode + * Called from netconn_listen. + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_listen(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + if (ERR_IS_FATAL(msg->conn->last_err)) { + msg->err = msg->conn->last_err; + } else { + msg->err = ERR_CONN; + if (msg->conn->pcb.tcp != NULL) { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { + if (msg->conn->state == NETCONN_NONE) { + struct tcp_pcb* lpcb; + if (msg->conn->pcb.tcp->state != CLOSED) { + /* connection is not closed, cannot listen */ + msg->err = ERR_VAL; + } else { + err_t err; + u8_t backlog; +#if TCP_LISTEN_BACKLOG + backlog = msg->msg.lb.backlog; +#else /* TCP_LISTEN_BACKLOG */ + backlog = TCP_DEFAULT_LISTEN_BACKLOG; +#endif /* TCP_LISTEN_BACKLOG */ +#if LWIP_IPV4 && LWIP_IPV6 + /* "Socket API like" dual-stack support: If IP to listen to is IP6_ADDR_ANY, + * and NETCONN_FLAG_IPV6_V6ONLY is NOT set, use IP_ANY_TYPE to listen + */ + if (ip_addr_cmp(&msg->conn->pcb.ip->local_ip, IP6_ADDR_ANY) && + (netconn_get_ipv6only(msg->conn) == 0)) { + /* change PCB type to IPADDR_TYPE_ANY */ + IP_SET_TYPE_VAL(msg->conn->pcb.tcp->local_ip, IPADDR_TYPE_ANY); + IP_SET_TYPE_VAL(msg->conn->pcb.tcp->remote_ip, IPADDR_TYPE_ANY); + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + lpcb = tcp_listen_with_backlog_and_err(msg->conn->pcb.tcp, backlog, &err); + + if (lpcb == NULL) { + /* in this case, the old pcb is still allocated */ + msg->err = err; + } else { + /* delete the recvmbox and allocate the acceptmbox */ + if (sys_mbox_valid(&msg->conn->recvmbox)) { + /** @todo: should we drain the recvmbox here? */ + sys_mbox_free(&msg->conn->recvmbox); + sys_mbox_set_invalid(&msg->conn->recvmbox); + } + msg->err = ERR_OK; + if (!sys_mbox_valid(&msg->conn->acceptmbox)) { + msg->err = sys_mbox_new(&msg->conn->acceptmbox, DEFAULT_ACCEPTMBOX_SIZE); + } + if (msg->err == ERR_OK) { + msg->conn->state = NETCONN_LISTEN; + msg->conn->pcb.tcp = lpcb; + tcp_arg(msg->conn->pcb.tcp, msg->conn); + tcp_accept(msg->conn->pcb.tcp, accept_function); + } else { + /* since the old pcb is already deallocated, free lpcb now */ + tcp_close(lpcb); + msg->conn->pcb.tcp = NULL; + } + } + } + } else if (msg->conn->state == NETCONN_LISTEN) { + /* already listening, allow updating of the backlog */ + msg->err = ERR_OK; + tcp_backlog_set(msg->conn->pcb.tcp, msg->msg.lb.backlog); + } + } else { + msg->err = ERR_ARG; + } + } + } + TCPIP_APIMSG_ACK(msg); +} +#endif /* LWIP_TCP */ + +/** + * Send some data on a RAW or UDP pcb contained in a netconn + * Called from netconn_send + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_send(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + if (ERR_IS_FATAL(msg->conn->last_err)) { + msg->err = msg->conn->last_err; + } else { + msg->err = ERR_CONN; + if (msg->conn->pcb.tcp != NULL) { + switch (NETCONNTYPE_GROUP(msg->conn->type)) { +#if LWIP_RAW + case NETCONN_RAW: + if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { + msg->err = raw_send(msg->conn->pcb.raw, msg->msg.b->p); + } else { + msg->err = raw_sendto(msg->conn->pcb.raw, msg->msg.b->p, &msg->msg.b->addr); + } + break; +#endif +#if LWIP_UDP + case NETCONN_UDP: +#if LWIP_CHECKSUM_ON_COPY + if (ip_addr_isany(&msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { + msg->err = udp_send_chksum(msg->conn->pcb.udp, msg->msg.b->p, + msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); + } else { + msg->err = udp_sendto_chksum(msg->conn->pcb.udp, msg->msg.b->p, + &msg->msg.b->addr, msg->msg.b->port, + msg->msg.b->flags & NETBUF_FLAG_CHKSUM, msg->msg.b->toport_chksum); + } +#else /* LWIP_CHECKSUM_ON_COPY */ + if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { + msg->err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); + } else { + msg->err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); + } +#endif /* LWIP_CHECKSUM_ON_COPY */ + break; +#endif /* LWIP_UDP */ + default: + break; + } + } + } + TCPIP_APIMSG_ACK(msg); +} + +#if LWIP_TCP +/** + * Indicate data has been received from a TCP pcb contained in a netconn + * Called from netconn_recv + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_recv(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + msg->err = ERR_OK; + if (msg->conn->pcb.tcp != NULL) { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { + u32_t remaining = msg->msg.r.len; + do { + u16_t recved = (remaining > 0xffff) ? 0xffff : (u16_t)remaining; + tcp_recved(msg->conn->pcb.tcp, recved); + remaining -= recved; + } while (remaining != 0); + } + } + TCPIP_APIMSG_ACK(msg); +} + +#if TCP_LISTEN_BACKLOG +/** Indicate that a TCP pcb has been accepted + * Called from netconn_accept + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_accepted(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + msg->err = ERR_OK; + if (msg->conn->pcb.tcp != NULL) { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { + tcp_backlog_accepted(msg->conn->pcb.tcp); + } + } + TCPIP_APIMSG_ACK(msg); +} +#endif /* TCP_LISTEN_BACKLOG */ + +/** + * See if more data needs to be written from a previous call to netconn_write. + * Called initially from lwip_netconn_do_write. If the first call can't send all data + * (because of low memory or empty send-buffer), this function is called again + * from sent_tcp() or poll_tcp() to send more data. If all data is sent, the + * blocking application thread (waiting in netconn_write) is released. + * + * @param conn netconn (that is currently in state NETCONN_WRITE) to process + * @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) +{ + err_t err; + const void *dataptr; + u16_t len, available; + u8_t write_finished = 0; + size_t diff; + u8_t dontblock; + u8_t apiflags; + + LWIP_ASSERT("conn != NULL", conn != NULL); + LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); + LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); + LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); + LWIP_ASSERT("conn->write_offset < conn->current_msg->msg.w.len", + conn->write_offset < conn->current_msg->msg.w.len); + + apiflags = conn->current_msg->msg.w.apiflags; + dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); + +#if LWIP_SO_SNDTIMEO + if ((conn->send_timeout != 0) && + ((s32_t)(sys_now() - conn->current_msg->msg.w.time_started) >= conn->send_timeout)) { + write_finished = 1; + if (conn->write_offset == 0) { + /* nothing has been written */ + err = ERR_WOULDBLOCK; + conn->current_msg->msg.w.len = 0; + } else { + /* partial write */ + err = ERR_OK; + conn->current_msg->msg.w.len = conn->write_offset; + conn->write_offset = 0; + } + } else +#endif /* LWIP_SO_SNDTIMEO */ + { + dataptr = (const u8_t*)conn->current_msg->msg.w.dataptr + conn->write_offset; + diff = conn->current_msg->msg.w.len - conn->write_offset; + if (diff > 0xffffUL) { /* max_u16_t */ + len = 0xffff; + apiflags |= TCP_WRITE_FLAG_MORE; + } else { + len = (u16_t)diff; + } + available = tcp_sndbuf(conn->pcb.tcp); + if (available < len) { + /* don't try to write more than sendbuf */ + len = available; + if (dontblock) { + if (!len) { + err = ERR_WOULDBLOCK; + goto err_mem; + } + } else { + apiflags |= TCP_WRITE_FLAG_MORE; + } + } + LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", ((conn->write_offset + len) <= conn->current_msg->msg.w.len)); + err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); + /* if OK or memory error, check available space */ + if ((err == ERR_OK) || (err == ERR_MEM)) { +err_mem: + if (dontblock && (len < conn->current_msg->msg.w.len)) { + /* 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, len); + conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; + } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || + (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { + /* The queued byte- or pbuf-count exceeds the configured low-water limit, + let select mark this pcb as non-writable. */ + API_EVENT(conn, NETCONN_EVT_SENDMINUS, len); + } + } + + if (err == ERR_OK) { + err_t out_err; + conn->write_offset += len; + if ((conn->write_offset == conn->current_msg->msg.w.len) || dontblock) { + /* return sent length */ + conn->current_msg->msg.w.len = conn->write_offset; + /* everything was written */ + write_finished = 1; + } + out_err = tcp_output(conn->pcb.tcp); + if (ERR_IS_FATAL(out_err) || (out_err == ERR_RTE)) { + /* If tcp_output fails with fatal error or no route is found, + don't try writing any more but return the error + to the application thread. */ + err = out_err; + write_finished = 1; + conn->current_msg->msg.w.len = 0; + } + } else if (err == ERR_MEM) { + /* If ERR_MEM, we wait for sent_tcp or poll_tcp to be called. + For blocking sockets, we do NOT return to the application + thread, since ERR_MEM is only a temporary error! Non-blocking + will remain non-writable until sent_tcp/poll_tcp is called */ + + /* tcp_write returned ERR_MEM, try tcp_output anyway */ + err_t out_err = tcp_output(conn->pcb.tcp); + if (ERR_IS_FATAL(out_err) || (out_err == ERR_RTE)) { + /* If tcp_output fails with fatal error or no route is found, + don't try writing any more but return the error + to the application thread. */ + err = out_err; + write_finished = 1; + conn->current_msg->msg.w.len = 0; + } else if (dontblock) { + /* non-blocking write is done on ERR_MEM */ + err = ERR_WOULDBLOCK; + write_finished = 1; + conn->current_msg->msg.w.len = 0; + } + } else { + /* On errors != ERR_MEM, we don't try writing any more but return + the error to the application thread. */ + write_finished = 1; + conn->current_msg->msg.w.len = 0; + } + } + 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); + conn->current_msg->err = err; + conn->current_msg = NULL; + conn->write_offset = 0; + conn->state = NETCONN_NONE; + NETCONN_SET_SAFE_ERR(conn, err); +#if LWIP_TCPIP_CORE_LOCKING + if (delayed) +#endif + { + sys_sem_signal(op_completed_sem); + } + } +#if LWIP_TCPIP_CORE_LOCKING + else { + return ERR_MEM; + } +#endif + return ERR_OK; +} +#endif /* LWIP_TCP */ + +/** + * Send some data on a TCP pcb contained in a netconn + * Called from netconn_write + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_write(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + if (ERR_IS_FATAL(msg->conn->last_err)) { + msg->err = msg->conn->last_err; + } else { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { +#if LWIP_TCP + if (msg->conn->state != NETCONN_NONE) { + /* netconn is connecting, closing or in blocking write */ + msg->err = ERR_INPROGRESS; + } else if (msg->conn->pcb.tcp != NULL) { + msg->conn->state = NETCONN_WRITE; + /* set all the variables used by lwip_netconn_do_writemore */ + LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && + msg->conn->write_offset == 0); + LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); + msg->conn->current_msg = msg; + msg->conn->write_offset = 0; +#if LWIP_TCPIP_CORE_LOCKING + if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) { + LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); + UNLOCK_TCPIP_CORE(); + sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); + LOCK_TCPIP_CORE(); + LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE); + } +#else /* LWIP_TCPIP_CORE_LOCKING */ + lwip_netconn_do_writemore(msg->conn); +#endif /* LWIP_TCPIP_CORE_LOCKING */ + /* for both cases: if lwip_netconn_do_writemore was called, don't ACK the APIMSG + since lwip_netconn_do_writemore ACKs it! */ + return; + } else { + msg->err = ERR_CONN; + } +#else /* LWIP_TCP */ + msg->err = ERR_VAL; +#endif /* LWIP_TCP */ +#if (LWIP_UDP || LWIP_RAW) + } else { + msg->err = ERR_VAL; +#endif /* (LWIP_UDP || LWIP_RAW) */ + } + } + TCPIP_APIMSG_ACK(msg); +} + +/** + * Return a connection's local or remote address + * Called from netconn_getaddr + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_getaddr(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + if (msg->conn->pcb.ip != NULL) { + if (msg->msg.ad.local) { + ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), + msg->conn->pcb.ip->local_ip); + } else { + ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), + msg->conn->pcb.ip->remote_ip); + } + + msg->err = ERR_OK; + switch (NETCONNTYPE_GROUP(msg->conn->type)) { +#if LWIP_RAW + case NETCONN_RAW: + if (msg->msg.ad.local) { + API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.raw->protocol; + } else { + /* return an error as connecting is only a helper for upper layers */ + msg->err = ERR_CONN; + } + break; +#endif /* LWIP_RAW */ +#if LWIP_UDP + case NETCONN_UDP: + if (msg->msg.ad.local) { + API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; + } else { + if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { + msg->err = ERR_CONN; + } else { + API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; + } + } + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case NETCONN_TCP: + if ((msg->msg.ad.local == 0) && + ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { + /* 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); + } + break; +#endif /* LWIP_TCP */ + default: + LWIP_ASSERT("invalid netconn_type", 0); + break; + } + } else { + msg->err = ERR_CONN; + } + TCPIP_APIMSG_ACK(msg); +} + +/** + * Close or half-shutdown a TCP pcb contained in a netconn + * Called from netconn_close + * In contrast to closing sockets, the netconn is not deallocated. + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_close(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + +#if LWIP_TCP + enum netconn_state state = msg->conn->state; + /* 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) && + (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && + ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { + /* Check if we are in a connected state */ + if (state == NETCONN_CONNECT) { + /* TCP connect in progress: cannot shutdown */ + msg->err = ERR_CONN; + } else if (state == NETCONN_WRITE) { +#if LWIP_NETCONN_FULLDUPLEX + if (msg->msg.sd.shut & NETCONN_SHUT_WR) { + /* close requested, abort running write */ + sys_sem_t* write_completed_sem; + LWIP_ASSERT("msg->conn->current_msg != NULL", msg->conn->current_msg != NULL); + write_completed_sem = LWIP_API_MSG_SEM(msg->conn->current_msg); + msg->conn->current_msg->err = ERR_CLSD; + msg->conn->current_msg = NULL; + msg->conn->write_offset = 0; + msg->conn->state = NETCONN_NONE; + state = NETCONN_NONE; + NETCONN_SET_SAFE_ERR(msg->conn, ERR_CLSD); + sys_sem_signal(write_completed_sem); + } else { + LWIP_ASSERT("msg->msg.sd.shut == NETCONN_SHUT_RD", msg->msg.sd.shut == NETCONN_SHUT_RD); + /* In this case, let the write continue and do not interfere with + conn->current_msg or conn->state! */ + msg->err = tcp_shutdown(msg->conn->pcb.tcp, 1, 0); + } + } + if (state == NETCONN_NONE) { +#else /* LWIP_NETCONN_FULLDUPLEX */ + msg->err = ERR_INPROGRESS; + } else { +#endif /* LWIP_NETCONN_FULLDUPLEX */ + if (msg->msg.sd.shut & NETCONN_SHUT_RD) { + /* Drain and delete mboxes */ + netconn_drain(msg->conn); + } + LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL && + msg->conn->write_offset == 0); + msg->conn->state = NETCONN_CLOSE; + msg->conn->current_msg = msg; +#if LWIP_TCPIP_CORE_LOCKING + if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { + LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); + UNLOCK_TCPIP_CORE(); + sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); + LOCK_TCPIP_CORE(); + LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); + } +#else /* LWIP_TCPIP_CORE_LOCKING */ + lwip_netconn_do_close_internal(msg->conn); +#endif /* LWIP_TCPIP_CORE_LOCKING */ + /* for tcp netconns, lwip_netconn_do_close_internal ACKs the message */ + return; + } + } else +#endif /* LWIP_TCP */ + { + msg->err = ERR_CONN; + } + TCPIP_APIMSG_ACK(msg); +} + +#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) +/** + * Join multicast groups for UDP netconns. + * Called from netconn_join_leave_group + * + * @param m the api_msg_msg pointing to the connection + */ +void +lwip_netconn_do_join_leave_group(void *m) +{ + struct api_msg *msg = (struct api_msg*)m; + + if (ERR_IS_FATAL(msg->conn->last_err)) { + msg->err = msg->conn->last_err; + } else { + if (msg->conn->pcb.tcp != NULL) { + if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { +#if LWIP_UDP +#if LWIP_IPV6 && LWIP_IPV6_MLD + if (NETCONNTYPE_ISIPV6(msg->conn->type)) { + if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { + msg->err = mld6_joingroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); + } else { + msg->err = mld6_leavegroup(ip_2_ip6(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip6(API_EXPR_REF(msg->msg.jl.multiaddr))); + } + } + else +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ + { +#if LWIP_IGMP + if (msg->msg.jl.join_or_leave == NETCONN_JOIN) { + msg->err = igmp_joingroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); + } else { + msg->err = igmp_leavegroup(ip_2_ip4(API_EXPR_REF(msg->msg.jl.netif_addr)), + ip_2_ip4(API_EXPR_REF(msg->msg.jl.multiaddr))); + } +#endif /* LWIP_IGMP */ + } +#endif /* LWIP_UDP */ +#if (LWIP_TCP || LWIP_RAW) + } else { + msg->err = ERR_VAL; +#endif /* (LWIP_TCP || LWIP_RAW) */ + } + } else { + msg->err = ERR_CONN; + } + } + TCPIP_APIMSG_ACK(msg); +} +#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ + +#if LWIP_DNS +/** + * Callback function that is called when DNS name is resolved + * (or on timeout). A waiting application thread is waked up by + * signaling the semaphore. + */ +static void +lwip_netconn_do_dns_found(const char *name, const ip_addr_t *ipaddr, void *arg) +{ + struct dns_api_msg *msg = (struct dns_api_msg*)arg; + + /* we trust the internal implementation to be correct :-) */ + LWIP_UNUSED_ARG(name); + + if (ipaddr == NULL) { + /* timeout or memory error */ + API_EXPR_DEREF(msg->err) = ERR_VAL; + } else { + /* address was resolved */ + API_EXPR_DEREF(msg->err) = ERR_OK; + API_EXPR_DEREF(msg->addr) = *ipaddr; + } + /* wake up the application task waiting in netconn_gethostbyname */ + sys_sem_signal(API_EXPR_REF_SEM(msg->sem)); +} + +/** + * Execute a DNS query + * Called from netconn_gethostbyname + * + * @param arg the dns_api_msg pointing to the query + */ +void +lwip_netconn_do_gethostbyname(void *arg) +{ + struct dns_api_msg *msg = (struct dns_api_msg*)arg; + u8_t addrtype = +#if LWIP_IPV4 && LWIP_IPV6 + msg->dns_addrtype; +#else + LWIP_DNS_ADDRTYPE_DEFAULT; +#endif + + API_EXPR_DEREF(msg->err) = dns_gethostbyname_addrtype(msg->name, + API_EXPR_REF(msg->addr), lwip_netconn_do_dns_found, msg, addrtype); + if (API_EXPR_DEREF(msg->err) != ERR_INPROGRESS) { + /* on error or immediate success, wake up the application + * task waiting in netconn_gethostbyname */ + sys_sem_signal(API_EXPR_REF_SEM(msg->sem)); + } +} +#endif /* LWIP_DNS */ + +#endif /* LWIP_NETCONN */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/err.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/err.c index 35e9c02..6e9ab76 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/err.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/err.c @@ -1,115 +1,115 @@ -/** - * @file - * Error Management module - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/err.h" -#include "lwip/def.h" -#include "lwip/sys.h" - -#include "lwip/errno.h" - -#if !NO_SYS -/** Table to quickly map an lwIP error (err_t) to a socket error - * by using -err as an index */ -static const int err_to_errno_table[] = { - 0, /* ERR_OK 0 No error, everything OK. */ - ENOMEM, /* ERR_MEM -1 Out of memory error. */ - ENOBUFS, /* ERR_BUF -2 Buffer error. */ - EWOULDBLOCK, /* ERR_TIMEOUT -3 Timeout */ - EHOSTUNREACH, /* ERR_RTE -4 Routing problem. */ - EINPROGRESS, /* ERR_INPROGRESS -5 Operation in progress */ - EINVAL, /* ERR_VAL -6 Illegal value. */ - EWOULDBLOCK, /* ERR_WOULDBLOCK -7 Operation would block. */ - EADDRINUSE, /* ERR_USE -8 Address in use. */ - EALREADY, /* ERR_ALREADY -9 Already connecting. */ - EISCONN, /* ERR_ISCONN -10 Conn already established.*/ - ENOTCONN, /* ERR_CONN -11 Not connected. */ - -1, /* ERR_IF -12 Low-level netif error */ - ECONNABORTED, /* ERR_ABRT -13 Connection aborted. */ - ECONNRESET, /* ERR_RST -14 Connection reset. */ - ENOTCONN, /* ERR_CLSD -15 Connection closed. */ - EIO /* ERR_ARG -16 Illegal argument. */ -}; - -int -err_to_errno(err_t err) -{ - if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) { - return EIO; - } - return err_to_errno_table[-err]; -} -#endif /* !NO_SYS */ - -#ifdef LWIP_DEBUG - -static const char *err_strerr[] = { - "Ok.", /* ERR_OK 0 */ - "Out of memory error.", /* ERR_MEM -1 */ - "Buffer error.", /* ERR_BUF -2 */ - "Timeout.", /* ERR_TIMEOUT -3 */ - "Routing problem.", /* ERR_RTE -4 */ - "Operation in progress.", /* ERR_INPROGRESS -5 */ - "Illegal value.", /* ERR_VAL -6 */ - "Operation would block.", /* ERR_WOULDBLOCK -7 */ - "Address in use.", /* ERR_USE -8 */ - "Already connecting.", /* ERR_ALREADY -9 */ - "Already connected.", /* ERR_ISCONN -10 */ - "Not connected.", /* ERR_CONN -11 */ - "Low-level netif error.", /* ERR_IF -12 */ - "Connection aborted.", /* ERR_ABRT -13 */ - "Connection reset.", /* ERR_RST -14 */ - "Connection closed.", /* ERR_CLSD -15 */ - "Illegal argument." /* ERR_ARG -16 */ -}; - -/** - * Convert an lwip internal error to a string representation. - * - * @param err an lwip internal err_t - * @return a string representation for err - */ -const char * -lwip_strerr(err_t err) -{ - if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_strerr))) { - return "Unknown error."; - } - return err_strerr[-err]; -} - -#endif /* LWIP_DEBUG */ +/** + * @file + * Error Management module + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/err.h" +#include "lwip/def.h" +#include "lwip/sys.h" + +#include "lwip/errno.h" + +#if !NO_SYS +/** Table to quickly map an lwIP error (err_t) to a socket error + * by using -err as an index */ +static const int err_to_errno_table[] = { + 0, /* ERR_OK 0 No error, everything OK. */ + ENOMEM, /* ERR_MEM -1 Out of memory error. */ + ENOBUFS, /* ERR_BUF -2 Buffer error. */ + EWOULDBLOCK, /* ERR_TIMEOUT -3 Timeout */ + EHOSTUNREACH, /* ERR_RTE -4 Routing problem. */ + EINPROGRESS, /* ERR_INPROGRESS -5 Operation in progress */ + EINVAL, /* ERR_VAL -6 Illegal value. */ + EWOULDBLOCK, /* ERR_WOULDBLOCK -7 Operation would block. */ + EADDRINUSE, /* ERR_USE -8 Address in use. */ + EALREADY, /* ERR_ALREADY -9 Already connecting. */ + EISCONN, /* ERR_ISCONN -10 Conn already established.*/ + ENOTCONN, /* ERR_CONN -11 Not connected. */ + -1, /* ERR_IF -12 Low-level netif error */ + ECONNABORTED, /* ERR_ABRT -13 Connection aborted. */ + ECONNRESET, /* ERR_RST -14 Connection reset. */ + ENOTCONN, /* ERR_CLSD -15 Connection closed. */ + EIO /* ERR_ARG -16 Illegal argument. */ +}; + +int +err_to_errno(err_t err) +{ + if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) { + return EIO; + } + return err_to_errno_table[-err]; +} +#endif /* !NO_SYS */ + +#ifdef LWIP_DEBUG + +static const char *err_strerr[] = { + "Ok.", /* ERR_OK 0 */ + "Out of memory error.", /* ERR_MEM -1 */ + "Buffer error.", /* ERR_BUF -2 */ + "Timeout.", /* ERR_TIMEOUT -3 */ + "Routing problem.", /* ERR_RTE -4 */ + "Operation in progress.", /* ERR_INPROGRESS -5 */ + "Illegal value.", /* ERR_VAL -6 */ + "Operation would block.", /* ERR_WOULDBLOCK -7 */ + "Address in use.", /* ERR_USE -8 */ + "Already connecting.", /* ERR_ALREADY -9 */ + "Already connected.", /* ERR_ISCONN -10 */ + "Not connected.", /* ERR_CONN -11 */ + "Low-level netif error.", /* ERR_IF -12 */ + "Connection aborted.", /* ERR_ABRT -13 */ + "Connection reset.", /* ERR_RST -14 */ + "Connection closed.", /* ERR_CLSD -15 */ + "Illegal argument." /* ERR_ARG -16 */ +}; + +/** + * Convert an lwip internal error to a string representation. + * + * @param err an lwip internal err_t + * @return a string representation for err + */ +const char * +lwip_strerr(err_t err) +{ + if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_strerr))) { + return "Unknown error."; + } + return err_strerr[-err]; +} + +#endif /* LWIP_DEBUG */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netbuf.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netbuf.c index eb25011..6a5a182 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netbuf.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netbuf.c @@ -1,246 +1,246 @@ -/** - * @file - * Network buffer management - * - * @defgroup netbuf Network buffers - * @ingroup netconn - * Network buffer descriptor for @ref netconn. Based on @ref pbuf internally - * to avoid copying data around.\n - * Buffers must not be shared accross multiple threads, all functions except - * netbuf_new() and netbuf_delete() are not thread-safe. - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/netbuf.h" -#include "lwip/memp.h" - -#include - -/** - * @ingroup netbuf - * Create (allocate) and initialize a new netbuf. - * The netbuf doesn't yet contain a packet buffer! - * - * @return a pointer to a new netbuf - * NULL on lack of memory - */ -struct -netbuf *netbuf_new(void) -{ - struct netbuf *buf; - - buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); - if (buf != NULL) { - memset(buf, 0, sizeof(struct netbuf)); - } - return buf; -} - -/** - * @ingroup netbuf - * Deallocate a netbuf allocated by netbuf_new(). - * - * @param buf pointer to a netbuf allocated by netbuf_new() - */ -void -netbuf_delete(struct netbuf *buf) -{ - if (buf != NULL) { - if (buf->p != NULL) { - pbuf_free(buf->p); - buf->p = buf->ptr = NULL; - } - memp_free(MEMP_NETBUF, buf); - } -} - -/** - * @ingroup netbuf - * Allocate memory for a packet buffer for a given netbuf. - * - * @param buf the netbuf for which to allocate a packet buffer - * @param size the size of the packet buffer to allocate - * @return pointer to the allocated memory - * NULL if no memory could be allocated - */ -void * -netbuf_alloc(struct netbuf *buf, u16_t size) -{ - LWIP_ERROR("netbuf_alloc: invalid buf", (buf != NULL), return NULL;); - - /* Deallocate any previously allocated memory. */ - if (buf->p != NULL) { - pbuf_free(buf->p); - } - buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); - if (buf->p == NULL) { - return NULL; - } - LWIP_ASSERT("check that first pbuf can hold size", - (buf->p->len >= size)); - buf->ptr = buf->p; - return buf->p->payload; -} - -/** - * @ingroup netbuf - * Free the packet buffer included in a netbuf - * - * @param buf pointer to the netbuf which contains the packet buffer to free - */ -void -netbuf_free(struct netbuf *buf) -{ - LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;); - if (buf->p != NULL) { - pbuf_free(buf->p); - } - buf->p = buf->ptr = NULL; -} - -/** - * @ingroup netbuf - * Let a netbuf reference existing (non-volatile) data. - * - * @param buf netbuf which should reference the data - * @param dataptr pointer to the data to reference - * @param size size of the data - * @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) -{ - LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;); - if (buf->p != NULL) { - pbuf_free(buf->p); - } - buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); - if (buf->p == NULL) { - buf->ptr = NULL; - return ERR_MEM; - } - ((struct pbuf_rom*)buf->p)->payload = dataptr; - buf->p->len = buf->p->tot_len = size; - buf->ptr = buf->p; - return ERR_OK; -} - -/** - * @ingroup netbuf - * Chain one netbuf to another (@see pbuf_chain) - * - * @param head the first netbuf - * @param tail netbuf to chain after head, freed by this function, may not be reference after returning - */ -void -netbuf_chain(struct netbuf *head, struct netbuf *tail) -{ - LWIP_ERROR("netbuf_chain: invalid head", (head != NULL), return;); - LWIP_ERROR("netbuf_chain: invalid tail", (tail != NULL), return;); - pbuf_cat(head->p, tail->p); - head->ptr = head->p; - memp_free(MEMP_NETBUF, tail); -} - -/** - * @ingroup netbuf - * Get the data pointer and length of the data inside a netbuf. - * - * @param buf netbuf to get the data from - * @param dataptr pointer to a void pointer where to store the data pointer - * @param len pointer to an u16_t where the length of the data is stored - * @return ERR_OK if the information was retrieved, - * ERR_BUF on error. - */ -err_t -netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len) -{ - LWIP_ERROR("netbuf_data: invalid buf", (buf != NULL), return ERR_ARG;); - LWIP_ERROR("netbuf_data: invalid dataptr", (dataptr != NULL), return ERR_ARG;); - LWIP_ERROR("netbuf_data: invalid len", (len != NULL), return ERR_ARG;); - - if (buf->ptr == NULL) { - return ERR_BUF; - } - *dataptr = buf->ptr->payload; - *len = buf->ptr->len; - return ERR_OK; -} - -/** - * @ingroup netbuf - * Move the current data pointer of a packet buffer contained in a netbuf - * to the next part. - * The packet buffer itself is not modified. - * - * @param buf the netbuf to modify - * @return -1 if there is no next part - * 1 if moved to the next part but now there is no next part - * 0 if moved to the next part and there are still more parts - */ -s8_t -netbuf_next(struct netbuf *buf) -{ - LWIP_ERROR("netbuf_next: invalid buf", (buf != NULL), return -1;); - if (buf->ptr->next == NULL) { - return -1; - } - buf->ptr = buf->ptr->next; - if (buf->ptr->next == NULL) { - return 1; - } - return 0; -} - -/** - * @ingroup netbuf - * Move the current data pointer of a packet buffer contained in a netbuf - * to the beginning of the packet. - * The packet buffer itself is not modified. - * - * @param buf the netbuf to modify - */ -void -netbuf_first(struct netbuf *buf) -{ - LWIP_ERROR("netbuf_first: invalid buf", (buf != NULL), return;); - buf->ptr = buf->p; -} - -#endif /* LWIP_NETCONN */ +/** + * @file + * Network buffer management + * + * @defgroup netbuf Network buffers + * @ingroup netconn + * Network buffer descriptor for @ref netconn. Based on @ref pbuf internally + * to avoid copying data around.\n + * Buffers must not be shared accross multiple threads, all functions except + * netbuf_new() and netbuf_delete() are not thread-safe. + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/netbuf.h" +#include "lwip/memp.h" + +#include + +/** + * @ingroup netbuf + * Create (allocate) and initialize a new netbuf. + * The netbuf doesn't yet contain a packet buffer! + * + * @return a pointer to a new netbuf + * NULL on lack of memory + */ +struct +netbuf *netbuf_new(void) +{ + struct netbuf *buf; + + buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); + if (buf != NULL) { + memset(buf, 0, sizeof(struct netbuf)); + } + return buf; +} + +/** + * @ingroup netbuf + * Deallocate a netbuf allocated by netbuf_new(). + * + * @param buf pointer to a netbuf allocated by netbuf_new() + */ +void +netbuf_delete(struct netbuf *buf) +{ + if (buf != NULL) { + if (buf->p != NULL) { + pbuf_free(buf->p); + buf->p = buf->ptr = NULL; + } + memp_free(MEMP_NETBUF, buf); + } +} + +/** + * @ingroup netbuf + * Allocate memory for a packet buffer for a given netbuf. + * + * @param buf the netbuf for which to allocate a packet buffer + * @param size the size of the packet buffer to allocate + * @return pointer to the allocated memory + * NULL if no memory could be allocated + */ +void * +netbuf_alloc(struct netbuf *buf, u16_t size) +{ + LWIP_ERROR("netbuf_alloc: invalid buf", (buf != NULL), return NULL;); + + /* Deallocate any previously allocated memory. */ + if (buf->p != NULL) { + pbuf_free(buf->p); + } + buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM); + if (buf->p == NULL) { + return NULL; + } + LWIP_ASSERT("check that first pbuf can hold size", + (buf->p->len >= size)); + buf->ptr = buf->p; + return buf->p->payload; +} + +/** + * @ingroup netbuf + * Free the packet buffer included in a netbuf + * + * @param buf pointer to the netbuf which contains the packet buffer to free + */ +void +netbuf_free(struct netbuf *buf) +{ + LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;); + if (buf->p != NULL) { + pbuf_free(buf->p); + } + buf->p = buf->ptr = NULL; +} + +/** + * @ingroup netbuf + * Let a netbuf reference existing (non-volatile) data. + * + * @param buf netbuf which should reference the data + * @param dataptr pointer to the data to reference + * @param size size of the data + * @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) +{ + LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;); + if (buf->p != NULL) { + pbuf_free(buf->p); + } + buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); + if (buf->p == NULL) { + buf->ptr = NULL; + return ERR_MEM; + } + ((struct pbuf_rom*)buf->p)->payload = dataptr; + buf->p->len = buf->p->tot_len = size; + buf->ptr = buf->p; + return ERR_OK; +} + +/** + * @ingroup netbuf + * Chain one netbuf to another (@see pbuf_chain) + * + * @param head the first netbuf + * @param tail netbuf to chain after head, freed by this function, may not be reference after returning + */ +void +netbuf_chain(struct netbuf *head, struct netbuf *tail) +{ + LWIP_ERROR("netbuf_chain: invalid head", (head != NULL), return;); + LWIP_ERROR("netbuf_chain: invalid tail", (tail != NULL), return;); + pbuf_cat(head->p, tail->p); + head->ptr = head->p; + memp_free(MEMP_NETBUF, tail); +} + +/** + * @ingroup netbuf + * Get the data pointer and length of the data inside a netbuf. + * + * @param buf netbuf to get the data from + * @param dataptr pointer to a void pointer where to store the data pointer + * @param len pointer to an u16_t where the length of the data is stored + * @return ERR_OK if the information was retrieved, + * ERR_BUF on error. + */ +err_t +netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len) +{ + LWIP_ERROR("netbuf_data: invalid buf", (buf != NULL), return ERR_ARG;); + LWIP_ERROR("netbuf_data: invalid dataptr", (dataptr != NULL), return ERR_ARG;); + LWIP_ERROR("netbuf_data: invalid len", (len != NULL), return ERR_ARG;); + + if (buf->ptr == NULL) { + return ERR_BUF; + } + *dataptr = buf->ptr->payload; + *len = buf->ptr->len; + return ERR_OK; +} + +/** + * @ingroup netbuf + * Move the current data pointer of a packet buffer contained in a netbuf + * to the next part. + * The packet buffer itself is not modified. + * + * @param buf the netbuf to modify + * @return -1 if there is no next part + * 1 if moved to the next part but now there is no next part + * 0 if moved to the next part and there are still more parts + */ +s8_t +netbuf_next(struct netbuf *buf) +{ + LWIP_ERROR("netbuf_next: invalid buf", (buf != NULL), return -1;); + if (buf->ptr->next == NULL) { + return -1; + } + buf->ptr = buf->ptr->next; + if (buf->ptr->next == NULL) { + return 1; + } + return 0; +} + +/** + * @ingroup netbuf + * Move the current data pointer of a packet buffer contained in a netbuf + * to the beginning of the packet. + * The packet buffer itself is not modified. + * + * @param buf the netbuf to modify + */ +void +netbuf_first(struct netbuf *buf) +{ + LWIP_ERROR("netbuf_first: invalid buf", (buf != NULL), return;); + buf->ptr = buf->p; +} + +#endif /* LWIP_NETCONN */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netdb.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netdb.c index ccd9586..deff495 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netdb.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netdb.c @@ -1,413 +1,413 @@ -/** - * @file - * API functions for name resolving - * - * @defgroup netdbapi NETDB API - * @ingroup socket - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Simon Goldschmidt - * - */ - -#include "lwip/netdb.h" - -#if LWIP_DNS && LWIP_SOCKET - -#include "lwip/err.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/ip_addr.h" -#include "lwip/api.h" -#include "lwip/dns.h" - -#include /* memset */ -#include /* atoi */ - -/** helper struct for gethostbyname_r to access the char* buffer */ -struct gethostbyname_r_helper { - ip_addr_t *addr_list[2]; - ip_addr_t addr; - char *aliases; -}; - -/** h_errno is exported in netdb.h for access by applications. */ -#if LWIP_DNS_API_DECLARE_H_ERRNO -int h_errno; -#endif /* LWIP_DNS_API_DECLARE_H_ERRNO */ - -/** define "hostent" variables storage: 0 if we use a static (but unprotected) - * set of variables for lwip_gethostbyname, 1 if we use a local storage */ -#ifndef LWIP_DNS_API_HOSTENT_STORAGE -#define LWIP_DNS_API_HOSTENT_STORAGE 0 -#endif - -/** define "hostent" variables storage */ -#if LWIP_DNS_API_HOSTENT_STORAGE -#define HOSTENT_STORAGE -#else -#define HOSTENT_STORAGE static -#endif /* LWIP_DNS_API_STATIC_HOSTENT */ - -/** - * Returns an entry containing addresses of address family AF_INET - * for the host with name name. - * Due to dns_gethostbyname limitations, only one address is returned. - * - * @param name the hostname to resolve - * @return an entry containing addresses of address family AF_INET - * for the host with name name - */ -struct hostent* -lwip_gethostbyname(const char *name) -{ - err_t err; - ip_addr_t addr; - - /* buffer variables for lwip_gethostbyname() */ - HOSTENT_STORAGE struct hostent s_hostent; - HOSTENT_STORAGE char *s_aliases; - HOSTENT_STORAGE ip_addr_t s_hostent_addr; - HOSTENT_STORAGE ip_addr_t *s_phostent_addr[2]; - HOSTENT_STORAGE char s_hostname[DNS_MAX_NAME_LENGTH + 1]; - - /* query host IP address */ - err = netconn_gethostbyname(name, &addr); - if (err != ERR_OK) { - LWIP_DEBUGF(DNS_DEBUG, ("lwip_gethostbyname(%s) failed, err=%d\n", name, err)); - h_errno = HOST_NOT_FOUND; - return NULL; - } - - /* fill hostent */ - s_hostent_addr = addr; - s_phostent_addr[0] = &s_hostent_addr; - s_phostent_addr[1] = NULL; - strncpy(s_hostname, name, DNS_MAX_NAME_LENGTH); - s_hostname[DNS_MAX_NAME_LENGTH] = 0; - s_hostent.h_name = s_hostname; - s_aliases = NULL; - s_hostent.h_aliases = &s_aliases; - s_hostent.h_addrtype = AF_INET; - s_hostent.h_length = sizeof(ip_addr_t); - s_hostent.h_addr_list = (char**)&s_phostent_addr; - -#if DNS_DEBUG - /* dump hostent */ - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_name == %s\n", s_hostent.h_name)); - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_aliases == %p\n", (void*)s_hostent.h_aliases)); - /* h_aliases are always empty */ - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addrtype == %d\n", s_hostent.h_addrtype)); - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_length == %d\n", s_hostent.h_length)); - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list == %p\n", (void*)s_hostent.h_addr_list)); - if (s_hostent.h_addr_list != NULL) { - u8_t idx; - for (idx=0; s_hostent.h_addr_list[idx]; idx++) { - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i] == %p\n", idx, s_hostent.h_addr_list[idx])); - LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i]-> == %s\n", idx, ipaddr_ntoa((ip_addr_t*)s_hostent.h_addr_list[idx]))); - } - } -#endif /* DNS_DEBUG */ - -#if LWIP_DNS_API_HOSTENT_STORAGE - /* this function should return the "per-thread" hostent after copy from s_hostent */ - return sys_thread_hostent(&s_hostent); -#else - return &s_hostent; -#endif /* LWIP_DNS_API_HOSTENT_STORAGE */ -} - -/** - * Thread-safe variant of lwip_gethostbyname: instead of using a static - * buffer, this function takes buffer and errno pointers as arguments - * and uses these for the result. - * - * @param name the hostname to resolve - * @param ret pre-allocated struct where to store the result - * @param buf pre-allocated buffer where to store additional data - * @param buflen the size of buf - * @param result pointer to a hostent pointer that is set to ret on success - * and set to zero on error - * @param h_errnop pointer to an int where to store errors (instead of modifying - * the global h_errno) - * @return 0 on success, non-zero on error, additional error information - * is stored in *h_errnop instead of h_errno to be thread-safe - */ -int -lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, - size_t buflen, struct hostent **result, int *h_errnop) -{ - err_t err; - struct gethostbyname_r_helper *h; - char *hostname; - size_t namelen; - int lh_errno; - - if (h_errnop == NULL) { - /* ensure h_errnop is never NULL */ - h_errnop = &lh_errno; - } - - if (result == NULL) { - /* not all arguments given */ - *h_errnop = EINVAL; - return -1; - } - /* first thing to do: set *result to nothing */ - *result = NULL; - if ((name == NULL) || (ret == NULL) || (buf == NULL)) { - /* not all arguments given */ - *h_errnop = EINVAL; - return -1; - } - - namelen = strlen(name); - if (buflen < (sizeof(struct gethostbyname_r_helper) + namelen + 1 + (MEM_ALIGNMENT - 1))) { - /* buf can't hold the data needed + a copy of name */ - *h_errnop = ERANGE; - return -1; - } - - h = (struct gethostbyname_r_helper*)LWIP_MEM_ALIGN(buf); - hostname = ((char*)h) + sizeof(struct gethostbyname_r_helper); - - /* query host IP address */ - err = netconn_gethostbyname(name, &h->addr); - if (err != ERR_OK) { - LWIP_DEBUGF(DNS_DEBUG, ("lwip_gethostbyname(%s) failed, err=%d\n", name, err)); - *h_errnop = HOST_NOT_FOUND; - return -1; - } - - /* copy the hostname into buf */ - MEMCPY(hostname, name, namelen); - hostname[namelen] = 0; - - /* fill hostent */ - h->addr_list[0] = &h->addr; - h->addr_list[1] = NULL; - h->aliases = NULL; - ret->h_name = hostname; - ret->h_aliases = &h->aliases; - ret->h_addrtype = AF_INET; - ret->h_length = sizeof(ip_addr_t); - ret->h_addr_list = (char**)&h->addr_list; - - /* set result != NULL */ - *result = ret; - - /* return success */ - return 0; -} - -/** - * Frees one or more addrinfo structures returned by getaddrinfo(), along with - * any additional storage associated with those structures. If the ai_next field - * of the structure is not null, the entire list of structures is freed. - * - * @param ai struct addrinfo to free - */ -void -lwip_freeaddrinfo(struct addrinfo *ai) -{ - struct addrinfo *next; - - while (ai != NULL) { - next = ai->ai_next; - memp_free(MEMP_NETDB, ai); - ai = next; - } -} - -/** - * Translates the name of a service location (for example, a host name) and/or - * a service name and returns a set of socket addresses and associated - * information to be used in creating a socket with which to address the - * specified service. - * Memory for the result is allocated internally and must be freed by calling - * lwip_freeaddrinfo()! - * - * Due to a limitation in dns_gethostbyname, only the first address of a - * host is returned. - * Also, service names are not supported (only port numbers)! - * - * @param nodename descriptive name or address string of the host - * (may be NULL -> local address) - * @param servname port number as string of NULL - * @param hints structure containing input values that set socktype and protocol - * @param res pointer to a pointer where to store the result (set to NULL on failure) - * @return 0 on success, non-zero on failure - * - * @todo: implement AI_V4MAPPED, AI_ADDRCONFIG - */ -int -lwip_getaddrinfo(const char *nodename, const char *servname, - const struct addrinfo *hints, struct addrinfo **res) -{ - err_t err; - ip_addr_t addr; - struct addrinfo *ai; - struct sockaddr_storage *sa = NULL; - int port_nr = 0; - size_t total_size; - size_t namelen = 0; - int ai_family; - - if (res == NULL) { - return EAI_FAIL; - } - *res = NULL; - if ((nodename == NULL) && (servname == NULL)) { - return EAI_NONAME; - } - - if (hints != NULL) { - ai_family = hints->ai_family; - if ((ai_family != AF_UNSPEC) -#if LWIP_IPV4 - && (ai_family != AF_INET) -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 - && (ai_family != AF_INET6) -#endif /* LWIP_IPV6 */ - ) { - return EAI_FAMILY; - } - } else { - ai_family = AF_UNSPEC; - } - - if (servname != NULL) { - /* service name specified: convert to port number - * @todo?: currently, only ASCII integers (port numbers) are supported (AI_NUMERICSERV)! */ - port_nr = atoi(servname); - if ((port_nr <= 0) || (port_nr > 0xffff)) { - return EAI_SERVICE; - } - } - - if (nodename != NULL) { - /* service location specified, try to resolve */ - if ((hints != NULL) && (hints->ai_flags & AI_NUMERICHOST)) { - /* no DNS lookup, just parse for an address string */ - if (!ipaddr_aton(nodename, &addr)) { - return EAI_NONAME; - } -#if LWIP_IPV4 && LWIP_IPV6 - if ((IP_IS_V6_VAL(addr) && ai_family == AF_INET) || - (IP_IS_V4_VAL(addr) && ai_family == AF_INET6)) { - return EAI_NONAME; - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - } else { -#if LWIP_IPV4 && LWIP_IPV6 - /* AF_UNSPEC: prefer IPv4 */ - u8_t type = NETCONN_DNS_IPV4_IPV6; - if (ai_family == AF_INET) { - type = NETCONN_DNS_IPV4; - } else if (ai_family == AF_INET6) { - type = NETCONN_DNS_IPV6; - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - err = netconn_gethostbyname_addrtype(nodename, &addr, type); - if (err != ERR_OK) { - return EAI_FAIL; - } - } - } else { - /* service location specified, use loopback address */ - if ((hints != NULL) && (hints->ai_flags & AI_PASSIVE)) { - ip_addr_set_any(ai_family == AF_INET6, &addr); - } else { - ip_addr_set_loopback(ai_family == AF_INET6, &addr); - } - } - - total_size = sizeof(struct addrinfo) + sizeof(struct sockaddr_storage); - if (nodename != NULL) { - namelen = strlen(nodename); - if (namelen > DNS_MAX_NAME_LENGTH) { - /* invalid name length */ - return EAI_FAIL; - } - LWIP_ASSERT("namelen is too long", total_size + namelen + 1 > total_size); - total_size += namelen + 1; - } - /* If this fails, please report to lwip-devel! :-) */ - LWIP_ASSERT("total_size <= NETDB_ELEM_SIZE: please report this!", - total_size <= NETDB_ELEM_SIZE); - ai = (struct addrinfo *)memp_malloc(MEMP_NETDB); - if (ai == NULL) { - return EAI_MEMORY; - } - memset(ai, 0, total_size); - /* cast through void* to get rid of alignment warnings */ - sa = (struct sockaddr_storage *)(void*)((u8_t*)ai + sizeof(struct addrinfo)); - if (IP_IS_V6_VAL(addr)) { -#if LWIP_IPV6 - struct sockaddr_in6 *sa6 = (struct sockaddr_in6*)sa; - /* set up sockaddr */ - inet6_addr_from_ip6addr(&sa6->sin6_addr, ip_2_ip6(&addr)); - sa6->sin6_family = AF_INET6; - sa6->sin6_len = sizeof(struct sockaddr_in6); - sa6->sin6_port = lwip_htons((u16_t)port_nr); - ai->ai_family = AF_INET6; -#endif /* LWIP_IPV6 */ - } else { -#if LWIP_IPV4 - struct sockaddr_in *sa4 = (struct sockaddr_in*)sa; - /* set up sockaddr */ - inet_addr_from_ip4addr(&sa4->sin_addr, ip_2_ip4(&addr)); - sa4->sin_family = AF_INET; - sa4->sin_len = sizeof(struct sockaddr_in); - sa4->sin_port = lwip_htons((u16_t)port_nr); - ai->ai_family = AF_INET; -#endif /* LWIP_IPV4 */ - } - - /* set up addrinfo */ - if (hints != NULL) { - /* copy socktype & protocol from hints if specified */ - ai->ai_socktype = hints->ai_socktype; - ai->ai_protocol = hints->ai_protocol; - } - if (nodename != NULL) { - /* copy nodename to canonname if specified */ - ai->ai_canonname = ((char*)ai + sizeof(struct addrinfo) + sizeof(struct sockaddr_storage)); - MEMCPY(ai->ai_canonname, nodename, namelen); - ai->ai_canonname[namelen] = 0; - } - ai->ai_addrlen = sizeof(struct sockaddr_storage); - ai->ai_addr = (struct sockaddr*)sa; - - *res = ai; - - return 0; -} - -#endif /* LWIP_DNS && LWIP_SOCKET */ +/** + * @file + * API functions for name resolving + * + * @defgroup netdbapi NETDB API + * @ingroup socket + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/netdb.h" + +#if LWIP_DNS && LWIP_SOCKET + +#include "lwip/err.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/ip_addr.h" +#include "lwip/api.h" +#include "lwip/dns.h" + +#include /* memset */ +#include /* atoi */ + +/** helper struct for gethostbyname_r to access the char* buffer */ +struct gethostbyname_r_helper { + ip_addr_t *addr_list[2]; + ip_addr_t addr; + char *aliases; +}; + +/** h_errno is exported in netdb.h for access by applications. */ +#if LWIP_DNS_API_DECLARE_H_ERRNO +int h_errno; +#endif /* LWIP_DNS_API_DECLARE_H_ERRNO */ + +/** define "hostent" variables storage: 0 if we use a static (but unprotected) + * set of variables for lwip_gethostbyname, 1 if we use a local storage */ +#ifndef LWIP_DNS_API_HOSTENT_STORAGE +#define LWIP_DNS_API_HOSTENT_STORAGE 0 +#endif + +/** define "hostent" variables storage */ +#if LWIP_DNS_API_HOSTENT_STORAGE +#define HOSTENT_STORAGE +#else +#define HOSTENT_STORAGE static +#endif /* LWIP_DNS_API_STATIC_HOSTENT */ + +/** + * Returns an entry containing addresses of address family AF_INET + * for the host with name name. + * Due to dns_gethostbyname limitations, only one address is returned. + * + * @param name the hostname to resolve + * @return an entry containing addresses of address family AF_INET + * for the host with name name + */ +struct hostent* +lwip_gethostbyname(const char *name) +{ + err_t err; + ip_addr_t addr; + + /* buffer variables for lwip_gethostbyname() */ + HOSTENT_STORAGE struct hostent s_hostent; + HOSTENT_STORAGE char *s_aliases; + HOSTENT_STORAGE ip_addr_t s_hostent_addr; + HOSTENT_STORAGE ip_addr_t *s_phostent_addr[2]; + HOSTENT_STORAGE char s_hostname[DNS_MAX_NAME_LENGTH + 1]; + + /* query host IP address */ + err = netconn_gethostbyname(name, &addr); + if (err != ERR_OK) { + LWIP_DEBUGF(DNS_DEBUG, ("lwip_gethostbyname(%s) failed, err=%d\n", name, err)); + h_errno = HOST_NOT_FOUND; + return NULL; + } + + /* fill hostent */ + s_hostent_addr = addr; + s_phostent_addr[0] = &s_hostent_addr; + s_phostent_addr[1] = NULL; + strncpy(s_hostname, name, DNS_MAX_NAME_LENGTH); + s_hostname[DNS_MAX_NAME_LENGTH] = 0; + s_hostent.h_name = s_hostname; + s_aliases = NULL; + s_hostent.h_aliases = &s_aliases; + s_hostent.h_addrtype = AF_INET; + s_hostent.h_length = sizeof(ip_addr_t); + s_hostent.h_addr_list = (char**)&s_phostent_addr; + +#if DNS_DEBUG + /* dump hostent */ + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_name == %s\n", s_hostent.h_name)); + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_aliases == %p\n", (void*)s_hostent.h_aliases)); + /* h_aliases are always empty */ + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addrtype == %d\n", s_hostent.h_addrtype)); + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_length == %d\n", s_hostent.h_length)); + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list == %p\n", (void*)s_hostent.h_addr_list)); + if (s_hostent.h_addr_list != NULL) { + u8_t idx; + for (idx=0; s_hostent.h_addr_list[idx]; idx++) { + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i] == %p\n", idx, s_hostent.h_addr_list[idx])); + LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i]-> == %s\n", idx, ipaddr_ntoa((ip_addr_t*)s_hostent.h_addr_list[idx]))); + } + } +#endif /* DNS_DEBUG */ + +#if LWIP_DNS_API_HOSTENT_STORAGE + /* this function should return the "per-thread" hostent after copy from s_hostent */ + return sys_thread_hostent(&s_hostent); +#else + return &s_hostent; +#endif /* LWIP_DNS_API_HOSTENT_STORAGE */ +} + +/** + * Thread-safe variant of lwip_gethostbyname: instead of using a static + * buffer, this function takes buffer and errno pointers as arguments + * and uses these for the result. + * + * @param name the hostname to resolve + * @param ret pre-allocated struct where to store the result + * @param buf pre-allocated buffer where to store additional data + * @param buflen the size of buf + * @param result pointer to a hostent pointer that is set to ret on success + * and set to zero on error + * @param h_errnop pointer to an int where to store errors (instead of modifying + * the global h_errno) + * @return 0 on success, non-zero on error, additional error information + * is stored in *h_errnop instead of h_errno to be thread-safe + */ +int +lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, + size_t buflen, struct hostent **result, int *h_errnop) +{ + err_t err; + struct gethostbyname_r_helper *h; + char *hostname; + size_t namelen; + int lh_errno; + + if (h_errnop == NULL) { + /* ensure h_errnop is never NULL */ + h_errnop = &lh_errno; + } + + if (result == NULL) { + /* not all arguments given */ + *h_errnop = EINVAL; + return -1; + } + /* first thing to do: set *result to nothing */ + *result = NULL; + if ((name == NULL) || (ret == NULL) || (buf == NULL)) { + /* not all arguments given */ + *h_errnop = EINVAL; + return -1; + } + + namelen = strlen(name); + if (buflen < (sizeof(struct gethostbyname_r_helper) + namelen + 1 + (MEM_ALIGNMENT - 1))) { + /* buf can't hold the data needed + a copy of name */ + *h_errnop = ERANGE; + return -1; + } + + h = (struct gethostbyname_r_helper*)LWIP_MEM_ALIGN(buf); + hostname = ((char*)h) + sizeof(struct gethostbyname_r_helper); + + /* query host IP address */ + err = netconn_gethostbyname(name, &h->addr); + if (err != ERR_OK) { + LWIP_DEBUGF(DNS_DEBUG, ("lwip_gethostbyname(%s) failed, err=%d\n", name, err)); + *h_errnop = HOST_NOT_FOUND; + return -1; + } + + /* copy the hostname into buf */ + MEMCPY(hostname, name, namelen); + hostname[namelen] = 0; + + /* fill hostent */ + h->addr_list[0] = &h->addr; + h->addr_list[1] = NULL; + h->aliases = NULL; + ret->h_name = hostname; + ret->h_aliases = &h->aliases; + ret->h_addrtype = AF_INET; + ret->h_length = sizeof(ip_addr_t); + ret->h_addr_list = (char**)&h->addr_list; + + /* set result != NULL */ + *result = ret; + + /* return success */ + return 0; +} + +/** + * Frees one or more addrinfo structures returned by getaddrinfo(), along with + * any additional storage associated with those structures. If the ai_next field + * of the structure is not null, the entire list of structures is freed. + * + * @param ai struct addrinfo to free + */ +void +lwip_freeaddrinfo(struct addrinfo *ai) +{ + struct addrinfo *next; + + while (ai != NULL) { + next = ai->ai_next; + memp_free(MEMP_NETDB, ai); + ai = next; + } +} + +/** + * Translates the name of a service location (for example, a host name) and/or + * a service name and returns a set of socket addresses and associated + * information to be used in creating a socket with which to address the + * specified service. + * Memory for the result is allocated internally and must be freed by calling + * lwip_freeaddrinfo()! + * + * Due to a limitation in dns_gethostbyname, only the first address of a + * host is returned. + * Also, service names are not supported (only port numbers)! + * + * @param nodename descriptive name or address string of the host + * (may be NULL -> local address) + * @param servname port number as string of NULL + * @param hints structure containing input values that set socktype and protocol + * @param res pointer to a pointer where to store the result (set to NULL on failure) + * @return 0 on success, non-zero on failure + * + * @todo: implement AI_V4MAPPED, AI_ADDRCONFIG + */ +int +lwip_getaddrinfo(const char *nodename, const char *servname, + const struct addrinfo *hints, struct addrinfo **res) +{ + err_t err; + ip_addr_t addr; + struct addrinfo *ai; + struct sockaddr_storage *sa = NULL; + int port_nr = 0; + size_t total_size; + size_t namelen = 0; + int ai_family; + + if (res == NULL) { + return EAI_FAIL; + } + *res = NULL; + if ((nodename == NULL) && (servname == NULL)) { + return EAI_NONAME; + } + + if (hints != NULL) { + ai_family = hints->ai_family; + if ((ai_family != AF_UNSPEC) +#if LWIP_IPV4 + && (ai_family != AF_INET) +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 + && (ai_family != AF_INET6) +#endif /* LWIP_IPV6 */ + ) { + return EAI_FAMILY; + } + } else { + ai_family = AF_UNSPEC; + } + + if (servname != NULL) { + /* service name specified: convert to port number + * @todo?: currently, only ASCII integers (port numbers) are supported (AI_NUMERICSERV)! */ + port_nr = atoi(servname); + if ((port_nr <= 0) || (port_nr > 0xffff)) { + return EAI_SERVICE; + } + } + + if (nodename != NULL) { + /* service location specified, try to resolve */ + if ((hints != NULL) && (hints->ai_flags & AI_NUMERICHOST)) { + /* no DNS lookup, just parse for an address string */ + if (!ipaddr_aton(nodename, &addr)) { + return EAI_NONAME; + } +#if LWIP_IPV4 && LWIP_IPV6 + if ((IP_IS_V6_VAL(addr) && ai_family == AF_INET) || + (IP_IS_V4_VAL(addr) && ai_family == AF_INET6)) { + return EAI_NONAME; + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + } else { +#if LWIP_IPV4 && LWIP_IPV6 + /* AF_UNSPEC: prefer IPv4 */ + u8_t type = NETCONN_DNS_IPV4_IPV6; + if (ai_family == AF_INET) { + type = NETCONN_DNS_IPV4; + } else if (ai_family == AF_INET6) { + type = NETCONN_DNS_IPV6; + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + err = netconn_gethostbyname_addrtype(nodename, &addr, type); + if (err != ERR_OK) { + return EAI_FAIL; + } + } + } else { + /* service location specified, use loopback address */ + if ((hints != NULL) && (hints->ai_flags & AI_PASSIVE)) { + ip_addr_set_any(ai_family == AF_INET6, &addr); + } else { + ip_addr_set_loopback(ai_family == AF_INET6, &addr); + } + } + + total_size = sizeof(struct addrinfo) + sizeof(struct sockaddr_storage); + if (nodename != NULL) { + namelen = strlen(nodename); + if (namelen > DNS_MAX_NAME_LENGTH) { + /* invalid name length */ + return EAI_FAIL; + } + LWIP_ASSERT("namelen is too long", total_size + namelen + 1 > total_size); + total_size += namelen + 1; + } + /* If this fails, please report to lwip-devel! :-) */ + LWIP_ASSERT("total_size <= NETDB_ELEM_SIZE: please report this!", + total_size <= NETDB_ELEM_SIZE); + ai = (struct addrinfo *)memp_malloc(MEMP_NETDB); + if (ai == NULL) { + return EAI_MEMORY; + } + memset(ai, 0, total_size); + /* cast through void* to get rid of alignment warnings */ + sa = (struct sockaddr_storage *)(void*)((u8_t*)ai + sizeof(struct addrinfo)); + if (IP_IS_V6_VAL(addr)) { +#if LWIP_IPV6 + struct sockaddr_in6 *sa6 = (struct sockaddr_in6*)sa; + /* set up sockaddr */ + inet6_addr_from_ip6addr(&sa6->sin6_addr, ip_2_ip6(&addr)); + sa6->sin6_family = AF_INET6; + sa6->sin6_len = sizeof(struct sockaddr_in6); + sa6->sin6_port = lwip_htons((u16_t)port_nr); + ai->ai_family = AF_INET6; +#endif /* LWIP_IPV6 */ + } else { +#if LWIP_IPV4 + struct sockaddr_in *sa4 = (struct sockaddr_in*)sa; + /* set up sockaddr */ + inet_addr_from_ip4addr(&sa4->sin_addr, ip_2_ip4(&addr)); + sa4->sin_family = AF_INET; + sa4->sin_len = sizeof(struct sockaddr_in); + sa4->sin_port = lwip_htons((u16_t)port_nr); + ai->ai_family = AF_INET; +#endif /* LWIP_IPV4 */ + } + + /* set up addrinfo */ + if (hints != NULL) { + /* copy socktype & protocol from hints if specified */ + ai->ai_socktype = hints->ai_socktype; + ai->ai_protocol = hints->ai_protocol; + } + if (nodename != NULL) { + /* copy nodename to canonname if specified */ + ai->ai_canonname = ((char*)ai + sizeof(struct addrinfo) + sizeof(struct sockaddr_storage)); + MEMCPY(ai->ai_canonname, nodename, namelen); + ai->ai_canonname[namelen] = 0; + } + ai->ai_addrlen = sizeof(struct sockaddr_storage); + ai->ai_addr = (struct sockaddr*)sa; + + *res = ai; + + return 0; +} + +#endif /* LWIP_DNS && LWIP_SOCKET */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netifapi.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netifapi.c index fef05a3..aac0975 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netifapi.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/netifapi.c @@ -1,221 +1,221 @@ -/** - * @file - * Network Interface Sequential API module - * - * @defgroup netifapi NETIF API - * @ingroup sequential_api - * Thread-safe functions to be called from non-TCPIP threads - * - * @defgroup netifapi_netif NETIF related - * @ingroup netifapi - * To be called from non-TCPIP threads - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "lwip/opt.h" - -#if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/netifapi.h" -#include "lwip/memp.h" -#include "lwip/priv/tcpip_priv.h" - -#define NETIFAPI_VAR_REF(name) API_VAR_REF(name) -#define NETIFAPI_VAR_DECLARE(name) API_VAR_DECLARE(struct netifapi_msg, name) -#define NETIFAPI_VAR_ALLOC(name) API_VAR_ALLOC(struct netifapi_msg, MEMP_NETIFAPI_MSG, name, ERR_MEM) -#define NETIFAPI_VAR_FREE(name) API_VAR_FREE(MEMP_NETIFAPI_MSG, name) - -/** - * Call netif_add() inside the tcpip_thread context. - */ -static err_t -netifapi_do_netif_add(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct netifapi_msg */ - struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; - - if (!netif_add( msg->netif, -#if LWIP_IPV4 - API_EXPR_REF(msg->msg.add.ipaddr), - API_EXPR_REF(msg->msg.add.netmask), - API_EXPR_REF(msg->msg.add.gw), -#endif /* LWIP_IPV4 */ - msg->msg.add.state, - msg->msg.add.init, - msg->msg.add.input)) { - return ERR_IF; - } else { - return ERR_OK; - } -} - -#if LWIP_IPV4 -/** - * Call netif_set_addr() inside the tcpip_thread context. - */ -static err_t -netifapi_do_netif_set_addr(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct netifapi_msg */ - struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; - - netif_set_addr( msg->netif, - API_EXPR_REF(msg->msg.add.ipaddr), - API_EXPR_REF(msg->msg.add.netmask), - API_EXPR_REF(msg->msg.add.gw)); - return ERR_OK; -} -#endif /* LWIP_IPV4 */ - -/** - * Call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) inside the - * tcpip_thread context. - */ -static err_t -netifapi_do_netif_common(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct netifapi_msg */ - struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; - - if (msg->msg.common.errtfunc != NULL) { - return msg->msg.common.errtfunc(msg->netif); - } else { - msg->msg.common.voidfunc(msg->netif); - return ERR_OK; - } -} - -/** - * @ingroup netifapi_netif - * Call netif_add() in a thread-safe way by running that function inside the - * tcpip_thread context. - * - * @note for params @see netif_add() - */ -err_t -netifapi_netif_add(struct netif *netif, -#if LWIP_IPV4 - const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, -#endif /* LWIP_IPV4 */ - void *state, netif_init_fn init, netif_input_fn input) -{ - err_t err; - NETIFAPI_VAR_DECLARE(msg); - NETIFAPI_VAR_ALLOC(msg); - -#if LWIP_IPV4 - if (ipaddr == NULL) { - ipaddr = IP4_ADDR_ANY4; - } - if (netmask == NULL) { - netmask = IP4_ADDR_ANY4; - } - if (gw == NULL) { - gw = IP4_ADDR_ANY4; - } -#endif /* LWIP_IPV4 */ - - NETIFAPI_VAR_REF(msg).netif = netif; -#if LWIP_IPV4 - NETIFAPI_VAR_REF(msg).msg.add.ipaddr = NETIFAPI_VAR_REF(ipaddr); - NETIFAPI_VAR_REF(msg).msg.add.netmask = NETIFAPI_VAR_REF(netmask); - NETIFAPI_VAR_REF(msg).msg.add.gw = NETIFAPI_VAR_REF(gw); -#endif /* LWIP_IPV4 */ - NETIFAPI_VAR_REF(msg).msg.add.state = state; - NETIFAPI_VAR_REF(msg).msg.add.init = init; - NETIFAPI_VAR_REF(msg).msg.add.input = input; - err = tcpip_api_call(netifapi_do_netif_add, &API_VAR_REF(msg).call); - NETIFAPI_VAR_FREE(msg); - return err; -} - -#if LWIP_IPV4 -/** - * @ingroup netifapi_netif - * Call netif_set_addr() in a thread-safe way by running that function inside the - * tcpip_thread context. - * - * @note for params @see netif_set_addr() - */ -err_t -netifapi_netif_set_addr(struct netif *netif, - const ip4_addr_t *ipaddr, - const ip4_addr_t *netmask, - const ip4_addr_t *gw) -{ - err_t err; - NETIFAPI_VAR_DECLARE(msg); - NETIFAPI_VAR_ALLOC(msg); - - if (ipaddr == NULL) { - ipaddr = IP4_ADDR_ANY4; - } - if (netmask == NULL) { - netmask = IP4_ADDR_ANY4; - } - if (gw == NULL) { - gw = IP4_ADDR_ANY4; - } - - NETIFAPI_VAR_REF(msg).netif = netif; - NETIFAPI_VAR_REF(msg).msg.add.ipaddr = NETIFAPI_VAR_REF(ipaddr); - NETIFAPI_VAR_REF(msg).msg.add.netmask = NETIFAPI_VAR_REF(netmask); - NETIFAPI_VAR_REF(msg).msg.add.gw = NETIFAPI_VAR_REF(gw); - err = tcpip_api_call(netifapi_do_netif_set_addr, &API_VAR_REF(msg).call); - NETIFAPI_VAR_FREE(msg); - return err; -} -#endif /* LWIP_IPV4 */ - -/** - * call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) in a thread-safe - * way by running that function inside the tcpip_thread context. - * - * @note use only for functions where there is only "netif" parameter. - */ -err_t -netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, - netifapi_errt_fn errtfunc) -{ - err_t err; - NETIFAPI_VAR_DECLARE(msg); - NETIFAPI_VAR_ALLOC(msg); - - NETIFAPI_VAR_REF(msg).netif = netif; - NETIFAPI_VAR_REF(msg).msg.common.voidfunc = voidfunc; - NETIFAPI_VAR_REF(msg).msg.common.errtfunc = errtfunc; - err = tcpip_api_call(netifapi_do_netif_common, &API_VAR_REF(msg).call); - NETIFAPI_VAR_FREE(msg); - return err; -} - -#endif /* LWIP_NETIF_API */ +/** + * @file + * Network Interface Sequential API module + * + * @defgroup netifapi NETIF API + * @ingroup sequential_api + * Thread-safe functions to be called from non-TCPIP threads + * + * @defgroup netifapi_netif NETIF related + * @ingroup netifapi + * To be called from non-TCPIP threads + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/opt.h" + +#if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/netifapi.h" +#include "lwip/memp.h" +#include "lwip/priv/tcpip_priv.h" + +#define NETIFAPI_VAR_REF(name) API_VAR_REF(name) +#define NETIFAPI_VAR_DECLARE(name) API_VAR_DECLARE(struct netifapi_msg, name) +#define NETIFAPI_VAR_ALLOC(name) API_VAR_ALLOC(struct netifapi_msg, MEMP_NETIFAPI_MSG, name, ERR_MEM) +#define NETIFAPI_VAR_FREE(name) API_VAR_FREE(MEMP_NETIFAPI_MSG, name) + +/** + * Call netif_add() inside the tcpip_thread context. + */ +static err_t +netifapi_do_netif_add(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct netifapi_msg */ + struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; + + if (!netif_add( msg->netif, +#if LWIP_IPV4 + API_EXPR_REF(msg->msg.add.ipaddr), + API_EXPR_REF(msg->msg.add.netmask), + API_EXPR_REF(msg->msg.add.gw), +#endif /* LWIP_IPV4 */ + msg->msg.add.state, + msg->msg.add.init, + msg->msg.add.input)) { + return ERR_IF; + } else { + return ERR_OK; + } +} + +#if LWIP_IPV4 +/** + * Call netif_set_addr() inside the tcpip_thread context. + */ +static err_t +netifapi_do_netif_set_addr(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct netifapi_msg */ + struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; + + netif_set_addr( msg->netif, + API_EXPR_REF(msg->msg.add.ipaddr), + API_EXPR_REF(msg->msg.add.netmask), + API_EXPR_REF(msg->msg.add.gw)); + return ERR_OK; +} +#endif /* LWIP_IPV4 */ + +/** + * Call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) inside the + * tcpip_thread context. + */ +static err_t +netifapi_do_netif_common(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct netifapi_msg */ + struct netifapi_msg *msg = (struct netifapi_msg*)(void*)m; + + if (msg->msg.common.errtfunc != NULL) { + return msg->msg.common.errtfunc(msg->netif); + } else { + msg->msg.common.voidfunc(msg->netif); + return ERR_OK; + } +} + +/** + * @ingroup netifapi_netif + * Call netif_add() in a thread-safe way by running that function inside the + * tcpip_thread context. + * + * @note for params @see netif_add() + */ +err_t +netifapi_netif_add(struct netif *netif, +#if LWIP_IPV4 + const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, +#endif /* LWIP_IPV4 */ + void *state, netif_init_fn init, netif_input_fn input) +{ + err_t err; + NETIFAPI_VAR_DECLARE(msg); + NETIFAPI_VAR_ALLOC(msg); + +#if LWIP_IPV4 + if (ipaddr == NULL) { + ipaddr = IP4_ADDR_ANY4; + } + if (netmask == NULL) { + netmask = IP4_ADDR_ANY4; + } + if (gw == NULL) { + gw = IP4_ADDR_ANY4; + } +#endif /* LWIP_IPV4 */ + + NETIFAPI_VAR_REF(msg).netif = netif; +#if LWIP_IPV4 + NETIFAPI_VAR_REF(msg).msg.add.ipaddr = NETIFAPI_VAR_REF(ipaddr); + NETIFAPI_VAR_REF(msg).msg.add.netmask = NETIFAPI_VAR_REF(netmask); + NETIFAPI_VAR_REF(msg).msg.add.gw = NETIFAPI_VAR_REF(gw); +#endif /* LWIP_IPV4 */ + NETIFAPI_VAR_REF(msg).msg.add.state = state; + NETIFAPI_VAR_REF(msg).msg.add.init = init; + NETIFAPI_VAR_REF(msg).msg.add.input = input; + err = tcpip_api_call(netifapi_do_netif_add, &API_VAR_REF(msg).call); + NETIFAPI_VAR_FREE(msg); + return err; +} + +#if LWIP_IPV4 +/** + * @ingroup netifapi_netif + * Call netif_set_addr() in a thread-safe way by running that function inside the + * tcpip_thread context. + * + * @note for params @see netif_set_addr() + */ +err_t +netifapi_netif_set_addr(struct netif *netif, + const ip4_addr_t *ipaddr, + const ip4_addr_t *netmask, + const ip4_addr_t *gw) +{ + err_t err; + NETIFAPI_VAR_DECLARE(msg); + NETIFAPI_VAR_ALLOC(msg); + + if (ipaddr == NULL) { + ipaddr = IP4_ADDR_ANY4; + } + if (netmask == NULL) { + netmask = IP4_ADDR_ANY4; + } + if (gw == NULL) { + gw = IP4_ADDR_ANY4; + } + + NETIFAPI_VAR_REF(msg).netif = netif; + NETIFAPI_VAR_REF(msg).msg.add.ipaddr = NETIFAPI_VAR_REF(ipaddr); + NETIFAPI_VAR_REF(msg).msg.add.netmask = NETIFAPI_VAR_REF(netmask); + NETIFAPI_VAR_REF(msg).msg.add.gw = NETIFAPI_VAR_REF(gw); + err = tcpip_api_call(netifapi_do_netif_set_addr, &API_VAR_REF(msg).call); + NETIFAPI_VAR_FREE(msg); + return err; +} +#endif /* LWIP_IPV4 */ + +/** + * call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) in a thread-safe + * way by running that function inside the tcpip_thread context. + * + * @note use only for functions where there is only "netif" parameter. + */ +err_t +netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, + netifapi_errt_fn errtfunc) +{ + err_t err; + NETIFAPI_VAR_DECLARE(msg); + NETIFAPI_VAR_ALLOC(msg); + + NETIFAPI_VAR_REF(msg).netif = netif; + NETIFAPI_VAR_REF(msg).msg.common.voidfunc = voidfunc; + NETIFAPI_VAR_REF(msg).msg.common.errtfunc = errtfunc; + err = tcpip_api_call(netifapi_do_netif_common, &API_VAR_REF(msg).call); + NETIFAPI_VAR_FREE(msg); + return err; +} + +#endif /* LWIP_NETIF_API */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/sockets.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/sockets.c index b763248..d72724f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/sockets.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/sockets.c @@ -1,2827 +1,2827 @@ -/** - * @file - * Sockets BSD-Like API module - * - * @defgroup socket Socket API - * @ingroup sequential_api - * BSD-style socket API.\n - * Thread-safe, to be called from non-TCPIP threads only.\n - * Can be activated by defining @ref LWIP_SOCKET to 1.\n - * Header is in posix/sys/socket.h\b - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - * Improved by Marc Boucher and David Haas - * - */ - -#include "lwip/opt.h" - -#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/sockets.h" -#include "lwip/api.h" -#include "lwip/sys.h" -#include "lwip/igmp.h" -#include "lwip/inet.h" -#include "lwip/tcp.h" -#include "lwip/raw.h" -#include "lwip/udp.h" -#include "lwip/memp.h" -#include "lwip/pbuf.h" -#include "lwip/priv/tcpip_priv.h" -#if LWIP_CHECKSUM_ON_COPY -#include "lwip/inet_chksum.h" -#endif - -#include - -/* If the netconn API is not required publicly, then we include the necessary - files here to get the implementation */ -#if !LWIP_NETCONN -#undef LWIP_NETCONN -#define LWIP_NETCONN 1 -#include "api_msg.c" -#include "api_lib.c" -#include "netbuf.c" -#undef LWIP_NETCONN -#define LWIP_NETCONN 0 -#endif - -#if LWIP_IPV4 -#define IP4ADDR_PORT_TO_SOCKADDR(sin, ipaddr, port) do { \ - (sin)->sin_len = sizeof(struct sockaddr_in); \ - (sin)->sin_family = AF_INET; \ - (sin)->sin_port = lwip_htons((port)); \ - inet_addr_from_ip4addr(&(sin)->sin_addr, ipaddr); \ - memset((sin)->sin_zero, 0, SIN_ZERO_LEN); }while(0) -#define SOCKADDR4_TO_IP4ADDR_PORT(sin, ipaddr, port) do { \ - inet_addr_to_ip4addr(ip_2_ip4(ipaddr), &((sin)->sin_addr)); \ - (port) = lwip_ntohs((sin)->sin_port); }while(0) -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -#define IP6ADDR_PORT_TO_SOCKADDR(sin6, ipaddr, port) do { \ - (sin6)->sin6_len = sizeof(struct sockaddr_in6); \ - (sin6)->sin6_family = AF_INET6; \ - (sin6)->sin6_port = lwip_htons((port)); \ - (sin6)->sin6_flowinfo = 0; \ - inet6_addr_from_ip6addr(&(sin6)->sin6_addr, ipaddr); \ - (sin6)->sin6_scope_id = 0; }while(0) -#define SOCKADDR6_TO_IP6ADDR_PORT(sin6, ipaddr, port) do { \ - inet6_addr_to_ip6addr(ip_2_ip6(ipaddr), &((sin6)->sin6_addr)); \ - (port) = lwip_ntohs((sin6)->sin6_port); }while(0) -#endif /* LWIP_IPV6 */ - -#if LWIP_IPV4 && LWIP_IPV6 -static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ipaddr, u16_t* port); - -#define IS_SOCK_ADDR_LEN_VALID(namelen) (((namelen) == sizeof(struct sockaddr_in)) || \ - ((namelen) == sizeof(struct sockaddr_in6))) -#define IS_SOCK_ADDR_TYPE_VALID(name) (((name)->sa_family == AF_INET) || \ - ((name)->sa_family == AF_INET6)) -#define SOCK_ADDR_TYPE_MATCH(name, sock) \ - ((((name)->sa_family == AF_INET) && !(NETCONNTYPE_ISIPV6((sock)->conn->type))) || \ - (((name)->sa_family == AF_INET6) && (NETCONNTYPE_ISIPV6((sock)->conn->type)))) -#define IPADDR_PORT_TO_SOCKADDR(sockaddr, ipaddr, port) do { \ - if (IP_IS_V6(ipaddr)) { \ - IP6ADDR_PORT_TO_SOCKADDR((struct sockaddr_in6*)(void*)(sockaddr), ip_2_ip6(ipaddr), port); \ - } else { \ - IP4ADDR_PORT_TO_SOCKADDR((struct sockaddr_in*)(void*)(sockaddr), ip_2_ip4(ipaddr), port); \ - } } while(0) -#define SOCKADDR_TO_IPADDR_PORT(sockaddr, ipaddr, port) sockaddr_to_ipaddr_port(sockaddr, ipaddr, &(port)) -#define DOMAIN_TO_NETCONN_TYPE(domain, type) (((domain) == AF_INET) ? \ - (type) : (enum netconn_type)((type) | NETCONN_TYPE_IPV6)) -#elif LWIP_IPV6 /* LWIP_IPV4 && LWIP_IPV6 */ -#define IS_SOCK_ADDR_LEN_VALID(namelen) ((namelen) == sizeof(struct sockaddr_in6)) -#define IS_SOCK_ADDR_TYPE_VALID(name) ((name)->sa_family == AF_INET6) -#define SOCK_ADDR_TYPE_MATCH(name, sock) 1 -#define IPADDR_PORT_TO_SOCKADDR(sockaddr, ipaddr, port) \ - IP6ADDR_PORT_TO_SOCKADDR((struct sockaddr_in6*)(void*)(sockaddr), ip_2_ip6(ipaddr), port) -#define SOCKADDR_TO_IPADDR_PORT(sockaddr, ipaddr, port) \ - SOCKADDR6_TO_IP6ADDR_PORT((const struct sockaddr_in6*)(const void*)(sockaddr), ipaddr, port) -#define DOMAIN_TO_NETCONN_TYPE(domain, netconn_type) (netconn_type) -#else /*-> LWIP_IPV4: LWIP_IPV4 && LWIP_IPV6 */ -#define IS_SOCK_ADDR_LEN_VALID(namelen) ((namelen) == sizeof(struct sockaddr_in)) -#define IS_SOCK_ADDR_TYPE_VALID(name) ((name)->sa_family == AF_INET) -#define SOCK_ADDR_TYPE_MATCH(name, sock) 1 -#define IPADDR_PORT_TO_SOCKADDR(sockaddr, ipaddr, port) \ - IP4ADDR_PORT_TO_SOCKADDR((struct sockaddr_in*)(void*)(sockaddr), ip_2_ip4(ipaddr), port) -#define SOCKADDR_TO_IPADDR_PORT(sockaddr, ipaddr, port) \ - SOCKADDR4_TO_IP4ADDR_PORT((const struct sockaddr_in*)(const void*)(sockaddr), ipaddr, port) -#define DOMAIN_TO_NETCONN_TYPE(domain, netconn_type) (netconn_type) -#endif /* LWIP_IPV6 */ - -#define IS_SOCK_ADDR_TYPE_VALID_OR_UNSPEC(name) (((name)->sa_family == AF_UNSPEC) || \ - IS_SOCK_ADDR_TYPE_VALID(name)) -#define SOCK_ADDR_TYPE_MATCH_OR_UNSPEC(name, sock) (((name)->sa_family == AF_UNSPEC) || \ - SOCK_ADDR_TYPE_MATCH(name, sock)) -#define IS_SOCK_ADDR_ALIGNED(name) ((((mem_ptr_t)(name)) % 4) == 0) - - -#define LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype) do { if ((optlen) < sizeof(opttype)) { return EINVAL; }}while(0) -#define LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, opttype) do { \ - LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype); \ - if ((sock)->conn == NULL) { return EINVAL; } }while(0) -#define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype) do { \ - LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype); \ - if (((sock)->conn == NULL) || ((sock)->conn->pcb.tcp == NULL)) { return EINVAL; } }while(0) -#define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, opttype, netconntype) do { \ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype); \ - if (NETCONNTYPE_GROUP(netconn_type((sock)->conn)) != netconntype) { return ENOPROTOOPT; } }while(0) - - -#define LWIP_SETGETSOCKOPT_DATA_VAR_REF(name) API_VAR_REF(name) -#define LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(name) API_VAR_DECLARE(struct lwip_setgetsockopt_data, name) -#define LWIP_SETGETSOCKOPT_DATA_VAR_FREE(name) API_VAR_FREE(MEMP_SOCKET_SETGETSOCKOPT_DATA, name) -#if LWIP_MPU_COMPATIBLE -#define LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(name, sock) do { \ - name = (struct lwip_setgetsockopt_data *)memp_malloc(MEMP_SOCKET_SETGETSOCKOPT_DATA); \ - if (name == NULL) { \ - sock_set_errno(sock, ENOMEM); \ - return -1; \ - } }while(0) -#else /* LWIP_MPU_COMPATIBLE */ -#define LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(name, sock) -#endif /* LWIP_MPU_COMPATIBLE */ - -#if LWIP_SO_SNDRCVTIMEO_NONSTANDARD -#define LWIP_SO_SNDRCVTIMEO_OPTTYPE int -#define LWIP_SO_SNDRCVTIMEO_SET(optval, val) (*(int *)(optval) = (val)) -#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((s32_t)*(const int*)(optval)) -#else -#define LWIP_SO_SNDRCVTIMEO_OPTTYPE struct timeval -#define LWIP_SO_SNDRCVTIMEO_SET(optval, val) do { \ - s32_t loc = (val); \ - ((struct timeval *)(optval))->tv_sec = (loc) / 1000U; \ - ((struct timeval *)(optval))->tv_usec = ((loc) % 1000U) * 1000U; }while(0) -#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((((const struct timeval *)(optval))->tv_sec * 1000U) + (((const struct timeval *)(optval))->tv_usec / 1000U)) -#endif - -#define NUM_SOCKETS MEMP_NUM_NETCONN - -/** This is overridable for the rare case where more than 255 threads - * select on the same socket... - */ -#ifndef SELWAIT_T -#define SELWAIT_T u8_t -#endif - -/** Contains all internal pointers and states used for a socket */ -struct lwip_sock { - /** sockets currently are built on netconns, each socket has one netconn */ - struct netconn *conn; - /** data that was left from the previous read */ - void *lastdata; - /** offset in the data that was left from the previous read */ - u16_t lastoffset; - /** number of times data was received, set by event_callback(), - tested by the receive and select functions */ - s16_t rcvevent; - /** number of times data was ACKed (free send buffer), set by event_callback(), - tested by select */ - u16_t sendevent; - /** error happened for this socket, set by event_callback(), tested by select */ - u16_t errevent; - /** last error that occurred on this socket (in fact, all our errnos fit into an u8_t) */ - u8_t err; - /** counter of how many threads are waiting for this socket using select */ - SELWAIT_T select_waiting; -}; - -#if LWIP_NETCONN_SEM_PER_THREAD -#define SELECT_SEM_T sys_sem_t* -#define SELECT_SEM_PTR(sem) (sem) -#else /* LWIP_NETCONN_SEM_PER_THREAD */ -#define SELECT_SEM_T sys_sem_t -#define SELECT_SEM_PTR(sem) (&(sem)) -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - -/** Description for a task waiting in select */ -struct lwip_select_cb { - /** Pointer to the next waiting task */ - struct lwip_select_cb *next; - /** Pointer to the previous waiting task */ - struct lwip_select_cb *prev; - /** readset passed to select */ - fd_set *readset; - /** writeset passed to select */ - fd_set *writeset; - /** unimplemented: exceptset passed to select */ - fd_set *exceptset; - /** don't signal the same semaphore twice: set to 1 when signalled */ - int sem_signalled; - /** semaphore to wake up a task waiting for select */ - SELECT_SEM_T sem; -}; - -/** A struct sockaddr replacement that has the same alignment as sockaddr_in/ - * sockaddr_in6 if instantiated. - */ -union sockaddr_aligned { - struct sockaddr sa; -#if LWIP_IPV6 - struct sockaddr_in6 sin6; -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - struct sockaddr_in sin; -#endif /* LWIP_IPV4 */ -}; - -#if LWIP_IGMP -/* Define the number of IPv4 multicast memberships, default is one per socket */ -#ifndef LWIP_SOCKET_MAX_MEMBERSHIPS -#define LWIP_SOCKET_MAX_MEMBERSHIPS NUM_SOCKETS -#endif - -/* This is to keep track of IP_ADD_MEMBERSHIP calls to drop the membership when - a socket is closed */ -struct lwip_socket_multicast_pair { - /** the socket */ - struct lwip_sock* sock; - /** the interface address */ - ip4_addr_t if_addr; - /** the group address */ - ip4_addr_t multi_addr; -}; - -struct lwip_socket_multicast_pair socket_ipv4_multicast_memberships[LWIP_SOCKET_MAX_MEMBERSHIPS]; - -static int lwip_socket_register_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr); -static void lwip_socket_unregister_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr); -static void lwip_socket_drop_registered_memberships(int s); -#endif /* LWIP_IGMP */ - -/** The global array of available sockets */ -static struct lwip_sock sockets[NUM_SOCKETS]; -/** The global list of tasks waiting for select */ -static struct lwip_select_cb *select_cb_list; -/** This counter is increased from lwip_select when the list is changed - and checked in event_callback to see if it has changed. */ -static volatile int select_cb_ctr; - -#if LWIP_SOCKET_SET_ERRNO -#ifndef set_errno -#define set_errno(err) do { if (err) { errno = (err); } } while(0) -#endif -#else /* LWIP_SOCKET_SET_ERRNO */ -#define set_errno(err) -#endif /* LWIP_SOCKET_SET_ERRNO */ - -#define sock_set_errno(sk, e) do { \ - const int sockerr = (e); \ - sk->err = (u8_t)sockerr; \ - set_errno(sockerr); \ -} while (0) - -/* Forward declaration of some functions */ -static void event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len); -#if !LWIP_TCPIP_CORE_LOCKING -static void lwip_getsockopt_callback(void *arg); -static void lwip_setsockopt_callback(void *arg); -#endif -static u8_t lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen); -static u8_t lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen); - -#if LWIP_IPV4 && LWIP_IPV6 -static void -sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ipaddr, u16_t* port) -{ - if ((sockaddr->sa_family) == AF_INET6) { - SOCKADDR6_TO_IP6ADDR_PORT((const struct sockaddr_in6*)(const void*)(sockaddr), ipaddr, *port); - ipaddr->type = IPADDR_TYPE_V6; - } else { - SOCKADDR4_TO_IP4ADDR_PORT((const struct sockaddr_in*)(const void*)(sockaddr), ipaddr, *port); - ipaddr->type = IPADDR_TYPE_V4; - } -} -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - -/** LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore */ -void -lwip_socket_thread_init(void) -{ - netconn_thread_init(); -} - -/** LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore */ -void -lwip_socket_thread_cleanup(void) -{ - netconn_thread_cleanup(); -} - -/** - * Map a externally used socket index to the internal socket representation. - * - * @param s externally used socket index - * @return struct lwip_sock for the socket or NULL if not found - */ -static struct lwip_sock * -get_socket(int s) -{ - struct lwip_sock *sock; - - s -= LWIP_SOCKET_OFFSET; - - if ((s < 0) || (s >= NUM_SOCKETS)) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", s + LWIP_SOCKET_OFFSET)); - set_errno(EBADF); - return NULL; - } - - sock = &sockets[s]; - - if (!sock->conn) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): not active\n", s + LWIP_SOCKET_OFFSET)); - set_errno(EBADF); - return NULL; - } - - return sock; -} - -/** - * Same as get_socket but doesn't set errno - * - * @param s externally used socket index - * @return struct lwip_sock for the socket or NULL if not found - */ -static struct lwip_sock * -tryget_socket(int s) -{ - s -= LWIP_SOCKET_OFFSET; - if ((s < 0) || (s >= NUM_SOCKETS)) { - return NULL; - } - if (!sockets[s].conn) { - return NULL; - } - return &sockets[s]; -} - -/** - * Allocate a new socket for a given netconn. - * - * @param newconn the netconn for which to allocate a socket - * @param accepted 1 if socket has been created by accept(), - * 0 if socket has been created by socket() - * @return the index of the new socket; -1 on error - */ -static int -alloc_socket(struct netconn *newconn, int accepted) -{ - int i; - SYS_ARCH_DECL_PROTECT(lev); - - /* allocate a new socket identifier */ - for (i = 0; i < NUM_SOCKETS; ++i) { - /* Protect socket array */ - SYS_ARCH_PROTECT(lev); - if (!sockets[i].conn && (sockets[i].select_waiting == 0)) { - sockets[i].conn = newconn; - /* The socket is not yet known to anyone, so no need to protect - after having marked it as used. */ - SYS_ARCH_UNPROTECT(lev); - sockets[i].lastdata = NULL; - sockets[i].lastoffset = 0; - sockets[i].rcvevent = 0; - /* TCP sendbuf is empty, but the socket is not yet writable until connected - * (unless it has been created by accept()). */ - sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1); - sockets[i].errevent = 0; - sockets[i].err = 0; - return i + LWIP_SOCKET_OFFSET; - } - SYS_ARCH_UNPROTECT(lev); - } - return -1; -} - -/** Free a socket. The socket's netconn must have been - * delete before! - * - * @param sock the socket to free - * @param is_tcp != 0 for TCP sockets, used to free lastdata - */ -static void -free_socket(struct lwip_sock *sock, int is_tcp) -{ - void *lastdata; - - lastdata = sock->lastdata; - sock->lastdata = NULL; - sock->lastoffset = 0; - sock->err = 0; - - /* Protect socket array */ - SYS_ARCH_SET(sock->conn, NULL); - /* don't use 'sock' after this line, as another task might have allocated it */ - - if (lastdata != NULL) { - if (is_tcp) { - pbuf_free((struct pbuf *)lastdata); - } else { - netbuf_delete((struct netbuf *)lastdata); - } - } -} - -/* Below this, the well-known socket functions are implemented. - * Use google.com or opengroup.org to get a good description :-) - * - * Exceptions are documented! - */ - -int -lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) -{ - struct lwip_sock *sock, *nsock; - struct netconn *newconn; - ip_addr_t naddr; - u16_t port = 0; - int newsock; - err_t err; - SYS_ARCH_DECL_PROTECT(lev); - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d)...\n", s)); - sock = get_socket(s); - if (!sock) { - return -1; - } - - if (netconn_is_nonblocking(sock->conn) && (sock->rcvevent <= 0)) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): returning EWOULDBLOCK\n", s)); - set_errno(EWOULDBLOCK); - return -1; - } - - /* wait for a new connection */ - err = netconn_accept(sock->conn, &newconn); - if (err != ERR_OK) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_acept failed, err=%d\n", s, err)); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { - sock_set_errno(sock, EOPNOTSUPP); - } else if (err == ERR_CLSD) { - sock_set_errno(sock, EINVAL); - } else { - sock_set_errno(sock, err_to_errno(err)); - } - return -1; - } - LWIP_ASSERT("newconn != NULL", newconn != NULL); - - newsock = alloc_socket(newconn, 1); - if (newsock == -1) { - netconn_delete(newconn); - sock_set_errno(sock, ENFILE); - return -1; - } - LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LWIP_SOCKET_OFFSET)); - LWIP_ASSERT("newconn->callback == event_callback", newconn->callback == event_callback); - nsock = &sockets[newsock - LWIP_SOCKET_OFFSET]; - - /* See event_callback: If data comes in right away after an accept, even - * though the server task might not have created a new socket yet. - * In that case, newconn->socket is counted down (newconn->socket--), - * so nsock->rcvevent is >= 1 here! - */ - SYS_ARCH_PROTECT(lev); - nsock->rcvevent += (s16_t)(-1 - newconn->socket); - newconn->socket = newsock; - SYS_ARCH_UNPROTECT(lev); - - /* Note that POSIX only requires us to check addr is non-NULL. addrlen must - * not be NULL if addr is valid. - */ - if (addr != NULL) { - union sockaddr_aligned tempaddr; - /* get the IP address and port of the remote host */ - err = netconn_peer(newconn, &naddr, &port); - if (err != ERR_OK) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_peer failed, err=%d\n", s, err)); - netconn_delete(newconn); - free_socket(nsock, 1); - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - LWIP_ASSERT("addr valid but addrlen NULL", addrlen != NULL); - - IPADDR_PORT_TO_SOCKADDR(&tempaddr, &naddr, port); - if (*addrlen > tempaddr.sa.sa_len) { - *addrlen = tempaddr.sa.sa_len; - } - MEMCPY(addr, &tempaddr, *addrlen); - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d) returning new sock=%d addr=", s, newsock)); - ip_addr_debug_print_val(SOCKETS_DEBUG, naddr); - LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F"\n", port)); - } else { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d) returning new sock=%d", s, newsock)); - } - - sock_set_errno(sock, 0); - return newsock; -} - -int -lwip_bind(int s, const struct sockaddr *name, socklen_t namelen) -{ - struct lwip_sock *sock; - ip_addr_t local_addr; - u16_t local_port; - err_t err; - - sock = get_socket(s); - if (!sock) { - return -1; - } - - if (!SOCK_ADDR_TYPE_MATCH(name, sock)) { - /* sockaddr does not match socket type (IPv4/IPv6) */ - sock_set_errno(sock, err_to_errno(ERR_VAL)); - return -1; - } - - /* check size, family and alignment of 'name' */ - LWIP_ERROR("lwip_bind: invalid address", (IS_SOCK_ADDR_LEN_VALID(namelen) && - IS_SOCK_ADDR_TYPE_VALID(name) && IS_SOCK_ADDR_ALIGNED(name)), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); - LWIP_UNUSED_ARG(namelen); - - SOCKADDR_TO_IPADDR_PORT(name, &local_addr, local_port); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d, addr=", s)); - ip_addr_debug_print_val(SOCKETS_DEBUG, local_addr); - LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F")\n", local_port)); - -#if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ - if (IP_IS_V6_VAL(local_addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&local_addr))) { - unmap_ipv4_mapped_ipv6(ip_2_ip4(&local_addr), ip_2_ip6(&local_addr)); - IP_SET_TYPE_VAL(local_addr, IPADDR_TYPE_V4); - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - err = netconn_bind(sock->conn, &local_addr, local_port); - - if (err != ERR_OK) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) failed, err=%d\n", s, err)); - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) succeeded\n", s)); - sock_set_errno(sock, 0); - return 0; -} - -int -lwip_close(int s) -{ - struct lwip_sock *sock; - int is_tcp = 0; - err_t err; - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_close(%d)\n", s)); - - sock = get_socket(s); - if (!sock) { - return -1; - } - - if (sock->conn != NULL) { - is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP; - } else { - LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata == NULL); - } - -#if LWIP_IGMP - /* drop all possibly joined IGMP memberships */ - lwip_socket_drop_registered_memberships(s); -#endif /* LWIP_IGMP */ - - err = netconn_delete(sock->conn); - if (err != ERR_OK) { - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - - free_socket(sock, is_tcp); - set_errno(0); - return 0; -} - -int -lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) -{ - struct lwip_sock *sock; - err_t err; - - sock = get_socket(s); - if (!sock) { - return -1; - } - - if (!SOCK_ADDR_TYPE_MATCH_OR_UNSPEC(name, sock)) { - /* sockaddr does not match socket type (IPv4/IPv6) */ - sock_set_errno(sock, err_to_errno(ERR_VAL)); - return -1; - } - - LWIP_UNUSED_ARG(namelen); - if (name->sa_family == AF_UNSPEC) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, AF_UNSPEC)\n", s)); - err = netconn_disconnect(sock->conn); - } else { - ip_addr_t remote_addr; - u16_t remote_port; - - /* check size, family and alignment of 'name' */ - LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) && - IS_SOCK_ADDR_TYPE_VALID_OR_UNSPEC(name) && IS_SOCK_ADDR_ALIGNED(name), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); - - SOCKADDR_TO_IPADDR_PORT(name, &remote_addr, remote_port); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, addr=", s)); - ip_addr_debug_print_val(SOCKETS_DEBUG, remote_addr); - LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F")\n", remote_port)); - -#if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ - if (IP_IS_V6_VAL(remote_addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&remote_addr))) { - unmap_ipv4_mapped_ipv6(ip_2_ip4(&remote_addr), ip_2_ip6(&remote_addr)); - IP_SET_TYPE_VAL(remote_addr, IPADDR_TYPE_V4); - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - err = netconn_connect(sock->conn, &remote_addr, remote_port); - } - - if (err != ERR_OK) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) failed, err=%d\n", s, err)); - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) succeeded\n", s)); - sock_set_errno(sock, 0); - return 0; -} - -/** - * Set a socket into listen mode. - * The socket may not have been used for another connection previously. - * - * @param s the socket to set to listening mode - * @param backlog (ATTENTION: needs TCP_LISTEN_BACKLOG=1) - * @return 0 on success, non-zero on failure - */ -int -lwip_listen(int s, int backlog) -{ - struct lwip_sock *sock; - err_t err; - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d, backlog=%d)\n", s, backlog)); - - sock = get_socket(s); - if (!sock) { - return -1; - } - - /* limit the "backlog" parameter to fit in an u8_t */ - backlog = LWIP_MIN(LWIP_MAX(backlog, 0), 0xff); - - err = netconn_listen_with_backlog(sock->conn, (u8_t)backlog); - - if (err != ERR_OK) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d) failed, err=%d\n", s, err)); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { - sock_set_errno(sock, EOPNOTSUPP); - return -1; - } - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - - sock_set_errno(sock, 0); - return 0; -} - -int -lwip_recvfrom(int s, void *mem, size_t len, int flags, - struct sockaddr *from, socklen_t *fromlen) -{ - struct lwip_sock *sock; - void *buf = NULL; - struct pbuf *p; - u16_t buflen, copylen; - int off = 0; - u8_t done = 0; - err_t err; - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d, %p, %"SZT_F", 0x%x, ..)\n", s, mem, len, flags)); - sock = get_socket(s); - if (!sock) { - return -1; - } - - do { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: top while sock->lastdata=%p\n", sock->lastdata)); - /* Check if there is data left from the last recv operation. */ - if (sock->lastdata) { - buf = sock->lastdata; - } else { - /* If this is non-blocking call, then check first */ - if (((flags & MSG_DONTWAIT) || netconn_is_nonblocking(sock->conn)) && - (sock->rcvevent <= 0)) { - if (off > 0) { - /* already received data, return that */ - sock_set_errno(sock, 0); - return off; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): returning EWOULDBLOCK\n", s)); - set_errno(EWOULDBLOCK); - return -1; - } - - /* No data was left from the previous operation, so we try to get - some from the network. */ - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - err = netconn_recv_tcp_pbuf(sock->conn, (struct pbuf **)&buf); - } else { - err = netconn_recv(sock->conn, (struct netbuf **)&buf); - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: netconn_recv err=%d, netbuf=%p\n", - err, buf)); - - if (err != ERR_OK) { - if (off > 0) { - if (err == ERR_CLSD) { - /* closed but already received data, ensure select gets the FIN, too */ - event_callback(sock->conn, NETCONN_EVT_RCVPLUS, 0); - } - /* already received data, return that */ - sock_set_errno(sock, 0); - return off; - } - /* We should really do some error checking here. */ - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): buf == NULL, error is \"%s\"!\n", - s, lwip_strerr(err))); - sock_set_errno(sock, err_to_errno(err)); - if (err == ERR_CLSD) { - return 0; - } else { - return -1; - } - } - LWIP_ASSERT("buf != NULL", buf != NULL); - sock->lastdata = buf; - } - - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - p = (struct pbuf *)buf; - } else { - p = ((struct netbuf *)buf)->p; - } - buflen = p->tot_len; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: buflen=%"U16_F" len=%"SZT_F" off=%d sock->lastoffset=%"U16_F"\n", - buflen, len, off, sock->lastoffset)); - - buflen -= sock->lastoffset; - - if (len > buflen) { - copylen = buflen; - } else { - copylen = (u16_t)len; - } - - /* copy the contents of the received buffer into - the supplied memory pointer mem */ - pbuf_copy_partial(p, (u8_t*)mem + off, copylen, sock->lastoffset); - - off += copylen; - - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - LWIP_ASSERT("invalid copylen, len would underflow", len >= copylen); - len -= copylen; - if ((len <= 0) || - (p->flags & PBUF_FLAG_PUSH) || - (sock->rcvevent <= 0) || - ((flags & MSG_PEEK) != 0)) { - done = 1; - } - } else { - done = 1; - } - - /* Check to see from where the data was.*/ - if (done) { -#if !SOCKETS_DEBUG - if (from && fromlen) -#endif /* !SOCKETS_DEBUG */ - { - u16_t port; - ip_addr_t tmpaddr; - ip_addr_t *fromaddr; - union sockaddr_aligned saddr; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): addr=", s)); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - fromaddr = &tmpaddr; - netconn_getaddr(sock->conn, fromaddr, &port, 0); - } else { - port = netbuf_fromport((struct netbuf *)buf); - fromaddr = netbuf_fromaddr((struct netbuf *)buf); - } - -#if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: Map IPv4 addresses to IPv4 mapped IPv6 */ - if (NETCONNTYPE_ISIPV6(netconn_type(sock->conn)) && IP_IS_V4(fromaddr)) { - ip4_2_ipv4_mapped_ipv6(ip_2_ip6(fromaddr), ip_2_ip4(fromaddr)); - IP_SET_TYPE(fromaddr, IPADDR_TYPE_V6); - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port); - ip_addr_debug_print(SOCKETS_DEBUG, fromaddr); - LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, off)); -#if SOCKETS_DEBUG - if (from && fromlen) -#endif /* SOCKETS_DEBUG */ - { - if (*fromlen > saddr.sa.sa_len) { - *fromlen = saddr.sa.sa_len; - } - MEMCPY(from, &saddr, *fromlen); - } - } - } - - /* If we don't peek the incoming message... */ - if ((flags & MSG_PEEK) == 0) { - /* If this is a TCP socket, check if there is data left in the - buffer. If so, it should be saved in the sock structure for next - time around. */ - if ((NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) && (buflen - copylen > 0)) { - sock->lastdata = buf; - sock->lastoffset += copylen; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: lastdata now netbuf=%p\n", buf)); - } else { - sock->lastdata = NULL; - sock->lastoffset = 0; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: deleting netbuf=%p\n", buf)); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { - pbuf_free((struct pbuf *)buf); - } else { - netbuf_delete((struct netbuf *)buf); - } - buf = NULL; - } - } - } while (!done); - - sock_set_errno(sock, 0); - return off; -} - -int -lwip_read(int s, void *mem, size_t len) -{ - return lwip_recvfrom(s, mem, len, 0, NULL, NULL); -} - -int -lwip_recv(int s, void *mem, size_t len, int flags) -{ - return lwip_recvfrom(s, mem, len, flags, NULL, NULL); -} - -int -lwip_send(int s, const void *data, size_t size, int flags) -{ - struct lwip_sock *sock; - err_t err; - u8_t write_flags; - size_t written; - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d, data=%p, size=%"SZT_F", flags=0x%x)\n", - s, data, size, flags)); - - sock = get_socket(s); - if (!sock) { - return -1; - } - - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { -#if (LWIP_UDP || LWIP_RAW) - return lwip_sendto(s, data, size, flags, NULL, 0); -#else /* (LWIP_UDP || LWIP_RAW) */ - sock_set_errno(sock, err_to_errno(ERR_ARG)); - return -1; -#endif /* (LWIP_UDP || LWIP_RAW) */ - } - - write_flags = NETCONN_COPY | - ((flags & MSG_MORE) ? NETCONN_MORE : 0) | - ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0); - written = 0; - err = netconn_write_partly(sock->conn, data, size, write_flags, &written); - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d) err=%d written=%"SZT_F"\n", s, err, written)); - sock_set_errno(sock, err_to_errno(err)); - return (err == ERR_OK ? (int)written : -1); -} - -int -lwip_sendmsg(int s, const struct msghdr *msg, int flags) -{ - struct lwip_sock *sock; - int i; -#if LWIP_TCP - u8_t write_flags; - size_t written; -#endif - int size = 0; - err_t err = ERR_OK; - - sock = get_socket(s); - if (!sock) { - return -1; - } - - LWIP_ERROR("lwip_sendmsg: invalid msghdr", msg != NULL, - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); - - LWIP_UNUSED_ARG(msg->msg_control); - LWIP_UNUSED_ARG(msg->msg_controllen); - LWIP_UNUSED_ARG(msg->msg_flags); - LWIP_ERROR("lwip_sendmsg: invalid msghdr iov", (msg->msg_iov != NULL && msg->msg_iovlen != 0), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); - - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { -#if LWIP_TCP - write_flags = NETCONN_COPY | - ((flags & MSG_MORE) ? NETCONN_MORE : 0) | - ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0); - - for (i = 0; i < msg->msg_iovlen; i++) { - u8_t apiflags = write_flags; - if (i + 1 < msg->msg_iovlen) { - apiflags |= NETCONN_MORE; - } - written = 0; - err = netconn_write_partly(sock->conn, msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len, write_flags, &written); - if (err == ERR_OK) { - size += written; - /* check that the entire IO vector was accepected, if not return a partial write */ - if (written != msg->msg_iov[i].iov_len) - break; - } - /* none of this IO vector was accepted, but previous was, return partial write and conceal ERR_WOULDBLOCK */ - else if (err == ERR_WOULDBLOCK && size > 0) { - err = ERR_OK; - /* let ERR_WOULDBLOCK persist on the netconn since we are returning ERR_OK */ - break; - } else { - size = -1; - break; - } - } - sock_set_errno(sock, err_to_errno(err)); - return size; -#else /* LWIP_TCP */ - sock_set_errno(sock, err_to_errno(ERR_ARG)); - return -1; -#endif /* LWIP_TCP */ - } - /* else, UDP and RAW NETCONNs */ -#if LWIP_UDP || LWIP_RAW - { - struct netbuf *chain_buf; - - LWIP_UNUSED_ARG(flags); - LWIP_ERROR("lwip_sendmsg: invalid msghdr name", (((msg->msg_name == NULL) && (msg->msg_namelen == 0)) || - IS_SOCK_ADDR_LEN_VALID(msg->msg_namelen)) , - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); - - /* initialize chain buffer with destination */ - chain_buf = netbuf_new(); - if (!chain_buf) { - sock_set_errno(sock, err_to_errno(ERR_MEM)); - return -1; - } - if (msg->msg_name) { - u16_t remote_port; - SOCKADDR_TO_IPADDR_PORT((const struct sockaddr *)msg->msg_name, &chain_buf->addr, remote_port); - netbuf_fromport(chain_buf) = remote_port; - } -#if LWIP_NETIF_TX_SINGLE_PBUF - for (i = 0; i < msg->msg_iovlen; i++) { - size += msg->msg_iov[i].iov_len; - } - /* Allocate a new netbuf and copy the data into it. */ - if (netbuf_alloc(chain_buf, (u16_t)size) == NULL) { - err = ERR_MEM; - } else { - /* flatten the IO vectors */ - size_t offset = 0; - for (i = 0; i < msg->msg_iovlen; i++) { - MEMCPY(&((u8_t*)chain_buf->p->payload)[offset], msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len); - offset += msg->msg_iov[i].iov_len; - } -#if LWIP_CHECKSUM_ON_COPY - { - /* This can be improved by using LWIP_CHKSUM_COPY() and aggregating the checksum for each IO vector */ - u16_t chksum = ~inet_chksum_pbuf(chain_buf->p); - netbuf_set_chksum(chain_buf, chksum); - } -#endif /* LWIP_CHECKSUM_ON_COPY */ - err = ERR_OK; - } -#else /* LWIP_NETIF_TX_SINGLE_PBUF */ - /* create a chained netbuf from the IO vectors. NOTE: we assemble a pbuf chain - manually to avoid having to allocate, chain, and delete a netbuf for each iov */ - for (i = 0; i < msg->msg_iovlen; i++) { - struct pbuf *p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); - if (p == NULL) { - err = ERR_MEM; /* let netbuf_delete() cleanup chain_buf */ - break; - } - p->payload = msg->msg_iov[i].iov_base; - LWIP_ASSERT("iov_len < u16_t", msg->msg_iov[i].iov_len <= 0xFFFF); - p->len = p->tot_len = (u16_t)msg->msg_iov[i].iov_len; - /* netbuf empty, add new pbuf */ - if (chain_buf->p == NULL) { - chain_buf->p = chain_buf->ptr = p; - /* add pbuf to existing pbuf chain */ - } else { - pbuf_cat(chain_buf->p, p); - } - } - /* save size of total chain */ - if (err == ERR_OK) { - size = netbuf_len(chain_buf); - } -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - - if (err == ERR_OK) { -#if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ - if (IP_IS_V6_VAL(chain_buf->addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&chain_buf->addr))) { - unmap_ipv4_mapped_ipv6(ip_2_ip4(&chain_buf->addr), ip_2_ip6(&chain_buf->addr)); - IP_SET_TYPE_VAL(chain_buf->addr, IPADDR_TYPE_V4); - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - /* send the data */ - err = netconn_send(sock->conn, chain_buf); - } - - /* deallocated the buffer */ - netbuf_delete(chain_buf); - - sock_set_errno(sock, err_to_errno(err)); - return (err == ERR_OK ? size : -1); - } -#else /* LWIP_UDP || LWIP_RAW */ - sock_set_errno(sock, err_to_errno(ERR_ARG)); - return -1; -#endif /* LWIP_UDP || LWIP_RAW */ -} - -int -lwip_sendto(int s, const void *data, size_t size, int flags, - const struct sockaddr *to, socklen_t tolen) -{ - struct lwip_sock *sock; - err_t err; - u16_t short_size; - u16_t remote_port; - struct netbuf buf; - - sock = get_socket(s); - if (!sock) { - return -1; - } - - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { -#if LWIP_TCP - return lwip_send(s, data, size, flags); -#else /* LWIP_TCP */ - LWIP_UNUSED_ARG(flags); - sock_set_errno(sock, err_to_errno(ERR_ARG)); - return -1; -#endif /* LWIP_TCP */ - } - - /* @todo: split into multiple sendto's? */ - LWIP_ASSERT("lwip_sendto: size must fit in u16_t", size <= 0xffff); - short_size = (u16_t)size; - LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || - (IS_SOCK_ADDR_LEN_VALID(tolen) && - IS_SOCK_ADDR_TYPE_VALID(to) && IS_SOCK_ADDR_ALIGNED(to))), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); - LWIP_UNUSED_ARG(tolen); - - /* initialize a buffer */ - buf.p = buf.ptr = NULL; -#if LWIP_CHECKSUM_ON_COPY - buf.flags = 0; -#endif /* LWIP_CHECKSUM_ON_COPY */ - if (to) { - SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port); - } else { - remote_port = 0; - ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr); - } - netbuf_fromport(&buf) = remote_port; - - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_sendto(%d, data=%p, short_size=%"U16_F", flags=0x%x to=", - s, data, short_size, flags)); - ip_addr_debug_print(SOCKETS_DEBUG, &buf.addr); - LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F"\n", remote_port)); - - /* make the buffer point to the data that should be sent */ -#if LWIP_NETIF_TX_SINGLE_PBUF - /* Allocate a new netbuf and copy the data into it. */ - if (netbuf_alloc(&buf, short_size) == NULL) { - err = ERR_MEM; - } else { -#if LWIP_CHECKSUM_ON_COPY - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_RAW) { - u16_t chksum = LWIP_CHKSUM_COPY(buf.p->payload, data, short_size); - netbuf_set_chksum(&buf, chksum); - } else -#endif /* LWIP_CHECKSUM_ON_COPY */ - { - MEMCPY(buf.p->payload, data, short_size); - } - err = ERR_OK; - } -#else /* LWIP_NETIF_TX_SINGLE_PBUF */ - err = netbuf_ref(&buf, data, short_size); -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - if (err == ERR_OK) { -#if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ - if (IP_IS_V6_VAL(buf.addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&buf.addr))) { - unmap_ipv4_mapped_ipv6(ip_2_ip4(&buf.addr), ip_2_ip6(&buf.addr)); - IP_SET_TYPE_VAL(buf.addr, IPADDR_TYPE_V4); - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - /* send the data */ - err = netconn_send(sock->conn, &buf); - } - - /* deallocated the buffer */ - netbuf_free(&buf); - - sock_set_errno(sock, err_to_errno(err)); - return (err == ERR_OK ? short_size : -1); -} - -int -lwip_socket(int domain, int type, int protocol) -{ - struct netconn *conn; - int i; - - LWIP_UNUSED_ARG(domain); /* @todo: check this */ - - /* create a netconn */ - switch (type) { - case SOCK_RAW: - conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), - (u8_t)protocol, event_callback); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_RAW, %d) = ", - domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); - break; - case SOCK_DGRAM: - conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, - ((protocol == IPPROTO_UDPLITE) ? NETCONN_UDPLITE : NETCONN_UDP)) , - event_callback); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_DGRAM, %d) = ", - domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); - break; - case SOCK_STREAM: - conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), event_callback); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_STREAM, %d) = ", - domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%d, %d/UNKNOWN, %d) = -1\n", - domain, type, protocol)); - set_errno(EINVAL); - return -1; - } - - if (!conn) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("-1 / ENOBUFS (could not create netconn)\n")); - set_errno(ENOBUFS); - return -1; - } - - i = alloc_socket(conn, 0); - - if (i == -1) { - netconn_delete(conn); - set_errno(ENFILE); - return -1; - } - conn->socket = i; - LWIP_DEBUGF(SOCKETS_DEBUG, ("%d\n", i)); - set_errno(0); - return i; -} - -int -lwip_write(int s, const void *data, size_t size) -{ - return lwip_send(s, data, size, 0); -} - -int -lwip_writev(int s, const struct iovec *iov, int iovcnt) -{ - struct msghdr msg; - - msg.msg_name = NULL; - msg.msg_namelen = 0; - /* Hack: we have to cast via number to cast from 'const' pointer to non-const. - Blame the opengroup standard for this inconsistency. */ - msg.msg_iov = LWIP_CONST_CAST(struct iovec *, iov); - msg.msg_iovlen = iovcnt; - msg.msg_control = NULL; - msg.msg_controllen = 0; - msg.msg_flags = 0; - return lwip_sendmsg(s, &msg, 0); -} - -/** - * Go through the readset and writeset lists and see which socket of the sockets - * set in the sets has events. On return, readset, writeset and exceptset have - * the sockets enabled that had events. - * - * @param maxfdp1 the highest socket index in the sets - * @param readset_in set of sockets to check for read events - * @param writeset_in set of sockets to check for write events - * @param exceptset_in set of sockets to check for error events - * @param readset_out set of sockets that had read events - * @param writeset_out set of sockets that had write events - * @param exceptset_out set os sockets that had error events - * @return number of sockets that had events (read/write/exception) (>= 0) - */ -static int -lwip_selscan(int maxfdp1, fd_set *readset_in, fd_set *writeset_in, fd_set *exceptset_in, - fd_set *readset_out, fd_set *writeset_out, fd_set *exceptset_out) -{ - int i, nready = 0; - fd_set lreadset, lwriteset, lexceptset; - struct lwip_sock *sock; - SYS_ARCH_DECL_PROTECT(lev); - - FD_ZERO(&lreadset); - FD_ZERO(&lwriteset); - FD_ZERO(&lexceptset); - - /* Go through each socket in each list to count number of sockets which - currently match */ - for (i = LWIP_SOCKET_OFFSET; i < maxfdp1; i++) { - /* if this FD is not in the set, continue */ - if (!(readset_in && FD_ISSET(i, readset_in)) && - !(writeset_in && FD_ISSET(i, writeset_in)) && - !(exceptset_in && FD_ISSET(i, exceptset_in))) { - continue; - } - /* First get the socket's status (protected)... */ - SYS_ARCH_PROTECT(lev); - sock = tryget_socket(i); - if (sock != NULL) { - void* lastdata = sock->lastdata; - s16_t rcvevent = sock->rcvevent; - u16_t sendevent = sock->sendevent; - u16_t errevent = sock->errevent; - SYS_ARCH_UNPROTECT(lev); - - /* ... then examine it: */ - /* See if netconn of this socket is ready for read */ - if (readset_in && FD_ISSET(i, readset_in) && ((lastdata != NULL) || (rcvevent > 0))) { - FD_SET(i, &lreadset); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for reading\n", i)); - nready++; - } - /* See if netconn of this socket is ready for write */ - if (writeset_in && FD_ISSET(i, writeset_in) && (sendevent != 0)) { - FD_SET(i, &lwriteset); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for writing\n", i)); - nready++; - } - /* See if netconn of this socket had an error */ - if (exceptset_in && FD_ISSET(i, exceptset_in) && (errevent != 0)) { - FD_SET(i, &lexceptset); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for exception\n", i)); - nready++; - } - } else { - SYS_ARCH_UNPROTECT(lev); - /* continue on to next FD in list */ - } - } - /* copy local sets to the ones provided as arguments */ - *readset_out = lreadset; - *writeset_out = lwriteset; - *exceptset_out = lexceptset; - - LWIP_ASSERT("nready >= 0", nready >= 0); - return nready; -} - -int -lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, - struct timeval *timeout) -{ - u32_t waitres = 0; - int nready; - fd_set lreadset, lwriteset, lexceptset; - u32_t msectimeout; - struct lwip_select_cb select_cb; - int i; - int maxfdp2; -#if LWIP_NETCONN_SEM_PER_THREAD - int waited = 0; -#endif - SYS_ARCH_DECL_PROTECT(lev); - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select(%d, %p, %p, %p, tvsec=%"S32_F" tvusec=%"S32_F")\n", - maxfdp1, (void *)readset, (void *) writeset, (void *) exceptset, - timeout ? (s32_t)timeout->tv_sec : (s32_t)-1, - timeout ? (s32_t)timeout->tv_usec : (s32_t)-1)); - - /* Go through each socket in each list to count number of sockets which - currently match */ - nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); - - /* If we don't have any current events, then suspend if we are supposed to */ - if (!nready) { - if (timeout && timeout->tv_sec == 0 && timeout->tv_usec == 0) { - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: no timeout, returning 0\n")); - /* This is OK as the local fdsets are empty and nready is zero, - or we would have returned earlier. */ - goto return_copy_fdsets; - } - - /* None ready: add our semaphore to list: - We don't actually need any dynamic memory. Our entry on the - list is only valid while we are in this function, so it's ok - to use local variables. */ - - select_cb.next = NULL; - select_cb.prev = NULL; - select_cb.readset = readset; - select_cb.writeset = writeset; - select_cb.exceptset = exceptset; - select_cb.sem_signalled = 0; -#if LWIP_NETCONN_SEM_PER_THREAD - select_cb.sem = LWIP_NETCONN_THREAD_SEM_GET(); -#else /* LWIP_NETCONN_SEM_PER_THREAD */ - if (sys_sem_new(&select_cb.sem, 0) != ERR_OK) { - /* failed to create semaphore */ - set_errno(ENOMEM); - return -1; - } -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - - /* Protect the select_cb_list */ - SYS_ARCH_PROTECT(lev); - - /* Put this select_cb on top of list */ - select_cb.next = select_cb_list; - if (select_cb_list != NULL) { - select_cb_list->prev = &select_cb; - } - select_cb_list = &select_cb; - /* Increasing this counter tells event_callback that the list has changed. */ - select_cb_ctr++; - - /* Now we can safely unprotect */ - SYS_ARCH_UNPROTECT(lev); - - /* Increase select_waiting for each socket we are interested in */ - maxfdp2 = maxfdp1; - for (i = LWIP_SOCKET_OFFSET; i < maxfdp1; i++) { - if ((readset && FD_ISSET(i, readset)) || - (writeset && FD_ISSET(i, writeset)) || - (exceptset && FD_ISSET(i, exceptset))) { - struct lwip_sock *sock; - SYS_ARCH_PROTECT(lev); - sock = tryget_socket(i); - if (sock != NULL) { - sock->select_waiting++; - LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); - } else { - /* Not a valid socket */ - nready = -1; - maxfdp2 = i; - SYS_ARCH_UNPROTECT(lev); - break; - } - SYS_ARCH_UNPROTECT(lev); - } - } - - if (nready >= 0) { - /* Call lwip_selscan again: there could have been events between - the last scan (without us on the list) and putting us on the list! */ - nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); - if (!nready) { - /* Still none ready, just wait to be woken */ - if (timeout == 0) { - /* Wait forever */ - msectimeout = 0; - } else { - msectimeout = ((timeout->tv_sec * 1000) + ((timeout->tv_usec + 500)/1000)); - if (msectimeout == 0) { - /* Wait 1ms at least (0 means wait forever) */ - msectimeout = 1; - } - } - - waitres = sys_arch_sem_wait(SELECT_SEM_PTR(select_cb.sem), msectimeout); -#if LWIP_NETCONN_SEM_PER_THREAD - waited = 1; -#endif - } - } - - /* Decrease select_waiting for each socket we are interested in */ - for (i = LWIP_SOCKET_OFFSET; i < maxfdp2; i++) { - if ((readset && FD_ISSET(i, readset)) || - (writeset && FD_ISSET(i, writeset)) || - (exceptset && FD_ISSET(i, exceptset))) { - struct lwip_sock *sock; - SYS_ARCH_PROTECT(lev); - sock = tryget_socket(i); - if (sock != NULL) { - /* for now, handle select_waiting==0... */ - LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); - if (sock->select_waiting > 0) { - sock->select_waiting--; - } - } else { - /* Not a valid socket */ - nready = -1; - } - SYS_ARCH_UNPROTECT(lev); - } - } - /* Take us off the list */ - SYS_ARCH_PROTECT(lev); - if (select_cb.next != NULL) { - select_cb.next->prev = select_cb.prev; - } - if (select_cb_list == &select_cb) { - LWIP_ASSERT("select_cb.prev == NULL", select_cb.prev == NULL); - select_cb_list = select_cb.next; - } else { - LWIP_ASSERT("select_cb.prev != NULL", select_cb.prev != NULL); - select_cb.prev->next = select_cb.next; - } - /* Increasing this counter tells event_callback that the list has changed. */ - select_cb_ctr++; - SYS_ARCH_UNPROTECT(lev); - -#if LWIP_NETCONN_SEM_PER_THREAD - if (select_cb.sem_signalled && (!waited || (waitres == SYS_ARCH_TIMEOUT))) { - /* don't leave the thread-local semaphore signalled */ - sys_arch_sem_wait(select_cb.sem, 1); - } -#else /* LWIP_NETCONN_SEM_PER_THREAD */ - sys_sem_free(&select_cb.sem); -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - - if (nready < 0) { - /* This happens when a socket got closed while waiting */ - set_errno(EBADF); - return -1; - } - - if (waitres == SYS_ARCH_TIMEOUT) { - /* Timeout */ - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: timeout expired\n")); - /* This is OK as the local fdsets are empty and nready is zero, - or we would have returned earlier. */ - goto return_copy_fdsets; - } - - /* See what's set */ - nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); - } - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: nready=%d\n", nready)); -return_copy_fdsets: - set_errno(0); - if (readset) { - *readset = lreadset; - } - if (writeset) { - *writeset = lwriteset; - } - if (exceptset) { - *exceptset = lexceptset; - } - return nready; -} - -/** - * Callback registered in the netconn layer for each socket-netconn. - * Processes recvevent (data available) and wakes up tasks waiting for select. - */ -static void -event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) -{ - int s; - struct lwip_sock *sock; - struct lwip_select_cb *scb; - int last_select_cb_ctr; - SYS_ARCH_DECL_PROTECT(lev); - - LWIP_UNUSED_ARG(len); - - /* Get socket */ - if (conn) { - s = conn->socket; - if (s < 0) { - /* Data comes in right away after an accept, even though - * the server task might not have created a new socket yet. - * Just count down (or up) if that's the case and we - * will use the data later. Note that only receive events - * can happen before the new socket is set up. */ - SYS_ARCH_PROTECT(lev); - if (conn->socket < 0) { - if (evt == NETCONN_EVT_RCVPLUS) { - conn->socket--; - } - SYS_ARCH_UNPROTECT(lev); - return; - } - s = conn->socket; - SYS_ARCH_UNPROTECT(lev); - } - - sock = get_socket(s); - if (!sock) { - return; - } - } else { - return; - } - - SYS_ARCH_PROTECT(lev); - /* Set event as required */ - switch (evt) { - case NETCONN_EVT_RCVPLUS: - sock->rcvevent++; - break; - case NETCONN_EVT_RCVMINUS: - sock->rcvevent--; - break; - case NETCONN_EVT_SENDPLUS: - sock->sendevent = 1; - break; - case NETCONN_EVT_SENDMINUS: - sock->sendevent = 0; - break; - case NETCONN_EVT_ERROR: - sock->errevent = 1; - break; - default: - LWIP_ASSERT("unknown event", 0); - break; - } - - if (sock->select_waiting == 0) { - /* noone is waiting for this socket, no need to check select_cb_list */ - SYS_ARCH_UNPROTECT(lev); - return; - } - - /* Now decide if anyone is waiting for this socket */ - /* NOTE: This code goes through the select_cb_list list multiple times - ONLY IF a select was actually waiting. We go through the list the number - of waiting select calls + 1. This list is expected to be small. */ - - /* At this point, SYS_ARCH is still protected! */ -again: - for (scb = select_cb_list; scb != NULL; scb = scb->next) { - /* remember the state of select_cb_list to detect changes */ - last_select_cb_ctr = select_cb_ctr; - if (scb->sem_signalled == 0) { - /* semaphore not signalled yet */ - int do_signal = 0; - /* Test this select call for our socket */ - if (sock->rcvevent > 0) { - if (scb->readset && FD_ISSET(s, scb->readset)) { - do_signal = 1; - } - } - if (sock->sendevent != 0) { - if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { - do_signal = 1; - } - } - if (sock->errevent != 0) { - if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { - do_signal = 1; - } - } - if (do_signal) { - scb->sem_signalled = 1; - /* 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)); - } - } - /* unlock interrupts with each step */ - SYS_ARCH_UNPROTECT(lev); - /* this makes sure interrupt protection time is short */ - SYS_ARCH_PROTECT(lev); - if (last_select_cb_ctr != select_cb_ctr) { - /* someone has changed select_cb_list, restart at the beginning */ - goto again; - } - } - SYS_ARCH_UNPROTECT(lev); -} - -/** - * Close one end of a full-duplex connection. - */ -int -lwip_shutdown(int s, int how) -{ - struct lwip_sock *sock; - err_t err; - u8_t shut_rx = 0, shut_tx = 0; - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_shutdown(%d, how=%d)\n", s, how)); - - sock = get_socket(s); - if (!sock) { - return -1; - } - - if (sock->conn != NULL) { - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { - sock_set_errno(sock, EOPNOTSUPP); - return -1; - } - } else { - sock_set_errno(sock, ENOTCONN); - return -1; - } - - if (how == SHUT_RD) { - shut_rx = 1; - } else if (how == SHUT_WR) { - shut_tx = 1; - } else if (how == SHUT_RDWR) { - shut_rx = 1; - shut_tx = 1; - } else { - sock_set_errno(sock, EINVAL); - return -1; - } - err = netconn_shutdown(sock->conn, shut_rx, shut_tx); - - sock_set_errno(sock, err_to_errno(err)); - return (err == ERR_OK ? 0 : -1); -} - -static int -lwip_getaddrname(int s, struct sockaddr *name, socklen_t *namelen, u8_t local) -{ - struct lwip_sock *sock; - union sockaddr_aligned saddr; - ip_addr_t naddr; - u16_t port; - err_t err; - - sock = get_socket(s); - if (!sock) { - return -1; - } - - /* get the IP address and port */ - err = netconn_getaddr(sock->conn, &naddr, &port, local); - if (err != ERR_OK) { - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - -#if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: Map IPv4 addresses to IPv4 mapped IPv6 */ - if (NETCONNTYPE_ISIPV6(netconn_type(sock->conn)) && - IP_IS_V4_VAL(naddr)) { - ip4_2_ipv4_mapped_ipv6(ip_2_ip6(&naddr), ip_2_ip4(&naddr)); - IP_SET_TYPE_VAL(naddr, IPADDR_TYPE_V6); - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - IPADDR_PORT_TO_SOCKADDR(&saddr, &naddr, port); - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getaddrname(%d, addr=", s)); - ip_addr_debug_print_val(SOCKETS_DEBUG, naddr); - LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F")\n", port)); - - if (*namelen > saddr.sa.sa_len) { - *namelen = saddr.sa.sa_len; - } - MEMCPY(name, &saddr, *namelen); - - sock_set_errno(sock, 0); - return 0; -} - -int -lwip_getpeername(int s, struct sockaddr *name, socklen_t *namelen) -{ - return lwip_getaddrname(s, name, namelen, 0); -} - -int -lwip_getsockname(int s, struct sockaddr *name, socklen_t *namelen) -{ - return lwip_getaddrname(s, name, namelen, 1); -} - -int -lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) -{ - u8_t err; - struct lwip_sock *sock = get_socket(s); -#if !LWIP_TCPIP_CORE_LOCKING - LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(data); -#endif /* !LWIP_TCPIP_CORE_LOCKING */ - - if (!sock) { - return -1; - } - - if ((NULL == optval) || (NULL == optlen)) { - sock_set_errno(sock, EFAULT); - return -1; - } - -#if LWIP_TCPIP_CORE_LOCKING - /* core-locking can just call the -impl function */ - LOCK_TCPIP_CORE(); - err = lwip_getsockopt_impl(s, level, optname, optval, optlen); - UNLOCK_TCPIP_CORE(); - -#else /* LWIP_TCPIP_CORE_LOCKING */ - -#if LWIP_MPU_COMPATIBLE - /* MPU_COMPATIBLE copies the optval data, so check for max size here */ - if (*optlen > LWIP_SETGETSOCKOPT_MAXOPTLEN) { - sock_set_errno(sock, ENOBUFS); - return -1; - } -#endif /* LWIP_MPU_COMPATIBLE */ - - LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(data, sock); - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).s = s; - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).level = level; - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optname = optname; - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen = *optlen; -#if !LWIP_MPU_COMPATIBLE - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval.p = optval; -#endif /* !LWIP_MPU_COMPATIBLE */ - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err = 0; -#if LWIP_NETCONN_SEM_PER_THREAD - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = LWIP_NETCONN_THREAD_SEM_GET(); -#else - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = &sock->conn->op_completed; -#endif - err = tcpip_callback(lwip_getsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); - if (err != ERR_OK) { - LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - sys_arch_sem_wait((sys_sem_t*)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); - - /* write back optlen and optval */ - *optlen = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen; -#if LWIP_MPU_COMPATIBLE - MEMCPY(optval, LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval, - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen); -#endif /* LWIP_MPU_COMPATIBLE */ - - /* maybe lwip_getsockopt_internal has changed err */ - err = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err; - LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); -#endif /* LWIP_TCPIP_CORE_LOCKING */ - - sock_set_errno(sock, err); - return err ? -1 : 0; -} - -#if !LWIP_TCPIP_CORE_LOCKING -/** lwip_getsockopt_callback: only used without CORE_LOCKING - * to get into the tcpip_thread - */ -static void -lwip_getsockopt_callback(void *arg) -{ - struct lwip_setgetsockopt_data *data; - LWIP_ASSERT("arg != NULL", arg != NULL); - data = (struct lwip_setgetsockopt_data*)arg; - - data->err = lwip_getsockopt_impl(data->s, data->level, data->optname, -#if LWIP_MPU_COMPATIBLE - data->optval, -#else /* LWIP_MPU_COMPATIBLE */ - data->optval.p, -#endif /* LWIP_MPU_COMPATIBLE */ - &data->optlen); - - sys_sem_signal((sys_sem_t*)(data->completed_sem)); -} -#endif /* LWIP_TCPIP_CORE_LOCKING */ - -/** lwip_getsockopt_impl: the actual implementation of getsockopt: - * same argument as lwip_getsockopt, either called directly or through callback - */ -static u8_t -lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen) -{ - u8_t err = 0; - struct lwip_sock *sock = tryget_socket(s); - if (!sock) { - return EBADF; - } - - switch (level) { - -/* Level: SOL_SOCKET */ - case SOL_SOCKET: - switch (optname) { - -#if LWIP_TCP - case SO_ACCEPTCONN: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - if (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_TCP) { - return ENOPROTOOPT; - } - if ((sock->conn->pcb.tcp != NULL) && (sock->conn->pcb.tcp->state == LISTEN)) { - *(int*)optval = 1; - } else { - *(int*)optval = 0; - } - break; -#endif /* LWIP_TCP */ - - /* The option flags */ - case SO_BROADCAST: - case SO_KEEPALIVE: -#if SO_REUSE - case SO_REUSEADDR: -#endif /* SO_REUSE */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - *(int*)optval = ip_get_option(sock->conn->pcb.ip, optname); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, optname=0x%x, ..) = %s\n", - s, optname, (*(int*)optval?"on":"off"))); - break; - - case SO_TYPE: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); - switch (NETCONNTYPE_GROUP(netconn_type(sock->conn))) { - case NETCONN_RAW: - *(int*)optval = SOCK_RAW; - break; - case NETCONN_TCP: - *(int*)optval = SOCK_STREAM; - break; - case NETCONN_UDP: - *(int*)optval = SOCK_DGRAM; - break; - default: /* unrecognized socket type */ - *(int*)optval = netconn_type(sock->conn); - LWIP_DEBUGF(SOCKETS_DEBUG, - ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE): unrecognized socket type %d\n", - s, *(int *)optval)); - } /* switch (netconn_type(sock->conn)) */ - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE) = %d\n", - s, *(int *)optval)); - break; - - case SO_ERROR: - LWIP_SOCKOPT_CHECK_OPTLEN(*optlen, int); - /* only overwrite ERR_OK or temporary errors */ - if (((sock->err == 0) || (sock->err == EINPROGRESS)) && (sock->conn != NULL)) { - sock_set_errno(sock, err_to_errno(sock->conn->last_err)); - } - *(int *)optval = (sock->err == 0xFF ? (int)-1 : (int)sock->err); - sock->err = 0; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_ERROR) = %d\n", - s, *(int *)optval)); - break; - -#if LWIP_SO_SNDTIMEO - case SO_SNDTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_sendtimeout(sock->conn)); - break; -#endif /* LWIP_SO_SNDTIMEO */ -#if LWIP_SO_RCVTIMEO - case SO_RCVTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_recvtimeout(sock->conn)); - break; -#endif /* LWIP_SO_RCVTIMEO */ -#if LWIP_SO_RCVBUF - case SO_RCVBUF: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); - *(int *)optval = netconn_get_recvbufsize(sock->conn); - break; -#endif /* LWIP_SO_RCVBUF */ -#if LWIP_SO_LINGER - case SO_LINGER: - { - s16_t conn_linger; - struct linger* linger = (struct linger*)optval; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, struct linger); - conn_linger = sock->conn->linger; - if (conn_linger >= 0) { - linger->l_onoff = 1; - linger->l_linger = (int)conn_linger; - } else { - linger->l_onoff = 0; - linger->l_linger = 0; - } - } - break; -#endif /* LWIP_SO_LINGER */ -#if LWIP_UDP - case SO_NO_CHECK: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_UDP); -#if LWIP_UDPLITE - if ((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0) { - /* this flag is only available for UDP, not for UDP lite */ - return EAFNOSUPPORT; - } -#endif /* LWIP_UDPLITE */ - *(int*)optval = (udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_NOCHKSUM) ? 1 : 0; - break; -#endif /* LWIP_UDP*/ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; - -/* Level: IPPROTO_IP */ - case IPPROTO_IP: - switch (optname) { - case IP_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - *(int*)optval = sock->conn->pcb.ip->ttl; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TTL) = %d\n", - s, *(int *)optval)); - break; - case IP_TOS: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - *(int*)optval = sock->conn->pcb.ip->tos; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TOS) = %d\n", - s, *(int *)optval)); - break; -#if LWIP_MULTICAST_TX_OPTIONS - case IP_MULTICAST_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { - return ENOPROTOOPT; - } - *(u8_t*)optval = udp_get_multicast_ttl(sock->conn->pcb.udp); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_TTL) = %d\n", - s, *(int *)optval)); - break; - case IP_MULTICAST_IF: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, struct in_addr); - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { - return ENOPROTOOPT; - } - inet_addr_from_ip4addr((struct in_addr*)optval, udp_get_multicast_netif_addr(sock->conn->pcb.udp)); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_IF) = 0x%"X32_F"\n", - s, *(u32_t *)optval)); - break; - case IP_MULTICAST_LOOP: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); - if ((sock->conn->pcb.udp->flags & UDP_FLAGS_MULTICAST_LOOP) != 0) { - *(u8_t*)optval = 1; - } else { - *(u8_t*)optval = 0; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_LOOP) = %d\n", - s, *(int *)optval)); - break; -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; - -#if LWIP_TCP -/* Level: IPPROTO_TCP */ - case IPPROTO_TCP: - /* Special case: all IPPROTO_TCP option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_TCP); - if (sock->conn->pcb.tcp->state == LISTEN) { - return EINVAL; - } - switch (optname) { - case TCP_NODELAY: - *(int*)optval = tcp_nagle_disabled(sock->conn->pcb.tcp); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_NODELAY) = %s\n", - s, (*(int*)optval)?"on":"off") ); - break; - case TCP_KEEPALIVE: - *(int*)optval = (int)sock->conn->pcb.tcp->keep_idle; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) = %d\n", - s, *(int *)optval)); - break; - -#if LWIP_TCP_KEEPALIVE - case TCP_KEEPIDLE: - *(int*)optval = (int)(sock->conn->pcb.tcp->keep_idle/1000); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) = %d\n", - s, *(int *)optval)); - break; - case TCP_KEEPINTVL: - *(int*)optval = (int)(sock->conn->pcb.tcp->keep_intvl/1000); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) = %d\n", - s, *(int *)optval)); - break; - case TCP_KEEPCNT: - *(int*)optval = (int)sock->conn->pcb.tcp->keep_cnt; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) = %d\n", - s, *(int *)optval)); - break; -#endif /* LWIP_TCP_KEEPALIVE */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; -#endif /* LWIP_TCP */ - -#if LWIP_IPV6 -/* Level: IPPROTO_IPV6 */ - case IPPROTO_IPV6: - switch (optname) { - case IPV6_V6ONLY: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); - *(int*)optval = (netconn_get_ipv6only(sock->conn) ? 1 : 0); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY) = %d\n", - s, *(int *)optval)); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; -#endif /* LWIP_IPV6 */ - -#if LWIP_UDP && LWIP_UDPLITE - /* Level: IPPROTO_UDPLITE */ - case IPPROTO_UDPLITE: - /* Special case: all IPPROTO_UDPLITE option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); - /* If this is no UDP lite socket, ignore any options. */ - if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { - return ENOPROTOOPT; - } - switch (optname) { - case UDPLITE_SEND_CSCOV: - *(int*)optval = sock->conn->pcb.udp->chksum_len_tx; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) = %d\n", - s, (*(int*)optval)) ); - break; - case UDPLITE_RECV_CSCOV: - *(int*)optval = sock->conn->pcb.udp->chksum_len_rx; - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) = %d\n", - s, (*(int*)optval)) ); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; -#endif /* LWIP_UDP */ - /* Level: IPPROTO_RAW */ - case IPPROTO_RAW: - switch (optname) { -#if LWIP_IPV6 && LWIP_RAW - case IPV6_CHECKSUM: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_RAW); - if (sock->conn->pcb.raw->chksum_reqd == 0) { - *(int *)optval = -1; - } else { - *(int *)optval = sock->conn->pcb.raw->chksum_offset; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n", - s, (*(int*)optval)) ); - break; -#endif /* LWIP_IPV6 && LWIP_RAW */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", - s, level, optname)); - err = ENOPROTOOPT; - break; - } /* switch (level) */ - - return err; -} - -int -lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) -{ - u8_t err = 0; - struct lwip_sock *sock = get_socket(s); -#if !LWIP_TCPIP_CORE_LOCKING - LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(data); -#endif /* !LWIP_TCPIP_CORE_LOCKING */ - - if (!sock) { - return -1; - } - - if (NULL == optval) { - sock_set_errno(sock, EFAULT); - return -1; - } - -#if LWIP_TCPIP_CORE_LOCKING - /* core-locking can just call the -impl function */ - LOCK_TCPIP_CORE(); - err = lwip_setsockopt_impl(s, level, optname, optval, optlen); - UNLOCK_TCPIP_CORE(); - -#else /* LWIP_TCPIP_CORE_LOCKING */ - -#if LWIP_MPU_COMPATIBLE - /* MPU_COMPATIBLE copies the optval data, so check for max size here */ - if (optlen > LWIP_SETGETSOCKOPT_MAXOPTLEN) { - sock_set_errno(sock, ENOBUFS); - return -1; - } -#endif /* LWIP_MPU_COMPATIBLE */ - - LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(data, sock); - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).s = s; - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).level = level; - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optname = optname; - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen = optlen; -#if LWIP_MPU_COMPATIBLE - MEMCPY(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval, optval, optlen); -#else /* LWIP_MPU_COMPATIBLE */ - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval.pc = (const void*)optval; -#endif /* LWIP_MPU_COMPATIBLE */ - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err = 0; -#if LWIP_NETCONN_SEM_PER_THREAD - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = LWIP_NETCONN_THREAD_SEM_GET(); -#else - LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = &sock->conn->op_completed; -#endif - err = tcpip_callback(lwip_setsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); - if (err != ERR_OK) { - LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); - sock_set_errno(sock, err_to_errno(err)); - return -1; - } - sys_arch_sem_wait((sys_sem_t*)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); - - /* maybe lwip_getsockopt_internal has changed err */ - err = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err; - LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); -#endif /* LWIP_TCPIP_CORE_LOCKING */ - - sock_set_errno(sock, err); - return err ? -1 : 0; -} - -#if !LWIP_TCPIP_CORE_LOCKING -/** lwip_setsockopt_callback: only used without CORE_LOCKING - * to get into the tcpip_thread - */ -static void -lwip_setsockopt_callback(void *arg) -{ - struct lwip_setgetsockopt_data *data; - LWIP_ASSERT("arg != NULL", arg != NULL); - data = (struct lwip_setgetsockopt_data*)arg; - - data->err = lwip_setsockopt_impl(data->s, data->level, data->optname, -#if LWIP_MPU_COMPATIBLE - data->optval, -#else /* LWIP_MPU_COMPATIBLE */ - data->optval.pc, -#endif /* LWIP_MPU_COMPATIBLE */ - data->optlen); - - sys_sem_signal((sys_sem_t*)(data->completed_sem)); -} -#endif /* LWIP_TCPIP_CORE_LOCKING */ - -/** lwip_setsockopt_impl: the actual implementation of setsockopt: - * same argument as lwip_setsockopt, either called directly or through callback - */ -static u8_t -lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen) -{ - u8_t err = 0; - struct lwip_sock *sock = tryget_socket(s); - if (!sock) { - return EBADF; - } - - switch (level) { - -/* Level: SOL_SOCKET */ - case SOL_SOCKET: - switch (optname) { - - /* SO_ACCEPTCONN is get-only */ - - /* The option flags */ - case SO_BROADCAST: - case SO_KEEPALIVE: -#if SO_REUSE - case SO_REUSEADDR: -#endif /* SO_REUSE */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - if (*(const int*)optval) { - ip_set_option(sock->conn->pcb.ip, optname); - } else { - ip_reset_option(sock->conn->pcb.ip, optname); - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, optname=0x%x, ..) -> %s\n", - s, optname, (*(const int*)optval?"on":"off"))); - break; - - /* SO_TYPE is get-only */ - /* SO_ERROR is get-only */ - -#if LWIP_SO_SNDTIMEO - case SO_SNDTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - netconn_set_sendtimeout(sock->conn, LWIP_SO_SNDRCVTIMEO_GET_MS(optval)); - break; -#endif /* LWIP_SO_SNDTIMEO */ -#if LWIP_SO_RCVTIMEO - case SO_RCVTIMEO: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); - netconn_set_recvtimeout(sock->conn, (int)LWIP_SO_SNDRCVTIMEO_GET_MS(optval)); - break; -#endif /* LWIP_SO_RCVTIMEO */ -#if LWIP_SO_RCVBUF - case SO_RCVBUF: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, int); - netconn_set_recvbufsize(sock->conn, *(const int*)optval); - break; -#endif /* LWIP_SO_RCVBUF */ -#if LWIP_SO_LINGER - case SO_LINGER: - { - const struct linger* linger = (const struct linger*)optval; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, struct linger); - if (linger->l_onoff) { - int lingersec = linger->l_linger; - if (lingersec < 0) { - return EINVAL; - } - if (lingersec > 0xFFFF) { - lingersec = 0xFFFF; - } - sock->conn->linger = (s16_t)lingersec; - } else { - sock->conn->linger = -1; - } - } - break; -#endif /* LWIP_SO_LINGER */ -#if LWIP_UDP - case SO_NO_CHECK: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_UDP); -#if LWIP_UDPLITE - if ((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0) { - /* this flag is only available for UDP, not for UDP lite */ - return EAFNOSUPPORT; - } -#endif /* LWIP_UDPLITE */ - if (*(const int*)optval) { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_NOCHKSUM); - } else { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) & ~UDP_FLAGS_NOCHKSUM); - } - break; -#endif /* LWIP_UDP */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; - -/* Level: IPPROTO_IP */ - case IPPROTO_IP: - switch (optname) { - case IP_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - sock->conn->pcb.ip->ttl = (u8_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TTL, ..) -> %d\n", - s, sock->conn->pcb.ip->ttl)); - break; - case IP_TOS: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - sock->conn->pcb.ip->tos = (u8_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TOS, ..)-> %d\n", - s, sock->conn->pcb.ip->tos)); - break; -#if LWIP_MULTICAST_TX_OPTIONS - case IP_MULTICAST_TTL: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); - udp_set_multicast_ttl(sock->conn->pcb.udp, (u8_t)(*(const u8_t*)optval)); - break; - case IP_MULTICAST_IF: - { - ip4_addr_t if_addr; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct in_addr, NETCONN_UDP); - inet_addr_to_ip4addr(&if_addr, (const struct in_addr*)optval); - udp_set_multicast_netif_addr(sock->conn->pcb.udp, &if_addr); - } - break; - case IP_MULTICAST_LOOP: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); - if (*(const u8_t*)optval) { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_MULTICAST_LOOP); - } else { - udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) & ~UDP_FLAGS_MULTICAST_LOOP); - } - break; -#endif /* LWIP_MULTICAST_TX_OPTIONS */ -#if LWIP_IGMP - case IP_ADD_MEMBERSHIP: - case IP_DROP_MEMBERSHIP: - { - /* If this is a TCP or a RAW socket, ignore these options. */ - /* @todo: assign membership to this socket so that it is dropped when closing the socket */ - err_t igmp_err; - const struct ip_mreq *imr = (const struct ip_mreq *)optval; - ip4_addr_t if_addr; - ip4_addr_t multi_addr; - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct ip_mreq, NETCONN_UDP); - inet_addr_to_ip4addr(&if_addr, &imr->imr_interface); - inet_addr_to_ip4addr(&multi_addr, &imr->imr_multiaddr); - if (optname == IP_ADD_MEMBERSHIP) { - if (!lwip_socket_register_membership(s, &if_addr, &multi_addr)) { - /* cannot track membership (out of memory) */ - err = ENOMEM; - igmp_err = ERR_OK; - } else { - igmp_err = igmp_joingroup(&if_addr, &multi_addr); - } - } else { - igmp_err = igmp_leavegroup(&if_addr, &multi_addr); - lwip_socket_unregister_membership(s, &if_addr, &multi_addr); - } - if (igmp_err != ERR_OK) { - err = EADDRNOTAVAIL; - } - } - break; -#endif /* LWIP_IGMP */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; - -#if LWIP_TCP -/* Level: IPPROTO_TCP */ - case IPPROTO_TCP: - /* Special case: all IPPROTO_TCP option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP); - if (sock->conn->pcb.tcp->state == LISTEN) { - return EINVAL; - } - switch (optname) { - case TCP_NODELAY: - if (*(const int*)optval) { - tcp_nagle_disable(sock->conn->pcb.tcp); - } else { - tcp_nagle_enable(sock->conn->pcb.tcp); - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_NODELAY) -> %s\n", - s, (*(const int *)optval)?"on":"off") ); - break; - case TCP_KEEPALIVE: - sock->conn->pcb.tcp->keep_idle = (u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_idle)); - break; - -#if LWIP_TCP_KEEPALIVE - case TCP_KEEPIDLE: - sock->conn->pcb.tcp->keep_idle = 1000*(u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_idle)); - break; - case TCP_KEEPINTVL: - sock->conn->pcb.tcp->keep_intvl = 1000*(u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_intvl)); - break; - case TCP_KEEPCNT: - sock->conn->pcb.tcp->keep_cnt = (u32_t)(*(const int*)optval); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) -> %"U32_F"\n", - s, sock->conn->pcb.tcp->keep_cnt)); - break; -#endif /* LWIP_TCP_KEEPALIVE */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; -#endif /* LWIP_TCP*/ - -#if LWIP_IPV6 -/* Level: IPPROTO_IPV6 */ - case IPPROTO_IPV6: - switch (optname) { - case IPV6_V6ONLY: - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP); - if (*(const int*)optval) { - netconn_set_ipv6only(sock->conn, 1); - } else { - netconn_set_ipv6only(sock->conn, 0); - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY, ..) -> %d\n", - s, (netconn_get_ipv6only(sock->conn) ? 1 : 0))); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; -#endif /* LWIP_IPV6 */ - -#if LWIP_UDP && LWIP_UDPLITE - /* Level: IPPROTO_UDPLITE */ - case IPPROTO_UDPLITE: - /* Special case: all IPPROTO_UDPLITE option take an int */ - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); - /* If this is no UDP lite socket, ignore any options. */ - if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { - return ENOPROTOOPT; - } - switch (optname) { - case UDPLITE_SEND_CSCOV: - if ((*(const int*)optval != 0) && ((*(const int*)optval < 8) || (*(const int*)optval > 0xffff))) { - /* don't allow illegal values! */ - sock->conn->pcb.udp->chksum_len_tx = 8; - } else { - sock->conn->pcb.udp->chksum_len_tx = (u16_t)*(const int*)optval; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) -> %d\n", - s, (*(const int*)optval)) ); - break; - case UDPLITE_RECV_CSCOV: - if ((*(const int*)optval != 0) && ((*(const int*)optval < 8) || (*(const int*)optval > 0xffff))) { - /* don't allow illegal values! */ - sock->conn->pcb.udp->chksum_len_rx = 8; - } else { - sock->conn->pcb.udp->chksum_len_rx = (u16_t)*(const int*)optval; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) -> %d\n", - s, (*(const int*)optval)) ); - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; -#endif /* LWIP_UDP */ - /* Level: IPPROTO_RAW */ - case IPPROTO_RAW: - switch (optname) { -#if LWIP_IPV6 && LWIP_RAW - case IPV6_CHECKSUM: - /* It should not be possible to disable the checksum generation with ICMPv6 - * as per RFC 3542 chapter 3.1 */ - if(sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) { - return EINVAL; - } - - LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_RAW); - if (*(const int *)optval < 0) { - sock->conn->pcb.raw->chksum_reqd = 0; - } else if (*(const int *)optval & 1) { - /* Per RFC3542, odd offsets are not allowed */ - return EINVAL; - } else { - sock->conn->pcb.raw->chksum_reqd = 1; - sock->conn->pcb.raw->chksum_offset = (u16_t)*(const int *)optval; - } - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n", - s, sock->conn->pcb.raw->chksum_reqd)); - break; -#endif /* LWIP_IPV6 && LWIP_RAW */ - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", - s, optname)); - err = ENOPROTOOPT; - break; - } /* switch (optname) */ - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", - s, level, optname)); - err = ENOPROTOOPT; - break; - } /* switch (level) */ - - return err; -} - -int -lwip_ioctl(int s, long cmd, void *argp) -{ - struct lwip_sock *sock = get_socket(s); - u8_t val; -#if LWIP_SO_RCVBUF - u16_t buflen = 0; - int recv_avail; -#endif /* LWIP_SO_RCVBUF */ - - if (!sock) { - return -1; - } - - switch (cmd) { -#if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE - case FIONREAD: - if (!argp) { - sock_set_errno(sock, EINVAL); - return -1; - } -#if LWIP_FIONREAD_LINUXMODE - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { - struct pbuf *p; - if (sock->lastdata) { - p = ((struct netbuf *)sock->lastdata)->p; - *((int*)argp) = p->tot_len - sock->lastoffset; - } else { - struct netbuf *rxbuf; - err_t err; - if (sock->rcvevent <= 0) { - *((int*)argp) = 0; - } else { - err = netconn_recv(sock->conn, &rxbuf); - if (err != ERR_OK) { - *((int*)argp) = 0; - } else { - sock->lastdata = rxbuf; - sock->lastoffset = 0; - *((int*)argp) = rxbuf->p->tot_len; - } - } - } - return 0; - } -#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); - if (recv_avail < 0) { - recv_avail = 0; - } - *((int*)argp) = recv_avail; - - /* Check if there is data left from the last recv operation. /maq 041215 */ - if (sock->lastdata) { - struct pbuf *p = (struct pbuf *)sock->lastdata; - if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { - p = ((struct netbuf *)p)->p; - } - buflen = p->tot_len; - buflen -= sock->lastoffset; - - *((int*)argp) += buflen; - } - - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t*)argp))); - sock_set_errno(sock, 0); - return 0; -#else /* LWIP_SO_RCVBUF */ - break; -#endif /* LWIP_SO_RCVBUF */ -#endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */ - - case (long)FIONBIO: - val = 0; - if (argp && *(u32_t*)argp) { - val = 1; - } - netconn_set_nonblocking(sock->conn, val); - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val)); - sock_set_errno(sock, 0); - return 0; - - 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 */ - return -1; -} - -/** A minimal implementation of fcntl. - * Currently only the commands F_GETFL and F_SETFL are implemented. - * Only the flag O_NONBLOCK is implemented. - */ -int -lwip_fcntl(int s, int cmd, int val) -{ - struct lwip_sock *sock = get_socket(s); - int ret = -1; - - if (!sock) { - return -1; - } - - switch (cmd) { - case F_GETFL: - ret = netconn_is_nonblocking(sock->conn) ? O_NONBLOCK : 0; - sock_set_errno(sock, 0); - break; - case F_SETFL: - if ((val & ~O_NONBLOCK) == 0) { - /* only O_NONBLOCK, all other bits are zero */ - netconn_set_nonblocking(sock->conn, val & O_NONBLOCK); - ret = 0; - sock_set_errno(sock, 0); - } else { - sock_set_errno(sock, ENOSYS); /* not yet implemented */ - } - break; - default: - LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_fcntl(%d, UNIMPL: %d, %d)\n", s, cmd, val)); - sock_set_errno(sock, ENOSYS); /* not yet implemented */ - break; - } - return ret; -} - -#if LWIP_IGMP -/** Register a new IGMP membership. On socket close, the membership is dropped automatically. - * - * ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK). - * - * @return 1 on success, 0 on failure - */ -static int -lwip_socket_register_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr) -{ - struct lwip_sock *sock = get_socket(s); - int i; - - if (!sock) { - return 0; - } - - for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { - if (socket_ipv4_multicast_memberships[i].sock == NULL) { - socket_ipv4_multicast_memberships[i].sock = sock; - ip4_addr_copy(socket_ipv4_multicast_memberships[i].if_addr, *if_addr); - ip4_addr_copy(socket_ipv4_multicast_memberships[i].multi_addr, *multi_addr); - return 1; - } - } - return 0; -} - -/** Unregister a previously registered membership. This prevents dropping the membership - * on socket close. - * - * ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK). - */ -static void -lwip_socket_unregister_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr) -{ - struct lwip_sock *sock = get_socket(s); - int i; - - if (!sock) { - return; - } - - for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { - if ((socket_ipv4_multicast_memberships[i].sock == sock) && - ip4_addr_cmp(&socket_ipv4_multicast_memberships[i].if_addr, if_addr) && - ip4_addr_cmp(&socket_ipv4_multicast_memberships[i].multi_addr, multi_addr)) { - socket_ipv4_multicast_memberships[i].sock = NULL; - ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].if_addr); - ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].multi_addr); - return; - } - } -} - -/** Drop all memberships of a socket that were not dropped explicitly via setsockopt. - * - * ATTENTION: this function is NOT called from tcpip_thread (or under CORE_LOCK). - */ -static void -lwip_socket_drop_registered_memberships(int s) -{ - struct lwip_sock *sock = get_socket(s); - int i; - - if (!sock) { - return; - } - - for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { - if (socket_ipv4_multicast_memberships[i].sock == sock) { - ip_addr_t multi_addr, if_addr; - ip_addr_copy_from_ip4(multi_addr, socket_ipv4_multicast_memberships[i].multi_addr); - ip_addr_copy_from_ip4(if_addr, socket_ipv4_multicast_memberships[i].if_addr); - socket_ipv4_multicast_memberships[i].sock = NULL; - ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].if_addr); - ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].multi_addr); - - netconn_join_leave_group(sock->conn, &multi_addr, &if_addr, NETCONN_LEAVE); - } - } -} -#endif /* LWIP_IGMP */ -#endif /* LWIP_SOCKET */ +/** + * @file + * Sockets BSD-Like API module + * + * @defgroup socket Socket API + * @ingroup sequential_api + * BSD-style socket API.\n + * Thread-safe, to be called from non-TCPIP threads only.\n + * Can be activated by defining @ref LWIP_SOCKET to 1.\n + * Header is in posix/sys/socket.h\b + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + * Improved by Marc Boucher and David Haas + * + */ + +#include "lwip/opt.h" + +#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/sockets.h" +#include "lwip/api.h" +#include "lwip/sys.h" +#include "lwip/igmp.h" +#include "lwip/inet.h" +#include "lwip/tcp.h" +#include "lwip/raw.h" +#include "lwip/udp.h" +#include "lwip/memp.h" +#include "lwip/pbuf.h" +#include "lwip/priv/tcpip_priv.h" +#if LWIP_CHECKSUM_ON_COPY +#include "lwip/inet_chksum.h" +#endif + +#include + +/* If the netconn API is not required publicly, then we include the necessary + files here to get the implementation */ +#if !LWIP_NETCONN +#undef LWIP_NETCONN +#define LWIP_NETCONN 1 +#include "api_msg.c" +#include "api_lib.c" +#include "netbuf.c" +#undef LWIP_NETCONN +#define LWIP_NETCONN 0 +#endif + +#if LWIP_IPV4 +#define IP4ADDR_PORT_TO_SOCKADDR(sin, ipaddr, port) do { \ + (sin)->sin_len = sizeof(struct sockaddr_in); \ + (sin)->sin_family = AF_INET; \ + (sin)->sin_port = lwip_htons((port)); \ + inet_addr_from_ip4addr(&(sin)->sin_addr, ipaddr); \ + memset((sin)->sin_zero, 0, SIN_ZERO_LEN); }while(0) +#define SOCKADDR4_TO_IP4ADDR_PORT(sin, ipaddr, port) do { \ + inet_addr_to_ip4addr(ip_2_ip4(ipaddr), &((sin)->sin_addr)); \ + (port) = lwip_ntohs((sin)->sin_port); }while(0) +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +#define IP6ADDR_PORT_TO_SOCKADDR(sin6, ipaddr, port) do { \ + (sin6)->sin6_len = sizeof(struct sockaddr_in6); \ + (sin6)->sin6_family = AF_INET6; \ + (sin6)->sin6_port = lwip_htons((port)); \ + (sin6)->sin6_flowinfo = 0; \ + inet6_addr_from_ip6addr(&(sin6)->sin6_addr, ipaddr); \ + (sin6)->sin6_scope_id = 0; }while(0) +#define SOCKADDR6_TO_IP6ADDR_PORT(sin6, ipaddr, port) do { \ + inet6_addr_to_ip6addr(ip_2_ip6(ipaddr), &((sin6)->sin6_addr)); \ + (port) = lwip_ntohs((sin6)->sin6_port); }while(0) +#endif /* LWIP_IPV6 */ + +#if LWIP_IPV4 && LWIP_IPV6 +static void sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ipaddr, u16_t* port); + +#define IS_SOCK_ADDR_LEN_VALID(namelen) (((namelen) == sizeof(struct sockaddr_in)) || \ + ((namelen) == sizeof(struct sockaddr_in6))) +#define IS_SOCK_ADDR_TYPE_VALID(name) (((name)->sa_family == AF_INET) || \ + ((name)->sa_family == AF_INET6)) +#define SOCK_ADDR_TYPE_MATCH(name, sock) \ + ((((name)->sa_family == AF_INET) && !(NETCONNTYPE_ISIPV6((sock)->conn->type))) || \ + (((name)->sa_family == AF_INET6) && (NETCONNTYPE_ISIPV6((sock)->conn->type)))) +#define IPADDR_PORT_TO_SOCKADDR(sockaddr, ipaddr, port) do { \ + if (IP_IS_V6(ipaddr)) { \ + IP6ADDR_PORT_TO_SOCKADDR((struct sockaddr_in6*)(void*)(sockaddr), ip_2_ip6(ipaddr), port); \ + } else { \ + IP4ADDR_PORT_TO_SOCKADDR((struct sockaddr_in*)(void*)(sockaddr), ip_2_ip4(ipaddr), port); \ + } } while(0) +#define SOCKADDR_TO_IPADDR_PORT(sockaddr, ipaddr, port) sockaddr_to_ipaddr_port(sockaddr, ipaddr, &(port)) +#define DOMAIN_TO_NETCONN_TYPE(domain, type) (((domain) == AF_INET) ? \ + (type) : (enum netconn_type)((type) | NETCONN_TYPE_IPV6)) +#elif LWIP_IPV6 /* LWIP_IPV4 && LWIP_IPV6 */ +#define IS_SOCK_ADDR_LEN_VALID(namelen) ((namelen) == sizeof(struct sockaddr_in6)) +#define IS_SOCK_ADDR_TYPE_VALID(name) ((name)->sa_family == AF_INET6) +#define SOCK_ADDR_TYPE_MATCH(name, sock) 1 +#define IPADDR_PORT_TO_SOCKADDR(sockaddr, ipaddr, port) \ + IP6ADDR_PORT_TO_SOCKADDR((struct sockaddr_in6*)(void*)(sockaddr), ip_2_ip6(ipaddr), port) +#define SOCKADDR_TO_IPADDR_PORT(sockaddr, ipaddr, port) \ + SOCKADDR6_TO_IP6ADDR_PORT((const struct sockaddr_in6*)(const void*)(sockaddr), ipaddr, port) +#define DOMAIN_TO_NETCONN_TYPE(domain, netconn_type) (netconn_type) +#else /*-> LWIP_IPV4: LWIP_IPV4 && LWIP_IPV6 */ +#define IS_SOCK_ADDR_LEN_VALID(namelen) ((namelen) == sizeof(struct sockaddr_in)) +#define IS_SOCK_ADDR_TYPE_VALID(name) ((name)->sa_family == AF_INET) +#define SOCK_ADDR_TYPE_MATCH(name, sock) 1 +#define IPADDR_PORT_TO_SOCKADDR(sockaddr, ipaddr, port) \ + IP4ADDR_PORT_TO_SOCKADDR((struct sockaddr_in*)(void*)(sockaddr), ip_2_ip4(ipaddr), port) +#define SOCKADDR_TO_IPADDR_PORT(sockaddr, ipaddr, port) \ + SOCKADDR4_TO_IP4ADDR_PORT((const struct sockaddr_in*)(const void*)(sockaddr), ipaddr, port) +#define DOMAIN_TO_NETCONN_TYPE(domain, netconn_type) (netconn_type) +#endif /* LWIP_IPV6 */ + +#define IS_SOCK_ADDR_TYPE_VALID_OR_UNSPEC(name) (((name)->sa_family == AF_UNSPEC) || \ + IS_SOCK_ADDR_TYPE_VALID(name)) +#define SOCK_ADDR_TYPE_MATCH_OR_UNSPEC(name, sock) (((name)->sa_family == AF_UNSPEC) || \ + SOCK_ADDR_TYPE_MATCH(name, sock)) +#define IS_SOCK_ADDR_ALIGNED(name) ((((mem_ptr_t)(name)) % 4) == 0) + + +#define LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype) do { if ((optlen) < sizeof(opttype)) { return EINVAL; }}while(0) +#define LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, opttype) do { \ + LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype); \ + if ((sock)->conn == NULL) { return EINVAL; } }while(0) +#define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype) do { \ + LWIP_SOCKOPT_CHECK_OPTLEN(optlen, opttype); \ + if (((sock)->conn == NULL) || ((sock)->conn->pcb.tcp == NULL)) { return EINVAL; } }while(0) +#define LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, opttype, netconntype) do { \ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, opttype); \ + if (NETCONNTYPE_GROUP(netconn_type((sock)->conn)) != netconntype) { return ENOPROTOOPT; } }while(0) + + +#define LWIP_SETGETSOCKOPT_DATA_VAR_REF(name) API_VAR_REF(name) +#define LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(name) API_VAR_DECLARE(struct lwip_setgetsockopt_data, name) +#define LWIP_SETGETSOCKOPT_DATA_VAR_FREE(name) API_VAR_FREE(MEMP_SOCKET_SETGETSOCKOPT_DATA, name) +#if LWIP_MPU_COMPATIBLE +#define LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(name, sock) do { \ + name = (struct lwip_setgetsockopt_data *)memp_malloc(MEMP_SOCKET_SETGETSOCKOPT_DATA); \ + if (name == NULL) { \ + sock_set_errno(sock, ENOMEM); \ + return -1; \ + } }while(0) +#else /* LWIP_MPU_COMPATIBLE */ +#define LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(name, sock) +#endif /* LWIP_MPU_COMPATIBLE */ + +#if LWIP_SO_SNDRCVTIMEO_NONSTANDARD +#define LWIP_SO_SNDRCVTIMEO_OPTTYPE int +#define LWIP_SO_SNDRCVTIMEO_SET(optval, val) (*(int *)(optval) = (val)) +#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((s32_t)*(const int*)(optval)) +#else +#define LWIP_SO_SNDRCVTIMEO_OPTTYPE struct timeval +#define LWIP_SO_SNDRCVTIMEO_SET(optval, val) do { \ + s32_t loc = (val); \ + ((struct timeval *)(optval))->tv_sec = (loc) / 1000U; \ + ((struct timeval *)(optval))->tv_usec = ((loc) % 1000U) * 1000U; }while(0) +#define LWIP_SO_SNDRCVTIMEO_GET_MS(optval) ((((const struct timeval *)(optval))->tv_sec * 1000U) + (((const struct timeval *)(optval))->tv_usec / 1000U)) +#endif + +#define NUM_SOCKETS MEMP_NUM_NETCONN + +/** This is overridable for the rare case where more than 255 threads + * select on the same socket... + */ +#ifndef SELWAIT_T +#define SELWAIT_T u8_t +#endif + +/** Contains all internal pointers and states used for a socket */ +struct lwip_sock { + /** sockets currently are built on netconns, each socket has one netconn */ + struct netconn *conn; + /** data that was left from the previous read */ + void *lastdata; + /** offset in the data that was left from the previous read */ + u16_t lastoffset; + /** number of times data was received, set by event_callback(), + tested by the receive and select functions */ + s16_t rcvevent; + /** number of times data was ACKed (free send buffer), set by event_callback(), + tested by select */ + u16_t sendevent; + /** error happened for this socket, set by event_callback(), tested by select */ + u16_t errevent; + /** last error that occurred on this socket (in fact, all our errnos fit into an u8_t) */ + u8_t err; + /** counter of how many threads are waiting for this socket using select */ + SELWAIT_T select_waiting; +}; + +#if LWIP_NETCONN_SEM_PER_THREAD +#define SELECT_SEM_T sys_sem_t* +#define SELECT_SEM_PTR(sem) (sem) +#else /* LWIP_NETCONN_SEM_PER_THREAD */ +#define SELECT_SEM_T sys_sem_t +#define SELECT_SEM_PTR(sem) (&(sem)) +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + +/** Description for a task waiting in select */ +struct lwip_select_cb { + /** Pointer to the next waiting task */ + struct lwip_select_cb *next; + /** Pointer to the previous waiting task */ + struct lwip_select_cb *prev; + /** readset passed to select */ + fd_set *readset; + /** writeset passed to select */ + fd_set *writeset; + /** unimplemented: exceptset passed to select */ + fd_set *exceptset; + /** don't signal the same semaphore twice: set to 1 when signalled */ + int sem_signalled; + /** semaphore to wake up a task waiting for select */ + SELECT_SEM_T sem; +}; + +/** A struct sockaddr replacement that has the same alignment as sockaddr_in/ + * sockaddr_in6 if instantiated. + */ +union sockaddr_aligned { + struct sockaddr sa; +#if LWIP_IPV6 + struct sockaddr_in6 sin6; +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + struct sockaddr_in sin; +#endif /* LWIP_IPV4 */ +}; + +#if LWIP_IGMP +/* Define the number of IPv4 multicast memberships, default is one per socket */ +#ifndef LWIP_SOCKET_MAX_MEMBERSHIPS +#define LWIP_SOCKET_MAX_MEMBERSHIPS NUM_SOCKETS +#endif + +/* This is to keep track of IP_ADD_MEMBERSHIP calls to drop the membership when + a socket is closed */ +struct lwip_socket_multicast_pair { + /** the socket */ + struct lwip_sock* sock; + /** the interface address */ + ip4_addr_t if_addr; + /** the group address */ + ip4_addr_t multi_addr; +}; + +struct lwip_socket_multicast_pair socket_ipv4_multicast_memberships[LWIP_SOCKET_MAX_MEMBERSHIPS]; + +static int lwip_socket_register_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr); +static void lwip_socket_unregister_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr); +static void lwip_socket_drop_registered_memberships(int s); +#endif /* LWIP_IGMP */ + +/** The global array of available sockets */ +static struct lwip_sock sockets[NUM_SOCKETS]; +/** The global list of tasks waiting for select */ +static struct lwip_select_cb *select_cb_list; +/** This counter is increased from lwip_select when the list is changed + and checked in event_callback to see if it has changed. */ +static volatile int select_cb_ctr; + +#if LWIP_SOCKET_SET_ERRNO +#ifndef set_errno +#define set_errno(err) do { if (err) { errno = (err); } } while(0) +#endif +#else /* LWIP_SOCKET_SET_ERRNO */ +#define set_errno(err) +#endif /* LWIP_SOCKET_SET_ERRNO */ + +#define sock_set_errno(sk, e) do { \ + const int sockerr = (e); \ + sk->err = (u8_t)sockerr; \ + set_errno(sockerr); \ +} while (0) + +/* Forward declaration of some functions */ +static void event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len); +#if !LWIP_TCPIP_CORE_LOCKING +static void lwip_getsockopt_callback(void *arg); +static void lwip_setsockopt_callback(void *arg); +#endif +static u8_t lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen); +static u8_t lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen); + +#if LWIP_IPV4 && LWIP_IPV6 +static void +sockaddr_to_ipaddr_port(const struct sockaddr* sockaddr, ip_addr_t* ipaddr, u16_t* port) +{ + if ((sockaddr->sa_family) == AF_INET6) { + SOCKADDR6_TO_IP6ADDR_PORT((const struct sockaddr_in6*)(const void*)(sockaddr), ipaddr, *port); + ipaddr->type = IPADDR_TYPE_V6; + } else { + SOCKADDR4_TO_IP4ADDR_PORT((const struct sockaddr_in*)(const void*)(sockaddr), ipaddr, *port); + ipaddr->type = IPADDR_TYPE_V4; + } +} +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + +/** LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore */ +void +lwip_socket_thread_init(void) +{ + netconn_thread_init(); +} + +/** LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore */ +void +lwip_socket_thread_cleanup(void) +{ + netconn_thread_cleanup(); +} + +/** + * Map a externally used socket index to the internal socket representation. + * + * @param s externally used socket index + * @return struct lwip_sock for the socket or NULL if not found + */ +static struct lwip_sock * +get_socket(int s) +{ + struct lwip_sock *sock; + + s -= LWIP_SOCKET_OFFSET; + + if ((s < 0) || (s >= NUM_SOCKETS)) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", s + LWIP_SOCKET_OFFSET)); + set_errno(EBADF); + return NULL; + } + + sock = &sockets[s]; + + if (!sock->conn) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): not active\n", s + LWIP_SOCKET_OFFSET)); + set_errno(EBADF); + return NULL; + } + + return sock; +} + +/** + * Same as get_socket but doesn't set errno + * + * @param s externally used socket index + * @return struct lwip_sock for the socket or NULL if not found + */ +static struct lwip_sock * +tryget_socket(int s) +{ + s -= LWIP_SOCKET_OFFSET; + if ((s < 0) || (s >= NUM_SOCKETS)) { + return NULL; + } + if (!sockets[s].conn) { + return NULL; + } + return &sockets[s]; +} + +/** + * Allocate a new socket for a given netconn. + * + * @param newconn the netconn for which to allocate a socket + * @param accepted 1 if socket has been created by accept(), + * 0 if socket has been created by socket() + * @return the index of the new socket; -1 on error + */ +static int +alloc_socket(struct netconn *newconn, int accepted) +{ + int i; + SYS_ARCH_DECL_PROTECT(lev); + + /* allocate a new socket identifier */ + for (i = 0; i < NUM_SOCKETS; ++i) { + /* Protect socket array */ + SYS_ARCH_PROTECT(lev); + if (!sockets[i].conn && (sockets[i].select_waiting == 0)) { + sockets[i].conn = newconn; + /* The socket is not yet known to anyone, so no need to protect + after having marked it as used. */ + SYS_ARCH_UNPROTECT(lev); + sockets[i].lastdata = NULL; + sockets[i].lastoffset = 0; + sockets[i].rcvevent = 0; + /* TCP sendbuf is empty, but the socket is not yet writable until connected + * (unless it has been created by accept()). */ + sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1); + sockets[i].errevent = 0; + sockets[i].err = 0; + return i + LWIP_SOCKET_OFFSET; + } + SYS_ARCH_UNPROTECT(lev); + } + return -1; +} + +/** Free a socket. The socket's netconn must have been + * delete before! + * + * @param sock the socket to free + * @param is_tcp != 0 for TCP sockets, used to free lastdata + */ +static void +free_socket(struct lwip_sock *sock, int is_tcp) +{ + void *lastdata; + + lastdata = sock->lastdata; + sock->lastdata = NULL; + sock->lastoffset = 0; + sock->err = 0; + + /* Protect socket array */ + SYS_ARCH_SET(sock->conn, NULL); + /* don't use 'sock' after this line, as another task might have allocated it */ + + if (lastdata != NULL) { + if (is_tcp) { + pbuf_free((struct pbuf *)lastdata); + } else { + netbuf_delete((struct netbuf *)lastdata); + } + } +} + +/* Below this, the well-known socket functions are implemented. + * Use google.com or opengroup.org to get a good description :-) + * + * Exceptions are documented! + */ + +int +lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) +{ + struct lwip_sock *sock, *nsock; + struct netconn *newconn; + ip_addr_t naddr; + u16_t port = 0; + int newsock; + err_t err; + SYS_ARCH_DECL_PROTECT(lev); + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d)...\n", s)); + sock = get_socket(s); + if (!sock) { + return -1; + } + + if (netconn_is_nonblocking(sock->conn) && (sock->rcvevent <= 0)) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): returning EWOULDBLOCK\n", s)); + set_errno(EWOULDBLOCK); + return -1; + } + + /* wait for a new connection */ + err = netconn_accept(sock->conn, &newconn); + if (err != ERR_OK) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_acept failed, err=%d\n", s, err)); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { + sock_set_errno(sock, EOPNOTSUPP); + } else if (err == ERR_CLSD) { + sock_set_errno(sock, EINVAL); + } else { + sock_set_errno(sock, err_to_errno(err)); + } + return -1; + } + LWIP_ASSERT("newconn != NULL", newconn != NULL); + + newsock = alloc_socket(newconn, 1); + if (newsock == -1) { + netconn_delete(newconn); + sock_set_errno(sock, ENFILE); + return -1; + } + LWIP_ASSERT("invalid socket index", (newsock >= LWIP_SOCKET_OFFSET) && (newsock < NUM_SOCKETS + LWIP_SOCKET_OFFSET)); + LWIP_ASSERT("newconn->callback == event_callback", newconn->callback == event_callback); + nsock = &sockets[newsock - LWIP_SOCKET_OFFSET]; + + /* See event_callback: If data comes in right away after an accept, even + * though the server task might not have created a new socket yet. + * In that case, newconn->socket is counted down (newconn->socket--), + * so nsock->rcvevent is >= 1 here! + */ + SYS_ARCH_PROTECT(lev); + nsock->rcvevent += (s16_t)(-1 - newconn->socket); + newconn->socket = newsock; + SYS_ARCH_UNPROTECT(lev); + + /* Note that POSIX only requires us to check addr is non-NULL. addrlen must + * not be NULL if addr is valid. + */ + if (addr != NULL) { + union sockaddr_aligned tempaddr; + /* get the IP address and port of the remote host */ + err = netconn_peer(newconn, &naddr, &port); + if (err != ERR_OK) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_peer failed, err=%d\n", s, err)); + netconn_delete(newconn); + free_socket(nsock, 1); + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + LWIP_ASSERT("addr valid but addrlen NULL", addrlen != NULL); + + IPADDR_PORT_TO_SOCKADDR(&tempaddr, &naddr, port); + if (*addrlen > tempaddr.sa.sa_len) { + *addrlen = tempaddr.sa.sa_len; + } + MEMCPY(addr, &tempaddr, *addrlen); + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d) returning new sock=%d addr=", s, newsock)); + ip_addr_debug_print_val(SOCKETS_DEBUG, naddr); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F"\n", port)); + } else { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d) returning new sock=%d", s, newsock)); + } + + sock_set_errno(sock, 0); + return newsock; +} + +int +lwip_bind(int s, const struct sockaddr *name, socklen_t namelen) +{ + struct lwip_sock *sock; + ip_addr_t local_addr; + u16_t local_port; + err_t err; + + sock = get_socket(s); + if (!sock) { + return -1; + } + + if (!SOCK_ADDR_TYPE_MATCH(name, sock)) { + /* sockaddr does not match socket type (IPv4/IPv6) */ + sock_set_errno(sock, err_to_errno(ERR_VAL)); + return -1; + } + + /* check size, family and alignment of 'name' */ + LWIP_ERROR("lwip_bind: invalid address", (IS_SOCK_ADDR_LEN_VALID(namelen) && + IS_SOCK_ADDR_TYPE_VALID(name) && IS_SOCK_ADDR_ALIGNED(name)), + sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + LWIP_UNUSED_ARG(namelen); + + SOCKADDR_TO_IPADDR_PORT(name, &local_addr, local_port); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d, addr=", s)); + ip_addr_debug_print_val(SOCKETS_DEBUG, local_addr); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F")\n", local_port)); + +#if LWIP_IPV4 && LWIP_IPV6 + /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ + if (IP_IS_V6_VAL(local_addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&local_addr))) { + unmap_ipv4_mapped_ipv6(ip_2_ip4(&local_addr), ip_2_ip6(&local_addr)); + IP_SET_TYPE_VAL(local_addr, IPADDR_TYPE_V4); + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + err = netconn_bind(sock->conn, &local_addr, local_port); + + if (err != ERR_OK) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) failed, err=%d\n", s, err)); + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) succeeded\n", s)); + sock_set_errno(sock, 0); + return 0; +} + +int +lwip_close(int s) +{ + struct lwip_sock *sock; + int is_tcp = 0; + err_t err; + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_close(%d)\n", s)); + + sock = get_socket(s); + if (!sock) { + return -1; + } + + if (sock->conn != NULL) { + is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP; + } else { + LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata == NULL); + } + +#if LWIP_IGMP + /* drop all possibly joined IGMP memberships */ + lwip_socket_drop_registered_memberships(s); +#endif /* LWIP_IGMP */ + + err = netconn_delete(sock->conn); + if (err != ERR_OK) { + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + + free_socket(sock, is_tcp); + set_errno(0); + return 0; +} + +int +lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) +{ + struct lwip_sock *sock; + err_t err; + + sock = get_socket(s); + if (!sock) { + return -1; + } + + if (!SOCK_ADDR_TYPE_MATCH_OR_UNSPEC(name, sock)) { + /* sockaddr does not match socket type (IPv4/IPv6) */ + sock_set_errno(sock, err_to_errno(ERR_VAL)); + return -1; + } + + LWIP_UNUSED_ARG(namelen); + if (name->sa_family == AF_UNSPEC) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, AF_UNSPEC)\n", s)); + err = netconn_disconnect(sock->conn); + } else { + ip_addr_t remote_addr; + u16_t remote_port; + + /* check size, family and alignment of 'name' */ + LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) && + IS_SOCK_ADDR_TYPE_VALID_OR_UNSPEC(name) && IS_SOCK_ADDR_ALIGNED(name), + sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + + SOCKADDR_TO_IPADDR_PORT(name, &remote_addr, remote_port); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, addr=", s)); + ip_addr_debug_print_val(SOCKETS_DEBUG, remote_addr); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F")\n", remote_port)); + +#if LWIP_IPV4 && LWIP_IPV6 + /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ + if (IP_IS_V6_VAL(remote_addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&remote_addr))) { + unmap_ipv4_mapped_ipv6(ip_2_ip4(&remote_addr), ip_2_ip6(&remote_addr)); + IP_SET_TYPE_VAL(remote_addr, IPADDR_TYPE_V4); + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + err = netconn_connect(sock->conn, &remote_addr, remote_port); + } + + if (err != ERR_OK) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) failed, err=%d\n", s, err)); + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) succeeded\n", s)); + sock_set_errno(sock, 0); + return 0; +} + +/** + * Set a socket into listen mode. + * The socket may not have been used for another connection previously. + * + * @param s the socket to set to listening mode + * @param backlog (ATTENTION: needs TCP_LISTEN_BACKLOG=1) + * @return 0 on success, non-zero on failure + */ +int +lwip_listen(int s, int backlog) +{ + struct lwip_sock *sock; + err_t err; + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d, backlog=%d)\n", s, backlog)); + + sock = get_socket(s); + if (!sock) { + return -1; + } + + /* limit the "backlog" parameter to fit in an u8_t */ + backlog = LWIP_MIN(LWIP_MAX(backlog, 0), 0xff); + + err = netconn_listen_with_backlog(sock->conn, (u8_t)backlog); + + if (err != ERR_OK) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_listen(%d) failed, err=%d\n", s, err)); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { + sock_set_errno(sock, EOPNOTSUPP); + return -1; + } + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + + sock_set_errno(sock, 0); + return 0; +} + +int +lwip_recvfrom(int s, void *mem, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen) +{ + struct lwip_sock *sock; + void *buf = NULL; + struct pbuf *p; + u16_t buflen, copylen; + int off = 0; + u8_t done = 0; + err_t err; + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d, %p, %"SZT_F", 0x%x, ..)\n", s, mem, len, flags)); + sock = get_socket(s); + if (!sock) { + return -1; + } + + do { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: top while sock->lastdata=%p\n", sock->lastdata)); + /* Check if there is data left from the last recv operation. */ + if (sock->lastdata) { + buf = sock->lastdata; + } else { + /* If this is non-blocking call, then check first */ + if (((flags & MSG_DONTWAIT) || netconn_is_nonblocking(sock->conn)) && + (sock->rcvevent <= 0)) { + if (off > 0) { + /* already received data, return that */ + sock_set_errno(sock, 0); + return off; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): returning EWOULDBLOCK\n", s)); + set_errno(EWOULDBLOCK); + return -1; + } + + /* No data was left from the previous operation, so we try to get + some from the network. */ + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { + err = netconn_recv_tcp_pbuf(sock->conn, (struct pbuf **)&buf); + } else { + err = netconn_recv(sock->conn, (struct netbuf **)&buf); + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: netconn_recv err=%d, netbuf=%p\n", + err, buf)); + + if (err != ERR_OK) { + if (off > 0) { + if (err == ERR_CLSD) { + /* closed but already received data, ensure select gets the FIN, too */ + event_callback(sock->conn, NETCONN_EVT_RCVPLUS, 0); + } + /* already received data, return that */ + sock_set_errno(sock, 0); + return off; + } + /* We should really do some error checking here. */ + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): buf == NULL, error is \"%s\"!\n", + s, lwip_strerr(err))); + sock_set_errno(sock, err_to_errno(err)); + if (err == ERR_CLSD) { + return 0; + } else { + return -1; + } + } + LWIP_ASSERT("buf != NULL", buf != NULL); + sock->lastdata = buf; + } + + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { + p = (struct pbuf *)buf; + } else { + p = ((struct netbuf *)buf)->p; + } + buflen = p->tot_len; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: buflen=%"U16_F" len=%"SZT_F" off=%d sock->lastoffset=%"U16_F"\n", + buflen, len, off, sock->lastoffset)); + + buflen -= sock->lastoffset; + + if (len > buflen) { + copylen = buflen; + } else { + copylen = (u16_t)len; + } + + /* copy the contents of the received buffer into + the supplied memory pointer mem */ + pbuf_copy_partial(p, (u8_t*)mem + off, copylen, sock->lastoffset); + + off += copylen; + + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { + LWIP_ASSERT("invalid copylen, len would underflow", len >= copylen); + len -= copylen; + if ((len <= 0) || + (p->flags & PBUF_FLAG_PUSH) || + (sock->rcvevent <= 0) || + ((flags & MSG_PEEK) != 0)) { + done = 1; + } + } else { + done = 1; + } + + /* Check to see from where the data was.*/ + if (done) { +#if !SOCKETS_DEBUG + if (from && fromlen) +#endif /* !SOCKETS_DEBUG */ + { + u16_t port; + ip_addr_t tmpaddr; + ip_addr_t *fromaddr; + union sockaddr_aligned saddr; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): addr=", s)); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { + fromaddr = &tmpaddr; + netconn_getaddr(sock->conn, fromaddr, &port, 0); + } else { + port = netbuf_fromport((struct netbuf *)buf); + fromaddr = netbuf_fromaddr((struct netbuf *)buf); + } + +#if LWIP_IPV4 && LWIP_IPV6 + /* Dual-stack: Map IPv4 addresses to IPv4 mapped IPv6 */ + if (NETCONNTYPE_ISIPV6(netconn_type(sock->conn)) && IP_IS_V4(fromaddr)) { + ip4_2_ipv4_mapped_ipv6(ip_2_ip6(fromaddr), ip_2_ip4(fromaddr)); + IP_SET_TYPE(fromaddr, IPADDR_TYPE_V6); + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port); + ip_addr_debug_print(SOCKETS_DEBUG, fromaddr); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F" len=%d\n", port, off)); +#if SOCKETS_DEBUG + if (from && fromlen) +#endif /* SOCKETS_DEBUG */ + { + if (*fromlen > saddr.sa.sa_len) { + *fromlen = saddr.sa.sa_len; + } + MEMCPY(from, &saddr, *fromlen); + } + } + } + + /* If we don't peek the incoming message... */ + if ((flags & MSG_PEEK) == 0) { + /* If this is a TCP socket, check if there is data left in the + buffer. If so, it should be saved in the sock structure for next + time around. */ + if ((NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) && (buflen - copylen > 0)) { + sock->lastdata = buf; + sock->lastoffset += copylen; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: lastdata now netbuf=%p\n", buf)); + } else { + sock->lastdata = NULL; + sock->lastoffset = 0; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: deleting netbuf=%p\n", buf)); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { + pbuf_free((struct pbuf *)buf); + } else { + netbuf_delete((struct netbuf *)buf); + } + buf = NULL; + } + } + } while (!done); + + sock_set_errno(sock, 0); + return off; +} + +int +lwip_read(int s, void *mem, size_t len) +{ + return lwip_recvfrom(s, mem, len, 0, NULL, NULL); +} + +int +lwip_recv(int s, void *mem, size_t len, int flags) +{ + return lwip_recvfrom(s, mem, len, flags, NULL, NULL); +} + +int +lwip_send(int s, const void *data, size_t size, int flags) +{ + struct lwip_sock *sock; + err_t err; + u8_t write_flags; + size_t written; + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d, data=%p, size=%"SZT_F", flags=0x%x)\n", + s, data, size, flags)); + + sock = get_socket(s); + if (!sock) { + return -1; + } + + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { +#if (LWIP_UDP || LWIP_RAW) + return lwip_sendto(s, data, size, flags, NULL, 0); +#else /* (LWIP_UDP || LWIP_RAW) */ + sock_set_errno(sock, err_to_errno(ERR_ARG)); + return -1; +#endif /* (LWIP_UDP || LWIP_RAW) */ + } + + write_flags = NETCONN_COPY | + ((flags & MSG_MORE) ? NETCONN_MORE : 0) | + ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0); + written = 0; + err = netconn_write_partly(sock->conn, data, size, write_flags, &written); + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d) err=%d written=%"SZT_F"\n", s, err, written)); + sock_set_errno(sock, err_to_errno(err)); + return (err == ERR_OK ? (int)written : -1); +} + +int +lwip_sendmsg(int s, const struct msghdr *msg, int flags) +{ + struct lwip_sock *sock; + int i; +#if LWIP_TCP + u8_t write_flags; + size_t written; +#endif + int size = 0; + err_t err = ERR_OK; + + sock = get_socket(s); + if (!sock) { + return -1; + } + + LWIP_ERROR("lwip_sendmsg: invalid msghdr", msg != NULL, + sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + + LWIP_UNUSED_ARG(msg->msg_control); + LWIP_UNUSED_ARG(msg->msg_controllen); + LWIP_UNUSED_ARG(msg->msg_flags); + LWIP_ERROR("lwip_sendmsg: invalid msghdr iov", (msg->msg_iov != NULL && msg->msg_iovlen != 0), + sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { +#if LWIP_TCP + write_flags = NETCONN_COPY | + ((flags & MSG_MORE) ? NETCONN_MORE : 0) | + ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0); + + for (i = 0; i < msg->msg_iovlen; i++) { + u8_t apiflags = write_flags; + if (i + 1 < msg->msg_iovlen) { + apiflags |= NETCONN_MORE; + } + written = 0; + err = netconn_write_partly(sock->conn, msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len, write_flags, &written); + if (err == ERR_OK) { + size += written; + /* check that the entire IO vector was accepected, if not return a partial write */ + if (written != msg->msg_iov[i].iov_len) + break; + } + /* none of this IO vector was accepted, but previous was, return partial write and conceal ERR_WOULDBLOCK */ + else if (err == ERR_WOULDBLOCK && size > 0) { + err = ERR_OK; + /* let ERR_WOULDBLOCK persist on the netconn since we are returning ERR_OK */ + break; + } else { + size = -1; + break; + } + } + sock_set_errno(sock, err_to_errno(err)); + return size; +#else /* LWIP_TCP */ + sock_set_errno(sock, err_to_errno(ERR_ARG)); + return -1; +#endif /* LWIP_TCP */ + } + /* else, UDP and RAW NETCONNs */ +#if LWIP_UDP || LWIP_RAW + { + struct netbuf *chain_buf; + + LWIP_UNUSED_ARG(flags); + LWIP_ERROR("lwip_sendmsg: invalid msghdr name", (((msg->msg_name == NULL) && (msg->msg_namelen == 0)) || + IS_SOCK_ADDR_LEN_VALID(msg->msg_namelen)) , + sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + + /* initialize chain buffer with destination */ + chain_buf = netbuf_new(); + if (!chain_buf) { + sock_set_errno(sock, err_to_errno(ERR_MEM)); + return -1; + } + if (msg->msg_name) { + u16_t remote_port; + SOCKADDR_TO_IPADDR_PORT((const struct sockaddr *)msg->msg_name, &chain_buf->addr, remote_port); + netbuf_fromport(chain_buf) = remote_port; + } +#if LWIP_NETIF_TX_SINGLE_PBUF + for (i = 0; i < msg->msg_iovlen; i++) { + size += msg->msg_iov[i].iov_len; + } + /* Allocate a new netbuf and copy the data into it. */ + if (netbuf_alloc(chain_buf, (u16_t)size) == NULL) { + err = ERR_MEM; + } else { + /* flatten the IO vectors */ + size_t offset = 0; + for (i = 0; i < msg->msg_iovlen; i++) { + MEMCPY(&((u8_t*)chain_buf->p->payload)[offset], msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len); + offset += msg->msg_iov[i].iov_len; + } +#if LWIP_CHECKSUM_ON_COPY + { + /* This can be improved by using LWIP_CHKSUM_COPY() and aggregating the checksum for each IO vector */ + u16_t chksum = ~inet_chksum_pbuf(chain_buf->p); + netbuf_set_chksum(chain_buf, chksum); + } +#endif /* LWIP_CHECKSUM_ON_COPY */ + err = ERR_OK; + } +#else /* LWIP_NETIF_TX_SINGLE_PBUF */ + /* create a chained netbuf from the IO vectors. NOTE: we assemble a pbuf chain + manually to avoid having to allocate, chain, and delete a netbuf for each iov */ + for (i = 0; i < msg->msg_iovlen; i++) { + struct pbuf *p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); + if (p == NULL) { + err = ERR_MEM; /* let netbuf_delete() cleanup chain_buf */ + break; + } + p->payload = msg->msg_iov[i].iov_base; + LWIP_ASSERT("iov_len < u16_t", msg->msg_iov[i].iov_len <= 0xFFFF); + p->len = p->tot_len = (u16_t)msg->msg_iov[i].iov_len; + /* netbuf empty, add new pbuf */ + if (chain_buf->p == NULL) { + chain_buf->p = chain_buf->ptr = p; + /* add pbuf to existing pbuf chain */ + } else { + pbuf_cat(chain_buf->p, p); + } + } + /* save size of total chain */ + if (err == ERR_OK) { + size = netbuf_len(chain_buf); + } +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + + if (err == ERR_OK) { +#if LWIP_IPV4 && LWIP_IPV6 + /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ + if (IP_IS_V6_VAL(chain_buf->addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&chain_buf->addr))) { + unmap_ipv4_mapped_ipv6(ip_2_ip4(&chain_buf->addr), ip_2_ip6(&chain_buf->addr)); + IP_SET_TYPE_VAL(chain_buf->addr, IPADDR_TYPE_V4); + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + /* send the data */ + err = netconn_send(sock->conn, chain_buf); + } + + /* deallocated the buffer */ + netbuf_delete(chain_buf); + + sock_set_errno(sock, err_to_errno(err)); + return (err == ERR_OK ? size : -1); + } +#else /* LWIP_UDP || LWIP_RAW */ + sock_set_errno(sock, err_to_errno(ERR_ARG)); + return -1; +#endif /* LWIP_UDP || LWIP_RAW */ +} + +int +lwip_sendto(int s, const void *data, size_t size, int flags, + const struct sockaddr *to, socklen_t tolen) +{ + struct lwip_sock *sock; + err_t err; + u16_t short_size; + u16_t remote_port; + struct netbuf buf; + + sock = get_socket(s); + if (!sock) { + return -1; + } + + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { +#if LWIP_TCP + return lwip_send(s, data, size, flags); +#else /* LWIP_TCP */ + LWIP_UNUSED_ARG(flags); + sock_set_errno(sock, err_to_errno(ERR_ARG)); + return -1; +#endif /* LWIP_TCP */ + } + + /* @todo: split into multiple sendto's? */ + LWIP_ASSERT("lwip_sendto: size must fit in u16_t", size <= 0xffff); + short_size = (u16_t)size; + LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || + (IS_SOCK_ADDR_LEN_VALID(tolen) && + IS_SOCK_ADDR_TYPE_VALID(to) && IS_SOCK_ADDR_ALIGNED(to))), + sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + LWIP_UNUSED_ARG(tolen); + + /* initialize a buffer */ + buf.p = buf.ptr = NULL; +#if LWIP_CHECKSUM_ON_COPY + buf.flags = 0; +#endif /* LWIP_CHECKSUM_ON_COPY */ + if (to) { + SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port); + } else { + remote_port = 0; + ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr); + } + netbuf_fromport(&buf) = remote_port; + + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_sendto(%d, data=%p, short_size=%"U16_F", flags=0x%x to=", + s, data, short_size, flags)); + ip_addr_debug_print(SOCKETS_DEBUG, &buf.addr); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F"\n", remote_port)); + + /* make the buffer point to the data that should be sent */ +#if LWIP_NETIF_TX_SINGLE_PBUF + /* Allocate a new netbuf and copy the data into it. */ + if (netbuf_alloc(&buf, short_size) == NULL) { + err = ERR_MEM; + } else { +#if LWIP_CHECKSUM_ON_COPY + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_RAW) { + u16_t chksum = LWIP_CHKSUM_COPY(buf.p->payload, data, short_size); + netbuf_set_chksum(&buf, chksum); + } else +#endif /* LWIP_CHECKSUM_ON_COPY */ + { + MEMCPY(buf.p->payload, data, short_size); + } + err = ERR_OK; + } +#else /* LWIP_NETIF_TX_SINGLE_PBUF */ + err = netbuf_ref(&buf, data, short_size); +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + if (err == ERR_OK) { +#if LWIP_IPV4 && LWIP_IPV6 + /* Dual-stack: Unmap IPv4 mapped IPv6 addresses */ + if (IP_IS_V6_VAL(buf.addr) && ip6_addr_isipv4mappedipv6(ip_2_ip6(&buf.addr))) { + unmap_ipv4_mapped_ipv6(ip_2_ip4(&buf.addr), ip_2_ip6(&buf.addr)); + IP_SET_TYPE_VAL(buf.addr, IPADDR_TYPE_V4); + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + /* send the data */ + err = netconn_send(sock->conn, &buf); + } + + /* deallocated the buffer */ + netbuf_free(&buf); + + sock_set_errno(sock, err_to_errno(err)); + return (err == ERR_OK ? short_size : -1); +} + +int +lwip_socket(int domain, int type, int protocol) +{ + struct netconn *conn; + int i; + + LWIP_UNUSED_ARG(domain); /* @todo: check this */ + + /* create a netconn */ + switch (type) { + case SOCK_RAW: + conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), + (u8_t)protocol, event_callback); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_RAW, %d) = ", + domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); + break; + case SOCK_DGRAM: + conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, + ((protocol == IPPROTO_UDPLITE) ? NETCONN_UDPLITE : NETCONN_UDP)) , + event_callback); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_DGRAM, %d) = ", + domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); + break; + case SOCK_STREAM: + conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), event_callback); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_STREAM, %d) = ", + domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%d, %d/UNKNOWN, %d) = -1\n", + domain, type, protocol)); + set_errno(EINVAL); + return -1; + } + + if (!conn) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("-1 / ENOBUFS (could not create netconn)\n")); + set_errno(ENOBUFS); + return -1; + } + + i = alloc_socket(conn, 0); + + if (i == -1) { + netconn_delete(conn); + set_errno(ENFILE); + return -1; + } + conn->socket = i; + LWIP_DEBUGF(SOCKETS_DEBUG, ("%d\n", i)); + set_errno(0); + return i; +} + +int +lwip_write(int s, const void *data, size_t size) +{ + return lwip_send(s, data, size, 0); +} + +int +lwip_writev(int s, const struct iovec *iov, int iovcnt) +{ + struct msghdr msg; + + msg.msg_name = NULL; + msg.msg_namelen = 0; + /* Hack: we have to cast via number to cast from 'const' pointer to non-const. + Blame the opengroup standard for this inconsistency. */ + msg.msg_iov = LWIP_CONST_CAST(struct iovec *, iov); + msg.msg_iovlen = iovcnt; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + return lwip_sendmsg(s, &msg, 0); +} + +/** + * Go through the readset and writeset lists and see which socket of the sockets + * set in the sets has events. On return, readset, writeset and exceptset have + * the sockets enabled that had events. + * + * @param maxfdp1 the highest socket index in the sets + * @param readset_in set of sockets to check for read events + * @param writeset_in set of sockets to check for write events + * @param exceptset_in set of sockets to check for error events + * @param readset_out set of sockets that had read events + * @param writeset_out set of sockets that had write events + * @param exceptset_out set os sockets that had error events + * @return number of sockets that had events (read/write/exception) (>= 0) + */ +static int +lwip_selscan(int maxfdp1, fd_set *readset_in, fd_set *writeset_in, fd_set *exceptset_in, + fd_set *readset_out, fd_set *writeset_out, fd_set *exceptset_out) +{ + int i, nready = 0; + fd_set lreadset, lwriteset, lexceptset; + struct lwip_sock *sock; + SYS_ARCH_DECL_PROTECT(lev); + + FD_ZERO(&lreadset); + FD_ZERO(&lwriteset); + FD_ZERO(&lexceptset); + + /* Go through each socket in each list to count number of sockets which + currently match */ + for (i = LWIP_SOCKET_OFFSET; i < maxfdp1; i++) { + /* if this FD is not in the set, continue */ + if (!(readset_in && FD_ISSET(i, readset_in)) && + !(writeset_in && FD_ISSET(i, writeset_in)) && + !(exceptset_in && FD_ISSET(i, exceptset_in))) { + continue; + } + /* First get the socket's status (protected)... */ + SYS_ARCH_PROTECT(lev); + sock = tryget_socket(i); + if (sock != NULL) { + void* lastdata = sock->lastdata; + s16_t rcvevent = sock->rcvevent; + u16_t sendevent = sock->sendevent; + u16_t errevent = sock->errevent; + SYS_ARCH_UNPROTECT(lev); + + /* ... then examine it: */ + /* See if netconn of this socket is ready for read */ + if (readset_in && FD_ISSET(i, readset_in) && ((lastdata != NULL) || (rcvevent > 0))) { + FD_SET(i, &lreadset); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for reading\n", i)); + nready++; + } + /* See if netconn of this socket is ready for write */ + if (writeset_in && FD_ISSET(i, writeset_in) && (sendevent != 0)) { + FD_SET(i, &lwriteset); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for writing\n", i)); + nready++; + } + /* See if netconn of this socket had an error */ + if (exceptset_in && FD_ISSET(i, exceptset_in) && (errevent != 0)) { + FD_SET(i, &lexceptset); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for exception\n", i)); + nready++; + } + } else { + SYS_ARCH_UNPROTECT(lev); + /* continue on to next FD in list */ + } + } + /* copy local sets to the ones provided as arguments */ + *readset_out = lreadset; + *writeset_out = lwriteset; + *exceptset_out = lexceptset; + + LWIP_ASSERT("nready >= 0", nready >= 0); + return nready; +} + +int +lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, + struct timeval *timeout) +{ + u32_t waitres = 0; + int nready; + fd_set lreadset, lwriteset, lexceptset; + u32_t msectimeout; + struct lwip_select_cb select_cb; + int i; + int maxfdp2; +#if LWIP_NETCONN_SEM_PER_THREAD + int waited = 0; +#endif + SYS_ARCH_DECL_PROTECT(lev); + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select(%d, %p, %p, %p, tvsec=%"S32_F" tvusec=%"S32_F")\n", + maxfdp1, (void *)readset, (void *) writeset, (void *) exceptset, + timeout ? (s32_t)timeout->tv_sec : (s32_t)-1, + timeout ? (s32_t)timeout->tv_usec : (s32_t)-1)); + + /* Go through each socket in each list to count number of sockets which + currently match */ + nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); + + /* If we don't have any current events, then suspend if we are supposed to */ + if (!nready) { + if (timeout && timeout->tv_sec == 0 && timeout->tv_usec == 0) { + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: no timeout, returning 0\n")); + /* This is OK as the local fdsets are empty and nready is zero, + or we would have returned earlier. */ + goto return_copy_fdsets; + } + + /* None ready: add our semaphore to list: + We don't actually need any dynamic memory. Our entry on the + list is only valid while we are in this function, so it's ok + to use local variables. */ + + select_cb.next = NULL; + select_cb.prev = NULL; + select_cb.readset = readset; + select_cb.writeset = writeset; + select_cb.exceptset = exceptset; + select_cb.sem_signalled = 0; +#if LWIP_NETCONN_SEM_PER_THREAD + select_cb.sem = LWIP_NETCONN_THREAD_SEM_GET(); +#else /* LWIP_NETCONN_SEM_PER_THREAD */ + if (sys_sem_new(&select_cb.sem, 0) != ERR_OK) { + /* failed to create semaphore */ + set_errno(ENOMEM); + return -1; + } +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + /* Protect the select_cb_list */ + SYS_ARCH_PROTECT(lev); + + /* Put this select_cb on top of list */ + select_cb.next = select_cb_list; + if (select_cb_list != NULL) { + select_cb_list->prev = &select_cb; + } + select_cb_list = &select_cb; + /* Increasing this counter tells event_callback that the list has changed. */ + select_cb_ctr++; + + /* Now we can safely unprotect */ + SYS_ARCH_UNPROTECT(lev); + + /* Increase select_waiting for each socket we are interested in */ + maxfdp2 = maxfdp1; + for (i = LWIP_SOCKET_OFFSET; i < maxfdp1; i++) { + if ((readset && FD_ISSET(i, readset)) || + (writeset && FD_ISSET(i, writeset)) || + (exceptset && FD_ISSET(i, exceptset))) { + struct lwip_sock *sock; + SYS_ARCH_PROTECT(lev); + sock = tryget_socket(i); + if (sock != NULL) { + sock->select_waiting++; + LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); + } else { + /* Not a valid socket */ + nready = -1; + maxfdp2 = i; + SYS_ARCH_UNPROTECT(lev); + break; + } + SYS_ARCH_UNPROTECT(lev); + } + } + + if (nready >= 0) { + /* Call lwip_selscan again: there could have been events between + the last scan (without us on the list) and putting us on the list! */ + nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); + if (!nready) { + /* Still none ready, just wait to be woken */ + if (timeout == 0) { + /* Wait forever */ + msectimeout = 0; + } else { + msectimeout = ((timeout->tv_sec * 1000) + ((timeout->tv_usec + 500)/1000)); + if (msectimeout == 0) { + /* Wait 1ms at least (0 means wait forever) */ + msectimeout = 1; + } + } + + waitres = sys_arch_sem_wait(SELECT_SEM_PTR(select_cb.sem), msectimeout); +#if LWIP_NETCONN_SEM_PER_THREAD + waited = 1; +#endif + } + } + + /* Decrease select_waiting for each socket we are interested in */ + for (i = LWIP_SOCKET_OFFSET; i < maxfdp2; i++) { + if ((readset && FD_ISSET(i, readset)) || + (writeset && FD_ISSET(i, writeset)) || + (exceptset && FD_ISSET(i, exceptset))) { + struct lwip_sock *sock; + SYS_ARCH_PROTECT(lev); + sock = tryget_socket(i); + if (sock != NULL) { + /* for now, handle select_waiting==0... */ + LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0); + if (sock->select_waiting > 0) { + sock->select_waiting--; + } + } else { + /* Not a valid socket */ + nready = -1; + } + SYS_ARCH_UNPROTECT(lev); + } + } + /* Take us off the list */ + SYS_ARCH_PROTECT(lev); + if (select_cb.next != NULL) { + select_cb.next->prev = select_cb.prev; + } + if (select_cb_list == &select_cb) { + LWIP_ASSERT("select_cb.prev == NULL", select_cb.prev == NULL); + select_cb_list = select_cb.next; + } else { + LWIP_ASSERT("select_cb.prev != NULL", select_cb.prev != NULL); + select_cb.prev->next = select_cb.next; + } + /* Increasing this counter tells event_callback that the list has changed. */ + select_cb_ctr++; + SYS_ARCH_UNPROTECT(lev); + +#if LWIP_NETCONN_SEM_PER_THREAD + if (select_cb.sem_signalled && (!waited || (waitres == SYS_ARCH_TIMEOUT))) { + /* don't leave the thread-local semaphore signalled */ + sys_arch_sem_wait(select_cb.sem, 1); + } +#else /* LWIP_NETCONN_SEM_PER_THREAD */ + sys_sem_free(&select_cb.sem); +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + if (nready < 0) { + /* This happens when a socket got closed while waiting */ + set_errno(EBADF); + return -1; + } + + if (waitres == SYS_ARCH_TIMEOUT) { + /* Timeout */ + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: timeout expired\n")); + /* This is OK as the local fdsets are empty and nready is zero, + or we would have returned earlier. */ + goto return_copy_fdsets; + } + + /* See what's set */ + nready = lwip_selscan(maxfdp1, readset, writeset, exceptset, &lreadset, &lwriteset, &lexceptset); + } + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_select: nready=%d\n", nready)); +return_copy_fdsets: + set_errno(0); + if (readset) { + *readset = lreadset; + } + if (writeset) { + *writeset = lwriteset; + } + if (exceptset) { + *exceptset = lexceptset; + } + return nready; +} + +/** + * Callback registered in the netconn layer for each socket-netconn. + * Processes recvevent (data available) and wakes up tasks waiting for select. + */ +static void +event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) +{ + int s; + struct lwip_sock *sock; + struct lwip_select_cb *scb; + int last_select_cb_ctr; + SYS_ARCH_DECL_PROTECT(lev); + + LWIP_UNUSED_ARG(len); + + /* Get socket */ + if (conn) { + s = conn->socket; + if (s < 0) { + /* Data comes in right away after an accept, even though + * the server task might not have created a new socket yet. + * Just count down (or up) if that's the case and we + * will use the data later. Note that only receive events + * can happen before the new socket is set up. */ + SYS_ARCH_PROTECT(lev); + if (conn->socket < 0) { + if (evt == NETCONN_EVT_RCVPLUS) { + conn->socket--; + } + SYS_ARCH_UNPROTECT(lev); + return; + } + s = conn->socket; + SYS_ARCH_UNPROTECT(lev); + } + + sock = get_socket(s); + if (!sock) { + return; + } + } else { + return; + } + + SYS_ARCH_PROTECT(lev); + /* Set event as required */ + switch (evt) { + case NETCONN_EVT_RCVPLUS: + sock->rcvevent++; + break; + case NETCONN_EVT_RCVMINUS: + sock->rcvevent--; + break; + case NETCONN_EVT_SENDPLUS: + sock->sendevent = 1; + break; + case NETCONN_EVT_SENDMINUS: + sock->sendevent = 0; + break; + case NETCONN_EVT_ERROR: + sock->errevent = 1; + break; + default: + LWIP_ASSERT("unknown event", 0); + break; + } + + if (sock->select_waiting == 0) { + /* noone is waiting for this socket, no need to check select_cb_list */ + SYS_ARCH_UNPROTECT(lev); + return; + } + + /* Now decide if anyone is waiting for this socket */ + /* NOTE: This code goes through the select_cb_list list multiple times + ONLY IF a select was actually waiting. We go through the list the number + of waiting select calls + 1. This list is expected to be small. */ + + /* At this point, SYS_ARCH is still protected! */ +again: + for (scb = select_cb_list; scb != NULL; scb = scb->next) { + /* remember the state of select_cb_list to detect changes */ + last_select_cb_ctr = select_cb_ctr; + if (scb->sem_signalled == 0) { + /* semaphore not signalled yet */ + int do_signal = 0; + /* Test this select call for our socket */ + if (sock->rcvevent > 0) { + if (scb->readset && FD_ISSET(s, scb->readset)) { + do_signal = 1; + } + } + if (sock->sendevent != 0) { + if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { + do_signal = 1; + } + } + if (sock->errevent != 0) { + if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { + do_signal = 1; + } + } + if (do_signal) { + scb->sem_signalled = 1; + /* 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)); + } + } + /* unlock interrupts with each step */ + SYS_ARCH_UNPROTECT(lev); + /* this makes sure interrupt protection time is short */ + SYS_ARCH_PROTECT(lev); + if (last_select_cb_ctr != select_cb_ctr) { + /* someone has changed select_cb_list, restart at the beginning */ + goto again; + } + } + SYS_ARCH_UNPROTECT(lev); +} + +/** + * Close one end of a full-duplex connection. + */ +int +lwip_shutdown(int s, int how) +{ + struct lwip_sock *sock; + err_t err; + u8_t shut_rx = 0, shut_tx = 0; + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_shutdown(%d, how=%d)\n", s, how)); + + sock = get_socket(s); + if (!sock) { + return -1; + } + + if (sock->conn != NULL) { + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { + sock_set_errno(sock, EOPNOTSUPP); + return -1; + } + } else { + sock_set_errno(sock, ENOTCONN); + return -1; + } + + if (how == SHUT_RD) { + shut_rx = 1; + } else if (how == SHUT_WR) { + shut_tx = 1; + } else if (how == SHUT_RDWR) { + shut_rx = 1; + shut_tx = 1; + } else { + sock_set_errno(sock, EINVAL); + return -1; + } + err = netconn_shutdown(sock->conn, shut_rx, shut_tx); + + sock_set_errno(sock, err_to_errno(err)); + return (err == ERR_OK ? 0 : -1); +} + +static int +lwip_getaddrname(int s, struct sockaddr *name, socklen_t *namelen, u8_t local) +{ + struct lwip_sock *sock; + union sockaddr_aligned saddr; + ip_addr_t naddr; + u16_t port; + err_t err; + + sock = get_socket(s); + if (!sock) { + return -1; + } + + /* get the IP address and port */ + err = netconn_getaddr(sock->conn, &naddr, &port, local); + if (err != ERR_OK) { + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + +#if LWIP_IPV4 && LWIP_IPV6 + /* Dual-stack: Map IPv4 addresses to IPv4 mapped IPv6 */ + if (NETCONNTYPE_ISIPV6(netconn_type(sock->conn)) && + IP_IS_V4_VAL(naddr)) { + ip4_2_ipv4_mapped_ipv6(ip_2_ip6(&naddr), ip_2_ip4(&naddr)); + IP_SET_TYPE_VAL(naddr, IPADDR_TYPE_V6); + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + IPADDR_PORT_TO_SOCKADDR(&saddr, &naddr, port); + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getaddrname(%d, addr=", s)); + ip_addr_debug_print_val(SOCKETS_DEBUG, naddr); + LWIP_DEBUGF(SOCKETS_DEBUG, (" port=%"U16_F")\n", port)); + + if (*namelen > saddr.sa.sa_len) { + *namelen = saddr.sa.sa_len; + } + MEMCPY(name, &saddr, *namelen); + + sock_set_errno(sock, 0); + return 0; +} + +int +lwip_getpeername(int s, struct sockaddr *name, socklen_t *namelen) +{ + return lwip_getaddrname(s, name, namelen, 0); +} + +int +lwip_getsockname(int s, struct sockaddr *name, socklen_t *namelen) +{ + return lwip_getaddrname(s, name, namelen, 1); +} + +int +lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) +{ + u8_t err; + struct lwip_sock *sock = get_socket(s); +#if !LWIP_TCPIP_CORE_LOCKING + LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(data); +#endif /* !LWIP_TCPIP_CORE_LOCKING */ + + if (!sock) { + return -1; + } + + if ((NULL == optval) || (NULL == optlen)) { + sock_set_errno(sock, EFAULT); + return -1; + } + +#if LWIP_TCPIP_CORE_LOCKING + /* core-locking can just call the -impl function */ + LOCK_TCPIP_CORE(); + err = lwip_getsockopt_impl(s, level, optname, optval, optlen); + UNLOCK_TCPIP_CORE(); + +#else /* LWIP_TCPIP_CORE_LOCKING */ + +#if LWIP_MPU_COMPATIBLE + /* MPU_COMPATIBLE copies the optval data, so check for max size here */ + if (*optlen > LWIP_SETGETSOCKOPT_MAXOPTLEN) { + sock_set_errno(sock, ENOBUFS); + return -1; + } +#endif /* LWIP_MPU_COMPATIBLE */ + + LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(data, sock); + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).s = s; + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).level = level; + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optname = optname; + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen = *optlen; +#if !LWIP_MPU_COMPATIBLE + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval.p = optval; +#endif /* !LWIP_MPU_COMPATIBLE */ + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err = 0; +#if LWIP_NETCONN_SEM_PER_THREAD + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = LWIP_NETCONN_THREAD_SEM_GET(); +#else + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = &sock->conn->op_completed; +#endif + err = tcpip_callback(lwip_getsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); + if (err != ERR_OK) { + LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + sys_arch_sem_wait((sys_sem_t*)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); + + /* write back optlen and optval */ + *optlen = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen; +#if LWIP_MPU_COMPATIBLE + MEMCPY(optval, LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval, + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen); +#endif /* LWIP_MPU_COMPATIBLE */ + + /* maybe lwip_getsockopt_internal has changed err */ + err = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err; + LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); +#endif /* LWIP_TCPIP_CORE_LOCKING */ + + sock_set_errno(sock, err); + return err ? -1 : 0; +} + +#if !LWIP_TCPIP_CORE_LOCKING +/** lwip_getsockopt_callback: only used without CORE_LOCKING + * to get into the tcpip_thread + */ +static void +lwip_getsockopt_callback(void *arg) +{ + struct lwip_setgetsockopt_data *data; + LWIP_ASSERT("arg != NULL", arg != NULL); + data = (struct lwip_setgetsockopt_data*)arg; + + data->err = lwip_getsockopt_impl(data->s, data->level, data->optname, +#if LWIP_MPU_COMPATIBLE + data->optval, +#else /* LWIP_MPU_COMPATIBLE */ + data->optval.p, +#endif /* LWIP_MPU_COMPATIBLE */ + &data->optlen); + + sys_sem_signal((sys_sem_t*)(data->completed_sem)); +} +#endif /* LWIP_TCPIP_CORE_LOCKING */ + +/** lwip_getsockopt_impl: the actual implementation of getsockopt: + * same argument as lwip_getsockopt, either called directly or through callback + */ +static u8_t +lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *optlen) +{ + u8_t err = 0; + struct lwip_sock *sock = tryget_socket(s); + if (!sock) { + return EBADF; + } + + switch (level) { + +/* Level: SOL_SOCKET */ + case SOL_SOCKET: + switch (optname) { + +#if LWIP_TCP + case SO_ACCEPTCONN: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + if (NETCONNTYPE_GROUP(sock->conn->type) != NETCONN_TCP) { + return ENOPROTOOPT; + } + if ((sock->conn->pcb.tcp != NULL) && (sock->conn->pcb.tcp->state == LISTEN)) { + *(int*)optval = 1; + } else { + *(int*)optval = 0; + } + break; +#endif /* LWIP_TCP */ + + /* The option flags */ + case SO_BROADCAST: + case SO_KEEPALIVE: +#if SO_REUSE + case SO_REUSEADDR: +#endif /* SO_REUSE */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + *(int*)optval = ip_get_option(sock->conn->pcb.ip, optname); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, optname=0x%x, ..) = %s\n", + s, optname, (*(int*)optval?"on":"off"))); + break; + + case SO_TYPE: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); + switch (NETCONNTYPE_GROUP(netconn_type(sock->conn))) { + case NETCONN_RAW: + *(int*)optval = SOCK_RAW; + break; + case NETCONN_TCP: + *(int*)optval = SOCK_STREAM; + break; + case NETCONN_UDP: + *(int*)optval = SOCK_DGRAM; + break; + default: /* unrecognized socket type */ + *(int*)optval = netconn_type(sock->conn); + LWIP_DEBUGF(SOCKETS_DEBUG, + ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE): unrecognized socket type %d\n", + s, *(int *)optval)); + } /* switch (netconn_type(sock->conn)) */ + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_TYPE) = %d\n", + s, *(int *)optval)); + break; + + case SO_ERROR: + LWIP_SOCKOPT_CHECK_OPTLEN(*optlen, int); + /* only overwrite ERR_OK or temporary errors */ + if (((sock->err == 0) || (sock->err == EINPROGRESS)) && (sock->conn != NULL)) { + sock_set_errno(sock, err_to_errno(sock->conn->last_err)); + } + *(int *)optval = (sock->err == 0xFF ? (int)-1 : (int)sock->err); + sock->err = 0; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, SO_ERROR) = %d\n", + s, *(int *)optval)); + break; + +#if LWIP_SO_SNDTIMEO + case SO_SNDTIMEO: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_sendtimeout(sock->conn)); + break; +#endif /* LWIP_SO_SNDTIMEO */ +#if LWIP_SO_RCVTIMEO + case SO_RCVTIMEO: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + LWIP_SO_SNDRCVTIMEO_SET(optval, netconn_get_recvtimeout(sock->conn)); + break; +#endif /* LWIP_SO_RCVTIMEO */ +#if LWIP_SO_RCVBUF + case SO_RCVBUF: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); + *(int *)optval = netconn_get_recvbufsize(sock->conn); + break; +#endif /* LWIP_SO_RCVBUF */ +#if LWIP_SO_LINGER + case SO_LINGER: + { + s16_t conn_linger; + struct linger* linger = (struct linger*)optval; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, struct linger); + conn_linger = sock->conn->linger; + if (conn_linger >= 0) { + linger->l_onoff = 1; + linger->l_linger = (int)conn_linger; + } else { + linger->l_onoff = 0; + linger->l_linger = 0; + } + } + break; +#endif /* LWIP_SO_LINGER */ +#if LWIP_UDP + case SO_NO_CHECK: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_UDP); +#if LWIP_UDPLITE + if ((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0) { + /* this flag is only available for UDP, not for UDP lite */ + return EAFNOSUPPORT; + } +#endif /* LWIP_UDPLITE */ + *(int*)optval = (udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_NOCHKSUM) ? 1 : 0; + break; +#endif /* LWIP_UDP*/ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; + +/* Level: IPPROTO_IP */ + case IPPROTO_IP: + switch (optname) { + case IP_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + *(int*)optval = sock->conn->pcb.ip->ttl; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TTL) = %d\n", + s, *(int *)optval)); + break; + case IP_TOS: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + *(int*)optval = sock->conn->pcb.ip->tos; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_TOS) = %d\n", + s, *(int *)optval)); + break; +#if LWIP_MULTICAST_TX_OPTIONS + case IP_MULTICAST_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { + return ENOPROTOOPT; + } + *(u8_t*)optval = udp_get_multicast_ttl(sock->conn->pcb.udp); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_TTL) = %d\n", + s, *(int *)optval)); + break; + case IP_MULTICAST_IF: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, struct in_addr); + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) { + return ENOPROTOOPT; + } + inet_addr_from_ip4addr((struct in_addr*)optval, udp_get_multicast_netif_addr(sock->conn->pcb.udp)); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_IF) = 0x%"X32_F"\n", + s, *(u32_t *)optval)); + break; + case IP_MULTICAST_LOOP: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, u8_t); + if ((sock->conn->pcb.udp->flags & UDP_FLAGS_MULTICAST_LOOP) != 0) { + *(u8_t*)optval = 1; + } else { + *(u8_t*)optval = 0; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_LOOP) = %d\n", + s, *(int *)optval)); + break; +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; + +#if LWIP_TCP +/* Level: IPPROTO_TCP */ + case IPPROTO_TCP: + /* Special case: all IPPROTO_TCP option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_TCP); + if (sock->conn->pcb.tcp->state == LISTEN) { + return EINVAL; + } + switch (optname) { + case TCP_NODELAY: + *(int*)optval = tcp_nagle_disabled(sock->conn->pcb.tcp); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_NODELAY) = %s\n", + s, (*(int*)optval)?"on":"off") ); + break; + case TCP_KEEPALIVE: + *(int*)optval = (int)sock->conn->pcb.tcp->keep_idle; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) = %d\n", + s, *(int *)optval)); + break; + +#if LWIP_TCP_KEEPALIVE + case TCP_KEEPIDLE: + *(int*)optval = (int)(sock->conn->pcb.tcp->keep_idle/1000); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) = %d\n", + s, *(int *)optval)); + break; + case TCP_KEEPINTVL: + *(int*)optval = (int)(sock->conn->pcb.tcp->keep_intvl/1000); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) = %d\n", + s, *(int *)optval)); + break; + case TCP_KEEPCNT: + *(int*)optval = (int)sock->conn->pcb.tcp->keep_cnt; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) = %d\n", + s, *(int *)optval)); + break; +#endif /* LWIP_TCP_KEEPALIVE */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; +#endif /* LWIP_TCP */ + +#if LWIP_IPV6 +/* Level: IPPROTO_IPV6 */ + case IPPROTO_IPV6: + switch (optname) { + case IPV6_V6ONLY: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, int); + *(int*)optval = (netconn_get_ipv6only(sock->conn) ? 1 : 0); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY) = %d\n", + s, *(int *)optval)); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; +#endif /* LWIP_IPV6 */ + +#if LWIP_UDP && LWIP_UDPLITE + /* Level: IPPROTO_UDPLITE */ + case IPPROTO_UDPLITE: + /* Special case: all IPPROTO_UDPLITE option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, int); + /* If this is no UDP lite socket, ignore any options. */ + if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { + return ENOPROTOOPT; + } + switch (optname) { + case UDPLITE_SEND_CSCOV: + *(int*)optval = sock->conn->pcb.udp->chksum_len_tx; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) = %d\n", + s, (*(int*)optval)) ); + break; + case UDPLITE_RECV_CSCOV: + *(int*)optval = sock->conn->pcb.udp->chksum_len_rx; + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) = %d\n", + s, (*(int*)optval)) ); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; +#endif /* LWIP_UDP */ + /* Level: IPPROTO_RAW */ + case IPPROTO_RAW: + switch (optname) { +#if LWIP_IPV6 && LWIP_RAW + case IPV6_CHECKSUM: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, *optlen, int, NETCONN_RAW); + if (sock->conn->pcb.raw->chksum_reqd == 0) { + *(int *)optval = -1; + } else { + *(int *)optval = sock->conn->pcb.raw->chksum_offset; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM) = %d\n", + s, (*(int*)optval)) ); + break; +#endif /* LWIP_IPV6 && LWIP_RAW */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", + s, level, optname)); + err = ENOPROTOOPT; + break; + } /* switch (level) */ + + return err; +} + +int +lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) +{ + u8_t err = 0; + struct lwip_sock *sock = get_socket(s); +#if !LWIP_TCPIP_CORE_LOCKING + LWIP_SETGETSOCKOPT_DATA_VAR_DECLARE(data); +#endif /* !LWIP_TCPIP_CORE_LOCKING */ + + if (!sock) { + return -1; + } + + if (NULL == optval) { + sock_set_errno(sock, EFAULT); + return -1; + } + +#if LWIP_TCPIP_CORE_LOCKING + /* core-locking can just call the -impl function */ + LOCK_TCPIP_CORE(); + err = lwip_setsockopt_impl(s, level, optname, optval, optlen); + UNLOCK_TCPIP_CORE(); + +#else /* LWIP_TCPIP_CORE_LOCKING */ + +#if LWIP_MPU_COMPATIBLE + /* MPU_COMPATIBLE copies the optval data, so check for max size here */ + if (optlen > LWIP_SETGETSOCKOPT_MAXOPTLEN) { + sock_set_errno(sock, ENOBUFS); + return -1; + } +#endif /* LWIP_MPU_COMPATIBLE */ + + LWIP_SETGETSOCKOPT_DATA_VAR_ALLOC(data, sock); + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).s = s; + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).level = level; + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optname = optname; + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optlen = optlen; +#if LWIP_MPU_COMPATIBLE + MEMCPY(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval, optval, optlen); +#else /* LWIP_MPU_COMPATIBLE */ + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).optval.pc = (const void*)optval; +#endif /* LWIP_MPU_COMPATIBLE */ + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err = 0; +#if LWIP_NETCONN_SEM_PER_THREAD + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = LWIP_NETCONN_THREAD_SEM_GET(); +#else + LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem = &sock->conn->op_completed; +#endif + err = tcpip_callback(lwip_setsockopt_callback, &LWIP_SETGETSOCKOPT_DATA_VAR_REF(data)); + if (err != ERR_OK) { + LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); + sock_set_errno(sock, err_to_errno(err)); + return -1; + } + sys_arch_sem_wait((sys_sem_t*)(LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).completed_sem), 0); + + /* maybe lwip_getsockopt_internal has changed err */ + err = LWIP_SETGETSOCKOPT_DATA_VAR_REF(data).err; + LWIP_SETGETSOCKOPT_DATA_VAR_FREE(data); +#endif /* LWIP_TCPIP_CORE_LOCKING */ + + sock_set_errno(sock, err); + return err ? -1 : 0; +} + +#if !LWIP_TCPIP_CORE_LOCKING +/** lwip_setsockopt_callback: only used without CORE_LOCKING + * to get into the tcpip_thread + */ +static void +lwip_setsockopt_callback(void *arg) +{ + struct lwip_setgetsockopt_data *data; + LWIP_ASSERT("arg != NULL", arg != NULL); + data = (struct lwip_setgetsockopt_data*)arg; + + data->err = lwip_setsockopt_impl(data->s, data->level, data->optname, +#if LWIP_MPU_COMPATIBLE + data->optval, +#else /* LWIP_MPU_COMPATIBLE */ + data->optval.pc, +#endif /* LWIP_MPU_COMPATIBLE */ + data->optlen); + + sys_sem_signal((sys_sem_t*)(data->completed_sem)); +} +#endif /* LWIP_TCPIP_CORE_LOCKING */ + +/** lwip_setsockopt_impl: the actual implementation of setsockopt: + * same argument as lwip_setsockopt, either called directly or through callback + */ +static u8_t +lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_t optlen) +{ + u8_t err = 0; + struct lwip_sock *sock = tryget_socket(s); + if (!sock) { + return EBADF; + } + + switch (level) { + +/* Level: SOL_SOCKET */ + case SOL_SOCKET: + switch (optname) { + + /* SO_ACCEPTCONN is get-only */ + + /* The option flags */ + case SO_BROADCAST: + case SO_KEEPALIVE: +#if SO_REUSE + case SO_REUSEADDR: +#endif /* SO_REUSE */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + if (*(const int*)optval) { + ip_set_option(sock->conn->pcb.ip, optname); + } else { + ip_reset_option(sock->conn->pcb.ip, optname); + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, optname=0x%x, ..) -> %s\n", + s, optname, (*(const int*)optval?"on":"off"))); + break; + + /* SO_TYPE is get-only */ + /* SO_ERROR is get-only */ + +#if LWIP_SO_SNDTIMEO + case SO_SNDTIMEO: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + netconn_set_sendtimeout(sock->conn, LWIP_SO_SNDRCVTIMEO_GET_MS(optval)); + break; +#endif /* LWIP_SO_SNDTIMEO */ +#if LWIP_SO_RCVTIMEO + case SO_RCVTIMEO: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, LWIP_SO_SNDRCVTIMEO_OPTTYPE); + netconn_set_recvtimeout(sock->conn, (int)LWIP_SO_SNDRCVTIMEO_GET_MS(optval)); + break; +#endif /* LWIP_SO_RCVTIMEO */ +#if LWIP_SO_RCVBUF + case SO_RCVBUF: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, int); + netconn_set_recvbufsize(sock->conn, *(const int*)optval); + break; +#endif /* LWIP_SO_RCVBUF */ +#if LWIP_SO_LINGER + case SO_LINGER: + { + const struct linger* linger = (const struct linger*)optval; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, struct linger); + if (linger->l_onoff) { + int lingersec = linger->l_linger; + if (lingersec < 0) { + return EINVAL; + } + if (lingersec > 0xFFFF) { + lingersec = 0xFFFF; + } + sock->conn->linger = (s16_t)lingersec; + } else { + sock->conn->linger = -1; + } + } + break; +#endif /* LWIP_SO_LINGER */ +#if LWIP_UDP + case SO_NO_CHECK: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_UDP); +#if LWIP_UDPLITE + if ((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0) { + /* this flag is only available for UDP, not for UDP lite */ + return EAFNOSUPPORT; + } +#endif /* LWIP_UDPLITE */ + if (*(const int*)optval) { + udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_NOCHKSUM); + } else { + udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) & ~UDP_FLAGS_NOCHKSUM); + } + break; +#endif /* LWIP_UDP */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; + +/* Level: IPPROTO_IP */ + case IPPROTO_IP: + switch (optname) { + case IP_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + sock->conn->pcb.ip->ttl = (u8_t)(*(const int*)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TTL, ..) -> %d\n", + s, sock->conn->pcb.ip->ttl)); + break; + case IP_TOS: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + sock->conn->pcb.ip->tos = (u8_t)(*(const int*)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, IP_TOS, ..)-> %d\n", + s, sock->conn->pcb.ip->tos)); + break; +#if LWIP_MULTICAST_TX_OPTIONS + case IP_MULTICAST_TTL: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); + udp_set_multicast_ttl(sock->conn->pcb.udp, (u8_t)(*(const u8_t*)optval)); + break; + case IP_MULTICAST_IF: + { + ip4_addr_t if_addr; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct in_addr, NETCONN_UDP); + inet_addr_to_ip4addr(&if_addr, (const struct in_addr*)optval); + udp_set_multicast_netif_addr(sock->conn->pcb.udp, &if_addr); + } + break; + case IP_MULTICAST_LOOP: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP); + if (*(const u8_t*)optval) { + udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_MULTICAST_LOOP); + } else { + udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) & ~UDP_FLAGS_MULTICAST_LOOP); + } + break; +#endif /* LWIP_MULTICAST_TX_OPTIONS */ +#if LWIP_IGMP + case IP_ADD_MEMBERSHIP: + case IP_DROP_MEMBERSHIP: + { + /* If this is a TCP or a RAW socket, ignore these options. */ + /* @todo: assign membership to this socket so that it is dropped when closing the socket */ + err_t igmp_err; + const struct ip_mreq *imr = (const struct ip_mreq *)optval; + ip4_addr_t if_addr; + ip4_addr_t multi_addr; + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct ip_mreq, NETCONN_UDP); + inet_addr_to_ip4addr(&if_addr, &imr->imr_interface); + inet_addr_to_ip4addr(&multi_addr, &imr->imr_multiaddr); + if (optname == IP_ADD_MEMBERSHIP) { + if (!lwip_socket_register_membership(s, &if_addr, &multi_addr)) { + /* cannot track membership (out of memory) */ + err = ENOMEM; + igmp_err = ERR_OK; + } else { + igmp_err = igmp_joingroup(&if_addr, &multi_addr); + } + } else { + igmp_err = igmp_leavegroup(&if_addr, &multi_addr); + lwip_socket_unregister_membership(s, &if_addr, &multi_addr); + } + if (igmp_err != ERR_OK) { + err = EADDRNOTAVAIL; + } + } + break; +#endif /* LWIP_IGMP */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; + +#if LWIP_TCP +/* Level: IPPROTO_TCP */ + case IPPROTO_TCP: + /* Special case: all IPPROTO_TCP option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP); + if (sock->conn->pcb.tcp->state == LISTEN) { + return EINVAL; + } + switch (optname) { + case TCP_NODELAY: + if (*(const int*)optval) { + tcp_nagle_disable(sock->conn->pcb.tcp); + } else { + tcp_nagle_enable(sock->conn->pcb.tcp); + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_NODELAY) -> %s\n", + s, (*(const int *)optval)?"on":"off") ); + break; + case TCP_KEEPALIVE: + sock->conn->pcb.tcp->keep_idle = (u32_t)(*(const int*)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPALIVE) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_idle)); + break; + +#if LWIP_TCP_KEEPALIVE + case TCP_KEEPIDLE: + sock->conn->pcb.tcp->keep_idle = 1000*(u32_t)(*(const int*)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPIDLE) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_idle)); + break; + case TCP_KEEPINTVL: + sock->conn->pcb.tcp->keep_intvl = 1000*(u32_t)(*(const int*)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPINTVL) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_intvl)); + break; + case TCP_KEEPCNT: + sock->conn->pcb.tcp->keep_cnt = (u32_t)(*(const int*)optval); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, TCP_KEEPCNT) -> %"U32_F"\n", + s, sock->conn->pcb.tcp->keep_cnt)); + break; +#endif /* LWIP_TCP_KEEPALIVE */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; +#endif /* LWIP_TCP*/ + +#if LWIP_IPV6 +/* Level: IPPROTO_IPV6 */ + case IPPROTO_IPV6: + switch (optname) { + case IPV6_V6ONLY: + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_TCP); + if (*(const int*)optval) { + netconn_set_ipv6only(sock->conn, 1); + } else { + netconn_set_ipv6only(sock->conn, 0); + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, IPV6_V6ONLY, ..) -> %d\n", + s, (netconn_get_ipv6only(sock->conn) ? 1 : 0))); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IPV6, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; +#endif /* LWIP_IPV6 */ + +#if LWIP_UDP && LWIP_UDPLITE + /* Level: IPPROTO_UDPLITE */ + case IPPROTO_UDPLITE: + /* Special case: all IPPROTO_UDPLITE option take an int */ + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, int); + /* If this is no UDP lite socket, ignore any options. */ + if (!NETCONNTYPE_ISUDPLITE(netconn_type(sock->conn))) { + return ENOPROTOOPT; + } + switch (optname) { + case UDPLITE_SEND_CSCOV: + if ((*(const int*)optval != 0) && ((*(const int*)optval < 8) || (*(const int*)optval > 0xffff))) { + /* don't allow illegal values! */ + sock->conn->pcb.udp->chksum_len_tx = 8; + } else { + sock->conn->pcb.udp->chksum_len_tx = (u16_t)*(const int*)optval; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_SEND_CSCOV) -> %d\n", + s, (*(const int*)optval)) ); + break; + case UDPLITE_RECV_CSCOV: + if ((*(const int*)optval != 0) && ((*(const int*)optval < 8) || (*(const int*)optval > 0xffff))) { + /* don't allow illegal values! */ + sock->conn->pcb.udp->chksum_len_rx = 8; + } else { + sock->conn->pcb.udp->chksum_len_rx = (u16_t)*(const int*)optval; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UDPLITE_RECV_CSCOV) -> %d\n", + s, (*(const int*)optval)) ); + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_UDPLITE, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; +#endif /* LWIP_UDP */ + /* Level: IPPROTO_RAW */ + case IPPROTO_RAW: + switch (optname) { +#if LWIP_IPV6 && LWIP_RAW + case IPV6_CHECKSUM: + /* It should not be possible to disable the checksum generation with ICMPv6 + * as per RFC 3542 chapter 3.1 */ + if(sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) { + return EINVAL; + } + + LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_RAW); + if (*(const int *)optval < 0) { + sock->conn->pcb.raw->chksum_reqd = 0; + } else if (*(const int *)optval & 1) { + /* Per RFC3542, odd offsets are not allowed */ + return EINVAL; + } else { + sock->conn->pcb.raw->chksum_reqd = 1; + sock->conn->pcb.raw->chksum_offset = (u16_t)*(const int *)optval; + } + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, IPV6_CHECKSUM, ..) -> %d\n", + s, sock->conn->pcb.raw->chksum_reqd)); + break; +#endif /* LWIP_IPV6 && LWIP_RAW */ + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_RAW, UNIMPL: optname=0x%x, ..)\n", + s, optname)); + err = ENOPROTOOPT; + break; + } /* switch (optname) */ + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", + s, level, optname)); + err = ENOPROTOOPT; + break; + } /* switch (level) */ + + return err; +} + +int +lwip_ioctl(int s, long cmd, void *argp) +{ + struct lwip_sock *sock = get_socket(s); + u8_t val; +#if LWIP_SO_RCVBUF + u16_t buflen = 0; + int recv_avail; +#endif /* LWIP_SO_RCVBUF */ + + if (!sock) { + return -1; + } + + switch (cmd) { +#if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE + case FIONREAD: + if (!argp) { + sock_set_errno(sock, EINVAL); + return -1; + } +#if LWIP_FIONREAD_LINUXMODE + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { + struct pbuf *p; + if (sock->lastdata) { + p = ((struct netbuf *)sock->lastdata)->p; + *((int*)argp) = p->tot_len - sock->lastoffset; + } else { + struct netbuf *rxbuf; + err_t err; + if (sock->rcvevent <= 0) { + *((int*)argp) = 0; + } else { + err = netconn_recv(sock->conn, &rxbuf); + if (err != ERR_OK) { + *((int*)argp) = 0; + } else { + sock->lastdata = rxbuf; + sock->lastoffset = 0; + *((int*)argp) = rxbuf->p->tot_len; + } + } + } + return 0; + } +#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); + if (recv_avail < 0) { + recv_avail = 0; + } + *((int*)argp) = recv_avail; + + /* Check if there is data left from the last recv operation. /maq 041215 */ + if (sock->lastdata) { + struct pbuf *p = (struct pbuf *)sock->lastdata; + if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { + p = ((struct netbuf *)p)->p; + } + buflen = p->tot_len; + buflen -= sock->lastoffset; + + *((int*)argp) += buflen; + } + + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t*)argp))); + sock_set_errno(sock, 0); + return 0; +#else /* LWIP_SO_RCVBUF */ + break; +#endif /* LWIP_SO_RCVBUF */ +#endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */ + + case (long)FIONBIO: + val = 0; + if (argp && *(u32_t*)argp) { + val = 1; + } + netconn_set_nonblocking(sock->conn, val); + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val)); + sock_set_errno(sock, 0); + return 0; + + 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 */ + return -1; +} + +/** A minimal implementation of fcntl. + * Currently only the commands F_GETFL and F_SETFL are implemented. + * Only the flag O_NONBLOCK is implemented. + */ +int +lwip_fcntl(int s, int cmd, int val) +{ + struct lwip_sock *sock = get_socket(s); + int ret = -1; + + if (!sock) { + return -1; + } + + switch (cmd) { + case F_GETFL: + ret = netconn_is_nonblocking(sock->conn) ? O_NONBLOCK : 0; + sock_set_errno(sock, 0); + break; + case F_SETFL: + if ((val & ~O_NONBLOCK) == 0) { + /* only O_NONBLOCK, all other bits are zero */ + netconn_set_nonblocking(sock->conn, val & O_NONBLOCK); + ret = 0; + sock_set_errno(sock, 0); + } else { + sock_set_errno(sock, ENOSYS); /* not yet implemented */ + } + break; + default: + LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_fcntl(%d, UNIMPL: %d, %d)\n", s, cmd, val)); + sock_set_errno(sock, ENOSYS); /* not yet implemented */ + break; + } + return ret; +} + +#if LWIP_IGMP +/** Register a new IGMP membership. On socket close, the membership is dropped automatically. + * + * ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK). + * + * @return 1 on success, 0 on failure + */ +static int +lwip_socket_register_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr) +{ + struct lwip_sock *sock = get_socket(s); + int i; + + if (!sock) { + return 0; + } + + for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { + if (socket_ipv4_multicast_memberships[i].sock == NULL) { + socket_ipv4_multicast_memberships[i].sock = sock; + ip4_addr_copy(socket_ipv4_multicast_memberships[i].if_addr, *if_addr); + ip4_addr_copy(socket_ipv4_multicast_memberships[i].multi_addr, *multi_addr); + return 1; + } + } + return 0; +} + +/** Unregister a previously registered membership. This prevents dropping the membership + * on socket close. + * + * ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK). + */ +static void +lwip_socket_unregister_membership(int s, const ip4_addr_t *if_addr, const ip4_addr_t *multi_addr) +{ + struct lwip_sock *sock = get_socket(s); + int i; + + if (!sock) { + return; + } + + for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { + if ((socket_ipv4_multicast_memberships[i].sock == sock) && + ip4_addr_cmp(&socket_ipv4_multicast_memberships[i].if_addr, if_addr) && + ip4_addr_cmp(&socket_ipv4_multicast_memberships[i].multi_addr, multi_addr)) { + socket_ipv4_multicast_memberships[i].sock = NULL; + ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].if_addr); + ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].multi_addr); + return; + } + } +} + +/** Drop all memberships of a socket that were not dropped explicitly via setsockopt. + * + * ATTENTION: this function is NOT called from tcpip_thread (or under CORE_LOCK). + */ +static void +lwip_socket_drop_registered_memberships(int s) +{ + struct lwip_sock *sock = get_socket(s); + int i; + + if (!sock) { + return; + } + + for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) { + if (socket_ipv4_multicast_memberships[i].sock == sock) { + ip_addr_t multi_addr, if_addr; + ip_addr_copy_from_ip4(multi_addr, socket_ipv4_multicast_memberships[i].multi_addr); + ip_addr_copy_from_ip4(if_addr, socket_ipv4_multicast_memberships[i].if_addr); + socket_ipv4_multicast_memberships[i].sock = NULL; + ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].if_addr); + ip4_addr_set_zero(&socket_ipv4_multicast_memberships[i].multi_addr); + + netconn_join_leave_group(sock->conn, &multi_addr, &if_addr, NETCONN_LEAVE); + } + } +} +#endif /* LWIP_IGMP */ +#endif /* LWIP_SOCKET */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/tcpip.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/tcpip.c index 07b2f98..48ba5fb 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/tcpip.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/api/tcpip.c @@ -1,518 +1,518 @@ -/** - * @file - * Sequential API Main thread module - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if !NO_SYS /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/priv/tcpip_priv.h" -#include "lwip/sys.h" -#include "lwip/memp.h" -#include "lwip/mem.h" -#include "lwip/init.h" -#include "lwip/ip.h" -#include "lwip/pbuf.h" -#include "lwip/etharp.h" -#include "netif/ethernet.h" - -#define TCPIP_MSG_VAR_REF(name) API_VAR_REF(name) -#define TCPIP_MSG_VAR_DECLARE(name) API_VAR_DECLARE(struct tcpip_msg, name) -#define TCPIP_MSG_VAR_ALLOC(name) API_VAR_ALLOC(struct tcpip_msg, MEMP_TCPIP_MSG_API, name, ERR_MEM) -#define TCPIP_MSG_VAR_FREE(name) API_VAR_FREE(MEMP_TCPIP_MSG_API, name) - -/* global variables */ -static tcpip_init_done_fn tcpip_init_done; -static void *tcpip_init_done_arg; -static sys_mbox_t mbox; - -#if LWIP_TCPIP_CORE_LOCKING -/** The global semaphore to lock the stack. */ -sys_mutex_t lock_tcpip_core; -#endif /* LWIP_TCPIP_CORE_LOCKING */ - -#if LWIP_TIMERS -/* wait for a message, timeouts are processed while waiting */ -#define TCPIP_MBOX_FETCH(mbox, msg) sys_timeouts_mbox_fetch(mbox, msg) -#else /* LWIP_TIMERS */ -/* wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */ -#define TCPIP_MBOX_FETCH(mbox, msg) sys_mbox_fetch(mbox, msg) -#endif /* LWIP_TIMERS */ - -/** - * The main lwIP thread. This thread has exclusive access to lwIP core functions - * (unless access to them is not locked). Other threads communicate with this - * thread using message boxes. - * - * It also starts all the timers to make sure they are running in the right - * thread context. - * - * @param arg unused argument - */ -static void -tcpip_thread(void *arg) -{ - struct tcpip_msg *msg; - LWIP_UNUSED_ARG(arg); - - if (tcpip_init_done != NULL) { - tcpip_init_done(tcpip_init_done_arg); - } - - LOCK_TCPIP_CORE(); - while (1) { /* MAIN Loop */ - UNLOCK_TCPIP_CORE(); - LWIP_TCPIP_THREAD_ALIVE(); - /* wait for a message, timeouts are processed while waiting */ - TCPIP_MBOX_FETCH(&mbox, (void **)&msg); - LOCK_TCPIP_CORE(); - if (msg == NULL) { - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); - LWIP_ASSERT("tcpip_thread: invalid message", 0); - continue; - } - switch (msg->type) { -#if !LWIP_TCPIP_CORE_LOCKING - case TCPIP_MSG_API: - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg)); - msg->msg.api_msg.function(msg->msg.api_msg.msg); - break; - case TCPIP_MSG_API_CALL: - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API CALL message %p\n", (void *)msg)); - msg->msg.api_call.arg->err = msg->msg.api_call.function(msg->msg.api_call.arg); - sys_sem_signal(msg->msg.api_call.sem); - break; -#endif /* !LWIP_TCPIP_CORE_LOCKING */ - -#if !LWIP_TCPIP_CORE_LOCKING_INPUT - case TCPIP_MSG_INPKT: - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); - msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif); - memp_free(MEMP_TCPIP_MSG_INPKT, msg); - break; -#endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ - -#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS - case TCPIP_MSG_TIMEOUT: - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: TIMEOUT %p\n", (void *)msg)); - sys_timeout(msg->msg.tmo.msecs, msg->msg.tmo.h, msg->msg.tmo.arg); - memp_free(MEMP_TCPIP_MSG_API, msg); - break; - case TCPIP_MSG_UNTIMEOUT: - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: UNTIMEOUT %p\n", (void *)msg)); - sys_untimeout(msg->msg.tmo.h, msg->msg.tmo.arg); - memp_free(MEMP_TCPIP_MSG_API, msg); - break; -#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ - - case TCPIP_MSG_CALLBACK: - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg)); - msg->msg.cb.function(msg->msg.cb.ctx); - memp_free(MEMP_TCPIP_MSG_API, msg); - break; - - case TCPIP_MSG_CALLBACK_STATIC: - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK_STATIC %p\n", (void *)msg)); - 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); - break; - } - } -} - -/** - * Pass a received packet to tcpip_thread for input processing - * - * @param p the received packet - * @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) -{ -#if LWIP_TCPIP_CORE_LOCKING_INPUT - err_t ret; - LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_inpkt: PACKET %p/%p\n", (void *)p, (void *)inp)); - LOCK_TCPIP_CORE(); - ret = input_fn(p, inp); - UNLOCK_TCPIP_CORE(); - return ret; -#else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ - struct tcpip_msg *msg; - - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - - msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); - if (msg == NULL) { - return ERR_MEM; - } - - msg->type = TCPIP_MSG_INPKT; - msg->msg.inp.p = p; - msg->msg.inp.netif = inp; - msg->msg.inp.input_fn = input_fn; - if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { - memp_free(MEMP_TCPIP_MSG_INPKT, msg); - return ERR_MEM; - } - return ERR_OK; -#endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ -} - -/** - * @ingroup lwip_os - * Pass a received packet to tcpip_thread for input processing with - * ethernet_input or ip_input. Don't call directly, pass to netif_add() - * and call netif->input(). - * - * @param p the received packet, p->payload pointing to the Ethernet header or - * to an IP header (if inp doesn't have NETIF_FLAG_ETHARP or - * 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) -{ -#if LWIP_ETHERNET - if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { - return tcpip_inpkt(p, inp, ethernet_input); - } else -#endif /* LWIP_ETHERNET */ - return tcpip_inpkt(p, inp, ip_input); -} - -/** - * Call a specific function in the thread context of - * tcpip_thread for easy access synchronization. - * A function called in that way may access lwIP core code - * without fearing concurrent access. - * - * @param function the function to call - * @param ctx parameter passed to f - * @param block 1 to block until the request is posted, 0 to non-blocking mode - * @return ERR_OK if the function was called, another err_t if not - */ -err_t -tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block) -{ - struct tcpip_msg *msg; - - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - - msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); - if (msg == NULL) { - return ERR_MEM; - } - - msg->type = TCPIP_MSG_CALLBACK; - msg->msg.cb.function = function; - msg->msg.cb.ctx = ctx; - if (block) { - sys_mbox_post(&mbox, msg); - } else { - if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { - memp_free(MEMP_TCPIP_MSG_API, msg); - return ERR_MEM; - } - } - return ERR_OK; -} - -#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS -/** - * call sys_timeout in tcpip_thread - * - * @param msecs time in milliseconds for timeout - * @param h function to be called on timeout - * @param arg argument to pass to timeout function h - * @return ERR_MEM on memory error, ERR_OK otherwise - */ -err_t -tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg) -{ - struct tcpip_msg *msg; - - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - - msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); - if (msg == NULL) { - return ERR_MEM; - } - - msg->type = TCPIP_MSG_TIMEOUT; - msg->msg.tmo.msecs = msecs; - msg->msg.tmo.h = h; - msg->msg.tmo.arg = arg; - sys_mbox_post(&mbox, msg); - return ERR_OK; -} - -/** - * call sys_untimeout in tcpip_thread - * - * @param h function to be called on timeout - * @param arg argument to pass to timeout function h - * @return ERR_MEM on memory error, ERR_OK otherwise - */ -err_t -tcpip_untimeout(sys_timeout_handler h, void *arg) -{ - struct tcpip_msg *msg; - - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - - msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); - if (msg == NULL) { - return ERR_MEM; - } - - msg->type = TCPIP_MSG_UNTIMEOUT; - msg->msg.tmo.h = h; - msg->msg.tmo.arg = arg; - sys_mbox_post(&mbox, msg); - return ERR_OK; -} -#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ - - -/** - * Sends a message to TCPIP thread to call a function. Caller thread blocks on - * on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, - * this has to be done by the user. - * It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way - * with least runtime overhead. - * - * @param fn function to be called from TCPIP thread - * @param apimsg argument to API function - * @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) -{ -#if LWIP_TCPIP_CORE_LOCKING - LWIP_UNUSED_ARG(sem); - LOCK_TCPIP_CORE(); - fn(apimsg); - UNLOCK_TCPIP_CORE(); - return ERR_OK; -#else /* LWIP_TCPIP_CORE_LOCKING */ - TCPIP_MSG_VAR_DECLARE(msg); - - LWIP_ASSERT("semaphore not initialized", sys_sem_valid(sem)); - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - - TCPIP_MSG_VAR_ALLOC(msg); - TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API; - TCPIP_MSG_VAR_REF(msg).msg.api_msg.function = fn; - TCPIP_MSG_VAR_REF(msg).msg.api_msg.msg = apimsg; - sys_mbox_post(&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 */ -} - -/** - * Synchronously calls function in TCPIP thread and waits for its completion. - * It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or - * LWIP_NETCONN_SEM_PER_THREAD. - * If not, a semaphore is created and destroyed on every call which is usually - * an expensive/slow operation. - * @param fn Function to call - * @param call Call parameters - * @return Return value from tcpip_api_call_fn - */ -err_t -tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call) -{ -#if LWIP_TCPIP_CORE_LOCKING - err_t err; - LOCK_TCPIP_CORE(); - err = fn(call); - UNLOCK_TCPIP_CORE(); - return err; -#else /* LWIP_TCPIP_CORE_LOCKING */ - TCPIP_MSG_VAR_DECLARE(msg); - -#if !LWIP_NETCONN_SEM_PER_THREAD - err_t err = sys_sem_new(&call->sem, 0); - if (err != ERR_OK) { - return err; - } -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - - TCPIP_MSG_VAR_ALLOC(msg); - TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API_CALL; - TCPIP_MSG_VAR_REF(msg).msg.api_call.arg = call; - TCPIP_MSG_VAR_REF(msg).msg.api_call.function = fn; -#if LWIP_NETCONN_SEM_PER_THREAD - TCPIP_MSG_VAR_REF(msg).msg.api_call.sem = LWIP_NETCONN_THREAD_SEM_GET(); -#else /* LWIP_NETCONN_SEM_PER_THREAD */ - TCPIP_MSG_VAR_REF(msg).msg.api_call.sem = &call->sem; -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - sys_mbox_post(&mbox, &TCPIP_MSG_VAR_REF(msg)); - sys_arch_sem_wait(TCPIP_MSG_VAR_REF(msg).msg.api_call.sem, 0); - TCPIP_MSG_VAR_FREE(msg); - -#if !LWIP_NETCONN_SEM_PER_THREAD - sys_sem_free(&call->sem); -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - - return call->err; -#endif /* LWIP_TCPIP_CORE_LOCKING */ -} - -/** - * Allocate a structure for a static callback message and initialize it. - * This is intended to be used to send "static" messages from interrupt context. - * - * @param function the function to call - * @param ctx parameter passed to function - * @return a struct pointer to pass to tcpip_trycallback(). - */ -struct tcpip_callback_msg* -tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx) -{ - struct tcpip_msg *msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); - if (msg == NULL) { - return NULL; - } - msg->type = TCPIP_MSG_CALLBACK_STATIC; - msg->msg.cb.function = function; - msg->msg.cb.ctx = ctx; - return (struct tcpip_callback_msg*)msg; -} - -/** - * Free a callback message allocated by tcpip_callbackmsg_new(). - * - * @param msg the message to free - */ -void -tcpip_callbackmsg_delete(struct tcpip_callback_msg* msg) -{ - memp_free(MEMP_TCPIP_MSG_API, msg); -} - -/** - * Try to post a callback-message to the tcpip_thread mbox - * This is intended to be used to send "static" messages from interrupt context. - * - * @param msg pointer to the message to post - * @return sys_mbox_trypost() return code - */ -err_t -tcpip_trycallback(struct tcpip_callback_msg* msg) -{ - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); - return sys_mbox_trypost(&mbox, msg); -} - -/** - * @ingroup lwip_os - * Initialize this module: - * - initialize all sub modules - * - start the tcpip_thread - * - * @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) -{ - lwip_init(); - - tcpip_init_done = initfunc; - tcpip_init_done_arg = arg; - if (sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { - LWIP_ASSERT("failed to create tcpip_thread mbox", 0); - } -#if LWIP_TCPIP_CORE_LOCKING - if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) { - 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); -} - -/** - * Simple callback function used with tcpip_callback to free a pbuf - * (pbuf_free has a wrong signature for tcpip_callback) - * - * @param p The pbuf (chain) to be dereferenced. - */ -static void -pbuf_free_int(void *p) -{ - struct pbuf *q = (struct pbuf *)p; - pbuf_free(q); -} - -/** - * A simple wrapper function that allows you to free a pbuf from interrupt context. - * - * @param p The pbuf (chain) to be dereferenced. - * @return ERR_OK if callback could be enqueued, an err_t if not - */ -err_t -pbuf_free_callback(struct pbuf *p) -{ - return tcpip_callback_with_block(pbuf_free_int, p, 0); -} - -/** - * A simple wrapper function that allows you to free heap memory from - * interrupt context. - * - * @param m the heap memory to free - * @return ERR_OK if callback could be enqueued, an err_t if not - */ -err_t -mem_free_callback(void *m) -{ - return tcpip_callback_with_block(mem_free, m, 0); -} - -#endif /* !NO_SYS */ +/** + * @file + * Sequential API Main thread module + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if !NO_SYS /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/priv/tcpip_priv.h" +#include "lwip/sys.h" +#include "lwip/memp.h" +#include "lwip/mem.h" +#include "lwip/init.h" +#include "lwip/ip.h" +#include "lwip/pbuf.h" +#include "lwip/etharp.h" +#include "netif/ethernet.h" + +#define TCPIP_MSG_VAR_REF(name) API_VAR_REF(name) +#define TCPIP_MSG_VAR_DECLARE(name) API_VAR_DECLARE(struct tcpip_msg, name) +#define TCPIP_MSG_VAR_ALLOC(name) API_VAR_ALLOC(struct tcpip_msg, MEMP_TCPIP_MSG_API, name, ERR_MEM) +#define TCPIP_MSG_VAR_FREE(name) API_VAR_FREE(MEMP_TCPIP_MSG_API, name) + +/* global variables */ +static tcpip_init_done_fn tcpip_init_done; +static void *tcpip_init_done_arg; +static sys_mbox_t mbox; + +#if LWIP_TCPIP_CORE_LOCKING +/** The global semaphore to lock the stack. */ +sys_mutex_t lock_tcpip_core; +#endif /* LWIP_TCPIP_CORE_LOCKING */ + +#if LWIP_TIMERS +/* wait for a message, timeouts are processed while waiting */ +#define TCPIP_MBOX_FETCH(mbox, msg) sys_timeouts_mbox_fetch(mbox, msg) +#else /* LWIP_TIMERS */ +/* wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */ +#define TCPIP_MBOX_FETCH(mbox, msg) sys_mbox_fetch(mbox, msg) +#endif /* LWIP_TIMERS */ + +/** + * The main lwIP thread. This thread has exclusive access to lwIP core functions + * (unless access to them is not locked). Other threads communicate with this + * thread using message boxes. + * + * It also starts all the timers to make sure they are running in the right + * thread context. + * + * @param arg unused argument + */ +static void +tcpip_thread(void *arg) +{ + struct tcpip_msg *msg; + LWIP_UNUSED_ARG(arg); + + if (tcpip_init_done != NULL) { + tcpip_init_done(tcpip_init_done_arg); + } + + LOCK_TCPIP_CORE(); + while (1) { /* MAIN Loop */ + UNLOCK_TCPIP_CORE(); + LWIP_TCPIP_THREAD_ALIVE(); + /* wait for a message, timeouts are processed while waiting */ + TCPIP_MBOX_FETCH(&mbox, (void **)&msg); + LOCK_TCPIP_CORE(); + if (msg == NULL) { + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); + LWIP_ASSERT("tcpip_thread: invalid message", 0); + continue; + } + switch (msg->type) { +#if !LWIP_TCPIP_CORE_LOCKING + case TCPIP_MSG_API: + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg)); + msg->msg.api_msg.function(msg->msg.api_msg.msg); + break; + case TCPIP_MSG_API_CALL: + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API CALL message %p\n", (void *)msg)); + msg->msg.api_call.arg->err = msg->msg.api_call.function(msg->msg.api_call.arg); + sys_sem_signal(msg->msg.api_call.sem); + break; +#endif /* !LWIP_TCPIP_CORE_LOCKING */ + +#if !LWIP_TCPIP_CORE_LOCKING_INPUT + case TCPIP_MSG_INPKT: + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); + msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif); + memp_free(MEMP_TCPIP_MSG_INPKT, msg); + break; +#endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ + +#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS + case TCPIP_MSG_TIMEOUT: + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: TIMEOUT %p\n", (void *)msg)); + sys_timeout(msg->msg.tmo.msecs, msg->msg.tmo.h, msg->msg.tmo.arg); + memp_free(MEMP_TCPIP_MSG_API, msg); + break; + case TCPIP_MSG_UNTIMEOUT: + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: UNTIMEOUT %p\n", (void *)msg)); + sys_untimeout(msg->msg.tmo.h, msg->msg.tmo.arg); + memp_free(MEMP_TCPIP_MSG_API, msg); + break; +#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ + + case TCPIP_MSG_CALLBACK: + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg)); + msg->msg.cb.function(msg->msg.cb.ctx); + memp_free(MEMP_TCPIP_MSG_API, msg); + break; + + case TCPIP_MSG_CALLBACK_STATIC: + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK_STATIC %p\n", (void *)msg)); + 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); + break; + } + } +} + +/** + * Pass a received packet to tcpip_thread for input processing + * + * @param p the received packet + * @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) +{ +#if LWIP_TCPIP_CORE_LOCKING_INPUT + err_t ret; + LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_inpkt: PACKET %p/%p\n", (void *)p, (void *)inp)); + LOCK_TCPIP_CORE(); + ret = input_fn(p, inp); + UNLOCK_TCPIP_CORE(); + return ret; +#else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ + struct tcpip_msg *msg; + + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + + msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); + if (msg == NULL) { + return ERR_MEM; + } + + msg->type = TCPIP_MSG_INPKT; + msg->msg.inp.p = p; + msg->msg.inp.netif = inp; + msg->msg.inp.input_fn = input_fn; + if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { + memp_free(MEMP_TCPIP_MSG_INPKT, msg); + return ERR_MEM; + } + return ERR_OK; +#endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ +} + +/** + * @ingroup lwip_os + * Pass a received packet to tcpip_thread for input processing with + * ethernet_input or ip_input. Don't call directly, pass to netif_add() + * and call netif->input(). + * + * @param p the received packet, p->payload pointing to the Ethernet header or + * to an IP header (if inp doesn't have NETIF_FLAG_ETHARP or + * 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) +{ +#if LWIP_ETHERNET + if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { + return tcpip_inpkt(p, inp, ethernet_input); + } else +#endif /* LWIP_ETHERNET */ + return tcpip_inpkt(p, inp, ip_input); +} + +/** + * Call a specific function in the thread context of + * tcpip_thread for easy access synchronization. + * A function called in that way may access lwIP core code + * without fearing concurrent access. + * + * @param function the function to call + * @param ctx parameter passed to f + * @param block 1 to block until the request is posted, 0 to non-blocking mode + * @return ERR_OK if the function was called, another err_t if not + */ +err_t +tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block) +{ + struct tcpip_msg *msg; + + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + + msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); + if (msg == NULL) { + return ERR_MEM; + } + + msg->type = TCPIP_MSG_CALLBACK; + msg->msg.cb.function = function; + msg->msg.cb.ctx = ctx; + if (block) { + sys_mbox_post(&mbox, msg); + } else { + if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { + memp_free(MEMP_TCPIP_MSG_API, msg); + return ERR_MEM; + } + } + return ERR_OK; +} + +#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS +/** + * call sys_timeout in tcpip_thread + * + * @param msecs time in milliseconds for timeout + * @param h function to be called on timeout + * @param arg argument to pass to timeout function h + * @return ERR_MEM on memory error, ERR_OK otherwise + */ +err_t +tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg) +{ + struct tcpip_msg *msg; + + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + + msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); + if (msg == NULL) { + return ERR_MEM; + } + + msg->type = TCPIP_MSG_TIMEOUT; + msg->msg.tmo.msecs = msecs; + msg->msg.tmo.h = h; + msg->msg.tmo.arg = arg; + sys_mbox_post(&mbox, msg); + return ERR_OK; +} + +/** + * call sys_untimeout in tcpip_thread + * + * @param h function to be called on timeout + * @param arg argument to pass to timeout function h + * @return ERR_MEM on memory error, ERR_OK otherwise + */ +err_t +tcpip_untimeout(sys_timeout_handler h, void *arg) +{ + struct tcpip_msg *msg; + + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + + msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); + if (msg == NULL) { + return ERR_MEM; + } + + msg->type = TCPIP_MSG_UNTIMEOUT; + msg->msg.tmo.h = h; + msg->msg.tmo.arg = arg; + sys_mbox_post(&mbox, msg); + return ERR_OK; +} +#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ + + +/** + * Sends a message to TCPIP thread to call a function. Caller thread blocks on + * on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, + * this has to be done by the user. + * It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way + * with least runtime overhead. + * + * @param fn function to be called from TCPIP thread + * @param apimsg argument to API function + * @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) +{ +#if LWIP_TCPIP_CORE_LOCKING + LWIP_UNUSED_ARG(sem); + LOCK_TCPIP_CORE(); + fn(apimsg); + UNLOCK_TCPIP_CORE(); + return ERR_OK; +#else /* LWIP_TCPIP_CORE_LOCKING */ + TCPIP_MSG_VAR_DECLARE(msg); + + LWIP_ASSERT("semaphore not initialized", sys_sem_valid(sem)); + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + + TCPIP_MSG_VAR_ALLOC(msg); + TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API; + TCPIP_MSG_VAR_REF(msg).msg.api_msg.function = fn; + TCPIP_MSG_VAR_REF(msg).msg.api_msg.msg = apimsg; + sys_mbox_post(&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 */ +} + +/** + * Synchronously calls function in TCPIP thread and waits for its completion. + * It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or + * LWIP_NETCONN_SEM_PER_THREAD. + * If not, a semaphore is created and destroyed on every call which is usually + * an expensive/slow operation. + * @param fn Function to call + * @param call Call parameters + * @return Return value from tcpip_api_call_fn + */ +err_t +tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call) +{ +#if LWIP_TCPIP_CORE_LOCKING + err_t err; + LOCK_TCPIP_CORE(); + err = fn(call); + UNLOCK_TCPIP_CORE(); + return err; +#else /* LWIP_TCPIP_CORE_LOCKING */ + TCPIP_MSG_VAR_DECLARE(msg); + +#if !LWIP_NETCONN_SEM_PER_THREAD + err_t err = sys_sem_new(&call->sem, 0); + if (err != ERR_OK) { + return err; + } +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + + TCPIP_MSG_VAR_ALLOC(msg); + TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API_CALL; + TCPIP_MSG_VAR_REF(msg).msg.api_call.arg = call; + TCPIP_MSG_VAR_REF(msg).msg.api_call.function = fn; +#if LWIP_NETCONN_SEM_PER_THREAD + TCPIP_MSG_VAR_REF(msg).msg.api_call.sem = LWIP_NETCONN_THREAD_SEM_GET(); +#else /* LWIP_NETCONN_SEM_PER_THREAD */ + TCPIP_MSG_VAR_REF(msg).msg.api_call.sem = &call->sem; +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + sys_mbox_post(&mbox, &TCPIP_MSG_VAR_REF(msg)); + sys_arch_sem_wait(TCPIP_MSG_VAR_REF(msg).msg.api_call.sem, 0); + TCPIP_MSG_VAR_FREE(msg); + +#if !LWIP_NETCONN_SEM_PER_THREAD + sys_sem_free(&call->sem); +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + return call->err; +#endif /* LWIP_TCPIP_CORE_LOCKING */ +} + +/** + * Allocate a structure for a static callback message and initialize it. + * This is intended to be used to send "static" messages from interrupt context. + * + * @param function the function to call + * @param ctx parameter passed to function + * @return a struct pointer to pass to tcpip_trycallback(). + */ +struct tcpip_callback_msg* +tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx) +{ + struct tcpip_msg *msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); + if (msg == NULL) { + return NULL; + } + msg->type = TCPIP_MSG_CALLBACK_STATIC; + msg->msg.cb.function = function; + msg->msg.cb.ctx = ctx; + return (struct tcpip_callback_msg*)msg; +} + +/** + * Free a callback message allocated by tcpip_callbackmsg_new(). + * + * @param msg the message to free + */ +void +tcpip_callbackmsg_delete(struct tcpip_callback_msg* msg) +{ + memp_free(MEMP_TCPIP_MSG_API, msg); +} + +/** + * Try to post a callback-message to the tcpip_thread mbox + * This is intended to be used to send "static" messages from interrupt context. + * + * @param msg pointer to the message to post + * @return sys_mbox_trypost() return code + */ +err_t +tcpip_trycallback(struct tcpip_callback_msg* msg) +{ + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); + return sys_mbox_trypost(&mbox, msg); +} + +/** + * @ingroup lwip_os + * Initialize this module: + * - initialize all sub modules + * - start the tcpip_thread + * + * @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) +{ + lwip_init(); + + tcpip_init_done = initfunc; + tcpip_init_done_arg = arg; + if (sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { + LWIP_ASSERT("failed to create tcpip_thread mbox", 0); + } +#if LWIP_TCPIP_CORE_LOCKING + if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) { + 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); +} + +/** + * Simple callback function used with tcpip_callback to free a pbuf + * (pbuf_free has a wrong signature for tcpip_callback) + * + * @param p The pbuf (chain) to be dereferenced. + */ +static void +pbuf_free_int(void *p) +{ + struct pbuf *q = (struct pbuf *)p; + pbuf_free(q); +} + +/** + * A simple wrapper function that allows you to free a pbuf from interrupt context. + * + * @param p The pbuf (chain) to be dereferenced. + * @return ERR_OK if callback could be enqueued, an err_t if not + */ +err_t +pbuf_free_callback(struct pbuf *p) +{ + return tcpip_callback_with_block(pbuf_free_int, p, 0); +} + +/** + * A simple wrapper function that allows you to free heap memory from + * interrupt context. + * + * @param m the heap memory to free + * @return ERR_OK if callback could be enqueued, an err_t if not + */ +err_t +mem_free_callback(void *m) +{ + return tcpip_callback_with_block(mem_free, m, 0); +} + +#endif /* !NO_SYS */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c index 899e2cb..565c34a 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/apps/mqtt/mqtt.c @@ -1,1342 +1,1342 @@ -/** - * @file - * MQTT client - * - * @defgroup mqtt MQTT client - * @ingroup apps - * @verbinclude mqtt_client.txt - */ - -/* - * Copyright (c) 2016 Erik Andersson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack - * - * Author: Erik Andersson - * - * - * @todo: - * - Handle large outgoing payloads for PUBLISH messages - * - Fix restriction of a single topic in each (UN)SUBSCRIBE message (protocol has support for multiple topics) - * - Add support for legacy MQTT protocol version - * - * Please coordinate changes and requests with Erik Andersson - * Erik Andersson - * - */ -#include "lwip/apps/mqtt.h" -#include "lwip/timeouts.h" -#include "lwip/ip_addr.h" -#include "lwip/mem.h" -#include "lwip/err.h" -#include "lwip/pbuf.h" -#include "lwip/tcp.h" -#include - -#if LWIP_TCP && LWIP_CALLBACK_API - -/** - * MQTT_DEBUG: Default is off. - */ -#if !defined MQTT_DEBUG || defined __DOXYGEN__ -#define MQTT_DEBUG LWIP_DBG_OFF -#endif - -#define MQTT_DEBUG_TRACE (MQTT_DEBUG | LWIP_DBG_TRACE) -#define MQTT_DEBUG_STATE (MQTT_DEBUG | LWIP_DBG_STATE) -#define MQTT_DEBUG_WARN (MQTT_DEBUG | LWIP_DBG_LEVEL_WARNING) -#define MQTT_DEBUG_WARN_STATE (MQTT_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) -#define MQTT_DEBUG_SERIOUS (MQTT_DEBUG | LWIP_DBG_LEVEL_SERIOUS) - -static void mqtt_cyclic_timer(void *arg); - -/** - * MQTT client connection states - */ -enum { - TCP_DISCONNECTED, - TCP_CONNECTING, - MQTT_CONNECTING, - MQTT_CONNECTED -}; - -/** - * MQTT control message types - */ -enum mqtt_message_type { - MQTT_MSG_TYPE_CONNECT = 1, - MQTT_MSG_TYPE_CONNACK = 2, - MQTT_MSG_TYPE_PUBLISH = 3, - MQTT_MSG_TYPE_PUBACK = 4, - MQTT_MSG_TYPE_PUBREC = 5, - MQTT_MSG_TYPE_PUBREL = 6, - MQTT_MSG_TYPE_PUBCOMP = 7, - MQTT_MSG_TYPE_SUBSCRIBE = 8, - MQTT_MSG_TYPE_SUBACK = 9, - MQTT_MSG_TYPE_UNSUBSCRIBE = 10, - MQTT_MSG_TYPE_UNSUBACK = 11, - MQTT_MSG_TYPE_PINGREQ = 12, - MQTT_MSG_TYPE_PINGRESP = 13, - MQTT_MSG_TYPE_DISCONNECT = 14 -}; - -/** Helpers to extract control packet type and qos from first byte in fixed header */ -#define MQTT_CTL_PACKET_TYPE(fixed_hdr_byte0) ((fixed_hdr_byte0 & 0xf0) >> 4) -#define MQTT_CTL_PACKET_QOS(fixed_hdr_byte0) ((fixed_hdr_byte0 & 0x6) >> 1) - -/** - * MQTT connect flags, only used in CONNECT message - */ -enum mqtt_connect_flag { - MQTT_CONNECT_FLAG_USERNAME = 1 << 7, - MQTT_CONNECT_FLAG_PASSWORD = 1 << 6, - MQTT_CONNECT_FLAG_WILL_RETAIN = 1 << 5, - MQTT_CONNECT_FLAG_WILL = 1 << 2, - MQTT_CONNECT_FLAG_CLEAN_SESSION = 1 << 1 -}; - - -#if defined(LWIP_DEBUG) -static const char * const mqtt_message_type_str[15] = -{ - "UNDEFINED", - "CONNECT", - "CONNACK", - "PUBLISH", - "PUBACK", - "PUBREC", - "PUBREL", - "PUBCOMP", - "SUBSCRIBE", - "SUBACK", - "UNSUBSCRIBE", - "UNSUBACK", - "PINGREQ", - "PINGRESP", - "DISCONNECT" -}; - -/** - * Message type value to string - * @param msg_type see enum mqtt_message_type - * - * @return Control message type text string - */ -static const char * -mqtt_msg_type_to_str(u8_t msg_type) -{ - if (msg_type >= LWIP_ARRAYSIZE(mqtt_message_type_str)) { - msg_type = 0; - } - return mqtt_message_type_str[msg_type]; -} - -#endif - - -/** - * Generate MQTT packet identifier - * @param client MQTT client - * @return New packet identifier, range 1 to 65535 - */ -static u16_t -msg_generate_packet_id(mqtt_client_t *client) -{ - client->pkt_id_seq++; - if (client->pkt_id_seq == 0) { - client->pkt_id_seq++; - } - return client->pkt_id_seq; -} - -/*--------------------------------------------------------------------------------------------------------------------- */ -/* Output ring buffer */ - - -#define MQTT_RINGBUF_IDX_MASK ((MQTT_OUTPUT_RINGBUF_SIZE) - 1) - -/** Add single item to ring buffer */ -#define mqtt_ringbuf_put(rb, item) ((rb)->buf)[(rb)->put++ & MQTT_RINGBUF_IDX_MASK] = (item) - -/** Return number of bytes in ring buffer */ -#define mqtt_ringbuf_len(rb) ((u16_t)((rb)->put - (rb)->get)) - -/** Return number of bytes free in ring buffer */ -#define mqtt_ringbuf_free(rb) (MQTT_OUTPUT_RINGBUF_SIZE - mqtt_ringbuf_len(rb)) - -/** Return number of bytes possible to read without wrapping around */ -#define mqtt_ringbuf_linear_read_length(rb) LWIP_MIN(mqtt_ringbuf_len(rb), (MQTT_OUTPUT_RINGBUF_SIZE - ((rb)->get & MQTT_RINGBUF_IDX_MASK))) - -/** Return pointer to ring buffer get position */ -#define mqtt_ringbuf_get_ptr(rb) (&(rb)->buf[(rb)->get & MQTT_RINGBUF_IDX_MASK]) - -#define mqtt_ringbuf_advance_get_idx(rb, len) ((rb)->get += (len)) - - -/** - * Try send as many bytes as possible from output ring buffer - * @param rb Output ring buffer - * @param tpcb TCP connection handle - */ -static void -mqtt_output_send(struct mqtt_ringbuf_t *rb, struct tcp_pcb *tpcb) -{ - err_t err; - u8_t wrap = 0; - u16_t ringbuf_lin_len = mqtt_ringbuf_linear_read_length(rb); - u16_t send_len = tcp_sndbuf(tpcb); - LWIP_ASSERT("mqtt_output_send: tpcb != NULL", tpcb != NULL); - - if (send_len == 0 || ringbuf_lin_len == 0) { - return; - } - - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_output_send: tcp_sndbuf: %d bytes, ringbuf_linear_available: %d, get %d, put %d\n", - send_len, ringbuf_lin_len, ((rb)->get & MQTT_RINGBUF_IDX_MASK), ((rb)->put & MQTT_RINGBUF_IDX_MASK))); - - if (send_len > ringbuf_lin_len) { - /* Space in TCP output buffer is larger than available in ring buffer linear portion */ - send_len = ringbuf_lin_len; - /* Wrap around if more data in ring buffer after linear portion */ - wrap = (mqtt_ringbuf_len(rb) > ringbuf_lin_len); - } - err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY | (wrap ? TCP_WRITE_FLAG_MORE : 0)); - if ((err == ERR_OK) && wrap) { - mqtt_ringbuf_advance_get_idx(rb, send_len); - /* Use the lesser one of ring buffer linear length and TCP send buffer size */ - send_len = LWIP_MIN(tcp_sndbuf(tpcb), mqtt_ringbuf_linear_read_length(rb)); - err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY); - } - - if (err == ERR_OK) { - mqtt_ringbuf_advance_get_idx(rb, send_len); - /* Flush */ - tcp_output(tpcb); - } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_output_send: Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); - } -} - - - -/*--------------------------------------------------------------------------------------------------------------------- */ -/* Request queue */ - -/** - * Create request item - * @param r_objs Pointer to request objects - * @param pkt_id Packet identifier of request - * @param cb Packet callback to call when requests lifetime ends - * @param arg Parameter following callback - * @return Request or NULL if failed to create - */ -static struct mqtt_request_t * -mqtt_create_request(struct mqtt_request_t *r_objs, u16_t pkt_id, mqtt_request_cb_t cb, void *arg) -{ - struct mqtt_request_t *r = NULL; - u8_t n; - LWIP_ASSERT("mqtt_create_request: r_objs != NULL", r_objs != NULL); - for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { - /* Item point to itself if not in use */ - if (r_objs[n].next == &r_objs[n]) { - r = &r_objs[n]; - r->next = NULL; - r->cb = cb; - r->arg = arg; - r->pkt_id = pkt_id; - break; - } - } - return r; -} - - -/** - * Append request to pending request queue - * @param tail Pointer to request queue tail pointer - * @param r Request to append - */ -static void -mqtt_append_request(struct mqtt_request_t **tail, struct mqtt_request_t *r) -{ - struct mqtt_request_t *head = NULL; - s16_t time_before = 0; - struct mqtt_request_t *iter; - - LWIP_ASSERT("mqtt_append_request: tail != NULL", tail != NULL); - - /* Iterate trough queue to find head, and count total timeout time */ - for (iter = *tail; iter != NULL; iter = iter->next) { - time_before += iter->timeout_diff; - head = iter; - } - - LWIP_ASSERT("mqtt_append_request: time_before <= MQTT_REQ_TIMEOUT", time_before <= MQTT_REQ_TIMEOUT); - r->timeout_diff = MQTT_REQ_TIMEOUT - time_before; - if (head == NULL) { - *tail = r; - } else { - head->next = r; - } -} - - -/** - * Delete request item - * @param r Request item to delete - */ -static void -mqtt_delete_request(struct mqtt_request_t *r) -{ - if (r != NULL) { - r->next = r; - } -} - -/** - * Remove a request item with a specific packet identifier from request queue - * @param tail Pointer to request queue tail pointer - * @param pkt_id Packet identifier of request to take - * @return Request item if found, NULL if not - */ -static struct mqtt_request_t * -mqtt_take_request(struct mqtt_request_t **tail, u16_t pkt_id) -{ - struct mqtt_request_t *iter = NULL, *prev = NULL; - LWIP_ASSERT("mqtt_take_request: tail != NULL", tail != NULL); - /* Search all request for pkt_id */ - for (iter = *tail; iter != NULL; iter = iter->next) { - if (iter->pkt_id == pkt_id) { - break; - } - prev = iter; - } - - /* If request was found */ - if (iter != NULL) { - /* unchain */ - if (prev == NULL) { - *tail= iter->next; - } else { - prev->next = iter->next; - } - /* If exists, add remaining timeout time for the request to next */ - if (iter->next != NULL) { - iter->next->timeout_diff += iter->timeout_diff; - } - iter->next = NULL; - } - return iter; -} - -/** - * Handle requests timeout - * @param tail Pointer to request queue tail pointer - * @param t Time since last call in seconds - */ -static void -mqtt_request_time_elapsed(struct mqtt_request_t **tail, u8_t t) -{ - struct mqtt_request_t *r; - LWIP_ASSERT("mqtt_request_time_elapsed: tail != NULL", tail != NULL); - r = *tail; - while (t > 0 && r != NULL) { - if (t >= r->timeout_diff) { - t -= (u8_t)r->timeout_diff; - /* Unchain */ - *tail = r->next; - /* Notify upper layer about timeout */ - if (r->cb != NULL) { - r->cb(r->arg, ERR_TIMEOUT); - } - mqtt_delete_request(r); - /* Tail might be be modified in callback, so re-read it in every iteration */ - r = *(struct mqtt_request_t * const volatile *)tail; - } else { - r->timeout_diff -= t; - t = 0; - } - } -} - -/** - * Free all request items - * @param tail Pointer to request queue tail pointer - */ -static void -mqtt_clear_requests(struct mqtt_request_t **tail) -{ - struct mqtt_request_t *iter, *next; - LWIP_ASSERT("mqtt_clear_requests: tail != NULL", tail != NULL); - for (iter = *tail; iter != NULL; iter = next) { - next = iter->next; - mqtt_delete_request(iter); - } - *tail = NULL; -} -/** - * Initialize all request items - * @param r_objs Pointer to request objects - */ -static void -mqtt_init_requests(struct mqtt_request_t *r_objs) -{ - u8_t n; - LWIP_ASSERT("mqtt_init_requests: r_objs != NULL", r_objs != NULL); - for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { - /* Item pointing to itself indicates unused */ - r_objs[n].next = &r_objs[n]; - } -} - -/*--------------------------------------------------------------------------------------------------------------------- */ -/* Output message build helpers */ - - -static void -mqtt_output_append_u8(struct mqtt_ringbuf_t *rb, u8_t value) -{ - mqtt_ringbuf_put(rb, value); -} - -static -void mqtt_output_append_u16(struct mqtt_ringbuf_t *rb, u16_t value) -{ - mqtt_ringbuf_put(rb, value >> 8); - mqtt_ringbuf_put(rb, value & 0xff); -} - -static void -mqtt_output_append_buf(struct mqtt_ringbuf_t *rb, const void *data, u16_t length) -{ - u16_t n; - for (n = 0; n < length; n++) { - mqtt_ringbuf_put(rb, ((const u8_t *)data)[n]); - } -} - -static void -mqtt_output_append_string(struct mqtt_ringbuf_t *rb, const char *str, u16_t length) -{ - u16_t n; - mqtt_ringbuf_put(rb, length >> 8); - mqtt_ringbuf_put(rb, length & 0xff); - for (n = 0; n < length; n++) { - mqtt_ringbuf_put(rb, str[n]); - } -} - -/** - * Append fixed header - * @param rb Output ring buffer - * @param msg_type see enum mqtt_message_type - * @param dup MQTT DUP flag - * @param qos MQTT QoS field - * @param retain MQTT retain flag - * @param r_length Remaining length after fixed header - */ - -static void -mqtt_output_append_fixed_header(struct mqtt_ringbuf_t *rb, u8_t msg_type, u8_t dup, - u8_t qos, u8_t retain, u16_t r_length) -{ - /* Start with control byte */ - mqtt_output_append_u8(rb, (((msg_type & 0x0f) << 4) | ((dup & 1) << 3) | ((qos & 3) << 1) | (retain & 1))); - /* Encode remaining length field */ - do { - mqtt_output_append_u8(rb, (r_length & 0x7f) | (r_length >= 128 ? 0x80 : 0)); - r_length >>= 7; - } while (r_length > 0); -} - - -/** - * Check output buffer space - * @param rb Output ring buffer - * @param r_length Remaining length after fixed header - * @return 1 if message will fit, 0 if not enough buffer space - */ -static u8_t -mqtt_output_check_space(struct mqtt_ringbuf_t *rb, u16_t r_length) -{ - /* Start with length of type byte + remaining length */ - u16_t total_len = 1 + r_length; - - LWIP_ASSERT("mqtt_output_check_space: rb != NULL", rb != NULL); - - /* Calculate number of required bytes to contain the remaining bytes field and add to total*/ - do { - total_len++; - r_length >>= 7; - } while (r_length > 0); - - return (total_len <= mqtt_ringbuf_free(rb)); -} - - -/** - * Close connection to server - * @param client MQTT client - * @param reason Reason for disconnection - */ -static void -mqtt_close(mqtt_client_t *client, mqtt_connection_status_t reason) -{ - LWIP_ASSERT("mqtt_close: client != NULL", client != NULL); - - /* Bring down TCP connection if not already done */ - if (client->conn != NULL) { - err_t res; - tcp_recv(client->conn, NULL); - tcp_err(client->conn, NULL); - tcp_sent(client->conn, NULL); - res = tcp_close(client->conn); - if (res != ERR_OK) { - tcp_abort(client->conn); - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_close: Close err=%s\n", lwip_strerr(res))); - } - client->conn = NULL; - } - - /* Remove all pending requests */ - mqtt_clear_requests(&client->pend_req_queue); - /* Stop cyclic timer */ - sys_untimeout(mqtt_cyclic_timer, client); - - /* Notify upper layer of disconnection if changed state */ - if (client->conn_state != TCP_DISCONNECTED) { - - client->conn_state = TCP_DISCONNECTED; - if (client->connect_cb != NULL) { - client->connect_cb(client, client->connect_arg, reason); - } - } -} - - -/** - * Interval timer, called every MQTT_CYCLIC_TIMER_INTERVAL seconds in MQTT_CONNECTING and MQTT_CONNECTED states - * @param arg MQTT client - */ -static void -mqtt_cyclic_timer(void *arg) -{ - u8_t restart_timer = 1; - mqtt_client_t *client = (mqtt_client_t *)arg; - LWIP_ASSERT("mqtt_cyclic_timer: client != NULL", client != NULL); - - if (client->conn_state == MQTT_CONNECTING) { - client->cyclic_tick++; - if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= MQTT_CONNECT_TIMOUT) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: CONNECT attempt to server timed out\n")); - /* Disconnect TCP */ - mqtt_close(client, MQTT_CONNECT_TIMEOUT); - restart_timer = 0; - } - } else if (client->conn_state == MQTT_CONNECTED) { - /* Handle timeout for pending requests */ - mqtt_request_time_elapsed(&client->pend_req_queue, MQTT_CYCLIC_TIMER_INTERVAL); - - /* keep_alive > 0 means keep alive functionality shall be used */ - if (client->keep_alive > 0) { - - client->server_watchdog++; - /* If reception from server has been idle for 1.5*keep_alive time, server is considered unresponsive */ - if ((client->server_watchdog * MQTT_CYCLIC_TIMER_INTERVAL) > (client->keep_alive + client->keep_alive/2)) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Server incoming keep-alive timeout\n")); - mqtt_close(client, MQTT_CONNECT_TIMEOUT); - restart_timer = 0; - } - - /* If time for a keep alive message to be sent, transmission has been idle for keep_alive time */ - if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= client->keep_alive) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: Sending keep-alive message to server\n")); - if (mqtt_output_check_space(&client->output, 0) != 0) { - mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_PINGREQ, 0, 0, 0, 0); - client->cyclic_tick = 0; - } - } else { - client->cyclic_tick++; - } - } - } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Timer should not be running in state %d\n", client->conn_state)); - restart_timer = 0; - } - if (restart_timer) { - sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, arg); - } -} - - -/** - * Send PUBACK, PUBREC or PUBREL response message - * @param client MQTT client - * @param msg PUBACK, PUBREC or PUBREL - * @param pkt_id Packet identifier - * @param qos QoS value - * @return ERR_OK if successful, ERR_MEM if out of memory - */ -static err_t -pub_ack_rec_rel_response(mqtt_client_t *client, u8_t msg, u16_t pkt_id, u8_t qos) -{ - err_t err = ERR_OK; - if (mqtt_output_check_space(&client->output, 2)) { - mqtt_output_append_fixed_header(&client->output, msg, 0, qos, 0, 2); - mqtt_output_append_u16(&client->output, pkt_id); - mqtt_output_send(&client->output, client->conn); - } else { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("pub_ack_rec_rel_response: OOM creating response: %s with pkt_id: %d\n", - mqtt_msg_type_to_str(msg), pkt_id)); - err = ERR_MEM; - } - return err; -} - -/** - * Subscribe response from server - * @param r Matching request - * @param result Result code from server - */ -static void -mqtt_incomming_suback(struct mqtt_request_t *r, u8_t result) -{ - if (r->cb != NULL) { - r->cb(r->arg, result < 3 ? ERR_OK : ERR_ABRT); - } -} - - -/** - * Complete MQTT message received or buffer full - * @param client MQTT client - * @param fixed_hdr_idx header index - * @param length length received part - * @param remaining_length Remaining length of complete message - */ -static mqtt_connection_status_t - mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u32_t remaining_length) -{ - mqtt_connection_status_t res = MQTT_CONNECT_ACCEPTED; - - u8_t *var_hdr_payload = client->rx_buffer + fixed_hdr_idx; - - /* Control packet type */ - u8_t pkt_type = MQTT_CTL_PACKET_TYPE(client->rx_buffer[0]); - u16_t pkt_id = 0; - - if (pkt_type == MQTT_MSG_TYPE_CONNACK) { - if (client->conn_state == MQTT_CONNECTING) { - /* Get result code from CONNACK */ - res = (mqtt_connection_status_t)var_hdr_payload[1]; - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: Connect response code %d\n", res)); - if (res == MQTT_CONNECT_ACCEPTED) { - /* Reset cyclic_tick when changing to connected state */ - client->cyclic_tick = 0; - client->conn_state = MQTT_CONNECTED; - /* Notify upper layer */ - if (client->connect_cb != 0) { - client->connect_cb(client, client->connect_arg, res); - } - } - } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Received CONNACK in connected state\n")); - } - } else if (pkt_type == MQTT_MSG_TYPE_PINGRESP) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,( "mqtt_message_received: Received PINGRESP from server\n")); - - } else if (pkt_type == MQTT_MSG_TYPE_PUBLISH) { - u16_t payload_offset = 0; - u16_t payload_length = length; - u8_t qos = MQTT_CTL_PACKET_QOS(client->rx_buffer[0]); - - if (client->msg_idx <= MQTT_VAR_HEADER_BUFFER_LEN) { - /* Should have topic and pkt id*/ - uint8_t *topic; - uint16_t after_topic; - u8_t bkp; - u16_t topic_len = var_hdr_payload[0]; - topic_len = (topic_len << 8) + (u16_t)(var_hdr_payload[1]); - - topic = var_hdr_payload + 2; - after_topic = 2 + topic_len; - /* Check length, add one byte even for QoS 0 so that zero termination will fit */ - if ((after_topic + (qos? 2 : 1)) > length) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n")); - goto out_disconnect; - } - - /* id for QoS 1 and 2 */ - if (qos > 0) { - client->inpub_pkt_id = ((u16_t)var_hdr_payload[after_topic] << 8) + (u16_t)var_hdr_payload[after_topic + 1]; - after_topic += 2; - } else { - client->inpub_pkt_id = 0; - } - /* Take backup of byte after topic */ - bkp = topic[topic_len]; - /* Zero terminate string */ - topic[topic_len] = 0; - /* Payload data remaining in receive buffer */ - payload_length = length - after_topic; - payload_offset = after_topic; - - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Received message with QoS %d at topic: %s, payload length %d\n", - qos, topic, remaining_length + payload_length)); - if (client->pub_cb != NULL) { - client->pub_cb(client->inpub_arg, (const char *)topic, remaining_length + payload_length); - } - /* Restore byte after topic */ - topic[topic_len] = bkp; - } - if (payload_length > 0 || remaining_length == 0) { - client->data_cb(client->inpub_arg, var_hdr_payload + payload_offset, payload_length, remaining_length == 0 ? MQTT_DATA_FLAG_LAST : 0); - /* Reply if QoS > 0 */ - if (remaining_length == 0 && qos > 0) { - /* Send PUBACK for QoS 1 or PUBREC for QoS 2 */ - u8_t resp_msg = (qos == 1) ? MQTT_MSG_TYPE_PUBACK : MQTT_MSG_TYPE_PUBREC; - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Sending publish response: %s with pkt_id: %d\n", - mqtt_msg_type_to_str(resp_msg), client->inpub_pkt_id)); - pub_ack_rec_rel_response(client, resp_msg, client->inpub_pkt_id, 0); - } - } - } else { - /* Get packet identifier */ - pkt_id = (u16_t)var_hdr_payload[0] << 8; - pkt_id |= (u16_t)var_hdr_payload[1]; - if (pkt_id == 0) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Got message with illegal packet identifier: 0\n")); - goto out_disconnect; - } - if (pkt_type == MQTT_MSG_TYPE_PUBREC) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREC, sending PUBREL with pkt_id: %d\n",pkt_id)); - pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBREL, pkt_id, 1); - - } else if (pkt_type == MQTT_MSG_TYPE_PUBREL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREL, sending PUBCOMP response with pkt_id: %d\n",pkt_id)); - pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBCOMP, pkt_id, 0); - - } else if (pkt_type == MQTT_MSG_TYPE_SUBACK || pkt_type == MQTT_MSG_TYPE_UNSUBACK || - pkt_type == MQTT_MSG_TYPE_PUBCOMP || pkt_type == MQTT_MSG_TYPE_PUBACK) { - struct mqtt_request_t *r = mqtt_take_request(&client->pend_req_queue, pkt_id); - if (r != NULL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: %s response with id %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); - if (pkt_type == MQTT_MSG_TYPE_SUBACK) { - if (length < 3) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: To small SUBACK packet\n")); - goto out_disconnect; - } else { - mqtt_incomming_suback(r, var_hdr_payload[2]); - } - } else if (r->cb != NULL) { - r->cb(r->arg, ERR_OK); - } - mqtt_delete_request(r); - } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received %s reply, with wrong pkt_id: %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); - } - } else { - LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received unknown message type: %d\n", pkt_type)); - goto out_disconnect; - } - } - return res; -out_disconnect: - return MQTT_CONNECT_DISCONNECTED; -} - - -/** - * MQTT incoming message parser - * @param client MQTT client - * @param p PBUF chain of received data - * @return Connection status - */ -static mqtt_connection_status_t -mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p) -{ - u16_t in_offset = 0; - u32_t msg_rem_len = 0; - u8_t fixed_hdr_idx = 0; - u8_t b = 0; - - while (p->tot_len > in_offset) { - if ((fixed_hdr_idx < 2) || ((b & 0x80) != 0)) { - - if (fixed_hdr_idx < client->msg_idx) { - b = client->rx_buffer[fixed_hdr_idx]; - } else { - b = pbuf_get_at(p, in_offset++); - client->rx_buffer[client->msg_idx++] = b; - } - fixed_hdr_idx++; - - if (fixed_hdr_idx >= 2) { - msg_rem_len |= (u32_t)(b & 0x7f) << ((fixed_hdr_idx - 2) * 7); - if ((b & 0x80) == 0) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: Remaining length after fixed header: %d\n", msg_rem_len)); - if (msg_rem_len == 0) { - /* Complete message with no extra headers of payload received */ - mqtt_message_received(client, fixed_hdr_idx, 0, 0); - client->msg_idx = 0; - fixed_hdr_idx = 0; - } else { - /* Bytes remaining in message */ - msg_rem_len = (msg_rem_len + fixed_hdr_idx) - client->msg_idx; - } - } - } - } else { - u16_t cpy_len, cpy_start, buffer_space; - - cpy_start = (client->msg_idx - fixed_hdr_idx) % (MQTT_VAR_HEADER_BUFFER_LEN - fixed_hdr_idx) + fixed_hdr_idx; - - /* Allow to copy the lesser one of available length in input data or bytes remaining in message */ - cpy_len = (u16_t)LWIP_MIN((u16_t)(p->tot_len - in_offset), msg_rem_len); - - /* Limit to available space in buffer */ - buffer_space = MQTT_VAR_HEADER_BUFFER_LEN - cpy_start; - if (cpy_len > buffer_space) { - cpy_len = buffer_space; - } - pbuf_copy_partial(p, client->rx_buffer+cpy_start, cpy_len, in_offset); - - /* Advance get and put indexes */ - client->msg_idx += cpy_len; - in_offset += cpy_len; - msg_rem_len -= cpy_len; - - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: msg_idx: %d, cpy_len: %d, remaining %d\n", client->msg_idx, cpy_len, msg_rem_len)); - if (msg_rem_len == 0 || cpy_len == buffer_space) { - /* Whole message received or buffer is full */ - mqtt_connection_status_t res = mqtt_message_received(client, fixed_hdr_idx, (cpy_start + cpy_len) - fixed_hdr_idx, msg_rem_len); - if (res != MQTT_CONNECT_ACCEPTED) { - return res; - } - if (msg_rem_len == 0) { - /* Reset parser state */ - client->msg_idx = 0; - /* msg_tot_len = 0; */ - fixed_hdr_idx = 0; - } - } - } - } - return MQTT_CONNECT_ACCEPTED; -} - - -/** - * TCP received callback function. @see tcp_recv_fn - * @param arg MQTT client - * @param p PBUF chain of received data - * @param err Passed as return value if not ERR_OK - * @return ERR_OK or err passed into callback - */ -static err_t -mqtt_tcp_recv_cb(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) -{ - mqtt_client_t *client = (mqtt_client_t *)arg; - LWIP_ASSERT("mqtt_tcp_recv_cb: client != NULL", client != NULL); - LWIP_ASSERT("mqtt_tcp_recv_cb: client->conn == pcb", client->conn == pcb); - - if (p == NULL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_recv_cb: Recv pbuf=NULL, remote has closed connection\n")); - mqtt_close(client, MQTT_CONNECT_DISCONNECTED); - } else { - mqtt_connection_status_t res; - if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_recv_cb: Recv err=%d\n", err)); - pbuf_free(p); - return err; - } - - /* Tell remote that data has been received */ - tcp_recved(pcb, p->tot_len); - res = mqtt_parse_incoming(client, p); - pbuf_free(p); - - if (res != MQTT_CONNECT_ACCEPTED) { - mqtt_close(client, res); - } - /* If keep alive functionality is used */ - if (client->keep_alive != 0) { - /* Reset server alive watchdog */ - client->server_watchdog = 0; - } - - } - return ERR_OK; -} - - -/** - * TCP data sent callback function. @see tcp_sent_fn - * @param arg MQTT client - * @param tpcb TCP connection handle - * @param len Number of bytes sent - * @return ERR_OK - */ -static err_t -mqtt_tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len) -{ - mqtt_client_t *client = (mqtt_client_t *)arg; - - LWIP_UNUSED_ARG(tpcb); - LWIP_UNUSED_ARG(len); - - if (client->conn_state == MQTT_CONNECTED) { - struct mqtt_request_t *r; - - /* Reset keep-alive send timer and server watchdog */ - client->cyclic_tick = 0; - client->server_watchdog = 0; - /* QoS 0 publish has no response from server, so call its callbacks here */ - while ((r = mqtt_take_request(&client->pend_req_queue, 0)) != NULL) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_sent_cb: Calling QoS 0 publish complete callback\n")); - if (r->cb != NULL) { - r->cb(r->arg, ERR_OK); - } - mqtt_delete_request(r); - } - /* Try send any remaining buffers from output queue */ - mqtt_output_send(&client->output, client->conn); - } - return ERR_OK; -} - -/** - * TCP error callback function. @see tcp_err_fn - * @param arg MQTT client - * @param err Error encountered - */ -static void -mqtt_tcp_err_cb(void *arg, err_t err) -{ - mqtt_client_t *client = (mqtt_client_t *)arg; - LWIP_UNUSED_ARG(err); /* only used for debug output */ - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_err_cb: TCP error callback: error %d, arg: %p\n", err, arg)); - LWIP_ASSERT("mqtt_tcp_err_cb: client != NULL", client != NULL); - /* Set conn to null before calling close as pcb is already deallocated*/ - client->conn = 0; - mqtt_close(client, MQTT_CONNECT_DISCONNECTED); -} - -/** - * TCP poll callback function. @see tcp_poll_fn - * @param arg MQTT client - * @param tpcb TCP connection handle - * @return err ERR_OK - */ -static err_t -mqtt_tcp_poll_cb(void *arg, struct tcp_pcb *tpcb) -{ - mqtt_client_t *client = (mqtt_client_t *)arg; - if (client->conn_state == MQTT_CONNECTED) { - /* Try send any remaining buffers from output queue */ - mqtt_output_send(&client->output, tpcb); - } - return ERR_OK; -} - -/** - * TCP connect callback function. @see tcp_connected_fn - * @param arg MQTT client - * @param err Always ERR_OK, mqtt_tcp_err_cb is called in case of error - * @return ERR_OK - */ -static err_t -mqtt_tcp_connect_cb(void *arg, struct tcp_pcb *tpcb, err_t err) -{ - mqtt_client_t* client = (mqtt_client_t *)arg; - - if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_connect_cb: TCP connect error %d\n", err)); - return err; - } - - /* Initiate receiver state */ - client->msg_idx = 0; - - /* Setup TCP callbacks */ - tcp_recv(tpcb, mqtt_tcp_recv_cb); - tcp_sent(tpcb, mqtt_tcp_sent_cb); - tcp_poll(tpcb, mqtt_tcp_poll_cb, 2); - - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_connect_cb: TCP connection established to server\n")); - /* Enter MQTT connect state */ - client->conn_state = MQTT_CONNECTING; - - /* Start cyclic timer */ - sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, client); - client->cyclic_tick = 0; - - /* Start transmission from output queue, connect message is the first one out*/ - mqtt_output_send(&client->output, client->conn); - - return ERR_OK; -} - - - -/*---------------------------------------------------------------------------------------------------- */ -/* Public API */ - - -/** - * @ingroup mqtt - * MQTT publish function. - * @param client MQTT client - * @param topic Publish topic string - * @param payload Data to publish (NULL is allowed) - * @param payload_length: Length of payload (0 is allowed) - * @param qos Quality of service, 0 1 or 2 - * @param retain MQTT retain flag - * @param cb Callback to call when publish is complete or has timed out - * @param arg User supplied argument to publish callback - * @return ERR_OK if successful - * ERR_CONN if client is disconnected - * ERR_MEM if short on memory - */ -err_t -mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, - mqtt_request_cb_t cb, void *arg) -{ - struct mqtt_request_t *r; - u16_t pkt_id; - size_t topic_strlen; - size_t total_len; - u16_t topic_len; - u16_t remaining_length; - - LWIP_ASSERT("mqtt_publish: client != NULL", client); - LWIP_ASSERT("mqtt_publish: topic != NULL", topic); - LWIP_ERROR("mqtt_publish: TCP disconnected", (client->conn_state != TCP_DISCONNECTED), return ERR_CONN); - - topic_strlen = strlen(topic); - LWIP_ERROR("mqtt_publish: topic length overflow", (topic_strlen <= (0xFFFF - 2)), return ERR_ARG); - topic_len = (u16_t)topic_strlen; - total_len = 2 + topic_len + payload_length; - LWIP_ERROR("mqtt_publish: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); - remaining_length = (u16_t)total_len; - - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_publish: Publish with payload length %d to topic \"%s\"\n", payload_length, topic)); - - if (qos > 0) { - remaining_length += 2; - /* Generate pkt_id id for QoS1 and 2 */ - pkt_id = msg_generate_packet_id(client); - } else { - /* Use reserved value pkt_id 0 for QoS 0 in request handle */ - pkt_id = 0; - } - - r = mqtt_create_request(client->req_list, pkt_id, cb, arg); - if (r == NULL) { - return ERR_MEM; - } - - if (mqtt_output_check_space(&client->output, remaining_length) == 0) { - mqtt_delete_request(r); - return ERR_MEM; - } - /* Append fixed header */ - mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_PUBLISH, 0, qos, retain, remaining_length); - - /* Append Topic */ - mqtt_output_append_string(&client->output, topic, topic_len); - - /* Append packet if for QoS 1 and 2*/ - if (qos > 0) { - mqtt_output_append_u16(&client->output, pkt_id); - } - - /* Append optional publish payload */ - if ((payload != NULL) && (payload_length > 0)) { - mqtt_output_append_buf(&client->output, payload, payload_length); - } - - mqtt_append_request(&client->pend_req_queue, r); - mqtt_output_send(&client->output, client->conn); - return ERR_OK; -} - - -/** - * @ingroup mqtt - * MQTT subscribe/unsubscribe function. - * @param client MQTT client - * @param topic topic to subscribe to - * @param qos Quality of service, 0 1 or 2 (only used for subscribe) - * @param cb Callback to call when subscribe/unsubscribe reponse is received - * @param arg User supplied argument to publish callback - * @param sub 1 for subscribe, 0 for unsubscribe - * @return ERR_OK if successful, @see err_t enum for other results - */ -err_t -mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub) -{ - size_t topic_strlen; - size_t total_len; - u16_t topic_len; - u16_t remaining_length; - u16_t pkt_id; - struct mqtt_request_t *r; - - LWIP_ASSERT("mqtt_sub_unsub: client != NULL", client); - LWIP_ASSERT("mqtt_sub_unsub: topic != NULL", topic); - - topic_strlen = strlen(topic); - LWIP_ERROR("mqtt_sub_unsub: topic length overflow", (topic_strlen <= (0xFFFF - 2)), return ERR_ARG); - topic_len = (u16_t)topic_strlen; - /* Topic string, pkt_id, qos for subscribe */ - total_len = topic_len + 2 + 2 + (sub != 0); - LWIP_ERROR("mqtt_sub_unsub: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); - remaining_length = (u16_t)total_len; - - LWIP_ASSERT("mqtt_sub_unsub: qos < 3", qos < 3); - if (client->conn_state == TCP_DISCONNECTED) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_sub_unsub: Can not (un)subscribe in disconnected state\n")); - return ERR_CONN; - } - - pkt_id = msg_generate_packet_id(client); - r = mqtt_create_request(client->req_list, pkt_id, cb, arg); - if (r == NULL) { - return ERR_MEM; - } - - if (mqtt_output_check_space(&client->output, remaining_length) == 0) { - mqtt_delete_request(r); - return ERR_MEM; - } - - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_sub_unsub: Client (un)subscribe to topic \"%s\", id: %d\n", topic, pkt_id)); - - mqtt_output_append_fixed_header(&client->output, sub ? MQTT_MSG_TYPE_SUBSCRIBE : MQTT_MSG_TYPE_UNSUBSCRIBE, 0, 1, 0, remaining_length); - /* Packet id */ - mqtt_output_append_u16(&client->output, pkt_id); - /* Topic */ - mqtt_output_append_string(&client->output, topic, topic_len); - /* QoS */ - if (sub != 0) { - mqtt_output_append_u8(&client->output, LWIP_MIN(qos, 2)); - } - - mqtt_append_request(&client->pend_req_queue, r); - mqtt_output_send(&client->output, client->conn); - return ERR_OK; -} - - -/** - * @ingroup mqtt - * Set callback to handle incoming publish requests from server - * @param client MQTT client - * @param pub_cb Callback invoked when publish starts, contain topic and total length of payload - * @param data_cb Callback for each fragment of payload that arrives - * @param arg User supplied argument to both callbacks - */ -void -mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb, - mqtt_incoming_data_cb_t data_cb, void *arg) -{ - LWIP_ASSERT("mqtt_set_inpub_callback: client != NULL", client != NULL); - client->data_cb = data_cb; - client->pub_cb = pub_cb; - client->inpub_arg = arg; -} - -/** - * @ingroup mqtt - * Create a new MQTT client instance - * @return Pointer to instance on success, NULL otherwise - */ -mqtt_client_t * -mqtt_client_new(void) -{ - mqtt_client_t *client = (mqtt_client_t *)mem_malloc(sizeof(mqtt_client_t)); - if (client != NULL) { - memset(client, 0, sizeof(mqtt_client_t)); - } - return client; -} - - -/** - * @ingroup mqtt - * Connect to MQTT server - * @param client MQTT client - * @param ip_addr Server IP - * @param port Server port - * @param cb Connection state change callback - * @param arg User supplied argument to connection callback - * @param client_info Client identification and connection options - * @return ERR_OK if successful, @see err_t enum for other results - */ -err_t -mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, mqtt_connection_cb_t cb, void *arg, - const struct mqtt_connect_client_info_t *client_info) -{ - err_t err; - size_t len; - u16_t client_id_length; - /* Length is the sum of 2+"MQTT", protocol level, flags and keep alive */ - u16_t remaining_length = 2 + 4 + 1 + 1 + 2; - u8_t flags = 0, will_topic_len = 0, will_msg_len = 0; - - LWIP_ASSERT("mqtt_client_connect: client != NULL", client != NULL); - LWIP_ASSERT("mqtt_client_connect: ip_addr != NULL", ip_addr != NULL); - LWIP_ASSERT("mqtt_client_connect: client_info != NULL", client_info != NULL); - LWIP_ASSERT("mqtt_client_connect: client_info->client_id != NULL", client_info->client_id != NULL); - - if (client->conn_state != TCP_DISCONNECTED) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_client_connect: Already connected\n")); - return ERR_ISCONN; - } - - /* Wipe clean */ - memset(client, 0, sizeof(mqtt_client_t)); - client->connect_arg = arg; - client->connect_cb = cb; - client->keep_alive = client_info->keep_alive; - mqtt_init_requests(client->req_list); - - /* Build connect message */ - if (client_info->will_topic != NULL && client_info->will_msg != NULL) { - flags |= MQTT_CONNECT_FLAG_WILL; - flags |= (client_info->will_qos & 3) << 3; - if (client_info->will_retain) { - flags |= MQTT_CONNECT_FLAG_WILL_RETAIN; - } - len = strlen(client_info->will_topic); - LWIP_ERROR("mqtt_client_connect: client_info->will_topic length overflow", len <= 0xFF, return ERR_VAL); - LWIP_ERROR("mqtt_client_connect: client_info->will_topic length must be > 0", len > 0, return ERR_VAL); - will_topic_len = (u8_t)len; - len = strlen(client_info->will_msg); - LWIP_ERROR("mqtt_client_connect: client_info->will_msg length overflow", len <= 0xFF, return ERR_VAL); - will_msg_len = (u8_t)len; - len = remaining_length + 2 + will_topic_len + 2 + will_msg_len; - LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); - remaining_length = (u16_t)len; - } - - /* Don't complicate things, always connect using clean session */ - flags |= MQTT_CONNECT_FLAG_CLEAN_SESSION; - - len = strlen(client_info->client_id); - LWIP_ERROR("mqtt_client_connect: client_info->client_id length overflow", len <= 0xFFFF, return ERR_VAL); - client_id_length = (u16_t)len; - len = remaining_length + 2 + client_id_length; - LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); - remaining_length = (u16_t)len; - - if (mqtt_output_check_space(&client->output, remaining_length) == 0) { - return ERR_MEM; - } - - client->conn = tcp_new(); - if (client->conn == NULL) { - return ERR_MEM; - } - - /* Set arg pointer for callbacks */ - tcp_arg(client->conn, client); - /* Any local address, pick random local port number */ - err = tcp_bind(client->conn, IP_ADDR_ANY, 0); - if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_client_connect: Error binding to local ip/port, %d\n", err)); - goto tcp_fail; - } - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Connecting to host: %s at port:%"U16_F"\n", ipaddr_ntoa(ip_addr), port)); - - /* Connect to server */ - err = tcp_connect(client->conn, ip_addr, port, mqtt_tcp_connect_cb); - if (err != ERR_OK) { - LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Error connecting to remote ip/port, %d\n", err)); - goto tcp_fail; - } - /* Set error callback */ - tcp_err(client->conn, mqtt_tcp_err_cb); - client->conn_state = TCP_CONNECTING; - - /* Append fixed header */ - mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_CONNECT, 0, 0, 0, remaining_length); - /* Append Protocol string */ - mqtt_output_append_string(&client->output, "MQTT", 4); - /* Append Protocol level */ - mqtt_output_append_u8(&client->output, 4); - /* Append connect flags */ - mqtt_output_append_u8(&client->output, flags); - /* Append keep-alive */ - mqtt_output_append_u16(&client->output, client_info->keep_alive); - /* Append client id */ - mqtt_output_append_string(&client->output, client_info->client_id, client_id_length); - /* Append will message if used */ - if ((flags & MQTT_CONNECT_FLAG_WILL) != 0) { - mqtt_output_append_string(&client->output, client_info->will_topic, will_topic_len); - mqtt_output_append_string(&client->output, client_info->will_msg, will_msg_len); - } - return ERR_OK; - -tcp_fail: - tcp_abort(client->conn); - client->conn = NULL; - return err; -} - - -/** - * @ingroup mqtt - * Disconnect from MQTT server - * @param client MQTT client - */ -void -mqtt_disconnect(mqtt_client_t *client) -{ - LWIP_ASSERT("mqtt_disconnect: client != NULL", client); - /* If connection in not already closed */ - if (client->conn_state != TCP_DISCONNECTED) { - /* Set conn_state before calling mqtt_close to prevent callback from being called */ - client->conn_state = TCP_DISCONNECTED; - mqtt_close(client, (mqtt_connection_status_t)0); - } -} - -/** - * @ingroup mqtt - * Check connection with server - * @param client MQTT client - * @return 1 if connected to server, 0 otherwise - */ -u8_t -mqtt_client_is_connected(mqtt_client_t *client) -{ - LWIP_ASSERT("mqtt_client_is_connected: client != NULL", client); - return client->conn_state == MQTT_CONNECTED; -} - -#endif /* LWIP_TCP && LWIP_CALLBACK_API */ +/** + * @file + * MQTT client + * + * @defgroup mqtt MQTT client + * @ingroup apps + * @verbinclude mqtt_client.txt + */ + +/* + * Copyright (c) 2016 Erik Andersson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack + * + * Author: Erik Andersson + * + * + * @todo: + * - Handle large outgoing payloads for PUBLISH messages + * - Fix restriction of a single topic in each (UN)SUBSCRIBE message (protocol has support for multiple topics) + * - Add support for legacy MQTT protocol version + * + * Please coordinate changes and requests with Erik Andersson + * Erik Andersson + * + */ +#include "lwip/apps/mqtt.h" +#include "lwip/timeouts.h" +#include "lwip/ip_addr.h" +#include "lwip/mem.h" +#include "lwip/err.h" +#include "lwip/pbuf.h" +#include "lwip/tcp.h" +#include + +#if LWIP_TCP && LWIP_CALLBACK_API + +/** + * MQTT_DEBUG: Default is off. + */ +#if !defined MQTT_DEBUG || defined __DOXYGEN__ +#define MQTT_DEBUG LWIP_DBG_OFF +#endif + +#define MQTT_DEBUG_TRACE (MQTT_DEBUG | LWIP_DBG_TRACE) +#define MQTT_DEBUG_STATE (MQTT_DEBUG | LWIP_DBG_STATE) +#define MQTT_DEBUG_WARN (MQTT_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define MQTT_DEBUG_WARN_STATE (MQTT_DEBUG | LWIP_DBG_LEVEL_WARNING | LWIP_DBG_STATE) +#define MQTT_DEBUG_SERIOUS (MQTT_DEBUG | LWIP_DBG_LEVEL_SERIOUS) + +static void mqtt_cyclic_timer(void *arg); + +/** + * MQTT client connection states + */ +enum { + TCP_DISCONNECTED, + TCP_CONNECTING, + MQTT_CONNECTING, + MQTT_CONNECTED +}; + +/** + * MQTT control message types + */ +enum mqtt_message_type { + MQTT_MSG_TYPE_CONNECT = 1, + MQTT_MSG_TYPE_CONNACK = 2, + MQTT_MSG_TYPE_PUBLISH = 3, + MQTT_MSG_TYPE_PUBACK = 4, + MQTT_MSG_TYPE_PUBREC = 5, + MQTT_MSG_TYPE_PUBREL = 6, + MQTT_MSG_TYPE_PUBCOMP = 7, + MQTT_MSG_TYPE_SUBSCRIBE = 8, + MQTT_MSG_TYPE_SUBACK = 9, + MQTT_MSG_TYPE_UNSUBSCRIBE = 10, + MQTT_MSG_TYPE_UNSUBACK = 11, + MQTT_MSG_TYPE_PINGREQ = 12, + MQTT_MSG_TYPE_PINGRESP = 13, + MQTT_MSG_TYPE_DISCONNECT = 14 +}; + +/** Helpers to extract control packet type and qos from first byte in fixed header */ +#define MQTT_CTL_PACKET_TYPE(fixed_hdr_byte0) ((fixed_hdr_byte0 & 0xf0) >> 4) +#define MQTT_CTL_PACKET_QOS(fixed_hdr_byte0) ((fixed_hdr_byte0 & 0x6) >> 1) + +/** + * MQTT connect flags, only used in CONNECT message + */ +enum mqtt_connect_flag { + MQTT_CONNECT_FLAG_USERNAME = 1 << 7, + MQTT_CONNECT_FLAG_PASSWORD = 1 << 6, + MQTT_CONNECT_FLAG_WILL_RETAIN = 1 << 5, + MQTT_CONNECT_FLAG_WILL = 1 << 2, + MQTT_CONNECT_FLAG_CLEAN_SESSION = 1 << 1 +}; + + +#if defined(LWIP_DEBUG) +static const char * const mqtt_message_type_str[15] = +{ + "UNDEFINED", + "CONNECT", + "CONNACK", + "PUBLISH", + "PUBACK", + "PUBREC", + "PUBREL", + "PUBCOMP", + "SUBSCRIBE", + "SUBACK", + "UNSUBSCRIBE", + "UNSUBACK", + "PINGREQ", + "PINGRESP", + "DISCONNECT" +}; + +/** + * Message type value to string + * @param msg_type see enum mqtt_message_type + * + * @return Control message type text string + */ +static const char * +mqtt_msg_type_to_str(u8_t msg_type) +{ + if (msg_type >= LWIP_ARRAYSIZE(mqtt_message_type_str)) { + msg_type = 0; + } + return mqtt_message_type_str[msg_type]; +} + +#endif + + +/** + * Generate MQTT packet identifier + * @param client MQTT client + * @return New packet identifier, range 1 to 65535 + */ +static u16_t +msg_generate_packet_id(mqtt_client_t *client) +{ + client->pkt_id_seq++; + if (client->pkt_id_seq == 0) { + client->pkt_id_seq++; + } + return client->pkt_id_seq; +} + +/*--------------------------------------------------------------------------------------------------------------------- */ +/* Output ring buffer */ + + +#define MQTT_RINGBUF_IDX_MASK ((MQTT_OUTPUT_RINGBUF_SIZE) - 1) + +/** Add single item to ring buffer */ +#define mqtt_ringbuf_put(rb, item) ((rb)->buf)[(rb)->put++ & MQTT_RINGBUF_IDX_MASK] = (item) + +/** Return number of bytes in ring buffer */ +#define mqtt_ringbuf_len(rb) ((u16_t)((rb)->put - (rb)->get)) + +/** Return number of bytes free in ring buffer */ +#define mqtt_ringbuf_free(rb) (MQTT_OUTPUT_RINGBUF_SIZE - mqtt_ringbuf_len(rb)) + +/** Return number of bytes possible to read without wrapping around */ +#define mqtt_ringbuf_linear_read_length(rb) LWIP_MIN(mqtt_ringbuf_len(rb), (MQTT_OUTPUT_RINGBUF_SIZE - ((rb)->get & MQTT_RINGBUF_IDX_MASK))) + +/** Return pointer to ring buffer get position */ +#define mqtt_ringbuf_get_ptr(rb) (&(rb)->buf[(rb)->get & MQTT_RINGBUF_IDX_MASK]) + +#define mqtt_ringbuf_advance_get_idx(rb, len) ((rb)->get += (len)) + + +/** + * Try send as many bytes as possible from output ring buffer + * @param rb Output ring buffer + * @param tpcb TCP connection handle + */ +static void +mqtt_output_send(struct mqtt_ringbuf_t *rb, struct tcp_pcb *tpcb) +{ + err_t err; + u8_t wrap = 0; + u16_t ringbuf_lin_len = mqtt_ringbuf_linear_read_length(rb); + u16_t send_len = tcp_sndbuf(tpcb); + LWIP_ASSERT("mqtt_output_send: tpcb != NULL", tpcb != NULL); + + if (send_len == 0 || ringbuf_lin_len == 0) { + return; + } + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_output_send: tcp_sndbuf: %d bytes, ringbuf_linear_available: %d, get %d, put %d\n", + send_len, ringbuf_lin_len, ((rb)->get & MQTT_RINGBUF_IDX_MASK), ((rb)->put & MQTT_RINGBUF_IDX_MASK))); + + if (send_len > ringbuf_lin_len) { + /* Space in TCP output buffer is larger than available in ring buffer linear portion */ + send_len = ringbuf_lin_len; + /* Wrap around if more data in ring buffer after linear portion */ + wrap = (mqtt_ringbuf_len(rb) > ringbuf_lin_len); + } + err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY | (wrap ? TCP_WRITE_FLAG_MORE : 0)); + if ((err == ERR_OK) && wrap) { + mqtt_ringbuf_advance_get_idx(rb, send_len); + /* Use the lesser one of ring buffer linear length and TCP send buffer size */ + send_len = LWIP_MIN(tcp_sndbuf(tpcb), mqtt_ringbuf_linear_read_length(rb)); + err = tcp_write(tpcb, mqtt_ringbuf_get_ptr(rb), send_len, TCP_WRITE_FLAG_COPY); + } + + if (err == ERR_OK) { + mqtt_ringbuf_advance_get_idx(rb, send_len); + /* Flush */ + tcp_output(tpcb); + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_output_send: Send failed with err %d (\"%s\")\n", err, lwip_strerr(err))); + } +} + + + +/*--------------------------------------------------------------------------------------------------------------------- */ +/* Request queue */ + +/** + * Create request item + * @param r_objs Pointer to request objects + * @param pkt_id Packet identifier of request + * @param cb Packet callback to call when requests lifetime ends + * @param arg Parameter following callback + * @return Request or NULL if failed to create + */ +static struct mqtt_request_t * +mqtt_create_request(struct mqtt_request_t *r_objs, u16_t pkt_id, mqtt_request_cb_t cb, void *arg) +{ + struct mqtt_request_t *r = NULL; + u8_t n; + LWIP_ASSERT("mqtt_create_request: r_objs != NULL", r_objs != NULL); + for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + /* Item point to itself if not in use */ + if (r_objs[n].next == &r_objs[n]) { + r = &r_objs[n]; + r->next = NULL; + r->cb = cb; + r->arg = arg; + r->pkt_id = pkt_id; + break; + } + } + return r; +} + + +/** + * Append request to pending request queue + * @param tail Pointer to request queue tail pointer + * @param r Request to append + */ +static void +mqtt_append_request(struct mqtt_request_t **tail, struct mqtt_request_t *r) +{ + struct mqtt_request_t *head = NULL; + s16_t time_before = 0; + struct mqtt_request_t *iter; + + LWIP_ASSERT("mqtt_append_request: tail != NULL", tail != NULL); + + /* Iterate trough queue to find head, and count total timeout time */ + for (iter = *tail; iter != NULL; iter = iter->next) { + time_before += iter->timeout_diff; + head = iter; + } + + LWIP_ASSERT("mqtt_append_request: time_before <= MQTT_REQ_TIMEOUT", time_before <= MQTT_REQ_TIMEOUT); + r->timeout_diff = MQTT_REQ_TIMEOUT - time_before; + if (head == NULL) { + *tail = r; + } else { + head->next = r; + } +} + + +/** + * Delete request item + * @param r Request item to delete + */ +static void +mqtt_delete_request(struct mqtt_request_t *r) +{ + if (r != NULL) { + r->next = r; + } +} + +/** + * Remove a request item with a specific packet identifier from request queue + * @param tail Pointer to request queue tail pointer + * @param pkt_id Packet identifier of request to take + * @return Request item if found, NULL if not + */ +static struct mqtt_request_t * +mqtt_take_request(struct mqtt_request_t **tail, u16_t pkt_id) +{ + struct mqtt_request_t *iter = NULL, *prev = NULL; + LWIP_ASSERT("mqtt_take_request: tail != NULL", tail != NULL); + /* Search all request for pkt_id */ + for (iter = *tail; iter != NULL; iter = iter->next) { + if (iter->pkt_id == pkt_id) { + break; + } + prev = iter; + } + + /* If request was found */ + if (iter != NULL) { + /* unchain */ + if (prev == NULL) { + *tail= iter->next; + } else { + prev->next = iter->next; + } + /* If exists, add remaining timeout time for the request to next */ + if (iter->next != NULL) { + iter->next->timeout_diff += iter->timeout_diff; + } + iter->next = NULL; + } + return iter; +} + +/** + * Handle requests timeout + * @param tail Pointer to request queue tail pointer + * @param t Time since last call in seconds + */ +static void +mqtt_request_time_elapsed(struct mqtt_request_t **tail, u8_t t) +{ + struct mqtt_request_t *r; + LWIP_ASSERT("mqtt_request_time_elapsed: tail != NULL", tail != NULL); + r = *tail; + while (t > 0 && r != NULL) { + if (t >= r->timeout_diff) { + t -= (u8_t)r->timeout_diff; + /* Unchain */ + *tail = r->next; + /* Notify upper layer about timeout */ + if (r->cb != NULL) { + r->cb(r->arg, ERR_TIMEOUT); + } + mqtt_delete_request(r); + /* Tail might be be modified in callback, so re-read it in every iteration */ + r = *(struct mqtt_request_t * const volatile *)tail; + } else { + r->timeout_diff -= t; + t = 0; + } + } +} + +/** + * Free all request items + * @param tail Pointer to request queue tail pointer + */ +static void +mqtt_clear_requests(struct mqtt_request_t **tail) +{ + struct mqtt_request_t *iter, *next; + LWIP_ASSERT("mqtt_clear_requests: tail != NULL", tail != NULL); + for (iter = *tail; iter != NULL; iter = next) { + next = iter->next; + mqtt_delete_request(iter); + } + *tail = NULL; +} +/** + * Initialize all request items + * @param r_objs Pointer to request objects + */ +static void +mqtt_init_requests(struct mqtt_request_t *r_objs) +{ + u8_t n; + LWIP_ASSERT("mqtt_init_requests: r_objs != NULL", r_objs != NULL); + for (n = 0; n < MQTT_REQ_MAX_IN_FLIGHT; n++) { + /* Item pointing to itself indicates unused */ + r_objs[n].next = &r_objs[n]; + } +} + +/*--------------------------------------------------------------------------------------------------------------------- */ +/* Output message build helpers */ + + +static void +mqtt_output_append_u8(struct mqtt_ringbuf_t *rb, u8_t value) +{ + mqtt_ringbuf_put(rb, value); +} + +static +void mqtt_output_append_u16(struct mqtt_ringbuf_t *rb, u16_t value) +{ + mqtt_ringbuf_put(rb, value >> 8); + mqtt_ringbuf_put(rb, value & 0xff); +} + +static void +mqtt_output_append_buf(struct mqtt_ringbuf_t *rb, const void *data, u16_t length) +{ + u16_t n; + for (n = 0; n < length; n++) { + mqtt_ringbuf_put(rb, ((const u8_t *)data)[n]); + } +} + +static void +mqtt_output_append_string(struct mqtt_ringbuf_t *rb, const char *str, u16_t length) +{ + u16_t n; + mqtt_ringbuf_put(rb, length >> 8); + mqtt_ringbuf_put(rb, length & 0xff); + for (n = 0; n < length; n++) { + mqtt_ringbuf_put(rb, str[n]); + } +} + +/** + * Append fixed header + * @param rb Output ring buffer + * @param msg_type see enum mqtt_message_type + * @param dup MQTT DUP flag + * @param qos MQTT QoS field + * @param retain MQTT retain flag + * @param r_length Remaining length after fixed header + */ + +static void +mqtt_output_append_fixed_header(struct mqtt_ringbuf_t *rb, u8_t msg_type, u8_t dup, + u8_t qos, u8_t retain, u16_t r_length) +{ + /* Start with control byte */ + mqtt_output_append_u8(rb, (((msg_type & 0x0f) << 4) | ((dup & 1) << 3) | ((qos & 3) << 1) | (retain & 1))); + /* Encode remaining length field */ + do { + mqtt_output_append_u8(rb, (r_length & 0x7f) | (r_length >= 128 ? 0x80 : 0)); + r_length >>= 7; + } while (r_length > 0); +} + + +/** + * Check output buffer space + * @param rb Output ring buffer + * @param r_length Remaining length after fixed header + * @return 1 if message will fit, 0 if not enough buffer space + */ +static u8_t +mqtt_output_check_space(struct mqtt_ringbuf_t *rb, u16_t r_length) +{ + /* Start with length of type byte + remaining length */ + u16_t total_len = 1 + r_length; + + LWIP_ASSERT("mqtt_output_check_space: rb != NULL", rb != NULL); + + /* Calculate number of required bytes to contain the remaining bytes field and add to total*/ + do { + total_len++; + r_length >>= 7; + } while (r_length > 0); + + return (total_len <= mqtt_ringbuf_free(rb)); +} + + +/** + * Close connection to server + * @param client MQTT client + * @param reason Reason for disconnection + */ +static void +mqtt_close(mqtt_client_t *client, mqtt_connection_status_t reason) +{ + LWIP_ASSERT("mqtt_close: client != NULL", client != NULL); + + /* Bring down TCP connection if not already done */ + if (client->conn != NULL) { + err_t res; + tcp_recv(client->conn, NULL); + tcp_err(client->conn, NULL); + tcp_sent(client->conn, NULL); + res = tcp_close(client->conn); + if (res != ERR_OK) { + tcp_abort(client->conn); + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_close: Close err=%s\n", lwip_strerr(res))); + } + client->conn = NULL; + } + + /* Remove all pending requests */ + mqtt_clear_requests(&client->pend_req_queue); + /* Stop cyclic timer */ + sys_untimeout(mqtt_cyclic_timer, client); + + /* Notify upper layer of disconnection if changed state */ + if (client->conn_state != TCP_DISCONNECTED) { + + client->conn_state = TCP_DISCONNECTED; + if (client->connect_cb != NULL) { + client->connect_cb(client, client->connect_arg, reason); + } + } +} + + +/** + * Interval timer, called every MQTT_CYCLIC_TIMER_INTERVAL seconds in MQTT_CONNECTING and MQTT_CONNECTED states + * @param arg MQTT client + */ +static void +mqtt_cyclic_timer(void *arg) +{ + u8_t restart_timer = 1; + mqtt_client_t *client = (mqtt_client_t *)arg; + LWIP_ASSERT("mqtt_cyclic_timer: client != NULL", client != NULL); + + if (client->conn_state == MQTT_CONNECTING) { + client->cyclic_tick++; + if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= MQTT_CONNECT_TIMOUT) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: CONNECT attempt to server timed out\n")); + /* Disconnect TCP */ + mqtt_close(client, MQTT_CONNECT_TIMEOUT); + restart_timer = 0; + } + } else if (client->conn_state == MQTT_CONNECTED) { + /* Handle timeout for pending requests */ + mqtt_request_time_elapsed(&client->pend_req_queue, MQTT_CYCLIC_TIMER_INTERVAL); + + /* keep_alive > 0 means keep alive functionality shall be used */ + if (client->keep_alive > 0) { + + client->server_watchdog++; + /* If reception from server has been idle for 1.5*keep_alive time, server is considered unresponsive */ + if ((client->server_watchdog * MQTT_CYCLIC_TIMER_INTERVAL) > (client->keep_alive + client->keep_alive/2)) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Server incoming keep-alive timeout\n")); + mqtt_close(client, MQTT_CONNECT_TIMEOUT); + restart_timer = 0; + } + + /* If time for a keep alive message to be sent, transmission has been idle for keep_alive time */ + if ((client->cyclic_tick * MQTT_CYCLIC_TIMER_INTERVAL) >= client->keep_alive) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_cyclic_timer: Sending keep-alive message to server\n")); + if (mqtt_output_check_space(&client->output, 0) != 0) { + mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_PINGREQ, 0, 0, 0, 0); + client->cyclic_tick = 0; + } + } else { + client->cyclic_tick++; + } + } + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_cyclic_timer: Timer should not be running in state %d\n", client->conn_state)); + restart_timer = 0; + } + if (restart_timer) { + sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, arg); + } +} + + +/** + * Send PUBACK, PUBREC or PUBREL response message + * @param client MQTT client + * @param msg PUBACK, PUBREC or PUBREL + * @param pkt_id Packet identifier + * @param qos QoS value + * @return ERR_OK if successful, ERR_MEM if out of memory + */ +static err_t +pub_ack_rec_rel_response(mqtt_client_t *client, u8_t msg, u16_t pkt_id, u8_t qos) +{ + err_t err = ERR_OK; + if (mqtt_output_check_space(&client->output, 2)) { + mqtt_output_append_fixed_header(&client->output, msg, 0, qos, 0, 2); + mqtt_output_append_u16(&client->output, pkt_id); + mqtt_output_send(&client->output, client->conn); + } else { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("pub_ack_rec_rel_response: OOM creating response: %s with pkt_id: %d\n", + mqtt_msg_type_to_str(msg), pkt_id)); + err = ERR_MEM; + } + return err; +} + +/** + * Subscribe response from server + * @param r Matching request + * @param result Result code from server + */ +static void +mqtt_incomming_suback(struct mqtt_request_t *r, u8_t result) +{ + if (r->cb != NULL) { + r->cb(r->arg, result < 3 ? ERR_OK : ERR_ABRT); + } +} + + +/** + * Complete MQTT message received or buffer full + * @param client MQTT client + * @param fixed_hdr_idx header index + * @param length length received part + * @param remaining_length Remaining length of complete message + */ +static mqtt_connection_status_t + mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_idx, u16_t length, u32_t remaining_length) +{ + mqtt_connection_status_t res = MQTT_CONNECT_ACCEPTED; + + u8_t *var_hdr_payload = client->rx_buffer + fixed_hdr_idx; + + /* Control packet type */ + u8_t pkt_type = MQTT_CTL_PACKET_TYPE(client->rx_buffer[0]); + u16_t pkt_id = 0; + + if (pkt_type == MQTT_MSG_TYPE_CONNACK) { + if (client->conn_state == MQTT_CONNECTING) { + /* Get result code from CONNACK */ + res = (mqtt_connection_status_t)var_hdr_payload[1]; + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: Connect response code %d\n", res)); + if (res == MQTT_CONNECT_ACCEPTED) { + /* Reset cyclic_tick when changing to connected state */ + client->cyclic_tick = 0; + client->conn_state = MQTT_CONNECTED; + /* Notify upper layer */ + if (client->connect_cb != 0) { + client->connect_cb(client, client->connect_arg, res); + } + } + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Received CONNACK in connected state\n")); + } + } else if (pkt_type == MQTT_MSG_TYPE_PINGRESP) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,( "mqtt_message_received: Received PINGRESP from server\n")); + + } else if (pkt_type == MQTT_MSG_TYPE_PUBLISH) { + u16_t payload_offset = 0; + u16_t payload_length = length; + u8_t qos = MQTT_CTL_PACKET_QOS(client->rx_buffer[0]); + + if (client->msg_idx <= MQTT_VAR_HEADER_BUFFER_LEN) { + /* Should have topic and pkt id*/ + uint8_t *topic; + uint16_t after_topic; + u8_t bkp; + u16_t topic_len = var_hdr_payload[0]; + topic_len = (topic_len << 8) + (u16_t)(var_hdr_payload[1]); + + topic = var_hdr_payload + 2; + after_topic = 2 + topic_len; + /* Check length, add one byte even for QoS 0 so that zero termination will fit */ + if ((after_topic + (qos? 2 : 1)) > length) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n")); + goto out_disconnect; + } + + /* id for QoS 1 and 2 */ + if (qos > 0) { + client->inpub_pkt_id = ((u16_t)var_hdr_payload[after_topic] << 8) + (u16_t)var_hdr_payload[after_topic + 1]; + after_topic += 2; + } else { + client->inpub_pkt_id = 0; + } + /* Take backup of byte after topic */ + bkp = topic[topic_len]; + /* Zero terminate string */ + topic[topic_len] = 0; + /* Payload data remaining in receive buffer */ + payload_length = length - after_topic; + payload_offset = after_topic; + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Received message with QoS %d at topic: %s, payload length %d\n", + qos, topic, remaining_length + payload_length)); + if (client->pub_cb != NULL) { + client->pub_cb(client->inpub_arg, (const char *)topic, remaining_length + payload_length); + } + /* Restore byte after topic */ + topic[topic_len] = bkp; + } + if (payload_length > 0 || remaining_length == 0) { + client->data_cb(client->inpub_arg, var_hdr_payload + payload_offset, payload_length, remaining_length == 0 ? MQTT_DATA_FLAG_LAST : 0); + /* Reply if QoS > 0 */ + if (remaining_length == 0 && qos > 0) { + /* Send PUBACK for QoS 1 or PUBREC for QoS 2 */ + u8_t resp_msg = (qos == 1) ? MQTT_MSG_TYPE_PUBACK : MQTT_MSG_TYPE_PUBREC; + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_incomming_publish: Sending publish response: %s with pkt_id: %d\n", + mqtt_msg_type_to_str(resp_msg), client->inpub_pkt_id)); + pub_ack_rec_rel_response(client, resp_msg, client->inpub_pkt_id, 0); + } + } + } else { + /* Get packet identifier */ + pkt_id = (u16_t)var_hdr_payload[0] << 8; + pkt_id |= (u16_t)var_hdr_payload[1]; + if (pkt_id == 0) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: Got message with illegal packet identifier: 0\n")); + goto out_disconnect; + } + if (pkt_type == MQTT_MSG_TYPE_PUBREC) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREC, sending PUBREL with pkt_id: %d\n",pkt_id)); + pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBREL, pkt_id, 1); + + } else if (pkt_type == MQTT_MSG_TYPE_PUBREL) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: PUBREL, sending PUBCOMP response with pkt_id: %d\n",pkt_id)); + pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBCOMP, pkt_id, 0); + + } else if (pkt_type == MQTT_MSG_TYPE_SUBACK || pkt_type == MQTT_MSG_TYPE_UNSUBACK || + pkt_type == MQTT_MSG_TYPE_PUBCOMP || pkt_type == MQTT_MSG_TYPE_PUBACK) { + struct mqtt_request_t *r = mqtt_take_request(&client->pend_req_queue, pkt_id); + if (r != NULL) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_message_received: %s response with id %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); + if (pkt_type == MQTT_MSG_TYPE_SUBACK) { + if (length < 3) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_message_received: To small SUBACK packet\n")); + goto out_disconnect; + } else { + mqtt_incomming_suback(r, var_hdr_payload[2]); + } + } else if (r->cb != NULL) { + r->cb(r->arg, ERR_OK); + } + mqtt_delete_request(r); + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received %s reply, with wrong pkt_id: %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id)); + } + } else { + LWIP_DEBUGF(MQTT_DEBUG_WARN,( "mqtt_message_received: Received unknown message type: %d\n", pkt_type)); + goto out_disconnect; + } + } + return res; +out_disconnect: + return MQTT_CONNECT_DISCONNECTED; +} + + +/** + * MQTT incoming message parser + * @param client MQTT client + * @param p PBUF chain of received data + * @return Connection status + */ +static mqtt_connection_status_t +mqtt_parse_incoming(mqtt_client_t *client, struct pbuf *p) +{ + u16_t in_offset = 0; + u32_t msg_rem_len = 0; + u8_t fixed_hdr_idx = 0; + u8_t b = 0; + + while (p->tot_len > in_offset) { + if ((fixed_hdr_idx < 2) || ((b & 0x80) != 0)) { + + if (fixed_hdr_idx < client->msg_idx) { + b = client->rx_buffer[fixed_hdr_idx]; + } else { + b = pbuf_get_at(p, in_offset++); + client->rx_buffer[client->msg_idx++] = b; + } + fixed_hdr_idx++; + + if (fixed_hdr_idx >= 2) { + msg_rem_len |= (u32_t)(b & 0x7f) << ((fixed_hdr_idx - 2) * 7); + if ((b & 0x80) == 0) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: Remaining length after fixed header: %d\n", msg_rem_len)); + if (msg_rem_len == 0) { + /* Complete message with no extra headers of payload received */ + mqtt_message_received(client, fixed_hdr_idx, 0, 0); + client->msg_idx = 0; + fixed_hdr_idx = 0; + } else { + /* Bytes remaining in message */ + msg_rem_len = (msg_rem_len + fixed_hdr_idx) - client->msg_idx; + } + } + } + } else { + u16_t cpy_len, cpy_start, buffer_space; + + cpy_start = (client->msg_idx - fixed_hdr_idx) % (MQTT_VAR_HEADER_BUFFER_LEN - fixed_hdr_idx) + fixed_hdr_idx; + + /* Allow to copy the lesser one of available length in input data or bytes remaining in message */ + cpy_len = (u16_t)LWIP_MIN((u16_t)(p->tot_len - in_offset), msg_rem_len); + + /* Limit to available space in buffer */ + buffer_space = MQTT_VAR_HEADER_BUFFER_LEN - cpy_start; + if (cpy_len > buffer_space) { + cpy_len = buffer_space; + } + pbuf_copy_partial(p, client->rx_buffer+cpy_start, cpy_len, in_offset); + + /* Advance get and put indexes */ + client->msg_idx += cpy_len; + in_offset += cpy_len; + msg_rem_len -= cpy_len; + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_parse_incoming: msg_idx: %d, cpy_len: %d, remaining %d\n", client->msg_idx, cpy_len, msg_rem_len)); + if (msg_rem_len == 0 || cpy_len == buffer_space) { + /* Whole message received or buffer is full */ + mqtt_connection_status_t res = mqtt_message_received(client, fixed_hdr_idx, (cpy_start + cpy_len) - fixed_hdr_idx, msg_rem_len); + if (res != MQTT_CONNECT_ACCEPTED) { + return res; + } + if (msg_rem_len == 0) { + /* Reset parser state */ + client->msg_idx = 0; + /* msg_tot_len = 0; */ + fixed_hdr_idx = 0; + } + } + } + } + return MQTT_CONNECT_ACCEPTED; +} + + +/** + * TCP received callback function. @see tcp_recv_fn + * @param arg MQTT client + * @param p PBUF chain of received data + * @param err Passed as return value if not ERR_OK + * @return ERR_OK or err passed into callback + */ +static err_t +mqtt_tcp_recv_cb(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) +{ + mqtt_client_t *client = (mqtt_client_t *)arg; + LWIP_ASSERT("mqtt_tcp_recv_cb: client != NULL", client != NULL); + LWIP_ASSERT("mqtt_tcp_recv_cb: client->conn == pcb", client->conn == pcb); + + if (p == NULL) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_recv_cb: Recv pbuf=NULL, remote has closed connection\n")); + mqtt_close(client, MQTT_CONNECT_DISCONNECTED); + } else { + mqtt_connection_status_t res; + if (err != ERR_OK) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_recv_cb: Recv err=%d\n", err)); + pbuf_free(p); + return err; + } + + /* Tell remote that data has been received */ + tcp_recved(pcb, p->tot_len); + res = mqtt_parse_incoming(client, p); + pbuf_free(p); + + if (res != MQTT_CONNECT_ACCEPTED) { + mqtt_close(client, res); + } + /* If keep alive functionality is used */ + if (client->keep_alive != 0) { + /* Reset server alive watchdog */ + client->server_watchdog = 0; + } + + } + return ERR_OK; +} + + +/** + * TCP data sent callback function. @see tcp_sent_fn + * @param arg MQTT client + * @param tpcb TCP connection handle + * @param len Number of bytes sent + * @return ERR_OK + */ +static err_t +mqtt_tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len) +{ + mqtt_client_t *client = (mqtt_client_t *)arg; + + LWIP_UNUSED_ARG(tpcb); + LWIP_UNUSED_ARG(len); + + if (client->conn_state == MQTT_CONNECTED) { + struct mqtt_request_t *r; + + /* Reset keep-alive send timer and server watchdog */ + client->cyclic_tick = 0; + client->server_watchdog = 0; + /* QoS 0 publish has no response from server, so call its callbacks here */ + while ((r = mqtt_take_request(&client->pend_req_queue, 0)) != NULL) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_sent_cb: Calling QoS 0 publish complete callback\n")); + if (r->cb != NULL) { + r->cb(r->arg, ERR_OK); + } + mqtt_delete_request(r); + } + /* Try send any remaining buffers from output queue */ + mqtt_output_send(&client->output, client->conn); + } + return ERR_OK; +} + +/** + * TCP error callback function. @see tcp_err_fn + * @param arg MQTT client + * @param err Error encountered + */ +static void +mqtt_tcp_err_cb(void *arg, err_t err) +{ + mqtt_client_t *client = (mqtt_client_t *)arg; + LWIP_UNUSED_ARG(err); /* only used for debug output */ + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_err_cb: TCP error callback: error %d, arg: %p\n", err, arg)); + LWIP_ASSERT("mqtt_tcp_err_cb: client != NULL", client != NULL); + /* Set conn to null before calling close as pcb is already deallocated*/ + client->conn = 0; + mqtt_close(client, MQTT_CONNECT_DISCONNECTED); +} + +/** + * TCP poll callback function. @see tcp_poll_fn + * @param arg MQTT client + * @param tpcb TCP connection handle + * @return err ERR_OK + */ +static err_t +mqtt_tcp_poll_cb(void *arg, struct tcp_pcb *tpcb) +{ + mqtt_client_t *client = (mqtt_client_t *)arg; + if (client->conn_state == MQTT_CONNECTED) { + /* Try send any remaining buffers from output queue */ + mqtt_output_send(&client->output, tpcb); + } + return ERR_OK; +} + +/** + * TCP connect callback function. @see tcp_connected_fn + * @param arg MQTT client + * @param err Always ERR_OK, mqtt_tcp_err_cb is called in case of error + * @return ERR_OK + */ +static err_t +mqtt_tcp_connect_cb(void *arg, struct tcp_pcb *tpcb, err_t err) +{ + mqtt_client_t* client = (mqtt_client_t *)arg; + + if (err != ERR_OK) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_tcp_connect_cb: TCP connect error %d\n", err)); + return err; + } + + /* Initiate receiver state */ + client->msg_idx = 0; + + /* Setup TCP callbacks */ + tcp_recv(tpcb, mqtt_tcp_recv_cb); + tcp_sent(tpcb, mqtt_tcp_sent_cb); + tcp_poll(tpcb, mqtt_tcp_poll_cb, 2); + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_tcp_connect_cb: TCP connection established to server\n")); + /* Enter MQTT connect state */ + client->conn_state = MQTT_CONNECTING; + + /* Start cyclic timer */ + sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL*1000, mqtt_cyclic_timer, client); + client->cyclic_tick = 0; + + /* Start transmission from output queue, connect message is the first one out*/ + mqtt_output_send(&client->output, client->conn); + + return ERR_OK; +} + + + +/*---------------------------------------------------------------------------------------------------- */ +/* Public API */ + + +/** + * @ingroup mqtt + * MQTT publish function. + * @param client MQTT client + * @param topic Publish topic string + * @param payload Data to publish (NULL is allowed) + * @param payload_length: Length of payload (0 is allowed) + * @param qos Quality of service, 0 1 or 2 + * @param retain MQTT retain flag + * @param cb Callback to call when publish is complete or has timed out + * @param arg User supplied argument to publish callback + * @return ERR_OK if successful + * ERR_CONN if client is disconnected + * ERR_MEM if short on memory + */ +err_t +mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, + mqtt_request_cb_t cb, void *arg) +{ + struct mqtt_request_t *r; + u16_t pkt_id; + size_t topic_strlen; + size_t total_len; + u16_t topic_len; + u16_t remaining_length; + + LWIP_ASSERT("mqtt_publish: client != NULL", client); + LWIP_ASSERT("mqtt_publish: topic != NULL", topic); + LWIP_ERROR("mqtt_publish: TCP disconnected", (client->conn_state != TCP_DISCONNECTED), return ERR_CONN); + + topic_strlen = strlen(topic); + LWIP_ERROR("mqtt_publish: topic length overflow", (topic_strlen <= (0xFFFF - 2)), return ERR_ARG); + topic_len = (u16_t)topic_strlen; + total_len = 2 + topic_len + payload_length; + LWIP_ERROR("mqtt_publish: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); + remaining_length = (u16_t)total_len; + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_publish: Publish with payload length %d to topic \"%s\"\n", payload_length, topic)); + + if (qos > 0) { + remaining_length += 2; + /* Generate pkt_id id for QoS1 and 2 */ + pkt_id = msg_generate_packet_id(client); + } else { + /* Use reserved value pkt_id 0 for QoS 0 in request handle */ + pkt_id = 0; + } + + r = mqtt_create_request(client->req_list, pkt_id, cb, arg); + if (r == NULL) { + return ERR_MEM; + } + + if (mqtt_output_check_space(&client->output, remaining_length) == 0) { + mqtt_delete_request(r); + return ERR_MEM; + } + /* Append fixed header */ + mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_PUBLISH, 0, qos, retain, remaining_length); + + /* Append Topic */ + mqtt_output_append_string(&client->output, topic, topic_len); + + /* Append packet if for QoS 1 and 2*/ + if (qos > 0) { + mqtt_output_append_u16(&client->output, pkt_id); + } + + /* Append optional publish payload */ + if ((payload != NULL) && (payload_length > 0)) { + mqtt_output_append_buf(&client->output, payload, payload_length); + } + + mqtt_append_request(&client->pend_req_queue, r); + mqtt_output_send(&client->output, client->conn); + return ERR_OK; +} + + +/** + * @ingroup mqtt + * MQTT subscribe/unsubscribe function. + * @param client MQTT client + * @param topic topic to subscribe to + * @param qos Quality of service, 0 1 or 2 (only used for subscribe) + * @param cb Callback to call when subscribe/unsubscribe reponse is received + * @param arg User supplied argument to publish callback + * @param sub 1 for subscribe, 0 for unsubscribe + * @return ERR_OK if successful, @see err_t enum for other results + */ +err_t +mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub) +{ + size_t topic_strlen; + size_t total_len; + u16_t topic_len; + u16_t remaining_length; + u16_t pkt_id; + struct mqtt_request_t *r; + + LWIP_ASSERT("mqtt_sub_unsub: client != NULL", client); + LWIP_ASSERT("mqtt_sub_unsub: topic != NULL", topic); + + topic_strlen = strlen(topic); + LWIP_ERROR("mqtt_sub_unsub: topic length overflow", (topic_strlen <= (0xFFFF - 2)), return ERR_ARG); + topic_len = (u16_t)topic_strlen; + /* Topic string, pkt_id, qos for subscribe */ + total_len = topic_len + 2 + 2 + (sub != 0); + LWIP_ERROR("mqtt_sub_unsub: total length overflow", (total_len <= 0xFFFF), return ERR_ARG); + remaining_length = (u16_t)total_len; + + LWIP_ASSERT("mqtt_sub_unsub: qos < 3", qos < 3); + if (client->conn_state == TCP_DISCONNECTED) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_sub_unsub: Can not (un)subscribe in disconnected state\n")); + return ERR_CONN; + } + + pkt_id = msg_generate_packet_id(client); + r = mqtt_create_request(client->req_list, pkt_id, cb, arg); + if (r == NULL) { + return ERR_MEM; + } + + if (mqtt_output_check_space(&client->output, remaining_length) == 0) { + mqtt_delete_request(r); + return ERR_MEM; + } + + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_sub_unsub: Client (un)subscribe to topic \"%s\", id: %d\n", topic, pkt_id)); + + mqtt_output_append_fixed_header(&client->output, sub ? MQTT_MSG_TYPE_SUBSCRIBE : MQTT_MSG_TYPE_UNSUBSCRIBE, 0, 1, 0, remaining_length); + /* Packet id */ + mqtt_output_append_u16(&client->output, pkt_id); + /* Topic */ + mqtt_output_append_string(&client->output, topic, topic_len); + /* QoS */ + if (sub != 0) { + mqtt_output_append_u8(&client->output, LWIP_MIN(qos, 2)); + } + + mqtt_append_request(&client->pend_req_queue, r); + mqtt_output_send(&client->output, client->conn); + return ERR_OK; +} + + +/** + * @ingroup mqtt + * Set callback to handle incoming publish requests from server + * @param client MQTT client + * @param pub_cb Callback invoked when publish starts, contain topic and total length of payload + * @param data_cb Callback for each fragment of payload that arrives + * @param arg User supplied argument to both callbacks + */ +void +mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t pub_cb, + mqtt_incoming_data_cb_t data_cb, void *arg) +{ + LWIP_ASSERT("mqtt_set_inpub_callback: client != NULL", client != NULL); + client->data_cb = data_cb; + client->pub_cb = pub_cb; + client->inpub_arg = arg; +} + +/** + * @ingroup mqtt + * Create a new MQTT client instance + * @return Pointer to instance on success, NULL otherwise + */ +mqtt_client_t * +mqtt_client_new(void) +{ + mqtt_client_t *client = (mqtt_client_t *)mem_malloc(sizeof(mqtt_client_t)); + if (client != NULL) { + memset(client, 0, sizeof(mqtt_client_t)); + } + return client; +} + + +/** + * @ingroup mqtt + * Connect to MQTT server + * @param client MQTT client + * @param ip_addr Server IP + * @param port Server port + * @param cb Connection state change callback + * @param arg User supplied argument to connection callback + * @param client_info Client identification and connection options + * @return ERR_OK if successful, @see err_t enum for other results + */ +err_t +mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port, mqtt_connection_cb_t cb, void *arg, + const struct mqtt_connect_client_info_t *client_info) +{ + err_t err; + size_t len; + u16_t client_id_length; + /* Length is the sum of 2+"MQTT", protocol level, flags and keep alive */ + u16_t remaining_length = 2 + 4 + 1 + 1 + 2; + u8_t flags = 0, will_topic_len = 0, will_msg_len = 0; + + LWIP_ASSERT("mqtt_client_connect: client != NULL", client != NULL); + LWIP_ASSERT("mqtt_client_connect: ip_addr != NULL", ip_addr != NULL); + LWIP_ASSERT("mqtt_client_connect: client_info != NULL", client_info != NULL); + LWIP_ASSERT("mqtt_client_connect: client_info->client_id != NULL", client_info->client_id != NULL); + + if (client->conn_state != TCP_DISCONNECTED) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_client_connect: Already connected\n")); + return ERR_ISCONN; + } + + /* Wipe clean */ + memset(client, 0, sizeof(mqtt_client_t)); + client->connect_arg = arg; + client->connect_cb = cb; + client->keep_alive = client_info->keep_alive; + mqtt_init_requests(client->req_list); + + /* Build connect message */ + if (client_info->will_topic != NULL && client_info->will_msg != NULL) { + flags |= MQTT_CONNECT_FLAG_WILL; + flags |= (client_info->will_qos & 3) << 3; + if (client_info->will_retain) { + flags |= MQTT_CONNECT_FLAG_WILL_RETAIN; + } + len = strlen(client_info->will_topic); + LWIP_ERROR("mqtt_client_connect: client_info->will_topic length overflow", len <= 0xFF, return ERR_VAL); + LWIP_ERROR("mqtt_client_connect: client_info->will_topic length must be > 0", len > 0, return ERR_VAL); + will_topic_len = (u8_t)len; + len = strlen(client_info->will_msg); + LWIP_ERROR("mqtt_client_connect: client_info->will_msg length overflow", len <= 0xFF, return ERR_VAL); + will_msg_len = (u8_t)len; + len = remaining_length + 2 + will_topic_len + 2 + will_msg_len; + LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); + remaining_length = (u16_t)len; + } + + /* Don't complicate things, always connect using clean session */ + flags |= MQTT_CONNECT_FLAG_CLEAN_SESSION; + + len = strlen(client_info->client_id); + LWIP_ERROR("mqtt_client_connect: client_info->client_id length overflow", len <= 0xFFFF, return ERR_VAL); + client_id_length = (u16_t)len; + len = remaining_length + 2 + client_id_length; + LWIP_ERROR("mqtt_client_connect: remaining_length overflow", len <= 0xFFFF, return ERR_VAL); + remaining_length = (u16_t)len; + + if (mqtt_output_check_space(&client->output, remaining_length) == 0) { + return ERR_MEM; + } + + client->conn = tcp_new(); + if (client->conn == NULL) { + return ERR_MEM; + } + + /* Set arg pointer for callbacks */ + tcp_arg(client->conn, client); + /* Any local address, pick random local port number */ + err = tcp_bind(client->conn, IP_ADDR_ANY, 0); + if (err != ERR_OK) { + LWIP_DEBUGF(MQTT_DEBUG_WARN,("mqtt_client_connect: Error binding to local ip/port, %d\n", err)); + goto tcp_fail; + } + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Connecting to host: %s at port:%"U16_F"\n", ipaddr_ntoa(ip_addr), port)); + + /* Connect to server */ + err = tcp_connect(client->conn, ip_addr, port, mqtt_tcp_connect_cb); + if (err != ERR_OK) { + LWIP_DEBUGF(MQTT_DEBUG_TRACE,("mqtt_client_connect: Error connecting to remote ip/port, %d\n", err)); + goto tcp_fail; + } + /* Set error callback */ + tcp_err(client->conn, mqtt_tcp_err_cb); + client->conn_state = TCP_CONNECTING; + + /* Append fixed header */ + mqtt_output_append_fixed_header(&client->output, MQTT_MSG_TYPE_CONNECT, 0, 0, 0, remaining_length); + /* Append Protocol string */ + mqtt_output_append_string(&client->output, "MQTT", 4); + /* Append Protocol level */ + mqtt_output_append_u8(&client->output, 4); + /* Append connect flags */ + mqtt_output_append_u8(&client->output, flags); + /* Append keep-alive */ + mqtt_output_append_u16(&client->output, client_info->keep_alive); + /* Append client id */ + mqtt_output_append_string(&client->output, client_info->client_id, client_id_length); + /* Append will message if used */ + if ((flags & MQTT_CONNECT_FLAG_WILL) != 0) { + mqtt_output_append_string(&client->output, client_info->will_topic, will_topic_len); + mqtt_output_append_string(&client->output, client_info->will_msg, will_msg_len); + } + return ERR_OK; + +tcp_fail: + tcp_abort(client->conn); + client->conn = NULL; + return err; +} + + +/** + * @ingroup mqtt + * Disconnect from MQTT server + * @param client MQTT client + */ +void +mqtt_disconnect(mqtt_client_t *client) +{ + LWIP_ASSERT("mqtt_disconnect: client != NULL", client); + /* If connection in not already closed */ + if (client->conn_state != TCP_DISCONNECTED) { + /* Set conn_state before calling mqtt_close to prevent callback from being called */ + client->conn_state = TCP_DISCONNECTED; + mqtt_close(client, (mqtt_connection_status_t)0); + } +} + +/** + * @ingroup mqtt + * Check connection with server + * @param client MQTT client + * @return 1 if connected to server, 0 otherwise + */ +u8_t +mqtt_client_is_connected(mqtt_client_t *client) +{ + LWIP_ASSERT("mqtt_client_is_connected: client != NULL", client); + return client->conn_state == MQTT_CONNECTED; +} + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/def.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/def.c index 8125313..63cb74b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/def.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/def.c @@ -1,222 +1,222 @@ -/** - * @file - * Common functions used throughout the stack. - * - * These are reference implementations of the byte swapping functions. - * Again with the aim of being simple, correct and fully portable. - * Byte swapping is the second thing you would want to optimize. You will - * need to port it to your architecture and in your cc.h: - * - * \#define lwip_htons(x) your_htons - * \#define lwip_htonl(x) your_htonl - * - * Note lwip_ntohs() and lwip_ntohl() are merely references to the htonx counterparts. - * - * If you \#define them to htons() and htonl(), you should - * \#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from - * defining htonx/ntohx compatibility macros. - - * @defgroup sys_nonstandard Non-standard functions - * @ingroup sys_layer - * lwIP provides default implementations for non-standard functions. - * These can be mapped to OS functions to reduce code footprint if desired. - * All defines related to this section must not be placed in lwipopts.h, - * but in arch/cc.h! - * These options cannot be \#defined in lwipopts.h since they are not options - * of lwIP itself, but options of the lwIP port to your system. - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Simon Goldschmidt - * - */ - -#include "lwip/opt.h" -#include "lwip/def.h" - -#include - -#if BYTE_ORDER == LITTLE_ENDIAN - -#if !defined(lwip_htons) -/** - * Convert an u16_t from host- to network byte order. - * - * @param n u16_t in host byte order - * @return n in network byte order - */ -u16_t -lwip_htons(u16_t n) -{ - return (u16_t)PP_HTONS(n); -} -#endif /* lwip_htons */ - -#if !defined(lwip_htonl) -/** - * Convert an u32_t from host- to network byte order. - * - * @param n u32_t in host byte order - * @return n in network byte order - */ -u32_t -lwip_htonl(u32_t n) -{ - return (u32_t)PP_HTONL(n); -} -#endif /* lwip_htonl */ - -#endif /* BYTE_ORDER == LITTLE_ENDIAN */ - -#ifndef lwip_strnstr -/** - * @ingroup sys_nonstandard - * lwIP default implementation for strnstr() non-standard function. - * This can be \#defined to strnstr() depending on your platform port. - */ -char* -lwip_strnstr(const char* buffer, const char* token, size_t n) -{ - const char* p; - size_t tokenlen = strlen(token); - if (tokenlen == 0) { - return LWIP_CONST_CAST(char *, buffer); - } - for (p = buffer; *p && (p + tokenlen <= buffer + n); p++) { - if ((*p == *token) && (strncmp(p, token, tokenlen) == 0)) { - return LWIP_CONST_CAST(char *, p); - } - } - return NULL; -} -#endif - -#ifndef lwip_stricmp -/** - * @ingroup sys_nonstandard - * lwIP default implementation for stricmp() non-standard function. - * This can be \#defined to stricmp() depending on your platform port. - */ -int -lwip_stricmp(const char* str1, const char* str2) -{ - char c1, c2; - - do { - c1 = *str1++; - c2 = *str2++; - if (c1 != c2) { - char c1_upc = c1 | 0x20; - if ((c1_upc >= 'a') && (c1_upc <= 'z')) { - /* characters are not equal an one is in the alphabet range: - downcase both chars and check again */ - char c2_upc = c2 | 0x20; - if (c1_upc != c2_upc) { - /* still not equal */ - /* don't care for < or > */ - return 1; - } - } else { - /* characters are not equal but none is in the alphabet range */ - return 1; - } - } - } while (c1 != 0); - return 0; -} -#endif - -#ifndef lwip_strnicmp -/** - * @ingroup sys_nonstandard - * lwIP default implementation for strnicmp() non-standard function. - * This can be \#defined to strnicmp() depending on your platform port. - */ -int -lwip_strnicmp(const char* str1, const char* str2, size_t len) -{ - char c1, c2; - - do { - c1 = *str1++; - c2 = *str2++; - if (c1 != c2) { - char c1_upc = c1 | 0x20; - if ((c1_upc >= 'a') && (c1_upc <= 'z')) { - /* characters are not equal an one is in the alphabet range: - downcase both chars and check again */ - char c2_upc = c2 | 0x20; - if (c1_upc != c2_upc) { - /* still not equal */ - /* don't care for < or > */ - return 1; - } - } else { - /* characters are not equal but none is in the alphabet range */ - return 1; - } - } - } while (len-- && c1 != 0); - return 0; -} -#endif - -#ifndef lwip_itoa -/** - * @ingroup sys_nonstandard - * lwIP default implementation for itoa() non-standard function. - * This can be \#defined to itoa() or snprintf(result, bufsize, "%d", number) depending on your platform port. - */ -void -lwip_itoa(char* result, size_t bufsize, int number) -{ - const int base = 10; - char* ptr = result, *ptr1 = result, tmp_char; - int tmp_value; - LWIP_UNUSED_ARG(bufsize); - - do { - tmp_value = number; - number /= base; - *ptr++ = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz"[35 + (tmp_value - number * base)]; - } while(number); - - /* Apply negative sign */ - if (tmp_value < 0) { - *ptr++ = '-'; - } - *ptr-- = '\0'; - while(ptr1 < ptr) { - tmp_char = *ptr; - *ptr--= *ptr1; - *ptr1++ = tmp_char; - } -} -#endif +/** + * @file + * Common functions used throughout the stack. + * + * These are reference implementations of the byte swapping functions. + * Again with the aim of being simple, correct and fully portable. + * Byte swapping is the second thing you would want to optimize. You will + * need to port it to your architecture and in your cc.h: + * + * \#define lwip_htons(x) your_htons + * \#define lwip_htonl(x) your_htonl + * + * Note lwip_ntohs() and lwip_ntohl() are merely references to the htonx counterparts. + * + * If you \#define them to htons() and htonl(), you should + * \#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from + * defining htonx/ntohx compatibility macros. + + * @defgroup sys_nonstandard Non-standard functions + * @ingroup sys_layer + * lwIP provides default implementations for non-standard functions. + * These can be mapped to OS functions to reduce code footprint if desired. + * All defines related to this section must not be placed in lwipopts.h, + * but in arch/cc.h! + * These options cannot be \#defined in lwipopts.h since they are not options + * of lwIP itself, but options of the lwIP port to your system. + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ + +#include "lwip/opt.h" +#include "lwip/def.h" + +#include + +#if BYTE_ORDER == LITTLE_ENDIAN + +#if !defined(lwip_htons) +/** + * Convert an u16_t from host- to network byte order. + * + * @param n u16_t in host byte order + * @return n in network byte order + */ +u16_t +lwip_htons(u16_t n) +{ + return (u16_t)PP_HTONS(n); +} +#endif /* lwip_htons */ + +#if !defined(lwip_htonl) +/** + * Convert an u32_t from host- to network byte order. + * + * @param n u32_t in host byte order + * @return n in network byte order + */ +u32_t +lwip_htonl(u32_t n) +{ + return (u32_t)PP_HTONL(n); +} +#endif /* lwip_htonl */ + +#endif /* BYTE_ORDER == LITTLE_ENDIAN */ + +#ifndef lwip_strnstr +/** + * @ingroup sys_nonstandard + * lwIP default implementation for strnstr() non-standard function. + * This can be \#defined to strnstr() depending on your platform port. + */ +char* +lwip_strnstr(const char* buffer, const char* token, size_t n) +{ + const char* p; + size_t tokenlen = strlen(token); + if (tokenlen == 0) { + return LWIP_CONST_CAST(char *, buffer); + } + for (p = buffer; *p && (p + tokenlen <= buffer + n); p++) { + if ((*p == *token) && (strncmp(p, token, tokenlen) == 0)) { + return LWIP_CONST_CAST(char *, p); + } + } + return NULL; +} +#endif + +#ifndef lwip_stricmp +/** + * @ingroup sys_nonstandard + * lwIP default implementation for stricmp() non-standard function. + * This can be \#defined to stricmp() depending on your platform port. + */ +int +lwip_stricmp(const char* str1, const char* str2) +{ + char c1, c2; + + do { + c1 = *str1++; + c2 = *str2++; + if (c1 != c2) { + char c1_upc = c1 | 0x20; + if ((c1_upc >= 'a') && (c1_upc <= 'z')) { + /* characters are not equal an one is in the alphabet range: + downcase both chars and check again */ + char c2_upc = c2 | 0x20; + if (c1_upc != c2_upc) { + /* still not equal */ + /* don't care for < or > */ + return 1; + } + } else { + /* characters are not equal but none is in the alphabet range */ + return 1; + } + } + } while (c1 != 0); + return 0; +} +#endif + +#ifndef lwip_strnicmp +/** + * @ingroup sys_nonstandard + * lwIP default implementation for strnicmp() non-standard function. + * This can be \#defined to strnicmp() depending on your platform port. + */ +int +lwip_strnicmp(const char* str1, const char* str2, size_t len) +{ + char c1, c2; + + do { + c1 = *str1++; + c2 = *str2++; + if (c1 != c2) { + char c1_upc = c1 | 0x20; + if ((c1_upc >= 'a') && (c1_upc <= 'z')) { + /* characters are not equal an one is in the alphabet range: + downcase both chars and check again */ + char c2_upc = c2 | 0x20; + if (c1_upc != c2_upc) { + /* still not equal */ + /* don't care for < or > */ + return 1; + } + } else { + /* characters are not equal but none is in the alphabet range */ + return 1; + } + } + } while (len-- && c1 != 0); + return 0; +} +#endif + +#ifndef lwip_itoa +/** + * @ingroup sys_nonstandard + * lwIP default implementation for itoa() non-standard function. + * This can be \#defined to itoa() or snprintf(result, bufsize, "%d", number) depending on your platform port. + */ +void +lwip_itoa(char* result, size_t bufsize, int number) +{ + const int base = 10; + char* ptr = result, *ptr1 = result, tmp_char; + int tmp_value; + LWIP_UNUSED_ARG(bufsize); + + do { + tmp_value = number; + number /= base; + *ptr++ = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz"[35 + (tmp_value - number * base)]; + } while(number); + + /* Apply negative sign */ + if (tmp_value < 0) { + *ptr++ = '-'; + } + *ptr-- = '\0'; + while(ptr1 < ptr) { + tmp_char = *ptr; + *ptr--= *ptr1; + *ptr1++ = tmp_char; + } +} +#endif diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/dns.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/dns.c index 12c6f16..bf6306f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/dns.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/dns.c @@ -1,1573 +1,1573 @@ -/** - * @file - * DNS - host name to IP address resolver. - * - * @defgroup dns DNS - * @ingroup callbackstyle_api - * - * Implements a DNS host name to IP address resolver. - * - * The lwIP DNS resolver functions are used to lookup a host name and - * map it to a numerical IP address. It maintains a list of resolved - * hostnames that can be queried with the dns_lookup() function. - * New hostnames can be resolved using the dns_query() function. - * - * The lwIP version of the resolver also adds a non-blocking version of - * gethostbyname() that will work with a raw API application. This function - * checks for an IP address string first and converts it if it is valid. - * gethostbyname() then does a dns_lookup() to see if the name is - * already in the table. If so, the IP is returned. If not, a query is - * issued and the function returns with a ERR_INPROGRESS status. The app - * using the dns client must then go into a waiting state. - * - * Once a hostname has been resolved (or found to be non-existent), - * the resolver code calls a specified callback function (which - * must be implemented by the module that uses the resolver). - * - * Multicast DNS queries are supported for names ending on ".local". - * However, only "One-Shot Multicast DNS Queries" are supported (RFC 6762 - * chapter 5.1), this is not a fully compliant implementation of continuous - * mDNS querying! - * - * All functions must be called from TCPIP thread. - * - * @see @ref netconn_common for thread-safe access. - */ - -/* - * Port to lwIP from uIP - * by Jim Pettinato April 2007 - * - * security fixes and more by Simon Goldschmidt - * - * uIP version Copyright (c) 2002-2003, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/*----------------------------------------------------------------------------- - * RFC 1035 - Domain names - implementation and specification - * RFC 2181 - Clarifications to the DNS Specification - *----------------------------------------------------------------------------*/ - -/** @todo: define good default values (rfc compliance) */ -/** @todo: improve answer parsing, more checkings... */ -/** @todo: check RFC1035 - 7.3. Processing responses */ -/** @todo: one-shot mDNS: dual-stack fallback to another IP version */ - -/*----------------------------------------------------------------------------- - * Includes - *----------------------------------------------------------------------------*/ - -#include "lwip/opt.h" - -#if LWIP_DNS /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/def.h" -#include "lwip/udp.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/dns.h" -#include "lwip/prot/dns.h" - -#include - -/** Random generator function to create random TXIDs and source ports for queries */ -#ifndef DNS_RAND_TXID -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_XID) != 0) -#define DNS_RAND_TXID LWIP_RAND -#else -static u16_t dns_txid; -#define DNS_RAND_TXID() (++dns_txid) -#endif -#endif - -/** Limits the source port to be >= 1024 by default */ -#ifndef DNS_PORT_ALLOWED -#define DNS_PORT_ALLOWED(port) ((port) >= 1024) -#endif - -/** DNS maximum number of retries when asking for a name, before "timeout". */ -#ifndef DNS_MAX_RETRIES -#define DNS_MAX_RETRIES 4 -#endif - -/** DNS resource record max. TTL (one week as default) */ -#ifndef DNS_MAX_TTL -#define DNS_MAX_TTL 604800 -#elif DNS_MAX_TTL > 0x7FFFFFFF -#error DNS_MAX_TTL must be a positive 32-bit value -#endif - -#if DNS_TABLE_SIZE > 255 -#error DNS_TABLE_SIZE must fit into an u8_t -#endif -#if DNS_MAX_SERVERS > 255 -#error DNS_MAX_SERVERS must fit into an u8_t -#endif - -/* The number of parallel requests (i.e. calls to dns_gethostbyname - * that cannot be answered from the DNS table. - * This is set to the table size by default. - */ -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) -#ifndef DNS_MAX_REQUESTS -#define DNS_MAX_REQUESTS DNS_TABLE_SIZE -#else -#if DNS_MAX_REQUESTS > 255 -#error DNS_MAX_REQUESTS must fit into an u8_t -#endif -#endif -#else -/* In this configuration, both arrays have to have the same size and are used - * like one entry (used/free) */ -#define DNS_MAX_REQUESTS DNS_TABLE_SIZE -#endif - -/* The number of UDP source ports used in parallel */ -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) -#ifndef DNS_MAX_SOURCE_PORTS -#define DNS_MAX_SOURCE_PORTS DNS_MAX_REQUESTS -#else -#if DNS_MAX_SOURCE_PORTS > 255 -#error DNS_MAX_SOURCE_PORTS must fit into an u8_t -#endif -#endif -#else -#ifdef DNS_MAX_SOURCE_PORTS -#undef DNS_MAX_SOURCE_PORTS -#endif -#define DNS_MAX_SOURCE_PORTS 1 -#endif - -#if LWIP_IPV4 && LWIP_IPV6 -#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) (((t) == LWIP_DNS_ADDRTYPE_IPV6_IPV4) || ((t) == LWIP_DNS_ADDRTYPE_IPV6)) -#define LWIP_DNS_ADDRTYPE_MATCH_IP(t, ip) (IP_IS_V6_VAL(ip) ? LWIP_DNS_ADDRTYPE_IS_IPV6(t) : (!LWIP_DNS_ADDRTYPE_IS_IPV6(t))) -#define LWIP_DNS_ADDRTYPE_ARG(x) , x -#define LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(x) x -#define LWIP_DNS_SET_ADDRTYPE(x, y) do { x = y; } while(0) -#else -#if LWIP_IPV6 -#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) 1 -#else -#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) 0 -#endif -#define LWIP_DNS_ADDRTYPE_MATCH_IP(t, ip) 1 -#define LWIP_DNS_ADDRTYPE_ARG(x) -#define LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(x) 0 -#define LWIP_DNS_SET_ADDRTYPE(x, y) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - -#if LWIP_DNS_SUPPORT_MDNS_QUERIES -#define LWIP_DNS_ISMDNS_ARG(x) , x -#else -#define LWIP_DNS_ISMDNS_ARG(x) -#endif - -/** DNS query message structure. - No packing needed: only used locally on the stack. */ -struct dns_query { - /* DNS query record starts with either a domain name or a pointer - to a name already present somewhere in the packet. */ - u16_t type; - u16_t cls; -}; -#define SIZEOF_DNS_QUERY 4 - -/** DNS answer message structure. - No packing needed: only used locally on the stack. */ -struct dns_answer { - /* DNS answer record starts with either a domain name or a pointer - to a name already present somewhere in the packet. */ - u16_t type; - u16_t cls; - u32_t ttl; - u16_t len; -}; -#define SIZEOF_DNS_ANSWER 10 -/* maximum allowed size for the struct due to non-packed */ -#define SIZEOF_DNS_ANSWER_ASSERT 12 - -/* DNS table entry states */ -typedef enum { - DNS_STATE_UNUSED = 0, - DNS_STATE_NEW = 1, - DNS_STATE_ASKING = 2, - DNS_STATE_DONE = 3 -} dns_state_enum_t; - -/** DNS table entry */ -struct dns_table_entry { - u32_t ttl; - ip_addr_t ipaddr; - u16_t txid; - u8_t state; - u8_t server_idx; - u8_t tmr; - u8_t retries; - u8_t seqno; -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) - u8_t pcb_idx; -#endif - char name[DNS_MAX_NAME_LENGTH]; -#if LWIP_IPV4 && LWIP_IPV6 - u8_t reqaddrtype; -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - u8_t is_mdns; -#endif -}; - -/** DNS request table entry: used when dns_gehostbyname cannot answer the - * request from the DNS table */ -struct dns_req_entry { - /* pointer to callback on DNS query done */ - dns_found_callback found; - /* argument passed to the callback function */ - void *arg; -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) - u8_t dns_table_idx; -#endif -#if LWIP_IPV4 && LWIP_IPV6 - u8_t reqaddrtype; -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -}; - -#if DNS_LOCAL_HOSTLIST - -#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC -/** Local host-list. For hostnames in this list, no - * external name resolution is performed */ -static struct local_hostlist_entry *local_hostlist_dynamic; -#else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - -/** Defining this allows the local_hostlist_static to be placed in a different - * linker section (e.g. FLASH) */ -#ifndef DNS_LOCAL_HOSTLIST_STORAGE_PRE -#define DNS_LOCAL_HOSTLIST_STORAGE_PRE static -#endif /* DNS_LOCAL_HOSTLIST_STORAGE_PRE */ -/** Defining this allows the local_hostlist_static to be placed in a different - * linker section (e.g. FLASH) */ -#ifndef DNS_LOCAL_HOSTLIST_STORAGE_POST -#define DNS_LOCAL_HOSTLIST_STORAGE_POST -#endif /* DNS_LOCAL_HOSTLIST_STORAGE_POST */ -DNS_LOCAL_HOSTLIST_STORAGE_PRE struct local_hostlist_entry local_hostlist_static[] - DNS_LOCAL_HOSTLIST_STORAGE_POST = DNS_LOCAL_HOSTLIST_INIT; - -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - -static void dns_init_local(void); -static err_t dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype)); -#endif /* DNS_LOCAL_HOSTLIST */ - - -/* forward declarations */ -static void dns_recv(void *s, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); -static void dns_check_entries(void); -static void dns_call_found(u8_t idx, ip_addr_t* addr); - -/*----------------------------------------------------------------------------- - * Globals - *----------------------------------------------------------------------------*/ - -/* DNS variables */ -static struct udp_pcb *dns_pcbs[DNS_MAX_SOURCE_PORTS]; -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) -static u8_t dns_last_pcb_idx; -#endif -static u8_t dns_seqno; -static struct dns_table_entry dns_table[DNS_TABLE_SIZE]; -static struct dns_req_entry dns_requests[DNS_MAX_REQUESTS]; -static ip_addr_t dns_servers[DNS_MAX_SERVERS]; - -#if LWIP_IPV4 -const ip_addr_t dns_mquery_v4group = DNS_MQUERY_IPV4_GROUP_INIT; -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 -const ip_addr_t dns_mquery_v6group = DNS_MQUERY_IPV6_GROUP_INIT; -#endif /* LWIP_IPV6 */ - -/** - * Initialize the resolver: set up the UDP pcb and configure the default server - * (if DNS_SERVER_ADDRESS is set). - */ -void -dns_init(void) -{ -#ifdef DNS_SERVER_ADDRESS - /* initialize default DNS server address */ - ip_addr_t dnsserver; - DNS_SERVER_ADDRESS(&dnsserver); - dns_setserver(0, &dnsserver); -#endif /* DNS_SERVER_ADDRESS */ - - LWIP_ASSERT("sanity check SIZEOF_DNS_QUERY", - sizeof(struct dns_query) == SIZEOF_DNS_QUERY); - LWIP_ASSERT("sanity check SIZEOF_DNS_ANSWER", - sizeof(struct dns_answer) <= SIZEOF_DNS_ANSWER_ASSERT); - - LWIP_DEBUGF(DNS_DEBUG, ("dns_init: initializing\n")); - - /* if dns client not yet initialized... */ -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) == 0) - if (dns_pcbs[0] == NULL) { - dns_pcbs[0] = udp_new_ip_type(IPADDR_TYPE_ANY); - LWIP_ASSERT("dns_pcbs[0] != NULL", dns_pcbs[0] != NULL); - - /* initialize DNS table not needed (initialized to zero since it is a - * global variable) */ - LWIP_ASSERT("For implicit initialization to work, DNS_STATE_UNUSED needs to be 0", - DNS_STATE_UNUSED == 0); - - /* initialize DNS client */ - udp_bind(dns_pcbs[0], IP_ANY_TYPE, 0); - udp_recv(dns_pcbs[0], dns_recv, NULL); - } -#endif - -#if DNS_LOCAL_HOSTLIST - dns_init_local(); -#endif -} - -/** - * @ingroup dns - * Initialize one of the DNS servers. - * - * @param numdns the index of the DNS server to set must be < DNS_MAX_SERVERS - * @param dnsserver IP address of the DNS server to set - */ -void -dns_setserver(u8_t numdns, const ip_addr_t *dnsserver) -{ - if (numdns < DNS_MAX_SERVERS) { - if (dnsserver != NULL) { - dns_servers[numdns] = (*dnsserver); - } else { - dns_servers[numdns] = *IP_ADDR_ANY; - } - } -} - -/** - * @ingroup dns - * Obtain one of the currently configured DNS server. - * - * @param numdns the index of the DNS server - * @return IP address of the indexed DNS server or "ip_addr_any" if the DNS - * server has not been configured. - */ -const ip_addr_t* -dns_getserver(u8_t numdns) -{ - if (numdns < DNS_MAX_SERVERS) { - return &dns_servers[numdns]; - } else { - return IP_ADDR_ANY; - } -} - -/** - * The DNS resolver client timer - handle retries and timeouts and should - * be called every DNS_TMR_INTERVAL milliseconds (every second by default). - */ -void -dns_tmr(void) -{ - LWIP_DEBUGF(DNS_DEBUG, ("dns_tmr: dns_check_entries\n")); - dns_check_entries(); -} - -#if DNS_LOCAL_HOSTLIST -static void -dns_init_local(void) -{ -#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC && defined(DNS_LOCAL_HOSTLIST_INIT) - size_t i; - struct local_hostlist_entry *entry; - /* Dynamic: copy entries from DNS_LOCAL_HOSTLIST_INIT to list */ - struct local_hostlist_entry local_hostlist_init[] = DNS_LOCAL_HOSTLIST_INIT; - size_t namelen; - for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_init); i++) { - struct local_hostlist_entry *init_entry = &local_hostlist_init[i]; - LWIP_ASSERT("invalid host name (NULL)", init_entry->name != NULL); - namelen = strlen(init_entry->name); - LWIP_ASSERT("namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN", namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN); - entry = (struct local_hostlist_entry *)memp_malloc(MEMP_LOCALHOSTLIST); - LWIP_ASSERT("mem-error in dns_init_local", entry != NULL); - if (entry != NULL) { - char* entry_name = (char*)entry + sizeof(struct local_hostlist_entry); - MEMCPY(entry_name, init_entry->name, namelen); - entry_name[namelen] = 0; - entry->name = entry_name; - entry->addr = init_entry->addr; - entry->next = local_hostlist_dynamic; - local_hostlist_dynamic = entry; - } - } -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC && defined(DNS_LOCAL_HOSTLIST_INIT) */ -} - -/** - * @ingroup dns - * Iterate the local host-list for a hostname. - * - * @param iterator_fn a function that is called for every entry in the local host-list - * @param iterator_arg 3rd argument passed to iterator_fn - * @return the number of entries in the local host-list - */ -size_t -dns_local_iterate(dns_found_callback iterator_fn, void *iterator_arg) -{ - size_t i; -#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC - struct local_hostlist_entry *entry = local_hostlist_dynamic; - i = 0; - while (entry != NULL) { - if (iterator_fn != NULL) { - iterator_fn(entry->name, &entry->addr, iterator_arg); - } - i++; - entry = entry->next; - } -#else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_static); i++) { - if (iterator_fn != NULL) { - iterator_fn(local_hostlist_static[i].name, &local_hostlist_static[i].addr, iterator_arg); - } - } -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - return i; -} - -/** - * @ingroup dns - * Scans the local host-list for a hostname. - * - * @param hostname Hostname to look for in the local host-list - * @param addr the first IP address for the hostname in the local host-list or - * IPADDR_NONE if not found. - * @param dns_addrtype - LWIP_DNS_ADDRTYPE_IPV4_IPV6: try to resolve IPv4 (ATTENTION: no fallback here!) - * - LWIP_DNS_ADDRTYPE_IPV6_IPV4: try to resolve IPv6 (ATTENTION: no fallback here!) - * - LWIP_DNS_ADDRTYPE_IPV4: try to resolve IPv4 only - * - LWIP_DNS_ADDRTYPE_IPV6: try to resolve IPv6 only - * @return ERR_OK if found, ERR_ARG if not found - */ -err_t -dns_local_lookup(const char *hostname, ip_addr_t *addr, u8_t dns_addrtype) -{ - LWIP_UNUSED_ARG(dns_addrtype); - return dns_lookup_local(hostname, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)); -} - -/* Internal implementation for dns_local_lookup and dns_lookup */ -static err_t -dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype)) -{ -#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC - struct local_hostlist_entry *entry = local_hostlist_dynamic; - while (entry != NULL) { - if ((lwip_stricmp(entry->name, hostname) == 0) && - LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, entry->addr)) { - if (addr) { - ip_addr_copy(*addr, entry->addr); - } - return ERR_OK; - } - entry = entry->next; - } -#else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - size_t i; - for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_static); i++) { - if ((lwip_stricmp(local_hostlist_static[i].name, hostname) == 0) && - LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, local_hostlist_static[i].addr)) { - if (addr) { - ip_addr_copy(*addr, local_hostlist_static[i].addr); - } - return ERR_OK; - } - } -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - return ERR_ARG; -} - -#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC -/** - * @ingroup dns - * Remove all entries from the local host-list for a specific hostname - * and/or IP address - * - * @param hostname hostname for which entries shall be removed from the local - * host-list - * @param addr address for which entries shall be removed from the local host-list - * @return the number of removed entries - */ -int -dns_local_removehost(const char *hostname, const ip_addr_t *addr) -{ - int removed = 0; - struct local_hostlist_entry *entry = local_hostlist_dynamic; - struct local_hostlist_entry *last_entry = NULL; - while (entry != NULL) { - if (((hostname == NULL) || !lwip_stricmp(entry->name, hostname)) && - ((addr == NULL) || ip_addr_cmp(&entry->addr, addr))) { - struct local_hostlist_entry *free_entry; - if (last_entry != NULL) { - last_entry->next = entry->next; - } else { - local_hostlist_dynamic = entry->next; - } - free_entry = entry; - entry = entry->next; - memp_free(MEMP_LOCALHOSTLIST, free_entry); - removed++; - } else { - last_entry = entry; - entry = entry->next; - } - } - return removed; -} - -/** - * @ingroup dns - * Add a hostname/IP address pair to the local host-list. - * Duplicates are not checked. - * - * @param hostname hostname of the new entry - * @param addr IP address of the new entry - * @return ERR_OK if succeeded or ERR_MEM on memory error - */ -err_t -dns_local_addhost(const char *hostname, const ip_addr_t *addr) -{ - struct local_hostlist_entry *entry; - size_t namelen; - char* entry_name; - LWIP_ASSERT("invalid host name (NULL)", hostname != NULL); - namelen = strlen(hostname); - LWIP_ASSERT("namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN", namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN); - entry = (struct local_hostlist_entry *)memp_malloc(MEMP_LOCALHOSTLIST); - if (entry == NULL) { - return ERR_MEM; - } - entry_name = (char*)entry + sizeof(struct local_hostlist_entry); - MEMCPY(entry_name, hostname, namelen); - entry_name[namelen] = 0; - entry->name = entry_name; - ip_addr_copy(entry->addr, *addr); - entry->next = local_hostlist_dynamic; - local_hostlist_dynamic = entry; - return ERR_OK; -} -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC*/ -#endif /* DNS_LOCAL_HOSTLIST */ - -/** - * @ingroup dns - * Look up a hostname in the array of known hostnames. - * - * @note This function only looks in the internal array of known - * hostnames, it does not send out a query for the hostname if none - * was found. The function dns_enqueue() can be used to send a query - * for a hostname. - * - * @param name the hostname to look up - * @param addr the hostname's IP address, as u32_t (instead of ip_addr_t to - * better check for failure: != IPADDR_NONE) or IPADDR_NONE if the hostname - * was not found in the cached dns_table. - * @return ERR_OK if found, ERR_ARG if not found - */ -static err_t -dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype)) -{ - u8_t i; -#if DNS_LOCAL_HOSTLIST || defined(DNS_LOOKUP_LOCAL_EXTERN) -#endif /* DNS_LOCAL_HOSTLIST || defined(DNS_LOOKUP_LOCAL_EXTERN) */ -#if DNS_LOCAL_HOSTLIST - if (dns_lookup_local(name, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) == ERR_OK) { - return ERR_OK; - } -#endif /* DNS_LOCAL_HOSTLIST */ -#ifdef DNS_LOOKUP_LOCAL_EXTERN - if (DNS_LOOKUP_LOCAL_EXTERN(name, addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype)) == ERR_OK) { - return ERR_OK; - } -#endif /* DNS_LOOKUP_LOCAL_EXTERN */ - - /* Walk through name list, return entry if found. If not, return NULL. */ - for (i = 0; i < DNS_TABLE_SIZE; ++i) { - if ((dns_table[i].state == DNS_STATE_DONE) && - (lwip_strnicmp(name, dns_table[i].name, sizeof(dns_table[i].name)) == 0) && - LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, dns_table[i].ipaddr)) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_lookup: \"%s\": found = ", name)); - ip_addr_debug_print(DNS_DEBUG, &(dns_table[i].ipaddr)); - LWIP_DEBUGF(DNS_DEBUG, ("\n")); - if (addr) { - ip_addr_copy(*addr, dns_table[i].ipaddr); - } - return ERR_OK; - } - } - - return ERR_ARG; -} - -/** - * Compare the "dotted" name "query" with the encoded name "response" - * to make sure an answer from the DNS server matches the current dns_table - * entry (otherwise, answers might arrive late for hostname not on the list - * any more). - * - * @param query hostname (not encoded) from the dns_table - * @param p pbuf containing the encoded hostname in the DNS response - * @param start_offset offset into p where the name starts - * @return 0xFFFF: names differ, other: names equal -> offset behind name - */ -static u16_t -dns_compare_name(const char *query, struct pbuf* p, u16_t start_offset) -{ - int n; - u16_t response_offset = start_offset; - - do { - n = pbuf_try_get_at(p, response_offset++); - if (n < 0) { - return 0xFFFF; - } - /** @see RFC 1035 - 4.1.4. Message compression */ - if ((n & 0xc0) == 0xc0) { - /* Compressed name: cannot be equal since we don't send them */ - return 0xFFFF; - } else { - /* Not compressed name */ - while (n > 0) { - int c = pbuf_try_get_at(p, response_offset); - if (c < 0) { - return 0xFFFF; - } - if ((*query) != (u8_t)c) { - return 0xFFFF; - } - ++response_offset; - ++query; - --n; - } - ++query; - } - n = pbuf_try_get_at(p, response_offset); - if (n < 0) { - return 0xFFFF; - } - } while (n != 0); - - return response_offset + 1; -} - -/** - * Walk through a compact encoded DNS name and return the end of the name. - * - * @param p pbuf containing the name - * @param query_idx start index into p pointing to encoded DNS name in the DNS server response - * @return index to end of the name - */ -static u16_t -dns_skip_name(struct pbuf* p, u16_t query_idx) -{ - int n; - u16_t offset = query_idx; - - do { - n = pbuf_try_get_at(p, offset++); - if (n < 0) { - return 0xFFFF; - } - /** @see RFC 1035 - 4.1.4. Message compression */ - if ((n & 0xc0) == 0xc0) { - /* Compressed name: since we only want to skip it (not check it), stop here */ - break; - } else { - /* Not compressed name */ - if (offset + n >= p->tot_len) { - return 0xFFFF; - } - offset = (u16_t)(offset + n); - } - n = pbuf_try_get_at(p, offset); - if (n < 0) { - return 0xFFFF; - } - } while (n != 0); - - return offset + 1; -} - -/** - * Send a DNS query packet. - * - * @param idx the DNS table entry index for which to send a request - * @return ERR_OK if packet is sent; an err_t indicating the problem otherwise - */ -static err_t -dns_send(u8_t idx) -{ - err_t err; - struct dns_hdr hdr; - struct dns_query qry; - struct pbuf *p; - u16_t query_idx, copy_len; - const char *hostname, *hostname_part; - u8_t n; - u8_t pcb_idx; - struct dns_table_entry* entry = &dns_table[idx]; - - LWIP_DEBUGF(DNS_DEBUG, ("dns_send: dns_servers[%"U16_F"] \"%s\": request\n", - (u16_t)(entry->server_idx), entry->name)); - LWIP_ASSERT("dns server out of array", entry->server_idx < DNS_MAX_SERVERS); - if (ip_addr_isany_val(dns_servers[entry->server_idx]) -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - && !entry->is_mdns -#endif - ) { - /* DNS server not valid anymore, e.g. PPP netif has been shut down */ - /* call specified callback function if provided */ - dns_call_found(idx, NULL); - /* flush this entry */ - entry->state = DNS_STATE_UNUSED; - return ERR_OK; - } - - /* if here, we have either a new query or a retry on a previous query to process */ - p = pbuf_alloc(PBUF_TRANSPORT, (u16_t)(SIZEOF_DNS_HDR + strlen(entry->name) + 2 + - SIZEOF_DNS_QUERY), PBUF_RAM); - if (p != NULL) { - const ip_addr_t* dst; - u16_t dst_port; - /* fill dns header */ - memset(&hdr, 0, SIZEOF_DNS_HDR); - hdr.id = lwip_htons(entry->txid); - hdr.flags1 = DNS_FLAG1_RD; - hdr.numquestions = PP_HTONS(1); - pbuf_take(p, &hdr, SIZEOF_DNS_HDR); - hostname = entry->name; - --hostname; - - /* convert hostname into suitable query format. */ - query_idx = SIZEOF_DNS_HDR; - do { - ++hostname; - hostname_part = hostname; - for (n = 0; *hostname != '.' && *hostname != 0; ++hostname) { - ++n; - } - copy_len = (u16_t)(hostname - hostname_part); - pbuf_put_at(p, query_idx, n); - pbuf_take_at(p, hostname_part, copy_len, query_idx + 1); - query_idx += n + 1; - } while (*hostname != 0); - pbuf_put_at(p, query_idx, 0); - query_idx++; - - /* fill dns query */ - if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) { - qry.type = PP_HTONS(DNS_RRTYPE_AAAA); - } else { - qry.type = PP_HTONS(DNS_RRTYPE_A); - } - qry.cls = PP_HTONS(DNS_RRCLASS_IN); - pbuf_take_at(p, &qry, SIZEOF_DNS_QUERY, query_idx); - -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) - pcb_idx = entry->pcb_idx; -#else - pcb_idx = 0; -#endif - /* send dns packet */ - LWIP_DEBUGF(DNS_DEBUG, ("sending DNS request ID %d for name \"%s\" to server %d\r\n", - entry->txid, entry->name, entry->server_idx)); -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - if (entry->is_mdns) { - dst_port = DNS_MQUERY_PORT; -#if LWIP_IPV6 - if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) - { - dst = &dns_mquery_v6group; - } -#endif -#if LWIP_IPV4 && LWIP_IPV6 - else -#endif -#if LWIP_IPV4 - { - dst = &dns_mquery_v4group; - } -#endif - } else -#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ - { - dst_port = DNS_SERVER_PORT; - dst = &dns_servers[entry->server_idx]; - } - err = udp_sendto(dns_pcbs[pcb_idx], p, dst, dst_port); - - /* free pbuf */ - pbuf_free(p); - } else { - err = ERR_MEM; - } - - return err; -} - -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) -static struct udp_pcb* -dns_alloc_random_port(void) -{ - err_t err; - struct udp_pcb* ret; - - ret = udp_new_ip_type(IPADDR_TYPE_ANY); - if (ret == NULL) { - /* out of memory, have to reuse an existing pcb */ - return NULL; - } - do { - u16_t port = (u16_t)DNS_RAND_TXID(); - if (!DNS_PORT_ALLOWED(port)) { - /* this port is not allowed, try again */ - err = ERR_USE; - continue; - } - err = udp_bind(ret, IP_ANY_TYPE, port); - } while (err == ERR_USE); - if (err != ERR_OK) { - udp_remove(ret); - return NULL; - } - udp_recv(ret, dns_recv, NULL); - return ret; -} - -/** - * dns_alloc_pcb() - allocates a new pcb (or reuses an existing one) to be used - * for sending a request - * - * @return an index into dns_pcbs - */ -static u8_t -dns_alloc_pcb(void) -{ - u8_t i; - u8_t idx; - - for (i = 0; i < DNS_MAX_SOURCE_PORTS; i++) { - if (dns_pcbs[i] == NULL) { - break; - } - } - if (i < DNS_MAX_SOURCE_PORTS) { - dns_pcbs[i] = dns_alloc_random_port(); - if (dns_pcbs[i] != NULL) { - /* succeeded */ - dns_last_pcb_idx = i; - return i; - } - } - /* if we come here, creating a new UDP pcb failed, so we have to use - an already existing one */ - for (i = 0, idx = dns_last_pcb_idx + 1; i < DNS_MAX_SOURCE_PORTS; i++, idx++) { - if (idx >= DNS_MAX_SOURCE_PORTS) { - idx = 0; - } - if (dns_pcbs[idx] != NULL) { - dns_last_pcb_idx = idx; - return idx; - } - } - return DNS_MAX_SOURCE_PORTS; -} -#endif /* ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) */ - -/** - * dns_call_found() - call the found callback and check if there are duplicate - * entries for the given hostname. If there are any, their found callback will - * be called and they will be removed. - * - * @param idx dns table index of the entry that is resolved or removed - * @param addr IP address for the hostname (or NULL on error or memory shortage) - */ -static void -dns_call_found(u8_t idx, ip_addr_t* addr) -{ -#if ((LWIP_DNS_SECURE & (LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT)) != 0) - u8_t i; -#endif - -#if LWIP_IPV4 && LWIP_IPV6 - if (addr != NULL) { - /* check that address type matches the request and adapt the table entry */ - if (IP_IS_V6_VAL(*addr)) { - LWIP_ASSERT("invalid response", LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[idx].reqaddrtype)); - dns_table[idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV6; - } else { - LWIP_ASSERT("invalid response", !LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[idx].reqaddrtype)); - dns_table[idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV4; - } - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) - for (i = 0; i < DNS_MAX_REQUESTS; i++) { - if (dns_requests[i].found && (dns_requests[i].dns_table_idx == idx)) { - (*dns_requests[i].found)(dns_table[idx].name, addr, dns_requests[i].arg); - /* flush this entry */ - dns_requests[i].found = NULL; - } - } -#else - if (dns_requests[idx].found) { - (*dns_requests[idx].found)(dns_table[idx].name, addr, dns_requests[idx].arg); - } - dns_requests[idx].found = NULL; -#endif -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) - /* close the pcb used unless other request are using it */ - for (i = 0; i < DNS_MAX_REQUESTS; i++) { - if (i == idx) { - continue; /* only check other requests */ - } - if (dns_table[i].state == DNS_STATE_ASKING) { - if (dns_table[i].pcb_idx == dns_table[idx].pcb_idx) { - /* another request is still using the same pcb */ - dns_table[idx].pcb_idx = DNS_MAX_SOURCE_PORTS; - break; - } - } - } - if (dns_table[idx].pcb_idx < DNS_MAX_SOURCE_PORTS) { - /* if we come here, the pcb is not used any more and can be removed */ - udp_remove(dns_pcbs[dns_table[idx].pcb_idx]); - dns_pcbs[dns_table[idx].pcb_idx] = NULL; - dns_table[idx].pcb_idx = DNS_MAX_SOURCE_PORTS; - } -#endif -} - -/* Create a query transmission ID that is unique for all outstanding queries */ -static u16_t -dns_create_txid(void) -{ - u16_t txid; - u8_t i; - -again: - txid = (u16_t)DNS_RAND_TXID(); - - /* check whether the ID is unique */ - for (i = 0; i < DNS_TABLE_SIZE; i++) { - if ((dns_table[i].state == DNS_STATE_ASKING) && - (dns_table[i].txid == txid)) { - /* ID already used by another pending query */ - goto again; - } - } - - return txid; -} - -/** - * dns_check_entry() - see if entry has not yet been queried and, if so, sends out a query. - * Check an entry in the dns_table: - * - send out query for new entries - * - retry old pending entries on timeout (also with different servers) - * - remove completed entries from the table if their TTL has expired - * - * @param i index of the dns_table entry to check - */ -static void -dns_check_entry(u8_t i) -{ - err_t err; - struct dns_table_entry *entry = &dns_table[i]; - - LWIP_ASSERT("array index out of bounds", i < DNS_TABLE_SIZE); - - switch (entry->state) { - case DNS_STATE_NEW: - /* initialize new entry */ - entry->txid = dns_create_txid(); - entry->state = DNS_STATE_ASKING; - entry->server_idx = 0; - entry->tmr = 1; - entry->retries = 0; - - /* send DNS packet for this entry */ - err = dns_send(i); - if (err != ERR_OK) { - LWIP_DEBUGF(DNS_DEBUG | LWIP_DBG_LEVEL_WARNING, - ("dns_send returned error: %s\n", lwip_strerr(err))); - } - break; - case DNS_STATE_ASKING: - if (--entry->tmr == 0) { - if (++entry->retries == DNS_MAX_RETRIES) { - if ((entry->server_idx + 1 < DNS_MAX_SERVERS) && !ip_addr_isany_val(dns_servers[entry->server_idx + 1]) -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - && !entry->is_mdns -#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ - ) { - /* change of server */ - entry->server_idx++; - entry->tmr = 1; - entry->retries = 0; - } else { - LWIP_DEBUGF(DNS_DEBUG, ("dns_check_entry: \"%s\": timeout\n", entry->name)); - /* call specified callback function if provided */ - dns_call_found(i, NULL); - /* flush this entry */ - entry->state = DNS_STATE_UNUSED; - break; - } - } else { - /* wait longer for the next retry */ - entry->tmr = entry->retries; - } - - /* send DNS packet for this entry */ - err = dns_send(i); - if (err != ERR_OK) { - LWIP_DEBUGF(DNS_DEBUG | LWIP_DBG_LEVEL_WARNING, - ("dns_send returned error: %s\n", lwip_strerr(err))); - } - } - break; - case DNS_STATE_DONE: - /* if the time to live is nul */ - if ((entry->ttl == 0) || (--entry->ttl == 0)) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_check_entry: \"%s\": flush\n", entry->name)); - /* flush this entry, there cannot be any related pending entries in this state */ - entry->state = DNS_STATE_UNUSED; - } - break; - case DNS_STATE_UNUSED: - /* nothing to do */ - break; - default: - LWIP_ASSERT("unknown dns_table entry state:", 0); - break; - } -} - -/** - * Call dns_check_entry for each entry in dns_table - check all entries. - */ -static void -dns_check_entries(void) -{ - u8_t i; - - for (i = 0; i < DNS_TABLE_SIZE; ++i) { - dns_check_entry(i); - } -} - -/** - * Save TTL and call dns_call_found for correct response. - */ -static void -dns_correct_response(u8_t idx, u32_t ttl) -{ - struct dns_table_entry *entry = &dns_table[idx]; - - entry->state = DNS_STATE_DONE; - - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response = ", entry->name)); - ip_addr_debug_print(DNS_DEBUG, (&(entry->ipaddr))); - LWIP_DEBUGF(DNS_DEBUG, ("\n")); - - /* read the answer resource record's TTL, and maximize it if needed */ - entry->ttl = ttl; - if (entry->ttl > DNS_MAX_TTL) { - entry->ttl = DNS_MAX_TTL; - } - dns_call_found(idx, &entry->ipaddr); - - if (entry->ttl == 0) { - /* RFC 883, page 29: "Zero values are - interpreted to mean that the RR can only be used for the - transaction in progress, and should not be cached." - -> flush this entry now */ - /* entry reused during callback? */ - if (entry->state == DNS_STATE_DONE) { - entry->state = DNS_STATE_UNUSED; - } - } -} -/** - * Receive input function for DNS response packets arriving for the dns UDP pcb. - */ -static void -dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) -{ - u8_t i; - u16_t txid; - u16_t res_idx; - struct dns_hdr hdr; - struct dns_answer ans; - struct dns_query qry; - u16_t nquestions, nanswers; - - LWIP_UNUSED_ARG(arg); - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(port); - - /* is the dns message big enough ? */ - if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY)) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: pbuf too small\n")); - /* free pbuf and return */ - goto memerr; - } - - /* copy dns payload inside static buffer for processing */ - if (pbuf_copy_partial(p, &hdr, SIZEOF_DNS_HDR, 0) == SIZEOF_DNS_HDR) { - /* Match the ID in the DNS header with the name table. */ - txid = lwip_htons(hdr.id); - for (i = 0; i < DNS_TABLE_SIZE; i++) { - const struct dns_table_entry *entry = &dns_table[i]; - if ((entry->state == DNS_STATE_ASKING) && - (entry->txid == txid)) { - - /* We only care about the question(s) and the answers. The authrr - and the extrarr are simply discarded. */ - nquestions = lwip_htons(hdr.numquestions); - nanswers = lwip_htons(hdr.numanswers); - - /* Check for correct response. */ - if ((hdr.flags1 & DNS_FLAG1_RESPONSE) == 0) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": not a response\n", entry->name)); - goto memerr; /* ignore this packet */ - } - if (nquestions != 1) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); - goto memerr; /* ignore this packet */ - } - -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - if (!entry->is_mdns) -#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ - { - /* Check whether response comes from the same network address to which the - question was sent. (RFC 5452) */ - if (!ip_addr_cmp(addr, &dns_servers[entry->server_idx])) { - goto memerr; /* ignore this packet */ - } - } - - /* Check if the name in the "question" part match with the name in the entry and - skip it if equal. */ - res_idx = dns_compare_name(entry->name, p, SIZEOF_DNS_HDR); - if (res_idx == 0xFFFF) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); - goto memerr; /* ignore this packet */ - } - - /* check if "question" part matches the request */ - if (pbuf_copy_partial(p, &qry, SIZEOF_DNS_QUERY, res_idx) != SIZEOF_DNS_QUERY) { - goto memerr; /* ignore this packet */ - } - if ((qry.cls != PP_HTONS(DNS_RRCLASS_IN)) || - (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_AAAA))) || - (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_A)))) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); - goto memerr; /* ignore this packet */ - } - /* skip the rest of the "question" part */ - res_idx += SIZEOF_DNS_QUERY; - - /* Check for error. If so, call callback to inform. */ - if (hdr.flags2 & DNS_FLAG2_ERR_MASK) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": error in flags\n", entry->name)); - } else { - while ((nanswers > 0) && (res_idx < p->tot_len)) { - /* skip answer resource record's host name */ - res_idx = dns_skip_name(p, res_idx); - if (res_idx == 0xFFFF) { - goto memerr; /* ignore this packet */ - } - - /* Check for IP address type and Internet class. Others are discarded. */ - if (pbuf_copy_partial(p, &ans, SIZEOF_DNS_ANSWER, res_idx) != SIZEOF_DNS_ANSWER) { - goto memerr; /* ignore this packet */ - } - res_idx += SIZEOF_DNS_ANSWER; - - if (ans.cls == PP_HTONS(DNS_RRCLASS_IN)) { -#if LWIP_IPV4 - if ((ans.type == PP_HTONS(DNS_RRTYPE_A)) && (ans.len == PP_HTONS(sizeof(ip4_addr_t)))) { -#if LWIP_IPV4 && LWIP_IPV6 - if (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - { - ip4_addr_t ip4addr; - /* read the IP address after answer resource record's header */ - if (pbuf_copy_partial(p, &ip4addr, sizeof(ip4_addr_t), res_idx) != sizeof(ip4_addr_t)) { - goto memerr; /* ignore this packet */ - } - ip_addr_copy_from_ip4(dns_table[i].ipaddr, ip4addr); - pbuf_free(p); - /* handle correct response */ - dns_correct_response(i, lwip_ntohl(ans.ttl)); - return; - } - } -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 - if ((ans.type == PP_HTONS(DNS_RRTYPE_AAAA)) && (ans.len == PP_HTONS(sizeof(ip6_addr_t)))) { -#if LWIP_IPV4 && LWIP_IPV6 - if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - { - ip6_addr_t ip6addr; - /* read the IP address after answer resource record's header */ - if (pbuf_copy_partial(p, &ip6addr, sizeof(ip6_addr_t), res_idx) != sizeof(ip6_addr_t)) { - goto memerr; /* ignore this packet */ - } - ip_addr_copy_from_ip6(dns_table[i].ipaddr, ip6addr); - pbuf_free(p); - /* handle correct response */ - dns_correct_response(i, lwip_ntohl(ans.ttl)); - return; - } - } -#endif /* LWIP_IPV6 */ - } - /* skip this answer */ - if ((int)(res_idx + lwip_htons(ans.len)) > 0xFFFF) { - goto memerr; /* ignore this packet */ - } - res_idx += lwip_htons(ans.len); - --nanswers; - } -#if LWIP_IPV4 && LWIP_IPV6 - if ((entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) || - (entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV6_IPV4)) { - if (entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) { - /* IPv4 failed, try IPv6 */ - dns_table[i].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV6; - } else { - /* IPv6 failed, try IPv4 */ - dns_table[i].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV4; - } - pbuf_free(p); - dns_table[i].state = DNS_STATE_NEW; - dns_check_entry(i); - return; - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": error in response\n", entry->name)); - } - /* call callback to indicate error, clean up memory and return */ - pbuf_free(p); - dns_call_found(i, NULL); - dns_table[i].state = DNS_STATE_UNUSED; - return; - } - } - } - -memerr: - /* deallocate memory and return */ - pbuf_free(p); - return; -} - -/** - * Queues a new hostname to resolve and sends out a DNS query for that hostname - * - * @param name the hostname that is to be queried - * @param hostnamelen length of the hostname - * @param found a callback function to be called on success, failure or timeout - * @param callback_arg argument to pass to the callback function - * @return err_t return code. - */ -static err_t -dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, - void *callback_arg LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype) LWIP_DNS_ISMDNS_ARG(u8_t is_mdns)) -{ - u8_t i; - u8_t lseq, lseqi; - struct dns_table_entry *entry = NULL; - size_t namelen; - struct dns_req_entry* req; - -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) - u8_t r; - /* check for duplicate entries */ - for (i = 0; i < DNS_TABLE_SIZE; i++) { - if ((dns_table[i].state == DNS_STATE_ASKING) && - (lwip_strnicmp(name, dns_table[i].name, sizeof(dns_table[i].name)) == 0)) { -#if LWIP_IPV4 && LWIP_IPV6 - if (dns_table[i].reqaddrtype != dns_addrtype) { - /* requested address types don't match - this can lead to 2 concurrent requests, but mixing the address types - for the same host should not be that common */ - continue; - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - /* this is a duplicate entry, find a free request entry */ - for (r = 0; r < DNS_MAX_REQUESTS; r++) { - if (dns_requests[r].found == 0) { - dns_requests[r].found = found; - dns_requests[r].arg = callback_arg; - dns_requests[r].dns_table_idx = i; - LWIP_DNS_SET_ADDRTYPE(dns_requests[r].reqaddrtype, dns_addrtype); - LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": duplicate request\n", name)); - return ERR_INPROGRESS; - } - } - } - } - /* no duplicate entries found */ -#endif - - /* search an unused entry, or the oldest one */ - lseq = 0; - lseqi = DNS_TABLE_SIZE; - for (i = 0; i < DNS_TABLE_SIZE; ++i) { - entry = &dns_table[i]; - /* is it an unused entry ? */ - if (entry->state == DNS_STATE_UNUSED) { - break; - } - /* check if this is the oldest completed entry */ - if (entry->state == DNS_STATE_DONE) { - u8_t age = dns_seqno - entry->seqno; - if (age > lseq) { - lseq = age; - lseqi = i; - } - } - } - - /* if we don't have found an unused entry, use the oldest completed one */ - if (i == DNS_TABLE_SIZE) { - if ((lseqi >= DNS_TABLE_SIZE) || (dns_table[lseqi].state != DNS_STATE_DONE)) { - /* no entry can be used now, table is full */ - LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": DNS entries table is full\n", name)); - return ERR_MEM; - } else { - /* use the oldest completed one */ - i = lseqi; - entry = &dns_table[i]; - } - } - -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) - /* find a free request entry */ - req = NULL; - for (r = 0; r < DNS_MAX_REQUESTS; r++) { - if (dns_requests[r].found == NULL) { - req = &dns_requests[r]; - break; - } - } - if (req == NULL) { - /* no request entry can be used now, table is full */ - LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": DNS request entries table is full\n", name)); - return ERR_MEM; - } - req->dns_table_idx = i; -#else - /* in this configuration, the entry index is the same as the request index */ - req = &dns_requests[i]; -#endif - - /* use this entry */ - LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": use DNS entry %"U16_F"\n", name, (u16_t)(i))); - - /* fill the entry */ - entry->state = DNS_STATE_NEW; - entry->seqno = dns_seqno; - LWIP_DNS_SET_ADDRTYPE(entry->reqaddrtype, dns_addrtype); - LWIP_DNS_SET_ADDRTYPE(req->reqaddrtype, dns_addrtype); - req->found = found; - req->arg = callback_arg; - namelen = LWIP_MIN(hostnamelen, DNS_MAX_NAME_LENGTH-1); - MEMCPY(entry->name, name, namelen); - entry->name[namelen] = 0; - -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) - entry->pcb_idx = dns_alloc_pcb(); - if (entry->pcb_idx >= DNS_MAX_SOURCE_PORTS) { - /* failed to get a UDP pcb */ - LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": failed to allocate a pcb\n", name)); - entry->state = DNS_STATE_UNUSED; - req->found = NULL; - return ERR_MEM; - } - LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": use DNS pcb %"U16_F"\n", name, (u16_t)(entry->pcb_idx))); -#endif - -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - entry->is_mdns = is_mdns; -#endif - - dns_seqno++; - - /* force to send query without waiting timer */ - dns_check_entry(i); - - /* dns query is enqueued */ - return ERR_INPROGRESS; -} - -/** - * @ingroup dns - * Resolve a hostname (string) into an IP address. - * NON-BLOCKING callback version for use with raw API!!! - * - * Returns immediately with one of err_t return codes: - * - ERR_OK if hostname is a valid IP address string or the host - * name is already in the local names table. - * - ERR_INPROGRESS enqueue a request to be sent to the DNS server - * for resolution if no errors are present. - * - ERR_ARG: dns client not initialized or invalid hostname - * - * @param hostname the hostname that is to be queried - * @param addr pointer to a ip_addr_t where to store the address if it is already - * cached in the dns_table (only valid if ERR_OK is returned!) - * @param found a callback function to be called on success, failure or timeout (only if - * ERR_INPROGRESS is returned!) - * @param callback_arg argument to pass to the callback function - * @return a err_t return code. - */ -err_t -dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found, - void *callback_arg) -{ - return dns_gethostbyname_addrtype(hostname, addr, found, callback_arg, LWIP_DNS_ADDRTYPE_DEFAULT); -} - -/** - * @ingroup dns - * Like dns_gethostbyname, but returned address type can be controlled: - * @param hostname the hostname that is to be queried - * @param addr pointer to a ip_addr_t where to store the address if it is already - * cached in the dns_table (only valid if ERR_OK is returned!) - * @param found a callback function to be called on success, failure or timeout (only if - * ERR_INPROGRESS is returned!) - * @param callback_arg argument to pass to the callback function - * @param dns_addrtype - LWIP_DNS_ADDRTYPE_IPV4_IPV6: try to resolve IPv4 first, try IPv6 if IPv4 fails only - * - LWIP_DNS_ADDRTYPE_IPV6_IPV4: try to resolve IPv6 first, try IPv4 if IPv6 fails only - * - LWIP_DNS_ADDRTYPE_IPV4: try to resolve IPv4 only - * - LWIP_DNS_ADDRTYPE_IPV6: try to resolve IPv6 only - */ -err_t -dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found, - void *callback_arg, u8_t dns_addrtype) -{ - size_t hostnamelen; -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - u8_t is_mdns; -#endif - /* not initialized or no valid server yet, or invalid addr pointer - * or invalid hostname or invalid hostname length */ - if ((addr == NULL) || - (!hostname) || (!hostname[0])) { - return ERR_ARG; - } -#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) == 0) - if (dns_pcbs[0] == NULL) { - return ERR_ARG; - } -#endif - hostnamelen = strlen(hostname); - if (hostnamelen >= DNS_MAX_NAME_LENGTH) { - LWIP_DEBUGF(DNS_DEBUG, ("dns_gethostbyname: name too long to resolve")); - return ERR_ARG; - } - - -#if LWIP_HAVE_LOOPIF - if (strcmp(hostname, "localhost") == 0) { - ip_addr_set_loopback(LWIP_DNS_ADDRTYPE_IS_IPV6(dns_addrtype), addr); - return ERR_OK; - } -#endif /* LWIP_HAVE_LOOPIF */ - - /* host name already in octet notation? set ip addr and return ERR_OK */ - if (ipaddr_aton(hostname, addr)) { -#if LWIP_IPV4 && LWIP_IPV6 - if ((IP_IS_V6(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV4)) || - (IP_IS_V4(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV6))) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - { - return ERR_OK; - } - } - /* already have this address cached? */ - if (dns_lookup(hostname, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) == ERR_OK) { - return ERR_OK; - } -#if LWIP_IPV4 && LWIP_IPV6 - if ((dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) || (dns_addrtype == LWIP_DNS_ADDRTYPE_IPV6_IPV4)) { - /* fallback to 2nd IP type and try again to lookup */ - u8_t fallback; - if (dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) { - fallback = LWIP_DNS_ADDRTYPE_IPV6; - } else { - fallback = LWIP_DNS_ADDRTYPE_IPV4; - } - if (dns_lookup(hostname, addr LWIP_DNS_ADDRTYPE_ARG(fallback)) == ERR_OK) { - return ERR_OK; - } - } -#else /* LWIP_IPV4 && LWIP_IPV6 */ - LWIP_UNUSED_ARG(dns_addrtype); -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - -#if LWIP_DNS_SUPPORT_MDNS_QUERIES - if (strstr(hostname, ".local") == &hostname[hostnamelen] - 6) { - is_mdns = 1; - } else { - is_mdns = 0; - } - - if (!is_mdns) -#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ - { - /* prevent calling found callback if no server is set, return error instead */ - if (ip_addr_isany_val(dns_servers[0])) { - return ERR_VAL; - } - } - - /* queue query with specified callback */ - return dns_enqueue(hostname, hostnamelen, found, callback_arg LWIP_DNS_ADDRTYPE_ARG(dns_addrtype) - LWIP_DNS_ISMDNS_ARG(is_mdns)); -} - -#endif /* LWIP_DNS */ +/** + * @file + * DNS - host name to IP address resolver. + * + * @defgroup dns DNS + * @ingroup callbackstyle_api + * + * Implements a DNS host name to IP address resolver. + * + * The lwIP DNS resolver functions are used to lookup a host name and + * map it to a numerical IP address. It maintains a list of resolved + * hostnames that can be queried with the dns_lookup() function. + * New hostnames can be resolved using the dns_query() function. + * + * The lwIP version of the resolver also adds a non-blocking version of + * gethostbyname() that will work with a raw API application. This function + * checks for an IP address string first and converts it if it is valid. + * gethostbyname() then does a dns_lookup() to see if the name is + * already in the table. If so, the IP is returned. If not, a query is + * issued and the function returns with a ERR_INPROGRESS status. The app + * using the dns client must then go into a waiting state. + * + * Once a hostname has been resolved (or found to be non-existent), + * the resolver code calls a specified callback function (which + * must be implemented by the module that uses the resolver). + * + * Multicast DNS queries are supported for names ending on ".local". + * However, only "One-Shot Multicast DNS Queries" are supported (RFC 6762 + * chapter 5.1), this is not a fully compliant implementation of continuous + * mDNS querying! + * + * All functions must be called from TCPIP thread. + * + * @see @ref netconn_common for thread-safe access. + */ + +/* + * Port to lwIP from uIP + * by Jim Pettinato April 2007 + * + * security fixes and more by Simon Goldschmidt + * + * uIP version Copyright (c) 2002-2003, Adam Dunkels. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/*----------------------------------------------------------------------------- + * RFC 1035 - Domain names - implementation and specification + * RFC 2181 - Clarifications to the DNS Specification + *----------------------------------------------------------------------------*/ + +/** @todo: define good default values (rfc compliance) */ +/** @todo: improve answer parsing, more checkings... */ +/** @todo: check RFC1035 - 7.3. Processing responses */ +/** @todo: one-shot mDNS: dual-stack fallback to another IP version */ + +/*----------------------------------------------------------------------------- + * Includes + *----------------------------------------------------------------------------*/ + +#include "lwip/opt.h" + +#if LWIP_DNS /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/def.h" +#include "lwip/udp.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/dns.h" +#include "lwip/prot/dns.h" + +#include + +/** Random generator function to create random TXIDs and source ports for queries */ +#ifndef DNS_RAND_TXID +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_XID) != 0) +#define DNS_RAND_TXID LWIP_RAND +#else +static u16_t dns_txid; +#define DNS_RAND_TXID() (++dns_txid) +#endif +#endif + +/** Limits the source port to be >= 1024 by default */ +#ifndef DNS_PORT_ALLOWED +#define DNS_PORT_ALLOWED(port) ((port) >= 1024) +#endif + +/** DNS maximum number of retries when asking for a name, before "timeout". */ +#ifndef DNS_MAX_RETRIES +#define DNS_MAX_RETRIES 4 +#endif + +/** DNS resource record max. TTL (one week as default) */ +#ifndef DNS_MAX_TTL +#define DNS_MAX_TTL 604800 +#elif DNS_MAX_TTL > 0x7FFFFFFF +#error DNS_MAX_TTL must be a positive 32-bit value +#endif + +#if DNS_TABLE_SIZE > 255 +#error DNS_TABLE_SIZE must fit into an u8_t +#endif +#if DNS_MAX_SERVERS > 255 +#error DNS_MAX_SERVERS must fit into an u8_t +#endif + +/* The number of parallel requests (i.e. calls to dns_gethostbyname + * that cannot be answered from the DNS table. + * This is set to the table size by default. + */ +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) +#ifndef DNS_MAX_REQUESTS +#define DNS_MAX_REQUESTS DNS_TABLE_SIZE +#else +#if DNS_MAX_REQUESTS > 255 +#error DNS_MAX_REQUESTS must fit into an u8_t +#endif +#endif +#else +/* In this configuration, both arrays have to have the same size and are used + * like one entry (used/free) */ +#define DNS_MAX_REQUESTS DNS_TABLE_SIZE +#endif + +/* The number of UDP source ports used in parallel */ +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) +#ifndef DNS_MAX_SOURCE_PORTS +#define DNS_MAX_SOURCE_PORTS DNS_MAX_REQUESTS +#else +#if DNS_MAX_SOURCE_PORTS > 255 +#error DNS_MAX_SOURCE_PORTS must fit into an u8_t +#endif +#endif +#else +#ifdef DNS_MAX_SOURCE_PORTS +#undef DNS_MAX_SOURCE_PORTS +#endif +#define DNS_MAX_SOURCE_PORTS 1 +#endif + +#if LWIP_IPV4 && LWIP_IPV6 +#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) (((t) == LWIP_DNS_ADDRTYPE_IPV6_IPV4) || ((t) == LWIP_DNS_ADDRTYPE_IPV6)) +#define LWIP_DNS_ADDRTYPE_MATCH_IP(t, ip) (IP_IS_V6_VAL(ip) ? LWIP_DNS_ADDRTYPE_IS_IPV6(t) : (!LWIP_DNS_ADDRTYPE_IS_IPV6(t))) +#define LWIP_DNS_ADDRTYPE_ARG(x) , x +#define LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(x) x +#define LWIP_DNS_SET_ADDRTYPE(x, y) do { x = y; } while(0) +#else +#if LWIP_IPV6 +#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) 1 +#else +#define LWIP_DNS_ADDRTYPE_IS_IPV6(t) 0 +#endif +#define LWIP_DNS_ADDRTYPE_MATCH_IP(t, ip) 1 +#define LWIP_DNS_ADDRTYPE_ARG(x) +#define LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(x) 0 +#define LWIP_DNS_SET_ADDRTYPE(x, y) +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + +#if LWIP_DNS_SUPPORT_MDNS_QUERIES +#define LWIP_DNS_ISMDNS_ARG(x) , x +#else +#define LWIP_DNS_ISMDNS_ARG(x) +#endif + +/** DNS query message structure. + No packing needed: only used locally on the stack. */ +struct dns_query { + /* DNS query record starts with either a domain name or a pointer + to a name already present somewhere in the packet. */ + u16_t type; + u16_t cls; +}; +#define SIZEOF_DNS_QUERY 4 + +/** DNS answer message structure. + No packing needed: only used locally on the stack. */ +struct dns_answer { + /* DNS answer record starts with either a domain name or a pointer + to a name already present somewhere in the packet. */ + u16_t type; + u16_t cls; + u32_t ttl; + u16_t len; +}; +#define SIZEOF_DNS_ANSWER 10 +/* maximum allowed size for the struct due to non-packed */ +#define SIZEOF_DNS_ANSWER_ASSERT 12 + +/* DNS table entry states */ +typedef enum { + DNS_STATE_UNUSED = 0, + DNS_STATE_NEW = 1, + DNS_STATE_ASKING = 2, + DNS_STATE_DONE = 3 +} dns_state_enum_t; + +/** DNS table entry */ +struct dns_table_entry { + u32_t ttl; + ip_addr_t ipaddr; + u16_t txid; + u8_t state; + u8_t server_idx; + u8_t tmr; + u8_t retries; + u8_t seqno; +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) + u8_t pcb_idx; +#endif + char name[DNS_MAX_NAME_LENGTH]; +#if LWIP_IPV4 && LWIP_IPV6 + u8_t reqaddrtype; +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + u8_t is_mdns; +#endif +}; + +/** DNS request table entry: used when dns_gehostbyname cannot answer the + * request from the DNS table */ +struct dns_req_entry { + /* pointer to callback on DNS query done */ + dns_found_callback found; + /* argument passed to the callback function */ + void *arg; +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) + u8_t dns_table_idx; +#endif +#if LWIP_IPV4 && LWIP_IPV6 + u8_t reqaddrtype; +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +}; + +#if DNS_LOCAL_HOSTLIST + +#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC +/** Local host-list. For hostnames in this list, no + * external name resolution is performed */ +static struct local_hostlist_entry *local_hostlist_dynamic; +#else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + +/** Defining this allows the local_hostlist_static to be placed in a different + * linker section (e.g. FLASH) */ +#ifndef DNS_LOCAL_HOSTLIST_STORAGE_PRE +#define DNS_LOCAL_HOSTLIST_STORAGE_PRE static +#endif /* DNS_LOCAL_HOSTLIST_STORAGE_PRE */ +/** Defining this allows the local_hostlist_static to be placed in a different + * linker section (e.g. FLASH) */ +#ifndef DNS_LOCAL_HOSTLIST_STORAGE_POST +#define DNS_LOCAL_HOSTLIST_STORAGE_POST +#endif /* DNS_LOCAL_HOSTLIST_STORAGE_POST */ +DNS_LOCAL_HOSTLIST_STORAGE_PRE struct local_hostlist_entry local_hostlist_static[] + DNS_LOCAL_HOSTLIST_STORAGE_POST = DNS_LOCAL_HOSTLIST_INIT; + +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + +static void dns_init_local(void); +static err_t dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype)); +#endif /* DNS_LOCAL_HOSTLIST */ + + +/* forward declarations */ +static void dns_recv(void *s, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); +static void dns_check_entries(void); +static void dns_call_found(u8_t idx, ip_addr_t* addr); + +/*----------------------------------------------------------------------------- + * Globals + *----------------------------------------------------------------------------*/ + +/* DNS variables */ +static struct udp_pcb *dns_pcbs[DNS_MAX_SOURCE_PORTS]; +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) +static u8_t dns_last_pcb_idx; +#endif +static u8_t dns_seqno; +static struct dns_table_entry dns_table[DNS_TABLE_SIZE]; +static struct dns_req_entry dns_requests[DNS_MAX_REQUESTS]; +static ip_addr_t dns_servers[DNS_MAX_SERVERS]; + +#if LWIP_IPV4 +const ip_addr_t dns_mquery_v4group = DNS_MQUERY_IPV4_GROUP_INIT; +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 +const ip_addr_t dns_mquery_v6group = DNS_MQUERY_IPV6_GROUP_INIT; +#endif /* LWIP_IPV6 */ + +/** + * Initialize the resolver: set up the UDP pcb and configure the default server + * (if DNS_SERVER_ADDRESS is set). + */ +void +dns_init(void) +{ +#ifdef DNS_SERVER_ADDRESS + /* initialize default DNS server address */ + ip_addr_t dnsserver; + DNS_SERVER_ADDRESS(&dnsserver); + dns_setserver(0, &dnsserver); +#endif /* DNS_SERVER_ADDRESS */ + + LWIP_ASSERT("sanity check SIZEOF_DNS_QUERY", + sizeof(struct dns_query) == SIZEOF_DNS_QUERY); + LWIP_ASSERT("sanity check SIZEOF_DNS_ANSWER", + sizeof(struct dns_answer) <= SIZEOF_DNS_ANSWER_ASSERT); + + LWIP_DEBUGF(DNS_DEBUG, ("dns_init: initializing\n")); + + /* if dns client not yet initialized... */ +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) == 0) + if (dns_pcbs[0] == NULL) { + dns_pcbs[0] = udp_new_ip_type(IPADDR_TYPE_ANY); + LWIP_ASSERT("dns_pcbs[0] != NULL", dns_pcbs[0] != NULL); + + /* initialize DNS table not needed (initialized to zero since it is a + * global variable) */ + LWIP_ASSERT("For implicit initialization to work, DNS_STATE_UNUSED needs to be 0", + DNS_STATE_UNUSED == 0); + + /* initialize DNS client */ + udp_bind(dns_pcbs[0], IP_ANY_TYPE, 0); + udp_recv(dns_pcbs[0], dns_recv, NULL); + } +#endif + +#if DNS_LOCAL_HOSTLIST + dns_init_local(); +#endif +} + +/** + * @ingroup dns + * Initialize one of the DNS servers. + * + * @param numdns the index of the DNS server to set must be < DNS_MAX_SERVERS + * @param dnsserver IP address of the DNS server to set + */ +void +dns_setserver(u8_t numdns, const ip_addr_t *dnsserver) +{ + if (numdns < DNS_MAX_SERVERS) { + if (dnsserver != NULL) { + dns_servers[numdns] = (*dnsserver); + } else { + dns_servers[numdns] = *IP_ADDR_ANY; + } + } +} + +/** + * @ingroup dns + * Obtain one of the currently configured DNS server. + * + * @param numdns the index of the DNS server + * @return IP address of the indexed DNS server or "ip_addr_any" if the DNS + * server has not been configured. + */ +const ip_addr_t* +dns_getserver(u8_t numdns) +{ + if (numdns < DNS_MAX_SERVERS) { + return &dns_servers[numdns]; + } else { + return IP_ADDR_ANY; + } +} + +/** + * The DNS resolver client timer - handle retries and timeouts and should + * be called every DNS_TMR_INTERVAL milliseconds (every second by default). + */ +void +dns_tmr(void) +{ + LWIP_DEBUGF(DNS_DEBUG, ("dns_tmr: dns_check_entries\n")); + dns_check_entries(); +} + +#if DNS_LOCAL_HOSTLIST +static void +dns_init_local(void) +{ +#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC && defined(DNS_LOCAL_HOSTLIST_INIT) + size_t i; + struct local_hostlist_entry *entry; + /* Dynamic: copy entries from DNS_LOCAL_HOSTLIST_INIT to list */ + struct local_hostlist_entry local_hostlist_init[] = DNS_LOCAL_HOSTLIST_INIT; + size_t namelen; + for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_init); i++) { + struct local_hostlist_entry *init_entry = &local_hostlist_init[i]; + LWIP_ASSERT("invalid host name (NULL)", init_entry->name != NULL); + namelen = strlen(init_entry->name); + LWIP_ASSERT("namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN", namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN); + entry = (struct local_hostlist_entry *)memp_malloc(MEMP_LOCALHOSTLIST); + LWIP_ASSERT("mem-error in dns_init_local", entry != NULL); + if (entry != NULL) { + char* entry_name = (char*)entry + sizeof(struct local_hostlist_entry); + MEMCPY(entry_name, init_entry->name, namelen); + entry_name[namelen] = 0; + entry->name = entry_name; + entry->addr = init_entry->addr; + entry->next = local_hostlist_dynamic; + local_hostlist_dynamic = entry; + } + } +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC && defined(DNS_LOCAL_HOSTLIST_INIT) */ +} + +/** + * @ingroup dns + * Iterate the local host-list for a hostname. + * + * @param iterator_fn a function that is called for every entry in the local host-list + * @param iterator_arg 3rd argument passed to iterator_fn + * @return the number of entries in the local host-list + */ +size_t +dns_local_iterate(dns_found_callback iterator_fn, void *iterator_arg) +{ + size_t i; +#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC + struct local_hostlist_entry *entry = local_hostlist_dynamic; + i = 0; + while (entry != NULL) { + if (iterator_fn != NULL) { + iterator_fn(entry->name, &entry->addr, iterator_arg); + } + i++; + entry = entry->next; + } +#else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_static); i++) { + if (iterator_fn != NULL) { + iterator_fn(local_hostlist_static[i].name, &local_hostlist_static[i].addr, iterator_arg); + } + } +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + return i; +} + +/** + * @ingroup dns + * Scans the local host-list for a hostname. + * + * @param hostname Hostname to look for in the local host-list + * @param addr the first IP address for the hostname in the local host-list or + * IPADDR_NONE if not found. + * @param dns_addrtype - LWIP_DNS_ADDRTYPE_IPV4_IPV6: try to resolve IPv4 (ATTENTION: no fallback here!) + * - LWIP_DNS_ADDRTYPE_IPV6_IPV4: try to resolve IPv6 (ATTENTION: no fallback here!) + * - LWIP_DNS_ADDRTYPE_IPV4: try to resolve IPv4 only + * - LWIP_DNS_ADDRTYPE_IPV6: try to resolve IPv6 only + * @return ERR_OK if found, ERR_ARG if not found + */ +err_t +dns_local_lookup(const char *hostname, ip_addr_t *addr, u8_t dns_addrtype) +{ + LWIP_UNUSED_ARG(dns_addrtype); + return dns_lookup_local(hostname, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)); +} + +/* Internal implementation for dns_local_lookup and dns_lookup */ +static err_t +dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype)) +{ +#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC + struct local_hostlist_entry *entry = local_hostlist_dynamic; + while (entry != NULL) { + if ((lwip_stricmp(entry->name, hostname) == 0) && + LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, entry->addr)) { + if (addr) { + ip_addr_copy(*addr, entry->addr); + } + return ERR_OK; + } + entry = entry->next; + } +#else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + size_t i; + for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_static); i++) { + if ((lwip_stricmp(local_hostlist_static[i].name, hostname) == 0) && + LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, local_hostlist_static[i].addr)) { + if (addr) { + ip_addr_copy(*addr, local_hostlist_static[i].addr); + } + return ERR_OK; + } + } +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + return ERR_ARG; +} + +#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC +/** + * @ingroup dns + * Remove all entries from the local host-list for a specific hostname + * and/or IP address + * + * @param hostname hostname for which entries shall be removed from the local + * host-list + * @param addr address for which entries shall be removed from the local host-list + * @return the number of removed entries + */ +int +dns_local_removehost(const char *hostname, const ip_addr_t *addr) +{ + int removed = 0; + struct local_hostlist_entry *entry = local_hostlist_dynamic; + struct local_hostlist_entry *last_entry = NULL; + while (entry != NULL) { + if (((hostname == NULL) || !lwip_stricmp(entry->name, hostname)) && + ((addr == NULL) || ip_addr_cmp(&entry->addr, addr))) { + struct local_hostlist_entry *free_entry; + if (last_entry != NULL) { + last_entry->next = entry->next; + } else { + local_hostlist_dynamic = entry->next; + } + free_entry = entry; + entry = entry->next; + memp_free(MEMP_LOCALHOSTLIST, free_entry); + removed++; + } else { + last_entry = entry; + entry = entry->next; + } + } + return removed; +} + +/** + * @ingroup dns + * Add a hostname/IP address pair to the local host-list. + * Duplicates are not checked. + * + * @param hostname hostname of the new entry + * @param addr IP address of the new entry + * @return ERR_OK if succeeded or ERR_MEM on memory error + */ +err_t +dns_local_addhost(const char *hostname, const ip_addr_t *addr) +{ + struct local_hostlist_entry *entry; + size_t namelen; + char* entry_name; + LWIP_ASSERT("invalid host name (NULL)", hostname != NULL); + namelen = strlen(hostname); + LWIP_ASSERT("namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN", namelen <= DNS_LOCAL_HOSTLIST_MAX_NAMELEN); + entry = (struct local_hostlist_entry *)memp_malloc(MEMP_LOCALHOSTLIST); + if (entry == NULL) { + return ERR_MEM; + } + entry_name = (char*)entry + sizeof(struct local_hostlist_entry); + MEMCPY(entry_name, hostname, namelen); + entry_name[namelen] = 0; + entry->name = entry_name; + ip_addr_copy(entry->addr, *addr); + entry->next = local_hostlist_dynamic; + local_hostlist_dynamic = entry; + return ERR_OK; +} +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC*/ +#endif /* DNS_LOCAL_HOSTLIST */ + +/** + * @ingroup dns + * Look up a hostname in the array of known hostnames. + * + * @note This function only looks in the internal array of known + * hostnames, it does not send out a query for the hostname if none + * was found. The function dns_enqueue() can be used to send a query + * for a hostname. + * + * @param name the hostname to look up + * @param addr the hostname's IP address, as u32_t (instead of ip_addr_t to + * better check for failure: != IPADDR_NONE) or IPADDR_NONE if the hostname + * was not found in the cached dns_table. + * @return ERR_OK if found, ERR_ARG if not found + */ +static err_t +dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype)) +{ + u8_t i; +#if DNS_LOCAL_HOSTLIST || defined(DNS_LOOKUP_LOCAL_EXTERN) +#endif /* DNS_LOCAL_HOSTLIST || defined(DNS_LOOKUP_LOCAL_EXTERN) */ +#if DNS_LOCAL_HOSTLIST + if (dns_lookup_local(name, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) == ERR_OK) { + return ERR_OK; + } +#endif /* DNS_LOCAL_HOSTLIST */ +#ifdef DNS_LOOKUP_LOCAL_EXTERN + if (DNS_LOOKUP_LOCAL_EXTERN(name, addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype)) == ERR_OK) { + return ERR_OK; + } +#endif /* DNS_LOOKUP_LOCAL_EXTERN */ + + /* Walk through name list, return entry if found. If not, return NULL. */ + for (i = 0; i < DNS_TABLE_SIZE; ++i) { + if ((dns_table[i].state == DNS_STATE_DONE) && + (lwip_strnicmp(name, dns_table[i].name, sizeof(dns_table[i].name)) == 0) && + LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, dns_table[i].ipaddr)) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_lookup: \"%s\": found = ", name)); + ip_addr_debug_print(DNS_DEBUG, &(dns_table[i].ipaddr)); + LWIP_DEBUGF(DNS_DEBUG, ("\n")); + if (addr) { + ip_addr_copy(*addr, dns_table[i].ipaddr); + } + return ERR_OK; + } + } + + return ERR_ARG; +} + +/** + * Compare the "dotted" name "query" with the encoded name "response" + * to make sure an answer from the DNS server matches the current dns_table + * entry (otherwise, answers might arrive late for hostname not on the list + * any more). + * + * @param query hostname (not encoded) from the dns_table + * @param p pbuf containing the encoded hostname in the DNS response + * @param start_offset offset into p where the name starts + * @return 0xFFFF: names differ, other: names equal -> offset behind name + */ +static u16_t +dns_compare_name(const char *query, struct pbuf* p, u16_t start_offset) +{ + int n; + u16_t response_offset = start_offset; + + do { + n = pbuf_try_get_at(p, response_offset++); + if (n < 0) { + return 0xFFFF; + } + /** @see RFC 1035 - 4.1.4. Message compression */ + if ((n & 0xc0) == 0xc0) { + /* Compressed name: cannot be equal since we don't send them */ + return 0xFFFF; + } else { + /* Not compressed name */ + while (n > 0) { + int c = pbuf_try_get_at(p, response_offset); + if (c < 0) { + return 0xFFFF; + } + if ((*query) != (u8_t)c) { + return 0xFFFF; + } + ++response_offset; + ++query; + --n; + } + ++query; + } + n = pbuf_try_get_at(p, response_offset); + if (n < 0) { + return 0xFFFF; + } + } while (n != 0); + + return response_offset + 1; +} + +/** + * Walk through a compact encoded DNS name and return the end of the name. + * + * @param p pbuf containing the name + * @param query_idx start index into p pointing to encoded DNS name in the DNS server response + * @return index to end of the name + */ +static u16_t +dns_skip_name(struct pbuf* p, u16_t query_idx) +{ + int n; + u16_t offset = query_idx; + + do { + n = pbuf_try_get_at(p, offset++); + if (n < 0) { + return 0xFFFF; + } + /** @see RFC 1035 - 4.1.4. Message compression */ + if ((n & 0xc0) == 0xc0) { + /* Compressed name: since we only want to skip it (not check it), stop here */ + break; + } else { + /* Not compressed name */ + if (offset + n >= p->tot_len) { + return 0xFFFF; + } + offset = (u16_t)(offset + n); + } + n = pbuf_try_get_at(p, offset); + if (n < 0) { + return 0xFFFF; + } + } while (n != 0); + + return offset + 1; +} + +/** + * Send a DNS query packet. + * + * @param idx the DNS table entry index for which to send a request + * @return ERR_OK if packet is sent; an err_t indicating the problem otherwise + */ +static err_t +dns_send(u8_t idx) +{ + err_t err; + struct dns_hdr hdr; + struct dns_query qry; + struct pbuf *p; + u16_t query_idx, copy_len; + const char *hostname, *hostname_part; + u8_t n; + u8_t pcb_idx; + struct dns_table_entry* entry = &dns_table[idx]; + + LWIP_DEBUGF(DNS_DEBUG, ("dns_send: dns_servers[%"U16_F"] \"%s\": request\n", + (u16_t)(entry->server_idx), entry->name)); + LWIP_ASSERT("dns server out of array", entry->server_idx < DNS_MAX_SERVERS); + if (ip_addr_isany_val(dns_servers[entry->server_idx]) +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + && !entry->is_mdns +#endif + ) { + /* DNS server not valid anymore, e.g. PPP netif has been shut down */ + /* call specified callback function if provided */ + dns_call_found(idx, NULL); + /* flush this entry */ + entry->state = DNS_STATE_UNUSED; + return ERR_OK; + } + + /* if here, we have either a new query or a retry on a previous query to process */ + p = pbuf_alloc(PBUF_TRANSPORT, (u16_t)(SIZEOF_DNS_HDR + strlen(entry->name) + 2 + + SIZEOF_DNS_QUERY), PBUF_RAM); + if (p != NULL) { + const ip_addr_t* dst; + u16_t dst_port; + /* fill dns header */ + memset(&hdr, 0, SIZEOF_DNS_HDR); + hdr.id = lwip_htons(entry->txid); + hdr.flags1 = DNS_FLAG1_RD; + hdr.numquestions = PP_HTONS(1); + pbuf_take(p, &hdr, SIZEOF_DNS_HDR); + hostname = entry->name; + --hostname; + + /* convert hostname into suitable query format. */ + query_idx = SIZEOF_DNS_HDR; + do { + ++hostname; + hostname_part = hostname; + for (n = 0; *hostname != '.' && *hostname != 0; ++hostname) { + ++n; + } + copy_len = (u16_t)(hostname - hostname_part); + pbuf_put_at(p, query_idx, n); + pbuf_take_at(p, hostname_part, copy_len, query_idx + 1); + query_idx += n + 1; + } while (*hostname != 0); + pbuf_put_at(p, query_idx, 0); + query_idx++; + + /* fill dns query */ + if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) { + qry.type = PP_HTONS(DNS_RRTYPE_AAAA); + } else { + qry.type = PP_HTONS(DNS_RRTYPE_A); + } + qry.cls = PP_HTONS(DNS_RRCLASS_IN); + pbuf_take_at(p, &qry, SIZEOF_DNS_QUERY, query_idx); + +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) + pcb_idx = entry->pcb_idx; +#else + pcb_idx = 0; +#endif + /* send dns packet */ + LWIP_DEBUGF(DNS_DEBUG, ("sending DNS request ID %d for name \"%s\" to server %d\r\n", + entry->txid, entry->name, entry->server_idx)); +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + if (entry->is_mdns) { + dst_port = DNS_MQUERY_PORT; +#if LWIP_IPV6 + if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) + { + dst = &dns_mquery_v6group; + } +#endif +#if LWIP_IPV4 && LWIP_IPV6 + else +#endif +#if LWIP_IPV4 + { + dst = &dns_mquery_v4group; + } +#endif + } else +#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ + { + dst_port = DNS_SERVER_PORT; + dst = &dns_servers[entry->server_idx]; + } + err = udp_sendto(dns_pcbs[pcb_idx], p, dst, dst_port); + + /* free pbuf */ + pbuf_free(p); + } else { + err = ERR_MEM; + } + + return err; +} + +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) +static struct udp_pcb* +dns_alloc_random_port(void) +{ + err_t err; + struct udp_pcb* ret; + + ret = udp_new_ip_type(IPADDR_TYPE_ANY); + if (ret == NULL) { + /* out of memory, have to reuse an existing pcb */ + return NULL; + } + do { + u16_t port = (u16_t)DNS_RAND_TXID(); + if (!DNS_PORT_ALLOWED(port)) { + /* this port is not allowed, try again */ + err = ERR_USE; + continue; + } + err = udp_bind(ret, IP_ANY_TYPE, port); + } while (err == ERR_USE); + if (err != ERR_OK) { + udp_remove(ret); + return NULL; + } + udp_recv(ret, dns_recv, NULL); + return ret; +} + +/** + * dns_alloc_pcb() - allocates a new pcb (or reuses an existing one) to be used + * for sending a request + * + * @return an index into dns_pcbs + */ +static u8_t +dns_alloc_pcb(void) +{ + u8_t i; + u8_t idx; + + for (i = 0; i < DNS_MAX_SOURCE_PORTS; i++) { + if (dns_pcbs[i] == NULL) { + break; + } + } + if (i < DNS_MAX_SOURCE_PORTS) { + dns_pcbs[i] = dns_alloc_random_port(); + if (dns_pcbs[i] != NULL) { + /* succeeded */ + dns_last_pcb_idx = i; + return i; + } + } + /* if we come here, creating a new UDP pcb failed, so we have to use + an already existing one */ + for (i = 0, idx = dns_last_pcb_idx + 1; i < DNS_MAX_SOURCE_PORTS; i++, idx++) { + if (idx >= DNS_MAX_SOURCE_PORTS) { + idx = 0; + } + if (dns_pcbs[idx] != NULL) { + dns_last_pcb_idx = idx; + return idx; + } + } + return DNS_MAX_SOURCE_PORTS; +} +#endif /* ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) */ + +/** + * dns_call_found() - call the found callback and check if there are duplicate + * entries for the given hostname. If there are any, their found callback will + * be called and they will be removed. + * + * @param idx dns table index of the entry that is resolved or removed + * @param addr IP address for the hostname (or NULL on error or memory shortage) + */ +static void +dns_call_found(u8_t idx, ip_addr_t* addr) +{ +#if ((LWIP_DNS_SECURE & (LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT)) != 0) + u8_t i; +#endif + +#if LWIP_IPV4 && LWIP_IPV6 + if (addr != NULL) { + /* check that address type matches the request and adapt the table entry */ + if (IP_IS_V6_VAL(*addr)) { + LWIP_ASSERT("invalid response", LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[idx].reqaddrtype)); + dns_table[idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV6; + } else { + LWIP_ASSERT("invalid response", !LWIP_DNS_ADDRTYPE_IS_IPV6(dns_table[idx].reqaddrtype)); + dns_table[idx].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV4; + } + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) + for (i = 0; i < DNS_MAX_REQUESTS; i++) { + if (dns_requests[i].found && (dns_requests[i].dns_table_idx == idx)) { + (*dns_requests[i].found)(dns_table[idx].name, addr, dns_requests[i].arg); + /* flush this entry */ + dns_requests[i].found = NULL; + } + } +#else + if (dns_requests[idx].found) { + (*dns_requests[idx].found)(dns_table[idx].name, addr, dns_requests[idx].arg); + } + dns_requests[idx].found = NULL; +#endif +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) + /* close the pcb used unless other request are using it */ + for (i = 0; i < DNS_MAX_REQUESTS; i++) { + if (i == idx) { + continue; /* only check other requests */ + } + if (dns_table[i].state == DNS_STATE_ASKING) { + if (dns_table[i].pcb_idx == dns_table[idx].pcb_idx) { + /* another request is still using the same pcb */ + dns_table[idx].pcb_idx = DNS_MAX_SOURCE_PORTS; + break; + } + } + } + if (dns_table[idx].pcb_idx < DNS_MAX_SOURCE_PORTS) { + /* if we come here, the pcb is not used any more and can be removed */ + udp_remove(dns_pcbs[dns_table[idx].pcb_idx]); + dns_pcbs[dns_table[idx].pcb_idx] = NULL; + dns_table[idx].pcb_idx = DNS_MAX_SOURCE_PORTS; + } +#endif +} + +/* Create a query transmission ID that is unique for all outstanding queries */ +static u16_t +dns_create_txid(void) +{ + u16_t txid; + u8_t i; + +again: + txid = (u16_t)DNS_RAND_TXID(); + + /* check whether the ID is unique */ + for (i = 0; i < DNS_TABLE_SIZE; i++) { + if ((dns_table[i].state == DNS_STATE_ASKING) && + (dns_table[i].txid == txid)) { + /* ID already used by another pending query */ + goto again; + } + } + + return txid; +} + +/** + * dns_check_entry() - see if entry has not yet been queried and, if so, sends out a query. + * Check an entry in the dns_table: + * - send out query for new entries + * - retry old pending entries on timeout (also with different servers) + * - remove completed entries from the table if their TTL has expired + * + * @param i index of the dns_table entry to check + */ +static void +dns_check_entry(u8_t i) +{ + err_t err; + struct dns_table_entry *entry = &dns_table[i]; + + LWIP_ASSERT("array index out of bounds", i < DNS_TABLE_SIZE); + + switch (entry->state) { + case DNS_STATE_NEW: + /* initialize new entry */ + entry->txid = dns_create_txid(); + entry->state = DNS_STATE_ASKING; + entry->server_idx = 0; + entry->tmr = 1; + entry->retries = 0; + + /* send DNS packet for this entry */ + err = dns_send(i); + if (err != ERR_OK) { + LWIP_DEBUGF(DNS_DEBUG | LWIP_DBG_LEVEL_WARNING, + ("dns_send returned error: %s\n", lwip_strerr(err))); + } + break; + case DNS_STATE_ASKING: + if (--entry->tmr == 0) { + if (++entry->retries == DNS_MAX_RETRIES) { + if ((entry->server_idx + 1 < DNS_MAX_SERVERS) && !ip_addr_isany_val(dns_servers[entry->server_idx + 1]) +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + && !entry->is_mdns +#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ + ) { + /* change of server */ + entry->server_idx++; + entry->tmr = 1; + entry->retries = 0; + } else { + LWIP_DEBUGF(DNS_DEBUG, ("dns_check_entry: \"%s\": timeout\n", entry->name)); + /* call specified callback function if provided */ + dns_call_found(i, NULL); + /* flush this entry */ + entry->state = DNS_STATE_UNUSED; + break; + } + } else { + /* wait longer for the next retry */ + entry->tmr = entry->retries; + } + + /* send DNS packet for this entry */ + err = dns_send(i); + if (err != ERR_OK) { + LWIP_DEBUGF(DNS_DEBUG | LWIP_DBG_LEVEL_WARNING, + ("dns_send returned error: %s\n", lwip_strerr(err))); + } + } + break; + case DNS_STATE_DONE: + /* if the time to live is nul */ + if ((entry->ttl == 0) || (--entry->ttl == 0)) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_check_entry: \"%s\": flush\n", entry->name)); + /* flush this entry, there cannot be any related pending entries in this state */ + entry->state = DNS_STATE_UNUSED; + } + break; + case DNS_STATE_UNUSED: + /* nothing to do */ + break; + default: + LWIP_ASSERT("unknown dns_table entry state:", 0); + break; + } +} + +/** + * Call dns_check_entry for each entry in dns_table - check all entries. + */ +static void +dns_check_entries(void) +{ + u8_t i; + + for (i = 0; i < DNS_TABLE_SIZE; ++i) { + dns_check_entry(i); + } +} + +/** + * Save TTL and call dns_call_found for correct response. + */ +static void +dns_correct_response(u8_t idx, u32_t ttl) +{ + struct dns_table_entry *entry = &dns_table[idx]; + + entry->state = DNS_STATE_DONE; + + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response = ", entry->name)); + ip_addr_debug_print(DNS_DEBUG, (&(entry->ipaddr))); + LWIP_DEBUGF(DNS_DEBUG, ("\n")); + + /* read the answer resource record's TTL, and maximize it if needed */ + entry->ttl = ttl; + if (entry->ttl > DNS_MAX_TTL) { + entry->ttl = DNS_MAX_TTL; + } + dns_call_found(idx, &entry->ipaddr); + + if (entry->ttl == 0) { + /* RFC 883, page 29: "Zero values are + interpreted to mean that the RR can only be used for the + transaction in progress, and should not be cached." + -> flush this entry now */ + /* entry reused during callback? */ + if (entry->state == DNS_STATE_DONE) { + entry->state = DNS_STATE_UNUSED; + } + } +} +/** + * Receive input function for DNS response packets arriving for the dns UDP pcb. + */ +static void +dns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) +{ + u8_t i; + u16_t txid; + u16_t res_idx; + struct dns_hdr hdr; + struct dns_answer ans; + struct dns_query qry; + u16_t nquestions, nanswers; + + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(port); + + /* is the dns message big enough ? */ + if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY)) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: pbuf too small\n")); + /* free pbuf and return */ + goto memerr; + } + + /* copy dns payload inside static buffer for processing */ + if (pbuf_copy_partial(p, &hdr, SIZEOF_DNS_HDR, 0) == SIZEOF_DNS_HDR) { + /* Match the ID in the DNS header with the name table. */ + txid = lwip_htons(hdr.id); + for (i = 0; i < DNS_TABLE_SIZE; i++) { + const struct dns_table_entry *entry = &dns_table[i]; + if ((entry->state == DNS_STATE_ASKING) && + (entry->txid == txid)) { + + /* We only care about the question(s) and the answers. The authrr + and the extrarr are simply discarded. */ + nquestions = lwip_htons(hdr.numquestions); + nanswers = lwip_htons(hdr.numanswers); + + /* Check for correct response. */ + if ((hdr.flags1 & DNS_FLAG1_RESPONSE) == 0) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": not a response\n", entry->name)); + goto memerr; /* ignore this packet */ + } + if (nquestions != 1) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); + goto memerr; /* ignore this packet */ + } + +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + if (!entry->is_mdns) +#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ + { + /* Check whether response comes from the same network address to which the + question was sent. (RFC 5452) */ + if (!ip_addr_cmp(addr, &dns_servers[entry->server_idx])) { + goto memerr; /* ignore this packet */ + } + } + + /* Check if the name in the "question" part match with the name in the entry and + skip it if equal. */ + res_idx = dns_compare_name(entry->name, p, SIZEOF_DNS_HDR); + if (res_idx == 0xFFFF) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); + goto memerr; /* ignore this packet */ + } + + /* check if "question" part matches the request */ + if (pbuf_copy_partial(p, &qry, SIZEOF_DNS_QUERY, res_idx) != SIZEOF_DNS_QUERY) { + goto memerr; /* ignore this packet */ + } + if ((qry.cls != PP_HTONS(DNS_RRCLASS_IN)) || + (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_AAAA))) || + (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype) && (qry.type != PP_HTONS(DNS_RRTYPE_A)))) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": response not match to query\n", entry->name)); + goto memerr; /* ignore this packet */ + } + /* skip the rest of the "question" part */ + res_idx += SIZEOF_DNS_QUERY; + + /* Check for error. If so, call callback to inform. */ + if (hdr.flags2 & DNS_FLAG2_ERR_MASK) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": error in flags\n", entry->name)); + } else { + while ((nanswers > 0) && (res_idx < p->tot_len)) { + /* skip answer resource record's host name */ + res_idx = dns_skip_name(p, res_idx); + if (res_idx == 0xFFFF) { + goto memerr; /* ignore this packet */ + } + + /* Check for IP address type and Internet class. Others are discarded. */ + if (pbuf_copy_partial(p, &ans, SIZEOF_DNS_ANSWER, res_idx) != SIZEOF_DNS_ANSWER) { + goto memerr; /* ignore this packet */ + } + res_idx += SIZEOF_DNS_ANSWER; + + if (ans.cls == PP_HTONS(DNS_RRCLASS_IN)) { +#if LWIP_IPV4 + if ((ans.type == PP_HTONS(DNS_RRTYPE_A)) && (ans.len == PP_HTONS(sizeof(ip4_addr_t)))) { +#if LWIP_IPV4 && LWIP_IPV6 + if (!LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + { + ip4_addr_t ip4addr; + /* read the IP address after answer resource record's header */ + if (pbuf_copy_partial(p, &ip4addr, sizeof(ip4_addr_t), res_idx) != sizeof(ip4_addr_t)) { + goto memerr; /* ignore this packet */ + } + ip_addr_copy_from_ip4(dns_table[i].ipaddr, ip4addr); + pbuf_free(p); + /* handle correct response */ + dns_correct_response(i, lwip_ntohl(ans.ttl)); + return; + } + } +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 + if ((ans.type == PP_HTONS(DNS_RRTYPE_AAAA)) && (ans.len == PP_HTONS(sizeof(ip6_addr_t)))) { +#if LWIP_IPV4 && LWIP_IPV6 + if (LWIP_DNS_ADDRTYPE_IS_IPV6(entry->reqaddrtype)) +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + { + ip6_addr_t ip6addr; + /* read the IP address after answer resource record's header */ + if (pbuf_copy_partial(p, &ip6addr, sizeof(ip6_addr_t), res_idx) != sizeof(ip6_addr_t)) { + goto memerr; /* ignore this packet */ + } + ip_addr_copy_from_ip6(dns_table[i].ipaddr, ip6addr); + pbuf_free(p); + /* handle correct response */ + dns_correct_response(i, lwip_ntohl(ans.ttl)); + return; + } + } +#endif /* LWIP_IPV6 */ + } + /* skip this answer */ + if ((int)(res_idx + lwip_htons(ans.len)) > 0xFFFF) { + goto memerr; /* ignore this packet */ + } + res_idx += lwip_htons(ans.len); + --nanswers; + } +#if LWIP_IPV4 && LWIP_IPV6 + if ((entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) || + (entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV6_IPV4)) { + if (entry->reqaddrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) { + /* IPv4 failed, try IPv6 */ + dns_table[i].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV6; + } else { + /* IPv6 failed, try IPv4 */ + dns_table[i].reqaddrtype = LWIP_DNS_ADDRTYPE_IPV4; + } + pbuf_free(p); + dns_table[i].state = DNS_STATE_NEW; + dns_check_entry(i); + return; + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: \"%s\": error in response\n", entry->name)); + } + /* call callback to indicate error, clean up memory and return */ + pbuf_free(p); + dns_call_found(i, NULL); + dns_table[i].state = DNS_STATE_UNUSED; + return; + } + } + } + +memerr: + /* deallocate memory and return */ + pbuf_free(p); + return; +} + +/** + * Queues a new hostname to resolve and sends out a DNS query for that hostname + * + * @param name the hostname that is to be queried + * @param hostnamelen length of the hostname + * @param found a callback function to be called on success, failure or timeout + * @param callback_arg argument to pass to the callback function + * @return err_t return code. + */ +static err_t +dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, + void *callback_arg LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addrtype) LWIP_DNS_ISMDNS_ARG(u8_t is_mdns)) +{ + u8_t i; + u8_t lseq, lseqi; + struct dns_table_entry *entry = NULL; + size_t namelen; + struct dns_req_entry* req; + +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) + u8_t r; + /* check for duplicate entries */ + for (i = 0; i < DNS_TABLE_SIZE; i++) { + if ((dns_table[i].state == DNS_STATE_ASKING) && + (lwip_strnicmp(name, dns_table[i].name, sizeof(dns_table[i].name)) == 0)) { +#if LWIP_IPV4 && LWIP_IPV6 + if (dns_table[i].reqaddrtype != dns_addrtype) { + /* requested address types don't match + this can lead to 2 concurrent requests, but mixing the address types + for the same host should not be that common */ + continue; + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + /* this is a duplicate entry, find a free request entry */ + for (r = 0; r < DNS_MAX_REQUESTS; r++) { + if (dns_requests[r].found == 0) { + dns_requests[r].found = found; + dns_requests[r].arg = callback_arg; + dns_requests[r].dns_table_idx = i; + LWIP_DNS_SET_ADDRTYPE(dns_requests[r].reqaddrtype, dns_addrtype); + LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": duplicate request\n", name)); + return ERR_INPROGRESS; + } + } + } + } + /* no duplicate entries found */ +#endif + + /* search an unused entry, or the oldest one */ + lseq = 0; + lseqi = DNS_TABLE_SIZE; + for (i = 0; i < DNS_TABLE_SIZE; ++i) { + entry = &dns_table[i]; + /* is it an unused entry ? */ + if (entry->state == DNS_STATE_UNUSED) { + break; + } + /* check if this is the oldest completed entry */ + if (entry->state == DNS_STATE_DONE) { + u8_t age = dns_seqno - entry->seqno; + if (age > lseq) { + lseq = age; + lseqi = i; + } + } + } + + /* if we don't have found an unused entry, use the oldest completed one */ + if (i == DNS_TABLE_SIZE) { + if ((lseqi >= DNS_TABLE_SIZE) || (dns_table[lseqi].state != DNS_STATE_DONE)) { + /* no entry can be used now, table is full */ + LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": DNS entries table is full\n", name)); + return ERR_MEM; + } else { + /* use the oldest completed one */ + i = lseqi; + entry = &dns_table[i]; + } + } + +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING) != 0) + /* find a free request entry */ + req = NULL; + for (r = 0; r < DNS_MAX_REQUESTS; r++) { + if (dns_requests[r].found == NULL) { + req = &dns_requests[r]; + break; + } + } + if (req == NULL) { + /* no request entry can be used now, table is full */ + LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": DNS request entries table is full\n", name)); + return ERR_MEM; + } + req->dns_table_idx = i; +#else + /* in this configuration, the entry index is the same as the request index */ + req = &dns_requests[i]; +#endif + + /* use this entry */ + LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": use DNS entry %"U16_F"\n", name, (u16_t)(i))); + + /* fill the entry */ + entry->state = DNS_STATE_NEW; + entry->seqno = dns_seqno; + LWIP_DNS_SET_ADDRTYPE(entry->reqaddrtype, dns_addrtype); + LWIP_DNS_SET_ADDRTYPE(req->reqaddrtype, dns_addrtype); + req->found = found; + req->arg = callback_arg; + namelen = LWIP_MIN(hostnamelen, DNS_MAX_NAME_LENGTH-1); + MEMCPY(entry->name, name, namelen); + entry->name[namelen] = 0; + +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) != 0) + entry->pcb_idx = dns_alloc_pcb(); + if (entry->pcb_idx >= DNS_MAX_SOURCE_PORTS) { + /* failed to get a UDP pcb */ + LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": failed to allocate a pcb\n", name)); + entry->state = DNS_STATE_UNUSED; + req->found = NULL; + return ERR_MEM; + } + LWIP_DEBUGF(DNS_DEBUG, ("dns_enqueue: \"%s\": use DNS pcb %"U16_F"\n", name, (u16_t)(entry->pcb_idx))); +#endif + +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + entry->is_mdns = is_mdns; +#endif + + dns_seqno++; + + /* force to send query without waiting timer */ + dns_check_entry(i); + + /* dns query is enqueued */ + return ERR_INPROGRESS; +} + +/** + * @ingroup dns + * Resolve a hostname (string) into an IP address. + * NON-BLOCKING callback version for use with raw API!!! + * + * Returns immediately with one of err_t return codes: + * - ERR_OK if hostname is a valid IP address string or the host + * name is already in the local names table. + * - ERR_INPROGRESS enqueue a request to be sent to the DNS server + * for resolution if no errors are present. + * - ERR_ARG: dns client not initialized or invalid hostname + * + * @param hostname the hostname that is to be queried + * @param addr pointer to a ip_addr_t where to store the address if it is already + * cached in the dns_table (only valid if ERR_OK is returned!) + * @param found a callback function to be called on success, failure or timeout (only if + * ERR_INPROGRESS is returned!) + * @param callback_arg argument to pass to the callback function + * @return a err_t return code. + */ +err_t +dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found, + void *callback_arg) +{ + return dns_gethostbyname_addrtype(hostname, addr, found, callback_arg, LWIP_DNS_ADDRTYPE_DEFAULT); +} + +/** + * @ingroup dns + * Like dns_gethostbyname, but returned address type can be controlled: + * @param hostname the hostname that is to be queried + * @param addr pointer to a ip_addr_t where to store the address if it is already + * cached in the dns_table (only valid if ERR_OK is returned!) + * @param found a callback function to be called on success, failure or timeout (only if + * ERR_INPROGRESS is returned!) + * @param callback_arg argument to pass to the callback function + * @param dns_addrtype - LWIP_DNS_ADDRTYPE_IPV4_IPV6: try to resolve IPv4 first, try IPv6 if IPv4 fails only + * - LWIP_DNS_ADDRTYPE_IPV6_IPV4: try to resolve IPv6 first, try IPv4 if IPv6 fails only + * - LWIP_DNS_ADDRTYPE_IPV4: try to resolve IPv4 only + * - LWIP_DNS_ADDRTYPE_IPV6: try to resolve IPv6 only + */ +err_t +dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found, + void *callback_arg, u8_t dns_addrtype) +{ + size_t hostnamelen; +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + u8_t is_mdns; +#endif + /* not initialized or no valid server yet, or invalid addr pointer + * or invalid hostname or invalid hostname length */ + if ((addr == NULL) || + (!hostname) || (!hostname[0])) { + return ERR_ARG; + } +#if ((LWIP_DNS_SECURE & LWIP_DNS_SECURE_RAND_SRC_PORT) == 0) + if (dns_pcbs[0] == NULL) { + return ERR_ARG; + } +#endif + hostnamelen = strlen(hostname); + if (hostnamelen >= DNS_MAX_NAME_LENGTH) { + LWIP_DEBUGF(DNS_DEBUG, ("dns_gethostbyname: name too long to resolve")); + return ERR_ARG; + } + + +#if LWIP_HAVE_LOOPIF + if (strcmp(hostname, "localhost") == 0) { + ip_addr_set_loopback(LWIP_DNS_ADDRTYPE_IS_IPV6(dns_addrtype), addr); + return ERR_OK; + } +#endif /* LWIP_HAVE_LOOPIF */ + + /* host name already in octet notation? set ip addr and return ERR_OK */ + if (ipaddr_aton(hostname, addr)) { +#if LWIP_IPV4 && LWIP_IPV6 + if ((IP_IS_V6(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV4)) || + (IP_IS_V4(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV6))) +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + { + return ERR_OK; + } + } + /* already have this address cached? */ + if (dns_lookup(hostname, addr LWIP_DNS_ADDRTYPE_ARG(dns_addrtype)) == ERR_OK) { + return ERR_OK; + } +#if LWIP_IPV4 && LWIP_IPV6 + if ((dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) || (dns_addrtype == LWIP_DNS_ADDRTYPE_IPV6_IPV4)) { + /* fallback to 2nd IP type and try again to lookup */ + u8_t fallback; + if (dns_addrtype == LWIP_DNS_ADDRTYPE_IPV4_IPV6) { + fallback = LWIP_DNS_ADDRTYPE_IPV6; + } else { + fallback = LWIP_DNS_ADDRTYPE_IPV4; + } + if (dns_lookup(hostname, addr LWIP_DNS_ADDRTYPE_ARG(fallback)) == ERR_OK) { + return ERR_OK; + } + } +#else /* LWIP_IPV4 && LWIP_IPV6 */ + LWIP_UNUSED_ARG(dns_addrtype); +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + +#if LWIP_DNS_SUPPORT_MDNS_QUERIES + if (strstr(hostname, ".local") == &hostname[hostnamelen] - 6) { + is_mdns = 1; + } else { + is_mdns = 0; + } + + if (!is_mdns) +#endif /* LWIP_DNS_SUPPORT_MDNS_QUERIES */ + { + /* prevent calling found callback if no server is set, return error instead */ + if (ip_addr_isany_val(dns_servers[0])) { + return ERR_VAL; + } + } + + /* queue query with specified callback */ + return dns_enqueue(hostname, hostnamelen, found, callback_arg LWIP_DNS_ADDRTYPE_ARG(dns_addrtype) + LWIP_DNS_ISMDNS_ARG(is_mdns)); +} + +#endif /* LWIP_DNS */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/inet_chksum.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/inet_chksum.c index 917f3e4..589157b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/inet_chksum.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/inet_chksum.c @@ -1,609 +1,609 @@ -/** - * @file - * Incluse internet checksum functions.\n - * - * These are some reference implementations of the checksum algorithm, with the - * aim of being simple, correct and fully portable. Checksumming is the - * first thing you would want to optimize for your platform. If you create - * your own version, link it in and in your cc.h put: - * - * \#define LWIP_CHKSUM your_checksum_routine - * - * Or you can select from the implementations below by defining - * LWIP_CHKSUM_ALGORITHM to 1, 2 or 3. - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#include "lwip/inet_chksum.h" -#include "lwip/def.h" -#include "lwip/ip_addr.h" - -#include - -#ifndef LWIP_CHKSUM -# define LWIP_CHKSUM lwip_standard_chksum -# ifndef LWIP_CHKSUM_ALGORITHM -# define LWIP_CHKSUM_ALGORITHM 2 -# endif -u16_t lwip_standard_chksum(const void *dataptr, int len); -#endif -/* If none set: */ -#ifndef LWIP_CHKSUM_ALGORITHM -# define LWIP_CHKSUM_ALGORITHM 0 -#endif - -#if (LWIP_CHKSUM_ALGORITHM == 1) /* Version #1 */ -/** - * lwip checksum - * - * @param dataptr points to start of data to be summed at any boundary - * @param len length of data to be summed - * @return host order (!) lwip checksum (non-inverted Internet sum) - * - * @note accumulator size limits summable length to 64k - * @note host endianess is irrelevant (p3 RFC1071) - */ -u16_t -lwip_standard_chksum(const void *dataptr, int len) -{ - u32_t acc; - u16_t src; - const u8_t *octetptr; - - acc = 0; - /* dataptr may be at odd or even addresses */ - octetptr = (const u8_t*)dataptr; - while (len > 1) { - /* declare first octet as most significant - thus assume network order, ignoring host order */ - src = (*octetptr) << 8; - octetptr++; - /* declare second octet as least significant */ - src |= (*octetptr); - octetptr++; - acc += src; - len -= 2; - } - if (len > 0) { - /* accumulate remaining octet */ - src = (*octetptr) << 8; - acc += src; - } - /* add deferred carry bits */ - acc = (acc >> 16) + (acc & 0x0000ffffUL); - if ((acc & 0xffff0000UL) != 0) { - acc = (acc >> 16) + (acc & 0x0000ffffUL); - } - /* This maybe a little confusing: reorder sum using lwip_htons() - instead of lwip_ntohs() since it has a little less call overhead. - The caller must invert bits for Internet sum ! */ - return lwip_htons((u16_t)acc); -} -#endif - -#if (LWIP_CHKSUM_ALGORITHM == 2) /* Alternative version #2 */ -/* - * Curt McDowell - * Broadcom Corp. - * csm@broadcom.com - * - * IP checksum two bytes at a time with support for - * unaligned buffer. - * Works for len up to and including 0x20000. - * by Curt McDowell, Broadcom Corp. 12/08/2005 - * - * @param dataptr points to start of data to be summed at any boundary - * @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) -{ - const u8_t *pb = (const u8_t *)dataptr; - const u16_t *ps; - u16_t t = 0; - u32_t sum = 0; - int odd = ((mem_ptr_t)pb & 1); - - /* Get aligned to u16_t */ - if (odd && len > 0) { - ((u8_t *)&t)[1] = *pb++; - len--; - } - - /* Add the bulk of the data */ - ps = (const u16_t *)(const void *)pb; - while (len > 1) { - sum += *ps++; - len -= 2; - } - - /* Consume left-over byte, if any */ - if (len > 0) { - ((u8_t *)&t)[0] = *(const u8_t *)ps; - } - - /* Add end bytes */ - sum += t; - - /* Fold 32-bit sum to 16 bits - calling this twice is probably faster than if statements... */ - sum = FOLD_U32T(sum); - sum = FOLD_U32T(sum); - - /* Swap if alignment was odd */ - if (odd) { - sum = SWAP_BYTES_IN_WORD(sum); - } - - return (u16_t)sum; -} -#endif - -#if (LWIP_CHKSUM_ALGORITHM == 3) /* Alternative version #3 */ -/** - * An optimized checksum routine. Basically, it uses loop-unrolling on - * the checksum loop, treating the head and tail bytes specially, whereas - * the inner loop acts on 8 bytes at a time. - * - * @arg start of buffer to be checksummed. May be an odd byte address. - * @len number of bytes in the buffer to be checksummed. - * @return host order (!) lwip checksum (non-inverted Internet sum) - * - * by Curt McDowell, Broadcom Corp. December 8th, 2005 - */ -u16_t -lwip_standard_chksum(const void *dataptr, int len) -{ - const u8_t *pb = (const u8_t *)dataptr; - const u16_t *ps; - u16_t t = 0; - const u32_t *pl; - u32_t sum = 0, tmp; - /* starts at odd byte address? */ - int odd = ((mem_ptr_t)pb & 1); - - if (odd && len > 0) { - ((u8_t *)&t)[1] = *pb++; - len--; - } - - ps = (const u16_t *)(const void*)pb; - - if (((mem_ptr_t)ps & 3) && len > 1) { - sum += *ps++; - len -= 2; - } - - pl = (const u32_t *)(const void*)ps; - - while (len > 7) { - tmp = sum + *pl++; /* ping */ - if (tmp < sum) { - tmp++; /* add back carry */ - } - - sum = tmp + *pl++; /* pong */ - if (sum < tmp) { - sum++; /* add back carry */ - } - - len -= 8; - } - - /* make room in upper bits */ - sum = FOLD_U32T(sum); - - ps = (const u16_t *)pl; - - /* 16-bit aligned word remaining? */ - while (len > 1) { - sum += *ps++; - len -= 2; - } - - /* dangling tail byte remaining? */ - if (len > 0) { /* include odd byte */ - ((u8_t *)&t)[0] = *(const u8_t *)ps; - } - - sum += t; /* add end bytes */ - - /* Fold 32-bit sum to 16 bits - calling this twice is probably faster than if statements... */ - sum = FOLD_U32T(sum); - sum = FOLD_U32T(sum); - - if (odd) { - sum = SWAP_BYTES_IN_WORD(sum); - } - - return (u16_t)sum; -} -#endif - -/** Parts of the pseudo checksum which are common to IPv4 and IPv6 */ -static u16_t -inet_cksum_pseudo_base(struct pbuf *p, u8_t proto, u16_t proto_len, u32_t acc) -{ - struct pbuf *q; - u8_t swapped = 0; - - /* iterate through all pbuf in chain */ - for (q = p; q != NULL; q = q->next) { - LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has next %p) \n", - (void *)q, (void *)q->next)); - acc += LWIP_CHKSUM(q->payload, q->len); - /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/ - /* just executing this next line is probably faster that the if statement needed - to check whether we really need to execute it, and does no harm */ - acc = FOLD_U32T(acc); - if (q->len % 2 != 0) { - swapped = 1 - swapped; - acc = SWAP_BYTES_IN_WORD(acc); - } - /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/ - } - - if (swapped) { - acc = SWAP_BYTES_IN_WORD(acc); - } - - acc += (u32_t)lwip_htons((u16_t)proto); - acc += (u32_t)lwip_htons(proto_len); - - /* Fold 32-bit sum to 16 bits - calling this twice is probably faster than if statements... */ - acc = FOLD_U32T(acc); - acc = FOLD_U32T(acc); - LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): pbuf chain lwip_chksum()=%"X32_F"\n", acc)); - return (u16_t)~(acc & 0xffffUL); -} - -#if LWIP_IPV4 -/* inet_chksum_pseudo: - * - * Calculates the IPv4 pseudo Internet checksum used by TCP and UDP for a pbuf chain. - * IP addresses are expected to be in network byte order. - * - * @param p chain of pbufs over that a checksum should be calculated (ip data part) - * @param src source ip address (used for checksum of pseudo header) - * @param dst destination ip address (used for checksum of pseudo header) - * @param proto ip protocol (used for checksum of pseudo header) - * @param proto_len length of the ip data part (used for checksum of pseudo header) - * @return checksum (as u16_t) to be saved directly in the protocol header - */ -u16_t -inet_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip4_addr_t *src, const ip4_addr_t *dest) -{ - u32_t acc; - u32_t addr; - - addr = ip4_addr_get_u32(src); - acc = (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - addr = ip4_addr_get_u32(dest); - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - /* fold down to 16 bits */ - acc = FOLD_U32T(acc); - acc = FOLD_U32T(acc); - - return inet_cksum_pseudo_base(p, proto, proto_len, acc); -} -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -/** - * Calculates the checksum with IPv6 pseudo header used by TCP and UDP for a pbuf chain. - * IPv6 addresses are expected to be in network byte order. - * - * @param p chain of pbufs over that a checksum should be calculated (ip data part) - * @param proto ipv6 protocol/next header (used for checksum of pseudo header) - * @param proto_len length of the ipv6 payload (used for checksum of pseudo header) - * @param src source ipv6 address (used for checksum of pseudo header) - * @param dest destination ipv6 address (used for checksum of pseudo header) - * @return checksum (as u16_t) to be saved directly in the protocol header - */ -u16_t -ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip6_addr_t *src, const ip6_addr_t *dest) -{ - u32_t acc = 0; - u32_t addr; - u8_t addr_part; - - for (addr_part = 0; addr_part < 4; addr_part++) { - addr = src->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - addr = dest->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - } - /* fold down to 16 bits */ - acc = FOLD_U32T(acc); - acc = FOLD_U32T(acc); - - return inet_cksum_pseudo_base(p, proto, proto_len, acc); -} -#endif /* LWIP_IPV6 */ - -/* ip_chksum_pseudo: - * - * Calculates the IPv4 or IPv6 pseudo Internet checksum used by TCP and UDP for a pbuf chain. - * IP addresses are expected to be in network byte order. - * - * @param p chain of pbufs over that a checksum should be calculated (ip data part) - * @param src source ip address (used for checksum of pseudo header) - * @param dst destination ip address (used for checksum of pseudo header) - * @param proto ip protocol (used for checksum of pseudo header) - * @param proto_len length of the ip data part (used for checksum of pseudo header) - * @return checksum (as u16_t) to be saved directly in the protocol header - */ -u16_t -ip_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip_addr_t *src, const ip_addr_t *dest) -{ -#if LWIP_IPV6 - if (IP_IS_V6(dest)) { - return ip6_chksum_pseudo(p, proto, proto_len, ip_2_ip6(src), ip_2_ip6(dest)); - } -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 && LWIP_IPV6 - else -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -#if LWIP_IPV4 - { - return inet_chksum_pseudo(p, proto, proto_len, ip_2_ip4(src), ip_2_ip4(dest)); - } -#endif /* LWIP_IPV4 */ -} - -/** Parts of the pseudo checksum which are common to IPv4 and IPv6 */ -static u16_t -inet_cksum_pseudo_partial_base(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, u32_t acc) -{ - struct pbuf *q; - u8_t swapped = 0; - u16_t chklen; - - /* iterate through all pbuf in chain */ - for (q = p; (q != NULL) && (chksum_len > 0); q = q->next) { - LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has next %p) \n", - (void *)q, (void *)q->next)); - chklen = q->len; - if (chklen > chksum_len) { - chklen = chksum_len; - } - acc += LWIP_CHKSUM(q->payload, chklen); - chksum_len -= chklen; - LWIP_ASSERT("delete me", chksum_len < 0x7fff); - /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/ - /* fold the upper bit down */ - acc = FOLD_U32T(acc); - if (q->len % 2 != 0) { - swapped = 1 - swapped; - acc = SWAP_BYTES_IN_WORD(acc); - } - /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/ - } - - if (swapped) { - acc = SWAP_BYTES_IN_WORD(acc); - } - - acc += (u32_t)lwip_htons((u16_t)proto); - acc += (u32_t)lwip_htons(proto_len); - - /* Fold 32-bit sum to 16 bits - calling this twice is probably faster than if statements... */ - acc = FOLD_U32T(acc); - acc = FOLD_U32T(acc); - LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): pbuf chain lwip_chksum()=%"X32_F"\n", acc)); - return (u16_t)~(acc & 0xffffUL); -} - -#if LWIP_IPV4 -/* inet_chksum_pseudo_partial: - * - * Calculates the IPv4 pseudo Internet checksum used by TCP and UDP for a pbuf chain. - * IP addresses are expected to be in network byte order. - * - * @param p chain of pbufs over that a checksum should be calculated (ip data part) - * @param src source ip address (used for checksum of pseudo header) - * @param dst destination ip address (used for checksum of pseudo header) - * @param proto ip protocol (used for checksum of pseudo header) - * @param proto_len length of the ip data part (used for checksum of pseudo header) - * @return checksum (as u16_t) to be saved directly in the protocol header - */ -u16_t -inet_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip4_addr_t *src, const ip4_addr_t *dest) -{ - u32_t acc; - u32_t addr; - - addr = ip4_addr_get_u32(src); - acc = (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - addr = ip4_addr_get_u32(dest); - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - /* fold down to 16 bits */ - acc = FOLD_U32T(acc); - acc = FOLD_U32T(acc); - - return inet_cksum_pseudo_partial_base(p, proto, proto_len, chksum_len, acc); -} -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -/** - * Calculates the checksum with IPv6 pseudo header used by TCP and UDP for a pbuf chain. - * IPv6 addresses are expected to be in network byte order. Will only compute for a - * portion of the payload. - * - * @param p chain of pbufs over that a checksum should be calculated (ip data part) - * @param proto ipv6 protocol/next header (used for checksum of pseudo header) - * @param proto_len length of the ipv6 payload (used for checksum of pseudo header) - * @param chksum_len number of payload bytes used to compute chksum - * @param src source ipv6 address (used for checksum of pseudo header) - * @param dest destination ipv6 address (used for checksum of pseudo header) - * @return checksum (as u16_t) to be saved directly in the protocol header - */ -u16_t -ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest) -{ - u32_t acc = 0; - u32_t addr; - u8_t addr_part; - - for (addr_part = 0; addr_part < 4; addr_part++) { - addr = src->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - addr = dest->addr[addr_part]; - acc += (addr & 0xffffUL); - acc += ((addr >> 16) & 0xffffUL); - } - /* fold down to 16 bits */ - acc = FOLD_U32T(acc); - acc = FOLD_U32T(acc); - - return inet_cksum_pseudo_partial_base(p, proto, proto_len, chksum_len, acc); -} -#endif /* LWIP_IPV6 */ - -/* ip_chksum_pseudo_partial: - * - * Calculates the IPv4 or IPv6 pseudo Internet checksum used by TCP and UDP for a pbuf chain. - * - * @param p chain of pbufs over that a checksum should be calculated (ip data part) - * @param src source ip address (used for checksum of pseudo header) - * @param dst destination ip address (used for checksum of pseudo header) - * @param proto ip protocol (used for checksum of pseudo header) - * @param proto_len length of the ip data part (used for checksum of pseudo header) - * @return checksum (as u16_t) to be saved directly in the protocol header - */ -u16_t -ip_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest) -{ -#if LWIP_IPV6 - if (IP_IS_V6(dest)) { - return ip6_chksum_pseudo_partial(p, proto, proto_len, chksum_len, ip_2_ip6(src), ip_2_ip6(dest)); - } -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 && LWIP_IPV6 - else -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -#if LWIP_IPV4 - { - return inet_chksum_pseudo_partial(p, proto, proto_len, chksum_len, ip_2_ip4(src), ip_2_ip4(dest)); - } -#endif /* LWIP_IPV4 */ -} - -/* inet_chksum: - * - * Calculates the Internet checksum over a portion of memory. Used primarily for IP - * and ICMP. - * - * @param dataptr start of the buffer to calculate the checksum (no alignment needed) - * @param len length of the buffer to calculate the checksum - * @return checksum (as u16_t) to be saved directly in the protocol header - */ - -u16_t -inet_chksum(const void *dataptr, u16_t len) -{ - return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len); -} - -/** - * Calculate a checksum over a chain of pbufs (without pseudo-header, much like - * inet_chksum only pbufs are used). - * - * @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) -{ - u32_t acc; - struct pbuf *q; - u8_t swapped; - - acc = 0; - swapped = 0; - for (q = p; q != NULL; q = q->next) { - acc += LWIP_CHKSUM(q->payload, q->len); - acc = FOLD_U32T(acc); - if (q->len % 2 != 0) { - swapped = 1 - swapped; - acc = SWAP_BYTES_IN_WORD(acc); - } - } - - if (swapped) { - acc = SWAP_BYTES_IN_WORD(acc); - } - return (u16_t)~(acc & 0xffffUL); -} - -/* These are some implementations for LWIP_CHKSUM_COPY, which copies data - * like MEMCPY but generates a checksum at the same time. Since this is a - * performance-sensitive function, you might want to create your own version - * in assembly targeted at your hardware by defining it in lwipopts.h: - * #define LWIP_CHKSUM_COPY(dst, src, len) your_chksum_copy(dst, src, len) - */ - -#if (LWIP_CHKSUM_COPY_ALGORITHM == 1) /* Version #1 */ -/** Safe but slow: first call MEMCPY, then call LWIP_CHKSUM. - * For architectures with big caches, data might still be in cache when - * generating the checksum after copying. - */ -u16_t -lwip_chksum_copy(void *dst, const void *src, u16_t len) -{ - MEMCPY(dst, src, len); - return LWIP_CHKSUM(dst, len); -} -#endif /* (LWIP_CHKSUM_COPY_ALGORITHM == 1) */ +/** + * @file + * Incluse internet checksum functions.\n + * + * These are some reference implementations of the checksum algorithm, with the + * aim of being simple, correct and fully portable. Checksumming is the + * first thing you would want to optimize for your platform. If you create + * your own version, link it in and in your cc.h put: + * + * \#define LWIP_CHKSUM your_checksum_routine + * + * Or you can select from the implementations below by defining + * LWIP_CHKSUM_ALGORITHM to 1, 2 or 3. + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#include "lwip/inet_chksum.h" +#include "lwip/def.h" +#include "lwip/ip_addr.h" + +#include + +#ifndef LWIP_CHKSUM +# define LWIP_CHKSUM lwip_standard_chksum +# ifndef LWIP_CHKSUM_ALGORITHM +# define LWIP_CHKSUM_ALGORITHM 2 +# endif +u16_t lwip_standard_chksum(const void *dataptr, int len); +#endif +/* If none set: */ +#ifndef LWIP_CHKSUM_ALGORITHM +# define LWIP_CHKSUM_ALGORITHM 0 +#endif + +#if (LWIP_CHKSUM_ALGORITHM == 1) /* Version #1 */ +/** + * lwip checksum + * + * @param dataptr points to start of data to be summed at any boundary + * @param len length of data to be summed + * @return host order (!) lwip checksum (non-inverted Internet sum) + * + * @note accumulator size limits summable length to 64k + * @note host endianess is irrelevant (p3 RFC1071) + */ +u16_t +lwip_standard_chksum(const void *dataptr, int len) +{ + u32_t acc; + u16_t src; + const u8_t *octetptr; + + acc = 0; + /* dataptr may be at odd or even addresses */ + octetptr = (const u8_t*)dataptr; + while (len > 1) { + /* declare first octet as most significant + thus assume network order, ignoring host order */ + src = (*octetptr) << 8; + octetptr++; + /* declare second octet as least significant */ + src |= (*octetptr); + octetptr++; + acc += src; + len -= 2; + } + if (len > 0) { + /* accumulate remaining octet */ + src = (*octetptr) << 8; + acc += src; + } + /* add deferred carry bits */ + acc = (acc >> 16) + (acc & 0x0000ffffUL); + if ((acc & 0xffff0000UL) != 0) { + acc = (acc >> 16) + (acc & 0x0000ffffUL); + } + /* This maybe a little confusing: reorder sum using lwip_htons() + instead of lwip_ntohs() since it has a little less call overhead. + The caller must invert bits for Internet sum ! */ + return lwip_htons((u16_t)acc); +} +#endif + +#if (LWIP_CHKSUM_ALGORITHM == 2) /* Alternative version #2 */ +/* + * Curt McDowell + * Broadcom Corp. + * csm@broadcom.com + * + * IP checksum two bytes at a time with support for + * unaligned buffer. + * Works for len up to and including 0x20000. + * by Curt McDowell, Broadcom Corp. 12/08/2005 + * + * @param dataptr points to start of data to be summed at any boundary + * @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) +{ + const u8_t *pb = (const u8_t *)dataptr; + const u16_t *ps; + u16_t t = 0; + u32_t sum = 0; + int odd = ((mem_ptr_t)pb & 1); + + /* Get aligned to u16_t */ + if (odd && len > 0) { + ((u8_t *)&t)[1] = *pb++; + len--; + } + + /* Add the bulk of the data */ + ps = (const u16_t *)(const void *)pb; + while (len > 1) { + sum += *ps++; + len -= 2; + } + + /* Consume left-over byte, if any */ + if (len > 0) { + ((u8_t *)&t)[0] = *(const u8_t *)ps; + } + + /* Add end bytes */ + sum += t; + + /* Fold 32-bit sum to 16 bits + calling this twice is probably faster than if statements... */ + sum = FOLD_U32T(sum); + sum = FOLD_U32T(sum); + + /* Swap if alignment was odd */ + if (odd) { + sum = SWAP_BYTES_IN_WORD(sum); + } + + return (u16_t)sum; +} +#endif + +#if (LWIP_CHKSUM_ALGORITHM == 3) /* Alternative version #3 */ +/** + * An optimized checksum routine. Basically, it uses loop-unrolling on + * the checksum loop, treating the head and tail bytes specially, whereas + * the inner loop acts on 8 bytes at a time. + * + * @arg start of buffer to be checksummed. May be an odd byte address. + * @len number of bytes in the buffer to be checksummed. + * @return host order (!) lwip checksum (non-inverted Internet sum) + * + * by Curt McDowell, Broadcom Corp. December 8th, 2005 + */ +u16_t +lwip_standard_chksum(const void *dataptr, int len) +{ + const u8_t *pb = (const u8_t *)dataptr; + const u16_t *ps; + u16_t t = 0; + const u32_t *pl; + u32_t sum = 0, tmp; + /* starts at odd byte address? */ + int odd = ((mem_ptr_t)pb & 1); + + if (odd && len > 0) { + ((u8_t *)&t)[1] = *pb++; + len--; + } + + ps = (const u16_t *)(const void*)pb; + + if (((mem_ptr_t)ps & 3) && len > 1) { + sum += *ps++; + len -= 2; + } + + pl = (const u32_t *)(const void*)ps; + + while (len > 7) { + tmp = sum + *pl++; /* ping */ + if (tmp < sum) { + tmp++; /* add back carry */ + } + + sum = tmp + *pl++; /* pong */ + if (sum < tmp) { + sum++; /* add back carry */ + } + + len -= 8; + } + + /* make room in upper bits */ + sum = FOLD_U32T(sum); + + ps = (const u16_t *)pl; + + /* 16-bit aligned word remaining? */ + while (len > 1) { + sum += *ps++; + len -= 2; + } + + /* dangling tail byte remaining? */ + if (len > 0) { /* include odd byte */ + ((u8_t *)&t)[0] = *(const u8_t *)ps; + } + + sum += t; /* add end bytes */ + + /* Fold 32-bit sum to 16 bits + calling this twice is probably faster than if statements... */ + sum = FOLD_U32T(sum); + sum = FOLD_U32T(sum); + + if (odd) { + sum = SWAP_BYTES_IN_WORD(sum); + } + + return (u16_t)sum; +} +#endif + +/** Parts of the pseudo checksum which are common to IPv4 and IPv6 */ +static u16_t +inet_cksum_pseudo_base(struct pbuf *p, u8_t proto, u16_t proto_len, u32_t acc) +{ + struct pbuf *q; + u8_t swapped = 0; + + /* iterate through all pbuf in chain */ + for (q = p; q != NULL; q = q->next) { + LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has next %p) \n", + (void *)q, (void *)q->next)); + acc += LWIP_CHKSUM(q->payload, q->len); + /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/ + /* just executing this next line is probably faster that the if statement needed + to check whether we really need to execute it, and does no harm */ + acc = FOLD_U32T(acc); + if (q->len % 2 != 0) { + swapped = 1 - swapped; + acc = SWAP_BYTES_IN_WORD(acc); + } + /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/ + } + + if (swapped) { + acc = SWAP_BYTES_IN_WORD(acc); + } + + acc += (u32_t)lwip_htons((u16_t)proto); + acc += (u32_t)lwip_htons(proto_len); + + /* Fold 32-bit sum to 16 bits + calling this twice is probably faster than if statements... */ + acc = FOLD_U32T(acc); + acc = FOLD_U32T(acc); + LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): pbuf chain lwip_chksum()=%"X32_F"\n", acc)); + return (u16_t)~(acc & 0xffffUL); +} + +#if LWIP_IPV4 +/* inet_chksum_pseudo: + * + * Calculates the IPv4 pseudo Internet checksum used by TCP and UDP for a pbuf chain. + * IP addresses are expected to be in network byte order. + * + * @param p chain of pbufs over that a checksum should be calculated (ip data part) + * @param src source ip address (used for checksum of pseudo header) + * @param dst destination ip address (used for checksum of pseudo header) + * @param proto ip protocol (used for checksum of pseudo header) + * @param proto_len length of the ip data part (used for checksum of pseudo header) + * @return checksum (as u16_t) to be saved directly in the protocol header + */ +u16_t +inet_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, + const ip4_addr_t *src, const ip4_addr_t *dest) +{ + u32_t acc; + u32_t addr; + + addr = ip4_addr_get_u32(src); + acc = (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + addr = ip4_addr_get_u32(dest); + acc += (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + /* fold down to 16 bits */ + acc = FOLD_U32T(acc); + acc = FOLD_U32T(acc); + + return inet_cksum_pseudo_base(p, proto, proto_len, acc); +} +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +/** + * Calculates the checksum with IPv6 pseudo header used by TCP and UDP for a pbuf chain. + * IPv6 addresses are expected to be in network byte order. + * + * @param p chain of pbufs over that a checksum should be calculated (ip data part) + * @param proto ipv6 protocol/next header (used for checksum of pseudo header) + * @param proto_len length of the ipv6 payload (used for checksum of pseudo header) + * @param src source ipv6 address (used for checksum of pseudo header) + * @param dest destination ipv6 address (used for checksum of pseudo header) + * @return checksum (as u16_t) to be saved directly in the protocol header + */ +u16_t +ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, + const ip6_addr_t *src, const ip6_addr_t *dest) +{ + u32_t acc = 0; + u32_t addr; + u8_t addr_part; + + for (addr_part = 0; addr_part < 4; addr_part++) { + addr = src->addr[addr_part]; + acc += (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + addr = dest->addr[addr_part]; + acc += (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + } + /* fold down to 16 bits */ + acc = FOLD_U32T(acc); + acc = FOLD_U32T(acc); + + return inet_cksum_pseudo_base(p, proto, proto_len, acc); +} +#endif /* LWIP_IPV6 */ + +/* ip_chksum_pseudo: + * + * Calculates the IPv4 or IPv6 pseudo Internet checksum used by TCP and UDP for a pbuf chain. + * IP addresses are expected to be in network byte order. + * + * @param p chain of pbufs over that a checksum should be calculated (ip data part) + * @param src source ip address (used for checksum of pseudo header) + * @param dst destination ip address (used for checksum of pseudo header) + * @param proto ip protocol (used for checksum of pseudo header) + * @param proto_len length of the ip data part (used for checksum of pseudo header) + * @return checksum (as u16_t) to be saved directly in the protocol header + */ +u16_t +ip_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, + const ip_addr_t *src, const ip_addr_t *dest) +{ +#if LWIP_IPV6 + if (IP_IS_V6(dest)) { + return ip6_chksum_pseudo(p, proto, proto_len, ip_2_ip6(src), ip_2_ip6(dest)); + } +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 && LWIP_IPV6 + else +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#if LWIP_IPV4 + { + return inet_chksum_pseudo(p, proto, proto_len, ip_2_ip4(src), ip_2_ip4(dest)); + } +#endif /* LWIP_IPV4 */ +} + +/** Parts of the pseudo checksum which are common to IPv4 and IPv6 */ +static u16_t +inet_cksum_pseudo_partial_base(struct pbuf *p, u8_t proto, u16_t proto_len, + u16_t chksum_len, u32_t acc) +{ + struct pbuf *q; + u8_t swapped = 0; + u16_t chklen; + + /* iterate through all pbuf in chain */ + for (q = p; (q != NULL) && (chksum_len > 0); q = q->next) { + LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has next %p) \n", + (void *)q, (void *)q->next)); + chklen = q->len; + if (chklen > chksum_len) { + chklen = chksum_len; + } + acc += LWIP_CHKSUM(q->payload, chklen); + chksum_len -= chklen; + LWIP_ASSERT("delete me", chksum_len < 0x7fff); + /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%"X32_F" \n", acc));*/ + /* fold the upper bit down */ + acc = FOLD_U32T(acc); + if (q->len % 2 != 0) { + swapped = 1 - swapped; + acc = SWAP_BYTES_IN_WORD(acc); + } + /*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%"X32_F" \n", acc));*/ + } + + if (swapped) { + acc = SWAP_BYTES_IN_WORD(acc); + } + + acc += (u32_t)lwip_htons((u16_t)proto); + acc += (u32_t)lwip_htons(proto_len); + + /* Fold 32-bit sum to 16 bits + calling this twice is probably faster than if statements... */ + acc = FOLD_U32T(acc); + acc = FOLD_U32T(acc); + LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): pbuf chain lwip_chksum()=%"X32_F"\n", acc)); + return (u16_t)~(acc & 0xffffUL); +} + +#if LWIP_IPV4 +/* inet_chksum_pseudo_partial: + * + * Calculates the IPv4 pseudo Internet checksum used by TCP and UDP for a pbuf chain. + * IP addresses are expected to be in network byte order. + * + * @param p chain of pbufs over that a checksum should be calculated (ip data part) + * @param src source ip address (used for checksum of pseudo header) + * @param dst destination ip address (used for checksum of pseudo header) + * @param proto ip protocol (used for checksum of pseudo header) + * @param proto_len length of the ip data part (used for checksum of pseudo header) + * @return checksum (as u16_t) to be saved directly in the protocol header + */ +u16_t +inet_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, + u16_t chksum_len, const ip4_addr_t *src, const ip4_addr_t *dest) +{ + u32_t acc; + u32_t addr; + + addr = ip4_addr_get_u32(src); + acc = (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + addr = ip4_addr_get_u32(dest); + acc += (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + /* fold down to 16 bits */ + acc = FOLD_U32T(acc); + acc = FOLD_U32T(acc); + + return inet_cksum_pseudo_partial_base(p, proto, proto_len, chksum_len, acc); +} +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +/** + * Calculates the checksum with IPv6 pseudo header used by TCP and UDP for a pbuf chain. + * IPv6 addresses are expected to be in network byte order. Will only compute for a + * portion of the payload. + * + * @param p chain of pbufs over that a checksum should be calculated (ip data part) + * @param proto ipv6 protocol/next header (used for checksum of pseudo header) + * @param proto_len length of the ipv6 payload (used for checksum of pseudo header) + * @param chksum_len number of payload bytes used to compute chksum + * @param src source ipv6 address (used for checksum of pseudo header) + * @param dest destination ipv6 address (used for checksum of pseudo header) + * @return checksum (as u16_t) to be saved directly in the protocol header + */ +u16_t +ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, + u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest) +{ + u32_t acc = 0; + u32_t addr; + u8_t addr_part; + + for (addr_part = 0; addr_part < 4; addr_part++) { + addr = src->addr[addr_part]; + acc += (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + addr = dest->addr[addr_part]; + acc += (addr & 0xffffUL); + acc += ((addr >> 16) & 0xffffUL); + } + /* fold down to 16 bits */ + acc = FOLD_U32T(acc); + acc = FOLD_U32T(acc); + + return inet_cksum_pseudo_partial_base(p, proto, proto_len, chksum_len, acc); +} +#endif /* LWIP_IPV6 */ + +/* ip_chksum_pseudo_partial: + * + * Calculates the IPv4 or IPv6 pseudo Internet checksum used by TCP and UDP for a pbuf chain. + * + * @param p chain of pbufs over that a checksum should be calculated (ip data part) + * @param src source ip address (used for checksum of pseudo header) + * @param dst destination ip address (used for checksum of pseudo header) + * @param proto ip protocol (used for checksum of pseudo header) + * @param proto_len length of the ip data part (used for checksum of pseudo header) + * @return checksum (as u16_t) to be saved directly in the protocol header + */ +u16_t +ip_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, + u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest) +{ +#if LWIP_IPV6 + if (IP_IS_V6(dest)) { + return ip6_chksum_pseudo_partial(p, proto, proto_len, chksum_len, ip_2_ip6(src), ip_2_ip6(dest)); + } +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 && LWIP_IPV6 + else +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#if LWIP_IPV4 + { + return inet_chksum_pseudo_partial(p, proto, proto_len, chksum_len, ip_2_ip4(src), ip_2_ip4(dest)); + } +#endif /* LWIP_IPV4 */ +} + +/* inet_chksum: + * + * Calculates the Internet checksum over a portion of memory. Used primarily for IP + * and ICMP. + * + * @param dataptr start of the buffer to calculate the checksum (no alignment needed) + * @param len length of the buffer to calculate the checksum + * @return checksum (as u16_t) to be saved directly in the protocol header + */ + +u16_t +inet_chksum(const void *dataptr, u16_t len) +{ + return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len); +} + +/** + * Calculate a checksum over a chain of pbufs (without pseudo-header, much like + * inet_chksum only pbufs are used). + * + * @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) +{ + u32_t acc; + struct pbuf *q; + u8_t swapped; + + acc = 0; + swapped = 0; + for (q = p; q != NULL; q = q->next) { + acc += LWIP_CHKSUM(q->payload, q->len); + acc = FOLD_U32T(acc); + if (q->len % 2 != 0) { + swapped = 1 - swapped; + acc = SWAP_BYTES_IN_WORD(acc); + } + } + + if (swapped) { + acc = SWAP_BYTES_IN_WORD(acc); + } + return (u16_t)~(acc & 0xffffUL); +} + +/* These are some implementations for LWIP_CHKSUM_COPY, which copies data + * like MEMCPY but generates a checksum at the same time. Since this is a + * performance-sensitive function, you might want to create your own version + * in assembly targeted at your hardware by defining it in lwipopts.h: + * #define LWIP_CHKSUM_COPY(dst, src, len) your_chksum_copy(dst, src, len) + */ + +#if (LWIP_CHKSUM_COPY_ALGORITHM == 1) /* Version #1 */ +/** Safe but slow: first call MEMCPY, then call LWIP_CHKSUM. + * For architectures with big caches, data might still be in cache when + * generating the checksum after copying. + */ +u16_t +lwip_chksum_copy(void *dst, const void *src, u16_t len) +{ + MEMCPY(dst, src, len); + return LWIP_CHKSUM(dst, len); +} +#endif /* (LWIP_CHKSUM_COPY_ALGORITHM == 1) */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/init.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/init.c index ea3b5eb..5e50858 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/init.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/init.c @@ -1,385 +1,385 @@ -/** - * @file - * Modules initialization - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - */ - -#include "lwip/opt.h" - -#include "lwip/init.h" -#include "lwip/stats.h" -#include "lwip/sys.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/pbuf.h" -#include "lwip/netif.h" -#include "lwip/sockets.h" -#include "lwip/ip.h" -#include "lwip/raw.h" -#include "lwip/udp.h" -#include "lwip/priv/tcp_priv.h" -#include "lwip/igmp.h" -#include "lwip/dns.h" -#include "lwip/timeouts.h" -#include "lwip/etharp.h" -#include "lwip/ip6.h" -#include "lwip/nd6.h" -#include "lwip/mld6.h" -#include "lwip/api.h" - -#include "netif/ppp/ppp_opts.h" -#include "netif/ppp/ppp_impl.h" - -#ifndef LWIP_SKIP_PACKING_CHECK - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct packed_struct_test -{ - PACK_STRUCT_FLD_8(u8_t dummy1); - PACK_STRUCT_FIELD(u32_t dummy2); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif -#define PACKED_STRUCT_TEST_EXPECTED_SIZE 5 - -#endif - -/* Compile-time sanity checks for configuration errors. - * These can be done independently of LWIP_DEBUG, without penalty. - */ -#ifndef BYTE_ORDER - #error "BYTE_ORDER is not defined, you have to define it in your cc.h" -#endif -#if (!IP_SOF_BROADCAST && IP_SOF_BROADCAST_RECV) - #error "If you want to use broadcast filter per pcb on recv operations, you have to define IP_SOF_BROADCAST=1 in your lwipopts.h" -#endif -#if (!LWIP_UDP && LWIP_UDPLITE) - #error "If you want to use UDP Lite, you have to define LWIP_UDP=1 in your lwipopts.h" -#endif -#if (!LWIP_UDP && LWIP_DHCP) - #error "If you want to use DHCP, you have to define LWIP_UDP=1 in your lwipopts.h" -#endif -#if (!LWIP_UDP && LWIP_MULTICAST_TX_OPTIONS) - #error "If you want to use IGMP/LWIP_MULTICAST_TX_OPTIONS, you have to define LWIP_UDP=1 in your lwipopts.h" -#endif -#if (!LWIP_UDP && LWIP_DNS) - #error "If you want to use DNS, you have to define LWIP_UDP=1 in your lwipopts.h" -#endif -#if !MEMP_MEM_MALLOC /* MEMP_NUM_* checks are disabled when not using the pool allocator */ -#if (LWIP_ARP && ARP_QUEUEING && (MEMP_NUM_ARP_QUEUE<=0)) - #error "If you want to use ARP Queueing, you have to define MEMP_NUM_ARP_QUEUE>=1 in your lwipopts.h" -#endif -#if (LWIP_RAW && (MEMP_NUM_RAW_PCB<=0)) - #error "If you want to use RAW, you have to define MEMP_NUM_RAW_PCB>=1 in your lwipopts.h" -#endif -#if (LWIP_UDP && (MEMP_NUM_UDP_PCB<=0)) - #error "If you want to use UDP, you have to define MEMP_NUM_UDP_PCB>=1 in your lwipopts.h" -#endif -#if (LWIP_TCP && (MEMP_NUM_TCP_PCB<=0)) - #error "If you want to use TCP, you have to define MEMP_NUM_TCP_PCB>=1 in your lwipopts.h" -#endif -#if (LWIP_IGMP && (MEMP_NUM_IGMP_GROUP<=1)) - #error "If you want to use IGMP, you have to define MEMP_NUM_IGMP_GROUP>1 in your lwipopts.h" -#endif -#if (LWIP_IGMP && !LWIP_MULTICAST_TX_OPTIONS) - #error "If you want to use IGMP, you have to define LWIP_MULTICAST_TX_OPTIONS==1 in your lwipopts.h" -#endif -#if (LWIP_IGMP && !LWIP_IPV4) - #error "IGMP needs LWIP_IPV4 enabled in your lwipopts.h" -#endif -#if (LWIP_MULTICAST_TX_OPTIONS && !LWIP_IPV4) - #error "LWIP_MULTICAST_TX_OPTIONS needs LWIP_IPV4 enabled in your lwipopts.h" -#endif -#if ((LWIP_NETCONN || LWIP_SOCKET) && (MEMP_NUM_TCPIP_MSG_API<=0)) - #error "If you want to use Sequential API, you have to define MEMP_NUM_TCPIP_MSG_API>=1 in your lwipopts.h" -#endif -/* There must be sufficient timeouts, taking into account requirements of the subsystems. */ -#if LWIP_TIMERS && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0))) - #error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts" -#endif -#if (IP_REASSEMBLY && (MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS)) - #error "MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS doesn't make sense since each struct ip_reassdata must hold 2 pbufs at least!" -#endif -#endif /* !MEMP_MEM_MALLOC */ -#if LWIP_WND_SCALE -#if (LWIP_TCP && (TCP_WND > 0xffffffff)) - #error "If you want to use TCP, TCP_WND must fit in an u32_t, so, you have to reduce it in your lwipopts.h" -#endif -#if (LWIP_TCP && (TCP_RCV_SCALE > 14)) - #error "The maximum valid window scale value is 14!" -#endif -#if (LWIP_TCP && (TCP_WND > (0xFFFFU << TCP_RCV_SCALE))) - #error "TCP_WND is bigger than the configured LWIP_WND_SCALE allows!" -#endif -#if (LWIP_TCP && ((TCP_WND >> TCP_RCV_SCALE) == 0)) - #error "TCP_WND is too small for the configured LWIP_WND_SCALE (results in zero window)!" -#endif -#else /* LWIP_WND_SCALE */ -#if (LWIP_TCP && (TCP_WND > 0xffff)) - #error "If you want to use TCP, TCP_WND must fit in an u16_t, so, you have to reduce it in your lwipopts.h (or enable window scaling)" -#endif -#endif /* LWIP_WND_SCALE */ -#if (LWIP_TCP && (TCP_SND_QUEUELEN > 0xffff)) - #error "If you want to use TCP, TCP_SND_QUEUELEN must fit in an u16_t, so, you have to reduce it in your lwipopts.h" -#endif -#if (LWIP_TCP && (TCP_SND_QUEUELEN < 2)) - #error "TCP_SND_QUEUELEN must be at least 2 for no-copy TCP writes to work" -#endif -#if (LWIP_TCP && ((TCP_MAXRTX > 12) || (TCP_SYNMAXRTX > 12))) - #error "If you want to use TCP, TCP_MAXRTX and TCP_SYNMAXRTX must less or equal to 12 (due to tcp_backoff table), so, you have to reduce them in your lwipopts.h" -#endif -#if (LWIP_TCP && TCP_LISTEN_BACKLOG && ((TCP_DEFAULT_LISTEN_BACKLOG < 0) || (TCP_DEFAULT_LISTEN_BACKLOG > 0xff))) - #error "If you want to use TCP backlog, TCP_DEFAULT_LISTEN_BACKLOG must fit into an u8_t" -#endif -#if (LWIP_NETIF_API && (NO_SYS==1)) - #error "If you want to use NETIF API, you have to define NO_SYS=0 in your lwipopts.h" -#endif -#if ((LWIP_SOCKET || LWIP_NETCONN) && (NO_SYS==1)) - #error "If you want to use Sequential API, you have to define NO_SYS=0 in your lwipopts.h" -#endif -#if (LWIP_PPP_API && (NO_SYS==1)) - #error "If you want to use PPP API, you have to define NO_SYS=0 in your lwipopts.h" -#endif -#if (LWIP_PPP_API && (PPP_SUPPORT==0)) - #error "If you want to use PPP API, you have to enable PPP_SUPPORT in your lwipopts.h" -#endif -#if (((!LWIP_DHCP) || (!LWIP_AUTOIP)) && LWIP_DHCP_AUTOIP_COOP) - #error "If you want to use DHCP/AUTOIP cooperation mode, you have to define LWIP_DHCP=1 and LWIP_AUTOIP=1 in your lwipopts.h" -#endif -#if (((!LWIP_DHCP) || (!LWIP_ARP)) && DHCP_DOES_ARP_CHECK) - #error "If you want to use DHCP ARP checking, you have to define LWIP_DHCP=1 and LWIP_ARP=1 in your lwipopts.h" -#endif -#if (!LWIP_ARP && LWIP_AUTOIP) - #error "If you want to use AUTOIP, you have to define LWIP_ARP=1 in your lwipopts.h" -#endif -#if (LWIP_TCP && ((LWIP_EVENT_API && LWIP_CALLBACK_API) || (!LWIP_EVENT_API && !LWIP_CALLBACK_API))) - #error "One and exactly one of LWIP_EVENT_API and LWIP_CALLBACK_API has to be enabled in your lwipopts.h" -#endif -#if (MEM_LIBC_MALLOC && MEM_USE_POOLS) - #error "MEM_LIBC_MALLOC and MEM_USE_POOLS may not both be simultaneously enabled in your lwipopts.h" -#endif -#if (MEM_USE_POOLS && !MEMP_USE_CUSTOM_POOLS) - #error "MEM_USE_POOLS requires custom pools (MEMP_USE_CUSTOM_POOLS) to be enabled in your lwipopts.h" -#endif -#if (PBUF_POOL_BUFSIZE <= MEM_ALIGNMENT) - #error "PBUF_POOL_BUFSIZE must be greater than MEM_ALIGNMENT or the offset may take the full first pbuf" -#endif -#if (DNS_LOCAL_HOSTLIST && !DNS_LOCAL_HOSTLIST_IS_DYNAMIC && !(defined(DNS_LOCAL_HOSTLIST_INIT))) - #error "you have to define define DNS_LOCAL_HOSTLIST_INIT {{'host1', 0x123}, {'host2', 0x234}} to initialize DNS_LOCAL_HOSTLIST" -#endif -#if PPP_SUPPORT && !PPPOS_SUPPORT && !PPPOE_SUPPORT && !PPPOL2TP_SUPPORT - #error "PPP_SUPPORT needs at least one of PPPOS_SUPPORT, PPPOE_SUPPORT or PPPOL2TP_SUPPORT turned on" -#endif -#if PPP_SUPPORT && !PPP_IPV4_SUPPORT && !PPP_IPV6_SUPPORT - #error "PPP_SUPPORT needs PPP_IPV4_SUPPORT and/or PPP_IPV6_SUPPORT turned on" -#endif -#if PPP_SUPPORT && PPP_IPV4_SUPPORT && !LWIP_IPV4 - #error "PPP_IPV4_SUPPORT needs LWIP_IPV4 turned on" -#endif -#if PPP_SUPPORT && PPP_IPV6_SUPPORT && !LWIP_IPV6 - #error "PPP_IPV6_SUPPORT needs LWIP_IPV6 turned on" -#endif -#if !LWIP_ETHERNET && (LWIP_ARP || PPPOE_SUPPORT) - #error "LWIP_ETHERNET needs to be turned on for LWIP_ARP or PPPOE_SUPPORT" -#endif -#if LWIP_TCPIP_CORE_LOCKING_INPUT && !LWIP_TCPIP_CORE_LOCKING - #error "When using LWIP_TCPIP_CORE_LOCKING_INPUT, LWIP_TCPIP_CORE_LOCKING must be enabled, too" -#endif -#if LWIP_TCP && LWIP_NETIF_TX_SINGLE_PBUF && !TCP_OVERSIZE - #error "LWIP_NETIF_TX_SINGLE_PBUF needs TCP_OVERSIZE enabled to create single-pbuf TCP packets" -#endif -#if LWIP_NETCONN && LWIP_TCP -#if NETCONN_COPY != TCP_WRITE_FLAG_COPY - #error "NETCONN_COPY != TCP_WRITE_FLAG_COPY" -#endif -#if NETCONN_MORE != TCP_WRITE_FLAG_MORE - #error "NETCONN_MORE != TCP_WRITE_FLAG_MORE" -#endif -#endif /* LWIP_NETCONN && LWIP_TCP */ -#if LWIP_SOCKET -/* Check that the SO_* socket options and SOF_* lwIP-internal flags match */ -#if SO_REUSEADDR != SOF_REUSEADDR - #error "WARNING: SO_REUSEADDR != SOF_REUSEADDR" -#endif -#if SO_KEEPALIVE != SOF_KEEPALIVE - #error "WARNING: SO_KEEPALIVE != SOF_KEEPALIVE" -#endif -#if SO_BROADCAST != SOF_BROADCAST - #error "WARNING: SO_BROADCAST != SOF_BROADCAST" -#endif -#endif /* LWIP_SOCKET */ - - -/* Compile-time checks for deprecated options. - */ -#ifdef MEMP_NUM_TCPIP_MSG - #error "MEMP_NUM_TCPIP_MSG option is deprecated. Remove it from your lwipopts.h." -#endif -#ifdef TCP_REXMIT_DEBUG - #error "TCP_REXMIT_DEBUG option is deprecated. Remove it from your lwipopts.h." -#endif -#ifdef RAW_STATS - #error "RAW_STATS option is deprecated. Remove it from your lwipopts.h." -#endif -#ifdef ETHARP_QUEUE_FIRST - #error "ETHARP_QUEUE_FIRST option is deprecated. Remove it from your lwipopts.h." -#endif -#ifdef ETHARP_ALWAYS_INSERT - #error "ETHARP_ALWAYS_INSERT option is deprecated. Remove it from your lwipopts.h." -#endif -#if !NO_SYS && LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED) - #error "LWIP_COMPAT_MUTEX cannot prevent priority inversion. It is recommended to implement priority-aware mutexes. (Define LWIP_COMPAT_MUTEX_ALLOWED to disable this error.)" -#endif - -#ifndef LWIP_DISABLE_TCP_SANITY_CHECKS -#define LWIP_DISABLE_TCP_SANITY_CHECKS 0 -#endif -#ifndef LWIP_DISABLE_MEMP_SANITY_CHECKS -#define LWIP_DISABLE_MEMP_SANITY_CHECKS 0 -#endif - -/* MEMP sanity checks */ -#if MEMP_MEM_MALLOC -#if !LWIP_DISABLE_MEMP_SANITY_CHECKS -#if LWIP_NETCONN || LWIP_SOCKET -#if !MEMP_NUM_NETCONN && LWIP_SOCKET -#error "lwip_sanity_check: WARNING: MEMP_NUM_NETCONN cannot be 0 when using sockets!" -#endif -#else /* MEMP_MEM_MALLOC */ -#if MEMP_NUM_NETCONN > (MEMP_NUM_TCP_PCB+MEMP_NUM_TCP_PCB_LISTEN+MEMP_NUM_UDP_PCB+MEMP_NUM_RAW_PCB) -#error "lwip_sanity_check: WARNING: MEMP_NUM_NETCONN should be less than the sum of MEMP_NUM_{TCP,RAW,UDP}_PCB+MEMP_NUM_TCP_PCB_LISTEN. If you know what you are doing, define LWIP_DISABLE_MEMP_SANITY_CHECKS to 1 to disable this error." -#endif -#endif /* LWIP_NETCONN || LWIP_SOCKET */ -#endif /* !LWIP_DISABLE_MEMP_SANITY_CHECKS */ -#if MEM_USE_POOLS -#error "MEMP_MEM_MALLOC and MEM_USE_POOLS cannot be enabled at the same time" -#endif -#ifdef LWIP_HOOK_MEMP_AVAILABLE -#error "LWIP_HOOK_MEMP_AVAILABLE doesn't make sense with MEMP_MEM_MALLOC" -#endif -#endif /* MEMP_MEM_MALLOC */ - -/* TCP sanity checks */ -#if !LWIP_DISABLE_TCP_SANITY_CHECKS -#if LWIP_TCP -#if !MEMP_MEM_MALLOC && (MEMP_NUM_TCP_SEG < TCP_SND_QUEUELEN) - #error "lwip_sanity_check: WARNING: MEMP_NUM_TCP_SEG should be at least as big as TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#if TCP_SND_BUF < (2 * TCP_MSS) - #error "lwip_sanity_check: WARNING: TCP_SND_BUF must be at least as much as (2 * TCP_MSS) for things to work smoothly. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#if TCP_SND_QUEUELEN < (2 * (TCP_SND_BUF / TCP_MSS)) - #error "lwip_sanity_check: WARNING: TCP_SND_QUEUELEN must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#if TCP_SNDLOWAT >= TCP_SND_BUF - #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must be less than TCP_SND_BUF. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS)) - #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS below u16_t overflow!" -#endif -#if TCP_SNDQUEUELOWAT >= TCP_SND_QUEUELEN - #error "lwip_sanity_check: WARNING: TCP_SNDQUEUELOWAT must be less than TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#if !MEMP_MEM_MALLOC && PBUF_POOL_SIZE && (PBUF_POOL_BUFSIZE <= (PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN)) - #error "lwip_sanity_check: WARNING: PBUF_POOL_BUFSIZE does not provide enough space for protocol headers. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#if !MEMP_MEM_MALLOC && PBUF_POOL_SIZE && (TCP_WND > (PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - (PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN)))) - #error "lwip_sanity_check: WARNING: TCP_WND is larger than space provided by PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - protocol headers). If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#if TCP_WND < TCP_MSS - #error "lwip_sanity_check: WARNING: TCP_WND is smaller than MSS. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." -#endif -#endif /* LWIP_TCP */ -#endif /* !LWIP_DISABLE_TCP_SANITY_CHECKS */ - -/** - * @ingroup lwip_nosys - * Initialize all modules. - * Use this in NO_SYS mode. Use tcpip_init() otherwise. - */ -void -lwip_init(void) -{ -#ifndef LWIP_SKIP_CONST_CHECK - int a = 0; - LWIP_UNUSED_ARG(a); - LWIP_ASSERT("LWIP_CONST_CAST not implemented correctly. Check your lwIP port.", LWIP_CONST_CAST(void*, &a) == &a); -#endif -#ifndef LWIP_SKIP_PACKING_CHECK - LWIP_ASSERT("Struct packing not implemented correctly. Check your lwIP port.", sizeof(struct packed_struct_test) == PACKED_STRUCT_TEST_EXPECTED_SIZE); -#endif - - /* Modules initialization */ - stats_init(); -#if !NO_SYS - sys_init(); -#endif /* !NO_SYS */ - mem_init(); - memp_init(); - pbuf_init(); - netif_init(); -#if LWIP_IPV4 - ip_init(); -#if LWIP_ARP - etharp_init(); -#endif /* LWIP_ARP */ -#endif /* LWIP_IPV4 */ -#if LWIP_RAW - raw_init(); -#endif /* LWIP_RAW */ -#if LWIP_UDP - udp_init(); -#endif /* LWIP_UDP */ -#if LWIP_TCP - tcp_init(); -#endif /* LWIP_TCP */ -#if LWIP_IGMP - igmp_init(); -#endif /* LWIP_IGMP */ -#if LWIP_DNS - dns_init(); -#endif /* LWIP_DNS */ -#if PPP_SUPPORT - ppp_init(); -#endif - -#if LWIP_TIMERS - sys_timeouts_init(); -#endif /* LWIP_TIMERS */ -} +/** + * @file + * Modules initialization + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + */ + +#include "lwip/opt.h" + +#include "lwip/init.h" +#include "lwip/stats.h" +#include "lwip/sys.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/pbuf.h" +#include "lwip/netif.h" +#include "lwip/sockets.h" +#include "lwip/ip.h" +#include "lwip/raw.h" +#include "lwip/udp.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/igmp.h" +#include "lwip/dns.h" +#include "lwip/timeouts.h" +#include "lwip/etharp.h" +#include "lwip/ip6.h" +#include "lwip/nd6.h" +#include "lwip/mld6.h" +#include "lwip/api.h" + +#include "netif/ppp/ppp_opts.h" +#include "netif/ppp/ppp_impl.h" + +#ifndef LWIP_SKIP_PACKING_CHECK + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct packed_struct_test +{ + PACK_STRUCT_FLD_8(u8_t dummy1); + PACK_STRUCT_FIELD(u32_t dummy2); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +#define PACKED_STRUCT_TEST_EXPECTED_SIZE 5 + +#endif + +/* Compile-time sanity checks for configuration errors. + * These can be done independently of LWIP_DEBUG, without penalty. + */ +#ifndef BYTE_ORDER + #error "BYTE_ORDER is not defined, you have to define it in your cc.h" +#endif +#if (!IP_SOF_BROADCAST && IP_SOF_BROADCAST_RECV) + #error "If you want to use broadcast filter per pcb on recv operations, you have to define IP_SOF_BROADCAST=1 in your lwipopts.h" +#endif +#if (!LWIP_UDP && LWIP_UDPLITE) + #error "If you want to use UDP Lite, you have to define LWIP_UDP=1 in your lwipopts.h" +#endif +#if (!LWIP_UDP && LWIP_DHCP) + #error "If you want to use DHCP, you have to define LWIP_UDP=1 in your lwipopts.h" +#endif +#if (!LWIP_UDP && LWIP_MULTICAST_TX_OPTIONS) + #error "If you want to use IGMP/LWIP_MULTICAST_TX_OPTIONS, you have to define LWIP_UDP=1 in your lwipopts.h" +#endif +#if (!LWIP_UDP && LWIP_DNS) + #error "If you want to use DNS, you have to define LWIP_UDP=1 in your lwipopts.h" +#endif +#if !MEMP_MEM_MALLOC /* MEMP_NUM_* checks are disabled when not using the pool allocator */ +#if (LWIP_ARP && ARP_QUEUEING && (MEMP_NUM_ARP_QUEUE<=0)) + #error "If you want to use ARP Queueing, you have to define MEMP_NUM_ARP_QUEUE>=1 in your lwipopts.h" +#endif +#if (LWIP_RAW && (MEMP_NUM_RAW_PCB<=0)) + #error "If you want to use RAW, you have to define MEMP_NUM_RAW_PCB>=1 in your lwipopts.h" +#endif +#if (LWIP_UDP && (MEMP_NUM_UDP_PCB<=0)) + #error "If you want to use UDP, you have to define MEMP_NUM_UDP_PCB>=1 in your lwipopts.h" +#endif +#if (LWIP_TCP && (MEMP_NUM_TCP_PCB<=0)) + #error "If you want to use TCP, you have to define MEMP_NUM_TCP_PCB>=1 in your lwipopts.h" +#endif +#if (LWIP_IGMP && (MEMP_NUM_IGMP_GROUP<=1)) + #error "If you want to use IGMP, you have to define MEMP_NUM_IGMP_GROUP>1 in your lwipopts.h" +#endif +#if (LWIP_IGMP && !LWIP_MULTICAST_TX_OPTIONS) + #error "If you want to use IGMP, you have to define LWIP_MULTICAST_TX_OPTIONS==1 in your lwipopts.h" +#endif +#if (LWIP_IGMP && !LWIP_IPV4) + #error "IGMP needs LWIP_IPV4 enabled in your lwipopts.h" +#endif +#if (LWIP_MULTICAST_TX_OPTIONS && !LWIP_IPV4) + #error "LWIP_MULTICAST_TX_OPTIONS needs LWIP_IPV4 enabled in your lwipopts.h" +#endif +#if ((LWIP_NETCONN || LWIP_SOCKET) && (MEMP_NUM_TCPIP_MSG_API<=0)) + #error "If you want to use Sequential API, you have to define MEMP_NUM_TCPIP_MSG_API>=1 in your lwipopts.h" +#endif +/* There must be sufficient timeouts, taking into account requirements of the subsystems. */ +#if LWIP_TIMERS && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0))) + #error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts" +#endif +#if (IP_REASSEMBLY && (MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS)) + #error "MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS doesn't make sense since each struct ip_reassdata must hold 2 pbufs at least!" +#endif +#endif /* !MEMP_MEM_MALLOC */ +#if LWIP_WND_SCALE +#if (LWIP_TCP && (TCP_WND > 0xffffffff)) + #error "If you want to use TCP, TCP_WND must fit in an u32_t, so, you have to reduce it in your lwipopts.h" +#endif +#if (LWIP_TCP && (TCP_RCV_SCALE > 14)) + #error "The maximum valid window scale value is 14!" +#endif +#if (LWIP_TCP && (TCP_WND > (0xFFFFU << TCP_RCV_SCALE))) + #error "TCP_WND is bigger than the configured LWIP_WND_SCALE allows!" +#endif +#if (LWIP_TCP && ((TCP_WND >> TCP_RCV_SCALE) == 0)) + #error "TCP_WND is too small for the configured LWIP_WND_SCALE (results in zero window)!" +#endif +#else /* LWIP_WND_SCALE */ +#if (LWIP_TCP && (TCP_WND > 0xffff)) + #error "If you want to use TCP, TCP_WND must fit in an u16_t, so, you have to reduce it in your lwipopts.h (or enable window scaling)" +#endif +#endif /* LWIP_WND_SCALE */ +#if (LWIP_TCP && (TCP_SND_QUEUELEN > 0xffff)) + #error "If you want to use TCP, TCP_SND_QUEUELEN must fit in an u16_t, so, you have to reduce it in your lwipopts.h" +#endif +#if (LWIP_TCP && (TCP_SND_QUEUELEN < 2)) + #error "TCP_SND_QUEUELEN must be at least 2 for no-copy TCP writes to work" +#endif +#if (LWIP_TCP && ((TCP_MAXRTX > 12) || (TCP_SYNMAXRTX > 12))) + #error "If you want to use TCP, TCP_MAXRTX and TCP_SYNMAXRTX must less or equal to 12 (due to tcp_backoff table), so, you have to reduce them in your lwipopts.h" +#endif +#if (LWIP_TCP && TCP_LISTEN_BACKLOG && ((TCP_DEFAULT_LISTEN_BACKLOG < 0) || (TCP_DEFAULT_LISTEN_BACKLOG > 0xff))) + #error "If you want to use TCP backlog, TCP_DEFAULT_LISTEN_BACKLOG must fit into an u8_t" +#endif +#if (LWIP_NETIF_API && (NO_SYS==1)) + #error "If you want to use NETIF API, you have to define NO_SYS=0 in your lwipopts.h" +#endif +#if ((LWIP_SOCKET || LWIP_NETCONN) && (NO_SYS==1)) + #error "If you want to use Sequential API, you have to define NO_SYS=0 in your lwipopts.h" +#endif +#if (LWIP_PPP_API && (NO_SYS==1)) + #error "If you want to use PPP API, you have to define NO_SYS=0 in your lwipopts.h" +#endif +#if (LWIP_PPP_API && (PPP_SUPPORT==0)) + #error "If you want to use PPP API, you have to enable PPP_SUPPORT in your lwipopts.h" +#endif +#if (((!LWIP_DHCP) || (!LWIP_AUTOIP)) && LWIP_DHCP_AUTOIP_COOP) + #error "If you want to use DHCP/AUTOIP cooperation mode, you have to define LWIP_DHCP=1 and LWIP_AUTOIP=1 in your lwipopts.h" +#endif +#if (((!LWIP_DHCP) || (!LWIP_ARP)) && DHCP_DOES_ARP_CHECK) + #error "If you want to use DHCP ARP checking, you have to define LWIP_DHCP=1 and LWIP_ARP=1 in your lwipopts.h" +#endif +#if (!LWIP_ARP && LWIP_AUTOIP) + #error "If you want to use AUTOIP, you have to define LWIP_ARP=1 in your lwipopts.h" +#endif +#if (LWIP_TCP && ((LWIP_EVENT_API && LWIP_CALLBACK_API) || (!LWIP_EVENT_API && !LWIP_CALLBACK_API))) + #error "One and exactly one of LWIP_EVENT_API and LWIP_CALLBACK_API has to be enabled in your lwipopts.h" +#endif +#if (MEM_LIBC_MALLOC && MEM_USE_POOLS) + #error "MEM_LIBC_MALLOC and MEM_USE_POOLS may not both be simultaneously enabled in your lwipopts.h" +#endif +#if (MEM_USE_POOLS && !MEMP_USE_CUSTOM_POOLS) + #error "MEM_USE_POOLS requires custom pools (MEMP_USE_CUSTOM_POOLS) to be enabled in your lwipopts.h" +#endif +#if (PBUF_POOL_BUFSIZE <= MEM_ALIGNMENT) + #error "PBUF_POOL_BUFSIZE must be greater than MEM_ALIGNMENT or the offset may take the full first pbuf" +#endif +#if (DNS_LOCAL_HOSTLIST && !DNS_LOCAL_HOSTLIST_IS_DYNAMIC && !(defined(DNS_LOCAL_HOSTLIST_INIT))) + #error "you have to define define DNS_LOCAL_HOSTLIST_INIT {{'host1', 0x123}, {'host2', 0x234}} to initialize DNS_LOCAL_HOSTLIST" +#endif +#if PPP_SUPPORT && !PPPOS_SUPPORT && !PPPOE_SUPPORT && !PPPOL2TP_SUPPORT + #error "PPP_SUPPORT needs at least one of PPPOS_SUPPORT, PPPOE_SUPPORT or PPPOL2TP_SUPPORT turned on" +#endif +#if PPP_SUPPORT && !PPP_IPV4_SUPPORT && !PPP_IPV6_SUPPORT + #error "PPP_SUPPORT needs PPP_IPV4_SUPPORT and/or PPP_IPV6_SUPPORT turned on" +#endif +#if PPP_SUPPORT && PPP_IPV4_SUPPORT && !LWIP_IPV4 + #error "PPP_IPV4_SUPPORT needs LWIP_IPV4 turned on" +#endif +#if PPP_SUPPORT && PPP_IPV6_SUPPORT && !LWIP_IPV6 + #error "PPP_IPV6_SUPPORT needs LWIP_IPV6 turned on" +#endif +#if !LWIP_ETHERNET && (LWIP_ARP || PPPOE_SUPPORT) + #error "LWIP_ETHERNET needs to be turned on for LWIP_ARP or PPPOE_SUPPORT" +#endif +#if LWIP_TCPIP_CORE_LOCKING_INPUT && !LWIP_TCPIP_CORE_LOCKING + #error "When using LWIP_TCPIP_CORE_LOCKING_INPUT, LWIP_TCPIP_CORE_LOCKING must be enabled, too" +#endif +#if LWIP_TCP && LWIP_NETIF_TX_SINGLE_PBUF && !TCP_OVERSIZE + #error "LWIP_NETIF_TX_SINGLE_PBUF needs TCP_OVERSIZE enabled to create single-pbuf TCP packets" +#endif +#if LWIP_NETCONN && LWIP_TCP +#if NETCONN_COPY != TCP_WRITE_FLAG_COPY + #error "NETCONN_COPY != TCP_WRITE_FLAG_COPY" +#endif +#if NETCONN_MORE != TCP_WRITE_FLAG_MORE + #error "NETCONN_MORE != TCP_WRITE_FLAG_MORE" +#endif +#endif /* LWIP_NETCONN && LWIP_TCP */ +#if LWIP_SOCKET +/* Check that the SO_* socket options and SOF_* lwIP-internal flags match */ +#if SO_REUSEADDR != SOF_REUSEADDR + #error "WARNING: SO_REUSEADDR != SOF_REUSEADDR" +#endif +#if SO_KEEPALIVE != SOF_KEEPALIVE + #error "WARNING: SO_KEEPALIVE != SOF_KEEPALIVE" +#endif +#if SO_BROADCAST != SOF_BROADCAST + #error "WARNING: SO_BROADCAST != SOF_BROADCAST" +#endif +#endif /* LWIP_SOCKET */ + + +/* Compile-time checks for deprecated options. + */ +#ifdef MEMP_NUM_TCPIP_MSG + #error "MEMP_NUM_TCPIP_MSG option is deprecated. Remove it from your lwipopts.h." +#endif +#ifdef TCP_REXMIT_DEBUG + #error "TCP_REXMIT_DEBUG option is deprecated. Remove it from your lwipopts.h." +#endif +#ifdef RAW_STATS + #error "RAW_STATS option is deprecated. Remove it from your lwipopts.h." +#endif +#ifdef ETHARP_QUEUE_FIRST + #error "ETHARP_QUEUE_FIRST option is deprecated. Remove it from your lwipopts.h." +#endif +#ifdef ETHARP_ALWAYS_INSERT + #error "ETHARP_ALWAYS_INSERT option is deprecated. Remove it from your lwipopts.h." +#endif +#if !NO_SYS && LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED) + #error "LWIP_COMPAT_MUTEX cannot prevent priority inversion. It is recommended to implement priority-aware mutexes. (Define LWIP_COMPAT_MUTEX_ALLOWED to disable this error.)" +#endif + +#ifndef LWIP_DISABLE_TCP_SANITY_CHECKS +#define LWIP_DISABLE_TCP_SANITY_CHECKS 0 +#endif +#ifndef LWIP_DISABLE_MEMP_SANITY_CHECKS +#define LWIP_DISABLE_MEMP_SANITY_CHECKS 0 +#endif + +/* MEMP sanity checks */ +#if MEMP_MEM_MALLOC +#if !LWIP_DISABLE_MEMP_SANITY_CHECKS +#if LWIP_NETCONN || LWIP_SOCKET +#if !MEMP_NUM_NETCONN && LWIP_SOCKET +#error "lwip_sanity_check: WARNING: MEMP_NUM_NETCONN cannot be 0 when using sockets!" +#endif +#else /* MEMP_MEM_MALLOC */ +#if MEMP_NUM_NETCONN > (MEMP_NUM_TCP_PCB+MEMP_NUM_TCP_PCB_LISTEN+MEMP_NUM_UDP_PCB+MEMP_NUM_RAW_PCB) +#error "lwip_sanity_check: WARNING: MEMP_NUM_NETCONN should be less than the sum of MEMP_NUM_{TCP,RAW,UDP}_PCB+MEMP_NUM_TCP_PCB_LISTEN. If you know what you are doing, define LWIP_DISABLE_MEMP_SANITY_CHECKS to 1 to disable this error." +#endif +#endif /* LWIP_NETCONN || LWIP_SOCKET */ +#endif /* !LWIP_DISABLE_MEMP_SANITY_CHECKS */ +#if MEM_USE_POOLS +#error "MEMP_MEM_MALLOC and MEM_USE_POOLS cannot be enabled at the same time" +#endif +#ifdef LWIP_HOOK_MEMP_AVAILABLE +#error "LWIP_HOOK_MEMP_AVAILABLE doesn't make sense with MEMP_MEM_MALLOC" +#endif +#endif /* MEMP_MEM_MALLOC */ + +/* TCP sanity checks */ +#if !LWIP_DISABLE_TCP_SANITY_CHECKS +#if LWIP_TCP +#if !MEMP_MEM_MALLOC && (MEMP_NUM_TCP_SEG < TCP_SND_QUEUELEN) + #error "lwip_sanity_check: WARNING: MEMP_NUM_TCP_SEG should be at least as big as TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#if TCP_SND_BUF < (2 * TCP_MSS) + #error "lwip_sanity_check: WARNING: TCP_SND_BUF must be at least as much as (2 * TCP_MSS) for things to work smoothly. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#if TCP_SND_QUEUELEN < (2 * (TCP_SND_BUF / TCP_MSS)) + #error "lwip_sanity_check: WARNING: TCP_SND_QUEUELEN must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#if TCP_SNDLOWAT >= TCP_SND_BUF + #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must be less than TCP_SND_BUF. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS)) + #error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS below u16_t overflow!" +#endif +#if TCP_SNDQUEUELOWAT >= TCP_SND_QUEUELEN + #error "lwip_sanity_check: WARNING: TCP_SNDQUEUELOWAT must be less than TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#if !MEMP_MEM_MALLOC && PBUF_POOL_SIZE && (PBUF_POOL_BUFSIZE <= (PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN)) + #error "lwip_sanity_check: WARNING: PBUF_POOL_BUFSIZE does not provide enough space for protocol headers. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#if !MEMP_MEM_MALLOC && PBUF_POOL_SIZE && (TCP_WND > (PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - (PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN)))) + #error "lwip_sanity_check: WARNING: TCP_WND is larger than space provided by PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - protocol headers). If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#if TCP_WND < TCP_MSS + #error "lwip_sanity_check: WARNING: TCP_WND is smaller than MSS. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error." +#endif +#endif /* LWIP_TCP */ +#endif /* !LWIP_DISABLE_TCP_SANITY_CHECKS */ + +/** + * @ingroup lwip_nosys + * Initialize all modules. + * Use this in NO_SYS mode. Use tcpip_init() otherwise. + */ +void +lwip_init(void) +{ +#ifndef LWIP_SKIP_CONST_CHECK + int a = 0; + LWIP_UNUSED_ARG(a); + LWIP_ASSERT("LWIP_CONST_CAST not implemented correctly. Check your lwIP port.", LWIP_CONST_CAST(void*, &a) == &a); +#endif +#ifndef LWIP_SKIP_PACKING_CHECK + LWIP_ASSERT("Struct packing not implemented correctly. Check your lwIP port.", sizeof(struct packed_struct_test) == PACKED_STRUCT_TEST_EXPECTED_SIZE); +#endif + + /* Modules initialization */ + stats_init(); +#if !NO_SYS + sys_init(); +#endif /* !NO_SYS */ + mem_init(); + memp_init(); + pbuf_init(); + netif_init(); +#if LWIP_IPV4 + ip_init(); +#if LWIP_ARP + etharp_init(); +#endif /* LWIP_ARP */ +#endif /* LWIP_IPV4 */ +#if LWIP_RAW + raw_init(); +#endif /* LWIP_RAW */ +#if LWIP_UDP + udp_init(); +#endif /* LWIP_UDP */ +#if LWIP_TCP + tcp_init(); +#endif /* LWIP_TCP */ +#if LWIP_IGMP + igmp_init(); +#endif /* LWIP_IGMP */ +#if LWIP_DNS + dns_init(); +#endif /* LWIP_DNS */ +#if PPP_SUPPORT + ppp_init(); +#endif + +#if LWIP_TIMERS + sys_timeouts_init(); +#endif /* LWIP_TIMERS */ +} diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ip.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ip.c index 2e02408..1d65cf2 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ip.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ip.c @@ -1,124 +1,124 @@ -/** - * @file - * Common IPv4 and IPv6 code - * - * @defgroup ip IP - * @ingroup callbackstyle_api - * - * @defgroup ip4 IPv4 - * @ingroup ip - * - * @defgroup ip6 IPv6 - * @ingroup ip - * - * @defgroup ipaddr IP address handling - * @ingroup infrastructure - * - * @defgroup ip4addr IPv4 only - * @ingroup ipaddr - * - * @defgroup ip6addr IPv6 only - * @ingroup ipaddr - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV4 || LWIP_IPV6 - -#include "lwip/ip_addr.h" -#include "lwip/ip.h" - -/** Global data for both IPv4 and IPv6 */ -struct ip_globals ip_data; - -#if LWIP_IPV4 && LWIP_IPV6 - -const ip_addr_t ip_addr_any_type = IPADDR_ANY_TYPE_INIT; - -/** - * @ingroup ipaddr - * Convert IP address string (both versions) to numeric. - * The version is auto-detected from the string. - * - * @param cp IP address string to convert - * @param addr conversion result is stored here - * @return 1 on success, 0 on error - */ -int -ipaddr_aton(const char *cp, ip_addr_t *addr) -{ - if (cp != NULL) { - const char* c; - for (c = cp; *c != 0; c++) { - if (*c == ':') { - /* contains a colon: IPv6 address */ - if (addr) { - IP_SET_TYPE_VAL(*addr, IPADDR_TYPE_V6); - } - return ip6addr_aton(cp, ip_2_ip6(addr)); - } else if (*c == '.') { - /* contains a dot: IPv4 address */ - break; - } - } - /* call ip4addr_aton as fallback or if IPv4 was found */ - if (addr) { - IP_SET_TYPE_VAL(*addr, IPADDR_TYPE_V4); - } - return ip4addr_aton(cp, ip_2_ip4(addr)); - } - return 0; -} - -/** - * @ingroup lwip_nosys - * If both IP versions are enabled, this function can dispatch packets to the correct one. - * Don't call directly, pass to netif_add() and call netif->input(). - */ -err_t -ip_input(struct pbuf *p, struct netif *inp) -{ - if (p != NULL) { - if (IP_HDR_GET_VERSION(p->payload) == 6) { - return ip6_input(p, inp); - } - return ip4_input(p, inp); - } - return ERR_VAL; -} - -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - -#endif /* LWIP_IPV4 || LWIP_IPV6 */ +/** + * @file + * Common IPv4 and IPv6 code + * + * @defgroup ip IP + * @ingroup callbackstyle_api + * + * @defgroup ip4 IPv4 + * @ingroup ip + * + * @defgroup ip6 IPv6 + * @ingroup ip + * + * @defgroup ipaddr IP address handling + * @ingroup infrastructure + * + * @defgroup ip4addr IPv4 only + * @ingroup ipaddr + * + * @defgroup ip6addr IPv6 only + * @ingroup ipaddr + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV4 || LWIP_IPV6 + +#include "lwip/ip_addr.h" +#include "lwip/ip.h" + +/** Global data for both IPv4 and IPv6 */ +struct ip_globals ip_data; + +#if LWIP_IPV4 && LWIP_IPV6 + +const ip_addr_t ip_addr_any_type = IPADDR_ANY_TYPE_INIT; + +/** + * @ingroup ipaddr + * Convert IP address string (both versions) to numeric. + * The version is auto-detected from the string. + * + * @param cp IP address string to convert + * @param addr conversion result is stored here + * @return 1 on success, 0 on error + */ +int +ipaddr_aton(const char *cp, ip_addr_t *addr) +{ + if (cp != NULL) { + const char* c; + for (c = cp; *c != 0; c++) { + if (*c == ':') { + /* contains a colon: IPv6 address */ + if (addr) { + IP_SET_TYPE_VAL(*addr, IPADDR_TYPE_V6); + } + return ip6addr_aton(cp, ip_2_ip6(addr)); + } else if (*c == '.') { + /* contains a dot: IPv4 address */ + break; + } + } + /* call ip4addr_aton as fallback or if IPv4 was found */ + if (addr) { + IP_SET_TYPE_VAL(*addr, IPADDR_TYPE_V4); + } + return ip4addr_aton(cp, ip_2_ip4(addr)); + } + return 0; +} + +/** + * @ingroup lwip_nosys + * If both IP versions are enabled, this function can dispatch packets to the correct one. + * Don't call directly, pass to netif_add() and call netif->input(). + */ +err_t +ip_input(struct pbuf *p, struct netif *inp) +{ + if (p != NULL) { + if (IP_HDR_GET_VERSION(p->payload) == 6) { + return ip6_input(p, inp); + } + return ip4_input(p, inp); + } + return ERR_VAL; +} + +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + +#endif /* LWIP_IPV4 || LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.c index 10db8a3..939d7f6 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/autoip.c @@ -1,527 +1,527 @@ -/** - * @file - * AutoIP Automatic LinkLocal IP Configuration - * - * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform - * with RFC 3927. - * - * @defgroup autoip AUTOIP - * @ingroup ip4 - * AUTOIP related functions - * USAGE: - * - * define @ref LWIP_AUTOIP 1 in your lwipopts.h - * Options: - * AUTOIP_TMR_INTERVAL msecs, - * I recommend a value of 100. The value must divide 1000 with a remainder almost 0. - * Possible values are 1000, 500, 333, 250, 200, 166, 142, 125, 111, 100 .... - * - * Without DHCP: - * - Call autoip_start() after netif_add(). - * - * With DHCP: - * - define @ref LWIP_DHCP_AUTOIP_COOP 1 in your lwipopts.h. - * - Configure your DHCP Client. - * - * @see netifapi_autoip - */ - -/* - * - * Copyright (c) 2007 Dominik Spies - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * Author: Dominik Spies - */ - -#include "lwip/opt.h" - -#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/mem.h" -/* #include "lwip/udp.h" */ -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/autoip.h" -#include "lwip/etharp.h" -#include "lwip/prot/autoip.h" - -#include - -/** Pseudo random macro based on netif informations. - * You could use "rand()" from the C Library if you define LWIP_AUTOIP_RAND in lwipopts.h */ -#ifndef LWIP_AUTOIP_RAND -#define LWIP_AUTOIP_RAND(netif) ( (((u32_t)((netif->hwaddr[5]) & 0xff) << 24) | \ - ((u32_t)((netif->hwaddr[3]) & 0xff) << 16) | \ - ((u32_t)((netif->hwaddr[2]) & 0xff) << 8) | \ - ((u32_t)((netif->hwaddr[4]) & 0xff))) + \ - (netif_autoip_data(netif)? netif_autoip_data(netif)->tried_llipaddr : 0)) -#endif /* LWIP_AUTOIP_RAND */ - -/** - * Macro that generates the initial IP address to be tried by AUTOIP. - * If you want to override this, define it to something else in lwipopts.h. - */ -#ifndef LWIP_AUTOIP_CREATE_SEED_ADDR -#define LWIP_AUTOIP_CREATE_SEED_ADDR(netif) \ - lwip_htonl(AUTOIP_RANGE_START + ((u32_t)(((u8_t)(netif->hwaddr[4])) | \ - ((u32_t)((u8_t)(netif->hwaddr[5]))) << 8))) -#endif /* LWIP_AUTOIP_CREATE_SEED_ADDR */ - -/* static functions */ -static err_t autoip_arp_announce(struct netif *netif); -static void autoip_start_probing(struct netif *netif); - -/** - * @ingroup autoip - * Set a statically allocated struct autoip to work with. - * Using this prevents autoip_start to allocate it using mem_malloc. - * - * @param netif the netif for which to set the struct autoip - * @param autoip (uninitialised) autoip struct allocated by the application - */ -void -autoip_set_struct(struct netif *netif, struct autoip *autoip) -{ - LWIP_ASSERT("netif != NULL", netif != NULL); - LWIP_ASSERT("autoip != NULL", autoip != NULL); - LWIP_ASSERT("netif already has a struct autoip set", - netif_autoip_data(netif) == NULL); - - /* clear data structure */ - memset(autoip, 0, sizeof(struct autoip)); - /* autoip->state = AUTOIP_STATE_OFF; */ - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, autoip); -} - -/** Restart AutoIP client and check the next address (conflict detected) - * - * @param netif The netif under AutoIP control - */ -static void -autoip_restart(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - autoip->tried_llipaddr++; - autoip_start(netif); -} - -/** - * Handle a IP address conflict after an ARP conflict detection - */ -static void -autoip_handle_arp_conflict(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - - /* RFC3927, 2.5 "Conflict Detection and Defense" allows two options where - a) means retreat on the first conflict and - b) allows to keep an already configured address when having only one - conflict in 10 seconds - We use option b) since it helps to improve the chance that one of the two - conflicting hosts may be able to retain its address. */ - - if (autoip->lastconflict > 0) { - /* retreat, there was a conflicting ARP in the last DEFEND_INTERVAL seconds */ - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_handle_arp_conflict(): we are defending, but in DEFEND_INTERVAL, retreating\n")); - - /* Active TCP sessions are aborted when removing the ip addresss */ - autoip_restart(netif); - } else { - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_handle_arp_conflict(): we are defend, send ARP Announce\n")); - autoip_arp_announce(netif); - autoip->lastconflict = DEFEND_INTERVAL * AUTOIP_TICKS_PER_SECOND; - } -} - -/** - * Create an IP-Address out of range 169.254.1.0 to 169.254.254.255 - * - * @param netif network interface on which create the IP-Address - * @param ipaddr ip address to initialize - */ -static void -autoip_create_addr(struct netif *netif, ip4_addr_t *ipaddr) -{ - struct autoip* autoip = netif_autoip_data(netif); - - /* Here we create an IP-Address out of range 169.254.1.0 to 169.254.254.255 - * compliant to RFC 3927 Section 2.1 - * We have 254 * 256 possibilities */ - - u32_t addr = lwip_ntohl(LWIP_AUTOIP_CREATE_SEED_ADDR(netif)); - addr += autoip->tried_llipaddr; - addr = AUTOIP_NET | (addr & 0xffff); - /* Now, 169.254.0.0 <= addr <= 169.254.255.255 */ - - if (addr < AUTOIP_RANGE_START) { - addr += AUTOIP_RANGE_END - AUTOIP_RANGE_START + 1; - } - if (addr > AUTOIP_RANGE_END) { - addr -= AUTOIP_RANGE_END - AUTOIP_RANGE_START + 1; - } - LWIP_ASSERT("AUTOIP address not in range", (addr >= AUTOIP_RANGE_START) && - (addr <= AUTOIP_RANGE_END)); - ip4_addr_set_u32(ipaddr, lwip_htonl(addr)); - - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_create_addr(): tried_llipaddr=%"U16_F", %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - (u16_t)(autoip->tried_llipaddr), ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), - ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); -} - -/** - * Sends an ARP probe from a network interface - * - * @param netif network interface used to send the probe - */ -static err_t -autoip_arp_probe(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - /* this works because netif->ip_addr is ANY */ - return etharp_request(netif, &autoip->llipaddr); -} - -/** - * Sends an ARP announce from a network interface - * - * @param netif network interface used to send the announce - */ -static err_t -autoip_arp_announce(struct netif *netif) -{ - return etharp_gratuitous(netif); -} - -/** - * Configure interface for use with current LL IP-Address - * - * @param netif network interface to configure with current LL IP-Address - */ -static err_t -autoip_bind(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - ip4_addr_t sn_mask, gw_addr; - - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_bind(netif=%p) %c%c%"U16_F" %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num, - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); - - IP4_ADDR(&sn_mask, 255, 255, 0, 0); - IP4_ADDR(&gw_addr, 0, 0, 0, 0); - - netif_set_addr(netif, &autoip->llipaddr, &sn_mask, &gw_addr); - /* interface is used by routing now that an address is set */ - - return ERR_OK; -} - -/** - * @ingroup autoip - * Start AutoIP client - * - * @param netif network interface on which start the AutoIP client - */ -err_t -autoip_start(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - err_t result = ERR_OK; - - LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); - - /* Set IP-Address, Netmask and Gateway to 0 to make sure that - * ARP Packets are formed correctly - */ - netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); - - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], - netif->name[1], (u16_t)netif->num)); - if (autoip == NULL) { - /* no AutoIP client attached yet? */ - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_start(): starting new AUTOIP client\n")); - autoip = (struct autoip *)mem_malloc(sizeof(struct autoip)); - if (autoip == NULL) { - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_start(): could not allocate autoip\n")); - return ERR_MEM; - } - memset(autoip, 0, sizeof(struct autoip)); - /* store this AutoIP client in the netif */ - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, autoip); - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_start(): allocated autoip")); - } else { - autoip->state = AUTOIP_STATE_OFF; - autoip->ttw = 0; - autoip->sent_num = 0; - ip4_addr_set_zero(&autoip->llipaddr); - autoip->lastconflict = 0; - } - - autoip_create_addr(netif, &(autoip->llipaddr)); - autoip_start_probing(netif); - - return result; -} - -static void -autoip_start_probing(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - - autoip->state = AUTOIP_STATE_PROBING; - autoip->sent_num = 0; - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_start_probing(): changing state to PROBING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); - - /* time to wait to first probe, this is randomly - * chosen out of 0 to PROBE_WAIT seconds. - * compliant to RFC 3927 Section 2.2.1 - */ - autoip->ttw = (u16_t)(LWIP_AUTOIP_RAND(netif) % (PROBE_WAIT * AUTOIP_TICKS_PER_SECOND)); - - /* - * if we tried more then MAX_CONFLICTS we must limit our rate for - * acquiring and probing address - * compliant to RFC 3927 Section 2.2.1 - */ - if (autoip->tried_llipaddr > MAX_CONFLICTS) { - autoip->ttw = RATE_LIMIT_INTERVAL * AUTOIP_TICKS_PER_SECOND; - } -} - -/** - * Handle a possible change in the network configuration. - * - * If there is an AutoIP address configured, take the interface down - * and begin probing with the same address. - */ -void -autoip_network_changed(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - - if (autoip && (autoip->state != AUTOIP_STATE_OFF)) { - autoip_start_probing(netif); - } -} - -/** - * @ingroup autoip - * Stop AutoIP client - * - * @param netif network interface on which stop the AutoIP client - */ -err_t -autoip_stop(struct netif *netif) -{ - struct autoip* autoip = netif_autoip_data(netif); - - if (autoip != NULL) { - autoip->state = AUTOIP_STATE_OFF; - if (ip4_addr_islinklocal(netif_ip4_addr(netif))) { - netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); - } - } - return ERR_OK; -} - -/** - * Has to be called in loop every AUTOIP_TMR_INTERVAL milliseconds - */ -void -autoip_tmr(void) -{ - struct netif *netif = netif_list; - /* loop through netif's */ - while (netif != NULL) { - struct autoip* autoip = netif_autoip_data(netif); - /* only act on AutoIP configured interfaces */ - if (autoip != NULL) { - if (autoip->lastconflict > 0) { - autoip->lastconflict--; - } - - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, - ("autoip_tmr() AutoIP-State: %"U16_F", ttw=%"U16_F"\n", - (u16_t)(autoip->state), autoip->ttw)); - - if (autoip->ttw > 0) { - autoip->ttw--; - } - - switch(autoip->state) { - case AUTOIP_STATE_PROBING: - if (autoip->ttw == 0) { - if (autoip->sent_num >= PROBE_NUM) { - /* Switch to ANNOUNCING: now we can bind to an IP address and use it */ - autoip->state = AUTOIP_STATE_ANNOUNCING; - autoip_bind(netif); - /* autoip_bind() calls netif_set_addr(): this triggers a gratuitous ARP - which counts as an announcement */ - autoip->sent_num = 1; - autoip->ttw = ANNOUNCE_WAIT * AUTOIP_TICKS_PER_SECOND; - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_tmr(): changing state to ANNOUNCING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); - } else { - autoip_arp_probe(netif); - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_tmr() PROBING Sent Probe\n")); - autoip->sent_num++; - if (autoip->sent_num == PROBE_NUM) { - /* calculate time to wait to for announce */ - autoip->ttw = ANNOUNCE_WAIT * AUTOIP_TICKS_PER_SECOND; - } else { - /* calculate time to wait to next probe */ - autoip->ttw = (u16_t)((LWIP_AUTOIP_RAND(netif) % - ((PROBE_MAX - PROBE_MIN) * AUTOIP_TICKS_PER_SECOND) ) + - PROBE_MIN * AUTOIP_TICKS_PER_SECOND); - } - } - } - break; - - case AUTOIP_STATE_ANNOUNCING: - if (autoip->ttw == 0) { - autoip_arp_announce(netif); - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_tmr() ANNOUNCING Sent Announce\n")); - autoip->ttw = ANNOUNCE_INTERVAL * AUTOIP_TICKS_PER_SECOND; - autoip->sent_num++; - - if (autoip->sent_num >= ANNOUNCE_NUM) { - autoip->state = AUTOIP_STATE_BOUND; - autoip->sent_num = 0; - autoip->ttw = 0; - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("autoip_tmr(): changing state to BOUND: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), - ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); - } - } - break; - - default: - /* nothing to do in other states */ - break; - } - } - /* proceed to next network interface */ - netif = netif->next; - } -} - -/** - * Handles every incoming ARP Packet, called by etharp_input(). - * - * @param netif network interface to use for autoip processing - * @param hdr Incoming ARP packet - */ -void -autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr) -{ - struct autoip* autoip = netif_autoip_data(netif); - - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_arp_reply()\n")); - if ((autoip != NULL) && (autoip->state != AUTOIP_STATE_OFF)) { - /* when ip.src == llipaddr && hw.src != netif->hwaddr - * - * when probing ip.dst == llipaddr && hw.src != netif->hwaddr - * we have a conflict and must solve it - */ - ip4_addr_t sipaddr, dipaddr; - struct eth_addr netifaddr; - ETHADDR16_COPY(netifaddr.addr, netif->hwaddr); - - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without - * structure packing (not using structure copy which breaks strict-aliasing rules). - */ - IPADDR2_COPY(&sipaddr, &hdr->sipaddr); - IPADDR2_COPY(&dipaddr, &hdr->dipaddr); - - if (autoip->state == AUTOIP_STATE_PROBING) { - /* RFC 3927 Section 2.2.1: - * from beginning to after ANNOUNCE_WAIT - * seconds we have a conflict if - * ip.src == llipaddr OR - * ip.dst == llipaddr && hw.src != own hwaddr - */ - if ((ip4_addr_cmp(&sipaddr, &autoip->llipaddr)) || - (ip4_addr_isany_val(sipaddr) && - ip4_addr_cmp(&dipaddr, &autoip->llipaddr) && - !eth_addr_cmp(&netifaddr, &hdr->shwaddr))) { - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, - ("autoip_arp_reply(): Probe Conflict detected\n")); - autoip_restart(netif); - } - } else { - /* RFC 3927 Section 2.5: - * in any state we have a conflict if - * ip.src == llipaddr && hw.src != own hwaddr - */ - if (ip4_addr_cmp(&sipaddr, &autoip->llipaddr) && - !eth_addr_cmp(&netifaddr, &hdr->shwaddr)) { - LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, - ("autoip_arp_reply(): Conflicting ARP-Packet detected\n")); - autoip_handle_arp_conflict(netif); - } - } - } -} - -/** check if AutoIP supplied netif->ip_addr - * - * @param netif the netif to check - * @return 1 if AutoIP supplied netif->ip_addr (state BOUND or ANNOUNCING), - * 0 otherwise - */ -u8_t -autoip_supplied_address(const struct netif *netif) -{ - if ((netif != NULL) && (netif_autoip_data(netif) != NULL)) { - struct autoip* autoip = netif_autoip_data(netif); - return (autoip->state == AUTOIP_STATE_BOUND) || (autoip->state == AUTOIP_STATE_ANNOUNCING); - } - return 0; -} - -u8_t -autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr) -{ - struct autoip* autoip = netif_autoip_data(netif); - return (autoip != NULL) && ip4_addr_cmp(addr, &(autoip->llipaddr)); -} - -#endif /* LWIP_IPV4 && LWIP_AUTOIP */ +/** + * @file + * AutoIP Automatic LinkLocal IP Configuration + * + * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform + * with RFC 3927. + * + * @defgroup autoip AUTOIP + * @ingroup ip4 + * AUTOIP related functions + * USAGE: + * + * define @ref LWIP_AUTOIP 1 in your lwipopts.h + * Options: + * AUTOIP_TMR_INTERVAL msecs, + * I recommend a value of 100. The value must divide 1000 with a remainder almost 0. + * Possible values are 1000, 500, 333, 250, 200, 166, 142, 125, 111, 100 .... + * + * Without DHCP: + * - Call autoip_start() after netif_add(). + * + * With DHCP: + * - define @ref LWIP_DHCP_AUTOIP_COOP 1 in your lwipopts.h. + * - Configure your DHCP Client. + * + * @see netifapi_autoip + */ + +/* + * + * Copyright (c) 2007 Dominik Spies + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * Author: Dominik Spies + */ + +#include "lwip/opt.h" + +#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/mem.h" +/* #include "lwip/udp.h" */ +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/autoip.h" +#include "lwip/etharp.h" +#include "lwip/prot/autoip.h" + +#include + +/** Pseudo random macro based on netif informations. + * You could use "rand()" from the C Library if you define LWIP_AUTOIP_RAND in lwipopts.h */ +#ifndef LWIP_AUTOIP_RAND +#define LWIP_AUTOIP_RAND(netif) ( (((u32_t)((netif->hwaddr[5]) & 0xff) << 24) | \ + ((u32_t)((netif->hwaddr[3]) & 0xff) << 16) | \ + ((u32_t)((netif->hwaddr[2]) & 0xff) << 8) | \ + ((u32_t)((netif->hwaddr[4]) & 0xff))) + \ + (netif_autoip_data(netif)? netif_autoip_data(netif)->tried_llipaddr : 0)) +#endif /* LWIP_AUTOIP_RAND */ + +/** + * Macro that generates the initial IP address to be tried by AUTOIP. + * If you want to override this, define it to something else in lwipopts.h. + */ +#ifndef LWIP_AUTOIP_CREATE_SEED_ADDR +#define LWIP_AUTOIP_CREATE_SEED_ADDR(netif) \ + lwip_htonl(AUTOIP_RANGE_START + ((u32_t)(((u8_t)(netif->hwaddr[4])) | \ + ((u32_t)((u8_t)(netif->hwaddr[5]))) << 8))) +#endif /* LWIP_AUTOIP_CREATE_SEED_ADDR */ + +/* static functions */ +static err_t autoip_arp_announce(struct netif *netif); +static void autoip_start_probing(struct netif *netif); + +/** + * @ingroup autoip + * Set a statically allocated struct autoip to work with. + * Using this prevents autoip_start to allocate it using mem_malloc. + * + * @param netif the netif for which to set the struct autoip + * @param autoip (uninitialised) autoip struct allocated by the application + */ +void +autoip_set_struct(struct netif *netif, struct autoip *autoip) +{ + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("autoip != NULL", autoip != NULL); + LWIP_ASSERT("netif already has a struct autoip set", + netif_autoip_data(netif) == NULL); + + /* clear data structure */ + memset(autoip, 0, sizeof(struct autoip)); + /* autoip->state = AUTOIP_STATE_OFF; */ + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, autoip); +} + +/** Restart AutoIP client and check the next address (conflict detected) + * + * @param netif The netif under AutoIP control + */ +static void +autoip_restart(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + autoip->tried_llipaddr++; + autoip_start(netif); +} + +/** + * Handle a IP address conflict after an ARP conflict detection + */ +static void +autoip_handle_arp_conflict(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + + /* RFC3927, 2.5 "Conflict Detection and Defense" allows two options where + a) means retreat on the first conflict and + b) allows to keep an already configured address when having only one + conflict in 10 seconds + We use option b) since it helps to improve the chance that one of the two + conflicting hosts may be able to retain its address. */ + + if (autoip->lastconflict > 0) { + /* retreat, there was a conflicting ARP in the last DEFEND_INTERVAL seconds */ + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_handle_arp_conflict(): we are defending, but in DEFEND_INTERVAL, retreating\n")); + + /* Active TCP sessions are aborted when removing the ip addresss */ + autoip_restart(netif); + } else { + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_handle_arp_conflict(): we are defend, send ARP Announce\n")); + autoip_arp_announce(netif); + autoip->lastconflict = DEFEND_INTERVAL * AUTOIP_TICKS_PER_SECOND; + } +} + +/** + * Create an IP-Address out of range 169.254.1.0 to 169.254.254.255 + * + * @param netif network interface on which create the IP-Address + * @param ipaddr ip address to initialize + */ +static void +autoip_create_addr(struct netif *netif, ip4_addr_t *ipaddr) +{ + struct autoip* autoip = netif_autoip_data(netif); + + /* Here we create an IP-Address out of range 169.254.1.0 to 169.254.254.255 + * compliant to RFC 3927 Section 2.1 + * We have 254 * 256 possibilities */ + + u32_t addr = lwip_ntohl(LWIP_AUTOIP_CREATE_SEED_ADDR(netif)); + addr += autoip->tried_llipaddr; + addr = AUTOIP_NET | (addr & 0xffff); + /* Now, 169.254.0.0 <= addr <= 169.254.255.255 */ + + if (addr < AUTOIP_RANGE_START) { + addr += AUTOIP_RANGE_END - AUTOIP_RANGE_START + 1; + } + if (addr > AUTOIP_RANGE_END) { + addr -= AUTOIP_RANGE_END - AUTOIP_RANGE_START + 1; + } + LWIP_ASSERT("AUTOIP address not in range", (addr >= AUTOIP_RANGE_START) && + (addr <= AUTOIP_RANGE_END)); + ip4_addr_set_u32(ipaddr, lwip_htonl(addr)); + + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_create_addr(): tried_llipaddr=%"U16_F", %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + (u16_t)(autoip->tried_llipaddr), ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), + ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); +} + +/** + * Sends an ARP probe from a network interface + * + * @param netif network interface used to send the probe + */ +static err_t +autoip_arp_probe(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + /* this works because netif->ip_addr is ANY */ + return etharp_request(netif, &autoip->llipaddr); +} + +/** + * Sends an ARP announce from a network interface + * + * @param netif network interface used to send the announce + */ +static err_t +autoip_arp_announce(struct netif *netif) +{ + return etharp_gratuitous(netif); +} + +/** + * Configure interface for use with current LL IP-Address + * + * @param netif network interface to configure with current LL IP-Address + */ +static err_t +autoip_bind(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + ip4_addr_t sn_mask, gw_addr; + + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, + ("autoip_bind(netif=%p) %c%c%"U16_F" %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num, + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + + IP4_ADDR(&sn_mask, 255, 255, 0, 0); + IP4_ADDR(&gw_addr, 0, 0, 0, 0); + + netif_set_addr(netif, &autoip->llipaddr, &sn_mask, &gw_addr); + /* interface is used by routing now that an address is set */ + + return ERR_OK; +} + +/** + * @ingroup autoip + * Start AutoIP client + * + * @param netif network interface on which start the AutoIP client + */ +err_t +autoip_start(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + err_t result = ERR_OK; + + LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); + + /* Set IP-Address, Netmask and Gateway to 0 to make sure that + * ARP Packets are formed correctly + */ + netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); + + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], + netif->name[1], (u16_t)netif->num)); + if (autoip == NULL) { + /* no AutoIP client attached yet? */ + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, + ("autoip_start(): starting new AUTOIP client\n")); + autoip = (struct autoip *)mem_malloc(sizeof(struct autoip)); + if (autoip == NULL) { + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, + ("autoip_start(): could not allocate autoip\n")); + return ERR_MEM; + } + memset(autoip, 0, sizeof(struct autoip)); + /* store this AutoIP client in the netif */ + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, autoip); + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_start(): allocated autoip")); + } else { + autoip->state = AUTOIP_STATE_OFF; + autoip->ttw = 0; + autoip->sent_num = 0; + ip4_addr_set_zero(&autoip->llipaddr); + autoip->lastconflict = 0; + } + + autoip_create_addr(netif, &(autoip->llipaddr)); + autoip_start_probing(netif); + + return result; +} + +static void +autoip_start_probing(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + + autoip->state = AUTOIP_STATE_PROBING; + autoip->sent_num = 0; + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_start_probing(): changing state to PROBING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + + /* time to wait to first probe, this is randomly + * chosen out of 0 to PROBE_WAIT seconds. + * compliant to RFC 3927 Section 2.2.1 + */ + autoip->ttw = (u16_t)(LWIP_AUTOIP_RAND(netif) % (PROBE_WAIT * AUTOIP_TICKS_PER_SECOND)); + + /* + * if we tried more then MAX_CONFLICTS we must limit our rate for + * acquiring and probing address + * compliant to RFC 3927 Section 2.2.1 + */ + if (autoip->tried_llipaddr > MAX_CONFLICTS) { + autoip->ttw = RATE_LIMIT_INTERVAL * AUTOIP_TICKS_PER_SECOND; + } +} + +/** + * Handle a possible change in the network configuration. + * + * If there is an AutoIP address configured, take the interface down + * and begin probing with the same address. + */ +void +autoip_network_changed(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + + if (autoip && (autoip->state != AUTOIP_STATE_OFF)) { + autoip_start_probing(netif); + } +} + +/** + * @ingroup autoip + * Stop AutoIP client + * + * @param netif network interface on which stop the AutoIP client + */ +err_t +autoip_stop(struct netif *netif) +{ + struct autoip* autoip = netif_autoip_data(netif); + + if (autoip != NULL) { + autoip->state = AUTOIP_STATE_OFF; + if (ip4_addr_islinklocal(netif_ip4_addr(netif))) { + netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); + } + } + return ERR_OK; +} + +/** + * Has to be called in loop every AUTOIP_TMR_INTERVAL milliseconds + */ +void +autoip_tmr(void) +{ + struct netif *netif = netif_list; + /* loop through netif's */ + while (netif != NULL) { + struct autoip* autoip = netif_autoip_data(netif); + /* only act on AutoIP configured interfaces */ + if (autoip != NULL) { + if (autoip->lastconflict > 0) { + autoip->lastconflict--; + } + + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, + ("autoip_tmr() AutoIP-State: %"U16_F", ttw=%"U16_F"\n", + (u16_t)(autoip->state), autoip->ttw)); + + if (autoip->ttw > 0) { + autoip->ttw--; + } + + switch(autoip->state) { + case AUTOIP_STATE_PROBING: + if (autoip->ttw == 0) { + if (autoip->sent_num >= PROBE_NUM) { + /* Switch to ANNOUNCING: now we can bind to an IP address and use it */ + autoip->state = AUTOIP_STATE_ANNOUNCING; + autoip_bind(netif); + /* autoip_bind() calls netif_set_addr(): this triggers a gratuitous ARP + which counts as an announcement */ + autoip->sent_num = 1; + autoip->ttw = ANNOUNCE_WAIT * AUTOIP_TICKS_PER_SECOND; + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_tmr(): changing state to ANNOUNCING: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + } else { + autoip_arp_probe(netif); + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_tmr() PROBING Sent Probe\n")); + autoip->sent_num++; + if (autoip->sent_num == PROBE_NUM) { + /* calculate time to wait to for announce */ + autoip->ttw = ANNOUNCE_WAIT * AUTOIP_TICKS_PER_SECOND; + } else { + /* calculate time to wait to next probe */ + autoip->ttw = (u16_t)((LWIP_AUTOIP_RAND(netif) % + ((PROBE_MAX - PROBE_MIN) * AUTOIP_TICKS_PER_SECOND) ) + + PROBE_MIN * AUTOIP_TICKS_PER_SECOND); + } + } + } + break; + + case AUTOIP_STATE_ANNOUNCING: + if (autoip->ttw == 0) { + autoip_arp_announce(netif); + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_tmr() ANNOUNCING Sent Announce\n")); + autoip->ttw = ANNOUNCE_INTERVAL * AUTOIP_TICKS_PER_SECOND; + autoip->sent_num++; + + if (autoip->sent_num >= ANNOUNCE_NUM) { + autoip->state = AUTOIP_STATE_BOUND; + autoip->sent_num = 0; + autoip->ttw = 0; + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("autoip_tmr(): changing state to BOUND: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(&autoip->llipaddr), ip4_addr2_16(&autoip->llipaddr), + ip4_addr3_16(&autoip->llipaddr), ip4_addr4_16(&autoip->llipaddr))); + } + } + break; + + default: + /* nothing to do in other states */ + break; + } + } + /* proceed to next network interface */ + netif = netif->next; + } +} + +/** + * Handles every incoming ARP Packet, called by etharp_input(). + * + * @param netif network interface to use for autoip processing + * @param hdr Incoming ARP packet + */ +void +autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr) +{ + struct autoip* autoip = netif_autoip_data(netif); + + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_arp_reply()\n")); + if ((autoip != NULL) && (autoip->state != AUTOIP_STATE_OFF)) { + /* when ip.src == llipaddr && hw.src != netif->hwaddr + * + * when probing ip.dst == llipaddr && hw.src != netif->hwaddr + * we have a conflict and must solve it + */ + ip4_addr_t sipaddr, dipaddr; + struct eth_addr netifaddr; + ETHADDR16_COPY(netifaddr.addr, netif->hwaddr); + + /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + * structure packing (not using structure copy which breaks strict-aliasing rules). + */ + IPADDR2_COPY(&sipaddr, &hdr->sipaddr); + IPADDR2_COPY(&dipaddr, &hdr->dipaddr); + + if (autoip->state == AUTOIP_STATE_PROBING) { + /* RFC 3927 Section 2.2.1: + * from beginning to after ANNOUNCE_WAIT + * seconds we have a conflict if + * ip.src == llipaddr OR + * ip.dst == llipaddr && hw.src != own hwaddr + */ + if ((ip4_addr_cmp(&sipaddr, &autoip->llipaddr)) || + (ip4_addr_isany_val(sipaddr) && + ip4_addr_cmp(&dipaddr, &autoip->llipaddr) && + !eth_addr_cmp(&netifaddr, &hdr->shwaddr))) { + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, + ("autoip_arp_reply(): Probe Conflict detected\n")); + autoip_restart(netif); + } + } else { + /* RFC 3927 Section 2.5: + * in any state we have a conflict if + * ip.src == llipaddr && hw.src != own hwaddr + */ + if (ip4_addr_cmp(&sipaddr, &autoip->llipaddr) && + !eth_addr_cmp(&netifaddr, &hdr->shwaddr)) { + LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, + ("autoip_arp_reply(): Conflicting ARP-Packet detected\n")); + autoip_handle_arp_conflict(netif); + } + } + } +} + +/** check if AutoIP supplied netif->ip_addr + * + * @param netif the netif to check + * @return 1 if AutoIP supplied netif->ip_addr (state BOUND or ANNOUNCING), + * 0 otherwise + */ +u8_t +autoip_supplied_address(const struct netif *netif) +{ + if ((netif != NULL) && (netif_autoip_data(netif) != NULL)) { + struct autoip* autoip = netif_autoip_data(netif); + return (autoip->state == AUTOIP_STATE_BOUND) || (autoip->state == AUTOIP_STATE_ANNOUNCING); + } + return 0; +} + +u8_t +autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr) +{ + struct autoip* autoip = netif_autoip_data(netif); + return (autoip != NULL) && ip4_addr_cmp(addr, &(autoip->llipaddr)); +} + +#endif /* LWIP_IPV4 && LWIP_AUTOIP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c index 0cf97b0..74f6b58 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c @@ -1,1951 +1,1951 @@ -/** - * @file - * Dynamic Host Configuration Protocol client - * - * @defgroup dhcp4 DHCPv4 - * @ingroup ip4 - * DHCP (IPv4) related functions - * This is a DHCP client for the lwIP TCP/IP stack. It aims to conform - * with RFC 2131 and RFC 2132. - * - * @todo: - * - Support for interfaces other than Ethernet (SLIP, PPP, ...) - * - * Options: - * @ref DHCP_COARSE_TIMER_SECS (recommended 60 which is a minute) - * @ref DHCP_FINE_TIMER_MSECS (recommended 500 which equals TCP coarse timer) - * - * dhcp_start() starts a DHCP client instance which - * configures the interface by obtaining an IP address lease and maintaining it. - * - * Use dhcp_release() to end the lease and use dhcp_stop() - * to remove the DHCP client. - * - * @see netifapi_dhcp4 - */ - -/* - * Copyright (c) 2001-2004 Leon Woestenberg - * Copyright (c) 2001-2004 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * The Swedish Institute of Computer Science and Adam Dunkels - * are specifically granted permission to redistribute this - * source code. - * - * Author: Leon Woestenberg - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV4 && LWIP_DHCP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/stats.h" -#include "lwip/mem.h" -#include "lwip/udp.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/def.h" -#include "lwip/dhcp.h" -#include "lwip/autoip.h" -#include "lwip/dns.h" -#include "lwip/etharp.h" -#include "lwip/prot/dhcp.h" - -#include - -/** DHCP_CREATE_RAND_XID: if this is set to 1, the xid is created using - * LWIP_RAND() (this overrides DHCP_GLOBAL_XID) - */ -#ifndef DHCP_CREATE_RAND_XID -#define DHCP_CREATE_RAND_XID 1 -#endif - -/** Default for DHCP_GLOBAL_XID is 0xABCD0000 - * This can be changed by defining DHCP_GLOBAL_XID and DHCP_GLOBAL_XID_HEADER, e.g. - * \#define DHCP_GLOBAL_XID_HEADER "stdlib.h" - * \#define DHCP_GLOBAL_XID rand() - */ -#ifdef DHCP_GLOBAL_XID_HEADER -#include DHCP_GLOBAL_XID_HEADER /* include optional starting XID generation prototypes */ -#endif - -/** DHCP_OPTION_MAX_MSG_SIZE is set to the MTU - * MTU is checked to be big enough in dhcp_start */ -#define DHCP_MAX_MSG_LEN(netif) (netif->mtu) -#define DHCP_MAX_MSG_LEN_MIN_REQUIRED 576 -/** Minimum length for reply before packet is parsed */ -#define DHCP_MIN_REPLY_LEN 44 - -#define REBOOT_TRIES 2 - -#if LWIP_DNS && LWIP_DHCP_MAX_DNS_SERVERS -#if DNS_MAX_SERVERS > LWIP_DHCP_MAX_DNS_SERVERS -#define LWIP_DHCP_PROVIDE_DNS_SERVERS LWIP_DHCP_MAX_DNS_SERVERS -#else -#define LWIP_DHCP_PROVIDE_DNS_SERVERS DNS_MAX_SERVERS -#endif -#else -#define LWIP_DHCP_PROVIDE_DNS_SERVERS 0 -#endif - -/** Option handling: options are parsed in dhcp_parse_reply - * and saved in an array where other functions can load them from. - * This might be moved into the struct dhcp (not necessarily since - * lwIP is single-threaded and the array is only used while in recv - * callback). */ -enum dhcp_option_idx { - DHCP_OPTION_IDX_OVERLOAD = 0, - DHCP_OPTION_IDX_MSG_TYPE, - DHCP_OPTION_IDX_SERVER_ID, - DHCP_OPTION_IDX_LEASE_TIME, - DHCP_OPTION_IDX_T1, - DHCP_OPTION_IDX_T2, - DHCP_OPTION_IDX_SUBNET_MASK, - DHCP_OPTION_IDX_ROUTER, -#if LWIP_DHCP_PROVIDE_DNS_SERVERS - DHCP_OPTION_IDX_DNS_SERVER, - DHCP_OPTION_IDX_DNS_SERVER_LAST = DHCP_OPTION_IDX_DNS_SERVER + LWIP_DHCP_PROVIDE_DNS_SERVERS - 1, -#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ -#if LWIP_DHCP_GET_NTP_SRV - DHCP_OPTION_IDX_NTP_SERVER, - DHCP_OPTION_IDX_NTP_SERVER_LAST = DHCP_OPTION_IDX_NTP_SERVER + LWIP_DHCP_MAX_NTP_SERVERS - 1, -#endif /* LWIP_DHCP_GET_NTP_SRV */ - DHCP_OPTION_IDX_MAX -}; - -/** Holds the decoded option values, only valid while in dhcp_recv. - @todo: move this into struct dhcp? */ -u32_t dhcp_rx_options_val[DHCP_OPTION_IDX_MAX]; -/** Holds a flag which option was received and is contained in dhcp_rx_options_val, - only valid while in dhcp_recv. - @todo: move this into struct dhcp? */ -u8_t dhcp_rx_options_given[DHCP_OPTION_IDX_MAX]; - -static u8_t dhcp_discover_request_options[] = { - DHCP_OPTION_SUBNET_MASK, - DHCP_OPTION_ROUTER, - DHCP_OPTION_BROADCAST -#if LWIP_DHCP_PROVIDE_DNS_SERVERS - , DHCP_OPTION_DNS_SERVER -#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ -#if LWIP_DHCP_GET_NTP_SRV - , DHCP_OPTION_NTP -#endif /* LWIP_DHCP_GET_NTP_SRV */ - }; - -#ifdef DHCP_GLOBAL_XID -static u32_t xid; -static u8_t xid_initialised; -#endif /* DHCP_GLOBAL_XID */ - -#define dhcp_option_given(dhcp, idx) (dhcp_rx_options_given[idx] != 0) -#define dhcp_got_option(dhcp, idx) (dhcp_rx_options_given[idx] = 1) -#define dhcp_clear_option(dhcp, idx) (dhcp_rx_options_given[idx] = 0) -#define dhcp_clear_all_options(dhcp) (memset(dhcp_rx_options_given, 0, sizeof(dhcp_rx_options_given))) -#define dhcp_get_option_value(dhcp, idx) (dhcp_rx_options_val[idx]) -#define dhcp_set_option_value(dhcp, idx, val) (dhcp_rx_options_val[idx] = (val)) - -static struct udp_pcb *dhcp_pcb; -static u8_t dhcp_pcb_refcount; - -/* DHCP client state machine functions */ -static err_t dhcp_discover(struct netif *netif); -static err_t dhcp_select(struct netif *netif); -static void dhcp_bind(struct netif *netif); -#if DHCP_DOES_ARP_CHECK -static err_t dhcp_decline(struct netif *netif); -#endif /* DHCP_DOES_ARP_CHECK */ -static err_t dhcp_rebind(struct netif *netif); -static err_t dhcp_reboot(struct netif *netif); -static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state); - -/* receive, unfold, parse and free incoming messages */ -static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); - -/* set the DHCP timers */ -static void dhcp_timeout(struct netif *netif); -static void dhcp_t1_timeout(struct netif *netif); -static void dhcp_t2_timeout(struct netif *netif); - -/* build outgoing messages */ -/* create a DHCP message, fill in common headers */ -static err_t dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type); -/* free a DHCP request */ -static void dhcp_delete_msg(struct dhcp *dhcp); -/* add a DHCP option (type, then length in bytes) */ -static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len); -/* add option values */ -static void dhcp_option_byte(struct dhcp *dhcp, u8_t value); -static void dhcp_option_short(struct dhcp *dhcp, u16_t value); -static void dhcp_option_long(struct dhcp *dhcp, u32_t value); -#if LWIP_NETIF_HOSTNAME -static void dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif); -#endif /* LWIP_NETIF_HOSTNAME */ -/* always add the DHCP options trailer to end and pad */ -static void dhcp_option_trailer(struct dhcp *dhcp); - -/** Ensure DHCP PCB is allocated and bound */ -static err_t -dhcp_inc_pcb_refcount(void) -{ - if (dhcp_pcb_refcount == 0) { - LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); - - /* allocate UDP PCB */ - dhcp_pcb = udp_new(); - - if (dhcp_pcb == NULL) { - return ERR_MEM; - } - - ip_set_option(dhcp_pcb, SOF_BROADCAST); - - /* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */ - udp_bind(dhcp_pcb, IP4_ADDR_ANY, DHCP_CLIENT_PORT); - udp_connect(dhcp_pcb, IP4_ADDR_ANY, DHCP_SERVER_PORT); - udp_recv(dhcp_pcb, dhcp_recv, NULL); - } - - dhcp_pcb_refcount++; - - return ERR_OK; -} - -/** Free DHCP PCB if the last netif stops using it */ -static void -dhcp_dec_pcb_refcount(void) -{ - LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); - dhcp_pcb_refcount--; - - if (dhcp_pcb_refcount == 0) { - udp_remove(dhcp_pcb); - dhcp_pcb = NULL; - } -} - -/** - * Back-off the DHCP client (because of a received NAK response). - * - * Back-off the DHCP client because of a received NAK. Receiving a - * NAK means the client asked for something non-sensible, for - * example when it tries to renew a lease obtained on another network. - * - * We clear any existing set IP address and restart DHCP negotiation - * afresh (as per RFC2131 3.2.3). - * - * @param netif the netif under DHCP control - */ -static void -dhcp_handle_nak(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - /* Change to a defined state - set this before assigning the address - to ensure the callback can use dhcp_supplied_address() */ - dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); - /* remove IP address from interface (must no longer be used, as per RFC2131) */ - netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); - /* We can immediately restart discovery */ - dhcp_discover(netif); -} - -#if DHCP_DOES_ARP_CHECK -/** - * Checks if the offered IP address is already in use. - * - * It does so by sending an ARP request for the offered address and - * entering CHECKING state. If no ARP reply is received within a small - * interval, the address is assumed to be free for use by us. - * - * @param netif the netif under DHCP control - */ -static void -dhcp_check(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result; - u16_t msecs; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0], - (s16_t)netif->name[1])); - dhcp_set_state(dhcp, DHCP_STATE_CHECKING); - /* create an ARP query for the offered IP address, expecting that no host - responds, as the IP address should not be in use. */ - result = etharp_query(netif, &dhcp->offered_ip_addr, NULL); - if (result != ERR_OK) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n")); - } - if (dhcp->tries < 255) { - dhcp->tries++; - } - msecs = 500; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs)); -} -#endif /* DHCP_DOES_ARP_CHECK */ - -/** - * Remember the configuration offered by a DHCP server. - * - * @param netif the netif under DHCP control - */ -static void -dhcp_handle_offer(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", - (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - /* obtain the server address */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { - ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", - ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); - /* remember offered address */ - ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", - ip4_addr_get_u32(&dhcp->offered_ip_addr))); - - dhcp_select(netif); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void*)netif)); - } -} - -/** - * Select a DHCP server offer out of all offers. - * - * Simply select the first offer received. - * - * @param netif the netif under DHCP control - * @return lwIP specific error (see error.h) - */ -static err_t -dhcp_select(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result; - u16_t msecs; - u8_t i; - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - dhcp_set_state(dhcp, DHCP_STATE_REQUESTING); - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - - /* MUST request the offered IP address */ - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - - dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - } - -#if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); -#endif /* LWIP_NETIF_HOSTNAME */ - - dhcp_option_trailer(dhcp); - /* shrink the pbuf to the actual content length */ - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - /* send broadcast to any DHCP server */ - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - dhcp_delete_msg(dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - dhcp->tries++; - } - msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); - return result; -} - -/** - * The DHCP timer that checks for lease renewal/rebind timeouts. - * Must be called once a minute (see @ref DHCP_COARSE_TIMER_SECS). - */ -void -dhcp_coarse_tmr(void) -{ - struct netif *netif = netif_list; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); - /* iterate through all network interfaces */ - while (netif != NULL) { - /* only act on DHCP configured interfaces */ - struct dhcp *dhcp = netif_dhcp_data(netif); - if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { - /* compare lease time to expire timeout */ - if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t0 timeout\n")); - /* this clients' lease time has expired */ - dhcp_release(netif); - dhcp_discover(netif); - /* timer is active (non zero), and triggers (zeroes) now? */ - } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n")); - /* this clients' rebind timeout triggered */ - dhcp_t2_timeout(netif); - /* timer is active (non zero), and triggers (zeroes) now */ - } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t1 timeout\n")); - /* this clients' renewal timeout triggered */ - dhcp_t1_timeout(netif); - } - } - /* proceed to next netif */ - netif = netif->next; - } -} - -/** - * DHCP transaction timeout handling (this function must be called every 500ms, - * see @ref DHCP_FINE_TIMER_MSECS). - * - * A DHCP server is expected to respond within a short period of time. - * This timer checks whether an outstanding DHCP request is timed out. - */ -void -dhcp_fine_tmr(void) -{ - struct netif *netif = netif_list; - /* loop through netif's */ - while (netif != NULL) { - struct dhcp *dhcp = netif_dhcp_data(netif); - /* only act on DHCP configured interfaces */ - if (dhcp != NULL) { - /* timer is active (non zero), and is about to trigger now */ - if (dhcp->request_timeout > 1) { - dhcp->request_timeout--; - } - else if (dhcp->request_timeout == 1) { - dhcp->request_timeout--; - /* { netif->dhcp->request_timeout == 0 } */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_fine_tmr(): request timeout\n")); - /* this client's request timeout triggered */ - dhcp_timeout(netif); - } - } - /* proceed to next network interface */ - netif = netif->next; - } -} - -/** - * A DHCP negotiation transaction, or ARP request, has timed out. - * - * The timer that was started with the DHCP or ARP request has - * timed out, indicating no response was received in time. - * - * @param netif the netif under DHCP control - */ -static void -dhcp_timeout(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); - /* back-off period has passed, or server selection timed out */ - if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); - dhcp_discover(netif); - /* receiving the requested lease timed out */ - } else if (dhcp->state == DHCP_STATE_REQUESTING) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); - if (dhcp->tries <= 5) { - dhcp_select(netif); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, releasing, restarting\n")); - dhcp_release(netif); - dhcp_discover(netif); - } -#if DHCP_DOES_ARP_CHECK - /* received no ARP reply for the offered address (which is good) */ - } else if (dhcp->state == DHCP_STATE_CHECKING) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); - if (dhcp->tries <= 1) { - dhcp_check(netif); - /* no ARP replies on the offered address, - looks like the IP address is indeed free */ - } else { - /* bind the interface to the offered address */ - dhcp_bind(netif); - } -#endif /* DHCP_DOES_ARP_CHECK */ - } else if (dhcp->state == DHCP_STATE_REBOOTING) { - if (dhcp->tries < REBOOT_TRIES) { - dhcp_reboot(netif); - } else { - dhcp_discover(netif); - } - } -} - -/** - * The renewal period has timed out. - * - * @param netif the netif under DHCP control - */ -static void -dhcp_t1_timeout(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_t1_timeout()\n")); - if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || - (dhcp->state == DHCP_STATE_RENEWING)) { - /* just retry to renew - note that the rebind timer (t2) will - * eventually time-out if renew tries fail. */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("dhcp_t1_timeout(): must renew\n")); - /* This slightly different to RFC2131: DHCPREQUEST will be sent from state - DHCP_STATE_RENEWING, not DHCP_STATE_BOUND */ - dhcp_renew(netif); - /* Calculate next timeout */ - if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) - { - dhcp->t1_renew_time = ((dhcp->t2_timeout - dhcp->lease_used) / 2); - } - } -} - -/** - * The rebind period has timed out. - * - * @param netif the netif under DHCP control - */ -static void -dhcp_t2_timeout(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout()\n")); - if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || - (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { - /* just retry to rebind */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, - ("dhcp_t2_timeout(): must rebind\n")); - /* This slightly different to RFC2131: DHCPREQUEST will be sent from state - DHCP_STATE_REBINDING, not DHCP_STATE_BOUND */ - dhcp_rebind(netif); - /* Calculate next timeout */ - if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) - { - dhcp->t2_rebind_time = ((dhcp->t0_timeout - dhcp->lease_used) / 2); - } - } -} - -/** - * Handle a DHCP ACK packet - * - * @param netif the netif under DHCP control - */ -static void -dhcp_handle_ack(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - -#if LWIP_DHCP_PROVIDE_DNS_SERVERS || LWIP_DHCP_GET_NTP_SRV - u8_t n; -#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS || LWIP_DHCP_GET_NTP_SRV */ -#if LWIP_DHCP_GET_NTP_SRV - ip4_addr_t ntp_server_addrs[LWIP_DHCP_MAX_NTP_SERVERS]; -#endif - - /* clear options we might not get from the ACK */ - ip4_addr_set_zero(&dhcp->offered_sn_mask); - ip4_addr_set_zero(&dhcp->offered_gw_addr); -#if LWIP_DHCP_BOOTP_FILE - ip4_addr_set_zero(&dhcp->offered_si_addr); -#endif /* LWIP_DHCP_BOOTP_FILE */ - - /* lease time given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { - /* remember offered lease time */ - dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); - } - /* renewal period given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { - /* remember given renewal period */ - dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); - } else { - /* calculate safe periods for renewal */ - dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; - } - - /* renewal period given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { - /* remember given rebind period */ - dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); - } else { - /* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/ - dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; - } - - /* (y)our internet address */ - ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); - -#if LWIP_DHCP_BOOTP_FILE - /* copy boot server address, - boot file name copied in dhcp_parse_reply if not overloaded */ - ip4_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); -#endif /* LWIP_DHCP_BOOTP_FILE */ - - /* subnet mask given? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { - /* remember given subnet mask */ - ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); - dhcp->subnet_mask_given = 1; - } else { - dhcp->subnet_mask_given = 0; - } - - /* gateway router */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { - ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); - } - -#if LWIP_DHCP_GET_NTP_SRV - /* NTP servers */ - for (n = 0; (n < LWIP_DHCP_MAX_NTP_SERVERS) && dhcp_option_given(dhcp, DHCP_OPTION_IDX_NTP_SERVER + n); n++) { - ip4_addr_set_u32(&ntp_server_addrs[n], lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_NTP_SERVER + n))); - } - dhcp_set_ntp_servers(n, ntp_server_addrs); -#endif /* LWIP_DHCP_GET_NTP_SRV */ - -#if LWIP_DHCP_PROVIDE_DNS_SERVERS - /* DNS servers */ - for (n = 0; (n < LWIP_DHCP_PROVIDE_DNS_SERVERS) && dhcp_option_given(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n); n++) { - ip_addr_t dns_addr; - ip_addr_set_ip4_u32(&dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n))); - dns_setserver(n, &dns_addr); - } -#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ -} - -/** - * @ingroup dhcp4 - * Set a statically allocated struct dhcp to work with. - * Using this prevents dhcp_start to allocate it using mem_malloc. - * - * @param netif the netif for which to set the struct dhcp - * @param dhcp (uninitialised) dhcp struct allocated by the application - */ -void -dhcp_set_struct(struct netif *netif, struct dhcp *dhcp) -{ - LWIP_ASSERT("netif != NULL", netif != NULL); - LWIP_ASSERT("dhcp != NULL", dhcp != NULL); - LWIP_ASSERT("netif already has a struct dhcp set", netif_dhcp_data(netif) == NULL); - - /* clear data structure */ - memset(dhcp, 0, sizeof(struct dhcp)); - /* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */ - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); -} - -/** - * @ingroup dhcp4 - * Removes a struct dhcp from a netif. - * - * ATTENTION: Only use this when not using dhcp_set_struct() to allocate the - * struct dhcp since the memory is passed back to the heap. - * - * @param netif the netif from which to remove the struct dhcp - */ -void dhcp_cleanup(struct netif *netif) -{ - LWIP_ASSERT("netif != NULL", netif != NULL); - - if (netif_dhcp_data(netif) != NULL) { - mem_free(netif_dhcp_data(netif)); - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL); - } -} - -/** - * @ingroup dhcp4 - * Start DHCP negotiation for a network interface. - * - * If no DHCP client instance was attached to this interface, - * a new client is created first. If a DHCP client instance - * was already present, it restarts negotiation. - * - * @param netif The lwIP network interface - * @return lwIP error code - * - ERR_OK - No error - * - ERR_MEM - Out of memory - */ -err_t -dhcp_start(struct netif *netif) -{ - struct dhcp *dhcp; - err_t result; - - LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); - LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); - dhcp = netif_dhcp_data(netif); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - - /* check MTU of the netif */ - if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); - return ERR_MEM; - } - - /* no DHCP client attached yet? */ - if (dhcp == NULL) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n")); - dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); - if (dhcp == NULL) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); - return ERR_MEM; - } - - /* store this dhcp client in the netif */ - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); - /* already has DHCP client attached */ - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n")); - LWIP_ASSERT("pbuf p_out wasn't freed", dhcp->p_out == NULL); - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL ); - - if (dhcp->pcb_allocated != 0) { - dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ - } - /* dhcp is cleared below, no need to reset flag*/ - } - - /* clear data structure */ - memset(dhcp, 0, sizeof(struct dhcp)); - /* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */ - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); - - if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ - return ERR_MEM; - } - dhcp->pcb_allocated = 1; - -#if LWIP_DHCP_CHECK_LINK_UP - if (!netif_is_link_up(netif)) { - /* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */ - dhcp_set_state(dhcp, DHCP_STATE_INIT); - return ERR_OK; - } -#endif /* LWIP_DHCP_CHECK_LINK_UP */ - - - /* (re)start the DHCP negotiation */ - result = dhcp_discover(netif); - if (result != ERR_OK) { - /* free resources allocated above */ - dhcp_stop(netif); - return ERR_MEM; - } - return result; -} - -/** - * @ingroup dhcp4 - * Inform a DHCP server of our manual configuration. - * - * This informs DHCP servers of our fixed IP address configuration - * by sending an INFORM message. It does not involve DHCP address - * configuration, it is just here to be nice to the network. - * - * @param netif The lwIP network interface - */ -void -dhcp_inform(struct netif *netif) -{ - struct dhcp dhcp; - err_t result = ERR_OK; - - LWIP_ERROR("netif != NULL", (netif != NULL), return;); - - if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ - return; - } - - memset(&dhcp, 0, sizeof(struct dhcp)); - dhcp_set_state(&dhcp, DHCP_STATE_INFORMING); - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, &dhcp, DHCP_INFORM); - if (result == ERR_OK) { - dhcp_option(&dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(&dhcp, DHCP_MAX_MSG_LEN(netif)); - - dhcp_option_trailer(&dhcp); - - pbuf_realloc(dhcp.p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp.options_out_len); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_inform: INFORMING\n")); - - udp_sendto_if(dhcp_pcb, dhcp.p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); - - dhcp_delete_msg(&dhcp); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_inform: could not allocate DHCP request\n")); - } - - dhcp_dec_pcb_refcount(); /* delete DHCP PCB if not needed any more */ -} - -/** Handle a possible change in the network configuration. - * - * This enters the REBOOTING state to verify that the currently bound - * address is still valid. - */ -void -dhcp_network_changed(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - - if (!dhcp) - return; - switch (dhcp->state) { - case DHCP_STATE_REBINDING: - case DHCP_STATE_RENEWING: - case DHCP_STATE_BOUND: - case DHCP_STATE_REBOOTING: - dhcp->tries = 0; - dhcp_reboot(netif); - break; - case DHCP_STATE_OFF: - /* stay off */ - break; - default: - /* INIT/REQUESTING/CHECKING/BACKING_OFF restart with new 'rid' because the - state changes, SELECTING: continue with current 'rid' as we stay in the - same state */ -#if LWIP_DHCP_AUTOIP_COOP - if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { - autoip_stop(netif); - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; - } -#endif /* LWIP_DHCP_AUTOIP_COOP */ - /* ensure we start with short timeouts, even if already discovering */ - dhcp->tries = 0; - dhcp_discover(netif); - break; - } -} - -#if DHCP_DOES_ARP_CHECK -/** - * Match an ARP reply with the offered IP address: - * check whether the offered IP address is not in use using ARP - * - * @param netif the network interface on which the reply was received - * @param addr The IP address we received a reply from - */ -void -dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr) -{ - struct dhcp *dhcp; - - LWIP_ERROR("netif != NULL", (netif != NULL), return;); - dhcp = netif_dhcp_data(netif); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n")); - /* is a DHCP client doing an ARP check? */ - if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n", - ip4_addr_get_u32(addr))); - /* did a host respond with the address we - were offered by the DHCP server? */ - if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) { - /* we will not accept the offered address */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, - ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); - dhcp_decline(netif); - } - } -} - -/** - * Decline an offered lease. - * - * Tell the DHCP server we do not accept the offered address. - * One reason to decline the lease is when we find out the address - * is already in use by another host (through ARP). - * - * @param netif the netif under DHCP control - */ -static err_t -dhcp_decline(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result = ERR_OK; - u16_t msecs; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n")); - dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - - dhcp_option_trailer(dhcp); - /* resize pbuf to reflect true size of options */ - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - /* per section 4.4.4, broadcast DECLINE messages */ - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - dhcp_delete_msg(dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_decline: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - dhcp->tries++; - } - msecs = 10*1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); - return result; -} -#endif /* DHCP_DOES_ARP_CHECK */ - - -/** - * Start the DHCP process, discover a DHCP server. - * - * @param netif the netif under DHCP control - */ -static err_t -dhcp_discover(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result = ERR_OK; - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); - ip4_addr_set_any(&dhcp->offered_ip_addr); - dhcp_set_state(dhcp, DHCP_STATE_SELECTING); - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); - if (result == ERR_OK) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n")); - - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - } - dhcp_option_trailer(dhcp); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: realloc()ing\n")); - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)\n")); - udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); - dhcp_delete_msg(dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - dhcp->tries++; - } -#if LWIP_DHCP_AUTOIP_COOP - if (dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; - autoip_start(netif); - } -#endif /* LWIP_DHCP_AUTOIP_COOP */ - msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs)); - return result; -} - - -/** - * Bind the interface to the offered IP address. - * - * @param netif network interface to bind to the offered address - */ -static void -dhcp_bind(struct netif *netif) -{ - u32_t timeout; - struct dhcp *dhcp; - ip4_addr_t sn_mask, gw_addr; - LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); - dhcp = netif_dhcp_data(netif); - LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); - - /* reset time used of lease */ - dhcp->lease_used = 0; - - if (dhcp->offered_t0_lease != 0xffffffffUL) { - /* set renewal period timer */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease)); - timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; - if (timeout > 0xffff) { - timeout = 0xffff; - } - dhcp->t0_timeout = (u16_t)timeout; - if (dhcp->t0_timeout == 0) { - dhcp->t0_timeout = 1; - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease*1000)); - } - - /* temporary DHCP lease? */ - if (dhcp->offered_t1_renew != 0xffffffffUL) { - /* set renewal period timer */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew)); - timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; - if (timeout > 0xffff) { - timeout = 0xffff; - } - dhcp->t1_timeout = (u16_t)timeout; - if (dhcp->t1_timeout == 0) { - dhcp->t1_timeout = 1; - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew*1000)); - dhcp->t1_renew_time = dhcp->t1_timeout; - } - /* set renewal period timer */ - if (dhcp->offered_t2_rebind != 0xffffffffUL) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind)); - timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; - if (timeout > 0xffff) { - timeout = 0xffff; - } - dhcp->t2_timeout = (u16_t)timeout; - if (dhcp->t2_timeout == 0) { - dhcp->t2_timeout = 1; - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind*1000)); - dhcp->t2_rebind_time = dhcp->t2_timeout; - } - - /* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */ - if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) { - dhcp->t1_timeout = 0; - } - - if (dhcp->subnet_mask_given) { - /* copy offered network mask */ - ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); - } else { - /* subnet mask not given, choose a safe subnet mask given the network class */ - u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); - if (first_octet <= 127) { - ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); - } else if (first_octet >= 192) { - ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); - } else { - ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); - } - } - - ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); - /* gateway address not given? */ - if (ip4_addr_isany_val(gw_addr)) { - /* copy network address */ - ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); - /* use first host address on network as gateway */ - ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL)); - } - -#if LWIP_DHCP_AUTOIP_COOP - if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { - autoip_stop(netif); - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; - } -#endif /* LWIP_DHCP_AUTOIP_COOP */ - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F" SN: 0x%08"X32_F" GW: 0x%08"X32_F"\n", - ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr))); - /* netif is now bound to DHCP leased address - set this before assigning the address - to ensure the callback can use dhcp_supplied_address() */ - dhcp_set_state(dhcp, DHCP_STATE_BOUND); - - netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); - /* interface is used by routing now that an address is set */ -} - -/** - * @ingroup dhcp4 - * Renew an existing DHCP lease at the involved DHCP server. - * - * @param netif network interface which must renew its lease - */ -err_t -dhcp_renew(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result; - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); - dhcp_set_state(dhcp, DHCP_STATE_RENEWING); - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - } - -#if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); -#endif /* LWIP_NETIF_HOSTNAME */ - - /* append DHCP message trailer */ - dhcp_option_trailer(dhcp); - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - udp_sendto_if(dhcp_pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - dhcp->tries++; - } - /* back-off on retries, but to a maximum of 20 seconds */ - msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs)); - return result; -} - -/** - * Rebind with a DHCP server for an existing DHCP lease. - * - * @param netif network interface which must rebind with a DHCP server - */ -static err_t -dhcp_rebind(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result; - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n")); - dhcp_set_state(dhcp, DHCP_STATE_REBINDING); - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - } - -#if LWIP_NETIF_HOSTNAME - dhcp_option_hostname(dhcp, netif); -#endif /* LWIP_NETIF_HOSTNAME */ - - dhcp_option_trailer(dhcp); - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - /* broadcast to server */ - udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - dhcp->tries++; - } - msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs)); - return result; -} - -/** - * Enter REBOOTING state to verify an existing lease - * - * @param netif network interface which must reboot - */ -static err_t -dhcp_reboot(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result; - u16_t msecs; - u8_t i; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); - dhcp_set_state(dhcp, DHCP_STATE_REBOOTING); - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); - dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN_MIN_REQUIRED); - - dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); - for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { - dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); - } - - dhcp_option_trailer(dhcp); - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - /* broadcast to server */ - udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); - } - if (dhcp->tries < 255) { - dhcp->tries++; - } - msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; - dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs)); - return result; -} - - -/** - * @ingroup dhcp4 - * Release a DHCP lease (usually called before @ref dhcp_stop). - * - * @param netif network interface which must release its lease - */ -err_t -dhcp_release(struct netif *netif) -{ - struct dhcp *dhcp = netif_dhcp_data(netif); - err_t result; - ip_addr_t server_ip_addr; - u8_t is_dhcp_supplied_address; - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n")); - if (dhcp == NULL) { - return ERR_ARG; - } - ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); - - is_dhcp_supplied_address = dhcp_supplied_address(netif); - - /* idle DHCP client */ - dhcp_set_state(dhcp, DHCP_STATE_OFF); - /* clean old DHCP offer */ - ip_addr_set_zero_ip4(&dhcp->server_ip_addr); - ip4_addr_set_zero(&dhcp->offered_ip_addr); - ip4_addr_set_zero(&dhcp->offered_sn_mask); - ip4_addr_set_zero(&dhcp->offered_gw_addr); -#if LWIP_DHCP_BOOTP_FILE - ip4_addr_set_zero(&dhcp->offered_si_addr); -#endif /* LWIP_DHCP_BOOTP_FILE */ - dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; - dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; - - if (!is_dhcp_supplied_address) { - /* don't issue release message when address is not dhcp-assigned */ - return ERR_OK; - } - - /* create and initialize the DHCP message header */ - result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); - if (result == ERR_OK) { - dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); - dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr)))); - - dhcp_option_trailer(dhcp); - - pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); - - udp_sendto_if(dhcp_pcb, dhcp->p_out, &server_ip_addr, DHCP_SERVER_PORT, netif); - dhcp_delete_msg(dhcp); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_STATE_OFF\n")); - } else { - /* sending release failed, but that's not a problem since the correct behaviour of dhcp does not rely on release */ - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); - } - /* remove IP address from interface (prevents routing from selecting this interface) */ - netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); - - return result; -} - -/** - * @ingroup dhcp4 - * Remove the DHCP client from the interface. - * - * @param netif The network interface to stop DHCP on - */ -void -dhcp_stop(struct netif *netif) -{ - struct dhcp *dhcp; - LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); - dhcp = netif_dhcp_data(netif); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); - /* netif is DHCP configured? */ - if (dhcp != NULL) { -#if LWIP_DHCP_AUTOIP_COOP - if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { - autoip_stop(netif); - dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; - } -#endif /* LWIP_DHCP_AUTOIP_COOP */ - - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); - dhcp_set_state(dhcp, DHCP_STATE_OFF); - - if (dhcp->pcb_allocated != 0) { - dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ - dhcp->pcb_allocated = 0; - } - } -} - -/* - * Set the DHCP state of a DHCP client. - * - * 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) { - dhcp->state = new_state; - dhcp->tries = 0; - dhcp->request_timeout = 0; - } -} - -/* - * Concatenate an option type and length field to the outgoing - * DHCP message. - * - */ -static void -dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) -{ - LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = option_type; - dhcp->msg_out->options[dhcp->options_out_len++] = option_len; -} -/* - * Concatenate a single byte to the outgoing DHCP message. - * - */ -static void -dhcp_option_byte(struct dhcp *dhcp, u8_t value) -{ - LWIP_ASSERT("dhcp_option_byte: dhcp->options_out_len < DHCP_OPTIONS_LEN", dhcp->options_out_len < DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = value; -} - -static void -dhcp_option_short(struct dhcp *dhcp, u16_t value) -{ - LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); -} - -static void -dhcp_option_long(struct dhcp *dhcp, u32_t value) -{ - LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); - dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); -} - -#if LWIP_NETIF_HOSTNAME -static void -dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif) -{ - if (netif->hostname != NULL) { - size_t namelen = strlen(netif->hostname); - if (namelen > 0) { - size_t len; - const char *p = netif->hostname; - /* Shrink len to available bytes (need 2 bytes for OPTION_HOSTNAME - and 1 byte for trailer) */ - size_t available = DHCP_OPTIONS_LEN - dhcp->options_out_len - 3; - LWIP_ASSERT("DHCP: hostname is too long!", namelen <= available); - len = LWIP_MIN(namelen, available); - LWIP_ASSERT("DHCP: hostname is too long!", len <= 0xFF); - dhcp_option(dhcp, DHCP_OPTION_HOSTNAME, (u8_t)len); - while (len--) { - dhcp_option_byte(dhcp, *p++); - } - } - } -} -#endif /* LWIP_NETIF_HOSTNAME */ - -/** - * Extract the DHCP message and the DHCP options. - * - * Extract the DHCP message and the DHCP options, each into a contiguous - * piece of memory. As a DHCP message is variable sized by its options, - * and also allows overriding some fields for options, the easy approach - * is to first unfold the options into a contiguous piece of memory, and - * use that further on. - * - */ -static err_t -dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) -{ - u8_t *options; - u16_t offset; - u16_t offset_max; - u16_t options_idx; - u16_t options_idx_max; - struct pbuf *q; - int parse_file_as_options = 0; - int parse_sname_as_options = 0; - - /* clear received options */ - dhcp_clear_all_options(dhcp); - /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ - if (p->len < DHCP_SNAME_OFS) { - return ERR_BUF; - } - dhcp->msg_in = (struct dhcp_msg *)p->payload; -#if LWIP_DHCP_BOOTP_FILE - /* clear boot file name */ - dhcp->boot_file_name[0] = 0; -#endif /* LWIP_DHCP_BOOTP_FILE */ - - /* parse options */ - - /* start with options field */ - options_idx = DHCP_OPTIONS_OFS; - /* parse options to the end of the received packet */ - options_idx_max = p->tot_len; -again: - q = p; - while ((q != NULL) && (options_idx >= q->len)) { - options_idx -= q->len; - options_idx_max -= q->len; - q = q->next; - } - if (q == NULL) { - return ERR_BUF; - } - offset = options_idx; - offset_max = options_idx_max; - options = (u8_t*)q->payload; - /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ - while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { - u8_t op = options[offset]; - u8_t len; - u8_t decode_len = 0; - int decode_idx = -1; - u16_t val_offset = offset + 2; - /* len byte might be in the next pbuf */ - if ((offset + 1) < q->len) { - len = options[offset + 1]; - } else { - len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); - } - /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ - decode_len = len; - switch(op) { - /* case(DHCP_OPTION_END): handled above */ - case(DHCP_OPTION_PAD): - /* special option: no len encoded */ - decode_len = len = 0; - /* will be increased below */ - offset--; - break; - case(DHCP_OPTION_SUBNET_MASK): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; - break; - case(DHCP_OPTION_ROUTER): - decode_len = 4; /* only copy the first given router */ - LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_ROUTER; - break; -#if LWIP_DHCP_PROVIDE_DNS_SERVERS - case(DHCP_OPTION_DNS_SERVER): - /* special case: there might be more than one server */ - LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;); - /* limit number of DNS servers */ - decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); - LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_DNS_SERVER; - break; -#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ - case(DHCP_OPTION_LEASE_TIME): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_LEASE_TIME; - break; -#if LWIP_DHCP_GET_NTP_SRV - case(DHCP_OPTION_NTP): - /* special case: there might be more than one server */ - LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;); - /* limit number of NTP servers */ - decode_len = LWIP_MIN(len, 4 * LWIP_DHCP_MAX_NTP_SERVERS); - LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_NTP_SERVER; - break; -#endif /* LWIP_DHCP_GET_NTP_SRV*/ - case(DHCP_OPTION_OVERLOAD): - LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); - /* decode overload only in options, not in file/sname: invalid packet */ - LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_OVERLOAD; - break; - case(DHCP_OPTION_MESSAGE_TYPE): - LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_MSG_TYPE; - break; - case(DHCP_OPTION_SERVER_ID): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_SERVER_ID; - break; - case(DHCP_OPTION_T1): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_T1; - break; - case(DHCP_OPTION_T2): - LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); - decode_idx = DHCP_OPTION_IDX_T2; - break; - default: - decode_len = 0; - LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", (u16_t)op)); - break; - } - offset += len + 2; - if (decode_len > 0) { - u32_t value = 0; - u16_t copy_len; -decode_next: - LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); - if (!dhcp_option_given(dhcp, decode_idx)) { - copy_len = LWIP_MIN(decode_len, 4); - if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { - return ERR_BUF; - } - if (decode_len > 4) { - /* decode more than one u32_t */ - LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); - dhcp_got_option(dhcp, decode_idx); - dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); - decode_len -= 4; - val_offset += 4; - decode_idx++; - goto decode_next; - } else if (decode_len == 4) { - value = lwip_ntohl(value); - } else { - LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); - value = ((u8_t*)&value)[0]; - } - dhcp_got_option(dhcp, decode_idx); - dhcp_set_option_value(dhcp, decode_idx, value); - } - } - if (offset >= q->len) { - offset -= q->len; - offset_max -= q->len; - if ((offset < offset_max) && offset_max) { - q = q->next; - LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); - options = (u8_t*)q->payload; - } else { - /* We've run out of bytes, probably no end marker. Don't proceed. */ - break; - } - } - } - /* is this an overloaded message? */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { - u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); - dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); - if (overload == DHCP_OVERLOAD_FILE) { - parse_file_as_options = 1; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); - } else if (overload == DHCP_OVERLOAD_SNAME) { - parse_sname_as_options = 1; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); - } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { - parse_sname_as_options = 1; - parse_file_as_options = 1; - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname and file field\n")); - } else { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("invalid overload option: %d\n", (int)overload)); - } -#if LWIP_DHCP_BOOTP_FILE - if (!parse_file_as_options) { - /* only do this for ACK messages */ - if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE) && - (dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE) == DHCP_ACK)) - /* copy bootp file name, don't care for sname (server hostname) */ - if (pbuf_copy_partial(p, dhcp->boot_file_name, DHCP_FILE_LEN-1, DHCP_FILE_OFS) != (DHCP_FILE_LEN-1)) { - return ERR_BUF; - } - /* make sure the string is really NULL-terminated */ - dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0; - } -#endif /* LWIP_DHCP_BOOTP_FILE */ - } - if (parse_file_as_options) { - /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ - parse_file_as_options = 0; - options_idx = DHCP_FILE_OFS; - options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; - goto again; - } else if (parse_sname_as_options) { - parse_sname_as_options = 0; - options_idx = DHCP_SNAME_OFS; - options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; - goto again; - } - return ERR_OK; -} - -/** - * If an incoming DHCP message is in response to us, then trigger the state machine - */ -static void -dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) -{ - struct netif *netif = ip_current_input_netif(); - struct dhcp *dhcp = netif_dhcp_data(netif); - struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; - u8_t msg_type; - u8_t i; - - LWIP_UNUSED_ARG(arg); - - /* Caught DHCP message from netif that does not have DHCP enabled? -> not interested */ - if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) { - goto free_pbuf_and_return; - } - - LWIP_ASSERT("invalid server address type", IP_IS_V4(addr)); - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_recv(pbuf = %p) from DHCP server %"U16_F".%"U16_F".%"U16_F".%"U16_F" port %"U16_F"\n", (void*)p, - ip4_addr1_16(ip_2_ip4(addr)), ip4_addr2_16(ip_2_ip4(addr)), ip4_addr3_16(ip_2_ip4(addr)), ip4_addr4_16(ip_2_ip4(addr)), port)); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->len = %"U16_F"\n", p->len)); - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->tot_len = %"U16_F"\n", p->tot_len)); - /* prevent warnings about unused arguments */ - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(addr); - LWIP_UNUSED_ARG(port); - - LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); - - if (p->len < DHCP_MIN_REPLY_LEN) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n")); - goto free_pbuf_and_return; - } - - if (reply_msg->op != DHCP_BOOTREPLY) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); - goto free_pbuf_and_return; - } - /* iterate through hardware address and match against DHCP message */ - for (i = 0; i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN && i < DHCP_CHADDR_LEN; i++) { - if (netif->hwaddr[i] != reply_msg->chaddr[i]) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("netif->hwaddr[%"U16_F"]==%02"X16_F" != reply_msg->chaddr[%"U16_F"]==%02"X16_F"\n", - (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); - goto free_pbuf_and_return; - } - } - /* match transaction ID against what we expected */ - if (lwip_ntohl(reply_msg->xid) != dhcp->xid) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n",lwip_ntohl(reply_msg->xid),dhcp->xid)); - goto free_pbuf_and_return; - } - /* option fields could be unfold? */ - if (dhcp_parse_reply(dhcp, p) != ERR_OK) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("problem unfolding DHCP message - too short on memory?\n")); - goto free_pbuf_and_return; - } - - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n")); - /* obtain pointer to DHCP message type */ - if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n")); - goto free_pbuf_and_return; - } - - /* read DHCP message type */ - msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); - /* message type is DHCP ACK? */ - if (msg_type == DHCP_ACK) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); - /* in requesting state? */ - if (dhcp->state == DHCP_STATE_REQUESTING) { - dhcp_handle_ack(netif); -#if DHCP_DOES_ARP_CHECK - if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { - /* check if the acknowledged lease address is already in use */ - dhcp_check(netif); - } else { - /* bind interface to the acknowledged lease address */ - dhcp_bind(netif); - } -#else - /* bind interface to the acknowledged lease address */ - dhcp_bind(netif); -#endif - } - /* already bound to the given lease address? */ - else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || - (dhcp->state == DHCP_STATE_RENEWING)) { - dhcp_handle_ack(netif); - dhcp_bind(netif); - } - } - /* received a DHCP_NAK in appropriate state? */ - else if ((msg_type == DHCP_NAK) && - ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || - (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); - dhcp_handle_nak(netif); - } - /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ - else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_STATE_SELECTING state\n")); - dhcp->request_timeout = 0; - /* remember offered lease */ - dhcp_handle_offer(netif); - } - -free_pbuf_and_return: - if (dhcp != NULL) { - dhcp->msg_in = NULL; - } - pbuf_free(p); -} - -/** - * Create a DHCP request, fill in common headers - * - * @param netif the netif under DHCP control - * @param dhcp dhcp control struct - * @param message_type message type of the request - */ -static err_t -dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) -{ - u16_t i; -#ifndef DHCP_GLOBAL_XID - /** default global transaction identifier starting value (easy to match - * with a packet analyser). We simply increment for each new request. - * Predefine DHCP_GLOBAL_XID to a better value or a function call to generate one - * at runtime, any supporting function prototypes can be defined in DHCP_GLOBAL_XID_HEADER */ -#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) - static u32_t xid; -#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ - static u32_t xid = 0xABCD0000; -#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ -#else - if (!xid_initialised) { - xid = DHCP_GLOBAL_XID; - xid_initialised = !xid_initialised; - } -#endif - LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); - LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); - LWIP_ASSERT("dhcp_create_msg: dhcp->p_out == NULL", dhcp->p_out == NULL); - LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); - dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); - if (dhcp->p_out == NULL) { - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, - ("dhcp_create_msg(): could not allocate pbuf\n")); - return ERR_MEM; - } - LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", - (dhcp->p_out->len >= sizeof(struct dhcp_msg))); - - /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ - if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { - /* reuse transaction identifier in retransmissions */ - if (dhcp->tries == 0) { -#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) - xid = LWIP_RAND(); -#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ - xid++; -#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ - } - dhcp->xid = xid; - } - LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, - ("transaction id xid(%"X32_F")\n", xid)); - - dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; - - dhcp->msg_out->op = DHCP_BOOTREQUEST; - /* @todo: make link layer independent */ - dhcp->msg_out->htype = DHCP_HTYPE_ETH; - dhcp->msg_out->hlen = netif->hwaddr_len; - dhcp->msg_out->hops = 0; - dhcp->msg_out->xid = lwip_htonl(dhcp->xid); - dhcp->msg_out->secs = 0; - /* we don't need the broadcast flag since we can receive unicast traffic - before being fully configured! */ - dhcp->msg_out->flags = 0; - ip4_addr_set_zero(&dhcp->msg_out->ciaddr); - /* 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) || - ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ - ((dhcp->state== DHCP_STATE_RENEWING) || dhcp->state== DHCP_STATE_REBINDING))) { - ip4_addr_copy(dhcp->msg_out->ciaddr, *netif_ip4_addr(netif)); - } - ip4_addr_set_zero(&dhcp->msg_out->yiaddr); - ip4_addr_set_zero(&dhcp->msg_out->siaddr); - ip4_addr_set_zero(&dhcp->msg_out->giaddr); - for (i = 0; i < DHCP_CHADDR_LEN; i++) { - /* copy netif hardware address, pad with zeroes */ - dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN) ? netif->hwaddr[i] : 0/* pad byte*/; - } - for (i = 0; i < DHCP_SNAME_LEN; i++) { - dhcp->msg_out->sname[i] = 0; - } - for (i = 0; i < DHCP_FILE_LEN; i++) { - dhcp->msg_out->file[i] = 0; - } - dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); - dhcp->options_out_len = 0; - /* fill options field with an incrementing array (for debugging purposes) */ - for (i = 0; i < DHCP_OPTIONS_LEN; i++) { - dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ - } - /* Add option MESSAGE_TYPE */ - dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); - dhcp_option_byte(dhcp, message_type); - return ERR_OK; -} - -/** - * Free previously allocated memory used to send a DHCP request. - * - * @param dhcp the dhcp struct to free the request from - */ -static void -dhcp_delete_msg(struct dhcp *dhcp) -{ - LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); - LWIP_ASSERT("dhcp_delete_msg: dhcp->p_out != NULL", dhcp->p_out != NULL); - LWIP_ASSERT("dhcp_delete_msg: dhcp->msg_out != NULL", dhcp->msg_out != NULL); - if (dhcp->p_out != NULL) { - pbuf_free(dhcp->p_out); - } - dhcp->p_out = NULL; - dhcp->msg_out = NULL; -} - -/** - * Add a DHCP message trailer - * - * Adds the END option to the DHCP message, and if - * necessary, up to three padding bytes. - * - * @param dhcp DHCP state structure - */ -static void -dhcp_option_trailer(struct dhcp *dhcp) -{ - LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); - LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); - LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); - dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; - /* packet is too small, or not 4 byte aligned? */ - while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && - (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { - /* add a fill/padding byte */ - dhcp->msg_out->options[dhcp->options_out_len++] = 0; - } -} - -/** check if DHCP supplied netif->ip_addr - * - * @param netif the netif to check - * @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), - * 0 otherwise - */ -u8_t -dhcp_supplied_address(const struct netif *netif) -{ - if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { - struct dhcp* dhcp = netif_dhcp_data(netif); - return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || - (dhcp->state == DHCP_STATE_REBINDING); - } - return 0; -} - -#endif /* LWIP_IPV4 && LWIP_DHCP */ +/** + * @file + * Dynamic Host Configuration Protocol client + * + * @defgroup dhcp4 DHCPv4 + * @ingroup ip4 + * DHCP (IPv4) related functions + * This is a DHCP client for the lwIP TCP/IP stack. It aims to conform + * with RFC 2131 and RFC 2132. + * + * @todo: + * - Support for interfaces other than Ethernet (SLIP, PPP, ...) + * + * Options: + * @ref DHCP_COARSE_TIMER_SECS (recommended 60 which is a minute) + * @ref DHCP_FINE_TIMER_MSECS (recommended 500 which equals TCP coarse timer) + * + * dhcp_start() starts a DHCP client instance which + * configures the interface by obtaining an IP address lease and maintaining it. + * + * Use dhcp_release() to end the lease and use dhcp_stop() + * to remove the DHCP client. + * + * @see netifapi_dhcp4 + */ + +/* + * Copyright (c) 2001-2004 Leon Woestenberg + * Copyright (c) 2001-2004 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * The Swedish Institute of Computer Science and Adam Dunkels + * are specifically granted permission to redistribute this + * source code. + * + * Author: Leon Woestenberg + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV4 && LWIP_DHCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/stats.h" +#include "lwip/mem.h" +#include "lwip/udp.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/def.h" +#include "lwip/dhcp.h" +#include "lwip/autoip.h" +#include "lwip/dns.h" +#include "lwip/etharp.h" +#include "lwip/prot/dhcp.h" + +#include + +/** DHCP_CREATE_RAND_XID: if this is set to 1, the xid is created using + * LWIP_RAND() (this overrides DHCP_GLOBAL_XID) + */ +#ifndef DHCP_CREATE_RAND_XID +#define DHCP_CREATE_RAND_XID 1 +#endif + +/** Default for DHCP_GLOBAL_XID is 0xABCD0000 + * This can be changed by defining DHCP_GLOBAL_XID and DHCP_GLOBAL_XID_HEADER, e.g. + * \#define DHCP_GLOBAL_XID_HEADER "stdlib.h" + * \#define DHCP_GLOBAL_XID rand() + */ +#ifdef DHCP_GLOBAL_XID_HEADER +#include DHCP_GLOBAL_XID_HEADER /* include optional starting XID generation prototypes */ +#endif + +/** DHCP_OPTION_MAX_MSG_SIZE is set to the MTU + * MTU is checked to be big enough in dhcp_start */ +#define DHCP_MAX_MSG_LEN(netif) (netif->mtu) +#define DHCP_MAX_MSG_LEN_MIN_REQUIRED 576 +/** Minimum length for reply before packet is parsed */ +#define DHCP_MIN_REPLY_LEN 44 + +#define REBOOT_TRIES 2 + +#if LWIP_DNS && LWIP_DHCP_MAX_DNS_SERVERS +#if DNS_MAX_SERVERS > LWIP_DHCP_MAX_DNS_SERVERS +#define LWIP_DHCP_PROVIDE_DNS_SERVERS LWIP_DHCP_MAX_DNS_SERVERS +#else +#define LWIP_DHCP_PROVIDE_DNS_SERVERS DNS_MAX_SERVERS +#endif +#else +#define LWIP_DHCP_PROVIDE_DNS_SERVERS 0 +#endif + +/** Option handling: options are parsed in dhcp_parse_reply + * and saved in an array where other functions can load them from. + * This might be moved into the struct dhcp (not necessarily since + * lwIP is single-threaded and the array is only used while in recv + * callback). */ +enum dhcp_option_idx { + DHCP_OPTION_IDX_OVERLOAD = 0, + DHCP_OPTION_IDX_MSG_TYPE, + DHCP_OPTION_IDX_SERVER_ID, + DHCP_OPTION_IDX_LEASE_TIME, + DHCP_OPTION_IDX_T1, + DHCP_OPTION_IDX_T2, + DHCP_OPTION_IDX_SUBNET_MASK, + DHCP_OPTION_IDX_ROUTER, +#if LWIP_DHCP_PROVIDE_DNS_SERVERS + DHCP_OPTION_IDX_DNS_SERVER, + DHCP_OPTION_IDX_DNS_SERVER_LAST = DHCP_OPTION_IDX_DNS_SERVER + LWIP_DHCP_PROVIDE_DNS_SERVERS - 1, +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ +#if LWIP_DHCP_GET_NTP_SRV + DHCP_OPTION_IDX_NTP_SERVER, + DHCP_OPTION_IDX_NTP_SERVER_LAST = DHCP_OPTION_IDX_NTP_SERVER + LWIP_DHCP_MAX_NTP_SERVERS - 1, +#endif /* LWIP_DHCP_GET_NTP_SRV */ + DHCP_OPTION_IDX_MAX +}; + +/** Holds the decoded option values, only valid while in dhcp_recv. + @todo: move this into struct dhcp? */ +u32_t dhcp_rx_options_val[DHCP_OPTION_IDX_MAX]; +/** Holds a flag which option was received and is contained in dhcp_rx_options_val, + only valid while in dhcp_recv. + @todo: move this into struct dhcp? */ +u8_t dhcp_rx_options_given[DHCP_OPTION_IDX_MAX]; + +static u8_t dhcp_discover_request_options[] = { + DHCP_OPTION_SUBNET_MASK, + DHCP_OPTION_ROUTER, + DHCP_OPTION_BROADCAST +#if LWIP_DHCP_PROVIDE_DNS_SERVERS + , DHCP_OPTION_DNS_SERVER +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ +#if LWIP_DHCP_GET_NTP_SRV + , DHCP_OPTION_NTP +#endif /* LWIP_DHCP_GET_NTP_SRV */ + }; + +#ifdef DHCP_GLOBAL_XID +static u32_t xid; +static u8_t xid_initialised; +#endif /* DHCP_GLOBAL_XID */ + +#define dhcp_option_given(dhcp, idx) (dhcp_rx_options_given[idx] != 0) +#define dhcp_got_option(dhcp, idx) (dhcp_rx_options_given[idx] = 1) +#define dhcp_clear_option(dhcp, idx) (dhcp_rx_options_given[idx] = 0) +#define dhcp_clear_all_options(dhcp) (memset(dhcp_rx_options_given, 0, sizeof(dhcp_rx_options_given))) +#define dhcp_get_option_value(dhcp, idx) (dhcp_rx_options_val[idx]) +#define dhcp_set_option_value(dhcp, idx, val) (dhcp_rx_options_val[idx] = (val)) + +static struct udp_pcb *dhcp_pcb; +static u8_t dhcp_pcb_refcount; + +/* DHCP client state machine functions */ +static err_t dhcp_discover(struct netif *netif); +static err_t dhcp_select(struct netif *netif); +static void dhcp_bind(struct netif *netif); +#if DHCP_DOES_ARP_CHECK +static err_t dhcp_decline(struct netif *netif); +#endif /* DHCP_DOES_ARP_CHECK */ +static err_t dhcp_rebind(struct netif *netif); +static err_t dhcp_reboot(struct netif *netif); +static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state); + +/* receive, unfold, parse and free incoming messages */ +static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); + +/* set the DHCP timers */ +static void dhcp_timeout(struct netif *netif); +static void dhcp_t1_timeout(struct netif *netif); +static void dhcp_t2_timeout(struct netif *netif); + +/* build outgoing messages */ +/* create a DHCP message, fill in common headers */ +static err_t dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type); +/* free a DHCP request */ +static void dhcp_delete_msg(struct dhcp *dhcp); +/* add a DHCP option (type, then length in bytes) */ +static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len); +/* add option values */ +static void dhcp_option_byte(struct dhcp *dhcp, u8_t value); +static void dhcp_option_short(struct dhcp *dhcp, u16_t value); +static void dhcp_option_long(struct dhcp *dhcp, u32_t value); +#if LWIP_NETIF_HOSTNAME +static void dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif); +#endif /* LWIP_NETIF_HOSTNAME */ +/* always add the DHCP options trailer to end and pad */ +static void dhcp_option_trailer(struct dhcp *dhcp); + +/** Ensure DHCP PCB is allocated and bound */ +static err_t +dhcp_inc_pcb_refcount(void) +{ + if (dhcp_pcb_refcount == 0) { + LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); + + /* allocate UDP PCB */ + dhcp_pcb = udp_new(); + + if (dhcp_pcb == NULL) { + return ERR_MEM; + } + + ip_set_option(dhcp_pcb, SOF_BROADCAST); + + /* set up local and remote port for the pcb -> listen on all interfaces on all src/dest IPs */ + udp_bind(dhcp_pcb, IP4_ADDR_ANY, DHCP_CLIENT_PORT); + udp_connect(dhcp_pcb, IP4_ADDR_ANY, DHCP_SERVER_PORT); + udp_recv(dhcp_pcb, dhcp_recv, NULL); + } + + dhcp_pcb_refcount++; + + return ERR_OK; +} + +/** Free DHCP PCB if the last netif stops using it */ +static void +dhcp_dec_pcb_refcount(void) +{ + LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); + dhcp_pcb_refcount--; + + if (dhcp_pcb_refcount == 0) { + udp_remove(dhcp_pcb); + dhcp_pcb = NULL; + } +} + +/** + * Back-off the DHCP client (because of a received NAK response). + * + * Back-off the DHCP client because of a received NAK. Receiving a + * NAK means the client asked for something non-sensible, for + * example when it tries to renew a lease obtained on another network. + * + * We clear any existing set IP address and restart DHCP negotiation + * afresh (as per RFC2131 3.2.3). + * + * @param netif the netif under DHCP control + */ +static void +dhcp_handle_nak(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", + (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + /* Change to a defined state - set this before assigning the address + to ensure the callback can use dhcp_supplied_address() */ + dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); + /* remove IP address from interface (must no longer be used, as per RFC2131) */ + netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); + /* We can immediately restart discovery */ + dhcp_discover(netif); +} + +#if DHCP_DOES_ARP_CHECK +/** + * Checks if the offered IP address is already in use. + * + * It does so by sending an ARP request for the offered address and + * entering CHECKING state. If no ARP reply is received within a small + * interval, the address is assumed to be free for use by us. + * + * @param netif the netif under DHCP control + */ +static void +dhcp_check(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result; + u16_t msecs; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0], + (s16_t)netif->name[1])); + dhcp_set_state(dhcp, DHCP_STATE_CHECKING); + /* create an ARP query for the offered IP address, expecting that no host + responds, as the IP address should not be in use. */ + result = etharp_query(netif, &dhcp->offered_ip_addr, NULL); + if (result != ERR_OK) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n")); + } + if (dhcp->tries < 255) { + dhcp->tries++; + } + msecs = 500; + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_check(): set request timeout %"U16_F" msecs\n", msecs)); +} +#endif /* DHCP_DOES_ARP_CHECK */ + +/** + * Remember the configuration offered by a DHCP server. + * + * @param netif the netif under DHCP control + */ +static void +dhcp_handle_offer(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", + (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + /* obtain the server address */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { + ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", + ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); + /* remember offered address */ + ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", + ip4_addr_get_u32(&dhcp->offered_ip_addr))); + + dhcp_select(netif); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("dhcp_handle_offer(netif=%p) did not get server ID!\n", (void*)netif)); + } +} + +/** + * Select a DHCP server offer out of all offers. + * + * Simply select the first offer received. + * + * @param netif the netif under DHCP control + * @return lwIP specific error (see error.h) + */ +static err_t +dhcp_select(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result; + u16_t msecs; + u8_t i; + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + dhcp_set_state(dhcp, DHCP_STATE_REQUESTING); + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + if (result == ERR_OK) { + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + + /* MUST request the offered IP address */ + dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + + dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + } + +#if LWIP_NETIF_HOSTNAME + dhcp_option_hostname(dhcp, netif); +#endif /* LWIP_NETIF_HOSTNAME */ + + dhcp_option_trailer(dhcp); + /* shrink the pbuf to the actual content length */ + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + + /* send broadcast to any DHCP server */ + udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); + dhcp_delete_msg(dhcp); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + dhcp->tries++; + } + msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); + return result; +} + +/** + * The DHCP timer that checks for lease renewal/rebind timeouts. + * Must be called once a minute (see @ref DHCP_COARSE_TIMER_SECS). + */ +void +dhcp_coarse_tmr(void) +{ + struct netif *netif = netif_list; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); + /* iterate through all network interfaces */ + while (netif != NULL) { + /* only act on DHCP configured interfaces */ + struct dhcp *dhcp = netif_dhcp_data(netif); + if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { + /* compare lease time to expire timeout */ + if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t0 timeout\n")); + /* this clients' lease time has expired */ + dhcp_release(netif); + dhcp_discover(netif); + /* timer is active (non zero), and triggers (zeroes) now? */ + } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n")); + /* this clients' rebind timeout triggered */ + dhcp_t2_timeout(netif); + /* timer is active (non zero), and triggers (zeroes) now */ + } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t1 timeout\n")); + /* this clients' renewal timeout triggered */ + dhcp_t1_timeout(netif); + } + } + /* proceed to next netif */ + netif = netif->next; + } +} + +/** + * DHCP transaction timeout handling (this function must be called every 500ms, + * see @ref DHCP_FINE_TIMER_MSECS). + * + * A DHCP server is expected to respond within a short period of time. + * This timer checks whether an outstanding DHCP request is timed out. + */ +void +dhcp_fine_tmr(void) +{ + struct netif *netif = netif_list; + /* loop through netif's */ + while (netif != NULL) { + struct dhcp *dhcp = netif_dhcp_data(netif); + /* only act on DHCP configured interfaces */ + if (dhcp != NULL) { + /* timer is active (non zero), and is about to trigger now */ + if (dhcp->request_timeout > 1) { + dhcp->request_timeout--; + } + else if (dhcp->request_timeout == 1) { + dhcp->request_timeout--; + /* { netif->dhcp->request_timeout == 0 } */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_fine_tmr(): request timeout\n")); + /* this client's request timeout triggered */ + dhcp_timeout(netif); + } + } + /* proceed to next network interface */ + netif = netif->next; + } +} + +/** + * A DHCP negotiation transaction, or ARP request, has timed out. + * + * The timer that was started with the DHCP or ARP request has + * timed out, indicating no response was received in time. + * + * @param netif the netif under DHCP control + */ +static void +dhcp_timeout(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); + /* back-off period has passed, or server selection timed out */ + if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); + dhcp_discover(netif); + /* receiving the requested lease timed out */ + } else if (dhcp->state == DHCP_STATE_REQUESTING) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); + if (dhcp->tries <= 5) { + dhcp_select(netif); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, releasing, restarting\n")); + dhcp_release(netif); + dhcp_discover(netif); + } +#if DHCP_DOES_ARP_CHECK + /* received no ARP reply for the offered address (which is good) */ + } else if (dhcp->state == DHCP_STATE_CHECKING) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); + if (dhcp->tries <= 1) { + dhcp_check(netif); + /* no ARP replies on the offered address, + looks like the IP address is indeed free */ + } else { + /* bind the interface to the offered address */ + dhcp_bind(netif); + } +#endif /* DHCP_DOES_ARP_CHECK */ + } else if (dhcp->state == DHCP_STATE_REBOOTING) { + if (dhcp->tries < REBOOT_TRIES) { + dhcp_reboot(netif); + } else { + dhcp_discover(netif); + } + } +} + +/** + * The renewal period has timed out. + * + * @param netif the netif under DHCP control + */ +static void +dhcp_t1_timeout(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_t1_timeout()\n")); + if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || + (dhcp->state == DHCP_STATE_RENEWING)) { + /* just retry to renew - note that the rebind timer (t2) will + * eventually time-out if renew tries fail. */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("dhcp_t1_timeout(): must renew\n")); + /* This slightly different to RFC2131: DHCPREQUEST will be sent from state + DHCP_STATE_RENEWING, not DHCP_STATE_BOUND */ + dhcp_renew(netif); + /* Calculate next timeout */ + if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) + { + dhcp->t1_renew_time = ((dhcp->t2_timeout - dhcp->lease_used) / 2); + } + } +} + +/** + * The rebind period has timed out. + * + * @param netif the netif under DHCP control + */ +static void +dhcp_t2_timeout(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout()\n")); + if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || + (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { + /* just retry to rebind */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, + ("dhcp_t2_timeout(): must rebind\n")); + /* This slightly different to RFC2131: DHCPREQUEST will be sent from state + DHCP_STATE_REBINDING, not DHCP_STATE_BOUND */ + dhcp_rebind(netif); + /* Calculate next timeout */ + if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) + { + dhcp->t2_rebind_time = ((dhcp->t0_timeout - dhcp->lease_used) / 2); + } + } +} + +/** + * Handle a DHCP ACK packet + * + * @param netif the netif under DHCP control + */ +static void +dhcp_handle_ack(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + +#if LWIP_DHCP_PROVIDE_DNS_SERVERS || LWIP_DHCP_GET_NTP_SRV + u8_t n; +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS || LWIP_DHCP_GET_NTP_SRV */ +#if LWIP_DHCP_GET_NTP_SRV + ip4_addr_t ntp_server_addrs[LWIP_DHCP_MAX_NTP_SERVERS]; +#endif + + /* clear options we might not get from the ACK */ + ip4_addr_set_zero(&dhcp->offered_sn_mask); + ip4_addr_set_zero(&dhcp->offered_gw_addr); +#if LWIP_DHCP_BOOTP_FILE + ip4_addr_set_zero(&dhcp->offered_si_addr); +#endif /* LWIP_DHCP_BOOTP_FILE */ + + /* lease time given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { + /* remember offered lease time */ + dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); + } + /* renewal period given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { + /* remember given renewal period */ + dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); + } else { + /* calculate safe periods for renewal */ + dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; + } + + /* renewal period given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { + /* remember given rebind period */ + dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); + } else { + /* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/ + dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; + } + + /* (y)our internet address */ + ip4_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); + +#if LWIP_DHCP_BOOTP_FILE + /* copy boot server address, + boot file name copied in dhcp_parse_reply if not overloaded */ + ip4_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); +#endif /* LWIP_DHCP_BOOTP_FILE */ + + /* subnet mask given? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { + /* remember given subnet mask */ + ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); + dhcp->subnet_mask_given = 1; + } else { + dhcp->subnet_mask_given = 0; + } + + /* gateway router */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { + ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); + } + +#if LWIP_DHCP_GET_NTP_SRV + /* NTP servers */ + for (n = 0; (n < LWIP_DHCP_MAX_NTP_SERVERS) && dhcp_option_given(dhcp, DHCP_OPTION_IDX_NTP_SERVER + n); n++) { + ip4_addr_set_u32(&ntp_server_addrs[n], lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_NTP_SERVER + n))); + } + dhcp_set_ntp_servers(n, ntp_server_addrs); +#endif /* LWIP_DHCP_GET_NTP_SRV */ + +#if LWIP_DHCP_PROVIDE_DNS_SERVERS + /* DNS servers */ + for (n = 0; (n < LWIP_DHCP_PROVIDE_DNS_SERVERS) && dhcp_option_given(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n); n++) { + ip_addr_t dns_addr; + ip_addr_set_ip4_u32(&dns_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_DNS_SERVER + n))); + dns_setserver(n, &dns_addr); + } +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ +} + +/** + * @ingroup dhcp4 + * Set a statically allocated struct dhcp to work with. + * Using this prevents dhcp_start to allocate it using mem_malloc. + * + * @param netif the netif for which to set the struct dhcp + * @param dhcp (uninitialised) dhcp struct allocated by the application + */ +void +dhcp_set_struct(struct netif *netif, struct dhcp *dhcp) +{ + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("dhcp != NULL", dhcp != NULL); + LWIP_ASSERT("netif already has a struct dhcp set", netif_dhcp_data(netif) == NULL); + + /* clear data structure */ + memset(dhcp, 0, sizeof(struct dhcp)); + /* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */ + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); +} + +/** + * @ingroup dhcp4 + * Removes a struct dhcp from a netif. + * + * ATTENTION: Only use this when not using dhcp_set_struct() to allocate the + * struct dhcp since the memory is passed back to the heap. + * + * @param netif the netif from which to remove the struct dhcp + */ +void dhcp_cleanup(struct netif *netif) +{ + LWIP_ASSERT("netif != NULL", netif != NULL); + + if (netif_dhcp_data(netif) != NULL) { + mem_free(netif_dhcp_data(netif)); + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL); + } +} + +/** + * @ingroup dhcp4 + * Start DHCP negotiation for a network interface. + * + * If no DHCP client instance was attached to this interface, + * a new client is created first. If a DHCP client instance + * was already present, it restarts negotiation. + * + * @param netif The lwIP network interface + * @return lwIP error code + * - ERR_OK - No error + * - ERR_MEM - Out of memory + */ +err_t +dhcp_start(struct netif *netif) +{ + struct dhcp *dhcp; + err_t result; + + LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); + LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); + dhcp = netif_dhcp_data(netif); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + + /* check MTU of the netif */ + if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); + return ERR_MEM; + } + + /* no DHCP client attached yet? */ + if (dhcp == NULL) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n")); + dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); + if (dhcp == NULL) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); + return ERR_MEM; + } + + /* store this dhcp client in the netif */ + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); + /* already has DHCP client attached */ + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n")); + LWIP_ASSERT("pbuf p_out wasn't freed", dhcp->p_out == NULL); + LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL ); + + if (dhcp->pcb_allocated != 0) { + dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ + } + /* dhcp is cleared below, no need to reset flag*/ + } + + /* clear data structure */ + memset(dhcp, 0, sizeof(struct dhcp)); + /* dhcp_set_state(&dhcp, DHCP_STATE_OFF); */ + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); + + if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ + return ERR_MEM; + } + dhcp->pcb_allocated = 1; + +#if LWIP_DHCP_CHECK_LINK_UP + if (!netif_is_link_up(netif)) { + /* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */ + dhcp_set_state(dhcp, DHCP_STATE_INIT); + return ERR_OK; + } +#endif /* LWIP_DHCP_CHECK_LINK_UP */ + + + /* (re)start the DHCP negotiation */ + result = dhcp_discover(netif); + if (result != ERR_OK) { + /* free resources allocated above */ + dhcp_stop(netif); + return ERR_MEM; + } + return result; +} + +/** + * @ingroup dhcp4 + * Inform a DHCP server of our manual configuration. + * + * This informs DHCP servers of our fixed IP address configuration + * by sending an INFORM message. It does not involve DHCP address + * configuration, it is just here to be nice to the network. + * + * @param netif The lwIP network interface + */ +void +dhcp_inform(struct netif *netif) +{ + struct dhcp dhcp; + err_t result = ERR_OK; + + LWIP_ERROR("netif != NULL", (netif != NULL), return;); + + if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ + return; + } + + memset(&dhcp, 0, sizeof(struct dhcp)); + dhcp_set_state(&dhcp, DHCP_STATE_INFORMING); + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, &dhcp, DHCP_INFORM); + if (result == ERR_OK) { + dhcp_option(&dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + dhcp_option_short(&dhcp, DHCP_MAX_MSG_LEN(netif)); + + dhcp_option_trailer(&dhcp); + + pbuf_realloc(dhcp.p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp.options_out_len); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_inform: INFORMING\n")); + + udp_sendto_if(dhcp_pcb, dhcp.p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); + + dhcp_delete_msg(&dhcp); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_inform: could not allocate DHCP request\n")); + } + + dhcp_dec_pcb_refcount(); /* delete DHCP PCB if not needed any more */ +} + +/** Handle a possible change in the network configuration. + * + * This enters the REBOOTING state to verify that the currently bound + * address is still valid. + */ +void +dhcp_network_changed(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + + if (!dhcp) + return; + switch (dhcp->state) { + case DHCP_STATE_REBINDING: + case DHCP_STATE_RENEWING: + case DHCP_STATE_BOUND: + case DHCP_STATE_REBOOTING: + dhcp->tries = 0; + dhcp_reboot(netif); + break; + case DHCP_STATE_OFF: + /* stay off */ + break; + default: + /* INIT/REQUESTING/CHECKING/BACKING_OFF restart with new 'rid' because the + state changes, SELECTING: continue with current 'rid' as we stay in the + same state */ +#if LWIP_DHCP_AUTOIP_COOP + if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { + autoip_stop(netif); + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + } +#endif /* LWIP_DHCP_AUTOIP_COOP */ + /* ensure we start with short timeouts, even if already discovering */ + dhcp->tries = 0; + dhcp_discover(netif); + break; + } +} + +#if DHCP_DOES_ARP_CHECK +/** + * Match an ARP reply with the offered IP address: + * check whether the offered IP address is not in use using ARP + * + * @param netif the network interface on which the reply was received + * @param addr The IP address we received a reply from + */ +void +dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr) +{ + struct dhcp *dhcp; + + LWIP_ERROR("netif != NULL", (netif != NULL), return;); + dhcp = netif_dhcp_data(netif); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n")); + /* is a DHCP client doing an ARP check? */ + if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n", + ip4_addr_get_u32(addr))); + /* did a host respond with the address we + were offered by the DHCP server? */ + if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) { + /* we will not accept the offered address */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, + ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); + dhcp_decline(netif); + } + } +} + +/** + * Decline an offered lease. + * + * Tell the DHCP server we do not accept the offered address. + * One reason to decline the lease is when we find out the address + * is already in use by another host (through ARP). + * + * @param netif the netif under DHCP control + */ +static err_t +dhcp_decline(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result = ERR_OK; + u16_t msecs; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n")); + dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); + if (result == ERR_OK) { + dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + + dhcp_option_trailer(dhcp); + /* resize pbuf to reflect true size of options */ + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + + /* per section 4.4.4, broadcast DECLINE messages */ + udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); + dhcp_delete_msg(dhcp); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("dhcp_decline: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + dhcp->tries++; + } + msecs = 10*1000; + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); + return result; +} +#endif /* DHCP_DOES_ARP_CHECK */ + + +/** + * Start the DHCP process, discover a DHCP server. + * + * @param netif the netif under DHCP control + */ +static err_t +dhcp_discover(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result = ERR_OK; + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); + ip4_addr_set_any(&dhcp->offered_ip_addr); + dhcp_set_state(dhcp, DHCP_STATE_SELECTING); + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); + if (result == ERR_OK) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n")); + + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + } + dhcp_option_trailer(dhcp); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: realloc()ing\n")); + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)\n")); + udp_sendto_if_src(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif, IP4_ADDR_ANY); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); + dhcp_delete_msg(dhcp); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + dhcp->tries++; + } +#if LWIP_DHCP_AUTOIP_COOP + if (dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; + autoip_start(netif); + } +#endif /* LWIP_DHCP_AUTOIP_COOP */ + msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs)); + return result; +} + + +/** + * Bind the interface to the offered IP address. + * + * @param netif network interface to bind to the offered address + */ +static void +dhcp_bind(struct netif *netif) +{ + u32_t timeout; + struct dhcp *dhcp; + ip4_addr_t sn_mask, gw_addr; + LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); + dhcp = netif_dhcp_data(netif); + LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); + + /* reset time used of lease */ + dhcp->lease_used = 0; + + if (dhcp->offered_t0_lease != 0xffffffffUL) { + /* set renewal period timer */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t0 renewal timer %"U32_F" secs\n", dhcp->offered_t0_lease)); + timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; + if (timeout > 0xffff) { + timeout = 0xffff; + } + dhcp->t0_timeout = (u16_t)timeout; + if (dhcp->t0_timeout == 0) { + dhcp->t0_timeout = 1; + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t0_lease*1000)); + } + + /* temporary DHCP lease? */ + if (dhcp->offered_t1_renew != 0xffffffffUL) { + /* set renewal period timer */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew)); + timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; + if (timeout > 0xffff) { + timeout = 0xffff; + } + dhcp->t1_timeout = (u16_t)timeout; + if (dhcp->t1_timeout == 0) { + dhcp->t1_timeout = 1; + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew*1000)); + dhcp->t1_renew_time = dhcp->t1_timeout; + } + /* set renewal period timer */ + if (dhcp->offered_t2_rebind != 0xffffffffUL) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind)); + timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; + if (timeout > 0xffff) { + timeout = 0xffff; + } + dhcp->t2_timeout = (u16_t)timeout; + if (dhcp->t2_timeout == 0) { + dhcp->t2_timeout = 1; + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind*1000)); + dhcp->t2_rebind_time = dhcp->t2_timeout; + } + + /* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */ + if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) { + dhcp->t1_timeout = 0; + } + + if (dhcp->subnet_mask_given) { + /* copy offered network mask */ + ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); + } else { + /* subnet mask not given, choose a safe subnet mask given the network class */ + u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); + if (first_octet <= 127) { + ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); + } else if (first_octet >= 192) { + ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); + } else { + ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); + } + } + + ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); + /* gateway address not given? */ + if (ip4_addr_isany_val(gw_addr)) { + /* copy network address */ + ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); + /* use first host address on network as gateway */ + ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL)); + } + +#if LWIP_DHCP_AUTOIP_COOP + if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { + autoip_stop(netif); + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + } +#endif /* LWIP_DHCP_AUTOIP_COOP */ + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F" SN: 0x%08"X32_F" GW: 0x%08"X32_F"\n", + ip4_addr_get_u32(&dhcp->offered_ip_addr), ip4_addr_get_u32(&sn_mask), ip4_addr_get_u32(&gw_addr))); + /* netif is now bound to DHCP leased address - set this before assigning the address + to ensure the callback can use dhcp_supplied_address() */ + dhcp_set_state(dhcp, DHCP_STATE_BOUND); + + netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); + /* interface is used by routing now that an address is set */ +} + +/** + * @ingroup dhcp4 + * Renew an existing DHCP lease at the involved DHCP server. + * + * @param netif network interface which must renew its lease + */ +err_t +dhcp_renew(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result; + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); + dhcp_set_state(dhcp, DHCP_STATE_RENEWING); + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + if (result == ERR_OK) { + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + } + +#if LWIP_NETIF_HOSTNAME + dhcp_option_hostname(dhcp, netif); +#endif /* LWIP_NETIF_HOSTNAME */ + + /* append DHCP message trailer */ + dhcp_option_trailer(dhcp); + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + + udp_sendto_if(dhcp_pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); + dhcp_delete_msg(dhcp); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + dhcp->tries++; + } + /* back-off on retries, but to a maximum of 20 seconds */ + msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs)); + return result; +} + +/** + * Rebind with a DHCP server for an existing DHCP lease. + * + * @param netif network interface which must rebind with a DHCP server + */ +static err_t +dhcp_rebind(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result; + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n")); + dhcp_set_state(dhcp, DHCP_STATE_REBINDING); + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + if (result == ERR_OK) { + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + } + +#if LWIP_NETIF_HOSTNAME + dhcp_option_hostname(dhcp, netif); +#endif /* LWIP_NETIF_HOSTNAME */ + + dhcp_option_trailer(dhcp); + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + + /* broadcast to server */ + udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); + dhcp_delete_msg(dhcp); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + dhcp->tries++; + } + msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs)); + return result; +} + +/** + * Enter REBOOTING state to verify an existing lease + * + * @param netif network interface which must reboot + */ +static err_t +dhcp_reboot(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result; + u16_t msecs; + u8_t i; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); + dhcp_set_state(dhcp, DHCP_STATE_REBOOTING); + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); + if (result == ERR_OK) { + dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); + dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN_MIN_REQUIRED); + + dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); + + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { + dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); + } + + dhcp_option_trailer(dhcp); + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + + /* broadcast to server */ + udp_sendto_if(dhcp_pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); + dhcp_delete_msg(dhcp); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); + } + if (dhcp->tries < 255) { + dhcp->tries++; + } + msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; + dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs)); + return result; +} + + +/** + * @ingroup dhcp4 + * Release a DHCP lease (usually called before @ref dhcp_stop). + * + * @param netif network interface which must release its lease + */ +err_t +dhcp_release(struct netif *netif) +{ + struct dhcp *dhcp = netif_dhcp_data(netif); + err_t result; + ip_addr_t server_ip_addr; + u8_t is_dhcp_supplied_address; + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n")); + if (dhcp == NULL) { + return ERR_ARG; + } + ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); + + is_dhcp_supplied_address = dhcp_supplied_address(netif); + + /* idle DHCP client */ + dhcp_set_state(dhcp, DHCP_STATE_OFF); + /* clean old DHCP offer */ + ip_addr_set_zero_ip4(&dhcp->server_ip_addr); + ip4_addr_set_zero(&dhcp->offered_ip_addr); + ip4_addr_set_zero(&dhcp->offered_sn_mask); + ip4_addr_set_zero(&dhcp->offered_gw_addr); +#if LWIP_DHCP_BOOTP_FILE + ip4_addr_set_zero(&dhcp->offered_si_addr); +#endif /* LWIP_DHCP_BOOTP_FILE */ + dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; + dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; + + if (!is_dhcp_supplied_address) { + /* don't issue release message when address is not dhcp-assigned */ + return ERR_OK; + } + + /* create and initialize the DHCP message header */ + result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); + if (result == ERR_OK) { + dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); + dhcp_option_long(dhcp, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr)))); + + dhcp_option_trailer(dhcp); + + pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); + + udp_sendto_if(dhcp_pcb, dhcp->p_out, &server_ip_addr, DHCP_SERVER_PORT, netif); + dhcp_delete_msg(dhcp); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_STATE_OFF\n")); + } else { + /* sending release failed, but that's not a problem since the correct behaviour of dhcp does not rely on release */ + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); + } + /* remove IP address from interface (prevents routing from selecting this interface) */ + netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); + + return result; +} + +/** + * @ingroup dhcp4 + * Remove the DHCP client from the interface. + * + * @param netif The network interface to stop DHCP on + */ +void +dhcp_stop(struct netif *netif) +{ + struct dhcp *dhcp; + LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); + dhcp = netif_dhcp_data(netif); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); + /* netif is DHCP configured? */ + if (dhcp != NULL) { +#if LWIP_DHCP_AUTOIP_COOP + if (dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_ON) { + autoip_stop(netif); + dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; + } +#endif /* LWIP_DHCP_AUTOIP_COOP */ + + LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); + dhcp_set_state(dhcp, DHCP_STATE_OFF); + + if (dhcp->pcb_allocated != 0) { + dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ + dhcp->pcb_allocated = 0; + } + } +} + +/* + * Set the DHCP state of a DHCP client. + * + * 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) { + dhcp->state = new_state; + dhcp->tries = 0; + dhcp->request_timeout = 0; + } +} + +/* + * Concatenate an option type and length field to the outgoing + * DHCP message. + * + */ +static void +dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) +{ + LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); + dhcp->msg_out->options[dhcp->options_out_len++] = option_type; + dhcp->msg_out->options[dhcp->options_out_len++] = option_len; +} +/* + * Concatenate a single byte to the outgoing DHCP message. + * + */ +static void +dhcp_option_byte(struct dhcp *dhcp, u8_t value) +{ + LWIP_ASSERT("dhcp_option_byte: dhcp->options_out_len < DHCP_OPTIONS_LEN", dhcp->options_out_len < DHCP_OPTIONS_LEN); + dhcp->msg_out->options[dhcp->options_out_len++] = value; +} + +static void +dhcp_option_short(struct dhcp *dhcp, u16_t value) +{ + LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); +} + +static void +dhcp_option_long(struct dhcp *dhcp, u32_t value) +{ + LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); + dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); +} + +#if LWIP_NETIF_HOSTNAME +static void +dhcp_option_hostname(struct dhcp *dhcp, struct netif *netif) +{ + if (netif->hostname != NULL) { + size_t namelen = strlen(netif->hostname); + if (namelen > 0) { + size_t len; + const char *p = netif->hostname; + /* Shrink len to available bytes (need 2 bytes for OPTION_HOSTNAME + and 1 byte for trailer) */ + size_t available = DHCP_OPTIONS_LEN - dhcp->options_out_len - 3; + LWIP_ASSERT("DHCP: hostname is too long!", namelen <= available); + len = LWIP_MIN(namelen, available); + LWIP_ASSERT("DHCP: hostname is too long!", len <= 0xFF); + dhcp_option(dhcp, DHCP_OPTION_HOSTNAME, (u8_t)len); + while (len--) { + dhcp_option_byte(dhcp, *p++); + } + } + } +} +#endif /* LWIP_NETIF_HOSTNAME */ + +/** + * Extract the DHCP message and the DHCP options. + * + * Extract the DHCP message and the DHCP options, each into a contiguous + * piece of memory. As a DHCP message is variable sized by its options, + * and also allows overriding some fields for options, the easy approach + * is to first unfold the options into a contiguous piece of memory, and + * use that further on. + * + */ +static err_t +dhcp_parse_reply(struct dhcp *dhcp, struct pbuf *p) +{ + u8_t *options; + u16_t offset; + u16_t offset_max; + u16_t options_idx; + u16_t options_idx_max; + struct pbuf *q; + int parse_file_as_options = 0; + int parse_sname_as_options = 0; + + /* clear received options */ + dhcp_clear_all_options(dhcp); + /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ + if (p->len < DHCP_SNAME_OFS) { + return ERR_BUF; + } + dhcp->msg_in = (struct dhcp_msg *)p->payload; +#if LWIP_DHCP_BOOTP_FILE + /* clear boot file name */ + dhcp->boot_file_name[0] = 0; +#endif /* LWIP_DHCP_BOOTP_FILE */ + + /* parse options */ + + /* start with options field */ + options_idx = DHCP_OPTIONS_OFS; + /* parse options to the end of the received packet */ + options_idx_max = p->tot_len; +again: + q = p; + while ((q != NULL) && (options_idx >= q->len)) { + options_idx -= q->len; + options_idx_max -= q->len; + q = q->next; + } + if (q == NULL) { + return ERR_BUF; + } + offset = options_idx; + offset_max = options_idx_max; + options = (u8_t*)q->payload; + /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ + while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { + u8_t op = options[offset]; + u8_t len; + u8_t decode_len = 0; + int decode_idx = -1; + u16_t val_offset = offset + 2; + /* len byte might be in the next pbuf */ + if ((offset + 1) < q->len) { + len = options[offset + 1]; + } else { + len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); + } + /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ + decode_len = len; + switch(op) { + /* case(DHCP_OPTION_END): handled above */ + case(DHCP_OPTION_PAD): + /* special option: no len encoded */ + decode_len = len = 0; + /* will be increased below */ + offset--; + break; + case(DHCP_OPTION_SUBNET_MASK): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; + break; + case(DHCP_OPTION_ROUTER): + decode_len = 4; /* only copy the first given router */ + LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_ROUTER; + break; +#if LWIP_DHCP_PROVIDE_DNS_SERVERS + case(DHCP_OPTION_DNS_SERVER): + /* special case: there might be more than one server */ + LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;); + /* limit number of DNS servers */ + decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); + LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_DNS_SERVER; + break; +#endif /* LWIP_DHCP_PROVIDE_DNS_SERVERS */ + case(DHCP_OPTION_LEASE_TIME): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_LEASE_TIME; + break; +#if LWIP_DHCP_GET_NTP_SRV + case(DHCP_OPTION_NTP): + /* special case: there might be more than one server */ + LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;); + /* limit number of NTP servers */ + decode_len = LWIP_MIN(len, 4 * LWIP_DHCP_MAX_NTP_SERVERS); + LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_NTP_SERVER; + break; +#endif /* LWIP_DHCP_GET_NTP_SRV*/ + case(DHCP_OPTION_OVERLOAD): + LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); + /* decode overload only in options, not in file/sname: invalid packet */ + LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_OVERLOAD; + break; + case(DHCP_OPTION_MESSAGE_TYPE): + LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_MSG_TYPE; + break; + case(DHCP_OPTION_SERVER_ID): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_SERVER_ID; + break; + case(DHCP_OPTION_T1): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_T1; + break; + case(DHCP_OPTION_T2): + LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); + decode_idx = DHCP_OPTION_IDX_T2; + break; + default: + decode_len = 0; + LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", (u16_t)op)); + break; + } + offset += len + 2; + if (decode_len > 0) { + u32_t value = 0; + u16_t copy_len; +decode_next: + LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); + if (!dhcp_option_given(dhcp, decode_idx)) { + copy_len = LWIP_MIN(decode_len, 4); + if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { + return ERR_BUF; + } + if (decode_len > 4) { + /* decode more than one u32_t */ + LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); + dhcp_got_option(dhcp, decode_idx); + dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); + decode_len -= 4; + val_offset += 4; + decode_idx++; + goto decode_next; + } else if (decode_len == 4) { + value = lwip_ntohl(value); + } else { + LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); + value = ((u8_t*)&value)[0]; + } + dhcp_got_option(dhcp, decode_idx); + dhcp_set_option_value(dhcp, decode_idx, value); + } + } + if (offset >= q->len) { + offset -= q->len; + offset_max -= q->len; + if ((offset < offset_max) && offset_max) { + q = q->next; + LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); + options = (u8_t*)q->payload; + } else { + /* We've run out of bytes, probably no end marker. Don't proceed. */ + break; + } + } + } + /* is this an overloaded message? */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { + u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); + dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); + if (overload == DHCP_OVERLOAD_FILE) { + parse_file_as_options = 1; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); + } else if (overload == DHCP_OVERLOAD_SNAME) { + parse_sname_as_options = 1; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); + } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { + parse_sname_as_options = 1; + parse_file_as_options = 1; + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname and file field\n")); + } else { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("invalid overload option: %d\n", (int)overload)); + } +#if LWIP_DHCP_BOOTP_FILE + if (!parse_file_as_options) { + /* only do this for ACK messages */ + if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE) && + (dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE) == DHCP_ACK)) + /* copy bootp file name, don't care for sname (server hostname) */ + if (pbuf_copy_partial(p, dhcp->boot_file_name, DHCP_FILE_LEN-1, DHCP_FILE_OFS) != (DHCP_FILE_LEN-1)) { + return ERR_BUF; + } + /* make sure the string is really NULL-terminated */ + dhcp->boot_file_name[DHCP_FILE_LEN-1] = 0; + } +#endif /* LWIP_DHCP_BOOTP_FILE */ + } + if (parse_file_as_options) { + /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ + parse_file_as_options = 0; + options_idx = DHCP_FILE_OFS; + options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; + goto again; + } else if (parse_sname_as_options) { + parse_sname_as_options = 0; + options_idx = DHCP_SNAME_OFS; + options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; + goto again; + } + return ERR_OK; +} + +/** + * If an incoming DHCP message is in response to us, then trigger the state machine + */ +static void +dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) +{ + struct netif *netif = ip_current_input_netif(); + struct dhcp *dhcp = netif_dhcp_data(netif); + struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; + u8_t msg_type; + u8_t i; + + LWIP_UNUSED_ARG(arg); + + /* Caught DHCP message from netif that does not have DHCP enabled? -> not interested */ + if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) { + goto free_pbuf_and_return; + } + + LWIP_ASSERT("invalid server address type", IP_IS_V4(addr)); + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_recv(pbuf = %p) from DHCP server %"U16_F".%"U16_F".%"U16_F".%"U16_F" port %"U16_F"\n", (void*)p, + ip4_addr1_16(ip_2_ip4(addr)), ip4_addr2_16(ip_2_ip4(addr)), ip4_addr3_16(ip_2_ip4(addr)), ip4_addr4_16(ip_2_ip4(addr)), port)); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->len = %"U16_F"\n", p->len)); + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("pbuf->tot_len = %"U16_F"\n", p->tot_len)); + /* prevent warnings about unused arguments */ + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(addr); + LWIP_UNUSED_ARG(port); + + LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); + + if (p->len < DHCP_MIN_REPLY_LEN) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n")); + goto free_pbuf_and_return; + } + + if (reply_msg->op != DHCP_BOOTREPLY) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); + goto free_pbuf_and_return; + } + /* iterate through hardware address and match against DHCP message */ + for (i = 0; i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN && i < DHCP_CHADDR_LEN; i++) { + if (netif->hwaddr[i] != reply_msg->chaddr[i]) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("netif->hwaddr[%"U16_F"]==%02"X16_F" != reply_msg->chaddr[%"U16_F"]==%02"X16_F"\n", + (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); + goto free_pbuf_and_return; + } + } + /* match transaction ID against what we expected */ + if (lwip_ntohl(reply_msg->xid) != dhcp->xid) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("transaction id mismatch reply_msg->xid(%"X32_F")!=dhcp->xid(%"X32_F")\n",lwip_ntohl(reply_msg->xid),dhcp->xid)); + goto free_pbuf_and_return; + } + /* option fields could be unfold? */ + if (dhcp_parse_reply(dhcp, p) != ERR_OK) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("problem unfolding DHCP message - too short on memory?\n")); + goto free_pbuf_and_return; + } + + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n")); + /* obtain pointer to DHCP message type */ + if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n")); + goto free_pbuf_and_return; + } + + /* read DHCP message type */ + msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); + /* message type is DHCP ACK? */ + if (msg_type == DHCP_ACK) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); + /* in requesting state? */ + if (dhcp->state == DHCP_STATE_REQUESTING) { + dhcp_handle_ack(netif); +#if DHCP_DOES_ARP_CHECK + if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { + /* check if the acknowledged lease address is already in use */ + dhcp_check(netif); + } else { + /* bind interface to the acknowledged lease address */ + dhcp_bind(netif); + } +#else + /* bind interface to the acknowledged lease address */ + dhcp_bind(netif); +#endif + } + /* already bound to the given lease address? */ + else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || + (dhcp->state == DHCP_STATE_RENEWING)) { + dhcp_handle_ack(netif); + dhcp_bind(netif); + } + } + /* received a DHCP_NAK in appropriate state? */ + else if ((msg_type == DHCP_NAK) && + ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || + (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); + dhcp_handle_nak(netif); + } + /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ + else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_STATE_SELECTING state\n")); + dhcp->request_timeout = 0; + /* remember offered lease */ + dhcp_handle_offer(netif); + } + +free_pbuf_and_return: + if (dhcp != NULL) { + dhcp->msg_in = NULL; + } + pbuf_free(p); +} + +/** + * Create a DHCP request, fill in common headers + * + * @param netif the netif under DHCP control + * @param dhcp dhcp control struct + * @param message_type message type of the request + */ +static err_t +dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) +{ + u16_t i; +#ifndef DHCP_GLOBAL_XID + /** default global transaction identifier starting value (easy to match + * with a packet analyser). We simply increment for each new request. + * Predefine DHCP_GLOBAL_XID to a better value or a function call to generate one + * at runtime, any supporting function prototypes can be defined in DHCP_GLOBAL_XID_HEADER */ +#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) + static u32_t xid; +#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ + static u32_t xid = 0xABCD0000; +#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ +#else + if (!xid_initialised) { + xid = DHCP_GLOBAL_XID; + xid_initialised = !xid_initialised; + } +#endif + LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); + LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); + LWIP_ASSERT("dhcp_create_msg: dhcp->p_out == NULL", dhcp->p_out == NULL); + LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); + dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); + if (dhcp->p_out == NULL) { + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, + ("dhcp_create_msg(): could not allocate pbuf\n")); + return ERR_MEM; + } + LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", + (dhcp->p_out->len >= sizeof(struct dhcp_msg))); + + /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ + if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { + /* reuse transaction identifier in retransmissions */ + if (dhcp->tries == 0) { +#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) + xid = LWIP_RAND(); +#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ + xid++; +#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ + } + dhcp->xid = xid; + } + LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, + ("transaction id xid(%"X32_F")\n", xid)); + + dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; + + dhcp->msg_out->op = DHCP_BOOTREQUEST; + /* @todo: make link layer independent */ + dhcp->msg_out->htype = DHCP_HTYPE_ETH; + dhcp->msg_out->hlen = netif->hwaddr_len; + dhcp->msg_out->hops = 0; + dhcp->msg_out->xid = lwip_htonl(dhcp->xid); + dhcp->msg_out->secs = 0; + /* we don't need the broadcast flag since we can receive unicast traffic + before being fully configured! */ + dhcp->msg_out->flags = 0; + ip4_addr_set_zero(&dhcp->msg_out->ciaddr); + /* 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) || + ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ + ((dhcp->state== DHCP_STATE_RENEWING) || dhcp->state== DHCP_STATE_REBINDING))) { + ip4_addr_copy(dhcp->msg_out->ciaddr, *netif_ip4_addr(netif)); + } + ip4_addr_set_zero(&dhcp->msg_out->yiaddr); + ip4_addr_set_zero(&dhcp->msg_out->siaddr); + ip4_addr_set_zero(&dhcp->msg_out->giaddr); + for (i = 0; i < DHCP_CHADDR_LEN; i++) { + /* copy netif hardware address, pad with zeroes */ + dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len && i < NETIF_MAX_HWADDR_LEN) ? netif->hwaddr[i] : 0/* pad byte*/; + } + for (i = 0; i < DHCP_SNAME_LEN; i++) { + dhcp->msg_out->sname[i] = 0; + } + for (i = 0; i < DHCP_FILE_LEN; i++) { + dhcp->msg_out->file[i] = 0; + } + dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); + dhcp->options_out_len = 0; + /* fill options field with an incrementing array (for debugging purposes) */ + for (i = 0; i < DHCP_OPTIONS_LEN; i++) { + dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ + } + /* Add option MESSAGE_TYPE */ + dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); + dhcp_option_byte(dhcp, message_type); + return ERR_OK; +} + +/** + * Free previously allocated memory used to send a DHCP request. + * + * @param dhcp the dhcp struct to free the request from + */ +static void +dhcp_delete_msg(struct dhcp *dhcp) +{ + LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); + LWIP_ASSERT("dhcp_delete_msg: dhcp->p_out != NULL", dhcp->p_out != NULL); + LWIP_ASSERT("dhcp_delete_msg: dhcp->msg_out != NULL", dhcp->msg_out != NULL); + if (dhcp->p_out != NULL) { + pbuf_free(dhcp->p_out); + } + dhcp->p_out = NULL; + dhcp->msg_out = NULL; +} + +/** + * Add a DHCP message trailer + * + * Adds the END option to the DHCP message, and if + * necessary, up to three padding bytes. + * + * @param dhcp DHCP state structure + */ +static void +dhcp_option_trailer(struct dhcp *dhcp) +{ + LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); + LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); + LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); + dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; + /* packet is too small, or not 4 byte aligned? */ + while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && + (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { + /* add a fill/padding byte */ + dhcp->msg_out->options[dhcp->options_out_len++] = 0; + } +} + +/** check if DHCP supplied netif->ip_addr + * + * @param netif the netif to check + * @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), + * 0 otherwise + */ +u8_t +dhcp_supplied_address(const struct netif *netif) +{ + if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { + struct dhcp* dhcp = netif_dhcp_data(netif); + return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || + (dhcp->state == DHCP_STATE_REBINDING); + } + return 0; +} + +#endif /* LWIP_IPV4 && LWIP_DHCP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.c index 3f48a99..a5df46b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/etharp.c @@ -1,1206 +1,1206 @@ -/** - * @file - * Address Resolution Protocol module for IP over Ethernet - * - * Functionally, ARP is divided into two parts. The first maps an IP address - * to a physical address when sending a packet, and the second part answers - * requests from other machines for our physical address. - * - * This implementation complies with RFC 826 (Ethernet ARP). It supports - * Gratuitious ARP from RFC3220 (IP Mobility Support for IPv4) section 4.6 - * if an interface calls etharp_gratuitous(our_netif) upon address change. - */ - -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * Copyright (c) 2003-2004 Leon Woestenberg - * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "lwip/opt.h" - -#if LWIP_ARP || LWIP_ETHERNET - -#include "lwip/etharp.h" -#include "lwip/stats.h" -#include "lwip/snmp.h" -#include "lwip/dhcp.h" -#include "lwip/autoip.h" -#include "netif/ethernet.h" - -#include - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */ - -/** Re-request a used ARP entry 1 minute before it would expire to prevent - * breaking a steadily used connection because the ARP entry timed out. */ -#define ARP_AGE_REREQUEST_USED_UNICAST (ARP_MAXAGE - 30) -#define ARP_AGE_REREQUEST_USED_BROADCAST (ARP_MAXAGE - 15) - -/** the time an ARP entry stays pending after first request, - * for ARP_TMR_INTERVAL = 1000, this is - * 10 seconds. - * - * @internal Keep this number at least 2, otherwise it might - * run out instantly if the timeout occurs directly after a request. - */ -#define ARP_MAXPENDING 5 - -/** ARP states */ -enum etharp_state { - ETHARP_STATE_EMPTY = 0, - ETHARP_STATE_PENDING, - ETHARP_STATE_STABLE, - ETHARP_STATE_STABLE_REREQUESTING_1, - ETHARP_STATE_STABLE_REREQUESTING_2 -#if ETHARP_SUPPORT_STATIC_ENTRIES - ,ETHARP_STATE_STATIC -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ -}; - -struct etharp_entry { -#if ARP_QUEUEING - /** Pointer to queue of pending outgoing packets on this ARP entry. */ - struct etharp_q_entry *q; -#else /* ARP_QUEUEING */ - /** Pointer to a single pending outgoing packet on this ARP entry. */ - struct pbuf *q; -#endif /* ARP_QUEUEING */ - ip4_addr_t ipaddr; - struct netif *netif; - struct eth_addr ethaddr; - u16_t ctime; - u8_t state; -}; - -static struct etharp_entry arp_table[ARP_TABLE_SIZE]; - -#if !LWIP_NETIF_HWADDRHINT -static u8_t etharp_cached_entry; -#endif /* !LWIP_NETIF_HWADDRHINT */ - -/** Try hard to create a new entry - we want the IP address to appear in - the cache (even if this means removing an active entry or so). */ -#define ETHARP_FLAG_TRY_HARD 1 -#define ETHARP_FLAG_FIND_ONLY 2 -#if ETHARP_SUPPORT_STATIC_ENTRIES -#define ETHARP_FLAG_STATIC_ENTRY 4 -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - -#if LWIP_NETIF_HWADDRHINT -#define ETHARP_SET_HINT(netif, hint) if (((netif) != NULL) && ((netif)->addr_hint != NULL)) \ - *((netif)->addr_hint) = (hint); -#else /* LWIP_NETIF_HWADDRHINT */ -#define ETHARP_SET_HINT(netif, hint) (etharp_cached_entry = (hint)) -#endif /* LWIP_NETIF_HWADDRHINT */ - - -/* Some checks, instead of etharp_init(): */ -#if (LWIP_ARP && (ARP_TABLE_SIZE > 0x7f)) - #error "ARP_TABLE_SIZE must fit in an s8_t, you have to reduce it in your lwipopts.h" -#endif - - -static err_t etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr* hw_dst_addr); -static err_t 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); - -#if ARP_QUEUEING -/** - * Free a complete queue of etharp entries - * - * @param q a qeueue of etharp_q_entry's to free - */ -static void -free_etharp_q(struct etharp_q_entry *q) -{ - struct etharp_q_entry *r; - LWIP_ASSERT("q != NULL", q != NULL); - LWIP_ASSERT("q->p != NULL", q->p != NULL); - while (q) { - r = q; - q = q->next; - LWIP_ASSERT("r->p != NULL", (r->p != NULL)); - pbuf_free(r->p); - memp_free(MEMP_ARP_QUEUE, r); - } -} -#else /* ARP_QUEUEING */ - -/** Compatibility define: free the queued pbuf */ -#define free_etharp_q(q) pbuf_free(q) - -#endif /* ARP_QUEUEING */ - -/** Clean up ARP table entries */ -static void -etharp_free_entry(int i) -{ - /* 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) { - /* 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); - arp_table[i].q = NULL; - } - /* recycle entry for re-use */ - arp_table[i].state = ETHARP_STATE_EMPTY; -#ifdef LWIP_DEBUG - /* for debugging, clean out the complete entry */ - arp_table[i].ctime = 0; - arp_table[i].netif = NULL; - ip4_addr_set_zero(&arp_table[i].ipaddr); - arp_table[i].ethaddr = ethzero; -#endif /* LWIP_DEBUG */ -} - -/** - * Clears expired entries in the ARP table. - * - * This function should be called every ARP_TMR_INTERVAL milliseconds (1 second), - * in order to expire entries in the ARP table. - */ -void -etharp_tmr(void) -{ - u8_t i; - - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); - /* remove expired entries from the ARP table */ - for (i = 0; i < ARP_TABLE_SIZE; ++i) { - u8_t state = arp_table[i].state; - if (state != ETHARP_STATE_EMPTY -#if ETHARP_SUPPORT_STATIC_ENTRIES - && (state != ETHARP_STATE_STATIC) -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - ) { - arp_table[i].ctime++; - if ((arp_table[i].ctime >= ARP_MAXAGE) || - ((arp_table[i].state == ETHARP_STATE_PENDING) && - (arp_table[i].ctime >= ARP_MAXPENDING))) { - /* pending or stable entry has become old! */ - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %"U16_F".\n", - arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", (u16_t)i)); - /* clean up entries that have just been expired */ - etharp_free_entry(i); - } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { - /* Don't send more than one request every 2 seconds. */ - arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; - } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { - /* Reset state to stable, so that the next transmitted packet will - re-send an ARP request. */ - arp_table[i].state = ETHARP_STATE_STABLE; - } else if (arp_table[i].state == ETHARP_STATE_PENDING) { - /* still pending, resend an ARP query */ - etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); - } - } - } -} - -/** - * Search the ARP table for a matching or new entry. - * - * If an IP address is given, return a pending or stable ARP entry that matches - * the address. If no match is found, create a new entry with this address set, - * but in state ETHARP_EMPTY. The caller must check and possibly change the - * state of the returned entry. - * - * If ipaddr is NULL, return a initialized new entry in state ETHARP_EMPTY. - * - * In all cases, attempt to create new entries from an empty entry. If no - * empty entries are available and ETHARP_FLAG_TRY_HARD flag is set, recycle - * old entries. Heuristic choose the least important entry for recycling. - * - * @param ipaddr IP address to find in ARP cache, or to add if not found. - * @param flags See @ref etharp_state - * @param netif netif related to this address (used for NETIF_HWADDRHINT) - * - * @return The ARP entry index that matched or is created, ERR_MEM if no - * entry is found or could be recycled. - */ -static s8_t -etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) -{ - s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; - s8_t empty = ARP_TABLE_SIZE; - u8_t i = 0; - /* oldest entry with packets on queue */ - s8_t old_queue = ARP_TABLE_SIZE; - /* its age */ - u16_t age_queue = 0, age_pending = 0, age_stable = 0; - - LWIP_UNUSED_ARG(netif); - - /** - * a) do a search through the cache, remember candidates - * b) select candidate entry - * c) create new entry - */ - - /* a) in a single search sweep, do all of this - * 1) remember the first empty entry (if any) - * 2) remember the oldest stable entry (if any) - * 3) remember the oldest pending entry without queued packets (if any) - * 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) { - u8_t state = arp_table[i].state; - /* no empty entry found yet and now we do find one? */ - if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { - LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); - /* remember first empty entry */ - empty = i; - } else if (state != ETHARP_STATE_EMPTY) { - 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)) -#endif /* ETHARP_TABLE_MATCH_NETIF */ - ) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %"U16_F"\n", (u16_t)i)); - /* found exact IP address match, simply bail out */ - return i; - } - /* pending entry? */ - if (state == ETHARP_STATE_PENDING) { - /* pending with queued packets? */ - if (arp_table[i].q != NULL) { - if (arp_table[i].ctime >= age_queue) { - old_queue = i; - age_queue = arp_table[i].ctime; - } - } else - /* pending without queued packets? */ - { - if (arp_table[i].ctime >= age_pending) { - old_pending = i; - age_pending = arp_table[i].ctime; - } - } - /* stable entry? */ - } else if (state >= ETHARP_STATE_STABLE) { -#if ETHARP_SUPPORT_STATIC_ENTRIES - /* 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) { - old_stable = i; - age_stable = arp_table[i].ctime; - } - } - } - } - } - /* { we have no match } => try to create a new entry */ - - /* don't create new entry, only search? */ - if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || - /* or no empty entry found and not allowed to recycle? */ - ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n")); - return (s8_t)ERR_MEM; - } - - /* b) choose the least destructive entry to recycle: - * 1) empty entry - * 2) oldest stable entry - * 3) oldest pending entry without queued packets - * 4) oldest pending entry with queued packets - * - * { ETHARP_FLAG_TRY_HARD is set at this point } - */ - - /* 1) empty entry available? */ - if (empty < ARP_TABLE_SIZE) { - i = empty; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %"U16_F"\n", (u16_t)i)); - } else { - /* 2) found recyclable stable entry? */ - if (old_stable < ARP_TABLE_SIZE) { - /* recycle oldest stable*/ - i = old_stable; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %"U16_F"\n", (u16_t)i)); - /* no queued packets should exist on stable entries */ - LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); - /* 3) found recyclable pending entry without queued packets? */ - } else if (old_pending < ARP_TABLE_SIZE) { - /* recycle oldest pending */ - i = old_pending; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F" (without queue)\n", (u16_t)i)); - /* 4) found recyclable pending entry with queued packets? */ - } else if (old_queue < ARP_TABLE_SIZE) { - /* recycle oldest pending (queued packets are free in etharp_free_entry) */ - i = old_queue; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F", freeing packet queue %p\n", (u16_t)i, (void *)(arp_table[i].q))); - /* no empty or recyclable entries found */ - } else { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty or recyclable entries found\n")); - return (s8_t)ERR_MEM; - } - - /* { empty or recyclable entry found } */ - LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); - etharp_free_entry(i); - } - - LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); - LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", - arp_table[i].state == ETHARP_STATE_EMPTY); - - /* IP address given? */ - if (ipaddr != NULL) { - /* set IP address */ - ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); - } - arp_table[i].ctime = 0; -#if ETHARP_TABLE_MATCH_NETIF - arp_table[i].netif = netif; -#endif /* ETHARP_TABLE_MATCH_NETIF*/ - return (err_t)i; -} - -/** - * Update (or insert) a IP/MAC address pair in the ARP cache. - * - * If a pending entry is resolved, any queued packets will be sent - * at this point. - * - * @param netif netif related to this entry (used for NETIF_ADDRHINT) - * @param ipaddr IP address of the inserted ARP entry. - * @param ethaddr Ethernet address of the inserted ARP entry. - * @param flags See @ref etharp_state - * - * @return - * - ERR_OK Successfully updated ARP cache. - * - ERR_MEM If we could not add a new ARP entry when ETHARP_FLAG_TRY_HARD was set. - * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. - * - * @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) -{ - s8_t i; - LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); - 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) || - ip4_addr_isbroadcast(ipaddr, netif) || - ip4_addr_ismulticast(ipaddr)) { - 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); - /* bail out if no entry could be found */ - if (i < 0) { - return (err_t)i; - } - -#if ETHARP_SUPPORT_STATIC_ENTRIES - if (flags & ETHARP_FLAG_STATIC_ENTRY) { - /* record static type */ - arp_table[i].state = ETHARP_STATE_STATIC; - } else if (arp_table[i].state == ETHARP_STATE_STATIC) { - /* found entry is a static type, don't overwrite it */ - return ERR_VAL; - } else -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - { - /* mark it stable */ - arp_table[i].state = ETHARP_STATE_STABLE; - } - - /* record network interface */ - arp_table[i].netif = netif; - /* 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", (s16_t)i)); - /* update address */ - ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); - /* reset time stamp */ - arp_table[i].ctime = 0; - /* this is where we will send out queued packets! */ -#if ARP_QUEUEING - while (arp_table[i].q != NULL) { - struct pbuf *p; - /* remember remainder of queue */ - struct etharp_q_entry *q = arp_table[i].q; - /* pop first item off the queue */ - arp_table[i].q = q->next; - /* 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) { - struct pbuf *p = arp_table[i].q; - arp_table[i].q = NULL; -#endif /* ARP_QUEUEING */ - /* send the queued IP packet */ - ethernet_output(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr, ETHTYPE_IP); - /* free the queued IP packet */ - pbuf_free(p); - } - return ERR_OK; -} - -#if ETHARP_SUPPORT_STATIC_ENTRIES -/** Add a new static entry to the ARP table. If an entry exists for the - * specified IP address, this entry is overwritten. - * If packets are queued for the specified IP address, they are sent out. - * - * @param ipaddr IP address for the new static entry - * @param ethaddr ethernet address for the new static entry - * @return See return values of etharp_add_static_entry - */ -err_t -etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr) -{ - struct netif *netif; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_add_static_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])); - - netif = ip4_route(ipaddr); - if (netif == NULL) { - return ERR_RTE; - } - - return etharp_update_arp_entry(netif, ipaddr, ethaddr, ETHARP_FLAG_TRY_HARD | ETHARP_FLAG_STATIC_ENTRY); -} - -/** Remove a static entry from the ARP table previously added with a call to - * etharp_add_static_entry. - * - * @param ipaddr IP address of the static entry to remove - * @return ERR_OK: entry removed - * ERR_MEM: entry wasn't found - * ERR_ARG: entry wasn't a static entry but a dynamic one - */ -err_t -etharp_remove_static_entry(const ip4_addr_t *ipaddr) -{ - s8_t i; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_remove_static_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); - - /* find or create ARP entry */ - i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY, NULL); - /* bail out if no entry could be found */ - if (i < 0) { - return (err_t)i; - } - - if (arp_table[i].state != ETHARP_STATE_STATIC) { - /* entry wasn't a static entry, cannot remove it */ - return ERR_ARG; - } - /* entry found, free it */ - etharp_free_entry(i); - return ERR_OK; -} -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - -/** - * Remove all ARP table entries of the specified netif. - * - * @param netif points to a network interface - */ -void -etharp_cleanup_netif(struct netif *netif) -{ - u8_t i; - - for (i = 0; i < ARP_TABLE_SIZE; ++i) { - u8_t state = arp_table[i].state; - if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { - etharp_free_entry(i); - } - } -} - -/** - * Finds (stable) ethernet/IP address pair from ARP table - * using interface and IP address index. - * @note the addresses in the ARP table are in network order! - * - * @param netif points to interface index - * @param ipaddr points to the (network order) IP address index - * @param eth_ret points to return pointer - * @param ip_ret points to return pointer - * @return table index if found, -1 otherwise - */ -s8_t -etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, - struct eth_addr **eth_ret, const ip4_addr_t **ip_ret) -{ - s8_t i; - - LWIP_ASSERT("eth_ret != NULL && ip_ret != NULL", - eth_ret != NULL && ip_ret != NULL); - - LWIP_UNUSED_ARG(netif); - - i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY, netif); - if ((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { - *eth_ret = &arp_table[i].ethaddr; - *ip_ret = &arp_table[i].ipaddr; - return i; - } - return -1; -} - -/** - * Possibility to iterate over stable ARP table entries - * - * @param i entry number, 0 to ARP_TABLE_SIZE - * @param ipaddr return value: IP address - * @param netif return value: points to interface - * @param eth_ret return value: ETH address - * @return 1 on valid index, 0 otherwise - */ -u8_t -etharp_get_entry(u8_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret) -{ - LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); - LWIP_ASSERT("netif != NULL", netif != NULL); - LWIP_ASSERT("eth_ret != NULL", eth_ret != NULL); - - if((i < ARP_TABLE_SIZE) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { - *ipaddr = &arp_table[i].ipaddr; - *netif = arp_table[i].netif; - *eth_ret = &arp_table[i].ethaddr; - return 1; - } else { - return 0; - } -} - -/** - * Responds to ARP requests to us. Upon ARP replies to us, add entry to cache - * send out queued IP packets. Updates cache with snooped address pairs. - * - * Should be called for incoming ARP packets. The pbuf in the argument - * is freed by this function. - * - * @param p The ARP packet that arrived on netif. Is freed by this function. - * @param netif The lwIP network interface on which the ARP packet pbuf arrived. - * - * @see pbuf_free() - */ -void -etharp_input(struct pbuf *p, struct netif *netif) -{ - struct etharp_hdr *hdr; - /* these are aligned properly, whereas the ARP header fields might not be */ - ip4_addr_t sipaddr, dipaddr; - u8_t for_us; - - LWIP_ERROR("netif != NULL", (netif != NULL), return;); - - hdr = (struct etharp_hdr *)p->payload; - - /* RFC 826 "Packet Reception": */ - if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || - (hdr->hwlen != ETH_HWADDR_LEN) || - (hdr->protolen != sizeof(ip4_addr_t)) || - (hdr->proto != PP_HTONS(ETHTYPE_IP))) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n", - hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen)); - ETHARP_STATS_INC(etharp.proterr); - ETHARP_STATS_INC(etharp.drop); - pbuf_free(p); - return; - } - ETHARP_STATS_INC(etharp.recv); - -#if LWIP_AUTOIP - /* We have to check if a host already has configured our random - * created link local address and continuously check if there is - * a host with this IP-address so we can detect collisions */ - autoip_arp_reply(netif, hdr); -#endif /* LWIP_AUTOIP */ - - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without - * structure packing (not using structure copy which breaks strict-aliasing rules). */ - IPADDR2_COPY(&sipaddr, &hdr->sipaddr); - IPADDR2_COPY(&dipaddr, &hdr->dipaddr); - - /* this interface is not configured? */ - if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { - for_us = 0; - } else { - /* ARP packet directed to us? */ - for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); - } - - /* ARP message directed to us? - -> add IP address in ARP cache; assume requester wants to talk to us, - can result in directly sending the queued packets for this host. - ARP message not directed to us? - -> update the source IP address in the cache, if present */ - etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), - for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); - - /* now act on the message itself */ - switch (hdr->opcode) { - /* ARP request? */ - case PP_HTONS(ARP_REQUEST): - /* ARP request. If it asked for our address, we send out a - * reply. In any case, we time-stamp any existing ARP entry, - * and possibly send out an IP packet that was queued on it. */ - - LWIP_DEBUGF (ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP request\n")); - /* ARP request for our address? */ - if (for_us) { - /* send ARP response */ - etharp_raw(netif, - (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, - (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), - &hdr->shwaddr, &sipaddr, - ARP_REPLY); - /* we are not configured? */ - } else if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { - /* { for_us == 0 and netif->ip_addr.addr == 0 } */ - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: we are unconfigured, ARP request ignored.\n")); - /* request was not directed to us */ - } else { - /* { for_us == 0 and netif->ip_addr.addr != 0 } */ - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP request was not for us.\n")); - } - break; - case PP_HTONS(ARP_REPLY): - /* ARP reply. We already updated the ARP cache earlier. */ - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP reply\n")); -#if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) - /* DHCP wants to know about ARP replies from any host with an - * IP address also offered to us by the DHCP server. We do not - * want to take a duplicate IP address on a single network. - * @todo How should we handle redundant (fail-over) interfaces? */ - dhcp_arp_reply(netif, &sipaddr); -#endif /* (LWIP_DHCP && DHCP_DOES_ARP_CHECK) */ - break; - default: - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode))); - ETHARP_STATS_INC(etharp.err); - break; - } - /* free ARP packet */ - pbuf_free(p); -} - -/** Just a small helper function that sends a pbuf to an ethernet address - * in the arp_table specified by the index 'arp_idx'. - */ -static err_t -etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) -{ - LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", - arp_table[arp_idx].state >= ETHARP_STATE_STABLE); - /* if arp table entry is about to expire: re-request it, - but only if its state is ETHARP_STATE_STABLE to prevent flooding the - network with ARP requests if this address is used frequently. */ - if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) { - if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { - /* issue a standard request using broadcast */ - if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { - arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; - } - } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { - /* issue a unicast request (for 15 seconds) to prevent unnecessary broadcast */ - if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) { - arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; - } - } - } - - return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); -} - -/** - * Resolve and fill-in Ethernet address header for outgoing IP packet. - * - * For IP multicast and broadcast, corresponding Ethernet addresses - * are selected and the packet is transmitted on the link. - * - * For unicast addresses, the packet is submitted to etharp_query(). In - * case the IP address is outside the local network, the IP address of - * the gateway is used. - * - * @param netif The lwIP network interface which the IP packet will be sent on. - * @param q The pbuf(s) containing the IP packet to be sent. - * @param ipaddr The IP address of the packet destination. - * - * @return - * - ERR_RTE No route to destination (no gateway to external networks), - * or the return type of either etharp_query() or ethernet_output(). - */ -err_t -etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) -{ - const struct eth_addr *dest; - struct eth_addr mcastaddr; - const ip4_addr_t *dst_addr = ipaddr; - - LWIP_ASSERT("netif != NULL", netif != NULL); - LWIP_ASSERT("q != NULL", q != NULL); - LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); - - /* Determine on destination hardware address. Broadcasts and multicasts - * are special, other IP addresses are looked up in the ARP table. */ - - /* broadcast destination IP address? */ - if (ip4_addr_isbroadcast(ipaddr, netif)) { - /* broadcast on Ethernet also */ - dest = (const struct eth_addr *)ðbroadcast; - /* multicast destination IP address? */ - } else if (ip4_addr_ismulticast(ipaddr)) { - /* Hash IP multicast address to MAC address.*/ - mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; - mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; - mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; - mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; - mcastaddr.addr[4] = ip4_addr3(ipaddr); - mcastaddr.addr[5] = ip4_addr4(ipaddr); - /* destination Ethernet address is multicast */ - dest = &mcastaddr; - /* unicast destination IP address? */ - } else { - s8_t i; - /* outside local network? if so, this can neither be a global broadcast nor - a subnet broadcast. */ - if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && - !ip4_addr_islinklocal(ipaddr)) { -#if LWIP_AUTOIP - struct ip_hdr *iphdr = LWIP_ALIGNMENT_CAST(struct ip_hdr*, q->payload); - /* According to RFC 3297, chapter 2.6.2 (Forwarding Rules), a packet with - a link-local source address must always be "directly to its destination - on the same physical link. The host MUST NOT send the packet to any - router for forwarding". */ - if (!ip4_addr_islinklocal(&iphdr->src)) -#endif /* LWIP_AUTOIP */ - { -#ifdef LWIP_HOOK_ETHARP_GET_GW - /* For advanced routing, a single default gateway might not be enough, so get - the IP address of the gateway to handle the current destination address. */ - dst_addr = LWIP_HOOK_ETHARP_GET_GW(netif, ipaddr); - if (dst_addr == NULL) -#endif /* LWIP_HOOK_ETHARP_GET_GW */ - { - /* interface has default gateway? */ - if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) { - /* send to hardware address of default gateway IP address */ - dst_addr = netif_ip4_gw(netif); - /* no default gateway available */ - } else { - /* no route to destination error (default gateway missing) */ - return ERR_RTE; - } - } - } - } -#if LWIP_NETIF_HWADDRHINT - if (netif->addr_hint != NULL) { - /* per-pcb cached entry was given */ - u8_t etharp_cached_entry = *(netif->addr_hint); - if (etharp_cached_entry < ARP_TABLE_SIZE) { -#endif /* LWIP_NETIF_HWADDRHINT */ - if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && -#if ETHARP_TABLE_MATCH_NETIF - (arp_table[etharp_cached_entry].netif == netif) && -#endif - (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { - /* the per-pcb-cached entry is stable and the right one! */ - ETHARP_STATS_INC(etharp.cachehit); - return etharp_output_to_arp_index(netif, q, etharp_cached_entry); - } -#if LWIP_NETIF_HWADDRHINT - } - } -#endif /* LWIP_NETIF_HWADDRHINT */ - - /* find stable entry: do this here since this is a critical path for - throughput and etharp_find_entry() is kind of slow */ - for (i = 0; i < ARP_TABLE_SIZE; i++) { - if ((arp_table[i].state >= ETHARP_STATE_STABLE) && -#if ETHARP_TABLE_MATCH_NETIF - (arp_table[i].netif == netif) && -#endif - (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { - /* found an existing, stable entry */ - ETHARP_SET_HINT(netif, i); - return etharp_output_to_arp_index(netif, q, i); - } - } - /* no stable entry found, use the (slower) query function: - queue on destination Ethernet address belonging to ipaddr */ - return etharp_query(netif, dst_addr, q); - } - - /* continuation for multicast/broadcast destinations */ - /* obtain source Ethernet address of the given interface */ - /* send packet directly on the link */ - return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), dest, ETHTYPE_IP); -} - -/** - * Send an ARP request for the given IP address and/or queue a packet. - * - * If the IP address was not yet in the cache, a pending ARP cache entry - * is added and an ARP request is sent for the given address. The packet - * is queued on this entry. - * - * If the IP address was already pending in the cache, a new ARP request - * is sent for the given address. The packet is queued on this entry. - * - * If the IP address was already stable in the cache, and a packet is - * given, it is directly sent and no ARP request is sent out. - * - * If the IP address was already stable in the cache, and no packet is - * given, an ARP request is sent out. - * - * @param netif The lwIP network interface on which ipaddr - * must be queried for. - * @param ipaddr The IP address to be resolved. - * @param q If non-NULL, a pbuf that must be delivered to the IP address. - * q is not freed by this function. - * - * @note q must only be ONE packet, not a packet queue! - * - * @return - * - ERR_BUF Could not make room for Ethernet header. - * - ERR_MEM Hardware address unknown, and no more ARP entries available - * to query for address or queue the packet. - * - ERR_MEM Could not queue packet due to memory shortage. - * - ERR_RTE No route to destination (no gateway to external networks). - * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. - * - */ -err_t -etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) -{ - struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; - err_t result = ERR_MEM; - int is_new_entry = 0; - s8_t i; /* ARP entry index */ - - /* non-unicast address? */ - if (ip4_addr_isbroadcast(ipaddr, netif) || - ip4_addr_ismulticast(ipaddr) || - ip4_addr_isany(ipaddr)) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); - return ERR_ARG; - } - - /* find entry in ARP cache, ask to create entry if queueing packet */ - i = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); - - /* could not find or create entry? */ - if (i < 0) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not create ARP entry\n")); - if (q) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: packet dropped\n")); - ETHARP_STATS_INC(etharp.memerr); - } - return (err_t)i; - } - - /* mark a fresh entry as pending (we just sent a request) */ - if (arp_table[i].state == ETHARP_STATE_EMPTY) { - is_new_entry = 1; - arp_table[i].state = ETHARP_STATE_PENDING; - /* record network interface for re-sending arp request in etharp_tmr */ - arp_table[i].netif = netif; - } - - /* { i is either a STABLE or (new or existing) PENDING entry } */ - LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", - ((arp_table[i].state == ETHARP_STATE_PENDING) || - (arp_table[i].state >= ETHARP_STATE_STABLE))); - - /* do we have a new entry? or an implicit query request? */ - if (is_new_entry || (q == NULL)) { - /* try to resolve it; send out ARP request */ - result = etharp_request(netif, ipaddr); - if (result != ERR_OK) { - /* ARP request couldn't be sent */ - /* We don't re-send arp request in etharp_tmr, but we still queue packets, - since this failure could be temporary, and the next packet calling - etharp_query again could lead to sending the queued packets. */ - } - if (q == NULL) { - return result; - } - } - - /* packet given? */ - LWIP_ASSERT("q != NULL", q != NULL); - /* stable entry? */ - if (arp_table[i].state >= ETHARP_STATE_STABLE) { - /* we have a valid IP->Ethernet address mapping */ - ETHARP_SET_HINT(netif, i); - /* send the packet */ - result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); - /* pending entry? (either just created or already pending */ - } else if (arp_table[i].state == ETHARP_STATE_PENDING) { - /* entry is still pending, queue the given packet 'q' */ - struct pbuf *p; - int copy_needed = 0; - /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but - * to copy the whole queue into a new PBUF_RAM (see bug #11400) - * PBUF_ROMs can be left as they are, since ROM must not get changed. */ - p = q; - while (p) { - LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); - if (p->type != PBUF_ROM) { - copy_needed = 1; - break; - } - p = p->next; - } - if (copy_needed) { - /* copy the whole packet into new pbufs */ - p = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); - if (p != NULL) { - if (pbuf_copy(p, q) != ERR_OK) { - pbuf_free(p); - p = NULL; - } - } - } else { - /* referencing the old pbuf is enough */ - p = q; - pbuf_ref(p); - } - /* packet could be taken over? */ - if (p != NULL) { - /* queue packet ... */ -#if ARP_QUEUEING - struct etharp_q_entry *new_entry; - /* allocate a new arp queue entry */ - new_entry = (struct etharp_q_entry *)memp_malloc(MEMP_ARP_QUEUE); - if (new_entry != NULL) { - unsigned int qlen = 0; - new_entry->next = 0; - new_entry->p = p; - if (arp_table[i].q != NULL) { - /* queue was already existent, append the new entry to the end */ - struct etharp_q_entry *r; - r = arp_table[i].q; - qlen++; - while (r->next != NULL) { - r = r->next; - qlen++; - } - r->next = new_entry; - } else { - /* queue did not exist, first item in queue */ - arp_table[i].q = new_entry; - } -#if ARP_QUEUE_LEN - if (qlen >= ARP_QUEUE_LEN) { - struct etharp_q_entry *old; - old = arp_table[i].q; - arp_table[i].q = arp_table[i].q->next; - pbuf_free(old->p); - memp_free(MEMP_ARP_QUEUE, old); - } -#endif - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); - result = ERR_OK; - } else { - /* the pool MEMP_ARP_QUEUE is empty */ - pbuf_free(p); - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); - result = ERR_MEM; - } -#else /* ARP_QUEUEING */ - /* always queue one packet per ARP request only, freeing a previously queued packet */ - if (arp_table[i].q != NULL) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); - pbuf_free(arp_table[i].q); - } - arp_table[i].q = p; - result = ERR_OK; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); -#endif /* ARP_QUEUEING */ - } else { - ETHARP_STATS_INC(etharp.memerr); - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); - result = ERR_MEM; - } - } - return result; -} - -/** - * Send a raw ARP packet (opcode and all addresses can be modified) - * - * @param netif the lwip network interface on which to send the ARP packet - * @param ethsrc_addr the source MAC address for the ethernet header - * @param ethdst_addr the destination MAC address for the ethernet header - * @param hwsrc_addr the source MAC address for the ARP protocol header - * @param ipsrc_addr the source IP address for the ARP protocol header - * @param hwdst_addr the destination MAC address for the ARP protocol header - * @param ipdst_addr the destination IP address for the ARP protocol header - * @param opcode the type of the ARP packet - * @return ERR_OK if the ARP packet has been sent - * ERR_MEM if the ARP packet couldn't be allocated - * any other err_t on failure - */ -static err_t -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) -{ - struct pbuf *p; - err_t result = ERR_OK; - struct etharp_hdr *hdr; - - LWIP_ASSERT("netif != NULL", netif != NULL); - - /* allocate a pbuf for the outgoing ARP request packet */ - p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); - /* could allocate a pbuf for an ARP request? */ - if (p == NULL) { - 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", - (p->len >= SIZEOF_ETHARP_HDR)); - - hdr = (struct etharp_hdr *)p->payload; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); - hdr->opcode = lwip_htons(opcode); - - LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", - (netif->hwaddr_len == ETH_HWADDR_LEN)); - - /* Write the ARP MAC-Addresses */ - ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); - ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); - /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without - * structure packing. */ - IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); - IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); - - hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); - hdr->proto = PP_HTONS(ETHTYPE_IP); - /* set hwlen and protolen */ - hdr->hwlen = ETH_HWADDR_LEN; - hdr->protolen = sizeof(ip4_addr_t); - - /* send ARP query */ -#if LWIP_AUTOIP - /* If we are using Link-Local, all ARP packets that contain a Link-Local - * 'sender IP address' MUST be sent using link-layer broadcast instead of - * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ - 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); - } - - ETHARP_STATS_INC(etharp.xmit); - /* free ARP query packet */ - pbuf_free(p); - p = NULL; - /* could not allocate pbuf for ARP request */ - - return result; -} - -/** - * Send an ARP request packet asking for ipaddr to a specific eth address. - * Used to send unicast request to refresh the ARP table just before an entry - * times out - * - * @param netif the lwip network interface on which to send the request - * @param ipaddr the IP address for which to ask - * @param hw_dst_addr the ethernet address to send this packet to - * @return ERR_OK if the request has been sent - * 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) -{ - return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, - (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, - ipaddr, ARP_REQUEST); -} - -/** - * Send an ARP request packet asking for ipaddr. - * - * @param netif the lwip network interface on which to send the request - * @param ipaddr the IP address for which to ask - * @return ERR_OK if the request has been sent - * 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) -{ - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); - return etharp_request_dst(netif, ipaddr, ðbroadcast); -} -#endif /* LWIP_IPV4 && LWIP_ARP */ - -#endif /* LWIP_ARP || LWIP_ETHERNET */ +/** + * @file + * Address Resolution Protocol module for IP over Ethernet + * + * Functionally, ARP is divided into two parts. The first maps an IP address + * to a physical address when sending a packet, and the second part answers + * requests from other machines for our physical address. + * + * This implementation complies with RFC 826 (Ethernet ARP). It supports + * Gratuitious ARP from RFC3220 (IP Mobility Support for IPv4) section 4.6 + * if an interface calls etharp_gratuitous(our_netif) upon address change. + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * Copyright (c) 2003-2004 Leon Woestenberg + * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/opt.h" + +#if LWIP_ARP || LWIP_ETHERNET + +#include "lwip/etharp.h" +#include "lwip/stats.h" +#include "lwip/snmp.h" +#include "lwip/dhcp.h" +#include "lwip/autoip.h" +#include "netif/ethernet.h" + +#include + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */ + +/** Re-request a used ARP entry 1 minute before it would expire to prevent + * breaking a steadily used connection because the ARP entry timed out. */ +#define ARP_AGE_REREQUEST_USED_UNICAST (ARP_MAXAGE - 30) +#define ARP_AGE_REREQUEST_USED_BROADCAST (ARP_MAXAGE - 15) + +/** the time an ARP entry stays pending after first request, + * for ARP_TMR_INTERVAL = 1000, this is + * 10 seconds. + * + * @internal Keep this number at least 2, otherwise it might + * run out instantly if the timeout occurs directly after a request. + */ +#define ARP_MAXPENDING 5 + +/** ARP states */ +enum etharp_state { + ETHARP_STATE_EMPTY = 0, + ETHARP_STATE_PENDING, + ETHARP_STATE_STABLE, + ETHARP_STATE_STABLE_REREQUESTING_1, + ETHARP_STATE_STABLE_REREQUESTING_2 +#if ETHARP_SUPPORT_STATIC_ENTRIES + ,ETHARP_STATE_STATIC +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ +}; + +struct etharp_entry { +#if ARP_QUEUEING + /** Pointer to queue of pending outgoing packets on this ARP entry. */ + struct etharp_q_entry *q; +#else /* ARP_QUEUEING */ + /** Pointer to a single pending outgoing packet on this ARP entry. */ + struct pbuf *q; +#endif /* ARP_QUEUEING */ + ip4_addr_t ipaddr; + struct netif *netif; + struct eth_addr ethaddr; + u16_t ctime; + u8_t state; +}; + +static struct etharp_entry arp_table[ARP_TABLE_SIZE]; + +#if !LWIP_NETIF_HWADDRHINT +static u8_t etharp_cached_entry; +#endif /* !LWIP_NETIF_HWADDRHINT */ + +/** Try hard to create a new entry - we want the IP address to appear in + the cache (even if this means removing an active entry or so). */ +#define ETHARP_FLAG_TRY_HARD 1 +#define ETHARP_FLAG_FIND_ONLY 2 +#if ETHARP_SUPPORT_STATIC_ENTRIES +#define ETHARP_FLAG_STATIC_ENTRY 4 +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ + +#if LWIP_NETIF_HWADDRHINT +#define ETHARP_SET_HINT(netif, hint) if (((netif) != NULL) && ((netif)->addr_hint != NULL)) \ + *((netif)->addr_hint) = (hint); +#else /* LWIP_NETIF_HWADDRHINT */ +#define ETHARP_SET_HINT(netif, hint) (etharp_cached_entry = (hint)) +#endif /* LWIP_NETIF_HWADDRHINT */ + + +/* Some checks, instead of etharp_init(): */ +#if (LWIP_ARP && (ARP_TABLE_SIZE > 0x7f)) + #error "ARP_TABLE_SIZE must fit in an s8_t, you have to reduce it in your lwipopts.h" +#endif + + +static err_t etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr* hw_dst_addr); +static err_t 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); + +#if ARP_QUEUEING +/** + * Free a complete queue of etharp entries + * + * @param q a qeueue of etharp_q_entry's to free + */ +static void +free_etharp_q(struct etharp_q_entry *q) +{ + struct etharp_q_entry *r; + LWIP_ASSERT("q != NULL", q != NULL); + LWIP_ASSERT("q->p != NULL", q->p != NULL); + while (q) { + r = q; + q = q->next; + LWIP_ASSERT("r->p != NULL", (r->p != NULL)); + pbuf_free(r->p); + memp_free(MEMP_ARP_QUEUE, r); + } +} +#else /* ARP_QUEUEING */ + +/** Compatibility define: free the queued pbuf */ +#define free_etharp_q(q) pbuf_free(q) + +#endif /* ARP_QUEUEING */ + +/** Clean up ARP table entries */ +static void +etharp_free_entry(int i) +{ + /* 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) { + /* 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); + arp_table[i].q = NULL; + } + /* recycle entry for re-use */ + arp_table[i].state = ETHARP_STATE_EMPTY; +#ifdef LWIP_DEBUG + /* for debugging, clean out the complete entry */ + arp_table[i].ctime = 0; + arp_table[i].netif = NULL; + ip4_addr_set_zero(&arp_table[i].ipaddr); + arp_table[i].ethaddr = ethzero; +#endif /* LWIP_DEBUG */ +} + +/** + * Clears expired entries in the ARP table. + * + * This function should be called every ARP_TMR_INTERVAL milliseconds (1 second), + * in order to expire entries in the ARP table. + */ +void +etharp_tmr(void) +{ + u8_t i; + + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); + /* remove expired entries from the ARP table */ + for (i = 0; i < ARP_TABLE_SIZE; ++i) { + u8_t state = arp_table[i].state; + if (state != ETHARP_STATE_EMPTY +#if ETHARP_SUPPORT_STATIC_ENTRIES + && (state != ETHARP_STATE_STATIC) +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ + ) { + arp_table[i].ctime++; + if ((arp_table[i].ctime >= ARP_MAXAGE) || + ((arp_table[i].state == ETHARP_STATE_PENDING) && + (arp_table[i].ctime >= ARP_MAXPENDING))) { + /* pending or stable entry has become old! */ + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %"U16_F".\n", + arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", (u16_t)i)); + /* clean up entries that have just been expired */ + etharp_free_entry(i); + } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { + /* Don't send more than one request every 2 seconds. */ + arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; + } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { + /* Reset state to stable, so that the next transmitted packet will + re-send an ARP request. */ + arp_table[i].state = ETHARP_STATE_STABLE; + } else if (arp_table[i].state == ETHARP_STATE_PENDING) { + /* still pending, resend an ARP query */ + etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); + } + } + } +} + +/** + * Search the ARP table for a matching or new entry. + * + * If an IP address is given, return a pending or stable ARP entry that matches + * the address. If no match is found, create a new entry with this address set, + * but in state ETHARP_EMPTY. The caller must check and possibly change the + * state of the returned entry. + * + * If ipaddr is NULL, return a initialized new entry in state ETHARP_EMPTY. + * + * In all cases, attempt to create new entries from an empty entry. If no + * empty entries are available and ETHARP_FLAG_TRY_HARD flag is set, recycle + * old entries. Heuristic choose the least important entry for recycling. + * + * @param ipaddr IP address to find in ARP cache, or to add if not found. + * @param flags See @ref etharp_state + * @param netif netif related to this address (used for NETIF_HWADDRHINT) + * + * @return The ARP entry index that matched or is created, ERR_MEM if no + * entry is found or could be recycled. + */ +static s8_t +etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif* netif) +{ + s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; + s8_t empty = ARP_TABLE_SIZE; + u8_t i = 0; + /* oldest entry with packets on queue */ + s8_t old_queue = ARP_TABLE_SIZE; + /* its age */ + u16_t age_queue = 0, age_pending = 0, age_stable = 0; + + LWIP_UNUSED_ARG(netif); + + /** + * a) do a search through the cache, remember candidates + * b) select candidate entry + * c) create new entry + */ + + /* a) in a single search sweep, do all of this + * 1) remember the first empty entry (if any) + * 2) remember the oldest stable entry (if any) + * 3) remember the oldest pending entry without queued packets (if any) + * 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) { + u8_t state = arp_table[i].state; + /* no empty entry found yet and now we do find one? */ + if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { + LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); + /* remember first empty entry */ + empty = i; + } else if (state != ETHARP_STATE_EMPTY) { + 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)) +#endif /* ETHARP_TABLE_MATCH_NETIF */ + ) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %"U16_F"\n", (u16_t)i)); + /* found exact IP address match, simply bail out */ + return i; + } + /* pending entry? */ + if (state == ETHARP_STATE_PENDING) { + /* pending with queued packets? */ + if (arp_table[i].q != NULL) { + if (arp_table[i].ctime >= age_queue) { + old_queue = i; + age_queue = arp_table[i].ctime; + } + } else + /* pending without queued packets? */ + { + if (arp_table[i].ctime >= age_pending) { + old_pending = i; + age_pending = arp_table[i].ctime; + } + } + /* stable entry? */ + } else if (state >= ETHARP_STATE_STABLE) { +#if ETHARP_SUPPORT_STATIC_ENTRIES + /* 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) { + old_stable = i; + age_stable = arp_table[i].ctime; + } + } + } + } + } + /* { we have no match } => try to create a new entry */ + + /* don't create new entry, only search? */ + if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || + /* or no empty entry found and not allowed to recycle? */ + ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n")); + return (s8_t)ERR_MEM; + } + + /* b) choose the least destructive entry to recycle: + * 1) empty entry + * 2) oldest stable entry + * 3) oldest pending entry without queued packets + * 4) oldest pending entry with queued packets + * + * { ETHARP_FLAG_TRY_HARD is set at this point } + */ + + /* 1) empty entry available? */ + if (empty < ARP_TABLE_SIZE) { + i = empty; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %"U16_F"\n", (u16_t)i)); + } else { + /* 2) found recyclable stable entry? */ + if (old_stable < ARP_TABLE_SIZE) { + /* recycle oldest stable*/ + i = old_stable; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %"U16_F"\n", (u16_t)i)); + /* no queued packets should exist on stable entries */ + LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); + /* 3) found recyclable pending entry without queued packets? */ + } else if (old_pending < ARP_TABLE_SIZE) { + /* recycle oldest pending */ + i = old_pending; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F" (without queue)\n", (u16_t)i)); + /* 4) found recyclable pending entry with queued packets? */ + } else if (old_queue < ARP_TABLE_SIZE) { + /* recycle oldest pending (queued packets are free in etharp_free_entry) */ + i = old_queue; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F", freeing packet queue %p\n", (u16_t)i, (void *)(arp_table[i].q))); + /* no empty or recyclable entries found */ + } else { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty or recyclable entries found\n")); + return (s8_t)ERR_MEM; + } + + /* { empty or recyclable entry found } */ + LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); + etharp_free_entry(i); + } + + LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); + LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", + arp_table[i].state == ETHARP_STATE_EMPTY); + + /* IP address given? */ + if (ipaddr != NULL) { + /* set IP address */ + ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); + } + arp_table[i].ctime = 0; +#if ETHARP_TABLE_MATCH_NETIF + arp_table[i].netif = netif; +#endif /* ETHARP_TABLE_MATCH_NETIF*/ + return (err_t)i; +} + +/** + * Update (or insert) a IP/MAC address pair in the ARP cache. + * + * If a pending entry is resolved, any queued packets will be sent + * at this point. + * + * @param netif netif related to this entry (used for NETIF_ADDRHINT) + * @param ipaddr IP address of the inserted ARP entry. + * @param ethaddr Ethernet address of the inserted ARP entry. + * @param flags See @ref etharp_state + * + * @return + * - ERR_OK Successfully updated ARP cache. + * - ERR_MEM If we could not add a new ARP entry when ETHARP_FLAG_TRY_HARD was set. + * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. + * + * @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) +{ + s8_t i; + LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); + 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) || + ip4_addr_isbroadcast(ipaddr, netif) || + ip4_addr_ismulticast(ipaddr)) { + 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); + /* bail out if no entry could be found */ + if (i < 0) { + return (err_t)i; + } + +#if ETHARP_SUPPORT_STATIC_ENTRIES + if (flags & ETHARP_FLAG_STATIC_ENTRY) { + /* record static type */ + arp_table[i].state = ETHARP_STATE_STATIC; + } else if (arp_table[i].state == ETHARP_STATE_STATIC) { + /* found entry is a static type, don't overwrite it */ + return ERR_VAL; + } else +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ + { + /* mark it stable */ + arp_table[i].state = ETHARP_STATE_STABLE; + } + + /* record network interface */ + arp_table[i].netif = netif; + /* 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", (s16_t)i)); + /* update address */ + ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); + /* reset time stamp */ + arp_table[i].ctime = 0; + /* this is where we will send out queued packets! */ +#if ARP_QUEUEING + while (arp_table[i].q != NULL) { + struct pbuf *p; + /* remember remainder of queue */ + struct etharp_q_entry *q = arp_table[i].q; + /* pop first item off the queue */ + arp_table[i].q = q->next; + /* 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) { + struct pbuf *p = arp_table[i].q; + arp_table[i].q = NULL; +#endif /* ARP_QUEUEING */ + /* send the queued IP packet */ + ethernet_output(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr, ETHTYPE_IP); + /* free the queued IP packet */ + pbuf_free(p); + } + return ERR_OK; +} + +#if ETHARP_SUPPORT_STATIC_ENTRIES +/** Add a new static entry to the ARP table. If an entry exists for the + * specified IP address, this entry is overwritten. + * If packets are queued for the specified IP address, they are sent out. + * + * @param ipaddr IP address for the new static entry + * @param ethaddr ethernet address for the new static entry + * @return See return values of etharp_add_static_entry + */ +err_t +etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr) +{ + struct netif *netif; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_add_static_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])); + + netif = ip4_route(ipaddr); + if (netif == NULL) { + return ERR_RTE; + } + + return etharp_update_arp_entry(netif, ipaddr, ethaddr, ETHARP_FLAG_TRY_HARD | ETHARP_FLAG_STATIC_ENTRY); +} + +/** Remove a static entry from the ARP table previously added with a call to + * etharp_add_static_entry. + * + * @param ipaddr IP address of the static entry to remove + * @return ERR_OK: entry removed + * ERR_MEM: entry wasn't found + * ERR_ARG: entry wasn't a static entry but a dynamic one + */ +err_t +etharp_remove_static_entry(const ip4_addr_t *ipaddr) +{ + s8_t i; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_remove_static_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr))); + + /* find or create ARP entry */ + i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY, NULL); + /* bail out if no entry could be found */ + if (i < 0) { + return (err_t)i; + } + + if (arp_table[i].state != ETHARP_STATE_STATIC) { + /* entry wasn't a static entry, cannot remove it */ + return ERR_ARG; + } + /* entry found, free it */ + etharp_free_entry(i); + return ERR_OK; +} +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ + +/** + * Remove all ARP table entries of the specified netif. + * + * @param netif points to a network interface + */ +void +etharp_cleanup_netif(struct netif *netif) +{ + u8_t i; + + for (i = 0; i < ARP_TABLE_SIZE; ++i) { + u8_t state = arp_table[i].state; + if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { + etharp_free_entry(i); + } + } +} + +/** + * Finds (stable) ethernet/IP address pair from ARP table + * using interface and IP address index. + * @note the addresses in the ARP table are in network order! + * + * @param netif points to interface index + * @param ipaddr points to the (network order) IP address index + * @param eth_ret points to return pointer + * @param ip_ret points to return pointer + * @return table index if found, -1 otherwise + */ +s8_t +etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, + struct eth_addr **eth_ret, const ip4_addr_t **ip_ret) +{ + s8_t i; + + LWIP_ASSERT("eth_ret != NULL && ip_ret != NULL", + eth_ret != NULL && ip_ret != NULL); + + LWIP_UNUSED_ARG(netif); + + i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY, netif); + if ((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { + *eth_ret = &arp_table[i].ethaddr; + *ip_ret = &arp_table[i].ipaddr; + return i; + } + return -1; +} + +/** + * Possibility to iterate over stable ARP table entries + * + * @param i entry number, 0 to ARP_TABLE_SIZE + * @param ipaddr return value: IP address + * @param netif return value: points to interface + * @param eth_ret return value: ETH address + * @return 1 on valid index, 0 otherwise + */ +u8_t +etharp_get_entry(u8_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret) +{ + LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("eth_ret != NULL", eth_ret != NULL); + + if((i < ARP_TABLE_SIZE) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { + *ipaddr = &arp_table[i].ipaddr; + *netif = arp_table[i].netif; + *eth_ret = &arp_table[i].ethaddr; + return 1; + } else { + return 0; + } +} + +/** + * Responds to ARP requests to us. Upon ARP replies to us, add entry to cache + * send out queued IP packets. Updates cache with snooped address pairs. + * + * Should be called for incoming ARP packets. The pbuf in the argument + * is freed by this function. + * + * @param p The ARP packet that arrived on netif. Is freed by this function. + * @param netif The lwIP network interface on which the ARP packet pbuf arrived. + * + * @see pbuf_free() + */ +void +etharp_input(struct pbuf *p, struct netif *netif) +{ + struct etharp_hdr *hdr; + /* these are aligned properly, whereas the ARP header fields might not be */ + ip4_addr_t sipaddr, dipaddr; + u8_t for_us; + + LWIP_ERROR("netif != NULL", (netif != NULL), return;); + + hdr = (struct etharp_hdr *)p->payload; + + /* RFC 826 "Packet Reception": */ + if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || + (hdr->hwlen != ETH_HWADDR_LEN) || + (hdr->protolen != sizeof(ip4_addr_t)) || + (hdr->proto != PP_HTONS(ETHTYPE_IP))) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("etharp_input: packet dropped, wrong hw type, hwlen, proto, protolen or ethernet type (%"U16_F"/%"U16_F"/%"U16_F"/%"U16_F")\n", + hdr->hwtype, (u16_t)hdr->hwlen, hdr->proto, (u16_t)hdr->protolen)); + ETHARP_STATS_INC(etharp.proterr); + ETHARP_STATS_INC(etharp.drop); + pbuf_free(p); + return; + } + ETHARP_STATS_INC(etharp.recv); + +#if LWIP_AUTOIP + /* We have to check if a host already has configured our random + * created link local address and continuously check if there is + * a host with this IP-address so we can detect collisions */ + autoip_arp_reply(netif, hdr); +#endif /* LWIP_AUTOIP */ + + /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + * structure packing (not using structure copy which breaks strict-aliasing rules). */ + IPADDR2_COPY(&sipaddr, &hdr->sipaddr); + IPADDR2_COPY(&dipaddr, &hdr->dipaddr); + + /* this interface is not configured? */ + if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { + for_us = 0; + } else { + /* ARP packet directed to us? */ + for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); + } + + /* ARP message directed to us? + -> add IP address in ARP cache; assume requester wants to talk to us, + can result in directly sending the queued packets for this host. + ARP message not directed to us? + -> update the source IP address in the cache, if present */ + etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), + for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); + + /* now act on the message itself */ + switch (hdr->opcode) { + /* ARP request? */ + case PP_HTONS(ARP_REQUEST): + /* ARP request. If it asked for our address, we send out a + * reply. In any case, we time-stamp any existing ARP entry, + * and possibly send out an IP packet that was queued on it. */ + + LWIP_DEBUGF (ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP request\n")); + /* ARP request for our address? */ + if (for_us) { + /* send ARP response */ + etharp_raw(netif, + (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, + (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), + &hdr->shwaddr, &sipaddr, + ARP_REPLY); + /* we are not configured? */ + } else if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { + /* { for_us == 0 and netif->ip_addr.addr == 0 } */ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: we are unconfigured, ARP request ignored.\n")); + /* request was not directed to us */ + } else { + /* { for_us == 0 and netif->ip_addr.addr != 0 } */ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP request was not for us.\n")); + } + break; + case PP_HTONS(ARP_REPLY): + /* ARP reply. We already updated the ARP cache earlier. */ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP reply\n")); +#if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) + /* DHCP wants to know about ARP replies from any host with an + * IP address also offered to us by the DHCP server. We do not + * want to take a duplicate IP address on a single network. + * @todo How should we handle redundant (fail-over) interfaces? */ + dhcp_arp_reply(netif, &sipaddr); +#endif /* (LWIP_DHCP && DHCP_DOES_ARP_CHECK) */ + break; + default: + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: ARP unknown opcode type %"S16_F"\n", lwip_htons(hdr->opcode))); + ETHARP_STATS_INC(etharp.err); + break; + } + /* free ARP packet */ + pbuf_free(p); +} + +/** Just a small helper function that sends a pbuf to an ethernet address + * in the arp_table specified by the index 'arp_idx'. + */ +static err_t +etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) +{ + LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", + arp_table[arp_idx].state >= ETHARP_STATE_STABLE); + /* if arp table entry is about to expire: re-request it, + but only if its state is ETHARP_STATE_STABLE to prevent flooding the + network with ARP requests if this address is used frequently. */ + if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) { + if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { + /* issue a standard request using broadcast */ + if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { + arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; + } + } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { + /* issue a unicast request (for 15 seconds) to prevent unnecessary broadcast */ + if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) { + arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; + } + } + } + + return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); +} + +/** + * Resolve and fill-in Ethernet address header for outgoing IP packet. + * + * For IP multicast and broadcast, corresponding Ethernet addresses + * are selected and the packet is transmitted on the link. + * + * For unicast addresses, the packet is submitted to etharp_query(). In + * case the IP address is outside the local network, the IP address of + * the gateway is used. + * + * @param netif The lwIP network interface which the IP packet will be sent on. + * @param q The pbuf(s) containing the IP packet to be sent. + * @param ipaddr The IP address of the packet destination. + * + * @return + * - ERR_RTE No route to destination (no gateway to external networks), + * or the return type of either etharp_query() or ethernet_output(). + */ +err_t +etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) +{ + const struct eth_addr *dest; + struct eth_addr mcastaddr; + const ip4_addr_t *dst_addr = ipaddr; + + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("q != NULL", q != NULL); + LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); + + /* Determine on destination hardware address. Broadcasts and multicasts + * are special, other IP addresses are looked up in the ARP table. */ + + /* broadcast destination IP address? */ + if (ip4_addr_isbroadcast(ipaddr, netif)) { + /* broadcast on Ethernet also */ + dest = (const struct eth_addr *)ðbroadcast; + /* multicast destination IP address? */ + } else if (ip4_addr_ismulticast(ipaddr)) { + /* Hash IP multicast address to MAC address.*/ + mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; + mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; + mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; + mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; + mcastaddr.addr[4] = ip4_addr3(ipaddr); + mcastaddr.addr[5] = ip4_addr4(ipaddr); + /* destination Ethernet address is multicast */ + dest = &mcastaddr; + /* unicast destination IP address? */ + } else { + s8_t i; + /* outside local network? if so, this can neither be a global broadcast nor + a subnet broadcast. */ + if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && + !ip4_addr_islinklocal(ipaddr)) { +#if LWIP_AUTOIP + struct ip_hdr *iphdr = LWIP_ALIGNMENT_CAST(struct ip_hdr*, q->payload); + /* According to RFC 3297, chapter 2.6.2 (Forwarding Rules), a packet with + a link-local source address must always be "directly to its destination + on the same physical link. The host MUST NOT send the packet to any + router for forwarding". */ + if (!ip4_addr_islinklocal(&iphdr->src)) +#endif /* LWIP_AUTOIP */ + { +#ifdef LWIP_HOOK_ETHARP_GET_GW + /* For advanced routing, a single default gateway might not be enough, so get + the IP address of the gateway to handle the current destination address. */ + dst_addr = LWIP_HOOK_ETHARP_GET_GW(netif, ipaddr); + if (dst_addr == NULL) +#endif /* LWIP_HOOK_ETHARP_GET_GW */ + { + /* interface has default gateway? */ + if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) { + /* send to hardware address of default gateway IP address */ + dst_addr = netif_ip4_gw(netif); + /* no default gateway available */ + } else { + /* no route to destination error (default gateway missing) */ + return ERR_RTE; + } + } + } + } +#if LWIP_NETIF_HWADDRHINT + if (netif->addr_hint != NULL) { + /* per-pcb cached entry was given */ + u8_t etharp_cached_entry = *(netif->addr_hint); + if (etharp_cached_entry < ARP_TABLE_SIZE) { +#endif /* LWIP_NETIF_HWADDRHINT */ + if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && +#if ETHARP_TABLE_MATCH_NETIF + (arp_table[etharp_cached_entry].netif == netif) && +#endif + (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { + /* the per-pcb-cached entry is stable and the right one! */ + ETHARP_STATS_INC(etharp.cachehit); + return etharp_output_to_arp_index(netif, q, etharp_cached_entry); + } +#if LWIP_NETIF_HWADDRHINT + } + } +#endif /* LWIP_NETIF_HWADDRHINT */ + + /* find stable entry: do this here since this is a critical path for + throughput and etharp_find_entry() is kind of slow */ + for (i = 0; i < ARP_TABLE_SIZE; i++) { + if ((arp_table[i].state >= ETHARP_STATE_STABLE) && +#if ETHARP_TABLE_MATCH_NETIF + (arp_table[i].netif == netif) && +#endif + (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { + /* found an existing, stable entry */ + ETHARP_SET_HINT(netif, i); + return etharp_output_to_arp_index(netif, q, i); + } + } + /* no stable entry found, use the (slower) query function: + queue on destination Ethernet address belonging to ipaddr */ + return etharp_query(netif, dst_addr, q); + } + + /* continuation for multicast/broadcast destinations */ + /* obtain source Ethernet address of the given interface */ + /* send packet directly on the link */ + return ethernet_output(netif, q, (struct eth_addr*)(netif->hwaddr), dest, ETHTYPE_IP); +} + +/** + * Send an ARP request for the given IP address and/or queue a packet. + * + * If the IP address was not yet in the cache, a pending ARP cache entry + * is added and an ARP request is sent for the given address. The packet + * is queued on this entry. + * + * If the IP address was already pending in the cache, a new ARP request + * is sent for the given address. The packet is queued on this entry. + * + * If the IP address was already stable in the cache, and a packet is + * given, it is directly sent and no ARP request is sent out. + * + * If the IP address was already stable in the cache, and no packet is + * given, an ARP request is sent out. + * + * @param netif The lwIP network interface on which ipaddr + * must be queried for. + * @param ipaddr The IP address to be resolved. + * @param q If non-NULL, a pbuf that must be delivered to the IP address. + * q is not freed by this function. + * + * @note q must only be ONE packet, not a packet queue! + * + * @return + * - ERR_BUF Could not make room for Ethernet header. + * - ERR_MEM Hardware address unknown, and no more ARP entries available + * to query for address or queue the packet. + * - ERR_MEM Could not queue packet due to memory shortage. + * - ERR_RTE No route to destination (no gateway to external networks). + * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. + * + */ +err_t +etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q) +{ + struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; + err_t result = ERR_MEM; + int is_new_entry = 0; + s8_t i; /* ARP entry index */ + + /* non-unicast address? */ + if (ip4_addr_isbroadcast(ipaddr, netif) || + ip4_addr_ismulticast(ipaddr) || + ip4_addr_isany(ipaddr)) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); + return ERR_ARG; + } + + /* find entry in ARP cache, ask to create entry if queueing packet */ + i = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); + + /* could not find or create entry? */ + if (i < 0) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not create ARP entry\n")); + if (q) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: packet dropped\n")); + ETHARP_STATS_INC(etharp.memerr); + } + return (err_t)i; + } + + /* mark a fresh entry as pending (we just sent a request) */ + if (arp_table[i].state == ETHARP_STATE_EMPTY) { + is_new_entry = 1; + arp_table[i].state = ETHARP_STATE_PENDING; + /* record network interface for re-sending arp request in etharp_tmr */ + arp_table[i].netif = netif; + } + + /* { i is either a STABLE or (new or existing) PENDING entry } */ + LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", + ((arp_table[i].state == ETHARP_STATE_PENDING) || + (arp_table[i].state >= ETHARP_STATE_STABLE))); + + /* do we have a new entry? or an implicit query request? */ + if (is_new_entry || (q == NULL)) { + /* try to resolve it; send out ARP request */ + result = etharp_request(netif, ipaddr); + if (result != ERR_OK) { + /* ARP request couldn't be sent */ + /* We don't re-send arp request in etharp_tmr, but we still queue packets, + since this failure could be temporary, and the next packet calling + etharp_query again could lead to sending the queued packets. */ + } + if (q == NULL) { + return result; + } + } + + /* packet given? */ + LWIP_ASSERT("q != NULL", q != NULL); + /* stable entry? */ + if (arp_table[i].state >= ETHARP_STATE_STABLE) { + /* we have a valid IP->Ethernet address mapping */ + ETHARP_SET_HINT(netif, i); + /* send the packet */ + result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); + /* pending entry? (either just created or already pending */ + } else if (arp_table[i].state == ETHARP_STATE_PENDING) { + /* entry is still pending, queue the given packet 'q' */ + struct pbuf *p; + int copy_needed = 0; + /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but + * to copy the whole queue into a new PBUF_RAM (see bug #11400) + * PBUF_ROMs can be left as they are, since ROM must not get changed. */ + p = q; + while (p) { + LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); + if (p->type != PBUF_ROM) { + copy_needed = 1; + break; + } + p = p->next; + } + if (copy_needed) { + /* copy the whole packet into new pbufs */ + p = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); + if (p != NULL) { + if (pbuf_copy(p, q) != ERR_OK) { + pbuf_free(p); + p = NULL; + } + } + } else { + /* referencing the old pbuf is enough */ + p = q; + pbuf_ref(p); + } + /* packet could be taken over? */ + if (p != NULL) { + /* queue packet ... */ +#if ARP_QUEUEING + struct etharp_q_entry *new_entry; + /* allocate a new arp queue entry */ + new_entry = (struct etharp_q_entry *)memp_malloc(MEMP_ARP_QUEUE); + if (new_entry != NULL) { + unsigned int qlen = 0; + new_entry->next = 0; + new_entry->p = p; + if (arp_table[i].q != NULL) { + /* queue was already existent, append the new entry to the end */ + struct etharp_q_entry *r; + r = arp_table[i].q; + qlen++; + while (r->next != NULL) { + r = r->next; + qlen++; + } + r->next = new_entry; + } else { + /* queue did not exist, first item in queue */ + arp_table[i].q = new_entry; + } +#if ARP_QUEUE_LEN + if (qlen >= ARP_QUEUE_LEN) { + struct etharp_q_entry *old; + old = arp_table[i].q; + arp_table[i].q = arp_table[i].q->next; + pbuf_free(old->p); + memp_free(MEMP_ARP_QUEUE, old); + } +#endif + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); + result = ERR_OK; + } else { + /* the pool MEMP_ARP_QUEUE is empty */ + pbuf_free(p); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); + result = ERR_MEM; + } +#else /* ARP_QUEUEING */ + /* always queue one packet per ARP request only, freeing a previously queued packet */ + if (arp_table[i].q != NULL) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); + pbuf_free(arp_table[i].q); + } + arp_table[i].q = p; + result = ERR_OK; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); +#endif /* ARP_QUEUEING */ + } else { + ETHARP_STATS_INC(etharp.memerr); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); + result = ERR_MEM; + } + } + return result; +} + +/** + * Send a raw ARP packet (opcode and all addresses can be modified) + * + * @param netif the lwip network interface on which to send the ARP packet + * @param ethsrc_addr the source MAC address for the ethernet header + * @param ethdst_addr the destination MAC address for the ethernet header + * @param hwsrc_addr the source MAC address for the ARP protocol header + * @param ipsrc_addr the source IP address for the ARP protocol header + * @param hwdst_addr the destination MAC address for the ARP protocol header + * @param ipdst_addr the destination IP address for the ARP protocol header + * @param opcode the type of the ARP packet + * @return ERR_OK if the ARP packet has been sent + * ERR_MEM if the ARP packet couldn't be allocated + * any other err_t on failure + */ +static err_t +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) +{ + struct pbuf *p; + err_t result = ERR_OK; + struct etharp_hdr *hdr; + + LWIP_ASSERT("netif != NULL", netif != NULL); + + /* allocate a pbuf for the outgoing ARP request packet */ + p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); + /* could allocate a pbuf for an ARP request? */ + if (p == NULL) { + 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", + (p->len >= SIZEOF_ETHARP_HDR)); + + hdr = (struct etharp_hdr *)p->payload; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); + hdr->opcode = lwip_htons(opcode); + + LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", + (netif->hwaddr_len == ETH_HWADDR_LEN)); + + /* Write the ARP MAC-Addresses */ + ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); + ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); + /* Copy struct ip4_addr2 to aligned ip4_addr, to support compilers without + * structure packing. */ + IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); + IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); + + hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); + hdr->proto = PP_HTONS(ETHTYPE_IP); + /* set hwlen and protolen */ + hdr->hwlen = ETH_HWADDR_LEN; + hdr->protolen = sizeof(ip4_addr_t); + + /* send ARP query */ +#if LWIP_AUTOIP + /* If we are using Link-Local, all ARP packets that contain a Link-Local + * 'sender IP address' MUST be sent using link-layer broadcast instead of + * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ + 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); + } + + ETHARP_STATS_INC(etharp.xmit); + /* free ARP query packet */ + pbuf_free(p); + p = NULL; + /* could not allocate pbuf for ARP request */ + + return result; +} + +/** + * Send an ARP request packet asking for ipaddr to a specific eth address. + * Used to send unicast request to refresh the ARP table just before an entry + * times out + * + * @param netif the lwip network interface on which to send the request + * @param ipaddr the IP address for which to ask + * @param hw_dst_addr the ethernet address to send this packet to + * @return ERR_OK if the request has been sent + * 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) +{ + return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, + (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, + ipaddr, ARP_REQUEST); +} + +/** + * Send an ARP request packet asking for ipaddr. + * + * @param netif the lwip network interface on which to send the request + * @param ipaddr the IP address for which to ask + * @return ERR_OK if the request has been sent + * 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) +{ + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); + return etharp_request_dst(netif, ipaddr, ðbroadcast); +} +#endif /* LWIP_IPV4 && LWIP_ARP */ + +#endif /* LWIP_ARP || LWIP_ETHERNET */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.c index 5ee24ee..774b72b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/icmp.c @@ -1,397 +1,397 @@ -/** - * @file - * ICMP - Internet Control Message Protocol - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -/* Some ICMP messages should be passed to the transport protocols. This - is not implemented. */ - -#include "lwip/opt.h" - -#if LWIP_IPV4 && LWIP_ICMP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/icmp.h" -#include "lwip/inet_chksum.h" -#include "lwip/ip.h" -#include "lwip/def.h" -#include "lwip/stats.h" - -#include - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -/** Small optimization: set to 0 if incoming PBUF_POOL pbuf always can be - * used to modify and send a response packet (and to 1 if this is not the case, - * e.g. when link header is stripped of when receiving) */ -#ifndef LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN -#define LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 1 -#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ - -/* The amount of data from the original packet to return in a dest-unreachable */ -#define ICMP_DEST_UNREACH_DATASIZE 8 - -static void icmp_send_response(struct pbuf *p, u8_t type, u8_t code); - -/** - * Processes ICMP input packets, called from ip_input(). - * - * Currently only processes icmp echo requests and sends - * out the echo response. - * - * @param p the icmp echo request packet, p->payload pointing to the icmp header - * @param inp the netif on which this packet was received - */ -void -icmp_input(struct pbuf *p, struct netif *inp) -{ - u8_t type; -#ifdef LWIP_DEBUG - u8_t code; -#endif /* LWIP_DEBUG */ - struct icmp_echo_hdr *iecho; - const struct ip_hdr *iphdr_in; - u16_t hlen; - const ip4_addr_t* src; - - ICMP_STATS_INC(icmp.recv); - MIB2_STATS_INC(mib2.icmpinmsgs); - - iphdr_in = ip4_current_header(); - hlen = IPH_HL(iphdr_in) * 4; - if (hlen < IP_HLEN) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); - goto lenerr; - } - if (p->len < sizeof(u16_t)*2) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); - goto lenerr; - } - - type = *((u8_t *)p->payload); -#ifdef LWIP_DEBUG - code = *(((u8_t *)p->payload)+1); -#endif /* LWIP_DEBUG */ - switch (type) { - case ICMP_ER: - /* This is OK, echo reply might have been parsed by a raw PCB - (as obviously, an echo request has been sent, too). */ - MIB2_STATS_INC(mib2.icmpinechoreps); - break; - case ICMP_ECHO: - MIB2_STATS_INC(mib2.icmpinechos); - src = ip4_current_dest_addr(); - /* multicast destination address? */ - if (ip4_addr_ismulticast(ip4_current_dest_addr())) { -#if LWIP_MULTICAST_PING - /* For multicast, use address of receiving interface as source address */ - src = netif_ip4_addr(inp); -#else /* LWIP_MULTICAST_PING */ - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n")); - goto icmperr; -#endif /* LWIP_MULTICAST_PING */ - } - /* broadcast destination address? */ - if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { -#if LWIP_BROADCAST_PING - /* For broadcast, use address of receiving interface as source address */ - src = netif_ip4_addr(inp); -#else /* LWIP_BROADCAST_PING */ - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n")); - goto icmperr; -#endif /* LWIP_BROADCAST_PING */ - } - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); - if (p->tot_len < sizeof(struct icmp_echo_hdr)) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); - goto lenerr; - } -#if CHECKSUM_CHECK_ICMP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP) { - if (inet_chksum_pbuf(p) != 0) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); - pbuf_free(p); - ICMP_STATS_INC(icmp.chkerr); - MIB2_STATS_INC(mib2.icmpinerrors); - return; - } - } -#endif -#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN - if (pbuf_header(p, (s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { - /* p is not big enough to contain link headers - * allocate a new one and copy p into it - */ - struct pbuf *r; - /* allocate new packet buffer with space for link headers */ - r = pbuf_alloc(PBUF_LINK, p->tot_len + hlen, PBUF_RAM); - if (r == NULL) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); - goto icmperr; - } - if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); - pbuf_free(r); - goto icmperr; - } - /* copy the ip header */ - MEMCPY(r->payload, iphdr_in, hlen); - /* switch r->payload back to icmp header (cannot fail) */ - if (pbuf_header(r, (s16_t)-hlen)) { - LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); - pbuf_free(r); - goto icmperr; - } - /* copy the rest of the packet without ip header */ - if (pbuf_copy(r, p) != ERR_OK) { - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); - pbuf_free(r); - goto icmperr; - } - /* free the original p */ - pbuf_free(p); - /* we now have an identical copy of p that has room for link headers */ - p = r; - } else { - /* restore p->payload to point to icmp header (cannot fail) */ - if (pbuf_header(p, -(s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { - LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); - goto icmperr; - } - } -#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ - /* At this point, all checks are OK. */ - /* We generate an answer by switching the dest and src ip addresses, - * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ - iecho = (struct icmp_echo_hdr *)p->payload; - if (pbuf_header(p, (s16_t)hlen)) { - LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet")); - } else { - err_t ret; - struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; - ip4_addr_copy(iphdr->src, *src); - ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); - ICMPH_TYPE_SET(iecho, ICMP_ER); -#if CHECKSUM_GEN_ICMP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) { - /* adjust the checksum */ - if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { - iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1; - } else { - iecho->chksum += PP_HTONS(ICMP_ECHO << 8); - } - } -#if LWIP_CHECKSUM_CTRL_PER_NETIF - else { - iecho->chksum = 0; - } -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ -#else /* CHECKSUM_GEN_ICMP */ - iecho->chksum = 0; -#endif /* CHECKSUM_GEN_ICMP */ - - /* Set the correct TTL and recalculate the header checksum. */ - IPH_TTL_SET(iphdr, ICMP_TTL); - IPH_CHKSUM_SET(iphdr, 0); -#if CHECKSUM_GEN_IP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_IP) { - IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, hlen)); - } -#endif /* CHECKSUM_GEN_IP */ - - ICMP_STATS_INC(icmp.xmit); - /* increase number of messages attempted to send */ - MIB2_STATS_INC(mib2.icmpoutmsgs); - /* increase number of echo replies attempted to send */ - MIB2_STATS_INC(mib2.icmpoutechoreps); - - /* send an ICMP packet */ - ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, - ICMP_TTL, 0, IP_PROTO_ICMP, inp); - if (ret != ERR_OK) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret))); - } - } - break; - default: - if (type == ICMP_DUR) { - MIB2_STATS_INC(mib2.icmpindestunreachs); - } else if (type == ICMP_TE) { - MIB2_STATS_INC(mib2.icmpintimeexcds); - } else if (type == ICMP_PP) { - MIB2_STATS_INC(mib2.icmpinparmprobs); - } else if (type == ICMP_SQ) { - MIB2_STATS_INC(mib2.icmpinsrcquenchs); - } else if (type == ICMP_RD) { - MIB2_STATS_INC(mib2.icmpinredirects); - } else if (type == ICMP_TS) { - MIB2_STATS_INC(mib2.icmpintimestamps); - } else if (type == ICMP_TSR) { - MIB2_STATS_INC(mib2.icmpintimestampreps); - } else if (type == ICMP_AM) { - MIB2_STATS_INC(mib2.icmpinaddrmasks); - } else if (type == ICMP_AMR) { - MIB2_STATS_INC(mib2.icmpinaddrmaskreps); - } - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", - (s16_t)type, (s16_t)code)); - ICMP_STATS_INC(icmp.proterr); - ICMP_STATS_INC(icmp.drop); - } - pbuf_free(p); - return; -lenerr: - pbuf_free(p); - ICMP_STATS_INC(icmp.lenerr); - MIB2_STATS_INC(mib2.icmpinerrors); - return; -#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING -icmperr: - pbuf_free(p); - ICMP_STATS_INC(icmp.err); - MIB2_STATS_INC(mib2.icmpinerrors); - return; -#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ -} - -/** - * Send an icmp 'destination unreachable' packet, called from ip_input() if - * the transport layer protocol is unknown and from udp_input() if the local - * port is not bound. - * - * @param p the input packet for which the 'unreachable' should be sent, - * p->payload pointing to the IP header - * @param t type of the 'unreachable' packet - */ -void -icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) -{ - MIB2_STATS_INC(mib2.icmpoutdestunreachs); - icmp_send_response(p, ICMP_DUR, t); -} - -#if IP_FORWARD || IP_REASSEMBLY -/** - * Send a 'time exceeded' packet, called from ip_forward() if TTL is 0. - * - * @param p the input packet for which the 'time exceeded' should be sent, - * p->payload pointing to the IP header - * @param t type of the 'time exceeded' packet - */ -void -icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t) -{ - MIB2_STATS_INC(mib2.icmpouttimeexcds); - icmp_send_response(p, ICMP_TE, t); -} - -#endif /* IP_FORWARD || IP_REASSEMBLY */ - -/** - * Send an icmp packet in response to an incoming packet. - * - * @param p the input packet for which the 'unreachable' should be sent, - * p->payload pointing to the IP header - * @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) -{ - struct pbuf *q; - struct ip_hdr *iphdr; - /* we can use the echo header here */ - struct icmp_echo_hdr *icmphdr; - ip4_addr_t iphdr_src; - struct netif *netif; - - /* 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, - PBUF_RAM); - if (q == NULL) { - 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", - (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); - - iphdr = (struct ip_hdr *)p->payload; - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded from ")); - 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; - icmphdr->type = type; - icmphdr->code = code; - icmphdr->id = 0; - icmphdr->seqno = 0; - - /* copy fields from original packet */ - SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, - IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); - - ip4_addr_copy(iphdr_src, iphdr->src); -#ifdef LWIP_HOOK_IP4_ROUTE_SRC - { - ip4_addr_t iphdr_dst; - ip4_addr_copy(iphdr_dst, iphdr->dest); - netif = ip4_route_src(&iphdr_src, &iphdr_dst); - } -#else - netif = ip4_route(&iphdr_src); -#endif - if (netif != NULL) { - /* calculate checksum */ - icmphdr->chksum = 0; -#if CHECKSUM_GEN_ICMP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) { - icmphdr->chksum = inet_chksum(icmphdr, q->len); - } -#endif - ICMP_STATS_INC(icmp.xmit); - ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif); - } - pbuf_free(q); -} - -#endif /* LWIP_IPV4 && LWIP_ICMP */ +/** + * @file + * ICMP - Internet Control Message Protocol + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +/* Some ICMP messages should be passed to the transport protocols. This + is not implemented. */ + +#include "lwip/opt.h" + +#if LWIP_IPV4 && LWIP_ICMP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/icmp.h" +#include "lwip/inet_chksum.h" +#include "lwip/ip.h" +#include "lwip/def.h" +#include "lwip/stats.h" + +#include + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +/** Small optimization: set to 0 if incoming PBUF_POOL pbuf always can be + * used to modify and send a response packet (and to 1 if this is not the case, + * e.g. when link header is stripped of when receiving) */ +#ifndef LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN +#define LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 1 +#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ + +/* The amount of data from the original packet to return in a dest-unreachable */ +#define ICMP_DEST_UNREACH_DATASIZE 8 + +static void icmp_send_response(struct pbuf *p, u8_t type, u8_t code); + +/** + * Processes ICMP input packets, called from ip_input(). + * + * Currently only processes icmp echo requests and sends + * out the echo response. + * + * @param p the icmp echo request packet, p->payload pointing to the icmp header + * @param inp the netif on which this packet was received + */ +void +icmp_input(struct pbuf *p, struct netif *inp) +{ + u8_t type; +#ifdef LWIP_DEBUG + u8_t code; +#endif /* LWIP_DEBUG */ + struct icmp_echo_hdr *iecho; + const struct ip_hdr *iphdr_in; + u16_t hlen; + const ip4_addr_t* src; + + ICMP_STATS_INC(icmp.recv); + MIB2_STATS_INC(mib2.icmpinmsgs); + + iphdr_in = ip4_current_header(); + hlen = IPH_HL(iphdr_in) * 4; + if (hlen < IP_HLEN) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); + goto lenerr; + } + if (p->len < sizeof(u16_t)*2) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); + goto lenerr; + } + + type = *((u8_t *)p->payload); +#ifdef LWIP_DEBUG + code = *(((u8_t *)p->payload)+1); +#endif /* LWIP_DEBUG */ + switch (type) { + case ICMP_ER: + /* This is OK, echo reply might have been parsed by a raw PCB + (as obviously, an echo request has been sent, too). */ + MIB2_STATS_INC(mib2.icmpinechoreps); + break; + case ICMP_ECHO: + MIB2_STATS_INC(mib2.icmpinechos); + src = ip4_current_dest_addr(); + /* multicast destination address? */ + if (ip4_addr_ismulticast(ip4_current_dest_addr())) { +#if LWIP_MULTICAST_PING + /* For multicast, use address of receiving interface as source address */ + src = netif_ip4_addr(inp); +#else /* LWIP_MULTICAST_PING */ + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to multicast pings\n")); + goto icmperr; +#endif /* LWIP_MULTICAST_PING */ + } + /* broadcast destination address? */ + if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { +#if LWIP_BROADCAST_PING + /* For broadcast, use address of receiving interface as source address */ + src = netif_ip4_addr(inp); +#else /* LWIP_BROADCAST_PING */ + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: Not echoing to broadcast pings\n")); + goto icmperr; +#endif /* LWIP_BROADCAST_PING */ + } + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); + if (p->tot_len < sizeof(struct icmp_echo_hdr)) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); + goto lenerr; + } +#if CHECKSUM_CHECK_ICMP + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP) { + if (inet_chksum_pbuf(p) != 0) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); + pbuf_free(p); + ICMP_STATS_INC(icmp.chkerr); + MIB2_STATS_INC(mib2.icmpinerrors); + return; + } + } +#endif +#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN + if (pbuf_header(p, (s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { + /* p is not big enough to contain link headers + * allocate a new one and copy p into it + */ + struct pbuf *r; + /* allocate new packet buffer with space for link headers */ + r = pbuf_alloc(PBUF_LINK, p->tot_len + hlen, PBUF_RAM); + if (r == NULL) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); + goto icmperr; + } + if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); + pbuf_free(r); + goto icmperr; + } + /* copy the ip header */ + MEMCPY(r->payload, iphdr_in, hlen); + /* switch r->payload back to icmp header (cannot fail) */ + if (pbuf_header(r, (s16_t)-hlen)) { + LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); + pbuf_free(r); + goto icmperr; + } + /* copy the rest of the packet without ip header */ + if (pbuf_copy(r, p) != ERR_OK) { + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); + pbuf_free(r); + goto icmperr; + } + /* free the original p */ + pbuf_free(p); + /* we now have an identical copy of p that has room for link headers */ + p = r; + } else { + /* restore p->payload to point to icmp header (cannot fail) */ + if (pbuf_header(p, -(s16_t)(hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN))) { + LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); + goto icmperr; + } + } +#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ + /* At this point, all checks are OK. */ + /* We generate an answer by switching the dest and src ip addresses, + * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ + iecho = (struct icmp_echo_hdr *)p->payload; + if (pbuf_header(p, (s16_t)hlen)) { + LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Can't move over header in packet")); + } else { + err_t ret; + struct ip_hdr *iphdr = (struct ip_hdr*)p->payload; + ip4_addr_copy(iphdr->src, *src); + ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); + ICMPH_TYPE_SET(iecho, ICMP_ER); +#if CHECKSUM_GEN_ICMP + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) { + /* adjust the checksum */ + if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { + iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1; + } else { + iecho->chksum += PP_HTONS(ICMP_ECHO << 8); + } + } +#if LWIP_CHECKSUM_CTRL_PER_NETIF + else { + iecho->chksum = 0; + } +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ +#else /* CHECKSUM_GEN_ICMP */ + iecho->chksum = 0; +#endif /* CHECKSUM_GEN_ICMP */ + + /* Set the correct TTL and recalculate the header checksum. */ + IPH_TTL_SET(iphdr, ICMP_TTL); + IPH_CHKSUM_SET(iphdr, 0); +#if CHECKSUM_GEN_IP + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_IP) { + IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, hlen)); + } +#endif /* CHECKSUM_GEN_IP */ + + ICMP_STATS_INC(icmp.xmit); + /* increase number of messages attempted to send */ + MIB2_STATS_INC(mib2.icmpoutmsgs); + /* increase number of echo replies attempted to send */ + MIB2_STATS_INC(mib2.icmpoutechoreps); + + /* send an ICMP packet */ + ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, + ICMP_TTL, 0, IP_PROTO_ICMP, inp); + if (ret != ERR_OK) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %s\n", lwip_strerr(ret))); + } + } + break; + default: + if (type == ICMP_DUR) { + MIB2_STATS_INC(mib2.icmpindestunreachs); + } else if (type == ICMP_TE) { + MIB2_STATS_INC(mib2.icmpintimeexcds); + } else if (type == ICMP_PP) { + MIB2_STATS_INC(mib2.icmpinparmprobs); + } else if (type == ICMP_SQ) { + MIB2_STATS_INC(mib2.icmpinsrcquenchs); + } else if (type == ICMP_RD) { + MIB2_STATS_INC(mib2.icmpinredirects); + } else if (type == ICMP_TS) { + MIB2_STATS_INC(mib2.icmpintimestamps); + } else if (type == ICMP_TSR) { + MIB2_STATS_INC(mib2.icmpintimestampreps); + } else if (type == ICMP_AM) { + MIB2_STATS_INC(mib2.icmpinaddrmasks); + } else if (type == ICMP_AMR) { + MIB2_STATS_INC(mib2.icmpinaddrmaskreps); + } + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", + (s16_t)type, (s16_t)code)); + ICMP_STATS_INC(icmp.proterr); + ICMP_STATS_INC(icmp.drop); + } + pbuf_free(p); + return; +lenerr: + pbuf_free(p); + ICMP_STATS_INC(icmp.lenerr); + MIB2_STATS_INC(mib2.icmpinerrors); + return; +#if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING +icmperr: + pbuf_free(p); + ICMP_STATS_INC(icmp.err); + MIB2_STATS_INC(mib2.icmpinerrors); + return; +#endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ +} + +/** + * Send an icmp 'destination unreachable' packet, called from ip_input() if + * the transport layer protocol is unknown and from udp_input() if the local + * port is not bound. + * + * @param p the input packet for which the 'unreachable' should be sent, + * p->payload pointing to the IP header + * @param t type of the 'unreachable' packet + */ +void +icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) +{ + MIB2_STATS_INC(mib2.icmpoutdestunreachs); + icmp_send_response(p, ICMP_DUR, t); +} + +#if IP_FORWARD || IP_REASSEMBLY +/** + * Send a 'time exceeded' packet, called from ip_forward() if TTL is 0. + * + * @param p the input packet for which the 'time exceeded' should be sent, + * p->payload pointing to the IP header + * @param t type of the 'time exceeded' packet + */ +void +icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t) +{ + MIB2_STATS_INC(mib2.icmpouttimeexcds); + icmp_send_response(p, ICMP_TE, t); +} + +#endif /* IP_FORWARD || IP_REASSEMBLY */ + +/** + * Send an icmp packet in response to an incoming packet. + * + * @param p the input packet for which the 'unreachable' should be sent, + * p->payload pointing to the IP header + * @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) +{ + struct pbuf *q; + struct ip_hdr *iphdr; + /* we can use the echo header here */ + struct icmp_echo_hdr *icmphdr; + ip4_addr_t iphdr_src; + struct netif *netif; + + /* 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, + PBUF_RAM); + if (q == NULL) { + 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", + (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); + + iphdr = (struct ip_hdr *)p->payload; + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded from ")); + 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; + icmphdr->type = type; + icmphdr->code = code; + icmphdr->id = 0; + icmphdr->seqno = 0; + + /* copy fields from original packet */ + SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); + + ip4_addr_copy(iphdr_src, iphdr->src); +#ifdef LWIP_HOOK_IP4_ROUTE_SRC + { + ip4_addr_t iphdr_dst; + ip4_addr_copy(iphdr_dst, iphdr->dest); + netif = ip4_route_src(&iphdr_src, &iphdr_dst); + } +#else + netif = ip4_route(&iphdr_src); +#endif + if (netif != NULL) { + /* calculate checksum */ + icmphdr->chksum = 0; +#if CHECKSUM_GEN_ICMP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) { + icmphdr->chksum = inet_chksum(icmphdr, q->len); + } +#endif + ICMP_STATS_INC(icmp.xmit); + ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif); + } + pbuf_free(q); +} + +#endif /* LWIP_IPV4 && LWIP_ICMP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c index 74a6c37..ddadbac 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c @@ -1,800 +1,800 @@ -/** - * @file - * IGMP - Internet Group Management Protocol - * - * @defgroup igmp IGMP - * @ingroup ip4 - * To be called from TCPIP thread - */ - -/* - * Copyright (c) 2002 CITEL Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is a contribution to the lwIP TCP/IP stack. - * The Swedish Institute of Computer Science and Adam Dunkels - * are specifically granted permission to redistribute this - * source code. -*/ - -/*------------------------------------------------------------- -Note 1) -Although the rfc requires V1 AND V2 capability -we will only support v2 since now V1 is very old (August 1989) -V1 can be added if required - -a debug print and statistic have been implemented to -show this up. -------------------------------------------------------------- -------------------------------------------------------------- -Note 2) -A query for a specific group address (as opposed to ALLHOSTS) -has now been implemented as I am unsure if it is required - -a debug print and statistic have been implemented to -show this up. -------------------------------------------------------------- -------------------------------------------------------------- -Note 3) -The router alert rfc 2113 is implemented in outgoing packets -but not checked rigorously incoming -------------------------------------------------------------- -Steve Reynolds -------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------- - * RFC 988 - Host extensions for IP multicasting - V0 - * RFC 1054 - Host extensions for IP multicasting - - * RFC 1112 - Host extensions for IP multicasting - V1 - * RFC 2236 - Internet Group Management Protocol, Version 2 - V2 <- this code is based on this RFC (it's the "de facto" standard) - * RFC 3376 - Internet Group Management Protocol, Version 3 - V3 - * RFC 4604 - Using Internet Group Management Protocol Version 3... - V3+ - * RFC 2113 - IP Router Alert Option - - *----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------- - * Includes - *----------------------------------------------------------------------------*/ - -#include "lwip/opt.h" - -#if LWIP_IPV4 && LWIP_IGMP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/igmp.h" -#include "lwip/debug.h" -#include "lwip/def.h" -#include "lwip/mem.h" -#include "lwip/ip.h" -#include "lwip/inet_chksum.h" -#include "lwip/netif.h" -#include "lwip/stats.h" -#include "lwip/prot/igmp.h" - -#include "string.h" - -static struct igmp_group *igmp_lookup_group(struct netif *ifp, const ip4_addr_t *addr); -static err_t igmp_remove_group(struct netif* netif, struct igmp_group *group); -static void igmp_timeout(struct netif *netif, struct igmp_group *group); -static void igmp_start_timer(struct igmp_group *group, u8_t max_time); -static void igmp_delaying_member(struct igmp_group *group, u8_t maxresp); -static err_t igmp_ip_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, struct netif *netif); -static void igmp_send(struct netif *netif, struct igmp_group *group, u8_t type); - -static ip4_addr_t allsystems; -static ip4_addr_t allrouters; - -/** - * Initialize the IGMP module - */ -void -igmp_init(void) -{ - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_init: initializing\n")); - - IP4_ADDR(&allsystems, 224, 0, 0, 1); - IP4_ADDR(&allrouters, 224, 0, 0, 2); -} - -/** - * Start IGMP processing on interface - * - * @param netif network interface on which start IGMP processing - */ -err_t -igmp_start(struct netif *netif) -{ - struct igmp_group* group; - - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: starting IGMP processing on if %p\n", (void*)netif)); - - group = igmp_lookup_group(netif, &allsystems); - - if (group != NULL) { - group->group_state = IGMP_GROUP_IDLE_MEMBER; - group->use++; - - /* Allow the igmp messages at the MAC level */ - if (netif->igmp_mac_filter != NULL) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: igmp_mac_filter(ADD ")); - ip4_addr_debug_print_val(IGMP_DEBUG, allsystems); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); - netif->igmp_mac_filter(netif, &allsystems, NETIF_ADD_MAC_FILTER); - } - - return ERR_OK; - } - - return ERR_MEM; -} - -/** - * Stop IGMP processing on interface - * - * @param netif network interface on which stop IGMP processing - */ -err_t -igmp_stop(struct netif *netif) -{ - struct igmp_group *group = netif_igmp_data(netif); - - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, NULL); - - while (group != NULL) { - struct igmp_group *next = group->next; /* avoid use-after-free below */ - - /* disable the group at the MAC level */ - if (netif->igmp_mac_filter != NULL) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_stop: igmp_mac_filter(DEL ")); - ip4_addr_debug_print(IGMP_DEBUG, &group->group_address); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); - netif->igmp_mac_filter(netif, &(group->group_address), NETIF_DEL_MAC_FILTER); - } - - /* free group */ - memp_free(MEMP_IGMP_GROUP, group); - - /* move to "next" */ - group = next; - } - return ERR_OK; -} - -/** - * Report IGMP memberships for this interface - * - * @param netif network interface on which report IGMP memberships - */ -void -igmp_report_groups(struct netif *netif) -{ - struct igmp_group *group = netif_igmp_data(netif); - - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_report_groups: sending IGMP reports on if %p\n", (void*)netif)); - - /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ - if(group != NULL) { - group = group->next; - } - - while (group != NULL) { - igmp_delaying_member(group, IGMP_JOIN_DELAYING_MEMBER_TMR); - group = group->next; - } -} - -/** - * Search for a group in the global igmp_group_list - * - * @param ifp the network interface for which to look - * @param addr the group ip address to search for - * @return a struct igmp_group* if the group has been found, - * NULL if the group wasn't found. - */ -struct igmp_group * -igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr) -{ - struct igmp_group *group = netif_igmp_data(ifp); - - while (group != NULL) { - if (ip4_addr_cmp(&(group->group_address), addr)) { - return group; - } - group = group->next; - } - - /* to be clearer, we return NULL here instead of - * 'group' (which is also NULL at this point). - */ - return NULL; -} - -/** - * Search for a specific igmp group and create a new one if not found- - * - * @param ifp the network interface for which to look - * @param addr the group ip address to search - * @return a struct igmp_group*, - * NULL on memory error. - */ -static struct igmp_group * -igmp_lookup_group(struct netif *ifp, const ip4_addr_t *addr) -{ - struct igmp_group *group; - struct igmp_group *list_head = netif_igmp_data(ifp); - - /* Search if the group already exists */ - group = igmp_lookfor_group(ifp, addr); - if (group != NULL) { - /* Group already exists. */ - return group; - } - - /* Group doesn't exist yet, create a new one */ - group = (struct igmp_group *)memp_malloc(MEMP_IGMP_GROUP); - if (group != NULL) { - ip4_addr_set(&(group->group_address), addr); - group->timer = 0; /* Not running */ - group->group_state = IGMP_GROUP_NON_MEMBER; - group->last_reporter_flag = 0; - group->use = 0; - - /* Ensure allsystems group is always first in list */ - if (list_head == NULL) { - /* this is the first entry in linked list */ - LWIP_ASSERT("igmp_lookup_group: first group must be allsystems", - (ip4_addr_cmp(addr, &allsystems) != 0)); - group->next = NULL; - netif_set_client_data(ifp, LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, group); - } else { - /* append _after_ first entry */ - LWIP_ASSERT("igmp_lookup_group: all except first group must not be allsystems", - (ip4_addr_cmp(addr, &allsystems) == 0)); - group->next = list_head->next; - list_head->next = group; - } - } - - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_lookup_group: %sallocated a new group with address ", (group?"":"impossible to "))); - ip4_addr_debug_print(IGMP_DEBUG, addr); - LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)ifp)); - - return group; -} - -/** - * Remove a group in the global igmp_group_list, but don't free it yet - * - * @param group the group to remove from the global igmp_group_list - * @return ERR_OK if group was removed from the list, an err_t otherwise - */ -static err_t -igmp_remove_group(struct netif* netif, struct igmp_group *group) -{ - err_t err = ERR_OK; - struct igmp_group *tmp_group; - - /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ - for (tmp_group = netif_igmp_data(netif); tmp_group != NULL; tmp_group = tmp_group->next) { - if (tmp_group->next == group) { - tmp_group->next = group->next; - break; - } - } - /* Group not found in the global igmp_group_list */ - if (tmp_group == NULL) { - err = ERR_ARG; - } - - return err; -} - -/** - * Called from ip_input() if a new IGMP packet is received. - * - * @param p received igmp packet, p->payload pointing to the igmp header - * @param inp network interface on which the packet was received - * @param dest destination ip address of the igmp packet - */ -void -igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest) -{ - struct igmp_msg* igmp; - struct igmp_group* group; - struct igmp_group* groupref; - - IGMP_STATS_INC(igmp.recv); - - /* Note that the length CAN be greater than 8 but only 8 are used - All are included in the checksum */ - if (p->len < IGMP_MINLEN) { - pbuf_free(p); - IGMP_STATS_INC(igmp.lenerr); - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: length error\n")); - return; - } - - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: message from ")); - ip4_addr_debug_print(IGMP_DEBUG, &(ip4_current_header()->src)); - LWIP_DEBUGF(IGMP_DEBUG, (" to address ")); - ip4_addr_debug_print(IGMP_DEBUG, &(ip4_current_header()->dest)); - LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)inp)); - - /* Now calculate and check the checksum */ - igmp = (struct igmp_msg *)p->payload; - if (inet_chksum(igmp, p->len)) { - pbuf_free(p); - IGMP_STATS_INC(igmp.chkerr); - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: checksum error\n")); - return; - } - - /* Packet is ok so find an existing group */ - group = igmp_lookfor_group(inp, dest); /* use the destination IP address of incoming packet */ - - /* If group can be found or create... */ - if (!group) { - pbuf_free(p); - IGMP_STATS_INC(igmp.drop); - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP frame not for us\n")); - return; - } - - /* NOW ACT ON THE INCOMING MESSAGE TYPE... */ - switch (igmp->igmp_msgtype) { - case IGMP_MEMB_QUERY: - /* IGMP_MEMB_QUERY to the "all systems" address ? */ - if ((ip4_addr_cmp(dest, &allsystems)) && ip4_addr_isany(&igmp->igmp_group_address)) { - /* THIS IS THE GENERAL QUERY */ - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: General IGMP_MEMB_QUERY on \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); - - if (igmp->igmp_maxresp == 0) { - IGMP_STATS_INC(igmp.rx_v1); - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: got an all hosts query with time== 0 - this is V1 and not implemented - treat as v2\n")); - igmp->igmp_maxresp = IGMP_V1_DELAYING_MEMBER_TMR; - } else { - IGMP_STATS_INC(igmp.rx_general); - } - - groupref = netif_igmp_data(inp); - - /* Do not send messages on the all systems group address! */ - /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ - if(groupref != NULL) { - groupref = groupref->next; - } - - while (groupref) { - igmp_delaying_member(groupref, igmp->igmp_maxresp); - groupref = groupref->next; - } - } else { - /* IGMP_MEMB_QUERY to a specific group ? */ - if (!ip4_addr_isany(&igmp->igmp_group_address)) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_MEMB_QUERY to a specific group ")); - ip4_addr_debug_print(IGMP_DEBUG, &igmp->igmp_group_address); - if (ip4_addr_cmp(dest, &allsystems)) { - ip4_addr_t groupaddr; - LWIP_DEBUGF(IGMP_DEBUG, (" using \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); - /* we first need to re-look for the group since we used dest last time */ - ip4_addr_copy(groupaddr, igmp->igmp_group_address); - group = igmp_lookfor_group(inp, &groupaddr); - } else { - LWIP_DEBUGF(IGMP_DEBUG, (" with the group address as destination [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); - } - - if (group != NULL) { - IGMP_STATS_INC(igmp.rx_group); - igmp_delaying_member(group, igmp->igmp_maxresp); - } else { - IGMP_STATS_INC(igmp.drop); - } - } else { - IGMP_STATS_INC(igmp.proterr); - } - } - break; - case IGMP_V2_MEMB_REPORT: - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_V2_MEMB_REPORT\n")); - IGMP_STATS_INC(igmp.rx_report); - if (group->group_state == IGMP_GROUP_DELAYING_MEMBER) { - /* This is on a specific group we have already looked up */ - group->timer = 0; /* stopped */ - group->group_state = IGMP_GROUP_IDLE_MEMBER; - group->last_reporter_flag = 0; - } - break; - default: - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: unexpected msg %d in state %d on group %p on if %p\n", - igmp->igmp_msgtype, group->group_state, (void*)&group, (void*)inp)); - IGMP_STATS_INC(igmp.proterr); - break; - } - - pbuf_free(p); - return; -} - -/** - * @ingroup igmp - * Join a group on one network interface. - * - * @param ifaddr ip address of the network interface which should join a new group - * @param groupaddr the ip address of the group which to join - * @return ERR_OK if group was joined on the netif(s), an err_t otherwise - */ -err_t -igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) -{ - err_t err = ERR_VAL; /* no matching interface */ - struct netif *netif; - - /* make sure it is multicast address */ - LWIP_ERROR("igmp_joingroup: attempt to join non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); - LWIP_ERROR("igmp_joingroup: attempt to join allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); - - /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { - /* Should we join this interface ? */ - if ((netif->flags & NETIF_FLAG_IGMP) && ((ip4_addr_isany(ifaddr) || ip4_addr_cmp(netif_ip4_addr(netif), ifaddr)))) { - err = igmp_joingroup_netif(netif, groupaddr); - if (err != ERR_OK) { - /* Return an error even if some network interfaces are joined */ - /** @todo undo any other netif already joined */ - return err; - } - } - /* proceed to next network interface */ - netif = netif->next; - } - - return err; -} - -/** - * @ingroup igmp - * Join a group on one network interface. - * - * @param netif the network interface which should join a new group - * @param groupaddr the ip address of the group which to join - * @return ERR_OK if group was joined on the netif, an err_t otherwise - */ -err_t -igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) -{ - struct igmp_group *group; - - /* make sure it is multicast address */ - LWIP_ERROR("igmp_joingroup_netif: attempt to join non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); - LWIP_ERROR("igmp_joingroup_netif: attempt to join allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); - - /* make sure it is an igmp-enabled netif */ - LWIP_ERROR("igmp_joingroup_netif: attempt to join on non-IGMP netif", netif->flags & NETIF_FLAG_IGMP, return ERR_VAL;); - - /* find group or create a new one if not found */ - group = igmp_lookup_group(netif, groupaddr); - - if (group != NULL) { - /* This should create a new group, check the state to make sure */ - if (group->group_state != IGMP_GROUP_NON_MEMBER) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: join to group not in state IGMP_GROUP_NON_MEMBER\n")); - } else { - /* OK - it was new group */ - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: join to new group: ")); - ip4_addr_debug_print(IGMP_DEBUG, groupaddr); - LWIP_DEBUGF(IGMP_DEBUG, ("\n")); - - /* If first use of the group, allow the group at the MAC level */ - if ((group->use==0) && (netif->igmp_mac_filter != NULL)) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: igmp_mac_filter(ADD ")); - ip4_addr_debug_print(IGMP_DEBUG, groupaddr); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); - netif->igmp_mac_filter(netif, groupaddr, NETIF_ADD_MAC_FILTER); - } - - IGMP_STATS_INC(igmp.tx_join); - igmp_send(netif, group, IGMP_V2_MEMB_REPORT); - - igmp_start_timer(group, IGMP_JOIN_DELAYING_MEMBER_TMR); - - /* Need to work out where this timer comes from */ - group->group_state = IGMP_GROUP_DELAYING_MEMBER; - } - /* Increment group use */ - group->use++; - /* Join on this interface */ - return ERR_OK; - } else { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: Not enough memory to join to group\n")); - return ERR_MEM; - } -} - -/** - * @ingroup igmp - * Leave a group on one network interface. - * - * @param ifaddr ip address of the network interface which should leave a group - * @param groupaddr the ip address of the group which to leave - * @return ERR_OK if group was left on the netif(s), an err_t otherwise - */ -err_t -igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) -{ - err_t err = ERR_VAL; /* no matching interface */ - struct netif *netif; - - /* make sure it is multicast address */ - LWIP_ERROR("igmp_leavegroup: attempt to leave non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); - LWIP_ERROR("igmp_leavegroup: attempt to leave allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); - - /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { - /* Should we leave this interface ? */ - if ((netif->flags & NETIF_FLAG_IGMP) && ((ip4_addr_isany(ifaddr) || ip4_addr_cmp(netif_ip4_addr(netif), ifaddr)))) { - err_t res = igmp_leavegroup_netif(netif, groupaddr); - if (err != ERR_OK) { - /* Store this result if we have not yet gotten a success */ - err = res; - } - } - /* proceed to next network interface */ - netif = netif->next; - } - - return err; -} - -/** - * @ingroup igmp - * Leave a group on one network interface. - * - * @param netif the network interface which should leave a group - * @param groupaddr the ip address of the group which to leave - * @return ERR_OK if group was left on the netif, an err_t otherwise - */ -err_t -igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) -{ - struct igmp_group *group; - - /* make sure it is multicast address */ - LWIP_ERROR("igmp_leavegroup_netif: attempt to leave non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); - LWIP_ERROR("igmp_leavegroup_netif: attempt to leave allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); - - /* make sure it is an igmp-enabled netif */ - LWIP_ERROR("igmp_leavegroup_netif: attempt to leave on non-IGMP netif", netif->flags & NETIF_FLAG_IGMP, return ERR_VAL;); - - /* find group */ - group = igmp_lookfor_group(netif, groupaddr); - - if (group != NULL) { - /* Only send a leave if the flag is set according to the state diagram */ - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: Leaving group: ")); - ip4_addr_debug_print(IGMP_DEBUG, groupaddr); - LWIP_DEBUGF(IGMP_DEBUG, ("\n")); - - /* If there is no other use of the group */ - if (group->use <= 1) { - /* Remove the group from the list */ - igmp_remove_group(netif, group); - - /* If we are the last reporter for this group */ - if (group->last_reporter_flag) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: sending leaving group\n")); - IGMP_STATS_INC(igmp.tx_leave); - igmp_send(netif, group, IGMP_LEAVE_GROUP); - } - - /* Disable the group at the MAC level */ - if (netif->igmp_mac_filter != NULL) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: igmp_mac_filter(DEL ")); - ip4_addr_debug_print(IGMP_DEBUG, groupaddr); - LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); - netif->igmp_mac_filter(netif, groupaddr, NETIF_DEL_MAC_FILTER); - } - - /* Free group struct */ - memp_free(MEMP_IGMP_GROUP, group); - } else { - /* Decrement group use */ - group->use--; - } - return ERR_OK; - } else { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: not member of group\n")); - return ERR_VAL; - } -} - -/** - * The igmp timer function (both for NO_SYS=1 and =0) - * Should be called every IGMP_TMR_INTERVAL milliseconds (100 ms is default). - */ -void -igmp_tmr(void) -{ - struct netif *netif = netif_list; - - while (netif != NULL) { - struct igmp_group *group = netif_igmp_data(netif); - - while (group != NULL) { - if (group->timer > 0) { - group->timer--; - if (group->timer == 0) { - igmp_timeout(netif, group); - } - } - group = group->next; - } - netif = netif->next; - } -} - -/** - * Called if a timeout for one group is reached. - * Sends a report for this group. - * - * @param group an igmp_group for which a timeout is reached - */ -static void -igmp_timeout(struct netif *netif, struct igmp_group *group) -{ - /* If the state is IGMP_GROUP_DELAYING_MEMBER then we send a report for this group - (unless it is the allsystems group) */ - if ((group->group_state == IGMP_GROUP_DELAYING_MEMBER) && - (!(ip4_addr_cmp(&(group->group_address), &allsystems)))) { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_timeout: report membership for group with address ")); - ip4_addr_debug_print(IGMP_DEBUG, &(group->group_address)); - LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)netif)); - - group->group_state = IGMP_GROUP_IDLE_MEMBER; - - IGMP_STATS_INC(igmp.tx_report); - igmp_send(netif, group, IGMP_V2_MEMB_REPORT); - } -} - -/** - * Start a timer for an igmp group - * - * @param group the igmp_group for which to start a timer - * @param max_time the time in multiples of IGMP_TMR_INTERVAL (decrease with - * every call to igmp_tmr()) - */ -static void -igmp_start_timer(struct igmp_group *group, u8_t max_time) -{ -#ifdef LWIP_RAND - group->timer = max_time > 2 ? (LWIP_RAND() % max_time) : 1; -#else /* LWIP_RAND */ - /* ATTENTION: use this only if absolutely necessary! */ - group->timer = max_time / 2; -#endif /* LWIP_RAND */ - - if (group->timer == 0) { - group->timer = 1; - } -} - -/** - * Delaying membership report for a group if necessary - * - * @param group the igmp_group for which "delaying" membership report - * @param maxresp query delay - */ -static void -igmp_delaying_member(struct igmp_group *group, u8_t maxresp) -{ - if ((group->group_state == IGMP_GROUP_IDLE_MEMBER) || - ((group->group_state == IGMP_GROUP_DELAYING_MEMBER) && - ((group->timer == 0) || (maxresp < group->timer)))) { - igmp_start_timer(group, maxresp); - group->group_state = IGMP_GROUP_DELAYING_MEMBER; - } -} - - -/** - * Sends an IP packet on a network interface. This function constructs the IP header - * and calculates the IP header checksum. If the source IP address is NULL, - * the IP address of the outgoing network interface is filled in as source address. - * - * @param p the packet to send (p->payload points to the data, e.g. next - protocol header; if dest == LWIP_IP_HDRINCL, p already includes an - IP header and p->payload points to that IP header) - * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the - * IP address of the netif used to send is used as source address) - * @param dest the destination IP address to send the packet to - * @param netif the netif on which to send this packet - * @return ERR_OK if the packet was sent OK - * ERR_BUF if p doesn't have enough space for IP/LINK headers - * returns errors returned by netif->output - */ -static err_t -igmp_ip_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, struct netif *netif) -{ - /* This is the "router alert" option */ - u16_t ra[2]; - ra[0] = PP_HTONS(ROUTER_ALERT); - ra[1] = 0x0000; /* Router shall examine packet */ - IGMP_STATS_INC(igmp.xmit); - return ip4_output_if_opt(p, src, dest, IGMP_TTL, 0, IP_PROTO_IGMP, netif, ra, ROUTER_ALERTLEN); -} - -/** - * Send an igmp packet to a specific group. - * - * @param group the group to which to send the packet - * @param type the type of igmp packet to send - */ -static void -igmp_send(struct netif *netif, struct igmp_group *group, u8_t type) -{ - struct pbuf* p = NULL; - struct igmp_msg* igmp = NULL; - ip4_addr_t src = *IP4_ADDR_ANY4; - ip4_addr_t* dest = NULL; - - /* IP header + "router alert" option + IGMP header */ - p = pbuf_alloc(PBUF_TRANSPORT, IGMP_MINLEN, PBUF_RAM); - - if (p) { - igmp = (struct igmp_msg *)p->payload; - LWIP_ASSERT("igmp_send: check that first pbuf can hold struct igmp_msg", - (p->len >= sizeof(struct igmp_msg))); - ip4_addr_copy(src, *netif_ip4_addr(netif)); - - if (type == IGMP_V2_MEMB_REPORT) { - dest = &(group->group_address); - ip4_addr_copy(igmp->igmp_group_address, group->group_address); - group->last_reporter_flag = 1; /* Remember we were the last to report */ - } else { - if (type == IGMP_LEAVE_GROUP) { - dest = &allrouters; - ip4_addr_copy(igmp->igmp_group_address, group->group_address); - } - } - - if ((type == IGMP_V2_MEMB_REPORT) || (type == IGMP_LEAVE_GROUP)) { - igmp->igmp_msgtype = type; - igmp->igmp_maxresp = 0; - igmp->igmp_checksum = 0; - igmp->igmp_checksum = inet_chksum(igmp, IGMP_MINLEN); - - igmp_ip_output_if(p, &src, dest, netif); - } - - pbuf_free(p); - } else { - LWIP_DEBUGF(IGMP_DEBUG, ("igmp_send: not enough memory for igmp_send\n")); - IGMP_STATS_INC(igmp.memerr); - } -} - -#endif /* LWIP_IPV4 && LWIP_IGMP */ +/** + * @file + * IGMP - Internet Group Management Protocol + * + * @defgroup igmp IGMP + * @ingroup ip4 + * To be called from TCPIP thread + */ + +/* + * Copyright (c) 2002 CITEL Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is a contribution to the lwIP TCP/IP stack. + * The Swedish Institute of Computer Science and Adam Dunkels + * are specifically granted permission to redistribute this + * source code. +*/ + +/*------------------------------------------------------------- +Note 1) +Although the rfc requires V1 AND V2 capability +we will only support v2 since now V1 is very old (August 1989) +V1 can be added if required + +a debug print and statistic have been implemented to +show this up. +------------------------------------------------------------- +------------------------------------------------------------- +Note 2) +A query for a specific group address (as opposed to ALLHOSTS) +has now been implemented as I am unsure if it is required + +a debug print and statistic have been implemented to +show this up. +------------------------------------------------------------- +------------------------------------------------------------- +Note 3) +The router alert rfc 2113 is implemented in outgoing packets +but not checked rigorously incoming +------------------------------------------------------------- +Steve Reynolds +------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------- + * RFC 988 - Host extensions for IP multicasting - V0 + * RFC 1054 - Host extensions for IP multicasting - + * RFC 1112 - Host extensions for IP multicasting - V1 + * RFC 2236 - Internet Group Management Protocol, Version 2 - V2 <- this code is based on this RFC (it's the "de facto" standard) + * RFC 3376 - Internet Group Management Protocol, Version 3 - V3 + * RFC 4604 - Using Internet Group Management Protocol Version 3... - V3+ + * RFC 2113 - IP Router Alert Option - + *----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------- + * Includes + *----------------------------------------------------------------------------*/ + +#include "lwip/opt.h" + +#if LWIP_IPV4 && LWIP_IGMP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/igmp.h" +#include "lwip/debug.h" +#include "lwip/def.h" +#include "lwip/mem.h" +#include "lwip/ip.h" +#include "lwip/inet_chksum.h" +#include "lwip/netif.h" +#include "lwip/stats.h" +#include "lwip/prot/igmp.h" + +#include "string.h" + +static struct igmp_group *igmp_lookup_group(struct netif *ifp, const ip4_addr_t *addr); +static err_t igmp_remove_group(struct netif* netif, struct igmp_group *group); +static void igmp_timeout(struct netif *netif, struct igmp_group *group); +static void igmp_start_timer(struct igmp_group *group, u8_t max_time); +static void igmp_delaying_member(struct igmp_group *group, u8_t maxresp); +static err_t igmp_ip_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, struct netif *netif); +static void igmp_send(struct netif *netif, struct igmp_group *group, u8_t type); + +static ip4_addr_t allsystems; +static ip4_addr_t allrouters; + +/** + * Initialize the IGMP module + */ +void +igmp_init(void) +{ + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_init: initializing\n")); + + IP4_ADDR(&allsystems, 224, 0, 0, 1); + IP4_ADDR(&allrouters, 224, 0, 0, 2); +} + +/** + * Start IGMP processing on interface + * + * @param netif network interface on which start IGMP processing + */ +err_t +igmp_start(struct netif *netif) +{ + struct igmp_group* group; + + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: starting IGMP processing on if %p\n", (void*)netif)); + + group = igmp_lookup_group(netif, &allsystems); + + if (group != NULL) { + group->group_state = IGMP_GROUP_IDLE_MEMBER; + group->use++; + + /* Allow the igmp messages at the MAC level */ + if (netif->igmp_mac_filter != NULL) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_start: igmp_mac_filter(ADD ")); + ip4_addr_debug_print_val(IGMP_DEBUG, allsystems); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + netif->igmp_mac_filter(netif, &allsystems, NETIF_ADD_MAC_FILTER); + } + + return ERR_OK; + } + + return ERR_MEM; +} + +/** + * Stop IGMP processing on interface + * + * @param netif network interface on which stop IGMP processing + */ +err_t +igmp_stop(struct netif *netif) +{ + struct igmp_group *group = netif_igmp_data(netif); + + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, NULL); + + while (group != NULL) { + struct igmp_group *next = group->next; /* avoid use-after-free below */ + + /* disable the group at the MAC level */ + if (netif->igmp_mac_filter != NULL) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_stop: igmp_mac_filter(DEL ")); + ip4_addr_debug_print(IGMP_DEBUG, &group->group_address); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + netif->igmp_mac_filter(netif, &(group->group_address), NETIF_DEL_MAC_FILTER); + } + + /* free group */ + memp_free(MEMP_IGMP_GROUP, group); + + /* move to "next" */ + group = next; + } + return ERR_OK; +} + +/** + * Report IGMP memberships for this interface + * + * @param netif network interface on which report IGMP memberships + */ +void +igmp_report_groups(struct netif *netif) +{ + struct igmp_group *group = netif_igmp_data(netif); + + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_report_groups: sending IGMP reports on if %p\n", (void*)netif)); + + /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ + if(group != NULL) { + group = group->next; + } + + while (group != NULL) { + igmp_delaying_member(group, IGMP_JOIN_DELAYING_MEMBER_TMR); + group = group->next; + } +} + +/** + * Search for a group in the global igmp_group_list + * + * @param ifp the network interface for which to look + * @param addr the group ip address to search for + * @return a struct igmp_group* if the group has been found, + * NULL if the group wasn't found. + */ +struct igmp_group * +igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr) +{ + struct igmp_group *group = netif_igmp_data(ifp); + + while (group != NULL) { + if (ip4_addr_cmp(&(group->group_address), addr)) { + return group; + } + group = group->next; + } + + /* to be clearer, we return NULL here instead of + * 'group' (which is also NULL at this point). + */ + return NULL; +} + +/** + * Search for a specific igmp group and create a new one if not found- + * + * @param ifp the network interface for which to look + * @param addr the group ip address to search + * @return a struct igmp_group*, + * NULL on memory error. + */ +static struct igmp_group * +igmp_lookup_group(struct netif *ifp, const ip4_addr_t *addr) +{ + struct igmp_group *group; + struct igmp_group *list_head = netif_igmp_data(ifp); + + /* Search if the group already exists */ + group = igmp_lookfor_group(ifp, addr); + if (group != NULL) { + /* Group already exists. */ + return group; + } + + /* Group doesn't exist yet, create a new one */ + group = (struct igmp_group *)memp_malloc(MEMP_IGMP_GROUP); + if (group != NULL) { + ip4_addr_set(&(group->group_address), addr); + group->timer = 0; /* Not running */ + group->group_state = IGMP_GROUP_NON_MEMBER; + group->last_reporter_flag = 0; + group->use = 0; + + /* Ensure allsystems group is always first in list */ + if (list_head == NULL) { + /* this is the first entry in linked list */ + LWIP_ASSERT("igmp_lookup_group: first group must be allsystems", + (ip4_addr_cmp(addr, &allsystems) != 0)); + group->next = NULL; + netif_set_client_data(ifp, LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, group); + } else { + /* append _after_ first entry */ + LWIP_ASSERT("igmp_lookup_group: all except first group must not be allsystems", + (ip4_addr_cmp(addr, &allsystems) == 0)); + group->next = list_head->next; + list_head->next = group; + } + } + + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_lookup_group: %sallocated a new group with address ", (group?"":"impossible to "))); + ip4_addr_debug_print(IGMP_DEBUG, addr); + LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)ifp)); + + return group; +} + +/** + * Remove a group in the global igmp_group_list, but don't free it yet + * + * @param group the group to remove from the global igmp_group_list + * @return ERR_OK if group was removed from the list, an err_t otherwise + */ +static err_t +igmp_remove_group(struct netif* netif, struct igmp_group *group) +{ + err_t err = ERR_OK; + struct igmp_group *tmp_group; + + /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ + for (tmp_group = netif_igmp_data(netif); tmp_group != NULL; tmp_group = tmp_group->next) { + if (tmp_group->next == group) { + tmp_group->next = group->next; + break; + } + } + /* Group not found in the global igmp_group_list */ + if (tmp_group == NULL) { + err = ERR_ARG; + } + + return err; +} + +/** + * Called from ip_input() if a new IGMP packet is received. + * + * @param p received igmp packet, p->payload pointing to the igmp header + * @param inp network interface on which the packet was received + * @param dest destination ip address of the igmp packet + */ +void +igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest) +{ + struct igmp_msg* igmp; + struct igmp_group* group; + struct igmp_group* groupref; + + IGMP_STATS_INC(igmp.recv); + + /* Note that the length CAN be greater than 8 but only 8 are used - All are included in the checksum */ + if (p->len < IGMP_MINLEN) { + pbuf_free(p); + IGMP_STATS_INC(igmp.lenerr); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: length error\n")); + return; + } + + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: message from ")); + ip4_addr_debug_print(IGMP_DEBUG, &(ip4_current_header()->src)); + LWIP_DEBUGF(IGMP_DEBUG, (" to address ")); + ip4_addr_debug_print(IGMP_DEBUG, &(ip4_current_header()->dest)); + LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)inp)); + + /* Now calculate and check the checksum */ + igmp = (struct igmp_msg *)p->payload; + if (inet_chksum(igmp, p->len)) { + pbuf_free(p); + IGMP_STATS_INC(igmp.chkerr); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: checksum error\n")); + return; + } + + /* Packet is ok so find an existing group */ + group = igmp_lookfor_group(inp, dest); /* use the destination IP address of incoming packet */ + + /* If group can be found or create... */ + if (!group) { + pbuf_free(p); + IGMP_STATS_INC(igmp.drop); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP frame not for us\n")); + return; + } + + /* NOW ACT ON THE INCOMING MESSAGE TYPE... */ + switch (igmp->igmp_msgtype) { + case IGMP_MEMB_QUERY: + /* IGMP_MEMB_QUERY to the "all systems" address ? */ + if ((ip4_addr_cmp(dest, &allsystems)) && ip4_addr_isany(&igmp->igmp_group_address)) { + /* THIS IS THE GENERAL QUERY */ + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: General IGMP_MEMB_QUERY on \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); + + if (igmp->igmp_maxresp == 0) { + IGMP_STATS_INC(igmp.rx_v1); + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: got an all hosts query with time== 0 - this is V1 and not implemented - treat as v2\n")); + igmp->igmp_maxresp = IGMP_V1_DELAYING_MEMBER_TMR; + } else { + IGMP_STATS_INC(igmp.rx_general); + } + + groupref = netif_igmp_data(inp); + + /* Do not send messages on the all systems group address! */ + /* Skip the first group in the list, it is always the allsystems group added in igmp_start() */ + if(groupref != NULL) { + groupref = groupref->next; + } + + while (groupref) { + igmp_delaying_member(groupref, igmp->igmp_maxresp); + groupref = groupref->next; + } + } else { + /* IGMP_MEMB_QUERY to a specific group ? */ + if (!ip4_addr_isany(&igmp->igmp_group_address)) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_MEMB_QUERY to a specific group ")); + ip4_addr_debug_print(IGMP_DEBUG, &igmp->igmp_group_address); + if (ip4_addr_cmp(dest, &allsystems)) { + ip4_addr_t groupaddr; + LWIP_DEBUGF(IGMP_DEBUG, (" using \"ALL SYSTEMS\" address (224.0.0.1) [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); + /* we first need to re-look for the group since we used dest last time */ + ip4_addr_copy(groupaddr, igmp->igmp_group_address); + group = igmp_lookfor_group(inp, &groupaddr); + } else { + LWIP_DEBUGF(IGMP_DEBUG, (" with the group address as destination [igmp_maxresp=%i]\n", (int)(igmp->igmp_maxresp))); + } + + if (group != NULL) { + IGMP_STATS_INC(igmp.rx_group); + igmp_delaying_member(group, igmp->igmp_maxresp); + } else { + IGMP_STATS_INC(igmp.drop); + } + } else { + IGMP_STATS_INC(igmp.proterr); + } + } + break; + case IGMP_V2_MEMB_REPORT: + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: IGMP_V2_MEMB_REPORT\n")); + IGMP_STATS_INC(igmp.rx_report); + if (group->group_state == IGMP_GROUP_DELAYING_MEMBER) { + /* This is on a specific group we have already looked up */ + group->timer = 0; /* stopped */ + group->group_state = IGMP_GROUP_IDLE_MEMBER; + group->last_reporter_flag = 0; + } + break; + default: + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_input: unexpected msg %d in state %d on group %p on if %p\n", + igmp->igmp_msgtype, group->group_state, (void*)&group, (void*)inp)); + IGMP_STATS_INC(igmp.proterr); + break; + } + + pbuf_free(p); + return; +} + +/** + * @ingroup igmp + * Join a group on one network interface. + * + * @param ifaddr ip address of the network interface which should join a new group + * @param groupaddr the ip address of the group which to join + * @return ERR_OK if group was joined on the netif(s), an err_t otherwise + */ +err_t +igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) +{ + err_t err = ERR_VAL; /* no matching interface */ + struct netif *netif; + + /* make sure it is multicast address */ + LWIP_ERROR("igmp_joingroup: attempt to join non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); + LWIP_ERROR("igmp_joingroup: attempt to join allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); + + /* loop through netif's */ + netif = netif_list; + while (netif != NULL) { + /* Should we join this interface ? */ + if ((netif->flags & NETIF_FLAG_IGMP) && ((ip4_addr_isany(ifaddr) || ip4_addr_cmp(netif_ip4_addr(netif), ifaddr)))) { + err = igmp_joingroup_netif(netif, groupaddr); + if (err != ERR_OK) { + /* Return an error even if some network interfaces are joined */ + /** @todo undo any other netif already joined */ + return err; + } + } + /* proceed to next network interface */ + netif = netif->next; + } + + return err; +} + +/** + * @ingroup igmp + * Join a group on one network interface. + * + * @param netif the network interface which should join a new group + * @param groupaddr the ip address of the group which to join + * @return ERR_OK if group was joined on the netif, an err_t otherwise + */ +err_t +igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) +{ + struct igmp_group *group; + + /* make sure it is multicast address */ + LWIP_ERROR("igmp_joingroup_netif: attempt to join non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); + LWIP_ERROR("igmp_joingroup_netif: attempt to join allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); + + /* make sure it is an igmp-enabled netif */ + LWIP_ERROR("igmp_joingroup_netif: attempt to join on non-IGMP netif", netif->flags & NETIF_FLAG_IGMP, return ERR_VAL;); + + /* find group or create a new one if not found */ + group = igmp_lookup_group(netif, groupaddr); + + if (group != NULL) { + /* This should create a new group, check the state to make sure */ + if (group->group_state != IGMP_GROUP_NON_MEMBER) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: join to group not in state IGMP_GROUP_NON_MEMBER\n")); + } else { + /* OK - it was new group */ + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: join to new group: ")); + ip4_addr_debug_print(IGMP_DEBUG, groupaddr); + LWIP_DEBUGF(IGMP_DEBUG, ("\n")); + + /* If first use of the group, allow the group at the MAC level */ + if ((group->use==0) && (netif->igmp_mac_filter != NULL)) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: igmp_mac_filter(ADD ")); + ip4_addr_debug_print(IGMP_DEBUG, groupaddr); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + netif->igmp_mac_filter(netif, groupaddr, NETIF_ADD_MAC_FILTER); + } + + IGMP_STATS_INC(igmp.tx_join); + igmp_send(netif, group, IGMP_V2_MEMB_REPORT); + + igmp_start_timer(group, IGMP_JOIN_DELAYING_MEMBER_TMR); + + /* Need to work out where this timer comes from */ + group->group_state = IGMP_GROUP_DELAYING_MEMBER; + } + /* Increment group use */ + group->use++; + /* Join on this interface */ + return ERR_OK; + } else { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup_netif: Not enough memory to join to group\n")); + return ERR_MEM; + } +} + +/** + * @ingroup igmp + * Leave a group on one network interface. + * + * @param ifaddr ip address of the network interface which should leave a group + * @param groupaddr the ip address of the group which to leave + * @return ERR_OK if group was left on the netif(s), an err_t otherwise + */ +err_t +igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) +{ + err_t err = ERR_VAL; /* no matching interface */ + struct netif *netif; + + /* make sure it is multicast address */ + LWIP_ERROR("igmp_leavegroup: attempt to leave non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); + LWIP_ERROR("igmp_leavegroup: attempt to leave allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); + + /* loop through netif's */ + netif = netif_list; + while (netif != NULL) { + /* Should we leave this interface ? */ + if ((netif->flags & NETIF_FLAG_IGMP) && ((ip4_addr_isany(ifaddr) || ip4_addr_cmp(netif_ip4_addr(netif), ifaddr)))) { + err_t res = igmp_leavegroup_netif(netif, groupaddr); + if (err != ERR_OK) { + /* Store this result if we have not yet gotten a success */ + err = res; + } + } + /* proceed to next network interface */ + netif = netif->next; + } + + return err; +} + +/** + * @ingroup igmp + * Leave a group on one network interface. + * + * @param netif the network interface which should leave a group + * @param groupaddr the ip address of the group which to leave + * @return ERR_OK if group was left on the netif, an err_t otherwise + */ +err_t +igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) +{ + struct igmp_group *group; + + /* make sure it is multicast address */ + LWIP_ERROR("igmp_leavegroup_netif: attempt to leave non-multicast address", ip4_addr_ismulticast(groupaddr), return ERR_VAL;); + LWIP_ERROR("igmp_leavegroup_netif: attempt to leave allsystems address", (!ip4_addr_cmp(groupaddr, &allsystems)), return ERR_VAL;); + + /* make sure it is an igmp-enabled netif */ + LWIP_ERROR("igmp_leavegroup_netif: attempt to leave on non-IGMP netif", netif->flags & NETIF_FLAG_IGMP, return ERR_VAL;); + + /* find group */ + group = igmp_lookfor_group(netif, groupaddr); + + if (group != NULL) { + /* Only send a leave if the flag is set according to the state diagram */ + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: Leaving group: ")); + ip4_addr_debug_print(IGMP_DEBUG, groupaddr); + LWIP_DEBUGF(IGMP_DEBUG, ("\n")); + + /* If there is no other use of the group */ + if (group->use <= 1) { + /* Remove the group from the list */ + igmp_remove_group(netif, group); + + /* If we are the last reporter for this group */ + if (group->last_reporter_flag) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: sending leaving group\n")); + IGMP_STATS_INC(igmp.tx_leave); + igmp_send(netif, group, IGMP_LEAVE_GROUP); + } + + /* Disable the group at the MAC level */ + if (netif->igmp_mac_filter != NULL) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: igmp_mac_filter(DEL ")); + ip4_addr_debug_print(IGMP_DEBUG, groupaddr); + LWIP_DEBUGF(IGMP_DEBUG, (") on if %p\n", (void*)netif)); + netif->igmp_mac_filter(netif, groupaddr, NETIF_DEL_MAC_FILTER); + } + + /* Free group struct */ + memp_free(MEMP_IGMP_GROUP, group); + } else { + /* Decrement group use */ + group->use--; + } + return ERR_OK; + } else { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_leavegroup_netif: not member of group\n")); + return ERR_VAL; + } +} + +/** + * The igmp timer function (both for NO_SYS=1 and =0) + * Should be called every IGMP_TMR_INTERVAL milliseconds (100 ms is default). + */ +void +igmp_tmr(void) +{ + struct netif *netif = netif_list; + + while (netif != NULL) { + struct igmp_group *group = netif_igmp_data(netif); + + while (group != NULL) { + if (group->timer > 0) { + group->timer--; + if (group->timer == 0) { + igmp_timeout(netif, group); + } + } + group = group->next; + } + netif = netif->next; + } +} + +/** + * Called if a timeout for one group is reached. + * Sends a report for this group. + * + * @param group an igmp_group for which a timeout is reached + */ +static void +igmp_timeout(struct netif *netif, struct igmp_group *group) +{ + /* If the state is IGMP_GROUP_DELAYING_MEMBER then we send a report for this group + (unless it is the allsystems group) */ + if ((group->group_state == IGMP_GROUP_DELAYING_MEMBER) && + (!(ip4_addr_cmp(&(group->group_address), &allsystems)))) { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_timeout: report membership for group with address ")); + ip4_addr_debug_print(IGMP_DEBUG, &(group->group_address)); + LWIP_DEBUGF(IGMP_DEBUG, (" on if %p\n", (void*)netif)); + + group->group_state = IGMP_GROUP_IDLE_MEMBER; + + IGMP_STATS_INC(igmp.tx_report); + igmp_send(netif, group, IGMP_V2_MEMB_REPORT); + } +} + +/** + * Start a timer for an igmp group + * + * @param group the igmp_group for which to start a timer + * @param max_time the time in multiples of IGMP_TMR_INTERVAL (decrease with + * every call to igmp_tmr()) + */ +static void +igmp_start_timer(struct igmp_group *group, u8_t max_time) +{ +#ifdef LWIP_RAND + group->timer = max_time > 2 ? (LWIP_RAND() % max_time) : 1; +#else /* LWIP_RAND */ + /* ATTENTION: use this only if absolutely necessary! */ + group->timer = max_time / 2; +#endif /* LWIP_RAND */ + + if (group->timer == 0) { + group->timer = 1; + } +} + +/** + * Delaying membership report for a group if necessary + * + * @param group the igmp_group for which "delaying" membership report + * @param maxresp query delay + */ +static void +igmp_delaying_member(struct igmp_group *group, u8_t maxresp) +{ + if ((group->group_state == IGMP_GROUP_IDLE_MEMBER) || + ((group->group_state == IGMP_GROUP_DELAYING_MEMBER) && + ((group->timer == 0) || (maxresp < group->timer)))) { + igmp_start_timer(group, maxresp); + group->group_state = IGMP_GROUP_DELAYING_MEMBER; + } +} + + +/** + * Sends an IP packet on a network interface. This function constructs the IP header + * and calculates the IP header checksum. If the source IP address is NULL, + * the IP address of the outgoing network interface is filled in as source address. + * + * @param p the packet to send (p->payload points to the data, e.g. next + protocol header; if dest == LWIP_IP_HDRINCL, p already includes an + IP header and p->payload points to that IP header) + * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the + * IP address of the netif used to send is used as source address) + * @param dest the destination IP address to send the packet to + * @param netif the netif on which to send this packet + * @return ERR_OK if the packet was sent OK + * ERR_BUF if p doesn't have enough space for IP/LINK headers + * returns errors returned by netif->output + */ +static err_t +igmp_ip_output_if(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, struct netif *netif) +{ + /* This is the "router alert" option */ + u16_t ra[2]; + ra[0] = PP_HTONS(ROUTER_ALERT); + ra[1] = 0x0000; /* Router shall examine packet */ + IGMP_STATS_INC(igmp.xmit); + return ip4_output_if_opt(p, src, dest, IGMP_TTL, 0, IP_PROTO_IGMP, netif, ra, ROUTER_ALERTLEN); +} + +/** + * Send an igmp packet to a specific group. + * + * @param group the group to which to send the packet + * @param type the type of igmp packet to send + */ +static void +igmp_send(struct netif *netif, struct igmp_group *group, u8_t type) +{ + struct pbuf* p = NULL; + struct igmp_msg* igmp = NULL; + ip4_addr_t src = *IP4_ADDR_ANY4; + ip4_addr_t* dest = NULL; + + /* IP header + "router alert" option + IGMP header */ + p = pbuf_alloc(PBUF_TRANSPORT, IGMP_MINLEN, PBUF_RAM); + + if (p) { + igmp = (struct igmp_msg *)p->payload; + LWIP_ASSERT("igmp_send: check that first pbuf can hold struct igmp_msg", + (p->len >= sizeof(struct igmp_msg))); + ip4_addr_copy(src, *netif_ip4_addr(netif)); + + if (type == IGMP_V2_MEMB_REPORT) { + dest = &(group->group_address); + ip4_addr_copy(igmp->igmp_group_address, group->group_address); + group->last_reporter_flag = 1; /* Remember we were the last to report */ + } else { + if (type == IGMP_LEAVE_GROUP) { + dest = &allrouters; + ip4_addr_copy(igmp->igmp_group_address, group->group_address); + } + } + + if ((type == IGMP_V2_MEMB_REPORT) || (type == IGMP_LEAVE_GROUP)) { + igmp->igmp_msgtype = type; + igmp->igmp_maxresp = 0; + igmp->igmp_checksum = 0; + igmp->igmp_checksum = inet_chksum(igmp, IGMP_MINLEN); + + igmp_ip_output_if(p, &src, dest, netif); + } + + pbuf_free(p); + } else { + LWIP_DEBUGF(IGMP_DEBUG, ("igmp_send: not enough memory for igmp_send\n")); + IGMP_STATS_INC(igmp.memerr); + } +} + +#endif /* LWIP_IPV4 && LWIP_IGMP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.c index 4e4eb61..5789712 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4.c @@ -1,1086 +1,1086 @@ -/** - * @file - * This is the IPv4 layer implementation for incoming and outgoing IP traffic. - * - * @see ip_frag.c - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV4 - -#include "lwip/ip.h" -#include "lwip/def.h" -#include "lwip/mem.h" -#include "lwip/ip4_frag.h" -#include "lwip/inet_chksum.h" -#include "lwip/netif.h" -#include "lwip/icmp.h" -#include "lwip/igmp.h" -#include "lwip/raw.h" -#include "lwip/udp.h" -#include "lwip/priv/tcp_priv.h" -#include "lwip/autoip.h" -#include "lwip/stats.h" -#include "lwip/prot/dhcp.h" - -#include - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -/** Set this to 0 in the rare case of wanting to call an extra function to - * generate the IP checksum (in contrast to calculating it on-the-fly). */ -#ifndef LWIP_INLINE_IP_CHKSUM -#if LWIP_CHECKSUM_CTRL_PER_NETIF -#define LWIP_INLINE_IP_CHKSUM 0 -#else /* LWIP_CHECKSUM_CTRL_PER_NETIF */ -#define LWIP_INLINE_IP_CHKSUM 1 -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ -#endif - -#if LWIP_INLINE_IP_CHKSUM && CHECKSUM_GEN_IP -#define CHECKSUM_GEN_IP_INLINE 1 -#else -#define CHECKSUM_GEN_IP_INLINE 0 -#endif - -#if LWIP_DHCP || defined(LWIP_IP_ACCEPT_UDP_PORT) -#define IP_ACCEPT_LINK_LAYER_ADDRESSING 1 - -/** Some defines for DHCP to let link-layer-addressed packets through while the - * netif is down. - * To use this in your own application/protocol, define LWIP_IP_ACCEPT_UDP_PORT(port) - * to return 1 if the port is accepted and 0 if the port is not accepted. - */ -#if LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) -/* accept DHCP client port and custom port */ -#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (((port) == PP_NTOHS(DHCP_CLIENT_PORT)) \ - || (LWIP_IP_ACCEPT_UDP_PORT(port))) -#elif defined(LWIP_IP_ACCEPT_UDP_PORT) /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ -/* accept custom port only */ -#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (LWIP_IP_ACCEPT_UDP_PORT(port)) -#else /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ -/* accept DHCP client port only */ -#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) ((port) == PP_NTOHS(DHCP_CLIENT_PORT)) -#endif /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ - -#else /* LWIP_DHCP */ -#define IP_ACCEPT_LINK_LAYER_ADDRESSING 0 -#endif /* LWIP_DHCP */ - -/** The IP header ID of the next outgoing IP packet */ -static u16_t ip_id; - -#if LWIP_MULTICAST_TX_OPTIONS -/** The default netif used for multicast */ -static struct netif* ip4_default_multicast_netif; - -/** - * @ingroup ip4 - * Set a default netif for IPv4 multicast. */ -void -ip4_set_default_multicast_netif(struct netif* default_multicast_netif) -{ - ip4_default_multicast_netif = default_multicast_netif; -} -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - -#ifdef LWIP_HOOK_IP4_ROUTE_SRC -/** - * Source based IPv4 routing must be fully implemented in - * LWIP_HOOK_IP4_ROUTE_SRC(). This function only provides he parameters. - */ -struct netif * -ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src) -{ - if (src != NULL) { - /* when src==NULL, the hook is called from ip4_route(dest) */ - struct netif *netif = LWIP_HOOK_IP4_ROUTE_SRC(dest, src); - if (netif != NULL) { - return netif; - } - } - return ip4_route(dest); -} -#endif /* LWIP_HOOK_IP4_ROUTE_SRC */ - -/** - * Finds the appropriate network interface for a given IP address. It - * searches the list of network interfaces linearly. A match is found - * if the masked IP address of the network interface equals the masked - * IP address given to the function. - * - * @param dest the destination IP address for which to find the route - * @return the netif on which to send to reach dest - */ -struct netif * -ip4_route(const ip4_addr_t *dest) -{ - struct netif *netif; - -#if LWIP_MULTICAST_TX_OPTIONS - /* Use administratively selected interface for multicast by default */ - if (ip4_addr_ismulticast(dest) && ip4_default_multicast_netif) { - return ip4_default_multicast_netif; - } -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - - /* iterate through netifs */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - /* is the netif up, does it have a link and a valid address? */ - if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { - /* network mask matches? */ - if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { - /* return netif on which to forward IP packet */ - return netif; - } - /* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */ - if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) { - /* return netif on which to forward IP packet */ - return netif; - } - } - } - -#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF - /* loopif is disabled, looopback traffic is passed through any netif */ - if (ip4_addr_isloopback(dest)) { - /* don't check for link on loopback traffic */ - if (netif_default != NULL && netif_is_up(netif_default)) { - return netif_default; - } - /* default netif is not up, just use any netif for loopback traffic */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (netif_is_up(netif)) { - return netif; - } - } - return NULL; - } -#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ - -#ifdef LWIP_HOOK_IP4_ROUTE_SRC - netif = LWIP_HOOK_IP4_ROUTE_SRC(dest, NULL); - if (netif != NULL) { - return netif; - } -#elif defined(LWIP_HOOK_IP4_ROUTE) - netif = LWIP_HOOK_IP4_ROUTE(dest); - if (netif != NULL) { - return netif; - } -#endif - - if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || - ip4_addr_isany_val(*netif_ip4_addr(netif_default))) { - /* No matching netif found and default netif is not usable. - If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */ - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); - IP_STATS_INC(ip.rterr); - MIB2_STATS_INC(mib2.ipoutnoroutes); - return NULL; - } - - return netif_default; -} - -#if IP_FORWARD -/** - * Determine whether an IP address is in a reserved set of addresses - * that may not be forwarded, or whether datagrams to that destination - * may be forwarded. - * @param p the packet to forward - * @return 1: can forward 0: discard - */ -static int -ip4_canforward(struct pbuf *p) -{ - u32_t addr = lwip_htonl(ip4_addr_get_u32(ip4_current_dest_addr())); - - if (p->flags & PBUF_FLAG_LLBCAST) { - /* don't route link-layer broadcasts */ - return 0; - } - if ((p->flags & PBUF_FLAG_LLMCAST) && !IP_MULTICAST(addr)) { - /* don't route link-layer multicasts unless the destination address is an IP - multicast address */ - return 0; - } - if (IP_EXPERIMENTAL(addr)) { - return 0; - } - if (IP_CLASSA(addr)) { - u32_t net = addr & IP_CLASSA_NET; - if ((net == 0) || (net == ((u32_t)IP_LOOPBACKNET << IP_CLASSA_NSHIFT))) { - /* don't route loopback packets */ - return 0; - } - } - return 1; -} - -/** - * Forwards an IP packet. It finds an appropriate route for the - * packet, decrements the TTL value of the packet, adjusts the - * checksum and outputs the packet on the appropriate interface. - * - * @param p the packet to forward (p->payload points to IP header) - * @param iphdr the IP header of the input packet - * @param inp the netif on which this packet was received - */ -static void -ip4_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) -{ - struct netif *netif; - - PERF_START; - LWIP_UNUSED_ARG(inp); - - if (!ip4_canforward(p)) { - goto return_noroute; - } - - /* RFC3927 2.7: do not forward link-local addresses */ - if (ip4_addr_islinklocal(ip4_current_dest_addr())) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: not forwarding LLA %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), - ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); - goto return_noroute; - } - - /* Find network interface where to forward this IP packet to. */ - netif = ip4_route_src(ip4_current_dest_addr(), ip4_current_src_addr()); - if (netif == NULL) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: no forwarding route for %"U16_F".%"U16_F".%"U16_F".%"U16_F" found\n", - ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), - ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); - /* @todo: send ICMP_DUR_NET? */ - goto return_noroute; - } -#if !IP_FORWARD_ALLOW_TX_ON_RX_NETIF - /* Do not forward packets onto the same network interface on which - * they arrived. */ - if (netif == inp) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: not bouncing packets back on incoming interface.\n")); - goto return_noroute; - } -#endif /* IP_FORWARD_ALLOW_TX_ON_RX_NETIF */ - - /* decrement TTL */ - IPH_TTL_SET(iphdr, IPH_TTL(iphdr) - 1); - /* send ICMP if TTL == 0 */ - if (IPH_TTL(iphdr) == 0) { - MIB2_STATS_INC(mib2.ipinhdrerrors); -#if LWIP_ICMP - /* Don't send ICMP messages in response to ICMP messages */ - if (IPH_PROTO(iphdr) != IP_PROTO_ICMP) { - icmp_time_exceeded(p, ICMP_TE_TTL); - } -#endif /* LWIP_ICMP */ - return; - } - - /* Incrementally update the IP checksum. */ - if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) { - IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1); - } else { - IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100)); - } - - LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: forwarding packet to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), - ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); - - IP_STATS_INC(ip.fw); - MIB2_STATS_INC(mib2.ipforwdatagrams); - IP_STATS_INC(ip.xmit); - - PERF_STOP("ip4_forward"); - /* don't fragment if interface has mtu set to 0 [loopif] */ - if (netif->mtu && (p->tot_len > netif->mtu)) { - if ((IPH_OFFSET(iphdr) & PP_NTOHS(IP_DF)) == 0) { -#if IP_FRAG - ip4_frag(p, netif, ip4_current_dest_addr()); -#else /* IP_FRAG */ - /* @todo: send ICMP Destination Unreachable code 13 "Communication administratively prohibited"? */ -#endif /* IP_FRAG */ - } else { -#if LWIP_ICMP - /* send ICMP Destination Unreachable code 4: "Fragmentation Needed and DF Set" */ - icmp_dest_unreach(p, ICMP_DUR_FRAG); -#endif /* LWIP_ICMP */ - } - return; - } - /* transmit pbuf on chosen interface */ - netif->output(netif, p, ip4_current_dest_addr()); - return; -return_noroute: - MIB2_STATS_INC(mib2.ipoutnoroutes); -} -#endif /* IP_FORWARD */ - -/** - * This function is called by the network interface device driver when - * an IP packet is received. The function does the basic checks of the - * IP header such as packet size being at least larger than the header - * size etc. If the packet was not destined for us, the packet is - * forwarded (using ip_forward). The IP checksum is always checked. - * - * Finally, the packet is sent to the upper layer protocol input function. - * - * @param p the received IP packet (p->payload points to IP header) - * @param inp the netif on which this packet was received - * @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) -{ - struct ip_hdr *iphdr; - struct netif *netif; - u16_t iphdr_hlen; - u16_t iphdr_len; -#if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP - int check_ip_src = 1; -#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP */ - - IP_STATS_INC(ip.recv); - MIB2_STATS_INC(mib2.ipinreceives); - - /* identify the IP header */ - iphdr = (struct ip_hdr *)p->payload; - if (IPH_V(iphdr) != 4) { - 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); - IP_STATS_INC(ip.err); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinhdrerrors); - return ERR_OK; - } - -#ifdef LWIP_HOOK_IP4_INPUT - if (LWIP_HOOK_IP4_INPUT(p, inp)) { - /* the packet has been eaten */ - return ERR_OK; - } -#endif - - /* obtain IP header length in number of 32-bit words */ - iphdr_hlen = IPH_HL(iphdr); - /* calculate IP header length in bytes */ - iphdr_hlen *= 4; - /* obtain ip length in bytes */ - iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); - - /* Trim pbuf. This is especially required for packets < 60 bytes. */ - if (iphdr_len < p->tot_len) { - pbuf_realloc(p, iphdr_len); - } - - /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ - if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) { - if (iphdr_hlen < IP_HLEN) { - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("ip4_input: short IP header (%"U16_F" bytes) received, IP packet dropped\n", iphdr_hlen)); - } - if (iphdr_hlen > p->len) { - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IP header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n", - iphdr_hlen, p->len)); - } - if (iphdr_len > p->tot_len) { - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", - iphdr_len, p->tot_len)); - } - /* free (drop) packet pbufs */ - pbuf_free(p); - IP_STATS_INC(ip.lenerr); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipindiscards); - return ERR_OK; - } - - /* verify checksum */ -#if CHECKSUM_CHECK_IP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_IP) { - if (inet_chksum(iphdr, iphdr_hlen) != 0) { - - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("Checksum (0x%"X16_F") failed, IP packet dropped.\n", inet_chksum(iphdr, iphdr_hlen))); - ip4_debug_print(p); - pbuf_free(p); - IP_STATS_INC(ip.chkerr); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinhdrerrors); - return ERR_OK; - } - } -#endif - - /* copy IP addresses to aligned ip_addr_t */ - ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); - ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); - - /* match packet against an interface, i.e. is this packet for us? */ - if (ip4_addr_ismulticast(ip4_current_dest_addr())) { -#if LWIP_IGMP - if ((inp->flags & NETIF_FLAG_IGMP) && (igmp_lookfor_group(inp, ip4_current_dest_addr()))) { - /* IGMP snooping switches need 0.0.0.0 to be allowed as source address (RFC 4541) */ - ip4_addr_t allsystems; - IP4_ADDR(&allsystems, 224, 0, 0, 1); - if (ip4_addr_cmp(ip4_current_dest_addr(), &allsystems) && - ip4_addr_isany(ip4_current_src_addr())) { - check_ip_src = 0; - } - netif = inp; - } else { - netif = NULL; - } -#else /* LWIP_IGMP */ - if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { - netif = inp; - } else { - netif = NULL; - } -#endif /* LWIP_IGMP */ - } else { - /* start trying with inp. if that's not acceptable, start walking the - list of configured netifs. - 'first' is used as a boolean to mark whether we started walking the list */ - int first = 1; - netif = inp; - do { - LWIP_DEBUGF(IP_DEBUG, ("ip_input: iphdr->dest 0x%"X32_F" netif->ip_addr 0x%"X32_F" (0x%"X32_F", 0x%"X32_F", 0x%"X32_F")\n", - ip4_addr_get_u32(&iphdr->dest), ip4_addr_get_u32(netif_ip4_addr(netif)), - ip4_addr_get_u32(&iphdr->dest) & 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(&iphdr->dest) & ~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)))) { - /* unicast to this interface address? */ - if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || - /* or broadcast on this interface network address? */ - ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) -#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF - || (ip4_addr_get_u32(ip4_current_dest_addr()) == PP_HTONL(IPADDR_LOOPBACK)) -#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ - ) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: packet accepted on interface %c%c\n", - netif->name[0], netif->name[1])); - /* break out of for loop */ - break; - } -#if LWIP_AUTOIP - /* connections to link-local addresses must persist after changing - the netif's address (RFC3927 ch. 1.9) */ - if (autoip_accept_packet(netif, ip4_current_dest_addr())) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: LLA packet accepted on interface %c%c\n", - netif->name[0], netif->name[1])); - /* break out of for loop */ - break; - } -#endif /* LWIP_AUTOIP */ - } - if (first) { -#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF - /* Packets sent to the loopback address must not be accepted on an - * interface that does not have the loopback address assigned to it, - * unless a non-loopback interface is used for loopback traffic. */ - if (ip4_addr_isloopback(ip4_current_dest_addr())) { - netif = NULL; - break; - } -#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ - first = 0; - netif = netif_list; - } else { - netif = netif->next; - } - if (netif == inp) { - netif = netif->next; - } - } while (netif != NULL); - } - -#if IP_ACCEPT_LINK_LAYER_ADDRESSING - /* Pass DHCP messages regardless of destination address. DHCP traffic is addressed - * using link layer addressing (such as Ethernet MAC) so we must not filter on IP. - * According to RFC 1542 section 3.1.1, referred by RFC 2131). - * - * If you want to accept private broadcast communication while a netif is down, - * define LWIP_IP_ACCEPT_UDP_PORT(dst_port), e.g.: - * - * #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345)) - */ - if (netif == NULL) { - /* remote port is DHCP server? */ - if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { - struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: UDP packet to DHCP client port %"U16_F"\n", - lwip_ntohs(udphdr->dest))); - if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); - netif = inp; - check_ip_src = 0; - } - } - } -#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ - - /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ -#if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING - if (check_ip_src -#if IP_ACCEPT_LINK_LAYER_ADDRESSING - /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ - && !ip4_addr_isany_val(*ip4_current_src_addr()) -#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ - ) -#endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ - { - if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || - (ip4_addr_ismulticast(ip4_current_src_addr()))) { - /* packet source is not valid */ - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip4_input: packet source is not valid.\n")); - /* free (drop) packet pbufs */ - pbuf_free(p); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinaddrerrors); - MIB2_STATS_INC(mib2.ipindiscards); - return ERR_OK; - } - } - - /* packet not for us? */ - if (netif == NULL) { - /* packet not for us, route or discard */ - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: packet not for us.\n")); -#if IP_FORWARD - /* non-broadcast packet? */ - if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), inp)) { - /* try to forward IP packet on (other) interfaces */ - ip4_forward(p, iphdr, inp); - } else -#endif /* IP_FORWARD */ - { - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinaddrerrors); - MIB2_STATS_INC(mib2.ipindiscards); - } - pbuf_free(p); - return ERR_OK; - } - /* packet consists of multiple fragments? */ - if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { -#if IP_REASSEMBLY /* packet fragment reassembly code present? */ - LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip4_reass()\n", - lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK)*8))); - /* reassemble the packet*/ - p = ip4_reass(p); - /* packet not fully reassembled yet? */ - if (p == NULL) { - return ERR_OK; - } - iphdr = (struct ip_hdr *)p->payload; -#else /* IP_REASSEMBLY == 0, no packet fragment reassembly code present */ - pbuf_free(p); - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since it was fragmented (0x%"X16_F") (while IP_REASSEMBLY == 0).\n", - lwip_ntohs(IPH_OFFSET(iphdr)))); - IP_STATS_INC(ip.opterr); - IP_STATS_INC(ip.drop); - /* unsupported protocol feature */ - MIB2_STATS_INC(mib2.ipinunknownprotos); - return ERR_OK; -#endif /* IP_REASSEMBLY */ - } - -#if IP_OPTIONS_ALLOWED == 0 /* no support for IP options in the IP header? */ - -#if LWIP_IGMP - /* there is an extra "router alert" option in IGMP messages which we allow for but do not police */ - if ((iphdr_hlen > IP_HLEN) && (IPH_PROTO(iphdr) != IP_PROTO_IGMP)) { -#else - if (iphdr_hlen > IP_HLEN) { -#endif /* LWIP_IGMP */ - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since there were IP options (while IP_OPTIONS_ALLOWED == 0).\n")); - pbuf_free(p); - IP_STATS_INC(ip.opterr); - IP_STATS_INC(ip.drop); - /* unsupported protocol feature */ - MIB2_STATS_INC(mib2.ipinunknownprotos); - return ERR_OK; - } -#endif /* IP_OPTIONS_ALLOWED == 0 */ - - /* send to upper layers */ - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: \n")); - ip4_debug_print(p); - LWIP_DEBUGF(IP_DEBUG, ("ip4_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); - - ip_data.current_netif = netif; - ip_data.current_input_netif = inp; - ip_data.current_ip4_header = iphdr; - ip_data.current_ip_header_tot_len = IPH_HL(iphdr) * 4; - -#if LWIP_RAW - /* raw input did not eat the packet? */ - if (raw_input(p, inp) == 0) -#endif /* LWIP_RAW */ - { - pbuf_header(p, -(s16_t)iphdr_hlen); /* Move to payload, no check necessary. */ - - switch (IPH_PROTO(iphdr)) { -#if LWIP_UDP - case IP_PROTO_UDP: -#if LWIP_UDPLITE - case IP_PROTO_UDPLITE: -#endif /* LWIP_UDPLITE */ - MIB2_STATS_INC(mib2.ipindelivers); - udp_input(p, inp); - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case IP_PROTO_TCP: - MIB2_STATS_INC(mib2.ipindelivers); - tcp_input(p, inp); - break; -#endif /* LWIP_TCP */ -#if LWIP_ICMP - case IP_PROTO_ICMP: - MIB2_STATS_INC(mib2.ipindelivers); - icmp_input(p, inp); - break; -#endif /* LWIP_ICMP */ -#if LWIP_IGMP - case IP_PROTO_IGMP: - igmp_input(p, inp, ip4_current_dest_addr()); - break; -#endif /* LWIP_IGMP */ - default: -#if LWIP_ICMP - /* send ICMP destination protocol unreachable unless is was a broadcast */ - if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && - !ip4_addr_ismulticast(ip4_current_dest_addr())) { - pbuf_header_force(p, iphdr_hlen); /* Move to ip header, no check necessary. */ - p->payload = iphdr; - icmp_dest_unreach(p, ICMP_DUR_PROTO); - } -#endif /* LWIP_ICMP */ - pbuf_free(p); - - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Unsupported transport protocol %"U16_F"\n", (u16_t)IPH_PROTO(iphdr))); - - IP_STATS_INC(ip.proterr); - IP_STATS_INC(ip.drop); - MIB2_STATS_INC(mib2.ipinunknownprotos); - } - } - - /* @todo: this is not really necessary... */ - ip_data.current_netif = NULL; - ip_data.current_input_netif = NULL; - ip_data.current_ip4_header = NULL; - 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; -} - -/** - * Sends an IP packet on a network interface. This function constructs - * the IP header and calculates the IP header checksum. If the source - * IP address is NULL, the IP address of the outgoing network - * interface is filled in as source address. - * If the destination IP address is LWIP_IP_HDRINCL, p is assumed to already - * include an IP header and p->payload points to it instead of the data. - * - * @param p the packet to send (p->payload points to the data, e.g. next - protocol header; if dest == LWIP_IP_HDRINCL, p already includes an - IP header and p->payload points to that IP header) - * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the - * IP address of the netif used to send is used as source address) - * @param dest the destination IP address to send the packet to - * @param ttl the TTL value to be set in the IP header - * @param tos the TOS value to be set in the IP header - * @param proto the PROTOCOL to be set in the IP header - * @param netif the netif on which to send this packet - * @return ERR_OK if the packet was sent OK - * ERR_BUF if p doesn't have enough space for IP/LINK headers - * returns errors returned by netif->output - * - * @note ip_id: RFC791 "some host may be able to simply use - * unique identifiers independent of destination" - */ -err_t -ip4_output_if(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) -{ -#if IP_OPTIONS_SEND - return ip4_output_if_opt(p, src, dest, ttl, tos, proto, netif, NULL, 0); -} - -/** - * Same as ip_output_if() but with the possibility to include IP options: - * - * @ param ip_options pointer to the IP options, copied into the IP header - * @ param optlen length of ip_options - */ -err_t -ip4_output_if_opt(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, void *ip_options, - u16_t optlen) -{ -#endif /* IP_OPTIONS_SEND */ - const ip4_addr_t *src_used = src; - if (dest != LWIP_IP_HDRINCL) { - if (ip4_addr_isany(src)) { - src_used = netif_ip4_addr(netif); - } - } - -#if IP_OPTIONS_SEND - return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto, netif, - ip_options, optlen); -#else /* IP_OPTIONS_SEND */ - return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif); -#endif /* IP_OPTIONS_SEND */ -} - -/** - * Same as ip_output_if() but 'src' address is not replaced by netif address - * when it is 'any'. - */ -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) -{ -#if IP_OPTIONS_SEND - return ip4_output_if_opt_src(p, src, dest, ttl, tos, proto, netif, NULL, 0); -} - -/** - * Same as ip_output_if_opt() but 'src' address is not replaced by netif address - * when it is 'any'. - */ -err_t -ip4_output_if_opt_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, void *ip_options, - u16_t optlen) -{ -#endif /* IP_OPTIONS_SEND */ - struct ip_hdr *iphdr; - ip4_addr_t dest_addr; -#if CHECKSUM_GEN_IP_INLINE - u32_t chk_sum = 0; -#endif /* CHECKSUM_GEN_IP_INLINE */ - - LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - - MIB2_STATS_INC(mib2.ipoutrequests); - - /* Should the IP header be generated or is it already included in p? */ - if (dest != LWIP_IP_HDRINCL) { - u16_t ip_hlen = IP_HLEN; -#if IP_OPTIONS_SEND - u16_t optlen_aligned = 0; - if (optlen != 0) { -#if CHECKSUM_GEN_IP_INLINE - int i; -#endif /* CHECKSUM_GEN_IP_INLINE */ - /* round up to a multiple of 4 */ - optlen_aligned = ((optlen + 3) & ~3); - ip_hlen += optlen_aligned; - /* First write in the IP options */ - if (pbuf_header(p, optlen_aligned)) { - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output_if_opt: not enough room for IP options in pbuf\n")); - IP_STATS_INC(ip.err); - MIB2_STATS_INC(mib2.ipoutdiscards); - return ERR_BUF; - } - MEMCPY(p->payload, ip_options, optlen); - if (optlen < optlen_aligned) { - /* zero the remaining bytes */ - memset(((char*)p->payload) + optlen, 0, optlen_aligned - optlen); - } -#if CHECKSUM_GEN_IP_INLINE - for (i = 0; i < optlen_aligned/2; i++) { - chk_sum += ((u16_t*)p->payload)[i]; - } -#endif /* CHECKSUM_GEN_IP_INLINE */ - } -#endif /* IP_OPTIONS_SEND */ - /* generate IP header */ - if (pbuf_header(p, IP_HLEN)) { - LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: not enough room for IP header in pbuf\n")); - - IP_STATS_INC(ip.err); - MIB2_STATS_INC(mib2.ipoutdiscards); - return ERR_BUF; - } - - iphdr = (struct ip_hdr *)p->payload; - LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", - (p->len >= sizeof(struct ip_hdr))); - - IPH_TTL_SET(iphdr, ttl); - IPH_PROTO_SET(iphdr, proto); -#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); -#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); - IPH_TOS_SET(iphdr, tos); -#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)); -#if CHECKSUM_GEN_IP_INLINE - chk_sum += iphdr->_len; -#endif /* CHECKSUM_GEN_IP_INLINE */ - IPH_OFFSET_SET(iphdr, 0); - IPH_ID_SET(iphdr, lwip_htons(ip_id)); -#if CHECKSUM_GEN_IP_INLINE - chk_sum += iphdr->_id; -#endif /* CHECKSUM_GEN_IP_INLINE */ - ++ip_id; - - if (src == NULL) { - ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); - } else { - /* src cannot be NULL here */ - ip4_addr_copy(iphdr->src, *src); - } - -#if CHECKSUM_GEN_IP_INLINE - chk_sum += ip4_addr_get_u32(&iphdr->src) & 0xFFFF; - chk_sum += ip4_addr_get_u32(&iphdr->src) >> 16; - chk_sum = (chk_sum >> 16) + (chk_sum & 0xFFFF); - chk_sum = (chk_sum >> 16) + chk_sum; - chk_sum = ~chk_sum; - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { - iphdr->_chksum = (u16_t)chk_sum; /* network order */ - } -#if LWIP_CHECKSUM_CTRL_PER_NETIF - else { - IPH_CHKSUM_SET(iphdr, 0); - } -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ -#else /* CHECKSUM_GEN_IP_INLINE */ - IPH_CHKSUM_SET(iphdr, 0); -#if CHECKSUM_GEN_IP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { - IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, ip_hlen)); - } -#endif /* CHECKSUM_GEN_IP */ -#endif /* CHECKSUM_GEN_IP_INLINE */ - } else { - /* IP header already included in p */ - iphdr = (struct ip_hdr *)p->payload; - ip4_addr_copy(dest_addr, iphdr->dest); - dest = &dest_addr; - } - - IP_STATS_INC(ip.xmit); - - LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], (u16_t)netif->num)); - ip4_debug_print(p); - -#if ENABLE_LOOPBACK - if (ip4_addr_cmp(dest, netif_ip4_addr(netif)) -#if !LWIP_HAVE_LOOPIF - || ip4_addr_isloopback(dest) -#endif /* !LWIP_HAVE_LOOPIF */ - ) { - /* Packet to self, enqueue it for loopback */ - LWIP_DEBUGF(IP_DEBUG, ("netif_loop_output()")); - return netif_loop_output(netif, p); - } -#if LWIP_MULTICAST_TX_OPTIONS - if ((p->flags & PBUF_FLAG_MCASTLOOP) != 0) { - netif_loop_output(netif, p); - } -#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)) { - 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); -} - -/** - * Simple interface to ip_output_if. It finds the outgoing network - * interface and calls upon ip_output_if to do the actual work. - * - * @param p the packet to send (p->payload points to the data, e.g. next - protocol header; if dest == LWIP_IP_HDRINCL, p already includes an - IP header and p->payload points to that IP header) - * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the - * IP address of the netif used to send is used as source address) - * @param dest the destination IP address to send the packet to - * @param ttl the TTL value to be set in the IP header - * @param tos the TOS value to be set in the IP header - * @param proto the PROTOCOL to be set in the IP header - * - * @return ERR_RTE if no route is found - * see ip_output_if() for more return values - */ -err_t -ip4_output(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; - - LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - - if ((netif = ip4_route_src(dest, src)) == NULL) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); - IP_STATS_INC(ip.rterr); - return ERR_RTE; - } - - return ip4_output_if(p, src, dest, ttl, tos, proto, netif); -} - -#if LWIP_NETIF_HWADDRHINT -/** Like ip_output, but takes and addr_hint pointer that is passed on to netif->addr_hint - * before calling ip_output_if. - * - * @param p the packet to send (p->payload points to the data, e.g. next - protocol header; if dest == LWIP_IP_HDRINCL, p already includes an - IP header and p->payload points to that IP header) - * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the - * IP address of the netif used to send is used as source address) - * @param dest the destination IP address to send the packet to - * @param ttl the TTL value to be set in the IP header - * @param tos the TOS value to be set in the IP header - * @param proto the PROTOCOL to be set in the IP header - * @param addr_hint address hint pointer set to netif->addr_hint before - * calling ip_output_if() - * - * @return ERR_RTE if no route is found - * see ip_output_if() for more return values - */ -err_t -ip4_output_hinted(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto, u8_t *addr_hint) -{ - struct netif *netif; - err_t err; - - LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - - if ((netif = ip4_route_src(dest, src)) == NULL) { - LWIP_DEBUGF(IP_DEBUG, ("ip4_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); - IP_STATS_INC(ip.rterr); - return ERR_RTE; - } - - NETIF_SET_HWADDRHINT(netif, addr_hint); - err = ip4_output_if(p, src, dest, ttl, tos, proto, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - - return err; -} -#endif /* LWIP_NETIF_HWADDRHINT*/ - -#if IP_DEBUG -/* Print an IP header by using LWIP_DEBUGF - * @param p an IP packet, p->payload pointing to the IP header - */ -void -ip4_debug_print(struct pbuf *p) -{ - struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; - - LWIP_DEBUGF(IP_DEBUG, ("IP header:\n")); - LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP_DEBUG, ("|%2"S16_F" |%2"S16_F" | 0x%02"X16_F" | %5"U16_F" | (v, hl, tos, len)\n", - (u16_t)IPH_V(iphdr), - (u16_t)IPH_HL(iphdr), - (u16_t)IPH_TOS(iphdr), - lwip_ntohs(IPH_LEN(iphdr)))); - LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP_DEBUG, ("| %5"U16_F" |%"U16_F"%"U16_F"%"U16_F"| %4"U16_F" | (id, flags, offset)\n", - lwip_ntohs(IPH_ID(iphdr)), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 15 & 1), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 14 & 1), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 13 & 1), - (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK))); - LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | 0x%04"X16_F" | (ttl, proto, chksum)\n", - (u16_t)IPH_TTL(iphdr), - (u16_t)IPH_PROTO(iphdr), - lwip_ntohs(IPH_CHKSUM(iphdr)))); - LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (src)\n", - ip4_addr1_16(&iphdr->src), - ip4_addr2_16(&iphdr->src), - ip4_addr3_16(&iphdr->src), - ip4_addr4_16(&iphdr->src))); - LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (dest)\n", - ip4_addr1_16(&iphdr->dest), - ip4_addr2_16(&iphdr->dest), - ip4_addr3_16(&iphdr->dest), - ip4_addr4_16(&iphdr->dest))); - LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); -} -#endif /* IP_DEBUG */ - -#endif /* LWIP_IPV4 */ +/** + * @file + * This is the IPv4 layer implementation for incoming and outgoing IP traffic. + * + * @see ip_frag.c + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV4 + +#include "lwip/ip.h" +#include "lwip/def.h" +#include "lwip/mem.h" +#include "lwip/ip4_frag.h" +#include "lwip/inet_chksum.h" +#include "lwip/netif.h" +#include "lwip/icmp.h" +#include "lwip/igmp.h" +#include "lwip/raw.h" +#include "lwip/udp.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/autoip.h" +#include "lwip/stats.h" +#include "lwip/prot/dhcp.h" + +#include + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +/** Set this to 0 in the rare case of wanting to call an extra function to + * generate the IP checksum (in contrast to calculating it on-the-fly). */ +#ifndef LWIP_INLINE_IP_CHKSUM +#if LWIP_CHECKSUM_CTRL_PER_NETIF +#define LWIP_INLINE_IP_CHKSUM 0 +#else /* LWIP_CHECKSUM_CTRL_PER_NETIF */ +#define LWIP_INLINE_IP_CHKSUM 1 +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ +#endif + +#if LWIP_INLINE_IP_CHKSUM && CHECKSUM_GEN_IP +#define CHECKSUM_GEN_IP_INLINE 1 +#else +#define CHECKSUM_GEN_IP_INLINE 0 +#endif + +#if LWIP_DHCP || defined(LWIP_IP_ACCEPT_UDP_PORT) +#define IP_ACCEPT_LINK_LAYER_ADDRESSING 1 + +/** Some defines for DHCP to let link-layer-addressed packets through while the + * netif is down. + * To use this in your own application/protocol, define LWIP_IP_ACCEPT_UDP_PORT(port) + * to return 1 if the port is accepted and 0 if the port is not accepted. + */ +#if LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) +/* accept DHCP client port and custom port */ +#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (((port) == PP_NTOHS(DHCP_CLIENT_PORT)) \ + || (LWIP_IP_ACCEPT_UDP_PORT(port))) +#elif defined(LWIP_IP_ACCEPT_UDP_PORT) /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ +/* accept custom port only */ +#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) (LWIP_IP_ACCEPT_UDP_PORT(port)) +#else /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ +/* accept DHCP client port only */ +#define IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(port) ((port) == PP_NTOHS(DHCP_CLIENT_PORT)) +#endif /* LWIP_DHCP && defined(LWIP_IP_ACCEPT_UDP_PORT) */ + +#else /* LWIP_DHCP */ +#define IP_ACCEPT_LINK_LAYER_ADDRESSING 0 +#endif /* LWIP_DHCP */ + +/** The IP header ID of the next outgoing IP packet */ +static u16_t ip_id; + +#if LWIP_MULTICAST_TX_OPTIONS +/** The default netif used for multicast */ +static struct netif* ip4_default_multicast_netif; + +/** + * @ingroup ip4 + * Set a default netif for IPv4 multicast. */ +void +ip4_set_default_multicast_netif(struct netif* default_multicast_netif) +{ + ip4_default_multicast_netif = default_multicast_netif; +} +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + +#ifdef LWIP_HOOK_IP4_ROUTE_SRC +/** + * Source based IPv4 routing must be fully implemented in + * LWIP_HOOK_IP4_ROUTE_SRC(). This function only provides he parameters. + */ +struct netif * +ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src) +{ + if (src != NULL) { + /* when src==NULL, the hook is called from ip4_route(dest) */ + struct netif *netif = LWIP_HOOK_IP4_ROUTE_SRC(dest, src); + if (netif != NULL) { + return netif; + } + } + return ip4_route(dest); +} +#endif /* LWIP_HOOK_IP4_ROUTE_SRC */ + +/** + * Finds the appropriate network interface for a given IP address. It + * searches the list of network interfaces linearly. A match is found + * if the masked IP address of the network interface equals the masked + * IP address given to the function. + * + * @param dest the destination IP address for which to find the route + * @return the netif on which to send to reach dest + */ +struct netif * +ip4_route(const ip4_addr_t *dest) +{ + struct netif *netif; + +#if LWIP_MULTICAST_TX_OPTIONS + /* Use administratively selected interface for multicast by default */ + if (ip4_addr_ismulticast(dest) && ip4_default_multicast_netif) { + return ip4_default_multicast_netif; + } +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + + /* iterate through netifs */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + /* is the netif up, does it have a link and a valid address? */ + if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { + /* network mask matches? */ + if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { + /* return netif on which to forward IP packet */ + return netif; + } + /* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */ + if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) { + /* return netif on which to forward IP packet */ + return netif; + } + } + } + +#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF + /* loopif is disabled, looopback traffic is passed through any netif */ + if (ip4_addr_isloopback(dest)) { + /* don't check for link on loopback traffic */ + if (netif_default != NULL && netif_is_up(netif_default)) { + return netif_default; + } + /* default netif is not up, just use any netif for loopback traffic */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + if (netif_is_up(netif)) { + return netif; + } + } + return NULL; + } +#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ + +#ifdef LWIP_HOOK_IP4_ROUTE_SRC + netif = LWIP_HOOK_IP4_ROUTE_SRC(dest, NULL); + if (netif != NULL) { + return netif; + } +#elif defined(LWIP_HOOK_IP4_ROUTE) + netif = LWIP_HOOK_IP4_ROUTE(dest); + if (netif != NULL) { + return netif; + } +#endif + + if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || + ip4_addr_isany_val(*netif_ip4_addr(netif_default))) { + /* No matching netif found and default netif is not usable. + If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */ + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); + IP_STATS_INC(ip.rterr); + MIB2_STATS_INC(mib2.ipoutnoroutes); + return NULL; + } + + return netif_default; +} + +#if IP_FORWARD +/** + * Determine whether an IP address is in a reserved set of addresses + * that may not be forwarded, or whether datagrams to that destination + * may be forwarded. + * @param p the packet to forward + * @return 1: can forward 0: discard + */ +static int +ip4_canforward(struct pbuf *p) +{ + u32_t addr = lwip_htonl(ip4_addr_get_u32(ip4_current_dest_addr())); + + if (p->flags & PBUF_FLAG_LLBCAST) { + /* don't route link-layer broadcasts */ + return 0; + } + if ((p->flags & PBUF_FLAG_LLMCAST) && !IP_MULTICAST(addr)) { + /* don't route link-layer multicasts unless the destination address is an IP + multicast address */ + return 0; + } + if (IP_EXPERIMENTAL(addr)) { + return 0; + } + if (IP_CLASSA(addr)) { + u32_t net = addr & IP_CLASSA_NET; + if ((net == 0) || (net == ((u32_t)IP_LOOPBACKNET << IP_CLASSA_NSHIFT))) { + /* don't route loopback packets */ + return 0; + } + } + return 1; +} + +/** + * Forwards an IP packet. It finds an appropriate route for the + * packet, decrements the TTL value of the packet, adjusts the + * checksum and outputs the packet on the appropriate interface. + * + * @param p the packet to forward (p->payload points to IP header) + * @param iphdr the IP header of the input packet + * @param inp the netif on which this packet was received + */ +static void +ip4_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) +{ + struct netif *netif; + + PERF_START; + LWIP_UNUSED_ARG(inp); + + if (!ip4_canforward(p)) { + goto return_noroute; + } + + /* RFC3927 2.7: do not forward link-local addresses */ + if (ip4_addr_islinklocal(ip4_current_dest_addr())) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: not forwarding LLA %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), + ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); + goto return_noroute; + } + + /* Find network interface where to forward this IP packet to. */ + netif = ip4_route_src(ip4_current_dest_addr(), ip4_current_src_addr()); + if (netif == NULL) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: no forwarding route for %"U16_F".%"U16_F".%"U16_F".%"U16_F" found\n", + ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), + ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); + /* @todo: send ICMP_DUR_NET? */ + goto return_noroute; + } +#if !IP_FORWARD_ALLOW_TX_ON_RX_NETIF + /* Do not forward packets onto the same network interface on which + * they arrived. */ + if (netif == inp) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: not bouncing packets back on incoming interface.\n")); + goto return_noroute; + } +#endif /* IP_FORWARD_ALLOW_TX_ON_RX_NETIF */ + + /* decrement TTL */ + IPH_TTL_SET(iphdr, IPH_TTL(iphdr) - 1); + /* send ICMP if TTL == 0 */ + if (IPH_TTL(iphdr) == 0) { + MIB2_STATS_INC(mib2.ipinhdrerrors); +#if LWIP_ICMP + /* Don't send ICMP messages in response to ICMP messages */ + if (IPH_PROTO(iphdr) != IP_PROTO_ICMP) { + icmp_time_exceeded(p, ICMP_TE_TTL); + } +#endif /* LWIP_ICMP */ + return; + } + + /* Incrementally update the IP checksum. */ + if (IPH_CHKSUM(iphdr) >= PP_HTONS(0xffffU - 0x100)) { + IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100) + 1); + } else { + IPH_CHKSUM_SET(iphdr, IPH_CHKSUM(iphdr) + PP_HTONS(0x100)); + } + + LWIP_DEBUGF(IP_DEBUG, ("ip4_forward: forwarding packet to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(ip4_current_dest_addr()), ip4_addr2_16(ip4_current_dest_addr()), + ip4_addr3_16(ip4_current_dest_addr()), ip4_addr4_16(ip4_current_dest_addr()))); + + IP_STATS_INC(ip.fw); + MIB2_STATS_INC(mib2.ipforwdatagrams); + IP_STATS_INC(ip.xmit); + + PERF_STOP("ip4_forward"); + /* don't fragment if interface has mtu set to 0 [loopif] */ + if (netif->mtu && (p->tot_len > netif->mtu)) { + if ((IPH_OFFSET(iphdr) & PP_NTOHS(IP_DF)) == 0) { +#if IP_FRAG + ip4_frag(p, netif, ip4_current_dest_addr()); +#else /* IP_FRAG */ + /* @todo: send ICMP Destination Unreachable code 13 "Communication administratively prohibited"? */ +#endif /* IP_FRAG */ + } else { +#if LWIP_ICMP + /* send ICMP Destination Unreachable code 4: "Fragmentation Needed and DF Set" */ + icmp_dest_unreach(p, ICMP_DUR_FRAG); +#endif /* LWIP_ICMP */ + } + return; + } + /* transmit pbuf on chosen interface */ + netif->output(netif, p, ip4_current_dest_addr()); + return; +return_noroute: + MIB2_STATS_INC(mib2.ipoutnoroutes); +} +#endif /* IP_FORWARD */ + +/** + * This function is called by the network interface device driver when + * an IP packet is received. The function does the basic checks of the + * IP header such as packet size being at least larger than the header + * size etc. If the packet was not destined for us, the packet is + * forwarded (using ip_forward). The IP checksum is always checked. + * + * Finally, the packet is sent to the upper layer protocol input function. + * + * @param p the received IP packet (p->payload points to IP header) + * @param inp the netif on which this packet was received + * @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) +{ + struct ip_hdr *iphdr; + struct netif *netif; + u16_t iphdr_hlen; + u16_t iphdr_len; +#if IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP + int check_ip_src = 1; +#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP */ + + IP_STATS_INC(ip.recv); + MIB2_STATS_INC(mib2.ipinreceives); + + /* identify the IP header */ + iphdr = (struct ip_hdr *)p->payload; + if (IPH_V(iphdr) != 4) { + 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); + IP_STATS_INC(ip.err); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinhdrerrors); + return ERR_OK; + } + +#ifdef LWIP_HOOK_IP4_INPUT + if (LWIP_HOOK_IP4_INPUT(p, inp)) { + /* the packet has been eaten */ + return ERR_OK; + } +#endif + + /* obtain IP header length in number of 32-bit words */ + iphdr_hlen = IPH_HL(iphdr); + /* calculate IP header length in bytes */ + iphdr_hlen *= 4; + /* obtain ip length in bytes */ + iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); + + /* Trim pbuf. This is especially required for packets < 60 bytes. */ + if (iphdr_len < p->tot_len) { + pbuf_realloc(p, iphdr_len); + } + + /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ + if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) { + if (iphdr_hlen < IP_HLEN) { + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("ip4_input: short IP header (%"U16_F" bytes) received, IP packet dropped\n", iphdr_hlen)); + } + if (iphdr_hlen > p->len) { + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IP header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n", + iphdr_hlen, p->len)); + } + if (iphdr_len > p->tot_len) { + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", + iphdr_len, p->tot_len)); + } + /* free (drop) packet pbufs */ + pbuf_free(p); + IP_STATS_INC(ip.lenerr); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipindiscards); + return ERR_OK; + } + + /* verify checksum */ +#if CHECKSUM_CHECK_IP + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_IP) { + if (inet_chksum(iphdr, iphdr_hlen) != 0) { + + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("Checksum (0x%"X16_F") failed, IP packet dropped.\n", inet_chksum(iphdr, iphdr_hlen))); + ip4_debug_print(p); + pbuf_free(p); + IP_STATS_INC(ip.chkerr); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinhdrerrors); + return ERR_OK; + } + } +#endif + + /* copy IP addresses to aligned ip_addr_t */ + ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); + ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); + + /* match packet against an interface, i.e. is this packet for us? */ + if (ip4_addr_ismulticast(ip4_current_dest_addr())) { +#if LWIP_IGMP + if ((inp->flags & NETIF_FLAG_IGMP) && (igmp_lookfor_group(inp, ip4_current_dest_addr()))) { + /* IGMP snooping switches need 0.0.0.0 to be allowed as source address (RFC 4541) */ + ip4_addr_t allsystems; + IP4_ADDR(&allsystems, 224, 0, 0, 1); + if (ip4_addr_cmp(ip4_current_dest_addr(), &allsystems) && + ip4_addr_isany(ip4_current_src_addr())) { + check_ip_src = 0; + } + netif = inp; + } else { + netif = NULL; + } +#else /* LWIP_IGMP */ + if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { + netif = inp; + } else { + netif = NULL; + } +#endif /* LWIP_IGMP */ + } else { + /* start trying with inp. if that's not acceptable, start walking the + list of configured netifs. + 'first' is used as a boolean to mark whether we started walking the list */ + int first = 1; + netif = inp; + do { + LWIP_DEBUGF(IP_DEBUG, ("ip_input: iphdr->dest 0x%"X32_F" netif->ip_addr 0x%"X32_F" (0x%"X32_F", 0x%"X32_F", 0x%"X32_F")\n", + ip4_addr_get_u32(&iphdr->dest), ip4_addr_get_u32(netif_ip4_addr(netif)), + ip4_addr_get_u32(&iphdr->dest) & 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(&iphdr->dest) & ~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)))) { + /* unicast to this interface address? */ + if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || + /* or broadcast on this interface network address? */ + ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) +#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF + || (ip4_addr_get_u32(ip4_current_dest_addr()) == PP_HTONL(IPADDR_LOOPBACK)) +#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ + ) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: packet accepted on interface %c%c\n", + netif->name[0], netif->name[1])); + /* break out of for loop */ + break; + } +#if LWIP_AUTOIP + /* connections to link-local addresses must persist after changing + the netif's address (RFC3927 ch. 1.9) */ + if (autoip_accept_packet(netif, ip4_current_dest_addr())) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: LLA packet accepted on interface %c%c\n", + netif->name[0], netif->name[1])); + /* break out of for loop */ + break; + } +#endif /* LWIP_AUTOIP */ + } + if (first) { +#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF + /* Packets sent to the loopback address must not be accepted on an + * interface that does not have the loopback address assigned to it, + * unless a non-loopback interface is used for loopback traffic. */ + if (ip4_addr_isloopback(ip4_current_dest_addr())) { + netif = NULL; + break; + } +#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ + first = 0; + netif = netif_list; + } else { + netif = netif->next; + } + if (netif == inp) { + netif = netif->next; + } + } while (netif != NULL); + } + +#if IP_ACCEPT_LINK_LAYER_ADDRESSING + /* Pass DHCP messages regardless of destination address. DHCP traffic is addressed + * using link layer addressing (such as Ethernet MAC) so we must not filter on IP. + * According to RFC 1542 section 3.1.1, referred by RFC 2131). + * + * If you want to accept private broadcast communication while a netif is down, + * define LWIP_IP_ACCEPT_UDP_PORT(dst_port), e.g.: + * + * #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345)) + */ + if (netif == NULL) { + /* remote port is DHCP server? */ + if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { + struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: UDP packet to DHCP client port %"U16_F"\n", + lwip_ntohs(udphdr->dest))); + if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); + netif = inp; + check_ip_src = 0; + } + } + } +#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ + + /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ +#if LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING + if (check_ip_src +#if IP_ACCEPT_LINK_LAYER_ADDRESSING + /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ + && !ip4_addr_isany_val(*ip4_current_src_addr()) +#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ + ) +#endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ + { + if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || + (ip4_addr_ismulticast(ip4_current_src_addr()))) { + /* packet source is not valid */ + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip4_input: packet source is not valid.\n")); + /* free (drop) packet pbufs */ + pbuf_free(p); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinaddrerrors); + MIB2_STATS_INC(mib2.ipindiscards); + return ERR_OK; + } + } + + /* packet not for us? */ + if (netif == NULL) { + /* packet not for us, route or discard */ + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: packet not for us.\n")); +#if IP_FORWARD + /* non-broadcast packet? */ + if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), inp)) { + /* try to forward IP packet on (other) interfaces */ + ip4_forward(p, iphdr, inp); + } else +#endif /* IP_FORWARD */ + { + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinaddrerrors); + MIB2_STATS_INC(mib2.ipindiscards); + } + pbuf_free(p); + return ERR_OK; + } + /* packet consists of multiple fragments? */ + if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { +#if IP_REASSEMBLY /* packet fragment reassembly code present? */ + LWIP_DEBUGF(IP_DEBUG, ("IP packet is a fragment (id=0x%04"X16_F" tot_len=%"U16_F" len=%"U16_F" MF=%"U16_F" offset=%"U16_F"), calling ip4_reass()\n", + lwip_ntohs(IPH_ID(iphdr)), p->tot_len, lwip_ntohs(IPH_LEN(iphdr)), (u16_t)!!(IPH_OFFSET(iphdr) & PP_HTONS(IP_MF)), (u16_t)((lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK)*8))); + /* reassemble the packet*/ + p = ip4_reass(p); + /* packet not fully reassembled yet? */ + if (p == NULL) { + return ERR_OK; + } + iphdr = (struct ip_hdr *)p->payload; +#else /* IP_REASSEMBLY == 0, no packet fragment reassembly code present */ + pbuf_free(p); + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since it was fragmented (0x%"X16_F") (while IP_REASSEMBLY == 0).\n", + lwip_ntohs(IPH_OFFSET(iphdr)))); + IP_STATS_INC(ip.opterr); + IP_STATS_INC(ip.drop); + /* unsupported protocol feature */ + MIB2_STATS_INC(mib2.ipinunknownprotos); + return ERR_OK; +#endif /* IP_REASSEMBLY */ + } + +#if IP_OPTIONS_ALLOWED == 0 /* no support for IP options in the IP header? */ + +#if LWIP_IGMP + /* there is an extra "router alert" option in IGMP messages which we allow for but do not police */ + if ((iphdr_hlen > IP_HLEN) && (IPH_PROTO(iphdr) != IP_PROTO_IGMP)) { +#else + if (iphdr_hlen > IP_HLEN) { +#endif /* LWIP_IGMP */ + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since there were IP options (while IP_OPTIONS_ALLOWED == 0).\n")); + pbuf_free(p); + IP_STATS_INC(ip.opterr); + IP_STATS_INC(ip.drop); + /* unsupported protocol feature */ + MIB2_STATS_INC(mib2.ipinunknownprotos); + return ERR_OK; + } +#endif /* IP_OPTIONS_ALLOWED == 0 */ + + /* send to upper layers */ + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: \n")); + ip4_debug_print(p); + LWIP_DEBUGF(IP_DEBUG, ("ip4_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); + + ip_data.current_netif = netif; + ip_data.current_input_netif = inp; + ip_data.current_ip4_header = iphdr; + ip_data.current_ip_header_tot_len = IPH_HL(iphdr) * 4; + +#if LWIP_RAW + /* raw input did not eat the packet? */ + if (raw_input(p, inp) == 0) +#endif /* LWIP_RAW */ + { + pbuf_header(p, -(s16_t)iphdr_hlen); /* Move to payload, no check necessary. */ + + switch (IPH_PROTO(iphdr)) { +#if LWIP_UDP + case IP_PROTO_UDP: +#if LWIP_UDPLITE + case IP_PROTO_UDPLITE: +#endif /* LWIP_UDPLITE */ + MIB2_STATS_INC(mib2.ipindelivers); + udp_input(p, inp); + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case IP_PROTO_TCP: + MIB2_STATS_INC(mib2.ipindelivers); + tcp_input(p, inp); + break; +#endif /* LWIP_TCP */ +#if LWIP_ICMP + case IP_PROTO_ICMP: + MIB2_STATS_INC(mib2.ipindelivers); + icmp_input(p, inp); + break; +#endif /* LWIP_ICMP */ +#if LWIP_IGMP + case IP_PROTO_IGMP: + igmp_input(p, inp, ip4_current_dest_addr()); + break; +#endif /* LWIP_IGMP */ + default: +#if LWIP_ICMP + /* send ICMP destination protocol unreachable unless is was a broadcast */ + if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && + !ip4_addr_ismulticast(ip4_current_dest_addr())) { + pbuf_header_force(p, iphdr_hlen); /* Move to ip header, no check necessary. */ + p->payload = iphdr; + icmp_dest_unreach(p, ICMP_DUR_PROTO); + } +#endif /* LWIP_ICMP */ + pbuf_free(p); + + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Unsupported transport protocol %"U16_F"\n", (u16_t)IPH_PROTO(iphdr))); + + IP_STATS_INC(ip.proterr); + IP_STATS_INC(ip.drop); + MIB2_STATS_INC(mib2.ipinunknownprotos); + } + } + + /* @todo: this is not really necessary... */ + ip_data.current_netif = NULL; + ip_data.current_input_netif = NULL; + ip_data.current_ip4_header = NULL; + 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; +} + +/** + * Sends an IP packet on a network interface. This function constructs + * the IP header and calculates the IP header checksum. If the source + * IP address is NULL, the IP address of the outgoing network + * interface is filled in as source address. + * If the destination IP address is LWIP_IP_HDRINCL, p is assumed to already + * include an IP header and p->payload points to it instead of the data. + * + * @param p the packet to send (p->payload points to the data, e.g. next + protocol header; if dest == LWIP_IP_HDRINCL, p already includes an + IP header and p->payload points to that IP header) + * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the + * IP address of the netif used to send is used as source address) + * @param dest the destination IP address to send the packet to + * @param ttl the TTL value to be set in the IP header + * @param tos the TOS value to be set in the IP header + * @param proto the PROTOCOL to be set in the IP header + * @param netif the netif on which to send this packet + * @return ERR_OK if the packet was sent OK + * ERR_BUF if p doesn't have enough space for IP/LINK headers + * returns errors returned by netif->output + * + * @note ip_id: RFC791 "some host may be able to simply use + * unique identifiers independent of destination" + */ +err_t +ip4_output_if(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) +{ +#if IP_OPTIONS_SEND + return ip4_output_if_opt(p, src, dest, ttl, tos, proto, netif, NULL, 0); +} + +/** + * Same as ip_output_if() but with the possibility to include IP options: + * + * @ param ip_options pointer to the IP options, copied into the IP header + * @ param optlen length of ip_options + */ +err_t +ip4_output_if_opt(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, void *ip_options, + u16_t optlen) +{ +#endif /* IP_OPTIONS_SEND */ + const ip4_addr_t *src_used = src; + if (dest != LWIP_IP_HDRINCL) { + if (ip4_addr_isany(src)) { + src_used = netif_ip4_addr(netif); + } + } + +#if IP_OPTIONS_SEND + return ip4_output_if_opt_src(p, src_used, dest, ttl, tos, proto, netif, + ip_options, optlen); +#else /* IP_OPTIONS_SEND */ + return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif); +#endif /* IP_OPTIONS_SEND */ +} + +/** + * Same as ip_output_if() but 'src' address is not replaced by netif address + * when it is 'any'. + */ +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) +{ +#if IP_OPTIONS_SEND + return ip4_output_if_opt_src(p, src, dest, ttl, tos, proto, netif, NULL, 0); +} + +/** + * Same as ip_output_if_opt() but 'src' address is not replaced by netif address + * when it is 'any'. + */ +err_t +ip4_output_if_opt_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, void *ip_options, + u16_t optlen) +{ +#endif /* IP_OPTIONS_SEND */ + struct ip_hdr *iphdr; + ip4_addr_t dest_addr; +#if CHECKSUM_GEN_IP_INLINE + u32_t chk_sum = 0; +#endif /* CHECKSUM_GEN_IP_INLINE */ + + LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); + + MIB2_STATS_INC(mib2.ipoutrequests); + + /* Should the IP header be generated or is it already included in p? */ + if (dest != LWIP_IP_HDRINCL) { + u16_t ip_hlen = IP_HLEN; +#if IP_OPTIONS_SEND + u16_t optlen_aligned = 0; + if (optlen != 0) { +#if CHECKSUM_GEN_IP_INLINE + int i; +#endif /* CHECKSUM_GEN_IP_INLINE */ + /* round up to a multiple of 4 */ + optlen_aligned = ((optlen + 3) & ~3); + ip_hlen += optlen_aligned; + /* First write in the IP options */ + if (pbuf_header(p, optlen_aligned)) { + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output_if_opt: not enough room for IP options in pbuf\n")); + IP_STATS_INC(ip.err); + MIB2_STATS_INC(mib2.ipoutdiscards); + return ERR_BUF; + } + MEMCPY(p->payload, ip_options, optlen); + if (optlen < optlen_aligned) { + /* zero the remaining bytes */ + memset(((char*)p->payload) + optlen, 0, optlen_aligned - optlen); + } +#if CHECKSUM_GEN_IP_INLINE + for (i = 0; i < optlen_aligned/2; i++) { + chk_sum += ((u16_t*)p->payload)[i]; + } +#endif /* CHECKSUM_GEN_IP_INLINE */ + } +#endif /* IP_OPTIONS_SEND */ + /* generate IP header */ + if (pbuf_header(p, IP_HLEN)) { + LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_output: not enough room for IP header in pbuf\n")); + + IP_STATS_INC(ip.err); + MIB2_STATS_INC(mib2.ipoutdiscards); + return ERR_BUF; + } + + iphdr = (struct ip_hdr *)p->payload; + LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", + (p->len >= sizeof(struct ip_hdr))); + + IPH_TTL_SET(iphdr, ttl); + IPH_PROTO_SET(iphdr, proto); +#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); +#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); + IPH_TOS_SET(iphdr, tos); +#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)); +#if CHECKSUM_GEN_IP_INLINE + chk_sum += iphdr->_len; +#endif /* CHECKSUM_GEN_IP_INLINE */ + IPH_OFFSET_SET(iphdr, 0); + IPH_ID_SET(iphdr, lwip_htons(ip_id)); +#if CHECKSUM_GEN_IP_INLINE + chk_sum += iphdr->_id; +#endif /* CHECKSUM_GEN_IP_INLINE */ + ++ip_id; + + if (src == NULL) { + ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); + } else { + /* src cannot be NULL here */ + ip4_addr_copy(iphdr->src, *src); + } + +#if CHECKSUM_GEN_IP_INLINE + chk_sum += ip4_addr_get_u32(&iphdr->src) & 0xFFFF; + chk_sum += ip4_addr_get_u32(&iphdr->src) >> 16; + chk_sum = (chk_sum >> 16) + (chk_sum & 0xFFFF); + chk_sum = (chk_sum >> 16) + chk_sum; + chk_sum = ~chk_sum; + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { + iphdr->_chksum = (u16_t)chk_sum; /* network order */ + } +#if LWIP_CHECKSUM_CTRL_PER_NETIF + else { + IPH_CHKSUM_SET(iphdr, 0); + } +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ +#else /* CHECKSUM_GEN_IP_INLINE */ + IPH_CHKSUM_SET(iphdr, 0); +#if CHECKSUM_GEN_IP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { + IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, ip_hlen)); + } +#endif /* CHECKSUM_GEN_IP */ +#endif /* CHECKSUM_GEN_IP_INLINE */ + } else { + /* IP header already included in p */ + iphdr = (struct ip_hdr *)p->payload; + ip4_addr_copy(dest_addr, iphdr->dest); + dest = &dest_addr; + } + + IP_STATS_INC(ip.xmit); + + LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], (u16_t)netif->num)); + ip4_debug_print(p); + +#if ENABLE_LOOPBACK + if (ip4_addr_cmp(dest, netif_ip4_addr(netif)) +#if !LWIP_HAVE_LOOPIF + || ip4_addr_isloopback(dest) +#endif /* !LWIP_HAVE_LOOPIF */ + ) { + /* Packet to self, enqueue it for loopback */ + LWIP_DEBUGF(IP_DEBUG, ("netif_loop_output()")); + return netif_loop_output(netif, p); + } +#if LWIP_MULTICAST_TX_OPTIONS + if ((p->flags & PBUF_FLAG_MCASTLOOP) != 0) { + netif_loop_output(netif, p); + } +#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)) { + 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); +} + +/** + * Simple interface to ip_output_if. It finds the outgoing network + * interface and calls upon ip_output_if to do the actual work. + * + * @param p the packet to send (p->payload points to the data, e.g. next + protocol header; if dest == LWIP_IP_HDRINCL, p already includes an + IP header and p->payload points to that IP header) + * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the + * IP address of the netif used to send is used as source address) + * @param dest the destination IP address to send the packet to + * @param ttl the TTL value to be set in the IP header + * @param tos the TOS value to be set in the IP header + * @param proto the PROTOCOL to be set in the IP header + * + * @return ERR_RTE if no route is found + * see ip_output_if() for more return values + */ +err_t +ip4_output(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; + + LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); + + if ((netif = ip4_route_src(dest, src)) == NULL) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); + IP_STATS_INC(ip.rterr); + return ERR_RTE; + } + + return ip4_output_if(p, src, dest, ttl, tos, proto, netif); +} + +#if LWIP_NETIF_HWADDRHINT +/** Like ip_output, but takes and addr_hint pointer that is passed on to netif->addr_hint + * before calling ip_output_if. + * + * @param p the packet to send (p->payload points to the data, e.g. next + protocol header; if dest == LWIP_IP_HDRINCL, p already includes an + IP header and p->payload points to that IP header) + * @param src the source IP address to send from (if src == IP4_ADDR_ANY, the + * IP address of the netif used to send is used as source address) + * @param dest the destination IP address to send the packet to + * @param ttl the TTL value to be set in the IP header + * @param tos the TOS value to be set in the IP header + * @param proto the PROTOCOL to be set in the IP header + * @param addr_hint address hint pointer set to netif->addr_hint before + * calling ip_output_if() + * + * @return ERR_RTE if no route is found + * see ip_output_if() for more return values + */ +err_t +ip4_output_hinted(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, + u8_t ttl, u8_t tos, u8_t proto, u8_t *addr_hint) +{ + struct netif *netif; + err_t err; + + LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); + + if ((netif = ip4_route_src(dest, src)) == NULL) { + LWIP_DEBUGF(IP_DEBUG, ("ip4_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); + IP_STATS_INC(ip.rterr); + return ERR_RTE; + } + + NETIF_SET_HWADDRHINT(netif, addr_hint); + err = ip4_output_if(p, src, dest, ttl, tos, proto, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + + return err; +} +#endif /* LWIP_NETIF_HWADDRHINT*/ + +#if IP_DEBUG +/* Print an IP header by using LWIP_DEBUGF + * @param p an IP packet, p->payload pointing to the IP header + */ +void +ip4_debug_print(struct pbuf *p) +{ + struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; + + LWIP_DEBUGF(IP_DEBUG, ("IP header:\n")); + LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP_DEBUG, ("|%2"S16_F" |%2"S16_F" | 0x%02"X16_F" | %5"U16_F" | (v, hl, tos, len)\n", + (u16_t)IPH_V(iphdr), + (u16_t)IPH_HL(iphdr), + (u16_t)IPH_TOS(iphdr), + lwip_ntohs(IPH_LEN(iphdr)))); + LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP_DEBUG, ("| %5"U16_F" |%"U16_F"%"U16_F"%"U16_F"| %4"U16_F" | (id, flags, offset)\n", + lwip_ntohs(IPH_ID(iphdr)), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 15 & 1), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 14 & 1), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) >> 13 & 1), + (u16_t)(lwip_ntohs(IPH_OFFSET(iphdr)) & IP_OFFMASK))); + LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | 0x%04"X16_F" | (ttl, proto, chksum)\n", + (u16_t)IPH_TTL(iphdr), + (u16_t)IPH_PROTO(iphdr), + lwip_ntohs(IPH_CHKSUM(iphdr)))); + LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (src)\n", + ip4_addr1_16(&iphdr->src), + ip4_addr2_16(&iphdr->src), + ip4_addr3_16(&iphdr->src), + ip4_addr4_16(&iphdr->src))); + LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP_DEBUG, ("| %3"U16_F" | %3"U16_F" | %3"U16_F" | %3"U16_F" | (dest)\n", + ip4_addr1_16(&iphdr->dest), + ip4_addr2_16(&iphdr->dest), + ip4_addr3_16(&iphdr->dest), + ip4_addr4_16(&iphdr->dest))); + LWIP_DEBUGF(IP_DEBUG, ("+-------------------------------+\n")); +} +#endif /* IP_DEBUG */ + +#endif /* LWIP_IPV4 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.c index 2d47992..40e9ffa 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_addr.c @@ -1,331 +1,331 @@ -/** - * @file - * This is the IPv4 address tools implementation. - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV4 - -#include "lwip/ip_addr.h" -#include "lwip/netif.h" - -/* used by IP4_ADDR_ANY and IP_ADDR_BROADCAST in ip_addr.h */ -const ip_addr_t ip_addr_any = IPADDR4_INIT(IPADDR_ANY); -const ip_addr_t ip_addr_broadcast = IPADDR4_INIT(IPADDR_BROADCAST); - -/** - * Determine if an address is a broadcast address on a network interface - * - * @param addr address to be checked - * @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) -{ - ip4_addr_t ipaddr; - ip4_addr_set_u32(&ipaddr, addr); - - /* all ones (broadcast) or all zeroes (old skool broadcast) */ - if ((~addr == IPADDR_ANY) || - (addr == IPADDR_ANY)) { - return 1; - /* no broadcast support on this network interface? */ - } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { - /* 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))) { - return 0; - /* on the same (sub) network... */ - } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) - /* ...and host identifier bits are all ones? =>... */ - && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == - (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { - /* => network broadcast address */ - return 1; - } else { - return 0; - } -} - -/** Checks if a netmask is valid (starting with ones, then only zeros) - * - * @param netmask the IPv4 netmask to check (in network byte order!) - * @return 1 if the netmask is valid, 0 if it is not - */ -u8_t -ip4_addr_netmask_valid(u32_t netmask) -{ - u32_t mask; - u32_t nm_hostorder = lwip_htonl(netmask); - - /* first, check for the first zero */ - for (mask = 1UL << 31 ; mask != 0; mask >>= 1) { - if ((nm_hostorder & mask) == 0) { - break; - } - } - /* then check that there is no one */ - for (; mask != 0; mask >>= 1) { - if ((nm_hostorder & mask) != 0) { - /* there is a one after the first zero -> invalid */ - return 0; - } - } - /* no one after the first zero -> valid */ - return 1; -} - -/* Here for now until needed in other places in lwIP */ -#ifndef isprint -#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up) -#define isprint(c) in_range(c, 0x20, 0x7f) -#define isdigit(c) in_range(c, '0', '9') -#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F')) -#define islower(c) in_range(c, 'a', 'z') -#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') -#endif - -/** - * Ascii internet address interpretation routine. - * The value returned is in network order. - * - * @param cp IP address in ascii representation (e.g. "127.0.0.1") - * @return ip address in network order - */ -u32_t -ipaddr_addr(const char *cp) -{ - ip4_addr_t val; - - if (ip4addr_aton(cp, &val)) { - return ip4_addr_get_u32(&val); - } - return (IPADDR_NONE); -} - -/** - * Check whether "cp" is a valid ascii representation - * of an Internet address and convert to a binary address. - * Returns 1 if the address is valid, 0 if not. - * This replaces inet_addr, the return value from which - * cannot distinguish between failure and a local broadcast address. - * - * @param cp IP address in ascii representation (e.g. "127.0.0.1") - * @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) -{ - u32_t val; - u8_t base; - char c; - u32_t parts[4]; - u32_t *pp = parts; - - c = *cp; - for (;;) { - /* - * Collect number up to ``.''. - * Values are specified as for C: - * 0x=hex, 0=octal, 1-9=decimal. - */ - if (!isdigit(c)) { - return 0; - } - val = 0; - base = 10; - if (c == '0') { - c = *++cp; - if (c == 'x' || c == 'X') { - base = 16; - c = *++cp; - } else { - base = 8; - } - } - for (;;) { - if (isdigit(c)) { - val = (val * base) + (u32_t)(c - '0'); - c = *++cp; - } else if (base == 16 && isxdigit(c)) { - val = (val << 4) | (u32_t)(c + 10 - (islower(c) ? 'a' : 'A')); - c = *++cp; - } else { - break; - } - } - if (c == '.') { - /* - * 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) { - return 0; - } - *pp++ = val; - c = *++cp; - } else { - break; - } - } - /* - * Check for trailing characters. - */ - if (c != '\0' && !isspace(c)) { - return 0; - } - /* - * Concoct the address according to - * the number of parts specified. - */ - switch (pp - parts + 1) { - - case 0: - return 0; /* initial nondigit */ - - case 1: /* a -- 32 bits */ - break; - - case 2: /* a.b -- 8.24 bits */ - if (val > 0xffffffUL) { - return 0; - } - if (parts[0] > 0xff) { - return 0; - } - val |= parts[0] << 24; - break; - - case 3: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff) { - return 0; - } - if ((parts[0] > 0xff) || (parts[1] > 0xff)) { - return 0; - } - val |= (parts[0] << 24) | (parts[1] << 16); - break; - - case 4: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff) { - return 0; - } - if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { - return 0; - } - val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); - break; - default: - LWIP_ASSERT("unhandled", 0); - break; - } - if (addr) { - ip4_addr_set_u32(addr, lwip_htonl(val)); - } - return 1; -} - -/** - * Convert numeric IP address into decimal dotted ASCII representation. - * returns ptr to static buffer; not reentrant! - * - * @param addr ip address in network order to convert - * @return pointer to a global static (!) buffer that holds the ASCII - * representation of addr - */ -char* -ip4addr_ntoa(const ip4_addr_t *addr) -{ - static char str[IP4ADDR_STRLEN_MAX]; - return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX); -} - -/** - * Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used. - * - * @param addr ip address in network order to convert - * @param buf target buffer where the string is stored - * @param buflen length of buf - * @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) -{ - u32_t s_addr; - char inv[3]; - char *rp; - u8_t *ap; - u8_t rem; - u8_t n; - u8_t i; - int len = 0; - - s_addr = ip4_addr_get_u32(addr); - - rp = buf; - ap = (u8_t *)&s_addr; - for (n = 0; n < 4; n++) { - i = 0; - do { - rem = *ap % (u8_t)10; - *ap /= (u8_t)10; - inv[i++] = (char)('0' + rem); - } while (*ap); - while (i--) { - if (len++ >= buflen) { - return NULL; - } - *rp++ = inv[i]; - } - if (len++ >= buflen) { - return NULL; - } - *rp++ = '.'; - ap++; - } - *--rp = 0; - return buf; -} - -#endif /* LWIP_IPV4 */ +/** + * @file + * This is the IPv4 address tools implementation. + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV4 + +#include "lwip/ip_addr.h" +#include "lwip/netif.h" + +/* used by IP4_ADDR_ANY and IP_ADDR_BROADCAST in ip_addr.h */ +const ip_addr_t ip_addr_any = IPADDR4_INIT(IPADDR_ANY); +const ip_addr_t ip_addr_broadcast = IPADDR4_INIT(IPADDR_BROADCAST); + +/** + * Determine if an address is a broadcast address on a network interface + * + * @param addr address to be checked + * @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) +{ + ip4_addr_t ipaddr; + ip4_addr_set_u32(&ipaddr, addr); + + /* all ones (broadcast) or all zeroes (old skool broadcast) */ + if ((~addr == IPADDR_ANY) || + (addr == IPADDR_ANY)) { + return 1; + /* no broadcast support on this network interface? */ + } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { + /* 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))) { + return 0; + /* on the same (sub) network... */ + } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) + /* ...and host identifier bits are all ones? =>... */ + && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == + (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { + /* => network broadcast address */ + return 1; + } else { + return 0; + } +} + +/** Checks if a netmask is valid (starting with ones, then only zeros) + * + * @param netmask the IPv4 netmask to check (in network byte order!) + * @return 1 if the netmask is valid, 0 if it is not + */ +u8_t +ip4_addr_netmask_valid(u32_t netmask) +{ + u32_t mask; + u32_t nm_hostorder = lwip_htonl(netmask); + + /* first, check for the first zero */ + for (mask = 1UL << 31 ; mask != 0; mask >>= 1) { + if ((nm_hostorder & mask) == 0) { + break; + } + } + /* then check that there is no one */ + for (; mask != 0; mask >>= 1) { + if ((nm_hostorder & mask) != 0) { + /* there is a one after the first zero -> invalid */ + return 0; + } + } + /* no one after the first zero -> valid */ + return 1; +} + +/* Here for now until needed in other places in lwIP */ +#ifndef isprint +#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up) +#define isprint(c) in_range(c, 0x20, 0x7f) +#define isdigit(c) in_range(c, '0', '9') +#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F')) +#define islower(c) in_range(c, 'a', 'z') +#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') +#endif + +/** + * Ascii internet address interpretation routine. + * The value returned is in network order. + * + * @param cp IP address in ascii representation (e.g. "127.0.0.1") + * @return ip address in network order + */ +u32_t +ipaddr_addr(const char *cp) +{ + ip4_addr_t val; + + if (ip4addr_aton(cp, &val)) { + return ip4_addr_get_u32(&val); + } + return (IPADDR_NONE); +} + +/** + * Check whether "cp" is a valid ascii representation + * of an Internet address and convert to a binary address. + * Returns 1 if the address is valid, 0 if not. + * This replaces inet_addr, the return value from which + * cannot distinguish between failure and a local broadcast address. + * + * @param cp IP address in ascii representation (e.g. "127.0.0.1") + * @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) +{ + u32_t val; + u8_t base; + char c; + u32_t parts[4]; + u32_t *pp = parts; + + c = *cp; + for (;;) { + /* + * Collect number up to ``.''. + * Values are specified as for C: + * 0x=hex, 0=octal, 1-9=decimal. + */ + if (!isdigit(c)) { + return 0; + } + val = 0; + base = 10; + if (c == '0') { + c = *++cp; + if (c == 'x' || c == 'X') { + base = 16; + c = *++cp; + } else { + base = 8; + } + } + for (;;) { + if (isdigit(c)) { + val = (val * base) + (u32_t)(c - '0'); + c = *++cp; + } else if (base == 16 && isxdigit(c)) { + val = (val << 4) | (u32_t)(c + 10 - (islower(c) ? 'a' : 'A')); + c = *++cp; + } else { + break; + } + } + if (c == '.') { + /* + * 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) { + return 0; + } + *pp++ = val; + c = *++cp; + } else { + break; + } + } + /* + * Check for trailing characters. + */ + if (c != '\0' && !isspace(c)) { + return 0; + } + /* + * Concoct the address according to + * the number of parts specified. + */ + switch (pp - parts + 1) { + + case 0: + return 0; /* initial nondigit */ + + case 1: /* a -- 32 bits */ + break; + + case 2: /* a.b -- 8.24 bits */ + if (val > 0xffffffUL) { + return 0; + } + if (parts[0] > 0xff) { + return 0; + } + val |= parts[0] << 24; + break; + + case 3: /* a.b.c -- 8.8.16 bits */ + if (val > 0xffff) { + return 0; + } + if ((parts[0] > 0xff) || (parts[1] > 0xff)) { + return 0; + } + val |= (parts[0] << 24) | (parts[1] << 16); + break; + + case 4: /* a.b.c.d -- 8.8.8.8 bits */ + if (val > 0xff) { + return 0; + } + if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { + return 0; + } + val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); + break; + default: + LWIP_ASSERT("unhandled", 0); + break; + } + if (addr) { + ip4_addr_set_u32(addr, lwip_htonl(val)); + } + return 1; +} + +/** + * Convert numeric IP address into decimal dotted ASCII representation. + * returns ptr to static buffer; not reentrant! + * + * @param addr ip address in network order to convert + * @return pointer to a global static (!) buffer that holds the ASCII + * representation of addr + */ +char* +ip4addr_ntoa(const ip4_addr_t *addr) +{ + static char str[IP4ADDR_STRLEN_MAX]; + return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX); +} + +/** + * Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used. + * + * @param addr ip address in network order to convert + * @param buf target buffer where the string is stored + * @param buflen length of buf + * @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) +{ + u32_t s_addr; + char inv[3]; + char *rp; + u8_t *ap; + u8_t rem; + u8_t n; + u8_t i; + int len = 0; + + s_addr = ip4_addr_get_u32(addr); + + rp = buf; + ap = (u8_t *)&s_addr; + for (n = 0; n < 4; n++) { + i = 0; + do { + rem = *ap % (u8_t)10; + *ap /= (u8_t)10; + inv[i++] = (char)('0' + rem); + } while (*ap); + while (i--) { + if (len++ >= buflen) { + return NULL; + } + *rp++ = inv[i]; + } + if (len++ >= buflen) { + return NULL; + } + *rp++ = '.'; + ap++; + } + *--rp = 0; + return buf; +} + +#endif /* LWIP_IPV4 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.c index fdb2088..996c8be 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv4/ip4_frag.c @@ -1,864 +1,864 @@ -/** - * @file - * This is the IPv4 packet segmentation and reassembly implementation. - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Jani Monoses - * Simon Goldschmidt - * original reassembly code by Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV4 - -#include "lwip/ip4_frag.h" -#include "lwip/def.h" -#include "lwip/inet_chksum.h" -#include "lwip/netif.h" -#include "lwip/stats.h" -#include "lwip/icmp.h" - -#include - -#if IP_REASSEMBLY -/** - * The IP reassembly code currently has the following limitations: - * - IP header options are not supported - * - fragments must not overlap (e.g. due to different routes), - * currently, overlapping or duplicate fragments are thrown away - * if IP_REASS_CHECK_OVERLAP=1 (the default)! - * - * @todo: work with IP header options - */ - -/** Setting this to 0, you can turn off checking the fragments for overlapping - * regions. The code gets a little smaller. Only use this if you know that - * overlapping won't occur on your network! */ -#ifndef IP_REASS_CHECK_OVERLAP -#define IP_REASS_CHECK_OVERLAP 1 -#endif /* IP_REASS_CHECK_OVERLAP */ - -/** Set to 0 to prevent freeing the oldest datagram when the reassembly buffer is - * full (IP_REASS_MAX_PBUFS pbufs are enqueued). The code gets a little smaller. - * Datagrams will be freed by timeout only. Especially useful when MEMP_NUM_REASSDATA - * is set to 1, so one datagram can be reassembled at a time, only. */ -#ifndef IP_REASS_FREE_OLDEST -#define IP_REASS_FREE_OLDEST 1 -#endif /* IP_REASS_FREE_OLDEST */ - -#define IP_REASS_FLAG_LASTFRAG 0x01 - -#define IP_REASS_VALIDATE_TELEGRAM_FINISHED 1 -#define IP_REASS_VALIDATE_PBUF_QUEUED 0 -#define IP_REASS_VALIDATE_PBUF_DROPPED -1 - -/** This is a helper struct which holds the starting - * offset and the ending offset of this fragment to - * easily chain the fragments. - * It has the same packing requirements as the IP header, since it replaces - * the IP header in memory in incoming fragments (after copying it) to keep - * track of the various fragments. (-> If the IP header doesn't need packing, - * this struct doesn't need packing, too.) - */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip_reass_helper { - PACK_STRUCT_FIELD(struct pbuf *next_pbuf); - PACK_STRUCT_FIELD(u16_t start); - PACK_STRUCT_FIELD(u16_t end); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#define IP_ADDRESSES_AND_ID_MATCH(iphdrA, iphdrB) \ - (ip4_addr_cmp(&(iphdrA)->src, &(iphdrB)->src) && \ - ip4_addr_cmp(&(iphdrA)->dest, &(iphdrB)->dest) && \ - IPH_ID(iphdrA) == IPH_ID(iphdrB)) ? 1 : 0 - -/* global variables */ -static struct ip_reassdata *reassdatagrams; -static u16_t ip_reass_pbufcount; - -/* function prototypes */ -static void ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev); -static int ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev); - -/** - * Reassembly timer base function - * for both NO_SYS == 0 and 1 (!). - * - * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). - */ -void -ip_reass_tmr(void) -{ - struct ip_reassdata *r, *prev = NULL; - - r = reassdatagrams; - while (r != NULL) { - /* Decrement the timer. Once it reaches 0, - * clean up the incomplete fragment assembly */ - if (r->timer > 0) { - r->timer--; - LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n",(u16_t)r->timer)); - prev = r; - r = r->next; - } else { - /* reassembly timed out */ - struct ip_reassdata *tmp; - LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); - tmp = r; - /* get the next pointer before freeing */ - r = r->next; - /* free the helper struct and all enqueued pbufs */ - ip_reass_free_complete_datagram(tmp, prev); - } - } -} - -/** - * Free a datagram (struct ip_reassdata) and all its pbufs. - * Updates the total count of enqueued pbufs (ip_reass_pbufcount), - * SNMP counters and sends an ICMP time exceeded packet. - * - * @param ipr datagram to free - * @param prev the previous datagram in the linked list - * @return the number of pbufs freed - */ -static int -ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev) -{ - u16_t pbufs_freed = 0; - u16_t clen; - struct pbuf *p; - struct ip_reass_helper *iprh; - - LWIP_ASSERT("prev != ipr", prev != ipr); - if (prev != NULL) { - LWIP_ASSERT("prev->next == ipr", prev->next == ipr); - } - - MIB2_STATS_INC(mib2.ipreasmfails); -#if LWIP_ICMP - iprh = (struct ip_reass_helper *)ipr->p->payload; - if (iprh->start == 0) { - /* The first fragment was received, send ICMP time exceeded. */ - /* First, de-queue the first pbuf from r->p. */ - p = ipr->p; - ipr->p = iprh->next_pbuf; - /* Then, copy the original header into it. */ - SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); - icmp_time_exceeded(p, ICMP_TE_FRAG); - clen = pbuf_clen(p); - LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; - pbuf_free(p); - } -#endif /* LWIP_ICMP */ - - /* First, free all received pbufs. The individual pbufs need to be released - separately as they have not yet been chained */ - p = ipr->p; - while (p != NULL) { - struct pbuf *pcur; - iprh = (struct ip_reass_helper *)p->payload; - pcur = p; - /* get the next pointer before freeing */ - p = iprh->next_pbuf; - clen = pbuf_clen(pcur); - LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; - pbuf_free(pcur); - } - /* Then, unchain the struct ip_reassdata from the list and free it. */ - ip_reass_dequeue_datagram(ipr, prev); - LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= pbufs_freed); - ip_reass_pbufcount -= pbufs_freed; - - return pbufs_freed; -} - -#if IP_REASS_FREE_OLDEST -/** - * Free the oldest datagram to make room for enqueueing new fragments. - * The datagram 'fraghdr' belongs to is not freed! - * - * @param fraghdr IP header of the current fragment - * @param pbufs_needed number of pbufs needed to enqueue - * (used for freeing other datagrams if not enough space) - * @return the number of pbufs freed - */ -static int -ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed) -{ - /* @todo Can't we simply remove the last datagram in the - * linked list behind reassdatagrams? - */ - struct ip_reassdata *r, *oldest, *prev, *oldest_prev; - int pbufs_freed = 0, pbufs_freed_current; - int other_datagrams; - - /* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs, - * but don't free the datagram that 'fraghdr' belongs to! */ - do { - oldest = NULL; - prev = NULL; - oldest_prev = NULL; - other_datagrams = 0; - r = reassdatagrams; - while (r != NULL) { - if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { - /* Not the same datagram as fraghdr */ - other_datagrams++; - if (oldest == NULL) { - oldest = r; - oldest_prev = prev; - } else if (r->timer <= oldest->timer) { - /* older than the previous oldest */ - oldest = r; - oldest_prev = prev; - } - } - if (r->next != NULL) { - prev = r; - } - r = r->next; - } - if (oldest != NULL) { - pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); - pbufs_freed += pbufs_freed_current; - } - } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); - return pbufs_freed; -} -#endif /* IP_REASS_FREE_OLDEST */ - -/** - * Enqueues a new fragment into the fragment queue - * @param fraghdr points to the new fragments IP hdr - * @param clen number of pbufs needed to enqueue (used for freeing other datagrams if not enough space) - * @return A pointer to the queue location into which the fragment was enqueued - */ -static struct ip_reassdata* -ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen) -{ - struct ip_reassdata* ipr; -#if ! IP_REASS_FREE_OLDEST - LWIP_UNUSED_ARG(clen); -#endif - - /* No matching previous fragment found, allocate a new reassdata struct */ - ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); - if (ipr == NULL) { -#if IP_REASS_FREE_OLDEST - if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { - ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); - } - if (ipr == NULL) -#endif /* IP_REASS_FREE_OLDEST */ - { - IPFRAG_STATS_INC(ip_frag.memerr); - LWIP_DEBUGF(IP_REASS_DEBUG,("Failed to alloc reassdata struct\n")); - return NULL; - } - } - memset(ipr, 0, sizeof(struct ip_reassdata)); - ipr->timer = IP_REASS_MAXAGE; - - /* enqueue the new structure to the front of the list */ - ipr->next = reassdatagrams; - reassdatagrams = ipr; - /* copy the ip header for later tests and input */ - /* @todo: no ip options supported? */ - SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN); - return ipr; -} - -/** - * 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) -{ - /* dequeue the reass struct */ - if (reassdatagrams == ipr) { - /* 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); - prev->next = ipr->next; - } - - /* now we can free the ip_reassdata struct */ - memp_free(MEMP_REASSDATA, ipr); -} - -/** - * Chain a new pbuf into the pbuf list that composes the datagram. The pbuf list - * will grow over time as new pbufs are rx. - * Also checks that the datagram passes basic continuity checks (if the last - * fragment was received at least once). - * @param ipr points to the reassembly state - * @param new_p points to the pbuf for the current fragment - * @param is_last is 1 if this pbuf has MF==0 (ipr->flags not updated yet) - * @return see IP_REASS_VALIDATE_* defines - */ -static int -ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct pbuf *new_p, int is_last) -{ - struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; - struct pbuf *q; - u16_t offset, len; - struct ip_hdr *fraghdr; - int valid = 1; - - /* Extract length and fragment offset from current fragment */ - fraghdr = (struct ip_hdr*)new_p->payload; - len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; - offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; - - /* overwrite the fragment's ip header from the pbuf with our helper struct, - * and setup the embedded helper structure. */ - /* make sure the struct ip_reass_helper fits into the IP header */ - LWIP_ASSERT("sizeof(struct ip_reass_helper) <= IP_HLEN", - sizeof(struct ip_reass_helper) <= IP_HLEN); - iprh = (struct ip_reass_helper*)new_p->payload; - iprh->next_pbuf = NULL; - iprh->start = offset; - iprh->end = offset + len; - - /* Iterate through until we either get to the end of the list (append), - * or we find one with a larger offset (insert). */ - for (q = ipr->p; q != NULL;) { - iprh_tmp = (struct ip_reass_helper*)q->payload; - if (iprh->start < iprh_tmp->start) { - /* the new pbuf should be inserted before this */ - iprh->next_pbuf = q; - if (iprh_prev != NULL) { - /* not the fragment with the lowest offset */ -#if IP_REASS_CHECK_OVERLAP - if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { - /* fragment overlaps with previous or following, throw away */ - goto freepbuf; - } -#endif /* IP_REASS_CHECK_OVERLAP */ - iprh_prev->next_pbuf = new_p; - if (iprh_prev->end != iprh->start) { - /* There is a fragment missing between the current - * and the previous fragment */ - valid = 0; - } - } else { -#if IP_REASS_CHECK_OVERLAP - if (iprh->end > iprh_tmp->start) { - /* fragment overlaps with following, throw away */ - goto freepbuf; - } -#endif /* IP_REASS_CHECK_OVERLAP */ - /* fragment with the lowest offset */ - ipr->p = new_p; - } - break; - } else if (iprh->start == iprh_tmp->start) { - /* received the same datagram twice: no need to keep the datagram */ - goto freepbuf; -#if IP_REASS_CHECK_OVERLAP - } else if (iprh->start < iprh_tmp->end) { - /* overlap: no need to keep the new datagram */ - goto freepbuf; -#endif /* IP_REASS_CHECK_OVERLAP */ - } else { - /* Check if the fragments received so far have no holes. */ - if (iprh_prev != NULL) { - if (iprh_prev->end != iprh_tmp->start) { - /* There is a fragment missing between the current - * and the previous fragment */ - valid = 0; - } - } - } - q = iprh_tmp->next_pbuf; - iprh_prev = iprh_tmp; - } - - /* If q is NULL, then we made it to the end of the list. Determine what to do now */ - if (q == NULL) { - if (iprh_prev != NULL) { - /* this is (for now), the fragment with the highest offset: - * chain it to the last fragment */ -#if IP_REASS_CHECK_OVERLAP - LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); -#endif /* IP_REASS_CHECK_OVERLAP */ - iprh_prev->next_pbuf = new_p; - if (iprh_prev->end != iprh->start) { - valid = 0; - } - } else { -#if IP_REASS_CHECK_OVERLAP - LWIP_ASSERT("no previous fragment, this must be the first fragment!", - ipr->p == NULL); -#endif /* IP_REASS_CHECK_OVERLAP */ - /* this is the first fragment we ever received for this ip datagram */ - ipr->p = new_p; - } - } - - /* At this point, the validation part begins: */ - /* If we already received the last fragment */ - if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) { - /* and had no holes so far */ - if (valid) { - /* then check if the rest of the fragments is here */ - /* Check if the queue starts with the first datagram */ - if ((ipr->p == NULL) || (((struct ip_reass_helper*)ipr->p->payload)->start != 0)) { - valid = 0; - } else { - /* and check that there are no holes after this datagram */ - iprh_prev = iprh; - q = iprh->next_pbuf; - while (q != NULL) { - iprh = (struct ip_reass_helper*)q->payload; - if (iprh_prev->end != iprh->start) { - valid = 0; - break; - } - iprh_prev = iprh; - q = iprh->next_pbuf; - } - /* if still valid, all fragments are received - * (because to the MF==0 already arrived */ - if (valid) { - LWIP_ASSERT("sanity check", ipr->p != NULL); - LWIP_ASSERT("sanity check", - ((struct ip_reass_helper*)ipr->p->payload) != iprh); - LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", - iprh->next_pbuf == NULL); - } - } - } - /* If valid is 0 here, there are some fragments missing in the middle - * (since MF == 0 has already arrived). Such datagrams simply time out if - * no more fragments are received... */ - return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED; - } - /* If we come here, not all fragments were received, yet! */ - return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ -#if IP_REASS_CHECK_OVERLAP -freepbuf: - ip_reass_pbufcount -= pbuf_clen(new_p); - pbuf_free(new_p); - return IP_REASS_VALIDATE_PBUF_DROPPED; -#endif /* IP_REASS_CHECK_OVERLAP */ -} - -/** - * Reassembles incoming IP fragments into an IP datagram. - * - * @param p points to a pbuf chain of the fragment - * @return NULL if reassembly is incomplete, ? otherwise - */ -struct pbuf * -ip4_reass(struct pbuf *p) -{ - struct pbuf *r; - struct ip_hdr *fraghdr; - struct ip_reassdata *ipr; - struct ip_reass_helper *iprh; - u16_t offset, len, clen; - int valid; - int is_last; - - IPFRAG_STATS_INC(ip_frag.recv); - MIB2_STATS_INC(mib2.ipreasmreqds); - - fraghdr = (struct ip_hdr*)p->payload; - - if ((IPH_HL(fraghdr) * 4) != IP_HLEN) { - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: IP options currently not supported!\n")); - IPFRAG_STATS_INC(ip_frag.err); - goto nullreturn; - } - - offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; - len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; - - /* Check if we are allowed to enqueue more datagrams. */ - clen = pbuf_clen(p); - if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { -#if IP_REASS_FREE_OLDEST - if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || - ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) -#endif /* IP_REASS_FREE_OLDEST */ - { - /* No datagram could be freed and still too many pbufs enqueued */ - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: Overflow condition: pbufct=%d, clen=%d, MAX=%d\n", - ip_reass_pbufcount, clen, IP_REASS_MAX_PBUFS)); - IPFRAG_STATS_INC(ip_frag.memerr); - /* @todo: send ICMP time exceeded here? */ - /* drop this pbuf */ - goto nullreturn; - } - } - - /* Look for the datagram the fragment belongs to in the current datagram queue, - * remembering the previous in the queue for later dequeueing. */ - for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { - /* Check if the incoming fragment matches the one currently present - in the reassembly buffer. If so, we proceed with copying the - fragment into the buffer. */ - if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) { - LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: matching previous fragment ID=%"X16_F"\n", - lwip_ntohs(IPH_ID(fraghdr)))); - IPFRAG_STATS_INC(ip_frag.cachehit); - break; - } - } - - if (ipr == NULL) { - /* Enqueue a new datagram into the datagram queue */ - ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); - /* Bail if unable to enqueue */ - if (ipr == NULL) { - goto nullreturn; - } - } else { - if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && - ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { - /* ipr->iphdr is not the header from the first fragment, but fraghdr is - * -> copy fraghdr into ipr->iphdr since we want to have the header - * of the first fragment (for ICMP time exceeded and later, for copying - * all options, if supported)*/ - SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN); - } - } - - /* At this point, we have either created a new entry or pointing - * to an existing one */ - - /* check for 'no more fragments', and update queue entry*/ - is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0; - if (is_last) { - u16_t datagram_len = (u16_t)(offset + len); - if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { - /* u16_t overflow, cannot handle this */ - goto nullreturn; - } - } - /* find the right place to insert this pbuf */ - /* @todo: trim pbufs if fragments are overlapping */ - valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last); - if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { - goto nullreturn; - } - /* if we come here, the pbuf has been enqueued */ - - /* Track the current number of pbufs current 'in-flight', in order to limit - the number of fragments that may be enqueued at any one time - (overflow checked by testing against IP_REASS_MAX_PBUFS) */ - ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen); - if (is_last) { - u16_t datagram_len = (u16_t)(offset + len); - ipr->datagram_len = datagram_len; - ipr->flags |= IP_REASS_FLAG_LASTFRAG; - LWIP_DEBUGF(IP_REASS_DEBUG, - ("ip4_reass: last fragment seen, total len %"S16_F"\n", - ipr->datagram_len)); - } - - if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) { - struct ip_reassdata *ipr_prev; - /* the totally last fragment (flag more fragments = 0) was received at least - * once AND all fragments are received */ - ipr->datagram_len += IP_HLEN; - - /* save the second pbuf before copying the header over the pointer */ - r = ((struct ip_reass_helper*)ipr->p->payload)->next_pbuf; - - /* copy the original ip header back to the first pbuf */ - fraghdr = (struct ip_hdr*)(ipr->p->payload); - SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); - IPH_LEN_SET(fraghdr, lwip_htons(ipr->datagram_len)); - IPH_OFFSET_SET(fraghdr, 0); - IPH_CHKSUM_SET(fraghdr, 0); - /* @todo: do we need to set/calculate the correct checksum? */ -#if CHECKSUM_GEN_IP - IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) { - IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN)); - } -#endif /* CHECKSUM_GEN_IP */ - - p = ipr->p; - - /* chain together the pbufs contained within the reass_data list. */ - while (r != NULL) { - iprh = (struct ip_reass_helper*)r->payload; - - /* hide the ip header for every succeeding fragment */ - pbuf_header(r, -IP_HLEN); - pbuf_cat(p, r); - r = iprh->next_pbuf; - } - - /* find the previous entry in the linked list */ - if (ipr == reassdatagrams) { - ipr_prev = NULL; - } else { - for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { - if (ipr_prev->next == ipr) { - break; - } - } - } - - /* release the sources allocate for the fragment queue entry */ - ip_reass_dequeue_datagram(ipr, ipr_prev); - - /* and adjust the number of pbufs currently queued for reassembly. */ - ip_reass_pbufcount -= pbuf_clen(p); - - MIB2_STATS_INC(mib2.ipreasmoks); - - /* Return the pbuf chain */ - return p; - } - /* the datagram is not (yet?) reassembled completely */ - LWIP_DEBUGF(IP_REASS_DEBUG,("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); - return NULL; - -nullreturn: - LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: nullreturn\n")); - IPFRAG_STATS_INC(ip_frag.drop); - pbuf_free(p); - return NULL; -} -#endif /* IP_REASSEMBLY */ - -#if IP_FRAG -#if !LWIP_NETIF_TX_SINGLE_PBUF -/** Allocate a new struct pbuf_custom_ref */ -static struct pbuf_custom_ref* -ip_frag_alloc_pbuf_custom_ref(void) -{ - return (struct pbuf_custom_ref*)memp_malloc(MEMP_FRAG_PBUF); -} - -/** Free a struct pbuf_custom_ref */ -static void -ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) -{ - LWIP_ASSERT("p != NULL", p != NULL); - memp_free(MEMP_FRAG_PBUF, p); -} - -/** Free-callback function to free a 'struct pbuf_custom_ref', called by - * pbuf_free. */ -static void -ipfrag_free_pbuf_custom(struct pbuf *p) -{ - struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p; - LWIP_ASSERT("pcr != NULL", pcr != NULL); - LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p); - if (pcr->original != NULL) { - pbuf_free(pcr->original); - } - ip_frag_free_pbuf_custom_ref(pcr); -} -#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ - -/** - * Fragment an IP datagram if too large for the netif. - * - * Chop the datagram in MTU sized chunks and send them in order - * by pointing PBUF_REFs into p. - * - * @param p ip packet to send - * @param netif the netif on which to send - * @param dest destination ip address to which to send - * - * @return ERR_OK if sent successfully, err_t otherwise - */ -err_t -ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) -{ - struct pbuf *rambuf; -#if !LWIP_NETIF_TX_SINGLE_PBUF - struct pbuf *newpbuf; - u16_t newpbuflen = 0; - u16_t left_to_copy; -#endif - struct ip_hdr *original_iphdr; - struct ip_hdr *iphdr; - const u16_t nfb = (netif->mtu - IP_HLEN) / 8; - u16_t left, fragsize; - u16_t ofo; - int last; - u16_t poff = IP_HLEN; - u16_t tmp; - - original_iphdr = (struct ip_hdr *)p->payload; - iphdr = original_iphdr; - LWIP_ERROR("ip4_frag() does not support IP options", IPH_HL(iphdr) * 4 == IP_HLEN, return ERR_VAL); - - /* Save original offset */ - tmp = lwip_ntohs(IPH_OFFSET(iphdr)); - ofo = tmp & IP_OFFMASK; - LWIP_ERROR("ip_frag(): MF already set", (tmp & IP_MF) == 0, return ERR_VAL); - - left = p->tot_len - IP_HLEN; - - while (left) { - /* Fill this fragment */ - fragsize = LWIP_MIN(left, nfb * 8); - -#if LWIP_NETIF_TX_SINGLE_PBUF - rambuf = pbuf_alloc(PBUF_IP, fragsize, PBUF_RAM); - if (rambuf == NULL) { - goto memerr; - } - LWIP_ASSERT("this needs a pbuf in one piece!", - (rambuf->len == rambuf->tot_len) && (rambuf->next == NULL)); - poff += pbuf_copy_partial(p, rambuf->payload, fragsize, poff); - /* make room for the IP header */ - if (pbuf_header(rambuf, IP_HLEN)) { - pbuf_free(rambuf); - goto memerr; - } - /* fill in the IP header */ - SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); - iphdr = (struct ip_hdr*)rambuf->payload; -#else /* LWIP_NETIF_TX_SINGLE_PBUF */ - /* 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); - if (rambuf == NULL) { - goto memerr; - } - LWIP_ASSERT("this needs a pbuf in one piece!", - (p->len >= (IP_HLEN))); - SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); - iphdr = (struct ip_hdr *)rambuf->payload; - - left_to_copy = fragsize; - while (left_to_copy) { - struct pbuf_custom_ref *pcr; - u16_t plen = p->len - poff; - newpbuflen = LWIP_MIN(left_to_copy, plen); - /* Is this pbuf already empty? */ - if (!newpbuflen) { - poff = 0; - p = p->next; - continue; - } - pcr = ip_frag_alloc_pbuf_custom_ref(); - if (pcr == NULL) { - 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); - if (newpbuf == NULL) { - ip_frag_free_pbuf_custom_ref(pcr); - pbuf_free(rambuf); - goto memerr; - } - pbuf_ref(p); - pcr->original = p; - pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; - - /* 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); - left_to_copy -= newpbuflen; - if (left_to_copy) { - poff = 0; - p = p->next; - } - } - poff += newpbuflen; -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - - /* Correct header */ - last = (left <= netif->mtu - IP_HLEN); - - /* Set new offset and MF flag */ - tmp = (IP_OFFMASK & (ofo)); - if (!last) { - tmp = tmp | IP_MF; - } - IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); - IPH_LEN_SET(iphdr, lwip_htons(fragsize + IP_HLEN)); - IPH_CHKSUM_SET(iphdr, 0); -#if CHECKSUM_GEN_IP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { - IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN)); - } -#endif /* CHECKSUM_GEN_IP */ - - /* No need for separate header pbuf - we allowed room for it in rambuf - * when allocated. - */ - netif->output(netif, rambuf, dest); - IPFRAG_STATS_INC(ip_frag.xmit); - - /* Unfortunately we can't reuse rambuf - the hardware may still be - * using the buffer. Instead we free it (and the ensuing chain) and - * recreate it next time round the loop. If we're lucky the hardware - * will have already sent the packet, the free will really free, and - * there will be zero memory penalty. - */ - - pbuf_free(rambuf); - left -= fragsize; - ofo += nfb; - } - MIB2_STATS_INC(mib2.ipfragoks); - return ERR_OK; -memerr: - MIB2_STATS_INC(mib2.ipfragfails); - return ERR_MEM; -} -#endif /* IP_FRAG */ - -#endif /* LWIP_IPV4 */ +/** + * @file + * This is the IPv4 packet segmentation and reassembly implementation. + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Jani Monoses + * Simon Goldschmidt + * original reassembly code by Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV4 + +#include "lwip/ip4_frag.h" +#include "lwip/def.h" +#include "lwip/inet_chksum.h" +#include "lwip/netif.h" +#include "lwip/stats.h" +#include "lwip/icmp.h" + +#include + +#if IP_REASSEMBLY +/** + * The IP reassembly code currently has the following limitations: + * - IP header options are not supported + * - fragments must not overlap (e.g. due to different routes), + * currently, overlapping or duplicate fragments are thrown away + * if IP_REASS_CHECK_OVERLAP=1 (the default)! + * + * @todo: work with IP header options + */ + +/** Setting this to 0, you can turn off checking the fragments for overlapping + * regions. The code gets a little smaller. Only use this if you know that + * overlapping won't occur on your network! */ +#ifndef IP_REASS_CHECK_OVERLAP +#define IP_REASS_CHECK_OVERLAP 1 +#endif /* IP_REASS_CHECK_OVERLAP */ + +/** Set to 0 to prevent freeing the oldest datagram when the reassembly buffer is + * full (IP_REASS_MAX_PBUFS pbufs are enqueued). The code gets a little smaller. + * Datagrams will be freed by timeout only. Especially useful when MEMP_NUM_REASSDATA + * is set to 1, so one datagram can be reassembled at a time, only. */ +#ifndef IP_REASS_FREE_OLDEST +#define IP_REASS_FREE_OLDEST 1 +#endif /* IP_REASS_FREE_OLDEST */ + +#define IP_REASS_FLAG_LASTFRAG 0x01 + +#define IP_REASS_VALIDATE_TELEGRAM_FINISHED 1 +#define IP_REASS_VALIDATE_PBUF_QUEUED 0 +#define IP_REASS_VALIDATE_PBUF_DROPPED -1 + +/** This is a helper struct which holds the starting + * offset and the ending offset of this fragment to + * easily chain the fragments. + * It has the same packing requirements as the IP header, since it replaces + * the IP header in memory in incoming fragments (after copying it) to keep + * track of the various fragments. (-> If the IP header doesn't need packing, + * this struct doesn't need packing, too.) + */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip_reass_helper { + PACK_STRUCT_FIELD(struct pbuf *next_pbuf); + PACK_STRUCT_FIELD(u16_t start); + PACK_STRUCT_FIELD(u16_t end); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#define IP_ADDRESSES_AND_ID_MATCH(iphdrA, iphdrB) \ + (ip4_addr_cmp(&(iphdrA)->src, &(iphdrB)->src) && \ + ip4_addr_cmp(&(iphdrA)->dest, &(iphdrB)->dest) && \ + IPH_ID(iphdrA) == IPH_ID(iphdrB)) ? 1 : 0 + +/* global variables */ +static struct ip_reassdata *reassdatagrams; +static u16_t ip_reass_pbufcount; + +/* function prototypes */ +static void ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev); +static int ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev); + +/** + * Reassembly timer base function + * for both NO_SYS == 0 and 1 (!). + * + * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). + */ +void +ip_reass_tmr(void) +{ + struct ip_reassdata *r, *prev = NULL; + + r = reassdatagrams; + while (r != NULL) { + /* Decrement the timer. Once it reaches 0, + * clean up the incomplete fragment assembly */ + if (r->timer > 0) { + r->timer--; + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n",(u16_t)r->timer)); + prev = r; + r = r->next; + } else { + /* reassembly timed out */ + struct ip_reassdata *tmp; + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); + tmp = r; + /* get the next pointer before freeing */ + r = r->next; + /* free the helper struct and all enqueued pbufs */ + ip_reass_free_complete_datagram(tmp, prev); + } + } +} + +/** + * Free a datagram (struct ip_reassdata) and all its pbufs. + * Updates the total count of enqueued pbufs (ip_reass_pbufcount), + * SNMP counters and sends an ICMP time exceeded packet. + * + * @param ipr datagram to free + * @param prev the previous datagram in the linked list + * @return the number of pbufs freed + */ +static int +ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev) +{ + u16_t pbufs_freed = 0; + u16_t clen; + struct pbuf *p; + struct ip_reass_helper *iprh; + + LWIP_ASSERT("prev != ipr", prev != ipr); + if (prev != NULL) { + LWIP_ASSERT("prev->next == ipr", prev->next == ipr); + } + + MIB2_STATS_INC(mib2.ipreasmfails); +#if LWIP_ICMP + iprh = (struct ip_reass_helper *)ipr->p->payload; + if (iprh->start == 0) { + /* The first fragment was received, send ICMP time exceeded. */ + /* First, de-queue the first pbuf from r->p. */ + p = ipr->p; + ipr->p = iprh->next_pbuf; + /* Then, copy the original header into it. */ + SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); + icmp_time_exceeded(p, ICMP_TE_FRAG); + clen = pbuf_clen(p); + LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); + pbufs_freed += clen; + pbuf_free(p); + } +#endif /* LWIP_ICMP */ + + /* First, free all received pbufs. The individual pbufs need to be released + separately as they have not yet been chained */ + p = ipr->p; + while (p != NULL) { + struct pbuf *pcur; + iprh = (struct ip_reass_helper *)p->payload; + pcur = p; + /* get the next pointer before freeing */ + p = iprh->next_pbuf; + clen = pbuf_clen(pcur); + LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); + pbufs_freed += clen; + pbuf_free(pcur); + } + /* Then, unchain the struct ip_reassdata from the list and free it. */ + ip_reass_dequeue_datagram(ipr, prev); + LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= pbufs_freed); + ip_reass_pbufcount -= pbufs_freed; + + return pbufs_freed; +} + +#if IP_REASS_FREE_OLDEST +/** + * Free the oldest datagram to make room for enqueueing new fragments. + * The datagram 'fraghdr' belongs to is not freed! + * + * @param fraghdr IP header of the current fragment + * @param pbufs_needed number of pbufs needed to enqueue + * (used for freeing other datagrams if not enough space) + * @return the number of pbufs freed + */ +static int +ip_reass_remove_oldest_datagram(struct ip_hdr *fraghdr, int pbufs_needed) +{ + /* @todo Can't we simply remove the last datagram in the + * linked list behind reassdatagrams? + */ + struct ip_reassdata *r, *oldest, *prev, *oldest_prev; + int pbufs_freed = 0, pbufs_freed_current; + int other_datagrams; + + /* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs, + * but don't free the datagram that 'fraghdr' belongs to! */ + do { + oldest = NULL; + prev = NULL; + oldest_prev = NULL; + other_datagrams = 0; + r = reassdatagrams; + while (r != NULL) { + if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { + /* Not the same datagram as fraghdr */ + other_datagrams++; + if (oldest == NULL) { + oldest = r; + oldest_prev = prev; + } else if (r->timer <= oldest->timer) { + /* older than the previous oldest */ + oldest = r; + oldest_prev = prev; + } + } + if (r->next != NULL) { + prev = r; + } + r = r->next; + } + if (oldest != NULL) { + pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); + pbufs_freed += pbufs_freed_current; + } + } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); + return pbufs_freed; +} +#endif /* IP_REASS_FREE_OLDEST */ + +/** + * Enqueues a new fragment into the fragment queue + * @param fraghdr points to the new fragments IP hdr + * @param clen number of pbufs needed to enqueue (used for freeing other datagrams if not enough space) + * @return A pointer to the queue location into which the fragment was enqueued + */ +static struct ip_reassdata* +ip_reass_enqueue_new_datagram(struct ip_hdr *fraghdr, int clen) +{ + struct ip_reassdata* ipr; +#if ! IP_REASS_FREE_OLDEST + LWIP_UNUSED_ARG(clen); +#endif + + /* No matching previous fragment found, allocate a new reassdata struct */ + ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); + if (ipr == NULL) { +#if IP_REASS_FREE_OLDEST + if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { + ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); + } + if (ipr == NULL) +#endif /* IP_REASS_FREE_OLDEST */ + { + IPFRAG_STATS_INC(ip_frag.memerr); + LWIP_DEBUGF(IP_REASS_DEBUG,("Failed to alloc reassdata struct\n")); + return NULL; + } + } + memset(ipr, 0, sizeof(struct ip_reassdata)); + ipr->timer = IP_REASS_MAXAGE; + + /* enqueue the new structure to the front of the list */ + ipr->next = reassdatagrams; + reassdatagrams = ipr; + /* copy the ip header for later tests and input */ + /* @todo: no ip options supported? */ + SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN); + return ipr; +} + +/** + * 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) +{ + /* dequeue the reass struct */ + if (reassdatagrams == ipr) { + /* 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); + prev->next = ipr->next; + } + + /* now we can free the ip_reassdata struct */ + memp_free(MEMP_REASSDATA, ipr); +} + +/** + * Chain a new pbuf into the pbuf list that composes the datagram. The pbuf list + * will grow over time as new pbufs are rx. + * Also checks that the datagram passes basic continuity checks (if the last + * fragment was received at least once). + * @param ipr points to the reassembly state + * @param new_p points to the pbuf for the current fragment + * @param is_last is 1 if this pbuf has MF==0 (ipr->flags not updated yet) + * @return see IP_REASS_VALIDATE_* defines + */ +static int +ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct pbuf *new_p, int is_last) +{ + struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; + struct pbuf *q; + u16_t offset, len; + struct ip_hdr *fraghdr; + int valid = 1; + + /* Extract length and fragment offset from current fragment */ + fraghdr = (struct ip_hdr*)new_p->payload; + len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; + offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; + + /* overwrite the fragment's ip header from the pbuf with our helper struct, + * and setup the embedded helper structure. */ + /* make sure the struct ip_reass_helper fits into the IP header */ + LWIP_ASSERT("sizeof(struct ip_reass_helper) <= IP_HLEN", + sizeof(struct ip_reass_helper) <= IP_HLEN); + iprh = (struct ip_reass_helper*)new_p->payload; + iprh->next_pbuf = NULL; + iprh->start = offset; + iprh->end = offset + len; + + /* Iterate through until we either get to the end of the list (append), + * or we find one with a larger offset (insert). */ + for (q = ipr->p; q != NULL;) { + iprh_tmp = (struct ip_reass_helper*)q->payload; + if (iprh->start < iprh_tmp->start) { + /* the new pbuf should be inserted before this */ + iprh->next_pbuf = q; + if (iprh_prev != NULL) { + /* not the fragment with the lowest offset */ +#if IP_REASS_CHECK_OVERLAP + if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { + /* fragment overlaps with previous or following, throw away */ + goto freepbuf; + } +#endif /* IP_REASS_CHECK_OVERLAP */ + iprh_prev->next_pbuf = new_p; + if (iprh_prev->end != iprh->start) { + /* There is a fragment missing between the current + * and the previous fragment */ + valid = 0; + } + } else { +#if IP_REASS_CHECK_OVERLAP + if (iprh->end > iprh_tmp->start) { + /* fragment overlaps with following, throw away */ + goto freepbuf; + } +#endif /* IP_REASS_CHECK_OVERLAP */ + /* fragment with the lowest offset */ + ipr->p = new_p; + } + break; + } else if (iprh->start == iprh_tmp->start) { + /* received the same datagram twice: no need to keep the datagram */ + goto freepbuf; +#if IP_REASS_CHECK_OVERLAP + } else if (iprh->start < iprh_tmp->end) { + /* overlap: no need to keep the new datagram */ + goto freepbuf; +#endif /* IP_REASS_CHECK_OVERLAP */ + } else { + /* Check if the fragments received so far have no holes. */ + if (iprh_prev != NULL) { + if (iprh_prev->end != iprh_tmp->start) { + /* There is a fragment missing between the current + * and the previous fragment */ + valid = 0; + } + } + } + q = iprh_tmp->next_pbuf; + iprh_prev = iprh_tmp; + } + + /* If q is NULL, then we made it to the end of the list. Determine what to do now */ + if (q == NULL) { + if (iprh_prev != NULL) { + /* this is (for now), the fragment with the highest offset: + * chain it to the last fragment */ +#if IP_REASS_CHECK_OVERLAP + LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); +#endif /* IP_REASS_CHECK_OVERLAP */ + iprh_prev->next_pbuf = new_p; + if (iprh_prev->end != iprh->start) { + valid = 0; + } + } else { +#if IP_REASS_CHECK_OVERLAP + LWIP_ASSERT("no previous fragment, this must be the first fragment!", + ipr->p == NULL); +#endif /* IP_REASS_CHECK_OVERLAP */ + /* this is the first fragment we ever received for this ip datagram */ + ipr->p = new_p; + } + } + + /* At this point, the validation part begins: */ + /* If we already received the last fragment */ + if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) { + /* and had no holes so far */ + if (valid) { + /* then check if the rest of the fragments is here */ + /* Check if the queue starts with the first datagram */ + if ((ipr->p == NULL) || (((struct ip_reass_helper*)ipr->p->payload)->start != 0)) { + valid = 0; + } else { + /* and check that there are no holes after this datagram */ + iprh_prev = iprh; + q = iprh->next_pbuf; + while (q != NULL) { + iprh = (struct ip_reass_helper*)q->payload; + if (iprh_prev->end != iprh->start) { + valid = 0; + break; + } + iprh_prev = iprh; + q = iprh->next_pbuf; + } + /* if still valid, all fragments are received + * (because to the MF==0 already arrived */ + if (valid) { + LWIP_ASSERT("sanity check", ipr->p != NULL); + LWIP_ASSERT("sanity check", + ((struct ip_reass_helper*)ipr->p->payload) != iprh); + LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", + iprh->next_pbuf == NULL); + } + } + } + /* If valid is 0 here, there are some fragments missing in the middle + * (since MF == 0 has already arrived). Such datagrams simply time out if + * no more fragments are received... */ + return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED; + } + /* If we come here, not all fragments were received, yet! */ + return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ +#if IP_REASS_CHECK_OVERLAP +freepbuf: + ip_reass_pbufcount -= pbuf_clen(new_p); + pbuf_free(new_p); + return IP_REASS_VALIDATE_PBUF_DROPPED; +#endif /* IP_REASS_CHECK_OVERLAP */ +} + +/** + * Reassembles incoming IP fragments into an IP datagram. + * + * @param p points to a pbuf chain of the fragment + * @return NULL if reassembly is incomplete, ? otherwise + */ +struct pbuf * +ip4_reass(struct pbuf *p) +{ + struct pbuf *r; + struct ip_hdr *fraghdr; + struct ip_reassdata *ipr; + struct ip_reass_helper *iprh; + u16_t offset, len, clen; + int valid; + int is_last; + + IPFRAG_STATS_INC(ip_frag.recv); + MIB2_STATS_INC(mib2.ipreasmreqds); + + fraghdr = (struct ip_hdr*)p->payload; + + if ((IPH_HL(fraghdr) * 4) != IP_HLEN) { + LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: IP options currently not supported!\n")); + IPFRAG_STATS_INC(ip_frag.err); + goto nullreturn; + } + + offset = (lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) * 8; + len = lwip_ntohs(IPH_LEN(fraghdr)) - IPH_HL(fraghdr) * 4; + + /* Check if we are allowed to enqueue more datagrams. */ + clen = pbuf_clen(p); + if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { +#if IP_REASS_FREE_OLDEST + if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || + ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) +#endif /* IP_REASS_FREE_OLDEST */ + { + /* No datagram could be freed and still too many pbufs enqueued */ + LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: Overflow condition: pbufct=%d, clen=%d, MAX=%d\n", + ip_reass_pbufcount, clen, IP_REASS_MAX_PBUFS)); + IPFRAG_STATS_INC(ip_frag.memerr); + /* @todo: send ICMP time exceeded here? */ + /* drop this pbuf */ + goto nullreturn; + } + } + + /* Look for the datagram the fragment belongs to in the current datagram queue, + * remembering the previous in the queue for later dequeueing. */ + for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { + /* Check if the incoming fragment matches the one currently present + in the reassembly buffer. If so, we proceed with copying the + fragment into the buffer. */ + if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) { + LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: matching previous fragment ID=%"X16_F"\n", + lwip_ntohs(IPH_ID(fraghdr)))); + IPFRAG_STATS_INC(ip_frag.cachehit); + break; + } + } + + if (ipr == NULL) { + /* Enqueue a new datagram into the datagram queue */ + ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); + /* Bail if unable to enqueue */ + if (ipr == NULL) { + goto nullreturn; + } + } else { + if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && + ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { + /* ipr->iphdr is not the header from the first fragment, but fraghdr is + * -> copy fraghdr into ipr->iphdr since we want to have the header + * of the first fragment (for ICMP time exceeded and later, for copying + * all options, if supported)*/ + SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN); + } + } + + /* At this point, we have either created a new entry or pointing + * to an existing one */ + + /* check for 'no more fragments', and update queue entry*/ + is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0; + if (is_last) { + u16_t datagram_len = (u16_t)(offset + len); + if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { + /* u16_t overflow, cannot handle this */ + goto nullreturn; + } + } + /* find the right place to insert this pbuf */ + /* @todo: trim pbufs if fragments are overlapping */ + valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last); + if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { + goto nullreturn; + } + /* if we come here, the pbuf has been enqueued */ + + /* Track the current number of pbufs current 'in-flight', in order to limit + the number of fragments that may be enqueued at any one time + (overflow checked by testing against IP_REASS_MAX_PBUFS) */ + ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen); + if (is_last) { + u16_t datagram_len = (u16_t)(offset + len); + ipr->datagram_len = datagram_len; + ipr->flags |= IP_REASS_FLAG_LASTFRAG; + LWIP_DEBUGF(IP_REASS_DEBUG, + ("ip4_reass: last fragment seen, total len %"S16_F"\n", + ipr->datagram_len)); + } + + if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) { + struct ip_reassdata *ipr_prev; + /* the totally last fragment (flag more fragments = 0) was received at least + * once AND all fragments are received */ + ipr->datagram_len += IP_HLEN; + + /* save the second pbuf before copying the header over the pointer */ + r = ((struct ip_reass_helper*)ipr->p->payload)->next_pbuf; + + /* copy the original ip header back to the first pbuf */ + fraghdr = (struct ip_hdr*)(ipr->p->payload); + SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); + IPH_LEN_SET(fraghdr, lwip_htons(ipr->datagram_len)); + IPH_OFFSET_SET(fraghdr, 0); + IPH_CHKSUM_SET(fraghdr, 0); + /* @todo: do we need to set/calculate the correct checksum? */ +#if CHECKSUM_GEN_IP + IF__NETIF_CHECKSUM_ENABLED(ip_current_input_netif(), NETIF_CHECKSUM_GEN_IP) { + IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN)); + } +#endif /* CHECKSUM_GEN_IP */ + + p = ipr->p; + + /* chain together the pbufs contained within the reass_data list. */ + while (r != NULL) { + iprh = (struct ip_reass_helper*)r->payload; + + /* hide the ip header for every succeeding fragment */ + pbuf_header(r, -IP_HLEN); + pbuf_cat(p, r); + r = iprh->next_pbuf; + } + + /* find the previous entry in the linked list */ + if (ipr == reassdatagrams) { + ipr_prev = NULL; + } else { + for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { + if (ipr_prev->next == ipr) { + break; + } + } + } + + /* release the sources allocate for the fragment queue entry */ + ip_reass_dequeue_datagram(ipr, ipr_prev); + + /* and adjust the number of pbufs currently queued for reassembly. */ + ip_reass_pbufcount -= pbuf_clen(p); + + MIB2_STATS_INC(mib2.ipreasmoks); + + /* Return the pbuf chain */ + return p; + } + /* the datagram is not (yet?) reassembled completely */ + LWIP_DEBUGF(IP_REASS_DEBUG,("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); + return NULL; + +nullreturn: + LWIP_DEBUGF(IP_REASS_DEBUG,("ip4_reass: nullreturn\n")); + IPFRAG_STATS_INC(ip_frag.drop); + pbuf_free(p); + return NULL; +} +#endif /* IP_REASSEMBLY */ + +#if IP_FRAG +#if !LWIP_NETIF_TX_SINGLE_PBUF +/** Allocate a new struct pbuf_custom_ref */ +static struct pbuf_custom_ref* +ip_frag_alloc_pbuf_custom_ref(void) +{ + return (struct pbuf_custom_ref*)memp_malloc(MEMP_FRAG_PBUF); +} + +/** Free a struct pbuf_custom_ref */ +static void +ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) +{ + LWIP_ASSERT("p != NULL", p != NULL); + memp_free(MEMP_FRAG_PBUF, p); +} + +/** Free-callback function to free a 'struct pbuf_custom_ref', called by + * pbuf_free. */ +static void +ipfrag_free_pbuf_custom(struct pbuf *p) +{ + struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p; + LWIP_ASSERT("pcr != NULL", pcr != NULL); + LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p); + if (pcr->original != NULL) { + pbuf_free(pcr->original); + } + ip_frag_free_pbuf_custom_ref(pcr); +} +#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ + +/** + * Fragment an IP datagram if too large for the netif. + * + * Chop the datagram in MTU sized chunks and send them in order + * by pointing PBUF_REFs into p. + * + * @param p ip packet to send + * @param netif the netif on which to send + * @param dest destination ip address to which to send + * + * @return ERR_OK if sent successfully, err_t otherwise + */ +err_t +ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) +{ + struct pbuf *rambuf; +#if !LWIP_NETIF_TX_SINGLE_PBUF + struct pbuf *newpbuf; + u16_t newpbuflen = 0; + u16_t left_to_copy; +#endif + struct ip_hdr *original_iphdr; + struct ip_hdr *iphdr; + const u16_t nfb = (netif->mtu - IP_HLEN) / 8; + u16_t left, fragsize; + u16_t ofo; + int last; + u16_t poff = IP_HLEN; + u16_t tmp; + + original_iphdr = (struct ip_hdr *)p->payload; + iphdr = original_iphdr; + LWIP_ERROR("ip4_frag() does not support IP options", IPH_HL(iphdr) * 4 == IP_HLEN, return ERR_VAL); + + /* Save original offset */ + tmp = lwip_ntohs(IPH_OFFSET(iphdr)); + ofo = tmp & IP_OFFMASK; + LWIP_ERROR("ip_frag(): MF already set", (tmp & IP_MF) == 0, return ERR_VAL); + + left = p->tot_len - IP_HLEN; + + while (left) { + /* Fill this fragment */ + fragsize = LWIP_MIN(left, nfb * 8); + +#if LWIP_NETIF_TX_SINGLE_PBUF + rambuf = pbuf_alloc(PBUF_IP, fragsize, PBUF_RAM); + if (rambuf == NULL) { + goto memerr; + } + LWIP_ASSERT("this needs a pbuf in one piece!", + (rambuf->len == rambuf->tot_len) && (rambuf->next == NULL)); + poff += pbuf_copy_partial(p, rambuf->payload, fragsize, poff); + /* make room for the IP header */ + if (pbuf_header(rambuf, IP_HLEN)) { + pbuf_free(rambuf); + goto memerr; + } + /* fill in the IP header */ + SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); + iphdr = (struct ip_hdr*)rambuf->payload; +#else /* LWIP_NETIF_TX_SINGLE_PBUF */ + /* 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); + if (rambuf == NULL) { + goto memerr; + } + LWIP_ASSERT("this needs a pbuf in one piece!", + (p->len >= (IP_HLEN))); + SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); + iphdr = (struct ip_hdr *)rambuf->payload; + + left_to_copy = fragsize; + while (left_to_copy) { + struct pbuf_custom_ref *pcr; + u16_t plen = p->len - poff; + newpbuflen = LWIP_MIN(left_to_copy, plen); + /* Is this pbuf already empty? */ + if (!newpbuflen) { + poff = 0; + p = p->next; + continue; + } + pcr = ip_frag_alloc_pbuf_custom_ref(); + if (pcr == NULL) { + 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); + if (newpbuf == NULL) { + ip_frag_free_pbuf_custom_ref(pcr); + pbuf_free(rambuf); + goto memerr; + } + pbuf_ref(p); + pcr->original = p; + pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; + + /* 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); + left_to_copy -= newpbuflen; + if (left_to_copy) { + poff = 0; + p = p->next; + } + } + poff += newpbuflen; +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + + /* Correct header */ + last = (left <= netif->mtu - IP_HLEN); + + /* Set new offset and MF flag */ + tmp = (IP_OFFMASK & (ofo)); + if (!last) { + tmp = tmp | IP_MF; + } + IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); + IPH_LEN_SET(iphdr, lwip_htons(fragsize + IP_HLEN)); + IPH_CHKSUM_SET(iphdr, 0); +#if CHECKSUM_GEN_IP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_IP) { + IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN)); + } +#endif /* CHECKSUM_GEN_IP */ + + /* No need for separate header pbuf - we allowed room for it in rambuf + * when allocated. + */ + netif->output(netif, rambuf, dest); + IPFRAG_STATS_INC(ip_frag.xmit); + + /* Unfortunately we can't reuse rambuf - the hardware may still be + * using the buffer. Instead we free it (and the ensuing chain) and + * recreate it next time round the loop. If we're lucky the hardware + * will have already sent the packet, the free will really free, and + * there will be zero memory penalty. + */ + + pbuf_free(rambuf); + left -= fragsize; + ofo += nfb; + } + MIB2_STATS_INC(mib2.ipfragoks); + return ERR_OK; +memerr: + MIB2_STATS_INC(mib2.ipfragfails); + return ERR_MEM; +} +#endif /* IP_FRAG */ + +#endif /* LWIP_IPV4 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.c index f27a725..015ced1 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/dhcp6.c @@ -1,50 +1,50 @@ -/** - * @file - * - * DHCPv6. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV6 && LWIP_IPV6_DHCP6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/ip6_addr.h" -#include "lwip/def.h" - - -#endif /* LWIP_IPV6 && LWIP_IPV6_DHCP6 */ +/** + * @file + * + * DHCPv6. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV6 && LWIP_IPV6_DHCP6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/ip6_addr.h" +#include "lwip/def.h" + + +#endif /* LWIP_IPV6 && LWIP_IPV6_DHCP6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.c index 8f9a91b..1d3ff9e 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ethip6.c @@ -1,118 +1,118 @@ -/** - * @file - * - * Ethernet output for IPv6. Uses ND tables for link-layer addressing. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV6 && LWIP_ETHERNET - -#include "lwip/ethip6.h" -#include "lwip/nd6.h" -#include "lwip/pbuf.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/inet_chksum.h" -#include "lwip/netif.h" -#include "lwip/icmp6.h" -#include "lwip/prot/ethernet.h" -#include "netif/ethernet.h" - -#include - -/** - * Resolve and fill-in Ethernet address header for outgoing IPv6 packet. - * - * For IPv6 multicast, corresponding Ethernet addresses - * are selected and the packet is transmitted on the link. - * - * For unicast addresses, ask the ND6 module what to do. It will either let us - * send the the packet right away, or queue the packet for later itself, unless - * an error occurs. - * - * @todo anycast addresses - * - * @param netif The lwIP network interface which the IP packet will be sent on. - * @param q The pbuf(s) containing the IP packet to be sent. - * @param ip6addr The IP address of the packet destination. - * - * @return - * - ERR_OK or the return value of @ref nd6_get_next_hop_addr_or_queue. - */ -err_t -ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) -{ - struct eth_addr dest; - const u8_t *hwaddr; - err_t result; - - /* multicast destination IP address? */ - if (ip6_addr_ismulticast(ip6addr)) { - /* Hash IP multicast address to MAC address.*/ - dest.addr[0] = 0x33; - dest.addr[1] = 0x33; - dest.addr[2] = ((const u8_t *)(&(ip6addr->addr[3])))[0]; - dest.addr[3] = ((const u8_t *)(&(ip6addr->addr[3])))[1]; - dest.addr[4] = ((const u8_t *)(&(ip6addr->addr[3])))[2]; - dest.addr[5] = ((const u8_t *)(&(ip6addr->addr[3])))[3]; - - /* Send out. */ - return ethernet_output(netif, q, (const struct eth_addr*)(netif->hwaddr), &dest, ETHTYPE_IPV6); - } - - /* We have a unicast destination IP address */ - /* @todo anycast? */ - - /* Ask ND6 what to do with the packet. */ - result = nd6_get_next_hop_addr_or_queue(netif, q, ip6addr, &hwaddr); - if (result != ERR_OK) { - return result; - } - - /* If no hardware address is returned, nd6 has queued the packet for later. */ - if (hwaddr == NULL) { - return ERR_OK; - } - - /* Send out the packet using the returned hardware address. */ - SMEMCPY(dest.addr, hwaddr, 6); - return ethernet_output(netif, q, (const struct eth_addr*)(netif->hwaddr), &dest, ETHTYPE_IPV6); -} - -#endif /* LWIP_IPV6 && LWIP_ETHERNET */ +/** + * @file + * + * Ethernet output for IPv6. Uses ND tables for link-layer addressing. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV6 && LWIP_ETHERNET + +#include "lwip/ethip6.h" +#include "lwip/nd6.h" +#include "lwip/pbuf.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/inet_chksum.h" +#include "lwip/netif.h" +#include "lwip/icmp6.h" +#include "lwip/prot/ethernet.h" +#include "netif/ethernet.h" + +#include + +/** + * Resolve and fill-in Ethernet address header for outgoing IPv6 packet. + * + * For IPv6 multicast, corresponding Ethernet addresses + * are selected and the packet is transmitted on the link. + * + * For unicast addresses, ask the ND6 module what to do. It will either let us + * send the the packet right away, or queue the packet for later itself, unless + * an error occurs. + * + * @todo anycast addresses + * + * @param netif The lwIP network interface which the IP packet will be sent on. + * @param q The pbuf(s) containing the IP packet to be sent. + * @param ip6addr The IP address of the packet destination. + * + * @return + * - ERR_OK or the return value of @ref nd6_get_next_hop_addr_or_queue. + */ +err_t +ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) +{ + struct eth_addr dest; + const u8_t *hwaddr; + err_t result; + + /* multicast destination IP address? */ + if (ip6_addr_ismulticast(ip6addr)) { + /* Hash IP multicast address to MAC address.*/ + dest.addr[0] = 0x33; + dest.addr[1] = 0x33; + dest.addr[2] = ((const u8_t *)(&(ip6addr->addr[3])))[0]; + dest.addr[3] = ((const u8_t *)(&(ip6addr->addr[3])))[1]; + dest.addr[4] = ((const u8_t *)(&(ip6addr->addr[3])))[2]; + dest.addr[5] = ((const u8_t *)(&(ip6addr->addr[3])))[3]; + + /* Send out. */ + return ethernet_output(netif, q, (const struct eth_addr*)(netif->hwaddr), &dest, ETHTYPE_IPV6); + } + + /* We have a unicast destination IP address */ + /* @todo anycast? */ + + /* Ask ND6 what to do with the packet. */ + result = nd6_get_next_hop_addr_or_queue(netif, q, ip6addr, &hwaddr); + if (result != ERR_OK) { + return result; + } + + /* If no hardware address is returned, nd6 has queued the packet for later. */ + if (hwaddr == NULL) { + return ERR_OK; + } + + /* Send out the packet using the returned hardware address. */ + SMEMCPY(dest.addr, hwaddr, 6); + return ethernet_output(netif, q, (const struct eth_addr*)(netif->hwaddr), &dest, ETHTYPE_IPV6); +} + +#endif /* LWIP_IPV6 && LWIP_ETHERNET */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.c index 323b69a..c8b1664 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/icmp6.c @@ -1,350 +1,350 @@ -/** - * @file - * - * IPv6 version of ICMP, as per RFC 4443. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" - -#if LWIP_ICMP6 && LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/icmp6.h" -#include "lwip/prot/icmp6.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/inet_chksum.h" -#include "lwip/pbuf.h" -#include "lwip/netif.h" -#include "lwip/nd6.h" -#include "lwip/mld6.h" -#include "lwip/ip.h" -#include "lwip/stats.h" - -#include - -#ifndef LWIP_ICMP6_DATASIZE -#define LWIP_ICMP6_DATASIZE 8 -#endif -#if LWIP_ICMP6_DATASIZE == 0 -#define LWIP_ICMP6_DATASIZE 8 -#endif - -/* Forward declarations */ -static void icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type); - - -/** - * Process an input ICMPv6 message. Called by ip6_input. - * - * Will generate a reply for echo requests. Other messages are forwarded - * to nd6_input, or mld6_input. - * - * @param p the mld packet, p->payload pointing to the icmpv6 header - * @param inp the netif on which this packet was received - */ -void -icmp6_input(struct pbuf *p, struct netif *inp) -{ - struct icmp6_hdr *icmp6hdr; - struct pbuf *r; - const ip6_addr_t *reply_src; - - ICMP6_STATS_INC(icmp6.recv); - - /* Check that ICMPv6 header fits in payload */ - if (p->len < sizeof(struct icmp6_hdr)) { - /* drop short packets */ - pbuf_free(p); - ICMP6_STATS_INC(icmp6.lenerr); - ICMP6_STATS_INC(icmp6.drop); - return; - } - - icmp6hdr = (struct icmp6_hdr *)p->payload; - -#if CHECKSUM_CHECK_ICMP6 - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP6) { - if (ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->tot_len, ip6_current_src_addr(), - ip6_current_dest_addr()) != 0) { - /* Checksum failed */ - pbuf_free(p); - ICMP6_STATS_INC(icmp6.chkerr); - ICMP6_STATS_INC(icmp6.drop); - return; - } - } -#endif /* CHECKSUM_CHECK_ICMP6 */ - - switch (icmp6hdr->type) { - case ICMP6_TYPE_NA: /* Neighbor advertisement */ - case ICMP6_TYPE_NS: /* Neighbor solicitation */ - case ICMP6_TYPE_RA: /* Router advertisement */ - case ICMP6_TYPE_RD: /* Redirect */ - case ICMP6_TYPE_PTB: /* Packet too big */ - nd6_input(p, inp); - return; - break; - case ICMP6_TYPE_RS: -#if LWIP_IPV6_FORWARD - /* @todo implement router functionality */ -#endif - break; -#if LWIP_IPV6_MLD - case ICMP6_TYPE_MLQ: - case ICMP6_TYPE_MLR: - case ICMP6_TYPE_MLD: - mld6_input(p, inp); - return; - break; -#endif - case ICMP6_TYPE_EREQ: -#if !LWIP_MULTICAST_PING - /* multicast destination address? */ - if (ip6_addr_ismulticast(ip6_current_dest_addr())) { - /* drop */ - pbuf_free(p); - ICMP6_STATS_INC(icmp6.drop); - return; - } -#endif /* LWIP_MULTICAST_PING */ - - /* Allocate reply. */ - r = pbuf_alloc(PBUF_IP, p->tot_len, PBUF_RAM); - if (r == NULL) { - /* drop */ - pbuf_free(p); - ICMP6_STATS_INC(icmp6.memerr); - return; - } - - /* Copy echo request. */ - if (pbuf_copy(r, p) != ERR_OK) { - /* drop */ - pbuf_free(p); - pbuf_free(r); - ICMP6_STATS_INC(icmp6.err); - return; - } - - /* Determine reply source IPv6 address. */ -#if LWIP_MULTICAST_PING - if (ip6_addr_ismulticast(ip6_current_dest_addr())) { - reply_src = ip_2_ip6(ip6_select_source_address(inp, ip6_current_src_addr())); - if (reply_src == NULL) { - /* drop */ - pbuf_free(p); - pbuf_free(r); - ICMP6_STATS_INC(icmp6.rterr); - return; - } - } - else -#endif /* LWIP_MULTICAST_PING */ - { - reply_src = ip6_current_dest_addr(); - } - - /* Set fields in reply. */ - ((struct icmp6_echo_hdr *)(r->payload))->type = ICMP6_TYPE_EREP; - ((struct icmp6_echo_hdr *)(r->payload))->chksum = 0; -#if CHECKSUM_GEN_ICMP6 - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP6) { - ((struct icmp6_echo_hdr *)(r->payload))->chksum = ip6_chksum_pseudo(r, - IP6_NEXTH_ICMP6, r->tot_len, reply_src, ip6_current_src_addr()); - } -#endif /* CHECKSUM_GEN_ICMP6 */ - - /* Send reply. */ - ICMP6_STATS_INC(icmp6.xmit); - ip6_output_if(r, reply_src, ip6_current_src_addr(), - LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, inp); - pbuf_free(r); - - break; - default: - ICMP6_STATS_INC(icmp6.proterr); - ICMP6_STATS_INC(icmp6.drop); - break; - } - - pbuf_free(p); -} - - -/** - * Send an icmpv6 'destination unreachable' packet. - * - * @param p the input packet for which the 'unreachable' should be sent, - * p->payload pointing to the IPv6 header - * @param c ICMPv6 code for the unreachable type - */ -void -icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c) -{ - icmp6_send_response(p, c, 0, ICMP6_TYPE_DUR); -} - -/** - * Send an icmpv6 'packet too big' packet. - * - * @param p the input packet for which the 'packet too big' should be sent, - * p->payload pointing to the IPv6 header - * @param mtu the maximum mtu that we can accept - */ -void -icmp6_packet_too_big(struct pbuf *p, u32_t mtu) -{ - icmp6_send_response(p, 0, mtu, ICMP6_TYPE_PTB); -} - -/** - * Send an icmpv6 'time exceeded' packet. - * - * @param p the input packet for which the 'unreachable' should be sent, - * p->payload pointing to the IPv6 header - * @param c ICMPv6 code for the time exceeded type - */ -void -icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c) -{ - icmp6_send_response(p, c, 0, ICMP6_TYPE_TE); -} - -/** - * Send an icmpv6 'parameter problem' packet. - * - * @param p the input packet for which the 'param problem' should be sent, - * p->payload pointing to the IP header - * @param c ICMPv6 code for the param problem type - * @param pointer the pointer to the byte where the parameter is found - */ -void -icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, u32_t pointer) -{ - icmp6_send_response(p, c, pointer, ICMP6_TYPE_PP); -} - -/** - * Send an ICMPv6 packet in response to an incoming packet. - * - * @param p the input packet for which the response should be sent, - * p->payload pointing to the IPv6 header - * @param code Code of the ICMPv6 header - * @param data Additional 32-bit parameter in the ICMPv6 header - * @param type Type of the ICMPv6 header - */ -static void -icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type) -{ - struct pbuf *q; - struct icmp6_hdr *icmp6hdr; - const ip6_addr_t *reply_src; - ip6_addr_t *reply_dest; - ip6_addr_t reply_src_local, reply_dest_local; - struct ip6_hdr *ip6hdr; - struct netif *netif; - - /* ICMPv6 header + IPv6 header + data */ - q = pbuf_alloc(PBUF_IP, sizeof(struct icmp6_hdr) + IP6_HLEN + LWIP_ICMP6_DATASIZE, - PBUF_RAM); - if (q == NULL) { - LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMPv6 packet.\n")); - ICMP6_STATS_INC(icmp6.memerr); - return; - } - LWIP_ASSERT("check that first pbuf can hold icmp 6message", - (q->len >= (sizeof(struct icmp6_hdr) + IP6_HLEN + LWIP_ICMP6_DATASIZE))); - - icmp6hdr = (struct icmp6_hdr *)q->payload; - icmp6hdr->type = type; - icmp6hdr->code = code; - icmp6hdr->data = data; - - /* copy fields from original packet */ - SMEMCPY((u8_t *)q->payload + sizeof(struct icmp6_hdr), (u8_t *)p->payload, - IP6_HLEN + LWIP_ICMP6_DATASIZE); - - /* Get the destination address and netif for this ICMP message. */ - if ((ip_current_netif() == NULL) || - ((code == ICMP6_TE_FRAG) && (type == ICMP6_TYPE_TE))) { - /* Special case, as ip6_current_xxx is either NULL, or points - * to a different packet than the one that expired. - * We must use the addresses that are stored in the expired packet. */ - ip6hdr = (struct ip6_hdr *)p->payload; - /* copy from packed address to aligned address */ - ip6_addr_copy(reply_dest_local, ip6hdr->src); - ip6_addr_copy(reply_src_local, ip6hdr->dest); - reply_dest = &reply_dest_local; - reply_src = &reply_src_local; - netif = ip6_route(reply_src, reply_dest); - if (netif == NULL) { - /* drop */ - pbuf_free(q); - ICMP6_STATS_INC(icmp6.rterr); - return; - } - } - else { - netif = ip_current_netif(); - reply_dest = ip6_current_src_addr(); - - /* Select an address to use as source. */ - reply_src = ip_2_ip6(ip6_select_source_address(netif, reply_dest)); - if (reply_src == NULL) { - /* drop */ - pbuf_free(q); - ICMP6_STATS_INC(icmp6.rterr); - return; - } - } - - /* calculate checksum */ - icmp6hdr->chksum = 0; -#if CHECKSUM_GEN_ICMP6 - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { - icmp6hdr->chksum = ip6_chksum_pseudo(q, IP6_NEXTH_ICMP6, q->tot_len, - reply_src, reply_dest); - } -#endif /* CHECKSUM_GEN_ICMP6 */ - - ICMP6_STATS_INC(icmp6.xmit); - ip6_output_if(q, reply_src, reply_dest, LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); - pbuf_free(q); -} - -#endif /* LWIP_ICMP6 && LWIP_IPV6 */ +/** + * @file + * + * IPv6 version of ICMP, as per RFC 4443. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" + +#if LWIP_ICMP6 && LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/icmp6.h" +#include "lwip/prot/icmp6.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/inet_chksum.h" +#include "lwip/pbuf.h" +#include "lwip/netif.h" +#include "lwip/nd6.h" +#include "lwip/mld6.h" +#include "lwip/ip.h" +#include "lwip/stats.h" + +#include + +#ifndef LWIP_ICMP6_DATASIZE +#define LWIP_ICMP6_DATASIZE 8 +#endif +#if LWIP_ICMP6_DATASIZE == 0 +#define LWIP_ICMP6_DATASIZE 8 +#endif + +/* Forward declarations */ +static void icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type); + + +/** + * Process an input ICMPv6 message. Called by ip6_input. + * + * Will generate a reply for echo requests. Other messages are forwarded + * to nd6_input, or mld6_input. + * + * @param p the mld packet, p->payload pointing to the icmpv6 header + * @param inp the netif on which this packet was received + */ +void +icmp6_input(struct pbuf *p, struct netif *inp) +{ + struct icmp6_hdr *icmp6hdr; + struct pbuf *r; + const ip6_addr_t *reply_src; + + ICMP6_STATS_INC(icmp6.recv); + + /* Check that ICMPv6 header fits in payload */ + if (p->len < sizeof(struct icmp6_hdr)) { + /* drop short packets */ + pbuf_free(p); + ICMP6_STATS_INC(icmp6.lenerr); + ICMP6_STATS_INC(icmp6.drop); + return; + } + + icmp6hdr = (struct icmp6_hdr *)p->payload; + +#if CHECKSUM_CHECK_ICMP6 + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_ICMP6) { + if (ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->tot_len, ip6_current_src_addr(), + ip6_current_dest_addr()) != 0) { + /* Checksum failed */ + pbuf_free(p); + ICMP6_STATS_INC(icmp6.chkerr); + ICMP6_STATS_INC(icmp6.drop); + return; + } + } +#endif /* CHECKSUM_CHECK_ICMP6 */ + + switch (icmp6hdr->type) { + case ICMP6_TYPE_NA: /* Neighbor advertisement */ + case ICMP6_TYPE_NS: /* Neighbor solicitation */ + case ICMP6_TYPE_RA: /* Router advertisement */ + case ICMP6_TYPE_RD: /* Redirect */ + case ICMP6_TYPE_PTB: /* Packet too big */ + nd6_input(p, inp); + return; + break; + case ICMP6_TYPE_RS: +#if LWIP_IPV6_FORWARD + /* @todo implement router functionality */ +#endif + break; +#if LWIP_IPV6_MLD + case ICMP6_TYPE_MLQ: + case ICMP6_TYPE_MLR: + case ICMP6_TYPE_MLD: + mld6_input(p, inp); + return; + break; +#endif + case ICMP6_TYPE_EREQ: +#if !LWIP_MULTICAST_PING + /* multicast destination address? */ + if (ip6_addr_ismulticast(ip6_current_dest_addr())) { + /* drop */ + pbuf_free(p); + ICMP6_STATS_INC(icmp6.drop); + return; + } +#endif /* LWIP_MULTICAST_PING */ + + /* Allocate reply. */ + r = pbuf_alloc(PBUF_IP, p->tot_len, PBUF_RAM); + if (r == NULL) { + /* drop */ + pbuf_free(p); + ICMP6_STATS_INC(icmp6.memerr); + return; + } + + /* Copy echo request. */ + if (pbuf_copy(r, p) != ERR_OK) { + /* drop */ + pbuf_free(p); + pbuf_free(r); + ICMP6_STATS_INC(icmp6.err); + return; + } + + /* Determine reply source IPv6 address. */ +#if LWIP_MULTICAST_PING + if (ip6_addr_ismulticast(ip6_current_dest_addr())) { + reply_src = ip_2_ip6(ip6_select_source_address(inp, ip6_current_src_addr())); + if (reply_src == NULL) { + /* drop */ + pbuf_free(p); + pbuf_free(r); + ICMP6_STATS_INC(icmp6.rterr); + return; + } + } + else +#endif /* LWIP_MULTICAST_PING */ + { + reply_src = ip6_current_dest_addr(); + } + + /* Set fields in reply. */ + ((struct icmp6_echo_hdr *)(r->payload))->type = ICMP6_TYPE_EREP; + ((struct icmp6_echo_hdr *)(r->payload))->chksum = 0; +#if CHECKSUM_GEN_ICMP6 + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP6) { + ((struct icmp6_echo_hdr *)(r->payload))->chksum = ip6_chksum_pseudo(r, + IP6_NEXTH_ICMP6, r->tot_len, reply_src, ip6_current_src_addr()); + } +#endif /* CHECKSUM_GEN_ICMP6 */ + + /* Send reply. */ + ICMP6_STATS_INC(icmp6.xmit); + ip6_output_if(r, reply_src, ip6_current_src_addr(), + LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, inp); + pbuf_free(r); + + break; + default: + ICMP6_STATS_INC(icmp6.proterr); + ICMP6_STATS_INC(icmp6.drop); + break; + } + + pbuf_free(p); +} + + +/** + * Send an icmpv6 'destination unreachable' packet. + * + * @param p the input packet for which the 'unreachable' should be sent, + * p->payload pointing to the IPv6 header + * @param c ICMPv6 code for the unreachable type + */ +void +icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c) +{ + icmp6_send_response(p, c, 0, ICMP6_TYPE_DUR); +} + +/** + * Send an icmpv6 'packet too big' packet. + * + * @param p the input packet for which the 'packet too big' should be sent, + * p->payload pointing to the IPv6 header + * @param mtu the maximum mtu that we can accept + */ +void +icmp6_packet_too_big(struct pbuf *p, u32_t mtu) +{ + icmp6_send_response(p, 0, mtu, ICMP6_TYPE_PTB); +} + +/** + * Send an icmpv6 'time exceeded' packet. + * + * @param p the input packet for which the 'unreachable' should be sent, + * p->payload pointing to the IPv6 header + * @param c ICMPv6 code for the time exceeded type + */ +void +icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c) +{ + icmp6_send_response(p, c, 0, ICMP6_TYPE_TE); +} + +/** + * Send an icmpv6 'parameter problem' packet. + * + * @param p the input packet for which the 'param problem' should be sent, + * p->payload pointing to the IP header + * @param c ICMPv6 code for the param problem type + * @param pointer the pointer to the byte where the parameter is found + */ +void +icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, u32_t pointer) +{ + icmp6_send_response(p, c, pointer, ICMP6_TYPE_PP); +} + +/** + * Send an ICMPv6 packet in response to an incoming packet. + * + * @param p the input packet for which the response should be sent, + * p->payload pointing to the IPv6 header + * @param code Code of the ICMPv6 header + * @param data Additional 32-bit parameter in the ICMPv6 header + * @param type Type of the ICMPv6 header + */ +static void +icmp6_send_response(struct pbuf *p, u8_t code, u32_t data, u8_t type) +{ + struct pbuf *q; + struct icmp6_hdr *icmp6hdr; + const ip6_addr_t *reply_src; + ip6_addr_t *reply_dest; + ip6_addr_t reply_src_local, reply_dest_local; + struct ip6_hdr *ip6hdr; + struct netif *netif; + + /* ICMPv6 header + IPv6 header + data */ + q = pbuf_alloc(PBUF_IP, sizeof(struct icmp6_hdr) + IP6_HLEN + LWIP_ICMP6_DATASIZE, + PBUF_RAM); + if (q == NULL) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMPv6 packet.\n")); + ICMP6_STATS_INC(icmp6.memerr); + return; + } + LWIP_ASSERT("check that first pbuf can hold icmp 6message", + (q->len >= (sizeof(struct icmp6_hdr) + IP6_HLEN + LWIP_ICMP6_DATASIZE))); + + icmp6hdr = (struct icmp6_hdr *)q->payload; + icmp6hdr->type = type; + icmp6hdr->code = code; + icmp6hdr->data = data; + + /* copy fields from original packet */ + SMEMCPY((u8_t *)q->payload + sizeof(struct icmp6_hdr), (u8_t *)p->payload, + IP6_HLEN + LWIP_ICMP6_DATASIZE); + + /* Get the destination address and netif for this ICMP message. */ + if ((ip_current_netif() == NULL) || + ((code == ICMP6_TE_FRAG) && (type == ICMP6_TYPE_TE))) { + /* Special case, as ip6_current_xxx is either NULL, or points + * to a different packet than the one that expired. + * We must use the addresses that are stored in the expired packet. */ + ip6hdr = (struct ip6_hdr *)p->payload; + /* copy from packed address to aligned address */ + ip6_addr_copy(reply_dest_local, ip6hdr->src); + ip6_addr_copy(reply_src_local, ip6hdr->dest); + reply_dest = &reply_dest_local; + reply_src = &reply_src_local; + netif = ip6_route(reply_src, reply_dest); + if (netif == NULL) { + /* drop */ + pbuf_free(q); + ICMP6_STATS_INC(icmp6.rterr); + return; + } + } + else { + netif = ip_current_netif(); + reply_dest = ip6_current_src_addr(); + + /* Select an address to use as source. */ + reply_src = ip_2_ip6(ip6_select_source_address(netif, reply_dest)); + if (reply_src == NULL) { + /* drop */ + pbuf_free(q); + ICMP6_STATS_INC(icmp6.rterr); + return; + } + } + + /* calculate checksum */ + icmp6hdr->chksum = 0; +#if CHECKSUM_GEN_ICMP6 + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { + icmp6hdr->chksum = ip6_chksum_pseudo(q, IP6_NEXTH_ICMP6, q->tot_len, + reply_src, reply_dest); + } +#endif /* CHECKSUM_GEN_ICMP6 */ + + ICMP6_STATS_INC(icmp6.xmit); + ip6_output_if(q, reply_src, reply_dest, LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); + pbuf_free(q); +} + +#endif /* LWIP_ICMP6 && LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.c index d9a992c..7cb16aa 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/inet6.c @@ -1,53 +1,53 @@ -/** - * @file - * - * INET v6 addresses. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV6 && LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/def.h" -#include "lwip/inet.h" - -/** This variable is initialized by the system to contain the wildcard IPv6 address. - */ -const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; - -#endif /* LWIP_IPV6 */ +/** + * @file + * + * INET v6 addresses. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV6 && LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/def.h" +#include "lwip/inet.h" + +/** This variable is initialized by the system to contain the wildcard IPv6 address. + */ +const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; + +#endif /* LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.c index f14e334..e354087 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6.c @@ -1,1122 +1,1122 @@ -/** - * @file - * - * IPv6 layer. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/def.h" -#include "lwip/mem.h" -#include "lwip/netif.h" -#include "lwip/ip.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/ip6_frag.h" -#include "lwip/icmp6.h" -#include "lwip/raw.h" -#include "lwip/udp.h" -#include "lwip/priv/tcp_priv.h" -#include "lwip/dhcp6.h" -#include "lwip/nd6.h" -#include "lwip/mld6.h" -#include "lwip/debug.h" -#include "lwip/stats.h" - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -/** - * Finds the appropriate network interface for a given IPv6 address. It tries to select - * a netif following a sequence of heuristics: - * 1) if there is only 1 netif, return it - * 2) if the destination is a link-local address, try to match the src address to a netif. - * this is a tricky case because with multiple netifs, link-local addresses only have - * meaning within a particular subnet/link. - * 3) tries to match the destination subnet to a configured address - * 4) tries to find a router - * 5) tries to match the source address to the netif - * 6) returns the default netif, if configured - * - * @param src the source IPv6 address, if known - * @param dest the destination IPv6 address for which to find the route - * @return the netif on which to send to reach dest - */ -struct netif * -ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) -{ - struct netif *netif; - s8_t i; - - /* If single netif configuration, fast return. */ - if ((netif_list != NULL) && (netif_list->next == NULL)) { - if (!netif_is_up(netif_list) || !netif_is_link_up(netif_list)) { - return NULL; - } - return netif_list; - } - - /* Special processing for link-local addresses. */ - if (ip6_addr_islinklocal(dest)) { - if (ip6_addr_isany(src)) { - /* Use default netif, if Up. */ - if (netif_default == NULL || !netif_is_up(netif_default) || - !netif_is_link_up(netif_default)) { - return NULL; - } - return netif_default; - } - - /* Try to find the netif for the source address, checking that link is up. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (!netif_is_up(netif) || !netif_is_link_up(netif)) { - continue; - } - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(src, netif_ip6_addr(netif, i))) { - return netif; - } - } - } - - /* netif not found, use default netif, if up */ - if (netif_default == NULL || !netif_is_up(netif_default) || - !netif_is_link_up(netif_default)) { - return NULL; - } - return netif_default; - } - - /* we come here for non-link-local addresses */ -#ifdef LWIP_HOOK_IP6_ROUTE - netif = LWIP_HOOK_IP6_ROUTE(src, dest); - if (netif != NULL) { - return netif; - } -#endif - - /* See if the destination subnet matches a configured address. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (!netif_is_up(netif) || !netif_is_link_up(netif)) { - continue; - } - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { - return netif; - } - } - } - - /* Get the netif for a suitable router. */ - netif = nd6_find_route(dest); - if ((netif != NULL) && netif_is_up(netif) && netif_is_link_up(netif)) { - return netif; - } - - /* try with the netif that matches the source address. */ - if (!ip6_addr_isany(src)) { - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (!netif_is_up(netif) || !netif_is_link_up(netif)) { - continue; - } - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(src, netif_ip6_addr(netif, i))) { - return netif; - } - } - } - } - -#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF - /* loopif is disabled, loopback traffic is passed through any netif */ - if (ip6_addr_isloopback(dest)) { - /* don't check for link on loopback traffic */ - if (netif_default != NULL && netif_is_up(netif_default)) { - return netif_default; - } - /* default netif is not up, just use any netif for loopback traffic */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (netif_is_up(netif)) { - return netif; - } - } - return NULL; - } -#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ - - /* no matching netif found, use default netif, if up */ - if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default)) { - return NULL; - } - return netif_default; -} - -/** - * @ingroup ip6 - * Select the best IPv6 source address for a given destination - * IPv6 address. Loosely follows RFC 3484. "Strong host" behavior - * is assumed. - * - * @param netif the netif on which to send a packet - * @param dest the destination we are trying to reach - * @return the most suitable source address to use, or NULL if no suitable - * source address is found - */ -const ip_addr_t * -ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest) -{ - const ip_addr_t *src = NULL; - u8_t i; - - /* If dest is link-local, choose a link-local source. */ - if (ip6_addr_islinklocal(dest) || ip6_addr_ismulticast_linklocal(dest) || ip6_addr_ismulticast_iflocal(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_islinklocal(netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); - } - } - } - - /* Choose a site-local with matching prefix. */ - if (ip6_addr_issitelocal(dest) || ip6_addr_ismulticast_sitelocal(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_issitelocal(netif_ip6_addr(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); - } - } - } - - /* Choose a unique-local with matching prefix. */ - if (ip6_addr_isuniquelocal(dest) || ip6_addr_ismulticast_orglocal(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_isuniquelocal(netif_ip6_addr(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); - } - } - } - - /* Choose a global with best matching prefix. */ - if (ip6_addr_isglobal(dest) || ip6_addr_ismulticast_global(dest)) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_isglobal(netif_ip6_addr(netif, i))) { - if (src == NULL) { - src = netif_ip_addr6(netif, i); - } - else { - /* Replace src only if we find a prefix match. */ - /* @todo find longest matching prefix. */ - if ((!(ip6_addr_netcmp(ip_2_ip6(src), dest))) && - ip6_addr_netcmp(netif_ip6_addr(netif, i), dest)) { - src = netif_ip_addr6(netif, i); - } - } - } - } - if (src != NULL) { - return src; - } - } - - /* Last resort: see if arbitrary prefix matches. */ - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { - return netif_ip_addr6(netif, i); - } - } - - return NULL; -} - -#if LWIP_IPV6_FORWARD -/** - * Forwards an IPv6 packet. It finds an appropriate route for the - * packet, decrements the HL value of the packet, and outputs - * the packet on the appropriate interface. - * - * @param p the packet to forward (p->payload points to IP header) - * @param iphdr the IPv6 header of the input packet - * @param inp the netif on which this packet was received - */ -static void -ip6_forward(struct pbuf *p, struct ip6_hdr *iphdr, struct netif *inp) -{ - struct netif *netif; - - /* do not forward link-local or loopback addresses */ - if (ip6_addr_islinklocal(ip6_current_dest_addr()) || - ip6_addr_isloopback(ip6_current_dest_addr())) { - LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: not forwarding link-local address.\n")); - IP6_STATS_INC(ip6.rterr); - IP6_STATS_INC(ip6.drop); - return; - } - - /* Find network interface where to forward this IP packet to. */ - netif = ip6_route(IP6_ADDR_ANY6, ip6_current_dest_addr()); - if (netif == NULL) { - LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: no route for %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", - IP6_ADDR_BLOCK1(ip6_current_dest_addr()), - IP6_ADDR_BLOCK2(ip6_current_dest_addr()), - IP6_ADDR_BLOCK3(ip6_current_dest_addr()), - IP6_ADDR_BLOCK4(ip6_current_dest_addr()), - IP6_ADDR_BLOCK5(ip6_current_dest_addr()), - IP6_ADDR_BLOCK6(ip6_current_dest_addr()), - IP6_ADDR_BLOCK7(ip6_current_dest_addr()), - IP6_ADDR_BLOCK8(ip6_current_dest_addr()))); -#if LWIP_ICMP6 - /* Don't send ICMP messages in response to ICMP messages */ - if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) { - icmp6_dest_unreach(p, ICMP6_DUR_NO_ROUTE); - } -#endif /* LWIP_ICMP6 */ - IP6_STATS_INC(ip6.rterr); - IP6_STATS_INC(ip6.drop); - return; - } - /* Do not forward packets onto the same network interface on which - * they arrived. */ - if (netif == inp) { - LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: not bouncing packets back on incoming interface.\n")); - IP6_STATS_INC(ip6.rterr); - IP6_STATS_INC(ip6.drop); - return; - } - - /* decrement HL */ - IP6H_HOPLIM_SET(iphdr, IP6H_HOPLIM(iphdr) - 1); - /* send ICMP6 if HL == 0 */ - if (IP6H_HOPLIM(iphdr) == 0) { -#if LWIP_ICMP6 - /* Don't send ICMP messages in response to ICMP messages */ - if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) { - icmp6_time_exceeded(p, ICMP6_TE_HL); - } -#endif /* LWIP_ICMP6 */ - IP6_STATS_INC(ip6.drop); - return; - } - - if (netif->mtu && (p->tot_len > netif->mtu)) { -#if LWIP_ICMP6 - /* Don't send ICMP messages in response to ICMP messages */ - if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) { - icmp6_packet_too_big(p, netif->mtu); - } -#endif /* LWIP_ICMP6 */ - IP6_STATS_INC(ip6.drop); - return; - } - - LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: forwarding packet to %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", - IP6_ADDR_BLOCK1(ip6_current_dest_addr()), - IP6_ADDR_BLOCK2(ip6_current_dest_addr()), - IP6_ADDR_BLOCK3(ip6_current_dest_addr()), - IP6_ADDR_BLOCK4(ip6_current_dest_addr()), - IP6_ADDR_BLOCK5(ip6_current_dest_addr()), - IP6_ADDR_BLOCK6(ip6_current_dest_addr()), - IP6_ADDR_BLOCK7(ip6_current_dest_addr()), - IP6_ADDR_BLOCK8(ip6_current_dest_addr()))); - - /* transmit pbuf on chosen interface */ - netif->output_ip6(netif, p, ip6_current_dest_addr()); - IP6_STATS_INC(ip6.fw); - IP6_STATS_INC(ip6.xmit); - return; -} -#endif /* LWIP_IPV6_FORWARD */ - -/** - * This function is called by the network interface device driver when - * an IPv6 packet is received. The function does the basic checks of the - * IP header such as packet size being at least larger than the header - * size etc. If the packet was not destined for us, the packet is - * forwarded (using ip6_forward). - * - * Finally, the packet is sent to the upper layer protocol input function. - * - * @param p the received IPv6 packet (p->payload points to IPv6 header) - * @param inp the netif on which this packet was received - * @return ERR_OK if the packet was processed (could return ERR_* if it wasn't - * processed, but currently always returns ERR_OK) - */ -err_t -ip6_input(struct pbuf *p, struct netif *inp) -{ - struct ip6_hdr *ip6hdr; - struct netif *netif; - u8_t nexth; - u16_t hlen; /* the current header length */ - u8_t i; -#if 0 /*IP_ACCEPT_LINK_LAYER_ADDRESSING*/ - @todo - int check_ip_src=1; -#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ - - IP6_STATS_INC(ip6.recv); - - /* identify the IP header */ - ip6hdr = (struct ip6_hdr *)p->payload; - if (IP6H_V(ip6hdr) != 6) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IPv6 packet dropped due to bad version number %"U32_F"\n", - IP6H_V(ip6hdr))); - pbuf_free(p); - IP6_STATS_INC(ip6.err); - IP6_STATS_INC(ip6.drop); - return ERR_OK; - } - -#ifdef LWIP_HOOK_IP6_INPUT - if (LWIP_HOOK_IP6_INPUT(p, inp)) { - /* the packet has been eaten */ - return ERR_OK; - } -#endif - - /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ - if ((IP6_HLEN > p->len) || ((IP6H_PLEN(ip6hdr) + IP6_HLEN) > p->tot_len)) { - if (IP6_HLEN > p->len) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IPv6 header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n", - (u16_t)IP6_HLEN, p->len)); - } - if ((IP6H_PLEN(ip6hdr) + IP6_HLEN) > p->tot_len) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IPv6 (plen %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", - (u16_t)(IP6H_PLEN(ip6hdr) + IP6_HLEN), p->tot_len)); - } - /* free (drop) packet pbufs */ - pbuf_free(p); - IP6_STATS_INC(ip6.lenerr); - IP6_STATS_INC(ip6.drop); - return ERR_OK; - } - - /* Trim pbuf. This should have been done at the netif layer, - * but we'll do it anyway just to be sure that its done. */ - pbuf_realloc(p, IP6_HLEN + IP6H_PLEN(ip6hdr)); - - /* copy IP addresses to aligned ip6_addr_t */ - ip_addr_copy_from_ip6(ip_data.current_iphdr_dest, ip6hdr->dest); - ip_addr_copy_from_ip6(ip_data.current_iphdr_src, ip6hdr->src); - - /* Don't accept virtual IPv4 mapped IPv6 addresses. - * Don't accept multicast source addresses. */ - if (ip6_addr_isipv4mappedipv6(ip_2_ip6(&ip_data.current_iphdr_dest)) || - ip6_addr_isipv4mappedipv6(ip_2_ip6(&ip_data.current_iphdr_src)) || - ip6_addr_ismulticast(ip_2_ip6(&ip_data.current_iphdr_src))) { - IP6_STATS_INC(ip6.err); - IP6_STATS_INC(ip6.drop); - return ERR_OK; - } - - /* current header pointer. */ - ip_data.current_ip6_header = ip6hdr; - - /* In netif, used in case we need to send ICMPv6 packets back. */ - ip_data.current_netif = inp; - ip_data.current_input_netif = inp; - - /* match packet against an interface, i.e. is this packet for us? */ - if (ip6_addr_ismulticast(ip6_current_dest_addr())) { - /* Always joined to multicast if-local and link-local all-nodes group. */ - if (ip6_addr_isallnodes_iflocal(ip6_current_dest_addr()) || - ip6_addr_isallnodes_linklocal(ip6_current_dest_addr())) { - netif = inp; - } -#if LWIP_IPV6_MLD - else if (mld6_lookfor_group(inp, ip6_current_dest_addr())) { - netif = inp; - } -#else /* LWIP_IPV6_MLD */ - else if (ip6_addr_issolicitednode(ip6_current_dest_addr())) { - /* Filter solicited node packets when MLD is not enabled - * (for Neighbor discovery). */ - netif = NULL; - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(inp, i)) && - ip6_addr_cmp_solicitednode(ip6_current_dest_addr(), netif_ip6_addr(inp, i))) { - netif = inp; - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: solicited node packet accepted on interface %c%c\n", - netif->name[0], netif->name[1])); - break; - } - } - } -#endif /* LWIP_IPV6_MLD */ - else { - netif = NULL; - } - } else { - /* start trying with inp. if that's not acceptable, start walking the - list of configured netifs. - 'first' is used as a boolean to mark whether we started walking the list */ - int first = 1; - netif = inp; - do { - /* interface is up? */ - if (netif_is_up(netif)) { - /* unicast to this interface address? address configured? */ - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(ip6_current_dest_addr(), netif_ip6_addr(netif, i))) { - /* exit outer loop */ - goto netif_found; - } - } - } - if (first) { - if (ip6_addr_islinklocal(ip6_current_dest_addr()) -#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF - || ip6_addr_isloopback(ip6_current_dest_addr()) -#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ - ) { - /* Do not match link-local addresses to other netifs. The loopback - * address is to be considered link-local and packets to it should be - * dropped on other interfaces, as per RFC 4291 Sec. 2.5.3. This - * requirement cannot be implemented in the case that loopback - * traffic is sent across a non-loopback interface, however. - */ - netif = NULL; - break; - } - first = 0; - netif = netif_list; - } else { - netif = netif->next; - } - if (netif == inp) { - netif = netif->next; - } - } while (netif != NULL); -netif_found: - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet accepted on interface %c%c\n", - netif ? netif->name[0] : 'X', netif? netif->name[1] : 'X')); - } - - /* "::" packet source address? (used in duplicate address detection) */ - if (ip6_addr_isany(ip6_current_src_addr()) && - (!ip6_addr_issolicitednode(ip6_current_dest_addr()))) { - /* packet source is not valid */ - /* free (drop) packet pbufs */ - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with src ANY_ADDRESS dropped\n")); - pbuf_free(p); - IP6_STATS_INC(ip6.drop); - goto ip6_input_cleanup; - } - - /* packet not for us? */ - if (netif == NULL) { - /* packet not for us, route or discard */ - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_TRACE, ("ip6_input: packet not for us.\n")); -#if LWIP_IPV6_FORWARD - /* non-multicast packet? */ - if (!ip6_addr_ismulticast(ip6_current_dest_addr())) { - /* try to forward IP packet on (other) interfaces */ - ip6_forward(p, ip6hdr, inp); - } -#endif /* LWIP_IPV6_FORWARD */ - pbuf_free(p); - goto ip6_input_cleanup; - } - - /* current netif pointer. */ - ip_data.current_netif = netif; - - /* Save next header type. */ - nexth = IP6H_NEXTH(ip6hdr); - - /* Init header length. */ - hlen = ip_data.current_ip_header_tot_len = IP6_HLEN; - - /* Move to payload. */ - pbuf_header(p, -IP6_HLEN); - - /* Process known option extension headers, if present. */ - while (nexth != IP6_NEXTH_NONE) - { - switch (nexth) { - case IP6_NEXTH_HOPBYHOP: - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Hop-by-Hop options header\n")); - /* Get next header type. */ - nexth = *((u8_t *)p->payload); - - /* Get the header length. */ - hlen = 8 * (1 + *((u8_t *)p->payload + 1)); - ip_data.current_ip_header_tot_len += hlen; - - /* Skip over this header. */ - if (hlen > p->len) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", - hlen, p->len)); - /* free (drop) packet pbufs */ - pbuf_free(p); - IP6_STATS_INC(ip6.lenerr); - IP6_STATS_INC(ip6.drop); - goto ip6_input_cleanup; - } - - pbuf_header(p, -(s16_t)hlen); - break; - case IP6_NEXTH_DESTOPTS: - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Destination options header\n")); - /* Get next header type. */ - nexth = *((u8_t *)p->payload); - - /* Get the header length. */ - hlen = 8 * (1 + *((u8_t *)p->payload + 1)); - ip_data.current_ip_header_tot_len += hlen; - - /* Skip over this header. */ - if (hlen > p->len) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", - hlen, p->len)); - /* free (drop) packet pbufs */ - pbuf_free(p); - IP6_STATS_INC(ip6.lenerr); - IP6_STATS_INC(ip6.drop); - goto ip6_input_cleanup; - } - - pbuf_header(p, -(s16_t)hlen); - break; - case IP6_NEXTH_ROUTING: - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Routing header\n")); - /* Get next header type. */ - nexth = *((u8_t *)p->payload); - - /* Get the header length. */ - hlen = 8 * (1 + *((u8_t *)p->payload + 1)); - ip_data.current_ip_header_tot_len += hlen; - - /* Skip over this header. */ - if (hlen > p->len) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", - hlen, p->len)); - /* free (drop) packet pbufs */ - pbuf_free(p); - IP6_STATS_INC(ip6.lenerr); - IP6_STATS_INC(ip6.drop); - goto ip6_input_cleanup; - } - - pbuf_header(p, -(s16_t)hlen); - break; - - case IP6_NEXTH_FRAGMENT: - { - struct ip6_frag_hdr *frag_hdr; - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Fragment header\n")); - - frag_hdr = (struct ip6_frag_hdr *)p->payload; - - /* Get next header type. */ - nexth = frag_hdr->_nexth; - - /* Fragment Header length. */ - hlen = 8; - ip_data.current_ip_header_tot_len += hlen; - - /* Make sure this header fits in current pbuf. */ - if (hlen > p->len) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", - hlen, p->len)); - /* free (drop) packet pbufs */ - pbuf_free(p); - IP6_FRAG_STATS_INC(ip6_frag.lenerr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto ip6_input_cleanup; - } - - /* Offset == 0 and more_fragments == 0? */ - if ((frag_hdr->_fragment_offset & - PP_HTONS(IP6_FRAG_OFFSET_MASK | IP6_FRAG_MORE_FLAG)) == 0) { - /* This is a 1-fragment packet, usually a packet that we have - * already reassembled. Skip this header anc continue. */ - pbuf_header(p, -(s16_t)hlen); - } else { -#if LWIP_IPV6_REASS - - /* reassemble the packet */ - p = ip6_reass(p); - /* packet not fully reassembled yet? */ - if (p == NULL) { - goto ip6_input_cleanup; - } - - /* Returned p point to IPv6 header. - * Update all our variables and pointers and continue. */ - ip6hdr = (struct ip6_hdr *)p->payload; - nexth = IP6H_NEXTH(ip6hdr); - hlen = ip_data.current_ip_header_tot_len = IP6_HLEN; - pbuf_header(p, -IP6_HLEN); - -#else /* LWIP_IPV6_REASS */ - /* free (drop) packet pbufs */ - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Fragment header dropped (with LWIP_IPV6_REASS==0)\n")); - pbuf_free(p); - IP6_STATS_INC(ip6.opterr); - IP6_STATS_INC(ip6.drop); - goto ip6_input_cleanup; -#endif /* LWIP_IPV6_REASS */ - } - break; - } - default: - goto options_done; - break; - } - } -options_done: - - /* p points to IPv6 header again. */ - pbuf_header_force(p, (s16_t)ip_data.current_ip_header_tot_len); - - /* send to upper layers */ - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: \n")); - ip6_debug_print(p); - LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); - -#if LWIP_RAW - /* raw input did not eat the packet? */ - if (raw_input(p, inp) == 0) -#endif /* LWIP_RAW */ - { - switch (nexth) { - case IP6_NEXTH_NONE: - pbuf_free(p); - break; -#if LWIP_UDP - case IP6_NEXTH_UDP: -#if LWIP_UDPLITE - case IP6_NEXTH_UDPLITE: -#endif /* LWIP_UDPLITE */ - /* Point to payload. */ - pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); - udp_input(p, inp); - break; -#endif /* LWIP_UDP */ -#if LWIP_TCP - case IP6_NEXTH_TCP: - /* Point to payload. */ - pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); - tcp_input(p, inp); - break; -#endif /* LWIP_TCP */ -#if LWIP_ICMP6 - case IP6_NEXTH_ICMP6: - /* Point to payload. */ - pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); - icmp6_input(p, inp); - break; -#endif /* LWIP_ICMP */ - default: -#if LWIP_ICMP6 - /* send ICMP parameter problem unless it was a multicast or ICMPv6 */ - if ((!ip6_addr_ismulticast(ip6_current_dest_addr())) && - (IP6H_NEXTH(ip6hdr) != IP6_NEXTH_ICMP6)) { - icmp6_param_problem(p, ICMP6_PP_HEADER, ip_data.current_ip_header_tot_len - hlen); - } -#endif /* LWIP_ICMP */ - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_input: Unsupported transport protocol %"U16_F"\n", (u16_t)IP6H_NEXTH(ip6hdr))); - pbuf_free(p); - IP6_STATS_INC(ip6.proterr); - IP6_STATS_INC(ip6.drop); - break; - } - } - -ip6_input_cleanup: - ip_data.current_netif = NULL; - ip_data.current_input_netif = NULL; - ip_data.current_ip6_header = NULL; - ip_data.current_ip_header_tot_len = 0; - ip6_addr_set_zero(ip6_current_src_addr()); - ip6_addr_set_zero(ip6_current_dest_addr()); - - return ERR_OK; -} - - -/** - * Sends an IPv6 packet on a network interface. This function constructs - * the IPv6 header. If the source IPv6 address is NULL, the IPv6 "ANY" address is - * used as source (usually during network startup). If the source IPv6 address it - * IP6_ADDR_ANY, the most appropriate IPv6 address of the outgoing network - * interface is filled in as source address. If the destination IPv6 address is - * LWIP_IP_HDRINCL, p is assumed to already include an IPv6 header and - * p->payload points to it instead of the data. - * - * @param p the packet to send (p->payload points to the data, e.g. next - protocol header; if dest == LWIP_IP_HDRINCL, p already includes an - IPv6 header and p->payload points to that IPv6 header) - * @param src the source IPv6 address to send from (if src == IP6_ADDR_ANY, an - * IP address of the netif is selected and used as source address. - * if src == NULL, IP6_ADDR_ANY is used as source) - * @param dest the destination IPv6 address to send the packet to - * @param hl the Hop Limit value to be set in the IPv6 header - * @param tc the Traffic Class value to be set in the IPv6 header - * @param nexth the Next Header to be set in the IPv6 header - * @param netif the netif on which to send this packet - * @return ERR_OK if the packet was sent OK - * ERR_BUF if p doesn't have enough space for IPv6/LINK headers - * returns errors returned by netif->output - */ -err_t -ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, - u8_t nexth, struct netif *netif) -{ - const ip6_addr_t *src_used = src; - if (dest != LWIP_IP_HDRINCL) { - if (src != NULL && ip6_addr_isany(src)) { - src_used = ip_2_ip6(ip6_select_source_address(netif, dest)); - if ((src_used == NULL) || ip6_addr_isany(src_used)) { - /* No appropriate source address was found for this packet. */ - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_output: No suitable source address for packet.\n")); - IP6_STATS_INC(ip6.rterr); - return ERR_RTE; - } - } - } - return ip6_output_if_src(p, src_used, dest, hl, tc, nexth, netif); -} - -/** - * Same as ip6_output_if() but 'src' address is not replaced by netif address - * when it is 'any'. - */ -err_t -ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, - u8_t nexth, struct netif *netif) -{ - struct ip6_hdr *ip6hdr; - ip6_addr_t dest_addr; - - LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - - /* Should the IPv6 header be generated or is it already included in p? */ - if (dest != LWIP_IP_HDRINCL) { - /* generate IPv6 header */ - if (pbuf_header(p, IP6_HLEN)) { - LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_output: not enough room for IPv6 header in pbuf\n")); - IP6_STATS_INC(ip6.err); - return ERR_BUF; - } - - ip6hdr = (struct ip6_hdr *)p->payload; - LWIP_ASSERT("check that first pbuf can hold struct ip6_hdr", - (p->len >= sizeof(struct ip6_hdr))); - - IP6H_HOPLIM_SET(ip6hdr, hl); - IP6H_NEXTH_SET(ip6hdr, nexth); - - /* dest cannot be NULL here */ - ip6_addr_copy(ip6hdr->dest, *dest); - - IP6H_VTCFL_SET(ip6hdr, 6, tc, 0); - IP6H_PLEN_SET(ip6hdr, p->tot_len - IP6_HLEN); - - if (src == NULL) { - src = IP6_ADDR_ANY6; - } - /* src cannot be NULL here */ - ip6_addr_copy(ip6hdr->src, *src); - - } else { - /* IP header already included in p */ - ip6hdr = (struct ip6_hdr *)p->payload; - ip6_addr_copy(dest_addr, ip6hdr->dest); - dest = &dest_addr; - } - - IP6_STATS_INC(ip6.xmit); - - LWIP_DEBUGF(IP6_DEBUG, ("ip6_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], (u16_t)netif->num)); - ip6_debug_print(p); - -#if ENABLE_LOOPBACK - { - int i; -#if !LWIP_HAVE_LOOPIF - if (ip6_addr_isloopback(dest)) { - return netif_loop_output(netif, p); - } -#endif /* !LWIP_HAVE_LOOPIF */ - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(dest, netif_ip6_addr(netif, i))) { - /* Packet to self, enqueue it for loopback */ - LWIP_DEBUGF(IP6_DEBUG, ("netif_loop_output()\n")); - return netif_loop_output(netif, p); - } - } - } -#endif /* ENABLE_LOOPBACK */ -#if LWIP_IPV6_FRAG - /* don't fragment if interface has mtu set to 0 [loopif] */ - if (netif->mtu && (p->tot_len > nd6_get_destination_mtu(dest, netif))) { - return ip6_frag(p, netif, dest); - } -#endif /* LWIP_IPV6_FRAG */ - - LWIP_DEBUGF(IP6_DEBUG, ("netif->output_ip6()\n")); - return netif->output_ip6(netif, p, dest); -} - -/** - * Simple interface to ip6_output_if. It finds the outgoing network - * interface and calls upon ip6_output_if to do the actual work. - * - * @param p the packet to send (p->payload points to the data, e.g. next - protocol header; if dest == LWIP_IP_HDRINCL, p already includes an - IPv6 header and p->payload points to that IPv6 header) - * @param src the source IPv6 address to send from (if src == IP6_ADDR_ANY, an - * IP address of the netif is selected and used as source address. - * if src == NULL, IP6_ADDR_ANY is used as source) - * @param dest the destination IPv6 address to send the packet to - * @param hl the Hop Limit value to be set in the IPv6 header - * @param tc the Traffic Class value to be set in the IPv6 header - * @param nexth the Next Header to be set in the IPv6 header - * - * @return ERR_RTE if no route is found - * see ip_output_if() for more return values - */ -err_t -ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth) -{ - struct netif *netif; - struct ip6_hdr *ip6hdr; - ip6_addr_t src_addr, dest_addr; - - LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - - if (dest != LWIP_IP_HDRINCL) { - netif = ip6_route(src, dest); - } else { - /* IP header included in p, read addresses. */ - ip6hdr = (struct ip6_hdr *)p->payload; - ip6_addr_copy(src_addr, ip6hdr->src); - ip6_addr_copy(dest_addr, ip6hdr->dest); - netif = ip6_route(&src_addr, &dest_addr); - } - - if (netif == NULL) { - LWIP_DEBUGF(IP6_DEBUG, ("ip6_output: no route for %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", - IP6_ADDR_BLOCK1(dest), - IP6_ADDR_BLOCK2(dest), - IP6_ADDR_BLOCK3(dest), - IP6_ADDR_BLOCK4(dest), - IP6_ADDR_BLOCK5(dest), - IP6_ADDR_BLOCK6(dest), - IP6_ADDR_BLOCK7(dest), - IP6_ADDR_BLOCK8(dest))); - IP6_STATS_INC(ip6.rterr); - return ERR_RTE; - } - - return ip6_output_if(p, src, dest, hl, tc, nexth, netif); -} - - -#if LWIP_NETIF_HWADDRHINT -/** Like ip6_output, but takes and addr_hint pointer that is passed on to netif->addr_hint - * before calling ip6_output_if. - * - * @param p the packet to send (p->payload points to the data, e.g. next - protocol header; if dest == LWIP_IP_HDRINCL, p already includes an - IPv6 header and p->payload points to that IPv6 header) - * @param src the source IPv6 address to send from (if src == IP6_ADDR_ANY, an - * IP address of the netif is selected and used as source address. - * if src == NULL, IP6_ADDR_ANY is used as source) - * @param dest the destination IPv6 address to send the packet to - * @param hl the Hop Limit value to be set in the IPv6 header - * @param tc the Traffic Class value to be set in the IPv6 header - * @param nexth the Next Header to be set in the IPv6 header - * @param addr_hint address hint pointer set to netif->addr_hint before - * calling ip_output_if() - * - * @return ERR_RTE if no route is found - * see ip_output_if() for more return values - */ -err_t -ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth, u8_t *addr_hint) -{ - struct netif *netif; - struct ip6_hdr *ip6hdr; - ip6_addr_t src_addr, dest_addr; - err_t err; - - LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); - - if (dest != LWIP_IP_HDRINCL) { - netif = ip6_route(src, dest); - } else { - /* IP header included in p, read addresses. */ - ip6hdr = (struct ip6_hdr *)p->payload; - ip6_addr_copy(src_addr, ip6hdr->src); - ip6_addr_copy(dest_addr, ip6hdr->dest); - netif = ip6_route(&src_addr, &dest_addr); - } - - if (netif == NULL) { - LWIP_DEBUGF(IP6_DEBUG, ("ip6_output: no route for %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", - IP6_ADDR_BLOCK1(dest), - IP6_ADDR_BLOCK2(dest), - IP6_ADDR_BLOCK3(dest), - IP6_ADDR_BLOCK4(dest), - IP6_ADDR_BLOCK5(dest), - IP6_ADDR_BLOCK6(dest), - IP6_ADDR_BLOCK7(dest), - IP6_ADDR_BLOCK8(dest))); - IP6_STATS_INC(ip6.rterr); - return ERR_RTE; - } - - NETIF_SET_HWADDRHINT(netif, addr_hint); - err = ip6_output_if(p, src, dest, hl, tc, nexth, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - - return err; -} -#endif /* LWIP_NETIF_HWADDRHINT*/ - -#if LWIP_IPV6_MLD -/** - * Add a hop-by-hop options header with a router alert option and padding. - * - * Used by MLD when sending a Multicast listener report/done message. - * - * @param p the packet to which we will prepend the options header - * @param nexth the next header protocol number (e.g. IP6_NEXTH_ICMP6) - * @param value the value of the router alert option data (e.g. IP6_ROUTER_ALERT_VALUE_MLD) - * @return ERR_OK if hop-by-hop header was added, ERR_* otherwise - */ -err_t -ip6_options_add_hbh_ra(struct pbuf *p, u8_t nexth, u8_t value) -{ - struct ip6_hbh_hdr *hbh_hdr; - - /* Move pointer to make room for hop-by-hop options header. */ - if (pbuf_header(p, sizeof(struct ip6_hbh_hdr))) { - LWIP_DEBUGF(IP6_DEBUG, ("ip6_options: no space for options header\n")); - IP6_STATS_INC(ip6.err); - return ERR_BUF; - } - - hbh_hdr = (struct ip6_hbh_hdr *)p->payload; - - /* Set fields. */ - hbh_hdr->_nexth = nexth; - hbh_hdr->_hlen = 0; - hbh_hdr->_ra_opt_type = IP6_ROUTER_ALERT_OPTION; - hbh_hdr->_ra_opt_dlen = 2; - hbh_hdr->_ra_opt_data = value; - hbh_hdr->_padn_opt_type = IP6_PADN_ALERT_OPTION; - hbh_hdr->_padn_opt_dlen = 0; - - return ERR_OK; -} -#endif /* LWIP_IPV6_MLD */ - -#if IP6_DEBUG -/* Print an IPv6 header by using LWIP_DEBUGF - * @param p an IPv6 packet, p->payload pointing to the IPv6 header - */ -void -ip6_debug_print(struct pbuf *p) -{ - struct ip6_hdr *ip6hdr = (struct ip6_hdr *)p->payload; - - LWIP_DEBUGF(IP6_DEBUG, ("IPv6 header:\n")); - LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP6_DEBUG, ("| %2"U16_F" | %3"U16_F" | %7"U32_F" | (ver, class, flow)\n", - IP6H_V(ip6hdr), - IP6H_TC(ip6hdr), - IP6H_FL(ip6hdr))); - LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP6_DEBUG, ("| %5"U16_F" | %3"U16_F" | %3"U16_F" | (plen, nexth, hopl)\n", - IP6H_PLEN(ip6hdr), - IP6H_NEXTH(ip6hdr), - IP6H_HOPLIM(ip6hdr))); - LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" | (src)\n", - IP6_ADDR_BLOCK1(&(ip6hdr->src)), - IP6_ADDR_BLOCK2(&(ip6hdr->src)), - IP6_ADDR_BLOCK3(&(ip6hdr->src)), - IP6_ADDR_BLOCK4(&(ip6hdr->src)))); - LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" |\n", - IP6_ADDR_BLOCK5(&(ip6hdr->src)), - IP6_ADDR_BLOCK6(&(ip6hdr->src)), - IP6_ADDR_BLOCK7(&(ip6hdr->src)), - IP6_ADDR_BLOCK8(&(ip6hdr->src)))); - LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" | (dest)\n", - IP6_ADDR_BLOCK1(&(ip6hdr->dest)), - IP6_ADDR_BLOCK2(&(ip6hdr->dest)), - IP6_ADDR_BLOCK3(&(ip6hdr->dest)), - IP6_ADDR_BLOCK4(&(ip6hdr->dest)))); - LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" |\n", - IP6_ADDR_BLOCK5(&(ip6hdr->dest)), - IP6_ADDR_BLOCK6(&(ip6hdr->dest)), - IP6_ADDR_BLOCK7(&(ip6hdr->dest)), - IP6_ADDR_BLOCK8(&(ip6hdr->dest)))); - LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); -} -#endif /* IP6_DEBUG */ - -#endif /* LWIP_IPV6 */ +/** + * @file + * + * IPv6 layer. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/def.h" +#include "lwip/mem.h" +#include "lwip/netif.h" +#include "lwip/ip.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/ip6_frag.h" +#include "lwip/icmp6.h" +#include "lwip/raw.h" +#include "lwip/udp.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/dhcp6.h" +#include "lwip/nd6.h" +#include "lwip/mld6.h" +#include "lwip/debug.h" +#include "lwip/stats.h" + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +/** + * Finds the appropriate network interface for a given IPv6 address. It tries to select + * a netif following a sequence of heuristics: + * 1) if there is only 1 netif, return it + * 2) if the destination is a link-local address, try to match the src address to a netif. + * this is a tricky case because with multiple netifs, link-local addresses only have + * meaning within a particular subnet/link. + * 3) tries to match the destination subnet to a configured address + * 4) tries to find a router + * 5) tries to match the source address to the netif + * 6) returns the default netif, if configured + * + * @param src the source IPv6 address, if known + * @param dest the destination IPv6 address for which to find the route + * @return the netif on which to send to reach dest + */ +struct netif * +ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest) +{ + struct netif *netif; + s8_t i; + + /* If single netif configuration, fast return. */ + if ((netif_list != NULL) && (netif_list->next == NULL)) { + if (!netif_is_up(netif_list) || !netif_is_link_up(netif_list)) { + return NULL; + } + return netif_list; + } + + /* Special processing for link-local addresses. */ + if (ip6_addr_islinklocal(dest)) { + if (ip6_addr_isany(src)) { + /* Use default netif, if Up. */ + if (netif_default == NULL || !netif_is_up(netif_default) || + !netif_is_link_up(netif_default)) { + return NULL; + } + return netif_default; + } + + /* Try to find the netif for the source address, checking that link is up. */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + if (!netif_is_up(netif) || !netif_is_link_up(netif)) { + continue; + } + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_cmp(src, netif_ip6_addr(netif, i))) { + return netif; + } + } + } + + /* netif not found, use default netif, if up */ + if (netif_default == NULL || !netif_is_up(netif_default) || + !netif_is_link_up(netif_default)) { + return NULL; + } + return netif_default; + } + + /* we come here for non-link-local addresses */ +#ifdef LWIP_HOOK_IP6_ROUTE + netif = LWIP_HOOK_IP6_ROUTE(src, dest); + if (netif != NULL) { + return netif; + } +#endif + + /* See if the destination subnet matches a configured address. */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + if (!netif_is_up(netif) || !netif_is_link_up(netif)) { + continue; + } + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { + return netif; + } + } + } + + /* Get the netif for a suitable router. */ + netif = nd6_find_route(dest); + if ((netif != NULL) && netif_is_up(netif) && netif_is_link_up(netif)) { + return netif; + } + + /* try with the netif that matches the source address. */ + if (!ip6_addr_isany(src)) { + for (netif = netif_list; netif != NULL; netif = netif->next) { + if (!netif_is_up(netif) || !netif_is_link_up(netif)) { + continue; + } + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_cmp(src, netif_ip6_addr(netif, i))) { + return netif; + } + } + } + } + +#if LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF + /* loopif is disabled, loopback traffic is passed through any netif */ + if (ip6_addr_isloopback(dest)) { + /* don't check for link on loopback traffic */ + if (netif_default != NULL && netif_is_up(netif_default)) { + return netif_default; + } + /* default netif is not up, just use any netif for loopback traffic */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + if (netif_is_up(netif)) { + return netif; + } + } + return NULL; + } +#endif /* LWIP_NETIF_LOOPBACK && !LWIP_HAVE_LOOPIF */ + + /* no matching netif found, use default netif, if up */ + if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default)) { + return NULL; + } + return netif_default; +} + +/** + * @ingroup ip6 + * Select the best IPv6 source address for a given destination + * IPv6 address. Loosely follows RFC 3484. "Strong host" behavior + * is assumed. + * + * @param netif the netif on which to send a packet + * @param dest the destination we are trying to reach + * @return the most suitable source address to use, or NULL if no suitable + * source address is found + */ +const ip_addr_t * +ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest) +{ + const ip_addr_t *src = NULL; + u8_t i; + + /* If dest is link-local, choose a link-local source. */ + if (ip6_addr_islinklocal(dest) || ip6_addr_ismulticast_linklocal(dest) || ip6_addr_ismulticast_iflocal(dest)) { + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_islinklocal(netif_ip6_addr(netif, i))) { + return netif_ip_addr6(netif, i); + } + } + } + + /* Choose a site-local with matching prefix. */ + if (ip6_addr_issitelocal(dest) || ip6_addr_ismulticast_sitelocal(dest)) { + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_issitelocal(netif_ip6_addr(netif, i)) && + ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { + return netif_ip_addr6(netif, i); + } + } + } + + /* Choose a unique-local with matching prefix. */ + if (ip6_addr_isuniquelocal(dest) || ip6_addr_ismulticast_orglocal(dest)) { + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_isuniquelocal(netif_ip6_addr(netif, i)) && + ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { + return netif_ip_addr6(netif, i); + } + } + } + + /* Choose a global with best matching prefix. */ + if (ip6_addr_isglobal(dest) || ip6_addr_ismulticast_global(dest)) { + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_isglobal(netif_ip6_addr(netif, i))) { + if (src == NULL) { + src = netif_ip_addr6(netif, i); + } + else { + /* Replace src only if we find a prefix match. */ + /* @todo find longest matching prefix. */ + if ((!(ip6_addr_netcmp(ip_2_ip6(src), dest))) && + ip6_addr_netcmp(netif_ip6_addr(netif, i), dest)) { + src = netif_ip_addr6(netif, i); + } + } + } + } + if (src != NULL) { + return src; + } + } + + /* Last resort: see if arbitrary prefix matches. */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_netcmp(dest, netif_ip6_addr(netif, i))) { + return netif_ip_addr6(netif, i); + } + } + + return NULL; +} + +#if LWIP_IPV6_FORWARD +/** + * Forwards an IPv6 packet. It finds an appropriate route for the + * packet, decrements the HL value of the packet, and outputs + * the packet on the appropriate interface. + * + * @param p the packet to forward (p->payload points to IP header) + * @param iphdr the IPv6 header of the input packet + * @param inp the netif on which this packet was received + */ +static void +ip6_forward(struct pbuf *p, struct ip6_hdr *iphdr, struct netif *inp) +{ + struct netif *netif; + + /* do not forward link-local or loopback addresses */ + if (ip6_addr_islinklocal(ip6_current_dest_addr()) || + ip6_addr_isloopback(ip6_current_dest_addr())) { + LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: not forwarding link-local address.\n")); + IP6_STATS_INC(ip6.rterr); + IP6_STATS_INC(ip6.drop); + return; + } + + /* Find network interface where to forward this IP packet to. */ + netif = ip6_route(IP6_ADDR_ANY6, ip6_current_dest_addr()); + if (netif == NULL) { + LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: no route for %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", + IP6_ADDR_BLOCK1(ip6_current_dest_addr()), + IP6_ADDR_BLOCK2(ip6_current_dest_addr()), + IP6_ADDR_BLOCK3(ip6_current_dest_addr()), + IP6_ADDR_BLOCK4(ip6_current_dest_addr()), + IP6_ADDR_BLOCK5(ip6_current_dest_addr()), + IP6_ADDR_BLOCK6(ip6_current_dest_addr()), + IP6_ADDR_BLOCK7(ip6_current_dest_addr()), + IP6_ADDR_BLOCK8(ip6_current_dest_addr()))); +#if LWIP_ICMP6 + /* Don't send ICMP messages in response to ICMP messages */ + if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) { + icmp6_dest_unreach(p, ICMP6_DUR_NO_ROUTE); + } +#endif /* LWIP_ICMP6 */ + IP6_STATS_INC(ip6.rterr); + IP6_STATS_INC(ip6.drop); + return; + } + /* Do not forward packets onto the same network interface on which + * they arrived. */ + if (netif == inp) { + LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: not bouncing packets back on incoming interface.\n")); + IP6_STATS_INC(ip6.rterr); + IP6_STATS_INC(ip6.drop); + return; + } + + /* decrement HL */ + IP6H_HOPLIM_SET(iphdr, IP6H_HOPLIM(iphdr) - 1); + /* send ICMP6 if HL == 0 */ + if (IP6H_HOPLIM(iphdr) == 0) { +#if LWIP_ICMP6 + /* Don't send ICMP messages in response to ICMP messages */ + if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) { + icmp6_time_exceeded(p, ICMP6_TE_HL); + } +#endif /* LWIP_ICMP6 */ + IP6_STATS_INC(ip6.drop); + return; + } + + if (netif->mtu && (p->tot_len > netif->mtu)) { +#if LWIP_ICMP6 + /* Don't send ICMP messages in response to ICMP messages */ + if (IP6H_NEXTH(iphdr) != IP6_NEXTH_ICMP6) { + icmp6_packet_too_big(p, netif->mtu); + } +#endif /* LWIP_ICMP6 */ + IP6_STATS_INC(ip6.drop); + return; + } + + LWIP_DEBUGF(IP6_DEBUG, ("ip6_forward: forwarding packet to %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", + IP6_ADDR_BLOCK1(ip6_current_dest_addr()), + IP6_ADDR_BLOCK2(ip6_current_dest_addr()), + IP6_ADDR_BLOCK3(ip6_current_dest_addr()), + IP6_ADDR_BLOCK4(ip6_current_dest_addr()), + IP6_ADDR_BLOCK5(ip6_current_dest_addr()), + IP6_ADDR_BLOCK6(ip6_current_dest_addr()), + IP6_ADDR_BLOCK7(ip6_current_dest_addr()), + IP6_ADDR_BLOCK8(ip6_current_dest_addr()))); + + /* transmit pbuf on chosen interface */ + netif->output_ip6(netif, p, ip6_current_dest_addr()); + IP6_STATS_INC(ip6.fw); + IP6_STATS_INC(ip6.xmit); + return; +} +#endif /* LWIP_IPV6_FORWARD */ + +/** + * This function is called by the network interface device driver when + * an IPv6 packet is received. The function does the basic checks of the + * IP header such as packet size being at least larger than the header + * size etc. If the packet was not destined for us, the packet is + * forwarded (using ip6_forward). + * + * Finally, the packet is sent to the upper layer protocol input function. + * + * @param p the received IPv6 packet (p->payload points to IPv6 header) + * @param inp the netif on which this packet was received + * @return ERR_OK if the packet was processed (could return ERR_* if it wasn't + * processed, but currently always returns ERR_OK) + */ +err_t +ip6_input(struct pbuf *p, struct netif *inp) +{ + struct ip6_hdr *ip6hdr; + struct netif *netif; + u8_t nexth; + u16_t hlen; /* the current header length */ + u8_t i; +#if 0 /*IP_ACCEPT_LINK_LAYER_ADDRESSING*/ + @todo + int check_ip_src=1; +#endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ + + IP6_STATS_INC(ip6.recv); + + /* identify the IP header */ + ip6hdr = (struct ip6_hdr *)p->payload; + if (IP6H_V(ip6hdr) != 6) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IPv6 packet dropped due to bad version number %"U32_F"\n", + IP6H_V(ip6hdr))); + pbuf_free(p); + IP6_STATS_INC(ip6.err); + IP6_STATS_INC(ip6.drop); + return ERR_OK; + } + +#ifdef LWIP_HOOK_IP6_INPUT + if (LWIP_HOOK_IP6_INPUT(p, inp)) { + /* the packet has been eaten */ + return ERR_OK; + } +#endif + + /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ + if ((IP6_HLEN > p->len) || ((IP6H_PLEN(ip6hdr) + IP6_HLEN) > p->tot_len)) { + if (IP6_HLEN > p->len) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IPv6 header (len %"U16_F") does not fit in first pbuf (len %"U16_F"), IP packet dropped.\n", + (u16_t)IP6_HLEN, p->len)); + } + if ((IP6H_PLEN(ip6hdr) + IP6_HLEN) > p->tot_len) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IPv6 (plen %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", + (u16_t)(IP6H_PLEN(ip6hdr) + IP6_HLEN), p->tot_len)); + } + /* free (drop) packet pbufs */ + pbuf_free(p); + IP6_STATS_INC(ip6.lenerr); + IP6_STATS_INC(ip6.drop); + return ERR_OK; + } + + /* Trim pbuf. This should have been done at the netif layer, + * but we'll do it anyway just to be sure that its done. */ + pbuf_realloc(p, IP6_HLEN + IP6H_PLEN(ip6hdr)); + + /* copy IP addresses to aligned ip6_addr_t */ + ip_addr_copy_from_ip6(ip_data.current_iphdr_dest, ip6hdr->dest); + ip_addr_copy_from_ip6(ip_data.current_iphdr_src, ip6hdr->src); + + /* Don't accept virtual IPv4 mapped IPv6 addresses. + * Don't accept multicast source addresses. */ + if (ip6_addr_isipv4mappedipv6(ip_2_ip6(&ip_data.current_iphdr_dest)) || + ip6_addr_isipv4mappedipv6(ip_2_ip6(&ip_data.current_iphdr_src)) || + ip6_addr_ismulticast(ip_2_ip6(&ip_data.current_iphdr_src))) { + IP6_STATS_INC(ip6.err); + IP6_STATS_INC(ip6.drop); + return ERR_OK; + } + + /* current header pointer. */ + ip_data.current_ip6_header = ip6hdr; + + /* In netif, used in case we need to send ICMPv6 packets back. */ + ip_data.current_netif = inp; + ip_data.current_input_netif = inp; + + /* match packet against an interface, i.e. is this packet for us? */ + if (ip6_addr_ismulticast(ip6_current_dest_addr())) { + /* Always joined to multicast if-local and link-local all-nodes group. */ + if (ip6_addr_isallnodes_iflocal(ip6_current_dest_addr()) || + ip6_addr_isallnodes_linklocal(ip6_current_dest_addr())) { + netif = inp; + } +#if LWIP_IPV6_MLD + else if (mld6_lookfor_group(inp, ip6_current_dest_addr())) { + netif = inp; + } +#else /* LWIP_IPV6_MLD */ + else if (ip6_addr_issolicitednode(ip6_current_dest_addr())) { + /* Filter solicited node packets when MLD is not enabled + * (for Neighbor discovery). */ + netif = NULL; + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(inp, i)) && + ip6_addr_cmp_solicitednode(ip6_current_dest_addr(), netif_ip6_addr(inp, i))) { + netif = inp; + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: solicited node packet accepted on interface %c%c\n", + netif->name[0], netif->name[1])); + break; + } + } + } +#endif /* LWIP_IPV6_MLD */ + else { + netif = NULL; + } + } else { + /* start trying with inp. if that's not acceptable, start walking the + list of configured netifs. + 'first' is used as a boolean to mark whether we started walking the list */ + int first = 1; + netif = inp; + do { + /* interface is up? */ + if (netif_is_up(netif)) { + /* unicast to this interface address? address configured? */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_cmp(ip6_current_dest_addr(), netif_ip6_addr(netif, i))) { + /* exit outer loop */ + goto netif_found; + } + } + } + if (first) { + if (ip6_addr_islinklocal(ip6_current_dest_addr()) +#if !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF + || ip6_addr_isloopback(ip6_current_dest_addr()) +#endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ + ) { + /* Do not match link-local addresses to other netifs. The loopback + * address is to be considered link-local and packets to it should be + * dropped on other interfaces, as per RFC 4291 Sec. 2.5.3. This + * requirement cannot be implemented in the case that loopback + * traffic is sent across a non-loopback interface, however. + */ + netif = NULL; + break; + } + first = 0; + netif = netif_list; + } else { + netif = netif->next; + } + if (netif == inp) { + netif = netif->next; + } + } while (netif != NULL); +netif_found: + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet accepted on interface %c%c\n", + netif ? netif->name[0] : 'X', netif? netif->name[1] : 'X')); + } + + /* "::" packet source address? (used in duplicate address detection) */ + if (ip6_addr_isany(ip6_current_src_addr()) && + (!ip6_addr_issolicitednode(ip6_current_dest_addr()))) { + /* packet source is not valid */ + /* free (drop) packet pbufs */ + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with src ANY_ADDRESS dropped\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + } + + /* packet not for us? */ + if (netif == NULL) { + /* packet not for us, route or discard */ + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_TRACE, ("ip6_input: packet not for us.\n")); +#if LWIP_IPV6_FORWARD + /* non-multicast packet? */ + if (!ip6_addr_ismulticast(ip6_current_dest_addr())) { + /* try to forward IP packet on (other) interfaces */ + ip6_forward(p, ip6hdr, inp); + } +#endif /* LWIP_IPV6_FORWARD */ + pbuf_free(p); + goto ip6_input_cleanup; + } + + /* current netif pointer. */ + ip_data.current_netif = netif; + + /* Save next header type. */ + nexth = IP6H_NEXTH(ip6hdr); + + /* Init header length. */ + hlen = ip_data.current_ip_header_tot_len = IP6_HLEN; + + /* Move to payload. */ + pbuf_header(p, -IP6_HLEN); + + /* Process known option extension headers, if present. */ + while (nexth != IP6_NEXTH_NONE) + { + switch (nexth) { + case IP6_NEXTH_HOPBYHOP: + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Hop-by-Hop options header\n")); + /* Get next header type. */ + nexth = *((u8_t *)p->payload); + + /* Get the header length. */ + hlen = 8 * (1 + *((u8_t *)p->payload + 1)); + ip_data.current_ip_header_tot_len += hlen; + + /* Skip over this header. */ + if (hlen > p->len) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", + hlen, p->len)); + /* free (drop) packet pbufs */ + pbuf_free(p); + IP6_STATS_INC(ip6.lenerr); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + } + + pbuf_header(p, -(s16_t)hlen); + break; + case IP6_NEXTH_DESTOPTS: + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Destination options header\n")); + /* Get next header type. */ + nexth = *((u8_t *)p->payload); + + /* Get the header length. */ + hlen = 8 * (1 + *((u8_t *)p->payload + 1)); + ip_data.current_ip_header_tot_len += hlen; + + /* Skip over this header. */ + if (hlen > p->len) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", + hlen, p->len)); + /* free (drop) packet pbufs */ + pbuf_free(p); + IP6_STATS_INC(ip6.lenerr); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + } + + pbuf_header(p, -(s16_t)hlen); + break; + case IP6_NEXTH_ROUTING: + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Routing header\n")); + /* Get next header type. */ + nexth = *((u8_t *)p->payload); + + /* Get the header length. */ + hlen = 8 * (1 + *((u8_t *)p->payload + 1)); + ip_data.current_ip_header_tot_len += hlen; + + /* Skip over this header. */ + if (hlen > p->len) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", + hlen, p->len)); + /* free (drop) packet pbufs */ + pbuf_free(p); + IP6_STATS_INC(ip6.lenerr); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; + } + + pbuf_header(p, -(s16_t)hlen); + break; + + case IP6_NEXTH_FRAGMENT: + { + struct ip6_frag_hdr *frag_hdr; + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Fragment header\n")); + + frag_hdr = (struct ip6_frag_hdr *)p->payload; + + /* Get next header type. */ + nexth = frag_hdr->_nexth; + + /* Fragment Header length. */ + hlen = 8; + ip_data.current_ip_header_tot_len += hlen; + + /* Make sure this header fits in current pbuf. */ + if (hlen > p->len) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("IPv6 options header (hlen %"U16_F") does not fit in first pbuf (len %"U16_F"), IPv6 packet dropped.\n", + hlen, p->len)); + /* free (drop) packet pbufs */ + pbuf_free(p); + IP6_FRAG_STATS_INC(ip6_frag.lenerr); + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto ip6_input_cleanup; + } + + /* Offset == 0 and more_fragments == 0? */ + if ((frag_hdr->_fragment_offset & + PP_HTONS(IP6_FRAG_OFFSET_MASK | IP6_FRAG_MORE_FLAG)) == 0) { + /* This is a 1-fragment packet, usually a packet that we have + * already reassembled. Skip this header anc continue. */ + pbuf_header(p, -(s16_t)hlen); + } else { +#if LWIP_IPV6_REASS + + /* reassemble the packet */ + p = ip6_reass(p); + /* packet not fully reassembled yet? */ + if (p == NULL) { + goto ip6_input_cleanup; + } + + /* Returned p point to IPv6 header. + * Update all our variables and pointers and continue. */ + ip6hdr = (struct ip6_hdr *)p->payload; + nexth = IP6H_NEXTH(ip6hdr); + hlen = ip_data.current_ip_header_tot_len = IP6_HLEN; + pbuf_header(p, -IP6_HLEN); + +#else /* LWIP_IPV6_REASS */ + /* free (drop) packet pbufs */ + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Fragment header dropped (with LWIP_IPV6_REASS==0)\n")); + pbuf_free(p); + IP6_STATS_INC(ip6.opterr); + IP6_STATS_INC(ip6.drop); + goto ip6_input_cleanup; +#endif /* LWIP_IPV6_REASS */ + } + break; + } + default: + goto options_done; + break; + } + } +options_done: + + /* p points to IPv6 header again. */ + pbuf_header_force(p, (s16_t)ip_data.current_ip_header_tot_len); + + /* send to upper layers */ + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: \n")); + ip6_debug_print(p); + LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); + +#if LWIP_RAW + /* raw input did not eat the packet? */ + if (raw_input(p, inp) == 0) +#endif /* LWIP_RAW */ + { + switch (nexth) { + case IP6_NEXTH_NONE: + pbuf_free(p); + break; +#if LWIP_UDP + case IP6_NEXTH_UDP: +#if LWIP_UDPLITE + case IP6_NEXTH_UDPLITE: +#endif /* LWIP_UDPLITE */ + /* Point to payload. */ + pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); + udp_input(p, inp); + break; +#endif /* LWIP_UDP */ +#if LWIP_TCP + case IP6_NEXTH_TCP: + /* Point to payload. */ + pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); + tcp_input(p, inp); + break; +#endif /* LWIP_TCP */ +#if LWIP_ICMP6 + case IP6_NEXTH_ICMP6: + /* Point to payload. */ + pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); + icmp6_input(p, inp); + break; +#endif /* LWIP_ICMP */ + default: +#if LWIP_ICMP6 + /* send ICMP parameter problem unless it was a multicast or ICMPv6 */ + if ((!ip6_addr_ismulticast(ip6_current_dest_addr())) && + (IP6H_NEXTH(ip6hdr) != IP6_NEXTH_ICMP6)) { + icmp6_param_problem(p, ICMP6_PP_HEADER, ip_data.current_ip_header_tot_len - hlen); + } +#endif /* LWIP_ICMP */ + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_input: Unsupported transport protocol %"U16_F"\n", (u16_t)IP6H_NEXTH(ip6hdr))); + pbuf_free(p); + IP6_STATS_INC(ip6.proterr); + IP6_STATS_INC(ip6.drop); + break; + } + } + +ip6_input_cleanup: + ip_data.current_netif = NULL; + ip_data.current_input_netif = NULL; + ip_data.current_ip6_header = NULL; + ip_data.current_ip_header_tot_len = 0; + ip6_addr_set_zero(ip6_current_src_addr()); + ip6_addr_set_zero(ip6_current_dest_addr()); + + return ERR_OK; +} + + +/** + * Sends an IPv6 packet on a network interface. This function constructs + * the IPv6 header. If the source IPv6 address is NULL, the IPv6 "ANY" address is + * used as source (usually during network startup). If the source IPv6 address it + * IP6_ADDR_ANY, the most appropriate IPv6 address of the outgoing network + * interface is filled in as source address. If the destination IPv6 address is + * LWIP_IP_HDRINCL, p is assumed to already include an IPv6 header and + * p->payload points to it instead of the data. + * + * @param p the packet to send (p->payload points to the data, e.g. next + protocol header; if dest == LWIP_IP_HDRINCL, p already includes an + IPv6 header and p->payload points to that IPv6 header) + * @param src the source IPv6 address to send from (if src == IP6_ADDR_ANY, an + * IP address of the netif is selected and used as source address. + * if src == NULL, IP6_ADDR_ANY is used as source) + * @param dest the destination IPv6 address to send the packet to + * @param hl the Hop Limit value to be set in the IPv6 header + * @param tc the Traffic Class value to be set in the IPv6 header + * @param nexth the Next Header to be set in the IPv6 header + * @param netif the netif on which to send this packet + * @return ERR_OK if the packet was sent OK + * ERR_BUF if p doesn't have enough space for IPv6/LINK headers + * returns errors returned by netif->output + */ +err_t +ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, + u8_t nexth, struct netif *netif) +{ + const ip6_addr_t *src_used = src; + if (dest != LWIP_IP_HDRINCL) { + if (src != NULL && ip6_addr_isany(src)) { + src_used = ip_2_ip6(ip6_select_source_address(netif, dest)); + if ((src_used == NULL) || ip6_addr_isany(src_used)) { + /* No appropriate source address was found for this packet. */ + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_output: No suitable source address for packet.\n")); + IP6_STATS_INC(ip6.rterr); + return ERR_RTE; + } + } + } + return ip6_output_if_src(p, src_used, dest, hl, tc, nexth, netif); +} + +/** + * Same as ip6_output_if() but 'src' address is not replaced by netif address + * when it is 'any'. + */ +err_t +ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, + u8_t nexth, struct netif *netif) +{ + struct ip6_hdr *ip6hdr; + ip6_addr_t dest_addr; + + LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); + + /* Should the IPv6 header be generated or is it already included in p? */ + if (dest != LWIP_IP_HDRINCL) { + /* generate IPv6 header */ + if (pbuf_header(p, IP6_HLEN)) { + LWIP_DEBUGF(IP6_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip6_output: not enough room for IPv6 header in pbuf\n")); + IP6_STATS_INC(ip6.err); + return ERR_BUF; + } + + ip6hdr = (struct ip6_hdr *)p->payload; + LWIP_ASSERT("check that first pbuf can hold struct ip6_hdr", + (p->len >= sizeof(struct ip6_hdr))); + + IP6H_HOPLIM_SET(ip6hdr, hl); + IP6H_NEXTH_SET(ip6hdr, nexth); + + /* dest cannot be NULL here */ + ip6_addr_copy(ip6hdr->dest, *dest); + + IP6H_VTCFL_SET(ip6hdr, 6, tc, 0); + IP6H_PLEN_SET(ip6hdr, p->tot_len - IP6_HLEN); + + if (src == NULL) { + src = IP6_ADDR_ANY6; + } + /* src cannot be NULL here */ + ip6_addr_copy(ip6hdr->src, *src); + + } else { + /* IP header already included in p */ + ip6hdr = (struct ip6_hdr *)p->payload; + ip6_addr_copy(dest_addr, ip6hdr->dest); + dest = &dest_addr; + } + + IP6_STATS_INC(ip6.xmit); + + LWIP_DEBUGF(IP6_DEBUG, ("ip6_output_if: %c%c%"U16_F"\n", netif->name[0], netif->name[1], (u16_t)netif->num)); + ip6_debug_print(p); + +#if ENABLE_LOOPBACK + { + int i; +#if !LWIP_HAVE_LOOPIF + if (ip6_addr_isloopback(dest)) { + return netif_loop_output(netif, p); + } +#endif /* !LWIP_HAVE_LOOPIF */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_cmp(dest, netif_ip6_addr(netif, i))) { + /* Packet to self, enqueue it for loopback */ + LWIP_DEBUGF(IP6_DEBUG, ("netif_loop_output()\n")); + return netif_loop_output(netif, p); + } + } + } +#endif /* ENABLE_LOOPBACK */ +#if LWIP_IPV6_FRAG + /* don't fragment if interface has mtu set to 0 [loopif] */ + if (netif->mtu && (p->tot_len > nd6_get_destination_mtu(dest, netif))) { + return ip6_frag(p, netif, dest); + } +#endif /* LWIP_IPV6_FRAG */ + + LWIP_DEBUGF(IP6_DEBUG, ("netif->output_ip6()\n")); + return netif->output_ip6(netif, p, dest); +} + +/** + * Simple interface to ip6_output_if. It finds the outgoing network + * interface and calls upon ip6_output_if to do the actual work. + * + * @param p the packet to send (p->payload points to the data, e.g. next + protocol header; if dest == LWIP_IP_HDRINCL, p already includes an + IPv6 header and p->payload points to that IPv6 header) + * @param src the source IPv6 address to send from (if src == IP6_ADDR_ANY, an + * IP address of the netif is selected and used as source address. + * if src == NULL, IP6_ADDR_ANY is used as source) + * @param dest the destination IPv6 address to send the packet to + * @param hl the Hop Limit value to be set in the IPv6 header + * @param tc the Traffic Class value to be set in the IPv6 header + * @param nexth the Next Header to be set in the IPv6 header + * + * @return ERR_RTE if no route is found + * see ip_output_if() for more return values + */ +err_t +ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, u8_t nexth) +{ + struct netif *netif; + struct ip6_hdr *ip6hdr; + ip6_addr_t src_addr, dest_addr; + + LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); + + if (dest != LWIP_IP_HDRINCL) { + netif = ip6_route(src, dest); + } else { + /* IP header included in p, read addresses. */ + ip6hdr = (struct ip6_hdr *)p->payload; + ip6_addr_copy(src_addr, ip6hdr->src); + ip6_addr_copy(dest_addr, ip6hdr->dest); + netif = ip6_route(&src_addr, &dest_addr); + } + + if (netif == NULL) { + LWIP_DEBUGF(IP6_DEBUG, ("ip6_output: no route for %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", + IP6_ADDR_BLOCK1(dest), + IP6_ADDR_BLOCK2(dest), + IP6_ADDR_BLOCK3(dest), + IP6_ADDR_BLOCK4(dest), + IP6_ADDR_BLOCK5(dest), + IP6_ADDR_BLOCK6(dest), + IP6_ADDR_BLOCK7(dest), + IP6_ADDR_BLOCK8(dest))); + IP6_STATS_INC(ip6.rterr); + return ERR_RTE; + } + + return ip6_output_if(p, src, dest, hl, tc, nexth, netif); +} + + +#if LWIP_NETIF_HWADDRHINT +/** Like ip6_output, but takes and addr_hint pointer that is passed on to netif->addr_hint + * before calling ip6_output_if. + * + * @param p the packet to send (p->payload points to the data, e.g. next + protocol header; if dest == LWIP_IP_HDRINCL, p already includes an + IPv6 header and p->payload points to that IPv6 header) + * @param src the source IPv6 address to send from (if src == IP6_ADDR_ANY, an + * IP address of the netif is selected and used as source address. + * if src == NULL, IP6_ADDR_ANY is used as source) + * @param dest the destination IPv6 address to send the packet to + * @param hl the Hop Limit value to be set in the IPv6 header + * @param tc the Traffic Class value to be set in the IPv6 header + * @param nexth the Next Header to be set in the IPv6 header + * @param addr_hint address hint pointer set to netif->addr_hint before + * calling ip_output_if() + * + * @return ERR_RTE if no route is found + * see ip_output_if() for more return values + */ +err_t +ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, u8_t nexth, u8_t *addr_hint) +{ + struct netif *netif; + struct ip6_hdr *ip6hdr; + ip6_addr_t src_addr, dest_addr; + err_t err; + + LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); + + if (dest != LWIP_IP_HDRINCL) { + netif = ip6_route(src, dest); + } else { + /* IP header included in p, read addresses. */ + ip6hdr = (struct ip6_hdr *)p->payload; + ip6_addr_copy(src_addr, ip6hdr->src); + ip6_addr_copy(dest_addr, ip6hdr->dest); + netif = ip6_route(&src_addr, &dest_addr); + } + + if (netif == NULL) { + LWIP_DEBUGF(IP6_DEBUG, ("ip6_output: no route for %"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F"\n", + IP6_ADDR_BLOCK1(dest), + IP6_ADDR_BLOCK2(dest), + IP6_ADDR_BLOCK3(dest), + IP6_ADDR_BLOCK4(dest), + IP6_ADDR_BLOCK5(dest), + IP6_ADDR_BLOCK6(dest), + IP6_ADDR_BLOCK7(dest), + IP6_ADDR_BLOCK8(dest))); + IP6_STATS_INC(ip6.rterr); + return ERR_RTE; + } + + NETIF_SET_HWADDRHINT(netif, addr_hint); + err = ip6_output_if(p, src, dest, hl, tc, nexth, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + + return err; +} +#endif /* LWIP_NETIF_HWADDRHINT*/ + +#if LWIP_IPV6_MLD +/** + * Add a hop-by-hop options header with a router alert option and padding. + * + * Used by MLD when sending a Multicast listener report/done message. + * + * @param p the packet to which we will prepend the options header + * @param nexth the next header protocol number (e.g. IP6_NEXTH_ICMP6) + * @param value the value of the router alert option data (e.g. IP6_ROUTER_ALERT_VALUE_MLD) + * @return ERR_OK if hop-by-hop header was added, ERR_* otherwise + */ +err_t +ip6_options_add_hbh_ra(struct pbuf *p, u8_t nexth, u8_t value) +{ + struct ip6_hbh_hdr *hbh_hdr; + + /* Move pointer to make room for hop-by-hop options header. */ + if (pbuf_header(p, sizeof(struct ip6_hbh_hdr))) { + LWIP_DEBUGF(IP6_DEBUG, ("ip6_options: no space for options header\n")); + IP6_STATS_INC(ip6.err); + return ERR_BUF; + } + + hbh_hdr = (struct ip6_hbh_hdr *)p->payload; + + /* Set fields. */ + hbh_hdr->_nexth = nexth; + hbh_hdr->_hlen = 0; + hbh_hdr->_ra_opt_type = IP6_ROUTER_ALERT_OPTION; + hbh_hdr->_ra_opt_dlen = 2; + hbh_hdr->_ra_opt_data = value; + hbh_hdr->_padn_opt_type = IP6_PADN_ALERT_OPTION; + hbh_hdr->_padn_opt_dlen = 0; + + return ERR_OK; +} +#endif /* LWIP_IPV6_MLD */ + +#if IP6_DEBUG +/* Print an IPv6 header by using LWIP_DEBUGF + * @param p an IPv6 packet, p->payload pointing to the IPv6 header + */ +void +ip6_debug_print(struct pbuf *p) +{ + struct ip6_hdr *ip6hdr = (struct ip6_hdr *)p->payload; + + LWIP_DEBUGF(IP6_DEBUG, ("IPv6 header:\n")); + LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP6_DEBUG, ("| %2"U16_F" | %3"U16_F" | %7"U32_F" | (ver, class, flow)\n", + IP6H_V(ip6hdr), + IP6H_TC(ip6hdr), + IP6H_FL(ip6hdr))); + LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP6_DEBUG, ("| %5"U16_F" | %3"U16_F" | %3"U16_F" | (plen, nexth, hopl)\n", + IP6H_PLEN(ip6hdr), + IP6H_NEXTH(ip6hdr), + IP6H_HOPLIM(ip6hdr))); + LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" | (src)\n", + IP6_ADDR_BLOCK1(&(ip6hdr->src)), + IP6_ADDR_BLOCK2(&(ip6hdr->src)), + IP6_ADDR_BLOCK3(&(ip6hdr->src)), + IP6_ADDR_BLOCK4(&(ip6hdr->src)))); + LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" |\n", + IP6_ADDR_BLOCK5(&(ip6hdr->src)), + IP6_ADDR_BLOCK6(&(ip6hdr->src)), + IP6_ADDR_BLOCK7(&(ip6hdr->src)), + IP6_ADDR_BLOCK8(&(ip6hdr->src)))); + LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" | (dest)\n", + IP6_ADDR_BLOCK1(&(ip6hdr->dest)), + IP6_ADDR_BLOCK2(&(ip6hdr->dest)), + IP6_ADDR_BLOCK3(&(ip6hdr->dest)), + IP6_ADDR_BLOCK4(&(ip6hdr->dest)))); + LWIP_DEBUGF(IP6_DEBUG, ("| %4"X32_F" | %4"X32_F" | %4"X32_F" | %4"X32_F" |\n", + IP6_ADDR_BLOCK5(&(ip6hdr->dest)), + IP6_ADDR_BLOCK6(&(ip6hdr->dest)), + IP6_ADDR_BLOCK7(&(ip6hdr->dest)), + IP6_ADDR_BLOCK8(&(ip6hdr->dest)))); + LWIP_DEBUGF(IP6_DEBUG, ("+-------------------------------+\n")); +} +#endif /* IP6_DEBUG */ + +#endif /* LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.c index aa06659..2c685b2 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_addr.c @@ -1,292 +1,292 @@ -/** - * @file - * - * IPv6 addresses. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * Functions for handling IPv6 addresses. - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/ip_addr.h" -#include "lwip/def.h" - -/* used by IP6_ADDR_ANY(6) in ip6_addr.h */ -const ip_addr_t ip6_addr_any = IPADDR6_INIT(0ul, 0ul, 0ul, 0ul); - -#ifndef isprint -#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up) -#define isprint(c) in_range(c, 0x20, 0x7f) -#define isdigit(c) in_range(c, '0', '9') -#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F')) -#define islower(c) in_range(c, 'a', 'z') -#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') -#define xchar(i) ((i) < 10 ? '0' + (i) : 'A' + (i) - 10) -#endif - -/** - * Check whether "cp" is a valid ascii representation - * of an IPv6 address and convert to a binary address. - * Returns 1 if the address is valid, 0 if not. - * - * @param cp IPv6 address in ascii representation (e.g. "FF01::1") - * @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 -ip6addr_aton(const char *cp, ip6_addr_t *addr) -{ - u32_t addr_index, zero_blocks, current_block_index, current_block_value; - const char *s; - - /* Count the number of colons, to count the number of blocks in a "::" sequence - zero_blocks may be 1 even if there are no :: sequences */ - zero_blocks = 8; - for (s = cp; *s != 0; s++) { - if (*s == ':') { - zero_blocks--; - } else if (!isxdigit(*s)) { - break; - } - } - - /* parse each block */ - addr_index = 0; - current_block_index = 0; - current_block_value = 0; - for (s = cp; *s != 0; s++) { - if (*s == ':') { - if (addr) { - if (current_block_index & 0x1) { - addr->addr[addr_index++] |= current_block_value; - } - else { - addr->addr[addr_index] = current_block_value << 16; - } - } - current_block_index++; - current_block_value = 0; - if (current_block_index > 7) { - /* address too long! */ - return 0; - } - if (s[1] == ':') { - if (s[2] == ':') { - /* invalid format: three successive colons */ - return 0; - } - s++; - /* "::" found, set zeros */ - while (zero_blocks > 0) { - zero_blocks--; - if (current_block_index & 0x1) { - addr_index++; - } else { - if (addr) { - addr->addr[addr_index] = 0; - } - } - current_block_index++; - if (current_block_index > 7) { - /* address too long! */ - return 0; - } - } - } - } else if (isxdigit(*s)) { - /* add current digit */ - current_block_value = (current_block_value << 4) + - (isdigit(*s) ? (u32_t)(*s - '0') : - (u32_t)(10 + (islower(*s) ? *s - 'a' : *s - 'A'))); - } else { - /* unexpected digit, space? CRLF? */ - break; - } - } - - if (addr) { - if (current_block_index & 0x1) { - addr->addr[addr_index++] |= current_block_value; - } - else { - addr->addr[addr_index] = current_block_value << 16; - } - } - - /* convert to network byte order. */ - if (addr) { - for (addr_index = 0; addr_index < 4; addr_index++) { - addr->addr[addr_index] = lwip_htonl(addr->addr[addr_index]); - } - } - - if (current_block_index != 7) { - return 0; - } - - return 1; -} - -/** - * Convert numeric IPv6 address into ASCII representation. - * returns ptr to static buffer; not reentrant! - * - * @param addr ip6 address in network order to convert - * @return pointer to a global static (!) buffer that holds the ASCII - * representation of addr - */ -char * -ip6addr_ntoa(const ip6_addr_t *addr) -{ - static char str[40]; - return ip6addr_ntoa_r(addr, str, 40); -} - -/** - * Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used. - * - * @param addr ip6 address in network order to convert - * @param buf target buffer where the string is stored - * @param buflen length of buf - * @return either pointer to buf which now holds the ASCII - * representation of addr or NULL if buf was too small - */ -char * -ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) -{ - u32_t current_block_index, current_block_value, next_block_value; - s32_t i; - u8_t zero_flag, empty_block_flag; - - i = 0; - empty_block_flag = 0; /* used to indicate a zero chain for "::' */ - - for (current_block_index = 0; current_block_index < 8; current_block_index++) { - /* get the current 16-bit block */ - current_block_value = lwip_htonl(addr->addr[current_block_index >> 1]); - if ((current_block_index & 0x1) == 0) { - current_block_value = current_block_value >> 16; - } - current_block_value &= 0xffff; - - /* Check for empty block. */ - if (current_block_value == 0) { - if (current_block_index == 7 && empty_block_flag == 1) { - /* special case, we must render a ':' for the last block. */ - buf[i++] = ':'; - if (i >= buflen) { - return NULL; - } - break; - } - if (empty_block_flag == 0) { - /* generate empty block "::", but only if more than one contiguous zero block, - * according to current formatting suggestions RFC 5952. */ - next_block_value = lwip_htonl(addr->addr[(current_block_index + 1) >> 1]); - if ((current_block_index & 0x1) == 0x01) { - next_block_value = next_block_value >> 16; - } - next_block_value &= 0xffff; - if (next_block_value == 0) { - empty_block_flag = 1; - buf[i++] = ':'; - if (i >= buflen) { - return NULL; - } - continue; /* move on to next block. */ - } - } else if (empty_block_flag == 1) { - /* move on to next block. */ - continue; - } - } else if (empty_block_flag == 1) { - /* Set this flag value so we don't produce multiple empty blocks. */ - empty_block_flag = 2; - } - - if (current_block_index > 0) { - buf[i++] = ':'; - if (i >= buflen) { - return NULL; - } - } - - if ((current_block_value & 0xf000) == 0) { - zero_flag = 1; - } else { - buf[i++] = xchar(((current_block_value & 0xf000) >> 12)); - zero_flag = 0; - if (i >= buflen) { - return NULL; - } - } - - if (((current_block_value & 0xf00) == 0) && (zero_flag)) { - /* do nothing */ - } else { - buf[i++] = xchar(((current_block_value & 0xf00) >> 8)); - zero_flag = 0; - if (i >= buflen) { - return NULL; - } - } - - if (((current_block_value & 0xf0) == 0) && (zero_flag)) { - /* do nothing */ - } - else { - buf[i++] = xchar(((current_block_value & 0xf0) >> 4)); - zero_flag = 0; - if (i >= buflen) { - return NULL; - } - } - - buf[i++] = xchar((current_block_value & 0xf)); - if (i >= buflen) { - return NULL; - } - } - - buf[i] = 0; - - return buf; -} - -#endif /* LWIP_IPV6 */ +/** + * @file + * + * IPv6 addresses. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * Functions for handling IPv6 addresses. + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/ip_addr.h" +#include "lwip/def.h" + +/* used by IP6_ADDR_ANY(6) in ip6_addr.h */ +const ip_addr_t ip6_addr_any = IPADDR6_INIT(0ul, 0ul, 0ul, 0ul); + +#ifndef isprint +#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up) +#define isprint(c) in_range(c, 0x20, 0x7f) +#define isdigit(c) in_range(c, '0', '9') +#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F')) +#define islower(c) in_range(c, 'a', 'z') +#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') +#define xchar(i) ((i) < 10 ? '0' + (i) : 'A' + (i) - 10) +#endif + +/** + * Check whether "cp" is a valid ascii representation + * of an IPv6 address and convert to a binary address. + * Returns 1 if the address is valid, 0 if not. + * + * @param cp IPv6 address in ascii representation (e.g. "FF01::1") + * @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 +ip6addr_aton(const char *cp, ip6_addr_t *addr) +{ + u32_t addr_index, zero_blocks, current_block_index, current_block_value; + const char *s; + + /* Count the number of colons, to count the number of blocks in a "::" sequence + zero_blocks may be 1 even if there are no :: sequences */ + zero_blocks = 8; + for (s = cp; *s != 0; s++) { + if (*s == ':') { + zero_blocks--; + } else if (!isxdigit(*s)) { + break; + } + } + + /* parse each block */ + addr_index = 0; + current_block_index = 0; + current_block_value = 0; + for (s = cp; *s != 0; s++) { + if (*s == ':') { + if (addr) { + if (current_block_index & 0x1) { + addr->addr[addr_index++] |= current_block_value; + } + else { + addr->addr[addr_index] = current_block_value << 16; + } + } + current_block_index++; + current_block_value = 0; + if (current_block_index > 7) { + /* address too long! */ + return 0; + } + if (s[1] == ':') { + if (s[2] == ':') { + /* invalid format: three successive colons */ + return 0; + } + s++; + /* "::" found, set zeros */ + while (zero_blocks > 0) { + zero_blocks--; + if (current_block_index & 0x1) { + addr_index++; + } else { + if (addr) { + addr->addr[addr_index] = 0; + } + } + current_block_index++; + if (current_block_index > 7) { + /* address too long! */ + return 0; + } + } + } + } else if (isxdigit(*s)) { + /* add current digit */ + current_block_value = (current_block_value << 4) + + (isdigit(*s) ? (u32_t)(*s - '0') : + (u32_t)(10 + (islower(*s) ? *s - 'a' : *s - 'A'))); + } else { + /* unexpected digit, space? CRLF? */ + break; + } + } + + if (addr) { + if (current_block_index & 0x1) { + addr->addr[addr_index++] |= current_block_value; + } + else { + addr->addr[addr_index] = current_block_value << 16; + } + } + + /* convert to network byte order. */ + if (addr) { + for (addr_index = 0; addr_index < 4; addr_index++) { + addr->addr[addr_index] = lwip_htonl(addr->addr[addr_index]); + } + } + + if (current_block_index != 7) { + return 0; + } + + return 1; +} + +/** + * Convert numeric IPv6 address into ASCII representation. + * returns ptr to static buffer; not reentrant! + * + * @param addr ip6 address in network order to convert + * @return pointer to a global static (!) buffer that holds the ASCII + * representation of addr + */ +char * +ip6addr_ntoa(const ip6_addr_t *addr) +{ + static char str[40]; + return ip6addr_ntoa_r(addr, str, 40); +} + +/** + * Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used. + * + * @param addr ip6 address in network order to convert + * @param buf target buffer where the string is stored + * @param buflen length of buf + * @return either pointer to buf which now holds the ASCII + * representation of addr or NULL if buf was too small + */ +char * +ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) +{ + u32_t current_block_index, current_block_value, next_block_value; + s32_t i; + u8_t zero_flag, empty_block_flag; + + i = 0; + empty_block_flag = 0; /* used to indicate a zero chain for "::' */ + + for (current_block_index = 0; current_block_index < 8; current_block_index++) { + /* get the current 16-bit block */ + current_block_value = lwip_htonl(addr->addr[current_block_index >> 1]); + if ((current_block_index & 0x1) == 0) { + current_block_value = current_block_value >> 16; + } + current_block_value &= 0xffff; + + /* Check for empty block. */ + if (current_block_value == 0) { + if (current_block_index == 7 && empty_block_flag == 1) { + /* special case, we must render a ':' for the last block. */ + buf[i++] = ':'; + if (i >= buflen) { + return NULL; + } + break; + } + if (empty_block_flag == 0) { + /* generate empty block "::", but only if more than one contiguous zero block, + * according to current formatting suggestions RFC 5952. */ + next_block_value = lwip_htonl(addr->addr[(current_block_index + 1) >> 1]); + if ((current_block_index & 0x1) == 0x01) { + next_block_value = next_block_value >> 16; + } + next_block_value &= 0xffff; + if (next_block_value == 0) { + empty_block_flag = 1; + buf[i++] = ':'; + if (i >= buflen) { + return NULL; + } + continue; /* move on to next block. */ + } + } else if (empty_block_flag == 1) { + /* move on to next block. */ + continue; + } + } else if (empty_block_flag == 1) { + /* Set this flag value so we don't produce multiple empty blocks. */ + empty_block_flag = 2; + } + + if (current_block_index > 0) { + buf[i++] = ':'; + if (i >= buflen) { + return NULL; + } + } + + if ((current_block_value & 0xf000) == 0) { + zero_flag = 1; + } else { + buf[i++] = xchar(((current_block_value & 0xf000) >> 12)); + zero_flag = 0; + if (i >= buflen) { + return NULL; + } + } + + if (((current_block_value & 0xf00) == 0) && (zero_flag)) { + /* do nothing */ + } else { + buf[i++] = xchar(((current_block_value & 0xf00) >> 8)); + zero_flag = 0; + if (i >= buflen) { + return NULL; + } + } + + if (((current_block_value & 0xf0) == 0) && (zero_flag)) { + /* do nothing */ + } + else { + buf[i++] = xchar(((current_block_value & 0xf0) >> 4)); + zero_flag = 0; + if (i >= buflen) { + return NULL; + } + } + + buf[i++] = xchar((current_block_value & 0xf)); + if (i >= buflen) { + return NULL; + } + } + + buf[i] = 0; + + return buf; +} + +#endif /* LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.c index ff07f71..e20f7cf 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/ip6_frag.c @@ -1,805 +1,805 @@ -/** - * @file - * - * IPv6 fragmentation and reassembly. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" -#include "lwip/ip6_frag.h" -#include "lwip/ip6.h" -#include "lwip/icmp6.h" -#include "lwip/nd6.h" -#include "lwip/ip.h" - -#include "lwip/pbuf.h" -#include "lwip/memp.h" -#include "lwip/stats.h" - -#include - -#if LWIP_IPV6 && LWIP_IPV6_REASS /* don't build if not configured for use in lwipopts.h */ - - -/** Setting this to 0, you can turn off checking the fragments for overlapping - * regions. The code gets a little smaller. Only use this if you know that - * overlapping won't occur on your network! */ -#ifndef IP_REASS_CHECK_OVERLAP -#define IP_REASS_CHECK_OVERLAP 1 -#endif /* IP_REASS_CHECK_OVERLAP */ - -/** Set to 0 to prevent freeing the oldest datagram when the reassembly buffer is - * full (IP_REASS_MAX_PBUFS pbufs are enqueued). The code gets a little smaller. - * Datagrams will be freed by timeout only. Especially useful when MEMP_NUM_REASSDATA - * is set to 1, so one datagram can be reassembled at a time, only. */ -#ifndef IP_REASS_FREE_OLDEST -#define IP_REASS_FREE_OLDEST 1 -#endif /* IP_REASS_FREE_OLDEST */ - -#if IPV6_FRAG_COPYHEADER -#define IPV6_FRAG_REQROOM ((s16_t)(sizeof(struct ip6_reass_helper) - IP6_FRAG_HLEN)) -#endif - -#define IP_REASS_FLAG_LASTFRAG 0x01 - -/** This is a helper struct which holds the starting - * offset and the ending offset of this fragment to - * easily chain the fragments. - * It has the same packing requirements as the IPv6 header, since it replaces - * the Fragment Header in memory in incoming fragments to keep - * track of the various fragments. - */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip6_reass_helper { - PACK_STRUCT_FIELD(struct pbuf *next_pbuf); - PACK_STRUCT_FIELD(u16_t start); - PACK_STRUCT_FIELD(u16_t end); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* static variables */ -static struct ip6_reassdata *reassdatagrams; -static u16_t ip6_reass_pbufcount; - -/* Forward declarations. */ -static void ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr); -#if IP_REASS_FREE_OLDEST -static void ip6_reass_remove_oldest_datagram(struct ip6_reassdata *ipr, int pbufs_needed); -#endif /* IP_REASS_FREE_OLDEST */ - -void -ip6_reass_tmr(void) -{ - struct ip6_reassdata *r, *tmp; - -#if !IPV6_FRAG_COPYHEADER - LWIP_ASSERT("sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN, set IPV6_FRAG_COPYHEADER to 1", - sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN); -#endif /* !IPV6_FRAG_COPYHEADER */ - - r = reassdatagrams; - while (r != NULL) { - /* Decrement the timer. Once it reaches 0, - * clean up the incomplete fragment assembly */ - if (r->timer > 0) { - r->timer--; - r = r->next; - } else { - /* reassembly timed out */ - tmp = r; - /* get the next pointer before freeing */ - r = r->next; - /* free the helper struct and all enqueued pbufs */ - ip6_reass_free_complete_datagram(tmp); - } - } -} - -/** - * Free a datagram (struct ip6_reassdata) and all its pbufs. - * Updates the total count of enqueued pbufs (ip6_reass_pbufcount), - * sends an ICMP time exceeded packet. - * - * @param ipr datagram to free - */ -static void -ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr) -{ - struct ip6_reassdata *prev; - u16_t pbufs_freed = 0; - u16_t clen; - struct pbuf *p; - struct ip6_reass_helper *iprh; - -#if LWIP_ICMP6 - iprh = (struct ip6_reass_helper *)ipr->p->payload; - if (iprh->start == 0) { - /* The first fragment was received, send ICMP time exceeded. */ - /* First, de-queue the first pbuf from r->p. */ - p = ipr->p; - ipr->p = iprh->next_pbuf; - /* Then, move back to the original ipv6 header (we are now pointing to Fragment header). - This cannot fail since we already checked when receiving this fragment. */ - if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)IPV6_FRAG_HDRREF(ipr->iphdr)))) { - LWIP_ASSERT("ip6_reass_free: moving p->payload to ip6 header failed\n", 0); - } - else { - icmp6_time_exceeded(p, ICMP6_TE_FRAG); - } - clen = pbuf_clen(p); - LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; - pbuf_free(p); - } -#endif /* LWIP_ICMP6 */ - - /* First, free all received pbufs. The individual pbufs need to be released - separately as they have not yet been chained */ - p = ipr->p; - while (p != NULL) { - struct pbuf *pcur; - iprh = (struct ip6_reass_helper *)p->payload; - pcur = p; - /* get the next pointer before freeing */ - p = iprh->next_pbuf; - clen = pbuf_clen(pcur); - LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); - pbufs_freed += clen; - pbuf_free(pcur); - } - - /* Then, unchain the struct ip6_reassdata from the list and free it. */ - if (ipr == reassdatagrams) { - reassdatagrams = ipr->next; - } else { - prev = reassdatagrams; - while (prev != NULL) { - if (prev->next == ipr) { - break; - } - prev = prev->next; - } - if (prev != NULL) { - prev->next = ipr->next; - } - } - memp_free(MEMP_IP6_REASSDATA, ipr); - - /* Finally, update number of pbufs in reassembly queue */ - LWIP_ASSERT("ip_reass_pbufcount >= clen", ip6_reass_pbufcount >= pbufs_freed); - ip6_reass_pbufcount -= pbufs_freed; -} - -#if IP_REASS_FREE_OLDEST -/** - * Free the oldest datagram to make room for enqueueing new fragments. - * The datagram ipr is not freed! - * - * @param ipr ip6_reassdata for the current fragment - * @param pbufs_needed number of pbufs needed to enqueue - * (used for freeing other datagrams if not enough space) - */ -static void -ip6_reass_remove_oldest_datagram(struct ip6_reassdata *ipr, int pbufs_needed) -{ - struct ip6_reassdata *r, *oldest; - - /* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs, - * but don't free the current datagram! */ - do { - r = oldest = reassdatagrams; - while (r != NULL) { - if (r != ipr) { - if (r->timer <= oldest->timer) { - /* older than the previous oldest */ - oldest = r; - } - } - r = r->next; - } - if (oldest == ipr) { - /* nothing to free, ipr is the only element on the list */ - return; - } - if (oldest != NULL) { - ip6_reass_free_complete_datagram(oldest); - } - } while (((ip6_reass_pbufcount + pbufs_needed) > IP_REASS_MAX_PBUFS) && (reassdatagrams != NULL)); -} -#endif /* IP_REASS_FREE_OLDEST */ - -/** - * Reassembles incoming IPv6 fragments into an IPv6 datagram. - * - * @param p points to the IPv6 Fragment Header - * @return NULL if reassembly is incomplete, pbuf pointing to - * IPv6 Header if reassembly is complete - */ -struct pbuf * -ip6_reass(struct pbuf *p) -{ - struct ip6_reassdata *ipr, *ipr_prev; - struct ip6_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; - struct ip6_frag_hdr *frag_hdr; - u16_t offset, len; - u16_t clen; - u8_t valid = 1; - struct pbuf *q; - - IP6_FRAG_STATS_INC(ip6_frag.recv); - - if ((const void*)ip6_current_header() != ((u8_t*)p->payload) - IP6_HLEN) { - /* ip6_frag_hdr must be in the first pbuf, not chained */ - IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; - } - - frag_hdr = (struct ip6_frag_hdr *) p->payload; - - clen = pbuf_clen(p); - - offset = lwip_ntohs(frag_hdr->_fragment_offset); - - /* Calculate fragment length from IPv6 payload length. - * Adjust for headers before Fragment Header. - * And finally adjust by Fragment Header length. */ - len = lwip_ntohs(ip6_current_header()->_plen); - len -= (u16_t)(((u8_t*)p->payload - (const u8_t*)ip6_current_header()) - IP6_HLEN); - len -= IP6_FRAG_HLEN; - - /* Look for the datagram the fragment belongs to in the current datagram queue, - * remembering the previous in the queue for later dequeueing. */ - for (ipr = reassdatagrams, ipr_prev = NULL; ipr != NULL; ipr = ipr->next) { - /* Check if the incoming fragment matches the one currently present - in the reassembly buffer. If so, we proceed with copying the - fragment into the buffer. */ - if ((frag_hdr->_identification == ipr->identification) && - ip6_addr_cmp(ip6_current_src_addr(), &(IPV6_FRAG_HDRREF(ipr->iphdr)->src)) && - ip6_addr_cmp(ip6_current_dest_addr(), &(IPV6_FRAG_HDRREF(ipr->iphdr)->dest))) { - IP6_FRAG_STATS_INC(ip6_frag.cachehit); - break; - } - ipr_prev = ipr; - } - - if (ipr == NULL) { - /* Enqueue a new datagram into the datagram queue */ - ipr = (struct ip6_reassdata *)memp_malloc(MEMP_IP6_REASSDATA); - if (ipr == NULL) { -#if IP_REASS_FREE_OLDEST - /* Make room and try again. */ - ip6_reass_remove_oldest_datagram(ipr, clen); - ipr = (struct ip6_reassdata *)memp_malloc(MEMP_IP6_REASSDATA); - if (ipr != NULL) { - /* re-search ipr_prev since it might have been removed */ - for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { - if (ipr_prev->next == ipr) { - break; - } - } - } else -#endif /* IP_REASS_FREE_OLDEST */ - { - IP6_FRAG_STATS_INC(ip6_frag.memerr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; - } - } - - memset(ipr, 0, sizeof(struct ip6_reassdata)); - ipr->timer = IP_REASS_MAXAGE; - - /* enqueue the new structure to the front of the list */ - ipr->next = reassdatagrams; - reassdatagrams = ipr; - - /* Use the current IPv6 header for src/dest address reference. - * Eventually, we will replace it when we get the first fragment - * (it might be this one, in any case, it is done later). */ -#if IPV6_FRAG_COPYHEADER - MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN); -#else /* IPV6_FRAG_COPYHEADER */ - /* need to use the none-const pointer here: */ - ipr->iphdr = ip_data.current_ip6_header; -#endif /* IPV6_FRAG_COPYHEADER */ - - /* copy the fragmented packet id. */ - ipr->identification = frag_hdr->_identification; - - /* copy the nexth field */ - ipr->nexth = frag_hdr->_nexth; - } - - /* Check if we are allowed to enqueue more datagrams. */ - if ((ip6_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { -#if IP_REASS_FREE_OLDEST - ip6_reass_remove_oldest_datagram(ipr, clen); - if ((ip6_reass_pbufcount + clen) <= IP_REASS_MAX_PBUFS) { - /* re-search ipr_prev since it might have been removed */ - for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { - if (ipr_prev->next == ipr) { - break; - } - } - } else -#endif /* IP_REASS_FREE_OLDEST */ - { - /* @todo: send ICMPv6 time exceeded here? */ - /* drop this pbuf */ - IP6_FRAG_STATS_INC(ip6_frag.memerr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; - } - } - - /* Overwrite Fragment Header with our own helper struct. */ -#if IPV6_FRAG_COPYHEADER - if (IPV6_FRAG_REQROOM > 0) { - /* Make room for struct ip6_reass_helper (only required if sizeof(void*) > 4). - This cannot fail since we already checked when receiving this fragment. */ - u8_t hdrerr = pbuf_header_force(p, IPV6_FRAG_REQROOM); - LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ - LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); - } -#else /* IPV6_FRAG_COPYHEADER */ - LWIP_ASSERT("sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN, set IPV6_FRAG_COPYHEADER to 1", - sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN); -#endif /* IPV6_FRAG_COPYHEADER */ - iprh = (struct ip6_reass_helper *)p->payload; - iprh->next_pbuf = NULL; - iprh->start = (offset & IP6_FRAG_OFFSET_MASK); - iprh->end = (offset & IP6_FRAG_OFFSET_MASK) + len; - - /* find the right place to insert this pbuf */ - /* Iterate through until we either get to the end of the list (append), - * or we find on with a larger offset (insert). */ - for (q = ipr->p; q != NULL;) { - iprh_tmp = (struct ip6_reass_helper*)q->payload; - if (iprh->start < iprh_tmp->start) { -#if IP_REASS_CHECK_OVERLAP - if (iprh->end > iprh_tmp->start) { - /* fragment overlaps with following, throw away */ - IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; - } - if (iprh_prev != NULL) { - if (iprh->start < iprh_prev->end) { - /* fragment overlaps with previous, throw away */ - IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; - } - } -#endif /* IP_REASS_CHECK_OVERLAP */ - /* the new pbuf should be inserted before this */ - iprh->next_pbuf = q; - if (iprh_prev != NULL) { - /* not the fragment with the lowest offset */ - iprh_prev->next_pbuf = p; - } else { - /* fragment with the lowest offset */ - ipr->p = p; - } - break; - } else if (iprh->start == iprh_tmp->start) { - /* received the same datagram twice: no need to keep the datagram */ - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; -#if IP_REASS_CHECK_OVERLAP - } else if (iprh->start < iprh_tmp->end) { - /* overlap: no need to keep the new datagram */ - IP6_FRAG_STATS_INC(ip6_frag.proterr); - IP6_FRAG_STATS_INC(ip6_frag.drop); - goto nullreturn; -#endif /* IP_REASS_CHECK_OVERLAP */ - } else { - /* Check if the fragments received so far have no gaps. */ - if (iprh_prev != NULL) { - if (iprh_prev->end != iprh_tmp->start) { - /* There is a fragment missing between the current - * and the previous fragment */ - valid = 0; - } - } - } - q = iprh_tmp->next_pbuf; - iprh_prev = iprh_tmp; - } - - /* If q is NULL, then we made it to the end of the list. Determine what to do now */ - if (q == NULL) { - if (iprh_prev != NULL) { - /* this is (for now), the fragment with the highest offset: - * chain it to the last fragment */ -#if IP_REASS_CHECK_OVERLAP - LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); -#endif /* IP_REASS_CHECK_OVERLAP */ - iprh_prev->next_pbuf = p; - if (iprh_prev->end != iprh->start) { - valid = 0; - } - } else { -#if IP_REASS_CHECK_OVERLAP - LWIP_ASSERT("no previous fragment, this must be the first fragment!", - ipr->p == NULL); -#endif /* IP_REASS_CHECK_OVERLAP */ - /* this is the first fragment we ever received for this ip datagram */ - ipr->p = p; - } - } - - /* Track the current number of pbufs current 'in-flight', in order to limit - the number of fragments that may be enqueued at any one time */ - ip6_reass_pbufcount += clen; - - /* Remember IPv6 header if this is the first fragment. */ - if (iprh->start == 0) { -#if IPV6_FRAG_COPYHEADER - if (iprh->next_pbuf != NULL) { - MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN); - } -#else /* IPV6_FRAG_COPYHEADER */ - /* need to use the none-const pointer here: */ - ipr->iphdr = ip_data.current_ip6_header; -#endif /* IPV6_FRAG_COPYHEADER */ - } - - /* If this is the last fragment, calculate total packet length. */ - if ((offset & IP6_FRAG_MORE_FLAG) == 0) { - ipr->datagram_len = iprh->end; - } - - /* Additional validity tests: we have received first and last fragment. */ - iprh_tmp = (struct ip6_reass_helper*)ipr->p->payload; - if (iprh_tmp->start != 0) { - valid = 0; - } - if (ipr->datagram_len == 0) { - valid = 0; - } - - /* Final validity test: no gaps between current and last fragment. */ - iprh_prev = iprh; - q = iprh->next_pbuf; - while ((q != NULL) && valid) { - iprh = (struct ip6_reass_helper*)q->payload; - if (iprh_prev->end != iprh->start) { - valid = 0; - break; - } - iprh_prev = iprh; - q = iprh->next_pbuf; - } - - if (valid) { - /* All fragments have been received */ - struct ip6_hdr* iphdr_ptr; - - /* chain together the pbufs contained within the ip6_reassdata list. */ - iprh = (struct ip6_reass_helper*) ipr->p->payload; - while (iprh != NULL) { - struct pbuf* next_pbuf = iprh->next_pbuf; - if (next_pbuf != NULL) { - /* Save next helper struct (will be hidden in next step). */ - iprh_tmp = (struct ip6_reass_helper*)next_pbuf->payload; - - /* hide the fragment header for every succeeding fragment */ - pbuf_header(next_pbuf, -IP6_FRAG_HLEN); -#if IPV6_FRAG_COPYHEADER - if (IPV6_FRAG_REQROOM > 0) { - /* hide the extra bytes borrowed from ip6_hdr for struct ip6_reass_helper */ - u8_t hdrerr = pbuf_header(next_pbuf, -(s16_t)(IPV6_FRAG_REQROOM)); - LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ - LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); - } -#endif - pbuf_cat(ipr->p, next_pbuf); - } - else { - iprh_tmp = NULL; - } - - iprh = iprh_tmp; - } - -#if IPV6_FRAG_COPYHEADER - if (IPV6_FRAG_REQROOM > 0) { - /* get back room for struct ip6_reass_helper (only required if sizeof(void*) > 4) */ - u8_t hdrerr = pbuf_header(ipr->p, -(s16_t)(IPV6_FRAG_REQROOM)); - LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ - LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); - } - iphdr_ptr = (struct ip6_hdr*)((u8_t*)ipr->p->payload - IP6_HLEN); - MEMCPY(iphdr_ptr, &ipr->iphdr, IP6_HLEN); -#else - iphdr_ptr = ipr->iphdr; -#endif - - /* Adjust datagram length by adding header lengths. */ - ipr->datagram_len += (u16_t)(((u8_t*)ipr->p->payload - (u8_t*)iphdr_ptr) - + IP6_FRAG_HLEN - - IP6_HLEN); - - /* Set payload length in ip header. */ - iphdr_ptr->_plen = lwip_htons(ipr->datagram_len); - - /* Get the first pbuf. */ - p = ipr->p; - - /* Restore Fragment Header in first pbuf. Mark as "single fragment" - * packet. Restore nexth. */ - frag_hdr = (struct ip6_frag_hdr *) p->payload; - frag_hdr->_nexth = ipr->nexth; - frag_hdr->reserved = 0; - frag_hdr->_fragment_offset = 0; - frag_hdr->_identification = 0; - - /* release the sources allocate for the fragment queue entry */ - if (reassdatagrams == ipr) { - /* 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", ipr_prev != NULL); - ipr_prev->next = ipr->next; - } - memp_free(MEMP_IP6_REASSDATA, ipr); - - /* adjust the number of pbufs currently queued for reassembly. */ - ip6_reass_pbufcount -= pbuf_clen(p); - - /* Move pbuf back to IPv6 header. - This cannot fail since we already checked when receiving this fragment. */ - if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)iphdr_ptr))) { - LWIP_ASSERT("ip6_reass: moving p->payload to ip6 header failed\n", 0); - pbuf_free(p); - return NULL; - } - - /* Return the pbuf chain */ - return p; - } - /* the datagram is not (yet?) reassembled completely */ - return NULL; - -nullreturn: - pbuf_free(p); - return NULL; -} - -#endif /* LWIP_IPV6 && LWIP_IPV6_REASS */ - -#if LWIP_IPV6 && LWIP_IPV6_FRAG - -#if !LWIP_NETIF_TX_SINGLE_PBUF -/** Allocate a new struct pbuf_custom_ref */ -static struct pbuf_custom_ref* -ip6_frag_alloc_pbuf_custom_ref(void) -{ - return (struct pbuf_custom_ref*)memp_malloc(MEMP_FRAG_PBUF); -} - -/** Free a struct pbuf_custom_ref */ -static void -ip6_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) -{ - LWIP_ASSERT("p != NULL", p != NULL); - memp_free(MEMP_FRAG_PBUF, p); -} - -/** Free-callback function to free a 'struct pbuf_custom_ref', called by - * pbuf_free. */ -static void -ip6_frag_free_pbuf_custom(struct pbuf *p) -{ - struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p; - LWIP_ASSERT("pcr != NULL", pcr != NULL); - LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p); - if (pcr->original != NULL) { - pbuf_free(pcr->original); - } - ip6_frag_free_pbuf_custom_ref(pcr); -} -#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ - -/** - * Fragment an IPv6 datagram if too large for the netif or path MTU. - * - * Chop the datagram in MTU sized chunks and send them in order - * by pointing PBUF_REFs into p - * - * @param p ipv6 packet to send - * @param netif the netif on which to send - * @param dest destination ipv6 address to which to send - * - * @return ERR_OK if sent successfully, err_t otherwise - */ -err_t -ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) -{ - struct ip6_hdr *original_ip6hdr; - struct ip6_hdr *ip6hdr; - struct ip6_frag_hdr *frag_hdr; - struct pbuf *rambuf; -#if !LWIP_NETIF_TX_SINGLE_PBUF - struct pbuf *newpbuf; - u16_t newpbuflen = 0; - u16_t left_to_copy; -#endif - static u32_t identification; - u16_t nfb; - u16_t left, cop; - u16_t mtu; - u16_t fragment_offset = 0; - u16_t last; - u16_t poff = IP6_HLEN; - - identification++; - - original_ip6hdr = (struct ip6_hdr *)p->payload; - - mtu = nd6_get_destination_mtu(dest, netif); - - /* @todo we assume there are no options in the unfragmentable part (IPv6 header). */ - left = p->tot_len - IP6_HLEN; - - nfb = (mtu - (IP6_HLEN + IP6_FRAG_HLEN)) & IP6_FRAG_OFFSET_MASK; - - while (left) { - last = (left <= nfb); - - /* Fill this fragment */ - cop = last ? left : nfb; - -#if LWIP_NETIF_TX_SINGLE_PBUF - rambuf = pbuf_alloc(PBUF_IP, cop + IP6_FRAG_HLEN, PBUF_RAM); - if (rambuf == NULL) { - IP6_FRAG_STATS_INC(ip6_frag.memerr); - return ERR_MEM; - } - LWIP_ASSERT("this needs a pbuf in one piece!", - (rambuf->len == rambuf->tot_len) && (rambuf->next == NULL)); - poff += pbuf_copy_partial(p, (u8_t*)rambuf->payload + IP6_FRAG_HLEN, cop, poff); - /* make room for the IP header */ - if (pbuf_header(rambuf, IP6_HLEN)) { - pbuf_free(rambuf); - IP6_FRAG_STATS_INC(ip6_frag.memerr); - return ERR_MEM; - } - /* fill in the IP header */ - SMEMCPY(rambuf->payload, original_ip6hdr, IP6_HLEN); - ip6hdr = (struct ip6_hdr *)rambuf->payload; - frag_hdr = (struct ip6_frag_hdr *)((u8_t*)rambuf->payload + IP6_HLEN); -#else - /* When not using a static buffer, create a chain of pbufs. - * The first will be a PBUF_RAM holding the link, IPv6, and Fragment 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, IP6_HLEN + IP6_FRAG_HLEN, PBUF_RAM); - if (rambuf == NULL) { - IP6_FRAG_STATS_INC(ip6_frag.memerr); - return ERR_MEM; - } - LWIP_ASSERT("this needs a pbuf in one piece!", - (p->len >= (IP6_HLEN))); - SMEMCPY(rambuf->payload, original_ip6hdr, IP6_HLEN); - ip6hdr = (struct ip6_hdr *)rambuf->payload; - frag_hdr = (struct ip6_frag_hdr *)((u8_t*)rambuf->payload + IP6_HLEN); - - /* Can just adjust p directly for needed offset. */ - p->payload = (u8_t *)p->payload + poff; - p->len -= poff; - p->tot_len -= poff; - - left_to_copy = cop; - while (left_to_copy) { - struct pbuf_custom_ref *pcr; - newpbuflen = (left_to_copy < p->len) ? left_to_copy : p->len; - /* Is this pbuf already empty? */ - if (!newpbuflen) { - p = p->next; - continue; - } - pcr = ip6_frag_alloc_pbuf_custom_ref(); - if (pcr == NULL) { - pbuf_free(rambuf); - IP6_FRAG_STATS_INC(ip6_frag.memerr); - return ERR_MEM; - } - /* Mirror this pbuf, although we might not need all of it. */ - newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, p->payload, newpbuflen); - if (newpbuf == NULL) { - ip6_frag_free_pbuf_custom_ref(pcr); - pbuf_free(rambuf); - IP6_FRAG_STATS_INC(ip6_frag.memerr); - return ERR_MEM; - } - pbuf_ref(p); - pcr->original = p; - pcr->pc.custom_free_function = ip6_frag_free_pbuf_custom; - - /* 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); - left_to_copy -= newpbuflen; - if (left_to_copy) { - p = p->next; - } - } - poff = newpbuflen; -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - - /* Set headers */ - frag_hdr->_nexth = original_ip6hdr->_nexth; - frag_hdr->reserved = 0; - frag_hdr->_fragment_offset = lwip_htons((fragment_offset & IP6_FRAG_OFFSET_MASK) | (last ? 0 : IP6_FRAG_MORE_FLAG)); - frag_hdr->_identification = lwip_htonl(identification); - - IP6H_NEXTH_SET(ip6hdr, IP6_NEXTH_FRAGMENT); - IP6H_PLEN_SET(ip6hdr, cop + IP6_FRAG_HLEN); - - /* No need for separate header pbuf - we allowed room for it in rambuf - * when allocated. - */ - IP6_FRAG_STATS_INC(ip6_frag.xmit); - netif->output_ip6(netif, rambuf, dest); - - /* Unfortunately we can't reuse rambuf - the hardware may still be - * using the buffer. Instead we free it (and the ensuing chain) and - * recreate it next time round the loop. If we're lucky the hardware - * will have already sent the packet, the free will really free, and - * there will be zero memory penalty. - */ - - pbuf_free(rambuf); - left -= cop; - fragment_offset += cop; - } - return ERR_OK; -} - -#endif /* LWIP_IPV6 && LWIP_IPV6_FRAG */ +/** + * @file + * + * IPv6 fragmentation and reassembly. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" +#include "lwip/ip6_frag.h" +#include "lwip/ip6.h" +#include "lwip/icmp6.h" +#include "lwip/nd6.h" +#include "lwip/ip.h" + +#include "lwip/pbuf.h" +#include "lwip/memp.h" +#include "lwip/stats.h" + +#include + +#if LWIP_IPV6 && LWIP_IPV6_REASS /* don't build if not configured for use in lwipopts.h */ + + +/** Setting this to 0, you can turn off checking the fragments for overlapping + * regions. The code gets a little smaller. Only use this if you know that + * overlapping won't occur on your network! */ +#ifndef IP_REASS_CHECK_OVERLAP +#define IP_REASS_CHECK_OVERLAP 1 +#endif /* IP_REASS_CHECK_OVERLAP */ + +/** Set to 0 to prevent freeing the oldest datagram when the reassembly buffer is + * full (IP_REASS_MAX_PBUFS pbufs are enqueued). The code gets a little smaller. + * Datagrams will be freed by timeout only. Especially useful when MEMP_NUM_REASSDATA + * is set to 1, so one datagram can be reassembled at a time, only. */ +#ifndef IP_REASS_FREE_OLDEST +#define IP_REASS_FREE_OLDEST 1 +#endif /* IP_REASS_FREE_OLDEST */ + +#if IPV6_FRAG_COPYHEADER +#define IPV6_FRAG_REQROOM ((s16_t)(sizeof(struct ip6_reass_helper) - IP6_FRAG_HLEN)) +#endif + +#define IP_REASS_FLAG_LASTFRAG 0x01 + +/** This is a helper struct which holds the starting + * offset and the ending offset of this fragment to + * easily chain the fragments. + * It has the same packing requirements as the IPv6 header, since it replaces + * the Fragment Header in memory in incoming fragments to keep + * track of the various fragments. + */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_reass_helper { + PACK_STRUCT_FIELD(struct pbuf *next_pbuf); + PACK_STRUCT_FIELD(u16_t start); + PACK_STRUCT_FIELD(u16_t end); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* static variables */ +static struct ip6_reassdata *reassdatagrams; +static u16_t ip6_reass_pbufcount; + +/* Forward declarations. */ +static void ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr); +#if IP_REASS_FREE_OLDEST +static void ip6_reass_remove_oldest_datagram(struct ip6_reassdata *ipr, int pbufs_needed); +#endif /* IP_REASS_FREE_OLDEST */ + +void +ip6_reass_tmr(void) +{ + struct ip6_reassdata *r, *tmp; + +#if !IPV6_FRAG_COPYHEADER + LWIP_ASSERT("sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN, set IPV6_FRAG_COPYHEADER to 1", + sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN); +#endif /* !IPV6_FRAG_COPYHEADER */ + + r = reassdatagrams; + while (r != NULL) { + /* Decrement the timer. Once it reaches 0, + * clean up the incomplete fragment assembly */ + if (r->timer > 0) { + r->timer--; + r = r->next; + } else { + /* reassembly timed out */ + tmp = r; + /* get the next pointer before freeing */ + r = r->next; + /* free the helper struct and all enqueued pbufs */ + ip6_reass_free_complete_datagram(tmp); + } + } +} + +/** + * Free a datagram (struct ip6_reassdata) and all its pbufs. + * Updates the total count of enqueued pbufs (ip6_reass_pbufcount), + * sends an ICMP time exceeded packet. + * + * @param ipr datagram to free + */ +static void +ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr) +{ + struct ip6_reassdata *prev; + u16_t pbufs_freed = 0; + u16_t clen; + struct pbuf *p; + struct ip6_reass_helper *iprh; + +#if LWIP_ICMP6 + iprh = (struct ip6_reass_helper *)ipr->p->payload; + if (iprh->start == 0) { + /* The first fragment was received, send ICMP time exceeded. */ + /* First, de-queue the first pbuf from r->p. */ + p = ipr->p; + ipr->p = iprh->next_pbuf; + /* Then, move back to the original ipv6 header (we are now pointing to Fragment header). + This cannot fail since we already checked when receiving this fragment. */ + if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)IPV6_FRAG_HDRREF(ipr->iphdr)))) { + LWIP_ASSERT("ip6_reass_free: moving p->payload to ip6 header failed\n", 0); + } + else { + icmp6_time_exceeded(p, ICMP6_TE_FRAG); + } + clen = pbuf_clen(p); + LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); + pbufs_freed += clen; + pbuf_free(p); + } +#endif /* LWIP_ICMP6 */ + + /* First, free all received pbufs. The individual pbufs need to be released + separately as they have not yet been chained */ + p = ipr->p; + while (p != NULL) { + struct pbuf *pcur; + iprh = (struct ip6_reass_helper *)p->payload; + pcur = p; + /* get the next pointer before freeing */ + p = iprh->next_pbuf; + clen = pbuf_clen(pcur); + LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); + pbufs_freed += clen; + pbuf_free(pcur); + } + + /* Then, unchain the struct ip6_reassdata from the list and free it. */ + if (ipr == reassdatagrams) { + reassdatagrams = ipr->next; + } else { + prev = reassdatagrams; + while (prev != NULL) { + if (prev->next == ipr) { + break; + } + prev = prev->next; + } + if (prev != NULL) { + prev->next = ipr->next; + } + } + memp_free(MEMP_IP6_REASSDATA, ipr); + + /* Finally, update number of pbufs in reassembly queue */ + LWIP_ASSERT("ip_reass_pbufcount >= clen", ip6_reass_pbufcount >= pbufs_freed); + ip6_reass_pbufcount -= pbufs_freed; +} + +#if IP_REASS_FREE_OLDEST +/** + * Free the oldest datagram to make room for enqueueing new fragments. + * The datagram ipr is not freed! + * + * @param ipr ip6_reassdata for the current fragment + * @param pbufs_needed number of pbufs needed to enqueue + * (used for freeing other datagrams if not enough space) + */ +static void +ip6_reass_remove_oldest_datagram(struct ip6_reassdata *ipr, int pbufs_needed) +{ + struct ip6_reassdata *r, *oldest; + + /* Free datagrams until being allowed to enqueue 'pbufs_needed' pbufs, + * but don't free the current datagram! */ + do { + r = oldest = reassdatagrams; + while (r != NULL) { + if (r != ipr) { + if (r->timer <= oldest->timer) { + /* older than the previous oldest */ + oldest = r; + } + } + r = r->next; + } + if (oldest == ipr) { + /* nothing to free, ipr is the only element on the list */ + return; + } + if (oldest != NULL) { + ip6_reass_free_complete_datagram(oldest); + } + } while (((ip6_reass_pbufcount + pbufs_needed) > IP_REASS_MAX_PBUFS) && (reassdatagrams != NULL)); +} +#endif /* IP_REASS_FREE_OLDEST */ + +/** + * Reassembles incoming IPv6 fragments into an IPv6 datagram. + * + * @param p points to the IPv6 Fragment Header + * @return NULL if reassembly is incomplete, pbuf pointing to + * IPv6 Header if reassembly is complete + */ +struct pbuf * +ip6_reass(struct pbuf *p) +{ + struct ip6_reassdata *ipr, *ipr_prev; + struct ip6_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; + struct ip6_frag_hdr *frag_hdr; + u16_t offset, len; + u16_t clen; + u8_t valid = 1; + struct pbuf *q; + + IP6_FRAG_STATS_INC(ip6_frag.recv); + + if ((const void*)ip6_current_header() != ((u8_t*)p->payload) - IP6_HLEN) { + /* ip6_frag_hdr must be in the first pbuf, not chained */ + IP6_FRAG_STATS_INC(ip6_frag.proterr); + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto nullreturn; + } + + frag_hdr = (struct ip6_frag_hdr *) p->payload; + + clen = pbuf_clen(p); + + offset = lwip_ntohs(frag_hdr->_fragment_offset); + + /* Calculate fragment length from IPv6 payload length. + * Adjust for headers before Fragment Header. + * And finally adjust by Fragment Header length. */ + len = lwip_ntohs(ip6_current_header()->_plen); + len -= (u16_t)(((u8_t*)p->payload - (const u8_t*)ip6_current_header()) - IP6_HLEN); + len -= IP6_FRAG_HLEN; + + /* Look for the datagram the fragment belongs to in the current datagram queue, + * remembering the previous in the queue for later dequeueing. */ + for (ipr = reassdatagrams, ipr_prev = NULL; ipr != NULL; ipr = ipr->next) { + /* Check if the incoming fragment matches the one currently present + in the reassembly buffer. If so, we proceed with copying the + fragment into the buffer. */ + if ((frag_hdr->_identification == ipr->identification) && + ip6_addr_cmp(ip6_current_src_addr(), &(IPV6_FRAG_HDRREF(ipr->iphdr)->src)) && + ip6_addr_cmp(ip6_current_dest_addr(), &(IPV6_FRAG_HDRREF(ipr->iphdr)->dest))) { + IP6_FRAG_STATS_INC(ip6_frag.cachehit); + break; + } + ipr_prev = ipr; + } + + if (ipr == NULL) { + /* Enqueue a new datagram into the datagram queue */ + ipr = (struct ip6_reassdata *)memp_malloc(MEMP_IP6_REASSDATA); + if (ipr == NULL) { +#if IP_REASS_FREE_OLDEST + /* Make room and try again. */ + ip6_reass_remove_oldest_datagram(ipr, clen); + ipr = (struct ip6_reassdata *)memp_malloc(MEMP_IP6_REASSDATA); + if (ipr != NULL) { + /* re-search ipr_prev since it might have been removed */ + for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { + if (ipr_prev->next == ipr) { + break; + } + } + } else +#endif /* IP_REASS_FREE_OLDEST */ + { + IP6_FRAG_STATS_INC(ip6_frag.memerr); + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto nullreturn; + } + } + + memset(ipr, 0, sizeof(struct ip6_reassdata)); + ipr->timer = IP_REASS_MAXAGE; + + /* enqueue the new structure to the front of the list */ + ipr->next = reassdatagrams; + reassdatagrams = ipr; + + /* Use the current IPv6 header for src/dest address reference. + * Eventually, we will replace it when we get the first fragment + * (it might be this one, in any case, it is done later). */ +#if IPV6_FRAG_COPYHEADER + MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN); +#else /* IPV6_FRAG_COPYHEADER */ + /* need to use the none-const pointer here: */ + ipr->iphdr = ip_data.current_ip6_header; +#endif /* IPV6_FRAG_COPYHEADER */ + + /* copy the fragmented packet id. */ + ipr->identification = frag_hdr->_identification; + + /* copy the nexth field */ + ipr->nexth = frag_hdr->_nexth; + } + + /* Check if we are allowed to enqueue more datagrams. */ + if ((ip6_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { +#if IP_REASS_FREE_OLDEST + ip6_reass_remove_oldest_datagram(ipr, clen); + if ((ip6_reass_pbufcount + clen) <= IP_REASS_MAX_PBUFS) { + /* re-search ipr_prev since it might have been removed */ + for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { + if (ipr_prev->next == ipr) { + break; + } + } + } else +#endif /* IP_REASS_FREE_OLDEST */ + { + /* @todo: send ICMPv6 time exceeded here? */ + /* drop this pbuf */ + IP6_FRAG_STATS_INC(ip6_frag.memerr); + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto nullreturn; + } + } + + /* Overwrite Fragment Header with our own helper struct. */ +#if IPV6_FRAG_COPYHEADER + if (IPV6_FRAG_REQROOM > 0) { + /* Make room for struct ip6_reass_helper (only required if sizeof(void*) > 4). + This cannot fail since we already checked when receiving this fragment. */ + u8_t hdrerr = pbuf_header_force(p, IPV6_FRAG_REQROOM); + LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); + } +#else /* IPV6_FRAG_COPYHEADER */ + LWIP_ASSERT("sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN, set IPV6_FRAG_COPYHEADER to 1", + sizeof(struct ip6_reass_helper) <= IP6_FRAG_HLEN); +#endif /* IPV6_FRAG_COPYHEADER */ + iprh = (struct ip6_reass_helper *)p->payload; + iprh->next_pbuf = NULL; + iprh->start = (offset & IP6_FRAG_OFFSET_MASK); + iprh->end = (offset & IP6_FRAG_OFFSET_MASK) + len; + + /* find the right place to insert this pbuf */ + /* Iterate through until we either get to the end of the list (append), + * or we find on with a larger offset (insert). */ + for (q = ipr->p; q != NULL;) { + iprh_tmp = (struct ip6_reass_helper*)q->payload; + if (iprh->start < iprh_tmp->start) { +#if IP_REASS_CHECK_OVERLAP + if (iprh->end > iprh_tmp->start) { + /* fragment overlaps with following, throw away */ + IP6_FRAG_STATS_INC(ip6_frag.proterr); + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto nullreturn; + } + if (iprh_prev != NULL) { + if (iprh->start < iprh_prev->end) { + /* fragment overlaps with previous, throw away */ + IP6_FRAG_STATS_INC(ip6_frag.proterr); + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto nullreturn; + } + } +#endif /* IP_REASS_CHECK_OVERLAP */ + /* the new pbuf should be inserted before this */ + iprh->next_pbuf = q; + if (iprh_prev != NULL) { + /* not the fragment with the lowest offset */ + iprh_prev->next_pbuf = p; + } else { + /* fragment with the lowest offset */ + ipr->p = p; + } + break; + } else if (iprh->start == iprh_tmp->start) { + /* received the same datagram twice: no need to keep the datagram */ + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto nullreturn; +#if IP_REASS_CHECK_OVERLAP + } else if (iprh->start < iprh_tmp->end) { + /* overlap: no need to keep the new datagram */ + IP6_FRAG_STATS_INC(ip6_frag.proterr); + IP6_FRAG_STATS_INC(ip6_frag.drop); + goto nullreturn; +#endif /* IP_REASS_CHECK_OVERLAP */ + } else { + /* Check if the fragments received so far have no gaps. */ + if (iprh_prev != NULL) { + if (iprh_prev->end != iprh_tmp->start) { + /* There is a fragment missing between the current + * and the previous fragment */ + valid = 0; + } + } + } + q = iprh_tmp->next_pbuf; + iprh_prev = iprh_tmp; + } + + /* If q is NULL, then we made it to the end of the list. Determine what to do now */ + if (q == NULL) { + if (iprh_prev != NULL) { + /* this is (for now), the fragment with the highest offset: + * chain it to the last fragment */ +#if IP_REASS_CHECK_OVERLAP + LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); +#endif /* IP_REASS_CHECK_OVERLAP */ + iprh_prev->next_pbuf = p; + if (iprh_prev->end != iprh->start) { + valid = 0; + } + } else { +#if IP_REASS_CHECK_OVERLAP + LWIP_ASSERT("no previous fragment, this must be the first fragment!", + ipr->p == NULL); +#endif /* IP_REASS_CHECK_OVERLAP */ + /* this is the first fragment we ever received for this ip datagram */ + ipr->p = p; + } + } + + /* Track the current number of pbufs current 'in-flight', in order to limit + the number of fragments that may be enqueued at any one time */ + ip6_reass_pbufcount += clen; + + /* Remember IPv6 header if this is the first fragment. */ + if (iprh->start == 0) { +#if IPV6_FRAG_COPYHEADER + if (iprh->next_pbuf != NULL) { + MEMCPY(&ipr->iphdr, ip6_current_header(), IP6_HLEN); + } +#else /* IPV6_FRAG_COPYHEADER */ + /* need to use the none-const pointer here: */ + ipr->iphdr = ip_data.current_ip6_header; +#endif /* IPV6_FRAG_COPYHEADER */ + } + + /* If this is the last fragment, calculate total packet length. */ + if ((offset & IP6_FRAG_MORE_FLAG) == 0) { + ipr->datagram_len = iprh->end; + } + + /* Additional validity tests: we have received first and last fragment. */ + iprh_tmp = (struct ip6_reass_helper*)ipr->p->payload; + if (iprh_tmp->start != 0) { + valid = 0; + } + if (ipr->datagram_len == 0) { + valid = 0; + } + + /* Final validity test: no gaps between current and last fragment. */ + iprh_prev = iprh; + q = iprh->next_pbuf; + while ((q != NULL) && valid) { + iprh = (struct ip6_reass_helper*)q->payload; + if (iprh_prev->end != iprh->start) { + valid = 0; + break; + } + iprh_prev = iprh; + q = iprh->next_pbuf; + } + + if (valid) { + /* All fragments have been received */ + struct ip6_hdr* iphdr_ptr; + + /* chain together the pbufs contained within the ip6_reassdata list. */ + iprh = (struct ip6_reass_helper*) ipr->p->payload; + while (iprh != NULL) { + struct pbuf* next_pbuf = iprh->next_pbuf; + if (next_pbuf != NULL) { + /* Save next helper struct (will be hidden in next step). */ + iprh_tmp = (struct ip6_reass_helper*)next_pbuf->payload; + + /* hide the fragment header for every succeeding fragment */ + pbuf_header(next_pbuf, -IP6_FRAG_HLEN); +#if IPV6_FRAG_COPYHEADER + if (IPV6_FRAG_REQROOM > 0) { + /* hide the extra bytes borrowed from ip6_hdr for struct ip6_reass_helper */ + u8_t hdrerr = pbuf_header(next_pbuf, -(s16_t)(IPV6_FRAG_REQROOM)); + LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); + } +#endif + pbuf_cat(ipr->p, next_pbuf); + } + else { + iprh_tmp = NULL; + } + + iprh = iprh_tmp; + } + +#if IPV6_FRAG_COPYHEADER + if (IPV6_FRAG_REQROOM > 0) { + /* get back room for struct ip6_reass_helper (only required if sizeof(void*) > 4) */ + u8_t hdrerr = pbuf_header(ipr->p, -(s16_t)(IPV6_FRAG_REQROOM)); + LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); + } + iphdr_ptr = (struct ip6_hdr*)((u8_t*)ipr->p->payload - IP6_HLEN); + MEMCPY(iphdr_ptr, &ipr->iphdr, IP6_HLEN); +#else + iphdr_ptr = ipr->iphdr; +#endif + + /* Adjust datagram length by adding header lengths. */ + ipr->datagram_len += (u16_t)(((u8_t*)ipr->p->payload - (u8_t*)iphdr_ptr) + + IP6_FRAG_HLEN + - IP6_HLEN); + + /* Set payload length in ip header. */ + iphdr_ptr->_plen = lwip_htons(ipr->datagram_len); + + /* Get the first pbuf. */ + p = ipr->p; + + /* Restore Fragment Header in first pbuf. Mark as "single fragment" + * packet. Restore nexth. */ + frag_hdr = (struct ip6_frag_hdr *) p->payload; + frag_hdr->_nexth = ipr->nexth; + frag_hdr->reserved = 0; + frag_hdr->_fragment_offset = 0; + frag_hdr->_identification = 0; + + /* release the sources allocate for the fragment queue entry */ + if (reassdatagrams == ipr) { + /* 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", ipr_prev != NULL); + ipr_prev->next = ipr->next; + } + memp_free(MEMP_IP6_REASSDATA, ipr); + + /* adjust the number of pbufs currently queued for reassembly. */ + ip6_reass_pbufcount -= pbuf_clen(p); + + /* Move pbuf back to IPv6 header. + This cannot fail since we already checked when receiving this fragment. */ + if (pbuf_header_force(p, (s16_t)((u8_t*)p->payload - (u8_t*)iphdr_ptr))) { + LWIP_ASSERT("ip6_reass: moving p->payload to ip6 header failed\n", 0); + pbuf_free(p); + return NULL; + } + + /* Return the pbuf chain */ + return p; + } + /* the datagram is not (yet?) reassembled completely */ + return NULL; + +nullreturn: + pbuf_free(p); + return NULL; +} + +#endif /* LWIP_IPV6 && LWIP_IPV6_REASS */ + +#if LWIP_IPV6 && LWIP_IPV6_FRAG + +#if !LWIP_NETIF_TX_SINGLE_PBUF +/** Allocate a new struct pbuf_custom_ref */ +static struct pbuf_custom_ref* +ip6_frag_alloc_pbuf_custom_ref(void) +{ + return (struct pbuf_custom_ref*)memp_malloc(MEMP_FRAG_PBUF); +} + +/** Free a struct pbuf_custom_ref */ +static void +ip6_frag_free_pbuf_custom_ref(struct pbuf_custom_ref* p) +{ + LWIP_ASSERT("p != NULL", p != NULL); + memp_free(MEMP_FRAG_PBUF, p); +} + +/** Free-callback function to free a 'struct pbuf_custom_ref', called by + * pbuf_free. */ +static void +ip6_frag_free_pbuf_custom(struct pbuf *p) +{ + struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref*)p; + LWIP_ASSERT("pcr != NULL", pcr != NULL); + LWIP_ASSERT("pcr == p", (void*)pcr == (void*)p); + if (pcr->original != NULL) { + pbuf_free(pcr->original); + } + ip6_frag_free_pbuf_custom_ref(pcr); +} +#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ + +/** + * Fragment an IPv6 datagram if too large for the netif or path MTU. + * + * Chop the datagram in MTU sized chunks and send them in order + * by pointing PBUF_REFs into p + * + * @param p ipv6 packet to send + * @param netif the netif on which to send + * @param dest destination ipv6 address to which to send + * + * @return ERR_OK if sent successfully, err_t otherwise + */ +err_t +ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) +{ + struct ip6_hdr *original_ip6hdr; + struct ip6_hdr *ip6hdr; + struct ip6_frag_hdr *frag_hdr; + struct pbuf *rambuf; +#if !LWIP_NETIF_TX_SINGLE_PBUF + struct pbuf *newpbuf; + u16_t newpbuflen = 0; + u16_t left_to_copy; +#endif + static u32_t identification; + u16_t nfb; + u16_t left, cop; + u16_t mtu; + u16_t fragment_offset = 0; + u16_t last; + u16_t poff = IP6_HLEN; + + identification++; + + original_ip6hdr = (struct ip6_hdr *)p->payload; + + mtu = nd6_get_destination_mtu(dest, netif); + + /* @todo we assume there are no options in the unfragmentable part (IPv6 header). */ + left = p->tot_len - IP6_HLEN; + + nfb = (mtu - (IP6_HLEN + IP6_FRAG_HLEN)) & IP6_FRAG_OFFSET_MASK; + + while (left) { + last = (left <= nfb); + + /* Fill this fragment */ + cop = last ? left : nfb; + +#if LWIP_NETIF_TX_SINGLE_PBUF + rambuf = pbuf_alloc(PBUF_IP, cop + IP6_FRAG_HLEN, PBUF_RAM); + if (rambuf == NULL) { + IP6_FRAG_STATS_INC(ip6_frag.memerr); + return ERR_MEM; + } + LWIP_ASSERT("this needs a pbuf in one piece!", + (rambuf->len == rambuf->tot_len) && (rambuf->next == NULL)); + poff += pbuf_copy_partial(p, (u8_t*)rambuf->payload + IP6_FRAG_HLEN, cop, poff); + /* make room for the IP header */ + if (pbuf_header(rambuf, IP6_HLEN)) { + pbuf_free(rambuf); + IP6_FRAG_STATS_INC(ip6_frag.memerr); + return ERR_MEM; + } + /* fill in the IP header */ + SMEMCPY(rambuf->payload, original_ip6hdr, IP6_HLEN); + ip6hdr = (struct ip6_hdr *)rambuf->payload; + frag_hdr = (struct ip6_frag_hdr *)((u8_t*)rambuf->payload + IP6_HLEN); +#else + /* When not using a static buffer, create a chain of pbufs. + * The first will be a PBUF_RAM holding the link, IPv6, and Fragment 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, IP6_HLEN + IP6_FRAG_HLEN, PBUF_RAM); + if (rambuf == NULL) { + IP6_FRAG_STATS_INC(ip6_frag.memerr); + return ERR_MEM; + } + LWIP_ASSERT("this needs a pbuf in one piece!", + (p->len >= (IP6_HLEN))); + SMEMCPY(rambuf->payload, original_ip6hdr, IP6_HLEN); + ip6hdr = (struct ip6_hdr *)rambuf->payload; + frag_hdr = (struct ip6_frag_hdr *)((u8_t*)rambuf->payload + IP6_HLEN); + + /* Can just adjust p directly for needed offset. */ + p->payload = (u8_t *)p->payload + poff; + p->len -= poff; + p->tot_len -= poff; + + left_to_copy = cop; + while (left_to_copy) { + struct pbuf_custom_ref *pcr; + newpbuflen = (left_to_copy < p->len) ? left_to_copy : p->len; + /* Is this pbuf already empty? */ + if (!newpbuflen) { + p = p->next; + continue; + } + pcr = ip6_frag_alloc_pbuf_custom_ref(); + if (pcr == NULL) { + pbuf_free(rambuf); + IP6_FRAG_STATS_INC(ip6_frag.memerr); + return ERR_MEM; + } + /* Mirror this pbuf, although we might not need all of it. */ + newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, p->payload, newpbuflen); + if (newpbuf == NULL) { + ip6_frag_free_pbuf_custom_ref(pcr); + pbuf_free(rambuf); + IP6_FRAG_STATS_INC(ip6_frag.memerr); + return ERR_MEM; + } + pbuf_ref(p); + pcr->original = p; + pcr->pc.custom_free_function = ip6_frag_free_pbuf_custom; + + /* 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); + left_to_copy -= newpbuflen; + if (left_to_copy) { + p = p->next; + } + } + poff = newpbuflen; +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + + /* Set headers */ + frag_hdr->_nexth = original_ip6hdr->_nexth; + frag_hdr->reserved = 0; + frag_hdr->_fragment_offset = lwip_htons((fragment_offset & IP6_FRAG_OFFSET_MASK) | (last ? 0 : IP6_FRAG_MORE_FLAG)); + frag_hdr->_identification = lwip_htonl(identification); + + IP6H_NEXTH_SET(ip6hdr, IP6_NEXTH_FRAGMENT); + IP6H_PLEN_SET(ip6hdr, cop + IP6_FRAG_HLEN); + + /* No need for separate header pbuf - we allowed room for it in rambuf + * when allocated. + */ + IP6_FRAG_STATS_INC(ip6_frag.xmit); + netif->output_ip6(netif, rambuf, dest); + + /* Unfortunately we can't reuse rambuf - the hardware may still be + * using the buffer. Instead we free it (and the ensuing chain) and + * recreate it next time round the loop. If we're lucky the hardware + * will have already sent the packet, the free will really free, and + * there will be zero memory penalty. + */ + + pbuf_free(rambuf); + left -= cop; + fragment_offset += cop; + } + return ERR_OK; +} + +#endif /* LWIP_IPV6 && LWIP_IPV6_FRAG */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.c index 9acb82f..90bcd36 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/mld6.c @@ -1,588 +1,588 @@ -/** - * @file - * Multicast listener discovery - * - * @defgroup mld6 MLD6 - * @ingroup ip6 - * Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. - * No support for MLDv2.\n - * To be called from TCPIP thread - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -/* Based on igmp.c implementation of igmp v2 protocol */ - -#include "lwip/opt.h" - -#if LWIP_IPV6 && LWIP_IPV6_MLD /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/mld6.h" -#include "lwip/prot/mld6.h" -#include "lwip/icmp6.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/ip.h" -#include "lwip/inet_chksum.h" -#include "lwip/pbuf.h" -#include "lwip/netif.h" -#include "lwip/memp.h" -#include "lwip/stats.h" - -#include - - -/* - * MLD constants - */ -#define MLD6_HL 1 -#define MLD6_JOIN_DELAYING_MEMBER_TMR_MS (500) - -#define MLD6_GROUP_NON_MEMBER 0 -#define MLD6_GROUP_DELAYING_MEMBER 1 -#define MLD6_GROUP_IDLE_MEMBER 2 - -/* Forward declarations. */ -static struct mld_group *mld6_new_group(struct netif *ifp, const ip6_addr_t *addr); -static err_t mld6_remove_group(struct netif *netif, struct mld_group *group); -static void mld6_delayed_report(struct mld_group *group, u16_t maxresp); -static void mld6_send(struct netif *netif, struct mld_group *group, u8_t type); - - -/** - * Stop MLD processing on interface - * - * @param netif network interface on which stop MLD processing - */ -err_t -mld6_stop(struct netif *netif) -{ - struct mld_group *group = netif_mld6_data(netif); - - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, NULL); - - while (group != NULL) { - struct mld_group *next = group->next; /* avoid use-after-free below */ - - /* disable the group at the MAC level */ - if (netif->mld_mac_filter != NULL) { - netif->mld_mac_filter(netif, &(group->group_address), NETIF_DEL_MAC_FILTER); - } - - /* free group */ - memp_free(MEMP_MLD6_GROUP, group); - - /* move to "next" */ - group = next; - } - return ERR_OK; -} - -/** - * Report MLD memberships for this interface - * - * @param netif network interface on which report MLD memberships - */ -void -mld6_report_groups(struct netif *netif) -{ - struct mld_group *group = netif_mld6_data(netif); - - while (group != NULL) { - mld6_delayed_report(group, MLD6_JOIN_DELAYING_MEMBER_TMR_MS); - group = group->next; - } -} - -/** - * Search for a group that is joined on a netif - * - * @param ifp the network interface for which to look - * @param addr the group ipv6 address to search for - * @return a struct mld_group* if the group has been found, - * NULL if the group wasn't found. - */ -struct mld_group * -mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr) -{ - struct mld_group *group = netif_mld6_data(ifp); - - while (group != NULL) { - if (ip6_addr_cmp(&(group->group_address), addr)) { - return group; - } - group = group->next; - } - - return NULL; -} - - -/** - * create a new group - * - * @param ifp the network interface for which to create - * @param addr the new group ipv6 - * @return a struct mld_group*, - * NULL on memory error. - */ -static struct mld_group * -mld6_new_group(struct netif *ifp, const ip6_addr_t *addr) -{ - struct mld_group *group; - - group = (struct mld_group *)memp_malloc(MEMP_MLD6_GROUP); - if (group != NULL) { - ip6_addr_set(&(group->group_address), addr); - group->timer = 0; /* Not running */ - group->group_state = MLD6_GROUP_IDLE_MEMBER; - group->last_reporter_flag = 0; - group->use = 0; - group->next = netif_mld6_data(ifp); - - netif_set_client_data(ifp, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, group); - } - - return group; -} - -/** - * Remove a group from the mld_group_list, but do not free it yet - * - * @param group the group to remove - * @return ERR_OK if group was removed from the list, an err_t otherwise - */ -static err_t -mld6_remove_group(struct netif *netif, struct mld_group *group) -{ - err_t err = ERR_OK; - - /* Is it the first group? */ - if (netif_mld6_data(netif) == group) { - netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, group->next); - } else { - /* look for group further down the list */ - struct mld_group *tmpGroup; - for (tmpGroup = netif_mld6_data(netif); tmpGroup != NULL; tmpGroup = tmpGroup->next) { - if (tmpGroup->next == group) { - tmpGroup->next = group->next; - break; - } - } - /* Group not find group */ - if (tmpGroup == NULL) { - err = ERR_ARG; - } - } - - return err; -} - - -/** - * Process an input MLD message. Called by icmp6_input. - * - * @param p the mld packet, p->payload pointing to the icmpv6 header - * @param inp the netif on which this packet was received - */ -void -mld6_input(struct pbuf *p, struct netif *inp) -{ - struct mld_header *mld_hdr; - struct mld_group *group; - - MLD6_STATS_INC(mld6.recv); - - /* Check that mld header fits in packet. */ - if (p->len < sizeof(struct mld_header)) { - /* @todo debug message */ - pbuf_free(p); - MLD6_STATS_INC(mld6.lenerr); - MLD6_STATS_INC(mld6.drop); - return; - } - - mld_hdr = (struct mld_header *)p->payload; - - switch (mld_hdr->type) { - case ICMP6_TYPE_MLQ: /* Multicast listener query. */ - /* Is it a general query? */ - if (ip6_addr_isallnodes_linklocal(ip6_current_dest_addr()) && - ip6_addr_isany(&(mld_hdr->multicast_address))) { - MLD6_STATS_INC(mld6.rx_general); - /* Report all groups, except all nodes group, and if-local groups. */ - group = netif_mld6_data(inp); - while (group != NULL) { - if ((!(ip6_addr_ismulticast_iflocal(&(group->group_address)))) && - (!(ip6_addr_isallnodes_linklocal(&(group->group_address))))) { - mld6_delayed_report(group, mld_hdr->max_resp_delay); - } - group = group->next; - } - } else { - /* Have we joined this group? - * We use IP6 destination address to have a memory aligned copy. - * mld_hdr->multicast_address should be the same. */ - MLD6_STATS_INC(mld6.rx_group); - group = mld6_lookfor_group(inp, ip6_current_dest_addr()); - if (group != NULL) { - /* Schedule a report. */ - mld6_delayed_report(group, mld_hdr->max_resp_delay); - } - } - break; /* ICMP6_TYPE_MLQ */ - case ICMP6_TYPE_MLR: /* Multicast listener report. */ - /* Have we joined this group? - * We use IP6 destination address to have a memory aligned copy. - * mld_hdr->multicast_address should be the same. */ - MLD6_STATS_INC(mld6.rx_report); - group = mld6_lookfor_group(inp, ip6_current_dest_addr()); - if (group != NULL) { - /* If we are waiting to report, cancel it. */ - if (group->group_state == MLD6_GROUP_DELAYING_MEMBER) { - group->timer = 0; /* stopped */ - group->group_state = MLD6_GROUP_IDLE_MEMBER; - group->last_reporter_flag = 0; - } - } - break; /* ICMP6_TYPE_MLR */ - case ICMP6_TYPE_MLD: /* Multicast listener done. */ - /* Do nothing, router will query us. */ - break; /* ICMP6_TYPE_MLD */ - default: - MLD6_STATS_INC(mld6.proterr); - MLD6_STATS_INC(mld6.drop); - break; - } - - pbuf_free(p); -} - -/** - * @ingroup mld6 - * Join a group on a network interface. - * - * @param srcaddr ipv6 address of the network interface which should - * join a new group. If IP6_ADDR_ANY, join on all netifs - * @param groupaddr the ipv6 address of the group to join - * @return ERR_OK if group was joined on the netif(s), an err_t otherwise - */ -err_t -mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) -{ - err_t err = ERR_VAL; /* no matching interface */ - struct netif *netif; - - /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { - /* Should we join this interface ? */ - if (ip6_addr_isany(srcaddr) || - netif_get_ip6_addr_match(netif, srcaddr) >= 0) { - err = mld6_joingroup_netif(netif, groupaddr); - if (err != ERR_OK) { - return err; - } - } - - /* proceed to next network interface */ - netif = netif->next; - } - - return err; -} - -/** - * @ingroup mld6 - * Join a group on a network interface. - * - * @param netif the network interface which should join a new group. - * @param groupaddr the ipv6 address of the group to join - * @return ERR_OK if group was joined on the netif, an err_t otherwise - */ -err_t -mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) -{ - struct mld_group *group; - - /* find group or create a new one if not found */ - group = mld6_lookfor_group(netif, groupaddr); - - if (group == NULL) { - /* Joining a new group. Create a new group entry. */ - group = mld6_new_group(netif, groupaddr); - if (group == NULL) { - return ERR_MEM; - } - - /* Activate this address on the MAC layer. */ - if (netif->mld_mac_filter != NULL) { - netif->mld_mac_filter(netif, groupaddr, NETIF_ADD_MAC_FILTER); - } - - /* Report our membership. */ - MLD6_STATS_INC(mld6.tx_report); - mld6_send(netif, group, ICMP6_TYPE_MLR); - mld6_delayed_report(group, MLD6_JOIN_DELAYING_MEMBER_TMR_MS); - } - - /* Increment group use */ - group->use++; - return ERR_OK; -} - -/** - * @ingroup mld6 - * Leave a group on a network interface. - * - * @param srcaddr ipv6 address of the network interface which should - * leave the group. If IP6_ISANY, leave on all netifs - * @param groupaddr the ipv6 address of the group to leave - * @return ERR_OK if group was left on the netif(s), an err_t otherwise - */ -err_t -mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) -{ - err_t err = ERR_VAL; /* no matching interface */ - struct netif *netif; - - /* loop through netif's */ - netif = netif_list; - while (netif != NULL) { - /* Should we leave this interface ? */ - if (ip6_addr_isany(srcaddr) || - netif_get_ip6_addr_match(netif, srcaddr) >= 0) { - err_t res = mld6_leavegroup_netif(netif, groupaddr); - if (err != ERR_OK) { - /* Store this result if we have not yet gotten a success */ - err = res; - } - } - /* proceed to next network interface */ - netif = netif->next; - } - - return err; -} - -/** - * @ingroup mld6 - * Leave a group on a network interface. - * - * @param netif the network interface which should leave the group. - * @param groupaddr the ipv6 address of the group to leave - * @return ERR_OK if group was left on the netif, an err_t otherwise - */ -err_t -mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) -{ - struct mld_group *group; - - /* find group */ - group = mld6_lookfor_group(netif, groupaddr); - - if (group != NULL) { - /* Leave if there is no other use of the group */ - if (group->use <= 1) { - /* Remove the group from the list */ - mld6_remove_group(netif, group); - - /* If we are the last reporter for this group */ - if (group->last_reporter_flag) { - MLD6_STATS_INC(mld6.tx_leave); - mld6_send(netif, group, ICMP6_TYPE_MLD); - } - - /* Disable the group at the MAC level */ - if (netif->mld_mac_filter != NULL) { - netif->mld_mac_filter(netif, groupaddr, NETIF_DEL_MAC_FILTER); - } - - /* free group struct */ - memp_free(MEMP_MLD6_GROUP, group); - } else { - /* Decrement group use */ - group->use--; - } - - /* Left group */ - return ERR_OK; - } - - /* Group not found */ - return ERR_VAL; -} - - -/** - * Periodic timer for mld processing. Must be called every - * MLD6_TMR_INTERVAL milliseconds (100). - * - * When a delaying member expires, a membership report is sent. - */ -void -mld6_tmr(void) -{ - struct netif *netif = netif_list; - - while (netif != NULL) { - struct mld_group *group = netif_mld6_data(netif); - - while (group != NULL) { - if (group->timer > 0) { - group->timer--; - if (group->timer == 0) { - /* If the state is MLD6_GROUP_DELAYING_MEMBER then we send a report for this group */ - if (group->group_state == MLD6_GROUP_DELAYING_MEMBER) { - MLD6_STATS_INC(mld6.tx_report); - mld6_send(netif, group, ICMP6_TYPE_MLR); - group->group_state = MLD6_GROUP_IDLE_MEMBER; - } - } - } - group = group->next; - } - netif = netif->next; - } -} - -/** - * Schedule a delayed membership report for a group - * - * @param group the mld_group for which "delaying" membership report - * should be sent - * @param maxresp the max resp delay provided in the query - */ -static void -mld6_delayed_report(struct mld_group *group, u16_t maxresp) -{ - /* Convert maxresp from milliseconds to tmr ticks */ - maxresp = maxresp / MLD6_TMR_INTERVAL; - if (maxresp == 0) { - maxresp = 1; - } - -#ifdef LWIP_RAND - /* Randomize maxresp. (if LWIP_RAND is supported) */ - maxresp = LWIP_RAND() % maxresp; - if (maxresp == 0) { - maxresp = 1; - } -#endif /* LWIP_RAND */ - - /* Apply timer value if no report has been scheduled already. */ - if ((group->group_state == MLD6_GROUP_IDLE_MEMBER) || - ((group->group_state == MLD6_GROUP_DELAYING_MEMBER) && - ((group->timer == 0) || (maxresp < group->timer)))) { - group->timer = maxresp; - group->group_state = MLD6_GROUP_DELAYING_MEMBER; - } -} - -/** - * Send a MLD message (report or done). - * - * An IPv6 hop-by-hop options header with a router alert option - * is prepended. - * - * @param group the group to report or quit - * @param type ICMP6_TYPE_MLR (report) or ICMP6_TYPE_MLD (done) - */ -static void -mld6_send(struct netif *netif, struct mld_group *group, u8_t type) -{ - struct mld_header *mld_hdr; - struct pbuf *p; - const ip6_addr_t *src_addr; - - /* Allocate a packet. Size is MLD header + IPv6 Hop-by-hop options header. */ - p = pbuf_alloc(PBUF_IP, sizeof(struct mld_header) + sizeof(struct ip6_hbh_hdr), PBUF_RAM); - if (p == NULL) { - MLD6_STATS_INC(mld6.memerr); - return; - } - - /* Move to make room for Hop-by-hop options header. */ - if (pbuf_header(p, -IP6_HBH_HLEN)) { - pbuf_free(p); - MLD6_STATS_INC(mld6.lenerr); - return; - } - - /* Select our source address. */ - if (!ip6_addr_isvalid(netif_ip6_addr_state(netif, 0))) { - /* This is a special case, when we are performing duplicate address detection. - * We must join the multicast group, but we don't have a valid address yet. */ - src_addr = IP6_ADDR_ANY6; - } else { - /* Use link-local address as source address. */ - src_addr = netif_ip6_addr(netif, 0); - } - - /* MLD message header pointer. */ - mld_hdr = (struct mld_header *)p->payload; - - /* Set fields. */ - mld_hdr->type = type; - mld_hdr->code = 0; - mld_hdr->chksum = 0; - mld_hdr->max_resp_delay = 0; - mld_hdr->reserved = 0; - ip6_addr_set(&(mld_hdr->multicast_address), &(group->group_address)); - -#if CHECKSUM_GEN_ICMP6 - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { - mld_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, - src_addr, &(group->group_address)); - } -#endif /* CHECKSUM_GEN_ICMP6 */ - - /* Add hop-by-hop headers options: router alert with MLD value. */ - ip6_options_add_hbh_ra(p, IP6_NEXTH_ICMP6, IP6_ROUTER_ALERT_VALUE_MLD); - - if (type == ICMP6_TYPE_MLR) { - /* Remember we were the last to report */ - group->last_reporter_flag = 1; - } - - /* Send the packet out. */ - MLD6_STATS_INC(mld6.xmit); - ip6_output_if(p, (ip6_addr_isany(src_addr)) ? NULL : src_addr, &(group->group_address), - MLD6_HL, 0, IP6_NEXTH_HOPBYHOP, netif); - pbuf_free(p); -} - -#endif /* LWIP_IPV6 */ +/** + * @file + * Multicast listener discovery + * + * @defgroup mld6 MLD6 + * @ingroup ip6 + * Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. + * No support for MLDv2.\n + * To be called from TCPIP thread + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +/* Based on igmp.c implementation of igmp v2 protocol */ + +#include "lwip/opt.h" + +#if LWIP_IPV6 && LWIP_IPV6_MLD /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/mld6.h" +#include "lwip/prot/mld6.h" +#include "lwip/icmp6.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/ip.h" +#include "lwip/inet_chksum.h" +#include "lwip/pbuf.h" +#include "lwip/netif.h" +#include "lwip/memp.h" +#include "lwip/stats.h" + +#include + + +/* + * MLD constants + */ +#define MLD6_HL 1 +#define MLD6_JOIN_DELAYING_MEMBER_TMR_MS (500) + +#define MLD6_GROUP_NON_MEMBER 0 +#define MLD6_GROUP_DELAYING_MEMBER 1 +#define MLD6_GROUP_IDLE_MEMBER 2 + +/* Forward declarations. */ +static struct mld_group *mld6_new_group(struct netif *ifp, const ip6_addr_t *addr); +static err_t mld6_remove_group(struct netif *netif, struct mld_group *group); +static void mld6_delayed_report(struct mld_group *group, u16_t maxresp); +static void mld6_send(struct netif *netif, struct mld_group *group, u8_t type); + + +/** + * Stop MLD processing on interface + * + * @param netif network interface on which stop MLD processing + */ +err_t +mld6_stop(struct netif *netif) +{ + struct mld_group *group = netif_mld6_data(netif); + + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, NULL); + + while (group != NULL) { + struct mld_group *next = group->next; /* avoid use-after-free below */ + + /* disable the group at the MAC level */ + if (netif->mld_mac_filter != NULL) { + netif->mld_mac_filter(netif, &(group->group_address), NETIF_DEL_MAC_FILTER); + } + + /* free group */ + memp_free(MEMP_MLD6_GROUP, group); + + /* move to "next" */ + group = next; + } + return ERR_OK; +} + +/** + * Report MLD memberships for this interface + * + * @param netif network interface on which report MLD memberships + */ +void +mld6_report_groups(struct netif *netif) +{ + struct mld_group *group = netif_mld6_data(netif); + + while (group != NULL) { + mld6_delayed_report(group, MLD6_JOIN_DELAYING_MEMBER_TMR_MS); + group = group->next; + } +} + +/** + * Search for a group that is joined on a netif + * + * @param ifp the network interface for which to look + * @param addr the group ipv6 address to search for + * @return a struct mld_group* if the group has been found, + * NULL if the group wasn't found. + */ +struct mld_group * +mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr) +{ + struct mld_group *group = netif_mld6_data(ifp); + + while (group != NULL) { + if (ip6_addr_cmp(&(group->group_address), addr)) { + return group; + } + group = group->next; + } + + return NULL; +} + + +/** + * create a new group + * + * @param ifp the network interface for which to create + * @param addr the new group ipv6 + * @return a struct mld_group*, + * NULL on memory error. + */ +static struct mld_group * +mld6_new_group(struct netif *ifp, const ip6_addr_t *addr) +{ + struct mld_group *group; + + group = (struct mld_group *)memp_malloc(MEMP_MLD6_GROUP); + if (group != NULL) { + ip6_addr_set(&(group->group_address), addr); + group->timer = 0; /* Not running */ + group->group_state = MLD6_GROUP_IDLE_MEMBER; + group->last_reporter_flag = 0; + group->use = 0; + group->next = netif_mld6_data(ifp); + + netif_set_client_data(ifp, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, group); + } + + return group; +} + +/** + * Remove a group from the mld_group_list, but do not free it yet + * + * @param group the group to remove + * @return ERR_OK if group was removed from the list, an err_t otherwise + */ +static err_t +mld6_remove_group(struct netif *netif, struct mld_group *group) +{ + err_t err = ERR_OK; + + /* Is it the first group? */ + if (netif_mld6_data(netif) == group) { + netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, group->next); + } else { + /* look for group further down the list */ + struct mld_group *tmpGroup; + for (tmpGroup = netif_mld6_data(netif); tmpGroup != NULL; tmpGroup = tmpGroup->next) { + if (tmpGroup->next == group) { + tmpGroup->next = group->next; + break; + } + } + /* Group not find group */ + if (tmpGroup == NULL) { + err = ERR_ARG; + } + } + + return err; +} + + +/** + * Process an input MLD message. Called by icmp6_input. + * + * @param p the mld packet, p->payload pointing to the icmpv6 header + * @param inp the netif on which this packet was received + */ +void +mld6_input(struct pbuf *p, struct netif *inp) +{ + struct mld_header *mld_hdr; + struct mld_group *group; + + MLD6_STATS_INC(mld6.recv); + + /* Check that mld header fits in packet. */ + if (p->len < sizeof(struct mld_header)) { + /* @todo debug message */ + pbuf_free(p); + MLD6_STATS_INC(mld6.lenerr); + MLD6_STATS_INC(mld6.drop); + return; + } + + mld_hdr = (struct mld_header *)p->payload; + + switch (mld_hdr->type) { + case ICMP6_TYPE_MLQ: /* Multicast listener query. */ + /* Is it a general query? */ + if (ip6_addr_isallnodes_linklocal(ip6_current_dest_addr()) && + ip6_addr_isany(&(mld_hdr->multicast_address))) { + MLD6_STATS_INC(mld6.rx_general); + /* Report all groups, except all nodes group, and if-local groups. */ + group = netif_mld6_data(inp); + while (group != NULL) { + if ((!(ip6_addr_ismulticast_iflocal(&(group->group_address)))) && + (!(ip6_addr_isallnodes_linklocal(&(group->group_address))))) { + mld6_delayed_report(group, mld_hdr->max_resp_delay); + } + group = group->next; + } + } else { + /* Have we joined this group? + * We use IP6 destination address to have a memory aligned copy. + * mld_hdr->multicast_address should be the same. */ + MLD6_STATS_INC(mld6.rx_group); + group = mld6_lookfor_group(inp, ip6_current_dest_addr()); + if (group != NULL) { + /* Schedule a report. */ + mld6_delayed_report(group, mld_hdr->max_resp_delay); + } + } + break; /* ICMP6_TYPE_MLQ */ + case ICMP6_TYPE_MLR: /* Multicast listener report. */ + /* Have we joined this group? + * We use IP6 destination address to have a memory aligned copy. + * mld_hdr->multicast_address should be the same. */ + MLD6_STATS_INC(mld6.rx_report); + group = mld6_lookfor_group(inp, ip6_current_dest_addr()); + if (group != NULL) { + /* If we are waiting to report, cancel it. */ + if (group->group_state == MLD6_GROUP_DELAYING_MEMBER) { + group->timer = 0; /* stopped */ + group->group_state = MLD6_GROUP_IDLE_MEMBER; + group->last_reporter_flag = 0; + } + } + break; /* ICMP6_TYPE_MLR */ + case ICMP6_TYPE_MLD: /* Multicast listener done. */ + /* Do nothing, router will query us. */ + break; /* ICMP6_TYPE_MLD */ + default: + MLD6_STATS_INC(mld6.proterr); + MLD6_STATS_INC(mld6.drop); + break; + } + + pbuf_free(p); +} + +/** + * @ingroup mld6 + * Join a group on a network interface. + * + * @param srcaddr ipv6 address of the network interface which should + * join a new group. If IP6_ADDR_ANY, join on all netifs + * @param groupaddr the ipv6 address of the group to join + * @return ERR_OK if group was joined on the netif(s), an err_t otherwise + */ +err_t +mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) +{ + err_t err = ERR_VAL; /* no matching interface */ + struct netif *netif; + + /* loop through netif's */ + netif = netif_list; + while (netif != NULL) { + /* Should we join this interface ? */ + if (ip6_addr_isany(srcaddr) || + netif_get_ip6_addr_match(netif, srcaddr) >= 0) { + err = mld6_joingroup_netif(netif, groupaddr); + if (err != ERR_OK) { + return err; + } + } + + /* proceed to next network interface */ + netif = netif->next; + } + + return err; +} + +/** + * @ingroup mld6 + * Join a group on a network interface. + * + * @param netif the network interface which should join a new group. + * @param groupaddr the ipv6 address of the group to join + * @return ERR_OK if group was joined on the netif, an err_t otherwise + */ +err_t +mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) +{ + struct mld_group *group; + + /* find group or create a new one if not found */ + group = mld6_lookfor_group(netif, groupaddr); + + if (group == NULL) { + /* Joining a new group. Create a new group entry. */ + group = mld6_new_group(netif, groupaddr); + if (group == NULL) { + return ERR_MEM; + } + + /* Activate this address on the MAC layer. */ + if (netif->mld_mac_filter != NULL) { + netif->mld_mac_filter(netif, groupaddr, NETIF_ADD_MAC_FILTER); + } + + /* Report our membership. */ + MLD6_STATS_INC(mld6.tx_report); + mld6_send(netif, group, ICMP6_TYPE_MLR); + mld6_delayed_report(group, MLD6_JOIN_DELAYING_MEMBER_TMR_MS); + } + + /* Increment group use */ + group->use++; + return ERR_OK; +} + +/** + * @ingroup mld6 + * Leave a group on a network interface. + * + * @param srcaddr ipv6 address of the network interface which should + * leave the group. If IP6_ISANY, leave on all netifs + * @param groupaddr the ipv6 address of the group to leave + * @return ERR_OK if group was left on the netif(s), an err_t otherwise + */ +err_t +mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) +{ + err_t err = ERR_VAL; /* no matching interface */ + struct netif *netif; + + /* loop through netif's */ + netif = netif_list; + while (netif != NULL) { + /* Should we leave this interface ? */ + if (ip6_addr_isany(srcaddr) || + netif_get_ip6_addr_match(netif, srcaddr) >= 0) { + err_t res = mld6_leavegroup_netif(netif, groupaddr); + if (err != ERR_OK) { + /* Store this result if we have not yet gotten a success */ + err = res; + } + } + /* proceed to next network interface */ + netif = netif->next; + } + + return err; +} + +/** + * @ingroup mld6 + * Leave a group on a network interface. + * + * @param netif the network interface which should leave the group. + * @param groupaddr the ipv6 address of the group to leave + * @return ERR_OK if group was left on the netif, an err_t otherwise + */ +err_t +mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) +{ + struct mld_group *group; + + /* find group */ + group = mld6_lookfor_group(netif, groupaddr); + + if (group != NULL) { + /* Leave if there is no other use of the group */ + if (group->use <= 1) { + /* Remove the group from the list */ + mld6_remove_group(netif, group); + + /* If we are the last reporter for this group */ + if (group->last_reporter_flag) { + MLD6_STATS_INC(mld6.tx_leave); + mld6_send(netif, group, ICMP6_TYPE_MLD); + } + + /* Disable the group at the MAC level */ + if (netif->mld_mac_filter != NULL) { + netif->mld_mac_filter(netif, groupaddr, NETIF_DEL_MAC_FILTER); + } + + /* free group struct */ + memp_free(MEMP_MLD6_GROUP, group); + } else { + /* Decrement group use */ + group->use--; + } + + /* Left group */ + return ERR_OK; + } + + /* Group not found */ + return ERR_VAL; +} + + +/** + * Periodic timer for mld processing. Must be called every + * MLD6_TMR_INTERVAL milliseconds (100). + * + * When a delaying member expires, a membership report is sent. + */ +void +mld6_tmr(void) +{ + struct netif *netif = netif_list; + + while (netif != NULL) { + struct mld_group *group = netif_mld6_data(netif); + + while (group != NULL) { + if (group->timer > 0) { + group->timer--; + if (group->timer == 0) { + /* If the state is MLD6_GROUP_DELAYING_MEMBER then we send a report for this group */ + if (group->group_state == MLD6_GROUP_DELAYING_MEMBER) { + MLD6_STATS_INC(mld6.tx_report); + mld6_send(netif, group, ICMP6_TYPE_MLR); + group->group_state = MLD6_GROUP_IDLE_MEMBER; + } + } + } + group = group->next; + } + netif = netif->next; + } +} + +/** + * Schedule a delayed membership report for a group + * + * @param group the mld_group for which "delaying" membership report + * should be sent + * @param maxresp the max resp delay provided in the query + */ +static void +mld6_delayed_report(struct mld_group *group, u16_t maxresp) +{ + /* Convert maxresp from milliseconds to tmr ticks */ + maxresp = maxresp / MLD6_TMR_INTERVAL; + if (maxresp == 0) { + maxresp = 1; + } + +#ifdef LWIP_RAND + /* Randomize maxresp. (if LWIP_RAND is supported) */ + maxresp = LWIP_RAND() % maxresp; + if (maxresp == 0) { + maxresp = 1; + } +#endif /* LWIP_RAND */ + + /* Apply timer value if no report has been scheduled already. */ + if ((group->group_state == MLD6_GROUP_IDLE_MEMBER) || + ((group->group_state == MLD6_GROUP_DELAYING_MEMBER) && + ((group->timer == 0) || (maxresp < group->timer)))) { + group->timer = maxresp; + group->group_state = MLD6_GROUP_DELAYING_MEMBER; + } +} + +/** + * Send a MLD message (report or done). + * + * An IPv6 hop-by-hop options header with a router alert option + * is prepended. + * + * @param group the group to report or quit + * @param type ICMP6_TYPE_MLR (report) or ICMP6_TYPE_MLD (done) + */ +static void +mld6_send(struct netif *netif, struct mld_group *group, u8_t type) +{ + struct mld_header *mld_hdr; + struct pbuf *p; + const ip6_addr_t *src_addr; + + /* Allocate a packet. Size is MLD header + IPv6 Hop-by-hop options header. */ + p = pbuf_alloc(PBUF_IP, sizeof(struct mld_header) + sizeof(struct ip6_hbh_hdr), PBUF_RAM); + if (p == NULL) { + MLD6_STATS_INC(mld6.memerr); + return; + } + + /* Move to make room for Hop-by-hop options header. */ + if (pbuf_header(p, -IP6_HBH_HLEN)) { + pbuf_free(p); + MLD6_STATS_INC(mld6.lenerr); + return; + } + + /* Select our source address. */ + if (!ip6_addr_isvalid(netif_ip6_addr_state(netif, 0))) { + /* This is a special case, when we are performing duplicate address detection. + * We must join the multicast group, but we don't have a valid address yet. */ + src_addr = IP6_ADDR_ANY6; + } else { + /* Use link-local address as source address. */ + src_addr = netif_ip6_addr(netif, 0); + } + + /* MLD message header pointer. */ + mld_hdr = (struct mld_header *)p->payload; + + /* Set fields. */ + mld_hdr->type = type; + mld_hdr->code = 0; + mld_hdr->chksum = 0; + mld_hdr->max_resp_delay = 0; + mld_hdr->reserved = 0; + ip6_addr_set(&(mld_hdr->multicast_address), &(group->group_address)); + +#if CHECKSUM_GEN_ICMP6 + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { + mld_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, + src_addr, &(group->group_address)); + } +#endif /* CHECKSUM_GEN_ICMP6 */ + + /* Add hop-by-hop headers options: router alert with MLD value. */ + ip6_options_add_hbh_ra(p, IP6_NEXTH_ICMP6, IP6_ROUTER_ALERT_VALUE_MLD); + + if (type == ICMP6_TYPE_MLR) { + /* Remember we were the last to report */ + group->last_reporter_flag = 1; + } + + /* Send the packet out. */ + MLD6_STATS_INC(mld6.xmit); + ip6_output_if(p, (ip6_addr_isany(src_addr)) ? NULL : src_addr, &(group->group_address), + MLD6_HL, 0, IP6_NEXTH_HOPBYHOP, netif); + pbuf_free(p); +} + +#endif /* LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c index 0b36718..cb02ad9 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c @@ -1,2102 +1,2102 @@ -/** - * @file - * - * Neighbor discovery and stateless address autoconfiguration for IPv6. - * Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 - * (Address autoconfiguration). - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#include "lwip/opt.h" - -#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/nd6.h" -#include "lwip/priv/nd6_priv.h" -#include "lwip/prot/nd6.h" -#include "lwip/prot/icmp6.h" -#include "lwip/pbuf.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/inet_chksum.h" -#include "lwip/netif.h" -#include "lwip/icmp6.h" -#include "lwip/mld6.h" -#include "lwip/ip.h" -#include "lwip/stats.h" -#include "lwip/dns.h" - -#include - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -#if LWIP_IPV6_DUP_DETECT_ATTEMPTS > IP6_ADDR_TENTATIVE_COUNT_MASK -#error LWIP_IPV6_DUP_DETECT_ATTEMPTS > IP6_ADDR_TENTATIVE_COUNT_MASK -#endif - -/* Router tables. */ -struct nd6_neighbor_cache_entry neighbor_cache[LWIP_ND6_NUM_NEIGHBORS]; -struct nd6_destination_cache_entry destination_cache[LWIP_ND6_NUM_DESTINATIONS]; -struct nd6_prefix_list_entry prefix_list[LWIP_ND6_NUM_PREFIXES]; -struct nd6_router_list_entry default_router_list[LWIP_ND6_NUM_ROUTERS]; - -/* Default values, can be updated by a RA message. */ -u32_t reachable_time = LWIP_ND6_REACHABLE_TIME; -u32_t retrans_timer = LWIP_ND6_RETRANS_TIMER; /* @todo implement this value in timer */ - -/* Index for cache entries. */ -static u8_t nd6_cached_neighbor_index; -static u8_t nd6_cached_destination_index; - -/* Multicast address holder. */ -static ip6_addr_t multicast_address; - -/* Static buffer to parse RA packet options (size of a prefix option, biggest option) */ -static u8_t nd6_ra_buffer[sizeof(struct prefix_option)]; - -/* Forward declarations. */ -static s8_t nd6_find_neighbor_cache_entry(const ip6_addr_t *ip6addr); -static s8_t nd6_new_neighbor_cache_entry(void); -static void nd6_free_neighbor_cache_entry(s8_t i); -static s8_t nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr); -static s8_t nd6_new_destination_cache_entry(void); -static s8_t nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif); -static s8_t nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif); -static s8_t nd6_get_router(const ip6_addr_t *router_addr, struct netif *netif); -static s8_t nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif); -static s8_t nd6_get_onlink_prefix(ip6_addr_t *prefix, struct netif *netif); -static s8_t nd6_new_onlink_prefix(ip6_addr_t *prefix, struct netif *netif); -static s8_t nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif); -static err_t nd6_queue_packet(s8_t neighbor_index, struct pbuf *q); - -#define ND6_SEND_FLAG_MULTICAST_DEST 0x01 -#define ND6_SEND_FLAG_ALLNODES_DEST 0x02 -static void nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags); -static void nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags); -static void nd6_send_neighbor_cache_probe(struct nd6_neighbor_cache_entry *entry, u8_t flags); -#if LWIP_IPV6_SEND_ROUTER_SOLICIT -static err_t nd6_send_rs(struct netif *netif); -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ - -#if LWIP_ND6_QUEUEING -static void nd6_free_q(struct nd6_q_entry *q); -#else /* LWIP_ND6_QUEUEING */ -#define nd6_free_q(q) pbuf_free(q) -#endif /* LWIP_ND6_QUEUEING */ -static void nd6_send_q(s8_t i); - - -/** - * Process an incoming neighbor discovery message - * - * @param p the nd packet, p->payload pointing to the icmpv6 header - * @param inp the netif on which this packet was received - */ -void -nd6_input(struct pbuf *p, struct netif *inp) -{ - u8_t msg_type; - s8_t i; - - ND6_STATS_INC(nd6.recv); - - msg_type = *((u8_t *)p->payload); - switch (msg_type) { - case ICMP6_TYPE_NA: /* Neighbor Advertisement. */ - { - struct na_header *na_hdr; - struct lladdr_option *lladdr_opt; - - /* Check that na header fits in packet. */ - if (p->len < (sizeof(struct na_header))) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - na_hdr = (struct na_header *)p->payload; - - /* Unsolicited NA?*/ - if (ip6_addr_ismulticast(ip6_current_dest_addr())) { - ip6_addr_t target_address; - - /* This is an unsolicited NA. - * link-layer changed? - * part of DAD mechanism? */ - - /* Create an aligned copy. */ - ip6_addr_set(&target_address, &(na_hdr->target_address)); - -#if LWIP_IPV6_DUP_DETECT_ATTEMPTS - /* If the target address matches this netif, it is a DAD response. */ - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (!ip6_addr_isinvalid(netif_ip6_addr_state(inp, i)) && - ip6_addr_cmp(&target_address, netif_ip6_addr(inp, i))) { - /* We are using a duplicate address. */ - netif_ip6_addr_set_state(inp, i, IP6_ADDR_INVALID); - -#if LWIP_IPV6_AUTOCONFIG - /* Check to see if this address was autoconfigured. */ - if (!ip6_addr_islinklocal(&target_address)) { - i = nd6_get_onlink_prefix(&target_address, inp); - if (i >= 0) { - /* Mark this prefix as duplicate, so that we don't use it - * to generate this address again. */ - prefix_list[i].flags |= ND6_PREFIX_AUTOCONFIG_ADDRESS_DUPLICATE; - } - } -#endif /* LWIP_IPV6_AUTOCONFIG */ - - pbuf_free(p); - return; - } - } -#endif /* LWIP_IPV6_DUP_DETECT_ATTEMPTS */ - - /* Check that link-layer address option also fits in packet. */ - if (p->len < (sizeof(struct na_header) + 2)) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct na_header)); - - if (p->len < (sizeof(struct na_header) + (lladdr_opt->length << 3))) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - /* This is an unsolicited NA, most likely there was a LLADDR change. */ - i = nd6_find_neighbor_cache_entry(&target_address); - if (i >= 0) { - if (na_hdr->flags & ND6_FLAG_OVERRIDE) { - MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); - } - } - } else { - ip6_addr_t target_address; - - /* This is a solicited NA. - * neighbor address resolution response? - * neighbor unreachability detection response? */ - - /* Create an aligned copy. */ - ip6_addr_set(&target_address, &(na_hdr->target_address)); - - /* Find the cache entry corresponding to this na. */ - i = nd6_find_neighbor_cache_entry(&target_address); - if (i < 0) { - /* We no longer care about this target address. drop it. */ - pbuf_free(p); - return; - } - - /* Update cache entry. */ - if ((na_hdr->flags & ND6_FLAG_OVERRIDE) || - (neighbor_cache[i].state == ND6_INCOMPLETE)) { - /* Check that link-layer address option also fits in packet. */ - if (p->len < (sizeof(struct na_header) + 2)) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct na_header)); - - if (p->len < (sizeof(struct na_header) + (lladdr_opt->length << 3))) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); - } - - neighbor_cache[i].netif = inp; - neighbor_cache[i].state = ND6_REACHABLE; - neighbor_cache[i].counter.reachable_time = reachable_time; - - /* Send queued packets, if any. */ - if (neighbor_cache[i].q != NULL) { - nd6_send_q(i); - } - } - - break; /* ICMP6_TYPE_NA */ - } - case ICMP6_TYPE_NS: /* Neighbor solicitation. */ - { - struct ns_header *ns_hdr; - struct lladdr_option *lladdr_opt; - u8_t accepted; - - /* Check that ns header fits in packet. */ - if (p->len < sizeof(struct ns_header)) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - ns_hdr = (struct ns_header *)p->payload; - - /* Check if there is a link-layer address provided. Only point to it if in this buffer. */ - if (p->len >= (sizeof(struct ns_header) + 2)) { - lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct ns_header)); - if (p->len < (sizeof(struct ns_header) + (lladdr_opt->length << 3))) { - lladdr_opt = NULL; - } - } else { - lladdr_opt = NULL; - } - - /* Check if the target address is configured on the receiving netif. */ - accepted = 0; - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { - if ((ip6_addr_isvalid(netif_ip6_addr_state(inp, i)) || - (ip6_addr_istentative(netif_ip6_addr_state(inp, i)) && - ip6_addr_isany(ip6_current_src_addr()))) && - ip6_addr_cmp(&(ns_hdr->target_address), netif_ip6_addr(inp, i))) { - accepted = 1; - break; - } - } - - /* NS not for us? */ - if (!accepted) { - pbuf_free(p); - return; - } - - /* Check for ANY address in src (DAD algorithm). */ - if (ip6_addr_isany(ip6_current_src_addr())) { - /* Sender is validating this address. */ - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { - if (!ip6_addr_isinvalid(netif_ip6_addr_state(inp, i)) && - ip6_addr_cmp(&(ns_hdr->target_address), netif_ip6_addr(inp, i))) { - /* Send a NA back so that the sender does not use this address. */ - nd6_send_na(inp, netif_ip6_addr(inp, i), ND6_FLAG_OVERRIDE | ND6_SEND_FLAG_ALLNODES_DEST); - if (ip6_addr_istentative(netif_ip6_addr_state(inp, i))) { - /* We shouldn't use this address either. */ - netif_ip6_addr_set_state(inp, i, IP6_ADDR_INVALID); - } - } - } - } else { - ip6_addr_t target_address; - - /* Sender is trying to resolve our address. */ - /* Verify that they included their own link-layer address. */ - if (lladdr_opt == NULL) { - /* Not a valid message. */ - pbuf_free(p); - ND6_STATS_INC(nd6.proterr); - ND6_STATS_INC(nd6.drop); - return; - } - - i = nd6_find_neighbor_cache_entry(ip6_current_src_addr()); - if (i>= 0) { - /* We already have a record for the solicitor. */ - if (neighbor_cache[i].state == ND6_INCOMPLETE) { - neighbor_cache[i].netif = inp; - MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); - - /* Delay probe in case we get confirmation of reachability from upper layer (TCP). */ - neighbor_cache[i].state = ND6_DELAY; - neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; - } - } else { - /* Add their IPv6 address and link-layer address to neighbor cache. - * We will need it at least to send a unicast NA message, but most - * likely we will also be communicating with this node soon. */ - i = nd6_new_neighbor_cache_entry(); - if (i < 0) { - /* We couldn't assign a cache entry for this neighbor. - * we won't be able to reply. drop it. */ - pbuf_free(p); - ND6_STATS_INC(nd6.memerr); - return; - } - neighbor_cache[i].netif = inp; - MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); - ip6_addr_set(&(neighbor_cache[i].next_hop_address), ip6_current_src_addr()); - - /* Receiving a message does not prove reachability: only in one direction. - * Delay probe in case we get confirmation of reachability from upper layer (TCP). */ - neighbor_cache[i].state = ND6_DELAY; - neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; - } - - /* Create an aligned copy. */ - ip6_addr_set(&target_address, &(ns_hdr->target_address)); - - /* Send back a NA for us. Allocate the reply pbuf. */ - nd6_send_na(inp, &target_address, ND6_FLAG_SOLICITED | ND6_FLAG_OVERRIDE); - } - - break; /* ICMP6_TYPE_NS */ - } - case ICMP6_TYPE_RA: /* Router Advertisement. */ - { - struct ra_header *ra_hdr; - u8_t *buffer; /* Used to copy options. */ - u16_t offset; -#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS - /* There can by multiple RDNSS options per RA */ - u8_t rdnss_server_idx = 0; -#endif /* LWIP_ND6_RDNSS_MAX_DNS_SERVERS */ - - /* Check that RA header fits in packet. */ - if (p->len < sizeof(struct ra_header)) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - ra_hdr = (struct ra_header *)p->payload; - - /* If we are sending RS messages, stop. */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - /* ensure at least one solicitation is sent */ - if ((inp->rs_count < LWIP_ND6_MAX_MULTICAST_SOLICIT) || - (nd6_send_rs(inp) == ERR_OK)) { - inp->rs_count = 0; - } -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ - - /* Get the matching default router entry. */ - i = nd6_get_router(ip6_current_src_addr(), inp); - if (i < 0) { - /* Create a new router entry. */ - i = nd6_new_router(ip6_current_src_addr(), inp); - } - - if (i < 0) { - /* Could not create a new router entry. */ - pbuf_free(p); - ND6_STATS_INC(nd6.memerr); - return; - } - - /* Re-set invalidation timer. */ - default_router_list[i].invalidation_timer = lwip_htons(ra_hdr->router_lifetime); - - /* Re-set default timer values. */ -#if LWIP_ND6_ALLOW_RA_UPDATES - if (ra_hdr->retrans_timer > 0) { - retrans_timer = lwip_htonl(ra_hdr->retrans_timer); - } - if (ra_hdr->reachable_time > 0) { - reachable_time = lwip_htonl(ra_hdr->reachable_time); - } -#endif /* LWIP_ND6_ALLOW_RA_UPDATES */ - - /* @todo set default hop limit... */ - /* ra_hdr->current_hop_limit;*/ - - /* Update flags in local entry (incl. preference). */ - default_router_list[i].flags = ra_hdr->flags; - - /* Offset to options. */ - offset = sizeof(struct ra_header); - - /* Process each option. */ - while ((p->tot_len - offset) > 0) { - if (p->len == p->tot_len) { - /* no need to copy from contiguous pbuf */ - buffer = &((u8_t*)p->payload)[offset]; - } else { - buffer = nd6_ra_buffer; - if (pbuf_copy_partial(p, buffer, sizeof(struct prefix_option), offset) != sizeof(struct prefix_option)) { - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - } - if (buffer[1] == 0) { - /* zero-length extension. drop packet */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - switch (buffer[0]) { - case ND6_OPTION_TYPE_SOURCE_LLADDR: - { - struct lladdr_option *lladdr_opt; - lladdr_opt = (struct lladdr_option *)buffer; - if ((default_router_list[i].neighbor_entry != NULL) && - (default_router_list[i].neighbor_entry->state == ND6_INCOMPLETE)) { - SMEMCPY(default_router_list[i].neighbor_entry->lladdr, lladdr_opt->addr, inp->hwaddr_len); - default_router_list[i].neighbor_entry->state = ND6_REACHABLE; - default_router_list[i].neighbor_entry->counter.reachable_time = reachable_time; - } - break; - } - case ND6_OPTION_TYPE_MTU: - { - struct mtu_option *mtu_opt; - mtu_opt = (struct mtu_option *)buffer; - if (lwip_htonl(mtu_opt->mtu) >= 1280) { -#if LWIP_ND6_ALLOW_RA_UPDATES - inp->mtu = (u16_t)lwip_htonl(mtu_opt->mtu); -#endif /* LWIP_ND6_ALLOW_RA_UPDATES */ - } - break; - } - case ND6_OPTION_TYPE_PREFIX_INFO: - { - struct prefix_option *prefix_opt; - prefix_opt = (struct prefix_option *)buffer; - - if ((prefix_opt->flags & ND6_PREFIX_FLAG_ON_LINK) && - (prefix_opt->prefix_length == 64) && - !ip6_addr_islinklocal(&(prefix_opt->prefix))) { - /* Add to on-link prefix list. */ - s8_t prefix; - ip6_addr_t prefix_addr; - - /* Get a memory-aligned copy of the prefix. */ - ip6_addr_set(&prefix_addr, &(prefix_opt->prefix)); - - /* find cache entry for this prefix. */ - prefix = nd6_get_onlink_prefix(&prefix_addr, inp); - if (prefix < 0) { - /* Create a new cache entry. */ - prefix = nd6_new_onlink_prefix(&prefix_addr, inp); - } - if (prefix >= 0) { - prefix_list[prefix].invalidation_timer = lwip_htonl(prefix_opt->valid_lifetime); - -#if LWIP_IPV6_AUTOCONFIG - if (prefix_opt->flags & ND6_PREFIX_FLAG_AUTONOMOUS) { - /* Mark prefix as autonomous, so that address autoconfiguration can take place. - * Only OR flag, so that we don't over-write other flags (such as ADDRESS_DUPLICATE)*/ - prefix_list[prefix].flags |= ND6_PREFIX_AUTOCONFIG_AUTONOMOUS; - } -#endif /* LWIP_IPV6_AUTOCONFIG */ - } - } - - break; - } - case ND6_OPTION_TYPE_ROUTE_INFO: - /* @todo implement preferred routes. - struct route_option * route_opt; - route_opt = (struct route_option *)buffer;*/ - - break; -#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS - case ND6_OPTION_TYPE_RDNSS: - { - u8_t num, n; - struct rdnss_option * rdnss_opt; - - rdnss_opt = (struct rdnss_option *)buffer; - num = (rdnss_opt->length - 1) / 2; - for (n = 0; (rdnss_server_idx < DNS_MAX_SERVERS) && (n < num); n++) { - ip_addr_t rdnss_address; - - /* Get a memory-aligned copy of the prefix. */ - ip_addr_copy_from_ip6(rdnss_address, rdnss_opt->rdnss_address[n]); - - if (htonl(rdnss_opt->lifetime) > 0) { - /* TODO implement Lifetime > 0 */ - dns_setserver(rdnss_server_idx++, &rdnss_address); - } else { - /* TODO implement DNS removal in dns.c */ - u8_t s; - for (s = 0; s < DNS_MAX_SERVERS; s++) { - const ip_addr_t *addr = dns_getserver(s); - if(ip_addr_cmp(addr, &rdnss_address)) { - dns_setserver(s, NULL); - } - } - } - } - break; - } -#endif /* LWIP_ND6_RDNSS_MAX_DNS_SERVERS */ - default: - /* Unrecognized option, abort. */ - ND6_STATS_INC(nd6.proterr); - break; - } - /* option length is checked earlier to be non-zero to make sure loop ends */ - offset += 8 * ((u16_t)buffer[1]); - } - - break; /* ICMP6_TYPE_RA */ - } - case ICMP6_TYPE_RD: /* Redirect */ - { - struct redirect_header *redir_hdr; - struct lladdr_option *lladdr_opt; - ip6_addr_t tmp; - - /* Check that Redir header fits in packet. */ - if (p->len < sizeof(struct redirect_header)) { - /* @todo debug message */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - redir_hdr = (struct redirect_header *)p->payload; - - if (p->len >= (sizeof(struct redirect_header) + 2)) { - lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct redirect_header)); - if (p->len < (sizeof(struct redirect_header) + (lladdr_opt->length << 3))) { - lladdr_opt = NULL; - } - } else { - lladdr_opt = NULL; - } - - /* Copy original destination address to current source address, to have an aligned copy. */ - ip6_addr_set(&tmp, &(redir_hdr->destination_address)); - - /* Find dest address in cache */ - i = nd6_find_destination_cache_entry(&tmp); - if (i < 0) { - /* Destination not in cache, drop packet. */ - pbuf_free(p); - return; - } - - /* Set the new target address. */ - ip6_addr_set(&(destination_cache[i].next_hop_addr), &(redir_hdr->target_address)); - - /* If Link-layer address of other router is given, try to add to neighbor cache. */ - if (lladdr_opt != NULL) { - if (lladdr_opt->type == ND6_OPTION_TYPE_TARGET_LLADDR) { - /* Copy target address to current source address, to have an aligned copy. */ - ip6_addr_set(&tmp, &(redir_hdr->target_address)); - - i = nd6_find_neighbor_cache_entry(&tmp); - if (i < 0) { - i = nd6_new_neighbor_cache_entry(); - if (i >= 0) { - neighbor_cache[i].netif = inp; - MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); - ip6_addr_set(&(neighbor_cache[i].next_hop_address), &tmp); - - /* Receiving a message does not prove reachability: only in one direction. - * Delay probe in case we get confirmation of reachability from upper layer (TCP). */ - neighbor_cache[i].state = ND6_DELAY; - neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; - } - } - if (i >= 0) { - if (neighbor_cache[i].state == ND6_INCOMPLETE) { - MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); - /* Receiving a message does not prove reachability: only in one direction. - * Delay probe in case we get confirmation of reachability from upper layer (TCP). */ - neighbor_cache[i].state = ND6_DELAY; - neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; - } - } - } - } - break; /* ICMP6_TYPE_RD */ - } - case ICMP6_TYPE_PTB: /* Packet too big */ - { - struct icmp6_hdr *icmp6hdr; /* Packet too big message */ - struct ip6_hdr *ip6hdr; /* IPv6 header of the packet which caused the error */ - u32_t pmtu; - ip6_addr_t tmp; - - /* Check that ICMPv6 header + IPv6 header fit in payload */ - if (p->len < (sizeof(struct icmp6_hdr) + IP6_HLEN)) { - /* drop short packets */ - pbuf_free(p); - ND6_STATS_INC(nd6.lenerr); - ND6_STATS_INC(nd6.drop); - return; - } - - icmp6hdr = (struct icmp6_hdr *)p->payload; - ip6hdr = (struct ip6_hdr *)((u8_t*)p->payload + sizeof(struct icmp6_hdr)); - - /* Copy original destination address to current source address, to have an aligned copy. */ - ip6_addr_set(&tmp, &(ip6hdr->dest)); - - /* Look for entry in destination cache. */ - i = nd6_find_destination_cache_entry(&tmp); - if (i < 0) { - /* Destination not in cache, drop packet. */ - pbuf_free(p); - return; - } - - /* Change the Path MTU. */ - pmtu = lwip_htonl(icmp6hdr->data); - destination_cache[i].pmtu = (u16_t)LWIP_MIN(pmtu, 0xFFFF); - - break; /* ICMP6_TYPE_PTB */ - } - - default: - ND6_STATS_INC(nd6.proterr); - ND6_STATS_INC(nd6.drop); - break; /* default */ - } - - pbuf_free(p); -} - - -/** - * Periodic timer for Neighbor discovery functions: - * - * - Update neighbor reachability states - * - Update destination cache entries age - * - Update invalidation timers of default routers and on-link prefixes - * - Perform duplicate address detection (DAD) for our addresses - * - Send router solicitations - */ -void -nd6_tmr(void) -{ - s8_t i; - struct netif *netif; - - /* Process neighbor entries. */ - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - switch (neighbor_cache[i].state) { - case ND6_INCOMPLETE: - if ((neighbor_cache[i].counter.probes_sent >= LWIP_ND6_MAX_MULTICAST_SOLICIT) && - (!neighbor_cache[i].isrouter)) { - /* Retries exceeded. */ - nd6_free_neighbor_cache_entry(i); - } else { - /* Send a NS for this entry. */ - neighbor_cache[i].counter.probes_sent++; - nd6_send_neighbor_cache_probe(&neighbor_cache[i], ND6_SEND_FLAG_MULTICAST_DEST); - } - break; - case ND6_REACHABLE: - /* Send queued packets, if any are left. Should have been sent already. */ - if (neighbor_cache[i].q != NULL) { - nd6_send_q(i); - } - if (neighbor_cache[i].counter.reachable_time <= ND6_TMR_INTERVAL) { - /* Change to stale state. */ - neighbor_cache[i].state = ND6_STALE; - neighbor_cache[i].counter.stale_time = 0; - } else { - neighbor_cache[i].counter.reachable_time -= ND6_TMR_INTERVAL; - } - break; - case ND6_STALE: - neighbor_cache[i].counter.stale_time++; - break; - case ND6_DELAY: - if (neighbor_cache[i].counter.delay_time <= 1) { - /* Change to PROBE state. */ - neighbor_cache[i].state = ND6_PROBE; - neighbor_cache[i].counter.probes_sent = 0; - } else { - neighbor_cache[i].counter.delay_time--; - } - break; - case ND6_PROBE: - if ((neighbor_cache[i].counter.probes_sent >= LWIP_ND6_MAX_MULTICAST_SOLICIT) && - (!neighbor_cache[i].isrouter)) { - /* Retries exceeded. */ - nd6_free_neighbor_cache_entry(i); - } else { - /* Send a NS for this entry. */ - neighbor_cache[i].counter.probes_sent++; - nd6_send_neighbor_cache_probe(&neighbor_cache[i], 0); - } - break; - case ND6_NO_ENTRY: - default: - /* Do nothing. */ - break; - } - } - - /* Process destination entries. */ - for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { - destination_cache[i].age++; - } - - /* Process router entries. */ - for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if (default_router_list[i].neighbor_entry != NULL) { - /* Active entry. */ - if (default_router_list[i].invalidation_timer > 0) { - default_router_list[i].invalidation_timer -= ND6_TMR_INTERVAL / 1000; - } - if (default_router_list[i].invalidation_timer < ND6_TMR_INTERVAL / 1000) { - /* Less than 1 second remaining. Clear this entry. */ - default_router_list[i].neighbor_entry->isrouter = 0; - default_router_list[i].neighbor_entry = NULL; - default_router_list[i].invalidation_timer = 0; - default_router_list[i].flags = 0; - } - } - } - - /* Process prefix entries. */ - for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { - if (prefix_list[i].netif != NULL) { - if (prefix_list[i].invalidation_timer < ND6_TMR_INTERVAL / 1000) { - /* Entry timed out, remove it */ - prefix_list[i].invalidation_timer = 0; - -#if LWIP_IPV6_AUTOCONFIG - /* If any addresses were configured with this prefix, remove them */ - if (prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED) { - s8_t j; - - for (j = 1; j < LWIP_IPV6_NUM_ADDRESSES; j++) { - if ((netif_ip6_addr_state(prefix_list[i].netif, j) != IP6_ADDR_INVALID) && - ip6_addr_netcmp(&prefix_list[i].prefix, netif_ip6_addr(prefix_list[i].netif, j))) { - netif_ip6_addr_set_state(prefix_list[i].netif, j, IP6_ADDR_INVALID); - prefix_list[i].flags = 0; - - /* Exit loop. */ - break; - } - } - } -#endif /* LWIP_IPV6_AUTOCONFIG */ - - prefix_list[i].netif = NULL; - prefix_list[i].flags = 0; - } else { - prefix_list[i].invalidation_timer -= ND6_TMR_INTERVAL / 1000; - -#if LWIP_IPV6_AUTOCONFIG - /* Initiate address autoconfiguration for this prefix, if conditions are met. */ - if (prefix_list[i].netif->ip6_autoconfig_enabled && - (prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_AUTONOMOUS) && - !(prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED)) { - s8_t j; - /* Try to get an address on this netif that is invalid. - * Skip 0 index (link-local address) */ - for (j = 1; j < LWIP_IPV6_NUM_ADDRESSES; j++) { - if (netif_ip6_addr_state(prefix_list[i].netif, j) == IP6_ADDR_INVALID) { - /* Generate an address using this prefix and interface ID from link-local address. */ - netif_ip6_addr_set_parts(prefix_list[i].netif, j, - prefix_list[i].prefix.addr[0], prefix_list[i].prefix.addr[1], - netif_ip6_addr(prefix_list[i].netif, 0)->addr[2], netif_ip6_addr(prefix_list[i].netif, 0)->addr[3]); - - /* Mark it as tentative (DAD will be performed if configured). */ - netif_ip6_addr_set_state(prefix_list[i].netif, j, IP6_ADDR_TENTATIVE); - - /* Mark this prefix with ADDRESS_GENERATED, so that we don't try again. */ - prefix_list[i].flags |= ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED; - - /* Exit loop. */ - break; - } - } - } -#endif /* LWIP_IPV6_AUTOCONFIG */ - } - } - } - - - /* Process our own addresses, if DAD configured. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { - u8_t addr_state = netif_ip6_addr_state(netif, i); - if (ip6_addr_istentative(addr_state)) { - if ((addr_state & IP6_ADDR_TENTATIVE_COUNT_MASK) >= LWIP_IPV6_DUP_DETECT_ATTEMPTS) { - /* No NA received in response. Mark address as valid. */ - netif_ip6_addr_set_state(netif, i, IP6_ADDR_PREFERRED); - /* @todo implement preferred and valid lifetimes. */ - } else if (netif->flags & NETIF_FLAG_UP) { - /* Send a NS for this address. */ - nd6_send_ns(netif, netif_ip6_addr(netif, i), ND6_SEND_FLAG_MULTICAST_DEST); - /* tentative: set next state by increasing by one */ - netif_ip6_addr_set_state(netif, i, addr_state + 1); - /* @todo send max 1 NS per tmr call? enable return*/ - /*return;*/ - } - } - } - } - -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - /* Send router solicitation messages, if necessary. */ - for (netif = netif_list; netif != NULL; netif = netif->next) { - if ((netif->rs_count > 0) && (netif->flags & NETIF_FLAG_UP) && - (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, 0)))) { - if (nd6_send_rs(netif) == ERR_OK) { - netif->rs_count--; - } - } - } -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ - -} - -/** Send a neighbor solicitation message for a specific neighbor cache entry - * - * @param entry the neightbor cache entry for wich to send the message - * @param flags one of ND6_SEND_FLAG_* - */ -static void -nd6_send_neighbor_cache_probe(struct nd6_neighbor_cache_entry *entry, u8_t flags) -{ - nd6_send_ns(entry->netif, &entry->next_hop_address, flags); -} - -/** - * Send a neighbor solicitation message - * - * @param netif the netif on which to send the message - * @param target_addr the IPv6 target address for the ND message - * @param flags one of ND6_SEND_FLAG_* - */ -static void -nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) -{ - struct ns_header *ns_hdr; - struct pbuf *p; - const ip6_addr_t *src_addr; - u16_t lladdr_opt_len; - - if (ip6_addr_isvalid(netif_ip6_addr_state(netif,0))) { - /* Use link-local address as source address. */ - src_addr = netif_ip6_addr(netif, 0); - /* calculate option length (in 8-byte-blocks) */ - lladdr_opt_len = ((netif->hwaddr_len + 2) + 7) >> 3; - } else { - src_addr = IP6_ADDR_ANY6; - /* Option "MUST NOT be included when the source IP address is the unspecified address." */ - lladdr_opt_len = 0; - } - - /* Allocate a packet. */ - p = pbuf_alloc(PBUF_IP, sizeof(struct ns_header) + (lladdr_opt_len << 3), PBUF_RAM); - if (p == NULL) { - ND6_STATS_INC(nd6.memerr); - return; - } - - /* Set fields. */ - ns_hdr = (struct ns_header *)p->payload; - - ns_hdr->type = ICMP6_TYPE_NS; - ns_hdr->code = 0; - ns_hdr->chksum = 0; - ns_hdr->reserved = 0; - ip6_addr_set(&(ns_hdr->target_address), target_addr); - - if (lladdr_opt_len != 0) { - struct lladdr_option *lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct ns_header)); - lladdr_opt->type = ND6_OPTION_TYPE_SOURCE_LLADDR; - lladdr_opt->length = (u8_t)lladdr_opt_len; - SMEMCPY(lladdr_opt->addr, netif->hwaddr, netif->hwaddr_len); - } - - /* Generate the solicited node address for the target address. */ - if (flags & ND6_SEND_FLAG_MULTICAST_DEST) { - ip6_addr_set_solicitednode(&multicast_address, target_addr->addr[3]); - target_addr = &multicast_address; - } - -#if CHECKSUM_GEN_ICMP6 - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { - ns_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, - target_addr); - } -#endif /* CHECKSUM_GEN_ICMP6 */ - - /* Send the packet out. */ - ND6_STATS_INC(nd6.xmit); - ip6_output_if(p, (src_addr == IP6_ADDR_ANY6) ? NULL : src_addr, target_addr, - LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); - pbuf_free(p); -} - -/** - * Send a neighbor advertisement message - * - * @param netif the netif on which to send the message - * @param target_addr the IPv6 target address for the ND message - * @param flags one of ND6_SEND_FLAG_* - */ -static void -nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) -{ - struct na_header *na_hdr; - struct lladdr_option *lladdr_opt; - struct pbuf *p; - const ip6_addr_t *src_addr; - const ip6_addr_t *dest_addr; - u16_t lladdr_opt_len; - - /* Use link-local address as source address. */ - /* src_addr = netif_ip6_addr(netif, 0); */ - /* Use target address as source address. */ - src_addr = target_addr; - - /* Allocate a packet. */ - lladdr_opt_len = ((netif->hwaddr_len + 2) >> 3) + (((netif->hwaddr_len + 2) & 0x07) ? 1 : 0); - p = pbuf_alloc(PBUF_IP, sizeof(struct na_header) + (lladdr_opt_len << 3), PBUF_RAM); - if (p == NULL) { - ND6_STATS_INC(nd6.memerr); - return; - } - - /* Set fields. */ - na_hdr = (struct na_header *)p->payload; - lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct na_header)); - - na_hdr->type = ICMP6_TYPE_NA; - na_hdr->code = 0; - na_hdr->chksum = 0; - na_hdr->flags = flags & 0xf0; - na_hdr->reserved[0] = 0; - na_hdr->reserved[1] = 0; - na_hdr->reserved[2] = 0; - ip6_addr_set(&(na_hdr->target_address), target_addr); - - lladdr_opt->type = ND6_OPTION_TYPE_TARGET_LLADDR; - lladdr_opt->length = (u8_t)lladdr_opt_len; - SMEMCPY(lladdr_opt->addr, netif->hwaddr, netif->hwaddr_len); - - /* Generate the solicited node address for the target address. */ - if (flags & ND6_SEND_FLAG_MULTICAST_DEST) { - ip6_addr_set_solicitednode(&multicast_address, target_addr->addr[3]); - dest_addr = &multicast_address; - } else if (flags & ND6_SEND_FLAG_ALLNODES_DEST) { - ip6_addr_set_allnodes_linklocal(&multicast_address); - dest_addr = &multicast_address; - } else { - dest_addr = ip6_current_src_addr(); - } - -#if CHECKSUM_GEN_ICMP6 - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { - na_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, - dest_addr); - } -#endif /* CHECKSUM_GEN_ICMP6 */ - - /* Send the packet out. */ - ND6_STATS_INC(nd6.xmit); - ip6_output_if(p, src_addr, dest_addr, - LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); - pbuf_free(p); -} - -#if LWIP_IPV6_SEND_ROUTER_SOLICIT -/** - * Send a router solicitation message - * - * @param netif the netif on which to send the message - */ -static err_t -nd6_send_rs(struct netif *netif) -{ - struct rs_header *rs_hdr; - struct lladdr_option *lladdr_opt; - struct pbuf *p; - const ip6_addr_t *src_addr; - err_t err; - u16_t lladdr_opt_len = 0; - - /* Link-local source address, or unspecified address? */ - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, 0))) { - src_addr = netif_ip6_addr(netif, 0); - } else { - src_addr = IP6_ADDR_ANY6; - } - - /* Generate the all routers target address. */ - ip6_addr_set_allrouters_linklocal(&multicast_address); - - /* Allocate a packet. */ - if (src_addr != IP6_ADDR_ANY6) { - lladdr_opt_len = ((netif->hwaddr_len + 2) >> 3) + (((netif->hwaddr_len + 2) & 0x07) ? 1 : 0); - } - p = pbuf_alloc(PBUF_IP, sizeof(struct rs_header) + (lladdr_opt_len << 3), PBUF_RAM); - if (p == NULL) { - ND6_STATS_INC(nd6.memerr); - return ERR_BUF; - } - - /* Set fields. */ - rs_hdr = (struct rs_header *)p->payload; - - rs_hdr->type = ICMP6_TYPE_RS; - rs_hdr->code = 0; - rs_hdr->chksum = 0; - rs_hdr->reserved = 0; - - if (src_addr != IP6_ADDR_ANY6) { - /* Include our hw address. */ - lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct rs_header)); - lladdr_opt->type = ND6_OPTION_TYPE_SOURCE_LLADDR; - lladdr_opt->length = (u8_t)lladdr_opt_len; - SMEMCPY(lladdr_opt->addr, netif->hwaddr, netif->hwaddr_len); - } - -#if CHECKSUM_GEN_ICMP6 - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { - rs_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, - &multicast_address); - } -#endif /* CHECKSUM_GEN_ICMP6 */ - - /* Send the packet out. */ - ND6_STATS_INC(nd6.xmit); - - err = ip6_output_if(p, (src_addr == IP6_ADDR_ANY6) ? NULL : src_addr, &multicast_address, - LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); - pbuf_free(p); - - return err; -} -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ - -/** - * Search for a neighbor cache entry - * - * @param ip6addr the IPv6 address of the neighbor - * @return The neighbor cache entry index that matched, -1 if no - * entry is found - */ -static s8_t -nd6_find_neighbor_cache_entry(const ip6_addr_t *ip6addr) -{ - s8_t i; - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if (ip6_addr_cmp(ip6addr, &(neighbor_cache[i].next_hop_address))) { - return i; - } - } - return -1; -} - -/** - * Create a new neighbor cache entry. - * - * If no unused entry is found, will try to recycle an old entry - * according to ad-hoc "age" heuristic. - * - * @return The neighbor cache entry index that was created, -1 if no - * entry could be created - */ -static s8_t -nd6_new_neighbor_cache_entry(void) -{ - s8_t i; - s8_t j; - u32_t time; - - - /* First, try to find an empty entry. */ - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if (neighbor_cache[i].state == ND6_NO_ENTRY) { - return i; - } - } - - /* We need to recycle an entry. in general, do not recycle if it is a router. */ - - /* Next, try to find a Stale entry. */ - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if ((neighbor_cache[i].state == ND6_STALE) && - (!neighbor_cache[i].isrouter)) { - nd6_free_neighbor_cache_entry(i); - return i; - } - } - - /* Next, try to find a Probe entry. */ - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if ((neighbor_cache[i].state == ND6_PROBE) && - (!neighbor_cache[i].isrouter)) { - nd6_free_neighbor_cache_entry(i); - return i; - } - } - - /* Next, try to find a Delayed entry. */ - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if ((neighbor_cache[i].state == ND6_DELAY) && - (!neighbor_cache[i].isrouter)) { - nd6_free_neighbor_cache_entry(i); - return i; - } - } - - /* Next, try to find the oldest reachable entry. */ - time = 0xfffffffful; - j = -1; - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if ((neighbor_cache[i].state == ND6_REACHABLE) && - (!neighbor_cache[i].isrouter)) { - if (neighbor_cache[i].counter.reachable_time < time) { - j = i; - time = neighbor_cache[i].counter.reachable_time; - } - } - } - if (j >= 0) { - nd6_free_neighbor_cache_entry(j); - return j; - } - - /* Next, find oldest incomplete entry without queued packets. */ - time = 0; - j = -1; - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if ( - (neighbor_cache[i].q == NULL) && - (neighbor_cache[i].state == ND6_INCOMPLETE) && - (!neighbor_cache[i].isrouter)) { - if (neighbor_cache[i].counter.probes_sent >= time) { - j = i; - time = neighbor_cache[i].counter.probes_sent; - } - } - } - if (j >= 0) { - nd6_free_neighbor_cache_entry(j); - return j; - } - - /* Next, find oldest incomplete entry with queued packets. */ - time = 0; - j = -1; - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if ((neighbor_cache[i].state == ND6_INCOMPLETE) && - (!neighbor_cache[i].isrouter)) { - if (neighbor_cache[i].counter.probes_sent >= time) { - j = i; - time = neighbor_cache[i].counter.probes_sent; - } - } - } - if (j >= 0) { - nd6_free_neighbor_cache_entry(j); - return j; - } - - /* No more entries to try. */ - return -1; -} - -/** - * Will free any resources associated with a neighbor cache - * entry, and will mark it as unused. - * - * @param i the neighbor cache entry index to free - */ -static void -nd6_free_neighbor_cache_entry(s8_t i) -{ - if ((i < 0) || (i >= LWIP_ND6_NUM_NEIGHBORS)) { - return; - } - if (neighbor_cache[i].isrouter) { - /* isrouter needs to be cleared before deleting a neighbor cache entry */ - return; - } - - /* Free any queued packets. */ - if (neighbor_cache[i].q != NULL) { - nd6_free_q(neighbor_cache[i].q); - neighbor_cache[i].q = NULL; - } - - neighbor_cache[i].state = ND6_NO_ENTRY; - neighbor_cache[i].isrouter = 0; - neighbor_cache[i].netif = NULL; - neighbor_cache[i].counter.reachable_time = 0; - ip6_addr_set_zero(&(neighbor_cache[i].next_hop_address)); -} - -/** - * Search for a destination cache entry - * - * @param ip6addr the IPv6 address of the destination - * @return The destination cache entry index that matched, -1 if no - * entry is found - */ -static s8_t -nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr) -{ - s8_t i; - for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { - if (ip6_addr_cmp(ip6addr, &(destination_cache[i].destination_addr))) { - return i; - } - } - return -1; -} - -/** - * Create a new destination cache entry. If no unused entry is found, - * will recycle oldest entry. - * - * @return The destination cache entry index that was created, -1 if no - * entry was created - */ -static s8_t -nd6_new_destination_cache_entry(void) -{ - s8_t i, j; - u32_t age; - - /* Find an empty entry. */ - for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { - if (ip6_addr_isany(&(destination_cache[i].destination_addr))) { - return i; - } - } - - /* Find oldest entry. */ - age = 0; - j = LWIP_ND6_NUM_DESTINATIONS - 1; - for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { - if (destination_cache[i].age > age) { - j = i; - } - } - - return j; -} - -/** - * Clear the destination cache. - * - * This operation may be necessary for consistency in the light of changing - * local addresses and/or use of the gateway hook. - */ -void -nd6_clear_destination_cache(void) -{ - int i; - - for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { - ip6_addr_set_any(&destination_cache[i].destination_addr); - } -} - -/** - * Determine whether an address matches an on-link prefix. - * - * @param ip6addr the IPv6 address to match - * @return 1 if the address is on-link, 0 otherwise - */ -static s8_t -nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif) -{ - s8_t i; - for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { - if ((prefix_list[i].netif == netif) && - (prefix_list[i].invalidation_timer > 0) && - ip6_addr_netcmp(ip6addr, &(prefix_list[i].prefix))) { - return 1; - } - } - /* Check to see if address prefix matches a (manually?) configured address. */ - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_netcmp(ip6addr, netif_ip6_addr(netif, i))) { - return 1; - } - } - return 0; -} - -/** - * Select a default router for a destination. - * - * @param ip6addr the destination address - * @param netif the netif for the outgoing packet, if known - * @return the default router entry index, or -1 if no suitable - * router is found - */ -static s8_t -nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif) -{ - s8_t i; - /* last_router is used for round-robin router selection (as recommended - * in RFC). This is more robust in case one router is not reachable, - * we are not stuck trying to resolve it. */ - static s8_t last_router; - (void)ip6addr; /* @todo match preferred routes!! (must implement ND6_OPTION_TYPE_ROUTE_INFO) */ - - /* @todo: implement default router preference */ - - /* Look for reachable routers. */ - for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if (++last_router >= LWIP_ND6_NUM_ROUTERS) { - last_router = 0; - } - if ((default_router_list[i].neighbor_entry != NULL) && - (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1) && - (default_router_list[i].invalidation_timer > 0) && - (default_router_list[i].neighbor_entry->state == ND6_REACHABLE)) { - return i; - } - } - - /* Look for router in other reachability states, but still valid according to timer. */ - for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if (++last_router >= LWIP_ND6_NUM_ROUTERS) { - last_router = 0; - } - if ((default_router_list[i].neighbor_entry != NULL) && - (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1) && - (default_router_list[i].invalidation_timer > 0)) { - return i; - } - } - - /* Look for any router for which we have any information at all. */ - for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if (++last_router >= LWIP_ND6_NUM_ROUTERS) { - last_router = 0; - } - if (default_router_list[i].neighbor_entry != NULL && - (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1)) { - return i; - } - } - - /* no suitable router found. */ - return -1; -} - -/** - * Find a router-announced route to the given destination. - * - * The caller is responsible for checking whether the returned netif, if any, - * is in a suitable state (up, link up) to be used for packet transmission. - * - * @param ip6addr the destination IPv6 address - * @return the netif to use for the destination, or NULL if none found - */ -struct netif * -nd6_find_route(const ip6_addr_t *ip6addr) -{ - s8_t i; - - i = nd6_select_router(ip6addr, NULL); - if (i >= 0) { - if (default_router_list[i].neighbor_entry != NULL) { - return default_router_list[i].neighbor_entry->netif; /* may be NULL */ - } - } - - return NULL; -} - -/** - * Find an entry for a default router. - * - * @param router_addr the IPv6 address of the router - * @param netif the netif on which the router is found, if known - * @return the index of the router entry, or -1 if not found - */ -static s8_t -nd6_get_router(const ip6_addr_t *router_addr, struct netif *netif) -{ - s8_t i; - - /* Look for router. */ - for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { - if ((default_router_list[i].neighbor_entry != NULL) && - ((netif != NULL) ? netif == default_router_list[i].neighbor_entry->netif : 1) && - ip6_addr_cmp(router_addr, &(default_router_list[i].neighbor_entry->next_hop_address))) { - return i; - } - } - - /* router not found. */ - return -1; -} - -/** - * Create a new entry for a default router. - * - * @param router_addr the IPv6 address of the router - * @param netif the netif on which the router is connected, if known - * @return the index on the router table, or -1 if could not be created - */ -static s8_t -nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif) -{ - s8_t router_index; - s8_t free_router_index; - s8_t neighbor_index; - - /* Do we have a neighbor entry for this router? */ - neighbor_index = nd6_find_neighbor_cache_entry(router_addr); - if (neighbor_index < 0) { - /* Create a neighbor entry for this router. */ - neighbor_index = nd6_new_neighbor_cache_entry(); - if (neighbor_index < 0) { - /* Could not create neighbor entry for this router. */ - return -1; - } - ip6_addr_set(&(neighbor_cache[neighbor_index].next_hop_address), router_addr); - neighbor_cache[neighbor_index].netif = netif; - neighbor_cache[neighbor_index].q = NULL; - neighbor_cache[neighbor_index].state = ND6_INCOMPLETE; - neighbor_cache[neighbor_index].counter.probes_sent = 1; - nd6_send_neighbor_cache_probe(&neighbor_cache[neighbor_index], ND6_SEND_FLAG_MULTICAST_DEST); - } - - /* Mark neighbor as router. */ - neighbor_cache[neighbor_index].isrouter = 1; - - /* Look for empty entry. */ - free_router_index = LWIP_ND6_NUM_ROUTERS; - for (router_index = LWIP_ND6_NUM_ROUTERS - 1; router_index >= 0; router_index--) { - /* check if router already exists (this is a special case for 2 netifs on the same subnet - - e.g. wifi and cable) */ - if(default_router_list[router_index].neighbor_entry == &(neighbor_cache[neighbor_index])){ - return router_index; - } - if (default_router_list[router_index].neighbor_entry == NULL) { - /* remember lowest free index to create a new entry */ - free_router_index = router_index; - } - } - if (free_router_index < LWIP_ND6_NUM_ROUTERS) { - default_router_list[free_router_index].neighbor_entry = &(neighbor_cache[neighbor_index]); - return free_router_index; - } - - /* Could not create a router entry. */ - - /* Mark neighbor entry as not-router. Entry might be useful as neighbor still. */ - neighbor_cache[neighbor_index].isrouter = 0; - - /* router not found. */ - return -1; -} - -/** - * Find the cached entry for an on-link prefix. - * - * @param prefix the IPv6 prefix that is on-link - * @param netif the netif on which the prefix is on-link - * @return the index on the prefix table, or -1 if not found - */ -static s8_t -nd6_get_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) -{ - s8_t i; - - /* Look for prefix in list. */ - for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) { - if ((ip6_addr_netcmp(&(prefix_list[i].prefix), prefix)) && - (prefix_list[i].netif == netif)) { - return i; - } - } - - /* Entry not available. */ - return -1; -} - -/** - * Creates a new entry for an on-link prefix. - * - * @param prefix the IPv6 prefix that is on-link - * @param netif the netif on which the prefix is on-link - * @return the index on the prefix table, or -1 if not created - */ -static s8_t -nd6_new_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) -{ - s8_t i; - - /* Create new entry. */ - for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) { - if ((prefix_list[i].netif == NULL) || - (prefix_list[i].invalidation_timer == 0)) { - /* Found empty prefix entry. */ - prefix_list[i].netif = netif; - ip6_addr_set(&(prefix_list[i].prefix), prefix); -#if LWIP_IPV6_AUTOCONFIG - prefix_list[i].flags = 0; -#endif /* LWIP_IPV6_AUTOCONFIG */ - return i; - } - } - - /* Entry not available. */ - return -1; -} - -/** - * Determine the next hop for a destination. Will determine if the - * destination is on-link, else a suitable on-link router is selected. - * - * The last entry index is cached for fast entry search. - * - * @param ip6addr the destination address - * @param netif the netif on which the packet will be sent - * @return the neighbor cache entry for the next hop, ERR_RTE if no - * suitable next hop was found, ERR_MEM if no cache entry - * could be created - */ -static s8_t -nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif) -{ -#ifdef LWIP_HOOK_ND6_GET_GW - const ip6_addr_t *next_hop_addr; -#endif /* LWIP_HOOK_ND6_GET_GW */ - s8_t i; - -#if LWIP_NETIF_HWADDRHINT - if (netif->addr_hint != NULL) { - /* per-pcb cached entry was given */ - u8_t addr_hint = *(netif->addr_hint); - if (addr_hint < LWIP_ND6_NUM_DESTINATIONS) { - nd6_cached_destination_index = addr_hint; - } - } -#endif /* LWIP_NETIF_HWADDRHINT */ - - /* Look for ip6addr in destination cache. */ - if (ip6_addr_cmp(ip6addr, &(destination_cache[nd6_cached_destination_index].destination_addr))) { - /* the cached entry index is the right one! */ - /* do nothing. */ - ND6_STATS_INC(nd6.cachehit); - } else { - /* Search destination cache. */ - i = nd6_find_destination_cache_entry(ip6addr); - if (i >= 0) { - /* found destination entry. make it our new cached index. */ - nd6_cached_destination_index = i; - } else { - /* Not found. Create a new destination entry. */ - i = nd6_new_destination_cache_entry(); - if (i >= 0) { - /* got new destination entry. make it our new cached index. */ - nd6_cached_destination_index = i; - } else { - /* Could not create a destination cache entry. */ - return ERR_MEM; - } - - /* Copy dest address to destination cache. */ - ip6_addr_set(&(destination_cache[nd6_cached_destination_index].destination_addr), ip6addr); - - /* Now find the next hop. is it a neighbor? */ - if (ip6_addr_islinklocal(ip6addr) || - nd6_is_prefix_in_netif(ip6addr, netif)) { - /* Destination in local link. */ - destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; - ip6_addr_copy(destination_cache[nd6_cached_destination_index].next_hop_addr, destination_cache[nd6_cached_destination_index].destination_addr); -#ifdef LWIP_HOOK_ND6_GET_GW - } else if ((next_hop_addr = LWIP_HOOK_ND6_GET_GW(netif, ip6addr)) != NULL) { - /* Next hop for destination provided by hook function. */ - destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; - ip6_addr_set(&destination_cache[nd6_cached_destination_index].next_hop_addr, next_hop_addr); -#endif /* LWIP_HOOK_ND6_GET_GW */ - } else { - /* We need to select a router. */ - i = nd6_select_router(ip6addr, netif); - if (i < 0) { - /* No router found. */ - ip6_addr_set_any(&(destination_cache[nd6_cached_destination_index].destination_addr)); - return ERR_RTE; - } - destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; /* Start with netif mtu, correct through ICMPv6 if necessary */ - ip6_addr_copy(destination_cache[nd6_cached_destination_index].next_hop_addr, default_router_list[i].neighbor_entry->next_hop_address); - } - } - } - -#if LWIP_NETIF_HWADDRHINT - if (netif->addr_hint != NULL) { - /* per-pcb cached entry was given */ - *(netif->addr_hint) = nd6_cached_destination_index; - } -#endif /* LWIP_NETIF_HWADDRHINT */ - - /* Look in neighbor cache for the next-hop address. */ - if (ip6_addr_cmp(&(destination_cache[nd6_cached_destination_index].next_hop_addr), - &(neighbor_cache[nd6_cached_neighbor_index].next_hop_address))) { - /* Cache hit. */ - /* Do nothing. */ - ND6_STATS_INC(nd6.cachehit); - } else { - i = nd6_find_neighbor_cache_entry(&(destination_cache[nd6_cached_destination_index].next_hop_addr)); - if (i >= 0) { - /* Found a matching record, make it new cached entry. */ - nd6_cached_neighbor_index = i; - } else { - /* Neighbor not in cache. Make a new entry. */ - i = nd6_new_neighbor_cache_entry(); - if (i >= 0) { - /* got new neighbor entry. make it our new cached index. */ - nd6_cached_neighbor_index = i; - } else { - /* Could not create a neighbor cache entry. */ - return ERR_MEM; - } - - /* Initialize fields. */ - ip6_addr_copy(neighbor_cache[i].next_hop_address, - destination_cache[nd6_cached_destination_index].next_hop_addr); - neighbor_cache[i].isrouter = 0; - neighbor_cache[i].netif = netif; - neighbor_cache[i].state = ND6_INCOMPLETE; - neighbor_cache[i].counter.probes_sent = 1; - nd6_send_neighbor_cache_probe(&neighbor_cache[i], ND6_SEND_FLAG_MULTICAST_DEST); - } - } - - /* Reset this destination's age. */ - destination_cache[nd6_cached_destination_index].age = 0; - - return nd6_cached_neighbor_index; -} - -/** - * Queue a packet for a neighbor. - * - * @param neighbor_index the index in the neighbor cache table - * @param q packet to be queued - * @return ERR_OK if succeeded, ERR_MEM if out of memory - */ -static err_t -nd6_queue_packet(s8_t neighbor_index, struct pbuf *q) -{ - err_t result = ERR_MEM; - struct pbuf *p; - int copy_needed = 0; -#if LWIP_ND6_QUEUEING - struct nd6_q_entry *new_entry, *r; -#endif /* LWIP_ND6_QUEUEING */ - - if ((neighbor_index < 0) || (neighbor_index >= LWIP_ND6_NUM_NEIGHBORS)) { - return ERR_ARG; - } - - /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but - * to copy the whole queue into a new PBUF_RAM (see bug #11400) - * PBUF_ROMs can be left as they are, since ROM must not get changed. */ - p = q; - while (p) { - if (p->type != PBUF_ROM) { - copy_needed = 1; - break; - } - p = p->next; - } - if (copy_needed) { - /* copy the whole packet into new pbufs */ - p = pbuf_alloc(PBUF_LINK, q->tot_len, PBUF_RAM); - while ((p == NULL) && (neighbor_cache[neighbor_index].q != NULL)) { - /* Free oldest packet (as per RFC recommendation) */ -#if LWIP_ND6_QUEUEING - r = neighbor_cache[neighbor_index].q; - neighbor_cache[neighbor_index].q = r->next; - r->next = NULL; - nd6_free_q(r); -#else /* LWIP_ND6_QUEUEING */ - pbuf_free(neighbor_cache[neighbor_index].q); - neighbor_cache[neighbor_index].q = NULL; -#endif /* LWIP_ND6_QUEUEING */ - p = pbuf_alloc(PBUF_LINK, q->tot_len, PBUF_RAM); - } - if (p != NULL) { - if (pbuf_copy(p, q) != ERR_OK) { - pbuf_free(p); - p = NULL; - } - } - } else { - /* referencing the old pbuf is enough */ - p = q; - pbuf_ref(p); - } - /* packet was copied/ref'd? */ - if (p != NULL) { - /* queue packet ... */ -#if LWIP_ND6_QUEUEING - /* allocate a new nd6 queue entry */ - new_entry = (struct nd6_q_entry *)memp_malloc(MEMP_ND6_QUEUE); - if ((new_entry == NULL) && (neighbor_cache[neighbor_index].q != NULL)) { - /* Free oldest packet (as per RFC recommendation) */ - r = neighbor_cache[neighbor_index].q; - neighbor_cache[neighbor_index].q = r->next; - r->next = NULL; - nd6_free_q(r); - new_entry = (struct nd6_q_entry *)memp_malloc(MEMP_ND6_QUEUE); - } - if (new_entry != NULL) { - new_entry->next = NULL; - new_entry->p = p; - if (neighbor_cache[neighbor_index].q != NULL) { - /* queue was already existent, append the new entry to the end */ - r = neighbor_cache[neighbor_index].q; - while (r->next != NULL) { - r = r->next; - } - r->next = new_entry; - } else { - /* queue did not exist, first item in queue */ - neighbor_cache[neighbor_index].q = new_entry; - } - LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: queued packet %p on neighbor entry %"S16_F"\n", (void *)p, (s16_t)neighbor_index)); - result = ERR_OK; - } else { - /* the pool MEMP_ND6_QUEUE is empty */ - pbuf_free(p); - LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: could not queue a copy of packet %p (out of memory)\n", (void *)p)); - /* { result == ERR_MEM } through initialization */ - } -#else /* LWIP_ND6_QUEUEING */ - /* Queue a single packet. If an older packet is already queued, free it as per RFC. */ - if (neighbor_cache[neighbor_index].q != NULL) { - pbuf_free(neighbor_cache[neighbor_index].q); - } - neighbor_cache[neighbor_index].q = p; - LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: queued packet %p on neighbor entry %"S16_F"\n", (void *)p, (s16_t)neighbor_index)); - result = ERR_OK; -#endif /* LWIP_ND6_QUEUEING */ - } else { - LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: could not queue a copy of packet %p (out of memory)\n", (void *)q)); - /* { result == ERR_MEM } through initialization */ - } - - return result; -} - -#if LWIP_ND6_QUEUEING -/** - * Free a complete queue of nd6 q entries - * - * @param q a queue of nd6_q_entry to free - */ -static void -nd6_free_q(struct nd6_q_entry *q) -{ - struct nd6_q_entry *r; - LWIP_ASSERT("q != NULL", q != NULL); - LWIP_ASSERT("q->p != NULL", q->p != NULL); - while (q) { - r = q; - q = q->next; - LWIP_ASSERT("r->p != NULL", (r->p != NULL)); - pbuf_free(r->p); - memp_free(MEMP_ND6_QUEUE, r); - } -} -#endif /* LWIP_ND6_QUEUEING */ - -/** - * Send queued packets for a neighbor - * - * @param i the neighbor to send packets to - */ -static void -nd6_send_q(s8_t i) -{ - struct ip6_hdr *ip6hdr; - ip6_addr_t dest; -#if LWIP_ND6_QUEUEING - struct nd6_q_entry *q; -#endif /* LWIP_ND6_QUEUEING */ - - if ((i < 0) || (i >= LWIP_ND6_NUM_NEIGHBORS)) { - return; - } - -#if LWIP_ND6_QUEUEING - while (neighbor_cache[i].q != NULL) { - /* remember first in queue */ - q = neighbor_cache[i].q; - /* pop first item off the queue */ - neighbor_cache[i].q = q->next; - /* Get ipv6 header. */ - ip6hdr = (struct ip6_hdr *)(q->p->payload); - /* Create an aligned copy. */ - ip6_addr_set(&dest, &(ip6hdr->dest)); - /* send the queued IPv6 packet */ - (neighbor_cache[i].netif)->output_ip6(neighbor_cache[i].netif, q->p, &dest); - /* free the queued IP packet */ - pbuf_free(q->p); - /* now queue entry can be freed */ - memp_free(MEMP_ND6_QUEUE, q); - } -#else /* LWIP_ND6_QUEUEING */ - if (neighbor_cache[i].q != NULL) { - /* Get ipv6 header. */ - ip6hdr = (struct ip6_hdr *)(neighbor_cache[i].q->payload); - /* Create an aligned copy. */ - ip6_addr_set(&dest, &(ip6hdr->dest)); - /* send the queued IPv6 packet */ - (neighbor_cache[i].netif)->output_ip6(neighbor_cache[i].netif, neighbor_cache[i].q, &dest); - /* free the queued IP packet */ - pbuf_free(neighbor_cache[i].q); - neighbor_cache[i].q = NULL; - } -#endif /* LWIP_ND6_QUEUEING */ -} - -/** - * A packet is to be transmitted to a specific IPv6 destination on a specific - * interface. Check if we can find the hardware address of the next hop to use - * for the packet. If so, give the hardware address to the caller, which should - * use it to send the packet right away. Otherwise, enqueue the packet for - * later transmission while looking up the hardware address, if possible. - * - * As such, this function returns one of three different possible results: - * - * - ERR_OK with a non-NULL 'hwaddrp': the caller should send the packet now. - * - ERR_OK with a NULL 'hwaddrp': the packet has been enqueued for later. - * - not ERR_OK: something went wrong; forward the error upward in the stack. - * - * @param netif The lwIP network interface on which the IP packet will be sent. - * @param q The pbuf(s) containing the IP packet to be sent. - * @param ip6addr The destination IPv6 address of the packet. - * @param hwaddrp On success, filled with a pointer to a HW address or NULL (meaning - * the packet has been queued). - * @return - * - ERR_OK on success, ERR_RTE if no route was found for the packet, - * or ERR_MEM if low memory conditions prohibit sending the packet at all. - */ -err_t -nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp) -{ - s8_t i; - - /* Get next hop record. */ - i = nd6_get_next_hop_entry(ip6addr, netif); - if (i < 0) { - /* failed to get a next hop neighbor record. */ - return i; - } - - /* Now that we have a destination record, send or queue the packet. */ - if (neighbor_cache[i].state == ND6_STALE) { - /* Switch to delay state. */ - neighbor_cache[i].state = ND6_DELAY; - neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; - } - /* @todo should we send or queue if PROBE? send for now, to let unicast NS pass. */ - if ((neighbor_cache[i].state == ND6_REACHABLE) || - (neighbor_cache[i].state == ND6_DELAY) || - (neighbor_cache[i].state == ND6_PROBE)) { - - /* Tell the caller to send out the packet now. */ - *hwaddrp = neighbor_cache[i].lladdr; - return ERR_OK; - } - - /* We should queue packet on this interface. */ - *hwaddrp = NULL; - return nd6_queue_packet(i, q); -} - - -/** - * Get the Path MTU for a destination. - * - * @param ip6addr the destination address - * @param netif the netif on which the packet will be sent - * @return the Path MTU, if known, or the netif default MTU - */ -u16_t -nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif) -{ - s8_t i; - - i = nd6_find_destination_cache_entry(ip6addr); - if (i >= 0) { - if (destination_cache[i].pmtu > 0) { - return destination_cache[i].pmtu; - } - } - - if (netif != NULL) { - return netif->mtu; - } - - return 1280; /* Minimum MTU */ -} - - -#if LWIP_ND6_TCP_REACHABILITY_HINTS -/** - * Provide the Neighbor discovery process with a hint that a - * destination is reachable. Called by tcp_receive when ACKs are - * received or sent (as per RFC). This is useful to avoid sending - * NS messages every 30 seconds. - * - * @param ip6addr the destination address which is know to be reachable - * by an upper layer protocol (TCP) - */ -void -nd6_reachability_hint(const ip6_addr_t *ip6addr) -{ - s8_t i; - - /* Find destination in cache. */ - if (ip6_addr_cmp(ip6addr, &(destination_cache[nd6_cached_destination_index].destination_addr))) { - i = nd6_cached_destination_index; - ND6_STATS_INC(nd6.cachehit); - } else { - i = nd6_find_destination_cache_entry(ip6addr); - } - if (i < 0) { - return; - } - - /* Find next hop neighbor in cache. */ - if (ip6_addr_cmp(&(destination_cache[i].next_hop_addr), &(neighbor_cache[nd6_cached_neighbor_index].next_hop_address))) { - i = nd6_cached_neighbor_index; - ND6_STATS_INC(nd6.cachehit); - } else { - i = nd6_find_neighbor_cache_entry(&(destination_cache[i].next_hop_addr)); - } - if (i < 0) { - return; - } - - /* For safety: don't set as reachable if we don't have a LL address yet. Misuse protection. */ - if (neighbor_cache[i].state == ND6_INCOMPLETE || neighbor_cache[i].state == ND6_NO_ENTRY) { - return; - } - - /* Set reachability state. */ - neighbor_cache[i].state = ND6_REACHABLE; - neighbor_cache[i].counter.reachable_time = reachable_time; -} -#endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ - -/** - * Remove all prefix, neighbor_cache and router entries of the specified netif. - * - * @param netif points to a network interface - */ -void -nd6_cleanup_netif(struct netif *netif) -{ - u8_t i; - s8_t router_index; - for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { - if (prefix_list[i].netif == netif) { - prefix_list[i].netif = NULL; - prefix_list[i].flags = 0; - } - } - for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { - if (neighbor_cache[i].netif == netif) { - for (router_index = 0; router_index < LWIP_ND6_NUM_ROUTERS; router_index++) { - if (default_router_list[router_index].neighbor_entry == &neighbor_cache[i]) { - default_router_list[router_index].neighbor_entry = NULL; - default_router_list[router_index].flags = 0; - } - } - neighbor_cache[i].isrouter = 0; - nd6_free_neighbor_cache_entry(i); - } - } -} - -#if LWIP_IPV6_MLD -/** - * The state of a local IPv6 address entry is about to change. If needed, join - * or leave the solicited-node multicast group for the address. - * - * @param netif The netif that owns the address. - * @param addr_idx The index of the address. - * @param new_state The new (IP6_ADDR_) state for the address. - */ -void -nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state) -{ - u8_t old_state, old_member, new_member; - - old_state = netif_ip6_addr_state(netif, addr_idx); - - /* Determine whether we were, and should be, a member of the solicited-node - * multicast group for this address. For tentative addresses, the group is - * not joined until the address enters the TENTATIVE_1 (or VALID) state. */ - old_member = (old_state != IP6_ADDR_INVALID && old_state != IP6_ADDR_TENTATIVE); - new_member = (new_state != IP6_ADDR_INVALID && new_state != IP6_ADDR_TENTATIVE); - - if (old_member != new_member) { - ip6_addr_set_solicitednode(&multicast_address, netif_ip6_addr(netif, addr_idx)->addr[3]); - - if (new_member) { - mld6_joingroup_netif(netif, &multicast_address); - } else { - mld6_leavegroup_netif(netif, &multicast_address); - } - } -} -#endif /* LWIP_IPV6_MLD */ - -#endif /* LWIP_IPV6 */ +/** + * @file + * + * Neighbor discovery and stateless address autoconfiguration for IPv6. + * Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 + * (Address autoconfiguration). + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#include "lwip/opt.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/nd6.h" +#include "lwip/priv/nd6_priv.h" +#include "lwip/prot/nd6.h" +#include "lwip/prot/icmp6.h" +#include "lwip/pbuf.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/inet_chksum.h" +#include "lwip/netif.h" +#include "lwip/icmp6.h" +#include "lwip/mld6.h" +#include "lwip/ip.h" +#include "lwip/stats.h" +#include "lwip/dns.h" + +#include + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +#if LWIP_IPV6_DUP_DETECT_ATTEMPTS > IP6_ADDR_TENTATIVE_COUNT_MASK +#error LWIP_IPV6_DUP_DETECT_ATTEMPTS > IP6_ADDR_TENTATIVE_COUNT_MASK +#endif + +/* Router tables. */ +struct nd6_neighbor_cache_entry neighbor_cache[LWIP_ND6_NUM_NEIGHBORS]; +struct nd6_destination_cache_entry destination_cache[LWIP_ND6_NUM_DESTINATIONS]; +struct nd6_prefix_list_entry prefix_list[LWIP_ND6_NUM_PREFIXES]; +struct nd6_router_list_entry default_router_list[LWIP_ND6_NUM_ROUTERS]; + +/* Default values, can be updated by a RA message. */ +u32_t reachable_time = LWIP_ND6_REACHABLE_TIME; +u32_t retrans_timer = LWIP_ND6_RETRANS_TIMER; /* @todo implement this value in timer */ + +/* Index for cache entries. */ +static u8_t nd6_cached_neighbor_index; +static u8_t nd6_cached_destination_index; + +/* Multicast address holder. */ +static ip6_addr_t multicast_address; + +/* Static buffer to parse RA packet options (size of a prefix option, biggest option) */ +static u8_t nd6_ra_buffer[sizeof(struct prefix_option)]; + +/* Forward declarations. */ +static s8_t nd6_find_neighbor_cache_entry(const ip6_addr_t *ip6addr); +static s8_t nd6_new_neighbor_cache_entry(void); +static void nd6_free_neighbor_cache_entry(s8_t i); +static s8_t nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr); +static s8_t nd6_new_destination_cache_entry(void); +static s8_t nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif); +static s8_t nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif); +static s8_t nd6_get_router(const ip6_addr_t *router_addr, struct netif *netif); +static s8_t nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif); +static s8_t nd6_get_onlink_prefix(ip6_addr_t *prefix, struct netif *netif); +static s8_t nd6_new_onlink_prefix(ip6_addr_t *prefix, struct netif *netif); +static s8_t nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif); +static err_t nd6_queue_packet(s8_t neighbor_index, struct pbuf *q); + +#define ND6_SEND_FLAG_MULTICAST_DEST 0x01 +#define ND6_SEND_FLAG_ALLNODES_DEST 0x02 +static void nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags); +static void nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags); +static void nd6_send_neighbor_cache_probe(struct nd6_neighbor_cache_entry *entry, u8_t flags); +#if LWIP_IPV6_SEND_ROUTER_SOLICIT +static err_t nd6_send_rs(struct netif *netif); +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ + +#if LWIP_ND6_QUEUEING +static void nd6_free_q(struct nd6_q_entry *q); +#else /* LWIP_ND6_QUEUEING */ +#define nd6_free_q(q) pbuf_free(q) +#endif /* LWIP_ND6_QUEUEING */ +static void nd6_send_q(s8_t i); + + +/** + * Process an incoming neighbor discovery message + * + * @param p the nd packet, p->payload pointing to the icmpv6 header + * @param inp the netif on which this packet was received + */ +void +nd6_input(struct pbuf *p, struct netif *inp) +{ + u8_t msg_type; + s8_t i; + + ND6_STATS_INC(nd6.recv); + + msg_type = *((u8_t *)p->payload); + switch (msg_type) { + case ICMP6_TYPE_NA: /* Neighbor Advertisement. */ + { + struct na_header *na_hdr; + struct lladdr_option *lladdr_opt; + + /* Check that na header fits in packet. */ + if (p->len < (sizeof(struct na_header))) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + na_hdr = (struct na_header *)p->payload; + + /* Unsolicited NA?*/ + if (ip6_addr_ismulticast(ip6_current_dest_addr())) { + ip6_addr_t target_address; + + /* This is an unsolicited NA. + * link-layer changed? + * part of DAD mechanism? */ + + /* Create an aligned copy. */ + ip6_addr_set(&target_address, &(na_hdr->target_address)); + +#if LWIP_IPV6_DUP_DETECT_ATTEMPTS + /* If the target address matches this netif, it is a DAD response. */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (!ip6_addr_isinvalid(netif_ip6_addr_state(inp, i)) && + ip6_addr_cmp(&target_address, netif_ip6_addr(inp, i))) { + /* We are using a duplicate address. */ + netif_ip6_addr_set_state(inp, i, IP6_ADDR_INVALID); + +#if LWIP_IPV6_AUTOCONFIG + /* Check to see if this address was autoconfigured. */ + if (!ip6_addr_islinklocal(&target_address)) { + i = nd6_get_onlink_prefix(&target_address, inp); + if (i >= 0) { + /* Mark this prefix as duplicate, so that we don't use it + * to generate this address again. */ + prefix_list[i].flags |= ND6_PREFIX_AUTOCONFIG_ADDRESS_DUPLICATE; + } + } +#endif /* LWIP_IPV6_AUTOCONFIG */ + + pbuf_free(p); + return; + } + } +#endif /* LWIP_IPV6_DUP_DETECT_ATTEMPTS */ + + /* Check that link-layer address option also fits in packet. */ + if (p->len < (sizeof(struct na_header) + 2)) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct na_header)); + + if (p->len < (sizeof(struct na_header) + (lladdr_opt->length << 3))) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + /* This is an unsolicited NA, most likely there was a LLADDR change. */ + i = nd6_find_neighbor_cache_entry(&target_address); + if (i >= 0) { + if (na_hdr->flags & ND6_FLAG_OVERRIDE) { + MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); + } + } + } else { + ip6_addr_t target_address; + + /* This is a solicited NA. + * neighbor address resolution response? + * neighbor unreachability detection response? */ + + /* Create an aligned copy. */ + ip6_addr_set(&target_address, &(na_hdr->target_address)); + + /* Find the cache entry corresponding to this na. */ + i = nd6_find_neighbor_cache_entry(&target_address); + if (i < 0) { + /* We no longer care about this target address. drop it. */ + pbuf_free(p); + return; + } + + /* Update cache entry. */ + if ((na_hdr->flags & ND6_FLAG_OVERRIDE) || + (neighbor_cache[i].state == ND6_INCOMPLETE)) { + /* Check that link-layer address option also fits in packet. */ + if (p->len < (sizeof(struct na_header) + 2)) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct na_header)); + + if (p->len < (sizeof(struct na_header) + (lladdr_opt->length << 3))) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); + } + + neighbor_cache[i].netif = inp; + neighbor_cache[i].state = ND6_REACHABLE; + neighbor_cache[i].counter.reachable_time = reachable_time; + + /* Send queued packets, if any. */ + if (neighbor_cache[i].q != NULL) { + nd6_send_q(i); + } + } + + break; /* ICMP6_TYPE_NA */ + } + case ICMP6_TYPE_NS: /* Neighbor solicitation. */ + { + struct ns_header *ns_hdr; + struct lladdr_option *lladdr_opt; + u8_t accepted; + + /* Check that ns header fits in packet. */ + if (p->len < sizeof(struct ns_header)) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + ns_hdr = (struct ns_header *)p->payload; + + /* Check if there is a link-layer address provided. Only point to it if in this buffer. */ + if (p->len >= (sizeof(struct ns_header) + 2)) { + lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct ns_header)); + if (p->len < (sizeof(struct ns_header) + (lladdr_opt->length << 3))) { + lladdr_opt = NULL; + } + } else { + lladdr_opt = NULL; + } + + /* Check if the target address is configured on the receiving netif. */ + accepted = 0; + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { + if ((ip6_addr_isvalid(netif_ip6_addr_state(inp, i)) || + (ip6_addr_istentative(netif_ip6_addr_state(inp, i)) && + ip6_addr_isany(ip6_current_src_addr()))) && + ip6_addr_cmp(&(ns_hdr->target_address), netif_ip6_addr(inp, i))) { + accepted = 1; + break; + } + } + + /* NS not for us? */ + if (!accepted) { + pbuf_free(p); + return; + } + + /* Check for ANY address in src (DAD algorithm). */ + if (ip6_addr_isany(ip6_current_src_addr())) { + /* Sender is validating this address. */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { + if (!ip6_addr_isinvalid(netif_ip6_addr_state(inp, i)) && + ip6_addr_cmp(&(ns_hdr->target_address), netif_ip6_addr(inp, i))) { + /* Send a NA back so that the sender does not use this address. */ + nd6_send_na(inp, netif_ip6_addr(inp, i), ND6_FLAG_OVERRIDE | ND6_SEND_FLAG_ALLNODES_DEST); + if (ip6_addr_istentative(netif_ip6_addr_state(inp, i))) { + /* We shouldn't use this address either. */ + netif_ip6_addr_set_state(inp, i, IP6_ADDR_INVALID); + } + } + } + } else { + ip6_addr_t target_address; + + /* Sender is trying to resolve our address. */ + /* Verify that they included their own link-layer address. */ + if (lladdr_opt == NULL) { + /* Not a valid message. */ + pbuf_free(p); + ND6_STATS_INC(nd6.proterr); + ND6_STATS_INC(nd6.drop); + return; + } + + i = nd6_find_neighbor_cache_entry(ip6_current_src_addr()); + if (i>= 0) { + /* We already have a record for the solicitor. */ + if (neighbor_cache[i].state == ND6_INCOMPLETE) { + neighbor_cache[i].netif = inp; + MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); + + /* Delay probe in case we get confirmation of reachability from upper layer (TCP). */ + neighbor_cache[i].state = ND6_DELAY; + neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; + } + } else { + /* Add their IPv6 address and link-layer address to neighbor cache. + * We will need it at least to send a unicast NA message, but most + * likely we will also be communicating with this node soon. */ + i = nd6_new_neighbor_cache_entry(); + if (i < 0) { + /* We couldn't assign a cache entry for this neighbor. + * we won't be able to reply. drop it. */ + pbuf_free(p); + ND6_STATS_INC(nd6.memerr); + return; + } + neighbor_cache[i].netif = inp; + MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); + ip6_addr_set(&(neighbor_cache[i].next_hop_address), ip6_current_src_addr()); + + /* Receiving a message does not prove reachability: only in one direction. + * Delay probe in case we get confirmation of reachability from upper layer (TCP). */ + neighbor_cache[i].state = ND6_DELAY; + neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; + } + + /* Create an aligned copy. */ + ip6_addr_set(&target_address, &(ns_hdr->target_address)); + + /* Send back a NA for us. Allocate the reply pbuf. */ + nd6_send_na(inp, &target_address, ND6_FLAG_SOLICITED | ND6_FLAG_OVERRIDE); + } + + break; /* ICMP6_TYPE_NS */ + } + case ICMP6_TYPE_RA: /* Router Advertisement. */ + { + struct ra_header *ra_hdr; + u8_t *buffer; /* Used to copy options. */ + u16_t offset; +#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS + /* There can by multiple RDNSS options per RA */ + u8_t rdnss_server_idx = 0; +#endif /* LWIP_ND6_RDNSS_MAX_DNS_SERVERS */ + + /* Check that RA header fits in packet. */ + if (p->len < sizeof(struct ra_header)) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + ra_hdr = (struct ra_header *)p->payload; + + /* If we are sending RS messages, stop. */ +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + /* ensure at least one solicitation is sent */ + if ((inp->rs_count < LWIP_ND6_MAX_MULTICAST_SOLICIT) || + (nd6_send_rs(inp) == ERR_OK)) { + inp->rs_count = 0; + } +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ + + /* Get the matching default router entry. */ + i = nd6_get_router(ip6_current_src_addr(), inp); + if (i < 0) { + /* Create a new router entry. */ + i = nd6_new_router(ip6_current_src_addr(), inp); + } + + if (i < 0) { + /* Could not create a new router entry. */ + pbuf_free(p); + ND6_STATS_INC(nd6.memerr); + return; + } + + /* Re-set invalidation timer. */ + default_router_list[i].invalidation_timer = lwip_htons(ra_hdr->router_lifetime); + + /* Re-set default timer values. */ +#if LWIP_ND6_ALLOW_RA_UPDATES + if (ra_hdr->retrans_timer > 0) { + retrans_timer = lwip_htonl(ra_hdr->retrans_timer); + } + if (ra_hdr->reachable_time > 0) { + reachable_time = lwip_htonl(ra_hdr->reachable_time); + } +#endif /* LWIP_ND6_ALLOW_RA_UPDATES */ + + /* @todo set default hop limit... */ + /* ra_hdr->current_hop_limit;*/ + + /* Update flags in local entry (incl. preference). */ + default_router_list[i].flags = ra_hdr->flags; + + /* Offset to options. */ + offset = sizeof(struct ra_header); + + /* Process each option. */ + while ((p->tot_len - offset) > 0) { + if (p->len == p->tot_len) { + /* no need to copy from contiguous pbuf */ + buffer = &((u8_t*)p->payload)[offset]; + } else { + buffer = nd6_ra_buffer; + if (pbuf_copy_partial(p, buffer, sizeof(struct prefix_option), offset) != sizeof(struct prefix_option)) { + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + } + if (buffer[1] == 0) { + /* zero-length extension. drop packet */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + switch (buffer[0]) { + case ND6_OPTION_TYPE_SOURCE_LLADDR: + { + struct lladdr_option *lladdr_opt; + lladdr_opt = (struct lladdr_option *)buffer; + if ((default_router_list[i].neighbor_entry != NULL) && + (default_router_list[i].neighbor_entry->state == ND6_INCOMPLETE)) { + SMEMCPY(default_router_list[i].neighbor_entry->lladdr, lladdr_opt->addr, inp->hwaddr_len); + default_router_list[i].neighbor_entry->state = ND6_REACHABLE; + default_router_list[i].neighbor_entry->counter.reachable_time = reachable_time; + } + break; + } + case ND6_OPTION_TYPE_MTU: + { + struct mtu_option *mtu_opt; + mtu_opt = (struct mtu_option *)buffer; + if (lwip_htonl(mtu_opt->mtu) >= 1280) { +#if LWIP_ND6_ALLOW_RA_UPDATES + inp->mtu = (u16_t)lwip_htonl(mtu_opt->mtu); +#endif /* LWIP_ND6_ALLOW_RA_UPDATES */ + } + break; + } + case ND6_OPTION_TYPE_PREFIX_INFO: + { + struct prefix_option *prefix_opt; + prefix_opt = (struct prefix_option *)buffer; + + if ((prefix_opt->flags & ND6_PREFIX_FLAG_ON_LINK) && + (prefix_opt->prefix_length == 64) && + !ip6_addr_islinklocal(&(prefix_opt->prefix))) { + /* Add to on-link prefix list. */ + s8_t prefix; + ip6_addr_t prefix_addr; + + /* Get a memory-aligned copy of the prefix. */ + ip6_addr_set(&prefix_addr, &(prefix_opt->prefix)); + + /* find cache entry for this prefix. */ + prefix = nd6_get_onlink_prefix(&prefix_addr, inp); + if (prefix < 0) { + /* Create a new cache entry. */ + prefix = nd6_new_onlink_prefix(&prefix_addr, inp); + } + if (prefix >= 0) { + prefix_list[prefix].invalidation_timer = lwip_htonl(prefix_opt->valid_lifetime); + +#if LWIP_IPV6_AUTOCONFIG + if (prefix_opt->flags & ND6_PREFIX_FLAG_AUTONOMOUS) { + /* Mark prefix as autonomous, so that address autoconfiguration can take place. + * Only OR flag, so that we don't over-write other flags (such as ADDRESS_DUPLICATE)*/ + prefix_list[prefix].flags |= ND6_PREFIX_AUTOCONFIG_AUTONOMOUS; + } +#endif /* LWIP_IPV6_AUTOCONFIG */ + } + } + + break; + } + case ND6_OPTION_TYPE_ROUTE_INFO: + /* @todo implement preferred routes. + struct route_option * route_opt; + route_opt = (struct route_option *)buffer;*/ + + break; +#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS + case ND6_OPTION_TYPE_RDNSS: + { + u8_t num, n; + struct rdnss_option * rdnss_opt; + + rdnss_opt = (struct rdnss_option *)buffer; + num = (rdnss_opt->length - 1) / 2; + for (n = 0; (rdnss_server_idx < DNS_MAX_SERVERS) && (n < num); n++) { + ip_addr_t rdnss_address; + + /* Get a memory-aligned copy of the prefix. */ + ip_addr_copy_from_ip6(rdnss_address, rdnss_opt->rdnss_address[n]); + + if (htonl(rdnss_opt->lifetime) > 0) { + /* TODO implement Lifetime > 0 */ + dns_setserver(rdnss_server_idx++, &rdnss_address); + } else { + /* TODO implement DNS removal in dns.c */ + u8_t s; + for (s = 0; s < DNS_MAX_SERVERS; s++) { + const ip_addr_t *addr = dns_getserver(s); + if(ip_addr_cmp(addr, &rdnss_address)) { + dns_setserver(s, NULL); + } + } + } + } + break; + } +#endif /* LWIP_ND6_RDNSS_MAX_DNS_SERVERS */ + default: + /* Unrecognized option, abort. */ + ND6_STATS_INC(nd6.proterr); + break; + } + /* option length is checked earlier to be non-zero to make sure loop ends */ + offset += 8 * ((u16_t)buffer[1]); + } + + break; /* ICMP6_TYPE_RA */ + } + case ICMP6_TYPE_RD: /* Redirect */ + { + struct redirect_header *redir_hdr; + struct lladdr_option *lladdr_opt; + ip6_addr_t tmp; + + /* Check that Redir header fits in packet. */ + if (p->len < sizeof(struct redirect_header)) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + redir_hdr = (struct redirect_header *)p->payload; + + if (p->len >= (sizeof(struct redirect_header) + 2)) { + lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct redirect_header)); + if (p->len < (sizeof(struct redirect_header) + (lladdr_opt->length << 3))) { + lladdr_opt = NULL; + } + } else { + lladdr_opt = NULL; + } + + /* Copy original destination address to current source address, to have an aligned copy. */ + ip6_addr_set(&tmp, &(redir_hdr->destination_address)); + + /* Find dest address in cache */ + i = nd6_find_destination_cache_entry(&tmp); + if (i < 0) { + /* Destination not in cache, drop packet. */ + pbuf_free(p); + return; + } + + /* Set the new target address. */ + ip6_addr_set(&(destination_cache[i].next_hop_addr), &(redir_hdr->target_address)); + + /* If Link-layer address of other router is given, try to add to neighbor cache. */ + if (lladdr_opt != NULL) { + if (lladdr_opt->type == ND6_OPTION_TYPE_TARGET_LLADDR) { + /* Copy target address to current source address, to have an aligned copy. */ + ip6_addr_set(&tmp, &(redir_hdr->target_address)); + + i = nd6_find_neighbor_cache_entry(&tmp); + if (i < 0) { + i = nd6_new_neighbor_cache_entry(); + if (i >= 0) { + neighbor_cache[i].netif = inp; + MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); + ip6_addr_set(&(neighbor_cache[i].next_hop_address), &tmp); + + /* Receiving a message does not prove reachability: only in one direction. + * Delay probe in case we get confirmation of reachability from upper layer (TCP). */ + neighbor_cache[i].state = ND6_DELAY; + neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; + } + } + if (i >= 0) { + if (neighbor_cache[i].state == ND6_INCOMPLETE) { + MEMCPY(neighbor_cache[i].lladdr, lladdr_opt->addr, inp->hwaddr_len); + /* Receiving a message does not prove reachability: only in one direction. + * Delay probe in case we get confirmation of reachability from upper layer (TCP). */ + neighbor_cache[i].state = ND6_DELAY; + neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; + } + } + } + } + break; /* ICMP6_TYPE_RD */ + } + case ICMP6_TYPE_PTB: /* Packet too big */ + { + struct icmp6_hdr *icmp6hdr; /* Packet too big message */ + struct ip6_hdr *ip6hdr; /* IPv6 header of the packet which caused the error */ + u32_t pmtu; + ip6_addr_t tmp; + + /* Check that ICMPv6 header + IPv6 header fit in payload */ + if (p->len < (sizeof(struct icmp6_hdr) + IP6_HLEN)) { + /* drop short packets */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + + icmp6hdr = (struct icmp6_hdr *)p->payload; + ip6hdr = (struct ip6_hdr *)((u8_t*)p->payload + sizeof(struct icmp6_hdr)); + + /* Copy original destination address to current source address, to have an aligned copy. */ + ip6_addr_set(&tmp, &(ip6hdr->dest)); + + /* Look for entry in destination cache. */ + i = nd6_find_destination_cache_entry(&tmp); + if (i < 0) { + /* Destination not in cache, drop packet. */ + pbuf_free(p); + return; + } + + /* Change the Path MTU. */ + pmtu = lwip_htonl(icmp6hdr->data); + destination_cache[i].pmtu = (u16_t)LWIP_MIN(pmtu, 0xFFFF); + + break; /* ICMP6_TYPE_PTB */ + } + + default: + ND6_STATS_INC(nd6.proterr); + ND6_STATS_INC(nd6.drop); + break; /* default */ + } + + pbuf_free(p); +} + + +/** + * Periodic timer for Neighbor discovery functions: + * + * - Update neighbor reachability states + * - Update destination cache entries age + * - Update invalidation timers of default routers and on-link prefixes + * - Perform duplicate address detection (DAD) for our addresses + * - Send router solicitations + */ +void +nd6_tmr(void) +{ + s8_t i; + struct netif *netif; + + /* Process neighbor entries. */ + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + switch (neighbor_cache[i].state) { + case ND6_INCOMPLETE: + if ((neighbor_cache[i].counter.probes_sent >= LWIP_ND6_MAX_MULTICAST_SOLICIT) && + (!neighbor_cache[i].isrouter)) { + /* Retries exceeded. */ + nd6_free_neighbor_cache_entry(i); + } else { + /* Send a NS for this entry. */ + neighbor_cache[i].counter.probes_sent++; + nd6_send_neighbor_cache_probe(&neighbor_cache[i], ND6_SEND_FLAG_MULTICAST_DEST); + } + break; + case ND6_REACHABLE: + /* Send queued packets, if any are left. Should have been sent already. */ + if (neighbor_cache[i].q != NULL) { + nd6_send_q(i); + } + if (neighbor_cache[i].counter.reachable_time <= ND6_TMR_INTERVAL) { + /* Change to stale state. */ + neighbor_cache[i].state = ND6_STALE; + neighbor_cache[i].counter.stale_time = 0; + } else { + neighbor_cache[i].counter.reachable_time -= ND6_TMR_INTERVAL; + } + break; + case ND6_STALE: + neighbor_cache[i].counter.stale_time++; + break; + case ND6_DELAY: + if (neighbor_cache[i].counter.delay_time <= 1) { + /* Change to PROBE state. */ + neighbor_cache[i].state = ND6_PROBE; + neighbor_cache[i].counter.probes_sent = 0; + } else { + neighbor_cache[i].counter.delay_time--; + } + break; + case ND6_PROBE: + if ((neighbor_cache[i].counter.probes_sent >= LWIP_ND6_MAX_MULTICAST_SOLICIT) && + (!neighbor_cache[i].isrouter)) { + /* Retries exceeded. */ + nd6_free_neighbor_cache_entry(i); + } else { + /* Send a NS for this entry. */ + neighbor_cache[i].counter.probes_sent++; + nd6_send_neighbor_cache_probe(&neighbor_cache[i], 0); + } + break; + case ND6_NO_ENTRY: + default: + /* Do nothing. */ + break; + } + } + + /* Process destination entries. */ + for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { + destination_cache[i].age++; + } + + /* Process router entries. */ + for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { + if (default_router_list[i].neighbor_entry != NULL) { + /* Active entry. */ + if (default_router_list[i].invalidation_timer > 0) { + default_router_list[i].invalidation_timer -= ND6_TMR_INTERVAL / 1000; + } + if (default_router_list[i].invalidation_timer < ND6_TMR_INTERVAL / 1000) { + /* Less than 1 second remaining. Clear this entry. */ + default_router_list[i].neighbor_entry->isrouter = 0; + default_router_list[i].neighbor_entry = NULL; + default_router_list[i].invalidation_timer = 0; + default_router_list[i].flags = 0; + } + } + } + + /* Process prefix entries. */ + for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { + if (prefix_list[i].netif != NULL) { + if (prefix_list[i].invalidation_timer < ND6_TMR_INTERVAL / 1000) { + /* Entry timed out, remove it */ + prefix_list[i].invalidation_timer = 0; + +#if LWIP_IPV6_AUTOCONFIG + /* If any addresses were configured with this prefix, remove them */ + if (prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED) { + s8_t j; + + for (j = 1; j < LWIP_IPV6_NUM_ADDRESSES; j++) { + if ((netif_ip6_addr_state(prefix_list[i].netif, j) != IP6_ADDR_INVALID) && + ip6_addr_netcmp(&prefix_list[i].prefix, netif_ip6_addr(prefix_list[i].netif, j))) { + netif_ip6_addr_set_state(prefix_list[i].netif, j, IP6_ADDR_INVALID); + prefix_list[i].flags = 0; + + /* Exit loop. */ + break; + } + } + } +#endif /* LWIP_IPV6_AUTOCONFIG */ + + prefix_list[i].netif = NULL; + prefix_list[i].flags = 0; + } else { + prefix_list[i].invalidation_timer -= ND6_TMR_INTERVAL / 1000; + +#if LWIP_IPV6_AUTOCONFIG + /* Initiate address autoconfiguration for this prefix, if conditions are met. */ + if (prefix_list[i].netif->ip6_autoconfig_enabled && + (prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_AUTONOMOUS) && + !(prefix_list[i].flags & ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED)) { + s8_t j; + /* Try to get an address on this netif that is invalid. + * Skip 0 index (link-local address) */ + for (j = 1; j < LWIP_IPV6_NUM_ADDRESSES; j++) { + if (netif_ip6_addr_state(prefix_list[i].netif, j) == IP6_ADDR_INVALID) { + /* Generate an address using this prefix and interface ID from link-local address. */ + netif_ip6_addr_set_parts(prefix_list[i].netif, j, + prefix_list[i].prefix.addr[0], prefix_list[i].prefix.addr[1], + netif_ip6_addr(prefix_list[i].netif, 0)->addr[2], netif_ip6_addr(prefix_list[i].netif, 0)->addr[3]); + + /* Mark it as tentative (DAD will be performed if configured). */ + netif_ip6_addr_set_state(prefix_list[i].netif, j, IP6_ADDR_TENTATIVE); + + /* Mark this prefix with ADDRESS_GENERATED, so that we don't try again. */ + prefix_list[i].flags |= ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED; + + /* Exit loop. */ + break; + } + } + } +#endif /* LWIP_IPV6_AUTOCONFIG */ + } + } + } + + + /* Process our own addresses, if DAD configured. */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { + u8_t addr_state = netif_ip6_addr_state(netif, i); + if (ip6_addr_istentative(addr_state)) { + if ((addr_state & IP6_ADDR_TENTATIVE_COUNT_MASK) >= LWIP_IPV6_DUP_DETECT_ATTEMPTS) { + /* No NA received in response. Mark address as valid. */ + netif_ip6_addr_set_state(netif, i, IP6_ADDR_PREFERRED); + /* @todo implement preferred and valid lifetimes. */ + } else if (netif->flags & NETIF_FLAG_UP) { + /* Send a NS for this address. */ + nd6_send_ns(netif, netif_ip6_addr(netif, i), ND6_SEND_FLAG_MULTICAST_DEST); + /* tentative: set next state by increasing by one */ + netif_ip6_addr_set_state(netif, i, addr_state + 1); + /* @todo send max 1 NS per tmr call? enable return*/ + /*return;*/ + } + } + } + } + +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + /* Send router solicitation messages, if necessary. */ + for (netif = netif_list; netif != NULL; netif = netif->next) { + if ((netif->rs_count > 0) && (netif->flags & NETIF_FLAG_UP) && + (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, 0)))) { + if (nd6_send_rs(netif) == ERR_OK) { + netif->rs_count--; + } + } + } +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ + +} + +/** Send a neighbor solicitation message for a specific neighbor cache entry + * + * @param entry the neightbor cache entry for wich to send the message + * @param flags one of ND6_SEND_FLAG_* + */ +static void +nd6_send_neighbor_cache_probe(struct nd6_neighbor_cache_entry *entry, u8_t flags) +{ + nd6_send_ns(entry->netif, &entry->next_hop_address, flags); +} + +/** + * Send a neighbor solicitation message + * + * @param netif the netif on which to send the message + * @param target_addr the IPv6 target address for the ND message + * @param flags one of ND6_SEND_FLAG_* + */ +static void +nd6_send_ns(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) +{ + struct ns_header *ns_hdr; + struct pbuf *p; + const ip6_addr_t *src_addr; + u16_t lladdr_opt_len; + + if (ip6_addr_isvalid(netif_ip6_addr_state(netif,0))) { + /* Use link-local address as source address. */ + src_addr = netif_ip6_addr(netif, 0); + /* calculate option length (in 8-byte-blocks) */ + lladdr_opt_len = ((netif->hwaddr_len + 2) + 7) >> 3; + } else { + src_addr = IP6_ADDR_ANY6; + /* Option "MUST NOT be included when the source IP address is the unspecified address." */ + lladdr_opt_len = 0; + } + + /* Allocate a packet. */ + p = pbuf_alloc(PBUF_IP, sizeof(struct ns_header) + (lladdr_opt_len << 3), PBUF_RAM); + if (p == NULL) { + ND6_STATS_INC(nd6.memerr); + return; + } + + /* Set fields. */ + ns_hdr = (struct ns_header *)p->payload; + + ns_hdr->type = ICMP6_TYPE_NS; + ns_hdr->code = 0; + ns_hdr->chksum = 0; + ns_hdr->reserved = 0; + ip6_addr_set(&(ns_hdr->target_address), target_addr); + + if (lladdr_opt_len != 0) { + struct lladdr_option *lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct ns_header)); + lladdr_opt->type = ND6_OPTION_TYPE_SOURCE_LLADDR; + lladdr_opt->length = (u8_t)lladdr_opt_len; + SMEMCPY(lladdr_opt->addr, netif->hwaddr, netif->hwaddr_len); + } + + /* Generate the solicited node address for the target address. */ + if (flags & ND6_SEND_FLAG_MULTICAST_DEST) { + ip6_addr_set_solicitednode(&multicast_address, target_addr->addr[3]); + target_addr = &multicast_address; + } + +#if CHECKSUM_GEN_ICMP6 + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { + ns_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, + target_addr); + } +#endif /* CHECKSUM_GEN_ICMP6 */ + + /* Send the packet out. */ + ND6_STATS_INC(nd6.xmit); + ip6_output_if(p, (src_addr == IP6_ADDR_ANY6) ? NULL : src_addr, target_addr, + LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); + pbuf_free(p); +} + +/** + * Send a neighbor advertisement message + * + * @param netif the netif on which to send the message + * @param target_addr the IPv6 target address for the ND message + * @param flags one of ND6_SEND_FLAG_* + */ +static void +nd6_send_na(struct netif *netif, const ip6_addr_t *target_addr, u8_t flags) +{ + struct na_header *na_hdr; + struct lladdr_option *lladdr_opt; + struct pbuf *p; + const ip6_addr_t *src_addr; + const ip6_addr_t *dest_addr; + u16_t lladdr_opt_len; + + /* Use link-local address as source address. */ + /* src_addr = netif_ip6_addr(netif, 0); */ + /* Use target address as source address. */ + src_addr = target_addr; + + /* Allocate a packet. */ + lladdr_opt_len = ((netif->hwaddr_len + 2) >> 3) + (((netif->hwaddr_len + 2) & 0x07) ? 1 : 0); + p = pbuf_alloc(PBUF_IP, sizeof(struct na_header) + (lladdr_opt_len << 3), PBUF_RAM); + if (p == NULL) { + ND6_STATS_INC(nd6.memerr); + return; + } + + /* Set fields. */ + na_hdr = (struct na_header *)p->payload; + lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct na_header)); + + na_hdr->type = ICMP6_TYPE_NA; + na_hdr->code = 0; + na_hdr->chksum = 0; + na_hdr->flags = flags & 0xf0; + na_hdr->reserved[0] = 0; + na_hdr->reserved[1] = 0; + na_hdr->reserved[2] = 0; + ip6_addr_set(&(na_hdr->target_address), target_addr); + + lladdr_opt->type = ND6_OPTION_TYPE_TARGET_LLADDR; + lladdr_opt->length = (u8_t)lladdr_opt_len; + SMEMCPY(lladdr_opt->addr, netif->hwaddr, netif->hwaddr_len); + + /* Generate the solicited node address for the target address. */ + if (flags & ND6_SEND_FLAG_MULTICAST_DEST) { + ip6_addr_set_solicitednode(&multicast_address, target_addr->addr[3]); + dest_addr = &multicast_address; + } else if (flags & ND6_SEND_FLAG_ALLNODES_DEST) { + ip6_addr_set_allnodes_linklocal(&multicast_address); + dest_addr = &multicast_address; + } else { + dest_addr = ip6_current_src_addr(); + } + +#if CHECKSUM_GEN_ICMP6 + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { + na_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, + dest_addr); + } +#endif /* CHECKSUM_GEN_ICMP6 */ + + /* Send the packet out. */ + ND6_STATS_INC(nd6.xmit); + ip6_output_if(p, src_addr, dest_addr, + LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); + pbuf_free(p); +} + +#if LWIP_IPV6_SEND_ROUTER_SOLICIT +/** + * Send a router solicitation message + * + * @param netif the netif on which to send the message + */ +static err_t +nd6_send_rs(struct netif *netif) +{ + struct rs_header *rs_hdr; + struct lladdr_option *lladdr_opt; + struct pbuf *p; + const ip6_addr_t *src_addr; + err_t err; + u16_t lladdr_opt_len = 0; + + /* Link-local source address, or unspecified address? */ + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, 0))) { + src_addr = netif_ip6_addr(netif, 0); + } else { + src_addr = IP6_ADDR_ANY6; + } + + /* Generate the all routers target address. */ + ip6_addr_set_allrouters_linklocal(&multicast_address); + + /* Allocate a packet. */ + if (src_addr != IP6_ADDR_ANY6) { + lladdr_opt_len = ((netif->hwaddr_len + 2) >> 3) + (((netif->hwaddr_len + 2) & 0x07) ? 1 : 0); + } + p = pbuf_alloc(PBUF_IP, sizeof(struct rs_header) + (lladdr_opt_len << 3), PBUF_RAM); + if (p == NULL) { + ND6_STATS_INC(nd6.memerr); + return ERR_BUF; + } + + /* Set fields. */ + rs_hdr = (struct rs_header *)p->payload; + + rs_hdr->type = ICMP6_TYPE_RS; + rs_hdr->code = 0; + rs_hdr->chksum = 0; + rs_hdr->reserved = 0; + + if (src_addr != IP6_ADDR_ANY6) { + /* Include our hw address. */ + lladdr_opt = (struct lladdr_option *)((u8_t*)p->payload + sizeof(struct rs_header)); + lladdr_opt->type = ND6_OPTION_TYPE_SOURCE_LLADDR; + lladdr_opt->length = (u8_t)lladdr_opt_len; + SMEMCPY(lladdr_opt->addr, netif->hwaddr, netif->hwaddr_len); + } + +#if CHECKSUM_GEN_ICMP6 + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP6) { + rs_hdr->chksum = ip6_chksum_pseudo(p, IP6_NEXTH_ICMP6, p->len, src_addr, + &multicast_address); + } +#endif /* CHECKSUM_GEN_ICMP6 */ + + /* Send the packet out. */ + ND6_STATS_INC(nd6.xmit); + + err = ip6_output_if(p, (src_addr == IP6_ADDR_ANY6) ? NULL : src_addr, &multicast_address, + LWIP_ICMP6_HL, 0, IP6_NEXTH_ICMP6, netif); + pbuf_free(p); + + return err; +} +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ + +/** + * Search for a neighbor cache entry + * + * @param ip6addr the IPv6 address of the neighbor + * @return The neighbor cache entry index that matched, -1 if no + * entry is found + */ +static s8_t +nd6_find_neighbor_cache_entry(const ip6_addr_t *ip6addr) +{ + s8_t i; + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if (ip6_addr_cmp(ip6addr, &(neighbor_cache[i].next_hop_address))) { + return i; + } + } + return -1; +} + +/** + * Create a new neighbor cache entry. + * + * If no unused entry is found, will try to recycle an old entry + * according to ad-hoc "age" heuristic. + * + * @return The neighbor cache entry index that was created, -1 if no + * entry could be created + */ +static s8_t +nd6_new_neighbor_cache_entry(void) +{ + s8_t i; + s8_t j; + u32_t time; + + + /* First, try to find an empty entry. */ + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if (neighbor_cache[i].state == ND6_NO_ENTRY) { + return i; + } + } + + /* We need to recycle an entry. in general, do not recycle if it is a router. */ + + /* Next, try to find a Stale entry. */ + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if ((neighbor_cache[i].state == ND6_STALE) && + (!neighbor_cache[i].isrouter)) { + nd6_free_neighbor_cache_entry(i); + return i; + } + } + + /* Next, try to find a Probe entry. */ + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if ((neighbor_cache[i].state == ND6_PROBE) && + (!neighbor_cache[i].isrouter)) { + nd6_free_neighbor_cache_entry(i); + return i; + } + } + + /* Next, try to find a Delayed entry. */ + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if ((neighbor_cache[i].state == ND6_DELAY) && + (!neighbor_cache[i].isrouter)) { + nd6_free_neighbor_cache_entry(i); + return i; + } + } + + /* Next, try to find the oldest reachable entry. */ + time = 0xfffffffful; + j = -1; + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if ((neighbor_cache[i].state == ND6_REACHABLE) && + (!neighbor_cache[i].isrouter)) { + if (neighbor_cache[i].counter.reachable_time < time) { + j = i; + time = neighbor_cache[i].counter.reachable_time; + } + } + } + if (j >= 0) { + nd6_free_neighbor_cache_entry(j); + return j; + } + + /* Next, find oldest incomplete entry without queued packets. */ + time = 0; + j = -1; + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if ( + (neighbor_cache[i].q == NULL) && + (neighbor_cache[i].state == ND6_INCOMPLETE) && + (!neighbor_cache[i].isrouter)) { + if (neighbor_cache[i].counter.probes_sent >= time) { + j = i; + time = neighbor_cache[i].counter.probes_sent; + } + } + } + if (j >= 0) { + nd6_free_neighbor_cache_entry(j); + return j; + } + + /* Next, find oldest incomplete entry with queued packets. */ + time = 0; + j = -1; + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if ((neighbor_cache[i].state == ND6_INCOMPLETE) && + (!neighbor_cache[i].isrouter)) { + if (neighbor_cache[i].counter.probes_sent >= time) { + j = i; + time = neighbor_cache[i].counter.probes_sent; + } + } + } + if (j >= 0) { + nd6_free_neighbor_cache_entry(j); + return j; + } + + /* No more entries to try. */ + return -1; +} + +/** + * Will free any resources associated with a neighbor cache + * entry, and will mark it as unused. + * + * @param i the neighbor cache entry index to free + */ +static void +nd6_free_neighbor_cache_entry(s8_t i) +{ + if ((i < 0) || (i >= LWIP_ND6_NUM_NEIGHBORS)) { + return; + } + if (neighbor_cache[i].isrouter) { + /* isrouter needs to be cleared before deleting a neighbor cache entry */ + return; + } + + /* Free any queued packets. */ + if (neighbor_cache[i].q != NULL) { + nd6_free_q(neighbor_cache[i].q); + neighbor_cache[i].q = NULL; + } + + neighbor_cache[i].state = ND6_NO_ENTRY; + neighbor_cache[i].isrouter = 0; + neighbor_cache[i].netif = NULL; + neighbor_cache[i].counter.reachable_time = 0; + ip6_addr_set_zero(&(neighbor_cache[i].next_hop_address)); +} + +/** + * Search for a destination cache entry + * + * @param ip6addr the IPv6 address of the destination + * @return The destination cache entry index that matched, -1 if no + * entry is found + */ +static s8_t +nd6_find_destination_cache_entry(const ip6_addr_t *ip6addr) +{ + s8_t i; + for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { + if (ip6_addr_cmp(ip6addr, &(destination_cache[i].destination_addr))) { + return i; + } + } + return -1; +} + +/** + * Create a new destination cache entry. If no unused entry is found, + * will recycle oldest entry. + * + * @return The destination cache entry index that was created, -1 if no + * entry was created + */ +static s8_t +nd6_new_destination_cache_entry(void) +{ + s8_t i, j; + u32_t age; + + /* Find an empty entry. */ + for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { + if (ip6_addr_isany(&(destination_cache[i].destination_addr))) { + return i; + } + } + + /* Find oldest entry. */ + age = 0; + j = LWIP_ND6_NUM_DESTINATIONS - 1; + for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { + if (destination_cache[i].age > age) { + j = i; + } + } + + return j; +} + +/** + * Clear the destination cache. + * + * This operation may be necessary for consistency in the light of changing + * local addresses and/or use of the gateway hook. + */ +void +nd6_clear_destination_cache(void) +{ + int i; + + for (i = 0; i < LWIP_ND6_NUM_DESTINATIONS; i++) { + ip6_addr_set_any(&destination_cache[i].destination_addr); + } +} + +/** + * Determine whether an address matches an on-link prefix. + * + * @param ip6addr the IPv6 address to match + * @return 1 if the address is on-link, 0 otherwise + */ +static s8_t +nd6_is_prefix_in_netif(const ip6_addr_t *ip6addr, struct netif *netif) +{ + s8_t i; + for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { + if ((prefix_list[i].netif == netif) && + (prefix_list[i].invalidation_timer > 0) && + ip6_addr_netcmp(ip6addr, &(prefix_list[i].prefix))) { + return 1; + } + } + /* Check to see if address prefix matches a (manually?) configured address. */ + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_netcmp(ip6addr, netif_ip6_addr(netif, i))) { + return 1; + } + } + return 0; +} + +/** + * Select a default router for a destination. + * + * @param ip6addr the destination address + * @param netif the netif for the outgoing packet, if known + * @return the default router entry index, or -1 if no suitable + * router is found + */ +static s8_t +nd6_select_router(const ip6_addr_t *ip6addr, struct netif *netif) +{ + s8_t i; + /* last_router is used for round-robin router selection (as recommended + * in RFC). This is more robust in case one router is not reachable, + * we are not stuck trying to resolve it. */ + static s8_t last_router; + (void)ip6addr; /* @todo match preferred routes!! (must implement ND6_OPTION_TYPE_ROUTE_INFO) */ + + /* @todo: implement default router preference */ + + /* Look for reachable routers. */ + for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { + if (++last_router >= LWIP_ND6_NUM_ROUTERS) { + last_router = 0; + } + if ((default_router_list[i].neighbor_entry != NULL) && + (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1) && + (default_router_list[i].invalidation_timer > 0) && + (default_router_list[i].neighbor_entry->state == ND6_REACHABLE)) { + return i; + } + } + + /* Look for router in other reachability states, but still valid according to timer. */ + for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { + if (++last_router >= LWIP_ND6_NUM_ROUTERS) { + last_router = 0; + } + if ((default_router_list[i].neighbor_entry != NULL) && + (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1) && + (default_router_list[i].invalidation_timer > 0)) { + return i; + } + } + + /* Look for any router for which we have any information at all. */ + for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { + if (++last_router >= LWIP_ND6_NUM_ROUTERS) { + last_router = 0; + } + if (default_router_list[i].neighbor_entry != NULL && + (netif != NULL ? netif == default_router_list[i].neighbor_entry->netif : 1)) { + return i; + } + } + + /* no suitable router found. */ + return -1; +} + +/** + * Find a router-announced route to the given destination. + * + * The caller is responsible for checking whether the returned netif, if any, + * is in a suitable state (up, link up) to be used for packet transmission. + * + * @param ip6addr the destination IPv6 address + * @return the netif to use for the destination, or NULL if none found + */ +struct netif * +nd6_find_route(const ip6_addr_t *ip6addr) +{ + s8_t i; + + i = nd6_select_router(ip6addr, NULL); + if (i >= 0) { + if (default_router_list[i].neighbor_entry != NULL) { + return default_router_list[i].neighbor_entry->netif; /* may be NULL */ + } + } + + return NULL; +} + +/** + * Find an entry for a default router. + * + * @param router_addr the IPv6 address of the router + * @param netif the netif on which the router is found, if known + * @return the index of the router entry, or -1 if not found + */ +static s8_t +nd6_get_router(const ip6_addr_t *router_addr, struct netif *netif) +{ + s8_t i; + + /* Look for router. */ + for (i = 0; i < LWIP_ND6_NUM_ROUTERS; i++) { + if ((default_router_list[i].neighbor_entry != NULL) && + ((netif != NULL) ? netif == default_router_list[i].neighbor_entry->netif : 1) && + ip6_addr_cmp(router_addr, &(default_router_list[i].neighbor_entry->next_hop_address))) { + return i; + } + } + + /* router not found. */ + return -1; +} + +/** + * Create a new entry for a default router. + * + * @param router_addr the IPv6 address of the router + * @param netif the netif on which the router is connected, if known + * @return the index on the router table, or -1 if could not be created + */ +static s8_t +nd6_new_router(const ip6_addr_t *router_addr, struct netif *netif) +{ + s8_t router_index; + s8_t free_router_index; + s8_t neighbor_index; + + /* Do we have a neighbor entry for this router? */ + neighbor_index = nd6_find_neighbor_cache_entry(router_addr); + if (neighbor_index < 0) { + /* Create a neighbor entry for this router. */ + neighbor_index = nd6_new_neighbor_cache_entry(); + if (neighbor_index < 0) { + /* Could not create neighbor entry for this router. */ + return -1; + } + ip6_addr_set(&(neighbor_cache[neighbor_index].next_hop_address), router_addr); + neighbor_cache[neighbor_index].netif = netif; + neighbor_cache[neighbor_index].q = NULL; + neighbor_cache[neighbor_index].state = ND6_INCOMPLETE; + neighbor_cache[neighbor_index].counter.probes_sent = 1; + nd6_send_neighbor_cache_probe(&neighbor_cache[neighbor_index], ND6_SEND_FLAG_MULTICAST_DEST); + } + + /* Mark neighbor as router. */ + neighbor_cache[neighbor_index].isrouter = 1; + + /* Look for empty entry. */ + free_router_index = LWIP_ND6_NUM_ROUTERS; + for (router_index = LWIP_ND6_NUM_ROUTERS - 1; router_index >= 0; router_index--) { + /* check if router already exists (this is a special case for 2 netifs on the same subnet + - e.g. wifi and cable) */ + if(default_router_list[router_index].neighbor_entry == &(neighbor_cache[neighbor_index])){ + return router_index; + } + if (default_router_list[router_index].neighbor_entry == NULL) { + /* remember lowest free index to create a new entry */ + free_router_index = router_index; + } + } + if (free_router_index < LWIP_ND6_NUM_ROUTERS) { + default_router_list[free_router_index].neighbor_entry = &(neighbor_cache[neighbor_index]); + return free_router_index; + } + + /* Could not create a router entry. */ + + /* Mark neighbor entry as not-router. Entry might be useful as neighbor still. */ + neighbor_cache[neighbor_index].isrouter = 0; + + /* router not found. */ + return -1; +} + +/** + * Find the cached entry for an on-link prefix. + * + * @param prefix the IPv6 prefix that is on-link + * @param netif the netif on which the prefix is on-link + * @return the index on the prefix table, or -1 if not found + */ +static s8_t +nd6_get_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) +{ + s8_t i; + + /* Look for prefix in list. */ + for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) { + if ((ip6_addr_netcmp(&(prefix_list[i].prefix), prefix)) && + (prefix_list[i].netif == netif)) { + return i; + } + } + + /* Entry not available. */ + return -1; +} + +/** + * Creates a new entry for an on-link prefix. + * + * @param prefix the IPv6 prefix that is on-link + * @param netif the netif on which the prefix is on-link + * @return the index on the prefix table, or -1 if not created + */ +static s8_t +nd6_new_onlink_prefix(ip6_addr_t *prefix, struct netif *netif) +{ + s8_t i; + + /* Create new entry. */ + for (i = 0; i < LWIP_ND6_NUM_PREFIXES; ++i) { + if ((prefix_list[i].netif == NULL) || + (prefix_list[i].invalidation_timer == 0)) { + /* Found empty prefix entry. */ + prefix_list[i].netif = netif; + ip6_addr_set(&(prefix_list[i].prefix), prefix); +#if LWIP_IPV6_AUTOCONFIG + prefix_list[i].flags = 0; +#endif /* LWIP_IPV6_AUTOCONFIG */ + return i; + } + } + + /* Entry not available. */ + return -1; +} + +/** + * Determine the next hop for a destination. Will determine if the + * destination is on-link, else a suitable on-link router is selected. + * + * The last entry index is cached for fast entry search. + * + * @param ip6addr the destination address + * @param netif the netif on which the packet will be sent + * @return the neighbor cache entry for the next hop, ERR_RTE if no + * suitable next hop was found, ERR_MEM if no cache entry + * could be created + */ +static s8_t +nd6_get_next_hop_entry(const ip6_addr_t *ip6addr, struct netif *netif) +{ +#ifdef LWIP_HOOK_ND6_GET_GW + const ip6_addr_t *next_hop_addr; +#endif /* LWIP_HOOK_ND6_GET_GW */ + s8_t i; + +#if LWIP_NETIF_HWADDRHINT + if (netif->addr_hint != NULL) { + /* per-pcb cached entry was given */ + u8_t addr_hint = *(netif->addr_hint); + if (addr_hint < LWIP_ND6_NUM_DESTINATIONS) { + nd6_cached_destination_index = addr_hint; + } + } +#endif /* LWIP_NETIF_HWADDRHINT */ + + /* Look for ip6addr in destination cache. */ + if (ip6_addr_cmp(ip6addr, &(destination_cache[nd6_cached_destination_index].destination_addr))) { + /* the cached entry index is the right one! */ + /* do nothing. */ + ND6_STATS_INC(nd6.cachehit); + } else { + /* Search destination cache. */ + i = nd6_find_destination_cache_entry(ip6addr); + if (i >= 0) { + /* found destination entry. make it our new cached index. */ + nd6_cached_destination_index = i; + } else { + /* Not found. Create a new destination entry. */ + i = nd6_new_destination_cache_entry(); + if (i >= 0) { + /* got new destination entry. make it our new cached index. */ + nd6_cached_destination_index = i; + } else { + /* Could not create a destination cache entry. */ + return ERR_MEM; + } + + /* Copy dest address to destination cache. */ + ip6_addr_set(&(destination_cache[nd6_cached_destination_index].destination_addr), ip6addr); + + /* Now find the next hop. is it a neighbor? */ + if (ip6_addr_islinklocal(ip6addr) || + nd6_is_prefix_in_netif(ip6addr, netif)) { + /* Destination in local link. */ + destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; + ip6_addr_copy(destination_cache[nd6_cached_destination_index].next_hop_addr, destination_cache[nd6_cached_destination_index].destination_addr); +#ifdef LWIP_HOOK_ND6_GET_GW + } else if ((next_hop_addr = LWIP_HOOK_ND6_GET_GW(netif, ip6addr)) != NULL) { + /* Next hop for destination provided by hook function. */ + destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; + ip6_addr_set(&destination_cache[nd6_cached_destination_index].next_hop_addr, next_hop_addr); +#endif /* LWIP_HOOK_ND6_GET_GW */ + } else { + /* We need to select a router. */ + i = nd6_select_router(ip6addr, netif); + if (i < 0) { + /* No router found. */ + ip6_addr_set_any(&(destination_cache[nd6_cached_destination_index].destination_addr)); + return ERR_RTE; + } + destination_cache[nd6_cached_destination_index].pmtu = netif->mtu; /* Start with netif mtu, correct through ICMPv6 if necessary */ + ip6_addr_copy(destination_cache[nd6_cached_destination_index].next_hop_addr, default_router_list[i].neighbor_entry->next_hop_address); + } + } + } + +#if LWIP_NETIF_HWADDRHINT + if (netif->addr_hint != NULL) { + /* per-pcb cached entry was given */ + *(netif->addr_hint) = nd6_cached_destination_index; + } +#endif /* LWIP_NETIF_HWADDRHINT */ + + /* Look in neighbor cache for the next-hop address. */ + if (ip6_addr_cmp(&(destination_cache[nd6_cached_destination_index].next_hop_addr), + &(neighbor_cache[nd6_cached_neighbor_index].next_hop_address))) { + /* Cache hit. */ + /* Do nothing. */ + ND6_STATS_INC(nd6.cachehit); + } else { + i = nd6_find_neighbor_cache_entry(&(destination_cache[nd6_cached_destination_index].next_hop_addr)); + if (i >= 0) { + /* Found a matching record, make it new cached entry. */ + nd6_cached_neighbor_index = i; + } else { + /* Neighbor not in cache. Make a new entry. */ + i = nd6_new_neighbor_cache_entry(); + if (i >= 0) { + /* got new neighbor entry. make it our new cached index. */ + nd6_cached_neighbor_index = i; + } else { + /* Could not create a neighbor cache entry. */ + return ERR_MEM; + } + + /* Initialize fields. */ + ip6_addr_copy(neighbor_cache[i].next_hop_address, + destination_cache[nd6_cached_destination_index].next_hop_addr); + neighbor_cache[i].isrouter = 0; + neighbor_cache[i].netif = netif; + neighbor_cache[i].state = ND6_INCOMPLETE; + neighbor_cache[i].counter.probes_sent = 1; + nd6_send_neighbor_cache_probe(&neighbor_cache[i], ND6_SEND_FLAG_MULTICAST_DEST); + } + } + + /* Reset this destination's age. */ + destination_cache[nd6_cached_destination_index].age = 0; + + return nd6_cached_neighbor_index; +} + +/** + * Queue a packet for a neighbor. + * + * @param neighbor_index the index in the neighbor cache table + * @param q packet to be queued + * @return ERR_OK if succeeded, ERR_MEM if out of memory + */ +static err_t +nd6_queue_packet(s8_t neighbor_index, struct pbuf *q) +{ + err_t result = ERR_MEM; + struct pbuf *p; + int copy_needed = 0; +#if LWIP_ND6_QUEUEING + struct nd6_q_entry *new_entry, *r; +#endif /* LWIP_ND6_QUEUEING */ + + if ((neighbor_index < 0) || (neighbor_index >= LWIP_ND6_NUM_NEIGHBORS)) { + return ERR_ARG; + } + + /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but + * to copy the whole queue into a new PBUF_RAM (see bug #11400) + * PBUF_ROMs can be left as they are, since ROM must not get changed. */ + p = q; + while (p) { + if (p->type != PBUF_ROM) { + copy_needed = 1; + break; + } + p = p->next; + } + if (copy_needed) { + /* copy the whole packet into new pbufs */ + p = pbuf_alloc(PBUF_LINK, q->tot_len, PBUF_RAM); + while ((p == NULL) && (neighbor_cache[neighbor_index].q != NULL)) { + /* Free oldest packet (as per RFC recommendation) */ +#if LWIP_ND6_QUEUEING + r = neighbor_cache[neighbor_index].q; + neighbor_cache[neighbor_index].q = r->next; + r->next = NULL; + nd6_free_q(r); +#else /* LWIP_ND6_QUEUEING */ + pbuf_free(neighbor_cache[neighbor_index].q); + neighbor_cache[neighbor_index].q = NULL; +#endif /* LWIP_ND6_QUEUEING */ + p = pbuf_alloc(PBUF_LINK, q->tot_len, PBUF_RAM); + } + if (p != NULL) { + if (pbuf_copy(p, q) != ERR_OK) { + pbuf_free(p); + p = NULL; + } + } + } else { + /* referencing the old pbuf is enough */ + p = q; + pbuf_ref(p); + } + /* packet was copied/ref'd? */ + if (p != NULL) { + /* queue packet ... */ +#if LWIP_ND6_QUEUEING + /* allocate a new nd6 queue entry */ + new_entry = (struct nd6_q_entry *)memp_malloc(MEMP_ND6_QUEUE); + if ((new_entry == NULL) && (neighbor_cache[neighbor_index].q != NULL)) { + /* Free oldest packet (as per RFC recommendation) */ + r = neighbor_cache[neighbor_index].q; + neighbor_cache[neighbor_index].q = r->next; + r->next = NULL; + nd6_free_q(r); + new_entry = (struct nd6_q_entry *)memp_malloc(MEMP_ND6_QUEUE); + } + if (new_entry != NULL) { + new_entry->next = NULL; + new_entry->p = p; + if (neighbor_cache[neighbor_index].q != NULL) { + /* queue was already existent, append the new entry to the end */ + r = neighbor_cache[neighbor_index].q; + while (r->next != NULL) { + r = r->next; + } + r->next = new_entry; + } else { + /* queue did not exist, first item in queue */ + neighbor_cache[neighbor_index].q = new_entry; + } + LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: queued packet %p on neighbor entry %"S16_F"\n", (void *)p, (s16_t)neighbor_index)); + result = ERR_OK; + } else { + /* the pool MEMP_ND6_QUEUE is empty */ + pbuf_free(p); + LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: could not queue a copy of packet %p (out of memory)\n", (void *)p)); + /* { result == ERR_MEM } through initialization */ + } +#else /* LWIP_ND6_QUEUEING */ + /* Queue a single packet. If an older packet is already queued, free it as per RFC. */ + if (neighbor_cache[neighbor_index].q != NULL) { + pbuf_free(neighbor_cache[neighbor_index].q); + } + neighbor_cache[neighbor_index].q = p; + LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: queued packet %p on neighbor entry %"S16_F"\n", (void *)p, (s16_t)neighbor_index)); + result = ERR_OK; +#endif /* LWIP_ND6_QUEUEING */ + } else { + LWIP_DEBUGF(LWIP_DBG_TRACE, ("ipv6: could not queue a copy of packet %p (out of memory)\n", (void *)q)); + /* { result == ERR_MEM } through initialization */ + } + + return result; +} + +#if LWIP_ND6_QUEUEING +/** + * Free a complete queue of nd6 q entries + * + * @param q a queue of nd6_q_entry to free + */ +static void +nd6_free_q(struct nd6_q_entry *q) +{ + struct nd6_q_entry *r; + LWIP_ASSERT("q != NULL", q != NULL); + LWIP_ASSERT("q->p != NULL", q->p != NULL); + while (q) { + r = q; + q = q->next; + LWIP_ASSERT("r->p != NULL", (r->p != NULL)); + pbuf_free(r->p); + memp_free(MEMP_ND6_QUEUE, r); + } +} +#endif /* LWIP_ND6_QUEUEING */ + +/** + * Send queued packets for a neighbor + * + * @param i the neighbor to send packets to + */ +static void +nd6_send_q(s8_t i) +{ + struct ip6_hdr *ip6hdr; + ip6_addr_t dest; +#if LWIP_ND6_QUEUEING + struct nd6_q_entry *q; +#endif /* LWIP_ND6_QUEUEING */ + + if ((i < 0) || (i >= LWIP_ND6_NUM_NEIGHBORS)) { + return; + } + +#if LWIP_ND6_QUEUEING + while (neighbor_cache[i].q != NULL) { + /* remember first in queue */ + q = neighbor_cache[i].q; + /* pop first item off the queue */ + neighbor_cache[i].q = q->next; + /* Get ipv6 header. */ + ip6hdr = (struct ip6_hdr *)(q->p->payload); + /* Create an aligned copy. */ + ip6_addr_set(&dest, &(ip6hdr->dest)); + /* send the queued IPv6 packet */ + (neighbor_cache[i].netif)->output_ip6(neighbor_cache[i].netif, q->p, &dest); + /* free the queued IP packet */ + pbuf_free(q->p); + /* now queue entry can be freed */ + memp_free(MEMP_ND6_QUEUE, q); + } +#else /* LWIP_ND6_QUEUEING */ + if (neighbor_cache[i].q != NULL) { + /* Get ipv6 header. */ + ip6hdr = (struct ip6_hdr *)(neighbor_cache[i].q->payload); + /* Create an aligned copy. */ + ip6_addr_set(&dest, &(ip6hdr->dest)); + /* send the queued IPv6 packet */ + (neighbor_cache[i].netif)->output_ip6(neighbor_cache[i].netif, neighbor_cache[i].q, &dest); + /* free the queued IP packet */ + pbuf_free(neighbor_cache[i].q); + neighbor_cache[i].q = NULL; + } +#endif /* LWIP_ND6_QUEUEING */ +} + +/** + * A packet is to be transmitted to a specific IPv6 destination on a specific + * interface. Check if we can find the hardware address of the next hop to use + * for the packet. If so, give the hardware address to the caller, which should + * use it to send the packet right away. Otherwise, enqueue the packet for + * later transmission while looking up the hardware address, if possible. + * + * As such, this function returns one of three different possible results: + * + * - ERR_OK with a non-NULL 'hwaddrp': the caller should send the packet now. + * - ERR_OK with a NULL 'hwaddrp': the packet has been enqueued for later. + * - not ERR_OK: something went wrong; forward the error upward in the stack. + * + * @param netif The lwIP network interface on which the IP packet will be sent. + * @param q The pbuf(s) containing the IP packet to be sent. + * @param ip6addr The destination IPv6 address of the packet. + * @param hwaddrp On success, filled with a pointer to a HW address or NULL (meaning + * the packet has been queued). + * @return + * - ERR_OK on success, ERR_RTE if no route was found for the packet, + * or ERR_MEM if low memory conditions prohibit sending the packet at all. + */ +err_t +nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp) +{ + s8_t i; + + /* Get next hop record. */ + i = nd6_get_next_hop_entry(ip6addr, netif); + if (i < 0) { + /* failed to get a next hop neighbor record. */ + return i; + } + + /* Now that we have a destination record, send or queue the packet. */ + if (neighbor_cache[i].state == ND6_STALE) { + /* Switch to delay state. */ + neighbor_cache[i].state = ND6_DELAY; + neighbor_cache[i].counter.delay_time = LWIP_ND6_DELAY_FIRST_PROBE_TIME / ND6_TMR_INTERVAL; + } + /* @todo should we send or queue if PROBE? send for now, to let unicast NS pass. */ + if ((neighbor_cache[i].state == ND6_REACHABLE) || + (neighbor_cache[i].state == ND6_DELAY) || + (neighbor_cache[i].state == ND6_PROBE)) { + + /* Tell the caller to send out the packet now. */ + *hwaddrp = neighbor_cache[i].lladdr; + return ERR_OK; + } + + /* We should queue packet on this interface. */ + *hwaddrp = NULL; + return nd6_queue_packet(i, q); +} + + +/** + * Get the Path MTU for a destination. + * + * @param ip6addr the destination address + * @param netif the netif on which the packet will be sent + * @return the Path MTU, if known, or the netif default MTU + */ +u16_t +nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif) +{ + s8_t i; + + i = nd6_find_destination_cache_entry(ip6addr); + if (i >= 0) { + if (destination_cache[i].pmtu > 0) { + return destination_cache[i].pmtu; + } + } + + if (netif != NULL) { + return netif->mtu; + } + + return 1280; /* Minimum MTU */ +} + + +#if LWIP_ND6_TCP_REACHABILITY_HINTS +/** + * Provide the Neighbor discovery process with a hint that a + * destination is reachable. Called by tcp_receive when ACKs are + * received or sent (as per RFC). This is useful to avoid sending + * NS messages every 30 seconds. + * + * @param ip6addr the destination address which is know to be reachable + * by an upper layer protocol (TCP) + */ +void +nd6_reachability_hint(const ip6_addr_t *ip6addr) +{ + s8_t i; + + /* Find destination in cache. */ + if (ip6_addr_cmp(ip6addr, &(destination_cache[nd6_cached_destination_index].destination_addr))) { + i = nd6_cached_destination_index; + ND6_STATS_INC(nd6.cachehit); + } else { + i = nd6_find_destination_cache_entry(ip6addr); + } + if (i < 0) { + return; + } + + /* Find next hop neighbor in cache. */ + if (ip6_addr_cmp(&(destination_cache[i].next_hop_addr), &(neighbor_cache[nd6_cached_neighbor_index].next_hop_address))) { + i = nd6_cached_neighbor_index; + ND6_STATS_INC(nd6.cachehit); + } else { + i = nd6_find_neighbor_cache_entry(&(destination_cache[i].next_hop_addr)); + } + if (i < 0) { + return; + } + + /* For safety: don't set as reachable if we don't have a LL address yet. Misuse protection. */ + if (neighbor_cache[i].state == ND6_INCOMPLETE || neighbor_cache[i].state == ND6_NO_ENTRY) { + return; + } + + /* Set reachability state. */ + neighbor_cache[i].state = ND6_REACHABLE; + neighbor_cache[i].counter.reachable_time = reachable_time; +} +#endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ + +/** + * Remove all prefix, neighbor_cache and router entries of the specified netif. + * + * @param netif points to a network interface + */ +void +nd6_cleanup_netif(struct netif *netif) +{ + u8_t i; + s8_t router_index; + for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { + if (prefix_list[i].netif == netif) { + prefix_list[i].netif = NULL; + prefix_list[i].flags = 0; + } + } + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if (neighbor_cache[i].netif == netif) { + for (router_index = 0; router_index < LWIP_ND6_NUM_ROUTERS; router_index++) { + if (default_router_list[router_index].neighbor_entry == &neighbor_cache[i]) { + default_router_list[router_index].neighbor_entry = NULL; + default_router_list[router_index].flags = 0; + } + } + neighbor_cache[i].isrouter = 0; + nd6_free_neighbor_cache_entry(i); + } + } +} + +#if LWIP_IPV6_MLD +/** + * The state of a local IPv6 address entry is about to change. If needed, join + * or leave the solicited-node multicast group for the address. + * + * @param netif The netif that owns the address. + * @param addr_idx The index of the address. + * @param new_state The new (IP6_ADDR_) state for the address. + */ +void +nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state) +{ + u8_t old_state, old_member, new_member; + + old_state = netif_ip6_addr_state(netif, addr_idx); + + /* Determine whether we were, and should be, a member of the solicited-node + * multicast group for this address. For tentative addresses, the group is + * not joined until the address enters the TENTATIVE_1 (or VALID) state. */ + old_member = (old_state != IP6_ADDR_INVALID && old_state != IP6_ADDR_TENTATIVE); + new_member = (new_state != IP6_ADDR_INVALID && new_state != IP6_ADDR_TENTATIVE); + + if (old_member != new_member) { + ip6_addr_set_solicitednode(&multicast_address, netif_ip6_addr(netif, addr_idx)->addr[3]); + + if (new_member) { + mld6_joingroup_netif(netif, &multicast_address); + } else { + mld6_leavegroup_netif(netif, &multicast_address); + } + } +} +#endif /* LWIP_IPV6_MLD */ + +#endif /* LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/mem.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/mem.c index db3b7cc..0df6d28 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/mem.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/mem.c @@ -1,777 +1,777 @@ -/** - * @file - * Dynamic memory manager - * - * This is a lightweight replacement for the standard C library malloc(). - * - * If you want to use the standard C library malloc() instead, define - * MEM_LIBC_MALLOC to 1 in your lwipopts.h - * - * To let mem_malloc() use pools (prevents fragmentation and is much faster than - * a heap but might waste some memory), define MEM_USE_POOLS to 1, define - * MEMP_USE_CUSTOM_POOLS to 1 and create a file "lwippools.h" that includes a list - * of pools like this (more pools can be added between _START and _END): - * - * Define three pools with sizes 256, 512, and 1512 bytes - * LWIP_MALLOC_MEMPOOL_START - * LWIP_MALLOC_MEMPOOL(20, 256) - * LWIP_MALLOC_MEMPOOL(10, 512) - * LWIP_MALLOC_MEMPOOL(5, 1512) - * LWIP_MALLOC_MEMPOOL_END - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * Simon Goldschmidt - * - */ - -#include "lwip/opt.h" -#include "lwip/mem.h" -#include "lwip/def.h" -#include "lwip/sys.h" -#include "lwip/stats.h" -#include "lwip/err.h" - -#include - -#if MEM_LIBC_MALLOC -#include /* for malloc()/free() */ -#endif - -#if MEM_LIBC_MALLOC || MEM_USE_POOLS - -/** mem_init is not used when using pools instead of a heap or using - * C library malloc(). - */ -void -mem_init(void) -{ -} - -/** mem_trim is not used when using pools instead of a heap or using - * C library malloc(): we can't free part of a pool element and the stack - * support mem_trim() to return a different pointer - */ -void* -mem_trim(void *mem, mem_size_t size) -{ - LWIP_UNUSED_ARG(size); - return mem; -} -#endif /* MEM_LIBC_MALLOC || MEM_USE_POOLS */ - -#if MEM_LIBC_MALLOC -/* lwIP heap implemented using C library malloc() */ - -/* in case C library malloc() needs extra protection, - * allow these defines to be overridden. - */ -#ifndef mem_clib_free -#define mem_clib_free free -#endif -#ifndef mem_clib_malloc -#define mem_clib_malloc malloc -#endif -#ifndef mem_clib_calloc -#define mem_clib_calloc calloc -#endif - -#if LWIP_STATS && MEM_STATS -#define MEM_LIBC_STATSHELPER_SIZE LWIP_MEM_ALIGN_SIZE(sizeof(mem_size_t)) -#else -#define MEM_LIBC_STATSHELPER_SIZE 0 -#endif - -/** - * Allocate a block of memory with a minimum of 'size' bytes. - * - * @param size is the minimum size of the requested block in bytes. - * @return pointer to allocated memory or NULL if no free memory was found. - * - * Note that the returned value must always be aligned (as defined by MEM_ALIGNMENT). - */ -void * -mem_malloc(mem_size_t size) -{ - void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE); - if (ret == NULL) { - MEM_STATS_INC(err); - } else { - LWIP_ASSERT("malloc() must return aligned memory", LWIP_MEM_ALIGN(ret) == ret); -#if LWIP_STATS && MEM_STATS - *(mem_size_t*)ret = size; - ret = (u8_t*)ret + MEM_LIBC_STATSHELPER_SIZE; - MEM_STATS_INC_USED(used, size); -#endif - } - return ret; -} - -/** Put memory back on the heap - * - * @param rmem is the pointer as returned by a previous call to mem_malloc() - */ -void -mem_free(void *rmem) -{ - LWIP_ASSERT("rmem != NULL", (rmem != NULL)); - LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem))); -#if LWIP_STATS && MEM_STATS - rmem = (u8_t*)rmem - MEM_LIBC_STATSHELPER_SIZE; - MEM_STATS_DEC_USED(used, *(mem_size_t*)rmem); -#endif - mem_clib_free(rmem); -} - -#elif MEM_USE_POOLS - -/* lwIP heap implemented with different sized pools */ - -/** - * Allocate memory: determine the smallest pool that is big enough - * to contain an element of 'size' and get an element from that pool. - * - * @param size the size in bytes of the memory needed - * @return a pointer to the allocated memory or NULL if the pool is empty - */ -void * -mem_malloc(mem_size_t size) -{ - void *ret; - struct memp_malloc_helper *element = NULL; - memp_t poolnr; - mem_size_t required_size = size + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)); - - for (poolnr = MEMP_POOL_FIRST; poolnr <= MEMP_POOL_LAST; poolnr = (memp_t)(poolnr + 1)) { - /* is this pool big enough to hold an element of the required size - plus a struct memp_malloc_helper that saves the pool this element came from? */ - if (required_size <= memp_pools[poolnr]->size) { - element = (struct memp_malloc_helper*)memp_malloc(poolnr); - if (element == NULL) { - /* No need to DEBUGF or ASSERT: This error is already taken care of in memp.c */ -#if MEM_USE_POOLS_TRY_BIGGER_POOL - /** Try a bigger pool if this one is empty! */ - if (poolnr < MEMP_POOL_LAST) { - continue; - } -#endif /* MEM_USE_POOLS_TRY_BIGGER_POOL */ - MEM_STATS_INC(err); - return NULL; - } - break; - } - } - if (poolnr > MEMP_POOL_LAST) { - LWIP_ASSERT("mem_malloc(): no pool is that big!", 0); - MEM_STATS_INC(err); - return NULL; - } - - /* save the pool number this element came from */ - element->poolnr = poolnr; - /* and return a pointer to the memory directly after the struct memp_malloc_helper */ - ret = (u8_t*)element + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)); - -#if MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) - /* truncating to u16_t is safe because struct memp_desc::size is u16_t */ - element->size = (u16_t)size; - MEM_STATS_INC_USED(used, element->size); -#endif /* MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) */ -#if MEMP_OVERFLOW_CHECK - /* initialize unused memory (diff between requested size and selected pool's size) */ - memset((u8_t*)ret + size, 0xcd, memp_pools[poolnr]->size - size); -#endif /* MEMP_OVERFLOW_CHECK */ - return ret; -} - -/** - * Free memory previously allocated by mem_malloc. Loads the pool number - * and calls memp_free with that pool number to put the element back into - * its pool - * - * @param rmem the memory element to free - */ -void -mem_free(void *rmem) -{ - struct memp_malloc_helper *hmem; - - LWIP_ASSERT("rmem != NULL", (rmem != NULL)); - LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem))); - - /* get the original struct memp_malloc_helper */ - /* cast through void* to get rid of alignment warnings */ - hmem = (struct memp_malloc_helper*)(void*)((u8_t*)rmem - LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper))); - - LWIP_ASSERT("hmem != NULL", (hmem != NULL)); - LWIP_ASSERT("hmem == MEM_ALIGN(hmem)", (hmem == LWIP_MEM_ALIGN(hmem))); - LWIP_ASSERT("hmem->poolnr < MEMP_MAX", (hmem->poolnr < MEMP_MAX)); - - MEM_STATS_DEC_USED(used, hmem->size); -#if MEMP_OVERFLOW_CHECK - { - u16_t i; - LWIP_ASSERT("MEM_USE_POOLS: invalid chunk size", - hmem->size <= memp_pools[hmem->poolnr]->size); - /* check that unused memory remained untouched (diff between requested size and selected pool's size) */ - for (i = hmem->size; i < memp_pools[hmem->poolnr]->size; i++) { - u8_t data = *((u8_t*)rmem + i); - LWIP_ASSERT("MEM_USE_POOLS: mem overflow detected", data == 0xcd); - } - } -#endif /* MEMP_OVERFLOW_CHECK */ - - /* and put it in the pool we saved earlier */ - memp_free(hmem->poolnr, hmem); -} - -#else /* MEM_USE_POOLS */ -/* lwIP replacement for your libc malloc() */ - -/** - * The heap is made up as a list of structs of this type. - * This does not have to be aligned since for getting its size, - * we only use the macro SIZEOF_STRUCT_MEM, which automatically aligns. - */ -struct mem { - /** index (-> ram[next]) of the next struct */ - mem_size_t next; - /** index (-> ram[prev]) of the previous struct */ - mem_size_t prev; - /** 1: this area is used; 0: this area is unused */ - u8_t used; -}; - -/** All allocated blocks will be MIN_SIZE bytes big, at least! - * MIN_SIZE can be overridden to suit your needs. Smaller values save space, - * larger values could prevent too small blocks to fragment the RAM too much. */ -#ifndef MIN_SIZE -#define MIN_SIZE 12 -#endif /* MIN_SIZE */ -/* some alignment macros: we define them here for better source code layout */ -#define MIN_SIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(MIN_SIZE) -#define SIZEOF_STRUCT_MEM LWIP_MEM_ALIGN_SIZE(sizeof(struct mem)) -#define MEM_SIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEM_SIZE) - -/** If you want to relocate the heap to external memory, simply define - * LWIP_RAM_HEAP_POINTER as a void-pointer to that location. - * If so, make sure the memory at that location is big enough (see below on - * how that space is calculated). */ -#ifndef LWIP_RAM_HEAP_POINTER -/** the heap. we need one struct mem at the end and some room for alignment */ -LWIP_DECLARE_MEMORY_ALIGNED(ram_heap, MEM_SIZE_ALIGNED + (2U*SIZEOF_STRUCT_MEM)); -#define LWIP_RAM_HEAP_POINTER ram_heap -#endif /* LWIP_RAM_HEAP_POINTER */ - -/** pointer to the heap (ram_heap): for alignment, ram is now a pointer instead of an array */ -static u8_t *ram; -/** the last entry, always unused! */ -static struct mem *ram_end; -/** pointer to the lowest free block, this is used for faster search */ -static struct mem *lfree; - -/** concurrent access protection */ -#if !NO_SYS -static sys_mutex_t mem_mutex; -#endif - -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - -static volatile u8_t mem_free_count; - -/* Allow mem_free from other (e.g. interrupt) context */ -#define LWIP_MEM_FREE_DECL_PROTECT() SYS_ARCH_DECL_PROTECT(lev_free) -#define LWIP_MEM_FREE_PROTECT() SYS_ARCH_PROTECT(lev_free) -#define LWIP_MEM_FREE_UNPROTECT() SYS_ARCH_UNPROTECT(lev_free) -#define LWIP_MEM_ALLOC_DECL_PROTECT() SYS_ARCH_DECL_PROTECT(lev_alloc) -#define LWIP_MEM_ALLOC_PROTECT() SYS_ARCH_PROTECT(lev_alloc) -#define LWIP_MEM_ALLOC_UNPROTECT() SYS_ARCH_UNPROTECT(lev_alloc) - -#else /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - -/* Protect the heap only by using a semaphore */ -#define LWIP_MEM_FREE_DECL_PROTECT() -#define LWIP_MEM_FREE_PROTECT() sys_mutex_lock(&mem_mutex) -#define LWIP_MEM_FREE_UNPROTECT() sys_mutex_unlock(&mem_mutex) -/* mem_malloc is protected using semaphore AND LWIP_MEM_ALLOC_PROTECT */ -#define LWIP_MEM_ALLOC_DECL_PROTECT() -#define LWIP_MEM_ALLOC_PROTECT() -#define LWIP_MEM_ALLOC_UNPROTECT() - -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - - -/** - * "Plug holes" by combining adjacent empty struct mems. - * After this function is through, there should not exist - * one empty struct mem pointing to another empty struct mem. - * - * @param mem this points to a struct mem which just has been freed - * @internal this function is only called by mem_free() and mem_trim() - * - * This assumes access to the heap is protected by the calling function - * already. - */ -static void -plug_holes(struct mem *mem) -{ - struct mem *nmem; - struct mem *pmem; - - LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); - LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); - LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); - - /* plug hole forward */ - LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); - - nmem = (struct mem *)(void *)&ram[mem->next]; - if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { - /* if mem->next is unused and not end of ram, combine mem and mem->next */ - if (lfree == nmem) { - lfree = mem; - } - mem->next = nmem->next; - ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); - } - - /* plug hole backward */ - pmem = (struct mem *)(void *)&ram[mem->prev]; - if (pmem != mem && pmem->used == 0) { - /* if mem->prev is unused, combine mem and mem->prev */ - if (lfree == mem) { - lfree = pmem; - } - pmem->next = mem->next; - ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); - } -} - -/** - * Zero the heap and initialize start, end and lowest-free - */ -void -mem_init(void) -{ - struct mem *mem; - - LWIP_ASSERT("Sanity check alignment", - (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); - - /* align the heap */ - ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); - /* initialize the start of the heap */ - mem = (struct mem *)(void *)ram; - mem->next = MEM_SIZE_ALIGNED; - mem->prev = 0; - mem->used = 0; - /* initialize the end of the heap */ - ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; - ram_end->used = 1; - ram_end->next = MEM_SIZE_ALIGNED; - ram_end->prev = MEM_SIZE_ALIGNED; - - /* initialize the lowest-free pointer to the start of the heap */ - lfree = (struct mem *)(void *)ram; - - MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); - - if (sys_mutex_new(&mem_mutex) != ERR_OK) { - LWIP_ASSERT("failed to create mem_mutex", 0); - } -} - -/** - * Put a struct mem back on the heap - * - * @param rmem is the data portion of a struct mem as returned by a previous - * call to mem_malloc() - */ -void -mem_free(void *rmem) -{ - struct mem *mem; - LWIP_MEM_FREE_DECL_PROTECT(); - - if (rmem == NULL) { - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n")); - return; - } - LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0); - - LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram && - (u8_t *)rmem < (u8_t *)ram_end); - - if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { - SYS_ARCH_DECL_PROTECT(lev); - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); - /* protect mem stats from concurrent access */ - SYS_ARCH_PROTECT(lev); - MEM_STATS_INC(illegal); - SYS_ARCH_UNPROTECT(lev); - return; - } - /* protect the heap from concurrent access */ - LWIP_MEM_FREE_PROTECT(); - /* Get the corresponding struct mem ... */ - /* cast through void* to get rid of alignment warnings */ - mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); - /* ... which has to be in a used state ... */ - LWIP_ASSERT("mem_free: mem->used", mem->used); - /* ... and is now unused. */ - mem->used = 0; - - if (mem < lfree) { - /* the newly freed struct is now the lowest */ - lfree = mem; - } - - MEM_STATS_DEC_USED(used, mem->next - (mem_size_t)(((u8_t *)mem - ram))); - - /* finally, see if prev or next are free also */ - plug_holes(mem); -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - mem_free_count = 1; -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_MEM_FREE_UNPROTECT(); -} - -/** - * Shrink memory returned by mem_malloc(). - * - * @param rmem pointer to memory allocated by mem_malloc the is to be shrinked - * @param newsize required size after shrinking (needs to be smaller than or - * equal to the previous size) - * @return for compatibility reasons: is always == rmem, at the moment - * or NULL if newsize is > old size, in which case rmem is NOT touched - * or freed! - */ -void * -mem_trim(void *rmem, mem_size_t newsize) -{ - mem_size_t size; - mem_size_t ptr, ptr2; - struct mem *mem, *mem2; - /* 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 = LWIP_MEM_ALIGN_SIZE(newsize); - - if (newsize < MIN_SIZE_ALIGNED) { - /* every data block must be at least MIN_SIZE_ALIGNED long */ - newsize = MIN_SIZE_ALIGNED; - } - - if (newsize > MEM_SIZE_ALIGNED) { - return NULL; - } - - LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && - (u8_t *)rmem < (u8_t *)ram_end); - - if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { - SYS_ARCH_DECL_PROTECT(lev); - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); - /* protect mem stats from concurrent access */ - SYS_ARCH_PROTECT(lev); - MEM_STATS_INC(illegal); - SYS_ARCH_UNPROTECT(lev); - return rmem; - } - /* Get the corresponding struct mem ... */ - /* cast through void* to get rid of alignment warnings */ - mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); - /* ... and its offset pointer */ - ptr = (mem_size_t)((u8_t *)mem - ram); - - size = mem->next - ptr - SIZEOF_STRUCT_MEM; - LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); - if (newsize > size) { - /* not supported */ - return NULL; - } - if (newsize == size) { - /* No change in size, simply return */ - return rmem; - } - - /* protect the heap from concurrent access */ - LWIP_MEM_FREE_PROTECT(); - - mem2 = (struct mem *)(void *)&ram[mem->next]; - if (mem2->used == 0) { - /* The next struct is unused, we can simply move it at little */ - mem_size_t next; - /* remember the old next pointer */ - next = mem2->next; - /* create new struct mem which is moved directly after the shrinked mem */ - ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; - if (lfree == mem2) { - lfree = (struct mem *)(void *)&ram[ptr2]; - } - mem2 = (struct mem *)(void *)&ram[ptr2]; - mem2->used = 0; - /* restore the next pointer */ - mem2->next = next; - /* link it back to mem */ - mem2->prev = ptr; - /* link mem to it */ - mem->next = ptr2; - /* 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) { - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; - } - MEM_STATS_DEC_USED(used, (size - newsize)); - /* no need to plug holes, we've already done that */ - } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) { - /* Next struct is used but there's room for another struct mem with - * at least MIN_SIZE_ALIGNED of data. - * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem - * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). - * @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 = ptr + SIZEOF_STRUCT_MEM + newsize; - mem2 = (struct mem *)(void *)&ram[ptr2]; - if (mem2 < lfree) { - lfree = mem2; - } - mem2->used = 0; - mem2->next = mem->next; - mem2->prev = ptr; - mem->next = ptr2; - if (mem2->next != MEM_SIZE_ALIGNED) { - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; - } - MEM_STATS_DEC_USED(used, (size - newsize)); - /* the original mem->next is used, so no need to plug holes! */ - } - /* else { - next struct mem is used but size between mem and mem2 is not big enough - to create another struct mem - -> don't do anyhting. - -> the remaining space stays unused since it is too small - } */ -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - mem_free_count = 1; -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_MEM_FREE_UNPROTECT(); - return rmem; -} - -/** - * Allocate a block of memory with a minimum of 'size' bytes. - * - * @param size is the minimum size of the requested block in bytes. - * @return pointer to allocated memory or NULL if no free memory was found. - * - * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). - */ -void * -mem_malloc(mem_size_t size) -{ - mem_size_t ptr, ptr2; - struct mem *mem, *mem2; -#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 == 0) { - return NULL; - } - - /* Expand the size of the allocated memory region so that we can - adjust for alignment. */ - size = LWIP_MEM_ALIGN_SIZE(size); - - if (size < MIN_SIZE_ALIGNED) { - /* every data block must be at least MIN_SIZE_ALIGNED long */ - size = MIN_SIZE_ALIGNED; - } - - if (size > MEM_SIZE_ALIGNED) { - return NULL; - } - - /* protect the heap from concurrent access */ - sys_mutex_lock(&mem_mutex); - LWIP_MEM_ALLOC_PROTECT(); -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - /* run as long as a mem_free disturbed mem_malloc or mem_trim */ - do { - local_mem_free_count = 0; -#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_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; - ptr = ((struct mem *)(void *)&ram[ptr])->next) { - mem = (struct mem *)(void *)&ram[ptr]; -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - mem_free_count = 0; - LWIP_MEM_ALLOC_UNPROTECT(); - /* allow mem_free or mem_trim to run */ - LWIP_MEM_ALLOC_PROTECT(); - if (mem_free_count != 0) { - /* If mem_free or mem_trim have run, we have to restart since they - could have altered our current struct mem. */ - local_mem_free_count = 1; - break; - } -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - - if ((!mem->used) && - (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { - /* mem is not used and at least perfect fit is possible: - * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */ - - if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) { - /* (in addition to the above, we test if another struct mem (SIZEOF_STRUCT_MEM) containing - * at least MIN_SIZE_ALIGNED of data also fits in the 'user data space' of 'mem') - * -> split large block, create empty remainder, - * remainder must be large enough to contain MIN_SIZE_ALIGNED data: if - * mem->next - (ptr + (2*SIZEOF_STRUCT_MEM)) == size, - * struct mem would fit in but no data between mem2 and mem2->next - * @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 = ptr + SIZEOF_STRUCT_MEM + size; - /* create mem2 struct */ - mem2 = (struct mem *)(void *)&ram[ptr2]; - mem2->used = 0; - mem2->next = mem->next; - mem2->prev = ptr; - /* and insert it between mem and mem->next */ - mem->next = ptr2; - mem->used = 1; - - if (mem2->next != MEM_SIZE_ALIGNED) { - ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; - } - MEM_STATS_INC_USED(used, (size + SIZEOF_STRUCT_MEM)); - } else { - /* (a mem2 struct does no fit into the user data space of mem and mem->next will always - * be used at this point: if not we have 2 unused structs in a row, plug_holes should have - * 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; - MEM_STATS_INC_USED(used, mem->next - (mem_size_t)((u8_t *)mem - ram)); - } -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT -mem_malloc_adjust_lfree: -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - if (mem == lfree) { - struct mem *cur = lfree; - /* Find next free block after mem and update lowest free pointer */ - while (cur->used && cur != ram_end) { -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - mem_free_count = 0; - LWIP_MEM_ALLOC_UNPROTECT(); - /* prevent high interrupt latency... */ - LWIP_MEM_ALLOC_PROTECT(); - if (mem_free_count != 0) { - /* If mem_free or mem_trim have run, we have to restart since they - could have altered our current struct mem or lfree. */ - goto mem_malloc_adjust_lfree; - } -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - cur = (struct mem *)(void *)&ram[cur->next]; - } - lfree = cur; - LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); - } - LWIP_MEM_ALLOC_UNPROTECT(); - sys_mutex_unlock(&mem_mutex); - LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", - (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); - LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", - ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); - LWIP_ASSERT("mem_malloc: sanity check alignment", - (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0); - - return (u8_t *)mem + SIZEOF_STRUCT_MEM; - } - } -#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT - /* if we got interrupted by a mem_free, try again */ - } while (local_mem_free_count != 0); -#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ - LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); - MEM_STATS_INC(err); - LWIP_MEM_ALLOC_UNPROTECT(); - sys_mutex_unlock(&mem_mutex); - return NULL; -} - -#endif /* MEM_USE_POOLS */ - -#if MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) -void * -mem_calloc(mem_size_t count, mem_size_t size) -{ - return mem_clib_calloc(count, size); -} - -#else /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */ -/** - * Contiguously allocates enough space for count objects that are size bytes - * of memory each and returns a pointer to the allocated memory. - * - * The allocated memory is filled with bytes of value zero. - * - * @param count number of objects to allocate - * @param size size of the objects to allocate - * @return pointer to allocated memory / NULL pointer if there is an error - */ -void * -mem_calloc(mem_size_t count, mem_size_t size) -{ - void *p; - - /* allocate 'count' objects of size 'size' */ - p = mem_malloc(count * size); - if (p) { - /* zero the memory */ - memset(p, 0, (size_t)count * (size_t)size); - } - return p; -} -#endif /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */ +/** + * @file + * Dynamic memory manager + * + * This is a lightweight replacement for the standard C library malloc(). + * + * If you want to use the standard C library malloc() instead, define + * MEM_LIBC_MALLOC to 1 in your lwipopts.h + * + * To let mem_malloc() use pools (prevents fragmentation and is much faster than + * a heap but might waste some memory), define MEM_USE_POOLS to 1, define + * MEMP_USE_CUSTOM_POOLS to 1 and create a file "lwippools.h" that includes a list + * of pools like this (more pools can be added between _START and _END): + * + * Define three pools with sizes 256, 512, and 1512 bytes + * LWIP_MALLOC_MEMPOOL_START + * LWIP_MALLOC_MEMPOOL(20, 256) + * LWIP_MALLOC_MEMPOOL(10, 512) + * LWIP_MALLOC_MEMPOOL(5, 1512) + * LWIP_MALLOC_MEMPOOL_END + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * Simon Goldschmidt + * + */ + +#include "lwip/opt.h" +#include "lwip/mem.h" +#include "lwip/def.h" +#include "lwip/sys.h" +#include "lwip/stats.h" +#include "lwip/err.h" + +#include + +#if MEM_LIBC_MALLOC +#include /* for malloc()/free() */ +#endif + +#if MEM_LIBC_MALLOC || MEM_USE_POOLS + +/** mem_init is not used when using pools instead of a heap or using + * C library malloc(). + */ +void +mem_init(void) +{ +} + +/** mem_trim is not used when using pools instead of a heap or using + * C library malloc(): we can't free part of a pool element and the stack + * support mem_trim() to return a different pointer + */ +void* +mem_trim(void *mem, mem_size_t size) +{ + LWIP_UNUSED_ARG(size); + return mem; +} +#endif /* MEM_LIBC_MALLOC || MEM_USE_POOLS */ + +#if MEM_LIBC_MALLOC +/* lwIP heap implemented using C library malloc() */ + +/* in case C library malloc() needs extra protection, + * allow these defines to be overridden. + */ +#ifndef mem_clib_free +#define mem_clib_free free +#endif +#ifndef mem_clib_malloc +#define mem_clib_malloc malloc +#endif +#ifndef mem_clib_calloc +#define mem_clib_calloc calloc +#endif + +#if LWIP_STATS && MEM_STATS +#define MEM_LIBC_STATSHELPER_SIZE LWIP_MEM_ALIGN_SIZE(sizeof(mem_size_t)) +#else +#define MEM_LIBC_STATSHELPER_SIZE 0 +#endif + +/** + * Allocate a block of memory with a minimum of 'size' bytes. + * + * @param size is the minimum size of the requested block in bytes. + * @return pointer to allocated memory or NULL if no free memory was found. + * + * Note that the returned value must always be aligned (as defined by MEM_ALIGNMENT). + */ +void * +mem_malloc(mem_size_t size) +{ + void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE); + if (ret == NULL) { + MEM_STATS_INC(err); + } else { + LWIP_ASSERT("malloc() must return aligned memory", LWIP_MEM_ALIGN(ret) == ret); +#if LWIP_STATS && MEM_STATS + *(mem_size_t*)ret = size; + ret = (u8_t*)ret + MEM_LIBC_STATSHELPER_SIZE; + MEM_STATS_INC_USED(used, size); +#endif + } + return ret; +} + +/** Put memory back on the heap + * + * @param rmem is the pointer as returned by a previous call to mem_malloc() + */ +void +mem_free(void *rmem) +{ + LWIP_ASSERT("rmem != NULL", (rmem != NULL)); + LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem))); +#if LWIP_STATS && MEM_STATS + rmem = (u8_t*)rmem - MEM_LIBC_STATSHELPER_SIZE; + MEM_STATS_DEC_USED(used, *(mem_size_t*)rmem); +#endif + mem_clib_free(rmem); +} + +#elif MEM_USE_POOLS + +/* lwIP heap implemented with different sized pools */ + +/** + * Allocate memory: determine the smallest pool that is big enough + * to contain an element of 'size' and get an element from that pool. + * + * @param size the size in bytes of the memory needed + * @return a pointer to the allocated memory or NULL if the pool is empty + */ +void * +mem_malloc(mem_size_t size) +{ + void *ret; + struct memp_malloc_helper *element = NULL; + memp_t poolnr; + mem_size_t required_size = size + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)); + + for (poolnr = MEMP_POOL_FIRST; poolnr <= MEMP_POOL_LAST; poolnr = (memp_t)(poolnr + 1)) { + /* is this pool big enough to hold an element of the required size + plus a struct memp_malloc_helper that saves the pool this element came from? */ + if (required_size <= memp_pools[poolnr]->size) { + element = (struct memp_malloc_helper*)memp_malloc(poolnr); + if (element == NULL) { + /* No need to DEBUGF or ASSERT: This error is already taken care of in memp.c */ +#if MEM_USE_POOLS_TRY_BIGGER_POOL + /** Try a bigger pool if this one is empty! */ + if (poolnr < MEMP_POOL_LAST) { + continue; + } +#endif /* MEM_USE_POOLS_TRY_BIGGER_POOL */ + MEM_STATS_INC(err); + return NULL; + } + break; + } + } + if (poolnr > MEMP_POOL_LAST) { + LWIP_ASSERT("mem_malloc(): no pool is that big!", 0); + MEM_STATS_INC(err); + return NULL; + } + + /* save the pool number this element came from */ + element->poolnr = poolnr; + /* and return a pointer to the memory directly after the struct memp_malloc_helper */ + ret = (u8_t*)element + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper)); + +#if MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) + /* truncating to u16_t is safe because struct memp_desc::size is u16_t */ + element->size = (u16_t)size; + MEM_STATS_INC_USED(used, element->size); +#endif /* MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) */ +#if MEMP_OVERFLOW_CHECK + /* initialize unused memory (diff between requested size and selected pool's size) */ + memset((u8_t*)ret + size, 0xcd, memp_pools[poolnr]->size - size); +#endif /* MEMP_OVERFLOW_CHECK */ + return ret; +} + +/** + * Free memory previously allocated by mem_malloc. Loads the pool number + * and calls memp_free with that pool number to put the element back into + * its pool + * + * @param rmem the memory element to free + */ +void +mem_free(void *rmem) +{ + struct memp_malloc_helper *hmem; + + LWIP_ASSERT("rmem != NULL", (rmem != NULL)); + LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem))); + + /* get the original struct memp_malloc_helper */ + /* cast through void* to get rid of alignment warnings */ + hmem = (struct memp_malloc_helper*)(void*)((u8_t*)rmem - LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper))); + + LWIP_ASSERT("hmem != NULL", (hmem != NULL)); + LWIP_ASSERT("hmem == MEM_ALIGN(hmem)", (hmem == LWIP_MEM_ALIGN(hmem))); + LWIP_ASSERT("hmem->poolnr < MEMP_MAX", (hmem->poolnr < MEMP_MAX)); + + MEM_STATS_DEC_USED(used, hmem->size); +#if MEMP_OVERFLOW_CHECK + { + u16_t i; + LWIP_ASSERT("MEM_USE_POOLS: invalid chunk size", + hmem->size <= memp_pools[hmem->poolnr]->size); + /* check that unused memory remained untouched (diff between requested size and selected pool's size) */ + for (i = hmem->size; i < memp_pools[hmem->poolnr]->size; i++) { + u8_t data = *((u8_t*)rmem + i); + LWIP_ASSERT("MEM_USE_POOLS: mem overflow detected", data == 0xcd); + } + } +#endif /* MEMP_OVERFLOW_CHECK */ + + /* and put it in the pool we saved earlier */ + memp_free(hmem->poolnr, hmem); +} + +#else /* MEM_USE_POOLS */ +/* lwIP replacement for your libc malloc() */ + +/** + * The heap is made up as a list of structs of this type. + * This does not have to be aligned since for getting its size, + * we only use the macro SIZEOF_STRUCT_MEM, which automatically aligns. + */ +struct mem { + /** index (-> ram[next]) of the next struct */ + mem_size_t next; + /** index (-> ram[prev]) of the previous struct */ + mem_size_t prev; + /** 1: this area is used; 0: this area is unused */ + u8_t used; +}; + +/** All allocated blocks will be MIN_SIZE bytes big, at least! + * MIN_SIZE can be overridden to suit your needs. Smaller values save space, + * larger values could prevent too small blocks to fragment the RAM too much. */ +#ifndef MIN_SIZE +#define MIN_SIZE 12 +#endif /* MIN_SIZE */ +/* some alignment macros: we define them here for better source code layout */ +#define MIN_SIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(MIN_SIZE) +#define SIZEOF_STRUCT_MEM LWIP_MEM_ALIGN_SIZE(sizeof(struct mem)) +#define MEM_SIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEM_SIZE) + +/** If you want to relocate the heap to external memory, simply define + * LWIP_RAM_HEAP_POINTER as a void-pointer to that location. + * If so, make sure the memory at that location is big enough (see below on + * how that space is calculated). */ +#ifndef LWIP_RAM_HEAP_POINTER +/** the heap. we need one struct mem at the end and some room for alignment */ +LWIP_DECLARE_MEMORY_ALIGNED(ram_heap, MEM_SIZE_ALIGNED + (2U*SIZEOF_STRUCT_MEM)); +#define LWIP_RAM_HEAP_POINTER ram_heap +#endif /* LWIP_RAM_HEAP_POINTER */ + +/** pointer to the heap (ram_heap): for alignment, ram is now a pointer instead of an array */ +static u8_t *ram; +/** the last entry, always unused! */ +static struct mem *ram_end; +/** pointer to the lowest free block, this is used for faster search */ +static struct mem *lfree; + +/** concurrent access protection */ +#if !NO_SYS +static sys_mutex_t mem_mutex; +#endif + +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + +static volatile u8_t mem_free_count; + +/* Allow mem_free from other (e.g. interrupt) context */ +#define LWIP_MEM_FREE_DECL_PROTECT() SYS_ARCH_DECL_PROTECT(lev_free) +#define LWIP_MEM_FREE_PROTECT() SYS_ARCH_PROTECT(lev_free) +#define LWIP_MEM_FREE_UNPROTECT() SYS_ARCH_UNPROTECT(lev_free) +#define LWIP_MEM_ALLOC_DECL_PROTECT() SYS_ARCH_DECL_PROTECT(lev_alloc) +#define LWIP_MEM_ALLOC_PROTECT() SYS_ARCH_PROTECT(lev_alloc) +#define LWIP_MEM_ALLOC_UNPROTECT() SYS_ARCH_UNPROTECT(lev_alloc) + +#else /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + +/* Protect the heap only by using a semaphore */ +#define LWIP_MEM_FREE_DECL_PROTECT() +#define LWIP_MEM_FREE_PROTECT() sys_mutex_lock(&mem_mutex) +#define LWIP_MEM_FREE_UNPROTECT() sys_mutex_unlock(&mem_mutex) +/* mem_malloc is protected using semaphore AND LWIP_MEM_ALLOC_PROTECT */ +#define LWIP_MEM_ALLOC_DECL_PROTECT() +#define LWIP_MEM_ALLOC_PROTECT() +#define LWIP_MEM_ALLOC_UNPROTECT() + +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + + +/** + * "Plug holes" by combining adjacent empty struct mems. + * After this function is through, there should not exist + * one empty struct mem pointing to another empty struct mem. + * + * @param mem this points to a struct mem which just has been freed + * @internal this function is only called by mem_free() and mem_trim() + * + * This assumes access to the heap is protected by the calling function + * already. + */ +static void +plug_holes(struct mem *mem) +{ + struct mem *nmem; + struct mem *pmem; + + LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); + LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); + LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); + + /* plug hole forward */ + LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); + + nmem = (struct mem *)(void *)&ram[mem->next]; + if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { + /* if mem->next is unused and not end of ram, combine mem and mem->next */ + if (lfree == nmem) { + lfree = mem; + } + mem->next = nmem->next; + ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); + } + + /* plug hole backward */ + pmem = (struct mem *)(void *)&ram[mem->prev]; + if (pmem != mem && pmem->used == 0) { + /* if mem->prev is unused, combine mem and mem->prev */ + if (lfree == mem) { + lfree = pmem; + } + pmem->next = mem->next; + ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); + } +} + +/** + * Zero the heap and initialize start, end and lowest-free + */ +void +mem_init(void) +{ + struct mem *mem; + + LWIP_ASSERT("Sanity check alignment", + (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); + + /* align the heap */ + ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); + /* initialize the start of the heap */ + mem = (struct mem *)(void *)ram; + mem->next = MEM_SIZE_ALIGNED; + mem->prev = 0; + mem->used = 0; + /* initialize the end of the heap */ + ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; + ram_end->used = 1; + ram_end->next = MEM_SIZE_ALIGNED; + ram_end->prev = MEM_SIZE_ALIGNED; + + /* initialize the lowest-free pointer to the start of the heap */ + lfree = (struct mem *)(void *)ram; + + MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); + + if (sys_mutex_new(&mem_mutex) != ERR_OK) { + LWIP_ASSERT("failed to create mem_mutex", 0); + } +} + +/** + * Put a struct mem back on the heap + * + * @param rmem is the data portion of a struct mem as returned by a previous + * call to mem_malloc() + */ +void +mem_free(void *rmem) +{ + struct mem *mem; + LWIP_MEM_FREE_DECL_PROTECT(); + + if (rmem == NULL) { + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n")); + return; + } + LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0); + + LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram && + (u8_t *)rmem < (u8_t *)ram_end); + + if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { + SYS_ARCH_DECL_PROTECT(lev); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); + /* protect mem stats from concurrent access */ + SYS_ARCH_PROTECT(lev); + MEM_STATS_INC(illegal); + SYS_ARCH_UNPROTECT(lev); + return; + } + /* protect the heap from concurrent access */ + LWIP_MEM_FREE_PROTECT(); + /* Get the corresponding struct mem ... */ + /* cast through void* to get rid of alignment warnings */ + mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); + /* ... which has to be in a used state ... */ + LWIP_ASSERT("mem_free: mem->used", mem->used); + /* ... and is now unused. */ + mem->used = 0; + + if (mem < lfree) { + /* the newly freed struct is now the lowest */ + lfree = mem; + } + + MEM_STATS_DEC_USED(used, mem->next - (mem_size_t)(((u8_t *)mem - ram))); + + /* finally, see if prev or next are free also */ + plug_holes(mem); +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + mem_free_count = 1; +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + LWIP_MEM_FREE_UNPROTECT(); +} + +/** + * Shrink memory returned by mem_malloc(). + * + * @param rmem pointer to memory allocated by mem_malloc the is to be shrinked + * @param newsize required size after shrinking (needs to be smaller than or + * equal to the previous size) + * @return for compatibility reasons: is always == rmem, at the moment + * or NULL if newsize is > old size, in which case rmem is NOT touched + * or freed! + */ +void * +mem_trim(void *rmem, mem_size_t newsize) +{ + mem_size_t size; + mem_size_t ptr, ptr2; + struct mem *mem, *mem2; + /* 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 = LWIP_MEM_ALIGN_SIZE(newsize); + + if (newsize < MIN_SIZE_ALIGNED) { + /* every data block must be at least MIN_SIZE_ALIGNED long */ + newsize = MIN_SIZE_ALIGNED; + } + + if (newsize > MEM_SIZE_ALIGNED) { + return NULL; + } + + LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && + (u8_t *)rmem < (u8_t *)ram_end); + + if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { + SYS_ARCH_DECL_PROTECT(lev); + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); + /* protect mem stats from concurrent access */ + SYS_ARCH_PROTECT(lev); + MEM_STATS_INC(illegal); + SYS_ARCH_UNPROTECT(lev); + return rmem; + } + /* Get the corresponding struct mem ... */ + /* cast through void* to get rid of alignment warnings */ + mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); + /* ... and its offset pointer */ + ptr = (mem_size_t)((u8_t *)mem - ram); + + size = mem->next - ptr - SIZEOF_STRUCT_MEM; + LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); + if (newsize > size) { + /* not supported */ + return NULL; + } + if (newsize == size) { + /* No change in size, simply return */ + return rmem; + } + + /* protect the heap from concurrent access */ + LWIP_MEM_FREE_PROTECT(); + + mem2 = (struct mem *)(void *)&ram[mem->next]; + if (mem2->used == 0) { + /* The next struct is unused, we can simply move it at little */ + mem_size_t next; + /* remember the old next pointer */ + next = mem2->next; + /* create new struct mem which is moved directly after the shrinked mem */ + ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; + if (lfree == mem2) { + lfree = (struct mem *)(void *)&ram[ptr2]; + } + mem2 = (struct mem *)(void *)&ram[ptr2]; + mem2->used = 0; + /* restore the next pointer */ + mem2->next = next; + /* link it back to mem */ + mem2->prev = ptr; + /* link mem to it */ + mem->next = ptr2; + /* 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) { + ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + } + MEM_STATS_DEC_USED(used, (size - newsize)); + /* no need to plug holes, we've already done that */ + } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) { + /* Next struct is used but there's room for another struct mem with + * at least MIN_SIZE_ALIGNED of data. + * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem + * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). + * @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 = ptr + SIZEOF_STRUCT_MEM + newsize; + mem2 = (struct mem *)(void *)&ram[ptr2]; + if (mem2 < lfree) { + lfree = mem2; + } + mem2->used = 0; + mem2->next = mem->next; + mem2->prev = ptr; + mem->next = ptr2; + if (mem2->next != MEM_SIZE_ALIGNED) { + ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + } + MEM_STATS_DEC_USED(used, (size - newsize)); + /* the original mem->next is used, so no need to plug holes! */ + } + /* else { + next struct mem is used but size between mem and mem2 is not big enough + to create another struct mem + -> don't do anyhting. + -> the remaining space stays unused since it is too small + } */ +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + mem_free_count = 1; +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + LWIP_MEM_FREE_UNPROTECT(); + return rmem; +} + +/** + * Allocate a block of memory with a minimum of 'size' bytes. + * + * @param size is the minimum size of the requested block in bytes. + * @return pointer to allocated memory or NULL if no free memory was found. + * + * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). + */ +void * +mem_malloc(mem_size_t size) +{ + mem_size_t ptr, ptr2; + struct mem *mem, *mem2; +#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 == 0) { + return NULL; + } + + /* Expand the size of the allocated memory region so that we can + adjust for alignment. */ + size = LWIP_MEM_ALIGN_SIZE(size); + + if (size < MIN_SIZE_ALIGNED) { + /* every data block must be at least MIN_SIZE_ALIGNED long */ + size = MIN_SIZE_ALIGNED; + } + + if (size > MEM_SIZE_ALIGNED) { + return NULL; + } + + /* protect the heap from concurrent access */ + sys_mutex_lock(&mem_mutex); + LWIP_MEM_ALLOC_PROTECT(); +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + /* run as long as a mem_free disturbed mem_malloc or mem_trim */ + do { + local_mem_free_count = 0; +#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_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; + ptr = ((struct mem *)(void *)&ram[ptr])->next) { + mem = (struct mem *)(void *)&ram[ptr]; +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + mem_free_count = 0; + LWIP_MEM_ALLOC_UNPROTECT(); + /* allow mem_free or mem_trim to run */ + LWIP_MEM_ALLOC_PROTECT(); + if (mem_free_count != 0) { + /* If mem_free or mem_trim have run, we have to restart since they + could have altered our current struct mem. */ + local_mem_free_count = 1; + break; + } +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + + if ((!mem->used) && + (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { + /* mem is not used and at least perfect fit is possible: + * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */ + + if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) { + /* (in addition to the above, we test if another struct mem (SIZEOF_STRUCT_MEM) containing + * at least MIN_SIZE_ALIGNED of data also fits in the 'user data space' of 'mem') + * -> split large block, create empty remainder, + * remainder must be large enough to contain MIN_SIZE_ALIGNED data: if + * mem->next - (ptr + (2*SIZEOF_STRUCT_MEM)) == size, + * struct mem would fit in but no data between mem2 and mem2->next + * @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 = ptr + SIZEOF_STRUCT_MEM + size; + /* create mem2 struct */ + mem2 = (struct mem *)(void *)&ram[ptr2]; + mem2->used = 0; + mem2->next = mem->next; + mem2->prev = ptr; + /* and insert it between mem and mem->next */ + mem->next = ptr2; + mem->used = 1; + + if (mem2->next != MEM_SIZE_ALIGNED) { + ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; + } + MEM_STATS_INC_USED(used, (size + SIZEOF_STRUCT_MEM)); + } else { + /* (a mem2 struct does no fit into the user data space of mem and mem->next will always + * be used at this point: if not we have 2 unused structs in a row, plug_holes should have + * 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; + MEM_STATS_INC_USED(used, mem->next - (mem_size_t)((u8_t *)mem - ram)); + } +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT +mem_malloc_adjust_lfree: +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + if (mem == lfree) { + struct mem *cur = lfree; + /* Find next free block after mem and update lowest free pointer */ + while (cur->used && cur != ram_end) { +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + mem_free_count = 0; + LWIP_MEM_ALLOC_UNPROTECT(); + /* prevent high interrupt latency... */ + LWIP_MEM_ALLOC_PROTECT(); + if (mem_free_count != 0) { + /* If mem_free or mem_trim have run, we have to restart since they + could have altered our current struct mem or lfree. */ + goto mem_malloc_adjust_lfree; + } +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + cur = (struct mem *)(void *)&ram[cur->next]; + } + lfree = cur; + LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); + } + LWIP_MEM_ALLOC_UNPROTECT(); + sys_mutex_unlock(&mem_mutex); + LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", + (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); + LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", + ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); + LWIP_ASSERT("mem_malloc: sanity check alignment", + (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0); + + return (u8_t *)mem + SIZEOF_STRUCT_MEM; + } + } +#if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT + /* if we got interrupted by a mem_free, try again */ + } while (local_mem_free_count != 0); +#endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ + LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); + MEM_STATS_INC(err); + LWIP_MEM_ALLOC_UNPROTECT(); + sys_mutex_unlock(&mem_mutex); + return NULL; +} + +#endif /* MEM_USE_POOLS */ + +#if MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) +void * +mem_calloc(mem_size_t count, mem_size_t size) +{ + return mem_clib_calloc(count, size); +} + +#else /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */ +/** + * Contiguously allocates enough space for count objects that are size bytes + * of memory each and returns a pointer to the allocated memory. + * + * The allocated memory is filled with bytes of value zero. + * + * @param count number of objects to allocate + * @param size size of the objects to allocate + * @return pointer to allocated memory / NULL pointer if there is an error + */ +void * +mem_calloc(mem_size_t count, mem_size_t size) +{ + void *p; + + /* allocate 'count' objects of size 'size' */ + p = mem_malloc(count * size); + if (p) { + /* zero the memory */ + memset(p, 0, (size_t)count * (size_t)size); + } + return p; +} +#endif /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/memp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/memp.c index 58fab1a..727a0c2 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/memp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/memp.c @@ -1,496 +1,496 @@ -/** - * @file - * Dynamic pool memory manager - * - * lwIP has dedicated pools for many structures (netconn, protocol control blocks, - * packet buffers, ...). All these pools are managed here. - * - * @defgroup mempool Memory pools - * @ingroup infrastructure - * Custom memory pools - - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#include "lwip/memp.h" -#include "lwip/sys.h" -#include "lwip/stats.h" - -#include - -/* Make sure we include everything we need for size calculation required by memp_std.h */ -#include "lwip/pbuf.h" -#include "lwip/raw.h" -#include "lwip/udp.h" -#include "lwip/tcp.h" -#include "lwip/priv/tcp_priv.h" -#include "lwip/ip4_frag.h" -#include "lwip/netbuf.h" -#include "lwip/api.h" -#include "lwip/priv/tcpip_priv.h" -#include "lwip/priv/api_msg.h" -#include "lwip/sockets.h" -#include "lwip/netifapi.h" -#include "lwip/etharp.h" -#include "lwip/igmp.h" -#include "lwip/timeouts.h" -/* needed by default MEMP_NUM_SYS_TIMEOUT */ -#include "netif/ppp/ppp_opts.h" -#include "lwip/netdb.h" -#include "lwip/dns.h" -#include "lwip/priv/nd6_priv.h" -#include "lwip/ip6_frag.h" -#include "lwip/mld6.h" - -#define LWIP_MEMPOOL(name,num,size,desc) LWIP_MEMPOOL_DECLARE(name,num,size,desc) -#include "lwip/priv/memp_std.h" - -const struct memp_desc* const memp_pools[MEMP_MAX] = { -#define LWIP_MEMPOOL(name,num,size,desc) &memp_ ## name, -#include "lwip/priv/memp_std.h" -}; - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -#if MEMP_MEM_MALLOC && MEMP_OVERFLOW_CHECK >= 2 -#undef MEMP_OVERFLOW_CHECK -/* MEMP_OVERFLOW_CHECK >= 2 does not work with MEMP_MEM_MALLOC, use 1 instead */ -#define MEMP_OVERFLOW_CHECK 1 -#endif - -#if MEMP_SANITY_CHECK && !MEMP_MEM_MALLOC -/** - * Check that memp-lists don't form a circle, using "Floyd's cycle-finding algorithm". - */ -static int -memp_sanity(const struct memp_desc *desc) -{ - struct memp *t, *h; - - t = *desc->tab; - if (t != NULL) { - for (h = t->next; (t != NULL) && (h != NULL); t = t->next, - h = ((h->next != NULL) ? h->next->next : NULL)) { - if (t == h) { - return 0; - } - } - } - - return 1; -} -#endif /* MEMP_SANITY_CHECK && !MEMP_MEM_MALLOC */ - -#if MEMP_OVERFLOW_CHECK -/** - * Check if a memp element was victim of an overflow - * (e.g. the restricted area after it has been altered) - * - * @param p the memp element to check - * @param desc the pool p comes from - */ -static void -memp_overflow_check_element_overflow(struct memp *p, const struct memp_desc *desc) -{ -#if MEMP_SANITY_REGION_AFTER_ALIGNED > 0 - u16_t k; - u8_t *m; - m = (u8_t*)p + MEMP_SIZE + desc->size; - for (k = 0; k < MEMP_SANITY_REGION_AFTER_ALIGNED; k++) { - if (m[k] != 0xcd) { - char errstr[128] = "detected memp overflow in pool "; - strcat(errstr, desc->desc); - LWIP_ASSERT(errstr, 0); - } - } -#else /* MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(desc); -#endif /* MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ -} - -/** - * Check if a memp element was victim of an underflow - * (e.g. the restricted area before it has been altered) - * - * @param p the memp element to check - * @param desc the pool p comes from - */ -static void -memp_overflow_check_element_underflow(struct memp *p, const struct memp_desc *desc) -{ -#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 - u16_t k; - u8_t *m; - m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED; - for (k = 0; k < MEMP_SANITY_REGION_BEFORE_ALIGNED; k++) { - if (m[k] != 0xcd) { - char errstr[128] = "detected memp underflow in pool "; - strcat(errstr, desc->desc); - LWIP_ASSERT(errstr, 0); - } - } -#else /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 */ - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(desc); -#endif /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 */ -} - -/** - * Initialize the restricted area of on memp element. - */ -static void -memp_overflow_init_element(struct memp *p, const struct memp_desc *desc) -{ -#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 - u8_t *m; -#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 - m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED; - memset(m, 0xcd, MEMP_SANITY_REGION_BEFORE_ALIGNED); -#endif -#if MEMP_SANITY_REGION_AFTER_ALIGNED > 0 - m = (u8_t*)p + MEMP_SIZE + desc->size; - memset(m, 0xcd, MEMP_SANITY_REGION_AFTER_ALIGNED); -#endif -#else /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(desc); -#endif /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ -} - -#if MEMP_OVERFLOW_CHECK >= 2 -/** - * Do an overflow check for all elements in every pool. - * - * @see memp_overflow_check_element for a description of the check - */ -static void -memp_overflow_check_all(void) -{ - u16_t i, j; - struct memp *p; - SYS_ARCH_DECL_PROTECT(old_level); - SYS_ARCH_PROTECT(old_level); - - for (i = 0; i < MEMP_MAX; ++i) { - p = (struct memp*)LWIP_MEM_ALIGN(memp_pools[i]->base); - for (j = 0; j < memp_pools[i]->num; ++j) { - memp_overflow_check_element_overflow(p, memp_pools[i]); - memp_overflow_check_element_underflow(p, memp_pools[i]); - p = LWIP_ALIGNMENT_CAST(struct memp*, ((u8_t*)p + MEMP_SIZE + memp_pools[i]->size + MEMP_SANITY_REGION_AFTER_ALIGNED)); - } - } - SYS_ARCH_UNPROTECT(old_level); -} -#endif /* MEMP_OVERFLOW_CHECK >= 2 */ -#endif /* MEMP_OVERFLOW_CHECK */ - -/** - * Initialize custom memory pool. - * Related functions: memp_malloc_pool, memp_free_pool - * - * @param desc pool to initialize - */ -void -memp_init_pool(const struct memp_desc *desc) -{ -#if MEMP_MEM_MALLOC - LWIP_UNUSED_ARG(desc); -#else - int i; - struct memp *memp; - - *desc->tab = NULL; - memp = (struct memp*)LWIP_MEM_ALIGN(desc->base); - /* create a linked list of memp elements */ - for (i = 0; i < desc->num; ++i) { - memp->next = *desc->tab; - *desc->tab = memp; -#if MEMP_OVERFLOW_CHECK - memp_overflow_init_element(memp, desc); -#endif /* MEMP_OVERFLOW_CHECK */ - /* cast through void* to get rid of alignment warnings */ - memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size -#if MEMP_OVERFLOW_CHECK - + MEMP_SANITY_REGION_AFTER_ALIGNED -#endif - ); - } -#if MEMP_STATS - desc->stats->avail = desc->num; -#endif /* MEMP_STATS */ -#endif /* !MEMP_MEM_MALLOC */ - -#if MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) - desc->stats->name = desc->desc; -#endif /* MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) */ -} - -/** - * Initializes lwIP built-in pools. - * Related functions: memp_malloc, memp_free - * - * Carves out memp_memory into linked lists for each pool-type. - */ -void -memp_init(void) -{ - u16_t i; - - /* for every pool: */ - for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { - memp_init_pool(memp_pools[i]); - -#if LWIP_STATS && MEMP_STATS - lwip_stats.memp[i] = memp_pools[i]->stats; -#endif - } - -#if MEMP_OVERFLOW_CHECK >= 2 - /* check everything a first time to see if it worked */ - memp_overflow_check_all(); -#endif /* MEMP_OVERFLOW_CHECK >= 2 */ -} - -static void* -#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 -{ - struct memp *memp; - SYS_ARCH_DECL_PROTECT(old_level); - -#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); - - memp = *desc->tab; -#endif /* MEMP_MEM_MALLOC */ - - if (memp != NULL) { -#if !MEMP_MEM_MALLOC -#if MEMP_OVERFLOW_CHECK == 1 - memp_overflow_check_element_overflow(memp, desc); - memp_overflow_check_element_underflow(memp, desc); -#endif /* MEMP_OVERFLOW_CHECK */ - - *desc->tab = memp->next; -#if MEMP_OVERFLOW_CHECK - memp->next = NULL; -#endif /* MEMP_OVERFLOW_CHECK */ -#endif /* !MEMP_MEM_MALLOC */ -#if MEMP_OVERFLOW_CHECK - memp->file = file; - 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", - ((mem_ptr_t)memp % MEM_ALIGNMENT) == 0); -#if MEMP_STATS - desc->stats->used++; - if (desc->stats->used > desc->stats->max) { - desc->stats->max = desc->stats->used; - } -#endif - SYS_ARCH_UNPROTECT(old_level); - /* cast through u8_t* to get rid of alignment warnings */ - return ((u8_t*)memp + MEMP_SIZE); - } else { - LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); -#if MEMP_STATS - desc->stats->err++; -#endif - } - - SYS_ARCH_UNPROTECT(old_level); - return NULL; -} - -/** - * Get an element from a custom pool. - * - * @param desc the pool to get an element from - * - * @return a pointer to the allocated memory or a NULL pointer on error - */ -void * -#if !MEMP_OVERFLOW_CHECK -memp_malloc_pool(const struct memp_desc *desc) -#else -memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int line) -#endif -{ - LWIP_ASSERT("invalid pool desc", desc != NULL); - if (desc == NULL) { - return NULL; - } - -#if !MEMP_OVERFLOW_CHECK - return do_memp_malloc_pool(desc); -#else - return do_memp_malloc_pool_fn(desc, file, line); -#endif -} - -/** - * Get an element from a specific pool. - * - * @param type the pool to get an element from - * - * @return a pointer to the allocated memory or a NULL pointer on error - */ -void * -#if !MEMP_OVERFLOW_CHECK -memp_malloc(memp_t type) -#else -memp_malloc_fn(memp_t type, const char* file, const int line) -#endif -{ - void *memp; - LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); - -#if MEMP_OVERFLOW_CHECK >= 2 - memp_overflow_check_all(); -#endif /* MEMP_OVERFLOW_CHECK >= 2 */ - -#if !MEMP_OVERFLOW_CHECK - memp = do_memp_malloc_pool(memp_pools[type]); -#else - memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); -#endif - - return memp; -} - -static void -do_memp_free_pool(const struct memp_desc* desc, void *mem) -{ - struct memp *memp; - SYS_ARCH_DECL_PROTECT(old_level); - - LWIP_ASSERT("memp_free: mem properly aligned", - ((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); - -#if MEMP_OVERFLOW_CHECK == 1 - memp_overflow_check_element_overflow(memp, desc); - memp_overflow_check_element_underflow(memp, desc); -#endif /* MEMP_OVERFLOW_CHECK */ - -#if MEMP_STATS - desc->stats->used--; -#endif - -#if MEMP_MEM_MALLOC - LWIP_UNUSED_ARG(desc); - SYS_ARCH_UNPROTECT(old_level); - mem_free(memp); -#else /* MEMP_MEM_MALLOC */ - memp->next = *desc->tab; - *desc->tab = memp; - -#if MEMP_SANITY_CHECK - LWIP_ASSERT("memp sanity", memp_sanity(desc)); -#endif /* MEMP_SANITY_CHECK */ - - SYS_ARCH_UNPROTECT(old_level); -#endif /* !MEMP_MEM_MALLOC */ -} - -/** - * Put a custom pool element back into its pool. - * - * @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) -{ - LWIP_ASSERT("invalid pool desc", desc != NULL); - if ((desc == NULL) || (mem == NULL)) { - return; - } - - do_memp_free_pool(desc, mem); -} - -/** - * Put an element back into its pool. - * - * @param type the pool where to put mem - * @param mem the memp element to free - */ -void -memp_free(memp_t type, void *mem) -{ -#ifdef LWIP_HOOK_MEMP_AVAILABLE - struct memp *old_first; -#endif - - LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;); - - if (mem == NULL) { - return; - } - -#if MEMP_OVERFLOW_CHECK >= 2 - memp_overflow_check_all(); -#endif /* MEMP_OVERFLOW_CHECK >= 2 */ - -#ifdef LWIP_HOOK_MEMP_AVAILABLE - old_first = *memp_pools[type]->tab; -#endif - - do_memp_free_pool(memp_pools[type], mem); - -#ifdef LWIP_HOOK_MEMP_AVAILABLE - if (old_first == NULL) { - LWIP_HOOK_MEMP_AVAILABLE(type); - } -#endif -} +/** + * @file + * Dynamic pool memory manager + * + * lwIP has dedicated pools for many structures (netconn, protocol control blocks, + * packet buffers, ...). All these pools are managed here. + * + * @defgroup mempool Memory pools + * @ingroup infrastructure + * Custom memory pools + + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#include "lwip/memp.h" +#include "lwip/sys.h" +#include "lwip/stats.h" + +#include + +/* Make sure we include everything we need for size calculation required by memp_std.h */ +#include "lwip/pbuf.h" +#include "lwip/raw.h" +#include "lwip/udp.h" +#include "lwip/tcp.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/ip4_frag.h" +#include "lwip/netbuf.h" +#include "lwip/api.h" +#include "lwip/priv/tcpip_priv.h" +#include "lwip/priv/api_msg.h" +#include "lwip/sockets.h" +#include "lwip/netifapi.h" +#include "lwip/etharp.h" +#include "lwip/igmp.h" +#include "lwip/timeouts.h" +/* needed by default MEMP_NUM_SYS_TIMEOUT */ +#include "netif/ppp/ppp_opts.h" +#include "lwip/netdb.h" +#include "lwip/dns.h" +#include "lwip/priv/nd6_priv.h" +#include "lwip/ip6_frag.h" +#include "lwip/mld6.h" + +#define LWIP_MEMPOOL(name,num,size,desc) LWIP_MEMPOOL_DECLARE(name,num,size,desc) +#include "lwip/priv/memp_std.h" + +const struct memp_desc* const memp_pools[MEMP_MAX] = { +#define LWIP_MEMPOOL(name,num,size,desc) &memp_ ## name, +#include "lwip/priv/memp_std.h" +}; + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +#if MEMP_MEM_MALLOC && MEMP_OVERFLOW_CHECK >= 2 +#undef MEMP_OVERFLOW_CHECK +/* MEMP_OVERFLOW_CHECK >= 2 does not work with MEMP_MEM_MALLOC, use 1 instead */ +#define MEMP_OVERFLOW_CHECK 1 +#endif + +#if MEMP_SANITY_CHECK && !MEMP_MEM_MALLOC +/** + * Check that memp-lists don't form a circle, using "Floyd's cycle-finding algorithm". + */ +static int +memp_sanity(const struct memp_desc *desc) +{ + struct memp *t, *h; + + t = *desc->tab; + if (t != NULL) { + for (h = t->next; (t != NULL) && (h != NULL); t = t->next, + h = ((h->next != NULL) ? h->next->next : NULL)) { + if (t == h) { + return 0; + } + } + } + + return 1; +} +#endif /* MEMP_SANITY_CHECK && !MEMP_MEM_MALLOC */ + +#if MEMP_OVERFLOW_CHECK +/** + * Check if a memp element was victim of an overflow + * (e.g. the restricted area after it has been altered) + * + * @param p the memp element to check + * @param desc the pool p comes from + */ +static void +memp_overflow_check_element_overflow(struct memp *p, const struct memp_desc *desc) +{ +#if MEMP_SANITY_REGION_AFTER_ALIGNED > 0 + u16_t k; + u8_t *m; + m = (u8_t*)p + MEMP_SIZE + desc->size; + for (k = 0; k < MEMP_SANITY_REGION_AFTER_ALIGNED; k++) { + if (m[k] != 0xcd) { + char errstr[128] = "detected memp overflow in pool "; + strcat(errstr, desc->desc); + LWIP_ASSERT(errstr, 0); + } + } +#else /* MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(desc); +#endif /* MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ +} + +/** + * Check if a memp element was victim of an underflow + * (e.g. the restricted area before it has been altered) + * + * @param p the memp element to check + * @param desc the pool p comes from + */ +static void +memp_overflow_check_element_underflow(struct memp *p, const struct memp_desc *desc) +{ +#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 + u16_t k; + u8_t *m; + m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED; + for (k = 0; k < MEMP_SANITY_REGION_BEFORE_ALIGNED; k++) { + if (m[k] != 0xcd) { + char errstr[128] = "detected memp underflow in pool "; + strcat(errstr, desc->desc); + LWIP_ASSERT(errstr, 0); + } + } +#else /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 */ + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(desc); +#endif /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 */ +} + +/** + * Initialize the restricted area of on memp element. + */ +static void +memp_overflow_init_element(struct memp *p, const struct memp_desc *desc) +{ +#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 + u8_t *m; +#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 + m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED; + memset(m, 0xcd, MEMP_SANITY_REGION_BEFORE_ALIGNED); +#endif +#if MEMP_SANITY_REGION_AFTER_ALIGNED > 0 + m = (u8_t*)p + MEMP_SIZE + desc->size; + memset(m, 0xcd, MEMP_SANITY_REGION_AFTER_ALIGNED); +#endif +#else /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(desc); +#endif /* MEMP_SANITY_REGION_BEFORE_ALIGNED > 0 || MEMP_SANITY_REGION_AFTER_ALIGNED > 0 */ +} + +#if MEMP_OVERFLOW_CHECK >= 2 +/** + * Do an overflow check for all elements in every pool. + * + * @see memp_overflow_check_element for a description of the check + */ +static void +memp_overflow_check_all(void) +{ + u16_t i, j; + struct memp *p; + SYS_ARCH_DECL_PROTECT(old_level); + SYS_ARCH_PROTECT(old_level); + + for (i = 0; i < MEMP_MAX; ++i) { + p = (struct memp*)LWIP_MEM_ALIGN(memp_pools[i]->base); + for (j = 0; j < memp_pools[i]->num; ++j) { + memp_overflow_check_element_overflow(p, memp_pools[i]); + memp_overflow_check_element_underflow(p, memp_pools[i]); + p = LWIP_ALIGNMENT_CAST(struct memp*, ((u8_t*)p + MEMP_SIZE + memp_pools[i]->size + MEMP_SANITY_REGION_AFTER_ALIGNED)); + } + } + SYS_ARCH_UNPROTECT(old_level); +} +#endif /* MEMP_OVERFLOW_CHECK >= 2 */ +#endif /* MEMP_OVERFLOW_CHECK */ + +/** + * Initialize custom memory pool. + * Related functions: memp_malloc_pool, memp_free_pool + * + * @param desc pool to initialize + */ +void +memp_init_pool(const struct memp_desc *desc) +{ +#if MEMP_MEM_MALLOC + LWIP_UNUSED_ARG(desc); +#else + int i; + struct memp *memp; + + *desc->tab = NULL; + memp = (struct memp*)LWIP_MEM_ALIGN(desc->base); + /* create a linked list of memp elements */ + for (i = 0; i < desc->num; ++i) { + memp->next = *desc->tab; + *desc->tab = memp; +#if MEMP_OVERFLOW_CHECK + memp_overflow_init_element(memp, desc); +#endif /* MEMP_OVERFLOW_CHECK */ + /* cast through void* to get rid of alignment warnings */ + memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size +#if MEMP_OVERFLOW_CHECK + + MEMP_SANITY_REGION_AFTER_ALIGNED +#endif + ); + } +#if MEMP_STATS + desc->stats->avail = desc->num; +#endif /* MEMP_STATS */ +#endif /* !MEMP_MEM_MALLOC */ + +#if MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) + desc->stats->name = desc->desc; +#endif /* MEMP_STATS && (defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY) */ +} + +/** + * Initializes lwIP built-in pools. + * Related functions: memp_malloc, memp_free + * + * Carves out memp_memory into linked lists for each pool-type. + */ +void +memp_init(void) +{ + u16_t i; + + /* for every pool: */ + for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { + memp_init_pool(memp_pools[i]); + +#if LWIP_STATS && MEMP_STATS + lwip_stats.memp[i] = memp_pools[i]->stats; +#endif + } + +#if MEMP_OVERFLOW_CHECK >= 2 + /* check everything a first time to see if it worked */ + memp_overflow_check_all(); +#endif /* MEMP_OVERFLOW_CHECK >= 2 */ +} + +static void* +#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 +{ + struct memp *memp; + SYS_ARCH_DECL_PROTECT(old_level); + +#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); + + memp = *desc->tab; +#endif /* MEMP_MEM_MALLOC */ + + if (memp != NULL) { +#if !MEMP_MEM_MALLOC +#if MEMP_OVERFLOW_CHECK == 1 + memp_overflow_check_element_overflow(memp, desc); + memp_overflow_check_element_underflow(memp, desc); +#endif /* MEMP_OVERFLOW_CHECK */ + + *desc->tab = memp->next; +#if MEMP_OVERFLOW_CHECK + memp->next = NULL; +#endif /* MEMP_OVERFLOW_CHECK */ +#endif /* !MEMP_MEM_MALLOC */ +#if MEMP_OVERFLOW_CHECK + memp->file = file; + 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", + ((mem_ptr_t)memp % MEM_ALIGNMENT) == 0); +#if MEMP_STATS + desc->stats->used++; + if (desc->stats->used > desc->stats->max) { + desc->stats->max = desc->stats->used; + } +#endif + SYS_ARCH_UNPROTECT(old_level); + /* cast through u8_t* to get rid of alignment warnings */ + return ((u8_t*)memp + MEMP_SIZE); + } else { + LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); +#if MEMP_STATS + desc->stats->err++; +#endif + } + + SYS_ARCH_UNPROTECT(old_level); + return NULL; +} + +/** + * Get an element from a custom pool. + * + * @param desc the pool to get an element from + * + * @return a pointer to the allocated memory or a NULL pointer on error + */ +void * +#if !MEMP_OVERFLOW_CHECK +memp_malloc_pool(const struct memp_desc *desc) +#else +memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int line) +#endif +{ + LWIP_ASSERT("invalid pool desc", desc != NULL); + if (desc == NULL) { + return NULL; + } + +#if !MEMP_OVERFLOW_CHECK + return do_memp_malloc_pool(desc); +#else + return do_memp_malloc_pool_fn(desc, file, line); +#endif +} + +/** + * Get an element from a specific pool. + * + * @param type the pool to get an element from + * + * @return a pointer to the allocated memory or a NULL pointer on error + */ +void * +#if !MEMP_OVERFLOW_CHECK +memp_malloc(memp_t type) +#else +memp_malloc_fn(memp_t type, const char* file, const int line) +#endif +{ + void *memp; + LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); + +#if MEMP_OVERFLOW_CHECK >= 2 + memp_overflow_check_all(); +#endif /* MEMP_OVERFLOW_CHECK >= 2 */ + +#if !MEMP_OVERFLOW_CHECK + memp = do_memp_malloc_pool(memp_pools[type]); +#else + memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); +#endif + + return memp; +} + +static void +do_memp_free_pool(const struct memp_desc* desc, void *mem) +{ + struct memp *memp; + SYS_ARCH_DECL_PROTECT(old_level); + + LWIP_ASSERT("memp_free: mem properly aligned", + ((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); + +#if MEMP_OVERFLOW_CHECK == 1 + memp_overflow_check_element_overflow(memp, desc); + memp_overflow_check_element_underflow(memp, desc); +#endif /* MEMP_OVERFLOW_CHECK */ + +#if MEMP_STATS + desc->stats->used--; +#endif + +#if MEMP_MEM_MALLOC + LWIP_UNUSED_ARG(desc); + SYS_ARCH_UNPROTECT(old_level); + mem_free(memp); +#else /* MEMP_MEM_MALLOC */ + memp->next = *desc->tab; + *desc->tab = memp; + +#if MEMP_SANITY_CHECK + LWIP_ASSERT("memp sanity", memp_sanity(desc)); +#endif /* MEMP_SANITY_CHECK */ + + SYS_ARCH_UNPROTECT(old_level); +#endif /* !MEMP_MEM_MALLOC */ +} + +/** + * Put a custom pool element back into its pool. + * + * @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) +{ + LWIP_ASSERT("invalid pool desc", desc != NULL); + if ((desc == NULL) || (mem == NULL)) { + return; + } + + do_memp_free_pool(desc, mem); +} + +/** + * Put an element back into its pool. + * + * @param type the pool where to put mem + * @param mem the memp element to free + */ +void +memp_free(memp_t type, void *mem) +{ +#ifdef LWIP_HOOK_MEMP_AVAILABLE + struct memp *old_first; +#endif + + LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;); + + if (mem == NULL) { + return; + } + +#if MEMP_OVERFLOW_CHECK >= 2 + memp_overflow_check_all(); +#endif /* MEMP_OVERFLOW_CHECK >= 2 */ + +#ifdef LWIP_HOOK_MEMP_AVAILABLE + old_first = *memp_pools[type]->tab; +#endif + + do_memp_free_pool(memp_pools[type], mem); + +#ifdef LWIP_HOOK_MEMP_AVAILABLE + if (old_first == NULL) { + LWIP_HOOK_MEMP_AVAILABLE(type); + } +#endif +} diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/netif.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/netif.c index 6444654..f16a0ff 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/netif.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/netif.c @@ -1,1267 +1,1267 @@ -/** - * @file - * lwIP network interface abstraction - * - * @defgroup netif Network interface (NETIF) - * @ingroup callbackstyle_api - * - * @defgroup netif_ip4 IPv4 address handling - * @ingroup netif - * - * @defgroup netif_ip6 IPv6 address handling - * @ingroup netif - * - * @defgroup netif_cd Client data handling - * Store data (void*) on a netif for application usage. - * @see @ref LWIP_NUM_NETIF_CLIENT_DATA - * @ingroup netif - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - */ - -#include "lwip/opt.h" - -#include - -#include "lwip/def.h" -#include "lwip/ip_addr.h" -#include "lwip/ip6_addr.h" -#include "lwip/netif.h" -#include "lwip/priv/tcp_priv.h" -#include "lwip/udp.h" -#include "lwip/raw.h" -#include "lwip/snmp.h" -#include "lwip/igmp.h" -#include "lwip/etharp.h" -#include "lwip/stats.h" -#include "lwip/sys.h" -#include "lwip/ip.h" -#if ENABLE_LOOPBACK -#if LWIP_NETIF_LOOPBACK_MULTITHREADING -#include "lwip/tcpip.h" -#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ -#endif /* ENABLE_LOOPBACK */ - -#include "netif/ethernet.h" - -#if LWIP_AUTOIP -#include "lwip/autoip.h" -#endif /* LWIP_AUTOIP */ -#if LWIP_DHCP -#include "lwip/dhcp.h" -#endif /* LWIP_DHCP */ -#if LWIP_IPV6_DHCP6 -#include "lwip/dhcp6.h" -#endif /* LWIP_IPV6_DHCP6 */ -#if LWIP_IPV6_MLD -#include "lwip/mld6.h" -#endif /* LWIP_IPV6_MLD */ -#if LWIP_IPV6 -#include "lwip/nd6.h" -#endif - -#if LWIP_NETIF_STATUS_CALLBACK -#define NETIF_STATUS_CALLBACK(n) do{ if (n->status_callback) { (n->status_callback)(n); }}while(0) -#else -#define NETIF_STATUS_CALLBACK(n) -#endif /* LWIP_NETIF_STATUS_CALLBACK */ - -#if LWIP_NETIF_LINK_CALLBACK -#define NETIF_LINK_CALLBACK(n) do{ if (n->link_callback) { (n->link_callback)(n); }}while(0) -#else -#define NETIF_LINK_CALLBACK(n) -#endif /* LWIP_NETIF_LINK_CALLBACK */ - -struct netif *netif_list; -struct netif *netif_default; - -static u8_t netif_num; - -#if LWIP_NUM_NETIF_CLIENT_DATA > 0 -static u8_t netif_client_id; -#endif - -#define NETIF_REPORT_TYPE_IPV4 0x01 -#define NETIF_REPORT_TYPE_IPV6 0x02 -static void netif_issue_reports(struct netif* netif, u8_t report_type); - -#if LWIP_IPV6 -static err_t netif_null_output_ip6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr); -#endif /* LWIP_IPV6 */ - -#if LWIP_HAVE_LOOPIF -#if LWIP_IPV4 -static err_t netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* addr); -#endif -#if LWIP_IPV6 -static err_t netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t* addr); -#endif - - -static struct netif loop_netif; - -/** - * Initialize a lwip network interface structure for a loopback interface - * - * @param netif the lwip network interface structure for this loopif - * @return ERR_OK if the loopif is initialized - * ERR_MEM if private data couldn't be allocated - */ -static err_t -netif_loopif_init(struct netif *netif) -{ - /* initialize the snmp variables and counters inside the struct netif - * ifSpeed: no assumption can be made! - */ - MIB2_INIT_NETIF(netif, snmp_ifType_softwareLoopback, 0); - - netif->name[0] = 'l'; - netif->name[1] = 'o'; -#if LWIP_IPV4 - netif->output = netif_loop_output_ipv4; -#endif -#if LWIP_IPV6 - netif->output_ip6 = netif_loop_output_ipv6; -#endif -#if LWIP_LOOPIF_MULTICAST - netif->flags |= NETIF_FLAG_IGMP; -#endif - return ERR_OK; -} -#endif /* LWIP_HAVE_LOOPIF */ - -void -netif_init(void) -{ -#if LWIP_HAVE_LOOPIF -#if LWIP_IPV4 -#define LOOPIF_ADDRINIT &loop_ipaddr, &loop_netmask, &loop_gw, - ip4_addr_t loop_ipaddr, loop_netmask, loop_gw; - IP4_ADDR(&loop_gw, 127,0,0,1); - IP4_ADDR(&loop_ipaddr, 127,0,0,1); - IP4_ADDR(&loop_netmask, 255,0,0,0); -#else /* LWIP_IPV4 */ -#define LOOPIF_ADDRINIT -#endif /* LWIP_IPV4 */ - -#if NO_SYS - netif_add(&loop_netif, LOOPIF_ADDRINIT NULL, netif_loopif_init, ip_input); -#else /* NO_SYS */ - netif_add(&loop_netif, LOOPIF_ADDRINIT NULL, netif_loopif_init, tcpip_input); -#endif /* NO_SYS */ - -#if LWIP_IPV6 - IP_ADDR6_HOST(loop_netif.ip6_addr, 0, 0, 0, 0x00000001UL); - loop_netif.ip6_addr_state[0] = IP6_ADDR_VALID; -#endif /* LWIP_IPV6 */ - - netif_set_link_up(&loop_netif); - netif_set_up(&loop_netif); - -#endif /* LWIP_HAVE_LOOPIF */ -} - -/** - * @ingroup lwip_nosys - * Forwards a received packet for input processing with - * ethernet_input() or ip_input() depending on netif flags. - * Don't call directly, pass to netif_add() and call - * netif->input(). - * Only works if the netif driver correctly sets - * NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag! - */ -err_t -netif_input(struct pbuf *p, struct netif *inp) -{ -#if LWIP_ETHERNET - if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { - return ethernet_input(p, inp); - } else -#endif /* LWIP_ETHERNET */ - return ip_input(p, inp); -} - -/** - * @ingroup netif - * Add a network interface to the list of lwIP netifs. - * - * @param netif a pre-allocated netif structure - * @param ipaddr IP address for the new netif - * @param netmask network mask for the new netif - * @param gw default gateway IP address for the new netif - * @param state opaque data passed to the new netif - * @param init callback function that initializes the interface - * @param input callback function that is called to pass - * ingress packets up in the protocol layer stack.\n - * It is recommended to use a function that passes the input directly - * to the stack (netif_input(), NO_SYS=1 mode) or via sending a - * message to TCPIP thread (tcpip_input(), NO_SYS=0 mode).\n - * These functions use netif flags NETIF_FLAG_ETHARP and NETIF_FLAG_ETHERNET - * to decide whether to forward to ethernet_input() or ip_input(). - * In other words, the functions only work when the netif - * driver is implemented correctly!\n - * Most members of struct netif should be be initialized by the - * netif init function = netif driver (init parameter of this function).\n - * IPv6: Don't forget to call netif_create_ip6_linklocal_address() after - * setting the MAC address in struct netif.hwaddr - * (IPv6 requires a link-local address). - * - * @return netif, or NULL if failed. - */ -struct netif * -netif_add(struct netif *netif, -#if LWIP_IPV4 - const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, -#endif /* LWIP_IPV4 */ - void *state, netif_init_fn init, netif_input_fn input) -{ -#if LWIP_IPV6 - s8_t i; -#endif - - LWIP_ASSERT("No init function given", init != NULL); - - /* reset new interface configuration state */ -#if LWIP_IPV4 - ip_addr_set_zero_ip4(&netif->ip_addr); - ip_addr_set_zero_ip4(&netif->netmask); - ip_addr_set_zero_ip4(&netif->gw); -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - ip_addr_set_zero_ip6(&netif->ip6_addr[i]); - netif->ip6_addr_state[i] = IP6_ADDR_INVALID; - } - netif->output_ip6 = netif_null_output_ip6; -#endif /* LWIP_IPV6 */ - NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_ENABLE_ALL); - netif->flags = 0; -#ifdef netif_get_client_data - memset(netif->client_data, 0, sizeof(netif->client_data)); -#endif /* LWIP_NUM_NETIF_CLIENT_DATA */ -#if LWIP_IPV6_AUTOCONFIG - /* IPv6 address autoconfiguration not enabled by default */ - netif->ip6_autoconfig_enabled = 0; -#endif /* LWIP_IPV6_AUTOCONFIG */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ -#if LWIP_NETIF_STATUS_CALLBACK - netif->status_callback = NULL; -#endif /* LWIP_NETIF_STATUS_CALLBACK */ -#if LWIP_NETIF_LINK_CALLBACK - netif->link_callback = NULL; -#endif /* LWIP_NETIF_LINK_CALLBACK */ -#if LWIP_IGMP - netif->igmp_mac_filter = NULL; -#endif /* LWIP_IGMP */ -#if LWIP_IPV6 && LWIP_IPV6_MLD - netif->mld_mac_filter = NULL; -#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ -#if ENABLE_LOOPBACK - netif->loop_first = NULL; - netif->loop_last = NULL; -#endif /* ENABLE_LOOPBACK */ - - /* remember netif specific state information data */ - netif->state = state; - netif->num = netif_num++; - netif->input = input; - - NETIF_SET_HWADDRHINT(netif, NULL); -#if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS - netif->loop_cnt_current = 0; -#endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */ - -#if LWIP_IPV4 - netif_set_addr(netif, ipaddr, netmask, gw); -#endif /* LWIP_IPV4 */ - - /* call user specified initialization function for netif */ - if (init(netif) != ERR_OK) { - return NULL; - } - - /* add this netif to the list */ - netif->next = netif_list; - netif_list = netif; - mib2_netif_added(netif); - -#if LWIP_IGMP - /* start IGMP processing */ - if (netif->flags & NETIF_FLAG_IGMP) { - igmp_start(netif); - } -#endif /* LWIP_IGMP */ - - LWIP_DEBUGF(NETIF_DEBUG, ("netif: added interface %c%c IP", - netif->name[0], netif->name[1])); -#if LWIP_IPV4 - LWIP_DEBUGF(NETIF_DEBUG, (" addr ")); - ip4_addr_debug_print(NETIF_DEBUG, ipaddr); - LWIP_DEBUGF(NETIF_DEBUG, (" netmask ")); - ip4_addr_debug_print(NETIF_DEBUG, netmask); - LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); - ip4_addr_debug_print(NETIF_DEBUG, gw); -#endif /* LWIP_IPV4 */ - LWIP_DEBUGF(NETIF_DEBUG, ("\n")); - return netif; -} - -#if LWIP_IPV4 -/** - * @ingroup netif_ip4 - * Change IP address configuration for a network interface (including netmask - * and default gateway). - * - * @param netif the network interface to change - * @param ipaddr the new IP address - * @param netmask the new netmask - * @param gw the new default gateway - */ -void -netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, - const ip4_addr_t *gw) -{ - if (ip4_addr_isany(ipaddr)) { - /* when removing an address, we have to remove it *before* changing netmask/gw - to ensure that tcp RST segment can be sent correctly */ - netif_set_ipaddr(netif, ipaddr); - netif_set_netmask(netif, netmask); - netif_set_gw(netif, gw); - } else { - netif_set_netmask(netif, netmask); - netif_set_gw(netif, gw); - /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ - netif_set_ipaddr(netif, ipaddr); - } -} -#endif /* LWIP_IPV4*/ - -/** - * @ingroup netif - * Remove a network interface from the list of lwIP netifs. - * - * @param netif the network interface to remove - */ -void -netif_remove(struct netif *netif) -{ -#if LWIP_IPV6 - int i; -#endif - - if (netif == NULL) { - return; - } - -#if LWIP_IPV4 - if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) { -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); -#endif /* LWIP_RAW */ - } - -#if LWIP_IGMP - /* stop IGMP processing */ - if (netif->flags & NETIF_FLAG_IGMP) { - igmp_stop(netif); - } -#endif /* LWIP_IGMP */ -#endif /* LWIP_IPV4*/ - -#if LWIP_IPV6 - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) { -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); -#endif /* LWIP_RAW */ - } - } -#if LWIP_IPV6_MLD - /* stop MLD processing */ - mld6_stop(netif); -#endif /* LWIP_IPV6_MLD */ -#endif /* LWIP_IPV6 */ - if (netif_is_up(netif)) { - /* set netif down before removing (call callback function) */ - netif_set_down(netif); - } - - mib2_remove_ip4(netif); - - /* this netif is default? */ - if (netif_default == netif) { - /* reset default netif */ - netif_set_default(NULL); - } - /* is it the first netif? */ - if (netif_list == netif) { - netif_list = netif->next; - } else { - /* look for netif further down the list */ - struct netif * tmp_netif; - for (tmp_netif = netif_list; tmp_netif != NULL; tmp_netif = tmp_netif->next) { - if (tmp_netif->next == netif) { - tmp_netif->next = netif->next; - break; - } - } - if (tmp_netif == NULL) { - return; /* netif is not on the list */ - } - } - mib2_netif_removed(netif); -#if LWIP_NETIF_REMOVE_CALLBACK - if (netif->remove_callback) { - netif->remove_callback(netif); - } -#endif /* LWIP_NETIF_REMOVE_CALLBACK */ - LWIP_DEBUGF( NETIF_DEBUG, ("netif_remove: removed netif\n") ); -} - -/** - * @ingroup netif - * Find a network interface by searching for its name - * - * @param name the name of the netif (like netif->name) plus concatenated number - * in ascii representation (e.g. 'en0') - */ -struct netif * -netif_find(const char *name) -{ - struct netif *netif; - u8_t num; - - if (name == NULL) { - return NULL; - } - - num = (u8_t)(name[2] - '0'); - - for (netif = netif_list; netif != NULL; netif = netif->next) { - if (num == netif->num && - name[0] == netif->name[0] && - name[1] == netif->name[1]) { - LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: found %c%c\n", name[0], name[1])); - return netif; - } - } - LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1])); - return NULL; -} - -#if LWIP_IPV4 -/** - * @ingroup netif_ip4 - * Change the IP address of a network interface - * - * @param netif the network interface to change - * @param ipaddr the new IP address - * - * @note call netif_set_addr() if you also want to change netmask and - * default gateway - */ -void -netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) -{ - ip_addr_t new_addr; - *ip_2_ip4(&new_addr) = (ipaddr ? *ipaddr : *IP4_ADDR_ANY4); - IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); - - /* address is actually being changed? */ - if (ip4_addr_cmp(ip_2_ip4(&new_addr), netif_ip4_addr(netif)) == 0) { - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); -#endif /* LWIP_RAW */ - - mib2_remove_ip4(netif); - mib2_remove_route_ip4(0, netif); - /* set new IP address to netif */ - ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); - IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4); - mib2_add_ip4(netif); - mib2_add_route_ip4(0, netif); - - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); - - NETIF_STATUS_CALLBACK(netif); - } - - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IP address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - netif->name[0], netif->name[1], - ip4_addr1_16(netif_ip4_addr(netif)), - ip4_addr2_16(netif_ip4_addr(netif)), - ip4_addr3_16(netif_ip4_addr(netif)), - ip4_addr4_16(netif_ip4_addr(netif)))); -} - -/** - * @ingroup netif_ip4 - * Change the default gateway for a network interface - * - * @param netif the network interface to change - * @param gw the new default gateway - * - * @note call netif_set_addr() if you also want to change ip address and netmask - */ -void -netif_set_gw(struct netif *netif, const ip4_addr_t *gw) -{ - ip4_addr_set(ip_2_ip4(&netif->gw), gw); - IP_SET_TYPE_VAL(netif->gw, IPADDR_TYPE_V4); - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: GW address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - 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)))); -} - -/** - * @ingroup netif_ip4 - * Change the netmask of a network interface - * - * @param netif the network interface to change - * @param netmask the new netmask - * - * @note call netif_set_addr() if you also want to change ip address and - * default gateway - */ -void -netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) -{ - mib2_remove_route_ip4(0, netif); - /* set new netmask to netif */ - ip4_addr_set(ip_2_ip4(&netif->netmask), netmask); - IP_SET_TYPE_VAL(netif->netmask, IPADDR_TYPE_V4); - mib2_add_route_ip4(0, netif); - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: netmask of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", - 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)))); -} -#endif /* LWIP_IPV4 */ - -/** - * @ingroup netif - * Set a network interface as the default network interface - * (used to output all packets for which no specific route is found) - * - * @param netif the default network interface - */ -void -netif_set_default(struct netif *netif) -{ - if (netif == NULL) { - /* remove default route */ - mib2_remove_route_ip4(1, netif); - } else { - /* install default route */ - mib2_add_route_ip4(1, netif); - } - netif_default = netif; - LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", - netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); -} - -/** - * @ingroup netif - * Bring an interface up, available for processing - * traffic. - */ -void -netif_set_up(struct netif *netif) -{ - if (!(netif->flags & NETIF_FLAG_UP)) { - netif->flags |= NETIF_FLAG_UP; - - MIB2_COPY_SYSUPTIME_TO(&netif->ts); - - NETIF_STATUS_CALLBACK(netif); - - if (netif->flags & NETIF_FLAG_LINK_UP) { - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); - } - } -} - -/** Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change - */ -static void -netif_issue_reports(struct netif* netif, u8_t report_type) -{ -#if LWIP_IPV4 - if ((report_type & NETIF_REPORT_TYPE_IPV4) && - !ip4_addr_isany_val(*netif_ip4_addr(netif))) { -#if LWIP_ARP - /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ - if (netif->flags & (NETIF_FLAG_ETHARP)) { - etharp_gratuitous(netif); - } -#endif /* LWIP_ARP */ - -#if LWIP_IGMP - /* resend IGMP memberships */ - if (netif->flags & NETIF_FLAG_IGMP) { - igmp_report_groups(netif); - } -#endif /* LWIP_IGMP */ - } -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 - if (report_type & NETIF_REPORT_TYPE_IPV6) { -#if LWIP_IPV6_MLD - /* send mld memberships */ - mld6_report_groups(netif); -#endif /* LWIP_IPV6_MLD */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - /* Send Router Solicitation messages. */ - netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ - } -#endif /* LWIP_IPV6 */ -} - -/** - * @ingroup netif - * Bring an interface down, disabling any traffic processing. - */ -void -netif_set_down(struct netif *netif) -{ - if (netif->flags & NETIF_FLAG_UP) { - netif->flags &= ~NETIF_FLAG_UP; - MIB2_COPY_SYSUPTIME_TO(&netif->ts); - -#if LWIP_IPV4 && LWIP_ARP - if (netif->flags & NETIF_FLAG_ETHARP) { - etharp_cleanup_netif(netif); - } -#endif /* LWIP_IPV4 && LWIP_ARP */ - -#if LWIP_IPV6 - nd6_cleanup_netif(netif); -#endif /* LWIP_IPV6 */ - - NETIF_STATUS_CALLBACK(netif); - } -} - -#if LWIP_NETIF_STATUS_CALLBACK -/** - * @ingroup netif - * Set callback to be called when interface is brought up/down or address is changed while up - */ -void -netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback) -{ - if (netif) { - netif->status_callback = status_callback; - } -} -#endif /* LWIP_NETIF_STATUS_CALLBACK */ - -#if LWIP_NETIF_REMOVE_CALLBACK -/** - * @ingroup netif - * Set callback to be called when the interface has been removed - */ -void -netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback) -{ - if (netif) { - netif->remove_callback = remove_callback; - } -} -#endif /* LWIP_NETIF_REMOVE_CALLBACK */ - -/** - * @ingroup netif - * Called by a driver when its link goes up - */ -void -netif_set_link_up(struct netif *netif) -{ - if (!(netif->flags & NETIF_FLAG_LINK_UP)) { - netif->flags |= NETIF_FLAG_LINK_UP; - -#if LWIP_DHCP - dhcp_network_changed(netif); -#endif /* LWIP_DHCP */ - -#if LWIP_AUTOIP - autoip_network_changed(netif); -#endif /* LWIP_AUTOIP */ - - if (netif->flags & NETIF_FLAG_UP) { - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); - } - NETIF_LINK_CALLBACK(netif); - } -} - -/** - * @ingroup netif - * Called by a driver when its link goes down - */ -void -netif_set_link_down(struct netif *netif ) -{ - if (netif->flags & NETIF_FLAG_LINK_UP) { - netif->flags &= ~NETIF_FLAG_LINK_UP; - NETIF_LINK_CALLBACK(netif); - } -} - -#if LWIP_NETIF_LINK_CALLBACK -/** - * @ingroup netif - * Set callback to be called when link is brought up/down - */ -void -netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback) -{ - if (netif) { - netif->link_callback = link_callback; - } -} -#endif /* LWIP_NETIF_LINK_CALLBACK */ - -#if ENABLE_LOOPBACK -/** - * @ingroup netif - * Send an IP packet to be received on the same netif (loopif-like). - * The pbuf is simply copied and handed back to netif->input. - * In multithreaded mode, this is done directly since netif->input must put - * the packet on a queue. - * In callback mode, the packet is put on an internal queue and is fed to - * netif->input by netif_poll(). - * - * @param netif the lwip network interface structure - * @param p the (IP) packet to 'send' - * @return ERR_OK if the packet has been sent - * ERR_MEM if the pbuf used to copy the packet couldn't be allocated - */ -err_t -netif_loop_output(struct netif *netif, struct pbuf *p) -{ - struct pbuf *r; - err_t err; - struct pbuf *last; -#if LWIP_LOOPBACK_MAX_PBUFS - u16_t clen = 0; -#endif /* LWIP_LOOPBACK_MAX_PBUFS */ - /* If we have a loopif, SNMP counters are adjusted for it, - * if not they are adjusted for 'netif'. */ -#if MIB2_STATS -#if LWIP_HAVE_LOOPIF - struct netif *stats_if = &loop_netif; -#else /* LWIP_HAVE_LOOPIF */ - struct netif *stats_if = netif; -#endif /* LWIP_HAVE_LOOPIF */ -#endif /* MIB2_STATS */ - SYS_ARCH_DECL_PROTECT(lev); - - /* Allocate a new pbuf */ - r = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); - if (r == NULL) { - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(stats_if, ifoutdiscards); - return ERR_MEM; - } -#if LWIP_LOOPBACK_MAX_PBUFS - clen = pbuf_clen(r); - /* check for overflow or too many pbuf on queue */ - if (((netif->loop_cnt_current + clen) < netif->loop_cnt_current) || - ((netif->loop_cnt_current + clen) > LWIP_LOOPBACK_MAX_PBUFS)) { - pbuf_free(r); - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(stats_if, ifoutdiscards); - return ERR_MEM; - } - netif->loop_cnt_current += clen; -#endif /* LWIP_LOOPBACK_MAX_PBUFS */ - - /* Copy the whole pbuf queue p into the single pbuf r */ - if ((err = pbuf_copy(r, p)) != ERR_OK) { - pbuf_free(r); - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(stats_if, ifoutdiscards); - return err; - } - - /* Put the packet on a linked list which gets emptied through calling - netif_poll(). */ - - /* let last point to the last pbuf in chain r */ - for (last = r; last->next != NULL; last = last->next) { - /* nothing to do here, just get to the last pbuf */ - } - - SYS_ARCH_PROTECT(lev); - if (netif->loop_first != NULL) { - LWIP_ASSERT("if first != NULL, last must also be != NULL", netif->loop_last != NULL); - netif->loop_last->next = r; - netif->loop_last = last; - } else { - netif->loop_first = r; - netif->loop_last = last; - } - SYS_ARCH_UNPROTECT(lev); - - LINK_STATS_INC(link.xmit); - MIB2_STATS_NETIF_ADD(stats_if, ifoutoctets, p->tot_len); - MIB2_STATS_NETIF_INC(stats_if, ifoutucastpkts); - -#if LWIP_NETIF_LOOPBACK_MULTITHREADING - /* For multithreading environment, schedule a call to netif_poll */ - tcpip_callback_with_block((tcpip_callback_fn)netif_poll, netif, 0); -#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ - - return ERR_OK; -} - -#if LWIP_HAVE_LOOPIF -#if LWIP_IPV4 -static err_t -netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* addr) -{ - LWIP_UNUSED_ARG(addr); - return netif_loop_output(netif, p); -} -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -static err_t -netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t* addr) -{ - LWIP_UNUSED_ARG(addr); - return netif_loop_output(netif, p); -} -#endif /* LWIP_IPV6 */ -#endif /* LWIP_HAVE_LOOPIF */ - - -/** - * Call netif_poll() in the main loop of your application. This is to prevent - * reentering non-reentrant functions like tcp_input(). Packets passed to - * netif_loop_output() are put on a list that is passed to netif->input() by - * netif_poll(). - */ -void -netif_poll(struct netif *netif) -{ - /* If we have a loopif, SNMP counters are adjusted for it, - * if not they are adjusted for 'netif'. */ -#if MIB2_STATS -#if LWIP_HAVE_LOOPIF - struct netif *stats_if = &loop_netif; -#else /* LWIP_HAVE_LOOPIF */ - struct netif *stats_if = netif; -#endif /* LWIP_HAVE_LOOPIF */ -#endif /* MIB2_STATS */ - SYS_ARCH_DECL_PROTECT(lev); - - /* Get a packet from the list. With SYS_LIGHTWEIGHT_PROT=1, this is protected */ - SYS_ARCH_PROTECT(lev); - while (netif->loop_first != NULL) { - struct pbuf *in, *in_end; -#if LWIP_LOOPBACK_MAX_PBUFS - u8_t clen = 1; -#endif /* LWIP_LOOPBACK_MAX_PBUFS */ - - in = in_end = netif->loop_first; - while (in_end->len != in_end->tot_len) { - LWIP_ASSERT("bogus pbuf: len != tot_len but next == NULL!", in_end->next != NULL); - in_end = in_end->next; -#if LWIP_LOOPBACK_MAX_PBUFS - clen++; -#endif /* LWIP_LOOPBACK_MAX_PBUFS */ - } -#if LWIP_LOOPBACK_MAX_PBUFS - /* adjust the number of pbufs on queue */ - LWIP_ASSERT("netif->loop_cnt_current underflow", - ((netif->loop_cnt_current - clen) < netif->loop_cnt_current)); - netif->loop_cnt_current -= clen; -#endif /* LWIP_LOOPBACK_MAX_PBUFS */ - - /* 'in_end' now points to the last pbuf from 'in' */ - if (in_end == netif->loop_last) { - /* this was the last pbuf in the list */ - netif->loop_first = netif->loop_last = NULL; - } else { - /* pop the pbuf off the list */ - netif->loop_first = in_end->next; - LWIP_ASSERT("should not be null since first != last!", netif->loop_first != NULL); - } - /* De-queue the pbuf from its successors on the 'loop_' list. */ - in_end->next = NULL; - SYS_ARCH_UNPROTECT(lev); - - LINK_STATS_INC(link.recv); - MIB2_STATS_NETIF_ADD(stats_if, ifinoctets, in->tot_len); - MIB2_STATS_NETIF_INC(stats_if, ifinucastpkts); - /* loopback packets are always IP packets! */ - if (ip_input(in, netif) != ERR_OK) { - pbuf_free(in); - } - SYS_ARCH_PROTECT(lev); - } - SYS_ARCH_UNPROTECT(lev); -} - -#if !LWIP_NETIF_LOOPBACK_MULTITHREADING -/** - * Calls netif_poll() for every netif on the netif_list. - */ -void -netif_poll_all(void) -{ - struct netif *netif = netif_list; - /* loop through netifs */ - while (netif != NULL) { - netif_poll(netif); - /* proceed to next network interface */ - netif = netif->next; - } -} -#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */ -#endif /* ENABLE_LOOPBACK */ - -#if LWIP_NUM_NETIF_CLIENT_DATA > 0 -/** - * @ingroup netif_cd - * Allocate an index to store data in client_data member of struct netif. - * Returned value is an index in mentioned array. - * @see LWIP_NUM_NETIF_CLIENT_DATA - */ -u8_t -netif_alloc_client_data_id(void) -{ - u8_t result = netif_client_id; - netif_client_id++; - - LWIP_ASSERT("Increase LWIP_NUM_NETIF_CLIENT_DATA in lwipopts.h", result < LWIP_NUM_NETIF_CLIENT_DATA); - return result + LWIP_NETIF_CLIENT_DATA_INDEX_MAX; -} -#endif - -#if LWIP_IPV6 -/** - * @ingroup netif_ip6 - * Change an IPv6 address of a network interface - * - * @param netif the network interface to change - * @param addr_idx index of the IPv6 address - * @param addr6 the new IPv6 address - * - * @note call netif_ip6_addr_set_state() to set the address valid/temptative - */ -void -netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6) -{ - LWIP_ASSERT("addr6 != NULL", addr6 != NULL); - netif_ip6_addr_set_parts(netif, addr_idx, addr6->addr[0], addr6->addr[1], - addr6->addr[2], addr6->addr[3]); -} - -/* - * Change an IPv6 address of a network interface (internal version taking 4 * u32_t) - * - * @param netif the network interface to change - * @param addr_idx index of the IPv6 address - * @param i0 word0 of the new IPv6 address - * @param i1 word1 of the new IPv6 address - * @param i2 word2 of the new IPv6 address - * @param i3 word3 of the new IPv6 address - */ -void -netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3) -{ - const ip6_addr_t *old_addr; - LWIP_ASSERT("netif != NULL", netif != NULL); - LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES); - - old_addr = netif_ip6_addr(netif, addr_idx); - /* address is actually being changed? */ - if ((old_addr->addr[0] != i0) || (old_addr->addr[1] != i1) || - (old_addr->addr[2] != i2) || (old_addr->addr[3] != i3)) { - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_ip6_addr_set: netif address being changed\n")); - - if (netif_ip6_addr_state(netif, addr_idx) & IP6_ADDR_VALID) { -#if LWIP_TCP || LWIP_UDP - ip_addr_t new_ipaddr; - IP_ADDR6(&new_ipaddr, i0, i1, i2, i3); -#endif /* LWIP_TCP || LWIP_UDP */ -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); -#endif /* LWIP_RAW */ - } - /* @todo: remove/readd mib2 ip6 entries? */ - - IP6_ADDR(ip_2_ip6(&(netif->ip6_addr[addr_idx])), i0, i1, i2, i3); - IP_SET_TYPE_VAL(netif->ip6_addr[addr_idx], IPADDR_TYPE_V6); - - if (netif_ip6_addr_state(netif, addr_idx) & IP6_ADDR_VALID) { - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6); - NETIF_STATUS_CALLBACK(netif); - } - } - - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n", - addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), - netif_ip6_addr_state(netif, addr_idx))); -} - -/** - * @ingroup netif_ip6 - * Change the state of an IPv6 address of a network interface - * (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE - * includes the number of checks done, see ip6_addr.h) - * - * @param netif the network interface to change - * @param addr_idx index of the IPv6 address - * @param state the new IPv6 address state - */ -void -netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state) -{ - u8_t old_state; - LWIP_ASSERT("netif != NULL", netif != NULL); - LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES); - - old_state = netif_ip6_addr_state(netif, addr_idx); - /* state is actually being changed? */ - if (old_state != state) { - u8_t old_valid = old_state & IP6_ADDR_VALID; - u8_t new_valid = state & IP6_ADDR_VALID; - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_ip6_addr_set_state: netif address state being changed\n")); - -#if LWIP_IPV6_MLD - /* Reevaluate solicited-node multicast group membership. */ - if (netif->flags & NETIF_FLAG_MLD6) { - nd6_adjust_mld_membership(netif, addr_idx, state); - } -#endif /* LWIP_IPV6_MLD */ - - if (old_valid && !new_valid) { - /* address about to be removed by setting invalid */ -#if LWIP_TCP - tcp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); -#endif /* LWIP_TCP */ -#if LWIP_UDP - udp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); -#endif /* LWIP_UDP */ -#if LWIP_RAW - raw_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); -#endif /* LWIP_RAW */ - /* @todo: remove mib2 ip6 entries? */ - } - netif->ip6_addr_state[addr_idx] = state; - - if (!old_valid && new_valid) { - /* address added by setting valid */ - /* @todo: add mib2 ip6 entries? */ - netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6); - } - if ((old_state & IP6_ADDR_PREFERRED) != (state & IP6_ADDR_PREFERRED)) { - /* address state has changed (valid flag changed or switched between - preferred and deprecated) -> call the callback function */ - NETIF_STATUS_CALLBACK(netif); - } - } - - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n", - addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), - netif_ip6_addr_state(netif, addr_idx))); -} - -/** - * Checks if a specific address is assigned to the netif and returns its - * index. - * - * @param netif the netif to check - * @param ip6addr the IPv6 address to find - * @return >= 0: address found, this is its index - * -1: address not found on this netif - */ -s8_t -netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr) -{ - s8_t i; - for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, i)) && - ip6_addr_cmp(netif_ip6_addr(netif, i), ip6addr)) { - return i; - } - } - return -1; -} - -/** - * @ingroup netif_ip6 - * Create a link-local IPv6 address on a netif (stored in slot 0) - * - * @param netif the netif to create the address on - * @param from_mac_48bit if != 0, assume hwadr is a 48-bit MAC address (std conversion) - * if == 0, use hwaddr directly as interface ID - */ -void -netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit) -{ - u8_t i, addr_index; - - /* Link-local prefix. */ - ip_2_ip6(&netif->ip6_addr[0])->addr[0] = PP_HTONL(0xfe800000ul); - ip_2_ip6(&netif->ip6_addr[0])->addr[1] = 0; - - /* Generate interface ID. */ - if (from_mac_48bit) { - /* Assume hwaddr is a 48-bit IEEE 802 MAC. Convert to EUI-64 address. Complement Group bit. */ - ip_2_ip6(&netif->ip6_addr[0])->addr[2] = lwip_htonl((((u32_t)(netif->hwaddr[0] ^ 0x02)) << 24) | - ((u32_t)(netif->hwaddr[1]) << 16) | - ((u32_t)(netif->hwaddr[2]) << 8) | - (0xff)); - ip_2_ip6(&netif->ip6_addr[0])->addr[3] = lwip_htonl((0xfeul << 24) | - ((u32_t)(netif->hwaddr[3]) << 16) | - ((u32_t)(netif->hwaddr[4]) << 8) | - (netif->hwaddr[5])); - } else { - /* Use hwaddr directly as interface ID. */ - ip_2_ip6(&netif->ip6_addr[0])->addr[2] = 0; - ip_2_ip6(&netif->ip6_addr[0])->addr[3] = 0; - - addr_index = 3; - for (i = 0; (i < 8) && (i < netif->hwaddr_len); i++) { - if (i == 4) { - addr_index--; - } - ip_2_ip6(&netif->ip6_addr[0])->addr[addr_index] |= ((u32_t)(netif->hwaddr[netif->hwaddr_len - i - 1])) << (8 * (i & 0x03)); - } - } - - /* Set address state. */ -#if LWIP_IPV6_DUP_DETECT_ATTEMPTS - /* Will perform duplicate address detection (DAD). */ - netif_ip6_addr_set_state(netif, 0, IP6_ADDR_TENTATIVE); -#else - /* Consider address valid. */ - netif_ip6_addr_set_state(netif, 0, IP6_ADDR_PREFERRED); -#endif /* LWIP_IPV6_AUTOCONFIG */ -} - -/** - * @ingroup netif_ip6 - * This function allows for the easy addition of a new IPv6 address to an interface. - * It takes care of finding an empty slot and then sets the address tentative - * (to make sure that all the subsequent processing happens). - * - * @param netif netif to add the address on - * @param ip6addr address to add - * @param chosen_idx if != NULL, the chosen IPv6 address index will be stored here - */ -err_t -netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx) -{ - s8_t i; - - i = netif_get_ip6_addr_match(netif, ip6addr); - if (i >= 0) { - /* Address already added */ - if (chosen_idx != NULL) { - *chosen_idx = i; - } - return ERR_OK; - } - - /* Find a free slot -- musn't be the first one (reserved for link local) */ - for (i = 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) { - if (ip6_addr_isinvalid(netif_ip6_addr_state(netif, i))) { - ip_addr_copy_from_ip6(netif->ip6_addr[i], *ip6addr); - netif_ip6_addr_set_state(netif, i, IP6_ADDR_TENTATIVE); - if (chosen_idx != NULL) { - *chosen_idx = i; - } - return ERR_OK; - } - } - - if (chosen_idx != NULL) { - *chosen_idx = -1; - } - return ERR_VAL; -} - -/** Dummy IPv6 output function for netifs not supporting IPv6 - */ -static err_t -netif_null_output_ip6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr) -{ - LWIP_UNUSED_ARG(netif); - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(ipaddr); - - return ERR_IF; -} -#endif /* LWIP_IPV6 */ +/** + * @file + * lwIP network interface abstraction + * + * @defgroup netif Network interface (NETIF) + * @ingroup callbackstyle_api + * + * @defgroup netif_ip4 IPv4 address handling + * @ingroup netif + * + * @defgroup netif_ip6 IPv6 address handling + * @ingroup netif + * + * @defgroup netif_cd Client data handling + * Store data (void*) on a netif for application usage. + * @see @ref LWIP_NUM_NETIF_CLIENT_DATA + * @ingroup netif + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + */ + +#include "lwip/opt.h" + +#include + +#include "lwip/def.h" +#include "lwip/ip_addr.h" +#include "lwip/ip6_addr.h" +#include "lwip/netif.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/udp.h" +#include "lwip/raw.h" +#include "lwip/snmp.h" +#include "lwip/igmp.h" +#include "lwip/etharp.h" +#include "lwip/stats.h" +#include "lwip/sys.h" +#include "lwip/ip.h" +#if ENABLE_LOOPBACK +#if LWIP_NETIF_LOOPBACK_MULTITHREADING +#include "lwip/tcpip.h" +#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ +#endif /* ENABLE_LOOPBACK */ + +#include "netif/ethernet.h" + +#if LWIP_AUTOIP +#include "lwip/autoip.h" +#endif /* LWIP_AUTOIP */ +#if LWIP_DHCP +#include "lwip/dhcp.h" +#endif /* LWIP_DHCP */ +#if LWIP_IPV6_DHCP6 +#include "lwip/dhcp6.h" +#endif /* LWIP_IPV6_DHCP6 */ +#if LWIP_IPV6_MLD +#include "lwip/mld6.h" +#endif /* LWIP_IPV6_MLD */ +#if LWIP_IPV6 +#include "lwip/nd6.h" +#endif + +#if LWIP_NETIF_STATUS_CALLBACK +#define NETIF_STATUS_CALLBACK(n) do{ if (n->status_callback) { (n->status_callback)(n); }}while(0) +#else +#define NETIF_STATUS_CALLBACK(n) +#endif /* LWIP_NETIF_STATUS_CALLBACK */ + +#if LWIP_NETIF_LINK_CALLBACK +#define NETIF_LINK_CALLBACK(n) do{ if (n->link_callback) { (n->link_callback)(n); }}while(0) +#else +#define NETIF_LINK_CALLBACK(n) +#endif /* LWIP_NETIF_LINK_CALLBACK */ + +struct netif *netif_list; +struct netif *netif_default; + +static u8_t netif_num; + +#if LWIP_NUM_NETIF_CLIENT_DATA > 0 +static u8_t netif_client_id; +#endif + +#define NETIF_REPORT_TYPE_IPV4 0x01 +#define NETIF_REPORT_TYPE_IPV6 0x02 +static void netif_issue_reports(struct netif* netif, u8_t report_type); + +#if LWIP_IPV6 +static err_t netif_null_output_ip6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr); +#endif /* LWIP_IPV6 */ + +#if LWIP_HAVE_LOOPIF +#if LWIP_IPV4 +static err_t netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* addr); +#endif +#if LWIP_IPV6 +static err_t netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t* addr); +#endif + + +static struct netif loop_netif; + +/** + * Initialize a lwip network interface structure for a loopback interface + * + * @param netif the lwip network interface structure for this loopif + * @return ERR_OK if the loopif is initialized + * ERR_MEM if private data couldn't be allocated + */ +static err_t +netif_loopif_init(struct netif *netif) +{ + /* initialize the snmp variables and counters inside the struct netif + * ifSpeed: no assumption can be made! + */ + MIB2_INIT_NETIF(netif, snmp_ifType_softwareLoopback, 0); + + netif->name[0] = 'l'; + netif->name[1] = 'o'; +#if LWIP_IPV4 + netif->output = netif_loop_output_ipv4; +#endif +#if LWIP_IPV6 + netif->output_ip6 = netif_loop_output_ipv6; +#endif +#if LWIP_LOOPIF_MULTICAST + netif->flags |= NETIF_FLAG_IGMP; +#endif + return ERR_OK; +} +#endif /* LWIP_HAVE_LOOPIF */ + +void +netif_init(void) +{ +#if LWIP_HAVE_LOOPIF +#if LWIP_IPV4 +#define LOOPIF_ADDRINIT &loop_ipaddr, &loop_netmask, &loop_gw, + ip4_addr_t loop_ipaddr, loop_netmask, loop_gw; + IP4_ADDR(&loop_gw, 127,0,0,1); + IP4_ADDR(&loop_ipaddr, 127,0,0,1); + IP4_ADDR(&loop_netmask, 255,0,0,0); +#else /* LWIP_IPV4 */ +#define LOOPIF_ADDRINIT +#endif /* LWIP_IPV4 */ + +#if NO_SYS + netif_add(&loop_netif, LOOPIF_ADDRINIT NULL, netif_loopif_init, ip_input); +#else /* NO_SYS */ + netif_add(&loop_netif, LOOPIF_ADDRINIT NULL, netif_loopif_init, tcpip_input); +#endif /* NO_SYS */ + +#if LWIP_IPV6 + IP_ADDR6_HOST(loop_netif.ip6_addr, 0, 0, 0, 0x00000001UL); + loop_netif.ip6_addr_state[0] = IP6_ADDR_VALID; +#endif /* LWIP_IPV6 */ + + netif_set_link_up(&loop_netif); + netif_set_up(&loop_netif); + +#endif /* LWIP_HAVE_LOOPIF */ +} + +/** + * @ingroup lwip_nosys + * Forwards a received packet for input processing with + * ethernet_input() or ip_input() depending on netif flags. + * Don't call directly, pass to netif_add() and call + * netif->input(). + * Only works if the netif driver correctly sets + * NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag! + */ +err_t +netif_input(struct pbuf *p, struct netif *inp) +{ +#if LWIP_ETHERNET + if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { + return ethernet_input(p, inp); + } else +#endif /* LWIP_ETHERNET */ + return ip_input(p, inp); +} + +/** + * @ingroup netif + * Add a network interface to the list of lwIP netifs. + * + * @param netif a pre-allocated netif structure + * @param ipaddr IP address for the new netif + * @param netmask network mask for the new netif + * @param gw default gateway IP address for the new netif + * @param state opaque data passed to the new netif + * @param init callback function that initializes the interface + * @param input callback function that is called to pass + * ingress packets up in the protocol layer stack.\n + * It is recommended to use a function that passes the input directly + * to the stack (netif_input(), NO_SYS=1 mode) or via sending a + * message to TCPIP thread (tcpip_input(), NO_SYS=0 mode).\n + * These functions use netif flags NETIF_FLAG_ETHARP and NETIF_FLAG_ETHERNET + * to decide whether to forward to ethernet_input() or ip_input(). + * In other words, the functions only work when the netif + * driver is implemented correctly!\n + * Most members of struct netif should be be initialized by the + * netif init function = netif driver (init parameter of this function).\n + * IPv6: Don't forget to call netif_create_ip6_linklocal_address() after + * setting the MAC address in struct netif.hwaddr + * (IPv6 requires a link-local address). + * + * @return netif, or NULL if failed. + */ +struct netif * +netif_add(struct netif *netif, +#if LWIP_IPV4 + const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, +#endif /* LWIP_IPV4 */ + void *state, netif_init_fn init, netif_input_fn input) +{ +#if LWIP_IPV6 + s8_t i; +#endif + + LWIP_ASSERT("No init function given", init != NULL); + + /* reset new interface configuration state */ +#if LWIP_IPV4 + ip_addr_set_zero_ip4(&netif->ip_addr); + ip_addr_set_zero_ip4(&netif->netmask); + ip_addr_set_zero_ip4(&netif->gw); +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + ip_addr_set_zero_ip6(&netif->ip6_addr[i]); + netif->ip6_addr_state[i] = IP6_ADDR_INVALID; + } + netif->output_ip6 = netif_null_output_ip6; +#endif /* LWIP_IPV6 */ + NETIF_SET_CHECKSUM_CTRL(netif, NETIF_CHECKSUM_ENABLE_ALL); + netif->flags = 0; +#ifdef netif_get_client_data + memset(netif->client_data, 0, sizeof(netif->client_data)); +#endif /* LWIP_NUM_NETIF_CLIENT_DATA */ +#if LWIP_IPV6_AUTOCONFIG + /* IPv6 address autoconfiguration not enabled by default */ + netif->ip6_autoconfig_enabled = 0; +#endif /* LWIP_IPV6_AUTOCONFIG */ +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ +#if LWIP_NETIF_STATUS_CALLBACK + netif->status_callback = NULL; +#endif /* LWIP_NETIF_STATUS_CALLBACK */ +#if LWIP_NETIF_LINK_CALLBACK + netif->link_callback = NULL; +#endif /* LWIP_NETIF_LINK_CALLBACK */ +#if LWIP_IGMP + netif->igmp_mac_filter = NULL; +#endif /* LWIP_IGMP */ +#if LWIP_IPV6 && LWIP_IPV6_MLD + netif->mld_mac_filter = NULL; +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ +#if ENABLE_LOOPBACK + netif->loop_first = NULL; + netif->loop_last = NULL; +#endif /* ENABLE_LOOPBACK */ + + /* remember netif specific state information data */ + netif->state = state; + netif->num = netif_num++; + netif->input = input; + + NETIF_SET_HWADDRHINT(netif, NULL); +#if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS + netif->loop_cnt_current = 0; +#endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */ + +#if LWIP_IPV4 + netif_set_addr(netif, ipaddr, netmask, gw); +#endif /* LWIP_IPV4 */ + + /* call user specified initialization function for netif */ + if (init(netif) != ERR_OK) { + return NULL; + } + + /* add this netif to the list */ + netif->next = netif_list; + netif_list = netif; + mib2_netif_added(netif); + +#if LWIP_IGMP + /* start IGMP processing */ + if (netif->flags & NETIF_FLAG_IGMP) { + igmp_start(netif); + } +#endif /* LWIP_IGMP */ + + LWIP_DEBUGF(NETIF_DEBUG, ("netif: added interface %c%c IP", + netif->name[0], netif->name[1])); +#if LWIP_IPV4 + LWIP_DEBUGF(NETIF_DEBUG, (" addr ")); + ip4_addr_debug_print(NETIF_DEBUG, ipaddr); + LWIP_DEBUGF(NETIF_DEBUG, (" netmask ")); + ip4_addr_debug_print(NETIF_DEBUG, netmask); + LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); + ip4_addr_debug_print(NETIF_DEBUG, gw); +#endif /* LWIP_IPV4 */ + LWIP_DEBUGF(NETIF_DEBUG, ("\n")); + return netif; +} + +#if LWIP_IPV4 +/** + * @ingroup netif_ip4 + * Change IP address configuration for a network interface (including netmask + * and default gateway). + * + * @param netif the network interface to change + * @param ipaddr the new IP address + * @param netmask the new netmask + * @param gw the new default gateway + */ +void +netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, + const ip4_addr_t *gw) +{ + if (ip4_addr_isany(ipaddr)) { + /* when removing an address, we have to remove it *before* changing netmask/gw + to ensure that tcp RST segment can be sent correctly */ + netif_set_ipaddr(netif, ipaddr); + netif_set_netmask(netif, netmask); + netif_set_gw(netif, gw); + } else { + netif_set_netmask(netif, netmask); + netif_set_gw(netif, gw); + /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ + netif_set_ipaddr(netif, ipaddr); + } +} +#endif /* LWIP_IPV4*/ + +/** + * @ingroup netif + * Remove a network interface from the list of lwIP netifs. + * + * @param netif the network interface to remove + */ +void +netif_remove(struct netif *netif) +{ +#if LWIP_IPV6 + int i; +#endif + + if (netif == NULL) { + return; + } + +#if LWIP_IPV4 + if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) { +#if LWIP_TCP + tcp_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); +#endif /* LWIP_TCP */ +#if LWIP_UDP + udp_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); +#endif /* LWIP_UDP */ +#if LWIP_RAW + raw_netif_ip_addr_changed(netif_ip_addr4(netif), NULL); +#endif /* LWIP_RAW */ + } + +#if LWIP_IGMP + /* stop IGMP processing */ + if (netif->flags & NETIF_FLAG_IGMP) { + igmp_stop(netif); + } +#endif /* LWIP_IGMP */ +#endif /* LWIP_IPV4*/ + +#if LWIP_IPV6 + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) { +#if LWIP_TCP + tcp_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); +#endif /* LWIP_TCP */ +#if LWIP_UDP + udp_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); +#endif /* LWIP_UDP */ +#if LWIP_RAW + raw_netif_ip_addr_changed(netif_ip_addr6(netif, i), NULL); +#endif /* LWIP_RAW */ + } + } +#if LWIP_IPV6_MLD + /* stop MLD processing */ + mld6_stop(netif); +#endif /* LWIP_IPV6_MLD */ +#endif /* LWIP_IPV6 */ + if (netif_is_up(netif)) { + /* set netif down before removing (call callback function) */ + netif_set_down(netif); + } + + mib2_remove_ip4(netif); + + /* this netif is default? */ + if (netif_default == netif) { + /* reset default netif */ + netif_set_default(NULL); + } + /* is it the first netif? */ + if (netif_list == netif) { + netif_list = netif->next; + } else { + /* look for netif further down the list */ + struct netif * tmp_netif; + for (tmp_netif = netif_list; tmp_netif != NULL; tmp_netif = tmp_netif->next) { + if (tmp_netif->next == netif) { + tmp_netif->next = netif->next; + break; + } + } + if (tmp_netif == NULL) { + return; /* netif is not on the list */ + } + } + mib2_netif_removed(netif); +#if LWIP_NETIF_REMOVE_CALLBACK + if (netif->remove_callback) { + netif->remove_callback(netif); + } +#endif /* LWIP_NETIF_REMOVE_CALLBACK */ + LWIP_DEBUGF( NETIF_DEBUG, ("netif_remove: removed netif\n") ); +} + +/** + * @ingroup netif + * Find a network interface by searching for its name + * + * @param name the name of the netif (like netif->name) plus concatenated number + * in ascii representation (e.g. 'en0') + */ +struct netif * +netif_find(const char *name) +{ + struct netif *netif; + u8_t num; + + if (name == NULL) { + return NULL; + } + + num = (u8_t)(name[2] - '0'); + + for (netif = netif_list; netif != NULL; netif = netif->next) { + if (num == netif->num && + name[0] == netif->name[0] && + name[1] == netif->name[1]) { + LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: found %c%c\n", name[0], name[1])); + return netif; + } + } + LWIP_DEBUGF(NETIF_DEBUG, ("netif_find: didn't find %c%c\n", name[0], name[1])); + return NULL; +} + +#if LWIP_IPV4 +/** + * @ingroup netif_ip4 + * Change the IP address of a network interface + * + * @param netif the network interface to change + * @param ipaddr the new IP address + * + * @note call netif_set_addr() if you also want to change netmask and + * default gateway + */ +void +netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) +{ + ip_addr_t new_addr; + *ip_2_ip4(&new_addr) = (ipaddr ? *ipaddr : *IP4_ADDR_ANY4); + IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); + + /* address is actually being changed? */ + if (ip4_addr_cmp(ip_2_ip4(&new_addr), netif_ip4_addr(netif)) == 0) { + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); +#if LWIP_TCP + tcp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); +#endif /* LWIP_TCP */ +#if LWIP_UDP + udp_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); +#endif /* LWIP_UDP */ +#if LWIP_RAW + raw_netif_ip_addr_changed(netif_ip_addr4(netif), &new_addr); +#endif /* LWIP_RAW */ + + mib2_remove_ip4(netif); + mib2_remove_route_ip4(0, netif); + /* set new IP address to netif */ + ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); + IP_SET_TYPE_VAL(netif->ip_addr, IPADDR_TYPE_V4); + mib2_add_ip4(netif); + mib2_add_route_ip4(0, netif); + + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); + + NETIF_STATUS_CALLBACK(netif); + } + + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IP address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + netif->name[0], netif->name[1], + ip4_addr1_16(netif_ip4_addr(netif)), + ip4_addr2_16(netif_ip4_addr(netif)), + ip4_addr3_16(netif_ip4_addr(netif)), + ip4_addr4_16(netif_ip4_addr(netif)))); +} + +/** + * @ingroup netif_ip4 + * Change the default gateway for a network interface + * + * @param netif the network interface to change + * @param gw the new default gateway + * + * @note call netif_set_addr() if you also want to change ip address and netmask + */ +void +netif_set_gw(struct netif *netif, const ip4_addr_t *gw) +{ + ip4_addr_set(ip_2_ip4(&netif->gw), gw); + IP_SET_TYPE_VAL(netif->gw, IPADDR_TYPE_V4); + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: GW address of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + 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)))); +} + +/** + * @ingroup netif_ip4 + * Change the netmask of a network interface + * + * @param netif the network interface to change + * @param netmask the new netmask + * + * @note call netif_set_addr() if you also want to change ip address and + * default gateway + */ +void +netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) +{ + mib2_remove_route_ip4(0, netif); + /* set new netmask to netif */ + ip4_addr_set(ip_2_ip4(&netif->netmask), netmask); + IP_SET_TYPE_VAL(netif->netmask, IPADDR_TYPE_V4); + mib2_add_route_ip4(0, netif); + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: netmask of interface %c%c set to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + 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)))); +} +#endif /* LWIP_IPV4 */ + +/** + * @ingroup netif + * Set a network interface as the default network interface + * (used to output all packets for which no specific route is found) + * + * @param netif the default network interface + */ +void +netif_set_default(struct netif *netif) +{ + if (netif == NULL) { + /* remove default route */ + mib2_remove_route_ip4(1, netif); + } else { + /* install default route */ + mib2_add_route_ip4(1, netif); + } + netif_default = netif; + LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", + netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); +} + +/** + * @ingroup netif + * Bring an interface up, available for processing + * traffic. + */ +void +netif_set_up(struct netif *netif) +{ + if (!(netif->flags & NETIF_FLAG_UP)) { + netif->flags |= NETIF_FLAG_UP; + + MIB2_COPY_SYSUPTIME_TO(&netif->ts); + + NETIF_STATUS_CALLBACK(netif); + + if (netif->flags & NETIF_FLAG_LINK_UP) { + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); + } + } +} + +/** Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change + */ +static void +netif_issue_reports(struct netif* netif, u8_t report_type) +{ +#if LWIP_IPV4 + if ((report_type & NETIF_REPORT_TYPE_IPV4) && + !ip4_addr_isany_val(*netif_ip4_addr(netif))) { +#if LWIP_ARP + /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ + if (netif->flags & (NETIF_FLAG_ETHARP)) { + etharp_gratuitous(netif); + } +#endif /* LWIP_ARP */ + +#if LWIP_IGMP + /* resend IGMP memberships */ + if (netif->flags & NETIF_FLAG_IGMP) { + igmp_report_groups(netif); + } +#endif /* LWIP_IGMP */ + } +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 + if (report_type & NETIF_REPORT_TYPE_IPV6) { +#if LWIP_IPV6_MLD + /* send mld memberships */ + mld6_report_groups(netif); +#endif /* LWIP_IPV6_MLD */ +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + /* Send Router Solicitation messages. */ + netif->rs_count = LWIP_ND6_MAX_MULTICAST_SOLICIT; +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ + } +#endif /* LWIP_IPV6 */ +} + +/** + * @ingroup netif + * Bring an interface down, disabling any traffic processing. + */ +void +netif_set_down(struct netif *netif) +{ + if (netif->flags & NETIF_FLAG_UP) { + netif->flags &= ~NETIF_FLAG_UP; + MIB2_COPY_SYSUPTIME_TO(&netif->ts); + +#if LWIP_IPV4 && LWIP_ARP + if (netif->flags & NETIF_FLAG_ETHARP) { + etharp_cleanup_netif(netif); + } +#endif /* LWIP_IPV4 && LWIP_ARP */ + +#if LWIP_IPV6 + nd6_cleanup_netif(netif); +#endif /* LWIP_IPV6 */ + + NETIF_STATUS_CALLBACK(netif); + } +} + +#if LWIP_NETIF_STATUS_CALLBACK +/** + * @ingroup netif + * Set callback to be called when interface is brought up/down or address is changed while up + */ +void +netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback) +{ + if (netif) { + netif->status_callback = status_callback; + } +} +#endif /* LWIP_NETIF_STATUS_CALLBACK */ + +#if LWIP_NETIF_REMOVE_CALLBACK +/** + * @ingroup netif + * Set callback to be called when the interface has been removed + */ +void +netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback) +{ + if (netif) { + netif->remove_callback = remove_callback; + } +} +#endif /* LWIP_NETIF_REMOVE_CALLBACK */ + +/** + * @ingroup netif + * Called by a driver when its link goes up + */ +void +netif_set_link_up(struct netif *netif) +{ + if (!(netif->flags & NETIF_FLAG_LINK_UP)) { + netif->flags |= NETIF_FLAG_LINK_UP; + +#if LWIP_DHCP + dhcp_network_changed(netif); +#endif /* LWIP_DHCP */ + +#if LWIP_AUTOIP + autoip_network_changed(netif); +#endif /* LWIP_AUTOIP */ + + if (netif->flags & NETIF_FLAG_UP) { + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4|NETIF_REPORT_TYPE_IPV6); + } + NETIF_LINK_CALLBACK(netif); + } +} + +/** + * @ingroup netif + * Called by a driver when its link goes down + */ +void +netif_set_link_down(struct netif *netif ) +{ + if (netif->flags & NETIF_FLAG_LINK_UP) { + netif->flags &= ~NETIF_FLAG_LINK_UP; + NETIF_LINK_CALLBACK(netif); + } +} + +#if LWIP_NETIF_LINK_CALLBACK +/** + * @ingroup netif + * Set callback to be called when link is brought up/down + */ +void +netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback) +{ + if (netif) { + netif->link_callback = link_callback; + } +} +#endif /* LWIP_NETIF_LINK_CALLBACK */ + +#if ENABLE_LOOPBACK +/** + * @ingroup netif + * Send an IP packet to be received on the same netif (loopif-like). + * The pbuf is simply copied and handed back to netif->input. + * In multithreaded mode, this is done directly since netif->input must put + * the packet on a queue. + * In callback mode, the packet is put on an internal queue and is fed to + * netif->input by netif_poll(). + * + * @param netif the lwip network interface structure + * @param p the (IP) packet to 'send' + * @return ERR_OK if the packet has been sent + * ERR_MEM if the pbuf used to copy the packet couldn't be allocated + */ +err_t +netif_loop_output(struct netif *netif, struct pbuf *p) +{ + struct pbuf *r; + err_t err; + struct pbuf *last; +#if LWIP_LOOPBACK_MAX_PBUFS + u16_t clen = 0; +#endif /* LWIP_LOOPBACK_MAX_PBUFS */ + /* If we have a loopif, SNMP counters are adjusted for it, + * if not they are adjusted for 'netif'. */ +#if MIB2_STATS +#if LWIP_HAVE_LOOPIF + struct netif *stats_if = &loop_netif; +#else /* LWIP_HAVE_LOOPIF */ + struct netif *stats_if = netif; +#endif /* LWIP_HAVE_LOOPIF */ +#endif /* MIB2_STATS */ + SYS_ARCH_DECL_PROTECT(lev); + + /* Allocate a new pbuf */ + r = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); + if (r == NULL) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(stats_if, ifoutdiscards); + return ERR_MEM; + } +#if LWIP_LOOPBACK_MAX_PBUFS + clen = pbuf_clen(r); + /* check for overflow or too many pbuf on queue */ + if (((netif->loop_cnt_current + clen) < netif->loop_cnt_current) || + ((netif->loop_cnt_current + clen) > LWIP_LOOPBACK_MAX_PBUFS)) { + pbuf_free(r); + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(stats_if, ifoutdiscards); + return ERR_MEM; + } + netif->loop_cnt_current += clen; +#endif /* LWIP_LOOPBACK_MAX_PBUFS */ + + /* Copy the whole pbuf queue p into the single pbuf r */ + if ((err = pbuf_copy(r, p)) != ERR_OK) { + pbuf_free(r); + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(stats_if, ifoutdiscards); + return err; + } + + /* Put the packet on a linked list which gets emptied through calling + netif_poll(). */ + + /* let last point to the last pbuf in chain r */ + for (last = r; last->next != NULL; last = last->next) { + /* nothing to do here, just get to the last pbuf */ + } + + SYS_ARCH_PROTECT(lev); + if (netif->loop_first != NULL) { + LWIP_ASSERT("if first != NULL, last must also be != NULL", netif->loop_last != NULL); + netif->loop_last->next = r; + netif->loop_last = last; + } else { + netif->loop_first = r; + netif->loop_last = last; + } + SYS_ARCH_UNPROTECT(lev); + + LINK_STATS_INC(link.xmit); + MIB2_STATS_NETIF_ADD(stats_if, ifoutoctets, p->tot_len); + MIB2_STATS_NETIF_INC(stats_if, ifoutucastpkts); + +#if LWIP_NETIF_LOOPBACK_MULTITHREADING + /* For multithreading environment, schedule a call to netif_poll */ + tcpip_callback_with_block((tcpip_callback_fn)netif_poll, netif, 0); +#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ + + return ERR_OK; +} + +#if LWIP_HAVE_LOOPIF +#if LWIP_IPV4 +static err_t +netif_loop_output_ipv4(struct netif *netif, struct pbuf *p, const ip4_addr_t* addr) +{ + LWIP_UNUSED_ARG(addr); + return netif_loop_output(netif, p); +} +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +static err_t +netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t* addr) +{ + LWIP_UNUSED_ARG(addr); + return netif_loop_output(netif, p); +} +#endif /* LWIP_IPV6 */ +#endif /* LWIP_HAVE_LOOPIF */ + + +/** + * Call netif_poll() in the main loop of your application. This is to prevent + * reentering non-reentrant functions like tcp_input(). Packets passed to + * netif_loop_output() are put on a list that is passed to netif->input() by + * netif_poll(). + */ +void +netif_poll(struct netif *netif) +{ + /* If we have a loopif, SNMP counters are adjusted for it, + * if not they are adjusted for 'netif'. */ +#if MIB2_STATS +#if LWIP_HAVE_LOOPIF + struct netif *stats_if = &loop_netif; +#else /* LWIP_HAVE_LOOPIF */ + struct netif *stats_if = netif; +#endif /* LWIP_HAVE_LOOPIF */ +#endif /* MIB2_STATS */ + SYS_ARCH_DECL_PROTECT(lev); + + /* Get a packet from the list. With SYS_LIGHTWEIGHT_PROT=1, this is protected */ + SYS_ARCH_PROTECT(lev); + while (netif->loop_first != NULL) { + struct pbuf *in, *in_end; +#if LWIP_LOOPBACK_MAX_PBUFS + u8_t clen = 1; +#endif /* LWIP_LOOPBACK_MAX_PBUFS */ + + in = in_end = netif->loop_first; + while (in_end->len != in_end->tot_len) { + LWIP_ASSERT("bogus pbuf: len != tot_len but next == NULL!", in_end->next != NULL); + in_end = in_end->next; +#if LWIP_LOOPBACK_MAX_PBUFS + clen++; +#endif /* LWIP_LOOPBACK_MAX_PBUFS */ + } +#if LWIP_LOOPBACK_MAX_PBUFS + /* adjust the number of pbufs on queue */ + LWIP_ASSERT("netif->loop_cnt_current underflow", + ((netif->loop_cnt_current - clen) < netif->loop_cnt_current)); + netif->loop_cnt_current -= clen; +#endif /* LWIP_LOOPBACK_MAX_PBUFS */ + + /* 'in_end' now points to the last pbuf from 'in' */ + if (in_end == netif->loop_last) { + /* this was the last pbuf in the list */ + netif->loop_first = netif->loop_last = NULL; + } else { + /* pop the pbuf off the list */ + netif->loop_first = in_end->next; + LWIP_ASSERT("should not be null since first != last!", netif->loop_first != NULL); + } + /* De-queue the pbuf from its successors on the 'loop_' list. */ + in_end->next = NULL; + SYS_ARCH_UNPROTECT(lev); + + LINK_STATS_INC(link.recv); + MIB2_STATS_NETIF_ADD(stats_if, ifinoctets, in->tot_len); + MIB2_STATS_NETIF_INC(stats_if, ifinucastpkts); + /* loopback packets are always IP packets! */ + if (ip_input(in, netif) != ERR_OK) { + pbuf_free(in); + } + SYS_ARCH_PROTECT(lev); + } + SYS_ARCH_UNPROTECT(lev); +} + +#if !LWIP_NETIF_LOOPBACK_MULTITHREADING +/** + * Calls netif_poll() for every netif on the netif_list. + */ +void +netif_poll_all(void) +{ + struct netif *netif = netif_list; + /* loop through netifs */ + while (netif != NULL) { + netif_poll(netif); + /* proceed to next network interface */ + netif = netif->next; + } +} +#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */ +#endif /* ENABLE_LOOPBACK */ + +#if LWIP_NUM_NETIF_CLIENT_DATA > 0 +/** + * @ingroup netif_cd + * Allocate an index to store data in client_data member of struct netif. + * Returned value is an index in mentioned array. + * @see LWIP_NUM_NETIF_CLIENT_DATA + */ +u8_t +netif_alloc_client_data_id(void) +{ + u8_t result = netif_client_id; + netif_client_id++; + + LWIP_ASSERT("Increase LWIP_NUM_NETIF_CLIENT_DATA in lwipopts.h", result < LWIP_NUM_NETIF_CLIENT_DATA); + return result + LWIP_NETIF_CLIENT_DATA_INDEX_MAX; +} +#endif + +#if LWIP_IPV6 +/** + * @ingroup netif_ip6 + * Change an IPv6 address of a network interface + * + * @param netif the network interface to change + * @param addr_idx index of the IPv6 address + * @param addr6 the new IPv6 address + * + * @note call netif_ip6_addr_set_state() to set the address valid/temptative + */ +void +netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6) +{ + LWIP_ASSERT("addr6 != NULL", addr6 != NULL); + netif_ip6_addr_set_parts(netif, addr_idx, addr6->addr[0], addr6->addr[1], + addr6->addr[2], addr6->addr[3]); +} + +/* + * Change an IPv6 address of a network interface (internal version taking 4 * u32_t) + * + * @param netif the network interface to change + * @param addr_idx index of the IPv6 address + * @param i0 word0 of the new IPv6 address + * @param i1 word1 of the new IPv6 address + * @param i2 word2 of the new IPv6 address + * @param i3 word3 of the new IPv6 address + */ +void +netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3) +{ + const ip6_addr_t *old_addr; + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES); + + old_addr = netif_ip6_addr(netif, addr_idx); + /* address is actually being changed? */ + if ((old_addr->addr[0] != i0) || (old_addr->addr[1] != i1) || + (old_addr->addr[2] != i2) || (old_addr->addr[3] != i3)) { + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_ip6_addr_set: netif address being changed\n")); + + if (netif_ip6_addr_state(netif, addr_idx) & IP6_ADDR_VALID) { +#if LWIP_TCP || LWIP_UDP + ip_addr_t new_ipaddr; + IP_ADDR6(&new_ipaddr, i0, i1, i2, i3); +#endif /* LWIP_TCP || LWIP_UDP */ +#if LWIP_TCP + tcp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); +#endif /* LWIP_TCP */ +#if LWIP_UDP + udp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); +#endif /* LWIP_UDP */ +#if LWIP_RAW + raw_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), &new_ipaddr); +#endif /* LWIP_RAW */ + } + /* @todo: remove/readd mib2 ip6 entries? */ + + IP6_ADDR(ip_2_ip6(&(netif->ip6_addr[addr_idx])), i0, i1, i2, i3); + IP_SET_TYPE_VAL(netif->ip6_addr[addr_idx], IPADDR_TYPE_V6); + + if (netif_ip6_addr_state(netif, addr_idx) & IP6_ADDR_VALID) { + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6); + NETIF_STATUS_CALLBACK(netif); + } + } + + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n", + addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), + netif_ip6_addr_state(netif, addr_idx))); +} + +/** + * @ingroup netif_ip6 + * Change the state of an IPv6 address of a network interface + * (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE + * includes the number of checks done, see ip6_addr.h) + * + * @param netif the network interface to change + * @param addr_idx index of the IPv6 address + * @param state the new IPv6 address state + */ +void +netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state) +{ + u8_t old_state; + LWIP_ASSERT("netif != NULL", netif != NULL); + LWIP_ASSERT("invalid index", addr_idx < LWIP_IPV6_NUM_ADDRESSES); + + old_state = netif_ip6_addr_state(netif, addr_idx); + /* state is actually being changed? */ + if (old_state != state) { + u8_t old_valid = old_state & IP6_ADDR_VALID; + u8_t new_valid = state & IP6_ADDR_VALID; + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_ip6_addr_set_state: netif address state being changed\n")); + +#if LWIP_IPV6_MLD + /* Reevaluate solicited-node multicast group membership. */ + if (netif->flags & NETIF_FLAG_MLD6) { + nd6_adjust_mld_membership(netif, addr_idx, state); + } +#endif /* LWIP_IPV6_MLD */ + + if (old_valid && !new_valid) { + /* address about to be removed by setting invalid */ +#if LWIP_TCP + tcp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); +#endif /* LWIP_TCP */ +#if LWIP_UDP + udp_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); +#endif /* LWIP_UDP */ +#if LWIP_RAW + raw_netif_ip_addr_changed(netif_ip_addr6(netif, addr_idx), NULL); +#endif /* LWIP_RAW */ + /* @todo: remove mib2 ip6 entries? */ + } + netif->ip6_addr_state[addr_idx] = state; + + if (!old_valid && new_valid) { + /* address added by setting valid */ + /* @todo: add mib2 ip6 entries? */ + netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6); + } + if ((old_state & IP6_ADDR_PREFERRED) != (state & IP6_ADDR_PREFERRED)) { + /* address state has changed (valid flag changed or switched between + preferred and deprecated) -> call the callback function */ + NETIF_STATUS_CALLBACK(netif); + } + } + + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n", + addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)), + netif_ip6_addr_state(netif, addr_idx))); +} + +/** + * Checks if a specific address is assigned to the netif and returns its + * index. + * + * @param netif the netif to check + * @param ip6addr the IPv6 address to find + * @return >= 0: address found, this is its index + * -1: address not found on this netif + */ +s8_t +netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr) +{ + s8_t i; + for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (!ip6_addr_isinvalid(netif_ip6_addr_state(netif, i)) && + ip6_addr_cmp(netif_ip6_addr(netif, i), ip6addr)) { + return i; + } + } + return -1; +} + +/** + * @ingroup netif_ip6 + * Create a link-local IPv6 address on a netif (stored in slot 0) + * + * @param netif the netif to create the address on + * @param from_mac_48bit if != 0, assume hwadr is a 48-bit MAC address (std conversion) + * if == 0, use hwaddr directly as interface ID + */ +void +netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit) +{ + u8_t i, addr_index; + + /* Link-local prefix. */ + ip_2_ip6(&netif->ip6_addr[0])->addr[0] = PP_HTONL(0xfe800000ul); + ip_2_ip6(&netif->ip6_addr[0])->addr[1] = 0; + + /* Generate interface ID. */ + if (from_mac_48bit) { + /* Assume hwaddr is a 48-bit IEEE 802 MAC. Convert to EUI-64 address. Complement Group bit. */ + ip_2_ip6(&netif->ip6_addr[0])->addr[2] = lwip_htonl((((u32_t)(netif->hwaddr[0] ^ 0x02)) << 24) | + ((u32_t)(netif->hwaddr[1]) << 16) | + ((u32_t)(netif->hwaddr[2]) << 8) | + (0xff)); + ip_2_ip6(&netif->ip6_addr[0])->addr[3] = lwip_htonl((0xfeul << 24) | + ((u32_t)(netif->hwaddr[3]) << 16) | + ((u32_t)(netif->hwaddr[4]) << 8) | + (netif->hwaddr[5])); + } else { + /* Use hwaddr directly as interface ID. */ + ip_2_ip6(&netif->ip6_addr[0])->addr[2] = 0; + ip_2_ip6(&netif->ip6_addr[0])->addr[3] = 0; + + addr_index = 3; + for (i = 0; (i < 8) && (i < netif->hwaddr_len); i++) { + if (i == 4) { + addr_index--; + } + ip_2_ip6(&netif->ip6_addr[0])->addr[addr_index] |= ((u32_t)(netif->hwaddr[netif->hwaddr_len - i - 1])) << (8 * (i & 0x03)); + } + } + + /* Set address state. */ +#if LWIP_IPV6_DUP_DETECT_ATTEMPTS + /* Will perform duplicate address detection (DAD). */ + netif_ip6_addr_set_state(netif, 0, IP6_ADDR_TENTATIVE); +#else + /* Consider address valid. */ + netif_ip6_addr_set_state(netif, 0, IP6_ADDR_PREFERRED); +#endif /* LWIP_IPV6_AUTOCONFIG */ +} + +/** + * @ingroup netif_ip6 + * This function allows for the easy addition of a new IPv6 address to an interface. + * It takes care of finding an empty slot and then sets the address tentative + * (to make sure that all the subsequent processing happens). + * + * @param netif netif to add the address on + * @param ip6addr address to add + * @param chosen_idx if != NULL, the chosen IPv6 address index will be stored here + */ +err_t +netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx) +{ + s8_t i; + + i = netif_get_ip6_addr_match(netif, ip6addr); + if (i >= 0) { + /* Address already added */ + if (chosen_idx != NULL) { + *chosen_idx = i; + } + return ERR_OK; + } + + /* Find a free slot -- musn't be the first one (reserved for link local) */ + for (i = 1; i < LWIP_IPV6_NUM_ADDRESSES; i++) { + if (ip6_addr_isinvalid(netif_ip6_addr_state(netif, i))) { + ip_addr_copy_from_ip6(netif->ip6_addr[i], *ip6addr); + netif_ip6_addr_set_state(netif, i, IP6_ADDR_TENTATIVE); + if (chosen_idx != NULL) { + *chosen_idx = i; + } + return ERR_OK; + } + } + + if (chosen_idx != NULL) { + *chosen_idx = -1; + } + return ERR_VAL; +} + +/** Dummy IPv6 output function for netifs not supporting IPv6 + */ +static err_t +netif_null_output_ip6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr) +{ + LWIP_UNUSED_ARG(netif); + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(ipaddr); + + return ERR_IF; +} +#endif /* LWIP_IPV6 */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/pbuf.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/pbuf.c index 059f83a..95e762f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/pbuf.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/pbuf.c @@ -1,1442 +1,1442 @@ -/** - * @file - * Packet buffer management - */ - -/** - * @defgroup pbuf Packet buffers (PBUF) - * @ingroup infrastructure - * - * Packets are built from the pbuf data structure. It supports dynamic - * memory allocation for packet contents or can reference externally - * managed packet contents both in RAM and ROM. Quick allocation for - * incoming packets is provided through pools with fixed sized pbufs. - * - * A packet may span over multiple pbufs, chained as a singly linked - * list. This is called a "pbuf chain". - * - * Multiple packets may be queued, also using this singly linked list. - * This is called a "packet queue". - * - * So, a packet queue consists of one or more pbuf chains, each of - * which consist of one or more pbufs. CURRENTLY, PACKET QUEUES ARE - * NOT SUPPORTED!!! Use helper structs to queue multiple packets. - * - * The differences between a pbuf chain and a packet queue are very - * precise but subtle. - * - * The last pbuf of a packet has a ->tot_len field that equals the - * ->len field. It can be found by traversing the list. If the last - * pbuf of a packet has a ->next field other than NULL, more packets - * are on the queue. - * - * Therefore, looping through a pbuf of a single packet, has an - * loop end condition (tot_len == p->len), NOT (next == NULL). - * - * Example of custom pbuf usage for zero-copy RX: - @code{.c} -typedef struct my_custom_pbuf -{ - struct pbuf_custom p; - void* dma_descriptor; -} my_custom_pbuf_t; - -LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(my_custom_pbuf_t), "Zero-copy RX PBUF pool"); - -void my_pbuf_free_custom(void* p) -{ - my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p; - - LOCK_INTERRUPTS(); - free_rx_dma_descriptor(my_pbuf->dma_descriptor); - LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf); - UNLOCK_INTERRUPTS(); -} - -void eth_rx_irq() -{ - dma_descriptor* dma_desc = get_RX_DMA_descriptor_from_ethernet(); - my_custom_pbuf_t* my_pbuf = (my_custom_pbuf_t*)LWIP_MEMPOOL_ALLOC(RX_POOL); - - my_pbuf->p.custom_free_function = my_pbuf_free_custom; - my_pbuf->dma_descriptor = dma_desc; - - invalidate_cpu_cache(dma_desc->rx_data, dma_desc->rx_length); - - struct pbuf* p = pbuf_alloced_custom(PBUF_RAW, - dma_desc->rx_length, - PBUF_REF, - &my_pbuf->p, - dma_desc->rx_data, - dma_desc->max_buffer_size); - - if(netif->input(p, netif) != ERR_OK) { - pbuf_free(p); - } -} - @endcode - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#include "lwip/stats.h" -#include "lwip/def.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/pbuf.h" -#include "lwip/sys.h" -#if LWIP_TCP && TCP_QUEUE_OOSEQ -#include "lwip/priv/tcp_priv.h" -#endif -#if LWIP_CHECKSUM_ON_COPY -#include "lwip/inet_chksum.h" -#endif - -#include - -#define SIZEOF_STRUCT_PBUF LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf)) -/* Since the pool is created in memp, PBUF_POOL_BUFSIZE will be automatically - aligned there. Therefore, PBUF_POOL_BUFSIZE_ALIGNED can be used here. */ -#define PBUF_POOL_BUFSIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(PBUF_POOL_BUFSIZE) - -#if !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ -#define PBUF_POOL_IS_EMPTY() -#else /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ - -#if !NO_SYS -#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL -#include "lwip/tcpip.h" -#define PBUF_POOL_FREE_OOSEQ_QUEUE_CALL() do { \ - if (tcpip_callback_with_block(pbuf_free_ooseq_callback, NULL, 0) != ERR_OK) { \ - SYS_ARCH_PROTECT(old_level); \ - pbuf_free_ooseq_pending = 0; \ - SYS_ARCH_UNPROTECT(old_level); \ - } } while(0) -#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ -#endif /* !NO_SYS */ - -volatile u8_t pbuf_free_ooseq_pending; -#define PBUF_POOL_IS_EMPTY() pbuf_pool_is_empty() - -/** - * Attempt to reclaim some memory from queued out-of-sequence TCP segments - * if we run out of pool pbufs. It's better to give priority to new packets - * if we're running out. - * - * This must be done in the correct thread context therefore this function - * can only be used with NO_SYS=0 and through tcpip_callback. - */ -#if !NO_SYS -static -#endif /* !NO_SYS */ -void -pbuf_free_ooseq(void) -{ - struct tcp_pcb* pcb; - SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); - - for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { - if (NULL != pcb->ooseq) { - /** Free the ooseq pbufs of one PCB only */ - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free_ooseq: freeing out-of-sequence pbufs\n")); - tcp_segs_free(pcb->ooseq); - pcb->ooseq = NULL; - return; - } - } -} - -#if !NO_SYS -/** - * Just a callback function for tcpip_callback() that calls pbuf_free_ooseq(). - */ -static void -pbuf_free_ooseq_callback(void *arg) -{ - LWIP_UNUSED_ARG(arg); - pbuf_free_ooseq(); -} -#endif /* !NO_SYS */ - -/** Queue a call to pbuf_free_ooseq if not already queued. */ -static void -pbuf_pool_is_empty(void) -{ -#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL - SYS_ARCH_SET(pbuf_free_ooseq_pending, 1); -#else /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ - u8_t queued; - SYS_ARCH_DECL_PROTECT(old_level); - SYS_ARCH_PROTECT(old_level); - queued = pbuf_free_ooseq_pending; - pbuf_free_ooseq_pending = 1; - SYS_ARCH_UNPROTECT(old_level); - - if (!queued) { - /* queue a call to pbuf_free_ooseq if not already queued */ - PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); - } -#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ -} -#endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ - -/** - * @ingroup pbuf - * Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type). - * - * The actual memory allocated for the pbuf is determined by the - * layer at which the pbuf is allocated and the requested size - * (from the size parameter). - * - * @param layer flag to define header size - * @param length size of the pbuf's payload - * @param type this parameter decides how and where the pbuf - * should be allocated as follows: - * - * - PBUF_RAM: buffer memory for pbuf is allocated as one large - * chunk. This includes protocol headers as well. - * - PBUF_ROM: no buffer memory is allocated for the pbuf, even for - * protocol headers. Additional headers must be prepended - * by allocating another pbuf and chain in to the front of - * the ROM pbuf. It is assumed that the memory used is really - * similar to ROM in that it is immutable and will not be - * changed. Memory which is dynamic should generally not - * be attached to PBUF_ROM pbufs. Use PBUF_REF instead. - * - PBUF_REF: no buffer memory is allocated for the pbuf, even for - * protocol headers. It is assumed that the pbuf is only - * being used in a single thread. If the pbuf gets queued, - * then pbuf_take should be called to copy the buffer. - * - PBUF_POOL: the pbuf is allocated as a pbuf chain, with pbufs from - * the pbuf pool that is allocated during pbuf_init(). - * - * @return the allocated pbuf. If multiple pbufs where allocated, this - * is the first pbuf of a pbuf chain. - */ -struct pbuf * -pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) -{ - struct pbuf *p, *q, *r; - u16_t offset; - s32_t rem_len; /* remaining length */ - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); - - /* determine header offset */ - switch (layer) { - case PBUF_TRANSPORT: - /* add room for transport (often TCP) layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; - break; - case PBUF_IP: - /* add room for IP layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; - break; - case PBUF_LINK: - /* add room for link layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; - break; - case PBUF_RAW_TX: - /* add room for encapsulating link layer headers (e.g. 802.11) */ - offset = PBUF_LINK_ENCAPSULATION_HLEN; - break; - case PBUF_RAW: - /* no offset (e.g. RX buffers or chain successors) */ - offset = 0; - break; - default: - LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); - return NULL; - } - - switch (type) { - case PBUF_POOL: - /* allocate head of pbuf chain into p */ - p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); - if (p == NULL) { - PBUF_POOL_IS_EMPTY(); - return NULL; - } - p->type = type; - p->next = NULL; - - /* make the payload pointer point 'offset' bytes into pbuf data memory */ - p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); - LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", - ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); - /* the total length of the pbuf chain is the requested size */ - p->tot_len = length; - /* set the length of the first pbuf in the chain */ - p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); - LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", - ((u8_t*)p->payload + p->len <= - (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); - LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", - (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); - /* set reference count (needed here in case we fail) */ - p->ref = 1; - - /* now allocate the tail of the pbuf chain */ - - /* remember first pbuf for linkage in next iteration */ - r = p; - /* remaining length to be allocated */ - rem_len = length - p->len; - /* any remaining pbufs to be allocated? */ - while (rem_len > 0) { - q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); - if (q == NULL) { - PBUF_POOL_IS_EMPTY(); - /* free chain so far allocated */ - pbuf_free(p); - /* bail out unsuccessfully */ - return NULL; - } - q->type = type; - q->flags = 0; - q->next = NULL; - /* make previous pbuf point to this pbuf */ - r->next = q; - /* set total length of this pbuf and next in chain */ - LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); - q->tot_len = (u16_t)rem_len; - /* this pbuf length is pool size, unless smaller sized tail */ - q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); - q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); - LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", - ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); - LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", - ((u8_t*)p->payload + p->len <= - (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); - q->ref = 1; - /* calculate remaining length to be allocated */ - rem_len -= q->len; - /* remember this pbuf for linkage in next iteration */ - r = q; - } - /* end of chain */ - /*r->next = NULL;*/ - - break; - case PBUF_RAM: - { - mem_size_t alloc_len = LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length); - - /* bug #50040: Check for integer overflow when calculating alloc_len */ - if (alloc_len < LWIP_MEM_ALIGN_SIZE(length)) { - return NULL; - } - - /* If pbuf is to be allocated in RAM, allocate memory for it. */ - p = (struct pbuf*)mem_malloc(alloc_len); - } - - if (p == NULL) { - return NULL; - } - /* Set up internal structure of the pbuf. */ - p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); - p->len = p->tot_len = length; - p->next = NULL; - p->type = type; - - LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", - ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); - break; - /* pbuf references existing (non-volatile static constant) ROM payload? */ - case PBUF_ROM: - /* pbuf references existing (externally allocated) RAM payload? */ - case PBUF_REF: - /* only allocate memory for the pbuf structure */ - p = (struct pbuf *)memp_malloc(MEMP_PBUF); - if (p == NULL) { - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", - (type == PBUF_ROM) ? "ROM" : "REF")); - return NULL; - } - /* caller must set this field properly, afterwards */ - p->payload = NULL; - p->len = p->tot_len = length; - p->next = NULL; - p->type = type; - break; - default: - LWIP_ASSERT("pbuf_alloc: erroneous type", 0); - return NULL; - } - /* set reference count */ - p->ref = 1; - /* set flags */ - p->flags = 0; - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); - return p; -} - -#if LWIP_SUPPORT_CUSTOM_PBUF -/** - * @ingroup pbuf - * Initialize a custom pbuf (already allocated). - * - * @param l flag to define header size - * @param length size of the pbuf's payload - * @param type type of the pbuf (only used to treat the pbuf accordingly, as - * this function allocates no memory) - * @param p pointer to the custom pbuf to initialize (already allocated) - * @param payload_mem pointer to the buffer that is used for payload and headers, - * must be at least big enough to hold 'length' plus the header size, - * may be NULL if set later. - * ATTENTION: The caller is responsible for correct alignment of this buffer!! - * @param payload_mem_len the size of the 'payload_mem' buffer, must be at least - * big enough to hold 'length' plus the header size - */ -struct pbuf* -pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, - void *payload_mem, u16_t payload_mem_len) -{ - u16_t offset; - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length)); - - /* determine header offset */ - switch (l) { - case PBUF_TRANSPORT: - /* add room for transport (often TCP) layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; - break; - case PBUF_IP: - /* add room for IP layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; - break; - case PBUF_LINK: - /* add room for link layer header */ - offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; - break; - case PBUF_RAW_TX: - /* add room for encapsulating link layer headers (e.g. 802.11) */ - offset = PBUF_LINK_ENCAPSULATION_HLEN; - break; - case PBUF_RAW: - offset = 0; - break; - default: - LWIP_ASSERT("pbuf_alloced_custom: bad pbuf layer", 0); - return NULL; - } - - if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) { - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); - return NULL; - } - - p->pbuf.next = NULL; - if (payload_mem != NULL) { - p->pbuf.payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); - } else { - p->pbuf.payload = NULL; - } - p->pbuf.flags = PBUF_FLAG_IS_CUSTOM; - p->pbuf.len = p->pbuf.tot_len = length; - p->pbuf.type = type; - p->pbuf.ref = 1; - return &p->pbuf; -} -#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ - -/** - * @ingroup pbuf - * Shrink a pbuf chain to a desired length. - * - * @param p pbuf to shrink. - * @param new_len desired new length of pbuf chain - * - * Depending on the desired length, the first few pbufs in a chain might - * be skipped and left unchanged. The new last pbuf in the chain will be - * resized, and any remaining pbufs will be freed. - * - * @note If the pbuf is ROM/REF, only the ->tot_len and ->len fields are adjusted. - * @note May not be called on a packet queue. - * - * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). - */ -void -pbuf_realloc(struct pbuf *p, u16_t new_len) -{ - struct pbuf *q; - u16_t rem_len; /* remaining length */ - s32_t grow; - - LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL); - LWIP_ASSERT("pbuf_realloc: sane p->type", p->type == PBUF_POOL || - p->type == PBUF_ROM || - p->type == PBUF_RAM || - p->type == PBUF_REF); - - /* desired length larger than current length? */ - if (new_len >= p->tot_len) { - /* enlarging not yet supported */ - return; - } - - /* the pbuf chain grows by (new_len - p->tot_len) bytes - * (which may be negative in case of shrinking) */ - grow = new_len - p->tot_len; - - /* first, step over any pbufs that should remain in the chain */ - rem_len = new_len; - q = p; - /* should this pbuf be kept? */ - while (rem_len > q->len) { - /* decrease remaining length by pbuf length */ - rem_len -= q->len; - /* decrease total length indicator */ - LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); - q->tot_len += (u16_t)grow; - /* proceed to next pbuf in chain */ - q = q->next; - LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); - } - /* we have now reached the new last pbuf (in q) */ - /* rem_len == desired length for pbuf q */ - - /* shrink allocated memory for PBUF_RAM */ - /* (other types merely adjust their length fields */ - if ((q->type == PBUF_RAM) && (rem_len != q->len) -#if LWIP_SUPPORT_CUSTOM_PBUF - && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) -#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ - ) { - /* reallocate and adjust the length of the pbuf that will be split */ - q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); - LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); - } - /* adjust length fields for new last pbuf */ - q->len = rem_len; - q->tot_len = q->len; - - /* any remaining pbufs in chain? */ - if (q->next != NULL) { - /* free remaining pbufs in chain */ - pbuf_free(q->next); - } - /* q is last packet in chain */ - q->next = NULL; - -} - -/** - * Adjusts the payload pointer to hide or reveal headers in the payload. - * @see pbuf_header. - * - * @param p pbuf to change the header size. - * @param header_size_increment Number of bytes to increment header size. - * @param force Allow 'header_size_increment > 0' for PBUF_REF/PBUF_ROM types - * - * @return non-zero on failure, zero on success. - * - */ -static u8_t -pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) -{ - u16_t type; - void *payload; - u16_t increment_magnitude; - - LWIP_ASSERT("p != NULL", p != NULL); - if ((header_size_increment == 0) || (p == NULL)) { - return 0; - } - - if (header_size_increment < 0) { - increment_magnitude = (u16_t)-header_size_increment; - /* 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;); - } else { - increment_magnitude = (u16_t)header_size_increment; -#if 0 - /* Can't assert these as some callers speculatively call - pbuf_header() to see if it's OK. Will return 1 below instead. */ - /* Check that we've got the correct type of pbuf to work with */ - LWIP_ASSERT("p->type == PBUF_RAM || p->type == PBUF_POOL", - p->type == PBUF_RAM || p->type == PBUF_POOL); - /* Check that we aren't going to move off the beginning of the pbuf */ - LWIP_ASSERT("p->payload - increment_magnitude >= p + SIZEOF_STRUCT_PBUF", - (u8_t *)p->payload - increment_magnitude >= (u8_t *)p + SIZEOF_STRUCT_PBUF); -#endif - } - - type = p->type; - /* remember current payload pointer */ - payload = p->payload; - - /* pbuf types containing payloads? */ - if (type == PBUF_RAM || type == PBUF_POOL) { - /* set new payload pointer */ - p->payload = (u8_t *)p->payload - header_size_increment; - /* boundary check fails? */ - if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { - LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, - ("pbuf_header: failed as %p < %p (not enough space for new header size)\n", - (void *)p->payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF))); - /* restore old payload pointer */ - p->payload = payload; - /* bail out unsuccessfully */ - return 1; - } - /* pbuf types referring to external payloads? */ - } else if (type == PBUF_REF || type == PBUF_ROM) { - /* hide a header in the payload? */ - if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { - /* increase payload pointer */ - p->payload = (u8_t *)p->payload - header_size_increment; - } else if ((header_size_increment > 0) && force) { - p->payload = (u8_t *)p->payload - header_size_increment; - } else { - /* cannot expand payload to front (yet!) - * bail out unsuccessfully */ - return 1; - } - } else { - /* Unknown type */ - LWIP_ASSERT("bad pbuf type", 0); - return 1; - } - /* modify pbuf length fields */ - p->len += header_size_increment; - p->tot_len += header_size_increment; - - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", - (void *)payload, (void *)p->payload, header_size_increment)); - - return 0; -} - -/** - * Adjusts the payload pointer to hide or reveal headers in the payload. - * - * Adjusts the ->payload pointer so that space for a header - * (dis)appears in the pbuf payload. - * - * The ->payload, ->tot_len and ->len fields are adjusted. - * - * @param p pbuf to change the header size. - * @param header_size_increment Number of bytes to increment header size which - * increases the size of the pbuf. New space is on the front. - * (Using a negative value decreases the header size.) - * If hdr_size_inc is 0, this function does nothing and returns successful. - * - * PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so - * the call will fail. A check is made that the increase in header size does - * not move the payload pointer in front of the start of the buffer. - * @return non-zero on failure, zero on success. - * - */ -u8_t -pbuf_header(struct pbuf *p, s16_t header_size_increment) -{ - return pbuf_header_impl(p, header_size_increment, 0); -} - -/** - * 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) -{ - return pbuf_header_impl(p, header_size_increment, 1); -} - -/** - * @ingroup pbuf - * Dereference a pbuf chain or queue and deallocate any no-longer-used - * pbufs at the head of this chain or queue. - * - * Decrements the pbuf reference count. If it reaches zero, the pbuf is - * deallocated. - * - * For a pbuf chain, this is repeated for each pbuf in the chain, - * up to the first pbuf which has a non-zero reference count after - * decrementing. So, when all reference counts are one, the whole - * chain is free'd. - * - * @param p The pbuf (chain) to be dereferenced. - * - * @return the number of pbufs that were de-allocated - * from the head of the chain. - * - * @note MUST NOT be called on a packet queue (Not verified to work yet). - * @note the reference counter of a pbuf equals the number of pointers - * that refer to the pbuf (or into the pbuf). - * - * @internal examples: - * - * Assuming existing chains a->b->c with the following reference - * counts, calling pbuf_free(a) results in: - * - * 1->2->3 becomes ...1->3 - * 3->3->3 becomes 2->3->3 - * 1->1->2 becomes ......1 - * 2->1->1 becomes 1->1->1 - * 1->1->1 becomes ....... - * - */ -u8_t -pbuf_free(struct pbuf *p) -{ - u16_t type; - struct pbuf *q; - u8_t count; - - if (p == NULL) { - LWIP_ASSERT("p != NULL", p != NULL); - /* if assertions are disabled, proceed with debug output */ - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("pbuf_free(p == NULL) was called.\n")); - return 0; - } - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); - - PERF_START; - - LWIP_ASSERT("pbuf_free: sane type", - p->type == PBUF_RAM || p->type == PBUF_ROM || - p->type == PBUF_REF || p->type == PBUF_POOL); - - count = 0; - /* de-allocate all consecutive pbufs from the head of the chain that - * obtain a zero reference count after decrementing*/ - while (p != NULL) { - u16_t ref; - SYS_ARCH_DECL_PROTECT(old_level); - /* Since decrementing ref cannot be guaranteed to be a single machine operation - * we must protect it. We put the new ref into a local variable to prevent - * further protection. */ - SYS_ARCH_PROTECT(old_level); - /* all pbufs in a chain are referenced at least once */ - LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); - /* decrease reference count (number of pointers to pbuf) */ - ref = --(p->ref); - SYS_ARCH_UNPROTECT(old_level); - /* this pbuf is no longer referenced to? */ - if (ref == 0) { - /* remember next pbuf in chain for next iteration */ - q = p->next; - LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p)); - type = p->type; -#if LWIP_SUPPORT_CUSTOM_PBUF - /* is this a custom pbuf? */ - if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { - struct pbuf_custom *pc = (struct pbuf_custom*)p; - LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); - pc->custom_free_function(p); - } else -#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ - { - /* is this a pbuf from the pool? */ - if (type == PBUF_POOL) { - memp_free(MEMP_PBUF_POOL, p); - /* is this a ROM or RAM referencing pbuf? */ - } else if (type == PBUF_ROM || type == PBUF_REF) { - memp_free(MEMP_PBUF, p); - /* type == PBUF_RAM */ - } else { - mem_free(p); - } - } - count++; - /* proceed to next pbuf */ - p = q; - /* p->ref > 0, this pbuf is still referenced to */ - /* (and so the remaining pbufs in chain as well) */ - } else { - LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, ref)); - /* stop walking through the chain */ - p = NULL; - } - } - PERF_STOP("pbuf_free"); - /* return number of de-allocated pbufs */ - return count; -} - -/** - * Count number of pbufs in a chain - * - * @param p first pbuf of chain - * @return the number of pbufs in a chain - */ -u16_t -pbuf_clen(const struct pbuf *p) -{ - u16_t len; - - len = 0; - while (p != NULL) { - ++len; - p = p->next; - } - return len; -} - -/** - * @ingroup pbuf - * Increment the reference count of the pbuf. - * - * @param p pbuf to increase reference counter of - * - */ -void -pbuf_ref(struct pbuf *p) -{ - /* pbuf given? */ - if (p != NULL) { - SYS_ARCH_INC(p->ref, 1); - LWIP_ASSERT("pbuf ref overflow", p->ref > 0); - } -} - -/** - * @ingroup pbuf - * Concatenate two pbufs (each may be a pbuf chain) and take over - * the caller's reference of the tail pbuf. - * - * @note The caller MAY NOT reference the tail pbuf afterwards. - * Use pbuf_chain() for that purpose. - * - * @see pbuf_chain() - */ -void -pbuf_cat(struct pbuf *h, struct pbuf *t) -{ - struct pbuf *p; - - LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", - ((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 += t->tot_len; - } - /* { 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); - LWIP_ASSERT("p->next == NULL", p->next == NULL); - /* add total length of second chain to last pbuf total of first chain */ - p->tot_len += t->tot_len; - /* chain last pbuf of head (p) with first of tail (t) */ - p->next = t; - /* 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. - */ -} - -/** - * @ingroup pbuf - * Chain two pbufs (or pbuf chains) together. - * - * The caller MUST call pbuf_free(t) once it has stopped - * using it. Use pbuf_cat() instead if you no longer use t. - * - * @param h head pbuf (chain) - * @param t tail pbuf (chain) - * @note The pbufs MUST belong to the same packet. - * @note MAY NOT be called on a packet queue. - * - * The ->tot_len fields of all pbufs of the head chain are adjusted. - * The ->next field of the last pbuf of the head chain is adjusted. - * The ->ref field of the first pbuf of the tail chain is adjusted. - * - */ -void -pbuf_chain(struct pbuf *h, struct pbuf *t) -{ - pbuf_cat(h, t); - /* t is now referenced by h */ - pbuf_ref(t); - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); -} - -/** - * Dechains the first pbuf from its succeeding pbufs in the chain. - * - * Makes p->tot_len field equal to p->len. - * @param p pbuf to dechain - * @return remainder of the pbuf chain, or NULL if it was de-allocated. - * @note May not be called on a packet queue. - */ -struct pbuf * -pbuf_dechain(struct pbuf *p) -{ - struct pbuf *q; - u8_t tail_gone = 1; - /* tail */ - q = p->next; - /* pbuf has successor in chain? */ - if (q != NULL) { - /* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */ - LWIP_ASSERT("p->tot_len == p->len + q->tot_len", q->tot_len == p->tot_len - p->len); - /* enforce invariant if assertion is disabled */ - q->tot_len = p->tot_len - p->len; - /* decouple pbuf from remainder */ - p->next = NULL; - /* total length of pbuf p is its own length only */ - p->tot_len = p->len; - /* q is no longer referenced by p, free it */ - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_dechain: unreferencing %p\n", (void *)q)); - tail_gone = pbuf_free(q); - if (tail_gone > 0) { - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, - ("pbuf_dechain: deallocated %p (as it is no longer referenced)\n", (void *)q)); - } - /* return remaining tail or NULL if deallocated */ - } - /* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */ - LWIP_ASSERT("p->tot_len == p->len", p->tot_len == p->len); - return ((tail_gone > 0) ? NULL : q); -} - -/** - * @ingroup pbuf - * Create PBUF_RAM copies of pbufs. - * - * Used to queue packets on behalf of the lwIP stack, such as - * ARP based queueing. - * - * @note You MUST explicitly use p = pbuf_take(p); - * - * @note Only one packet is copied, no packet queue! - * - * @param p_to pbuf destination of the copy - * @param p_from pbuf source of the copy - * - * @return ERR_OK if pbuf was copied - * 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) -{ - u16_t offset_to=0, offset_from=0, len; - - 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) && - (p_from != NULL) && (p_to->tot_len >= p_from->tot_len)), return ERR_ARG;); - - /* iterate through pbuf chain */ - do - { - /* copy one part of the original chain */ - if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { - /* complete current p_from fits into current p_to */ - len = p_from->len - offset_from; - } else { - /* current p_from does not fit into current p_to */ - 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); - LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); - if (offset_from >= p_from->len) { - /* on to next p_from (if any) */ - offset_from = 0; - 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; - LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); - } - - 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!", - (p_from->next == NULL), return ERR_VAL;); - } - 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); - LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); - return ERR_OK; -} - -/** - * @ingroup pbuf - * Copy (part of) the contents of a packet buffer - * to an application supplied buffer. - * - * @param buf the pbuf from which to copy data - * @param dataptr the application supplied buffer - * @param len length of data to copy (dataptr must be big enough). No more - * than buf->tot_len will be copied, irrespective of len - * @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) -{ - const struct pbuf *p; - u16_t left; - u16_t buf_copy_len; - u16_t copied_total = 0; - - LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); - LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); - - left = 0; - - if ((buf == NULL) || (dataptr == NULL)) { - return 0; - } - - /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ - for (p = buf; len != 0 && p != NULL; p = p->next) { - if ((offset != 0) && (offset >= p->len)) { - /* don't copy from this buffer -> on to the next */ - offset -= p->len; - } else { - /* copy from this buffer. maybe only partially. */ - buf_copy_len = p->len - offset; - if (buf_copy_len > len) { - buf_copy_len = len; - } - /* copy the necessary parts of the buffer */ - MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); - copied_total += buf_copy_len; - left += buf_copy_len; - len -= buf_copy_len; - offset = 0; - } - } - return copied_total; -} - -#if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE -/** - * This method modifies a 'pbuf chain', so that its total length is - * smaller than 64K. The remainder of the original pbuf chain is stored - * in *rest. - * This function never creates new pbufs, but splits an existing chain - * in two parts. The tot_len of the modified packet queue will likely be - * smaller than 64K. - * 'packet queues' are not supported by this function. - * - * @param p the pbuf queue to be split - * @param rest pointer to store the remainder (after the first 64K) - */ -void pbuf_split_64k(struct pbuf *p, struct pbuf **rest) -{ - *rest = NULL; - if ((p != NULL) && (p->next != NULL)) { - u16_t tot_len_front = p->len; - struct pbuf *i = p; - struct pbuf *r = p->next; - - /* continue until the total length (summed up as u16_t) overflows */ - while ((r != NULL) && ((u16_t)(tot_len_front + r->len) > tot_len_front)) { - tot_len_front += r->len; - i = r; - r = r->next; - } - /* i now points to last packet of the first segment. Set next - pointer to NULL */ - i->next = NULL; - - if (r != NULL) { - /* Update the tot_len field in the first part */ - for (i = p; i != NULL; i = i->next) { - i->tot_len -= r->tot_len; - LWIP_ASSERT("tot_len/len mismatch in last pbuf", - (i->next != NULL) || (i->tot_len == i->len)); - } - if (p->flags & PBUF_FLAG_TCP_FIN) { - r->flags |= PBUF_FLAG_TCP_FIN; - } - - /* tot_len field in rest does not need modifications */ - /* reference counters do not need modifications */ - *rest = r; - } - } -} -#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - -/* Actual implementation of pbuf_skip() but returning const pointer... */ -static const struct pbuf* -pbuf_skip_const(const struct pbuf* in, u16_t in_offset, u16_t* out_offset) -{ - u16_t offset_left = in_offset; - const struct pbuf* q = in; - - /* get the correct pbuf */ - while ((q != NULL) && (q->len <= offset_left)) { - offset_left -= q->len; - q = q->next; - } - if (out_offset != NULL) { - *out_offset = offset_left; - } - return q; -} - -/** - * @ingroup pbuf - * Skip a number of bytes at the start of a pbuf - * - * @param in input pbuf - * @param in_offset offset to skip - * @param out_offset resulting offset in the returned pbuf - * @return the pbuf in the queue where the offset is - */ -struct pbuf* -pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset) -{ - const struct pbuf* out = pbuf_skip_const(in, in_offset, out_offset); - return LWIP_CONST_CAST(struct pbuf*, out); -} - -/** - * @ingroup pbuf - * Copy application supplied data into a pbuf. - * This function can only be used to copy the equivalent of buf->tot_len data. - * - * @param buf pbuf to fill with data - * @param dataptr application supplied data buffer - * @param len length of the application supplied data buffer - * - * @return ERR_OK if successful, ERR_MEM if the pbuf is not big enough - */ -err_t -pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len) -{ - struct pbuf *p; - u16_t buf_copy_len; - u16_t total_copy_len = len; - u16_t copied_total = 0; - - LWIP_ERROR("pbuf_take: invalid buf", (buf != NULL), return ERR_ARG;); - LWIP_ERROR("pbuf_take: invalid dataptr", (dataptr != NULL), return ERR_ARG;); - LWIP_ERROR("pbuf_take: buf not large enough", (buf->tot_len >= len), return ERR_MEM;); - - if ((buf == NULL) || (dataptr == NULL) || (buf->tot_len < len)) { - return ERR_ARG; - } - - /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ - for (p = buf; total_copy_len != 0; p = p->next) { - LWIP_ASSERT("pbuf_take: invalid pbuf", p != NULL); - buf_copy_len = total_copy_len; - if (buf_copy_len > p->len) { - /* this pbuf cannot hold all remaining data */ - buf_copy_len = p->len; - } - /* copy the necessary parts of the buffer */ - MEMCPY(p->payload, &((const char*)dataptr)[copied_total], buf_copy_len); - total_copy_len -= buf_copy_len; - copied_total += buf_copy_len; - } - LWIP_ASSERT("did not copy all data", total_copy_len == 0 && copied_total == len); - return ERR_OK; -} - -/** - * @ingroup pbuf - * Same as pbuf_take() but puts data at an offset - * - * @param buf pbuf to fill with data - * @param dataptr application supplied data buffer - * @param len length of the application supplied data buffer - * @param offset offset in pbuf where to copy dataptr to - * - * @return ERR_OK if successful, ERR_MEM if the pbuf is not big enough - */ -err_t -pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset) -{ - u16_t target_offset; - struct pbuf* q = pbuf_skip(buf, offset, &target_offset); - - /* return requested data if pbuf is OK */ - if ((q != NULL) && (q->tot_len >= target_offset + len)) { - u16_t remaining_len = len; - const u8_t* src_ptr = (const u8_t*)dataptr; - /* copy the part that goes into the first pbuf */ - u16_t first_copy_len = LWIP_MIN(q->len - target_offset, len); - MEMCPY(((u8_t*)q->payload) + target_offset, dataptr, first_copy_len); - remaining_len -= first_copy_len; - src_ptr += first_copy_len; - if (remaining_len > 0) { - return pbuf_take(q->next, src_ptr, remaining_len); - } - return ERR_OK; - } - return ERR_MEM; -} - -/** - * @ingroup pbuf - * Creates a single pbuf out of a queue of pbufs. - * - * @remark: Either the source pbuf 'p' is freed by this function or the original - * pbuf 'p' is returned, therefore the caller has to check the result! - * - * @param p the source pbuf - * @param layer pbuf_layer of the new pbuf - * - * @return a new, single pbuf (p->next is NULL) - * or the old pbuf if allocation fails - */ -struct pbuf* -pbuf_coalesce(struct pbuf *p, pbuf_layer layer) -{ - struct pbuf *q; - err_t err; - if (p->next == NULL) { - return p; - } - q = pbuf_alloc(layer, p->tot_len, PBUF_RAM); - if (q == NULL) { - /* @todo: what do we do now? */ - return p; - } - err = pbuf_copy(q, p); - LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ - LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); - pbuf_free(p); - return q; -} - -#if LWIP_CHECKSUM_ON_COPY -/** - * Copies data into a single pbuf (*not* into a pbuf queue!) and updates - * the checksum while copying - * - * @param p the pbuf to copy data into - * @param start_offset offset of p->payload where to copy the data to - * @param dataptr data to copy into the pbuf - * @param len length of data to copy into the pbuf - * @param chksum pointer to the checksum which is updated - * @return ERR_OK if successful, another error if the data does not fit - * within the (first) pbuf (no pbuf queues!) - */ -err_t -pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, - u16_t len, u16_t *chksum) -{ - u32_t acc; - u16_t copy_chksum; - char *dst_ptr; - LWIP_ASSERT("p != NULL", p != NULL); - LWIP_ASSERT("dataptr != NULL", dataptr != NULL); - LWIP_ASSERT("chksum != NULL", chksum != NULL); - LWIP_ASSERT("len != 0", len != 0); - - if ((start_offset >= p->len) || (start_offset + len > p->len)) { - return ERR_ARG; - } - - dst_ptr = ((char*)p->payload) + start_offset; - copy_chksum = LWIP_CHKSUM_COPY(dst_ptr, dataptr, len); - if ((start_offset & 1) != 0) { - copy_chksum = SWAP_BYTES_IN_WORD(copy_chksum); - } - acc = *chksum; - acc += copy_chksum; - *chksum = FOLD_U32T(acc); - return ERR_OK; -} -#endif /* LWIP_CHECKSUM_ON_COPY */ - -/** - * @ingroup pbuf - * Get one byte from the specified position in a pbuf - * WARNING: returns zero for offset >= p->tot_len - * - * @param p pbuf to parse - * @param offset offset into p of the byte to return - * @return byte at an offset into p OR ZERO IF 'offset' >= p->tot_len - */ -u8_t -pbuf_get_at(const struct pbuf* p, u16_t offset) -{ - int ret = pbuf_try_get_at(p, offset); - if (ret >= 0) { - return (u8_t)ret; - } - return 0; -} - -/** - * @ingroup pbuf - * Get one byte from the specified position in a pbuf - * - * @param p pbuf to parse - * @param offset offset into p of the byte to return - * @return byte at an offset into p [0..0xFF] OR negative if 'offset' >= p->tot_len - */ -int -pbuf_try_get_at(const struct pbuf* p, u16_t offset) -{ - u16_t q_idx; - const struct pbuf* q = pbuf_skip_const(p, offset, &q_idx); - - /* return requested data if pbuf is OK */ - if ((q != NULL) && (q->len > q_idx)) { - return ((u8_t*)q->payload)[q_idx]; - } - return -1; -} - -/** - * @ingroup pbuf - * Put one byte to the specified position in a pbuf - * WARNING: silently ignores offset >= p->tot_len - * - * @param p pbuf to fill - * @param offset offset into p of the byte to write - * @param data byte to write at an offset into p - */ -void -pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data) -{ - u16_t q_idx; - struct pbuf* q = pbuf_skip(p, offset, &q_idx); - - /* write requested data if pbuf is OK */ - if ((q != NULL) && (q->len > q_idx)) { - ((u8_t*)q->payload)[q_idx] = data; - } -} - -/** - * @ingroup pbuf - * Compare pbuf contents at specified offset with memory s2, both of length n - * - * @param p pbuf to compare - * @param offset offset into p at which to start comparing - * @param s2 buffer to compare - * @param n length of buffer to compare - * @return zero if equal, nonzero otherwise - * (0xffff if p is too short, diffoffset+1 otherwise) - */ -u16_t -pbuf_memcmp(const struct pbuf* p, u16_t offset, const void* s2, u16_t n) -{ - u16_t start = offset; - const struct pbuf* q = p; - u16_t i; - - /* pbuf long enough to perform check? */ - if(p->tot_len < (offset + n)) { - return 0xffff; - } - - /* get the correct pbuf from chain. We know it succeeds because of p->tot_len check above. */ - while ((q != NULL) && (q->len <= start)) { - start -= q->len; - q = q->next; - } - - /* return requested data if pbuf is OK */ - for (i = 0; i < n; i++) { - /* We know pbuf_get_at() succeeds because of p->tot_len check above. */ - u8_t a = pbuf_get_at(q, start + i); - u8_t b = ((const u8_t*)s2)[i]; - if (a != b) { - return i+1; - } - } - return 0; -} - -/** - * @ingroup pbuf - * Find occurrence of mem (with length mem_len) in pbuf p, starting at offset - * start_offset. - * - * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as - * return value 'not found' - * @param mem search for the contents of this buffer - * @param mem_len length of 'mem' - * @param start_offset offset into p at which to start searching - * @return 0xFFFF if substr was not found in p or the index where it was found - */ -u16_t -pbuf_memfind(const struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_offset) -{ - u16_t i; - u16_t max = p->tot_len - mem_len; - if (p->tot_len >= mem_len + start_offset) { - for (i = start_offset; i <= max; i++) { - u16_t plus = pbuf_memcmp(p, i, mem, mem_len); - if (plus == 0) { - return i; - } - } - } - return 0xFFFF; -} - -/** - * Find occurrence of substr with length substr_len in pbuf p, start at offset - * start_offset - * WARNING: in contrast to strstr(), this one does not stop at the first \0 in - * the pbuf/source string! - * - * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as - * return value 'not found' - * @param substr string to search for in p, maximum length is 0xFFFE - * @return 0xFFFF if substr was not found in p or the index where it was found - */ -u16_t -pbuf_strstr(const struct pbuf* p, const char* substr) -{ - size_t substr_len; - if ((substr == NULL) || (substr[0] == 0) || (p->tot_len == 0xFFFF)) { - return 0xFFFF; - } - substr_len = strlen(substr); - if (substr_len >= 0xFFFF) { - return 0xFFFF; - } - return pbuf_memfind(p, substr, (u16_t)substr_len, 0); -} +/** + * @file + * Packet buffer management + */ + +/** + * @defgroup pbuf Packet buffers (PBUF) + * @ingroup infrastructure + * + * Packets are built from the pbuf data structure. It supports dynamic + * memory allocation for packet contents or can reference externally + * managed packet contents both in RAM and ROM. Quick allocation for + * incoming packets is provided through pools with fixed sized pbufs. + * + * A packet may span over multiple pbufs, chained as a singly linked + * list. This is called a "pbuf chain". + * + * Multiple packets may be queued, also using this singly linked list. + * This is called a "packet queue". + * + * So, a packet queue consists of one or more pbuf chains, each of + * which consist of one or more pbufs. CURRENTLY, PACKET QUEUES ARE + * NOT SUPPORTED!!! Use helper structs to queue multiple packets. + * + * The differences between a pbuf chain and a packet queue are very + * precise but subtle. + * + * The last pbuf of a packet has a ->tot_len field that equals the + * ->len field. It can be found by traversing the list. If the last + * pbuf of a packet has a ->next field other than NULL, more packets + * are on the queue. + * + * Therefore, looping through a pbuf of a single packet, has an + * loop end condition (tot_len == p->len), NOT (next == NULL). + * + * Example of custom pbuf usage for zero-copy RX: + @code{.c} +typedef struct my_custom_pbuf +{ + struct pbuf_custom p; + void* dma_descriptor; +} my_custom_pbuf_t; + +LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(my_custom_pbuf_t), "Zero-copy RX PBUF pool"); + +void my_pbuf_free_custom(void* p) +{ + my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p; + + LOCK_INTERRUPTS(); + free_rx_dma_descriptor(my_pbuf->dma_descriptor); + LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf); + UNLOCK_INTERRUPTS(); +} + +void eth_rx_irq() +{ + dma_descriptor* dma_desc = get_RX_DMA_descriptor_from_ethernet(); + my_custom_pbuf_t* my_pbuf = (my_custom_pbuf_t*)LWIP_MEMPOOL_ALLOC(RX_POOL); + + my_pbuf->p.custom_free_function = my_pbuf_free_custom; + my_pbuf->dma_descriptor = dma_desc; + + invalidate_cpu_cache(dma_desc->rx_data, dma_desc->rx_length); + + struct pbuf* p = pbuf_alloced_custom(PBUF_RAW, + dma_desc->rx_length, + PBUF_REF, + &my_pbuf->p, + dma_desc->rx_data, + dma_desc->max_buffer_size); + + if(netif->input(p, netif) != ERR_OK) { + pbuf_free(p); + } +} + @endcode + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#include "lwip/stats.h" +#include "lwip/def.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/pbuf.h" +#include "lwip/sys.h" +#if LWIP_TCP && TCP_QUEUE_OOSEQ +#include "lwip/priv/tcp_priv.h" +#endif +#if LWIP_CHECKSUM_ON_COPY +#include "lwip/inet_chksum.h" +#endif + +#include + +#define SIZEOF_STRUCT_PBUF LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf)) +/* Since the pool is created in memp, PBUF_POOL_BUFSIZE will be automatically + aligned there. Therefore, PBUF_POOL_BUFSIZE_ALIGNED can be used here. */ +#define PBUF_POOL_BUFSIZE_ALIGNED LWIP_MEM_ALIGN_SIZE(PBUF_POOL_BUFSIZE) + +#if !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ +#define PBUF_POOL_IS_EMPTY() +#else /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ + +#if !NO_SYS +#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL +#include "lwip/tcpip.h" +#define PBUF_POOL_FREE_OOSEQ_QUEUE_CALL() do { \ + if (tcpip_callback_with_block(pbuf_free_ooseq_callback, NULL, 0) != ERR_OK) { \ + SYS_ARCH_PROTECT(old_level); \ + pbuf_free_ooseq_pending = 0; \ + SYS_ARCH_UNPROTECT(old_level); \ + } } while(0) +#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ +#endif /* !NO_SYS */ + +volatile u8_t pbuf_free_ooseq_pending; +#define PBUF_POOL_IS_EMPTY() pbuf_pool_is_empty() + +/** + * Attempt to reclaim some memory from queued out-of-sequence TCP segments + * if we run out of pool pbufs. It's better to give priority to new packets + * if we're running out. + * + * This must be done in the correct thread context therefore this function + * can only be used with NO_SYS=0 and through tcpip_callback. + */ +#if !NO_SYS +static +#endif /* !NO_SYS */ +void +pbuf_free_ooseq(void) +{ + struct tcp_pcb* pcb; + SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); + + for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { + if (NULL != pcb->ooseq) { + /** Free the ooseq pbufs of one PCB only */ + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free_ooseq: freeing out-of-sequence pbufs\n")); + tcp_segs_free(pcb->ooseq); + pcb->ooseq = NULL; + return; + } + } +} + +#if !NO_SYS +/** + * Just a callback function for tcpip_callback() that calls pbuf_free_ooseq(). + */ +static void +pbuf_free_ooseq_callback(void *arg) +{ + LWIP_UNUSED_ARG(arg); + pbuf_free_ooseq(); +} +#endif /* !NO_SYS */ + +/** Queue a call to pbuf_free_ooseq if not already queued. */ +static void +pbuf_pool_is_empty(void) +{ +#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL + SYS_ARCH_SET(pbuf_free_ooseq_pending, 1); +#else /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ + u8_t queued; + SYS_ARCH_DECL_PROTECT(old_level); + SYS_ARCH_PROTECT(old_level); + queued = pbuf_free_ooseq_pending; + pbuf_free_ooseq_pending = 1; + SYS_ARCH_UNPROTECT(old_level); + + if (!queued) { + /* queue a call to pbuf_free_ooseq if not already queued */ + PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); + } +#endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ +} +#endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ + +/** + * @ingroup pbuf + * Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type). + * + * The actual memory allocated for the pbuf is determined by the + * layer at which the pbuf is allocated and the requested size + * (from the size parameter). + * + * @param layer flag to define header size + * @param length size of the pbuf's payload + * @param type this parameter decides how and where the pbuf + * should be allocated as follows: + * + * - PBUF_RAM: buffer memory for pbuf is allocated as one large + * chunk. This includes protocol headers as well. + * - PBUF_ROM: no buffer memory is allocated for the pbuf, even for + * protocol headers. Additional headers must be prepended + * by allocating another pbuf and chain in to the front of + * the ROM pbuf. It is assumed that the memory used is really + * similar to ROM in that it is immutable and will not be + * changed. Memory which is dynamic should generally not + * be attached to PBUF_ROM pbufs. Use PBUF_REF instead. + * - PBUF_REF: no buffer memory is allocated for the pbuf, even for + * protocol headers. It is assumed that the pbuf is only + * being used in a single thread. If the pbuf gets queued, + * then pbuf_take should be called to copy the buffer. + * - PBUF_POOL: the pbuf is allocated as a pbuf chain, with pbufs from + * the pbuf pool that is allocated during pbuf_init(). + * + * @return the allocated pbuf. If multiple pbufs where allocated, this + * is the first pbuf of a pbuf chain. + */ +struct pbuf * +pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) +{ + struct pbuf *p, *q, *r; + u16_t offset; + s32_t rem_len; /* remaining length */ + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); + + /* determine header offset */ + switch (layer) { + case PBUF_TRANSPORT: + /* add room for transport (often TCP) layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; + break; + case PBUF_IP: + /* add room for IP layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; + break; + case PBUF_LINK: + /* add room for link layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; + break; + case PBUF_RAW_TX: + /* add room for encapsulating link layer headers (e.g. 802.11) */ + offset = PBUF_LINK_ENCAPSULATION_HLEN; + break; + case PBUF_RAW: + /* no offset (e.g. RX buffers or chain successors) */ + offset = 0; + break; + default: + LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); + return NULL; + } + + switch (type) { + case PBUF_POOL: + /* allocate head of pbuf chain into p */ + p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); + if (p == NULL) { + PBUF_POOL_IS_EMPTY(); + return NULL; + } + p->type = type; + p->next = NULL; + + /* make the payload pointer point 'offset' bytes into pbuf data memory */ + p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); + LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", + ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); + /* the total length of the pbuf chain is the requested size */ + p->tot_len = length; + /* set the length of the first pbuf in the chain */ + p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); + LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", + ((u8_t*)p->payload + p->len <= + (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); + LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", + (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); + /* set reference count (needed here in case we fail) */ + p->ref = 1; + + /* now allocate the tail of the pbuf chain */ + + /* remember first pbuf for linkage in next iteration */ + r = p; + /* remaining length to be allocated */ + rem_len = length - p->len; + /* any remaining pbufs to be allocated? */ + while (rem_len > 0) { + q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); + if (q == NULL) { + PBUF_POOL_IS_EMPTY(); + /* free chain so far allocated */ + pbuf_free(p); + /* bail out unsuccessfully */ + return NULL; + } + q->type = type; + q->flags = 0; + q->next = NULL; + /* make previous pbuf point to this pbuf */ + r->next = q; + /* set total length of this pbuf and next in chain */ + LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); + q->tot_len = (u16_t)rem_len; + /* this pbuf length is pool size, unless smaller sized tail */ + q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); + q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); + LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", + ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); + LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", + ((u8_t*)p->payload + p->len <= + (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); + q->ref = 1; + /* calculate remaining length to be allocated */ + rem_len -= q->len; + /* remember this pbuf for linkage in next iteration */ + r = q; + } + /* end of chain */ + /*r->next = NULL;*/ + + break; + case PBUF_RAM: + { + mem_size_t alloc_len = LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length); + + /* bug #50040: Check for integer overflow when calculating alloc_len */ + if (alloc_len < LWIP_MEM_ALIGN_SIZE(length)) { + return NULL; + } + + /* If pbuf is to be allocated in RAM, allocate memory for it. */ + p = (struct pbuf*)mem_malloc(alloc_len); + } + + if (p == NULL) { + return NULL; + } + /* Set up internal structure of the pbuf. */ + p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); + p->len = p->tot_len = length; + p->next = NULL; + p->type = type; + + LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", + ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); + break; + /* pbuf references existing (non-volatile static constant) ROM payload? */ + case PBUF_ROM: + /* pbuf references existing (externally allocated) RAM payload? */ + case PBUF_REF: + /* only allocate memory for the pbuf structure */ + p = (struct pbuf *)memp_malloc(MEMP_PBUF); + if (p == NULL) { + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", + (type == PBUF_ROM) ? "ROM" : "REF")); + return NULL; + } + /* caller must set this field properly, afterwards */ + p->payload = NULL; + p->len = p->tot_len = length; + p->next = NULL; + p->type = type; + break; + default: + LWIP_ASSERT("pbuf_alloc: erroneous type", 0); + return NULL; + } + /* set reference count */ + p->ref = 1; + /* set flags */ + p->flags = 0; + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); + return p; +} + +#if LWIP_SUPPORT_CUSTOM_PBUF +/** + * @ingroup pbuf + * Initialize a custom pbuf (already allocated). + * + * @param l flag to define header size + * @param length size of the pbuf's payload + * @param type type of the pbuf (only used to treat the pbuf accordingly, as + * this function allocates no memory) + * @param p pointer to the custom pbuf to initialize (already allocated) + * @param payload_mem pointer to the buffer that is used for payload and headers, + * must be at least big enough to hold 'length' plus the header size, + * may be NULL if set later. + * ATTENTION: The caller is responsible for correct alignment of this buffer!! + * @param payload_mem_len the size of the 'payload_mem' buffer, must be at least + * big enough to hold 'length' plus the header size + */ +struct pbuf* +pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_custom *p, + void *payload_mem, u16_t payload_mem_len) +{ + u16_t offset; + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloced_custom(length=%"U16_F")\n", length)); + + /* determine header offset */ + switch (l) { + case PBUF_TRANSPORT: + /* add room for transport (often TCP) layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; + break; + case PBUF_IP: + /* add room for IP layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN; + break; + case PBUF_LINK: + /* add room for link layer header */ + offset = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; + break; + case PBUF_RAW_TX: + /* add room for encapsulating link layer headers (e.g. 802.11) */ + offset = PBUF_LINK_ENCAPSULATION_HLEN; + break; + case PBUF_RAW: + offset = 0; + break; + default: + LWIP_ASSERT("pbuf_alloced_custom: bad pbuf layer", 0); + return NULL; + } + + if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) { + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); + return NULL; + } + + p->pbuf.next = NULL; + if (payload_mem != NULL) { + p->pbuf.payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); + } else { + p->pbuf.payload = NULL; + } + p->pbuf.flags = PBUF_FLAG_IS_CUSTOM; + p->pbuf.len = p->pbuf.tot_len = length; + p->pbuf.type = type; + p->pbuf.ref = 1; + return &p->pbuf; +} +#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ + +/** + * @ingroup pbuf + * Shrink a pbuf chain to a desired length. + * + * @param p pbuf to shrink. + * @param new_len desired new length of pbuf chain + * + * Depending on the desired length, the first few pbufs in a chain might + * be skipped and left unchanged. The new last pbuf in the chain will be + * resized, and any remaining pbufs will be freed. + * + * @note If the pbuf is ROM/REF, only the ->tot_len and ->len fields are adjusted. + * @note May not be called on a packet queue. + * + * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). + */ +void +pbuf_realloc(struct pbuf *p, u16_t new_len) +{ + struct pbuf *q; + u16_t rem_len; /* remaining length */ + s32_t grow; + + LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL); + LWIP_ASSERT("pbuf_realloc: sane p->type", p->type == PBUF_POOL || + p->type == PBUF_ROM || + p->type == PBUF_RAM || + p->type == PBUF_REF); + + /* desired length larger than current length? */ + if (new_len >= p->tot_len) { + /* enlarging not yet supported */ + return; + } + + /* the pbuf chain grows by (new_len - p->tot_len) bytes + * (which may be negative in case of shrinking) */ + grow = new_len - p->tot_len; + + /* first, step over any pbufs that should remain in the chain */ + rem_len = new_len; + q = p; + /* should this pbuf be kept? */ + while (rem_len > q->len) { + /* decrease remaining length by pbuf length */ + rem_len -= q->len; + /* decrease total length indicator */ + LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); + q->tot_len += (u16_t)grow; + /* proceed to next pbuf in chain */ + q = q->next; + LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); + } + /* we have now reached the new last pbuf (in q) */ + /* rem_len == desired length for pbuf q */ + + /* shrink allocated memory for PBUF_RAM */ + /* (other types merely adjust their length fields */ + if ((q->type == PBUF_RAM) && (rem_len != q->len) +#if LWIP_SUPPORT_CUSTOM_PBUF + && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) +#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ + ) { + /* reallocate and adjust the length of the pbuf that will be split */ + q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); + LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); + } + /* adjust length fields for new last pbuf */ + q->len = rem_len; + q->tot_len = q->len; + + /* any remaining pbufs in chain? */ + if (q->next != NULL) { + /* free remaining pbufs in chain */ + pbuf_free(q->next); + } + /* q is last packet in chain */ + q->next = NULL; + +} + +/** + * Adjusts the payload pointer to hide or reveal headers in the payload. + * @see pbuf_header. + * + * @param p pbuf to change the header size. + * @param header_size_increment Number of bytes to increment header size. + * @param force Allow 'header_size_increment > 0' for PBUF_REF/PBUF_ROM types + * + * @return non-zero on failure, zero on success. + * + */ +static u8_t +pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) +{ + u16_t type; + void *payload; + u16_t increment_magnitude; + + LWIP_ASSERT("p != NULL", p != NULL); + if ((header_size_increment == 0) || (p == NULL)) { + return 0; + } + + if (header_size_increment < 0) { + increment_magnitude = (u16_t)-header_size_increment; + /* 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;); + } else { + increment_magnitude = (u16_t)header_size_increment; +#if 0 + /* Can't assert these as some callers speculatively call + pbuf_header() to see if it's OK. Will return 1 below instead. */ + /* Check that we've got the correct type of pbuf to work with */ + LWIP_ASSERT("p->type == PBUF_RAM || p->type == PBUF_POOL", + p->type == PBUF_RAM || p->type == PBUF_POOL); + /* Check that we aren't going to move off the beginning of the pbuf */ + LWIP_ASSERT("p->payload - increment_magnitude >= p + SIZEOF_STRUCT_PBUF", + (u8_t *)p->payload - increment_magnitude >= (u8_t *)p + SIZEOF_STRUCT_PBUF); +#endif + } + + type = p->type; + /* remember current payload pointer */ + payload = p->payload; + + /* pbuf types containing payloads? */ + if (type == PBUF_RAM || type == PBUF_POOL) { + /* set new payload pointer */ + p->payload = (u8_t *)p->payload - header_size_increment; + /* boundary check fails? */ + if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { + LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, + ("pbuf_header: failed as %p < %p (not enough space for new header size)\n", + (void *)p->payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF))); + /* restore old payload pointer */ + p->payload = payload; + /* bail out unsuccessfully */ + return 1; + } + /* pbuf types referring to external payloads? */ + } else if (type == PBUF_REF || type == PBUF_ROM) { + /* hide a header in the payload? */ + if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { + /* increase payload pointer */ + p->payload = (u8_t *)p->payload - header_size_increment; + } else if ((header_size_increment > 0) && force) { + p->payload = (u8_t *)p->payload - header_size_increment; + } else { + /* cannot expand payload to front (yet!) + * bail out unsuccessfully */ + return 1; + } + } else { + /* Unknown type */ + LWIP_ASSERT("bad pbuf type", 0); + return 1; + } + /* modify pbuf length fields */ + p->len += header_size_increment; + p->tot_len += header_size_increment; + + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", + (void *)payload, (void *)p->payload, header_size_increment)); + + return 0; +} + +/** + * Adjusts the payload pointer to hide or reveal headers in the payload. + * + * Adjusts the ->payload pointer so that space for a header + * (dis)appears in the pbuf payload. + * + * The ->payload, ->tot_len and ->len fields are adjusted. + * + * @param p pbuf to change the header size. + * @param header_size_increment Number of bytes to increment header size which + * increases the size of the pbuf. New space is on the front. + * (Using a negative value decreases the header size.) + * If hdr_size_inc is 0, this function does nothing and returns successful. + * + * PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so + * the call will fail. A check is made that the increase in header size does + * not move the payload pointer in front of the start of the buffer. + * @return non-zero on failure, zero on success. + * + */ +u8_t +pbuf_header(struct pbuf *p, s16_t header_size_increment) +{ + return pbuf_header_impl(p, header_size_increment, 0); +} + +/** + * 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) +{ + return pbuf_header_impl(p, header_size_increment, 1); +} + +/** + * @ingroup pbuf + * Dereference a pbuf chain or queue and deallocate any no-longer-used + * pbufs at the head of this chain or queue. + * + * Decrements the pbuf reference count. If it reaches zero, the pbuf is + * deallocated. + * + * For a pbuf chain, this is repeated for each pbuf in the chain, + * up to the first pbuf which has a non-zero reference count after + * decrementing. So, when all reference counts are one, the whole + * chain is free'd. + * + * @param p The pbuf (chain) to be dereferenced. + * + * @return the number of pbufs that were de-allocated + * from the head of the chain. + * + * @note MUST NOT be called on a packet queue (Not verified to work yet). + * @note the reference counter of a pbuf equals the number of pointers + * that refer to the pbuf (or into the pbuf). + * + * @internal examples: + * + * Assuming existing chains a->b->c with the following reference + * counts, calling pbuf_free(a) results in: + * + * 1->2->3 becomes ...1->3 + * 3->3->3 becomes 2->3->3 + * 1->1->2 becomes ......1 + * 2->1->1 becomes 1->1->1 + * 1->1->1 becomes ....... + * + */ +u8_t +pbuf_free(struct pbuf *p) +{ + u16_t type; + struct pbuf *q; + u8_t count; + + if (p == NULL) { + LWIP_ASSERT("p != NULL", p != NULL); + /* if assertions are disabled, proceed with debug output */ + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("pbuf_free(p == NULL) was called.\n")); + return 0; + } + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); + + PERF_START; + + LWIP_ASSERT("pbuf_free: sane type", + p->type == PBUF_RAM || p->type == PBUF_ROM || + p->type == PBUF_REF || p->type == PBUF_POOL); + + count = 0; + /* de-allocate all consecutive pbufs from the head of the chain that + * obtain a zero reference count after decrementing*/ + while (p != NULL) { + u16_t ref; + SYS_ARCH_DECL_PROTECT(old_level); + /* Since decrementing ref cannot be guaranteed to be a single machine operation + * we must protect it. We put the new ref into a local variable to prevent + * further protection. */ + SYS_ARCH_PROTECT(old_level); + /* all pbufs in a chain are referenced at least once */ + LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); + /* decrease reference count (number of pointers to pbuf) */ + ref = --(p->ref); + SYS_ARCH_UNPROTECT(old_level); + /* this pbuf is no longer referenced to? */ + if (ref == 0) { + /* remember next pbuf in chain for next iteration */ + q = p->next; + LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p)); + type = p->type; +#if LWIP_SUPPORT_CUSTOM_PBUF + /* is this a custom pbuf? */ + if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { + struct pbuf_custom *pc = (struct pbuf_custom*)p; + LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); + pc->custom_free_function(p); + } else +#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ + { + /* is this a pbuf from the pool? */ + if (type == PBUF_POOL) { + memp_free(MEMP_PBUF_POOL, p); + /* is this a ROM or RAM referencing pbuf? */ + } else if (type == PBUF_ROM || type == PBUF_REF) { + memp_free(MEMP_PBUF, p); + /* type == PBUF_RAM */ + } else { + mem_free(p); + } + } + count++; + /* proceed to next pbuf */ + p = q; + /* p->ref > 0, this pbuf is still referenced to */ + /* (and so the remaining pbufs in chain as well) */ + } else { + LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, ref)); + /* stop walking through the chain */ + p = NULL; + } + } + PERF_STOP("pbuf_free"); + /* return number of de-allocated pbufs */ + return count; +} + +/** + * Count number of pbufs in a chain + * + * @param p first pbuf of chain + * @return the number of pbufs in a chain + */ +u16_t +pbuf_clen(const struct pbuf *p) +{ + u16_t len; + + len = 0; + while (p != NULL) { + ++len; + p = p->next; + } + return len; +} + +/** + * @ingroup pbuf + * Increment the reference count of the pbuf. + * + * @param p pbuf to increase reference counter of + * + */ +void +pbuf_ref(struct pbuf *p) +{ + /* pbuf given? */ + if (p != NULL) { + SYS_ARCH_INC(p->ref, 1); + LWIP_ASSERT("pbuf ref overflow", p->ref > 0); + } +} + +/** + * @ingroup pbuf + * Concatenate two pbufs (each may be a pbuf chain) and take over + * the caller's reference of the tail pbuf. + * + * @note The caller MAY NOT reference the tail pbuf afterwards. + * Use pbuf_chain() for that purpose. + * + * @see pbuf_chain() + */ +void +pbuf_cat(struct pbuf *h, struct pbuf *t) +{ + struct pbuf *p; + + LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", + ((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 += t->tot_len; + } + /* { 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); + LWIP_ASSERT("p->next == NULL", p->next == NULL); + /* add total length of second chain to last pbuf total of first chain */ + p->tot_len += t->tot_len; + /* chain last pbuf of head (p) with first of tail (t) */ + p->next = t; + /* 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. + */ +} + +/** + * @ingroup pbuf + * Chain two pbufs (or pbuf chains) together. + * + * The caller MUST call pbuf_free(t) once it has stopped + * using it. Use pbuf_cat() instead if you no longer use t. + * + * @param h head pbuf (chain) + * @param t tail pbuf (chain) + * @note The pbufs MUST belong to the same packet. + * @note MAY NOT be called on a packet queue. + * + * The ->tot_len fields of all pbufs of the head chain are adjusted. + * The ->next field of the last pbuf of the head chain is adjusted. + * The ->ref field of the first pbuf of the tail chain is adjusted. + * + */ +void +pbuf_chain(struct pbuf *h, struct pbuf *t) +{ + pbuf_cat(h, t); + /* t is now referenced by h */ + pbuf_ref(t); + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); +} + +/** + * Dechains the first pbuf from its succeeding pbufs in the chain. + * + * Makes p->tot_len field equal to p->len. + * @param p pbuf to dechain + * @return remainder of the pbuf chain, or NULL if it was de-allocated. + * @note May not be called on a packet queue. + */ +struct pbuf * +pbuf_dechain(struct pbuf *p) +{ + struct pbuf *q; + u8_t tail_gone = 1; + /* tail */ + q = p->next; + /* pbuf has successor in chain? */ + if (q != NULL) { + /* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */ + LWIP_ASSERT("p->tot_len == p->len + q->tot_len", q->tot_len == p->tot_len - p->len); + /* enforce invariant if assertion is disabled */ + q->tot_len = p->tot_len - p->len; + /* decouple pbuf from remainder */ + p->next = NULL; + /* total length of pbuf p is its own length only */ + p->tot_len = p->len; + /* q is no longer referenced by p, free it */ + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_dechain: unreferencing %p\n", (void *)q)); + tail_gone = pbuf_free(q); + if (tail_gone > 0) { + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, + ("pbuf_dechain: deallocated %p (as it is no longer referenced)\n", (void *)q)); + } + /* return remaining tail or NULL if deallocated */ + } + /* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */ + LWIP_ASSERT("p->tot_len == p->len", p->tot_len == p->len); + return ((tail_gone > 0) ? NULL : q); +} + +/** + * @ingroup pbuf + * Create PBUF_RAM copies of pbufs. + * + * Used to queue packets on behalf of the lwIP stack, such as + * ARP based queueing. + * + * @note You MUST explicitly use p = pbuf_take(p); + * + * @note Only one packet is copied, no packet queue! + * + * @param p_to pbuf destination of the copy + * @param p_from pbuf source of the copy + * + * @return ERR_OK if pbuf was copied + * 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) +{ + u16_t offset_to=0, offset_from=0, len; + + 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) && + (p_from != NULL) && (p_to->tot_len >= p_from->tot_len)), return ERR_ARG;); + + /* iterate through pbuf chain */ + do + { + /* copy one part of the original chain */ + if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { + /* complete current p_from fits into current p_to */ + len = p_from->len - offset_from; + } else { + /* current p_from does not fit into current p_to */ + 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); + LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); + if (offset_from >= p_from->len) { + /* on to next p_from (if any) */ + offset_from = 0; + 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; + LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); + } + + 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!", + (p_from->next == NULL), return ERR_VAL;); + } + 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); + LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); + return ERR_OK; +} + +/** + * @ingroup pbuf + * Copy (part of) the contents of a packet buffer + * to an application supplied buffer. + * + * @param buf the pbuf from which to copy data + * @param dataptr the application supplied buffer + * @param len length of data to copy (dataptr must be big enough). No more + * than buf->tot_len will be copied, irrespective of len + * @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) +{ + const struct pbuf *p; + u16_t left; + u16_t buf_copy_len; + u16_t copied_total = 0; + + LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); + LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); + + left = 0; + + if ((buf == NULL) || (dataptr == NULL)) { + return 0; + } + + /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ + for (p = buf; len != 0 && p != NULL; p = p->next) { + if ((offset != 0) && (offset >= p->len)) { + /* don't copy from this buffer -> on to the next */ + offset -= p->len; + } else { + /* copy from this buffer. maybe only partially. */ + buf_copy_len = p->len - offset; + if (buf_copy_len > len) { + buf_copy_len = len; + } + /* copy the necessary parts of the buffer */ + MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); + copied_total += buf_copy_len; + left += buf_copy_len; + len -= buf_copy_len; + offset = 0; + } + } + return copied_total; +} + +#if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE +/** + * This method modifies a 'pbuf chain', so that its total length is + * smaller than 64K. The remainder of the original pbuf chain is stored + * in *rest. + * This function never creates new pbufs, but splits an existing chain + * in two parts. The tot_len of the modified packet queue will likely be + * smaller than 64K. + * 'packet queues' are not supported by this function. + * + * @param p the pbuf queue to be split + * @param rest pointer to store the remainder (after the first 64K) + */ +void pbuf_split_64k(struct pbuf *p, struct pbuf **rest) +{ + *rest = NULL; + if ((p != NULL) && (p->next != NULL)) { + u16_t tot_len_front = p->len; + struct pbuf *i = p; + struct pbuf *r = p->next; + + /* continue until the total length (summed up as u16_t) overflows */ + while ((r != NULL) && ((u16_t)(tot_len_front + r->len) > tot_len_front)) { + tot_len_front += r->len; + i = r; + r = r->next; + } + /* i now points to last packet of the first segment. Set next + pointer to NULL */ + i->next = NULL; + + if (r != NULL) { + /* Update the tot_len field in the first part */ + for (i = p; i != NULL; i = i->next) { + i->tot_len -= r->tot_len; + LWIP_ASSERT("tot_len/len mismatch in last pbuf", + (i->next != NULL) || (i->tot_len == i->len)); + } + if (p->flags & PBUF_FLAG_TCP_FIN) { + r->flags |= PBUF_FLAG_TCP_FIN; + } + + /* tot_len field in rest does not need modifications */ + /* reference counters do not need modifications */ + *rest = r; + } + } +} +#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + +/* Actual implementation of pbuf_skip() but returning const pointer... */ +static const struct pbuf* +pbuf_skip_const(const struct pbuf* in, u16_t in_offset, u16_t* out_offset) +{ + u16_t offset_left = in_offset; + const struct pbuf* q = in; + + /* get the correct pbuf */ + while ((q != NULL) && (q->len <= offset_left)) { + offset_left -= q->len; + q = q->next; + } + if (out_offset != NULL) { + *out_offset = offset_left; + } + return q; +} + +/** + * @ingroup pbuf + * Skip a number of bytes at the start of a pbuf + * + * @param in input pbuf + * @param in_offset offset to skip + * @param out_offset resulting offset in the returned pbuf + * @return the pbuf in the queue where the offset is + */ +struct pbuf* +pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset) +{ + const struct pbuf* out = pbuf_skip_const(in, in_offset, out_offset); + return LWIP_CONST_CAST(struct pbuf*, out); +} + +/** + * @ingroup pbuf + * Copy application supplied data into a pbuf. + * This function can only be used to copy the equivalent of buf->tot_len data. + * + * @param buf pbuf to fill with data + * @param dataptr application supplied data buffer + * @param len length of the application supplied data buffer + * + * @return ERR_OK if successful, ERR_MEM if the pbuf is not big enough + */ +err_t +pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len) +{ + struct pbuf *p; + u16_t buf_copy_len; + u16_t total_copy_len = len; + u16_t copied_total = 0; + + LWIP_ERROR("pbuf_take: invalid buf", (buf != NULL), return ERR_ARG;); + LWIP_ERROR("pbuf_take: invalid dataptr", (dataptr != NULL), return ERR_ARG;); + LWIP_ERROR("pbuf_take: buf not large enough", (buf->tot_len >= len), return ERR_MEM;); + + if ((buf == NULL) || (dataptr == NULL) || (buf->tot_len < len)) { + return ERR_ARG; + } + + /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ + for (p = buf; total_copy_len != 0; p = p->next) { + LWIP_ASSERT("pbuf_take: invalid pbuf", p != NULL); + buf_copy_len = total_copy_len; + if (buf_copy_len > p->len) { + /* this pbuf cannot hold all remaining data */ + buf_copy_len = p->len; + } + /* copy the necessary parts of the buffer */ + MEMCPY(p->payload, &((const char*)dataptr)[copied_total], buf_copy_len); + total_copy_len -= buf_copy_len; + copied_total += buf_copy_len; + } + LWIP_ASSERT("did not copy all data", total_copy_len == 0 && copied_total == len); + return ERR_OK; +} + +/** + * @ingroup pbuf + * Same as pbuf_take() but puts data at an offset + * + * @param buf pbuf to fill with data + * @param dataptr application supplied data buffer + * @param len length of the application supplied data buffer + * @param offset offset in pbuf where to copy dataptr to + * + * @return ERR_OK if successful, ERR_MEM if the pbuf is not big enough + */ +err_t +pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset) +{ + u16_t target_offset; + struct pbuf* q = pbuf_skip(buf, offset, &target_offset); + + /* return requested data if pbuf is OK */ + if ((q != NULL) && (q->tot_len >= target_offset + len)) { + u16_t remaining_len = len; + const u8_t* src_ptr = (const u8_t*)dataptr; + /* copy the part that goes into the first pbuf */ + u16_t first_copy_len = LWIP_MIN(q->len - target_offset, len); + MEMCPY(((u8_t*)q->payload) + target_offset, dataptr, first_copy_len); + remaining_len -= first_copy_len; + src_ptr += first_copy_len; + if (remaining_len > 0) { + return pbuf_take(q->next, src_ptr, remaining_len); + } + return ERR_OK; + } + return ERR_MEM; +} + +/** + * @ingroup pbuf + * Creates a single pbuf out of a queue of pbufs. + * + * @remark: Either the source pbuf 'p' is freed by this function or the original + * pbuf 'p' is returned, therefore the caller has to check the result! + * + * @param p the source pbuf + * @param layer pbuf_layer of the new pbuf + * + * @return a new, single pbuf (p->next is NULL) + * or the old pbuf if allocation fails + */ +struct pbuf* +pbuf_coalesce(struct pbuf *p, pbuf_layer layer) +{ + struct pbuf *q; + err_t err; + if (p->next == NULL) { + return p; + } + q = pbuf_alloc(layer, p->tot_len, PBUF_RAM); + if (q == NULL) { + /* @todo: what do we do now? */ + return p; + } + err = pbuf_copy(q, p); + LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ + LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); + pbuf_free(p); + return q; +} + +#if LWIP_CHECKSUM_ON_COPY +/** + * Copies data into a single pbuf (*not* into a pbuf queue!) and updates + * the checksum while copying + * + * @param p the pbuf to copy data into + * @param start_offset offset of p->payload where to copy the data to + * @param dataptr data to copy into the pbuf + * @param len length of data to copy into the pbuf + * @param chksum pointer to the checksum which is updated + * @return ERR_OK if successful, another error if the data does not fit + * within the (first) pbuf (no pbuf queues!) + */ +err_t +pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, + u16_t len, u16_t *chksum) +{ + u32_t acc; + u16_t copy_chksum; + char *dst_ptr; + LWIP_ASSERT("p != NULL", p != NULL); + LWIP_ASSERT("dataptr != NULL", dataptr != NULL); + LWIP_ASSERT("chksum != NULL", chksum != NULL); + LWIP_ASSERT("len != 0", len != 0); + + if ((start_offset >= p->len) || (start_offset + len > p->len)) { + return ERR_ARG; + } + + dst_ptr = ((char*)p->payload) + start_offset; + copy_chksum = LWIP_CHKSUM_COPY(dst_ptr, dataptr, len); + if ((start_offset & 1) != 0) { + copy_chksum = SWAP_BYTES_IN_WORD(copy_chksum); + } + acc = *chksum; + acc += copy_chksum; + *chksum = FOLD_U32T(acc); + return ERR_OK; +} +#endif /* LWIP_CHECKSUM_ON_COPY */ + +/** + * @ingroup pbuf + * Get one byte from the specified position in a pbuf + * WARNING: returns zero for offset >= p->tot_len + * + * @param p pbuf to parse + * @param offset offset into p of the byte to return + * @return byte at an offset into p OR ZERO IF 'offset' >= p->tot_len + */ +u8_t +pbuf_get_at(const struct pbuf* p, u16_t offset) +{ + int ret = pbuf_try_get_at(p, offset); + if (ret >= 0) { + return (u8_t)ret; + } + return 0; +} + +/** + * @ingroup pbuf + * Get one byte from the specified position in a pbuf + * + * @param p pbuf to parse + * @param offset offset into p of the byte to return + * @return byte at an offset into p [0..0xFF] OR negative if 'offset' >= p->tot_len + */ +int +pbuf_try_get_at(const struct pbuf* p, u16_t offset) +{ + u16_t q_idx; + const struct pbuf* q = pbuf_skip_const(p, offset, &q_idx); + + /* return requested data if pbuf is OK */ + if ((q != NULL) && (q->len > q_idx)) { + return ((u8_t*)q->payload)[q_idx]; + } + return -1; +} + +/** + * @ingroup pbuf + * Put one byte to the specified position in a pbuf + * WARNING: silently ignores offset >= p->tot_len + * + * @param p pbuf to fill + * @param offset offset into p of the byte to write + * @param data byte to write at an offset into p + */ +void +pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data) +{ + u16_t q_idx; + struct pbuf* q = pbuf_skip(p, offset, &q_idx); + + /* write requested data if pbuf is OK */ + if ((q != NULL) && (q->len > q_idx)) { + ((u8_t*)q->payload)[q_idx] = data; + } +} + +/** + * @ingroup pbuf + * Compare pbuf contents at specified offset with memory s2, both of length n + * + * @param p pbuf to compare + * @param offset offset into p at which to start comparing + * @param s2 buffer to compare + * @param n length of buffer to compare + * @return zero if equal, nonzero otherwise + * (0xffff if p is too short, diffoffset+1 otherwise) + */ +u16_t +pbuf_memcmp(const struct pbuf* p, u16_t offset, const void* s2, u16_t n) +{ + u16_t start = offset; + const struct pbuf* q = p; + u16_t i; + + /* pbuf long enough to perform check? */ + if(p->tot_len < (offset + n)) { + return 0xffff; + } + + /* get the correct pbuf from chain. We know it succeeds because of p->tot_len check above. */ + while ((q != NULL) && (q->len <= start)) { + start -= q->len; + q = q->next; + } + + /* return requested data if pbuf is OK */ + for (i = 0; i < n; i++) { + /* We know pbuf_get_at() succeeds because of p->tot_len check above. */ + u8_t a = pbuf_get_at(q, start + i); + u8_t b = ((const u8_t*)s2)[i]; + if (a != b) { + return i+1; + } + } + return 0; +} + +/** + * @ingroup pbuf + * Find occurrence of mem (with length mem_len) in pbuf p, starting at offset + * start_offset. + * + * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as + * return value 'not found' + * @param mem search for the contents of this buffer + * @param mem_len length of 'mem' + * @param start_offset offset into p at which to start searching + * @return 0xFFFF if substr was not found in p or the index where it was found + */ +u16_t +pbuf_memfind(const struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_offset) +{ + u16_t i; + u16_t max = p->tot_len - mem_len; + if (p->tot_len >= mem_len + start_offset) { + for (i = start_offset; i <= max; i++) { + u16_t plus = pbuf_memcmp(p, i, mem, mem_len); + if (plus == 0) { + return i; + } + } + } + return 0xFFFF; +} + +/** + * Find occurrence of substr with length substr_len in pbuf p, start at offset + * start_offset + * WARNING: in contrast to strstr(), this one does not stop at the first \0 in + * the pbuf/source string! + * + * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as + * return value 'not found' + * @param substr string to search for in p, maximum length is 0xFFFE + * @return 0xFFFF if substr was not found in p or the index where it was found + */ +u16_t +pbuf_strstr(const struct pbuf* p, const char* substr) +{ + size_t substr_len; + if ((substr == NULL) || (substr[0] == 0) || (p->tot_len == 0xFFFF)) { + return 0xFFFF; + } + substr_len = strlen(substr); + if (substr_len >= 0xFFFF) { + return 0xFFFF; + } + return pbuf_memfind(p, substr, (u16_t)substr_len, 0); +} diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/raw.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/raw.c index 80cf9ec..4ee7457 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/raw.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/raw.c @@ -1,521 +1,521 @@ -/** - * @file - * Implementation of raw protocol PCBs for low-level handling of - * different types of protocols besides (or overriding) those - * already available in lwIP.\n - * See also @ref raw_raw - * - * @defgroup raw_raw RAW - * @ingroup callbackstyle_api - * Implementation of raw protocol PCBs for low-level handling of - * different types of protocols besides (or overriding) those - * already available in lwIP.\n - * @see @ref raw_api - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/def.h" -#include "lwip/memp.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/raw.h" -#include "lwip/stats.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/inet_chksum.h" - -#include - -/** The list of RAW PCBs */ -static struct raw_pcb *raw_pcbs; - -static u8_t -raw_input_match(struct raw_pcb *pcb, u8_t broadcast) -{ - LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ - -#if LWIP_IPV4 && LWIP_IPV6 - /* Dual-stack: PCBs listening to any IP type also listen to any IP address */ - if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { -#if IP_SOF_BROADCAST_RECV - if ((broadcast != 0) && !ip_get_option(pcb, SOF_BROADCAST)) { - return 0; - } -#endif /* IP_SOF_BROADCAST_RECV */ - return 1; - } -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - - /* 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: receive all broadcasts - * Note: broadcast variable can only be 1 if it is an IPv4 broadcast */ - if (broadcast != 0) { -#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))) { - return 1; - } - } - } else -#endif /* LWIP_IPV4 */ - /* Handle IPv4 and IPv6: catch all or exact match */ - if (ip_addr_isany(&pcb->local_ip) || - ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - return 1; - } - } - - return 0; -} - -/** - * Determine if in incoming IP packet is covered by a RAW PCB - * and if so, pass it to a user-provided receive callback function. - * - * Given an incoming IP datagram (as a chain of pbufs) this function - * finds a corresponding RAW PCB and calls the corresponding receive - * callback function. - * - * @param p pbuf to be demultiplexed to a RAW PCB. - * @param inp network interface on which the datagram was received. - * @return - 1 if the packet has been eaten by a RAW PCB receive - * callback function. The caller MAY NOT not reference the - * packet any longer, and MAY NOT call pbuf_free(). - * @return - 0 if packet is not eaten (pbuf is still referenced by the - * caller). - * - */ -u8_t -raw_input(struct pbuf *p, struct netif *inp) -{ - struct raw_pcb *pcb, *prev; - s16_t proto; - u8_t eaten = 0; - u8_t broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); - - LWIP_UNUSED_ARG(inp); - -#if LWIP_IPV6 -#if LWIP_IPV4 - if (IP_HDR_GET_VERSION(p->payload) == 6) -#endif /* LWIP_IPV4 */ - { - struct ip6_hdr *ip6hdr = (struct ip6_hdr *)p->payload; - proto = IP6H_NEXTH(ip6hdr); - } -#if LWIP_IPV4 - else -#endif /* LWIP_IPV4 */ -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - { - proto = IPH_PROTO((struct ip_hdr *)p->payload); - } -#endif /* LWIP_IPV4 */ - - prev = NULL; - pcb = raw_pcbs; - /* loop through all raw pcbs until the packet is eaten by one */ - /* this allows multiple pcbs to match against the packet by design */ - while ((eaten == 0) && (pcb != NULL)) { - if ((pcb->protocol == proto) && raw_input_match(pcb, broadcast)) { - /* receive callback function available? */ - if (pcb->recv != NULL) { -#ifndef LWIP_NOASSERT - void* old_payload = p->payload; -#endif - /* the receive callback function did not eat the packet? */ - eaten = pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()); - if (eaten != 0) { - /* receive function ate the packet */ - p = NULL; - eaten = 1; - if (prev != NULL) { - /* move the pcb to the front of raw_pcbs so that is - found faster next time */ - prev->next = pcb->next; - pcb->next = raw_pcbs; - raw_pcbs = pcb; - } - } else { - /* sanity-check that the receive callback did not alter the pbuf */ - LWIP_ASSERT("raw pcb recv callback altered pbuf payload pointer without eating packet", - p->payload == old_payload); - } - } - /* no receive callback function was set for this raw PCB */ - } - /* drop the packet */ - prev = pcb; - pcb = pcb->next; - } - return eaten; -} - -/** - * @ingroup raw_raw - * Bind a RAW PCB. - * - * @param pcb RAW PCB to be bound with a local address ipaddr. - * @param ipaddr local IP address to bind with. Use IP4_ADDR_ANY to - * bind to all local interfaces. - * - * @return lwIP error code. - * - ERR_OK. Successful. No error occurred. - * - ERR_USE. The specified IP address is already bound to by - * another RAW PCB. - * - * @see raw_disconnect() - */ -err_t -raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr) -{ - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } - ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); - return ERR_OK; -} - -/** - * @ingroup raw_raw - * Connect an RAW PCB. This function is required by upper layers - * of lwip. Using the raw api you could use raw_sendto() instead - * - * This will associate the RAW PCB with the remote address. - * - * @param pcb RAW PCB to be connected with remote address ipaddr and port. - * @param ipaddr remote IP address to connect with. - * - * @return lwIP error code - * - * @see raw_disconnect() and raw_sendto() - */ -err_t -raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr) -{ - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } - ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); - return ERR_OK; -} - -/** - * @ingroup raw_raw - * Set the callback function for received packets that match the - * raw PCB's protocol and binding. - * - * The callback function MUST either - * - eat the packet by calling pbuf_free() and returning non-zero. The - * packet will not be passed to other raw PCBs or other protocol layers. - * - not free the packet, and return zero. The packet will be matched - * against further PCBs and/or forwarded to another protocol layers. - */ -void -raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) -{ - /* remember recv() callback and user data */ - pcb->recv = recv; - pcb->recv_arg = recv_arg; -} - -/** - * @ingroup raw_raw - * Send the raw IP packet to the given address. Note that actually you cannot - * modify the IP headers (this is inconsistent with the receive callback where - * you actually get the IP headers), you can only specify the IP payload here. - * It requires some more changes in lwIP. (there will be a raw_send() function - * then.) - * - * @param pcb the raw pcb which to send - * @param p the IP payload to send - * @param ipaddr the destination address of the IP packet - * - */ -err_t -raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) -{ - err_t err; - struct netif *netif; - const ip_addr_t *src_ip; - struct pbuf *q; /* q will be sent down the stack */ - s16_t header_size; - - if ((pcb == NULL) || (ipaddr == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, ipaddr)) { - return ERR_VAL; - } - - LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_sendto\n")); - - header_size = ( -#if LWIP_IPV4 && LWIP_IPV6 - IP_IS_V6(ipaddr) ? IP6_HLEN : IP_HLEN); -#elif LWIP_IPV4 - IP_HLEN); -#else - IP6_HLEN); -#endif - - /* not enough space to add an IP header to first pbuf in given p chain? */ - if (pbuf_header(p, header_size)) { - /* allocate header in new pbuf */ - q = pbuf_alloc(PBUF_IP, 0, PBUF_RAM); - /* new header pbuf could not be allocated? */ - if (q == NULL) { - LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("raw_sendto: could not allocate header\n")); - return ERR_MEM; - } - if (p->tot_len != 0) { - /* chain header q in front of given pbuf p */ - pbuf_chain(q, p); - } - /* { first pbuf q points to header pbuf } */ - LWIP_DEBUGF(RAW_DEBUG, ("raw_sendto: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); - } else { - /* first pbuf q equals given pbuf */ - q = p; - if (pbuf_header(q, -header_size)) { - LWIP_ASSERT("Can't restore header we just removed!", 0); - return ERR_MEM; - } - } - - if(IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { - /* Don't call ip_route() with IP_ANY_TYPE */ - netif = ip_route(IP46_ADDR_ANY(IP_GET_TYPE(ipaddr)), ipaddr); - } else { - netif = ip_route(&pcb->local_ip, ipaddr); - } - - if (netif == NULL) { - LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: No route to ")); - ip_addr_debug_print(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ipaddr); - /* free any temporary header pbuf allocated by pbuf_header() */ - if (q != p) { - pbuf_free(q); - } - return ERR_RTE; - } - -#if IP_SOF_BROADCAST - if (IP_IS_V4(ipaddr)) - { - /* broadcast filter? */ - if (!ip_get_option(pcb, SOF_BROADCAST) && ip_addr_isbroadcast(ipaddr, netif)) { - LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: SOF_BROADCAST not enabled on pcb %p\n", (void *)pcb)); - /* free any temporary header pbuf allocated by pbuf_header() */ - if (q != p) { - pbuf_free(q); - } - return ERR_VAL; - } - } -#endif /* IP_SOF_BROADCAST */ - - if (ip_addr_isany(&pcb->local_ip)) { - /* use outgoing network interface IP address as source address */ - src_ip = ip_netif_get_local_ip(netif, ipaddr); -#if LWIP_IPV6 - if (src_ip == NULL) { - if (q != p) { - pbuf_free(q); - } - return ERR_RTE; - } -#endif /* LWIP_IPV6 */ - } else { - /* use RAW PCB local IP address as source address */ - src_ip = &pcb->local_ip; - } - -#if LWIP_IPV6 - /* If requested, based on the IPV6_CHECKSUM socket option per RFC3542, - compute the checksum and update the checksum in the payload. */ - if (IP_IS_V6(ipaddr) && pcb->chksum_reqd) { - u16_t chksum = ip6_chksum_pseudo(p, pcb->protocol, p->tot_len, ip_2_ip6(src_ip), ip_2_ip6(ipaddr)); - LWIP_ASSERT("Checksum must fit into first pbuf", p->len >= (pcb->chksum_offset + 2)); - SMEMCPY(((u8_t *)p->payload) + pcb->chksum_offset, &chksum, sizeof(u16_t)); - } -#endif - - NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); - err = ip_output_if(q, src_ip, ipaddr, pcb->ttl, pcb->tos, pcb->protocol, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - - /* did we chain a header earlier? */ - if (q != p) { - /* free the header */ - pbuf_free(q); - } - return err; -} - -/** - * @ingroup raw_raw - * Send the raw IP packet to the address given by raw_connect() - * - * @param pcb the raw pcb which to send - * @param p the IP payload to send - * - */ -err_t -raw_send(struct raw_pcb *pcb, struct pbuf *p) -{ - return raw_sendto(pcb, p, &pcb->remote_ip); -} - -/** - * @ingroup raw_raw - * Remove an RAW PCB. - * - * @param pcb RAW PCB to be removed. The PCB is removed from the list of - * RAW PCB's and the data structure is freed from memory. - * - * @see raw_new() - */ -void -raw_remove(struct raw_pcb *pcb) -{ - struct raw_pcb *pcb2; - /* pcb to be removed is first in list? */ - if (raw_pcbs == pcb) { - /* make list start at 2nd pcb */ - raw_pcbs = raw_pcbs->next; - /* pcb not 1st in list */ - } else { - for (pcb2 = raw_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { - /* find pcb in raw_pcbs list */ - if (pcb2->next != NULL && pcb2->next == pcb) { - /* remove pcb from list */ - pcb2->next = pcb->next; - break; - } - } - } - memp_free(MEMP_RAW_PCB, pcb); -} - -/** - * @ingroup raw_raw - * Create a RAW PCB. - * - * @return The RAW PCB which was created. NULL if the PCB data structure - * could not be allocated. - * - * @param proto the protocol number of the IPs payload (e.g. IP_PROTO_ICMP) - * - * @see raw_remove() - */ -struct raw_pcb * -raw_new(u8_t proto) -{ - struct raw_pcb *pcb; - - LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_new\n")); - - pcb = (struct raw_pcb *)memp_malloc(MEMP_RAW_PCB); - /* could allocate RAW PCB? */ - if (pcb != NULL) { - /* initialize PCB to all zeroes */ - memset(pcb, 0, sizeof(struct raw_pcb)); - pcb->protocol = proto; - pcb->ttl = RAW_TTL; - pcb->next = raw_pcbs; - raw_pcbs = pcb; - } - return pcb; -} - -/** - * @ingroup raw_raw - * Create a RAW PCB for specific IP type. - * - * @return The RAW PCB which was created. NULL if the PCB data structure - * could not be allocated. - * - * @param type IP address type, see @ref lwip_ip_addr_type definitions. - * If you want to listen to IPv4 and IPv6 (dual-stack) packets, - * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. - * @param proto the protocol number (next header) of the IPv6 packet payload - * (e.g. IP6_NEXTH_ICMP6) - * - * @see raw_remove() - */ -struct raw_pcb * -raw_new_ip_type(u8_t type, u8_t proto) -{ - struct raw_pcb *pcb; - pcb = raw_new(proto); -#if LWIP_IPV4 && LWIP_IPV6 - if (pcb != NULL) { - IP_SET_TYPE_VAL(pcb->local_ip, type); - IP_SET_TYPE_VAL(pcb->remote_ip, type); - } -#else /* LWIP_IPV4 && LWIP_IPV6 */ - LWIP_UNUSED_ARG(type); -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - return pcb; -} - -/** This function is called from netif.c when address is changed - * - * @param old_addr IP address of the netif before change - * @param new_addr IP address of the netif after change - */ -void raw_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) -{ - struct raw_pcb* rpcb; - - if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { - for (rpcb = raw_pcbs; rpcb != NULL; rpcb = rpcb->next) { - /* PCB bound to current local interface address? */ - if (ip_addr_cmp(&rpcb->local_ip, old_addr)) { - /* The PCB is bound to the old ipaddr and - * is set to bound to the new one instead */ - ip_addr_copy(rpcb->local_ip, *new_addr); - } - } - } -} - -#endif /* LWIP_RAW */ +/** + * @file + * Implementation of raw protocol PCBs for low-level handling of + * different types of protocols besides (or overriding) those + * already available in lwIP.\n + * See also @ref raw_raw + * + * @defgroup raw_raw RAW + * @ingroup callbackstyle_api + * Implementation of raw protocol PCBs for low-level handling of + * different types of protocols besides (or overriding) those + * already available in lwIP.\n + * @see @ref raw_api + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/def.h" +#include "lwip/memp.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/raw.h" +#include "lwip/stats.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/inet_chksum.h" + +#include + +/** The list of RAW PCBs */ +static struct raw_pcb *raw_pcbs; + +static u8_t +raw_input_match(struct raw_pcb *pcb, u8_t broadcast) +{ + LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ + +#if LWIP_IPV4 && LWIP_IPV6 + /* Dual-stack: PCBs listening to any IP type also listen to any IP address */ + if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { +#if IP_SOF_BROADCAST_RECV + if ((broadcast != 0) && !ip_get_option(pcb, SOF_BROADCAST)) { + return 0; + } +#endif /* IP_SOF_BROADCAST_RECV */ + return 1; + } +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + + /* 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: receive all broadcasts + * Note: broadcast variable can only be 1 if it is an IPv4 broadcast */ + if (broadcast != 0) { +#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))) { + return 1; + } + } + } else +#endif /* LWIP_IPV4 */ + /* Handle IPv4 and IPv6: catch all or exact match */ + if (ip_addr_isany(&pcb->local_ip) || + ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + return 1; + } + } + + return 0; +} + +/** + * Determine if in incoming IP packet is covered by a RAW PCB + * and if so, pass it to a user-provided receive callback function. + * + * Given an incoming IP datagram (as a chain of pbufs) this function + * finds a corresponding RAW PCB and calls the corresponding receive + * callback function. + * + * @param p pbuf to be demultiplexed to a RAW PCB. + * @param inp network interface on which the datagram was received. + * @return - 1 if the packet has been eaten by a RAW PCB receive + * callback function. The caller MAY NOT not reference the + * packet any longer, and MAY NOT call pbuf_free(). + * @return - 0 if packet is not eaten (pbuf is still referenced by the + * caller). + * + */ +u8_t +raw_input(struct pbuf *p, struct netif *inp) +{ + struct raw_pcb *pcb, *prev; + s16_t proto; + u8_t eaten = 0; + u8_t broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); + + LWIP_UNUSED_ARG(inp); + +#if LWIP_IPV6 +#if LWIP_IPV4 + if (IP_HDR_GET_VERSION(p->payload) == 6) +#endif /* LWIP_IPV4 */ + { + struct ip6_hdr *ip6hdr = (struct ip6_hdr *)p->payload; + proto = IP6H_NEXTH(ip6hdr); + } +#if LWIP_IPV4 + else +#endif /* LWIP_IPV4 */ +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + { + proto = IPH_PROTO((struct ip_hdr *)p->payload); + } +#endif /* LWIP_IPV4 */ + + prev = NULL; + pcb = raw_pcbs; + /* loop through all raw pcbs until the packet is eaten by one */ + /* this allows multiple pcbs to match against the packet by design */ + while ((eaten == 0) && (pcb != NULL)) { + if ((pcb->protocol == proto) && raw_input_match(pcb, broadcast)) { + /* receive callback function available? */ + if (pcb->recv != NULL) { +#ifndef LWIP_NOASSERT + void* old_payload = p->payload; +#endif + /* the receive callback function did not eat the packet? */ + eaten = pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()); + if (eaten != 0) { + /* receive function ate the packet */ + p = NULL; + eaten = 1; + if (prev != NULL) { + /* move the pcb to the front of raw_pcbs so that is + found faster next time */ + prev->next = pcb->next; + pcb->next = raw_pcbs; + raw_pcbs = pcb; + } + } else { + /* sanity-check that the receive callback did not alter the pbuf */ + LWIP_ASSERT("raw pcb recv callback altered pbuf payload pointer without eating packet", + p->payload == old_payload); + } + } + /* no receive callback function was set for this raw PCB */ + } + /* drop the packet */ + prev = pcb; + pcb = pcb->next; + } + return eaten; +} + +/** + * @ingroup raw_raw + * Bind a RAW PCB. + * + * @param pcb RAW PCB to be bound with a local address ipaddr. + * @param ipaddr local IP address to bind with. Use IP4_ADDR_ANY to + * bind to all local interfaces. + * + * @return lwIP error code. + * - ERR_OK. Successful. No error occurred. + * - ERR_USE. The specified IP address is already bound to by + * another RAW PCB. + * + * @see raw_disconnect() + */ +err_t +raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr) +{ + if ((pcb == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); + return ERR_OK; +} + +/** + * @ingroup raw_raw + * Connect an RAW PCB. This function is required by upper layers + * of lwip. Using the raw api you could use raw_sendto() instead + * + * This will associate the RAW PCB with the remote address. + * + * @param pcb RAW PCB to be connected with remote address ipaddr and port. + * @param ipaddr remote IP address to connect with. + * + * @return lwIP error code + * + * @see raw_disconnect() and raw_sendto() + */ +err_t +raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr) +{ + if ((pcb == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); + return ERR_OK; +} + +/** + * @ingroup raw_raw + * Set the callback function for received packets that match the + * raw PCB's protocol and binding. + * + * The callback function MUST either + * - eat the packet by calling pbuf_free() and returning non-zero. The + * packet will not be passed to other raw PCBs or other protocol layers. + * - not free the packet, and return zero. The packet will be matched + * against further PCBs and/or forwarded to another protocol layers. + */ +void +raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) +{ + /* remember recv() callback and user data */ + pcb->recv = recv; + pcb->recv_arg = recv_arg; +} + +/** + * @ingroup raw_raw + * Send the raw IP packet to the given address. Note that actually you cannot + * modify the IP headers (this is inconsistent with the receive callback where + * you actually get the IP headers), you can only specify the IP payload here. + * It requires some more changes in lwIP. (there will be a raw_send() function + * then.) + * + * @param pcb the raw pcb which to send + * @param p the IP payload to send + * @param ipaddr the destination address of the IP packet + * + */ +err_t +raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) +{ + err_t err; + struct netif *netif; + const ip_addr_t *src_ip; + struct pbuf *q; /* q will be sent down the stack */ + s16_t header_size; + + if ((pcb == NULL) || (ipaddr == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, ipaddr)) { + return ERR_VAL; + } + + LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_sendto\n")); + + header_size = ( +#if LWIP_IPV4 && LWIP_IPV6 + IP_IS_V6(ipaddr) ? IP6_HLEN : IP_HLEN); +#elif LWIP_IPV4 + IP_HLEN); +#else + IP6_HLEN); +#endif + + /* not enough space to add an IP header to first pbuf in given p chain? */ + if (pbuf_header(p, header_size)) { + /* allocate header in new pbuf */ + q = pbuf_alloc(PBUF_IP, 0, PBUF_RAM); + /* new header pbuf could not be allocated? */ + if (q == NULL) { + LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("raw_sendto: could not allocate header\n")); + return ERR_MEM; + } + if (p->tot_len != 0) { + /* chain header q in front of given pbuf p */ + pbuf_chain(q, p); + } + /* { first pbuf q points to header pbuf } */ + LWIP_DEBUGF(RAW_DEBUG, ("raw_sendto: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); + } else { + /* first pbuf q equals given pbuf */ + q = p; + if (pbuf_header(q, -header_size)) { + LWIP_ASSERT("Can't restore header we just removed!", 0); + return ERR_MEM; + } + } + + if(IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { + /* Don't call ip_route() with IP_ANY_TYPE */ + netif = ip_route(IP46_ADDR_ANY(IP_GET_TYPE(ipaddr)), ipaddr); + } else { + netif = ip_route(&pcb->local_ip, ipaddr); + } + + if (netif == NULL) { + LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: No route to ")); + ip_addr_debug_print(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ipaddr); + /* free any temporary header pbuf allocated by pbuf_header() */ + if (q != p) { + pbuf_free(q); + } + return ERR_RTE; + } + +#if IP_SOF_BROADCAST + if (IP_IS_V4(ipaddr)) + { + /* broadcast filter? */ + if (!ip_get_option(pcb, SOF_BROADCAST) && ip_addr_isbroadcast(ipaddr, netif)) { + LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: SOF_BROADCAST not enabled on pcb %p\n", (void *)pcb)); + /* free any temporary header pbuf allocated by pbuf_header() */ + if (q != p) { + pbuf_free(q); + } + return ERR_VAL; + } + } +#endif /* IP_SOF_BROADCAST */ + + if (ip_addr_isany(&pcb->local_ip)) { + /* use outgoing network interface IP address as source address */ + src_ip = ip_netif_get_local_ip(netif, ipaddr); +#if LWIP_IPV6 + if (src_ip == NULL) { + if (q != p) { + pbuf_free(q); + } + return ERR_RTE; + } +#endif /* LWIP_IPV6 */ + } else { + /* use RAW PCB local IP address as source address */ + src_ip = &pcb->local_ip; + } + +#if LWIP_IPV6 + /* If requested, based on the IPV6_CHECKSUM socket option per RFC3542, + compute the checksum and update the checksum in the payload. */ + if (IP_IS_V6(ipaddr) && pcb->chksum_reqd) { + u16_t chksum = ip6_chksum_pseudo(p, pcb->protocol, p->tot_len, ip_2_ip6(src_ip), ip_2_ip6(ipaddr)); + LWIP_ASSERT("Checksum must fit into first pbuf", p->len >= (pcb->chksum_offset + 2)); + SMEMCPY(((u8_t *)p->payload) + pcb->chksum_offset, &chksum, sizeof(u16_t)); + } +#endif + + NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); + err = ip_output_if(q, src_ip, ipaddr, pcb->ttl, pcb->tos, pcb->protocol, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + + /* did we chain a header earlier? */ + if (q != p) { + /* free the header */ + pbuf_free(q); + } + return err; +} + +/** + * @ingroup raw_raw + * Send the raw IP packet to the address given by raw_connect() + * + * @param pcb the raw pcb which to send + * @param p the IP payload to send + * + */ +err_t +raw_send(struct raw_pcb *pcb, struct pbuf *p) +{ + return raw_sendto(pcb, p, &pcb->remote_ip); +} + +/** + * @ingroup raw_raw + * Remove an RAW PCB. + * + * @param pcb RAW PCB to be removed. The PCB is removed from the list of + * RAW PCB's and the data structure is freed from memory. + * + * @see raw_new() + */ +void +raw_remove(struct raw_pcb *pcb) +{ + struct raw_pcb *pcb2; + /* pcb to be removed is first in list? */ + if (raw_pcbs == pcb) { + /* make list start at 2nd pcb */ + raw_pcbs = raw_pcbs->next; + /* pcb not 1st in list */ + } else { + for (pcb2 = raw_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { + /* find pcb in raw_pcbs list */ + if (pcb2->next != NULL && pcb2->next == pcb) { + /* remove pcb from list */ + pcb2->next = pcb->next; + break; + } + } + } + memp_free(MEMP_RAW_PCB, pcb); +} + +/** + * @ingroup raw_raw + * Create a RAW PCB. + * + * @return The RAW PCB which was created. NULL if the PCB data structure + * could not be allocated. + * + * @param proto the protocol number of the IPs payload (e.g. IP_PROTO_ICMP) + * + * @see raw_remove() + */ +struct raw_pcb * +raw_new(u8_t proto) +{ + struct raw_pcb *pcb; + + LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_TRACE, ("raw_new\n")); + + pcb = (struct raw_pcb *)memp_malloc(MEMP_RAW_PCB); + /* could allocate RAW PCB? */ + if (pcb != NULL) { + /* initialize PCB to all zeroes */ + memset(pcb, 0, sizeof(struct raw_pcb)); + pcb->protocol = proto; + pcb->ttl = RAW_TTL; + pcb->next = raw_pcbs; + raw_pcbs = pcb; + } + return pcb; +} + +/** + * @ingroup raw_raw + * Create a RAW PCB for specific IP type. + * + * @return The RAW PCB which was created. NULL if the PCB data structure + * could not be allocated. + * + * @param type IP address type, see @ref lwip_ip_addr_type definitions. + * If you want to listen to IPv4 and IPv6 (dual-stack) packets, + * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. + * @param proto the protocol number (next header) of the IPv6 packet payload + * (e.g. IP6_NEXTH_ICMP6) + * + * @see raw_remove() + */ +struct raw_pcb * +raw_new_ip_type(u8_t type, u8_t proto) +{ + struct raw_pcb *pcb; + pcb = raw_new(proto); +#if LWIP_IPV4 && LWIP_IPV6 + if (pcb != NULL) { + IP_SET_TYPE_VAL(pcb->local_ip, type); + IP_SET_TYPE_VAL(pcb->remote_ip, type); + } +#else /* LWIP_IPV4 && LWIP_IPV6 */ + LWIP_UNUSED_ARG(type); +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + return pcb; +} + +/** This function is called from netif.c when address is changed + * + * @param old_addr IP address of the netif before change + * @param new_addr IP address of the netif after change + */ +void raw_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) +{ + struct raw_pcb* rpcb; + + if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { + for (rpcb = raw_pcbs; rpcb != NULL; rpcb = rpcb->next) { + /* PCB bound to current local interface address? */ + if (ip_addr_cmp(&rpcb->local_ip, old_addr)) { + /* The PCB is bound to the old ipaddr and + * is set to bound to the new one instead */ + ip_addr_copy(rpcb->local_ip, *new_addr); + } + } + } +} + +#endif /* LWIP_RAW */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/stats.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/stats.c index 893d199..32981a6 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/stats.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/stats.c @@ -1,169 +1,169 @@ -/** - * @file - * Statistics module - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_STATS /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/def.h" -#include "lwip/stats.h" -#include "lwip/mem.h" -#include "lwip/debug.h" - -#include - -struct stats_ lwip_stats; - -void -stats_init(void) -{ -#ifdef LWIP_DEBUG -#if MEM_STATS - lwip_stats.mem.name = "MEM"; -#endif /* MEM_STATS */ -#endif /* LWIP_DEBUG */ -} - -#if LWIP_STATS_DISPLAY -void -stats_display_proto(struct stats_proto *proto, const char *name) -{ - LWIP_PLATFORM_DIAG(("\n%s\n\t", name)); - LWIP_PLATFORM_DIAG(("xmit: %"STAT_COUNTER_F"\n\t", proto->xmit)); - LWIP_PLATFORM_DIAG(("recv: %"STAT_COUNTER_F"\n\t", proto->recv)); - LWIP_PLATFORM_DIAG(("fw: %"STAT_COUNTER_F"\n\t", proto->fw)); - LWIP_PLATFORM_DIAG(("drop: %"STAT_COUNTER_F"\n\t", proto->drop)); - LWIP_PLATFORM_DIAG(("chkerr: %"STAT_COUNTER_F"\n\t", proto->chkerr)); - LWIP_PLATFORM_DIAG(("lenerr: %"STAT_COUNTER_F"\n\t", proto->lenerr)); - LWIP_PLATFORM_DIAG(("memerr: %"STAT_COUNTER_F"\n\t", proto->memerr)); - LWIP_PLATFORM_DIAG(("rterr: %"STAT_COUNTER_F"\n\t", proto->rterr)); - LWIP_PLATFORM_DIAG(("proterr: %"STAT_COUNTER_F"\n\t", proto->proterr)); - LWIP_PLATFORM_DIAG(("opterr: %"STAT_COUNTER_F"\n\t", proto->opterr)); - LWIP_PLATFORM_DIAG(("err: %"STAT_COUNTER_F"\n\t", proto->err)); - LWIP_PLATFORM_DIAG(("cachehit: %"STAT_COUNTER_F"\n", proto->cachehit)); -} - -#if IGMP_STATS || MLD6_STATS -void -stats_display_igmp(struct stats_igmp *igmp, const char *name) -{ - LWIP_PLATFORM_DIAG(("\n%s\n\t", name)); - LWIP_PLATFORM_DIAG(("xmit: %"STAT_COUNTER_F"\n\t", igmp->xmit)); - LWIP_PLATFORM_DIAG(("recv: %"STAT_COUNTER_F"\n\t", igmp->recv)); - LWIP_PLATFORM_DIAG(("drop: %"STAT_COUNTER_F"\n\t", igmp->drop)); - LWIP_PLATFORM_DIAG(("chkerr: %"STAT_COUNTER_F"\n\t", igmp->chkerr)); - LWIP_PLATFORM_DIAG(("lenerr: %"STAT_COUNTER_F"\n\t", igmp->lenerr)); - LWIP_PLATFORM_DIAG(("memerr: %"STAT_COUNTER_F"\n\t", igmp->memerr)); - LWIP_PLATFORM_DIAG(("proterr: %"STAT_COUNTER_F"\n\t", igmp->proterr)); - LWIP_PLATFORM_DIAG(("rx_v1: %"STAT_COUNTER_F"\n\t", igmp->rx_v1)); - LWIP_PLATFORM_DIAG(("rx_group: %"STAT_COUNTER_F"\n\t", igmp->rx_group)); - LWIP_PLATFORM_DIAG(("rx_general: %"STAT_COUNTER_F"\n\t", igmp->rx_general)); - LWIP_PLATFORM_DIAG(("rx_report: %"STAT_COUNTER_F"\n\t", igmp->rx_report)); - LWIP_PLATFORM_DIAG(("tx_join: %"STAT_COUNTER_F"\n\t", igmp->tx_join)); - LWIP_PLATFORM_DIAG(("tx_leave: %"STAT_COUNTER_F"\n\t", igmp->tx_leave)); - LWIP_PLATFORM_DIAG(("tx_report: %"STAT_COUNTER_F"\n", igmp->tx_report)); -} -#endif /* IGMP_STATS || MLD6_STATS */ - -#if MEM_STATS || MEMP_STATS -void -stats_display_mem(struct stats_mem *mem, const char *name) -{ - LWIP_PLATFORM_DIAG(("\nMEM %s\n\t", name)); - LWIP_PLATFORM_DIAG(("avail: %"U32_F"\n\t", (u32_t)mem->avail)); - LWIP_PLATFORM_DIAG(("used: %"U32_F"\n\t", (u32_t)mem->used)); - LWIP_PLATFORM_DIAG(("max: %"U32_F"\n\t", (u32_t)mem->max)); - LWIP_PLATFORM_DIAG(("err: %"U32_F"\n", (u32_t)mem->err)); -} - -#if MEMP_STATS -void -stats_display_memp(struct stats_mem *mem, int index) -{ - if (index < MEMP_MAX) { - stats_display_mem(mem, mem->name); - } -} -#endif /* MEMP_STATS */ -#endif /* MEM_STATS || MEMP_STATS */ - -#if SYS_STATS -void -stats_display_sys(struct stats_sys *sys) -{ - LWIP_PLATFORM_DIAG(("\nSYS\n\t")); - LWIP_PLATFORM_DIAG(("sem.used: %"U32_F"\n\t", (u32_t)sys->sem.used)); - LWIP_PLATFORM_DIAG(("sem.max: %"U32_F"\n\t", (u32_t)sys->sem.max)); - LWIP_PLATFORM_DIAG(("sem.err: %"U32_F"\n\t", (u32_t)sys->sem.err)); - LWIP_PLATFORM_DIAG(("mutex.used: %"U32_F"\n\t", (u32_t)sys->mutex.used)); - LWIP_PLATFORM_DIAG(("mutex.max: %"U32_F"\n\t", (u32_t)sys->mutex.max)); - LWIP_PLATFORM_DIAG(("mutex.err: %"U32_F"\n\t", (u32_t)sys->mutex.err)); - LWIP_PLATFORM_DIAG(("mbox.used: %"U32_F"\n\t", (u32_t)sys->mbox.used)); - LWIP_PLATFORM_DIAG(("mbox.max: %"U32_F"\n\t", (u32_t)sys->mbox.max)); - LWIP_PLATFORM_DIAG(("mbox.err: %"U32_F"\n", (u32_t)sys->mbox.err)); -} -#endif /* SYS_STATS */ - -void -stats_display(void) -{ - s16_t i; - - LINK_STATS_DISPLAY(); - ETHARP_STATS_DISPLAY(); - IPFRAG_STATS_DISPLAY(); - IP6_FRAG_STATS_DISPLAY(); - IP_STATS_DISPLAY(); - ND6_STATS_DISPLAY(); - IP6_STATS_DISPLAY(); - IGMP_STATS_DISPLAY(); - MLD6_STATS_DISPLAY(); - ICMP_STATS_DISPLAY(); - ICMP6_STATS_DISPLAY(); - UDP_STATS_DISPLAY(); - TCP_STATS_DISPLAY(); - MEM_STATS_DISPLAY(); - for (i = 0; i < MEMP_MAX; i++) { - MEMP_STATS_DISPLAY(i); - } - SYS_STATS_DISPLAY(); -} -#endif /* LWIP_STATS_DISPLAY */ - -#endif /* LWIP_STATS */ - +/** + * @file + * Statistics module + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_STATS /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/def.h" +#include "lwip/stats.h" +#include "lwip/mem.h" +#include "lwip/debug.h" + +#include + +struct stats_ lwip_stats; + +void +stats_init(void) +{ +#ifdef LWIP_DEBUG +#if MEM_STATS + lwip_stats.mem.name = "MEM"; +#endif /* MEM_STATS */ +#endif /* LWIP_DEBUG */ +} + +#if LWIP_STATS_DISPLAY +void +stats_display_proto(struct stats_proto *proto, const char *name) +{ + LWIP_PLATFORM_DIAG(("\n%s\n\t", name)); + LWIP_PLATFORM_DIAG(("xmit: %"STAT_COUNTER_F"\n\t", proto->xmit)); + LWIP_PLATFORM_DIAG(("recv: %"STAT_COUNTER_F"\n\t", proto->recv)); + LWIP_PLATFORM_DIAG(("fw: %"STAT_COUNTER_F"\n\t", proto->fw)); + LWIP_PLATFORM_DIAG(("drop: %"STAT_COUNTER_F"\n\t", proto->drop)); + LWIP_PLATFORM_DIAG(("chkerr: %"STAT_COUNTER_F"\n\t", proto->chkerr)); + LWIP_PLATFORM_DIAG(("lenerr: %"STAT_COUNTER_F"\n\t", proto->lenerr)); + LWIP_PLATFORM_DIAG(("memerr: %"STAT_COUNTER_F"\n\t", proto->memerr)); + LWIP_PLATFORM_DIAG(("rterr: %"STAT_COUNTER_F"\n\t", proto->rterr)); + LWIP_PLATFORM_DIAG(("proterr: %"STAT_COUNTER_F"\n\t", proto->proterr)); + LWIP_PLATFORM_DIAG(("opterr: %"STAT_COUNTER_F"\n\t", proto->opterr)); + LWIP_PLATFORM_DIAG(("err: %"STAT_COUNTER_F"\n\t", proto->err)); + LWIP_PLATFORM_DIAG(("cachehit: %"STAT_COUNTER_F"\n", proto->cachehit)); +} + +#if IGMP_STATS || MLD6_STATS +void +stats_display_igmp(struct stats_igmp *igmp, const char *name) +{ + LWIP_PLATFORM_DIAG(("\n%s\n\t", name)); + LWIP_PLATFORM_DIAG(("xmit: %"STAT_COUNTER_F"\n\t", igmp->xmit)); + LWIP_PLATFORM_DIAG(("recv: %"STAT_COUNTER_F"\n\t", igmp->recv)); + LWIP_PLATFORM_DIAG(("drop: %"STAT_COUNTER_F"\n\t", igmp->drop)); + LWIP_PLATFORM_DIAG(("chkerr: %"STAT_COUNTER_F"\n\t", igmp->chkerr)); + LWIP_PLATFORM_DIAG(("lenerr: %"STAT_COUNTER_F"\n\t", igmp->lenerr)); + LWIP_PLATFORM_DIAG(("memerr: %"STAT_COUNTER_F"\n\t", igmp->memerr)); + LWIP_PLATFORM_DIAG(("proterr: %"STAT_COUNTER_F"\n\t", igmp->proterr)); + LWIP_PLATFORM_DIAG(("rx_v1: %"STAT_COUNTER_F"\n\t", igmp->rx_v1)); + LWIP_PLATFORM_DIAG(("rx_group: %"STAT_COUNTER_F"\n\t", igmp->rx_group)); + LWIP_PLATFORM_DIAG(("rx_general: %"STAT_COUNTER_F"\n\t", igmp->rx_general)); + LWIP_PLATFORM_DIAG(("rx_report: %"STAT_COUNTER_F"\n\t", igmp->rx_report)); + LWIP_PLATFORM_DIAG(("tx_join: %"STAT_COUNTER_F"\n\t", igmp->tx_join)); + LWIP_PLATFORM_DIAG(("tx_leave: %"STAT_COUNTER_F"\n\t", igmp->tx_leave)); + LWIP_PLATFORM_DIAG(("tx_report: %"STAT_COUNTER_F"\n", igmp->tx_report)); +} +#endif /* IGMP_STATS || MLD6_STATS */ + +#if MEM_STATS || MEMP_STATS +void +stats_display_mem(struct stats_mem *mem, const char *name) +{ + LWIP_PLATFORM_DIAG(("\nMEM %s\n\t", name)); + LWIP_PLATFORM_DIAG(("avail: %"U32_F"\n\t", (u32_t)mem->avail)); + LWIP_PLATFORM_DIAG(("used: %"U32_F"\n\t", (u32_t)mem->used)); + LWIP_PLATFORM_DIAG(("max: %"U32_F"\n\t", (u32_t)mem->max)); + LWIP_PLATFORM_DIAG(("err: %"U32_F"\n", (u32_t)mem->err)); +} + +#if MEMP_STATS +void +stats_display_memp(struct stats_mem *mem, int index) +{ + if (index < MEMP_MAX) { + stats_display_mem(mem, mem->name); + } +} +#endif /* MEMP_STATS */ +#endif /* MEM_STATS || MEMP_STATS */ + +#if SYS_STATS +void +stats_display_sys(struct stats_sys *sys) +{ + LWIP_PLATFORM_DIAG(("\nSYS\n\t")); + LWIP_PLATFORM_DIAG(("sem.used: %"U32_F"\n\t", (u32_t)sys->sem.used)); + LWIP_PLATFORM_DIAG(("sem.max: %"U32_F"\n\t", (u32_t)sys->sem.max)); + LWIP_PLATFORM_DIAG(("sem.err: %"U32_F"\n\t", (u32_t)sys->sem.err)); + LWIP_PLATFORM_DIAG(("mutex.used: %"U32_F"\n\t", (u32_t)sys->mutex.used)); + LWIP_PLATFORM_DIAG(("mutex.max: %"U32_F"\n\t", (u32_t)sys->mutex.max)); + LWIP_PLATFORM_DIAG(("mutex.err: %"U32_F"\n\t", (u32_t)sys->mutex.err)); + LWIP_PLATFORM_DIAG(("mbox.used: %"U32_F"\n\t", (u32_t)sys->mbox.used)); + LWIP_PLATFORM_DIAG(("mbox.max: %"U32_F"\n\t", (u32_t)sys->mbox.max)); + LWIP_PLATFORM_DIAG(("mbox.err: %"U32_F"\n", (u32_t)sys->mbox.err)); +} +#endif /* SYS_STATS */ + +void +stats_display(void) +{ + s16_t i; + + LINK_STATS_DISPLAY(); + ETHARP_STATS_DISPLAY(); + IPFRAG_STATS_DISPLAY(); + IP6_FRAG_STATS_DISPLAY(); + IP_STATS_DISPLAY(); + ND6_STATS_DISPLAY(); + IP6_STATS_DISPLAY(); + IGMP_STATS_DISPLAY(); + MLD6_STATS_DISPLAY(); + ICMP_STATS_DISPLAY(); + ICMP6_STATS_DISPLAY(); + UDP_STATS_DISPLAY(); + TCP_STATS_DISPLAY(); + MEM_STATS_DISPLAY(); + for (i = 0; i < MEMP_MAX; i++) { + MEMP_STATS_DISPLAY(i); + } + SYS_STATS_DISPLAY(); +} +#endif /* LWIP_STATS_DISPLAY */ + +#endif /* LWIP_STATS */ + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/sys.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/sys.c index 7059b4d..4d059a4 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/sys.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/sys.c @@ -1,106 +1,106 @@ -/** - * @file - * lwIP Operating System abstraction - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -/** - * @defgroup sys_layer Porting (system abstraction layer) - * @ingroup lwip - * @verbinclude "sys_arch.txt" - * - * @defgroup sys_os OS abstraction layer - * @ingroup sys_layer - * No need to implement functions in this section in NO_SYS mode. - * - * @defgroup sys_sem Semaphores - * @ingroup sys_os - * - * @defgroup sys_mutex Mutexes - * @ingroup sys_os - * Mutexes are recommended to correctly handle priority inversion, - * especially if you use LWIP_CORE_LOCKING . - * - * @defgroup sys_mbox Mailboxes - * @ingroup sys_os - * - * @defgroup sys_time Time - * @ingroup sys_layer - * - * @defgroup sys_prot Critical sections - * @ingroup sys_layer - * Used to protect short regions of code against concurrent access. - * - Your system is a bare-metal system (probably with an RTOS) - * and interrupts are under your control: - * Implement this as LockInterrupts() / UnlockInterrupts() - * - Your system uses an RTOS with deferred interrupt handling from a - * worker thread: Implement as a global mutex or lock/unlock scheduler - * - Your system uses a high-level OS with e.g. POSIX signals: - * Implement as a global mutex - * - * @defgroup sys_misc Misc - * @ingroup sys_os - */ - -#include "lwip/opt.h" - -#include "lwip/sys.h" - -/* Most of the functions defined in sys.h must be implemented in the - * architecture-dependent file sys_arch.c */ - -#if !NO_SYS - -#ifndef sys_msleep -/** - * Sleep for some ms. Timeouts are NOT processed while sleeping. - * - * @param ms number of milliseconds to sleep - */ -void -sys_msleep(u32_t ms) -{ - if (ms > 0) { - sys_sem_t delaysem; - err_t err = sys_sem_new(&delaysem, 0); - if (err == ERR_OK) { - sys_arch_sem_wait(&delaysem, ms); - sys_sem_free(&delaysem); - } - } -} -#endif /* sys_msleep */ - -#endif /* !NO_SYS */ +/** + * @file + * lwIP Operating System abstraction + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +/** + * @defgroup sys_layer Porting (system abstraction layer) + * @ingroup lwip + * @verbinclude "sys_arch.txt" + * + * @defgroup sys_os OS abstraction layer + * @ingroup sys_layer + * No need to implement functions in this section in NO_SYS mode. + * + * @defgroup sys_sem Semaphores + * @ingroup sys_os + * + * @defgroup sys_mutex Mutexes + * @ingroup sys_os + * Mutexes are recommended to correctly handle priority inversion, + * especially if you use LWIP_CORE_LOCKING . + * + * @defgroup sys_mbox Mailboxes + * @ingroup sys_os + * + * @defgroup sys_time Time + * @ingroup sys_layer + * + * @defgroup sys_prot Critical sections + * @ingroup sys_layer + * Used to protect short regions of code against concurrent access. + * - Your system is a bare-metal system (probably with an RTOS) + * and interrupts are under your control: + * Implement this as LockInterrupts() / UnlockInterrupts() + * - Your system uses an RTOS with deferred interrupt handling from a + * worker thread: Implement as a global mutex or lock/unlock scheduler + * - Your system uses a high-level OS with e.g. POSIX signals: + * Implement as a global mutex + * + * @defgroup sys_misc Misc + * @ingroup sys_os + */ + +#include "lwip/opt.h" + +#include "lwip/sys.h" + +/* Most of the functions defined in sys.h must be implemented in the + * architecture-dependent file sys_arch.c */ + +#if !NO_SYS + +#ifndef sys_msleep +/** + * Sleep for some ms. Timeouts are NOT processed while sleeping. + * + * @param ms number of milliseconds to sleep + */ +void +sys_msleep(u32_t ms) +{ + if (ms > 0) { + sys_sem_t delaysem; + err_t err = sys_sem_new(&delaysem, 0); + if (err == ERR_OK) { + sys_arch_sem_wait(&delaysem, ms); + sys_sem_free(&delaysem); + } + } +} +#endif /* sys_msleep */ + +#endif /* !NO_SYS */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp.c index b5144d2..7103a52 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp.c @@ -1,2169 +1,2169 @@ -/** - * @file - * Transmission Control Protocol for IP - * See also @ref tcp_raw - * - * @defgroup tcp_raw TCP - * @ingroup callbackstyle_api - * Transmission Control Protocol for IP\n - * @see @ref raw_api and @ref netconn - * - * Common functions for the TCP implementation, such as functinos - * for manipulating the data structures and the TCP timer functions. TCP functions - * related to input and output is found in tcp_in.c and tcp_out.c respectively.\n - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/def.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/tcp.h" -#include "lwip/priv/tcp_priv.h" -#include "lwip/debug.h" -#include "lwip/stats.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/nd6.h" - -#include - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -#ifndef TCP_LOCAL_PORT_RANGE_START -/* From http://www.iana.org/assignments/port-numbers: - "The Dynamic and/or Private Ports are those from 49152 through 65535" */ -#define TCP_LOCAL_PORT_RANGE_START 0xc000 -#define TCP_LOCAL_PORT_RANGE_END 0xffff -#define TCP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & ~TCP_LOCAL_PORT_RANGE_START) + TCP_LOCAL_PORT_RANGE_START)) -#endif - -#if LWIP_TCP_KEEPALIVE -#define TCP_KEEP_DUR(pcb) ((pcb)->keep_cnt * (pcb)->keep_intvl) -#define TCP_KEEP_INTVL(pcb) ((pcb)->keep_intvl) -#else /* LWIP_TCP_KEEPALIVE */ -#define TCP_KEEP_DUR(pcb) TCP_MAXIDLE -#define TCP_KEEP_INTVL(pcb) TCP_KEEPINTVL_DEFAULT -#endif /* LWIP_TCP_KEEPALIVE */ - -/* As initial send MSS, we use TCP_MSS but limit it to 536. */ -#if TCP_MSS > 536 -#define INITIAL_MSS 536 -#else -#define INITIAL_MSS TCP_MSS -#endif - -static const char * const tcp_state_str[] = { - "CLOSED", - "LISTEN", - "SYN_SENT", - "SYN_RCVD", - "ESTABLISHED", - "FIN_WAIT_1", - "FIN_WAIT_2", - "CLOSE_WAIT", - "CLOSING", - "LAST_ACK", - "TIME_WAIT" -}; - -/* last local TCP port */ -static u16_t tcp_port = TCP_LOCAL_PORT_RANGE_START; - -/* Incremented every coarse grained timer shot (typically every 500 ms). */ -u32_t tcp_ticks; -static const u8_t tcp_backoff[13] = - { 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7}; - /* Times per slowtmr hits */ -static const u8_t tcp_persist_backoff[7] = { 3, 6, 12, 24, 48, 96, 120 }; - -/* The TCP PCB lists. */ - -/** List of all TCP PCBs bound but not yet (connected || listening) */ -struct tcp_pcb *tcp_bound_pcbs; -/** List of all TCP PCBs in LISTEN state */ -union tcp_listen_pcbs_t tcp_listen_pcbs; -/** List of all TCP PCBs that are in a state in which - * they accept or send data. */ -struct tcp_pcb *tcp_active_pcbs; -/** List of all TCP PCBs in TIME-WAIT state */ -struct tcp_pcb *tcp_tw_pcbs; - -/** An array with all (non-temporary) PCB lists, mainly used for smaller code size */ -struct tcp_pcb ** const tcp_pcb_lists[] = {&tcp_listen_pcbs.pcbs, &tcp_bound_pcbs, - &tcp_active_pcbs, &tcp_tw_pcbs}; - -u8_t tcp_active_pcbs_changed; - -/** Timer counter to handle calling slow-timer from tcp_tmr() */ -static u8_t tcp_timer; -static u8_t tcp_timer_ctr; -static u16_t tcp_new_port(void); - -static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb); - -/** - * Initialize this module. - */ -void -tcp_init(void) -{ -#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) - tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); -#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ -} - -/** - * Called periodically to dispatch TCP timers. - */ -void -tcp_tmr(void) -{ - /* Call tcp_fasttmr() every 250 ms */ - tcp_fasttmr(); - - if (++tcp_timer & 1) { - /* Call tcp_slowtmr() every 500 ms, i.e., every other timer - tcp_tmr() is called. */ - tcp_slowtmr(); - } -} - -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG -/** Called when a listen pcb is closed. Iterates one pcb list and removes the - * closed listener pcb from pcb->listener if matching. - */ -static void -tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb) -{ - struct tcp_pcb *pcb; - for (pcb = list; pcb != NULL; pcb = pcb->next) { - if (pcb->listener == lpcb) { - pcb->listener = NULL; - } - } -} -#endif - -/** Called when a listen pcb is closed. Iterates all pcb lists and removes the - * closed listener pcb from pcb->listener if matching. - */ -static void -tcp_listen_closed(struct tcp_pcb *pcb) -{ -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG - size_t i; - LWIP_ASSERT("pcb != NULL", pcb != NULL); - LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); - for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { - tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen*)pcb); - } -#endif - LWIP_UNUSED_ARG(pcb); -} - -#if TCP_LISTEN_BACKLOG -/** @ingroup tcp_raw - * Delay accepting a connection in respect to the listen backlog: - * the number of outstanding connections is increased until - * tcp_backlog_accepted() is called. - * - * ATTENTION: the caller is responsible for calling tcp_backlog_accepted() - * or else the backlog feature will get out of sync! - * - * @param pcb the connection pcb which is not fully accepted yet - */ -void -tcp_backlog_delayed(struct tcp_pcb* pcb) -{ - LWIP_ASSERT("pcb != NULL", pcb != NULL); - if ((pcb->flags & TF_BACKLOGPEND) == 0) { - if (pcb->listener != NULL) { - pcb->listener->accepts_pending++; - LWIP_ASSERT("accepts_pending != 0", pcb->listener->accepts_pending != 0); - pcb->flags |= TF_BACKLOGPEND; - } - } -} - -/** @ingroup tcp_raw - * A delayed-accept a connection is accepted (or closed/aborted): decreases - * the number of outstanding connections after calling tcp_backlog_delayed(). - * - * ATTENTION: the caller is responsible for calling tcp_backlog_accepted() - * or else the backlog feature will get out of sync! - * - * @param pcb the connection pcb which is now fully accepted (or closed/aborted) - */ -void -tcp_backlog_accepted(struct tcp_pcb* pcb) -{ - LWIP_ASSERT("pcb != NULL", pcb != NULL); - if ((pcb->flags & TF_BACKLOGPEND) != 0) { - if (pcb->listener != NULL) { - LWIP_ASSERT("accepts_pending != 0", pcb->listener->accepts_pending != 0); - pcb->listener->accepts_pending--; - pcb->flags &= ~TF_BACKLOGPEND; - } - } -} -#endif /* TCP_LISTEN_BACKLOG */ - -/** - * Closes the TX side of a connection held by the PCB. - * For tcp_close(), a RST is sent if the application didn't receive all data - * (tcp_recved() not called for all data passed to recv callback). - * - * Listening pcbs are freed and may not be referenced any more. - * Connection pcbs are freed if not yet connected and may not be referenced - * any more. If a connection is established (at least SYN received or in - * a closing state), the connection is closed, and put in a closing state. - * The pcb is then automatically freed in tcp_slowtmr(). It is therefore - * unsafe to reference it. - * - * @param pcb the tcp_pcb to close - * @return ERR_OK if connection has been closed - * another err_t if closing failed and pcb is not freed - */ -static err_t -tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) -{ - if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { - if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { - /* Not all data received by application, send RST to tell the remote - side about this. */ - LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); - - /* don't call tcp_abort here: we must not deallocate the pcb since - that might not be expected when calling tcp_close */ - tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, - pcb->local_port, pcb->remote_port); - - tcp_pcb_purge(pcb); - TCP_RMV_ACTIVE(pcb); - if (pcb->state == ESTABLISHED) { - /* move to TIME_WAIT since we close actively */ - pcb->state = TIME_WAIT; - TCP_REG(&tcp_tw_pcbs, pcb); - } else { - /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ - if (tcp_input_pcb == pcb) { - /* prevent using a deallocated pcb: free it from tcp_input later */ - tcp_trigger_input_pcb_close(); - } else { - memp_free(MEMP_TCP_PCB, pcb); - } - } - return ERR_OK; - } - } - - /* - states which free the pcb are handled here, - - states which send FIN and change state are handled in tcp_close_shutdown_fin() */ - switch (pcb->state) { - case CLOSED: - /* Closing a pcb in the CLOSED state might seem erroneous, - * however, it is in this state once allocated and as yet unused - * and the user needs some way to free it should the need arise. - * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) - * or for a pcb that has been used and then entered the CLOSED state - * is erroneous, but this should never happen as the pcb has in those cases - * been freed, and so any remaining handles are bogus. */ - if (pcb->local_port != 0) { - TCP_RMV(&tcp_bound_pcbs, pcb); - } - memp_free(MEMP_TCP_PCB, pcb); - break; - case LISTEN: - tcp_listen_closed(pcb); - tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); - memp_free(MEMP_TCP_PCB_LISTEN, pcb); - break; - case SYN_SENT: - TCP_PCB_REMOVE_ACTIVE(pcb); - memp_free(MEMP_TCP_PCB, pcb); - MIB2_STATS_INC(mib2.tcpattemptfails); - break; - default: - return tcp_close_shutdown_fin(pcb); - } - return ERR_OK; -} - -static err_t -tcp_close_shutdown_fin(struct tcp_pcb *pcb) -{ - err_t err; - LWIP_ASSERT("pcb != NULL", pcb != NULL); - - switch (pcb->state) { - case SYN_RCVD: - err = tcp_send_fin(pcb); - if (err == ERR_OK) { - tcp_backlog_accepted(pcb); - MIB2_STATS_INC(mib2.tcpattemptfails); - pcb->state = FIN_WAIT_1; - } - break; - case ESTABLISHED: - err = tcp_send_fin(pcb); - if (err == ERR_OK) { - MIB2_STATS_INC(mib2.tcpestabresets); - pcb->state = FIN_WAIT_1; - } - break; - case CLOSE_WAIT: - err = tcp_send_fin(pcb); - if (err == ERR_OK) { - MIB2_STATS_INC(mib2.tcpestabresets); - pcb->state = LAST_ACK; - } - break; - default: - /* Has already been closed, do nothing. */ - return ERR_OK; - } - - if (err == ERR_OK) { - /* To ensure all data has been sent when tcp_close returns, we have - to make sure tcp_output doesn't fail. - Since we don't really have to ensure all data has been sent when tcp_close - returns (unsent data is sent from tcp timer functions, also), we don't care - for the return value of tcp_output for now. */ - tcp_output(pcb); - } else if (err == ERR_MEM) { - /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ - pcb->flags |= TF_CLOSEPEND; - /* We have to return ERR_OK from here to indicate to the callers that this - pcb should not be used any more as it will be freed soon via tcp_tmr. - This is OK here since sending FIN does not guarantee a time frime for - actually freeing the pcb, either (it is left in closure states for - remote ACK or timeout) */ - return ERR_OK; - } - return err; -} - -/** - * @ingroup tcp_raw - * Closes the connection held by the PCB. - * - * Listening pcbs are freed and may not be referenced any more. - * Connection pcbs are freed if not yet connected and may not be referenced - * any more. If a connection is established (at least SYN received or in - * a closing state), the connection is closed, and put in a closing state. - * The pcb is then automatically freed in tcp_slowtmr(). It is therefore - * unsafe to reference it (unless an error is returned). - * - * @param pcb the tcp_pcb to close - * @return ERR_OK if connection has been closed - * another err_t if closing failed and pcb is not freed - */ -err_t -tcp_close(struct tcp_pcb *pcb) -{ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); - tcp_debug_print_state(pcb->state); - - if (pcb->state != LISTEN) { - /* Set a flag not to receive any more data... */ - pcb->flags |= TF_RXCLOSED; - } - /* ... and close */ - return tcp_close_shutdown(pcb, 1); -} - -/** - * @ingroup tcp_raw - * Causes all or part of a full-duplex connection of this PCB to be shut down. - * This doesn't deallocate the PCB unless shutting down both sides! - * Shutting down both sides is the same as calling tcp_close, so if it succeds - * (i.e. returns ER_OK), the PCB must not be referenced any more! - * - * @param pcb PCB to shutdown - * @param shut_rx shut down receive side if this is != 0 - * @param shut_tx shut down send side if this is != 0 - * @return ERR_OK if shutdown succeeded (or the PCB has already been shut down) - * another err_t on error. - */ -err_t -tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) -{ - if (pcb->state == LISTEN) { - return ERR_CONN; - } - if (shut_rx) { - /* shut down the receive side: set a flag not to receive any more data... */ - pcb->flags |= TF_RXCLOSED; - if (shut_tx) { - /* shutting down the tx AND rx side is the same as closing for the raw API */ - return tcp_close_shutdown(pcb, 1); - } - /* ... and free buffered data */ - if (pcb->refused_data != NULL) { - pbuf_free(pcb->refused_data); - pcb->refused_data = NULL; - } - } - if (shut_tx) { - /* This can't happen twice since if it succeeds, the pcb's state is changed. - Only close in these states as the others directly deallocate the PCB */ - switch (pcb->state) { - case SYN_RCVD: - case ESTABLISHED: - case CLOSE_WAIT: - return tcp_close_shutdown(pcb, (u8_t)shut_rx); - default: - /* Not (yet?) connected, cannot shutdown the TX side as that would bring us - into CLOSED state, where the PCB is deallocated. */ - return ERR_CONN; - } - } - return ERR_OK; -} - -/** - * Abandons a connection and optionally sends a RST to the remote - * host. Deletes the local protocol control block. This is done when - * a connection is killed because of shortage of memory. - * - * @param pcb the tcp_pcb to abort - * @param reset boolean to indicate whether a reset should be sent - */ -void -tcp_abandon(struct tcp_pcb *pcb, int reset) -{ - u32_t seqno, ackno; -#if LWIP_CALLBACK_API - tcp_err_fn errf; -#endif /* LWIP_CALLBACK_API */ - void *errf_arg; - - /* pcb->state LISTEN not allowed here */ - LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", - pcb->state != LISTEN); - /* Figure out on which TCP PCB list we are, and remove us. If we - are in an active state, call the receive function associated with - the PCB with a NULL argument, and send an RST to the remote end. */ - if (pcb->state == TIME_WAIT) { - tcp_pcb_remove(&tcp_tw_pcbs, pcb); - memp_free(MEMP_TCP_PCB, pcb); - } else { - int send_rst = 0; - u16_t local_port = 0; - enum tcp_state last_state; - seqno = pcb->snd_nxt; - ackno = pcb->rcv_nxt; -#if LWIP_CALLBACK_API - errf = pcb->errf; -#endif /* LWIP_CALLBACK_API */ - errf_arg = pcb->callback_arg; - if (pcb->state == CLOSED) { - if (pcb->local_port != 0) { - /* bound, not yet opened */ - TCP_RMV(&tcp_bound_pcbs, pcb); - } - } else { - send_rst = reset; - local_port = pcb->local_port; - TCP_PCB_REMOVE_ACTIVE(pcb); - } - if (pcb->unacked != NULL) { - tcp_segs_free(pcb->unacked); - } - if (pcb->unsent != NULL) { - tcp_segs_free(pcb->unsent); - } -#if TCP_QUEUE_OOSEQ - if (pcb->ooseq != NULL) { - tcp_segs_free(pcb->ooseq); - } -#endif /* TCP_QUEUE_OOSEQ */ - tcp_backlog_accepted(pcb); - if (send_rst) { - LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n")); - tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port); - } - last_state = pcb->state; - memp_free(MEMP_TCP_PCB, pcb); - TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); - } -} - -/** - * @ingroup tcp_raw - * Aborts the connection by sending a RST (reset) segment to the remote - * host. The pcb is deallocated. This function never fails. - * - * ATTENTION: When calling this from one of the TCP callbacks, make - * sure you always return ERR_ABRT (and never return ERR_ABRT otherwise - * or you will risk accessing deallocated memory or memory leaks! - * - * @param pcb the tcp pcb to abort - */ -void -tcp_abort(struct tcp_pcb *pcb) -{ - tcp_abandon(pcb, 1); -} - -/** - * @ingroup tcp_raw - * Binds the connection to a local port number and IP address. If the - * IP address is not given (i.e., ipaddr == NULL), the IP address of - * the outgoing network interface is used instead. - * - * @param pcb the tcp_pcb to bind (no check is done whether this pcb is - * already bound!) - * @param ipaddr the local ip address to bind to (use IP4_ADDR_ANY to bind - * to any local address - * @param port the local port to bind to - * @return ERR_USE if the port is already in use - * ERR_VAL if bind failed because the PCB is not in a valid state - * ERR_OK if bound - */ -err_t -tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) -{ - int i; - int max_pcb_list = NUM_TCP_PCB_LISTS; - struct tcp_pcb *cpcb; - -#if LWIP_IPV4 - /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ - if (ipaddr == NULL) { - ipaddr = IP4_ADDR_ANY; - } -#endif /* LWIP_IPV4 */ - - /* still need to check for ipaddr == NULL in IPv6 only case */ - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } - - LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); - -#if SO_REUSE - /* Unless the REUSEADDR flag is set, - we have to check the pcbs in TIME-WAIT state, also. - We do not dump TIME_WAIT pcb's; they can still be matched by incoming - packets using both local and remote IP addresses and ports to distinguish. - */ - if (ip_get_option(pcb, SOF_REUSEADDR)) { - max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; - } -#endif /* SO_REUSE */ - - if (port == 0) { - port = tcp_new_port(); - if (port == 0) { - return ERR_BUF; - } - } else { - /* Check if the address already is in use (on all lists) */ - for (i = 0; i < max_pcb_list; i++) { - for (cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { - if (cpcb->local_port == port) { -#if SO_REUSE - /* Omit checking for the same port if both pcbs have REUSEADDR set. - For SO_REUSEADDR, the duplicate-check for a 5-tuple is done in - tcp_connect. */ - if (!ip_get_option(pcb, SOF_REUSEADDR) || - !ip_get_option(cpcb, SOF_REUSEADDR)) -#endif /* SO_REUSE */ - { - /* @todo: check accept_any_ip_version */ - if ((IP_IS_V6(ipaddr) == IP_IS_V6_VAL(cpcb->local_ip)) && - (ip_addr_isany(&cpcb->local_ip) || - ip_addr_isany(ipaddr) || - ip_addr_cmp(&cpcb->local_ip, ipaddr))) { - return ERR_USE; - } - } - } - } - } - } - - if (!ip_addr_isany(ipaddr)) { - ip_addr_set(&pcb->local_ip, ipaddr); - } - pcb->local_port = port; - TCP_REG(&tcp_bound_pcbs, pcb); - LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); - return ERR_OK; -} -#if LWIP_CALLBACK_API -/** - * Default accept callback if no accept callback is specified by the user. - */ -static err_t -tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err) -{ - LWIP_UNUSED_ARG(arg); - LWIP_UNUSED_ARG(err); - - tcp_abort(pcb); - - return ERR_ABRT; -} -#endif /* LWIP_CALLBACK_API */ - -/** - * @ingroup tcp_raw - * Set the state of the connection to be LISTEN, which means that it - * is able to accept incoming connections. The protocol control block - * is reallocated in order to consume less memory. Setting the - * connection to LISTEN is an irreversible process. - * - * @param pcb the original tcp_pcb - * @param backlog the incoming connections queue limit - * @return tcp_pcb used for listening, consumes less memory. - * - * @note The original tcp_pcb is freed. This function therefore has to be - * called like this: - * tpcb = tcp_listen_with_backlog(tpcb, backlog); - */ -struct tcp_pcb * -tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) -{ - return tcp_listen_with_backlog_and_err(pcb, backlog, NULL); -} - -/** - * @ingroup tcp_raw - * Set the state of the connection to be LISTEN, which means that it - * is able to accept incoming connections. The protocol control block - * is reallocated in order to consume less memory. Setting the - * connection to LISTEN is an irreversible process. - * - * @param pcb the original tcp_pcb - * @param backlog the incoming connections queue limit - * @param err when NULL is returned, this contains the error reason - * @return tcp_pcb used for listening, consumes less memory. - * - * @note The original tcp_pcb is freed. This function therefore has to be - * called like this: - * tpcb = tcp_listen_with_backlog_and_err(tpcb, backlog, &err); - */ -struct tcp_pcb * -tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err) -{ - struct tcp_pcb_listen *lpcb = NULL; - err_t res; - - LWIP_UNUSED_ARG(backlog); - LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, res = ERR_CLSD; goto done); - - /* already listening? */ - if (pcb->state == LISTEN) { - lpcb = (struct tcp_pcb_listen*)pcb; - res = ERR_ALREADY; - goto done; - } -#if SO_REUSE - if (ip_get_option(pcb, SOF_REUSEADDR)) { - /* Since SOF_REUSEADDR allows reusing a local address before the pcb's usage - is declared (listen-/connection-pcb), we have to make sure now that - this port is only used once for every local IP. */ - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { - if ((lpcb->local_port == pcb->local_port) && - ip_addr_cmp(&lpcb->local_ip, &pcb->local_ip)) { - /* this address/port is already used */ - lpcb = NULL; - res = ERR_USE; - goto done; - } - } - } -#endif /* SO_REUSE */ - lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); - if (lpcb == NULL) { - res = ERR_MEM; - goto done; - } - lpcb->callback_arg = pcb->callback_arg; - lpcb->local_port = pcb->local_port; - lpcb->state = LISTEN; - lpcb->prio = pcb->prio; - lpcb->so_options = pcb->so_options; - lpcb->ttl = pcb->ttl; - lpcb->tos = pcb->tos; -#if LWIP_IPV4 && LWIP_IPV6 - IP_SET_TYPE_VAL(lpcb->remote_ip, pcb->local_ip.type); -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - ip_addr_copy(lpcb->local_ip, pcb->local_ip); - if (pcb->local_port != 0) { - TCP_RMV(&tcp_bound_pcbs, pcb); - } - memp_free(MEMP_TCP_PCB, pcb); -#if LWIP_CALLBACK_API - lpcb->accept = tcp_accept_null; -#endif /* LWIP_CALLBACK_API */ -#if TCP_LISTEN_BACKLOG - lpcb->accepts_pending = 0; - tcp_backlog_set(lpcb, backlog); -#endif /* TCP_LISTEN_BACKLOG */ - TCP_REG(&tcp_listen_pcbs.pcbs, (struct tcp_pcb *)lpcb); - res = ERR_OK; -done: - if (err != NULL) { - *err = res; - } - return (struct tcp_pcb *)lpcb; -} - -/** - * Update the state that tracks the available window space to advertise. - * - * Returns how much extra window would be advertised if we sent an - * update now. - */ -u32_t -tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) -{ - u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; - - if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { - /* we can advertise more window */ - pcb->rcv_ann_wnd = pcb->rcv_wnd; - return new_right_edge - pcb->rcv_ann_right_edge; - } else { - if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { - /* Can happen due to other end sending out of advertised window, - * but within actual available (but not yet advertised) window */ - pcb->rcv_ann_wnd = 0; - } else { - /* keep the right edge of window constant */ - u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; -#if !LWIP_WND_SCALE - LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); -#endif - pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; - } - return 0; - } -} - -/** - * @ingroup tcp_raw - * This function should be called by the application when it has - * processed the data. The purpose is to advertise a larger window - * when the data has been processed. - * - * @param pcb the tcp_pcb for which data is read - * @param len the amount of bytes that have been read by the application - */ -void -tcp_recved(struct tcp_pcb *pcb, u16_t len) -{ - int wnd_inflation; - - /* pcb->state LISTEN not allowed here */ - LWIP_ASSERT("don't call tcp_recved for listen-pcbs", - pcb->state != LISTEN); - - pcb->rcv_wnd += len; - if (pcb->rcv_wnd > TCP_WND_MAX(pcb)) { - pcb->rcv_wnd = TCP_WND_MAX(pcb); - } else if (pcb->rcv_wnd == 0) { - /* rcv_wnd overflowed */ - if ((pcb->state == CLOSE_WAIT) || (pcb->state == LAST_ACK)) { - /* In passive close, we allow this, since the FIN bit is added to rcv_wnd - by the stack itself, since it is not mandatory for an application - to call tcp_recved() for the FIN bit, but e.g. the netconn API does so. */ - pcb->rcv_wnd = TCP_WND_MAX(pcb); - } else { - LWIP_ASSERT("tcp_recved: len wrapped rcv_wnd\n", 0); - } - } - - wnd_inflation = tcp_update_rcv_ann_wnd(pcb); - - /* If the change in the right edge of window is significant (default - * watermark is TCP_WND/4), then send an explicit update now. - * Otherwise wait for a packet to be sent in the normal course of - * events (or more window to be available later) */ - if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { - tcp_ack_now(pcb); - tcp_output(pcb); - } - - LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n", - len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd))); -} - -/** - * Allocate a new local TCP port. - * - * @return a new (free) local TCP port number - */ -static u16_t -tcp_new_port(void) -{ - u8_t i; - u16_t n = 0; - struct tcp_pcb *pcb; - -again: - if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { - tcp_port = TCP_LOCAL_PORT_RANGE_START; - } - /* 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) { - if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { - return 0; - } - goto again; - } - } - } - return tcp_port; -} - -/** - * @ingroup tcp_raw - * Connects to another host. The function given as the "connected" - * argument will be called when the connection has been established. - * - * @param pcb the tcp_pcb used to establish the connection - * @param ipaddr the remote ip address to connect to - * @param port the remote tcp port to connect to - * @param connected callback function to call when connected (on error, - the err calback will be called) - * @return ERR_VAL if invalid arguments are given - * ERR_OK if connect request has been sent - * other err_t values if connect request couldn't be sent - */ -err_t -tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, - tcp_connected_fn connected) -{ - err_t ret; - u32_t iss; - u16_t old_local_port; - - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } - - LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); - - LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); - ip_addr_set(&pcb->remote_ip, ipaddr); - pcb->remote_port = port; - - /* check if we have a route to the remote host */ - if (ip_addr_isany(&pcb->local_ip)) { - /* no local IP address set, yet. */ - struct netif *netif; - const ip_addr_t *local_ip; - ip_route_get_local_ip(&pcb->local_ip, &pcb->remote_ip, netif, local_ip); - if ((netif == NULL) || (local_ip == NULL)) { - /* Don't even try to send a SYN packet if we have no route - since that will fail. */ - return ERR_RTE; - } - /* Use the address as local address of the pcb. */ - ip_addr_copy(pcb->local_ip, *local_ip); - } - - old_local_port = pcb->local_port; - if (pcb->local_port == 0) { - pcb->local_port = tcp_new_port(); - if (pcb->local_port == 0) { - return ERR_BUF; - } - } else { -#if SO_REUSE - if (ip_get_option(pcb, SOF_REUSEADDR)) { - /* Since SOF_REUSEADDR allows reusing a local address, we have to make sure - now that the 5-tuple is unique. */ - struct tcp_pcb *cpcb; - int i; - /* Don't check listen- and bound-PCBs, check active- and TIME-WAIT PCBs. */ - for (i = 2; i < NUM_TCP_PCB_LISTS; i++) { - for (cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { - if ((cpcb->local_port == pcb->local_port) && - (cpcb->remote_port == port) && - ip_addr_cmp(&cpcb->local_ip, &pcb->local_ip) && - ip_addr_cmp(&cpcb->remote_ip, ipaddr)) { - /* linux returns EISCONN here, but ERR_USE should be OK for us */ - return ERR_USE; - } - } - } - } -#endif /* SO_REUSE */ - } - - iss = tcp_next_iss(pcb); - pcb->rcv_nxt = 0; - pcb->snd_nxt = iss; - pcb->lastack = iss - 1; - pcb->snd_wl2 = iss - 1; - pcb->snd_lbb = iss - 1; - /* Start with a window that does not need scaling. When window scaling is - enabled and used, the window is enlarged when both sides agree on scaling. */ - pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); - pcb->rcv_ann_right_edge = pcb->rcv_nxt; - pcb->snd_wnd = TCP_WND; - /* As initial send MSS, we use TCP_MSS but limit it to 536. - The send MSS is updated when an MSS option is received. */ - pcb->mss = INITIAL_MSS; -#if TCP_CALCULATE_EFF_SEND_MSS - pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - pcb->cwnd = 1; -#if LWIP_CALLBACK_API - pcb->connected = connected; -#else /* LWIP_CALLBACK_API */ - LWIP_UNUSED_ARG(connected); -#endif /* LWIP_CALLBACK_API */ - - /* Send a SYN together with the MSS option. */ - ret = tcp_enqueue_flags(pcb, TCP_SYN); - if (ret == ERR_OK) { - /* SYN segment was enqueued, changed the pcbs state now */ - pcb->state = SYN_SENT; - if (old_local_port != 0) { - TCP_RMV(&tcp_bound_pcbs, pcb); - } - TCP_REG_ACTIVE(pcb); - MIB2_STATS_INC(mib2.tcpactiveopens); - - tcp_output(pcb); - } - return ret; -} - -/** - * Called every 500 ms and implements the retransmission timer and the timer that - * removes PCBs that have been in TIME-WAIT for enough time. It also increments - * various timers such as the inactivity timer in each PCB. - * - * Automatically called from tcp_tmr(). - */ -void -tcp_slowtmr(void) -{ - struct tcp_pcb *pcb, *prev; - tcpwnd_size_t eff_wnd; - u8_t pcb_remove; /* flag if a PCB should be removed */ - u8_t pcb_reset; /* flag if a RST should be sent when removing */ - err_t err; - - err = ERR_OK; - - ++tcp_ticks; - ++tcp_timer_ctr; - -tcp_slowtmr_start: - /* Steps through all of the active PCBs. */ - prev = NULL; - pcb = tcp_active_pcbs; - if (pcb == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); - } - while (pcb != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); - LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); - LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); - LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); - if (pcb->last_timer == tcp_timer_ctr) { - /* skip this pcb, we have already processed it */ - pcb = pcb->next; - continue; - } - pcb->last_timer = tcp_timer_ctr; - - pcb_remove = 0; - pcb_reset = 0; - - if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { - ++pcb_remove; - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); - } - else if (pcb->nrtx >= TCP_MAXRTX) { - ++pcb_remove; - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); - } else { - if (pcb->persist_backoff > 0) { - /* If snd_wnd is zero, use persist timer to send 1 byte probes - * instead of using the standard retransmission mechanism. */ - u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff-1]; - if (pcb->persist_cnt < backoff_cnt) { - pcb->persist_cnt++; - } - if (pcb->persist_cnt >= backoff_cnt) { - if (tcp_zero_window_probe(pcb) == ERR_OK) { - pcb->persist_cnt = 0; - if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { - pcb->persist_backoff++; - } - } - } - } else { - /* Increase the retransmission timer if it is running */ - if (pcb->rtime >= 0) { - ++pcb->rtime; - } - - if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { - /* Time for a retransmission. */ - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_slowtmr: rtime %"S16_F - " pcb->rto %"S16_F"\n", - pcb->rtime, pcb->rto)); - - /* Double retransmission time-out unless we are trying to - * connect to somebody (i.e., we are in SYN_SENT). */ - if (pcb->state != SYN_SENT) { - u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff)-1); - pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; - } - - /* Reset the retransmission timer. */ - pcb->rtime = 0; - - /* Reduce congestion window and ssthresh. */ - eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); - pcb->ssthresh = eff_wnd >> 1; - if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { - pcb->ssthresh = (pcb->mss << 1); - } - pcb->cwnd = pcb->mss; - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: cwnd %"TCPWNDSIZE_F - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - - /* The following needs to be called AFTER cwnd is set to one - mss - STJ */ - tcp_rexmit_rto(pcb); - } - } - } - /* Check if this PCB has stayed too long in FIN-WAIT-2 */ - if (pcb->state == FIN_WAIT_2) { - /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ - if (pcb->flags & TF_RXCLOSED) { - /* PCB was fully closed (either through close() or SHUT_RDWR): - normal FIN-WAIT timeout handling. */ - if ((u32_t)(tcp_ticks - pcb->tmr) > - TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { - ++pcb_remove; - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in FIN-WAIT-2\n")); - } - } - } - - /* Check if KEEPALIVE should be sent */ - if (ip_get_option(pcb, SOF_KEEPALIVE) && - ((pcb->state == ESTABLISHED) || - (pcb->state == CLOSE_WAIT))) { - if ((u32_t)(tcp_ticks - pcb->tmr) > - (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) - { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to ")); - ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); - LWIP_DEBUGF(TCP_DEBUG, ("\n")); - - ++pcb_remove; - ++pcb_reset; - } else if ((u32_t)(tcp_ticks - pcb->tmr) > - (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) - / TCP_SLOW_INTERVAL) - { - err = tcp_keepalive(pcb); - if (err == ERR_OK) { - pcb->keep_cnt_sent++; - } - } - } - - /* If this PCB has queued out of sequence data, but has been - inactive for too long, will drop the data (it will eventually - be retransmitted). */ -#if TCP_QUEUE_OOSEQ - if (pcb->ooseq != NULL && - (u32_t)tcp_ticks - pcb->tmr >= pcb->rto * TCP_OOSEQ_TIMEOUT) { - tcp_segs_free(pcb->ooseq); - pcb->ooseq = NULL; - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); - } -#endif /* TCP_QUEUE_OOSEQ */ - - /* Check if this PCB has stayed too long in SYN-RCVD */ - if (pcb->state == SYN_RCVD) { - if ((u32_t)(tcp_ticks - pcb->tmr) > - TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { - ++pcb_remove; - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n")); - } - } - - /* Check if this PCB has stayed too long in LAST-ACK */ - if (pcb->state == LAST_ACK) { - if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { - ++pcb_remove; - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); - } - } - - /* If the PCB should be removed, do it. */ - if (pcb_remove) { - struct tcp_pcb *pcb2; -#if LWIP_CALLBACK_API - tcp_err_fn err_fn = pcb->errf; -#endif /* LWIP_CALLBACK_API */ - void *err_arg; - enum tcp_state last_state; - tcp_pcb_purge(pcb); - /* Remove PCB from tcp_active_pcbs list. */ - if (prev != NULL) { - LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); - prev->next = pcb->next; - } else { - /* This PCB was the first. */ - LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); - tcp_active_pcbs = pcb->next; - } - - if (pcb_reset) { - tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, - pcb->local_port, pcb->remote_port); - } - - err_arg = pcb->callback_arg; - last_state = pcb->state; - pcb2 = pcb; - pcb = pcb->next; - memp_free(MEMP_TCP_PCB, pcb2); - - tcp_active_pcbs_changed = 0; - TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); - if (tcp_active_pcbs_changed) { - goto tcp_slowtmr_start; - } - } else { - /* get the 'next' element now and work with 'prev' below (in case of abort) */ - prev = pcb; - pcb = pcb->next; - - /* We check if we should poll the connection. */ - ++prev->polltmr; - if (prev->polltmr >= prev->pollinterval) { - prev->polltmr = 0; - LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); - tcp_active_pcbs_changed = 0; - TCP_EVENT_POLL(prev, err); - if (tcp_active_pcbs_changed) { - goto tcp_slowtmr_start; - } - /* if err == ERR_ABRT, 'prev' is already deallocated */ - if (err == ERR_OK) { - tcp_output(prev); - } - } - } - } - - - /* Steps through all of the TIME-WAIT PCBs. */ - prev = NULL; - pcb = tcp_tw_pcbs; - while (pcb != NULL) { - LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); - pcb_remove = 0; - - /* Check if this PCB has stayed long enough in TIME-WAIT */ - if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { - ++pcb_remove; - } - - /* If the PCB should be removed, do it. */ - if (pcb_remove) { - struct tcp_pcb *pcb2; - tcp_pcb_purge(pcb); - /* Remove PCB from tcp_tw_pcbs list. */ - if (prev != NULL) { - LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); - prev->next = pcb->next; - } else { - /* This PCB was the first. */ - LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); - tcp_tw_pcbs = pcb->next; - } - pcb2 = pcb; - pcb = pcb->next; - memp_free(MEMP_TCP_PCB, pcb2); - } else { - prev = pcb; - pcb = pcb->next; - } - } -} - -/** - * Is called every TCP_FAST_INTERVAL (250 ms) and process data previously - * "refused" by upper layer (application) and sends delayed ACKs. - * - * Automatically called from tcp_tmr(). - */ -void -tcp_fasttmr(void) -{ - struct tcp_pcb *pcb; - - ++tcp_timer_ctr; - -tcp_fasttmr_start: - pcb = tcp_active_pcbs; - - while (pcb != NULL) { - if (pcb->last_timer != tcp_timer_ctr) { - struct tcp_pcb *next; - pcb->last_timer = tcp_timer_ctr; - /* send delayed ACKs */ - if (pcb->flags & TF_ACK_DELAY) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); - tcp_ack_now(pcb); - tcp_output(pcb); - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); - } - /* send pending FIN */ - if (pcb->flags & TF_CLOSEPEND) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); - pcb->flags &= ~(TF_CLOSEPEND); - tcp_close_shutdown_fin(pcb); - } - - next = pcb->next; - - /* If there is data which was previously "refused" by upper layer */ - if (pcb->refused_data != NULL) { - tcp_active_pcbs_changed = 0; - tcp_process_refused_data(pcb); - if (tcp_active_pcbs_changed) { - /* application callback has changed the pcb list: restart the loop */ - goto tcp_fasttmr_start; - } - } - pcb = next; - } else { - pcb = pcb->next; - } - } -} - -/** Call tcp_output for all active pcbs that have TF_NAGLEMEMERR set */ -void -tcp_txnow(void) -{ - struct tcp_pcb *pcb; - - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - if (pcb->flags & TF_NAGLEMEMERR) { - tcp_output(pcb); - } - } -} - -/** Pass pcb->refused_data to the recv callback */ -err_t -tcp_process_refused_data(struct tcp_pcb *pcb) -{ -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - struct pbuf *rest; - while (pcb->refused_data != NULL) -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - { - err_t err; - u8_t refused_flags = pcb->refused_data->flags; - /* set pcb->refused_data to NULL in case the callback frees it and then - closes the pcb */ - struct pbuf *refused_data = pcb->refused_data; -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - pbuf_split_64k(refused_data, &rest); - pcb->refused_data = rest; -#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - pcb->refused_data = NULL; -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - /* Notify again application with data previously received. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); - TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); - if (err == ERR_OK) { - /* did refused_data include a FIN? */ - if (refused_flags & PBUF_FLAG_TCP_FIN -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - && (rest == NULL) -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - ) { - /* correct rcv_wnd as the application won't call tcp_recved() - for the FIN's seqno */ - if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { - pcb->rcv_wnd++; - } - TCP_EVENT_CLOSED(pcb, err); - if (err == ERR_ABRT) { - return ERR_ABRT; - } - } - } else if (err == ERR_ABRT) { - /* if err == ERR_ABRT, 'pcb' is already deallocated */ - /* Drop incoming packets because pcb is "full" (only if the incoming - segment contains data). */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n")); - return ERR_ABRT; - } else { - /* data is still refused, pbuf is still valid (go on for ACK-only packets) */ -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - if (rest != NULL) { - pbuf_cat(refused_data, rest); - } -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - pcb->refused_data = refused_data; - return ERR_INPROGRESS; - } - } - return ERR_OK; -} - -/** - * Deallocates a list of TCP segments (tcp_seg structures). - * - * @param seg tcp_seg list of TCP segments to free - */ -void -tcp_segs_free(struct tcp_seg *seg) -{ - while (seg != NULL) { - struct tcp_seg *next = seg->next; - tcp_seg_free(seg); - seg = next; - } -} - -/** - * Frees a TCP segment (tcp_seg structure). - * - * @param seg single tcp_seg to free - */ -void -tcp_seg_free(struct tcp_seg *seg) -{ - if (seg != NULL) { - if (seg->p != NULL) { - pbuf_free(seg->p); -#if TCP_DEBUG - seg->p = NULL; -#endif /* TCP_DEBUG */ - } - memp_free(MEMP_TCP_SEG, seg); - } -} - -/** - * Sets the priority of a connection. - * - * @param pcb the tcp_pcb to manipulate - * @param prio new priority - */ -void -tcp_setprio(struct tcp_pcb *pcb, u8_t prio) -{ - pcb->prio = prio; -} - -#if TCP_QUEUE_OOSEQ -/** - * Returns a copy of the given TCP segment. - * The pbuf and data are not copied, only the pointers - * - * @param seg the old tcp_seg - * @return a copy of seg - */ -struct tcp_seg * -tcp_seg_copy(struct tcp_seg *seg) -{ - struct tcp_seg *cseg; - - cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); - if (cseg == NULL) { - return NULL; - } - SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); - pbuf_ref(cseg->p); - return cseg; -} -#endif /* TCP_QUEUE_OOSEQ */ - -#if LWIP_CALLBACK_API -/** - * Default receive callback that is called if the user didn't register - * a recv callback for the pcb. - */ -err_t -tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) -{ - LWIP_UNUSED_ARG(arg); - if (p != NULL) { - tcp_recved(pcb, p->tot_len); - pbuf_free(p); - } else if (err == ERR_OK) { - return tcp_close(pcb); - } - return ERR_OK; -} -#endif /* LWIP_CALLBACK_API */ - -/** - * Kills the oldest active connection that has the same or lower priority than - * 'prio'. - * - * @param prio minimum priority - */ -static void -tcp_kill_prio(u8_t prio) -{ - struct tcp_pcb *pcb, *inactive; - u32_t inactivity; - u8_t mprio; - - mprio = LWIP_MIN(TCP_PRIO_MAX, prio); - - /* We kill the oldest active connection that has lower priority than prio. */ - inactivity = 0; - inactive = NULL; - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - if (pcb->prio <= mprio && - (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { - inactivity = tcp_ticks - pcb->tmr; - inactive = pcb; - mprio = pcb->prio; - } - } - if (inactive != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", - (void *)inactive, inactivity)); - tcp_abort(inactive); - } -} - -/** - * Kills the oldest connection that is in specific state. - * Called from tcp_alloc() for LAST_ACK and CLOSING if no more connections are available. - */ -static void -tcp_kill_state(enum tcp_state state) -{ - struct tcp_pcb *pcb, *inactive; - u32_t inactivity; - - LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); - - inactivity = 0; - inactive = NULL; - /* Go through the list of active pcbs and get the oldest pcb that is in state - CLOSING/LAST_ACK. */ - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - if (pcb->state == state) { - if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { - inactivity = tcp_ticks - pcb->tmr; - inactive = pcb; - } - } - } - if (inactive != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n", - tcp_state_str[state], (void *)inactive, inactivity)); - /* Don't send a RST, since no data is lost. */ - tcp_abandon(inactive, 0); - } -} - -/** - * Kills the oldest connection that is in TIME_WAIT state. - * Called from tcp_alloc() if no more connections are available. - */ -static void -tcp_kill_timewait(void) -{ - struct tcp_pcb *pcb, *inactive; - u32_t inactivity; - - inactivity = 0; - inactive = NULL; - /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { - inactivity = tcp_ticks - pcb->tmr; - inactive = pcb; - } - } - if (inactive != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", - (void *)inactive, inactivity)); - tcp_abort(inactive); - } -} - -/** - * Allocate a new tcp_pcb structure. - * - * @param prio priority for the new pcb - * @return a new tcp_pcb that initially is in state CLOSED - */ -struct tcp_pcb * -tcp_alloc(u8_t prio) -{ - struct tcp_pcb *pcb; - - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - if (pcb == NULL) { - /* Try killing oldest connection in TIME-WAIT. */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); - tcp_kill_timewait(); - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - if (pcb == NULL) { - /* Try killing oldest connection in LAST-ACK (these wouldn't go to TIME-WAIT). */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest LAST-ACK connection\n")); - tcp_kill_state(LAST_ACK); - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - if (pcb == NULL) { - /* Try killing oldest connection in CLOSING. */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); - tcp_kill_state(CLOSING); - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - if (pcb == NULL) { - /* Try killing active connections with lower priority than the new one. */ - LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio)); - tcp_kill_prio(prio); - /* Try to allocate a tcp_pcb again. */ - pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); - if (pcb != NULL) { - /* adjust err stats: memp_malloc failed multiple times before */ - MEMP_STATS_DEC(err, MEMP_TCP_PCB); - } - } - if (pcb != NULL) { - /* adjust err stats: memp_malloc failed multiple times before */ - MEMP_STATS_DEC(err, MEMP_TCP_PCB); - } - } - if (pcb != NULL) { - /* adjust err stats: memp_malloc failed multiple times before */ - MEMP_STATS_DEC(err, MEMP_TCP_PCB); - } - } - if (pcb != NULL) { - /* adjust err stats: memp_malloc failed above */ - MEMP_STATS_DEC(err, MEMP_TCP_PCB); - } - } - if (pcb != NULL) { - /* zero out the whole pcb, so there is no need to initialize members to zero */ - memset(pcb, 0, sizeof(struct tcp_pcb)); - pcb->prio = prio; - pcb->snd_buf = TCP_SND_BUF; - /* Start with a window that does not need scaling. When window scaling is - enabled and used, the window is enlarged when both sides agree on scaling. */ - pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); - pcb->ttl = TCP_TTL; - /* As initial send MSS, we use TCP_MSS but limit it to 536. - The send MSS is updated when an MSS option is received. */ - pcb->mss = INITIAL_MSS; - pcb->rto = 3000 / TCP_SLOW_INTERVAL; - pcb->sv = 3000 / TCP_SLOW_INTERVAL; - pcb->rtime = -1; - pcb->cwnd = 1; - pcb->tmr = tcp_ticks; - pcb->last_timer = tcp_timer_ctr; - - /* RFC 5681 recommends setting ssthresh abritrarily high and gives an example - of using the largest advertised receive window. We've seen complications with - receiving TCPs that use window scaling and/or window auto-tuning where the - initial advertised window is very small and then grows rapidly once the - connection is established. To avoid these complications, we set ssthresh to the - largest effective cwnd (amount of in-flight data) that the sender can have. */ - pcb->ssthresh = TCP_SND_BUF; - -#if LWIP_CALLBACK_API - pcb->recv = tcp_recv_null; -#endif /* LWIP_CALLBACK_API */ - - /* Init KEEPALIVE timer */ - pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; - -#if LWIP_TCP_KEEPALIVE - pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT; - pcb->keep_cnt = TCP_KEEPCNT_DEFAULT; -#endif /* LWIP_TCP_KEEPALIVE */ - } - return pcb; -} - -/** - * @ingroup tcp_raw - * Creates a new TCP protocol control block but doesn't place it on - * any of the TCP PCB lists. - * The pcb is not put on any list until binding using tcp_bind(). - * - * @internal: Maybe there should be a idle TCP PCB list where these - * PCBs are put on. Port reservation using tcp_bind() is implemented but - * allocated pcbs that are not bound can't be killed automatically if wanting - * to allocate a pcb with higher prio (@see tcp_kill_prio()) - * - * @return a new tcp_pcb that initially is in state CLOSED - */ -struct tcp_pcb * -tcp_new(void) -{ - return tcp_alloc(TCP_PRIO_NORMAL); -} - -/** - * @ingroup tcp_raw - * Creates a new TCP protocol control block but doesn't - * place it on any of the TCP PCB lists. - * The pcb is not put on any list until binding using tcp_bind(). - * - * @param type IP address type, see @ref lwip_ip_addr_type definitions. - * If you want to listen to IPv4 and IPv6 (dual-stack) connections, - * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. - * @return a new tcp_pcb that initially is in state CLOSED - */ -struct tcp_pcb * -tcp_new_ip_type(u8_t type) -{ - struct tcp_pcb * pcb; - pcb = tcp_alloc(TCP_PRIO_NORMAL); -#if LWIP_IPV4 && LWIP_IPV6 - if (pcb != NULL) { - IP_SET_TYPE_VAL(pcb->local_ip, type); - IP_SET_TYPE_VAL(pcb->remote_ip, type); - } -#else - LWIP_UNUSED_ARG(type); -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - return pcb; -} - -/** - * @ingroup tcp_raw - * Used to specify the argument that should be passed callback - * functions. - * - * @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) -{ - /* This function is allowed to be called for both listen pcbs and - connection pcbs. */ - if (pcb != NULL) { - pcb->callback_arg = arg; - } -} -#if LWIP_CALLBACK_API - -/** - * @ingroup tcp_raw - * Used to specify the function that should be called when a TCP - * connection receives data. - * - * @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) -{ - if (pcb != NULL) { - LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); - pcb->recv = recv; - } -} - -/** - * @ingroup tcp_raw - * Used to specify the function that should be called when TCP data - * has been successfully delivered to the remote host. - * - * @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) -{ - if (pcb != NULL) { - LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); - pcb->sent = sent; - } -} - -/** - * @ingroup tcp_raw - * Used to specify the function that should be called when a fatal error - * has occurred on the connection. - * - * @note The corresponding pcb is already freed when this callback is called! - * - * @param pcb tcp_pcb to set the err callback - * @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) -{ - if (pcb != NULL) { - LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); - pcb->errf = err; - } -} - -/** - * @ingroup tcp_raw - * Used for specifying the function that should be called when a - * LISTENing connection has been connected to another host. - * - * @param pcb tcp_pcb to set the accept callback - * @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) -{ - if ((pcb != NULL) && (pcb->state == LISTEN)) { - struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen*)pcb; - lpcb->accept = accept; - } -} -#endif /* LWIP_CALLBACK_API */ - - -/** - * @ingroup tcp_raw - * Used to specify the function that should be called periodically - * from TCP. The interval is specified in terms of the TCP coarse - * timer interval, which is called twice a second. - * - */ -void -tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) -{ - LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); -#if LWIP_CALLBACK_API - pcb->poll = poll; -#else /* LWIP_CALLBACK_API */ - LWIP_UNUSED_ARG(poll); -#endif /* LWIP_CALLBACK_API */ - pcb->pollinterval = interval; -} - -/** - * Purges a TCP PCB. Removes any buffered data and frees the buffer memory - * (pcb->ooseq, pcb->unsent and pcb->unacked are freed). - * - * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! - */ -void -tcp_pcb_purge(struct tcp_pcb *pcb) -{ - if (pcb->state != CLOSED && - pcb->state != TIME_WAIT && - pcb->state != LISTEN) { - - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); - - tcp_backlog_accepted(pcb); - - if (pcb->refused_data != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); - pbuf_free(pcb->refused_data); - pcb->refused_data = NULL; - } - if (pcb->unsent != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: not all data sent\n")); - } - if (pcb->unacked != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->unacked\n")); - } -#if TCP_QUEUE_OOSEQ - if (pcb->ooseq != NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); - } - tcp_segs_free(pcb->ooseq); - pcb->ooseq = NULL; -#endif /* TCP_QUEUE_OOSEQ */ - - /* Stop the retransmission timer as it will expect data on unacked - queue if it fires */ - pcb->rtime = -1; - - tcp_segs_free(pcb->unsent); - tcp_segs_free(pcb->unacked); - pcb->unacked = pcb->unsent = NULL; -#if TCP_OVERSIZE - pcb->unsent_oversize = 0; -#endif /* TCP_OVERSIZE */ - } -} - -/** - * Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first. - * - * @param pcblist PCB list to purge. - * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! - */ -void -tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) -{ - TCP_RMV(pcblist, pcb); - - tcp_pcb_purge(pcb); - - /* if there is an outstanding delayed ACKs, send it */ - if (pcb->state != TIME_WAIT && - pcb->state != LISTEN && - pcb->flags & TF_ACK_DELAY) { - pcb->flags |= TF_ACK_NOW; - tcp_output(pcb); - } - - if (pcb->state != LISTEN) { - LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); - LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); -#if TCP_QUEUE_OOSEQ - LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); -#endif /* TCP_QUEUE_OOSEQ */ - } - - pcb->state = CLOSED; - /* reset the local port to prevent the pcb from being 'bound' */ - pcb->local_port = 0; - - LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); -} - -/** - * Calculates a new initial sequence number for new connections. - * - * @return u32_t pseudo random sequence number - */ -u32_t -tcp_next_iss(struct tcp_pcb *pcb) -{ -#ifdef LWIP_HOOK_TCP_ISN - 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_UNUSED_ARG(pcb); - - iss += tcp_ticks; /* XXX */ - return iss; -#endif /* LWIP_HOOK_TCP_ISN */ -} - -#if TCP_CALCULATE_EFF_SEND_MSS -/** - * Calculates the effective send mss that can be used for a specific IP address - * by using ip_route to determine the netif used to send to the address and - * calculating the minimum of TCP_MSS and that netif's mtu (if set). - */ -u16_t -tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest -#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING - , const ip_addr_t *src -#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ - ) -{ - u16_t mss_s; - struct netif *outif; - s16_t mtu; - - outif = ip_route(src, dest); -#if LWIP_IPV6 -#if LWIP_IPV4 - if (IP_IS_V6(dest)) -#endif /* LWIP_IPV4 */ - { - /* First look in destination cache, to see if there is a Path MTU. */ - mtu = nd6_get_destination_mtu(ip_2_ip6(dest), outif); - } -#if LWIP_IPV4 - else -#endif /* LWIP_IPV4 */ -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - { - if (outif == NULL) { - return sendmss; - } - mtu = outif->mtu; - } -#endif /* LWIP_IPV4 */ - - if (mtu != 0) { -#if LWIP_IPV6 -#if LWIP_IPV4 - if (IP_IS_V6(dest)) -#endif /* LWIP_IPV4 */ - { - mss_s = mtu - IP6_HLEN - TCP_HLEN; - } -#if LWIP_IPV4 - else -#endif /* LWIP_IPV4 */ -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - { - mss_s = mtu - IP_HLEN - TCP_HLEN; - } -#endif /* LWIP_IPV4 */ - /* 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); - } - return sendmss; -} -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - -/** Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list */ -static void -tcp_netif_ip_addr_changed_pcblist(const ip_addr_t* old_addr, struct tcp_pcb* pcb_list) -{ - struct tcp_pcb *pcb; - pcb = pcb_list; - while (pcb != NULL) { - /* PCB bound to current local interface address? */ - if (ip_addr_cmp(&pcb->local_ip, old_addr) -#if LWIP_AUTOIP - /* connections to link-local addresses must persist (RFC3927 ch. 1.9) */ - && (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip))) -#endif /* LWIP_AUTOIP */ - ) { - /* this connection must be aborted */ - struct tcp_pcb *next = pcb->next; - LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); - tcp_abort(pcb); - pcb = next; - } else { - pcb = pcb->next; - } - } -} - -/** This function is called from netif.c when address is changed or netif is removed - * - * @param old_addr IP address of the netif before change - * @param new_addr IP address of the netif after change or NULL if netif has been removed - */ -void -tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) -{ - struct tcp_pcb_listen *lpcb, *next; - - if (!ip_addr_isany(old_addr)) { - tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); - tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); - - if (!ip_addr_isany(new_addr)) { - /* PCB bound to current local interface address? */ - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { - next = lpcb->next; - /* PCB bound to current local interface address? */ - if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { - /* The PCB is listening to the old ipaddr and - * is set to listen to the new one instead */ - ip_addr_copy(lpcb->local_ip, *new_addr); - } - } - } - } -} - -const char* -tcp_debug_state_str(enum tcp_state s) -{ - return tcp_state_str[s]; -} - -#if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG -/** - * Print a tcp header for debugging purposes. - * - * @param tcphdr pointer to a struct tcp_hdr - */ -void -tcp_debug_print(struct tcp_hdr *tcphdr) -{ - LWIP_DEBUGF(TCP_DEBUG, ("TCP header:\n")); - LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(TCP_DEBUG, ("| %5"U16_F" | %5"U16_F" | (src port, dest port)\n", - lwip_ntohs(tcphdr->src), lwip_ntohs(tcphdr->dest))); - LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(TCP_DEBUG, ("| %010"U32_F" | (seq no)\n", - lwip_ntohl(tcphdr->seqno))); - LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(TCP_DEBUG, ("| %010"U32_F" | (ack no)\n", - lwip_ntohl(tcphdr->ackno))); - LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(TCP_DEBUG, ("| %2"U16_F" | |%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"| %5"U16_F" | (hdrlen, flags (", - TCPH_HDRLEN(tcphdr), - (u16_t)(TCPH_FLAGS(tcphdr) >> 5 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 4 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 3 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 2 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) >> 1 & 1), - (u16_t)(TCPH_FLAGS(tcphdr) & 1), - lwip_ntohs(tcphdr->wnd))); - tcp_debug_print_flags(TCPH_FLAGS(tcphdr)); - LWIP_DEBUGF(TCP_DEBUG, ("), win)\n")); - LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(TCP_DEBUG, ("| 0x%04"X16_F" | %5"U16_F" | (chksum, urgp)\n", - lwip_ntohs(tcphdr->chksum), lwip_ntohs(tcphdr->urgp))); - LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); -} - -/** - * Print a tcp state for debugging purposes. - * - * @param s enum tcp_state to print - */ -void -tcp_debug_print_state(enum tcp_state s) -{ - LWIP_DEBUGF(TCP_DEBUG, ("State: %s\n", tcp_state_str[s])); -} - -/** - * Print tcp flags for debugging purposes. - * - * @param flags tcp flags, all active flags are printed - */ -void -tcp_debug_print_flags(u8_t flags) -{ - if (flags & TCP_FIN) { - LWIP_DEBUGF(TCP_DEBUG, ("FIN ")); - } - if (flags & TCP_SYN) { - LWIP_DEBUGF(TCP_DEBUG, ("SYN ")); - } - if (flags & TCP_RST) { - LWIP_DEBUGF(TCP_DEBUG, ("RST ")); - } - if (flags & TCP_PSH) { - LWIP_DEBUGF(TCP_DEBUG, ("PSH ")); - } - if (flags & TCP_ACK) { - LWIP_DEBUGF(TCP_DEBUG, ("ACK ")); - } - if (flags & TCP_URG) { - LWIP_DEBUGF(TCP_DEBUG, ("URG ")); - } - if (flags & TCP_ECE) { - LWIP_DEBUGF(TCP_DEBUG, ("ECE ")); - } - if (flags & TCP_CWR) { - LWIP_DEBUGF(TCP_DEBUG, ("CWR ")); - } - LWIP_DEBUGF(TCP_DEBUG, ("\n")); -} - -/** - * Print all tcp_pcbs in every list for debugging purposes. - */ -void -tcp_debug_print_pcbs(void) -{ - struct tcp_pcb *pcb; - struct tcp_pcb_listen *pcbl; - - LWIP_DEBUGF(TCP_DEBUG, ("Active PCB states:\n")); - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ", - pcb->local_port, pcb->remote_port, - pcb->snd_nxt, pcb->rcv_nxt)); - tcp_debug_print_state(pcb->state); - } - - LWIP_DEBUGF(TCP_DEBUG, ("Listen PCB states:\n")); - for (pcbl = tcp_listen_pcbs.listen_pcbs; pcbl != NULL; pcbl = pcbl->next) { - LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F" ", pcbl->local_port)); - tcp_debug_print_state(pcbl->state); - } - - LWIP_DEBUGF(TCP_DEBUG, ("TIME-WAIT PCB states:\n")); - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ", - pcb->local_port, pcb->remote_port, - pcb->snd_nxt, pcb->rcv_nxt)); - tcp_debug_print_state(pcb->state); - } -} - -/** - * Check state consistency of the tcp_pcb lists. - */ -s16_t -tcp_pcbs_sane(void) -{ - struct tcp_pcb *pcb; - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != CLOSED", pcb->state != CLOSED); - LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != LISTEN", pcb->state != LISTEN); - LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); - } - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - LWIP_ASSERT("tcp_pcbs_sane: tw pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); - } - return 1; -} -#endif /* TCP_DEBUG */ - -#endif /* LWIP_TCP */ +/** + * @file + * Transmission Control Protocol for IP + * See also @ref tcp_raw + * + * @defgroup tcp_raw TCP + * @ingroup callbackstyle_api + * Transmission Control Protocol for IP\n + * @see @ref raw_api and @ref netconn + * + * Common functions for the TCP implementation, such as functinos + * for manipulating the data structures and the TCP timer functions. TCP functions + * related to input and output is found in tcp_in.c and tcp_out.c respectively.\n + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/def.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/tcp.h" +#include "lwip/priv/tcp_priv.h" +#include "lwip/debug.h" +#include "lwip/stats.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/nd6.h" + +#include + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +#ifndef TCP_LOCAL_PORT_RANGE_START +/* From http://www.iana.org/assignments/port-numbers: + "The Dynamic and/or Private Ports are those from 49152 through 65535" */ +#define TCP_LOCAL_PORT_RANGE_START 0xc000 +#define TCP_LOCAL_PORT_RANGE_END 0xffff +#define TCP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & ~TCP_LOCAL_PORT_RANGE_START) + TCP_LOCAL_PORT_RANGE_START)) +#endif + +#if LWIP_TCP_KEEPALIVE +#define TCP_KEEP_DUR(pcb) ((pcb)->keep_cnt * (pcb)->keep_intvl) +#define TCP_KEEP_INTVL(pcb) ((pcb)->keep_intvl) +#else /* LWIP_TCP_KEEPALIVE */ +#define TCP_KEEP_DUR(pcb) TCP_MAXIDLE +#define TCP_KEEP_INTVL(pcb) TCP_KEEPINTVL_DEFAULT +#endif /* LWIP_TCP_KEEPALIVE */ + +/* As initial send MSS, we use TCP_MSS but limit it to 536. */ +#if TCP_MSS > 536 +#define INITIAL_MSS 536 +#else +#define INITIAL_MSS TCP_MSS +#endif + +static const char * const tcp_state_str[] = { + "CLOSED", + "LISTEN", + "SYN_SENT", + "SYN_RCVD", + "ESTABLISHED", + "FIN_WAIT_1", + "FIN_WAIT_2", + "CLOSE_WAIT", + "CLOSING", + "LAST_ACK", + "TIME_WAIT" +}; + +/* last local TCP port */ +static u16_t tcp_port = TCP_LOCAL_PORT_RANGE_START; + +/* Incremented every coarse grained timer shot (typically every 500 ms). */ +u32_t tcp_ticks; +static const u8_t tcp_backoff[13] = + { 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7}; + /* Times per slowtmr hits */ +static const u8_t tcp_persist_backoff[7] = { 3, 6, 12, 24, 48, 96, 120 }; + +/* The TCP PCB lists. */ + +/** List of all TCP PCBs bound but not yet (connected || listening) */ +struct tcp_pcb *tcp_bound_pcbs; +/** List of all TCP PCBs in LISTEN state */ +union tcp_listen_pcbs_t tcp_listen_pcbs; +/** List of all TCP PCBs that are in a state in which + * they accept or send data. */ +struct tcp_pcb *tcp_active_pcbs; +/** List of all TCP PCBs in TIME-WAIT state */ +struct tcp_pcb *tcp_tw_pcbs; + +/** An array with all (non-temporary) PCB lists, mainly used for smaller code size */ +struct tcp_pcb ** const tcp_pcb_lists[] = {&tcp_listen_pcbs.pcbs, &tcp_bound_pcbs, + &tcp_active_pcbs, &tcp_tw_pcbs}; + +u8_t tcp_active_pcbs_changed; + +/** Timer counter to handle calling slow-timer from tcp_tmr() */ +static u8_t tcp_timer; +static u8_t tcp_timer_ctr; +static u16_t tcp_new_port(void); + +static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb); + +/** + * Initialize this module. + */ +void +tcp_init(void) +{ +#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) + tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); +#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ +} + +/** + * Called periodically to dispatch TCP timers. + */ +void +tcp_tmr(void) +{ + /* Call tcp_fasttmr() every 250 ms */ + tcp_fasttmr(); + + if (++tcp_timer & 1) { + /* Call tcp_slowtmr() every 500 ms, i.e., every other timer + tcp_tmr() is called. */ + tcp_slowtmr(); + } +} + +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG +/** Called when a listen pcb is closed. Iterates one pcb list and removes the + * closed listener pcb from pcb->listener if matching. + */ +static void +tcp_remove_listener(struct tcp_pcb *list, struct tcp_pcb_listen *lpcb) +{ + struct tcp_pcb *pcb; + for (pcb = list; pcb != NULL; pcb = pcb->next) { + if (pcb->listener == lpcb) { + pcb->listener = NULL; + } + } +} +#endif + +/** Called when a listen pcb is closed. Iterates all pcb lists and removes the + * closed listener pcb from pcb->listener if matching. + */ +static void +tcp_listen_closed(struct tcp_pcb *pcb) +{ +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG + size_t i; + LWIP_ASSERT("pcb != NULL", pcb != NULL); + LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); + for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { + tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen*)pcb); + } +#endif + LWIP_UNUSED_ARG(pcb); +} + +#if TCP_LISTEN_BACKLOG +/** @ingroup tcp_raw + * Delay accepting a connection in respect to the listen backlog: + * the number of outstanding connections is increased until + * tcp_backlog_accepted() is called. + * + * ATTENTION: the caller is responsible for calling tcp_backlog_accepted() + * or else the backlog feature will get out of sync! + * + * @param pcb the connection pcb which is not fully accepted yet + */ +void +tcp_backlog_delayed(struct tcp_pcb* pcb) +{ + LWIP_ASSERT("pcb != NULL", pcb != NULL); + if ((pcb->flags & TF_BACKLOGPEND) == 0) { + if (pcb->listener != NULL) { + pcb->listener->accepts_pending++; + LWIP_ASSERT("accepts_pending != 0", pcb->listener->accepts_pending != 0); + pcb->flags |= TF_BACKLOGPEND; + } + } +} + +/** @ingroup tcp_raw + * A delayed-accept a connection is accepted (or closed/aborted): decreases + * the number of outstanding connections after calling tcp_backlog_delayed(). + * + * ATTENTION: the caller is responsible for calling tcp_backlog_accepted() + * or else the backlog feature will get out of sync! + * + * @param pcb the connection pcb which is now fully accepted (or closed/aborted) + */ +void +tcp_backlog_accepted(struct tcp_pcb* pcb) +{ + LWIP_ASSERT("pcb != NULL", pcb != NULL); + if ((pcb->flags & TF_BACKLOGPEND) != 0) { + if (pcb->listener != NULL) { + LWIP_ASSERT("accepts_pending != 0", pcb->listener->accepts_pending != 0); + pcb->listener->accepts_pending--; + pcb->flags &= ~TF_BACKLOGPEND; + } + } +} +#endif /* TCP_LISTEN_BACKLOG */ + +/** + * Closes the TX side of a connection held by the PCB. + * For tcp_close(), a RST is sent if the application didn't receive all data + * (tcp_recved() not called for all data passed to recv callback). + * + * Listening pcbs are freed and may not be referenced any more. + * Connection pcbs are freed if not yet connected and may not be referenced + * any more. If a connection is established (at least SYN received or in + * a closing state), the connection is closed, and put in a closing state. + * The pcb is then automatically freed in tcp_slowtmr(). It is therefore + * unsafe to reference it. + * + * @param pcb the tcp_pcb to close + * @return ERR_OK if connection has been closed + * another err_t if closing failed and pcb is not freed + */ +static err_t +tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) +{ + if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { + if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { + /* Not all data received by application, send RST to tell the remote + side about this. */ + LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); + + /* don't call tcp_abort here: we must not deallocate the pcb since + that might not be expected when calling tcp_close */ + tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, + pcb->local_port, pcb->remote_port); + + tcp_pcb_purge(pcb); + TCP_RMV_ACTIVE(pcb); + if (pcb->state == ESTABLISHED) { + /* move to TIME_WAIT since we close actively */ + pcb->state = TIME_WAIT; + TCP_REG(&tcp_tw_pcbs, pcb); + } else { + /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ + if (tcp_input_pcb == pcb) { + /* prevent using a deallocated pcb: free it from tcp_input later */ + tcp_trigger_input_pcb_close(); + } else { + memp_free(MEMP_TCP_PCB, pcb); + } + } + return ERR_OK; + } + } + + /* - states which free the pcb are handled here, + - states which send FIN and change state are handled in tcp_close_shutdown_fin() */ + switch (pcb->state) { + case CLOSED: + /* Closing a pcb in the CLOSED state might seem erroneous, + * however, it is in this state once allocated and as yet unused + * and the user needs some way to free it should the need arise. + * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) + * or for a pcb that has been used and then entered the CLOSED state + * is erroneous, but this should never happen as the pcb has in those cases + * been freed, and so any remaining handles are bogus. */ + if (pcb->local_port != 0) { + TCP_RMV(&tcp_bound_pcbs, pcb); + } + memp_free(MEMP_TCP_PCB, pcb); + break; + case LISTEN: + tcp_listen_closed(pcb); + tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); + memp_free(MEMP_TCP_PCB_LISTEN, pcb); + break; + case SYN_SENT: + TCP_PCB_REMOVE_ACTIVE(pcb); + memp_free(MEMP_TCP_PCB, pcb); + MIB2_STATS_INC(mib2.tcpattemptfails); + break; + default: + return tcp_close_shutdown_fin(pcb); + } + return ERR_OK; +} + +static err_t +tcp_close_shutdown_fin(struct tcp_pcb *pcb) +{ + err_t err; + LWIP_ASSERT("pcb != NULL", pcb != NULL); + + switch (pcb->state) { + case SYN_RCVD: + err = tcp_send_fin(pcb); + if (err == ERR_OK) { + tcp_backlog_accepted(pcb); + MIB2_STATS_INC(mib2.tcpattemptfails); + pcb->state = FIN_WAIT_1; + } + break; + case ESTABLISHED: + err = tcp_send_fin(pcb); + if (err == ERR_OK) { + MIB2_STATS_INC(mib2.tcpestabresets); + pcb->state = FIN_WAIT_1; + } + break; + case CLOSE_WAIT: + err = tcp_send_fin(pcb); + if (err == ERR_OK) { + MIB2_STATS_INC(mib2.tcpestabresets); + pcb->state = LAST_ACK; + } + break; + default: + /* Has already been closed, do nothing. */ + return ERR_OK; + } + + if (err == ERR_OK) { + /* To ensure all data has been sent when tcp_close returns, we have + to make sure tcp_output doesn't fail. + Since we don't really have to ensure all data has been sent when tcp_close + returns (unsent data is sent from tcp timer functions, also), we don't care + for the return value of tcp_output for now. */ + tcp_output(pcb); + } else if (err == ERR_MEM) { + /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ + pcb->flags |= TF_CLOSEPEND; + /* We have to return ERR_OK from here to indicate to the callers that this + pcb should not be used any more as it will be freed soon via tcp_tmr. + This is OK here since sending FIN does not guarantee a time frime for + actually freeing the pcb, either (it is left in closure states for + remote ACK or timeout) */ + return ERR_OK; + } + return err; +} + +/** + * @ingroup tcp_raw + * Closes the connection held by the PCB. + * + * Listening pcbs are freed and may not be referenced any more. + * Connection pcbs are freed if not yet connected and may not be referenced + * any more. If a connection is established (at least SYN received or in + * a closing state), the connection is closed, and put in a closing state. + * The pcb is then automatically freed in tcp_slowtmr(). It is therefore + * unsafe to reference it (unless an error is returned). + * + * @param pcb the tcp_pcb to close + * @return ERR_OK if connection has been closed + * another err_t if closing failed and pcb is not freed + */ +err_t +tcp_close(struct tcp_pcb *pcb) +{ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); + tcp_debug_print_state(pcb->state); + + if (pcb->state != LISTEN) { + /* Set a flag not to receive any more data... */ + pcb->flags |= TF_RXCLOSED; + } + /* ... and close */ + return tcp_close_shutdown(pcb, 1); +} + +/** + * @ingroup tcp_raw + * Causes all or part of a full-duplex connection of this PCB to be shut down. + * This doesn't deallocate the PCB unless shutting down both sides! + * Shutting down both sides is the same as calling tcp_close, so if it succeds + * (i.e. returns ER_OK), the PCB must not be referenced any more! + * + * @param pcb PCB to shutdown + * @param shut_rx shut down receive side if this is != 0 + * @param shut_tx shut down send side if this is != 0 + * @return ERR_OK if shutdown succeeded (or the PCB has already been shut down) + * another err_t on error. + */ +err_t +tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx) +{ + if (pcb->state == LISTEN) { + return ERR_CONN; + } + if (shut_rx) { + /* shut down the receive side: set a flag not to receive any more data... */ + pcb->flags |= TF_RXCLOSED; + if (shut_tx) { + /* shutting down the tx AND rx side is the same as closing for the raw API */ + return tcp_close_shutdown(pcb, 1); + } + /* ... and free buffered data */ + if (pcb->refused_data != NULL) { + pbuf_free(pcb->refused_data); + pcb->refused_data = NULL; + } + } + if (shut_tx) { + /* This can't happen twice since if it succeeds, the pcb's state is changed. + Only close in these states as the others directly deallocate the PCB */ + switch (pcb->state) { + case SYN_RCVD: + case ESTABLISHED: + case CLOSE_WAIT: + return tcp_close_shutdown(pcb, (u8_t)shut_rx); + default: + /* Not (yet?) connected, cannot shutdown the TX side as that would bring us + into CLOSED state, where the PCB is deallocated. */ + return ERR_CONN; + } + } + return ERR_OK; +} + +/** + * Abandons a connection and optionally sends a RST to the remote + * host. Deletes the local protocol control block. This is done when + * a connection is killed because of shortage of memory. + * + * @param pcb the tcp_pcb to abort + * @param reset boolean to indicate whether a reset should be sent + */ +void +tcp_abandon(struct tcp_pcb *pcb, int reset) +{ + u32_t seqno, ackno; +#if LWIP_CALLBACK_API + tcp_err_fn errf; +#endif /* LWIP_CALLBACK_API */ + void *errf_arg; + + /* pcb->state LISTEN not allowed here */ + LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", + pcb->state != LISTEN); + /* Figure out on which TCP PCB list we are, and remove us. If we + are in an active state, call the receive function associated with + the PCB with a NULL argument, and send an RST to the remote end. */ + if (pcb->state == TIME_WAIT) { + tcp_pcb_remove(&tcp_tw_pcbs, pcb); + memp_free(MEMP_TCP_PCB, pcb); + } else { + int send_rst = 0; + u16_t local_port = 0; + enum tcp_state last_state; + seqno = pcb->snd_nxt; + ackno = pcb->rcv_nxt; +#if LWIP_CALLBACK_API + errf = pcb->errf; +#endif /* LWIP_CALLBACK_API */ + errf_arg = pcb->callback_arg; + if (pcb->state == CLOSED) { + if (pcb->local_port != 0) { + /* bound, not yet opened */ + TCP_RMV(&tcp_bound_pcbs, pcb); + } + } else { + send_rst = reset; + local_port = pcb->local_port; + TCP_PCB_REMOVE_ACTIVE(pcb); + } + if (pcb->unacked != NULL) { + tcp_segs_free(pcb->unacked); + } + if (pcb->unsent != NULL) { + tcp_segs_free(pcb->unsent); + } +#if TCP_QUEUE_OOSEQ + if (pcb->ooseq != NULL) { + tcp_segs_free(pcb->ooseq); + } +#endif /* TCP_QUEUE_OOSEQ */ + tcp_backlog_accepted(pcb); + if (send_rst) { + LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n")); + tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port); + } + last_state = pcb->state; + memp_free(MEMP_TCP_PCB, pcb); + TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); + } +} + +/** + * @ingroup tcp_raw + * Aborts the connection by sending a RST (reset) segment to the remote + * host. The pcb is deallocated. This function never fails. + * + * ATTENTION: When calling this from one of the TCP callbacks, make + * sure you always return ERR_ABRT (and never return ERR_ABRT otherwise + * or you will risk accessing deallocated memory or memory leaks! + * + * @param pcb the tcp pcb to abort + */ +void +tcp_abort(struct tcp_pcb *pcb) +{ + tcp_abandon(pcb, 1); +} + +/** + * @ingroup tcp_raw + * Binds the connection to a local port number and IP address. If the + * IP address is not given (i.e., ipaddr == NULL), the IP address of + * the outgoing network interface is used instead. + * + * @param pcb the tcp_pcb to bind (no check is done whether this pcb is + * already bound!) + * @param ipaddr the local ip address to bind to (use IP4_ADDR_ANY to bind + * to any local address + * @param port the local port to bind to + * @return ERR_USE if the port is already in use + * ERR_VAL if bind failed because the PCB is not in a valid state + * ERR_OK if bound + */ +err_t +tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) +{ + int i; + int max_pcb_list = NUM_TCP_PCB_LISTS; + struct tcp_pcb *cpcb; + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (ipaddr == NULL) { + ipaddr = IP4_ADDR_ANY; + } +#endif /* LWIP_IPV4 */ + + /* still need to check for ipaddr == NULL in IPv6 only case */ + if ((pcb == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + + LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); + +#if SO_REUSE + /* Unless the REUSEADDR flag is set, + we have to check the pcbs in TIME-WAIT state, also. + We do not dump TIME_WAIT pcb's; they can still be matched by incoming + packets using both local and remote IP addresses and ports to distinguish. + */ + if (ip_get_option(pcb, SOF_REUSEADDR)) { + max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; + } +#endif /* SO_REUSE */ + + if (port == 0) { + port = tcp_new_port(); + if (port == 0) { + return ERR_BUF; + } + } else { + /* Check if the address already is in use (on all lists) */ + for (i = 0; i < max_pcb_list; i++) { + for (cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { + if (cpcb->local_port == port) { +#if SO_REUSE + /* Omit checking for the same port if both pcbs have REUSEADDR set. + For SO_REUSEADDR, the duplicate-check for a 5-tuple is done in + tcp_connect. */ + if (!ip_get_option(pcb, SOF_REUSEADDR) || + !ip_get_option(cpcb, SOF_REUSEADDR)) +#endif /* SO_REUSE */ + { + /* @todo: check accept_any_ip_version */ + if ((IP_IS_V6(ipaddr) == IP_IS_V6_VAL(cpcb->local_ip)) && + (ip_addr_isany(&cpcb->local_ip) || + ip_addr_isany(ipaddr) || + ip_addr_cmp(&cpcb->local_ip, ipaddr))) { + return ERR_USE; + } + } + } + } + } + } + + if (!ip_addr_isany(ipaddr)) { + ip_addr_set(&pcb->local_ip, ipaddr); + } + pcb->local_port = port; + TCP_REG(&tcp_bound_pcbs, pcb); + LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); + return ERR_OK; +} +#if LWIP_CALLBACK_API +/** + * Default accept callback if no accept callback is specified by the user. + */ +static err_t +tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err) +{ + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(err); + + tcp_abort(pcb); + + return ERR_ABRT; +} +#endif /* LWIP_CALLBACK_API */ + +/** + * @ingroup tcp_raw + * Set the state of the connection to be LISTEN, which means that it + * is able to accept incoming connections. The protocol control block + * is reallocated in order to consume less memory. Setting the + * connection to LISTEN is an irreversible process. + * + * @param pcb the original tcp_pcb + * @param backlog the incoming connections queue limit + * @return tcp_pcb used for listening, consumes less memory. + * + * @note The original tcp_pcb is freed. This function therefore has to be + * called like this: + * tpcb = tcp_listen_with_backlog(tpcb, backlog); + */ +struct tcp_pcb * +tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) +{ + return tcp_listen_with_backlog_and_err(pcb, backlog, NULL); +} + +/** + * @ingroup tcp_raw + * Set the state of the connection to be LISTEN, which means that it + * is able to accept incoming connections. The protocol control block + * is reallocated in order to consume less memory. Setting the + * connection to LISTEN is an irreversible process. + * + * @param pcb the original tcp_pcb + * @param backlog the incoming connections queue limit + * @param err when NULL is returned, this contains the error reason + * @return tcp_pcb used for listening, consumes less memory. + * + * @note The original tcp_pcb is freed. This function therefore has to be + * called like this: + * tpcb = tcp_listen_with_backlog_and_err(tpcb, backlog, &err); + */ +struct tcp_pcb * +tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err) +{ + struct tcp_pcb_listen *lpcb = NULL; + err_t res; + + LWIP_UNUSED_ARG(backlog); + LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, res = ERR_CLSD; goto done); + + /* already listening? */ + if (pcb->state == LISTEN) { + lpcb = (struct tcp_pcb_listen*)pcb; + res = ERR_ALREADY; + goto done; + } +#if SO_REUSE + if (ip_get_option(pcb, SOF_REUSEADDR)) { + /* Since SOF_REUSEADDR allows reusing a local address before the pcb's usage + is declared (listen-/connection-pcb), we have to make sure now that + this port is only used once for every local IP. */ + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { + if ((lpcb->local_port == pcb->local_port) && + ip_addr_cmp(&lpcb->local_ip, &pcb->local_ip)) { + /* this address/port is already used */ + lpcb = NULL; + res = ERR_USE; + goto done; + } + } + } +#endif /* SO_REUSE */ + lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); + if (lpcb == NULL) { + res = ERR_MEM; + goto done; + } + lpcb->callback_arg = pcb->callback_arg; + lpcb->local_port = pcb->local_port; + lpcb->state = LISTEN; + lpcb->prio = pcb->prio; + lpcb->so_options = pcb->so_options; + lpcb->ttl = pcb->ttl; + lpcb->tos = pcb->tos; +#if LWIP_IPV4 && LWIP_IPV6 + IP_SET_TYPE_VAL(lpcb->remote_ip, pcb->local_ip.type); +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + ip_addr_copy(lpcb->local_ip, pcb->local_ip); + if (pcb->local_port != 0) { + TCP_RMV(&tcp_bound_pcbs, pcb); + } + memp_free(MEMP_TCP_PCB, pcb); +#if LWIP_CALLBACK_API + lpcb->accept = tcp_accept_null; +#endif /* LWIP_CALLBACK_API */ +#if TCP_LISTEN_BACKLOG + lpcb->accepts_pending = 0; + tcp_backlog_set(lpcb, backlog); +#endif /* TCP_LISTEN_BACKLOG */ + TCP_REG(&tcp_listen_pcbs.pcbs, (struct tcp_pcb *)lpcb); + res = ERR_OK; +done: + if (err != NULL) { + *err = res; + } + return (struct tcp_pcb *)lpcb; +} + +/** + * Update the state that tracks the available window space to advertise. + * + * Returns how much extra window would be advertised if we sent an + * update now. + */ +u32_t +tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) +{ + u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; + + if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { + /* we can advertise more window */ + pcb->rcv_ann_wnd = pcb->rcv_wnd; + return new_right_edge - pcb->rcv_ann_right_edge; + } else { + if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { + /* Can happen due to other end sending out of advertised window, + * but within actual available (but not yet advertised) window */ + pcb->rcv_ann_wnd = 0; + } else { + /* keep the right edge of window constant */ + u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; +#if !LWIP_WND_SCALE + LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); +#endif + pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; + } + return 0; + } +} + +/** + * @ingroup tcp_raw + * This function should be called by the application when it has + * processed the data. The purpose is to advertise a larger window + * when the data has been processed. + * + * @param pcb the tcp_pcb for which data is read + * @param len the amount of bytes that have been read by the application + */ +void +tcp_recved(struct tcp_pcb *pcb, u16_t len) +{ + int wnd_inflation; + + /* pcb->state LISTEN not allowed here */ + LWIP_ASSERT("don't call tcp_recved for listen-pcbs", + pcb->state != LISTEN); + + pcb->rcv_wnd += len; + if (pcb->rcv_wnd > TCP_WND_MAX(pcb)) { + pcb->rcv_wnd = TCP_WND_MAX(pcb); + } else if (pcb->rcv_wnd == 0) { + /* rcv_wnd overflowed */ + if ((pcb->state == CLOSE_WAIT) || (pcb->state == LAST_ACK)) { + /* In passive close, we allow this, since the FIN bit is added to rcv_wnd + by the stack itself, since it is not mandatory for an application + to call tcp_recved() for the FIN bit, but e.g. the netconn API does so. */ + pcb->rcv_wnd = TCP_WND_MAX(pcb); + } else { + LWIP_ASSERT("tcp_recved: len wrapped rcv_wnd\n", 0); + } + } + + wnd_inflation = tcp_update_rcv_ann_wnd(pcb); + + /* If the change in the right edge of window is significant (default + * watermark is TCP_WND/4), then send an explicit update now. + * Otherwise wait for a packet to be sent in the normal course of + * events (or more window to be available later) */ + if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { + tcp_ack_now(pcb); + tcp_output(pcb); + } + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n", + len, pcb->rcv_wnd, (u16_t)(TCP_WND_MAX(pcb) - pcb->rcv_wnd))); +} + +/** + * Allocate a new local TCP port. + * + * @return a new (free) local TCP port number + */ +static u16_t +tcp_new_port(void) +{ + u8_t i; + u16_t n = 0; + struct tcp_pcb *pcb; + +again: + if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { + tcp_port = TCP_LOCAL_PORT_RANGE_START; + } + /* 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) { + if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { + return 0; + } + goto again; + } + } + } + return tcp_port; +} + +/** + * @ingroup tcp_raw + * Connects to another host. The function given as the "connected" + * argument will be called when the connection has been established. + * + * @param pcb the tcp_pcb used to establish the connection + * @param ipaddr the remote ip address to connect to + * @param port the remote tcp port to connect to + * @param connected callback function to call when connected (on error, + the err calback will be called) + * @return ERR_VAL if invalid arguments are given + * ERR_OK if connect request has been sent + * other err_t values if connect request couldn't be sent + */ +err_t +tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, + tcp_connected_fn connected) +{ + err_t ret; + u32_t iss; + u16_t old_local_port; + + if ((pcb == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + + LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); + ip_addr_set(&pcb->remote_ip, ipaddr); + pcb->remote_port = port; + + /* check if we have a route to the remote host */ + if (ip_addr_isany(&pcb->local_ip)) { + /* no local IP address set, yet. */ + struct netif *netif; + const ip_addr_t *local_ip; + ip_route_get_local_ip(&pcb->local_ip, &pcb->remote_ip, netif, local_ip); + if ((netif == NULL) || (local_ip == NULL)) { + /* Don't even try to send a SYN packet if we have no route + since that will fail. */ + return ERR_RTE; + } + /* Use the address as local address of the pcb. */ + ip_addr_copy(pcb->local_ip, *local_ip); + } + + old_local_port = pcb->local_port; + if (pcb->local_port == 0) { + pcb->local_port = tcp_new_port(); + if (pcb->local_port == 0) { + return ERR_BUF; + } + } else { +#if SO_REUSE + if (ip_get_option(pcb, SOF_REUSEADDR)) { + /* Since SOF_REUSEADDR allows reusing a local address, we have to make sure + now that the 5-tuple is unique. */ + struct tcp_pcb *cpcb; + int i; + /* Don't check listen- and bound-PCBs, check active- and TIME-WAIT PCBs. */ + for (i = 2; i < NUM_TCP_PCB_LISTS; i++) { + for (cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { + if ((cpcb->local_port == pcb->local_port) && + (cpcb->remote_port == port) && + ip_addr_cmp(&cpcb->local_ip, &pcb->local_ip) && + ip_addr_cmp(&cpcb->remote_ip, ipaddr)) { + /* linux returns EISCONN here, but ERR_USE should be OK for us */ + return ERR_USE; + } + } + } + } +#endif /* SO_REUSE */ + } + + iss = tcp_next_iss(pcb); + pcb->rcv_nxt = 0; + pcb->snd_nxt = iss; + pcb->lastack = iss - 1; + pcb->snd_wl2 = iss - 1; + pcb->snd_lbb = iss - 1; + /* Start with a window that does not need scaling. When window scaling is + enabled and used, the window is enlarged when both sides agree on scaling. */ + pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); + pcb->rcv_ann_right_edge = pcb->rcv_nxt; + pcb->snd_wnd = TCP_WND; + /* As initial send MSS, we use TCP_MSS but limit it to 536. + The send MSS is updated when an MSS option is received. */ + pcb->mss = INITIAL_MSS; +#if TCP_CALCULATE_EFF_SEND_MSS + pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + pcb->cwnd = 1; +#if LWIP_CALLBACK_API + pcb->connected = connected; +#else /* LWIP_CALLBACK_API */ + LWIP_UNUSED_ARG(connected); +#endif /* LWIP_CALLBACK_API */ + + /* Send a SYN together with the MSS option. */ + ret = tcp_enqueue_flags(pcb, TCP_SYN); + if (ret == ERR_OK) { + /* SYN segment was enqueued, changed the pcbs state now */ + pcb->state = SYN_SENT; + if (old_local_port != 0) { + TCP_RMV(&tcp_bound_pcbs, pcb); + } + TCP_REG_ACTIVE(pcb); + MIB2_STATS_INC(mib2.tcpactiveopens); + + tcp_output(pcb); + } + return ret; +} + +/** + * Called every 500 ms and implements the retransmission timer and the timer that + * removes PCBs that have been in TIME-WAIT for enough time. It also increments + * various timers such as the inactivity timer in each PCB. + * + * Automatically called from tcp_tmr(). + */ +void +tcp_slowtmr(void) +{ + struct tcp_pcb *pcb, *prev; + tcpwnd_size_t eff_wnd; + u8_t pcb_remove; /* flag if a PCB should be removed */ + u8_t pcb_reset; /* flag if a RST should be sent when removing */ + err_t err; + + err = ERR_OK; + + ++tcp_ticks; + ++tcp_timer_ctr; + +tcp_slowtmr_start: + /* Steps through all of the active PCBs. */ + prev = NULL; + pcb = tcp_active_pcbs; + if (pcb == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); + } + while (pcb != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); + LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); + LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); + LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); + if (pcb->last_timer == tcp_timer_ctr) { + /* skip this pcb, we have already processed it */ + pcb = pcb->next; + continue; + } + pcb->last_timer = tcp_timer_ctr; + + pcb_remove = 0; + pcb_reset = 0; + + if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { + ++pcb_remove; + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); + } + else if (pcb->nrtx >= TCP_MAXRTX) { + ++pcb_remove; + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); + } else { + if (pcb->persist_backoff > 0) { + /* If snd_wnd is zero, use persist timer to send 1 byte probes + * instead of using the standard retransmission mechanism. */ + u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff-1]; + if (pcb->persist_cnt < backoff_cnt) { + pcb->persist_cnt++; + } + if (pcb->persist_cnt >= backoff_cnt) { + if (tcp_zero_window_probe(pcb) == ERR_OK) { + pcb->persist_cnt = 0; + if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { + pcb->persist_backoff++; + } + } + } + } else { + /* Increase the retransmission timer if it is running */ + if (pcb->rtime >= 0) { + ++pcb->rtime; + } + + if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { + /* Time for a retransmission. */ + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_slowtmr: rtime %"S16_F + " pcb->rto %"S16_F"\n", + pcb->rtime, pcb->rto)); + + /* Double retransmission time-out unless we are trying to + * connect to somebody (i.e., we are in SYN_SENT). */ + if (pcb->state != SYN_SENT) { + u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff)-1); + pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; + } + + /* Reset the retransmission timer. */ + pcb->rtime = 0; + + /* Reduce congestion window and ssthresh. */ + eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); + pcb->ssthresh = eff_wnd >> 1; + if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { + pcb->ssthresh = (pcb->mss << 1); + } + pcb->cwnd = pcb->mss; + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: cwnd %"TCPWNDSIZE_F + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + + /* The following needs to be called AFTER cwnd is set to one + mss - STJ */ + tcp_rexmit_rto(pcb); + } + } + } + /* Check if this PCB has stayed too long in FIN-WAIT-2 */ + if (pcb->state == FIN_WAIT_2) { + /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ + if (pcb->flags & TF_RXCLOSED) { + /* PCB was fully closed (either through close() or SHUT_RDWR): + normal FIN-WAIT timeout handling. */ + if ((u32_t)(tcp_ticks - pcb->tmr) > + TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { + ++pcb_remove; + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in FIN-WAIT-2\n")); + } + } + } + + /* Check if KEEPALIVE should be sent */ + if (ip_get_option(pcb, SOF_KEEPALIVE) && + ((pcb->state == ESTABLISHED) || + (pcb->state == CLOSE_WAIT))) { + if ((u32_t)(tcp_ticks - pcb->tmr) > + (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) + { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to ")); + ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); + LWIP_DEBUGF(TCP_DEBUG, ("\n")); + + ++pcb_remove; + ++pcb_reset; + } else if ((u32_t)(tcp_ticks - pcb->tmr) > + (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) + / TCP_SLOW_INTERVAL) + { + err = tcp_keepalive(pcb); + if (err == ERR_OK) { + pcb->keep_cnt_sent++; + } + } + } + + /* If this PCB has queued out of sequence data, but has been + inactive for too long, will drop the data (it will eventually + be retransmitted). */ +#if TCP_QUEUE_OOSEQ + if (pcb->ooseq != NULL && + (u32_t)tcp_ticks - pcb->tmr >= pcb->rto * TCP_OOSEQ_TIMEOUT) { + tcp_segs_free(pcb->ooseq); + pcb->ooseq = NULL; + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); + } +#endif /* TCP_QUEUE_OOSEQ */ + + /* Check if this PCB has stayed too long in SYN-RCVD */ + if (pcb->state == SYN_RCVD) { + if ((u32_t)(tcp_ticks - pcb->tmr) > + TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { + ++pcb_remove; + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n")); + } + } + + /* Check if this PCB has stayed too long in LAST-ACK */ + if (pcb->state == LAST_ACK) { + if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { + ++pcb_remove; + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); + } + } + + /* If the PCB should be removed, do it. */ + if (pcb_remove) { + struct tcp_pcb *pcb2; +#if LWIP_CALLBACK_API + tcp_err_fn err_fn = pcb->errf; +#endif /* LWIP_CALLBACK_API */ + void *err_arg; + enum tcp_state last_state; + tcp_pcb_purge(pcb); + /* Remove PCB from tcp_active_pcbs list. */ + if (prev != NULL) { + LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); + prev->next = pcb->next; + } else { + /* This PCB was the first. */ + LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); + tcp_active_pcbs = pcb->next; + } + + if (pcb_reset) { + tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, + pcb->local_port, pcb->remote_port); + } + + err_arg = pcb->callback_arg; + last_state = pcb->state; + pcb2 = pcb; + pcb = pcb->next; + memp_free(MEMP_TCP_PCB, pcb2); + + tcp_active_pcbs_changed = 0; + TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); + if (tcp_active_pcbs_changed) { + goto tcp_slowtmr_start; + } + } else { + /* get the 'next' element now and work with 'prev' below (in case of abort) */ + prev = pcb; + pcb = pcb->next; + + /* We check if we should poll the connection. */ + ++prev->polltmr; + if (prev->polltmr >= prev->pollinterval) { + prev->polltmr = 0; + LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); + tcp_active_pcbs_changed = 0; + TCP_EVENT_POLL(prev, err); + if (tcp_active_pcbs_changed) { + goto tcp_slowtmr_start; + } + /* if err == ERR_ABRT, 'prev' is already deallocated */ + if (err == ERR_OK) { + tcp_output(prev); + } + } + } + } + + + /* Steps through all of the TIME-WAIT PCBs. */ + prev = NULL; + pcb = tcp_tw_pcbs; + while (pcb != NULL) { + LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); + pcb_remove = 0; + + /* Check if this PCB has stayed long enough in TIME-WAIT */ + if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { + ++pcb_remove; + } + + /* If the PCB should be removed, do it. */ + if (pcb_remove) { + struct tcp_pcb *pcb2; + tcp_pcb_purge(pcb); + /* Remove PCB from tcp_tw_pcbs list. */ + if (prev != NULL) { + LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); + prev->next = pcb->next; + } else { + /* This PCB was the first. */ + LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); + tcp_tw_pcbs = pcb->next; + } + pcb2 = pcb; + pcb = pcb->next; + memp_free(MEMP_TCP_PCB, pcb2); + } else { + prev = pcb; + pcb = pcb->next; + } + } +} + +/** + * Is called every TCP_FAST_INTERVAL (250 ms) and process data previously + * "refused" by upper layer (application) and sends delayed ACKs. + * + * Automatically called from tcp_tmr(). + */ +void +tcp_fasttmr(void) +{ + struct tcp_pcb *pcb; + + ++tcp_timer_ctr; + +tcp_fasttmr_start: + pcb = tcp_active_pcbs; + + while (pcb != NULL) { + if (pcb->last_timer != tcp_timer_ctr) { + struct tcp_pcb *next; + pcb->last_timer = tcp_timer_ctr; + /* send delayed ACKs */ + if (pcb->flags & TF_ACK_DELAY) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); + tcp_ack_now(pcb); + tcp_output(pcb); + pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + } + /* send pending FIN */ + if (pcb->flags & TF_CLOSEPEND) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); + pcb->flags &= ~(TF_CLOSEPEND); + tcp_close_shutdown_fin(pcb); + } + + next = pcb->next; + + /* If there is data which was previously "refused" by upper layer */ + if (pcb->refused_data != NULL) { + tcp_active_pcbs_changed = 0; + tcp_process_refused_data(pcb); + if (tcp_active_pcbs_changed) { + /* application callback has changed the pcb list: restart the loop */ + goto tcp_fasttmr_start; + } + } + pcb = next; + } else { + pcb = pcb->next; + } + } +} + +/** Call tcp_output for all active pcbs that have TF_NAGLEMEMERR set */ +void +tcp_txnow(void) +{ + struct tcp_pcb *pcb; + + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + if (pcb->flags & TF_NAGLEMEMERR) { + tcp_output(pcb); + } + } +} + +/** Pass pcb->refused_data to the recv callback */ +err_t +tcp_process_refused_data(struct tcp_pcb *pcb) +{ +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + struct pbuf *rest; + while (pcb->refused_data != NULL) +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + { + err_t err; + u8_t refused_flags = pcb->refused_data->flags; + /* set pcb->refused_data to NULL in case the callback frees it and then + closes the pcb */ + struct pbuf *refused_data = pcb->refused_data; +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + pbuf_split_64k(refused_data, &rest); + pcb->refused_data = rest; +#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + pcb->refused_data = NULL; +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + /* Notify again application with data previously received. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); + TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); + if (err == ERR_OK) { + /* did refused_data include a FIN? */ + if (refused_flags & PBUF_FLAG_TCP_FIN +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + && (rest == NULL) +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + ) { + /* correct rcv_wnd as the application won't call tcp_recved() + for the FIN's seqno */ + if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { + pcb->rcv_wnd++; + } + TCP_EVENT_CLOSED(pcb, err); + if (err == ERR_ABRT) { + return ERR_ABRT; + } + } + } else if (err == ERR_ABRT) { + /* if err == ERR_ABRT, 'pcb' is already deallocated */ + /* Drop incoming packets because pcb is "full" (only if the incoming + segment contains data). */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n")); + return ERR_ABRT; + } else { + /* data is still refused, pbuf is still valid (go on for ACK-only packets) */ +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + if (rest != NULL) { + pbuf_cat(refused_data, rest); + } +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + pcb->refused_data = refused_data; + return ERR_INPROGRESS; + } + } + return ERR_OK; +} + +/** + * Deallocates a list of TCP segments (tcp_seg structures). + * + * @param seg tcp_seg list of TCP segments to free + */ +void +tcp_segs_free(struct tcp_seg *seg) +{ + while (seg != NULL) { + struct tcp_seg *next = seg->next; + tcp_seg_free(seg); + seg = next; + } +} + +/** + * Frees a TCP segment (tcp_seg structure). + * + * @param seg single tcp_seg to free + */ +void +tcp_seg_free(struct tcp_seg *seg) +{ + if (seg != NULL) { + if (seg->p != NULL) { + pbuf_free(seg->p); +#if TCP_DEBUG + seg->p = NULL; +#endif /* TCP_DEBUG */ + } + memp_free(MEMP_TCP_SEG, seg); + } +} + +/** + * Sets the priority of a connection. + * + * @param pcb the tcp_pcb to manipulate + * @param prio new priority + */ +void +tcp_setprio(struct tcp_pcb *pcb, u8_t prio) +{ + pcb->prio = prio; +} + +#if TCP_QUEUE_OOSEQ +/** + * Returns a copy of the given TCP segment. + * The pbuf and data are not copied, only the pointers + * + * @param seg the old tcp_seg + * @return a copy of seg + */ +struct tcp_seg * +tcp_seg_copy(struct tcp_seg *seg) +{ + struct tcp_seg *cseg; + + cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); + if (cseg == NULL) { + return NULL; + } + SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); + pbuf_ref(cseg->p); + return cseg; +} +#endif /* TCP_QUEUE_OOSEQ */ + +#if LWIP_CALLBACK_API +/** + * Default receive callback that is called if the user didn't register + * a recv callback for the pcb. + */ +err_t +tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) +{ + LWIP_UNUSED_ARG(arg); + if (p != NULL) { + tcp_recved(pcb, p->tot_len); + pbuf_free(p); + } else if (err == ERR_OK) { + return tcp_close(pcb); + } + return ERR_OK; +} +#endif /* LWIP_CALLBACK_API */ + +/** + * Kills the oldest active connection that has the same or lower priority than + * 'prio'. + * + * @param prio minimum priority + */ +static void +tcp_kill_prio(u8_t prio) +{ + struct tcp_pcb *pcb, *inactive; + u32_t inactivity; + u8_t mprio; + + mprio = LWIP_MIN(TCP_PRIO_MAX, prio); + + /* We kill the oldest active connection that has lower priority than prio. */ + inactivity = 0; + inactive = NULL; + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + if (pcb->prio <= mprio && + (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { + inactivity = tcp_ticks - pcb->tmr; + inactive = pcb; + mprio = pcb->prio; + } + } + if (inactive != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", + (void *)inactive, inactivity)); + tcp_abort(inactive); + } +} + +/** + * Kills the oldest connection that is in specific state. + * Called from tcp_alloc() for LAST_ACK and CLOSING if no more connections are available. + */ +static void +tcp_kill_state(enum tcp_state state) +{ + struct tcp_pcb *pcb, *inactive; + u32_t inactivity; + + LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); + + inactivity = 0; + inactive = NULL; + /* Go through the list of active pcbs and get the oldest pcb that is in state + CLOSING/LAST_ACK. */ + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + if (pcb->state == state) { + if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { + inactivity = tcp_ticks - pcb->tmr; + inactive = pcb; + } + } + } + if (inactive != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_closing: killing oldest %s PCB %p (%"S32_F")\n", + tcp_state_str[state], (void *)inactive, inactivity)); + /* Don't send a RST, since no data is lost. */ + tcp_abandon(inactive, 0); + } +} + +/** + * Kills the oldest connection that is in TIME_WAIT state. + * Called from tcp_alloc() if no more connections are available. + */ +static void +tcp_kill_timewait(void) +{ + struct tcp_pcb *pcb, *inactive; + u32_t inactivity; + + inactivity = 0; + inactive = NULL; + /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { + inactivity = tcp_ticks - pcb->tmr; + inactive = pcb; + } + } + if (inactive != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", + (void *)inactive, inactivity)); + tcp_abort(inactive); + } +} + +/** + * Allocate a new tcp_pcb structure. + * + * @param prio priority for the new pcb + * @return a new tcp_pcb that initially is in state CLOSED + */ +struct tcp_pcb * +tcp_alloc(u8_t prio) +{ + struct tcp_pcb *pcb; + + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + if (pcb == NULL) { + /* Try killing oldest connection in TIME-WAIT. */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); + tcp_kill_timewait(); + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + if (pcb == NULL) { + /* Try killing oldest connection in LAST-ACK (these wouldn't go to TIME-WAIT). */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest LAST-ACK connection\n")); + tcp_kill_state(LAST_ACK); + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + if (pcb == NULL) { + /* Try killing oldest connection in CLOSING. */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); + tcp_kill_state(CLOSING); + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + if (pcb == NULL) { + /* Try killing active connections with lower priority than the new one. */ + LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio)); + tcp_kill_prio(prio); + /* Try to allocate a tcp_pcb again. */ + pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); + if (pcb != NULL) { + /* adjust err stats: memp_malloc failed multiple times before */ + MEMP_STATS_DEC(err, MEMP_TCP_PCB); + } + } + if (pcb != NULL) { + /* adjust err stats: memp_malloc failed multiple times before */ + MEMP_STATS_DEC(err, MEMP_TCP_PCB); + } + } + if (pcb != NULL) { + /* adjust err stats: memp_malloc failed multiple times before */ + MEMP_STATS_DEC(err, MEMP_TCP_PCB); + } + } + if (pcb != NULL) { + /* adjust err stats: memp_malloc failed above */ + MEMP_STATS_DEC(err, MEMP_TCP_PCB); + } + } + if (pcb != NULL) { + /* zero out the whole pcb, so there is no need to initialize members to zero */ + memset(pcb, 0, sizeof(struct tcp_pcb)); + pcb->prio = prio; + pcb->snd_buf = TCP_SND_BUF; + /* Start with a window that does not need scaling. When window scaling is + enabled and used, the window is enlarged when both sides agree on scaling. */ + pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); + pcb->ttl = TCP_TTL; + /* As initial send MSS, we use TCP_MSS but limit it to 536. + The send MSS is updated when an MSS option is received. */ + pcb->mss = INITIAL_MSS; + pcb->rto = 3000 / TCP_SLOW_INTERVAL; + pcb->sv = 3000 / TCP_SLOW_INTERVAL; + pcb->rtime = -1; + pcb->cwnd = 1; + pcb->tmr = tcp_ticks; + pcb->last_timer = tcp_timer_ctr; + + /* RFC 5681 recommends setting ssthresh abritrarily high and gives an example + of using the largest advertised receive window. We've seen complications with + receiving TCPs that use window scaling and/or window auto-tuning where the + initial advertised window is very small and then grows rapidly once the + connection is established. To avoid these complications, we set ssthresh to the + largest effective cwnd (amount of in-flight data) that the sender can have. */ + pcb->ssthresh = TCP_SND_BUF; + +#if LWIP_CALLBACK_API + pcb->recv = tcp_recv_null; +#endif /* LWIP_CALLBACK_API */ + + /* Init KEEPALIVE timer */ + pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; + +#if LWIP_TCP_KEEPALIVE + pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT; + pcb->keep_cnt = TCP_KEEPCNT_DEFAULT; +#endif /* LWIP_TCP_KEEPALIVE */ + } + return pcb; +} + +/** + * @ingroup tcp_raw + * Creates a new TCP protocol control block but doesn't place it on + * any of the TCP PCB lists. + * The pcb is not put on any list until binding using tcp_bind(). + * + * @internal: Maybe there should be a idle TCP PCB list where these + * PCBs are put on. Port reservation using tcp_bind() is implemented but + * allocated pcbs that are not bound can't be killed automatically if wanting + * to allocate a pcb with higher prio (@see tcp_kill_prio()) + * + * @return a new tcp_pcb that initially is in state CLOSED + */ +struct tcp_pcb * +tcp_new(void) +{ + return tcp_alloc(TCP_PRIO_NORMAL); +} + +/** + * @ingroup tcp_raw + * Creates a new TCP protocol control block but doesn't + * place it on any of the TCP PCB lists. + * The pcb is not put on any list until binding using tcp_bind(). + * + * @param type IP address type, see @ref lwip_ip_addr_type definitions. + * If you want to listen to IPv4 and IPv6 (dual-stack) connections, + * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. + * @return a new tcp_pcb that initially is in state CLOSED + */ +struct tcp_pcb * +tcp_new_ip_type(u8_t type) +{ + struct tcp_pcb * pcb; + pcb = tcp_alloc(TCP_PRIO_NORMAL); +#if LWIP_IPV4 && LWIP_IPV6 + if (pcb != NULL) { + IP_SET_TYPE_VAL(pcb->local_ip, type); + IP_SET_TYPE_VAL(pcb->remote_ip, type); + } +#else + LWIP_UNUSED_ARG(type); +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + return pcb; +} + +/** + * @ingroup tcp_raw + * Used to specify the argument that should be passed callback + * functions. + * + * @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) +{ + /* This function is allowed to be called for both listen pcbs and + connection pcbs. */ + if (pcb != NULL) { + pcb->callback_arg = arg; + } +} +#if LWIP_CALLBACK_API + +/** + * @ingroup tcp_raw + * Used to specify the function that should be called when a TCP + * connection receives data. + * + * @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) +{ + if (pcb != NULL) { + LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); + pcb->recv = recv; + } +} + +/** + * @ingroup tcp_raw + * Used to specify the function that should be called when TCP data + * has been successfully delivered to the remote host. + * + * @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) +{ + if (pcb != NULL) { + LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); + pcb->sent = sent; + } +} + +/** + * @ingroup tcp_raw + * Used to specify the function that should be called when a fatal error + * has occurred on the connection. + * + * @note The corresponding pcb is already freed when this callback is called! + * + * @param pcb tcp_pcb to set the err callback + * @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) +{ + if (pcb != NULL) { + LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); + pcb->errf = err; + } +} + +/** + * @ingroup tcp_raw + * Used for specifying the function that should be called when a + * LISTENing connection has been connected to another host. + * + * @param pcb tcp_pcb to set the accept callback + * @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) +{ + if ((pcb != NULL) && (pcb->state == LISTEN)) { + struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen*)pcb; + lpcb->accept = accept; + } +} +#endif /* LWIP_CALLBACK_API */ + + +/** + * @ingroup tcp_raw + * Used to specify the function that should be called periodically + * from TCP. The interval is specified in terms of the TCP coarse + * timer interval, which is called twice a second. + * + */ +void +tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) +{ + LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); +#if LWIP_CALLBACK_API + pcb->poll = poll; +#else /* LWIP_CALLBACK_API */ + LWIP_UNUSED_ARG(poll); +#endif /* LWIP_CALLBACK_API */ + pcb->pollinterval = interval; +} + +/** + * Purges a TCP PCB. Removes any buffered data and frees the buffer memory + * (pcb->ooseq, pcb->unsent and pcb->unacked are freed). + * + * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! + */ +void +tcp_pcb_purge(struct tcp_pcb *pcb) +{ + if (pcb->state != CLOSED && + pcb->state != TIME_WAIT && + pcb->state != LISTEN) { + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); + + tcp_backlog_accepted(pcb); + + if (pcb->refused_data != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); + pbuf_free(pcb->refused_data); + pcb->refused_data = NULL; + } + if (pcb->unsent != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: not all data sent\n")); + } + if (pcb->unacked != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->unacked\n")); + } +#if TCP_QUEUE_OOSEQ + if (pcb->ooseq != NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); + } + tcp_segs_free(pcb->ooseq); + pcb->ooseq = NULL; +#endif /* TCP_QUEUE_OOSEQ */ + + /* Stop the retransmission timer as it will expect data on unacked + queue if it fires */ + pcb->rtime = -1; + + tcp_segs_free(pcb->unsent); + tcp_segs_free(pcb->unacked); + pcb->unacked = pcb->unsent = NULL; +#if TCP_OVERSIZE + pcb->unsent_oversize = 0; +#endif /* TCP_OVERSIZE */ + } +} + +/** + * Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first. + * + * @param pcblist PCB list to purge. + * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! + */ +void +tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) +{ + TCP_RMV(pcblist, pcb); + + tcp_pcb_purge(pcb); + + /* if there is an outstanding delayed ACKs, send it */ + if (pcb->state != TIME_WAIT && + pcb->state != LISTEN && + pcb->flags & TF_ACK_DELAY) { + pcb->flags |= TF_ACK_NOW; + tcp_output(pcb); + } + + if (pcb->state != LISTEN) { + LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); + LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); +#if TCP_QUEUE_OOSEQ + LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); +#endif /* TCP_QUEUE_OOSEQ */ + } + + pcb->state = CLOSED; + /* reset the local port to prevent the pcb from being 'bound' */ + pcb->local_port = 0; + + LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); +} + +/** + * Calculates a new initial sequence number for new connections. + * + * @return u32_t pseudo random sequence number + */ +u32_t +tcp_next_iss(struct tcp_pcb *pcb) +{ +#ifdef LWIP_HOOK_TCP_ISN + 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_UNUSED_ARG(pcb); + + iss += tcp_ticks; /* XXX */ + return iss; +#endif /* LWIP_HOOK_TCP_ISN */ +} + +#if TCP_CALCULATE_EFF_SEND_MSS +/** + * Calculates the effective send mss that can be used for a specific IP address + * by using ip_route to determine the netif used to send to the address and + * calculating the minimum of TCP_MSS and that netif's mtu (if set). + */ +u16_t +tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest +#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING + , const ip_addr_t *src +#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ + ) +{ + u16_t mss_s; + struct netif *outif; + s16_t mtu; + + outif = ip_route(src, dest); +#if LWIP_IPV6 +#if LWIP_IPV4 + if (IP_IS_V6(dest)) +#endif /* LWIP_IPV4 */ + { + /* First look in destination cache, to see if there is a Path MTU. */ + mtu = nd6_get_destination_mtu(ip_2_ip6(dest), outif); + } +#if LWIP_IPV4 + else +#endif /* LWIP_IPV4 */ +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + { + if (outif == NULL) { + return sendmss; + } + mtu = outif->mtu; + } +#endif /* LWIP_IPV4 */ + + if (mtu != 0) { +#if LWIP_IPV6 +#if LWIP_IPV4 + if (IP_IS_V6(dest)) +#endif /* LWIP_IPV4 */ + { + mss_s = mtu - IP6_HLEN - TCP_HLEN; + } +#if LWIP_IPV4 + else +#endif /* LWIP_IPV4 */ +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + { + mss_s = mtu - IP_HLEN - TCP_HLEN; + } +#endif /* LWIP_IPV4 */ + /* 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); + } + return sendmss; +} +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + +/** Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list */ +static void +tcp_netif_ip_addr_changed_pcblist(const ip_addr_t* old_addr, struct tcp_pcb* pcb_list) +{ + struct tcp_pcb *pcb; + pcb = pcb_list; + while (pcb != NULL) { + /* PCB bound to current local interface address? */ + if (ip_addr_cmp(&pcb->local_ip, old_addr) +#if LWIP_AUTOIP + /* connections to link-local addresses must persist (RFC3927 ch. 1.9) */ + && (!IP_IS_V4_VAL(pcb->local_ip) || !ip4_addr_islinklocal(ip_2_ip4(&pcb->local_ip))) +#endif /* LWIP_AUTOIP */ + ) { + /* this connection must be aborted */ + struct tcp_pcb *next = pcb->next; + LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); + tcp_abort(pcb); + pcb = next; + } else { + pcb = pcb->next; + } + } +} + +/** This function is called from netif.c when address is changed or netif is removed + * + * @param old_addr IP address of the netif before change + * @param new_addr IP address of the netif after change or NULL if netif has been removed + */ +void +tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr) +{ + struct tcp_pcb_listen *lpcb, *next; + + if (!ip_addr_isany(old_addr)) { + tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); + tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); + + if (!ip_addr_isany(new_addr)) { + /* PCB bound to current local interface address? */ + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = next) { + next = lpcb->next; + /* PCB bound to current local interface address? */ + if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { + /* The PCB is listening to the old ipaddr and + * is set to listen to the new one instead */ + ip_addr_copy(lpcb->local_ip, *new_addr); + } + } + } + } +} + +const char* +tcp_debug_state_str(enum tcp_state s) +{ + return tcp_state_str[s]; +} + +#if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG +/** + * Print a tcp header for debugging purposes. + * + * @param tcphdr pointer to a struct tcp_hdr + */ +void +tcp_debug_print(struct tcp_hdr *tcphdr) +{ + LWIP_DEBUGF(TCP_DEBUG, ("TCP header:\n")); + LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(TCP_DEBUG, ("| %5"U16_F" | %5"U16_F" | (src port, dest port)\n", + lwip_ntohs(tcphdr->src), lwip_ntohs(tcphdr->dest))); + LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(TCP_DEBUG, ("| %010"U32_F" | (seq no)\n", + lwip_ntohl(tcphdr->seqno))); + LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(TCP_DEBUG, ("| %010"U32_F" | (ack no)\n", + lwip_ntohl(tcphdr->ackno))); + LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(TCP_DEBUG, ("| %2"U16_F" | |%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"%"U16_F"| %5"U16_F" | (hdrlen, flags (", + TCPH_HDRLEN(tcphdr), + (u16_t)(TCPH_FLAGS(tcphdr) >> 5 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 4 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 3 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 2 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) >> 1 & 1), + (u16_t)(TCPH_FLAGS(tcphdr) & 1), + lwip_ntohs(tcphdr->wnd))); + tcp_debug_print_flags(TCPH_FLAGS(tcphdr)); + LWIP_DEBUGF(TCP_DEBUG, ("), win)\n")); + LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(TCP_DEBUG, ("| 0x%04"X16_F" | %5"U16_F" | (chksum, urgp)\n", + lwip_ntohs(tcphdr->chksum), lwip_ntohs(tcphdr->urgp))); + LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); +} + +/** + * Print a tcp state for debugging purposes. + * + * @param s enum tcp_state to print + */ +void +tcp_debug_print_state(enum tcp_state s) +{ + LWIP_DEBUGF(TCP_DEBUG, ("State: %s\n", tcp_state_str[s])); +} + +/** + * Print tcp flags for debugging purposes. + * + * @param flags tcp flags, all active flags are printed + */ +void +tcp_debug_print_flags(u8_t flags) +{ + if (flags & TCP_FIN) { + LWIP_DEBUGF(TCP_DEBUG, ("FIN ")); + } + if (flags & TCP_SYN) { + LWIP_DEBUGF(TCP_DEBUG, ("SYN ")); + } + if (flags & TCP_RST) { + LWIP_DEBUGF(TCP_DEBUG, ("RST ")); + } + if (flags & TCP_PSH) { + LWIP_DEBUGF(TCP_DEBUG, ("PSH ")); + } + if (flags & TCP_ACK) { + LWIP_DEBUGF(TCP_DEBUG, ("ACK ")); + } + if (flags & TCP_URG) { + LWIP_DEBUGF(TCP_DEBUG, ("URG ")); + } + if (flags & TCP_ECE) { + LWIP_DEBUGF(TCP_DEBUG, ("ECE ")); + } + if (flags & TCP_CWR) { + LWIP_DEBUGF(TCP_DEBUG, ("CWR ")); + } + LWIP_DEBUGF(TCP_DEBUG, ("\n")); +} + +/** + * Print all tcp_pcbs in every list for debugging purposes. + */ +void +tcp_debug_print_pcbs(void) +{ + struct tcp_pcb *pcb; + struct tcp_pcb_listen *pcbl; + + LWIP_DEBUGF(TCP_DEBUG, ("Active PCB states:\n")); + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ", + pcb->local_port, pcb->remote_port, + pcb->snd_nxt, pcb->rcv_nxt)); + tcp_debug_print_state(pcb->state); + } + + LWIP_DEBUGF(TCP_DEBUG, ("Listen PCB states:\n")); + for (pcbl = tcp_listen_pcbs.listen_pcbs; pcbl != NULL; pcbl = pcbl->next) { + LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F" ", pcbl->local_port)); + tcp_debug_print_state(pcbl->state); + } + + LWIP_DEBUGF(TCP_DEBUG, ("TIME-WAIT PCB states:\n")); + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ", + pcb->local_port, pcb->remote_port, + pcb->snd_nxt, pcb->rcv_nxt)); + tcp_debug_print_state(pcb->state); + } +} + +/** + * Check state consistency of the tcp_pcb lists. + */ +s16_t +tcp_pcbs_sane(void) +{ + struct tcp_pcb *pcb; + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != CLOSED", pcb->state != CLOSED); + LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != LISTEN", pcb->state != LISTEN); + LWIP_ASSERT("tcp_pcbs_sane: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); + } + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + LWIP_ASSERT("tcp_pcbs_sane: tw pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); + } + return 1; +} +#endif /* TCP_DEBUG */ + +#endif /* LWIP_TCP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_in.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_in.c index 5e839ff..17ceaff 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_in.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_in.c @@ -1,1837 +1,1837 @@ -/** - * @file - * Transmission Control Protocol, incoming traffic - * - * The input processing functions of the TCP layer. - * - * These functions are generally called in the order (ip_input() ->) - * tcp_input() -> * tcp_process() -> tcp_receive() (-> application). - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/priv/tcp_priv.h" -#include "lwip/def.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/inet_chksum.h" -#include "lwip/stats.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#if LWIP_ND6_TCP_REACHABILITY_HINTS -#include "lwip/nd6.h" -#endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ - -/** Initial CWND calculation as defined RFC 2581 */ -#define LWIP_TCP_CALC_INITIAL_CWND(mss) LWIP_MIN((4U * (mss)), LWIP_MAX((2U * (mss)), 4380U)); - -/* These variables are global to all functions involved in the input - processing of TCP segments. They are set by the tcp_input() - function. */ -static struct tcp_seg inseg; -static struct tcp_hdr *tcphdr; -static u16_t tcphdr_optlen; -static u16_t tcphdr_opt1len; -static u8_t* tcphdr_opt2; -static u16_t tcp_optidx; -static u32_t seqno, ackno; -static tcpwnd_size_t recv_acked; -static u16_t tcplen; -static u8_t flags; - -static u8_t recv_flags; -static struct pbuf *recv_data; - -struct tcp_pcb *tcp_input_pcb; - -/* Forward declarations. */ -static err_t tcp_process(struct tcp_pcb *pcb); -static void tcp_receive(struct tcp_pcb *pcb); -static void tcp_parseopt(struct tcp_pcb *pcb); - -static void tcp_listen_input(struct tcp_pcb_listen *pcb); -static void tcp_timewait_input(struct tcp_pcb *pcb); - -static int tcp_input_delayed_close(struct tcp_pcb *pcb); - -/** - * The initial input processing of TCP. It verifies the TCP header, demultiplexes - * the segment between the PCBs and passes it on to tcp_process(), which implements - * the TCP finite state machine. This function is called by the IP layer (in - * ip_input()). - * - * @param p received TCP segment to process (p->payload pointing to the TCP header) - * @param inp network interface on which this segment was received - */ -void -tcp_input(struct pbuf *p, struct netif *inp) -{ - struct tcp_pcb *pcb, *prev; - struct tcp_pcb_listen *lpcb; -#if SO_REUSE - struct tcp_pcb *lpcb_prev = NULL; - struct tcp_pcb_listen *lpcb_any = NULL; -#endif /* SO_REUSE */ - u8_t hdrlen_bytes; - err_t err; - - LWIP_UNUSED_ARG(inp); - - PERF_START; - - TCP_STATS_INC(tcp.recv); - MIB2_STATS_INC(mib2.tcpinsegs); - - tcphdr = (struct tcp_hdr *)p->payload; - -#if TCP_INPUT_DEBUG - tcp_debug_print(tcphdr); -#endif - - /* Check that TCP header fits in payload */ - if (p->len < TCP_HLEN) { - /* drop short packets */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet (%"U16_F" bytes) discarded\n", p->tot_len)); - TCP_STATS_INC(tcp.lenerr); - goto dropped; - } - - /* Don't even process incoming broadcasts/multicasts. */ - if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || - ip_addr_ismulticast(ip_current_dest_addr())) { - TCP_STATS_INC(tcp.proterr); - goto dropped; - } - -#if CHECKSUM_CHECK_TCP - IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_TCP) { - /* Verify TCP checksum. */ - u16_t chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - ip_current_src_addr(), ip_current_dest_addr()); - if (chksum != 0) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packet discarded due to failing checksum 0x%04"X16_F"\n", - chksum)); - tcp_debug_print(tcphdr); - TCP_STATS_INC(tcp.chkerr); - goto dropped; - } - } -#endif /* CHECKSUM_CHECK_TCP */ - - /* sanity-check header length */ - hdrlen_bytes = TCPH_HDRLEN(tcphdr) * 4; - if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: invalid header length (%"U16_F")\n", (u16_t)hdrlen_bytes)); - TCP_STATS_INC(tcp.lenerr); - goto dropped; - } - - /* Move the payload pointer in the pbuf so that it points to the - TCP data instead of the TCP header. */ - tcphdr_optlen = hdrlen_bytes - TCP_HLEN; - tcphdr_opt2 = NULL; - if (p->len >= hdrlen_bytes) { - /* all options are in the first pbuf */ - tcphdr_opt1len = tcphdr_optlen; - pbuf_header(p, -(s16_t)hdrlen_bytes); /* cannot fail */ - } else { - u16_t opt2len; - /* TCP header fits into first pbuf, options don't - data is in the next pbuf */ - /* there must be a next pbuf, due to hdrlen_bytes sanity check above */ - LWIP_ASSERT("p->next != NULL", p->next != NULL); - - /* advance over the TCP header (cannot fail) */ - pbuf_header(p, -TCP_HLEN); - - /* determine how long the first and second parts of the options are */ - tcphdr_opt1len = p->len; - opt2len = tcphdr_optlen - tcphdr_opt1len; - - /* options continue in the next pbuf: set p to zero length and hide the - options in the next pbuf (adjusting p->tot_len) */ - pbuf_header(p, -(s16_t)tcphdr_opt1len); - - /* check that the options fit in the second pbuf */ - if (opt2len > p->next->len) { - /* drop short packets */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: options overflow second pbuf (%"U16_F" bytes)\n", p->next->len)); - TCP_STATS_INC(tcp.lenerr); - goto dropped; - } - - /* remember the pointer to the second part of the options */ - tcphdr_opt2 = (u8_t*)p->next->payload; - - /* advance p->next to point after the options, and manually - adjust p->tot_len to keep it consistent with the changed p->next */ - pbuf_header(p->next, -(s16_t)opt2len); - p->tot_len -= opt2len; - - LWIP_ASSERT("p->len == 0", p->len == 0); - LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); - } - - /* Convert fields in TCP header to host byte order. */ - tcphdr->src = lwip_ntohs(tcphdr->src); - tcphdr->dest = lwip_ntohs(tcphdr->dest); - seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); - ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); - tcphdr->wnd = lwip_ntohs(tcphdr->wnd); - - flags = TCPH_FLAGS(tcphdr); - tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); - - /* Demultiplex an incoming segment. First, we check if it is destined - for an active connection. */ - prev = NULL; - - for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { - LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); - LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); - LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); - if (pcb->remote_port == tcphdr->src && - pcb->local_port == tcphdr->dest && - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && - ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - /* Move this PCB to the front of the list so that subsequent - lookups will be faster (we exploit locality in TCP segment - arrivals). */ - LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); - if (prev != NULL) { - prev->next = pcb->next; - pcb->next = tcp_active_pcbs; - tcp_active_pcbs = pcb; - } else { - TCP_STATS_INC(tcp.cachehit); - } - LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); - break; - } - prev = pcb; - } - - if (pcb == NULL) { - /* If it did not go to an active connection, we check the connections - in the TIME-WAIT state. */ - for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { - LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); - if (pcb->remote_port == tcphdr->src && - pcb->local_port == tcphdr->dest && - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && - ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - /* We don't really care enough to move this PCB to the front - of the list since we are not very likely to receive that - many segments for connections in TIME-WAIT. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for TIME_WAITing connection.\n")); - tcp_timewait_input(pcb); - pbuf_free(p); - return; - } - } - - /* Finally, if we still did not get a match, we check all PCBs that - are LISTENing for incoming connections. */ - prev = NULL; - for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { - if (lpcb->local_port == tcphdr->dest) { - if (IP_IS_ANY_TYPE_VAL(lpcb->local_ip)) { - /* found an ANY TYPE (IPv4/IPv6) match */ -#if SO_REUSE - lpcb_any = lpcb; - lpcb_prev = prev; -#else /* SO_REUSE */ - break; -#endif /* SO_REUSE */ - } else if (IP_ADDR_PCB_VERSION_MATCH_EXACT(lpcb, ip_current_dest_addr())) { - if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) { - /* found an exact match */ - break; - } else if (ip_addr_isany(&lpcb->local_ip)) { - /* found an ANY-match */ -#if SO_REUSE - lpcb_any = lpcb; - lpcb_prev = prev; -#else /* SO_REUSE */ - break; - #endif /* SO_REUSE */ - } - } - } - prev = (struct tcp_pcb *)lpcb; - } -#if SO_REUSE - /* first try specific local IP */ - if (lpcb == NULL) { - /* only pass to ANY if no specific local IP has been found */ - lpcb = lpcb_any; - prev = lpcb_prev; - } -#endif /* SO_REUSE */ - if (lpcb != NULL) { - /* Move this PCB to the front of the list so that subsequent - lookups will be faster (we exploit locality in TCP segment - arrivals). */ - if (prev != NULL) { - ((struct tcp_pcb_listen *)prev)->next = lpcb->next; - /* our successor is the remainder of the listening list */ - lpcb->next = tcp_listen_pcbs.listen_pcbs; - /* put this listening pcb at the head of the listening list */ - tcp_listen_pcbs.listen_pcbs = lpcb; - } else { - TCP_STATS_INC(tcp.cachehit); - } - - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for LISTENing connection.\n")); - tcp_listen_input(lpcb); - pbuf_free(p); - return; - } - } - -#if TCP_INPUT_DEBUG - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ")); - tcp_debug_print_flags(TCPH_FLAGS(tcphdr)); - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n")); -#endif /* TCP_INPUT_DEBUG */ - - - if (pcb != NULL) { - /* The incoming segment belongs to a connection. */ -#if TCP_INPUT_DEBUG - tcp_debug_print_state(pcb->state); -#endif /* TCP_INPUT_DEBUG */ - - /* Set up a tcp_seg structure. */ - inseg.next = NULL; - inseg.len = p->tot_len; - inseg.p = p; - inseg.tcphdr = tcphdr; - - recv_data = NULL; - recv_flags = 0; - recv_acked = 0; - - if (flags & TCP_PSH) { - p->flags |= PBUF_FLAG_PUSH; - } - - /* If there is data which was previously "refused" by upper layer */ - if (pcb->refused_data != NULL) { - if ((tcp_process_refused_data(pcb) == ERR_ABRT) || - ((pcb->refused_data != NULL) && (tcplen > 0))) { - /* pcb has been aborted or refused data is still refused and the new - segment contains data */ - if (pcb->rcv_ann_wnd == 0) { - /* this is a zero-window probe, we respond to it with current RCV.NXT - and drop the data segment */ - tcp_send_empty_ack(pcb); - } - TCP_STATS_INC(tcp.drop); - MIB2_STATS_INC(mib2.tcpinerrs); - goto aborted; - } - } - tcp_input_pcb = pcb; - err = tcp_process(pcb); - /* A return value of ERR_ABRT means that tcp_abort() was called - and that the pcb has been freed. If so, we don't do anything. */ - if (err != ERR_ABRT) { - if (recv_flags & TF_RESET) { - /* TF_RESET means that the connection was reset by the other - end. We then call the error callback to inform the - application that the connection is dead before we - deallocate the PCB. */ - TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST); - tcp_pcb_remove(&tcp_active_pcbs, pcb); - memp_free(MEMP_TCP_PCB, pcb); - } else { - err = ERR_OK; - /* If the application has registered a "sent" function to be - called when new send buffer space is available, we call it - now. */ - if (recv_acked > 0) { - u16_t acked16; -#if LWIP_WND_SCALE - /* recv_acked is u32_t but the sent callback only takes a u16_t, - so we might have to call it multiple times. */ - u32_t acked = recv_acked; - while (acked > 0) { - acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); - acked -= acked16; -#else - { - acked16 = recv_acked; -#endif - TCP_EVENT_SENT(pcb, (u16_t)acked16, err); - if (err == ERR_ABRT) { - goto aborted; - } - } - recv_acked = 0; - } - if (tcp_input_delayed_close(pcb)) { - goto aborted; - } -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - while (recv_data != NULL) { - struct pbuf *rest = NULL; - pbuf_split_64k(recv_data, &rest); -#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - if (recv_data != NULL) { -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - - LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); - if (pcb->flags & TF_RXCLOSED) { - /* received data although already closed -> abort (send RST) to - notify the remote host that not all data has been processed */ - pbuf_free(recv_data); -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - if (rest != NULL) { - pbuf_free(rest); - } -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - tcp_abort(pcb); - goto aborted; - } - - /* Notify application that data has been received. */ - TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); - if (err == ERR_ABRT) { -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - if (rest != NULL) { - pbuf_free(rest); - } -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - goto aborted; - } - - /* If the upper layer can't receive this data, store it */ - if (err != ERR_OK) { -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - if (rest != NULL) { - pbuf_cat(recv_data, rest); - } -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - pcb->refused_data = recv_data; - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: keep incoming packet, because pcb is \"full\"\n")); -#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE - break; - } else { - /* Upper layer received the data, go on with the rest if > 64K */ - recv_data = rest; -#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - } - } - - /* If a FIN segment was received, we call the callback - function with a NULL buffer to indicate EOF. */ - if (recv_flags & TF_GOT_FIN) { - if (pcb->refused_data != NULL) { - /* Delay this if we have refused data. */ - pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; - } else { - /* correct rcv_wnd as the application won't call tcp_recved() - for the FIN's seqno */ - if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { - pcb->rcv_wnd++; - } - TCP_EVENT_CLOSED(pcb, err); - if (err == ERR_ABRT) { - goto aborted; - } - } - } - - tcp_input_pcb = NULL; - if (tcp_input_delayed_close(pcb)) { - goto aborted; - } - /* Try to send something out. */ - tcp_output(pcb); -#if TCP_INPUT_DEBUG -#if TCP_DEBUG - tcp_debug_print_state(pcb->state); -#endif /* TCP_DEBUG */ -#endif /* TCP_INPUT_DEBUG */ - } - } - /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). - Below this line, 'pcb' may not be dereferenced! */ -aborted: - tcp_input_pcb = NULL; - recv_data = NULL; - - /* give up our reference to inseg.p */ - if (inseg.p != NULL) - { - pbuf_free(inseg.p); - inseg.p = NULL; - } - } else { - - /* If no matching PCB was found, send a TCP RST (reset) to the - sender. */ - LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); - if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { - TCP_STATS_INC(tcp.proterr); - TCP_STATS_INC(tcp.drop); - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - } - pbuf_free(p); - } - - LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); - PERF_STOP("tcp_input"); - return; -dropped: - TCP_STATS_INC(tcp.drop); - MIB2_STATS_INC(mib2.tcpinerrs); - pbuf_free(p); -} - -/** Called from tcp_input to check for TF_CLOSED flag. This results in closing - * and deallocating a pcb at the correct place to ensure noone references it - * any more. - * @returns 1 if the pcb has been closed and deallocated, 0 otherwise - */ -static int -tcp_input_delayed_close(struct tcp_pcb *pcb) -{ - if (recv_flags & TF_CLOSED) { - /* The connection has been closed and we will deallocate the - PCB. */ - if (!(pcb->flags & TF_RXCLOSED)) { - /* Connection closed although the application has only shut down the - tx side: call the PCB's err callback and indicate the closure to - ensure the application doesn't continue using the PCB. */ - TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD); - } - tcp_pcb_remove(&tcp_active_pcbs, pcb); - memp_free(MEMP_TCP_PCB, pcb); - return 1; - } - return 0; -} - -/** - * Called by tcp_input() when a segment arrives for a listening - * connection (from tcp_input()). - * - * @param pcb the tcp_pcb_listen for which a segment arrived - * - * @note the segment which arrived is saved in global variables, therefore only the pcb - * involved is passed as a parameter to this function - */ -static void -tcp_listen_input(struct tcp_pcb_listen *pcb) -{ - struct tcp_pcb *npcb; - u32_t iss; - err_t rc; - - if (flags & TCP_RST) { - /* An incoming RST should be ignored. Return. */ - return; - } - - /* In the LISTEN state, we check for incoming SYN segments, - creates a new PCB, and responds with a SYN|ACK. */ - if (flags & TCP_ACK) { - /* For incoming segments with the ACK flag set, respond with a - RST. */ - LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n")); - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - } else if (flags & TCP_SYN) { - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection request %"U16_F" -> %"U16_F".\n", tcphdr->src, tcphdr->dest)); -#if TCP_LISTEN_BACKLOG - if (pcb->accepts_pending >= pcb->backlog) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_listen_input: listen backlog exceeded for port %"U16_F"\n", tcphdr->dest)); - return; - } -#endif /* TCP_LISTEN_BACKLOG */ - npcb = tcp_alloc(pcb->prio); - /* If a new PCB could not be created (probably due to lack of memory), - we don't do anything, but rely on the sender will retransmit the - SYN at a time when we have more memory available. */ - if (npcb == NULL) { - err_t err; - LWIP_DEBUGF(TCP_DEBUG, ("tcp_listen_input: could not allocate PCB\n")); - TCP_STATS_INC(tcp.memerr); - TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); - LWIP_UNUSED_ARG(err); /* err not useful here */ - return; - } -#if TCP_LISTEN_BACKLOG - pcb->accepts_pending++; - npcb->flags |= TF_BACKLOGPEND; -#endif /* TCP_LISTEN_BACKLOG */ - /* Set up the new PCB. */ - ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); - ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); - npcb->local_port = pcb->local_port; - npcb->remote_port = tcphdr->src; - npcb->state = SYN_RCVD; - npcb->rcv_nxt = seqno + 1; - npcb->rcv_ann_right_edge = npcb->rcv_nxt; - iss = tcp_next_iss(npcb); - npcb->snd_wl2 = iss; - npcb->snd_nxt = iss; - npcb->lastack = iss; - npcb->snd_lbb = iss; - npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ - npcb->callback_arg = pcb->callback_arg; -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG - npcb->listener = pcb; -#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ - /* inherit socket options */ - npcb->so_options = pcb->so_options & SOF_INHERITED; - /* Register the new PCB so that we can begin receiving segments - for it. */ - TCP_REG_ACTIVE(npcb); - - /* Parse any options in the SYN. */ - tcp_parseopt(npcb); - npcb->snd_wnd = tcphdr->wnd; - npcb->snd_wnd_max = npcb->snd_wnd; - -#if TCP_CALCULATE_EFF_SEND_MSS - npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - - MIB2_STATS_INC(mib2.tcppassiveopens); - - /* Send a SYN|ACK together with the MSS option. */ - rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); - if (rc != ERR_OK) { - tcp_abandon(npcb, 0); - return; - } - tcp_output(npcb); - } - return; -} - -/** - * Called by tcp_input() when a segment arrives for a connection in - * TIME_WAIT. - * - * @param pcb the tcp_pcb for which a segment arrived - * - * @note the segment which arrived is saved in global variables, therefore only the pcb - * involved is passed as a parameter to this function - */ -static void -tcp_timewait_input(struct tcp_pcb *pcb) -{ - /* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */ - /* RFC 793 3.9 Event Processing - Segment Arrives: - * - first check sequence number - we skip that one in TIME_WAIT (always - * acceptable since we only send ACKs) - * - second check the RST bit (... return) */ - if (flags & TCP_RST) { - return; - } - /* - fourth, check the SYN bit, */ - if (flags & TCP_SYN) { - /* If an incoming segment is not acceptable, an acknowledgment - should be sent in reply */ - if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) { - /* If the SYN is in the window it is an error, send a reset */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - return; - } - } else if (flags & TCP_FIN) { - /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. - Restart the 2 MSL time-wait timeout.*/ - pcb->tmr = tcp_ticks; - } - - if ((tcplen > 0)) { - /* Acknowledge data, FIN or out-of-window SYN */ - pcb->flags |= TF_ACK_NOW; - tcp_output(pcb); - } - return; -} - -/** - * Implements the TCP state machine. Called by tcp_input. In some - * states tcp_receive() is called to receive data. The tcp_seg - * argument will be freed by the caller (tcp_input()) unless the - * recv_data pointer in the pcb is set. - * - * @param pcb the tcp_pcb for which a segment arrived - * - * @note the segment which arrived is saved in global variables, therefore only the pcb - * involved is passed as a parameter to this function - */ -static err_t -tcp_process(struct tcp_pcb *pcb) -{ - struct tcp_seg *rseg; - u8_t acceptable = 0; - err_t err; - - err = ERR_OK; - - /* Process incoming RST segments. */ - if (flags & TCP_RST) { - /* First, determine if the reset is acceptable. */ - if (pcb->state == SYN_SENT) { - /* "In the SYN-SENT state (a RST received in response to an initial SYN), - the RST is acceptable if the ACK field acknowledges the SYN." */ - if (ackno == pcb->snd_nxt) { - acceptable = 1; - } - } else { - /* "In all states except SYN-SENT, all reset (RST) segments are validated - by checking their SEQ-fields." */ - if (seqno == pcb->rcv_nxt) { - acceptable = 1; - } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, - pcb->rcv_nxt + pcb->rcv_wnd)) { - /* If the sequence number is inside the window, we only send an ACK - and wait for a re-send with matching sequence number. - This violates RFC 793, but is required to protection against - CVE-2004-0230 (RST spoofing attack). */ - tcp_ack_now(pcb); - } - } - - if (acceptable) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); - LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); - recv_flags |= TF_RESET; - pcb->flags &= ~TF_ACK_DELAY; - return ERR_RST; - } else { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", - seqno, pcb->rcv_nxt)); - LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", - seqno, pcb->rcv_nxt)); - return ERR_OK; - } - } - - if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { - /* Cope with new connection attempt after remote end crashed */ - tcp_ack_now(pcb); - return ERR_OK; - } - - if ((pcb->flags & TF_RXCLOSED) == 0) { - /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ - pcb->tmr = tcp_ticks; - } - pcb->keep_cnt_sent = 0; - - tcp_parseopt(pcb); - - /* Do different things depending on the TCP state. */ - switch (pcb->state) { - case SYN_SENT: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, - pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno))); - /* received SYN ACK with expected sequence number? */ - if ((flags & TCP_ACK) && (flags & TCP_SYN) - && (ackno == pcb->lastack + 1)) { - pcb->rcv_nxt = seqno + 1; - pcb->rcv_ann_right_edge = pcb->rcv_nxt; - pcb->lastack = ackno; - pcb->snd_wnd = tcphdr->wnd; - pcb->snd_wnd_max = pcb->snd_wnd; - pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ - pcb->state = ESTABLISHED; - -#if TCP_CALCULATE_EFF_SEND_MSS - pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - - pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); - --pcb->snd_queuelen; - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); - rseg = pcb->unacked; - if (rseg == NULL) { - /* might happen if tcp_output fails in tcp_rexmit_rto() - in which case the segment is on the unsent list */ - rseg = pcb->unsent; - LWIP_ASSERT("no segment to free", rseg != NULL); - pcb->unsent = rseg->next; - } else { - pcb->unacked = rseg->next; - } - tcp_seg_free(rseg); - - /* If there's nothing left to acknowledge, stop the retransmit - timer, otherwise reset it to start again */ - if (pcb->unacked == NULL) { - pcb->rtime = -1; - } else { - pcb->rtime = 0; - pcb->nrtx = 0; - } - - /* Call the user specified function to call when successfully - * connected. */ - TCP_EVENT_CONNECTED(pcb, ERR_OK, err); - if (err == ERR_ABRT) { - return ERR_ABRT; - } - tcp_ack_now(pcb); - } - /* received ACK? possibly a half-open connection */ - else if (flags & TCP_ACK) { - /* send a RST to bring the other side in a non-synchronized state. */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - /* Resend SYN immediately (don't wait for rto timeout) to establish - connection faster, but do not send more SYNs than we otherwise would - have, or we might get caught in a loop on loopback interfaces. */ - if (pcb->nrtx < TCP_SYNMAXRTX) { - pcb->rtime = 0; - tcp_rexmit_rto(pcb); - } - } - break; - case SYN_RCVD: - if (flags & TCP_ACK) { - /* expected ACK number? */ - if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { - pcb->state = ESTABLISHED; - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG -#if LWIP_CALLBACK_API - LWIP_ASSERT("pcb->listener->accept != NULL", - (pcb->listener == NULL) || (pcb->listener->accept != NULL)); -#endif - if (pcb->listener == NULL) { - /* listen pcb might be closed by now */ - err = ERR_VAL; - } else -#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ - { - tcp_backlog_accepted(pcb); - /* Call the accept function. */ - TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); - } - if (err != ERR_OK) { - /* If the accept function returns with an error, we abort - * the connection. */ - /* Already aborted? */ - if (err != ERR_ABRT) { - tcp_abort(pcb); - } - return ERR_ABRT; - } - /* If there was any data contained within this ACK, - * we'd better pass it on to the application as well. */ - tcp_receive(pcb); - - /* Prevent ACK for SYN to generate a sent event */ - if (recv_acked != 0) { - recv_acked--; - } - - pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F - " ssthresh %"TCPWNDSIZE_F"\n", - pcb->cwnd, pcb->ssthresh)); - - if (recv_flags & TF_GOT_FIN) { - tcp_ack_now(pcb); - pcb->state = CLOSE_WAIT; - } - } else { - /* incorrect ACK number, send RST */ - tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), - ip_current_src_addr(), tcphdr->dest, tcphdr->src); - } - } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { - /* Looks like another copy of the SYN - retransmit our SYN-ACK */ - tcp_rexmit(pcb); - } - break; - case CLOSE_WAIT: - /* FALLTHROUGH */ - case ESTABLISHED: - tcp_receive(pcb); - if (recv_flags & TF_GOT_FIN) { /* passive close */ - tcp_ack_now(pcb); - pcb->state = CLOSE_WAIT; - } - break; - case FIN_WAIT_1: - tcp_receive(pcb); - if (recv_flags & TF_GOT_FIN) { - if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - pcb->unsent == NULL) { - LWIP_DEBUGF(TCP_DEBUG, - ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_ack_now(pcb); - tcp_pcb_purge(pcb); - TCP_RMV_ACTIVE(pcb); - pcb->state = TIME_WAIT; - TCP_REG(&tcp_tw_pcbs, pcb); - } else { - tcp_ack_now(pcb); - pcb->state = CLOSING; - } - } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && - pcb->unsent == NULL) { - pcb->state = FIN_WAIT_2; - } - break; - case FIN_WAIT_2: - tcp_receive(pcb); - if (recv_flags & TF_GOT_FIN) { - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_ack_now(pcb); - tcp_pcb_purge(pcb); - TCP_RMV_ACTIVE(pcb); - pcb->state = TIME_WAIT; - TCP_REG(&tcp_tw_pcbs, pcb); - } - break; - case CLOSING: - tcp_receive(pcb); - if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - tcp_pcb_purge(pcb); - TCP_RMV_ACTIVE(pcb); - pcb->state = TIME_WAIT; - TCP_REG(&tcp_tw_pcbs, pcb); - } - break; - case LAST_ACK: - tcp_receive(pcb); - if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); - /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ - recv_flags |= TF_CLOSED; - } - break; - default: - break; - } - return ERR_OK; -} - -#if TCP_QUEUE_OOSEQ -/** - * Insert segment into the list (segments covered with new one will be deleted) - * - * Called from tcp_receive() - */ -static void -tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) -{ - struct tcp_seg *old_seg; - - if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { - /* received segment overlaps all following segments */ - tcp_segs_free(next); - next = NULL; - } else { - /* delete some following segments - oos queue may have segments with FIN flag */ - while (next && - TCP_SEQ_GEQ((seqno + cseg->len), - (next->tcphdr->seqno + next->len))) { - /* cseg with FIN already processed */ - if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { - TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); - } - old_seg = next; - next = next->next; - tcp_seg_free(old_seg); - } - if (next && - TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { - /* We need to trim the incoming segment. */ - cseg->len = (u16_t)(next->tcphdr->seqno - seqno); - pbuf_realloc(cseg->p, cseg->len); - } - } - cseg->next = next; -} -#endif /* TCP_QUEUE_OOSEQ */ - -/** - * Called by tcp_process. Checks if the given segment is an ACK for outstanding - * data, and if so frees the memory of the buffered data. Next, it places the - * segment on any of the receive queues (pcb->recved or pcb->ooseq). If the segment - * is buffered, the pbuf is referenced by pbuf_ref so that it will not be freed until - * it has been removed from the buffer. - * - * If the incoming segment constitutes an ACK for a segment that was used for RTT - * estimation, the RTT is estimated here as well. - * - * Called from tcp_process(). - */ -static void -tcp_receive(struct tcp_pcb *pcb) -{ - struct tcp_seg *next; -#if TCP_QUEUE_OOSEQ - struct tcp_seg *prev, *cseg; -#endif /* TCP_QUEUE_OOSEQ */ - s32_t off; - s16_t m; - u32_t right_wnd_edge; - u16_t new_tot_len; - int found_dupack = 0; -#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS - u32_t ooseq_blen; - u16_t ooseq_qlen; -#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ - - LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); - - if (flags & TCP_ACK) { - right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; - - /* Update window. */ - if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || - (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || - (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { - pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); - /* keep track of the biggest window announced by the remote host to calculate - the maximum segment size */ - if (pcb->snd_wnd_max < pcb->snd_wnd) { - pcb->snd_wnd_max = pcb->snd_wnd; - } - pcb->snd_wl1 = seqno; - pcb->snd_wl2 = ackno; - if (pcb->snd_wnd == 0) { - if (pcb->persist_backoff == 0) { - /* start persist timer */ - pcb->persist_cnt = 0; - pcb->persist_backoff = 1; - } - } else if (pcb->persist_backoff > 0) { - /* stop persist timer */ - pcb->persist_backoff = 0; - } - LWIP_DEBUGF(TCP_WND_DEBUG, ("tcp_receive: window update %"TCPWNDSIZE_F"\n", pcb->snd_wnd)); -#if TCP_WND_DEBUG - } else { - if (pcb->snd_wnd != (tcpwnd_size_t)SND_WND_SCALE(pcb, tcphdr->wnd)) { - LWIP_DEBUGF(TCP_WND_DEBUG, - ("tcp_receive: no window update lastack %"U32_F" ackno %" - U32_F" wl1 %"U32_F" seqno %"U32_F" wl2 %"U32_F"\n", - pcb->lastack, ackno, pcb->snd_wl1, seqno, pcb->snd_wl2)); - } -#endif /* TCP_WND_DEBUG */ - } - - /* (From Stevens TCP/IP Illustrated Vol II, p970.) Its only a - * duplicate ack if: - * 1) It doesn't ACK new data - * 2) length of received packet is zero (i.e. no payload) - * 3) the advertised window hasn't changed - * 4) There is outstanding unacknowledged data (retransmission timer running) - * 5) The ACK is == biggest ACK sequence number so far seen (snd_una) - * - * If it passes all five, should process as a dupack: - * a) dupacks < 3: do nothing - * b) dupacks == 3: fast retransmit - * c) dupacks > 3: increase cwnd - * - * If it only passes 1-3, should reset dupack counter (and add to - * stats, which we don't do in lwIP) - * - * If it only passes 1, should reset dupack counter - * - */ - - /* Clause 1 */ - if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { - /* Clause 2 */ - if (tcplen == 0) { - /* Clause 3 */ - if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { - /* Clause 4 */ - if (pcb->rtime >= 0) { - /* Clause 5 */ - if (pcb->lastack == ackno) { - found_dupack = 1; - if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { - ++pcb->dupacks; - } - if (pcb->dupacks > 3) { - /* Inflate the congestion window, but not if it means that - the value overflows. */ - if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { - pcb->cwnd += pcb->mss; - } - } else if (pcb->dupacks == 3) { - /* Do fast retransmit */ - tcp_rexmit_fast(pcb); - } - } - } - } - } - /* If Clause (1) or more is true, but not a duplicate ack, reset - * count of consecutive duplicate acks */ - if (!found_dupack) { - pcb->dupacks = 0; - } - } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { - /* We come here when the ACK acknowledges new data. */ - - /* Reset the "IN Fast Retransmit" flag, since we are no longer - in fast retransmit. Also reset the congestion window to the - slow start threshold. */ - if (pcb->flags & TF_INFR) { - pcb->flags &= ~TF_INFR; - pcb->cwnd = pcb->ssthresh; - } - - /* Reset the number of retransmissions. */ - pcb->nrtx = 0; - - /* Reset the retransmission time-out. */ - pcb->rto = (pcb->sa >> 3) + pcb->sv; - - /* Reset the fast retransmit variables. */ - pcb->dupacks = 0; - pcb->lastack = ackno; - - /* Update the congestion control variables (cwnd and - ssthresh). */ - if (pcb->state >= ESTABLISHED) { - if (pcb->cwnd < pcb->ssthresh) { - if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { - pcb->cwnd += pcb->mss; - } - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); - } else { - tcpwnd_size_t new_cwnd = (pcb->cwnd + pcb->mss * pcb->mss / pcb->cwnd); - if (new_cwnd > pcb->cwnd) { - pcb->cwnd = new_cwnd; - } - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: congestion avoidance cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); - } - } - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: ACK for %"U32_F", unacked->seqno %"U32_F":%"U32_F"\n", - ackno, - pcb->unacked != NULL? - lwip_ntohl(pcb->unacked->tcphdr->seqno): 0, - pcb->unacked != NULL? - lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); - - /* Remove segment from the unacknowledged list if the incoming - ACK acknowledges them. */ - while (pcb->unacked != NULL && - TCP_SEQ_LEQ(lwip_ntohl(pcb->unacked->tcphdr->seqno) + - TCP_TCPLEN(pcb->unacked), ackno)) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unacked\n", - lwip_ntohl(pcb->unacked->tcphdr->seqno), - lwip_ntohl(pcb->unacked->tcphdr->seqno) + - TCP_TCPLEN(pcb->unacked))); - - next = pcb->unacked; - pcb->unacked = pcb->unacked->next; - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); - LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); - - pcb->snd_queuelen -= pbuf_clen(next->p); - recv_acked += next->len; - tcp_seg_free(next); - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unacked)\n", (tcpwnd_size_t)pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL || - pcb->unsent != NULL); - } - } - - /* If there's nothing left to acknowledge, stop the retransmit - timer, otherwise reset it to start again */ - if (pcb->unacked == NULL) { - pcb->rtime = -1; - } else { - pcb->rtime = 0; - } - - pcb->polltmr = 0; - -#if LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS - if (ip_current_is_v6()) { - /* Inform neighbor reachability of forward progress. */ - nd6_reachability_hint(ip6_current_src_addr()); - } -#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ - } else { - /* Out of sequence ACK, didn't really ack anything */ - tcp_send_empty_ack(pcb); - } - - /* We go through the ->unsent list to see if any of the segments - on the list are acknowledged by the ACK. This may seem - strange since an "unsent" segment shouldn't be acked. The - rationale is that lwIP puts all outstanding segments on the - ->unsent list after a retransmission, so these segments may - in fact have been sent once. */ - while (pcb->unsent != NULL && - TCP_SEQ_BETWEEN(ackno, lwip_ntohl(pcb->unsent->tcphdr->seqno) + - TCP_TCPLEN(pcb->unsent), pcb->snd_nxt)) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unsent\n", - lwip_ntohl(pcb->unsent->tcphdr->seqno), lwip_ntohl(pcb->unsent->tcphdr->seqno) + - TCP_TCPLEN(pcb->unsent))); - - next = pcb->unsent; - pcb->unsent = pcb->unsent->next; -#if TCP_OVERSIZE - if (pcb->unsent == NULL) { - pcb->unsent_oversize = 0; - } -#endif /* TCP_OVERSIZE */ - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); - LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); - /* Prevent ACK for FIN to generate a sent event */ - pcb->snd_queuelen -= pbuf_clen(next->p); - recv_acked += next->len; - tcp_seg_free(next); - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unsent)\n", (tcpwnd_size_t)pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_receive: valid queue length", - pcb->unacked != NULL || pcb->unsent != NULL); - } - } - pcb->snd_buf += recv_acked; - /* End of ACK for new data processing. */ - - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: pcb->rttest %"U32_F" rtseq %"U32_F" ackno %"U32_F"\n", - pcb->rttest, pcb->rtseq, ackno)); - - /* RTT estimation calculations. This is done by checking if the - incoming segment acknowledges the segment we use to take a - round-trip time measurement. */ - if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { - /* diff between this shouldn't exceed 32K since this are tcp timer ticks - and a round-trip shouldn't be that long... */ - m = (s16_t)(tcp_ticks - pcb->rttest); - - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", - m, (u16_t)(m * TCP_SLOW_INTERVAL))); - - /* This is taken directly from VJs original code in his paper */ - m = m - (pcb->sa >> 3); - pcb->sa += m; - if (m < 0) { - m = -m; - } - m = m - (pcb->sv >> 2); - pcb->sv += m; - pcb->rto = (pcb->sa >> 3) + pcb->sv; - - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n", - pcb->rto, (u16_t)(pcb->rto * TCP_SLOW_INTERVAL))); - - pcb->rttest = 0; - } - } - - /* If the incoming segment contains data, we must process it - further unless the pcb already received a FIN. - (RFC 793, chapter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING, - LAST-ACK and TIME-WAIT: "Ignore the segment text.") */ - if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) { - /* This code basically does three things: - - +) If the incoming segment contains data that is the next - in-sequence data, this data is passed to the application. This - might involve trimming the first edge of the data. The rcv_nxt - variable and the advertised window are adjusted. - - +) If the incoming segment has data that is above the next - sequence number expected (->rcv_nxt), the segment is placed on - the ->ooseq queue. This is done by finding the appropriate - place in the ->ooseq queue (which is ordered by sequence - number) and trim the segment in both ends if needed. An - immediate ACK is sent to indicate that we received an - out-of-sequence segment. - - +) Finally, we check if the first segment on the ->ooseq queue - now is in sequence (i.e., if rcv_nxt >= ooseq->seqno). If - rcv_nxt > ooseq->seqno, we must trim the first edge of the - segment on ->ooseq before we adjust rcv_nxt. The data in the - segments that are now on sequence are chained onto the - incoming segment so that we only need to call the application - once. - */ - - /* First, we check if we must trim the first edge. We have to do - this if the sequence number of the incoming segment is less - than rcv_nxt, and the sequence number plus the length of the - segment is larger than rcv_nxt. */ - /* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { - if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/ - if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { - /* Trimming the first edge is done by pushing the payload - pointer in the pbuf downwards. This is somewhat tricky since - we do not want to discard the full contents of the pbuf up to - the new starting point of the data since we have to keep the - TCP header which is present in the first pbuf in the chain. - - What is done is really quite a nasty hack: the first pbuf in - the pbuf chain is pointed to by inseg.p. Since we need to be - able to deallocate the whole pbuf, we cannot change this - inseg.p pointer to point to any of the later pbufs in the - chain. Instead, we point the ->payload pointer in the first - pbuf to data in one of the later pbufs. We also set the - inseg.data pointer to point to the right place. This way, the - ->p pointer will still point to the first pbuf, but the - ->p->payload pointer will point to data in another pbuf. - - After we are done with adjusting the pbuf pointers we must - adjust the ->data pointer in the seg and the segment - length.*/ - - struct pbuf *p = inseg.p; - off = pcb->rcv_nxt - seqno; - LWIP_ASSERT("inseg.p != NULL", inseg.p); - LWIP_ASSERT("insane offset!", (off < 0x7fff)); - if (inseg.p->len < off) { - LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); - new_tot_len = (u16_t)(inseg.p->tot_len - off); - while (p->len < off) { - off -= p->len; - /* KJM following line changed (with addition of new_tot_len var) - to fix bug #9076 - inseg.p->tot_len -= p->len; */ - p->tot_len = new_tot_len; - p->len = 0; - p = p->next; - } - if (pbuf_header(p, (s16_t)-off)) { - /* Do we need to cope with this failing? Assert for now */ - LWIP_ASSERT("pbuf_header failed", 0); - } - } else { - if (pbuf_header(inseg.p, (s16_t)-off)) { - /* Do we need to cope with this failing? Assert for now */ - LWIP_ASSERT("pbuf_header failed", 0); - } - } - inseg.len -= (u16_t)(pcb->rcv_nxt - seqno); - inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; - } - else { - if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { - /* the whole segment is < rcv_nxt */ - /* must be a duplicate of a packet that has already been correctly handled */ - - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno)); - tcp_ack_now(pcb); - } - } - - /* The sequence number must be within the window (above rcv_nxt - and below rcv_nxt + rcv_wnd) in order to be further - processed. */ - if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, - pcb->rcv_nxt + pcb->rcv_wnd - 1)) { - if (pcb->rcv_nxt == seqno) { - /* The incoming segment is the next in sequence. We check if - we have to trim the end of the segment and update rcv_nxt - and pass the data to the application. */ - tcplen = TCP_TCPLEN(&inseg); - - if (tcplen > pcb->rcv_wnd) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, - ("tcp_receive: other end overran receive window" - "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", - seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); - if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { - /* Must remove the FIN from the header as we're trimming - * that byte of sequence-space from the packet */ - TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN); - } - /* Adjust length of segment to fit in the window. */ - TCPWND_CHECK16(pcb->rcv_wnd); - inseg.len = (u16_t)pcb->rcv_wnd; - if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { - inseg.len -= 1; - } - pbuf_realloc(inseg.p, inseg.len); - tcplen = TCP_TCPLEN(&inseg); - LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", - (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); - } -#if TCP_QUEUE_OOSEQ - /* Received in-sequence data, adjust ooseq data if: - - FIN has been received or - - inseq overlaps with ooseq */ - if (pcb->ooseq != NULL) { - if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, - ("tcp_receive: received in-order FIN, binning ooseq queue\n")); - /* Received in-order FIN means anything that was received - * out of order must now have been received in-order, so - * bin the ooseq queue */ - while (pcb->ooseq != NULL) { - struct tcp_seg *old_ooseq = pcb->ooseq; - pcb->ooseq = pcb->ooseq->next; - tcp_seg_free(old_ooseq); - } - } else { - next = pcb->ooseq; - /* Remove all segments on ooseq that are covered by inseg already. - * FIN is copied from ooseq to inseg if present. */ - while (next && - TCP_SEQ_GEQ(seqno + tcplen, - next->tcphdr->seqno + next->len)) { - /* inseg cannot have FIN here (already processed above) */ - if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && - (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { - TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); - tcplen = TCP_TCPLEN(&inseg); - } - prev = next; - next = next->next; - tcp_seg_free(prev); - } - /* Now trim right side of inseg if it overlaps with the first - * segment on ooseq */ - if (next && - TCP_SEQ_GT(seqno + tcplen, - next->tcphdr->seqno)) { - /* inseg cannot have FIN here (already processed above) */ - inseg.len = (u16_t)(next->tcphdr->seqno - seqno); - if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { - inseg.len -= 1; - } - pbuf_realloc(inseg.p, inseg.len); - tcplen = TCP_TCPLEN(&inseg); - LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", - (seqno + tcplen) == next->tcphdr->seqno); - } - pcb->ooseq = next; - } - } -#endif /* TCP_QUEUE_OOSEQ */ - - pcb->rcv_nxt = seqno + tcplen; - - /* Update the receiver's (our) window. */ - LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); - pcb->rcv_wnd -= tcplen; - - tcp_update_rcv_ann_wnd(pcb); - - /* If there is data in the segment, we make preparations to - pass this up to the application. The ->recv_data variable - is used for holding the pbuf that goes to the - application. The code for reassembling out-of-sequence data - chains its data on this pbuf as well. - - If the segment was a FIN, we set the TF_GOT_FIN flag that will - be used to indicate to the application that the remote side has - closed its end of the connection. */ - if (inseg.p->tot_len > 0) { - recv_data = inseg.p; - /* Since this pbuf now is the responsibility of the - application, we delete our reference to it so that we won't - (mistakingly) deallocate it. */ - inseg.p = NULL; - } - if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); - recv_flags |= TF_GOT_FIN; - } - -#if TCP_QUEUE_OOSEQ - /* We now check if we have segments on the ->ooseq queue that - are now in sequence. */ - while (pcb->ooseq != NULL && - pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { - - cseg = pcb->ooseq; - seqno = pcb->ooseq->tcphdr->seqno; - - pcb->rcv_nxt += TCP_TCPLEN(cseg); - LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", - pcb->rcv_wnd >= TCP_TCPLEN(cseg)); - pcb->rcv_wnd -= TCP_TCPLEN(cseg); - - tcp_update_rcv_ann_wnd(pcb); - - if (cseg->p->tot_len > 0) { - /* Chain this pbuf onto the pbuf that we will pass to - the application. */ - /* With window scaling, this can overflow recv_data->tot_len, but - that's not a problem since we explicitly fix that before passing - recv_data to the application. */ - if (recv_data) { - pbuf_cat(recv_data, cseg->p); - } else { - recv_data = cseg->p; - } - cseg->p = NULL; - } - if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); - recv_flags |= TF_GOT_FIN; - if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ - pcb->state = CLOSE_WAIT; - } - } - - pcb->ooseq = cseg->next; - tcp_seg_free(cseg); - } -#endif /* TCP_QUEUE_OOSEQ */ - - - /* Acknowledge the segment(s). */ - tcp_ack(pcb); - -#if LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS - if (ip_current_is_v6()) { - /* Inform neighbor reachability of forward progress. */ - nd6_reachability_hint(ip6_current_src_addr()); - } -#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ - - } else { - /* We get here if the incoming segment is out-of-sequence. */ - tcp_send_empty_ack(pcb); -#if TCP_QUEUE_OOSEQ - /* We queue the segment on the ->ooseq queue. */ - if (pcb->ooseq == NULL) { - pcb->ooseq = tcp_seg_copy(&inseg); - } else { - /* If the queue is not empty, we walk through the queue and - try to find a place where the sequence number of the - incoming segment is between the sequence numbers of the - previous and the next segment on the ->ooseq queue. That is - the place where we put the incoming segment. If needed, we - trim the second edges of the previous and the incoming - segment so that it will fit into the sequence. - - If the incoming segment has the same sequence number as a - segment on the ->ooseq queue, we discard the segment that - contains less data. */ - - prev = NULL; - for (next = pcb->ooseq; next != NULL; next = next->next) { - if (seqno == next->tcphdr->seqno) { - /* The sequence number of the incoming segment is the - same as the sequence number of the segment on - ->ooseq. We check the lengths to see which one to - discard. */ - if (inseg.len > next->len) { - /* The incoming segment is larger than the old - segment. We replace some segments with the new - one. */ - cseg = tcp_seg_copy(&inseg); - if (cseg != NULL) { - if (prev != NULL) { - prev->next = cseg; - } else { - pcb->ooseq = cseg; - } - tcp_oos_insert_segment(cseg, next); - } - break; - } else { - /* Either the lengths are the same or the incoming - segment was smaller than the old one; in either - case, we ditch the incoming segment. */ - break; - } - } else { - if (prev == NULL) { - if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { - /* The sequence number of the incoming segment is lower - than the sequence number of the first segment on the - queue. We put the incoming segment first on the - queue. */ - cseg = tcp_seg_copy(&inseg); - if (cseg != NULL) { - pcb->ooseq = cseg; - tcp_oos_insert_segment(cseg, next); - } - break; - } - } else { - /*if (TCP_SEQ_LT(prev->tcphdr->seqno, seqno) && - TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/ - if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno+1, next->tcphdr->seqno-1)) { - /* The sequence number of the incoming segment is in - between the sequence numbers of the previous and - the next segment on ->ooseq. We trim trim the previous - segment, delete next segments that included in received segment - and trim received, if needed. */ - cseg = tcp_seg_copy(&inseg); - if (cseg != NULL) { - if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { - /* We need to trim the prev segment. */ - prev->len = (u16_t)(seqno - prev->tcphdr->seqno); - pbuf_realloc(prev->p, prev->len); - } - prev->next = cseg; - tcp_oos_insert_segment(cseg, next); - } - break; - } - } - /* If the "next" segment is the last segment on the - ooseq queue, we add the incoming segment to the end - of the list. */ - if (next->next == NULL && - TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { - if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { - /* segment "next" already contains all data */ - break; - } - next->next = tcp_seg_copy(&inseg); - if (next->next != NULL) { - if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { - /* We need to trim the last segment. */ - next->len = (u16_t)(seqno - next->tcphdr->seqno); - pbuf_realloc(next->p, next->len); - } - /* check if the remote side overruns our receive window */ - if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, - ("tcp_receive: other end overran receive window" - "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", - seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); - if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) { - /* Must remove the FIN from the header as we're trimming - * that byte of sequence-space from the packet */ - TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN); - } - /* Adjust length of segment to fit in the window. */ - next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno); - pbuf_realloc(next->next->p, next->next->len); - tcplen = TCP_TCPLEN(next->next); - LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", - (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); - } - } - break; - } - } - prev = next; - } - } -#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS - /* Check that the data on ooseq doesn't exceed one of the limits - and throw away everything above that limit. */ - ooseq_blen = 0; - ooseq_qlen = 0; - prev = NULL; - for (next = pcb->ooseq; next != NULL; prev = next, next = next->next) { - struct pbuf *p = next->p; - ooseq_blen += p->tot_len; - ooseq_qlen += pbuf_clen(p); - if ((ooseq_blen > TCP_OOSEQ_MAX_BYTES) || - (ooseq_qlen > TCP_OOSEQ_MAX_PBUFS)) { - /* too much ooseq data, dump this and everything after it */ - tcp_segs_free(next); - if (prev == NULL) { - /* first ooseq segment is too much, dump the whole queue */ - pcb->ooseq = NULL; - } else { - /* just dump 'next' and everything after it */ - prev->next = NULL; - } - break; - } - } -#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ -#endif /* TCP_QUEUE_OOSEQ */ - } - } else { - /* The incoming segment is not within the window. */ - tcp_send_empty_ack(pcb); - } - } else { - /* Segments with length 0 is taken care of here. Segments that - fall out of the window are ACKed. */ - if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) { - tcp_ack_now(pcb); - } - } -} - -static u8_t -tcp_getoptbyte(void) -{ - if ((tcphdr_opt2 == NULL) || (tcp_optidx < tcphdr_opt1len)) { - u8_t* opts = (u8_t *)tcphdr + TCP_HLEN; - return opts[tcp_optidx++]; - } else { - u8_t idx = (u8_t)(tcp_optidx++ - tcphdr_opt1len); - return tcphdr_opt2[idx]; - } -} - -/** - * Parses the options contained in the incoming segment. - * - * Called from tcp_listen_input() and tcp_process(). - * Currently, only the MSS option is supported! - * - * @param pcb the tcp_pcb for which a segment arrived - */ -static void -tcp_parseopt(struct tcp_pcb *pcb) -{ - u8_t data; - u16_t mss; -#if LWIP_TCP_TIMESTAMPS - u32_t tsval; -#endif - - /* Parse the TCP MSS option, if present. */ - if (tcphdr_optlen != 0) { - for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { - u8_t opt = tcp_getoptbyte(); - switch (opt) { - case LWIP_TCP_OPT_EOL: - /* End of options. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); - return; - case LWIP_TCP_OPT_NOP: - /* NOP option. */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); - break; - case LWIP_TCP_OPT_MSS: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); - if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) { - /* Bad length */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - return; - } - /* An MSS option with the right option length. */ - mss = (tcp_getoptbyte() << 8); - mss |= tcp_getoptbyte(); - /* Limit the mss to the configured TCP_MSS and prevent division by zero */ - pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; - break; -#if LWIP_WND_SCALE - case LWIP_TCP_OPT_WS: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: WND_SCALE\n")); - if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_WS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_WS) > tcphdr_optlen) { - /* Bad length */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - return; - } - /* An WND_SCALE option with the right option length. */ - data = tcp_getoptbyte(); - /* If syn was received with wnd scale option, - activate wnd scale opt, but only if this is not a retransmission */ - if ((flags & TCP_SYN) && !(pcb->flags & TF_WND_SCALE)) { - pcb->snd_scale = data; - if (pcb->snd_scale > 14U) { - pcb->snd_scale = 14U; - } - pcb->rcv_scale = TCP_RCV_SCALE; - pcb->flags |= TF_WND_SCALE; - /* window scaling is enabled, we can use the full receive window */ - LWIP_ASSERT("window not at default value", pcb->rcv_wnd == TCPWND_MIN16(TCP_WND)); - LWIP_ASSERT("window not at default value", pcb->rcv_ann_wnd == TCPWND_MIN16(TCP_WND)); - pcb->rcv_wnd = pcb->rcv_ann_wnd = TCP_WND; - } - break; -#endif -#if LWIP_TCP_TIMESTAMPS - case LWIP_TCP_OPT_TS: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: TS\n")); - if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_TS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_TS) > tcphdr_optlen) { - /* Bad length */ - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - return; - } - /* TCP timestamp option with valid length */ - tsval = tcp_getoptbyte(); - tsval |= (tcp_getoptbyte() << 8); - tsval |= (tcp_getoptbyte() << 16); - tsval |= (tcp_getoptbyte() << 24); - if (flags & TCP_SYN) { - pcb->ts_recent = lwip_ntohl(tsval); - /* Enable sending timestamps in every segment now that we know - the remote host supports it. */ - pcb->flags |= TF_TIMESTAMP; - } else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno+tcplen)) { - pcb->ts_recent = lwip_ntohl(tsval); - } - /* Advance to next option (6 bytes already read) */ - tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6; - break; -#endif - default: - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); - data = tcp_getoptbyte(); - if (data < 2) { - LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); - /* If the length field is zero, the options are malformed - 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; - } - } - } -} - -void -tcp_trigger_input_pcb_close(void) -{ - recv_flags |= TF_CLOSED; -} - -#endif /* LWIP_TCP */ +/** + * @file + * Transmission Control Protocol, incoming traffic + * + * The input processing functions of the TCP layer. + * + * These functions are generally called in the order (ip_input() ->) + * tcp_input() -> * tcp_process() -> tcp_receive() (-> application). + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/priv/tcp_priv.h" +#include "lwip/def.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/inet_chksum.h" +#include "lwip/stats.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#if LWIP_ND6_TCP_REACHABILITY_HINTS +#include "lwip/nd6.h" +#endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ + +/** Initial CWND calculation as defined RFC 2581 */ +#define LWIP_TCP_CALC_INITIAL_CWND(mss) LWIP_MIN((4U * (mss)), LWIP_MAX((2U * (mss)), 4380U)); + +/* These variables are global to all functions involved in the input + processing of TCP segments. They are set by the tcp_input() + function. */ +static struct tcp_seg inseg; +static struct tcp_hdr *tcphdr; +static u16_t tcphdr_optlen; +static u16_t tcphdr_opt1len; +static u8_t* tcphdr_opt2; +static u16_t tcp_optidx; +static u32_t seqno, ackno; +static tcpwnd_size_t recv_acked; +static u16_t tcplen; +static u8_t flags; + +static u8_t recv_flags; +static struct pbuf *recv_data; + +struct tcp_pcb *tcp_input_pcb; + +/* Forward declarations. */ +static err_t tcp_process(struct tcp_pcb *pcb); +static void tcp_receive(struct tcp_pcb *pcb); +static void tcp_parseopt(struct tcp_pcb *pcb); + +static void tcp_listen_input(struct tcp_pcb_listen *pcb); +static void tcp_timewait_input(struct tcp_pcb *pcb); + +static int tcp_input_delayed_close(struct tcp_pcb *pcb); + +/** + * The initial input processing of TCP. It verifies the TCP header, demultiplexes + * the segment between the PCBs and passes it on to tcp_process(), which implements + * the TCP finite state machine. This function is called by the IP layer (in + * ip_input()). + * + * @param p received TCP segment to process (p->payload pointing to the TCP header) + * @param inp network interface on which this segment was received + */ +void +tcp_input(struct pbuf *p, struct netif *inp) +{ + struct tcp_pcb *pcb, *prev; + struct tcp_pcb_listen *lpcb; +#if SO_REUSE + struct tcp_pcb *lpcb_prev = NULL; + struct tcp_pcb_listen *lpcb_any = NULL; +#endif /* SO_REUSE */ + u8_t hdrlen_bytes; + err_t err; + + LWIP_UNUSED_ARG(inp); + + PERF_START; + + TCP_STATS_INC(tcp.recv); + MIB2_STATS_INC(mib2.tcpinsegs); + + tcphdr = (struct tcp_hdr *)p->payload; + +#if TCP_INPUT_DEBUG + tcp_debug_print(tcphdr); +#endif + + /* Check that TCP header fits in payload */ + if (p->len < TCP_HLEN) { + /* drop short packets */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet (%"U16_F" bytes) discarded\n", p->tot_len)); + TCP_STATS_INC(tcp.lenerr); + goto dropped; + } + + /* Don't even process incoming broadcasts/multicasts. */ + if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || + ip_addr_ismulticast(ip_current_dest_addr())) { + TCP_STATS_INC(tcp.proterr); + goto dropped; + } + +#if CHECKSUM_CHECK_TCP + IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_CHECK_TCP) { + /* Verify TCP checksum. */ + u16_t chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + ip_current_src_addr(), ip_current_dest_addr()); + if (chksum != 0) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packet discarded due to failing checksum 0x%04"X16_F"\n", + chksum)); + tcp_debug_print(tcphdr); + TCP_STATS_INC(tcp.chkerr); + goto dropped; + } + } +#endif /* CHECKSUM_CHECK_TCP */ + + /* sanity-check header length */ + hdrlen_bytes = TCPH_HDRLEN(tcphdr) * 4; + if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: invalid header length (%"U16_F")\n", (u16_t)hdrlen_bytes)); + TCP_STATS_INC(tcp.lenerr); + goto dropped; + } + + /* Move the payload pointer in the pbuf so that it points to the + TCP data instead of the TCP header. */ + tcphdr_optlen = hdrlen_bytes - TCP_HLEN; + tcphdr_opt2 = NULL; + if (p->len >= hdrlen_bytes) { + /* all options are in the first pbuf */ + tcphdr_opt1len = tcphdr_optlen; + pbuf_header(p, -(s16_t)hdrlen_bytes); /* cannot fail */ + } else { + u16_t opt2len; + /* TCP header fits into first pbuf, options don't - data is in the next pbuf */ + /* there must be a next pbuf, due to hdrlen_bytes sanity check above */ + LWIP_ASSERT("p->next != NULL", p->next != NULL); + + /* advance over the TCP header (cannot fail) */ + pbuf_header(p, -TCP_HLEN); + + /* determine how long the first and second parts of the options are */ + tcphdr_opt1len = p->len; + opt2len = tcphdr_optlen - tcphdr_opt1len; + + /* options continue in the next pbuf: set p to zero length and hide the + options in the next pbuf (adjusting p->tot_len) */ + pbuf_header(p, -(s16_t)tcphdr_opt1len); + + /* check that the options fit in the second pbuf */ + if (opt2len > p->next->len) { + /* drop short packets */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: options overflow second pbuf (%"U16_F" bytes)\n", p->next->len)); + TCP_STATS_INC(tcp.lenerr); + goto dropped; + } + + /* remember the pointer to the second part of the options */ + tcphdr_opt2 = (u8_t*)p->next->payload; + + /* advance p->next to point after the options, and manually + adjust p->tot_len to keep it consistent with the changed p->next */ + pbuf_header(p->next, -(s16_t)opt2len); + p->tot_len -= opt2len; + + LWIP_ASSERT("p->len == 0", p->len == 0); + LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); + } + + /* Convert fields in TCP header to host byte order. */ + tcphdr->src = lwip_ntohs(tcphdr->src); + tcphdr->dest = lwip_ntohs(tcphdr->dest); + seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); + ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); + tcphdr->wnd = lwip_ntohs(tcphdr->wnd); + + flags = TCPH_FLAGS(tcphdr); + tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); + + /* Demultiplex an incoming segment. First, we check if it is destined + for an active connection. */ + prev = NULL; + + for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { + LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); + LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); + LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); + if (pcb->remote_port == tcphdr->src && + pcb->local_port == tcphdr->dest && + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && + ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + /* Move this PCB to the front of the list so that subsequent + lookups will be faster (we exploit locality in TCP segment + arrivals). */ + LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); + if (prev != NULL) { + prev->next = pcb->next; + pcb->next = tcp_active_pcbs; + tcp_active_pcbs = pcb; + } else { + TCP_STATS_INC(tcp.cachehit); + } + LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); + break; + } + prev = pcb; + } + + if (pcb == NULL) { + /* If it did not go to an active connection, we check the connections + in the TIME-WAIT state. */ + for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { + LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); + if (pcb->remote_port == tcphdr->src && + pcb->local_port == tcphdr->dest && + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && + ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + /* We don't really care enough to move this PCB to the front + of the list since we are not very likely to receive that + many segments for connections in TIME-WAIT. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for TIME_WAITing connection.\n")); + tcp_timewait_input(pcb); + pbuf_free(p); + return; + } + } + + /* Finally, if we still did not get a match, we check all PCBs that + are LISTENing for incoming connections. */ + prev = NULL; + for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { + if (lpcb->local_port == tcphdr->dest) { + if (IP_IS_ANY_TYPE_VAL(lpcb->local_ip)) { + /* found an ANY TYPE (IPv4/IPv6) match */ +#if SO_REUSE + lpcb_any = lpcb; + lpcb_prev = prev; +#else /* SO_REUSE */ + break; +#endif /* SO_REUSE */ + } else if (IP_ADDR_PCB_VERSION_MATCH_EXACT(lpcb, ip_current_dest_addr())) { + if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) { + /* found an exact match */ + break; + } else if (ip_addr_isany(&lpcb->local_ip)) { + /* found an ANY-match */ +#if SO_REUSE + lpcb_any = lpcb; + lpcb_prev = prev; +#else /* SO_REUSE */ + break; + #endif /* SO_REUSE */ + } + } + } + prev = (struct tcp_pcb *)lpcb; + } +#if SO_REUSE + /* first try specific local IP */ + if (lpcb == NULL) { + /* only pass to ANY if no specific local IP has been found */ + lpcb = lpcb_any; + prev = lpcb_prev; + } +#endif /* SO_REUSE */ + if (lpcb != NULL) { + /* Move this PCB to the front of the list so that subsequent + lookups will be faster (we exploit locality in TCP segment + arrivals). */ + if (prev != NULL) { + ((struct tcp_pcb_listen *)prev)->next = lpcb->next; + /* our successor is the remainder of the listening list */ + lpcb->next = tcp_listen_pcbs.listen_pcbs; + /* put this listening pcb at the head of the listening list */ + tcp_listen_pcbs.listen_pcbs = lpcb; + } else { + TCP_STATS_INC(tcp.cachehit); + } + + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: packed for LISTENing connection.\n")); + tcp_listen_input(lpcb); + pbuf_free(p); + return; + } + } + +#if TCP_INPUT_DEBUG + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ")); + tcp_debug_print_flags(TCPH_FLAGS(tcphdr)); + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n")); +#endif /* TCP_INPUT_DEBUG */ + + + if (pcb != NULL) { + /* The incoming segment belongs to a connection. */ +#if TCP_INPUT_DEBUG + tcp_debug_print_state(pcb->state); +#endif /* TCP_INPUT_DEBUG */ + + /* Set up a tcp_seg structure. */ + inseg.next = NULL; + inseg.len = p->tot_len; + inseg.p = p; + inseg.tcphdr = tcphdr; + + recv_data = NULL; + recv_flags = 0; + recv_acked = 0; + + if (flags & TCP_PSH) { + p->flags |= PBUF_FLAG_PUSH; + } + + /* If there is data which was previously "refused" by upper layer */ + if (pcb->refused_data != NULL) { + if ((tcp_process_refused_data(pcb) == ERR_ABRT) || + ((pcb->refused_data != NULL) && (tcplen > 0))) { + /* pcb has been aborted or refused data is still refused and the new + segment contains data */ + if (pcb->rcv_ann_wnd == 0) { + /* this is a zero-window probe, we respond to it with current RCV.NXT + and drop the data segment */ + tcp_send_empty_ack(pcb); + } + TCP_STATS_INC(tcp.drop); + MIB2_STATS_INC(mib2.tcpinerrs); + goto aborted; + } + } + tcp_input_pcb = pcb; + err = tcp_process(pcb); + /* A return value of ERR_ABRT means that tcp_abort() was called + and that the pcb has been freed. If so, we don't do anything. */ + if (err != ERR_ABRT) { + if (recv_flags & TF_RESET) { + /* TF_RESET means that the connection was reset by the other + end. We then call the error callback to inform the + application that the connection is dead before we + deallocate the PCB. */ + TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST); + tcp_pcb_remove(&tcp_active_pcbs, pcb); + memp_free(MEMP_TCP_PCB, pcb); + } else { + err = ERR_OK; + /* If the application has registered a "sent" function to be + called when new send buffer space is available, we call it + now. */ + if (recv_acked > 0) { + u16_t acked16; +#if LWIP_WND_SCALE + /* recv_acked is u32_t but the sent callback only takes a u16_t, + so we might have to call it multiple times. */ + u32_t acked = recv_acked; + while (acked > 0) { + acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); + acked -= acked16; +#else + { + acked16 = recv_acked; +#endif + TCP_EVENT_SENT(pcb, (u16_t)acked16, err); + if (err == ERR_ABRT) { + goto aborted; + } + } + recv_acked = 0; + } + if (tcp_input_delayed_close(pcb)) { + goto aborted; + } +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + while (recv_data != NULL) { + struct pbuf *rest = NULL; + pbuf_split_64k(recv_data, &rest); +#else /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + if (recv_data != NULL) { +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + + LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); + if (pcb->flags & TF_RXCLOSED) { + /* received data although already closed -> abort (send RST) to + notify the remote host that not all data has been processed */ + pbuf_free(recv_data); +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + if (rest != NULL) { + pbuf_free(rest); + } +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + tcp_abort(pcb); + goto aborted; + } + + /* Notify application that data has been received. */ + TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); + if (err == ERR_ABRT) { +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + if (rest != NULL) { + pbuf_free(rest); + } +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + goto aborted; + } + + /* If the upper layer can't receive this data, store it */ + if (err != ERR_OK) { +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + if (rest != NULL) { + pbuf_cat(recv_data, rest); + } +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + pcb->refused_data = recv_data; + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: keep incoming packet, because pcb is \"full\"\n")); +#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE + break; + } else { + /* Upper layer received the data, go on with the rest if > 64K */ + recv_data = rest; +#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + } + } + + /* If a FIN segment was received, we call the callback + function with a NULL buffer to indicate EOF. */ + if (recv_flags & TF_GOT_FIN) { + if (pcb->refused_data != NULL) { + /* Delay this if we have refused data. */ + pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; + } else { + /* correct rcv_wnd as the application won't call tcp_recved() + for the FIN's seqno */ + if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { + pcb->rcv_wnd++; + } + TCP_EVENT_CLOSED(pcb, err); + if (err == ERR_ABRT) { + goto aborted; + } + } + } + + tcp_input_pcb = NULL; + if (tcp_input_delayed_close(pcb)) { + goto aborted; + } + /* Try to send something out. */ + tcp_output(pcb); +#if TCP_INPUT_DEBUG +#if TCP_DEBUG + tcp_debug_print_state(pcb->state); +#endif /* TCP_DEBUG */ +#endif /* TCP_INPUT_DEBUG */ + } + } + /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). + Below this line, 'pcb' may not be dereferenced! */ +aborted: + tcp_input_pcb = NULL; + recv_data = NULL; + + /* give up our reference to inseg.p */ + if (inseg.p != NULL) + { + pbuf_free(inseg.p); + inseg.p = NULL; + } + } else { + + /* If no matching PCB was found, send a TCP RST (reset) to the + sender. */ + LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); + if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { + TCP_STATS_INC(tcp.proterr); + TCP_STATS_INC(tcp.drop); + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + } + pbuf_free(p); + } + + LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); + PERF_STOP("tcp_input"); + return; +dropped: + TCP_STATS_INC(tcp.drop); + MIB2_STATS_INC(mib2.tcpinerrs); + pbuf_free(p); +} + +/** Called from tcp_input to check for TF_CLOSED flag. This results in closing + * and deallocating a pcb at the correct place to ensure noone references it + * any more. + * @returns 1 if the pcb has been closed and deallocated, 0 otherwise + */ +static int +tcp_input_delayed_close(struct tcp_pcb *pcb) +{ + if (recv_flags & TF_CLOSED) { + /* The connection has been closed and we will deallocate the + PCB. */ + if (!(pcb->flags & TF_RXCLOSED)) { + /* Connection closed although the application has only shut down the + tx side: call the PCB's err callback and indicate the closure to + ensure the application doesn't continue using the PCB. */ + TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD); + } + tcp_pcb_remove(&tcp_active_pcbs, pcb); + memp_free(MEMP_TCP_PCB, pcb); + return 1; + } + return 0; +} + +/** + * Called by tcp_input() when a segment arrives for a listening + * connection (from tcp_input()). + * + * @param pcb the tcp_pcb_listen for which a segment arrived + * + * @note the segment which arrived is saved in global variables, therefore only the pcb + * involved is passed as a parameter to this function + */ +static void +tcp_listen_input(struct tcp_pcb_listen *pcb) +{ + struct tcp_pcb *npcb; + u32_t iss; + err_t rc; + + if (flags & TCP_RST) { + /* An incoming RST should be ignored. Return. */ + return; + } + + /* In the LISTEN state, we check for incoming SYN segments, + creates a new PCB, and responds with a SYN|ACK. */ + if (flags & TCP_ACK) { + /* For incoming segments with the ACK flag set, respond with a + RST. */ + LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n")); + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + } else if (flags & TCP_SYN) { + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection request %"U16_F" -> %"U16_F".\n", tcphdr->src, tcphdr->dest)); +#if TCP_LISTEN_BACKLOG + if (pcb->accepts_pending >= pcb->backlog) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_listen_input: listen backlog exceeded for port %"U16_F"\n", tcphdr->dest)); + return; + } +#endif /* TCP_LISTEN_BACKLOG */ + npcb = tcp_alloc(pcb->prio); + /* If a new PCB could not be created (probably due to lack of memory), + we don't do anything, but rely on the sender will retransmit the + SYN at a time when we have more memory available. */ + if (npcb == NULL) { + err_t err; + LWIP_DEBUGF(TCP_DEBUG, ("tcp_listen_input: could not allocate PCB\n")); + TCP_STATS_INC(tcp.memerr); + TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); + LWIP_UNUSED_ARG(err); /* err not useful here */ + return; + } +#if TCP_LISTEN_BACKLOG + pcb->accepts_pending++; + npcb->flags |= TF_BACKLOGPEND; +#endif /* TCP_LISTEN_BACKLOG */ + /* Set up the new PCB. */ + ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); + ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); + npcb->local_port = pcb->local_port; + npcb->remote_port = tcphdr->src; + npcb->state = SYN_RCVD; + npcb->rcv_nxt = seqno + 1; + npcb->rcv_ann_right_edge = npcb->rcv_nxt; + iss = tcp_next_iss(npcb); + npcb->snd_wl2 = iss; + npcb->snd_nxt = iss; + npcb->lastack = iss; + npcb->snd_lbb = iss; + npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ + npcb->callback_arg = pcb->callback_arg; +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG + npcb->listener = pcb; +#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ + /* inherit socket options */ + npcb->so_options = pcb->so_options & SOF_INHERITED; + /* Register the new PCB so that we can begin receiving segments + for it. */ + TCP_REG_ACTIVE(npcb); + + /* Parse any options in the SYN. */ + tcp_parseopt(npcb); + npcb->snd_wnd = tcphdr->wnd; + npcb->snd_wnd_max = npcb->snd_wnd; + +#if TCP_CALCULATE_EFF_SEND_MSS + npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + + MIB2_STATS_INC(mib2.tcppassiveopens); + + /* Send a SYN|ACK together with the MSS option. */ + rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); + if (rc != ERR_OK) { + tcp_abandon(npcb, 0); + return; + } + tcp_output(npcb); + } + return; +} + +/** + * Called by tcp_input() when a segment arrives for a connection in + * TIME_WAIT. + * + * @param pcb the tcp_pcb for which a segment arrived + * + * @note the segment which arrived is saved in global variables, therefore only the pcb + * involved is passed as a parameter to this function + */ +static void +tcp_timewait_input(struct tcp_pcb *pcb) +{ + /* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */ + /* RFC 793 3.9 Event Processing - Segment Arrives: + * - first check sequence number - we skip that one in TIME_WAIT (always + * acceptable since we only send ACKs) + * - second check the RST bit (... return) */ + if (flags & TCP_RST) { + return; + } + /* - fourth, check the SYN bit, */ + if (flags & TCP_SYN) { + /* If an incoming segment is not acceptable, an acknowledgment + should be sent in reply */ + if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) { + /* If the SYN is in the window it is an error, send a reset */ + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + return; + } + } else if (flags & TCP_FIN) { + /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. + Restart the 2 MSL time-wait timeout.*/ + pcb->tmr = tcp_ticks; + } + + if ((tcplen > 0)) { + /* Acknowledge data, FIN or out-of-window SYN */ + pcb->flags |= TF_ACK_NOW; + tcp_output(pcb); + } + return; +} + +/** + * Implements the TCP state machine. Called by tcp_input. In some + * states tcp_receive() is called to receive data. The tcp_seg + * argument will be freed by the caller (tcp_input()) unless the + * recv_data pointer in the pcb is set. + * + * @param pcb the tcp_pcb for which a segment arrived + * + * @note the segment which arrived is saved in global variables, therefore only the pcb + * involved is passed as a parameter to this function + */ +static err_t +tcp_process(struct tcp_pcb *pcb) +{ + struct tcp_seg *rseg; + u8_t acceptable = 0; + err_t err; + + err = ERR_OK; + + /* Process incoming RST segments. */ + if (flags & TCP_RST) { + /* First, determine if the reset is acceptable. */ + if (pcb->state == SYN_SENT) { + /* "In the SYN-SENT state (a RST received in response to an initial SYN), + the RST is acceptable if the ACK field acknowledges the SYN." */ + if (ackno == pcb->snd_nxt) { + acceptable = 1; + } + } else { + /* "In all states except SYN-SENT, all reset (RST) segments are validated + by checking their SEQ-fields." */ + if (seqno == pcb->rcv_nxt) { + acceptable = 1; + } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, + pcb->rcv_nxt + pcb->rcv_wnd)) { + /* If the sequence number is inside the window, we only send an ACK + and wait for a re-send with matching sequence number. + This violates RFC 793, but is required to protection against + CVE-2004-0230 (RST spoofing attack). */ + tcp_ack_now(pcb); + } + } + + if (acceptable) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); + LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); + recv_flags |= TF_RESET; + pcb->flags &= ~TF_ACK_DELAY; + return ERR_RST; + } else { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", + seqno, pcb->rcv_nxt)); + LWIP_DEBUGF(TCP_DEBUG, ("tcp_process: unacceptable reset seqno %"U32_F" rcv_nxt %"U32_F"\n", + seqno, pcb->rcv_nxt)); + return ERR_OK; + } + } + + if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { + /* Cope with new connection attempt after remote end crashed */ + tcp_ack_now(pcb); + return ERR_OK; + } + + if ((pcb->flags & TF_RXCLOSED) == 0) { + /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ + pcb->tmr = tcp_ticks; + } + pcb->keep_cnt_sent = 0; + + tcp_parseopt(pcb); + + /* Do different things depending on the TCP state. */ + switch (pcb->state) { + case SYN_SENT: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, + pcb->snd_nxt, lwip_ntohl(pcb->unacked->tcphdr->seqno))); + /* received SYN ACK with expected sequence number? */ + if ((flags & TCP_ACK) && (flags & TCP_SYN) + && (ackno == pcb->lastack + 1)) { + pcb->rcv_nxt = seqno + 1; + pcb->rcv_ann_right_edge = pcb->rcv_nxt; + pcb->lastack = ackno; + pcb->snd_wnd = tcphdr->wnd; + pcb->snd_wnd_max = pcb->snd_wnd; + pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ + pcb->state = ESTABLISHED; + +#if TCP_CALCULATE_EFF_SEND_MSS + pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + + pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SENT): cwnd %"TCPWNDSIZE_F + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); + --pcb->snd_queuelen; + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); + rseg = pcb->unacked; + if (rseg == NULL) { + /* might happen if tcp_output fails in tcp_rexmit_rto() + in which case the segment is on the unsent list */ + rseg = pcb->unsent; + LWIP_ASSERT("no segment to free", rseg != NULL); + pcb->unsent = rseg->next; + } else { + pcb->unacked = rseg->next; + } + tcp_seg_free(rseg); + + /* If there's nothing left to acknowledge, stop the retransmit + timer, otherwise reset it to start again */ + if (pcb->unacked == NULL) { + pcb->rtime = -1; + } else { + pcb->rtime = 0; + pcb->nrtx = 0; + } + + /* Call the user specified function to call when successfully + * connected. */ + TCP_EVENT_CONNECTED(pcb, ERR_OK, err); + if (err == ERR_ABRT) { + return ERR_ABRT; + } + tcp_ack_now(pcb); + } + /* received ACK? possibly a half-open connection */ + else if (flags & TCP_ACK) { + /* send a RST to bring the other side in a non-synchronized state. */ + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + /* Resend SYN immediately (don't wait for rto timeout) to establish + connection faster, but do not send more SYNs than we otherwise would + have, or we might get caught in a loop on loopback interfaces. */ + if (pcb->nrtx < TCP_SYNMAXRTX) { + pcb->rtime = 0; + tcp_rexmit_rto(pcb); + } + } + break; + case SYN_RCVD: + if (flags & TCP_ACK) { + /* expected ACK number? */ + if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { + pcb->state = ESTABLISHED; + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG +#if LWIP_CALLBACK_API + LWIP_ASSERT("pcb->listener->accept != NULL", + (pcb->listener == NULL) || (pcb->listener->accept != NULL)); +#endif + if (pcb->listener == NULL) { + /* listen pcb might be closed by now */ + err = ERR_VAL; + } else +#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ + { + tcp_backlog_accepted(pcb); + /* Call the accept function. */ + TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); + } + if (err != ERR_OK) { + /* If the accept function returns with an error, we abort + * the connection. */ + /* Already aborted? */ + if (err != ERR_ABRT) { + tcp_abort(pcb); + } + return ERR_ABRT; + } + /* If there was any data contained within this ACK, + * we'd better pass it on to the application as well. */ + tcp_receive(pcb); + + /* Prevent ACK for SYN to generate a sent event */ + if (recv_acked != 0) { + recv_acked--; + } + + pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_process (SYN_RCVD): cwnd %"TCPWNDSIZE_F + " ssthresh %"TCPWNDSIZE_F"\n", + pcb->cwnd, pcb->ssthresh)); + + if (recv_flags & TF_GOT_FIN) { + tcp_ack_now(pcb); + pcb->state = CLOSE_WAIT; + } + } else { + /* incorrect ACK number, send RST */ + tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), + ip_current_src_addr(), tcphdr->dest, tcphdr->src); + } + } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { + /* Looks like another copy of the SYN - retransmit our SYN-ACK */ + tcp_rexmit(pcb); + } + break; + case CLOSE_WAIT: + /* FALLTHROUGH */ + case ESTABLISHED: + tcp_receive(pcb); + if (recv_flags & TF_GOT_FIN) { /* passive close */ + tcp_ack_now(pcb); + pcb->state = CLOSE_WAIT; + } + break; + case FIN_WAIT_1: + tcp_receive(pcb); + if (recv_flags & TF_GOT_FIN) { + if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + pcb->unsent == NULL) { + LWIP_DEBUGF(TCP_DEBUG, + ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_ack_now(pcb); + tcp_pcb_purge(pcb); + TCP_RMV_ACTIVE(pcb); + pcb->state = TIME_WAIT; + TCP_REG(&tcp_tw_pcbs, pcb); + } else { + tcp_ack_now(pcb); + pcb->state = CLOSING; + } + } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && + pcb->unsent == NULL) { + pcb->state = FIN_WAIT_2; + } + break; + case FIN_WAIT_2: + tcp_receive(pcb); + if (recv_flags & TF_GOT_FIN) { + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_ack_now(pcb); + tcp_pcb_purge(pcb); + TCP_RMV_ACTIVE(pcb); + pcb->state = TIME_WAIT; + TCP_REG(&tcp_tw_pcbs, pcb); + } + break; + case CLOSING: + tcp_receive(pcb); + if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + tcp_pcb_purge(pcb); + TCP_RMV_ACTIVE(pcb); + pcb->state = TIME_WAIT; + TCP_REG(&tcp_tw_pcbs, pcb); + } + break; + case LAST_ACK: + tcp_receive(pcb); + if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); + /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ + recv_flags |= TF_CLOSED; + } + break; + default: + break; + } + return ERR_OK; +} + +#if TCP_QUEUE_OOSEQ +/** + * Insert segment into the list (segments covered with new one will be deleted) + * + * Called from tcp_receive() + */ +static void +tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) +{ + struct tcp_seg *old_seg; + + if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { + /* received segment overlaps all following segments */ + tcp_segs_free(next); + next = NULL; + } else { + /* delete some following segments + oos queue may have segments with FIN flag */ + while (next && + TCP_SEQ_GEQ((seqno + cseg->len), + (next->tcphdr->seqno + next->len))) { + /* cseg with FIN already processed */ + if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { + TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); + } + old_seg = next; + next = next->next; + tcp_seg_free(old_seg); + } + if (next && + TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { + /* We need to trim the incoming segment. */ + cseg->len = (u16_t)(next->tcphdr->seqno - seqno); + pbuf_realloc(cseg->p, cseg->len); + } + } + cseg->next = next; +} +#endif /* TCP_QUEUE_OOSEQ */ + +/** + * Called by tcp_process. Checks if the given segment is an ACK for outstanding + * data, and if so frees the memory of the buffered data. Next, it places the + * segment on any of the receive queues (pcb->recved or pcb->ooseq). If the segment + * is buffered, the pbuf is referenced by pbuf_ref so that it will not be freed until + * it has been removed from the buffer. + * + * If the incoming segment constitutes an ACK for a segment that was used for RTT + * estimation, the RTT is estimated here as well. + * + * Called from tcp_process(). + */ +static void +tcp_receive(struct tcp_pcb *pcb) +{ + struct tcp_seg *next; +#if TCP_QUEUE_OOSEQ + struct tcp_seg *prev, *cseg; +#endif /* TCP_QUEUE_OOSEQ */ + s32_t off; + s16_t m; + u32_t right_wnd_edge; + u16_t new_tot_len; + int found_dupack = 0; +#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS + u32_t ooseq_blen; + u16_t ooseq_qlen; +#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ + + LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); + + if (flags & TCP_ACK) { + right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; + + /* Update window. */ + if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || + (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || + (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { + pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); + /* keep track of the biggest window announced by the remote host to calculate + the maximum segment size */ + if (pcb->snd_wnd_max < pcb->snd_wnd) { + pcb->snd_wnd_max = pcb->snd_wnd; + } + pcb->snd_wl1 = seqno; + pcb->snd_wl2 = ackno; + if (pcb->snd_wnd == 0) { + if (pcb->persist_backoff == 0) { + /* start persist timer */ + pcb->persist_cnt = 0; + pcb->persist_backoff = 1; + } + } else if (pcb->persist_backoff > 0) { + /* stop persist timer */ + pcb->persist_backoff = 0; + } + LWIP_DEBUGF(TCP_WND_DEBUG, ("tcp_receive: window update %"TCPWNDSIZE_F"\n", pcb->snd_wnd)); +#if TCP_WND_DEBUG + } else { + if (pcb->snd_wnd != (tcpwnd_size_t)SND_WND_SCALE(pcb, tcphdr->wnd)) { + LWIP_DEBUGF(TCP_WND_DEBUG, + ("tcp_receive: no window update lastack %"U32_F" ackno %" + U32_F" wl1 %"U32_F" seqno %"U32_F" wl2 %"U32_F"\n", + pcb->lastack, ackno, pcb->snd_wl1, seqno, pcb->snd_wl2)); + } +#endif /* TCP_WND_DEBUG */ + } + + /* (From Stevens TCP/IP Illustrated Vol II, p970.) Its only a + * duplicate ack if: + * 1) It doesn't ACK new data + * 2) length of received packet is zero (i.e. no payload) + * 3) the advertised window hasn't changed + * 4) There is outstanding unacknowledged data (retransmission timer running) + * 5) The ACK is == biggest ACK sequence number so far seen (snd_una) + * + * If it passes all five, should process as a dupack: + * a) dupacks < 3: do nothing + * b) dupacks == 3: fast retransmit + * c) dupacks > 3: increase cwnd + * + * If it only passes 1-3, should reset dupack counter (and add to + * stats, which we don't do in lwIP) + * + * If it only passes 1, should reset dupack counter + * + */ + + /* Clause 1 */ + if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { + /* Clause 2 */ + if (tcplen == 0) { + /* Clause 3 */ + if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { + /* Clause 4 */ + if (pcb->rtime >= 0) { + /* Clause 5 */ + if (pcb->lastack == ackno) { + found_dupack = 1; + if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { + ++pcb->dupacks; + } + if (pcb->dupacks > 3) { + /* Inflate the congestion window, but not if it means that + the value overflows. */ + if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { + pcb->cwnd += pcb->mss; + } + } else if (pcb->dupacks == 3) { + /* Do fast retransmit */ + tcp_rexmit_fast(pcb); + } + } + } + } + } + /* If Clause (1) or more is true, but not a duplicate ack, reset + * count of consecutive duplicate acks */ + if (!found_dupack) { + pcb->dupacks = 0; + } + } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { + /* We come here when the ACK acknowledges new data. */ + + /* Reset the "IN Fast Retransmit" flag, since we are no longer + in fast retransmit. Also reset the congestion window to the + slow start threshold. */ + if (pcb->flags & TF_INFR) { + pcb->flags &= ~TF_INFR; + pcb->cwnd = pcb->ssthresh; + } + + /* Reset the number of retransmissions. */ + pcb->nrtx = 0; + + /* Reset the retransmission time-out. */ + pcb->rto = (pcb->sa >> 3) + pcb->sv; + + /* Reset the fast retransmit variables. */ + pcb->dupacks = 0; + pcb->lastack = ackno; + + /* Update the congestion control variables (cwnd and + ssthresh). */ + if (pcb->state >= ESTABLISHED) { + if (pcb->cwnd < pcb->ssthresh) { + if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { + pcb->cwnd += pcb->mss; + } + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); + } else { + tcpwnd_size_t new_cwnd = (pcb->cwnd + pcb->mss * pcb->mss / pcb->cwnd); + if (new_cwnd > pcb->cwnd) { + pcb->cwnd = new_cwnd; + } + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: congestion avoidance cwnd %"TCPWNDSIZE_F"\n", pcb->cwnd)); + } + } + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: ACK for %"U32_F", unacked->seqno %"U32_F":%"U32_F"\n", + ackno, + pcb->unacked != NULL? + lwip_ntohl(pcb->unacked->tcphdr->seqno): 0, + pcb->unacked != NULL? + lwip_ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); + + /* Remove segment from the unacknowledged list if the incoming + ACK acknowledges them. */ + while (pcb->unacked != NULL && + TCP_SEQ_LEQ(lwip_ntohl(pcb->unacked->tcphdr->seqno) + + TCP_TCPLEN(pcb->unacked), ackno)) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unacked\n", + lwip_ntohl(pcb->unacked->tcphdr->seqno), + lwip_ntohl(pcb->unacked->tcphdr->seqno) + + TCP_TCPLEN(pcb->unacked))); + + next = pcb->unacked; + pcb->unacked = pcb->unacked->next; + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); + LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); + + pcb->snd_queuelen -= pbuf_clen(next->p); + recv_acked += next->len; + tcp_seg_free(next); + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unacked)\n", (tcpwnd_size_t)pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + LWIP_ASSERT("tcp_receive: valid queue length", pcb->unacked != NULL || + pcb->unsent != NULL); + } + } + + /* If there's nothing left to acknowledge, stop the retransmit + timer, otherwise reset it to start again */ + if (pcb->unacked == NULL) { + pcb->rtime = -1; + } else { + pcb->rtime = 0; + } + + pcb->polltmr = 0; + +#if LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS + if (ip_current_is_v6()) { + /* Inform neighbor reachability of forward progress. */ + nd6_reachability_hint(ip6_current_src_addr()); + } +#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ + } else { + /* Out of sequence ACK, didn't really ack anything */ + tcp_send_empty_ack(pcb); + } + + /* We go through the ->unsent list to see if any of the segments + on the list are acknowledged by the ACK. This may seem + strange since an "unsent" segment shouldn't be acked. The + rationale is that lwIP puts all outstanding segments on the + ->unsent list after a retransmission, so these segments may + in fact have been sent once. */ + while (pcb->unsent != NULL && + TCP_SEQ_BETWEEN(ackno, lwip_ntohl(pcb->unsent->tcphdr->seqno) + + TCP_TCPLEN(pcb->unsent), pcb->snd_nxt)) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unsent\n", + lwip_ntohl(pcb->unsent->tcphdr->seqno), lwip_ntohl(pcb->unsent->tcphdr->seqno) + + TCP_TCPLEN(pcb->unsent))); + + next = pcb->unsent; + pcb->unsent = pcb->unsent->next; +#if TCP_OVERSIZE + if (pcb->unsent == NULL) { + pcb->unsent_oversize = 0; + } +#endif /* TCP_OVERSIZE */ + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"TCPWNDSIZE_F" ... ", (tcpwnd_size_t)pcb->snd_queuelen)); + LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); + /* Prevent ACK for FIN to generate a sent event */ + pcb->snd_queuelen -= pbuf_clen(next->p); + recv_acked += next->len; + tcp_seg_free(next); + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("%"TCPWNDSIZE_F" (after freeing unsent)\n", (tcpwnd_size_t)pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + LWIP_ASSERT("tcp_receive: valid queue length", + pcb->unacked != NULL || pcb->unsent != NULL); + } + } + pcb->snd_buf += recv_acked; + /* End of ACK for new data processing. */ + + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: pcb->rttest %"U32_F" rtseq %"U32_F" ackno %"U32_F"\n", + pcb->rttest, pcb->rtseq, ackno)); + + /* RTT estimation calculations. This is done by checking if the + incoming segment acknowledges the segment we use to take a + round-trip time measurement. */ + if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { + /* diff between this shouldn't exceed 32K since this are tcp timer ticks + and a round-trip shouldn't be that long... */ + m = (s16_t)(tcp_ticks - pcb->rttest); + + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", + m, (u16_t)(m * TCP_SLOW_INTERVAL))); + + /* This is taken directly from VJs original code in his paper */ + m = m - (pcb->sa >> 3); + pcb->sa += m; + if (m < 0) { + m = -m; + } + m = m - (pcb->sv >> 2); + pcb->sv += m; + pcb->rto = (pcb->sa >> 3) + pcb->sv; + + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n", + pcb->rto, (u16_t)(pcb->rto * TCP_SLOW_INTERVAL))); + + pcb->rttest = 0; + } + } + + /* If the incoming segment contains data, we must process it + further unless the pcb already received a FIN. + (RFC 793, chapter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING, + LAST-ACK and TIME-WAIT: "Ignore the segment text.") */ + if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) { + /* This code basically does three things: + + +) If the incoming segment contains data that is the next + in-sequence data, this data is passed to the application. This + might involve trimming the first edge of the data. The rcv_nxt + variable and the advertised window are adjusted. + + +) If the incoming segment has data that is above the next + sequence number expected (->rcv_nxt), the segment is placed on + the ->ooseq queue. This is done by finding the appropriate + place in the ->ooseq queue (which is ordered by sequence + number) and trim the segment in both ends if needed. An + immediate ACK is sent to indicate that we received an + out-of-sequence segment. + + +) Finally, we check if the first segment on the ->ooseq queue + now is in sequence (i.e., if rcv_nxt >= ooseq->seqno). If + rcv_nxt > ooseq->seqno, we must trim the first edge of the + segment on ->ooseq before we adjust rcv_nxt. The data in the + segments that are now on sequence are chained onto the + incoming segment so that we only need to call the application + once. + */ + + /* First, we check if we must trim the first edge. We have to do + this if the sequence number of the incoming segment is less + than rcv_nxt, and the sequence number plus the length of the + segment is larger than rcv_nxt. */ + /* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { + if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/ + if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { + /* Trimming the first edge is done by pushing the payload + pointer in the pbuf downwards. This is somewhat tricky since + we do not want to discard the full contents of the pbuf up to + the new starting point of the data since we have to keep the + TCP header which is present in the first pbuf in the chain. + + What is done is really quite a nasty hack: the first pbuf in + the pbuf chain is pointed to by inseg.p. Since we need to be + able to deallocate the whole pbuf, we cannot change this + inseg.p pointer to point to any of the later pbufs in the + chain. Instead, we point the ->payload pointer in the first + pbuf to data in one of the later pbufs. We also set the + inseg.data pointer to point to the right place. This way, the + ->p pointer will still point to the first pbuf, but the + ->p->payload pointer will point to data in another pbuf. + + After we are done with adjusting the pbuf pointers we must + adjust the ->data pointer in the seg and the segment + length.*/ + + struct pbuf *p = inseg.p; + off = pcb->rcv_nxt - seqno; + LWIP_ASSERT("inseg.p != NULL", inseg.p); + LWIP_ASSERT("insane offset!", (off < 0x7fff)); + if (inseg.p->len < off) { + LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); + new_tot_len = (u16_t)(inseg.p->tot_len - off); + while (p->len < off) { + off -= p->len; + /* KJM following line changed (with addition of new_tot_len var) + to fix bug #9076 + inseg.p->tot_len -= p->len; */ + p->tot_len = new_tot_len; + p->len = 0; + p = p->next; + } + if (pbuf_header(p, (s16_t)-off)) { + /* Do we need to cope with this failing? Assert for now */ + LWIP_ASSERT("pbuf_header failed", 0); + } + } else { + if (pbuf_header(inseg.p, (s16_t)-off)) { + /* Do we need to cope with this failing? Assert for now */ + LWIP_ASSERT("pbuf_header failed", 0); + } + } + inseg.len -= (u16_t)(pcb->rcv_nxt - seqno); + inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; + } + else { + if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { + /* the whole segment is < rcv_nxt */ + /* must be a duplicate of a packet that has already been correctly handled */ + + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno)); + tcp_ack_now(pcb); + } + } + + /* The sequence number must be within the window (above rcv_nxt + and below rcv_nxt + rcv_wnd) in order to be further + processed. */ + if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, + pcb->rcv_nxt + pcb->rcv_wnd - 1)) { + if (pcb->rcv_nxt == seqno) { + /* The incoming segment is the next in sequence. We check if + we have to trim the end of the segment and update rcv_nxt + and pass the data to the application. */ + tcplen = TCP_TCPLEN(&inseg); + + if (tcplen > pcb->rcv_wnd) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, + ("tcp_receive: other end overran receive window" + "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", + seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); + if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { + /* Must remove the FIN from the header as we're trimming + * that byte of sequence-space from the packet */ + TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN); + } + /* Adjust length of segment to fit in the window. */ + TCPWND_CHECK16(pcb->rcv_wnd); + inseg.len = (u16_t)pcb->rcv_wnd; + if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { + inseg.len -= 1; + } + pbuf_realloc(inseg.p, inseg.len); + tcplen = TCP_TCPLEN(&inseg); + LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", + (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); + } +#if TCP_QUEUE_OOSEQ + /* Received in-sequence data, adjust ooseq data if: + - FIN has been received or + - inseq overlaps with ooseq */ + if (pcb->ooseq != NULL) { + if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, + ("tcp_receive: received in-order FIN, binning ooseq queue\n")); + /* Received in-order FIN means anything that was received + * out of order must now have been received in-order, so + * bin the ooseq queue */ + while (pcb->ooseq != NULL) { + struct tcp_seg *old_ooseq = pcb->ooseq; + pcb->ooseq = pcb->ooseq->next; + tcp_seg_free(old_ooseq); + } + } else { + next = pcb->ooseq; + /* Remove all segments on ooseq that are covered by inseg already. + * FIN is copied from ooseq to inseg if present. */ + while (next && + TCP_SEQ_GEQ(seqno + tcplen, + next->tcphdr->seqno + next->len)) { + /* inseg cannot have FIN here (already processed above) */ + if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && + (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { + TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); + tcplen = TCP_TCPLEN(&inseg); + } + prev = next; + next = next->next; + tcp_seg_free(prev); + } + /* Now trim right side of inseg if it overlaps with the first + * segment on ooseq */ + if (next && + TCP_SEQ_GT(seqno + tcplen, + next->tcphdr->seqno)) { + /* inseg cannot have FIN here (already processed above) */ + inseg.len = (u16_t)(next->tcphdr->seqno - seqno); + if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { + inseg.len -= 1; + } + pbuf_realloc(inseg.p, inseg.len); + tcplen = TCP_TCPLEN(&inseg); + LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", + (seqno + tcplen) == next->tcphdr->seqno); + } + pcb->ooseq = next; + } + } +#endif /* TCP_QUEUE_OOSEQ */ + + pcb->rcv_nxt = seqno + tcplen; + + /* Update the receiver's (our) window. */ + LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); + pcb->rcv_wnd -= tcplen; + + tcp_update_rcv_ann_wnd(pcb); + + /* If there is data in the segment, we make preparations to + pass this up to the application. The ->recv_data variable + is used for holding the pbuf that goes to the + application. The code for reassembling out-of-sequence data + chains its data on this pbuf as well. + + If the segment was a FIN, we set the TF_GOT_FIN flag that will + be used to indicate to the application that the remote side has + closed its end of the connection. */ + if (inseg.p->tot_len > 0) { + recv_data = inseg.p; + /* Since this pbuf now is the responsibility of the + application, we delete our reference to it so that we won't + (mistakingly) deallocate it. */ + inseg.p = NULL; + } + if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); + recv_flags |= TF_GOT_FIN; + } + +#if TCP_QUEUE_OOSEQ + /* We now check if we have segments on the ->ooseq queue that + are now in sequence. */ + while (pcb->ooseq != NULL && + pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { + + cseg = pcb->ooseq; + seqno = pcb->ooseq->tcphdr->seqno; + + pcb->rcv_nxt += TCP_TCPLEN(cseg); + LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", + pcb->rcv_wnd >= TCP_TCPLEN(cseg)); + pcb->rcv_wnd -= TCP_TCPLEN(cseg); + + tcp_update_rcv_ann_wnd(pcb); + + if (cseg->p->tot_len > 0) { + /* Chain this pbuf onto the pbuf that we will pass to + the application. */ + /* With window scaling, this can overflow recv_data->tot_len, but + that's not a problem since we explicitly fix that before passing + recv_data to the application. */ + if (recv_data) { + pbuf_cat(recv_data, cseg->p); + } else { + recv_data = cseg->p; + } + cseg->p = NULL; + } + if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); + recv_flags |= TF_GOT_FIN; + if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ + pcb->state = CLOSE_WAIT; + } + } + + pcb->ooseq = cseg->next; + tcp_seg_free(cseg); + } +#endif /* TCP_QUEUE_OOSEQ */ + + + /* Acknowledge the segment(s). */ + tcp_ack(pcb); + +#if LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS + if (ip_current_is_v6()) { + /* Inform neighbor reachability of forward progress. */ + nd6_reachability_hint(ip6_current_src_addr()); + } +#endif /* LWIP_IPV6 && LWIP_ND6_TCP_REACHABILITY_HINTS*/ + + } else { + /* We get here if the incoming segment is out-of-sequence. */ + tcp_send_empty_ack(pcb); +#if TCP_QUEUE_OOSEQ + /* We queue the segment on the ->ooseq queue. */ + if (pcb->ooseq == NULL) { + pcb->ooseq = tcp_seg_copy(&inseg); + } else { + /* If the queue is not empty, we walk through the queue and + try to find a place where the sequence number of the + incoming segment is between the sequence numbers of the + previous and the next segment on the ->ooseq queue. That is + the place where we put the incoming segment. If needed, we + trim the second edges of the previous and the incoming + segment so that it will fit into the sequence. + + If the incoming segment has the same sequence number as a + segment on the ->ooseq queue, we discard the segment that + contains less data. */ + + prev = NULL; + for (next = pcb->ooseq; next != NULL; next = next->next) { + if (seqno == next->tcphdr->seqno) { + /* The sequence number of the incoming segment is the + same as the sequence number of the segment on + ->ooseq. We check the lengths to see which one to + discard. */ + if (inseg.len > next->len) { + /* The incoming segment is larger than the old + segment. We replace some segments with the new + one. */ + cseg = tcp_seg_copy(&inseg); + if (cseg != NULL) { + if (prev != NULL) { + prev->next = cseg; + } else { + pcb->ooseq = cseg; + } + tcp_oos_insert_segment(cseg, next); + } + break; + } else { + /* Either the lengths are the same or the incoming + segment was smaller than the old one; in either + case, we ditch the incoming segment. */ + break; + } + } else { + if (prev == NULL) { + if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { + /* The sequence number of the incoming segment is lower + than the sequence number of the first segment on the + queue. We put the incoming segment first on the + queue. */ + cseg = tcp_seg_copy(&inseg); + if (cseg != NULL) { + pcb->ooseq = cseg; + tcp_oos_insert_segment(cseg, next); + } + break; + } + } else { + /*if (TCP_SEQ_LT(prev->tcphdr->seqno, seqno) && + TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {*/ + if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno+1, next->tcphdr->seqno-1)) { + /* The sequence number of the incoming segment is in + between the sequence numbers of the previous and + the next segment on ->ooseq. We trim trim the previous + segment, delete next segments that included in received segment + and trim received, if needed. */ + cseg = tcp_seg_copy(&inseg); + if (cseg != NULL) { + if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { + /* We need to trim the prev segment. */ + prev->len = (u16_t)(seqno - prev->tcphdr->seqno); + pbuf_realloc(prev->p, prev->len); + } + prev->next = cseg; + tcp_oos_insert_segment(cseg, next); + } + break; + } + } + /* If the "next" segment is the last segment on the + ooseq queue, we add the incoming segment to the end + of the list. */ + if (next->next == NULL && + TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { + if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { + /* segment "next" already contains all data */ + break; + } + next->next = tcp_seg_copy(&inseg); + if (next->next != NULL) { + if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { + /* We need to trim the last segment. */ + next->len = (u16_t)(seqno - next->tcphdr->seqno); + pbuf_realloc(next->p, next->len); + } + /* check if the remote side overruns our receive window */ + if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, + ("tcp_receive: other end overran receive window" + "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", + seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); + if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) { + /* Must remove the FIN from the header as we're trimming + * that byte of sequence-space from the packet */ + TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN); + } + /* Adjust length of segment to fit in the window. */ + next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno); + pbuf_realloc(next->next->p, next->next->len); + tcplen = TCP_TCPLEN(next->next); + LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", + (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); + } + } + break; + } + } + prev = next; + } + } +#if TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS + /* Check that the data on ooseq doesn't exceed one of the limits + and throw away everything above that limit. */ + ooseq_blen = 0; + ooseq_qlen = 0; + prev = NULL; + for (next = pcb->ooseq; next != NULL; prev = next, next = next->next) { + struct pbuf *p = next->p; + ooseq_blen += p->tot_len; + ooseq_qlen += pbuf_clen(p); + if ((ooseq_blen > TCP_OOSEQ_MAX_BYTES) || + (ooseq_qlen > TCP_OOSEQ_MAX_PBUFS)) { + /* too much ooseq data, dump this and everything after it */ + tcp_segs_free(next); + if (prev == NULL) { + /* first ooseq segment is too much, dump the whole queue */ + pcb->ooseq = NULL; + } else { + /* just dump 'next' and everything after it */ + prev->next = NULL; + } + break; + } + } +#endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ +#endif /* TCP_QUEUE_OOSEQ */ + } + } else { + /* The incoming segment is not within the window. */ + tcp_send_empty_ack(pcb); + } + } else { + /* Segments with length 0 is taken care of here. Segments that + fall out of the window are ACKed. */ + if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) { + tcp_ack_now(pcb); + } + } +} + +static u8_t +tcp_getoptbyte(void) +{ + if ((tcphdr_opt2 == NULL) || (tcp_optidx < tcphdr_opt1len)) { + u8_t* opts = (u8_t *)tcphdr + TCP_HLEN; + return opts[tcp_optidx++]; + } else { + u8_t idx = (u8_t)(tcp_optidx++ - tcphdr_opt1len); + return tcphdr_opt2[idx]; + } +} + +/** + * Parses the options contained in the incoming segment. + * + * Called from tcp_listen_input() and tcp_process(). + * Currently, only the MSS option is supported! + * + * @param pcb the tcp_pcb for which a segment arrived + */ +static void +tcp_parseopt(struct tcp_pcb *pcb) +{ + u8_t data; + u16_t mss; +#if LWIP_TCP_TIMESTAMPS + u32_t tsval; +#endif + + /* Parse the TCP MSS option, if present. */ + if (tcphdr_optlen != 0) { + for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { + u8_t opt = tcp_getoptbyte(); + switch (opt) { + case LWIP_TCP_OPT_EOL: + /* End of options. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); + return; + case LWIP_TCP_OPT_NOP: + /* NOP option. */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); + break; + case LWIP_TCP_OPT_MSS: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); + if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) { + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; + } + /* An MSS option with the right option length. */ + mss = (tcp_getoptbyte() << 8); + mss |= tcp_getoptbyte(); + /* Limit the mss to the configured TCP_MSS and prevent division by zero */ + pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; + break; +#if LWIP_WND_SCALE + case LWIP_TCP_OPT_WS: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: WND_SCALE\n")); + if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_WS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_WS) > tcphdr_optlen) { + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; + } + /* An WND_SCALE option with the right option length. */ + data = tcp_getoptbyte(); + /* If syn was received with wnd scale option, + activate wnd scale opt, but only if this is not a retransmission */ + if ((flags & TCP_SYN) && !(pcb->flags & TF_WND_SCALE)) { + pcb->snd_scale = data; + if (pcb->snd_scale > 14U) { + pcb->snd_scale = 14U; + } + pcb->rcv_scale = TCP_RCV_SCALE; + pcb->flags |= TF_WND_SCALE; + /* window scaling is enabled, we can use the full receive window */ + LWIP_ASSERT("window not at default value", pcb->rcv_wnd == TCPWND_MIN16(TCP_WND)); + LWIP_ASSERT("window not at default value", pcb->rcv_ann_wnd == TCPWND_MIN16(TCP_WND)); + pcb->rcv_wnd = pcb->rcv_ann_wnd = TCP_WND; + } + break; +#endif +#if LWIP_TCP_TIMESTAMPS + case LWIP_TCP_OPT_TS: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: TS\n")); + if (tcp_getoptbyte() != LWIP_TCP_OPT_LEN_TS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_TS) > tcphdr_optlen) { + /* Bad length */ + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + return; + } + /* TCP timestamp option with valid length */ + tsval = tcp_getoptbyte(); + tsval |= (tcp_getoptbyte() << 8); + tsval |= (tcp_getoptbyte() << 16); + tsval |= (tcp_getoptbyte() << 24); + if (flags & TCP_SYN) { + pcb->ts_recent = lwip_ntohl(tsval); + /* Enable sending timestamps in every segment now that we know + the remote host supports it. */ + pcb->flags |= TF_TIMESTAMP; + } else if (TCP_SEQ_BETWEEN(pcb->ts_lastacksent, seqno, seqno+tcplen)) { + pcb->ts_recent = lwip_ntohl(tsval); + } + /* Advance to next option (6 bytes already read) */ + tcp_optidx += LWIP_TCP_OPT_LEN_TS - 6; + break; +#endif + default: + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); + data = tcp_getoptbyte(); + if (data < 2) { + LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); + /* If the length field is zero, the options are malformed + 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; + } + } + } +} + +void +tcp_trigger_input_pcb_close(void) +{ + recv_flags |= TF_CLOSED; +} + +#endif /* LWIP_TCP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_out.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_out.c index 2435408..babc67f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_out.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/tcp_out.c @@ -1,1671 +1,1671 @@ -/** - * @file - * Transmission Control Protocol, outgoing traffic - * - * The output functions of TCP. - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#include "lwip/opt.h" - -#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/priv/tcp_priv.h" -#include "lwip/def.h" -#include "lwip/mem.h" -#include "lwip/memp.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/inet_chksum.h" -#include "lwip/stats.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#if LWIP_TCP_TIMESTAMPS -#include "lwip/sys.h" -#endif - -#include - -/* Define some copy-macros for checksum-on-copy so that the code looks - nicer by preventing too many ifdef's. */ -#if TCP_CHECKSUM_ON_COPY -#define TCP_DATA_COPY(dst, src, len, seg) do { \ - tcp_seg_add_chksum(LWIP_CHKSUM_COPY(dst, src, len), \ - len, &seg->chksum, &seg->chksum_swapped); \ - seg->flags |= TF_SEG_DATA_CHECKSUMMED; } while(0) -#define TCP_DATA_COPY2(dst, src, len, chksum, chksum_swapped) \ - tcp_seg_add_chksum(LWIP_CHKSUM_COPY(dst, src, len), len, chksum, chksum_swapped); -#else /* TCP_CHECKSUM_ON_COPY*/ -#define TCP_DATA_COPY(dst, src, len, seg) MEMCPY(dst, src, len) -#define TCP_DATA_COPY2(dst, src, len, chksum, chksum_swapped) MEMCPY(dst, src, len) -#endif /* TCP_CHECKSUM_ON_COPY*/ - -/** Define this to 1 for an extra check that the output checksum is valid - * (usefule when the checksum is generated by the application, not the stack) */ -#ifndef TCP_CHECKSUM_ON_COPY_SANITY_CHECK -#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK 0 -#endif -/* Allow to override the failure of sanity check from warning to e.g. hard failure */ -#if TCP_CHECKSUM_ON_COPY_SANITY_CHECK -#ifndef TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL -#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL(msg) LWIP_DEBUGF(TCP_DEBUG | LWIP_DBG_LEVEL_WARNING, msg) -#endif -#endif - -#if TCP_OVERSIZE -/** The size of segment pbufs created when TCP_OVERSIZE is enabled */ -#ifndef TCP_OVERSIZE_CALC_LENGTH -#define TCP_OVERSIZE_CALC_LENGTH(length) ((length) + TCP_OVERSIZE) -#endif -#endif - -/* Forward declarations.*/ -static err_t tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif); - -/** Allocate a pbuf and create a tcphdr at p->payload, used for output - * functions other than the default tcp_output -> tcp_output_segment - * (e.g. tcp_send_empty_ack, etc.) - * - * @param pcb tcp pcb for which to send a packet (used to initialize tcp_hdr) - * @param optlen length of header-options - * @param datalen length of tcp data to reserve in pbuf - * @param seqno_be seqno in network byte order (big-endian) - * @return pbuf with p->payload being the tcp_hdr - */ -static struct pbuf * -tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, - u32_t seqno_be /* already in network byte order */) -{ - struct tcp_hdr *tcphdr; - struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); - if (p != NULL) { - LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", - (p->len >= TCP_HLEN + optlen)); - tcphdr = (struct tcp_hdr *)p->payload; - tcphdr->src = lwip_htons(pcb->local_port); - tcphdr->dest = lwip_htons(pcb->remote_port); - tcphdr->seqno = seqno_be; - tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); - TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); - tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); - tcphdr->chksum = 0; - tcphdr->urgp = 0; - - /* If we're sending a packet, update the announced right window edge */ - pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; - } - return p; -} - -/** - * Called by tcp_close() to send a segment including FIN flag but not data. - * - * @param pcb the tcp_pcb over which to send a segment - * @return ERR_OK if sent, another err_t otherwise - */ -err_t -tcp_send_fin(struct tcp_pcb *pcb) -{ - /* first, try to add the fin to the last unsent segment */ - if (pcb->unsent != NULL) { - struct tcp_seg *last_unsent; - for (last_unsent = pcb->unsent; last_unsent->next != NULL; - last_unsent = last_unsent->next); - - if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { - /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ - TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); - pcb->flags |= TF_FIN; - return ERR_OK; - } - } - /* no data, no length, flags, copy=1, no optdata */ - return tcp_enqueue_flags(pcb, TCP_FIN); -} - -/** - * Create a TCP segment with prefilled header. - * - * Called by tcp_write and tcp_enqueue_flags. - * - * @param pcb Protocol control block for the TCP connection. - * @param p pbuf that is used to hold the TCP header. - * @param flags TCP flags for header. - * @param seqno TCP sequence number of this packet - * @param optflags options to include in TCP header - * @return a new tcp_seg pointing to p, or NULL. - * The TCP header is filled in except ackno and wnd. - * p is freed on failure. - */ -static struct tcp_seg * -tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) -{ - struct tcp_seg *seg; - u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); - - if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); - pbuf_free(p); - return NULL; - } - seg->flags = optflags; - seg->next = NULL; - seg->p = p; - LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); - seg->len = p->tot_len - optlen; -#if TCP_OVERSIZE_DBGCHECK - seg->oversize_left = 0; -#endif /* TCP_OVERSIZE_DBGCHECK */ -#if TCP_CHECKSUM_ON_COPY - seg->chksum = 0; - seg->chksum_swapped = 0; - /* check optflags */ - LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED", - (optflags & TF_SEG_DATA_CHECKSUMMED) == 0); -#endif /* TCP_CHECKSUM_ON_COPY */ - - /* build TCP header */ - if (pbuf_header(p, TCP_HLEN)) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no room for TCP header in pbuf.\n")); - TCP_STATS_INC(tcp.err); - tcp_seg_free(seg); - return NULL; - } - seg->tcphdr = (struct tcp_hdr *)seg->p->payload; - seg->tcphdr->src = lwip_htons(pcb->local_port); - seg->tcphdr->dest = lwip_htons(pcb->remote_port); - seg->tcphdr->seqno = lwip_htonl(seqno); - /* ackno is set in tcp_output */ - TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); - /* wnd and chksum are set in tcp_output */ - seg->tcphdr->urgp = 0; - return seg; -} - -/** - * Allocate a PBUF_RAM pbuf, perhaps with extra space at the end. - * - * This function is like pbuf_alloc(layer, length, PBUF_RAM) except - * there may be extra bytes available at the end. - * - * @param layer flag to define header size. - * @param length size of the pbuf's payload. - * @param max_length maximum usable size of payload+oversize. - * @param oversize pointer to a u16_t that will receive the number of usable tail bytes. - * @param pcb The TCP connection that will enqueue the pbuf. - * @param apiflags API flags given to tcp_write. - * @param first_seg true when this pbuf will be used in the first enqueued segment. - */ -#if TCP_OVERSIZE -static struct pbuf * -tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, - u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, - u8_t first_seg) -{ - struct pbuf *p; - u16_t alloc = length; - -#if LWIP_NETIF_TX_SINGLE_PBUF - LWIP_UNUSED_ARG(max_length); - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(apiflags); - LWIP_UNUSED_ARG(first_seg); - alloc = max_length; -#else /* LWIP_NETIF_TX_SINGLE_PBUF */ - if (length < max_length) { - /* Should we allocate an oversized pbuf, or just the minimum - * length required? If tcp_write is going to be called again - * before this segment is transmitted, we want the oversized - * buffer. If the segment will be transmitted immediately, we can - * save memory by allocating only length. We use a simple - * heuristic based on the following information: - * - * Did the user set TCP_WRITE_FLAG_MORE? - * - * Will the Nagle algorithm defer transmission of this segment? - */ - if ((apiflags & TCP_WRITE_FLAG_MORE) || - (!(pcb->flags & TF_NODELAY) && - (!first_seg || - pcb->unsent != NULL || - pcb->unacked != NULL))) { - alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); - } - } -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - p = pbuf_alloc(layer, alloc, PBUF_RAM); - if (p == NULL) { - return NULL; - } - LWIP_ASSERT("need unchained pbuf", p->next == NULL); - *oversize = p->len - length; - /* trim p->len to the currently used size */ - p->len = p->tot_len = length; - return p; -} -#else /* TCP_OVERSIZE */ -#define tcp_pbuf_prealloc(layer, length, mx, os, pcb, api, fst) pbuf_alloc((layer), (length), PBUF_RAM) -#endif /* TCP_OVERSIZE */ - -#if TCP_CHECKSUM_ON_COPY -/** Add a checksum of newly added data to the segment */ -static void -tcp_seg_add_chksum(u16_t chksum, u16_t len, u16_t *seg_chksum, - u8_t *seg_chksum_swapped) -{ - u32_t helper; - /* add chksum to old chksum and fold to u16_t */ - helper = chksum + *seg_chksum; - chksum = FOLD_U32T(helper); - if ((len & 1) != 0) { - *seg_chksum_swapped = 1 - *seg_chksum_swapped; - chksum = SWAP_BYTES_IN_WORD(chksum); - } - *seg_chksum = chksum; -} -#endif /* TCP_CHECKSUM_ON_COPY */ - -/** Checks if tcp_write is allowed or not (checks state, snd_buf and snd_queuelen). - * - * @param pcb the tcp pcb to check for - * @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) -{ - /* connection is in invalid state for data transmission? */ - if ((pcb->state != ESTABLISHED) && - (pcb->state != CLOSE_WAIT) && - (pcb->state != SYN_SENT) && - (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) { - return ERR_OK; - } - - /* fail on too much data */ - if (len > pcb->snd_buf) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n", - len, pcb->snd_buf)); - pcb->flags |= TF_NAGLEMEMERR; - return ERR_MEM; - } - - 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 >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", - pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); - TCP_STATS_INC(tcp.memerr); - pcb->flags |= TF_NAGLEMEMERR; - return ERR_MEM; - } - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", - 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; -} - -/** - * @ingroup tcp_raw - * Write data for sending (but does not send it immediately). - * - * It waits in the expectation of more data being sent soon (as - * it can send them more efficiently by combining them together). - * To prompt the system to send data now, call tcp_output() after - * calling tcp_write(). - * - * @param pcb Protocol control block for the TCP connection to enqueue data for. - * @param arg Pointer to the data to be enqueued for sending. - * @param len Data length in bytes - * @param apiflags combination of following flags : - * - TCP_WRITE_FLAG_COPY (0x01) data will be copied into memory belonging to the stack - * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will not be set on last segment sent, - * @return ERR_OK if enqueued, another err_t on error - */ -err_t -tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) -{ - struct pbuf *concat_p = NULL; - struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; - u16_t pos = 0; /* position in 'arg' data */ - u16_t queuelen; - u8_t optlen = 0; - u8_t optflags = 0; -#if TCP_OVERSIZE - u16_t oversize = 0; - u16_t oversize_used = 0; -#if TCP_OVERSIZE_DBGCHECK - u16_t oversize_add = 0; -#endif /* TCP_OVERSIZE_DBGCHECK*/ -#endif /* TCP_OVERSIZE */ - u16_t extendlen = 0; -#if TCP_CHECKSUM_ON_COPY - u16_t concat_chksum = 0; - u8_t concat_chksum_swapped = 0; - u16_t concat_chksummed = 0; -#endif /* TCP_CHECKSUM_ON_COPY */ - err_t err; - /* don't allocate segments bigger than half the maximum window we ever received */ - u16_t mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max/2)); - mss_local = mss_local ? mss_local : pcb->mss; - -#if LWIP_NETIF_TX_SINGLE_PBUF - /* Always copy to try to create single pbufs for TX */ - apiflags |= TCP_WRITE_FLAG_COPY; -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", - (void *)pcb, arg, len, (u16_t)apiflags)); - LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", - arg != NULL, return ERR_ARG;); - - err = tcp_write_checks(pcb, len); - if (err != ERR_OK) { - return err; - } - queuelen = pcb->snd_queuelen; - -#if LWIP_TCP_TIMESTAMPS - if ((pcb->flags & TF_TIMESTAMP)) { - /* Make sure the timestamp option is only included in data segments if we - agreed about it with the remote host. */ - optflags = TF_SEG_OPTS_TS; - optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); - /* ensure that segments can hold at least one data byte... */ - mss_local = LWIP_MAX(mss_local, LWIP_TCP_OPT_LEN_TS + 1); - } -#endif /* LWIP_TCP_TIMESTAMPS */ - - - /* - * TCP segmentation is done in three phases with increasing complexity: - * - * 1. Copy data directly into an oversized pbuf. - * 2. Chain a new pbuf to the end of pcb->unsent. - * 3. Create new segments. - * - * We may run out of memory at any point. In that case we must - * return ERR_MEM and not change anything in pcb. Therefore, all - * changes are recorded in local variables and committed at the end - * of the function. Some pcb fields are maintained in local copies: - * - * queuelen = pcb->snd_queuelen - * oversize = pcb->unsent_oversize - * - * These variables are set consistently by the phases: - * - * seg points to the last segment tampered with. - * - * pos records progress as data is segmented. - */ - - /* Find the tail of the unsent queue. */ - if (pcb->unsent != NULL) { - u16_t space; - u16_t unsent_optlen; - - /* @todo: this could be sped up by keeping last_unsent in the pcb */ - for (last_unsent = pcb->unsent; last_unsent->next != NULL; - last_unsent = last_unsent->next); - - /* Usable space at the end of the last unsent segment */ - unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); - LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); - space = mss_local - (last_unsent->len + unsent_optlen); - - /* - * Phase 1: Copy data directly into an oversized pbuf. - * - * The number of bytes copied is recorded in the oversize_used - * variable. The actual copying is done at the bottom of the - * function. - */ -#if TCP_OVERSIZE -#if TCP_OVERSIZE_DBGCHECK - /* check that pcb->unsent_oversize matches last_unsent->oversize_left */ - LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", - pcb->unsent_oversize == last_unsent->oversize_left); -#endif /* TCP_OVERSIZE_DBGCHECK */ - oversize = pcb->unsent_oversize; - if (oversize > 0) { - LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); - seg = last_unsent; - oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); - pos += oversize_used; - oversize -= oversize_used; - space -= oversize_used; - } - /* now we are either finished or oversize is zero */ - LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); -#endif /* TCP_OVERSIZE */ - - /* - * Phase 2: Chain a new pbuf to the end of pcb->unsent. - * - * As an exception when NOT copying the data, if the given data buffer - * directly follows the last unsent data buffer in memory, extend the last - * ROM pbuf reference to the buffer, thus saving a ROM pbuf allocation. - * - * We don't extend segments containing SYN/FIN flags or options - * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at - * the end. - */ - if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { - u16_t seglen = LWIP_MIN(space, len - pos); - seg = last_unsent; - - /* Create a pbuf with a copy or reference to seglen bytes. We - * can use PBUF_RAW here since the data appears in the middle of - * a segment. A header will never be prepended. */ - if (apiflags & TCP_WRITE_FLAG_COPY) { - /* Data is copied */ - if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", - seglen)); - goto memerr; - } -#if TCP_OVERSIZE_DBGCHECK - oversize_add = oversize; -#endif /* TCP_OVERSIZE_DBGCHECK */ - TCP_DATA_COPY2(concat_p->payload, (const u8_t*)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); -#if TCP_CHECKSUM_ON_COPY - concat_chksummed += seglen; -#endif /* TCP_CHECKSUM_ON_COPY */ - queuelen += pbuf_clen(concat_p); - } else { - /* Data is not copied */ - /* If the last unsent pbuf is of type PBUF_ROM, try to extend it. */ - struct pbuf *p; - for (p = last_unsent->p; p->next != NULL; p = p->next); - if (p->type == PBUF_ROM && (const u8_t *)p->payload + p->len == (const u8_t *)arg) { - LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); - extendlen = seglen; - } else { - if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("tcp_write: could not allocate memory for zero-copy pbuf\n")); - goto memerr; - } - /* reference the non-volatile payload data */ - ((struct pbuf_rom*)concat_p)->payload = (const u8_t*)arg + pos; - queuelen += pbuf_clen(concat_p); - } -#if TCP_CHECKSUM_ON_COPY - /* calculate the checksum of nocopy-data */ - tcp_seg_add_chksum(~inet_chksum((const u8_t*)arg + pos, seglen), seglen, - &concat_chksum, &concat_chksum_swapped); - concat_chksummed += seglen; -#endif /* TCP_CHECKSUM_ON_COPY */ - } - - pos += seglen; - } - } else { -#if TCP_OVERSIZE - LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", - pcb->unsent_oversize == 0); -#endif /* TCP_OVERSIZE */ - } - - /* - * Phase 3: Create new segments. - * - * The new segments are chained together in the local 'queue' - * variable, ready to be appended to pcb->unsent. - */ - while (pos < len) { - struct pbuf *p; - u16_t left = len - pos; - u16_t max_len = mss_local - optlen; - u16_t seglen = LWIP_MIN(left, max_len); -#if TCP_CHECKSUM_ON_COPY - u16_t chksum = 0; - u8_t chksum_swapped = 0; -#endif /* TCP_CHECKSUM_ON_COPY */ - - if (apiflags & TCP_WRITE_FLAG_COPY) { - /* If copy is set, memory should be allocated and data copied - * into pbuf */ - if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); - goto memerr; - } - LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", - (p->len >= seglen)); - TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t*)arg + pos, seglen, &chksum, &chksum_swapped); - } else { - /* Copy is not set: First allocate a pbuf for holding the data. - * Since the referenced data is available at least until it is - * sent out on the link (as it has to be ACKed by the remote - * party) we can safely use PBUF_ROM instead of PBUF_REF here. - */ - struct pbuf *p2; -#if TCP_OVERSIZE - LWIP_ASSERT("oversize == 0", oversize == 0); -#endif /* TCP_OVERSIZE */ - if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for zero-copy pbuf\n")); - goto memerr; - } -#if TCP_CHECKSUM_ON_COPY - /* calculate the checksum of nocopy-data */ - chksum = ~inet_chksum((const u8_t*)arg + pos, seglen); - if (seglen & 1) { - chksum_swapped = 1; - chksum = SWAP_BYTES_IN_WORD(chksum); - } -#endif /* TCP_CHECKSUM_ON_COPY */ - /* reference the non-volatile payload data */ - ((struct pbuf_rom*)p2)->payload = (const u8_t*)arg + pos; - - /* Second, allocate a pbuf for the headers. */ - if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { - /* If allocation fails, we have to deallocate the data pbuf as - * well. */ - pbuf_free(p2); - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for header pbuf\n")); - goto memerr; - } - /* Concatenate the headers and data pbufs together. */ - pbuf_cat(p/*header*/, p2/*data*/); - } - - queuelen += pbuf_clen(p); - - /* Now that there are more segments queued, we check again if the - * length of the queue exceeds the configured maximum or - * overflows. */ - if ((queuelen > TCP_SND_QUEUELEN) || (queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: queue too long %"U16_F" (%d)\n", - queuelen, (int)TCP_SND_QUEUELEN)); - pbuf_free(p); - goto memerr; - } - - if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { - goto memerr; - } -#if TCP_OVERSIZE_DBGCHECK - seg->oversize_left = oversize; -#endif /* TCP_OVERSIZE_DBGCHECK */ -#if TCP_CHECKSUM_ON_COPY - seg->chksum = chksum; - seg->chksum_swapped = chksum_swapped; - seg->flags |= TF_SEG_DATA_CHECKSUMMED; -#endif /* TCP_CHECKSUM_ON_COPY */ - - /* first segment of to-be-queued data? */ - if (queue == NULL) { - queue = seg; - } else { - /* Attach the segment to the end of the queued segments */ - LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); - prev_seg->next = seg; - } - /* remember last segment of to-be-queued data for next iteration */ - prev_seg = seg; - - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", - lwip_ntohl(seg->tcphdr->seqno), - lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); - - pos += seglen; - } - - /* - * All three segmentation phases were successful. We can commit the - * transaction. - */ -#if TCP_OVERSIZE_DBGCHECK - if ((last_unsent != NULL) && (oversize_add != 0)) { - last_unsent->oversize_left += oversize_add; - } -#endif /* TCP_OVERSIZE_DBGCHECK */ - - /* - * Phase 1: If data has been added to the preallocated tail of - * last_unsent, we update the length fields of the pbuf chain. - */ -#if TCP_OVERSIZE - if (oversize_used > 0) { - struct pbuf *p; - /* Bump tot_len of whole chain, len of tail */ - for (p = last_unsent->p; p; p = p->next) { - p->tot_len += oversize_used; - if (p->next == NULL) { - TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); - p->len += oversize_used; - } - } - last_unsent->len += oversize_used; -#if TCP_OVERSIZE_DBGCHECK - LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", - last_unsent->oversize_left >= oversize_used); - last_unsent->oversize_left -= oversize_used; -#endif /* TCP_OVERSIZE_DBGCHECK */ - } - pcb->unsent_oversize = oversize; -#endif /* TCP_OVERSIZE */ - - /* - * Phase 2: concat_p can be concatenated onto last_unsent->p, unless we - * determined that the last ROM pbuf can be extended to include the new data. - */ - if (concat_p != NULL) { - LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", - (last_unsent != NULL)); - pbuf_cat(last_unsent->p, concat_p); - last_unsent->len += concat_p->tot_len; - } else if (extendlen > 0) { - struct pbuf *p; - LWIP_ASSERT("tcp_write: extension of reference requires reference", - last_unsent != NULL && last_unsent->p != NULL); - for (p = last_unsent->p; p->next != NULL; p = p->next) { - p->tot_len += extendlen; - } - p->tot_len += extendlen; - p->len += extendlen; - last_unsent->len += extendlen; - } - -#if TCP_CHECKSUM_ON_COPY - if (concat_chksummed) { - LWIP_ASSERT("tcp_write: concat checksum needs concatenated data", - concat_p != NULL || extendlen > 0); - /*if concat checksumm swapped - swap it back */ - if (concat_chksum_swapped) { - concat_chksum = SWAP_BYTES_IN_WORD(concat_chksum); - } - tcp_seg_add_chksum(concat_chksum, concat_chksummed, &last_unsent->chksum, - &last_unsent->chksum_swapped); - last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED; - } -#endif /* TCP_CHECKSUM_ON_COPY */ - - /* - * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that - * is harmless - */ - if (last_unsent == NULL) { - pcb->unsent = queue; - } else { - last_unsent->next = queue; - } - - /* - * Finally update the pcb state. - */ - pcb->snd_lbb += len; - pcb->snd_buf -= len; - pcb->snd_queuelen = queuelen; - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: %"S16_F" (after enqueued)\n", - pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_write: valid queue length", - pcb->unacked != NULL || pcb->unsent != NULL); - } - - /* Set the PSH flag in the last segment that we enqueued. */ - if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { - TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); - } - - return ERR_OK; -memerr: - pcb->flags |= TF_NAGLEMEMERR; - TCP_STATS_INC(tcp.memerr); - - if (concat_p != NULL) { - pbuf_free(concat_p); - } - if (queue != NULL) { - tcp_segs_free(queue); - } - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || - pcb->unsent != NULL); - } - LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); - return ERR_MEM; -} - -/** - * Enqueue TCP options for transmission. - * - * Called by tcp_connect(), tcp_listen_input(), and tcp_send_ctrl(). - * - * @param pcb Protocol control block for the TCP connection. - * @param flags TCP header flags to set in the outgoing segment. - */ -err_t -tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) -{ - struct pbuf *p; - struct tcp_seg *seg; - u8_t optflags = 0; - u8_t optlen = 0; - - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen)); - - LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", - (flags & (TCP_SYN | TCP_FIN)) != 0); - - /* check for configured max queuelen and possible overflow (FIN flag should always come through!) */ - if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) && - ((flags & TCP_FIN) == 0)) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n", - pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); - TCP_STATS_INC(tcp.memerr); - pcb->flags |= TF_NAGLEMEMERR; - return ERR_MEM; - } - - if (flags & TCP_SYN) { - optflags = TF_SEG_OPTS_MSS; -#if LWIP_WND_SCALE - if ((pcb->state != SYN_RCVD) || (pcb->flags & TF_WND_SCALE)) { - /* In a (sent in state SYN_RCVD), the window scale option may only - be sent if we received a window scale option from the remote host. */ - optflags |= TF_SEG_OPTS_WND_SCALE; - } -#endif /* LWIP_WND_SCALE */ - } -#if LWIP_TCP_TIMESTAMPS - if ((pcb->flags & TF_TIMESTAMP)) { - /* Make sure the timestamp option is only included in data segments if we - agreed about it with the remote host. */ - optflags |= TF_SEG_OPTS_TS; - } -#endif /* LWIP_TCP_TIMESTAMPS */ - optlen = LWIP_TCP_OPT_LENGTH(optflags); - - /* Allocate pbuf with room for TCP header + options */ - if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { - pcb->flags |= TF_NAGLEMEMERR; - TCP_STATS_INC(tcp.memerr); - return ERR_MEM; - } - LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", - (p->len >= optlen)); - - /* Allocate memory for tcp_seg, and fill in fields. */ - if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { - pcb->flags |= TF_NAGLEMEMERR; - TCP_STATS_INC(tcp.memerr); - return ERR_MEM; - } - LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); - LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); - - LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, - ("tcp_enqueue_flags: queueing %"U32_F":%"U32_F" (0x%"X16_F")\n", - lwip_ntohl(seg->tcphdr->seqno), - lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg), - (u16_t)flags)); - - /* Now append seg to pcb->unsent queue */ - if (pcb->unsent == NULL) { - pcb->unsent = seg; - } else { - struct tcp_seg *useg; - for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); - useg->next = seg; - } -#if TCP_OVERSIZE - /* The new unsent tail has no space */ - pcb->unsent_oversize = 0; -#endif /* TCP_OVERSIZE */ - - /* SYN and FIN bump the sequence number */ - if ((flags & TCP_SYN) || (flags & TCP_FIN)) { - pcb->snd_lbb++; - /* optlen does not influence snd_buf */ - } - if (flags & TCP_FIN) { - pcb->flags |= TF_FIN; - } - - /* update number of segments on the queues */ - pcb->snd_queuelen += pbuf_clen(seg->p); - LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: %"S16_F" (after enqueued)\n", pcb->snd_queuelen)); - if (pcb->snd_queuelen != 0) { - LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", - pcb->unacked != NULL || pcb->unsent != NULL); - } - - return ERR_OK; -} - -#if LWIP_TCP_TIMESTAMPS -/* Build a timestamp option (12 bytes long) at the specified options pointer) - * - * @param pcb tcp_pcb - * @param opts option pointer where to store the timestamp option - */ -static void -tcp_build_timestamp_option(struct tcp_pcb *pcb, u32_t *opts) -{ - /* Pad with two NOP options to make everything nicely aligned */ - opts[0] = PP_HTONL(0x0101080A); - opts[1] = lwip_htonl(sys_now()); - opts[2] = lwip_htonl(pcb->ts_recent); -} -#endif - -#if LWIP_WND_SCALE -/** Build a window scale option (3 bytes long) at the specified options pointer) - * - * @param opts option pointer where to store the window scale option - */ -static void -tcp_build_wnd_scale_option(u32_t *opts) -{ - /* Pad with one NOP option to make everything nicely aligned */ - opts[0] = PP_HTONL(0x01030300 | TCP_RCV_SCALE); -} -#endif - -/** - * Send an ACK without data. - * - * @param pcb Protocol control block for the TCP connection to send the ACK - */ -err_t -tcp_send_empty_ack(struct tcp_pcb *pcb) -{ - err_t err; - struct pbuf *p; - u8_t optlen = 0; - struct netif *netif; -#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP - struct tcp_hdr *tcphdr; -#endif /* LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP */ - -#if LWIP_TCP_TIMESTAMPS - if (pcb->flags & TF_TIMESTAMP) { - optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); - } -#endif - - p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt)); - if (p == NULL) { - /* let tcp_fasttmr retry sending this ACK */ - pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); - return ERR_BUF; - } -#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP - tcphdr = (struct tcp_hdr *)p->payload; -#endif /* LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP */ - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, - ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); - - /* NB. MSS and window scale options are only sent on SYNs, so ignore them here */ -#if LWIP_TCP_TIMESTAMPS - pcb->ts_lastacksent = pcb->rcv_nxt; - - if (pcb->flags & TF_TIMESTAMP) { - tcp_build_timestamp_option(pcb, (u32_t *)(tcphdr + 1)); - } -#endif - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - if (netif == NULL) { - err = ERR_RTE; - } else { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &pcb->local_ip, &pcb->remote_ip); - } -#endif - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, - pcb->ttl, pcb->tos, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - pbuf_free(p); - - if (err != ERR_OK) { - /* let tcp_fasttmr retry sending this ACK */ - pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); - } else { - /* remove ACK flags from the PCB, as we sent an empty ACK now */ - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); - } - - return err; -} - -/** - * @ingroup tcp_raw - * Find out what we can send and send it - * - * @param pcb Protocol control block for the TCP connection to send data - * @return ERR_OK if data has been sent or nothing to send - * another err_t on error - */ -err_t -tcp_output(struct tcp_pcb *pcb) -{ - struct tcp_seg *seg, *useg; - u32_t wnd, snd_nxt; - err_t err; - struct netif *netif; -#if TCP_CWND_DEBUG - s16_t i = 0; -#endif /* TCP_CWND_DEBUG */ - - /* pcb->state LISTEN not allowed here */ - LWIP_ASSERT("don't call tcp_output for listen-pcbs", - pcb->state != LISTEN); - - /* First, check if we are invoked by the TCP input processing - code. If so, we do not output anything. Instead, we rely on the - input processing code to call us when input processing is done - with. */ - if (tcp_input_pcb == pcb) { - return ERR_OK; - } - - wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); - - seg = pcb->unsent; - - /* If the TF_ACK_NOW flag is set and no data will be sent (either - * because the ->unsent queue is empty or because the window does - * not allow it), construct an empty ACK segment and send it. - * - * If data is to be sent, we will just piggyback the ACK (see below). - */ - if (pcb->flags & TF_ACK_NOW && - (seg == NULL || - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { - return tcp_send_empty_ack(pcb); - } - - /* useg should point to last segment on unacked queue */ - useg = pcb->unacked; - if (useg != NULL) { - for (; useg->next != NULL; useg = useg->next); - } - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - if (netif == NULL) { - return ERR_RTE; - } - - /* If we don't have a local IP address, we get one from netif */ - if (ip_addr_isany(&pcb->local_ip)) { - const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); - if (local_ip == NULL) { - return ERR_RTE; - } - ip_addr_copy(pcb->local_ip, *local_ip); - } - -#if TCP_OUTPUT_DEBUG - if (seg == NULL) { - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: nothing to send (%p)\n", - (void*)pcb->unsent)); - } -#endif /* TCP_OUTPUT_DEBUG */ -#if TCP_CWND_DEBUG - if (seg == NULL) { - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F - ", cwnd %"TCPWNDSIZE_F", wnd %"U32_F - ", seg == NULL, ack %"U32_F"\n", - pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack)); - } else { - LWIP_DEBUGF(TCP_CWND_DEBUG, - ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F - ", effwnd %"U32_F", seq %"U32_F", ack %"U32_F"\n", - pcb->snd_wnd, pcb->cwnd, wnd, - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, - lwip_ntohl(seg->tcphdr->seqno), pcb->lastack)); - } -#endif /* TCP_CWND_DEBUG */ - /* Check if we need to start the persistent timer when the next unsent segment - * does not fit within the remaining send window and RTO timer is not running (we - * have no in-flight data). A traditional approach would fill the remaining window - * with part of the unsent segment (which will engage zero-window probing upon - * reception of the zero window update from the receiver). This ensures the - * subsequent window update is reliably received. With the goal of being lightweight, - * we avoid splitting the unsent segment and treat the window as already zero. - */ - if (seg != NULL && - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd && - wnd > 0 && wnd == pcb->snd_wnd && pcb->unacked == NULL) { - /* Start the persist timer */ - if (pcb->persist_backoff == 0) { - pcb->persist_cnt = 0; - pcb->persist_backoff = 1; - } - goto output_done; - } - /* data available and window allows it to be sent? */ - while (seg != NULL && - lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { - LWIP_ASSERT("RST not expected here!", - (TCPH_FLAGS(seg->tcphdr) & TCP_RST) == 0); - /* Stop sending if the nagle algorithm would prevent it - * Don't stop: - * - if tcp_write had a memory error before (prevent delayed ACK timeout) or - * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - - * either seg->next != NULL or pcb->unacked == NULL; - * RST is no sent using tcp_write/tcp_output. - */ - if ((tcp_do_output_nagle(pcb) == 0) && - ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { - break; - } -#if TCP_CWND_DEBUG - LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F", effwnd %"U32_F", seq %"U32_F", ack %"U32_F", i %"S16_F"\n", - pcb->snd_wnd, pcb->cwnd, wnd, - lwip_ntohl(seg->tcphdr->seqno) + seg->len - - pcb->lastack, - lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); - ++i; -#endif /* TCP_CWND_DEBUG */ - - if (pcb->state != SYN_SENT) { - TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); - } - -#if TCP_OVERSIZE_DBGCHECK - seg->oversize_left = 0; -#endif /* TCP_OVERSIZE_DBGCHECK */ - err = tcp_output_segment(seg, pcb, netif); - if (err != ERR_OK) { - /* segment could not be sent, for whatever reason */ - pcb->flags |= TF_NAGLEMEMERR; - return err; - } - pcb->unsent = seg->next; - if (pcb->state != SYN_SENT) { - pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); - } - snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); - if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { - pcb->snd_nxt = snd_nxt; - } - /* put segment on unacknowledged list if length > 0 */ - if (TCP_TCPLEN(seg) > 0) { - seg->next = NULL; - /* unacked list is empty? */ - if (pcb->unacked == NULL) { - pcb->unacked = seg; - useg = seg; - /* unacked list is not empty? */ - } else { - /* In the case of fast retransmit, the packet should not go to the tail - * of the unacked queue, but rather somewhere before it. We need to check for - * this case. -STJ Jul 27, 2004 */ - if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) { - /* add segment to before tail of unacked list, keeping the list sorted */ - struct tcp_seg **cur_seg = &(pcb->unacked); - while (*cur_seg && - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - cur_seg = &((*cur_seg)->next ); - } - seg->next = (*cur_seg); - (*cur_seg) = seg; - } else { - /* add segment to tail of unacked list */ - useg->next = seg; - useg = useg->next; - } - } - /* do not queue empty segments on the unacked list */ - } else { - tcp_seg_free(seg); - } - seg = pcb->unsent; - } -output_done: -#if TCP_OVERSIZE - if (pcb->unsent == NULL) { - /* last unsent has been removed, reset unsent_oversize */ - pcb->unsent_oversize = 0; - } -#endif /* TCP_OVERSIZE */ - - pcb->flags &= ~TF_NAGLEMEMERR; - return ERR_OK; -} - -/** - * Called by tcp_output() to actually send a TCP segment over IP. - * - * @param seg the tcp_seg to send - * @param pcb the tcp_pcb for the TCP connection used to send the segment - * @param netif the netif used to send the segment - */ -static err_t -tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif) -{ - err_t err; - u16_t len; - u32_t *opts; - - if (seg->p->ref != 1) { - /* This can happen if the pbuf of this segment is still referenced by the - netif driver due to deferred transmission. Since this function modifies - p->len, we must not continue in this case. */ - return ERR_OK; - } - - /* The TCP header has already been constructed, but the ackno and - wnd fields remain. */ - seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); - - /* advertise our receive window size in this TCP segment */ -#if LWIP_WND_SCALE - if (seg->flags & TF_SEG_OPTS_WND_SCALE) { - /* The Window field in a SYN segment itself (the only type where we send - the window scale option) is never scaled. */ - seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(pcb->rcv_ann_wnd)); - } else -#endif /* LWIP_WND_SCALE */ - { - seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); - } - - pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; - - /* Add any requested options. NB MSS option is only set on SYN - packets, so ignore it here */ - /* cast through void* to get rid of alignment warnings */ - opts = (u32_t *)(void *)(seg->tcphdr + 1); - if (seg->flags & TF_SEG_OPTS_MSS) { - u16_t mss; -#if TCP_CALCULATE_EFF_SEND_MSS - mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip); -#else /* TCP_CALCULATE_EFF_SEND_MSS */ - mss = TCP_MSS; -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - *opts = TCP_BUILD_MSS_OPTION(mss); - opts += 1; - } -#if LWIP_TCP_TIMESTAMPS - pcb->ts_lastacksent = pcb->rcv_nxt; - - if (seg->flags & TF_SEG_OPTS_TS) { - tcp_build_timestamp_option(pcb, opts); - opts += 3; - } -#endif -#if LWIP_WND_SCALE - if (seg->flags & TF_SEG_OPTS_WND_SCALE) { - tcp_build_wnd_scale_option(opts); - opts += 1; - } -#endif - - /* Set retransmission timer running if it is not currently enabled - This must be set before checking the route. */ - if (pcb->rtime < 0) { - pcb->rtime = 0; - } - - if (pcb->rttest == 0) { - pcb->rttest = tcp_ticks; - pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); - - LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_output_segment: rtseq %"U32_F"\n", pcb->rtseq)); - } - LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", - lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) + - seg->len)); - - len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); - if (len == 0) { - /** Exclude retransmitted segments from this count. */ - MIB2_STATS_INC(mib2.tcpoutsegs); - } - - seg->p->len -= len; - seg->p->tot_len -= len; - - seg->p->payload = seg->tcphdr; - - seg->tcphdr->chksum = 0; -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { -#if TCP_CHECKSUM_ON_COPY - u32_t acc; -#if TCP_CHECKSUM_ON_COPY_SANITY_CHECK - u16_t chksum_slow = ip_chksum_pseudo(seg->p, IP_PROTO_TCP, - seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); -#endif /* TCP_CHECKSUM_ON_COPY_SANITY_CHECK */ - if ((seg->flags & TF_SEG_DATA_CHECKSUMMED) == 0) { - LWIP_ASSERT("data included but not checksummed", - seg->p->tot_len == (TCPH_HDRLEN(seg->tcphdr) * 4)); - } - - /* rebuild TCP header checksum (TCP header changes for retransmissions!) */ - acc = ip_chksum_pseudo_partial(seg->p, IP_PROTO_TCP, - seg->p->tot_len, TCPH_HDRLEN(seg->tcphdr) * 4, &pcb->local_ip, &pcb->remote_ip); - /* add payload checksum */ - if (seg->chksum_swapped) { - seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); - seg->chksum_swapped = 0; - } - acc += (u16_t)~(seg->chksum); - seg->tcphdr->chksum = FOLD_U32T(acc); -#if TCP_CHECKSUM_ON_COPY_SANITY_CHECK - if (chksum_slow != seg->tcphdr->chksum) { - TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL( - ("tcp_output_segment: calculated checksum is %"X16_F" instead of %"X16_F"\n", - seg->tcphdr->chksum, chksum_slow)); - seg->tcphdr->chksum = chksum_slow; - } -#endif /* TCP_CHECKSUM_ON_COPY_SANITY_CHECK */ -#else /* TCP_CHECKSUM_ON_COPY */ - seg->tcphdr->chksum = ip_chksum_pseudo(seg->p, IP_PROTO_TCP, - seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); -#endif /* TCP_CHECKSUM_ON_COPY */ - } -#endif /* CHECKSUM_GEN_TCP */ - TCP_STATS_INC(tcp.xmit); - - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, - pcb->tos, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - return err; -} - -/** - * Send a TCP RESET packet (empty segment with RST flag set) either to - * abort a connection or to show that there is no matching local connection - * for a received segment. - * - * Called by tcp_abort() (to abort a local connection), tcp_input() (if no - * matching local pcb was found), tcp_listen_input() (if incoming segment - * has ACK flag set) and tcp_process() (received segment in the wrong state) - * - * Since a RST segment is in most cases not sent for an active connection, - * tcp_rst() has a number of arguments that are taken from a tcp_pcb for - * most other segment output functions. - * - * @param seqno the sequence number to use for the outgoing segment - * @param ackno the acknowledge number to use for the outgoing segment - * @param local_ip the local IP address to send the segment from - * @param remote_ip the remote IP address to send the segment to - * @param local_port the local TCP port to send the segment from - * @param remote_port the remote TCP port to send the segment to - */ -void -tcp_rst(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) -{ - struct pbuf *p; - struct tcp_hdr *tcphdr; - struct netif *netif; - p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); - if (p == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); - return; - } - LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", - (p->len >= sizeof(struct tcp_hdr))); - - tcphdr = (struct tcp_hdr *)p->payload; - tcphdr->src = lwip_htons(local_port); - tcphdr->dest = lwip_htons(remote_port); - tcphdr->seqno = lwip_htonl(seqno); - tcphdr->ackno = lwip_htonl(ackno); - TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); -#if LWIP_WND_SCALE - tcphdr->wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); -#else - tcphdr->wnd = PP_HTONS(TCP_WND); -#endif - tcphdr->chksum = 0; - tcphdr->urgp = 0; - - TCP_STATS_INC(tcp.xmit); - MIB2_STATS_INC(mib2.tcpoutrsts); - - netif = ip_route(local_ip, remote_ip); - if (netif != NULL) { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - local_ip, remote_ip); - } -#endif - /* Send output with hardcoded TTL/HL since we have no access to the pcb */ - ip_output_if(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP, netif); - } - pbuf_free(p); - LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); -} - -/** - * Requeue all unacked segments for retransmission - * - * Called by tcp_slowtmr() for slow retransmission. - * - * @param pcb the tcp_pcb for which to re-enqueue all unacked segments - */ -void -tcp_rexmit_rto(struct tcp_pcb *pcb) -{ - struct tcp_seg *seg; - - if (pcb->unacked == NULL) { - return; - } - - /* Move all unacked segments to the head of the unsent queue */ - for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); - /* concatenate unsent queue after unacked queue */ - seg->next = pcb->unsent; -#if TCP_OVERSIZE_DBGCHECK - /* if last unsent changed, we need to update unsent_oversize */ - if (pcb->unsent == NULL) { - pcb->unsent_oversize = seg->oversize_left; - } -#endif /* TCP_OVERSIZE_DBGCHECK */ - /* unsent queue is the concatenated queue (of unacked, unsent) */ - pcb->unsent = pcb->unacked; - /* unacked queue is now empty */ - pcb->unacked = NULL; - - /* increment number of retransmissions */ - if (pcb->nrtx < 0xFF) { - ++pcb->nrtx; - } - - /* Don't take any RTT measurements after retransmitting. */ - pcb->rttest = 0; - - /* Do the actual retransmission */ - tcp_output(pcb); -} - -/** - * Requeue the first unacked segment for retransmission - * - * Called by tcp_receive() for fast retransmit. - * - * @param pcb the tcp_pcb for which to retransmit the first unacked segment - */ -void -tcp_rexmit(struct tcp_pcb *pcb) -{ - struct tcp_seg *seg; - struct tcp_seg **cur_seg; - - if (pcb->unacked == NULL) { - return; - } - - /* Move the first unacked segment to the unsent queue */ - /* Keep the unsent queue sorted. */ - seg = pcb->unacked; - pcb->unacked = seg->next; - - cur_seg = &(pcb->unsent); - while (*cur_seg && - TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { - cur_seg = &((*cur_seg)->next ); - } - seg->next = *cur_seg; - *cur_seg = seg; -#if TCP_OVERSIZE - if (seg->next == NULL) { - /* the retransmitted segment is last in unsent, so reset unsent_oversize */ - pcb->unsent_oversize = 0; - } -#endif /* TCP_OVERSIZE */ - - if (pcb->nrtx < 0xFF) { - ++pcb->nrtx; - } - - /* Don't take any rtt measurements after retransmitting. */ - pcb->rttest = 0; - - /* Do the actual retransmission. */ - MIB2_STATS_INC(mib2.tcpretranssegs); - /* No need to call tcp_output: we are always called from tcp_input() - and thus tcp_output directly returns. */ -} - - -/** - * Handle retransmission after three dupacks received - * - * @param pcb the tcp_pcb for which to retransmit the first unacked segment - */ -void -tcp_rexmit_fast(struct tcp_pcb *pcb) -{ - if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { - /* This is fast retransmit. Retransmit the first unacked segment. */ - LWIP_DEBUGF(TCP_FR_DEBUG, - ("tcp_receive: dupacks %"U16_F" (%"U32_F - "), fast retransmit %"U32_F"\n", - (u16_t)pcb->dupacks, pcb->lastack, - lwip_ntohl(pcb->unacked->tcphdr->seqno))); - tcp_rexmit(pcb); - - /* Set ssthresh to half of the minimum of the current - * cwnd and the advertised window */ - pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2; - - /* The minimum value for ssthresh should be 2 MSS */ - if (pcb->ssthresh < (2U * pcb->mss)) { - LWIP_DEBUGF(TCP_FR_DEBUG, - ("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F - " should be min 2 mss %"U16_F"...\n", - pcb->ssthresh, (u16_t)(2*pcb->mss))); - pcb->ssthresh = 2*pcb->mss; - } - - pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; - pcb->flags |= TF_INFR; - - /* Reset the retransmission timer to prevent immediate rto retransmissions */ - pcb->rtime = 0; - } -} - - -/** - * Send keepalive packets to keep a connection active although - * no data is sent over it. - * - * Called by tcp_slowtmr() - * - * @param pcb the tcp_pcb for which to send a keepalive packet - */ -err_t -tcp_keepalive(struct tcp_pcb *pcb) -{ - err_t err; - struct pbuf *p; - struct netif *netif; - - LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: sending KEEPALIVE probe to ")); - ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); - 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, 0, 0, lwip_htonl(pcb->snd_nxt - 1)); - if (p == NULL) { - LWIP_DEBUGF(TCP_DEBUG, - ("tcp_keepalive: could not allocate memory for pbuf\n")); - return ERR_MEM; - } - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - if (netif == NULL) { - err = ERR_RTE; - } else { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload; - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &pcb->local_ip, &pcb->remote_ip); - } -#endif /* CHECKSUM_GEN_TCP */ - TCP_STATS_INC(tcp.xmit); - - /* Send output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - pbuf_free(p); - - 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; -} - - -/** - * Send persist timer zero-window probes to keep a connection active - * when a window update is lost. - * - * Called by tcp_slowtmr() - * - * @param pcb the tcp_pcb for which to send a zero-window probe packet - */ -err_t -tcp_zero_window_probe(struct tcp_pcb *pcb) -{ - err_t err; - struct pbuf *p; - struct tcp_hdr *tcphdr; - struct tcp_seg *seg; - u16_t len; - u8_t is_fin; - u32_t snd_nxt; - struct netif *netif; - - LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: sending ZERO WINDOW probe to ")); - ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); - LWIP_DEBUGF(TCP_DEBUG, ("\n")); - - LWIP_DEBUGF(TCP_DEBUG, - ("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)); - - seg = pcb->unacked; - - if (seg == NULL) { - seg = pcb->unsent; - } - if (seg == NULL) { - /* nothing to send, zero window probe not needed */ - return ERR_OK; - } - - is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); - /* we want to send one seqno: either FIN or data (no options) */ - len = is_fin ? 0 : 1; - - p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); - if (p == NULL) { - LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); - return ERR_MEM; - } - tcphdr = (struct tcp_hdr *)p->payload; - - if (is_fin) { - /* FIN segment, no data */ - TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); - } else { - /* Data segment, copy in one byte from the head of the unacked queue */ - char *d = ((char *)p->payload + TCP_HLEN); - /* Depending on whether the segment has already been sent (unacked) or not - (unsent), seg->p->payload points to the IP header or TCP header. - 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; - if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { - pcb->snd_nxt = snd_nxt; - } - - netif = ip_route(&pcb->local_ip, &pcb->remote_ip); - if (netif == NULL) { - err = ERR_RTE; - } else { -#if CHECKSUM_GEN_TCP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { - tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, - &pcb->local_ip, &pcb->remote_ip); - } -#endif - TCP_STATS_INC(tcp.xmit); - - /* Send output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, - 0, IP_PROTO_TCP, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - } - - pbuf_free(p); - - 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; -} -#endif /* LWIP_TCP */ +/** + * @file + * Transmission Control Protocol, outgoing traffic + * + * The output functions of TCP. + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#include "lwip/opt.h" + +#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/priv/tcp_priv.h" +#include "lwip/def.h" +#include "lwip/mem.h" +#include "lwip/memp.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/inet_chksum.h" +#include "lwip/stats.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#if LWIP_TCP_TIMESTAMPS +#include "lwip/sys.h" +#endif + +#include + +/* Define some copy-macros for checksum-on-copy so that the code looks + nicer by preventing too many ifdef's. */ +#if TCP_CHECKSUM_ON_COPY +#define TCP_DATA_COPY(dst, src, len, seg) do { \ + tcp_seg_add_chksum(LWIP_CHKSUM_COPY(dst, src, len), \ + len, &seg->chksum, &seg->chksum_swapped); \ + seg->flags |= TF_SEG_DATA_CHECKSUMMED; } while(0) +#define TCP_DATA_COPY2(dst, src, len, chksum, chksum_swapped) \ + tcp_seg_add_chksum(LWIP_CHKSUM_COPY(dst, src, len), len, chksum, chksum_swapped); +#else /* TCP_CHECKSUM_ON_COPY*/ +#define TCP_DATA_COPY(dst, src, len, seg) MEMCPY(dst, src, len) +#define TCP_DATA_COPY2(dst, src, len, chksum, chksum_swapped) MEMCPY(dst, src, len) +#endif /* TCP_CHECKSUM_ON_COPY*/ + +/** Define this to 1 for an extra check that the output checksum is valid + * (usefule when the checksum is generated by the application, not the stack) */ +#ifndef TCP_CHECKSUM_ON_COPY_SANITY_CHECK +#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK 0 +#endif +/* Allow to override the failure of sanity check from warning to e.g. hard failure */ +#if TCP_CHECKSUM_ON_COPY_SANITY_CHECK +#ifndef TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL +#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL(msg) LWIP_DEBUGF(TCP_DEBUG | LWIP_DBG_LEVEL_WARNING, msg) +#endif +#endif + +#if TCP_OVERSIZE +/** The size of segment pbufs created when TCP_OVERSIZE is enabled */ +#ifndef TCP_OVERSIZE_CALC_LENGTH +#define TCP_OVERSIZE_CALC_LENGTH(length) ((length) + TCP_OVERSIZE) +#endif +#endif + +/* Forward declarations.*/ +static err_t tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif); + +/** Allocate a pbuf and create a tcphdr at p->payload, used for output + * functions other than the default tcp_output -> tcp_output_segment + * (e.g. tcp_send_empty_ack, etc.) + * + * @param pcb tcp pcb for which to send a packet (used to initialize tcp_hdr) + * @param optlen length of header-options + * @param datalen length of tcp data to reserve in pbuf + * @param seqno_be seqno in network byte order (big-endian) + * @return pbuf with p->payload being the tcp_hdr + */ +static struct pbuf * +tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, + u32_t seqno_be /* already in network byte order */) +{ + struct tcp_hdr *tcphdr; + struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); + if (p != NULL) { + LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", + (p->len >= TCP_HLEN + optlen)); + tcphdr = (struct tcp_hdr *)p->payload; + tcphdr->src = lwip_htons(pcb->local_port); + tcphdr->dest = lwip_htons(pcb->remote_port); + tcphdr->seqno = seqno_be; + tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); + TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); + tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); + tcphdr->chksum = 0; + tcphdr->urgp = 0; + + /* If we're sending a packet, update the announced right window edge */ + pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; + } + return p; +} + +/** + * Called by tcp_close() to send a segment including FIN flag but not data. + * + * @param pcb the tcp_pcb over which to send a segment + * @return ERR_OK if sent, another err_t otherwise + */ +err_t +tcp_send_fin(struct tcp_pcb *pcb) +{ + /* first, try to add the fin to the last unsent segment */ + if (pcb->unsent != NULL) { + struct tcp_seg *last_unsent; + for (last_unsent = pcb->unsent; last_unsent->next != NULL; + last_unsent = last_unsent->next); + + if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { + /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ + TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); + pcb->flags |= TF_FIN; + return ERR_OK; + } + } + /* no data, no length, flags, copy=1, no optdata */ + return tcp_enqueue_flags(pcb, TCP_FIN); +} + +/** + * Create a TCP segment with prefilled header. + * + * Called by tcp_write and tcp_enqueue_flags. + * + * @param pcb Protocol control block for the TCP connection. + * @param p pbuf that is used to hold the TCP header. + * @param flags TCP flags for header. + * @param seqno TCP sequence number of this packet + * @param optflags options to include in TCP header + * @return a new tcp_seg pointing to p, or NULL. + * The TCP header is filled in except ackno and wnd. + * p is freed on failure. + */ +static struct tcp_seg * +tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) +{ + struct tcp_seg *seg; + u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); + + if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); + pbuf_free(p); + return NULL; + } + seg->flags = optflags; + seg->next = NULL; + seg->p = p; + LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); + seg->len = p->tot_len - optlen; +#if TCP_OVERSIZE_DBGCHECK + seg->oversize_left = 0; +#endif /* TCP_OVERSIZE_DBGCHECK */ +#if TCP_CHECKSUM_ON_COPY + seg->chksum = 0; + seg->chksum_swapped = 0; + /* check optflags */ + LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED", + (optflags & TF_SEG_DATA_CHECKSUMMED) == 0); +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* build TCP header */ + if (pbuf_header(p, TCP_HLEN)) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no room for TCP header in pbuf.\n")); + TCP_STATS_INC(tcp.err); + tcp_seg_free(seg); + return NULL; + } + seg->tcphdr = (struct tcp_hdr *)seg->p->payload; + seg->tcphdr->src = lwip_htons(pcb->local_port); + seg->tcphdr->dest = lwip_htons(pcb->remote_port); + seg->tcphdr->seqno = lwip_htonl(seqno); + /* ackno is set in tcp_output */ + TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); + /* wnd and chksum are set in tcp_output */ + seg->tcphdr->urgp = 0; + return seg; +} + +/** + * Allocate a PBUF_RAM pbuf, perhaps with extra space at the end. + * + * This function is like pbuf_alloc(layer, length, PBUF_RAM) except + * there may be extra bytes available at the end. + * + * @param layer flag to define header size. + * @param length size of the pbuf's payload. + * @param max_length maximum usable size of payload+oversize. + * @param oversize pointer to a u16_t that will receive the number of usable tail bytes. + * @param pcb The TCP connection that will enqueue the pbuf. + * @param apiflags API flags given to tcp_write. + * @param first_seg true when this pbuf will be used in the first enqueued segment. + */ +#if TCP_OVERSIZE +static struct pbuf * +tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, + u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, + u8_t first_seg) +{ + struct pbuf *p; + u16_t alloc = length; + +#if LWIP_NETIF_TX_SINGLE_PBUF + LWIP_UNUSED_ARG(max_length); + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(apiflags); + LWIP_UNUSED_ARG(first_seg); + alloc = max_length; +#else /* LWIP_NETIF_TX_SINGLE_PBUF */ + if (length < max_length) { + /* Should we allocate an oversized pbuf, or just the minimum + * length required? If tcp_write is going to be called again + * before this segment is transmitted, we want the oversized + * buffer. If the segment will be transmitted immediately, we can + * save memory by allocating only length. We use a simple + * heuristic based on the following information: + * + * Did the user set TCP_WRITE_FLAG_MORE? + * + * Will the Nagle algorithm defer transmission of this segment? + */ + if ((apiflags & TCP_WRITE_FLAG_MORE) || + (!(pcb->flags & TF_NODELAY) && + (!first_seg || + pcb->unsent != NULL || + pcb->unacked != NULL))) { + alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); + } + } +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + p = pbuf_alloc(layer, alloc, PBUF_RAM); + if (p == NULL) { + return NULL; + } + LWIP_ASSERT("need unchained pbuf", p->next == NULL); + *oversize = p->len - length; + /* trim p->len to the currently used size */ + p->len = p->tot_len = length; + return p; +} +#else /* TCP_OVERSIZE */ +#define tcp_pbuf_prealloc(layer, length, mx, os, pcb, api, fst) pbuf_alloc((layer), (length), PBUF_RAM) +#endif /* TCP_OVERSIZE */ + +#if TCP_CHECKSUM_ON_COPY +/** Add a checksum of newly added data to the segment */ +static void +tcp_seg_add_chksum(u16_t chksum, u16_t len, u16_t *seg_chksum, + u8_t *seg_chksum_swapped) +{ + u32_t helper; + /* add chksum to old chksum and fold to u16_t */ + helper = chksum + *seg_chksum; + chksum = FOLD_U32T(helper); + if ((len & 1) != 0) { + *seg_chksum_swapped = 1 - *seg_chksum_swapped; + chksum = SWAP_BYTES_IN_WORD(chksum); + } + *seg_chksum = chksum; +} +#endif /* TCP_CHECKSUM_ON_COPY */ + +/** Checks if tcp_write is allowed or not (checks state, snd_buf and snd_queuelen). + * + * @param pcb the tcp pcb to check for + * @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) +{ + /* connection is in invalid state for data transmission? */ + if ((pcb->state != ESTABLISHED) && + (pcb->state != CLOSE_WAIT) && + (pcb->state != SYN_SENT) && + (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) { + return ERR_OK; + } + + /* fail on too much data */ + if (len > pcb->snd_buf) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too much data (len=%"U16_F" > snd_buf=%"TCPWNDSIZE_F")\n", + len, pcb->snd_buf)); + pcb->flags |= TF_NAGLEMEMERR; + return ERR_MEM; + } + + 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 >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", + pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); + TCP_STATS_INC(tcp.memerr); + pcb->flags |= TF_NAGLEMEMERR; + return ERR_MEM; + } + if (pcb->snd_queuelen != 0) { + LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", + 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; +} + +/** + * @ingroup tcp_raw + * Write data for sending (but does not send it immediately). + * + * It waits in the expectation of more data being sent soon (as + * it can send them more efficiently by combining them together). + * To prompt the system to send data now, call tcp_output() after + * calling tcp_write(). + * + * @param pcb Protocol control block for the TCP connection to enqueue data for. + * @param arg Pointer to the data to be enqueued for sending. + * @param len Data length in bytes + * @param apiflags combination of following flags : + * - TCP_WRITE_FLAG_COPY (0x01) data will be copied into memory belonging to the stack + * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will not be set on last segment sent, + * @return ERR_OK if enqueued, another err_t on error + */ +err_t +tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) +{ + struct pbuf *concat_p = NULL; + struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; + u16_t pos = 0; /* position in 'arg' data */ + u16_t queuelen; + u8_t optlen = 0; + u8_t optflags = 0; +#if TCP_OVERSIZE + u16_t oversize = 0; + u16_t oversize_used = 0; +#if TCP_OVERSIZE_DBGCHECK + u16_t oversize_add = 0; +#endif /* TCP_OVERSIZE_DBGCHECK*/ +#endif /* TCP_OVERSIZE */ + u16_t extendlen = 0; +#if TCP_CHECKSUM_ON_COPY + u16_t concat_chksum = 0; + u8_t concat_chksum_swapped = 0; + u16_t concat_chksummed = 0; +#endif /* TCP_CHECKSUM_ON_COPY */ + err_t err; + /* don't allocate segments bigger than half the maximum window we ever received */ + u16_t mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max/2)); + mss_local = mss_local ? mss_local : pcb->mss; + +#if LWIP_NETIF_TX_SINGLE_PBUF + /* Always copy to try to create single pbufs for TX */ + apiflags |= TCP_WRITE_FLAG_COPY; +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", + (void *)pcb, arg, len, (u16_t)apiflags)); + LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", + arg != NULL, return ERR_ARG;); + + err = tcp_write_checks(pcb, len); + if (err != ERR_OK) { + return err; + } + queuelen = pcb->snd_queuelen; + +#if LWIP_TCP_TIMESTAMPS + if ((pcb->flags & TF_TIMESTAMP)) { + /* Make sure the timestamp option is only included in data segments if we + agreed about it with the remote host. */ + optflags = TF_SEG_OPTS_TS; + optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); + /* ensure that segments can hold at least one data byte... */ + mss_local = LWIP_MAX(mss_local, LWIP_TCP_OPT_LEN_TS + 1); + } +#endif /* LWIP_TCP_TIMESTAMPS */ + + + /* + * TCP segmentation is done in three phases with increasing complexity: + * + * 1. Copy data directly into an oversized pbuf. + * 2. Chain a new pbuf to the end of pcb->unsent. + * 3. Create new segments. + * + * We may run out of memory at any point. In that case we must + * return ERR_MEM and not change anything in pcb. Therefore, all + * changes are recorded in local variables and committed at the end + * of the function. Some pcb fields are maintained in local copies: + * + * queuelen = pcb->snd_queuelen + * oversize = pcb->unsent_oversize + * + * These variables are set consistently by the phases: + * + * seg points to the last segment tampered with. + * + * pos records progress as data is segmented. + */ + + /* Find the tail of the unsent queue. */ + if (pcb->unsent != NULL) { + u16_t space; + u16_t unsent_optlen; + + /* @todo: this could be sped up by keeping last_unsent in the pcb */ + for (last_unsent = pcb->unsent; last_unsent->next != NULL; + last_unsent = last_unsent->next); + + /* Usable space at the end of the last unsent segment */ + unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); + LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); + space = mss_local - (last_unsent->len + unsent_optlen); + + /* + * Phase 1: Copy data directly into an oversized pbuf. + * + * The number of bytes copied is recorded in the oversize_used + * variable. The actual copying is done at the bottom of the + * function. + */ +#if TCP_OVERSIZE +#if TCP_OVERSIZE_DBGCHECK + /* check that pcb->unsent_oversize matches last_unsent->oversize_left */ + LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", + pcb->unsent_oversize == last_unsent->oversize_left); +#endif /* TCP_OVERSIZE_DBGCHECK */ + oversize = pcb->unsent_oversize; + if (oversize > 0) { + LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); + seg = last_unsent; + oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); + pos += oversize_used; + oversize -= oversize_used; + space -= oversize_used; + } + /* now we are either finished or oversize is zero */ + LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); +#endif /* TCP_OVERSIZE */ + + /* + * Phase 2: Chain a new pbuf to the end of pcb->unsent. + * + * As an exception when NOT copying the data, if the given data buffer + * directly follows the last unsent data buffer in memory, extend the last + * ROM pbuf reference to the buffer, thus saving a ROM pbuf allocation. + * + * We don't extend segments containing SYN/FIN flags or options + * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at + * the end. + */ + if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { + u16_t seglen = LWIP_MIN(space, len - pos); + seg = last_unsent; + + /* Create a pbuf with a copy or reference to seglen bytes. We + * can use PBUF_RAW here since the data appears in the middle of + * a segment. A header will never be prepended. */ + if (apiflags & TCP_WRITE_FLAG_COPY) { + /* Data is copied */ + if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", + seglen)); + goto memerr; + } +#if TCP_OVERSIZE_DBGCHECK + oversize_add = oversize; +#endif /* TCP_OVERSIZE_DBGCHECK */ + TCP_DATA_COPY2(concat_p->payload, (const u8_t*)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); +#if TCP_CHECKSUM_ON_COPY + concat_chksummed += seglen; +#endif /* TCP_CHECKSUM_ON_COPY */ + queuelen += pbuf_clen(concat_p); + } else { + /* Data is not copied */ + /* If the last unsent pbuf is of type PBUF_ROM, try to extend it. */ + struct pbuf *p; + for (p = last_unsent->p; p->next != NULL; p = p->next); + if (p->type == PBUF_ROM && (const u8_t *)p->payload + p->len == (const u8_t *)arg) { + LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); + extendlen = seglen; + } else { + if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("tcp_write: could not allocate memory for zero-copy pbuf\n")); + goto memerr; + } + /* reference the non-volatile payload data */ + ((struct pbuf_rom*)concat_p)->payload = (const u8_t*)arg + pos; + queuelen += pbuf_clen(concat_p); + } +#if TCP_CHECKSUM_ON_COPY + /* calculate the checksum of nocopy-data */ + tcp_seg_add_chksum(~inet_chksum((const u8_t*)arg + pos, seglen), seglen, + &concat_chksum, &concat_chksum_swapped); + concat_chksummed += seglen; +#endif /* TCP_CHECKSUM_ON_COPY */ + } + + pos += seglen; + } + } else { +#if TCP_OVERSIZE + LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", + pcb->unsent_oversize == 0); +#endif /* TCP_OVERSIZE */ + } + + /* + * Phase 3: Create new segments. + * + * The new segments are chained together in the local 'queue' + * variable, ready to be appended to pcb->unsent. + */ + while (pos < len) { + struct pbuf *p; + u16_t left = len - pos; + u16_t max_len = mss_local - optlen; + u16_t seglen = LWIP_MIN(left, max_len); +#if TCP_CHECKSUM_ON_COPY + u16_t chksum = 0; + u8_t chksum_swapped = 0; +#endif /* TCP_CHECKSUM_ON_COPY */ + + if (apiflags & TCP_WRITE_FLAG_COPY) { + /* If copy is set, memory should be allocated and data copied + * into pbuf */ + if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); + goto memerr; + } + LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", + (p->len >= seglen)); + TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t*)arg + pos, seglen, &chksum, &chksum_swapped); + } else { + /* Copy is not set: First allocate a pbuf for holding the data. + * Since the referenced data is available at least until it is + * sent out on the link (as it has to be ACKed by the remote + * party) we can safely use PBUF_ROM instead of PBUF_REF here. + */ + struct pbuf *p2; +#if TCP_OVERSIZE + LWIP_ASSERT("oversize == 0", oversize == 0); +#endif /* TCP_OVERSIZE */ + if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for zero-copy pbuf\n")); + goto memerr; + } +#if TCP_CHECKSUM_ON_COPY + /* calculate the checksum of nocopy-data */ + chksum = ~inet_chksum((const u8_t*)arg + pos, seglen); + if (seglen & 1) { + chksum_swapped = 1; + chksum = SWAP_BYTES_IN_WORD(chksum); + } +#endif /* TCP_CHECKSUM_ON_COPY */ + /* reference the non-volatile payload data */ + ((struct pbuf_rom*)p2)->payload = (const u8_t*)arg + pos; + + /* Second, allocate a pbuf for the headers. */ + if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { + /* If allocation fails, we have to deallocate the data pbuf as + * well. */ + pbuf_free(p2); + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for header pbuf\n")); + goto memerr; + } + /* Concatenate the headers and data pbufs together. */ + pbuf_cat(p/*header*/, p2/*data*/); + } + + queuelen += pbuf_clen(p); + + /* Now that there are more segments queued, we check again if the + * length of the queue exceeds the configured maximum or + * overflows. */ + if ((queuelen > TCP_SND_QUEUELEN) || (queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: queue too long %"U16_F" (%d)\n", + queuelen, (int)TCP_SND_QUEUELEN)); + pbuf_free(p); + goto memerr; + } + + if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { + goto memerr; + } +#if TCP_OVERSIZE_DBGCHECK + seg->oversize_left = oversize; +#endif /* TCP_OVERSIZE_DBGCHECK */ +#if TCP_CHECKSUM_ON_COPY + seg->chksum = chksum; + seg->chksum_swapped = chksum_swapped; + seg->flags |= TF_SEG_DATA_CHECKSUMMED; +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* first segment of to-be-queued data? */ + if (queue == NULL) { + queue = seg; + } else { + /* Attach the segment to the end of the queued segments */ + LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); + prev_seg->next = seg; + } + /* remember last segment of to-be-queued data for next iteration */ + prev_seg = seg; + + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", + lwip_ntohl(seg->tcphdr->seqno), + lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); + + pos += seglen; + } + + /* + * All three segmentation phases were successful. We can commit the + * transaction. + */ +#if TCP_OVERSIZE_DBGCHECK + if ((last_unsent != NULL) && (oversize_add != 0)) { + last_unsent->oversize_left += oversize_add; + } +#endif /* TCP_OVERSIZE_DBGCHECK */ + + /* + * Phase 1: If data has been added to the preallocated tail of + * last_unsent, we update the length fields of the pbuf chain. + */ +#if TCP_OVERSIZE + if (oversize_used > 0) { + struct pbuf *p; + /* Bump tot_len of whole chain, len of tail */ + for (p = last_unsent->p; p; p = p->next) { + p->tot_len += oversize_used; + if (p->next == NULL) { + TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); + p->len += oversize_used; + } + } + last_unsent->len += oversize_used; +#if TCP_OVERSIZE_DBGCHECK + LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", + last_unsent->oversize_left >= oversize_used); + last_unsent->oversize_left -= oversize_used; +#endif /* TCP_OVERSIZE_DBGCHECK */ + } + pcb->unsent_oversize = oversize; +#endif /* TCP_OVERSIZE */ + + /* + * Phase 2: concat_p can be concatenated onto last_unsent->p, unless we + * determined that the last ROM pbuf can be extended to include the new data. + */ + if (concat_p != NULL) { + LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", + (last_unsent != NULL)); + pbuf_cat(last_unsent->p, concat_p); + last_unsent->len += concat_p->tot_len; + } else if (extendlen > 0) { + struct pbuf *p; + LWIP_ASSERT("tcp_write: extension of reference requires reference", + last_unsent != NULL && last_unsent->p != NULL); + for (p = last_unsent->p; p->next != NULL; p = p->next) { + p->tot_len += extendlen; + } + p->tot_len += extendlen; + p->len += extendlen; + last_unsent->len += extendlen; + } + +#if TCP_CHECKSUM_ON_COPY + if (concat_chksummed) { + LWIP_ASSERT("tcp_write: concat checksum needs concatenated data", + concat_p != NULL || extendlen > 0); + /*if concat checksumm swapped - swap it back */ + if (concat_chksum_swapped) { + concat_chksum = SWAP_BYTES_IN_WORD(concat_chksum); + } + tcp_seg_add_chksum(concat_chksum, concat_chksummed, &last_unsent->chksum, + &last_unsent->chksum_swapped); + last_unsent->flags |= TF_SEG_DATA_CHECKSUMMED; + } +#endif /* TCP_CHECKSUM_ON_COPY */ + + /* + * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that + * is harmless + */ + if (last_unsent == NULL) { + pcb->unsent = queue; + } else { + last_unsent->next = queue; + } + + /* + * Finally update the pcb state. + */ + pcb->snd_lbb += len; + pcb->snd_buf -= len; + pcb->snd_queuelen = queuelen; + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: %"S16_F" (after enqueued)\n", + pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + LWIP_ASSERT("tcp_write: valid queue length", + pcb->unacked != NULL || pcb->unsent != NULL); + } + + /* Set the PSH flag in the last segment that we enqueued. */ + if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { + TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); + } + + return ERR_OK; +memerr: + pcb->flags |= TF_NAGLEMEMERR; + TCP_STATS_INC(tcp.memerr); + + if (concat_p != NULL) { + pbuf_free(concat_p); + } + if (queue != NULL) { + tcp_segs_free(queue); + } + if (pcb->snd_queuelen != 0) { + LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || + pcb->unsent != NULL); + } + LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); + return ERR_MEM; +} + +/** + * Enqueue TCP options for transmission. + * + * Called by tcp_connect(), tcp_listen_input(), and tcp_send_ctrl(). + * + * @param pcb Protocol control block for the TCP connection. + * @param flags TCP header flags to set in the outgoing segment. + */ +err_t +tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) +{ + struct pbuf *p; + struct tcp_seg *seg; + u8_t optflags = 0; + u8_t optlen = 0; + + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen)); + + LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", + (flags & (TCP_SYN | TCP_FIN)) != 0); + + /* check for configured max queuelen and possible overflow (FIN flag should always come through!) */ + if (((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) && + ((flags & TCP_FIN) == 0)) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("tcp_enqueue_flags: too long queue %"U16_F" (max %"U16_F")\n", + pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); + TCP_STATS_INC(tcp.memerr); + pcb->flags |= TF_NAGLEMEMERR; + return ERR_MEM; + } + + if (flags & TCP_SYN) { + optflags = TF_SEG_OPTS_MSS; +#if LWIP_WND_SCALE + if ((pcb->state != SYN_RCVD) || (pcb->flags & TF_WND_SCALE)) { + /* In a (sent in state SYN_RCVD), the window scale option may only + be sent if we received a window scale option from the remote host. */ + optflags |= TF_SEG_OPTS_WND_SCALE; + } +#endif /* LWIP_WND_SCALE */ + } +#if LWIP_TCP_TIMESTAMPS + if ((pcb->flags & TF_TIMESTAMP)) { + /* Make sure the timestamp option is only included in data segments if we + agreed about it with the remote host. */ + optflags |= TF_SEG_OPTS_TS; + } +#endif /* LWIP_TCP_TIMESTAMPS */ + optlen = LWIP_TCP_OPT_LENGTH(optflags); + + /* Allocate pbuf with room for TCP header + options */ + if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { + pcb->flags |= TF_NAGLEMEMERR; + TCP_STATS_INC(tcp.memerr); + return ERR_MEM; + } + LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", + (p->len >= optlen)); + + /* Allocate memory for tcp_seg, and fill in fields. */ + if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { + pcb->flags |= TF_NAGLEMEMERR; + TCP_STATS_INC(tcp.memerr); + return ERR_MEM; + } + LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); + LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); + + LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, + ("tcp_enqueue_flags: queueing %"U32_F":%"U32_F" (0x%"X16_F")\n", + lwip_ntohl(seg->tcphdr->seqno), + lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg), + (u16_t)flags)); + + /* Now append seg to pcb->unsent queue */ + if (pcb->unsent == NULL) { + pcb->unsent = seg; + } else { + struct tcp_seg *useg; + for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); + useg->next = seg; + } +#if TCP_OVERSIZE + /* The new unsent tail has no space */ + pcb->unsent_oversize = 0; +#endif /* TCP_OVERSIZE */ + + /* SYN and FIN bump the sequence number */ + if ((flags & TCP_SYN) || (flags & TCP_FIN)) { + pcb->snd_lbb++; + /* optlen does not influence snd_buf */ + } + if (flags & TCP_FIN) { + pcb->flags |= TF_FIN; + } + + /* update number of segments on the queues */ + pcb->snd_queuelen += pbuf_clen(seg->p); + LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue_flags: %"S16_F" (after enqueued)\n", pcb->snd_queuelen)); + if (pcb->snd_queuelen != 0) { + LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", + pcb->unacked != NULL || pcb->unsent != NULL); + } + + return ERR_OK; +} + +#if LWIP_TCP_TIMESTAMPS +/* Build a timestamp option (12 bytes long) at the specified options pointer) + * + * @param pcb tcp_pcb + * @param opts option pointer where to store the timestamp option + */ +static void +tcp_build_timestamp_option(struct tcp_pcb *pcb, u32_t *opts) +{ + /* Pad with two NOP options to make everything nicely aligned */ + opts[0] = PP_HTONL(0x0101080A); + opts[1] = lwip_htonl(sys_now()); + opts[2] = lwip_htonl(pcb->ts_recent); +} +#endif + +#if LWIP_WND_SCALE +/** Build a window scale option (3 bytes long) at the specified options pointer) + * + * @param opts option pointer where to store the window scale option + */ +static void +tcp_build_wnd_scale_option(u32_t *opts) +{ + /* Pad with one NOP option to make everything nicely aligned */ + opts[0] = PP_HTONL(0x01030300 | TCP_RCV_SCALE); +} +#endif + +/** + * Send an ACK without data. + * + * @param pcb Protocol control block for the TCP connection to send the ACK + */ +err_t +tcp_send_empty_ack(struct tcp_pcb *pcb) +{ + err_t err; + struct pbuf *p; + u8_t optlen = 0; + struct netif *netif; +#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP + struct tcp_hdr *tcphdr; +#endif /* LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP */ + +#if LWIP_TCP_TIMESTAMPS + if (pcb->flags & TF_TIMESTAMP) { + optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); + } +#endif + + p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt)); + if (p == NULL) { + /* let tcp_fasttmr retry sending this ACK */ + pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); + return ERR_BUF; + } +#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP + tcphdr = (struct tcp_hdr *)p->payload; +#endif /* LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP */ + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, + ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); + + /* NB. MSS and window scale options are only sent on SYNs, so ignore them here */ +#if LWIP_TCP_TIMESTAMPS + pcb->ts_lastacksent = pcb->rcv_nxt; + + if (pcb->flags & TF_TIMESTAMP) { + tcp_build_timestamp_option(pcb, (u32_t *)(tcphdr + 1)); + } +#endif + + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + if (netif == NULL) { + err = ERR_RTE; + } else { +#if CHECKSUM_GEN_TCP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { + tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + &pcb->local_ip, &pcb->remote_ip); + } +#endif + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, + pcb->ttl, pcb->tos, IP_PROTO_TCP, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + } + pbuf_free(p); + + if (err != ERR_OK) { + /* let tcp_fasttmr retry sending this ACK */ + pcb->flags |= (TF_ACK_DELAY | TF_ACK_NOW); + } else { + /* remove ACK flags from the PCB, as we sent an empty ACK now */ + pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + } + + return err; +} + +/** + * @ingroup tcp_raw + * Find out what we can send and send it + * + * @param pcb Protocol control block for the TCP connection to send data + * @return ERR_OK if data has been sent or nothing to send + * another err_t on error + */ +err_t +tcp_output(struct tcp_pcb *pcb) +{ + struct tcp_seg *seg, *useg; + u32_t wnd, snd_nxt; + err_t err; + struct netif *netif; +#if TCP_CWND_DEBUG + s16_t i = 0; +#endif /* TCP_CWND_DEBUG */ + + /* pcb->state LISTEN not allowed here */ + LWIP_ASSERT("don't call tcp_output for listen-pcbs", + pcb->state != LISTEN); + + /* First, check if we are invoked by the TCP input processing + code. If so, we do not output anything. Instead, we rely on the + input processing code to call us when input processing is done + with. */ + if (tcp_input_pcb == pcb) { + return ERR_OK; + } + + wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); + + seg = pcb->unsent; + + /* If the TF_ACK_NOW flag is set and no data will be sent (either + * because the ->unsent queue is empty or because the window does + * not allow it), construct an empty ACK segment and send it. + * + * If data is to be sent, we will just piggyback the ACK (see below). + */ + if (pcb->flags & TF_ACK_NOW && + (seg == NULL || + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { + return tcp_send_empty_ack(pcb); + } + + /* useg should point to last segment on unacked queue */ + useg = pcb->unacked; + if (useg != NULL) { + for (; useg->next != NULL; useg = useg->next); + } + + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + if (netif == NULL) { + return ERR_RTE; + } + + /* If we don't have a local IP address, we get one from netif */ + if (ip_addr_isany(&pcb->local_ip)) { + const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); + if (local_ip == NULL) { + return ERR_RTE; + } + ip_addr_copy(pcb->local_ip, *local_ip); + } + +#if TCP_OUTPUT_DEBUG + if (seg == NULL) { + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: nothing to send (%p)\n", + (void*)pcb->unsent)); + } +#endif /* TCP_OUTPUT_DEBUG */ +#if TCP_CWND_DEBUG + if (seg == NULL) { + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F + ", cwnd %"TCPWNDSIZE_F", wnd %"U32_F + ", seg == NULL, ack %"U32_F"\n", + pcb->snd_wnd, pcb->cwnd, wnd, pcb->lastack)); + } else { + LWIP_DEBUGF(TCP_CWND_DEBUG, + ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F + ", effwnd %"U32_F", seq %"U32_F", ack %"U32_F"\n", + pcb->snd_wnd, pcb->cwnd, wnd, + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, + lwip_ntohl(seg->tcphdr->seqno), pcb->lastack)); + } +#endif /* TCP_CWND_DEBUG */ + /* Check if we need to start the persistent timer when the next unsent segment + * does not fit within the remaining send window and RTO timer is not running (we + * have no in-flight data). A traditional approach would fill the remaining window + * with part of the unsent segment (which will engage zero-window probing upon + * reception of the zero window update from the receiver). This ensures the + * subsequent window update is reliably received. With the goal of being lightweight, + * we avoid splitting the unsent segment and treat the window as already zero. + */ + if (seg != NULL && + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd && + wnd > 0 && wnd == pcb->snd_wnd && pcb->unacked == NULL) { + /* Start the persist timer */ + if (pcb->persist_backoff == 0) { + pcb->persist_cnt = 0; + pcb->persist_backoff = 1; + } + goto output_done; + } + /* data available and window allows it to be sent? */ + while (seg != NULL && + lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { + LWIP_ASSERT("RST not expected here!", + (TCPH_FLAGS(seg->tcphdr) & TCP_RST) == 0); + /* Stop sending if the nagle algorithm would prevent it + * Don't stop: + * - if tcp_write had a memory error before (prevent delayed ACK timeout) or + * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - + * either seg->next != NULL or pcb->unacked == NULL; + * RST is no sent using tcp_write/tcp_output. + */ + if ((tcp_do_output_nagle(pcb) == 0) && + ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { + break; + } +#if TCP_CWND_DEBUG + LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"TCPWNDSIZE_F", cwnd %"TCPWNDSIZE_F", wnd %"U32_F", effwnd %"U32_F", seq %"U32_F", ack %"U32_F", i %"S16_F"\n", + pcb->snd_wnd, pcb->cwnd, wnd, + lwip_ntohl(seg->tcphdr->seqno) + seg->len - + pcb->lastack, + lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); + ++i; +#endif /* TCP_CWND_DEBUG */ + + if (pcb->state != SYN_SENT) { + TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); + } + +#if TCP_OVERSIZE_DBGCHECK + seg->oversize_left = 0; +#endif /* TCP_OVERSIZE_DBGCHECK */ + err = tcp_output_segment(seg, pcb, netif); + if (err != ERR_OK) { + /* segment could not be sent, for whatever reason */ + pcb->flags |= TF_NAGLEMEMERR; + return err; + } + pcb->unsent = seg->next; + if (pcb->state != SYN_SENT) { + pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); + } + snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); + if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { + pcb->snd_nxt = snd_nxt; + } + /* put segment on unacknowledged list if length > 0 */ + if (TCP_TCPLEN(seg) > 0) { + seg->next = NULL; + /* unacked list is empty? */ + if (pcb->unacked == NULL) { + pcb->unacked = seg; + useg = seg; + /* unacked list is not empty? */ + } else { + /* In the case of fast retransmit, the packet should not go to the tail + * of the unacked queue, but rather somewhere before it. We need to check for + * this case. -STJ Jul 27, 2004 */ + if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) { + /* add segment to before tail of unacked list, keeping the list sorted */ + struct tcp_seg **cur_seg = &(pcb->unacked); + while (*cur_seg && + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + cur_seg = &((*cur_seg)->next ); + } + seg->next = (*cur_seg); + (*cur_seg) = seg; + } else { + /* add segment to tail of unacked list */ + useg->next = seg; + useg = useg->next; + } + } + /* do not queue empty segments on the unacked list */ + } else { + tcp_seg_free(seg); + } + seg = pcb->unsent; + } +output_done: +#if TCP_OVERSIZE + if (pcb->unsent == NULL) { + /* last unsent has been removed, reset unsent_oversize */ + pcb->unsent_oversize = 0; + } +#endif /* TCP_OVERSIZE */ + + pcb->flags &= ~TF_NAGLEMEMERR; + return ERR_OK; +} + +/** + * Called by tcp_output() to actually send a TCP segment over IP. + * + * @param seg the tcp_seg to send + * @param pcb the tcp_pcb for the TCP connection used to send the segment + * @param netif the netif used to send the segment + */ +static err_t +tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb, struct netif *netif) +{ + err_t err; + u16_t len; + u32_t *opts; + + if (seg->p->ref != 1) { + /* This can happen if the pbuf of this segment is still referenced by the + netif driver due to deferred transmission. Since this function modifies + p->len, we must not continue in this case. */ + return ERR_OK; + } + + /* The TCP header has already been constructed, but the ackno and + wnd fields remain. */ + seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); + + /* advertise our receive window size in this TCP segment */ +#if LWIP_WND_SCALE + if (seg->flags & TF_SEG_OPTS_WND_SCALE) { + /* The Window field in a SYN segment itself (the only type where we send + the window scale option) is never scaled. */ + seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(pcb->rcv_ann_wnd)); + } else +#endif /* LWIP_WND_SCALE */ + { + seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); + } + + pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; + + /* Add any requested options. NB MSS option is only set on SYN + packets, so ignore it here */ + /* cast through void* to get rid of alignment warnings */ + opts = (u32_t *)(void *)(seg->tcphdr + 1); + if (seg->flags & TF_SEG_OPTS_MSS) { + u16_t mss; +#if TCP_CALCULATE_EFF_SEND_MSS + mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip); +#else /* TCP_CALCULATE_EFF_SEND_MSS */ + mss = TCP_MSS; +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + *opts = TCP_BUILD_MSS_OPTION(mss); + opts += 1; + } +#if LWIP_TCP_TIMESTAMPS + pcb->ts_lastacksent = pcb->rcv_nxt; + + if (seg->flags & TF_SEG_OPTS_TS) { + tcp_build_timestamp_option(pcb, opts); + opts += 3; + } +#endif +#if LWIP_WND_SCALE + if (seg->flags & TF_SEG_OPTS_WND_SCALE) { + tcp_build_wnd_scale_option(opts); + opts += 1; + } +#endif + + /* Set retransmission timer running if it is not currently enabled + This must be set before checking the route. */ + if (pcb->rtime < 0) { + pcb->rtime = 0; + } + + if (pcb->rttest == 0) { + pcb->rttest = tcp_ticks; + pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); + + LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_output_segment: rtseq %"U32_F"\n", pcb->rtseq)); + } + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", + lwip_htonl(seg->tcphdr->seqno), lwip_htonl(seg->tcphdr->seqno) + + seg->len)); + + len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); + if (len == 0) { + /** Exclude retransmitted segments from this count. */ + MIB2_STATS_INC(mib2.tcpoutsegs); + } + + seg->p->len -= len; + seg->p->tot_len -= len; + + seg->p->payload = seg->tcphdr; + + seg->tcphdr->chksum = 0; +#if CHECKSUM_GEN_TCP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { +#if TCP_CHECKSUM_ON_COPY + u32_t acc; +#if TCP_CHECKSUM_ON_COPY_SANITY_CHECK + u16_t chksum_slow = ip_chksum_pseudo(seg->p, IP_PROTO_TCP, + seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); +#endif /* TCP_CHECKSUM_ON_COPY_SANITY_CHECK */ + if ((seg->flags & TF_SEG_DATA_CHECKSUMMED) == 0) { + LWIP_ASSERT("data included but not checksummed", + seg->p->tot_len == (TCPH_HDRLEN(seg->tcphdr) * 4)); + } + + /* rebuild TCP header checksum (TCP header changes for retransmissions!) */ + acc = ip_chksum_pseudo_partial(seg->p, IP_PROTO_TCP, + seg->p->tot_len, TCPH_HDRLEN(seg->tcphdr) * 4, &pcb->local_ip, &pcb->remote_ip); + /* add payload checksum */ + if (seg->chksum_swapped) { + seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); + seg->chksum_swapped = 0; + } + acc += (u16_t)~(seg->chksum); + seg->tcphdr->chksum = FOLD_U32T(acc); +#if TCP_CHECKSUM_ON_COPY_SANITY_CHECK + if (chksum_slow != seg->tcphdr->chksum) { + TCP_CHECKSUM_ON_COPY_SANITY_CHECK_FAIL( + ("tcp_output_segment: calculated checksum is %"X16_F" instead of %"X16_F"\n", + seg->tcphdr->chksum, chksum_slow)); + seg->tcphdr->chksum = chksum_slow; + } +#endif /* TCP_CHECKSUM_ON_COPY_SANITY_CHECK */ +#else /* TCP_CHECKSUM_ON_COPY */ + seg->tcphdr->chksum = ip_chksum_pseudo(seg->p, IP_PROTO_TCP, + seg->p->tot_len, &pcb->local_ip, &pcb->remote_ip); +#endif /* TCP_CHECKSUM_ON_COPY */ + } +#endif /* CHECKSUM_GEN_TCP */ + TCP_STATS_INC(tcp.xmit); + + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, + pcb->tos, IP_PROTO_TCP, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + return err; +} + +/** + * Send a TCP RESET packet (empty segment with RST flag set) either to + * abort a connection or to show that there is no matching local connection + * for a received segment. + * + * Called by tcp_abort() (to abort a local connection), tcp_input() (if no + * matching local pcb was found), tcp_listen_input() (if incoming segment + * has ACK flag set) and tcp_process() (received segment in the wrong state) + * + * Since a RST segment is in most cases not sent for an active connection, + * tcp_rst() has a number of arguments that are taken from a tcp_pcb for + * most other segment output functions. + * + * @param seqno the sequence number to use for the outgoing segment + * @param ackno the acknowledge number to use for the outgoing segment + * @param local_ip the local IP address to send the segment from + * @param remote_ip the remote IP address to send the segment to + * @param local_port the local TCP port to send the segment from + * @param remote_port the remote TCP port to send the segment to + */ +void +tcp_rst(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) +{ + struct pbuf *p; + struct tcp_hdr *tcphdr; + struct netif *netif; + p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); + if (p == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); + return; + } + LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", + (p->len >= sizeof(struct tcp_hdr))); + + tcphdr = (struct tcp_hdr *)p->payload; + tcphdr->src = lwip_htons(local_port); + tcphdr->dest = lwip_htons(remote_port); + tcphdr->seqno = lwip_htonl(seqno); + tcphdr->ackno = lwip_htonl(ackno); + TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); +#if LWIP_WND_SCALE + tcphdr->wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); +#else + tcphdr->wnd = PP_HTONS(TCP_WND); +#endif + tcphdr->chksum = 0; + tcphdr->urgp = 0; + + TCP_STATS_INC(tcp.xmit); + MIB2_STATS_INC(mib2.tcpoutrsts); + + netif = ip_route(local_ip, remote_ip); + if (netif != NULL) { +#if CHECKSUM_GEN_TCP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { + tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + local_ip, remote_ip); + } +#endif + /* Send output with hardcoded TTL/HL since we have no access to the pcb */ + ip_output_if(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP, netif); + } + pbuf_free(p); + LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); +} + +/** + * Requeue all unacked segments for retransmission + * + * Called by tcp_slowtmr() for slow retransmission. + * + * @param pcb the tcp_pcb for which to re-enqueue all unacked segments + */ +void +tcp_rexmit_rto(struct tcp_pcb *pcb) +{ + struct tcp_seg *seg; + + if (pcb->unacked == NULL) { + return; + } + + /* Move all unacked segments to the head of the unsent queue */ + for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); + /* concatenate unsent queue after unacked queue */ + seg->next = pcb->unsent; +#if TCP_OVERSIZE_DBGCHECK + /* if last unsent changed, we need to update unsent_oversize */ + if (pcb->unsent == NULL) { + pcb->unsent_oversize = seg->oversize_left; + } +#endif /* TCP_OVERSIZE_DBGCHECK */ + /* unsent queue is the concatenated queue (of unacked, unsent) */ + pcb->unsent = pcb->unacked; + /* unacked queue is now empty */ + pcb->unacked = NULL; + + /* increment number of retransmissions */ + if (pcb->nrtx < 0xFF) { + ++pcb->nrtx; + } + + /* Don't take any RTT measurements after retransmitting. */ + pcb->rttest = 0; + + /* Do the actual retransmission */ + tcp_output(pcb); +} + +/** + * Requeue the first unacked segment for retransmission + * + * Called by tcp_receive() for fast retransmit. + * + * @param pcb the tcp_pcb for which to retransmit the first unacked segment + */ +void +tcp_rexmit(struct tcp_pcb *pcb) +{ + struct tcp_seg *seg; + struct tcp_seg **cur_seg; + + if (pcb->unacked == NULL) { + return; + } + + /* Move the first unacked segment to the unsent queue */ + /* Keep the unsent queue sorted. */ + seg = pcb->unacked; + pcb->unacked = seg->next; + + cur_seg = &(pcb->unsent); + while (*cur_seg && + TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { + cur_seg = &((*cur_seg)->next ); + } + seg->next = *cur_seg; + *cur_seg = seg; +#if TCP_OVERSIZE + if (seg->next == NULL) { + /* the retransmitted segment is last in unsent, so reset unsent_oversize */ + pcb->unsent_oversize = 0; + } +#endif /* TCP_OVERSIZE */ + + if (pcb->nrtx < 0xFF) { + ++pcb->nrtx; + } + + /* Don't take any rtt measurements after retransmitting. */ + pcb->rttest = 0; + + /* Do the actual retransmission. */ + MIB2_STATS_INC(mib2.tcpretranssegs); + /* No need to call tcp_output: we are always called from tcp_input() + and thus tcp_output directly returns. */ +} + + +/** + * Handle retransmission after three dupacks received + * + * @param pcb the tcp_pcb for which to retransmit the first unacked segment + */ +void +tcp_rexmit_fast(struct tcp_pcb *pcb) +{ + if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { + /* This is fast retransmit. Retransmit the first unacked segment. */ + LWIP_DEBUGF(TCP_FR_DEBUG, + ("tcp_receive: dupacks %"U16_F" (%"U32_F + "), fast retransmit %"U32_F"\n", + (u16_t)pcb->dupacks, pcb->lastack, + lwip_ntohl(pcb->unacked->tcphdr->seqno))); + tcp_rexmit(pcb); + + /* Set ssthresh to half of the minimum of the current + * cwnd and the advertised window */ + pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2; + + /* The minimum value for ssthresh should be 2 MSS */ + if (pcb->ssthresh < (2U * pcb->mss)) { + LWIP_DEBUGF(TCP_FR_DEBUG, + ("tcp_receive: The minimum value for ssthresh %"TCPWNDSIZE_F + " should be min 2 mss %"U16_F"...\n", + pcb->ssthresh, (u16_t)(2*pcb->mss))); + pcb->ssthresh = 2*pcb->mss; + } + + pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; + pcb->flags |= TF_INFR; + + /* Reset the retransmission timer to prevent immediate rto retransmissions */ + pcb->rtime = 0; + } +} + + +/** + * Send keepalive packets to keep a connection active although + * no data is sent over it. + * + * Called by tcp_slowtmr() + * + * @param pcb the tcp_pcb for which to send a keepalive packet + */ +err_t +tcp_keepalive(struct tcp_pcb *pcb) +{ + err_t err; + struct pbuf *p; + struct netif *netif; + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: sending KEEPALIVE probe to ")); + ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); + 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, 0, 0, lwip_htonl(pcb->snd_nxt - 1)); + if (p == NULL) { + LWIP_DEBUGF(TCP_DEBUG, + ("tcp_keepalive: could not allocate memory for pbuf\n")); + return ERR_MEM; + } + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + if (netif == NULL) { + err = ERR_RTE; + } else { +#if CHECKSUM_GEN_TCP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { + struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload; + tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + &pcb->local_ip, &pcb->remote_ip); + } +#endif /* CHECKSUM_GEN_TCP */ + TCP_STATS_INC(tcp.xmit); + + /* Send output to IP */ + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + } + pbuf_free(p); + + 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; +} + + +/** + * Send persist timer zero-window probes to keep a connection active + * when a window update is lost. + * + * Called by tcp_slowtmr() + * + * @param pcb the tcp_pcb for which to send a zero-window probe packet + */ +err_t +tcp_zero_window_probe(struct tcp_pcb *pcb) +{ + err_t err; + struct pbuf *p; + struct tcp_hdr *tcphdr; + struct tcp_seg *seg; + u16_t len; + u8_t is_fin; + u32_t snd_nxt; + struct netif *netif; + + LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: sending ZERO WINDOW probe to ")); + ip_addr_debug_print(TCP_DEBUG, &pcb->remote_ip); + LWIP_DEBUGF(TCP_DEBUG, ("\n")); + + LWIP_DEBUGF(TCP_DEBUG, + ("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)); + + seg = pcb->unacked; + + if (seg == NULL) { + seg = pcb->unsent; + } + if (seg == NULL) { + /* nothing to send, zero window probe not needed */ + return ERR_OK; + } + + is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); + /* we want to send one seqno: either FIN or data (no options) */ + len = is_fin ? 0 : 1; + + p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); + if (p == NULL) { + LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); + return ERR_MEM; + } + tcphdr = (struct tcp_hdr *)p->payload; + + if (is_fin) { + /* FIN segment, no data */ + TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); + } else { + /* Data segment, copy in one byte from the head of the unacked queue */ + char *d = ((char *)p->payload + TCP_HLEN); + /* Depending on whether the segment has already been sent (unacked) or not + (unsent), seg->p->payload points to the IP header or TCP header. + 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; + if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { + pcb->snd_nxt = snd_nxt; + } + + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); + if (netif == NULL) { + err = ERR_RTE; + } else { +#if CHECKSUM_GEN_TCP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { + tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, + &pcb->local_ip, &pcb->remote_ip); + } +#endif + TCP_STATS_INC(tcp.xmit); + + /* Send output to IP */ + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, + 0, IP_PROTO_TCP, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + } + + pbuf_free(p); + + 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; +} +#endif /* LWIP_TCP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/timeouts.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/timeouts.c index 8bf209a..5c9b29d 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/timeouts.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/timeouts.c @@ -1,433 +1,433 @@ -/** - * @file - * Stack-internal timers implementation. - * This file includes timer callbacks for stack-internal timers as well as - * functions to set up or stop timers and check for expired timers. - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * Simon Goldschmidt - * - */ - -#include "lwip/opt.h" - -#include "lwip/timeouts.h" -#include "lwip/priv/tcp_priv.h" - -#include "lwip/def.h" -#include "lwip/memp.h" -#include "lwip/priv/tcpip_priv.h" - -#include "lwip/ip4_frag.h" -#include "lwip/etharp.h" -#include "lwip/dhcp.h" -#include "lwip/autoip.h" -#include "lwip/igmp.h" -#include "lwip/dns.h" -#include "lwip/nd6.h" -#include "lwip/ip6_frag.h" -#include "lwip/mld6.h" -#include "lwip/sys.h" -#include "lwip/pbuf.h" - -#if LWIP_DEBUG_TIMERNAMES -#define HANDLER(x) x, #x -#else /* LWIP_DEBUG_TIMERNAMES */ -#define HANDLER(x) x -#endif /* LWIP_DEBUG_TIMERNAMES */ - -/** This array contains all stack-internal cyclic timers. To get the number of - * timers, use LWIP_ARRAYSIZE() */ -const struct lwip_cyclic_timer lwip_cyclic_timers[] = { -#if LWIP_TCP - /* The TCP timer is a special case: it does not have to run always and - is triggered to start from TCP using tcp_timer_needed() */ - {TCP_TMR_INTERVAL, HANDLER(tcp_tmr)}, -#endif /* LWIP_TCP */ -#if LWIP_IPV4 -#if IP_REASSEMBLY - {IP_TMR_INTERVAL, HANDLER(ip_reass_tmr)}, -#endif /* IP_REASSEMBLY */ -#if LWIP_ARP - {ARP_TMR_INTERVAL, HANDLER(etharp_tmr)}, -#endif /* LWIP_ARP */ -#if LWIP_DHCP - {DHCP_COARSE_TIMER_MSECS, HANDLER(dhcp_coarse_tmr)}, - {DHCP_FINE_TIMER_MSECS, HANDLER(dhcp_fine_tmr)}, -#endif /* LWIP_DHCP */ -#if LWIP_AUTOIP - {AUTOIP_TMR_INTERVAL, HANDLER(autoip_tmr)}, -#endif /* LWIP_AUTOIP */ -#if LWIP_IGMP - {IGMP_TMR_INTERVAL, HANDLER(igmp_tmr)}, -#endif /* LWIP_IGMP */ -#endif /* LWIP_IPV4 */ -#if LWIP_DNS - {DNS_TMR_INTERVAL, HANDLER(dns_tmr)}, -#endif /* LWIP_DNS */ -#if LWIP_IPV6 - {ND6_TMR_INTERVAL, HANDLER(nd6_tmr)}, -#if LWIP_IPV6_REASS - {IP6_REASS_TMR_INTERVAL, HANDLER(ip6_reass_tmr)}, -#endif /* LWIP_IPV6_REASS */ -#if LWIP_IPV6_MLD - {MLD6_TMR_INTERVAL, HANDLER(mld6_tmr)}, -#endif /* LWIP_IPV6_MLD */ -#endif /* LWIP_IPV6 */ -}; - -#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM - -/** The one and only timeout list */ -static struct sys_timeo *next_timeout; -static u32_t timeouts_last_time; - -#if LWIP_TCP -/** global variable that shows if the tcp timer is currently scheduled or not */ -static int tcpip_tcp_timer_active; - -/** - * Timer callback function that calls tcp_tmr() and reschedules itself. - * - * @param arg unused argument - */ -static void -tcpip_tcp_timer(void *arg) -{ - LWIP_UNUSED_ARG(arg); - - /* call TCP timer handler */ - tcp_tmr(); - /* timer still needed? */ - if (tcp_active_pcbs || tcp_tw_pcbs) { - /* restart timer */ - sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); - } else { - /* disable timer */ - tcpip_tcp_timer_active = 0; - } -} - -/** - * Called from TCP_REG when registering a new PCB: - * the reason is to have the TCP timer only running when - * there are active (or time-wait) PCBs. - */ -void -tcp_timer_needed(void) -{ - /* timer is off but needed again? */ - if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { - /* enable and start timer */ - tcpip_tcp_timer_active = 1; - sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); - } -} -#endif /* LWIP_TCP */ - -/** - * Timer callback function that calls mld6_tmr() and reschedules itself. - * - * @param arg unused argument - */ -static void -cyclic_timer(void *arg) -{ - 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(); - sys_timeout(cyclic->interval_ms, cyclic_timer, arg); -} - -/** Initialize this module */ -void sys_timeouts_init(void) -{ - size_t i; - /* tcp_tmr() at index 0 is started on demand */ - for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { - /* we have to cast via size_t to get rid of const warning - (this is OK as cyclic_timer() casts back to const* */ - sys_timeout(lwip_cyclic_timers[i].interval_ms, cyclic_timer, LWIP_CONST_CAST(void*, &lwip_cyclic_timers[i])); - } - - /* Initialise timestamp for sys_check_timeouts */ - timeouts_last_time = sys_now(); -} - -/** - * Create a one-shot timer (aka timeout). Timeouts are processed in the - * following cases: - * - while waiting for a message using sys_timeouts_mbox_fetch() - * - by calling sys_check_timeouts() (NO_SYS==1 only) - * - * @param msecs time in milliseconds after that the timer should expire - * @param handler callback function to call when msecs have elapsed - * @param arg argument to pass to the callback function - */ -#if LWIP_DEBUG_TIMERNAMES -void -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 */ -{ - struct sys_timeo *timeout, *t; - u32_t now, diff; - - timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); - if (timeout == NULL) { - LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); - return; - } - - now = sys_now(); - if (next_timeout == NULL) { - diff = 0; - timeouts_last_time = now; - } else { - diff = now - timeouts_last_time; - } - - timeout->next = NULL; - timeout->h = handler; - timeout->arg = arg; - timeout->time = msecs + diff; -#if LWIP_DEBUG_TIMERNAMES - timeout->handler_name = handler_name; - LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", - (void *)timeout, msecs, handler_name, (void *)arg)); -#endif /* LWIP_DEBUG_TIMERNAMES */ - - if (next_timeout == NULL) { - next_timeout = timeout; - return; - } - - if (next_timeout->time > msecs) { - next_timeout->time -= msecs; - timeout->next = next_timeout; - next_timeout = timeout; - } else { - for (t = next_timeout; t != NULL; t = t->next) { - timeout->time -= t->time; - if (t->next == NULL || t->next->time > timeout->time) { - if (t->next != NULL) { - t->next->time -= timeout->time; - } else if (timeout->time > msecs) { - /* If this is the case, 'timeouts_last_time' and 'now' differs too much. - This can be due to sys_check_timeouts() not being called at the right - times, but also when stopping in a breakpoint. Anyway, let's assume - this is not wanted, so add the first timer's time instead of 'diff' */ - timeout->time = msecs + next_timeout->time; - } - timeout->next = t->next; - t->next = timeout; - break; - } - } - } -} - -/** - * Go through timeout list (for this task only) and remove the first matching - * entry (subsequent entries remain untouched), even though the timeout has not - * triggered yet. - * - * @param handler callback function that would be called by the timeout - * @param arg callback argument that would be passed to handler -*/ -void -sys_untimeout(sys_timeout_handler handler, void *arg) -{ - struct sys_timeo *prev_t, *t; - - if (next_timeout == NULL) { - return; - } - - for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { - if ((t->h == handler) && (t->arg == arg)) { - /* We have a match */ - /* Unlink from previous in list */ - if (prev_t == NULL) { - next_timeout = t->next; - } else { - prev_t->next = t->next; - } - /* If not the last one, add time of this one back to next */ - if (t->next != NULL) { - t->next->time += t->time; - } - memp_free(MEMP_SYS_TIMEOUT, t); - return; - } - } - return; -} - -/** - * @ingroup lwip_nosys - * Handle timeouts for NO_SYS==1 (i.e. without using - * tcpip_thread/sys_timeouts_mbox_fetch(). Uses sys_now() to call timeout - * handler functions when timeouts expire. - * - * Must be called periodically from your main loop. - */ -#if !NO_SYS && !defined __DOXYGEN__ -static -#endif /* !NO_SYS */ -void -sys_check_timeouts(void) -{ - if (next_timeout) { - struct sys_timeo *tmptimeout; - u32_t diff; - sys_timeout_handler handler; - void *arg; - u8_t had_one; - u32_t now; - - now = sys_now(); - /* this cares for wraparounds */ - diff = now - timeouts_last_time; - do { - PBUF_CHECK_FREE_OOSEQ(); - had_one = 0; - tmptimeout = next_timeout; - if (tmptimeout && (tmptimeout->time <= diff)) { - /* timeout has expired */ - had_one = 1; - timeouts_last_time += tmptimeout->time; - diff -= tmptimeout->time; - next_timeout = tmptimeout->next; - handler = tmptimeout->h; - arg = tmptimeout->arg; -#if LWIP_DEBUG_TIMERNAMES - if (handler != NULL) { - LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s arg=%p\n", - tmptimeout->handler_name, arg)); - } -#endif /* LWIP_DEBUG_TIMERNAMES */ - memp_free(MEMP_SYS_TIMEOUT, tmptimeout); - if (handler != NULL) { -#if !NO_SYS - /* For LWIP_TCPIP_CORE_LOCKING, lock the core before calling the - timeout handler function. */ - LOCK_TCPIP_CORE(); -#endif /* !NO_SYS */ - handler(arg); -#if !NO_SYS - UNLOCK_TCPIP_CORE(); -#endif /* !NO_SYS */ - } - LWIP_TCPIP_THREAD_ALIVE(); - } - /* repeat until all expired timers have been called */ - } while (had_one); - } -} - -/** Set back the timestamp of the last call to sys_check_timeouts() - * This is necessary if sys_check_timeouts() hasn't been called for a long - * time (e.g. while saving energy) to prevent all timer functions of that - * period being called. - */ -void -sys_restart_timeouts(void) -{ - timeouts_last_time = sys_now(); -} - -/** Return the time left before the next timeout is due. If no timeouts are - * enqueued, returns 0xffffffff - */ -#if !NO_SYS -static -#endif /* !NO_SYS */ -u32_t -sys_timeouts_sleeptime(void) -{ - u32_t diff; - if (next_timeout == NULL) { - return 0xffffffff; - } - diff = sys_now() - timeouts_last_time; - if (diff > next_timeout->time) { - return 0; - } else { - return next_timeout->time - diff; - } -} - -#if !NO_SYS - -/** - * Wait (forever) for a message to arrive in an mbox. - * While waiting, timeouts are processed. - * - * @param mbox the mbox to fetch the message from - * @param msg the place to store the message - */ -void -sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) -{ - u32_t sleeptime; - -again: - if (!next_timeout) { - sys_arch_mbox_fetch(mbox, msg, 0); - return; - } - - sleeptime = sys_timeouts_sleeptime(); - if (sleeptime == 0 || sys_arch_mbox_fetch(mbox, msg, sleeptime) == SYS_ARCH_TIMEOUT) { - /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred - before a message could be fetched. */ - sys_check_timeouts(); - /* We try again to fetch a message from the mbox. */ - goto again; - } -} - -#endif /* NO_SYS */ - -#else /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ -/* Satisfy the TCP code which calls this function */ -void -tcp_timer_needed(void) -{ -} -#endif /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ +/** + * @file + * Stack-internal timers implementation. + * This file includes timer callbacks for stack-internal timers as well as + * functions to set up or stop timers and check for expired timers. + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * Simon Goldschmidt + * + */ + +#include "lwip/opt.h" + +#include "lwip/timeouts.h" +#include "lwip/priv/tcp_priv.h" + +#include "lwip/def.h" +#include "lwip/memp.h" +#include "lwip/priv/tcpip_priv.h" + +#include "lwip/ip4_frag.h" +#include "lwip/etharp.h" +#include "lwip/dhcp.h" +#include "lwip/autoip.h" +#include "lwip/igmp.h" +#include "lwip/dns.h" +#include "lwip/nd6.h" +#include "lwip/ip6_frag.h" +#include "lwip/mld6.h" +#include "lwip/sys.h" +#include "lwip/pbuf.h" + +#if LWIP_DEBUG_TIMERNAMES +#define HANDLER(x) x, #x +#else /* LWIP_DEBUG_TIMERNAMES */ +#define HANDLER(x) x +#endif /* LWIP_DEBUG_TIMERNAMES */ + +/** This array contains all stack-internal cyclic timers. To get the number of + * timers, use LWIP_ARRAYSIZE() */ +const struct lwip_cyclic_timer lwip_cyclic_timers[] = { +#if LWIP_TCP + /* The TCP timer is a special case: it does not have to run always and + is triggered to start from TCP using tcp_timer_needed() */ + {TCP_TMR_INTERVAL, HANDLER(tcp_tmr)}, +#endif /* LWIP_TCP */ +#if LWIP_IPV4 +#if IP_REASSEMBLY + {IP_TMR_INTERVAL, HANDLER(ip_reass_tmr)}, +#endif /* IP_REASSEMBLY */ +#if LWIP_ARP + {ARP_TMR_INTERVAL, HANDLER(etharp_tmr)}, +#endif /* LWIP_ARP */ +#if LWIP_DHCP + {DHCP_COARSE_TIMER_MSECS, HANDLER(dhcp_coarse_tmr)}, + {DHCP_FINE_TIMER_MSECS, HANDLER(dhcp_fine_tmr)}, +#endif /* LWIP_DHCP */ +#if LWIP_AUTOIP + {AUTOIP_TMR_INTERVAL, HANDLER(autoip_tmr)}, +#endif /* LWIP_AUTOIP */ +#if LWIP_IGMP + {IGMP_TMR_INTERVAL, HANDLER(igmp_tmr)}, +#endif /* LWIP_IGMP */ +#endif /* LWIP_IPV4 */ +#if LWIP_DNS + {DNS_TMR_INTERVAL, HANDLER(dns_tmr)}, +#endif /* LWIP_DNS */ +#if LWIP_IPV6 + {ND6_TMR_INTERVAL, HANDLER(nd6_tmr)}, +#if LWIP_IPV6_REASS + {IP6_REASS_TMR_INTERVAL, HANDLER(ip6_reass_tmr)}, +#endif /* LWIP_IPV6_REASS */ +#if LWIP_IPV6_MLD + {MLD6_TMR_INTERVAL, HANDLER(mld6_tmr)}, +#endif /* LWIP_IPV6_MLD */ +#endif /* LWIP_IPV6 */ +}; + +#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM + +/** The one and only timeout list */ +static struct sys_timeo *next_timeout; +static u32_t timeouts_last_time; + +#if LWIP_TCP +/** global variable that shows if the tcp timer is currently scheduled or not */ +static int tcpip_tcp_timer_active; + +/** + * Timer callback function that calls tcp_tmr() and reschedules itself. + * + * @param arg unused argument + */ +static void +tcpip_tcp_timer(void *arg) +{ + LWIP_UNUSED_ARG(arg); + + /* call TCP timer handler */ + tcp_tmr(); + /* timer still needed? */ + if (tcp_active_pcbs || tcp_tw_pcbs) { + /* restart timer */ + sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); + } else { + /* disable timer */ + tcpip_tcp_timer_active = 0; + } +} + +/** + * Called from TCP_REG when registering a new PCB: + * the reason is to have the TCP timer only running when + * there are active (or time-wait) PCBs. + */ +void +tcp_timer_needed(void) +{ + /* timer is off but needed again? */ + if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { + /* enable and start timer */ + tcpip_tcp_timer_active = 1; + sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); + } +} +#endif /* LWIP_TCP */ + +/** + * Timer callback function that calls mld6_tmr() and reschedules itself. + * + * @param arg unused argument + */ +static void +cyclic_timer(void *arg) +{ + 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(); + sys_timeout(cyclic->interval_ms, cyclic_timer, arg); +} + +/** Initialize this module */ +void sys_timeouts_init(void) +{ + size_t i; + /* tcp_tmr() at index 0 is started on demand */ + for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { + /* we have to cast via size_t to get rid of const warning + (this is OK as cyclic_timer() casts back to const* */ + sys_timeout(lwip_cyclic_timers[i].interval_ms, cyclic_timer, LWIP_CONST_CAST(void*, &lwip_cyclic_timers[i])); + } + + /* Initialise timestamp for sys_check_timeouts */ + timeouts_last_time = sys_now(); +} + +/** + * Create a one-shot timer (aka timeout). Timeouts are processed in the + * following cases: + * - while waiting for a message using sys_timeouts_mbox_fetch() + * - by calling sys_check_timeouts() (NO_SYS==1 only) + * + * @param msecs time in milliseconds after that the timer should expire + * @param handler callback function to call when msecs have elapsed + * @param arg argument to pass to the callback function + */ +#if LWIP_DEBUG_TIMERNAMES +void +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 */ +{ + struct sys_timeo *timeout, *t; + u32_t now, diff; + + timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); + if (timeout == NULL) { + LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); + return; + } + + now = sys_now(); + if (next_timeout == NULL) { + diff = 0; + timeouts_last_time = now; + } else { + diff = now - timeouts_last_time; + } + + timeout->next = NULL; + timeout->h = handler; + timeout->arg = arg; + timeout->time = msecs + diff; +#if LWIP_DEBUG_TIMERNAMES + timeout->handler_name = handler_name; + LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", + (void *)timeout, msecs, handler_name, (void *)arg)); +#endif /* LWIP_DEBUG_TIMERNAMES */ + + if (next_timeout == NULL) { + next_timeout = timeout; + return; + } + + if (next_timeout->time > msecs) { + next_timeout->time -= msecs; + timeout->next = next_timeout; + next_timeout = timeout; + } else { + for (t = next_timeout; t != NULL; t = t->next) { + timeout->time -= t->time; + if (t->next == NULL || t->next->time > timeout->time) { + if (t->next != NULL) { + t->next->time -= timeout->time; + } else if (timeout->time > msecs) { + /* If this is the case, 'timeouts_last_time' and 'now' differs too much. + This can be due to sys_check_timeouts() not being called at the right + times, but also when stopping in a breakpoint. Anyway, let's assume + this is not wanted, so add the first timer's time instead of 'diff' */ + timeout->time = msecs + next_timeout->time; + } + timeout->next = t->next; + t->next = timeout; + break; + } + } + } +} + +/** + * Go through timeout list (for this task only) and remove the first matching + * entry (subsequent entries remain untouched), even though the timeout has not + * triggered yet. + * + * @param handler callback function that would be called by the timeout + * @param arg callback argument that would be passed to handler +*/ +void +sys_untimeout(sys_timeout_handler handler, void *arg) +{ + struct sys_timeo *prev_t, *t; + + if (next_timeout == NULL) { + return; + } + + for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { + if ((t->h == handler) && (t->arg == arg)) { + /* We have a match */ + /* Unlink from previous in list */ + if (prev_t == NULL) { + next_timeout = t->next; + } else { + prev_t->next = t->next; + } + /* If not the last one, add time of this one back to next */ + if (t->next != NULL) { + t->next->time += t->time; + } + memp_free(MEMP_SYS_TIMEOUT, t); + return; + } + } + return; +} + +/** + * @ingroup lwip_nosys + * Handle timeouts for NO_SYS==1 (i.e. without using + * tcpip_thread/sys_timeouts_mbox_fetch(). Uses sys_now() to call timeout + * handler functions when timeouts expire. + * + * Must be called periodically from your main loop. + */ +#if !NO_SYS && !defined __DOXYGEN__ +static +#endif /* !NO_SYS */ +void +sys_check_timeouts(void) +{ + if (next_timeout) { + struct sys_timeo *tmptimeout; + u32_t diff; + sys_timeout_handler handler; + void *arg; + u8_t had_one; + u32_t now; + + now = sys_now(); + /* this cares for wraparounds */ + diff = now - timeouts_last_time; + do { + PBUF_CHECK_FREE_OOSEQ(); + had_one = 0; + tmptimeout = next_timeout; + if (tmptimeout && (tmptimeout->time <= diff)) { + /* timeout has expired */ + had_one = 1; + timeouts_last_time += tmptimeout->time; + diff -= tmptimeout->time; + next_timeout = tmptimeout->next; + handler = tmptimeout->h; + arg = tmptimeout->arg; +#if LWIP_DEBUG_TIMERNAMES + if (handler != NULL) { + LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s arg=%p\n", + tmptimeout->handler_name, arg)); + } +#endif /* LWIP_DEBUG_TIMERNAMES */ + memp_free(MEMP_SYS_TIMEOUT, tmptimeout); + if (handler != NULL) { +#if !NO_SYS + /* For LWIP_TCPIP_CORE_LOCKING, lock the core before calling the + timeout handler function. */ + LOCK_TCPIP_CORE(); +#endif /* !NO_SYS */ + handler(arg); +#if !NO_SYS + UNLOCK_TCPIP_CORE(); +#endif /* !NO_SYS */ + } + LWIP_TCPIP_THREAD_ALIVE(); + } + /* repeat until all expired timers have been called */ + } while (had_one); + } +} + +/** Set back the timestamp of the last call to sys_check_timeouts() + * This is necessary if sys_check_timeouts() hasn't been called for a long + * time (e.g. while saving energy) to prevent all timer functions of that + * period being called. + */ +void +sys_restart_timeouts(void) +{ + timeouts_last_time = sys_now(); +} + +/** Return the time left before the next timeout is due. If no timeouts are + * enqueued, returns 0xffffffff + */ +#if !NO_SYS +static +#endif /* !NO_SYS */ +u32_t +sys_timeouts_sleeptime(void) +{ + u32_t diff; + if (next_timeout == NULL) { + return 0xffffffff; + } + diff = sys_now() - timeouts_last_time; + if (diff > next_timeout->time) { + return 0; + } else { + return next_timeout->time - diff; + } +} + +#if !NO_SYS + +/** + * Wait (forever) for a message to arrive in an mbox. + * While waiting, timeouts are processed. + * + * @param mbox the mbox to fetch the message from + * @param msg the place to store the message + */ +void +sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) +{ + u32_t sleeptime; + +again: + if (!next_timeout) { + sys_arch_mbox_fetch(mbox, msg, 0); + return; + } + + sleeptime = sys_timeouts_sleeptime(); + if (sleeptime == 0 || sys_arch_mbox_fetch(mbox, msg, sleeptime) == SYS_ARCH_TIMEOUT) { + /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred + before a message could be fetched. */ + sys_check_timeouts(); + /* We try again to fetch a message from the mbox. */ + goto again; + } +} + +#endif /* NO_SYS */ + +#else /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ +/* Satisfy the TCP code which calls this function */ +void +tcp_timer_needed(void) +{ +} +#endif /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/udp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/udp.c index ce2e3d2..0059259 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/udp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/core/udp.c @@ -1,1191 +1,1191 @@ -/** - * @file - * User Datagram Protocol module\n - * The code for the User Datagram Protocol UDP & UDPLite (RFC 3828).\n - * See also @ref udp_raw - * - * @defgroup udp_raw UDP - * @ingroup callbackstyle_api - * User Datagram Protocol module\n - * @see @ref raw_api and @ref netconn - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -/* @todo Check the use of '(struct udp_pcb).chksum_len_rx'! - */ - -#include "lwip/opt.h" - -#if LWIP_UDP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/udp.h" -#include "lwip/def.h" -#include "lwip/memp.h" -#include "lwip/inet_chksum.h" -#include "lwip/ip_addr.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/netif.h" -#include "lwip/icmp.h" -#include "lwip/icmp6.h" -#include "lwip/stats.h" -#include "lwip/snmp.h" -#include "lwip/dhcp.h" - -#include - -#ifndef UDP_LOCAL_PORT_RANGE_START -/* From http://www.iana.org/assignments/port-numbers: - "The Dynamic and/or Private Ports are those from 49152 through 65535" */ -#define UDP_LOCAL_PORT_RANGE_START 0xc000 -#define UDP_LOCAL_PORT_RANGE_END 0xffff -#define UDP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & ~UDP_LOCAL_PORT_RANGE_START) + UDP_LOCAL_PORT_RANGE_START)) -#endif - -/* last local UDP port */ -static u16_t udp_port = UDP_LOCAL_PORT_RANGE_START; - -/* The list of UDP PCBs */ -/* exported in udp.h (was static) */ -struct udp_pcb *udp_pcbs; - -/** - * Initialize this module. - */ -void -udp_init(void) -{ -#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) - udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); -#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ -} - -/** - * Allocate a new local UDP port. - * - * @return a new (free) local UDP port number - */ -static u16_t -udp_new_port(void) -{ - u16_t n = 0; - struct udp_pcb *pcb; - -again: - if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { - udp_port = UDP_LOCAL_PORT_RANGE_START; - } - /* Check all PCBs. */ - for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { - if (pcb->local_port == udp_port) { - if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { - return 0; - } - goto again; - } - } - return udp_port; -} - -/** Common code to see if the current input packet matches the pcb - * (current input packet is accessed via ip(4/6)_current_* macros) - * - * @param pcb pcb to check - * @param inp network interface on which the datagram was received (only used for IPv4) - * @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) -{ - LWIP_UNUSED_ARG(inp); /* in IPv6 only case */ - LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ - - /* Dual-stack: PCBs listening to any IP type also listen to any IP address */ - if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { -#if LWIP_IPV4 && IP_SOF_BROADCAST_RECV - if ((broadcast != 0) && !ip_get_option(pcb, SOF_BROADCAST)) { - return 0; - } -#endif /* LWIP_IPV4 && IP_SOF_BROADCAST_RECV */ - return 1; - } - - /* 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) { -#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)) || - ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || - ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { - return 1; - } - } - } else -#endif /* LWIP_IPV4 */ - /* Handle IPv4 and IPv6: all or exact match */ - if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { - return 1; - } - } - - return 0; -} - -/** - * Process an incoming UDP datagram. - * - * Given an incoming UDP datagram (as a chain of pbufs) this function - * finds a corresponding UDP PCB and hands over the pbuf to the pcbs - * recv function. If no pcb is found or the datagram is incorrect, the - * pbuf is freed. - * - * @param p pbuf to be demultiplexed to a UDP PCB (p->payload pointing to the UDP header) - * @param inp network interface on which the datagram was received. - * - */ -void -udp_input(struct pbuf *p, struct netif *inp) -{ - struct udp_hdr *udphdr; - struct udp_pcb *pcb, *prev; - struct udp_pcb *uncon_pcb; - u16_t src, dest; - u8_t broadcast; - u8_t for_us = 0; - - LWIP_UNUSED_ARG(inp); - - PERF_START; - - UDP_STATS_INC(udp.recv); - - /* Check minimum length (UDP header) */ - if (p->len < UDP_HLEN) { - /* drop short packets */ - LWIP_DEBUGF(UDP_DEBUG, - ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len)); - UDP_STATS_INC(udp.lenerr); - UDP_STATS_INC(udp.drop); - MIB2_STATS_INC(mib2.udpinerrors); - pbuf_free(p); - goto end; - } - - udphdr = (struct udp_hdr *)p->payload; - - /* is broadcast packet ? */ - broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); - - 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); - dest = lwip_ntohs(udphdr->dest); - - udp_debug_print(udphdr); - - /* print the UDP source and destination */ - LWIP_DEBUGF(UDP_DEBUG, ("udp (")); - ip_addr_debug_print(UDP_DEBUG, ip_current_dest_addr()); - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", lwip_ntohs(udphdr->dest))); - ip_addr_debug_print(UDP_DEBUG, ip_current_src_addr()); - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", lwip_ntohs(udphdr->src))); - - pcb = NULL; - prev = NULL; - 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) { - /* print the PCB local and remote address */ - LWIP_DEBUGF(UDP_DEBUG, ("pcb (")); - ip_addr_debug_print(UDP_DEBUG, &pcb->local_ip); - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", pcb->local_port)); - ip_addr_debug_print(UDP_DEBUG, &pcb->remote_ip); - LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port)); - - /* compare PCB local addr+port to UDP destination addr+port */ - if ((pcb->local_port == dest) && - (udp_input_local_match(pcb, inp, broadcast) != 0)) { - if (((pcb->flags & UDP_FLAGS_CONNECTED) == 0) && - ((uncon_pcb == NULL) -#if SO_REUSE - /* prefer specific IPs over cath-all */ - || !ip_addr_isany(&pcb->local_ip) -#endif /* SO_REUSE */ - )) { - /* the first unconnected matching PCB */ - uncon_pcb = pcb; - } - - /* compare PCB remote addr+port to UDP source addr+port */ - if ((pcb->remote_port == src) && - (ip_addr_isany_val(pcb->remote_ip) || - ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { - /* the first fully matching PCB */ - if (prev != NULL) { - /* move the pcb to the front of udp_pcbs so that is - found faster next time */ - prev->next = pcb->next; - pcb->next = udp_pcbs; - udp_pcbs = pcb; - } else { - UDP_STATS_INC(udp.cachehit); - } - break; - } - } - - prev = pcb; - } - /* no fully matching pcb found? then look for an unconnected pcb */ - if (pcb == NULL) { - pcb = uncon_pcb; - } - - /* Check checksum if this is a match or if it was directed at us. */ - if (pcb != NULL) { - for_us = 1; - } else { -#if LWIP_IPV6 - if (ip_current_is_v6()) { - for_us = netif_get_ip6_addr_match(inp, ip6_current_dest_addr()) >= 0; - } -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 - if (!ip_current_is_v6()) { - for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr()); - } -#endif /* LWIP_IPV4 */ - } - - if (for_us) { - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: calculating checksum\n")); -#if CHECKSUM_CHECK_UDP - IF__NETIF_CHECKSUM_ENABLED(inp, CHECKSUM_CHECK_UDP) { -#if LWIP_UDPLITE - if (ip_current_header_proto() == IP_PROTO_UDPLITE) { - /* Do the UDP Lite checksum */ - u16_t chklen = lwip_ntohs(udphdr->len); - if (chklen < sizeof(struct udp_hdr)) { - if (chklen == 0) { - /* For UDP-Lite, checksum length of 0 means checksum - over the complete packet (See RFC 3828 chap. 3.1) */ - chklen = p->tot_len; - } else { - /* At least the UDP-Lite header must be covered by the - checksum! (Again, see RFC 3828 chap. 3.1) */ - goto chkerr; - } - } - if (ip_chksum_pseudo_partial(p, IP_PROTO_UDPLITE, - p->tot_len, chklen, - ip_current_src_addr(), ip_current_dest_addr()) != 0) { - goto chkerr; - } - } else -#endif /* LWIP_UDPLITE */ - { - if (udphdr->chksum != 0) { - if (ip_chksum_pseudo(p, IP_PROTO_UDP, p->tot_len, - ip_current_src_addr(), - ip_current_dest_addr()) != 0) { - goto chkerr; - } - } - } - } -#endif /* CHECKSUM_CHECK_UDP */ - if (pbuf_header(p, -UDP_HLEN)) { - /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); - UDP_STATS_INC(udp.drop); - MIB2_STATS_INC(mib2.udpinerrors); - pbuf_free(p); - goto end; - } - - if (pcb != NULL) { - MIB2_STATS_INC(mib2.udpindatagrams); -#if SO_REUSE && SO_REUSE_RXTOALL - if (ip_get_option(pcb, SOF_REUSEADDR) && - (broadcast || ip_addr_ismulticast(ip_current_dest_addr()))) { - /* pass broadcast- or multicast packets to all multicast pcbs - if SOF_REUSEADDR is set on the first match */ - struct udp_pcb *mpcb; - u8_t p_header_changed = 0; - s16_t hdrs_len = (s16_t)(ip_current_header_tot_len() + UDP_HLEN); - for (mpcb = udp_pcbs; mpcb != NULL; mpcb = mpcb->next) { - if (mpcb != pcb) { - /* compare PCB local addr+port to UDP destination addr+port */ - if ((mpcb->local_port == dest) && - (udp_input_local_match(mpcb, inp, broadcast) != 0)) { - /* pass a copy of the packet to all local matches */ - if (mpcb->recv != NULL) { - struct pbuf *q; - /* for that, move payload to IP header again */ - if (p_header_changed == 0) { - pbuf_header_force(p, hdrs_len); - p_header_changed = 1; - } - q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); - if (q != NULL) { - err_t err = pbuf_copy(q, p); - if (err == ERR_OK) { - /* move payload to UDP data */ - pbuf_header(q, -hdrs_len); - mpcb->recv(mpcb->recv_arg, mpcb, q, ip_current_src_addr(), src); - } - } - } - } - } - } - if (p_header_changed) { - /* and move payload to UDP data again */ - pbuf_header(p, -hdrs_len); - } - } -#endif /* SO_REUSE && SO_REUSE_RXTOALL */ - /* callback */ - if (pcb->recv != NULL) { - /* now the recv function is responsible for freeing p */ - pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); - } else { - /* no recv function registered? then we have to free the pbuf! */ - pbuf_free(p); - goto end; - } - } else { - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: not for us.\n")); - -#if LWIP_ICMP || LWIP_ICMP6 - /* No match was found, send ICMP destination port unreachable unless - destination address was broadcast/multicast. */ - if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { - /* move payload pointer back to ip header */ - pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); - icmp_port_unreach(ip_current_is_v6(), p); - } -#endif /* LWIP_ICMP || LWIP_ICMP6 */ - UDP_STATS_INC(udp.proterr); - UDP_STATS_INC(udp.drop); - MIB2_STATS_INC(mib2.udpnoports); - pbuf_free(p); - } - } else { - pbuf_free(p); - } -end: - PERF_STOP("udp_input"); - return; -#if CHECKSUM_CHECK_UDP -chkerr: - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("udp_input: UDP (or UDP Lite) datagram discarded due to failing checksum\n")); - UDP_STATS_INC(udp.chkerr); - UDP_STATS_INC(udp.drop); - MIB2_STATS_INC(mib2.udpinerrors); - pbuf_free(p); - PERF_STOP("udp_input"); -#endif /* CHECKSUM_CHECK_UDP */ -} - -/** - * @ingroup udp_raw - * Send data using UDP. - * - * @param pcb UDP PCB used to send the data. - * @param p chain of pbuf's to be sent. - * - * The datagram will be sent to the current remote_ip & remote_port - * stored in pcb. If the pcb is not bound to a port, it will - * automatically be bound to a random port. - * - * @return lwIP error code. - * - ERR_OK. Successful. No error occurred. - * - ERR_MEM. Out of memory. - * - ERR_RTE. Could not find route to destination address. - * - ERR_VAL. No PCB or PCB is dual-stack - * - More errors could be returned by lower protocol layers. - * - * @see udp_disconnect() udp_sendto() - */ -err_t -udp_send(struct udp_pcb *pcb, struct pbuf *p) -{ - if ((pcb == NULL) || IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { - return ERR_VAL; - } - - /* send to the packet using remote ip and port stored in the pcb */ - return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port); -} - -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP -/** @ingroup udp_raw - * Same as udp_send() but with checksum - */ -err_t -udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, - u8_t have_chksum, u16_t chksum) -{ - if ((pcb == NULL) || IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { - return ERR_VAL; - } - - /* send to the packet using remote ip and port stored in the pcb */ - return udp_sendto_chksum(pcb, p, &pcb->remote_ip, pcb->remote_port, - have_chksum, chksum); -} -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - -/** - * @ingroup udp_raw - * Send data to a specified address using UDP. - * - * @param pcb UDP PCB used to send the data. - * @param p chain of pbuf's to be sent. - * @param dst_ip Destination IP address. - * @param dst_port Destination UDP port. - * - * dst_ip & dst_port are expected to be in the same byte order as in the pcb. - * - * If the PCB already has a remote address association, it will - * be restored after the data is sent. - * - * @return lwIP error code (@see udp_send for possible error codes) - * - * @see udp_disconnect() udp_send() - */ -err_t -udp_sendto(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port) -{ -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP - return udp_sendto_chksum(pcb, p, dst_ip, dst_port, 0, 0); -} - -/** @ingroup udp_raw - * Same as udp_sendto(), but with checksum */ -err_t -udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, - u16_t dst_port, u8_t have_chksum, u16_t chksum) -{ -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - struct netif *netif; - const ip_addr_t *dst_ip_route = dst_ip; - - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { - return ERR_VAL; - } - - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send\n")); - -#if LWIP_IPV6 || (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) - if (ip_addr_ismulticast(dst_ip_route)) { -#if LWIP_IPV6 - if (IP_IS_V6(dst_ip)) { - /* For multicast, find a netif based on source address. */ - dst_ip_route = &pcb->local_ip; - } else -#endif /* LWIP_IPV6 */ - { -#if LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS - /* IPv4 does not use source-based routing by default, so we use an - administratively selected interface for multicast by default. - However, this can be overridden by setting an interface address - in pcb->multicast_ip that is used for routing. */ - if (!ip_addr_isany_val(pcb->multicast_ip) && - !ip4_addr_cmp(ip_2_ip4(&pcb->multicast_ip), IP4_ADDR_BROADCAST)) { - dst_ip_route = &pcb->multicast_ip; - } -#endif /* LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS */ - } - } -#endif /* LWIP_IPV6 || (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) */ - - /* find the outgoing network interface for this packet */ - if(IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { - /* Don't call ip_route() with IP_ANY_TYPE */ - netif = ip_route(IP46_ADDR_ANY(IP_GET_TYPE(dst_ip_route)), dst_ip_route); - } else { - netif = ip_route(&pcb->local_ip, dst_ip_route); - } - - /* no outgoing network interface could be found? */ - if (netif == NULL) { - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: No route to ")); - ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, dst_ip); - LWIP_DEBUGF(UDP_DEBUG, ("\n")); - UDP_STATS_INC(udp.rterr); - return ERR_RTE; - } -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP - return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum); -#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ -} - -/** - * @ingroup udp_raw - * Send data to a specified address using UDP. - * The netif used for sending can be specified. - * - * This function exists mainly for DHCP, to be able to send UDP packets - * on a netif that is still down. - * - * @param pcb UDP PCB used to send the data. - * @param p chain of pbuf's to be sent. - * @param dst_ip Destination IP address. - * @param dst_port Destination UDP port. - * @param netif the netif used for sending. - * - * dst_ip & dst_port are expected to be in the same byte order as in the pcb. - * - * @return lwIP error code (@see udp_send for possible error codes) - * - * @see udp_disconnect() udp_send() - */ -err_t -udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) -{ -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP - return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, 0, 0); -} - -/** Same as udp_sendto_if(), but with checksum */ -err_t -udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, - u16_t dst_port, struct netif *netif, u8_t have_chksum, - u16_t chksum) -{ -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - const ip_addr_t *src_ip; - - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { - return ERR_VAL; - } - - /* PCB local address is IP_ANY_ADDR? */ -#if LWIP_IPV6 - if (IP_IS_V6(dst_ip)) { - if (ip6_addr_isany(ip_2_ip6(&pcb->local_ip))) { - src_ip = ip6_select_source_address(netif, ip_2_ip6(dst_ip)); - if (src_ip == NULL) { - /* No suitable source address was found. */ - return ERR_RTE; - } - } else { - /* use UDP PCB local IPv6 address as source address, if still valid. */ - if (netif_get_ip6_addr_match(netif, ip_2_ip6(&pcb->local_ip)) < 0) { - /* Address isn't valid anymore. */ - return ERR_RTE; - } - src_ip = &pcb->local_ip; - } - } -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 && LWIP_IPV6 - else -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -#if LWIP_IPV4 - if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || - ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { - /* if the local_ip is any or multicast - * use the outgoing network interface IP address as source address */ - src_ip = netif_ip_addr4(netif); - } else { - /* check if UDP PCB local IP address is correct - * this could be an old address if netif->ip_addr has changed */ - if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) { - /* local_ip doesn't match, drop the packet */ - return ERR_RTE; - } - /* use UDP PCB local IP address as source address */ - src_ip = &pcb->local_ip; - } -#endif /* LWIP_IPV4 */ -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP - return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum, src_ip); -#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip); -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ -} - -/** @ingroup udp_raw - * Same as @ref udp_sendto_if, but with source address */ -err_t -udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip) -{ -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP - return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, 0, 0, src_ip); -} - -/** Same as udp_sendto_if_src(), but with checksum */ -err_t -udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, - u16_t dst_port, struct netif *netif, u8_t have_chksum, - u16_t chksum, const ip_addr_t *src_ip) -{ -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - struct udp_hdr *udphdr; - err_t err; - struct pbuf *q; /* q will be sent down the stack */ - u8_t ip_proto; - u8_t ttl; - - if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, src_ip) || - !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { - return ERR_VAL; - } - -#if LWIP_IPV4 && IP_SOF_BROADCAST - /* broadcast filter? */ - if (!ip_get_option(pcb, SOF_BROADCAST) && -#if LWIP_IPV6 - IP_IS_V4(dst_ip) && -#endif /* LWIP_IPV6 */ - ip_addr_isbroadcast(dst_ip, netif)) { - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, - ("udp_sendto_if: SOF_BROADCAST not enabled on pcb %p\n", (void *)pcb)); - return ERR_VAL; - } -#endif /* LWIP_IPV4 && IP_SOF_BROADCAST */ - - /* if the PCB is not yet bound to a port, bind it here */ - if (pcb->local_port == 0) { - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n")); - err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); - if (err != ERR_OK) { - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n")); - return err; - } - } - - /* not enough space to add an UDP header to first pbuf in given p chain? */ - if (pbuf_header(p, UDP_HLEN)) { - /* allocate header in a separate new pbuf */ - q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); - /* new header pbuf could not be allocated? */ - if (q == NULL) { - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); - return ERR_MEM; - } - if (p->tot_len != 0) { - /* chain header q in front of given pbuf p (only if p contains data) */ - pbuf_chain(q, p); - } - /* first pbuf q points to header pbuf */ - LWIP_DEBUGF(UDP_DEBUG, - ("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); - } else { - /* adding space for header within p succeeded */ - /* first pbuf q equals given pbuf */ - q = p; - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p)); - } - LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", - (q->len >= sizeof(struct udp_hdr))); - /* q now represents the packet to be sent */ - udphdr = (struct udp_hdr *)q->payload; - udphdr->src = lwip_htons(pcb->local_port); - udphdr->dest = lwip_htons(dst_port); - /* in UDP, 0 checksum means 'no checksum' */ - udphdr->chksum = 0x0000; - - /* Multicast Loop? */ -#if (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) || (LWIP_IPV6 && LWIP_IPV6_MLD) - if (((pcb->flags & UDP_FLAGS_MULTICAST_LOOP) != 0) && ip_addr_ismulticast(dst_ip)) { - q->flags |= PBUF_FLAG_MCASTLOOP; - } -#endif /* (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) || (LWIP_IPV6 && LWIP_IPV6_MLD) */ - - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: sending datagram of length %"U16_F"\n", q->tot_len)); - -#if LWIP_UDPLITE - /* UDP Lite protocol? */ - if (pcb->flags & UDP_FLAGS_UDPLITE) { - u16_t chklen, chklen_hdr; - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP LITE packet length %"U16_F"\n", q->tot_len)); - /* set UDP message length in UDP header */ - chklen_hdr = chklen = pcb->chksum_len_tx; - if ((chklen < sizeof(struct udp_hdr)) || (chklen > q->tot_len)) { - if (chklen != 0) { - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP LITE pcb->chksum_len is illegal: %"U16_F"\n", chklen)); - } - /* For UDP-Lite, checksum length of 0 means checksum - over the complete packet. (See RFC 3828 chap. 3.1) - At least the UDP-Lite header must be covered by the - checksum, therefore, if chksum_len has an illegal - value, we generate the checksum over the complete - packet to be safe. */ - chklen_hdr = 0; - chklen = q->tot_len; - } - udphdr->len = lwip_htons(chklen_hdr); - /* calculate checksum */ -#if CHECKSUM_GEN_UDP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_UDP) { -#if LWIP_CHECKSUM_ON_COPY - if (have_chksum) { - chklen = UDP_HLEN; - } -#endif /* LWIP_CHECKSUM_ON_COPY */ - udphdr->chksum = ip_chksum_pseudo_partial(q, IP_PROTO_UDPLITE, - q->tot_len, chklen, src_ip, dst_ip); -#if LWIP_CHECKSUM_ON_COPY - if (have_chksum) { - u32_t acc; - acc = udphdr->chksum + (u16_t)~(chksum); - udphdr->chksum = FOLD_U32T(acc); - } -#endif /* LWIP_CHECKSUM_ON_COPY */ - - /* chksum zero must become 0xffff, as zero means 'no checksum' */ - if (udphdr->chksum == 0x0000) { - udphdr->chksum = 0xffff; - } - } -#endif /* CHECKSUM_GEN_UDP */ - - ip_proto = IP_PROTO_UDPLITE; - } else -#endif /* LWIP_UDPLITE */ - { /* UDP */ - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len)); - udphdr->len = lwip_htons(q->tot_len); - /* calculate checksum */ -#if CHECKSUM_GEN_UDP - IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_UDP) { - /* Checksum is mandatory over IPv6. */ - if (IP_IS_V6(dst_ip) || (pcb->flags & UDP_FLAGS_NOCHKSUM) == 0) { - u16_t udpchksum; -#if LWIP_CHECKSUM_ON_COPY - if (have_chksum) { - u32_t acc; - udpchksum = ip_chksum_pseudo_partial(q, IP_PROTO_UDP, - q->tot_len, UDP_HLEN, src_ip, dst_ip); - acc = udpchksum + (u16_t)~(chksum); - udpchksum = FOLD_U32T(acc); - } else -#endif /* LWIP_CHECKSUM_ON_COPY */ - { - udpchksum = ip_chksum_pseudo(q, IP_PROTO_UDP, q->tot_len, - src_ip, dst_ip); - } - - /* chksum zero must become 0xffff, as zero means 'no checksum' */ - if (udpchksum == 0x0000) { - udpchksum = 0xffff; - } - udphdr->chksum = udpchksum; - } - } -#endif /* CHECKSUM_GEN_UDP */ - ip_proto = IP_PROTO_UDP; - } - - /* Determine TTL to use */ -#if LWIP_MULTICAST_TX_OPTIONS - ttl = (ip_addr_ismulticast(dst_ip) ? udp_get_multicast_ttl(pcb) : pcb->ttl); -#else /* LWIP_MULTICAST_TX_OPTIONS */ - ttl = pcb->ttl; -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum)); - LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto)); - /* output to IP */ - NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); - NETIF_SET_HWADDRHINT(netif, NULL); - - /* @todo: must this be increased even if error occurred? */ - MIB2_STATS_INC(mib2.udpoutdatagrams); - - /* did we chain a separate header pbuf earlier? */ - if (q != p) { - /* free the header pbuf */ - pbuf_free(q); - q = NULL; - /* p is still referenced by the caller, and will live on */ - } - - UDP_STATS_INC(udp.xmit); - return err; -} - -/** - * @ingroup udp_raw - * Bind an UDP PCB. - * - * @param pcb UDP PCB to be bound with a local address ipaddr and port. - * @param ipaddr local IP address to bind with. Use IP4_ADDR_ANY to - * bind to all local interfaces. - * @param port local UDP port to bind with. Use 0 to automatically bind - * to a random port between UDP_LOCAL_PORT_RANGE_START and - * UDP_LOCAL_PORT_RANGE_END. - * - * ipaddr & port are expected to be in the same byte order as in the pcb. - * - * @return lwIP error code. - * - ERR_OK. Successful. No error occurred. - * - ERR_USE. The specified ipaddr and port are already bound to by - * another UDP PCB. - * - * @see udp_disconnect() - */ -err_t -udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) -{ - struct udp_pcb *ipcb; - u8_t rebind; - -#if LWIP_IPV4 - /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ - if (ipaddr == NULL) { - ipaddr = IP4_ADDR_ANY; - } -#endif /* LWIP_IPV4 */ - - /* still need to check for ipaddr == NULL in IPv6 only case */ - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } - - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = ")); - 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) { - /* is this UDP PCB already on active list? */ - if (pcb == ipcb) { - rebind = 1; - break; - } - } - - /* no port specified? */ - if (port == 0) { - port = udp_new_port(); - if (port == 0) { - /* no more ports available in local range */ - LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); - return ERR_USE; - } - } else { - for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { - if (pcb != ipcb) { - /* By default, we don't allow to bind to a port that any other udp - PCB is already bound to, unless *all* PCBs with that port have tha - REUSEADDR flag set. */ -#if SO_REUSE - if (!ip_get_option(pcb, SOF_REUSEADDR) || - !ip_get_option(ipcb, SOF_REUSEADDR)) -#endif /* SO_REUSE */ - { - /* port matches that of PCB in list and REUSEADDR not set -> reject */ - if ((ipcb->local_port == port) && - /* IP address matches? */ - ip_addr_cmp(&ipcb->local_ip, ipaddr)) { - /* other PCB already binds to this local IP and port */ - LWIP_DEBUGF(UDP_DEBUG, - ("udp_bind: local port %"U16_F" already bound by another pcb\n", port)); - return ERR_USE; - } - } - } - } - } - - ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); - - pcb->local_port = port; - mib2_udp_bind(pcb); - /* pcb not active yet? */ - if (rebind == 0) { - /* place the PCB on the active list if not already there */ - pcb->next = udp_pcbs; - udp_pcbs = pcb; - } - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to ")); - ip_addr_debug_print(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; -} - -/** - * @ingroup udp_raw - * Connect an UDP PCB. - * - * This will associate the UDP PCB with the remote address. - * - * @param pcb UDP PCB to be connected with remote address ipaddr and port. - * @param ipaddr remote IP address to connect with. - * @param port remote UDP port to connect with. - * - * @return lwIP error code - * - * ipaddr & port are expected to be in the same byte order as in the pcb. - * - * The udp pcb is bound to a random local port if not already bound. - * - * @see udp_disconnect() - */ -err_t -udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) -{ - struct udp_pcb *ipcb; - - if ((pcb == NULL) || (ipaddr == NULL)) { - return ERR_VAL; - } - - if (pcb->local_port == 0) { - err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); - if (err != ERR_OK) { - return err; - } - } - - ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); - pcb->remote_port = port; - pcb->flags |= UDP_FLAGS_CONNECTED; - - LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_connect: connected to ")); - ip_addr_debug_print(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) { - if (pcb == ipcb) { - /* already on the list, just return */ - return ERR_OK; - } - } - /* PCB not yet on the list, add PCB now */ - pcb->next = udp_pcbs; - udp_pcbs = pcb; - return ERR_OK; -} - -/** - * @ingroup udp_raw - * Disconnect a UDP PCB - * - * @param pcb the udp pcb to disconnect. - */ -void -udp_disconnect(struct udp_pcb *pcb) -{ - /* reset remote address association */ -#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); -#if LWIP_IPV4 && LWIP_IPV6 - } -#endif - pcb->remote_port = 0; - /* mark PCB as unconnected */ - pcb->flags &= ~UDP_FLAGS_CONNECTED; -} - -/** - * @ingroup udp_raw - * Set a receive callback for a UDP PCB - * - * This callback will be called when receiving a datagram for the pcb. - * - * @param pcb the pcb for which to set the recv callback - * @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) -{ - /* remember recv() callback and user data */ - pcb->recv = recv; - pcb->recv_arg = recv_arg; -} - -/** - * @ingroup udp_raw - * Remove an UDP PCB. - * - * @param pcb UDP PCB to be removed. The PCB is removed from the list of - * UDP PCB's and the data structure is freed from memory. - * - * @see udp_new() - */ -void -udp_remove(struct udp_pcb *pcb) -{ - struct udp_pcb *pcb2; - - mib2_udp_unbind(pcb); - /* pcb to be removed is first in list? */ - if (udp_pcbs == pcb) { - /* make list start at 2nd pcb */ - udp_pcbs = udp_pcbs->next; - /* pcb not 1st in list */ - } else { - for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { - /* find pcb in udp_pcbs list */ - if (pcb2->next != NULL && pcb2->next == pcb) { - /* remove pcb from list */ - pcb2->next = pcb->next; - break; - } - } - } - memp_free(MEMP_UDP_PCB, pcb); -} - -/** - * @ingroup udp_raw - * Create a UDP PCB. - * - * @return The UDP PCB which was created. NULL if the PCB data structure - * could not be allocated. - * - * @see udp_remove() - */ -struct udp_pcb * -udp_new(void) -{ - struct udp_pcb *pcb; - pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); - /* could allocate UDP PCB? */ - if (pcb != NULL) { - /* 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)); - pcb->ttl = UDP_TTL; -#if LWIP_MULTICAST_TX_OPTIONS - udp_set_multicast_ttl(pcb, UDP_TTL); -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - } - return pcb; -} - -/** - * @ingroup udp_raw - * Create a UDP PCB for specific IP type. - * - * @param type IP address type, see @ref lwip_ip_addr_type definitions. - * If you want to listen to IPv4 and IPv6 (dual-stack) packets, - * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. - * @return The UDP PCB which was created. NULL if the PCB data structure - * could not be allocated. - * - * @see udp_remove() - */ -struct udp_pcb * -udp_new_ip_type(u8_t type) -{ - struct udp_pcb *pcb; - pcb = udp_new(); -#if LWIP_IPV4 && LWIP_IPV6 - if (pcb != NULL) { - IP_SET_TYPE_VAL(pcb->local_ip, type); - IP_SET_TYPE_VAL(pcb->remote_ip, type); - } -#else - LWIP_UNUSED_ARG(type); -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - return pcb; -} - -/** This function is called from netif.c when address is changed - * - * @param old_addr IP address of the netif before change - * @param new_addr IP address of the netif after change - */ -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)) { - for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { - /* PCB bound to current local interface address? */ - if (ip_addr_cmp(&upcb->local_ip, old_addr)) { - /* 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); - } - } - } -} - -#if UDP_DEBUG -/** - * Print UDP header information for debug purposes. - * - * @param udphdr pointer to the udp header in memory. - */ -void -udp_debug_print(struct udp_hdr *udphdr) -{ - LWIP_DEBUGF(UDP_DEBUG, ("UDP header:\n")); - LWIP_DEBUGF(UDP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(UDP_DEBUG, ("| %5"U16_F" | %5"U16_F" | (src port, dest port)\n", - lwip_ntohs(udphdr->src), lwip_ntohs(udphdr->dest))); - LWIP_DEBUGF(UDP_DEBUG, ("+-------------------------------+\n")); - LWIP_DEBUGF(UDP_DEBUG, ("| %5"U16_F" | 0x%04"X16_F" | (len, chksum)\n", - lwip_ntohs(udphdr->len), lwip_ntohs(udphdr->chksum))); - LWIP_DEBUGF(UDP_DEBUG, ("+-------------------------------+\n")); -} -#endif /* UDP_DEBUG */ - -#endif /* LWIP_UDP */ +/** + * @file + * User Datagram Protocol module\n + * The code for the User Datagram Protocol UDP & UDPLite (RFC 3828).\n + * See also @ref udp_raw + * + * @defgroup udp_raw UDP + * @ingroup callbackstyle_api + * User Datagram Protocol module\n + * @see @ref raw_api and @ref netconn + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +/* @todo Check the use of '(struct udp_pcb).chksum_len_rx'! + */ + +#include "lwip/opt.h" + +#if LWIP_UDP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/udp.h" +#include "lwip/def.h" +#include "lwip/memp.h" +#include "lwip/inet_chksum.h" +#include "lwip/ip_addr.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/netif.h" +#include "lwip/icmp.h" +#include "lwip/icmp6.h" +#include "lwip/stats.h" +#include "lwip/snmp.h" +#include "lwip/dhcp.h" + +#include + +#ifndef UDP_LOCAL_PORT_RANGE_START +/* From http://www.iana.org/assignments/port-numbers: + "The Dynamic and/or Private Ports are those from 49152 through 65535" */ +#define UDP_LOCAL_PORT_RANGE_START 0xc000 +#define UDP_LOCAL_PORT_RANGE_END 0xffff +#define UDP_ENSURE_LOCAL_PORT_RANGE(port) ((u16_t)(((port) & ~UDP_LOCAL_PORT_RANGE_START) + UDP_LOCAL_PORT_RANGE_START)) +#endif + +/* last local UDP port */ +static u16_t udp_port = UDP_LOCAL_PORT_RANGE_START; + +/* The list of UDP PCBs */ +/* exported in udp.h (was static) */ +struct udp_pcb *udp_pcbs; + +/** + * Initialize this module. + */ +void +udp_init(void) +{ +#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) + udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); +#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */ +} + +/** + * Allocate a new local UDP port. + * + * @return a new (free) local UDP port number + */ +static u16_t +udp_new_port(void) +{ + u16_t n = 0; + struct udp_pcb *pcb; + +again: + if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { + udp_port = UDP_LOCAL_PORT_RANGE_START; + } + /* Check all PCBs. */ + for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { + if (pcb->local_port == udp_port) { + if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { + return 0; + } + goto again; + } + } + return udp_port; +} + +/** Common code to see if the current input packet matches the pcb + * (current input packet is accessed via ip(4/6)_current_* macros) + * + * @param pcb pcb to check + * @param inp network interface on which the datagram was received (only used for IPv4) + * @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) +{ + LWIP_UNUSED_ARG(inp); /* in IPv6 only case */ + LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ + + /* Dual-stack: PCBs listening to any IP type also listen to any IP address */ + if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { +#if LWIP_IPV4 && IP_SOF_BROADCAST_RECV + if ((broadcast != 0) && !ip_get_option(pcb, SOF_BROADCAST)) { + return 0; + } +#endif /* LWIP_IPV4 && IP_SOF_BROADCAST_RECV */ + return 1; + } + + /* 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) { +#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)) || + ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || + ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { + return 1; + } + } + } else +#endif /* LWIP_IPV4 */ + /* Handle IPv4 and IPv6: all or exact match */ + if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { + return 1; + } + } + + return 0; +} + +/** + * Process an incoming UDP datagram. + * + * Given an incoming UDP datagram (as a chain of pbufs) this function + * finds a corresponding UDP PCB and hands over the pbuf to the pcbs + * recv function. If no pcb is found or the datagram is incorrect, the + * pbuf is freed. + * + * @param p pbuf to be demultiplexed to a UDP PCB (p->payload pointing to the UDP header) + * @param inp network interface on which the datagram was received. + * + */ +void +udp_input(struct pbuf *p, struct netif *inp) +{ + struct udp_hdr *udphdr; + struct udp_pcb *pcb, *prev; + struct udp_pcb *uncon_pcb; + u16_t src, dest; + u8_t broadcast; + u8_t for_us = 0; + + LWIP_UNUSED_ARG(inp); + + PERF_START; + + UDP_STATS_INC(udp.recv); + + /* Check minimum length (UDP header) */ + if (p->len < UDP_HLEN) { + /* drop short packets */ + LWIP_DEBUGF(UDP_DEBUG, + ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len)); + UDP_STATS_INC(udp.lenerr); + UDP_STATS_INC(udp.drop); + MIB2_STATS_INC(mib2.udpinerrors); + pbuf_free(p); + goto end; + } + + udphdr = (struct udp_hdr *)p->payload; + + /* is broadcast packet ? */ + broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); + + 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); + dest = lwip_ntohs(udphdr->dest); + + udp_debug_print(udphdr); + + /* print the UDP source and destination */ + LWIP_DEBUGF(UDP_DEBUG, ("udp (")); + ip_addr_debug_print(UDP_DEBUG, ip_current_dest_addr()); + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", lwip_ntohs(udphdr->dest))); + ip_addr_debug_print(UDP_DEBUG, ip_current_src_addr()); + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", lwip_ntohs(udphdr->src))); + + pcb = NULL; + prev = NULL; + 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) { + /* print the PCB local and remote address */ + LWIP_DEBUGF(UDP_DEBUG, ("pcb (")); + ip_addr_debug_print(UDP_DEBUG, &pcb->local_ip); + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F") <-- (", pcb->local_port)); + ip_addr_debug_print(UDP_DEBUG, &pcb->remote_ip); + LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port)); + + /* compare PCB local addr+port to UDP destination addr+port */ + if ((pcb->local_port == dest) && + (udp_input_local_match(pcb, inp, broadcast) != 0)) { + if (((pcb->flags & UDP_FLAGS_CONNECTED) == 0) && + ((uncon_pcb == NULL) +#if SO_REUSE + /* prefer specific IPs over cath-all */ + || !ip_addr_isany(&pcb->local_ip) +#endif /* SO_REUSE */ + )) { + /* the first unconnected matching PCB */ + uncon_pcb = pcb; + } + + /* compare PCB remote addr+port to UDP source addr+port */ + if ((pcb->remote_port == src) && + (ip_addr_isany_val(pcb->remote_ip) || + ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { + /* the first fully matching PCB */ + if (prev != NULL) { + /* move the pcb to the front of udp_pcbs so that is + found faster next time */ + prev->next = pcb->next; + pcb->next = udp_pcbs; + udp_pcbs = pcb; + } else { + UDP_STATS_INC(udp.cachehit); + } + break; + } + } + + prev = pcb; + } + /* no fully matching pcb found? then look for an unconnected pcb */ + if (pcb == NULL) { + pcb = uncon_pcb; + } + + /* Check checksum if this is a match or if it was directed at us. */ + if (pcb != NULL) { + for_us = 1; + } else { +#if LWIP_IPV6 + if (ip_current_is_v6()) { + for_us = netif_get_ip6_addr_match(inp, ip6_current_dest_addr()) >= 0; + } +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 + if (!ip_current_is_v6()) { + for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr()); + } +#endif /* LWIP_IPV4 */ + } + + if (for_us) { + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: calculating checksum\n")); +#if CHECKSUM_CHECK_UDP + IF__NETIF_CHECKSUM_ENABLED(inp, CHECKSUM_CHECK_UDP) { +#if LWIP_UDPLITE + if (ip_current_header_proto() == IP_PROTO_UDPLITE) { + /* Do the UDP Lite checksum */ + u16_t chklen = lwip_ntohs(udphdr->len); + if (chklen < sizeof(struct udp_hdr)) { + if (chklen == 0) { + /* For UDP-Lite, checksum length of 0 means checksum + over the complete packet (See RFC 3828 chap. 3.1) */ + chklen = p->tot_len; + } else { + /* At least the UDP-Lite header must be covered by the + checksum! (Again, see RFC 3828 chap. 3.1) */ + goto chkerr; + } + } + if (ip_chksum_pseudo_partial(p, IP_PROTO_UDPLITE, + p->tot_len, chklen, + ip_current_src_addr(), ip_current_dest_addr()) != 0) { + goto chkerr; + } + } else +#endif /* LWIP_UDPLITE */ + { + if (udphdr->chksum != 0) { + if (ip_chksum_pseudo(p, IP_PROTO_UDP, p->tot_len, + ip_current_src_addr(), + ip_current_dest_addr()) != 0) { + goto chkerr; + } + } + } + } +#endif /* CHECKSUM_CHECK_UDP */ + if (pbuf_header(p, -UDP_HLEN)) { + /* Can we cope with this failing? Just assert for now */ + LWIP_ASSERT("pbuf_header failed\n", 0); + UDP_STATS_INC(udp.drop); + MIB2_STATS_INC(mib2.udpinerrors); + pbuf_free(p); + goto end; + } + + if (pcb != NULL) { + MIB2_STATS_INC(mib2.udpindatagrams); +#if SO_REUSE && SO_REUSE_RXTOALL + if (ip_get_option(pcb, SOF_REUSEADDR) && + (broadcast || ip_addr_ismulticast(ip_current_dest_addr()))) { + /* pass broadcast- or multicast packets to all multicast pcbs + if SOF_REUSEADDR is set on the first match */ + struct udp_pcb *mpcb; + u8_t p_header_changed = 0; + s16_t hdrs_len = (s16_t)(ip_current_header_tot_len() + UDP_HLEN); + for (mpcb = udp_pcbs; mpcb != NULL; mpcb = mpcb->next) { + if (mpcb != pcb) { + /* compare PCB local addr+port to UDP destination addr+port */ + if ((mpcb->local_port == dest) && + (udp_input_local_match(mpcb, inp, broadcast) != 0)) { + /* pass a copy of the packet to all local matches */ + if (mpcb->recv != NULL) { + struct pbuf *q; + /* for that, move payload to IP header again */ + if (p_header_changed == 0) { + pbuf_header_force(p, hdrs_len); + p_header_changed = 1; + } + q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); + if (q != NULL) { + err_t err = pbuf_copy(q, p); + if (err == ERR_OK) { + /* move payload to UDP data */ + pbuf_header(q, -hdrs_len); + mpcb->recv(mpcb->recv_arg, mpcb, q, ip_current_src_addr(), src); + } + } + } + } + } + } + if (p_header_changed) { + /* and move payload to UDP data again */ + pbuf_header(p, -hdrs_len); + } + } +#endif /* SO_REUSE && SO_REUSE_RXTOALL */ + /* callback */ + if (pcb->recv != NULL) { + /* now the recv function is responsible for freeing p */ + pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); + } else { + /* no recv function registered? then we have to free the pbuf! */ + pbuf_free(p); + goto end; + } + } else { + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: not for us.\n")); + +#if LWIP_ICMP || LWIP_ICMP6 + /* No match was found, send ICMP destination port unreachable unless + destination address was broadcast/multicast. */ + if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { + /* move payload pointer back to ip header */ + pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); + icmp_port_unreach(ip_current_is_v6(), p); + } +#endif /* LWIP_ICMP || LWIP_ICMP6 */ + UDP_STATS_INC(udp.proterr); + UDP_STATS_INC(udp.drop); + MIB2_STATS_INC(mib2.udpnoports); + pbuf_free(p); + } + } else { + pbuf_free(p); + } +end: + PERF_STOP("udp_input"); + return; +#if CHECKSUM_CHECK_UDP +chkerr: + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("udp_input: UDP (or UDP Lite) datagram discarded due to failing checksum\n")); + UDP_STATS_INC(udp.chkerr); + UDP_STATS_INC(udp.drop); + MIB2_STATS_INC(mib2.udpinerrors); + pbuf_free(p); + PERF_STOP("udp_input"); +#endif /* CHECKSUM_CHECK_UDP */ +} + +/** + * @ingroup udp_raw + * Send data using UDP. + * + * @param pcb UDP PCB used to send the data. + * @param p chain of pbuf's to be sent. + * + * The datagram will be sent to the current remote_ip & remote_port + * stored in pcb. If the pcb is not bound to a port, it will + * automatically be bound to a random port. + * + * @return lwIP error code. + * - ERR_OK. Successful. No error occurred. + * - ERR_MEM. Out of memory. + * - ERR_RTE. Could not find route to destination address. + * - ERR_VAL. No PCB or PCB is dual-stack + * - More errors could be returned by lower protocol layers. + * + * @see udp_disconnect() udp_sendto() + */ +err_t +udp_send(struct udp_pcb *pcb, struct pbuf *p) +{ + if ((pcb == NULL) || IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { + return ERR_VAL; + } + + /* send to the packet using remote ip and port stored in the pcb */ + return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port); +} + +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP +/** @ingroup udp_raw + * Same as udp_send() but with checksum + */ +err_t +udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, + u8_t have_chksum, u16_t chksum) +{ + if ((pcb == NULL) || IP_IS_ANY_TYPE_VAL(pcb->remote_ip)) { + return ERR_VAL; + } + + /* send to the packet using remote ip and port stored in the pcb */ + return udp_sendto_chksum(pcb, p, &pcb->remote_ip, pcb->remote_port, + have_chksum, chksum); +} +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + +/** + * @ingroup udp_raw + * Send data to a specified address using UDP. + * + * @param pcb UDP PCB used to send the data. + * @param p chain of pbuf's to be sent. + * @param dst_ip Destination IP address. + * @param dst_port Destination UDP port. + * + * dst_ip & dst_port are expected to be in the same byte order as in the pcb. + * + * If the PCB already has a remote address association, it will + * be restored after the data is sent. + * + * @return lwIP error code (@see udp_send for possible error codes) + * + * @see udp_disconnect() udp_send() + */ +err_t +udp_sendto(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port) +{ +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP + return udp_sendto_chksum(pcb, p, dst_ip, dst_port, 0, 0); +} + +/** @ingroup udp_raw + * Same as udp_sendto(), but with checksum */ +err_t +udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, + u16_t dst_port, u8_t have_chksum, u16_t chksum) +{ +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + struct netif *netif; + const ip_addr_t *dst_ip_route = dst_ip; + + if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + return ERR_VAL; + } + + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send\n")); + +#if LWIP_IPV6 || (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) + if (ip_addr_ismulticast(dst_ip_route)) { +#if LWIP_IPV6 + if (IP_IS_V6(dst_ip)) { + /* For multicast, find a netif based on source address. */ + dst_ip_route = &pcb->local_ip; + } else +#endif /* LWIP_IPV6 */ + { +#if LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS + /* IPv4 does not use source-based routing by default, so we use an + administratively selected interface for multicast by default. + However, this can be overridden by setting an interface address + in pcb->multicast_ip that is used for routing. */ + if (!ip_addr_isany_val(pcb->multicast_ip) && + !ip4_addr_cmp(ip_2_ip4(&pcb->multicast_ip), IP4_ADDR_BROADCAST)) { + dst_ip_route = &pcb->multicast_ip; + } +#endif /* LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS */ + } + } +#endif /* LWIP_IPV6 || (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) */ + + /* find the outgoing network interface for this packet */ + if(IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { + /* Don't call ip_route() with IP_ANY_TYPE */ + netif = ip_route(IP46_ADDR_ANY(IP_GET_TYPE(dst_ip_route)), dst_ip_route); + } else { + netif = ip_route(&pcb->local_ip, dst_ip_route); + } + + /* no outgoing network interface could be found? */ + if (netif == NULL) { + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: No route to ")); + ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, dst_ip); + LWIP_DEBUGF(UDP_DEBUG, ("\n")); + UDP_STATS_INC(udp.rterr); + return ERR_RTE; + } +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP + return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum); +#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ +} + +/** + * @ingroup udp_raw + * Send data to a specified address using UDP. + * The netif used for sending can be specified. + * + * This function exists mainly for DHCP, to be able to send UDP packets + * on a netif that is still down. + * + * @param pcb UDP PCB used to send the data. + * @param p chain of pbuf's to be sent. + * @param dst_ip Destination IP address. + * @param dst_port Destination UDP port. + * @param netif the netif used for sending. + * + * dst_ip & dst_port are expected to be in the same byte order as in the pcb. + * + * @return lwIP error code (@see udp_send for possible error codes) + * + * @see udp_disconnect() udp_send() + */ +err_t +udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) +{ +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP + return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, 0, 0); +} + +/** Same as udp_sendto_if(), but with checksum */ +err_t +udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, + u16_t dst_port, struct netif *netif, u8_t have_chksum, + u16_t chksum) +{ +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + const ip_addr_t *src_ip; + + if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + return ERR_VAL; + } + + /* PCB local address is IP_ANY_ADDR? */ +#if LWIP_IPV6 + if (IP_IS_V6(dst_ip)) { + if (ip6_addr_isany(ip_2_ip6(&pcb->local_ip))) { + src_ip = ip6_select_source_address(netif, ip_2_ip6(dst_ip)); + if (src_ip == NULL) { + /* No suitable source address was found. */ + return ERR_RTE; + } + } else { + /* use UDP PCB local IPv6 address as source address, if still valid. */ + if (netif_get_ip6_addr_match(netif, ip_2_ip6(&pcb->local_ip)) < 0) { + /* Address isn't valid anymore. */ + return ERR_RTE; + } + src_ip = &pcb->local_ip; + } + } +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 && LWIP_IPV6 + else +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#if LWIP_IPV4 + if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || + ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { + /* if the local_ip is any or multicast + * use the outgoing network interface IP address as source address */ + src_ip = netif_ip_addr4(netif); + } else { + /* check if UDP PCB local IP address is correct + * this could be an old address if netif->ip_addr has changed */ + if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) { + /* local_ip doesn't match, drop the packet */ + return ERR_RTE; + } + /* use UDP PCB local IP address as source address */ + src_ip = &pcb->local_ip; + } +#endif /* LWIP_IPV4 */ +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP + return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum, src_ip); +#else /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip); +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ +} + +/** @ingroup udp_raw + * Same as @ref udp_sendto_if, but with source address */ +err_t +udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip) +{ +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP + return udp_sendto_if_src_chksum(pcb, p, dst_ip, dst_port, netif, 0, 0, src_ip); +} + +/** Same as udp_sendto_if_src(), but with checksum */ +err_t +udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, + u16_t dst_port, struct netif *netif, u8_t have_chksum, + u16_t chksum, const ip_addr_t *src_ip) +{ +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + struct udp_hdr *udphdr; + err_t err; + struct pbuf *q; /* q will be sent down the stack */ + u8_t ip_proto; + u8_t ttl; + + if ((pcb == NULL) || (dst_ip == NULL) || !IP_ADDR_PCB_VERSION_MATCH(pcb, src_ip) || + !IP_ADDR_PCB_VERSION_MATCH(pcb, dst_ip)) { + return ERR_VAL; + } + +#if LWIP_IPV4 && IP_SOF_BROADCAST + /* broadcast filter? */ + if (!ip_get_option(pcb, SOF_BROADCAST) && +#if LWIP_IPV6 + IP_IS_V4(dst_ip) && +#endif /* LWIP_IPV6 */ + ip_addr_isbroadcast(dst_ip, netif)) { + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, + ("udp_sendto_if: SOF_BROADCAST not enabled on pcb %p\n", (void *)pcb)); + return ERR_VAL; + } +#endif /* LWIP_IPV4 && IP_SOF_BROADCAST */ + + /* if the PCB is not yet bound to a port, bind it here */ + if (pcb->local_port == 0) { + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n")); + err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); + if (err != ERR_OK) { + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n")); + return err; + } + } + + /* not enough space to add an UDP header to first pbuf in given p chain? */ + if (pbuf_header(p, UDP_HLEN)) { + /* allocate header in a separate new pbuf */ + q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); + /* new header pbuf could not be allocated? */ + if (q == NULL) { + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); + return ERR_MEM; + } + if (p->tot_len != 0) { + /* chain header q in front of given pbuf p (only if p contains data) */ + pbuf_chain(q, p); + } + /* first pbuf q points to header pbuf */ + LWIP_DEBUGF(UDP_DEBUG, + ("udp_send: added header pbuf %p before given pbuf %p\n", (void *)q, (void *)p)); + } else { + /* adding space for header within p succeeded */ + /* first pbuf q equals given pbuf */ + q = p; + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p)); + } + LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", + (q->len >= sizeof(struct udp_hdr))); + /* q now represents the packet to be sent */ + udphdr = (struct udp_hdr *)q->payload; + udphdr->src = lwip_htons(pcb->local_port); + udphdr->dest = lwip_htons(dst_port); + /* in UDP, 0 checksum means 'no checksum' */ + udphdr->chksum = 0x0000; + + /* Multicast Loop? */ +#if (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) || (LWIP_IPV6 && LWIP_IPV6_MLD) + if (((pcb->flags & UDP_FLAGS_MULTICAST_LOOP) != 0) && ip_addr_ismulticast(dst_ip)) { + q->flags |= PBUF_FLAG_MCASTLOOP; + } +#endif /* (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) || (LWIP_IPV6 && LWIP_IPV6_MLD) */ + + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: sending datagram of length %"U16_F"\n", q->tot_len)); + +#if LWIP_UDPLITE + /* UDP Lite protocol? */ + if (pcb->flags & UDP_FLAGS_UDPLITE) { + u16_t chklen, chklen_hdr; + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP LITE packet length %"U16_F"\n", q->tot_len)); + /* set UDP message length in UDP header */ + chklen_hdr = chklen = pcb->chksum_len_tx; + if ((chklen < sizeof(struct udp_hdr)) || (chklen > q->tot_len)) { + if (chklen != 0) { + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP LITE pcb->chksum_len is illegal: %"U16_F"\n", chklen)); + } + /* For UDP-Lite, checksum length of 0 means checksum + over the complete packet. (See RFC 3828 chap. 3.1) + At least the UDP-Lite header must be covered by the + checksum, therefore, if chksum_len has an illegal + value, we generate the checksum over the complete + packet to be safe. */ + chklen_hdr = 0; + chklen = q->tot_len; + } + udphdr->len = lwip_htons(chklen_hdr); + /* calculate checksum */ +#if CHECKSUM_GEN_UDP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_UDP) { +#if LWIP_CHECKSUM_ON_COPY + if (have_chksum) { + chklen = UDP_HLEN; + } +#endif /* LWIP_CHECKSUM_ON_COPY */ + udphdr->chksum = ip_chksum_pseudo_partial(q, IP_PROTO_UDPLITE, + q->tot_len, chklen, src_ip, dst_ip); +#if LWIP_CHECKSUM_ON_COPY + if (have_chksum) { + u32_t acc; + acc = udphdr->chksum + (u16_t)~(chksum); + udphdr->chksum = FOLD_U32T(acc); + } +#endif /* LWIP_CHECKSUM_ON_COPY */ + + /* chksum zero must become 0xffff, as zero means 'no checksum' */ + if (udphdr->chksum == 0x0000) { + udphdr->chksum = 0xffff; + } + } +#endif /* CHECKSUM_GEN_UDP */ + + ip_proto = IP_PROTO_UDPLITE; + } else +#endif /* LWIP_UDPLITE */ + { /* UDP */ + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len)); + udphdr->len = lwip_htons(q->tot_len); + /* calculate checksum */ +#if CHECKSUM_GEN_UDP + IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_UDP) { + /* Checksum is mandatory over IPv6. */ + if (IP_IS_V6(dst_ip) || (pcb->flags & UDP_FLAGS_NOCHKSUM) == 0) { + u16_t udpchksum; +#if LWIP_CHECKSUM_ON_COPY + if (have_chksum) { + u32_t acc; + udpchksum = ip_chksum_pseudo_partial(q, IP_PROTO_UDP, + q->tot_len, UDP_HLEN, src_ip, dst_ip); + acc = udpchksum + (u16_t)~(chksum); + udpchksum = FOLD_U32T(acc); + } else +#endif /* LWIP_CHECKSUM_ON_COPY */ + { + udpchksum = ip_chksum_pseudo(q, IP_PROTO_UDP, q->tot_len, + src_ip, dst_ip); + } + + /* chksum zero must become 0xffff, as zero means 'no checksum' */ + if (udpchksum == 0x0000) { + udpchksum = 0xffff; + } + udphdr->chksum = udpchksum; + } + } +#endif /* CHECKSUM_GEN_UDP */ + ip_proto = IP_PROTO_UDP; + } + + /* Determine TTL to use */ +#if LWIP_MULTICAST_TX_OPTIONS + ttl = (ip_addr_ismulticast(dst_ip) ? udp_get_multicast_ttl(pcb) : pcb->ttl); +#else /* LWIP_MULTICAST_TX_OPTIONS */ + ttl = pcb->ttl; +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum)); + LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto)); + /* output to IP */ + NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); + err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); + NETIF_SET_HWADDRHINT(netif, NULL); + + /* @todo: must this be increased even if error occurred? */ + MIB2_STATS_INC(mib2.udpoutdatagrams); + + /* did we chain a separate header pbuf earlier? */ + if (q != p) { + /* free the header pbuf */ + pbuf_free(q); + q = NULL; + /* p is still referenced by the caller, and will live on */ + } + + UDP_STATS_INC(udp.xmit); + return err; +} + +/** + * @ingroup udp_raw + * Bind an UDP PCB. + * + * @param pcb UDP PCB to be bound with a local address ipaddr and port. + * @param ipaddr local IP address to bind with. Use IP4_ADDR_ANY to + * bind to all local interfaces. + * @param port local UDP port to bind with. Use 0 to automatically bind + * to a random port between UDP_LOCAL_PORT_RANGE_START and + * UDP_LOCAL_PORT_RANGE_END. + * + * ipaddr & port are expected to be in the same byte order as in the pcb. + * + * @return lwIP error code. + * - ERR_OK. Successful. No error occurred. + * - ERR_USE. The specified ipaddr and port are already bound to by + * another UDP PCB. + * + * @see udp_disconnect() + */ +err_t +udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) +{ + struct udp_pcb *ipcb; + u8_t rebind; + +#if LWIP_IPV4 + /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ + if (ipaddr == NULL) { + ipaddr = IP4_ADDR_ANY; + } +#endif /* LWIP_IPV4 */ + + /* still need to check for ipaddr == NULL in IPv6 only case */ + if ((pcb == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = ")); + 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) { + /* is this UDP PCB already on active list? */ + if (pcb == ipcb) { + rebind = 1; + break; + } + } + + /* no port specified? */ + if (port == 0) { + port = udp_new_port(); + if (port == 0) { + /* no more ports available in local range */ + LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); + return ERR_USE; + } + } else { + for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { + if (pcb != ipcb) { + /* By default, we don't allow to bind to a port that any other udp + PCB is already bound to, unless *all* PCBs with that port have tha + REUSEADDR flag set. */ +#if SO_REUSE + if (!ip_get_option(pcb, SOF_REUSEADDR) || + !ip_get_option(ipcb, SOF_REUSEADDR)) +#endif /* SO_REUSE */ + { + /* port matches that of PCB in list and REUSEADDR not set -> reject */ + if ((ipcb->local_port == port) && + /* IP address matches? */ + ip_addr_cmp(&ipcb->local_ip, ipaddr)) { + /* other PCB already binds to this local IP and port */ + LWIP_DEBUGF(UDP_DEBUG, + ("udp_bind: local port %"U16_F" already bound by another pcb\n", port)); + return ERR_USE; + } + } + } + } + } + + ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); + + pcb->local_port = port; + mib2_udp_bind(pcb); + /* pcb not active yet? */ + if (rebind == 0) { + /* place the PCB on the active list if not already there */ + pcb->next = udp_pcbs; + udp_pcbs = pcb; + } + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to ")); + ip_addr_debug_print(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; +} + +/** + * @ingroup udp_raw + * Connect an UDP PCB. + * + * This will associate the UDP PCB with the remote address. + * + * @param pcb UDP PCB to be connected with remote address ipaddr and port. + * @param ipaddr remote IP address to connect with. + * @param port remote UDP port to connect with. + * + * @return lwIP error code + * + * ipaddr & port are expected to be in the same byte order as in the pcb. + * + * The udp pcb is bound to a random local port if not already bound. + * + * @see udp_disconnect() + */ +err_t +udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) +{ + struct udp_pcb *ipcb; + + if ((pcb == NULL) || (ipaddr == NULL)) { + return ERR_VAL; + } + + if (pcb->local_port == 0) { + err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); + if (err != ERR_OK) { + return err; + } + } + + ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); + pcb->remote_port = port; + pcb->flags |= UDP_FLAGS_CONNECTED; + + LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_connect: connected to ")); + ip_addr_debug_print(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) { + if (pcb == ipcb) { + /* already on the list, just return */ + return ERR_OK; + } + } + /* PCB not yet on the list, add PCB now */ + pcb->next = udp_pcbs; + udp_pcbs = pcb; + return ERR_OK; +} + +/** + * @ingroup udp_raw + * Disconnect a UDP PCB + * + * @param pcb the udp pcb to disconnect. + */ +void +udp_disconnect(struct udp_pcb *pcb) +{ + /* reset remote address association */ +#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); +#if LWIP_IPV4 && LWIP_IPV6 + } +#endif + pcb->remote_port = 0; + /* mark PCB as unconnected */ + pcb->flags &= ~UDP_FLAGS_CONNECTED; +} + +/** + * @ingroup udp_raw + * Set a receive callback for a UDP PCB + * + * This callback will be called when receiving a datagram for the pcb. + * + * @param pcb the pcb for which to set the recv callback + * @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) +{ + /* remember recv() callback and user data */ + pcb->recv = recv; + pcb->recv_arg = recv_arg; +} + +/** + * @ingroup udp_raw + * Remove an UDP PCB. + * + * @param pcb UDP PCB to be removed. The PCB is removed from the list of + * UDP PCB's and the data structure is freed from memory. + * + * @see udp_new() + */ +void +udp_remove(struct udp_pcb *pcb) +{ + struct udp_pcb *pcb2; + + mib2_udp_unbind(pcb); + /* pcb to be removed is first in list? */ + if (udp_pcbs == pcb) { + /* make list start at 2nd pcb */ + udp_pcbs = udp_pcbs->next; + /* pcb not 1st in list */ + } else { + for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { + /* find pcb in udp_pcbs list */ + if (pcb2->next != NULL && pcb2->next == pcb) { + /* remove pcb from list */ + pcb2->next = pcb->next; + break; + } + } + } + memp_free(MEMP_UDP_PCB, pcb); +} + +/** + * @ingroup udp_raw + * Create a UDP PCB. + * + * @return The UDP PCB which was created. NULL if the PCB data structure + * could not be allocated. + * + * @see udp_remove() + */ +struct udp_pcb * +udp_new(void) +{ + struct udp_pcb *pcb; + pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); + /* could allocate UDP PCB? */ + if (pcb != NULL) { + /* 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)); + pcb->ttl = UDP_TTL; +#if LWIP_MULTICAST_TX_OPTIONS + udp_set_multicast_ttl(pcb, UDP_TTL); +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + } + return pcb; +} + +/** + * @ingroup udp_raw + * Create a UDP PCB for specific IP type. + * + * @param type IP address type, see @ref lwip_ip_addr_type definitions. + * If you want to listen to IPv4 and IPv6 (dual-stack) packets, + * supply @ref IPADDR_TYPE_ANY as argument and bind to @ref IP_ANY_TYPE. + * @return The UDP PCB which was created. NULL if the PCB data structure + * could not be allocated. + * + * @see udp_remove() + */ +struct udp_pcb * +udp_new_ip_type(u8_t type) +{ + struct udp_pcb *pcb; + pcb = udp_new(); +#if LWIP_IPV4 && LWIP_IPV6 + if (pcb != NULL) { + IP_SET_TYPE_VAL(pcb->local_ip, type); + IP_SET_TYPE_VAL(pcb->remote_ip, type); + } +#else + LWIP_UNUSED_ARG(type); +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + return pcb; +} + +/** This function is called from netif.c when address is changed + * + * @param old_addr IP address of the netif before change + * @param new_addr IP address of the netif after change + */ +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)) { + for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { + /* PCB bound to current local interface address? */ + if (ip_addr_cmp(&upcb->local_ip, old_addr)) { + /* 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); + } + } + } +} + +#if UDP_DEBUG +/** + * Print UDP header information for debug purposes. + * + * @param udphdr pointer to the udp header in memory. + */ +void +udp_debug_print(struct udp_hdr *udphdr) +{ + LWIP_DEBUGF(UDP_DEBUG, ("UDP header:\n")); + LWIP_DEBUGF(UDP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(UDP_DEBUG, ("| %5"U16_F" | %5"U16_F" | (src port, dest port)\n", + lwip_ntohs(udphdr->src), lwip_ntohs(udphdr->dest))); + LWIP_DEBUGF(UDP_DEBUG, ("+-------------------------------+\n")); + LWIP_DEBUGF(UDP_DEBUG, ("| %5"U16_F" | 0x%04"X16_F" | (len, chksum)\n", + lwip_ntohs(udphdr->len), lwip_ntohs(udphdr->chksum))); + LWIP_DEBUGF(UDP_DEBUG, ("+-------------------------------+\n")); +} +#endif /* UDP_DEBUG */ + +#endif /* LWIP_UDP */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/api.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/api.h index 516bd16..4b658c6 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/api.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/api.h @@ -1,400 +1,400 @@ -/** - * @file - * netconn API (to be used from non-TCPIP threads) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_API_H -#define LWIP_HDR_API_H - -#include "lwip/opt.h" - -#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ -/* Note: Netconn API is always available when sockets are enabled - - * sockets are implemented on top of them */ - -#include "lwip/arch.h" -#include "lwip/netbuf.h" -#include "lwip/sys.h" -#include "lwip/ip_addr.h" -#include "lwip/err.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Throughout this file, IP addresses and port numbers are expected to be in - * the same byte order as in the corresponding pcb. - */ - -/* Flags for netconn_write (u8_t) */ -#define NETCONN_NOFLAG 0x00 -#define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */ -#define NETCONN_COPY 0x01 -#define NETCONN_MORE 0x02 -#define NETCONN_DONTBLOCK 0x04 - -/* Flags for struct netconn.flags (u8_t) */ -/** Should this netconn avoid blocking? */ -#define NETCONN_FLAG_NON_BLOCKING 0x02 -/** Was the last connect action a non-blocking one? */ -#define NETCONN_FLAG_IN_NONBLOCKING_CONNECT 0x04 -/** If a nonblocking write has been rejected before, poll_tcp needs to - check if the netconn is writable again */ -#define NETCONN_FLAG_CHECK_WRITESPACE 0x10 -#if LWIP_IPV6 -/** If this flag is set then only IPv6 communication is allowed on the - netconn. As per RFC#3493 this features defaults to OFF allowing - dual-stack usage by default. */ -#define NETCONN_FLAG_IPV6_V6ONLY 0x20 -#endif /* LWIP_IPV6 */ - - -/* Helpers to process several netconn_types by the same code */ -#define NETCONNTYPE_GROUP(t) ((t)&0xF0) -#define NETCONNTYPE_DATAGRAM(t) ((t)&0xE0) -#if LWIP_IPV6 -#define NETCONN_TYPE_IPV6 0x08 -#define NETCONNTYPE_ISIPV6(t) (((t)&NETCONN_TYPE_IPV6) != 0) -#define NETCONNTYPE_ISUDPLITE(t) (((t)&0xF3) == NETCONN_UDPLITE) -#define NETCONNTYPE_ISUDPNOCHKSUM(t) (((t)&0xF3) == NETCONN_UDPNOCHKSUM) -#else /* LWIP_IPV6 */ -#define NETCONNTYPE_ISIPV6(t) (0) -#define NETCONNTYPE_ISUDPLITE(t) ((t) == NETCONN_UDPLITE) -#define NETCONNTYPE_ISUDPNOCHKSUM(t) ((t) == NETCONN_UDPNOCHKSUM) -#endif /* LWIP_IPV6 */ - -/** @ingroup netconn_common - * Protocol family and type of the netconn - */ -enum netconn_type { - NETCONN_INVALID = 0, - /** TCP IPv4 */ - NETCONN_TCP = 0x10, -#if LWIP_IPV6 - /** TCP IPv6 */ - NETCONN_TCP_IPV6 = NETCONN_TCP | NETCONN_TYPE_IPV6 /* 0x18 */, -#endif /* LWIP_IPV6 */ - /** UDP IPv4 */ - NETCONN_UDP = 0x20, - /** UDP IPv4 lite */ - NETCONN_UDPLITE = 0x21, - /** UDP IPv4 no checksum */ - NETCONN_UDPNOCHKSUM = 0x22, - -#if LWIP_IPV6 - /** UDP IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ - NETCONN_UDP_IPV6 = NETCONN_UDP | NETCONN_TYPE_IPV6 /* 0x28 */, - /** UDP IPv6 lite (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ - NETCONN_UDPLITE_IPV6 = NETCONN_UDPLITE | NETCONN_TYPE_IPV6 /* 0x29 */, - /** UDP IPv6 no checksum (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ - NETCONN_UDPNOCHKSUM_IPV6 = NETCONN_UDPNOCHKSUM | NETCONN_TYPE_IPV6 /* 0x2a */, -#endif /* LWIP_IPV6 */ - - /** Raw connection IPv4 */ - NETCONN_RAW = 0x40 -#if LWIP_IPV6 - /** Raw connection IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ - , NETCONN_RAW_IPV6 = NETCONN_RAW | NETCONN_TYPE_IPV6 /* 0x48 */ -#endif /* LWIP_IPV6 */ -}; - -/** Current state of the netconn. Non-TCP netconns are always - * in state NETCONN_NONE! */ -enum netconn_state { - NETCONN_NONE, - NETCONN_WRITE, - NETCONN_LISTEN, - NETCONN_CONNECT, - NETCONN_CLOSE -}; - -/** Used to inform the callback function about changes - * - * Event explanation: - * - * In the netconn implementation, there are three ways to block a client: - * - * - accept mbox (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); in netconn_accept()) - * - receive mbox (sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); in netconn_recv_data()) - * - send queue is full (sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); in lwip_netconn_do_write()) - * - * The events have to be seen as events signaling the state of these mboxes/semaphores. For non-blocking - * connections, you need to know in advance whether a call to a netconn function call would block or not, - * and these events tell you about that. - * - * RCVPLUS events say: Safe to perform a potentially blocking call call once more. - * They are counted in sockets - three RCVPLUS events for accept mbox means you are safe - * to call netconn_accept 3 times without being blocked. - * Same thing for receive mbox. - * - * RCVMINUS events say: Your call to to a possibly blocking function is "acknowledged". - * Socket implementation decrements the counter. - * - * For TX, there is no need to count, its merely a flag. SENDPLUS means you may send something. - * SENDPLUS occurs when enough data was delivered to peer so netconn_send() can be called again. - * A SENDMINUS event occurs when the next call to a netconn_send() would be blocking. - */ -enum netconn_evt { - NETCONN_EVT_RCVPLUS, - NETCONN_EVT_RCVMINUS, - NETCONN_EVT_SENDPLUS, - NETCONN_EVT_SENDMINUS, - NETCONN_EVT_ERROR -}; - -#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) -/** Used for netconn_join_leave_group() */ -enum netconn_igmp { - NETCONN_JOIN, - NETCONN_LEAVE -}; -#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ - -#if LWIP_DNS -/* Used for netconn_gethostbyname_addrtype(), these should match the DNS_ADDRTYPE defines in dns.h */ -#define NETCONN_DNS_DEFAULT NETCONN_DNS_IPV4_IPV6 -#define NETCONN_DNS_IPV4 0 -#define NETCONN_DNS_IPV6 1 -#define NETCONN_DNS_IPV4_IPV6 2 /* try to resolve IPv4 first, try IPv6 if IPv4 fails only */ -#define NETCONN_DNS_IPV6_IPV4 3 /* try to resolve IPv6 first, try IPv4 if IPv6 fails only */ -#endif /* LWIP_DNS */ - -/* forward-declare some structs to avoid to include their headers */ -struct ip_pcb; -struct tcp_pcb; -struct udp_pcb; -struct raw_pcb; -struct netconn; -struct api_msg; - -/** A callback prototype to inform about events for a netconn */ -typedef void (* netconn_callback)(struct netconn *, enum netconn_evt, u16_t len); - -/** A netconn descriptor */ -struct netconn { - /** type of the netconn (TCP, UDP or RAW) */ - enum netconn_type type; - /** current state of the netconn */ - enum netconn_state state; - /** the lwIP internal protocol control block */ - union { - struct ip_pcb *ip; - struct tcp_pcb *tcp; - struct udp_pcb *udp; - struct raw_pcb *raw; - } pcb; - /** the last error this netconn had */ - err_t last_err; -#if !LWIP_NETCONN_SEM_PER_THREAD - /** sem that is used to synchronously execute functions in the core context */ - sys_sem_t op_completed; -#endif - /** mbox where received packets are stored until they are fetched - by the netconn application thread (can grow quite big) */ - sys_mbox_t recvmbox; -#if LWIP_TCP - /** mbox where new connections are stored until processed - by the application thread */ - sys_mbox_t acceptmbox; -#endif /* LWIP_TCP */ - /** only used for socket layer */ -#if LWIP_SOCKET - int socket; -#endif /* LWIP_SOCKET */ -#if LWIP_SO_SNDTIMEO - /** timeout to wait for sending data (which means enqueueing data for sending - in internal buffers) in milliseconds */ - s32_t send_timeout; -#endif /* LWIP_SO_RCVTIMEO */ -#if LWIP_SO_RCVTIMEO - /** timeout in milliseconds to wait for new data to be received - (or connections to arrive for listening netconns) */ - int recv_timeout; -#endif /* LWIP_SO_RCVTIMEO */ -#if LWIP_SO_RCVBUF - /** maximum amount of bytes queued in recvmbox - not used for TCP: adjust TCP_WND instead! */ - int recv_bufsize; - /** number of bytes currently in recvmbox to be received, - tested against recv_bufsize to limit bytes on recvmbox - for UDP and RAW, used for FIONREAD */ - int recv_avail; -#endif /* LWIP_SO_RCVBUF */ -#if LWIP_SO_LINGER - /** values <0 mean linger is disabled, values > 0 are seconds to linger */ - s16_t linger; -#endif /* LWIP_SO_LINGER */ - /** flags holding more netconn-internal state, see NETCONN_FLAG_* defines */ - u8_t flags; -#if LWIP_TCP - /** TCP: when data passed to netconn_write doesn't fit into the send buffer, - this temporarily stores how much is already sent. */ - size_t write_offset; - /** TCP: when data passed to netconn_write doesn't fit into the send buffer, - this temporarily stores the message. - Also used during connect and close. */ - struct api_msg *current_msg; -#endif /* LWIP_TCP */ - /** A callback function that is informed about events for this netconn */ - netconn_callback callback; -}; - -/** Register an Network connection event */ -#define API_EVENT(c,e,l) if (c->callback) { \ - (*c->callback)(c, e, l); \ - } - -/** Set conn->last_err to err but don't overwrite fatal errors */ -#define NETCONN_SET_SAFE_ERR(conn, err) do { if ((conn) != NULL) { \ - SYS_ARCH_DECL_PROTECT(netconn_set_safe_err_lev); \ - SYS_ARCH_PROTECT(netconn_set_safe_err_lev); \ - if (!ERR_IS_FATAL((conn)->last_err)) { \ - (conn)->last_err = err; \ - } \ - SYS_ARCH_UNPROTECT(netconn_set_safe_err_lev); \ -}} while(0); - -/* Network connection functions: */ - -/** @ingroup netconn_common - * Create new netconn connection - * @param t @ref netconn_type */ -#define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL) -#define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) -struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, - netconn_callback callback); -err_t netconn_delete(struct netconn *conn); -/** Get the type of a netconn (as enum netconn_type). */ -#define netconn_type(conn) (conn->type) - -err_t netconn_getaddr(struct netconn *conn, ip_addr_t *addr, - u16_t *port, u8_t local); -/** @ingroup netconn_common */ -#define netconn_peer(c,i,p) netconn_getaddr(c,i,p,0) -/** @ingroup netconn_common */ -#define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1) - -err_t netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port); -err_t netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port); -err_t netconn_disconnect (struct netconn *conn); -err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog); -/** @ingroup netconn_tcp */ -#define netconn_listen(conn) netconn_listen_with_backlog(conn, TCP_DEFAULT_LISTEN_BACKLOG) -err_t netconn_accept(struct netconn *conn, struct netconn **new_conn); -err_t netconn_recv(struct netconn *conn, struct netbuf **new_buf); -err_t netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf); -err_t netconn_sendto(struct netconn *conn, struct netbuf *buf, - const ip_addr_t *addr, u16_t port); -err_t netconn_send(struct netconn *conn, struct netbuf *buf); -err_t netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, - u8_t apiflags, size_t *bytes_written); -/** @ingroup netconn_tcp */ -#define netconn_write(conn, dataptr, size, apiflags) \ - netconn_write_partly(conn, dataptr, size, apiflags, NULL) -err_t netconn_close(struct netconn *conn); -err_t netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx); - -#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) -err_t netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr, - const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave); -#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ -#if LWIP_DNS -#if LWIP_IPV4 && LWIP_IPV6 -err_t netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype); -#define netconn_gethostbyname(name, addr) netconn_gethostbyname_addrtype(name, addr, NETCONN_DNS_DEFAULT) -#else /* LWIP_IPV4 && LWIP_IPV6 */ -err_t netconn_gethostbyname(const char *name, ip_addr_t *addr); -#define netconn_gethostbyname_addrtype(name, addr, dns_addrtype) netconn_gethostbyname(name, addr) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ -#endif /* LWIP_DNS */ - -#define netconn_err(conn) ((conn)->last_err) -#define netconn_recv_bufsize(conn) ((conn)->recv_bufsize) - -/** Set the blocking status of netconn calls (@todo: write/send is missing) */ -#define netconn_set_nonblocking(conn, val) do { if(val) { \ - (conn)->flags |= NETCONN_FLAG_NON_BLOCKING; \ -} else { \ - (conn)->flags &= ~ NETCONN_FLAG_NON_BLOCKING; }} while(0) -/** Get the blocking status of netconn calls (@todo: write/send is missing) */ -#define netconn_is_nonblocking(conn) (((conn)->flags & NETCONN_FLAG_NON_BLOCKING) != 0) - -#if LWIP_IPV6 -/** @ingroup netconn_common - * TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) - */ -#define netconn_set_ipv6only(conn, val) do { if(val) { \ - (conn)->flags |= NETCONN_FLAG_IPV6_V6ONLY; \ -} else { \ - (conn)->flags &= ~ NETCONN_FLAG_IPV6_V6ONLY; }} while(0) -/** @ingroup netconn_common - * TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) - */ -#define netconn_get_ipv6only(conn) (((conn)->flags & NETCONN_FLAG_IPV6_V6ONLY) != 0) -#endif /* LWIP_IPV6 */ - -#if LWIP_SO_SNDTIMEO -/** Set the send timeout in milliseconds */ -#define netconn_set_sendtimeout(conn, timeout) ((conn)->send_timeout = (timeout)) -/** Get the send timeout in milliseconds */ -#define netconn_get_sendtimeout(conn) ((conn)->send_timeout) -#endif /* LWIP_SO_SNDTIMEO */ -#if LWIP_SO_RCVTIMEO -/** Set the receive timeout in milliseconds */ -#define netconn_set_recvtimeout(conn, timeout) ((conn)->recv_timeout = (timeout)) -/** Get the receive timeout in milliseconds */ -#define netconn_get_recvtimeout(conn) ((conn)->recv_timeout) -#endif /* LWIP_SO_RCVTIMEO */ -#if LWIP_SO_RCVBUF -/** Set the receive buffer in bytes */ -#define netconn_set_recvbufsize(conn, recvbufsize) ((conn)->recv_bufsize = (recvbufsize)) -/** Get the receive buffer in bytes */ -#define netconn_get_recvbufsize(conn) ((conn)->recv_bufsize) -#endif /* LWIP_SO_RCVBUF*/ - -#if LWIP_NETCONN_SEM_PER_THREAD -void netconn_thread_init(void); -void netconn_thread_cleanup(void); -#else /* LWIP_NETCONN_SEM_PER_THREAD */ -#define netconn_thread_init() -#define netconn_thread_cleanup() -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_NETCONN || LWIP_SOCKET */ - -#endif /* LWIP_HDR_API_H */ +/** + * @file + * netconn API (to be used from non-TCPIP threads) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_API_H +#define LWIP_HDR_API_H + +#include "lwip/opt.h" + +#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ +/* Note: Netconn API is always available when sockets are enabled - + * sockets are implemented on top of them */ + +#include "lwip/arch.h" +#include "lwip/netbuf.h" +#include "lwip/sys.h" +#include "lwip/ip_addr.h" +#include "lwip/err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Throughout this file, IP addresses and port numbers are expected to be in + * the same byte order as in the corresponding pcb. + */ + +/* Flags for netconn_write (u8_t) */ +#define NETCONN_NOFLAG 0x00 +#define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */ +#define NETCONN_COPY 0x01 +#define NETCONN_MORE 0x02 +#define NETCONN_DONTBLOCK 0x04 + +/* Flags for struct netconn.flags (u8_t) */ +/** Should this netconn avoid blocking? */ +#define NETCONN_FLAG_NON_BLOCKING 0x02 +/** Was the last connect action a non-blocking one? */ +#define NETCONN_FLAG_IN_NONBLOCKING_CONNECT 0x04 +/** If a nonblocking write has been rejected before, poll_tcp needs to + check if the netconn is writable again */ +#define NETCONN_FLAG_CHECK_WRITESPACE 0x10 +#if LWIP_IPV6 +/** If this flag is set then only IPv6 communication is allowed on the + netconn. As per RFC#3493 this features defaults to OFF allowing + dual-stack usage by default. */ +#define NETCONN_FLAG_IPV6_V6ONLY 0x20 +#endif /* LWIP_IPV6 */ + + +/* Helpers to process several netconn_types by the same code */ +#define NETCONNTYPE_GROUP(t) ((t)&0xF0) +#define NETCONNTYPE_DATAGRAM(t) ((t)&0xE0) +#if LWIP_IPV6 +#define NETCONN_TYPE_IPV6 0x08 +#define NETCONNTYPE_ISIPV6(t) (((t)&NETCONN_TYPE_IPV6) != 0) +#define NETCONNTYPE_ISUDPLITE(t) (((t)&0xF3) == NETCONN_UDPLITE) +#define NETCONNTYPE_ISUDPNOCHKSUM(t) (((t)&0xF3) == NETCONN_UDPNOCHKSUM) +#else /* LWIP_IPV6 */ +#define NETCONNTYPE_ISIPV6(t) (0) +#define NETCONNTYPE_ISUDPLITE(t) ((t) == NETCONN_UDPLITE) +#define NETCONNTYPE_ISUDPNOCHKSUM(t) ((t) == NETCONN_UDPNOCHKSUM) +#endif /* LWIP_IPV6 */ + +/** @ingroup netconn_common + * Protocol family and type of the netconn + */ +enum netconn_type { + NETCONN_INVALID = 0, + /** TCP IPv4 */ + NETCONN_TCP = 0x10, +#if LWIP_IPV6 + /** TCP IPv6 */ + NETCONN_TCP_IPV6 = NETCONN_TCP | NETCONN_TYPE_IPV6 /* 0x18 */, +#endif /* LWIP_IPV6 */ + /** UDP IPv4 */ + NETCONN_UDP = 0x20, + /** UDP IPv4 lite */ + NETCONN_UDPLITE = 0x21, + /** UDP IPv4 no checksum */ + NETCONN_UDPNOCHKSUM = 0x22, + +#if LWIP_IPV6 + /** UDP IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ + NETCONN_UDP_IPV6 = NETCONN_UDP | NETCONN_TYPE_IPV6 /* 0x28 */, + /** UDP IPv6 lite (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ + NETCONN_UDPLITE_IPV6 = NETCONN_UDPLITE | NETCONN_TYPE_IPV6 /* 0x29 */, + /** UDP IPv6 no checksum (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ + NETCONN_UDPNOCHKSUM_IPV6 = NETCONN_UDPNOCHKSUM | NETCONN_TYPE_IPV6 /* 0x2a */, +#endif /* LWIP_IPV6 */ + + /** Raw connection IPv4 */ + NETCONN_RAW = 0x40 +#if LWIP_IPV6 + /** Raw connection IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ + , NETCONN_RAW_IPV6 = NETCONN_RAW | NETCONN_TYPE_IPV6 /* 0x48 */ +#endif /* LWIP_IPV6 */ +}; + +/** Current state of the netconn. Non-TCP netconns are always + * in state NETCONN_NONE! */ +enum netconn_state { + NETCONN_NONE, + NETCONN_WRITE, + NETCONN_LISTEN, + NETCONN_CONNECT, + NETCONN_CLOSE +}; + +/** Used to inform the callback function about changes + * + * Event explanation: + * + * In the netconn implementation, there are three ways to block a client: + * + * - accept mbox (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); in netconn_accept()) + * - receive mbox (sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); in netconn_recv_data()) + * - send queue is full (sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); in lwip_netconn_do_write()) + * + * The events have to be seen as events signaling the state of these mboxes/semaphores. For non-blocking + * connections, you need to know in advance whether a call to a netconn function call would block or not, + * and these events tell you about that. + * + * RCVPLUS events say: Safe to perform a potentially blocking call call once more. + * They are counted in sockets - three RCVPLUS events for accept mbox means you are safe + * to call netconn_accept 3 times without being blocked. + * Same thing for receive mbox. + * + * RCVMINUS events say: Your call to to a possibly blocking function is "acknowledged". + * Socket implementation decrements the counter. + * + * For TX, there is no need to count, its merely a flag. SENDPLUS means you may send something. + * SENDPLUS occurs when enough data was delivered to peer so netconn_send() can be called again. + * A SENDMINUS event occurs when the next call to a netconn_send() would be blocking. + */ +enum netconn_evt { + NETCONN_EVT_RCVPLUS, + NETCONN_EVT_RCVMINUS, + NETCONN_EVT_SENDPLUS, + NETCONN_EVT_SENDMINUS, + NETCONN_EVT_ERROR +}; + +#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) +/** Used for netconn_join_leave_group() */ +enum netconn_igmp { + NETCONN_JOIN, + NETCONN_LEAVE +}; +#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ + +#if LWIP_DNS +/* Used for netconn_gethostbyname_addrtype(), these should match the DNS_ADDRTYPE defines in dns.h */ +#define NETCONN_DNS_DEFAULT NETCONN_DNS_IPV4_IPV6 +#define NETCONN_DNS_IPV4 0 +#define NETCONN_DNS_IPV6 1 +#define NETCONN_DNS_IPV4_IPV6 2 /* try to resolve IPv4 first, try IPv6 if IPv4 fails only */ +#define NETCONN_DNS_IPV6_IPV4 3 /* try to resolve IPv6 first, try IPv4 if IPv6 fails only */ +#endif /* LWIP_DNS */ + +/* forward-declare some structs to avoid to include their headers */ +struct ip_pcb; +struct tcp_pcb; +struct udp_pcb; +struct raw_pcb; +struct netconn; +struct api_msg; + +/** A callback prototype to inform about events for a netconn */ +typedef void (* netconn_callback)(struct netconn *, enum netconn_evt, u16_t len); + +/** A netconn descriptor */ +struct netconn { + /** type of the netconn (TCP, UDP or RAW) */ + enum netconn_type type; + /** current state of the netconn */ + enum netconn_state state; + /** the lwIP internal protocol control block */ + union { + struct ip_pcb *ip; + struct tcp_pcb *tcp; + struct udp_pcb *udp; + struct raw_pcb *raw; + } pcb; + /** the last error this netconn had */ + err_t last_err; +#if !LWIP_NETCONN_SEM_PER_THREAD + /** sem that is used to synchronously execute functions in the core context */ + sys_sem_t op_completed; +#endif + /** mbox where received packets are stored until they are fetched + by the netconn application thread (can grow quite big) */ + sys_mbox_t recvmbox; +#if LWIP_TCP + /** mbox where new connections are stored until processed + by the application thread */ + sys_mbox_t acceptmbox; +#endif /* LWIP_TCP */ + /** only used for socket layer */ +#if LWIP_SOCKET + int socket; +#endif /* LWIP_SOCKET */ +#if LWIP_SO_SNDTIMEO + /** timeout to wait for sending data (which means enqueueing data for sending + in internal buffers) in milliseconds */ + s32_t send_timeout; +#endif /* LWIP_SO_RCVTIMEO */ +#if LWIP_SO_RCVTIMEO + /** timeout in milliseconds to wait for new data to be received + (or connections to arrive for listening netconns) */ + int recv_timeout; +#endif /* LWIP_SO_RCVTIMEO */ +#if LWIP_SO_RCVBUF + /** maximum amount of bytes queued in recvmbox + not used for TCP: adjust TCP_WND instead! */ + int recv_bufsize; + /** number of bytes currently in recvmbox to be received, + tested against recv_bufsize to limit bytes on recvmbox + for UDP and RAW, used for FIONREAD */ + int recv_avail; +#endif /* LWIP_SO_RCVBUF */ +#if LWIP_SO_LINGER + /** values <0 mean linger is disabled, values > 0 are seconds to linger */ + s16_t linger; +#endif /* LWIP_SO_LINGER */ + /** flags holding more netconn-internal state, see NETCONN_FLAG_* defines */ + u8_t flags; +#if LWIP_TCP + /** TCP: when data passed to netconn_write doesn't fit into the send buffer, + this temporarily stores how much is already sent. */ + size_t write_offset; + /** TCP: when data passed to netconn_write doesn't fit into the send buffer, + this temporarily stores the message. + Also used during connect and close. */ + struct api_msg *current_msg; +#endif /* LWIP_TCP */ + /** A callback function that is informed about events for this netconn */ + netconn_callback callback; +}; + +/** Register an Network connection event */ +#define API_EVENT(c,e,l) if (c->callback) { \ + (*c->callback)(c, e, l); \ + } + +/** Set conn->last_err to err but don't overwrite fatal errors */ +#define NETCONN_SET_SAFE_ERR(conn, err) do { if ((conn) != NULL) { \ + SYS_ARCH_DECL_PROTECT(netconn_set_safe_err_lev); \ + SYS_ARCH_PROTECT(netconn_set_safe_err_lev); \ + if (!ERR_IS_FATAL((conn)->last_err)) { \ + (conn)->last_err = err; \ + } \ + SYS_ARCH_UNPROTECT(netconn_set_safe_err_lev); \ +}} while(0); + +/* Network connection functions: */ + +/** @ingroup netconn_common + * Create new netconn connection + * @param t @ref netconn_type */ +#define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL) +#define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) +struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, + netconn_callback callback); +err_t netconn_delete(struct netconn *conn); +/** Get the type of a netconn (as enum netconn_type). */ +#define netconn_type(conn) (conn->type) + +err_t netconn_getaddr(struct netconn *conn, ip_addr_t *addr, + u16_t *port, u8_t local); +/** @ingroup netconn_common */ +#define netconn_peer(c,i,p) netconn_getaddr(c,i,p,0) +/** @ingroup netconn_common */ +#define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1) + +err_t netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port); +err_t netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port); +err_t netconn_disconnect (struct netconn *conn); +err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog); +/** @ingroup netconn_tcp */ +#define netconn_listen(conn) netconn_listen_with_backlog(conn, TCP_DEFAULT_LISTEN_BACKLOG) +err_t netconn_accept(struct netconn *conn, struct netconn **new_conn); +err_t netconn_recv(struct netconn *conn, struct netbuf **new_buf); +err_t netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf); +err_t netconn_sendto(struct netconn *conn, struct netbuf *buf, + const ip_addr_t *addr, u16_t port); +err_t netconn_send(struct netconn *conn, struct netbuf *buf); +err_t netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, + u8_t apiflags, size_t *bytes_written); +/** @ingroup netconn_tcp */ +#define netconn_write(conn, dataptr, size, apiflags) \ + netconn_write_partly(conn, dataptr, size, apiflags, NULL) +err_t netconn_close(struct netconn *conn); +err_t netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx); + +#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) +err_t netconn_join_leave_group(struct netconn *conn, const ip_addr_t *multiaddr, + const ip_addr_t *netif_addr, enum netconn_igmp join_or_leave); +#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ +#if LWIP_DNS +#if LWIP_IPV4 && LWIP_IPV6 +err_t netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t dns_addrtype); +#define netconn_gethostbyname(name, addr) netconn_gethostbyname_addrtype(name, addr, NETCONN_DNS_DEFAULT) +#else /* LWIP_IPV4 && LWIP_IPV6 */ +err_t netconn_gethostbyname(const char *name, ip_addr_t *addr); +#define netconn_gethostbyname_addrtype(name, addr, dns_addrtype) netconn_gethostbyname(name, addr) +#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#endif /* LWIP_DNS */ + +#define netconn_err(conn) ((conn)->last_err) +#define netconn_recv_bufsize(conn) ((conn)->recv_bufsize) + +/** Set the blocking status of netconn calls (@todo: write/send is missing) */ +#define netconn_set_nonblocking(conn, val) do { if(val) { \ + (conn)->flags |= NETCONN_FLAG_NON_BLOCKING; \ +} else { \ + (conn)->flags &= ~ NETCONN_FLAG_NON_BLOCKING; }} while(0) +/** Get the blocking status of netconn calls (@todo: write/send is missing) */ +#define netconn_is_nonblocking(conn) (((conn)->flags & NETCONN_FLAG_NON_BLOCKING) != 0) + +#if LWIP_IPV6 +/** @ingroup netconn_common + * TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) + */ +#define netconn_set_ipv6only(conn, val) do { if(val) { \ + (conn)->flags |= NETCONN_FLAG_IPV6_V6ONLY; \ +} else { \ + (conn)->flags &= ~ NETCONN_FLAG_IPV6_V6ONLY; }} while(0) +/** @ingroup netconn_common + * TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) + */ +#define netconn_get_ipv6only(conn) (((conn)->flags & NETCONN_FLAG_IPV6_V6ONLY) != 0) +#endif /* LWIP_IPV6 */ + +#if LWIP_SO_SNDTIMEO +/** Set the send timeout in milliseconds */ +#define netconn_set_sendtimeout(conn, timeout) ((conn)->send_timeout = (timeout)) +/** Get the send timeout in milliseconds */ +#define netconn_get_sendtimeout(conn) ((conn)->send_timeout) +#endif /* LWIP_SO_SNDTIMEO */ +#if LWIP_SO_RCVTIMEO +/** Set the receive timeout in milliseconds */ +#define netconn_set_recvtimeout(conn, timeout) ((conn)->recv_timeout = (timeout)) +/** Get the receive timeout in milliseconds */ +#define netconn_get_recvtimeout(conn) ((conn)->recv_timeout) +#endif /* LWIP_SO_RCVTIMEO */ +#if LWIP_SO_RCVBUF +/** Set the receive buffer in bytes */ +#define netconn_set_recvbufsize(conn, recvbufsize) ((conn)->recv_bufsize = (recvbufsize)) +/** Get the receive buffer in bytes */ +#define netconn_get_recvbufsize(conn) ((conn)->recv_bufsize) +#endif /* LWIP_SO_RCVBUF*/ + +#if LWIP_NETCONN_SEM_PER_THREAD +void netconn_thread_init(void); +void netconn_thread_cleanup(void); +#else /* LWIP_NETCONN_SEM_PER_THREAD */ +#define netconn_thread_init() +#define netconn_thread_cleanup() +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_NETCONN || LWIP_SOCKET */ + +#endif /* LWIP_HDR_API_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/fs.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/fs.h index bb176fa..0283a0b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/fs.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/fs.h @@ -1,103 +1,103 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_APPS_FS_H -#define LWIP_HDR_APPS_FS_H - -#include "httpd_opts.h" -#include "lwip/err.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define FS_READ_EOF -1 -#define FS_READ_DELAYED -2 - -#if HTTPD_PRECALCULATED_CHECKSUM -struct fsdata_chksum { - u32_t offset; - u16_t chksum; - u16_t len; -}; -#endif /* HTTPD_PRECALCULATED_CHECKSUM */ - -#define FS_FILE_FLAGS_HEADER_INCLUDED 0x01 -#define FS_FILE_FLAGS_HEADER_PERSISTENT 0x02 - -struct fs_file { - const char *data; - int len; - int index; - void *pextension; -#if HTTPD_PRECALCULATED_CHECKSUM - const struct fsdata_chksum *chksum; - u16_t chksum_count; -#endif /* HTTPD_PRECALCULATED_CHECKSUM */ - u8_t flags; -#if LWIP_HTTPD_CUSTOM_FILES - u8_t is_custom_file; -#endif /* LWIP_HTTPD_CUSTOM_FILES */ -#if LWIP_HTTPD_FILE_STATE - void *state; -#endif /* LWIP_HTTPD_FILE_STATE */ -}; - -#if LWIP_HTTPD_FS_ASYNC_READ -typedef void (*fs_wait_cb)(void *arg); -#endif /* LWIP_HTTPD_FS_ASYNC_READ */ - -err_t fs_open(struct fs_file *file, const char *name); -void fs_close(struct fs_file *file); -#if LWIP_HTTPD_DYNAMIC_FILE_READ -#if LWIP_HTTPD_FS_ASYNC_READ -int fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); -#else /* LWIP_HTTPD_FS_ASYNC_READ */ -int fs_read(struct fs_file *file, char *buffer, int count); -#endif /* LWIP_HTTPD_FS_ASYNC_READ */ -#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ -#if LWIP_HTTPD_FS_ASYNC_READ -int fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); -#endif /* LWIP_HTTPD_FS_ASYNC_READ */ -int fs_bytes_left(struct fs_file *file); - -#if LWIP_HTTPD_FILE_STATE -/** This user-defined function is called when a file is opened. */ -void *fs_state_init(struct fs_file *file, const char *name); -/** This user-defined function is called when a file is closed. */ -void fs_state_free(struct fs_file *file, void *state); -#endif /* #if LWIP_HTTPD_FILE_STATE */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_FS_H */ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_APPS_FS_H +#define LWIP_HDR_APPS_FS_H + +#include "httpd_opts.h" +#include "lwip/err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define FS_READ_EOF -1 +#define FS_READ_DELAYED -2 + +#if HTTPD_PRECALCULATED_CHECKSUM +struct fsdata_chksum { + u32_t offset; + u16_t chksum; + u16_t len; +}; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ + +#define FS_FILE_FLAGS_HEADER_INCLUDED 0x01 +#define FS_FILE_FLAGS_HEADER_PERSISTENT 0x02 + +struct fs_file { + const char *data; + int len; + int index; + void *pextension; +#if HTTPD_PRECALCULATED_CHECKSUM + const struct fsdata_chksum *chksum; + u16_t chksum_count; +#endif /* HTTPD_PRECALCULATED_CHECKSUM */ + u8_t flags; +#if LWIP_HTTPD_CUSTOM_FILES + u8_t is_custom_file; +#endif /* LWIP_HTTPD_CUSTOM_FILES */ +#if LWIP_HTTPD_FILE_STATE + void *state; +#endif /* LWIP_HTTPD_FILE_STATE */ +}; + +#if LWIP_HTTPD_FS_ASYNC_READ +typedef void (*fs_wait_cb)(void *arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ + +err_t fs_open(struct fs_file *file, const char *name); +void fs_close(struct fs_file *file); +#if LWIP_HTTPD_DYNAMIC_FILE_READ +#if LWIP_HTTPD_FS_ASYNC_READ +int fs_read_async(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_DYNAMIC_FILE_READ */ +#if LWIP_HTTPD_FS_ASYNC_READ +int fs_is_file_ready(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_bytes_left(struct fs_file *file); + +#if LWIP_HTTPD_FILE_STATE +/** This user-defined function is called when a file is opened. */ +void *fs_state_init(struct fs_file *file, const char *name); +/** This user-defined function is called when a file is closed. */ +void fs_state_free(struct fs_file *file, void *state); +#endif /* #if LWIP_HTTPD_FILE_STATE */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_FS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd.h index 40f1811..57831dd 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd.h @@ -1,236 +1,236 @@ -/** - * @file - * HTTP server - */ - -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - * This version of the file has been modified by Texas Instruments to offer - * simple server-side-include (SSI) and Common Gateway Interface (CGI) - * capability. - */ - -#ifndef LWIP_HDR_APPS_HTTPD_H -#define LWIP_HDR_APPS_HTTPD_H - -#include "httpd_opts.h" -#include "lwip/err.h" -#include "lwip/pbuf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_HTTPD_CGI - -/* - * Function pointer for a CGI script handler. - * - * This function is called each time the HTTPD server is asked for a file - * whose name was previously registered as a CGI function using a call to - * http_set_cgi_handler. The iIndex parameter provides the index of the - * CGI within the ppcURLs array passed to http_set_cgi_handler. Parameters - * pcParam and pcValue provide access to the parameters provided along with - * the URI. iNumParams provides a count of the entries in the pcParam and - * pcValue arrays. Each entry in the pcParam array contains the name of a - * parameter with the corresponding entry in the pcValue array containing the - * value for that parameter. Note that pcParam may contain multiple elements - * with the same name if, for example, a multi-selection list control is used - * in the form generating the data. - * - * The function should return a pointer to a character string which is the - * path and filename of the response that is to be sent to the connected - * browser, for example "/thanks.htm" or "/response/error.ssi". - * - * The maximum number of parameters that will be passed to this function via - * iNumParams is defined by LWIP_HTTPD_MAX_CGI_PARAMETERS. Any parameters in the incoming - * HTTP request above this number will be discarded. - * - * Requests intended for use by this CGI mechanism must be sent using the GET - * method (which encodes all parameters within the URI rather than in a block - * later in the request). Attempts to use the POST method will result in the - * request being ignored. - * - */ -typedef const char *(*tCGIHandler)(int iIndex, int iNumParams, char *pcParam[], - char *pcValue[]); - -/* - * Structure defining the base filename (URL) of a CGI and the associated - * function which is to be called when that URL is requested. - */ -typedef struct -{ - const char *pcCGIName; - tCGIHandler pfnCGIHandler; -} tCGI; - -void http_set_cgi_handlers(const tCGI *pCGIs, int iNumHandlers); - -#endif /* LWIP_HTTPD_CGI */ - -#if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI - -#if LWIP_HTTPD_CGI_SSI -/** Define this generic CGI handler in your application. - * It is called once for every URI with parameters. - * The parameters can be stored to - */ -extern void httpd_cgi_handler(const char* uri, int iNumParams, char **pcParam, char **pcValue -#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE - , void *connection_state -#endif /* LWIP_HTTPD_FILE_STATE */ - ); -#endif /* LWIP_HTTPD_CGI_SSI */ - -#endif /* LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI */ - -#if LWIP_HTTPD_SSI - -/* - * Function pointer for the SSI tag handler callback. - * - * This function will be called each time the HTTPD server detects a tag of the - * form in a .shtml, .ssi or .shtm file where "name" appears as - * one of the tags supplied to http_set_ssi_handler in the ppcTags array. The - * returned insert string, which will be appended after the the string - * "" in file sent back to the client,should be written to pointer - * pcInsert. iInsertLen contains the size of the buffer pointed to by - * pcInsert. The iIndex parameter provides the zero-based index of the tag as - * found in the ppcTags array and identifies the tag that is to be processed. - * - * The handler returns the number of characters written to pcInsert excluding - * any terminating NULL or a negative number to indicate a failure (tag not - * recognized, for example). - * - * Note that the behavior of this SSI mechanism is somewhat different from the - * "normal" SSI processing as found in, for example, the Apache web server. In - * this case, the inserted text is appended following the SSI tag rather than - * replacing the tag entirely. This allows for an implementation that does not - * require significant additional buffering of output data yet which will still - * offer usable SSI functionality. One downside to this approach is when - * attempting to use SSI within JavaScript. The SSI tag is structured to - * resemble an HTML comment but this syntax does not constitute a comment - * within JavaScript and, hence, leaving the tag in place will result in - * problems in these cases. To work around this, any SSI tag which needs to - * output JavaScript code must do so in an encapsulated way, sending the whole - * HTML section as a single include. - */ -typedef u16_t (*tSSIHandler)( -#if LWIP_HTTPD_SSI_RAW - const char* ssi_tag_name, -#else /* LWIP_HTTPD_SSI_RAW */ - int iIndex, -#endif /* LWIP_HTTPD_SSI_RAW */ - char *pcInsert, int iInsertLen -#if LWIP_HTTPD_SSI_MULTIPART - , u16_t current_tag_part, u16_t *next_tag_part -#endif /* LWIP_HTTPD_SSI_MULTIPART */ -#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE - , void *connection_state -#endif /* LWIP_HTTPD_FILE_STATE */ - ); - -/** Set the SSI handler function - * (if LWIP_HTTPD_SSI_RAW==1, only the first argument is used) - */ -void http_set_ssi_handler(tSSIHandler pfnSSIHandler, - const char **ppcTags, int iNumTags); - -/** For LWIP_HTTPD_SSI_RAW==1, return this to indicate the tag is unknown. - * In this case, the webserver writes a warning into the page. - * You can also just return 0 to write nothing for unknown tags. - */ -#define HTTPD_SSI_TAG_UNKNOWN 0xFFFF - -#endif /* LWIP_HTTPD_SSI */ - -#if LWIP_HTTPD_SUPPORT_POST - -/* These functions must be implemented by the application */ - -/** Called when a POST request has been received. The application can decide - * whether to accept it or not. - * - * @param connection Unique connection identifier, valid until httpd_post_end - * is called. - * @param uri The HTTP header URI receiving the POST request. - * @param http_request The raw HTTP request (the first packet, normally). - * @param http_request_len Size of 'http_request'. - * @param content_len Content-Length from HTTP header. - * @param response_uri Filename of response file, to be filled when denying the - * request - * @param response_uri_len Size of the 'response_uri' buffer. - * @param post_auto_wnd Set this to 0 to let the callback code handle window - * updates by calling 'httpd_post_data_recved' (to throttle rx speed) - * default is 1 (httpd handles window updates automatically) - * @return ERR_OK: Accept the POST request, data may be passed in - * another err_t: Deny the POST request, send back 'bad request'. - */ -err_t httpd_post_begin(void *connection, const char *uri, const char *http_request, - u16_t http_request_len, int content_len, char *response_uri, - u16_t response_uri_len, u8_t *post_auto_wnd); - -/** Called for each pbuf of data that has been received for a POST. - * ATTENTION: The application is responsible for freeing the pbufs passed in! - * - * @param connection Unique connection identifier. - * @param p Received data. - * @return ERR_OK: Data accepted. - * another err_t: Data denied, http_post_get_response_uri will be called. - */ -err_t httpd_post_receive_data(void *connection, struct pbuf *p); - -/** Called when all data is received or when the connection is closed. - * The application must return the filename/URI of a file to send in response - * to this POST request. If the response_uri buffer is untouched, a 404 - * response is returned. - * - * @param connection Unique connection identifier. - * @param response_uri Filename of response file, to be filled when denying the request - * @param response_uri_len Size of the 'response_uri' buffer. - */ -void httpd_post_finished(void *connection, char *response_uri, u16_t response_uri_len); - -#if LWIP_HTTPD_POST_MANUAL_WND -void httpd_post_data_recved(void *connection, u16_t recved_len); -#endif /* LWIP_HTTPD_POST_MANUAL_WND */ - -#endif /* LWIP_HTTPD_SUPPORT_POST */ - -void httpd_init(void); - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HTTPD_H */ +/** + * @file + * HTTP server + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + * This version of the file has been modified by Texas Instruments to offer + * simple server-side-include (SSI) and Common Gateway Interface (CGI) + * capability. + */ + +#ifndef LWIP_HDR_APPS_HTTPD_H +#define LWIP_HDR_APPS_HTTPD_H + +#include "httpd_opts.h" +#include "lwip/err.h" +#include "lwip/pbuf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_HTTPD_CGI + +/* + * Function pointer for a CGI script handler. + * + * This function is called each time the HTTPD server is asked for a file + * whose name was previously registered as a CGI function using a call to + * http_set_cgi_handler. The iIndex parameter provides the index of the + * CGI within the ppcURLs array passed to http_set_cgi_handler. Parameters + * pcParam and pcValue provide access to the parameters provided along with + * the URI. iNumParams provides a count of the entries in the pcParam and + * pcValue arrays. Each entry in the pcParam array contains the name of a + * parameter with the corresponding entry in the pcValue array containing the + * value for that parameter. Note that pcParam may contain multiple elements + * with the same name if, for example, a multi-selection list control is used + * in the form generating the data. + * + * The function should return a pointer to a character string which is the + * path and filename of the response that is to be sent to the connected + * browser, for example "/thanks.htm" or "/response/error.ssi". + * + * The maximum number of parameters that will be passed to this function via + * iNumParams is defined by LWIP_HTTPD_MAX_CGI_PARAMETERS. Any parameters in the incoming + * HTTP request above this number will be discarded. + * + * Requests intended for use by this CGI mechanism must be sent using the GET + * method (which encodes all parameters within the URI rather than in a block + * later in the request). Attempts to use the POST method will result in the + * request being ignored. + * + */ +typedef const char *(*tCGIHandler)(int iIndex, int iNumParams, char *pcParam[], + char *pcValue[]); + +/* + * Structure defining the base filename (URL) of a CGI and the associated + * function which is to be called when that URL is requested. + */ +typedef struct +{ + const char *pcCGIName; + tCGIHandler pfnCGIHandler; +} tCGI; + +void http_set_cgi_handlers(const tCGI *pCGIs, int iNumHandlers); + +#endif /* LWIP_HTTPD_CGI */ + +#if LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI + +#if LWIP_HTTPD_CGI_SSI +/** Define this generic CGI handler in your application. + * It is called once for every URI with parameters. + * The parameters can be stored to + */ +extern void httpd_cgi_handler(const char* uri, int iNumParams, char **pcParam, char **pcValue +#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE + , void *connection_state +#endif /* LWIP_HTTPD_FILE_STATE */ + ); +#endif /* LWIP_HTTPD_CGI_SSI */ + +#endif /* LWIP_HTTPD_CGI || LWIP_HTTPD_CGI_SSI */ + +#if LWIP_HTTPD_SSI + +/* + * Function pointer for the SSI tag handler callback. + * + * This function will be called each time the HTTPD server detects a tag of the + * form in a .shtml, .ssi or .shtm file where "name" appears as + * one of the tags supplied to http_set_ssi_handler in the ppcTags array. The + * returned insert string, which will be appended after the the string + * "" in file sent back to the client,should be written to pointer + * pcInsert. iInsertLen contains the size of the buffer pointed to by + * pcInsert. The iIndex parameter provides the zero-based index of the tag as + * found in the ppcTags array and identifies the tag that is to be processed. + * + * The handler returns the number of characters written to pcInsert excluding + * any terminating NULL or a negative number to indicate a failure (tag not + * recognized, for example). + * + * Note that the behavior of this SSI mechanism is somewhat different from the + * "normal" SSI processing as found in, for example, the Apache web server. In + * this case, the inserted text is appended following the SSI tag rather than + * replacing the tag entirely. This allows for an implementation that does not + * require significant additional buffering of output data yet which will still + * offer usable SSI functionality. One downside to this approach is when + * attempting to use SSI within JavaScript. The SSI tag is structured to + * resemble an HTML comment but this syntax does not constitute a comment + * within JavaScript and, hence, leaving the tag in place will result in + * problems in these cases. To work around this, any SSI tag which needs to + * output JavaScript code must do so in an encapsulated way, sending the whole + * HTML section as a single include. + */ +typedef u16_t (*tSSIHandler)( +#if LWIP_HTTPD_SSI_RAW + const char* ssi_tag_name, +#else /* LWIP_HTTPD_SSI_RAW */ + int iIndex, +#endif /* LWIP_HTTPD_SSI_RAW */ + char *pcInsert, int iInsertLen +#if LWIP_HTTPD_SSI_MULTIPART + , u16_t current_tag_part, u16_t *next_tag_part +#endif /* LWIP_HTTPD_SSI_MULTIPART */ +#if defined(LWIP_HTTPD_FILE_STATE) && LWIP_HTTPD_FILE_STATE + , void *connection_state +#endif /* LWIP_HTTPD_FILE_STATE */ + ); + +/** Set the SSI handler function + * (if LWIP_HTTPD_SSI_RAW==1, only the first argument is used) + */ +void http_set_ssi_handler(tSSIHandler pfnSSIHandler, + const char **ppcTags, int iNumTags); + +/** For LWIP_HTTPD_SSI_RAW==1, return this to indicate the tag is unknown. + * In this case, the webserver writes a warning into the page. + * You can also just return 0 to write nothing for unknown tags. + */ +#define HTTPD_SSI_TAG_UNKNOWN 0xFFFF + +#endif /* LWIP_HTTPD_SSI */ + +#if LWIP_HTTPD_SUPPORT_POST + +/* These functions must be implemented by the application */ + +/** Called when a POST request has been received. The application can decide + * whether to accept it or not. + * + * @param connection Unique connection identifier, valid until httpd_post_end + * is called. + * @param uri The HTTP header URI receiving the POST request. + * @param http_request The raw HTTP request (the first packet, normally). + * @param http_request_len Size of 'http_request'. + * @param content_len Content-Length from HTTP header. + * @param response_uri Filename of response file, to be filled when denying the + * request + * @param response_uri_len Size of the 'response_uri' buffer. + * @param post_auto_wnd Set this to 0 to let the callback code handle window + * updates by calling 'httpd_post_data_recved' (to throttle rx speed) + * default is 1 (httpd handles window updates automatically) + * @return ERR_OK: Accept the POST request, data may be passed in + * another err_t: Deny the POST request, send back 'bad request'. + */ +err_t httpd_post_begin(void *connection, const char *uri, const char *http_request, + u16_t http_request_len, int content_len, char *response_uri, + u16_t response_uri_len, u8_t *post_auto_wnd); + +/** Called for each pbuf of data that has been received for a POST. + * ATTENTION: The application is responsible for freeing the pbufs passed in! + * + * @param connection Unique connection identifier. + * @param p Received data. + * @return ERR_OK: Data accepted. + * another err_t: Data denied, http_post_get_response_uri will be called. + */ +err_t httpd_post_receive_data(void *connection, struct pbuf *p); + +/** Called when all data is received or when the connection is closed. + * The application must return the filename/URI of a file to send in response + * to this POST request. If the response_uri buffer is untouched, a 404 + * response is returned. + * + * @param connection Unique connection identifier. + * @param response_uri Filename of response file, to be filled when denying the request + * @param response_uri_len Size of the 'response_uri' buffer. + */ +void httpd_post_finished(void *connection, char *response_uri, u16_t response_uri_len); + +#if LWIP_HTTPD_POST_MANUAL_WND +void httpd_post_data_recved(void *connection, u16_t recved_len); +#endif /* LWIP_HTTPD_POST_MANUAL_WND */ + +#endif /* LWIP_HTTPD_SUPPORT_POST */ + +void httpd_init(void); + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HTTPD_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd_opts.h index 2506080..7d085c4 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/httpd_opts.h @@ -1,322 +1,322 @@ -/** - * @file - * HTTP server options list - */ - -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - * This version of the file has been modified by Texas Instruments to offer - * simple server-side-include (SSI) and Common Gateway Interface (CGI) - * capability. - */ - -#ifndef LWIP_HDR_APPS_HTTPD_OPTS_H -#define LWIP_HDR_APPS_HTTPD_OPTS_H - -#include "lwip/opt.h" - -/** - * @defgroup httpd_opts Options - * @ingroup httpd - * @{ - */ - -/** Set this to 1 to support CGI (old style) */ -#if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__ -#define LWIP_HTTPD_CGI 0 -#endif - -/** Set this to 1 to support CGI (new style) */ -#if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__ -#define LWIP_HTTPD_CGI_SSI 0 -#endif - -/** Set this to 1 to support SSI (Server-Side-Includes) */ -#if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__ -#define LWIP_HTTPD_SSI 0 -#endif - -/** Set this to 1 to implement an SSI tag handler callback that gets a const char* - * to the tag (instead of an index into a pre-registered array of known tags) */ -#if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__ -#define LWIP_HTTPD_SSI_RAW 0 -#endif - -/** Set this to 1 to support HTTP POST */ -#if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__ -#define LWIP_HTTPD_SUPPORT_POST 0 -#endif - -/* The maximum number of parameters that the CGI handler can be sent. */ -#if !defined LWIP_HTTPD_MAX_CGI_PARAMETERS || defined __DOXYGEN__ -#define LWIP_HTTPD_MAX_CGI_PARAMETERS 16 -#endif - -/** LWIP_HTTPD_SSI_MULTIPART==1: SSI handler function is called with 2 more - * arguments indicating a counter for insert string that are too long to be - * inserted at once: the SSI handler function must then set 'next_tag_part' - * which will be passed back to it in the next call. */ -#if !defined LWIP_HTTPD_SSI_MULTIPART || defined __DOXYGEN__ -#define LWIP_HTTPD_SSI_MULTIPART 0 -#endif - -/* The maximum length of the string comprising the tag name */ -#if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__ -#define LWIP_HTTPD_MAX_TAG_NAME_LEN 8 -#endif - -/* The maximum length of string that can be returned to replace any given tag */ -#if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__ -#define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192 -#endif - -#if !defined LWIP_HTTPD_POST_MANUAL_WND || defined __DOXYGEN__ -#define LWIP_HTTPD_POST_MANUAL_WND 0 -#endif - -/** This string is passed in the HTTP header as "Server: " */ -#if !defined HTTPD_SERVER_AGENT || defined __DOXYGEN__ -#define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" -#endif - -/** Set this to 1 if you want to include code that creates HTTP headers - * at runtime. Default is off: HTTP headers are then created statically - * by the makefsdata tool. Static headers mean smaller code size, but - * the (readonly) fsdata will grow a bit as every file includes the HTTP - * header. */ -#if !defined LWIP_HTTPD_DYNAMIC_HEADERS || defined __DOXYGEN__ -#define LWIP_HTTPD_DYNAMIC_HEADERS 0 -#endif - -#if !defined HTTPD_DEBUG || defined __DOXYGEN__ -#define HTTPD_DEBUG LWIP_DBG_OFF -#endif - -/** Set this to 1 to use a memp pool for allocating - * struct http_state instead of the heap. - */ -#if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__ -#define HTTPD_USE_MEM_POOL 0 -#endif - -/** The server port for HTTPD to use */ -#if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__ -#define HTTPD_SERVER_PORT 80 -#endif - -/** Maximum retries before the connection is aborted/closed. - * - number of times pcb->poll is called -> default is 4*500ms = 2s; - * - reset when pcb->sent is called - */ -#if !defined HTTPD_MAX_RETRIES || defined __DOXYGEN__ -#define HTTPD_MAX_RETRIES 4 -#endif - -/** The poll delay is X*500ms */ -#if !defined HTTPD_POLL_INTERVAL || defined __DOXYGEN__ -#define HTTPD_POLL_INTERVAL 4 -#endif - -/** Priority for tcp pcbs created by HTTPD (very low by default). - * Lower priorities get killed first when running out of memory. - */ -#if !defined HTTPD_TCP_PRIO || defined __DOXYGEN__ -#define HTTPD_TCP_PRIO TCP_PRIO_MIN -#endif - -/** Set this to 1 to enable timing each file sent */ -#if !defined LWIP_HTTPD_TIMING || defined __DOXYGEN__ -#define LWIP_HTTPD_TIMING 0 -#endif -/** Set this to 1 to enable timing each file sent */ -#if !defined HTTPD_DEBUG_TIMING || defined __DOXYGEN__ -#define HTTPD_DEBUG_TIMING LWIP_DBG_OFF -#endif - -/** Set this to one to show error pages when parsing a request fails instead - of simply closing the connection. */ -#if !defined LWIP_HTTPD_SUPPORT_EXTSTATUS || defined __DOXYGEN__ -#define LWIP_HTTPD_SUPPORT_EXTSTATUS 0 -#endif - -/** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */ -#if !defined LWIP_HTTPD_SUPPORT_V09 || defined __DOXYGEN__ -#define LWIP_HTTPD_SUPPORT_V09 1 -#endif - -/** Set this to 1 to enable HTTP/1.1 persistent connections. - * ATTENTION: If the generated file system includes HTTP headers, these must - * include the "Connection: keep-alive" header (pass argument "-11" to makefsdata). - */ -#if !defined LWIP_HTTPD_SUPPORT_11_KEEPALIVE || defined __DOXYGEN__ -#define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0 -#endif - -/** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */ -#if !defined LWIP_HTTPD_SUPPORT_REQUESTLIST || defined __DOXYGEN__ -#define LWIP_HTTPD_SUPPORT_REQUESTLIST 1 -#endif - -#if LWIP_HTTPD_SUPPORT_REQUESTLIST -/** Number of rx pbufs to enqueue to parse an incoming request (up to the first - newline) */ -#if !defined LWIP_HTTPD_REQ_QUEUELEN || defined __DOXYGEN__ -#define LWIP_HTTPD_REQ_QUEUELEN 5 -#endif - -/** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming - request (up to the first double-newline) */ -#if !defined LWIP_HTTPD_REQ_BUFSIZE || defined __DOXYGEN__ -#define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH -#endif - -/** Defines the maximum length of a HTTP request line (up to the first CRLF, - copied from pbuf into this a global buffer when pbuf- or packet-queues - are received - otherwise the input pbuf is used directly) */ -#if !defined LWIP_HTTPD_MAX_REQ_LENGTH || defined __DOXYGEN__ -#define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE)) -#endif -#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ - -/** This is the size of a static buffer used when URIs end with '/'. - * In this buffer, the directory requested is concatenated with all the - * configured default file names. - * Set to 0 to disable checking default filenames on non-root directories. - */ -#if !defined LWIP_HTTPD_MAX_REQUEST_URI_LEN || defined __DOXYGEN__ -#define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63 -#endif - -/** Maximum length of the filename to send as response to a POST request, - * filled in by the application when a POST is finished. - */ -#if !defined LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN || defined __DOXYGEN__ -#define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63 -#endif - -/** Set this to 0 to not send the SSI tag (default is on, so the tag will - * be sent in the HTML page */ -#if !defined LWIP_HTTPD_SSI_INCLUDE_TAG || defined __DOXYGEN__ -#define LWIP_HTTPD_SSI_INCLUDE_TAG 1 -#endif - -/** Set this to 1 to call tcp_abort when tcp_close fails with memory error. - * This can be used to prevent consuming all memory in situations where the - * HTTP server has low priority compared to other communication. */ -#if !defined LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR || defined __DOXYGEN__ -#define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0 -#endif - -/** Set this to 1 to kill the oldest connection when running out of - * memory for 'struct http_state' or 'struct http_ssi_state'. - * ATTENTION: This puts all connections on a linked list, so may be kind of slow. - */ -#if !defined LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED || defined __DOXYGEN__ -#define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0 -#endif - -/** Set this to 1 to send URIs without extension without headers */ -#if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__ -#define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0 -#endif - -/** Default: Tags are sent from struct http_state and are therefore volatile */ -#if !defined HTTP_IS_TAG_VOLATILE || defined __DOXYGEN__ -#define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY -#endif - -/* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low - when http is not an important protocol in the device. */ -#if !defined HTTPD_LIMIT_SENDING_TO_2MSS || defined __DOXYGEN__ -#define HTTPD_LIMIT_SENDING_TO_2MSS 1 -#endif - -/* Define this to a function that returns the maximum amount of data to enqueue. - The function have this signature: u16_t fn(struct tcp_pcb* pcb); */ -#if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__ -#if HTTPD_LIMIT_SENDING_TO_2MSS -#define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb)) -#endif -#endif - -/*------------------- FS OPTIONS -------------------*/ - -/** Set this to 1 and provide the functions: - * - "int fs_open_custom(struct fs_file *file, const char *name)" - * Called first for every opened file to allow opening files - * that are not included in fsdata(_custom).c - * - "void fs_close_custom(struct fs_file *file)" - * Called to free resources allocated by fs_open_custom(). - */ -#if !defined LWIP_HTTPD_CUSTOM_FILES || defined __DOXYGEN__ -#define LWIP_HTTPD_CUSTOM_FILES 0 -#endif - -/** Set this to 1 to support fs_read() to dynamically read file data. - * Without this (default=off), only one-block files are supported, - * and the contents must be ready after fs_open(). - */ -#if !defined LWIP_HTTPD_DYNAMIC_FILE_READ || defined __DOXYGEN__ -#define LWIP_HTTPD_DYNAMIC_FILE_READ 0 -#endif - -/** Set this to 1 to include an application state argument per file - * that is opened. This allows to keep a state per connection/file. - */ -#if !defined LWIP_HTTPD_FILE_STATE || defined __DOXYGEN__ -#define LWIP_HTTPD_FILE_STATE 0 -#endif - -/** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for - * predefined (MSS-sized) chunks of the files to prevent having to calculate - * the checksums at runtime. */ -#if !defined HTTPD_PRECALCULATED_CHECKSUM || defined __DOXYGEN__ -#define HTTPD_PRECALCULATED_CHECKSUM 0 -#endif - -/** LWIP_HTTPD_FS_ASYNC_READ==1: support asynchronous read operations - * (fs_read_async returns FS_READ_DELAYED and calls a callback when finished). - */ -#if !defined LWIP_HTTPD_FS_ASYNC_READ || defined __DOXYGEN__ -#define LWIP_HTTPD_FS_ASYNC_READ 0 -#endif - -/** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the - * file system (to prevent changing the file included in CVS) */ -#if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__ -#define HTTPD_USE_CUSTOM_FSDATA 0 -#endif - -/** - * @} - */ - -#endif /* LWIP_HDR_APPS_HTTPD_OPTS_H */ +/** + * @file + * HTTP server options list + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + * This version of the file has been modified by Texas Instruments to offer + * simple server-side-include (SSI) and Common Gateway Interface (CGI) + * capability. + */ + +#ifndef LWIP_HDR_APPS_HTTPD_OPTS_H +#define LWIP_HDR_APPS_HTTPD_OPTS_H + +#include "lwip/opt.h" + +/** + * @defgroup httpd_opts Options + * @ingroup httpd + * @{ + */ + +/** Set this to 1 to support CGI (old style) */ +#if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__ +#define LWIP_HTTPD_CGI 0 +#endif + +/** Set this to 1 to support CGI (new style) */ +#if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__ +#define LWIP_HTTPD_CGI_SSI 0 +#endif + +/** Set this to 1 to support SSI (Server-Side-Includes) */ +#if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__ +#define LWIP_HTTPD_SSI 0 +#endif + +/** Set this to 1 to implement an SSI tag handler callback that gets a const char* + * to the tag (instead of an index into a pre-registered array of known tags) */ +#if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__ +#define LWIP_HTTPD_SSI_RAW 0 +#endif + +/** Set this to 1 to support HTTP POST */ +#if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__ +#define LWIP_HTTPD_SUPPORT_POST 0 +#endif + +/* The maximum number of parameters that the CGI handler can be sent. */ +#if !defined LWIP_HTTPD_MAX_CGI_PARAMETERS || defined __DOXYGEN__ +#define LWIP_HTTPD_MAX_CGI_PARAMETERS 16 +#endif + +/** LWIP_HTTPD_SSI_MULTIPART==1: SSI handler function is called with 2 more + * arguments indicating a counter for insert string that are too long to be + * inserted at once: the SSI handler function must then set 'next_tag_part' + * which will be passed back to it in the next call. */ +#if !defined LWIP_HTTPD_SSI_MULTIPART || defined __DOXYGEN__ +#define LWIP_HTTPD_SSI_MULTIPART 0 +#endif + +/* The maximum length of the string comprising the tag name */ +#if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__ +#define LWIP_HTTPD_MAX_TAG_NAME_LEN 8 +#endif + +/* The maximum length of string that can be returned to replace any given tag */ +#if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__ +#define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192 +#endif + +#if !defined LWIP_HTTPD_POST_MANUAL_WND || defined __DOXYGEN__ +#define LWIP_HTTPD_POST_MANUAL_WND 0 +#endif + +/** This string is passed in the HTTP header as "Server: " */ +#if !defined HTTPD_SERVER_AGENT || defined __DOXYGEN__ +#define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" +#endif + +/** Set this to 1 if you want to include code that creates HTTP headers + * at runtime. Default is off: HTTP headers are then created statically + * by the makefsdata tool. Static headers mean smaller code size, but + * the (readonly) fsdata will grow a bit as every file includes the HTTP + * header. */ +#if !defined LWIP_HTTPD_DYNAMIC_HEADERS || defined __DOXYGEN__ +#define LWIP_HTTPD_DYNAMIC_HEADERS 0 +#endif + +#if !defined HTTPD_DEBUG || defined __DOXYGEN__ +#define HTTPD_DEBUG LWIP_DBG_OFF +#endif + +/** Set this to 1 to use a memp pool for allocating + * struct http_state instead of the heap. + */ +#if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__ +#define HTTPD_USE_MEM_POOL 0 +#endif + +/** The server port for HTTPD to use */ +#if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__ +#define HTTPD_SERVER_PORT 80 +#endif + +/** Maximum retries before the connection is aborted/closed. + * - number of times pcb->poll is called -> default is 4*500ms = 2s; + * - reset when pcb->sent is called + */ +#if !defined HTTPD_MAX_RETRIES || defined __DOXYGEN__ +#define HTTPD_MAX_RETRIES 4 +#endif + +/** The poll delay is X*500ms */ +#if !defined HTTPD_POLL_INTERVAL || defined __DOXYGEN__ +#define HTTPD_POLL_INTERVAL 4 +#endif + +/** Priority for tcp pcbs created by HTTPD (very low by default). + * Lower priorities get killed first when running out of memory. + */ +#if !defined HTTPD_TCP_PRIO || defined __DOXYGEN__ +#define HTTPD_TCP_PRIO TCP_PRIO_MIN +#endif + +/** Set this to 1 to enable timing each file sent */ +#if !defined LWIP_HTTPD_TIMING || defined __DOXYGEN__ +#define LWIP_HTTPD_TIMING 0 +#endif +/** Set this to 1 to enable timing each file sent */ +#if !defined HTTPD_DEBUG_TIMING || defined __DOXYGEN__ +#define HTTPD_DEBUG_TIMING LWIP_DBG_OFF +#endif + +/** Set this to one to show error pages when parsing a request fails instead + of simply closing the connection. */ +#if !defined LWIP_HTTPD_SUPPORT_EXTSTATUS || defined __DOXYGEN__ +#define LWIP_HTTPD_SUPPORT_EXTSTATUS 0 +#endif + +/** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */ +#if !defined LWIP_HTTPD_SUPPORT_V09 || defined __DOXYGEN__ +#define LWIP_HTTPD_SUPPORT_V09 1 +#endif + +/** Set this to 1 to enable HTTP/1.1 persistent connections. + * ATTENTION: If the generated file system includes HTTP headers, these must + * include the "Connection: keep-alive" header (pass argument "-11" to makefsdata). + */ +#if !defined LWIP_HTTPD_SUPPORT_11_KEEPALIVE || defined __DOXYGEN__ +#define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0 +#endif + +/** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */ +#if !defined LWIP_HTTPD_SUPPORT_REQUESTLIST || defined __DOXYGEN__ +#define LWIP_HTTPD_SUPPORT_REQUESTLIST 1 +#endif + +#if LWIP_HTTPD_SUPPORT_REQUESTLIST +/** Number of rx pbufs to enqueue to parse an incoming request (up to the first + newline) */ +#if !defined LWIP_HTTPD_REQ_QUEUELEN || defined __DOXYGEN__ +#define LWIP_HTTPD_REQ_QUEUELEN 5 +#endif + +/** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming + request (up to the first double-newline) */ +#if !defined LWIP_HTTPD_REQ_BUFSIZE || defined __DOXYGEN__ +#define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH +#endif + +/** Defines the maximum length of a HTTP request line (up to the first CRLF, + copied from pbuf into this a global buffer when pbuf- or packet-queues + are received - otherwise the input pbuf is used directly) */ +#if !defined LWIP_HTTPD_MAX_REQ_LENGTH || defined __DOXYGEN__ +#define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE)) +#endif +#endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ + +/** This is the size of a static buffer used when URIs end with '/'. + * In this buffer, the directory requested is concatenated with all the + * configured default file names. + * Set to 0 to disable checking default filenames on non-root directories. + */ +#if !defined LWIP_HTTPD_MAX_REQUEST_URI_LEN || defined __DOXYGEN__ +#define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63 +#endif + +/** Maximum length of the filename to send as response to a POST request, + * filled in by the application when a POST is finished. + */ +#if !defined LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN || defined __DOXYGEN__ +#define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63 +#endif + +/** Set this to 0 to not send the SSI tag (default is on, so the tag will + * be sent in the HTML page */ +#if !defined LWIP_HTTPD_SSI_INCLUDE_TAG || defined __DOXYGEN__ +#define LWIP_HTTPD_SSI_INCLUDE_TAG 1 +#endif + +/** Set this to 1 to call tcp_abort when tcp_close fails with memory error. + * This can be used to prevent consuming all memory in situations where the + * HTTP server has low priority compared to other communication. */ +#if !defined LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR || defined __DOXYGEN__ +#define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0 +#endif + +/** Set this to 1 to kill the oldest connection when running out of + * memory for 'struct http_state' or 'struct http_ssi_state'. + * ATTENTION: This puts all connections on a linked list, so may be kind of slow. + */ +#if !defined LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED || defined __DOXYGEN__ +#define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0 +#endif + +/** Set this to 1 to send URIs without extension without headers */ +#if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__ +#define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0 +#endif + +/** Default: Tags are sent from struct http_state and are therefore volatile */ +#if !defined HTTP_IS_TAG_VOLATILE || defined __DOXYGEN__ +#define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY +#endif + +/* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low + when http is not an important protocol in the device. */ +#if !defined HTTPD_LIMIT_SENDING_TO_2MSS || defined __DOXYGEN__ +#define HTTPD_LIMIT_SENDING_TO_2MSS 1 +#endif + +/* Define this to a function that returns the maximum amount of data to enqueue. + The function have this signature: u16_t fn(struct tcp_pcb* pcb); */ +#if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__ +#if HTTPD_LIMIT_SENDING_TO_2MSS +#define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb)) +#endif +#endif + +/*------------------- FS OPTIONS -------------------*/ + +/** Set this to 1 and provide the functions: + * - "int fs_open_custom(struct fs_file *file, const char *name)" + * Called first for every opened file to allow opening files + * that are not included in fsdata(_custom).c + * - "void fs_close_custom(struct fs_file *file)" + * Called to free resources allocated by fs_open_custom(). + */ +#if !defined LWIP_HTTPD_CUSTOM_FILES || defined __DOXYGEN__ +#define LWIP_HTTPD_CUSTOM_FILES 0 +#endif + +/** Set this to 1 to support fs_read() to dynamically read file data. + * Without this (default=off), only one-block files are supported, + * and the contents must be ready after fs_open(). + */ +#if !defined LWIP_HTTPD_DYNAMIC_FILE_READ || defined __DOXYGEN__ +#define LWIP_HTTPD_DYNAMIC_FILE_READ 0 +#endif + +/** Set this to 1 to include an application state argument per file + * that is opened. This allows to keep a state per connection/file. + */ +#if !defined LWIP_HTTPD_FILE_STATE || defined __DOXYGEN__ +#define LWIP_HTTPD_FILE_STATE 0 +#endif + +/** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for + * predefined (MSS-sized) chunks of the files to prevent having to calculate + * the checksums at runtime. */ +#if !defined HTTPD_PRECALCULATED_CHECKSUM || defined __DOXYGEN__ +#define HTTPD_PRECALCULATED_CHECKSUM 0 +#endif + +/** LWIP_HTTPD_FS_ASYNC_READ==1: support asynchronous read operations + * (fs_read_async returns FS_READ_DELAYED and calls a callback when finished). + */ +#if !defined LWIP_HTTPD_FS_ASYNC_READ || defined __DOXYGEN__ +#define LWIP_HTTPD_FS_ASYNC_READ 0 +#endif + +/** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the + * file system (to prevent changing the file included in CVS) */ +#if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__ +#define HTTPD_USE_CUSTOM_FSDATA 0 +#endif + +/** + * @} + */ + +#endif /* LWIP_HDR_APPS_HTTPD_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/lwiperf.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/lwiperf.h index 7dbebb0..63a0c0c 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/lwiperf.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/lwiperf.h @@ -1,84 +1,84 @@ -/** - * @file - * lwIP iPerf server implementation - */ - -/* - * Copyright (c) 2014 Simon Goldschmidt - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Simon Goldschmidt - * - */ -#ifndef LWIP_HDR_APPS_LWIPERF_H -#define LWIP_HDR_APPS_LWIPERF_H - -#include "lwip/opt.h" -#include "lwip/ip_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define LWIPERF_TCP_PORT_DEFAULT 5001 - -/** lwIPerf test results */ -enum lwiperf_report_type -{ - /** The server side test is done */ - LWIPERF_TCP_DONE_SERVER, - /** The client side test is done */ - LWIPERF_TCP_DONE_CLIENT, - /** Local error lead to test abort */ - LWIPERF_TCP_ABORTED_LOCAL, - /** Data check error lead to test abort */ - LWIPERF_TCP_ABORTED_LOCAL_DATAERROR, - /** Transmit error lead to test abort */ - LWIPERF_TCP_ABORTED_LOCAL_TXERROR, - /** Remote side aborted the test */ - LWIPERF_TCP_ABORTED_REMOTE -}; - -/** Prototype of a report function that is called when a session is finished. - This report function can show the test results. - @param report_type contains the test result */ -typedef void (*lwiperf_report_fn)(void *arg, enum lwiperf_report_type report_type, - const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port, - u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec); - - -void* lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port, - lwiperf_report_fn report_fn, void* report_arg); -void* lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void* report_arg); -void lwiperf_abort(void* lwiperf_session); - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_LWIPERF_H */ +/** + * @file + * lwIP iPerf server implementation + */ + +/* + * Copyright (c) 2014 Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_APPS_LWIPERF_H +#define LWIP_HDR_APPS_LWIPERF_H + +#include "lwip/opt.h" +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define LWIPERF_TCP_PORT_DEFAULT 5001 + +/** lwIPerf test results */ +enum lwiperf_report_type +{ + /** The server side test is done */ + LWIPERF_TCP_DONE_SERVER, + /** The client side test is done */ + LWIPERF_TCP_DONE_CLIENT, + /** Local error lead to test abort */ + LWIPERF_TCP_ABORTED_LOCAL, + /** Data check error lead to test abort */ + LWIPERF_TCP_ABORTED_LOCAL_DATAERROR, + /** Transmit error lead to test abort */ + LWIPERF_TCP_ABORTED_LOCAL_TXERROR, + /** Remote side aborted the test */ + LWIPERF_TCP_ABORTED_REMOTE +}; + +/** Prototype of a report function that is called when a session is finished. + This report function can show the test results. + @param report_type contains the test result */ +typedef void (*lwiperf_report_fn)(void *arg, enum lwiperf_report_type report_type, + const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port, + u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec); + + +void* lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port, + lwiperf_report_fn report_fn, void* report_arg); +void* lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void* report_arg); +void lwiperf_abort(void* lwiperf_session); + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_LWIPERF_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns.h index d036816..b19f80c 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns.h @@ -1,69 +1,69 @@ -/** - * @file - * MDNS responder - */ - - /* - * Copyright (c) 2015 Verisure Innovation AB - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Erik Ekman - * - */ -#ifndef LWIP_HDR_MDNS_H -#define LWIP_HDR_MDNS_H - -#include "lwip/apps/mdns_opts.h" -#include "lwip/netif.h" - -#if LWIP_MDNS_RESPONDER - -enum mdns_sd_proto { - DNSSD_PROTO_UDP = 0, - DNSSD_PROTO_TCP = 1 -}; - -#define MDNS_LABEL_MAXLEN 63 - -struct mdns_host; -struct mdns_service; - -/** Callback function to add text to a reply, called when generating the reply */ -typedef void (*service_get_txt_fn_t)(struct mdns_service *service, void *txt_userdata); - -void mdns_resp_init(void); - -err_t mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl); -err_t mdns_resp_remove_netif(struct netif *netif); - -err_t mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata); -err_t mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len); -void mdns_resp_netif_settings_changed(struct netif *netif); - -#endif /* LWIP_MDNS_RESPONDER */ - -#endif /* LWIP_HDR_MDNS_H */ +/** + * @file + * MDNS responder + */ + + /* + * Copyright (c) 2015 Verisure Innovation AB + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Erik Ekman + * + */ +#ifndef LWIP_HDR_MDNS_H +#define LWIP_HDR_MDNS_H + +#include "lwip/apps/mdns_opts.h" +#include "lwip/netif.h" + +#if LWIP_MDNS_RESPONDER + +enum mdns_sd_proto { + DNSSD_PROTO_UDP = 0, + DNSSD_PROTO_TCP = 1 +}; + +#define MDNS_LABEL_MAXLEN 63 + +struct mdns_host; +struct mdns_service; + +/** Callback function to add text to a reply, called when generating the reply */ +typedef void (*service_get_txt_fn_t)(struct mdns_service *service, void *txt_userdata); + +void mdns_resp_init(void); + +err_t mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl); +err_t mdns_resp_remove_netif(struct netif *netif); + +err_t mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata); +err_t mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len); +void mdns_resp_netif_settings_changed(struct netif *netif); + +#endif /* LWIP_MDNS_RESPONDER */ + +#endif /* LWIP_HDR_MDNS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_opts.h index bf186bc..9f8e5f5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_opts.h @@ -1,74 +1,74 @@ -/** - * @file - * MDNS responder - */ - - /* - * Copyright (c) 2015 Verisure Innovation AB - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Erik Ekman - * - */ - -#ifndef LWIP_HDR_APPS_MDNS_OPTS_H -#define LWIP_HDR_APPS_MDNS_OPTS_H - -#include "lwip/opt.h" - -/** - * @defgroup mdns_opts Options - * @ingroup mdns - * @{ - */ - -/** - * LWIP_MDNS_RESPONDER==1: Turn on multicast DNS module. UDP must be available for MDNS - * transport. IGMP is needed for IPv4 multicast. - */ -#ifndef LWIP_MDNS_RESPONDER -#define LWIP_MDNS_RESPONDER 0 -#endif /* LWIP_MDNS_RESPONDER */ - -/** The maximum number of services per netif */ -#ifndef MDNS_MAX_SERVICES -#define MDNS_MAX_SERVICES 1 -#endif - -/** - * MDNS_DEBUG: Enable debugging for multicast DNS. - */ -#ifndef MDNS_DEBUG -#define MDNS_DEBUG LWIP_DBG_OFF -#endif - -/** - * @} - */ - -#endif /* LWIP_HDR_APPS_MDNS_OPTS_H */ - +/** + * @file + * MDNS responder + */ + + /* + * Copyright (c) 2015 Verisure Innovation AB + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Erik Ekman + * + */ + +#ifndef LWIP_HDR_APPS_MDNS_OPTS_H +#define LWIP_HDR_APPS_MDNS_OPTS_H + +#include "lwip/opt.h" + +/** + * @defgroup mdns_opts Options + * @ingroup mdns + * @{ + */ + +/** + * LWIP_MDNS_RESPONDER==1: Turn on multicast DNS module. UDP must be available for MDNS + * transport. IGMP is needed for IPv4 multicast. + */ +#ifndef LWIP_MDNS_RESPONDER +#define LWIP_MDNS_RESPONDER 0 +#endif /* LWIP_MDNS_RESPONDER */ + +/** The maximum number of services per netif */ +#ifndef MDNS_MAX_SERVICES +#define MDNS_MAX_SERVICES 1 +#endif + +/** + * MDNS_DEBUG: Enable debugging for multicast DNS. + */ +#ifndef MDNS_DEBUG +#define MDNS_DEBUG LWIP_DBG_OFF +#endif + +/** + * @} + */ + +#endif /* LWIP_HDR_APPS_MDNS_OPTS_H */ + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_priv.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_priv.h index 8ee6db8..9a48b5f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_priv.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mdns_priv.h @@ -1,66 +1,66 @@ -/** - * @file - * MDNS responder private definitions - */ - - /* - * Copyright (c) 2015 Verisure Innovation AB - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Erik Ekman - * - */ -#ifndef LWIP_HDR_MDNS_PRIV_H -#define LWIP_HDR_MDNS_PRIV_H - -#include "lwip/apps/mdns_opts.h" -#include "lwip/pbuf.h" - -#if LWIP_MDNS_RESPONDER - -/* Domain struct and methods - visible for unit tests */ - -#define MDNS_DOMAIN_MAXLEN 256 -#define MDNS_READNAME_ERROR 0xFFFF - -struct mdns_domain { - /* Encoded domain name */ - u8_t name[MDNS_DOMAIN_MAXLEN]; - /* Total length of domain name, including zero */ - u16_t length; - /* Set if compression of this domain is not allowed */ - u8_t skip_compression; -}; - -err_t mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len); -u16_t mdns_readname(struct pbuf *p, u16_t offset, struct mdns_domain *domain); -int mdns_domain_eq(struct mdns_domain *a, struct mdns_domain *b); -u16_t mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain); - -#endif /* LWIP_MDNS_RESPONDER */ - -#endif /* LWIP_HDR_MDNS_PRIV_H */ +/** + * @file + * MDNS responder private definitions + */ + + /* + * Copyright (c) 2015 Verisure Innovation AB + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Erik Ekman + * + */ +#ifndef LWIP_HDR_MDNS_PRIV_H +#define LWIP_HDR_MDNS_PRIV_H + +#include "lwip/apps/mdns_opts.h" +#include "lwip/pbuf.h" + +#if LWIP_MDNS_RESPONDER + +/* Domain struct and methods - visible for unit tests */ + +#define MDNS_DOMAIN_MAXLEN 256 +#define MDNS_READNAME_ERROR 0xFFFF + +struct mdns_domain { + /* Encoded domain name */ + u8_t name[MDNS_DOMAIN_MAXLEN]; + /* Total length of domain name, including zero */ + u16_t length; + /* Set if compression of this domain is not allowed */ + u8_t skip_compression; +}; + +err_t mdns_domain_add_label(struct mdns_domain *domain, const char *label, u8_t len); +u16_t mdns_readname(struct pbuf *p, u16_t offset, struct mdns_domain *domain); +int mdns_domain_eq(struct mdns_domain *a, struct mdns_domain *b); +u16_t mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain *domain); + +#endif /* LWIP_MDNS_RESPONDER */ + +#endif /* LWIP_HDR_MDNS_PRIV_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt.h index 34b230b..f0f5bab 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt.h @@ -1,244 +1,244 @@ -/** - * @file - * MQTT client - */ - -/* - * Copyright (c) 2016 Erik Andersson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Erik Andersson - * - */ -#ifndef LWIP_HDR_APPS_MQTT_CLIENT_H -#define LWIP_HDR_APPS_MQTT_CLIENT_H - -#include "lwip/apps/mqtt_opts.h" -#include "lwip/err.h" -#include "lwip/ip_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct mqtt_client_t mqtt_client_t; - -/** @ingroup mqtt - * Default MQTT port */ -#define MQTT_PORT 1883 - -/*---------------------------------------------------------------------------------------------- */ -/* Connection with server */ - -/** - * @ingroup mqtt - * Client information and connection parameters */ -struct mqtt_connect_client_info_t { - /** Client identifier, must be set by caller */ - const char *client_id; - /** User name and password, set to NULL if not used */ - const char* client_user; - const char* client_pass; - /** keep alive time in seconds, 0 to disable keep alive functionality*/ - u16_t keep_alive; - /** will topic, set to NULL if will is not to be used, - will_msg, will_qos and will retain are then ignored */ - const char* will_topic; - const char* will_msg; - u8_t will_qos; - u8_t will_retain; -}; - -/** - * @ingroup mqtt - * Connection status codes */ -typedef enum -{ - MQTT_CONNECT_ACCEPTED = 0, - MQTT_CONNECT_REFUSED_PROTOCOL_VERSION = 1, - MQTT_CONNECT_REFUSED_IDENTIFIER = 2, - MQTT_CONNECT_REFUSED_SERVER = 3, - MQTT_CONNECT_REFUSED_USERNAME_PASS = 4, - MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ = 5, - MQTT_CONNECT_DISCONNECTED = 256, - MQTT_CONNECT_TIMEOUT = 257 -} mqtt_connection_status_t; - -/** - * @ingroup mqtt - * Function prototype for mqtt connection status callback. Called when - * client has connected to the server after initiating a mqtt connection attempt by - * calling mqtt_connect() or when connection is closed by server or an error - * - * @param client MQTT client itself - * @param arg Additional argument to pass to the callback function - * @param status Connect result code or disconnection notification @see mqtt_connection_status_t - * - */ -typedef void (*mqtt_connection_cb_t)(mqtt_client_t *client, void *arg, mqtt_connection_status_t status); - - -/** - * @ingroup mqtt - * Data callback flags */ -enum { - /** Flag set when last fragment of data arrives in data callback */ - MQTT_DATA_FLAG_LAST = 1 -}; - -/** - * @ingroup mqtt - * Function prototype for MQTT incoming publish data callback function. Called when data - * arrives to a subscribed topic @see mqtt_subscribe - * - * @param arg Additional argument to pass to the callback function - * @param data User data, pointed object, data may not be referenced after callback return, - NULL is passed when all publish data are delivered - * @param len Length of publish data fragment - * @param flags MQTT_DATA_FLAG_LAST set when this call contains the last part of data from publish message - * - */ -typedef void (*mqtt_incoming_data_cb_t)(void *arg, const u8_t *data, u16_t len, u8_t flags); - - -/** - * @ingroup mqtt - * Function prototype for MQTT incoming publish function. Called when an incoming publish - * arrives to a subscribed topic @see mqtt_subscribe - * - * @param arg Additional argument to pass to the callback function - * @param topic Zero terminated Topic text string, topic may not be referenced after callback return - * @param tot_len Total length of publish data, if set to 0 (no publish payload) data callback will not be invoked - */ -typedef void (*mqtt_incoming_publish_cb_t)(void *arg, const char *topic, u32_t tot_len); - - -/** - * @ingroup mqtt - * Function prototype for mqtt request callback. Called when a subscribe, unsubscribe - * or publish request has completed - * @param arg Pointer to user data supplied when invoking request - * @param err ERR_OK on success - * ERR_TIMEOUT if no response was received within timeout, - * ERR_ABRT if (un)subscribe was denied - */ -typedef void (*mqtt_request_cb_t)(void *arg, err_t err); - - -/** - * Pending request item, binds application callback to pending server requests - */ -struct mqtt_request_t -{ - /** Next item in list, NULL means this is the last in chain, - next pointing at itself means request is unallocated */ - struct mqtt_request_t *next; - /** Callback to upper layer */ - mqtt_request_cb_t cb; - void *arg; - /** MQTT packet identifier */ - u16_t pkt_id; - /** Expire time relative to element before this */ - u16_t timeout_diff; -}; - -/** Ring buffer */ -struct mqtt_ringbuf_t { - u16_t put; - u16_t get; - u8_t buf[MQTT_OUTPUT_RINGBUF_SIZE]; -}; - -/** MQTT client */ -struct mqtt_client_t -{ - /** Timers and timeouts */ - u16_t cyclic_tick; - u16_t keep_alive; - u16_t server_watchdog; - /** Packet identifier generator*/ - u16_t pkt_id_seq; - /** Packet identifier of pending incoming publish */ - u16_t inpub_pkt_id; - /** Connection state */ - u8_t conn_state; - struct tcp_pcb *conn; - /** Connection callback */ - void *connect_arg; - mqtt_connection_cb_t connect_cb; - /** Pending requests to server */ - struct mqtt_request_t *pend_req_queue; - struct mqtt_request_t req_list[MQTT_REQ_MAX_IN_FLIGHT]; - void *inpub_arg; - /** Incoming data callback */ - mqtt_incoming_data_cb_t data_cb; - mqtt_incoming_publish_cb_t pub_cb; - /** Input */ - u32_t msg_idx; - u8_t rx_buffer[MQTT_VAR_HEADER_BUFFER_LEN]; - /** Output ring-buffer */ - struct mqtt_ringbuf_t output; -}; - - -/** Connect to server */ -err_t mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg, - const struct mqtt_connect_client_info_t *client_info); - -/** Disconnect from server */ -void mqtt_disconnect(mqtt_client_t *client); - -/** Create new client */ -mqtt_client_t *mqtt_client_new(void); - -/** Check connection status */ -u8_t mqtt_client_is_connected(mqtt_client_t *client); - -/** Set callback to call for incoming publish */ -void mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t, - mqtt_incoming_data_cb_t data_cb, void *arg); - -/** Common function for subscribe and unsubscribe */ -err_t mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub); - -/** @ingroup mqtt - *Subscribe to topic */ -#define mqtt_subscribe(client, topic, qos, cb, arg) mqtt_sub_unsub(client, topic, qos, cb, arg, 1) -/** @ingroup mqtt - * Unsubscribe to topic */ -#define mqtt_unsubscribe(client, topic, cb, arg) mqtt_sub_unsub(client, topic, 0, cb, arg, 0) - - -/** Publish data to topic */ -err_t mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, - mqtt_request_cb_t cb, void *arg); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_MQTT_CLIENT_H */ +/** + * @file + * MQTT client + */ + +/* + * Copyright (c) 2016 Erik Andersson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Erik Andersson + * + */ +#ifndef LWIP_HDR_APPS_MQTT_CLIENT_H +#define LWIP_HDR_APPS_MQTT_CLIENT_H + +#include "lwip/apps/mqtt_opts.h" +#include "lwip/err.h" +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct mqtt_client_t mqtt_client_t; + +/** @ingroup mqtt + * Default MQTT port */ +#define MQTT_PORT 1883 + +/*---------------------------------------------------------------------------------------------- */ +/* Connection with server */ + +/** + * @ingroup mqtt + * Client information and connection parameters */ +struct mqtt_connect_client_info_t { + /** Client identifier, must be set by caller */ + const char *client_id; + /** User name and password, set to NULL if not used */ + const char* client_user; + const char* client_pass; + /** keep alive time in seconds, 0 to disable keep alive functionality*/ + u16_t keep_alive; + /** will topic, set to NULL if will is not to be used, + will_msg, will_qos and will retain are then ignored */ + const char* will_topic; + const char* will_msg; + u8_t will_qos; + u8_t will_retain; +}; + +/** + * @ingroup mqtt + * Connection status codes */ +typedef enum +{ + MQTT_CONNECT_ACCEPTED = 0, + MQTT_CONNECT_REFUSED_PROTOCOL_VERSION = 1, + MQTT_CONNECT_REFUSED_IDENTIFIER = 2, + MQTT_CONNECT_REFUSED_SERVER = 3, + MQTT_CONNECT_REFUSED_USERNAME_PASS = 4, + MQTT_CONNECT_REFUSED_NOT_AUTHORIZED_ = 5, + MQTT_CONNECT_DISCONNECTED = 256, + MQTT_CONNECT_TIMEOUT = 257 +} mqtt_connection_status_t; + +/** + * @ingroup mqtt + * Function prototype for mqtt connection status callback. Called when + * client has connected to the server after initiating a mqtt connection attempt by + * calling mqtt_connect() or when connection is closed by server or an error + * + * @param client MQTT client itself + * @param arg Additional argument to pass to the callback function + * @param status Connect result code or disconnection notification @see mqtt_connection_status_t + * + */ +typedef void (*mqtt_connection_cb_t)(mqtt_client_t *client, void *arg, mqtt_connection_status_t status); + + +/** + * @ingroup mqtt + * Data callback flags */ +enum { + /** Flag set when last fragment of data arrives in data callback */ + MQTT_DATA_FLAG_LAST = 1 +}; + +/** + * @ingroup mqtt + * Function prototype for MQTT incoming publish data callback function. Called when data + * arrives to a subscribed topic @see mqtt_subscribe + * + * @param arg Additional argument to pass to the callback function + * @param data User data, pointed object, data may not be referenced after callback return, + NULL is passed when all publish data are delivered + * @param len Length of publish data fragment + * @param flags MQTT_DATA_FLAG_LAST set when this call contains the last part of data from publish message + * + */ +typedef void (*mqtt_incoming_data_cb_t)(void *arg, const u8_t *data, u16_t len, u8_t flags); + + +/** + * @ingroup mqtt + * Function prototype for MQTT incoming publish function. Called when an incoming publish + * arrives to a subscribed topic @see mqtt_subscribe + * + * @param arg Additional argument to pass to the callback function + * @param topic Zero terminated Topic text string, topic may not be referenced after callback return + * @param tot_len Total length of publish data, if set to 0 (no publish payload) data callback will not be invoked + */ +typedef void (*mqtt_incoming_publish_cb_t)(void *arg, const char *topic, u32_t tot_len); + + +/** + * @ingroup mqtt + * Function prototype for mqtt request callback. Called when a subscribe, unsubscribe + * or publish request has completed + * @param arg Pointer to user data supplied when invoking request + * @param err ERR_OK on success + * ERR_TIMEOUT if no response was received within timeout, + * ERR_ABRT if (un)subscribe was denied + */ +typedef void (*mqtt_request_cb_t)(void *arg, err_t err); + + +/** + * Pending request item, binds application callback to pending server requests + */ +struct mqtt_request_t +{ + /** Next item in list, NULL means this is the last in chain, + next pointing at itself means request is unallocated */ + struct mqtt_request_t *next; + /** Callback to upper layer */ + mqtt_request_cb_t cb; + void *arg; + /** MQTT packet identifier */ + u16_t pkt_id; + /** Expire time relative to element before this */ + u16_t timeout_diff; +}; + +/** Ring buffer */ +struct mqtt_ringbuf_t { + u16_t put; + u16_t get; + u8_t buf[MQTT_OUTPUT_RINGBUF_SIZE]; +}; + +/** MQTT client */ +struct mqtt_client_t +{ + /** Timers and timeouts */ + u16_t cyclic_tick; + u16_t keep_alive; + u16_t server_watchdog; + /** Packet identifier generator*/ + u16_t pkt_id_seq; + /** Packet identifier of pending incoming publish */ + u16_t inpub_pkt_id; + /** Connection state */ + u8_t conn_state; + struct tcp_pcb *conn; + /** Connection callback */ + void *connect_arg; + mqtt_connection_cb_t connect_cb; + /** Pending requests to server */ + struct mqtt_request_t *pend_req_queue; + struct mqtt_request_t req_list[MQTT_REQ_MAX_IN_FLIGHT]; + void *inpub_arg; + /** Incoming data callback */ + mqtt_incoming_data_cb_t data_cb; + mqtt_incoming_publish_cb_t pub_cb; + /** Input */ + u32_t msg_idx; + u8_t rx_buffer[MQTT_VAR_HEADER_BUFFER_LEN]; + /** Output ring-buffer */ + struct mqtt_ringbuf_t output; +}; + + +/** Connect to server */ +err_t mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ipaddr, u16_t port, mqtt_connection_cb_t cb, void *arg, + const struct mqtt_connect_client_info_t *client_info); + +/** Disconnect from server */ +void mqtt_disconnect(mqtt_client_t *client); + +/** Create new client */ +mqtt_client_t *mqtt_client_new(void); + +/** Check connection status */ +u8_t mqtt_client_is_connected(mqtt_client_t *client); + +/** Set callback to call for incoming publish */ +void mqtt_set_inpub_callback(mqtt_client_t *client, mqtt_incoming_publish_cb_t, + mqtt_incoming_data_cb_t data_cb, void *arg); + +/** Common function for subscribe and unsubscribe */ +err_t mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_request_cb_t cb, void *arg, u8_t sub); + +/** @ingroup mqtt + *Subscribe to topic */ +#define mqtt_subscribe(client, topic, qos, cb, arg) mqtt_sub_unsub(client, topic, qos, cb, arg, 1) +/** @ingroup mqtt + * Unsubscribe to topic */ +#define mqtt_unsubscribe(client, topic, cb, arg) mqtt_sub_unsub(client, topic, 0, cb, arg, 0) + + +/** Publish data to topic */ +err_t mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, + mqtt_request_cb_t cb, void *arg); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_MQTT_CLIENT_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt_opts.h index ffefacd..7d07829 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/mqtt_opts.h @@ -1,103 +1,103 @@ -/** - * @file - * MQTT client options - */ - -/* - * Copyright (c) 2016 Erik Andersson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Erik Andersson - * - */ -#ifndef LWIP_HDR_APPS_MQTT_OPTS_H -#define LWIP_HDR_APPS_MQTT_OPTS_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup mqtt_opts Options - * @ingroup mqtt - * @{ - */ - -/** - * Output ring-buffer size, must be able to fit largest outgoing publish message topic+payloads - */ -#ifndef MQTT_OUTPUT_RINGBUF_SIZE -#define MQTT_OUTPUT_RINGBUF_SIZE 256 -#endif - -/** - * Number of bytes in receive buffer, must be at least the size of the longest incoming topic + 8 - * If one wants to avoid fragmented incoming publish, set length to max incoming topic length + max payload length + 8 - */ -#ifndef MQTT_VAR_HEADER_BUFFER_LEN -#define MQTT_VAR_HEADER_BUFFER_LEN 128 -#endif - -/** - * Maximum number of pending subscribe, unsubscribe and publish requests to server . - */ -#ifndef MQTT_REQ_MAX_IN_FLIGHT -#define MQTT_REQ_MAX_IN_FLIGHT 4 -#endif - -/** - * Seconds between each cyclic timer call. - */ -#ifndef MQTT_CYCLIC_TIMER_INTERVAL -#define MQTT_CYCLIC_TIMER_INTERVAL 5 -#endif - -/** - * Publish, subscribe and unsubscribe request timeout in seconds. - */ -#ifndef MQTT_REQ_TIMEOUT -#define MQTT_REQ_TIMEOUT 30 -#endif - -/** - * Seconds for MQTT connect response timeout after sending connect request - */ -#ifndef MQTT_CONNECT_TIMOUT -#define MQTT_CONNECT_TIMOUT 100 -#endif - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_MQTT_OPTS_H */ +/** + * @file + * MQTT client options + */ + +/* + * Copyright (c) 2016 Erik Andersson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Erik Andersson + * + */ +#ifndef LWIP_HDR_APPS_MQTT_OPTS_H +#define LWIP_HDR_APPS_MQTT_OPTS_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup mqtt_opts Options + * @ingroup mqtt + * @{ + */ + +/** + * Output ring-buffer size, must be able to fit largest outgoing publish message topic+payloads + */ +#ifndef MQTT_OUTPUT_RINGBUF_SIZE +#define MQTT_OUTPUT_RINGBUF_SIZE 256 +#endif + +/** + * Number of bytes in receive buffer, must be at least the size of the longest incoming topic + 8 + * If one wants to avoid fragmented incoming publish, set length to max incoming topic length + max payload length + 8 + */ +#ifndef MQTT_VAR_HEADER_BUFFER_LEN +#define MQTT_VAR_HEADER_BUFFER_LEN 128 +#endif + +/** + * Maximum number of pending subscribe, unsubscribe and publish requests to server . + */ +#ifndef MQTT_REQ_MAX_IN_FLIGHT +#define MQTT_REQ_MAX_IN_FLIGHT 4 +#endif + +/** + * Seconds between each cyclic timer call. + */ +#ifndef MQTT_CYCLIC_TIMER_INTERVAL +#define MQTT_CYCLIC_TIMER_INTERVAL 5 +#endif + +/** + * Publish, subscribe and unsubscribe request timeout in seconds. + */ +#ifndef MQTT_REQ_TIMEOUT +#define MQTT_REQ_TIMEOUT 30 +#endif + +/** + * Seconds for MQTT connect response timeout after sending connect request + */ +#ifndef MQTT_CONNECT_TIMOUT +#define MQTT_CONNECT_TIMOUT 100 +#endif + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_MQTT_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns.h index c9f68d8..4126606 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns.h @@ -1,43 +1,43 @@ -/** - * @file - * NETBIOS name service responder - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ -#ifndef LWIP_HDR_APPS_NETBIOS_H -#define LWIP_HDR_APPS_NETBIOS_H - -#include "lwip/apps/netbiosns_opts.h" - -void netbiosns_init(void); -#ifndef NETBIOS_LWIP_NAME -void netbiosns_set_name(const char* hostname); -#endif -void netbiosns_stop(void); - -#endif /* LWIP_HDR_APPS_NETBIOS_H */ +/** + * @file + * NETBIOS name service responder + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ +#ifndef LWIP_HDR_APPS_NETBIOS_H +#define LWIP_HDR_APPS_NETBIOS_H + +#include "lwip/apps/netbiosns_opts.h" + +void netbiosns_init(void); +#ifndef NETBIOS_LWIP_NAME +void netbiosns_set_name(const char* hostname); +#endif +void netbiosns_stop(void); + +#endif /* LWIP_HDR_APPS_NETBIOS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns_opts.h index 0909ef7..f4d2039 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/netbiosns_opts.h @@ -1,59 +1,59 @@ -/** - * @file - * NETBIOS name service responder options - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ -#ifndef LWIP_HDR_APPS_NETBIOS_OPTS_H -#define LWIP_HDR_APPS_NETBIOS_OPTS_H - -#include "lwip/opt.h" - -/** - * @defgroup netbiosns_opts Options - * @ingroup netbiosns - * @{ - */ - -/** NetBIOS name of lwip device - * This must be uppercase until NETBIOS_STRCMP() is defined to a string - * comparision function that is case insensitive. - * If you want to use the netif's hostname, use this (with LWIP_NETIF_HOSTNAME): - * (ip_current_netif() != NULL ? ip_current_netif()->hostname != NULL ? ip_current_netif()->hostname : "" : "") - * - * If this is not defined, netbiosns_set_name() can be called at runtime to change the name. - */ -#ifdef __DOXYGEN__ -#define NETBIOS_LWIP_NAME "NETBIOSLWIPDEV" -#endif - -/** - * @} - */ - -#endif /* LWIP_HDR_APPS_NETBIOS_OPTS_H */ +/** + * @file + * NETBIOS name service responder options + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ +#ifndef LWIP_HDR_APPS_NETBIOS_OPTS_H +#define LWIP_HDR_APPS_NETBIOS_OPTS_H + +#include "lwip/opt.h" + +/** + * @defgroup netbiosns_opts Options + * @ingroup netbiosns + * @{ + */ + +/** NetBIOS name of lwip device + * This must be uppercase until NETBIOS_STRCMP() is defined to a string + * comparision function that is case insensitive. + * If you want to use the netif's hostname, use this (with LWIP_NETIF_HOSTNAME): + * (ip_current_netif() != NULL ? ip_current_netif()->hostname != NULL ? ip_current_netif()->hostname : "" : "") + * + * If this is not defined, netbiosns_set_name() can be called at runtime to change the name. + */ +#ifdef __DOXYGEN__ +#define NETBIOS_LWIP_NAME "NETBIOSLWIPDEV" +#endif + +/** + * @} + */ + +#endif /* LWIP_HDR_APPS_NETBIOS_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp.h index 10e8ff4..5f267be 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp.h @@ -1,128 +1,128 @@ -/** - * @file - * SNMP server main API - start and basic configuration - */ - -/* - * Copyright (c) 2001, 2002 Leon Woestenberg - * Copyright (c) 2001, 2002 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Leon Woestenberg - * Martin Hentschel - * - */ -#ifndef LWIP_HDR_APPS_SNMP_H -#define LWIP_HDR_APPS_SNMP_H - -#include "lwip/apps/snmp_opts.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/err.h" -#include "lwip/apps/snmp_core.h" - -/** SNMP variable binding descriptor (publically needed for traps) */ -struct snmp_varbind -{ - /** pointer to next varbind, NULL for last in list */ - struct snmp_varbind *next; - /** pointer to previous varbind, NULL for first in list */ - struct snmp_varbind *prev; - - /** object identifier */ - struct snmp_obj_id oid; - - /** value ASN1 type */ - u8_t type; - /** object value length */ - u16_t value_len; - /** object value */ - void *value; -}; - -/** - * @ingroup snmp_core - * Agent setup, start listening to port 161. - */ -void snmp_init(void); -void snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs); - -void snmp_set_device_enterprise_oid(const struct snmp_obj_id* device_enterprise_oid); -const struct snmp_obj_id* snmp_get_device_enterprise_oid(void); - -void snmp_trap_dst_enable(u8_t dst_idx, u8_t enable); -void snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst); - -/** Generic trap: cold start */ -#define SNMP_GENTRAP_COLDSTART 0 -/** Generic trap: warm start */ -#define SNMP_GENTRAP_WARMSTART 1 -/** Generic trap: link down */ -#define SNMP_GENTRAP_LINKDOWN 2 -/** Generic trap: link up */ -#define SNMP_GENTRAP_LINKUP 3 -/** Generic trap: authentication failure */ -#define SNMP_GENTRAP_AUTH_FAILURE 4 -/** Generic trap: EGP neighbor lost */ -#define SNMP_GENTRAP_EGP_NEIGHBOR_LOSS 5 -/** Generic trap: enterprise specific */ -#define SNMP_GENTRAP_ENTERPRISE_SPECIFIC 6 - -err_t snmp_send_trap_generic(s32_t generic_trap); -err_t snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds); -err_t snmp_send_trap(const struct snmp_obj_id* oid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds); - -#define SNMP_AUTH_TRAPS_DISABLED 0 -#define SNMP_AUTH_TRAPS_ENABLED 1 -void snmp_set_auth_traps_enabled(u8_t enable); -u8_t snmp_get_auth_traps_enabled(void); - -const char * snmp_get_community(void); -const char * snmp_get_community_write(void); -const char * snmp_get_community_trap(void); -void snmp_set_community(const char * const community); -void snmp_set_community_write(const char * const community); -void snmp_set_community_trap(const char * const community); - -void snmp_coldstart_trap(void); -void snmp_authfail_trap(void); - -typedef void (*snmp_write_callback_fct)(const u32_t* oid, u8_t oid_len, void* callback_arg); -void snmp_set_write_callback(snmp_write_callback_fct write_callback, void* callback_arg); - -#endif /* LWIP_SNMP */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_SNMP_H */ +/** + * @file + * SNMP server main API - start and basic configuration + */ + +/* + * Copyright (c) 2001, 2002 Leon Woestenberg + * Copyright (c) 2001, 2002 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Leon Woestenberg + * Martin Hentschel + * + */ +#ifndef LWIP_HDR_APPS_SNMP_H +#define LWIP_HDR_APPS_SNMP_H + +#include "lwip/apps/snmp_opts.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/err.h" +#include "lwip/apps/snmp_core.h" + +/** SNMP variable binding descriptor (publically needed for traps) */ +struct snmp_varbind +{ + /** pointer to next varbind, NULL for last in list */ + struct snmp_varbind *next; + /** pointer to previous varbind, NULL for first in list */ + struct snmp_varbind *prev; + + /** object identifier */ + struct snmp_obj_id oid; + + /** value ASN1 type */ + u8_t type; + /** object value length */ + u16_t value_len; + /** object value */ + void *value; +}; + +/** + * @ingroup snmp_core + * Agent setup, start listening to port 161. + */ +void snmp_init(void); +void snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs); + +void snmp_set_device_enterprise_oid(const struct snmp_obj_id* device_enterprise_oid); +const struct snmp_obj_id* snmp_get_device_enterprise_oid(void); + +void snmp_trap_dst_enable(u8_t dst_idx, u8_t enable); +void snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst); + +/** Generic trap: cold start */ +#define SNMP_GENTRAP_COLDSTART 0 +/** Generic trap: warm start */ +#define SNMP_GENTRAP_WARMSTART 1 +/** Generic trap: link down */ +#define SNMP_GENTRAP_LINKDOWN 2 +/** Generic trap: link up */ +#define SNMP_GENTRAP_LINKUP 3 +/** Generic trap: authentication failure */ +#define SNMP_GENTRAP_AUTH_FAILURE 4 +/** Generic trap: EGP neighbor lost */ +#define SNMP_GENTRAP_EGP_NEIGHBOR_LOSS 5 +/** Generic trap: enterprise specific */ +#define SNMP_GENTRAP_ENTERPRISE_SPECIFIC 6 + +err_t snmp_send_trap_generic(s32_t generic_trap); +err_t snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds); +err_t snmp_send_trap(const struct snmp_obj_id* oid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds); + +#define SNMP_AUTH_TRAPS_DISABLED 0 +#define SNMP_AUTH_TRAPS_ENABLED 1 +void snmp_set_auth_traps_enabled(u8_t enable); +u8_t snmp_get_auth_traps_enabled(void); + +const char * snmp_get_community(void); +const char * snmp_get_community_write(void); +const char * snmp_get_community_trap(void); +void snmp_set_community(const char * const community); +void snmp_set_community_write(const char * const community); +void snmp_set_community_trap(const char * const community); + +void snmp_coldstart_trap(void); +void snmp_authfail_trap(void); + +typedef void (*snmp_write_callback_fct)(const u32_t* oid, u8_t oid_len, void* callback_arg); +void snmp_set_write_callback(snmp_write_callback_fct write_callback, void* callback_arg); + +#endif /* LWIP_SNMP */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_SNMP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_core.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_core.h index e781c53..a832572 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_core.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_core.h @@ -1,364 +1,364 @@ -/** - * @file - * SNMP core API for implementing MIBs - */ - -/* - * Copyright (c) 2006 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * Author: Christiaan Simons - * Martin Hentschel - */ - -#ifndef LWIP_HDR_APPS_SNMP_CORE_H -#define LWIP_HDR_APPS_SNMP_CORE_H - -#include "lwip/apps/snmp_opts.h" - -#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/ip_addr.h" -#include "lwip/err.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* basic ASN1 defines */ -#define SNMP_ASN1_CLASS_UNIVERSAL 0x00 -#define SNMP_ASN1_CLASS_APPLICATION 0x40 -#define SNMP_ASN1_CLASS_CONTEXT 0x80 -#define SNMP_ASN1_CLASS_PRIVATE 0xC0 - -#define SNMP_ASN1_CONTENTTYPE_PRIMITIVE 0x00 -#define SNMP_ASN1_CONTENTTYPE_CONSTRUCTED 0x20 - -/* universal tags (from ASN.1 spec.) */ -#define SNMP_ASN1_UNIVERSAL_END_OF_CONTENT 0 -#define SNMP_ASN1_UNIVERSAL_INTEGER 2 -#define SNMP_ASN1_UNIVERSAL_OCTET_STRING 4 -#define SNMP_ASN1_UNIVERSAL_NULL 5 -#define SNMP_ASN1_UNIVERSAL_OBJECT_ID 6 -#define SNMP_ASN1_UNIVERSAL_SEQUENCE_OF 16 - -/* application specific (SNMP) tags (from SNMPv2-SMI) */ -#define SNMP_ASN1_APPLICATION_IPADDR 0 /* [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4)) */ -#define SNMP_ASN1_APPLICATION_COUNTER 1 /* [APPLICATION 1] IMPLICIT INTEGER (0..4294967295) => u32_t */ -#define SNMP_ASN1_APPLICATION_GAUGE 2 /* [APPLICATION 2] IMPLICIT INTEGER (0..4294967295) => u32_t */ -#define SNMP_ASN1_APPLICATION_TIMETICKS 3 /* [APPLICATION 3] IMPLICIT INTEGER (0..4294967295) => u32_t */ -#define SNMP_ASN1_APPLICATION_OPAQUE 4 /* [APPLICATION 4] IMPLICIT OCTET STRING */ -#define SNMP_ASN1_APPLICATION_COUNTER64 6 /* [APPLICATION 6] IMPLICIT INTEGER (0..18446744073709551615) */ - -/* context specific (SNMP) tags (from RFC 1905) */ -#define SNMP_ASN1_CONTEXT_VARBIND_NO_SUCH_INSTANCE 1 - -/* full ASN1 type defines */ -#define SNMP_ASN1_TYPE_END_OF_CONTENT (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_END_OF_CONTENT) -#define SNMP_ASN1_TYPE_INTEGER (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_INTEGER) -#define SNMP_ASN1_TYPE_OCTET_STRING (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_OCTET_STRING) -#define SNMP_ASN1_TYPE_NULL (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_NULL) -#define SNMP_ASN1_TYPE_OBJECT_ID (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_OBJECT_ID) -#define SNMP_ASN1_TYPE_SEQUENCE (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_UNIVERSAL_SEQUENCE_OF) -#define SNMP_ASN1_TYPE_IPADDR (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_IPADDR) -#define SNMP_ASN1_TYPE_IPADDRESS SNMP_ASN1_TYPE_IPADDR -#define SNMP_ASN1_TYPE_COUNTER (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_COUNTER) -#define SNMP_ASN1_TYPE_COUNTER32 SNMP_ASN1_TYPE_COUNTER -#define SNMP_ASN1_TYPE_GAUGE (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_GAUGE) -#define SNMP_ASN1_TYPE_GAUGE32 SNMP_ASN1_TYPE_GAUGE -#define SNMP_ASN1_TYPE_UNSIGNED32 SNMP_ASN1_TYPE_GAUGE -#define SNMP_ASN1_TYPE_TIMETICKS (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_TIMETICKS) -#define SNMP_ASN1_TYPE_OPAQUE (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_OPAQUE) -#define SNMP_ASN1_TYPE_COUNTER64 (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_COUNTER64) - -#define SNMP_VARBIND_EXCEPTION_OFFSET 0xF0 -#define SNMP_VARBIND_EXCEPTION_MASK 0x0F - -/** error codes predefined by SNMP prot. */ -typedef enum { - SNMP_ERR_NOERROR = 0, -/* -outdated v1 error codes. do not use anmore! -#define SNMP_ERR_NOSUCHNAME 2 use SNMP_ERR_NOSUCHINSTANCE instead -#define SNMP_ERR_BADVALUE 3 use SNMP_ERR_WRONGTYPE,SNMP_ERR_WRONGLENGTH,SNMP_ERR_WRONGENCODING or SNMP_ERR_WRONGVALUE instead -#define SNMP_ERR_READONLY 4 use SNMP_ERR_NOTWRITABLE instead -*/ - SNMP_ERR_GENERROR = 5, - SNMP_ERR_NOACCESS = 6, - SNMP_ERR_WRONGTYPE = 7, - SNMP_ERR_WRONGLENGTH = 8, - SNMP_ERR_WRONGENCODING = 9, - SNMP_ERR_WRONGVALUE = 10, - SNMP_ERR_NOCREATION = 11, - SNMP_ERR_INCONSISTENTVALUE = 12, - SNMP_ERR_RESOURCEUNAVAILABLE = 13, - SNMP_ERR_COMMITFAILED = 14, - SNMP_ERR_UNDOFAILED = 15, - SNMP_ERR_NOTWRITABLE = 17, - SNMP_ERR_INCONSISTENTNAME = 18, - - SNMP_ERR_NOSUCHINSTANCE = SNMP_VARBIND_EXCEPTION_OFFSET + SNMP_ASN1_CONTEXT_VARBIND_NO_SUCH_INSTANCE -} snmp_err_t; - -/** internal object identifier representation */ -struct snmp_obj_id -{ - u8_t len; - u32_t id[SNMP_MAX_OBJ_ID_LEN]; -}; - -struct snmp_obj_id_const_ref -{ - u8_t len; - const u32_t* id; -}; - -extern const struct snmp_obj_id_const_ref snmp_zero_dot_zero; /* administrative identifier from SNMPv2-SMI */ - -/** SNMP variant value, used as reference in struct snmp_node_instance and table implementation */ -union snmp_variant_value -{ - void* ptr; - const void* const_ptr; - u32_t u32; - s32_t s32; -}; - - -/** -SNMP MIB node types - tree node is the only node the stack can process in order to walk the tree, - all other nodes are assumed to be leaf nodes. - This cannot be an enum because users may want to define their own node types. -*/ -#define SNMP_NODE_TREE 0x00 -/* predefined leaf node types */ -#define SNMP_NODE_SCALAR 0x01 -#define SNMP_NODE_SCALAR_ARRAY 0x02 -#define SNMP_NODE_TABLE 0x03 -#define SNMP_NODE_THREADSYNC 0x04 - -/** node "base class" layout, the mandatory fields for a node */ -struct snmp_node -{ - /** one out of SNMP_NODE_TREE or any leaf node type (like SNMP_NODE_SCALAR) */ - u8_t node_type; - /** the number assigned to this node which used as part of the full OID */ - u32_t oid; -}; - -/** SNMP node instance access types */ -typedef enum { - SNMP_NODE_INSTANCE_ACCESS_READ = 1, - SNMP_NODE_INSTANCE_ACCESS_WRITE = 2, - SNMP_NODE_INSTANCE_READ_ONLY = SNMP_NODE_INSTANCE_ACCESS_READ, - SNMP_NODE_INSTANCE_READ_WRITE = (SNMP_NODE_INSTANCE_ACCESS_READ | SNMP_NODE_INSTANCE_ACCESS_WRITE), - SNMP_NODE_INSTANCE_WRITE_ONLY = SNMP_NODE_INSTANCE_ACCESS_WRITE, - SNMP_NODE_INSTANCE_NOT_ACCESSIBLE = 0 -} snmp_access_t; - -struct snmp_node_instance; - -typedef s16_t (*node_instance_get_value_method)(struct snmp_node_instance*, void*); -typedef snmp_err_t (*node_instance_set_test_method)(struct snmp_node_instance*, u16_t, void*); -typedef snmp_err_t (*node_instance_set_value_method)(struct snmp_node_instance*, u16_t, void*); -typedef void (*node_instance_release_method)(struct snmp_node_instance*); - -#define SNMP_GET_VALUE_RAW_DATA 0x8000 - -/** SNMP node instance */ -struct snmp_node_instance -{ - /** prefilled with the node, get_instance() is called on; may be changed by user to any value to pass an arbitrary node between calls to get_instance() and get_value/test_value/set_value */ - const struct snmp_node* node; - /** prefilled with the instance id requested; for get_instance() this is the exact oid requested; for get_next_instance() this is the relative starting point, stack expects relative oid of next node here */ - struct snmp_obj_id instance_oid; - - /** ASN type for this object (see snmp_asn1.h for definitions) */ - u8_t asn1_type; - /** one out of instance access types defined above (SNMP_NODE_INSTANCE_READ_ONLY,...) */ - snmp_access_t access; - - /** returns object value for the given object identifier. Return values <0 to indicate an error */ - node_instance_get_value_method get_value; - /** tests length and/or range BEFORE setting */ - node_instance_set_test_method set_test; - /** sets object value, only called when set_test() was successful */ - node_instance_set_value_method set_value; - /** called in any case when the instance is not required anymore by stack (useful for freeing memory allocated in get_instance/get_next_instance methods) */ - node_instance_release_method release_instance; - - /** reference to pass arbitrary value between calls to get_instance() and get_value/test_value/set_value */ - union snmp_variant_value reference; - /** see reference (if reference is a pointer, the length of underlying data may be stored here or anything else) */ - u32_t reference_len; -}; - - -/** SNMP tree node */ -struct snmp_tree_node -{ - /** inherited "base class" members */ - struct snmp_node node; - u16_t subnode_count; - const struct snmp_node* const *subnodes; -}; - -#define SNMP_CREATE_TREE_NODE(oid, subnodes) \ - {{ SNMP_NODE_TREE, (oid) }, \ - (u16_t)LWIP_ARRAYSIZE(subnodes), (subnodes) } - -#define SNMP_CREATE_EMPTY_TREE_NODE(oid) \ - {{ SNMP_NODE_TREE, (oid) }, \ - 0, NULL } - -/** SNMP leaf node */ -struct snmp_leaf_node -{ - /** inherited "base class" members */ - struct snmp_node node; - snmp_err_t (*get_instance)(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); - snmp_err_t (*get_next_instance)(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); -}; - -/** represents a single mib with its base oid and root node */ -struct snmp_mib -{ - const u32_t *base_oid; - u8_t base_oid_len; - const struct snmp_node *root_node; -}; - -#define SNMP_MIB_CREATE(oid_list, root_node) { (oid_list), (u8_t)LWIP_ARRAYSIZE(oid_list), root_node } - -/** OID range structure */ -struct snmp_oid_range -{ - u32_t min; - u32_t max; -}; - -/** checks if incoming OID length and values are in allowed ranges */ -u8_t snmp_oid_in_range(const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len); - -typedef enum { - SNMP_NEXT_OID_STATUS_SUCCESS, - SNMP_NEXT_OID_STATUS_NO_MATCH, - SNMP_NEXT_OID_STATUS_BUF_TO_SMALL -} snmp_next_oid_status_t; - -/** state for next_oid_init / next_oid_check functions */ -struct snmp_next_oid_state -{ - const u32_t* start_oid; - u8_t start_oid_len; - - u32_t* next_oid; - u8_t next_oid_len; - u8_t next_oid_max_len; - - snmp_next_oid_status_t status; - void* reference; -}; - -void snmp_next_oid_init(struct snmp_next_oid_state *state, - const u32_t *start_oid, u8_t start_oid_len, - u32_t *next_oid_buf, u8_t next_oid_max_len); -u8_t snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len); -u8_t snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len, void* reference); - -void snmp_oid_assign(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len); -void snmp_oid_combine(struct snmp_obj_id* target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len); -void snmp_oid_prefix(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len); -void snmp_oid_append(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len); -u8_t snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len); -s8_t snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len); - -#if LWIP_IPV4 -u8_t snmp_oid_to_ip4(const u32_t *oid, ip4_addr_t *ip); -void snmp_ip4_to_oid(const ip4_addr_t *ip, u32_t *oid); -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 -u8_t snmp_oid_to_ip6(const u32_t *oid, ip6_addr_t *ip); -void snmp_ip6_to_oid(const ip6_addr_t *ip, u32_t *oid); -#endif /* LWIP_IPV6 */ -#if LWIP_IPV4 || LWIP_IPV6 -u8_t snmp_ip_to_oid(const ip_addr_t *ip, u32_t *oid); -u8_t snmp_ip_port_to_oid(const ip_addr_t *ip, u16_t port, u32_t *oid); - -u8_t snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip); -u8_t snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port); -#endif /* LWIP_IPV4 || LWIP_IPV6 */ - -struct netif; -u8_t netif_to_num(const struct netif *netif); - -snmp_err_t snmp_set_test_ok(struct snmp_node_instance* instance, u16_t value_len, void* value); /* generic function which can be used if test is always successful */ - -err_t snmp_decode_bits(const u8_t *buf, u32_t buf_len, u32_t *bit_value); -err_t snmp_decode_truthvalue(const s32_t *asn1_value, u8_t *bool_value); -u8_t snmp_encode_bits(u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count); -u8_t snmp_encode_truthvalue(s32_t *asn1_value, u32_t bool_value); - -struct snmp_statistics -{ - u32_t inpkts; - u32_t outpkts; - u32_t inbadversions; - u32_t inbadcommunitynames; - u32_t inbadcommunityuses; - u32_t inasnparseerrs; - u32_t intoobigs; - u32_t innosuchnames; - u32_t inbadvalues; - u32_t inreadonlys; - u32_t ingenerrs; - u32_t intotalreqvars; - u32_t intotalsetvars; - u32_t ingetrequests; - u32_t ingetnexts; - u32_t insetrequests; - u32_t ingetresponses; - u32_t intraps; - u32_t outtoobigs; - u32_t outnosuchnames; - u32_t outbadvalues; - u32_t outgenerrs; - u32_t outgetrequests; - u32_t outgetnexts; - u32_t outsetrequests; - u32_t outgetresponses; - u32_t outtraps; -}; - -extern struct snmp_statistics snmp_stats; - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_SNMP */ - -#endif /* LWIP_HDR_APPS_SNMP_CORE_H */ +/** + * @file + * SNMP core API for implementing MIBs + */ + +/* + * Copyright (c) 2006 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * Author: Christiaan Simons + * Martin Hentschel + */ + +#ifndef LWIP_HDR_APPS_SNMP_CORE_H +#define LWIP_HDR_APPS_SNMP_CORE_H + +#include "lwip/apps/snmp_opts.h" + +#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/ip_addr.h" +#include "lwip/err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* basic ASN1 defines */ +#define SNMP_ASN1_CLASS_UNIVERSAL 0x00 +#define SNMP_ASN1_CLASS_APPLICATION 0x40 +#define SNMP_ASN1_CLASS_CONTEXT 0x80 +#define SNMP_ASN1_CLASS_PRIVATE 0xC0 + +#define SNMP_ASN1_CONTENTTYPE_PRIMITIVE 0x00 +#define SNMP_ASN1_CONTENTTYPE_CONSTRUCTED 0x20 + +/* universal tags (from ASN.1 spec.) */ +#define SNMP_ASN1_UNIVERSAL_END_OF_CONTENT 0 +#define SNMP_ASN1_UNIVERSAL_INTEGER 2 +#define SNMP_ASN1_UNIVERSAL_OCTET_STRING 4 +#define SNMP_ASN1_UNIVERSAL_NULL 5 +#define SNMP_ASN1_UNIVERSAL_OBJECT_ID 6 +#define SNMP_ASN1_UNIVERSAL_SEQUENCE_OF 16 + +/* application specific (SNMP) tags (from SNMPv2-SMI) */ +#define SNMP_ASN1_APPLICATION_IPADDR 0 /* [APPLICATION 0] IMPLICIT OCTET STRING (SIZE (4)) */ +#define SNMP_ASN1_APPLICATION_COUNTER 1 /* [APPLICATION 1] IMPLICIT INTEGER (0..4294967295) => u32_t */ +#define SNMP_ASN1_APPLICATION_GAUGE 2 /* [APPLICATION 2] IMPLICIT INTEGER (0..4294967295) => u32_t */ +#define SNMP_ASN1_APPLICATION_TIMETICKS 3 /* [APPLICATION 3] IMPLICIT INTEGER (0..4294967295) => u32_t */ +#define SNMP_ASN1_APPLICATION_OPAQUE 4 /* [APPLICATION 4] IMPLICIT OCTET STRING */ +#define SNMP_ASN1_APPLICATION_COUNTER64 6 /* [APPLICATION 6] IMPLICIT INTEGER (0..18446744073709551615) */ + +/* context specific (SNMP) tags (from RFC 1905) */ +#define SNMP_ASN1_CONTEXT_VARBIND_NO_SUCH_INSTANCE 1 + +/* full ASN1 type defines */ +#define SNMP_ASN1_TYPE_END_OF_CONTENT (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_END_OF_CONTENT) +#define SNMP_ASN1_TYPE_INTEGER (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_INTEGER) +#define SNMP_ASN1_TYPE_OCTET_STRING (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_OCTET_STRING) +#define SNMP_ASN1_TYPE_NULL (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_NULL) +#define SNMP_ASN1_TYPE_OBJECT_ID (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_UNIVERSAL_OBJECT_ID) +#define SNMP_ASN1_TYPE_SEQUENCE (SNMP_ASN1_CLASS_UNIVERSAL | SNMP_ASN1_CONTENTTYPE_CONSTRUCTED | SNMP_ASN1_UNIVERSAL_SEQUENCE_OF) +#define SNMP_ASN1_TYPE_IPADDR (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_IPADDR) +#define SNMP_ASN1_TYPE_IPADDRESS SNMP_ASN1_TYPE_IPADDR +#define SNMP_ASN1_TYPE_COUNTER (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_COUNTER) +#define SNMP_ASN1_TYPE_COUNTER32 SNMP_ASN1_TYPE_COUNTER +#define SNMP_ASN1_TYPE_GAUGE (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_GAUGE) +#define SNMP_ASN1_TYPE_GAUGE32 SNMP_ASN1_TYPE_GAUGE +#define SNMP_ASN1_TYPE_UNSIGNED32 SNMP_ASN1_TYPE_GAUGE +#define SNMP_ASN1_TYPE_TIMETICKS (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_TIMETICKS) +#define SNMP_ASN1_TYPE_OPAQUE (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_OPAQUE) +#define SNMP_ASN1_TYPE_COUNTER64 (SNMP_ASN1_CLASS_APPLICATION | SNMP_ASN1_CONTENTTYPE_PRIMITIVE | SNMP_ASN1_APPLICATION_COUNTER64) + +#define SNMP_VARBIND_EXCEPTION_OFFSET 0xF0 +#define SNMP_VARBIND_EXCEPTION_MASK 0x0F + +/** error codes predefined by SNMP prot. */ +typedef enum { + SNMP_ERR_NOERROR = 0, +/* +outdated v1 error codes. do not use anmore! +#define SNMP_ERR_NOSUCHNAME 2 use SNMP_ERR_NOSUCHINSTANCE instead +#define SNMP_ERR_BADVALUE 3 use SNMP_ERR_WRONGTYPE,SNMP_ERR_WRONGLENGTH,SNMP_ERR_WRONGENCODING or SNMP_ERR_WRONGVALUE instead +#define SNMP_ERR_READONLY 4 use SNMP_ERR_NOTWRITABLE instead +*/ + SNMP_ERR_GENERROR = 5, + SNMP_ERR_NOACCESS = 6, + SNMP_ERR_WRONGTYPE = 7, + SNMP_ERR_WRONGLENGTH = 8, + SNMP_ERR_WRONGENCODING = 9, + SNMP_ERR_WRONGVALUE = 10, + SNMP_ERR_NOCREATION = 11, + SNMP_ERR_INCONSISTENTVALUE = 12, + SNMP_ERR_RESOURCEUNAVAILABLE = 13, + SNMP_ERR_COMMITFAILED = 14, + SNMP_ERR_UNDOFAILED = 15, + SNMP_ERR_NOTWRITABLE = 17, + SNMP_ERR_INCONSISTENTNAME = 18, + + SNMP_ERR_NOSUCHINSTANCE = SNMP_VARBIND_EXCEPTION_OFFSET + SNMP_ASN1_CONTEXT_VARBIND_NO_SUCH_INSTANCE +} snmp_err_t; + +/** internal object identifier representation */ +struct snmp_obj_id +{ + u8_t len; + u32_t id[SNMP_MAX_OBJ_ID_LEN]; +}; + +struct snmp_obj_id_const_ref +{ + u8_t len; + const u32_t* id; +}; + +extern const struct snmp_obj_id_const_ref snmp_zero_dot_zero; /* administrative identifier from SNMPv2-SMI */ + +/** SNMP variant value, used as reference in struct snmp_node_instance and table implementation */ +union snmp_variant_value +{ + void* ptr; + const void* const_ptr; + u32_t u32; + s32_t s32; +}; + + +/** +SNMP MIB node types + tree node is the only node the stack can process in order to walk the tree, + all other nodes are assumed to be leaf nodes. + This cannot be an enum because users may want to define their own node types. +*/ +#define SNMP_NODE_TREE 0x00 +/* predefined leaf node types */ +#define SNMP_NODE_SCALAR 0x01 +#define SNMP_NODE_SCALAR_ARRAY 0x02 +#define SNMP_NODE_TABLE 0x03 +#define SNMP_NODE_THREADSYNC 0x04 + +/** node "base class" layout, the mandatory fields for a node */ +struct snmp_node +{ + /** one out of SNMP_NODE_TREE or any leaf node type (like SNMP_NODE_SCALAR) */ + u8_t node_type; + /** the number assigned to this node which used as part of the full OID */ + u32_t oid; +}; + +/** SNMP node instance access types */ +typedef enum { + SNMP_NODE_INSTANCE_ACCESS_READ = 1, + SNMP_NODE_INSTANCE_ACCESS_WRITE = 2, + SNMP_NODE_INSTANCE_READ_ONLY = SNMP_NODE_INSTANCE_ACCESS_READ, + SNMP_NODE_INSTANCE_READ_WRITE = (SNMP_NODE_INSTANCE_ACCESS_READ | SNMP_NODE_INSTANCE_ACCESS_WRITE), + SNMP_NODE_INSTANCE_WRITE_ONLY = SNMP_NODE_INSTANCE_ACCESS_WRITE, + SNMP_NODE_INSTANCE_NOT_ACCESSIBLE = 0 +} snmp_access_t; + +struct snmp_node_instance; + +typedef s16_t (*node_instance_get_value_method)(struct snmp_node_instance*, void*); +typedef snmp_err_t (*node_instance_set_test_method)(struct snmp_node_instance*, u16_t, void*); +typedef snmp_err_t (*node_instance_set_value_method)(struct snmp_node_instance*, u16_t, void*); +typedef void (*node_instance_release_method)(struct snmp_node_instance*); + +#define SNMP_GET_VALUE_RAW_DATA 0x8000 + +/** SNMP node instance */ +struct snmp_node_instance +{ + /** prefilled with the node, get_instance() is called on; may be changed by user to any value to pass an arbitrary node between calls to get_instance() and get_value/test_value/set_value */ + const struct snmp_node* node; + /** prefilled with the instance id requested; for get_instance() this is the exact oid requested; for get_next_instance() this is the relative starting point, stack expects relative oid of next node here */ + struct snmp_obj_id instance_oid; + + /** ASN type for this object (see snmp_asn1.h for definitions) */ + u8_t asn1_type; + /** one out of instance access types defined above (SNMP_NODE_INSTANCE_READ_ONLY,...) */ + snmp_access_t access; + + /** returns object value for the given object identifier. Return values <0 to indicate an error */ + node_instance_get_value_method get_value; + /** tests length and/or range BEFORE setting */ + node_instance_set_test_method set_test; + /** sets object value, only called when set_test() was successful */ + node_instance_set_value_method set_value; + /** called in any case when the instance is not required anymore by stack (useful for freeing memory allocated in get_instance/get_next_instance methods) */ + node_instance_release_method release_instance; + + /** reference to pass arbitrary value between calls to get_instance() and get_value/test_value/set_value */ + union snmp_variant_value reference; + /** see reference (if reference is a pointer, the length of underlying data may be stored here or anything else) */ + u32_t reference_len; +}; + + +/** SNMP tree node */ +struct snmp_tree_node +{ + /** inherited "base class" members */ + struct snmp_node node; + u16_t subnode_count; + const struct snmp_node* const *subnodes; +}; + +#define SNMP_CREATE_TREE_NODE(oid, subnodes) \ + {{ SNMP_NODE_TREE, (oid) }, \ + (u16_t)LWIP_ARRAYSIZE(subnodes), (subnodes) } + +#define SNMP_CREATE_EMPTY_TREE_NODE(oid) \ + {{ SNMP_NODE_TREE, (oid) }, \ + 0, NULL } + +/** SNMP leaf node */ +struct snmp_leaf_node +{ + /** inherited "base class" members */ + struct snmp_node node; + snmp_err_t (*get_instance)(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); + snmp_err_t (*get_next_instance)(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); +}; + +/** represents a single mib with its base oid and root node */ +struct snmp_mib +{ + const u32_t *base_oid; + u8_t base_oid_len; + const struct snmp_node *root_node; +}; + +#define SNMP_MIB_CREATE(oid_list, root_node) { (oid_list), (u8_t)LWIP_ARRAYSIZE(oid_list), root_node } + +/** OID range structure */ +struct snmp_oid_range +{ + u32_t min; + u32_t max; +}; + +/** checks if incoming OID length and values are in allowed ranges */ +u8_t snmp_oid_in_range(const u32_t *oid_in, u8_t oid_len, const struct snmp_oid_range *oid_ranges, u8_t oid_ranges_len); + +typedef enum { + SNMP_NEXT_OID_STATUS_SUCCESS, + SNMP_NEXT_OID_STATUS_NO_MATCH, + SNMP_NEXT_OID_STATUS_BUF_TO_SMALL +} snmp_next_oid_status_t; + +/** state for next_oid_init / next_oid_check functions */ +struct snmp_next_oid_state +{ + const u32_t* start_oid; + u8_t start_oid_len; + + u32_t* next_oid; + u8_t next_oid_len; + u8_t next_oid_max_len; + + snmp_next_oid_status_t status; + void* reference; +}; + +void snmp_next_oid_init(struct snmp_next_oid_state *state, + const u32_t *start_oid, u8_t start_oid_len, + u32_t *next_oid_buf, u8_t next_oid_max_len); +u8_t snmp_next_oid_precheck(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len); +u8_t snmp_next_oid_check(struct snmp_next_oid_state *state, const u32_t *oid, const u8_t oid_len, void* reference); + +void snmp_oid_assign(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len); +void snmp_oid_combine(struct snmp_obj_id* target, const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len); +void snmp_oid_prefix(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len); +void snmp_oid_append(struct snmp_obj_id* target, const u32_t *oid, u8_t oid_len); +u8_t snmp_oid_equal(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len); +s8_t snmp_oid_compare(const u32_t *oid1, u8_t oid1_len, const u32_t *oid2, u8_t oid2_len); + +#if LWIP_IPV4 +u8_t snmp_oid_to_ip4(const u32_t *oid, ip4_addr_t *ip); +void snmp_ip4_to_oid(const ip4_addr_t *ip, u32_t *oid); +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 +u8_t snmp_oid_to_ip6(const u32_t *oid, ip6_addr_t *ip); +void snmp_ip6_to_oid(const ip6_addr_t *ip, u32_t *oid); +#endif /* LWIP_IPV6 */ +#if LWIP_IPV4 || LWIP_IPV6 +u8_t snmp_ip_to_oid(const ip_addr_t *ip, u32_t *oid); +u8_t snmp_ip_port_to_oid(const ip_addr_t *ip, u16_t port, u32_t *oid); + +u8_t snmp_oid_to_ip(const u32_t *oid, u8_t oid_len, ip_addr_t *ip); +u8_t snmp_oid_to_ip_port(const u32_t *oid, u8_t oid_len, ip_addr_t *ip, u16_t *port); +#endif /* LWIP_IPV4 || LWIP_IPV6 */ + +struct netif; +u8_t netif_to_num(const struct netif *netif); + +snmp_err_t snmp_set_test_ok(struct snmp_node_instance* instance, u16_t value_len, void* value); /* generic function which can be used if test is always successful */ + +err_t snmp_decode_bits(const u8_t *buf, u32_t buf_len, u32_t *bit_value); +err_t snmp_decode_truthvalue(const s32_t *asn1_value, u8_t *bool_value); +u8_t snmp_encode_bits(u8_t *buf, u32_t buf_len, u32_t bit_value, u8_t bit_count); +u8_t snmp_encode_truthvalue(s32_t *asn1_value, u32_t bool_value); + +struct snmp_statistics +{ + u32_t inpkts; + u32_t outpkts; + u32_t inbadversions; + u32_t inbadcommunitynames; + u32_t inbadcommunityuses; + u32_t inasnparseerrs; + u32_t intoobigs; + u32_t innosuchnames; + u32_t inbadvalues; + u32_t inreadonlys; + u32_t ingenerrs; + u32_t intotalreqvars; + u32_t intotalsetvars; + u32_t ingetrequests; + u32_t ingetnexts; + u32_t insetrequests; + u32_t ingetresponses; + u32_t intraps; + u32_t outtoobigs; + u32_t outnosuchnames; + u32_t outbadvalues; + u32_t outgenerrs; + u32_t outgetrequests; + u32_t outgetnexts; + u32_t outsetrequests; + u32_t outgetresponses; + u32_t outtraps; +}; + +extern struct snmp_statistics snmp_stats; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_SNMP */ + +#endif /* LWIP_HDR_APPS_SNMP_CORE_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_mib2.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_mib2.h index 2f4a689..392ee25 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_mib2.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_mib2.h @@ -1,78 +1,78 @@ -/** - * @file - * SNMP MIB2 API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Dirk Ziegelmeier - * - */ -#ifndef LWIP_HDR_APPS_SNMP_MIB2_H -#define LWIP_HDR_APPS_SNMP_MIB2_H - -#include "lwip/apps/snmp_opts.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ -#if SNMP_LWIP_MIB2 - -#include "lwip/apps/snmp_core.h" - -extern const struct snmp_mib mib2; - -#if SNMP_USE_NETCONN -#include "lwip/apps/snmp_threadsync.h" -void snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void* arg); -extern struct snmp_threadsync_instance snmp_mib2_lwip_locks; -#endif - -#ifndef SNMP_SYSSERVICES -#define SNMP_SYSSERVICES ((1 << 6) | (1 << 3) | ((IP_FORWARD) << 2)) -#endif - -void snmp_mib2_set_sysdescr(const u8_t* str, const u16_t* len); /* read-only be defintion */ -void snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); -void snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen); -void snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); -void snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen); -void snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); -void snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen); - -#endif /* SNMP_LWIP_MIB2 */ -#endif /* LWIP_SNMP */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_SNMP_MIB2_H */ +/** + * @file + * SNMP MIB2 API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Dirk Ziegelmeier + * + */ +#ifndef LWIP_HDR_APPS_SNMP_MIB2_H +#define LWIP_HDR_APPS_SNMP_MIB2_H + +#include "lwip/apps/snmp_opts.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ +#if SNMP_LWIP_MIB2 + +#include "lwip/apps/snmp_core.h" + +extern const struct snmp_mib mib2; + +#if SNMP_USE_NETCONN +#include "lwip/apps/snmp_threadsync.h" +void snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void* arg); +extern struct snmp_threadsync_instance snmp_mib2_lwip_locks; +#endif + +#ifndef SNMP_SYSSERVICES +#define SNMP_SYSSERVICES ((1 << 6) | (1 << 3) | ((IP_FORWARD) << 2)) +#endif + +void snmp_mib2_set_sysdescr(const u8_t* str, const u16_t* len); /* read-only be defintion */ +void snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); +void snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen); +void snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); +void snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen); +void snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize); +void snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen); + +#endif /* SNMP_LWIP_MIB2 */ +#endif /* LWIP_SNMP */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_SNMP_MIB2_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_opts.h index 6c9ba7b..d4ae068 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_opts.h @@ -1,293 +1,293 @@ -/** - * @file - * SNMP server options list - */ - -/* - * Copyright (c) 2015 Dirk Ziegelmeier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Dirk Ziegelmeier - * - */ -#ifndef LWIP_HDR_SNMP_OPTS_H -#define LWIP_HDR_SNMP_OPTS_H - -#include "lwip/opt.h" - -/** - * @defgroup snmp_opts Options - * @ingroup snmp - * @{ - */ - -/** - * LWIP_SNMP==1: This enables the lwIP SNMP agent. UDP must be available - * for SNMP transport. - * If you want to use your own SNMP agent, leave this disabled. - * To integrate MIB2 of an external agent, you need to enable - * LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks - * and statistics counters you need to get MIB2 working. - */ -#if !defined LWIP_SNMP || defined __DOXYGEN__ -#define LWIP_SNMP 0 -#endif - -/** - * SNMP_USE_NETCONN: Use netconn API instead of raw API. - * Makes SNMP agent run in a worker thread, so blocking operations - * can be done in MIB calls. - */ -#if !defined SNMP_USE_NETCONN || defined __DOXYGEN__ -#define SNMP_USE_NETCONN 0 -#endif - -/** - * SNMP_USE_RAW: Use raw API. - * SNMP agent does not run in a worker thread, so blocking operations - * should not be done in MIB calls. - */ -#if !defined SNMP_USE_RAW || defined __DOXYGEN__ -#define SNMP_USE_RAW 1 -#endif - -#if SNMP_USE_NETCONN && SNMP_USE_RAW -#error SNMP stack can use only one of the APIs {raw, netconn} -#endif - -#if LWIP_SNMP && !SNMP_USE_NETCONN && !SNMP_USE_RAW -#error SNMP stack needs a receive API and UDP {raw, netconn} -#endif - -#if SNMP_USE_NETCONN -/** - * SNMP_STACK_SIZE: Stack size of SNMP netconn worker thread - */ -#if !defined SNMP_STACK_SIZE || defined __DOXYGEN__ -#define SNMP_STACK_SIZE DEFAULT_THREAD_STACKSIZE -#endif - -/** - * SNMP_THREAD_PRIO: SNMP netconn worker thread priority - */ -#if !defined SNMP_THREAD_PRIO || defined __DOXYGEN__ -#define SNMP_THREAD_PRIO DEFAULT_THREAD_PRIO -#endif -#endif /* SNMP_USE_NETCONN */ - -/** - * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap - * destination is required - */ -#if !defined SNMP_TRAP_DESTINATIONS || defined __DOXYGEN__ -#define SNMP_TRAP_DESTINATIONS 1 -#endif - -/** - * Only allow SNMP write actions that are 'safe' (e.g. disabling netifs is not - * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). - * Unsafe requests are disabled by default! - */ -#if !defined SNMP_SAFE_REQUESTS || defined __DOXYGEN__ -#define SNMP_SAFE_REQUESTS 1 -#endif - -/** - * The maximum length of strings used. - */ -#if !defined SNMP_MAX_OCTET_STRING_LEN || defined __DOXYGEN__ -#define SNMP_MAX_OCTET_STRING_LEN 127 -#endif - -/** - * The maximum number of Sub ID's inside an object identifier. - * Indirectly this also limits the maximum depth of SNMP tree. - */ -#if !defined SNMP_MAX_OBJ_ID_LEN || defined __DOXYGEN__ -#define SNMP_MAX_OBJ_ID_LEN 50 -#endif - -#if !defined SNMP_MAX_VALUE_SIZE || defined __DOXYGEN__ -/** - * The maximum size of a value. - */ -#define SNMP_MIN_VALUE_SIZE (2 * sizeof(u32_t*)) /* size required to store the basic types (8 bytes for counter64) */ -/** - * The minimum size of a value. - */ -#define SNMP_MAX_VALUE_SIZE LWIP_MAX(LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN), sizeof(u32_t)*(SNMP_MAX_OBJ_ID_LEN)), SNMP_MIN_VALUE_SIZE) -#endif - -/** - * The snmp read-access community. Used for write-access and traps, too - * unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively. - */ -#if !defined SNMP_COMMUNITY || defined __DOXYGEN__ -#define SNMP_COMMUNITY "public" -#endif - -/** - * The snmp write-access community. - * Set this community to "" in order to disallow any write access. - */ -#if !defined SNMP_COMMUNITY_WRITE || defined __DOXYGEN__ -#define SNMP_COMMUNITY_WRITE "private" -#endif - -/** - * The snmp community used for sending traps. - */ -#if !defined SNMP_COMMUNITY_TRAP || defined __DOXYGEN__ -#define SNMP_COMMUNITY_TRAP "public" -#endif - -/** - * The maximum length of community string. - * If community names shall be adjusted at runtime via snmp_set_community() calls, - * enter here the possible maximum length (+1 for terminating null character). - */ -#if !defined SNMP_MAX_COMMUNITY_STR_LEN || defined __DOXYGEN__ -#define SNMP_MAX_COMMUNITY_STR_LEN LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP)) -#endif - -/** - * The OID identifiying the device. This may be the enterprise OID itself or any OID located below it in tree. - */ -#if !defined SNMP_DEVICE_ENTERPRISE_OID || defined __DOXYGEN__ -#define SNMP_LWIP_ENTERPRISE_OID 26381 -/** - * IANA assigned enterprise ID for lwIP is 26381 - * @see http://www.iana.org/assignments/enterprise-numbers - * - * @note this enterprise ID is assigned to the lwIP project, - * all object identifiers living under this ID are assigned - * by the lwIP maintainers! - * @note don't change this define, use snmp_set_device_enterprise_oid() - * - * If you need to create your own private MIB you'll need - * to apply for your own enterprise ID with IANA: - * http://www.iana.org/numbers.html - */ -#define SNMP_DEVICE_ENTERPRISE_OID {1, 3, 6, 1, 4, 1, SNMP_LWIP_ENTERPRISE_OID} -/** - * Length of SNMP_DEVICE_ENTERPRISE_OID - */ -#define SNMP_DEVICE_ENTERPRISE_OID_LEN 7 -#endif - -/** - * SNMP_DEBUG: Enable debugging for SNMP messages. - */ -#if !defined SNMP_DEBUG || defined __DOXYGEN__ -#define SNMP_DEBUG LWIP_DBG_OFF -#endif - -/** - * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. - */ -#if !defined SNMP_MIB_DEBUG || defined __DOXYGEN__ -#define SNMP_MIB_DEBUG LWIP_DBG_OFF -#endif - -/** - * Indicates if the MIB2 implementation of LWIP SNMP stack is used. - */ -#if !defined SNMP_LWIP_MIB2 || defined __DOXYGEN__ -#define SNMP_LWIP_MIB2 LWIP_SNMP -#endif - -/** - * Value return for sysDesc field of MIB2. - */ -#if !defined SNMP_LWIP_MIB2_SYSDESC || defined __DOXYGEN__ -#define SNMP_LWIP_MIB2_SYSDESC "lwIP" -#endif - -/** - * Value return for sysName field of MIB2. - * To make sysName field settable, call snmp_mib2_set_sysname() to provide the necessary buffers. - */ -#if !defined SNMP_LWIP_MIB2_SYSNAME || defined __DOXYGEN__ -#define SNMP_LWIP_MIB2_SYSNAME "FQDN-unk" -#endif - -/** - * Value return for sysContact field of MIB2. - * To make sysContact field settable, call snmp_mib2_set_syscontact() to provide the necessary buffers. - */ -#if !defined SNMP_LWIP_MIB2_SYSCONTACT || defined __DOXYGEN__ -#define SNMP_LWIP_MIB2_SYSCONTACT "" -#endif - -/** - * Value return for sysLocation field of MIB2. - * To make sysLocation field settable, call snmp_mib2_set_syslocation() to provide the necessary buffers. - */ -#if !defined SNMP_LWIP_MIB2_SYSLOCATION || defined __DOXYGEN__ -#define SNMP_LWIP_MIB2_SYSLOCATION "" -#endif - -/** - * This value is used to limit the repetitions processed in GetBulk requests (value == 0 means no limitation). - * This may be useful to limit the load for a single request. - * According to SNMP RFC 1905 it is allowed to not return all requested variables from a GetBulk request if system load would be too high. - * so the effect is that the client will do more requests to gather all data. - * For the stack this could be useful in case that SNMP processing is done in TCP/IP thread. In this situation a request with many - * repetitions could block the thread for a longer time. Setting limit here will keep the stack more responsive. - */ -#if !defined SNMP_LWIP_GETBULK_MAX_REPETITIONS || defined __DOXYGEN__ -#define SNMP_LWIP_GETBULK_MAX_REPETITIONS 0 -#endif - -/** - * @} - */ - -/* - ------------------------------------ - ---------- SNMPv3 options ---------- - ------------------------------------ -*/ - -/** - * LWIP_SNMP_V3==1: This enables EXPERIMENTAL SNMPv3 support. LWIP_SNMP must - * also be enabled. - * THIS IS UNDER DEVELOPMENT AND SHOULD NOT BE ENABLED IN PRODUCTS. - */ -#ifndef LWIP_SNMP_V3 -#define LWIP_SNMP_V3 0 -#endif - -#ifndef LWIP_SNMP_V3_CRYPTO -#define LWIP_SNMP_V3_CRYPTO LWIP_SNMP_V3 -#endif - -#ifndef LWIP_SNMP_V3_MBEDTLS -#define LWIP_SNMP_V3_MBEDTLS LWIP_SNMP_V3 -#endif - -#endif /* LWIP_HDR_SNMP_OPTS_H */ +/** + * @file + * SNMP server options list + */ + +/* + * Copyright (c) 2015 Dirk Ziegelmeier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Dirk Ziegelmeier + * + */ +#ifndef LWIP_HDR_SNMP_OPTS_H +#define LWIP_HDR_SNMP_OPTS_H + +#include "lwip/opt.h" + +/** + * @defgroup snmp_opts Options + * @ingroup snmp + * @{ + */ + +/** + * LWIP_SNMP==1: This enables the lwIP SNMP agent. UDP must be available + * for SNMP transport. + * If you want to use your own SNMP agent, leave this disabled. + * To integrate MIB2 of an external agent, you need to enable + * LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks + * and statistics counters you need to get MIB2 working. + */ +#if !defined LWIP_SNMP || defined __DOXYGEN__ +#define LWIP_SNMP 0 +#endif + +/** + * SNMP_USE_NETCONN: Use netconn API instead of raw API. + * Makes SNMP agent run in a worker thread, so blocking operations + * can be done in MIB calls. + */ +#if !defined SNMP_USE_NETCONN || defined __DOXYGEN__ +#define SNMP_USE_NETCONN 0 +#endif + +/** + * SNMP_USE_RAW: Use raw API. + * SNMP agent does not run in a worker thread, so blocking operations + * should not be done in MIB calls. + */ +#if !defined SNMP_USE_RAW || defined __DOXYGEN__ +#define SNMP_USE_RAW 1 +#endif + +#if SNMP_USE_NETCONN && SNMP_USE_RAW +#error SNMP stack can use only one of the APIs {raw, netconn} +#endif + +#if LWIP_SNMP && !SNMP_USE_NETCONN && !SNMP_USE_RAW +#error SNMP stack needs a receive API and UDP {raw, netconn} +#endif + +#if SNMP_USE_NETCONN +/** + * SNMP_STACK_SIZE: Stack size of SNMP netconn worker thread + */ +#if !defined SNMP_STACK_SIZE || defined __DOXYGEN__ +#define SNMP_STACK_SIZE DEFAULT_THREAD_STACKSIZE +#endif + +/** + * SNMP_THREAD_PRIO: SNMP netconn worker thread priority + */ +#if !defined SNMP_THREAD_PRIO || defined __DOXYGEN__ +#define SNMP_THREAD_PRIO DEFAULT_THREAD_PRIO +#endif +#endif /* SNMP_USE_NETCONN */ + +/** + * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap + * destination is required + */ +#if !defined SNMP_TRAP_DESTINATIONS || defined __DOXYGEN__ +#define SNMP_TRAP_DESTINATIONS 1 +#endif + +/** + * Only allow SNMP write actions that are 'safe' (e.g. disabling netifs is not + * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). + * Unsafe requests are disabled by default! + */ +#if !defined SNMP_SAFE_REQUESTS || defined __DOXYGEN__ +#define SNMP_SAFE_REQUESTS 1 +#endif + +/** + * The maximum length of strings used. + */ +#if !defined SNMP_MAX_OCTET_STRING_LEN || defined __DOXYGEN__ +#define SNMP_MAX_OCTET_STRING_LEN 127 +#endif + +/** + * The maximum number of Sub ID's inside an object identifier. + * Indirectly this also limits the maximum depth of SNMP tree. + */ +#if !defined SNMP_MAX_OBJ_ID_LEN || defined __DOXYGEN__ +#define SNMP_MAX_OBJ_ID_LEN 50 +#endif + +#if !defined SNMP_MAX_VALUE_SIZE || defined __DOXYGEN__ +/** + * The maximum size of a value. + */ +#define SNMP_MIN_VALUE_SIZE (2 * sizeof(u32_t*)) /* size required to store the basic types (8 bytes for counter64) */ +/** + * The minimum size of a value. + */ +#define SNMP_MAX_VALUE_SIZE LWIP_MAX(LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN), sizeof(u32_t)*(SNMP_MAX_OBJ_ID_LEN)), SNMP_MIN_VALUE_SIZE) +#endif + +/** + * The snmp read-access community. Used for write-access and traps, too + * unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively. + */ +#if !defined SNMP_COMMUNITY || defined __DOXYGEN__ +#define SNMP_COMMUNITY "public" +#endif + +/** + * The snmp write-access community. + * Set this community to "" in order to disallow any write access. + */ +#if !defined SNMP_COMMUNITY_WRITE || defined __DOXYGEN__ +#define SNMP_COMMUNITY_WRITE "private" +#endif + +/** + * The snmp community used for sending traps. + */ +#if !defined SNMP_COMMUNITY_TRAP || defined __DOXYGEN__ +#define SNMP_COMMUNITY_TRAP "public" +#endif + +/** + * The maximum length of community string. + * If community names shall be adjusted at runtime via snmp_set_community() calls, + * enter here the possible maximum length (+1 for terminating null character). + */ +#if !defined SNMP_MAX_COMMUNITY_STR_LEN || defined __DOXYGEN__ +#define SNMP_MAX_COMMUNITY_STR_LEN LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP)) +#endif + +/** + * The OID identifiying the device. This may be the enterprise OID itself or any OID located below it in tree. + */ +#if !defined SNMP_DEVICE_ENTERPRISE_OID || defined __DOXYGEN__ +#define SNMP_LWIP_ENTERPRISE_OID 26381 +/** + * IANA assigned enterprise ID for lwIP is 26381 + * @see http://www.iana.org/assignments/enterprise-numbers + * + * @note this enterprise ID is assigned to the lwIP project, + * all object identifiers living under this ID are assigned + * by the lwIP maintainers! + * @note don't change this define, use snmp_set_device_enterprise_oid() + * + * If you need to create your own private MIB you'll need + * to apply for your own enterprise ID with IANA: + * http://www.iana.org/numbers.html + */ +#define SNMP_DEVICE_ENTERPRISE_OID {1, 3, 6, 1, 4, 1, SNMP_LWIP_ENTERPRISE_OID} +/** + * Length of SNMP_DEVICE_ENTERPRISE_OID + */ +#define SNMP_DEVICE_ENTERPRISE_OID_LEN 7 +#endif + +/** + * SNMP_DEBUG: Enable debugging for SNMP messages. + */ +#if !defined SNMP_DEBUG || defined __DOXYGEN__ +#define SNMP_DEBUG LWIP_DBG_OFF +#endif + +/** + * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. + */ +#if !defined SNMP_MIB_DEBUG || defined __DOXYGEN__ +#define SNMP_MIB_DEBUG LWIP_DBG_OFF +#endif + +/** + * Indicates if the MIB2 implementation of LWIP SNMP stack is used. + */ +#if !defined SNMP_LWIP_MIB2 || defined __DOXYGEN__ +#define SNMP_LWIP_MIB2 LWIP_SNMP +#endif + +/** + * Value return for sysDesc field of MIB2. + */ +#if !defined SNMP_LWIP_MIB2_SYSDESC || defined __DOXYGEN__ +#define SNMP_LWIP_MIB2_SYSDESC "lwIP" +#endif + +/** + * Value return for sysName field of MIB2. + * To make sysName field settable, call snmp_mib2_set_sysname() to provide the necessary buffers. + */ +#if !defined SNMP_LWIP_MIB2_SYSNAME || defined __DOXYGEN__ +#define SNMP_LWIP_MIB2_SYSNAME "FQDN-unk" +#endif + +/** + * Value return for sysContact field of MIB2. + * To make sysContact field settable, call snmp_mib2_set_syscontact() to provide the necessary buffers. + */ +#if !defined SNMP_LWIP_MIB2_SYSCONTACT || defined __DOXYGEN__ +#define SNMP_LWIP_MIB2_SYSCONTACT "" +#endif + +/** + * Value return for sysLocation field of MIB2. + * To make sysLocation field settable, call snmp_mib2_set_syslocation() to provide the necessary buffers. + */ +#if !defined SNMP_LWIP_MIB2_SYSLOCATION || defined __DOXYGEN__ +#define SNMP_LWIP_MIB2_SYSLOCATION "" +#endif + +/** + * This value is used to limit the repetitions processed in GetBulk requests (value == 0 means no limitation). + * This may be useful to limit the load for a single request. + * According to SNMP RFC 1905 it is allowed to not return all requested variables from a GetBulk request if system load would be too high. + * so the effect is that the client will do more requests to gather all data. + * For the stack this could be useful in case that SNMP processing is done in TCP/IP thread. In this situation a request with many + * repetitions could block the thread for a longer time. Setting limit here will keep the stack more responsive. + */ +#if !defined SNMP_LWIP_GETBULK_MAX_REPETITIONS || defined __DOXYGEN__ +#define SNMP_LWIP_GETBULK_MAX_REPETITIONS 0 +#endif + +/** + * @} + */ + +/* + ------------------------------------ + ---------- SNMPv3 options ---------- + ------------------------------------ +*/ + +/** + * LWIP_SNMP_V3==1: This enables EXPERIMENTAL SNMPv3 support. LWIP_SNMP must + * also be enabled. + * THIS IS UNDER DEVELOPMENT AND SHOULD NOT BE ENABLED IN PRODUCTS. + */ +#ifndef LWIP_SNMP_V3 +#define LWIP_SNMP_V3 0 +#endif + +#ifndef LWIP_SNMP_V3_CRYPTO +#define LWIP_SNMP_V3_CRYPTO LWIP_SNMP_V3 +#endif + +#ifndef LWIP_SNMP_V3_MBEDTLS +#define LWIP_SNMP_V3_MBEDTLS LWIP_SNMP_V3 +#endif + +#endif /* LWIP_HDR_SNMP_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_scalar.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_scalar.h index 40a060c..99bcdf9 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_scalar.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_scalar.h @@ -1,113 +1,113 @@ -/** - * @file - * SNMP server MIB API to implement scalar nodes - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -#ifndef LWIP_HDR_APPS_SNMP_SCALAR_H -#define LWIP_HDR_APPS_SNMP_SCALAR_H - -#include "lwip/apps/snmp_opts.h" -#include "lwip/apps/snmp_core.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ - -/** basic scalar node */ -struct snmp_scalar_node -{ - /** inherited "base class" members */ - struct snmp_leaf_node node; - u8_t asn1_type; - snmp_access_t access; - node_instance_get_value_method get_value; - node_instance_set_test_method set_test; - node_instance_set_value_method set_value; -}; - - -snmp_err_t snmp_scalar_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); -snmp_err_t snmp_scalar_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); - -#define SNMP_SCALAR_CREATE_NODE(oid, access, asn1_type, get_value_method, set_test_method, set_value_method) \ - {{{ SNMP_NODE_SCALAR, (oid) }, \ - snmp_scalar_get_instance, \ - snmp_scalar_get_next_instance }, \ - (asn1_type), (access), (get_value_method), (set_test_method), (set_value_method) } - -#define SNMP_SCALAR_CREATE_NODE_READONLY(oid, asn1_type, get_value_method) SNMP_SCALAR_CREATE_NODE(oid, SNMP_NODE_INSTANCE_READ_ONLY, asn1_type, get_value_method, NULL, NULL) - -/** scalar array node - a tree node which contains scalars only as children */ -struct snmp_scalar_array_node_def -{ - u32_t oid; - u8_t asn1_type; - snmp_access_t access; -}; - -typedef s16_t (*snmp_scalar_array_get_value_method)(const struct snmp_scalar_array_node_def*, void*); -typedef snmp_err_t (*snmp_scalar_array_set_test_method)(const struct snmp_scalar_array_node_def*, u16_t, void*); -typedef snmp_err_t (*snmp_scalar_array_set_value_method)(const struct snmp_scalar_array_node_def*, u16_t, void*); - -/** basic scalar array node */ -struct snmp_scalar_array_node -{ - /** inherited "base class" members */ - struct snmp_leaf_node node; - u16_t array_node_count; - const struct snmp_scalar_array_node_def* array_nodes; - snmp_scalar_array_get_value_method get_value; - snmp_scalar_array_set_test_method set_test; - snmp_scalar_array_set_value_method set_value; -}; - -snmp_err_t snmp_scalar_array_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); -snmp_err_t snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); - -#define SNMP_SCALAR_CREATE_ARRAY_NODE(oid, array_nodes, get_value_method, set_test_method, set_value_method) \ - {{{ SNMP_NODE_SCALAR_ARRAY, (oid) }, \ - snmp_scalar_array_get_instance, \ - snmp_scalar_array_get_next_instance }, \ - (u16_t)LWIP_ARRAYSIZE(array_nodes), (array_nodes), (get_value_method), (set_test_method), (set_value_method) } - -#endif /* LWIP_SNMP */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_SNMP_SCALAR_H */ +/** + * @file + * SNMP server MIB API to implement scalar nodes + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Martin Hentschel + * + */ + +#ifndef LWIP_HDR_APPS_SNMP_SCALAR_H +#define LWIP_HDR_APPS_SNMP_SCALAR_H + +#include "lwip/apps/snmp_opts.h" +#include "lwip/apps/snmp_core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ + +/** basic scalar node */ +struct snmp_scalar_node +{ + /** inherited "base class" members */ + struct snmp_leaf_node node; + u8_t asn1_type; + snmp_access_t access; + node_instance_get_value_method get_value; + node_instance_set_test_method set_test; + node_instance_set_value_method set_value; +}; + + +snmp_err_t snmp_scalar_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); +snmp_err_t snmp_scalar_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); + +#define SNMP_SCALAR_CREATE_NODE(oid, access, asn1_type, get_value_method, set_test_method, set_value_method) \ + {{{ SNMP_NODE_SCALAR, (oid) }, \ + snmp_scalar_get_instance, \ + snmp_scalar_get_next_instance }, \ + (asn1_type), (access), (get_value_method), (set_test_method), (set_value_method) } + +#define SNMP_SCALAR_CREATE_NODE_READONLY(oid, asn1_type, get_value_method) SNMP_SCALAR_CREATE_NODE(oid, SNMP_NODE_INSTANCE_READ_ONLY, asn1_type, get_value_method, NULL, NULL) + +/** scalar array node - a tree node which contains scalars only as children */ +struct snmp_scalar_array_node_def +{ + u32_t oid; + u8_t asn1_type; + snmp_access_t access; +}; + +typedef s16_t (*snmp_scalar_array_get_value_method)(const struct snmp_scalar_array_node_def*, void*); +typedef snmp_err_t (*snmp_scalar_array_set_test_method)(const struct snmp_scalar_array_node_def*, u16_t, void*); +typedef snmp_err_t (*snmp_scalar_array_set_value_method)(const struct snmp_scalar_array_node_def*, u16_t, void*); + +/** basic scalar array node */ +struct snmp_scalar_array_node +{ + /** inherited "base class" members */ + struct snmp_leaf_node node; + u16_t array_node_count; + const struct snmp_scalar_array_node_def* array_nodes; + snmp_scalar_array_get_value_method get_value; + snmp_scalar_array_set_test_method set_test; + snmp_scalar_array_set_value_method set_value; +}; + +snmp_err_t snmp_scalar_array_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); +snmp_err_t snmp_scalar_array_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); + +#define SNMP_SCALAR_CREATE_ARRAY_NODE(oid, array_nodes, get_value_method, set_test_method, set_value_method) \ + {{{ SNMP_NODE_SCALAR_ARRAY, (oid) }, \ + snmp_scalar_array_get_instance, \ + snmp_scalar_array_get_next_instance }, \ + (u16_t)LWIP_ARRAYSIZE(array_nodes), (array_nodes), (get_value_method), (set_test_method), (set_value_method) } + +#endif /* LWIP_SNMP */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_SNMP_SCALAR_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_table.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_table.h index 4988b51..6930d0b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_table.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_table.h @@ -1,134 +1,134 @@ -/** - * @file - * SNMP server MIB API to implement table nodes - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -#ifndef LWIP_HDR_APPS_SNMP_TABLE_H -#define LWIP_HDR_APPS_SNMP_TABLE_H - -#include "lwip/apps/snmp_opts.h" -#include "lwip/apps/snmp_core.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ - -/** default (customizable) read/write table */ -struct snmp_table_col_def -{ - u32_t index; - u8_t asn1_type; - snmp_access_t access; -}; - -/** table node */ -struct snmp_table_node -{ - /** inherited "base class" members */ - struct snmp_leaf_node node; - u16_t column_count; - const struct snmp_table_col_def* columns; - snmp_err_t (*get_cell_instance)(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, struct snmp_node_instance* cell_instance); - snmp_err_t (*get_next_cell_instance)(const u32_t* column, struct snmp_obj_id* row_oid, struct snmp_node_instance* cell_instance); - /** returns object value for the given object identifier */ - node_instance_get_value_method get_value; - /** tests length and/or range BEFORE setting */ - node_instance_set_test_method set_test; - /** sets object value, only called when set_test() was successful */ - node_instance_set_value_method set_value; -}; - -snmp_err_t snmp_table_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); -snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); - -#define SNMP_TABLE_CREATE(oid, columns, get_cell_instance_method, get_next_cell_instance_method, get_value_method, set_test_method, set_value_method) \ - {{{ SNMP_NODE_TABLE, (oid) }, \ - snmp_table_get_instance, \ - snmp_table_get_next_instance }, \ - (u16_t)LWIP_ARRAYSIZE(columns), (columns), \ - (get_cell_instance_method), (get_next_cell_instance_method), \ - (get_value_method), (set_test_method), (set_value_method)} - -#define SNMP_TABLE_GET_COLUMN_FROM_OID(oid) ((oid)[1]) /* first array value is (fixed) row entry (fixed to 1) and 2nd value is column, follow3ed by instance */ - - -/** simple read-only table */ -typedef enum { - SNMP_VARIANT_VALUE_TYPE_U32, - SNMP_VARIANT_VALUE_TYPE_S32, - SNMP_VARIANT_VALUE_TYPE_PTR, - SNMP_VARIANT_VALUE_TYPE_CONST_PTR -} snmp_table_column_data_type_t; - -struct snmp_table_simple_col_def -{ - u32_t index; - u8_t asn1_type; - snmp_table_column_data_type_t data_type; /* depending of what union member is used to store the value*/ -}; - -/** simple read-only table node */ -struct snmp_table_simple_node -{ - /* inherited "base class" members */ - struct snmp_leaf_node node; - u16_t column_count; - const struct snmp_table_simple_col_def* columns; - snmp_err_t (*get_cell_value)(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len); - snmp_err_t (*get_next_cell_instance_and_value)(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len); -}; - -snmp_err_t snmp_table_simple_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); -snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); - -#define SNMP_TABLE_CREATE_SIMPLE(oid, columns, get_cell_value_method, get_next_cell_instance_and_value_method) \ - {{{ SNMP_NODE_TABLE, (oid) }, \ - snmp_table_simple_get_instance, \ - snmp_table_simple_get_next_instance }, \ - (u16_t)LWIP_ARRAYSIZE(columns), (columns), (get_cell_value_method), (get_next_cell_instance_and_value_method) } - -s16_t snmp_table_extract_value_from_s32ref(struct snmp_node_instance* instance, void* value); -s16_t snmp_table_extract_value_from_u32ref(struct snmp_node_instance* instance, void* value); -s16_t snmp_table_extract_value_from_refconstptr(struct snmp_node_instance* instance, void* value); - -#endif /* LWIP_SNMP */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_SNMP_TABLE_H */ +/** + * @file + * SNMP server MIB API to implement table nodes + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Martin Hentschel + * + */ + +#ifndef LWIP_HDR_APPS_SNMP_TABLE_H +#define LWIP_HDR_APPS_SNMP_TABLE_H + +#include "lwip/apps/snmp_opts.h" +#include "lwip/apps/snmp_core.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ + +/** default (customizable) read/write table */ +struct snmp_table_col_def +{ + u32_t index; + u8_t asn1_type; + snmp_access_t access; +}; + +/** table node */ +struct snmp_table_node +{ + /** inherited "base class" members */ + struct snmp_leaf_node node; + u16_t column_count; + const struct snmp_table_col_def* columns; + snmp_err_t (*get_cell_instance)(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, struct snmp_node_instance* cell_instance); + snmp_err_t (*get_next_cell_instance)(const u32_t* column, struct snmp_obj_id* row_oid, struct snmp_node_instance* cell_instance); + /** returns object value for the given object identifier */ + node_instance_get_value_method get_value; + /** tests length and/or range BEFORE setting */ + node_instance_set_test_method set_test; + /** sets object value, only called when set_test() was successful */ + node_instance_set_value_method set_value; +}; + +snmp_err_t snmp_table_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); +snmp_err_t snmp_table_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); + +#define SNMP_TABLE_CREATE(oid, columns, get_cell_instance_method, get_next_cell_instance_method, get_value_method, set_test_method, set_value_method) \ + {{{ SNMP_NODE_TABLE, (oid) }, \ + snmp_table_get_instance, \ + snmp_table_get_next_instance }, \ + (u16_t)LWIP_ARRAYSIZE(columns), (columns), \ + (get_cell_instance_method), (get_next_cell_instance_method), \ + (get_value_method), (set_test_method), (set_value_method)} + +#define SNMP_TABLE_GET_COLUMN_FROM_OID(oid) ((oid)[1]) /* first array value is (fixed) row entry (fixed to 1) and 2nd value is column, follow3ed by instance */ + + +/** simple read-only table */ +typedef enum { + SNMP_VARIANT_VALUE_TYPE_U32, + SNMP_VARIANT_VALUE_TYPE_S32, + SNMP_VARIANT_VALUE_TYPE_PTR, + SNMP_VARIANT_VALUE_TYPE_CONST_PTR +} snmp_table_column_data_type_t; + +struct snmp_table_simple_col_def +{ + u32_t index; + u8_t asn1_type; + snmp_table_column_data_type_t data_type; /* depending of what union member is used to store the value*/ +}; + +/** simple read-only table node */ +struct snmp_table_simple_node +{ + /* inherited "base class" members */ + struct snmp_leaf_node node; + u16_t column_count; + const struct snmp_table_simple_col_def* columns; + snmp_err_t (*get_cell_value)(const u32_t* column, const u32_t* row_oid, u8_t row_oid_len, union snmp_variant_value* value, u32_t* value_len); + snmp_err_t (*get_next_cell_instance_and_value)(const u32_t* column, struct snmp_obj_id* row_oid, union snmp_variant_value* value, u32_t* value_len); +}; + +snmp_err_t snmp_table_simple_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); +snmp_err_t snmp_table_simple_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); + +#define SNMP_TABLE_CREATE_SIMPLE(oid, columns, get_cell_value_method, get_next_cell_instance_and_value_method) \ + {{{ SNMP_NODE_TABLE, (oid) }, \ + snmp_table_simple_get_instance, \ + snmp_table_simple_get_next_instance }, \ + (u16_t)LWIP_ARRAYSIZE(columns), (columns), (get_cell_value_method), (get_next_cell_instance_and_value_method) } + +s16_t snmp_table_extract_value_from_s32ref(struct snmp_node_instance* instance, void* value); +s16_t snmp_table_extract_value_from_u32ref(struct snmp_node_instance* instance, void* value); +s16_t snmp_table_extract_value_from_refconstptr(struct snmp_node_instance* instance, void* value); + +#endif /* LWIP_SNMP */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_SNMP_TABLE_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_threadsync.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_threadsync.h index a25dbf2..5eb3538 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_threadsync.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmp_threadsync.h @@ -1,114 +1,114 @@ -/** - * @file - * SNMP server MIB API to implement thread synchronization - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Dirk Ziegelmeier - * - */ - -#ifndef LWIP_HDR_APPS_SNMP_THREADSYNC_H -#define LWIP_HDR_APPS_SNMP_THREADSYNC_H - -#include "lwip/apps/snmp_opts.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/apps/snmp_core.h" -#include "lwip/sys.h" - -typedef void (*snmp_threadsync_called_fn)(void* arg); -typedef void (*snmp_threadsync_synchronizer_fn)(snmp_threadsync_called_fn fn, void* arg); - - -/** Thread sync runtime data. For internal usage only. */ -struct threadsync_data -{ - union { - snmp_err_t err; - s16_t s16; - } retval; - union { - const u32_t *root_oid; - void *value; - } arg1; - union { - u8_t root_oid_len; - u16_t len; - } arg2; - const struct snmp_threadsync_node *threadsync_node; - struct snmp_node_instance proxy_instance; -}; - -/** Thread sync instance. Needed EXCATLY once for every thread to be synced into. */ -struct snmp_threadsync_instance -{ - sys_sem_t sem; - sys_mutex_t sem_usage_mutex; - snmp_threadsync_synchronizer_fn sync_fn; - struct threadsync_data data; -}; - -/** SNMP thread sync proxy leaf node */ -struct snmp_threadsync_node -{ - /* inherited "base class" members */ - struct snmp_leaf_node node; - - const struct snmp_leaf_node *target; - struct snmp_threadsync_instance *instance; -}; - -snmp_err_t snmp_threadsync_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); -snmp_err_t snmp_threadsync_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); - -/** Create thread sync proxy node */ -#define SNMP_CREATE_THREAD_SYNC_NODE(oid, target_leaf_node, threadsync_instance) \ - {{{ SNMP_NODE_THREADSYNC, (oid) }, \ - snmp_threadsync_get_instance, \ - snmp_threadsync_get_next_instance }, \ - (target_leaf_node), \ - (threadsync_instance) } - -/** Create thread sync instance data */ -void snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn); - -#endif /* LWIP_SNMP */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_SNMP_THREADSYNC_H */ +/** + * @file + * SNMP server MIB API to implement thread synchronization + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Dirk Ziegelmeier + * + */ + +#ifndef LWIP_HDR_APPS_SNMP_THREADSYNC_H +#define LWIP_HDR_APPS_SNMP_THREADSYNC_H + +#include "lwip/apps/snmp_opts.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/apps/snmp_core.h" +#include "lwip/sys.h" + +typedef void (*snmp_threadsync_called_fn)(void* arg); +typedef void (*snmp_threadsync_synchronizer_fn)(snmp_threadsync_called_fn fn, void* arg); + + +/** Thread sync runtime data. For internal usage only. */ +struct threadsync_data +{ + union { + snmp_err_t err; + s16_t s16; + } retval; + union { + const u32_t *root_oid; + void *value; + } arg1; + union { + u8_t root_oid_len; + u16_t len; + } arg2; + const struct snmp_threadsync_node *threadsync_node; + struct snmp_node_instance proxy_instance; +}; + +/** Thread sync instance. Needed EXCATLY once for every thread to be synced into. */ +struct snmp_threadsync_instance +{ + sys_sem_t sem; + sys_mutex_t sem_usage_mutex; + snmp_threadsync_synchronizer_fn sync_fn; + struct threadsync_data data; +}; + +/** SNMP thread sync proxy leaf node */ +struct snmp_threadsync_node +{ + /* inherited "base class" members */ + struct snmp_leaf_node node; + + const struct snmp_leaf_node *target; + struct snmp_threadsync_instance *instance; +}; + +snmp_err_t snmp_threadsync_get_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); +snmp_err_t snmp_threadsync_get_next_instance(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* instance); + +/** Create thread sync proxy node */ +#define SNMP_CREATE_THREAD_SYNC_NODE(oid, target_leaf_node, threadsync_instance) \ + {{{ SNMP_NODE_THREADSYNC, (oid) }, \ + snmp_threadsync_get_instance, \ + snmp_threadsync_get_next_instance }, \ + (target_leaf_node), \ + (threadsync_instance) } + +/** Create thread sync instance data */ +void snmp_threadsync_init(struct snmp_threadsync_instance *instance, snmp_threadsync_synchronizer_fn sync_fn); + +#endif /* LWIP_SNMP */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_SNMP_THREADSYNC_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmpv3.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmpv3.h index c99fed4..99a7fd2 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmpv3.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/snmpv3.h @@ -1,90 +1,90 @@ -/** - * @file - * Additional SNMPv3 functionality RFC3414 and RFC3826. - */ - -/* - * Copyright (c) 2016 Elias Oenal. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * Author: Elias Oenal - */ - -#ifndef LWIP_HDR_APPS_SNMP_V3_H -#define LWIP_HDR_APPS_SNMP_V3_H - -#include "lwip/apps/snmp_opts.h" -#include "lwip/err.h" - -#if LWIP_SNMP && LWIP_SNMP_V3 - -#define SNMP_V3_AUTH_ALGO_INVAL 0 -#define SNMP_V3_AUTH_ALGO_MD5 1 -#define SNMP_V3_AUTH_ALGO_SHA 2 - -#define SNMP_V3_PRIV_ALGO_INVAL 0 -#define SNMP_V3_PRIV_ALGO_DES 1 -#define SNMP_V3_PRIV_ALGO_AES 2 - -#define SNMP_V3_PRIV_MODE_DECRYPT 0 -#define SNMP_V3_PRIV_MODE_ENCRYPT 1 - -/* - * The following callback functions must be implemented by the application. - * There is a dummy implementation in snmpv3_dummy.c. - */ - -void snmpv3_get_engine_id(const char **id, u8_t *len); -err_t snmpv3_set_engine_id(const char* id, u8_t len); - -u32_t snmpv3_get_engine_boots(void); -void snmpv3_set_engine_boots(u32_t boots); - -u32_t snmpv3_get_engine_time(void); -void snmpv3_reset_engine_time(void); - -err_t snmpv3_get_user(const char* username, u8_t *auth_algo, u8_t *auth_key, u8_t *priv_algo, u8_t *priv_key); - -/* The following functions are provided by the SNMPv3 agent */ - -void snmpv3_engine_id_changed(void); - -void snmpv3_password_to_key_md5( - const u8_t *password, /* IN */ - u8_t passwordlen, /* IN */ - const u8_t *engineID, /* IN - pointer to snmpEngineID */ - u8_t engineLength, /* IN - length of snmpEngineID */ - u8_t *key); /* OUT - pointer to caller 16-octet buffer */ - -void snmpv3_password_to_key_sha( - const u8_t *password, /* IN */ - u8_t passwordlen, /* IN */ - const u8_t *engineID, /* IN - pointer to snmpEngineID */ - u8_t engineLength, /* IN - length of snmpEngineID */ - u8_t *key); /* OUT - pointer to caller 20-octet buffer */ - -#endif - -#endif /* LWIP_HDR_APPS_SNMP_V3_H */ +/** + * @file + * Additional SNMPv3 functionality RFC3414 and RFC3826. + */ + +/* + * Copyright (c) 2016 Elias Oenal. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * Author: Elias Oenal + */ + +#ifndef LWIP_HDR_APPS_SNMP_V3_H +#define LWIP_HDR_APPS_SNMP_V3_H + +#include "lwip/apps/snmp_opts.h" +#include "lwip/err.h" + +#if LWIP_SNMP && LWIP_SNMP_V3 + +#define SNMP_V3_AUTH_ALGO_INVAL 0 +#define SNMP_V3_AUTH_ALGO_MD5 1 +#define SNMP_V3_AUTH_ALGO_SHA 2 + +#define SNMP_V3_PRIV_ALGO_INVAL 0 +#define SNMP_V3_PRIV_ALGO_DES 1 +#define SNMP_V3_PRIV_ALGO_AES 2 + +#define SNMP_V3_PRIV_MODE_DECRYPT 0 +#define SNMP_V3_PRIV_MODE_ENCRYPT 1 + +/* + * The following callback functions must be implemented by the application. + * There is a dummy implementation in snmpv3_dummy.c. + */ + +void snmpv3_get_engine_id(const char **id, u8_t *len); +err_t snmpv3_set_engine_id(const char* id, u8_t len); + +u32_t snmpv3_get_engine_boots(void); +void snmpv3_set_engine_boots(u32_t boots); + +u32_t snmpv3_get_engine_time(void); +void snmpv3_reset_engine_time(void); + +err_t snmpv3_get_user(const char* username, u8_t *auth_algo, u8_t *auth_key, u8_t *priv_algo, u8_t *priv_key); + +/* The following functions are provided by the SNMPv3 agent */ + +void snmpv3_engine_id_changed(void); + +void snmpv3_password_to_key_md5( + const u8_t *password, /* IN */ + u8_t passwordlen, /* IN */ + const u8_t *engineID, /* IN - pointer to snmpEngineID */ + u8_t engineLength, /* IN - length of snmpEngineID */ + u8_t *key); /* OUT - pointer to caller 16-octet buffer */ + +void snmpv3_password_to_key_sha( + const u8_t *password, /* IN */ + u8_t passwordlen, /* IN */ + const u8_t *engineID, /* IN - pointer to snmpEngineID */ + u8_t engineLength, /* IN - length of snmpEngineID */ + u8_t *key); /* OUT - pointer to caller 20-octet buffer */ + +#endif + +#endif /* LWIP_HDR_APPS_SNMP_V3_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp.h index 40df9cc..3910917 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp.h @@ -1,76 +1,76 @@ -/** - * @file - * SNTP client API - */ - -/* - * Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Frédéric Bernon, Simon Goldschmidt - * - */ -#ifndef LWIP_HDR_APPS_SNTP_H -#define LWIP_HDR_APPS_SNTP_H - -#include "lwip/apps/sntp_opts.h" -#include "lwip/ip_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* SNTP operating modes: default is to poll using unicast. - The mode has to be set before calling sntp_init(). */ -#define SNTP_OPMODE_POLL 0 -#define SNTP_OPMODE_LISTENONLY 1 -void sntp_setoperatingmode(u8_t operating_mode); -u8_t sntp_getoperatingmode(void); - -void sntp_init(void); -void sntp_stop(void); -u8_t sntp_enabled(void); - -void sntp_setserver(u8_t idx, const ip_addr_t *addr); -const ip_addr_t* sntp_getserver(u8_t idx); - -#if SNTP_SERVER_DNS -void sntp_setservername(u8_t idx, char *server); -char *sntp_getservername(u8_t idx); -#endif /* SNTP_SERVER_DNS */ - -#if SNTP_GET_SERVERS_FROM_DHCP -void sntp_servermode_dhcp(int set_servers_from_dhcp); -#else /* SNTP_GET_SERVERS_FROM_DHCP */ -#define sntp_servermode_dhcp(x) -#endif /* SNTP_GET_SERVERS_FROM_DHCP */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_SNTP_H */ +/** + * @file + * SNTP client API + */ + +/* + * Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Frédéric Bernon, Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_APPS_SNTP_H +#define LWIP_HDR_APPS_SNTP_H + +#include "lwip/apps/sntp_opts.h" +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* SNTP operating modes: default is to poll using unicast. + The mode has to be set before calling sntp_init(). */ +#define SNTP_OPMODE_POLL 0 +#define SNTP_OPMODE_LISTENONLY 1 +void sntp_setoperatingmode(u8_t operating_mode); +u8_t sntp_getoperatingmode(void); + +void sntp_init(void); +void sntp_stop(void); +u8_t sntp_enabled(void); + +void sntp_setserver(u8_t idx, const ip_addr_t *addr); +const ip_addr_t* sntp_getserver(u8_t idx); + +#if SNTP_SERVER_DNS +void sntp_setservername(u8_t idx, char *server); +char *sntp_getservername(u8_t idx); +#endif /* SNTP_SERVER_DNS */ + +#if SNTP_GET_SERVERS_FROM_DHCP +void sntp_servermode_dhcp(int set_servers_from_dhcp); +#else /* SNTP_GET_SERVERS_FROM_DHCP */ +#define sntp_servermode_dhcp(x) +#endif /* SNTP_GET_SERVERS_FROM_DHCP */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_SNTP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp_opts.h index f3651f9..c28b864 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/sntp_opts.h @@ -1,173 +1,173 @@ -/** - * @file - * SNTP client options list - */ - -/* - * Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Frédéric Bernon, Simon Goldschmidt - * - */ -#ifndef LWIP_HDR_APPS_SNTP_OPTS_H -#define LWIP_HDR_APPS_SNTP_OPTS_H - -#include "lwip/opt.h" - -/** - * @defgroup sntp_opts Options - * @ingroup sntp - * @{ - */ - -/** SNTP macro to change system time in seconds - * Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one - * if you need the additional precision. - */ -#if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__ -#define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec) -#endif - -/** The maximum number of SNTP servers that can be set */ -#if !defined SNTP_MAX_SERVERS || defined __DOXYGEN__ -#define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS -#endif - -/** Set this to 1 to implement the callback function called by dhcp when - * NTP servers are received. */ -#if !defined SNTP_GET_SERVERS_FROM_DHCP || defined __DOXYGEN__ -#define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV -#endif - -/** Set this to 1 to support DNS names (or IP address strings) to set sntp servers - * One server address/name can be defined as default if SNTP_SERVER_DNS == 1: - * \#define SNTP_SERVER_ADDRESS "pool.ntp.org" - */ -#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ -#define SNTP_SERVER_DNS 0 -#endif - -/** - * SNTP_DEBUG: Enable debugging for SNTP. - */ -#if !defined SNTP_DEBUG || defined __DOXYGEN__ -#define SNTP_DEBUG LWIP_DBG_OFF -#endif - -/** SNTP server port */ -#if !defined SNTP_PORT || defined __DOXYGEN__ -#define SNTP_PORT 123 -#endif - -/** Set this to 1 to allow config of SNTP server(s) by DNS name */ -#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ -#define SNTP_SERVER_DNS 0 -#endif - -/** Sanity check: - * Define this to - * - 0 to turn off sanity checks (default; smaller code) - * - >= 1 to check address and port of the response packet to ensure the - * response comes from the server we sent the request to. - * - >= 2 to check returned Originate Timestamp against Transmit Timestamp - * sent to the server (to ensure response to older request). - * - >= 3 @todo: discard reply if any of the LI, Stratum, or Transmit Timestamp - * fields is 0 or the Mode field is not 4 (unicast) or 5 (broadcast). - * - >= 4 @todo: to check that the Root Delay and Root Dispersion fields are each - * greater than or equal to 0 and less than infinity, where infinity is - * currently a cozy number like one second. This check avoids using a - * server whose synchronization source has expired for a very long time. - */ -#if !defined SNTP_CHECK_RESPONSE || defined __DOXYGEN__ -#define SNTP_CHECK_RESPONSE 0 -#endif - -/** According to the RFC, this shall be a random delay - * between 1 and 5 minutes (in milliseconds) to prevent load peaks. - * This can be defined to a random generation function, - * which must return the delay in milliseconds as u32_t. - * Turned off by default. - */ -#if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__ -#define SNTP_STARTUP_DELAY 0 -#endif - -/** If you want the startup delay to be a function, define this - * to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1. - */ -#if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__ -#define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY -#endif - -/** SNTP receive timeout - in milliseconds - * Also used as retry timeout - this shouldn't be too low. - * Default is 3 seconds. - */ -#if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__ -#define SNTP_RECV_TIMEOUT 3000 -#endif - -/** SNTP update delay - in milliseconds - * Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000) - */ -#if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__ -#define SNTP_UPDATE_DELAY 3600000 -#endif - -/** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2 - * to send in request and compare in response. - */ -#if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__ -#define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0) -#endif - -/** Default retry timeout (in milliseconds) if the response - * received is invalid. - * This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached. - */ -#if !defined SNTP_RETRY_TIMEOUT || defined __DOXYGEN__ -#define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT -#endif - -/** Maximum retry timeout (in milliseconds). */ -#if !defined SNTP_RETRY_TIMEOUT_MAX || defined __DOXYGEN__ -#define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10) -#endif - -/** Increase retry timeout with every retry sent - * Default is on to conform to RFC. - */ -#if !defined SNTP_RETRY_TIMEOUT_EXP || defined __DOXYGEN__ -#define SNTP_RETRY_TIMEOUT_EXP 1 -#endif - -/** - * @} - */ - -#endif /* LWIP_HDR_APPS_SNTP_OPTS_H */ +/** + * @file + * SNTP client options list + */ + +/* + * Copyright (c) 2007-2009 Frédéric Bernon, Simon Goldschmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Frédéric Bernon, Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_APPS_SNTP_OPTS_H +#define LWIP_HDR_APPS_SNTP_OPTS_H + +#include "lwip/opt.h" + +/** + * @defgroup sntp_opts Options + * @ingroup sntp + * @{ + */ + +/** SNTP macro to change system time in seconds + * Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one + * if you need the additional precision. + */ +#if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__ +#define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec) +#endif + +/** The maximum number of SNTP servers that can be set */ +#if !defined SNTP_MAX_SERVERS || defined __DOXYGEN__ +#define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS +#endif + +/** Set this to 1 to implement the callback function called by dhcp when + * NTP servers are received. */ +#if !defined SNTP_GET_SERVERS_FROM_DHCP || defined __DOXYGEN__ +#define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV +#endif + +/** Set this to 1 to support DNS names (or IP address strings) to set sntp servers + * One server address/name can be defined as default if SNTP_SERVER_DNS == 1: + * \#define SNTP_SERVER_ADDRESS "pool.ntp.org" + */ +#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ +#define SNTP_SERVER_DNS 0 +#endif + +/** + * SNTP_DEBUG: Enable debugging for SNTP. + */ +#if !defined SNTP_DEBUG || defined __DOXYGEN__ +#define SNTP_DEBUG LWIP_DBG_OFF +#endif + +/** SNTP server port */ +#if !defined SNTP_PORT || defined __DOXYGEN__ +#define SNTP_PORT 123 +#endif + +/** Set this to 1 to allow config of SNTP server(s) by DNS name */ +#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ +#define SNTP_SERVER_DNS 0 +#endif + +/** Sanity check: + * Define this to + * - 0 to turn off sanity checks (default; smaller code) + * - >= 1 to check address and port of the response packet to ensure the + * response comes from the server we sent the request to. + * - >= 2 to check returned Originate Timestamp against Transmit Timestamp + * sent to the server (to ensure response to older request). + * - >= 3 @todo: discard reply if any of the LI, Stratum, or Transmit Timestamp + * fields is 0 or the Mode field is not 4 (unicast) or 5 (broadcast). + * - >= 4 @todo: to check that the Root Delay and Root Dispersion fields are each + * greater than or equal to 0 and less than infinity, where infinity is + * currently a cozy number like one second. This check avoids using a + * server whose synchronization source has expired for a very long time. + */ +#if !defined SNTP_CHECK_RESPONSE || defined __DOXYGEN__ +#define SNTP_CHECK_RESPONSE 0 +#endif + +/** According to the RFC, this shall be a random delay + * between 1 and 5 minutes (in milliseconds) to prevent load peaks. + * This can be defined to a random generation function, + * which must return the delay in milliseconds as u32_t. + * Turned off by default. + */ +#if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__ +#define SNTP_STARTUP_DELAY 0 +#endif + +/** If you want the startup delay to be a function, define this + * to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1. + */ +#if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__ +#define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY +#endif + +/** SNTP receive timeout - in milliseconds + * Also used as retry timeout - this shouldn't be too low. + * Default is 3 seconds. + */ +#if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__ +#define SNTP_RECV_TIMEOUT 3000 +#endif + +/** SNTP update delay - in milliseconds + * Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000) + */ +#if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__ +#define SNTP_UPDATE_DELAY 3600000 +#endif + +/** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2 + * to send in request and compare in response. + */ +#if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__ +#define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0) +#endif + +/** Default retry timeout (in milliseconds) if the response + * received is invalid. + * This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached. + */ +#if !defined SNTP_RETRY_TIMEOUT || defined __DOXYGEN__ +#define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT +#endif + +/** Maximum retry timeout (in milliseconds). */ +#if !defined SNTP_RETRY_TIMEOUT_MAX || defined __DOXYGEN__ +#define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10) +#endif + +/** Increase retry timeout with every retry sent + * Default is on to conform to RFC. + */ +#if !defined SNTP_RETRY_TIMEOUT_EXP || defined __DOXYGEN__ +#define SNTP_RETRY_TIMEOUT_EXP 1 +#endif + +/** + * @} + */ + +#endif /* LWIP_HDR_APPS_SNTP_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_opts.h index 6968a80..bf115dc 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_opts.h @@ -1,105 +1,105 @@ -/****************************************************************//** - * - * @file tftp_opts.h - * - * @author Logan Gunthorpe - * - * @brief Trivial File Transfer Protocol (RFC 1350) implementation options - * - * Copyright (c) Deltatee Enterprises Ltd. 2013 - * All rights reserved. - * - ********************************************************************/ - -/* - * Redistribution and use in source and binary forms, with or without - * modification,are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Author: Logan Gunthorpe - * - */ - -#ifndef LWIP_HDR_APPS_TFTP_OPTS_H -#define LWIP_HDR_APPS_TFTP_OPTS_H - -#include "lwip/opt.h" - -/** - * @defgroup tftp_opts Options - * @ingroup tftp - * @{ - */ - -/** - * Enable TFTP debug messages - */ -#if !defined TFTP_DEBUG || defined __DOXYGEN__ -#define TFTP_DEBUG LWIP_DBG_ON -#endif - -/** - * TFTP server port - */ -#if !defined TFTP_PORT || defined __DOXYGEN__ -#define TFTP_PORT 69 -#endif - -/** - * TFTP timeout - */ -#if !defined TFTP_TIMEOUT_MSECS || defined __DOXYGEN__ -#define TFTP_TIMEOUT_MSECS 10000 -#endif - -/** - * Max. number of retries when a file is read from server - */ -#if !defined TFTP_MAX_RETRIES || defined __DOXYGEN__ -#define TFTP_MAX_RETRIES 5 -#endif - -/** - * TFTP timer cyclic interval - */ -#if !defined TFTP_TIMER_MSECS || defined __DOXYGEN__ -#define TFTP_TIMER_MSECS 50 -#endif - -/** - * Max. length of TFTP filename - */ -#if !defined TFTP_MAX_FILENAME_LEN || defined __DOXYGEN__ -#define TFTP_MAX_FILENAME_LEN 20 -#endif - -/** - * Max. length of TFTP mode - */ -#if !defined TFTP_MAX_MODE_LEN || defined __DOXYGEN__ -#define TFTP_MAX_MODE_LEN 7 -#endif - -/** - * @} - */ - -#endif /* LWIP_HDR_APPS_TFTP_OPTS_H */ +/****************************************************************//** + * + * @file tftp_opts.h + * + * @author Logan Gunthorpe + * + * @brief Trivial File Transfer Protocol (RFC 1350) implementation options + * + * Copyright (c) Deltatee Enterprises Ltd. 2013 + * All rights reserved. + * + ********************************************************************/ + +/* + * Redistribution and use in source and binary forms, with or without + * modification,are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Author: Logan Gunthorpe + * + */ + +#ifndef LWIP_HDR_APPS_TFTP_OPTS_H +#define LWIP_HDR_APPS_TFTP_OPTS_H + +#include "lwip/opt.h" + +/** + * @defgroup tftp_opts Options + * @ingroup tftp + * @{ + */ + +/** + * Enable TFTP debug messages + */ +#if !defined TFTP_DEBUG || defined __DOXYGEN__ +#define TFTP_DEBUG LWIP_DBG_ON +#endif + +/** + * TFTP server port + */ +#if !defined TFTP_PORT || defined __DOXYGEN__ +#define TFTP_PORT 69 +#endif + +/** + * TFTP timeout + */ +#if !defined TFTP_TIMEOUT_MSECS || defined __DOXYGEN__ +#define TFTP_TIMEOUT_MSECS 10000 +#endif + +/** + * Max. number of retries when a file is read from server + */ +#if !defined TFTP_MAX_RETRIES || defined __DOXYGEN__ +#define TFTP_MAX_RETRIES 5 +#endif + +/** + * TFTP timer cyclic interval + */ +#if !defined TFTP_TIMER_MSECS || defined __DOXYGEN__ +#define TFTP_TIMER_MSECS 50 +#endif + +/** + * Max. length of TFTP filename + */ +#if !defined TFTP_MAX_FILENAME_LEN || defined __DOXYGEN__ +#define TFTP_MAX_FILENAME_LEN 20 +#endif + +/** + * Max. length of TFTP mode + */ +#if !defined TFTP_MAX_MODE_LEN || defined __DOXYGEN__ +#define TFTP_MAX_MODE_LEN 7 +#endif + +/** + * @} + */ + +#endif /* LWIP_HDR_APPS_TFTP_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_server.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_server.h index 3fbe701..1ad91dc 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_server.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/apps/tftp_server.h @@ -1,94 +1,94 @@ -/****************************************************************//** - * - * @file tftp_server.h - * - * @author Logan Gunthorpe - * - * @brief Trivial File Transfer Protocol (RFC 1350) - * - * Copyright (c) Deltatee Enterprises Ltd. 2013 - * All rights reserved. - * - ********************************************************************/ - -/* - * Redistribution and use in source and binary forms, with or without - * modification,are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Author: Logan Gunthorpe - * - */ - -#ifndef LWIP_HDR_APPS_TFTP_SERVER_H -#define LWIP_HDR_APPS_TFTP_SERVER_H - -#include "lwip/apps/tftp_opts.h" -#include "lwip/err.h" -#include "lwip/pbuf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** @ingroup tftp - * TFTP context containing callback functions for TFTP transfers - */ -struct tftp_context { - /** - * Open file for read/write. - * @param fname Filename - * @param mode Mode string from TFTP RFC 1350 (netascii, octet, mail) - * @param write Flag indicating read (0) or write (!= 0) access - * @returns File handle supplied to other functions - */ - void* (*open)(const char* fname, const char* mode, u8_t write); - /** - * Close file handle - * @param handle File handle returned by open() - */ - void (*close)(void* handle); - /** - * Read from file - * @param handle File handle returned by open() - * @param buf Target buffer to copy read data to - * @param bytes Number of bytes to copy to buf - * @returns >= 0: Success; < 0: Error - */ - int (*read)(void* handle, void* buf, int bytes); - /** - * Write to file - * @param handle File handle returned by open() - * @param pbuf PBUF adjusted such that payload pointer points - * to the beginning of write data. In other words, - * TFTP headers are stripped off. - * @returns >= 0: Success; < 0: Error - */ - int (*write)(void* handle, struct pbuf* p); -}; - -err_t tftp_init(const struct tftp_context* ctx); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_APPS_TFTP_SERVER_H */ +/****************************************************************//** + * + * @file tftp_server.h + * + * @author Logan Gunthorpe + * + * @brief Trivial File Transfer Protocol (RFC 1350) + * + * Copyright (c) Deltatee Enterprises Ltd. 2013 + * All rights reserved. + * + ********************************************************************/ + +/* + * Redistribution and use in source and binary forms, with or without + * modification,are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Author: Logan Gunthorpe + * + */ + +#ifndef LWIP_HDR_APPS_TFTP_SERVER_H +#define LWIP_HDR_APPS_TFTP_SERVER_H + +#include "lwip/apps/tftp_opts.h" +#include "lwip/err.h" +#include "lwip/pbuf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @ingroup tftp + * TFTP context containing callback functions for TFTP transfers + */ +struct tftp_context { + /** + * Open file for read/write. + * @param fname Filename + * @param mode Mode string from TFTP RFC 1350 (netascii, octet, mail) + * @param write Flag indicating read (0) or write (!= 0) access + * @returns File handle supplied to other functions + */ + void* (*open)(const char* fname, const char* mode, u8_t write); + /** + * Close file handle + * @param handle File handle returned by open() + */ + void (*close)(void* handle); + /** + * Read from file + * @param handle File handle returned by open() + * @param buf Target buffer to copy read data to + * @param bytes Number of bytes to copy to buf + * @returns >= 0: Success; < 0: Error + */ + int (*read)(void* handle, void* buf, int bytes); + /** + * Write to file + * @param handle File handle returned by open() + * @param pbuf PBUF adjusted such that payload pointer points + * to the beginning of write data. In other words, + * TFTP headers are stripped off. + * @returns >= 0: Success; < 0: Error + */ + int (*write)(void* handle, struct pbuf* p); +}; + +err_t tftp_init(const struct tftp_context* ctx); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_APPS_TFTP_SERVER_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/arch.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/arch.h index 55714e1..f366ab5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/arch.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/arch.h @@ -1,319 +1,319 @@ -/** - * @file - * Support for different processor and compiler architectures - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_ARCH_H -#define LWIP_HDR_ARCH_H - -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif - -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif - -#include "arch/cc.h" - -/** - * @defgroup compiler_abstraction Compiler/platform abstraction - * @ingroup sys_layer - * All defines related to this section must not be placed in lwipopts.h, - * but in arch/cc.h! - * These options cannot be \#defined in lwipopts.h since they are not options - * of lwIP itself, but options of the lwIP port to your system. - * @{ - */ - -/** Define the byte order of the system. - * Needed for conversion of network data to host byte order. - * Allowed values: LITTLE_ENDIAN and BIG_ENDIAN - */ -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN -#endif - -/** Define random number generator function of your system */ -#ifdef __DOXYGEN__ -#define LWIP_RAND() ((u32_t)rand()) -#endif - -/** Platform specific diagnostic output.\n - * Note the default implementation pulls in printf, which may - * in turn pull in a lot of standard libary code. In resource-constrained - * systems, this should be defined to something less resource-consuming. - */ -#ifndef LWIP_PLATFORM_DIAG -#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0) -#include -#include -#endif - -/** Platform specific assertion handling.\n - * Note the default implementation pulls in printf, fflush and abort, which may - * in turn pull in a lot of standard libary code. In resource-constrained - * systems, this should be defined to something less resource-consuming. - */ -#ifndef LWIP_PLATFORM_ASSERT -#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ - x, __LINE__, __FILE__); fflush(NULL); abort();} while(0) -#include -#include -#endif - -/** Define this to 1 in arch/cc.h of your port if you do not want to - * include stddef.h header to get size_t. You need to typedef size_t - * by yourself in this case. - */ -#ifndef LWIP_NO_STDDEF_H -#define LWIP_NO_STDDEF_H 0 -#endif - -#if !LWIP_NO_STDDEF_H -#include /* for size_t */ -#endif - -/** Define this to 1 in arch/cc.h of your port if your compiler does not provide - * the stdint.h header. You need to typedef the generic types listed in - * lwip/arch.h yourself in this case (u8_t, u16_t...). - */ -#ifndef LWIP_NO_STDINT_H -#define LWIP_NO_STDINT_H 0 -#endif - -/* Define generic types used in lwIP */ -#if !LWIP_NO_STDINT_H -#include -typedef uint8_t u8_t; -typedef int8_t s8_t; -typedef uint16_t u16_t; -typedef int16_t s16_t; -typedef uint32_t u32_t; -typedef int32_t s32_t; -typedef uintptr_t mem_ptr_t; -#endif - -/** Define this to 1 in arch/cc.h of your port if your compiler does not provide - * the inttypes.h header. You need to define the format strings listed in - * lwip/arch.h yourself in this case (X8_F, U16_F...). - */ -#ifndef LWIP_NO_INTTYPES_H -#define LWIP_NO_INTTYPES_H 0 -#endif - -/* Define (sn)printf formatters for these lwIP types */ -#if !LWIP_NO_INTTYPES_H -#include -#ifndef X8_F -#define X8_F "02" PRIx8 -#endif -#ifndef U16_F -#define U16_F PRIu16 -#endif -#ifndef S16_F -#define S16_F PRId16 -#endif -#ifndef X16_F -#define X16_F PRIx16 -#endif -#ifndef U32_F -#define U32_F PRIu32 -#endif -#ifndef S32_F -#define S32_F PRId32 -#endif -#ifndef X32_F -#define X32_F PRIx32 -#endif -#ifndef SZT_F -#define SZT_F PRIuPTR -#endif -#endif - -/** Define this to 1 in arch/cc.h of your port if your compiler does not provide - * the limits.h header. You need to define the type limits yourself in this case - * (e.g. INT_MAX). - */ -#ifndef LWIP_NO_LIMITS_H -#define LWIP_NO_LIMITS_H 0 -#endif - -/* Include limits.h? */ -#if !LWIP_NO_LIMITS_H -#include -#endif - -/** C++ const_cast(val) equivalent to remove constness from a value (GCC -Wcast-qual) */ -#ifndef LWIP_CONST_CAST -#define LWIP_CONST_CAST(target_type, val) ((target_type)((ptrdiff_t)val)) -#endif - -/** Get rid of alignment cast warnings (GCC -Wcast-align) */ -#ifndef LWIP_ALIGNMENT_CAST -#define LWIP_ALIGNMENT_CAST(target_type, val) LWIP_CONST_CAST(target_type, val) -#endif - -/** Get rid of warnings related to pointer-to-numeric and vice-versa casts, - * e.g. "conversion from 'u8_t' to 'void *' of greater size" - */ -#ifndef LWIP_PTR_NUMERIC_CAST -#define LWIP_PTR_NUMERIC_CAST(target_type, val) LWIP_CONST_CAST(target_type, val) -#endif - -/** Allocates a memory buffer of specified size that is of sufficient size to align - * its start address using LWIP_MEM_ALIGN. - * You can declare your own version here e.g. to enforce alignment without adding - * trailing padding bytes (see LWIP_MEM_ALIGN_BUFFER) or your own section placement - * requirements.\n - * e.g. if you use gcc and need 32 bit alignment:\n - * \#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u8_t variable_name[size] \_\_attribute\_\_((aligned(4)))\n - * or more portable:\n - * \#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u32_t variable_name[(size + sizeof(u32_t) - 1) / sizeof(u32_t)] - */ -#ifndef LWIP_DECLARE_MEMORY_ALIGNED -#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u8_t variable_name[LWIP_MEM_ALIGN_BUFFER(size)] -#endif - -/** Calculate memory size for an aligned buffer - returns the next highest - * multiple of MEM_ALIGNMENT (e.g. LWIP_MEM_ALIGN_SIZE(3) and - * LWIP_MEM_ALIGN_SIZE(4) will both yield 4 for MEM_ALIGNMENT == 4). - */ -#ifndef LWIP_MEM_ALIGN_SIZE -#define LWIP_MEM_ALIGN_SIZE(size) (((size) + MEM_ALIGNMENT - 1U) & ~(MEM_ALIGNMENT-1U)) -#endif - -/** Calculate safe memory size for an aligned buffer when using an unaligned - * type as storage. This includes a safety-margin on (MEM_ALIGNMENT - 1) at the - * start (e.g. if buffer is u8_t[] and actual data will be u32_t*) - */ -#ifndef LWIP_MEM_ALIGN_BUFFER -#define LWIP_MEM_ALIGN_BUFFER(size) (((size) + MEM_ALIGNMENT - 1U)) -#endif - -/** Align a memory pointer to the alignment defined by MEM_ALIGNMENT - * so that ADDR % MEM_ALIGNMENT == 0 - */ -#ifndef LWIP_MEM_ALIGN -#define LWIP_MEM_ALIGN(addr) ((void *)(((mem_ptr_t)(addr) + MEM_ALIGNMENT - 1) & ~(mem_ptr_t)(MEM_ALIGNMENT-1))) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** Packed structs support. - * Placed BEFORE declaration of a packed struct.\n - * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n - * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. - */ -#ifndef PACK_STRUCT_BEGIN -#define PACK_STRUCT_BEGIN -#endif /* PACK_STRUCT_BEGIN */ - -/** Packed structs support. - * Placed AFTER declaration of a packed struct.\n - * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n - * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. - */ -#ifndef PACK_STRUCT_END -#define PACK_STRUCT_END -#endif /* PACK_STRUCT_END */ - -/** Packed structs support. - * Placed between end of declaration of a packed struct and trailing semicolon.\n - * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n - * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. - */ -#ifndef PACK_STRUCT_STRUCT -#if defined(__GNUC__) || defined(__clang__) -#define PACK_STRUCT_STRUCT __attribute__((packed)) -#else -#define PACK_STRUCT_STRUCT -#endif -#endif /* PACK_STRUCT_STRUCT */ - -/** Packed structs support. - * Wraps u32_t and u16_t members.\n - * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n - * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. - */ -#ifndef PACK_STRUCT_FIELD -#define PACK_STRUCT_FIELD(x) x -#endif /* PACK_STRUCT_FIELD */ - -/** Packed structs support. - * Wraps u8_t members, where some compilers warn that packing is not necessary.\n - * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n - * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. - */ -#ifndef PACK_STRUCT_FLD_8 -#define PACK_STRUCT_FLD_8(x) PACK_STRUCT_FIELD(x) -#endif /* PACK_STRUCT_FLD_8 */ - -/** Packed structs support. - * Wraps members that are packed structs themselves, where some compilers warn that packing is not necessary.\n - * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n - * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. - */ -#ifndef PACK_STRUCT_FLD_S -#define PACK_STRUCT_FLD_S(x) PACK_STRUCT_FIELD(x) -#endif /* PACK_STRUCT_FLD_S */ - -/** Packed structs support using \#include files before and after struct to be packed.\n - * The file included BEFORE the struct is "arch/bpstruct.h".\n - * The file included AFTER the struct is "arch/epstruct.h".\n - * This can be used to implement struct packing on MS Visual C compilers, see - * the Win32 port in the lwIP contrib repository for reference. - * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n - * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. - */ -#ifdef __DOXYGEN__ -#define PACK_STRUCT_USE_INCLUDES -#endif - -/** Eliminates compiler warning about unused arguments (GCC -Wextra -Wunused). */ -#ifndef LWIP_UNUSED_ARG -#define LWIP_UNUSED_ARG(x) (void)x -#endif /* LWIP_UNUSED_ARG */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_ARCH_H */ +/** + * @file + * Support for different processor and compiler architectures + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_ARCH_H +#define LWIP_HDR_ARCH_H + +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 +#endif + +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 +#endif + +#include "arch/cc.h" + +/** + * @defgroup compiler_abstraction Compiler/platform abstraction + * @ingroup sys_layer + * All defines related to this section must not be placed in lwipopts.h, + * but in arch/cc.h! + * These options cannot be \#defined in lwipopts.h since they are not options + * of lwIP itself, but options of the lwIP port to your system. + * @{ + */ + +/** Define the byte order of the system. + * Needed for conversion of network data to host byte order. + * Allowed values: LITTLE_ENDIAN and BIG_ENDIAN + */ +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN +#endif + +/** Define random number generator function of your system */ +#ifdef __DOXYGEN__ +#define LWIP_RAND() ((u32_t)rand()) +#endif + +/** Platform specific diagnostic output.\n + * Note the default implementation pulls in printf, which may + * in turn pull in a lot of standard libary code. In resource-constrained + * systems, this should be defined to something less resource-consuming. + */ +#ifndef LWIP_PLATFORM_DIAG +#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0) +#include +#include +#endif + +/** Platform specific assertion handling.\n + * Note the default implementation pulls in printf, fflush and abort, which may + * in turn pull in a lot of standard libary code. In resource-constrained + * systems, this should be defined to something less resource-consuming. + */ +#ifndef LWIP_PLATFORM_ASSERT +#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); fflush(NULL); abort();} while(0) +#include +#include +#endif + +/** Define this to 1 in arch/cc.h of your port if you do not want to + * include stddef.h header to get size_t. You need to typedef size_t + * by yourself in this case. + */ +#ifndef LWIP_NO_STDDEF_H +#define LWIP_NO_STDDEF_H 0 +#endif + +#if !LWIP_NO_STDDEF_H +#include /* for size_t */ +#endif + +/** Define this to 1 in arch/cc.h of your port if your compiler does not provide + * the stdint.h header. You need to typedef the generic types listed in + * lwip/arch.h yourself in this case (u8_t, u16_t...). + */ +#ifndef LWIP_NO_STDINT_H +#define LWIP_NO_STDINT_H 0 +#endif + +/* Define generic types used in lwIP */ +#if !LWIP_NO_STDINT_H +#include +typedef uint8_t u8_t; +typedef int8_t s8_t; +typedef uint16_t u16_t; +typedef int16_t s16_t; +typedef uint32_t u32_t; +typedef int32_t s32_t; +typedef uintptr_t mem_ptr_t; +#endif + +/** Define this to 1 in arch/cc.h of your port if your compiler does not provide + * the inttypes.h header. You need to define the format strings listed in + * lwip/arch.h yourself in this case (X8_F, U16_F...). + */ +#ifndef LWIP_NO_INTTYPES_H +#define LWIP_NO_INTTYPES_H 0 +#endif + +/* Define (sn)printf formatters for these lwIP types */ +#if !LWIP_NO_INTTYPES_H +#include +#ifndef X8_F +#define X8_F "02" PRIx8 +#endif +#ifndef U16_F +#define U16_F PRIu16 +#endif +#ifndef S16_F +#define S16_F PRId16 +#endif +#ifndef X16_F +#define X16_F PRIx16 +#endif +#ifndef U32_F +#define U32_F PRIu32 +#endif +#ifndef S32_F +#define S32_F PRId32 +#endif +#ifndef X32_F +#define X32_F PRIx32 +#endif +#ifndef SZT_F +#define SZT_F PRIuPTR +#endif +#endif + +/** Define this to 1 in arch/cc.h of your port if your compiler does not provide + * the limits.h header. You need to define the type limits yourself in this case + * (e.g. INT_MAX). + */ +#ifndef LWIP_NO_LIMITS_H +#define LWIP_NO_LIMITS_H 0 +#endif + +/* Include limits.h? */ +#if !LWIP_NO_LIMITS_H +#include +#endif + +/** C++ const_cast(val) equivalent to remove constness from a value (GCC -Wcast-qual) */ +#ifndef LWIP_CONST_CAST +#define LWIP_CONST_CAST(target_type, val) ((target_type)((ptrdiff_t)val)) +#endif + +/** Get rid of alignment cast warnings (GCC -Wcast-align) */ +#ifndef LWIP_ALIGNMENT_CAST +#define LWIP_ALIGNMENT_CAST(target_type, val) LWIP_CONST_CAST(target_type, val) +#endif + +/** Get rid of warnings related to pointer-to-numeric and vice-versa casts, + * e.g. "conversion from 'u8_t' to 'void *' of greater size" + */ +#ifndef LWIP_PTR_NUMERIC_CAST +#define LWIP_PTR_NUMERIC_CAST(target_type, val) LWIP_CONST_CAST(target_type, val) +#endif + +/** Allocates a memory buffer of specified size that is of sufficient size to align + * its start address using LWIP_MEM_ALIGN. + * You can declare your own version here e.g. to enforce alignment without adding + * trailing padding bytes (see LWIP_MEM_ALIGN_BUFFER) or your own section placement + * requirements.\n + * e.g. if you use gcc and need 32 bit alignment:\n + * \#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u8_t variable_name[size] \_\_attribute\_\_((aligned(4)))\n + * or more portable:\n + * \#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u32_t variable_name[(size + sizeof(u32_t) - 1) / sizeof(u32_t)] + */ +#ifndef LWIP_DECLARE_MEMORY_ALIGNED +#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u8_t variable_name[LWIP_MEM_ALIGN_BUFFER(size)] +#endif + +/** Calculate memory size for an aligned buffer - returns the next highest + * multiple of MEM_ALIGNMENT (e.g. LWIP_MEM_ALIGN_SIZE(3) and + * LWIP_MEM_ALIGN_SIZE(4) will both yield 4 for MEM_ALIGNMENT == 4). + */ +#ifndef LWIP_MEM_ALIGN_SIZE +#define LWIP_MEM_ALIGN_SIZE(size) (((size) + MEM_ALIGNMENT - 1U) & ~(MEM_ALIGNMENT-1U)) +#endif + +/** Calculate safe memory size for an aligned buffer when using an unaligned + * type as storage. This includes a safety-margin on (MEM_ALIGNMENT - 1) at the + * start (e.g. if buffer is u8_t[] and actual data will be u32_t*) + */ +#ifndef LWIP_MEM_ALIGN_BUFFER +#define LWIP_MEM_ALIGN_BUFFER(size) (((size) + MEM_ALIGNMENT - 1U)) +#endif + +/** Align a memory pointer to the alignment defined by MEM_ALIGNMENT + * so that ADDR % MEM_ALIGNMENT == 0 + */ +#ifndef LWIP_MEM_ALIGN +#define LWIP_MEM_ALIGN(addr) ((void *)(((mem_ptr_t)(addr) + MEM_ALIGNMENT - 1) & ~(mem_ptr_t)(MEM_ALIGNMENT-1))) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** Packed structs support. + * Placed BEFORE declaration of a packed struct.\n + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifndef PACK_STRUCT_BEGIN +#define PACK_STRUCT_BEGIN +#endif /* PACK_STRUCT_BEGIN */ + +/** Packed structs support. + * Placed AFTER declaration of a packed struct.\n + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifndef PACK_STRUCT_END +#define PACK_STRUCT_END +#endif /* PACK_STRUCT_END */ + +/** Packed structs support. + * Placed between end of declaration of a packed struct and trailing semicolon.\n + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifndef PACK_STRUCT_STRUCT +#if defined(__GNUC__) || defined(__clang__) +#define PACK_STRUCT_STRUCT __attribute__((packed)) +#else +#define PACK_STRUCT_STRUCT +#endif +#endif /* PACK_STRUCT_STRUCT */ + +/** Packed structs support. + * Wraps u32_t and u16_t members.\n + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifndef PACK_STRUCT_FIELD +#define PACK_STRUCT_FIELD(x) x +#endif /* PACK_STRUCT_FIELD */ + +/** Packed structs support. + * Wraps u8_t members, where some compilers warn that packing is not necessary.\n + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifndef PACK_STRUCT_FLD_8 +#define PACK_STRUCT_FLD_8(x) PACK_STRUCT_FIELD(x) +#endif /* PACK_STRUCT_FLD_8 */ + +/** Packed structs support. + * Wraps members that are packed structs themselves, where some compilers warn that packing is not necessary.\n + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifndef PACK_STRUCT_FLD_S +#define PACK_STRUCT_FLD_S(x) PACK_STRUCT_FIELD(x) +#endif /* PACK_STRUCT_FLD_S */ + +/** Packed structs support using \#include files before and after struct to be packed.\n + * The file included BEFORE the struct is "arch/bpstruct.h".\n + * The file included AFTER the struct is "arch/epstruct.h".\n + * This can be used to implement struct packing on MS Visual C compilers, see + * the Win32 port in the lwIP contrib repository for reference. + * For examples of packed struct declarations, see include/lwip/prot/ subfolder.\n + * A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here. + */ +#ifdef __DOXYGEN__ +#define PACK_STRUCT_USE_INCLUDES +#endif + +/** Eliminates compiler warning about unused arguments (GCC -Wextra -Wunused). */ +#ifndef LWIP_UNUSED_ARG +#define LWIP_UNUSED_ARG(x) (void)x +#endif /* LWIP_UNUSED_ARG */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_ARCH_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/autoip.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/autoip.h index 1d85bcc..5c6d13e 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/autoip.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/autoip.h @@ -1,99 +1,99 @@ -/** - * @file - * - * AutoIP Automatic LinkLocal IP Configuration - */ - -/* - * - * Copyright (c) 2007 Dominik Spies - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * Author: Dominik Spies - * - * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform - * with RFC 3927. - * - */ - -#ifndef LWIP_HDR_AUTOIP_H -#define LWIP_HDR_AUTOIP_H - -#include "lwip/opt.h" - -#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/netif.h" -/* #include "lwip/udp.h" */ -#include "lwip/etharp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** AutoIP Timing */ -#define AUTOIP_TMR_INTERVAL 100 -#define AUTOIP_TICKS_PER_SECOND (1000 / AUTOIP_TMR_INTERVAL) - -/** AutoIP state information per netif */ -struct autoip -{ - /** the currently selected, probed, announced or used LL IP-Address */ - ip4_addr_t llipaddr; - /** current AutoIP state machine state */ - u8_t state; - /** sent number of probes or announces, dependent on state */ - u8_t sent_num; - /** ticks to wait, tick is AUTOIP_TMR_INTERVAL long */ - u16_t ttw; - /** ticks until a conflict can be solved by defending */ - u8_t lastconflict; - /** total number of probed/used Link Local IP-Addresses */ - u8_t tried_llipaddr; -}; - - -void autoip_set_struct(struct netif *netif, struct autoip *autoip); -/** Remove a struct autoip previously set to the netif using autoip_set_struct() */ -#define autoip_remove_struct(netif) do { (netif)->autoip = NULL; } while (0) -err_t autoip_start(struct netif *netif); -err_t autoip_stop(struct netif *netif); -void autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr); -void autoip_tmr(void); -void autoip_network_changed(struct netif *netif); -u8_t autoip_supplied_address(const struct netif *netif); - -/* for lwIP internal use by ip4.c */ -u8_t autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr); - -#define netif_autoip_data(netif) ((struct autoip*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP)) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV4 && LWIP_AUTOIP */ - -#endif /* LWIP_HDR_AUTOIP_H */ +/** + * @file + * + * AutoIP Automatic LinkLocal IP Configuration + */ + +/* + * + * Copyright (c) 2007 Dominik Spies + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * Author: Dominik Spies + * + * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform + * with RFC 3927. + * + */ + +#ifndef LWIP_HDR_AUTOIP_H +#define LWIP_HDR_AUTOIP_H + +#include "lwip/opt.h" + +#if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/netif.h" +/* #include "lwip/udp.h" */ +#include "lwip/etharp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** AutoIP Timing */ +#define AUTOIP_TMR_INTERVAL 100 +#define AUTOIP_TICKS_PER_SECOND (1000 / AUTOIP_TMR_INTERVAL) + +/** AutoIP state information per netif */ +struct autoip +{ + /** the currently selected, probed, announced or used LL IP-Address */ + ip4_addr_t llipaddr; + /** current AutoIP state machine state */ + u8_t state; + /** sent number of probes or announces, dependent on state */ + u8_t sent_num; + /** ticks to wait, tick is AUTOIP_TMR_INTERVAL long */ + u16_t ttw; + /** ticks until a conflict can be solved by defending */ + u8_t lastconflict; + /** total number of probed/used Link Local IP-Addresses */ + u8_t tried_llipaddr; +}; + + +void autoip_set_struct(struct netif *netif, struct autoip *autoip); +/** Remove a struct autoip previously set to the netif using autoip_set_struct() */ +#define autoip_remove_struct(netif) do { (netif)->autoip = NULL; } while (0) +err_t autoip_start(struct netif *netif); +err_t autoip_stop(struct netif *netif); +void autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr); +void autoip_tmr(void); +void autoip_network_changed(struct netif *netif); +u8_t autoip_supplied_address(const struct netif *netif); + +/* for lwIP internal use by ip4.c */ +u8_t autoip_accept_packet(struct netif *netif, const ip4_addr_t *addr); + +#define netif_autoip_data(netif) ((struct autoip*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP)) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV4 && LWIP_AUTOIP */ + +#endif /* LWIP_HDR_AUTOIP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/debug.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/debug.h index a142f1c..d19e613 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/debug.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/debug.h @@ -1,167 +1,167 @@ -/** - * @file - * Debug messages infrastructure - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_DEBUG_H -#define LWIP_HDR_DEBUG_H - -#include "lwip/arch.h" -#include "lwip/opt.h" - -/** - * @defgroup debugging_levels LWIP_DBG_MIN_LEVEL and LWIP_DBG_TYPES_ON values - * @ingroup lwip_opts_debugmsg - * @{ - */ - -/** @name Debug level (LWIP_DBG_MIN_LEVEL) - * @{ - */ -/** Debug level: ALL messages*/ -#define LWIP_DBG_LEVEL_ALL 0x00 -/** Debug level: Warnings. bad checksums, dropped packets, ... */ -#define LWIP_DBG_LEVEL_WARNING 0x01 -/** Debug level: Serious. memory allocation failures, ... */ -#define LWIP_DBG_LEVEL_SERIOUS 0x02 -/** Debug level: Severe */ -#define LWIP_DBG_LEVEL_SEVERE 0x03 -/** - * @} - */ - -#define LWIP_DBG_MASK_LEVEL 0x03 -/* compatibility define only */ -#define LWIP_DBG_LEVEL_OFF LWIP_DBG_LEVEL_ALL - -/** @name Enable/disable debug messages completely (LWIP_DBG_TYPES_ON) - * @{ - */ -/** flag for LWIP_DEBUGF to enable that debug message */ -#define LWIP_DBG_ON 0x80U -/** flag for LWIP_DEBUGF to disable that debug message */ -#define LWIP_DBG_OFF 0x00U -/** - * @} - */ - -/** @name Debug message types (LWIP_DBG_TYPES_ON) - * @{ - */ -/** flag for LWIP_DEBUGF indicating a tracing message (to follow program flow) */ -#define LWIP_DBG_TRACE 0x40U -/** flag for LWIP_DEBUGF indicating a state debug message (to follow module states) */ -#define LWIP_DBG_STATE 0x20U -/** flag for LWIP_DEBUGF indicating newly added code, not thoroughly tested yet */ -#define LWIP_DBG_FRESH 0x10U -/** flag for LWIP_DEBUGF to halt after printing this debug message */ -#define LWIP_DBG_HALT 0x08U -/** - * @} - */ - -/** - * @} - */ - -/** - * @defgroup lwip_assertions Assertion handling - * @ingroup lwip_opts_debug - * @{ - */ -/** - * LWIP_NOASSERT: Disable LWIP_ASSERT checks: - * To disable assertions define LWIP_NOASSERT in arch/cc.h. - */ -#ifdef __DOXYGEN__ -#define LWIP_NOASSERT -#undef LWIP_NOASSERT -#endif -/** - * @} - */ - -#ifndef LWIP_NOASSERT -#define LWIP_ASSERT(message, assertion) do { if (!(assertion)) { \ - LWIP_PLATFORM_ASSERT(message); }} while(0) -#ifndef LWIP_PLATFORM_ASSERT -#error "If you want to use LWIP_ASSERT, LWIP_PLATFORM_ASSERT(message) needs to be defined in your arch/cc.h" -#endif -#else /* LWIP_NOASSERT */ -#define LWIP_ASSERT(message, assertion) -#endif /* LWIP_NOASSERT */ - -#ifndef LWIP_ERROR -#ifndef LWIP_NOASSERT -#define LWIP_PLATFORM_ERROR(message) LWIP_PLATFORM_ASSERT(message) -#elif defined LWIP_DEBUG -#define LWIP_PLATFORM_ERROR(message) LWIP_PLATFORM_DIAG((message)) -#else -#define LWIP_PLATFORM_ERROR(message) -#endif - -/* if "expression" isn't true, then print "message" and execute "handler" expression */ -#define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \ - LWIP_PLATFORM_ERROR(message); handler;}} while(0) -#endif /* LWIP_ERROR */ - -/** Enable debug message printing, but only if debug message type is enabled - * AND is of correct type AND is at least LWIP_DBG_LEVEL. - */ -#ifdef __DOXYGEN__ -#define LWIP_DEBUG -#undef LWIP_DEBUG -#endif - -#ifdef LWIP_DEBUG -#ifndef LWIP_PLATFORM_DIAG -#error "If you want to use LWIP_DEBUG, LWIP_PLATFORM_DIAG(message) needs to be defined in your arch/cc.h" -#endif -#define LWIP_DEBUGF(debug, message) do { \ - if ( \ - ((debug) & LWIP_DBG_ON) && \ - ((debug) & LWIP_DBG_TYPES_ON) && \ - ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { \ - LWIP_PLATFORM_DIAG(message); \ - if ((debug) & LWIP_DBG_HALT) { \ - while(1); \ - } \ - } \ - } while(0) - -#else /* LWIP_DEBUG */ -#define LWIP_DEBUGF(debug, message) -#endif /* LWIP_DEBUG */ - -#endif /* LWIP_HDR_DEBUG_H */ +/** + * @file + * Debug messages infrastructure + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_DEBUG_H +#define LWIP_HDR_DEBUG_H + +#include "lwip/arch.h" +#include "lwip/opt.h" + +/** + * @defgroup debugging_levels LWIP_DBG_MIN_LEVEL and LWIP_DBG_TYPES_ON values + * @ingroup lwip_opts_debugmsg + * @{ + */ + +/** @name Debug level (LWIP_DBG_MIN_LEVEL) + * @{ + */ +/** Debug level: ALL messages*/ +#define LWIP_DBG_LEVEL_ALL 0x00 +/** Debug level: Warnings. bad checksums, dropped packets, ... */ +#define LWIP_DBG_LEVEL_WARNING 0x01 +/** Debug level: Serious. memory allocation failures, ... */ +#define LWIP_DBG_LEVEL_SERIOUS 0x02 +/** Debug level: Severe */ +#define LWIP_DBG_LEVEL_SEVERE 0x03 +/** + * @} + */ + +#define LWIP_DBG_MASK_LEVEL 0x03 +/* compatibility define only */ +#define LWIP_DBG_LEVEL_OFF LWIP_DBG_LEVEL_ALL + +/** @name Enable/disable debug messages completely (LWIP_DBG_TYPES_ON) + * @{ + */ +/** flag for LWIP_DEBUGF to enable that debug message */ +#define LWIP_DBG_ON 0x80U +/** flag for LWIP_DEBUGF to disable that debug message */ +#define LWIP_DBG_OFF 0x00U +/** + * @} + */ + +/** @name Debug message types (LWIP_DBG_TYPES_ON) + * @{ + */ +/** flag for LWIP_DEBUGF indicating a tracing message (to follow program flow) */ +#define LWIP_DBG_TRACE 0x40U +/** flag for LWIP_DEBUGF indicating a state debug message (to follow module states) */ +#define LWIP_DBG_STATE 0x20U +/** flag for LWIP_DEBUGF indicating newly added code, not thoroughly tested yet */ +#define LWIP_DBG_FRESH 0x10U +/** flag for LWIP_DEBUGF to halt after printing this debug message */ +#define LWIP_DBG_HALT 0x08U +/** + * @} + */ + +/** + * @} + */ + +/** + * @defgroup lwip_assertions Assertion handling + * @ingroup lwip_opts_debug + * @{ + */ +/** + * LWIP_NOASSERT: Disable LWIP_ASSERT checks: + * To disable assertions define LWIP_NOASSERT in arch/cc.h. + */ +#ifdef __DOXYGEN__ +#define LWIP_NOASSERT +#undef LWIP_NOASSERT +#endif +/** + * @} + */ + +#ifndef LWIP_NOASSERT +#define LWIP_ASSERT(message, assertion) do { if (!(assertion)) { \ + LWIP_PLATFORM_ASSERT(message); }} while(0) +#ifndef LWIP_PLATFORM_ASSERT +#error "If you want to use LWIP_ASSERT, LWIP_PLATFORM_ASSERT(message) needs to be defined in your arch/cc.h" +#endif +#else /* LWIP_NOASSERT */ +#define LWIP_ASSERT(message, assertion) +#endif /* LWIP_NOASSERT */ + +#ifndef LWIP_ERROR +#ifndef LWIP_NOASSERT +#define LWIP_PLATFORM_ERROR(message) LWIP_PLATFORM_ASSERT(message) +#elif defined LWIP_DEBUG +#define LWIP_PLATFORM_ERROR(message) LWIP_PLATFORM_DIAG((message)) +#else +#define LWIP_PLATFORM_ERROR(message) +#endif + +/* if "expression" isn't true, then print "message" and execute "handler" expression */ +#define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \ + LWIP_PLATFORM_ERROR(message); handler;}} while(0) +#endif /* LWIP_ERROR */ + +/** Enable debug message printing, but only if debug message type is enabled + * AND is of correct type AND is at least LWIP_DBG_LEVEL. + */ +#ifdef __DOXYGEN__ +#define LWIP_DEBUG +#undef LWIP_DEBUG +#endif + +#ifdef LWIP_DEBUG +#ifndef LWIP_PLATFORM_DIAG +#error "If you want to use LWIP_DEBUG, LWIP_PLATFORM_DIAG(message) needs to be defined in your arch/cc.h" +#endif +#define LWIP_DEBUGF(debug, message) do { \ + if ( \ + ((debug) & LWIP_DBG_ON) && \ + ((debug) & LWIP_DBG_TYPES_ON) && \ + ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { \ + LWIP_PLATFORM_DIAG(message); \ + if ((debug) & LWIP_DBG_HALT) { \ + while(1); \ + } \ + } \ + } while(0) + +#else /* LWIP_DEBUG */ +#define LWIP_DEBUGF(debug, message) +#endif /* LWIP_DEBUG */ + +#endif /* LWIP_HDR_DEBUG_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/def.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/def.h index 82a9d89..2db7522 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/def.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/def.h @@ -1,141 +1,141 @@ -/** - * @file - * various utility macros - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_DEF_H -#define LWIP_HDR_DEF_H - -/* arch.h might define NULL already */ -#include "lwip/arch.h" -#include "lwip/opt.h" -#if LWIP_PERF -#include "arch/perf.h" -#else /* LWIP_PERF */ -#define PERF_START /* null definition */ -#define PERF_STOP(x) /* null definition */ -#endif /* LWIP_PERF */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y)) -#define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y)) - -/* Get the number of entries in an array ('x' must NOT be a pointer!) */ -#define LWIP_ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0])) - -/** Create u32_t value from bytes */ -#define LWIP_MAKEU32(a,b,c,d) (((u32_t)((a) & 0xff) << 24) | \ - ((u32_t)((b) & 0xff) << 16) | \ - ((u32_t)((c) & 0xff) << 8) | \ - (u32_t)((d) & 0xff)) - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#if BYTE_ORDER == BIG_ENDIAN -#define lwip_htons(x) (x) -#define lwip_ntohs(x) (x) -#define lwip_htonl(x) (x) -#define lwip_ntohl(x) (x) -#define PP_HTONS(x) (x) -#define PP_NTOHS(x) (x) -#define PP_HTONL(x) (x) -#define PP_NTOHL(x) (x) -#else /* BYTE_ORDER != BIG_ENDIAN */ -#ifndef lwip_htons -u16_t lwip_htons(u16_t x); -#endif -#define lwip_ntohs(x) lwip_htons(x) - -#ifndef lwip_htonl -u32_t lwip_htonl(u32_t x); -#endif -#define lwip_ntohl(x) lwip_htonl(x) - -/* These macros should be calculated by the preprocessor and are used - with compile-time constants only (so that there is no little-endian - overhead at runtime). */ -#define PP_HTONS(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8)) -#define PP_NTOHS(x) PP_HTONS(x) -#define PP_HTONL(x) ((((x) & 0x000000ffUL) << 24) | \ - (((x) & 0x0000ff00UL) << 8) | \ - (((x) & 0x00ff0000UL) >> 8) | \ - (((x) & 0xff000000UL) >> 24)) -#define PP_NTOHL(x) PP_HTONL(x) -#endif /* BYTE_ORDER == BIG_ENDIAN */ - -/* Provide usual function names as macros for users, but this can be turned off */ -#ifndef LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS -#define htons(x) lwip_htons(x) -#define ntohs(x) lwip_ntohs(x) -#define htonl(x) lwip_htonl(x) -#define ntohl(x) lwip_ntohl(x) -#endif - -/* Functions that are not available as standard implementations. - * In cc.h, you can #define these to implementations available on - * your platform to save some code bytes if you use these functions - * in your application, too. - */ - -#ifndef lwip_itoa -/* This can be #defined to itoa() or snprintf(result, bufsize, "%d", number) depending on your platform */ -void lwip_itoa(char* result, size_t bufsize, int number); -#endif -#ifndef lwip_strnicmp -/* This can be #defined to strnicmp() or strncasecmp() depending on your platform */ -int lwip_strnicmp(const char* str1, const char* str2, size_t len); -#endif -#ifndef lwip_stricmp -/* This can be #defined to stricmp() or strcasecmp() depending on your platform */ -int lwip_stricmp(const char* str1, const char* str2); -#endif -#ifndef lwip_strnstr -/* This can be #defined to strnstr() depending on your platform */ -char* lwip_strnstr(const char* buffer, const char* token, size_t n); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_DEF_H */ +/** + * @file + * various utility macros + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_DEF_H +#define LWIP_HDR_DEF_H + +/* arch.h might define NULL already */ +#include "lwip/arch.h" +#include "lwip/opt.h" +#if LWIP_PERF +#include "arch/perf.h" +#else /* LWIP_PERF */ +#define PERF_START /* null definition */ +#define PERF_STOP(x) /* null definition */ +#endif /* LWIP_PERF */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y)) +#define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y)) + +/* Get the number of entries in an array ('x' must NOT be a pointer!) */ +#define LWIP_ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0])) + +/** Create u32_t value from bytes */ +#define LWIP_MAKEU32(a,b,c,d) (((u32_t)((a) & 0xff) << 24) | \ + ((u32_t)((b) & 0xff) << 16) | \ + ((u32_t)((c) & 0xff) << 8) | \ + (u32_t)((d) & 0xff)) + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +#if BYTE_ORDER == BIG_ENDIAN +#define lwip_htons(x) (x) +#define lwip_ntohs(x) (x) +#define lwip_htonl(x) (x) +#define lwip_ntohl(x) (x) +#define PP_HTONS(x) (x) +#define PP_NTOHS(x) (x) +#define PP_HTONL(x) (x) +#define PP_NTOHL(x) (x) +#else /* BYTE_ORDER != BIG_ENDIAN */ +#ifndef lwip_htons +u16_t lwip_htons(u16_t x); +#endif +#define lwip_ntohs(x) lwip_htons(x) + +#ifndef lwip_htonl +u32_t lwip_htonl(u32_t x); +#endif +#define lwip_ntohl(x) lwip_htonl(x) + +/* These macros should be calculated by the preprocessor and are used + with compile-time constants only (so that there is no little-endian + overhead at runtime). */ +#define PP_HTONS(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8)) +#define PP_NTOHS(x) PP_HTONS(x) +#define PP_HTONL(x) ((((x) & 0x000000ffUL) << 24) | \ + (((x) & 0x0000ff00UL) << 8) | \ + (((x) & 0x00ff0000UL) >> 8) | \ + (((x) & 0xff000000UL) >> 24)) +#define PP_NTOHL(x) PP_HTONL(x) +#endif /* BYTE_ORDER == BIG_ENDIAN */ + +/* Provide usual function names as macros for users, but this can be turned off */ +#ifndef LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS +#define htons(x) lwip_htons(x) +#define ntohs(x) lwip_ntohs(x) +#define htonl(x) lwip_htonl(x) +#define ntohl(x) lwip_ntohl(x) +#endif + +/* Functions that are not available as standard implementations. + * In cc.h, you can #define these to implementations available on + * your platform to save some code bytes if you use these functions + * in your application, too. + */ + +#ifndef lwip_itoa +/* This can be #defined to itoa() or snprintf(result, bufsize, "%d", number) depending on your platform */ +void lwip_itoa(char* result, size_t bufsize, int number); +#endif +#ifndef lwip_strnicmp +/* This can be #defined to strnicmp() or strncasecmp() depending on your platform */ +int lwip_strnicmp(const char* str1, const char* str2, size_t len); +#endif +#ifndef lwip_stricmp +/* This can be #defined to stricmp() or strcasecmp() depending on your platform */ +int lwip_stricmp(const char* str1, const char* str2); +#endif +#ifndef lwip_strnstr +/* This can be #defined to strnstr() depending on your platform */ +char* lwip_strnstr(const char* buffer, const char* token, size_t n); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_DEF_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp.h index df932af..9750491 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp.h @@ -1,143 +1,143 @@ -/** - * @file - * DHCP client API - */ - -/* - * Copyright (c) 2001-2004 Leon Woestenberg - * Copyright (c) 2001-2004 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Leon Woestenberg - * - */ -#ifndef LWIP_HDR_DHCP_H -#define LWIP_HDR_DHCP_H - -#include "lwip/opt.h" - -#if LWIP_DHCP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/netif.h" -#include "lwip/udp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** period (in seconds) of the application calling dhcp_coarse_tmr() */ -#define DHCP_COARSE_TIMER_SECS 60 -/** period (in milliseconds) of the application calling dhcp_coarse_tmr() */ -#define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL) -/** period (in milliseconds) of the application calling dhcp_fine_tmr() */ -#define DHCP_FINE_TIMER_MSECS 500 - -#define DHCP_BOOT_FILE_LEN 128U - -/* AutoIP cooperation flags (struct dhcp.autoip_coop_state) */ -typedef enum { - DHCP_AUTOIP_COOP_STATE_OFF = 0, - DHCP_AUTOIP_COOP_STATE_ON = 1 -} dhcp_autoip_coop_state_enum_t; - -struct dhcp -{ - /** transaction identifier of last sent request */ - u32_t xid; - /** incoming msg */ - struct dhcp_msg *msg_in; - /** track PCB allocation state */ - u8_t pcb_allocated; - /** current DHCP state machine state */ - u8_t state; - /** retries of current request */ - u8_t tries; -#if LWIP_DHCP_AUTOIP_COOP - u8_t autoip_coop_state; -#endif - u8_t subnet_mask_given; - - struct pbuf *p_out; /* pbuf of outcoming msg */ - struct dhcp_msg *msg_out; /* outgoing msg */ - u16_t options_out_len; /* outgoing msg options length */ - u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */ - u16_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */ - u16_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */ - u16_t t1_renew_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next renew try */ - u16_t t2_rebind_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next rebind try */ - u16_t lease_used; /* #ticks with period DHCP_COARSE_TIMER_SECS since last received DHCP ack */ - u16_t t0_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for lease time */ - ip_addr_t server_ip_addr; /* dhcp server address that offered this lease (ip_addr_t because passed to UDP) */ - ip4_addr_t offered_ip_addr; - ip4_addr_t offered_sn_mask; - ip4_addr_t offered_gw_addr; - - u32_t offered_t0_lease; /* lease period (in seconds) */ - u32_t offered_t1_renew; /* recommended renew time (usually 50% of lease period) */ - u32_t offered_t2_rebind; /* recommended rebind time (usually 87.5 of lease period) */ -#if LWIP_DHCP_BOOTP_FILE - ip4_addr_t offered_si_addr; - char boot_file_name[DHCP_BOOT_FILE_LEN]; -#endif /* LWIP_DHCP_BOOTPFILE */ -}; - - -void dhcp_set_struct(struct netif *netif, struct dhcp *dhcp); -/** Remove a struct dhcp previously set to the netif using dhcp_set_struct() */ -#define dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL) -void dhcp_cleanup(struct netif *netif); -err_t dhcp_start(struct netif *netif); -err_t dhcp_renew(struct netif *netif); -err_t dhcp_release(struct netif *netif); -void dhcp_stop(struct netif *netif); -void dhcp_inform(struct netif *netif); -void dhcp_network_changed(struct netif *netif); -#if DHCP_DOES_ARP_CHECK -void dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr); -#endif -u8_t dhcp_supplied_address(const struct netif *netif); -/* to be called every minute */ -void dhcp_coarse_tmr(void); -/* to be called every half second */ -void dhcp_fine_tmr(void); - -#if LWIP_DHCP_GET_NTP_SRV -/** This function must exist, in other to add offered NTP servers to - * the NTP (or SNTP) engine. - * See LWIP_DHCP_MAX_NTP_SERVERS */ -extern void dhcp_set_ntp_servers(u8_t num_ntp_servers, const ip4_addr_t* ntp_server_addrs); -#endif /* LWIP_DHCP_GET_NTP_SRV */ - -#define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP)) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_DHCP */ - -#endif /*LWIP_HDR_DHCP_H*/ +/** + * @file + * DHCP client API + */ + +/* + * Copyright (c) 2001-2004 Leon Woestenberg + * Copyright (c) 2001-2004 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Leon Woestenberg + * + */ +#ifndef LWIP_HDR_DHCP_H +#define LWIP_HDR_DHCP_H + +#include "lwip/opt.h" + +#if LWIP_DHCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/netif.h" +#include "lwip/udp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** period (in seconds) of the application calling dhcp_coarse_tmr() */ +#define DHCP_COARSE_TIMER_SECS 60 +/** period (in milliseconds) of the application calling dhcp_coarse_tmr() */ +#define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL) +/** period (in milliseconds) of the application calling dhcp_fine_tmr() */ +#define DHCP_FINE_TIMER_MSECS 500 + +#define DHCP_BOOT_FILE_LEN 128U + +/* AutoIP cooperation flags (struct dhcp.autoip_coop_state) */ +typedef enum { + DHCP_AUTOIP_COOP_STATE_OFF = 0, + DHCP_AUTOIP_COOP_STATE_ON = 1 +} dhcp_autoip_coop_state_enum_t; + +struct dhcp +{ + /** transaction identifier of last sent request */ + u32_t xid; + /** incoming msg */ + struct dhcp_msg *msg_in; + /** track PCB allocation state */ + u8_t pcb_allocated; + /** current DHCP state machine state */ + u8_t state; + /** retries of current request */ + u8_t tries; +#if LWIP_DHCP_AUTOIP_COOP + u8_t autoip_coop_state; +#endif + u8_t subnet_mask_given; + + struct pbuf *p_out; /* pbuf of outcoming msg */ + struct dhcp_msg *msg_out; /* outgoing msg */ + u16_t options_out_len; /* outgoing msg options length */ + u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */ + u16_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */ + u16_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */ + u16_t t1_renew_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next renew try */ + u16_t t2_rebind_time; /* #ticks with period DHCP_COARSE_TIMER_SECS until next rebind try */ + u16_t lease_used; /* #ticks with period DHCP_COARSE_TIMER_SECS since last received DHCP ack */ + u16_t t0_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for lease time */ + ip_addr_t server_ip_addr; /* dhcp server address that offered this lease (ip_addr_t because passed to UDP) */ + ip4_addr_t offered_ip_addr; + ip4_addr_t offered_sn_mask; + ip4_addr_t offered_gw_addr; + + u32_t offered_t0_lease; /* lease period (in seconds) */ + u32_t offered_t1_renew; /* recommended renew time (usually 50% of lease period) */ + u32_t offered_t2_rebind; /* recommended rebind time (usually 87.5 of lease period) */ +#if LWIP_DHCP_BOOTP_FILE + ip4_addr_t offered_si_addr; + char boot_file_name[DHCP_BOOT_FILE_LEN]; +#endif /* LWIP_DHCP_BOOTPFILE */ +}; + + +void dhcp_set_struct(struct netif *netif, struct dhcp *dhcp); +/** Remove a struct dhcp previously set to the netif using dhcp_set_struct() */ +#define dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL) +void dhcp_cleanup(struct netif *netif); +err_t dhcp_start(struct netif *netif); +err_t dhcp_renew(struct netif *netif); +err_t dhcp_release(struct netif *netif); +void dhcp_stop(struct netif *netif); +void dhcp_inform(struct netif *netif); +void dhcp_network_changed(struct netif *netif); +#if DHCP_DOES_ARP_CHECK +void dhcp_arp_reply(struct netif *netif, const ip4_addr_t *addr); +#endif +u8_t dhcp_supplied_address(const struct netif *netif); +/* to be called every minute */ +void dhcp_coarse_tmr(void); +/* to be called every half second */ +void dhcp_fine_tmr(void); + +#if LWIP_DHCP_GET_NTP_SRV +/** This function must exist, in other to add offered NTP servers to + * the NTP (or SNTP) engine. + * See LWIP_DHCP_MAX_NTP_SERVERS */ +extern void dhcp_set_ntp_servers(u8_t num_ntp_servers, const ip4_addr_t* ntp_server_addrs); +#endif /* LWIP_DHCP_GET_NTP_SRV */ + +#define netif_dhcp_data(netif) ((struct dhcp*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP)) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_DHCP */ + +#endif /*LWIP_HDR_DHCP_H*/ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp6.h index 455336d..a6a4412 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dhcp6.h @@ -1,58 +1,58 @@ -/** - * @file - * - * IPv6 address autoconfiguration as per RFC 4862. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * IPv6 address autoconfiguration as per RFC 4862. - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#ifndef LWIP_HDR_IP6_DHCP6_H -#define LWIP_HDR_IP6_DHCP6_H - -#include "lwip/opt.h" - -#if LWIP_IPV6_DHCP6 /* don't build if not configured for use in lwipopts.h */ - - -struct dhcp6 -{ - /*@todo: implement DHCP6*/ -}; - -#endif /* LWIP_IPV6_DHCP6 */ - -#endif /* LWIP_HDR_IP6_DHCP6_H */ +/** + * @file + * + * IPv6 address autoconfiguration as per RFC 4862. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * IPv6 address autoconfiguration as per RFC 4862. + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_IP6_DHCP6_H +#define LWIP_HDR_IP6_DHCP6_H + +#include "lwip/opt.h" + +#if LWIP_IPV6_DHCP6 /* don't build if not configured for use in lwipopts.h */ + + +struct dhcp6 +{ + /*@todo: implement DHCP6*/ +}; + +#endif /* LWIP_IPV6_DHCP6 */ + +#endif /* LWIP_HDR_IP6_DHCP6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dns.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dns.h index 1453d72..23fd4f5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dns.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/dns.h @@ -1,130 +1,130 @@ -/** - * @file - * DNS API - */ - -/** - * lwip DNS resolver header file. - - * Author: Jim Pettinato - * April 2007 - - * ported from uIP resolv.c Copyright (c) 2002-2003, Adam Dunkels. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef LWIP_HDR_DNS_H -#define LWIP_HDR_DNS_H - -#include "lwip/opt.h" - -#if LWIP_DNS - -#include "lwip/ip_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** DNS timer period */ -#define DNS_TMR_INTERVAL 1000 - -/* DNS resolve types: */ -#define LWIP_DNS_ADDRTYPE_IPV4 0 -#define LWIP_DNS_ADDRTYPE_IPV6 1 -#define LWIP_DNS_ADDRTYPE_IPV4_IPV6 2 /* try to resolve IPv4 first, try IPv6 if IPv4 fails only */ -#define LWIP_DNS_ADDRTYPE_IPV6_IPV4 3 /* try to resolve IPv6 first, try IPv4 if IPv6 fails only */ -#if LWIP_IPV4 && LWIP_IPV6 -#ifndef LWIP_DNS_ADDRTYPE_DEFAULT -#define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4_IPV6 -#endif -#elif LWIP_IPV4 -#define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4 -#else -#define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV6 -#endif - -#if DNS_LOCAL_HOSTLIST -/** struct used for local host-list */ -struct local_hostlist_entry { - /** static hostname */ - const char *name; - /** static host address in network byteorder */ - ip_addr_t addr; - struct local_hostlist_entry *next; -}; -#define DNS_LOCAL_HOSTLIST_ELEM(name, addr_init) {name, addr_init, NULL} -#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC -#ifndef DNS_LOCAL_HOSTLIST_MAX_NAMELEN -#define DNS_LOCAL_HOSTLIST_MAX_NAMELEN DNS_MAX_NAME_LENGTH -#endif -#define LOCALHOSTLIST_ELEM_SIZE ((sizeof(struct local_hostlist_entry) + DNS_LOCAL_HOSTLIST_MAX_NAMELEN + 1)) -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ -#endif /* DNS_LOCAL_HOSTLIST */ - -#if LWIP_IPV4 -extern const ip_addr_t dns_mquery_v4group; -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 -extern const ip_addr_t dns_mquery_v6group; -#endif /* LWIP_IPV6 */ - -/** Callback which is invoked when a hostname is found. - * A function of this type must be implemented by the application using the DNS resolver. - * @param name pointer to the name that was looked up. - * @param ipaddr pointer to an ip_addr_t containing the IP address of the hostname, - * or NULL if the name could not be found (or on any other error). - * @param callback_arg a user-specified callback argument passed to dns_gethostbyname -*/ -typedef void (*dns_found_callback)(const char *name, const ip_addr_t *ipaddr, void *callback_arg); - -void dns_init(void); -void dns_tmr(void); -void dns_setserver(u8_t numdns, const ip_addr_t *dnsserver); -const ip_addr_t* dns_getserver(u8_t numdns); -err_t dns_gethostbyname(const char *hostname, ip_addr_t *addr, - dns_found_callback found, void *callback_arg); -err_t dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, - dns_found_callback found, void *callback_arg, - u8_t dns_addrtype); - - -#if DNS_LOCAL_HOSTLIST -size_t dns_local_iterate(dns_found_callback iterator_fn, void *iterator_arg); -err_t dns_local_lookup(const char *hostname, ip_addr_t *addr, u8_t dns_addrtype); -#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC -int dns_local_removehost(const char *hostname, const ip_addr_t *addr); -err_t dns_local_addhost(const char *hostname, const ip_addr_t *addr); -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ -#endif /* DNS_LOCAL_HOSTLIST */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_DNS */ - -#endif /* LWIP_HDR_DNS_H */ +/** + * @file + * DNS API + */ + +/** + * lwip DNS resolver header file. + + * Author: Jim Pettinato + * April 2007 + + * ported from uIP resolv.c Copyright (c) 2002-2003, Adam Dunkels. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef LWIP_HDR_DNS_H +#define LWIP_HDR_DNS_H + +#include "lwip/opt.h" + +#if LWIP_DNS + +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** DNS timer period */ +#define DNS_TMR_INTERVAL 1000 + +/* DNS resolve types: */ +#define LWIP_DNS_ADDRTYPE_IPV4 0 +#define LWIP_DNS_ADDRTYPE_IPV6 1 +#define LWIP_DNS_ADDRTYPE_IPV4_IPV6 2 /* try to resolve IPv4 first, try IPv6 if IPv4 fails only */ +#define LWIP_DNS_ADDRTYPE_IPV6_IPV4 3 /* try to resolve IPv6 first, try IPv4 if IPv6 fails only */ +#if LWIP_IPV4 && LWIP_IPV6 +#ifndef LWIP_DNS_ADDRTYPE_DEFAULT +#define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4_IPV6 +#endif +#elif LWIP_IPV4 +#define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4 +#else +#define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV6 +#endif + +#if DNS_LOCAL_HOSTLIST +/** struct used for local host-list */ +struct local_hostlist_entry { + /** static hostname */ + const char *name; + /** static host address in network byteorder */ + ip_addr_t addr; + struct local_hostlist_entry *next; +}; +#define DNS_LOCAL_HOSTLIST_ELEM(name, addr_init) {name, addr_init, NULL} +#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC +#ifndef DNS_LOCAL_HOSTLIST_MAX_NAMELEN +#define DNS_LOCAL_HOSTLIST_MAX_NAMELEN DNS_MAX_NAME_LENGTH +#endif +#define LOCALHOSTLIST_ELEM_SIZE ((sizeof(struct local_hostlist_entry) + DNS_LOCAL_HOSTLIST_MAX_NAMELEN + 1)) +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ +#endif /* DNS_LOCAL_HOSTLIST */ + +#if LWIP_IPV4 +extern const ip_addr_t dns_mquery_v4group; +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 +extern const ip_addr_t dns_mquery_v6group; +#endif /* LWIP_IPV6 */ + +/** Callback which is invoked when a hostname is found. + * A function of this type must be implemented by the application using the DNS resolver. + * @param name pointer to the name that was looked up. + * @param ipaddr pointer to an ip_addr_t containing the IP address of the hostname, + * or NULL if the name could not be found (or on any other error). + * @param callback_arg a user-specified callback argument passed to dns_gethostbyname +*/ +typedef void (*dns_found_callback)(const char *name, const ip_addr_t *ipaddr, void *callback_arg); + +void dns_init(void); +void dns_tmr(void); +void dns_setserver(u8_t numdns, const ip_addr_t *dnsserver); +const ip_addr_t* dns_getserver(u8_t numdns); +err_t dns_gethostbyname(const char *hostname, ip_addr_t *addr, + dns_found_callback found, void *callback_arg); +err_t dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, + dns_found_callback found, void *callback_arg, + u8_t dns_addrtype); + + +#if DNS_LOCAL_HOSTLIST +size_t dns_local_iterate(dns_found_callback iterator_fn, void *iterator_arg); +err_t dns_local_lookup(const char *hostname, ip_addr_t *addr, u8_t dns_addrtype); +#if DNS_LOCAL_HOSTLIST_IS_DYNAMIC +int dns_local_removehost(const char *hostname, const ip_addr_t *addr); +err_t dns_local_addhost(const char *hostname, const ip_addr_t *addr); +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ +#endif /* DNS_LOCAL_HOSTLIST */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_DNS */ + +#endif /* LWIP_HDR_DNS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/err.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/err.h index 84e528d..4b07ac8 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/err.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/err.h @@ -1,119 +1,119 @@ -/** - * @file - * lwIP Error codes - */ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_ERR_H -#define LWIP_HDR_ERR_H - -#include "lwip/opt.h" -#include "lwip/arch.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup infrastructure_errors Error codes - * @ingroup infrastructure - * @{ - */ - -/** Define LWIP_ERR_T in cc.h if you want to use - * a different type for your platform (must be signed). */ -#ifdef LWIP_ERR_T -typedef LWIP_ERR_T err_t; -#else /* LWIP_ERR_T */ -typedef s8_t err_t; -#endif /* LWIP_ERR_T*/ - -/** Definitions for error constants. */ -typedef enum { -/** No error, everything OK. */ - ERR_OK = 0, -/** Out of memory error. */ - ERR_MEM = -1, -/** Buffer error. */ - ERR_BUF = -2, -/** Timeout. */ - ERR_TIMEOUT = -3, -/** Routing problem. */ - ERR_RTE = -4, -/** Operation in progress */ - ERR_INPROGRESS = -5, -/** Illegal value. */ - ERR_VAL = -6, -/** Operation would block. */ - ERR_WOULDBLOCK = -7, -/** Address in use. */ - ERR_USE = -8, -/** Already connecting. */ - ERR_ALREADY = -9, -/** Conn already established.*/ - ERR_ISCONN = -10, -/** Not connected. */ - ERR_CONN = -11, -/** Low-level netif error */ - ERR_IF = -12, - -/** Connection aborted. */ - ERR_ABRT = -13, -/** Connection reset. */ - ERR_RST = -14, -/** Connection closed. */ - ERR_CLSD = -15, -/** Illegal argument. */ - ERR_ARG = -16 -} err_enum_t; - -#define ERR_IS_FATAL(e) ((e) <= ERR_ABRT) - -/** - * @} - */ - -#ifdef LWIP_DEBUG -extern const char *lwip_strerr(err_t err); -#else -#define lwip_strerr(x) "" -#endif /* LWIP_DEBUG */ - -#if !NO_SYS -int err_to_errno(err_t err); -#endif /* !NO_SYS */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_ERR_H */ +/** + * @file + * lwIP Error codes + */ +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_ERR_H +#define LWIP_HDR_ERR_H + +#include "lwip/opt.h" +#include "lwip/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup infrastructure_errors Error codes + * @ingroup infrastructure + * @{ + */ + +/** Define LWIP_ERR_T in cc.h if you want to use + * a different type for your platform (must be signed). */ +#ifdef LWIP_ERR_T +typedef LWIP_ERR_T err_t; +#else /* LWIP_ERR_T */ +typedef s8_t err_t; +#endif /* LWIP_ERR_T*/ + +/** Definitions for error constants. */ +typedef enum { +/** No error, everything OK. */ + ERR_OK = 0, +/** Out of memory error. */ + ERR_MEM = -1, +/** Buffer error. */ + ERR_BUF = -2, +/** Timeout. */ + ERR_TIMEOUT = -3, +/** Routing problem. */ + ERR_RTE = -4, +/** Operation in progress */ + ERR_INPROGRESS = -5, +/** Illegal value. */ + ERR_VAL = -6, +/** Operation would block. */ + ERR_WOULDBLOCK = -7, +/** Address in use. */ + ERR_USE = -8, +/** Already connecting. */ + ERR_ALREADY = -9, +/** Conn already established.*/ + ERR_ISCONN = -10, +/** Not connected. */ + ERR_CONN = -11, +/** Low-level netif error */ + ERR_IF = -12, + +/** Connection aborted. */ + ERR_ABRT = -13, +/** Connection reset. */ + ERR_RST = -14, +/** Connection closed. */ + ERR_CLSD = -15, +/** Illegal argument. */ + ERR_ARG = -16 +} err_enum_t; + +#define ERR_IS_FATAL(e) ((e) <= ERR_ABRT) + +/** + * @} + */ + +#ifdef LWIP_DEBUG +extern const char *lwip_strerr(err_t err); +#else +#define lwip_strerr(x) "" +#endif /* LWIP_DEBUG */ + +#if !NO_SYS +int err_to_errno(err_t err); +#endif /* !NO_SYS */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_ERR_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/errno.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/errno.h index 641cffb..2d326cb 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/errno.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/errno.h @@ -1,193 +1,193 @@ -/** - * @file - * Posix Errno defines - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_ERRNO_H -#define LWIP_HDR_ERRNO_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef LWIP_PROVIDE_ERRNO - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EDEADLK 35 /* Resource deadlock would occur */ -#define ENAMETOOLONG 36 /* File name too long */ -#define ENOLCK 37 /* No record locks available */ -#define ENOSYS 38 /* Function not implemented */ -#define ENOTEMPTY 39 /* Directory not empty */ -#define ELOOP 40 /* Too many symbolic links encountered */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define ENOMSG 42 /* No message of desired type */ -#define EIDRM 43 /* Identifier removed */ -#define ECHRNG 44 /* Channel number out of range */ -#define EL2NSYNC 45 /* Level 2 not synchronized */ -#define EL3HLT 46 /* Level 3 halted */ -#define EL3RST 47 /* Level 3 reset */ -#define ELNRNG 48 /* Link number out of range */ -#define EUNATCH 49 /* Protocol driver not attached */ -#define ENOCSI 50 /* No CSI structure available */ -#define EL2HLT 51 /* Level 2 halted */ -#define EBADE 52 /* Invalid exchange */ -#define EBADR 53 /* Invalid request descriptor */ -#define EXFULL 54 /* Exchange full */ -#define ENOANO 55 /* No anode */ -#define EBADRQC 56 /* Invalid request code */ -#define EBADSLT 57 /* Invalid slot */ - -#define EDEADLOCK EDEADLK - -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EMULTIHOP 72 /* Multihop attempted */ -#define EDOTDOT 73 /* RFS specific error */ -#define EBADMSG 74 /* Not a data message */ -#define EOVERFLOW 75 /* Value too large for defined data type */ -#define ENOTUNIQ 76 /* Name not unique on network */ -#define EBADFD 77 /* File descriptor in bad state */ -#define EREMCHG 78 /* Remote address changed */ -#define ELIBACC 79 /* Can not access a needed shared library */ -#define ELIBBAD 80 /* Accessing a corrupted shared library */ -#define ELIBSCN 81 /* .lib section in a.out corrupted */ -#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define EILSEQ 84 /* Illegal byte sequence */ -#define ERESTART 85 /* Interrupted system call should be restarted */ -#define ESTRPIPE 86 /* Streams pipe error */ -#define EUSERS 87 /* Too many users */ -#define ENOTSOCK 88 /* Socket operation on non-socket */ -#define EDESTADDRREQ 89 /* Destination address required */ -#define EMSGSIZE 90 /* Message too long */ -#define EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 92 /* Protocol not available */ -#define EPROTONOSUPPORT 93 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 96 /* Protocol family not supported */ -#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define EADDRINUSE 98 /* Address already in use */ -#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define ENETDOWN 100 /* Network is down */ -#define ENETUNREACH 101 /* Network is unreachable */ -#define ENETRESET 102 /* Network dropped connection because of reset */ -#define ECONNABORTED 103 /* Software caused connection abort */ -#define ECONNRESET 104 /* Connection reset by peer */ -#define ENOBUFS 105 /* No buffer space available */ -#define EISCONN 106 /* Transport endpoint is already connected */ -#define ENOTCONN 107 /* Transport endpoint is not connected */ -#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define ETIMEDOUT 110 /* Connection timed out */ -#define ECONNREFUSED 111 /* Connection refused */ -#define EHOSTDOWN 112 /* Host is down */ -#define EHOSTUNREACH 113 /* No route to host */ -#define EALREADY 114 /* Operation already in progress */ -#define EINPROGRESS 115 /* Operation now in progress */ -#define ESTALE 116 /* Stale NFS file handle */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EDQUOT 122 /* Quota exceeded */ - -#define ENOMEDIUM 123 /* No medium found */ -#define EMEDIUMTYPE 124 /* Wrong medium type */ - -#ifndef errno -extern int errno; -#endif - -#else /* LWIP_PROVIDE_ERRNO */ - -/* Define LWIP_ERRNO_INCLUDE to to include the error defines here */ -#ifdef LWIP_ERRNO_INCLUDE -#include LWIP_ERRNO_INCLUDE -#endif /* LWIP_ERRNO_INCLUDE */ - -#endif /* LWIP_PROVIDE_ERRNO */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_ERRNO_H */ +/** + * @file + * Posix Errno defines + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_ERRNO_H +#define LWIP_HDR_ERRNO_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LWIP_PROVIDE_ERRNO + +#define EPERM 1 /* Operation not permitted */ +#define ENOENT 2 /* No such file or directory */ +#define ESRCH 3 /* No such process */ +#define EINTR 4 /* Interrupted system call */ +#define EIO 5 /* I/O error */ +#define ENXIO 6 /* No such device or address */ +#define E2BIG 7 /* Arg list too long */ +#define ENOEXEC 8 /* Exec format error */ +#define EBADF 9 /* Bad file number */ +#define ECHILD 10 /* No child processes */ +#define EAGAIN 11 /* Try again */ +#define ENOMEM 12 /* Out of memory */ +#define EACCES 13 /* Permission denied */ +#define EFAULT 14 /* Bad address */ +#define ENOTBLK 15 /* Block device required */ +#define EBUSY 16 /* Device or resource busy */ +#define EEXIST 17 /* File exists */ +#define EXDEV 18 /* Cross-device link */ +#define ENODEV 19 /* No such device */ +#define ENOTDIR 20 /* Not a directory */ +#define EISDIR 21 /* Is a directory */ +#define EINVAL 22 /* Invalid argument */ +#define ENFILE 23 /* File table overflow */ +#define EMFILE 24 /* Too many open files */ +#define ENOTTY 25 /* Not a typewriter */ +#define ETXTBSY 26 /* Text file busy */ +#define EFBIG 27 /* File too large */ +#define ENOSPC 28 /* No space left on device */ +#define ESPIPE 29 /* Illegal seek */ +#define EROFS 30 /* Read-only file system */ +#define EMLINK 31 /* Too many links */ +#define EPIPE 32 /* Broken pipe */ +#define EDOM 33 /* Math argument out of domain of func */ +#define ERANGE 34 /* Math result not representable */ +#define EDEADLK 35 /* Resource deadlock would occur */ +#define ENAMETOOLONG 36 /* File name too long */ +#define ENOLCK 37 /* No record locks available */ +#define ENOSYS 38 /* Function not implemented */ +#define ENOTEMPTY 39 /* Directory not empty */ +#define ELOOP 40 /* Too many symbolic links encountered */ +#define EWOULDBLOCK EAGAIN /* Operation would block */ +#define ENOMSG 42 /* No message of desired type */ +#define EIDRM 43 /* Identifier removed */ +#define ECHRNG 44 /* Channel number out of range */ +#define EL2NSYNC 45 /* Level 2 not synchronized */ +#define EL3HLT 46 /* Level 3 halted */ +#define EL3RST 47 /* Level 3 reset */ +#define ELNRNG 48 /* Link number out of range */ +#define EUNATCH 49 /* Protocol driver not attached */ +#define ENOCSI 50 /* No CSI structure available */ +#define EL2HLT 51 /* Level 2 halted */ +#define EBADE 52 /* Invalid exchange */ +#define EBADR 53 /* Invalid request descriptor */ +#define EXFULL 54 /* Exchange full */ +#define ENOANO 55 /* No anode */ +#define EBADRQC 56 /* Invalid request code */ +#define EBADSLT 57 /* Invalid slot */ + +#define EDEADLOCK EDEADLK + +#define EBFONT 59 /* Bad font file format */ +#define ENOSTR 60 /* Device not a stream */ +#define ENODATA 61 /* No data available */ +#define ETIME 62 /* Timer expired */ +#define ENOSR 63 /* Out of streams resources */ +#define ENONET 64 /* Machine is not on the network */ +#define ENOPKG 65 /* Package not installed */ +#define EREMOTE 66 /* Object is remote */ +#define ENOLINK 67 /* Link has been severed */ +#define EADV 68 /* Advertise error */ +#define ESRMNT 69 /* Srmount error */ +#define ECOMM 70 /* Communication error on send */ +#define EPROTO 71 /* Protocol error */ +#define EMULTIHOP 72 /* Multihop attempted */ +#define EDOTDOT 73 /* RFS specific error */ +#define EBADMSG 74 /* Not a data message */ +#define EOVERFLOW 75 /* Value too large for defined data type */ +#define ENOTUNIQ 76 /* Name not unique on network */ +#define EBADFD 77 /* File descriptor in bad state */ +#define EREMCHG 78 /* Remote address changed */ +#define ELIBACC 79 /* Can not access a needed shared library */ +#define ELIBBAD 80 /* Accessing a corrupted shared library */ +#define ELIBSCN 81 /* .lib section in a.out corrupted */ +#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ +#define ELIBEXEC 83 /* Cannot exec a shared library directly */ +#define EILSEQ 84 /* Illegal byte sequence */ +#define ERESTART 85 /* Interrupted system call should be restarted */ +#define ESTRPIPE 86 /* Streams pipe error */ +#define EUSERS 87 /* Too many users */ +#define ENOTSOCK 88 /* Socket operation on non-socket */ +#define EDESTADDRREQ 89 /* Destination address required */ +#define EMSGSIZE 90 /* Message too long */ +#define EPROTOTYPE 91 /* Protocol wrong type for socket */ +#define ENOPROTOOPT 92 /* Protocol not available */ +#define EPROTONOSUPPORT 93 /* Protocol not supported */ +#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ +#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ +#define EPFNOSUPPORT 96 /* Protocol family not supported */ +#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ +#define EADDRINUSE 98 /* Address already in use */ +#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ +#define ENETDOWN 100 /* Network is down */ +#define ENETUNREACH 101 /* Network is unreachable */ +#define ENETRESET 102 /* Network dropped connection because of reset */ +#define ECONNABORTED 103 /* Software caused connection abort */ +#define ECONNRESET 104 /* Connection reset by peer */ +#define ENOBUFS 105 /* No buffer space available */ +#define EISCONN 106 /* Transport endpoint is already connected */ +#define ENOTCONN 107 /* Transport endpoint is not connected */ +#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ +#define ETOOMANYREFS 109 /* Too many references: cannot splice */ +#define ETIMEDOUT 110 /* Connection timed out */ +#define ECONNREFUSED 111 /* Connection refused */ +#define EHOSTDOWN 112 /* Host is down */ +#define EHOSTUNREACH 113 /* No route to host */ +#define EALREADY 114 /* Operation already in progress */ +#define EINPROGRESS 115 /* Operation now in progress */ +#define ESTALE 116 /* Stale NFS file handle */ +#define EUCLEAN 117 /* Structure needs cleaning */ +#define ENOTNAM 118 /* Not a XENIX named type file */ +#define ENAVAIL 119 /* No XENIX semaphores available */ +#define EISNAM 120 /* Is a named type file */ +#define EREMOTEIO 121 /* Remote I/O error */ +#define EDQUOT 122 /* Quota exceeded */ + +#define ENOMEDIUM 123 /* No medium found */ +#define EMEDIUMTYPE 124 /* Wrong medium type */ + +#ifndef errno +extern int errno; +#endif + +#else /* LWIP_PROVIDE_ERRNO */ + +/* Define LWIP_ERRNO_INCLUDE to to include the error defines here */ +#ifdef LWIP_ERRNO_INCLUDE +#include LWIP_ERRNO_INCLUDE +#endif /* LWIP_ERRNO_INCLUDE */ + +#endif /* LWIP_PROVIDE_ERRNO */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_ERRNO_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/etharp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/etharp.h index 7080a19..be5badf 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/etharp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/etharp.h @@ -1,106 +1,106 @@ -/** - * @file - * Ethernet output function - handles OUTGOING ethernet level traffic, implements - * ARP resolving. - * To be used in most low-level netif implementations - */ - -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * Copyright (c) 2003-2004 Leon Woestenberg - * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#ifndef LWIP_HDR_NETIF_ETHARP_H -#define LWIP_HDR_NETIF_ETHARP_H - -#include "lwip/opt.h" - -#if LWIP_ARP || LWIP_ETHERNET /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/ip4_addr.h" -#include "lwip/netif.h" -#include "lwip/ip4.h" -#include "lwip/prot/ethernet.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/prot/etharp.h" - -/** 1 seconds period */ -#define ARP_TMR_INTERVAL 1000 - -#if ARP_QUEUEING -/** struct for queueing outgoing packets for unknown address - * defined here to be accessed by memp.h - */ -struct etharp_q_entry { - struct etharp_q_entry *next; - struct pbuf *p; -}; -#endif /* ARP_QUEUEING */ - -#define etharp_init() /* Compatibility define, no init needed. */ -void etharp_tmr(void); -s8_t etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, - struct eth_addr **eth_ret, const ip4_addr_t **ip_ret); -u8_t etharp_get_entry(u8_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret); -err_t etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr); -err_t etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q); -err_t etharp_request(struct netif *netif, const ip4_addr_t *ipaddr); -/** For Ethernet network interfaces, we might want to send "gratuitous ARP"; - * this is an ARP packet sent by a node in order to spontaneously cause other - * nodes to update an entry in their ARP cache. - * From RFC 3220 "IP Mobility Support for IPv4" section 4.6. */ -#define etharp_gratuitous(netif) etharp_request((netif), netif_ip4_addr(netif)) -void etharp_cleanup_netif(struct netif *netif); - -#if ETHARP_SUPPORT_STATIC_ENTRIES -err_t etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr); -err_t etharp_remove_static_entry(const ip4_addr_t *ipaddr); -#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ - -#endif /* LWIP_IPV4 && LWIP_ARP */ - -void etharp_input(struct pbuf *p, struct netif *netif); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_ARP || LWIP_ETHERNET */ - -#endif /* LWIP_HDR_NETIF_ETHARP_H */ +/** + * @file + * Ethernet output function - handles OUTGOING ethernet level traffic, implements + * ARP resolving. + * To be used in most low-level netif implementations + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * Copyright (c) 2003-2004 Leon Woestenberg + * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#ifndef LWIP_HDR_NETIF_ETHARP_H +#define LWIP_HDR_NETIF_ETHARP_H + +#include "lwip/opt.h" + +#if LWIP_ARP || LWIP_ETHERNET /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/ip4_addr.h" +#include "lwip/netif.h" +#include "lwip/ip4.h" +#include "lwip/prot/ethernet.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_IPV4 && LWIP_ARP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/prot/etharp.h" + +/** 1 seconds period */ +#define ARP_TMR_INTERVAL 1000 + +#if ARP_QUEUEING +/** struct for queueing outgoing packets for unknown address + * defined here to be accessed by memp.h + */ +struct etharp_q_entry { + struct etharp_q_entry *next; + struct pbuf *p; +}; +#endif /* ARP_QUEUEING */ + +#define etharp_init() /* Compatibility define, no init needed. */ +void etharp_tmr(void); +s8_t etharp_find_addr(struct netif *netif, const ip4_addr_t *ipaddr, + struct eth_addr **eth_ret, const ip4_addr_t **ip_ret); +u8_t etharp_get_entry(u8_t i, ip4_addr_t **ipaddr, struct netif **netif, struct eth_addr **eth_ret); +err_t etharp_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr); +err_t etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q); +err_t etharp_request(struct netif *netif, const ip4_addr_t *ipaddr); +/** For Ethernet network interfaces, we might want to send "gratuitous ARP"; + * this is an ARP packet sent by a node in order to spontaneously cause other + * nodes to update an entry in their ARP cache. + * From RFC 3220 "IP Mobility Support for IPv4" section 4.6. */ +#define etharp_gratuitous(netif) etharp_request((netif), netif_ip4_addr(netif)) +void etharp_cleanup_netif(struct netif *netif); + +#if ETHARP_SUPPORT_STATIC_ENTRIES +err_t etharp_add_static_entry(const ip4_addr_t *ipaddr, struct eth_addr *ethaddr); +err_t etharp_remove_static_entry(const ip4_addr_t *ipaddr); +#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ + +#endif /* LWIP_IPV4 && LWIP_ARP */ + +void etharp_input(struct pbuf *p, struct netif *netif); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_ARP || LWIP_ETHERNET */ + +#endif /* LWIP_HDR_NETIF_ETHARP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ethip6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ethip6.h index 5e88dff..f393c9c 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ethip6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ethip6.h @@ -1,68 +1,68 @@ -/** - * @file - * - * Ethernet output for IPv6. Uses ND tables for link-layer addressing. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#ifndef LWIP_HDR_ETHIP6_H -#define LWIP_HDR_ETHIP6_H - -#include "lwip/opt.h" - -#if LWIP_IPV6 && LWIP_ETHERNET /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/netif.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -err_t ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV6 && LWIP_ETHERNET */ - -#endif /* LWIP_HDR_ETHIP6_H */ +/** + * @file + * + * Ethernet output for IPv6. Uses ND tables for link-layer addressing. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_ETHIP6_H +#define LWIP_HDR_ETHIP6_H + +#include "lwip/opt.h" + +#if LWIP_IPV6 && LWIP_ETHERNET /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/netif.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + +err_t ethip6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 && LWIP_ETHERNET */ + +#endif /* LWIP_HDR_ETHIP6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp.h index f5a31fd..d0d67b6 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp.h @@ -1,110 +1,110 @@ -/** - * @file - * ICMP API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_ICMP_H -#define LWIP_HDR_ICMP_H - -#include "lwip/opt.h" -#include "lwip/pbuf.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/prot/icmp.h" - -#if LWIP_IPV6 && LWIP_ICMP6 -#include "lwip/icmp6.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** ICMP destination unreachable codes */ -enum icmp_dur_type { - /** net unreachable */ - ICMP_DUR_NET = 0, - /** host unreachable */ - ICMP_DUR_HOST = 1, - /** protocol unreachable */ - ICMP_DUR_PROTO = 2, - /** port unreachable */ - ICMP_DUR_PORT = 3, - /** fragmentation needed and DF set */ - ICMP_DUR_FRAG = 4, - /** source route failed */ - ICMP_DUR_SR = 5 -}; - -/** ICMP time exceeded codes */ -enum icmp_te_type { - /** time to live exceeded in transit */ - ICMP_TE_TTL = 0, - /** fragment reassembly time exceeded */ - ICMP_TE_FRAG = 1 -}; - -#if LWIP_IPV4 && LWIP_ICMP /* don't build if not configured for use in lwipopts.h */ - -void icmp_input(struct pbuf *p, struct netif *inp); -void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t); -void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t); - -#endif /* LWIP_IPV4 && LWIP_ICMP */ - -#if LWIP_IPV4 && LWIP_IPV6 -#if LWIP_ICMP && LWIP_ICMP6 -#define icmp_port_unreach(isipv6, pbuf) ((isipv6) ? \ - icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT) : \ - icmp_dest_unreach(pbuf, ICMP_DUR_PORT)) -#elif LWIP_ICMP -#define icmp_port_unreach(isipv6, pbuf) do{ if(!(isipv6)) { icmp_dest_unreach(pbuf, ICMP_DUR_PORT);}}while(0) -#elif LWIP_ICMP6 -#define icmp_port_unreach(isipv6, pbuf) do{ if(isipv6) { icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT);}}while(0) -#else -#define icmp_port_unreach(isipv6, pbuf) -#endif -#elif LWIP_IPV6 && LWIP_ICMP6 -#define icmp_port_unreach(isipv6, pbuf) icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT) -#elif LWIP_IPV4 && LWIP_ICMP -#define icmp_port_unreach(isipv6, pbuf) icmp_dest_unreach(pbuf, ICMP_DUR_PORT) -#else /* (LWIP_IPV6 && LWIP_ICMP6) || (LWIP_IPV4 && LWIP_ICMP) */ -#define icmp_port_unreach(isipv6, pbuf) -#endif /* (LWIP_IPV6 && LWIP_ICMP6) || (LWIP_IPV4 && LWIP_ICMP) LWIP_IPV4*/ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_ICMP_H */ +/** + * @file + * ICMP API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_ICMP_H +#define LWIP_HDR_ICMP_H + +#include "lwip/opt.h" +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/prot/icmp.h" + +#if LWIP_IPV6 && LWIP_ICMP6 +#include "lwip/icmp6.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** ICMP destination unreachable codes */ +enum icmp_dur_type { + /** net unreachable */ + ICMP_DUR_NET = 0, + /** host unreachable */ + ICMP_DUR_HOST = 1, + /** protocol unreachable */ + ICMP_DUR_PROTO = 2, + /** port unreachable */ + ICMP_DUR_PORT = 3, + /** fragmentation needed and DF set */ + ICMP_DUR_FRAG = 4, + /** source route failed */ + ICMP_DUR_SR = 5 +}; + +/** ICMP time exceeded codes */ +enum icmp_te_type { + /** time to live exceeded in transit */ + ICMP_TE_TTL = 0, + /** fragment reassembly time exceeded */ + ICMP_TE_FRAG = 1 +}; + +#if LWIP_IPV4 && LWIP_ICMP /* don't build if not configured for use in lwipopts.h */ + +void icmp_input(struct pbuf *p, struct netif *inp); +void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t); +void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t); + +#endif /* LWIP_IPV4 && LWIP_ICMP */ + +#if LWIP_IPV4 && LWIP_IPV6 +#if LWIP_ICMP && LWIP_ICMP6 +#define icmp_port_unreach(isipv6, pbuf) ((isipv6) ? \ + icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT) : \ + icmp_dest_unreach(pbuf, ICMP_DUR_PORT)) +#elif LWIP_ICMP +#define icmp_port_unreach(isipv6, pbuf) do{ if(!(isipv6)) { icmp_dest_unreach(pbuf, ICMP_DUR_PORT);}}while(0) +#elif LWIP_ICMP6 +#define icmp_port_unreach(isipv6, pbuf) do{ if(isipv6) { icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT);}}while(0) +#else +#define icmp_port_unreach(isipv6, pbuf) +#endif +#elif LWIP_IPV6 && LWIP_ICMP6 +#define icmp_port_unreach(isipv6, pbuf) icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT) +#elif LWIP_IPV4 && LWIP_ICMP +#define icmp_port_unreach(isipv6, pbuf) icmp_dest_unreach(pbuf, ICMP_DUR_PORT) +#else /* (LWIP_IPV6 && LWIP_ICMP6) || (LWIP_IPV4 && LWIP_ICMP) */ +#define icmp_port_unreach(isipv6, pbuf) +#endif /* (LWIP_IPV6 && LWIP_ICMP6) || (LWIP_IPV4 && LWIP_ICMP) LWIP_IPV4*/ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_ICMP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp6.h index a29dc8c..a5f812f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/icmp6.h @@ -1,70 +1,70 @@ -/** - * @file - * - * IPv6 version of ICMP, as per RFC 4443. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ -#ifndef LWIP_HDR_ICMP6_H -#define LWIP_HDR_ICMP6_H - -#include "lwip/opt.h" -#include "lwip/pbuf.h" -#include "lwip/ip6_addr.h" -#include "lwip/netif.h" -#include "lwip/prot/icmp6.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_ICMP6 && LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -void icmp6_input(struct pbuf *p, struct netif *inp); -void icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c); -void icmp6_packet_too_big(struct pbuf *p, u32_t mtu); -void icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c); -void icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, u32_t pointer); - -#endif /* LWIP_ICMP6 && LWIP_IPV6 */ - - -#ifdef __cplusplus -} -#endif - - -#endif /* LWIP_HDR_ICMP6_H */ +/** + * @file + * + * IPv6 version of ICMP, as per RFC 4443. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ +#ifndef LWIP_HDR_ICMP6_H +#define LWIP_HDR_ICMP6_H + +#include "lwip/opt.h" +#include "lwip/pbuf.h" +#include "lwip/ip6_addr.h" +#include "lwip/netif.h" +#include "lwip/prot/icmp6.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_ICMP6 && LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +void icmp6_input(struct pbuf *p, struct netif *inp); +void icmp6_dest_unreach(struct pbuf *p, enum icmp6_dur_code c); +void icmp6_packet_too_big(struct pbuf *p, u32_t mtu); +void icmp6_time_exceeded(struct pbuf *p, enum icmp6_te_code c); +void icmp6_param_problem(struct pbuf *p, enum icmp6_pp_code c, u32_t pointer); + +#endif /* LWIP_ICMP6 && LWIP_IPV6 */ + + +#ifdef __cplusplus +} +#endif + + +#endif /* LWIP_HDR_ICMP6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/igmp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/igmp.h index ffd80e6..ca52a2d 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/igmp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/igmp.h @@ -1,115 +1,115 @@ -/** - * @file - * IGMP API - */ - -/* - * Copyright (c) 2002 CITEL Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is a contribution to the lwIP TCP/IP stack. - * The Swedish Institute of Computer Science and Adam Dunkels - * are specifically granted permission to redistribute this - * source code. -*/ - -#ifndef LWIP_HDR_IGMP_H -#define LWIP_HDR_IGMP_H - -#include "lwip/opt.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/pbuf.h" - -#if LWIP_IPV4 && LWIP_IGMP /* don't build if not configured for use in lwipopts.h */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* IGMP timer */ -#define IGMP_TMR_INTERVAL 100 /* Milliseconds */ -#define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL) -#define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL) - -/* Compatibility defines (don't use for new code) */ -#define IGMP_DEL_MAC_FILTER NETIF_DEL_MAC_FILTER -#define IGMP_ADD_MAC_FILTER NETIF_ADD_MAC_FILTER - -/** - * igmp group structure - there is - * a list of groups for each interface - * these should really be linked from the interface, but - * if we keep them separate we will not affect the lwip original code - * too much - * - * There will be a group for the all systems group address but this - * will not run the state machine as it is used to kick off reports - * from all the other groups - */ -struct igmp_group { - /** next link */ - struct igmp_group *next; - /** multicast address */ - ip4_addr_t group_address; - /** signifies we were the last person to report */ - u8_t last_reporter_flag; - /** current state of the group */ - u8_t group_state; - /** timer for reporting, negative is OFF */ - u16_t timer; - /** counter of simultaneous uses */ - u8_t use; -}; - -/* Prototypes */ -void igmp_init(void); -err_t igmp_start(struct netif *netif); -err_t igmp_stop(struct netif *netif); -void igmp_report_groups(struct netif *netif); -struct igmp_group *igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr); -void igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest); -err_t igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr); -err_t igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr); -err_t igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr); -err_t igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr); -void igmp_tmr(void); - -/** @ingroup igmp - * Get list head of IGMP groups for netif. - * Note: The allsystems group IP is contained in the list as first entry. - * @see @ref netif_set_igmp_mac_filter() - */ -#define netif_igmp_data(netif) ((struct igmp_group *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_IGMP)) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV4 && LWIP_IGMP */ - -#endif /* LWIP_HDR_IGMP_H */ +/** + * @file + * IGMP API + */ + +/* + * Copyright (c) 2002 CITEL Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is a contribution to the lwIP TCP/IP stack. + * The Swedish Institute of Computer Science and Adam Dunkels + * are specifically granted permission to redistribute this + * source code. +*/ + +#ifndef LWIP_HDR_IGMP_H +#define LWIP_HDR_IGMP_H + +#include "lwip/opt.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/pbuf.h" + +#if LWIP_IPV4 && LWIP_IGMP /* don't build if not configured for use in lwipopts.h */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* IGMP timer */ +#define IGMP_TMR_INTERVAL 100 /* Milliseconds */ +#define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL) +#define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL) + +/* Compatibility defines (don't use for new code) */ +#define IGMP_DEL_MAC_FILTER NETIF_DEL_MAC_FILTER +#define IGMP_ADD_MAC_FILTER NETIF_ADD_MAC_FILTER + +/** + * igmp group structure - there is + * a list of groups for each interface + * these should really be linked from the interface, but + * if we keep them separate we will not affect the lwip original code + * too much + * + * There will be a group for the all systems group address but this + * will not run the state machine as it is used to kick off reports + * from all the other groups + */ +struct igmp_group { + /** next link */ + struct igmp_group *next; + /** multicast address */ + ip4_addr_t group_address; + /** signifies we were the last person to report */ + u8_t last_reporter_flag; + /** current state of the group */ + u8_t group_state; + /** timer for reporting, negative is OFF */ + u16_t timer; + /** counter of simultaneous uses */ + u8_t use; +}; + +/* Prototypes */ +void igmp_init(void); +err_t igmp_start(struct netif *netif); +err_t igmp_stop(struct netif *netif); +void igmp_report_groups(struct netif *netif); +struct igmp_group *igmp_lookfor_group(struct netif *ifp, const ip4_addr_t *addr); +void igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest); +err_t igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr); +err_t igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr); +err_t igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr); +err_t igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr); +void igmp_tmr(void); + +/** @ingroup igmp + * Get list head of IGMP groups for netif. + * Note: The allsystems group IP is contained in the list as first entry. + * @see @ref netif_set_igmp_mac_filter() + */ +#define netif_igmp_data(netif) ((struct igmp_group *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_IGMP)) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV4 && LWIP_IGMP */ + +#endif /* LWIP_HDR_IGMP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet.h index 4a34f02..8d306fc 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet.h @@ -1,172 +1,172 @@ -/** - * @file - * This file (together with sockets.h) aims to provide structs and functions from - * - arpa/inet.h - * - netinet/in.h - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_INET_H -#define LWIP_HDR_INET_H - -#include "lwip/opt.h" -#include "lwip/def.h" -#include "lwip/ip_addr.h" -#include "lwip/ip6_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* If your port already typedef's in_addr_t, define IN_ADDR_T_DEFINED - to prevent this code from redefining it. */ -#if !defined(in_addr_t) && !defined(IN_ADDR_T_DEFINED) -typedef u32_t in_addr_t; -#endif - -struct in_addr { - in_addr_t s_addr; -}; - -struct in6_addr { - union { - u32_t u32_addr[4]; - u8_t u8_addr[16]; - } un; -#define s6_addr un.u8_addr -}; - -/** 255.255.255.255 */ -#define INADDR_NONE IPADDR_NONE -/** 127.0.0.1 */ -#define INADDR_LOOPBACK IPADDR_LOOPBACK -/** 0.0.0.0 */ -#define INADDR_ANY IPADDR_ANY -/** 255.255.255.255 */ -#define INADDR_BROADCAST IPADDR_BROADCAST - -/** This macro can be used to initialize a variable of type struct in6_addr - to the IPv6 wildcard address. */ -#define IN6ADDR_ANY_INIT {{{0,0,0,0}}} -/** This macro can be used to initialize a variable of type struct in6_addr - to the IPv6 loopback address. */ -#define IN6ADDR_LOOPBACK_INIT {{{0,0,0,PP_HTONL(1)}}} -/** This variable is initialized by the system to contain the wildcard IPv6 address. */ -extern const struct in6_addr in6addr_any; - -/* Definitions of the bits in an (IPv4) Internet address integer. - - On subnets, host and network parts are found according to - the subnet mask, not these masks. */ -#define IN_CLASSA(a) IP_CLASSA(a) -#define IN_CLASSA_NET IP_CLASSA_NET -#define IN_CLASSA_NSHIFT IP_CLASSA_NSHIFT -#define IN_CLASSA_HOST IP_CLASSA_HOST -#define IN_CLASSA_MAX IP_CLASSA_MAX - -#define IN_CLASSB(b) IP_CLASSB(b) -#define IN_CLASSB_NET IP_CLASSB_NET -#define IN_CLASSB_NSHIFT IP_CLASSB_NSHIFT -#define IN_CLASSB_HOST IP_CLASSB_HOST -#define IN_CLASSB_MAX IP_CLASSB_MAX - -#define IN_CLASSC(c) IP_CLASSC(c) -#define IN_CLASSC_NET IP_CLASSC_NET -#define IN_CLASSC_NSHIFT IP_CLASSC_NSHIFT -#define IN_CLASSC_HOST IP_CLASSC_HOST -#define IN_CLASSC_MAX IP_CLASSC_MAX - -#define IN_CLASSD(d) IP_CLASSD(d) -#define IN_CLASSD_NET IP_CLASSD_NET /* These ones aren't really */ -#define IN_CLASSD_NSHIFT IP_CLASSD_NSHIFT /* net and host fields, but */ -#define IN_CLASSD_HOST IP_CLASSD_HOST /* routing needn't know. */ -#define IN_CLASSD_MAX IP_CLASSD_MAX - -#define IN_MULTICAST(a) IP_MULTICAST(a) - -#define IN_EXPERIMENTAL(a) IP_EXPERIMENTAL(a) -#define IN_BADCLASS(a) IP_BADCLASS(a) - -#define IN_LOOPBACKNET IP_LOOPBACKNET - - -#ifndef INET_ADDRSTRLEN -#define INET_ADDRSTRLEN IP4ADDR_STRLEN_MAX -#endif -#if LWIP_IPV6 -#ifndef INET6_ADDRSTRLEN -#define INET6_ADDRSTRLEN IP6ADDR_STRLEN_MAX -#endif -#endif - -#if LWIP_IPV4 - -#define inet_addr_from_ip4addr(target_inaddr, source_ipaddr) ((target_inaddr)->s_addr = ip4_addr_get_u32(source_ipaddr)) -#define inet_addr_to_ip4addr(target_ipaddr, source_inaddr) (ip4_addr_set_u32(target_ipaddr, (source_inaddr)->s_addr)) -/* ATTENTION: the next define only works because both s_addr and ip4_addr_t are an u32_t effectively! */ -#define inet_addr_to_ip4addr_p(target_ip4addr_p, source_inaddr) ((target_ip4addr_p) = (ip4_addr_t*)&((source_inaddr)->s_addr)) - -/* directly map this to the lwip internal functions */ -#define inet_addr(cp) ipaddr_addr(cp) -#define inet_aton(cp, addr) ip4addr_aton(cp, (ip4_addr_t*)addr) -#define inet_ntoa(addr) ip4addr_ntoa((const ip4_addr_t*)&(addr)) -#define inet_ntoa_r(addr, buf, buflen) ip4addr_ntoa_r((const ip4_addr_t*)&(addr), buf, buflen) - -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -#define inet6_addr_from_ip6addr(target_in6addr, source_ip6addr) {(target_in6addr)->un.u32_addr[0] = (source_ip6addr)->addr[0]; \ - (target_in6addr)->un.u32_addr[1] = (source_ip6addr)->addr[1]; \ - (target_in6addr)->un.u32_addr[2] = (source_ip6addr)->addr[2]; \ - (target_in6addr)->un.u32_addr[3] = (source_ip6addr)->addr[3];} -#define inet6_addr_to_ip6addr(target_ip6addr, source_in6addr) {(target_ip6addr)->addr[0] = (source_in6addr)->un.u32_addr[0]; \ - (target_ip6addr)->addr[1] = (source_in6addr)->un.u32_addr[1]; \ - (target_ip6addr)->addr[2] = (source_in6addr)->un.u32_addr[2]; \ - (target_ip6addr)->addr[3] = (source_in6addr)->un.u32_addr[3];} -/* ATTENTION: the next define only works because both in6_addr and ip6_addr_t are an u32_t[4] effectively! */ -#define inet6_addr_to_ip6addr_p(target_ip6addr_p, source_in6addr) ((target_ip6addr_p) = (ip6_addr_t*)(source_in6addr)) - -/* directly map this to the lwip internal functions */ -#define inet6_aton(cp, addr) ip6addr_aton(cp, (ip6_addr_t*)addr) -#define inet6_ntoa(addr) ip6addr_ntoa((const ip6_addr_t*)&(addr)) -#define inet6_ntoa_r(addr, buf, buflen) ip6addr_ntoa_r((const ip6_addr_t*)&(addr), buf, buflen) - -#endif /* LWIP_IPV6 */ - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_INET_H */ +/** + * @file + * This file (together with sockets.h) aims to provide structs and functions from + * - arpa/inet.h + * - netinet/in.h + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_INET_H +#define LWIP_HDR_INET_H + +#include "lwip/opt.h" +#include "lwip/def.h" +#include "lwip/ip_addr.h" +#include "lwip/ip6_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* If your port already typedef's in_addr_t, define IN_ADDR_T_DEFINED + to prevent this code from redefining it. */ +#if !defined(in_addr_t) && !defined(IN_ADDR_T_DEFINED) +typedef u32_t in_addr_t; +#endif + +struct in_addr { + in_addr_t s_addr; +}; + +struct in6_addr { + union { + u32_t u32_addr[4]; + u8_t u8_addr[16]; + } un; +#define s6_addr un.u8_addr +}; + +/** 255.255.255.255 */ +#define INADDR_NONE IPADDR_NONE +/** 127.0.0.1 */ +#define INADDR_LOOPBACK IPADDR_LOOPBACK +/** 0.0.0.0 */ +#define INADDR_ANY IPADDR_ANY +/** 255.255.255.255 */ +#define INADDR_BROADCAST IPADDR_BROADCAST + +/** This macro can be used to initialize a variable of type struct in6_addr + to the IPv6 wildcard address. */ +#define IN6ADDR_ANY_INIT {{{0,0,0,0}}} +/** This macro can be used to initialize a variable of type struct in6_addr + to the IPv6 loopback address. */ +#define IN6ADDR_LOOPBACK_INIT {{{0,0,0,PP_HTONL(1)}}} +/** This variable is initialized by the system to contain the wildcard IPv6 address. */ +extern const struct in6_addr in6addr_any; + +/* Definitions of the bits in an (IPv4) Internet address integer. + + On subnets, host and network parts are found according to + the subnet mask, not these masks. */ +#define IN_CLASSA(a) IP_CLASSA(a) +#define IN_CLASSA_NET IP_CLASSA_NET +#define IN_CLASSA_NSHIFT IP_CLASSA_NSHIFT +#define IN_CLASSA_HOST IP_CLASSA_HOST +#define IN_CLASSA_MAX IP_CLASSA_MAX + +#define IN_CLASSB(b) IP_CLASSB(b) +#define IN_CLASSB_NET IP_CLASSB_NET +#define IN_CLASSB_NSHIFT IP_CLASSB_NSHIFT +#define IN_CLASSB_HOST IP_CLASSB_HOST +#define IN_CLASSB_MAX IP_CLASSB_MAX + +#define IN_CLASSC(c) IP_CLASSC(c) +#define IN_CLASSC_NET IP_CLASSC_NET +#define IN_CLASSC_NSHIFT IP_CLASSC_NSHIFT +#define IN_CLASSC_HOST IP_CLASSC_HOST +#define IN_CLASSC_MAX IP_CLASSC_MAX + +#define IN_CLASSD(d) IP_CLASSD(d) +#define IN_CLASSD_NET IP_CLASSD_NET /* These ones aren't really */ +#define IN_CLASSD_NSHIFT IP_CLASSD_NSHIFT /* net and host fields, but */ +#define IN_CLASSD_HOST IP_CLASSD_HOST /* routing needn't know. */ +#define IN_CLASSD_MAX IP_CLASSD_MAX + +#define IN_MULTICAST(a) IP_MULTICAST(a) + +#define IN_EXPERIMENTAL(a) IP_EXPERIMENTAL(a) +#define IN_BADCLASS(a) IP_BADCLASS(a) + +#define IN_LOOPBACKNET IP_LOOPBACKNET + + +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN IP4ADDR_STRLEN_MAX +#endif +#if LWIP_IPV6 +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN IP6ADDR_STRLEN_MAX +#endif +#endif + +#if LWIP_IPV4 + +#define inet_addr_from_ip4addr(target_inaddr, source_ipaddr) ((target_inaddr)->s_addr = ip4_addr_get_u32(source_ipaddr)) +#define inet_addr_to_ip4addr(target_ipaddr, source_inaddr) (ip4_addr_set_u32(target_ipaddr, (source_inaddr)->s_addr)) +/* ATTENTION: the next define only works because both s_addr and ip4_addr_t are an u32_t effectively! */ +#define inet_addr_to_ip4addr_p(target_ip4addr_p, source_inaddr) ((target_ip4addr_p) = (ip4_addr_t*)&((source_inaddr)->s_addr)) + +/* directly map this to the lwip internal functions */ +#define inet_addr(cp) ipaddr_addr(cp) +#define inet_aton(cp, addr) ip4addr_aton(cp, (ip4_addr_t*)addr) +#define inet_ntoa(addr) ip4addr_ntoa((const ip4_addr_t*)&(addr)) +#define inet_ntoa_r(addr, buf, buflen) ip4addr_ntoa_r((const ip4_addr_t*)&(addr), buf, buflen) + +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +#define inet6_addr_from_ip6addr(target_in6addr, source_ip6addr) {(target_in6addr)->un.u32_addr[0] = (source_ip6addr)->addr[0]; \ + (target_in6addr)->un.u32_addr[1] = (source_ip6addr)->addr[1]; \ + (target_in6addr)->un.u32_addr[2] = (source_ip6addr)->addr[2]; \ + (target_in6addr)->un.u32_addr[3] = (source_ip6addr)->addr[3];} +#define inet6_addr_to_ip6addr(target_ip6addr, source_in6addr) {(target_ip6addr)->addr[0] = (source_in6addr)->un.u32_addr[0]; \ + (target_ip6addr)->addr[1] = (source_in6addr)->un.u32_addr[1]; \ + (target_ip6addr)->addr[2] = (source_in6addr)->un.u32_addr[2]; \ + (target_ip6addr)->addr[3] = (source_in6addr)->un.u32_addr[3];} +/* ATTENTION: the next define only works because both in6_addr and ip6_addr_t are an u32_t[4] effectively! */ +#define inet6_addr_to_ip6addr_p(target_ip6addr_p, source_in6addr) ((target_ip6addr_p) = (ip6_addr_t*)(source_in6addr)) + +/* directly map this to the lwip internal functions */ +#define inet6_aton(cp, addr) ip6addr_aton(cp, (ip6_addr_t*)addr) +#define inet6_ntoa(addr) ip6addr_ntoa((const ip6_addr_t*)&(addr)) +#define inet6_ntoa_r(addr, buf, buflen) ip6addr_ntoa_r((const ip6_addr_t*)&(addr), buf, buflen) + +#endif /* LWIP_IPV6 */ + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_INET_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet_chksum.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet_chksum.h index 4e23d7f..799cab5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet_chksum.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/inet_chksum.h @@ -1,105 +1,105 @@ -/** - * @file - * IP checksum calculation functions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_INET_CHKSUM_H -#define LWIP_HDR_INET_CHKSUM_H - -#include "lwip/opt.h" - -#include "lwip/pbuf.h" -#include "lwip/ip_addr.h" - -/** Swap the bytes in an u16_t: much like lwip_htons() for little-endian */ -#ifndef SWAP_BYTES_IN_WORD -#define SWAP_BYTES_IN_WORD(w) (((w) & 0xff) << 8) | (((w) & 0xff00) >> 8) -#endif /* SWAP_BYTES_IN_WORD */ - -/** Split an u32_t in two u16_ts and add them up */ -#ifndef FOLD_U32T -#define FOLD_U32T(u) (((u) >> 16) + ((u) & 0x0000ffffUL)) -#endif - -#if LWIP_CHECKSUM_ON_COPY -/** Function-like macro: same as MEMCPY but returns the checksum of copied data - as u16_t */ -# ifndef LWIP_CHKSUM_COPY -# define LWIP_CHKSUM_COPY(dst, src, len) lwip_chksum_copy(dst, src, len) -# ifndef LWIP_CHKSUM_COPY_ALGORITHM -# define LWIP_CHKSUM_COPY_ALGORITHM 1 -# endif /* LWIP_CHKSUM_COPY_ALGORITHM */ -# else /* LWIP_CHKSUM_COPY */ -# define LWIP_CHKSUM_COPY_ALGORITHM 0 -# endif /* LWIP_CHKSUM_COPY */ -#else /* LWIP_CHECKSUM_ON_COPY */ -# define LWIP_CHKSUM_COPY_ALGORITHM 0 -#endif /* LWIP_CHECKSUM_ON_COPY */ - -#ifdef __cplusplus -extern "C" { -#endif - -u16_t inet_chksum(const void *dataptr, u16_t len); -u16_t inet_chksum_pbuf(struct pbuf *p); -#if LWIP_CHKSUM_COPY_ALGORITHM -u16_t lwip_chksum_copy(void *dst, const void *src, u16_t len); -#endif /* LWIP_CHKSUM_COPY_ALGORITHM */ - -#if LWIP_IPV4 -u16_t inet_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip4_addr_t *src, const ip4_addr_t *dest); -u16_t inet_chksum_pseudo_partial(struct pbuf *p, u8_t proto, - u16_t proto_len, u16_t chksum_len, const ip4_addr_t *src, const ip4_addr_t *dest); -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -u16_t ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip6_addr_t *src, const ip6_addr_t *dest); -u16_t ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest); -#endif /* LWIP_IPV6 */ - - -u16_t ip_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, - const ip_addr_t *src, const ip_addr_t *dest); -u16_t ip_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, - u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_INET_H */ - +/** + * @file + * IP checksum calculation functions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_INET_CHKSUM_H +#define LWIP_HDR_INET_CHKSUM_H + +#include "lwip/opt.h" + +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" + +/** Swap the bytes in an u16_t: much like lwip_htons() for little-endian */ +#ifndef SWAP_BYTES_IN_WORD +#define SWAP_BYTES_IN_WORD(w) (((w) & 0xff) << 8) | (((w) & 0xff00) >> 8) +#endif /* SWAP_BYTES_IN_WORD */ + +/** Split an u32_t in two u16_ts and add them up */ +#ifndef FOLD_U32T +#define FOLD_U32T(u) (((u) >> 16) + ((u) & 0x0000ffffUL)) +#endif + +#if LWIP_CHECKSUM_ON_COPY +/** Function-like macro: same as MEMCPY but returns the checksum of copied data + as u16_t */ +# ifndef LWIP_CHKSUM_COPY +# define LWIP_CHKSUM_COPY(dst, src, len) lwip_chksum_copy(dst, src, len) +# ifndef LWIP_CHKSUM_COPY_ALGORITHM +# define LWIP_CHKSUM_COPY_ALGORITHM 1 +# endif /* LWIP_CHKSUM_COPY_ALGORITHM */ +# else /* LWIP_CHKSUM_COPY */ +# define LWIP_CHKSUM_COPY_ALGORITHM 0 +# endif /* LWIP_CHKSUM_COPY */ +#else /* LWIP_CHECKSUM_ON_COPY */ +# define LWIP_CHKSUM_COPY_ALGORITHM 0 +#endif /* LWIP_CHECKSUM_ON_COPY */ + +#ifdef __cplusplus +extern "C" { +#endif + +u16_t inet_chksum(const void *dataptr, u16_t len); +u16_t inet_chksum_pbuf(struct pbuf *p); +#if LWIP_CHKSUM_COPY_ALGORITHM +u16_t lwip_chksum_copy(void *dst, const void *src, u16_t len); +#endif /* LWIP_CHKSUM_COPY_ALGORITHM */ + +#if LWIP_IPV4 +u16_t inet_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, + const ip4_addr_t *src, const ip4_addr_t *dest); +u16_t inet_chksum_pseudo_partial(struct pbuf *p, u8_t proto, + u16_t proto_len, u16_t chksum_len, const ip4_addr_t *src, const ip4_addr_t *dest); +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +u16_t ip6_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, + const ip6_addr_t *src, const ip6_addr_t *dest); +u16_t ip6_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, + u16_t chksum_len, const ip6_addr_t *src, const ip6_addr_t *dest); +#endif /* LWIP_IPV6 */ + + +u16_t ip_chksum_pseudo(struct pbuf *p, u8_t proto, u16_t proto_len, + const ip_addr_t *src, const ip_addr_t *dest); +u16_t ip_chksum_pseudo_partial(struct pbuf *p, u8_t proto, u16_t proto_len, + u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_INET_H */ + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/init.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/init.h index 3c234cb..721bb57 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/init.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/init.h @@ -1,100 +1,100 @@ -/** - * @file - * lwIP initialization API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_INIT_H -#define LWIP_HDR_INIT_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup lwip_version Version - * @ingroup lwip - * @{ - */ - -/** X.x.x: Major version of the stack */ -#define LWIP_VERSION_MAJOR 2 -/** x.X.x: Minor version of the stack */ -#define LWIP_VERSION_MINOR 0 -/** x.x.X: Revision of the stack */ -#define LWIP_VERSION_REVISION 3 -/** For release candidates, this is set to 1..254 - * For official releases, this is set to 255 (LWIP_RC_RELEASE) - * For development versions (Git), this is set to 0 (LWIP_RC_DEVELOPMENT) */ -#define LWIP_VERSION_RC LWIP_RC_RELEASE - -/** LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */ -#define LWIP_RC_RELEASE 255 -/** LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */ -#define LWIP_RC_DEVELOPMENT 0 - -#define LWIP_VERSION_IS_RELEASE (LWIP_VERSION_RC == LWIP_RC_RELEASE) -#define LWIP_VERSION_IS_DEVELOPMENT (LWIP_VERSION_RC == LWIP_RC_DEVELOPMENT) -#define LWIP_VERSION_IS_RC ((LWIP_VERSION_RC != LWIP_RC_RELEASE) && (LWIP_VERSION_RC != LWIP_RC_DEVELOPMENT)) - -/* Some helper defines to get a version string */ -#define LWIP_VERSTR2(x) #x -#define LWIP_VERSTR(x) LWIP_VERSTR2(x) -#if LWIP_VERSION_IS_RELEASE -#define LWIP_VERSION_STRING_SUFFIX "" -#elif LWIP_VERSION_IS_DEVELOPMENT -#define LWIP_VERSION_STRING_SUFFIX "d" -#else -#define LWIP_VERSION_STRING_SUFFIX "rc" LWIP_VERSTR(LWIP_VERSION_RC) -#endif - -/** Provides the version of the stack */ -#define LWIP_VERSION (((u32_t)LWIP_VERSION_MAJOR) << 24 | ((u32_t)LWIP_VERSION_MINOR) << 16 | \ - ((u32_t)LWIP_VERSION_REVISION) << 8 | ((u32_t)LWIP_VERSION_RC)) -/** Provides the version of the stack as string */ -#define LWIP_VERSION_STRING LWIP_VERSTR(LWIP_VERSION_MAJOR) "." LWIP_VERSTR(LWIP_VERSION_MINOR) "." LWIP_VERSTR(LWIP_VERSION_REVISION) LWIP_VERSION_STRING_SUFFIX - -/** - * @} - */ - -/* Modules initialization */ -void lwip_init(void); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_INIT_H */ +/** + * @file + * lwIP initialization API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_INIT_H +#define LWIP_HDR_INIT_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup lwip_version Version + * @ingroup lwip + * @{ + */ + +/** X.x.x: Major version of the stack */ +#define LWIP_VERSION_MAJOR 2 +/** x.X.x: Minor version of the stack */ +#define LWIP_VERSION_MINOR 0 +/** x.x.X: Revision of the stack */ +#define LWIP_VERSION_REVISION 3 +/** For release candidates, this is set to 1..254 + * For official releases, this is set to 255 (LWIP_RC_RELEASE) + * For development versions (Git), this is set to 0 (LWIP_RC_DEVELOPMENT) */ +#define LWIP_VERSION_RC LWIP_RC_RELEASE + +/** LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */ +#define LWIP_RC_RELEASE 255 +/** LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */ +#define LWIP_RC_DEVELOPMENT 0 + +#define LWIP_VERSION_IS_RELEASE (LWIP_VERSION_RC == LWIP_RC_RELEASE) +#define LWIP_VERSION_IS_DEVELOPMENT (LWIP_VERSION_RC == LWIP_RC_DEVELOPMENT) +#define LWIP_VERSION_IS_RC ((LWIP_VERSION_RC != LWIP_RC_RELEASE) && (LWIP_VERSION_RC != LWIP_RC_DEVELOPMENT)) + +/* Some helper defines to get a version string */ +#define LWIP_VERSTR2(x) #x +#define LWIP_VERSTR(x) LWIP_VERSTR2(x) +#if LWIP_VERSION_IS_RELEASE +#define LWIP_VERSION_STRING_SUFFIX "" +#elif LWIP_VERSION_IS_DEVELOPMENT +#define LWIP_VERSION_STRING_SUFFIX "d" +#else +#define LWIP_VERSION_STRING_SUFFIX "rc" LWIP_VERSTR(LWIP_VERSION_RC) +#endif + +/** Provides the version of the stack */ +#define LWIP_VERSION (((u32_t)LWIP_VERSION_MAJOR) << 24 | ((u32_t)LWIP_VERSION_MINOR) << 16 | \ + ((u32_t)LWIP_VERSION_REVISION) << 8 | ((u32_t)LWIP_VERSION_RC)) +/** Provides the version of the stack as string */ +#define LWIP_VERSION_STRING LWIP_VERSTR(LWIP_VERSION_MAJOR) "." LWIP_VERSTR(LWIP_VERSION_MINOR) "." LWIP_VERSTR(LWIP_VERSION_REVISION) LWIP_VERSION_STRING_SUFFIX + +/** + * @} + */ + +/* Modules initialization */ +void lwip_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_INIT_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip.h index 0673be9..356dd74 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip.h @@ -1,319 +1,319 @@ -/** - * @file - * IP API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_IP_H -#define LWIP_HDR_IP_H - -#include "lwip/opt.h" - -#include "lwip/def.h" -#include "lwip/pbuf.h" -#include "lwip/ip_addr.h" -#include "lwip/err.h" -#include "lwip/netif.h" -#include "lwip/ip4.h" -#include "lwip/ip6.h" -#include "lwip/prot/ip.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* This is passed as the destination address to ip_output_if (not - to ip_output), meaning that an IP header already is constructed - in the pbuf. This is used when TCP retransmits. */ -#define LWIP_IP_HDRINCL NULL - -/** pbufs passed to IP must have a ref-count of 1 as their payload pointer - gets altered as the packet is passed down the stack */ -#ifndef LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX -#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p) LWIP_ASSERT("p->ref == 1", (p)->ref == 1) -#endif - -#if LWIP_NETIF_HWADDRHINT -#define IP_PCB_ADDRHINT ;u8_t addr_hint -#else -#define IP_PCB_ADDRHINT -#endif /* LWIP_NETIF_HWADDRHINT */ - -/** This is the common part of all PCB types. It needs to be at the - beginning of a PCB type definition. It is located here so that - changes to this common part are made in one location instead of - having to change all PCB structs. */ -#define IP_PCB \ - /* ip addresses in network byte order */ \ - ip_addr_t local_ip; \ - ip_addr_t remote_ip; \ - /* Socket options */ \ - u8_t so_options; \ - /* Type Of Service */ \ - u8_t tos; \ - /* Time To Live */ \ - u8_t ttl \ - /* link layer address resolution hint */ \ - IP_PCB_ADDRHINT - -struct ip_pcb { -/* Common members of all PCB types */ - IP_PCB; -}; - -/* - * Option flags per-socket. These are the same like SO_XXX in sockets.h - */ -#define SOF_REUSEADDR 0x04U /* allow local address reuse */ -#define SOF_KEEPALIVE 0x08U /* keep connections alive */ -#define SOF_BROADCAST 0x20U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */ - -/* These flags are inherited (e.g. from a listen-pcb to a connection-pcb): */ -#define SOF_INHERITED (SOF_REUSEADDR|SOF_KEEPALIVE) - -/** Global variables of this module, kept in a struct for efficient access using base+index. */ -struct ip_globals -{ - /** The interface that accepted the packet for the current callback invocation. */ - struct netif *current_netif; - /** The interface that received the packet for the current callback invocation. */ - struct netif *current_input_netif; -#if LWIP_IPV4 - /** Header of the input packet currently being processed. */ - struct ip_hdr *current_ip4_header; -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 - /** Header of the input IPv6 packet currently being processed. */ - struct ip6_hdr *current_ip6_header; -#endif /* LWIP_IPV6 */ - /** Total header length of current_ip4/6_header (i.e. after this, the UDP/TCP header starts) */ - u16_t current_ip_header_tot_len; - /** Source IP address of current_header */ - ip_addr_t current_iphdr_src; - /** Destination IP address of current_header */ - ip_addr_t current_iphdr_dest; -}; -extern struct ip_globals ip_data; - - -/** Get the interface that accepted the current packet. - * This may or may not be the receiving netif, depending on your netif/network setup. - * This function must only be called from a receive callback (udp_recv, - * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip_current_netif() (ip_data.current_netif) -/** Get the interface that received the current packet. - * This function must only be called from a receive callback (udp_recv, - * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip_current_input_netif() (ip_data.current_input_netif) -/** Total header length of ip(6)_current_header() (i.e. after this, the UDP/TCP header starts) */ -#define ip_current_header_tot_len() (ip_data.current_ip_header_tot_len) -/** Source IP address of current_header */ -#define ip_current_src_addr() (&ip_data.current_iphdr_src) -/** Destination IP address of current_header */ -#define ip_current_dest_addr() (&ip_data.current_iphdr_dest) - -#if LWIP_IPV4 && LWIP_IPV6 -/** Get the IPv4 header of the current packet. - * This function must only be called from a receive callback (udp_recv, - * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip4_current_header() ((const struct ip_hdr*)(ip_data.current_ip4_header)) -/** Get the IPv6 header of the current packet. - * This function must only be called from a receive callback (udp_recv, - * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip6_current_header() ((const struct ip6_hdr*)(ip_data.current_ip6_header)) -/** Returns TRUE if the current IP input packet is IPv6, FALSE if it is IPv4 */ -#define ip_current_is_v6() (ip6_current_header() != NULL) -/** Source IPv6 address of current_header */ -#define ip6_current_src_addr() (ip_2_ip6(&ip_data.current_iphdr_src)) -/** Destination IPv6 address of current_header */ -#define ip6_current_dest_addr() (ip_2_ip6(&ip_data.current_iphdr_dest)) -/** Get the transport layer protocol */ -#define ip_current_header_proto() (ip_current_is_v6() ? \ - IP6H_NEXTH(ip6_current_header()) :\ - IPH_PROTO(ip4_current_header())) -/** Get the transport layer header */ -#define ip_next_header_ptr() ((const void*)((ip_current_is_v6() ? \ - (const u8_t*)ip6_current_header() : (const u8_t*)ip4_current_header()) + ip_current_header_tot_len())) - -/** Source IP4 address of current_header */ -#define ip4_current_src_addr() (ip_2_ip4(&ip_data.current_iphdr_src)) -/** Destination IP4 address of current_header */ -#define ip4_current_dest_addr() (ip_2_ip4(&ip_data.current_iphdr_dest)) - -#elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ - -/** Get the IPv4 header of the current packet. - * This function must only be called from a receive callback (udp_recv, - * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip4_current_header() ((const struct ip_hdr*)(ip_data.current_ip4_header)) -/** Always returns FALSE when only supporting IPv4 only */ -#define ip_current_is_v6() 0 -/** Get the transport layer protocol */ -#define ip_current_header_proto() IPH_PROTO(ip4_current_header()) -/** Get the transport layer header */ -#define ip_next_header_ptr() ((const void*)((const u8_t*)ip4_current_header() + ip_current_header_tot_len())) -/** Source IP4 address of current_header */ -#define ip4_current_src_addr() (&ip_data.current_iphdr_src) -/** Destination IP4 address of current_header */ -#define ip4_current_dest_addr() (&ip_data.current_iphdr_dest) - -#elif LWIP_IPV6 /* LWIP_IPV4 && LWIP_IPV6 */ - -/** Get the IPv6 header of the current packet. - * This function must only be called from a receive callback (udp_recv, - * raw_recv, tcp_accept). It will return NULL otherwise. */ -#define ip6_current_header() ((const struct ip6_hdr*)(ip_data.current_ip6_header)) -/** Always returns TRUE when only supporting IPv6 only */ -#define ip_current_is_v6() 1 -/** Get the transport layer protocol */ -#define ip_current_header_proto() IP6H_NEXTH(ip6_current_header()) -/** Get the transport layer header */ -#define ip_next_header_ptr() ((const void*)((const u8_t*)ip6_current_header())) -/** Source IP6 address of current_header */ -#define ip6_current_src_addr() (&ip_data.current_iphdr_src) -/** Destination IP6 address of current_header */ -#define ip6_current_dest_addr() (&ip_data.current_iphdr_dest) - -#endif /* LWIP_IPV6 */ - -/** Union source address of current_header */ -#define ip_current_src_addr() (&ip_data.current_iphdr_src) -/** Union destination address of current_header */ -#define ip_current_dest_addr() (&ip_data.current_iphdr_dest) - -/** Gets an IP pcb option (SOF_* flags) */ -#define ip_get_option(pcb, opt) ((pcb)->so_options & (opt)) -/** Sets an IP pcb option (SOF_* flags) */ -#define ip_set_option(pcb, opt) ((pcb)->so_options |= (opt)) -/** Resets an IP pcb option (SOF_* flags) */ -#define ip_reset_option(pcb, opt) ((pcb)->so_options &= ~(opt)) - -#if LWIP_IPV4 && LWIP_IPV6 -/** - * @ingroup ip - * Output IP packet, netif is selected by source address - */ -#define ip_output(p, src, dest, ttl, tos, proto) \ - (IP_IS_V6(dest) ? \ - ip6_output(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto) : \ - ip4_output(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto)) -/** - * @ingroup ip - * Output IP packet to specified interface - */ -#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ - (IP_IS_V6(dest) ? \ - ip6_output_if(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \ - ip4_output_if(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif)) -/** - * @ingroup ip - * Output IP packet to interface specifying source address - */ -#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ - (IP_IS_V6(dest) ? \ - ip6_output_if_src(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \ - ip4_output_if_src(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif)) -/** Output IP packet with addr_hint */ -#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ - (IP_IS_V6(dest) ? \ - ip6_output_hinted(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, addr_hint) : \ - ip4_output_hinted(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, addr_hint)) -/** - * @ingroup ip - * Get netif for address combination. See \ref ip6_route and \ref ip4_route - */ -#define ip_route(src, dest) \ - (IP_IS_V6(dest) ? \ - ip6_route(ip_2_ip6(src), ip_2_ip6(dest)) : \ - ip4_route_src(ip_2_ip4(dest), ip_2_ip4(src))) -/** - * @ingroup ip - * Get netif for IP. - */ -#define ip_netif_get_local_ip(netif, dest) (IP_IS_V6(dest) ? \ - ip6_netif_get_local_ip(netif, ip_2_ip6(dest)) : \ - ip4_netif_get_local_ip(netif)) -#define ip_debug_print(is_ipv6, p) ((is_ipv6) ? ip6_debug_print(p) : ip4_debug_print(p)) - -err_t ip_input(struct pbuf *p, struct netif *inp); - -#elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ - -#define ip_output(p, src, dest, ttl, tos, proto) \ - ip4_output(p, src, dest, ttl, tos, proto) -#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ - ip4_output_if(p, src, dest, ttl, tos, proto, netif) -#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ - ip4_output_if_src(p, src, dest, ttl, tos, proto, netif) -#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ - ip4_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) -#define ip_route(src, dest) \ - ip4_route_src(dest, src) -#define ip_netif_get_local_ip(netif, dest) \ - ip4_netif_get_local_ip(netif) -#define ip_debug_print(is_ipv6, p) ip4_debug_print(p) - -#define ip_input ip4_input - -#elif LWIP_IPV6 /* LWIP_IPV4 && LWIP_IPV6 */ - -#define ip_output(p, src, dest, ttl, tos, proto) \ - ip6_output(p, src, dest, ttl, tos, proto) -#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ - ip6_output_if(p, src, dest, ttl, tos, proto, netif) -#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ - ip6_output_if_src(p, src, dest, ttl, tos, proto, netif) -#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ - ip6_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) -#define ip_route(src, dest) \ - ip6_route(src, dest) -#define ip_netif_get_local_ip(netif, dest) \ - ip6_netif_get_local_ip(netif, dest) -#define ip_debug_print(is_ipv6, p) ip6_debug_print(p) - -#define ip_input ip6_input - -#endif /* LWIP_IPV6 */ - -#define ip_route_get_local_ip(src, dest, netif, ipaddr) do { \ - (netif) = ip_route(src, dest); \ - (ipaddr) = ip_netif_get_local_ip(netif, dest); \ -}while(0) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_IP_H */ - - +/** + * @file + * IP API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_IP_H +#define LWIP_HDR_IP_H + +#include "lwip/opt.h" + +#include "lwip/def.h" +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" +#include "lwip/err.h" +#include "lwip/netif.h" +#include "lwip/ip4.h" +#include "lwip/ip6.h" +#include "lwip/prot/ip.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* This is passed as the destination address to ip_output_if (not + to ip_output), meaning that an IP header already is constructed + in the pbuf. This is used when TCP retransmits. */ +#define LWIP_IP_HDRINCL NULL + +/** pbufs passed to IP must have a ref-count of 1 as their payload pointer + gets altered as the packet is passed down the stack */ +#ifndef LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX +#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p) LWIP_ASSERT("p->ref == 1", (p)->ref == 1) +#endif + +#if LWIP_NETIF_HWADDRHINT +#define IP_PCB_ADDRHINT ;u8_t addr_hint +#else +#define IP_PCB_ADDRHINT +#endif /* LWIP_NETIF_HWADDRHINT */ + +/** This is the common part of all PCB types. It needs to be at the + beginning of a PCB type definition. It is located here so that + changes to this common part are made in one location instead of + having to change all PCB structs. */ +#define IP_PCB \ + /* ip addresses in network byte order */ \ + ip_addr_t local_ip; \ + ip_addr_t remote_ip; \ + /* Socket options */ \ + u8_t so_options; \ + /* Type Of Service */ \ + u8_t tos; \ + /* Time To Live */ \ + u8_t ttl \ + /* link layer address resolution hint */ \ + IP_PCB_ADDRHINT + +struct ip_pcb { +/* Common members of all PCB types */ + IP_PCB; +}; + +/* + * Option flags per-socket. These are the same like SO_XXX in sockets.h + */ +#define SOF_REUSEADDR 0x04U /* allow local address reuse */ +#define SOF_KEEPALIVE 0x08U /* keep connections alive */ +#define SOF_BROADCAST 0x20U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */ + +/* These flags are inherited (e.g. from a listen-pcb to a connection-pcb): */ +#define SOF_INHERITED (SOF_REUSEADDR|SOF_KEEPALIVE) + +/** Global variables of this module, kept in a struct for efficient access using base+index. */ +struct ip_globals +{ + /** The interface that accepted the packet for the current callback invocation. */ + struct netif *current_netif; + /** The interface that received the packet for the current callback invocation. */ + struct netif *current_input_netif; +#if LWIP_IPV4 + /** Header of the input packet currently being processed. */ + struct ip_hdr *current_ip4_header; +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 + /** Header of the input IPv6 packet currently being processed. */ + struct ip6_hdr *current_ip6_header; +#endif /* LWIP_IPV6 */ + /** Total header length of current_ip4/6_header (i.e. after this, the UDP/TCP header starts) */ + u16_t current_ip_header_tot_len; + /** Source IP address of current_header */ + ip_addr_t current_iphdr_src; + /** Destination IP address of current_header */ + ip_addr_t current_iphdr_dest; +}; +extern struct ip_globals ip_data; + + +/** Get the interface that accepted the current packet. + * This may or may not be the receiving netif, depending on your netif/network setup. + * This function must only be called from a receive callback (udp_recv, + * raw_recv, tcp_accept). It will return NULL otherwise. */ +#define ip_current_netif() (ip_data.current_netif) +/** Get the interface that received the current packet. + * This function must only be called from a receive callback (udp_recv, + * raw_recv, tcp_accept). It will return NULL otherwise. */ +#define ip_current_input_netif() (ip_data.current_input_netif) +/** Total header length of ip(6)_current_header() (i.e. after this, the UDP/TCP header starts) */ +#define ip_current_header_tot_len() (ip_data.current_ip_header_tot_len) +/** Source IP address of current_header */ +#define ip_current_src_addr() (&ip_data.current_iphdr_src) +/** Destination IP address of current_header */ +#define ip_current_dest_addr() (&ip_data.current_iphdr_dest) + +#if LWIP_IPV4 && LWIP_IPV6 +/** Get the IPv4 header of the current packet. + * This function must only be called from a receive callback (udp_recv, + * raw_recv, tcp_accept). It will return NULL otherwise. */ +#define ip4_current_header() ((const struct ip_hdr*)(ip_data.current_ip4_header)) +/** Get the IPv6 header of the current packet. + * This function must only be called from a receive callback (udp_recv, + * raw_recv, tcp_accept). It will return NULL otherwise. */ +#define ip6_current_header() ((const struct ip6_hdr*)(ip_data.current_ip6_header)) +/** Returns TRUE if the current IP input packet is IPv6, FALSE if it is IPv4 */ +#define ip_current_is_v6() (ip6_current_header() != NULL) +/** Source IPv6 address of current_header */ +#define ip6_current_src_addr() (ip_2_ip6(&ip_data.current_iphdr_src)) +/** Destination IPv6 address of current_header */ +#define ip6_current_dest_addr() (ip_2_ip6(&ip_data.current_iphdr_dest)) +/** Get the transport layer protocol */ +#define ip_current_header_proto() (ip_current_is_v6() ? \ + IP6H_NEXTH(ip6_current_header()) :\ + IPH_PROTO(ip4_current_header())) +/** Get the transport layer header */ +#define ip_next_header_ptr() ((const void*)((ip_current_is_v6() ? \ + (const u8_t*)ip6_current_header() : (const u8_t*)ip4_current_header()) + ip_current_header_tot_len())) + +/** Source IP4 address of current_header */ +#define ip4_current_src_addr() (ip_2_ip4(&ip_data.current_iphdr_src)) +/** Destination IP4 address of current_header */ +#define ip4_current_dest_addr() (ip_2_ip4(&ip_data.current_iphdr_dest)) + +#elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ + +/** Get the IPv4 header of the current packet. + * This function must only be called from a receive callback (udp_recv, + * raw_recv, tcp_accept). It will return NULL otherwise. */ +#define ip4_current_header() ((const struct ip_hdr*)(ip_data.current_ip4_header)) +/** Always returns FALSE when only supporting IPv4 only */ +#define ip_current_is_v6() 0 +/** Get the transport layer protocol */ +#define ip_current_header_proto() IPH_PROTO(ip4_current_header()) +/** Get the transport layer header */ +#define ip_next_header_ptr() ((const void*)((const u8_t*)ip4_current_header() + ip_current_header_tot_len())) +/** Source IP4 address of current_header */ +#define ip4_current_src_addr() (&ip_data.current_iphdr_src) +/** Destination IP4 address of current_header */ +#define ip4_current_dest_addr() (&ip_data.current_iphdr_dest) + +#elif LWIP_IPV6 /* LWIP_IPV4 && LWIP_IPV6 */ + +/** Get the IPv6 header of the current packet. + * This function must only be called from a receive callback (udp_recv, + * raw_recv, tcp_accept). It will return NULL otherwise. */ +#define ip6_current_header() ((const struct ip6_hdr*)(ip_data.current_ip6_header)) +/** Always returns TRUE when only supporting IPv6 only */ +#define ip_current_is_v6() 1 +/** Get the transport layer protocol */ +#define ip_current_header_proto() IP6H_NEXTH(ip6_current_header()) +/** Get the transport layer header */ +#define ip_next_header_ptr() ((const void*)((const u8_t*)ip6_current_header())) +/** Source IP6 address of current_header */ +#define ip6_current_src_addr() (&ip_data.current_iphdr_src) +/** Destination IP6 address of current_header */ +#define ip6_current_dest_addr() (&ip_data.current_iphdr_dest) + +#endif /* LWIP_IPV6 */ + +/** Union source address of current_header */ +#define ip_current_src_addr() (&ip_data.current_iphdr_src) +/** Union destination address of current_header */ +#define ip_current_dest_addr() (&ip_data.current_iphdr_dest) + +/** Gets an IP pcb option (SOF_* flags) */ +#define ip_get_option(pcb, opt) ((pcb)->so_options & (opt)) +/** Sets an IP pcb option (SOF_* flags) */ +#define ip_set_option(pcb, opt) ((pcb)->so_options |= (opt)) +/** Resets an IP pcb option (SOF_* flags) */ +#define ip_reset_option(pcb, opt) ((pcb)->so_options &= ~(opt)) + +#if LWIP_IPV4 && LWIP_IPV6 +/** + * @ingroup ip + * Output IP packet, netif is selected by source address + */ +#define ip_output(p, src, dest, ttl, tos, proto) \ + (IP_IS_V6(dest) ? \ + ip6_output(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto) : \ + ip4_output(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto)) +/** + * @ingroup ip + * Output IP packet to specified interface + */ +#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ + (IP_IS_V6(dest) ? \ + ip6_output_if(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \ + ip4_output_if(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif)) +/** + * @ingroup ip + * Output IP packet to interface specifying source address + */ +#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ + (IP_IS_V6(dest) ? \ + ip6_output_if_src(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \ + ip4_output_if_src(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif)) +/** Output IP packet with addr_hint */ +#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ + (IP_IS_V6(dest) ? \ + ip6_output_hinted(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, addr_hint) : \ + ip4_output_hinted(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, addr_hint)) +/** + * @ingroup ip + * Get netif for address combination. See \ref ip6_route and \ref ip4_route + */ +#define ip_route(src, dest) \ + (IP_IS_V6(dest) ? \ + ip6_route(ip_2_ip6(src), ip_2_ip6(dest)) : \ + ip4_route_src(ip_2_ip4(dest), ip_2_ip4(src))) +/** + * @ingroup ip + * Get netif for IP. + */ +#define ip_netif_get_local_ip(netif, dest) (IP_IS_V6(dest) ? \ + ip6_netif_get_local_ip(netif, ip_2_ip6(dest)) : \ + ip4_netif_get_local_ip(netif)) +#define ip_debug_print(is_ipv6, p) ((is_ipv6) ? ip6_debug_print(p) : ip4_debug_print(p)) + +err_t ip_input(struct pbuf *p, struct netif *inp); + +#elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ + +#define ip_output(p, src, dest, ttl, tos, proto) \ + ip4_output(p, src, dest, ttl, tos, proto) +#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ + ip4_output_if(p, src, dest, ttl, tos, proto, netif) +#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ + ip4_output_if_src(p, src, dest, ttl, tos, proto, netif) +#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ + ip4_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) +#define ip_route(src, dest) \ + ip4_route_src(dest, src) +#define ip_netif_get_local_ip(netif, dest) \ + ip4_netif_get_local_ip(netif) +#define ip_debug_print(is_ipv6, p) ip4_debug_print(p) + +#define ip_input ip4_input + +#elif LWIP_IPV6 /* LWIP_IPV4 && LWIP_IPV6 */ + +#define ip_output(p, src, dest, ttl, tos, proto) \ + ip6_output(p, src, dest, ttl, tos, proto) +#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ + ip6_output_if(p, src, dest, ttl, tos, proto, netif) +#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ + ip6_output_if_src(p, src, dest, ttl, tos, proto, netif) +#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ + ip6_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) +#define ip_route(src, dest) \ + ip6_route(src, dest) +#define ip_netif_get_local_ip(netif, dest) \ + ip6_netif_get_local_ip(netif, dest) +#define ip_debug_print(is_ipv6, p) ip6_debug_print(p) + +#define ip_input ip6_input + +#endif /* LWIP_IPV6 */ + +#define ip_route_get_local_ip(src, dest, netif, ipaddr) do { \ + (netif) = ip_route(src, dest); \ + (ipaddr) = ip_netif_get_local_ip(netif, dest); \ +}while(0) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_IP_H */ + + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4.h index 48246ec..e8ac2bc 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4.h @@ -1,111 +1,111 @@ -/** - * @file - * IPv4 API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_IP4_H -#define LWIP_HDR_IP4_H - -#include "lwip/opt.h" - -#if LWIP_IPV4 - -#include "lwip/def.h" -#include "lwip/pbuf.h" -#include "lwip/ip4_addr.h" -#include "lwip/err.h" -#include "lwip/netif.h" -#include "lwip/prot/ip4.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef LWIP_HOOK_IP4_ROUTE_SRC -#define LWIP_IPV4_SRC_ROUTING 1 -#else -#define LWIP_IPV4_SRC_ROUTING 0 -#endif - -/** Currently, the function ip_output_if_opt() is only used with IGMP */ -#define IP_OPTIONS_SEND (LWIP_IPV4 && LWIP_IGMP) - -#define ip_init() /* Compatibility define, no init needed. */ -struct netif *ip4_route(const ip4_addr_t *dest); -#if LWIP_IPV4_SRC_ROUTING -struct netif *ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src); -#else /* LWIP_IPV4_SRC_ROUTING */ -#define ip4_route_src(dest, src) ip4_route(dest) -#endif /* LWIP_IPV4_SRC_ROUTING */ -err_t ip4_input(struct pbuf *p, struct netif *inp); -err_t ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto); -err_t ip4_output_if(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); -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); -#if LWIP_NETIF_HWADDRHINT -err_t ip4_output_hinted(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, - u8_t ttl, u8_t tos, u8_t proto, u8_t *addr_hint); -#endif /* LWIP_NETIF_HWADDRHINT */ -#if IP_OPTIONS_SEND -err_t ip4_output_if_opt(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, void *ip_options, - u16_t optlen); -err_t ip4_output_if_opt_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, void *ip_options, - u16_t optlen); -#endif /* IP_OPTIONS_SEND */ - -#if LWIP_MULTICAST_TX_OPTIONS -void ip4_set_default_multicast_netif(struct netif* default_multicast_netif); -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - -#define ip4_netif_get_local_ip(netif) (((netif) != NULL) ? netif_ip_addr4(netif) : NULL) - -#if IP_DEBUG -void ip4_debug_print(struct pbuf *p); -#else -#define ip4_debug_print(p) -#endif /* IP_DEBUG */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV4 */ - -#endif /* LWIP_HDR_IP_H */ - - +/** + * @file + * IPv4 API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_IP4_H +#define LWIP_HDR_IP4_H + +#include "lwip/opt.h" + +#if LWIP_IPV4 + +#include "lwip/def.h" +#include "lwip/pbuf.h" +#include "lwip/ip4_addr.h" +#include "lwip/err.h" +#include "lwip/netif.h" +#include "lwip/prot/ip4.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LWIP_HOOK_IP4_ROUTE_SRC +#define LWIP_IPV4_SRC_ROUTING 1 +#else +#define LWIP_IPV4_SRC_ROUTING 0 +#endif + +/** Currently, the function ip_output_if_opt() is only used with IGMP */ +#define IP_OPTIONS_SEND (LWIP_IPV4 && LWIP_IGMP) + +#define ip_init() /* Compatibility define, no init needed. */ +struct netif *ip4_route(const ip4_addr_t *dest); +#if LWIP_IPV4_SRC_ROUTING +struct netif *ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src); +#else /* LWIP_IPV4_SRC_ROUTING */ +#define ip4_route_src(dest, src) ip4_route(dest) +#endif /* LWIP_IPV4_SRC_ROUTING */ +err_t ip4_input(struct pbuf *p, struct netif *inp); +err_t ip4_output(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, + u8_t ttl, u8_t tos, u8_t proto); +err_t ip4_output_if(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); +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); +#if LWIP_NETIF_HWADDRHINT +err_t ip4_output_hinted(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, + u8_t ttl, u8_t tos, u8_t proto, u8_t *addr_hint); +#endif /* LWIP_NETIF_HWADDRHINT */ +#if IP_OPTIONS_SEND +err_t ip4_output_if_opt(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, void *ip_options, + u16_t optlen); +err_t ip4_output_if_opt_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, void *ip_options, + u16_t optlen); +#endif /* IP_OPTIONS_SEND */ + +#if LWIP_MULTICAST_TX_OPTIONS +void ip4_set_default_multicast_netif(struct netif* default_multicast_netif); +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + +#define ip4_netif_get_local_ip(netif) (((netif) != NULL) ? netif_ip_addr4(netif) : NULL) + +#if IP_DEBUG +void ip4_debug_print(struct pbuf *p); +#else +#define ip4_debug_print(p) +#endif /* IP_DEBUG */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV4 */ + +#endif /* LWIP_HDR_IP_H */ + + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_addr.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_addr.h index 51b46b8..106a261 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_addr.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_addr.h @@ -1,227 +1,227 @@ -/** - * @file - * IPv4 address API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_IP4_ADDR_H -#define LWIP_HDR_IP4_ADDR_H - -#include "lwip/opt.h" -#include "lwip/def.h" - -#if LWIP_IPV4 - -#ifdef __cplusplus -extern "C" { -#endif - -/** This is the aligned version of ip4_addr_t, - used as local variable, on the stack, etc. */ -struct ip4_addr { - u32_t addr; -}; - -/** ip4_addr_t uses a struct for convenience only, so that the same defines can - * operate both on ip4_addr_t as well as on ip4_addr_p_t. */ -typedef struct ip4_addr ip4_addr_t; - -/** - * struct ipaddr2 is used in the definition of the ARP packet format in - * order to support compilers that don't have structure packing. - */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip4_addr2 { - PACK_STRUCT_FIELD(u16_t addrw[2]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* Forward declaration to not include netif.h */ -struct netif; - -/** 255.255.255.255 */ -#define IPADDR_NONE ((u32_t)0xffffffffUL) -/** 127.0.0.1 */ -#define IPADDR_LOOPBACK ((u32_t)0x7f000001UL) -/** 0.0.0.0 */ -#define IPADDR_ANY ((u32_t)0x00000000UL) -/** 255.255.255.255 */ -#define IPADDR_BROADCAST ((u32_t)0xffffffffUL) - -/* Definitions of the bits in an Internet address integer. - - On subnets, host and network parts are found according to - the subnet mask, not these masks. */ -#define IP_CLASSA(a) ((((u32_t)(a)) & 0x80000000UL) == 0) -#define IP_CLASSA_NET 0xff000000 -#define IP_CLASSA_NSHIFT 24 -#define IP_CLASSA_HOST (0xffffffff & ~IP_CLASSA_NET) -#define IP_CLASSA_MAX 128 - -#define IP_CLASSB(a) ((((u32_t)(a)) & 0xc0000000UL) == 0x80000000UL) -#define IP_CLASSB_NET 0xffff0000 -#define IP_CLASSB_NSHIFT 16 -#define IP_CLASSB_HOST (0xffffffff & ~IP_CLASSB_NET) -#define IP_CLASSB_MAX 65536 - -#define IP_CLASSC(a) ((((u32_t)(a)) & 0xe0000000UL) == 0xc0000000UL) -#define IP_CLASSC_NET 0xffffff00 -#define IP_CLASSC_NSHIFT 8 -#define IP_CLASSC_HOST (0xffffffff & ~IP_CLASSC_NET) - -#define IP_CLASSD(a) (((u32_t)(a) & 0xf0000000UL) == 0xe0000000UL) -#define IP_CLASSD_NET 0xf0000000 /* These ones aren't really */ -#define IP_CLASSD_NSHIFT 28 /* net and host fields, but */ -#define IP_CLASSD_HOST 0x0fffffff /* routing needn't know. */ -#define IP_MULTICAST(a) IP_CLASSD(a) - -#define IP_EXPERIMENTAL(a) (((u32_t)(a) & 0xf0000000UL) == 0xf0000000UL) -#define IP_BADCLASS(a) (((u32_t)(a) & 0xf0000000UL) == 0xf0000000UL) - -#define IP_LOOPBACKNET 127 /* official! */ - -/** Set an IP address given by the four byte-parts */ -#define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = PP_HTONL(LWIP_MAKEU32(a,b,c,d)) - -/** MEMCPY-like copying of IP addresses where addresses are known to be - * 16-bit-aligned if the port is correctly configured (so a port could define - * this to copying 2 u16_t's) - no NULL-pointer-checking needed. */ -#ifndef IPADDR2_COPY -#define IPADDR2_COPY(dest, src) SMEMCPY(dest, src, sizeof(ip4_addr_t)) -#endif - -/** Copy IP address - faster than ip4_addr_set: no NULL check */ -#define ip4_addr_copy(dest, src) ((dest).addr = (src).addr) -/** Safely copy one IP address to another (src may be NULL) */ -#define ip4_addr_set(dest, src) ((dest)->addr = \ - ((src) == NULL ? 0 : \ - (src)->addr)) -/** Set complete address to zero */ -#define ip4_addr_set_zero(ipaddr) ((ipaddr)->addr = 0) -/** Set address to IPADDR_ANY (no need for lwip_htonl()) */ -#define ip4_addr_set_any(ipaddr) ((ipaddr)->addr = IPADDR_ANY) -/** Set address to loopback address */ -#define ip4_addr_set_loopback(ipaddr) ((ipaddr)->addr = PP_HTONL(IPADDR_LOOPBACK)) -/** Check if an address is in the loopback region */ -#define ip4_addr_isloopback(ipaddr) (((ipaddr)->addr & PP_HTONL(IP_CLASSA_NET)) == PP_HTONL(((u32_t)IP_LOOPBACKNET) << 24)) -/** Safely copy one IP address to another and change byte order - * from host- to network-order. */ -#define ip4_addr_set_hton(dest, src) ((dest)->addr = \ - ((src) == NULL ? 0:\ - lwip_htonl((src)->addr))) -/** IPv4 only: set the IP address given as an u32_t */ -#define ip4_addr_set_u32(dest_ipaddr, src_u32) ((dest_ipaddr)->addr = (src_u32)) -/** IPv4 only: get the IP address as an u32_t */ -#define ip4_addr_get_u32(src_ipaddr) ((src_ipaddr)->addr) - -/** Get the network address by combining host address with netmask */ -#define ip4_addr_get_network(target, host, netmask) do { ((target)->addr = ((host)->addr) & ((netmask)->addr)); } while(0) - -/** - * Determine if two address are on the same network. - * - * @arg addr1 IP address 1 - * @arg addr2 IP address 2 - * @arg mask network identifier mask - * @return !0 if the network identifiers of both address match - */ -#define ip4_addr_netcmp(addr1, addr2, mask) (((addr1)->addr & \ - (mask)->addr) == \ - ((addr2)->addr & \ - (mask)->addr)) -#define ip4_addr_cmp(addr1, addr2) ((addr1)->addr == (addr2)->addr) - -#define ip4_addr_isany_val(addr1) ((addr1).addr == IPADDR_ANY) -#define ip4_addr_isany(addr1) ((addr1) == NULL || ip4_addr_isany_val(*(addr1))) - -#define ip4_addr_isbroadcast(addr1, netif) ip4_addr_isbroadcast_u32((addr1)->addr, netif) -u8_t ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif); - -#define ip_addr_netmask_valid(netmask) ip4_addr_netmask_valid((netmask)->addr) -u8_t ip4_addr_netmask_valid(u32_t netmask); - -#define ip4_addr_ismulticast(addr1) (((addr1)->addr & PP_HTONL(0xf0000000UL)) == PP_HTONL(0xe0000000UL)) - -#define ip4_addr_islinklocal(addr1) (((addr1)->addr & PP_HTONL(0xffff0000UL)) == PP_HTONL(0xa9fe0000UL)) - -#define ip4_addr_debug_print_parts(debug, a, b, c, d) \ - LWIP_DEBUGF(debug, ("%" U16_F ".%" U16_F ".%" U16_F ".%" U16_F, a, b, c, d)) -#define ip4_addr_debug_print(debug, ipaddr) \ - ip4_addr_debug_print_parts(debug, \ - (u16_t)((ipaddr) != NULL ? ip4_addr1_16(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? ip4_addr2_16(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? ip4_addr3_16(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? ip4_addr4_16(ipaddr) : 0)) -#define ip4_addr_debug_print_val(debug, ipaddr) \ - ip4_addr_debug_print_parts(debug, \ - ip4_addr1_16(&(ipaddr)), \ - ip4_addr2_16(&(ipaddr)), \ - ip4_addr3_16(&(ipaddr)), \ - ip4_addr4_16(&(ipaddr))) - -/* Get one byte from the 4-byte address */ -#define ip4_addr1(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[0]) -#define ip4_addr2(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[1]) -#define ip4_addr3(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[2]) -#define ip4_addr4(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[3]) -/* These are cast to u16_t, with the intent that they are often arguments - * to printf using the U16_F format from cc.h. */ -#define ip4_addr1_16(ipaddr) ((u16_t)ip4_addr1(ipaddr)) -#define ip4_addr2_16(ipaddr) ((u16_t)ip4_addr2(ipaddr)) -#define ip4_addr3_16(ipaddr) ((u16_t)ip4_addr3(ipaddr)) -#define ip4_addr4_16(ipaddr) ((u16_t)ip4_addr4(ipaddr)) - -#define IP4ADDR_STRLEN_MAX 16 - -/** For backwards compatibility */ -#define ip_ntoa(ipaddr) ipaddr_ntoa(ipaddr) - -u32_t ipaddr_addr(const char *cp); -int ip4addr_aton(const char *cp, ip4_addr_t *addr); -/** returns ptr to static buffer; not reentrant! */ -char *ip4addr_ntoa(const ip4_addr_t *addr); -char *ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV4 */ - -#endif /* LWIP_HDR_IP_ADDR_H */ +/** + * @file + * IPv4 address API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_IP4_ADDR_H +#define LWIP_HDR_IP4_ADDR_H + +#include "lwip/opt.h" +#include "lwip/def.h" + +#if LWIP_IPV4 + +#ifdef __cplusplus +extern "C" { +#endif + +/** This is the aligned version of ip4_addr_t, + used as local variable, on the stack, etc. */ +struct ip4_addr { + u32_t addr; +}; + +/** ip4_addr_t uses a struct for convenience only, so that the same defines can + * operate both on ip4_addr_t as well as on ip4_addr_p_t. */ +typedef struct ip4_addr ip4_addr_t; + +/** + * struct ipaddr2 is used in the definition of the ARP packet format in + * order to support compilers that don't have structure packing. + */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip4_addr2 { + PACK_STRUCT_FIELD(u16_t addrw[2]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* Forward declaration to not include netif.h */ +struct netif; + +/** 255.255.255.255 */ +#define IPADDR_NONE ((u32_t)0xffffffffUL) +/** 127.0.0.1 */ +#define IPADDR_LOOPBACK ((u32_t)0x7f000001UL) +/** 0.0.0.0 */ +#define IPADDR_ANY ((u32_t)0x00000000UL) +/** 255.255.255.255 */ +#define IPADDR_BROADCAST ((u32_t)0xffffffffUL) + +/* Definitions of the bits in an Internet address integer. + + On subnets, host and network parts are found according to + the subnet mask, not these masks. */ +#define IP_CLASSA(a) ((((u32_t)(a)) & 0x80000000UL) == 0) +#define IP_CLASSA_NET 0xff000000 +#define IP_CLASSA_NSHIFT 24 +#define IP_CLASSA_HOST (0xffffffff & ~IP_CLASSA_NET) +#define IP_CLASSA_MAX 128 + +#define IP_CLASSB(a) ((((u32_t)(a)) & 0xc0000000UL) == 0x80000000UL) +#define IP_CLASSB_NET 0xffff0000 +#define IP_CLASSB_NSHIFT 16 +#define IP_CLASSB_HOST (0xffffffff & ~IP_CLASSB_NET) +#define IP_CLASSB_MAX 65536 + +#define IP_CLASSC(a) ((((u32_t)(a)) & 0xe0000000UL) == 0xc0000000UL) +#define IP_CLASSC_NET 0xffffff00 +#define IP_CLASSC_NSHIFT 8 +#define IP_CLASSC_HOST (0xffffffff & ~IP_CLASSC_NET) + +#define IP_CLASSD(a) (((u32_t)(a) & 0xf0000000UL) == 0xe0000000UL) +#define IP_CLASSD_NET 0xf0000000 /* These ones aren't really */ +#define IP_CLASSD_NSHIFT 28 /* net and host fields, but */ +#define IP_CLASSD_HOST 0x0fffffff /* routing needn't know. */ +#define IP_MULTICAST(a) IP_CLASSD(a) + +#define IP_EXPERIMENTAL(a) (((u32_t)(a) & 0xf0000000UL) == 0xf0000000UL) +#define IP_BADCLASS(a) (((u32_t)(a) & 0xf0000000UL) == 0xf0000000UL) + +#define IP_LOOPBACKNET 127 /* official! */ + +/** Set an IP address given by the four byte-parts */ +#define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = PP_HTONL(LWIP_MAKEU32(a,b,c,d)) + +/** MEMCPY-like copying of IP addresses where addresses are known to be + * 16-bit-aligned if the port is correctly configured (so a port could define + * this to copying 2 u16_t's) - no NULL-pointer-checking needed. */ +#ifndef IPADDR2_COPY +#define IPADDR2_COPY(dest, src) SMEMCPY(dest, src, sizeof(ip4_addr_t)) +#endif + +/** Copy IP address - faster than ip4_addr_set: no NULL check */ +#define ip4_addr_copy(dest, src) ((dest).addr = (src).addr) +/** Safely copy one IP address to another (src may be NULL) */ +#define ip4_addr_set(dest, src) ((dest)->addr = \ + ((src) == NULL ? 0 : \ + (src)->addr)) +/** Set complete address to zero */ +#define ip4_addr_set_zero(ipaddr) ((ipaddr)->addr = 0) +/** Set address to IPADDR_ANY (no need for lwip_htonl()) */ +#define ip4_addr_set_any(ipaddr) ((ipaddr)->addr = IPADDR_ANY) +/** Set address to loopback address */ +#define ip4_addr_set_loopback(ipaddr) ((ipaddr)->addr = PP_HTONL(IPADDR_LOOPBACK)) +/** Check if an address is in the loopback region */ +#define ip4_addr_isloopback(ipaddr) (((ipaddr)->addr & PP_HTONL(IP_CLASSA_NET)) == PP_HTONL(((u32_t)IP_LOOPBACKNET) << 24)) +/** Safely copy one IP address to another and change byte order + * from host- to network-order. */ +#define ip4_addr_set_hton(dest, src) ((dest)->addr = \ + ((src) == NULL ? 0:\ + lwip_htonl((src)->addr))) +/** IPv4 only: set the IP address given as an u32_t */ +#define ip4_addr_set_u32(dest_ipaddr, src_u32) ((dest_ipaddr)->addr = (src_u32)) +/** IPv4 only: get the IP address as an u32_t */ +#define ip4_addr_get_u32(src_ipaddr) ((src_ipaddr)->addr) + +/** Get the network address by combining host address with netmask */ +#define ip4_addr_get_network(target, host, netmask) do { ((target)->addr = ((host)->addr) & ((netmask)->addr)); } while(0) + +/** + * Determine if two address are on the same network. + * + * @arg addr1 IP address 1 + * @arg addr2 IP address 2 + * @arg mask network identifier mask + * @return !0 if the network identifiers of both address match + */ +#define ip4_addr_netcmp(addr1, addr2, mask) (((addr1)->addr & \ + (mask)->addr) == \ + ((addr2)->addr & \ + (mask)->addr)) +#define ip4_addr_cmp(addr1, addr2) ((addr1)->addr == (addr2)->addr) + +#define ip4_addr_isany_val(addr1) ((addr1).addr == IPADDR_ANY) +#define ip4_addr_isany(addr1) ((addr1) == NULL || ip4_addr_isany_val(*(addr1))) + +#define ip4_addr_isbroadcast(addr1, netif) ip4_addr_isbroadcast_u32((addr1)->addr, netif) +u8_t ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif); + +#define ip_addr_netmask_valid(netmask) ip4_addr_netmask_valid((netmask)->addr) +u8_t ip4_addr_netmask_valid(u32_t netmask); + +#define ip4_addr_ismulticast(addr1) (((addr1)->addr & PP_HTONL(0xf0000000UL)) == PP_HTONL(0xe0000000UL)) + +#define ip4_addr_islinklocal(addr1) (((addr1)->addr & PP_HTONL(0xffff0000UL)) == PP_HTONL(0xa9fe0000UL)) + +#define ip4_addr_debug_print_parts(debug, a, b, c, d) \ + LWIP_DEBUGF(debug, ("%" U16_F ".%" U16_F ".%" U16_F ".%" U16_F, a, b, c, d)) +#define ip4_addr_debug_print(debug, ipaddr) \ + ip4_addr_debug_print_parts(debug, \ + (u16_t)((ipaddr) != NULL ? ip4_addr1_16(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? ip4_addr2_16(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? ip4_addr3_16(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? ip4_addr4_16(ipaddr) : 0)) +#define ip4_addr_debug_print_val(debug, ipaddr) \ + ip4_addr_debug_print_parts(debug, \ + ip4_addr1_16(&(ipaddr)), \ + ip4_addr2_16(&(ipaddr)), \ + ip4_addr3_16(&(ipaddr)), \ + ip4_addr4_16(&(ipaddr))) + +/* Get one byte from the 4-byte address */ +#define ip4_addr1(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[0]) +#define ip4_addr2(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[1]) +#define ip4_addr3(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[2]) +#define ip4_addr4(ipaddr) (((const u8_t*)(&(ipaddr)->addr))[3]) +/* These are cast to u16_t, with the intent that they are often arguments + * to printf using the U16_F format from cc.h. */ +#define ip4_addr1_16(ipaddr) ((u16_t)ip4_addr1(ipaddr)) +#define ip4_addr2_16(ipaddr) ((u16_t)ip4_addr2(ipaddr)) +#define ip4_addr3_16(ipaddr) ((u16_t)ip4_addr3(ipaddr)) +#define ip4_addr4_16(ipaddr) ((u16_t)ip4_addr4(ipaddr)) + +#define IP4ADDR_STRLEN_MAX 16 + +/** For backwards compatibility */ +#define ip_ntoa(ipaddr) ipaddr_ntoa(ipaddr) + +u32_t ipaddr_addr(const char *cp); +int ip4addr_aton(const char *cp, ip4_addr_t *addr); +/** returns ptr to static buffer; not reentrant! */ +char *ip4addr_ntoa(const ip4_addr_t *addr); +char *ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV4 */ + +#endif /* LWIP_HDR_IP_ADDR_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_frag.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_frag.h index ed5bf14..18cd2d0 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_frag.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip4_frag.h @@ -1,100 +1,100 @@ -/** - * @file - * IP fragmentation/reassembly - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Jani Monoses - * - */ - -#ifndef LWIP_HDR_IP4_FRAG_H -#define LWIP_HDR_IP4_FRAG_H - -#include "lwip/opt.h" -#include "lwip/err.h" -#include "lwip/pbuf.h" -#include "lwip/netif.h" -#include "lwip/ip_addr.h" -#include "lwip/ip.h" - -#if LWIP_IPV4 - -#ifdef __cplusplus -extern "C" { -#endif - -#if IP_REASSEMBLY -/* The IP reassembly timer interval in milliseconds. */ -#define IP_TMR_INTERVAL 1000 - -/** IP reassembly helper struct. - * This is exported because memp needs to know the size. - */ -struct ip_reassdata { - struct ip_reassdata *next; - struct pbuf *p; - struct ip_hdr iphdr; - u16_t datagram_len; - u8_t flags; - u8_t timer; -}; - -void ip_reass_init(void); -void ip_reass_tmr(void); -struct pbuf * ip4_reass(struct pbuf *p); -#endif /* IP_REASSEMBLY */ - -#if IP_FRAG -#if !LWIP_NETIF_TX_SINGLE_PBUF -#ifndef LWIP_PBUF_CUSTOM_REF_DEFINED -#define LWIP_PBUF_CUSTOM_REF_DEFINED -/** A custom pbuf that holds a reference to another pbuf, which is freed - * when this custom pbuf is freed. This is used to create a custom PBUF_REF - * that points into the original pbuf. */ -struct pbuf_custom_ref { - /** 'base class' */ - struct pbuf_custom pc; - /** pointer to the original pbuf that is referenced */ - struct pbuf *original; -}; -#endif /* LWIP_PBUF_CUSTOM_REF_DEFINED */ -#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ - -err_t ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest); -#endif /* IP_FRAG */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV4 */ - -#endif /* LWIP_HDR_IP4_FRAG_H */ +/** + * @file + * IP fragmentation/reassembly + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Jani Monoses + * + */ + +#ifndef LWIP_HDR_IP4_FRAG_H +#define LWIP_HDR_IP4_FRAG_H + +#include "lwip/opt.h" +#include "lwip/err.h" +#include "lwip/pbuf.h" +#include "lwip/netif.h" +#include "lwip/ip_addr.h" +#include "lwip/ip.h" + +#if LWIP_IPV4 + +#ifdef __cplusplus +extern "C" { +#endif + +#if IP_REASSEMBLY +/* The IP reassembly timer interval in milliseconds. */ +#define IP_TMR_INTERVAL 1000 + +/** IP reassembly helper struct. + * This is exported because memp needs to know the size. + */ +struct ip_reassdata { + struct ip_reassdata *next; + struct pbuf *p; + struct ip_hdr iphdr; + u16_t datagram_len; + u8_t flags; + u8_t timer; +}; + +void ip_reass_init(void); +void ip_reass_tmr(void); +struct pbuf * ip4_reass(struct pbuf *p); +#endif /* IP_REASSEMBLY */ + +#if IP_FRAG +#if !LWIP_NETIF_TX_SINGLE_PBUF +#ifndef LWIP_PBUF_CUSTOM_REF_DEFINED +#define LWIP_PBUF_CUSTOM_REF_DEFINED +/** A custom pbuf that holds a reference to another pbuf, which is freed + * when this custom pbuf is freed. This is used to create a custom PBUF_REF + * that points into the original pbuf. */ +struct pbuf_custom_ref { + /** 'base class' */ + struct pbuf_custom pc; + /** pointer to the original pbuf that is referenced */ + struct pbuf *original; +}; +#endif /* LWIP_PBUF_CUSTOM_REF_DEFINED */ +#endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ + +err_t ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest); +#endif /* IP_FRAG */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV4 */ + +#endif /* LWIP_HDR_IP4_FRAG_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6.h index 099b94f..9c6d593 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6.h @@ -1,93 +1,93 @@ -/** - * @file - * - * IPv6 layer. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ -#ifndef LWIP_HDR_IP6_H -#define LWIP_HDR_IP6_H - -#include "lwip/opt.h" - -#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/ip6_addr.h" -#include "lwip/prot/ip6.h" -#include "lwip/def.h" -#include "lwip/pbuf.h" -#include "lwip/netif.h" - -#include "lwip/err.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct netif *ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest); -const ip_addr_t *ip6_select_source_address(struct netif *netif, const ip6_addr_t * dest); -err_t ip6_input(struct pbuf *p, struct netif *inp); -err_t ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth); -err_t ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth, struct netif *netif); -err_t ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth, struct netif *netif); -#if LWIP_NETIF_HWADDRHINT -err_t ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, - u8_t hl, u8_t tc, u8_t nexth, u8_t *addr_hint); -#endif /* LWIP_NETIF_HWADDRHINT */ -#if LWIP_IPV6_MLD -err_t ip6_options_add_hbh_ra(struct pbuf * p, u8_t nexth, u8_t value); -#endif /* LWIP_IPV6_MLD */ - -#define ip6_netif_get_local_ip(netif, dest) (((netif) != NULL) ? \ - ip6_select_source_address(netif, dest) : NULL) - -#if IP6_DEBUG -void ip6_debug_print(struct pbuf *p); -#else -#define ip6_debug_print(p) -#endif /* IP6_DEBUG */ - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV6 */ - -#endif /* LWIP_HDR_IP6_H */ +/** + * @file + * + * IPv6 layer. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ +#ifndef LWIP_HDR_IP6_H +#define LWIP_HDR_IP6_H + +#include "lwip/opt.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/ip6_addr.h" +#include "lwip/prot/ip6.h" +#include "lwip/def.h" +#include "lwip/pbuf.h" +#include "lwip/netif.h" + +#include "lwip/err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct netif *ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest); +const ip_addr_t *ip6_select_source_address(struct netif *netif, const ip6_addr_t * dest); +err_t ip6_input(struct pbuf *p, struct netif *inp); +err_t ip6_output(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, u8_t nexth); +err_t ip6_output_if(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, u8_t nexth, struct netif *netif); +err_t ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, u8_t nexth, struct netif *netif); +#if LWIP_NETIF_HWADDRHINT +err_t ip6_output_hinted(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest, + u8_t hl, u8_t tc, u8_t nexth, u8_t *addr_hint); +#endif /* LWIP_NETIF_HWADDRHINT */ +#if LWIP_IPV6_MLD +err_t ip6_options_add_hbh_ra(struct pbuf * p, u8_t nexth, u8_t value); +#endif /* LWIP_IPV6_MLD */ + +#define ip6_netif_get_local_ip(netif, dest) (((netif) != NULL) ? \ + ip6_select_source_address(netif, dest) : NULL) + +#if IP6_DEBUG +void ip6_debug_print(struct pbuf *p); +#else +#define ip6_debug_print(p) +#endif /* IP6_DEBUG */ + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 */ + +#endif /* LWIP_HDR_IP6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_addr.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_addr.h index ee381ae..8d6ff29 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_addr.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_addr.h @@ -1,285 +1,285 @@ -/** - * @file - * - * IPv6 addresses. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * Structs and macros for handling IPv6 addresses. - * - * Please coordinate changes and requests with Ivan Delamer - * - */ -#ifndef LWIP_HDR_IP6_ADDR_H -#define LWIP_HDR_IP6_ADDR_H - -#include "lwip/opt.h" -#include "def.h" - -#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** This is the aligned version of ip6_addr_t, - used as local variable, on the stack, etc. */ -struct ip6_addr { - u32_t addr[4]; -}; - -/** IPv6 address */ -typedef struct ip6_addr ip6_addr_t; - -/** Set an IPv6 partial address given by byte-parts */ -#define IP6_ADDR_PART(ip6addr, index, a,b,c,d) \ - (ip6addr)->addr[index] = PP_HTONL(LWIP_MAKEU32(a,b,c,d)) - -/** Set a full IPv6 address by passing the 4 u32_t indices in network byte order - (use PP_HTONL() for constants) */ -#define IP6_ADDR(ip6addr, idx0, idx1, idx2, idx3) do { \ - (ip6addr)->addr[0] = idx0; \ - (ip6addr)->addr[1] = idx1; \ - (ip6addr)->addr[2] = idx2; \ - (ip6addr)->addr[3] = idx3; } while(0) - -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK1(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xffff)) -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK2(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[0])) & 0xffff)) -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK3(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[1]) >> 16) & 0xffff)) -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK4(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[1])) & 0xffff)) -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK5(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[2]) >> 16) & 0xffff)) -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK6(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[2])) & 0xffff)) -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK7(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[3]) >> 16) & 0xffff)) -/** Access address in 16-bit block */ -#define IP6_ADDR_BLOCK8(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[3])) & 0xffff)) - -/** Copy IPv6 address - faster than ip6_addr_set: no NULL check */ -#define ip6_addr_copy(dest, src) do{(dest).addr[0] = (src).addr[0]; \ - (dest).addr[1] = (src).addr[1]; \ - (dest).addr[2] = (src).addr[2]; \ - (dest).addr[3] = (src).addr[3];}while(0) -/** Safely copy one IPv6 address to another (src may be NULL) */ -#define ip6_addr_set(dest, src) do{(dest)->addr[0] = (src) == NULL ? 0 : (src)->addr[0]; \ - (dest)->addr[1] = (src) == NULL ? 0 : (src)->addr[1]; \ - (dest)->addr[2] = (src) == NULL ? 0 : (src)->addr[2]; \ - (dest)->addr[3] = (src) == NULL ? 0 : (src)->addr[3];}while(0) - -/** Set complete address to zero */ -#define ip6_addr_set_zero(ip6addr) do{(ip6addr)->addr[0] = 0; \ - (ip6addr)->addr[1] = 0; \ - (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = 0;}while(0) - -/** Set address to ipv6 'any' (no need for lwip_htonl()) */ -#define ip6_addr_set_any(ip6addr) ip6_addr_set_zero(ip6addr) -/** Set address to ipv6 loopback address */ -#define ip6_addr_set_loopback(ip6addr) do{(ip6addr)->addr[0] = 0; \ - (ip6addr)->addr[1] = 0; \ - (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0) -/** Safely copy one IPv6 address to another and change byte order - * from host- to network-order. */ -#define ip6_addr_set_hton(dest, src) do{(dest)->addr[0] = (src) == NULL ? 0 : lwip_htonl((src)->addr[0]); \ - (dest)->addr[1] = (src) == NULL ? 0 : lwip_htonl((src)->addr[1]); \ - (dest)->addr[2] = (src) == NULL ? 0 : lwip_htonl((src)->addr[2]); \ - (dest)->addr[3] = (src) == NULL ? 0 : lwip_htonl((src)->addr[3]);}while(0) - - -/** - * Determine if two IPv6 address are on the same network. - * - * @arg addr1 IPv6 address 1 - * @arg addr2 IPv6 address 2 - * @return !0 if the network identifiers of both address match - */ -#define ip6_addr_netcmp(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ - ((addr1)->addr[1] == (addr2)->addr[1])) - -#define ip6_addr_cmp(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ - ((addr1)->addr[1] == (addr2)->addr[1]) && \ - ((addr1)->addr[2] == (addr2)->addr[2]) && \ - ((addr1)->addr[3] == (addr2)->addr[3])) - -#define ip6_get_subnet_id(ip6addr) (lwip_htonl((ip6addr)->addr[2]) & 0x0000ffffUL) - -#define ip6_addr_isany_val(ip6addr) (((ip6addr).addr[0] == 0) && \ - ((ip6addr).addr[1] == 0) && \ - ((ip6addr).addr[2] == 0) && \ - ((ip6addr).addr[3] == 0)) -#define ip6_addr_isany(ip6addr) (((ip6addr) == NULL) || ip6_addr_isany_val(*(ip6addr))) - -#define ip6_addr_isloopback(ip6addr) (((ip6addr)->addr[0] == 0UL) && \ - ((ip6addr)->addr[1] == 0UL) && \ - ((ip6addr)->addr[2] == 0UL) && \ - ((ip6addr)->addr[3] == PP_HTONL(0x00000001UL))) - -#define ip6_addr_isglobal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xe0000000UL)) == PP_HTONL(0x20000000UL)) - -#define ip6_addr_islinklocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfe800000UL)) - -#define ip6_addr_issitelocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfec00000UL)) - -#define ip6_addr_isuniquelocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xfe000000UL)) == PP_HTONL(0xfc000000UL)) - -#define ip6_addr_isipv4mappedipv6(ip6addr) (((ip6addr)->addr[0] == 0) && ((ip6addr)->addr[1] == 0) && (((ip6addr)->addr[2]) == PP_HTONL(0x0000FFFFUL))) - -#define ip6_addr_ismulticast(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff000000UL)) == PP_HTONL(0xff000000UL)) -#define ip6_addr_multicast_transient_flag(ip6addr) ((ip6addr)->addr[0] & PP_HTONL(0x00100000UL)) -#define ip6_addr_multicast_prefix_flag(ip6addr) ((ip6addr)->addr[0] & PP_HTONL(0x00200000UL)) -#define ip6_addr_multicast_rendezvous_flag(ip6addr) ((ip6addr)->addr[0] & PP_HTONL(0x00400000UL)) -#define ip6_addr_multicast_scope(ip6addr) ((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xf) -#define IP6_MULTICAST_SCOPE_RESERVED 0x0 -#define IP6_MULTICAST_SCOPE_RESERVED0 0x0 -#define IP6_MULTICAST_SCOPE_INTERFACE_LOCAL 0x1 -#define IP6_MULTICAST_SCOPE_LINK_LOCAL 0x2 -#define IP6_MULTICAST_SCOPE_RESERVED3 0x3 -#define IP6_MULTICAST_SCOPE_ADMIN_LOCAL 0x4 -#define IP6_MULTICAST_SCOPE_SITE_LOCAL 0x5 -#define IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL 0x8 -#define IP6_MULTICAST_SCOPE_GLOBAL 0xe -#define IP6_MULTICAST_SCOPE_RESERVEDF 0xf -#define ip6_addr_ismulticast_iflocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff010000UL)) -#define ip6_addr_ismulticast_linklocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff020000UL)) -#define ip6_addr_ismulticast_adminlocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff040000UL)) -#define ip6_addr_ismulticast_sitelocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff050000UL)) -#define ip6_addr_ismulticast_orglocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff080000UL)) -#define ip6_addr_ismulticast_global(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff0e0000UL)) - -/* @todo define get/set for well-know multicast addresses, e.g. ff02::1 */ -#define ip6_addr_isallnodes_iflocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff010000UL)) && \ - ((ip6addr)->addr[1] == 0UL) && \ - ((ip6addr)->addr[2] == 0UL) && \ - ((ip6addr)->addr[3] == PP_HTONL(0x00000001UL))) - -#define ip6_addr_isallnodes_linklocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ - ((ip6addr)->addr[1] == 0UL) && \ - ((ip6addr)->addr[2] == 0UL) && \ - ((ip6addr)->addr[3] == PP_HTONL(0x00000001UL))) -#define ip6_addr_set_allnodes_linklocal(ip6addr) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ - (ip6addr)->addr[1] = 0; \ - (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0) - -#define ip6_addr_isallrouters_linklocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ - ((ip6addr)->addr[1] == 0UL) && \ - ((ip6addr)->addr[2] == 0UL) && \ - ((ip6addr)->addr[3] == PP_HTONL(0x00000002UL))) -#define ip6_addr_set_allrouters_linklocal(ip6addr) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ - (ip6addr)->addr[1] = 0; \ - (ip6addr)->addr[2] = 0; \ - (ip6addr)->addr[3] = PP_HTONL(0x00000002UL);}while(0) - -#define ip6_addr_issolicitednode(ip6addr) ( ((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ - ((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)) && \ - (((ip6addr)->addr[3] & PP_HTONL(0xff000000UL)) == PP_HTONL(0xff000000UL)) ) - -#define ip6_addr_set_solicitednode(ip6addr, if_id) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ - (ip6addr)->addr[1] = 0; \ - (ip6addr)->addr[2] = PP_HTONL(0x00000001UL); \ - (ip6addr)->addr[3] = (PP_HTONL(0xff000000UL) | (if_id));}while(0) - -#define ip6_addr_cmp_solicitednode(ip6addr, sn_addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ - ((ip6addr)->addr[1] == 0) && \ - ((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)) && \ - ((ip6addr)->addr[3] == (PP_HTONL(0xff000000UL) | (sn_addr)->addr[3]))) - -/* IPv6 address states. */ -#define IP6_ADDR_INVALID 0x00 -#define IP6_ADDR_TENTATIVE 0x08 -#define IP6_ADDR_TENTATIVE_1 0x09 /* 1 probe sent */ -#define IP6_ADDR_TENTATIVE_2 0x0a /* 2 probes sent */ -#define IP6_ADDR_TENTATIVE_3 0x0b /* 3 probes sent */ -#define IP6_ADDR_TENTATIVE_4 0x0c /* 4 probes sent */ -#define IP6_ADDR_TENTATIVE_5 0x0d /* 5 probes sent */ -#define IP6_ADDR_TENTATIVE_6 0x0e /* 6 probes sent */ -#define IP6_ADDR_TENTATIVE_7 0x0f /* 7 probes sent */ -#define IP6_ADDR_VALID 0x10 /* This bit marks an address as valid (preferred or deprecated) */ -#define IP6_ADDR_PREFERRED 0x30 -#define IP6_ADDR_DEPRECATED 0x10 /* Same as VALID (valid but not preferred) */ - -#define IP6_ADDR_TENTATIVE_COUNT_MASK 0x07 /* 1-7 probes sent */ - -#define ip6_addr_isinvalid(addr_state) (addr_state == IP6_ADDR_INVALID) -#define ip6_addr_istentative(addr_state) (addr_state & IP6_ADDR_TENTATIVE) -#define ip6_addr_isvalid(addr_state) (addr_state & IP6_ADDR_VALID) /* Include valid, preferred, and deprecated. */ -#define ip6_addr_ispreferred(addr_state) (addr_state == IP6_ADDR_PREFERRED) -#define ip6_addr_isdeprecated(addr_state) (addr_state == IP6_ADDR_DEPRECATED) - -#define ip6_addr_debug_print_parts(debug, a, b, c, d, e, f, g, h) \ - LWIP_DEBUGF(debug, ("%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F, \ - a, b, c, d, e, f, g, h)) -#define ip6_addr_debug_print(debug, ipaddr) \ - ip6_addr_debug_print_parts(debug, \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK1(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK2(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK3(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK4(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK5(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK6(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK7(ipaddr) : 0), \ - (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK8(ipaddr) : 0)) -#define ip6_addr_debug_print_val(debug, ipaddr) \ - ip6_addr_debug_print_parts(debug, \ - IP6_ADDR_BLOCK1(&(ipaddr)), \ - IP6_ADDR_BLOCK2(&(ipaddr)), \ - IP6_ADDR_BLOCK3(&(ipaddr)), \ - IP6_ADDR_BLOCK4(&(ipaddr)), \ - IP6_ADDR_BLOCK5(&(ipaddr)), \ - IP6_ADDR_BLOCK6(&(ipaddr)), \ - IP6_ADDR_BLOCK7(&(ipaddr)), \ - IP6_ADDR_BLOCK8(&(ipaddr))) - -#define IP6ADDR_STRLEN_MAX 46 - -int ip6addr_aton(const char *cp, ip6_addr_t *addr); -/** returns ptr to static buffer; not reentrant! */ -char *ip6addr_ntoa(const ip6_addr_t *addr); -char *ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen); - - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV6 */ - -#endif /* LWIP_HDR_IP6_ADDR_H */ +/** + * @file + * + * IPv6 addresses. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * Structs and macros for handling IPv6 addresses. + * + * Please coordinate changes and requests with Ivan Delamer + * + */ +#ifndef LWIP_HDR_IP6_ADDR_H +#define LWIP_HDR_IP6_ADDR_H + +#include "lwip/opt.h" +#include "def.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/** This is the aligned version of ip6_addr_t, + used as local variable, on the stack, etc. */ +struct ip6_addr { + u32_t addr[4]; +}; + +/** IPv6 address */ +typedef struct ip6_addr ip6_addr_t; + +/** Set an IPv6 partial address given by byte-parts */ +#define IP6_ADDR_PART(ip6addr, index, a,b,c,d) \ + (ip6addr)->addr[index] = PP_HTONL(LWIP_MAKEU32(a,b,c,d)) + +/** Set a full IPv6 address by passing the 4 u32_t indices in network byte order + (use PP_HTONL() for constants) */ +#define IP6_ADDR(ip6addr, idx0, idx1, idx2, idx3) do { \ + (ip6addr)->addr[0] = idx0; \ + (ip6addr)->addr[1] = idx1; \ + (ip6addr)->addr[2] = idx2; \ + (ip6addr)->addr[3] = idx3; } while(0) + +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK1(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xffff)) +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK2(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[0])) & 0xffff)) +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK3(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[1]) >> 16) & 0xffff)) +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK4(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[1])) & 0xffff)) +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK5(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[2]) >> 16) & 0xffff)) +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK6(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[2])) & 0xffff)) +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK7(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[3]) >> 16) & 0xffff)) +/** Access address in 16-bit block */ +#define IP6_ADDR_BLOCK8(ip6addr) ((u16_t)((lwip_htonl((ip6addr)->addr[3])) & 0xffff)) + +/** Copy IPv6 address - faster than ip6_addr_set: no NULL check */ +#define ip6_addr_copy(dest, src) do{(dest).addr[0] = (src).addr[0]; \ + (dest).addr[1] = (src).addr[1]; \ + (dest).addr[2] = (src).addr[2]; \ + (dest).addr[3] = (src).addr[3];}while(0) +/** Safely copy one IPv6 address to another (src may be NULL) */ +#define ip6_addr_set(dest, src) do{(dest)->addr[0] = (src) == NULL ? 0 : (src)->addr[0]; \ + (dest)->addr[1] = (src) == NULL ? 0 : (src)->addr[1]; \ + (dest)->addr[2] = (src) == NULL ? 0 : (src)->addr[2]; \ + (dest)->addr[3] = (src) == NULL ? 0 : (src)->addr[3];}while(0) + +/** Set complete address to zero */ +#define ip6_addr_set_zero(ip6addr) do{(ip6addr)->addr[0] = 0; \ + (ip6addr)->addr[1] = 0; \ + (ip6addr)->addr[2] = 0; \ + (ip6addr)->addr[3] = 0;}while(0) + +/** Set address to ipv6 'any' (no need for lwip_htonl()) */ +#define ip6_addr_set_any(ip6addr) ip6_addr_set_zero(ip6addr) +/** Set address to ipv6 loopback address */ +#define ip6_addr_set_loopback(ip6addr) do{(ip6addr)->addr[0] = 0; \ + (ip6addr)->addr[1] = 0; \ + (ip6addr)->addr[2] = 0; \ + (ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0) +/** Safely copy one IPv6 address to another and change byte order + * from host- to network-order. */ +#define ip6_addr_set_hton(dest, src) do{(dest)->addr[0] = (src) == NULL ? 0 : lwip_htonl((src)->addr[0]); \ + (dest)->addr[1] = (src) == NULL ? 0 : lwip_htonl((src)->addr[1]); \ + (dest)->addr[2] = (src) == NULL ? 0 : lwip_htonl((src)->addr[2]); \ + (dest)->addr[3] = (src) == NULL ? 0 : lwip_htonl((src)->addr[3]);}while(0) + + +/** + * Determine if two IPv6 address are on the same network. + * + * @arg addr1 IPv6 address 1 + * @arg addr2 IPv6 address 2 + * @return !0 if the network identifiers of both address match + */ +#define ip6_addr_netcmp(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ + ((addr1)->addr[1] == (addr2)->addr[1])) + +#define ip6_addr_cmp(addr1, addr2) (((addr1)->addr[0] == (addr2)->addr[0]) && \ + ((addr1)->addr[1] == (addr2)->addr[1]) && \ + ((addr1)->addr[2] == (addr2)->addr[2]) && \ + ((addr1)->addr[3] == (addr2)->addr[3])) + +#define ip6_get_subnet_id(ip6addr) (lwip_htonl((ip6addr)->addr[2]) & 0x0000ffffUL) + +#define ip6_addr_isany_val(ip6addr) (((ip6addr).addr[0] == 0) && \ + ((ip6addr).addr[1] == 0) && \ + ((ip6addr).addr[2] == 0) && \ + ((ip6addr).addr[3] == 0)) +#define ip6_addr_isany(ip6addr) (((ip6addr) == NULL) || ip6_addr_isany_val(*(ip6addr))) + +#define ip6_addr_isloopback(ip6addr) (((ip6addr)->addr[0] == 0UL) && \ + ((ip6addr)->addr[1] == 0UL) && \ + ((ip6addr)->addr[2] == 0UL) && \ + ((ip6addr)->addr[3] == PP_HTONL(0x00000001UL))) + +#define ip6_addr_isglobal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xe0000000UL)) == PP_HTONL(0x20000000UL)) + +#define ip6_addr_islinklocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfe800000UL)) + +#define ip6_addr_issitelocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xffc00000UL)) == PP_HTONL(0xfec00000UL)) + +#define ip6_addr_isuniquelocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xfe000000UL)) == PP_HTONL(0xfc000000UL)) + +#define ip6_addr_isipv4mappedipv6(ip6addr) (((ip6addr)->addr[0] == 0) && ((ip6addr)->addr[1] == 0) && (((ip6addr)->addr[2]) == PP_HTONL(0x0000FFFFUL))) + +#define ip6_addr_ismulticast(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff000000UL)) == PP_HTONL(0xff000000UL)) +#define ip6_addr_multicast_transient_flag(ip6addr) ((ip6addr)->addr[0] & PP_HTONL(0x00100000UL)) +#define ip6_addr_multicast_prefix_flag(ip6addr) ((ip6addr)->addr[0] & PP_HTONL(0x00200000UL)) +#define ip6_addr_multicast_rendezvous_flag(ip6addr) ((ip6addr)->addr[0] & PP_HTONL(0x00400000UL)) +#define ip6_addr_multicast_scope(ip6addr) ((lwip_htonl((ip6addr)->addr[0]) >> 16) & 0xf) +#define IP6_MULTICAST_SCOPE_RESERVED 0x0 +#define IP6_MULTICAST_SCOPE_RESERVED0 0x0 +#define IP6_MULTICAST_SCOPE_INTERFACE_LOCAL 0x1 +#define IP6_MULTICAST_SCOPE_LINK_LOCAL 0x2 +#define IP6_MULTICAST_SCOPE_RESERVED3 0x3 +#define IP6_MULTICAST_SCOPE_ADMIN_LOCAL 0x4 +#define IP6_MULTICAST_SCOPE_SITE_LOCAL 0x5 +#define IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL 0x8 +#define IP6_MULTICAST_SCOPE_GLOBAL 0xe +#define IP6_MULTICAST_SCOPE_RESERVEDF 0xf +#define ip6_addr_ismulticast_iflocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff010000UL)) +#define ip6_addr_ismulticast_linklocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff020000UL)) +#define ip6_addr_ismulticast_adminlocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff040000UL)) +#define ip6_addr_ismulticast_sitelocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff050000UL)) +#define ip6_addr_ismulticast_orglocal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff080000UL)) +#define ip6_addr_ismulticast_global(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xff8f0000UL)) == PP_HTONL(0xff0e0000UL)) + +/* @todo define get/set for well-know multicast addresses, e.g. ff02::1 */ +#define ip6_addr_isallnodes_iflocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff010000UL)) && \ + ((ip6addr)->addr[1] == 0UL) && \ + ((ip6addr)->addr[2] == 0UL) && \ + ((ip6addr)->addr[3] == PP_HTONL(0x00000001UL))) + +#define ip6_addr_isallnodes_linklocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ + ((ip6addr)->addr[1] == 0UL) && \ + ((ip6addr)->addr[2] == 0UL) && \ + ((ip6addr)->addr[3] == PP_HTONL(0x00000001UL))) +#define ip6_addr_set_allnodes_linklocal(ip6addr) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ + (ip6addr)->addr[1] = 0; \ + (ip6addr)->addr[2] = 0; \ + (ip6addr)->addr[3] = PP_HTONL(0x00000001UL);}while(0) + +#define ip6_addr_isallrouters_linklocal(ip6addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ + ((ip6addr)->addr[1] == 0UL) && \ + ((ip6addr)->addr[2] == 0UL) && \ + ((ip6addr)->addr[3] == PP_HTONL(0x00000002UL))) +#define ip6_addr_set_allrouters_linklocal(ip6addr) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ + (ip6addr)->addr[1] = 0; \ + (ip6addr)->addr[2] = 0; \ + (ip6addr)->addr[3] = PP_HTONL(0x00000002UL);}while(0) + +#define ip6_addr_issolicitednode(ip6addr) ( ((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ + ((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)) && \ + (((ip6addr)->addr[3] & PP_HTONL(0xff000000UL)) == PP_HTONL(0xff000000UL)) ) + +#define ip6_addr_set_solicitednode(ip6addr, if_id) do{(ip6addr)->addr[0] = PP_HTONL(0xff020000UL); \ + (ip6addr)->addr[1] = 0; \ + (ip6addr)->addr[2] = PP_HTONL(0x00000001UL); \ + (ip6addr)->addr[3] = (PP_HTONL(0xff000000UL) | (if_id));}while(0) + +#define ip6_addr_cmp_solicitednode(ip6addr, sn_addr) (((ip6addr)->addr[0] == PP_HTONL(0xff020000UL)) && \ + ((ip6addr)->addr[1] == 0) && \ + ((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)) && \ + ((ip6addr)->addr[3] == (PP_HTONL(0xff000000UL) | (sn_addr)->addr[3]))) + +/* IPv6 address states. */ +#define IP6_ADDR_INVALID 0x00 +#define IP6_ADDR_TENTATIVE 0x08 +#define IP6_ADDR_TENTATIVE_1 0x09 /* 1 probe sent */ +#define IP6_ADDR_TENTATIVE_2 0x0a /* 2 probes sent */ +#define IP6_ADDR_TENTATIVE_3 0x0b /* 3 probes sent */ +#define IP6_ADDR_TENTATIVE_4 0x0c /* 4 probes sent */ +#define IP6_ADDR_TENTATIVE_5 0x0d /* 5 probes sent */ +#define IP6_ADDR_TENTATIVE_6 0x0e /* 6 probes sent */ +#define IP6_ADDR_TENTATIVE_7 0x0f /* 7 probes sent */ +#define IP6_ADDR_VALID 0x10 /* This bit marks an address as valid (preferred or deprecated) */ +#define IP6_ADDR_PREFERRED 0x30 +#define IP6_ADDR_DEPRECATED 0x10 /* Same as VALID (valid but not preferred) */ + +#define IP6_ADDR_TENTATIVE_COUNT_MASK 0x07 /* 1-7 probes sent */ + +#define ip6_addr_isinvalid(addr_state) (addr_state == IP6_ADDR_INVALID) +#define ip6_addr_istentative(addr_state) (addr_state & IP6_ADDR_TENTATIVE) +#define ip6_addr_isvalid(addr_state) (addr_state & IP6_ADDR_VALID) /* Include valid, preferred, and deprecated. */ +#define ip6_addr_ispreferred(addr_state) (addr_state == IP6_ADDR_PREFERRED) +#define ip6_addr_isdeprecated(addr_state) (addr_state == IP6_ADDR_DEPRECATED) + +#define ip6_addr_debug_print_parts(debug, a, b, c, d, e, f, g, h) \ + LWIP_DEBUGF(debug, ("%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F ":%" X16_F, \ + a, b, c, d, e, f, g, h)) +#define ip6_addr_debug_print(debug, ipaddr) \ + ip6_addr_debug_print_parts(debug, \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK1(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK2(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK3(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK4(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK5(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK6(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK7(ipaddr) : 0), \ + (u16_t)((ipaddr) != NULL ? IP6_ADDR_BLOCK8(ipaddr) : 0)) +#define ip6_addr_debug_print_val(debug, ipaddr) \ + ip6_addr_debug_print_parts(debug, \ + IP6_ADDR_BLOCK1(&(ipaddr)), \ + IP6_ADDR_BLOCK2(&(ipaddr)), \ + IP6_ADDR_BLOCK3(&(ipaddr)), \ + IP6_ADDR_BLOCK4(&(ipaddr)), \ + IP6_ADDR_BLOCK5(&(ipaddr)), \ + IP6_ADDR_BLOCK6(&(ipaddr)), \ + IP6_ADDR_BLOCK7(&(ipaddr)), \ + IP6_ADDR_BLOCK8(&(ipaddr))) + +#define IP6ADDR_STRLEN_MAX 46 + +int ip6addr_aton(const char *cp, ip6_addr_t *addr); +/** returns ptr to static buffer; not reentrant! */ +char *ip6addr_ntoa(const ip6_addr_t *addr); +char *ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen); + + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 */ + +#endif /* LWIP_HDR_IP6_ADDR_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_frag.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_frag.h index 6be2747..2f94ee6 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_frag.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip6_frag.h @@ -1,120 +1,120 @@ -/** - * @file - * - * IPv6 fragmentation and reassembly. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ -#ifndef LWIP_HDR_IP6_FRAG_H -#define LWIP_HDR_IP6_FRAG_H - -#include "lwip/opt.h" -#include "lwip/pbuf.h" -#include "lwip/ip6_addr.h" -#include "lwip/ip6.h" -#include "lwip/netif.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -#if LWIP_IPV6 && LWIP_IPV6_REASS /* don't build if not configured for use in lwipopts.h */ - -/** IP6_FRAG_COPYHEADER==1: for platforms where sizeof(void*) > 4, this needs to - * be enabled (to not overwrite part of the data). When enabled, the IPv6 header - * is copied instead of referencing it, which gives more room for struct ip6_reass_helper */ -#ifndef IPV6_FRAG_COPYHEADER -#define IPV6_FRAG_COPYHEADER 0 -#endif - -/** The IPv6 reassembly timer interval in milliseconds. */ -#define IP6_REASS_TMR_INTERVAL 1000 - -/* Copy the complete header of the first fragment to struct ip6_reassdata - or just point to its original location in the first pbuf? */ -#if IPV6_FRAG_COPYHEADER -#define IPV6_FRAG_HDRPTR -#define IPV6_FRAG_HDRREF(hdr) (&(hdr)) -#else /* IPV6_FRAG_COPYHEADER */ -#define IPV6_FRAG_HDRPTR * -#define IPV6_FRAG_HDRREF(hdr) (hdr) -#endif /* IPV6_FRAG_COPYHEADER */ - -/** IPv6 reassembly helper struct. - * This is exported because memp needs to know the size. - */ -struct ip6_reassdata { - struct ip6_reassdata *next; - struct pbuf *p; - struct ip6_hdr IPV6_FRAG_HDRPTR iphdr; - u32_t identification; - u16_t datagram_len; - u8_t nexth; - u8_t timer; -}; - -#define ip6_reass_init() /* Compatibility define */ -void ip6_reass_tmr(void); -struct pbuf *ip6_reass(struct pbuf *p); - -#endif /* LWIP_IPV6 && LWIP_IPV6_REASS */ - -#if LWIP_IPV6 && LWIP_IPV6_FRAG /* don't build if not configured for use in lwipopts.h */ - -#ifndef LWIP_PBUF_CUSTOM_REF_DEFINED -#define LWIP_PBUF_CUSTOM_REF_DEFINED -/** A custom pbuf that holds a reference to another pbuf, which is freed - * when this custom pbuf is freed. This is used to create a custom PBUF_REF - * that points into the original pbuf. */ -struct pbuf_custom_ref { - /** 'base class' */ - struct pbuf_custom pc; - /** pointer to the original pbuf that is referenced */ - struct pbuf *original; -}; -#endif /* LWIP_PBUF_CUSTOM_REF_DEFINED */ - -err_t ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest); - -#endif /* LWIP_IPV6 && LWIP_IPV6_FRAG */ - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_IP6_FRAG_H */ +/** + * @file + * + * IPv6 fragmentation and reassembly. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ +#ifndef LWIP_HDR_IP6_FRAG_H +#define LWIP_HDR_IP6_FRAG_H + +#include "lwip/opt.h" +#include "lwip/pbuf.h" +#include "lwip/ip6_addr.h" +#include "lwip/ip6.h" +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +#if LWIP_IPV6 && LWIP_IPV6_REASS /* don't build if not configured for use in lwipopts.h */ + +/** IP6_FRAG_COPYHEADER==1: for platforms where sizeof(void*) > 4, this needs to + * be enabled (to not overwrite part of the data). When enabled, the IPv6 header + * is copied instead of referencing it, which gives more room for struct ip6_reass_helper */ +#ifndef IPV6_FRAG_COPYHEADER +#define IPV6_FRAG_COPYHEADER 0 +#endif + +/** The IPv6 reassembly timer interval in milliseconds. */ +#define IP6_REASS_TMR_INTERVAL 1000 + +/* Copy the complete header of the first fragment to struct ip6_reassdata + or just point to its original location in the first pbuf? */ +#if IPV6_FRAG_COPYHEADER +#define IPV6_FRAG_HDRPTR +#define IPV6_FRAG_HDRREF(hdr) (&(hdr)) +#else /* IPV6_FRAG_COPYHEADER */ +#define IPV6_FRAG_HDRPTR * +#define IPV6_FRAG_HDRREF(hdr) (hdr) +#endif /* IPV6_FRAG_COPYHEADER */ + +/** IPv6 reassembly helper struct. + * This is exported because memp needs to know the size. + */ +struct ip6_reassdata { + struct ip6_reassdata *next; + struct pbuf *p; + struct ip6_hdr IPV6_FRAG_HDRPTR iphdr; + u32_t identification; + u16_t datagram_len; + u8_t nexth; + u8_t timer; +}; + +#define ip6_reass_init() /* Compatibility define */ +void ip6_reass_tmr(void); +struct pbuf *ip6_reass(struct pbuf *p); + +#endif /* LWIP_IPV6 && LWIP_IPV6_REASS */ + +#if LWIP_IPV6 && LWIP_IPV6_FRAG /* don't build if not configured for use in lwipopts.h */ + +#ifndef LWIP_PBUF_CUSTOM_REF_DEFINED +#define LWIP_PBUF_CUSTOM_REF_DEFINED +/** A custom pbuf that holds a reference to another pbuf, which is freed + * when this custom pbuf is freed. This is used to create a custom PBUF_REF + * that points into the original pbuf. */ +struct pbuf_custom_ref { + /** 'base class' */ + struct pbuf_custom pc; + /** pointer to the original pbuf that is referenced */ + struct pbuf *original; +}; +#endif /* LWIP_PBUF_CUSTOM_REF_DEFINED */ + +err_t ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest); + +#endif /* LWIP_IPV6 && LWIP_IPV6_FRAG */ + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_IP6_FRAG_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip_addr.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip_addr.h index 11f65d2..4e989bf 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip_addr.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/ip_addr.h @@ -1,407 +1,407 @@ -/** - * @file - * IP address API (common IPv4 and IPv6) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_IP_ADDR_H -#define LWIP_HDR_IP_ADDR_H - -#include "lwip/opt.h" -#include "lwip/def.h" - -#include "lwip/ip4_addr.h" -#include "lwip/ip6_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** @ingroup ipaddr - * IP address types for use in ip_addr_t.type member. - * @see tcp_new_ip_type(), udp_new_ip_type(), raw_new_ip_type(). - */ -enum lwip_ip_addr_type { - /** IPv4 */ - IPADDR_TYPE_V4 = 0U, - /** IPv6 */ - IPADDR_TYPE_V6 = 6U, - /** IPv4+IPv6 ("dual-stack") */ - IPADDR_TYPE_ANY = 46U -}; - -#if LWIP_IPV4 && LWIP_IPV6 -/** - * @ingroup ipaddr - * A union struct for both IP version's addresses. - * ATTENTION: watch out for its size when adding IPv6 address scope! - */ -typedef struct ip_addr { - union { - ip6_addr_t ip6; - ip4_addr_t ip4; - } u_addr; - /** @ref lwip_ip_addr_type */ - u8_t type; -} ip_addr_t; - -extern const ip_addr_t ip_addr_any_type; - -/** @ingroup ip4addr */ -#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 } -/** @ingroup ip4addr */ -#define IPADDR4_INIT_BYTES(a,b,c,d) IPADDR4_INIT(PP_HTONL(LWIP_MAKEU32(a,b,c,d))) -/** @ingroup ip6addr */ -#define IPADDR6_INIT(a, b, c, d) { { { { a, b, c, d } } }, IPADDR_TYPE_V6 } -/** @ingroup ip6addr */ -#define IPADDR6_INIT_HOST(a, b, c, d) { { { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } }, IPADDR_TYPE_V6 } - -/** @ingroup ipaddr */ -#define IP_IS_ANY_TYPE_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_ANY) -/** @ingroup ipaddr */ -#define IPADDR_ANY_TYPE_INIT { { { { 0ul, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_ANY } - -/** @ingroup ip4addr */ -#define IP_IS_V4_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V4) -/** @ingroup ip6addr */ -#define IP_IS_V6_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V6) -/** @ingroup ip4addr */ -#define IP_IS_V4(ipaddr) (((ipaddr) == NULL) || IP_IS_V4_VAL(*(ipaddr))) -/** @ingroup ip6addr */ -#define IP_IS_V6(ipaddr) (((ipaddr) != NULL) && IP_IS_V6_VAL(*(ipaddr))) - -#define IP_SET_TYPE_VAL(ipaddr, iptype) do { (ipaddr).type = (iptype); }while(0) -#define IP_SET_TYPE(ipaddr, iptype) do { if((ipaddr) != NULL) { IP_SET_TYPE_VAL(*(ipaddr), iptype); }}while(0) -#define IP_GET_TYPE(ipaddr) ((ipaddr)->type) - -#define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) (IP_GET_TYPE(&pcb->local_ip) == IP_GET_TYPE(ipaddr)) -#define IP_ADDR_PCB_VERSION_MATCH(pcb, ipaddr) (IP_IS_ANY_TYPE_VAL(pcb->local_ip) || IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr)) - -/** @ingroup ip6addr - * Convert generic ip address to specific protocol version - */ -#define ip_2_ip6(ipaddr) (&((ipaddr)->u_addr.ip6)) -/** @ingroup ip4addr - * Convert generic ip address to specific protocol version - */ -#define ip_2_ip4(ipaddr) (&((ipaddr)->u_addr.ip4)) - -/** @ingroup ip4addr */ -#define IP_ADDR4(ipaddr,a,b,c,d) do { IP4_ADDR(ip_2_ip4(ipaddr),a,b,c,d); \ - IP_SET_TYPE_VAL(*(ipaddr), IPADDR_TYPE_V4); } while(0) -/** @ingroup ip6addr */ -#define IP_ADDR6(ipaddr,i0,i1,i2,i3) do { IP6_ADDR(ip_2_ip6(ipaddr),i0,i1,i2,i3); \ - IP_SET_TYPE_VAL(*(ipaddr), IPADDR_TYPE_V6); } while(0) -/** @ingroup ip6addr */ -#define IP_ADDR6_HOST(ipaddr,i0,i1,i2,i3) IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3)) - -/** @ingroup ipaddr */ -#define ip_addr_copy(dest, src) do{ IP_SET_TYPE_VAL(dest, IP_GET_TYPE(&src)); if(IP_IS_V6_VAL(src)){ \ - ip6_addr_copy(*ip_2_ip6(&(dest)), *ip_2_ip6(&(src))); }else{ \ - ip4_addr_copy(*ip_2_ip4(&(dest)), *ip_2_ip4(&(src))); }}while(0) -/** @ingroup ip6addr */ -#define ip_addr_copy_from_ip6(dest, src) do{ \ - ip6_addr_copy(*ip_2_ip6(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V6); }while(0) -/** @ingroup ip4addr */ -#define ip_addr_copy_from_ip4(dest, src) do{ \ - ip4_addr_copy(*ip_2_ip4(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V4); }while(0) -/** @ingroup ip4addr */ -#define ip_addr_set_ip4_u32(ipaddr, val) do{if(ipaddr){ip4_addr_set_u32(ip_2_ip4(ipaddr), val); \ - IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) -/** @ingroup ip4addr */ -#define ip_addr_get_ip4_u32(ipaddr) (((ipaddr) && IP_IS_V4(ipaddr)) ? \ - ip4_addr_get_u32(ip_2_ip4(ipaddr)) : 0) -/** @ingroup ipaddr */ -#define ip_addr_set(dest, src) do{ IP_SET_TYPE(dest, IP_GET_TYPE(src)); if(IP_IS_V6(src)){ \ - ip6_addr_set(ip_2_ip6(dest), ip_2_ip6(src)); }else{ \ - ip4_addr_set(ip_2_ip4(dest), ip_2_ip4(src)); }}while(0) -/** @ingroup ipaddr */ -#define ip_addr_set_ipaddr(dest, src) ip_addr_set(dest, src) -/** @ingroup ipaddr */ -#define ip_addr_set_zero(ipaddr) do{ \ - ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, 0); }while(0) -/** @ingroup ip5addr */ -#define ip_addr_set_zero_ip4(ipaddr) do{ \ - ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }while(0) -/** @ingroup ip6addr */ -#define ip_addr_set_zero_ip6(ipaddr) do{ \ - ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }while(0) -/** @ingroup ipaddr */ -#define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \ - ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ - ip4_addr_set_any(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) -/** @ingroup ipaddr */ -#define ip_addr_set_loopback(is_ipv6, ipaddr) do{if(is_ipv6){ \ - ip6_addr_set_loopback(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ - ip4_addr_set_loopback(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) -/** @ingroup ipaddr */ -#define ip_addr_set_hton(dest, src) do{if(IP_IS_V6(src)){ \ - ip6_addr_set_hton(ip_2_ip6(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V6); }else{ \ - ip4_addr_set_hton(ip_2_ip4(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V4); }}while(0) -/** @ingroup ipaddr */ -#define ip_addr_get_network(target, host, netmask) do{if(IP_IS_V6(host)){ \ - ip4_addr_set_zero(ip_2_ip4(target)); IP_SET_TYPE(target, IPADDR_TYPE_V6); } else { \ - ip4_addr_get_network(ip_2_ip4(target), ip_2_ip4(host), ip_2_ip4(netmask)); IP_SET_TYPE(target, IPADDR_TYPE_V4); }}while(0) -/** @ingroup ipaddr */ -#define ip_addr_netcmp(addr1, addr2, mask) ((IP_IS_V6(addr1) && IP_IS_V6(addr2)) ? \ - 0 : \ - ip4_addr_netcmp(ip_2_ip4(addr1), ip_2_ip4(addr2), mask)) -/** @ingroup ipaddr */ -#define ip_addr_cmp(addr1, addr2) ((IP_GET_TYPE(addr1) != IP_GET_TYPE(addr2)) ? 0 : (IP_IS_V6_VAL(*(addr1)) ? \ - ip6_addr_cmp(ip_2_ip6(addr1), ip_2_ip6(addr2)) : \ - ip4_addr_cmp(ip_2_ip4(addr1), ip_2_ip4(addr2)))) -/** @ingroup ipaddr */ -#define ip_addr_isany(ipaddr) ((IP_IS_V6(ipaddr)) ? \ - ip6_addr_isany(ip_2_ip6(ipaddr)) : \ - ip4_addr_isany(ip_2_ip4(ipaddr))) -/** @ingroup ipaddr */ -#define ip_addr_isany_val(ipaddr) ((IP_IS_V6_VAL(ipaddr)) ? \ - ip6_addr_isany_val(*ip_2_ip6(&(ipaddr))) : \ - ip4_addr_isany_val(*ip_2_ip4(&(ipaddr)))) -/** @ingroup ipaddr */ -#define ip_addr_isbroadcast(ipaddr, netif) ((IP_IS_V6(ipaddr)) ? \ - 0 : \ - ip4_addr_isbroadcast(ip_2_ip4(ipaddr), netif)) -/** @ingroup ipaddr */ -#define ip_addr_ismulticast(ipaddr) ((IP_IS_V6(ipaddr)) ? \ - ip6_addr_ismulticast(ip_2_ip6(ipaddr)) : \ - ip4_addr_ismulticast(ip_2_ip4(ipaddr))) -/** @ingroup ipaddr */ -#define ip_addr_isloopback(ipaddr) ((IP_IS_V6(ipaddr)) ? \ - ip6_addr_isloopback(ip_2_ip6(ipaddr)) : \ - ip4_addr_isloopback(ip_2_ip4(ipaddr))) -/** @ingroup ipaddr */ -#define ip_addr_islinklocal(ipaddr) ((IP_IS_V6(ipaddr)) ? \ - ip6_addr_islinklocal(ip_2_ip6(ipaddr)) : \ - ip4_addr_islinklocal(ip_2_ip4(ipaddr))) -#define ip_addr_debug_print(debug, ipaddr) do { if(IP_IS_V6(ipaddr)) { \ - ip6_addr_debug_print(debug, ip_2_ip6(ipaddr)); } else { \ - ip4_addr_debug_print(debug, ip_2_ip4(ipaddr)); }}while(0) -#define ip_addr_debug_print_val(debug, ipaddr) do { if(IP_IS_V6_VAL(ipaddr)) { \ - ip6_addr_debug_print_val(debug, *ip_2_ip6(&(ipaddr))); } else { \ - ip4_addr_debug_print_val(debug, *ip_2_ip4(&(ipaddr))); }}while(0) -/** @ingroup ipaddr */ -#define ipaddr_ntoa(addr) (((addr) == NULL) ? "NULL" : \ - ((IP_IS_V6(addr)) ? ip6addr_ntoa(ip_2_ip6(addr)) : ip4addr_ntoa(ip_2_ip4(addr)))) -/** @ingroup ipaddr */ -#define ipaddr_ntoa_r(addr, buf, buflen) (((addr) == NULL) ? "NULL" : \ - ((IP_IS_V6(addr)) ? ip6addr_ntoa_r(ip_2_ip6(addr), buf, buflen) : ip4addr_ntoa_r(ip_2_ip4(addr), buf, buflen))) -int ipaddr_aton(const char *cp, ip_addr_t *addr); - -/** @ingroup ipaddr */ -#define IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX - -/** @ingroup ipaddr */ -#define ip4_2_ipv4_mapped_ipv6(ip6addr, ip4addr) do { \ - (ip6addr)->addr[3] = (ip4addr)->addr; \ - (ip6addr)->addr[2] = PP_HTONL(0x0000FFFFUL); \ - (ip6addr)->addr[1] = 0; \ - (ip6addr)->addr[0] = 0; } while(0); - -/** @ingroup ipaddr */ -#define unmap_ipv4_mapped_ipv6(ip4addr, ip6addr) \ - (ip4addr)->addr = (ip6addr)->addr[3]; - -#define IP46_ADDR_ANY(type) (((type) == IPADDR_TYPE_V6)? IP6_ADDR_ANY : IP4_ADDR_ANY) - -#else /* LWIP_IPV4 && LWIP_IPV6 */ - -#define IP_ADDR_PCB_VERSION_MATCH(addr, pcb) 1 -#define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) 1 - -#if LWIP_IPV4 - -typedef ip4_addr_t ip_addr_t; -#define IPADDR4_INIT(u32val) { u32val } -#define IPADDR4_INIT_BYTES(a,b,c,d) IPADDR4_INIT(PP_HTONL(LWIP_MAKEU32(a,b,c,d))) -#define IP_IS_V4_VAL(ipaddr) 1 -#define IP_IS_V6_VAL(ipaddr) 0 -#define IP_IS_V4(ipaddr) 1 -#define IP_IS_V6(ipaddr) 0 -#define IP_IS_ANY_TYPE_VAL(ipaddr) 0 -#define IP_SET_TYPE_VAL(ipaddr, iptype) -#define IP_SET_TYPE(ipaddr, iptype) -#define IP_GET_TYPE(ipaddr) IPADDR_TYPE_V4 -#define ip_2_ip4(ipaddr) (ipaddr) -#define IP_ADDR4(ipaddr,a,b,c,d) IP4_ADDR(ipaddr,a,b,c,d) - -#define ip_addr_copy(dest, src) ip4_addr_copy(dest, src) -#define ip_addr_copy_from_ip4(dest, src) ip4_addr_copy(dest, src) -#define ip_addr_set_ip4_u32(ipaddr, val) ip4_addr_set_u32(ip_2_ip4(ipaddr), val) -#define ip_addr_get_ip4_u32(ipaddr) ip4_addr_get_u32(ip_2_ip4(ipaddr)) -#define ip_addr_set(dest, src) ip4_addr_set(dest, src) -#define ip_addr_set_ipaddr(dest, src) ip4_addr_set(dest, src) -#define ip_addr_set_zero(ipaddr) ip4_addr_set_zero(ipaddr) -#define ip_addr_set_zero_ip4(ipaddr) ip4_addr_set_zero(ipaddr) -#define ip_addr_set_any(is_ipv6, ipaddr) ip4_addr_set_any(ipaddr) -#define ip_addr_set_loopback(is_ipv6, ipaddr) ip4_addr_set_loopback(ipaddr) -#define ip_addr_set_hton(dest, src) ip4_addr_set_hton(dest, src) -#define ip_addr_get_network(target, host, mask) ip4_addr_get_network(target, host, mask) -#define ip_addr_netcmp(addr1, addr2, mask) ip4_addr_netcmp(addr1, addr2, mask) -#define ip_addr_cmp(addr1, addr2) ip4_addr_cmp(addr1, addr2) -#define ip_addr_isany(ipaddr) ip4_addr_isany(ipaddr) -#define ip_addr_isany_val(ipaddr) ip4_addr_isany_val(ipaddr) -#define ip_addr_isloopback(ipaddr) ip4_addr_isloopback(ipaddr) -#define ip_addr_islinklocal(ipaddr) ip4_addr_islinklocal(ipaddr) -#define ip_addr_isbroadcast(addr, netif) ip4_addr_isbroadcast(addr, netif) -#define ip_addr_ismulticast(ipaddr) ip4_addr_ismulticast(ipaddr) -#define ip_addr_debug_print(debug, ipaddr) ip4_addr_debug_print(debug, ipaddr) -#define ip_addr_debug_print_val(debug, ipaddr) ip4_addr_debug_print_val(debug, ipaddr) -#define ipaddr_ntoa(ipaddr) ip4addr_ntoa(ipaddr) -#define ipaddr_ntoa_r(ipaddr, buf, buflen) ip4addr_ntoa_r(ipaddr, buf, buflen) -#define ipaddr_aton(cp, addr) ip4addr_aton(cp, addr) - -#define IPADDR_STRLEN_MAX IP4ADDR_STRLEN_MAX - -#define IP46_ADDR_ANY(type) (IP4_ADDR_ANY) - -#else /* LWIP_IPV4 */ - -typedef ip6_addr_t ip_addr_t; -#define IPADDR6_INIT(a, b, c, d) { { a, b, c, d } } -#define IPADDR6_INIT_HOST(a, b, c, d) { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } -#define IP_IS_V4_VAL(ipaddr) 0 -#define IP_IS_V6_VAL(ipaddr) 1 -#define IP_IS_V4(ipaddr) 0 -#define IP_IS_V6(ipaddr) 1 -#define IP_IS_ANY_TYPE_VAL(ipaddr) 0 -#define IP_SET_TYPE_VAL(ipaddr, iptype) -#define IP_SET_TYPE(ipaddr, iptype) -#define IP_GET_TYPE(ipaddr) IPADDR_TYPE_V6 -#define ip_2_ip6(ipaddr) (ipaddr) -#define IP_ADDR6(ipaddr,i0,i1,i2,i3) IP6_ADDR(ipaddr,i0,i1,i2,i3) -#define IP_ADDR6_HOST(ipaddr,i0,i1,i2,i3) IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3)) - -#define ip_addr_copy(dest, src) ip6_addr_copy(dest, src) -#define ip_addr_copy_from_ip6(dest, src) ip6_addr_copy(dest, src) -#define ip_addr_set(dest, src) ip6_addr_set(dest, src) -#define ip_addr_set_ipaddr(dest, src) ip6_addr_set(dest, src) -#define ip_addr_set_zero(ipaddr) ip6_addr_set_zero(ipaddr) -#define ip_addr_set_zero_ip6(ipaddr) ip6_addr_set_zero(ipaddr) -#define ip_addr_set_any(is_ipv6, ipaddr) ip6_addr_set_any(ipaddr) -#define ip_addr_set_loopback(is_ipv6, ipaddr) ip6_addr_set_loopback(ipaddr) -#define ip_addr_set_hton(dest, src) ip6_addr_set_hton(dest, src) -#define ip_addr_get_network(target, host, mask) ip6_addr_set_zero(target) -#define ip_addr_netcmp(addr1, addr2, mask) 0 -#define ip_addr_cmp(addr1, addr2) ip6_addr_cmp(addr1, addr2) -#define ip_addr_isany(ipaddr) ip6_addr_isany(ipaddr) -#define ip_addr_isany_val(ipaddr) ip6_addr_isany_val(ipaddr) -#define ip_addr_isloopback(ipaddr) ip6_addr_isloopback(ipaddr) -#define ip_addr_islinklocal(ipaddr) ip6_addr_islinklocal(ipaddr) -#define ip_addr_isbroadcast(addr, netif) 0 -#define ip_addr_ismulticast(ipaddr) ip6_addr_ismulticast(ipaddr) -#define ip_addr_debug_print(debug, ipaddr) ip6_addr_debug_print(debug, ipaddr) -#define ip_addr_debug_print_val(debug, ipaddr) ip6_addr_debug_print_val(debug, ipaddr) -#define ipaddr_ntoa(ipaddr) ip6addr_ntoa(ipaddr) -#define ipaddr_ntoa_r(ipaddr, buf, buflen) ip6addr_ntoa_r(ipaddr, buf, buflen) -#define ipaddr_aton(cp, addr) ip6addr_aton(cp, addr) - -#define IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX - -#define IP46_ADDR_ANY(type) (IP6_ADDR_ANY) - -#endif /* LWIP_IPV4 */ -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - -#if LWIP_IPV4 - -extern const ip_addr_t ip_addr_any; -extern const ip_addr_t ip_addr_broadcast; - -/** - * @ingroup ip4addr - * Can be used as a fixed/const ip_addr_t - * for the IP wildcard. - * Defined to @ref IP4_ADDR_ANY when IPv4 is enabled. - * Defined to @ref IP6_ADDR_ANY in IPv6 only systems. - * Use this if you can handle IPv4 _AND_ IPv6 addresses. - * Use @ref IP4_ADDR_ANY or @ref IP6_ADDR_ANY when the IP - * type matters. - */ -#define IP_ADDR_ANY IP4_ADDR_ANY -/** - * @ingroup ip4addr - * Can be used as a fixed/const ip_addr_t - * for the IPv4 wildcard and the broadcast address - */ -#define IP4_ADDR_ANY (&ip_addr_any) -/** - * @ingroup ip4addr - * Can be used as a fixed/const ip4_addr_t - * for the wildcard and the broadcast address - */ -#define IP4_ADDR_ANY4 (ip_2_ip4(&ip_addr_any)) - -/** @ingroup ip4addr */ -#define IP_ADDR_BROADCAST (&ip_addr_broadcast) -/** @ingroup ip4addr */ -#define IP4_ADDR_BROADCAST (ip_2_ip4(&ip_addr_broadcast)) - -#endif /* LWIP_IPV4*/ - -#if LWIP_IPV6 - -extern const ip_addr_t ip6_addr_any; - -/** - * @ingroup ip6addr - * IP6_ADDR_ANY can be used as a fixed ip_addr_t - * for the IPv6 wildcard address - */ -#define IP6_ADDR_ANY (&ip6_addr_any) -/** - * @ingroup ip6addr - * IP6_ADDR_ANY6 can be used as a fixed ip6_addr_t - * for the IPv6 wildcard address - */ -#define IP6_ADDR_ANY6 (ip_2_ip6(&ip6_addr_any)) - -#if !LWIP_IPV4 -/** IPv6-only configurations */ -#define IP_ADDR_ANY IP6_ADDR_ANY -#endif /* !LWIP_IPV4 */ - -#endif - -#if LWIP_IPV4 && LWIP_IPV6 -/** @ingroup ipaddr */ -#define IP_ANY_TYPE (&ip_addr_any_type) -#else -#define IP_ANY_TYPE IP_ADDR_ANY -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_IP_ADDR_H */ +/** + * @file + * IP address API (common IPv4 and IPv6) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_IP_ADDR_H +#define LWIP_HDR_IP_ADDR_H + +#include "lwip/opt.h" +#include "lwip/def.h" + +#include "lwip/ip4_addr.h" +#include "lwip/ip6_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @ingroup ipaddr + * IP address types for use in ip_addr_t.type member. + * @see tcp_new_ip_type(), udp_new_ip_type(), raw_new_ip_type(). + */ +enum lwip_ip_addr_type { + /** IPv4 */ + IPADDR_TYPE_V4 = 0U, + /** IPv6 */ + IPADDR_TYPE_V6 = 6U, + /** IPv4+IPv6 ("dual-stack") */ + IPADDR_TYPE_ANY = 46U +}; + +#if LWIP_IPV4 && LWIP_IPV6 +/** + * @ingroup ipaddr + * A union struct for both IP version's addresses. + * ATTENTION: watch out for its size when adding IPv6 address scope! + */ +typedef struct ip_addr { + union { + ip6_addr_t ip6; + ip4_addr_t ip4; + } u_addr; + /** @ref lwip_ip_addr_type */ + u8_t type; +} ip_addr_t; + +extern const ip_addr_t ip_addr_any_type; + +/** @ingroup ip4addr */ +#define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 } +/** @ingroup ip4addr */ +#define IPADDR4_INIT_BYTES(a,b,c,d) IPADDR4_INIT(PP_HTONL(LWIP_MAKEU32(a,b,c,d))) +/** @ingroup ip6addr */ +#define IPADDR6_INIT(a, b, c, d) { { { { a, b, c, d } } }, IPADDR_TYPE_V6 } +/** @ingroup ip6addr */ +#define IPADDR6_INIT_HOST(a, b, c, d) { { { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } }, IPADDR_TYPE_V6 } + +/** @ingroup ipaddr */ +#define IP_IS_ANY_TYPE_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_ANY) +/** @ingroup ipaddr */ +#define IPADDR_ANY_TYPE_INIT { { { { 0ul, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_ANY } + +/** @ingroup ip4addr */ +#define IP_IS_V4_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V4) +/** @ingroup ip6addr */ +#define IP_IS_V6_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V6) +/** @ingroup ip4addr */ +#define IP_IS_V4(ipaddr) (((ipaddr) == NULL) || IP_IS_V4_VAL(*(ipaddr))) +/** @ingroup ip6addr */ +#define IP_IS_V6(ipaddr) (((ipaddr) != NULL) && IP_IS_V6_VAL(*(ipaddr))) + +#define IP_SET_TYPE_VAL(ipaddr, iptype) do { (ipaddr).type = (iptype); }while(0) +#define IP_SET_TYPE(ipaddr, iptype) do { if((ipaddr) != NULL) { IP_SET_TYPE_VAL(*(ipaddr), iptype); }}while(0) +#define IP_GET_TYPE(ipaddr) ((ipaddr)->type) + +#define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) (IP_GET_TYPE(&pcb->local_ip) == IP_GET_TYPE(ipaddr)) +#define IP_ADDR_PCB_VERSION_MATCH(pcb, ipaddr) (IP_IS_ANY_TYPE_VAL(pcb->local_ip) || IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr)) + +/** @ingroup ip6addr + * Convert generic ip address to specific protocol version + */ +#define ip_2_ip6(ipaddr) (&((ipaddr)->u_addr.ip6)) +/** @ingroup ip4addr + * Convert generic ip address to specific protocol version + */ +#define ip_2_ip4(ipaddr) (&((ipaddr)->u_addr.ip4)) + +/** @ingroup ip4addr */ +#define IP_ADDR4(ipaddr,a,b,c,d) do { IP4_ADDR(ip_2_ip4(ipaddr),a,b,c,d); \ + IP_SET_TYPE_VAL(*(ipaddr), IPADDR_TYPE_V4); } while(0) +/** @ingroup ip6addr */ +#define IP_ADDR6(ipaddr,i0,i1,i2,i3) do { IP6_ADDR(ip_2_ip6(ipaddr),i0,i1,i2,i3); \ + IP_SET_TYPE_VAL(*(ipaddr), IPADDR_TYPE_V6); } while(0) +/** @ingroup ip6addr */ +#define IP_ADDR6_HOST(ipaddr,i0,i1,i2,i3) IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3)) + +/** @ingroup ipaddr */ +#define ip_addr_copy(dest, src) do{ IP_SET_TYPE_VAL(dest, IP_GET_TYPE(&src)); if(IP_IS_V6_VAL(src)){ \ + ip6_addr_copy(*ip_2_ip6(&(dest)), *ip_2_ip6(&(src))); }else{ \ + ip4_addr_copy(*ip_2_ip4(&(dest)), *ip_2_ip4(&(src))); }}while(0) +/** @ingroup ip6addr */ +#define ip_addr_copy_from_ip6(dest, src) do{ \ + ip6_addr_copy(*ip_2_ip6(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V6); }while(0) +/** @ingroup ip4addr */ +#define ip_addr_copy_from_ip4(dest, src) do{ \ + ip4_addr_copy(*ip_2_ip4(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V4); }while(0) +/** @ingroup ip4addr */ +#define ip_addr_set_ip4_u32(ipaddr, val) do{if(ipaddr){ip4_addr_set_u32(ip_2_ip4(ipaddr), val); \ + IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ip4addr */ +#define ip_addr_get_ip4_u32(ipaddr) (((ipaddr) && IP_IS_V4(ipaddr)) ? \ + ip4_addr_get_u32(ip_2_ip4(ipaddr)) : 0) +/** @ingroup ipaddr */ +#define ip_addr_set(dest, src) do{ IP_SET_TYPE(dest, IP_GET_TYPE(src)); if(IP_IS_V6(src)){ \ + ip6_addr_set(ip_2_ip6(dest), ip_2_ip6(src)); }else{ \ + ip4_addr_set(ip_2_ip4(dest), ip_2_ip4(src)); }}while(0) +/** @ingroup ipaddr */ +#define ip_addr_set_ipaddr(dest, src) ip_addr_set(dest, src) +/** @ingroup ipaddr */ +#define ip_addr_set_zero(ipaddr) do{ \ + ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, 0); }while(0) +/** @ingroup ip5addr */ +#define ip_addr_set_zero_ip4(ipaddr) do{ \ + ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }while(0) +/** @ingroup ip6addr */ +#define ip_addr_set_zero_ip6(ipaddr) do{ \ + ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }while(0) +/** @ingroup ipaddr */ +#define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \ + ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ + ip4_addr_set_any(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ +#define ip_addr_set_loopback(is_ipv6, ipaddr) do{if(is_ipv6){ \ + ip6_addr_set_loopback(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ + ip4_addr_set_loopback(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ +#define ip_addr_set_hton(dest, src) do{if(IP_IS_V6(src)){ \ + ip6_addr_set_hton(ip_2_ip6(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V6); }else{ \ + ip4_addr_set_hton(ip_2_ip4(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ +#define ip_addr_get_network(target, host, netmask) do{if(IP_IS_V6(host)){ \ + ip4_addr_set_zero(ip_2_ip4(target)); IP_SET_TYPE(target, IPADDR_TYPE_V6); } else { \ + ip4_addr_get_network(ip_2_ip4(target), ip_2_ip4(host), ip_2_ip4(netmask)); IP_SET_TYPE(target, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ +#define ip_addr_netcmp(addr1, addr2, mask) ((IP_IS_V6(addr1) && IP_IS_V6(addr2)) ? \ + 0 : \ + ip4_addr_netcmp(ip_2_ip4(addr1), ip_2_ip4(addr2), mask)) +/** @ingroup ipaddr */ +#define ip_addr_cmp(addr1, addr2) ((IP_GET_TYPE(addr1) != IP_GET_TYPE(addr2)) ? 0 : (IP_IS_V6_VAL(*(addr1)) ? \ + ip6_addr_cmp(ip_2_ip6(addr1), ip_2_ip6(addr2)) : \ + ip4_addr_cmp(ip_2_ip4(addr1), ip_2_ip4(addr2)))) +/** @ingroup ipaddr */ +#define ip_addr_isany(ipaddr) ((IP_IS_V6(ipaddr)) ? \ + ip6_addr_isany(ip_2_ip6(ipaddr)) : \ + ip4_addr_isany(ip_2_ip4(ipaddr))) +/** @ingroup ipaddr */ +#define ip_addr_isany_val(ipaddr) ((IP_IS_V6_VAL(ipaddr)) ? \ + ip6_addr_isany_val(*ip_2_ip6(&(ipaddr))) : \ + ip4_addr_isany_val(*ip_2_ip4(&(ipaddr)))) +/** @ingroup ipaddr */ +#define ip_addr_isbroadcast(ipaddr, netif) ((IP_IS_V6(ipaddr)) ? \ + 0 : \ + ip4_addr_isbroadcast(ip_2_ip4(ipaddr), netif)) +/** @ingroup ipaddr */ +#define ip_addr_ismulticast(ipaddr) ((IP_IS_V6(ipaddr)) ? \ + ip6_addr_ismulticast(ip_2_ip6(ipaddr)) : \ + ip4_addr_ismulticast(ip_2_ip4(ipaddr))) +/** @ingroup ipaddr */ +#define ip_addr_isloopback(ipaddr) ((IP_IS_V6(ipaddr)) ? \ + ip6_addr_isloopback(ip_2_ip6(ipaddr)) : \ + ip4_addr_isloopback(ip_2_ip4(ipaddr))) +/** @ingroup ipaddr */ +#define ip_addr_islinklocal(ipaddr) ((IP_IS_V6(ipaddr)) ? \ + ip6_addr_islinklocal(ip_2_ip6(ipaddr)) : \ + ip4_addr_islinklocal(ip_2_ip4(ipaddr))) +#define ip_addr_debug_print(debug, ipaddr) do { if(IP_IS_V6(ipaddr)) { \ + ip6_addr_debug_print(debug, ip_2_ip6(ipaddr)); } else { \ + ip4_addr_debug_print(debug, ip_2_ip4(ipaddr)); }}while(0) +#define ip_addr_debug_print_val(debug, ipaddr) do { if(IP_IS_V6_VAL(ipaddr)) { \ + ip6_addr_debug_print_val(debug, *ip_2_ip6(&(ipaddr))); } else { \ + ip4_addr_debug_print_val(debug, *ip_2_ip4(&(ipaddr))); }}while(0) +/** @ingroup ipaddr */ +#define ipaddr_ntoa(addr) (((addr) == NULL) ? "NULL" : \ + ((IP_IS_V6(addr)) ? ip6addr_ntoa(ip_2_ip6(addr)) : ip4addr_ntoa(ip_2_ip4(addr)))) +/** @ingroup ipaddr */ +#define ipaddr_ntoa_r(addr, buf, buflen) (((addr) == NULL) ? "NULL" : \ + ((IP_IS_V6(addr)) ? ip6addr_ntoa_r(ip_2_ip6(addr), buf, buflen) : ip4addr_ntoa_r(ip_2_ip4(addr), buf, buflen))) +int ipaddr_aton(const char *cp, ip_addr_t *addr); + +/** @ingroup ipaddr */ +#define IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX + +/** @ingroup ipaddr */ +#define ip4_2_ipv4_mapped_ipv6(ip6addr, ip4addr) do { \ + (ip6addr)->addr[3] = (ip4addr)->addr; \ + (ip6addr)->addr[2] = PP_HTONL(0x0000FFFFUL); \ + (ip6addr)->addr[1] = 0; \ + (ip6addr)->addr[0] = 0; } while(0); + +/** @ingroup ipaddr */ +#define unmap_ipv4_mapped_ipv6(ip4addr, ip6addr) \ + (ip4addr)->addr = (ip6addr)->addr[3]; + +#define IP46_ADDR_ANY(type) (((type) == IPADDR_TYPE_V6)? IP6_ADDR_ANY : IP4_ADDR_ANY) + +#else /* LWIP_IPV4 && LWIP_IPV6 */ + +#define IP_ADDR_PCB_VERSION_MATCH(addr, pcb) 1 +#define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) 1 + +#if LWIP_IPV4 + +typedef ip4_addr_t ip_addr_t; +#define IPADDR4_INIT(u32val) { u32val } +#define IPADDR4_INIT_BYTES(a,b,c,d) IPADDR4_INIT(PP_HTONL(LWIP_MAKEU32(a,b,c,d))) +#define IP_IS_V4_VAL(ipaddr) 1 +#define IP_IS_V6_VAL(ipaddr) 0 +#define IP_IS_V4(ipaddr) 1 +#define IP_IS_V6(ipaddr) 0 +#define IP_IS_ANY_TYPE_VAL(ipaddr) 0 +#define IP_SET_TYPE_VAL(ipaddr, iptype) +#define IP_SET_TYPE(ipaddr, iptype) +#define IP_GET_TYPE(ipaddr) IPADDR_TYPE_V4 +#define ip_2_ip4(ipaddr) (ipaddr) +#define IP_ADDR4(ipaddr,a,b,c,d) IP4_ADDR(ipaddr,a,b,c,d) + +#define ip_addr_copy(dest, src) ip4_addr_copy(dest, src) +#define ip_addr_copy_from_ip4(dest, src) ip4_addr_copy(dest, src) +#define ip_addr_set_ip4_u32(ipaddr, val) ip4_addr_set_u32(ip_2_ip4(ipaddr), val) +#define ip_addr_get_ip4_u32(ipaddr) ip4_addr_get_u32(ip_2_ip4(ipaddr)) +#define ip_addr_set(dest, src) ip4_addr_set(dest, src) +#define ip_addr_set_ipaddr(dest, src) ip4_addr_set(dest, src) +#define ip_addr_set_zero(ipaddr) ip4_addr_set_zero(ipaddr) +#define ip_addr_set_zero_ip4(ipaddr) ip4_addr_set_zero(ipaddr) +#define ip_addr_set_any(is_ipv6, ipaddr) ip4_addr_set_any(ipaddr) +#define ip_addr_set_loopback(is_ipv6, ipaddr) ip4_addr_set_loopback(ipaddr) +#define ip_addr_set_hton(dest, src) ip4_addr_set_hton(dest, src) +#define ip_addr_get_network(target, host, mask) ip4_addr_get_network(target, host, mask) +#define ip_addr_netcmp(addr1, addr2, mask) ip4_addr_netcmp(addr1, addr2, mask) +#define ip_addr_cmp(addr1, addr2) ip4_addr_cmp(addr1, addr2) +#define ip_addr_isany(ipaddr) ip4_addr_isany(ipaddr) +#define ip_addr_isany_val(ipaddr) ip4_addr_isany_val(ipaddr) +#define ip_addr_isloopback(ipaddr) ip4_addr_isloopback(ipaddr) +#define ip_addr_islinklocal(ipaddr) ip4_addr_islinklocal(ipaddr) +#define ip_addr_isbroadcast(addr, netif) ip4_addr_isbroadcast(addr, netif) +#define ip_addr_ismulticast(ipaddr) ip4_addr_ismulticast(ipaddr) +#define ip_addr_debug_print(debug, ipaddr) ip4_addr_debug_print(debug, ipaddr) +#define ip_addr_debug_print_val(debug, ipaddr) ip4_addr_debug_print_val(debug, ipaddr) +#define ipaddr_ntoa(ipaddr) ip4addr_ntoa(ipaddr) +#define ipaddr_ntoa_r(ipaddr, buf, buflen) ip4addr_ntoa_r(ipaddr, buf, buflen) +#define ipaddr_aton(cp, addr) ip4addr_aton(cp, addr) + +#define IPADDR_STRLEN_MAX IP4ADDR_STRLEN_MAX + +#define IP46_ADDR_ANY(type) (IP4_ADDR_ANY) + +#else /* LWIP_IPV4 */ + +typedef ip6_addr_t ip_addr_t; +#define IPADDR6_INIT(a, b, c, d) { { a, b, c, d } } +#define IPADDR6_INIT_HOST(a, b, c, d) { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } +#define IP_IS_V4_VAL(ipaddr) 0 +#define IP_IS_V6_VAL(ipaddr) 1 +#define IP_IS_V4(ipaddr) 0 +#define IP_IS_V6(ipaddr) 1 +#define IP_IS_ANY_TYPE_VAL(ipaddr) 0 +#define IP_SET_TYPE_VAL(ipaddr, iptype) +#define IP_SET_TYPE(ipaddr, iptype) +#define IP_GET_TYPE(ipaddr) IPADDR_TYPE_V6 +#define ip_2_ip6(ipaddr) (ipaddr) +#define IP_ADDR6(ipaddr,i0,i1,i2,i3) IP6_ADDR(ipaddr,i0,i1,i2,i3) +#define IP_ADDR6_HOST(ipaddr,i0,i1,i2,i3) IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3)) + +#define ip_addr_copy(dest, src) ip6_addr_copy(dest, src) +#define ip_addr_copy_from_ip6(dest, src) ip6_addr_copy(dest, src) +#define ip_addr_set(dest, src) ip6_addr_set(dest, src) +#define ip_addr_set_ipaddr(dest, src) ip6_addr_set(dest, src) +#define ip_addr_set_zero(ipaddr) ip6_addr_set_zero(ipaddr) +#define ip_addr_set_zero_ip6(ipaddr) ip6_addr_set_zero(ipaddr) +#define ip_addr_set_any(is_ipv6, ipaddr) ip6_addr_set_any(ipaddr) +#define ip_addr_set_loopback(is_ipv6, ipaddr) ip6_addr_set_loopback(ipaddr) +#define ip_addr_set_hton(dest, src) ip6_addr_set_hton(dest, src) +#define ip_addr_get_network(target, host, mask) ip6_addr_set_zero(target) +#define ip_addr_netcmp(addr1, addr2, mask) 0 +#define ip_addr_cmp(addr1, addr2) ip6_addr_cmp(addr1, addr2) +#define ip_addr_isany(ipaddr) ip6_addr_isany(ipaddr) +#define ip_addr_isany_val(ipaddr) ip6_addr_isany_val(ipaddr) +#define ip_addr_isloopback(ipaddr) ip6_addr_isloopback(ipaddr) +#define ip_addr_islinklocal(ipaddr) ip6_addr_islinklocal(ipaddr) +#define ip_addr_isbroadcast(addr, netif) 0 +#define ip_addr_ismulticast(ipaddr) ip6_addr_ismulticast(ipaddr) +#define ip_addr_debug_print(debug, ipaddr) ip6_addr_debug_print(debug, ipaddr) +#define ip_addr_debug_print_val(debug, ipaddr) ip6_addr_debug_print_val(debug, ipaddr) +#define ipaddr_ntoa(ipaddr) ip6addr_ntoa(ipaddr) +#define ipaddr_ntoa_r(ipaddr, buf, buflen) ip6addr_ntoa_r(ipaddr, buf, buflen) +#define ipaddr_aton(cp, addr) ip6addr_aton(cp, addr) + +#define IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX + +#define IP46_ADDR_ANY(type) (IP6_ADDR_ANY) + +#endif /* LWIP_IPV4 */ +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + +#if LWIP_IPV4 + +extern const ip_addr_t ip_addr_any; +extern const ip_addr_t ip_addr_broadcast; + +/** + * @ingroup ip4addr + * Can be used as a fixed/const ip_addr_t + * for the IP wildcard. + * Defined to @ref IP4_ADDR_ANY when IPv4 is enabled. + * Defined to @ref IP6_ADDR_ANY in IPv6 only systems. + * Use this if you can handle IPv4 _AND_ IPv6 addresses. + * Use @ref IP4_ADDR_ANY or @ref IP6_ADDR_ANY when the IP + * type matters. + */ +#define IP_ADDR_ANY IP4_ADDR_ANY +/** + * @ingroup ip4addr + * Can be used as a fixed/const ip_addr_t + * for the IPv4 wildcard and the broadcast address + */ +#define IP4_ADDR_ANY (&ip_addr_any) +/** + * @ingroup ip4addr + * Can be used as a fixed/const ip4_addr_t + * for the wildcard and the broadcast address + */ +#define IP4_ADDR_ANY4 (ip_2_ip4(&ip_addr_any)) + +/** @ingroup ip4addr */ +#define IP_ADDR_BROADCAST (&ip_addr_broadcast) +/** @ingroup ip4addr */ +#define IP4_ADDR_BROADCAST (ip_2_ip4(&ip_addr_broadcast)) + +#endif /* LWIP_IPV4*/ + +#if LWIP_IPV6 + +extern const ip_addr_t ip6_addr_any; + +/** + * @ingroup ip6addr + * IP6_ADDR_ANY can be used as a fixed ip_addr_t + * for the IPv6 wildcard address + */ +#define IP6_ADDR_ANY (&ip6_addr_any) +/** + * @ingroup ip6addr + * IP6_ADDR_ANY6 can be used as a fixed ip6_addr_t + * for the IPv6 wildcard address + */ +#define IP6_ADDR_ANY6 (ip_2_ip6(&ip6_addr_any)) + +#if !LWIP_IPV4 +/** IPv6-only configurations */ +#define IP_ADDR_ANY IP6_ADDR_ANY +#endif /* !LWIP_IPV4 */ + +#endif + +#if LWIP_IPV4 && LWIP_IPV6 +/** @ingroup ipaddr */ +#define IP_ANY_TYPE (&ip_addr_any_type) +#else +#define IP_ANY_TYPE IP_ADDR_ANY +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_IP_ADDR_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mem.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mem.h index ff208d2..424de91 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mem.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mem.h @@ -1,82 +1,82 @@ -/** - * @file - * Heap API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_MEM_H -#define LWIP_HDR_MEM_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if MEM_LIBC_MALLOC - -#include "lwip/arch.h" - -typedef size_t mem_size_t; -#define MEM_SIZE_F SZT_F - -#elif MEM_USE_POOLS - -typedef u16_t mem_size_t; -#define MEM_SIZE_F U16_F - -#else - -/* MEM_SIZE would have to be aligned, but using 64000 here instead of - * 65535 leaves some room for alignment... - */ -#if MEM_SIZE > 64000L -typedef u32_t mem_size_t; -#define MEM_SIZE_F U32_F -#else -typedef u16_t mem_size_t; -#define MEM_SIZE_F U16_F -#endif /* MEM_SIZE > 64000 */ -#endif - -void mem_init(void); -void *mem_trim(void *mem, mem_size_t size); -void *mem_malloc(mem_size_t size); -void *mem_calloc(mem_size_t count, mem_size_t size); -void mem_free(void *mem); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_MEM_H */ +/** + * @file + * Heap API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_MEM_H +#define LWIP_HDR_MEM_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if MEM_LIBC_MALLOC + +#include "lwip/arch.h" + +typedef size_t mem_size_t; +#define MEM_SIZE_F SZT_F + +#elif MEM_USE_POOLS + +typedef u16_t mem_size_t; +#define MEM_SIZE_F U16_F + +#else + +/* MEM_SIZE would have to be aligned, but using 64000 here instead of + * 65535 leaves some room for alignment... + */ +#if MEM_SIZE > 64000L +typedef u32_t mem_size_t; +#define MEM_SIZE_F U32_F +#else +typedef u16_t mem_size_t; +#define MEM_SIZE_F U16_F +#endif /* MEM_SIZE > 64000 */ +#endif + +void mem_init(void); +void *mem_trim(void *mem, mem_size_t size); +void *mem_malloc(mem_size_t size); +void *mem_calloc(mem_size_t count, mem_size_t size); +void mem_free(void *mem); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_MEM_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/memp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/memp.h index 562cd05..c45aca8 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/memp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/memp.h @@ -1,155 +1,155 @@ -/** - * @file - * Memory pool API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#ifndef LWIP_HDR_MEMP_H -#define LWIP_HDR_MEMP_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* run once with empty definition to handle all custom includes in lwippools.h */ -#define LWIP_MEMPOOL(name,num,size,desc) -#include "lwip/priv/memp_std.h" - -/** Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end */ -typedef enum { -#define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name, -#include "lwip/priv/memp_std.h" - MEMP_MAX -} memp_t; - -#include "lwip/priv/memp_priv.h" -#include "lwip/stats.h" - -extern const struct memp_desc* const memp_pools[MEMP_MAX]; - -/** - * @ingroup mempool - * Declare prototype for private memory pool if it is used in multiple files - */ -#define LWIP_MEMPOOL_PROTOTYPE(name) extern const struct memp_desc memp_ ## name - -#if MEMP_MEM_MALLOC - -#define LWIP_MEMPOOL_DECLARE(name,num,size,desc) \ - LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(memp_stats_ ## name) \ - const struct memp_desc memp_ ## name = { \ - DECLARE_LWIP_MEMPOOL_DESC(desc) \ - LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(memp_stats_ ## name) \ - LWIP_MEM_ALIGN_SIZE(size) \ - }; - -#else /* MEMP_MEM_MALLOC */ - -/** - * @ingroup mempool - * Declare a private memory pool - * Private mempools example: - * .h: only when pool is used in multiple .c files: LWIP_MEMPOOL_PROTOTYPE(my_private_pool); - * .c: - * - in global variables section: LWIP_MEMPOOL_DECLARE(my_private_pool, 10, sizeof(foo), "Some description") - * - call ONCE before using pool (e.g. in some init() function): LWIP_MEMPOOL_INIT(my_private_pool); - * - allocate: void* my_new_mem = LWIP_MEMPOOL_ALLOC(my_private_pool); - * - free: LWIP_MEMPOOL_FREE(my_private_pool, my_new_mem); - * - * To relocate a pool, declare it as extern in cc.h. Example for GCC: - * extern u8_t __attribute__((section(".onchip_mem"))) memp_memory_my_private_pool[]; - */ -#define LWIP_MEMPOOL_DECLARE(name,num,size,desc) \ - LWIP_DECLARE_MEMORY_ALIGNED(memp_memory_ ## name ## _base, ((num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size)))); \ - \ - LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(memp_stats_ ## name) \ - \ - static struct memp *memp_tab_ ## name; \ - \ - const struct memp_desc memp_ ## name = { \ - DECLARE_LWIP_MEMPOOL_DESC(desc) \ - LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(memp_stats_ ## name) \ - LWIP_MEM_ALIGN_SIZE(size), \ - (num), \ - memp_memory_ ## name ## _base, \ - &memp_tab_ ## name \ - }; - -#endif /* MEMP_MEM_MALLOC */ - -/** - * @ingroup mempool - * Initialize a private memory pool - */ -#define LWIP_MEMPOOL_INIT(name) memp_init_pool(&memp_ ## name) -/** - * @ingroup mempool - * Allocate from a private memory pool - */ -#define LWIP_MEMPOOL_ALLOC(name) memp_malloc_pool(&memp_ ## name) -/** - * @ingroup mempool - * Free element from a private memory pool - */ -#define LWIP_MEMPOOL_FREE(name, x) memp_free_pool(&memp_ ## name, (x)) - -#if MEM_USE_POOLS -/** This structure is used to save the pool one element came from. - * This has to be defined here as it is required for pool size calculation. */ -struct memp_malloc_helper -{ - memp_t poolnr; -#if MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) - u16_t size; -#endif /* MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) */ -}; -#endif /* MEM_USE_POOLS */ - -void memp_init(void); - -#if MEMP_OVERFLOW_CHECK -void *memp_malloc_fn(memp_t type, const char* file, const int line); -#define memp_malloc(t) memp_malloc_fn((t), __FILE__, __LINE__) -#else -void *memp_malloc(memp_t type); -#endif -void memp_free(memp_t type, void *mem); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_MEMP_H */ +/** + * @file + * Memory pool API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#ifndef LWIP_HDR_MEMP_H +#define LWIP_HDR_MEMP_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* run once with empty definition to handle all custom includes in lwippools.h */ +#define LWIP_MEMPOOL(name,num,size,desc) +#include "lwip/priv/memp_std.h" + +/** Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end */ +typedef enum { +#define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name, +#include "lwip/priv/memp_std.h" + MEMP_MAX +} memp_t; + +#include "lwip/priv/memp_priv.h" +#include "lwip/stats.h" + +extern const struct memp_desc* const memp_pools[MEMP_MAX]; + +/** + * @ingroup mempool + * Declare prototype for private memory pool if it is used in multiple files + */ +#define LWIP_MEMPOOL_PROTOTYPE(name) extern const struct memp_desc memp_ ## name + +#if MEMP_MEM_MALLOC + +#define LWIP_MEMPOOL_DECLARE(name,num,size,desc) \ + LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(memp_stats_ ## name) \ + const struct memp_desc memp_ ## name = { \ + DECLARE_LWIP_MEMPOOL_DESC(desc) \ + LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(memp_stats_ ## name) \ + LWIP_MEM_ALIGN_SIZE(size) \ + }; + +#else /* MEMP_MEM_MALLOC */ + +/** + * @ingroup mempool + * Declare a private memory pool + * Private mempools example: + * .h: only when pool is used in multiple .c files: LWIP_MEMPOOL_PROTOTYPE(my_private_pool); + * .c: + * - in global variables section: LWIP_MEMPOOL_DECLARE(my_private_pool, 10, sizeof(foo), "Some description") + * - call ONCE before using pool (e.g. in some init() function): LWIP_MEMPOOL_INIT(my_private_pool); + * - allocate: void* my_new_mem = LWIP_MEMPOOL_ALLOC(my_private_pool); + * - free: LWIP_MEMPOOL_FREE(my_private_pool, my_new_mem); + * + * To relocate a pool, declare it as extern in cc.h. Example for GCC: + * extern u8_t __attribute__((section(".onchip_mem"))) memp_memory_my_private_pool[]; + */ +#define LWIP_MEMPOOL_DECLARE(name,num,size,desc) \ + LWIP_DECLARE_MEMORY_ALIGNED(memp_memory_ ## name ## _base, ((num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size)))); \ + \ + LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(memp_stats_ ## name) \ + \ + static struct memp *memp_tab_ ## name; \ + \ + const struct memp_desc memp_ ## name = { \ + DECLARE_LWIP_MEMPOOL_DESC(desc) \ + LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(memp_stats_ ## name) \ + LWIP_MEM_ALIGN_SIZE(size), \ + (num), \ + memp_memory_ ## name ## _base, \ + &memp_tab_ ## name \ + }; + +#endif /* MEMP_MEM_MALLOC */ + +/** + * @ingroup mempool + * Initialize a private memory pool + */ +#define LWIP_MEMPOOL_INIT(name) memp_init_pool(&memp_ ## name) +/** + * @ingroup mempool + * Allocate from a private memory pool + */ +#define LWIP_MEMPOOL_ALLOC(name) memp_malloc_pool(&memp_ ## name) +/** + * @ingroup mempool + * Free element from a private memory pool + */ +#define LWIP_MEMPOOL_FREE(name, x) memp_free_pool(&memp_ ## name, (x)) + +#if MEM_USE_POOLS +/** This structure is used to save the pool one element came from. + * This has to be defined here as it is required for pool size calculation. */ +struct memp_malloc_helper +{ + memp_t poolnr; +#if MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) + u16_t size; +#endif /* MEMP_OVERFLOW_CHECK || (LWIP_STATS && MEM_STATS) */ +}; +#endif /* MEM_USE_POOLS */ + +void memp_init(void); + +#if MEMP_OVERFLOW_CHECK +void *memp_malloc_fn(memp_t type, const char* file, const int line); +#define memp_malloc(t) memp_malloc_fn((t), __FILE__, __LINE__) +#else +void *memp_malloc(memp_t type); +#endif +void memp_free(memp_t type, void *mem); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_MEMP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mld6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mld6.h index 7fa0797..f8c99d9 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mld6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/mld6.h @@ -1,99 +1,99 @@ -/** - * @file - * - * Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. - * No support for MLDv2. - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#ifndef LWIP_HDR_MLD6_H -#define LWIP_HDR_MLD6_H - -#include "lwip/opt.h" - -#if LWIP_IPV6_MLD && LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/netif.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** MLD group */ -struct mld_group { - /** next link */ - struct mld_group *next; - /** multicast address */ - ip6_addr_t group_address; - /** signifies we were the last person to report */ - u8_t last_reporter_flag; - /** current state of the group */ - u8_t group_state; - /** timer for reporting */ - u16_t timer; - /** counter of simultaneous uses */ - u8_t use; -}; - -#define MLD6_TMR_INTERVAL 100 /* Milliseconds */ - -err_t mld6_stop(struct netif *netif); -void mld6_report_groups(struct netif *netif); -void mld6_tmr(void); -struct mld_group *mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr); -void mld6_input(struct pbuf *p, struct netif *inp); -err_t mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr); -err_t mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr); -err_t mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr); -err_t mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr); - -/** @ingroup mld6 - * Get list head of MLD6 groups for netif. - * Note: The allnodes group IP is NOT in the list, since it must always - * be received for correct IPv6 operation. - * @see @ref netif_set_mld_mac_filter() - */ -#define netif_mld6_data(netif) ((struct mld_group *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6)) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV6_MLD && LWIP_IPV6 */ - -#endif /* LWIP_HDR_MLD6_H */ +/** + * @file + * + * Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. + * No support for MLDv2. + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_MLD6_H +#define LWIP_HDR_MLD6_H + +#include "lwip/opt.h" + +#if LWIP_IPV6_MLD && LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** MLD group */ +struct mld_group { + /** next link */ + struct mld_group *next; + /** multicast address */ + ip6_addr_t group_address; + /** signifies we were the last person to report */ + u8_t last_reporter_flag; + /** current state of the group */ + u8_t group_state; + /** timer for reporting */ + u16_t timer; + /** counter of simultaneous uses */ + u8_t use; +}; + +#define MLD6_TMR_INTERVAL 100 /* Milliseconds */ + +err_t mld6_stop(struct netif *netif); +void mld6_report_groups(struct netif *netif); +void mld6_tmr(void); +struct mld_group *mld6_lookfor_group(struct netif *ifp, const ip6_addr_t *addr); +void mld6_input(struct pbuf *p, struct netif *inp); +err_t mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr); +err_t mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr); +err_t mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr); +err_t mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr); + +/** @ingroup mld6 + * Get list head of MLD6 groups for netif. + * Note: The allnodes group IP is NOT in the list, since it must always + * be received for correct IPv6 operation. + * @see @ref netif_set_mld_mac_filter() + */ +#define netif_mld6_data(netif) ((struct mld_group *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6)) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6_MLD && LWIP_IPV6 */ + +#endif /* LWIP_HDR_MLD6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/nd6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/nd6.h index 8204fa4..3dc0278 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/nd6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/nd6.h @@ -1,84 +1,84 @@ -/** - * @file - * - * Neighbor discovery and stateless address autoconfiguration for IPv6. - * Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 - * (Address autoconfiguration). - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#ifndef LWIP_HDR_ND6_H -#define LWIP_HDR_ND6_H - -#include "lwip/opt.h" - -#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/ip6_addr.h" -#include "lwip/err.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** 1 second period */ -#define ND6_TMR_INTERVAL 1000 - -struct pbuf; -struct netif; - -void nd6_tmr(void); -void nd6_input(struct pbuf *p, struct netif *inp); -void nd6_clear_destination_cache(void); -struct netif *nd6_find_route(const ip6_addr_t *ip6addr); -err_t nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp); -u16_t nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif); -#if LWIP_ND6_TCP_REACHABILITY_HINTS -void nd6_reachability_hint(const ip6_addr_t *ip6addr); -#endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ -void nd6_cleanup_netif(struct netif *netif); -#if LWIP_IPV6_MLD -void nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state); -#endif /* LWIP_IPV6_MLD */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV6 */ - -#endif /* LWIP_HDR_ND6_H */ +/** + * @file + * + * Neighbor discovery and stateless address autoconfiguration for IPv6. + * Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 + * (Address autoconfiguration). + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_ND6_H +#define LWIP_HDR_ND6_H + +#include "lwip/opt.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/ip6_addr.h" +#include "lwip/err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** 1 second period */ +#define ND6_TMR_INTERVAL 1000 + +struct pbuf; +struct netif; + +void nd6_tmr(void); +void nd6_input(struct pbuf *p, struct netif *inp); +void nd6_clear_destination_cache(void); +struct netif *nd6_find_route(const ip6_addr_t *ip6addr); +err_t nd6_get_next_hop_addr_or_queue(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr, const u8_t **hwaddrp); +u16_t nd6_get_destination_mtu(const ip6_addr_t *ip6addr, struct netif *netif); +#if LWIP_ND6_TCP_REACHABILITY_HINTS +void nd6_reachability_hint(const ip6_addr_t *ip6addr); +#endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ +void nd6_cleanup_netif(struct netif *netif); +#if LWIP_IPV6_MLD +void nd6_adjust_mld_membership(struct netif *netif, s8_t addr_idx, u8_t new_state); +#endif /* LWIP_IPV6_MLD */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 */ + +#endif /* LWIP_HDR_ND6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netbuf.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netbuf.h index e6865f8..bfd7242 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netbuf.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netbuf.h @@ -1,118 +1,118 @@ -/** - * @file - * netbuf API (for netconn API) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_NETBUF_H -#define LWIP_HDR_NETBUF_H - -#include "lwip/opt.h" - -#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ -/* Note: Netconn API is always available when sockets are enabled - - * sockets are implemented on top of them */ - -#include "lwip/pbuf.h" -#include "lwip/ip_addr.h" -#include "lwip/ip6_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** This netbuf has dest-addr/port set */ -#define NETBUF_FLAG_DESTADDR 0x01 -/** This netbuf includes a checksum */ -#define NETBUF_FLAG_CHKSUM 0x02 - -/** "Network buffer" - contains data and addressing info */ -struct netbuf { - struct pbuf *p, *ptr; - ip_addr_t addr; - u16_t port; -#if LWIP_NETBUF_RECVINFO || LWIP_CHECKSUM_ON_COPY -#if LWIP_CHECKSUM_ON_COPY - u8_t flags; -#endif /* LWIP_CHECKSUM_ON_COPY */ - u16_t toport_chksum; -#if LWIP_NETBUF_RECVINFO - ip_addr_t toaddr; -#endif /* LWIP_NETBUF_RECVINFO */ -#endif /* LWIP_NETBUF_RECVINFO || LWIP_CHECKSUM_ON_COPY */ -}; - -/* Network buffer functions: */ -struct netbuf * netbuf_new (void); -void netbuf_delete (struct netbuf *buf); -void * netbuf_alloc (struct netbuf *buf, u16_t size); -void netbuf_free (struct netbuf *buf); -err_t netbuf_ref (struct netbuf *buf, - const void *dataptr, u16_t size); -void netbuf_chain (struct netbuf *head, struct netbuf *tail); - -err_t netbuf_data (struct netbuf *buf, - void **dataptr, u16_t *len); -s8_t netbuf_next (struct netbuf *buf); -void netbuf_first (struct netbuf *buf); - - -#define netbuf_copy_partial(buf, dataptr, len, offset) \ - pbuf_copy_partial((buf)->p, (dataptr), (len), (offset)) -#define netbuf_copy(buf,dataptr,len) netbuf_copy_partial(buf, dataptr, len, 0) -#define netbuf_take(buf, dataptr, len) pbuf_take((buf)->p, dataptr, len) -#define netbuf_len(buf) ((buf)->p->tot_len) -#define netbuf_fromaddr(buf) (&((buf)->addr)) -#define netbuf_set_fromaddr(buf, fromaddr) ip_addr_set(&((buf)->addr), fromaddr) -#define netbuf_fromport(buf) ((buf)->port) -#if LWIP_NETBUF_RECVINFO -#define netbuf_destaddr(buf) (&((buf)->toaddr)) -#define netbuf_set_destaddr(buf, destaddr) ip_addr_set(&((buf)->toaddr), destaddr) -#if LWIP_CHECKSUM_ON_COPY -#define netbuf_destport(buf) (((buf)->flags & NETBUF_FLAG_DESTADDR) ? (buf)->toport_chksum : 0) -#else /* LWIP_CHECKSUM_ON_COPY */ -#define netbuf_destport(buf) ((buf)->toport_chksum) -#endif /* LWIP_CHECKSUM_ON_COPY */ -#endif /* LWIP_NETBUF_RECVINFO */ -#if LWIP_CHECKSUM_ON_COPY -#define netbuf_set_chksum(buf, chksum) do { (buf)->flags = NETBUF_FLAG_CHKSUM; \ - (buf)->toport_chksum = chksum; } while(0) -#endif /* LWIP_CHECKSUM_ON_COPY */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_NETCONN || LWIP_SOCKET */ - -#endif /* LWIP_HDR_NETBUF_H */ +/** + * @file + * netbuf API (for netconn API) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_NETBUF_H +#define LWIP_HDR_NETBUF_H + +#include "lwip/opt.h" + +#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ +/* Note: Netconn API is always available when sockets are enabled - + * sockets are implemented on top of them */ + +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" +#include "lwip/ip6_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** This netbuf has dest-addr/port set */ +#define NETBUF_FLAG_DESTADDR 0x01 +/** This netbuf includes a checksum */ +#define NETBUF_FLAG_CHKSUM 0x02 + +/** "Network buffer" - contains data and addressing info */ +struct netbuf { + struct pbuf *p, *ptr; + ip_addr_t addr; + u16_t port; +#if LWIP_NETBUF_RECVINFO || LWIP_CHECKSUM_ON_COPY +#if LWIP_CHECKSUM_ON_COPY + u8_t flags; +#endif /* LWIP_CHECKSUM_ON_COPY */ + u16_t toport_chksum; +#if LWIP_NETBUF_RECVINFO + ip_addr_t toaddr; +#endif /* LWIP_NETBUF_RECVINFO */ +#endif /* LWIP_NETBUF_RECVINFO || LWIP_CHECKSUM_ON_COPY */ +}; + +/* Network buffer functions: */ +struct netbuf * netbuf_new (void); +void netbuf_delete (struct netbuf *buf); +void * netbuf_alloc (struct netbuf *buf, u16_t size); +void netbuf_free (struct netbuf *buf); +err_t netbuf_ref (struct netbuf *buf, + const void *dataptr, u16_t size); +void netbuf_chain (struct netbuf *head, struct netbuf *tail); + +err_t netbuf_data (struct netbuf *buf, + void **dataptr, u16_t *len); +s8_t netbuf_next (struct netbuf *buf); +void netbuf_first (struct netbuf *buf); + + +#define netbuf_copy_partial(buf, dataptr, len, offset) \ + pbuf_copy_partial((buf)->p, (dataptr), (len), (offset)) +#define netbuf_copy(buf,dataptr,len) netbuf_copy_partial(buf, dataptr, len, 0) +#define netbuf_take(buf, dataptr, len) pbuf_take((buf)->p, dataptr, len) +#define netbuf_len(buf) ((buf)->p->tot_len) +#define netbuf_fromaddr(buf) (&((buf)->addr)) +#define netbuf_set_fromaddr(buf, fromaddr) ip_addr_set(&((buf)->addr), fromaddr) +#define netbuf_fromport(buf) ((buf)->port) +#if LWIP_NETBUF_RECVINFO +#define netbuf_destaddr(buf) (&((buf)->toaddr)) +#define netbuf_set_destaddr(buf, destaddr) ip_addr_set(&((buf)->toaddr), destaddr) +#if LWIP_CHECKSUM_ON_COPY +#define netbuf_destport(buf) (((buf)->flags & NETBUF_FLAG_DESTADDR) ? (buf)->toport_chksum : 0) +#else /* LWIP_CHECKSUM_ON_COPY */ +#define netbuf_destport(buf) ((buf)->toport_chksum) +#endif /* LWIP_CHECKSUM_ON_COPY */ +#endif /* LWIP_NETBUF_RECVINFO */ +#if LWIP_CHECKSUM_ON_COPY +#define netbuf_set_chksum(buf, chksum) do { (buf)->flags = NETBUF_FLAG_CHKSUM; \ + (buf)->toport_chksum = chksum; } while(0) +#endif /* LWIP_CHECKSUM_ON_COPY */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_NETCONN || LWIP_SOCKET */ + +#endif /* LWIP_HDR_NETBUF_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netdb.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netdb.h index d3d15df..6aae914 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netdb.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netdb.h @@ -1,150 +1,150 @@ -/** - * @file - * NETDB API (sockets) - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Simon Goldschmidt - * - */ -#ifndef LWIP_HDR_NETDB_H -#define LWIP_HDR_NETDB_H - -#include "lwip/opt.h" - -#if LWIP_DNS && LWIP_SOCKET - -#include "lwip/arch.h" -#include "lwip/inet.h" -#include "lwip/sockets.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* some rarely used options */ -#ifndef LWIP_DNS_API_DECLARE_H_ERRNO -#define LWIP_DNS_API_DECLARE_H_ERRNO 1 -#endif - -#ifndef LWIP_DNS_API_DEFINE_ERRORS -#define LWIP_DNS_API_DEFINE_ERRORS 1 -#endif - -#ifndef LWIP_DNS_API_DEFINE_FLAGS -#define LWIP_DNS_API_DEFINE_FLAGS 1 -#endif - -#ifndef LWIP_DNS_API_DECLARE_STRUCTS -#define LWIP_DNS_API_DECLARE_STRUCTS 1 -#endif - -#if LWIP_DNS_API_DEFINE_ERRORS -/** Errors used by the DNS API functions, h_errno can be one of them */ -#define EAI_NONAME 200 -#define EAI_SERVICE 201 -#define EAI_FAIL 202 -#define EAI_MEMORY 203 -#define EAI_FAMILY 204 - -#define HOST_NOT_FOUND 210 -#define NO_DATA 211 -#define NO_RECOVERY 212 -#define TRY_AGAIN 213 -#endif /* LWIP_DNS_API_DEFINE_ERRORS */ - -#if LWIP_DNS_API_DEFINE_FLAGS -/* input flags for struct addrinfo */ -#define AI_PASSIVE 0x01 -#define AI_CANONNAME 0x02 -#define AI_NUMERICHOST 0x04 -#define AI_NUMERICSERV 0x08 -#define AI_V4MAPPED 0x10 -#define AI_ALL 0x20 -#define AI_ADDRCONFIG 0x40 -#endif /* LWIP_DNS_API_DEFINE_FLAGS */ - -#if LWIP_DNS_API_DECLARE_STRUCTS -struct hostent { - char *h_name; /* Official name of the host. */ - char **h_aliases; /* A pointer to an array of pointers to alternative host names, - terminated by a null pointer. */ - int h_addrtype; /* Address type. */ - int h_length; /* The length, in bytes, of the address. */ - char **h_addr_list; /* A pointer to an array of pointers to network addresses (in - network byte order) for the host, terminated by a null pointer. */ -#define h_addr h_addr_list[0] /* for backward compatibility */ -}; - -struct addrinfo { - int ai_flags; /* Input flags. */ - int ai_family; /* Address family of socket. */ - int ai_socktype; /* Socket type. */ - int ai_protocol; /* Protocol of socket. */ - socklen_t ai_addrlen; /* Length of socket address. */ - struct sockaddr *ai_addr; /* Socket address of socket. */ - char *ai_canonname; /* Canonical name of service location. */ - struct addrinfo *ai_next; /* Pointer to next in list. */ -}; -#endif /* LWIP_DNS_API_DECLARE_STRUCTS */ - -#define NETDB_ELEM_SIZE (sizeof(struct addrinfo) + sizeof(struct sockaddr_storage) + DNS_MAX_NAME_LENGTH + 1) - -#if LWIP_DNS_API_DECLARE_H_ERRNO -/* application accessible error code set by the DNS API functions */ -extern int h_errno; -#endif /* LWIP_DNS_API_DECLARE_H_ERRNO*/ - -struct hostent *lwip_gethostbyname(const char *name); -int lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, - size_t buflen, struct hostent **result, int *h_errnop); -void lwip_freeaddrinfo(struct addrinfo *ai); -int lwip_getaddrinfo(const char *nodename, - const char *servname, - const struct addrinfo *hints, - struct addrinfo **res); - -#if LWIP_COMPAT_SOCKETS -/** @ingroup netdbapi */ -#define gethostbyname(name) lwip_gethostbyname(name) -/** @ingroup netdbapi */ -#define gethostbyname_r(name, ret, buf, buflen, result, h_errnop) \ - lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop) -/** @ingroup netdbapi */ -#define freeaddrinfo(addrinfo) lwip_freeaddrinfo(addrinfo) -/** @ingroup netdbapi */ -#define getaddrinfo(nodname, servname, hints, res) \ - lwip_getaddrinfo(nodname, servname, hints, res) -#endif /* LWIP_COMPAT_SOCKETS */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_DNS && LWIP_SOCKET */ - -#endif /* LWIP_HDR_NETDB_H */ +/** + * @file + * NETDB API (sockets) + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_NETDB_H +#define LWIP_HDR_NETDB_H + +#include "lwip/opt.h" + +#if LWIP_DNS && LWIP_SOCKET + +#include "lwip/arch.h" +#include "lwip/inet.h" +#include "lwip/sockets.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* some rarely used options */ +#ifndef LWIP_DNS_API_DECLARE_H_ERRNO +#define LWIP_DNS_API_DECLARE_H_ERRNO 1 +#endif + +#ifndef LWIP_DNS_API_DEFINE_ERRORS +#define LWIP_DNS_API_DEFINE_ERRORS 1 +#endif + +#ifndef LWIP_DNS_API_DEFINE_FLAGS +#define LWIP_DNS_API_DEFINE_FLAGS 1 +#endif + +#ifndef LWIP_DNS_API_DECLARE_STRUCTS +#define LWIP_DNS_API_DECLARE_STRUCTS 1 +#endif + +#if LWIP_DNS_API_DEFINE_ERRORS +/** Errors used by the DNS API functions, h_errno can be one of them */ +#define EAI_NONAME 200 +#define EAI_SERVICE 201 +#define EAI_FAIL 202 +#define EAI_MEMORY 203 +#define EAI_FAMILY 204 + +#define HOST_NOT_FOUND 210 +#define NO_DATA 211 +#define NO_RECOVERY 212 +#define TRY_AGAIN 213 +#endif /* LWIP_DNS_API_DEFINE_ERRORS */ + +#if LWIP_DNS_API_DEFINE_FLAGS +/* input flags for struct addrinfo */ +#define AI_PASSIVE 0x01 +#define AI_CANONNAME 0x02 +#define AI_NUMERICHOST 0x04 +#define AI_NUMERICSERV 0x08 +#define AI_V4MAPPED 0x10 +#define AI_ALL 0x20 +#define AI_ADDRCONFIG 0x40 +#endif /* LWIP_DNS_API_DEFINE_FLAGS */ + +#if LWIP_DNS_API_DECLARE_STRUCTS +struct hostent { + char *h_name; /* Official name of the host. */ + char **h_aliases; /* A pointer to an array of pointers to alternative host names, + terminated by a null pointer. */ + int h_addrtype; /* Address type. */ + int h_length; /* The length, in bytes, of the address. */ + char **h_addr_list; /* A pointer to an array of pointers to network addresses (in + network byte order) for the host, terminated by a null pointer. */ +#define h_addr h_addr_list[0] /* for backward compatibility */ +}; + +struct addrinfo { + int ai_flags; /* Input flags. */ + int ai_family; /* Address family of socket. */ + int ai_socktype; /* Socket type. */ + int ai_protocol; /* Protocol of socket. */ + socklen_t ai_addrlen; /* Length of socket address. */ + struct sockaddr *ai_addr; /* Socket address of socket. */ + char *ai_canonname; /* Canonical name of service location. */ + struct addrinfo *ai_next; /* Pointer to next in list. */ +}; +#endif /* LWIP_DNS_API_DECLARE_STRUCTS */ + +#define NETDB_ELEM_SIZE (sizeof(struct addrinfo) + sizeof(struct sockaddr_storage) + DNS_MAX_NAME_LENGTH + 1) + +#if LWIP_DNS_API_DECLARE_H_ERRNO +/* application accessible error code set by the DNS API functions */ +extern int h_errno; +#endif /* LWIP_DNS_API_DECLARE_H_ERRNO*/ + +struct hostent *lwip_gethostbyname(const char *name); +int lwip_gethostbyname_r(const char *name, struct hostent *ret, char *buf, + size_t buflen, struct hostent **result, int *h_errnop); +void lwip_freeaddrinfo(struct addrinfo *ai); +int lwip_getaddrinfo(const char *nodename, + const char *servname, + const struct addrinfo *hints, + struct addrinfo **res); + +#if LWIP_COMPAT_SOCKETS +/** @ingroup netdbapi */ +#define gethostbyname(name) lwip_gethostbyname(name) +/** @ingroup netdbapi */ +#define gethostbyname_r(name, ret, buf, buflen, result, h_errnop) \ + lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop) +/** @ingroup netdbapi */ +#define freeaddrinfo(addrinfo) lwip_freeaddrinfo(addrinfo) +/** @ingroup netdbapi */ +#define getaddrinfo(nodname, servname, hints, res) \ + lwip_getaddrinfo(nodname, servname, hints, res) +#endif /* LWIP_COMPAT_SOCKETS */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_DNS && LWIP_SOCKET */ + +#endif /* LWIP_HDR_NETDB_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netif.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netif.h index 67a2d24..61bac9f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netif.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netif.h @@ -1,474 +1,474 @@ -/** - * @file - * netif API (to be used from TCPIP thread) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_NETIF_H -#define LWIP_HDR_NETIF_H - -#include "lwip/opt.h" - -#define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) - -#include "lwip/err.h" - -#include "lwip/ip_addr.h" - -#include "lwip/def.h" -#include "lwip/pbuf.h" -#include "lwip/stats.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Throughout this file, IP addresses are expected to be in - * the same byte order as in IP_PCB. */ - -/** Must be the maximum of all used hardware address lengths - across all types of interfaces in use. - This does not have to be changed, normally. */ -#ifndef NETIF_MAX_HWADDR_LEN -#define NETIF_MAX_HWADDR_LEN 6U -#endif - -/** - * @defgroup netif_flags Flags - * @ingroup netif - * @{ - */ - -/** Whether the network interface is 'up'. This is - * a software flag used to control whether this network - * interface is enabled and processes traffic. - * It must be set by the startup code before this netif can be used - * (also for dhcp/autoip). - */ -#define NETIF_FLAG_UP 0x01U -/** If set, the netif has broadcast capability. - * Set by the netif driver in its init function. */ -#define NETIF_FLAG_BROADCAST 0x02U -/** If set, the interface has an active link - * (set by the network interface driver). - * Either set by the netif driver in its init function (if the link - * is up at that time) or at a later point once the link comes up - * (if link detection is supported by the hardware). */ -#define NETIF_FLAG_LINK_UP 0x04U -/** If set, the netif is an ethernet device using ARP. - * Set by the netif driver in its init function. - * Used to check input packet types and use of DHCP. */ -#define NETIF_FLAG_ETHARP 0x08U -/** If set, the netif is an ethernet device. It might not use - * ARP or TCP/IP if it is used for PPPoE only. - */ -#define NETIF_FLAG_ETHERNET 0x10U -/** If set, the netif has IGMP capability. - * Set by the netif driver in its init function. */ -#define NETIF_FLAG_IGMP 0x20U -/** If set, the netif has MLD6 capability. - * Set by the netif driver in its init function. */ -#define NETIF_FLAG_MLD6 0x40U - -/** - * @} - */ - -enum lwip_internal_netif_client_data_index -{ -#if LWIP_DHCP - LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, -#endif -#if LWIP_AUTOIP - LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, -#endif -#if LWIP_IGMP - LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, -#endif -#if LWIP_IPV6_MLD - LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, -#endif - LWIP_NETIF_CLIENT_DATA_INDEX_MAX -}; - -#if LWIP_CHECKSUM_CTRL_PER_NETIF -#define NETIF_CHECKSUM_GEN_IP 0x0001 -#define NETIF_CHECKSUM_GEN_UDP 0x0002 -#define NETIF_CHECKSUM_GEN_TCP 0x0004 -#define NETIF_CHECKSUM_GEN_ICMP 0x0008 -#define NETIF_CHECKSUM_GEN_ICMP6 0x0010 -#define NETIF_CHECKSUM_CHECK_IP 0x0100 -#define NETIF_CHECKSUM_CHECK_UDP 0x0200 -#define NETIF_CHECKSUM_CHECK_TCP 0x0400 -#define NETIF_CHECKSUM_CHECK_ICMP 0x0800 -#define NETIF_CHECKSUM_CHECK_ICMP6 0x1000 -#define NETIF_CHECKSUM_ENABLE_ALL 0xFFFF -#define NETIF_CHECKSUM_DISABLE_ALL 0x0000 -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ - -struct netif; - -/** MAC Filter Actions, these are passed to a netif's igmp_mac_filter or - * mld_mac_filter callback function. */ -enum netif_mac_filter_action { - /** Delete a filter entry */ - NETIF_DEL_MAC_FILTER = 0, - /** Add a filter entry */ - NETIF_ADD_MAC_FILTER = 1 -}; - -/** Function prototype for netif init functions. Set up flags and output/linkoutput - * callback functions in this function. - * - * @param netif The netif to initialize - */ -typedef err_t (*netif_init_fn)(struct netif *netif); -/** Function prototype for netif->input functions. This function is saved as 'input' - * callback function in the netif struct. Call it when a packet has been received. - * - * @param p The received packet, copied into a pbuf - * @param inp The netif which received the packet - */ -typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp); - -#if LWIP_IPV4 -/** Function prototype for netif->output functions. Called by lwIP when a packet - * shall be sent. For ethernet netif, set this to 'etharp_output' and set - * 'linkoutput'. - * - * @param netif The netif which shall send a packet - * @param p The packet to send (p->payload points to IP header) - * @param ipaddr The IP address to which the packet shall be sent - */ -typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p, - const ip4_addr_t *ipaddr); -#endif /* LWIP_IPV4*/ - -#if LWIP_IPV6 -/** Function prototype for netif->output_ip6 functions. Called by lwIP when a packet - * shall be sent. For ethernet netif, set this to 'ethip6_output' and set - * 'linkoutput'. - * - * @param netif The netif which shall send a packet - * @param p The packet to send (p->payload points to IP header) - * @param ipaddr The IPv6 address to which the packet shall be sent - */ -typedef err_t (*netif_output_ip6_fn)(struct netif *netif, struct pbuf *p, - const ip6_addr_t *ipaddr); -#endif /* LWIP_IPV6 */ - -/** Function prototype for netif->linkoutput functions. Only used for ethernet - * netifs. This function is called by ARP when a packet shall be sent. - * - * @param netif The netif which shall send a packet - * @param p The packet to send (raw ethernet packet) - */ -typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p); -/** Function prototype for netif status- or link-callback functions. */ -typedef void (*netif_status_callback_fn)(struct netif *netif); -#if LWIP_IPV4 && LWIP_IGMP -/** Function prototype for netif igmp_mac_filter functions */ -typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif, - const ip4_addr_t *group, enum netif_mac_filter_action action); -#endif /* LWIP_IPV4 && LWIP_IGMP */ -#if LWIP_IPV6 && LWIP_IPV6_MLD -/** Function prototype for netif mld_mac_filter functions */ -typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif, - const ip6_addr_t *group, enum netif_mac_filter_action action); -#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ - -#if LWIP_DHCP || LWIP_AUTOIP || LWIP_IGMP || LWIP_IPV6_MLD || (LWIP_NUM_NETIF_CLIENT_DATA > 0) -u8_t netif_alloc_client_data_id(void); -/** @ingroup netif_cd - * Set client data. Obtain ID from netif_alloc_client_data_id(). - */ -#define netif_set_client_data(netif, id, data) netif_get_client_data(netif, id) = (data) -/** @ingroup netif_cd - * Get client data. Obtain ID from netif_alloc_client_data_id(). - */ -#define netif_get_client_data(netif, id) (netif)->client_data[(id)] -#endif /* LWIP_DHCP || LWIP_AUTOIP || (LWIP_NUM_NETIF_CLIENT_DATA > 0) */ - -/** Generic data structure used for all lwIP network interfaces. - * The following fields should be filled in by the initialization - * function for the device driver: hwaddr_len, hwaddr[], mtu, flags */ -struct netif { - /** pointer to next in linked list */ - struct netif *next; - -#if LWIP_IPV4 - /** IP address configuration in network byte order */ - ip_addr_t ip_addr; - ip_addr_t netmask; - ip_addr_t gw; -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 - /** Array of IPv6 addresses for this netif. */ - ip_addr_t ip6_addr[LWIP_IPV6_NUM_ADDRESSES]; - /** The state of each IPv6 address (Tentative, Preferred, etc). - * @see ip6_addr.h */ - u8_t ip6_addr_state[LWIP_IPV6_NUM_ADDRESSES]; -#endif /* LWIP_IPV6 */ - /** This function is called by the network device driver - * to pass a packet up the TCP/IP stack. */ - netif_input_fn input; -#if LWIP_IPV4 - /** This function is called by the IP module when it wants - * to send a packet on the interface. This function typically - * first resolves the hardware address, then sends the packet. - * For ethernet physical layer, this is usually etharp_output() */ - netif_output_fn output; -#endif /* LWIP_IPV4 */ - /** This function is called by ethernet_output() when it wants - * to send a packet on the interface. This function outputs - * the pbuf as-is on the link medium. */ - netif_linkoutput_fn linkoutput; -#if LWIP_IPV6 - /** This function is called by the IPv6 module when it wants - * to send a packet on the interface. This function typically - * first resolves the hardware address, then sends the packet. - * For ethernet physical layer, this is usually ethip6_output() */ - netif_output_ip6_fn output_ip6; -#endif /* LWIP_IPV6 */ -#if LWIP_NETIF_STATUS_CALLBACK - /** This function is called when the netif state is set to up or down - */ - netif_status_callback_fn status_callback; -#endif /* LWIP_NETIF_STATUS_CALLBACK */ -#if LWIP_NETIF_LINK_CALLBACK - /** This function is called when the netif link is set to up or down - */ - netif_status_callback_fn link_callback; -#endif /* LWIP_NETIF_LINK_CALLBACK */ -#if LWIP_NETIF_REMOVE_CALLBACK - /** This function is called when the netif has been removed */ - netif_status_callback_fn remove_callback; -#endif /* LWIP_NETIF_REMOVE_CALLBACK */ - /** This field can be set by the device driver and could point - * to state information for the device. */ - void *state; -#ifdef netif_get_client_data - void* client_data[LWIP_NETIF_CLIENT_DATA_INDEX_MAX + LWIP_NUM_NETIF_CLIENT_DATA]; -#endif -#if LWIP_IPV6_AUTOCONFIG - /** is this netif enabled for IPv6 autoconfiguration */ - u8_t ip6_autoconfig_enabled; -#endif /* LWIP_IPV6_AUTOCONFIG */ -#if LWIP_IPV6_SEND_ROUTER_SOLICIT - /** Number of Router Solicitation messages that remain to be sent. */ - u8_t rs_count; -#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ -#if LWIP_NETIF_HOSTNAME - /* the hostname for this netif, NULL is a valid value */ - const char* hostname; -#endif /* LWIP_NETIF_HOSTNAME */ -#if LWIP_CHECKSUM_CTRL_PER_NETIF - u16_t chksum_flags; -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ - /** maximum transfer unit (in bytes) */ - u16_t mtu; - /** number of bytes used in hwaddr */ - u8_t hwaddr_len; - /** link level hardware address of this interface */ - u8_t hwaddr[NETIF_MAX_HWADDR_LEN]; - /** flags (@see @ref netif_flags) */ - u8_t flags; - /** descriptive abbreviation */ - char name[2]; - /** number of this interface */ - u8_t num; -#if MIB2_STATS - /** link type (from "snmp_ifType" enum from snmp_mib2.h) */ - u8_t link_type; - /** (estimate) link speed */ - u32_t link_speed; - /** timestamp at last change made (up/down) */ - u32_t ts; - /** counters */ - struct stats_mib2_netif_ctrs mib2_counters; -#endif /* MIB2_STATS */ -#if LWIP_IPV4 && LWIP_IGMP - /** This function could be called to add or delete an entry in the multicast - filter table of the ethernet MAC.*/ - netif_igmp_mac_filter_fn igmp_mac_filter; -#endif /* LWIP_IPV4 && LWIP_IGMP */ -#if LWIP_IPV6 && LWIP_IPV6_MLD - /** This function could be called to add or delete an entry in the IPv6 multicast - filter table of the ethernet MAC. */ - netif_mld_mac_filter_fn mld_mac_filter; -#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ -#if LWIP_NETIF_HWADDRHINT - u8_t *addr_hint; -#endif /* LWIP_NETIF_HWADDRHINT */ -#if ENABLE_LOOPBACK - /* List of packets to be queued for ourselves. */ - struct pbuf *loop_first; - struct pbuf *loop_last; -#if LWIP_LOOPBACK_MAX_PBUFS - u16_t loop_cnt_current; -#endif /* LWIP_LOOPBACK_MAX_PBUFS */ -#endif /* ENABLE_LOOPBACK */ -}; - -#if LWIP_CHECKSUM_CTRL_PER_NETIF -#define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags) do { \ - (netif)->chksum_flags = chksumflags; } while(0) -#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) if (((netif) == NULL) || (((netif)->chksum_flags & (chksumflag)) != 0)) -#else /* LWIP_CHECKSUM_CTRL_PER_NETIF */ -#define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags) -#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) -#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ - -/** The list of network interfaces. */ -extern struct netif *netif_list; -/** The default network interface. */ -extern struct netif *netif_default; - -void netif_init(void); - -struct netif *netif_add(struct netif *netif, -#if LWIP_IPV4 - const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, -#endif /* LWIP_IPV4 */ - void *state, netif_init_fn init, netif_input_fn input); -#if LWIP_IPV4 -void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, - const ip4_addr_t *gw); -#endif /* LWIP_IPV4 */ -void netif_remove(struct netif * netif); - -/* Returns a network interface given its name. The name is of the form - "et0", where the first two letters are the "name" field in the - netif structure, and the digit is in the num field in the same - structure. */ -struct netif *netif_find(const char *name); - -void netif_set_default(struct netif *netif); - -#if LWIP_IPV4 -void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr); -void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask); -void netif_set_gw(struct netif *netif, const ip4_addr_t *gw); -/** @ingroup netif_ip4 */ -#define netif_ip4_addr(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr))) -/** @ingroup netif_ip4 */ -#define netif_ip4_netmask(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask))) -/** @ingroup netif_ip4 */ -#define netif_ip4_gw(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw))) -/** @ingroup netif_ip4 */ -#define netif_ip_addr4(netif) ((const ip_addr_t*)&((netif)->ip_addr)) -/** @ingroup netif_ip4 */ -#define netif_ip_netmask4(netif) ((const ip_addr_t*)&((netif)->netmask)) -/** @ingroup netif_ip4 */ -#define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw)) -#endif /* LWIP_IPV4 */ - -void netif_set_up(struct netif *netif); -void netif_set_down(struct netif *netif); -/** @ingroup netif - * Ask if an interface is up - */ -#define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0) - -#if LWIP_NETIF_STATUS_CALLBACK -void netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback); -#endif /* LWIP_NETIF_STATUS_CALLBACK */ -#if LWIP_NETIF_REMOVE_CALLBACK -void netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback); -#endif /* LWIP_NETIF_REMOVE_CALLBACK */ - -void netif_set_link_up(struct netif *netif); -void netif_set_link_down(struct netif *netif); -/** Ask if a link is up */ -#define netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0) - -#if LWIP_NETIF_LINK_CALLBACK -void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback); -#endif /* LWIP_NETIF_LINK_CALLBACK */ - -#if LWIP_NETIF_HOSTNAME -/** @ingroup netif */ -#define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0) -/** @ingroup netif */ -#define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL) -#endif /* LWIP_NETIF_HOSTNAME */ - -#if LWIP_IGMP -/** @ingroup netif */ -#define netif_set_igmp_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0) -#define netif_get_igmp_mac_filter(netif) (((netif) != NULL) ? ((netif)->igmp_mac_filter) : NULL) -#endif /* LWIP_IGMP */ - -#if LWIP_IPV6 && LWIP_IPV6_MLD -/** @ingroup netif */ -#define netif_set_mld_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->mld_mac_filter = function; }}while(0) -#define netif_get_mld_mac_filter(netif) (((netif) != NULL) ? ((netif)->mld_mac_filter) : NULL) -#define netif_mld_mac_filter(netif, addr, action) do { if((netif) && (netif)->mld_mac_filter) { (netif)->mld_mac_filter((netif), (addr), (action)); }}while(0) -#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ - -#if ENABLE_LOOPBACK -err_t netif_loop_output(struct netif *netif, struct pbuf *p); -void netif_poll(struct netif *netif); -#if !LWIP_NETIF_LOOPBACK_MULTITHREADING -void netif_poll_all(void); -#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */ -#endif /* ENABLE_LOOPBACK */ - -err_t netif_input(struct pbuf *p, struct netif *inp); - -#if LWIP_IPV6 -/** @ingroup netif_ip6 */ -#define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i]))) -/** @ingroup netif_ip6 */ -#define netif_ip6_addr(netif, i) ((const ip6_addr_t*)ip_2_ip6(&((netif)->ip6_addr[i]))) -void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6); -void netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3); -#define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i]) -void netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state); -s8_t netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr); -void netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit); -err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx); -#define netif_set_ip6_autoconfig_enabled(netif, action) do { if(netif) { (netif)->ip6_autoconfig_enabled = (action); }}while(0) -#endif /* LWIP_IPV6 */ - -#if LWIP_NETIF_HWADDRHINT -#define NETIF_SET_HWADDRHINT(netif, hint) ((netif)->addr_hint = (hint)) -#else /* LWIP_NETIF_HWADDRHINT */ -#define NETIF_SET_HWADDRHINT(netif, hint) -#endif /* LWIP_NETIF_HWADDRHINT */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_NETIF_H */ +/** + * @file + * netif API (to be used from TCPIP thread) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_NETIF_H +#define LWIP_HDR_NETIF_H + +#include "lwip/opt.h" + +#define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) + +#include "lwip/err.h" + +#include "lwip/ip_addr.h" + +#include "lwip/def.h" +#include "lwip/pbuf.h" +#include "lwip/stats.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Throughout this file, IP addresses are expected to be in + * the same byte order as in IP_PCB. */ + +/** Must be the maximum of all used hardware address lengths + across all types of interfaces in use. + This does not have to be changed, normally. */ +#ifndef NETIF_MAX_HWADDR_LEN +#define NETIF_MAX_HWADDR_LEN 6U +#endif + +/** + * @defgroup netif_flags Flags + * @ingroup netif + * @{ + */ + +/** Whether the network interface is 'up'. This is + * a software flag used to control whether this network + * interface is enabled and processes traffic. + * It must be set by the startup code before this netif can be used + * (also for dhcp/autoip). + */ +#define NETIF_FLAG_UP 0x01U +/** If set, the netif has broadcast capability. + * Set by the netif driver in its init function. */ +#define NETIF_FLAG_BROADCAST 0x02U +/** If set, the interface has an active link + * (set by the network interface driver). + * Either set by the netif driver in its init function (if the link + * is up at that time) or at a later point once the link comes up + * (if link detection is supported by the hardware). */ +#define NETIF_FLAG_LINK_UP 0x04U +/** If set, the netif is an ethernet device using ARP. + * Set by the netif driver in its init function. + * Used to check input packet types and use of DHCP. */ +#define NETIF_FLAG_ETHARP 0x08U +/** If set, the netif is an ethernet device. It might not use + * ARP or TCP/IP if it is used for PPPoE only. + */ +#define NETIF_FLAG_ETHERNET 0x10U +/** If set, the netif has IGMP capability. + * Set by the netif driver in its init function. */ +#define NETIF_FLAG_IGMP 0x20U +/** If set, the netif has MLD6 capability. + * Set by the netif driver in its init function. */ +#define NETIF_FLAG_MLD6 0x40U + +/** + * @} + */ + +enum lwip_internal_netif_client_data_index +{ +#if LWIP_DHCP + LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, +#endif +#if LWIP_AUTOIP + LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, +#endif +#if LWIP_IGMP + LWIP_NETIF_CLIENT_DATA_INDEX_IGMP, +#endif +#if LWIP_IPV6_MLD + LWIP_NETIF_CLIENT_DATA_INDEX_MLD6, +#endif + LWIP_NETIF_CLIENT_DATA_INDEX_MAX +}; + +#if LWIP_CHECKSUM_CTRL_PER_NETIF +#define NETIF_CHECKSUM_GEN_IP 0x0001 +#define NETIF_CHECKSUM_GEN_UDP 0x0002 +#define NETIF_CHECKSUM_GEN_TCP 0x0004 +#define NETIF_CHECKSUM_GEN_ICMP 0x0008 +#define NETIF_CHECKSUM_GEN_ICMP6 0x0010 +#define NETIF_CHECKSUM_CHECK_IP 0x0100 +#define NETIF_CHECKSUM_CHECK_UDP 0x0200 +#define NETIF_CHECKSUM_CHECK_TCP 0x0400 +#define NETIF_CHECKSUM_CHECK_ICMP 0x0800 +#define NETIF_CHECKSUM_CHECK_ICMP6 0x1000 +#define NETIF_CHECKSUM_ENABLE_ALL 0xFFFF +#define NETIF_CHECKSUM_DISABLE_ALL 0x0000 +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ + +struct netif; + +/** MAC Filter Actions, these are passed to a netif's igmp_mac_filter or + * mld_mac_filter callback function. */ +enum netif_mac_filter_action { + /** Delete a filter entry */ + NETIF_DEL_MAC_FILTER = 0, + /** Add a filter entry */ + NETIF_ADD_MAC_FILTER = 1 +}; + +/** Function prototype for netif init functions. Set up flags and output/linkoutput + * callback functions in this function. + * + * @param netif The netif to initialize + */ +typedef err_t (*netif_init_fn)(struct netif *netif); +/** Function prototype for netif->input functions. This function is saved as 'input' + * callback function in the netif struct. Call it when a packet has been received. + * + * @param p The received packet, copied into a pbuf + * @param inp The netif which received the packet + */ +typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp); + +#if LWIP_IPV4 +/** Function prototype for netif->output functions. Called by lwIP when a packet + * shall be sent. For ethernet netif, set this to 'etharp_output' and set + * 'linkoutput'. + * + * @param netif The netif which shall send a packet + * @param p The packet to send (p->payload points to IP header) + * @param ipaddr The IP address to which the packet shall be sent + */ +typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p, + const ip4_addr_t *ipaddr); +#endif /* LWIP_IPV4*/ + +#if LWIP_IPV6 +/** Function prototype for netif->output_ip6 functions. Called by lwIP when a packet + * shall be sent. For ethernet netif, set this to 'ethip6_output' and set + * 'linkoutput'. + * + * @param netif The netif which shall send a packet + * @param p The packet to send (p->payload points to IP header) + * @param ipaddr The IPv6 address to which the packet shall be sent + */ +typedef err_t (*netif_output_ip6_fn)(struct netif *netif, struct pbuf *p, + const ip6_addr_t *ipaddr); +#endif /* LWIP_IPV6 */ + +/** Function prototype for netif->linkoutput functions. Only used for ethernet + * netifs. This function is called by ARP when a packet shall be sent. + * + * @param netif The netif which shall send a packet + * @param p The packet to send (raw ethernet packet) + */ +typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p); +/** Function prototype for netif status- or link-callback functions. */ +typedef void (*netif_status_callback_fn)(struct netif *netif); +#if LWIP_IPV4 && LWIP_IGMP +/** Function prototype for netif igmp_mac_filter functions */ +typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif, + const ip4_addr_t *group, enum netif_mac_filter_action action); +#endif /* LWIP_IPV4 && LWIP_IGMP */ +#if LWIP_IPV6 && LWIP_IPV6_MLD +/** Function prototype for netif mld_mac_filter functions */ +typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif, + const ip6_addr_t *group, enum netif_mac_filter_action action); +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ + +#if LWIP_DHCP || LWIP_AUTOIP || LWIP_IGMP || LWIP_IPV6_MLD || (LWIP_NUM_NETIF_CLIENT_DATA > 0) +u8_t netif_alloc_client_data_id(void); +/** @ingroup netif_cd + * Set client data. Obtain ID from netif_alloc_client_data_id(). + */ +#define netif_set_client_data(netif, id, data) netif_get_client_data(netif, id) = (data) +/** @ingroup netif_cd + * Get client data. Obtain ID from netif_alloc_client_data_id(). + */ +#define netif_get_client_data(netif, id) (netif)->client_data[(id)] +#endif /* LWIP_DHCP || LWIP_AUTOIP || (LWIP_NUM_NETIF_CLIENT_DATA > 0) */ + +/** Generic data structure used for all lwIP network interfaces. + * The following fields should be filled in by the initialization + * function for the device driver: hwaddr_len, hwaddr[], mtu, flags */ +struct netif { + /** pointer to next in linked list */ + struct netif *next; + +#if LWIP_IPV4 + /** IP address configuration in network byte order */ + ip_addr_t ip_addr; + ip_addr_t netmask; + ip_addr_t gw; +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 + /** Array of IPv6 addresses for this netif. */ + ip_addr_t ip6_addr[LWIP_IPV6_NUM_ADDRESSES]; + /** The state of each IPv6 address (Tentative, Preferred, etc). + * @see ip6_addr.h */ + u8_t ip6_addr_state[LWIP_IPV6_NUM_ADDRESSES]; +#endif /* LWIP_IPV6 */ + /** This function is called by the network device driver + * to pass a packet up the TCP/IP stack. */ + netif_input_fn input; +#if LWIP_IPV4 + /** This function is called by the IP module when it wants + * to send a packet on the interface. This function typically + * first resolves the hardware address, then sends the packet. + * For ethernet physical layer, this is usually etharp_output() */ + netif_output_fn output; +#endif /* LWIP_IPV4 */ + /** This function is called by ethernet_output() when it wants + * to send a packet on the interface. This function outputs + * the pbuf as-is on the link medium. */ + netif_linkoutput_fn linkoutput; +#if LWIP_IPV6 + /** This function is called by the IPv6 module when it wants + * to send a packet on the interface. This function typically + * first resolves the hardware address, then sends the packet. + * For ethernet physical layer, this is usually ethip6_output() */ + netif_output_ip6_fn output_ip6; +#endif /* LWIP_IPV6 */ +#if LWIP_NETIF_STATUS_CALLBACK + /** This function is called when the netif state is set to up or down + */ + netif_status_callback_fn status_callback; +#endif /* LWIP_NETIF_STATUS_CALLBACK */ +#if LWIP_NETIF_LINK_CALLBACK + /** This function is called when the netif link is set to up or down + */ + netif_status_callback_fn link_callback; +#endif /* LWIP_NETIF_LINK_CALLBACK */ +#if LWIP_NETIF_REMOVE_CALLBACK + /** This function is called when the netif has been removed */ + netif_status_callback_fn remove_callback; +#endif /* LWIP_NETIF_REMOVE_CALLBACK */ + /** This field can be set by the device driver and could point + * to state information for the device. */ + void *state; +#ifdef netif_get_client_data + void* client_data[LWIP_NETIF_CLIENT_DATA_INDEX_MAX + LWIP_NUM_NETIF_CLIENT_DATA]; +#endif +#if LWIP_IPV6_AUTOCONFIG + /** is this netif enabled for IPv6 autoconfiguration */ + u8_t ip6_autoconfig_enabled; +#endif /* LWIP_IPV6_AUTOCONFIG */ +#if LWIP_IPV6_SEND_ROUTER_SOLICIT + /** Number of Router Solicitation messages that remain to be sent. */ + u8_t rs_count; +#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */ +#if LWIP_NETIF_HOSTNAME + /* the hostname for this netif, NULL is a valid value */ + const char* hostname; +#endif /* LWIP_NETIF_HOSTNAME */ +#if LWIP_CHECKSUM_CTRL_PER_NETIF + u16_t chksum_flags; +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ + /** maximum transfer unit (in bytes) */ + u16_t mtu; + /** number of bytes used in hwaddr */ + u8_t hwaddr_len; + /** link level hardware address of this interface */ + u8_t hwaddr[NETIF_MAX_HWADDR_LEN]; + /** flags (@see @ref netif_flags) */ + u8_t flags; + /** descriptive abbreviation */ + char name[2]; + /** number of this interface */ + u8_t num; +#if MIB2_STATS + /** link type (from "snmp_ifType" enum from snmp_mib2.h) */ + u8_t link_type; + /** (estimate) link speed */ + u32_t link_speed; + /** timestamp at last change made (up/down) */ + u32_t ts; + /** counters */ + struct stats_mib2_netif_ctrs mib2_counters; +#endif /* MIB2_STATS */ +#if LWIP_IPV4 && LWIP_IGMP + /** This function could be called to add or delete an entry in the multicast + filter table of the ethernet MAC.*/ + netif_igmp_mac_filter_fn igmp_mac_filter; +#endif /* LWIP_IPV4 && LWIP_IGMP */ +#if LWIP_IPV6 && LWIP_IPV6_MLD + /** This function could be called to add or delete an entry in the IPv6 multicast + filter table of the ethernet MAC. */ + netif_mld_mac_filter_fn mld_mac_filter; +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ +#if LWIP_NETIF_HWADDRHINT + u8_t *addr_hint; +#endif /* LWIP_NETIF_HWADDRHINT */ +#if ENABLE_LOOPBACK + /* List of packets to be queued for ourselves. */ + struct pbuf *loop_first; + struct pbuf *loop_last; +#if LWIP_LOOPBACK_MAX_PBUFS + u16_t loop_cnt_current; +#endif /* LWIP_LOOPBACK_MAX_PBUFS */ +#endif /* ENABLE_LOOPBACK */ +}; + +#if LWIP_CHECKSUM_CTRL_PER_NETIF +#define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags) do { \ + (netif)->chksum_flags = chksumflags; } while(0) +#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) if (((netif) == NULL) || (((netif)->chksum_flags & (chksumflag)) != 0)) +#else /* LWIP_CHECKSUM_CTRL_PER_NETIF */ +#define NETIF_SET_CHECKSUM_CTRL(netif, chksumflags) +#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag) +#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF */ + +/** The list of network interfaces. */ +extern struct netif *netif_list; +/** The default network interface. */ +extern struct netif *netif_default; + +void netif_init(void); + +struct netif *netif_add(struct netif *netif, +#if LWIP_IPV4 + const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, +#endif /* LWIP_IPV4 */ + void *state, netif_init_fn init, netif_input_fn input); +#if LWIP_IPV4 +void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, + const ip4_addr_t *gw); +#endif /* LWIP_IPV4 */ +void netif_remove(struct netif * netif); + +/* Returns a network interface given its name. The name is of the form + "et0", where the first two letters are the "name" field in the + netif structure, and the digit is in the num field in the same + structure. */ +struct netif *netif_find(const char *name); + +void netif_set_default(struct netif *netif); + +#if LWIP_IPV4 +void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr); +void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask); +void netif_set_gw(struct netif *netif, const ip4_addr_t *gw); +/** @ingroup netif_ip4 */ +#define netif_ip4_addr(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->ip_addr))) +/** @ingroup netif_ip4 */ +#define netif_ip4_netmask(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->netmask))) +/** @ingroup netif_ip4 */ +#define netif_ip4_gw(netif) ((const ip4_addr_t*)ip_2_ip4(&((netif)->gw))) +/** @ingroup netif_ip4 */ +#define netif_ip_addr4(netif) ((const ip_addr_t*)&((netif)->ip_addr)) +/** @ingroup netif_ip4 */ +#define netif_ip_netmask4(netif) ((const ip_addr_t*)&((netif)->netmask)) +/** @ingroup netif_ip4 */ +#define netif_ip_gw4(netif) ((const ip_addr_t*)&((netif)->gw)) +#endif /* LWIP_IPV4 */ + +void netif_set_up(struct netif *netif); +void netif_set_down(struct netif *netif); +/** @ingroup netif + * Ask if an interface is up + */ +#define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0) + +#if LWIP_NETIF_STATUS_CALLBACK +void netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_callback); +#endif /* LWIP_NETIF_STATUS_CALLBACK */ +#if LWIP_NETIF_REMOVE_CALLBACK +void netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_callback); +#endif /* LWIP_NETIF_REMOVE_CALLBACK */ + +void netif_set_link_up(struct netif *netif); +void netif_set_link_down(struct netif *netif); +/** Ask if a link is up */ +#define netif_is_link_up(netif) (((netif)->flags & NETIF_FLAG_LINK_UP) ? (u8_t)1 : (u8_t)0) + +#if LWIP_NETIF_LINK_CALLBACK +void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callback); +#endif /* LWIP_NETIF_LINK_CALLBACK */ + +#if LWIP_NETIF_HOSTNAME +/** @ingroup netif */ +#define netif_set_hostname(netif, name) do { if((netif) != NULL) { (netif)->hostname = name; }}while(0) +/** @ingroup netif */ +#define netif_get_hostname(netif) (((netif) != NULL) ? ((netif)->hostname) : NULL) +#endif /* LWIP_NETIF_HOSTNAME */ + +#if LWIP_IGMP +/** @ingroup netif */ +#define netif_set_igmp_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->igmp_mac_filter = function; }}while(0) +#define netif_get_igmp_mac_filter(netif) (((netif) != NULL) ? ((netif)->igmp_mac_filter) : NULL) +#endif /* LWIP_IGMP */ + +#if LWIP_IPV6 && LWIP_IPV6_MLD +/** @ingroup netif */ +#define netif_set_mld_mac_filter(netif, function) do { if((netif) != NULL) { (netif)->mld_mac_filter = function; }}while(0) +#define netif_get_mld_mac_filter(netif) (((netif) != NULL) ? ((netif)->mld_mac_filter) : NULL) +#define netif_mld_mac_filter(netif, addr, action) do { if((netif) && (netif)->mld_mac_filter) { (netif)->mld_mac_filter((netif), (addr), (action)); }}while(0) +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ + +#if ENABLE_LOOPBACK +err_t netif_loop_output(struct netif *netif, struct pbuf *p); +void netif_poll(struct netif *netif); +#if !LWIP_NETIF_LOOPBACK_MULTITHREADING +void netif_poll_all(void); +#endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */ +#endif /* ENABLE_LOOPBACK */ + +err_t netif_input(struct pbuf *p, struct netif *inp); + +#if LWIP_IPV6 +/** @ingroup netif_ip6 */ +#define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i]))) +/** @ingroup netif_ip6 */ +#define netif_ip6_addr(netif, i) ((const ip6_addr_t*)ip_2_ip6(&((netif)->ip6_addr[i]))) +void netif_ip6_addr_set(struct netif *netif, s8_t addr_idx, const ip6_addr_t *addr6); +void netif_ip6_addr_set_parts(struct netif *netif, s8_t addr_idx, u32_t i0, u32_t i1, u32_t i2, u32_t i3); +#define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i]) +void netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state); +s8_t netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr); +void netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit); +err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t *chosen_idx); +#define netif_set_ip6_autoconfig_enabled(netif, action) do { if(netif) { (netif)->ip6_autoconfig_enabled = (action); }}while(0) +#endif /* LWIP_IPV6 */ + +#if LWIP_NETIF_HWADDRHINT +#define NETIF_SET_HWADDRHINT(netif, hint) ((netif)->addr_hint = (hint)) +#else /* LWIP_NETIF_HWADDRHINT */ +#define NETIF_SET_HWADDRHINT(netif, hint) +#endif /* LWIP_NETIF_HWADDRHINT */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_NETIF_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netifapi.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netifapi.h index 8bd2b4f..6c1b56b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netifapi.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/netifapi.h @@ -1,140 +1,140 @@ -/** - * @file - * netif API (to be used from non-TCPIP threads) - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ -#ifndef LWIP_HDR_NETIFAPI_H -#define LWIP_HDR_NETIFAPI_H - -#include "lwip/opt.h" - -#if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/sys.h" -#include "lwip/netif.h" -#include "lwip/dhcp.h" -#include "lwip/autoip.h" -#include "lwip/priv/tcpip_priv.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_MPU_COMPATIBLE -#define NETIFAPI_IPADDR_DEF(type, m) type m -#else /* LWIP_MPU_COMPATIBLE */ -#define NETIFAPI_IPADDR_DEF(type, m) const type * m -#endif /* LWIP_MPU_COMPATIBLE */ - -typedef void (*netifapi_void_fn)(struct netif *netif); -typedef err_t (*netifapi_errt_fn)(struct netif *netif); - -struct netifapi_msg { - struct tcpip_api_call_data call; - struct netif *netif; - union { - struct { -#if LWIP_IPV4 - NETIFAPI_IPADDR_DEF(ip4_addr_t, ipaddr); - NETIFAPI_IPADDR_DEF(ip4_addr_t, netmask); - NETIFAPI_IPADDR_DEF(ip4_addr_t, gw); -#endif /* LWIP_IPV4 */ - void *state; - netif_init_fn init; - netif_input_fn input; - } add; - struct { - netifapi_void_fn voidfunc; - netifapi_errt_fn errtfunc; - } common; - } msg; -}; - - -/* API for application */ -err_t netifapi_netif_add(struct netif *netif, -#if LWIP_IPV4 - const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, -#endif /* LWIP_IPV4 */ - void *state, netif_init_fn init, netif_input_fn input); - -#if LWIP_IPV4 -err_t netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, - const ip4_addr_t *netmask, const ip4_addr_t *gw); -#endif /* LWIP_IPV4*/ - -err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, - netifapi_errt_fn errtfunc); - -/** @ingroup netifapi_netif */ -#define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) -/** @ingroup netifapi_netif */ -#define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) -/** @ingroup netifapi_netif */ -#define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) -/** @ingroup netifapi_netif */ -#define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) -/** @ingroup netifapi_netif */ -#define netifapi_netif_set_link_up(n) netifapi_netif_common(n, netif_set_link_up, NULL) -/** @ingroup netifapi_netif */ -#define netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL) - -/** - * @defgroup netifapi_dhcp4 DHCPv4 - * @ingroup netifapi - * To be called from non-TCPIP threads - */ -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) -/** @ingroup netifapi_dhcp4 */ -#define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) - -/** - * @defgroup netifapi_autoip AUTOIP - * @ingroup netifapi - * To be called from non-TCPIP threads - */ -/** @ingroup netifapi_autoip */ -#define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) -/** @ingroup netifapi_autoip */ -#define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_NETIF_API */ - -#endif /* LWIP_HDR_NETIFAPI_H */ +/** + * @file + * netif API (to be used from non-TCPIP threads) + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ +#ifndef LWIP_HDR_NETIFAPI_H +#define LWIP_HDR_NETIFAPI_H + +#include "lwip/opt.h" + +#if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/sys.h" +#include "lwip/netif.h" +#include "lwip/dhcp.h" +#include "lwip/autoip.h" +#include "lwip/priv/tcpip_priv.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_MPU_COMPATIBLE +#define NETIFAPI_IPADDR_DEF(type, m) type m +#else /* LWIP_MPU_COMPATIBLE */ +#define NETIFAPI_IPADDR_DEF(type, m) const type * m +#endif /* LWIP_MPU_COMPATIBLE */ + +typedef void (*netifapi_void_fn)(struct netif *netif); +typedef err_t (*netifapi_errt_fn)(struct netif *netif); + +struct netifapi_msg { + struct tcpip_api_call_data call; + struct netif *netif; + union { + struct { +#if LWIP_IPV4 + NETIFAPI_IPADDR_DEF(ip4_addr_t, ipaddr); + NETIFAPI_IPADDR_DEF(ip4_addr_t, netmask); + NETIFAPI_IPADDR_DEF(ip4_addr_t, gw); +#endif /* LWIP_IPV4 */ + void *state; + netif_init_fn init; + netif_input_fn input; + } add; + struct { + netifapi_void_fn voidfunc; + netifapi_errt_fn errtfunc; + } common; + } msg; +}; + + +/* API for application */ +err_t netifapi_netif_add(struct netif *netif, +#if LWIP_IPV4 + const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw, +#endif /* LWIP_IPV4 */ + void *state, netif_init_fn init, netif_input_fn input); + +#if LWIP_IPV4 +err_t netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, + const ip4_addr_t *netmask, const ip4_addr_t *gw); +#endif /* LWIP_IPV4*/ + +err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, + netifapi_errt_fn errtfunc); + +/** @ingroup netifapi_netif */ +#define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) +/** @ingroup netifapi_netif */ +#define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) +/** @ingroup netifapi_netif */ +#define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) +/** @ingroup netifapi_netif */ +#define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) +/** @ingroup netifapi_netif */ +#define netifapi_netif_set_link_up(n) netifapi_netif_common(n, netif_set_link_up, NULL) +/** @ingroup netifapi_netif */ +#define netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL) + +/** + * @defgroup netifapi_dhcp4 DHCPv4 + * @ingroup netifapi + * To be called from non-TCPIP threads + */ +/** @ingroup netifapi_dhcp4 */ +#define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) +/** @ingroup netifapi_dhcp4 */ +#define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) +/** @ingroup netifapi_dhcp4 */ +#define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) +/** @ingroup netifapi_dhcp4 */ +#define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) +/** @ingroup netifapi_dhcp4 */ +#define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) + +/** + * @defgroup netifapi_autoip AUTOIP + * @ingroup netifapi + * To be called from non-TCPIP threads + */ +/** @ingroup netifapi_autoip */ +#define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) +/** @ingroup netifapi_autoip */ +#define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_NETIF_API */ + +#endif /* LWIP_HDR_NETIFAPI_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/opt.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/opt.h index fd459af..c04dd5b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/opt.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/opt.h @@ -1,2876 +1,2876 @@ -/** - * @file - * - * lwIP Options Configuration - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -/* - * NOTE: || defined __DOXYGEN__ is a workaround for doxygen bug - - * without this, doxygen does not see the actual #define - */ - -#if !defined LWIP_HDR_OPT_H -#define LWIP_HDR_OPT_H - -/* - * Include user defined options first. Anything not defined in these files - * will be set to standard values. Override anything you don't like! - */ -#include "lwipopts.h" -#include "lwip/debug.h" - -/** - * @defgroup lwip_opts Options (lwipopts.h) - * @ingroup lwip - * - * @defgroup lwip_opts_debug Debugging - * @ingroup lwip_opts - * - * @defgroup lwip_opts_infrastructure Infrastructure - * @ingroup lwip_opts - * - * @defgroup lwip_opts_callback Callback-style APIs - * @ingroup lwip_opts - * - * @defgroup lwip_opts_threadsafe_apis Thread-safe APIs - * @ingroup lwip_opts - */ - - /* - ------------------------------------ - -------------- NO SYS -------------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_nosys NO_SYS - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * NO_SYS==1: Use lwIP without OS-awareness (no thread, semaphores, mutexes or - * mboxes). This means threaded APIs cannot be used (socket, netconn, - * i.e. everything in the 'api' folder), only the callback-style raw API is - * available (and you have to watch out for yourself that you don't access - * lwIP functions/structures from more than one context at a time!) - */ -#if !defined NO_SYS || defined __DOXYGEN__ -#define NO_SYS 0 -#endif -/** - * @} - */ - -/** - * @defgroup lwip_opts_timers Timers - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * LWIP_TIMERS==0: Drop support for sys_timeout and lwip-internal cyclic timers. - * (the array of lwip-internal cyclic timers is still provided) - * (check NO_SYS_NO_TIMERS for compatibility to old versions) - */ -#if !defined LWIP_TIMERS || defined __DOXYGEN__ -#ifdef NO_SYS_NO_TIMERS -#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) -#else -#define LWIP_TIMERS 1 -#endif -#endif - -/** - * LWIP_TIMERS_CUSTOM==1: Provide your own timer implementation. - * Function prototypes in timeouts.h and the array of lwip-internal cyclic timers - * are still included, but the implementation is not. The following functions - * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), - * sys_timeouts_mbox_fetch() - */ -#if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__ -#define LWIP_TIMERS_CUSTOM 0 -#endif -/** - * @} - */ - -/** - * @defgroup lwip_opts_memcpy memcpy - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * MEMCPY: override this if you have a faster implementation at hand than the - * one included in your C library - */ -#if !defined MEMCPY || defined __DOXYGEN__ -#define MEMCPY(dst,src,len) memcpy(dst,src,len) -#endif - -/** - * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a - * call to memcpy() if the length is known at compile time and is small. - */ -#if !defined SMEMCPY || defined __DOXYGEN__ -#define SMEMCPY(dst,src,len) memcpy(dst,src,len) -#endif -/** - * @} - */ - -/* - ------------------------------------ - ----------- Core locking ----------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_lock Core locking and MPU - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * LWIP_MPU_COMPATIBLE: enables special memory management mechanism - * which makes lwip able to work on MPU (Memory Protection Unit) system - * by not passing stack-pointers to other threads - * (this decreases performance as memory is allocated from pools instead - * of keeping it on the stack) - */ -#if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__ -#define LWIP_MPU_COMPATIBLE 0 -#endif - -/** - * LWIP_TCPIP_CORE_LOCKING - * Creates a global mutex that is held during TCPIP thread operations. - * Can be locked by client code to perform lwIP operations without changing - * into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and - * UNLOCK_TCPIP_CORE(). - * Your system should provide mutexes supporting priority inversion to use this. - */ -#if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ -#define LWIP_TCPIP_CORE_LOCKING 1 -#endif - -/** - * LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled, - * this lets tcpip_input() grab the mutex for input packets as well, - * instead of allocating a message and passing it to tcpip_thread. - * - * ATTENTION: this does not work when tcpip_input() is called from - * interrupt context! - */ -#if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ -#define LWIP_TCPIP_CORE_LOCKING_INPUT 0 -#endif - -/** - * SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt - * protection) for certain critical regions during buffer allocation, deallocation - * and memory allocation and deallocation. - * ATTENTION: This is required when using lwIP from more than one context! If - * you disable this, you must be sure what you are doing! - */ -#if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ -#define SYS_LIGHTWEIGHT_PROT 1 -#endif -/** - * @} - */ - -/* - ------------------------------------ - ---------- Memory options ---------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_mem Heap and memory pools - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library - * instead of the lwip internal allocator. Can save code size if you - * already use it. - */ -#if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__ -#define MEM_LIBC_MALLOC 0 -#endif - -/** - * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator. - * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution - * speed (heap alloc can be much slower than pool alloc) and usage from interrupts - * (especially if your netif driver allocates PBUF_POOL pbufs for received frames - * from interrupt)! - * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools, - * not only for internal pools defined in memp_std.h)! - */ -#if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__ -#define MEMP_MEM_MALLOC 0 -#endif - -/** - * MEM_ALIGNMENT: should be set to the alignment of the CPU - * 4 byte alignment -> \#define MEM_ALIGNMENT 4 - * 2 byte alignment -> \#define MEM_ALIGNMENT 2 - */ -#if !defined MEM_ALIGNMENT || defined __DOXYGEN__ -#define MEM_ALIGNMENT 1 -#endif - -/** - * MEM_SIZE: the size of the heap memory. If the application will send - * a lot of data that needs to be copied, this should be set high. - */ -#if !defined MEM_SIZE || defined __DOXYGEN__ -#define MEM_SIZE 1600 -#endif - -/** - * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable - * amount of bytes before and after each memp element in every pool and fills - * it with a prominent default value. - * MEMP_OVERFLOW_CHECK == 0 no checking - * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed - * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time - * memp_malloc() or memp_free() is called (useful but slow!) - */ -#if !defined MEMP_OVERFLOW_CHECK || defined __DOXYGEN__ -#define MEMP_OVERFLOW_CHECK 0 -#endif - -/** - * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make - * sure that there are no cycles in the linked lists. - */ -#if !defined MEMP_SANITY_CHECK || defined __DOXYGEN__ -#define MEMP_SANITY_CHECK 0 -#endif - -/** - * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set - * of memory pools of various sizes. When mem_malloc is called, an element of - * the smallest pool that can provide the length needed is returned. - * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. - */ -#if !defined MEM_USE_POOLS || defined __DOXYGEN__ -#define MEM_USE_POOLS 0 -#endif - -/** - * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next - * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more - * reliable. */ -#if !defined MEM_USE_POOLS_TRY_BIGGER_POOL || defined __DOXYGEN__ -#define MEM_USE_POOLS_TRY_BIGGER_POOL 0 -#endif - -/** - * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h - * that defines additional pools beyond the "standard" ones required - * by lwIP. If you set this to 1, you must have lwippools.h in your - * include path somewhere. - */ -#if !defined MEMP_USE_CUSTOM_POOLS || defined __DOXYGEN__ -#define MEMP_USE_CUSTOM_POOLS 0 -#endif - -/** - * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from - * interrupt context (or another context that doesn't allow waiting for a - * semaphore). - * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT, - * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs - * with each loop so that mem_free can run. - * - * ATTENTION: As you can see from the above description, this leads to dis-/ - * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc - * can need longer. - * - * If you don't want that, at least for NO_SYS=0, you can still use the following - * functions to enqueue a deallocation call which then runs in the tcpip_thread - * context: - * - pbuf_free_callback(p); - * - mem_free_callback(m); - */ -#if !defined LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT || defined __DOXYGEN__ -#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 -#endif -/** - * @} - */ - -/* - ------------------------------------------------ - ---------- Internal Memory Pool Sizes ---------- - ------------------------------------------------ -*/ -/** - * @defgroup lwip_opts_memp Internal memory pools - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). - * If the application sends a lot of data out of ROM (or other static memory), - * this should be set high. - */ -#if !defined MEMP_NUM_PBUF || defined __DOXYGEN__ -#define MEMP_NUM_PBUF 16 -#endif - -/** - * MEMP_NUM_RAW_PCB: Number of raw connection PCBs - * (requires the LWIP_RAW option) - */ -#if !defined MEMP_NUM_RAW_PCB || defined __DOXYGEN__ -#define MEMP_NUM_RAW_PCB 4 -#endif - -/** - * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One - * per active UDP "connection". - * (requires the LWIP_UDP option) - */ -#if !defined MEMP_NUM_UDP_PCB || defined __DOXYGEN__ -#define MEMP_NUM_UDP_PCB 4 -#endif - -/** - * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. - * (requires the LWIP_TCP option) - */ -#if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__ -#define MEMP_NUM_TCP_PCB 5 -#endif - -/** - * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. - * (requires the LWIP_TCP option) - */ -#if !defined MEMP_NUM_TCP_PCB_LISTEN || defined __DOXYGEN__ -#define MEMP_NUM_TCP_PCB_LISTEN 8 -#endif - -/** - * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. - * (requires the LWIP_TCP option) - */ -#if !defined MEMP_NUM_TCP_SEG || defined __DOXYGEN__ -#define MEMP_NUM_TCP_SEG 16 -#endif - -/** - * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for - * reassembly (whole packets, not fragments!) - */ -#if !defined MEMP_NUM_REASSDATA || defined __DOXYGEN__ -#define MEMP_NUM_REASSDATA 5 -#endif - -/** - * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent - * (fragments, not whole packets!). - * This is only used with LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 - * with DMA-enabled MACs where the packet is not yet sent when netif->output - * returns. - */ -#if !defined MEMP_NUM_FRAG_PBUF || defined __DOXYGEN__ -#define MEMP_NUM_FRAG_PBUF 15 -#endif - -/** - * MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing - * packets (pbufs) that are waiting for an ARP request (to resolve - * their destination address) to finish. - * (requires the ARP_QUEUEING option) - */ -#if !defined MEMP_NUM_ARP_QUEUE || defined __DOXYGEN__ -#define MEMP_NUM_ARP_QUEUE 30 -#endif - -/** - * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces - * can be members at the same time (one per netif - allsystems group -, plus one - * per netif membership). - * (requires the LWIP_IGMP option) - */ -#if !defined MEMP_NUM_IGMP_GROUP || defined __DOXYGEN__ -#define MEMP_NUM_IGMP_GROUP 8 -#endif - -/** - * MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts. - * The default number of timeouts is calculated here for all enabled modules. - * The formula expects settings to be either '0' or '1'. - */ -#if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__ -#define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) -#endif - -/** - * MEMP_NUM_NETBUF: the number of struct netbufs. - * (only needed if you use the sequential API, like api_lib.c) - */ -#if !defined MEMP_NUM_NETBUF || defined __DOXYGEN__ -#define MEMP_NUM_NETBUF 2 -#endif - -/** - * MEMP_NUM_NETCONN: the number of struct netconns. - * (only needed if you use the sequential API, like api_lib.c) - */ -#if !defined MEMP_NUM_NETCONN || defined __DOXYGEN__ -#define MEMP_NUM_NETCONN 4 -#endif - -/** - * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used - * for callback/timeout API communication. - * (only needed if you use tcpip.c) - */ -#if !defined MEMP_NUM_TCPIP_MSG_API || defined __DOXYGEN__ -#define MEMP_NUM_TCPIP_MSG_API 8 -#endif - -/** - * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used - * for incoming packets. - * (only needed if you use tcpip.c) - */ -#if !defined MEMP_NUM_TCPIP_MSG_INPKT || defined __DOXYGEN__ -#define MEMP_NUM_TCPIP_MSG_INPKT 8 -#endif - -/** - * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls - * (before freeing the corresponding memory using lwip_freeaddrinfo()). - */ -#if !defined MEMP_NUM_NETDB || defined __DOXYGEN__ -#define MEMP_NUM_NETDB 1 -#endif - -/** - * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list - * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. - */ -#if !defined MEMP_NUM_LOCALHOSTLIST || defined __DOXYGEN__ -#define MEMP_NUM_LOCALHOSTLIST 1 -#endif - -/** - * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. - */ -#if !defined PBUF_POOL_SIZE || defined __DOXYGEN__ -#define PBUF_POOL_SIZE 16 -#endif - -/** MEMP_NUM_API_MSG: the number of concurrently active calls to various - * socket, netconn, and tcpip functions - */ -#if !defined MEMP_NUM_API_MSG || defined __DOXYGEN__ -#define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API -#endif - -/** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname - */ -#if !defined MEMP_NUM_DNS_API_MSG || defined __DOXYGEN__ -#define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API -#endif - -/** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls - * to getsockopt/setsockopt - */ -#if !defined MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA || defined __DOXYGEN__ -#define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API -#endif - -/** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the - * netifapi functions - */ -#if !defined MEMP_NUM_NETIFAPI_MSG || defined __DOXYGEN__ -#define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API -#endif -/** - * @} - */ - -/* - --------------------------------- - ---------- ARP options ---------- - --------------------------------- -*/ -/** - * @defgroup lwip_opts_arp ARP - * @ingroup lwip_opts_ipv4 - * @{ - */ -/** - * LWIP_ARP==1: Enable ARP functionality. - */ -#if !defined LWIP_ARP || defined __DOXYGEN__ -#define LWIP_ARP 1 -#endif - -/** - * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. - */ -#if !defined ARP_TABLE_SIZE || defined __DOXYGEN__ -#define ARP_TABLE_SIZE 10 -#endif - -/** the time an ARP entry stays valid after its last update, - * for ARP_TMR_INTERVAL = 1000, this is - * (60 * 5) seconds = 5 minutes. - */ -#if !defined ARP_MAXAGE || defined __DOXYGEN__ -#define ARP_MAXAGE 300 -#endif - -/** - * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address - * resolution. By default, only the most recent packet is queued per IP address. - * This is sufficient for most protocols and mainly reduces TCP connection - * startup time. Set this to 1 if you know your application sends more than one - * packet in a row to an IP address that is not in the ARP cache. - */ -#if !defined ARP_QUEUEING || defined __DOXYGEN__ -#define ARP_QUEUEING 0 -#endif - -/** The maximum number of packets which may be queued for each - * unresolved address by other network layers. Defaults to 3, 0 means disabled. - * Old packets are dropped, new packets are queued. - */ -#if !defined ARP_QUEUE_LEN || defined __DOXYGEN__ -#define ARP_QUEUE_LEN 3 -#endif - -/** - * ETHARP_SUPPORT_VLAN==1: support receiving and sending ethernet packets with - * VLAN header. See the description of LWIP_HOOK_VLAN_CHECK and - * LWIP_HOOK_VLAN_SET hooks to check/set VLAN headers. - * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check. - * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted. - * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted. - * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) - * that returns 1 to accept a packet or 0 to drop a packet. - */ -#if !defined ETHARP_SUPPORT_VLAN || defined __DOXYGEN__ -#define ETHARP_SUPPORT_VLAN 0 -#endif - -/** LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled - */ -#if !defined LWIP_ETHERNET || defined __DOXYGEN__ -#define LWIP_ETHERNET LWIP_ARP -#endif - -/** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure - * alignment of payload after that header. Since the header is 14 bytes long, - * without this padding e.g. addresses in the IP header will not be aligned - * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. - */ -#if !defined ETH_PAD_SIZE || defined __DOXYGEN__ -#define ETH_PAD_SIZE 0 -#endif - -/** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table - * entries (using etharp_add_static_entry/etharp_remove_static_entry). - */ -#if !defined ETHARP_SUPPORT_STATIC_ENTRIES || defined __DOXYGEN__ -#define ETHARP_SUPPORT_STATIC_ENTRIES 0 -#endif - -/** ETHARP_TABLE_MATCH_NETIF==1: Match netif for ARP table entries. - * If disabled, duplicate IP address on multiple netifs are not supported - * (but this should only occur for AutoIP). - */ -#if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__ -#define ETHARP_TABLE_MATCH_NETIF 0 -#endif -/** - * @} - */ - -/* - -------------------------------- - ---------- IP options ---------- - -------------------------------- -*/ -/** - * @defgroup lwip_opts_ipv4 IPv4 - * @ingroup lwip_opts - * @{ - */ -/** - * LWIP_IPV4==1: Enable IPv4 - */ -#if !defined LWIP_IPV4 || defined __DOXYGEN__ -#define LWIP_IPV4 1 -#endif - -/** - * IP_FORWARD==1: Enables the ability to forward IP packets across network - * interfaces. If you are going to run lwIP on a device with only one network - * interface, define this to 0. - */ -#if !defined IP_FORWARD || defined __DOXYGEN__ -#define IP_FORWARD 0 -#endif - -/** - * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that - * this option does not affect outgoing packet sizes, which can be controlled - * via IP_FRAG. - */ -#if !defined IP_REASSEMBLY || defined __DOXYGEN__ -#define IP_REASSEMBLY 1 -#endif - -/** - * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note - * that this option does not affect incoming packet sizes, which can be - * controlled via IP_REASSEMBLY. - */ -#if !defined IP_FRAG || defined __DOXYGEN__ -#define IP_FRAG 1 -#endif - -#if !LWIP_IPV4 -/* disable IPv4 extensions when IPv4 is disabled */ -#undef IP_FORWARD -#define IP_FORWARD 0 -#undef IP_REASSEMBLY -#define IP_REASSEMBLY 0 -#undef IP_FRAG -#define IP_FRAG 0 -#endif /* !LWIP_IPV4 */ - -/** - * IP_OPTIONS_ALLOWED: Defines the behavior for IP options. - * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. - * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). - */ -#if !defined IP_OPTIONS_ALLOWED || defined __DOXYGEN__ -#define IP_OPTIONS_ALLOWED 1 -#endif - -/** - * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) - * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived - * in this time, the whole packet is discarded. - */ -#if !defined IP_REASS_MAXAGE || defined __DOXYGEN__ -#define IP_REASS_MAXAGE 3 -#endif - -/** - * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. - * Since the received pbufs are enqueued, be sure to configure - * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive - * packets even if the maximum amount of fragments is enqueued for reassembly! - */ -#if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__ -#define IP_REASS_MAX_PBUFS 10 -#endif - -/** - * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. - */ -#if !defined IP_DEFAULT_TTL || defined __DOXYGEN__ -#define IP_DEFAULT_TTL 255 -#endif - -/** - * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast - * filter per pcb on udp and raw send operations. To enable broadcast filter - * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. - */ -#if !defined IP_SOF_BROADCAST || defined __DOXYGEN__ -#define IP_SOF_BROADCAST 0 -#endif - -/** - * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast - * filter on recv operations. - */ -#if !defined IP_SOF_BROADCAST_RECV || defined __DOXYGEN__ -#define IP_SOF_BROADCAST_RECV 0 -#endif - -/** - * IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1: allow ip_forward() to send packets back - * out on the netif where it was received. This should only be used for - * wireless networks. - * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming - * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags! - */ -#if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__ -#define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 -#endif - -/** - * LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first - * local TCP/UDP pcb (default==0). This can prevent creating predictable port - * numbers after booting a device. - */ -#if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__ -#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 -#endif -/** - * @} - */ - -/* - ---------------------------------- - ---------- ICMP options ---------- - ---------------------------------- -*/ -/** - * @defgroup lwip_opts_icmp ICMP - * @ingroup lwip_opts_ipv4 - * @{ - */ -/** - * LWIP_ICMP==1: Enable ICMP module inside the IP stack. - * Be careful, disable that make your product non-compliant to RFC1122 - */ -#if !defined LWIP_ICMP || defined __DOXYGEN__ -#define LWIP_ICMP 1 -#endif - -/** - * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. - */ -#if !defined ICMP_TTL || defined __DOXYGEN__ -#define ICMP_TTL (IP_DEFAULT_TTL) -#endif - -/** - * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) - */ -#if !defined LWIP_BROADCAST_PING || defined __DOXYGEN__ -#define LWIP_BROADCAST_PING 0 -#endif - -/** - * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) - */ -#if !defined LWIP_MULTICAST_PING || defined __DOXYGEN__ -#define LWIP_MULTICAST_PING 0 -#endif -/** - * @} - */ - -/* - --------------------------------- - ---------- RAW options ---------- - --------------------------------- -*/ -/** - * @defgroup lwip_opts_raw RAW - * @ingroup lwip_opts_callback - * @{ - */ -/** - * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. - */ -#if !defined LWIP_RAW || defined __DOXYGEN__ -#define LWIP_RAW 0 -#endif - -/** - * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. - */ -#if !defined RAW_TTL || defined __DOXYGEN__ -#define RAW_TTL (IP_DEFAULT_TTL) -#endif -/** - * @} - */ - -/* - ---------------------------------- - ---------- DHCP options ---------- - ---------------------------------- -*/ -/** - * @defgroup lwip_opts_dhcp DHCP - * @ingroup lwip_opts_ipv4 - * @{ - */ -/** - * LWIP_DHCP==1: Enable DHCP module. - */ -#if !defined LWIP_DHCP || defined __DOXYGEN__ -#define LWIP_DHCP 0 -#endif -#if !LWIP_IPV4 -/* disable DHCP when IPv4 is disabled */ -#undef LWIP_DHCP -#define LWIP_DHCP 0 -#endif /* !LWIP_IPV4 */ - -/** - * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. - */ -#if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__ -#define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) -#endif - -/** - * LWIP_DHCP_CHECK_LINK_UP==1: dhcp_start() only really starts if the netif has - * NETIF_FLAG_LINK_UP set in its flags. As this is only an optimization and - * netif drivers might not set this flag, the default is off. If enabled, - * netif_set_link_up() must be called to continue dhcp starting. - */ -#if !defined LWIP_DHCP_CHECK_LINK_UP -#define LWIP_DHCP_CHECK_LINK_UP 0 -#endif - -/** - * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name. - */ -#if !defined LWIP_DHCP_BOOTP_FILE || defined __DOXYGEN__ -#define LWIP_DHCP_BOOTP_FILE 0 -#endif - -/** - * LWIP_DHCP_GETS_NTP==1: Request NTP servers with discover/select. For each - * response packet, an callback is called, which has to be provided by the port: - * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs); -*/ -#if !defined LWIP_DHCP_GET_NTP_SRV || defined __DOXYGEN__ -#define LWIP_DHCP_GET_NTP_SRV 0 -#endif - -/** - * The maximum of NTP servers requested - */ -#if !defined LWIP_DHCP_MAX_NTP_SERVERS || defined __DOXYGEN__ -#define LWIP_DHCP_MAX_NTP_SERVERS 1 -#endif - -/** - * LWIP_DHCP_MAX_DNS_SERVERS > 0: Request DNS servers with discover/select. - * DHCP servers received in the response are passed to DNS via @ref dns_setserver() - * (up to the maximum limit defined here). - */ -#if !defined LWIP_DHCP_MAX_DNS_SERVERS || defined __DOXYGEN__ -#define LWIP_DHCP_MAX_DNS_SERVERS DNS_MAX_SERVERS -#endif -/** - * @} - */ - -/* - ------------------------------------ - ---------- AUTOIP options ---------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_autoip AUTOIP - * @ingroup lwip_opts_ipv4 - * @{ - */ -/** - * LWIP_AUTOIP==1: Enable AUTOIP module. - */ -#if !defined LWIP_AUTOIP || defined __DOXYGEN__ -#define LWIP_AUTOIP 0 -#endif -#if !LWIP_IPV4 -/* disable AUTOIP when IPv4 is disabled */ -#undef LWIP_AUTOIP -#define LWIP_AUTOIP 0 -#endif /* !LWIP_IPV4 */ - -/** - * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on - * the same interface at the same time. - */ -#if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__ -#define LWIP_DHCP_AUTOIP_COOP 0 -#endif - -/** - * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes - * that should be sent before falling back on AUTOIP (the DHCP client keeps - * running in this case). This can be set as low as 1 to get an AutoIP address - * very quickly, but you should be prepared to handle a changing IP address - * when DHCP overrides AutoIP. - */ -#if !defined LWIP_DHCP_AUTOIP_COOP_TRIES || defined __DOXYGEN__ -#define LWIP_DHCP_AUTOIP_COOP_TRIES 9 -#endif -/** - * @} - */ - -/* - ---------------------------------- - ----- SNMP MIB2 support ----- - ---------------------------------- -*/ -/** - * @defgroup lwip_opts_mib2 SNMP MIB2 callbacks - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * LWIP_MIB2_CALLBACKS==1: Turn on SNMP MIB2 callbacks. - * Turn this on to get callbacks needed to implement MIB2. - * Usually MIB2_STATS should be enabled, too. - */ -#if !defined LWIP_MIB2_CALLBACKS || defined __DOXYGEN__ -#define LWIP_MIB2_CALLBACKS 0 -#endif -/** - * @} - */ - -/* - ---------------------------------- - ----- Multicast/IGMP options ----- - ---------------------------------- -*/ -/** - * @defgroup lwip_opts_igmp IGMP - * @ingroup lwip_opts_ipv4 - * @{ - */ -/** - * LWIP_IGMP==1: Turn on IGMP module. - */ -#if !defined LWIP_IGMP || defined __DOXYGEN__ -#define LWIP_IGMP 0 -#endif -#if !LWIP_IPV4 -#undef LWIP_IGMP -#define LWIP_IGMP 0 -#endif - -/** - * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options - * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP - */ -#if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ -#define LWIP_MULTICAST_TX_OPTIONS (LWIP_IGMP && LWIP_UDP) -#endif -/** - * @} - */ - -/* - ---------------------------------- - ---------- DNS options ----------- - ---------------------------------- -*/ -/** - * @defgroup lwip_opts_dns DNS - * @ingroup lwip_opts_callback - * @{ - */ -/** - * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS - * transport. - */ -#if !defined LWIP_DNS || defined __DOXYGEN__ -#define LWIP_DNS 0 -#endif - -/** DNS maximum number of entries to maintain locally. */ -#if !defined DNS_TABLE_SIZE || defined __DOXYGEN__ -#define DNS_TABLE_SIZE 4 -#endif - -/** DNS maximum host name length supported in the name table. */ -#if !defined DNS_MAX_NAME_LENGTH || defined __DOXYGEN__ -#define DNS_MAX_NAME_LENGTH 256 -#endif - -/** The maximum of DNS servers - * The first server can be initialized automatically by defining - * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*' - */ -#if !defined DNS_MAX_SERVERS || defined __DOXYGEN__ -#define DNS_MAX_SERVERS 2 -#endif - -/** DNS do a name checking between the query and the response. */ -#if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__ -#define DNS_DOES_NAME_CHECK 1 -#endif - -/** LWIP_DNS_SECURE: controls the security level of the DNS implementation - * Use all DNS security features by default. - * This is overridable but should only be needed by very small targets - * or when using against non standard DNS servers. */ -#if !defined LWIP_DNS_SECURE || defined __DOXYGEN__ -#define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) -#endif - -/* A list of DNS security features follows */ -#define LWIP_DNS_SECURE_RAND_XID 1 -#define LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING 2 -#define LWIP_DNS_SECURE_RAND_SRC_PORT 4 - -/** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, you have to define an initializer: - * \#define DNS_LOCAL_HOSTLIST_INIT {DNS_LOCAL_HOSTLIST_ELEM("host_ip4", IPADDR4_INIT_BYTES(1,2,3,4)), \ - * DNS_LOCAL_HOSTLIST_ELEM("host_ip6", IPADDR6_INIT_HOST(123, 234, 345, 456)} - * - * Instead, you can also use an external function: - * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) - * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype). - */ -#if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ -#define DNS_LOCAL_HOSTLIST 0 -#endif /* DNS_LOCAL_HOSTLIST */ - -/** If this is turned on, the local host-list can be dynamically changed - * at runtime. */ -#if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__ -#define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 -#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - -/** Set this to 1 to enable querying ".local" names via mDNS - * using a One-Shot Multicast DNS Query */ -#if !defined LWIP_DNS_SUPPORT_MDNS_QUERIES || defined __DOXYGEN__ -#define LWIP_DNS_SUPPORT_MDNS_QUERIES 0 -#endif -/** - * @} - */ - -/* - --------------------------------- - ---------- UDP options ---------- - --------------------------------- -*/ -/** - * @defgroup lwip_opts_udp UDP - * @ingroup lwip_opts_callback - * @{ - */ -/** - * LWIP_UDP==1: Turn on UDP. - */ -#if !defined LWIP_UDP || defined __DOXYGEN__ -#define LWIP_UDP 1 -#endif - -/** - * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) - */ -#if !defined LWIP_UDPLITE || defined __DOXYGEN__ -#define LWIP_UDPLITE 0 -#endif - -/** - * UDP_TTL: Default Time-To-Live value. - */ -#if !defined UDP_TTL || defined __DOXYGEN__ -#define UDP_TTL (IP_DEFAULT_TTL) -#endif - -/** - * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. - */ -#if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__ -#define LWIP_NETBUF_RECVINFO 0 -#endif -/** - * @} - */ - -/* - --------------------------------- - ---------- TCP options ---------- - --------------------------------- -*/ -/** - * @defgroup lwip_opts_tcp TCP - * @ingroup lwip_opts_callback - * @{ - */ -/** - * LWIP_TCP==1: Turn on TCP. - */ -#if !defined LWIP_TCP || defined __DOXYGEN__ -#define LWIP_TCP 1 -#endif - -/** - * TCP_TTL: Default Time-To-Live value. - */ -#if !defined TCP_TTL || defined __DOXYGEN__ -#define TCP_TTL (IP_DEFAULT_TTL) -#endif - -/** - * TCP_WND: The size of a TCP window. This must be at least - * (2 * TCP_MSS) for things to work well. - * ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size - * with scaling applied. Maximum window value in the TCP header - * will be TCP_WND >> TCP_RCV_SCALE - */ -#if !defined TCP_WND || defined __DOXYGEN__ -#define TCP_WND (4 * TCP_MSS) -#endif - -/** - * TCP_MAXRTX: Maximum number of retransmissions of data segments. - */ -#if !defined TCP_MAXRTX || defined __DOXYGEN__ -#define TCP_MAXRTX 12 -#endif - -/** - * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. - */ -#if !defined TCP_SYNMAXRTX || defined __DOXYGEN__ -#define TCP_SYNMAXRTX 6 -#endif - -/** - * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. - * Define to 0 if your device is low on memory. - */ -#if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ -#define TCP_QUEUE_OOSEQ (LWIP_TCP) -#endif - -/** - * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, - * you might want to increase this.) - * For the receive side, this MSS is advertised to the remote side - * when opening a connection. For the transmit size, this MSS sets - * an upper limit on the MSS advertised by the remote host. - */ -#if !defined TCP_MSS || defined __DOXYGEN__ -#define TCP_MSS 536 -#endif - -/** - * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really - * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which - * reflects the available reassembly buffer size at the remote host) and the - * largest size permitted by the IP layer" (RFC 1122) - * Setting this to 1 enables code that checks TCP_MSS against the MTU of the - * netif used for a connection and limits the MSS if it would be too big otherwise. - */ -#if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__ -#define TCP_CALCULATE_EFF_SEND_MSS 1 -#endif - - -/** - * TCP_SND_BUF: TCP sender buffer space (bytes). - * To achieve good performance, this should be at least 2 * TCP_MSS. - */ -#if !defined TCP_SND_BUF || defined __DOXYGEN__ -#define TCP_SND_BUF (2 * TCP_MSS) -#endif - -/** - * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least - * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. - */ -#if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__ -#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) -#endif - -/** - * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than - * TCP_SND_BUF. It is the amount of space which must be available in the - * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). - */ -#if !defined TCP_SNDLOWAT || defined __DOXYGEN__ -#define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -#endif - -/** - * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less - * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below - * this number, select returns writable (combined with TCP_SNDLOWAT). - */ -#if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__ -#define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) -#endif - -/** - * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. - * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. - */ -#if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ -#define TCP_OOSEQ_MAX_BYTES 0 -#endif - -/** - * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. - * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. - */ -#if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ -#define TCP_OOSEQ_MAX_PBUFS 0 -#endif - -/** - * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. - */ -#if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__ -#define TCP_LISTEN_BACKLOG 0 -#endif - -/** - * The maximum allowed backlog for TCP listen netconns. - * This backlog is used unless another is explicitly specified. - * 0xff is the maximum (u8_t). - */ -#if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__ -#define TCP_DEFAULT_LISTEN_BACKLOG 0xff -#endif - -/** - * TCP_OVERSIZE: The maximum number of bytes that tcp_write may - * allocate ahead of time in an attempt to create shorter pbuf chains - * for transmission. The meaningful range is 0 to TCP_MSS. Some - * suggested values are: - * - * 0: Disable oversized allocation. Each tcp_write() allocates a new - pbuf (old behaviour). - * 1: Allocate size-aligned pbufs with minimal excess. Use this if your - * scatter-gather DMA requires aligned fragments. - * 128: Limit the pbuf/memory overhead to 20%. - * TCP_MSS: Try to create unfragmented TCP packets. - * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. - */ -#if !defined TCP_OVERSIZE || defined __DOXYGEN__ -#define TCP_OVERSIZE TCP_MSS -#endif - -/** - * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. - * The timestamp option is currently only used to help remote hosts, it is not - * really used locally. Therefore, it is only enabled when a TS option is - * received in the initial SYN packet from a remote host. - */ -#if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__ -#define LWIP_TCP_TIMESTAMPS 0 -#endif - -/** - * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an - * explicit window update - */ -#if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ -#define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) -#endif - -/** - * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. - * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all - * events (accept, sent, etc) that happen in the system. - * LWIP_CALLBACK_API==1: The PCB callback function is called directly - * for the event. This is the default. - */ -#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__ -#define LWIP_EVENT_API 0 -#define LWIP_CALLBACK_API 1 -#else -#ifndef LWIP_EVENT_API -#define LWIP_EVENT_API 0 -#endif -#ifndef LWIP_CALLBACK_API -#define LWIP_CALLBACK_API 0 -#endif -#endif - -/** - * LWIP_WND_SCALE and TCP_RCV_SCALE: - * Set LWIP_WND_SCALE to 1 to enable window scaling. - * Set TCP_RCV_SCALE to the desired scaling factor (shift count in the - * range of [0..14]). - * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large - * send window while having a small receive window only. - */ -#if !defined LWIP_WND_SCALE || defined __DOXYGEN__ -#define LWIP_WND_SCALE 0 -#define TCP_RCV_SCALE 0 -#endif -/** - * @} - */ - -/* - ---------------------------------- - ---------- Pbuf options ---------- - ---------------------------------- -*/ -/** - * @defgroup lwip_opts_pbuf PBUF - * @ingroup lwip_opts - * @{ - */ -/** - * PBUF_LINK_HLEN: the number of bytes that should be allocated for a - * link level header. The default is 14, the standard value for - * Ethernet. - */ -#if !defined PBUF_LINK_HLEN || defined __DOXYGEN__ -#if defined LWIP_HOOK_VLAN_SET && !defined __DOXYGEN__ -#define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE) -#else /* LWIP_HOOK_VLAN_SET */ -#define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) -#endif /* LWIP_HOOK_VLAN_SET */ -#endif - -/** - * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated - * for an additional encapsulation header before ethernet headers (e.g. 802.11) - */ -#if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ -#define PBUF_LINK_ENCAPSULATION_HLEN 0u -#endif - -/** - * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is - * designed to accommodate single full size TCP frame in one pbuf, including - * TCP_MSS, IP header, and link header. - */ -#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ -#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) -#endif -/** - * @} - */ - -/* - ------------------------------------------------ - ---------- Network Interfaces options ---------- - ------------------------------------------------ -*/ -/** - * @defgroup lwip_opts_netif NETIF - * @ingroup lwip_opts - * @{ - */ -/** - * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname - * field. - */ -#if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__ -#define LWIP_NETIF_HOSTNAME 0 -#endif - -/** - * LWIP_NETIF_API==1: Support netif api (in netifapi.c) - */ -#if !defined LWIP_NETIF_API || defined __DOXYGEN__ -#define LWIP_NETIF_API 0 -#endif - -/** - * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface - * changes its up/down status (i.e., due to DHCP IP acquisition) - */ -#if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__ -#define LWIP_NETIF_STATUS_CALLBACK 0 -#endif - -/** - * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface - * whenever the link changes (i.e., link down) - */ -#if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__ -#define LWIP_NETIF_LINK_CALLBACK 0 -#endif - -/** - * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called - * when a netif has been removed - */ -#if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__ -#define LWIP_NETIF_REMOVE_CALLBACK 0 -#endif - -/** - * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table - * indices) in struct netif. TCP and UDP can make use of this to prevent - * scanning the ARP table for every sent packet. While this is faster for big - * ARP tables or many concurrent connections, it might be counterproductive - * if you have a tiny ARP table or if there never are concurrent connections. - */ -#if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__ -#define LWIP_NETIF_HWADDRHINT 0 -#endif - -/** - * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data - * to be sent into one single pbuf. This is for compatibility with DMA-enabled - * MACs that do not support scatter-gather. - * Beware that this might involve CPU-memcpy before transmitting that would not - * be needed without this flag! Use this only if you need to! - * - * @todo: TCP and IP-frag do not work with this, yet: - */ -#if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ -#define LWIP_NETIF_TX_SINGLE_PBUF 0 -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ - -/** - * LWIP_NUM_NETIF_CLIENT_DATA: Number of clients that may store - * data in client_data member array of struct netif. - */ -#if !defined LWIP_NUM_NETIF_CLIENT_DATA || defined __DOXYGEN__ -#define LWIP_NUM_NETIF_CLIENT_DATA 0 -#endif -/** - * @} - */ - -/* - ------------------------------------ - ---------- LOOPIF options ---------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_loop Loopback interface - * @ingroup lwip_opts_netif - * @{ - */ -/** - * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). - * This is only needed when no real netifs are available. If at least one other - * netif is available, loopback traffic uses this netif. - */ -#if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ -#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK -#endif - -/** - * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). - */ -#if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ -#define LWIP_LOOPIF_MULTICAST 0 -#endif - -/** - * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP - * address equal to the netif IP address, looping them back up the stack. - */ -#if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__ -#define LWIP_NETIF_LOOPBACK 0 -#endif - -/** - * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback - * sending for each netif (0 = disabled) - */ -#if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__ -#define LWIP_LOOPBACK_MAX_PBUFS 0 -#endif - -/** - * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in - * the system, as netifs must change how they behave depending on this setting - * for the LWIP_NETIF_LOOPBACK option to work. - * Setting this is needed to avoid reentering non-reentrant functions like - * tcp_input(). - * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a - * multithreaded environment like tcpip.c. In this case, netif->input() - * is called directly. - * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. - * The packets are put on a list and netif_poll() must be called in - * the main application loop. - */ -#if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ -#define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) -#endif -/** - * @} - */ - -/* - ------------------------------------ - ---------- Thread options ---------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_thread Threading - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. - */ -#if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ -#define TCPIP_THREAD_NAME "tcpip_thread" -#endif - -/** - * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. - * The stack size value itself is platform-dependent, but is passed to - * sys_thread_new() when the thread is created. - */ -#if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__ -#define TCPIP_THREAD_STACKSIZE 0 -#endif - -/** - * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. - * The priority value itself is platform-dependent, but is passed to - * sys_thread_new() when the thread is created. - */ -#if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__ -#define TCPIP_THREAD_PRIO 1 -#endif - -/** - * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages - * The queue size value itself is platform-dependent, but is passed to - * sys_mbox_new() when tcpip_init is called. - */ -#if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__ -#define TCPIP_MBOX_SIZE 0 -#endif - -/** - * Define this to something that triggers a watchdog. This is called from - * tcpip_thread after processing a message. - */ -#if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__ -#define LWIP_TCPIP_THREAD_ALIVE() -#endif - -/** - * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. - */ -#if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ -#define SLIPIF_THREAD_NAME "slipif_loop" -#endif - -/** - * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. - * The stack size value itself is platform-dependent, but is passed to - * sys_thread_new() when the thread is created. - */ -#if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__ -#define SLIPIF_THREAD_STACKSIZE 0 -#endif - -/** - * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. - * The priority value itself is platform-dependent, but is passed to - * sys_thread_new() when the thread is created. - */ -#if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__ -#define SLIPIF_THREAD_PRIO 1 -#endif - -/** - * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. - */ -#if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ -#define DEFAULT_THREAD_NAME "lwIP" -#endif - -/** - * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. - * The stack size value itself is platform-dependent, but is passed to - * sys_thread_new() when the thread is created. - */ -#if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__ -#define DEFAULT_THREAD_STACKSIZE 0 -#endif - -/** - * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. - * The priority value itself is platform-dependent, but is passed to - * sys_thread_new() when the thread is created. - */ -#if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__ -#define DEFAULT_THREAD_PRIO 1 -#endif - -/** - * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a - * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed - * to sys_mbox_new() when the recvmbox is created. - */ -#if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__ -#define DEFAULT_RAW_RECVMBOX_SIZE 0 -#endif - -/** - * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a - * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed - * to sys_mbox_new() when the recvmbox is created. - */ -#if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__ -#define DEFAULT_UDP_RECVMBOX_SIZE 0 -#endif - -/** - * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a - * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed - * to sys_mbox_new() when the recvmbox is created. - */ -#if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__ -#define DEFAULT_TCP_RECVMBOX_SIZE 0 -#endif - -/** - * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. - * The queue size value itself is platform-dependent, but is passed to - * sys_mbox_new() when the acceptmbox is created. - */ -#if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__ -#define DEFAULT_ACCEPTMBOX_SIZE 0 -#endif -/** - * @} - */ - -/* - ---------------------------------------------- - ---------- Sequential layer options ---------- - ---------------------------------------------- -*/ -/** - * @defgroup lwip_opts_netconn Netconn - * @ingroup lwip_opts_threadsafe_apis - * @{ - */ -/** - * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) - */ -#if !defined LWIP_NETCONN || defined __DOXYGEN__ -#define LWIP_NETCONN 1 -#endif - -/** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create - * timers running in tcpip_thread from another thread. - */ -#if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__ -#define LWIP_TCPIP_TIMEOUT 0 -#endif - -/** LWIP_NETCONN_SEM_PER_THREAD==1: Use one (thread-local) semaphore per - * thread calling socket/netconn functions instead of allocating one - * semaphore per netconn (and per select etc.) - * ATTENTION: a thread-local semaphore for API calls is needed: - * - LWIP_NETCONN_THREAD_SEM_GET() returning a sys_sem_t* - * - LWIP_NETCONN_THREAD_SEM_ALLOC() creating the semaphore - * - LWIP_NETCONN_THREAD_SEM_FREE() freeing the semaphore - * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). - * Ports may call these for threads created with sys_thread_new(). - */ -#if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__ -#define LWIP_NETCONN_SEM_PER_THREAD 0 -#endif - -/** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread, - * writing from a 2nd thread and closing from a 3rd thread at the same time. - * ATTENTION: This is currently really alpha! Some requirements: - * - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from - * multiple threads at once - * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox - * and prevent a task pending on this during/after deletion - */ -#if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__ -#define LWIP_NETCONN_FULLDUPLEX 0 -#endif -/** - * @} - */ - -/* - ------------------------------------ - ---------- Socket options ---------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_socket Sockets - * @ingroup lwip_opts_threadsafe_apis - * @{ - */ -/** - * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) - */ -#if !defined LWIP_SOCKET || defined __DOXYGEN__ -#define LWIP_SOCKET 1 -#endif - -/* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete - * successfully, as required by POSIX. Default is POSIX-compliant. - */ -#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ -#define LWIP_SOCKET_SET_ERRNO 1 -#endif - -/** - * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. - * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. - * While this helps code completion, it might conflict with existing libraries. - * (only used if you use sockets.c) - */ -#if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__ -#define LWIP_COMPAT_SOCKETS 1 -#endif - -/** - * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. - * Disable this option if you use a POSIX operating system that uses the same - * names (read, write & close). (only used if you use sockets.c) - */ -#if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__ -#define LWIP_POSIX_SOCKETS_IO_NAMES 1 -#endif - -/** - * LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n. - * This can be useful when there are multiple APIs which create file descriptors. - * When they all start with a different offset and you won't make them overlap you can - * re implement read/write/close/ioctl/fnctl to send the requested action to the right - * library (sharing select will need more work though). - */ -#if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__ -#define LWIP_SOCKET_OFFSET 0 -#endif - -/** - * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT - * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set - * in seconds. (does not require sockets.c, and will affect tcp.c) - */ -#if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__ -#define LWIP_TCP_KEEPALIVE 0 -#endif - -/** - * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and - * SO_SNDTIMEO processing. - */ -#if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__ -#define LWIP_SO_SNDTIMEO 0 -#endif - -/** - * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and - * SO_RCVTIMEO processing. - */ -#if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__ -#define LWIP_SO_RCVTIMEO 0 -#endif - -/** - * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int - * (milliseconds, much like winsock does) instead of a struct timeval (default). - */ -#if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__ -#define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0 -#endif - -/** - * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. - */ -#if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__ -#define LWIP_SO_RCVBUF 0 -#endif - -/** - * LWIP_SO_LINGER==1: Enable SO_LINGER processing. - */ -#if !defined LWIP_SO_LINGER || defined __DOXYGEN__ -#define LWIP_SO_LINGER 0 -#endif - -/** - * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. - */ -#if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__ -#define RECV_BUFSIZE_DEFAULT INT_MAX -#endif - -/** - * By default, TCP socket/netconn close waits 20 seconds max to send the FIN - */ -#if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__ -#define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000 -#endif - -/** - * SO_REUSE==1: Enable SO_REUSEADDR option. - */ -#if !defined SO_REUSE || defined __DOXYGEN__ -#define SO_REUSE 0 -#endif - -/** - * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets - * to all local matches if SO_REUSEADDR is turned on. - * WARNING: Adds a memcpy for every packet if passing to more than one pcb! - */ -#if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__ -#define SO_REUSE_RXTOALL 0 -#endif - -/** - * LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of - * pending data in the network buffer. This is the way windows does it. It's - * the default for lwIP since it is smaller. - * LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next - * pending datagram in bytes. This is the way linux does it. This code is only - * here for compatibility. - */ -#if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ -#define LWIP_FIONREAD_LINUXMODE 0 -#endif -/** - * @} - */ - -/* - ---------------------------------------- - ---------- Statistics options ---------- - ---------------------------------------- -*/ -/** - * @defgroup lwip_opts_stats Statistics - * @ingroup lwip_opts_debug - * @{ - */ -/** - * LWIP_STATS==1: Enable statistics collection in lwip_stats. - */ -#if !defined LWIP_STATS || defined __DOXYGEN__ -#define LWIP_STATS 1 -#endif - -#if LWIP_STATS - -/** - * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. - */ -#if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__ -#define LWIP_STATS_DISPLAY 0 -#endif - -/** - * LINK_STATS==1: Enable link stats. - */ -#if !defined LINK_STATS || defined __DOXYGEN__ -#define LINK_STATS 1 -#endif - -/** - * ETHARP_STATS==1: Enable etharp stats. - */ -#if !defined ETHARP_STATS || defined __DOXYGEN__ -#define ETHARP_STATS (LWIP_ARP) -#endif - -/** - * IP_STATS==1: Enable IP stats. - */ -#if !defined IP_STATS || defined __DOXYGEN__ -#define IP_STATS 1 -#endif - -/** - * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is - * on if using either frag or reass. - */ -#if !defined IPFRAG_STATS || defined __DOXYGEN__ -#define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) -#endif - -/** - * ICMP_STATS==1: Enable ICMP stats. - */ -#if !defined ICMP_STATS || defined __DOXYGEN__ -#define ICMP_STATS 1 -#endif - -/** - * IGMP_STATS==1: Enable IGMP stats. - */ -#if !defined IGMP_STATS || defined __DOXYGEN__ -#define IGMP_STATS (LWIP_IGMP) -#endif - -/** - * UDP_STATS==1: Enable UDP stats. Default is on if - * UDP enabled, otherwise off. - */ -#if !defined UDP_STATS || defined __DOXYGEN__ -#define UDP_STATS (LWIP_UDP) -#endif - -/** - * TCP_STATS==1: Enable TCP stats. Default is on if TCP - * enabled, otherwise off. - */ -#if !defined TCP_STATS || defined __DOXYGEN__ -#define TCP_STATS (LWIP_TCP) -#endif - -/** - * MEM_STATS==1: Enable mem.c stats. - */ -#if !defined MEM_STATS || defined __DOXYGEN__ -#define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) -#endif - -/** - * MEMP_STATS==1: Enable memp.c pool stats. - */ -#if !defined MEMP_STATS || defined __DOXYGEN__ -#define MEMP_STATS (MEMP_MEM_MALLOC == 0) -#endif - -/** - * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). - */ -#if !defined SYS_STATS || defined __DOXYGEN__ -#define SYS_STATS (NO_SYS == 0) -#endif - -/** - * IP6_STATS==1: Enable IPv6 stats. - */ -#if !defined IP6_STATS || defined __DOXYGEN__ -#define IP6_STATS (LWIP_IPV6) -#endif - -/** - * ICMP6_STATS==1: Enable ICMP for IPv6 stats. - */ -#if !defined ICMP6_STATS || defined __DOXYGEN__ -#define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6) -#endif - -/** - * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats. - */ -#if !defined IP6_FRAG_STATS || defined __DOXYGEN__ -#define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS)) -#endif - -/** - * MLD6_STATS==1: Enable MLD for IPv6 stats. - */ -#if !defined MLD6_STATS || defined __DOXYGEN__ -#define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD) -#endif - -/** - * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats. - */ -#if !defined ND6_STATS || defined __DOXYGEN__ -#define ND6_STATS (LWIP_IPV6) -#endif - -/** - * MIB2_STATS==1: Stats for SNMP MIB2. - */ -#if !defined MIB2_STATS || defined __DOXYGEN__ -#define MIB2_STATS 0 -#endif - -#else - -#define LINK_STATS 0 -#define ETHARP_STATS 0 -#define IP_STATS 0 -#define IPFRAG_STATS 0 -#define ICMP_STATS 0 -#define IGMP_STATS 0 -#define UDP_STATS 0 -#define TCP_STATS 0 -#define MEM_STATS 0 -#define MEMP_STATS 0 -#define SYS_STATS 0 -#define LWIP_STATS_DISPLAY 0 -#define IP6_STATS 0 -#define ICMP6_STATS 0 -#define IP6_FRAG_STATS 0 -#define MLD6_STATS 0 -#define ND6_STATS 0 -#define MIB2_STATS 0 - -#endif /* LWIP_STATS */ -/** - * @} - */ - -/* - -------------------------------------- - ---------- Checksum options ---------- - -------------------------------------- -*/ -/** - * @defgroup lwip_opts_checksum Checksum - * @ingroup lwip_opts_infrastructure - * @{ - */ -/** - * LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled - * per netif. - * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled! - */ -#if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__ -#define LWIP_CHECKSUM_CTRL_PER_NETIF 0 -#endif - -/** - * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. - */ -#if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__ -#define CHECKSUM_GEN_IP 1 -#endif - -/** - * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. - */ -#if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__ -#define CHECKSUM_GEN_UDP 1 -#endif - -/** - * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. - */ -#if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__ -#define CHECKSUM_GEN_TCP 1 -#endif - -/** - * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. - */ -#if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__ -#define CHECKSUM_GEN_ICMP 1 -#endif - -/** - * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. - */ -#if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__ -#define CHECKSUM_GEN_ICMP6 1 -#endif - -/** - * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. - */ -#if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__ -#define CHECKSUM_CHECK_IP 1 -#endif - -/** - * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. - */ -#if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__ -#define CHECKSUM_CHECK_UDP 1 -#endif - -/** - * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. - */ -#if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__ -#define CHECKSUM_CHECK_TCP 1 -#endif - -/** - * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. - */ -#if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__ -#define CHECKSUM_CHECK_ICMP 1 -#endif - -/** - * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets - */ -#if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__ -#define CHECKSUM_CHECK_ICMP6 1 -#endif - -/** - * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from - * application buffers to pbufs. - */ -#if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__ -#define LWIP_CHECKSUM_ON_COPY 0 -#endif -/** - * @} - */ - -/* - --------------------------------------- - ---------- IPv6 options --------------- - --------------------------------------- -*/ -/** - * @defgroup lwip_opts_ipv6 IPv6 - * @ingroup lwip_opts - * @{ - */ -/** - * LWIP_IPV6==1: Enable IPv6 - */ -#if !defined LWIP_IPV6 || defined __DOXYGEN__ -#define LWIP_IPV6 0 -#endif - -/** - * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. - */ -#if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__ -#define LWIP_IPV6_NUM_ADDRESSES 3 -#endif - -/** - * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs - */ -#if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__ -#define LWIP_IPV6_FORWARD 0 -#endif - -/** - * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. - */ -#if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ -#define LWIP_IPV6_FRAG 0 -#endif - -/** - * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented - */ -#if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ -#define LWIP_IPV6_REASS (LWIP_IPV6) -#endif - -/** - * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during - * network startup. - */ -#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ -#define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 -#endif - -/** - * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. - */ -#if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ -#define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) -#endif - -/** - * LWIP_IPV6_DUP_DETECT_ATTEMPTS=[0..7]: Number of duplicate address detection attempts. - */ -#if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ -#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 -#endif -/** - * @} - */ - -/** - * @defgroup lwip_opts_icmp6 ICMP6 - * @ingroup lwip_opts_ipv6 - * @{ - */ -/** - * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) - */ -#if !defined LWIP_ICMP6 || defined __DOXYGEN__ -#define LWIP_ICMP6 (LWIP_IPV6) -#endif - -/** - * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in - * ICMPv6 error messages. - */ -#if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__ -#define LWIP_ICMP6_DATASIZE 8 -#endif - -/** - * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages - */ -#if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ -#define LWIP_ICMP6_HL 255 -#endif -/** - * @} - */ - -/** - * @defgroup lwip_opts_mld6 Multicast listener discovery - * @ingroup lwip_opts_ipv6 - * @{ - */ -/** - * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. - * If LWIP_IPV6 is enabled but this setting is disabled, the MAC layer must - * indiscriminately pass all inbound IPv6 multicast traffic to lwIP. - */ -#if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ -#define LWIP_IPV6_MLD (LWIP_IPV6) -#endif - -/** - * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast groups that can be joined. - * There must be enough groups so that each netif can join the solicited-node - * multicast group for each of its local addresses, plus one for MDNS if - * applicable, plus any number of groups to be joined on UDP sockets. - */ -#if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ -#define MEMP_NUM_MLD6_GROUP 4 -#endif -/** - * @} - */ - -/** - * @defgroup lwip_opts_nd6 Neighbor discovery - * @ingroup lwip_opts_ipv6 - * @{ - */ -/** - * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address - * is being resolved. - */ -#if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ -#define LWIP_ND6_QUEUEING (LWIP_IPV6) -#endif - -/** - * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. - */ -#if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__ -#define MEMP_NUM_ND6_QUEUE 20 -#endif - -/** - * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache - */ -#if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__ -#define LWIP_ND6_NUM_NEIGHBORS 10 -#endif - -/** - * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache - */ -#if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__ -#define LWIP_ND6_NUM_DESTINATIONS 10 -#endif - -/** - * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache - */ -#if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__ -#define LWIP_ND6_NUM_PREFIXES 5 -#endif - -/** - * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache - */ -#if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__ -#define LWIP_ND6_NUM_ROUTERS 3 -#endif - -/** - * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send - * (neighbor solicit and router solicit) - */ -#if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__ -#define LWIP_ND6_MAX_MULTICAST_SOLICIT 3 -#endif - -/** - * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages - * to send during neighbor reachability detection. - */ -#if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__ -#define LWIP_ND6_MAX_UNICAST_SOLICIT 3 -#endif - -/** - * Unused: See ND RFC (time in milliseconds). - */ -#if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__ -#define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000 -#endif - -/** - * Unused: See ND RFC - */ -#if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__ -#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3 -#endif - -/** - * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). - * May be updated by router advertisement messages. - */ -#if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__ -#define LWIP_ND6_REACHABLE_TIME 30000 -#endif - -/** - * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages - */ -#if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__ -#define LWIP_ND6_RETRANS_TIMER 1000 -#endif - -/** - * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation - * message is sent, during neighbor reachability detection. - */ -#if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__ -#define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000 -#endif - -/** - * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update - * Reachable time and retransmission timers, and netif MTU. - */ -#if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__ -#define LWIP_ND6_ALLOW_RA_UPDATES 1 -#endif - -/** - * LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery - * with reachability hints for connected destinations. This helps avoid sending - * unicast neighbor solicitation messages. - */ -#if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ -#define LWIP_ND6_TCP_REACHABILITY_HINTS 1 -#endif - -/** - * LWIP_ND6_RDNSS_MAX_DNS_SERVERS > 0: Use IPv6 Router Advertisement Recursive - * DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS - * servers to the DNS module. - */ -#if !defined LWIP_ND6_RDNSS_MAX_DNS_SERVERS || defined __DOXYGEN__ -#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 0 -#endif -/** - * @} - */ - -/** - * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. - */ -#if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ -#define LWIP_IPV6_DHCP6 0 -#endif - -/* - --------------------------------------- - ---------- Hook options --------------- - --------------------------------------- -*/ - -/** - * @defgroup lwip_opts_hooks Hooks - * @ingroup lwip_opts_infrastructure - * Hooks are undefined by default, define them to a function if you need them. - * @{ - */ - -/** - * LWIP_HOOK_FILENAME: Custom filename to #include in files that provide hooks. - * Declare your hook function prototypes in there, you may also #include all headers - * providing data types that are need in this file. - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_FILENAME "path/to/my/lwip_hooks.h" -#endif - -/** - * LWIP_HOOK_TCP_ISN: - * Hook for generation of the Initial Sequence Number (ISN) for a new TCP - * connection. The default lwIP ISN generation algorithm is very basic and may - * allow for TCP spoofing attacks. This hook provides the means to implement - * the standardized ISN generation algorithm from RFC 6528 (see contrib/adons/tcp_isn), - * or any other desired algorithm as a replacement. - * Called from tcp_connect() and tcp_listen_input() when an ISN is needed for - * a new TCP connection, if TCP support (@ref LWIP_TCP) is enabled.\n - * Signature: u32_t my_hook_tcp_isn(const ip_addr_t* local_ip, u16_t local_port, const ip_addr_t* remote_ip, u16_t remote_port); - * - it may be necessary to use "struct ip_addr" (ip4_addr, ip6_addr) instead of "ip_addr_t" in function declarations\n - * Arguments: - * - local_ip: pointer to the local IP address of the connection - * - local_port: local port number of the connection (host-byte order) - * - remote_ip: pointer to the remote IP address of the connection - * - remote_port: remote port number of the connection (host-byte order)\n - * Return value: - * - the 32-bit Initial Sequence Number to use for the new TCP connection. - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port) -#endif - -/** - * LWIP_HOOK_IP4_INPUT(pbuf, input_netif): - * - called from ip_input() (IPv4) - * - pbuf: received struct pbuf passed to ip_input() - * - input_netif: struct netif on which the packet has been received - * Return values: - * - 0: Hook has not consumed the packet, packet is processed as normal - * - != 0: Hook has consumed the packet. - * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook - * (i.e. free it when done). - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_IP4_INPUT(pbuf, input_netif) -#endif - -/** - * LWIP_HOOK_IP4_ROUTE(dest): - * - called from ip_route() (IPv4) - * - dest: destination IPv4 address - * Returns the destination netif or NULL if no destination netif is found. In - * that case, ip_route() continues as normal. - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_IP4_ROUTE() -#endif - -/** - * LWIP_HOOK_IP4_ROUTE_SRC(dest, src): - * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL) - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) -#endif - -/** - * LWIP_HOOK_ETHARP_GET_GW(netif, dest): - * - called from etharp_output() (IPv4) - * - netif: the netif used for sending - * - dest: the destination IPv4 address - * Returns the IPv4 address of the gateway to handle the specified destination - * IPv4 address. If NULL is returned, the netif's default gateway is used. - * The returned address MUST be directly reachable on the specified netif! - * This function is meant to implement advanced IPv4 routing together with - * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is - * not part of lwIP but can e.g. be hidden in the netif's state argument. -*/ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_ETHARP_GET_GW(netif, dest) -#endif - -/** - * LWIP_HOOK_IP6_INPUT(pbuf, input_netif): - * - called from ip6_input() (IPv6) - * - pbuf: received struct pbuf passed to ip6_input() - * - input_netif: struct netif on which the packet has been received - * Return values: - * - 0: Hook has not consumed the packet, packet is processed as normal - * - != 0: Hook has consumed the packet. - * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook - * (i.e. free it when done). - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_IP6_INPUT(pbuf, input_netif) -#endif - -/** - * LWIP_HOOK_IP6_ROUTE(src, dest): - * - called from ip6_route() (IPv6) - * - src: sourc IPv6 address - * - dest: destination IPv6 address - * Returns the destination netif or NULL if no destination netif is found. In - * that case, ip6_route() continues as normal. - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_IP6_ROUTE(src, dest) -#endif - -/** - * LWIP_HOOK_ND6_GET_GW(netif, dest): - * - called from nd6_get_next_hop_entry() (IPv6) - * - netif: the netif used for sending - * - dest: the destination IPv6 address - * Returns the IPv6 address of the next hop to handle the specified destination - * IPv6 address. If NULL is returned, a NDP-discovered router is used instead. - * The returned address MUST be directly reachable on the specified netif! - * This function is meant to implement advanced IPv6 routing together with - * LWIP_HOOK_IP6_ROUTE(). The actual routing/gateway table implementation is - * not part of lwIP but can e.g. be hidden in the netif's state argument. -*/ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_ND6_GET_GW(netif, dest) -#endif - -/** - * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr): - * - called from ethernet_input() if VLAN support is enabled - * - netif: struct netif on which the packet has been received - * - eth_hdr: struct eth_hdr of the packet - * - vlan_hdr: struct eth_vlan_hdr of the packet - * Return values: - * - 0: Packet must be dropped. - * - != 0: Packet must be accepted. - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr) -#endif - -/** - * LWIP_HOOK_VLAN_SET: - * Hook can be used to set prio_vid field of vlan_hdr. If you need to store data - * on per-netif basis to implement this callback, see @ref netif_cd. - * Called from ethernet_output() if VLAN support (@ref ETHARP_SUPPORT_VLAN) is enabled.\n - * Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);\n - * Arguments: - * - netif: struct netif that the packet will be sent through - * - p: struct pbuf packet to be sent - * - src: source eth address - * - dst: destination eth address - * - eth_type: ethernet type to packet to be sent\n - * - * - * Return values: - * - <0: Packet shall not contain VLAN header. - * - 0 <= return value <= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order. - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type) -#endif - -/** - * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type): - * - called from memp_free() when a memp pool was empty and an item is now available - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type) -#endif - -/** - * LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif): - * Called from ethernet_input() when an unknown eth type is encountered. - * Return ERR_OK if packet is accepted, any error code otherwise. - * Payload points to ethernet header! - */ -#ifdef __DOXYGEN__ -#define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif) -#endif -/** - * @} - */ - -/* - --------------------------------------- - ---------- Debugging options ---------- - --------------------------------------- -*/ -/** - * @defgroup lwip_opts_debugmsg Debug messages - * @ingroup lwip_opts_debug - * @{ - */ -/** - * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is - * compared against this value. If it is smaller, then debugging - * messages are written. - * @see debugging_levels - */ -#if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__ -#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL -#endif - -/** - * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable - * debug messages of certain types. - * @see debugging_levels - */ -#if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__ -#define LWIP_DBG_TYPES_ON LWIP_DBG_ON -#endif - -/** - * ETHARP_DEBUG: Enable debugging in etharp.c. - */ -#if !defined ETHARP_DEBUG || defined __DOXYGEN__ -#define ETHARP_DEBUG LWIP_DBG_OFF -#endif - -/** - * NETIF_DEBUG: Enable debugging in netif.c. - */ -#if !defined NETIF_DEBUG || defined __DOXYGEN__ -#define NETIF_DEBUG LWIP_DBG_OFF -#endif - -/** - * PBUF_DEBUG: Enable debugging in pbuf.c. - */ -#if !defined PBUF_DEBUG || defined __DOXYGEN__ -#define PBUF_DEBUG LWIP_DBG_OFF -#endif - -/** - * API_LIB_DEBUG: Enable debugging in api_lib.c. - */ -#if !defined API_LIB_DEBUG || defined __DOXYGEN__ -#define API_LIB_DEBUG LWIP_DBG_OFF -#endif - -/** - * API_MSG_DEBUG: Enable debugging in api_msg.c. - */ -#if !defined API_MSG_DEBUG || defined __DOXYGEN__ -#define API_MSG_DEBUG LWIP_DBG_OFF -#endif - -/** - * SOCKETS_DEBUG: Enable debugging in sockets.c. - */ -#if !defined SOCKETS_DEBUG || defined __DOXYGEN__ -#define SOCKETS_DEBUG LWIP_DBG_OFF -#endif - -/** - * ICMP_DEBUG: Enable debugging in icmp.c. - */ -#if !defined ICMP_DEBUG || defined __DOXYGEN__ -#define ICMP_DEBUG LWIP_DBG_OFF -#endif - -/** - * IGMP_DEBUG: Enable debugging in igmp.c. - */ -#if !defined IGMP_DEBUG || defined __DOXYGEN__ -#define IGMP_DEBUG LWIP_DBG_OFF -#endif - -/** - * INET_DEBUG: Enable debugging in inet.c. - */ -#if !defined INET_DEBUG || defined __DOXYGEN__ -#define INET_DEBUG LWIP_DBG_OFF -#endif - -/** - * IP_DEBUG: Enable debugging for IP. - */ -#if !defined IP_DEBUG || defined __DOXYGEN__ -#define IP_DEBUG LWIP_DBG_OFF -#endif - -/** - * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. - */ -#if !defined IP_REASS_DEBUG || defined __DOXYGEN__ -#define IP_REASS_DEBUG LWIP_DBG_OFF -#endif - -/** - * RAW_DEBUG: Enable debugging in raw.c. - */ -#if !defined RAW_DEBUG || defined __DOXYGEN__ -#define RAW_DEBUG LWIP_DBG_OFF -#endif - -/** - * MEM_DEBUG: Enable debugging in mem.c. - */ -#if !defined MEM_DEBUG || defined __DOXYGEN__ -#define MEM_DEBUG LWIP_DBG_OFF -#endif - -/** - * MEMP_DEBUG: Enable debugging in memp.c. - */ -#if !defined MEMP_DEBUG || defined __DOXYGEN__ -#define MEMP_DEBUG LWIP_DBG_OFF -#endif - -/** - * SYS_DEBUG: Enable debugging in sys.c. - */ -#if !defined SYS_DEBUG || defined __DOXYGEN__ -#define SYS_DEBUG LWIP_DBG_OFF -#endif - -/** - * TIMERS_DEBUG: Enable debugging in timers.c. - */ -#if !defined TIMERS_DEBUG || defined __DOXYGEN__ -#define TIMERS_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_DEBUG: Enable debugging for TCP. - */ -#if !defined TCP_DEBUG || defined __DOXYGEN__ -#define TCP_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. - */ -#if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__ -#define TCP_INPUT_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. - */ -#if !defined TCP_FR_DEBUG || defined __DOXYGEN__ -#define TCP_FR_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit - * timeout. - */ -#if !defined TCP_RTO_DEBUG || defined __DOXYGEN__ -#define TCP_RTO_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. - */ -#if !defined TCP_CWND_DEBUG || defined __DOXYGEN__ -#define TCP_CWND_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. - */ -#if !defined TCP_WND_DEBUG || defined __DOXYGEN__ -#define TCP_WND_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. - */ -#if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__ -#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. - */ -#if !defined TCP_RST_DEBUG || defined __DOXYGEN__ -#define TCP_RST_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. - */ -#if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__ -#define TCP_QLEN_DEBUG LWIP_DBG_OFF -#endif - -/** - * UDP_DEBUG: Enable debugging in UDP. - */ -#if !defined UDP_DEBUG || defined __DOXYGEN__ -#define UDP_DEBUG LWIP_DBG_OFF -#endif - -/** - * TCPIP_DEBUG: Enable debugging in tcpip.c. - */ -#if !defined TCPIP_DEBUG || defined __DOXYGEN__ -#define TCPIP_DEBUG LWIP_DBG_OFF -#endif - -/** - * SLIP_DEBUG: Enable debugging in slipif.c. - */ -#if !defined SLIP_DEBUG || defined __DOXYGEN__ -#define SLIP_DEBUG LWIP_DBG_OFF -#endif - -/** - * DHCP_DEBUG: Enable debugging in dhcp.c. - */ -#if !defined DHCP_DEBUG || defined __DOXYGEN__ -#define DHCP_DEBUG LWIP_DBG_OFF -#endif - -/** - * AUTOIP_DEBUG: Enable debugging in autoip.c. - */ -#if !defined AUTOIP_DEBUG || defined __DOXYGEN__ -#define AUTOIP_DEBUG LWIP_DBG_OFF -#endif - -/** - * DNS_DEBUG: Enable debugging for DNS. - */ -#if !defined DNS_DEBUG || defined __DOXYGEN__ -#define DNS_DEBUG LWIP_DBG_OFF -#endif - -/** - * IP6_DEBUG: Enable debugging for IPv6. - */ -#if !defined IP6_DEBUG || defined __DOXYGEN__ -#define IP6_DEBUG LWIP_DBG_OFF -#endif -/** - * @} - */ - -/* - -------------------------------------------------- - ---------- Performance tracking options ---------- - -------------------------------------------------- -*/ -/** - * @defgroup lwip_opts_perf Performance - * @ingroup lwip_opts_debug - * @{ - */ -/** - * LWIP_PERF: Enable performance testing for lwIP - * (if enabled, arch/perf.h is included) - */ -#if !defined LWIP_PERF || defined __DOXYGEN__ -#define LWIP_PERF 0 -#endif -/** - * @} - */ - -#endif /* LWIP_HDR_OPT_H */ +/** + * @file + * + * lwIP Options Configuration + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +/* + * NOTE: || defined __DOXYGEN__ is a workaround for doxygen bug - + * without this, doxygen does not see the actual #define + */ + +#if !defined LWIP_HDR_OPT_H +#define LWIP_HDR_OPT_H + +/* + * Include user defined options first. Anything not defined in these files + * will be set to standard values. Override anything you don't like! + */ +#include "lwipopts.h" +#include "lwip/debug.h" + +/** + * @defgroup lwip_opts Options (lwipopts.h) + * @ingroup lwip + * + * @defgroup lwip_opts_debug Debugging + * @ingroup lwip_opts + * + * @defgroup lwip_opts_infrastructure Infrastructure + * @ingroup lwip_opts + * + * @defgroup lwip_opts_callback Callback-style APIs + * @ingroup lwip_opts + * + * @defgroup lwip_opts_threadsafe_apis Thread-safe APIs + * @ingroup lwip_opts + */ + + /* + ------------------------------------ + -------------- NO SYS -------------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_nosys NO_SYS + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * NO_SYS==1: Use lwIP without OS-awareness (no thread, semaphores, mutexes or + * mboxes). This means threaded APIs cannot be used (socket, netconn, + * i.e. everything in the 'api' folder), only the callback-style raw API is + * available (and you have to watch out for yourself that you don't access + * lwIP functions/structures from more than one context at a time!) + */ +#if !defined NO_SYS || defined __DOXYGEN__ +#define NO_SYS 0 +#endif +/** + * @} + */ + +/** + * @defgroup lwip_opts_timers Timers + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * LWIP_TIMERS==0: Drop support for sys_timeout and lwip-internal cyclic timers. + * (the array of lwip-internal cyclic timers is still provided) + * (check NO_SYS_NO_TIMERS for compatibility to old versions) + */ +#if !defined LWIP_TIMERS || defined __DOXYGEN__ +#ifdef NO_SYS_NO_TIMERS +#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) +#else +#define LWIP_TIMERS 1 +#endif +#endif + +/** + * LWIP_TIMERS_CUSTOM==1: Provide your own timer implementation. + * Function prototypes in timeouts.h and the array of lwip-internal cyclic timers + * are still included, but the implementation is not. The following functions + * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), + * sys_timeouts_mbox_fetch() + */ +#if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__ +#define LWIP_TIMERS_CUSTOM 0 +#endif +/** + * @} + */ + +/** + * @defgroup lwip_opts_memcpy memcpy + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * MEMCPY: override this if you have a faster implementation at hand than the + * one included in your C library + */ +#if !defined MEMCPY || defined __DOXYGEN__ +#define MEMCPY(dst,src,len) memcpy(dst,src,len) +#endif + +/** + * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a + * call to memcpy() if the length is known at compile time and is small. + */ +#if !defined SMEMCPY || defined __DOXYGEN__ +#define SMEMCPY(dst,src,len) memcpy(dst,src,len) +#endif +/** + * @} + */ + +/* + ------------------------------------ + ----------- Core locking ----------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_lock Core locking and MPU + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * LWIP_MPU_COMPATIBLE: enables special memory management mechanism + * which makes lwip able to work on MPU (Memory Protection Unit) system + * by not passing stack-pointers to other threads + * (this decreases performance as memory is allocated from pools instead + * of keeping it on the stack) + */ +#if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__ +#define LWIP_MPU_COMPATIBLE 0 +#endif + +/** + * LWIP_TCPIP_CORE_LOCKING + * Creates a global mutex that is held during TCPIP thread operations. + * Can be locked by client code to perform lwIP operations without changing + * into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and + * UNLOCK_TCPIP_CORE(). + * Your system should provide mutexes supporting priority inversion to use this. + */ +#if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ +#define LWIP_TCPIP_CORE_LOCKING 1 +#endif + +/** + * LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled, + * this lets tcpip_input() grab the mutex for input packets as well, + * instead of allocating a message and passing it to tcpip_thread. + * + * ATTENTION: this does not work when tcpip_input() is called from + * interrupt context! + */ +#if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ +#define LWIP_TCPIP_CORE_LOCKING_INPUT 0 +#endif + +/** + * SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt + * protection) for certain critical regions during buffer allocation, deallocation + * and memory allocation and deallocation. + * ATTENTION: This is required when using lwIP from more than one context! If + * you disable this, you must be sure what you are doing! + */ +#if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ +#define SYS_LIGHTWEIGHT_PROT 1 +#endif +/** + * @} + */ + +/* + ------------------------------------ + ---------- Memory options ---------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_mem Heap and memory pools + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library + * instead of the lwip internal allocator. Can save code size if you + * already use it. + */ +#if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__ +#define MEM_LIBC_MALLOC 0 +#endif + +/** + * MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator. + * Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution + * speed (heap alloc can be much slower than pool alloc) and usage from interrupts + * (especially if your netif driver allocates PBUF_POOL pbufs for received frames + * from interrupt)! + * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools, + * not only for internal pools defined in memp_std.h)! + */ +#if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__ +#define MEMP_MEM_MALLOC 0 +#endif + +/** + * MEM_ALIGNMENT: should be set to the alignment of the CPU + * 4 byte alignment -> \#define MEM_ALIGNMENT 4 + * 2 byte alignment -> \#define MEM_ALIGNMENT 2 + */ +#if !defined MEM_ALIGNMENT || defined __DOXYGEN__ +#define MEM_ALIGNMENT 1 +#endif + +/** + * MEM_SIZE: the size of the heap memory. If the application will send + * a lot of data that needs to be copied, this should be set high. + */ +#if !defined MEM_SIZE || defined __DOXYGEN__ +#define MEM_SIZE 1600 +#endif + +/** + * MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable + * amount of bytes before and after each memp element in every pool and fills + * it with a prominent default value. + * MEMP_OVERFLOW_CHECK == 0 no checking + * MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed + * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time + * memp_malloc() or memp_free() is called (useful but slow!) + */ +#if !defined MEMP_OVERFLOW_CHECK || defined __DOXYGEN__ +#define MEMP_OVERFLOW_CHECK 0 +#endif + +/** + * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make + * sure that there are no cycles in the linked lists. + */ +#if !defined MEMP_SANITY_CHECK || defined __DOXYGEN__ +#define MEMP_SANITY_CHECK 0 +#endif + +/** + * MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set + * of memory pools of various sizes. When mem_malloc is called, an element of + * the smallest pool that can provide the length needed is returned. + * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. + */ +#if !defined MEM_USE_POOLS || defined __DOXYGEN__ +#define MEM_USE_POOLS 0 +#endif + +/** + * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next + * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more + * reliable. */ +#if !defined MEM_USE_POOLS_TRY_BIGGER_POOL || defined __DOXYGEN__ +#define MEM_USE_POOLS_TRY_BIGGER_POOL 0 +#endif + +/** + * MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h + * that defines additional pools beyond the "standard" ones required + * by lwIP. If you set this to 1, you must have lwippools.h in your + * include path somewhere. + */ +#if !defined MEMP_USE_CUSTOM_POOLS || defined __DOXYGEN__ +#define MEMP_USE_CUSTOM_POOLS 0 +#endif + +/** + * Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from + * interrupt context (or another context that doesn't allow waiting for a + * semaphore). + * If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT, + * while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs + * with each loop so that mem_free can run. + * + * ATTENTION: As you can see from the above description, this leads to dis-/ + * enabling interrupts often, which can be slow! Also, on low memory, mem_malloc + * can need longer. + * + * If you don't want that, at least for NO_SYS=0, you can still use the following + * functions to enqueue a deallocation call which then runs in the tcpip_thread + * context: + * - pbuf_free_callback(p); + * - mem_free_callback(m); + */ +#if !defined LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT || defined __DOXYGEN__ +#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 +#endif +/** + * @} + */ + +/* + ------------------------------------------------ + ---------- Internal Memory Pool Sizes ---------- + ------------------------------------------------ +*/ +/** + * @defgroup lwip_opts_memp Internal memory pools + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). + * If the application sends a lot of data out of ROM (or other static memory), + * this should be set high. + */ +#if !defined MEMP_NUM_PBUF || defined __DOXYGEN__ +#define MEMP_NUM_PBUF 16 +#endif + +/** + * MEMP_NUM_RAW_PCB: Number of raw connection PCBs + * (requires the LWIP_RAW option) + */ +#if !defined MEMP_NUM_RAW_PCB || defined __DOXYGEN__ +#define MEMP_NUM_RAW_PCB 4 +#endif + +/** + * MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One + * per active UDP "connection". + * (requires the LWIP_UDP option) + */ +#if !defined MEMP_NUM_UDP_PCB || defined __DOXYGEN__ +#define MEMP_NUM_UDP_PCB 4 +#endif + +/** + * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. + * (requires the LWIP_TCP option) + */ +#if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__ +#define MEMP_NUM_TCP_PCB 5 +#endif + +/** + * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. + * (requires the LWIP_TCP option) + */ +#if !defined MEMP_NUM_TCP_PCB_LISTEN || defined __DOXYGEN__ +#define MEMP_NUM_TCP_PCB_LISTEN 8 +#endif + +/** + * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. + * (requires the LWIP_TCP option) + */ +#if !defined MEMP_NUM_TCP_SEG || defined __DOXYGEN__ +#define MEMP_NUM_TCP_SEG 16 +#endif + +/** + * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for + * reassembly (whole packets, not fragments!) + */ +#if !defined MEMP_NUM_REASSDATA || defined __DOXYGEN__ +#define MEMP_NUM_REASSDATA 5 +#endif + +/** + * MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent + * (fragments, not whole packets!). + * This is only used with LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 + * with DMA-enabled MACs where the packet is not yet sent when netif->output + * returns. + */ +#if !defined MEMP_NUM_FRAG_PBUF || defined __DOXYGEN__ +#define MEMP_NUM_FRAG_PBUF 15 +#endif + +/** + * MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing + * packets (pbufs) that are waiting for an ARP request (to resolve + * their destination address) to finish. + * (requires the ARP_QUEUEING option) + */ +#if !defined MEMP_NUM_ARP_QUEUE || defined __DOXYGEN__ +#define MEMP_NUM_ARP_QUEUE 30 +#endif + +/** + * MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces + * can be members at the same time (one per netif - allsystems group -, plus one + * per netif membership). + * (requires the LWIP_IGMP option) + */ +#if !defined MEMP_NUM_IGMP_GROUP || defined __DOXYGEN__ +#define MEMP_NUM_IGMP_GROUP 8 +#endif + +/** + * MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts. + * The default number of timeouts is calculated here for all enabled modules. + * The formula expects settings to be either '0' or '1'. + */ +#if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__ +#define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) +#endif + +/** + * MEMP_NUM_NETBUF: the number of struct netbufs. + * (only needed if you use the sequential API, like api_lib.c) + */ +#if !defined MEMP_NUM_NETBUF || defined __DOXYGEN__ +#define MEMP_NUM_NETBUF 2 +#endif + +/** + * MEMP_NUM_NETCONN: the number of struct netconns. + * (only needed if you use the sequential API, like api_lib.c) + */ +#if !defined MEMP_NUM_NETCONN || defined __DOXYGEN__ +#define MEMP_NUM_NETCONN 4 +#endif + +/** + * MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used + * for callback/timeout API communication. + * (only needed if you use tcpip.c) + */ +#if !defined MEMP_NUM_TCPIP_MSG_API || defined __DOXYGEN__ +#define MEMP_NUM_TCPIP_MSG_API 8 +#endif + +/** + * MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used + * for incoming packets. + * (only needed if you use tcpip.c) + */ +#if !defined MEMP_NUM_TCPIP_MSG_INPKT || defined __DOXYGEN__ +#define MEMP_NUM_TCPIP_MSG_INPKT 8 +#endif + +/** + * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls + * (before freeing the corresponding memory using lwip_freeaddrinfo()). + */ +#if !defined MEMP_NUM_NETDB || defined __DOXYGEN__ +#define MEMP_NUM_NETDB 1 +#endif + +/** + * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list + * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. + */ +#if !defined MEMP_NUM_LOCALHOSTLIST || defined __DOXYGEN__ +#define MEMP_NUM_LOCALHOSTLIST 1 +#endif + +/** + * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. + */ +#if !defined PBUF_POOL_SIZE || defined __DOXYGEN__ +#define PBUF_POOL_SIZE 16 +#endif + +/** MEMP_NUM_API_MSG: the number of concurrently active calls to various + * socket, netconn, and tcpip functions + */ +#if !defined MEMP_NUM_API_MSG || defined __DOXYGEN__ +#define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API +#endif + +/** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname + */ +#if !defined MEMP_NUM_DNS_API_MSG || defined __DOXYGEN__ +#define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API +#endif + +/** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls + * to getsockopt/setsockopt + */ +#if !defined MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA || defined __DOXYGEN__ +#define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API +#endif + +/** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the + * netifapi functions + */ +#if !defined MEMP_NUM_NETIFAPI_MSG || defined __DOXYGEN__ +#define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API +#endif +/** + * @} + */ + +/* + --------------------------------- + ---------- ARP options ---------- + --------------------------------- +*/ +/** + * @defgroup lwip_opts_arp ARP + * @ingroup lwip_opts_ipv4 + * @{ + */ +/** + * LWIP_ARP==1: Enable ARP functionality. + */ +#if !defined LWIP_ARP || defined __DOXYGEN__ +#define LWIP_ARP 1 +#endif + +/** + * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. + */ +#if !defined ARP_TABLE_SIZE || defined __DOXYGEN__ +#define ARP_TABLE_SIZE 10 +#endif + +/** the time an ARP entry stays valid after its last update, + * for ARP_TMR_INTERVAL = 1000, this is + * (60 * 5) seconds = 5 minutes. + */ +#if !defined ARP_MAXAGE || defined __DOXYGEN__ +#define ARP_MAXAGE 300 +#endif + +/** + * ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address + * resolution. By default, only the most recent packet is queued per IP address. + * This is sufficient for most protocols and mainly reduces TCP connection + * startup time. Set this to 1 if you know your application sends more than one + * packet in a row to an IP address that is not in the ARP cache. + */ +#if !defined ARP_QUEUEING || defined __DOXYGEN__ +#define ARP_QUEUEING 0 +#endif + +/** The maximum number of packets which may be queued for each + * unresolved address by other network layers. Defaults to 3, 0 means disabled. + * Old packets are dropped, new packets are queued. + */ +#if !defined ARP_QUEUE_LEN || defined __DOXYGEN__ +#define ARP_QUEUE_LEN 3 +#endif + +/** + * ETHARP_SUPPORT_VLAN==1: support receiving and sending ethernet packets with + * VLAN header. See the description of LWIP_HOOK_VLAN_CHECK and + * LWIP_HOOK_VLAN_SET hooks to check/set VLAN headers. + * Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check. + * If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted. + * If ETHARP_VLAN_CHECK is not defined, all traffic is accepted. + * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) + * that returns 1 to accept a packet or 0 to drop a packet. + */ +#if !defined ETHARP_SUPPORT_VLAN || defined __DOXYGEN__ +#define ETHARP_SUPPORT_VLAN 0 +#endif + +/** LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled + */ +#if !defined LWIP_ETHERNET || defined __DOXYGEN__ +#define LWIP_ETHERNET LWIP_ARP +#endif + +/** ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure + * alignment of payload after that header. Since the header is 14 bytes long, + * without this padding e.g. addresses in the IP header will not be aligned + * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. + */ +#if !defined ETH_PAD_SIZE || defined __DOXYGEN__ +#define ETH_PAD_SIZE 0 +#endif + +/** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table + * entries (using etharp_add_static_entry/etharp_remove_static_entry). + */ +#if !defined ETHARP_SUPPORT_STATIC_ENTRIES || defined __DOXYGEN__ +#define ETHARP_SUPPORT_STATIC_ENTRIES 0 +#endif + +/** ETHARP_TABLE_MATCH_NETIF==1: Match netif for ARP table entries. + * If disabled, duplicate IP address on multiple netifs are not supported + * (but this should only occur for AutoIP). + */ +#if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__ +#define ETHARP_TABLE_MATCH_NETIF 0 +#endif +/** + * @} + */ + +/* + -------------------------------- + ---------- IP options ---------- + -------------------------------- +*/ +/** + * @defgroup lwip_opts_ipv4 IPv4 + * @ingroup lwip_opts + * @{ + */ +/** + * LWIP_IPV4==1: Enable IPv4 + */ +#if !defined LWIP_IPV4 || defined __DOXYGEN__ +#define LWIP_IPV4 1 +#endif + +/** + * IP_FORWARD==1: Enables the ability to forward IP packets across network + * interfaces. If you are going to run lwIP on a device with only one network + * interface, define this to 0. + */ +#if !defined IP_FORWARD || defined __DOXYGEN__ +#define IP_FORWARD 0 +#endif + +/** + * IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that + * this option does not affect outgoing packet sizes, which can be controlled + * via IP_FRAG. + */ +#if !defined IP_REASSEMBLY || defined __DOXYGEN__ +#define IP_REASSEMBLY 1 +#endif + +/** + * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note + * that this option does not affect incoming packet sizes, which can be + * controlled via IP_REASSEMBLY. + */ +#if !defined IP_FRAG || defined __DOXYGEN__ +#define IP_FRAG 1 +#endif + +#if !LWIP_IPV4 +/* disable IPv4 extensions when IPv4 is disabled */ +#undef IP_FORWARD +#define IP_FORWARD 0 +#undef IP_REASSEMBLY +#define IP_REASSEMBLY 0 +#undef IP_FRAG +#define IP_FRAG 0 +#endif /* !LWIP_IPV4 */ + +/** + * IP_OPTIONS_ALLOWED: Defines the behavior for IP options. + * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. + * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). + */ +#if !defined IP_OPTIONS_ALLOWED || defined __DOXYGEN__ +#define IP_OPTIONS_ALLOWED 1 +#endif + +/** + * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) + * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived + * in this time, the whole packet is discarded. + */ +#if !defined IP_REASS_MAXAGE || defined __DOXYGEN__ +#define IP_REASS_MAXAGE 3 +#endif + +/** + * IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. + * Since the received pbufs are enqueued, be sure to configure + * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive + * packets even if the maximum amount of fragments is enqueued for reassembly! + */ +#if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__ +#define IP_REASS_MAX_PBUFS 10 +#endif + +/** + * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. + */ +#if !defined IP_DEFAULT_TTL || defined __DOXYGEN__ +#define IP_DEFAULT_TTL 255 +#endif + +/** + * IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast + * filter per pcb on udp and raw send operations. To enable broadcast filter + * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. + */ +#if !defined IP_SOF_BROADCAST || defined __DOXYGEN__ +#define IP_SOF_BROADCAST 0 +#endif + +/** + * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast + * filter on recv operations. + */ +#if !defined IP_SOF_BROADCAST_RECV || defined __DOXYGEN__ +#define IP_SOF_BROADCAST_RECV 0 +#endif + +/** + * IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1: allow ip_forward() to send packets back + * out on the netif where it was received. This should only be used for + * wireless networks. + * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming + * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags! + */ +#if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__ +#define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 +#endif + +/** + * LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first + * local TCP/UDP pcb (default==0). This can prevent creating predictable port + * numbers after booting a device. + */ +#if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__ +#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 +#endif +/** + * @} + */ + +/* + ---------------------------------- + ---------- ICMP options ---------- + ---------------------------------- +*/ +/** + * @defgroup lwip_opts_icmp ICMP + * @ingroup lwip_opts_ipv4 + * @{ + */ +/** + * LWIP_ICMP==1: Enable ICMP module inside the IP stack. + * Be careful, disable that make your product non-compliant to RFC1122 + */ +#if !defined LWIP_ICMP || defined __DOXYGEN__ +#define LWIP_ICMP 1 +#endif + +/** + * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. + */ +#if !defined ICMP_TTL || defined __DOXYGEN__ +#define ICMP_TTL (IP_DEFAULT_TTL) +#endif + +/** + * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) + */ +#if !defined LWIP_BROADCAST_PING || defined __DOXYGEN__ +#define LWIP_BROADCAST_PING 0 +#endif + +/** + * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) + */ +#if !defined LWIP_MULTICAST_PING || defined __DOXYGEN__ +#define LWIP_MULTICAST_PING 0 +#endif +/** + * @} + */ + +/* + --------------------------------- + ---------- RAW options ---------- + --------------------------------- +*/ +/** + * @defgroup lwip_opts_raw RAW + * @ingroup lwip_opts_callback + * @{ + */ +/** + * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. + */ +#if !defined LWIP_RAW || defined __DOXYGEN__ +#define LWIP_RAW 0 +#endif + +/** + * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. + */ +#if !defined RAW_TTL || defined __DOXYGEN__ +#define RAW_TTL (IP_DEFAULT_TTL) +#endif +/** + * @} + */ + +/* + ---------------------------------- + ---------- DHCP options ---------- + ---------------------------------- +*/ +/** + * @defgroup lwip_opts_dhcp DHCP + * @ingroup lwip_opts_ipv4 + * @{ + */ +/** + * LWIP_DHCP==1: Enable DHCP module. + */ +#if !defined LWIP_DHCP || defined __DOXYGEN__ +#define LWIP_DHCP 0 +#endif +#if !LWIP_IPV4 +/* disable DHCP when IPv4 is disabled */ +#undef LWIP_DHCP +#define LWIP_DHCP 0 +#endif /* !LWIP_IPV4 */ + +/** + * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. + */ +#if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__ +#define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) +#endif + +/** + * LWIP_DHCP_CHECK_LINK_UP==1: dhcp_start() only really starts if the netif has + * NETIF_FLAG_LINK_UP set in its flags. As this is only an optimization and + * netif drivers might not set this flag, the default is off. If enabled, + * netif_set_link_up() must be called to continue dhcp starting. + */ +#if !defined LWIP_DHCP_CHECK_LINK_UP +#define LWIP_DHCP_CHECK_LINK_UP 0 +#endif + +/** + * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name. + */ +#if !defined LWIP_DHCP_BOOTP_FILE || defined __DOXYGEN__ +#define LWIP_DHCP_BOOTP_FILE 0 +#endif + +/** + * LWIP_DHCP_GETS_NTP==1: Request NTP servers with discover/select. For each + * response packet, an callback is called, which has to be provided by the port: + * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs); +*/ +#if !defined LWIP_DHCP_GET_NTP_SRV || defined __DOXYGEN__ +#define LWIP_DHCP_GET_NTP_SRV 0 +#endif + +/** + * The maximum of NTP servers requested + */ +#if !defined LWIP_DHCP_MAX_NTP_SERVERS || defined __DOXYGEN__ +#define LWIP_DHCP_MAX_NTP_SERVERS 1 +#endif + +/** + * LWIP_DHCP_MAX_DNS_SERVERS > 0: Request DNS servers with discover/select. + * DHCP servers received in the response are passed to DNS via @ref dns_setserver() + * (up to the maximum limit defined here). + */ +#if !defined LWIP_DHCP_MAX_DNS_SERVERS || defined __DOXYGEN__ +#define LWIP_DHCP_MAX_DNS_SERVERS DNS_MAX_SERVERS +#endif +/** + * @} + */ + +/* + ------------------------------------ + ---------- AUTOIP options ---------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_autoip AUTOIP + * @ingroup lwip_opts_ipv4 + * @{ + */ +/** + * LWIP_AUTOIP==1: Enable AUTOIP module. + */ +#if !defined LWIP_AUTOIP || defined __DOXYGEN__ +#define LWIP_AUTOIP 0 +#endif +#if !LWIP_IPV4 +/* disable AUTOIP when IPv4 is disabled */ +#undef LWIP_AUTOIP +#define LWIP_AUTOIP 0 +#endif /* !LWIP_IPV4 */ + +/** + * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on + * the same interface at the same time. + */ +#if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__ +#define LWIP_DHCP_AUTOIP_COOP 0 +#endif + +/** + * LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes + * that should be sent before falling back on AUTOIP (the DHCP client keeps + * running in this case). This can be set as low as 1 to get an AutoIP address + * very quickly, but you should be prepared to handle a changing IP address + * when DHCP overrides AutoIP. + */ +#if !defined LWIP_DHCP_AUTOIP_COOP_TRIES || defined __DOXYGEN__ +#define LWIP_DHCP_AUTOIP_COOP_TRIES 9 +#endif +/** + * @} + */ + +/* + ---------------------------------- + ----- SNMP MIB2 support ----- + ---------------------------------- +*/ +/** + * @defgroup lwip_opts_mib2 SNMP MIB2 callbacks + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * LWIP_MIB2_CALLBACKS==1: Turn on SNMP MIB2 callbacks. + * Turn this on to get callbacks needed to implement MIB2. + * Usually MIB2_STATS should be enabled, too. + */ +#if !defined LWIP_MIB2_CALLBACKS || defined __DOXYGEN__ +#define LWIP_MIB2_CALLBACKS 0 +#endif +/** + * @} + */ + +/* + ---------------------------------- + ----- Multicast/IGMP options ----- + ---------------------------------- +*/ +/** + * @defgroup lwip_opts_igmp IGMP + * @ingroup lwip_opts_ipv4 + * @{ + */ +/** + * LWIP_IGMP==1: Turn on IGMP module. + */ +#if !defined LWIP_IGMP || defined __DOXYGEN__ +#define LWIP_IGMP 0 +#endif +#if !LWIP_IPV4 +#undef LWIP_IGMP +#define LWIP_IGMP 0 +#endif + +/** + * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options + * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP + */ +#if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ +#define LWIP_MULTICAST_TX_OPTIONS (LWIP_IGMP && LWIP_UDP) +#endif +/** + * @} + */ + +/* + ---------------------------------- + ---------- DNS options ----------- + ---------------------------------- +*/ +/** + * @defgroup lwip_opts_dns DNS + * @ingroup lwip_opts_callback + * @{ + */ +/** + * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS + * transport. + */ +#if !defined LWIP_DNS || defined __DOXYGEN__ +#define LWIP_DNS 0 +#endif + +/** DNS maximum number of entries to maintain locally. */ +#if !defined DNS_TABLE_SIZE || defined __DOXYGEN__ +#define DNS_TABLE_SIZE 4 +#endif + +/** DNS maximum host name length supported in the name table. */ +#if !defined DNS_MAX_NAME_LENGTH || defined __DOXYGEN__ +#define DNS_MAX_NAME_LENGTH 256 +#endif + +/** The maximum of DNS servers + * The first server can be initialized automatically by defining + * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*' + */ +#if !defined DNS_MAX_SERVERS || defined __DOXYGEN__ +#define DNS_MAX_SERVERS 2 +#endif + +/** DNS do a name checking between the query and the response. */ +#if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__ +#define DNS_DOES_NAME_CHECK 1 +#endif + +/** LWIP_DNS_SECURE: controls the security level of the DNS implementation + * Use all DNS security features by default. + * This is overridable but should only be needed by very small targets + * or when using against non standard DNS servers. */ +#if !defined LWIP_DNS_SECURE || defined __DOXYGEN__ +#define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) +#endif + +/* A list of DNS security features follows */ +#define LWIP_DNS_SECURE_RAND_XID 1 +#define LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING 2 +#define LWIP_DNS_SECURE_RAND_SRC_PORT 4 + +/** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, you have to define an initializer: + * \#define DNS_LOCAL_HOSTLIST_INIT {DNS_LOCAL_HOSTLIST_ELEM("host_ip4", IPADDR4_INIT_BYTES(1,2,3,4)), \ + * DNS_LOCAL_HOSTLIST_ELEM("host_ip6", IPADDR6_INIT_HOST(123, 234, 345, 456)} + * + * Instead, you can also use an external function: + * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) + * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype). + */ +#if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ +#define DNS_LOCAL_HOSTLIST 0 +#endif /* DNS_LOCAL_HOSTLIST */ + +/** If this is turned on, the local host-list can be dynamically changed + * at runtime. */ +#if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__ +#define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 +#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + +/** Set this to 1 to enable querying ".local" names via mDNS + * using a One-Shot Multicast DNS Query */ +#if !defined LWIP_DNS_SUPPORT_MDNS_QUERIES || defined __DOXYGEN__ +#define LWIP_DNS_SUPPORT_MDNS_QUERIES 0 +#endif +/** + * @} + */ + +/* + --------------------------------- + ---------- UDP options ---------- + --------------------------------- +*/ +/** + * @defgroup lwip_opts_udp UDP + * @ingroup lwip_opts_callback + * @{ + */ +/** + * LWIP_UDP==1: Turn on UDP. + */ +#if !defined LWIP_UDP || defined __DOXYGEN__ +#define LWIP_UDP 1 +#endif + +/** + * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) + */ +#if !defined LWIP_UDPLITE || defined __DOXYGEN__ +#define LWIP_UDPLITE 0 +#endif + +/** + * UDP_TTL: Default Time-To-Live value. + */ +#if !defined UDP_TTL || defined __DOXYGEN__ +#define UDP_TTL (IP_DEFAULT_TTL) +#endif + +/** + * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. + */ +#if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__ +#define LWIP_NETBUF_RECVINFO 0 +#endif +/** + * @} + */ + +/* + --------------------------------- + ---------- TCP options ---------- + --------------------------------- +*/ +/** + * @defgroup lwip_opts_tcp TCP + * @ingroup lwip_opts_callback + * @{ + */ +/** + * LWIP_TCP==1: Turn on TCP. + */ +#if !defined LWIP_TCP || defined __DOXYGEN__ +#define LWIP_TCP 1 +#endif + +/** + * TCP_TTL: Default Time-To-Live value. + */ +#if !defined TCP_TTL || defined __DOXYGEN__ +#define TCP_TTL (IP_DEFAULT_TTL) +#endif + +/** + * TCP_WND: The size of a TCP window. This must be at least + * (2 * TCP_MSS) for things to work well. + * ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size + * with scaling applied. Maximum window value in the TCP header + * will be TCP_WND >> TCP_RCV_SCALE + */ +#if !defined TCP_WND || defined __DOXYGEN__ +#define TCP_WND (4 * TCP_MSS) +#endif + +/** + * TCP_MAXRTX: Maximum number of retransmissions of data segments. + */ +#if !defined TCP_MAXRTX || defined __DOXYGEN__ +#define TCP_MAXRTX 12 +#endif + +/** + * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. + */ +#if !defined TCP_SYNMAXRTX || defined __DOXYGEN__ +#define TCP_SYNMAXRTX 6 +#endif + +/** + * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. + * Define to 0 if your device is low on memory. + */ +#if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ +#define TCP_QUEUE_OOSEQ (LWIP_TCP) +#endif + +/** + * TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, + * you might want to increase this.) + * For the receive side, this MSS is advertised to the remote side + * when opening a connection. For the transmit size, this MSS sets + * an upper limit on the MSS advertised by the remote host. + */ +#if !defined TCP_MSS || defined __DOXYGEN__ +#define TCP_MSS 536 +#endif + +/** + * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really + * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which + * reflects the available reassembly buffer size at the remote host) and the + * largest size permitted by the IP layer" (RFC 1122) + * Setting this to 1 enables code that checks TCP_MSS against the MTU of the + * netif used for a connection and limits the MSS if it would be too big otherwise. + */ +#if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__ +#define TCP_CALCULATE_EFF_SEND_MSS 1 +#endif + + +/** + * TCP_SND_BUF: TCP sender buffer space (bytes). + * To achieve good performance, this should be at least 2 * TCP_MSS. + */ +#if !defined TCP_SND_BUF || defined __DOXYGEN__ +#define TCP_SND_BUF (2 * TCP_MSS) +#endif + +/** + * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least + * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. + */ +#if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__ +#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) +#endif + +/** + * TCP_SNDLOWAT: TCP writable space (bytes). This must be less than + * TCP_SND_BUF. It is the amount of space which must be available in the + * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). + */ +#if !defined TCP_SNDLOWAT || defined __DOXYGEN__ +#define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) +#endif + +/** + * TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less + * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below + * this number, select returns writable (combined with TCP_SNDLOWAT). + */ +#if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__ +#define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) +#endif + +/** + * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. + * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. + */ +#if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ +#define TCP_OOSEQ_MAX_BYTES 0 +#endif + +/** + * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. + * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1. + */ +#if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ +#define TCP_OOSEQ_MAX_PBUFS 0 +#endif + +/** + * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. + */ +#if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__ +#define TCP_LISTEN_BACKLOG 0 +#endif + +/** + * The maximum allowed backlog for TCP listen netconns. + * This backlog is used unless another is explicitly specified. + * 0xff is the maximum (u8_t). + */ +#if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__ +#define TCP_DEFAULT_LISTEN_BACKLOG 0xff +#endif + +/** + * TCP_OVERSIZE: The maximum number of bytes that tcp_write may + * allocate ahead of time in an attempt to create shorter pbuf chains + * for transmission. The meaningful range is 0 to TCP_MSS. Some + * suggested values are: + * + * 0: Disable oversized allocation. Each tcp_write() allocates a new + pbuf (old behaviour). + * 1: Allocate size-aligned pbufs with minimal excess. Use this if your + * scatter-gather DMA requires aligned fragments. + * 128: Limit the pbuf/memory overhead to 20%. + * TCP_MSS: Try to create unfragmented TCP packets. + * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. + */ +#if !defined TCP_OVERSIZE || defined __DOXYGEN__ +#define TCP_OVERSIZE TCP_MSS +#endif + +/** + * LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. + * The timestamp option is currently only used to help remote hosts, it is not + * really used locally. Therefore, it is only enabled when a TS option is + * received in the initial SYN packet from a remote host. + */ +#if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__ +#define LWIP_TCP_TIMESTAMPS 0 +#endif + +/** + * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an + * explicit window update + */ +#if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ +#define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) +#endif + +/** + * LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. + * LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all + * events (accept, sent, etc) that happen in the system. + * LWIP_CALLBACK_API==1: The PCB callback function is called directly + * for the event. This is the default. + */ +#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__ +#define LWIP_EVENT_API 0 +#define LWIP_CALLBACK_API 1 +#else +#ifndef LWIP_EVENT_API +#define LWIP_EVENT_API 0 +#endif +#ifndef LWIP_CALLBACK_API +#define LWIP_CALLBACK_API 0 +#endif +#endif + +/** + * LWIP_WND_SCALE and TCP_RCV_SCALE: + * Set LWIP_WND_SCALE to 1 to enable window scaling. + * Set TCP_RCV_SCALE to the desired scaling factor (shift count in the + * range of [0..14]). + * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large + * send window while having a small receive window only. + */ +#if !defined LWIP_WND_SCALE || defined __DOXYGEN__ +#define LWIP_WND_SCALE 0 +#define TCP_RCV_SCALE 0 +#endif +/** + * @} + */ + +/* + ---------------------------------- + ---------- Pbuf options ---------- + ---------------------------------- +*/ +/** + * @defgroup lwip_opts_pbuf PBUF + * @ingroup lwip_opts + * @{ + */ +/** + * PBUF_LINK_HLEN: the number of bytes that should be allocated for a + * link level header. The default is 14, the standard value for + * Ethernet. + */ +#if !defined PBUF_LINK_HLEN || defined __DOXYGEN__ +#if defined LWIP_HOOK_VLAN_SET && !defined __DOXYGEN__ +#define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE) +#else /* LWIP_HOOK_VLAN_SET */ +#define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) +#endif /* LWIP_HOOK_VLAN_SET */ +#endif + +/** + * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated + * for an additional encapsulation header before ethernet headers (e.g. 802.11) + */ +#if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ +#define PBUF_LINK_ENCAPSULATION_HLEN 0u +#endif + +/** + * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is + * designed to accommodate single full size TCP frame in one pbuf, including + * TCP_MSS, IP header, and link header. + */ +#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) +#endif +/** + * @} + */ + +/* + ------------------------------------------------ + ---------- Network Interfaces options ---------- + ------------------------------------------------ +*/ +/** + * @defgroup lwip_opts_netif NETIF + * @ingroup lwip_opts + * @{ + */ +/** + * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname + * field. + */ +#if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__ +#define LWIP_NETIF_HOSTNAME 0 +#endif + +/** + * LWIP_NETIF_API==1: Support netif api (in netifapi.c) + */ +#if !defined LWIP_NETIF_API || defined __DOXYGEN__ +#define LWIP_NETIF_API 0 +#endif + +/** + * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface + * changes its up/down status (i.e., due to DHCP IP acquisition) + */ +#if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__ +#define LWIP_NETIF_STATUS_CALLBACK 0 +#endif + +/** + * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface + * whenever the link changes (i.e., link down) + */ +#if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__ +#define LWIP_NETIF_LINK_CALLBACK 0 +#endif + +/** + * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called + * when a netif has been removed + */ +#if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__ +#define LWIP_NETIF_REMOVE_CALLBACK 0 +#endif + +/** + * LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table + * indices) in struct netif. TCP and UDP can make use of this to prevent + * scanning the ARP table for every sent packet. While this is faster for big + * ARP tables or many concurrent connections, it might be counterproductive + * if you have a tiny ARP table or if there never are concurrent connections. + */ +#if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__ +#define LWIP_NETIF_HWADDRHINT 0 +#endif + +/** + * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data + * to be sent into one single pbuf. This is for compatibility with DMA-enabled + * MACs that do not support scatter-gather. + * Beware that this might involve CPU-memcpy before transmitting that would not + * be needed without this flag! Use this only if you need to! + * + * @todo: TCP and IP-frag do not work with this, yet: + */ +#if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ +#define LWIP_NETIF_TX_SINGLE_PBUF 0 +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + +/** + * LWIP_NUM_NETIF_CLIENT_DATA: Number of clients that may store + * data in client_data member array of struct netif. + */ +#if !defined LWIP_NUM_NETIF_CLIENT_DATA || defined __DOXYGEN__ +#define LWIP_NUM_NETIF_CLIENT_DATA 0 +#endif +/** + * @} + */ + +/* + ------------------------------------ + ---------- LOOPIF options ---------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_loop Loopback interface + * @ingroup lwip_opts_netif + * @{ + */ +/** + * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). + * This is only needed when no real netifs are available. If at least one other + * netif is available, loopback traffic uses this netif. + */ +#if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ +#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK +#endif + +/** + * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). + */ +#if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ +#define LWIP_LOOPIF_MULTICAST 0 +#endif + +/** + * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP + * address equal to the netif IP address, looping them back up the stack. + */ +#if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__ +#define LWIP_NETIF_LOOPBACK 0 +#endif + +/** + * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback + * sending for each netif (0 = disabled) + */ +#if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__ +#define LWIP_LOOPBACK_MAX_PBUFS 0 +#endif + +/** + * LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in + * the system, as netifs must change how they behave depending on this setting + * for the LWIP_NETIF_LOOPBACK option to work. + * Setting this is needed to avoid reentering non-reentrant functions like + * tcp_input(). + * LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a + * multithreaded environment like tcpip.c. In this case, netif->input() + * is called directly. + * LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. + * The packets are put on a list and netif_poll() must be called in + * the main application loop. + */ +#if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ +#define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) +#endif +/** + * @} + */ + +/* + ------------------------------------ + ---------- Thread options ---------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_thread Threading + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. + */ +#if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ +#define TCPIP_THREAD_NAME "tcpip_thread" +#endif + +/** + * TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. + * The stack size value itself is platform-dependent, but is passed to + * sys_thread_new() when the thread is created. + */ +#if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__ +#define TCPIP_THREAD_STACKSIZE 0 +#endif + +/** + * TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. + * The priority value itself is platform-dependent, but is passed to + * sys_thread_new() when the thread is created. + */ +#if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__ +#define TCPIP_THREAD_PRIO 1 +#endif + +/** + * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages + * The queue size value itself is platform-dependent, but is passed to + * sys_mbox_new() when tcpip_init is called. + */ +#if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__ +#define TCPIP_MBOX_SIZE 0 +#endif + +/** + * Define this to something that triggers a watchdog. This is called from + * tcpip_thread after processing a message. + */ +#if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__ +#define LWIP_TCPIP_THREAD_ALIVE() +#endif + +/** + * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. + */ +#if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ +#define SLIPIF_THREAD_NAME "slipif_loop" +#endif + +/** + * SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. + * The stack size value itself is platform-dependent, but is passed to + * sys_thread_new() when the thread is created. + */ +#if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__ +#define SLIPIF_THREAD_STACKSIZE 0 +#endif + +/** + * SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. + * The priority value itself is platform-dependent, but is passed to + * sys_thread_new() when the thread is created. + */ +#if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__ +#define SLIPIF_THREAD_PRIO 1 +#endif + +/** + * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. + */ +#if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ +#define DEFAULT_THREAD_NAME "lwIP" +#endif + +/** + * DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. + * The stack size value itself is platform-dependent, but is passed to + * sys_thread_new() when the thread is created. + */ +#if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__ +#define DEFAULT_THREAD_STACKSIZE 0 +#endif + +/** + * DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. + * The priority value itself is platform-dependent, but is passed to + * sys_thread_new() when the thread is created. + */ +#if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__ +#define DEFAULT_THREAD_PRIO 1 +#endif + +/** + * DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a + * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed + * to sys_mbox_new() when the recvmbox is created. + */ +#if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__ +#define DEFAULT_RAW_RECVMBOX_SIZE 0 +#endif + +/** + * DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a + * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed + * to sys_mbox_new() when the recvmbox is created. + */ +#if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__ +#define DEFAULT_UDP_RECVMBOX_SIZE 0 +#endif + +/** + * DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a + * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed + * to sys_mbox_new() when the recvmbox is created. + */ +#if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__ +#define DEFAULT_TCP_RECVMBOX_SIZE 0 +#endif + +/** + * DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. + * The queue size value itself is platform-dependent, but is passed to + * sys_mbox_new() when the acceptmbox is created. + */ +#if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__ +#define DEFAULT_ACCEPTMBOX_SIZE 0 +#endif +/** + * @} + */ + +/* + ---------------------------------------------- + ---------- Sequential layer options ---------- + ---------------------------------------------- +*/ +/** + * @defgroup lwip_opts_netconn Netconn + * @ingroup lwip_opts_threadsafe_apis + * @{ + */ +/** + * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) + */ +#if !defined LWIP_NETCONN || defined __DOXYGEN__ +#define LWIP_NETCONN 1 +#endif + +/** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create + * timers running in tcpip_thread from another thread. + */ +#if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__ +#define LWIP_TCPIP_TIMEOUT 0 +#endif + +/** LWIP_NETCONN_SEM_PER_THREAD==1: Use one (thread-local) semaphore per + * thread calling socket/netconn functions instead of allocating one + * semaphore per netconn (and per select etc.) + * ATTENTION: a thread-local semaphore for API calls is needed: + * - LWIP_NETCONN_THREAD_SEM_GET() returning a sys_sem_t* + * - LWIP_NETCONN_THREAD_SEM_ALLOC() creating the semaphore + * - LWIP_NETCONN_THREAD_SEM_FREE() freeing the semaphore + * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). + * Ports may call these for threads created with sys_thread_new(). + */ +#if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__ +#define LWIP_NETCONN_SEM_PER_THREAD 0 +#endif + +/** LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread, + * writing from a 2nd thread and closing from a 3rd thread at the same time. + * ATTENTION: This is currently really alpha! Some requirements: + * - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from + * multiple threads at once + * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox + * and prevent a task pending on this during/after deletion + */ +#if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__ +#define LWIP_NETCONN_FULLDUPLEX 0 +#endif +/** + * @} + */ + +/* + ------------------------------------ + ---------- Socket options ---------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_socket Sockets + * @ingroup lwip_opts_threadsafe_apis + * @{ + */ +/** + * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) + */ +#if !defined LWIP_SOCKET || defined __DOXYGEN__ +#define LWIP_SOCKET 1 +#endif + +/* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete + * successfully, as required by POSIX. Default is POSIX-compliant. + */ +#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ +#define LWIP_SOCKET_SET_ERRNO 1 +#endif + +/** + * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. + * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. + * While this helps code completion, it might conflict with existing libraries. + * (only used if you use sockets.c) + */ +#if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__ +#define LWIP_COMPAT_SOCKETS 1 +#endif + +/** + * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. + * Disable this option if you use a POSIX operating system that uses the same + * names (read, write & close). (only used if you use sockets.c) + */ +#if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__ +#define LWIP_POSIX_SOCKETS_IO_NAMES 1 +#endif + +/** + * LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n. + * This can be useful when there are multiple APIs which create file descriptors. + * When they all start with a different offset and you won't make them overlap you can + * re implement read/write/close/ioctl/fnctl to send the requested action to the right + * library (sharing select will need more work though). + */ +#if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__ +#define LWIP_SOCKET_OFFSET 0 +#endif + +/** + * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT + * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set + * in seconds. (does not require sockets.c, and will affect tcp.c) + */ +#if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__ +#define LWIP_TCP_KEEPALIVE 0 +#endif + +/** + * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and + * SO_SNDTIMEO processing. + */ +#if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__ +#define LWIP_SO_SNDTIMEO 0 +#endif + +/** + * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and + * SO_RCVTIMEO processing. + */ +#if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__ +#define LWIP_SO_RCVTIMEO 0 +#endif + +/** + * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int + * (milliseconds, much like winsock does) instead of a struct timeval (default). + */ +#if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__ +#define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0 +#endif + +/** + * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. + */ +#if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__ +#define LWIP_SO_RCVBUF 0 +#endif + +/** + * LWIP_SO_LINGER==1: Enable SO_LINGER processing. + */ +#if !defined LWIP_SO_LINGER || defined __DOXYGEN__ +#define LWIP_SO_LINGER 0 +#endif + +/** + * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. + */ +#if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__ +#define RECV_BUFSIZE_DEFAULT INT_MAX +#endif + +/** + * By default, TCP socket/netconn close waits 20 seconds max to send the FIN + */ +#if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__ +#define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000 +#endif + +/** + * SO_REUSE==1: Enable SO_REUSEADDR option. + */ +#if !defined SO_REUSE || defined __DOXYGEN__ +#define SO_REUSE 0 +#endif + +/** + * SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets + * to all local matches if SO_REUSEADDR is turned on. + * WARNING: Adds a memcpy for every packet if passing to more than one pcb! + */ +#if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__ +#define SO_REUSE_RXTOALL 0 +#endif + +/** + * LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of + * pending data in the network buffer. This is the way windows does it. It's + * the default for lwIP since it is smaller. + * LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next + * pending datagram in bytes. This is the way linux does it. This code is only + * here for compatibility. + */ +#if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ +#define LWIP_FIONREAD_LINUXMODE 0 +#endif +/** + * @} + */ + +/* + ---------------------------------------- + ---------- Statistics options ---------- + ---------------------------------------- +*/ +/** + * @defgroup lwip_opts_stats Statistics + * @ingroup lwip_opts_debug + * @{ + */ +/** + * LWIP_STATS==1: Enable statistics collection in lwip_stats. + */ +#if !defined LWIP_STATS || defined __DOXYGEN__ +#define LWIP_STATS 1 +#endif + +#if LWIP_STATS + +/** + * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. + */ +#if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__ +#define LWIP_STATS_DISPLAY 0 +#endif + +/** + * LINK_STATS==1: Enable link stats. + */ +#if !defined LINK_STATS || defined __DOXYGEN__ +#define LINK_STATS 1 +#endif + +/** + * ETHARP_STATS==1: Enable etharp stats. + */ +#if !defined ETHARP_STATS || defined __DOXYGEN__ +#define ETHARP_STATS (LWIP_ARP) +#endif + +/** + * IP_STATS==1: Enable IP stats. + */ +#if !defined IP_STATS || defined __DOXYGEN__ +#define IP_STATS 1 +#endif + +/** + * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is + * on if using either frag or reass. + */ +#if !defined IPFRAG_STATS || defined __DOXYGEN__ +#define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) +#endif + +/** + * ICMP_STATS==1: Enable ICMP stats. + */ +#if !defined ICMP_STATS || defined __DOXYGEN__ +#define ICMP_STATS 1 +#endif + +/** + * IGMP_STATS==1: Enable IGMP stats. + */ +#if !defined IGMP_STATS || defined __DOXYGEN__ +#define IGMP_STATS (LWIP_IGMP) +#endif + +/** + * UDP_STATS==1: Enable UDP stats. Default is on if + * UDP enabled, otherwise off. + */ +#if !defined UDP_STATS || defined __DOXYGEN__ +#define UDP_STATS (LWIP_UDP) +#endif + +/** + * TCP_STATS==1: Enable TCP stats. Default is on if TCP + * enabled, otherwise off. + */ +#if !defined TCP_STATS || defined __DOXYGEN__ +#define TCP_STATS (LWIP_TCP) +#endif + +/** + * MEM_STATS==1: Enable mem.c stats. + */ +#if !defined MEM_STATS || defined __DOXYGEN__ +#define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) +#endif + +/** + * MEMP_STATS==1: Enable memp.c pool stats. + */ +#if !defined MEMP_STATS || defined __DOXYGEN__ +#define MEMP_STATS (MEMP_MEM_MALLOC == 0) +#endif + +/** + * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). + */ +#if !defined SYS_STATS || defined __DOXYGEN__ +#define SYS_STATS (NO_SYS == 0) +#endif + +/** + * IP6_STATS==1: Enable IPv6 stats. + */ +#if !defined IP6_STATS || defined __DOXYGEN__ +#define IP6_STATS (LWIP_IPV6) +#endif + +/** + * ICMP6_STATS==1: Enable ICMP for IPv6 stats. + */ +#if !defined ICMP6_STATS || defined __DOXYGEN__ +#define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6) +#endif + +/** + * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats. + */ +#if !defined IP6_FRAG_STATS || defined __DOXYGEN__ +#define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS)) +#endif + +/** + * MLD6_STATS==1: Enable MLD for IPv6 stats. + */ +#if !defined MLD6_STATS || defined __DOXYGEN__ +#define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD) +#endif + +/** + * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats. + */ +#if !defined ND6_STATS || defined __DOXYGEN__ +#define ND6_STATS (LWIP_IPV6) +#endif + +/** + * MIB2_STATS==1: Stats for SNMP MIB2. + */ +#if !defined MIB2_STATS || defined __DOXYGEN__ +#define MIB2_STATS 0 +#endif + +#else + +#define LINK_STATS 0 +#define ETHARP_STATS 0 +#define IP_STATS 0 +#define IPFRAG_STATS 0 +#define ICMP_STATS 0 +#define IGMP_STATS 0 +#define UDP_STATS 0 +#define TCP_STATS 0 +#define MEM_STATS 0 +#define MEMP_STATS 0 +#define SYS_STATS 0 +#define LWIP_STATS_DISPLAY 0 +#define IP6_STATS 0 +#define ICMP6_STATS 0 +#define IP6_FRAG_STATS 0 +#define MLD6_STATS 0 +#define ND6_STATS 0 +#define MIB2_STATS 0 + +#endif /* LWIP_STATS */ +/** + * @} + */ + +/* + -------------------------------------- + ---------- Checksum options ---------- + -------------------------------------- +*/ +/** + * @defgroup lwip_opts_checksum Checksum + * @ingroup lwip_opts_infrastructure + * @{ + */ +/** + * LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled + * per netif. + * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled! + */ +#if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__ +#define LWIP_CHECKSUM_CTRL_PER_NETIF 0 +#endif + +/** + * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. + */ +#if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__ +#define CHECKSUM_GEN_IP 1 +#endif + +/** + * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. + */ +#if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__ +#define CHECKSUM_GEN_UDP 1 +#endif + +/** + * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. + */ +#if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__ +#define CHECKSUM_GEN_TCP 1 +#endif + +/** + * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. + */ +#if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__ +#define CHECKSUM_GEN_ICMP 1 +#endif + +/** + * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. + */ +#if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__ +#define CHECKSUM_GEN_ICMP6 1 +#endif + +/** + * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. + */ +#if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__ +#define CHECKSUM_CHECK_IP 1 +#endif + +/** + * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. + */ +#if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__ +#define CHECKSUM_CHECK_UDP 1 +#endif + +/** + * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. + */ +#if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__ +#define CHECKSUM_CHECK_TCP 1 +#endif + +/** + * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. + */ +#if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__ +#define CHECKSUM_CHECK_ICMP 1 +#endif + +/** + * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets + */ +#if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__ +#define CHECKSUM_CHECK_ICMP6 1 +#endif + +/** + * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from + * application buffers to pbufs. + */ +#if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__ +#define LWIP_CHECKSUM_ON_COPY 0 +#endif +/** + * @} + */ + +/* + --------------------------------------- + ---------- IPv6 options --------------- + --------------------------------------- +*/ +/** + * @defgroup lwip_opts_ipv6 IPv6 + * @ingroup lwip_opts + * @{ + */ +/** + * LWIP_IPV6==1: Enable IPv6 + */ +#if !defined LWIP_IPV6 || defined __DOXYGEN__ +#define LWIP_IPV6 0 +#endif + +/** + * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. + */ +#if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__ +#define LWIP_IPV6_NUM_ADDRESSES 3 +#endif + +/** + * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs + */ +#if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__ +#define LWIP_IPV6_FORWARD 0 +#endif + +/** + * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. + */ +#if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ +#define LWIP_IPV6_FRAG 0 +#endif + +/** + * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented + */ +#if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ +#define LWIP_IPV6_REASS (LWIP_IPV6) +#endif + +/** + * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during + * network startup. + */ +#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ +#define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 +#endif + +/** + * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. + */ +#if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ +#define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) +#endif + +/** + * LWIP_IPV6_DUP_DETECT_ATTEMPTS=[0..7]: Number of duplicate address detection attempts. + */ +#if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 +#endif +/** + * @} + */ + +/** + * @defgroup lwip_opts_icmp6 ICMP6 + * @ingroup lwip_opts_ipv6 + * @{ + */ +/** + * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) + */ +#if !defined LWIP_ICMP6 || defined __DOXYGEN__ +#define LWIP_ICMP6 (LWIP_IPV6) +#endif + +/** + * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in + * ICMPv6 error messages. + */ +#if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__ +#define LWIP_ICMP6_DATASIZE 8 +#endif + +/** + * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages + */ +#if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ +#define LWIP_ICMP6_HL 255 +#endif +/** + * @} + */ + +/** + * @defgroup lwip_opts_mld6 Multicast listener discovery + * @ingroup lwip_opts_ipv6 + * @{ + */ +/** + * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. + * If LWIP_IPV6 is enabled but this setting is disabled, the MAC layer must + * indiscriminately pass all inbound IPv6 multicast traffic to lwIP. + */ +#if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ +#define LWIP_IPV6_MLD (LWIP_IPV6) +#endif + +/** + * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast groups that can be joined. + * There must be enough groups so that each netif can join the solicited-node + * multicast group for each of its local addresses, plus one for MDNS if + * applicable, plus any number of groups to be joined on UDP sockets. + */ +#if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ +#define MEMP_NUM_MLD6_GROUP 4 +#endif +/** + * @} + */ + +/** + * @defgroup lwip_opts_nd6 Neighbor discovery + * @ingroup lwip_opts_ipv6 + * @{ + */ +/** + * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address + * is being resolved. + */ +#if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ +#define LWIP_ND6_QUEUEING (LWIP_IPV6) +#endif + +/** + * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. + */ +#if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__ +#define MEMP_NUM_ND6_QUEUE 20 +#endif + +/** + * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache + */ +#if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__ +#define LWIP_ND6_NUM_NEIGHBORS 10 +#endif + +/** + * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache + */ +#if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__ +#define LWIP_ND6_NUM_DESTINATIONS 10 +#endif + +/** + * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache + */ +#if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__ +#define LWIP_ND6_NUM_PREFIXES 5 +#endif + +/** + * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache + */ +#if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__ +#define LWIP_ND6_NUM_ROUTERS 3 +#endif + +/** + * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send + * (neighbor solicit and router solicit) + */ +#if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__ +#define LWIP_ND6_MAX_MULTICAST_SOLICIT 3 +#endif + +/** + * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages + * to send during neighbor reachability detection. + */ +#if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__ +#define LWIP_ND6_MAX_UNICAST_SOLICIT 3 +#endif + +/** + * Unused: See ND RFC (time in milliseconds). + */ +#if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__ +#define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000 +#endif + +/** + * Unused: See ND RFC + */ +#if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__ +#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3 +#endif + +/** + * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). + * May be updated by router advertisement messages. + */ +#if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__ +#define LWIP_ND6_REACHABLE_TIME 30000 +#endif + +/** + * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages + */ +#if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__ +#define LWIP_ND6_RETRANS_TIMER 1000 +#endif + +/** + * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation + * message is sent, during neighbor reachability detection. + */ +#if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__ +#define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000 +#endif + +/** + * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update + * Reachable time and retransmission timers, and netif MTU. + */ +#if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__ +#define LWIP_ND6_ALLOW_RA_UPDATES 1 +#endif + +/** + * LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery + * with reachability hints for connected destinations. This helps avoid sending + * unicast neighbor solicitation messages. + */ +#if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ +#define LWIP_ND6_TCP_REACHABILITY_HINTS 1 +#endif + +/** + * LWIP_ND6_RDNSS_MAX_DNS_SERVERS > 0: Use IPv6 Router Advertisement Recursive + * DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS + * servers to the DNS module. + */ +#if !defined LWIP_ND6_RDNSS_MAX_DNS_SERVERS || defined __DOXYGEN__ +#define LWIP_ND6_RDNSS_MAX_DNS_SERVERS 0 +#endif +/** + * @} + */ + +/** + * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. + */ +#if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ +#define LWIP_IPV6_DHCP6 0 +#endif + +/* + --------------------------------------- + ---------- Hook options --------------- + --------------------------------------- +*/ + +/** + * @defgroup lwip_opts_hooks Hooks + * @ingroup lwip_opts_infrastructure + * Hooks are undefined by default, define them to a function if you need them. + * @{ + */ + +/** + * LWIP_HOOK_FILENAME: Custom filename to #include in files that provide hooks. + * Declare your hook function prototypes in there, you may also #include all headers + * providing data types that are need in this file. + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_FILENAME "path/to/my/lwip_hooks.h" +#endif + +/** + * LWIP_HOOK_TCP_ISN: + * Hook for generation of the Initial Sequence Number (ISN) for a new TCP + * connection. The default lwIP ISN generation algorithm is very basic and may + * allow for TCP spoofing attacks. This hook provides the means to implement + * the standardized ISN generation algorithm from RFC 6528 (see contrib/adons/tcp_isn), + * or any other desired algorithm as a replacement. + * Called from tcp_connect() and tcp_listen_input() when an ISN is needed for + * a new TCP connection, if TCP support (@ref LWIP_TCP) is enabled.\n + * Signature: u32_t my_hook_tcp_isn(const ip_addr_t* local_ip, u16_t local_port, const ip_addr_t* remote_ip, u16_t remote_port); + * - it may be necessary to use "struct ip_addr" (ip4_addr, ip6_addr) instead of "ip_addr_t" in function declarations\n + * Arguments: + * - local_ip: pointer to the local IP address of the connection + * - local_port: local port number of the connection (host-byte order) + * - remote_ip: pointer to the remote IP address of the connection + * - remote_port: remote port number of the connection (host-byte order)\n + * Return value: + * - the 32-bit Initial Sequence Number to use for the new TCP connection. + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port) +#endif + +/** + * LWIP_HOOK_IP4_INPUT(pbuf, input_netif): + * - called from ip_input() (IPv4) + * - pbuf: received struct pbuf passed to ip_input() + * - input_netif: struct netif on which the packet has been received + * Return values: + * - 0: Hook has not consumed the packet, packet is processed as normal + * - != 0: Hook has consumed the packet. + * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook + * (i.e. free it when done). + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP4_INPUT(pbuf, input_netif) +#endif + +/** + * LWIP_HOOK_IP4_ROUTE(dest): + * - called from ip_route() (IPv4) + * - dest: destination IPv4 address + * Returns the destination netif or NULL if no destination netif is found. In + * that case, ip_route() continues as normal. + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP4_ROUTE() +#endif + +/** + * LWIP_HOOK_IP4_ROUTE_SRC(dest, src): + * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL) + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) +#endif + +/** + * LWIP_HOOK_ETHARP_GET_GW(netif, dest): + * - called from etharp_output() (IPv4) + * - netif: the netif used for sending + * - dest: the destination IPv4 address + * Returns the IPv4 address of the gateway to handle the specified destination + * IPv4 address. If NULL is returned, the netif's default gateway is used. + * The returned address MUST be directly reachable on the specified netif! + * This function is meant to implement advanced IPv4 routing together with + * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is + * not part of lwIP but can e.g. be hidden in the netif's state argument. +*/ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_ETHARP_GET_GW(netif, dest) +#endif + +/** + * LWIP_HOOK_IP6_INPUT(pbuf, input_netif): + * - called from ip6_input() (IPv6) + * - pbuf: received struct pbuf passed to ip6_input() + * - input_netif: struct netif on which the packet has been received + * Return values: + * - 0: Hook has not consumed the packet, packet is processed as normal + * - != 0: Hook has consumed the packet. + * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook + * (i.e. free it when done). + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP6_INPUT(pbuf, input_netif) +#endif + +/** + * LWIP_HOOK_IP6_ROUTE(src, dest): + * - called from ip6_route() (IPv6) + * - src: sourc IPv6 address + * - dest: destination IPv6 address + * Returns the destination netif or NULL if no destination netif is found. In + * that case, ip6_route() continues as normal. + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP6_ROUTE(src, dest) +#endif + +/** + * LWIP_HOOK_ND6_GET_GW(netif, dest): + * - called from nd6_get_next_hop_entry() (IPv6) + * - netif: the netif used for sending + * - dest: the destination IPv6 address + * Returns the IPv6 address of the next hop to handle the specified destination + * IPv6 address. If NULL is returned, a NDP-discovered router is used instead. + * The returned address MUST be directly reachable on the specified netif! + * This function is meant to implement advanced IPv6 routing together with + * LWIP_HOOK_IP6_ROUTE(). The actual routing/gateway table implementation is + * not part of lwIP but can e.g. be hidden in the netif's state argument. +*/ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_ND6_GET_GW(netif, dest) +#endif + +/** + * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr): + * - called from ethernet_input() if VLAN support is enabled + * - netif: struct netif on which the packet has been received + * - eth_hdr: struct eth_hdr of the packet + * - vlan_hdr: struct eth_vlan_hdr of the packet + * Return values: + * - 0: Packet must be dropped. + * - != 0: Packet must be accepted. + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr) +#endif + +/** + * LWIP_HOOK_VLAN_SET: + * Hook can be used to set prio_vid field of vlan_hdr. If you need to store data + * on per-netif basis to implement this callback, see @ref netif_cd. + * Called from ethernet_output() if VLAN support (@ref ETHARP_SUPPORT_VLAN) is enabled.\n + * Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);\n + * Arguments: + * - netif: struct netif that the packet will be sent through + * - p: struct pbuf packet to be sent + * - src: source eth address + * - dst: destination eth address + * - eth_type: ethernet type to packet to be sent\n + * + * + * Return values: + * - <0: Packet shall not contain VLAN header. + * - 0 <= return value <= 0xFFFF: Packet shall contain VLAN header. Return value is prio_vid in host byte order. + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type) +#endif + +/** + * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type): + * - called from memp_free() when a memp pool was empty and an item is now available + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type) +#endif + +/** + * LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif): + * Called from ethernet_input() when an unknown eth type is encountered. + * Return ERR_OK if packet is accepted, any error code otherwise. + * Payload points to ethernet header! + */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif) +#endif +/** + * @} + */ + +/* + --------------------------------------- + ---------- Debugging options ---------- + --------------------------------------- +*/ +/** + * @defgroup lwip_opts_debugmsg Debug messages + * @ingroup lwip_opts_debug + * @{ + */ +/** + * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is + * compared against this value. If it is smaller, then debugging + * messages are written. + * @see debugging_levels + */ +#if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__ +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#endif + +/** + * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable + * debug messages of certain types. + * @see debugging_levels + */ +#if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__ +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#endif + +/** + * ETHARP_DEBUG: Enable debugging in etharp.c. + */ +#if !defined ETHARP_DEBUG || defined __DOXYGEN__ +#define ETHARP_DEBUG LWIP_DBG_OFF +#endif + +/** + * NETIF_DEBUG: Enable debugging in netif.c. + */ +#if !defined NETIF_DEBUG || defined __DOXYGEN__ +#define NETIF_DEBUG LWIP_DBG_OFF +#endif + +/** + * PBUF_DEBUG: Enable debugging in pbuf.c. + */ +#if !defined PBUF_DEBUG || defined __DOXYGEN__ +#define PBUF_DEBUG LWIP_DBG_OFF +#endif + +/** + * API_LIB_DEBUG: Enable debugging in api_lib.c. + */ +#if !defined API_LIB_DEBUG || defined __DOXYGEN__ +#define API_LIB_DEBUG LWIP_DBG_OFF +#endif + +/** + * API_MSG_DEBUG: Enable debugging in api_msg.c. + */ +#if !defined API_MSG_DEBUG || defined __DOXYGEN__ +#define API_MSG_DEBUG LWIP_DBG_OFF +#endif + +/** + * SOCKETS_DEBUG: Enable debugging in sockets.c. + */ +#if !defined SOCKETS_DEBUG || defined __DOXYGEN__ +#define SOCKETS_DEBUG LWIP_DBG_OFF +#endif + +/** + * ICMP_DEBUG: Enable debugging in icmp.c. + */ +#if !defined ICMP_DEBUG || defined __DOXYGEN__ +#define ICMP_DEBUG LWIP_DBG_OFF +#endif + +/** + * IGMP_DEBUG: Enable debugging in igmp.c. + */ +#if !defined IGMP_DEBUG || defined __DOXYGEN__ +#define IGMP_DEBUG LWIP_DBG_OFF +#endif + +/** + * INET_DEBUG: Enable debugging in inet.c. + */ +#if !defined INET_DEBUG || defined __DOXYGEN__ +#define INET_DEBUG LWIP_DBG_OFF +#endif + +/** + * IP_DEBUG: Enable debugging for IP. + */ +#if !defined IP_DEBUG || defined __DOXYGEN__ +#define IP_DEBUG LWIP_DBG_OFF +#endif + +/** + * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. + */ +#if !defined IP_REASS_DEBUG || defined __DOXYGEN__ +#define IP_REASS_DEBUG LWIP_DBG_OFF +#endif + +/** + * RAW_DEBUG: Enable debugging in raw.c. + */ +#if !defined RAW_DEBUG || defined __DOXYGEN__ +#define RAW_DEBUG LWIP_DBG_OFF +#endif + +/** + * MEM_DEBUG: Enable debugging in mem.c. + */ +#if !defined MEM_DEBUG || defined __DOXYGEN__ +#define MEM_DEBUG LWIP_DBG_OFF +#endif + +/** + * MEMP_DEBUG: Enable debugging in memp.c. + */ +#if !defined MEMP_DEBUG || defined __DOXYGEN__ +#define MEMP_DEBUG LWIP_DBG_OFF +#endif + +/** + * SYS_DEBUG: Enable debugging in sys.c. + */ +#if !defined SYS_DEBUG || defined __DOXYGEN__ +#define SYS_DEBUG LWIP_DBG_OFF +#endif + +/** + * TIMERS_DEBUG: Enable debugging in timers.c. + */ +#if !defined TIMERS_DEBUG || defined __DOXYGEN__ +#define TIMERS_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_DEBUG: Enable debugging for TCP. + */ +#if !defined TCP_DEBUG || defined __DOXYGEN__ +#define TCP_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. + */ +#if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__ +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. + */ +#if !defined TCP_FR_DEBUG || defined __DOXYGEN__ +#define TCP_FR_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit + * timeout. + */ +#if !defined TCP_RTO_DEBUG || defined __DOXYGEN__ +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. + */ +#if !defined TCP_CWND_DEBUG || defined __DOXYGEN__ +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. + */ +#if !defined TCP_WND_DEBUG || defined __DOXYGEN__ +#define TCP_WND_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. + */ +#if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__ +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. + */ +#if !defined TCP_RST_DEBUG || defined __DOXYGEN__ +#define TCP_RST_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. + */ +#if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__ +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#endif + +/** + * UDP_DEBUG: Enable debugging in UDP. + */ +#if !defined UDP_DEBUG || defined __DOXYGEN__ +#define UDP_DEBUG LWIP_DBG_OFF +#endif + +/** + * TCPIP_DEBUG: Enable debugging in tcpip.c. + */ +#if !defined TCPIP_DEBUG || defined __DOXYGEN__ +#define TCPIP_DEBUG LWIP_DBG_OFF +#endif + +/** + * SLIP_DEBUG: Enable debugging in slipif.c. + */ +#if !defined SLIP_DEBUG || defined __DOXYGEN__ +#define SLIP_DEBUG LWIP_DBG_OFF +#endif + +/** + * DHCP_DEBUG: Enable debugging in dhcp.c. + */ +#if !defined DHCP_DEBUG || defined __DOXYGEN__ +#define DHCP_DEBUG LWIP_DBG_OFF +#endif + +/** + * AUTOIP_DEBUG: Enable debugging in autoip.c. + */ +#if !defined AUTOIP_DEBUG || defined __DOXYGEN__ +#define AUTOIP_DEBUG LWIP_DBG_OFF +#endif + +/** + * DNS_DEBUG: Enable debugging for DNS. + */ +#if !defined DNS_DEBUG || defined __DOXYGEN__ +#define DNS_DEBUG LWIP_DBG_OFF +#endif + +/** + * IP6_DEBUG: Enable debugging for IPv6. + */ +#if !defined IP6_DEBUG || defined __DOXYGEN__ +#define IP6_DEBUG LWIP_DBG_OFF +#endif +/** + * @} + */ + +/* + -------------------------------------------------- + ---------- Performance tracking options ---------- + -------------------------------------------------- +*/ +/** + * @defgroup lwip_opts_perf Performance + * @ingroup lwip_opts_debug + * @{ + */ +/** + * LWIP_PERF: Enable performance testing for lwIP + * (if enabled, arch/perf.h is included) + */ +#if !defined LWIP_PERF || defined __DOXYGEN__ +#define LWIP_PERF 0 +#endif +/** + * @} + */ + +#endif /* LWIP_HDR_OPT_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/pbuf.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/pbuf.h index 9061046..a8b00a0 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/pbuf.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/pbuf.h @@ -1,263 +1,263 @@ -/** - * @file - * pbuf API - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#ifndef LWIP_HDR_PBUF_H -#define LWIP_HDR_PBUF_H - -#include "lwip/opt.h" -#include "lwip/err.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** LWIP_SUPPORT_CUSTOM_PBUF==1: Custom pbufs behave much like their pbuf type - * but they are allocated by external code (initialised by calling - * pbuf_alloced_custom()) and when pbuf_free gives up their last reference, they - * are freed by calling pbuf_custom->custom_free_function(). - * Currently, the pbuf_custom code is only needed for one specific configuration - * of IP_FRAG, unless required by external driver/application code. */ -#ifndef LWIP_SUPPORT_CUSTOM_PBUF -#define LWIP_SUPPORT_CUSTOM_PBUF ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG)) -#endif - -/* @todo: We need a mechanism to prevent wasting memory in every pbuf - (TCP vs. UDP, IPv4 vs. IPv6: UDP/IPv4 packets may waste up to 28 bytes) */ - -#define PBUF_TRANSPORT_HLEN 20 -#if LWIP_IPV6 -#define PBUF_IP_HLEN 40 -#else -#define PBUF_IP_HLEN 20 -#endif - -/** - * @ingroup pbuf - * Enumeration of pbuf layers - */ -typedef enum { - /** Includes spare room for transport layer header, e.g. UDP header. - * Use this if you intend to pass the pbuf to functions like udp_send(). - */ - PBUF_TRANSPORT, - /** Includes spare room for IP header. - * Use this if you intend to pass the pbuf to functions like raw_send(). - */ - PBUF_IP, - /** Includes spare room for link layer header (ethernet header). - * Use this if you intend to pass the pbuf to functions like ethernet_output(). - * @see PBUF_LINK_HLEN - */ - PBUF_LINK, - /** Includes spare room for additional encapsulation header before ethernet - * headers (e.g. 802.11). - * Use this if you intend to pass the pbuf to functions like netif->linkoutput(). - * @see PBUF_LINK_ENCAPSULATION_HLEN - */ - PBUF_RAW_TX, - /** Use this for input packets in a netif driver when calling netif->input() - * in the most common case - ethernet-layer netif driver. */ - PBUF_RAW -} pbuf_layer; - -/** - * @ingroup pbuf - * Enumeration of pbuf types - */ -typedef enum { - /** pbuf data is stored in RAM, used for TX mostly, struct pbuf and its payload - are allocated in one piece of contiguous memory (so the first payload byte - can be calculated from struct pbuf). - pbuf_alloc() allocates PBUF_RAM pbufs as unchained pbufs (although that might - change in future versions). - This should be used for all OUTGOING packets (TX).*/ - PBUF_RAM, - /** pbuf data is stored in ROM, i.e. struct pbuf and its payload are located in - totally different memory areas. Since it points to ROM, payload does not - have to be copied when queued for transmission. */ - PBUF_ROM, - /** pbuf comes from the pbuf pool. Much like PBUF_ROM but payload might change - so it has to be duplicated when queued before transmitting, depending on - who has a 'ref' to it. */ - PBUF_REF, - /** pbuf payload refers to RAM. This one comes from a pool and should be used - for RX. Payload can be chained (scatter-gather RX) but like PBUF_RAM, struct - pbuf and its payload are allocated in one piece of contiguous memory (so - the first payload byte can be calculated from struct pbuf). - Don't use this for TX, if the pool becomes empty e.g. because of TCP queuing, - you are unable to receive TCP acks! */ - PBUF_POOL -} pbuf_type; - - -/** indicates this packet's data should be immediately passed to the application */ -#define PBUF_FLAG_PUSH 0x01U -/** indicates this is a custom pbuf: pbuf_free calls pbuf_custom->custom_free_function() - when the last reference is released (plus custom PBUF_RAM cannot be trimmed) */ -#define PBUF_FLAG_IS_CUSTOM 0x02U -/** indicates this pbuf is UDP multicast to be looped back */ -#define PBUF_FLAG_MCASTLOOP 0x04U -/** indicates this pbuf was received as link-level broadcast */ -#define PBUF_FLAG_LLBCAST 0x08U -/** indicates this pbuf was received as link-level multicast */ -#define PBUF_FLAG_LLMCAST 0x10U -/** indicates this pbuf includes a TCP FIN flag */ -#define PBUF_FLAG_TCP_FIN 0x20U - -/** Main packet buffer struct */ -struct pbuf { - /** next pbuf in singly linked pbuf chain */ - struct pbuf *next; - - /** pointer to the actual data in the buffer */ - void *payload; - - /** - * total length of this buffer and all next buffers in chain - * belonging to the same packet. - * - * For non-queue packet chains this is the invariant: - * p->tot_len == p->len + (p->next? p->next->tot_len: 0) - */ - u16_t tot_len; - - /** length of this buffer */ - u16_t len; - - /** pbuf_type as u8_t instead of enum to save space */ - u8_t /*pbuf_type*/ type; - - /** misc flags */ - u8_t flags; - - /** - * the reference count always equals the number of pointers - * that refer to this pbuf. This can be pointers from an application, - * the stack itself, or pbuf->next pointers from a chain. - */ - u16_t ref; -}; - - -/** Helper struct for const-correctness only. - * The only meaning of this one is to provide a const payload pointer - * for PBUF_ROM type. - */ -struct pbuf_rom { - /** next pbuf in singly linked pbuf chain */ - struct pbuf *next; - - /** pointer to the actual data in the buffer */ - const void *payload; -}; - -#if LWIP_SUPPORT_CUSTOM_PBUF -/** Prototype for a function to free a custom pbuf */ -typedef void (*pbuf_free_custom_fn)(struct pbuf *p); - -/** A custom pbuf: like a pbuf, but following a function pointer to free it. */ -struct pbuf_custom { - /** The actual pbuf */ - struct pbuf pbuf; - /** This function is called when pbuf_free deallocates this pbuf(_custom) */ - pbuf_free_custom_fn custom_free_function; -}; -#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ - -/** Define this to 0 to prevent freeing ooseq pbufs when the PBUF_POOL is empty */ -#ifndef PBUF_POOL_FREE_OOSEQ -#define PBUF_POOL_FREE_OOSEQ 1 -#endif /* PBUF_POOL_FREE_OOSEQ */ -#if LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ -extern volatile u8_t pbuf_free_ooseq_pending; -void pbuf_free_ooseq(void); -/** When not using sys_check_timeouts(), call PBUF_CHECK_FREE_OOSEQ() - at regular intervals from main level to check if ooseq pbufs need to be - freed! */ -#define PBUF_CHECK_FREE_OOSEQ() do { if(pbuf_free_ooseq_pending) { \ - /* pbuf_alloc() reported PBUF_POOL to be empty -> try to free some \ - ooseq queued pbufs now */ \ - pbuf_free_ooseq(); }}while(0) -#else /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ */ - /* Otherwise declare an empty PBUF_CHECK_FREE_OOSEQ */ - #define PBUF_CHECK_FREE_OOSEQ() -#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ*/ - -/* Initializes the pbuf module. This call is empty for now, but may not be in future. */ -#define pbuf_init() - -struct pbuf *pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type); -#if LWIP_SUPPORT_CUSTOM_PBUF -struct pbuf *pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, - struct pbuf_custom *p, void *payload_mem, - u16_t payload_mem_len); -#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ -void pbuf_realloc(struct pbuf *p, u16_t size); -u8_t pbuf_header(struct pbuf *p, s16_t header_size); -u8_t pbuf_header_force(struct pbuf *p, s16_t header_size); -void pbuf_ref(struct pbuf *p); -u8_t pbuf_free(struct pbuf *p); -u16_t pbuf_clen(const struct pbuf *p); -void pbuf_cat(struct pbuf *head, struct pbuf *tail); -void pbuf_chain(struct pbuf *head, struct pbuf *tail); -struct pbuf *pbuf_dechain(struct pbuf *p); -err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from); -u16_t pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset); -err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len); -err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset); -struct pbuf *pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset); -struct pbuf *pbuf_coalesce(struct pbuf *p, pbuf_layer layer); -#if LWIP_CHECKSUM_ON_COPY -err_t pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, - u16_t len, u16_t *chksum); -#endif /* LWIP_CHECKSUM_ON_COPY */ -#if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE -void pbuf_split_64k(struct pbuf *p, struct pbuf **rest); -#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ - -u8_t pbuf_get_at(const struct pbuf* p, u16_t offset); -int pbuf_try_get_at(const struct pbuf* p, u16_t offset); -void pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data); -u16_t pbuf_memcmp(const struct pbuf* p, u16_t offset, const void* s2, u16_t n); -u16_t pbuf_memfind(const struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_offset); -u16_t pbuf_strstr(const struct pbuf* p, const char* substr); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PBUF_H */ +/** + * @file + * pbuf API + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#ifndef LWIP_HDR_PBUF_H +#define LWIP_HDR_PBUF_H + +#include "lwip/opt.h" +#include "lwip/err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** LWIP_SUPPORT_CUSTOM_PBUF==1: Custom pbufs behave much like their pbuf type + * but they are allocated by external code (initialised by calling + * pbuf_alloced_custom()) and when pbuf_free gives up their last reference, they + * are freed by calling pbuf_custom->custom_free_function(). + * Currently, the pbuf_custom code is only needed for one specific configuration + * of IP_FRAG, unless required by external driver/application code. */ +#ifndef LWIP_SUPPORT_CUSTOM_PBUF +#define LWIP_SUPPORT_CUSTOM_PBUF ((IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG)) +#endif + +/* @todo: We need a mechanism to prevent wasting memory in every pbuf + (TCP vs. UDP, IPv4 vs. IPv6: UDP/IPv4 packets may waste up to 28 bytes) */ + +#define PBUF_TRANSPORT_HLEN 20 +#if LWIP_IPV6 +#define PBUF_IP_HLEN 40 +#else +#define PBUF_IP_HLEN 20 +#endif + +/** + * @ingroup pbuf + * Enumeration of pbuf layers + */ +typedef enum { + /** Includes spare room for transport layer header, e.g. UDP header. + * Use this if you intend to pass the pbuf to functions like udp_send(). + */ + PBUF_TRANSPORT, + /** Includes spare room for IP header. + * Use this if you intend to pass the pbuf to functions like raw_send(). + */ + PBUF_IP, + /** Includes spare room for link layer header (ethernet header). + * Use this if you intend to pass the pbuf to functions like ethernet_output(). + * @see PBUF_LINK_HLEN + */ + PBUF_LINK, + /** Includes spare room for additional encapsulation header before ethernet + * headers (e.g. 802.11). + * Use this if you intend to pass the pbuf to functions like netif->linkoutput(). + * @see PBUF_LINK_ENCAPSULATION_HLEN + */ + PBUF_RAW_TX, + /** Use this for input packets in a netif driver when calling netif->input() + * in the most common case - ethernet-layer netif driver. */ + PBUF_RAW +} pbuf_layer; + +/** + * @ingroup pbuf + * Enumeration of pbuf types + */ +typedef enum { + /** pbuf data is stored in RAM, used for TX mostly, struct pbuf and its payload + are allocated in one piece of contiguous memory (so the first payload byte + can be calculated from struct pbuf). + pbuf_alloc() allocates PBUF_RAM pbufs as unchained pbufs (although that might + change in future versions). + This should be used for all OUTGOING packets (TX).*/ + PBUF_RAM, + /** pbuf data is stored in ROM, i.e. struct pbuf and its payload are located in + totally different memory areas. Since it points to ROM, payload does not + have to be copied when queued for transmission. */ + PBUF_ROM, + /** pbuf comes from the pbuf pool. Much like PBUF_ROM but payload might change + so it has to be duplicated when queued before transmitting, depending on + who has a 'ref' to it. */ + PBUF_REF, + /** pbuf payload refers to RAM. This one comes from a pool and should be used + for RX. Payload can be chained (scatter-gather RX) but like PBUF_RAM, struct + pbuf and its payload are allocated in one piece of contiguous memory (so + the first payload byte can be calculated from struct pbuf). + Don't use this for TX, if the pool becomes empty e.g. because of TCP queuing, + you are unable to receive TCP acks! */ + PBUF_POOL +} pbuf_type; + + +/** indicates this packet's data should be immediately passed to the application */ +#define PBUF_FLAG_PUSH 0x01U +/** indicates this is a custom pbuf: pbuf_free calls pbuf_custom->custom_free_function() + when the last reference is released (plus custom PBUF_RAM cannot be trimmed) */ +#define PBUF_FLAG_IS_CUSTOM 0x02U +/** indicates this pbuf is UDP multicast to be looped back */ +#define PBUF_FLAG_MCASTLOOP 0x04U +/** indicates this pbuf was received as link-level broadcast */ +#define PBUF_FLAG_LLBCAST 0x08U +/** indicates this pbuf was received as link-level multicast */ +#define PBUF_FLAG_LLMCAST 0x10U +/** indicates this pbuf includes a TCP FIN flag */ +#define PBUF_FLAG_TCP_FIN 0x20U + +/** Main packet buffer struct */ +struct pbuf { + /** next pbuf in singly linked pbuf chain */ + struct pbuf *next; + + /** pointer to the actual data in the buffer */ + void *payload; + + /** + * total length of this buffer and all next buffers in chain + * belonging to the same packet. + * + * For non-queue packet chains this is the invariant: + * p->tot_len == p->len + (p->next? p->next->tot_len: 0) + */ + u16_t tot_len; + + /** length of this buffer */ + u16_t len; + + /** pbuf_type as u8_t instead of enum to save space */ + u8_t /*pbuf_type*/ type; + + /** misc flags */ + u8_t flags; + + /** + * the reference count always equals the number of pointers + * that refer to this pbuf. This can be pointers from an application, + * the stack itself, or pbuf->next pointers from a chain. + */ + u16_t ref; +}; + + +/** Helper struct for const-correctness only. + * The only meaning of this one is to provide a const payload pointer + * for PBUF_ROM type. + */ +struct pbuf_rom { + /** next pbuf in singly linked pbuf chain */ + struct pbuf *next; + + /** pointer to the actual data in the buffer */ + const void *payload; +}; + +#if LWIP_SUPPORT_CUSTOM_PBUF +/** Prototype for a function to free a custom pbuf */ +typedef void (*pbuf_free_custom_fn)(struct pbuf *p); + +/** A custom pbuf: like a pbuf, but following a function pointer to free it. */ +struct pbuf_custom { + /** The actual pbuf */ + struct pbuf pbuf; + /** This function is called when pbuf_free deallocates this pbuf(_custom) */ + pbuf_free_custom_fn custom_free_function; +}; +#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ + +/** Define this to 0 to prevent freeing ooseq pbufs when the PBUF_POOL is empty */ +#ifndef PBUF_POOL_FREE_OOSEQ +#define PBUF_POOL_FREE_OOSEQ 1 +#endif /* PBUF_POOL_FREE_OOSEQ */ +#if LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ +extern volatile u8_t pbuf_free_ooseq_pending; +void pbuf_free_ooseq(void); +/** When not using sys_check_timeouts(), call PBUF_CHECK_FREE_OOSEQ() + at regular intervals from main level to check if ooseq pbufs need to be + freed! */ +#define PBUF_CHECK_FREE_OOSEQ() do { if(pbuf_free_ooseq_pending) { \ + /* pbuf_alloc() reported PBUF_POOL to be empty -> try to free some \ + ooseq queued pbufs now */ \ + pbuf_free_ooseq(); }}while(0) +#else /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ */ + /* Otherwise declare an empty PBUF_CHECK_FREE_OOSEQ */ + #define PBUF_CHECK_FREE_OOSEQ() +#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ*/ + +/* Initializes the pbuf module. This call is empty for now, but may not be in future. */ +#define pbuf_init() + +struct pbuf *pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type); +#if LWIP_SUPPORT_CUSTOM_PBUF +struct pbuf *pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, + struct pbuf_custom *p, void *payload_mem, + u16_t payload_mem_len); +#endif /* LWIP_SUPPORT_CUSTOM_PBUF */ +void pbuf_realloc(struct pbuf *p, u16_t size); +u8_t pbuf_header(struct pbuf *p, s16_t header_size); +u8_t pbuf_header_force(struct pbuf *p, s16_t header_size); +void pbuf_ref(struct pbuf *p); +u8_t pbuf_free(struct pbuf *p); +u16_t pbuf_clen(const struct pbuf *p); +void pbuf_cat(struct pbuf *head, struct pbuf *tail); +void pbuf_chain(struct pbuf *head, struct pbuf *tail); +struct pbuf *pbuf_dechain(struct pbuf *p); +err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from); +u16_t pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset); +err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len); +err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset); +struct pbuf *pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset); +struct pbuf *pbuf_coalesce(struct pbuf *p, pbuf_layer layer); +#if LWIP_CHECKSUM_ON_COPY +err_t pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, + u16_t len, u16_t *chksum); +#endif /* LWIP_CHECKSUM_ON_COPY */ +#if LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE +void pbuf_split_64k(struct pbuf *p, struct pbuf **rest); +#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ + +u8_t pbuf_get_at(const struct pbuf* p, u16_t offset); +int pbuf_try_get_at(const struct pbuf* p, u16_t offset); +void pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data); +u16_t pbuf_memcmp(const struct pbuf* p, u16_t offset, const void* s2, u16_t n); +u16_t pbuf_memfind(const struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_offset); +u16_t pbuf_strstr(const struct pbuf* p, const char* substr); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PBUF_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/api_msg.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/api_msg.h index f12b8b7..792e288 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/api_msg.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/api_msg.h @@ -1,216 +1,216 @@ -/** - * @file - * netconn API lwIP internal implementations (do not use in application code) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_API_MSG_H -#define LWIP_HDR_API_MSG_H - -#include "lwip/opt.h" - -#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ -/* Note: Netconn API is always available when sockets are enabled - - * sockets are implemented on top of them */ - -#include "lwip/arch.h" -#include "lwip/ip_addr.h" -#include "lwip/err.h" -#include "lwip/sys.h" -#include "lwip/igmp.h" -#include "lwip/api.h" -#include "lwip/priv/tcpip_priv.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_MPU_COMPATIBLE -#if LWIP_NETCONN_SEM_PER_THREAD -#define API_MSG_M_DEF_SEM(m) *m -#else -#define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m) -#endif -#else /* LWIP_MPU_COMPATIBLE */ -#define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m) -#endif /* LWIP_MPU_COMPATIBLE */ - -/* For the netconn API, these values are use as a bitmask! */ -#define NETCONN_SHUT_RD 1 -#define NETCONN_SHUT_WR 2 -#define NETCONN_SHUT_RDWR (NETCONN_SHUT_RD | NETCONN_SHUT_WR) - -/* IP addresses and port numbers are expected to be in - * the same byte order as in the corresponding pcb. - */ -/** This struct includes everything that is necessary to execute a function - for a netconn in another thread context (mainly used to process netconns - in the tcpip_thread context to be thread safe). */ -struct api_msg { - /** The netconn which to process - always needed: it includes the semaphore - which is used to block the application thread until the function finished. */ - struct netconn *conn; - /** The return value of the function executed in tcpip_thread. */ - err_t err; - /** Depending on the executed function, one of these union members is used */ - union { - /** used for lwip_netconn_do_send */ - struct netbuf *b; - /** used for lwip_netconn_do_newconn */ - struct { - u8_t proto; - } n; - /** used for lwip_netconn_do_bind and lwip_netconn_do_connect */ - struct { - API_MSG_M_DEF_C(ip_addr_t, ipaddr); - u16_t port; - } bc; - /** used for lwip_netconn_do_getaddr */ - struct { - ip_addr_t API_MSG_M_DEF(ipaddr); - u16_t API_MSG_M_DEF(port); - u8_t local; - } ad; - /** used for lwip_netconn_do_write */ - struct { - const void *dataptr; - size_t len; - u8_t apiflags; -#if LWIP_SO_SNDTIMEO - u32_t time_started; -#endif /* LWIP_SO_SNDTIMEO */ - } w; - /** used for lwip_netconn_do_recv */ - struct { - u32_t len; - } r; -#if LWIP_TCP - /** used for lwip_netconn_do_close (/shutdown) */ - struct { - u8_t shut; -#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER - u32_t time_started; -#else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ - u8_t polls_left; -#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ - } sd; -#endif /* LWIP_TCP */ -#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) - /** used for lwip_netconn_do_join_leave_group */ - struct { - API_MSG_M_DEF_C(ip_addr_t, multiaddr); - API_MSG_M_DEF_C(ip_addr_t, netif_addr); - enum netconn_igmp join_or_leave; - } jl; -#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ -#if TCP_LISTEN_BACKLOG - struct { - u8_t backlog; - } lb; -#endif /* TCP_LISTEN_BACKLOG */ - } msg; -#if LWIP_NETCONN_SEM_PER_THREAD - sys_sem_t* op_completed_sem; -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ -}; - -#if LWIP_NETCONN_SEM_PER_THREAD -#define LWIP_API_MSG_SEM(msg) ((msg)->op_completed_sem) -#else /* LWIP_NETCONN_SEM_PER_THREAD */ -#define LWIP_API_MSG_SEM(msg) (&(msg)->conn->op_completed) -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ - - -#if LWIP_DNS -/** As lwip_netconn_do_gethostbyname requires more arguments but doesn't require a netconn, - it has its own struct (to avoid struct api_msg getting bigger than necessary). - lwip_netconn_do_gethostbyname must be called using tcpip_callback instead of tcpip_apimsg - (see netconn_gethostbyname). */ -struct dns_api_msg { - /** Hostname to query or dotted IP address string */ -#if LWIP_MPU_COMPATIBLE - char name[DNS_MAX_NAME_LENGTH]; -#else /* LWIP_MPU_COMPATIBLE */ - const char *name; -#endif /* LWIP_MPU_COMPATIBLE */ - /** The resolved address is stored here */ - ip_addr_t API_MSG_M_DEF(addr); -#if LWIP_IPV4 && LWIP_IPV6 - /** Type of resolve call */ - u8_t dns_addrtype; -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - /** This semaphore is posted when the name is resolved, the application thread - should wait on it. */ - sys_sem_t API_MSG_M_DEF_SEM(sem); - /** Errors are given back here */ - err_t API_MSG_M_DEF(err); -}; -#endif /* LWIP_DNS */ - -#if LWIP_TCP -extern u8_t netconn_aborted; -#endif /* LWIP_TCP */ - -void lwip_netconn_do_newconn (void *m); -void lwip_netconn_do_delconn (void *m); -void lwip_netconn_do_bind (void *m); -void lwip_netconn_do_connect (void *m); -void lwip_netconn_do_disconnect (void *m); -void lwip_netconn_do_listen (void *m); -void lwip_netconn_do_send (void *m); -void lwip_netconn_do_recv (void *m); -#if TCP_LISTEN_BACKLOG -void lwip_netconn_do_accepted (void *m); -#endif /* TCP_LISTEN_BACKLOG */ -void lwip_netconn_do_write (void *m); -void lwip_netconn_do_getaddr (void *m); -void lwip_netconn_do_close (void *m); -void lwip_netconn_do_shutdown (void *m); -#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) -void lwip_netconn_do_join_leave_group(void *m); -#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ - -#if LWIP_DNS -void lwip_netconn_do_gethostbyname(void *arg); -#endif /* LWIP_DNS */ - -struct netconn* netconn_alloc(enum netconn_type t, netconn_callback callback); -void netconn_free(struct netconn *conn); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_NETCONN || LWIP_SOCKET */ - -#endif /* LWIP_HDR_API_MSG_H */ +/** + * @file + * netconn API lwIP internal implementations (do not use in application code) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_API_MSG_H +#define LWIP_HDR_API_MSG_H + +#include "lwip/opt.h" + +#if LWIP_NETCONN || LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ +/* Note: Netconn API is always available when sockets are enabled - + * sockets are implemented on top of them */ + +#include "lwip/arch.h" +#include "lwip/ip_addr.h" +#include "lwip/err.h" +#include "lwip/sys.h" +#include "lwip/igmp.h" +#include "lwip/api.h" +#include "lwip/priv/tcpip_priv.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_MPU_COMPATIBLE +#if LWIP_NETCONN_SEM_PER_THREAD +#define API_MSG_M_DEF_SEM(m) *m +#else +#define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m) +#endif +#else /* LWIP_MPU_COMPATIBLE */ +#define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m) +#endif /* LWIP_MPU_COMPATIBLE */ + +/* For the netconn API, these values are use as a bitmask! */ +#define NETCONN_SHUT_RD 1 +#define NETCONN_SHUT_WR 2 +#define NETCONN_SHUT_RDWR (NETCONN_SHUT_RD | NETCONN_SHUT_WR) + +/* IP addresses and port numbers are expected to be in + * the same byte order as in the corresponding pcb. + */ +/** This struct includes everything that is necessary to execute a function + for a netconn in another thread context (mainly used to process netconns + in the tcpip_thread context to be thread safe). */ +struct api_msg { + /** The netconn which to process - always needed: it includes the semaphore + which is used to block the application thread until the function finished. */ + struct netconn *conn; + /** The return value of the function executed in tcpip_thread. */ + err_t err; + /** Depending on the executed function, one of these union members is used */ + union { + /** used for lwip_netconn_do_send */ + struct netbuf *b; + /** used for lwip_netconn_do_newconn */ + struct { + u8_t proto; + } n; + /** used for lwip_netconn_do_bind and lwip_netconn_do_connect */ + struct { + API_MSG_M_DEF_C(ip_addr_t, ipaddr); + u16_t port; + } bc; + /** used for lwip_netconn_do_getaddr */ + struct { + ip_addr_t API_MSG_M_DEF(ipaddr); + u16_t API_MSG_M_DEF(port); + u8_t local; + } ad; + /** used for lwip_netconn_do_write */ + struct { + const void *dataptr; + size_t len; + u8_t apiflags; +#if LWIP_SO_SNDTIMEO + u32_t time_started; +#endif /* LWIP_SO_SNDTIMEO */ + } w; + /** used for lwip_netconn_do_recv */ + struct { + u32_t len; + } r; +#if LWIP_TCP + /** used for lwip_netconn_do_close (/shutdown) */ + struct { + u8_t shut; +#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER + u32_t time_started; +#else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ + u8_t polls_left; +#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ + } sd; +#endif /* LWIP_TCP */ +#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) + /** used for lwip_netconn_do_join_leave_group */ + struct { + API_MSG_M_DEF_C(ip_addr_t, multiaddr); + API_MSG_M_DEF_C(ip_addr_t, netif_addr); + enum netconn_igmp join_or_leave; + } jl; +#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ +#if TCP_LISTEN_BACKLOG + struct { + u8_t backlog; + } lb; +#endif /* TCP_LISTEN_BACKLOG */ + } msg; +#if LWIP_NETCONN_SEM_PER_THREAD + sys_sem_t* op_completed_sem; +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ +}; + +#if LWIP_NETCONN_SEM_PER_THREAD +#define LWIP_API_MSG_SEM(msg) ((msg)->op_completed_sem) +#else /* LWIP_NETCONN_SEM_PER_THREAD */ +#define LWIP_API_MSG_SEM(msg) (&(msg)->conn->op_completed) +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + +#if LWIP_DNS +/** As lwip_netconn_do_gethostbyname requires more arguments but doesn't require a netconn, + it has its own struct (to avoid struct api_msg getting bigger than necessary). + lwip_netconn_do_gethostbyname must be called using tcpip_callback instead of tcpip_apimsg + (see netconn_gethostbyname). */ +struct dns_api_msg { + /** Hostname to query or dotted IP address string */ +#if LWIP_MPU_COMPATIBLE + char name[DNS_MAX_NAME_LENGTH]; +#else /* LWIP_MPU_COMPATIBLE */ + const char *name; +#endif /* LWIP_MPU_COMPATIBLE */ + /** The resolved address is stored here */ + ip_addr_t API_MSG_M_DEF(addr); +#if LWIP_IPV4 && LWIP_IPV6 + /** Type of resolve call */ + u8_t dns_addrtype; +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + /** This semaphore is posted when the name is resolved, the application thread + should wait on it. */ + sys_sem_t API_MSG_M_DEF_SEM(sem); + /** Errors are given back here */ + err_t API_MSG_M_DEF(err); +}; +#endif /* LWIP_DNS */ + +#if LWIP_TCP +extern u8_t netconn_aborted; +#endif /* LWIP_TCP */ + +void lwip_netconn_do_newconn (void *m); +void lwip_netconn_do_delconn (void *m); +void lwip_netconn_do_bind (void *m); +void lwip_netconn_do_connect (void *m); +void lwip_netconn_do_disconnect (void *m); +void lwip_netconn_do_listen (void *m); +void lwip_netconn_do_send (void *m); +void lwip_netconn_do_recv (void *m); +#if TCP_LISTEN_BACKLOG +void lwip_netconn_do_accepted (void *m); +#endif /* TCP_LISTEN_BACKLOG */ +void lwip_netconn_do_write (void *m); +void lwip_netconn_do_getaddr (void *m); +void lwip_netconn_do_close (void *m); +void lwip_netconn_do_shutdown (void *m); +#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) +void lwip_netconn_do_join_leave_group(void *m); +#endif /* LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) */ + +#if LWIP_DNS +void lwip_netconn_do_gethostbyname(void *arg); +#endif /* LWIP_DNS */ + +struct netconn* netconn_alloc(enum netconn_type t, netconn_callback callback); +void netconn_free(struct netconn *conn); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_NETCONN || LWIP_SOCKET */ + +#endif /* LWIP_HDR_API_MSG_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_priv.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_priv.h index f246061..e4a7655 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_priv.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_priv.h @@ -1,183 +1,183 @@ -/** - * @file - * memory pools lwIP internal implementations (do not use in application code) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#ifndef LWIP_HDR_MEMP_PRIV_H -#define LWIP_HDR_MEMP_PRIV_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#include "lwip/mem.h" - -#if MEMP_OVERFLOW_CHECK -/* if MEMP_OVERFLOW_CHECK is turned on, we reserve some bytes at the beginning - * and at the end of each element, initialize them as 0xcd and check - * them later. */ -/* If MEMP_OVERFLOW_CHECK is >= 2, on every call to memp_malloc or memp_free, - * every single element in each pool is checked! - * This is VERY SLOW but also very helpful. */ -/* MEMP_SANITY_REGION_BEFORE and MEMP_SANITY_REGION_AFTER can be overridden in - * lwipopts.h to change the amount reserved for checking. */ -#ifndef MEMP_SANITY_REGION_BEFORE -#define MEMP_SANITY_REGION_BEFORE 16 -#endif /* MEMP_SANITY_REGION_BEFORE*/ -#if MEMP_SANITY_REGION_BEFORE > 0 -#define MEMP_SANITY_REGION_BEFORE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEMP_SANITY_REGION_BEFORE) -#else -#define MEMP_SANITY_REGION_BEFORE_ALIGNED 0 -#endif /* MEMP_SANITY_REGION_BEFORE*/ -#ifndef MEMP_SANITY_REGION_AFTER -#define MEMP_SANITY_REGION_AFTER 16 -#endif /* MEMP_SANITY_REGION_AFTER*/ -#if MEMP_SANITY_REGION_AFTER > 0 -#define MEMP_SANITY_REGION_AFTER_ALIGNED LWIP_MEM_ALIGN_SIZE(MEMP_SANITY_REGION_AFTER) -#else -#define MEMP_SANITY_REGION_AFTER_ALIGNED 0 -#endif /* MEMP_SANITY_REGION_AFTER*/ - -/* MEMP_SIZE: save space for struct memp and for sanity check */ -#define MEMP_SIZE (LWIP_MEM_ALIGN_SIZE(sizeof(struct memp)) + MEMP_SANITY_REGION_BEFORE_ALIGNED) -#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x) + MEMP_SANITY_REGION_AFTER_ALIGNED) - -#else /* MEMP_OVERFLOW_CHECK */ - -/* No sanity checks - * We don't need to preserve the struct memp while not allocated, so we - * can save a little space and set MEMP_SIZE to 0. - */ -#define MEMP_SIZE 0 -#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x)) - -#endif /* MEMP_OVERFLOW_CHECK */ - -#if !MEMP_MEM_MALLOC || MEMP_OVERFLOW_CHECK -struct memp { - struct memp *next; -#if MEMP_OVERFLOW_CHECK - const char *file; - int line; -#endif /* MEMP_OVERFLOW_CHECK */ -}; -#endif /* !MEMP_MEM_MALLOC || MEMP_OVERFLOW_CHECK */ - -#if MEM_USE_POOLS && MEMP_USE_CUSTOM_POOLS -/* Use a helper type to get the start and end of the user "memory pools" for mem_malloc */ -typedef enum { - /* Get the first (via: - MEMP_POOL_HELPER_START = ((u8_t) 1*MEMP_POOL_A + 0*MEMP_POOL_B + 0*MEMP_POOL_C + 0)*/ - MEMP_POOL_HELPER_FIRST = ((u8_t) -#define LWIP_MEMPOOL(name,num,size,desc) -#define LWIP_MALLOC_MEMPOOL_START 1 -#define LWIP_MALLOC_MEMPOOL(num, size) * MEMP_POOL_##size + 0 -#define LWIP_MALLOC_MEMPOOL_END -#include "lwip/priv/memp_std.h" - ) , - /* Get the last (via: - MEMP_POOL_HELPER_END = ((u8_t) 0 + MEMP_POOL_A*0 + MEMP_POOL_B*0 + MEMP_POOL_C*1) */ - MEMP_POOL_HELPER_LAST = ((u8_t) -#define LWIP_MEMPOOL(name,num,size,desc) -#define LWIP_MALLOC_MEMPOOL_START -#define LWIP_MALLOC_MEMPOOL(num, size) 0 + MEMP_POOL_##size * -#define LWIP_MALLOC_MEMPOOL_END 1 -#include "lwip/priv/memp_std.h" - ) -} memp_pool_helper_t; - -/* The actual start and stop values are here (cast them over) - We use this helper type and these defines so we can avoid using const memp_t values */ -#define MEMP_POOL_FIRST ((memp_t) MEMP_POOL_HELPER_FIRST) -#define MEMP_POOL_LAST ((memp_t) MEMP_POOL_HELPER_LAST) -#endif /* MEM_USE_POOLS && MEMP_USE_CUSTOM_POOLS */ - -/** Memory pool descriptor */ -struct memp_desc { -#if defined(LWIP_DEBUG) || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY - /** Textual description */ - const char *desc; -#endif /* LWIP_DEBUG || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY */ -#if MEMP_STATS - /** Statistics */ - struct stats_mem *stats; -#endif - - /** Element size */ - u16_t size; - -#if !MEMP_MEM_MALLOC - /** Number of elements */ - u16_t num; - - /** Base address */ - u8_t *base; - - /** First free element of each pool. Elements form a linked list. */ - struct memp **tab; -#endif /* MEMP_MEM_MALLOC */ -}; - -#if defined(LWIP_DEBUG) || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY -#define DECLARE_LWIP_MEMPOOL_DESC(desc) (desc), -#else -#define DECLARE_LWIP_MEMPOOL_DESC(desc) -#endif - -#if MEMP_STATS -#define LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(name) static struct stats_mem name; -#define LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(name) &name, -#else -#define LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(name) -#define LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(name) -#endif - -void memp_init_pool(const struct memp_desc *desc); - -#if MEMP_OVERFLOW_CHECK -void *memp_malloc_pool_fn(const struct memp_desc* desc, const char* file, const int line); -#define memp_malloc_pool(d) memp_malloc_pool_fn((d), __FILE__, __LINE__) -#else -void *memp_malloc_pool(const struct memp_desc *desc); -#endif -void memp_free_pool(const struct memp_desc* desc, void *mem); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_MEMP_PRIV_H */ +/** + * @file + * memory pools lwIP internal implementations (do not use in application code) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#ifndef LWIP_HDR_MEMP_PRIV_H +#define LWIP_HDR_MEMP_PRIV_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#include "lwip/mem.h" + +#if MEMP_OVERFLOW_CHECK +/* if MEMP_OVERFLOW_CHECK is turned on, we reserve some bytes at the beginning + * and at the end of each element, initialize them as 0xcd and check + * them later. */ +/* If MEMP_OVERFLOW_CHECK is >= 2, on every call to memp_malloc or memp_free, + * every single element in each pool is checked! + * This is VERY SLOW but also very helpful. */ +/* MEMP_SANITY_REGION_BEFORE and MEMP_SANITY_REGION_AFTER can be overridden in + * lwipopts.h to change the amount reserved for checking. */ +#ifndef MEMP_SANITY_REGION_BEFORE +#define MEMP_SANITY_REGION_BEFORE 16 +#endif /* MEMP_SANITY_REGION_BEFORE*/ +#if MEMP_SANITY_REGION_BEFORE > 0 +#define MEMP_SANITY_REGION_BEFORE_ALIGNED LWIP_MEM_ALIGN_SIZE(MEMP_SANITY_REGION_BEFORE) +#else +#define MEMP_SANITY_REGION_BEFORE_ALIGNED 0 +#endif /* MEMP_SANITY_REGION_BEFORE*/ +#ifndef MEMP_SANITY_REGION_AFTER +#define MEMP_SANITY_REGION_AFTER 16 +#endif /* MEMP_SANITY_REGION_AFTER*/ +#if MEMP_SANITY_REGION_AFTER > 0 +#define MEMP_SANITY_REGION_AFTER_ALIGNED LWIP_MEM_ALIGN_SIZE(MEMP_SANITY_REGION_AFTER) +#else +#define MEMP_SANITY_REGION_AFTER_ALIGNED 0 +#endif /* MEMP_SANITY_REGION_AFTER*/ + +/* MEMP_SIZE: save space for struct memp and for sanity check */ +#define MEMP_SIZE (LWIP_MEM_ALIGN_SIZE(sizeof(struct memp)) + MEMP_SANITY_REGION_BEFORE_ALIGNED) +#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x) + MEMP_SANITY_REGION_AFTER_ALIGNED) + +#else /* MEMP_OVERFLOW_CHECK */ + +/* No sanity checks + * We don't need to preserve the struct memp while not allocated, so we + * can save a little space and set MEMP_SIZE to 0. + */ +#define MEMP_SIZE 0 +#define MEMP_ALIGN_SIZE(x) (LWIP_MEM_ALIGN_SIZE(x)) + +#endif /* MEMP_OVERFLOW_CHECK */ + +#if !MEMP_MEM_MALLOC || MEMP_OVERFLOW_CHECK +struct memp { + struct memp *next; +#if MEMP_OVERFLOW_CHECK + const char *file; + int line; +#endif /* MEMP_OVERFLOW_CHECK */ +}; +#endif /* !MEMP_MEM_MALLOC || MEMP_OVERFLOW_CHECK */ + +#if MEM_USE_POOLS && MEMP_USE_CUSTOM_POOLS +/* Use a helper type to get the start and end of the user "memory pools" for mem_malloc */ +typedef enum { + /* Get the first (via: + MEMP_POOL_HELPER_START = ((u8_t) 1*MEMP_POOL_A + 0*MEMP_POOL_B + 0*MEMP_POOL_C + 0)*/ + MEMP_POOL_HELPER_FIRST = ((u8_t) +#define LWIP_MEMPOOL(name,num,size,desc) +#define LWIP_MALLOC_MEMPOOL_START 1 +#define LWIP_MALLOC_MEMPOOL(num, size) * MEMP_POOL_##size + 0 +#define LWIP_MALLOC_MEMPOOL_END +#include "lwip/priv/memp_std.h" + ) , + /* Get the last (via: + MEMP_POOL_HELPER_END = ((u8_t) 0 + MEMP_POOL_A*0 + MEMP_POOL_B*0 + MEMP_POOL_C*1) */ + MEMP_POOL_HELPER_LAST = ((u8_t) +#define LWIP_MEMPOOL(name,num,size,desc) +#define LWIP_MALLOC_MEMPOOL_START +#define LWIP_MALLOC_MEMPOOL(num, size) 0 + MEMP_POOL_##size * +#define LWIP_MALLOC_MEMPOOL_END 1 +#include "lwip/priv/memp_std.h" + ) +} memp_pool_helper_t; + +/* The actual start and stop values are here (cast them over) + We use this helper type and these defines so we can avoid using const memp_t values */ +#define MEMP_POOL_FIRST ((memp_t) MEMP_POOL_HELPER_FIRST) +#define MEMP_POOL_LAST ((memp_t) MEMP_POOL_HELPER_LAST) +#endif /* MEM_USE_POOLS && MEMP_USE_CUSTOM_POOLS */ + +/** Memory pool descriptor */ +struct memp_desc { +#if defined(LWIP_DEBUG) || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY + /** Textual description */ + const char *desc; +#endif /* LWIP_DEBUG || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY */ +#if MEMP_STATS + /** Statistics */ + struct stats_mem *stats; +#endif + + /** Element size */ + u16_t size; + +#if !MEMP_MEM_MALLOC + /** Number of elements */ + u16_t num; + + /** Base address */ + u8_t *base; + + /** First free element of each pool. Elements form a linked list. */ + struct memp **tab; +#endif /* MEMP_MEM_MALLOC */ +}; + +#if defined(LWIP_DEBUG) || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY +#define DECLARE_LWIP_MEMPOOL_DESC(desc) (desc), +#else +#define DECLARE_LWIP_MEMPOOL_DESC(desc) +#endif + +#if MEMP_STATS +#define LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(name) static struct stats_mem name; +#define LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(name) &name, +#else +#define LWIP_MEMPOOL_DECLARE_STATS_INSTANCE(name) +#define LWIP_MEMPOOL_DECLARE_STATS_REFERENCE(name) +#endif + +void memp_init_pool(const struct memp_desc *desc); + +#if MEMP_OVERFLOW_CHECK +void *memp_malloc_pool_fn(const struct memp_desc* desc, const char* file, const int line); +#define memp_malloc_pool(d) memp_malloc_pool_fn((d), __FILE__, __LINE__) +#else +void *memp_malloc_pool(const struct memp_desc *desc); +#endif +void memp_free_pool(const struct memp_desc* desc, void *mem); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_MEMP_PRIV_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_std.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_std.h index ce9fd50..fb91202 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_std.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/memp_std.h @@ -1,146 +1,146 @@ -/** - * @file - * lwIP internal memory pools (do not use in application code) - * This file is deliberately included multiple times: once with empty - * definition of LWIP_MEMPOOL() to handle all includes and multiple times - * to build up various lists of mem pools. - */ - -/* - * SETUP: Make sure we define everything we will need. - * - * We have create three types of pools: - * 1) MEMPOOL - standard pools - * 2) MALLOC_MEMPOOL - to be used by mem_malloc in mem.c - * 3) PBUF_MEMPOOL - a mempool of pbuf's, so include space for the pbuf struct - * - * If the include'r doesn't require any special treatment of each of the types - * above, then will declare #2 & #3 to be just standard mempools. - */ -#ifndef LWIP_MALLOC_MEMPOOL -/* This treats "malloc pools" just like any other pool. - The pools are a little bigger to provide 'size' as the amount of user data. */ -#define LWIP_MALLOC_MEMPOOL(num, size) LWIP_MEMPOOL(POOL_##size, num, (size + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper))), "MALLOC_"#size) -#define LWIP_MALLOC_MEMPOOL_START -#define LWIP_MALLOC_MEMPOOL_END -#endif /* LWIP_MALLOC_MEMPOOL */ - -#ifndef LWIP_PBUF_MEMPOOL -/* This treats "pbuf pools" just like any other pool. - * Allocates buffers for a pbuf struct AND a payload size */ -#define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (MEMP_ALIGN_SIZE(sizeof(struct pbuf)) + MEMP_ALIGN_SIZE(payload)), desc) -#endif /* LWIP_PBUF_MEMPOOL */ - - -/* - * A list of internal pools used by LWIP. - * - * LWIP_MEMPOOL(pool_name, number_elements, element_size, pool_description) - * creates a pool name MEMP_pool_name. description is used in stats.c - */ -#if LWIP_RAW -LWIP_MEMPOOL(RAW_PCB, MEMP_NUM_RAW_PCB, sizeof(struct raw_pcb), "RAW_PCB") -#endif /* LWIP_RAW */ - -#if LWIP_UDP -LWIP_MEMPOOL(UDP_PCB, MEMP_NUM_UDP_PCB, sizeof(struct udp_pcb), "UDP_PCB") -#endif /* LWIP_UDP */ - -#if LWIP_TCP -LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB, sizeof(struct tcp_pcb), "TCP_PCB") -LWIP_MEMPOOL(TCP_PCB_LISTEN, MEMP_NUM_TCP_PCB_LISTEN, sizeof(struct tcp_pcb_listen), "TCP_PCB_LISTEN") -LWIP_MEMPOOL(TCP_SEG, MEMP_NUM_TCP_SEG, sizeof(struct tcp_seg), "TCP_SEG") -#endif /* LWIP_TCP */ - -#if LWIP_IPV4 && IP_REASSEMBLY -LWIP_MEMPOOL(REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip_reassdata), "REASSDATA") -#endif /* LWIP_IPV4 && IP_REASSEMBLY */ -#if (IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG) -LWIP_MEMPOOL(FRAG_PBUF, MEMP_NUM_FRAG_PBUF, sizeof(struct pbuf_custom_ref),"FRAG_PBUF") -#endif /* IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF || (LWIP_IPV6 && LWIP_IPV6_FRAG) */ - -#if LWIP_NETCONN || LWIP_SOCKET -LWIP_MEMPOOL(NETBUF, MEMP_NUM_NETBUF, sizeof(struct netbuf), "NETBUF") -LWIP_MEMPOOL(NETCONN, MEMP_NUM_NETCONN, sizeof(struct netconn), "NETCONN") -#endif /* LWIP_NETCONN || LWIP_SOCKET */ - -#if NO_SYS==0 -LWIP_MEMPOOL(TCPIP_MSG_API, MEMP_NUM_TCPIP_MSG_API, sizeof(struct tcpip_msg), "TCPIP_MSG_API") -#if LWIP_MPU_COMPATIBLE -LWIP_MEMPOOL(API_MSG, MEMP_NUM_API_MSG, sizeof(struct api_msg), "API_MSG") -#if LWIP_DNS -LWIP_MEMPOOL(DNS_API_MSG, MEMP_NUM_DNS_API_MSG, sizeof(struct dns_api_msg), "DNS_API_MSG") -#endif -#if LWIP_SOCKET && !LWIP_TCPIP_CORE_LOCKING -LWIP_MEMPOOL(SOCKET_SETGETSOCKOPT_DATA, MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA, sizeof(struct lwip_setgetsockopt_data), "SOCKET_SETGETSOCKOPT_DATA") -#endif -#if LWIP_NETIF_API -LWIP_MEMPOOL(NETIFAPI_MSG, MEMP_NUM_NETIFAPI_MSG, sizeof(struct netifapi_msg), "NETIFAPI_MSG") -#endif -#endif /* LWIP_MPU_COMPATIBLE */ -#if !LWIP_TCPIP_CORE_LOCKING_INPUT -LWIP_MEMPOOL(TCPIP_MSG_INPKT,MEMP_NUM_TCPIP_MSG_INPKT, sizeof(struct tcpip_msg), "TCPIP_MSG_INPKT") -#endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ -#endif /* NO_SYS==0 */ - -#if LWIP_IPV4 && LWIP_ARP && ARP_QUEUEING -LWIP_MEMPOOL(ARP_QUEUE, MEMP_NUM_ARP_QUEUE, sizeof(struct etharp_q_entry), "ARP_QUEUE") -#endif /* LWIP_IPV4 && LWIP_ARP && ARP_QUEUEING */ - -#if LWIP_IGMP -LWIP_MEMPOOL(IGMP_GROUP, MEMP_NUM_IGMP_GROUP, sizeof(struct igmp_group), "IGMP_GROUP") -#endif /* LWIP_IGMP */ - -#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM -LWIP_MEMPOOL(SYS_TIMEOUT, MEMP_NUM_SYS_TIMEOUT, sizeof(struct sys_timeo), "SYS_TIMEOUT") -#endif /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ - -#if LWIP_DNS && LWIP_SOCKET -LWIP_MEMPOOL(NETDB, MEMP_NUM_NETDB, NETDB_ELEM_SIZE, "NETDB") -#endif /* LWIP_DNS && LWIP_SOCKET */ -#if LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC -LWIP_MEMPOOL(LOCALHOSTLIST, MEMP_NUM_LOCALHOSTLIST, LOCALHOSTLIST_ELEM_SIZE, "LOCALHOSTLIST") -#endif /* LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ - -#if LWIP_IPV6 && LWIP_ND6_QUEUEING -LWIP_MEMPOOL(ND6_QUEUE, MEMP_NUM_ND6_QUEUE, sizeof(struct nd6_q_entry), "ND6_QUEUE") -#endif /* LWIP_IPV6 && LWIP_ND6_QUEUEING */ - -#if LWIP_IPV6 && LWIP_IPV6_REASS -LWIP_MEMPOOL(IP6_REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip6_reassdata), "IP6_REASSDATA") -#endif /* LWIP_IPV6 && LWIP_IPV6_REASS */ - -#if LWIP_IPV6 && LWIP_IPV6_MLD -LWIP_MEMPOOL(MLD6_GROUP, MEMP_NUM_MLD6_GROUP, sizeof(struct mld_group), "MLD6_GROUP") -#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ - - -/* - * A list of pools of pbuf's used by LWIP. - * - * LWIP_PBUF_MEMPOOL(pool_name, number_elements, pbuf_payload_size, pool_description) - * creates a pool name MEMP_pool_name. description is used in stats.c - * This allocates enough space for the pbuf struct and a payload. - * (Example: pbuf_payload_size=0 allocates only size for the struct) - */ -LWIP_PBUF_MEMPOOL(PBUF, MEMP_NUM_PBUF, 0, "PBUF_REF/ROM") -LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE, PBUF_POOL_BUFSIZE, "PBUF_POOL") - - -/* - * Allow for user-defined pools; this must be explicitly set in lwipopts.h - * since the default is to NOT look for lwippools.h - */ -#if MEMP_USE_CUSTOM_POOLS -#include "lwippools.h" -#endif /* MEMP_USE_CUSTOM_POOLS */ - -/* - * REQUIRED CLEANUP: Clear up so we don't get "multiply defined" error later - * (#undef is ignored for something that is not defined) - */ -#undef LWIP_MEMPOOL -#undef LWIP_MALLOC_MEMPOOL -#undef LWIP_MALLOC_MEMPOOL_START -#undef LWIP_MALLOC_MEMPOOL_END -#undef LWIP_PBUF_MEMPOOL +/** + * @file + * lwIP internal memory pools (do not use in application code) + * This file is deliberately included multiple times: once with empty + * definition of LWIP_MEMPOOL() to handle all includes and multiple times + * to build up various lists of mem pools. + */ + +/* + * SETUP: Make sure we define everything we will need. + * + * We have create three types of pools: + * 1) MEMPOOL - standard pools + * 2) MALLOC_MEMPOOL - to be used by mem_malloc in mem.c + * 3) PBUF_MEMPOOL - a mempool of pbuf's, so include space for the pbuf struct + * + * If the include'r doesn't require any special treatment of each of the types + * above, then will declare #2 & #3 to be just standard mempools. + */ +#ifndef LWIP_MALLOC_MEMPOOL +/* This treats "malloc pools" just like any other pool. + The pools are a little bigger to provide 'size' as the amount of user data. */ +#define LWIP_MALLOC_MEMPOOL(num, size) LWIP_MEMPOOL(POOL_##size, num, (size + LWIP_MEM_ALIGN_SIZE(sizeof(struct memp_malloc_helper))), "MALLOC_"#size) +#define LWIP_MALLOC_MEMPOOL_START +#define LWIP_MALLOC_MEMPOOL_END +#endif /* LWIP_MALLOC_MEMPOOL */ + +#ifndef LWIP_PBUF_MEMPOOL +/* This treats "pbuf pools" just like any other pool. + * Allocates buffers for a pbuf struct AND a payload size */ +#define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (MEMP_ALIGN_SIZE(sizeof(struct pbuf)) + MEMP_ALIGN_SIZE(payload)), desc) +#endif /* LWIP_PBUF_MEMPOOL */ + + +/* + * A list of internal pools used by LWIP. + * + * LWIP_MEMPOOL(pool_name, number_elements, element_size, pool_description) + * creates a pool name MEMP_pool_name. description is used in stats.c + */ +#if LWIP_RAW +LWIP_MEMPOOL(RAW_PCB, MEMP_NUM_RAW_PCB, sizeof(struct raw_pcb), "RAW_PCB") +#endif /* LWIP_RAW */ + +#if LWIP_UDP +LWIP_MEMPOOL(UDP_PCB, MEMP_NUM_UDP_PCB, sizeof(struct udp_pcb), "UDP_PCB") +#endif /* LWIP_UDP */ + +#if LWIP_TCP +LWIP_MEMPOOL(TCP_PCB, MEMP_NUM_TCP_PCB, sizeof(struct tcp_pcb), "TCP_PCB") +LWIP_MEMPOOL(TCP_PCB_LISTEN, MEMP_NUM_TCP_PCB_LISTEN, sizeof(struct tcp_pcb_listen), "TCP_PCB_LISTEN") +LWIP_MEMPOOL(TCP_SEG, MEMP_NUM_TCP_SEG, sizeof(struct tcp_seg), "TCP_SEG") +#endif /* LWIP_TCP */ + +#if LWIP_IPV4 && IP_REASSEMBLY +LWIP_MEMPOOL(REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip_reassdata), "REASSDATA") +#endif /* LWIP_IPV4 && IP_REASSEMBLY */ +#if (IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF) || (LWIP_IPV6 && LWIP_IPV6_FRAG) +LWIP_MEMPOOL(FRAG_PBUF, MEMP_NUM_FRAG_PBUF, sizeof(struct pbuf_custom_ref),"FRAG_PBUF") +#endif /* IP_FRAG && !LWIP_NETIF_TX_SINGLE_PBUF || (LWIP_IPV6 && LWIP_IPV6_FRAG) */ + +#if LWIP_NETCONN || LWIP_SOCKET +LWIP_MEMPOOL(NETBUF, MEMP_NUM_NETBUF, sizeof(struct netbuf), "NETBUF") +LWIP_MEMPOOL(NETCONN, MEMP_NUM_NETCONN, sizeof(struct netconn), "NETCONN") +#endif /* LWIP_NETCONN || LWIP_SOCKET */ + +#if NO_SYS==0 +LWIP_MEMPOOL(TCPIP_MSG_API, MEMP_NUM_TCPIP_MSG_API, sizeof(struct tcpip_msg), "TCPIP_MSG_API") +#if LWIP_MPU_COMPATIBLE +LWIP_MEMPOOL(API_MSG, MEMP_NUM_API_MSG, sizeof(struct api_msg), "API_MSG") +#if LWIP_DNS +LWIP_MEMPOOL(DNS_API_MSG, MEMP_NUM_DNS_API_MSG, sizeof(struct dns_api_msg), "DNS_API_MSG") +#endif +#if LWIP_SOCKET && !LWIP_TCPIP_CORE_LOCKING +LWIP_MEMPOOL(SOCKET_SETGETSOCKOPT_DATA, MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA, sizeof(struct lwip_setgetsockopt_data), "SOCKET_SETGETSOCKOPT_DATA") +#endif +#if LWIP_NETIF_API +LWIP_MEMPOOL(NETIFAPI_MSG, MEMP_NUM_NETIFAPI_MSG, sizeof(struct netifapi_msg), "NETIFAPI_MSG") +#endif +#endif /* LWIP_MPU_COMPATIBLE */ +#if !LWIP_TCPIP_CORE_LOCKING_INPUT +LWIP_MEMPOOL(TCPIP_MSG_INPKT,MEMP_NUM_TCPIP_MSG_INPKT, sizeof(struct tcpip_msg), "TCPIP_MSG_INPKT") +#endif /* !LWIP_TCPIP_CORE_LOCKING_INPUT */ +#endif /* NO_SYS==0 */ + +#if LWIP_IPV4 && LWIP_ARP && ARP_QUEUEING +LWIP_MEMPOOL(ARP_QUEUE, MEMP_NUM_ARP_QUEUE, sizeof(struct etharp_q_entry), "ARP_QUEUE") +#endif /* LWIP_IPV4 && LWIP_ARP && ARP_QUEUEING */ + +#if LWIP_IGMP +LWIP_MEMPOOL(IGMP_GROUP, MEMP_NUM_IGMP_GROUP, sizeof(struct igmp_group), "IGMP_GROUP") +#endif /* LWIP_IGMP */ + +#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM +LWIP_MEMPOOL(SYS_TIMEOUT, MEMP_NUM_SYS_TIMEOUT, sizeof(struct sys_timeo), "SYS_TIMEOUT") +#endif /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ + +#if LWIP_DNS && LWIP_SOCKET +LWIP_MEMPOOL(NETDB, MEMP_NUM_NETDB, NETDB_ELEM_SIZE, "NETDB") +#endif /* LWIP_DNS && LWIP_SOCKET */ +#if LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC +LWIP_MEMPOOL(LOCALHOSTLIST, MEMP_NUM_LOCALHOSTLIST, LOCALHOSTLIST_ELEM_SIZE, "LOCALHOSTLIST") +#endif /* LWIP_DNS && DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ + +#if LWIP_IPV6 && LWIP_ND6_QUEUEING +LWIP_MEMPOOL(ND6_QUEUE, MEMP_NUM_ND6_QUEUE, sizeof(struct nd6_q_entry), "ND6_QUEUE") +#endif /* LWIP_IPV6 && LWIP_ND6_QUEUEING */ + +#if LWIP_IPV6 && LWIP_IPV6_REASS +LWIP_MEMPOOL(IP6_REASSDATA, MEMP_NUM_REASSDATA, sizeof(struct ip6_reassdata), "IP6_REASSDATA") +#endif /* LWIP_IPV6 && LWIP_IPV6_REASS */ + +#if LWIP_IPV6 && LWIP_IPV6_MLD +LWIP_MEMPOOL(MLD6_GROUP, MEMP_NUM_MLD6_GROUP, sizeof(struct mld_group), "MLD6_GROUP") +#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */ + + +/* + * A list of pools of pbuf's used by LWIP. + * + * LWIP_PBUF_MEMPOOL(pool_name, number_elements, pbuf_payload_size, pool_description) + * creates a pool name MEMP_pool_name. description is used in stats.c + * This allocates enough space for the pbuf struct and a payload. + * (Example: pbuf_payload_size=0 allocates only size for the struct) + */ +LWIP_PBUF_MEMPOOL(PBUF, MEMP_NUM_PBUF, 0, "PBUF_REF/ROM") +LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE, PBUF_POOL_BUFSIZE, "PBUF_POOL") + + +/* + * Allow for user-defined pools; this must be explicitly set in lwipopts.h + * since the default is to NOT look for lwippools.h + */ +#if MEMP_USE_CUSTOM_POOLS +#include "lwippools.h" +#endif /* MEMP_USE_CUSTOM_POOLS */ + +/* + * REQUIRED CLEANUP: Clear up so we don't get "multiply defined" error later + * (#undef is ignored for something that is not defined) + */ +#undef LWIP_MEMPOOL +#undef LWIP_MALLOC_MEMPOOL +#undef LWIP_MALLOC_MEMPOOL_START +#undef LWIP_MALLOC_MEMPOOL_END +#undef LWIP_PBUF_MEMPOOL diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/nd6_priv.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/nd6_priv.h index 4bda0b7..3377dde 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/nd6_priv.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/nd6_priv.h @@ -1,144 +1,144 @@ -/** - * @file - * - * Neighbor discovery and stateless address autoconfiguration for IPv6. - * Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 - * (Address autoconfiguration). - */ - -/* - * Copyright (c) 2010 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#ifndef LWIP_HDR_ND6_PRIV_H -#define LWIP_HDR_ND6_PRIV_H - -#include "lwip/opt.h" - -#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/ip6_addr.h" -#include "lwip/netif.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_ND6_QUEUEING -/** struct for queueing outgoing packets for unknown address - * defined here to be accessed by memp.h - */ -struct nd6_q_entry { - struct nd6_q_entry *next; - struct pbuf *p; -}; -#endif /* LWIP_ND6_QUEUEING */ - -/** Struct for tables. */ -struct nd6_neighbor_cache_entry { - ip6_addr_t next_hop_address; - struct netif *netif; - u8_t lladdr[NETIF_MAX_HWADDR_LEN]; - /*u32_t pmtu;*/ -#if LWIP_ND6_QUEUEING - /** Pointer to queue of pending outgoing packets on this entry. */ - struct nd6_q_entry *q; -#else /* LWIP_ND6_QUEUEING */ - /** Pointer to a single pending outgoing packet on this entry. */ - struct pbuf *q; -#endif /* LWIP_ND6_QUEUEING */ - u8_t state; - u8_t isrouter; - union { - u32_t reachable_time; /* in ms since value may originate from network packet */ - u32_t delay_time; /* ticks (ND6_TMR_INTERVAL) */ - u32_t probes_sent; - u32_t stale_time; /* ticks (ND6_TMR_INTERVAL) */ - } counter; -}; - -struct nd6_destination_cache_entry { - ip6_addr_t destination_addr; - ip6_addr_t next_hop_addr; - u16_t pmtu; - u32_t age; -}; - -struct nd6_prefix_list_entry { - ip6_addr_t prefix; - struct netif *netif; - u32_t invalidation_timer; /* in ms since value may originate from network packet */ -#if LWIP_IPV6_AUTOCONFIG - u8_t flags; -#define ND6_PREFIX_AUTOCONFIG_AUTONOMOUS 0x01 -#define ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED 0x02 -#define ND6_PREFIX_AUTOCONFIG_ADDRESS_DUPLICATE 0x04 -#endif /* LWIP_IPV6_AUTOCONFIG */ -}; - -struct nd6_router_list_entry { - struct nd6_neighbor_cache_entry *neighbor_entry; - u32_t invalidation_timer; /* in ms since value may originate from network packet */ - u8_t flags; -}; - -enum nd6_neighbor_cache_entry_state { - ND6_NO_ENTRY = 0, - ND6_INCOMPLETE, - ND6_REACHABLE, - ND6_STALE, - ND6_DELAY, - ND6_PROBE -}; - -/* Router tables. */ -/* @todo make these static? and entries accessible through API? */ -extern struct nd6_neighbor_cache_entry neighbor_cache[]; -extern struct nd6_destination_cache_entry destination_cache[]; -extern struct nd6_prefix_list_entry prefix_list[]; -extern struct nd6_router_list_entry default_router_list[]; - -/* Default values, can be updated by a RA message. */ -extern u32_t reachable_time; -extern u32_t retrans_timer; - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV6 */ - -#endif /* LWIP_HDR_ND6_PRIV_H */ +/** + * @file + * + * Neighbor discovery and stateless address autoconfiguration for IPv6. + * Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 + * (Address autoconfiguration). + */ + +/* + * Copyright (c) 2010 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_ND6_PRIV_H +#define LWIP_HDR_ND6_PRIV_H + +#include "lwip/opt.h" + +#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/ip6_addr.h" +#include "lwip/netif.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_ND6_QUEUEING +/** struct for queueing outgoing packets for unknown address + * defined here to be accessed by memp.h + */ +struct nd6_q_entry { + struct nd6_q_entry *next; + struct pbuf *p; +}; +#endif /* LWIP_ND6_QUEUEING */ + +/** Struct for tables. */ +struct nd6_neighbor_cache_entry { + ip6_addr_t next_hop_address; + struct netif *netif; + u8_t lladdr[NETIF_MAX_HWADDR_LEN]; + /*u32_t pmtu;*/ +#if LWIP_ND6_QUEUEING + /** Pointer to queue of pending outgoing packets on this entry. */ + struct nd6_q_entry *q; +#else /* LWIP_ND6_QUEUEING */ + /** Pointer to a single pending outgoing packet on this entry. */ + struct pbuf *q; +#endif /* LWIP_ND6_QUEUEING */ + u8_t state; + u8_t isrouter; + union { + u32_t reachable_time; /* in ms since value may originate from network packet */ + u32_t delay_time; /* ticks (ND6_TMR_INTERVAL) */ + u32_t probes_sent; + u32_t stale_time; /* ticks (ND6_TMR_INTERVAL) */ + } counter; +}; + +struct nd6_destination_cache_entry { + ip6_addr_t destination_addr; + ip6_addr_t next_hop_addr; + u16_t pmtu; + u32_t age; +}; + +struct nd6_prefix_list_entry { + ip6_addr_t prefix; + struct netif *netif; + u32_t invalidation_timer; /* in ms since value may originate from network packet */ +#if LWIP_IPV6_AUTOCONFIG + u8_t flags; +#define ND6_PREFIX_AUTOCONFIG_AUTONOMOUS 0x01 +#define ND6_PREFIX_AUTOCONFIG_ADDRESS_GENERATED 0x02 +#define ND6_PREFIX_AUTOCONFIG_ADDRESS_DUPLICATE 0x04 +#endif /* LWIP_IPV6_AUTOCONFIG */ +}; + +struct nd6_router_list_entry { + struct nd6_neighbor_cache_entry *neighbor_entry; + u32_t invalidation_timer; /* in ms since value may originate from network packet */ + u8_t flags; +}; + +enum nd6_neighbor_cache_entry_state { + ND6_NO_ENTRY = 0, + ND6_INCOMPLETE, + ND6_REACHABLE, + ND6_STALE, + ND6_DELAY, + ND6_PROBE +}; + +/* Router tables. */ +/* @todo make these static? and entries accessible through API? */ +extern struct nd6_neighbor_cache_entry neighbor_cache[]; +extern struct nd6_destination_cache_entry destination_cache[]; +extern struct nd6_prefix_list_entry prefix_list[]; +extern struct nd6_router_list_entry default_router_list[]; + +/* Default values, can be updated by a RA message. */ +extern u32_t reachable_time; +extern u32_t retrans_timer; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 */ + +#endif /* LWIP_HDR_ND6_PRIV_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcp_priv.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcp_priv.h index 73e8967..7ae37e4 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcp_priv.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcp_priv.h @@ -1,507 +1,507 @@ -/** - * @file - * TCP internal implementations (do not use in application code) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_TCP_PRIV_H -#define LWIP_HDR_TCP_PRIV_H - -#include "lwip/opt.h" - -#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/tcp.h" -#include "lwip/mem.h" -#include "lwip/pbuf.h" -#include "lwip/ip.h" -#include "lwip/icmp.h" -#include "lwip/err.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" -#include "lwip/prot/tcp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Functions for interfacing with TCP: */ - -/* Lower layer interface to TCP: */ -void tcp_init (void); /* Initialize this module. */ -void tcp_tmr (void); /* Must be called every - TCP_TMR_INTERVAL - ms. (Typically 250 ms). */ -/* It is also possible to call these two functions at the right - intervals (instead of calling tcp_tmr()). */ -void tcp_slowtmr (void); -void tcp_fasttmr (void); - -/* Call this from a netif driver (watch out for threading issues!) that has - returned a memory error on transmit and now has free buffers to send more. - This iterates all active pcbs that had an error and tries to call - tcp_output, so use this with care as it might slow down the system. */ -void tcp_txnow (void); - -/* Only used by IP to pass a TCP segment to TCP: */ -void tcp_input (struct pbuf *p, struct netif *inp); -/* Used within the TCP code only: */ -struct tcp_pcb * tcp_alloc (u8_t prio); -void tcp_abandon (struct tcp_pcb *pcb, int reset); -err_t tcp_send_empty_ack(struct tcp_pcb *pcb); -void tcp_rexmit (struct tcp_pcb *pcb); -void tcp_rexmit_rto (struct tcp_pcb *pcb); -void tcp_rexmit_fast (struct tcp_pcb *pcb); -u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb); -err_t tcp_process_refused_data(struct tcp_pcb *pcb); - -/** - * This is the Nagle algorithm: try to combine user data to send as few TCP - * segments as possible. Only send if - * - no previously transmitted data on the connection remains unacknowledged or - * - the TF_NODELAY flag is set (nagle algorithm turned off for this pcb) or - * - the only unsent segment is at least pcb->mss bytes long (or there is more - * than one unsent segment - with lwIP, this can happen although unsent->len < mss) - * - or if we are in fast-retransmit (TF_INFR) - */ -#define tcp_do_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \ - ((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \ - (((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \ - ((tpcb)->unsent->len >= (tpcb)->mss))) || \ - ((tcp_sndbuf(tpcb) == 0) || (tcp_sndqueuelen(tpcb) >= TCP_SND_QUEUELEN)) \ - ) ? 1 : 0) -#define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK) - - -#define TCP_SEQ_LT(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) < 0) -#define TCP_SEQ_LEQ(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) <= 0) -#define TCP_SEQ_GT(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) > 0) -#define TCP_SEQ_GEQ(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) >= 0) -/* is b<=a<=c? */ -#if 0 /* see bug #10548 */ -#define TCP_SEQ_BETWEEN(a,b,c) ((c)-(b) >= (a)-(b)) -#endif -#define TCP_SEQ_BETWEEN(a,b,c) (TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c)) - -#ifndef TCP_TMR_INTERVAL -#define TCP_TMR_INTERVAL 250 /* The TCP timer interval in milliseconds. */ -#endif /* TCP_TMR_INTERVAL */ - -#ifndef TCP_FAST_INTERVAL -#define TCP_FAST_INTERVAL TCP_TMR_INTERVAL /* the fine grained timeout in milliseconds */ -#endif /* TCP_FAST_INTERVAL */ - -#ifndef TCP_SLOW_INTERVAL -#define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in milliseconds */ -#endif /* TCP_SLOW_INTERVAL */ - -#define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ -#define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */ - -#define TCP_OOSEQ_TIMEOUT 6U /* x RTO */ - -#ifndef TCP_MSL -#define TCP_MSL 60000UL /* The maximum segment lifetime in milliseconds */ -#endif - -/* Keepalive values, compliant with RFC 1122. Don't change this unless you know what you're doing */ -#ifndef TCP_KEEPIDLE_DEFAULT -#define TCP_KEEPIDLE_DEFAULT 7200000UL /* Default KEEPALIVE timer in milliseconds */ -#endif - -#ifndef TCP_KEEPINTVL_DEFAULT -#define TCP_KEEPINTVL_DEFAULT 75000UL /* Default Time between KEEPALIVE probes in milliseconds */ -#endif - -#ifndef TCP_KEEPCNT_DEFAULT -#define TCP_KEEPCNT_DEFAULT 9U /* Default Counter for KEEPALIVE probes */ -#endif - -#define TCP_MAXIDLE TCP_KEEPCNT_DEFAULT * TCP_KEEPINTVL_DEFAULT /* Maximum KEEPALIVE probe time */ - -#define TCP_TCPLEN(seg) ((seg)->len + (((TCPH_FLAGS((seg)->tcphdr) & (TCP_FIN | TCP_SYN)) != 0) ? 1U : 0U)) - -/** Flags used on input processing, not on pcb->flags -*/ -#define TF_RESET (u8_t)0x08U /* Connection was reset. */ -#define TF_CLOSED (u8_t)0x10U /* Connection was successfully closed. */ -#define TF_GOT_FIN (u8_t)0x20U /* Connection was closed by the remote end. */ - - -#if LWIP_EVENT_API - -#define TCP_EVENT_ACCEPT(lpcb,pcb,arg,err,ret) ret = lwip_tcp_event(arg, (pcb),\ - LWIP_EVENT_ACCEPT, NULL, 0, err) -#define TCP_EVENT_SENT(pcb,space,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ - LWIP_EVENT_SENT, NULL, space, ERR_OK) -#define TCP_EVENT_RECV(pcb,p,err,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ - LWIP_EVENT_RECV, (p), 0, (err)) -#define TCP_EVENT_CLOSED(pcb,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ - LWIP_EVENT_RECV, NULL, 0, ERR_OK) -#define TCP_EVENT_CONNECTED(pcb,err,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ - LWIP_EVENT_CONNECTED, NULL, 0, (err)) -#define TCP_EVENT_POLL(pcb,ret) do { if ((pcb)->state != SYN_RCVD) { \ - ret = lwip_tcp_event((pcb)->callback_arg, (pcb), LWIP_EVENT_POLL, NULL, 0, ERR_OK); \ - } else { \ - ret = ERR_ARG; } } while(0) -#define TCP_EVENT_ERR(last_state,errf,arg,err) do { if (last_state != SYN_RCVD) { \ - lwip_tcp_event((arg), NULL, LWIP_EVENT_ERR, NULL, 0, (err)); } } while(0) - -#else /* LWIP_EVENT_API */ - -#define TCP_EVENT_ACCEPT(lpcb,pcb,arg,err,ret) \ - do { \ - if((lpcb)->accept != NULL) \ - (ret) = (lpcb)->accept((arg),(pcb),(err)); \ - else (ret) = ERR_ARG; \ - } while (0) - -#define TCP_EVENT_SENT(pcb,space,ret) \ - do { \ - if((pcb)->sent != NULL) \ - (ret) = (pcb)->sent((pcb)->callback_arg,(pcb),(space)); \ - else (ret) = ERR_OK; \ - } while (0) - -#define TCP_EVENT_RECV(pcb,p,err,ret) \ - do { \ - if((pcb)->recv != NULL) { \ - (ret) = (pcb)->recv((pcb)->callback_arg,(pcb),(p),(err));\ - } else { \ - (ret) = tcp_recv_null(NULL, (pcb), (p), (err)); \ - } \ - } while (0) - -#define TCP_EVENT_CLOSED(pcb,ret) \ - do { \ - if(((pcb)->recv != NULL)) { \ - (ret) = (pcb)->recv((pcb)->callback_arg,(pcb),NULL,ERR_OK);\ - } else { \ - (ret) = ERR_OK; \ - } \ - } while (0) - -#define TCP_EVENT_CONNECTED(pcb,err,ret) \ - do { \ - if((pcb)->connected != NULL) \ - (ret) = (pcb)->connected((pcb)->callback_arg,(pcb),(err)); \ - else (ret) = ERR_OK; \ - } while (0) - -#define TCP_EVENT_POLL(pcb,ret) \ - do { \ - if((pcb)->poll != NULL) \ - (ret) = (pcb)->poll((pcb)->callback_arg,(pcb)); \ - else (ret) = ERR_OK; \ - } while (0) - -#define TCP_EVENT_ERR(last_state,errf,arg,err) \ - do { \ - LWIP_UNUSED_ARG(last_state); \ - if((errf) != NULL) \ - (errf)((arg),(err)); \ - } while (0) - -#endif /* LWIP_EVENT_API */ - -/** Enabled extra-check for TCP_OVERSIZE if LWIP_DEBUG is enabled */ -#if TCP_OVERSIZE && defined(LWIP_DEBUG) -#define TCP_OVERSIZE_DBGCHECK 1 -#else -#define TCP_OVERSIZE_DBGCHECK 0 -#endif - -/** Don't generate checksum on copy if CHECKSUM_GEN_TCP is disabled */ -#define TCP_CHECKSUM_ON_COPY (LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_TCP) - -/* This structure represents a TCP segment on the unsent, unacked and ooseq queues */ -struct tcp_seg { - struct tcp_seg *next; /* used when putting segments on a queue */ - struct pbuf *p; /* buffer containing data + TCP header */ - u16_t len; /* the TCP length of this segment */ -#if TCP_OVERSIZE_DBGCHECK - u16_t oversize_left; /* Extra bytes available at the end of the last - pbuf in unsent (used for asserting vs. - tcp_pcb.unsent_oversize only) */ -#endif /* TCP_OVERSIZE_DBGCHECK */ -#if TCP_CHECKSUM_ON_COPY - u16_t chksum; - u8_t chksum_swapped; -#endif /* TCP_CHECKSUM_ON_COPY */ - u8_t flags; -#define TF_SEG_OPTS_MSS (u8_t)0x01U /* Include MSS option. */ -#define TF_SEG_OPTS_TS (u8_t)0x02U /* Include timestamp option. */ -#define TF_SEG_DATA_CHECKSUMMED (u8_t)0x04U /* ALL data (not the header) is - checksummed into 'chksum' */ -#define TF_SEG_OPTS_WND_SCALE (u8_t)0x08U /* Include WND SCALE option */ - struct tcp_hdr *tcphdr; /* the TCP header */ -}; - -#define LWIP_TCP_OPT_EOL 0 -#define LWIP_TCP_OPT_NOP 1 -#define LWIP_TCP_OPT_MSS 2 -#define LWIP_TCP_OPT_WS 3 -#define LWIP_TCP_OPT_TS 8 - -#define LWIP_TCP_OPT_LEN_MSS 4 -#if LWIP_TCP_TIMESTAMPS -#define LWIP_TCP_OPT_LEN_TS 10 -#define LWIP_TCP_OPT_LEN_TS_OUT 12 /* aligned for output (includes NOP padding) */ -#else -#define LWIP_TCP_OPT_LEN_TS_OUT 0 -#endif -#if LWIP_WND_SCALE -#define LWIP_TCP_OPT_LEN_WS 3 -#define LWIP_TCP_OPT_LEN_WS_OUT 4 /* aligned for output (includes NOP padding) */ -#else -#define LWIP_TCP_OPT_LEN_WS_OUT 0 -#endif - -#define LWIP_TCP_OPT_LENGTH(flags) \ - (flags & TF_SEG_OPTS_MSS ? LWIP_TCP_OPT_LEN_MSS : 0) + \ - (flags & TF_SEG_OPTS_TS ? LWIP_TCP_OPT_LEN_TS_OUT : 0) + \ - (flags & TF_SEG_OPTS_WND_SCALE ? LWIP_TCP_OPT_LEN_WS_OUT : 0) - -/** This returns a TCP header option for MSS in an u32_t */ -#define TCP_BUILD_MSS_OPTION(mss) lwip_htonl(0x02040000 | ((mss) & 0xFFFF)) - -#if LWIP_WND_SCALE -#define TCPWNDSIZE_F U32_F -#define TCPWND_MAX 0xFFFFFFFFU -#define TCPWND_CHECK16(x) LWIP_ASSERT("window size > 0xFFFF", (x) <= 0xFFFF) -#define TCPWND_MIN16(x) ((u16_t)LWIP_MIN((x), 0xFFFF)) -#else /* LWIP_WND_SCALE */ -#define TCPWNDSIZE_F U16_F -#define TCPWND_MAX 0xFFFFU -#define TCPWND_CHECK16(x) -#define TCPWND_MIN16(x) x -#endif /* LWIP_WND_SCALE */ - -/* Global variables: */ -extern struct tcp_pcb *tcp_input_pcb; -extern u32_t tcp_ticks; -extern u8_t tcp_active_pcbs_changed; - -/* The TCP PCB lists. */ -union tcp_listen_pcbs_t { /* List of all TCP PCBs in LISTEN state. */ - struct tcp_pcb_listen *listen_pcbs; - struct tcp_pcb *pcbs; -}; -extern struct tcp_pcb *tcp_bound_pcbs; -extern union tcp_listen_pcbs_t tcp_listen_pcbs; -extern struct tcp_pcb *tcp_active_pcbs; /* List of all TCP PCBs that are in a - state in which they accept or send - data. */ -extern struct tcp_pcb *tcp_tw_pcbs; /* List of all TCP PCBs in TIME-WAIT. */ - -#define NUM_TCP_PCB_LISTS_NO_TIME_WAIT 3 -#define NUM_TCP_PCB_LISTS 4 -extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS]; - -/* Axioms about the above lists: - 1) Every TCP PCB that is not CLOSED is in one of the lists. - 2) A PCB is only in one of the lists. - 3) All PCBs in the tcp_listen_pcbs list is in LISTEN state. - 4) All PCBs in the tcp_tw_pcbs list is in TIME-WAIT state. -*/ -/* Define two macros, TCP_REG and TCP_RMV that registers a TCP PCB - with a PCB list or removes a PCB from a list, respectively. */ -#ifndef TCP_DEBUG_PCB_LISTS -#define TCP_DEBUG_PCB_LISTS 0 -#endif -#if TCP_DEBUG_PCB_LISTS -#define TCP_REG(pcbs, npcb) do {\ - struct tcp_pcb *tcp_tmp_pcb; \ - LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %d\n", (npcb), (npcb)->local_port)); \ - for (tcp_tmp_pcb = *(pcbs); \ - tcp_tmp_pcb != NULL; \ - tcp_tmp_pcb = tcp_tmp_pcb->next) { \ - LWIP_ASSERT("TCP_REG: already registered\n", tcp_tmp_pcb != (npcb)); \ - } \ - LWIP_ASSERT("TCP_REG: pcb->state != CLOSED", ((pcbs) == &tcp_bound_pcbs) || ((npcb)->state != CLOSED)); \ - (npcb)->next = *(pcbs); \ - LWIP_ASSERT("TCP_REG: npcb->next != npcb", (npcb)->next != (npcb)); \ - *(pcbs) = (npcb); \ - LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \ - tcp_timer_needed(); \ - } while(0) -#define TCP_RMV(pcbs, npcb) do { \ - struct tcp_pcb *tcp_tmp_pcb; \ - LWIP_ASSERT("TCP_RMV: pcbs != NULL", *(pcbs) != NULL); \ - LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", (npcb), *(pcbs))); \ - if(*(pcbs) == (npcb)) { \ - *(pcbs) = (*pcbs)->next; \ - } else for (tcp_tmp_pcb = *(pcbs); tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \ - if(tcp_tmp_pcb->next == (npcb)) { \ - tcp_tmp_pcb->next = (npcb)->next; \ - break; \ - } \ - } \ - (npcb)->next = NULL; \ - LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \ - LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", (npcb), *(pcbs))); \ - } while(0) - -#else /* LWIP_DEBUG */ - -#define TCP_REG(pcbs, npcb) \ - do { \ - (npcb)->next = *pcbs; \ - *(pcbs) = (npcb); \ - tcp_timer_needed(); \ - } while (0) - -#define TCP_RMV(pcbs, npcb) \ - do { \ - if(*(pcbs) == (npcb)) { \ - (*(pcbs)) = (*pcbs)->next; \ - } \ - else { \ - struct tcp_pcb *tcp_tmp_pcb; \ - for (tcp_tmp_pcb = *pcbs; \ - tcp_tmp_pcb != NULL; \ - tcp_tmp_pcb = tcp_tmp_pcb->next) { \ - if(tcp_tmp_pcb->next == (npcb)) { \ - tcp_tmp_pcb->next = (npcb)->next; \ - break; \ - } \ - } \ - } \ - (npcb)->next = NULL; \ - } while(0) - -#endif /* LWIP_DEBUG */ - -#define TCP_REG_ACTIVE(npcb) \ - do { \ - TCP_REG(&tcp_active_pcbs, npcb); \ - tcp_active_pcbs_changed = 1; \ - } while (0) - -#define TCP_RMV_ACTIVE(npcb) \ - do { \ - TCP_RMV(&tcp_active_pcbs, npcb); \ - tcp_active_pcbs_changed = 1; \ - } while (0) - -#define TCP_PCB_REMOVE_ACTIVE(pcb) \ - do { \ - tcp_pcb_remove(&tcp_active_pcbs, pcb); \ - tcp_active_pcbs_changed = 1; \ - } while (0) - - -/* Internal functions: */ -struct tcp_pcb *tcp_pcb_copy(struct tcp_pcb *pcb); -void tcp_pcb_purge(struct tcp_pcb *pcb); -void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb); - -void tcp_segs_free(struct tcp_seg *seg); -void tcp_seg_free(struct tcp_seg *seg); -struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg); - -#define tcp_ack(pcb) \ - do { \ - if((pcb)->flags & TF_ACK_DELAY) { \ - (pcb)->flags &= ~TF_ACK_DELAY; \ - (pcb)->flags |= TF_ACK_NOW; \ - } \ - else { \ - (pcb)->flags |= TF_ACK_DELAY; \ - } \ - } while (0) - -#define tcp_ack_now(pcb) \ - do { \ - (pcb)->flags |= TF_ACK_NOW; \ - } while (0) - -err_t tcp_send_fin(struct tcp_pcb *pcb); -err_t tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags); - -void tcp_rexmit_seg(struct tcp_pcb *pcb, struct tcp_seg *seg); - -void tcp_rst(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); - -u32_t tcp_next_iss(struct tcp_pcb *pcb); - -err_t tcp_keepalive(struct tcp_pcb *pcb); -err_t tcp_zero_window_probe(struct tcp_pcb *pcb); -void tcp_trigger_input_pcb_close(void); - -#if TCP_CALCULATE_EFF_SEND_MSS -u16_t tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest -#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING - , const ip_addr_t *src -#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ - ); -#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING -#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest, src) -#else /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ -#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest) -#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ -#endif /* TCP_CALCULATE_EFF_SEND_MSS */ - -#if LWIP_CALLBACK_API -err_t tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err); -#endif /* LWIP_CALLBACK_API */ - -#if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG -void tcp_debug_print(struct tcp_hdr *tcphdr); -void tcp_debug_print_flags(u8_t flags); -void tcp_debug_print_state(enum tcp_state s); -void tcp_debug_print_pcbs(void); -s16_t tcp_pcbs_sane(void); -#else -# define tcp_debug_print(tcphdr) -# define tcp_debug_print_flags(flags) -# define tcp_debug_print_state(s) -# define tcp_debug_print_pcbs() -# define tcp_pcbs_sane() 1 -#endif /* TCP_DEBUG */ - -/** External function (implemented in timers.c), called when TCP detects - * that a timer is needed (i.e. active- or time-wait-pcb found). */ -void tcp_timer_needed(void); - -void tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_TCP */ - -#endif /* LWIP_HDR_TCP_PRIV_H */ +/** + * @file + * TCP internal implementations (do not use in application code) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_TCP_PRIV_H +#define LWIP_HDR_TCP_PRIV_H + +#include "lwip/opt.h" + +#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/tcp.h" +#include "lwip/mem.h" +#include "lwip/pbuf.h" +#include "lwip/ip.h" +#include "lwip/icmp.h" +#include "lwip/err.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" +#include "lwip/prot/tcp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Functions for interfacing with TCP: */ + +/* Lower layer interface to TCP: */ +void tcp_init (void); /* Initialize this module. */ +void tcp_tmr (void); /* Must be called every + TCP_TMR_INTERVAL + ms. (Typically 250 ms). */ +/* It is also possible to call these two functions at the right + intervals (instead of calling tcp_tmr()). */ +void tcp_slowtmr (void); +void tcp_fasttmr (void); + +/* Call this from a netif driver (watch out for threading issues!) that has + returned a memory error on transmit and now has free buffers to send more. + This iterates all active pcbs that had an error and tries to call + tcp_output, so use this with care as it might slow down the system. */ +void tcp_txnow (void); + +/* Only used by IP to pass a TCP segment to TCP: */ +void tcp_input (struct pbuf *p, struct netif *inp); +/* Used within the TCP code only: */ +struct tcp_pcb * tcp_alloc (u8_t prio); +void tcp_abandon (struct tcp_pcb *pcb, int reset); +err_t tcp_send_empty_ack(struct tcp_pcb *pcb); +void tcp_rexmit (struct tcp_pcb *pcb); +void tcp_rexmit_rto (struct tcp_pcb *pcb); +void tcp_rexmit_fast (struct tcp_pcb *pcb); +u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb); +err_t tcp_process_refused_data(struct tcp_pcb *pcb); + +/** + * This is the Nagle algorithm: try to combine user data to send as few TCP + * segments as possible. Only send if + * - no previously transmitted data on the connection remains unacknowledged or + * - the TF_NODELAY flag is set (nagle algorithm turned off for this pcb) or + * - the only unsent segment is at least pcb->mss bytes long (or there is more + * than one unsent segment - with lwIP, this can happen although unsent->len < mss) + * - or if we are in fast-retransmit (TF_INFR) + */ +#define tcp_do_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \ + ((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \ + (((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \ + ((tpcb)->unsent->len >= (tpcb)->mss))) || \ + ((tcp_sndbuf(tpcb) == 0) || (tcp_sndqueuelen(tpcb) >= TCP_SND_QUEUELEN)) \ + ) ? 1 : 0) +#define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK) + + +#define TCP_SEQ_LT(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) < 0) +#define TCP_SEQ_LEQ(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) <= 0) +#define TCP_SEQ_GT(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) > 0) +#define TCP_SEQ_GEQ(a,b) ((s32_t)((u32_t)(a) - (u32_t)(b)) >= 0) +/* is b<=a<=c? */ +#if 0 /* see bug #10548 */ +#define TCP_SEQ_BETWEEN(a,b,c) ((c)-(b) >= (a)-(b)) +#endif +#define TCP_SEQ_BETWEEN(a,b,c) (TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c)) + +#ifndef TCP_TMR_INTERVAL +#define TCP_TMR_INTERVAL 250 /* The TCP timer interval in milliseconds. */ +#endif /* TCP_TMR_INTERVAL */ + +#ifndef TCP_FAST_INTERVAL +#define TCP_FAST_INTERVAL TCP_TMR_INTERVAL /* the fine grained timeout in milliseconds */ +#endif /* TCP_FAST_INTERVAL */ + +#ifndef TCP_SLOW_INTERVAL +#define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in milliseconds */ +#endif /* TCP_SLOW_INTERVAL */ + +#define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ +#define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */ + +#define TCP_OOSEQ_TIMEOUT 6U /* x RTO */ + +#ifndef TCP_MSL +#define TCP_MSL 60000UL /* The maximum segment lifetime in milliseconds */ +#endif + +/* Keepalive values, compliant with RFC 1122. Don't change this unless you know what you're doing */ +#ifndef TCP_KEEPIDLE_DEFAULT +#define TCP_KEEPIDLE_DEFAULT 7200000UL /* Default KEEPALIVE timer in milliseconds */ +#endif + +#ifndef TCP_KEEPINTVL_DEFAULT +#define TCP_KEEPINTVL_DEFAULT 75000UL /* Default Time between KEEPALIVE probes in milliseconds */ +#endif + +#ifndef TCP_KEEPCNT_DEFAULT +#define TCP_KEEPCNT_DEFAULT 9U /* Default Counter for KEEPALIVE probes */ +#endif + +#define TCP_MAXIDLE TCP_KEEPCNT_DEFAULT * TCP_KEEPINTVL_DEFAULT /* Maximum KEEPALIVE probe time */ + +#define TCP_TCPLEN(seg) ((seg)->len + (((TCPH_FLAGS((seg)->tcphdr) & (TCP_FIN | TCP_SYN)) != 0) ? 1U : 0U)) + +/** Flags used on input processing, not on pcb->flags +*/ +#define TF_RESET (u8_t)0x08U /* Connection was reset. */ +#define TF_CLOSED (u8_t)0x10U /* Connection was successfully closed. */ +#define TF_GOT_FIN (u8_t)0x20U /* Connection was closed by the remote end. */ + + +#if LWIP_EVENT_API + +#define TCP_EVENT_ACCEPT(lpcb,pcb,arg,err,ret) ret = lwip_tcp_event(arg, (pcb),\ + LWIP_EVENT_ACCEPT, NULL, 0, err) +#define TCP_EVENT_SENT(pcb,space,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ + LWIP_EVENT_SENT, NULL, space, ERR_OK) +#define TCP_EVENT_RECV(pcb,p,err,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ + LWIP_EVENT_RECV, (p), 0, (err)) +#define TCP_EVENT_CLOSED(pcb,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ + LWIP_EVENT_RECV, NULL, 0, ERR_OK) +#define TCP_EVENT_CONNECTED(pcb,err,ret) ret = lwip_tcp_event((pcb)->callback_arg, (pcb),\ + LWIP_EVENT_CONNECTED, NULL, 0, (err)) +#define TCP_EVENT_POLL(pcb,ret) do { if ((pcb)->state != SYN_RCVD) { \ + ret = lwip_tcp_event((pcb)->callback_arg, (pcb), LWIP_EVENT_POLL, NULL, 0, ERR_OK); \ + } else { \ + ret = ERR_ARG; } } while(0) +#define TCP_EVENT_ERR(last_state,errf,arg,err) do { if (last_state != SYN_RCVD) { \ + lwip_tcp_event((arg), NULL, LWIP_EVENT_ERR, NULL, 0, (err)); } } while(0) + +#else /* LWIP_EVENT_API */ + +#define TCP_EVENT_ACCEPT(lpcb,pcb,arg,err,ret) \ + do { \ + if((lpcb)->accept != NULL) \ + (ret) = (lpcb)->accept((arg),(pcb),(err)); \ + else (ret) = ERR_ARG; \ + } while (0) + +#define TCP_EVENT_SENT(pcb,space,ret) \ + do { \ + if((pcb)->sent != NULL) \ + (ret) = (pcb)->sent((pcb)->callback_arg,(pcb),(space)); \ + else (ret) = ERR_OK; \ + } while (0) + +#define TCP_EVENT_RECV(pcb,p,err,ret) \ + do { \ + if((pcb)->recv != NULL) { \ + (ret) = (pcb)->recv((pcb)->callback_arg,(pcb),(p),(err));\ + } else { \ + (ret) = tcp_recv_null(NULL, (pcb), (p), (err)); \ + } \ + } while (0) + +#define TCP_EVENT_CLOSED(pcb,ret) \ + do { \ + if(((pcb)->recv != NULL)) { \ + (ret) = (pcb)->recv((pcb)->callback_arg,(pcb),NULL,ERR_OK);\ + } else { \ + (ret) = ERR_OK; \ + } \ + } while (0) + +#define TCP_EVENT_CONNECTED(pcb,err,ret) \ + do { \ + if((pcb)->connected != NULL) \ + (ret) = (pcb)->connected((pcb)->callback_arg,(pcb),(err)); \ + else (ret) = ERR_OK; \ + } while (0) + +#define TCP_EVENT_POLL(pcb,ret) \ + do { \ + if((pcb)->poll != NULL) \ + (ret) = (pcb)->poll((pcb)->callback_arg,(pcb)); \ + else (ret) = ERR_OK; \ + } while (0) + +#define TCP_EVENT_ERR(last_state,errf,arg,err) \ + do { \ + LWIP_UNUSED_ARG(last_state); \ + if((errf) != NULL) \ + (errf)((arg),(err)); \ + } while (0) + +#endif /* LWIP_EVENT_API */ + +/** Enabled extra-check for TCP_OVERSIZE if LWIP_DEBUG is enabled */ +#if TCP_OVERSIZE && defined(LWIP_DEBUG) +#define TCP_OVERSIZE_DBGCHECK 1 +#else +#define TCP_OVERSIZE_DBGCHECK 0 +#endif + +/** Don't generate checksum on copy if CHECKSUM_GEN_TCP is disabled */ +#define TCP_CHECKSUM_ON_COPY (LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_TCP) + +/* This structure represents a TCP segment on the unsent, unacked and ooseq queues */ +struct tcp_seg { + struct tcp_seg *next; /* used when putting segments on a queue */ + struct pbuf *p; /* buffer containing data + TCP header */ + u16_t len; /* the TCP length of this segment */ +#if TCP_OVERSIZE_DBGCHECK + u16_t oversize_left; /* Extra bytes available at the end of the last + pbuf in unsent (used for asserting vs. + tcp_pcb.unsent_oversize only) */ +#endif /* TCP_OVERSIZE_DBGCHECK */ +#if TCP_CHECKSUM_ON_COPY + u16_t chksum; + u8_t chksum_swapped; +#endif /* TCP_CHECKSUM_ON_COPY */ + u8_t flags; +#define TF_SEG_OPTS_MSS (u8_t)0x01U /* Include MSS option. */ +#define TF_SEG_OPTS_TS (u8_t)0x02U /* Include timestamp option. */ +#define TF_SEG_DATA_CHECKSUMMED (u8_t)0x04U /* ALL data (not the header) is + checksummed into 'chksum' */ +#define TF_SEG_OPTS_WND_SCALE (u8_t)0x08U /* Include WND SCALE option */ + struct tcp_hdr *tcphdr; /* the TCP header */ +}; + +#define LWIP_TCP_OPT_EOL 0 +#define LWIP_TCP_OPT_NOP 1 +#define LWIP_TCP_OPT_MSS 2 +#define LWIP_TCP_OPT_WS 3 +#define LWIP_TCP_OPT_TS 8 + +#define LWIP_TCP_OPT_LEN_MSS 4 +#if LWIP_TCP_TIMESTAMPS +#define LWIP_TCP_OPT_LEN_TS 10 +#define LWIP_TCP_OPT_LEN_TS_OUT 12 /* aligned for output (includes NOP padding) */ +#else +#define LWIP_TCP_OPT_LEN_TS_OUT 0 +#endif +#if LWIP_WND_SCALE +#define LWIP_TCP_OPT_LEN_WS 3 +#define LWIP_TCP_OPT_LEN_WS_OUT 4 /* aligned for output (includes NOP padding) */ +#else +#define LWIP_TCP_OPT_LEN_WS_OUT 0 +#endif + +#define LWIP_TCP_OPT_LENGTH(flags) \ + (flags & TF_SEG_OPTS_MSS ? LWIP_TCP_OPT_LEN_MSS : 0) + \ + (flags & TF_SEG_OPTS_TS ? LWIP_TCP_OPT_LEN_TS_OUT : 0) + \ + (flags & TF_SEG_OPTS_WND_SCALE ? LWIP_TCP_OPT_LEN_WS_OUT : 0) + +/** This returns a TCP header option for MSS in an u32_t */ +#define TCP_BUILD_MSS_OPTION(mss) lwip_htonl(0x02040000 | ((mss) & 0xFFFF)) + +#if LWIP_WND_SCALE +#define TCPWNDSIZE_F U32_F +#define TCPWND_MAX 0xFFFFFFFFU +#define TCPWND_CHECK16(x) LWIP_ASSERT("window size > 0xFFFF", (x) <= 0xFFFF) +#define TCPWND_MIN16(x) ((u16_t)LWIP_MIN((x), 0xFFFF)) +#else /* LWIP_WND_SCALE */ +#define TCPWNDSIZE_F U16_F +#define TCPWND_MAX 0xFFFFU +#define TCPWND_CHECK16(x) +#define TCPWND_MIN16(x) x +#endif /* LWIP_WND_SCALE */ + +/* Global variables: */ +extern struct tcp_pcb *tcp_input_pcb; +extern u32_t tcp_ticks; +extern u8_t tcp_active_pcbs_changed; + +/* The TCP PCB lists. */ +union tcp_listen_pcbs_t { /* List of all TCP PCBs in LISTEN state. */ + struct tcp_pcb_listen *listen_pcbs; + struct tcp_pcb *pcbs; +}; +extern struct tcp_pcb *tcp_bound_pcbs; +extern union tcp_listen_pcbs_t tcp_listen_pcbs; +extern struct tcp_pcb *tcp_active_pcbs; /* List of all TCP PCBs that are in a + state in which they accept or send + data. */ +extern struct tcp_pcb *tcp_tw_pcbs; /* List of all TCP PCBs in TIME-WAIT. */ + +#define NUM_TCP_PCB_LISTS_NO_TIME_WAIT 3 +#define NUM_TCP_PCB_LISTS 4 +extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS]; + +/* Axioms about the above lists: + 1) Every TCP PCB that is not CLOSED is in one of the lists. + 2) A PCB is only in one of the lists. + 3) All PCBs in the tcp_listen_pcbs list is in LISTEN state. + 4) All PCBs in the tcp_tw_pcbs list is in TIME-WAIT state. +*/ +/* Define two macros, TCP_REG and TCP_RMV that registers a TCP PCB + with a PCB list or removes a PCB from a list, respectively. */ +#ifndef TCP_DEBUG_PCB_LISTS +#define TCP_DEBUG_PCB_LISTS 0 +#endif +#if TCP_DEBUG_PCB_LISTS +#define TCP_REG(pcbs, npcb) do {\ + struct tcp_pcb *tcp_tmp_pcb; \ + LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %d\n", (npcb), (npcb)->local_port)); \ + for (tcp_tmp_pcb = *(pcbs); \ + tcp_tmp_pcb != NULL; \ + tcp_tmp_pcb = tcp_tmp_pcb->next) { \ + LWIP_ASSERT("TCP_REG: already registered\n", tcp_tmp_pcb != (npcb)); \ + } \ + LWIP_ASSERT("TCP_REG: pcb->state != CLOSED", ((pcbs) == &tcp_bound_pcbs) || ((npcb)->state != CLOSED)); \ + (npcb)->next = *(pcbs); \ + LWIP_ASSERT("TCP_REG: npcb->next != npcb", (npcb)->next != (npcb)); \ + *(pcbs) = (npcb); \ + LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \ + tcp_timer_needed(); \ + } while(0) +#define TCP_RMV(pcbs, npcb) do { \ + struct tcp_pcb *tcp_tmp_pcb; \ + LWIP_ASSERT("TCP_RMV: pcbs != NULL", *(pcbs) != NULL); \ + LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", (npcb), *(pcbs))); \ + if(*(pcbs) == (npcb)) { \ + *(pcbs) = (*pcbs)->next; \ + } else for (tcp_tmp_pcb = *(pcbs); tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \ + if(tcp_tmp_pcb->next == (npcb)) { \ + tcp_tmp_pcb->next = (npcb)->next; \ + break; \ + } \ + } \ + (npcb)->next = NULL; \ + LWIP_ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \ + LWIP_DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", (npcb), *(pcbs))); \ + } while(0) + +#else /* LWIP_DEBUG */ + +#define TCP_REG(pcbs, npcb) \ + do { \ + (npcb)->next = *pcbs; \ + *(pcbs) = (npcb); \ + tcp_timer_needed(); \ + } while (0) + +#define TCP_RMV(pcbs, npcb) \ + do { \ + if(*(pcbs) == (npcb)) { \ + (*(pcbs)) = (*pcbs)->next; \ + } \ + else { \ + struct tcp_pcb *tcp_tmp_pcb; \ + for (tcp_tmp_pcb = *pcbs; \ + tcp_tmp_pcb != NULL; \ + tcp_tmp_pcb = tcp_tmp_pcb->next) { \ + if(tcp_tmp_pcb->next == (npcb)) { \ + tcp_tmp_pcb->next = (npcb)->next; \ + break; \ + } \ + } \ + } \ + (npcb)->next = NULL; \ + } while(0) + +#endif /* LWIP_DEBUG */ + +#define TCP_REG_ACTIVE(npcb) \ + do { \ + TCP_REG(&tcp_active_pcbs, npcb); \ + tcp_active_pcbs_changed = 1; \ + } while (0) + +#define TCP_RMV_ACTIVE(npcb) \ + do { \ + TCP_RMV(&tcp_active_pcbs, npcb); \ + tcp_active_pcbs_changed = 1; \ + } while (0) + +#define TCP_PCB_REMOVE_ACTIVE(pcb) \ + do { \ + tcp_pcb_remove(&tcp_active_pcbs, pcb); \ + tcp_active_pcbs_changed = 1; \ + } while (0) + + +/* Internal functions: */ +struct tcp_pcb *tcp_pcb_copy(struct tcp_pcb *pcb); +void tcp_pcb_purge(struct tcp_pcb *pcb); +void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb); + +void tcp_segs_free(struct tcp_seg *seg); +void tcp_seg_free(struct tcp_seg *seg); +struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg); + +#define tcp_ack(pcb) \ + do { \ + if((pcb)->flags & TF_ACK_DELAY) { \ + (pcb)->flags &= ~TF_ACK_DELAY; \ + (pcb)->flags |= TF_ACK_NOW; \ + } \ + else { \ + (pcb)->flags |= TF_ACK_DELAY; \ + } \ + } while (0) + +#define tcp_ack_now(pcb) \ + do { \ + (pcb)->flags |= TF_ACK_NOW; \ + } while (0) + +err_t tcp_send_fin(struct tcp_pcb *pcb); +err_t tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags); + +void tcp_rexmit_seg(struct tcp_pcb *pcb, struct tcp_seg *seg); + +void tcp_rst(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); + +u32_t tcp_next_iss(struct tcp_pcb *pcb); + +err_t tcp_keepalive(struct tcp_pcb *pcb); +err_t tcp_zero_window_probe(struct tcp_pcb *pcb); +void tcp_trigger_input_pcb_close(void); + +#if TCP_CALCULATE_EFF_SEND_MSS +u16_t tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest +#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING + , const ip_addr_t *src +#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ + ); +#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING +#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest, src) +#else /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ +#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest) +#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ + +#if LWIP_CALLBACK_API +err_t tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err); +#endif /* LWIP_CALLBACK_API */ + +#if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG +void tcp_debug_print(struct tcp_hdr *tcphdr); +void tcp_debug_print_flags(u8_t flags); +void tcp_debug_print_state(enum tcp_state s); +void tcp_debug_print_pcbs(void); +s16_t tcp_pcbs_sane(void); +#else +# define tcp_debug_print(tcphdr) +# define tcp_debug_print_flags(flags) +# define tcp_debug_print_state(s) +# define tcp_debug_print_pcbs() +# define tcp_pcbs_sane() 1 +#endif /* TCP_DEBUG */ + +/** External function (implemented in timers.c), called when TCP detects + * that a timer is needed (i.e. active- or time-wait-pcb found). */ +void tcp_timer_needed(void); + +void tcp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_TCP */ + +#endif /* LWIP_HDR_TCP_PRIV_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcpip_priv.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcpip_priv.h index 630efb1..41d078a 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcpip_priv.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/priv/tcpip_priv.h @@ -1,160 +1,160 @@ -/** - * @file - * TCPIP API internal implementations (do not use in application code) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_TCPIP_PRIV_H -#define LWIP_HDR_TCPIP_PRIV_H - -#include "lwip/opt.h" - -#if !NO_SYS /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/tcpip.h" -#include "lwip/sys.h" -#include "lwip/timeouts.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct pbuf; -struct netif; - -#if LWIP_MPU_COMPATIBLE -#define API_VAR_REF(name) (*(name)) -#define API_VAR_DECLARE(type, name) type * name -#define API_VAR_ALLOC(type, pool, name, errorval) do { \ - name = (type *)memp_malloc(pool); \ - if (name == NULL) { \ - return errorval; \ - } \ - } while(0) -#define API_VAR_ALLOC_POOL(type, pool, name, errorval) do { \ - name = (type *)LWIP_MEMPOOL_ALLOC(pool); \ - if (name == NULL) { \ - return errorval; \ - } \ - } while(0) -#define API_VAR_FREE(pool, name) memp_free(pool, name) -#define API_VAR_FREE_POOL(pool, name) LWIP_MEMPOOL_FREE(pool, name) -#define API_EXPR_REF(expr) (&(expr)) -#if LWIP_NETCONN_SEM_PER_THREAD -#define API_EXPR_REF_SEM(expr) (expr) -#else -#define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr) -#endif -#define API_EXPR_DEREF(expr) expr -#define API_MSG_M_DEF(m) m -#define API_MSG_M_DEF_C(t, m) t m -#else /* LWIP_MPU_COMPATIBLE */ -#define API_VAR_REF(name) name -#define API_VAR_DECLARE(type, name) type name -#define API_VAR_ALLOC(type, pool, name, errorval) -#define API_VAR_ALLOC_POOL(type, pool, name, errorval) -#define API_VAR_FREE(pool, name) -#define API_VAR_FREE_POOL(pool, name) -#define API_EXPR_REF(expr) expr -#define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr) -#define API_EXPR_DEREF(expr) (*(expr)) -#define API_MSG_M_DEF(m) *m -#define API_MSG_M_DEF_C(t, m) const t * m -#endif /* LWIP_MPU_COMPATIBLE */ - -err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem); - -struct tcpip_api_call_data -{ -#if !LWIP_TCPIP_CORE_LOCKING - err_t err; -#if !LWIP_NETCONN_SEM_PER_THREAD - sys_sem_t sem; -#endif /* LWIP_NETCONN_SEM_PER_THREAD */ -#else /* !LWIP_TCPIP_CORE_LOCKING */ - u8_t dummy; /* avoid empty struct :-( */ -#endif /* !LWIP_TCPIP_CORE_LOCKING */ -}; -typedef err_t (*tcpip_api_call_fn)(struct tcpip_api_call_data* call); -err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call); - -enum tcpip_msg_type { - TCPIP_MSG_API, - TCPIP_MSG_API_CALL, - TCPIP_MSG_INPKT, -#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS - TCPIP_MSG_TIMEOUT, - TCPIP_MSG_UNTIMEOUT, -#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ - TCPIP_MSG_CALLBACK, - TCPIP_MSG_CALLBACK_STATIC -}; - -struct tcpip_msg { - enum tcpip_msg_type type; - union { - struct { - tcpip_callback_fn function; - void* msg; - } api_msg; - struct { - tcpip_api_call_fn function; - struct tcpip_api_call_data *arg; - sys_sem_t *sem; - } api_call; - struct { - struct pbuf *p; - struct netif *netif; - netif_input_fn input_fn; - } inp; - struct { - tcpip_callback_fn function; - void *ctx; - } cb; -#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS - struct { - u32_t msecs; - sys_timeout_handler h; - void *arg; - } tmo; -#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ - } msg; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* !NO_SYS */ - -#endif /* LWIP_HDR_TCPIP_PRIV_H */ +/** + * @file + * TCPIP API internal implementations (do not use in application code) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_TCPIP_PRIV_H +#define LWIP_HDR_TCPIP_PRIV_H + +#include "lwip/opt.h" + +#if !NO_SYS /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/tcpip.h" +#include "lwip/sys.h" +#include "lwip/timeouts.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct pbuf; +struct netif; + +#if LWIP_MPU_COMPATIBLE +#define API_VAR_REF(name) (*(name)) +#define API_VAR_DECLARE(type, name) type * name +#define API_VAR_ALLOC(type, pool, name, errorval) do { \ + name = (type *)memp_malloc(pool); \ + if (name == NULL) { \ + return errorval; \ + } \ + } while(0) +#define API_VAR_ALLOC_POOL(type, pool, name, errorval) do { \ + name = (type *)LWIP_MEMPOOL_ALLOC(pool); \ + if (name == NULL) { \ + return errorval; \ + } \ + } while(0) +#define API_VAR_FREE(pool, name) memp_free(pool, name) +#define API_VAR_FREE_POOL(pool, name) LWIP_MEMPOOL_FREE(pool, name) +#define API_EXPR_REF(expr) (&(expr)) +#if LWIP_NETCONN_SEM_PER_THREAD +#define API_EXPR_REF_SEM(expr) (expr) +#else +#define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr) +#endif +#define API_EXPR_DEREF(expr) expr +#define API_MSG_M_DEF(m) m +#define API_MSG_M_DEF_C(t, m) t m +#else /* LWIP_MPU_COMPATIBLE */ +#define API_VAR_REF(name) name +#define API_VAR_DECLARE(type, name) type name +#define API_VAR_ALLOC(type, pool, name, errorval) +#define API_VAR_ALLOC_POOL(type, pool, name, errorval) +#define API_VAR_FREE(pool, name) +#define API_VAR_FREE_POOL(pool, name) +#define API_EXPR_REF(expr) expr +#define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr) +#define API_EXPR_DEREF(expr) (*(expr)) +#define API_MSG_M_DEF(m) *m +#define API_MSG_M_DEF_C(t, m) const t * m +#endif /* LWIP_MPU_COMPATIBLE */ + +err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem); + +struct tcpip_api_call_data +{ +#if !LWIP_TCPIP_CORE_LOCKING + err_t err; +#if !LWIP_NETCONN_SEM_PER_THREAD + sys_sem_t sem; +#endif /* LWIP_NETCONN_SEM_PER_THREAD */ +#else /* !LWIP_TCPIP_CORE_LOCKING */ + u8_t dummy; /* avoid empty struct :-( */ +#endif /* !LWIP_TCPIP_CORE_LOCKING */ +}; +typedef err_t (*tcpip_api_call_fn)(struct tcpip_api_call_data* call); +err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call); + +enum tcpip_msg_type { + TCPIP_MSG_API, + TCPIP_MSG_API_CALL, + TCPIP_MSG_INPKT, +#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS + TCPIP_MSG_TIMEOUT, + TCPIP_MSG_UNTIMEOUT, +#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ + TCPIP_MSG_CALLBACK, + TCPIP_MSG_CALLBACK_STATIC +}; + +struct tcpip_msg { + enum tcpip_msg_type type; + union { + struct { + tcpip_callback_fn function; + void* msg; + } api_msg; + struct { + tcpip_api_call_fn function; + struct tcpip_api_call_data *arg; + sys_sem_t *sem; + } api_call; + struct { + struct pbuf *p; + struct netif *netif; + netif_input_fn input_fn; + } inp; + struct { + tcpip_callback_fn function; + void *ctx; + } cb; +#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS + struct { + u32_t msecs; + sys_timeout_handler h; + void *arg; + } tmo; +#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ + } msg; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* !NO_SYS */ + +#endif /* LWIP_HDR_TCPIP_PRIV_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/autoip.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/autoip.h index fd3af8a..3fe1532 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/autoip.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/autoip.h @@ -1,78 +1,78 @@ -/** - * @file - * AutoIP protocol definitions - */ - -/* - * - * Copyright (c) 2007 Dominik Spies - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * Author: Dominik Spies - * - * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform - * with RFC 3927. - * - */ - -#ifndef LWIP_HDR_PROT_AUTOIP_H -#define LWIP_HDR_PROT_AUTOIP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* 169.254.0.0 */ -#define AUTOIP_NET 0xA9FE0000 -/* 169.254.1.0 */ -#define AUTOIP_RANGE_START (AUTOIP_NET | 0x0100) -/* 169.254.254.255 */ -#define AUTOIP_RANGE_END (AUTOIP_NET | 0xFEFF) - -/* RFC 3927 Constants */ -#define PROBE_WAIT 1 /* second (initial random delay) */ -#define PROBE_MIN 1 /* second (minimum delay till repeated probe) */ -#define PROBE_MAX 2 /* seconds (maximum delay till repeated probe) */ -#define PROBE_NUM 3 /* (number of probe packets) */ -#define ANNOUNCE_NUM 2 /* (number of announcement packets) */ -#define ANNOUNCE_INTERVAL 2 /* seconds (time between announcement packets) */ -#define ANNOUNCE_WAIT 2 /* seconds (delay before announcing) */ -#define MAX_CONFLICTS 10 /* (max conflicts before rate limiting) */ -#define RATE_LIMIT_INTERVAL 60 /* seconds (delay between successive attempts) */ -#define DEFEND_INTERVAL 10 /* seconds (min. wait between defensive ARPs) */ - -/* AutoIP client states */ -typedef enum { - AUTOIP_STATE_OFF = 0, - AUTOIP_STATE_PROBING = 1, - AUTOIP_STATE_ANNOUNCING = 2, - AUTOIP_STATE_BOUND = 3 -} autoip_state_enum_t; - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_AUTOIP_H */ +/** + * @file + * AutoIP protocol definitions + */ + +/* + * + * Copyright (c) 2007 Dominik Spies + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * Author: Dominik Spies + * + * This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform + * with RFC 3927. + * + */ + +#ifndef LWIP_HDR_PROT_AUTOIP_H +#define LWIP_HDR_PROT_AUTOIP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* 169.254.0.0 */ +#define AUTOIP_NET 0xA9FE0000 +/* 169.254.1.0 */ +#define AUTOIP_RANGE_START (AUTOIP_NET | 0x0100) +/* 169.254.254.255 */ +#define AUTOIP_RANGE_END (AUTOIP_NET | 0xFEFF) + +/* RFC 3927 Constants */ +#define PROBE_WAIT 1 /* second (initial random delay) */ +#define PROBE_MIN 1 /* second (minimum delay till repeated probe) */ +#define PROBE_MAX 2 /* seconds (maximum delay till repeated probe) */ +#define PROBE_NUM 3 /* (number of probe packets) */ +#define ANNOUNCE_NUM 2 /* (number of announcement packets) */ +#define ANNOUNCE_INTERVAL 2 /* seconds (time between announcement packets) */ +#define ANNOUNCE_WAIT 2 /* seconds (delay before announcing) */ +#define MAX_CONFLICTS 10 /* (max conflicts before rate limiting) */ +#define RATE_LIMIT_INTERVAL 60 /* seconds (delay between successive attempts) */ +#define DEFEND_INTERVAL 10 /* seconds (min. wait between defensive ARPs) */ + +/* AutoIP client states */ +typedef enum { + AUTOIP_STATE_OFF = 0, + AUTOIP_STATE_PROBING = 1, + AUTOIP_STATE_ANNOUNCING = 2, + AUTOIP_STATE_BOUND = 3 +} autoip_state_enum_t; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_AUTOIP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dhcp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dhcp.h index 112953c..30f87b9 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dhcp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dhcp.h @@ -1,183 +1,183 @@ -/** - * @file - * DHCP protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Leon Woestenberg - * Copyright (c) 2001-2004 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Leon Woestenberg - * - */ -#ifndef LWIP_HDR_PROT_DHCP_H -#define LWIP_HDR_PROT_DHCP_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define DHCP_CLIENT_PORT 68 -#define DHCP_SERVER_PORT 67 - - - /* DHCP message item offsets and length */ -#define DHCP_CHADDR_LEN 16U -#define DHCP_SNAME_OFS 44U -#define DHCP_SNAME_LEN 64U -#define DHCP_FILE_OFS 108U -#define DHCP_FILE_LEN 128U -#define DHCP_MSG_LEN 236U -#define DHCP_OPTIONS_OFS (DHCP_MSG_LEN + 4U) /* 4 byte: cookie */ - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -/** minimum set of fields of any DHCP message */ -struct dhcp_msg -{ - PACK_STRUCT_FLD_8(u8_t op); - PACK_STRUCT_FLD_8(u8_t htype); - PACK_STRUCT_FLD_8(u8_t hlen); - PACK_STRUCT_FLD_8(u8_t hops); - PACK_STRUCT_FIELD(u32_t xid); - PACK_STRUCT_FIELD(u16_t secs); - PACK_STRUCT_FIELD(u16_t flags); - PACK_STRUCT_FLD_S(ip4_addr_p_t ciaddr); - PACK_STRUCT_FLD_S(ip4_addr_p_t yiaddr); - PACK_STRUCT_FLD_S(ip4_addr_p_t siaddr); - PACK_STRUCT_FLD_S(ip4_addr_p_t giaddr); - PACK_STRUCT_FLD_8(u8_t chaddr[DHCP_CHADDR_LEN]); - PACK_STRUCT_FLD_8(u8_t sname[DHCP_SNAME_LEN]); - PACK_STRUCT_FLD_8(u8_t file[DHCP_FILE_LEN]); - PACK_STRUCT_FIELD(u32_t cookie); -#define DHCP_MIN_OPTIONS_LEN 68U -/** make sure user does not configure this too small */ -#if ((defined(DHCP_OPTIONS_LEN)) && (DHCP_OPTIONS_LEN < DHCP_MIN_OPTIONS_LEN)) -# undef DHCP_OPTIONS_LEN -#endif -/** allow this to be configured in lwipopts.h, but not too small */ -#if (!defined(DHCP_OPTIONS_LEN)) -/** set this to be sufficient for your options in outgoing DHCP msgs */ -# define DHCP_OPTIONS_LEN DHCP_MIN_OPTIONS_LEN -#endif - PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - - -/* DHCP client states */ -typedef enum { - DHCP_STATE_OFF = 0, - DHCP_STATE_REQUESTING = 1, - DHCP_STATE_INIT = 2, - DHCP_STATE_REBOOTING = 3, - DHCP_STATE_REBINDING = 4, - DHCP_STATE_RENEWING = 5, - DHCP_STATE_SELECTING = 6, - DHCP_STATE_INFORMING = 7, - DHCP_STATE_CHECKING = 8, - DHCP_STATE_PERMANENT = 9, /* not yet implemented */ - DHCP_STATE_BOUND = 10, - DHCP_STATE_RELEASING = 11, /* not yet implemented */ - DHCP_STATE_BACKING_OFF = 12 -} dhcp_state_enum_t; - -/* DHCP op codes */ -#define DHCP_BOOTREQUEST 1 -#define DHCP_BOOTREPLY 2 - -/* DHCP message types */ -#define DHCP_DISCOVER 1 -#define DHCP_OFFER 2 -#define DHCP_REQUEST 3 -#define DHCP_DECLINE 4 -#define DHCP_ACK 5 -#define DHCP_NAK 6 -#define DHCP_RELEASE 7 -#define DHCP_INFORM 8 - -/** DHCP hardware type, currently only ethernet is supported */ -#define DHCP_HTYPE_ETH 1 - -#define DHCP_MAGIC_COOKIE 0x63825363UL - -/* This is a list of options for BOOTP and DHCP, see RFC 2132 for descriptions */ - -/* BootP options */ -#define DHCP_OPTION_PAD 0 -#define DHCP_OPTION_SUBNET_MASK 1 /* RFC 2132 3.3 */ -#define DHCP_OPTION_ROUTER 3 -#define DHCP_OPTION_DNS_SERVER 6 -#define DHCP_OPTION_HOSTNAME 12 -#define DHCP_OPTION_IP_TTL 23 -#define DHCP_OPTION_MTU 26 -#define DHCP_OPTION_BROADCAST 28 -#define DHCP_OPTION_TCP_TTL 37 -#define DHCP_OPTION_NTP 42 -#define DHCP_OPTION_END 255 - -/* DHCP options */ -#define DHCP_OPTION_REQUESTED_IP 50 /* RFC 2132 9.1, requested IP address */ -#define DHCP_OPTION_LEASE_TIME 51 /* RFC 2132 9.2, time in seconds, in 4 bytes */ -#define DHCP_OPTION_OVERLOAD 52 /* RFC2132 9.3, use file and/or sname field for options */ - -#define DHCP_OPTION_MESSAGE_TYPE 53 /* RFC 2132 9.6, important for DHCP */ -#define DHCP_OPTION_MESSAGE_TYPE_LEN 1 - -#define DHCP_OPTION_SERVER_ID 54 /* RFC 2132 9.7, server IP address */ -#define DHCP_OPTION_PARAMETER_REQUEST_LIST 55 /* RFC 2132 9.8, requested option types */ - -#define DHCP_OPTION_MAX_MSG_SIZE 57 /* RFC 2132 9.10, message size accepted >= 576 */ -#define DHCP_OPTION_MAX_MSG_SIZE_LEN 2 - -#define DHCP_OPTION_T1 58 /* T1 renewal time */ -#define DHCP_OPTION_T2 59 /* T2 rebinding time */ -#define DHCP_OPTION_US 60 -#define DHCP_OPTION_CLIENT_ID 61 -#define DHCP_OPTION_TFTP_SERVERNAME 66 -#define DHCP_OPTION_BOOTFILE 67 - -/* possible combinations of overloading the file and sname fields with options */ -#define DHCP_OVERLOAD_NONE 0 -#define DHCP_OVERLOAD_FILE 1 -#define DHCP_OVERLOAD_SNAME 2 -#define DHCP_OVERLOAD_SNAME_FILE 3 - - -#ifdef __cplusplus -} -#endif - -#endif /*LWIP_HDR_PROT_DHCP_H*/ +/** + * @file + * DHCP protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Leon Woestenberg + * Copyright (c) 2001-2004 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Leon Woestenberg + * + */ +#ifndef LWIP_HDR_PROT_DHCP_H +#define LWIP_HDR_PROT_DHCP_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define DHCP_CLIENT_PORT 68 +#define DHCP_SERVER_PORT 67 + + + /* DHCP message item offsets and length */ +#define DHCP_CHADDR_LEN 16U +#define DHCP_SNAME_OFS 44U +#define DHCP_SNAME_LEN 64U +#define DHCP_FILE_OFS 108U +#define DHCP_FILE_LEN 128U +#define DHCP_MSG_LEN 236U +#define DHCP_OPTIONS_OFS (DHCP_MSG_LEN + 4U) /* 4 byte: cookie */ + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/** minimum set of fields of any DHCP message */ +struct dhcp_msg +{ + PACK_STRUCT_FLD_8(u8_t op); + PACK_STRUCT_FLD_8(u8_t htype); + PACK_STRUCT_FLD_8(u8_t hlen); + PACK_STRUCT_FLD_8(u8_t hops); + PACK_STRUCT_FIELD(u32_t xid); + PACK_STRUCT_FIELD(u16_t secs); + PACK_STRUCT_FIELD(u16_t flags); + PACK_STRUCT_FLD_S(ip4_addr_p_t ciaddr); + PACK_STRUCT_FLD_S(ip4_addr_p_t yiaddr); + PACK_STRUCT_FLD_S(ip4_addr_p_t siaddr); + PACK_STRUCT_FLD_S(ip4_addr_p_t giaddr); + PACK_STRUCT_FLD_8(u8_t chaddr[DHCP_CHADDR_LEN]); + PACK_STRUCT_FLD_8(u8_t sname[DHCP_SNAME_LEN]); + PACK_STRUCT_FLD_8(u8_t file[DHCP_FILE_LEN]); + PACK_STRUCT_FIELD(u32_t cookie); +#define DHCP_MIN_OPTIONS_LEN 68U +/** make sure user does not configure this too small */ +#if ((defined(DHCP_OPTIONS_LEN)) && (DHCP_OPTIONS_LEN < DHCP_MIN_OPTIONS_LEN)) +# undef DHCP_OPTIONS_LEN +#endif +/** allow this to be configured in lwipopts.h, but not too small */ +#if (!defined(DHCP_OPTIONS_LEN)) +/** set this to be sufficient for your options in outgoing DHCP msgs */ +# define DHCP_OPTIONS_LEN DHCP_MIN_OPTIONS_LEN +#endif + PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + + +/* DHCP client states */ +typedef enum { + DHCP_STATE_OFF = 0, + DHCP_STATE_REQUESTING = 1, + DHCP_STATE_INIT = 2, + DHCP_STATE_REBOOTING = 3, + DHCP_STATE_REBINDING = 4, + DHCP_STATE_RENEWING = 5, + DHCP_STATE_SELECTING = 6, + DHCP_STATE_INFORMING = 7, + DHCP_STATE_CHECKING = 8, + DHCP_STATE_PERMANENT = 9, /* not yet implemented */ + DHCP_STATE_BOUND = 10, + DHCP_STATE_RELEASING = 11, /* not yet implemented */ + DHCP_STATE_BACKING_OFF = 12 +} dhcp_state_enum_t; + +/* DHCP op codes */ +#define DHCP_BOOTREQUEST 1 +#define DHCP_BOOTREPLY 2 + +/* DHCP message types */ +#define DHCP_DISCOVER 1 +#define DHCP_OFFER 2 +#define DHCP_REQUEST 3 +#define DHCP_DECLINE 4 +#define DHCP_ACK 5 +#define DHCP_NAK 6 +#define DHCP_RELEASE 7 +#define DHCP_INFORM 8 + +/** DHCP hardware type, currently only ethernet is supported */ +#define DHCP_HTYPE_ETH 1 + +#define DHCP_MAGIC_COOKIE 0x63825363UL + +/* This is a list of options for BOOTP and DHCP, see RFC 2132 for descriptions */ + +/* BootP options */ +#define DHCP_OPTION_PAD 0 +#define DHCP_OPTION_SUBNET_MASK 1 /* RFC 2132 3.3 */ +#define DHCP_OPTION_ROUTER 3 +#define DHCP_OPTION_DNS_SERVER 6 +#define DHCP_OPTION_HOSTNAME 12 +#define DHCP_OPTION_IP_TTL 23 +#define DHCP_OPTION_MTU 26 +#define DHCP_OPTION_BROADCAST 28 +#define DHCP_OPTION_TCP_TTL 37 +#define DHCP_OPTION_NTP 42 +#define DHCP_OPTION_END 255 + +/* DHCP options */ +#define DHCP_OPTION_REQUESTED_IP 50 /* RFC 2132 9.1, requested IP address */ +#define DHCP_OPTION_LEASE_TIME 51 /* RFC 2132 9.2, time in seconds, in 4 bytes */ +#define DHCP_OPTION_OVERLOAD 52 /* RFC2132 9.3, use file and/or sname field for options */ + +#define DHCP_OPTION_MESSAGE_TYPE 53 /* RFC 2132 9.6, important for DHCP */ +#define DHCP_OPTION_MESSAGE_TYPE_LEN 1 + +#define DHCP_OPTION_SERVER_ID 54 /* RFC 2132 9.7, server IP address */ +#define DHCP_OPTION_PARAMETER_REQUEST_LIST 55 /* RFC 2132 9.8, requested option types */ + +#define DHCP_OPTION_MAX_MSG_SIZE 57 /* RFC 2132 9.10, message size accepted >= 576 */ +#define DHCP_OPTION_MAX_MSG_SIZE_LEN 2 + +#define DHCP_OPTION_T1 58 /* T1 renewal time */ +#define DHCP_OPTION_T2 59 /* T2 rebinding time */ +#define DHCP_OPTION_US 60 +#define DHCP_OPTION_CLIENT_ID 61 +#define DHCP_OPTION_TFTP_SERVERNAME 66 +#define DHCP_OPTION_BOOTFILE 67 + +/* possible combinations of overloading the file and sname fields with options */ +#define DHCP_OVERLOAD_NONE 0 +#define DHCP_OVERLOAD_FILE 1 +#define DHCP_OVERLOAD_SNAME 2 +#define DHCP_OVERLOAD_SNAME_FILE 3 + + +#ifdef __cplusplus +} +#endif + +#endif /*LWIP_HDR_PROT_DHCP_H*/ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dns.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dns.h index 94782d6..022a32c 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dns.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/dns.h @@ -1,140 +1,140 @@ -/** - * @file - * DNS - host name to IP address resolver. - */ - -/* - * Port to lwIP from uIP - * by Jim Pettinato April 2007 - * - * security fixes and more by Simon Goldschmidt - * - * uIP version Copyright (c) 2002-2003, Adam Dunkels. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef LWIP_HDR_PROT_DNS_H -#define LWIP_HDR_PROT_DNS_H - -#include "lwip/arch.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** DNS server port address */ -#ifndef DNS_SERVER_PORT -#define DNS_SERVER_PORT 53 -#endif - -/* DNS field TYPE used for "Resource Records" */ -#define DNS_RRTYPE_A 1 /* a host address */ -#define DNS_RRTYPE_NS 2 /* an authoritative name server */ -#define DNS_RRTYPE_MD 3 /* a mail destination (Obsolete - use MX) */ -#define DNS_RRTYPE_MF 4 /* a mail forwarder (Obsolete - use MX) */ -#define DNS_RRTYPE_CNAME 5 /* the canonical name for an alias */ -#define DNS_RRTYPE_SOA 6 /* marks the start of a zone of authority */ -#define DNS_RRTYPE_MB 7 /* a mailbox domain name (EXPERIMENTAL) */ -#define DNS_RRTYPE_MG 8 /* a mail group member (EXPERIMENTAL) */ -#define DNS_RRTYPE_MR 9 /* a mail rename domain name (EXPERIMENTAL) */ -#define DNS_RRTYPE_NULL 10 /* a null RR (EXPERIMENTAL) */ -#define DNS_RRTYPE_WKS 11 /* a well known service description */ -#define DNS_RRTYPE_PTR 12 /* a domain name pointer */ -#define DNS_RRTYPE_HINFO 13 /* host information */ -#define DNS_RRTYPE_MINFO 14 /* mailbox or mail list information */ -#define DNS_RRTYPE_MX 15 /* mail exchange */ -#define DNS_RRTYPE_TXT 16 /* text strings */ -#define DNS_RRTYPE_AAAA 28 /* IPv6 address */ -#define DNS_RRTYPE_SRV 33 /* service location */ -#define DNS_RRTYPE_ANY 255 /* any type */ - -/* DNS field CLASS used for "Resource Records" */ -#define DNS_RRCLASS_IN 1 /* the Internet */ -#define DNS_RRCLASS_CS 2 /* the CSNET class (Obsolete - used only for examples in some obsolete RFCs) */ -#define DNS_RRCLASS_CH 3 /* the CHAOS class */ -#define DNS_RRCLASS_HS 4 /* Hesiod [Dyer 87] */ -#define DNS_RRCLASS_ANY 255 /* any class */ -#define DNS_RRCLASS_FLUSH 0x800 /* Flush bit */ - -/* DNS protocol flags */ -#define DNS_FLAG1_RESPONSE 0x80 -#define DNS_FLAG1_OPCODE_STATUS 0x10 -#define DNS_FLAG1_OPCODE_INVERSE 0x08 -#define DNS_FLAG1_OPCODE_STANDARD 0x00 -#define DNS_FLAG1_AUTHORATIVE 0x04 -#define DNS_FLAG1_TRUNC 0x02 -#define DNS_FLAG1_RD 0x01 -#define DNS_FLAG2_RA 0x80 -#define DNS_FLAG2_ERR_MASK 0x0f -#define DNS_FLAG2_ERR_NONE 0x00 -#define DNS_FLAG2_ERR_NAME 0x03 - -#define DNS_HDR_GET_OPCODE(hdr) ((((hdr)->flags1) >> 3) & 0xF) - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -/** DNS message header */ -struct dns_hdr { - PACK_STRUCT_FIELD(u16_t id); - PACK_STRUCT_FLD_8(u8_t flags1); - PACK_STRUCT_FLD_8(u8_t flags2); - PACK_STRUCT_FIELD(u16_t numquestions); - PACK_STRUCT_FIELD(u16_t numanswers); - PACK_STRUCT_FIELD(u16_t numauthrr); - PACK_STRUCT_FIELD(u16_t numextrarr); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif -#define SIZEOF_DNS_HDR 12 - - -/* Multicast DNS definitions */ - -/** UDP port for multicast DNS queries */ -#ifndef DNS_MQUERY_PORT -#define DNS_MQUERY_PORT 5353 -#endif - -/* IPv4 group for multicast DNS queries: 224.0.0.251 */ -#ifndef DNS_MQUERY_IPV4_GROUP_INIT -#define DNS_MQUERY_IPV4_GROUP_INIT IPADDR4_INIT_BYTES(224,0,0,251) -#endif - -/* IPv6 group for multicast DNS queries: FF02::FB */ -#ifndef DNS_MQUERY_IPV6_GROUP_INIT -#define DNS_MQUERY_IPV6_GROUP_INIT IPADDR6_INIT_HOST(0xFF020000,0,0,0xFB) -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_DNS_H */ +/** + * @file + * DNS - host name to IP address resolver. + */ + +/* + * Port to lwIP from uIP + * by Jim Pettinato April 2007 + * + * security fixes and more by Simon Goldschmidt + * + * uIP version Copyright (c) 2002-2003, Adam Dunkels. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef LWIP_HDR_PROT_DNS_H +#define LWIP_HDR_PROT_DNS_H + +#include "lwip/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** DNS server port address */ +#ifndef DNS_SERVER_PORT +#define DNS_SERVER_PORT 53 +#endif + +/* DNS field TYPE used for "Resource Records" */ +#define DNS_RRTYPE_A 1 /* a host address */ +#define DNS_RRTYPE_NS 2 /* an authoritative name server */ +#define DNS_RRTYPE_MD 3 /* a mail destination (Obsolete - use MX) */ +#define DNS_RRTYPE_MF 4 /* a mail forwarder (Obsolete - use MX) */ +#define DNS_RRTYPE_CNAME 5 /* the canonical name for an alias */ +#define DNS_RRTYPE_SOA 6 /* marks the start of a zone of authority */ +#define DNS_RRTYPE_MB 7 /* a mailbox domain name (EXPERIMENTAL) */ +#define DNS_RRTYPE_MG 8 /* a mail group member (EXPERIMENTAL) */ +#define DNS_RRTYPE_MR 9 /* a mail rename domain name (EXPERIMENTAL) */ +#define DNS_RRTYPE_NULL 10 /* a null RR (EXPERIMENTAL) */ +#define DNS_RRTYPE_WKS 11 /* a well known service description */ +#define DNS_RRTYPE_PTR 12 /* a domain name pointer */ +#define DNS_RRTYPE_HINFO 13 /* host information */ +#define DNS_RRTYPE_MINFO 14 /* mailbox or mail list information */ +#define DNS_RRTYPE_MX 15 /* mail exchange */ +#define DNS_RRTYPE_TXT 16 /* text strings */ +#define DNS_RRTYPE_AAAA 28 /* IPv6 address */ +#define DNS_RRTYPE_SRV 33 /* service location */ +#define DNS_RRTYPE_ANY 255 /* any type */ + +/* DNS field CLASS used for "Resource Records" */ +#define DNS_RRCLASS_IN 1 /* the Internet */ +#define DNS_RRCLASS_CS 2 /* the CSNET class (Obsolete - used only for examples in some obsolete RFCs) */ +#define DNS_RRCLASS_CH 3 /* the CHAOS class */ +#define DNS_RRCLASS_HS 4 /* Hesiod [Dyer 87] */ +#define DNS_RRCLASS_ANY 255 /* any class */ +#define DNS_RRCLASS_FLUSH 0x800 /* Flush bit */ + +/* DNS protocol flags */ +#define DNS_FLAG1_RESPONSE 0x80 +#define DNS_FLAG1_OPCODE_STATUS 0x10 +#define DNS_FLAG1_OPCODE_INVERSE 0x08 +#define DNS_FLAG1_OPCODE_STANDARD 0x00 +#define DNS_FLAG1_AUTHORATIVE 0x04 +#define DNS_FLAG1_TRUNC 0x02 +#define DNS_FLAG1_RD 0x01 +#define DNS_FLAG2_RA 0x80 +#define DNS_FLAG2_ERR_MASK 0x0f +#define DNS_FLAG2_ERR_NONE 0x00 +#define DNS_FLAG2_ERR_NAME 0x03 + +#define DNS_HDR_GET_OPCODE(hdr) ((((hdr)->flags1) >> 3) & 0xF) + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/** DNS message header */ +struct dns_hdr { + PACK_STRUCT_FIELD(u16_t id); + PACK_STRUCT_FLD_8(u8_t flags1); + PACK_STRUCT_FLD_8(u8_t flags2); + PACK_STRUCT_FIELD(u16_t numquestions); + PACK_STRUCT_FIELD(u16_t numanswers); + PACK_STRUCT_FIELD(u16_t numauthrr); + PACK_STRUCT_FIELD(u16_t numextrarr); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +#define SIZEOF_DNS_HDR 12 + + +/* Multicast DNS definitions */ + +/** UDP port for multicast DNS queries */ +#ifndef DNS_MQUERY_PORT +#define DNS_MQUERY_PORT 5353 +#endif + +/* IPv4 group for multicast DNS queries: 224.0.0.251 */ +#ifndef DNS_MQUERY_IPV4_GROUP_INIT +#define DNS_MQUERY_IPV4_GROUP_INIT IPADDR4_INIT_BYTES(224,0,0,251) +#endif + +/* IPv6 group for multicast DNS queries: FF02::FB */ +#ifndef DNS_MQUERY_IPV6_GROUP_INIT +#define DNS_MQUERY_IPV6_GROUP_INIT IPADDR6_INIT_HOST(0xFF020000,0,0,0xFB) +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_DNS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/etharp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/etharp.h index ec78305..175e6bc 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/etharp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/etharp.h @@ -1,91 +1,91 @@ -/** - * @file - * ARP protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_ETHARP_H -#define LWIP_HDR_PROT_ETHARP_H - -#include "lwip/arch.h" -#include "lwip/prot/ethernet.h" -#include "lwip/ip4_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef ETHARP_HWADDR_LEN -#define ETHARP_HWADDR_LEN ETH_HWADDR_LEN -#endif - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -/** the ARP message, see RFC 826 ("Packet format") */ -struct etharp_hdr { - PACK_STRUCT_FIELD(u16_t hwtype); - PACK_STRUCT_FIELD(u16_t proto); - PACK_STRUCT_FLD_8(u8_t hwlen); - PACK_STRUCT_FLD_8(u8_t protolen); - PACK_STRUCT_FIELD(u16_t opcode); - PACK_STRUCT_FLD_S(struct eth_addr shwaddr); - PACK_STRUCT_FLD_S(struct ip4_addr2 sipaddr); - PACK_STRUCT_FLD_S(struct eth_addr dhwaddr); - PACK_STRUCT_FLD_S(struct ip4_addr2 dipaddr); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#define SIZEOF_ETHARP_HDR 28 - -/* ARP hwtype values */ -enum etharp_hwtype { - HWTYPE_ETHERNET = 1 - /* others not used */ -}; - -/* ARP message types (opcodes) */ -enum etharp_opcode { - ARP_REQUEST = 1, - ARP_REPLY = 2 -}; - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_ETHARP_H */ +/** + * @file + * ARP protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_ETHARP_H +#define LWIP_HDR_PROT_ETHARP_H + +#include "lwip/arch.h" +#include "lwip/prot/ethernet.h" +#include "lwip/ip4_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef ETHARP_HWADDR_LEN +#define ETHARP_HWADDR_LEN ETH_HWADDR_LEN +#endif + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/** the ARP message, see RFC 826 ("Packet format") */ +struct etharp_hdr { + PACK_STRUCT_FIELD(u16_t hwtype); + PACK_STRUCT_FIELD(u16_t proto); + PACK_STRUCT_FLD_8(u8_t hwlen); + PACK_STRUCT_FLD_8(u8_t protolen); + PACK_STRUCT_FIELD(u16_t opcode); + PACK_STRUCT_FLD_S(struct eth_addr shwaddr); + PACK_STRUCT_FLD_S(struct ip4_addr2 sipaddr); + PACK_STRUCT_FLD_S(struct eth_addr dhwaddr); + PACK_STRUCT_FLD_S(struct ip4_addr2 dipaddr); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#define SIZEOF_ETHARP_HDR 28 + +/* ARP hwtype values */ +enum etharp_hwtype { + HWTYPE_ETHERNET = 1 + /* others not used */ +}; + +/* ARP message types (opcodes) */ +enum etharp_opcode { + ARP_REQUEST = 1, + ARP_REPLY = 2 +}; + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_ETHARP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ethernet.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ethernet.h index e4baa29..33dbe33 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ethernet.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ethernet.h @@ -1,170 +1,170 @@ -/** - * @file - * Ethernet protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_ETHERNET_H -#define LWIP_HDR_PROT_ETHERNET_H - -#include "lwip/arch.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef ETH_HWADDR_LEN -#ifdef ETHARP_HWADDR_LEN -#define ETH_HWADDR_LEN ETHARP_HWADDR_LEN /* compatibility mode */ -#else -#define ETH_HWADDR_LEN 6 -#endif -#endif - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct eth_addr { - PACK_STRUCT_FLD_8(u8_t addr[ETH_HWADDR_LEN]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -/** Ethernet header */ -struct eth_hdr { -#if ETH_PAD_SIZE - PACK_STRUCT_FLD_8(u8_t padding[ETH_PAD_SIZE]); -#endif - PACK_STRUCT_FLD_S(struct eth_addr dest); - PACK_STRUCT_FLD_S(struct eth_addr src); - PACK_STRUCT_FIELD(u16_t type); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#define SIZEOF_ETH_HDR (14 + ETH_PAD_SIZE) - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -/** VLAN header inserted between ethernet header and payload - * if 'type' in ethernet header is ETHTYPE_VLAN. - * See IEEE802.Q */ -struct eth_vlan_hdr { - PACK_STRUCT_FIELD(u16_t prio_vid); - PACK_STRUCT_FIELD(u16_t tpid); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#define SIZEOF_VLAN_HDR 4 -#define VLAN_ID(vlan_hdr) (lwip_htons((vlan_hdr)->prio_vid) & 0xFFF) - -/** - * @ingroup ethernet - * A list of often ethtypes (although lwIP does not use all of them): */ -enum eth_type { - /** Internet protocol v4 */ - ETHTYPE_IP = 0x0800U, - /** Address resolution protocol */ - ETHTYPE_ARP = 0x0806U, - /** Wake on lan */ - ETHTYPE_WOL = 0x0842U, - /** RARP */ - ETHTYPE_RARP = 0x8035U, - /** Virtual local area network */ - ETHTYPE_VLAN = 0x8100U, - /** Internet protocol v6 */ - ETHTYPE_IPV6 = 0x86DDU, - /** PPP Over Ethernet Discovery Stage */ - ETHTYPE_PPPOEDISC = 0x8863U, - /** PPP Over Ethernet Session Stage */ - ETHTYPE_PPPOE = 0x8864U, - /** Jumbo Frames */ - ETHTYPE_JUMBO = 0x8870U, - /** Process field network */ - ETHTYPE_PROFINET = 0x8892U, - /** Ethernet for control automation technology */ - ETHTYPE_ETHERCAT = 0x88A4U, - /** Link layer discovery protocol */ - ETHTYPE_LLDP = 0x88CCU, - /** Serial real-time communication system */ - ETHTYPE_SERCOS = 0x88CDU, - /** Media redundancy protocol */ - ETHTYPE_MRP = 0x88E3U, - /** Precision time protocol */ - ETHTYPE_PTP = 0x88F7U, - /** Q-in-Q, 802.1ad */ - ETHTYPE_QINQ = 0x9100U -}; - -/** The 24-bit IANA IPv4-multicast OUI is 01-00-5e: */ -#define LL_IP4_MULTICAST_ADDR_0 0x01 -#define LL_IP4_MULTICAST_ADDR_1 0x00 -#define LL_IP4_MULTICAST_ADDR_2 0x5e - -/** IPv6 multicast uses this prefix */ -#define LL_IP6_MULTICAST_ADDR_0 0x33 -#define LL_IP6_MULTICAST_ADDR_1 0x33 - -/** MEMCPY-like macro to copy to/from struct eth_addr's that are local variables - * or known to be 32-bit aligned within the protocol header. */ -#ifndef ETHADDR32_COPY -#define ETHADDR32_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) -#endif - -/** MEMCPY-like macro to copy to/from struct eth_addr's that are no local - * variables and known to be 16-bit aligned within the protocol header. */ -#ifndef ETHADDR16_COPY -#define ETHADDR16_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) -#endif - -#define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_ETHERNET_H */ +/** + * @file + * Ethernet protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_ETHERNET_H +#define LWIP_HDR_PROT_ETHERNET_H + +#include "lwip/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef ETH_HWADDR_LEN +#ifdef ETHARP_HWADDR_LEN +#define ETH_HWADDR_LEN ETHARP_HWADDR_LEN /* compatibility mode */ +#else +#define ETH_HWADDR_LEN 6 +#endif +#endif + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct eth_addr { + PACK_STRUCT_FLD_8(u8_t addr[ETH_HWADDR_LEN]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/** Ethernet header */ +struct eth_hdr { +#if ETH_PAD_SIZE + PACK_STRUCT_FLD_8(u8_t padding[ETH_PAD_SIZE]); +#endif + PACK_STRUCT_FLD_S(struct eth_addr dest); + PACK_STRUCT_FLD_S(struct eth_addr src); + PACK_STRUCT_FIELD(u16_t type); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#define SIZEOF_ETH_HDR (14 + ETH_PAD_SIZE) + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/** VLAN header inserted between ethernet header and payload + * if 'type' in ethernet header is ETHTYPE_VLAN. + * See IEEE802.Q */ +struct eth_vlan_hdr { + PACK_STRUCT_FIELD(u16_t prio_vid); + PACK_STRUCT_FIELD(u16_t tpid); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#define SIZEOF_VLAN_HDR 4 +#define VLAN_ID(vlan_hdr) (lwip_htons((vlan_hdr)->prio_vid) & 0xFFF) + +/** + * @ingroup ethernet + * A list of often ethtypes (although lwIP does not use all of them): */ +enum eth_type { + /** Internet protocol v4 */ + ETHTYPE_IP = 0x0800U, + /** Address resolution protocol */ + ETHTYPE_ARP = 0x0806U, + /** Wake on lan */ + ETHTYPE_WOL = 0x0842U, + /** RARP */ + ETHTYPE_RARP = 0x8035U, + /** Virtual local area network */ + ETHTYPE_VLAN = 0x8100U, + /** Internet protocol v6 */ + ETHTYPE_IPV6 = 0x86DDU, + /** PPP Over Ethernet Discovery Stage */ + ETHTYPE_PPPOEDISC = 0x8863U, + /** PPP Over Ethernet Session Stage */ + ETHTYPE_PPPOE = 0x8864U, + /** Jumbo Frames */ + ETHTYPE_JUMBO = 0x8870U, + /** Process field network */ + ETHTYPE_PROFINET = 0x8892U, + /** Ethernet for control automation technology */ + ETHTYPE_ETHERCAT = 0x88A4U, + /** Link layer discovery protocol */ + ETHTYPE_LLDP = 0x88CCU, + /** Serial real-time communication system */ + ETHTYPE_SERCOS = 0x88CDU, + /** Media redundancy protocol */ + ETHTYPE_MRP = 0x88E3U, + /** Precision time protocol */ + ETHTYPE_PTP = 0x88F7U, + /** Q-in-Q, 802.1ad */ + ETHTYPE_QINQ = 0x9100U +}; + +/** The 24-bit IANA IPv4-multicast OUI is 01-00-5e: */ +#define LL_IP4_MULTICAST_ADDR_0 0x01 +#define LL_IP4_MULTICAST_ADDR_1 0x00 +#define LL_IP4_MULTICAST_ADDR_2 0x5e + +/** IPv6 multicast uses this prefix */ +#define LL_IP6_MULTICAST_ADDR_0 0x33 +#define LL_IP6_MULTICAST_ADDR_1 0x33 + +/** MEMCPY-like macro to copy to/from struct eth_addr's that are local variables + * or known to be 32-bit aligned within the protocol header. */ +#ifndef ETHADDR32_COPY +#define ETHADDR32_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) +#endif + +/** MEMCPY-like macro to copy to/from struct eth_addr's that are no local + * variables and known to be 16-bit aligned within the protocol header. */ +#ifndef ETHADDR16_COPY +#define ETHADDR16_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) +#endif + +#define eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_ETHERNET_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp.h index 7d19385..d8183fd 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp.h @@ -1,91 +1,91 @@ -/** - * @file - * ICMP protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_ICMP_H -#define LWIP_HDR_PROT_ICMP_H - -#include "lwip/arch.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ICMP_ER 0 /* echo reply */ -#define ICMP_DUR 3 /* destination unreachable */ -#define ICMP_SQ 4 /* source quench */ -#define ICMP_RD 5 /* redirect */ -#define ICMP_ECHO 8 /* echo */ -#define ICMP_TE 11 /* time exceeded */ -#define ICMP_PP 12 /* parameter problem */ -#define ICMP_TS 13 /* timestamp */ -#define ICMP_TSR 14 /* timestamp reply */ -#define ICMP_IRQ 15 /* information request */ -#define ICMP_IR 16 /* information reply */ -#define ICMP_AM 17 /* address mask request */ -#define ICMP_AMR 18 /* address mask reply */ - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -/** This is the standard ICMP header only that the u32_t data - * is split to two u16_t like ICMP echo needs it. - * This header is also used for other ICMP types that do not - * use the data part. - */ -PACK_STRUCT_BEGIN -struct icmp_echo_hdr { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u16_t id); - PACK_STRUCT_FIELD(u16_t seqno); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* Compatibility defines, old versions used to combine type and code to an u16_t */ -#define ICMPH_TYPE(hdr) ((hdr)->type) -#define ICMPH_CODE(hdr) ((hdr)->code) -#define ICMPH_TYPE_SET(hdr, t) ((hdr)->type = (t)) -#define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c)) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_ICMP_H */ +/** + * @file + * ICMP protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_ICMP_H +#define LWIP_HDR_PROT_ICMP_H + +#include "lwip/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ICMP_ER 0 /* echo reply */ +#define ICMP_DUR 3 /* destination unreachable */ +#define ICMP_SQ 4 /* source quench */ +#define ICMP_RD 5 /* redirect */ +#define ICMP_ECHO 8 /* echo */ +#define ICMP_TE 11 /* time exceeded */ +#define ICMP_PP 12 /* parameter problem */ +#define ICMP_TS 13 /* timestamp */ +#define ICMP_TSR 14 /* timestamp reply */ +#define ICMP_IRQ 15 /* information request */ +#define ICMP_IR 16 /* information reply */ +#define ICMP_AM 17 /* address mask request */ +#define ICMP_AMR 18 /* address mask reply */ + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +/** This is the standard ICMP header only that the u32_t data + * is split to two u16_t like ICMP echo needs it. + * This header is also used for other ICMP types that do not + * use the data part. + */ +PACK_STRUCT_BEGIN +struct icmp_echo_hdr { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u16_t id); + PACK_STRUCT_FIELD(u16_t seqno); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* Compatibility defines, old versions used to combine type and code to an u16_t */ +#define ICMPH_TYPE(hdr) ((hdr)->type) +#define ICMPH_CODE(hdr) ((hdr)->code) +#define ICMPH_TYPE_SET(hdr, t) ((hdr)->type = (t)) +#define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c)) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_ICMP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp6.h index 3461120..b1c6d56 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/icmp6.h @@ -1,170 +1,170 @@ -/** - * @file - * ICMP6 protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_ICMP6_H -#define LWIP_HDR_PROT_ICMP6_H - -#include "lwip/arch.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** ICMP type */ -enum icmp6_type { - /** Destination unreachable */ - ICMP6_TYPE_DUR = 1, - /** Packet too big */ - ICMP6_TYPE_PTB = 2, - /** Time exceeded */ - ICMP6_TYPE_TE = 3, - /** Parameter problem */ - ICMP6_TYPE_PP = 4, - /** Private experimentation */ - ICMP6_TYPE_PE1 = 100, - /** Private experimentation */ - ICMP6_TYPE_PE2 = 101, - /** Reserved for expansion of error messages */ - ICMP6_TYPE_RSV_ERR = 127, - - /** Echo request */ - ICMP6_TYPE_EREQ = 128, - /** Echo reply */ - ICMP6_TYPE_EREP = 129, - /** Multicast listener query */ - ICMP6_TYPE_MLQ = 130, - /** Multicast listener report */ - ICMP6_TYPE_MLR = 131, - /** Multicast listener done */ - ICMP6_TYPE_MLD = 132, - /** Router solicitation */ - ICMP6_TYPE_RS = 133, - /** Router advertisement */ - ICMP6_TYPE_RA = 134, - /** Neighbor solicitation */ - ICMP6_TYPE_NS = 135, - /** Neighbor advertisement */ - ICMP6_TYPE_NA = 136, - /** Redirect */ - ICMP6_TYPE_RD = 137, - /** Multicast router advertisement */ - ICMP6_TYPE_MRA = 151, - /** Multicast router solicitation */ - ICMP6_TYPE_MRS = 152, - /** Multicast router termination */ - ICMP6_TYPE_MRT = 153, - /** Private experimentation */ - ICMP6_TYPE_PE3 = 200, - /** Private experimentation */ - ICMP6_TYPE_PE4 = 201, - /** Reserved for expansion of informational messages */ - ICMP6_TYPE_RSV_INF = 255 -}; - -/** ICMP destination unreachable codes */ -enum icmp6_dur_code { - /** No route to destination */ - ICMP6_DUR_NO_ROUTE = 0, - /** Communication with destination administratively prohibited */ - ICMP6_DUR_PROHIBITED = 1, - /** Beyond scope of source address */ - ICMP6_DUR_SCOPE = 2, - /** Address unreachable */ - ICMP6_DUR_ADDRESS = 3, - /** Port unreachable */ - ICMP6_DUR_PORT = 4, - /** Source address failed ingress/egress policy */ - ICMP6_DUR_POLICY = 5, - /** Reject route to destination */ - ICMP6_DUR_REJECT_ROUTE = 6 -}; - -/** ICMP time exceeded codes */ -enum icmp6_te_code { - /** Hop limit exceeded in transit */ - ICMP6_TE_HL = 0, - /** Fragment reassembly time exceeded */ - ICMP6_TE_FRAG = 1 -}; - -/** ICMP parameter code */ -enum icmp6_pp_code { - /** Erroneous header field encountered */ - ICMP6_PP_FIELD = 0, - /** Unrecognized next header type encountered */ - ICMP6_PP_HEADER = 1, - /** Unrecognized IPv6 option encountered */ - ICMP6_PP_OPTION = 2 -}; - -/** This is the standard ICMP6 header. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct icmp6_hdr { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u32_t data); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** This is the ICMP6 header adapted for echo req/resp. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct icmp6_echo_hdr { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u16_t id); - PACK_STRUCT_FIELD(u16_t seqno); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_ICMP6_H */ +/** + * @file + * ICMP6 protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_ICMP6_H +#define LWIP_HDR_PROT_ICMP6_H + +#include "lwip/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** ICMP type */ +enum icmp6_type { + /** Destination unreachable */ + ICMP6_TYPE_DUR = 1, + /** Packet too big */ + ICMP6_TYPE_PTB = 2, + /** Time exceeded */ + ICMP6_TYPE_TE = 3, + /** Parameter problem */ + ICMP6_TYPE_PP = 4, + /** Private experimentation */ + ICMP6_TYPE_PE1 = 100, + /** Private experimentation */ + ICMP6_TYPE_PE2 = 101, + /** Reserved for expansion of error messages */ + ICMP6_TYPE_RSV_ERR = 127, + + /** Echo request */ + ICMP6_TYPE_EREQ = 128, + /** Echo reply */ + ICMP6_TYPE_EREP = 129, + /** Multicast listener query */ + ICMP6_TYPE_MLQ = 130, + /** Multicast listener report */ + ICMP6_TYPE_MLR = 131, + /** Multicast listener done */ + ICMP6_TYPE_MLD = 132, + /** Router solicitation */ + ICMP6_TYPE_RS = 133, + /** Router advertisement */ + ICMP6_TYPE_RA = 134, + /** Neighbor solicitation */ + ICMP6_TYPE_NS = 135, + /** Neighbor advertisement */ + ICMP6_TYPE_NA = 136, + /** Redirect */ + ICMP6_TYPE_RD = 137, + /** Multicast router advertisement */ + ICMP6_TYPE_MRA = 151, + /** Multicast router solicitation */ + ICMP6_TYPE_MRS = 152, + /** Multicast router termination */ + ICMP6_TYPE_MRT = 153, + /** Private experimentation */ + ICMP6_TYPE_PE3 = 200, + /** Private experimentation */ + ICMP6_TYPE_PE4 = 201, + /** Reserved for expansion of informational messages */ + ICMP6_TYPE_RSV_INF = 255 +}; + +/** ICMP destination unreachable codes */ +enum icmp6_dur_code { + /** No route to destination */ + ICMP6_DUR_NO_ROUTE = 0, + /** Communication with destination administratively prohibited */ + ICMP6_DUR_PROHIBITED = 1, + /** Beyond scope of source address */ + ICMP6_DUR_SCOPE = 2, + /** Address unreachable */ + ICMP6_DUR_ADDRESS = 3, + /** Port unreachable */ + ICMP6_DUR_PORT = 4, + /** Source address failed ingress/egress policy */ + ICMP6_DUR_POLICY = 5, + /** Reject route to destination */ + ICMP6_DUR_REJECT_ROUTE = 6 +}; + +/** ICMP time exceeded codes */ +enum icmp6_te_code { + /** Hop limit exceeded in transit */ + ICMP6_TE_HL = 0, + /** Fragment reassembly time exceeded */ + ICMP6_TE_FRAG = 1 +}; + +/** ICMP parameter code */ +enum icmp6_pp_code { + /** Erroneous header field encountered */ + ICMP6_PP_FIELD = 0, + /** Unrecognized next header type encountered */ + ICMP6_PP_HEADER = 1, + /** Unrecognized IPv6 option encountered */ + ICMP6_PP_OPTION = 2 +}; + +/** This is the standard ICMP6 header. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct icmp6_hdr { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u32_t data); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** This is the ICMP6 header adapted for echo req/resp. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct icmp6_echo_hdr { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u16_t id); + PACK_STRUCT_FIELD(u16_t seqno); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_ICMP6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/igmp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/igmp.h index d60cb31..73bc27c 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/igmp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/igmp.h @@ -1,90 +1,90 @@ -/** - * @file - * IGMP protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_IGMP_H -#define LWIP_HDR_PROT_IGMP_H - -#include "lwip/arch.h" -#include "lwip/ip4_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * IGMP constants - */ -#define IGMP_TTL 1 -#define IGMP_MINLEN 8 -#define ROUTER_ALERT 0x9404U -#define ROUTER_ALERTLEN 4 - -/* - * IGMP message types, including version number. - */ -#define IGMP_MEMB_QUERY 0x11 /* Membership query */ -#define IGMP_V1_MEMB_REPORT 0x12 /* Ver. 1 membership report */ -#define IGMP_V2_MEMB_REPORT 0x16 /* Ver. 2 membership report */ -#define IGMP_LEAVE_GROUP 0x17 /* Leave-group message */ - -/* Group membership states */ -#define IGMP_GROUP_NON_MEMBER 0 -#define IGMP_GROUP_DELAYING_MEMBER 1 -#define IGMP_GROUP_IDLE_MEMBER 2 - -/** - * IGMP packet format. - */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct igmp_msg { - PACK_STRUCT_FLD_8(u8_t igmp_msgtype); - PACK_STRUCT_FLD_8(u8_t igmp_maxresp); - PACK_STRUCT_FIELD(u16_t igmp_checksum); - PACK_STRUCT_FLD_S(ip4_addr_p_t igmp_group_address); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_IGMP_H */ +/** + * @file + * IGMP protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_IGMP_H +#define LWIP_HDR_PROT_IGMP_H + +#include "lwip/arch.h" +#include "lwip/ip4_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * IGMP constants + */ +#define IGMP_TTL 1 +#define IGMP_MINLEN 8 +#define ROUTER_ALERT 0x9404U +#define ROUTER_ALERTLEN 4 + +/* + * IGMP message types, including version number. + */ +#define IGMP_MEMB_QUERY 0x11 /* Membership query */ +#define IGMP_V1_MEMB_REPORT 0x12 /* Ver. 1 membership report */ +#define IGMP_V2_MEMB_REPORT 0x16 /* Ver. 2 membership report */ +#define IGMP_LEAVE_GROUP 0x17 /* Leave-group message */ + +/* Group membership states */ +#define IGMP_GROUP_NON_MEMBER 0 +#define IGMP_GROUP_DELAYING_MEMBER 1 +#define IGMP_GROUP_IDLE_MEMBER 2 + +/** + * IGMP packet format. + */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct igmp_msg { + PACK_STRUCT_FLD_8(u8_t igmp_msgtype); + PACK_STRUCT_FLD_8(u8_t igmp_maxresp); + PACK_STRUCT_FIELD(u16_t igmp_checksum); + PACK_STRUCT_FLD_S(ip4_addr_p_t igmp_group_address); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_IGMP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip.h index bbfae36..077c93b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip.h @@ -1,51 +1,51 @@ -/** - * @file - * IP protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_IP_H -#define LWIP_HDR_PROT_IP_H - -#include "lwip/arch.h" - -#define IP_PROTO_ICMP 1 -#define IP_PROTO_IGMP 2 -#define IP_PROTO_UDP 17 -#define IP_PROTO_UDPLITE 136 -#define IP_PROTO_TCP 6 - -/** This operates on a void* by loading the first byte */ -#define IP_HDR_GET_VERSION(ptr) ((*(u8_t*)(ptr)) >> 4) - -#endif /* LWIP_HDR_PROT_IP_H */ +/** + * @file + * IP protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_IP_H +#define LWIP_HDR_PROT_IP_H + +#include "lwip/arch.h" + +#define IP_PROTO_ICMP 1 +#define IP_PROTO_IGMP 2 +#define IP_PROTO_UDP 17 +#define IP_PROTO_UDPLITE 136 +#define IP_PROTO_TCP 6 + +/** This operates on a void* by loading the first byte */ +#define IP_HDR_GET_VERSION(ptr) ((*(u8_t*)(ptr)) >> 4) + +#endif /* LWIP_HDR_PROT_IP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip4.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip4.h index bd442c6..e791a06 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip4.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip4.h @@ -1,127 +1,127 @@ -/** - * @file - * IPv4 protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_IP4_H -#define LWIP_HDR_PROT_IP4_H - -#include "lwip/arch.h" -#include "lwip/ip4_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** This is the packed version of ip4_addr_t, - used in network headers that are itself packed */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip4_addr_packed { - PACK_STRUCT_FIELD(u32_t addr); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -typedef struct ip4_addr_packed ip4_addr_p_t; - -/* Size of the IPv4 header. Same as 'sizeof(struct ip_hdr)'. */ -#define IP_HLEN 20 - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -/* The IPv4 header */ -struct ip_hdr { - /* version / header length */ - PACK_STRUCT_FLD_8(u8_t _v_hl); - /* type of service */ - PACK_STRUCT_FLD_8(u8_t _tos); - /* total length */ - PACK_STRUCT_FIELD(u16_t _len); - /* identification */ - PACK_STRUCT_FIELD(u16_t _id); - /* fragment offset field */ - PACK_STRUCT_FIELD(u16_t _offset); -#define IP_RF 0x8000U /* reserved fragment flag */ -#define IP_DF 0x4000U /* don't fragment flag */ -#define IP_MF 0x2000U /* more fragments flag */ -#define IP_OFFMASK 0x1fffU /* mask for fragmenting bits */ - /* time to live */ - PACK_STRUCT_FLD_8(u8_t _ttl); - /* protocol*/ - PACK_STRUCT_FLD_8(u8_t _proto); - /* checksum */ - PACK_STRUCT_FIELD(u16_t _chksum); - /* source and destination IP addresses */ - PACK_STRUCT_FLD_S(ip4_addr_p_t src); - PACK_STRUCT_FLD_S(ip4_addr_p_t dest); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* Macros to get struct ip_hdr fields: */ -#define IPH_V(hdr) ((hdr)->_v_hl >> 4) -#define IPH_HL(hdr) ((hdr)->_v_hl & 0x0f) -#define IPH_TOS(hdr) ((hdr)->_tos) -#define IPH_LEN(hdr) ((hdr)->_len) -#define IPH_ID(hdr) ((hdr)->_id) -#define IPH_OFFSET(hdr) ((hdr)->_offset) -#define IPH_TTL(hdr) ((hdr)->_ttl) -#define IPH_PROTO(hdr) ((hdr)->_proto) -#define IPH_CHKSUM(hdr) ((hdr)->_chksum) - -/* Macros to set struct ip_hdr fields: */ -#define IPH_VHL_SET(hdr, v, hl) (hdr)->_v_hl = (u8_t)((((v) << 4) | (hl))) -#define IPH_TOS_SET(hdr, tos) (hdr)->_tos = (tos) -#define IPH_LEN_SET(hdr, len) (hdr)->_len = (len) -#define IPH_ID_SET(hdr, id) (hdr)->_id = (id) -#define IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off) -#define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl = (u8_t)(ttl) -#define IPH_PROTO_SET(hdr, proto) (hdr)->_proto = (u8_t)(proto) -#define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum) - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_IP4_H */ +/** + * @file + * IPv4 protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_IP4_H +#define LWIP_HDR_PROT_IP4_H + +#include "lwip/arch.h" +#include "lwip/ip4_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** This is the packed version of ip4_addr_t, + used in network headers that are itself packed */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip4_addr_packed { + PACK_STRUCT_FIELD(u32_t addr); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +typedef struct ip4_addr_packed ip4_addr_p_t; + +/* Size of the IPv4 header. Same as 'sizeof(struct ip_hdr)'. */ +#define IP_HLEN 20 + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +/* The IPv4 header */ +struct ip_hdr { + /* version / header length */ + PACK_STRUCT_FLD_8(u8_t _v_hl); + /* type of service */ + PACK_STRUCT_FLD_8(u8_t _tos); + /* total length */ + PACK_STRUCT_FIELD(u16_t _len); + /* identification */ + PACK_STRUCT_FIELD(u16_t _id); + /* fragment offset field */ + PACK_STRUCT_FIELD(u16_t _offset); +#define IP_RF 0x8000U /* reserved fragment flag */ +#define IP_DF 0x4000U /* don't fragment flag */ +#define IP_MF 0x2000U /* more fragments flag */ +#define IP_OFFMASK 0x1fffU /* mask for fragmenting bits */ + /* time to live */ + PACK_STRUCT_FLD_8(u8_t _ttl); + /* protocol*/ + PACK_STRUCT_FLD_8(u8_t _proto); + /* checksum */ + PACK_STRUCT_FIELD(u16_t _chksum); + /* source and destination IP addresses */ + PACK_STRUCT_FLD_S(ip4_addr_p_t src); + PACK_STRUCT_FLD_S(ip4_addr_p_t dest); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* Macros to get struct ip_hdr fields: */ +#define IPH_V(hdr) ((hdr)->_v_hl >> 4) +#define IPH_HL(hdr) ((hdr)->_v_hl & 0x0f) +#define IPH_TOS(hdr) ((hdr)->_tos) +#define IPH_LEN(hdr) ((hdr)->_len) +#define IPH_ID(hdr) ((hdr)->_id) +#define IPH_OFFSET(hdr) ((hdr)->_offset) +#define IPH_TTL(hdr) ((hdr)->_ttl) +#define IPH_PROTO(hdr) ((hdr)->_proto) +#define IPH_CHKSUM(hdr) ((hdr)->_chksum) + +/* Macros to set struct ip_hdr fields: */ +#define IPH_VHL_SET(hdr, v, hl) (hdr)->_v_hl = (u8_t)((((v) << 4) | (hl))) +#define IPH_TOS_SET(hdr, tos) (hdr)->_tos = (tos) +#define IPH_LEN_SET(hdr, len) (hdr)->_len = (len) +#define IPH_ID_SET(hdr, id) (hdr)->_id = (id) +#define IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off) +#define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl = (u8_t)(ttl) +#define IPH_PROTO_SET(hdr, proto) (hdr)->_proto = (u8_t)(proto) +#define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum) + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_IP4_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip6.h index 6e1e263..066bdb2 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/ip6.h @@ -1,169 +1,169 @@ -/** - * @file - * IPv6 protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_IP6_H -#define LWIP_HDR_PROT_IP6_H - -#include "lwip/arch.h" -#include "lwip/ip6_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** This is the packed version of ip6_addr_t, - used in network headers that are itself packed */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip6_addr_packed { - PACK_STRUCT_FIELD(u32_t addr[4]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif -typedef struct ip6_addr_packed ip6_addr_p_t; - -#define IP6_HLEN 40 - -#define IP6_NEXTH_HOPBYHOP 0 -#define IP6_NEXTH_TCP 6 -#define IP6_NEXTH_UDP 17 -#define IP6_NEXTH_ENCAPS 41 -#define IP6_NEXTH_ROUTING 43 -#define IP6_NEXTH_FRAGMENT 44 -#define IP6_NEXTH_ICMP6 58 -#define IP6_NEXTH_NONE 59 -#define IP6_NEXTH_DESTOPTS 60 -#define IP6_NEXTH_UDPLITE 136 - -/** The IPv6 header. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip6_hdr { - /** version / traffic class / flow label */ - PACK_STRUCT_FIELD(u32_t _v_tc_fl); - /** payload length */ - PACK_STRUCT_FIELD(u16_t _plen); - /** next header */ - PACK_STRUCT_FLD_8(u8_t _nexth); - /** hop limit */ - PACK_STRUCT_FLD_8(u8_t _hoplim); - /** source and destination IP addresses */ - PACK_STRUCT_FLD_S(ip6_addr_p_t src); - PACK_STRUCT_FLD_S(ip6_addr_p_t dest); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* Hop-by-hop router alert option. */ -#define IP6_HBH_HLEN 8 -#define IP6_PAD1_OPTION 0 -#define IP6_PADN_ALERT_OPTION 1 -#define IP6_ROUTER_ALERT_OPTION 5 -#define IP6_ROUTER_ALERT_VALUE_MLD 0 -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip6_hbh_hdr { - /* next header */ - PACK_STRUCT_FLD_8(u8_t _nexth); - /* header length */ - PACK_STRUCT_FLD_8(u8_t _hlen); - /* router alert option type */ - PACK_STRUCT_FLD_8(u8_t _ra_opt_type); - /* router alert option data len */ - PACK_STRUCT_FLD_8(u8_t _ra_opt_dlen); - /* router alert option data */ - PACK_STRUCT_FIELD(u16_t _ra_opt_data); - /* PadN option type */ - PACK_STRUCT_FLD_8(u8_t _padn_opt_type); - /* PadN option data len */ - PACK_STRUCT_FLD_8(u8_t _padn_opt_dlen); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* Fragment header. */ -#define IP6_FRAG_HLEN 8 -#define IP6_FRAG_OFFSET_MASK 0xfff8 -#define IP6_FRAG_MORE_FLAG 0x0001 -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip6_frag_hdr { - /* next header */ - PACK_STRUCT_FLD_8(u8_t _nexth); - /* reserved */ - PACK_STRUCT_FLD_8(u8_t reserved); - /* fragment offset */ - PACK_STRUCT_FIELD(u16_t _fragment_offset); - /* fragmented packet identification */ - PACK_STRUCT_FIELD(u32_t _identification); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#define IP6H_V(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 28) & 0x0f) -#define IP6H_TC(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 20) & 0xff) -#define IP6H_FL(hdr) (lwip_ntohl((hdr)->_v_tc_fl) & 0x000fffff) -#define IP6H_PLEN(hdr) (lwip_ntohs((hdr)->_plen)) -#define IP6H_NEXTH(hdr) ((hdr)->_nexth) -#define IP6H_NEXTH_P(hdr) ((u8_t *)(hdr) + 6) -#define IP6H_HOPLIM(hdr) ((hdr)->_hoplim) - -#define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl = (lwip_htonl((((u32_t)(v)) << 28) | (((u32_t)(tc)) << 20) | (fl))) -#define IP6H_PLEN_SET(hdr, plen) (hdr)->_plen = lwip_htons(plen) -#define IP6H_NEXTH_SET(hdr, nexth) (hdr)->_nexth = (nexth) -#define IP6H_HOPLIM_SET(hdr, hl) (hdr)->_hoplim = (u8_t)(hl) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_IP6_H */ +/** + * @file + * IPv6 protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_IP6_H +#define LWIP_HDR_PROT_IP6_H + +#include "lwip/arch.h" +#include "lwip/ip6_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** This is the packed version of ip6_addr_t, + used in network headers that are itself packed */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_addr_packed { + PACK_STRUCT_FIELD(u32_t addr[4]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +typedef struct ip6_addr_packed ip6_addr_p_t; + +#define IP6_HLEN 40 + +#define IP6_NEXTH_HOPBYHOP 0 +#define IP6_NEXTH_TCP 6 +#define IP6_NEXTH_UDP 17 +#define IP6_NEXTH_ENCAPS 41 +#define IP6_NEXTH_ROUTING 43 +#define IP6_NEXTH_FRAGMENT 44 +#define IP6_NEXTH_ICMP6 58 +#define IP6_NEXTH_NONE 59 +#define IP6_NEXTH_DESTOPTS 60 +#define IP6_NEXTH_UDPLITE 136 + +/** The IPv6 header. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_hdr { + /** version / traffic class / flow label */ + PACK_STRUCT_FIELD(u32_t _v_tc_fl); + /** payload length */ + PACK_STRUCT_FIELD(u16_t _plen); + /** next header */ + PACK_STRUCT_FLD_8(u8_t _nexth); + /** hop limit */ + PACK_STRUCT_FLD_8(u8_t _hoplim); + /** source and destination IP addresses */ + PACK_STRUCT_FLD_S(ip6_addr_p_t src); + PACK_STRUCT_FLD_S(ip6_addr_p_t dest); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* Hop-by-hop router alert option. */ +#define IP6_HBH_HLEN 8 +#define IP6_PAD1_OPTION 0 +#define IP6_PADN_ALERT_OPTION 1 +#define IP6_ROUTER_ALERT_OPTION 5 +#define IP6_ROUTER_ALERT_VALUE_MLD 0 +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_hbh_hdr { + /* next header */ + PACK_STRUCT_FLD_8(u8_t _nexth); + /* header length */ + PACK_STRUCT_FLD_8(u8_t _hlen); + /* router alert option type */ + PACK_STRUCT_FLD_8(u8_t _ra_opt_type); + /* router alert option data len */ + PACK_STRUCT_FLD_8(u8_t _ra_opt_dlen); + /* router alert option data */ + PACK_STRUCT_FIELD(u16_t _ra_opt_data); + /* PadN option type */ + PACK_STRUCT_FLD_8(u8_t _padn_opt_type); + /* PadN option data len */ + PACK_STRUCT_FLD_8(u8_t _padn_opt_dlen); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* Fragment header. */ +#define IP6_FRAG_HLEN 8 +#define IP6_FRAG_OFFSET_MASK 0xfff8 +#define IP6_FRAG_MORE_FLAG 0x0001 +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_frag_hdr { + /* next header */ + PACK_STRUCT_FLD_8(u8_t _nexth); + /* reserved */ + PACK_STRUCT_FLD_8(u8_t reserved); + /* fragment offset */ + PACK_STRUCT_FIELD(u16_t _fragment_offset); + /* fragmented packet identification */ + PACK_STRUCT_FIELD(u32_t _identification); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#define IP6H_V(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 28) & 0x0f) +#define IP6H_TC(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 20) & 0xff) +#define IP6H_FL(hdr) (lwip_ntohl((hdr)->_v_tc_fl) & 0x000fffff) +#define IP6H_PLEN(hdr) (lwip_ntohs((hdr)->_plen)) +#define IP6H_NEXTH(hdr) ((hdr)->_nexth) +#define IP6H_NEXTH_P(hdr) ((u8_t *)(hdr) + 6) +#define IP6H_HOPLIM(hdr) ((hdr)->_hoplim) + +#define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl = (lwip_htonl((((u32_t)(v)) << 28) | (((u32_t)(tc)) << 20) | (fl))) +#define IP6H_PLEN_SET(hdr, plen) (hdr)->_plen = lwip_htons(plen) +#define IP6H_NEXTH_SET(hdr, nexth) (hdr)->_nexth = (nexth) +#define IP6H_HOPLIM_SET(hdr, hl) (hdr)->_hoplim = (u8_t)(hl) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_IP6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/mld6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/mld6.h index be3a006..8989a57 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/mld6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/mld6.h @@ -1,70 +1,70 @@ -/** - * @file - * MLD6 protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_MLD6_H -#define LWIP_HDR_PROT_MLD6_H - -#include "lwip/arch.h" -#include "lwip/prot/ip6.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** Multicast listener report/query/done message header. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct mld_header { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u16_t max_resp_delay); - PACK_STRUCT_FIELD(u16_t reserved); - PACK_STRUCT_FLD_S(ip6_addr_p_t multicast_address); - /* Options follow. */ -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_MLD6_H */ +/** + * @file + * MLD6 protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_MLD6_H +#define LWIP_HDR_PROT_MLD6_H + +#include "lwip/arch.h" +#include "lwip/prot/ip6.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Multicast listener report/query/done message header. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct mld_header { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u16_t max_resp_delay); + PACK_STRUCT_FIELD(u16_t reserved); + PACK_STRUCT_FLD_S(ip6_addr_p_t multicast_address); + /* Options follow. */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_MLD6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/nd6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/nd6.h index 2d4903d..e6999df 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/nd6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/nd6.h @@ -1,277 +1,277 @@ -/** - * @file - * ND6 protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_ND6_H -#define LWIP_HDR_PROT_ND6_H - -#include "lwip/arch.h" -#include "lwip/ip6_addr.h" -#include "lwip/prot/ip6.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** Neighbor solicitation message header. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ns_header { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u32_t reserved); - PACK_STRUCT_FLD_S(ip6_addr_p_t target_address); - /* Options follow. */ -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Neighbor advertisement message header. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct na_header { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FLD_8(u8_t flags); - PACK_STRUCT_FLD_8(u8_t reserved[3]); - PACK_STRUCT_FLD_S(ip6_addr_p_t target_address); - /* Options follow. */ -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif -#define ND6_FLAG_ROUTER (0x80) -#define ND6_FLAG_SOLICITED (0x40) -#define ND6_FLAG_OVERRIDE (0x20) - -/** Router solicitation message header. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct rs_header { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u32_t reserved); - /* Options follow. */ -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Router advertisement message header. */ -#define ND6_RA_FLAG_MANAGED_ADDR_CONFIG (0x80) -#define ND6_RA_FLAG_OTHER_CONFIG (0x40) -#define ND6_RA_FLAG_HOME_AGENT (0x20) -#define ND6_RA_PREFERENCE_MASK (0x18) -#define ND6_RA_PREFERENCE_HIGH (0x08) -#define ND6_RA_PREFERENCE_MEDIUM (0x00) -#define ND6_RA_PREFERENCE_LOW (0x18) -#define ND6_RA_PREFERENCE_DISABLED (0x10) -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ra_header { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FLD_8(u8_t current_hop_limit); - PACK_STRUCT_FLD_8(u8_t flags); - PACK_STRUCT_FIELD(u16_t router_lifetime); - PACK_STRUCT_FIELD(u32_t reachable_time); - PACK_STRUCT_FIELD(u32_t retrans_timer); - /* Options follow. */ -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Redirect message header. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct redirect_header { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u32_t reserved); - PACK_STRUCT_FLD_S(ip6_addr_p_t target_address); - PACK_STRUCT_FLD_S(ip6_addr_p_t destination_address); - /* Options follow. */ -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Link-layer address option. */ -#define ND6_OPTION_TYPE_SOURCE_LLADDR (0x01) -#define ND6_OPTION_TYPE_TARGET_LLADDR (0x02) -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct lladdr_option { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t length); - PACK_STRUCT_FLD_8(u8_t addr[NETIF_MAX_HWADDR_LEN]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Prefix information option. */ -#define ND6_OPTION_TYPE_PREFIX_INFO (0x03) -#define ND6_PREFIX_FLAG_ON_LINK (0x80) -#define ND6_PREFIX_FLAG_AUTONOMOUS (0x40) -#define ND6_PREFIX_FLAG_ROUTER_ADDRESS (0x20) -#define ND6_PREFIX_FLAG_SITE_PREFIX (0x10) -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct prefix_option { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t length); - PACK_STRUCT_FLD_8(u8_t prefix_length); - PACK_STRUCT_FLD_8(u8_t flags); - PACK_STRUCT_FIELD(u32_t valid_lifetime); - PACK_STRUCT_FIELD(u32_t preferred_lifetime); - PACK_STRUCT_FLD_8(u8_t reserved2[3]); - PACK_STRUCT_FLD_8(u8_t site_prefix_length); - PACK_STRUCT_FLD_S(ip6_addr_p_t prefix); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Redirected header option. */ -#define ND6_OPTION_TYPE_REDIR_HDR (0x04) -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct redirected_header_option { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t length); - PACK_STRUCT_FLD_8(u8_t reserved[6]); - /* Portion of redirected packet follows. */ - /* PACK_STRUCT_FLD_8(u8_t redirected[8]); */ -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** MTU option. */ -#define ND6_OPTION_TYPE_MTU (0x05) -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct mtu_option { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t length); - PACK_STRUCT_FIELD(u16_t reserved); - PACK_STRUCT_FIELD(u32_t mtu); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Route information option. */ -#define ND6_OPTION_TYPE_ROUTE_INFO (24) -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct route_option { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t length); - PACK_STRUCT_FLD_8(u8_t prefix_length); - PACK_STRUCT_FLD_8(u8_t preference); - PACK_STRUCT_FIELD(u32_t route_lifetime); - PACK_STRUCT_FLD_S(ip6_addr_p_t prefix); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/** Recursive DNS Server Option. */ -#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS -#define LWIP_RDNSS_OPTION_MAX_SERVERS LWIP_ND6_RDNSS_MAX_DNS_SERVERS -#else -#define LWIP_RDNSS_OPTION_MAX_SERVERS 1 -#endif -#define ND6_OPTION_TYPE_RDNSS (25) -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct rdnss_option { - PACK_STRUCT_FLD_8(u8_t type); - PACK_STRUCT_FLD_8(u8_t length); - PACK_STRUCT_FIELD(u16_t reserved); - PACK_STRUCT_FIELD(u32_t lifetime); - PACK_STRUCT_FLD_S(ip6_addr_p_t rdnss_address[LWIP_RDNSS_OPTION_MAX_SERVERS]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_ND6_H */ +/** + * @file + * ND6 protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_ND6_H +#define LWIP_HDR_PROT_ND6_H + +#include "lwip/arch.h" +#include "lwip/ip6_addr.h" +#include "lwip/prot/ip6.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Neighbor solicitation message header. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ns_header { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u32_t reserved); + PACK_STRUCT_FLD_S(ip6_addr_p_t target_address); + /* Options follow. */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Neighbor advertisement message header. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct na_header { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FLD_8(u8_t flags); + PACK_STRUCT_FLD_8(u8_t reserved[3]); + PACK_STRUCT_FLD_S(ip6_addr_p_t target_address); + /* Options follow. */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +#define ND6_FLAG_ROUTER (0x80) +#define ND6_FLAG_SOLICITED (0x40) +#define ND6_FLAG_OVERRIDE (0x20) + +/** Router solicitation message header. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct rs_header { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u32_t reserved); + /* Options follow. */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Router advertisement message header. */ +#define ND6_RA_FLAG_MANAGED_ADDR_CONFIG (0x80) +#define ND6_RA_FLAG_OTHER_CONFIG (0x40) +#define ND6_RA_FLAG_HOME_AGENT (0x20) +#define ND6_RA_PREFERENCE_MASK (0x18) +#define ND6_RA_PREFERENCE_HIGH (0x08) +#define ND6_RA_PREFERENCE_MEDIUM (0x00) +#define ND6_RA_PREFERENCE_LOW (0x18) +#define ND6_RA_PREFERENCE_DISABLED (0x10) +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ra_header { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FLD_8(u8_t current_hop_limit); + PACK_STRUCT_FLD_8(u8_t flags); + PACK_STRUCT_FIELD(u16_t router_lifetime); + PACK_STRUCT_FIELD(u32_t reachable_time); + PACK_STRUCT_FIELD(u32_t retrans_timer); + /* Options follow. */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Redirect message header. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct redirect_header { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u32_t reserved); + PACK_STRUCT_FLD_S(ip6_addr_p_t target_address); + PACK_STRUCT_FLD_S(ip6_addr_p_t destination_address); + /* Options follow. */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Link-layer address option. */ +#define ND6_OPTION_TYPE_SOURCE_LLADDR (0x01) +#define ND6_OPTION_TYPE_TARGET_LLADDR (0x02) +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct lladdr_option { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t length); + PACK_STRUCT_FLD_8(u8_t addr[NETIF_MAX_HWADDR_LEN]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Prefix information option. */ +#define ND6_OPTION_TYPE_PREFIX_INFO (0x03) +#define ND6_PREFIX_FLAG_ON_LINK (0x80) +#define ND6_PREFIX_FLAG_AUTONOMOUS (0x40) +#define ND6_PREFIX_FLAG_ROUTER_ADDRESS (0x20) +#define ND6_PREFIX_FLAG_SITE_PREFIX (0x10) +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct prefix_option { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t length); + PACK_STRUCT_FLD_8(u8_t prefix_length); + PACK_STRUCT_FLD_8(u8_t flags); + PACK_STRUCT_FIELD(u32_t valid_lifetime); + PACK_STRUCT_FIELD(u32_t preferred_lifetime); + PACK_STRUCT_FLD_8(u8_t reserved2[3]); + PACK_STRUCT_FLD_8(u8_t site_prefix_length); + PACK_STRUCT_FLD_S(ip6_addr_p_t prefix); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Redirected header option. */ +#define ND6_OPTION_TYPE_REDIR_HDR (0x04) +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct redirected_header_option { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t length); + PACK_STRUCT_FLD_8(u8_t reserved[6]); + /* Portion of redirected packet follows. */ + /* PACK_STRUCT_FLD_8(u8_t redirected[8]); */ +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** MTU option. */ +#define ND6_OPTION_TYPE_MTU (0x05) +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct mtu_option { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t length); + PACK_STRUCT_FIELD(u16_t reserved); + PACK_STRUCT_FIELD(u32_t mtu); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Route information option. */ +#define ND6_OPTION_TYPE_ROUTE_INFO (24) +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct route_option { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t length); + PACK_STRUCT_FLD_8(u8_t prefix_length); + PACK_STRUCT_FLD_8(u8_t preference); + PACK_STRUCT_FIELD(u32_t route_lifetime); + PACK_STRUCT_FLD_S(ip6_addr_p_t prefix); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/** Recursive DNS Server Option. */ +#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS +#define LWIP_RDNSS_OPTION_MAX_SERVERS LWIP_ND6_RDNSS_MAX_DNS_SERVERS +#else +#define LWIP_RDNSS_OPTION_MAX_SERVERS 1 +#endif +#define ND6_OPTION_TYPE_RDNSS (25) +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct rdnss_option { + PACK_STRUCT_FLD_8(u8_t type); + PACK_STRUCT_FLD_8(u8_t length); + PACK_STRUCT_FIELD(u16_t reserved); + PACK_STRUCT_FIELD(u32_t lifetime); + PACK_STRUCT_FLD_S(ip6_addr_p_t rdnss_address[LWIP_RDNSS_OPTION_MAX_SERVERS]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_ND6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/tcp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/tcp.h index 67fe7b9..0951d11 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/tcp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/tcp.h @@ -1,97 +1,97 @@ -/** - * @file - * TCP protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_TCP_H -#define LWIP_HDR_PROT_TCP_H - -#include "lwip/arch.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Length of the TCP header, excluding options. */ -#define TCP_HLEN 20 - -/* Fields are (of course) in network byte order. - * Some fields are converted to host byte order in tcp_input(). - */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct tcp_hdr { - PACK_STRUCT_FIELD(u16_t src); - PACK_STRUCT_FIELD(u16_t dest); - PACK_STRUCT_FIELD(u32_t seqno); - PACK_STRUCT_FIELD(u32_t ackno); - PACK_STRUCT_FIELD(u16_t _hdrlen_rsvd_flags); - PACK_STRUCT_FIELD(u16_t wnd); - PACK_STRUCT_FIELD(u16_t chksum); - PACK_STRUCT_FIELD(u16_t urgp); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* TCP header flags bits */ -#define TCP_FIN 0x01U -#define TCP_SYN 0x02U -#define TCP_RST 0x04U -#define TCP_PSH 0x08U -#define TCP_ACK 0x10U -#define TCP_URG 0x20U -#define TCP_ECE 0x40U -#define TCP_CWR 0x80U -/* Valid TCP header flags */ -#define TCP_FLAGS 0x3fU - -#define TCPH_HDRLEN(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) >> 12)) -#define TCPH_FLAGS(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS)) - -#define TCPH_HDRLEN_SET(phdr, len) (phdr)->_hdrlen_rsvd_flags = lwip_htons(((len) << 12) | TCPH_FLAGS(phdr)) -#define TCPH_FLAGS_SET(phdr, flags) (phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS(~TCP_FLAGS)) | lwip_htons(flags)) -#define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags) (phdr)->_hdrlen_rsvd_flags = (u16_t)(lwip_htons((u16_t)((len) << 12) | (flags))) - -#define TCPH_SET_FLAG(phdr, flags ) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | lwip_htons(flags)) -#define TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags & ~lwip_htons(flags)) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_TCP_H */ +/** + * @file + * TCP protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_TCP_H +#define LWIP_HDR_PROT_TCP_H + +#include "lwip/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Length of the TCP header, excluding options. */ +#define TCP_HLEN 20 + +/* Fields are (of course) in network byte order. + * Some fields are converted to host byte order in tcp_input(). + */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct tcp_hdr { + PACK_STRUCT_FIELD(u16_t src); + PACK_STRUCT_FIELD(u16_t dest); + PACK_STRUCT_FIELD(u32_t seqno); + PACK_STRUCT_FIELD(u32_t ackno); + PACK_STRUCT_FIELD(u16_t _hdrlen_rsvd_flags); + PACK_STRUCT_FIELD(u16_t wnd); + PACK_STRUCT_FIELD(u16_t chksum); + PACK_STRUCT_FIELD(u16_t urgp); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* TCP header flags bits */ +#define TCP_FIN 0x01U +#define TCP_SYN 0x02U +#define TCP_RST 0x04U +#define TCP_PSH 0x08U +#define TCP_ACK 0x10U +#define TCP_URG 0x20U +#define TCP_ECE 0x40U +#define TCP_CWR 0x80U +/* Valid TCP header flags */ +#define TCP_FLAGS 0x3fU + +#define TCPH_HDRLEN(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) >> 12)) +#define TCPH_FLAGS(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS)) + +#define TCPH_HDRLEN_SET(phdr, len) (phdr)->_hdrlen_rsvd_flags = lwip_htons(((len) << 12) | TCPH_FLAGS(phdr)) +#define TCPH_FLAGS_SET(phdr, flags) (phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS(~TCP_FLAGS)) | lwip_htons(flags)) +#define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags) (phdr)->_hdrlen_rsvd_flags = (u16_t)(lwip_htons((u16_t)((len) << 12) | (flags))) + +#define TCPH_SET_FLAG(phdr, flags ) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | lwip_htons(flags)) +#define TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags & ~lwip_htons(flags)) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_TCP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/udp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/udp.h index 664f19a..4904b7e 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/udp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/prot/udp.h @@ -1,68 +1,68 @@ -/** - * @file - * UDP protocol definitions - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_PROT_UDP_H -#define LWIP_HDR_PROT_UDP_H - -#include "lwip/arch.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define UDP_HLEN 8 - -/* Fields are (of course) in network byte order. */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct udp_hdr { - PACK_STRUCT_FIELD(u16_t src); - PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */ - PACK_STRUCT_FIELD(u16_t len); - PACK_STRUCT_FIELD(u16_t chksum); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_PROT_UDP_H */ +/** + * @file + * UDP protocol definitions + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_PROT_UDP_H +#define LWIP_HDR_PROT_UDP_H + +#include "lwip/arch.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define UDP_HLEN 8 + +/* Fields are (of course) in network byte order. */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct udp_hdr { + PACK_STRUCT_FIELD(u16_t src); + PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */ + PACK_STRUCT_FIELD(u16_t len); + PACK_STRUCT_FIELD(u16_t chksum); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_PROT_UDP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/raw.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/raw.h index 30aa147..9f37a0f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/raw.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/raw.h @@ -1,118 +1,118 @@ -/** - * @file - * raw API (to be used from TCPIP thread)\n - * See also @ref raw_raw - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_RAW_H -#define LWIP_HDR_RAW_H - -#include "lwip/opt.h" - -#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/def.h" -#include "lwip/ip.h" -#include "lwip/ip_addr.h" -#include "lwip/ip6_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct raw_pcb; - -/** Function prototype for raw pcb receive callback functions. - * @param arg user supplied argument (raw_pcb.recv_arg) - * @param pcb the raw_pcb which received data - * @param p the packet buffer that was received - * @param addr the remote IP address from which the packet was received - * @return 1 if the packet was 'eaten' (aka. deleted), - * 0 if the packet lives on - * If returning 1, the callback is responsible for freeing the pbuf - * if it's not used any more. - */ -typedef u8_t (*raw_recv_fn)(void *arg, struct raw_pcb *pcb, struct pbuf *p, - const ip_addr_t *addr); - -/** the RAW protocol control block */ -struct raw_pcb { - /* Common members of all PCB types */ - IP_PCB; - - struct raw_pcb *next; - - u8_t protocol; - - /** receive callback function */ - raw_recv_fn recv; - /* user-supplied argument for the recv callback */ - void *recv_arg; -#if LWIP_IPV6 - /* fields for handling checksum computations as per RFC3542. */ - u16_t chksum_offset; - u8_t chksum_reqd; -#endif -}; - -/* The following functions is the application layer interface to the - RAW code. */ -struct raw_pcb * raw_new (u8_t proto); -struct raw_pcb * raw_new_ip_type(u8_t type, u8_t proto); -void raw_remove (struct raw_pcb *pcb); -err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr); -err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr); - -err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr); -err_t raw_send (struct raw_pcb *pcb, struct pbuf *p); - -void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg); - -/* The following functions are the lower layer interface to RAW. */ -u8_t raw_input (struct pbuf *p, struct netif *inp); -#define raw_init() /* Compatibility define, no init needed. */ - -void raw_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); - -/* for compatibility with older implementation */ -#define raw_new_ip6(proto) raw_new_ip_type(IPADDR_TYPE_V6, proto) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_RAW */ - -#endif /* LWIP_HDR_RAW_H */ +/** + * @file + * raw API (to be used from TCPIP thread)\n + * See also @ref raw_raw + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_RAW_H +#define LWIP_HDR_RAW_H + +#include "lwip/opt.h" + +#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/def.h" +#include "lwip/ip.h" +#include "lwip/ip_addr.h" +#include "lwip/ip6_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct raw_pcb; + +/** Function prototype for raw pcb receive callback functions. + * @param arg user supplied argument (raw_pcb.recv_arg) + * @param pcb the raw_pcb which received data + * @param p the packet buffer that was received + * @param addr the remote IP address from which the packet was received + * @return 1 if the packet was 'eaten' (aka. deleted), + * 0 if the packet lives on + * If returning 1, the callback is responsible for freeing the pbuf + * if it's not used any more. + */ +typedef u8_t (*raw_recv_fn)(void *arg, struct raw_pcb *pcb, struct pbuf *p, + const ip_addr_t *addr); + +/** the RAW protocol control block */ +struct raw_pcb { + /* Common members of all PCB types */ + IP_PCB; + + struct raw_pcb *next; + + u8_t protocol; + + /** receive callback function */ + raw_recv_fn recv; + /* user-supplied argument for the recv callback */ + void *recv_arg; +#if LWIP_IPV6 + /* fields for handling checksum computations as per RFC3542. */ + u16_t chksum_offset; + u8_t chksum_reqd; +#endif +}; + +/* The following functions is the application layer interface to the + RAW code. */ +struct raw_pcb * raw_new (u8_t proto); +struct raw_pcb * raw_new_ip_type(u8_t type, u8_t proto); +void raw_remove (struct raw_pcb *pcb); +err_t raw_bind (struct raw_pcb *pcb, const ip_addr_t *ipaddr); +err_t raw_connect (struct raw_pcb *pcb, const ip_addr_t *ipaddr); + +err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr); +err_t raw_send (struct raw_pcb *pcb, struct pbuf *p); + +void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg); + +/* The following functions are the lower layer interface to RAW. */ +u8_t raw_input (struct pbuf *p, struct netif *inp); +#define raw_init() /* Compatibility define, no init needed. */ + +void raw_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); + +/* for compatibility with older implementation */ +#define raw_new_ip6(proto) raw_new_ip_type(IPADDR_TYPE_V6, proto) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_RAW */ + +#endif /* LWIP_HDR_RAW_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sio.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sio.h index 7643e19..efa8ade 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sio.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sio.h @@ -1,142 +1,142 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - */ - -/* - * This is the interface to the platform specific serial IO module - * It needs to be implemented by those platforms which need SLIP or PPP - */ - -#ifndef SIO_H -#define SIO_H - -#include "lwip/arch.h" -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* If you want to define sio_fd_t elsewhere or differently, - define this in your cc.h file. */ -#ifndef __sio_fd_t_defined -typedef void * sio_fd_t; -#endif - -/* The following functions can be defined to something else in your cc.h file - or be implemented in your custom sio.c file. */ - -#ifndef sio_open -/** - * Opens a serial device for communication. - * - * @param devnum device number - * @return handle to serial device if successful, NULL otherwise - */ -sio_fd_t sio_open(u8_t devnum); -#endif - -#ifndef sio_send -/** - * Sends a single character to the serial device. - * - * @param c character to send - * @param fd serial device handle - * - * @note This function will block until the character can be sent. - */ -void sio_send(u8_t c, sio_fd_t fd); -#endif - -#ifndef sio_recv -/** - * Receives a single character from the serial device. - * - * @param fd serial device handle - * - * @note This function will block until a character is received. - */ -u8_t sio_recv(sio_fd_t fd); -#endif - -#ifndef sio_read -/** - * Reads from the serial device. - * - * @param fd serial device handle - * @param data pointer to data buffer for receiving - * @param len maximum length (in bytes) of data to receive - * @return number of bytes actually received - may be 0 if aborted by sio_read_abort - * - * @note This function will block until data can be received. The blocking - * can be cancelled by calling sio_read_abort(). - */ -u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len); -#endif - -#ifndef sio_tryread -/** - * Tries to read from the serial device. Same as sio_read but returns - * immediately if no data is available and never blocks. - * - * @param fd serial device handle - * @param data pointer to data buffer for receiving - * @param len maximum length (in bytes) of data to receive - * @return number of bytes actually received - */ -u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len); -#endif - -#ifndef sio_write -/** - * Writes to the serial device. - * - * @param fd serial device handle - * @param data pointer to data to send - * @param len length (in bytes) of data to send - * @return number of bytes actually sent - * - * @note This function will block until all data can be sent. - */ -u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len); -#endif - -#ifndef sio_read_abort -/** - * Aborts a blocking sio_read() call. - * - * @param fd serial device handle - */ -void sio_read_abort(sio_fd_t fd); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* SIO_H */ +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + */ + +/* + * This is the interface to the platform specific serial IO module + * It needs to be implemented by those platforms which need SLIP or PPP + */ + +#ifndef SIO_H +#define SIO_H + +#include "lwip/arch.h" +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* If you want to define sio_fd_t elsewhere or differently, + define this in your cc.h file. */ +#ifndef __sio_fd_t_defined +typedef void * sio_fd_t; +#endif + +/* The following functions can be defined to something else in your cc.h file + or be implemented in your custom sio.c file. */ + +#ifndef sio_open +/** + * Opens a serial device for communication. + * + * @param devnum device number + * @return handle to serial device if successful, NULL otherwise + */ +sio_fd_t sio_open(u8_t devnum); +#endif + +#ifndef sio_send +/** + * Sends a single character to the serial device. + * + * @param c character to send + * @param fd serial device handle + * + * @note This function will block until the character can be sent. + */ +void sio_send(u8_t c, sio_fd_t fd); +#endif + +#ifndef sio_recv +/** + * Receives a single character from the serial device. + * + * @param fd serial device handle + * + * @note This function will block until a character is received. + */ +u8_t sio_recv(sio_fd_t fd); +#endif + +#ifndef sio_read +/** + * Reads from the serial device. + * + * @param fd serial device handle + * @param data pointer to data buffer for receiving + * @param len maximum length (in bytes) of data to receive + * @return number of bytes actually received - may be 0 if aborted by sio_read_abort + * + * @note This function will block until data can be received. The blocking + * can be cancelled by calling sio_read_abort(). + */ +u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len); +#endif + +#ifndef sio_tryread +/** + * Tries to read from the serial device. Same as sio_read but returns + * immediately if no data is available and never blocks. + * + * @param fd serial device handle + * @param data pointer to data buffer for receiving + * @param len maximum length (in bytes) of data to receive + * @return number of bytes actually received + */ +u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len); +#endif + +#ifndef sio_write +/** + * Writes to the serial device. + * + * @param fd serial device handle + * @param data pointer to data to send + * @param len length (in bytes) of data to send + * @return number of bytes actually sent + * + * @note This function will block until all data can be sent. + */ +u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len); +#endif + +#ifndef sio_read_abort +/** + * Aborts a blocking sio_read() call. + * + * @param fd serial device handle + */ +void sio_read_abort(sio_fd_t fd); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* SIO_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/snmp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/snmp.h index 8704d0b..80e6e57 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/snmp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/snmp.h @@ -1,213 +1,213 @@ -/** - * @file - * SNMP support API for implementing netifs and statitics for MIB2 - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Dirk Ziegelmeier - * - */ -#ifndef LWIP_HDR_SNMP_H -#define LWIP_HDR_SNMP_H - -#include "lwip/opt.h" -#include "lwip/ip_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct udp_pcb; -struct netif; - -/** - * @defgroup netif_mib2 MIB2 statistics - * @ingroup netif - */ - -/* MIB2 statistics functions */ -#if MIB2_STATS /* don't build if not configured for use in lwipopts.h */ -/** - * @ingroup netif_mib2 - * @see RFC1213, "MIB-II, 6. Definitions" - */ -enum snmp_ifType { - snmp_ifType_other=1, /* none of the following */ - snmp_ifType_regular1822, - snmp_ifType_hdh1822, - snmp_ifType_ddn_x25, - snmp_ifType_rfc877_x25, - snmp_ifType_ethernet_csmacd, - snmp_ifType_iso88023_csmacd, - snmp_ifType_iso88024_tokenBus, - snmp_ifType_iso88025_tokenRing, - snmp_ifType_iso88026_man, - snmp_ifType_starLan, - snmp_ifType_proteon_10Mbit, - snmp_ifType_proteon_80Mbit, - snmp_ifType_hyperchannel, - snmp_ifType_fddi, - snmp_ifType_lapb, - snmp_ifType_sdlc, - snmp_ifType_ds1, /* T-1 */ - snmp_ifType_e1, /* european equiv. of T-1 */ - snmp_ifType_basicISDN, - snmp_ifType_primaryISDN, /* proprietary serial */ - snmp_ifType_propPointToPointSerial, - snmp_ifType_ppp, - snmp_ifType_softwareLoopback, - snmp_ifType_eon, /* CLNP over IP [11] */ - snmp_ifType_ethernet_3Mbit, - snmp_ifType_nsip, /* XNS over IP */ - snmp_ifType_slip, /* generic SLIP */ - snmp_ifType_ultra, /* ULTRA technologies */ - snmp_ifType_ds3, /* T-3 */ - snmp_ifType_sip, /* SMDS */ - snmp_ifType_frame_relay -}; - -/** This macro has a precision of ~49 days because sys_now returns u32_t. \#define your own if you want ~490 days. */ -#ifndef MIB2_COPY_SYSUPTIME_TO -#define MIB2_COPY_SYSUPTIME_TO(ptrToVal) (*(ptrToVal) = (sys_now() / 10)) -#endif - -/** - * @ingroup netif_mib2 - * Increment stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs) - */ -#define MIB2_STATS_NETIF_INC(n, x) do { ++(n)->mib2_counters.x; } while(0) -/** - * @ingroup netif_mib2 - * Add value to stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs) - */ -#define MIB2_STATS_NETIF_ADD(n, x, val) do { (n)->mib2_counters.x += (val); } while(0) - -/** - * @ingroup netif_mib2 - * Init MIB2 statistic counters in netif - * @param netif Netif to init - * @param type one of enum @ref snmp_ifType - * @param speed your link speed here (units: bits per second) - */ -#define MIB2_INIT_NETIF(netif, type, speed) do { \ - (netif)->link_type = (type); \ - (netif)->link_speed = (speed);\ - (netif)->ts = 0; \ - (netif)->mib2_counters.ifinoctets = 0; \ - (netif)->mib2_counters.ifinucastpkts = 0; \ - (netif)->mib2_counters.ifinnucastpkts = 0; \ - (netif)->mib2_counters.ifindiscards = 0; \ - (netif)->mib2_counters.ifinerrors = 0; \ - (netif)->mib2_counters.ifinunknownprotos = 0; \ - (netif)->mib2_counters.ifoutoctets = 0; \ - (netif)->mib2_counters.ifoutucastpkts = 0; \ - (netif)->mib2_counters.ifoutnucastpkts = 0; \ - (netif)->mib2_counters.ifoutdiscards = 0; \ - (netif)->mib2_counters.ifouterrors = 0; } while(0) -#else /* MIB2_STATS */ -#ifndef MIB2_COPY_SYSUPTIME_TO -#define MIB2_COPY_SYSUPTIME_TO(ptrToVal) -#endif -#define MIB2_INIT_NETIF(netif, type, speed) -#define MIB2_STATS_NETIF_INC(n, x) -#define MIB2_STATS_NETIF_ADD(n, x, val) -#endif /* MIB2_STATS */ - -/* LWIP MIB2 callbacks */ -#if LWIP_MIB2_CALLBACKS /* don't build if not configured for use in lwipopts.h */ -/* network interface */ -void mib2_netif_added(struct netif *ni); -void mib2_netif_removed(struct netif *ni); - -#if LWIP_IPV4 && LWIP_ARP -/* ARP (for atTable and ipNetToMediaTable) */ -void mib2_add_arp_entry(struct netif *ni, ip4_addr_t *ip); -void mib2_remove_arp_entry(struct netif *ni, ip4_addr_t *ip); -#else /* LWIP_IPV4 && LWIP_ARP */ -#define mib2_add_arp_entry(ni,ip) -#define mib2_remove_arp_entry(ni,ip) -#endif /* LWIP_IPV4 && LWIP_ARP */ - -/* IP */ -#if LWIP_IPV4 -void mib2_add_ip4(struct netif *ni); -void mib2_remove_ip4(struct netif *ni); -void mib2_add_route_ip4(u8_t dflt, struct netif *ni); -void mib2_remove_route_ip4(u8_t dflt, struct netif *ni); -#endif /* LWIP_IPV4 */ - -/* UDP */ -#if LWIP_UDP -void mib2_udp_bind(struct udp_pcb *pcb); -void mib2_udp_unbind(struct udp_pcb *pcb); -#endif /* LWIP_UDP */ - -#else /* LWIP_MIB2_CALLBACKS */ -/* LWIP_MIB2_CALLBACKS support not available */ -/* define everything to be empty */ - -/* network interface */ -#define mib2_netif_added(ni) -#define mib2_netif_removed(ni) - -/* ARP */ -#define mib2_add_arp_entry(ni,ip) -#define mib2_remove_arp_entry(ni,ip) - -/* IP */ -#define mib2_add_ip4(ni) -#define mib2_remove_ip4(ni) -#define mib2_add_route_ip4(dflt, ni) -#define mib2_remove_route_ip4(dflt, ni) - -/* UDP */ -#define mib2_udp_bind(pcb) -#define mib2_udp_unbind(pcb) -#endif /* LWIP_MIB2_CALLBACKS */ - -/* for source-code compatibility reasons only, can be removed (not used internally) */ -#define NETIF_INIT_SNMP MIB2_INIT_NETIF -#define snmp_add_ifinoctets(ni,value) MIB2_STATS_NETIF_ADD(ni, ifinoctets, value) -#define snmp_inc_ifinucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifinucastpkts) -#define snmp_inc_ifinnucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifinnucastpkts) -#define snmp_inc_ifindiscards(ni) MIB2_STATS_NETIF_INC(ni, ifindiscards) -#define snmp_inc_ifinerrors(ni) MIB2_STATS_NETIF_INC(ni, ifinerrors) -#define snmp_inc_ifinunknownprotos(ni) MIB2_STATS_NETIF_INC(ni, ifinunknownprotos) -#define snmp_add_ifoutoctets(ni,value) MIB2_STATS_NETIF_ADD(ni, ifoutoctets, value) -#define snmp_inc_ifoutucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifoutucastpkts) -#define snmp_inc_ifoutnucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifoutnucastpkts) -#define snmp_inc_ifoutdiscards(ni) MIB2_STATS_NETIF_INC(ni, ifoutdiscards) -#define snmp_inc_ifouterrors(ni) MIB2_STATS_NETIF_INC(ni, ifouterrors) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_SNMP_H */ +/** + * @file + * SNMP support API for implementing netifs and statitics for MIB2 + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Dirk Ziegelmeier + * + */ +#ifndef LWIP_HDR_SNMP_H +#define LWIP_HDR_SNMP_H + +#include "lwip/opt.h" +#include "lwip/ip_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct udp_pcb; +struct netif; + +/** + * @defgroup netif_mib2 MIB2 statistics + * @ingroup netif + */ + +/* MIB2 statistics functions */ +#if MIB2_STATS /* don't build if not configured for use in lwipopts.h */ +/** + * @ingroup netif_mib2 + * @see RFC1213, "MIB-II, 6. Definitions" + */ +enum snmp_ifType { + snmp_ifType_other=1, /* none of the following */ + snmp_ifType_regular1822, + snmp_ifType_hdh1822, + snmp_ifType_ddn_x25, + snmp_ifType_rfc877_x25, + snmp_ifType_ethernet_csmacd, + snmp_ifType_iso88023_csmacd, + snmp_ifType_iso88024_tokenBus, + snmp_ifType_iso88025_tokenRing, + snmp_ifType_iso88026_man, + snmp_ifType_starLan, + snmp_ifType_proteon_10Mbit, + snmp_ifType_proteon_80Mbit, + snmp_ifType_hyperchannel, + snmp_ifType_fddi, + snmp_ifType_lapb, + snmp_ifType_sdlc, + snmp_ifType_ds1, /* T-1 */ + snmp_ifType_e1, /* european equiv. of T-1 */ + snmp_ifType_basicISDN, + snmp_ifType_primaryISDN, /* proprietary serial */ + snmp_ifType_propPointToPointSerial, + snmp_ifType_ppp, + snmp_ifType_softwareLoopback, + snmp_ifType_eon, /* CLNP over IP [11] */ + snmp_ifType_ethernet_3Mbit, + snmp_ifType_nsip, /* XNS over IP */ + snmp_ifType_slip, /* generic SLIP */ + snmp_ifType_ultra, /* ULTRA technologies */ + snmp_ifType_ds3, /* T-3 */ + snmp_ifType_sip, /* SMDS */ + snmp_ifType_frame_relay +}; + +/** This macro has a precision of ~49 days because sys_now returns u32_t. \#define your own if you want ~490 days. */ +#ifndef MIB2_COPY_SYSUPTIME_TO +#define MIB2_COPY_SYSUPTIME_TO(ptrToVal) (*(ptrToVal) = (sys_now() / 10)) +#endif + +/** + * @ingroup netif_mib2 + * Increment stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs) + */ +#define MIB2_STATS_NETIF_INC(n, x) do { ++(n)->mib2_counters.x; } while(0) +/** + * @ingroup netif_mib2 + * Add value to stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs) + */ +#define MIB2_STATS_NETIF_ADD(n, x, val) do { (n)->mib2_counters.x += (val); } while(0) + +/** + * @ingroup netif_mib2 + * Init MIB2 statistic counters in netif + * @param netif Netif to init + * @param type one of enum @ref snmp_ifType + * @param speed your link speed here (units: bits per second) + */ +#define MIB2_INIT_NETIF(netif, type, speed) do { \ + (netif)->link_type = (type); \ + (netif)->link_speed = (speed);\ + (netif)->ts = 0; \ + (netif)->mib2_counters.ifinoctets = 0; \ + (netif)->mib2_counters.ifinucastpkts = 0; \ + (netif)->mib2_counters.ifinnucastpkts = 0; \ + (netif)->mib2_counters.ifindiscards = 0; \ + (netif)->mib2_counters.ifinerrors = 0; \ + (netif)->mib2_counters.ifinunknownprotos = 0; \ + (netif)->mib2_counters.ifoutoctets = 0; \ + (netif)->mib2_counters.ifoutucastpkts = 0; \ + (netif)->mib2_counters.ifoutnucastpkts = 0; \ + (netif)->mib2_counters.ifoutdiscards = 0; \ + (netif)->mib2_counters.ifouterrors = 0; } while(0) +#else /* MIB2_STATS */ +#ifndef MIB2_COPY_SYSUPTIME_TO +#define MIB2_COPY_SYSUPTIME_TO(ptrToVal) +#endif +#define MIB2_INIT_NETIF(netif, type, speed) +#define MIB2_STATS_NETIF_INC(n, x) +#define MIB2_STATS_NETIF_ADD(n, x, val) +#endif /* MIB2_STATS */ + +/* LWIP MIB2 callbacks */ +#if LWIP_MIB2_CALLBACKS /* don't build if not configured for use in lwipopts.h */ +/* network interface */ +void mib2_netif_added(struct netif *ni); +void mib2_netif_removed(struct netif *ni); + +#if LWIP_IPV4 && LWIP_ARP +/* ARP (for atTable and ipNetToMediaTable) */ +void mib2_add_arp_entry(struct netif *ni, ip4_addr_t *ip); +void mib2_remove_arp_entry(struct netif *ni, ip4_addr_t *ip); +#else /* LWIP_IPV4 && LWIP_ARP */ +#define mib2_add_arp_entry(ni,ip) +#define mib2_remove_arp_entry(ni,ip) +#endif /* LWIP_IPV4 && LWIP_ARP */ + +/* IP */ +#if LWIP_IPV4 +void mib2_add_ip4(struct netif *ni); +void mib2_remove_ip4(struct netif *ni); +void mib2_add_route_ip4(u8_t dflt, struct netif *ni); +void mib2_remove_route_ip4(u8_t dflt, struct netif *ni); +#endif /* LWIP_IPV4 */ + +/* UDP */ +#if LWIP_UDP +void mib2_udp_bind(struct udp_pcb *pcb); +void mib2_udp_unbind(struct udp_pcb *pcb); +#endif /* LWIP_UDP */ + +#else /* LWIP_MIB2_CALLBACKS */ +/* LWIP_MIB2_CALLBACKS support not available */ +/* define everything to be empty */ + +/* network interface */ +#define mib2_netif_added(ni) +#define mib2_netif_removed(ni) + +/* ARP */ +#define mib2_add_arp_entry(ni,ip) +#define mib2_remove_arp_entry(ni,ip) + +/* IP */ +#define mib2_add_ip4(ni) +#define mib2_remove_ip4(ni) +#define mib2_add_route_ip4(dflt, ni) +#define mib2_remove_route_ip4(dflt, ni) + +/* UDP */ +#define mib2_udp_bind(pcb) +#define mib2_udp_unbind(pcb) +#endif /* LWIP_MIB2_CALLBACKS */ + +/* for source-code compatibility reasons only, can be removed (not used internally) */ +#define NETIF_INIT_SNMP MIB2_INIT_NETIF +#define snmp_add_ifinoctets(ni,value) MIB2_STATS_NETIF_ADD(ni, ifinoctets, value) +#define snmp_inc_ifinucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifinucastpkts) +#define snmp_inc_ifinnucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifinnucastpkts) +#define snmp_inc_ifindiscards(ni) MIB2_STATS_NETIF_INC(ni, ifindiscards) +#define snmp_inc_ifinerrors(ni) MIB2_STATS_NETIF_INC(ni, ifinerrors) +#define snmp_inc_ifinunknownprotos(ni) MIB2_STATS_NETIF_INC(ni, ifinunknownprotos) +#define snmp_add_ifoutoctets(ni,value) MIB2_STATS_NETIF_ADD(ni, ifoutoctets, value) +#define snmp_inc_ifoutucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifoutucastpkts) +#define snmp_inc_ifoutnucastpkts(ni) MIB2_STATS_NETIF_INC(ni, ifoutnucastpkts) +#define snmp_inc_ifoutdiscards(ni) MIB2_STATS_NETIF_INC(ni, ifoutdiscards) +#define snmp_inc_ifouterrors(ni) MIB2_STATS_NETIF_INC(ni, ifouterrors) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_SNMP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sockets.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sockets.h index 2522056..ab33292 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sockets.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sockets.h @@ -1,593 +1,593 @@ -/** - * @file - * Socket API (to be used from non-TCPIP threads) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - - -#ifndef LWIP_HDR_SOCKETS_H -#define LWIP_HDR_SOCKETS_H - -#include "lwip/opt.h" - -#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/ip_addr.h" -#include "lwip/err.h" -#include "lwip/inet.h" -#include "lwip/errno.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* If your port already typedef's sa_family_t, define SA_FAMILY_T_DEFINED - to prevent this code from redefining it. */ -#if !defined(sa_family_t) && !defined(SA_FAMILY_T_DEFINED) -typedef u8_t sa_family_t; -#endif -/* If your port already typedef's in_port_t, define IN_PORT_T_DEFINED - to prevent this code from redefining it. */ -#if !defined(in_port_t) && !defined(IN_PORT_T_DEFINED) -typedef u16_t in_port_t; -#endif - -#if LWIP_IPV4 -/* members are in network byte order */ -struct sockaddr_in { - u8_t sin_len; - sa_family_t sin_family; - in_port_t sin_port; - struct in_addr sin_addr; -#define SIN_ZERO_LEN 8 - char sin_zero[SIN_ZERO_LEN]; -}; -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -struct sockaddr_in6 { - u8_t sin6_len; /* length of this structure */ - sa_family_t sin6_family; /* AF_INET6 */ - in_port_t sin6_port; /* Transport layer port # */ - u32_t sin6_flowinfo; /* IPv6 flow information */ - struct in6_addr sin6_addr; /* IPv6 address */ - u32_t sin6_scope_id; /* Set of interfaces for scope */ -}; -#endif /* LWIP_IPV6 */ - -struct sockaddr { - u8_t sa_len; - sa_family_t sa_family; - char sa_data[14]; -}; - -struct sockaddr_storage { - u8_t s2_len; - sa_family_t ss_family; - char s2_data1[2]; - u32_t s2_data2[3]; -#if LWIP_IPV6 - u32_t s2_data3[3]; -#endif /* LWIP_IPV6 */ -}; - -/* If your port already typedef's socklen_t, define SOCKLEN_T_DEFINED - to prevent this code from redefining it. */ -#if !defined(socklen_t) && !defined(SOCKLEN_T_DEFINED) -typedef u32_t socklen_t; -#endif - -struct lwip_sock; - -#if !LWIP_TCPIP_CORE_LOCKING -/** Maximum optlen used by setsockopt/getsockopt */ -#define LWIP_SETGETSOCKOPT_MAXOPTLEN 16 - -/** This struct is used to pass data to the set/getsockopt_internal - * functions running in tcpip_thread context (only a void* is allowed) */ -struct lwip_setgetsockopt_data { - /** socket index for which to change options */ - int s; - /** level of the option to process */ - int level; - /** name of the option to process */ - int optname; - /** set: value to set the option to - * get: value of the option is stored here */ -#if LWIP_MPU_COMPATIBLE - u8_t optval[LWIP_SETGETSOCKOPT_MAXOPTLEN]; -#else - union { - void *p; - const void *pc; - } optval; -#endif - /** size of *optval */ - socklen_t optlen; - /** if an error occurs, it is temporarily stored here */ - err_t err; - /** semaphore to wake up the calling task */ - void* completed_sem; -}; -#endif /* !LWIP_TCPIP_CORE_LOCKING */ - -#if !defined(iovec) -struct iovec { - void *iov_base; - size_t iov_len; -}; -#endif - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; - int msg_iovlen; - void *msg_control; - socklen_t msg_controllen; - int msg_flags; -}; - -/* Socket protocol types (TCP/UDP/RAW) */ -#define SOCK_STREAM 1 -#define SOCK_DGRAM 2 -#define SOCK_RAW 3 - -/* - * Option flags per-socket. These must match the SOF_ flags in ip.h (checked in init.c) - */ -#define SO_REUSEADDR 0x0004 /* Allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_BROADCAST 0x0020 /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */ - - -/* - * Additional options, not kept in so_options. - */ -#define SO_DEBUG 0x0001 /* Unimplemented: turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_DONTROUTE 0x0010 /* Unimplemented: just use interface addresses */ -#define SO_USELOOPBACK 0x0040 /* Unimplemented: bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_DONTLINGER ((int)(~SO_LINGER)) -#define SO_OOBINLINE 0x0100 /* Unimplemented: leave received OOB data in line */ -#define SO_REUSEPORT 0x0200 /* Unimplemented: allow local address & port reuse */ -#define SO_SNDBUF 0x1001 /* Unimplemented: send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* Unimplemented: send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* Unimplemented: receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ -#define SO_CONTIMEO 0x1009 /* Unimplemented: connect timeout */ -#define SO_NO_CHECK 0x100a /* don't create UDP checksum */ - - -/* - * Structure used for manipulating linger option. - */ -struct linger { - int l_onoff; /* option on/off */ - int l_linger; /* linger time in seconds */ -}; - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xfff /* options for socket level */ - - -#define AF_UNSPEC 0 -#define AF_INET 2 -#if LWIP_IPV6 -#define AF_INET6 10 -#else /* LWIP_IPV6 */ -#define AF_INET6 AF_UNSPEC -#endif /* LWIP_IPV6 */ -#define PF_INET AF_INET -#define PF_INET6 AF_INET6 -#define PF_UNSPEC AF_UNSPEC - -#define IPPROTO_IP 0 -#define IPPROTO_ICMP 1 -#define IPPROTO_TCP 6 -#define IPPROTO_UDP 17 -#if LWIP_IPV6 -#define IPPROTO_IPV6 41 -#define IPPROTO_ICMPV6 58 -#endif /* LWIP_IPV6 */ -#define IPPROTO_UDPLITE 136 -#define IPPROTO_RAW 255 - -/* Flags we can use with send and recv. */ -#define MSG_PEEK 0x01 /* Peeks at an incoming message */ -#define MSG_WAITALL 0x02 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */ -#define MSG_OOB 0x04 /* Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */ -#define MSG_DONTWAIT 0x08 /* Nonblocking i/o for this operation only */ -#define MSG_MORE 0x10 /* Sender will send more */ - - -/* - * Options for level IPPROTO_IP - */ -#define IP_TOS 1 -#define IP_TTL 2 - -#if LWIP_TCP -/* - * Options for level IPPROTO_TCP - */ -#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ -#define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */ -#define TCP_KEEPIDLE 0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */ -#define TCP_KEEPINTVL 0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */ -#define TCP_KEEPCNT 0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */ -#endif /* LWIP_TCP */ - -#if LWIP_IPV6 -/* - * Options for level IPPROTO_IPV6 - */ -#define IPV6_CHECKSUM 7 /* RFC3542: calculate and insert the ICMPv6 checksum for raw sockets. */ -#define IPV6_V6ONLY 27 /* RFC3493: boolean control to restrict AF_INET6 sockets to IPv6 communications only. */ -#endif /* LWIP_IPV6 */ - -#if LWIP_UDP && LWIP_UDPLITE -/* - * Options for level IPPROTO_UDPLITE - */ -#define UDPLITE_SEND_CSCOV 0x01 /* sender checksum coverage */ -#define UDPLITE_RECV_CSCOV 0x02 /* minimal receiver checksum coverage */ -#endif /* LWIP_UDP && LWIP_UDPLITE*/ - - -#if LWIP_MULTICAST_TX_OPTIONS -/* - * Options and types for UDP multicast traffic handling - */ -#define IP_MULTICAST_TTL 5 -#define IP_MULTICAST_IF 6 -#define IP_MULTICAST_LOOP 7 -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - -#if LWIP_IGMP -/* - * Options and types related to multicast membership - */ -#define IP_ADD_MEMBERSHIP 3 -#define IP_DROP_MEMBERSHIP 4 - -typedef struct ip_mreq { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ -} ip_mreq; -#endif /* LWIP_IGMP */ - -/* - * The Type of Service provides an indication of the abstract - * parameters of the quality of service desired. These parameters are - * to be used to guide the selection of the actual service parameters - * when transmitting a datagram through a particular network. Several - * networks offer service precedence, which somehow treats high - * precedence traffic as more important than other traffic (generally - * by accepting only traffic above a certain precedence at time of high - * load). The major choice is a three way tradeoff between low-delay, - * high-reliability, and high-throughput. - * The use of the Delay, Throughput, and Reliability indications may - * increase the cost (in some sense) of the service. In many networks - * better performance for one of these parameters is coupled with worse - * performance on another. Except for very unusual cases at most two - * of these three indications should be set. - */ -#define IPTOS_TOS_MASK 0x1E -#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) -#define IPTOS_LOWDELAY 0x10 -#define IPTOS_THROUGHPUT 0x08 -#define IPTOS_RELIABILITY 0x04 -#define IPTOS_LOWCOST 0x02 -#define IPTOS_MINCOST IPTOS_LOWCOST - -/* - * The Network Control precedence designation is intended to be used - * within a network only. The actual use and control of that - * designation is up to each network. The Internetwork Control - * designation is intended for use by gateway control originators only. - * If the actual use of these precedence designations is of concern to - * a particular network, it is the responsibility of that network to - * control the access to, and use of, those precedence designations. - */ -#define IPTOS_PREC_MASK 0xe0 -#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK) -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE 0x80 -#define IPTOS_PREC_FLASH 0x60 -#define IPTOS_PREC_IMMEDIATE 0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 - - -/* - * Commands for ioctlsocket(), taken from the BSD file fcntl.h. - * lwip_ioctl only supports FIONREAD and FIONBIO, for now - * - * Ioctl's have the command encoded in the lower word, - * and the size of any in or out parameters in the upper - * word. The high 2 bits of the upper word are used - * to encode the in/out status of the parameter; for now - * we restrict parameters to at most 128 bytes. - */ -#if !defined(FIONREAD) || !defined(FIONBIO) -#define IOCPARM_MASK 0x7fU /* parameters must be < 128 bytes */ -#define IOC_VOID 0x20000000UL /* no parameters */ -#define IOC_OUT 0x40000000UL /* copy out parameters */ -#define IOC_IN 0x80000000UL /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) - /* 0x20000000 distinguishes new & - old ioctl's */ -#define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) - -#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) - -#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) -#endif /* !defined(FIONREAD) || !defined(FIONBIO) */ - -#ifndef FIONREAD -#define FIONREAD _IOR('f', 127, unsigned long) /* get # bytes to read */ -#endif -#ifndef FIONBIO -#define FIONBIO _IOW('f', 126, unsigned long) /* set/clear non-blocking i/o */ -#endif - -/* Socket I/O Controls: unimplemented */ -#ifndef SIOCSHIWAT -#define SIOCSHIWAT _IOW('s', 0, unsigned long) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, unsigned long) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, unsigned long) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, unsigned long) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, unsigned long) /* at oob mark? */ -#endif - -/* commands for fnctl */ -#ifndef F_GETFL -#define F_GETFL 3 -#endif -#ifndef F_SETFL -#define F_SETFL 4 -#endif - -/* File status flags and file access modes for fnctl, - these are bits in an int. */ -#ifndef O_NONBLOCK -#define O_NONBLOCK 1 /* nonblocking I/O */ -#endif -#ifndef O_NDELAY -#define O_NDELAY 1 /* same as O_NONBLOCK, for compatibility */ -#endif - -#ifndef SHUT_RD - #define SHUT_RD 0 - #define SHUT_WR 1 - #define SHUT_RDWR 2 -#endif - -/* FD_SET used for lwip_select */ -#ifndef FD_SET -#undef FD_SETSIZE -/* Make FD_SETSIZE match NUM_SOCKETS in socket.c */ -#define FD_SETSIZE MEMP_NUM_NETCONN -#define FDSETSAFESET(n, code) do { \ - if (((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0)) { \ - code; }} while(0) -#define FDSETSAFEGET(n, code) (((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0) ?\ - (code) : 0) -#define FD_SET(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] |= (1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) -#define FD_CLR(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] &= ~(1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) -#define FD_ISSET(n,p) FDSETSAFEGET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] & (1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) -#define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p))) - -typedef struct fd_set -{ - unsigned char fd_bits [(FD_SETSIZE+7)/8]; -} fd_set; - -#elif LWIP_SOCKET_OFFSET -#error LWIP_SOCKET_OFFSET does not work with external FD_SET! -#elif FD_SETSIZE < MEMP_NUM_NETCONN -#error "external FD_SETSIZE too small for number of sockets" -#endif /* FD_SET */ - -/** LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided - * by your system, set this to 0 and include in cc.h */ -#ifndef LWIP_TIMEVAL_PRIVATE -#define LWIP_TIMEVAL_PRIVATE 1 -#endif - -#if LWIP_TIMEVAL_PRIVATE -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; -#endif /* LWIP_TIMEVAL_PRIVATE */ - -#define lwip_socket_init() /* Compatibility define, no init needed. */ -void lwip_socket_thread_init(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore */ -void lwip_socket_thread_cleanup(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore */ - -#if LWIP_COMPAT_SOCKETS == 2 -/* This helps code parsers/code completion by not having the COMPAT functions as defines */ -#define lwip_accept accept -#define lwip_bind bind -#define lwip_shutdown shutdown -#define lwip_getpeername getpeername -#define lwip_getsockname getsockname -#define lwip_setsockopt setsockopt -#define lwip_getsockopt getsockopt -#define lwip_close closesocket -#define lwip_connect connect -#define lwip_listen listen -#define lwip_recv recv -#define lwip_recvfrom recvfrom -#define lwip_send send -#define lwip_sendmsg sendmsg -#define lwip_sendto sendto -#define lwip_socket socket -#define lwip_select select -#define lwip_ioctlsocket ioctl - -#if LWIP_POSIX_SOCKETS_IO_NAMES -#define lwip_read read -#define lwip_write write -#define lwip_writev writev -#undef lwip_close -#define lwip_close close -#define closesocket(s) close(s) -#define lwip_fcntl fcntl -#define lwip_ioctl ioctl -#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ -#endif /* LWIP_COMPAT_SOCKETS == 2 */ - -int lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen); -int lwip_bind(int s, const struct sockaddr *name, socklen_t namelen); -int lwip_shutdown(int s, int how); -int lwip_getpeername (int s, struct sockaddr *name, socklen_t *namelen); -int lwip_getsockname (int s, struct sockaddr *name, socklen_t *namelen); -int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen); -int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen); -int lwip_close(int s); -int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen); -int lwip_listen(int s, int backlog); -int lwip_recv(int s, void *mem, size_t len, int flags); -int lwip_read(int s, void *mem, size_t len); -int lwip_recvfrom(int s, void *mem, size_t len, int flags, - struct sockaddr *from, socklen_t *fromlen); -int lwip_send(int s, const void *dataptr, size_t size, int flags); -int lwip_sendmsg(int s, const struct msghdr *message, int flags); -int lwip_sendto(int s, const void *dataptr, size_t size, int flags, - const struct sockaddr *to, socklen_t tolen); -int lwip_socket(int domain, int type, int protocol); -int lwip_write(int s, const void *dataptr, size_t size); -int lwip_writev(int s, const struct iovec *iov, int iovcnt); -int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, - struct timeval *timeout); -int lwip_ioctl(int s, long cmd, void *argp); -int lwip_fcntl(int s, int cmd, int val); - -#if LWIP_COMPAT_SOCKETS -#if LWIP_COMPAT_SOCKETS != 2 -/** @ingroup socket */ -#define accept(s,addr,addrlen) lwip_accept(s,addr,addrlen) -/** @ingroup socket */ -#define bind(s,name,namelen) lwip_bind(s,name,namelen) -/** @ingroup socket */ -#define shutdown(s,how) lwip_shutdown(s,how) -/** @ingroup socket */ -#define getpeername(s,name,namelen) lwip_getpeername(s,name,namelen) -/** @ingroup socket */ -#define getsockname(s,name,namelen) lwip_getsockname(s,name,namelen) -/** @ingroup socket */ -#define setsockopt(s,level,optname,opval,optlen) lwip_setsockopt(s,level,optname,opval,optlen) -/** @ingroup socket */ -#define getsockopt(s,level,optname,opval,optlen) lwip_getsockopt(s,level,optname,opval,optlen) -/** @ingroup socket */ -#define closesocket(s) lwip_close(s) -/** @ingroup socket */ -#define connect(s,name,namelen) lwip_connect(s,name,namelen) -/** @ingroup socket */ -#define listen(s,backlog) lwip_listen(s,backlog) -/** @ingroup socket */ -#define recv(s,mem,len,flags) lwip_recv(s,mem,len,flags) -/** @ingroup socket */ -#define recvfrom(s,mem,len,flags,from,fromlen) lwip_recvfrom(s,mem,len,flags,from,fromlen) -/** @ingroup socket */ -#define send(s,dataptr,size,flags) lwip_send(s,dataptr,size,flags) -/** @ingroup socket */ -#define sendmsg(s,message,flags) lwip_sendmsg(s,message,flags) -/** @ingroup socket */ -#define sendto(s,dataptr,size,flags,to,tolen) lwip_sendto(s,dataptr,size,flags,to,tolen) -/** @ingroup socket */ -#define socket(domain,type,protocol) lwip_socket(domain,type,protocol) -/** @ingroup socket */ -#define select(maxfdp1,readset,writeset,exceptset,timeout) lwip_select(maxfdp1,readset,writeset,exceptset,timeout) -/** @ingroup socket */ -#define ioctlsocket(s,cmd,argp) lwip_ioctl(s,cmd,argp) - -#if LWIP_POSIX_SOCKETS_IO_NAMES -/** @ingroup socket */ -#define read(s,mem,len) lwip_read(s,mem,len) -/** @ingroup socket */ -#define write(s,dataptr,len) lwip_write(s,dataptr,len) -/** @ingroup socket */ -#define writev(s,iov,iovcnt) lwip_writev(s,iov,iovcnt) -/** @ingroup socket */ -#define close(s) lwip_close(s) -/** @ingroup socket */ -#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val) -/** @ingroup socket */ -#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp) -#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ -#endif /* LWIP_COMPAT_SOCKETS != 2 */ - -#if LWIP_IPV4 && LWIP_IPV6 -/** @ingroup socket */ -#define inet_ntop(af,src,dst,size) \ - (((af) == AF_INET6) ? ip6addr_ntoa_r((const ip6_addr_t*)(src),(dst),(size)) \ - : (((af) == AF_INET) ? ip4addr_ntoa_r((const ip4_addr_t*)(src),(dst),(size)) : NULL)) -/** @ingroup socket */ -#define inet_pton(af,src,dst) \ - (((af) == AF_INET6) ? ip6addr_aton((src),(ip6_addr_t*)(dst)) \ - : (((af) == AF_INET) ? ip4addr_aton((src),(ip4_addr_t*)(dst)) : 0)) -#elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ -#define inet_ntop(af,src,dst,size) \ - (((af) == AF_INET) ? ip4addr_ntoa_r((const ip4_addr_t*)(src),(dst),(size)) : NULL) -#define inet_pton(af,src,dst) \ - (((af) == AF_INET) ? ip4addr_aton((src),(ip4_addr_t*)(dst)) : 0) -#else /* LWIP_IPV4 && LWIP_IPV6 */ -#define inet_ntop(af,src,dst,size) \ - (((af) == AF_INET6) ? ip6addr_ntoa_r((const ip6_addr_t*)(src),(dst),(size)) : NULL) -#define inet_pton(af,src,dst) \ - (((af) == AF_INET6) ? ip6addr_aton((src),(ip6_addr_t*)(dst)) : 0) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ - -#endif /* LWIP_COMPAT_SOCKETS */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_SOCKET */ - -#endif /* LWIP_HDR_SOCKETS_H */ +/** + * @file + * Socket API (to be used from non-TCPIP threads) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + + +#ifndef LWIP_HDR_SOCKETS_H +#define LWIP_HDR_SOCKETS_H + +#include "lwip/opt.h" + +#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/ip_addr.h" +#include "lwip/err.h" +#include "lwip/inet.h" +#include "lwip/errno.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* If your port already typedef's sa_family_t, define SA_FAMILY_T_DEFINED + to prevent this code from redefining it. */ +#if !defined(sa_family_t) && !defined(SA_FAMILY_T_DEFINED) +typedef u8_t sa_family_t; +#endif +/* If your port already typedef's in_port_t, define IN_PORT_T_DEFINED + to prevent this code from redefining it. */ +#if !defined(in_port_t) && !defined(IN_PORT_T_DEFINED) +typedef u16_t in_port_t; +#endif + +#if LWIP_IPV4 +/* members are in network byte order */ +struct sockaddr_in { + u8_t sin_len; + sa_family_t sin_family; + in_port_t sin_port; + struct in_addr sin_addr; +#define SIN_ZERO_LEN 8 + char sin_zero[SIN_ZERO_LEN]; +}; +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +struct sockaddr_in6 { + u8_t sin6_len; /* length of this structure */ + sa_family_t sin6_family; /* AF_INET6 */ + in_port_t sin6_port; /* Transport layer port # */ + u32_t sin6_flowinfo; /* IPv6 flow information */ + struct in6_addr sin6_addr; /* IPv6 address */ + u32_t sin6_scope_id; /* Set of interfaces for scope */ +}; +#endif /* LWIP_IPV6 */ + +struct sockaddr { + u8_t sa_len; + sa_family_t sa_family; + char sa_data[14]; +}; + +struct sockaddr_storage { + u8_t s2_len; + sa_family_t ss_family; + char s2_data1[2]; + u32_t s2_data2[3]; +#if LWIP_IPV6 + u32_t s2_data3[3]; +#endif /* LWIP_IPV6 */ +}; + +/* If your port already typedef's socklen_t, define SOCKLEN_T_DEFINED + to prevent this code from redefining it. */ +#if !defined(socklen_t) && !defined(SOCKLEN_T_DEFINED) +typedef u32_t socklen_t; +#endif + +struct lwip_sock; + +#if !LWIP_TCPIP_CORE_LOCKING +/** Maximum optlen used by setsockopt/getsockopt */ +#define LWIP_SETGETSOCKOPT_MAXOPTLEN 16 + +/** This struct is used to pass data to the set/getsockopt_internal + * functions running in tcpip_thread context (only a void* is allowed) */ +struct lwip_setgetsockopt_data { + /** socket index for which to change options */ + int s; + /** level of the option to process */ + int level; + /** name of the option to process */ + int optname; + /** set: value to set the option to + * get: value of the option is stored here */ +#if LWIP_MPU_COMPATIBLE + u8_t optval[LWIP_SETGETSOCKOPT_MAXOPTLEN]; +#else + union { + void *p; + const void *pc; + } optval; +#endif + /** size of *optval */ + socklen_t optlen; + /** if an error occurs, it is temporarily stored here */ + err_t err; + /** semaphore to wake up the calling task */ + void* completed_sem; +}; +#endif /* !LWIP_TCPIP_CORE_LOCKING */ + +#if !defined(iovec) +struct iovec { + void *iov_base; + size_t iov_len; +}; +#endif + +struct msghdr { + void *msg_name; + socklen_t msg_namelen; + struct iovec *msg_iov; + int msg_iovlen; + void *msg_control; + socklen_t msg_controllen; + int msg_flags; +}; + +/* Socket protocol types (TCP/UDP/RAW) */ +#define SOCK_STREAM 1 +#define SOCK_DGRAM 2 +#define SOCK_RAW 3 + +/* + * Option flags per-socket. These must match the SOF_ flags in ip.h (checked in init.c) + */ +#define SO_REUSEADDR 0x0004 /* Allow local address reuse */ +#define SO_KEEPALIVE 0x0008 /* keep connections alive */ +#define SO_BROADCAST 0x0020 /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */ + + +/* + * Additional options, not kept in so_options. + */ +#define SO_DEBUG 0x0001 /* Unimplemented: turn on debugging info recording */ +#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ +#define SO_DONTROUTE 0x0010 /* Unimplemented: just use interface addresses */ +#define SO_USELOOPBACK 0x0040 /* Unimplemented: bypass hardware when possible */ +#define SO_LINGER 0x0080 /* linger on close if data present */ +#define SO_DONTLINGER ((int)(~SO_LINGER)) +#define SO_OOBINLINE 0x0100 /* Unimplemented: leave received OOB data in line */ +#define SO_REUSEPORT 0x0200 /* Unimplemented: allow local address & port reuse */ +#define SO_SNDBUF 0x1001 /* Unimplemented: send buffer size */ +#define SO_RCVBUF 0x1002 /* receive buffer size */ +#define SO_SNDLOWAT 0x1003 /* Unimplemented: send low-water mark */ +#define SO_RCVLOWAT 0x1004 /* Unimplemented: receive low-water mark */ +#define SO_SNDTIMEO 0x1005 /* send timeout */ +#define SO_RCVTIMEO 0x1006 /* receive timeout */ +#define SO_ERROR 0x1007 /* get error status and clear */ +#define SO_TYPE 0x1008 /* get socket type */ +#define SO_CONTIMEO 0x1009 /* Unimplemented: connect timeout */ +#define SO_NO_CHECK 0x100a /* don't create UDP checksum */ + + +/* + * Structure used for manipulating linger option. + */ +struct linger { + int l_onoff; /* option on/off */ + int l_linger; /* linger time in seconds */ +}; + +/* + * Level number for (get/set)sockopt() to apply to socket itself. + */ +#define SOL_SOCKET 0xfff /* options for socket level */ + + +#define AF_UNSPEC 0 +#define AF_INET 2 +#if LWIP_IPV6 +#define AF_INET6 10 +#else /* LWIP_IPV6 */ +#define AF_INET6 AF_UNSPEC +#endif /* LWIP_IPV6 */ +#define PF_INET AF_INET +#define PF_INET6 AF_INET6 +#define PF_UNSPEC AF_UNSPEC + +#define IPPROTO_IP 0 +#define IPPROTO_ICMP 1 +#define IPPROTO_TCP 6 +#define IPPROTO_UDP 17 +#if LWIP_IPV6 +#define IPPROTO_IPV6 41 +#define IPPROTO_ICMPV6 58 +#endif /* LWIP_IPV6 */ +#define IPPROTO_UDPLITE 136 +#define IPPROTO_RAW 255 + +/* Flags we can use with send and recv. */ +#define MSG_PEEK 0x01 /* Peeks at an incoming message */ +#define MSG_WAITALL 0x02 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */ +#define MSG_OOB 0x04 /* Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */ +#define MSG_DONTWAIT 0x08 /* Nonblocking i/o for this operation only */ +#define MSG_MORE 0x10 /* Sender will send more */ + + +/* + * Options for level IPPROTO_IP + */ +#define IP_TOS 1 +#define IP_TTL 2 + +#if LWIP_TCP +/* + * Options for level IPPROTO_TCP + */ +#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ +#define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */ +#define TCP_KEEPIDLE 0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */ +#define TCP_KEEPINTVL 0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */ +#define TCP_KEEPCNT 0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */ +#endif /* LWIP_TCP */ + +#if LWIP_IPV6 +/* + * Options for level IPPROTO_IPV6 + */ +#define IPV6_CHECKSUM 7 /* RFC3542: calculate and insert the ICMPv6 checksum for raw sockets. */ +#define IPV6_V6ONLY 27 /* RFC3493: boolean control to restrict AF_INET6 sockets to IPv6 communications only. */ +#endif /* LWIP_IPV6 */ + +#if LWIP_UDP && LWIP_UDPLITE +/* + * Options for level IPPROTO_UDPLITE + */ +#define UDPLITE_SEND_CSCOV 0x01 /* sender checksum coverage */ +#define UDPLITE_RECV_CSCOV 0x02 /* minimal receiver checksum coverage */ +#endif /* LWIP_UDP && LWIP_UDPLITE*/ + + +#if LWIP_MULTICAST_TX_OPTIONS +/* + * Options and types for UDP multicast traffic handling + */ +#define IP_MULTICAST_TTL 5 +#define IP_MULTICAST_IF 6 +#define IP_MULTICAST_LOOP 7 +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + +#if LWIP_IGMP +/* + * Options and types related to multicast membership + */ +#define IP_ADD_MEMBERSHIP 3 +#define IP_DROP_MEMBERSHIP 4 + +typedef struct ip_mreq { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_interface; /* local IP address of interface */ +} ip_mreq; +#endif /* LWIP_IGMP */ + +/* + * The Type of Service provides an indication of the abstract + * parameters of the quality of service desired. These parameters are + * to be used to guide the selection of the actual service parameters + * when transmitting a datagram through a particular network. Several + * networks offer service precedence, which somehow treats high + * precedence traffic as more important than other traffic (generally + * by accepting only traffic above a certain precedence at time of high + * load). The major choice is a three way tradeoff between low-delay, + * high-reliability, and high-throughput. + * The use of the Delay, Throughput, and Reliability indications may + * increase the cost (in some sense) of the service. In many networks + * better performance for one of these parameters is coupled with worse + * performance on another. Except for very unusual cases at most two + * of these three indications should be set. + */ +#define IPTOS_TOS_MASK 0x1E +#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) +#define IPTOS_LOWDELAY 0x10 +#define IPTOS_THROUGHPUT 0x08 +#define IPTOS_RELIABILITY 0x04 +#define IPTOS_LOWCOST 0x02 +#define IPTOS_MINCOST IPTOS_LOWCOST + +/* + * The Network Control precedence designation is intended to be used + * within a network only. The actual use and control of that + * designation is up to each network. The Internetwork Control + * designation is intended for use by gateway control originators only. + * If the actual use of these precedence designations is of concern to + * a particular network, it is the responsibility of that network to + * control the access to, and use of, those precedence designations. + */ +#define IPTOS_PREC_MASK 0xe0 +#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK) +#define IPTOS_PREC_NETCONTROL 0xe0 +#define IPTOS_PREC_INTERNETCONTROL 0xc0 +#define IPTOS_PREC_CRITIC_ECP 0xa0 +#define IPTOS_PREC_FLASHOVERRIDE 0x80 +#define IPTOS_PREC_FLASH 0x60 +#define IPTOS_PREC_IMMEDIATE 0x40 +#define IPTOS_PREC_PRIORITY 0x20 +#define IPTOS_PREC_ROUTINE 0x00 + + +/* + * Commands for ioctlsocket(), taken from the BSD file fcntl.h. + * lwip_ioctl only supports FIONREAD and FIONBIO, for now + * + * Ioctl's have the command encoded in the lower word, + * and the size of any in or out parameters in the upper + * word. The high 2 bits of the upper word are used + * to encode the in/out status of the parameter; for now + * we restrict parameters to at most 128 bytes. + */ +#if !defined(FIONREAD) || !defined(FIONBIO) +#define IOCPARM_MASK 0x7fU /* parameters must be < 128 bytes */ +#define IOC_VOID 0x20000000UL /* no parameters */ +#define IOC_OUT 0x40000000UL /* copy out parameters */ +#define IOC_IN 0x80000000UL /* copy in parameters */ +#define IOC_INOUT (IOC_IN|IOC_OUT) + /* 0x20000000 distinguishes new & + old ioctl's */ +#define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) + +#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) + +#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) +#endif /* !defined(FIONREAD) || !defined(FIONBIO) */ + +#ifndef FIONREAD +#define FIONREAD _IOR('f', 127, unsigned long) /* get # bytes to read */ +#endif +#ifndef FIONBIO +#define FIONBIO _IOW('f', 126, unsigned long) /* set/clear non-blocking i/o */ +#endif + +/* Socket I/O Controls: unimplemented */ +#ifndef SIOCSHIWAT +#define SIOCSHIWAT _IOW('s', 0, unsigned long) /* set high watermark */ +#define SIOCGHIWAT _IOR('s', 1, unsigned long) /* get high watermark */ +#define SIOCSLOWAT _IOW('s', 2, unsigned long) /* set low watermark */ +#define SIOCGLOWAT _IOR('s', 3, unsigned long) /* get low watermark */ +#define SIOCATMARK _IOR('s', 7, unsigned long) /* at oob mark? */ +#endif + +/* commands for fnctl */ +#ifndef F_GETFL +#define F_GETFL 3 +#endif +#ifndef F_SETFL +#define F_SETFL 4 +#endif + +/* File status flags and file access modes for fnctl, + these are bits in an int. */ +#ifndef O_NONBLOCK +#define O_NONBLOCK 1 /* nonblocking I/O */ +#endif +#ifndef O_NDELAY +#define O_NDELAY 1 /* same as O_NONBLOCK, for compatibility */ +#endif + +#ifndef SHUT_RD + #define SHUT_RD 0 + #define SHUT_WR 1 + #define SHUT_RDWR 2 +#endif + +/* FD_SET used for lwip_select */ +#ifndef FD_SET +#undef FD_SETSIZE +/* Make FD_SETSIZE match NUM_SOCKETS in socket.c */ +#define FD_SETSIZE MEMP_NUM_NETCONN +#define FDSETSAFESET(n, code) do { \ + if (((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0)) { \ + code; }} while(0) +#define FDSETSAFEGET(n, code) (((n) - LWIP_SOCKET_OFFSET < MEMP_NUM_NETCONN) && (((int)(n) - LWIP_SOCKET_OFFSET) >= 0) ?\ + (code) : 0) +#define FD_SET(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] |= (1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) +#define FD_CLR(n, p) FDSETSAFESET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] &= ~(1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) +#define FD_ISSET(n,p) FDSETSAFEGET(n, (p)->fd_bits[((n)-LWIP_SOCKET_OFFSET)/8] & (1 << (((n)-LWIP_SOCKET_OFFSET) & 7))) +#define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p))) + +typedef struct fd_set +{ + unsigned char fd_bits [(FD_SETSIZE+7)/8]; +} fd_set; + +#elif LWIP_SOCKET_OFFSET +#error LWIP_SOCKET_OFFSET does not work with external FD_SET! +#elif FD_SETSIZE < MEMP_NUM_NETCONN +#error "external FD_SETSIZE too small for number of sockets" +#endif /* FD_SET */ + +/** LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided + * by your system, set this to 0 and include in cc.h */ +#ifndef LWIP_TIMEVAL_PRIVATE +#define LWIP_TIMEVAL_PRIVATE 1 +#endif + +#if LWIP_TIMEVAL_PRIVATE +struct timeval { + long tv_sec; /* seconds */ + long tv_usec; /* and microseconds */ +}; +#endif /* LWIP_TIMEVAL_PRIVATE */ + +#define lwip_socket_init() /* Compatibility define, no init needed. */ +void lwip_socket_thread_init(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore */ +void lwip_socket_thread_cleanup(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore */ + +#if LWIP_COMPAT_SOCKETS == 2 +/* This helps code parsers/code completion by not having the COMPAT functions as defines */ +#define lwip_accept accept +#define lwip_bind bind +#define lwip_shutdown shutdown +#define lwip_getpeername getpeername +#define lwip_getsockname getsockname +#define lwip_setsockopt setsockopt +#define lwip_getsockopt getsockopt +#define lwip_close closesocket +#define lwip_connect connect +#define lwip_listen listen +#define lwip_recv recv +#define lwip_recvfrom recvfrom +#define lwip_send send +#define lwip_sendmsg sendmsg +#define lwip_sendto sendto +#define lwip_socket socket +#define lwip_select select +#define lwip_ioctlsocket ioctl + +#if LWIP_POSIX_SOCKETS_IO_NAMES +#define lwip_read read +#define lwip_write write +#define lwip_writev writev +#undef lwip_close +#define lwip_close close +#define closesocket(s) close(s) +#define lwip_fcntl fcntl +#define lwip_ioctl ioctl +#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ +#endif /* LWIP_COMPAT_SOCKETS == 2 */ + +int lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen); +int lwip_bind(int s, const struct sockaddr *name, socklen_t namelen); +int lwip_shutdown(int s, int how); +int lwip_getpeername (int s, struct sockaddr *name, socklen_t *namelen); +int lwip_getsockname (int s, struct sockaddr *name, socklen_t *namelen); +int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen); +int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen); +int lwip_close(int s); +int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen); +int lwip_listen(int s, int backlog); +int lwip_recv(int s, void *mem, size_t len, int flags); +int lwip_read(int s, void *mem, size_t len); +int lwip_recvfrom(int s, void *mem, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen); +int lwip_send(int s, const void *dataptr, size_t size, int flags); +int lwip_sendmsg(int s, const struct msghdr *message, int flags); +int lwip_sendto(int s, const void *dataptr, size_t size, int flags, + const struct sockaddr *to, socklen_t tolen); +int lwip_socket(int domain, int type, int protocol); +int lwip_write(int s, const void *dataptr, size_t size); +int lwip_writev(int s, const struct iovec *iov, int iovcnt); +int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, + struct timeval *timeout); +int lwip_ioctl(int s, long cmd, void *argp); +int lwip_fcntl(int s, int cmd, int val); + +#if LWIP_COMPAT_SOCKETS +#if LWIP_COMPAT_SOCKETS != 2 +/** @ingroup socket */ +#define accept(s,addr,addrlen) lwip_accept(s,addr,addrlen) +/** @ingroup socket */ +#define bind(s,name,namelen) lwip_bind(s,name,namelen) +/** @ingroup socket */ +#define shutdown(s,how) lwip_shutdown(s,how) +/** @ingroup socket */ +#define getpeername(s,name,namelen) lwip_getpeername(s,name,namelen) +/** @ingroup socket */ +#define getsockname(s,name,namelen) lwip_getsockname(s,name,namelen) +/** @ingroup socket */ +#define setsockopt(s,level,optname,opval,optlen) lwip_setsockopt(s,level,optname,opval,optlen) +/** @ingroup socket */ +#define getsockopt(s,level,optname,opval,optlen) lwip_getsockopt(s,level,optname,opval,optlen) +/** @ingroup socket */ +#define closesocket(s) lwip_close(s) +/** @ingroup socket */ +#define connect(s,name,namelen) lwip_connect(s,name,namelen) +/** @ingroup socket */ +#define listen(s,backlog) lwip_listen(s,backlog) +/** @ingroup socket */ +#define recv(s,mem,len,flags) lwip_recv(s,mem,len,flags) +/** @ingroup socket */ +#define recvfrom(s,mem,len,flags,from,fromlen) lwip_recvfrom(s,mem,len,flags,from,fromlen) +/** @ingroup socket */ +#define send(s,dataptr,size,flags) lwip_send(s,dataptr,size,flags) +/** @ingroup socket */ +#define sendmsg(s,message,flags) lwip_sendmsg(s,message,flags) +/** @ingroup socket */ +#define sendto(s,dataptr,size,flags,to,tolen) lwip_sendto(s,dataptr,size,flags,to,tolen) +/** @ingroup socket */ +#define socket(domain,type,protocol) lwip_socket(domain,type,protocol) +/** @ingroup socket */ +#define select(maxfdp1,readset,writeset,exceptset,timeout) lwip_select(maxfdp1,readset,writeset,exceptset,timeout) +/** @ingroup socket */ +#define ioctlsocket(s,cmd,argp) lwip_ioctl(s,cmd,argp) + +#if LWIP_POSIX_SOCKETS_IO_NAMES +/** @ingroup socket */ +#define read(s,mem,len) lwip_read(s,mem,len) +/** @ingroup socket */ +#define write(s,dataptr,len) lwip_write(s,dataptr,len) +/** @ingroup socket */ +#define writev(s,iov,iovcnt) lwip_writev(s,iov,iovcnt) +/** @ingroup socket */ +#define close(s) lwip_close(s) +/** @ingroup socket */ +#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val) +/** @ingroup socket */ +#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp) +#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ +#endif /* LWIP_COMPAT_SOCKETS != 2 */ + +#if LWIP_IPV4 && LWIP_IPV6 +/** @ingroup socket */ +#define inet_ntop(af,src,dst,size) \ + (((af) == AF_INET6) ? ip6addr_ntoa_r((const ip6_addr_t*)(src),(dst),(size)) \ + : (((af) == AF_INET) ? ip4addr_ntoa_r((const ip4_addr_t*)(src),(dst),(size)) : NULL)) +/** @ingroup socket */ +#define inet_pton(af,src,dst) \ + (((af) == AF_INET6) ? ip6addr_aton((src),(ip6_addr_t*)(dst)) \ + : (((af) == AF_INET) ? ip4addr_aton((src),(ip4_addr_t*)(dst)) : 0)) +#elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ +#define inet_ntop(af,src,dst,size) \ + (((af) == AF_INET) ? ip4addr_ntoa_r((const ip4_addr_t*)(src),(dst),(size)) : NULL) +#define inet_pton(af,src,dst) \ + (((af) == AF_INET) ? ip4addr_aton((src),(ip4_addr_t*)(dst)) : 0) +#else /* LWIP_IPV4 && LWIP_IPV6 */ +#define inet_ntop(af,src,dst,size) \ + (((af) == AF_INET6) ? ip6addr_ntoa_r((const ip6_addr_t*)(src),(dst),(size)) : NULL) +#define inet_pton(af,src,dst) \ + (((af) == AF_INET6) ? ip6addr_aton((src),(ip6_addr_t*)(dst)) : 0) +#endif /* LWIP_IPV4 && LWIP_IPV6 */ + +#endif /* LWIP_COMPAT_SOCKETS */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_SOCKET */ + +#endif /* LWIP_HDR_SOCKETS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/stats.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/stats.h index 5cde4a0..a0c818b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/stats.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/stats.h @@ -1,491 +1,491 @@ -/** - * @file - * Statistics API (to be used from TCPIP thread) - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_STATS_H -#define LWIP_HDR_STATS_H - -#include "lwip/opt.h" - -#include "lwip/mem.h" -#include "lwip/memp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_STATS - -#ifndef LWIP_STATS_LARGE -#define LWIP_STATS_LARGE 0 -#endif - -#if LWIP_STATS_LARGE -#define STAT_COUNTER u32_t -#define STAT_COUNTER_F U32_F -#else -#define STAT_COUNTER u16_t -#define STAT_COUNTER_F U16_F -#endif - -/** Protocol related stats */ -struct stats_proto { - STAT_COUNTER xmit; /* Transmitted packets. */ - STAT_COUNTER recv; /* Received packets. */ - STAT_COUNTER fw; /* Forwarded packets. */ - STAT_COUNTER drop; /* Dropped packets. */ - STAT_COUNTER chkerr; /* Checksum error. */ - STAT_COUNTER lenerr; /* Invalid length error. */ - STAT_COUNTER memerr; /* Out of memory error. */ - STAT_COUNTER rterr; /* Routing error. */ - STAT_COUNTER proterr; /* Protocol error. */ - STAT_COUNTER opterr; /* Error in options. */ - STAT_COUNTER err; /* Misc error. */ - STAT_COUNTER cachehit; -}; - -/** IGMP stats */ -struct stats_igmp { - STAT_COUNTER xmit; /* Transmitted packets. */ - STAT_COUNTER recv; /* Received packets. */ - STAT_COUNTER drop; /* Dropped packets. */ - STAT_COUNTER chkerr; /* Checksum error. */ - STAT_COUNTER lenerr; /* Invalid length error. */ - STAT_COUNTER memerr; /* Out of memory error. */ - STAT_COUNTER proterr; /* Protocol error. */ - STAT_COUNTER rx_v1; /* Received v1 frames. */ - STAT_COUNTER rx_group; /* Received group-specific queries. */ - STAT_COUNTER rx_general; /* Received general queries. */ - STAT_COUNTER rx_report; /* Received reports. */ - STAT_COUNTER tx_join; /* Sent joins. */ - STAT_COUNTER tx_leave; /* Sent leaves. */ - STAT_COUNTER tx_report; /* Sent reports. */ -}; - -/** Memory stats */ -struct stats_mem { -#if defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY - const char *name; -#endif /* defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY */ - STAT_COUNTER err; - mem_size_t avail; - mem_size_t used; - mem_size_t max; - STAT_COUNTER illegal; -}; - -/** System element stats */ -struct stats_syselem { - STAT_COUNTER used; - STAT_COUNTER max; - STAT_COUNTER err; -}; - -/** System stats */ -struct stats_sys { - struct stats_syselem sem; - struct stats_syselem mutex; - struct stats_syselem mbox; -}; - -/** SNMP MIB2 stats */ -struct stats_mib2 { - /* IP */ - u32_t ipinhdrerrors; - u32_t ipinaddrerrors; - u32_t ipinunknownprotos; - u32_t ipindiscards; - u32_t ipindelivers; - u32_t ipoutrequests; - u32_t ipoutdiscards; - u32_t ipoutnoroutes; - u32_t ipreasmoks; - u32_t ipreasmfails; - u32_t ipfragoks; - u32_t ipfragfails; - u32_t ipfragcreates; - u32_t ipreasmreqds; - u32_t ipforwdatagrams; - u32_t ipinreceives; - - /* TCP */ - u32_t tcpactiveopens; - u32_t tcppassiveopens; - u32_t tcpattemptfails; - u32_t tcpestabresets; - u32_t tcpoutsegs; - u32_t tcpretranssegs; - u32_t tcpinsegs; - u32_t tcpinerrs; - u32_t tcpoutrsts; - - /* UDP */ - u32_t udpindatagrams; - u32_t udpnoports; - u32_t udpinerrors; - u32_t udpoutdatagrams; - - /* ICMP */ - u32_t icmpinmsgs; - u32_t icmpinerrors; - u32_t icmpindestunreachs; - u32_t icmpintimeexcds; - u32_t icmpinparmprobs; - u32_t icmpinsrcquenchs; - u32_t icmpinredirects; - u32_t icmpinechos; - u32_t icmpinechoreps; - u32_t icmpintimestamps; - u32_t icmpintimestampreps; - u32_t icmpinaddrmasks; - u32_t icmpinaddrmaskreps; - u32_t icmpoutmsgs; - u32_t icmpouterrors; - u32_t icmpoutdestunreachs; - u32_t icmpouttimeexcds; - u32_t icmpoutechos; /* can be incremented by user application ('ping') */ - u32_t icmpoutechoreps; -}; - -/** - * @ingroup netif_mib2 - * SNMP MIB2 interface stats - */ -struct stats_mib2_netif_ctrs { - /** The total number of octets received on the interface, including framing characters */ - u32_t ifinoctets; - /** The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were - * not addressed to a multicast or broadcast address at this sub-layer */ - u32_t ifinucastpkts; - /** The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were - * addressed to a multicast or broadcast address at this sub-layer */ - u32_t ifinnucastpkts; - /** The number of inbound packets which were chosen to be discarded even though no errors had - * been detected to prevent their being deliverable to a higher-layer protocol. One possible - * reason for discarding such a packet could be to free up buffer space */ - u32_t ifindiscards; - /** For packet-oriented interfaces, the number of inbound packets that contained errors - * preventing them from being deliverable to a higher-layer protocol. For character- - * oriented or fixed-length interfaces, the number of inbound transmission units that - * contained errors preventing them from being deliverable to a higher-layer protocol. */ - u32_t ifinerrors; - /** For packet-oriented interfaces, the number of packets received via the interface which - * were discarded because of an unknown or unsupported protocol. For character-oriented - * or fixed-length interfaces that support protocol multiplexing the number of transmission - * units received via the interface which were discarded because of an unknown or unsupported - * protocol. For any interface that does not support protocol multiplexing, this counter will - * always be 0 */ - u32_t ifinunknownprotos; - /** The total number of octets transmitted out of the interface, including framing characters. */ - u32_t ifoutoctets; - /** The total number of packets that higher-level protocols requested be transmitted, and - * which were not addressed to a multicast or broadcast address at this sub-layer, including - * those that were discarded or not sent. */ - u32_t ifoutucastpkts; - /** The total number of packets that higher-level protocols requested be transmitted, and which - * were addressed to a multicast or broadcast address at this sub-layer, including - * those that were discarded or not sent. */ - u32_t ifoutnucastpkts; - /** The number of outbound packets which were chosen to be discarded even though no errors had - * been detected to prevent their being transmitted. One possible reason for discarding - * such a packet could be to free up buffer space. */ - u32_t ifoutdiscards; - /** For packet-oriented interfaces, the number of outbound packets that could not be transmitted - * because of errors. For character-oriented or fixed-length interfaces, the number of outbound - * transmission units that could not be transmitted because of errors. */ - u32_t ifouterrors; -}; - -/** lwIP stats container */ -struct stats_ { -#if LINK_STATS - /** Link level */ - struct stats_proto link; -#endif -#if ETHARP_STATS - /** ARP */ - struct stats_proto etharp; -#endif -#if IPFRAG_STATS - /** Fragmentation */ - struct stats_proto ip_frag; -#endif -#if IP_STATS - /** IP */ - struct stats_proto ip; -#endif -#if ICMP_STATS - /** ICMP */ - struct stats_proto icmp; -#endif -#if IGMP_STATS - /** IGMP */ - struct stats_igmp igmp; -#endif -#if UDP_STATS - /** UDP */ - struct stats_proto udp; -#endif -#if TCP_STATS - /** TCP */ - struct stats_proto tcp; -#endif -#if MEM_STATS - /** Heap */ - struct stats_mem mem; -#endif -#if MEMP_STATS - /** Internal memory pools */ - struct stats_mem *memp[MEMP_MAX]; -#endif -#if SYS_STATS - /** System */ - struct stats_sys sys; -#endif -#if IP6_STATS - /** IPv6 */ - struct stats_proto ip6; -#endif -#if ICMP6_STATS - /** ICMP6 */ - struct stats_proto icmp6; -#endif -#if IP6_FRAG_STATS - /** IPv6 fragmentation */ - struct stats_proto ip6_frag; -#endif -#if MLD6_STATS - /** Multicast listener discovery */ - struct stats_igmp mld6; -#endif -#if ND6_STATS - /** Neighbor discovery */ - struct stats_proto nd6; -#endif -#if MIB2_STATS - /** SNMP MIB2 */ - struct stats_mib2 mib2; -#endif -}; - -/** Global variable containing lwIP internal statistics. Add this to your debugger's watchlist. */ -extern struct stats_ lwip_stats; - -/** Init statistics */ -void stats_init(void); - -#define STATS_INC(x) ++lwip_stats.x -#define STATS_DEC(x) --lwip_stats.x -#define STATS_INC_USED(x, y) do { lwip_stats.x.used += y; \ - if (lwip_stats.x.max < lwip_stats.x.used) { \ - lwip_stats.x.max = lwip_stats.x.used; \ - } \ - } while(0) -#define STATS_GET(x) lwip_stats.x -#else /* LWIP_STATS */ -#define stats_init() -#define STATS_INC(x) -#define STATS_DEC(x) -#define STATS_INC_USED(x) -#endif /* LWIP_STATS */ - -#if TCP_STATS -#define TCP_STATS_INC(x) STATS_INC(x) -#define TCP_STATS_DISPLAY() stats_display_proto(&lwip_stats.tcp, "TCP") -#else -#define TCP_STATS_INC(x) -#define TCP_STATS_DISPLAY() -#endif - -#if UDP_STATS -#define UDP_STATS_INC(x) STATS_INC(x) -#define UDP_STATS_DISPLAY() stats_display_proto(&lwip_stats.udp, "UDP") -#else -#define UDP_STATS_INC(x) -#define UDP_STATS_DISPLAY() -#endif - -#if ICMP_STATS -#define ICMP_STATS_INC(x) STATS_INC(x) -#define ICMP_STATS_DISPLAY() stats_display_proto(&lwip_stats.icmp, "ICMP") -#else -#define ICMP_STATS_INC(x) -#define ICMP_STATS_DISPLAY() -#endif - -#if IGMP_STATS -#define IGMP_STATS_INC(x) STATS_INC(x) -#define IGMP_STATS_DISPLAY() stats_display_igmp(&lwip_stats.igmp, "IGMP") -#else -#define IGMP_STATS_INC(x) -#define IGMP_STATS_DISPLAY() -#endif - -#if IP_STATS -#define IP_STATS_INC(x) STATS_INC(x) -#define IP_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip, "IP") -#else -#define IP_STATS_INC(x) -#define IP_STATS_DISPLAY() -#endif - -#if IPFRAG_STATS -#define IPFRAG_STATS_INC(x) STATS_INC(x) -#define IPFRAG_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG") -#else -#define IPFRAG_STATS_INC(x) -#define IPFRAG_STATS_DISPLAY() -#endif - -#if ETHARP_STATS -#define ETHARP_STATS_INC(x) STATS_INC(x) -#define ETHARP_STATS_DISPLAY() stats_display_proto(&lwip_stats.etharp, "ETHARP") -#else -#define ETHARP_STATS_INC(x) -#define ETHARP_STATS_DISPLAY() -#endif - -#if LINK_STATS -#define LINK_STATS_INC(x) STATS_INC(x) -#define LINK_STATS_DISPLAY() stats_display_proto(&lwip_stats.link, "LINK") -#else -#define LINK_STATS_INC(x) -#define LINK_STATS_DISPLAY() -#endif - -#if MEM_STATS -#define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y -#define MEM_STATS_INC(x) SYS_ARCH_INC(lwip_stats.mem.x, 1) -#define MEM_STATS_INC_USED(x, y) SYS_ARCH_INC(lwip_stats.mem.x, y) -#define MEM_STATS_DEC_USED(x, y) SYS_ARCH_DEC(lwip_stats.mem.x, y) -#define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP") -#else -#define MEM_STATS_AVAIL(x, y) -#define MEM_STATS_INC(x) -#define MEM_STATS_INC_USED(x, y) -#define MEM_STATS_DEC_USED(x, y) -#define MEM_STATS_DISPLAY() -#endif - - #if MEMP_STATS -#define MEMP_STATS_DEC(x, i) STATS_DEC(memp[i]->x) -#define MEMP_STATS_DISPLAY(i) stats_display_memp(lwip_stats.memp[i], i) -#define MEMP_STATS_GET(x, i) STATS_GET(memp[i]->x) - #else -#define MEMP_STATS_DEC(x, i) -#define MEMP_STATS_DISPLAY(i) -#define MEMP_STATS_GET(x, i) 0 -#endif - -#if SYS_STATS -#define SYS_STATS_INC(x) STATS_INC(sys.x) -#define SYS_STATS_DEC(x) STATS_DEC(sys.x) -#define SYS_STATS_INC_USED(x) STATS_INC_USED(sys.x, 1) -#define SYS_STATS_DISPLAY() stats_display_sys(&lwip_stats.sys) -#else -#define SYS_STATS_INC(x) -#define SYS_STATS_DEC(x) -#define SYS_STATS_INC_USED(x) -#define SYS_STATS_DISPLAY() -#endif - -#if IP6_STATS -#define IP6_STATS_INC(x) STATS_INC(x) -#define IP6_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip6, "IPv6") -#else -#define IP6_STATS_INC(x) -#define IP6_STATS_DISPLAY() -#endif - -#if ICMP6_STATS -#define ICMP6_STATS_INC(x) STATS_INC(x) -#define ICMP6_STATS_DISPLAY() stats_display_proto(&lwip_stats.icmp6, "ICMPv6") -#else -#define ICMP6_STATS_INC(x) -#define ICMP6_STATS_DISPLAY() -#endif - -#if IP6_FRAG_STATS -#define IP6_FRAG_STATS_INC(x) STATS_INC(x) -#define IP6_FRAG_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip6_frag, "IPv6 FRAG") -#else -#define IP6_FRAG_STATS_INC(x) -#define IP6_FRAG_STATS_DISPLAY() -#endif - -#if MLD6_STATS -#define MLD6_STATS_INC(x) STATS_INC(x) -#define MLD6_STATS_DISPLAY() stats_display_igmp(&lwip_stats.mld6, "MLDv1") -#else -#define MLD6_STATS_INC(x) -#define MLD6_STATS_DISPLAY() -#endif - -#if ND6_STATS -#define ND6_STATS_INC(x) STATS_INC(x) -#define ND6_STATS_DISPLAY() stats_display_proto(&lwip_stats.nd6, "ND") -#else -#define ND6_STATS_INC(x) -#define ND6_STATS_DISPLAY() -#endif - -#if MIB2_STATS -#define MIB2_STATS_INC(x) STATS_INC(x) -#else -#define MIB2_STATS_INC(x) -#endif - -/* Display of statistics */ -#if LWIP_STATS_DISPLAY -void stats_display(void); -void stats_display_proto(struct stats_proto *proto, const char *name); -void stats_display_igmp(struct stats_igmp *igmp, const char *name); -void stats_display_mem(struct stats_mem *mem, const char *name); -void stats_display_memp(struct stats_mem *mem, int index); -void stats_display_sys(struct stats_sys *sys); -#else /* LWIP_STATS_DISPLAY */ -#define stats_display() -#define stats_display_proto(proto, name) -#define stats_display_igmp(igmp, name) -#define stats_display_mem(mem, name) -#define stats_display_memp(mem, index) -#define stats_display_sys(sys) -#endif /* LWIP_STATS_DISPLAY */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_STATS_H */ +/** + * @file + * Statistics API (to be used from TCPIP thread) + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_STATS_H +#define LWIP_HDR_STATS_H + +#include "lwip/opt.h" + +#include "lwip/mem.h" +#include "lwip/memp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_STATS + +#ifndef LWIP_STATS_LARGE +#define LWIP_STATS_LARGE 0 +#endif + +#if LWIP_STATS_LARGE +#define STAT_COUNTER u32_t +#define STAT_COUNTER_F U32_F +#else +#define STAT_COUNTER u16_t +#define STAT_COUNTER_F U16_F +#endif + +/** Protocol related stats */ +struct stats_proto { + STAT_COUNTER xmit; /* Transmitted packets. */ + STAT_COUNTER recv; /* Received packets. */ + STAT_COUNTER fw; /* Forwarded packets. */ + STAT_COUNTER drop; /* Dropped packets. */ + STAT_COUNTER chkerr; /* Checksum error. */ + STAT_COUNTER lenerr; /* Invalid length error. */ + STAT_COUNTER memerr; /* Out of memory error. */ + STAT_COUNTER rterr; /* Routing error. */ + STAT_COUNTER proterr; /* Protocol error. */ + STAT_COUNTER opterr; /* Error in options. */ + STAT_COUNTER err; /* Misc error. */ + STAT_COUNTER cachehit; +}; + +/** IGMP stats */ +struct stats_igmp { + STAT_COUNTER xmit; /* Transmitted packets. */ + STAT_COUNTER recv; /* Received packets. */ + STAT_COUNTER drop; /* Dropped packets. */ + STAT_COUNTER chkerr; /* Checksum error. */ + STAT_COUNTER lenerr; /* Invalid length error. */ + STAT_COUNTER memerr; /* Out of memory error. */ + STAT_COUNTER proterr; /* Protocol error. */ + STAT_COUNTER rx_v1; /* Received v1 frames. */ + STAT_COUNTER rx_group; /* Received group-specific queries. */ + STAT_COUNTER rx_general; /* Received general queries. */ + STAT_COUNTER rx_report; /* Received reports. */ + STAT_COUNTER tx_join; /* Sent joins. */ + STAT_COUNTER tx_leave; /* Sent leaves. */ + STAT_COUNTER tx_report; /* Sent reports. */ +}; + +/** Memory stats */ +struct stats_mem { +#if defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY + const char *name; +#endif /* defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY */ + STAT_COUNTER err; + mem_size_t avail; + mem_size_t used; + mem_size_t max; + STAT_COUNTER illegal; +}; + +/** System element stats */ +struct stats_syselem { + STAT_COUNTER used; + STAT_COUNTER max; + STAT_COUNTER err; +}; + +/** System stats */ +struct stats_sys { + struct stats_syselem sem; + struct stats_syselem mutex; + struct stats_syselem mbox; +}; + +/** SNMP MIB2 stats */ +struct stats_mib2 { + /* IP */ + u32_t ipinhdrerrors; + u32_t ipinaddrerrors; + u32_t ipinunknownprotos; + u32_t ipindiscards; + u32_t ipindelivers; + u32_t ipoutrequests; + u32_t ipoutdiscards; + u32_t ipoutnoroutes; + u32_t ipreasmoks; + u32_t ipreasmfails; + u32_t ipfragoks; + u32_t ipfragfails; + u32_t ipfragcreates; + u32_t ipreasmreqds; + u32_t ipforwdatagrams; + u32_t ipinreceives; + + /* TCP */ + u32_t tcpactiveopens; + u32_t tcppassiveopens; + u32_t tcpattemptfails; + u32_t tcpestabresets; + u32_t tcpoutsegs; + u32_t tcpretranssegs; + u32_t tcpinsegs; + u32_t tcpinerrs; + u32_t tcpoutrsts; + + /* UDP */ + u32_t udpindatagrams; + u32_t udpnoports; + u32_t udpinerrors; + u32_t udpoutdatagrams; + + /* ICMP */ + u32_t icmpinmsgs; + u32_t icmpinerrors; + u32_t icmpindestunreachs; + u32_t icmpintimeexcds; + u32_t icmpinparmprobs; + u32_t icmpinsrcquenchs; + u32_t icmpinredirects; + u32_t icmpinechos; + u32_t icmpinechoreps; + u32_t icmpintimestamps; + u32_t icmpintimestampreps; + u32_t icmpinaddrmasks; + u32_t icmpinaddrmaskreps; + u32_t icmpoutmsgs; + u32_t icmpouterrors; + u32_t icmpoutdestunreachs; + u32_t icmpouttimeexcds; + u32_t icmpoutechos; /* can be incremented by user application ('ping') */ + u32_t icmpoutechoreps; +}; + +/** + * @ingroup netif_mib2 + * SNMP MIB2 interface stats + */ +struct stats_mib2_netif_ctrs { + /** The total number of octets received on the interface, including framing characters */ + u32_t ifinoctets; + /** The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were + * not addressed to a multicast or broadcast address at this sub-layer */ + u32_t ifinucastpkts; + /** The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were + * addressed to a multicast or broadcast address at this sub-layer */ + u32_t ifinnucastpkts; + /** The number of inbound packets which were chosen to be discarded even though no errors had + * been detected to prevent their being deliverable to a higher-layer protocol. One possible + * reason for discarding such a packet could be to free up buffer space */ + u32_t ifindiscards; + /** For packet-oriented interfaces, the number of inbound packets that contained errors + * preventing them from being deliverable to a higher-layer protocol. For character- + * oriented or fixed-length interfaces, the number of inbound transmission units that + * contained errors preventing them from being deliverable to a higher-layer protocol. */ + u32_t ifinerrors; + /** For packet-oriented interfaces, the number of packets received via the interface which + * were discarded because of an unknown or unsupported protocol. For character-oriented + * or fixed-length interfaces that support protocol multiplexing the number of transmission + * units received via the interface which were discarded because of an unknown or unsupported + * protocol. For any interface that does not support protocol multiplexing, this counter will + * always be 0 */ + u32_t ifinunknownprotos; + /** The total number of octets transmitted out of the interface, including framing characters. */ + u32_t ifoutoctets; + /** The total number of packets that higher-level protocols requested be transmitted, and + * which were not addressed to a multicast or broadcast address at this sub-layer, including + * those that were discarded or not sent. */ + u32_t ifoutucastpkts; + /** The total number of packets that higher-level protocols requested be transmitted, and which + * were addressed to a multicast or broadcast address at this sub-layer, including + * those that were discarded or not sent. */ + u32_t ifoutnucastpkts; + /** The number of outbound packets which were chosen to be discarded even though no errors had + * been detected to prevent their being transmitted. One possible reason for discarding + * such a packet could be to free up buffer space. */ + u32_t ifoutdiscards; + /** For packet-oriented interfaces, the number of outbound packets that could not be transmitted + * because of errors. For character-oriented or fixed-length interfaces, the number of outbound + * transmission units that could not be transmitted because of errors. */ + u32_t ifouterrors; +}; + +/** lwIP stats container */ +struct stats_ { +#if LINK_STATS + /** Link level */ + struct stats_proto link; +#endif +#if ETHARP_STATS + /** ARP */ + struct stats_proto etharp; +#endif +#if IPFRAG_STATS + /** Fragmentation */ + struct stats_proto ip_frag; +#endif +#if IP_STATS + /** IP */ + struct stats_proto ip; +#endif +#if ICMP_STATS + /** ICMP */ + struct stats_proto icmp; +#endif +#if IGMP_STATS + /** IGMP */ + struct stats_igmp igmp; +#endif +#if UDP_STATS + /** UDP */ + struct stats_proto udp; +#endif +#if TCP_STATS + /** TCP */ + struct stats_proto tcp; +#endif +#if MEM_STATS + /** Heap */ + struct stats_mem mem; +#endif +#if MEMP_STATS + /** Internal memory pools */ + struct stats_mem *memp[MEMP_MAX]; +#endif +#if SYS_STATS + /** System */ + struct stats_sys sys; +#endif +#if IP6_STATS + /** IPv6 */ + struct stats_proto ip6; +#endif +#if ICMP6_STATS + /** ICMP6 */ + struct stats_proto icmp6; +#endif +#if IP6_FRAG_STATS + /** IPv6 fragmentation */ + struct stats_proto ip6_frag; +#endif +#if MLD6_STATS + /** Multicast listener discovery */ + struct stats_igmp mld6; +#endif +#if ND6_STATS + /** Neighbor discovery */ + struct stats_proto nd6; +#endif +#if MIB2_STATS + /** SNMP MIB2 */ + struct stats_mib2 mib2; +#endif +}; + +/** Global variable containing lwIP internal statistics. Add this to your debugger's watchlist. */ +extern struct stats_ lwip_stats; + +/** Init statistics */ +void stats_init(void); + +#define STATS_INC(x) ++lwip_stats.x +#define STATS_DEC(x) --lwip_stats.x +#define STATS_INC_USED(x, y) do { lwip_stats.x.used += y; \ + if (lwip_stats.x.max < lwip_stats.x.used) { \ + lwip_stats.x.max = lwip_stats.x.used; \ + } \ + } while(0) +#define STATS_GET(x) lwip_stats.x +#else /* LWIP_STATS */ +#define stats_init() +#define STATS_INC(x) +#define STATS_DEC(x) +#define STATS_INC_USED(x) +#endif /* LWIP_STATS */ + +#if TCP_STATS +#define TCP_STATS_INC(x) STATS_INC(x) +#define TCP_STATS_DISPLAY() stats_display_proto(&lwip_stats.tcp, "TCP") +#else +#define TCP_STATS_INC(x) +#define TCP_STATS_DISPLAY() +#endif + +#if UDP_STATS +#define UDP_STATS_INC(x) STATS_INC(x) +#define UDP_STATS_DISPLAY() stats_display_proto(&lwip_stats.udp, "UDP") +#else +#define UDP_STATS_INC(x) +#define UDP_STATS_DISPLAY() +#endif + +#if ICMP_STATS +#define ICMP_STATS_INC(x) STATS_INC(x) +#define ICMP_STATS_DISPLAY() stats_display_proto(&lwip_stats.icmp, "ICMP") +#else +#define ICMP_STATS_INC(x) +#define ICMP_STATS_DISPLAY() +#endif + +#if IGMP_STATS +#define IGMP_STATS_INC(x) STATS_INC(x) +#define IGMP_STATS_DISPLAY() stats_display_igmp(&lwip_stats.igmp, "IGMP") +#else +#define IGMP_STATS_INC(x) +#define IGMP_STATS_DISPLAY() +#endif + +#if IP_STATS +#define IP_STATS_INC(x) STATS_INC(x) +#define IP_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip, "IP") +#else +#define IP_STATS_INC(x) +#define IP_STATS_DISPLAY() +#endif + +#if IPFRAG_STATS +#define IPFRAG_STATS_INC(x) STATS_INC(x) +#define IPFRAG_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG") +#else +#define IPFRAG_STATS_INC(x) +#define IPFRAG_STATS_DISPLAY() +#endif + +#if ETHARP_STATS +#define ETHARP_STATS_INC(x) STATS_INC(x) +#define ETHARP_STATS_DISPLAY() stats_display_proto(&lwip_stats.etharp, "ETHARP") +#else +#define ETHARP_STATS_INC(x) +#define ETHARP_STATS_DISPLAY() +#endif + +#if LINK_STATS +#define LINK_STATS_INC(x) STATS_INC(x) +#define LINK_STATS_DISPLAY() stats_display_proto(&lwip_stats.link, "LINK") +#else +#define LINK_STATS_INC(x) +#define LINK_STATS_DISPLAY() +#endif + +#if MEM_STATS +#define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y +#define MEM_STATS_INC(x) SYS_ARCH_INC(lwip_stats.mem.x, 1) +#define MEM_STATS_INC_USED(x, y) SYS_ARCH_INC(lwip_stats.mem.x, y) +#define MEM_STATS_DEC_USED(x, y) SYS_ARCH_DEC(lwip_stats.mem.x, y) +#define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP") +#else +#define MEM_STATS_AVAIL(x, y) +#define MEM_STATS_INC(x) +#define MEM_STATS_INC_USED(x, y) +#define MEM_STATS_DEC_USED(x, y) +#define MEM_STATS_DISPLAY() +#endif + + #if MEMP_STATS +#define MEMP_STATS_DEC(x, i) STATS_DEC(memp[i]->x) +#define MEMP_STATS_DISPLAY(i) stats_display_memp(lwip_stats.memp[i], i) +#define MEMP_STATS_GET(x, i) STATS_GET(memp[i]->x) + #else +#define MEMP_STATS_DEC(x, i) +#define MEMP_STATS_DISPLAY(i) +#define MEMP_STATS_GET(x, i) 0 +#endif + +#if SYS_STATS +#define SYS_STATS_INC(x) STATS_INC(sys.x) +#define SYS_STATS_DEC(x) STATS_DEC(sys.x) +#define SYS_STATS_INC_USED(x) STATS_INC_USED(sys.x, 1) +#define SYS_STATS_DISPLAY() stats_display_sys(&lwip_stats.sys) +#else +#define SYS_STATS_INC(x) +#define SYS_STATS_DEC(x) +#define SYS_STATS_INC_USED(x) +#define SYS_STATS_DISPLAY() +#endif + +#if IP6_STATS +#define IP6_STATS_INC(x) STATS_INC(x) +#define IP6_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip6, "IPv6") +#else +#define IP6_STATS_INC(x) +#define IP6_STATS_DISPLAY() +#endif + +#if ICMP6_STATS +#define ICMP6_STATS_INC(x) STATS_INC(x) +#define ICMP6_STATS_DISPLAY() stats_display_proto(&lwip_stats.icmp6, "ICMPv6") +#else +#define ICMP6_STATS_INC(x) +#define ICMP6_STATS_DISPLAY() +#endif + +#if IP6_FRAG_STATS +#define IP6_FRAG_STATS_INC(x) STATS_INC(x) +#define IP6_FRAG_STATS_DISPLAY() stats_display_proto(&lwip_stats.ip6_frag, "IPv6 FRAG") +#else +#define IP6_FRAG_STATS_INC(x) +#define IP6_FRAG_STATS_DISPLAY() +#endif + +#if MLD6_STATS +#define MLD6_STATS_INC(x) STATS_INC(x) +#define MLD6_STATS_DISPLAY() stats_display_igmp(&lwip_stats.mld6, "MLDv1") +#else +#define MLD6_STATS_INC(x) +#define MLD6_STATS_DISPLAY() +#endif + +#if ND6_STATS +#define ND6_STATS_INC(x) STATS_INC(x) +#define ND6_STATS_DISPLAY() stats_display_proto(&lwip_stats.nd6, "ND") +#else +#define ND6_STATS_INC(x) +#define ND6_STATS_DISPLAY() +#endif + +#if MIB2_STATS +#define MIB2_STATS_INC(x) STATS_INC(x) +#else +#define MIB2_STATS_INC(x) +#endif + +/* Display of statistics */ +#if LWIP_STATS_DISPLAY +void stats_display(void); +void stats_display_proto(struct stats_proto *proto, const char *name); +void stats_display_igmp(struct stats_igmp *igmp, const char *name); +void stats_display_mem(struct stats_mem *mem, const char *name); +void stats_display_memp(struct stats_mem *mem, int index); +void stats_display_sys(struct stats_sys *sys); +#else /* LWIP_STATS_DISPLAY */ +#define stats_display() +#define stats_display_proto(proto, name) +#define stats_display_igmp(igmp, name) +#define stats_display_mem(mem, name) +#define stats_display_memp(mem, index) +#define stats_display_sys(sys) +#endif /* LWIP_STATS_DISPLAY */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_STATS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sys.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sys.h index d12bae0..98c38d7 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sys.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/sys.h @@ -1,455 +1,455 @@ -/** - * @file - * OS abstraction layer - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - */ - -#ifndef LWIP_HDR_SYS_H -#define LWIP_HDR_SYS_H - -#include "lwip/opt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if NO_SYS - -/* For a totally minimal and standalone system, we provide null - definitions of the sys_ functions. */ -typedef u8_t sys_sem_t; -typedef u8_t sys_mutex_t; -typedef u8_t sys_mbox_t; - -#define sys_sem_new(s, c) ERR_OK -#define sys_sem_signal(s) -#define sys_sem_wait(s) -#define sys_arch_sem_wait(s,t) -#define sys_sem_free(s) -#define sys_sem_valid(s) 0 -#define sys_sem_valid_val(s) 0 -#define sys_sem_set_invalid(s) -#define sys_sem_set_invalid_val(s) -#define sys_mutex_new(mu) ERR_OK -#define sys_mutex_lock(mu) -#define sys_mutex_unlock(mu) -#define sys_mutex_free(mu) -#define sys_mutex_valid(mu) 0 -#define sys_mutex_set_invalid(mu) -#define sys_mbox_new(m, s) ERR_OK -#define sys_mbox_fetch(m,d) -#define sys_mbox_tryfetch(m,d) -#define sys_mbox_post(m,d) -#define sys_mbox_trypost(m,d) -#define sys_mbox_free(m) -#define sys_mbox_valid(m) -#define sys_mbox_valid_val(m) -#define sys_mbox_set_invalid(m) -#define sys_mbox_set_invalid_val(m) - -#define sys_thread_new(n,t,a,s,p) - -#define sys_msleep(t) - -#else /* NO_SYS */ - -/** Return code for timeouts from sys_arch_mbox_fetch and sys_arch_sem_wait */ -#define SYS_ARCH_TIMEOUT 0xffffffffUL - -/** sys_mbox_tryfetch() returns SYS_MBOX_EMPTY if appropriate. - * For now we use the same magic value, but we allow this to change in future. - */ -#define SYS_MBOX_EMPTY SYS_ARCH_TIMEOUT - -#include "lwip/err.h" -#include "arch/sys_arch.h" - -/** Function prototype for thread functions */ -typedef void (*lwip_thread_fn)(void *arg); - -/* Function prototypes for functions to be implemented by platform ports - (in sys_arch.c) */ - -/* Mutex functions: */ - -/** Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary semaphores - should be used instead */ -#ifndef LWIP_COMPAT_MUTEX -#define LWIP_COMPAT_MUTEX 0 -#endif - -#if LWIP_COMPAT_MUTEX -/* for old ports that don't have mutexes: define them to binary semaphores */ -#define sys_mutex_t sys_sem_t -#define sys_mutex_new(mutex) sys_sem_new(mutex, 1) -#define sys_mutex_lock(mutex) sys_sem_wait(mutex) -#define sys_mutex_unlock(mutex) sys_sem_signal(mutex) -#define sys_mutex_free(mutex) sys_sem_free(mutex) -#define sys_mutex_valid(mutex) sys_sem_valid(mutex) -#define sys_mutex_set_invalid(mutex) sys_sem_set_invalid(mutex) - -#else /* LWIP_COMPAT_MUTEX */ - -/** - * @ingroup sys_mutex - * Create a new mutex. - * Note that mutexes are expected to not be taken recursively by the lwIP code, - * so both implementation types (recursive or non-recursive) should work. - * @param mutex pointer to the mutex to create - * @return ERR_OK if successful, another err_t otherwise - */ -err_t sys_mutex_new(sys_mutex_t *mutex); -/** - * @ingroup sys_mutex - * Lock a mutex - * @param mutex the mutex to lock - */ -void sys_mutex_lock(sys_mutex_t *mutex); -/** - * @ingroup sys_mutex - * Unlock a mutex - * @param mutex the mutex to unlock - */ -void sys_mutex_unlock(sys_mutex_t *mutex); -/** - * @ingroup sys_mutex - * Delete a semaphore - * @param mutex the mutex to delete - */ -void sys_mutex_free(sys_mutex_t *mutex); -#ifndef sys_mutex_valid -/** - * @ingroup sys_mutex - * Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid - */ -int sys_mutex_valid(sys_mutex_t *mutex); -#endif -#ifndef sys_mutex_set_invalid -/** - * @ingroup sys_mutex - * Set a mutex invalid so that sys_mutex_valid returns 0 - */ -void sys_mutex_set_invalid(sys_mutex_t *mutex); -#endif -#endif /* LWIP_COMPAT_MUTEX */ - -/* Semaphore functions: */ - -/** - * @ingroup sys_sem - * Create a new semaphore - * @param sem pointer to the semaphore to create - * @param count initial count of the semaphore - * @return ERR_OK if successful, another err_t otherwise - */ -err_t sys_sem_new(sys_sem_t *sem, u8_t count); -/** - * @ingroup sys_sem - * Signals a semaphore - * @param sem the semaphore to signal - */ -void sys_sem_signal(sys_sem_t *sem); -/** - * @ingroup sys_sem - * Wait for a semaphore for the specified timeout - * @param sem the semaphore to wait for - * @param timeout timeout in milliseconds to wait (0 = wait forever) - * @return time (in milliseconds) waited for the semaphore - * or SYS_ARCH_TIMEOUT on timeout - */ -u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout); -/** - * @ingroup sys_sem - * Delete a semaphore - * @param sem semaphore to delete - */ -void sys_sem_free(sys_sem_t *sem); -/** Wait for a semaphore - forever/no timeout */ -#define sys_sem_wait(sem) sys_arch_sem_wait(sem, 0) -#ifndef sys_sem_valid -/** - * @ingroup sys_sem - * Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid - */ -int sys_sem_valid(sys_sem_t *sem); -#endif -#ifndef sys_sem_set_invalid -/** - * @ingroup sys_sem - * Set a semaphore invalid so that sys_sem_valid returns 0 - */ -void sys_sem_set_invalid(sys_sem_t *sem); -#endif -#ifndef sys_sem_valid_val -/** - * Same as sys_sem_valid() but taking a value, not a pointer - */ -#define sys_sem_valid_val(sem) sys_sem_valid(&(sem)) -#endif -#ifndef sys_sem_set_invalid_val -/** - * Same as sys_sem_set_invalid() but taking a value, not a pointer - */ -#define sys_sem_set_invalid_val(sem) sys_sem_set_invalid(&(sem)) -#endif - -#ifndef sys_msleep -/** - * @ingroup sys_misc - * Sleep for specified number of ms - */ -void sys_msleep(u32_t ms); /* only has a (close to) 1 ms resolution. */ -#endif - -/* Mailbox functions. */ - -/** - * @ingroup sys_mbox - * Create a new mbox of specified size - * @param mbox pointer to the mbox to create - * @param size (minimum) number of messages in this mbox - * @return ERR_OK if successful, another err_t otherwise - */ -err_t sys_mbox_new(sys_mbox_t *mbox, int size); -/** - * @ingroup sys_mbox - * Post a message to an mbox - may not fail - * -> blocks if full, only used from tasks not from ISR - * @param mbox mbox to posts the message - * @param msg message to post (ATTENTION: can be NULL) - */ -void sys_mbox_post(sys_mbox_t *mbox, void *msg); -/** - * @ingroup sys_mbox - * Try to post a message to an mbox - may fail if full or ISR - * @param mbox mbox to posts the message - * @param msg message to post (ATTENTION: can be NULL) - */ -err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg); -/** - * @ingroup sys_mbox - * Wait for a new message to arrive in the mbox - * @param mbox mbox to get a message from - * @param msg pointer where the message is stored - * @param timeout maximum time (in milliseconds) to wait for a message (0 = wait forever) - * @return time (in milliseconds) waited for a message, may be 0 if not waited - or SYS_ARCH_TIMEOUT on timeout - * The returned time has to be accurate to prevent timer jitter! - */ -u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout); -/* Allow port to override with a macro, e.g. special timeout for sys_arch_mbox_fetch() */ -#ifndef sys_arch_mbox_tryfetch -/** - * @ingroup sys_mbox - * Wait for a new message to arrive in the mbox - * @param mbox mbox to get a message from - * @param msg pointer where the message is stored - * @return 0 (milliseconds) if a message has been received - * or SYS_MBOX_EMPTY if the mailbox is empty - */ -u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg); -#endif -/** - * For now, we map straight to sys_arch implementation. - */ -#define sys_mbox_tryfetch(mbox, msg) sys_arch_mbox_tryfetch(mbox, msg) -/** - * @ingroup sys_mbox - * Delete an mbox - * @param mbox mbox to delete - */ -void sys_mbox_free(sys_mbox_t *mbox); -#define sys_mbox_fetch(mbox, msg) sys_arch_mbox_fetch(mbox, msg, 0) -#ifndef sys_mbox_valid -/** - * @ingroup sys_mbox - * Check if an mbox is valid/allocated: return 1 for valid, 0 for invalid - */ -int sys_mbox_valid(sys_mbox_t *mbox); -#endif -#ifndef sys_mbox_set_invalid -/** - * @ingroup sys_mbox - * Set an mbox invalid so that sys_mbox_valid returns 0 - */ -void sys_mbox_set_invalid(sys_mbox_t *mbox); -#endif -#ifndef sys_mbox_valid_val -/** - * Same as sys_mbox_valid() but taking a value, not a pointer - */ -#define sys_mbox_valid_val(mbox) sys_mbox_valid(&(mbox)) -#endif -#ifndef sys_mbox_set_invalid_val -/** - * Same as sys_mbox_set_invalid() but taking a value, not a pointer - */ -#define sys_mbox_set_invalid_val(mbox) sys_mbox_set_invalid(&(mbox)) -#endif - - -/** - * @ingroup sys_misc - * The only thread function: - * Creates a new thread - * ATTENTION: although this function returns a value, it MUST NOT FAIL (ports have to assert this!) - * @param name human-readable name for the thread (used for debugging purposes) - * @param thread thread-function - * @param arg parameter passed to 'thread' - * @param stacksize stack size in bytes for the new thread (may be ignored by ports) - * @param prio priority of the new thread (may be ignored by ports) */ -sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio); - -#endif /* NO_SYS */ - -/* sys_init() must be called before anything else. */ -void sys_init(void); - -#ifndef sys_jiffies -/** - * Ticks/jiffies since power up. - */ -u32_t sys_jiffies(void); -#endif - -/** - * @ingroup sys_time - * Returns the current time in milliseconds, - * may be the same as sys_jiffies or at least based on it. - */ -u32_t sys_now(void); - -/* Critical Region Protection */ -/* These functions must be implemented in the sys_arch.c file. - In some implementations they can provide a more light-weight protection - mechanism than using semaphores. Otherwise semaphores can be used for - implementation */ -#ifndef SYS_ARCH_PROTECT -/** SYS_LIGHTWEIGHT_PROT - * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection - * for certain critical regions during buffer allocation, deallocation and memory - * allocation and deallocation. - */ -#if SYS_LIGHTWEIGHT_PROT - -/** - * @ingroup sys_prot - * SYS_ARCH_DECL_PROTECT - * declare a protection variable. This macro will default to defining a variable of - * type sys_prot_t. If a particular port needs a different implementation, then - * this macro may be defined in sys_arch.h. - */ -#define SYS_ARCH_DECL_PROTECT(lev) sys_prot_t lev -/** - * @ingroup sys_prot - * SYS_ARCH_PROTECT - * Perform a "fast" protect. This could be implemented by - * disabling interrupts for an embedded system or by using a semaphore or - * mutex. The implementation should allow calling SYS_ARCH_PROTECT when - * already protected. The old protection level is returned in the variable - * "lev". This macro will default to calling the sys_arch_protect() function - * which should be implemented in sys_arch.c. If a particular port needs a - * different implementation, then this macro may be defined in sys_arch.h - */ -#define SYS_ARCH_PROTECT(lev) lev = sys_arch_protect() -/** - * @ingroup sys_prot - * SYS_ARCH_UNPROTECT - * Perform a "fast" set of the protection level to "lev". This could be - * implemented by setting the interrupt level to "lev" within the MACRO or by - * using a semaphore or mutex. This macro will default to calling the - * sys_arch_unprotect() function which should be implemented in - * sys_arch.c. If a particular port needs a different implementation, then - * this macro may be defined in sys_arch.h - */ -#define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect(lev) -sys_prot_t sys_arch_protect(void); -void sys_arch_unprotect(sys_prot_t pval); - -#else - -#define SYS_ARCH_DECL_PROTECT(lev) -#define SYS_ARCH_PROTECT(lev) -#define SYS_ARCH_UNPROTECT(lev) - -#endif /* SYS_LIGHTWEIGHT_PROT */ - -#endif /* SYS_ARCH_PROTECT */ - -/* - * Macros to set/get and increase/decrease variables in a thread-safe way. - * Use these for accessing variable that are used from more than one thread. - */ - -#ifndef SYS_ARCH_INC -#define SYS_ARCH_INC(var, val) do { \ - SYS_ARCH_DECL_PROTECT(old_level); \ - SYS_ARCH_PROTECT(old_level); \ - var += val; \ - SYS_ARCH_UNPROTECT(old_level); \ - } while(0) -#endif /* SYS_ARCH_INC */ - -#ifndef SYS_ARCH_DEC -#define SYS_ARCH_DEC(var, val) do { \ - SYS_ARCH_DECL_PROTECT(old_level); \ - SYS_ARCH_PROTECT(old_level); \ - var -= val; \ - SYS_ARCH_UNPROTECT(old_level); \ - } while(0) -#endif /* SYS_ARCH_DEC */ - -#ifndef SYS_ARCH_GET -#define SYS_ARCH_GET(var, ret) do { \ - SYS_ARCH_DECL_PROTECT(old_level); \ - SYS_ARCH_PROTECT(old_level); \ - ret = var; \ - SYS_ARCH_UNPROTECT(old_level); \ - } while(0) -#endif /* SYS_ARCH_GET */ - -#ifndef SYS_ARCH_SET -#define SYS_ARCH_SET(var, val) do { \ - SYS_ARCH_DECL_PROTECT(old_level); \ - SYS_ARCH_PROTECT(old_level); \ - var = val; \ - SYS_ARCH_UNPROTECT(old_level); \ - } while(0) -#endif /* SYS_ARCH_SET */ - - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_SYS_H */ +/** + * @file + * OS abstraction layer + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + */ + +#ifndef LWIP_HDR_SYS_H +#define LWIP_HDR_SYS_H + +#include "lwip/opt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if NO_SYS + +/* For a totally minimal and standalone system, we provide null + definitions of the sys_ functions. */ +typedef u8_t sys_sem_t; +typedef u8_t sys_mutex_t; +typedef u8_t sys_mbox_t; + +#define sys_sem_new(s, c) ERR_OK +#define sys_sem_signal(s) +#define sys_sem_wait(s) +#define sys_arch_sem_wait(s,t) +#define sys_sem_free(s) +#define sys_sem_valid(s) 0 +#define sys_sem_valid_val(s) 0 +#define sys_sem_set_invalid(s) +#define sys_sem_set_invalid_val(s) +#define sys_mutex_new(mu) ERR_OK +#define sys_mutex_lock(mu) +#define sys_mutex_unlock(mu) +#define sys_mutex_free(mu) +#define sys_mutex_valid(mu) 0 +#define sys_mutex_set_invalid(mu) +#define sys_mbox_new(m, s) ERR_OK +#define sys_mbox_fetch(m,d) +#define sys_mbox_tryfetch(m,d) +#define sys_mbox_post(m,d) +#define sys_mbox_trypost(m,d) +#define sys_mbox_free(m) +#define sys_mbox_valid(m) +#define sys_mbox_valid_val(m) +#define sys_mbox_set_invalid(m) +#define sys_mbox_set_invalid_val(m) + +#define sys_thread_new(n,t,a,s,p) + +#define sys_msleep(t) + +#else /* NO_SYS */ + +/** Return code for timeouts from sys_arch_mbox_fetch and sys_arch_sem_wait */ +#define SYS_ARCH_TIMEOUT 0xffffffffUL + +/** sys_mbox_tryfetch() returns SYS_MBOX_EMPTY if appropriate. + * For now we use the same magic value, but we allow this to change in future. + */ +#define SYS_MBOX_EMPTY SYS_ARCH_TIMEOUT + +#include "lwip/err.h" +#include "arch/sys_arch.h" + +/** Function prototype for thread functions */ +typedef void (*lwip_thread_fn)(void *arg); + +/* Function prototypes for functions to be implemented by platform ports + (in sys_arch.c) */ + +/* Mutex functions: */ + +/** Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary semaphores + should be used instead */ +#ifndef LWIP_COMPAT_MUTEX +#define LWIP_COMPAT_MUTEX 0 +#endif + +#if LWIP_COMPAT_MUTEX +/* for old ports that don't have mutexes: define them to binary semaphores */ +#define sys_mutex_t sys_sem_t +#define sys_mutex_new(mutex) sys_sem_new(mutex, 1) +#define sys_mutex_lock(mutex) sys_sem_wait(mutex) +#define sys_mutex_unlock(mutex) sys_sem_signal(mutex) +#define sys_mutex_free(mutex) sys_sem_free(mutex) +#define sys_mutex_valid(mutex) sys_sem_valid(mutex) +#define sys_mutex_set_invalid(mutex) sys_sem_set_invalid(mutex) + +#else /* LWIP_COMPAT_MUTEX */ + +/** + * @ingroup sys_mutex + * Create a new mutex. + * Note that mutexes are expected to not be taken recursively by the lwIP code, + * so both implementation types (recursive or non-recursive) should work. + * @param mutex pointer to the mutex to create + * @return ERR_OK if successful, another err_t otherwise + */ +err_t sys_mutex_new(sys_mutex_t *mutex); +/** + * @ingroup sys_mutex + * Lock a mutex + * @param mutex the mutex to lock + */ +void sys_mutex_lock(sys_mutex_t *mutex); +/** + * @ingroup sys_mutex + * Unlock a mutex + * @param mutex the mutex to unlock + */ +void sys_mutex_unlock(sys_mutex_t *mutex); +/** + * @ingroup sys_mutex + * Delete a semaphore + * @param mutex the mutex to delete + */ +void sys_mutex_free(sys_mutex_t *mutex); +#ifndef sys_mutex_valid +/** + * @ingroup sys_mutex + * Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid + */ +int sys_mutex_valid(sys_mutex_t *mutex); +#endif +#ifndef sys_mutex_set_invalid +/** + * @ingroup sys_mutex + * Set a mutex invalid so that sys_mutex_valid returns 0 + */ +void sys_mutex_set_invalid(sys_mutex_t *mutex); +#endif +#endif /* LWIP_COMPAT_MUTEX */ + +/* Semaphore functions: */ + +/** + * @ingroup sys_sem + * Create a new semaphore + * @param sem pointer to the semaphore to create + * @param count initial count of the semaphore + * @return ERR_OK if successful, another err_t otherwise + */ +err_t sys_sem_new(sys_sem_t *sem, u8_t count); +/** + * @ingroup sys_sem + * Signals a semaphore + * @param sem the semaphore to signal + */ +void sys_sem_signal(sys_sem_t *sem); +/** + * @ingroup sys_sem + * Wait for a semaphore for the specified timeout + * @param sem the semaphore to wait for + * @param timeout timeout in milliseconds to wait (0 = wait forever) + * @return time (in milliseconds) waited for the semaphore + * or SYS_ARCH_TIMEOUT on timeout + */ +u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout); +/** + * @ingroup sys_sem + * Delete a semaphore + * @param sem semaphore to delete + */ +void sys_sem_free(sys_sem_t *sem); +/** Wait for a semaphore - forever/no timeout */ +#define sys_sem_wait(sem) sys_arch_sem_wait(sem, 0) +#ifndef sys_sem_valid +/** + * @ingroup sys_sem + * Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid + */ +int sys_sem_valid(sys_sem_t *sem); +#endif +#ifndef sys_sem_set_invalid +/** + * @ingroup sys_sem + * Set a semaphore invalid so that sys_sem_valid returns 0 + */ +void sys_sem_set_invalid(sys_sem_t *sem); +#endif +#ifndef sys_sem_valid_val +/** + * Same as sys_sem_valid() but taking a value, not a pointer + */ +#define sys_sem_valid_val(sem) sys_sem_valid(&(sem)) +#endif +#ifndef sys_sem_set_invalid_val +/** + * Same as sys_sem_set_invalid() but taking a value, not a pointer + */ +#define sys_sem_set_invalid_val(sem) sys_sem_set_invalid(&(sem)) +#endif + +#ifndef sys_msleep +/** + * @ingroup sys_misc + * Sleep for specified number of ms + */ +void sys_msleep(u32_t ms); /* only has a (close to) 1 ms resolution. */ +#endif + +/* Mailbox functions. */ + +/** + * @ingroup sys_mbox + * Create a new mbox of specified size + * @param mbox pointer to the mbox to create + * @param size (minimum) number of messages in this mbox + * @return ERR_OK if successful, another err_t otherwise + */ +err_t sys_mbox_new(sys_mbox_t *mbox, int size); +/** + * @ingroup sys_mbox + * Post a message to an mbox - may not fail + * -> blocks if full, only used from tasks not from ISR + * @param mbox mbox to posts the message + * @param msg message to post (ATTENTION: can be NULL) + */ +void sys_mbox_post(sys_mbox_t *mbox, void *msg); +/** + * @ingroup sys_mbox + * Try to post a message to an mbox - may fail if full or ISR + * @param mbox mbox to posts the message + * @param msg message to post (ATTENTION: can be NULL) + */ +err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg); +/** + * @ingroup sys_mbox + * Wait for a new message to arrive in the mbox + * @param mbox mbox to get a message from + * @param msg pointer where the message is stored + * @param timeout maximum time (in milliseconds) to wait for a message (0 = wait forever) + * @return time (in milliseconds) waited for a message, may be 0 if not waited + or SYS_ARCH_TIMEOUT on timeout + * The returned time has to be accurate to prevent timer jitter! + */ +u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout); +/* Allow port to override with a macro, e.g. special timeout for sys_arch_mbox_fetch() */ +#ifndef sys_arch_mbox_tryfetch +/** + * @ingroup sys_mbox + * Wait for a new message to arrive in the mbox + * @param mbox mbox to get a message from + * @param msg pointer where the message is stored + * @return 0 (milliseconds) if a message has been received + * or SYS_MBOX_EMPTY if the mailbox is empty + */ +u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg); +#endif +/** + * For now, we map straight to sys_arch implementation. + */ +#define sys_mbox_tryfetch(mbox, msg) sys_arch_mbox_tryfetch(mbox, msg) +/** + * @ingroup sys_mbox + * Delete an mbox + * @param mbox mbox to delete + */ +void sys_mbox_free(sys_mbox_t *mbox); +#define sys_mbox_fetch(mbox, msg) sys_arch_mbox_fetch(mbox, msg, 0) +#ifndef sys_mbox_valid +/** + * @ingroup sys_mbox + * Check if an mbox is valid/allocated: return 1 for valid, 0 for invalid + */ +int sys_mbox_valid(sys_mbox_t *mbox); +#endif +#ifndef sys_mbox_set_invalid +/** + * @ingroup sys_mbox + * Set an mbox invalid so that sys_mbox_valid returns 0 + */ +void sys_mbox_set_invalid(sys_mbox_t *mbox); +#endif +#ifndef sys_mbox_valid_val +/** + * Same as sys_mbox_valid() but taking a value, not a pointer + */ +#define sys_mbox_valid_val(mbox) sys_mbox_valid(&(mbox)) +#endif +#ifndef sys_mbox_set_invalid_val +/** + * Same as sys_mbox_set_invalid() but taking a value, not a pointer + */ +#define sys_mbox_set_invalid_val(mbox) sys_mbox_set_invalid(&(mbox)) +#endif + + +/** + * @ingroup sys_misc + * The only thread function: + * Creates a new thread + * ATTENTION: although this function returns a value, it MUST NOT FAIL (ports have to assert this!) + * @param name human-readable name for the thread (used for debugging purposes) + * @param thread thread-function + * @param arg parameter passed to 'thread' + * @param stacksize stack size in bytes for the new thread (may be ignored by ports) + * @param prio priority of the new thread (may be ignored by ports) */ +sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio); + +#endif /* NO_SYS */ + +/* sys_init() must be called before anything else. */ +void sys_init(void); + +#ifndef sys_jiffies +/** + * Ticks/jiffies since power up. + */ +u32_t sys_jiffies(void); +#endif + +/** + * @ingroup sys_time + * Returns the current time in milliseconds, + * may be the same as sys_jiffies or at least based on it. + */ +u32_t sys_now(void); + +/* Critical Region Protection */ +/* These functions must be implemented in the sys_arch.c file. + In some implementations they can provide a more light-weight protection + mechanism than using semaphores. Otherwise semaphores can be used for + implementation */ +#ifndef SYS_ARCH_PROTECT +/** SYS_LIGHTWEIGHT_PROT + * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection + * for certain critical regions during buffer allocation, deallocation and memory + * allocation and deallocation. + */ +#if SYS_LIGHTWEIGHT_PROT + +/** + * @ingroup sys_prot + * SYS_ARCH_DECL_PROTECT + * declare a protection variable. This macro will default to defining a variable of + * type sys_prot_t. If a particular port needs a different implementation, then + * this macro may be defined in sys_arch.h. + */ +#define SYS_ARCH_DECL_PROTECT(lev) sys_prot_t lev +/** + * @ingroup sys_prot + * SYS_ARCH_PROTECT + * Perform a "fast" protect. This could be implemented by + * disabling interrupts for an embedded system or by using a semaphore or + * mutex. The implementation should allow calling SYS_ARCH_PROTECT when + * already protected. The old protection level is returned in the variable + * "lev". This macro will default to calling the sys_arch_protect() function + * which should be implemented in sys_arch.c. If a particular port needs a + * different implementation, then this macro may be defined in sys_arch.h + */ +#define SYS_ARCH_PROTECT(lev) lev = sys_arch_protect() +/** + * @ingroup sys_prot + * SYS_ARCH_UNPROTECT + * Perform a "fast" set of the protection level to "lev". This could be + * implemented by setting the interrupt level to "lev" within the MACRO or by + * using a semaphore or mutex. This macro will default to calling the + * sys_arch_unprotect() function which should be implemented in + * sys_arch.c. If a particular port needs a different implementation, then + * this macro may be defined in sys_arch.h + */ +#define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect(lev) +sys_prot_t sys_arch_protect(void); +void sys_arch_unprotect(sys_prot_t pval); + +#else + +#define SYS_ARCH_DECL_PROTECT(lev) +#define SYS_ARCH_PROTECT(lev) +#define SYS_ARCH_UNPROTECT(lev) + +#endif /* SYS_LIGHTWEIGHT_PROT */ + +#endif /* SYS_ARCH_PROTECT */ + +/* + * Macros to set/get and increase/decrease variables in a thread-safe way. + * Use these for accessing variable that are used from more than one thread. + */ + +#ifndef SYS_ARCH_INC +#define SYS_ARCH_INC(var, val) do { \ + SYS_ARCH_DECL_PROTECT(old_level); \ + SYS_ARCH_PROTECT(old_level); \ + var += val; \ + SYS_ARCH_UNPROTECT(old_level); \ + } while(0) +#endif /* SYS_ARCH_INC */ + +#ifndef SYS_ARCH_DEC +#define SYS_ARCH_DEC(var, val) do { \ + SYS_ARCH_DECL_PROTECT(old_level); \ + SYS_ARCH_PROTECT(old_level); \ + var -= val; \ + SYS_ARCH_UNPROTECT(old_level); \ + } while(0) +#endif /* SYS_ARCH_DEC */ + +#ifndef SYS_ARCH_GET +#define SYS_ARCH_GET(var, ret) do { \ + SYS_ARCH_DECL_PROTECT(old_level); \ + SYS_ARCH_PROTECT(old_level); \ + ret = var; \ + SYS_ARCH_UNPROTECT(old_level); \ + } while(0) +#endif /* SYS_ARCH_GET */ + +#ifndef SYS_ARCH_SET +#define SYS_ARCH_SET(var, val) do { \ + SYS_ARCH_DECL_PROTECT(old_level); \ + SYS_ARCH_PROTECT(old_level); \ + var = val; \ + SYS_ARCH_UNPROTECT(old_level); \ + } while(0) +#endif /* SYS_ARCH_SET */ + + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_SYS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcp.h index 34d1c10..3845b9f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcp.h @@ -1,433 +1,433 @@ -/** - * @file - * TCP API (to be used from TCPIP thread)\n - * See also @ref tcp_raw - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_TCP_H -#define LWIP_HDR_TCP_H - -#include "lwip/opt.h" - -#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/mem.h" -#include "lwip/pbuf.h" -#include "lwip/ip.h" -#include "lwip/icmp.h" -#include "lwip/err.h" -#include "lwip/ip6.h" -#include "lwip/ip6_addr.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct tcp_pcb; - -/** Function prototype for tcp accept callback functions. Called when a new - * connection can be accepted on a listening pcb. - * - * @param arg Additional argument to pass to the callback function (@see tcp_arg()) - * @param newpcb The new connection pcb - * @param err An error code if there has been an error accepting. - * Only return ERR_ABRT if you have called tcp_abort from within the - * callback function! - */ -typedef err_t (*tcp_accept_fn)(void *arg, struct tcp_pcb *newpcb, err_t err); - -/** Function prototype for tcp receive callback functions. Called when data has - * been received. - * - * @param arg Additional argument to pass to the callback function (@see tcp_arg()) - * @param tpcb The connection pcb which received data - * @param p The received data (or NULL when the connection has been closed!) - * @param err An error code if there has been an error receiving - * Only return ERR_ABRT if you have called tcp_abort from within the - * callback function! - */ -typedef err_t (*tcp_recv_fn)(void *arg, struct tcp_pcb *tpcb, - struct pbuf *p, err_t err); - -/** Function prototype for tcp sent callback functions. Called when sent data has - * been acknowledged by the remote side. Use it to free corresponding resources. - * This also means that the pcb has now space available to send new data. - * - * @param arg Additional argument to pass to the callback function (@see tcp_arg()) - * @param tpcb The connection pcb for which data has been acknowledged - * @param len The amount of bytes acknowledged - * @return ERR_OK: try to send some data by calling tcp_output - * Only return ERR_ABRT if you have called tcp_abort from within the - * callback function! - */ -typedef err_t (*tcp_sent_fn)(void *arg, struct tcp_pcb *tpcb, - u16_t len); - -/** Function prototype for tcp poll callback functions. Called periodically as - * specified by @see tcp_poll. - * - * @param arg Additional argument to pass to the callback function (@see tcp_arg()) - * @param tpcb tcp pcb - * @return ERR_OK: try to send some data by calling tcp_output - * Only return ERR_ABRT if you have called tcp_abort from within the - * callback function! - */ -typedef err_t (*tcp_poll_fn)(void *arg, struct tcp_pcb *tpcb); - -/** Function prototype for tcp error callback functions. Called when the pcb - * receives a RST or is unexpectedly closed for any other reason. - * - * @note The corresponding pcb is already freed when this callback is called! - * - * @param arg Additional argument to pass to the callback function (@see tcp_arg()) - * @param err Error code to indicate why the pcb has been closed - * ERR_ABRT: aborted through tcp_abort or by a TCP timer - * ERR_RST: the connection was reset by the remote host - */ -typedef void (*tcp_err_fn)(void *arg, err_t err); - -/** Function prototype for tcp connected callback functions. Called when a pcb - * is connected to the remote side after initiating a connection attempt by - * calling tcp_connect(). - * - * @param arg Additional argument to pass to the callback function (@see tcp_arg()) - * @param tpcb The connection pcb which is connected - * @param err An unused error code, always ERR_OK currently ;-) @todo! - * Only return ERR_ABRT if you have called tcp_abort from within the - * callback function! - * - * @note When a connection attempt fails, the error callback is currently called! - */ -typedef err_t (*tcp_connected_fn)(void *arg, struct tcp_pcb *tpcb, err_t err); - -#if LWIP_WND_SCALE -#define RCV_WND_SCALE(pcb, wnd) (((wnd) >> (pcb)->rcv_scale)) -#define SND_WND_SCALE(pcb, wnd) (((wnd) << (pcb)->snd_scale)) -#define TCPWND16(x) ((u16_t)LWIP_MIN((x), 0xFFFF)) -#define TCP_WND_MAX(pcb) ((tcpwnd_size_t)(((pcb)->flags & TF_WND_SCALE) ? TCP_WND : TCPWND16(TCP_WND))) -typedef u32_t tcpwnd_size_t; -#else -#define RCV_WND_SCALE(pcb, wnd) (wnd) -#define SND_WND_SCALE(pcb, wnd) (wnd) -#define TCPWND16(x) (x) -#define TCP_WND_MAX(pcb) TCP_WND -typedef u16_t tcpwnd_size_t; -#endif - -#if LWIP_WND_SCALE || TCP_LISTEN_BACKLOG || LWIP_TCP_TIMESTAMPS -typedef u16_t tcpflags_t; -#else -typedef u8_t tcpflags_t; -#endif - -enum tcp_state { - CLOSED = 0, - LISTEN = 1, - SYN_SENT = 2, - SYN_RCVD = 3, - ESTABLISHED = 4, - FIN_WAIT_1 = 5, - FIN_WAIT_2 = 6, - CLOSE_WAIT = 7, - CLOSING = 8, - LAST_ACK = 9, - TIME_WAIT = 10 -}; - -/** - * members common to struct tcp_pcb and struct tcp_listen_pcb - */ -#define TCP_PCB_COMMON(type) \ - type *next; /* for the linked list */ \ - void *callback_arg; \ - enum tcp_state state; /* TCP state */ \ - u8_t prio; \ - /* ports are in host byte order */ \ - u16_t local_port - - -/** the TCP protocol control block for listening pcbs */ -struct tcp_pcb_listen { -/** Common members of all PCB types */ - IP_PCB; -/** Protocol specific PCB members */ - TCP_PCB_COMMON(struct tcp_pcb_listen); - -#if LWIP_CALLBACK_API - /* Function to call when a listener has been connected. */ - tcp_accept_fn accept; -#endif /* LWIP_CALLBACK_API */ - -#if TCP_LISTEN_BACKLOG - u8_t backlog; - u8_t accepts_pending; -#endif /* TCP_LISTEN_BACKLOG */ -}; - - -/** the TCP protocol control block */ -struct tcp_pcb { -/** common PCB members */ - IP_PCB; -/** protocol specific PCB members */ - TCP_PCB_COMMON(struct tcp_pcb); - - /* ports are in host byte order */ - u16_t remote_port; - - tcpflags_t flags; -#define TF_ACK_DELAY 0x01U /* Delayed ACK. */ -#define TF_ACK_NOW 0x02U /* Immediate ACK. */ -#define TF_INFR 0x04U /* In fast recovery. */ -#define TF_CLOSEPEND 0x08U /* If this is set, tcp_close failed to enqueue the FIN (retried in tcp_tmr) */ -#define TF_RXCLOSED 0x10U /* rx closed by tcp_shutdown */ -#define TF_FIN 0x20U /* Connection was closed locally (FIN segment enqueued). */ -#define TF_NODELAY 0x40U /* Disable Nagle algorithm */ -#define TF_NAGLEMEMERR 0x80U /* nagle enabled, memerr, try to output to prevent delayed ACK to happen */ -#if LWIP_WND_SCALE -#define TF_WND_SCALE 0x0100U /* Window Scale option enabled */ -#endif -#if TCP_LISTEN_BACKLOG -#define TF_BACKLOGPEND 0x0200U /* If this is set, a connection pcb has increased the backlog on its listener */ -#endif -#if LWIP_TCP_TIMESTAMPS -#define TF_TIMESTAMP 0x0400U /* Timestamp option enabled */ -#endif - - /* the rest of the fields are in host byte order - as we have to do some math with them */ - - /* Timers */ - u8_t polltmr, pollinterval; - u8_t last_timer; - u32_t tmr; - - /* receiver variables */ - u32_t rcv_nxt; /* next seqno expected */ - tcpwnd_size_t rcv_wnd; /* receiver window available */ - tcpwnd_size_t rcv_ann_wnd; /* receiver window to announce */ - u32_t rcv_ann_right_edge; /* announced right edge of window */ - - /* Retransmission timer. */ - s16_t rtime; - - u16_t mss; /* maximum segment size */ - - /* RTT (round trip time) estimation variables */ - u32_t rttest; /* RTT estimate in 500ms ticks */ - u32_t rtseq; /* sequence number being timed */ - s16_t sa, sv; /* @todo document this */ - - s16_t rto; /* retransmission time-out */ - u8_t nrtx; /* number of retransmissions */ - - /* fast retransmit/recovery */ - u8_t dupacks; - u32_t lastack; /* Highest acknowledged seqno. */ - - /* congestion avoidance/control variables */ - tcpwnd_size_t cwnd; - tcpwnd_size_t ssthresh; - - /* sender variables */ - u32_t snd_nxt; /* next new seqno to be sent */ - u32_t snd_wl1, snd_wl2; /* Sequence and acknowledgement numbers of last - window update. */ - u32_t snd_lbb; /* Sequence number of next byte to be buffered. */ - tcpwnd_size_t snd_wnd; /* sender window */ - tcpwnd_size_t snd_wnd_max; /* the maximum sender window announced by the remote host */ - - tcpwnd_size_t snd_buf; /* Available buffer space for sending (in bytes). */ -#define TCP_SNDQUEUELEN_OVERFLOW (0xffffU-3) - u16_t snd_queuelen; /* Number of pbufs currently in the send buffer. */ - -#if TCP_OVERSIZE - /* Extra bytes available at the end of the last pbuf in unsent. */ - u16_t unsent_oversize; -#endif /* TCP_OVERSIZE */ - - /* These are ordered by sequence number: */ - struct tcp_seg *unsent; /* Unsent (queued) segments. */ - struct tcp_seg *unacked; /* Sent but unacknowledged segments. */ -#if TCP_QUEUE_OOSEQ - struct tcp_seg *ooseq; /* Received out of sequence segments. */ -#endif /* TCP_QUEUE_OOSEQ */ - - struct pbuf *refused_data; /* Data previously received but not yet taken by upper layer */ - -#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG - struct tcp_pcb_listen* listener; -#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ - -#if LWIP_CALLBACK_API - /* Function to be called when more send buffer space is available. */ - tcp_sent_fn sent; - /* Function to be called when (in-sequence) data has arrived. */ - tcp_recv_fn recv; - /* Function to be called when a connection has been set up. */ - tcp_connected_fn connected; - /* Function which is called periodically. */ - tcp_poll_fn poll; - /* Function to be called whenever a fatal error occurs. */ - tcp_err_fn errf; -#endif /* LWIP_CALLBACK_API */ - -#if LWIP_TCP_TIMESTAMPS - u32_t ts_lastacksent; - u32_t ts_recent; -#endif /* LWIP_TCP_TIMESTAMPS */ - - /* idle time before KEEPALIVE is sent */ - u32_t keep_idle; -#if LWIP_TCP_KEEPALIVE - u32_t keep_intvl; - u32_t keep_cnt; -#endif /* LWIP_TCP_KEEPALIVE */ - - /* Persist timer counter */ - u8_t persist_cnt; - /* Persist timer back-off */ - u8_t persist_backoff; - - /* KEEPALIVE counter */ - u8_t keep_cnt_sent; - -#if LWIP_WND_SCALE - u8_t snd_scale; - u8_t rcv_scale; -#endif -}; - -#if LWIP_EVENT_API - -enum lwip_event { - LWIP_EVENT_ACCEPT, - LWIP_EVENT_SENT, - LWIP_EVENT_RECV, - LWIP_EVENT_CONNECTED, - LWIP_EVENT_POLL, - LWIP_EVENT_ERR -}; - -err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb, - enum lwip_event, - struct pbuf *p, - u16_t size, - err_t err); - -#endif /* LWIP_EVENT_API */ - -/* Application program's interface: */ -struct tcp_pcb * tcp_new (void); -struct tcp_pcb * tcp_new_ip_type (u8_t type); - -void tcp_arg (struct tcp_pcb *pcb, void *arg); -#if LWIP_CALLBACK_API -void tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv); -void tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent); -void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err); -void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept); -#endif /* LWIP_CALLBACK_API */ -void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval); - -#if LWIP_TCP_TIMESTAMPS -#define tcp_mss(pcb) (((pcb)->flags & TF_TIMESTAMP) ? ((pcb)->mss - 12) : (pcb)->mss) -#else /* LWIP_TCP_TIMESTAMPS */ -#define tcp_mss(pcb) ((pcb)->mss) -#endif /* LWIP_TCP_TIMESTAMPS */ -#define tcp_sndbuf(pcb) (TCPWND16((pcb)->snd_buf)) -#define tcp_sndqueuelen(pcb) ((pcb)->snd_queuelen) -/** @ingroup tcp_raw */ -#define tcp_nagle_disable(pcb) ((pcb)->flags |= TF_NODELAY) -/** @ingroup tcp_raw */ -#define tcp_nagle_enable(pcb) ((pcb)->flags = (tcpflags_t)((pcb)->flags & ~TF_NODELAY)) -/** @ingroup tcp_raw */ -#define tcp_nagle_disabled(pcb) (((pcb)->flags & TF_NODELAY) != 0) - -#if TCP_LISTEN_BACKLOG -#define tcp_backlog_set(pcb, new_backlog) do { \ - LWIP_ASSERT("pcb->state == LISTEN (called for wrong pcb?)", (pcb)->state == LISTEN); \ - ((struct tcp_pcb_listen *)(pcb))->backlog = ((new_backlog) ? (new_backlog) : 1); } while(0) -void tcp_backlog_delayed(struct tcp_pcb* pcb); -void tcp_backlog_accepted(struct tcp_pcb* pcb); -#else /* TCP_LISTEN_BACKLOG */ -#define tcp_backlog_set(pcb, new_backlog) -#define tcp_backlog_delayed(pcb) -#define tcp_backlog_accepted(pcb) -#endif /* TCP_LISTEN_BACKLOG */ -#define tcp_accepted(pcb) /* compatibility define, not needed any more */ - -void tcp_recved (struct tcp_pcb *pcb, u16_t len); -err_t tcp_bind (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, - u16_t port); -err_t tcp_connect (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, - u16_t port, tcp_connected_fn connected); - -struct tcp_pcb * tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err); -struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog); -/** @ingroup tcp_raw */ -#define tcp_listen(pcb) tcp_listen_with_backlog(pcb, TCP_DEFAULT_LISTEN_BACKLOG) - -void tcp_abort (struct tcp_pcb *pcb); -err_t tcp_close (struct tcp_pcb *pcb); -err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx); - -/* Flags for "apiflags" parameter in tcp_write */ -#define TCP_WRITE_FLAG_COPY 0x01 -#define TCP_WRITE_FLAG_MORE 0x02 - -err_t tcp_write (struct tcp_pcb *pcb, const void *dataptr, u16_t len, - u8_t apiflags); - -void tcp_setprio (struct tcp_pcb *pcb, u8_t prio); - -#define TCP_PRIO_MIN 1 -#define TCP_PRIO_NORMAL 64 -#define TCP_PRIO_MAX 127 - -err_t tcp_output (struct tcp_pcb *pcb); - - -const char* tcp_debug_state_str(enum tcp_state s); - -/* for compatibility with older implementation */ -#define tcp_new_ip6() tcp_new_ip_type(IPADDR_TYPE_V6) - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_TCP */ - -#endif /* LWIP_HDR_TCP_H */ +/** + * @file + * TCP API (to be used from TCPIP thread)\n + * See also @ref tcp_raw + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_TCP_H +#define LWIP_HDR_TCP_H + +#include "lwip/opt.h" + +#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/mem.h" +#include "lwip/pbuf.h" +#include "lwip/ip.h" +#include "lwip/icmp.h" +#include "lwip/err.h" +#include "lwip/ip6.h" +#include "lwip/ip6_addr.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct tcp_pcb; + +/** Function prototype for tcp accept callback functions. Called when a new + * connection can be accepted on a listening pcb. + * + * @param arg Additional argument to pass to the callback function (@see tcp_arg()) + * @param newpcb The new connection pcb + * @param err An error code if there has been an error accepting. + * Only return ERR_ABRT if you have called tcp_abort from within the + * callback function! + */ +typedef err_t (*tcp_accept_fn)(void *arg, struct tcp_pcb *newpcb, err_t err); + +/** Function prototype for tcp receive callback functions. Called when data has + * been received. + * + * @param arg Additional argument to pass to the callback function (@see tcp_arg()) + * @param tpcb The connection pcb which received data + * @param p The received data (or NULL when the connection has been closed!) + * @param err An error code if there has been an error receiving + * Only return ERR_ABRT if you have called tcp_abort from within the + * callback function! + */ +typedef err_t (*tcp_recv_fn)(void *arg, struct tcp_pcb *tpcb, + struct pbuf *p, err_t err); + +/** Function prototype for tcp sent callback functions. Called when sent data has + * been acknowledged by the remote side. Use it to free corresponding resources. + * This also means that the pcb has now space available to send new data. + * + * @param arg Additional argument to pass to the callback function (@see tcp_arg()) + * @param tpcb The connection pcb for which data has been acknowledged + * @param len The amount of bytes acknowledged + * @return ERR_OK: try to send some data by calling tcp_output + * Only return ERR_ABRT if you have called tcp_abort from within the + * callback function! + */ +typedef err_t (*tcp_sent_fn)(void *arg, struct tcp_pcb *tpcb, + u16_t len); + +/** Function prototype for tcp poll callback functions. Called periodically as + * specified by @see tcp_poll. + * + * @param arg Additional argument to pass to the callback function (@see tcp_arg()) + * @param tpcb tcp pcb + * @return ERR_OK: try to send some data by calling tcp_output + * Only return ERR_ABRT if you have called tcp_abort from within the + * callback function! + */ +typedef err_t (*tcp_poll_fn)(void *arg, struct tcp_pcb *tpcb); + +/** Function prototype for tcp error callback functions. Called when the pcb + * receives a RST or is unexpectedly closed for any other reason. + * + * @note The corresponding pcb is already freed when this callback is called! + * + * @param arg Additional argument to pass to the callback function (@see tcp_arg()) + * @param err Error code to indicate why the pcb has been closed + * ERR_ABRT: aborted through tcp_abort or by a TCP timer + * ERR_RST: the connection was reset by the remote host + */ +typedef void (*tcp_err_fn)(void *arg, err_t err); + +/** Function prototype for tcp connected callback functions. Called when a pcb + * is connected to the remote side after initiating a connection attempt by + * calling tcp_connect(). + * + * @param arg Additional argument to pass to the callback function (@see tcp_arg()) + * @param tpcb The connection pcb which is connected + * @param err An unused error code, always ERR_OK currently ;-) @todo! + * Only return ERR_ABRT if you have called tcp_abort from within the + * callback function! + * + * @note When a connection attempt fails, the error callback is currently called! + */ +typedef err_t (*tcp_connected_fn)(void *arg, struct tcp_pcb *tpcb, err_t err); + +#if LWIP_WND_SCALE +#define RCV_WND_SCALE(pcb, wnd) (((wnd) >> (pcb)->rcv_scale)) +#define SND_WND_SCALE(pcb, wnd) (((wnd) << (pcb)->snd_scale)) +#define TCPWND16(x) ((u16_t)LWIP_MIN((x), 0xFFFF)) +#define TCP_WND_MAX(pcb) ((tcpwnd_size_t)(((pcb)->flags & TF_WND_SCALE) ? TCP_WND : TCPWND16(TCP_WND))) +typedef u32_t tcpwnd_size_t; +#else +#define RCV_WND_SCALE(pcb, wnd) (wnd) +#define SND_WND_SCALE(pcb, wnd) (wnd) +#define TCPWND16(x) (x) +#define TCP_WND_MAX(pcb) TCP_WND +typedef u16_t tcpwnd_size_t; +#endif + +#if LWIP_WND_SCALE || TCP_LISTEN_BACKLOG || LWIP_TCP_TIMESTAMPS +typedef u16_t tcpflags_t; +#else +typedef u8_t tcpflags_t; +#endif + +enum tcp_state { + CLOSED = 0, + LISTEN = 1, + SYN_SENT = 2, + SYN_RCVD = 3, + ESTABLISHED = 4, + FIN_WAIT_1 = 5, + FIN_WAIT_2 = 6, + CLOSE_WAIT = 7, + CLOSING = 8, + LAST_ACK = 9, + TIME_WAIT = 10 +}; + +/** + * members common to struct tcp_pcb and struct tcp_listen_pcb + */ +#define TCP_PCB_COMMON(type) \ + type *next; /* for the linked list */ \ + void *callback_arg; \ + enum tcp_state state; /* TCP state */ \ + u8_t prio; \ + /* ports are in host byte order */ \ + u16_t local_port + + +/** the TCP protocol control block for listening pcbs */ +struct tcp_pcb_listen { +/** Common members of all PCB types */ + IP_PCB; +/** Protocol specific PCB members */ + TCP_PCB_COMMON(struct tcp_pcb_listen); + +#if LWIP_CALLBACK_API + /* Function to call when a listener has been connected. */ + tcp_accept_fn accept; +#endif /* LWIP_CALLBACK_API */ + +#if TCP_LISTEN_BACKLOG + u8_t backlog; + u8_t accepts_pending; +#endif /* TCP_LISTEN_BACKLOG */ +}; + + +/** the TCP protocol control block */ +struct tcp_pcb { +/** common PCB members */ + IP_PCB; +/** protocol specific PCB members */ + TCP_PCB_COMMON(struct tcp_pcb); + + /* ports are in host byte order */ + u16_t remote_port; + + tcpflags_t flags; +#define TF_ACK_DELAY 0x01U /* Delayed ACK. */ +#define TF_ACK_NOW 0x02U /* Immediate ACK. */ +#define TF_INFR 0x04U /* In fast recovery. */ +#define TF_CLOSEPEND 0x08U /* If this is set, tcp_close failed to enqueue the FIN (retried in tcp_tmr) */ +#define TF_RXCLOSED 0x10U /* rx closed by tcp_shutdown */ +#define TF_FIN 0x20U /* Connection was closed locally (FIN segment enqueued). */ +#define TF_NODELAY 0x40U /* Disable Nagle algorithm */ +#define TF_NAGLEMEMERR 0x80U /* nagle enabled, memerr, try to output to prevent delayed ACK to happen */ +#if LWIP_WND_SCALE +#define TF_WND_SCALE 0x0100U /* Window Scale option enabled */ +#endif +#if TCP_LISTEN_BACKLOG +#define TF_BACKLOGPEND 0x0200U /* If this is set, a connection pcb has increased the backlog on its listener */ +#endif +#if LWIP_TCP_TIMESTAMPS +#define TF_TIMESTAMP 0x0400U /* Timestamp option enabled */ +#endif + + /* the rest of the fields are in host byte order + as we have to do some math with them */ + + /* Timers */ + u8_t polltmr, pollinterval; + u8_t last_timer; + u32_t tmr; + + /* receiver variables */ + u32_t rcv_nxt; /* next seqno expected */ + tcpwnd_size_t rcv_wnd; /* receiver window available */ + tcpwnd_size_t rcv_ann_wnd; /* receiver window to announce */ + u32_t rcv_ann_right_edge; /* announced right edge of window */ + + /* Retransmission timer. */ + s16_t rtime; + + u16_t mss; /* maximum segment size */ + + /* RTT (round trip time) estimation variables */ + u32_t rttest; /* RTT estimate in 500ms ticks */ + u32_t rtseq; /* sequence number being timed */ + s16_t sa, sv; /* @todo document this */ + + s16_t rto; /* retransmission time-out */ + u8_t nrtx; /* number of retransmissions */ + + /* fast retransmit/recovery */ + u8_t dupacks; + u32_t lastack; /* Highest acknowledged seqno. */ + + /* congestion avoidance/control variables */ + tcpwnd_size_t cwnd; + tcpwnd_size_t ssthresh; + + /* sender variables */ + u32_t snd_nxt; /* next new seqno to be sent */ + u32_t snd_wl1, snd_wl2; /* Sequence and acknowledgement numbers of last + window update. */ + u32_t snd_lbb; /* Sequence number of next byte to be buffered. */ + tcpwnd_size_t snd_wnd; /* sender window */ + tcpwnd_size_t snd_wnd_max; /* the maximum sender window announced by the remote host */ + + tcpwnd_size_t snd_buf; /* Available buffer space for sending (in bytes). */ +#define TCP_SNDQUEUELEN_OVERFLOW (0xffffU-3) + u16_t snd_queuelen; /* Number of pbufs currently in the send buffer. */ + +#if TCP_OVERSIZE + /* Extra bytes available at the end of the last pbuf in unsent. */ + u16_t unsent_oversize; +#endif /* TCP_OVERSIZE */ + + /* These are ordered by sequence number: */ + struct tcp_seg *unsent; /* Unsent (queued) segments. */ + struct tcp_seg *unacked; /* Sent but unacknowledged segments. */ +#if TCP_QUEUE_OOSEQ + struct tcp_seg *ooseq; /* Received out of sequence segments. */ +#endif /* TCP_QUEUE_OOSEQ */ + + struct pbuf *refused_data; /* Data previously received but not yet taken by upper layer */ + +#if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG + struct tcp_pcb_listen* listener; +#endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ + +#if LWIP_CALLBACK_API + /* Function to be called when more send buffer space is available. */ + tcp_sent_fn sent; + /* Function to be called when (in-sequence) data has arrived. */ + tcp_recv_fn recv; + /* Function to be called when a connection has been set up. */ + tcp_connected_fn connected; + /* Function which is called periodically. */ + tcp_poll_fn poll; + /* Function to be called whenever a fatal error occurs. */ + tcp_err_fn errf; +#endif /* LWIP_CALLBACK_API */ + +#if LWIP_TCP_TIMESTAMPS + u32_t ts_lastacksent; + u32_t ts_recent; +#endif /* LWIP_TCP_TIMESTAMPS */ + + /* idle time before KEEPALIVE is sent */ + u32_t keep_idle; +#if LWIP_TCP_KEEPALIVE + u32_t keep_intvl; + u32_t keep_cnt; +#endif /* LWIP_TCP_KEEPALIVE */ + + /* Persist timer counter */ + u8_t persist_cnt; + /* Persist timer back-off */ + u8_t persist_backoff; + + /* KEEPALIVE counter */ + u8_t keep_cnt_sent; + +#if LWIP_WND_SCALE + u8_t snd_scale; + u8_t rcv_scale; +#endif +}; + +#if LWIP_EVENT_API + +enum lwip_event { + LWIP_EVENT_ACCEPT, + LWIP_EVENT_SENT, + LWIP_EVENT_RECV, + LWIP_EVENT_CONNECTED, + LWIP_EVENT_POLL, + LWIP_EVENT_ERR +}; + +err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb, + enum lwip_event, + struct pbuf *p, + u16_t size, + err_t err); + +#endif /* LWIP_EVENT_API */ + +/* Application program's interface: */ +struct tcp_pcb * tcp_new (void); +struct tcp_pcb * tcp_new_ip_type (u8_t type); + +void tcp_arg (struct tcp_pcb *pcb, void *arg); +#if LWIP_CALLBACK_API +void tcp_recv (struct tcp_pcb *pcb, tcp_recv_fn recv); +void tcp_sent (struct tcp_pcb *pcb, tcp_sent_fn sent); +void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err); +void tcp_accept (struct tcp_pcb *pcb, tcp_accept_fn accept); +#endif /* LWIP_CALLBACK_API */ +void tcp_poll (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval); + +#if LWIP_TCP_TIMESTAMPS +#define tcp_mss(pcb) (((pcb)->flags & TF_TIMESTAMP) ? ((pcb)->mss - 12) : (pcb)->mss) +#else /* LWIP_TCP_TIMESTAMPS */ +#define tcp_mss(pcb) ((pcb)->mss) +#endif /* LWIP_TCP_TIMESTAMPS */ +#define tcp_sndbuf(pcb) (TCPWND16((pcb)->snd_buf)) +#define tcp_sndqueuelen(pcb) ((pcb)->snd_queuelen) +/** @ingroup tcp_raw */ +#define tcp_nagle_disable(pcb) ((pcb)->flags |= TF_NODELAY) +/** @ingroup tcp_raw */ +#define tcp_nagle_enable(pcb) ((pcb)->flags = (tcpflags_t)((pcb)->flags & ~TF_NODELAY)) +/** @ingroup tcp_raw */ +#define tcp_nagle_disabled(pcb) (((pcb)->flags & TF_NODELAY) != 0) + +#if TCP_LISTEN_BACKLOG +#define tcp_backlog_set(pcb, new_backlog) do { \ + LWIP_ASSERT("pcb->state == LISTEN (called for wrong pcb?)", (pcb)->state == LISTEN); \ + ((struct tcp_pcb_listen *)(pcb))->backlog = ((new_backlog) ? (new_backlog) : 1); } while(0) +void tcp_backlog_delayed(struct tcp_pcb* pcb); +void tcp_backlog_accepted(struct tcp_pcb* pcb); +#else /* TCP_LISTEN_BACKLOG */ +#define tcp_backlog_set(pcb, new_backlog) +#define tcp_backlog_delayed(pcb) +#define tcp_backlog_accepted(pcb) +#endif /* TCP_LISTEN_BACKLOG */ +#define tcp_accepted(pcb) /* compatibility define, not needed any more */ + +void tcp_recved (struct tcp_pcb *pcb, u16_t len); +err_t tcp_bind (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, + u16_t port); +err_t tcp_connect (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, + u16_t port, tcp_connected_fn connected); + +struct tcp_pcb * tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err); +struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog); +/** @ingroup tcp_raw */ +#define tcp_listen(pcb) tcp_listen_with_backlog(pcb, TCP_DEFAULT_LISTEN_BACKLOG) + +void tcp_abort (struct tcp_pcb *pcb); +err_t tcp_close (struct tcp_pcb *pcb); +err_t tcp_shutdown(struct tcp_pcb *pcb, int shut_rx, int shut_tx); + +/* Flags for "apiflags" parameter in tcp_write */ +#define TCP_WRITE_FLAG_COPY 0x01 +#define TCP_WRITE_FLAG_MORE 0x02 + +err_t tcp_write (struct tcp_pcb *pcb, const void *dataptr, u16_t len, + u8_t apiflags); + +void tcp_setprio (struct tcp_pcb *pcb, u8_t prio); + +#define TCP_PRIO_MIN 1 +#define TCP_PRIO_NORMAL 64 +#define TCP_PRIO_MAX 127 + +err_t tcp_output (struct tcp_pcb *pcb); + + +const char* tcp_debug_state_str(enum tcp_state s); + +/* for compatibility with older implementation */ +#define tcp_new_ip6() tcp_new_ip_type(IPADDR_TYPE_V6) + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_TCP */ + +#endif /* LWIP_HDR_TCP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcpip.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcpip.h index f2f6b46..6bf7978 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcpip.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/tcpip.h @@ -1,106 +1,106 @@ -/** - * @file - * Functions to sync with TCPIP thread - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_TCPIP_H -#define LWIP_HDR_TCPIP_H - -#include "lwip/opt.h" - -#if !NO_SYS /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/err.h" -#include "lwip/timeouts.h" -#include "lwip/netif.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_TCPIP_CORE_LOCKING -/** The global semaphore to lock the stack. */ -extern sys_mutex_t lock_tcpip_core; -/** Lock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */ -#define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core) -/** Unlock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */ -#define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core) -#else /* LWIP_TCPIP_CORE_LOCKING */ -#define LOCK_TCPIP_CORE() -#define UNLOCK_TCPIP_CORE() -#endif /* LWIP_TCPIP_CORE_LOCKING */ - -struct pbuf; -struct netif; - -/** Function prototype for the init_done function passed to tcpip_init */ -typedef void (*tcpip_init_done_fn)(void *arg); -/** Function prototype for functions passed to tcpip_callback() */ -typedef void (*tcpip_callback_fn)(void *ctx); - -/* Forward declarations */ -struct tcpip_callback_msg; - -void tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg); - -err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn); -err_t tcpip_input(struct pbuf *p, struct netif *inp); - -err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block); -/** - * @ingroup lwip_os - * @see tcpip_callback_with_block - */ -#define tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1) - -struct tcpip_callback_msg* tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx); -void tcpip_callbackmsg_delete(struct tcpip_callback_msg* msg); -err_t tcpip_trycallback(struct tcpip_callback_msg* msg); - -/* free pbufs or heap memory from another context without blocking */ -err_t pbuf_free_callback(struct pbuf *p); -err_t mem_free_callback(void *m); - -#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS -err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg); -err_t tcpip_untimeout(sys_timeout_handler h, void *arg); -#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ - -#ifdef __cplusplus -} -#endif - -#endif /* !NO_SYS */ - -#endif /* LWIP_HDR_TCPIP_H */ +/** + * @file + * Functions to sync with TCPIP thread + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_TCPIP_H +#define LWIP_HDR_TCPIP_H + +#include "lwip/opt.h" + +#if !NO_SYS /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/err.h" +#include "lwip/timeouts.h" +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_TCPIP_CORE_LOCKING +/** The global semaphore to lock the stack. */ +extern sys_mutex_t lock_tcpip_core; +/** Lock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */ +#define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core) +/** Unlock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */ +#define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core) +#else /* LWIP_TCPIP_CORE_LOCKING */ +#define LOCK_TCPIP_CORE() +#define UNLOCK_TCPIP_CORE() +#endif /* LWIP_TCPIP_CORE_LOCKING */ + +struct pbuf; +struct netif; + +/** Function prototype for the init_done function passed to tcpip_init */ +typedef void (*tcpip_init_done_fn)(void *arg); +/** Function prototype for functions passed to tcpip_callback() */ +typedef void (*tcpip_callback_fn)(void *ctx); + +/* Forward declarations */ +struct tcpip_callback_msg; + +void tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg); + +err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn); +err_t tcpip_input(struct pbuf *p, struct netif *inp); + +err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block); +/** + * @ingroup lwip_os + * @see tcpip_callback_with_block + */ +#define tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1) + +struct tcpip_callback_msg* tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx); +void tcpip_callbackmsg_delete(struct tcpip_callback_msg* msg); +err_t tcpip_trycallback(struct tcpip_callback_msg* msg); + +/* free pbufs or heap memory from another context without blocking */ +err_t pbuf_free_callback(struct pbuf *p); +err_t mem_free_callback(void *m); + +#if LWIP_TCPIP_TIMEOUT && LWIP_TIMERS +err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg); +err_t tcpip_untimeout(sys_timeout_handler h, void *arg); +#endif /* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */ + +#ifdef __cplusplus +} +#endif + +#endif /* !NO_SYS */ + +#endif /* LWIP_HDR_TCPIP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/timeouts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/timeouts.h index c9b93aa..d119056 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/timeouts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/timeouts.h @@ -1,121 +1,121 @@ -/** - * @file - * Timer implementations - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * Simon Goldschmidt - * - */ -#ifndef LWIP_HDR_TIMEOUTS_H -#define LWIP_HDR_TIMEOUTS_H - -#include "lwip/opt.h" -#include "lwip/err.h" -#if !NO_SYS -#include "lwip/sys.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef LWIP_DEBUG_TIMERNAMES -#ifdef LWIP_DEBUG -#define LWIP_DEBUG_TIMERNAMES SYS_DEBUG -#else /* LWIP_DEBUG */ -#define LWIP_DEBUG_TIMERNAMES 0 -#endif /* LWIP_DEBUG*/ -#endif - -/** Function prototype for a stack-internal timer function that has to be - * called at a defined interval */ -typedef void (* lwip_cyclic_timer_handler)(void); - -/** This struct contains information about a stack-internal timer function - that has to be called at a defined interval */ -struct lwip_cyclic_timer { - u32_t interval_ms; - lwip_cyclic_timer_handler handler; -#if LWIP_DEBUG_TIMERNAMES - const char* handler_name; -#endif /* LWIP_DEBUG_TIMERNAMES */ -}; - -/** This array contains all stack-internal cyclic timers. To get the number of - * timers, use LWIP_ARRAYSIZE() */ -extern const struct lwip_cyclic_timer lwip_cyclic_timers[]; - -#if LWIP_TIMERS - -/** Function prototype for a timeout callback function. Register such a function - * using sys_timeout(). - * - * @param arg Additional argument to pass to the function - set up by sys_timeout() - */ -typedef void (* sys_timeout_handler)(void *arg); - -struct sys_timeo { - struct sys_timeo *next; - u32_t time; - sys_timeout_handler h; - void *arg; -#if LWIP_DEBUG_TIMERNAMES - const char* handler_name; -#endif /* LWIP_DEBUG_TIMERNAMES */ -}; - -void sys_timeouts_init(void); - -#if LWIP_DEBUG_TIMERNAMES -void sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name); -#define sys_timeout(msecs, handler, arg) sys_timeout_debug(msecs, handler, arg, #handler) -#else /* LWIP_DEBUG_TIMERNAMES */ -void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg); -#endif /* LWIP_DEBUG_TIMERNAMES */ - -void sys_untimeout(sys_timeout_handler handler, void *arg); -void sys_restart_timeouts(void); -#if NO_SYS -void sys_check_timeouts(void); -u32_t sys_timeouts_sleeptime(void); -#else /* NO_SYS */ -void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg); -#endif /* NO_SYS */ - - -#endif /* LWIP_TIMERS */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_TIMEOUTS_H */ +/** + * @file + * Timer implementations + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * Simon Goldschmidt + * + */ +#ifndef LWIP_HDR_TIMEOUTS_H +#define LWIP_HDR_TIMEOUTS_H + +#include "lwip/opt.h" +#include "lwip/err.h" +#if !NO_SYS +#include "lwip/sys.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef LWIP_DEBUG_TIMERNAMES +#ifdef LWIP_DEBUG +#define LWIP_DEBUG_TIMERNAMES SYS_DEBUG +#else /* LWIP_DEBUG */ +#define LWIP_DEBUG_TIMERNAMES 0 +#endif /* LWIP_DEBUG*/ +#endif + +/** Function prototype for a stack-internal timer function that has to be + * called at a defined interval */ +typedef void (* lwip_cyclic_timer_handler)(void); + +/** This struct contains information about a stack-internal timer function + that has to be called at a defined interval */ +struct lwip_cyclic_timer { + u32_t interval_ms; + lwip_cyclic_timer_handler handler; +#if LWIP_DEBUG_TIMERNAMES + const char* handler_name; +#endif /* LWIP_DEBUG_TIMERNAMES */ +}; + +/** This array contains all stack-internal cyclic timers. To get the number of + * timers, use LWIP_ARRAYSIZE() */ +extern const struct lwip_cyclic_timer lwip_cyclic_timers[]; + +#if LWIP_TIMERS + +/** Function prototype for a timeout callback function. Register such a function + * using sys_timeout(). + * + * @param arg Additional argument to pass to the function - set up by sys_timeout() + */ +typedef void (* sys_timeout_handler)(void *arg); + +struct sys_timeo { + struct sys_timeo *next; + u32_t time; + sys_timeout_handler h; + void *arg; +#if LWIP_DEBUG_TIMERNAMES + const char* handler_name; +#endif /* LWIP_DEBUG_TIMERNAMES */ +}; + +void sys_timeouts_init(void); + +#if LWIP_DEBUG_TIMERNAMES +void sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name); +#define sys_timeout(msecs, handler, arg) sys_timeout_debug(msecs, handler, arg, #handler) +#else /* LWIP_DEBUG_TIMERNAMES */ +void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg); +#endif /* LWIP_DEBUG_TIMERNAMES */ + +void sys_untimeout(sys_timeout_handler handler, void *arg); +void sys_restart_timeouts(void); +#if NO_SYS +void sys_check_timeouts(void); +u32_t sys_timeouts_sleeptime(void); +#else /* NO_SYS */ +void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg); +#endif /* NO_SYS */ + + +#endif /* LWIP_TIMERS */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_TIMEOUTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/udp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/udp.h index b929907..4671a64 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/udp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/lwip/udp.h @@ -1,182 +1,182 @@ -/** - * @file - * UDP API (to be used from TCPIP thread)\n - * See also @ref udp_raw - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_UDP_H -#define LWIP_HDR_UDP_H - -#include "lwip/opt.h" - -#if LWIP_UDP /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/netif.h" -#include "lwip/ip_addr.h" -#include "lwip/ip.h" -#include "lwip/ip6_addr.h" -#include "lwip/prot/udp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define UDP_FLAGS_NOCHKSUM 0x01U -#define UDP_FLAGS_UDPLITE 0x02U -#define UDP_FLAGS_CONNECTED 0x04U -#define UDP_FLAGS_MULTICAST_LOOP 0x08U - -struct udp_pcb; - -/** Function prototype for udp pcb receive callback functions - * addr and port are in same byte order as in the pcb - * The callback is responsible for freeing the pbuf - * if it's not used any more. - * - * ATTENTION: Be aware that 'addr' might point into the pbuf 'p' so freeing this pbuf - * can make 'addr' invalid, too. - * - * @param arg user supplied argument (udp_pcb.recv_arg) - * @param pcb the udp_pcb which received data - * @param p the packet buffer that was received - * @param addr the remote IP address from which the packet was received - * @param port the remote port from which the packet was received - */ -typedef void (*udp_recv_fn)(void *arg, struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *addr, u16_t port); - -/** the UDP protocol control block */ -struct udp_pcb { -/** Common members of all PCB types */ - IP_PCB; - -/* Protocol specific PCB members */ - - struct udp_pcb *next; - - u8_t flags; - /** ports are in host byte order */ - u16_t local_port, remote_port; - -#if LWIP_MULTICAST_TX_OPTIONS - /** outgoing network interface for multicast packets */ - ip_addr_t multicast_ip; - /** TTL for outgoing multicast packets */ - u8_t mcast_ttl; -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - -#if LWIP_UDPLITE - /** used for UDP_LITE only */ - u16_t chksum_len_rx, chksum_len_tx; -#endif /* LWIP_UDPLITE */ - - /** receive callback function */ - udp_recv_fn recv; - /** user-supplied argument for the recv callback */ - void *recv_arg; -}; -/* udp_pcbs export for external reference (e.g. SNMP agent) */ -extern struct udp_pcb *udp_pcbs; - -/* The following functions is the application layer interface to the - UDP code. */ -struct udp_pcb * udp_new (void); -struct udp_pcb * udp_new_ip_type(u8_t type); -void udp_remove (struct udp_pcb *pcb); -err_t udp_bind (struct udp_pcb *pcb, const ip_addr_t *ipaddr, - u16_t port); -err_t udp_connect (struct udp_pcb *pcb, const ip_addr_t *ipaddr, - u16_t port); -void udp_disconnect (struct udp_pcb *pcb); -void udp_recv (struct udp_pcb *pcb, udp_recv_fn recv, - void *recv_arg); -err_t udp_sendto_if (struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, - struct netif *netif); -err_t udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, - struct netif *netif, const ip_addr_t *src_ip); -err_t udp_sendto (struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port); -err_t udp_send (struct udp_pcb *pcb, struct pbuf *p); - -#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP -err_t udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, - struct netif *netif, u8_t have_chksum, - u16_t chksum); -err_t udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, - u8_t have_chksum, u16_t chksum); -err_t udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, - u8_t have_chksum, u16_t chksum); -err_t udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, - const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, - u8_t have_chksum, u16_t chksum, const ip_addr_t *src_ip); -#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ - -#define udp_flags(pcb) ((pcb)->flags) -#define udp_setflags(pcb, f) ((pcb)->flags = (f)) - -/* The following functions are the lower layer interface to UDP. */ -void udp_input (struct pbuf *p, struct netif *inp); - -void udp_init (void); - -/* for compatibility with older implementation */ -#define udp_new_ip6() udp_new_ip_type(IPADDR_TYPE_V6) - -#if LWIP_MULTICAST_TX_OPTIONS -#define udp_set_multicast_netif_addr(pcb, ip4addr) ip_addr_copy_from_ip4((pcb)->multicast_ip, *(ip4addr)) -#define udp_get_multicast_netif_addr(pcb) ip_2_ip4(&(pcb)->multicast_ip) -#define udp_set_multicast_ttl(pcb, value) do { (pcb)->mcast_ttl = value; } while(0) -#define udp_get_multicast_ttl(pcb) ((pcb)->mcast_ttl) -#endif /* LWIP_MULTICAST_TX_OPTIONS */ - -#if UDP_DEBUG -void udp_debug_print(struct udp_hdr *udphdr); -#else -#define udp_debug_print(udphdr) -#endif - -void udp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_UDP */ - -#endif /* LWIP_HDR_UDP_H */ +/** + * @file + * UDP API (to be used from TCPIP thread)\n + * See also @ref udp_raw + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_UDP_H +#define LWIP_HDR_UDP_H + +#include "lwip/opt.h" + +#if LWIP_UDP /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/netif.h" +#include "lwip/ip_addr.h" +#include "lwip/ip.h" +#include "lwip/ip6_addr.h" +#include "lwip/prot/udp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define UDP_FLAGS_NOCHKSUM 0x01U +#define UDP_FLAGS_UDPLITE 0x02U +#define UDP_FLAGS_CONNECTED 0x04U +#define UDP_FLAGS_MULTICAST_LOOP 0x08U + +struct udp_pcb; + +/** Function prototype for udp pcb receive callback functions + * addr and port are in same byte order as in the pcb + * The callback is responsible for freeing the pbuf + * if it's not used any more. + * + * ATTENTION: Be aware that 'addr' might point into the pbuf 'p' so freeing this pbuf + * can make 'addr' invalid, too. + * + * @param arg user supplied argument (udp_pcb.recv_arg) + * @param pcb the udp_pcb which received data + * @param p the packet buffer that was received + * @param addr the remote IP address from which the packet was received + * @param port the remote port from which the packet was received + */ +typedef void (*udp_recv_fn)(void *arg, struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *addr, u16_t port); + +/** the UDP protocol control block */ +struct udp_pcb { +/** Common members of all PCB types */ + IP_PCB; + +/* Protocol specific PCB members */ + + struct udp_pcb *next; + + u8_t flags; + /** ports are in host byte order */ + u16_t local_port, remote_port; + +#if LWIP_MULTICAST_TX_OPTIONS + /** outgoing network interface for multicast packets */ + ip_addr_t multicast_ip; + /** TTL for outgoing multicast packets */ + u8_t mcast_ttl; +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + +#if LWIP_UDPLITE + /** used for UDP_LITE only */ + u16_t chksum_len_rx, chksum_len_tx; +#endif /* LWIP_UDPLITE */ + + /** receive callback function */ + udp_recv_fn recv; + /** user-supplied argument for the recv callback */ + void *recv_arg; +}; +/* udp_pcbs export for external reference (e.g. SNMP agent) */ +extern struct udp_pcb *udp_pcbs; + +/* The following functions is the application layer interface to the + UDP code. */ +struct udp_pcb * udp_new (void); +struct udp_pcb * udp_new_ip_type(u8_t type); +void udp_remove (struct udp_pcb *pcb); +err_t udp_bind (struct udp_pcb *pcb, const ip_addr_t *ipaddr, + u16_t port); +err_t udp_connect (struct udp_pcb *pcb, const ip_addr_t *ipaddr, + u16_t port); +void udp_disconnect (struct udp_pcb *pcb); +void udp_recv (struct udp_pcb *pcb, udp_recv_fn recv, + void *recv_arg); +err_t udp_sendto_if (struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, + struct netif *netif); +err_t udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, + struct netif *netif, const ip_addr_t *src_ip); +err_t udp_sendto (struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port); +err_t udp_send (struct udp_pcb *pcb, struct pbuf *p); + +#if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP +err_t udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, + struct netif *netif, u8_t have_chksum, + u16_t chksum); +err_t udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, + u8_t have_chksum, u16_t chksum); +err_t udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, + u8_t have_chksum, u16_t chksum); +err_t udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, + const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, + u8_t have_chksum, u16_t chksum, const ip_addr_t *src_ip); +#endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ + +#define udp_flags(pcb) ((pcb)->flags) +#define udp_setflags(pcb, f) ((pcb)->flags = (f)) + +/* The following functions are the lower layer interface to UDP. */ +void udp_input (struct pbuf *p, struct netif *inp); + +void udp_init (void); + +/* for compatibility with older implementation */ +#define udp_new_ip6() udp_new_ip_type(IPADDR_TYPE_V6) + +#if LWIP_MULTICAST_TX_OPTIONS +#define udp_set_multicast_netif_addr(pcb, ip4addr) ip_addr_copy_from_ip4((pcb)->multicast_ip, *(ip4addr)) +#define udp_get_multicast_netif_addr(pcb) ip_2_ip4(&(pcb)->multicast_ip) +#define udp_set_multicast_ttl(pcb, value) do { (pcb)->mcast_ttl = value; } while(0) +#define udp_get_multicast_ttl(pcb) ((pcb)->mcast_ttl) +#endif /* LWIP_MULTICAST_TX_OPTIONS */ + +#if UDP_DEBUG +void udp_debug_print(struct udp_hdr *udphdr); +#else +#define udp_debug_print(udphdr) +#endif + +void udp_netif_ip_addr_changed(const ip_addr_t* old_addr, const ip_addr_t* new_addr); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_UDP */ + +#endif /* LWIP_HDR_UDP_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/etharp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/etharp.h index b536fd2..c00de04 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/etharp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/etharp.h @@ -1,3 +1,3 @@ -/* ARP has been moved to core/ipv4, provide this #include for compatibility only */ -#include "lwip/etharp.h" -#include "netif/ethernet.h" +/* ARP has been moved to core/ipv4, provide this #include for compatibility only */ +#include "lwip/etharp.h" +#include "netif/ethernet.h" diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ethernet.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ethernet.h index 49649cb..6e94e16 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ethernet.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ethernet.h @@ -1,77 +1,77 @@ -/** - * @file - * Ethernet input function - handles INCOMING ethernet level traffic - * To be used in most low-level netif implementations - */ - -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * Copyright (c) 2003-2004 Leon Woestenberg - * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#ifndef LWIP_HDR_NETIF_ETHERNET_H -#define LWIP_HDR_NETIF_ETHERNET_H - -#include "lwip/opt.h" - -#include "lwip/pbuf.h" -#include "lwip/netif.h" -#include "lwip/prot/ethernet.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if LWIP_ARP || LWIP_ETHERNET - -/** Define this to 1 and define LWIP_ARP_FILTER_NETIF_FN(pbuf, netif, type) - * to a filter function that returns the correct netif when using multiple - * netifs on one hardware interface where the netif's low-level receive - * routine cannot decide for the correct netif (e.g. when mapping multiple - * IP addresses to one hardware interface). - */ -#ifndef LWIP_ARP_FILTER_NETIF -#define LWIP_ARP_FILTER_NETIF 0 -#endif - -err_t ethernet_input(struct pbuf *p, struct netif *netif); -err_t ethernet_output(struct netif* netif, struct pbuf* p, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type); - -extern const struct eth_addr ethbroadcast, ethzero; - -#endif /* LWIP_ARP || LWIP_ETHERNET */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_NETIF_ETHERNET_H */ +/** + * @file + * Ethernet input function - handles INCOMING ethernet level traffic + * To be used in most low-level netif implementations + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * Copyright (c) 2003-2004 Leon Woestenberg + * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#ifndef LWIP_HDR_NETIF_ETHERNET_H +#define LWIP_HDR_NETIF_ETHERNET_H + +#include "lwip/opt.h" + +#include "lwip/pbuf.h" +#include "lwip/netif.h" +#include "lwip/prot/ethernet.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if LWIP_ARP || LWIP_ETHERNET + +/** Define this to 1 and define LWIP_ARP_FILTER_NETIF_FN(pbuf, netif, type) + * to a filter function that returns the correct netif when using multiple + * netifs on one hardware interface where the netif's low-level receive + * routine cannot decide for the correct netif (e.g. when mapping multiple + * IP addresses to one hardware interface). + */ +#ifndef LWIP_ARP_FILTER_NETIF +#define LWIP_ARP_FILTER_NETIF 0 +#endif + +err_t ethernet_input(struct pbuf *p, struct netif *netif); +err_t ethernet_output(struct netif* netif, struct pbuf* p, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type); + +extern const struct eth_addr ethbroadcast, ethzero; + +#endif /* LWIP_ARP || LWIP_ETHERNET */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_NETIF_ETHERNET_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6.h index 4174644..db49e30 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6.h @@ -1,86 +1,86 @@ -/** - * @file - * - * 6LowPAN output for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units. - */ - -/* - * Copyright (c) 2015 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#ifndef LWIP_HDR_LOWPAN6_H -#define LWIP_HDR_LOWPAN6_H - -#include "netif/lowpan6_opts.h" - -#if LWIP_IPV6 && LWIP_6LOWPAN /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/ip.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** 1 second period */ -#define LOWPAN6_TMR_INTERVAL 1000 - -void lowpan6_tmr(void); - -err_t lowpan6_set_context(u8_t index, const ip6_addr_t * context); -err_t lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low); - -#if LWIP_IPV4 -err_t lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr); -#endif /* LWIP_IPV4 */ -err_t lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr); -err_t lowpan6_input(struct pbuf * p, struct netif *netif); -err_t lowpan6_if_init(struct netif *netif); - -/* pan_id in network byte order. */ -err_t lowpan6_set_pan_id(u16_t pan_id); - -#if !NO_SYS -err_t tcpip_6lowpan_input(struct pbuf *p, struct netif *inp); -#endif /* !NO_SYS */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV6 && LWIP_6LOWPAN */ - -#endif /* LWIP_HDR_LOWPAN6_H */ +/** + * @file + * + * 6LowPAN output for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units. + */ + +/* + * Copyright (c) 2015 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_LOWPAN6_H +#define LWIP_HDR_LOWPAN6_H + +#include "netif/lowpan6_opts.h" + +#if LWIP_IPV6 && LWIP_6LOWPAN /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/ip.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** 1 second period */ +#define LOWPAN6_TMR_INTERVAL 1000 + +void lowpan6_tmr(void); + +err_t lowpan6_set_context(u8_t index, const ip6_addr_t * context); +err_t lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low); + +#if LWIP_IPV4 +err_t lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr); +#endif /* LWIP_IPV4 */ +err_t lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr); +err_t lowpan6_input(struct pbuf * p, struct netif *netif); +err_t lowpan6_if_init(struct netif *netif); + +/* pan_id in network byte order. */ +err_t lowpan6_set_pan_id(u16_t pan_id); + +#if !NO_SYS +err_t tcpip_6lowpan_input(struct pbuf *p, struct netif *inp); +#endif /* !NO_SYS */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_IPV6 && LWIP_6LOWPAN */ + +#endif /* LWIP_HDR_LOWPAN6_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6_opts.h index fb93ea0..96d5780 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/lowpan6_opts.h @@ -1,70 +1,70 @@ -/** - * @file - * 6LowPAN options list - */ - -/* - * Copyright (c) 2015 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -#ifndef LWIP_HDR_LOWPAN6_OPTS_H -#define LWIP_HDR_LOWPAN6_OPTS_H - -#include "lwip/opt.h" - -#ifndef LWIP_6LOWPAN -#define LWIP_6LOWPAN 0 -#endif - -#ifndef LWIP_6LOWPAN_NUM_CONTEXTS -#define LWIP_6LOWPAN_NUM_CONTEXTS 10 -#endif - -#ifndef LWIP_6LOWPAN_INFER_SHORT_ADDRESS -#define LWIP_6LOWPAN_INFER_SHORT_ADDRESS 1 -#endif - -#ifndef LWIP_6LOWPAN_IPHC -#define LWIP_6LOWPAN_IPHC 1 -#endif - -#ifndef LWIP_6LOWPAN_HW_CRC -#define LWIP_6LOWPAN_HW_CRC 1 -#endif - -#ifndef LOWPAN6_DEBUG -#define LOWPAN6_DEBUG LWIP_DBG_OFF -#endif - -#endif /* LWIP_HDR_LOWPAN6_OPTS_H */ +/** + * @file + * 6LowPAN options list + */ + +/* + * Copyright (c) 2015 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +#ifndef LWIP_HDR_LOWPAN6_OPTS_H +#define LWIP_HDR_LOWPAN6_OPTS_H + +#include "lwip/opt.h" + +#ifndef LWIP_6LOWPAN +#define LWIP_6LOWPAN 0 +#endif + +#ifndef LWIP_6LOWPAN_NUM_CONTEXTS +#define LWIP_6LOWPAN_NUM_CONTEXTS 10 +#endif + +#ifndef LWIP_6LOWPAN_INFER_SHORT_ADDRESS +#define LWIP_6LOWPAN_INFER_SHORT_ADDRESS 1 +#endif + +#ifndef LWIP_6LOWPAN_IPHC +#define LWIP_6LOWPAN_IPHC 1 +#endif + +#ifndef LWIP_6LOWPAN_HW_CRC +#define LWIP_6LOWPAN_HW_CRC 1 +#endif + +#ifndef LOWPAN6_DEBUG +#define LOWPAN6_DEBUG LWIP_DBG_OFF +#endif + +#endif /* LWIP_HDR_LOWPAN6_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ccp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ccp.h index 14dd659..ce43af7 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ccp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ccp.h @@ -1,156 +1,156 @@ -/* - * ccp.h - Definitions for PPP Compression Control Protocol. - * - * Copyright (c) 1994-2002 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: ccp.h,v 1.12 2004/11/04 10:02:26 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef CCP_H -#define CCP_H - -/* - * CCP codes. - */ - -#define CCP_CONFREQ 1 -#define CCP_CONFACK 2 -#define CCP_TERMREQ 5 -#define CCP_TERMACK 6 -#define CCP_RESETREQ 14 -#define CCP_RESETACK 15 - -/* - * Max # bytes for a CCP option - */ - -#define CCP_MAX_OPTION_LENGTH 32 - -/* - * Parts of a CCP packet. - */ - -#define CCP_CODE(dp) ((dp)[0]) -#define CCP_ID(dp) ((dp)[1]) -#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3]) -#define CCP_HDRLEN 4 - -#define CCP_OPT_CODE(dp) ((dp)[0]) -#define CCP_OPT_LENGTH(dp) ((dp)[1]) -#define CCP_OPT_MINLEN 2 - -#if BSDCOMPRESS_SUPPORT -/* - * Definitions for BSD-Compress. - */ - -#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */ -#define CILEN_BSD_COMPRESS 3 /* length of config. option */ - -/* Macros for handling the 3rd byte of the BSD-Compress config option. */ -#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */ -#define BSD_VERSION(x) ((x) >> 5) /* version of option format */ -#define BSD_CURRENT_VERSION 1 /* current version number */ -#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n)) - -#define BSD_MIN_BITS 9 /* smallest code size supported */ -#define BSD_MAX_BITS 15 /* largest code size supported */ -#endif /* BSDCOMPRESS_SUPPORT */ - -#if DEFLATE_SUPPORT -/* - * Definitions for Deflate. - */ - -#define CI_DEFLATE 26 /* config option for Deflate */ -#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */ -#define CILEN_DEFLATE 4 /* length of its config option */ - -#define DEFLATE_MIN_SIZE 9 -#define DEFLATE_MAX_SIZE 15 -#define DEFLATE_METHOD_VAL 8 -#define DEFLATE_SIZE(x) (((x) >> 4) + 8) -#define DEFLATE_METHOD(x) ((x) & 0x0F) -#define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL) -#define DEFLATE_CHK_SEQUENCE 0 -#endif /* DEFLATE_SUPPORT */ - -#if MPPE_SUPPORT -/* - * Definitions for MPPE. - */ - -#define CI_MPPE 18 /* config option for MPPE */ -#define CILEN_MPPE 6 /* length of config option */ -#endif /* MPPE_SUPPORT */ - -#if PREDICTOR_SUPPORT -/* - * Definitions for other, as yet unsupported, compression methods. - */ - -#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */ -#define CILEN_PREDICTOR_1 2 /* length of its config option */ -#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */ -#define CILEN_PREDICTOR_2 2 /* length of its config option */ -#endif /* PREDICTOR_SUPPORT */ - -typedef struct ccp_options { -#if DEFLATE_SUPPORT - unsigned int deflate :1; /* do Deflate? */ - unsigned int deflate_correct :1; /* use correct code for deflate? */ - unsigned int deflate_draft :1; /* use draft RFC code for deflate? */ -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - unsigned int bsd_compress :1; /* do BSD Compress? */ -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - unsigned int predictor_1 :1; /* do Predictor-1? */ - unsigned int predictor_2 :1; /* do Predictor-2? */ -#endif /* PREDICTOR_SUPPORT */ - -#if MPPE_SUPPORT - u8_t mppe; /* MPPE bitfield */ -#endif /* MPPE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - u_short bsd_bits; /* # bits/code for BSD Compress */ -#endif /* BSDCOMPRESS_SUPPORT */ -#if DEFLATE_SUPPORT - u_short deflate_size; /* lg(window size) for Deflate */ -#endif /* DEFLATE_SUPPORT */ - u8_t method; /* code for chosen compression method */ -} ccp_options; - -extern const struct protent ccp_protent; - -void ccp_resetrequest(ppp_pcb *pcb); /* Issue a reset-request. */ - -#endif /* CCP_H */ -#endif /* PPP_SUPPORT && CCP_SUPPORT */ +/* + * ccp.h - Definitions for PPP Compression Control Protocol. + * + * Copyright (c) 1994-2002 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: ccp.h,v 1.12 2004/11/04 10:02:26 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef CCP_H +#define CCP_H + +/* + * CCP codes. + */ + +#define CCP_CONFREQ 1 +#define CCP_CONFACK 2 +#define CCP_TERMREQ 5 +#define CCP_TERMACK 6 +#define CCP_RESETREQ 14 +#define CCP_RESETACK 15 + +/* + * Max # bytes for a CCP option + */ + +#define CCP_MAX_OPTION_LENGTH 32 + +/* + * Parts of a CCP packet. + */ + +#define CCP_CODE(dp) ((dp)[0]) +#define CCP_ID(dp) ((dp)[1]) +#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3]) +#define CCP_HDRLEN 4 + +#define CCP_OPT_CODE(dp) ((dp)[0]) +#define CCP_OPT_LENGTH(dp) ((dp)[1]) +#define CCP_OPT_MINLEN 2 + +#if BSDCOMPRESS_SUPPORT +/* + * Definitions for BSD-Compress. + */ + +#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */ +#define CILEN_BSD_COMPRESS 3 /* length of config. option */ + +/* Macros for handling the 3rd byte of the BSD-Compress config option. */ +#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */ +#define BSD_VERSION(x) ((x) >> 5) /* version of option format */ +#define BSD_CURRENT_VERSION 1 /* current version number */ +#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n)) + +#define BSD_MIN_BITS 9 /* smallest code size supported */ +#define BSD_MAX_BITS 15 /* largest code size supported */ +#endif /* BSDCOMPRESS_SUPPORT */ + +#if DEFLATE_SUPPORT +/* + * Definitions for Deflate. + */ + +#define CI_DEFLATE 26 /* config option for Deflate */ +#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */ +#define CILEN_DEFLATE 4 /* length of its config option */ + +#define DEFLATE_MIN_SIZE 9 +#define DEFLATE_MAX_SIZE 15 +#define DEFLATE_METHOD_VAL 8 +#define DEFLATE_SIZE(x) (((x) >> 4) + 8) +#define DEFLATE_METHOD(x) ((x) & 0x0F) +#define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL) +#define DEFLATE_CHK_SEQUENCE 0 +#endif /* DEFLATE_SUPPORT */ + +#if MPPE_SUPPORT +/* + * Definitions for MPPE. + */ + +#define CI_MPPE 18 /* config option for MPPE */ +#define CILEN_MPPE 6 /* length of config option */ +#endif /* MPPE_SUPPORT */ + +#if PREDICTOR_SUPPORT +/* + * Definitions for other, as yet unsupported, compression methods. + */ + +#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */ +#define CILEN_PREDICTOR_1 2 /* length of its config option */ +#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */ +#define CILEN_PREDICTOR_2 2 /* length of its config option */ +#endif /* PREDICTOR_SUPPORT */ + +typedef struct ccp_options { +#if DEFLATE_SUPPORT + unsigned int deflate :1; /* do Deflate? */ + unsigned int deflate_correct :1; /* use correct code for deflate? */ + unsigned int deflate_draft :1; /* use draft RFC code for deflate? */ +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + unsigned int bsd_compress :1; /* do BSD Compress? */ +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + unsigned int predictor_1 :1; /* do Predictor-1? */ + unsigned int predictor_2 :1; /* do Predictor-2? */ +#endif /* PREDICTOR_SUPPORT */ + +#if MPPE_SUPPORT + u8_t mppe; /* MPPE bitfield */ +#endif /* MPPE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + u_short bsd_bits; /* # bits/code for BSD Compress */ +#endif /* BSDCOMPRESS_SUPPORT */ +#if DEFLATE_SUPPORT + u_short deflate_size; /* lg(window size) for Deflate */ +#endif /* DEFLATE_SUPPORT */ + u8_t method; /* code for chosen compression method */ +} ccp_options; + +extern const struct protent ccp_protent; + +void ccp_resetrequest(ppp_pcb *pcb); /* Issue a reset-request. */ + +#endif /* CCP_H */ +#endif /* PPP_SUPPORT && CCP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-md5.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-md5.h index eb0269f..1f58dfe 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-md5.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-md5.h @@ -1,36 +1,36 @@ -/* - * chap-md5.h - New CHAP/MD5 implementation. - * - * Copyright (c) 2003 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -extern const struct chap_digest_type md5_digest; - -#endif /* PPP_SUPPORT && CHAP_SUPPORT */ +/* + * chap-md5.h - New CHAP/MD5 implementation. + * + * Copyright (c) 2003 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +extern const struct chap_digest_type md5_digest; + +#endif /* PPP_SUPPORT && CHAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-new.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-new.h index 64eae32..353e6a0 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-new.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap-new.h @@ -1,192 +1,192 @@ -/* - * chap-new.c - New CHAP implementation. - * - * Copyright (c) 2003 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef CHAP_H -#define CHAP_H - -#include "ppp.h" - -/* - * CHAP packets begin with a standard header with code, id, len (2 bytes). - */ -#define CHAP_HDRLEN 4 - -/* - * Values for the code field. - */ -#define CHAP_CHALLENGE 1 -#define CHAP_RESPONSE 2 -#define CHAP_SUCCESS 3 -#define CHAP_FAILURE 4 - -/* - * CHAP digest codes. - */ -#define CHAP_MD5 5 -#if MSCHAP_SUPPORT -#define CHAP_MICROSOFT 0x80 -#define CHAP_MICROSOFT_V2 0x81 -#endif /* MSCHAP_SUPPORT */ - -/* - * Semi-arbitrary limits on challenge and response fields. - */ -#define MAX_CHALLENGE_LEN 64 -#define MAX_RESPONSE_LEN 64 - -/* - * These limits apply to challenge and response packets we send. - * The +4 is the +1 that we actually need rounded up. - */ -#define CHAL_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_CHALLENGE_LEN + MAXNAMELEN) -#define RESP_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_RESPONSE_LEN + MAXNAMELEN) - -/* bitmask of supported algorithms */ -#if MSCHAP_SUPPORT -#define MDTYPE_MICROSOFT_V2 0x1 -#define MDTYPE_MICROSOFT 0x2 -#endif /* MSCHAP_SUPPORT */ -#define MDTYPE_MD5 0x4 -#define MDTYPE_NONE 0 - -#if MSCHAP_SUPPORT -/* Return the digest alg. ID for the most preferred digest type. */ -#define CHAP_DIGEST(mdtype) \ - ((mdtype) & MDTYPE_MD5)? CHAP_MD5: \ - ((mdtype) & MDTYPE_MICROSOFT_V2)? CHAP_MICROSOFT_V2: \ - ((mdtype) & MDTYPE_MICROSOFT)? CHAP_MICROSOFT: \ - 0 -#else /* !MSCHAP_SUPPORT */ -#define CHAP_DIGEST(mdtype) \ - ((mdtype) & MDTYPE_MD5)? CHAP_MD5: \ - 0 -#endif /* MSCHAP_SUPPORT */ - -/* Return the bit flag (lsb set) for our most preferred digest type. */ -#define CHAP_MDTYPE(mdtype) ((mdtype) ^ ((mdtype) - 1)) & (mdtype) - -/* Return the bit flag for a given digest algorithm ID. */ -#if MSCHAP_SUPPORT -#define CHAP_MDTYPE_D(digest) \ - ((digest) == CHAP_MICROSOFT_V2)? MDTYPE_MICROSOFT_V2: \ - ((digest) == CHAP_MICROSOFT)? MDTYPE_MICROSOFT: \ - ((digest) == CHAP_MD5)? MDTYPE_MD5: \ - 0 -#else /* !MSCHAP_SUPPORT */ -#define CHAP_MDTYPE_D(digest) \ - ((digest) == CHAP_MD5)? MDTYPE_MD5: \ - 0 -#endif /* MSCHAP_SUPPORT */ - -/* Can we do the requested digest? */ -#if MSCHAP_SUPPORT -#define CHAP_CANDIGEST(mdtype, digest) \ - ((digest) == CHAP_MICROSOFT_V2)? (mdtype) & MDTYPE_MICROSOFT_V2: \ - ((digest) == CHAP_MICROSOFT)? (mdtype) & MDTYPE_MICROSOFT: \ - ((digest) == CHAP_MD5)? (mdtype) & MDTYPE_MD5: \ - 0 -#else /* !MSCHAP_SUPPORT */ -#define CHAP_CANDIGEST(mdtype, digest) \ - ((digest) == CHAP_MD5)? (mdtype) & MDTYPE_MD5: \ - 0 -#endif /* MSCHAP_SUPPORT */ - -/* - * The code for each digest type has to supply one of these. - */ -struct chap_digest_type { - int code; - -#if PPP_SERVER - /* - * Note: challenge and response arguments below are formatted as - * a length byte followed by the actual challenge/response data. - */ - void (*generate_challenge)(ppp_pcb *pcb, unsigned char *challenge); - int (*verify_response)(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space); -#endif /* PPP_SERVER */ - void (*make_response)(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *priv); - int (*check_success)(ppp_pcb *pcb, unsigned char *pkt, int len, unsigned char *priv); - void (*handle_failure)(ppp_pcb *pcb, unsigned char *pkt, int len); -}; - -/* - * Each interface is described by chap structure. - */ -#if CHAP_SUPPORT -typedef struct chap_client_state { - u8_t flags; - const char *name; - const struct chap_digest_type *digest; - unsigned char priv[64]; /* private area for digest's use */ -} chap_client_state; - -#if PPP_SERVER -typedef struct chap_server_state { - u8_t flags; - u8_t id; - const char *name; - const struct chap_digest_type *digest; - int challenge_xmits; - int challenge_pktlen; - unsigned char challenge[CHAL_MAX_PKTLEN]; -} chap_server_state; -#endif /* PPP_SERVER */ -#endif /* CHAP_SUPPORT */ - -#if 0 /* UNUSED */ -/* Hook for a plugin to validate CHAP challenge */ -extern int (*chap_verify_hook)(char *name, char *ourname, int id, - const struct chap_digest_type *digest, - unsigned char *challenge, unsigned char *response, - char *message, int message_space); -#endif /* UNUSED */ - -#if PPP_SERVER -/* Called by authentication code to start authenticating the peer. */ -extern void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code); -#endif /* PPP_SERVER */ - -/* Called by auth. code to start authenticating us to the peer. */ -extern void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_code); - -/* Represents the CHAP protocol to the main pppd code */ -extern const struct protent chap_protent; - -#endif /* CHAP_H */ -#endif /* PPP_SUPPORT && CHAP_SUPPORT */ +/* + * chap-new.c - New CHAP implementation. + * + * Copyright (c) 2003 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef CHAP_H +#define CHAP_H + +#include "ppp.h" + +/* + * CHAP packets begin with a standard header with code, id, len (2 bytes). + */ +#define CHAP_HDRLEN 4 + +/* + * Values for the code field. + */ +#define CHAP_CHALLENGE 1 +#define CHAP_RESPONSE 2 +#define CHAP_SUCCESS 3 +#define CHAP_FAILURE 4 + +/* + * CHAP digest codes. + */ +#define CHAP_MD5 5 +#if MSCHAP_SUPPORT +#define CHAP_MICROSOFT 0x80 +#define CHAP_MICROSOFT_V2 0x81 +#endif /* MSCHAP_SUPPORT */ + +/* + * Semi-arbitrary limits on challenge and response fields. + */ +#define MAX_CHALLENGE_LEN 64 +#define MAX_RESPONSE_LEN 64 + +/* + * These limits apply to challenge and response packets we send. + * The +4 is the +1 that we actually need rounded up. + */ +#define CHAL_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_CHALLENGE_LEN + MAXNAMELEN) +#define RESP_MAX_PKTLEN (PPP_HDRLEN + CHAP_HDRLEN + 4 + MAX_RESPONSE_LEN + MAXNAMELEN) + +/* bitmask of supported algorithms */ +#if MSCHAP_SUPPORT +#define MDTYPE_MICROSOFT_V2 0x1 +#define MDTYPE_MICROSOFT 0x2 +#endif /* MSCHAP_SUPPORT */ +#define MDTYPE_MD5 0x4 +#define MDTYPE_NONE 0 + +#if MSCHAP_SUPPORT +/* Return the digest alg. ID for the most preferred digest type. */ +#define CHAP_DIGEST(mdtype) \ + ((mdtype) & MDTYPE_MD5)? CHAP_MD5: \ + ((mdtype) & MDTYPE_MICROSOFT_V2)? CHAP_MICROSOFT_V2: \ + ((mdtype) & MDTYPE_MICROSOFT)? CHAP_MICROSOFT: \ + 0 +#else /* !MSCHAP_SUPPORT */ +#define CHAP_DIGEST(mdtype) \ + ((mdtype) & MDTYPE_MD5)? CHAP_MD5: \ + 0 +#endif /* MSCHAP_SUPPORT */ + +/* Return the bit flag (lsb set) for our most preferred digest type. */ +#define CHAP_MDTYPE(mdtype) ((mdtype) ^ ((mdtype) - 1)) & (mdtype) + +/* Return the bit flag for a given digest algorithm ID. */ +#if MSCHAP_SUPPORT +#define CHAP_MDTYPE_D(digest) \ + ((digest) == CHAP_MICROSOFT_V2)? MDTYPE_MICROSOFT_V2: \ + ((digest) == CHAP_MICROSOFT)? MDTYPE_MICROSOFT: \ + ((digest) == CHAP_MD5)? MDTYPE_MD5: \ + 0 +#else /* !MSCHAP_SUPPORT */ +#define CHAP_MDTYPE_D(digest) \ + ((digest) == CHAP_MD5)? MDTYPE_MD5: \ + 0 +#endif /* MSCHAP_SUPPORT */ + +/* Can we do the requested digest? */ +#if MSCHAP_SUPPORT +#define CHAP_CANDIGEST(mdtype, digest) \ + ((digest) == CHAP_MICROSOFT_V2)? (mdtype) & MDTYPE_MICROSOFT_V2: \ + ((digest) == CHAP_MICROSOFT)? (mdtype) & MDTYPE_MICROSOFT: \ + ((digest) == CHAP_MD5)? (mdtype) & MDTYPE_MD5: \ + 0 +#else /* !MSCHAP_SUPPORT */ +#define CHAP_CANDIGEST(mdtype, digest) \ + ((digest) == CHAP_MD5)? (mdtype) & MDTYPE_MD5: \ + 0 +#endif /* MSCHAP_SUPPORT */ + +/* + * The code for each digest type has to supply one of these. + */ +struct chap_digest_type { + int code; + +#if PPP_SERVER + /* + * Note: challenge and response arguments below are formatted as + * a length byte followed by the actual challenge/response data. + */ + void (*generate_challenge)(ppp_pcb *pcb, unsigned char *challenge); + int (*verify_response)(ppp_pcb *pcb, int id, const char *name, + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space); +#endif /* PPP_SERVER */ + void (*make_response)(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *priv); + int (*check_success)(ppp_pcb *pcb, unsigned char *pkt, int len, unsigned char *priv); + void (*handle_failure)(ppp_pcb *pcb, unsigned char *pkt, int len); +}; + +/* + * Each interface is described by chap structure. + */ +#if CHAP_SUPPORT +typedef struct chap_client_state { + u8_t flags; + const char *name; + const struct chap_digest_type *digest; + unsigned char priv[64]; /* private area for digest's use */ +} chap_client_state; + +#if PPP_SERVER +typedef struct chap_server_state { + u8_t flags; + u8_t id; + const char *name; + const struct chap_digest_type *digest; + int challenge_xmits; + int challenge_pktlen; + unsigned char challenge[CHAL_MAX_PKTLEN]; +} chap_server_state; +#endif /* PPP_SERVER */ +#endif /* CHAP_SUPPORT */ + +#if 0 /* UNUSED */ +/* Hook for a plugin to validate CHAP challenge */ +extern int (*chap_verify_hook)(char *name, char *ourname, int id, + const struct chap_digest_type *digest, + unsigned char *challenge, unsigned char *response, + char *message, int message_space); +#endif /* UNUSED */ + +#if PPP_SERVER +/* Called by authentication code to start authenticating the peer. */ +extern void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code); +#endif /* PPP_SERVER */ + +/* Called by auth. code to start authenticating us to the peer. */ +extern void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_code); + +/* Represents the CHAP protocol to the main pppd code */ +extern const struct protent chap_protent; + +#endif /* CHAP_H */ +#endif /* PPP_SUPPORT && CHAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap_ms.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap_ms.h index 0795291..ed52b40 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap_ms.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/chap_ms.h @@ -1,44 +1,44 @@ -/* - * chap_ms.h - Challenge Handshake Authentication Protocol definitions. - * - * Copyright (c) 1995 Eric Rosenquist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: chap_ms.h,v 1.13 2004/11/15 22:13:26 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef CHAPMS_INCLUDE -#define CHAPMS_INCLUDE - -extern const struct chap_digest_type chapms_digest; -extern const struct chap_digest_type chapms2_digest; - -#endif /* CHAPMS_INCLUDE */ - -#endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ +/* + * chap_ms.h - Challenge Handshake Authentication Protocol definitions. + * + * Copyright (c) 1995 Eric Rosenquist. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: chap_ms.h,v 1.13 2004/11/15 22:13:26 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef CHAPMS_INCLUDE +#define CHAPMS_INCLUDE + +extern const struct chap_digest_type chapms_digest; +extern const struct chap_digest_type chapms2_digest; + +#endif /* CHAPMS_INCLUDE */ + +#endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eap.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eap.h index 3ee9aaf..61efdaf 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eap.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eap.h @@ -1,169 +1,169 @@ -/* - * eap.h - Extensible Authentication Protocol for PPP (RFC 2284) - * - * Copyright (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * Non-exclusive rights to redistribute, modify, translate, and use - * this software in source and binary forms, in whole or in part, is - * hereby granted, provided that the above copyright notice is - * duplicated in any source form, and that neither the name of the - * copyright holder nor the author is used to endorse or promote - * products derived from this software. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Original version by James Carlson - * - * $Id: eap.h,v 1.2 2003/06/11 23:56:26 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef PPP_EAP_H -#define PPP_EAP_H - -#include "ppp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Packet header = Code, id, length. - */ -#define EAP_HEADERLEN 4 - - -/* EAP message codes. */ -#define EAP_REQUEST 1 -#define EAP_RESPONSE 2 -#define EAP_SUCCESS 3 -#define EAP_FAILURE 4 - -/* EAP types */ -#define EAPT_IDENTITY 1 -#define EAPT_NOTIFICATION 2 -#define EAPT_NAK 3 /* (response only) */ -#define EAPT_MD5CHAP 4 -#define EAPT_OTP 5 /* One-Time Password; RFC 1938 */ -#define EAPT_TOKEN 6 /* Generic Token Card */ -/* 7 and 8 are unassigned. */ -#define EAPT_RSA 9 /* RSA Public Key Authentication */ -#define EAPT_DSS 10 /* DSS Unilateral */ -#define EAPT_KEA 11 /* KEA */ -#define EAPT_KEA_VALIDATE 12 /* KEA-VALIDATE */ -#define EAPT_TLS 13 /* EAP-TLS */ -#define EAPT_DEFENDER 14 /* Defender Token (AXENT) */ -#define EAPT_W2K 15 /* Windows 2000 EAP */ -#define EAPT_ARCOT 16 /* Arcot Systems */ -#define EAPT_CISCOWIRELESS 17 /* Cisco Wireless */ -#define EAPT_NOKIACARD 18 /* Nokia IP smart card */ -#define EAPT_SRP 19 /* Secure Remote Password */ -/* 20 is deprecated */ - -/* EAP SRP-SHA1 Subtypes */ -#define EAPSRP_CHALLENGE 1 /* Request 1 - Challenge */ -#define EAPSRP_CKEY 1 /* Response 1 - Client Key */ -#define EAPSRP_SKEY 2 /* Request 2 - Server Key */ -#define EAPSRP_CVALIDATOR 2 /* Response 2 - Client Validator */ -#define EAPSRP_SVALIDATOR 3 /* Request 3 - Server Validator */ -#define EAPSRP_ACK 3 /* Response 3 - final ack */ -#define EAPSRP_LWRECHALLENGE 4 /* Req/resp 4 - Lightweight rechal */ - -#define SRPVAL_EBIT 0x00000001 /* Use shared key for ECP */ - -#define SRP_PSEUDO_ID "pseudo_" -#define SRP_PSEUDO_LEN 7 - -#define MD5_SIGNATURE_SIZE 16 -#define EAP_MIN_CHALLENGE_LENGTH 17 -#define EAP_MAX_CHALLENGE_LENGTH 24 -#define EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH 3 /* 2^3-1 = 7, 17+7 = 24 */ - -#define EAP_STATES \ - "Initial", "Pending", "Closed", "Listen", "Identify", \ - "SRP1", "SRP2", "SRP3", "MD5Chall", "Open", "SRP4", "BadAuth" - -#define eap_client_active(pcb) ((pcb)->eap.es_client.ea_state == eapListen) -#if PPP_SERVER -#define eap_server_active(pcb) \ - ((pcb)->eap.es_server.ea_state >= eapIdentify && \ - (pcb)->eap.es_server.ea_state <= eapMD5Chall) -#endif /* PPP_SERVER */ - -/* - * Complete EAP state for one PPP session. - */ -enum eap_state_code { - eapInitial = 0, /* No EAP authentication yet requested */ - eapPending, /* Waiting for LCP (no timer) */ - eapClosed, /* Authentication not in use */ - eapListen, /* Client ready (and timer running) */ - eapIdentify, /* EAP Identify sent */ - eapSRP1, /* Sent EAP SRP-SHA1 Subtype 1 */ - eapSRP2, /* Sent EAP SRP-SHA1 Subtype 2 */ - eapSRP3, /* Sent EAP SRP-SHA1 Subtype 3 */ - eapMD5Chall, /* Sent MD5-Challenge */ - eapOpen, /* Completed authentication */ - eapSRP4, /* Sent EAP SRP-SHA1 Subtype 4 */ - eapBadAuth /* Failed authentication */ -}; - -struct eap_auth { - const char *ea_name; /* Our name */ - char ea_peer[MAXNAMELEN +1]; /* Peer's name */ - void *ea_session; /* Authentication library linkage */ - u_char *ea_skey; /* Shared encryption key */ - u_short ea_namelen; /* Length of our name */ - u_short ea_peerlen; /* Length of peer's name */ - enum eap_state_code ea_state; - u_char ea_id; /* Current id */ - u_char ea_requests; /* Number of Requests sent/received */ - u_char ea_responses; /* Number of Responses */ - u_char ea_type; /* One of EAPT_* */ - u32_t ea_keyflags; /* SRP shared key usage flags */ -}; - -#ifndef EAP_MAX_CHALLENGE_LENGTH -#define EAP_MAX_CHALLENGE_LENGTH 24 -#endif -typedef struct eap_state { - struct eap_auth es_client; /* Client (authenticatee) data */ -#if PPP_SERVER - struct eap_auth es_server; /* Server (authenticator) data */ -#endif /* PPP_SERVER */ - int es_savedtime; /* Saved timeout */ - int es_rechallenge; /* EAP rechallenge interval */ - int es_lwrechallenge; /* SRP lightweight rechallenge inter */ - u8_t es_usepseudo; /* Use SRP Pseudonym if offered one */ - int es_usedpseudo; /* Set if we already sent PN */ - int es_challen; /* Length of challenge string */ - u_char es_challenge[EAP_MAX_CHALLENGE_LENGTH]; -} eap_state; - -/* - * Timeouts. - */ -#if 0 /* moved to ppp_opts.h */ -#define EAP_DEFTIMEOUT 3 /* Timeout (seconds) for rexmit */ -#define EAP_DEFTRANSMITS 10 /* max # times to transmit */ -#define EAP_DEFREQTIME 20 /* Time to wait for peer request */ -#define EAP_DEFALLOWREQ 20 /* max # times to accept requests */ -#endif /* moved to ppp_opts.h */ - -void eap_authwithpeer(ppp_pcb *pcb, const char *localname); -void eap_authpeer(ppp_pcb *pcb, const char *localname); - -extern const struct protent eap_protent; - -#ifdef __cplusplus -} -#endif - -#endif /* PPP_EAP_H */ - -#endif /* PPP_SUPPORT && EAP_SUPPORT */ +/* + * eap.h - Extensible Authentication Protocol for PPP (RFC 2284) + * + * Copyright (c) 2001 by Sun Microsystems, Inc. + * All rights reserved. + * + * Non-exclusive rights to redistribute, modify, translate, and use + * this software in source and binary forms, in whole or in part, is + * hereby granted, provided that the above copyright notice is + * duplicated in any source form, and that neither the name of the + * copyright holder nor the author is used to endorse or promote + * products derived from this software. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * Original version by James Carlson + * + * $Id: eap.h,v 1.2 2003/06/11 23:56:26 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef PPP_EAP_H +#define PPP_EAP_H + +#include "ppp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Packet header = Code, id, length. + */ +#define EAP_HEADERLEN 4 + + +/* EAP message codes. */ +#define EAP_REQUEST 1 +#define EAP_RESPONSE 2 +#define EAP_SUCCESS 3 +#define EAP_FAILURE 4 + +/* EAP types */ +#define EAPT_IDENTITY 1 +#define EAPT_NOTIFICATION 2 +#define EAPT_NAK 3 /* (response only) */ +#define EAPT_MD5CHAP 4 +#define EAPT_OTP 5 /* One-Time Password; RFC 1938 */ +#define EAPT_TOKEN 6 /* Generic Token Card */ +/* 7 and 8 are unassigned. */ +#define EAPT_RSA 9 /* RSA Public Key Authentication */ +#define EAPT_DSS 10 /* DSS Unilateral */ +#define EAPT_KEA 11 /* KEA */ +#define EAPT_KEA_VALIDATE 12 /* KEA-VALIDATE */ +#define EAPT_TLS 13 /* EAP-TLS */ +#define EAPT_DEFENDER 14 /* Defender Token (AXENT) */ +#define EAPT_W2K 15 /* Windows 2000 EAP */ +#define EAPT_ARCOT 16 /* Arcot Systems */ +#define EAPT_CISCOWIRELESS 17 /* Cisco Wireless */ +#define EAPT_NOKIACARD 18 /* Nokia IP smart card */ +#define EAPT_SRP 19 /* Secure Remote Password */ +/* 20 is deprecated */ + +/* EAP SRP-SHA1 Subtypes */ +#define EAPSRP_CHALLENGE 1 /* Request 1 - Challenge */ +#define EAPSRP_CKEY 1 /* Response 1 - Client Key */ +#define EAPSRP_SKEY 2 /* Request 2 - Server Key */ +#define EAPSRP_CVALIDATOR 2 /* Response 2 - Client Validator */ +#define EAPSRP_SVALIDATOR 3 /* Request 3 - Server Validator */ +#define EAPSRP_ACK 3 /* Response 3 - final ack */ +#define EAPSRP_LWRECHALLENGE 4 /* Req/resp 4 - Lightweight rechal */ + +#define SRPVAL_EBIT 0x00000001 /* Use shared key for ECP */ + +#define SRP_PSEUDO_ID "pseudo_" +#define SRP_PSEUDO_LEN 7 + +#define MD5_SIGNATURE_SIZE 16 +#define EAP_MIN_CHALLENGE_LENGTH 17 +#define EAP_MAX_CHALLENGE_LENGTH 24 +#define EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH 3 /* 2^3-1 = 7, 17+7 = 24 */ + +#define EAP_STATES \ + "Initial", "Pending", "Closed", "Listen", "Identify", \ + "SRP1", "SRP2", "SRP3", "MD5Chall", "Open", "SRP4", "BadAuth" + +#define eap_client_active(pcb) ((pcb)->eap.es_client.ea_state == eapListen) +#if PPP_SERVER +#define eap_server_active(pcb) \ + ((pcb)->eap.es_server.ea_state >= eapIdentify && \ + (pcb)->eap.es_server.ea_state <= eapMD5Chall) +#endif /* PPP_SERVER */ + +/* + * Complete EAP state for one PPP session. + */ +enum eap_state_code { + eapInitial = 0, /* No EAP authentication yet requested */ + eapPending, /* Waiting for LCP (no timer) */ + eapClosed, /* Authentication not in use */ + eapListen, /* Client ready (and timer running) */ + eapIdentify, /* EAP Identify sent */ + eapSRP1, /* Sent EAP SRP-SHA1 Subtype 1 */ + eapSRP2, /* Sent EAP SRP-SHA1 Subtype 2 */ + eapSRP3, /* Sent EAP SRP-SHA1 Subtype 3 */ + eapMD5Chall, /* Sent MD5-Challenge */ + eapOpen, /* Completed authentication */ + eapSRP4, /* Sent EAP SRP-SHA1 Subtype 4 */ + eapBadAuth /* Failed authentication */ +}; + +struct eap_auth { + const char *ea_name; /* Our name */ + char ea_peer[MAXNAMELEN +1]; /* Peer's name */ + void *ea_session; /* Authentication library linkage */ + u_char *ea_skey; /* Shared encryption key */ + u_short ea_namelen; /* Length of our name */ + u_short ea_peerlen; /* Length of peer's name */ + enum eap_state_code ea_state; + u_char ea_id; /* Current id */ + u_char ea_requests; /* Number of Requests sent/received */ + u_char ea_responses; /* Number of Responses */ + u_char ea_type; /* One of EAPT_* */ + u32_t ea_keyflags; /* SRP shared key usage flags */ +}; + +#ifndef EAP_MAX_CHALLENGE_LENGTH +#define EAP_MAX_CHALLENGE_LENGTH 24 +#endif +typedef struct eap_state { + struct eap_auth es_client; /* Client (authenticatee) data */ +#if PPP_SERVER + struct eap_auth es_server; /* Server (authenticator) data */ +#endif /* PPP_SERVER */ + int es_savedtime; /* Saved timeout */ + int es_rechallenge; /* EAP rechallenge interval */ + int es_lwrechallenge; /* SRP lightweight rechallenge inter */ + u8_t es_usepseudo; /* Use SRP Pseudonym if offered one */ + int es_usedpseudo; /* Set if we already sent PN */ + int es_challen; /* Length of challenge string */ + u_char es_challenge[EAP_MAX_CHALLENGE_LENGTH]; +} eap_state; + +/* + * Timeouts. + */ +#if 0 /* moved to ppp_opts.h */ +#define EAP_DEFTIMEOUT 3 /* Timeout (seconds) for rexmit */ +#define EAP_DEFTRANSMITS 10 /* max # times to transmit */ +#define EAP_DEFREQTIME 20 /* Time to wait for peer request */ +#define EAP_DEFALLOWREQ 20 /* max # times to accept requests */ +#endif /* moved to ppp_opts.h */ + +void eap_authwithpeer(ppp_pcb *pcb, const char *localname); +void eap_authpeer(ppp_pcb *pcb, const char *localname); + +extern const struct protent eap_protent; + +#ifdef __cplusplus +} +#endif + +#endif /* PPP_EAP_H */ + +#endif /* PPP_SUPPORT && EAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ecp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ecp.h index 5cdce29..45c5d7d 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ecp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ecp.h @@ -1,50 +1,50 @@ -/* - * ecp.h - Definitions for PPP Encryption Control Protocol. - * - * Copyright (c) 2002 Google, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: ecp.h,v 1.2 2003/01/10 07:12:36 fcusack Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -typedef struct ecp_options { - bool required; /* Is ECP required? */ - unsigned enctype; /* Encryption type */ -} ecp_options; - -extern fsm ecp_fsm[]; -extern ecp_options ecp_wantoptions[]; -extern ecp_options ecp_gotoptions[]; -extern ecp_options ecp_allowoptions[]; -extern ecp_options ecp_hisoptions[]; - -extern const struct protent ecp_protent; - -#endif /* PPP_SUPPORT && ECP_SUPPORT */ +/* + * ecp.h - Definitions for PPP Encryption Control Protocol. + * + * Copyright (c) 2002 Google, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: ecp.h,v 1.2 2003/01/10 07:12:36 fcusack Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +typedef struct ecp_options { + bool required; /* Is ECP required? */ + unsigned enctype; /* Encryption type */ +} ecp_options; + +extern fsm ecp_fsm[]; +extern ecp_options ecp_wantoptions[]; +extern ecp_options ecp_gotoptions[]; +extern ecp_options ecp_allowoptions[]; +extern ecp_options ecp_hisoptions[]; + +extern const struct protent ecp_protent; + +#endif /* PPP_SUPPORT && ECP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eui64.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eui64.h index 20ac22e..e41b143 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eui64.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/eui64.h @@ -1,94 +1,94 @@ -/* - * eui64.h - EUI64 routines for IPv6CP. - * - * Copyright (c) 1999 Tommi Komulainen. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Tommi Komulainen - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: eui64.h,v 1.6 2002/12/04 23:03:32 paulus Exp $ -*/ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef EUI64_H -#define EUI64_H - -/* - * @todo: - * - * Maybe this should be done by processing struct in6_addr directly... - */ -typedef union -{ - u8_t e8[8]; - u16_t e16[4]; - u32_t e32[2]; -} eui64_t; - -#define eui64_iszero(e) (((e).e32[0] | (e).e32[1]) == 0) -#define eui64_equals(e, o) (((e).e32[0] == (o).e32[0]) && \ - ((e).e32[1] == (o).e32[1])) -#define eui64_zero(e) (e).e32[0] = (e).e32[1] = 0; - -#define eui64_copy(s, d) memcpy(&(d), &(s), sizeof(eui64_t)) - -#define eui64_magic(e) do { \ - (e).e32[0] = magic(); \ - (e).e32[1] = magic(); \ - (e).e8[0] &= ~2; \ - } while (0) -#define eui64_magic_nz(x) do { \ - eui64_magic(x); \ - } while (eui64_iszero(x)) -#define eui64_magic_ne(x, y) do { \ - eui64_magic(x); \ - } while (eui64_equals(x, y)) - -#define eui64_get(ll, cp) do { \ - eui64_copy((*cp), (ll)); \ - (cp) += sizeof(eui64_t); \ - } while (0) - -#define eui64_put(ll, cp) do { \ - eui64_copy((ll), (*cp)); \ - (cp) += sizeof(eui64_t); \ - } while (0) - -#define eui64_set32(e, l) do { \ - (e).e32[0] = 0; \ - (e).e32[1] = lwip_htonl(l); \ - } while (0) -#define eui64_setlo32(e, l) eui64_set32(e, l) - -char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */ - -#endif /* EUI64_H */ -#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ +/* + * eui64.h - EUI64 routines for IPv6CP. + * + * Copyright (c) 1999 Tommi Komulainen. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Tommi Komulainen + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: eui64.h,v 1.6 2002/12/04 23:03:32 paulus Exp $ +*/ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef EUI64_H +#define EUI64_H + +/* + * @todo: + * + * Maybe this should be done by processing struct in6_addr directly... + */ +typedef union +{ + u8_t e8[8]; + u16_t e16[4]; + u32_t e32[2]; +} eui64_t; + +#define eui64_iszero(e) (((e).e32[0] | (e).e32[1]) == 0) +#define eui64_equals(e, o) (((e).e32[0] == (o).e32[0]) && \ + ((e).e32[1] == (o).e32[1])) +#define eui64_zero(e) (e).e32[0] = (e).e32[1] = 0; + +#define eui64_copy(s, d) memcpy(&(d), &(s), sizeof(eui64_t)) + +#define eui64_magic(e) do { \ + (e).e32[0] = magic(); \ + (e).e32[1] = magic(); \ + (e).e8[0] &= ~2; \ + } while (0) +#define eui64_magic_nz(x) do { \ + eui64_magic(x); \ + } while (eui64_iszero(x)) +#define eui64_magic_ne(x, y) do { \ + eui64_magic(x); \ + } while (eui64_equals(x, y)) + +#define eui64_get(ll, cp) do { \ + eui64_copy((*cp), (ll)); \ + (cp) += sizeof(eui64_t); \ + } while (0) + +#define eui64_put(ll, cp) do { \ + eui64_copy((ll), (*cp)); \ + (cp) += sizeof(eui64_t); \ + } while (0) + +#define eui64_set32(e, l) do { \ + (e).e32[0] = 0; \ + (e).e32[1] = lwip_htonl(l); \ + } while (0) +#define eui64_setlo32(e, l) eui64_set32(e, l) + +char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */ + +#endif /* EUI64_H */ +#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/fsm.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/fsm.h index b6915d3..7fd3191 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/fsm.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/fsm.h @@ -1,175 +1,175 @@ -/* - * fsm.h - {Link, IP} Control Protocol Finite State Machine definitions. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: fsm.h,v 1.10 2004/11/13 02:28:15 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef FSM_H -#define FSM_H - -#include "ppp.h" - -/* - * Packet header = Code, id, length. - */ -#define HEADERLEN 4 - - -/* - * CP (LCP, IPCP, etc.) codes. - */ -#define CONFREQ 1 /* Configuration Request */ -#define CONFACK 2 /* Configuration Ack */ -#define CONFNAK 3 /* Configuration Nak */ -#define CONFREJ 4 /* Configuration Reject */ -#define TERMREQ 5 /* Termination Request */ -#define TERMACK 6 /* Termination Ack */ -#define CODEREJ 7 /* Code Reject */ - - -/* - * Each FSM is described by an fsm structure and fsm callbacks. - */ -typedef struct fsm { - ppp_pcb *pcb; /* PPP Interface */ - const struct fsm_callbacks *callbacks; /* Callback routines */ - const char *term_reason; /* Reason for closing protocol */ - u8_t seen_ack; /* Have received valid Ack/Nak/Rej to Req */ - /* -- This is our only flag, we might use u_int :1 if we have more flags */ - u16_t protocol; /* Data Link Layer Protocol field value */ - u8_t state; /* State */ - u8_t flags; /* Contains option bits */ - u8_t id; /* Current id */ - u8_t reqid; /* Current request id */ - u8_t retransmits; /* Number of retransmissions left */ - u8_t nakloops; /* Number of nak loops since last ack */ - u8_t rnakloops; /* Number of naks received */ - u8_t maxnakloops; /* Maximum number of nak loops tolerated - (necessary because IPCP require a custom large max nak loops value) */ - u8_t term_reason_len; /* Length of term_reason */ -} fsm; - - -typedef struct fsm_callbacks { - void (*resetci) /* Reset our Configuration Information */ - (fsm *); - int (*cilen) /* Length of our Configuration Information */ - (fsm *); - void (*addci) /* Add our Configuration Information */ - (fsm *, u_char *, int *); - int (*ackci) /* ACK our Configuration Information */ - (fsm *, u_char *, int); - int (*nakci) /* NAK our Configuration Information */ - (fsm *, u_char *, int, int); - int (*rejci) /* Reject our Configuration Information */ - (fsm *, u_char *, int); - int (*reqci) /* Request peer's Configuration Information */ - (fsm *, u_char *, int *, int); - void (*up) /* Called when fsm reaches PPP_FSM_OPENED state */ - (fsm *); - void (*down) /* Called when fsm leaves PPP_FSM_OPENED state */ - (fsm *); - void (*starting) /* Called when we want the lower layer */ - (fsm *); - void (*finished) /* Called when we don't want the lower layer */ - (fsm *); - void (*protreject) /* Called when Protocol-Reject received */ - (int); - void (*retransmit) /* Retransmission is necessary */ - (fsm *); - int (*extcode) /* Called when unknown code received */ - (fsm *, int, int, u_char *, int); - const char *proto_name; /* String name for protocol (for messages) */ -} fsm_callbacks; - - -/* - * Link states. - */ -#define PPP_FSM_INITIAL 0 /* Down, hasn't been opened */ -#define PPP_FSM_STARTING 1 /* Down, been opened */ -#define PPP_FSM_CLOSED 2 /* Up, hasn't been opened */ -#define PPP_FSM_STOPPED 3 /* Open, waiting for down event */ -#define PPP_FSM_CLOSING 4 /* Terminating the connection, not open */ -#define PPP_FSM_STOPPING 5 /* Terminating, but open */ -#define PPP_FSM_REQSENT 6 /* We've sent a Config Request */ -#define PPP_FSM_ACKRCVD 7 /* We've received a Config Ack */ -#define PPP_FSM_ACKSENT 8 /* We've sent a Config Ack */ -#define PPP_FSM_OPENED 9 /* Connection available */ - - -/* - * Flags - indicate options controlling FSM operation - */ -#define OPT_PASSIVE 1 /* Don't die if we don't get a response */ -#define OPT_RESTART 2 /* Treat 2nd OPEN as DOWN, UP */ -#define OPT_SILENT 4 /* Wait for peer to speak first */ - - -/* - * Timeouts. - */ -#if 0 /* moved to ppp_opts.h */ -#define DEFTIMEOUT 3 /* Timeout time in seconds */ -#define DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ -#define DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ -#define DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ -#endif /* moved to ppp_opts.h */ - - -/* - * Prototypes - */ -void fsm_init(fsm *f); -void fsm_lowerup(fsm *f); -void fsm_lowerdown(fsm *f); -void fsm_open(fsm *f); -void fsm_close(fsm *f, const char *reason); -void fsm_input(fsm *f, u_char *inpacket, int l); -void fsm_protreject(fsm *f); -void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen); - - -#endif /* FSM_H */ -#endif /* PPP_SUPPORT */ +/* + * fsm.h - {Link, IP} Control Protocol Finite State Machine definitions. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: fsm.h,v 1.10 2004/11/13 02:28:15 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef FSM_H +#define FSM_H + +#include "ppp.h" + +/* + * Packet header = Code, id, length. + */ +#define HEADERLEN 4 + + +/* + * CP (LCP, IPCP, etc.) codes. + */ +#define CONFREQ 1 /* Configuration Request */ +#define CONFACK 2 /* Configuration Ack */ +#define CONFNAK 3 /* Configuration Nak */ +#define CONFREJ 4 /* Configuration Reject */ +#define TERMREQ 5 /* Termination Request */ +#define TERMACK 6 /* Termination Ack */ +#define CODEREJ 7 /* Code Reject */ + + +/* + * Each FSM is described by an fsm structure and fsm callbacks. + */ +typedef struct fsm { + ppp_pcb *pcb; /* PPP Interface */ + const struct fsm_callbacks *callbacks; /* Callback routines */ + const char *term_reason; /* Reason for closing protocol */ + u8_t seen_ack; /* Have received valid Ack/Nak/Rej to Req */ + /* -- This is our only flag, we might use u_int :1 if we have more flags */ + u16_t protocol; /* Data Link Layer Protocol field value */ + u8_t state; /* State */ + u8_t flags; /* Contains option bits */ + u8_t id; /* Current id */ + u8_t reqid; /* Current request id */ + u8_t retransmits; /* Number of retransmissions left */ + u8_t nakloops; /* Number of nak loops since last ack */ + u8_t rnakloops; /* Number of naks received */ + u8_t maxnakloops; /* Maximum number of nak loops tolerated + (necessary because IPCP require a custom large max nak loops value) */ + u8_t term_reason_len; /* Length of term_reason */ +} fsm; + + +typedef struct fsm_callbacks { + void (*resetci) /* Reset our Configuration Information */ + (fsm *); + int (*cilen) /* Length of our Configuration Information */ + (fsm *); + void (*addci) /* Add our Configuration Information */ + (fsm *, u_char *, int *); + int (*ackci) /* ACK our Configuration Information */ + (fsm *, u_char *, int); + int (*nakci) /* NAK our Configuration Information */ + (fsm *, u_char *, int, int); + int (*rejci) /* Reject our Configuration Information */ + (fsm *, u_char *, int); + int (*reqci) /* Request peer's Configuration Information */ + (fsm *, u_char *, int *, int); + void (*up) /* Called when fsm reaches PPP_FSM_OPENED state */ + (fsm *); + void (*down) /* Called when fsm leaves PPP_FSM_OPENED state */ + (fsm *); + void (*starting) /* Called when we want the lower layer */ + (fsm *); + void (*finished) /* Called when we don't want the lower layer */ + (fsm *); + void (*protreject) /* Called when Protocol-Reject received */ + (int); + void (*retransmit) /* Retransmission is necessary */ + (fsm *); + int (*extcode) /* Called when unknown code received */ + (fsm *, int, int, u_char *, int); + const char *proto_name; /* String name for protocol (for messages) */ +} fsm_callbacks; + + +/* + * Link states. + */ +#define PPP_FSM_INITIAL 0 /* Down, hasn't been opened */ +#define PPP_FSM_STARTING 1 /* Down, been opened */ +#define PPP_FSM_CLOSED 2 /* Up, hasn't been opened */ +#define PPP_FSM_STOPPED 3 /* Open, waiting for down event */ +#define PPP_FSM_CLOSING 4 /* Terminating the connection, not open */ +#define PPP_FSM_STOPPING 5 /* Terminating, but open */ +#define PPP_FSM_REQSENT 6 /* We've sent a Config Request */ +#define PPP_FSM_ACKRCVD 7 /* We've received a Config Ack */ +#define PPP_FSM_ACKSENT 8 /* We've sent a Config Ack */ +#define PPP_FSM_OPENED 9 /* Connection available */ + + +/* + * Flags - indicate options controlling FSM operation + */ +#define OPT_PASSIVE 1 /* Don't die if we don't get a response */ +#define OPT_RESTART 2 /* Treat 2nd OPEN as DOWN, UP */ +#define OPT_SILENT 4 /* Wait for peer to speak first */ + + +/* + * Timeouts. + */ +#if 0 /* moved to ppp_opts.h */ +#define DEFTIMEOUT 3 /* Timeout time in seconds */ +#define DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */ +#define DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */ +#define DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */ +#endif /* moved to ppp_opts.h */ + + +/* + * Prototypes + */ +void fsm_init(fsm *f); +void fsm_lowerup(fsm *f); +void fsm_lowerdown(fsm *f); +void fsm_open(fsm *f); +void fsm_close(fsm *f, const char *reason); +void fsm_input(fsm *f, u_char *inpacket, int l); +void fsm_protreject(fsm *f); +void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen); + + +#endif /* FSM_H */ +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipcp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipcp.h index 45f46b3..3c60b34 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipcp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipcp.h @@ -1,126 +1,126 @@ -/* - * ipcp.h - IP Control Protocol definitions. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: ipcp.h,v 1.14 2002/12/04 23:03:32 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef IPCP_H -#define IPCP_H - -/* - * Options. - */ -#define CI_ADDRS 1 /* IP Addresses */ -#if VJ_SUPPORT -#define CI_COMPRESSTYPE 2 /* Compression Type */ -#endif /* VJ_SUPPORT */ -#define CI_ADDR 3 - -#if LWIP_DNS -#define CI_MS_DNS1 129 /* Primary DNS value */ -#define CI_MS_DNS2 131 /* Secondary DNS value */ -#endif /* LWIP_DNS */ -#if 0 /* UNUSED - WINS */ -#define CI_MS_WINS1 130 /* Primary WINS value */ -#define CI_MS_WINS2 132 /* Secondary WINS value */ -#endif /* UNUSED - WINS */ - -#if VJ_SUPPORT -#define MAX_STATES 16 /* from slcompress.h */ - -#define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */ -#define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */ -#define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */ - /* maxslot and slot number compression) */ - -#define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ -#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ - /* compression option*/ -#endif /* VJ_SUPPORT */ - -typedef struct ipcp_options { - unsigned int neg_addr :1; /* Negotiate IP Address? */ - unsigned int old_addrs :1; /* Use old (IP-Addresses) option? */ - unsigned int req_addr :1; /* Ask peer to send IP address? */ -#if 0 /* UNUSED */ - unsigned int default_route :1; /* Assign default route through interface? */ - unsigned int replace_default_route :1; /* Replace default route through interface? */ -#endif /* UNUSED */ -#if 0 /* UNUSED - PROXY ARP */ - unsigned int proxy_arp :1; /* Make proxy ARP entry for peer? */ -#endif /* UNUSED - PROXY ARP */ -#if VJ_SUPPORT - unsigned int neg_vj :1; /* Van Jacobson Compression? */ - unsigned int old_vj :1; /* use old (short) form of VJ option? */ - unsigned int cflag :1; -#endif /* VJ_SUPPORT */ - unsigned int accept_local :1; /* accept peer's value for ouraddr */ - unsigned int accept_remote :1; /* accept peer's value for hisaddr */ -#if LWIP_DNS - unsigned int req_dns1 :1; /* Ask peer to send primary DNS address? */ - unsigned int req_dns2 :1; /* Ask peer to send secondary DNS address? */ -#endif /* LWIP_DNS */ - - u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ -#if LWIP_DNS - u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ -#endif /* LWIP_DNS */ -#if 0 /* UNUSED - WINS */ - u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ -#endif /* UNUSED - WINS */ - -#if VJ_SUPPORT - u16_t vj_protocol; /* protocol value to use in VJ option */ - u8_t maxslotindex; /* values for RFC1332 VJ compression neg. */ -#endif /* VJ_SUPPORT */ -} ipcp_options; - -#if 0 /* UNUSED, already defined by lwIP */ -char *ip_ntoa (u32_t); -#endif /* UNUSED, already defined by lwIP */ - -extern const struct protent ipcp_protent; - -#endif /* IPCP_H */ -#endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */ +/* + * ipcp.h - IP Control Protocol definitions. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: ipcp.h,v 1.14 2002/12/04 23:03:32 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef IPCP_H +#define IPCP_H + +/* + * Options. + */ +#define CI_ADDRS 1 /* IP Addresses */ +#if VJ_SUPPORT +#define CI_COMPRESSTYPE 2 /* Compression Type */ +#endif /* VJ_SUPPORT */ +#define CI_ADDR 3 + +#if LWIP_DNS +#define CI_MS_DNS1 129 /* Primary DNS value */ +#define CI_MS_DNS2 131 /* Secondary DNS value */ +#endif /* LWIP_DNS */ +#if 0 /* UNUSED - WINS */ +#define CI_MS_WINS1 130 /* Primary WINS value */ +#define CI_MS_WINS2 132 /* Secondary WINS value */ +#endif /* UNUSED - WINS */ + +#if VJ_SUPPORT +#define MAX_STATES 16 /* from slcompress.h */ + +#define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */ +#define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */ +#define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */ + /* maxslot and slot number compression) */ + +#define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ +#define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ + /* compression option*/ +#endif /* VJ_SUPPORT */ + +typedef struct ipcp_options { + unsigned int neg_addr :1; /* Negotiate IP Address? */ + unsigned int old_addrs :1; /* Use old (IP-Addresses) option? */ + unsigned int req_addr :1; /* Ask peer to send IP address? */ +#if 0 /* UNUSED */ + unsigned int default_route :1; /* Assign default route through interface? */ + unsigned int replace_default_route :1; /* Replace default route through interface? */ +#endif /* UNUSED */ +#if 0 /* UNUSED - PROXY ARP */ + unsigned int proxy_arp :1; /* Make proxy ARP entry for peer? */ +#endif /* UNUSED - PROXY ARP */ +#if VJ_SUPPORT + unsigned int neg_vj :1; /* Van Jacobson Compression? */ + unsigned int old_vj :1; /* use old (short) form of VJ option? */ + unsigned int cflag :1; +#endif /* VJ_SUPPORT */ + unsigned int accept_local :1; /* accept peer's value for ouraddr */ + unsigned int accept_remote :1; /* accept peer's value for hisaddr */ +#if LWIP_DNS + unsigned int req_dns1 :1; /* Ask peer to send primary DNS address? */ + unsigned int req_dns2 :1; /* Ask peer to send secondary DNS address? */ +#endif /* LWIP_DNS */ + + u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ +#if LWIP_DNS + u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ +#endif /* LWIP_DNS */ +#if 0 /* UNUSED - WINS */ + u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ +#endif /* UNUSED - WINS */ + +#if VJ_SUPPORT + u16_t vj_protocol; /* protocol value to use in VJ option */ + u8_t maxslotindex; /* values for RFC1332 VJ compression neg. */ +#endif /* VJ_SUPPORT */ +} ipcp_options; + +#if 0 /* UNUSED, already defined by lwIP */ +char *ip_ntoa (u32_t); +#endif /* UNUSED, already defined by lwIP */ + +extern const struct protent ipcp_protent; + +#endif /* IPCP_H */ +#endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipv6cp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipv6cp.h index 07d1ae3..b9a2f88 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipv6cp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ipv6cp.h @@ -1,183 +1,183 @@ -/* - * ipv6cp.h - PPP IPV6 Control Protocol. - * - * Copyright (c) 1999 Tommi Komulainen. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Tommi Komulainen - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -/* Original version, based on RFC2023 : - - Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt, - Alain.Durand@imag.fr, IMAG, - Jean-Luc.Richier@imag.fr, IMAG-LSR. - - Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE, - Alain.Durand@imag.fr, IMAG, - Jean-Luc.Richier@imag.fr, IMAG-LSR. - - Ce travail a été fait au sein du GIE DYADE (Groupement d'Intérêt - Économique ayant pour membres BULL S.A. et l'INRIA). - - Ce logiciel informatique est disponible aux conditions - usuelles dans la recherche, c'est-à-dire qu'il peut - être utilisé, copié, modifié, distribué à l'unique - condition que ce texte soit conservé afin que - l'origine de ce logiciel soit reconnue. - - Le nom de l'Institut National de Recherche en Informatique - et en Automatique (INRIA), de l'IMAG, ou d'une personne morale - ou physique ayant participé à l'élaboration de ce logiciel ne peut - être utilisé sans son accord préalable explicite. - - Ce logiciel est fourni tel quel sans aucune garantie, - support ou responsabilité d'aucune sorte. - Ce logiciel est dérivé de sources d'origine - "University of California at Berkeley" et - "Digital Equipment Corporation" couvertes par des copyrights. - - L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG) - est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National - Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant - sept laboratoires dont le laboratoire Logiciels, Systèmes, Réseaux (LSR). - - This work has been done in the context of GIE DYADE (joint R & D venture - between BULL S.A. and INRIA). - - This software is available with usual "research" terms - with the aim of retain credits of the software. - Permission to use, copy, modify and distribute this software for any - purpose and without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies, - and the name of INRIA, IMAG, or any contributor not be used in advertising - or publicity pertaining to this material without the prior explicit - permission. The software is provided "as is" without any - warranties, support or liabilities of any kind. - This software is derived from source code from - "University of California at Berkeley" and - "Digital Equipment Corporation" protected by copyrights. - - Grenoble's Institute of Computer Science and Applied Mathematics (IMAG) - is a federation of seven research units funded by the CNRS, National - Polytechnic Institute of Grenoble and University Joseph Fourier. - The research unit in Software, Systems, Networks (LSR) is member of IMAG. -*/ - -/* - * Derived from : - * - * - * ipcp.h - IP Control Protocol definitions. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: ipv6cp.h,v 1.7 2002/12/04 23:03:32 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef IPV6CP_H -#define IPV6CP_H - -#include "eui64.h" - -/* - * Options. - */ -#define CI_IFACEID 1 /* Interface Identifier */ -#ifdef IPV6CP_COMP -#define CI_COMPRESSTYPE 2 /* Compression Type */ -#endif /* IPV6CP_COMP */ - -/* No compression types yet defined. - *#define IPV6CP_COMP 0x004f - */ -typedef struct ipv6cp_options { - unsigned int neg_ifaceid :1; /* Negotiate interface identifier? */ - unsigned int req_ifaceid :1; /* Ask peer to send interface identifier? */ - unsigned int accept_local :1; /* accept peer's value for iface id? */ - unsigned int opt_local :1; /* ourtoken set by option */ - unsigned int opt_remote :1; /* histoken set by option */ - unsigned int use_ip :1; /* use IP as interface identifier */ -#if 0 - unsigned int use_persistent :1; /* use uniquely persistent value for address */ -#endif -#ifdef IPV6CP_COMP - unsigned int neg_vj :1; /* Van Jacobson Compression? */ -#endif /* IPV6CP_COMP */ - -#ifdef IPV6CP_COMP - u_short vj_protocol; /* protocol value to use in VJ option */ -#endif /* IPV6CP_COMP */ - eui64_t ourid, hisid; /* Interface identifiers */ -} ipv6cp_options; - -extern const struct protent ipv6cp_protent; - -#endif /* IPV6CP_H */ -#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ +/* + * ipv6cp.h - PPP IPV6 Control Protocol. + * + * Copyright (c) 1999 Tommi Komulainen. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Tommi Komulainen + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/* Original version, based on RFC2023 : + + Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt, + Alain.Durand@imag.fr, IMAG, + Jean-Luc.Richier@imag.fr, IMAG-LSR. + + Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE, + Alain.Durand@imag.fr, IMAG, + Jean-Luc.Richier@imag.fr, IMAG-LSR. + + Ce travail a été fait au sein du GIE DYADE (Groupement d'Intérêt + Économique ayant pour membres BULL S.A. et l'INRIA). + + Ce logiciel informatique est disponible aux conditions + usuelles dans la recherche, c'est-à-dire qu'il peut + être utilisé, copié, modifié, distribué à l'unique + condition que ce texte soit conservé afin que + l'origine de ce logiciel soit reconnue. + + Le nom de l'Institut National de Recherche en Informatique + et en Automatique (INRIA), de l'IMAG, ou d'une personne morale + ou physique ayant participé à l'élaboration de ce logiciel ne peut + être utilisé sans son accord préalable explicite. + + Ce logiciel est fourni tel quel sans aucune garantie, + support ou responsabilité d'aucune sorte. + Ce logiciel est dérivé de sources d'origine + "University of California at Berkeley" et + "Digital Equipment Corporation" couvertes par des copyrights. + + L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG) + est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National + Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant + sept laboratoires dont le laboratoire Logiciels, Systèmes, Réseaux (LSR). + + This work has been done in the context of GIE DYADE (joint R & D venture + between BULL S.A. and INRIA). + + This software is available with usual "research" terms + with the aim of retain credits of the software. + Permission to use, copy, modify and distribute this software for any + purpose and without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies, + and the name of INRIA, IMAG, or any contributor not be used in advertising + or publicity pertaining to this material without the prior explicit + permission. The software is provided "as is" without any + warranties, support or liabilities of any kind. + This software is derived from source code from + "University of California at Berkeley" and + "Digital Equipment Corporation" protected by copyrights. + + Grenoble's Institute of Computer Science and Applied Mathematics (IMAG) + is a federation of seven research units funded by the CNRS, National + Polytechnic Institute of Grenoble and University Joseph Fourier. + The research unit in Software, Systems, Networks (LSR) is member of IMAG. +*/ + +/* + * Derived from : + * + * + * ipcp.h - IP Control Protocol definitions. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: ipv6cp.h,v 1.7 2002/12/04 23:03:32 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef IPV6CP_H +#define IPV6CP_H + +#include "eui64.h" + +/* + * Options. + */ +#define CI_IFACEID 1 /* Interface Identifier */ +#ifdef IPV6CP_COMP +#define CI_COMPRESSTYPE 2 /* Compression Type */ +#endif /* IPV6CP_COMP */ + +/* No compression types yet defined. + *#define IPV6CP_COMP 0x004f + */ +typedef struct ipv6cp_options { + unsigned int neg_ifaceid :1; /* Negotiate interface identifier? */ + unsigned int req_ifaceid :1; /* Ask peer to send interface identifier? */ + unsigned int accept_local :1; /* accept peer's value for iface id? */ + unsigned int opt_local :1; /* ourtoken set by option */ + unsigned int opt_remote :1; /* histoken set by option */ + unsigned int use_ip :1; /* use IP as interface identifier */ +#if 0 + unsigned int use_persistent :1; /* use uniquely persistent value for address */ +#endif +#ifdef IPV6CP_COMP + unsigned int neg_vj :1; /* Van Jacobson Compression? */ +#endif /* IPV6CP_COMP */ + +#ifdef IPV6CP_COMP + u_short vj_protocol; /* protocol value to use in VJ option */ +#endif /* IPV6CP_COMP */ + eui64_t ourid, hisid; /* Interface identifiers */ +} ipv6cp_options; + +extern const struct protent ipv6cp_protent; + +#endif /* IPV6CP_H */ +#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/lcp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/lcp.h index 12e2a05..8e76a48 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/lcp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/lcp.h @@ -1,171 +1,171 @@ -/* - * lcp.h - Link Control Protocol definitions. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: lcp.h,v 1.20 2004/11/14 22:53:42 carlsonj Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef LCP_H -#define LCP_H - -#include "ppp.h" - -/* - * Options. - */ -#define CI_VENDOR 0 /* Vendor Specific */ -#define CI_MRU 1 /* Maximum Receive Unit */ -#define CI_ASYNCMAP 2 /* Async Control Character Map */ -#define CI_AUTHTYPE 3 /* Authentication Type */ -#define CI_QUALITY 4 /* Quality Protocol */ -#define CI_MAGICNUMBER 5 /* Magic Number */ -#define CI_PCOMPRESSION 7 /* Protocol Field Compression */ -#define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */ -#define CI_FCSALTERN 9 /* FCS-Alternatives */ -#define CI_SDP 10 /* Self-Describing-Pad */ -#define CI_NUMBERED 11 /* Numbered-Mode */ -#define CI_CALLBACK 13 /* callback */ -#define CI_MRRU 17 /* max reconstructed receive unit; multilink */ -#define CI_SSNHF 18 /* short sequence numbers for multilink */ -#define CI_EPDISC 19 /* endpoint discriminator */ -#define CI_MPPLUS 22 /* Multi-Link-Plus-Procedure */ -#define CI_LDISC 23 /* Link-Discriminator */ -#define CI_LCPAUTH 24 /* LCP Authentication */ -#define CI_COBS 25 /* Consistent Overhead Byte Stuffing */ -#define CI_PREFELIS 26 /* Prefix Elision */ -#define CI_MPHDRFMT 27 /* MP Header Format */ -#define CI_I18N 28 /* Internationalization */ -#define CI_SDL 29 /* Simple Data Link */ - -/* - * LCP-specific packet types (code numbers). - */ -#define PROTREJ 8 /* Protocol Reject */ -#define ECHOREQ 9 /* Echo Request */ -#define ECHOREP 10 /* Echo Reply */ -#define DISCREQ 11 /* Discard Request */ -#define IDENTIF 12 /* Identification */ -#define TIMEREM 13 /* Time Remaining */ - -/* Value used as data for CI_CALLBACK option */ -#define CBCP_OPT 6 /* Use callback control protocol */ - -#if 0 /* moved to ppp_opts.h */ -#define DEFMRU 1500 /* Try for this */ -#define MINMRU 128 /* No MRUs below this */ -#define MAXMRU 16384 /* Normally limit MRU to this */ -#endif /* moved to ppp_opts.h */ - -/* An endpoint discriminator, used with multilink. */ -#define MAX_ENDP_LEN 20 /* maximum length of discriminator value */ -struct epdisc { - unsigned char class_; /* -- The word "class" is reserved in C++. */ - unsigned char length; - unsigned char value[MAX_ENDP_LEN]; -}; - -/* - * The state of options is described by an lcp_options structure. - */ -typedef struct lcp_options { - unsigned int passive :1; /* Don't die if we don't get a response */ - unsigned int silent :1; /* Wait for the other end to start first */ -#if 0 /* UNUSED */ - unsigned int restart :1; /* Restart vs. exit after close */ -#endif /* UNUSED */ - unsigned int neg_mru :1; /* Negotiate the MRU? */ - unsigned int neg_asyncmap :1; /* Negotiate the async map? */ -#if PAP_SUPPORT - unsigned int neg_upap :1; /* Ask for UPAP authentication? */ -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - unsigned int neg_chap :1; /* Ask for CHAP authentication? */ -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - unsigned int neg_eap :1; /* Ask for EAP authentication? */ -#endif /* EAP_SUPPORT */ - unsigned int neg_magicnumber :1; /* Ask for magic number? */ - unsigned int neg_pcompression :1; /* HDLC Protocol Field Compression? */ - unsigned int neg_accompression :1; /* HDLC Address/Control Field Compression? */ -#if LQR_SUPPORT - unsigned int neg_lqr :1; /* Negotiate use of Link Quality Reports */ -#endif /* LQR_SUPPORT */ - unsigned int neg_cbcp :1; /* Negotiate use of CBCP */ -#ifdef HAVE_MULTILINK - unsigned int neg_mrru :1; /* negotiate multilink MRRU */ -#endif /* HAVE_MULTILINK */ - unsigned int neg_ssnhf :1; /* negotiate short sequence numbers */ - unsigned int neg_endpoint :1; /* negotiate endpoint discriminator */ - - u16_t mru; /* Value of MRU */ -#ifdef HAVE_MULTILINK - u16_t mrru; /* Value of MRRU, and multilink enable */ -#endif /* MULTILINK */ -#if CHAP_SUPPORT - u8_t chap_mdtype; /* which MD types (hashing algorithm) */ -#endif /* CHAP_SUPPORT */ - u32_t asyncmap; /* Value of async map */ - u32_t magicnumber; - u8_t numloops; /* Number of loops during magic number neg. */ -#if LQR_SUPPORT - u32_t lqr_period; /* Reporting period for LQR 1/100ths second */ -#endif /* LQR_SUPPORT */ - struct epdisc endpoint; /* endpoint discriminator */ -} lcp_options; - -void lcp_open(ppp_pcb *pcb); -void lcp_close(ppp_pcb *pcb, const char *reason); -void lcp_lowerup(ppp_pcb *pcb); -void lcp_lowerdown(ppp_pcb *pcb); -void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len); /* send protocol reject */ - -extern const struct protent lcp_protent; - -#if 0 /* moved to ppp_opts.h */ -/* Default number of times we receive our magic number from the peer - before deciding the link is looped-back. */ -#define DEFLOOPBACKFAIL 10 -#endif /* moved to ppp_opts.h */ - -#endif /* LCP_H */ -#endif /* PPP_SUPPORT */ +/* + * lcp.h - Link Control Protocol definitions. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: lcp.h,v 1.20 2004/11/14 22:53:42 carlsonj Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef LCP_H +#define LCP_H + +#include "ppp.h" + +/* + * Options. + */ +#define CI_VENDOR 0 /* Vendor Specific */ +#define CI_MRU 1 /* Maximum Receive Unit */ +#define CI_ASYNCMAP 2 /* Async Control Character Map */ +#define CI_AUTHTYPE 3 /* Authentication Type */ +#define CI_QUALITY 4 /* Quality Protocol */ +#define CI_MAGICNUMBER 5 /* Magic Number */ +#define CI_PCOMPRESSION 7 /* Protocol Field Compression */ +#define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */ +#define CI_FCSALTERN 9 /* FCS-Alternatives */ +#define CI_SDP 10 /* Self-Describing-Pad */ +#define CI_NUMBERED 11 /* Numbered-Mode */ +#define CI_CALLBACK 13 /* callback */ +#define CI_MRRU 17 /* max reconstructed receive unit; multilink */ +#define CI_SSNHF 18 /* short sequence numbers for multilink */ +#define CI_EPDISC 19 /* endpoint discriminator */ +#define CI_MPPLUS 22 /* Multi-Link-Plus-Procedure */ +#define CI_LDISC 23 /* Link-Discriminator */ +#define CI_LCPAUTH 24 /* LCP Authentication */ +#define CI_COBS 25 /* Consistent Overhead Byte Stuffing */ +#define CI_PREFELIS 26 /* Prefix Elision */ +#define CI_MPHDRFMT 27 /* MP Header Format */ +#define CI_I18N 28 /* Internationalization */ +#define CI_SDL 29 /* Simple Data Link */ + +/* + * LCP-specific packet types (code numbers). + */ +#define PROTREJ 8 /* Protocol Reject */ +#define ECHOREQ 9 /* Echo Request */ +#define ECHOREP 10 /* Echo Reply */ +#define DISCREQ 11 /* Discard Request */ +#define IDENTIF 12 /* Identification */ +#define TIMEREM 13 /* Time Remaining */ + +/* Value used as data for CI_CALLBACK option */ +#define CBCP_OPT 6 /* Use callback control protocol */ + +#if 0 /* moved to ppp_opts.h */ +#define DEFMRU 1500 /* Try for this */ +#define MINMRU 128 /* No MRUs below this */ +#define MAXMRU 16384 /* Normally limit MRU to this */ +#endif /* moved to ppp_opts.h */ + +/* An endpoint discriminator, used with multilink. */ +#define MAX_ENDP_LEN 20 /* maximum length of discriminator value */ +struct epdisc { + unsigned char class_; /* -- The word "class" is reserved in C++. */ + unsigned char length; + unsigned char value[MAX_ENDP_LEN]; +}; + +/* + * The state of options is described by an lcp_options structure. + */ +typedef struct lcp_options { + unsigned int passive :1; /* Don't die if we don't get a response */ + unsigned int silent :1; /* Wait for the other end to start first */ +#if 0 /* UNUSED */ + unsigned int restart :1; /* Restart vs. exit after close */ +#endif /* UNUSED */ + unsigned int neg_mru :1; /* Negotiate the MRU? */ + unsigned int neg_asyncmap :1; /* Negotiate the async map? */ +#if PAP_SUPPORT + unsigned int neg_upap :1; /* Ask for UPAP authentication? */ +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + unsigned int neg_chap :1; /* Ask for CHAP authentication? */ +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + unsigned int neg_eap :1; /* Ask for EAP authentication? */ +#endif /* EAP_SUPPORT */ + unsigned int neg_magicnumber :1; /* Ask for magic number? */ + unsigned int neg_pcompression :1; /* HDLC Protocol Field Compression? */ + unsigned int neg_accompression :1; /* HDLC Address/Control Field Compression? */ +#if LQR_SUPPORT + unsigned int neg_lqr :1; /* Negotiate use of Link Quality Reports */ +#endif /* LQR_SUPPORT */ + unsigned int neg_cbcp :1; /* Negotiate use of CBCP */ +#ifdef HAVE_MULTILINK + unsigned int neg_mrru :1; /* negotiate multilink MRRU */ +#endif /* HAVE_MULTILINK */ + unsigned int neg_ssnhf :1; /* negotiate short sequence numbers */ + unsigned int neg_endpoint :1; /* negotiate endpoint discriminator */ + + u16_t mru; /* Value of MRU */ +#ifdef HAVE_MULTILINK + u16_t mrru; /* Value of MRRU, and multilink enable */ +#endif /* MULTILINK */ +#if CHAP_SUPPORT + u8_t chap_mdtype; /* which MD types (hashing algorithm) */ +#endif /* CHAP_SUPPORT */ + u32_t asyncmap; /* Value of async map */ + u32_t magicnumber; + u8_t numloops; /* Number of loops during magic number neg. */ +#if LQR_SUPPORT + u32_t lqr_period; /* Reporting period for LQR 1/100ths second */ +#endif /* LQR_SUPPORT */ + struct epdisc endpoint; /* endpoint discriminator */ +} lcp_options; + +void lcp_open(ppp_pcb *pcb); +void lcp_close(ppp_pcb *pcb, const char *reason); +void lcp_lowerup(ppp_pcb *pcb); +void lcp_lowerdown(ppp_pcb *pcb); +void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len); /* send protocol reject */ + +extern const struct protent lcp_protent; + +#if 0 /* moved to ppp_opts.h */ +/* Default number of times we receive our magic number from the peer + before deciding the link is looped-back. */ +#define DEFLOOPBACKFAIL 10 +#endif /* moved to ppp_opts.h */ + +#endif /* LCP_H */ +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/magic.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/magic.h index a2a9b53..5e928c3 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/magic.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/magic.h @@ -1,122 +1,122 @@ -/* - * magic.h - PPP Magic Number definitions. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $ - */ -/***************************************************************************** -* randm.h - Random number generator header file. -* -* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. -* Copyright (c) 1998 Global Election Systems Inc. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY -* -* 03-01-01 Marc Boucher -* Ported to lwIP. -* 98-05-29 Guy Lancaster , Global Election Systems Inc. -* Extracted from avos. -*****************************************************************************/ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef MAGIC_H -#define MAGIC_H - -/*********************** -*** PUBLIC FUNCTIONS *** -***********************/ - -/* - * Initialize the random number generator. - */ -void magic_init(void); - -/* - * Randomize our random seed value. To be called for truely random events - * such as user operations and network traffic. - */ -void magic_randomize(void); - -/* - * Return a new random number. - */ -u32_t magic(void); /* Returns the next magic number */ - -/* - * Fill buffer with random bytes - * - * Use the random pool to generate random data. This degrades to pseudo - * random when used faster than randomness is supplied using magic_churnrand(). - * Thus it's important to make sure that the results of this are not - * published directly because one could predict the next result to at - * least some degree. Also, it's important to get a good seed before - * the first use. - */ -void magic_random_bytes(unsigned char *buf, u32_t buf_len); - -/* - * Return a new random number between 0 and (2^pow)-1 included. - */ -u32_t magic_pow(u8_t pow); - -#endif /* MAGIC_H */ - -#endif /* PPP_SUPPORT */ +/* + * magic.h - PPP Magic Number definitions. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $ + */ +/***************************************************************************** +* randm.h - Random number generator header file. +* +* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. +* Copyright (c) 1998 Global Election Systems Inc. +* +* The authors hereby grant permission to use, copy, modify, distribute, +* and license this software and its documentation for any purpose, provided +* that existing copyright notices are retained in all copies and that this +* notice and the following disclaimer are included verbatim in any +* distributions. No written agreement, license, or royalty fee is required +* for any of the authorized uses. +* +* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +****************************************************************************** +* REVISION HISTORY +* +* 03-01-01 Marc Boucher +* Ported to lwIP. +* 98-05-29 Guy Lancaster , Global Election Systems Inc. +* Extracted from avos. +*****************************************************************************/ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef MAGIC_H +#define MAGIC_H + +/*********************** +*** PUBLIC FUNCTIONS *** +***********************/ + +/* + * Initialize the random number generator. + */ +void magic_init(void); + +/* + * Randomize our random seed value. To be called for truely random events + * such as user operations and network traffic. + */ +void magic_randomize(void); + +/* + * Return a new random number. + */ +u32_t magic(void); /* Returns the next magic number */ + +/* + * Fill buffer with random bytes + * + * Use the random pool to generate random data. This degrades to pseudo + * random when used faster than randomness is supplied using magic_churnrand(). + * Thus it's important to make sure that the results of this are not + * published directly because one could predict the next result to at + * least some degree. Also, it's important to get a good seed before + * the first use. + */ +void magic_random_bytes(unsigned char *buf, u32_t buf_len); + +/* + * Return a new random number between 0 and (2^pow)-1 included. + */ +u32_t magic_pow(u8_t pow); + +#endif /* MAGIC_H */ + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/mppe.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/mppe.h index 1ae8a5d..6fe866a 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/mppe.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/mppe.h @@ -1,173 +1,173 @@ -/* - * mppe.h - Definitions for MPPE - * - * Copyright (c) 2008 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef MPPE_H -#define MPPE_H - -#include "netif/ppp/pppcrypt.h" - -#define MPPE_PAD 4 /* MPPE growth per frame */ -#define MPPE_MAX_KEY_LEN 16 /* largest key length (128-bit) */ - -/* option bits for ccp_options.mppe */ -#define MPPE_OPT_40 0x01 /* 40 bit */ -#define MPPE_OPT_128 0x02 /* 128 bit */ -#define MPPE_OPT_STATEFUL 0x04 /* stateful mode */ -/* unsupported opts */ -#define MPPE_OPT_56 0x08 /* 56 bit */ -#define MPPE_OPT_MPPC 0x10 /* MPPC compression */ -#define MPPE_OPT_D 0x20 /* Unknown */ -#define MPPE_OPT_UNSUPPORTED (MPPE_OPT_56|MPPE_OPT_MPPC|MPPE_OPT_D) -#define MPPE_OPT_UNKNOWN 0x40 /* Bits !defined in RFC 3078 were set */ - -/* - * This is not nice ... the alternative is a bitfield struct though. - * And unfortunately, we cannot share the same bits for the option - * names above since C and H are the same bit. We could do a u_int32 - * but then we have to do a lwip_htonl() all the time and/or we still need - * to know which octet is which. - */ -#define MPPE_C_BIT 0x01 /* MPPC */ -#define MPPE_D_BIT 0x10 /* Obsolete, usage unknown */ -#define MPPE_L_BIT 0x20 /* 40-bit */ -#define MPPE_S_BIT 0x40 /* 128-bit */ -#define MPPE_M_BIT 0x80 /* 56-bit, not supported */ -#define MPPE_H_BIT 0x01 /* Stateless (in a different byte) */ - -/* Does not include H bit; used for least significant octet only. */ -#define MPPE_ALL_BITS (MPPE_D_BIT|MPPE_L_BIT|MPPE_S_BIT|MPPE_M_BIT|MPPE_H_BIT) - -/* Build a CI from mppe opts (see RFC 3078) */ -#define MPPE_OPTS_TO_CI(opts, ci) \ - do { \ - u_char *ptr = ci; /* u_char[4] */ \ - \ - /* H bit */ \ - if (opts & MPPE_OPT_STATEFUL) \ - *ptr++ = 0x0; \ - else \ - *ptr++ = MPPE_H_BIT; \ - *ptr++ = 0; \ - *ptr++ = 0; \ - \ - /* S,L bits */ \ - *ptr = 0; \ - if (opts & MPPE_OPT_128) \ - *ptr |= MPPE_S_BIT; \ - if (opts & MPPE_OPT_40) \ - *ptr |= MPPE_L_BIT; \ - /* M,D,C bits not supported */ \ - } while (/* CONSTCOND */ 0) - -/* The reverse of the above */ -#define MPPE_CI_TO_OPTS(ci, opts) \ - do { \ - const u_char *ptr = ci; /* u_char[4] */ \ - \ - opts = 0; \ - \ - /* H bit */ \ - if (!(ptr[0] & MPPE_H_BIT)) \ - opts |= MPPE_OPT_STATEFUL; \ - \ - /* S,L bits */ \ - if (ptr[3] & MPPE_S_BIT) \ - opts |= MPPE_OPT_128; \ - if (ptr[3] & MPPE_L_BIT) \ - opts |= MPPE_OPT_40; \ - \ - /* M,D,C bits */ \ - if (ptr[3] & MPPE_M_BIT) \ - opts |= MPPE_OPT_56; \ - if (ptr[3] & MPPE_D_BIT) \ - opts |= MPPE_OPT_D; \ - if (ptr[3] & MPPE_C_BIT) \ - opts |= MPPE_OPT_MPPC; \ - \ - /* Other bits */ \ - if (ptr[0] & ~MPPE_H_BIT) \ - opts |= MPPE_OPT_UNKNOWN; \ - if (ptr[1] || ptr[2]) \ - opts |= MPPE_OPT_UNKNOWN; \ - if (ptr[3] & ~MPPE_ALL_BITS) \ - opts |= MPPE_OPT_UNKNOWN; \ - } while (/* CONSTCOND */ 0) - -/* Shared MPPE padding between MSCHAP and MPPE */ -#define SHA1_PAD_SIZE 40 - -static const u8_t mppe_sha1_pad1[SHA1_PAD_SIZE] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; -static const u8_t mppe_sha1_pad2[SHA1_PAD_SIZE] = { - 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, - 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, - 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, - 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2 -}; - -/* - * State for an MPPE (de)compressor. - */ -typedef struct ppp_mppe_state { - lwip_arc4_context arc4; - u8_t master_key[MPPE_MAX_KEY_LEN]; - u8_t session_key[MPPE_MAX_KEY_LEN]; - u8_t keylen; /* key length in bytes */ - /* NB: 128-bit == 16, 40-bit == 8! - * If we want to support 56-bit, the unit has to change to bits - */ - u8_t bits; /* MPPE control bits */ - u16_t ccount; /* 12-bit coherency count (seqno) */ - u16_t sanity_errors; /* take down LCP if too many */ - unsigned int stateful :1; /* stateful mode flag */ - unsigned int discard :1; /* stateful mode packet loss flag */ -} ppp_mppe_state; - -void mppe_set_key(ppp_pcb *pcb, ppp_mppe_state *state, u8_t *key); -void mppe_init(ppp_pcb *pcb, ppp_mppe_state *state, u8_t options); -void mppe_comp_reset(ppp_pcb *pcb, ppp_mppe_state *state); -err_t mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t protocol); -void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state); -err_t mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb); - -#endif /* MPPE_H */ -#endif /* PPP_SUPPORT && MPPE_SUPPORT */ +/* + * mppe.h - Definitions for MPPE + * + * Copyright (c) 2008 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef MPPE_H +#define MPPE_H + +#include "netif/ppp/pppcrypt.h" + +#define MPPE_PAD 4 /* MPPE growth per frame */ +#define MPPE_MAX_KEY_LEN 16 /* largest key length (128-bit) */ + +/* option bits for ccp_options.mppe */ +#define MPPE_OPT_40 0x01 /* 40 bit */ +#define MPPE_OPT_128 0x02 /* 128 bit */ +#define MPPE_OPT_STATEFUL 0x04 /* stateful mode */ +/* unsupported opts */ +#define MPPE_OPT_56 0x08 /* 56 bit */ +#define MPPE_OPT_MPPC 0x10 /* MPPC compression */ +#define MPPE_OPT_D 0x20 /* Unknown */ +#define MPPE_OPT_UNSUPPORTED (MPPE_OPT_56|MPPE_OPT_MPPC|MPPE_OPT_D) +#define MPPE_OPT_UNKNOWN 0x40 /* Bits !defined in RFC 3078 were set */ + +/* + * This is not nice ... the alternative is a bitfield struct though. + * And unfortunately, we cannot share the same bits for the option + * names above since C and H are the same bit. We could do a u_int32 + * but then we have to do a lwip_htonl() all the time and/or we still need + * to know which octet is which. + */ +#define MPPE_C_BIT 0x01 /* MPPC */ +#define MPPE_D_BIT 0x10 /* Obsolete, usage unknown */ +#define MPPE_L_BIT 0x20 /* 40-bit */ +#define MPPE_S_BIT 0x40 /* 128-bit */ +#define MPPE_M_BIT 0x80 /* 56-bit, not supported */ +#define MPPE_H_BIT 0x01 /* Stateless (in a different byte) */ + +/* Does not include H bit; used for least significant octet only. */ +#define MPPE_ALL_BITS (MPPE_D_BIT|MPPE_L_BIT|MPPE_S_BIT|MPPE_M_BIT|MPPE_H_BIT) + +/* Build a CI from mppe opts (see RFC 3078) */ +#define MPPE_OPTS_TO_CI(opts, ci) \ + do { \ + u_char *ptr = ci; /* u_char[4] */ \ + \ + /* H bit */ \ + if (opts & MPPE_OPT_STATEFUL) \ + *ptr++ = 0x0; \ + else \ + *ptr++ = MPPE_H_BIT; \ + *ptr++ = 0; \ + *ptr++ = 0; \ + \ + /* S,L bits */ \ + *ptr = 0; \ + if (opts & MPPE_OPT_128) \ + *ptr |= MPPE_S_BIT; \ + if (opts & MPPE_OPT_40) \ + *ptr |= MPPE_L_BIT; \ + /* M,D,C bits not supported */ \ + } while (/* CONSTCOND */ 0) + +/* The reverse of the above */ +#define MPPE_CI_TO_OPTS(ci, opts) \ + do { \ + const u_char *ptr = ci; /* u_char[4] */ \ + \ + opts = 0; \ + \ + /* H bit */ \ + if (!(ptr[0] & MPPE_H_BIT)) \ + opts |= MPPE_OPT_STATEFUL; \ + \ + /* S,L bits */ \ + if (ptr[3] & MPPE_S_BIT) \ + opts |= MPPE_OPT_128; \ + if (ptr[3] & MPPE_L_BIT) \ + opts |= MPPE_OPT_40; \ + \ + /* M,D,C bits */ \ + if (ptr[3] & MPPE_M_BIT) \ + opts |= MPPE_OPT_56; \ + if (ptr[3] & MPPE_D_BIT) \ + opts |= MPPE_OPT_D; \ + if (ptr[3] & MPPE_C_BIT) \ + opts |= MPPE_OPT_MPPC; \ + \ + /* Other bits */ \ + if (ptr[0] & ~MPPE_H_BIT) \ + opts |= MPPE_OPT_UNKNOWN; \ + if (ptr[1] || ptr[2]) \ + opts |= MPPE_OPT_UNKNOWN; \ + if (ptr[3] & ~MPPE_ALL_BITS) \ + opts |= MPPE_OPT_UNKNOWN; \ + } while (/* CONSTCOND */ 0) + +/* Shared MPPE padding between MSCHAP and MPPE */ +#define SHA1_PAD_SIZE 40 + +static const u8_t mppe_sha1_pad1[SHA1_PAD_SIZE] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +static const u8_t mppe_sha1_pad2[SHA1_PAD_SIZE] = { + 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, + 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, + 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, + 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2 +}; + +/* + * State for an MPPE (de)compressor. + */ +typedef struct ppp_mppe_state { + lwip_arc4_context arc4; + u8_t master_key[MPPE_MAX_KEY_LEN]; + u8_t session_key[MPPE_MAX_KEY_LEN]; + u8_t keylen; /* key length in bytes */ + /* NB: 128-bit == 16, 40-bit == 8! + * If we want to support 56-bit, the unit has to change to bits + */ + u8_t bits; /* MPPE control bits */ + u16_t ccount; /* 12-bit coherency count (seqno) */ + u16_t sanity_errors; /* take down LCP if too many */ + unsigned int stateful :1; /* stateful mode flag */ + unsigned int discard :1; /* stateful mode packet loss flag */ +} ppp_mppe_state; + +void mppe_set_key(ppp_pcb *pcb, ppp_mppe_state *state, u8_t *key); +void mppe_init(ppp_pcb *pcb, ppp_mppe_state *state, u8_t options); +void mppe_comp_reset(ppp_pcb *pcb, ppp_mppe_state *state); +err_t mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t protocol); +void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state); +err_t mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb); + +#endif /* MPPE_H */ +#endif /* PPP_SUPPORT && MPPE_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp.h index d9ea097..519eea0 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp.h @@ -1,690 +1,690 @@ -/***************************************************************************** -* ppp.h - Network Point to Point Protocol header file. -* -* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. -* portions Copyright (c) 1997 Global Election Systems Inc. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY -* -* 03-01-01 Marc Boucher -* Ported to lwIP. -* 97-11-05 Guy Lancaster , Global Election Systems Inc. -* Original derived from BSD codes. -*****************************************************************************/ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef PPP_H -#define PPP_H - -#include "lwip/def.h" -#include "lwip/stats.h" -#include "lwip/mem.h" -#include "lwip/netif.h" -#include "lwip/sys.h" -#include "lwip/timeouts.h" -#if PPP_IPV6_SUPPORT -#include "lwip/ip6_addr.h" -#endif /* PPP_IPV6_SUPPORT */ - -/* Disable non-working or rarely used PPP feature, so rarely that we don't want to bloat ppp_opts.h with them */ -#ifndef PPP_OPTIONS -#define PPP_OPTIONS 0 -#endif - -#ifndef PPP_NOTIFY -#define PPP_NOTIFY 0 -#endif - -#ifndef PPP_REMOTENAME -#define PPP_REMOTENAME 0 -#endif - -#ifndef PPP_IDLETIMELIMIT -#define PPP_IDLETIMELIMIT 0 -#endif - -#ifndef PPP_LCP_ADAPTIVE -#define PPP_LCP_ADAPTIVE 0 -#endif - -#ifndef PPP_MAXCONNECT -#define PPP_MAXCONNECT 0 -#endif - -#ifndef PPP_ALLOWED_ADDRS -#define PPP_ALLOWED_ADDRS 0 -#endif - -#ifndef PPP_PROTOCOLNAME -#define PPP_PROTOCOLNAME 0 -#endif - -#ifndef PPP_STATS_SUPPORT -#define PPP_STATS_SUPPORT 0 -#endif - -#ifndef DEFLATE_SUPPORT -#define DEFLATE_SUPPORT 0 -#endif - -#ifndef BSDCOMPRESS_SUPPORT -#define BSDCOMPRESS_SUPPORT 0 -#endif - -#ifndef PREDICTOR_SUPPORT -#define PREDICTOR_SUPPORT 0 -#endif - -/************************* -*** PUBLIC DEFINITIONS *** -*************************/ - -/* - * The basic PPP frame. - */ -#define PPP_HDRLEN 4 /* octets for standard ppp header */ -#define PPP_FCSLEN 2 /* octets for FCS */ - -/* - * Values for phase. - */ -#define PPP_PHASE_DEAD 0 -#define PPP_PHASE_MASTER 1 -#define PPP_PHASE_HOLDOFF 2 -#define PPP_PHASE_INITIALIZE 3 -#define PPP_PHASE_SERIALCONN 4 -#define PPP_PHASE_DORMANT 5 -#define PPP_PHASE_ESTABLISH 6 -#define PPP_PHASE_AUTHENTICATE 7 -#define PPP_PHASE_CALLBACK 8 -#define PPP_PHASE_NETWORK 9 -#define PPP_PHASE_RUNNING 10 -#define PPP_PHASE_TERMINATE 11 -#define PPP_PHASE_DISCONNECT 12 - -/* Error codes. */ -#define PPPERR_NONE 0 /* No error. */ -#define PPPERR_PARAM 1 /* Invalid parameter. */ -#define PPPERR_OPEN 2 /* Unable to open PPP session. */ -#define PPPERR_DEVICE 3 /* Invalid I/O device for PPP. */ -#define PPPERR_ALLOC 4 /* Unable to allocate resources. */ -#define PPPERR_USER 5 /* User interrupt. */ -#define PPPERR_CONNECT 6 /* Connection lost. */ -#define PPPERR_AUTHFAIL 7 /* Failed authentication challenge. */ -#define PPPERR_PROTOCOL 8 /* Failed to meet protocol. */ -#define PPPERR_PEERDEAD 9 /* Connection timeout */ -#define PPPERR_IDLETIMEOUT 10 /* Idle Timeout */ -#define PPPERR_CONNECTTIME 11 /* Max connect time reached */ -#define PPPERR_LOOPBACK 12 /* Loopback detected */ - -/* Whether auth support is enabled at all */ -#define PPP_AUTH_SUPPORT (PAP_SUPPORT || CHAP_SUPPORT || EAP_SUPPORT) - -/************************ -*** PUBLIC DATA TYPES *** -************************/ - -/* - * Other headers require ppp_pcb definition for prototypes, but ppp_pcb - * require some structure definition from other headers as well, we are - * fixing the dependency loop here by declaring the ppp_pcb type then - * by including headers containing necessary struct definition for ppp_pcb - */ -typedef struct ppp_pcb_s ppp_pcb; - -/* Type definitions for BSD code. */ -#ifndef __u_char_defined -typedef unsigned long u_long; -typedef unsigned int u_int; -typedef unsigned short u_short; -typedef unsigned char u_char; -#endif - -#include "fsm.h" -#include "lcp.h" -#if CCP_SUPPORT -#include "ccp.h" -#endif /* CCP_SUPPORT */ -#if MPPE_SUPPORT -#include "mppe.h" -#endif /* MPPE_SUPPORT */ -#if PPP_IPV4_SUPPORT -#include "ipcp.h" -#endif /* PPP_IPV4_SUPPORT */ -#if PPP_IPV6_SUPPORT -#include "ipv6cp.h" -#endif /* PPP_IPV6_SUPPORT */ -#if PAP_SUPPORT -#include "upap.h" -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT -#include "chap-new.h" -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT -#include "eap.h" -#endif /* EAP_SUPPORT */ -#if VJ_SUPPORT -#include "vj.h" -#endif /* VJ_SUPPORT */ - -/* Link status callback function prototype */ -typedef void (*ppp_link_status_cb_fn)(ppp_pcb *pcb, int err_code, void *ctx); - -/* - * PPP configuration. - */ -typedef struct ppp_settings_s { - -#if PPP_SERVER && PPP_AUTH_SUPPORT - unsigned int auth_required :1; /* Peer is required to authenticate */ - unsigned int null_login :1; /* Username of "" and a password of "" are acceptable */ -#endif /* PPP_SERVER && PPP_AUTH_SUPPORT */ -#if PPP_REMOTENAME - unsigned int explicit_remote :1; /* remote_name specified with remotename opt */ -#endif /* PPP_REMOTENAME */ -#if PAP_SUPPORT - unsigned int refuse_pap :1; /* Don't proceed auth. with PAP */ -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - unsigned int refuse_chap :1; /* Don't proceed auth. with CHAP */ -#endif /* CHAP_SUPPORT */ -#if MSCHAP_SUPPORT - unsigned int refuse_mschap :1; /* Don't proceed auth. with MS-CHAP */ - unsigned int refuse_mschap_v2 :1; /* Don't proceed auth. with MS-CHAPv2 */ -#endif /* MSCHAP_SUPPORT */ -#if EAP_SUPPORT - unsigned int refuse_eap :1; /* Don't proceed auth. with EAP */ -#endif /* EAP_SUPPORT */ -#if LWIP_DNS - unsigned int usepeerdns :1; /* Ask peer for DNS adds */ -#endif /* LWIP_DNS */ - unsigned int persist :1; /* Persist mode, always try to open the connection */ -#if PRINTPKT_SUPPORT - unsigned int hide_password :1; /* Hide password in dumped packets */ -#endif /* PRINTPKT_SUPPORT */ - unsigned int noremoteip :1; /* Let him have no IP address */ - unsigned int lax_recv :1; /* accept control chars in asyncmap */ - unsigned int noendpoint :1; /* don't send/accept endpoint discriminator */ -#if PPP_LCP_ADAPTIVE - unsigned int lcp_echo_adaptive :1; /* request echo only if the link was idle */ -#endif /* PPP_LCP_ADAPTIVE */ -#if MPPE_SUPPORT - unsigned int require_mppe :1; /* Require MPPE (Microsoft Point to Point Encryption) */ - unsigned int refuse_mppe_40 :1; /* Allow MPPE 40-bit mode? */ - unsigned int refuse_mppe_128 :1; /* Allow MPPE 128-bit mode? */ - unsigned int refuse_mppe_stateful :1; /* Allow MPPE stateful mode? */ -#endif /* MPPE_SUPPORT */ - - u16_t listen_time; /* time to listen first (ms), waiting for peer to send LCP packet */ - -#if PPP_IDLETIMELIMIT - u16_t idle_time_limit; /* Disconnect if idle for this many seconds */ -#endif /* PPP_IDLETIMELIMIT */ -#if PPP_MAXCONNECT - u32_t maxconnect; /* Maximum connect time (seconds) */ -#endif /* PPP_MAXCONNECT */ - -#if PPP_AUTH_SUPPORT - /* auth data */ - const char *user; /* Username for PAP */ - const char *passwd; /* Password for PAP, secret for CHAP */ -#if PPP_REMOTENAME - char remote_name[MAXNAMELEN + 1]; /* Peer's name for authentication */ -#endif /* PPP_REMOTENAME */ - -#if PAP_SUPPORT - u8_t pap_timeout_time; /* Timeout (seconds) for auth-req retrans. */ - u8_t pap_max_transmits; /* Number of auth-reqs sent */ -#if PPP_SERVER - u8_t pap_req_timeout; /* Time to wait for auth-req from peer */ -#endif /* PPP_SERVER */ -#endif /* PAP_SUPPPORT */ - -#if CHAP_SUPPORT - u8_t chap_timeout_time; /* Timeout (seconds) for retransmitting req */ - u8_t chap_max_transmits; /* max # times to send challenge */ -#if PPP_SERVER - u8_t chap_rechallenge_time; /* Time to wait for auth-req from peer */ -#endif /* PPP_SERVER */ -#endif /* CHAP_SUPPPORT */ - -#if EAP_SUPPORT - u8_t eap_req_time; /* Time to wait (for retransmit/fail) */ - u8_t eap_allow_req; /* Max Requests allowed */ -#if PPP_SERVER - u8_t eap_timeout_time; /* Time to wait (for retransmit/fail) */ - u8_t eap_max_transmits; /* Max Requests allowed */ -#endif /* PPP_SERVER */ -#endif /* EAP_SUPPORT */ - -#endif /* PPP_AUTH_SUPPORT */ - - u8_t fsm_timeout_time; /* Timeout time in seconds */ - u8_t fsm_max_conf_req_transmits; /* Maximum Configure-Request transmissions */ - u8_t fsm_max_term_transmits; /* Maximum Terminate-Request transmissions */ - u8_t fsm_max_nak_loops; /* Maximum number of nak loops tolerated */ - - u8_t lcp_loopbackfail; /* Number of times we receive our magic number from the peer - before deciding the link is looped-back. */ - u8_t lcp_echo_interval; /* Interval between LCP echo-requests */ - u8_t lcp_echo_fails; /* Tolerance to unanswered echo-requests */ - -} ppp_settings; - -#if PPP_SERVER -struct ppp_addrs { -#if PPP_IPV4_SUPPORT - ip4_addr_t our_ipaddr, his_ipaddr, netmask; -#if LWIP_DNS - ip4_addr_t dns1, dns2; -#endif /* LWIP_DNS */ -#endif /* PPP_IPV4_SUPPORT */ -#if PPP_IPV6_SUPPORT - ip6_addr_t our6_ipaddr, his6_ipaddr; -#endif /* PPP_IPV6_SUPPORT */ -}; -#endif /* PPP_SERVER */ - -/* - * PPP interface control block. - */ -struct ppp_pcb_s { - ppp_settings settings; - const struct link_callbacks *link_cb; - void *link_ctx_cb; - void (*link_status_cb)(ppp_pcb *pcb, int err_code, void *ctx); /* Status change callback */ -#if PPP_NOTIFY_PHASE - void (*notify_phase_cb)(ppp_pcb *pcb, u8_t phase, void *ctx); /* Notify phase callback */ -#endif /* PPP_NOTIFY_PHASE */ - void *ctx_cb; /* Callbacks optional pointer */ - struct netif *netif; /* PPP interface */ - u8_t phase; /* where the link is at */ - u8_t err_code; /* Code indicating why interface is down. */ - - /* flags */ -#if PPP_IPV4_SUPPORT - unsigned int ask_for_local :1; /* request our address from peer */ - unsigned int ipcp_is_open :1; /* haven't called np_finished() */ - unsigned int ipcp_is_up :1; /* have called ipcp_up() */ - unsigned int if4_up :1; /* True when the IPv4 interface is up. */ -#if 0 /* UNUSED - PROXY ARP */ - unsigned int proxy_arp_set :1; /* Have created proxy arp entry */ -#endif /* UNUSED - PROXY ARP */ -#endif /* PPP_IPV4_SUPPORT */ -#if PPP_IPV6_SUPPORT - unsigned int ipv6cp_is_up :1; /* have called ip6cp_up() */ - unsigned int if6_up :1; /* True when the IPv6 interface is up. */ -#endif /* PPP_IPV6_SUPPORT */ - unsigned int lcp_echo_timer_running :1; /* set if a timer is running */ -#if VJ_SUPPORT - unsigned int vj_enabled :1; /* Flag indicating VJ compression enabled. */ -#endif /* VJ_SUPPORT */ -#if CCP_SUPPORT - unsigned int ccp_all_rejected :1; /* we rejected all peer's options */ -#endif /* CCP_SUPPORT */ -#if MPPE_SUPPORT - unsigned int mppe_keys_set :1; /* Have the MPPE keys been set? */ -#endif /* MPPE_SUPPORT */ - -#if PPP_AUTH_SUPPORT - /* auth data */ -#if PPP_SERVER && defined(HAVE_MULTILINK) - char peer_authname[MAXNAMELEN + 1]; /* The name by which the peer authenticated itself to us. */ -#endif /* PPP_SERVER && defined(HAVE_MULTILINK) */ - u16_t auth_pending; /* Records which authentication operations haven't completed yet. */ - u16_t auth_done; /* Records which authentication operations have been completed. */ - -#if PAP_SUPPORT - upap_state upap; /* PAP data */ -#endif /* PAP_SUPPORT */ - -#if CHAP_SUPPORT - chap_client_state chap_client; /* CHAP client data */ -#if PPP_SERVER - chap_server_state chap_server; /* CHAP server data */ -#endif /* PPP_SERVER */ -#endif /* CHAP_SUPPORT */ - -#if EAP_SUPPORT - eap_state eap; /* EAP data */ -#endif /* EAP_SUPPORT */ -#endif /* PPP_AUTH_SUPPORT */ - - fsm lcp_fsm; /* LCP fsm structure */ - lcp_options lcp_wantoptions; /* Options that we want to request */ - lcp_options lcp_gotoptions; /* Options that peer ack'd */ - lcp_options lcp_allowoptions; /* Options we allow peer to request */ - lcp_options lcp_hisoptions; /* Options that we ack'd */ - u16_t peer_mru; /* currently negotiated peer MRU */ - u8_t lcp_echos_pending; /* Number of outstanding echo msgs */ - u8_t lcp_echo_number; /* ID number of next echo frame */ - - u8_t num_np_open; /* Number of network protocols which we have opened. */ - u8_t num_np_up; /* Number of network protocols which have come up. */ - -#if VJ_SUPPORT - struct vjcompress vj_comp; /* Van Jacobson compression header. */ -#endif /* VJ_SUPPORT */ - -#if CCP_SUPPORT - fsm ccp_fsm; /* CCP fsm structure */ - ccp_options ccp_wantoptions; /* what to request the peer to use */ - ccp_options ccp_gotoptions; /* what the peer agreed to do */ - ccp_options ccp_allowoptions; /* what we'll agree to do */ - ccp_options ccp_hisoptions; /* what we agreed to do */ - u8_t ccp_localstate; /* Local state (mainly for handling reset-reqs and reset-acks). */ - u8_t ccp_receive_method; /* Method chosen on receive path */ - u8_t ccp_transmit_method; /* Method chosen on transmit path */ -#if MPPE_SUPPORT - ppp_mppe_state mppe_comp; /* MPPE "compressor" structure */ - ppp_mppe_state mppe_decomp; /* MPPE "decompressor" structure */ -#endif /* MPPE_SUPPORT */ -#endif /* CCP_SUPPORT */ - -#if PPP_IPV4_SUPPORT - fsm ipcp_fsm; /* IPCP fsm structure */ - ipcp_options ipcp_wantoptions; /* Options that we want to request */ - ipcp_options ipcp_gotoptions; /* Options that peer ack'd */ - ipcp_options ipcp_allowoptions; /* Options we allow peer to request */ - ipcp_options ipcp_hisoptions; /* Options that we ack'd */ -#endif /* PPP_IPV4_SUPPORT */ - -#if PPP_IPV6_SUPPORT - fsm ipv6cp_fsm; /* IPV6CP fsm structure */ - ipv6cp_options ipv6cp_wantoptions; /* Options that we want to request */ - ipv6cp_options ipv6cp_gotoptions; /* Options that peer ack'd */ - ipv6cp_options ipv6cp_allowoptions; /* Options we allow peer to request */ - ipv6cp_options ipv6cp_hisoptions; /* Options that we ack'd */ -#endif /* PPP_IPV6_SUPPORT */ -}; - -/************************ - *** PUBLIC FUNCTIONS *** - ************************/ - -/* - * WARNING: For multi-threads environment, all ppp_set_* functions most - * only be called while the PPP is in the dead phase (i.e. disconnected). - */ - -#if PPP_AUTH_SUPPORT -/* - * Set PPP authentication. - * - * Warning: Using PPPAUTHTYPE_ANY might have security consequences. - * RFC 1994 says: - * - * In practice, within or associated with each PPP server, there is a - * database which associates "user" names with authentication - * information ("secrets"). It is not anticipated that a particular - * named user would be authenticated by multiple methods. This would - * make the user vulnerable to attacks which negotiate the least secure - * method from among a set (such as PAP rather than CHAP). If the same - * secret was used, PAP would reveal the secret to be used later with - * CHAP. - * - * Instead, for each user name there should be an indication of exactly - * one method used to authenticate that user name. If a user needs to - * make use of different authentication methods under different - * circumstances, then distinct user names SHOULD be employed, each of - * which identifies exactly one authentication method. - * - * Default is none auth type, unset (NULL) user and passwd. - */ -#define PPPAUTHTYPE_NONE 0x00 -#define PPPAUTHTYPE_PAP 0x01 -#define PPPAUTHTYPE_CHAP 0x02 -#define PPPAUTHTYPE_MSCHAP 0x04 -#define PPPAUTHTYPE_MSCHAP_V2 0x08 -#define PPPAUTHTYPE_EAP 0x10 -#define PPPAUTHTYPE_ANY 0xff -void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd); - -/* - * If set, peer is required to authenticate. This is mostly necessary for PPP server support. - * - * Default is false. - */ -#define ppp_set_auth_required(ppp, boolval) (ppp->settings.auth_required = boolval) -#endif /* PPP_AUTH_SUPPORT */ - -#if PPP_IPV4_SUPPORT -/* - * Set PPP interface "our" and "his" IPv4 addresses. This is mostly necessary for PPP server - * support but it can also be used on a PPP link where each side choose its own IP address. - * - * Default is unset (0.0.0.0). - */ -#define ppp_set_ipcp_ouraddr(ppp, addr) do { ppp->ipcp_wantoptions.ouraddr = ip4_addr_get_u32(addr); \ - ppp->ask_for_local = ppp->ipcp_wantoptions.ouraddr != 0; } while(0) -#define ppp_set_ipcp_hisaddr(ppp, addr) (ppp->ipcp_wantoptions.hisaddr = ip4_addr_get_u32(addr)) -#if LWIP_DNS -/* - * Set DNS server addresses that are sent if the peer asks for them. This is mostly necessary - * for PPP server support. - * - * Default is unset (0.0.0.0). - */ -#define ppp_set_ipcp_dnsaddr(ppp, index, addr) (ppp->ipcp_allowoptions.dnsaddr[index] = ip4_addr_get_u32(addr)) - -/* - * If set, we ask the peer for up to 2 DNS server addresses. Received DNS server addresses are - * registered using the dns_setserver() function. - * - * Default is false. - */ -#define ppp_set_usepeerdns(ppp, boolval) (ppp->settings.usepeerdns = boolval) -#endif /* LWIP_DNS */ -#endif /* PPP_IPV4_SUPPORT */ - -#if MPPE_SUPPORT -/* Disable MPPE (Microsoft Point to Point Encryption). This parameter is exclusive. */ -#define PPP_MPPE_DISABLE 0x00 -/* Require the use of MPPE (Microsoft Point to Point Encryption). */ -#define PPP_MPPE_ENABLE 0x01 -/* Allow MPPE to use stateful mode. Stateless mode is still attempted first. */ -#define PPP_MPPE_ALLOW_STATEFUL 0x02 -/* Refuse the use of MPPE with 40-bit encryption. Conflict with PPP_MPPE_REFUSE_128. */ -#define PPP_MPPE_REFUSE_40 0x04 -/* Refuse the use of MPPE with 128-bit encryption. Conflict with PPP_MPPE_REFUSE_40. */ -#define PPP_MPPE_REFUSE_128 0x08 -/* - * Set MPPE configuration - * - * Default is disabled. - */ -void ppp_set_mppe(ppp_pcb *pcb, u8_t flags); -#endif /* MPPE_SUPPORT */ - -/* - * Wait for up to intval milliseconds for a valid PPP packet from the peer. - * At the end of this time, or when a valid PPP packet is received from the - * peer, we commence negotiation by sending our first LCP packet. - * - * Default is 0. - */ -#define ppp_set_listen_time(ppp, intval) (ppp->settings.listen_time = intval) - -/* - * If set, we will attempt to initiate a connection but if no reply is received from - * the peer, we will then just wait passively for a valid LCP packet from the peer. - * - * Default is false. - */ -#define ppp_set_passive(ppp, boolval) (ppp->lcp_wantoptions.passive = boolval) - -/* - * If set, we will not transmit LCP packets to initiate a connection until a valid - * LCP packet is received from the peer. This is what we usually call the server mode. - * - * Default is false. - */ -#define ppp_set_silent(ppp, boolval) (ppp->lcp_wantoptions.silent = boolval) - -/* - * If set, enable protocol field compression negotiation in both the receive and - * the transmit direction. - * - * Default is true. - */ -#define ppp_set_neg_pcomp(ppp, boolval) (ppp->lcp_wantoptions.neg_pcompression = \ - ppp->lcp_allowoptions.neg_pcompression = boolval) - -/* - * If set, enable Address/Control compression in both the receive and the transmit - * direction. - * - * Default is true. - */ -#define ppp_set_neg_accomp(ppp, boolval) (ppp->lcp_wantoptions.neg_accompression = \ - ppp->lcp_allowoptions.neg_accompression = boolval) - -/* - * If set, enable asyncmap negotiation. Otherwise forcing all control characters to - * be escaped for both the transmit and the receive direction. - * - * Default is true. - */ -#define ppp_set_neg_asyncmap(ppp, boolval) (ppp->lcp_wantoptions.neg_asyncmap = \ - ppp->lcp_allowoptions.neg_asyncmap = boolval) - -/* - * This option sets the Async-Control-Character-Map (ACCM) for this end of the link. - * The ACCM is a set of 32 bits, one for each of the ASCII control characters with - * values from 0 to 31, where a 1 bit indicates that the corresponding control - * character should not be used in PPP packets sent to this system. The map is - * an unsigned 32 bits integer where the least significant bit (00000001) represents - * character 0 and the most significant bit (80000000) represents character 31. - * We will then ask the peer to send these characters as a 2-byte escape sequence. - * - * Default is 0. - */ -#define ppp_set_asyncmap(ppp, intval) (ppp->lcp_wantoptions.asyncmap = intval) - -/* - * Set a PPP interface as the default network interface - * (used to output all packets for which no specific route is found). - */ -#define ppp_set_default(ppp) netif_set_default(ppp->netif) - -#if PPP_NOTIFY_PHASE -/* - * Set a PPP notify phase callback. - * - * This can be used for example to set a LED pattern depending on the - * current phase of the PPP session. - */ -typedef void (*ppp_notify_phase_cb_fn)(ppp_pcb *pcb, u8_t phase, void *ctx); -void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb); -#endif /* PPP_NOTIFY_PHASE */ - -/* - * Initiate a PPP connection. - * - * This can only be called if PPP is in the dead phase. - * - * Holdoff is the time to wait (in seconds) before initiating - * the connection. - * - * If this port connects to a modem, the modem connection must be - * established before calling this. - */ -err_t ppp_connect(ppp_pcb *pcb, u16_t holdoff); - -#if PPP_SERVER -/* - * Listen for an incoming PPP connection. - * - * This can only be called if PPP is in the dead phase. - * - * If this port connects to a modem, the modem connection must be - * established before calling this. - */ -err_t ppp_listen(ppp_pcb *pcb); -#endif /* PPP_SERVER */ - -/* - * Initiate the end of a PPP connection. - * Any outstanding packets in the queues are dropped. - * - * Setting nocarrier to 1 close the PPP connection without initiating the - * shutdown procedure. Always using nocarrier = 0 is still recommended, - * this is going to take a little longer time if your link is down, but - * is a safer choice for the PPP state machine. - * - * Return 0 on success, an error code on failure. - */ -err_t ppp_close(ppp_pcb *pcb, u8_t nocarrier); - -/* - * Release the control block. - * - * This can only be called if PPP is in the dead phase. - * - * You must use ppp_close() before if you wish to terminate - * an established PPP session. - * - * Return 0 on success, an error code on failure. - */ -err_t ppp_free(ppp_pcb *pcb); - -/* - * PPP IOCTL commands. - * - * Get the up status - 0 for down, non-zero for up. The argument must - * point to an int. - */ -#define PPPCTLG_UPSTATUS 0 - -/* - * Get the PPP error code. The argument must point to an int. - * Returns a PPPERR_* value. - */ -#define PPPCTLG_ERRCODE 1 - -/* - * Get the fd associated with a PPP over serial - */ -#define PPPCTLG_FD 2 - -/* - * Get and set parameters for the given connection. - * Return 0 on success, an error code on failure. - */ -err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg); - -/* Get the PPP netif interface */ -#define ppp_netif(ppp) (ppp->netif) - -/* Set an lwIP-style status-callback for the selected PPP device */ -#define ppp_set_netif_statuscallback(ppp, status_cb) \ - netif_set_status_callback(ppp->netif, status_cb); - -/* Set an lwIP-style link-callback for the selected PPP device */ -#define ppp_set_netif_linkcallback(ppp, link_cb) \ - netif_set_link_callback(ppp->netif, link_cb); - -#endif /* PPP_H */ - -#endif /* PPP_SUPPORT */ +/***************************************************************************** +* ppp.h - Network Point to Point Protocol header file. +* +* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. +* portions Copyright (c) 1997 Global Election Systems Inc. +* +* The authors hereby grant permission to use, copy, modify, distribute, +* and license this software and its documentation for any purpose, provided +* that existing copyright notices are retained in all copies and that this +* notice and the following disclaimer are included verbatim in any +* distributions. No written agreement, license, or royalty fee is required +* for any of the authorized uses. +* +* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +****************************************************************************** +* REVISION HISTORY +* +* 03-01-01 Marc Boucher +* Ported to lwIP. +* 97-11-05 Guy Lancaster , Global Election Systems Inc. +* Original derived from BSD codes. +*****************************************************************************/ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef PPP_H +#define PPP_H + +#include "lwip/def.h" +#include "lwip/stats.h" +#include "lwip/mem.h" +#include "lwip/netif.h" +#include "lwip/sys.h" +#include "lwip/timeouts.h" +#if PPP_IPV6_SUPPORT +#include "lwip/ip6_addr.h" +#endif /* PPP_IPV6_SUPPORT */ + +/* Disable non-working or rarely used PPP feature, so rarely that we don't want to bloat ppp_opts.h with them */ +#ifndef PPP_OPTIONS +#define PPP_OPTIONS 0 +#endif + +#ifndef PPP_NOTIFY +#define PPP_NOTIFY 0 +#endif + +#ifndef PPP_REMOTENAME +#define PPP_REMOTENAME 0 +#endif + +#ifndef PPP_IDLETIMELIMIT +#define PPP_IDLETIMELIMIT 0 +#endif + +#ifndef PPP_LCP_ADAPTIVE +#define PPP_LCP_ADAPTIVE 0 +#endif + +#ifndef PPP_MAXCONNECT +#define PPP_MAXCONNECT 0 +#endif + +#ifndef PPP_ALLOWED_ADDRS +#define PPP_ALLOWED_ADDRS 0 +#endif + +#ifndef PPP_PROTOCOLNAME +#define PPP_PROTOCOLNAME 0 +#endif + +#ifndef PPP_STATS_SUPPORT +#define PPP_STATS_SUPPORT 0 +#endif + +#ifndef DEFLATE_SUPPORT +#define DEFLATE_SUPPORT 0 +#endif + +#ifndef BSDCOMPRESS_SUPPORT +#define BSDCOMPRESS_SUPPORT 0 +#endif + +#ifndef PREDICTOR_SUPPORT +#define PREDICTOR_SUPPORT 0 +#endif + +/************************* +*** PUBLIC DEFINITIONS *** +*************************/ + +/* + * The basic PPP frame. + */ +#define PPP_HDRLEN 4 /* octets for standard ppp header */ +#define PPP_FCSLEN 2 /* octets for FCS */ + +/* + * Values for phase. + */ +#define PPP_PHASE_DEAD 0 +#define PPP_PHASE_MASTER 1 +#define PPP_PHASE_HOLDOFF 2 +#define PPP_PHASE_INITIALIZE 3 +#define PPP_PHASE_SERIALCONN 4 +#define PPP_PHASE_DORMANT 5 +#define PPP_PHASE_ESTABLISH 6 +#define PPP_PHASE_AUTHENTICATE 7 +#define PPP_PHASE_CALLBACK 8 +#define PPP_PHASE_NETWORK 9 +#define PPP_PHASE_RUNNING 10 +#define PPP_PHASE_TERMINATE 11 +#define PPP_PHASE_DISCONNECT 12 + +/* Error codes. */ +#define PPPERR_NONE 0 /* No error. */ +#define PPPERR_PARAM 1 /* Invalid parameter. */ +#define PPPERR_OPEN 2 /* Unable to open PPP session. */ +#define PPPERR_DEVICE 3 /* Invalid I/O device for PPP. */ +#define PPPERR_ALLOC 4 /* Unable to allocate resources. */ +#define PPPERR_USER 5 /* User interrupt. */ +#define PPPERR_CONNECT 6 /* Connection lost. */ +#define PPPERR_AUTHFAIL 7 /* Failed authentication challenge. */ +#define PPPERR_PROTOCOL 8 /* Failed to meet protocol. */ +#define PPPERR_PEERDEAD 9 /* Connection timeout */ +#define PPPERR_IDLETIMEOUT 10 /* Idle Timeout */ +#define PPPERR_CONNECTTIME 11 /* Max connect time reached */ +#define PPPERR_LOOPBACK 12 /* Loopback detected */ + +/* Whether auth support is enabled at all */ +#define PPP_AUTH_SUPPORT (PAP_SUPPORT || CHAP_SUPPORT || EAP_SUPPORT) + +/************************ +*** PUBLIC DATA TYPES *** +************************/ + +/* + * Other headers require ppp_pcb definition for prototypes, but ppp_pcb + * require some structure definition from other headers as well, we are + * fixing the dependency loop here by declaring the ppp_pcb type then + * by including headers containing necessary struct definition for ppp_pcb + */ +typedef struct ppp_pcb_s ppp_pcb; + +/* Type definitions for BSD code. */ +#ifndef __u_char_defined +typedef unsigned long u_long; +typedef unsigned int u_int; +typedef unsigned short u_short; +typedef unsigned char u_char; +#endif + +#include "fsm.h" +#include "lcp.h" +#if CCP_SUPPORT +#include "ccp.h" +#endif /* CCP_SUPPORT */ +#if MPPE_SUPPORT +#include "mppe.h" +#endif /* MPPE_SUPPORT */ +#if PPP_IPV4_SUPPORT +#include "ipcp.h" +#endif /* PPP_IPV4_SUPPORT */ +#if PPP_IPV6_SUPPORT +#include "ipv6cp.h" +#endif /* PPP_IPV6_SUPPORT */ +#if PAP_SUPPORT +#include "upap.h" +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT +#include "chap-new.h" +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT +#include "eap.h" +#endif /* EAP_SUPPORT */ +#if VJ_SUPPORT +#include "vj.h" +#endif /* VJ_SUPPORT */ + +/* Link status callback function prototype */ +typedef void (*ppp_link_status_cb_fn)(ppp_pcb *pcb, int err_code, void *ctx); + +/* + * PPP configuration. + */ +typedef struct ppp_settings_s { + +#if PPP_SERVER && PPP_AUTH_SUPPORT + unsigned int auth_required :1; /* Peer is required to authenticate */ + unsigned int null_login :1; /* Username of "" and a password of "" are acceptable */ +#endif /* PPP_SERVER && PPP_AUTH_SUPPORT */ +#if PPP_REMOTENAME + unsigned int explicit_remote :1; /* remote_name specified with remotename opt */ +#endif /* PPP_REMOTENAME */ +#if PAP_SUPPORT + unsigned int refuse_pap :1; /* Don't proceed auth. with PAP */ +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + unsigned int refuse_chap :1; /* Don't proceed auth. with CHAP */ +#endif /* CHAP_SUPPORT */ +#if MSCHAP_SUPPORT + unsigned int refuse_mschap :1; /* Don't proceed auth. with MS-CHAP */ + unsigned int refuse_mschap_v2 :1; /* Don't proceed auth. with MS-CHAPv2 */ +#endif /* MSCHAP_SUPPORT */ +#if EAP_SUPPORT + unsigned int refuse_eap :1; /* Don't proceed auth. with EAP */ +#endif /* EAP_SUPPORT */ +#if LWIP_DNS + unsigned int usepeerdns :1; /* Ask peer for DNS adds */ +#endif /* LWIP_DNS */ + unsigned int persist :1; /* Persist mode, always try to open the connection */ +#if PRINTPKT_SUPPORT + unsigned int hide_password :1; /* Hide password in dumped packets */ +#endif /* PRINTPKT_SUPPORT */ + unsigned int noremoteip :1; /* Let him have no IP address */ + unsigned int lax_recv :1; /* accept control chars in asyncmap */ + unsigned int noendpoint :1; /* don't send/accept endpoint discriminator */ +#if PPP_LCP_ADAPTIVE + unsigned int lcp_echo_adaptive :1; /* request echo only if the link was idle */ +#endif /* PPP_LCP_ADAPTIVE */ +#if MPPE_SUPPORT + unsigned int require_mppe :1; /* Require MPPE (Microsoft Point to Point Encryption) */ + unsigned int refuse_mppe_40 :1; /* Allow MPPE 40-bit mode? */ + unsigned int refuse_mppe_128 :1; /* Allow MPPE 128-bit mode? */ + unsigned int refuse_mppe_stateful :1; /* Allow MPPE stateful mode? */ +#endif /* MPPE_SUPPORT */ + + u16_t listen_time; /* time to listen first (ms), waiting for peer to send LCP packet */ + +#if PPP_IDLETIMELIMIT + u16_t idle_time_limit; /* Disconnect if idle for this many seconds */ +#endif /* PPP_IDLETIMELIMIT */ +#if PPP_MAXCONNECT + u32_t maxconnect; /* Maximum connect time (seconds) */ +#endif /* PPP_MAXCONNECT */ + +#if PPP_AUTH_SUPPORT + /* auth data */ + const char *user; /* Username for PAP */ + const char *passwd; /* Password for PAP, secret for CHAP */ +#if PPP_REMOTENAME + char remote_name[MAXNAMELEN + 1]; /* Peer's name for authentication */ +#endif /* PPP_REMOTENAME */ + +#if PAP_SUPPORT + u8_t pap_timeout_time; /* Timeout (seconds) for auth-req retrans. */ + u8_t pap_max_transmits; /* Number of auth-reqs sent */ +#if PPP_SERVER + u8_t pap_req_timeout; /* Time to wait for auth-req from peer */ +#endif /* PPP_SERVER */ +#endif /* PAP_SUPPPORT */ + +#if CHAP_SUPPORT + u8_t chap_timeout_time; /* Timeout (seconds) for retransmitting req */ + u8_t chap_max_transmits; /* max # times to send challenge */ +#if PPP_SERVER + u8_t chap_rechallenge_time; /* Time to wait for auth-req from peer */ +#endif /* PPP_SERVER */ +#endif /* CHAP_SUPPPORT */ + +#if EAP_SUPPORT + u8_t eap_req_time; /* Time to wait (for retransmit/fail) */ + u8_t eap_allow_req; /* Max Requests allowed */ +#if PPP_SERVER + u8_t eap_timeout_time; /* Time to wait (for retransmit/fail) */ + u8_t eap_max_transmits; /* Max Requests allowed */ +#endif /* PPP_SERVER */ +#endif /* EAP_SUPPORT */ + +#endif /* PPP_AUTH_SUPPORT */ + + u8_t fsm_timeout_time; /* Timeout time in seconds */ + u8_t fsm_max_conf_req_transmits; /* Maximum Configure-Request transmissions */ + u8_t fsm_max_term_transmits; /* Maximum Terminate-Request transmissions */ + u8_t fsm_max_nak_loops; /* Maximum number of nak loops tolerated */ + + u8_t lcp_loopbackfail; /* Number of times we receive our magic number from the peer + before deciding the link is looped-back. */ + u8_t lcp_echo_interval; /* Interval between LCP echo-requests */ + u8_t lcp_echo_fails; /* Tolerance to unanswered echo-requests */ + +} ppp_settings; + +#if PPP_SERVER +struct ppp_addrs { +#if PPP_IPV4_SUPPORT + ip4_addr_t our_ipaddr, his_ipaddr, netmask; +#if LWIP_DNS + ip4_addr_t dns1, dns2; +#endif /* LWIP_DNS */ +#endif /* PPP_IPV4_SUPPORT */ +#if PPP_IPV6_SUPPORT + ip6_addr_t our6_ipaddr, his6_ipaddr; +#endif /* PPP_IPV6_SUPPORT */ +}; +#endif /* PPP_SERVER */ + +/* + * PPP interface control block. + */ +struct ppp_pcb_s { + ppp_settings settings; + const struct link_callbacks *link_cb; + void *link_ctx_cb; + void (*link_status_cb)(ppp_pcb *pcb, int err_code, void *ctx); /* Status change callback */ +#if PPP_NOTIFY_PHASE + void (*notify_phase_cb)(ppp_pcb *pcb, u8_t phase, void *ctx); /* Notify phase callback */ +#endif /* PPP_NOTIFY_PHASE */ + void *ctx_cb; /* Callbacks optional pointer */ + struct netif *netif; /* PPP interface */ + u8_t phase; /* where the link is at */ + u8_t err_code; /* Code indicating why interface is down. */ + + /* flags */ +#if PPP_IPV4_SUPPORT + unsigned int ask_for_local :1; /* request our address from peer */ + unsigned int ipcp_is_open :1; /* haven't called np_finished() */ + unsigned int ipcp_is_up :1; /* have called ipcp_up() */ + unsigned int if4_up :1; /* True when the IPv4 interface is up. */ +#if 0 /* UNUSED - PROXY ARP */ + unsigned int proxy_arp_set :1; /* Have created proxy arp entry */ +#endif /* UNUSED - PROXY ARP */ +#endif /* PPP_IPV4_SUPPORT */ +#if PPP_IPV6_SUPPORT + unsigned int ipv6cp_is_up :1; /* have called ip6cp_up() */ + unsigned int if6_up :1; /* True when the IPv6 interface is up. */ +#endif /* PPP_IPV6_SUPPORT */ + unsigned int lcp_echo_timer_running :1; /* set if a timer is running */ +#if VJ_SUPPORT + unsigned int vj_enabled :1; /* Flag indicating VJ compression enabled. */ +#endif /* VJ_SUPPORT */ +#if CCP_SUPPORT + unsigned int ccp_all_rejected :1; /* we rejected all peer's options */ +#endif /* CCP_SUPPORT */ +#if MPPE_SUPPORT + unsigned int mppe_keys_set :1; /* Have the MPPE keys been set? */ +#endif /* MPPE_SUPPORT */ + +#if PPP_AUTH_SUPPORT + /* auth data */ +#if PPP_SERVER && defined(HAVE_MULTILINK) + char peer_authname[MAXNAMELEN + 1]; /* The name by which the peer authenticated itself to us. */ +#endif /* PPP_SERVER && defined(HAVE_MULTILINK) */ + u16_t auth_pending; /* Records which authentication operations haven't completed yet. */ + u16_t auth_done; /* Records which authentication operations have been completed. */ + +#if PAP_SUPPORT + upap_state upap; /* PAP data */ +#endif /* PAP_SUPPORT */ + +#if CHAP_SUPPORT + chap_client_state chap_client; /* CHAP client data */ +#if PPP_SERVER + chap_server_state chap_server; /* CHAP server data */ +#endif /* PPP_SERVER */ +#endif /* CHAP_SUPPORT */ + +#if EAP_SUPPORT + eap_state eap; /* EAP data */ +#endif /* EAP_SUPPORT */ +#endif /* PPP_AUTH_SUPPORT */ + + fsm lcp_fsm; /* LCP fsm structure */ + lcp_options lcp_wantoptions; /* Options that we want to request */ + lcp_options lcp_gotoptions; /* Options that peer ack'd */ + lcp_options lcp_allowoptions; /* Options we allow peer to request */ + lcp_options lcp_hisoptions; /* Options that we ack'd */ + u16_t peer_mru; /* currently negotiated peer MRU */ + u8_t lcp_echos_pending; /* Number of outstanding echo msgs */ + u8_t lcp_echo_number; /* ID number of next echo frame */ + + u8_t num_np_open; /* Number of network protocols which we have opened. */ + u8_t num_np_up; /* Number of network protocols which have come up. */ + +#if VJ_SUPPORT + struct vjcompress vj_comp; /* Van Jacobson compression header. */ +#endif /* VJ_SUPPORT */ + +#if CCP_SUPPORT + fsm ccp_fsm; /* CCP fsm structure */ + ccp_options ccp_wantoptions; /* what to request the peer to use */ + ccp_options ccp_gotoptions; /* what the peer agreed to do */ + ccp_options ccp_allowoptions; /* what we'll agree to do */ + ccp_options ccp_hisoptions; /* what we agreed to do */ + u8_t ccp_localstate; /* Local state (mainly for handling reset-reqs and reset-acks). */ + u8_t ccp_receive_method; /* Method chosen on receive path */ + u8_t ccp_transmit_method; /* Method chosen on transmit path */ +#if MPPE_SUPPORT + ppp_mppe_state mppe_comp; /* MPPE "compressor" structure */ + ppp_mppe_state mppe_decomp; /* MPPE "decompressor" structure */ +#endif /* MPPE_SUPPORT */ +#endif /* CCP_SUPPORT */ + +#if PPP_IPV4_SUPPORT + fsm ipcp_fsm; /* IPCP fsm structure */ + ipcp_options ipcp_wantoptions; /* Options that we want to request */ + ipcp_options ipcp_gotoptions; /* Options that peer ack'd */ + ipcp_options ipcp_allowoptions; /* Options we allow peer to request */ + ipcp_options ipcp_hisoptions; /* Options that we ack'd */ +#endif /* PPP_IPV4_SUPPORT */ + +#if PPP_IPV6_SUPPORT + fsm ipv6cp_fsm; /* IPV6CP fsm structure */ + ipv6cp_options ipv6cp_wantoptions; /* Options that we want to request */ + ipv6cp_options ipv6cp_gotoptions; /* Options that peer ack'd */ + ipv6cp_options ipv6cp_allowoptions; /* Options we allow peer to request */ + ipv6cp_options ipv6cp_hisoptions; /* Options that we ack'd */ +#endif /* PPP_IPV6_SUPPORT */ +}; + +/************************ + *** PUBLIC FUNCTIONS *** + ************************/ + +/* + * WARNING: For multi-threads environment, all ppp_set_* functions most + * only be called while the PPP is in the dead phase (i.e. disconnected). + */ + +#if PPP_AUTH_SUPPORT +/* + * Set PPP authentication. + * + * Warning: Using PPPAUTHTYPE_ANY might have security consequences. + * RFC 1994 says: + * + * In practice, within or associated with each PPP server, there is a + * database which associates "user" names with authentication + * information ("secrets"). It is not anticipated that a particular + * named user would be authenticated by multiple methods. This would + * make the user vulnerable to attacks which negotiate the least secure + * method from among a set (such as PAP rather than CHAP). If the same + * secret was used, PAP would reveal the secret to be used later with + * CHAP. + * + * Instead, for each user name there should be an indication of exactly + * one method used to authenticate that user name. If a user needs to + * make use of different authentication methods under different + * circumstances, then distinct user names SHOULD be employed, each of + * which identifies exactly one authentication method. + * + * Default is none auth type, unset (NULL) user and passwd. + */ +#define PPPAUTHTYPE_NONE 0x00 +#define PPPAUTHTYPE_PAP 0x01 +#define PPPAUTHTYPE_CHAP 0x02 +#define PPPAUTHTYPE_MSCHAP 0x04 +#define PPPAUTHTYPE_MSCHAP_V2 0x08 +#define PPPAUTHTYPE_EAP 0x10 +#define PPPAUTHTYPE_ANY 0xff +void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd); + +/* + * If set, peer is required to authenticate. This is mostly necessary for PPP server support. + * + * Default is false. + */ +#define ppp_set_auth_required(ppp, boolval) (ppp->settings.auth_required = boolval) +#endif /* PPP_AUTH_SUPPORT */ + +#if PPP_IPV4_SUPPORT +/* + * Set PPP interface "our" and "his" IPv4 addresses. This is mostly necessary for PPP server + * support but it can also be used on a PPP link where each side choose its own IP address. + * + * Default is unset (0.0.0.0). + */ +#define ppp_set_ipcp_ouraddr(ppp, addr) do { ppp->ipcp_wantoptions.ouraddr = ip4_addr_get_u32(addr); \ + ppp->ask_for_local = ppp->ipcp_wantoptions.ouraddr != 0; } while(0) +#define ppp_set_ipcp_hisaddr(ppp, addr) (ppp->ipcp_wantoptions.hisaddr = ip4_addr_get_u32(addr)) +#if LWIP_DNS +/* + * Set DNS server addresses that are sent if the peer asks for them. This is mostly necessary + * for PPP server support. + * + * Default is unset (0.0.0.0). + */ +#define ppp_set_ipcp_dnsaddr(ppp, index, addr) (ppp->ipcp_allowoptions.dnsaddr[index] = ip4_addr_get_u32(addr)) + +/* + * If set, we ask the peer for up to 2 DNS server addresses. Received DNS server addresses are + * registered using the dns_setserver() function. + * + * Default is false. + */ +#define ppp_set_usepeerdns(ppp, boolval) (ppp->settings.usepeerdns = boolval) +#endif /* LWIP_DNS */ +#endif /* PPP_IPV4_SUPPORT */ + +#if MPPE_SUPPORT +/* Disable MPPE (Microsoft Point to Point Encryption). This parameter is exclusive. */ +#define PPP_MPPE_DISABLE 0x00 +/* Require the use of MPPE (Microsoft Point to Point Encryption). */ +#define PPP_MPPE_ENABLE 0x01 +/* Allow MPPE to use stateful mode. Stateless mode is still attempted first. */ +#define PPP_MPPE_ALLOW_STATEFUL 0x02 +/* Refuse the use of MPPE with 40-bit encryption. Conflict with PPP_MPPE_REFUSE_128. */ +#define PPP_MPPE_REFUSE_40 0x04 +/* Refuse the use of MPPE with 128-bit encryption. Conflict with PPP_MPPE_REFUSE_40. */ +#define PPP_MPPE_REFUSE_128 0x08 +/* + * Set MPPE configuration + * + * Default is disabled. + */ +void ppp_set_mppe(ppp_pcb *pcb, u8_t flags); +#endif /* MPPE_SUPPORT */ + +/* + * Wait for up to intval milliseconds for a valid PPP packet from the peer. + * At the end of this time, or when a valid PPP packet is received from the + * peer, we commence negotiation by sending our first LCP packet. + * + * Default is 0. + */ +#define ppp_set_listen_time(ppp, intval) (ppp->settings.listen_time = intval) + +/* + * If set, we will attempt to initiate a connection but if no reply is received from + * the peer, we will then just wait passively for a valid LCP packet from the peer. + * + * Default is false. + */ +#define ppp_set_passive(ppp, boolval) (ppp->lcp_wantoptions.passive = boolval) + +/* + * If set, we will not transmit LCP packets to initiate a connection until a valid + * LCP packet is received from the peer. This is what we usually call the server mode. + * + * Default is false. + */ +#define ppp_set_silent(ppp, boolval) (ppp->lcp_wantoptions.silent = boolval) + +/* + * If set, enable protocol field compression negotiation in both the receive and + * the transmit direction. + * + * Default is true. + */ +#define ppp_set_neg_pcomp(ppp, boolval) (ppp->lcp_wantoptions.neg_pcompression = \ + ppp->lcp_allowoptions.neg_pcompression = boolval) + +/* + * If set, enable Address/Control compression in both the receive and the transmit + * direction. + * + * Default is true. + */ +#define ppp_set_neg_accomp(ppp, boolval) (ppp->lcp_wantoptions.neg_accompression = \ + ppp->lcp_allowoptions.neg_accompression = boolval) + +/* + * If set, enable asyncmap negotiation. Otherwise forcing all control characters to + * be escaped for both the transmit and the receive direction. + * + * Default is true. + */ +#define ppp_set_neg_asyncmap(ppp, boolval) (ppp->lcp_wantoptions.neg_asyncmap = \ + ppp->lcp_allowoptions.neg_asyncmap = boolval) + +/* + * This option sets the Async-Control-Character-Map (ACCM) for this end of the link. + * The ACCM is a set of 32 bits, one for each of the ASCII control characters with + * values from 0 to 31, where a 1 bit indicates that the corresponding control + * character should not be used in PPP packets sent to this system. The map is + * an unsigned 32 bits integer where the least significant bit (00000001) represents + * character 0 and the most significant bit (80000000) represents character 31. + * We will then ask the peer to send these characters as a 2-byte escape sequence. + * + * Default is 0. + */ +#define ppp_set_asyncmap(ppp, intval) (ppp->lcp_wantoptions.asyncmap = intval) + +/* + * Set a PPP interface as the default network interface + * (used to output all packets for which no specific route is found). + */ +#define ppp_set_default(ppp) netif_set_default(ppp->netif) + +#if PPP_NOTIFY_PHASE +/* + * Set a PPP notify phase callback. + * + * This can be used for example to set a LED pattern depending on the + * current phase of the PPP session. + */ +typedef void (*ppp_notify_phase_cb_fn)(ppp_pcb *pcb, u8_t phase, void *ctx); +void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb); +#endif /* PPP_NOTIFY_PHASE */ + +/* + * Initiate a PPP connection. + * + * This can only be called if PPP is in the dead phase. + * + * Holdoff is the time to wait (in seconds) before initiating + * the connection. + * + * If this port connects to a modem, the modem connection must be + * established before calling this. + */ +err_t ppp_connect(ppp_pcb *pcb, u16_t holdoff); + +#if PPP_SERVER +/* + * Listen for an incoming PPP connection. + * + * This can only be called if PPP is in the dead phase. + * + * If this port connects to a modem, the modem connection must be + * established before calling this. + */ +err_t ppp_listen(ppp_pcb *pcb); +#endif /* PPP_SERVER */ + +/* + * Initiate the end of a PPP connection. + * Any outstanding packets in the queues are dropped. + * + * Setting nocarrier to 1 close the PPP connection without initiating the + * shutdown procedure. Always using nocarrier = 0 is still recommended, + * this is going to take a little longer time if your link is down, but + * is a safer choice for the PPP state machine. + * + * Return 0 on success, an error code on failure. + */ +err_t ppp_close(ppp_pcb *pcb, u8_t nocarrier); + +/* + * Release the control block. + * + * This can only be called if PPP is in the dead phase. + * + * You must use ppp_close() before if you wish to terminate + * an established PPP session. + * + * Return 0 on success, an error code on failure. + */ +err_t ppp_free(ppp_pcb *pcb); + +/* + * PPP IOCTL commands. + * + * Get the up status - 0 for down, non-zero for up. The argument must + * point to an int. + */ +#define PPPCTLG_UPSTATUS 0 + +/* + * Get the PPP error code. The argument must point to an int. + * Returns a PPPERR_* value. + */ +#define PPPCTLG_ERRCODE 1 + +/* + * Get the fd associated with a PPP over serial + */ +#define PPPCTLG_FD 2 + +/* + * Get and set parameters for the given connection. + * Return 0 on success, an error code on failure. + */ +err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg); + +/* Get the PPP netif interface */ +#define ppp_netif(ppp) (ppp->netif) + +/* Set an lwIP-style status-callback for the selected PPP device */ +#define ppp_set_netif_statuscallback(ppp, status_cb) \ + netif_set_status_callback(ppp->netif, status_cb); + +/* Set an lwIP-style link-callback for the selected PPP device */ +#define ppp_set_netif_linkcallback(ppp, link_cb) \ + netif_set_link_callback(ppp->netif, link_cb); + +#endif /* PPP_H */ + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_impl.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_impl.h index 1d4c774..041a2dc 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_impl.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_impl.h @@ -1,629 +1,629 @@ -/***************************************************************************** -* ppp.h - Network Point to Point Protocol header file. -* -* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. -* portions Copyright (c) 1997 Global Election Systems Inc. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY -* -* 03-01-01 Marc Boucher -* Ported to lwIP. -* 97-11-05 Guy Lancaster , Global Election Systems Inc. -* Original derived from BSD codes. -*****************************************************************************/ -#ifndef LWIP_HDR_PPP_IMPL_H -#define LWIP_HDR_PPP_IMPL_H - -#include "netif/ppp/ppp_opts.h" - -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifdef PPP_INCLUDE_SETTINGS_HEADER -#include "ppp_settings.h" -#endif - -#include /* formats */ -#include -#include -#include /* strtol() */ - -#include "lwip/netif.h" -#include "lwip/def.h" -#include "lwip/timeouts.h" - -#include "ppp.h" -#include "pppdebug.h" - -/* - * Memory used for control packets. - * - * PPP_CTRL_PBUF_MAX_SIZE is the amount of memory we allocate when we - * cannot figure out how much we are going to use before filling the buffer. - */ -#if PPP_USE_PBUF_RAM -#define PPP_CTRL_PBUF_TYPE PBUF_RAM -#define PPP_CTRL_PBUF_MAX_SIZE 512 -#else /* PPP_USE_PBUF_RAM */ -#define PPP_CTRL_PBUF_TYPE PBUF_POOL -#define PPP_CTRL_PBUF_MAX_SIZE PBUF_POOL_BUFSIZE -#endif /* PPP_USE_PBUF_RAM */ - -/* - * The basic PPP frame. - */ -#define PPP_ADDRESS(p) (((u_char *)(p))[0]) -#define PPP_CONTROL(p) (((u_char *)(p))[1]) -#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3]) - -/* - * Significant octet values. - */ -#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */ -#define PPP_UI 0x03 /* Unnumbered Information */ -#define PPP_FLAG 0x7e /* Flag Sequence */ -#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */ -#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */ - -/* - * Protocol field values. - */ -#define PPP_IP 0x21 /* Internet Protocol */ -#if 0 /* UNUSED */ -#define PPP_AT 0x29 /* AppleTalk Protocol */ -#define PPP_IPX 0x2b /* IPX protocol */ -#endif /* UNUSED */ -#if VJ_SUPPORT -#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */ -#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */ -#endif /* VJ_SUPPORT */ -#if PPP_IPV6_SUPPORT -#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */ -#endif /* PPP_IPV6_SUPPORT */ -#if CCP_SUPPORT -#define PPP_COMP 0xfd /* compressed packet */ -#endif /* CCP_SUPPORT */ -#define PPP_IPCP 0x8021 /* IP Control Protocol */ -#if 0 /* UNUSED */ -#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */ -#define PPP_IPXCP 0x802b /* IPX Control Protocol */ -#endif /* UNUSED */ -#if PPP_IPV6_SUPPORT -#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */ -#endif /* PPP_IPV6_SUPPORT */ -#if CCP_SUPPORT -#define PPP_CCP 0x80fd /* Compression Control Protocol */ -#endif /* CCP_SUPPORT */ -#if ECP_SUPPORT -#define PPP_ECP 0x8053 /* Encryption Control Protocol */ -#endif /* ECP_SUPPORT */ -#define PPP_LCP 0xc021 /* Link Control Protocol */ -#if PAP_SUPPORT -#define PPP_PAP 0xc023 /* Password Authentication Protocol */ -#endif /* PAP_SUPPORT */ -#if LQR_SUPPORT -#define PPP_LQR 0xc025 /* Link Quality Report protocol */ -#endif /* LQR_SUPPORT */ -#if CHAP_SUPPORT -#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */ -#endif /* CHAP_SUPPORT */ -#if CBCP_SUPPORT -#define PPP_CBCP 0xc029 /* Callback Control Protocol */ -#endif /* CBCP_SUPPORT */ -#if EAP_SUPPORT -#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */ -#endif /* EAP_SUPPORT */ - -/* - * The following struct gives the addresses of procedures to call - * for a particular lower link level protocol. - */ -struct link_callbacks { - /* Start a connection (e.g. Initiate discovery phase) */ - void (*connect) (ppp_pcb *pcb, void *ctx); -#if PPP_SERVER - /* Listen for an incoming connection (Passive mode) */ - void (*listen) (ppp_pcb *pcb, void *ctx); -#endif /* PPP_SERVER */ - /* End a connection (i.e. initiate disconnect phase) */ - void (*disconnect) (ppp_pcb *pcb, void *ctx); - /* Free lower protocol control block */ - err_t (*free) (ppp_pcb *pcb, void *ctx); - /* Write a pbuf to a ppp link, only used from PPP functions to send PPP packets. */ - err_t (*write)(ppp_pcb *pcb, void *ctx, struct pbuf *p); - /* Send a packet from lwIP core (IPv4 or IPv6) */ - err_t (*netif_output)(ppp_pcb *pcb, void *ctx, struct pbuf *p, u_short protocol); - /* configure the transmit-side characteristics of the PPP interface */ - void (*send_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); - /* confire the receive-side characteristics of the PPP interface */ - void (*recv_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); -}; - -/* - * What to do with network protocol (NP) packets. - */ -enum NPmode { - NPMODE_PASS, /* pass the packet through */ - NPMODE_DROP, /* silently drop the packet */ - NPMODE_ERROR, /* return an error */ - NPMODE_QUEUE /* save it up for later. */ -}; - -/* - * Statistics. - */ -#if PPP_STATS_SUPPORT -struct pppstat { - unsigned int ppp_ibytes; /* bytes received */ - unsigned int ppp_ipackets; /* packets received */ - unsigned int ppp_ierrors; /* receive errors */ - unsigned int ppp_obytes; /* bytes sent */ - unsigned int ppp_opackets; /* packets sent */ - unsigned int ppp_oerrors; /* transmit errors */ -}; - -#if VJ_SUPPORT -struct vjstat { - unsigned int vjs_packets; /* outbound packets */ - unsigned int vjs_compressed; /* outbound compressed packets */ - unsigned int vjs_searches; /* searches for connection state */ - unsigned int vjs_misses; /* times couldn't find conn. state */ - unsigned int vjs_uncompressedin; /* inbound uncompressed packets */ - unsigned int vjs_compressedin; /* inbound compressed packets */ - unsigned int vjs_errorin; /* inbound unknown type packets */ - unsigned int vjs_tossed; /* inbound packets tossed because of error */ -}; -#endif /* VJ_SUPPORT */ - -struct ppp_stats { - struct pppstat p; /* basic PPP statistics */ -#if VJ_SUPPORT - struct vjstat vj; /* VJ header compression statistics */ -#endif /* VJ_SUPPORT */ -}; - -#if CCP_SUPPORT -struct compstat { - unsigned int unc_bytes; /* total uncompressed bytes */ - unsigned int unc_packets; /* total uncompressed packets */ - unsigned int comp_bytes; /* compressed bytes */ - unsigned int comp_packets; /* compressed packets */ - unsigned int inc_bytes; /* incompressible bytes */ - unsigned int inc_packets; /* incompressible packets */ - unsigned int ratio; /* recent compression ratio << 8 */ -}; - -struct ppp_comp_stats { - struct compstat c; /* packet compression statistics */ - struct compstat d; /* packet decompression statistics */ -}; -#endif /* CCP_SUPPORT */ - -#endif /* PPP_STATS_SUPPORT */ - -#if PPP_IDLETIMELIMIT -/* - * The following structure records the time in seconds since - * the last NP packet was sent or received. - */ -struct ppp_idle { - time_t xmit_idle; /* time since last NP packet sent */ - time_t recv_idle; /* time since last NP packet received */ -}; -#endif /* PPP_IDLETIMELIMIT */ - -/* values for epdisc.class */ -#define EPD_NULL 0 /* null discriminator, no data */ -#define EPD_LOCAL 1 -#define EPD_IP 2 -#define EPD_MAC 3 -#define EPD_MAGIC 4 -#define EPD_PHONENUM 5 - -/* - * Global variables. - */ -#ifdef HAVE_MULTILINK -extern u8_t multilink; /* enable multilink operation */ -extern u8_t doing_multilink; -extern u8_t multilink_master; -extern u8_t bundle_eof; -extern u8_t bundle_terminating; -#endif - -#ifdef MAXOCTETS -extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */ -extern int maxoctets_dir; /* Direction : - 0 - in+out (default) - 1 - in - 2 - out - 3 - max(in,out) */ -extern int maxoctets_timeout; /* Timeout for check of octets limit */ -#define PPP_OCTETS_DIRECTION_SUM 0 -#define PPP_OCTETS_DIRECTION_IN 1 -#define PPP_OCTETS_DIRECTION_OUT 2 -#define PPP_OCTETS_DIRECTION_MAXOVERAL 3 -/* same as previos, but little different on RADIUS side */ -#define PPP_OCTETS_DIRECTION_MAXSESSION 4 -#endif - -/* Data input may be used by CCP and ECP, remove this entry - * from struct protent to save some flash - */ -#define PPP_DATAINPUT 0 - -/* - * The following struct gives the addresses of procedures to call - * for a particular protocol. - */ -struct protent { - u_short protocol; /* PPP protocol number */ - /* Initialization procedure */ - void (*init) (ppp_pcb *pcb); - /* Process a received packet */ - void (*input) (ppp_pcb *pcb, u_char *pkt, int len); - /* Process a received protocol-reject */ - void (*protrej) (ppp_pcb *pcb); - /* Lower layer has come up */ - void (*lowerup) (ppp_pcb *pcb); - /* Lower layer has gone down */ - void (*lowerdown) (ppp_pcb *pcb); - /* Open the protocol */ - void (*open) (ppp_pcb *pcb); - /* Close the protocol */ - void (*close) (ppp_pcb *pcb, const char *reason); -#if PRINTPKT_SUPPORT - /* Print a packet in readable form */ - int (*printpkt) (const u_char *pkt, int len, - void (*printer) (void *, const char *, ...), - void *arg); -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - /* Process a received data packet */ - void (*datainput) (ppp_pcb *pcb, u_char *pkt, int len); -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - const char *name; /* Text name of protocol */ - const char *data_name; /* Text name of corresponding data protocol */ -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - option_t *options; /* List of command-line options */ - /* Check requested options, assign defaults */ - void (*check_options) (void); -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - /* Configure interface for demand-dial */ - int (*demand_conf) (int unit); - /* Say whether to bring up link for this pkt */ - int (*active_pkt) (u_char *pkt, int len); -#endif /* DEMAND_SUPPORT */ -}; - -/* Table of pointers to supported protocols */ -extern const struct protent* const protocols[]; - - -/* Values for auth_pending, auth_done */ -#if PAP_SUPPORT -#define PAP_WITHPEER 0x1 -#define PAP_PEER 0x2 -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT -#define CHAP_WITHPEER 0x4 -#define CHAP_PEER 0x8 -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT -#define EAP_WITHPEER 0x10 -#define EAP_PEER 0x20 -#endif /* EAP_SUPPORT */ - -/* Values for auth_done only */ -#if CHAP_SUPPORT -#define CHAP_MD5_WITHPEER 0x40 -#define CHAP_MD5_PEER 0x80 -#if MSCHAP_SUPPORT -#define CHAP_MS_SHIFT 8 /* LSB position for MS auths */ -#define CHAP_MS_WITHPEER 0x100 -#define CHAP_MS_PEER 0x200 -#define CHAP_MS2_WITHPEER 0x400 -#define CHAP_MS2_PEER 0x800 -#endif /* MSCHAP_SUPPORT */ -#endif /* CHAP_SUPPORT */ - -/* Supported CHAP protocols */ -#if CHAP_SUPPORT - -#if MSCHAP_SUPPORT -#define CHAP_MDTYPE_SUPPORTED (MDTYPE_MICROSOFT_V2 | MDTYPE_MICROSOFT | MDTYPE_MD5) -#else /* MSCHAP_SUPPORT */ -#define CHAP_MDTYPE_SUPPORTED (MDTYPE_MD5) -#endif /* MSCHAP_SUPPORT */ - -#else /* CHAP_SUPPORT */ -#define CHAP_MDTYPE_SUPPORTED (MDTYPE_NONE) -#endif /* CHAP_SUPPORT */ - -#if PPP_STATS_SUPPORT -/* - * PPP statistics structure - */ -struct pppd_stats { - unsigned int bytes_in; - unsigned int bytes_out; - unsigned int pkts_in; - unsigned int pkts_out; -}; -#endif /* PPP_STATS_SUPPORT */ - - -/* - * PPP private functions - */ - - -/* - * Functions called from lwIP core. - */ - -/* initialize the PPP subsystem */ -int ppp_init(void); - -/* - * Functions called from PPP link protocols. - */ - -/* Create a new PPP control block */ -ppp_pcb *ppp_new(struct netif *pppif, const struct link_callbacks *callbacks, void *link_ctx_cb, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb); - -/* Initiate LCP open request */ -void ppp_start(ppp_pcb *pcb); - -/* Called when link failed to setup */ -void ppp_link_failed(ppp_pcb *pcb); - -/* Called when link is normally down (i.e. it was asked to end) */ -void ppp_link_end(ppp_pcb *pcb); - -/* function called to process input packet */ -void ppp_input(ppp_pcb *pcb, struct pbuf *pb); - -/* helper function, merge a pbuf chain into one pbuf */ -struct pbuf *ppp_singlebuf(struct pbuf *p); - - -/* - * Functions called by PPP protocols. - */ - -/* function called by all PPP subsystems to send packets */ -err_t ppp_write(ppp_pcb *pcb, struct pbuf *p); - -/* functions called by auth.c link_terminated() */ -void ppp_link_terminated(ppp_pcb *pcb); - -void new_phase(ppp_pcb *pcb, int p); - -int ppp_send_config(ppp_pcb *pcb, int mtu, u32_t accm, int pcomp, int accomp); -int ppp_recv_config(ppp_pcb *pcb, int mru, u32_t accm, int pcomp, int accomp); - -#if PPP_IPV4_SUPPORT -int sifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr, u32_t netmask); -int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr); -#if 0 /* UNUSED - PROXY ARP */ -int sifproxyarp(ppp_pcb *pcb, u32_t his_adr); -int cifproxyarp(ppp_pcb *pcb, u32_t his_adr); -#endif /* UNUSED - PROXY ARP */ -#if LWIP_DNS -int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2); -int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2); -#endif /* LWIP_DNS */ -#if VJ_SUPPORT -int sifvjcomp(ppp_pcb *pcb, int vjcomp, int cidcomp, int maxcid); -#endif /* VJ_SUPPORT */ -int sifup(ppp_pcb *pcb); -int sifdown (ppp_pcb *pcb); -u32_t get_mask(u32_t addr); -#endif /* PPP_IPV4_SUPPORT */ - -#if PPP_IPV6_SUPPORT -int sif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64); -int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64); -int sif6up(ppp_pcb *pcb); -int sif6down (ppp_pcb *pcb); -#endif /* PPP_IPV6_SUPPORT */ - -#if DEMAND_SUPPORT -int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode); -#endif /* DEMAND_SUPPORt */ - -void netif_set_mtu(ppp_pcb *pcb, int mtu); -int netif_get_mtu(ppp_pcb *pcb); - -#if CCP_SUPPORT -#if 0 /* unused */ -int ccp_test(ppp_pcb *pcb, u_char *opt_ptr, int opt_len, int for_transmit); -#endif /* unused */ -void ccp_set(ppp_pcb *pcb, u8_t isopen, u8_t isup, u8_t receive_method, u8_t transmit_method); -void ccp_reset_comp(ppp_pcb *pcb); -void ccp_reset_decomp(ppp_pcb *pcb); -#if 0 /* unused */ -int ccp_fatal_error(ppp_pcb *pcb); -#endif /* unused */ -#endif /* CCP_SUPPORT */ - -#if PPP_IDLETIMELIMIT -int get_idle_time(ppp_pcb *pcb, struct ppp_idle *ip); -#endif /* PPP_IDLETIMELIMIT */ - -#if DEMAND_SUPPORT -int get_loop_output(void); -#endif /* DEMAND_SUPPORT */ - -/* Optional protocol names list, to make our messages a little more informative. */ -#if PPP_PROTOCOLNAME -const char * protocol_name(int proto); -#endif /* PPP_PROTOCOLNAME */ - -/* Optional stats support, to get some statistics on the PPP interface */ -#if PPP_STATS_SUPPORT -void print_link_stats(void); /* Print stats, if available */ -void reset_link_stats(int u); /* Reset (init) stats when link goes up */ -void update_link_stats(int u); /* Get stats at link termination */ -#endif /* PPP_STATS_SUPPORT */ - - - -/* - * Inline versions of get/put char/short/long. - * Pointer is advanced; we assume that both arguments - * are lvalues and will already be in registers. - * cp MUST be u_char *. - */ -#define GETCHAR(c, cp) { \ - (c) = *(cp)++; \ -} -#define PUTCHAR(c, cp) { \ - *(cp)++ = (u_char) (c); \ -} -#define GETSHORT(s, cp) { \ - (s) = *(cp)++ << 8; \ - (s) |= *(cp)++; \ -} -#define PUTSHORT(s, cp) { \ - *(cp)++ = (u_char) ((s) >> 8); \ - *(cp)++ = (u_char) (s); \ -} -#define GETLONG(l, cp) { \ - (l) = *(cp)++ << 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; (l) <<= 8; \ - (l) |= *(cp)++; \ -} -#define PUTLONG(l, cp) { \ - *(cp)++ = (u_char) ((l) >> 24); \ - *(cp)++ = (u_char) ((l) >> 16); \ - *(cp)++ = (u_char) ((l) >> 8); \ - *(cp)++ = (u_char) (l); \ -} - -#define INCPTR(n, cp) ((cp) += (n)) -#define DECPTR(n, cp) ((cp) -= (n)) - -/* - * System dependent definitions for user-level 4.3BSD UNIX implementation. - */ -#define TIMEOUT(f, a, t) do { sys_untimeout((f), (a)); sys_timeout((t)*1000, (f), (a)); } while(0) -#define TIMEOUTMS(f, a, t) do { sys_untimeout((f), (a)); sys_timeout((t), (f), (a)); } while(0) -#define UNTIMEOUT(f, a) sys_untimeout((f), (a)) - -#define BZERO(s, n) memset(s, 0, n) -#define BCMP(s1, s2, l) memcmp(s1, s2, l) - -#define PRINTMSG(m, l) { ppp_info("Remote message: %0.*v", l, m); } - -/* - * MAKEHEADER - Add Header fields to a packet. - */ -#define MAKEHEADER(p, t) { \ - PUTCHAR(PPP_ALLSTATIONS, p); \ - PUTCHAR(PPP_UI, p); \ - PUTSHORT(t, p); } - -/* Procedures exported from auth.c */ -void link_required(ppp_pcb *pcb); /* we are starting to use the link */ -void link_terminated(ppp_pcb *pcb); /* we are finished with the link */ -void link_down(ppp_pcb *pcb); /* the LCP layer has left the Opened state */ -void upper_layers_down(ppp_pcb *pcb); /* take all NCPs down */ -void link_established(ppp_pcb *pcb); /* the link is up; authenticate now */ -void start_networks(ppp_pcb *pcb); /* start all the network control protos */ -void continue_networks(ppp_pcb *pcb); /* start network [ip, etc] control protos */ -#if PPP_AUTH_SUPPORT -#if PPP_SERVER -int auth_check_passwd(ppp_pcb *pcb, char *auser, int userlen, char *apasswd, int passwdlen, const char **msg, int *msglen); - /* check the user name and passwd against configuration */ -void auth_peer_fail(ppp_pcb *pcb, int protocol); - /* peer failed to authenticate itself */ -void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char *name, int namelen); - /* peer successfully authenticated itself */ -#endif /* PPP_SERVER */ -void auth_withpeer_fail(ppp_pcb *pcb, int protocol); - /* we failed to authenticate ourselves */ -void auth_withpeer_success(ppp_pcb *pcb, int protocol, int prot_flavor); - /* we successfully authenticated ourselves */ -#endif /* PPP_AUTH_SUPPORT */ -void np_up(ppp_pcb *pcb, int proto); /* a network protocol has come up */ -void np_down(ppp_pcb *pcb, int proto); /* a network protocol has gone down */ -void np_finished(ppp_pcb *pcb, int proto); /* a network protocol no longer needs link */ -#if PPP_AUTH_SUPPORT -int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secret, int *secret_len, int am_server); - /* get "secret" for chap */ -#endif /* PPP_AUTH_SUPPORT */ - -/* Procedures exported from ipcp.c */ -/* int parse_dotted_ip (char *, u32_t *); */ - -/* Procedures exported from demand.c */ -#if DEMAND_SUPPORT -void demand_conf (void); /* config interface(s) for demand-dial */ -void demand_block (void); /* set all NPs to queue up packets */ -void demand_unblock (void); /* set all NPs to pass packets */ -void demand_discard (void); /* set all NPs to discard packets */ -void demand_rexmit (int, u32_t); /* retransmit saved frames for an NP*/ -int loop_chars (unsigned char *, int); /* process chars from loopback */ -int loop_frame (unsigned char *, int); /* should we bring link up? */ -#endif /* DEMAND_SUPPORT */ - -/* Procedures exported from multilink.c */ -#ifdef HAVE_MULTILINK -void mp_check_options (void); /* Check multilink-related options */ -int mp_join_bundle (void); /* join our link to an appropriate bundle */ -void mp_exit_bundle (void); /* have disconnected our link from bundle */ -void mp_bundle_terminated (void); -char *epdisc_to_str (struct epdisc *); /* string from endpoint discrim. */ -int str_to_epdisc (struct epdisc *, char *); /* endpt disc. from str */ -#else -#define mp_bundle_terminated() /* nothing */ -#define mp_exit_bundle() /* nothing */ -#define doing_multilink 0 -#define multilink_master 0 -#endif - -/* Procedures exported from utils.c. */ -void ppp_print_string(const u_char *p, int len, void (*printer) (void *, const char *, ...), void *arg); /* Format a string for output */ -int ppp_slprintf(char *buf, int buflen, const char *fmt, ...); /* sprintf++ */ -int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args); /* vsprintf++ */ -size_t ppp_strlcpy(char *dest, const char *src, size_t len); /* safe strcpy */ -size_t ppp_strlcat(char *dest, const char *src, size_t len); /* safe strncpy */ -void ppp_dbglog(const char *fmt, ...); /* log a debug message */ -void ppp_info(const char *fmt, ...); /* log an informational message */ -void ppp_notice(const char *fmt, ...); /* log a notice-level message */ -void ppp_warn(const char *fmt, ...); /* log a warning message */ -void ppp_error(const char *fmt, ...); /* log an error message */ -void ppp_fatal(const char *fmt, ...); /* log an error message and die(1) */ -#if PRINTPKT_SUPPORT -void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len); - /* dump packet to debug log if interesting */ -#endif /* PRINTPKT_SUPPORT */ - - -#endif /* PPP_SUPPORT */ -#endif /* LWIP_HDR_PPP_IMPL_H */ +/***************************************************************************** +* ppp.h - Network Point to Point Protocol header file. +* +* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. +* portions Copyright (c) 1997 Global Election Systems Inc. +* +* The authors hereby grant permission to use, copy, modify, distribute, +* and license this software and its documentation for any purpose, provided +* that existing copyright notices are retained in all copies and that this +* notice and the following disclaimer are included verbatim in any +* distributions. No written agreement, license, or royalty fee is required +* for any of the authorized uses. +* +* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +****************************************************************************** +* REVISION HISTORY +* +* 03-01-01 Marc Boucher +* Ported to lwIP. +* 97-11-05 Guy Lancaster , Global Election Systems Inc. +* Original derived from BSD codes. +*****************************************************************************/ +#ifndef LWIP_HDR_PPP_IMPL_H +#define LWIP_HDR_PPP_IMPL_H + +#include "netif/ppp/ppp_opts.h" + +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifdef PPP_INCLUDE_SETTINGS_HEADER +#include "ppp_settings.h" +#endif + +#include /* formats */ +#include +#include +#include /* strtol() */ + +#include "lwip/netif.h" +#include "lwip/def.h" +#include "lwip/timeouts.h" + +#include "ppp.h" +#include "pppdebug.h" + +/* + * Memory used for control packets. + * + * PPP_CTRL_PBUF_MAX_SIZE is the amount of memory we allocate when we + * cannot figure out how much we are going to use before filling the buffer. + */ +#if PPP_USE_PBUF_RAM +#define PPP_CTRL_PBUF_TYPE PBUF_RAM +#define PPP_CTRL_PBUF_MAX_SIZE 512 +#else /* PPP_USE_PBUF_RAM */ +#define PPP_CTRL_PBUF_TYPE PBUF_POOL +#define PPP_CTRL_PBUF_MAX_SIZE PBUF_POOL_BUFSIZE +#endif /* PPP_USE_PBUF_RAM */ + +/* + * The basic PPP frame. + */ +#define PPP_ADDRESS(p) (((u_char *)(p))[0]) +#define PPP_CONTROL(p) (((u_char *)(p))[1]) +#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3]) + +/* + * Significant octet values. + */ +#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */ +#define PPP_UI 0x03 /* Unnumbered Information */ +#define PPP_FLAG 0x7e /* Flag Sequence */ +#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */ +#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */ + +/* + * Protocol field values. + */ +#define PPP_IP 0x21 /* Internet Protocol */ +#if 0 /* UNUSED */ +#define PPP_AT 0x29 /* AppleTalk Protocol */ +#define PPP_IPX 0x2b /* IPX protocol */ +#endif /* UNUSED */ +#if VJ_SUPPORT +#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */ +#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */ +#endif /* VJ_SUPPORT */ +#if PPP_IPV6_SUPPORT +#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */ +#endif /* PPP_IPV6_SUPPORT */ +#if CCP_SUPPORT +#define PPP_COMP 0xfd /* compressed packet */ +#endif /* CCP_SUPPORT */ +#define PPP_IPCP 0x8021 /* IP Control Protocol */ +#if 0 /* UNUSED */ +#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */ +#define PPP_IPXCP 0x802b /* IPX Control Protocol */ +#endif /* UNUSED */ +#if PPP_IPV6_SUPPORT +#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */ +#endif /* PPP_IPV6_SUPPORT */ +#if CCP_SUPPORT +#define PPP_CCP 0x80fd /* Compression Control Protocol */ +#endif /* CCP_SUPPORT */ +#if ECP_SUPPORT +#define PPP_ECP 0x8053 /* Encryption Control Protocol */ +#endif /* ECP_SUPPORT */ +#define PPP_LCP 0xc021 /* Link Control Protocol */ +#if PAP_SUPPORT +#define PPP_PAP 0xc023 /* Password Authentication Protocol */ +#endif /* PAP_SUPPORT */ +#if LQR_SUPPORT +#define PPP_LQR 0xc025 /* Link Quality Report protocol */ +#endif /* LQR_SUPPORT */ +#if CHAP_SUPPORT +#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */ +#endif /* CHAP_SUPPORT */ +#if CBCP_SUPPORT +#define PPP_CBCP 0xc029 /* Callback Control Protocol */ +#endif /* CBCP_SUPPORT */ +#if EAP_SUPPORT +#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */ +#endif /* EAP_SUPPORT */ + +/* + * The following struct gives the addresses of procedures to call + * for a particular lower link level protocol. + */ +struct link_callbacks { + /* Start a connection (e.g. Initiate discovery phase) */ + void (*connect) (ppp_pcb *pcb, void *ctx); +#if PPP_SERVER + /* Listen for an incoming connection (Passive mode) */ + void (*listen) (ppp_pcb *pcb, void *ctx); +#endif /* PPP_SERVER */ + /* End a connection (i.e. initiate disconnect phase) */ + void (*disconnect) (ppp_pcb *pcb, void *ctx); + /* Free lower protocol control block */ + err_t (*free) (ppp_pcb *pcb, void *ctx); + /* Write a pbuf to a ppp link, only used from PPP functions to send PPP packets. */ + err_t (*write)(ppp_pcb *pcb, void *ctx, struct pbuf *p); + /* Send a packet from lwIP core (IPv4 or IPv6) */ + err_t (*netif_output)(ppp_pcb *pcb, void *ctx, struct pbuf *p, u_short protocol); + /* configure the transmit-side characteristics of the PPP interface */ + void (*send_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); + /* confire the receive-side characteristics of the PPP interface */ + void (*recv_config)(ppp_pcb *pcb, void *ctx, u32_t accm, int pcomp, int accomp); +}; + +/* + * What to do with network protocol (NP) packets. + */ +enum NPmode { + NPMODE_PASS, /* pass the packet through */ + NPMODE_DROP, /* silently drop the packet */ + NPMODE_ERROR, /* return an error */ + NPMODE_QUEUE /* save it up for later. */ +}; + +/* + * Statistics. + */ +#if PPP_STATS_SUPPORT +struct pppstat { + unsigned int ppp_ibytes; /* bytes received */ + unsigned int ppp_ipackets; /* packets received */ + unsigned int ppp_ierrors; /* receive errors */ + unsigned int ppp_obytes; /* bytes sent */ + unsigned int ppp_opackets; /* packets sent */ + unsigned int ppp_oerrors; /* transmit errors */ +}; + +#if VJ_SUPPORT +struct vjstat { + unsigned int vjs_packets; /* outbound packets */ + unsigned int vjs_compressed; /* outbound compressed packets */ + unsigned int vjs_searches; /* searches for connection state */ + unsigned int vjs_misses; /* times couldn't find conn. state */ + unsigned int vjs_uncompressedin; /* inbound uncompressed packets */ + unsigned int vjs_compressedin; /* inbound compressed packets */ + unsigned int vjs_errorin; /* inbound unknown type packets */ + unsigned int vjs_tossed; /* inbound packets tossed because of error */ +}; +#endif /* VJ_SUPPORT */ + +struct ppp_stats { + struct pppstat p; /* basic PPP statistics */ +#if VJ_SUPPORT + struct vjstat vj; /* VJ header compression statistics */ +#endif /* VJ_SUPPORT */ +}; + +#if CCP_SUPPORT +struct compstat { + unsigned int unc_bytes; /* total uncompressed bytes */ + unsigned int unc_packets; /* total uncompressed packets */ + unsigned int comp_bytes; /* compressed bytes */ + unsigned int comp_packets; /* compressed packets */ + unsigned int inc_bytes; /* incompressible bytes */ + unsigned int inc_packets; /* incompressible packets */ + unsigned int ratio; /* recent compression ratio << 8 */ +}; + +struct ppp_comp_stats { + struct compstat c; /* packet compression statistics */ + struct compstat d; /* packet decompression statistics */ +}; +#endif /* CCP_SUPPORT */ + +#endif /* PPP_STATS_SUPPORT */ + +#if PPP_IDLETIMELIMIT +/* + * The following structure records the time in seconds since + * the last NP packet was sent or received. + */ +struct ppp_idle { + time_t xmit_idle; /* time since last NP packet sent */ + time_t recv_idle; /* time since last NP packet received */ +}; +#endif /* PPP_IDLETIMELIMIT */ + +/* values for epdisc.class */ +#define EPD_NULL 0 /* null discriminator, no data */ +#define EPD_LOCAL 1 +#define EPD_IP 2 +#define EPD_MAC 3 +#define EPD_MAGIC 4 +#define EPD_PHONENUM 5 + +/* + * Global variables. + */ +#ifdef HAVE_MULTILINK +extern u8_t multilink; /* enable multilink operation */ +extern u8_t doing_multilink; +extern u8_t multilink_master; +extern u8_t bundle_eof; +extern u8_t bundle_terminating; +#endif + +#ifdef MAXOCTETS +extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */ +extern int maxoctets_dir; /* Direction : + 0 - in+out (default) + 1 - in + 2 - out + 3 - max(in,out) */ +extern int maxoctets_timeout; /* Timeout for check of octets limit */ +#define PPP_OCTETS_DIRECTION_SUM 0 +#define PPP_OCTETS_DIRECTION_IN 1 +#define PPP_OCTETS_DIRECTION_OUT 2 +#define PPP_OCTETS_DIRECTION_MAXOVERAL 3 +/* same as previos, but little different on RADIUS side */ +#define PPP_OCTETS_DIRECTION_MAXSESSION 4 +#endif + +/* Data input may be used by CCP and ECP, remove this entry + * from struct protent to save some flash + */ +#define PPP_DATAINPUT 0 + +/* + * The following struct gives the addresses of procedures to call + * for a particular protocol. + */ +struct protent { + u_short protocol; /* PPP protocol number */ + /* Initialization procedure */ + void (*init) (ppp_pcb *pcb); + /* Process a received packet */ + void (*input) (ppp_pcb *pcb, u_char *pkt, int len); + /* Process a received protocol-reject */ + void (*protrej) (ppp_pcb *pcb); + /* Lower layer has come up */ + void (*lowerup) (ppp_pcb *pcb); + /* Lower layer has gone down */ + void (*lowerdown) (ppp_pcb *pcb); + /* Open the protocol */ + void (*open) (ppp_pcb *pcb); + /* Close the protocol */ + void (*close) (ppp_pcb *pcb, const char *reason); +#if PRINTPKT_SUPPORT + /* Print a packet in readable form */ + int (*printpkt) (const u_char *pkt, int len, + void (*printer) (void *, const char *, ...), + void *arg); +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + /* Process a received data packet */ + void (*datainput) (ppp_pcb *pcb, u_char *pkt, int len); +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + const char *name; /* Text name of protocol */ + const char *data_name; /* Text name of corresponding data protocol */ +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + option_t *options; /* List of command-line options */ + /* Check requested options, assign defaults */ + void (*check_options) (void); +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + /* Configure interface for demand-dial */ + int (*demand_conf) (int unit); + /* Say whether to bring up link for this pkt */ + int (*active_pkt) (u_char *pkt, int len); +#endif /* DEMAND_SUPPORT */ +}; + +/* Table of pointers to supported protocols */ +extern const struct protent* const protocols[]; + + +/* Values for auth_pending, auth_done */ +#if PAP_SUPPORT +#define PAP_WITHPEER 0x1 +#define PAP_PEER 0x2 +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT +#define CHAP_WITHPEER 0x4 +#define CHAP_PEER 0x8 +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT +#define EAP_WITHPEER 0x10 +#define EAP_PEER 0x20 +#endif /* EAP_SUPPORT */ + +/* Values for auth_done only */ +#if CHAP_SUPPORT +#define CHAP_MD5_WITHPEER 0x40 +#define CHAP_MD5_PEER 0x80 +#if MSCHAP_SUPPORT +#define CHAP_MS_SHIFT 8 /* LSB position for MS auths */ +#define CHAP_MS_WITHPEER 0x100 +#define CHAP_MS_PEER 0x200 +#define CHAP_MS2_WITHPEER 0x400 +#define CHAP_MS2_PEER 0x800 +#endif /* MSCHAP_SUPPORT */ +#endif /* CHAP_SUPPORT */ + +/* Supported CHAP protocols */ +#if CHAP_SUPPORT + +#if MSCHAP_SUPPORT +#define CHAP_MDTYPE_SUPPORTED (MDTYPE_MICROSOFT_V2 | MDTYPE_MICROSOFT | MDTYPE_MD5) +#else /* MSCHAP_SUPPORT */ +#define CHAP_MDTYPE_SUPPORTED (MDTYPE_MD5) +#endif /* MSCHAP_SUPPORT */ + +#else /* CHAP_SUPPORT */ +#define CHAP_MDTYPE_SUPPORTED (MDTYPE_NONE) +#endif /* CHAP_SUPPORT */ + +#if PPP_STATS_SUPPORT +/* + * PPP statistics structure + */ +struct pppd_stats { + unsigned int bytes_in; + unsigned int bytes_out; + unsigned int pkts_in; + unsigned int pkts_out; +}; +#endif /* PPP_STATS_SUPPORT */ + + +/* + * PPP private functions + */ + + +/* + * Functions called from lwIP core. + */ + +/* initialize the PPP subsystem */ +int ppp_init(void); + +/* + * Functions called from PPP link protocols. + */ + +/* Create a new PPP control block */ +ppp_pcb *ppp_new(struct netif *pppif, const struct link_callbacks *callbacks, void *link_ctx_cb, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb); + +/* Initiate LCP open request */ +void ppp_start(ppp_pcb *pcb); + +/* Called when link failed to setup */ +void ppp_link_failed(ppp_pcb *pcb); + +/* Called when link is normally down (i.e. it was asked to end) */ +void ppp_link_end(ppp_pcb *pcb); + +/* function called to process input packet */ +void ppp_input(ppp_pcb *pcb, struct pbuf *pb); + +/* helper function, merge a pbuf chain into one pbuf */ +struct pbuf *ppp_singlebuf(struct pbuf *p); + + +/* + * Functions called by PPP protocols. + */ + +/* function called by all PPP subsystems to send packets */ +err_t ppp_write(ppp_pcb *pcb, struct pbuf *p); + +/* functions called by auth.c link_terminated() */ +void ppp_link_terminated(ppp_pcb *pcb); + +void new_phase(ppp_pcb *pcb, int p); + +int ppp_send_config(ppp_pcb *pcb, int mtu, u32_t accm, int pcomp, int accomp); +int ppp_recv_config(ppp_pcb *pcb, int mru, u32_t accm, int pcomp, int accomp); + +#if PPP_IPV4_SUPPORT +int sifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr, u32_t netmask); +int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr); +#if 0 /* UNUSED - PROXY ARP */ +int sifproxyarp(ppp_pcb *pcb, u32_t his_adr); +int cifproxyarp(ppp_pcb *pcb, u32_t his_adr); +#endif /* UNUSED - PROXY ARP */ +#if LWIP_DNS +int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2); +int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2); +#endif /* LWIP_DNS */ +#if VJ_SUPPORT +int sifvjcomp(ppp_pcb *pcb, int vjcomp, int cidcomp, int maxcid); +#endif /* VJ_SUPPORT */ +int sifup(ppp_pcb *pcb); +int sifdown (ppp_pcb *pcb); +u32_t get_mask(u32_t addr); +#endif /* PPP_IPV4_SUPPORT */ + +#if PPP_IPV6_SUPPORT +int sif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64); +int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64); +int sif6up(ppp_pcb *pcb); +int sif6down (ppp_pcb *pcb); +#endif /* PPP_IPV6_SUPPORT */ + +#if DEMAND_SUPPORT +int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode); +#endif /* DEMAND_SUPPORt */ + +void netif_set_mtu(ppp_pcb *pcb, int mtu); +int netif_get_mtu(ppp_pcb *pcb); + +#if CCP_SUPPORT +#if 0 /* unused */ +int ccp_test(ppp_pcb *pcb, u_char *opt_ptr, int opt_len, int for_transmit); +#endif /* unused */ +void ccp_set(ppp_pcb *pcb, u8_t isopen, u8_t isup, u8_t receive_method, u8_t transmit_method); +void ccp_reset_comp(ppp_pcb *pcb); +void ccp_reset_decomp(ppp_pcb *pcb); +#if 0 /* unused */ +int ccp_fatal_error(ppp_pcb *pcb); +#endif /* unused */ +#endif /* CCP_SUPPORT */ + +#if PPP_IDLETIMELIMIT +int get_idle_time(ppp_pcb *pcb, struct ppp_idle *ip); +#endif /* PPP_IDLETIMELIMIT */ + +#if DEMAND_SUPPORT +int get_loop_output(void); +#endif /* DEMAND_SUPPORT */ + +/* Optional protocol names list, to make our messages a little more informative. */ +#if PPP_PROTOCOLNAME +const char * protocol_name(int proto); +#endif /* PPP_PROTOCOLNAME */ + +/* Optional stats support, to get some statistics on the PPP interface */ +#if PPP_STATS_SUPPORT +void print_link_stats(void); /* Print stats, if available */ +void reset_link_stats(int u); /* Reset (init) stats when link goes up */ +void update_link_stats(int u); /* Get stats at link termination */ +#endif /* PPP_STATS_SUPPORT */ + + + +/* + * Inline versions of get/put char/short/long. + * Pointer is advanced; we assume that both arguments + * are lvalues and will already be in registers. + * cp MUST be u_char *. + */ +#define GETCHAR(c, cp) { \ + (c) = *(cp)++; \ +} +#define PUTCHAR(c, cp) { \ + *(cp)++ = (u_char) (c); \ +} +#define GETSHORT(s, cp) { \ + (s) = *(cp)++ << 8; \ + (s) |= *(cp)++; \ +} +#define PUTSHORT(s, cp) { \ + *(cp)++ = (u_char) ((s) >> 8); \ + *(cp)++ = (u_char) (s); \ +} +#define GETLONG(l, cp) { \ + (l) = *(cp)++ << 8; \ + (l) |= *(cp)++; (l) <<= 8; \ + (l) |= *(cp)++; (l) <<= 8; \ + (l) |= *(cp)++; \ +} +#define PUTLONG(l, cp) { \ + *(cp)++ = (u_char) ((l) >> 24); \ + *(cp)++ = (u_char) ((l) >> 16); \ + *(cp)++ = (u_char) ((l) >> 8); \ + *(cp)++ = (u_char) (l); \ +} + +#define INCPTR(n, cp) ((cp) += (n)) +#define DECPTR(n, cp) ((cp) -= (n)) + +/* + * System dependent definitions for user-level 4.3BSD UNIX implementation. + */ +#define TIMEOUT(f, a, t) do { sys_untimeout((f), (a)); sys_timeout((t)*1000, (f), (a)); } while(0) +#define TIMEOUTMS(f, a, t) do { sys_untimeout((f), (a)); sys_timeout((t), (f), (a)); } while(0) +#define UNTIMEOUT(f, a) sys_untimeout((f), (a)) + +#define BZERO(s, n) memset(s, 0, n) +#define BCMP(s1, s2, l) memcmp(s1, s2, l) + +#define PRINTMSG(m, l) { ppp_info("Remote message: %0.*v", l, m); } + +/* + * MAKEHEADER - Add Header fields to a packet. + */ +#define MAKEHEADER(p, t) { \ + PUTCHAR(PPP_ALLSTATIONS, p); \ + PUTCHAR(PPP_UI, p); \ + PUTSHORT(t, p); } + +/* Procedures exported from auth.c */ +void link_required(ppp_pcb *pcb); /* we are starting to use the link */ +void link_terminated(ppp_pcb *pcb); /* we are finished with the link */ +void link_down(ppp_pcb *pcb); /* the LCP layer has left the Opened state */ +void upper_layers_down(ppp_pcb *pcb); /* take all NCPs down */ +void link_established(ppp_pcb *pcb); /* the link is up; authenticate now */ +void start_networks(ppp_pcb *pcb); /* start all the network control protos */ +void continue_networks(ppp_pcb *pcb); /* start network [ip, etc] control protos */ +#if PPP_AUTH_SUPPORT +#if PPP_SERVER +int auth_check_passwd(ppp_pcb *pcb, char *auser, int userlen, char *apasswd, int passwdlen, const char **msg, int *msglen); + /* check the user name and passwd against configuration */ +void auth_peer_fail(ppp_pcb *pcb, int protocol); + /* peer failed to authenticate itself */ +void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char *name, int namelen); + /* peer successfully authenticated itself */ +#endif /* PPP_SERVER */ +void auth_withpeer_fail(ppp_pcb *pcb, int protocol); + /* we failed to authenticate ourselves */ +void auth_withpeer_success(ppp_pcb *pcb, int protocol, int prot_flavor); + /* we successfully authenticated ourselves */ +#endif /* PPP_AUTH_SUPPORT */ +void np_up(ppp_pcb *pcb, int proto); /* a network protocol has come up */ +void np_down(ppp_pcb *pcb, int proto); /* a network protocol has gone down */ +void np_finished(ppp_pcb *pcb, int proto); /* a network protocol no longer needs link */ +#if PPP_AUTH_SUPPORT +int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secret, int *secret_len, int am_server); + /* get "secret" for chap */ +#endif /* PPP_AUTH_SUPPORT */ + +/* Procedures exported from ipcp.c */ +/* int parse_dotted_ip (char *, u32_t *); */ + +/* Procedures exported from demand.c */ +#if DEMAND_SUPPORT +void demand_conf (void); /* config interface(s) for demand-dial */ +void demand_block (void); /* set all NPs to queue up packets */ +void demand_unblock (void); /* set all NPs to pass packets */ +void demand_discard (void); /* set all NPs to discard packets */ +void demand_rexmit (int, u32_t); /* retransmit saved frames for an NP*/ +int loop_chars (unsigned char *, int); /* process chars from loopback */ +int loop_frame (unsigned char *, int); /* should we bring link up? */ +#endif /* DEMAND_SUPPORT */ + +/* Procedures exported from multilink.c */ +#ifdef HAVE_MULTILINK +void mp_check_options (void); /* Check multilink-related options */ +int mp_join_bundle (void); /* join our link to an appropriate bundle */ +void mp_exit_bundle (void); /* have disconnected our link from bundle */ +void mp_bundle_terminated (void); +char *epdisc_to_str (struct epdisc *); /* string from endpoint discrim. */ +int str_to_epdisc (struct epdisc *, char *); /* endpt disc. from str */ +#else +#define mp_bundle_terminated() /* nothing */ +#define mp_exit_bundle() /* nothing */ +#define doing_multilink 0 +#define multilink_master 0 +#endif + +/* Procedures exported from utils.c. */ +void ppp_print_string(const u_char *p, int len, void (*printer) (void *, const char *, ...), void *arg); /* Format a string for output */ +int ppp_slprintf(char *buf, int buflen, const char *fmt, ...); /* sprintf++ */ +int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args); /* vsprintf++ */ +size_t ppp_strlcpy(char *dest, const char *src, size_t len); /* safe strcpy */ +size_t ppp_strlcat(char *dest, const char *src, size_t len); /* safe strncpy */ +void ppp_dbglog(const char *fmt, ...); /* log a debug message */ +void ppp_info(const char *fmt, ...); /* log an informational message */ +void ppp_notice(const char *fmt, ...); /* log a notice-level message */ +void ppp_warn(const char *fmt, ...); /* log a warning message */ +void ppp_error(const char *fmt, ...); /* log an error message */ +void ppp_fatal(const char *fmt, ...); /* log an error message and die(1) */ +#if PRINTPKT_SUPPORT +void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len); + /* dump packet to debug log if interesting */ +#endif /* PRINTPKT_SUPPORT */ + + +#endif /* PPP_SUPPORT */ +#endif /* LWIP_HDR_PPP_IMPL_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_opts.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_opts.h index fa79c09..38e60d7 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_opts.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/ppp_opts.h @@ -1,593 +1,593 @@ -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#ifndef LWIP_PPP_OPTS_H -#define LWIP_PPP_OPTS_H - -#include "lwip/opt.h" - -/** - * PPP_SUPPORT==1: Enable PPP. - */ -#ifndef PPP_SUPPORT -#define PPP_SUPPORT 0 -#endif - -/** - * PPPOE_SUPPORT==1: Enable PPP Over Ethernet - */ -#ifndef PPPOE_SUPPORT -#define PPPOE_SUPPORT 0 -#endif - -/** - * PPPOL2TP_SUPPORT==1: Enable PPP Over L2TP - */ -#ifndef PPPOL2TP_SUPPORT -#define PPPOL2TP_SUPPORT 0 -#endif - -/** - * PPPOL2TP_AUTH_SUPPORT==1: Enable PPP Over L2TP Auth (enable MD5 support) - */ -#ifndef PPPOL2TP_AUTH_SUPPORT -#define PPPOL2TP_AUTH_SUPPORT PPPOL2TP_SUPPORT -#endif - -/** - * PPPOS_SUPPORT==1: Enable PPP Over Serial - */ -#ifndef PPPOS_SUPPORT -#define PPPOS_SUPPORT PPP_SUPPORT -#endif - -/** - * LWIP_PPP_API==1: Enable PPP API (in pppapi.c) - */ -#ifndef LWIP_PPP_API -#define LWIP_PPP_API (PPP_SUPPORT && (NO_SYS == 0)) -#endif - -/** - * MEMP_NUM_PPP_PCB: the number of simultaneously active PPP - * connections (requires the PPP_SUPPORT option) - */ -#ifndef MEMP_NUM_PPP_PCB -#define MEMP_NUM_PPP_PCB 1 -#endif - -#if PPP_SUPPORT - -/** - * MEMP_NUM_PPPOS_INTERFACES: the number of concurrently active PPPoS - * interfaces (only used with PPPOS_SUPPORT==1) - */ -#ifndef MEMP_NUM_PPPOS_INTERFACES -#define MEMP_NUM_PPPOS_INTERFACES MEMP_NUM_PPP_PCB -#endif - -/** - * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE - * interfaces (only used with PPPOE_SUPPORT==1) - */ -#ifndef MEMP_NUM_PPPOE_INTERFACES -#define MEMP_NUM_PPPOE_INTERFACES 1 -#endif - -/** - * MEMP_NUM_PPPOL2TP_INTERFACES: the number of concurrently active PPPoL2TP - * interfaces (only used with PPPOL2TP_SUPPORT==1) - */ -#ifndef MEMP_NUM_PPPOL2TP_INTERFACES -#define MEMP_NUM_PPPOL2TP_INTERFACES 1 -#endif - -/** - * MEMP_NUM_PPP_API_MSG: Number of concurrent PPP API messages (in pppapi.c) - */ -#ifndef MEMP_NUM_PPP_API_MSG -#define MEMP_NUM_PPP_API_MSG 5 -#endif - -/** - * PPP_DEBUG: Enable debugging for PPP. - */ -#ifndef PPP_DEBUG -#define PPP_DEBUG LWIP_DBG_OFF -#endif - -/** - * PPP_INPROC_IRQ_SAFE==1 call pppos_input() using tcpip_callback(). - * - * Please read the "PPPoS input path" chapter in the PPP documentation about this option. - */ -#ifndef PPP_INPROC_IRQ_SAFE -#define PPP_INPROC_IRQ_SAFE 0 -#endif - -/** - * PRINTPKT_SUPPORT==1: Enable PPP print packet support - * - * Mandatory for debugging, it displays exchanged packet content in debug trace. - */ -#ifndef PRINTPKT_SUPPORT -#define PRINTPKT_SUPPORT 0 -#endif - -/** - * PPP_IPV4_SUPPORT==1: Enable PPP IPv4 support - */ -#ifndef PPP_IPV4_SUPPORT -#define PPP_IPV4_SUPPORT (LWIP_IPV4) -#endif - -/** - * PPP_IPV6_SUPPORT==1: Enable PPP IPv6 support - */ -#ifndef PPP_IPV6_SUPPORT -#define PPP_IPV6_SUPPORT (LWIP_IPV6) -#endif - -/** - * PPP_NOTIFY_PHASE==1: Support PPP notify phase support - * - * PPP notify phase support allows you to set a callback which is - * called on change of the internal PPP state machine. - * - * This can be used for example to set a LED pattern depending on the - * current phase of the PPP session. - */ -#ifndef PPP_NOTIFY_PHASE -#define PPP_NOTIFY_PHASE 0 -#endif - -/** - * pbuf_type PPP is using for LCP, PAP, CHAP, EAP, CCP, IPCP and IP6CP packets. - * - * Memory allocated must be single buffered for PPP to works, it requires pbuf - * that are not going to be chained when allocated. This requires setting - * PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems. - * - * Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where continuous - * buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE. - */ -#ifndef PPP_USE_PBUF_RAM -#define PPP_USE_PBUF_RAM 0 -#endif - -/** - * PPP_FCS_TABLE: Keep a 256*2 byte table to speed up FCS calculation for PPPoS - */ -#ifndef PPP_FCS_TABLE -#define PPP_FCS_TABLE 1 -#endif - -/** - * PAP_SUPPORT==1: Support PAP. - */ -#ifndef PAP_SUPPORT -#define PAP_SUPPORT 0 -#endif - -/** - * CHAP_SUPPORT==1: Support CHAP. - */ -#ifndef CHAP_SUPPORT -#define CHAP_SUPPORT 0 -#endif - -/** - * MSCHAP_SUPPORT==1: Support MSCHAP. - */ -#ifndef MSCHAP_SUPPORT -#define MSCHAP_SUPPORT 0 -#endif -#if MSCHAP_SUPPORT -/* MSCHAP requires CHAP support */ -#undef CHAP_SUPPORT -#define CHAP_SUPPORT 1 -#endif /* MSCHAP_SUPPORT */ - -/** - * EAP_SUPPORT==1: Support EAP. - */ -#ifndef EAP_SUPPORT -#define EAP_SUPPORT 0 -#endif - -/** - * CCP_SUPPORT==1: Support CCP. - */ -#ifndef CCP_SUPPORT -#define CCP_SUPPORT 0 -#endif - -/** - * MPPE_SUPPORT==1: Support MPPE. - */ -#ifndef MPPE_SUPPORT -#define MPPE_SUPPORT 0 -#endif -#if MPPE_SUPPORT -/* MPPE requires CCP support */ -#undef CCP_SUPPORT -#define CCP_SUPPORT 1 -/* MPPE requires MSCHAP support */ -#undef MSCHAP_SUPPORT -#define MSCHAP_SUPPORT 1 -/* MSCHAP requires CHAP support */ -#undef CHAP_SUPPORT -#define CHAP_SUPPORT 1 -#endif /* MPPE_SUPPORT */ - -/** - * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! - */ -#ifndef CBCP_SUPPORT -#define CBCP_SUPPORT 0 -#endif - -/** - * ECP_SUPPORT==1: Support ECP. CURRENTLY NOT SUPPORTED! DO NOT SET! - */ -#ifndef ECP_SUPPORT -#define ECP_SUPPORT 0 -#endif - -/** - * DEMAND_SUPPORT==1: Support dial on demand. CURRENTLY NOT SUPPORTED! DO NOT SET! - */ -#ifndef DEMAND_SUPPORT -#define DEMAND_SUPPORT 0 -#endif - -/** - * LQR_SUPPORT==1: Support Link Quality Report. Do nothing except exchanging some LCP packets. - */ -#ifndef LQR_SUPPORT -#define LQR_SUPPORT 0 -#endif - -/** - * PPP_SERVER==1: Enable PPP server support (waiting for incoming PPP session). - * - * Currently only supported for PPPoS. - */ -#ifndef PPP_SERVER -#define PPP_SERVER 0 -#endif - -#if PPP_SERVER -/* - * PPP_OUR_NAME: Our name for authentication purposes - */ -#ifndef PPP_OUR_NAME -#define PPP_OUR_NAME "lwIP" -#endif -#endif /* PPP_SERVER */ - -/** - * VJ_SUPPORT==1: Support VJ header compression. - */ -#ifndef VJ_SUPPORT -#define VJ_SUPPORT 1 -#endif -/* VJ compression is only supported for TCP over IPv4 over PPPoS. */ -#if !PPPOS_SUPPORT || !PPP_IPV4_SUPPORT || !LWIP_TCP -#undef VJ_SUPPORT -#define VJ_SUPPORT 0 -#endif /* !PPPOS_SUPPORT */ - -/** - * PPP_MD5_RANDM==1: Use MD5 for better randomness. - * Enabled by default if CHAP, EAP, or L2TP AUTH support is enabled. - */ -#ifndef PPP_MD5_RANDM -#define PPP_MD5_RANDM (CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT) -#endif - -/** - * PolarSSL embedded library - * - * - * lwIP contains some files fetched from the latest BSD release of - * the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption - * methods we need for lwIP PPP support. - * - * The PolarSSL files were cleaned to contain only the necessary struct - * fields and functions needed for lwIP. - * - * The PolarSSL API was not changed at all, so if you are already using - * PolarSSL you can choose to skip the compilation of the included PolarSSL - * library into lwIP. - * - * If you are not using the embedded copy you must include external - * libraries into your arch/cc.h port file. - * - * Beware of the stack requirements which can be a lot larger if you are not - * using our cleaned PolarSSL library. - */ - -/** - * LWIP_USE_EXTERNAL_POLARSSL: Use external PolarSSL library - */ -#ifndef LWIP_USE_EXTERNAL_POLARSSL -#define LWIP_USE_EXTERNAL_POLARSSL 0 -#endif - -/** - * LWIP_USE_EXTERNAL_MBEDTLS: Use external mbed TLS library - */ -#ifndef LWIP_USE_EXTERNAL_MBEDTLS -#define LWIP_USE_EXTERNAL_MBEDTLS 0 -#endif - -/* - * PPP Timeouts - */ - -/** - * FSM_DEFTIMEOUT: Timeout time in seconds - */ -#ifndef FSM_DEFTIMEOUT -#define FSM_DEFTIMEOUT 6 -#endif - -/** - * FSM_DEFMAXTERMREQS: Maximum Terminate-Request transmissions - */ -#ifndef FSM_DEFMAXTERMREQS -#define FSM_DEFMAXTERMREQS 2 -#endif - -/** - * FSM_DEFMAXCONFREQS: Maximum Configure-Request transmissions - */ -#ifndef FSM_DEFMAXCONFREQS -#define FSM_DEFMAXCONFREQS 10 -#endif - -/** - * FSM_DEFMAXNAKLOOPS: Maximum number of nak loops - */ -#ifndef FSM_DEFMAXNAKLOOPS -#define FSM_DEFMAXNAKLOOPS 5 -#endif - -/** - * UPAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req - */ -#ifndef UPAP_DEFTIMEOUT -#define UPAP_DEFTIMEOUT 6 -#endif - -/** - * UPAP_DEFTRANSMITS: Maximum number of auth-reqs to send - */ -#ifndef UPAP_DEFTRANSMITS -#define UPAP_DEFTRANSMITS 10 -#endif - -#if PPP_SERVER -/** - * UPAP_DEFREQTIME: Time to wait for auth-req from peer - */ -#ifndef UPAP_DEFREQTIME -#define UPAP_DEFREQTIME 30 -#endif -#endif /* PPP_SERVER */ - -/** - * CHAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req - */ -#ifndef CHAP_DEFTIMEOUT -#define CHAP_DEFTIMEOUT 6 -#endif - -/** - * CHAP_DEFTRANSMITS: max # times to send challenge - */ -#ifndef CHAP_DEFTRANSMITS -#define CHAP_DEFTRANSMITS 10 -#endif - -#if PPP_SERVER -/** - * CHAP_DEFRECHALLENGETIME: If this option is > 0, rechallenge the peer every n seconds - */ -#ifndef CHAP_DEFRECHALLENGETIME -#define CHAP_DEFRECHALLENGETIME 0 -#endif -#endif /* PPP_SERVER */ - -/** - * EAP_DEFREQTIME: Time to wait for peer request - */ -#ifndef EAP_DEFREQTIME -#define EAP_DEFREQTIME 6 -#endif - -/** - * EAP_DEFALLOWREQ: max # times to accept requests - */ -#ifndef EAP_DEFALLOWREQ -#define EAP_DEFALLOWREQ 10 -#endif - -#if PPP_SERVER -/** - * EAP_DEFTIMEOUT: Timeout (seconds) for rexmit - */ -#ifndef EAP_DEFTIMEOUT -#define EAP_DEFTIMEOUT 6 -#endif - -/** - * EAP_DEFTRANSMITS: max # times to transmit - */ -#ifndef EAP_DEFTRANSMITS -#define EAP_DEFTRANSMITS 10 -#endif -#endif /* PPP_SERVER */ - -/** - * LCP_DEFLOOPBACKFAIL: Default number of times we receive our magic number from the peer - * before deciding the link is looped-back. - */ -#ifndef LCP_DEFLOOPBACKFAIL -#define LCP_DEFLOOPBACKFAIL 10 -#endif - -/** - * LCP_ECHOINTERVAL: Interval in seconds between keepalive echo requests, 0 to disable. - */ -#ifndef LCP_ECHOINTERVAL -#define LCP_ECHOINTERVAL 0 -#endif - -/** - * LCP_MAXECHOFAILS: Number of unanswered echo requests before failure. - */ -#ifndef LCP_MAXECHOFAILS -#define LCP_MAXECHOFAILS 3 -#endif - -/** - * PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char. - */ -#ifndef PPP_MAXIDLEFLAG -#define PPP_MAXIDLEFLAG 100 -#endif - -/** - * PPP Packet sizes - */ - -/** - * PPP_MRU: Default MRU - */ -#ifndef PPP_MRU -#define PPP_MRU 1500 -#endif - -/** - * PPP_DEFMRU: Default MRU to try - */ -#ifndef PPP_DEFMRU -#define PPP_DEFMRU 1500 -#endif - -/** - * PPP_MAXMRU: Normally limit MRU to this (pppd default = 16384) - */ -#ifndef PPP_MAXMRU -#define PPP_MAXMRU 1500 -#endif - -/** - * PPP_MINMRU: No MRUs below this - */ -#ifndef PPP_MINMRU -#define PPP_MINMRU 128 -#endif - -/** - * PPPOL2TP_DEFMRU: Default MTU and MRU for L2TP - * Default = 1500 - PPPoE(6) - PPP Protocol(2) - IPv4 header(20) - UDP Header(8) - * - L2TP Header(6) - HDLC Header(2) - PPP Protocol(2) - MPPE Header(2) - PPP Protocol(2) - */ -#if PPPOL2TP_SUPPORT -#ifndef PPPOL2TP_DEFMRU -#define PPPOL2TP_DEFMRU 1450 -#endif -#endif /* PPPOL2TP_SUPPORT */ - -/** - * MAXNAMELEN: max length of hostname or name for auth - */ -#ifndef MAXNAMELEN -#define MAXNAMELEN 256 -#endif - -/** - * MAXSECRETLEN: max length of password or secret - */ -#ifndef MAXSECRETLEN -#define MAXSECRETLEN 256 -#endif - -/* ------------------------------------------------------------------------- */ - -/* - * Build triggers for embedded PolarSSL - */ -#if !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS - -/* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */ -#if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM -#define LWIP_INCLUDED_POLARSSL_MD5 1 -#endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */ - -#if MSCHAP_SUPPORT - -/* MSCHAP require MD4 support */ -#define LWIP_INCLUDED_POLARSSL_MD4 1 -/* MSCHAP require SHA1 support */ -#define LWIP_INCLUDED_POLARSSL_SHA1 1 -/* MSCHAP require DES support */ -#define LWIP_INCLUDED_POLARSSL_DES 1 - -/* MS-CHAP support is required for MPPE */ -#if MPPE_SUPPORT -/* MPPE require ARC4 support */ -#define LWIP_INCLUDED_POLARSSL_ARC4 1 -#endif /* MPPE_SUPPORT */ - -#endif /* MSCHAP_SUPPORT */ - -#endif /* !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS */ - -/* Default value if unset */ -#ifndef LWIP_INCLUDED_POLARSSL_MD4 -#define LWIP_INCLUDED_POLARSSL_MD4 0 -#endif /* LWIP_INCLUDED_POLARSSL_MD4 */ -#ifndef LWIP_INCLUDED_POLARSSL_MD5 -#define LWIP_INCLUDED_POLARSSL_MD5 0 -#endif /* LWIP_INCLUDED_POLARSSL_MD5 */ -#ifndef LWIP_INCLUDED_POLARSSL_SHA1 -#define LWIP_INCLUDED_POLARSSL_SHA1 0 -#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */ -#ifndef LWIP_INCLUDED_POLARSSL_DES -#define LWIP_INCLUDED_POLARSSL_DES 0 -#endif /* LWIP_INCLUDED_POLARSSL_DES */ -#ifndef LWIP_INCLUDED_POLARSSL_ARC4 -#define LWIP_INCLUDED_POLARSSL_ARC4 0 -#endif /* LWIP_INCLUDED_POLARSSL_ARC4 */ - -#endif /* PPP_SUPPORT */ - -#endif /* LWIP_PPP_OPTS_H */ +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#ifndef LWIP_PPP_OPTS_H +#define LWIP_PPP_OPTS_H + +#include "lwip/opt.h" + +/** + * PPP_SUPPORT==1: Enable PPP. + */ +#ifndef PPP_SUPPORT +#define PPP_SUPPORT 0 +#endif + +/** + * PPPOE_SUPPORT==1: Enable PPP Over Ethernet + */ +#ifndef PPPOE_SUPPORT +#define PPPOE_SUPPORT 0 +#endif + +/** + * PPPOL2TP_SUPPORT==1: Enable PPP Over L2TP + */ +#ifndef PPPOL2TP_SUPPORT +#define PPPOL2TP_SUPPORT 0 +#endif + +/** + * PPPOL2TP_AUTH_SUPPORT==1: Enable PPP Over L2TP Auth (enable MD5 support) + */ +#ifndef PPPOL2TP_AUTH_SUPPORT +#define PPPOL2TP_AUTH_SUPPORT PPPOL2TP_SUPPORT +#endif + +/** + * PPPOS_SUPPORT==1: Enable PPP Over Serial + */ +#ifndef PPPOS_SUPPORT +#define PPPOS_SUPPORT PPP_SUPPORT +#endif + +/** + * LWIP_PPP_API==1: Enable PPP API (in pppapi.c) + */ +#ifndef LWIP_PPP_API +#define LWIP_PPP_API (PPP_SUPPORT && (NO_SYS == 0)) +#endif + +/** + * MEMP_NUM_PPP_PCB: the number of simultaneously active PPP + * connections (requires the PPP_SUPPORT option) + */ +#ifndef MEMP_NUM_PPP_PCB +#define MEMP_NUM_PPP_PCB 1 +#endif + +#if PPP_SUPPORT + +/** + * MEMP_NUM_PPPOS_INTERFACES: the number of concurrently active PPPoS + * interfaces (only used with PPPOS_SUPPORT==1) + */ +#ifndef MEMP_NUM_PPPOS_INTERFACES +#define MEMP_NUM_PPPOS_INTERFACES MEMP_NUM_PPP_PCB +#endif + +/** + * MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE + * interfaces (only used with PPPOE_SUPPORT==1) + */ +#ifndef MEMP_NUM_PPPOE_INTERFACES +#define MEMP_NUM_PPPOE_INTERFACES 1 +#endif + +/** + * MEMP_NUM_PPPOL2TP_INTERFACES: the number of concurrently active PPPoL2TP + * interfaces (only used with PPPOL2TP_SUPPORT==1) + */ +#ifndef MEMP_NUM_PPPOL2TP_INTERFACES +#define MEMP_NUM_PPPOL2TP_INTERFACES 1 +#endif + +/** + * MEMP_NUM_PPP_API_MSG: Number of concurrent PPP API messages (in pppapi.c) + */ +#ifndef MEMP_NUM_PPP_API_MSG +#define MEMP_NUM_PPP_API_MSG 5 +#endif + +/** + * PPP_DEBUG: Enable debugging for PPP. + */ +#ifndef PPP_DEBUG +#define PPP_DEBUG LWIP_DBG_OFF +#endif + +/** + * PPP_INPROC_IRQ_SAFE==1 call pppos_input() using tcpip_callback(). + * + * Please read the "PPPoS input path" chapter in the PPP documentation about this option. + */ +#ifndef PPP_INPROC_IRQ_SAFE +#define PPP_INPROC_IRQ_SAFE 0 +#endif + +/** + * PRINTPKT_SUPPORT==1: Enable PPP print packet support + * + * Mandatory for debugging, it displays exchanged packet content in debug trace. + */ +#ifndef PRINTPKT_SUPPORT +#define PRINTPKT_SUPPORT 0 +#endif + +/** + * PPP_IPV4_SUPPORT==1: Enable PPP IPv4 support + */ +#ifndef PPP_IPV4_SUPPORT +#define PPP_IPV4_SUPPORT (LWIP_IPV4) +#endif + +/** + * PPP_IPV6_SUPPORT==1: Enable PPP IPv6 support + */ +#ifndef PPP_IPV6_SUPPORT +#define PPP_IPV6_SUPPORT (LWIP_IPV6) +#endif + +/** + * PPP_NOTIFY_PHASE==1: Support PPP notify phase support + * + * PPP notify phase support allows you to set a callback which is + * called on change of the internal PPP state machine. + * + * This can be used for example to set a LED pattern depending on the + * current phase of the PPP session. + */ +#ifndef PPP_NOTIFY_PHASE +#define PPP_NOTIFY_PHASE 0 +#endif + +/** + * pbuf_type PPP is using for LCP, PAP, CHAP, EAP, CCP, IPCP and IP6CP packets. + * + * Memory allocated must be single buffered for PPP to works, it requires pbuf + * that are not going to be chained when allocated. This requires setting + * PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small systems. + * + * Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where continuous + * buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE. + */ +#ifndef PPP_USE_PBUF_RAM +#define PPP_USE_PBUF_RAM 0 +#endif + +/** + * PPP_FCS_TABLE: Keep a 256*2 byte table to speed up FCS calculation for PPPoS + */ +#ifndef PPP_FCS_TABLE +#define PPP_FCS_TABLE 1 +#endif + +/** + * PAP_SUPPORT==1: Support PAP. + */ +#ifndef PAP_SUPPORT +#define PAP_SUPPORT 0 +#endif + +/** + * CHAP_SUPPORT==1: Support CHAP. + */ +#ifndef CHAP_SUPPORT +#define CHAP_SUPPORT 0 +#endif + +/** + * MSCHAP_SUPPORT==1: Support MSCHAP. + */ +#ifndef MSCHAP_SUPPORT +#define MSCHAP_SUPPORT 0 +#endif +#if MSCHAP_SUPPORT +/* MSCHAP requires CHAP support */ +#undef CHAP_SUPPORT +#define CHAP_SUPPORT 1 +#endif /* MSCHAP_SUPPORT */ + +/** + * EAP_SUPPORT==1: Support EAP. + */ +#ifndef EAP_SUPPORT +#define EAP_SUPPORT 0 +#endif + +/** + * CCP_SUPPORT==1: Support CCP. + */ +#ifndef CCP_SUPPORT +#define CCP_SUPPORT 0 +#endif + +/** + * MPPE_SUPPORT==1: Support MPPE. + */ +#ifndef MPPE_SUPPORT +#define MPPE_SUPPORT 0 +#endif +#if MPPE_SUPPORT +/* MPPE requires CCP support */ +#undef CCP_SUPPORT +#define CCP_SUPPORT 1 +/* MPPE requires MSCHAP support */ +#undef MSCHAP_SUPPORT +#define MSCHAP_SUPPORT 1 +/* MSCHAP requires CHAP support */ +#undef CHAP_SUPPORT +#define CHAP_SUPPORT 1 +#endif /* MPPE_SUPPORT */ + +/** + * CBCP_SUPPORT==1: Support CBCP. CURRENTLY NOT SUPPORTED! DO NOT SET! + */ +#ifndef CBCP_SUPPORT +#define CBCP_SUPPORT 0 +#endif + +/** + * ECP_SUPPORT==1: Support ECP. CURRENTLY NOT SUPPORTED! DO NOT SET! + */ +#ifndef ECP_SUPPORT +#define ECP_SUPPORT 0 +#endif + +/** + * DEMAND_SUPPORT==1: Support dial on demand. CURRENTLY NOT SUPPORTED! DO NOT SET! + */ +#ifndef DEMAND_SUPPORT +#define DEMAND_SUPPORT 0 +#endif + +/** + * LQR_SUPPORT==1: Support Link Quality Report. Do nothing except exchanging some LCP packets. + */ +#ifndef LQR_SUPPORT +#define LQR_SUPPORT 0 +#endif + +/** + * PPP_SERVER==1: Enable PPP server support (waiting for incoming PPP session). + * + * Currently only supported for PPPoS. + */ +#ifndef PPP_SERVER +#define PPP_SERVER 0 +#endif + +#if PPP_SERVER +/* + * PPP_OUR_NAME: Our name for authentication purposes + */ +#ifndef PPP_OUR_NAME +#define PPP_OUR_NAME "lwIP" +#endif +#endif /* PPP_SERVER */ + +/** + * VJ_SUPPORT==1: Support VJ header compression. + */ +#ifndef VJ_SUPPORT +#define VJ_SUPPORT 1 +#endif +/* VJ compression is only supported for TCP over IPv4 over PPPoS. */ +#if !PPPOS_SUPPORT || !PPP_IPV4_SUPPORT || !LWIP_TCP +#undef VJ_SUPPORT +#define VJ_SUPPORT 0 +#endif /* !PPPOS_SUPPORT */ + +/** + * PPP_MD5_RANDM==1: Use MD5 for better randomness. + * Enabled by default if CHAP, EAP, or L2TP AUTH support is enabled. + */ +#ifndef PPP_MD5_RANDM +#define PPP_MD5_RANDM (CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT) +#endif + +/** + * PolarSSL embedded library + * + * + * lwIP contains some files fetched from the latest BSD release of + * the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption + * methods we need for lwIP PPP support. + * + * The PolarSSL files were cleaned to contain only the necessary struct + * fields and functions needed for lwIP. + * + * The PolarSSL API was not changed at all, so if you are already using + * PolarSSL you can choose to skip the compilation of the included PolarSSL + * library into lwIP. + * + * If you are not using the embedded copy you must include external + * libraries into your arch/cc.h port file. + * + * Beware of the stack requirements which can be a lot larger if you are not + * using our cleaned PolarSSL library. + */ + +/** + * LWIP_USE_EXTERNAL_POLARSSL: Use external PolarSSL library + */ +#ifndef LWIP_USE_EXTERNAL_POLARSSL +#define LWIP_USE_EXTERNAL_POLARSSL 0 +#endif + +/** + * LWIP_USE_EXTERNAL_MBEDTLS: Use external mbed TLS library + */ +#ifndef LWIP_USE_EXTERNAL_MBEDTLS +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + +/* + * PPP Timeouts + */ + +/** + * FSM_DEFTIMEOUT: Timeout time in seconds + */ +#ifndef FSM_DEFTIMEOUT +#define FSM_DEFTIMEOUT 6 +#endif + +/** + * FSM_DEFMAXTERMREQS: Maximum Terminate-Request transmissions + */ +#ifndef FSM_DEFMAXTERMREQS +#define FSM_DEFMAXTERMREQS 2 +#endif + +/** + * FSM_DEFMAXCONFREQS: Maximum Configure-Request transmissions + */ +#ifndef FSM_DEFMAXCONFREQS +#define FSM_DEFMAXCONFREQS 10 +#endif + +/** + * FSM_DEFMAXNAKLOOPS: Maximum number of nak loops + */ +#ifndef FSM_DEFMAXNAKLOOPS +#define FSM_DEFMAXNAKLOOPS 5 +#endif + +/** + * UPAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req + */ +#ifndef UPAP_DEFTIMEOUT +#define UPAP_DEFTIMEOUT 6 +#endif + +/** + * UPAP_DEFTRANSMITS: Maximum number of auth-reqs to send + */ +#ifndef UPAP_DEFTRANSMITS +#define UPAP_DEFTRANSMITS 10 +#endif + +#if PPP_SERVER +/** + * UPAP_DEFREQTIME: Time to wait for auth-req from peer + */ +#ifndef UPAP_DEFREQTIME +#define UPAP_DEFREQTIME 30 +#endif +#endif /* PPP_SERVER */ + +/** + * CHAP_DEFTIMEOUT: Timeout (seconds) for retransmitting req + */ +#ifndef CHAP_DEFTIMEOUT +#define CHAP_DEFTIMEOUT 6 +#endif + +/** + * CHAP_DEFTRANSMITS: max # times to send challenge + */ +#ifndef CHAP_DEFTRANSMITS +#define CHAP_DEFTRANSMITS 10 +#endif + +#if PPP_SERVER +/** + * CHAP_DEFRECHALLENGETIME: If this option is > 0, rechallenge the peer every n seconds + */ +#ifndef CHAP_DEFRECHALLENGETIME +#define CHAP_DEFRECHALLENGETIME 0 +#endif +#endif /* PPP_SERVER */ + +/** + * EAP_DEFREQTIME: Time to wait for peer request + */ +#ifndef EAP_DEFREQTIME +#define EAP_DEFREQTIME 6 +#endif + +/** + * EAP_DEFALLOWREQ: max # times to accept requests + */ +#ifndef EAP_DEFALLOWREQ +#define EAP_DEFALLOWREQ 10 +#endif + +#if PPP_SERVER +/** + * EAP_DEFTIMEOUT: Timeout (seconds) for rexmit + */ +#ifndef EAP_DEFTIMEOUT +#define EAP_DEFTIMEOUT 6 +#endif + +/** + * EAP_DEFTRANSMITS: max # times to transmit + */ +#ifndef EAP_DEFTRANSMITS +#define EAP_DEFTRANSMITS 10 +#endif +#endif /* PPP_SERVER */ + +/** + * LCP_DEFLOOPBACKFAIL: Default number of times we receive our magic number from the peer + * before deciding the link is looped-back. + */ +#ifndef LCP_DEFLOOPBACKFAIL +#define LCP_DEFLOOPBACKFAIL 10 +#endif + +/** + * LCP_ECHOINTERVAL: Interval in seconds between keepalive echo requests, 0 to disable. + */ +#ifndef LCP_ECHOINTERVAL +#define LCP_ECHOINTERVAL 0 +#endif + +/** + * LCP_MAXECHOFAILS: Number of unanswered echo requests before failure. + */ +#ifndef LCP_MAXECHOFAILS +#define LCP_MAXECHOFAILS 3 +#endif + +/** + * PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char. + */ +#ifndef PPP_MAXIDLEFLAG +#define PPP_MAXIDLEFLAG 100 +#endif + +/** + * PPP Packet sizes + */ + +/** + * PPP_MRU: Default MRU + */ +#ifndef PPP_MRU +#define PPP_MRU 1500 +#endif + +/** + * PPP_DEFMRU: Default MRU to try + */ +#ifndef PPP_DEFMRU +#define PPP_DEFMRU 1500 +#endif + +/** + * PPP_MAXMRU: Normally limit MRU to this (pppd default = 16384) + */ +#ifndef PPP_MAXMRU +#define PPP_MAXMRU 1500 +#endif + +/** + * PPP_MINMRU: No MRUs below this + */ +#ifndef PPP_MINMRU +#define PPP_MINMRU 128 +#endif + +/** + * PPPOL2TP_DEFMRU: Default MTU and MRU for L2TP + * Default = 1500 - PPPoE(6) - PPP Protocol(2) - IPv4 header(20) - UDP Header(8) + * - L2TP Header(6) - HDLC Header(2) - PPP Protocol(2) - MPPE Header(2) - PPP Protocol(2) + */ +#if PPPOL2TP_SUPPORT +#ifndef PPPOL2TP_DEFMRU +#define PPPOL2TP_DEFMRU 1450 +#endif +#endif /* PPPOL2TP_SUPPORT */ + +/** + * MAXNAMELEN: max length of hostname or name for auth + */ +#ifndef MAXNAMELEN +#define MAXNAMELEN 256 +#endif + +/** + * MAXSECRETLEN: max length of password or secret + */ +#ifndef MAXSECRETLEN +#define MAXSECRETLEN 256 +#endif + +/* ------------------------------------------------------------------------- */ + +/* + * Build triggers for embedded PolarSSL + */ +#if !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS + +/* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */ +#if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM +#define LWIP_INCLUDED_POLARSSL_MD5 1 +#endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */ + +#if MSCHAP_SUPPORT + +/* MSCHAP require MD4 support */ +#define LWIP_INCLUDED_POLARSSL_MD4 1 +/* MSCHAP require SHA1 support */ +#define LWIP_INCLUDED_POLARSSL_SHA1 1 +/* MSCHAP require DES support */ +#define LWIP_INCLUDED_POLARSSL_DES 1 + +/* MS-CHAP support is required for MPPE */ +#if MPPE_SUPPORT +/* MPPE require ARC4 support */ +#define LWIP_INCLUDED_POLARSSL_ARC4 1 +#endif /* MPPE_SUPPORT */ + +#endif /* MSCHAP_SUPPORT */ + +#endif /* !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS */ + +/* Default value if unset */ +#ifndef LWIP_INCLUDED_POLARSSL_MD4 +#define LWIP_INCLUDED_POLARSSL_MD4 0 +#endif /* LWIP_INCLUDED_POLARSSL_MD4 */ +#ifndef LWIP_INCLUDED_POLARSSL_MD5 +#define LWIP_INCLUDED_POLARSSL_MD5 0 +#endif /* LWIP_INCLUDED_POLARSSL_MD5 */ +#ifndef LWIP_INCLUDED_POLARSSL_SHA1 +#define LWIP_INCLUDED_POLARSSL_SHA1 0 +#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */ +#ifndef LWIP_INCLUDED_POLARSSL_DES +#define LWIP_INCLUDED_POLARSSL_DES 0 +#endif /* LWIP_INCLUDED_POLARSSL_DES */ +#ifndef LWIP_INCLUDED_POLARSSL_ARC4 +#define LWIP_INCLUDED_POLARSSL_ARC4 0 +#endif /* LWIP_INCLUDED_POLARSSL_ARC4 */ + +#endif /* PPP_SUPPORT */ + +#endif /* LWIP_PPP_OPTS_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppapi.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppapi.h index 913d93f..70c262a 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppapi.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppapi.h @@ -1,137 +1,137 @@ -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#ifndef LWIP_PPPAPI_H -#define LWIP_PPPAPI_H - -#include "netif/ppp/ppp_opts.h" - -#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/sys.h" -#include "lwip/netif.h" -#include "lwip/priv/tcpip_priv.h" -#include "netif/ppp/ppp.h" -#if PPPOS_SUPPORT -#include "netif/ppp/pppos.h" -#endif /* PPPOS_SUPPORT */ - -#ifdef __cplusplus -extern "C" { -#endif - -struct pppapi_msg_msg { - ppp_pcb *ppp; - union { -#if PPP_NOTIFY_PHASE - struct { - ppp_notify_phase_cb_fn notify_phase_cb; - } setnotifyphasecb; -#endif /* PPP_NOTIFY_PHASE */ -#if PPPOS_SUPPORT - struct { - struct netif *pppif; - pppos_output_cb_fn output_cb; - ppp_link_status_cb_fn link_status_cb; - void *ctx_cb; - } serialcreate; -#endif /* PPPOS_SUPPORT */ -#if PPPOE_SUPPORT - struct { - struct netif *pppif; - struct netif *ethif; - const char *service_name; - const char *concentrator_name; - ppp_link_status_cb_fn link_status_cb; - void *ctx_cb; - } ethernetcreate; -#endif /* PPPOE_SUPPORT */ -#if PPPOL2TP_SUPPORT - struct { - struct netif *pppif; - struct netif *netif; - API_MSG_M_DEF_C(ip_addr_t, ipaddr); - u16_t port; -#if PPPOL2TP_AUTH_SUPPORT - const u8_t *secret; - u8_t secret_len; -#endif /* PPPOL2TP_AUTH_SUPPORT */ - ppp_link_status_cb_fn link_status_cb; - void *ctx_cb; - } l2tpcreate; -#endif /* PPPOL2TP_SUPPORT */ - struct { - u16_t holdoff; - } connect; - struct { - u8_t nocarrier; - } close; - struct { - u8_t cmd; - void *arg; - } ioctl; - } msg; -}; - -struct pppapi_msg { - struct tcpip_api_call_data call; - struct pppapi_msg_msg msg; -}; - -/* API for application */ -err_t pppapi_set_default(ppp_pcb *pcb); -#if PPP_NOTIFY_PHASE -err_t pppapi_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb); -#endif /* PPP_NOTIFY_PHASE */ -#if PPPOS_SUPPORT -ppp_pcb *pppapi_pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, ppp_link_status_cb_fn link_status_cb, void *ctx_cb); -#endif /* PPPOS_SUPPORT */ -#if PPPOE_SUPPORT -ppp_pcb *pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const char *service_name, - const char *concentrator_name, ppp_link_status_cb_fn link_status_cb, - void *ctx_cb); -#endif /* PPPOE_SUPPORT */ -#if PPPOL2TP_SUPPORT -ppp_pcb *pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip_addr_t *ipaddr, u16_t port, - const u8_t *secret, u8_t secret_len, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb); -#endif /* PPPOL2TP_SUPPORT */ -err_t pppapi_connect(ppp_pcb *pcb, u16_t holdoff); -#if PPP_SERVER -err_t pppapi_listen(ppp_pcb *pcb); -#endif /* PPP_SERVER */ -err_t pppapi_close(ppp_pcb *pcb, u8_t nocarrier); -err_t pppapi_free(ppp_pcb *pcb); -err_t pppapi_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg); - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_PPP_API */ - -#endif /* LWIP_PPPAPI_H */ +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#ifndef LWIP_PPPAPI_H +#define LWIP_PPPAPI_H + +#include "netif/ppp/ppp_opts.h" + +#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/sys.h" +#include "lwip/netif.h" +#include "lwip/priv/tcpip_priv.h" +#include "netif/ppp/ppp.h" +#if PPPOS_SUPPORT +#include "netif/ppp/pppos.h" +#endif /* PPPOS_SUPPORT */ + +#ifdef __cplusplus +extern "C" { +#endif + +struct pppapi_msg_msg { + ppp_pcb *ppp; + union { +#if PPP_NOTIFY_PHASE + struct { + ppp_notify_phase_cb_fn notify_phase_cb; + } setnotifyphasecb; +#endif /* PPP_NOTIFY_PHASE */ +#if PPPOS_SUPPORT + struct { + struct netif *pppif; + pppos_output_cb_fn output_cb; + ppp_link_status_cb_fn link_status_cb; + void *ctx_cb; + } serialcreate; +#endif /* PPPOS_SUPPORT */ +#if PPPOE_SUPPORT + struct { + struct netif *pppif; + struct netif *ethif; + const char *service_name; + const char *concentrator_name; + ppp_link_status_cb_fn link_status_cb; + void *ctx_cb; + } ethernetcreate; +#endif /* PPPOE_SUPPORT */ +#if PPPOL2TP_SUPPORT + struct { + struct netif *pppif; + struct netif *netif; + API_MSG_M_DEF_C(ip_addr_t, ipaddr); + u16_t port; +#if PPPOL2TP_AUTH_SUPPORT + const u8_t *secret; + u8_t secret_len; +#endif /* PPPOL2TP_AUTH_SUPPORT */ + ppp_link_status_cb_fn link_status_cb; + void *ctx_cb; + } l2tpcreate; +#endif /* PPPOL2TP_SUPPORT */ + struct { + u16_t holdoff; + } connect; + struct { + u8_t nocarrier; + } close; + struct { + u8_t cmd; + void *arg; + } ioctl; + } msg; +}; + +struct pppapi_msg { + struct tcpip_api_call_data call; + struct pppapi_msg_msg msg; +}; + +/* API for application */ +err_t pppapi_set_default(ppp_pcb *pcb); +#if PPP_NOTIFY_PHASE +err_t pppapi_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb); +#endif /* PPP_NOTIFY_PHASE */ +#if PPPOS_SUPPORT +ppp_pcb *pppapi_pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, ppp_link_status_cb_fn link_status_cb, void *ctx_cb); +#endif /* PPPOS_SUPPORT */ +#if PPPOE_SUPPORT +ppp_pcb *pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const char *service_name, + const char *concentrator_name, ppp_link_status_cb_fn link_status_cb, + void *ctx_cb); +#endif /* PPPOE_SUPPORT */ +#if PPPOL2TP_SUPPORT +ppp_pcb *pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip_addr_t *ipaddr, u16_t port, + const u8_t *secret, u8_t secret_len, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb); +#endif /* PPPOL2TP_SUPPORT */ +err_t pppapi_connect(ppp_pcb *pcb, u16_t holdoff); +#if PPP_SERVER +err_t pppapi_listen(ppp_pcb *pcb); +#endif /* PPP_SERVER */ +err_t pppapi_close(ppp_pcb *pcb, u8_t nocarrier); +err_t pppapi_free(ppp_pcb *pcb); +err_t pppapi_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg); + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_PPP_API */ + +#endif /* LWIP_PPPAPI_H */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppcrypt.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppcrypt.h index a7b2099..b6c574b 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppcrypt.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppcrypt.h @@ -1,136 +1,136 @@ -/* - * pppcrypt.c - PPP/DES linkage for MS-CHAP and EAP SRP-SHA1 - * - * Extracted from chap_ms.c by James Carlson. - * - * Copyright (c) 1995 Eric Rosenquist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -/* This header file is included in all PPP modules needing hashes and/or ciphers */ - -#ifndef PPPCRYPT_H -#define PPPCRYPT_H - -/* - * If included PolarSSL copy is not used, user is expected to include - * external libraries in arch/cc.h (which is included by lwip/arch.h). - */ -#include "lwip/arch.h" - -/* - * Map hashes and ciphers functions to PolarSSL - */ -#if !LWIP_USE_EXTERNAL_MBEDTLS - -#include "netif/ppp/polarssl/md4.h" -#define lwip_md4_context md4_context -#define lwip_md4_init(context) -#define lwip_md4_starts md4_starts -#define lwip_md4_update md4_update -#define lwip_md4_finish md4_finish -#define lwip_md4_free(context) - -#include "netif/ppp/polarssl/md5.h" -#define lwip_md5_context md5_context -#define lwip_md5_init(context) -#define lwip_md5_starts md5_starts -#define lwip_md5_update md5_update -#define lwip_md5_finish md5_finish -#define lwip_md5_free(context) - -#include "netif/ppp/polarssl/sha1.h" -#define lwip_sha1_context sha1_context -#define lwip_sha1_init(context) -#define lwip_sha1_starts sha1_starts -#define lwip_sha1_update sha1_update -#define lwip_sha1_finish sha1_finish -#define lwip_sha1_free(context) - -#include "netif/ppp/polarssl/des.h" -#define lwip_des_context des_context -#define lwip_des_init(context) -#define lwip_des_setkey_enc des_setkey_enc -#define lwip_des_crypt_ecb des_crypt_ecb -#define lwip_des_free(context) - -#include "netif/ppp/polarssl/arc4.h" -#define lwip_arc4_context arc4_context -#define lwip_arc4_init(context) -#define lwip_arc4_setup arc4_setup -#define lwip_arc4_crypt arc4_crypt -#define lwip_arc4_free(context) - -#endif /* !LWIP_USE_EXTERNAL_MBEDTLS */ - -/* - * Map hashes and ciphers functions to mbed TLS - */ -#if LWIP_USE_EXTERNAL_MBEDTLS - -#define lwip_md4_context mbedtls_md4_context -#define lwip_md4_init mbedtls_md4_init -#define lwip_md4_starts mbedtls_md4_starts -#define lwip_md4_update mbedtls_md4_update -#define lwip_md4_finish mbedtls_md4_finish -#define lwip_md4_free mbedtls_md4_free - -#define lwip_md5_context mbedtls_md5_context -#define lwip_md5_init mbedtls_md5_init -#define lwip_md5_starts mbedtls_md5_starts -#define lwip_md5_update mbedtls_md5_update -#define lwip_md5_finish mbedtls_md5_finish -#define lwip_md5_free mbedtls_md5_free - -#define lwip_sha1_context mbedtls_sha1_context -#define lwip_sha1_init mbedtls_sha1_init -#define lwip_sha1_starts mbedtls_sha1_starts -#define lwip_sha1_update mbedtls_sha1_update -#define lwip_sha1_finish mbedtls_sha1_finish -#define lwip_sha1_free mbedtls_sha1_free - -#define lwip_des_context mbedtls_des_context -#define lwip_des_init mbedtls_des_init -#define lwip_des_setkey_enc mbedtls_des_setkey_enc -#define lwip_des_crypt_ecb mbedtls_des_crypt_ecb -#define lwip_des_free mbedtls_des_free - -#define lwip_arc4_context mbedtls_arc4_context -#define lwip_arc4_init mbedtls_arc4_init -#define lwip_arc4_setup mbedtls_arc4_setup -#define lwip_arc4_crypt(context, buffer, length) mbedtls_arc4_crypt(context, length, buffer, buffer) -#define lwip_arc4_free mbedtls_arc4_free - -#endif /* LWIP_USE_EXTERNAL_MBEDTLS */ - -void pppcrypt_56_to_64_bit_key(u_char *key, u_char *des_key); - -#endif /* PPPCRYPT_H */ - -#endif /* PPP_SUPPORT */ +/* + * pppcrypt.c - PPP/DES linkage for MS-CHAP and EAP SRP-SHA1 + * + * Extracted from chap_ms.c by James Carlson. + * + * Copyright (c) 1995 Eric Rosenquist. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +/* This header file is included in all PPP modules needing hashes and/or ciphers */ + +#ifndef PPPCRYPT_H +#define PPPCRYPT_H + +/* + * If included PolarSSL copy is not used, user is expected to include + * external libraries in arch/cc.h (which is included by lwip/arch.h). + */ +#include "lwip/arch.h" + +/* + * Map hashes and ciphers functions to PolarSSL + */ +#if !LWIP_USE_EXTERNAL_MBEDTLS + +#include "netif/ppp/polarssl/md4.h" +#define lwip_md4_context md4_context +#define lwip_md4_init(context) +#define lwip_md4_starts md4_starts +#define lwip_md4_update md4_update +#define lwip_md4_finish md4_finish +#define lwip_md4_free(context) + +#include "netif/ppp/polarssl/md5.h" +#define lwip_md5_context md5_context +#define lwip_md5_init(context) +#define lwip_md5_starts md5_starts +#define lwip_md5_update md5_update +#define lwip_md5_finish md5_finish +#define lwip_md5_free(context) + +#include "netif/ppp/polarssl/sha1.h" +#define lwip_sha1_context sha1_context +#define lwip_sha1_init(context) +#define lwip_sha1_starts sha1_starts +#define lwip_sha1_update sha1_update +#define lwip_sha1_finish sha1_finish +#define lwip_sha1_free(context) + +#include "netif/ppp/polarssl/des.h" +#define lwip_des_context des_context +#define lwip_des_init(context) +#define lwip_des_setkey_enc des_setkey_enc +#define lwip_des_crypt_ecb des_crypt_ecb +#define lwip_des_free(context) + +#include "netif/ppp/polarssl/arc4.h" +#define lwip_arc4_context arc4_context +#define lwip_arc4_init(context) +#define lwip_arc4_setup arc4_setup +#define lwip_arc4_crypt arc4_crypt +#define lwip_arc4_free(context) + +#endif /* !LWIP_USE_EXTERNAL_MBEDTLS */ + +/* + * Map hashes and ciphers functions to mbed TLS + */ +#if LWIP_USE_EXTERNAL_MBEDTLS + +#define lwip_md4_context mbedtls_md4_context +#define lwip_md4_init mbedtls_md4_init +#define lwip_md4_starts mbedtls_md4_starts +#define lwip_md4_update mbedtls_md4_update +#define lwip_md4_finish mbedtls_md4_finish +#define lwip_md4_free mbedtls_md4_free + +#define lwip_md5_context mbedtls_md5_context +#define lwip_md5_init mbedtls_md5_init +#define lwip_md5_starts mbedtls_md5_starts +#define lwip_md5_update mbedtls_md5_update +#define lwip_md5_finish mbedtls_md5_finish +#define lwip_md5_free mbedtls_md5_free + +#define lwip_sha1_context mbedtls_sha1_context +#define lwip_sha1_init mbedtls_sha1_init +#define lwip_sha1_starts mbedtls_sha1_starts +#define lwip_sha1_update mbedtls_sha1_update +#define lwip_sha1_finish mbedtls_sha1_finish +#define lwip_sha1_free mbedtls_sha1_free + +#define lwip_des_context mbedtls_des_context +#define lwip_des_init mbedtls_des_init +#define lwip_des_setkey_enc mbedtls_des_setkey_enc +#define lwip_des_crypt_ecb mbedtls_des_crypt_ecb +#define lwip_des_free mbedtls_des_free + +#define lwip_arc4_context mbedtls_arc4_context +#define lwip_arc4_init mbedtls_arc4_init +#define lwip_arc4_setup mbedtls_arc4_setup +#define lwip_arc4_crypt(context, buffer, length) mbedtls_arc4_crypt(context, length, buffer, buffer) +#define lwip_arc4_free mbedtls_arc4_free + +#endif /* LWIP_USE_EXTERNAL_MBEDTLS */ + +void pppcrypt_56_to_64_bit_key(u_char *key, u_char *des_key); + +#endif /* PPPCRYPT_H */ + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppdebug.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppdebug.h index 7ead045..6a9fac6 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppdebug.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppdebug.h @@ -1,80 +1,80 @@ -/***************************************************************************** -* pppdebug.h - System debugging utilities. -* -* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. -* portions Copyright (c) 1998 Global Election Systems Inc. -* portions Copyright (c) 2001 by Cognizant Pty Ltd. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY (please don't use tabs!) -* -* 03-01-01 Marc Boucher -* Ported to lwIP. -* 98-07-29 Guy Lancaster , Global Election Systems Inc. -* Original. -* -***************************************************************************** -*/ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef PPPDEBUG_H -#define PPPDEBUG_H - -/* Trace levels. */ -#define LOG_CRITICAL (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) -#define LOG_ERR (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) -#define LOG_NOTICE (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING) -#define LOG_WARNING (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING) -#define LOG_INFO (PPP_DEBUG) -#define LOG_DETAIL (PPP_DEBUG) -#define LOG_DEBUG (PPP_DEBUG) - -#if PPP_DEBUG - -#define MAINDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define SYSDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define FSMDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define LCPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define IPCPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define IPV6CPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define UPAPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define CHAPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) -#define PPPDEBUG(a, b) LWIP_DEBUGF(a, b) - -#else /* PPP_DEBUG */ - -#define MAINDEBUG(a) -#define SYSDEBUG(a) -#define FSMDEBUG(a) -#define LCPDEBUG(a) -#define IPCPDEBUG(a) -#define IPV6CPDEBUG(a) -#define UPAPDEBUG(a) -#define CHAPDEBUG(a) -#define PPPDEBUG(a, b) - -#endif /* PPP_DEBUG */ - -#endif /* PPPDEBUG_H */ - -#endif /* PPP_SUPPORT */ +/***************************************************************************** +* pppdebug.h - System debugging utilities. +* +* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. +* portions Copyright (c) 1998 Global Election Systems Inc. +* portions Copyright (c) 2001 by Cognizant Pty Ltd. +* +* The authors hereby grant permission to use, copy, modify, distribute, +* and license this software and its documentation for any purpose, provided +* that existing copyright notices are retained in all copies and that this +* notice and the following disclaimer are included verbatim in any +* distributions. No written agreement, license, or royalty fee is required +* for any of the authorized uses. +* +* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +****************************************************************************** +* REVISION HISTORY (please don't use tabs!) +* +* 03-01-01 Marc Boucher +* Ported to lwIP. +* 98-07-29 Guy Lancaster , Global Election Systems Inc. +* Original. +* +***************************************************************************** +*/ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef PPPDEBUG_H +#define PPPDEBUG_H + +/* Trace levels. */ +#define LOG_CRITICAL (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) +#define LOG_ERR (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) +#define LOG_NOTICE (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define LOG_WARNING (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING) +#define LOG_INFO (PPP_DEBUG) +#define LOG_DETAIL (PPP_DEBUG) +#define LOG_DEBUG (PPP_DEBUG) + +#if PPP_DEBUG + +#define MAINDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define SYSDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define FSMDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define LCPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define IPCPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define IPV6CPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define UPAPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define CHAPDEBUG(a) LWIP_DEBUGF(LWIP_DBG_LEVEL_WARNING, a) +#define PPPDEBUG(a, b) LWIP_DEBUGF(a, b) + +#else /* PPP_DEBUG */ + +#define MAINDEBUG(a) +#define SYSDEBUG(a) +#define FSMDEBUG(a) +#define LCPDEBUG(a) +#define IPCPDEBUG(a) +#define IPV6CPDEBUG(a) +#define UPAPDEBUG(a) +#define CHAPDEBUG(a) +#define PPPDEBUG(a, b) + +#endif /* PPP_DEBUG */ + +#endif /* PPPDEBUG_H */ + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppoe.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppoe.h index 9f8f289..b0b2475 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppoe.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppoe.h @@ -1,179 +1,179 @@ -/***************************************************************************** -* pppoe.h - PPP Over Ethernet implementation for lwIP. -* -* Copyright (c) 2006 by Marc Boucher, Services Informatiques (MBSI) inc. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY -* -* 06-01-01 Marc Boucher -* Ported to lwIP. -*****************************************************************************/ - - - -/* based on NetBSD: if_pppoe.c,v 1.64 2006/01/31 23:50:15 martin Exp */ - -/*- - * Copyright (c) 2002 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Martin Husemann . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef PPP_OE_H -#define PPP_OE_H - -#include "ppp.h" -#include "lwip/etharp.h" - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct pppoehdr { - PACK_STRUCT_FLD_8(u8_t vertype); - PACK_STRUCT_FLD_8(u8_t code); - PACK_STRUCT_FIELD(u16_t session); - PACK_STRUCT_FIELD(u16_t plen); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct pppoetag { - PACK_STRUCT_FIELD(u16_t tag); - PACK_STRUCT_FIELD(u16_t len); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - - -#define PPPOE_STATE_INITIAL 0 -#define PPPOE_STATE_PADI_SENT 1 -#define PPPOE_STATE_PADR_SENT 2 -#define PPPOE_STATE_SESSION 3 -/* passive */ -#define PPPOE_STATE_PADO_SENT 1 - -#define PPPOE_HEADERLEN sizeof(struct pppoehdr) -#define PPPOE_VERTYPE 0x11 /* VER=1, TYPE = 1 */ - -#define PPPOE_TAG_EOL 0x0000 /* end of list */ -#define PPPOE_TAG_SNAME 0x0101 /* service name */ -#define PPPOE_TAG_ACNAME 0x0102 /* access concentrator name */ -#define PPPOE_TAG_HUNIQUE 0x0103 /* host unique */ -#define PPPOE_TAG_ACCOOKIE 0x0104 /* AC cookie */ -#define PPPOE_TAG_VENDOR 0x0105 /* vendor specific */ -#define PPPOE_TAG_RELAYSID 0x0110 /* relay session id */ -#define PPPOE_TAG_SNAME_ERR 0x0201 /* service name error */ -#define PPPOE_TAG_ACSYS_ERR 0x0202 /* AC system error */ -#define PPPOE_TAG_GENERIC_ERR 0x0203 /* gerneric error */ - -#define PPPOE_CODE_PADI 0x09 /* Active Discovery Initiation */ -#define PPPOE_CODE_PADO 0x07 /* Active Discovery Offer */ -#define PPPOE_CODE_PADR 0x19 /* Active Discovery Request */ -#define PPPOE_CODE_PADS 0x65 /* Active Discovery Session confirmation */ -#define PPPOE_CODE_PADT 0xA7 /* Active Discovery Terminate */ - -#ifndef PPPOE_MAX_AC_COOKIE_LEN -#define PPPOE_MAX_AC_COOKIE_LEN 64 -#endif - -struct pppoe_softc { - struct pppoe_softc *next; - struct netif *sc_ethif; /* ethernet interface we are using */ - ppp_pcb *pcb; /* PPP PCB */ - - struct eth_addr sc_dest; /* hardware address of concentrator */ - u16_t sc_session; /* PPPoE session id */ - u8_t sc_state; /* discovery phase or session connected */ - -#ifdef PPPOE_TODO - u8_t *sc_service_name; /* if != NULL: requested name of service */ - u8_t *sc_concentrator_name; /* if != NULL: requested concentrator id */ -#endif /* PPPOE_TODO */ - u8_t sc_ac_cookie[PPPOE_MAX_AC_COOKIE_LEN]; /* content of AC cookie we must echo back */ - u8_t sc_ac_cookie_len; /* length of cookie data */ -#ifdef PPPOE_SERVER - u8_t *sc_hunique; /* content of host unique we must echo back */ - u8_t sc_hunique_len; /* length of host unique */ -#endif - u8_t sc_padi_retried; /* number of PADI retries already done */ - u8_t sc_padr_retried; /* number of PADR retries already done */ -}; - - -#define pppoe_init() /* compatibility define, no initialization needed */ - -ppp_pcb *pppoe_create(struct netif *pppif, - struct netif *ethif, - const char *service_name, const char *concentrator_name, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb); - -/* - * Functions called from lwIP - * DO NOT CALL FROM lwIP USER APPLICATION. - */ -void pppoe_disc_input(struct netif *netif, struct pbuf *p); -void pppoe_data_input(struct netif *netif, struct pbuf *p); - -#endif /* PPP_OE_H */ - -#endif /* PPP_SUPPORT && PPPOE_SUPPORT */ +/***************************************************************************** +* pppoe.h - PPP Over Ethernet implementation for lwIP. +* +* Copyright (c) 2006 by Marc Boucher, Services Informatiques (MBSI) inc. +* +* The authors hereby grant permission to use, copy, modify, distribute, +* and license this software and its documentation for any purpose, provided +* that existing copyright notices are retained in all copies and that this +* notice and the following disclaimer are included verbatim in any +* distributions. No written agreement, license, or royalty fee is required +* for any of the authorized uses. +* +* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +****************************************************************************** +* REVISION HISTORY +* +* 06-01-01 Marc Boucher +* Ported to lwIP. +*****************************************************************************/ + + + +/* based on NetBSD: if_pppoe.c,v 1.64 2006/01/31 23:50:15 martin Exp */ + +/*- + * Copyright (c) 2002 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Martin Husemann . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef PPP_OE_H +#define PPP_OE_H + +#include "ppp.h" +#include "lwip/etharp.h" + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct pppoehdr { + PACK_STRUCT_FLD_8(u8_t vertype); + PACK_STRUCT_FLD_8(u8_t code); + PACK_STRUCT_FIELD(u16_t session); + PACK_STRUCT_FIELD(u16_t plen); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct pppoetag { + PACK_STRUCT_FIELD(u16_t tag); + PACK_STRUCT_FIELD(u16_t len); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + + +#define PPPOE_STATE_INITIAL 0 +#define PPPOE_STATE_PADI_SENT 1 +#define PPPOE_STATE_PADR_SENT 2 +#define PPPOE_STATE_SESSION 3 +/* passive */ +#define PPPOE_STATE_PADO_SENT 1 + +#define PPPOE_HEADERLEN sizeof(struct pppoehdr) +#define PPPOE_VERTYPE 0x11 /* VER=1, TYPE = 1 */ + +#define PPPOE_TAG_EOL 0x0000 /* end of list */ +#define PPPOE_TAG_SNAME 0x0101 /* service name */ +#define PPPOE_TAG_ACNAME 0x0102 /* access concentrator name */ +#define PPPOE_TAG_HUNIQUE 0x0103 /* host unique */ +#define PPPOE_TAG_ACCOOKIE 0x0104 /* AC cookie */ +#define PPPOE_TAG_VENDOR 0x0105 /* vendor specific */ +#define PPPOE_TAG_RELAYSID 0x0110 /* relay session id */ +#define PPPOE_TAG_SNAME_ERR 0x0201 /* service name error */ +#define PPPOE_TAG_ACSYS_ERR 0x0202 /* AC system error */ +#define PPPOE_TAG_GENERIC_ERR 0x0203 /* gerneric error */ + +#define PPPOE_CODE_PADI 0x09 /* Active Discovery Initiation */ +#define PPPOE_CODE_PADO 0x07 /* Active Discovery Offer */ +#define PPPOE_CODE_PADR 0x19 /* Active Discovery Request */ +#define PPPOE_CODE_PADS 0x65 /* Active Discovery Session confirmation */ +#define PPPOE_CODE_PADT 0xA7 /* Active Discovery Terminate */ + +#ifndef PPPOE_MAX_AC_COOKIE_LEN +#define PPPOE_MAX_AC_COOKIE_LEN 64 +#endif + +struct pppoe_softc { + struct pppoe_softc *next; + struct netif *sc_ethif; /* ethernet interface we are using */ + ppp_pcb *pcb; /* PPP PCB */ + + struct eth_addr sc_dest; /* hardware address of concentrator */ + u16_t sc_session; /* PPPoE session id */ + u8_t sc_state; /* discovery phase or session connected */ + +#ifdef PPPOE_TODO + u8_t *sc_service_name; /* if != NULL: requested name of service */ + u8_t *sc_concentrator_name; /* if != NULL: requested concentrator id */ +#endif /* PPPOE_TODO */ + u8_t sc_ac_cookie[PPPOE_MAX_AC_COOKIE_LEN]; /* content of AC cookie we must echo back */ + u8_t sc_ac_cookie_len; /* length of cookie data */ +#ifdef PPPOE_SERVER + u8_t *sc_hunique; /* content of host unique we must echo back */ + u8_t sc_hunique_len; /* length of host unique */ +#endif + u8_t sc_padi_retried; /* number of PADI retries already done */ + u8_t sc_padr_retried; /* number of PADR retries already done */ +}; + + +#define pppoe_init() /* compatibility define, no initialization needed */ + +ppp_pcb *pppoe_create(struct netif *pppif, + struct netif *ethif, + const char *service_name, const char *concentrator_name, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb); + +/* + * Functions called from lwIP + * DO NOT CALL FROM lwIP USER APPLICATION. + */ +void pppoe_disc_input(struct netif *netif, struct pbuf *p); +void pppoe_data_input(struct netif *netif, struct pbuf *p); + +#endif /* PPP_OE_H */ + +#endif /* PPP_SUPPORT && PPPOE_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppol2tp.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppol2tp.h index f03950e..ae428fa 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppol2tp.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppol2tp.h @@ -1,201 +1,201 @@ -/** - * @file - * Network Point to Point Protocol over Layer 2 Tunneling Protocol header file. - * - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef PPPOL2TP_H -#define PPPOL2TP_H - -#include "ppp.h" - -/* Timeout */ -#define PPPOL2TP_CONTROL_TIMEOUT (5*1000) /* base for quick timeout calculation */ -#define PPPOL2TP_SLOW_RETRY (60*1000) /* persistent retry interval */ - -#define PPPOL2TP_MAXSCCRQ 4 /* retry SCCRQ four times (quickly) */ -#define PPPOL2TP_MAXICRQ 4 /* retry IRCQ four times */ -#define PPPOL2TP_MAXICCN 4 /* retry ICCN four times */ - -/* L2TP header flags */ -#define PPPOL2TP_HEADERFLAG_CONTROL 0x8000 -#define PPPOL2TP_HEADERFLAG_LENGTH 0x4000 -#define PPPOL2TP_HEADERFLAG_SEQUENCE 0x0800 -#define PPPOL2TP_HEADERFLAG_OFFSET 0x0200 -#define PPPOL2TP_HEADERFLAG_PRIORITY 0x0100 -#define PPPOL2TP_HEADERFLAG_VERSION 0x0002 - -/* Mandatory bits for control: Control, Length, Sequence, Version 2 */ -#define PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY (PPPOL2TP_HEADERFLAG_CONTROL|PPPOL2TP_HEADERFLAG_LENGTH|PPPOL2TP_HEADERFLAG_SEQUENCE|PPPOL2TP_HEADERFLAG_VERSION) -/* Forbidden bits for control: Offset, Priority */ -#define PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN (PPPOL2TP_HEADERFLAG_OFFSET|PPPOL2TP_HEADERFLAG_PRIORITY) - -/* Mandatory bits for data: Version 2 */ -#define PPPOL2TP_HEADERFLAG_DATA_MANDATORY (PPPOL2TP_HEADERFLAG_VERSION) - -/* AVP (Attribute Value Pair) header */ -#define PPPOL2TP_AVPHEADERFLAG_MANDATORY 0x8000 -#define PPPOL2TP_AVPHEADERFLAG_HIDDEN 0x4000 -#define PPPOL2TP_AVPHEADERFLAG_LENGTHMASK 0x03ff - -/* -- AVP - Message type */ -#define PPPOL2TP_AVPTYPE_MESSAGE 0 /* Message type */ - -/* Control Connection Management */ -#define PPPOL2TP_MESSAGETYPE_SCCRQ 1 /* Start Control Connection Request */ -#define PPPOL2TP_MESSAGETYPE_SCCRP 2 /* Start Control Connection Reply */ -#define PPPOL2TP_MESSAGETYPE_SCCCN 3 /* Start Control Connection Connected */ -#define PPPOL2TP_MESSAGETYPE_STOPCCN 4 /* Stop Control Connection Notification */ -#define PPPOL2TP_MESSAGETYPE_HELLO 6 /* Hello */ -/* Call Management */ -#define PPPOL2TP_MESSAGETYPE_OCRQ 7 /* Outgoing Call Request */ -#define PPPOL2TP_MESSAGETYPE_OCRP 8 /* Outgoing Call Reply */ -#define PPPOL2TP_MESSAGETYPE_OCCN 9 /* Outgoing Call Connected */ -#define PPPOL2TP_MESSAGETYPE_ICRQ 10 /* Incoming Call Request */ -#define PPPOL2TP_MESSAGETYPE_ICRP 11 /* Incoming Call Reply */ -#define PPPOL2TP_MESSAGETYPE_ICCN 12 /* Incoming Call Connected */ -#define PPPOL2TP_MESSAGETYPE_CDN 14 /* Call Disconnect Notify */ -/* Error reporting */ -#define PPPOL2TP_MESSAGETYPE_WEN 15 /* WAN Error Notify */ -/* PPP Session Control */ -#define PPPOL2TP_MESSAGETYPE_SLI 16 /* Set Link Info */ - -/* -- AVP - Result code */ -#define PPPOL2TP_AVPTYPE_RESULTCODE 1 /* Result code */ -#define PPPOL2TP_RESULTCODE 1 /* General request to clear control connection */ - -/* -- AVP - Protocol version (!= L2TP Header version) */ -#define PPPOL2TP_AVPTYPE_VERSION 2 -#define PPPOL2TP_VERSION 0x0100 /* L2TP Protocol version 1, revision 0 */ - -/* -- AVP - Framing capabilities */ -#define PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES 3 /* Bearer capabilities */ -#define PPPOL2TP_FRAMINGCAPABILITIES 0x00000003 /* Async + Sync framing */ - -/* -- AVP - Bearer capabilities */ -#define PPPOL2TP_AVPTYPE_BEARERCAPABILITIES 4 /* Bearer capabilities */ -#define PPPOL2TP_BEARERCAPABILITIES 0x00000003 /* Analog + Digital Access */ - -/* -- AVP - Tie breaker */ -#define PPPOL2TP_AVPTYPE_TIEBREAKER 5 - -/* -- AVP - Host name */ -#define PPPOL2TP_AVPTYPE_HOSTNAME 7 /* Host name */ -#define PPPOL2TP_HOSTNAME "lwIP" /* FIXME: make it configurable */ - -/* -- AVP - Vendor name */ -#define PPPOL2TP_AVPTYPE_VENDORNAME 8 /* Vendor name */ -#define PPPOL2TP_VENDORNAME "lwIP" /* FIXME: make it configurable */ - -/* -- AVP - Assign tunnel ID */ -#define PPPOL2TP_AVPTYPE_TUNNELID 9 /* Assign Tunnel ID */ - -/* -- AVP - Receive window size */ -#define PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE 10 /* Receive window size */ -#define PPPOL2TP_RECEIVEWINDOWSIZE 8 /* FIXME: make it configurable */ - -/* -- AVP - Challenge */ -#define PPPOL2TP_AVPTYPE_CHALLENGE 11 /* Challenge */ - -/* -- AVP - Cause code */ -#define PPPOL2TP_AVPTYPE_CAUSECODE 12 /* Cause code*/ - -/* -- AVP - Challenge response */ -#define PPPOL2TP_AVPTYPE_CHALLENGERESPONSE 13 /* Challenge response */ -#define PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE 16 - -/* -- AVP - Assign session ID */ -#define PPPOL2TP_AVPTYPE_SESSIONID 14 /* Assign Session ID */ - -/* -- AVP - Call serial number */ -#define PPPOL2TP_AVPTYPE_CALLSERIALNUMBER 15 /* Call Serial Number */ - -/* -- AVP - Framing type */ -#define PPPOL2TP_AVPTYPE_FRAMINGTYPE 19 /* Framing Type */ -#define PPPOL2TP_FRAMINGTYPE 0x00000001 /* Sync framing */ - -/* -- AVP - TX Connect Speed */ -#define PPPOL2TP_AVPTYPE_TXCONNECTSPEED 24 /* TX Connect Speed */ -#define PPPOL2TP_TXCONNECTSPEED 100000000 /* Connect speed: 100 Mbits/s */ - -/* L2TP Session state */ -#define PPPOL2TP_STATE_INITIAL 0 -#define PPPOL2TP_STATE_SCCRQ_SENT 1 -#define PPPOL2TP_STATE_ICRQ_SENT 2 -#define PPPOL2TP_STATE_ICCN_SENT 3 -#define PPPOL2TP_STATE_DATA 4 - -#define PPPOL2TP_OUTPUT_DATA_HEADER_LEN 6 /* Our data header len */ - -/* - * PPPoL2TP interface control block. - */ -typedef struct pppol2tp_pcb_s pppol2tp_pcb; -struct pppol2tp_pcb_s { - ppp_pcb *ppp; /* PPP PCB */ - u8_t phase; /* L2TP phase */ - struct udp_pcb *udp; /* UDP L2TP Socket */ - struct netif *netif; /* Output interface, used as a default route */ - ip_addr_t remote_ip; /* LNS IP Address */ - u16_t remote_port; /* LNS port */ -#if PPPOL2TP_AUTH_SUPPORT - const u8_t *secret; /* Secret string */ - u8_t secret_len; /* Secret string length */ - u8_t secret_rv[16]; /* Random vector */ - u8_t challenge_hash[16]; /* Challenge response */ - u8_t send_challenge; /* Boolean whether the next sent packet should contains a challenge response */ -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - u16_t tunnel_port; /* Tunnel port */ - u16_t our_ns; /* NS to peer */ - u16_t peer_nr; /* NR from peer */ - u16_t peer_ns; /* NS from peer */ - u16_t source_tunnel_id; /* Tunnel ID assigned by peer */ - u16_t remote_tunnel_id; /* Tunnel ID assigned to peer */ - u16_t source_session_id; /* Session ID assigned by peer */ - u16_t remote_session_id; /* Session ID assigned to peer */ - - u8_t sccrq_retried; /* number of SCCRQ retries already done */ - u8_t icrq_retried; /* number of ICRQ retries already done */ - u8_t iccn_retried; /* number of ICCN retries already done */ -}; - - -/* Create a new L2TP session. */ -ppp_pcb *pppol2tp_create(struct netif *pppif, - struct netif *netif, const ip_addr_t *ipaddr, u16_t port, - const u8_t *secret, u8_t secret_len, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb); - -#endif /* PPPOL2TP_H */ -#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ +/** + * @file + * Network Point to Point Protocol over Layer 2 Tunneling Protocol header file. + * + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef PPPOL2TP_H +#define PPPOL2TP_H + +#include "ppp.h" + +/* Timeout */ +#define PPPOL2TP_CONTROL_TIMEOUT (5*1000) /* base for quick timeout calculation */ +#define PPPOL2TP_SLOW_RETRY (60*1000) /* persistent retry interval */ + +#define PPPOL2TP_MAXSCCRQ 4 /* retry SCCRQ four times (quickly) */ +#define PPPOL2TP_MAXICRQ 4 /* retry IRCQ four times */ +#define PPPOL2TP_MAXICCN 4 /* retry ICCN four times */ + +/* L2TP header flags */ +#define PPPOL2TP_HEADERFLAG_CONTROL 0x8000 +#define PPPOL2TP_HEADERFLAG_LENGTH 0x4000 +#define PPPOL2TP_HEADERFLAG_SEQUENCE 0x0800 +#define PPPOL2TP_HEADERFLAG_OFFSET 0x0200 +#define PPPOL2TP_HEADERFLAG_PRIORITY 0x0100 +#define PPPOL2TP_HEADERFLAG_VERSION 0x0002 + +/* Mandatory bits for control: Control, Length, Sequence, Version 2 */ +#define PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY (PPPOL2TP_HEADERFLAG_CONTROL|PPPOL2TP_HEADERFLAG_LENGTH|PPPOL2TP_HEADERFLAG_SEQUENCE|PPPOL2TP_HEADERFLAG_VERSION) +/* Forbidden bits for control: Offset, Priority */ +#define PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN (PPPOL2TP_HEADERFLAG_OFFSET|PPPOL2TP_HEADERFLAG_PRIORITY) + +/* Mandatory bits for data: Version 2 */ +#define PPPOL2TP_HEADERFLAG_DATA_MANDATORY (PPPOL2TP_HEADERFLAG_VERSION) + +/* AVP (Attribute Value Pair) header */ +#define PPPOL2TP_AVPHEADERFLAG_MANDATORY 0x8000 +#define PPPOL2TP_AVPHEADERFLAG_HIDDEN 0x4000 +#define PPPOL2TP_AVPHEADERFLAG_LENGTHMASK 0x03ff + +/* -- AVP - Message type */ +#define PPPOL2TP_AVPTYPE_MESSAGE 0 /* Message type */ + +/* Control Connection Management */ +#define PPPOL2TP_MESSAGETYPE_SCCRQ 1 /* Start Control Connection Request */ +#define PPPOL2TP_MESSAGETYPE_SCCRP 2 /* Start Control Connection Reply */ +#define PPPOL2TP_MESSAGETYPE_SCCCN 3 /* Start Control Connection Connected */ +#define PPPOL2TP_MESSAGETYPE_STOPCCN 4 /* Stop Control Connection Notification */ +#define PPPOL2TP_MESSAGETYPE_HELLO 6 /* Hello */ +/* Call Management */ +#define PPPOL2TP_MESSAGETYPE_OCRQ 7 /* Outgoing Call Request */ +#define PPPOL2TP_MESSAGETYPE_OCRP 8 /* Outgoing Call Reply */ +#define PPPOL2TP_MESSAGETYPE_OCCN 9 /* Outgoing Call Connected */ +#define PPPOL2TP_MESSAGETYPE_ICRQ 10 /* Incoming Call Request */ +#define PPPOL2TP_MESSAGETYPE_ICRP 11 /* Incoming Call Reply */ +#define PPPOL2TP_MESSAGETYPE_ICCN 12 /* Incoming Call Connected */ +#define PPPOL2TP_MESSAGETYPE_CDN 14 /* Call Disconnect Notify */ +/* Error reporting */ +#define PPPOL2TP_MESSAGETYPE_WEN 15 /* WAN Error Notify */ +/* PPP Session Control */ +#define PPPOL2TP_MESSAGETYPE_SLI 16 /* Set Link Info */ + +/* -- AVP - Result code */ +#define PPPOL2TP_AVPTYPE_RESULTCODE 1 /* Result code */ +#define PPPOL2TP_RESULTCODE 1 /* General request to clear control connection */ + +/* -- AVP - Protocol version (!= L2TP Header version) */ +#define PPPOL2TP_AVPTYPE_VERSION 2 +#define PPPOL2TP_VERSION 0x0100 /* L2TP Protocol version 1, revision 0 */ + +/* -- AVP - Framing capabilities */ +#define PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES 3 /* Bearer capabilities */ +#define PPPOL2TP_FRAMINGCAPABILITIES 0x00000003 /* Async + Sync framing */ + +/* -- AVP - Bearer capabilities */ +#define PPPOL2TP_AVPTYPE_BEARERCAPABILITIES 4 /* Bearer capabilities */ +#define PPPOL2TP_BEARERCAPABILITIES 0x00000003 /* Analog + Digital Access */ + +/* -- AVP - Tie breaker */ +#define PPPOL2TP_AVPTYPE_TIEBREAKER 5 + +/* -- AVP - Host name */ +#define PPPOL2TP_AVPTYPE_HOSTNAME 7 /* Host name */ +#define PPPOL2TP_HOSTNAME "lwIP" /* FIXME: make it configurable */ + +/* -- AVP - Vendor name */ +#define PPPOL2TP_AVPTYPE_VENDORNAME 8 /* Vendor name */ +#define PPPOL2TP_VENDORNAME "lwIP" /* FIXME: make it configurable */ + +/* -- AVP - Assign tunnel ID */ +#define PPPOL2TP_AVPTYPE_TUNNELID 9 /* Assign Tunnel ID */ + +/* -- AVP - Receive window size */ +#define PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE 10 /* Receive window size */ +#define PPPOL2TP_RECEIVEWINDOWSIZE 8 /* FIXME: make it configurable */ + +/* -- AVP - Challenge */ +#define PPPOL2TP_AVPTYPE_CHALLENGE 11 /* Challenge */ + +/* -- AVP - Cause code */ +#define PPPOL2TP_AVPTYPE_CAUSECODE 12 /* Cause code*/ + +/* -- AVP - Challenge response */ +#define PPPOL2TP_AVPTYPE_CHALLENGERESPONSE 13 /* Challenge response */ +#define PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE 16 + +/* -- AVP - Assign session ID */ +#define PPPOL2TP_AVPTYPE_SESSIONID 14 /* Assign Session ID */ + +/* -- AVP - Call serial number */ +#define PPPOL2TP_AVPTYPE_CALLSERIALNUMBER 15 /* Call Serial Number */ + +/* -- AVP - Framing type */ +#define PPPOL2TP_AVPTYPE_FRAMINGTYPE 19 /* Framing Type */ +#define PPPOL2TP_FRAMINGTYPE 0x00000001 /* Sync framing */ + +/* -- AVP - TX Connect Speed */ +#define PPPOL2TP_AVPTYPE_TXCONNECTSPEED 24 /* TX Connect Speed */ +#define PPPOL2TP_TXCONNECTSPEED 100000000 /* Connect speed: 100 Mbits/s */ + +/* L2TP Session state */ +#define PPPOL2TP_STATE_INITIAL 0 +#define PPPOL2TP_STATE_SCCRQ_SENT 1 +#define PPPOL2TP_STATE_ICRQ_SENT 2 +#define PPPOL2TP_STATE_ICCN_SENT 3 +#define PPPOL2TP_STATE_DATA 4 + +#define PPPOL2TP_OUTPUT_DATA_HEADER_LEN 6 /* Our data header len */ + +/* + * PPPoL2TP interface control block. + */ +typedef struct pppol2tp_pcb_s pppol2tp_pcb; +struct pppol2tp_pcb_s { + ppp_pcb *ppp; /* PPP PCB */ + u8_t phase; /* L2TP phase */ + struct udp_pcb *udp; /* UDP L2TP Socket */ + struct netif *netif; /* Output interface, used as a default route */ + ip_addr_t remote_ip; /* LNS IP Address */ + u16_t remote_port; /* LNS port */ +#if PPPOL2TP_AUTH_SUPPORT + const u8_t *secret; /* Secret string */ + u8_t secret_len; /* Secret string length */ + u8_t secret_rv[16]; /* Random vector */ + u8_t challenge_hash[16]; /* Challenge response */ + u8_t send_challenge; /* Boolean whether the next sent packet should contains a challenge response */ +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + u16_t tunnel_port; /* Tunnel port */ + u16_t our_ns; /* NS to peer */ + u16_t peer_nr; /* NR from peer */ + u16_t peer_ns; /* NS from peer */ + u16_t source_tunnel_id; /* Tunnel ID assigned by peer */ + u16_t remote_tunnel_id; /* Tunnel ID assigned to peer */ + u16_t source_session_id; /* Session ID assigned by peer */ + u16_t remote_session_id; /* Session ID assigned to peer */ + + u8_t sccrq_retried; /* number of SCCRQ retries already done */ + u8_t icrq_retried; /* number of ICRQ retries already done */ + u8_t iccn_retried; /* number of ICCN retries already done */ +}; + + +/* Create a new L2TP session. */ +ppp_pcb *pppol2tp_create(struct netif *pppif, + struct netif *netif, const ip_addr_t *ipaddr, u16_t port, + const u8_t *secret, u8_t secret_len, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb); + +#endif /* PPPOL2TP_H */ +#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppos.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppos.h index d924a9f..2965284 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppos.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/pppos.h @@ -1,118 +1,118 @@ -/** - * @file - * Network Point to Point Protocol over Serial header file. - * - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef PPPOS_H -#define PPPOS_H - -#include "lwip/sys.h" - -#include "ppp.h" -#include "vj.h" - -/* PPP packet parser states. Current state indicates operation yet to be - * completed. */ -enum { - PDIDLE = 0, /* Idle state - waiting. */ - PDSTART, /* Process start flag. */ - PDADDRESS, /* Process address field. */ - PDCONTROL, /* Process control field. */ - PDPROTOCOL1, /* Process protocol field 1. */ - PDPROTOCOL2, /* Process protocol field 2. */ - PDDATA /* Process data byte. */ -}; - -/* PPPoS serial output callback function prototype */ -typedef u32_t (*pppos_output_cb_fn)(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx); - -/* - * Extended asyncmap - allows any character to be escaped. - */ -typedef u8_t ext_accm[32]; - -/* - * PPPoS interface control block. - */ -typedef struct pppos_pcb_s pppos_pcb; -struct pppos_pcb_s { - /* -- below are data that will NOT be cleared between two sessions */ - ppp_pcb *ppp; /* PPP PCB */ - pppos_output_cb_fn output_cb; /* PPP serial output callback */ - - /* -- below are data that will be cleared between two sessions - * - * last_xmit must be the first member of cleared members, because it is - * used to know which part must not be cleared. - */ - u32_t last_xmit; /* Time of last transmission. */ - ext_accm out_accm; /* Async-Ctl-Char-Map for output. */ - - /* flags */ - unsigned int open :1; /* Set if PPPoS is open */ - unsigned int pcomp :1; /* Does peer accept protocol compression? */ - unsigned int accomp :1; /* Does peer accept addr/ctl compression? */ - - /* PPPoS rx */ - ext_accm in_accm; /* Async-Ctl-Char-Map for input. */ - struct pbuf *in_head, *in_tail; /* The input packet. */ - u16_t in_protocol; /* The input protocol code. */ - u16_t in_fcs; /* Input Frame Check Sequence value. */ - u8_t in_state; /* The input process state. */ - u8_t in_escaped; /* Escape next character. */ -}; - -/* Create a new PPPoS session. */ -ppp_pcb *pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb); - -#if !NO_SYS && !PPP_INPROC_IRQ_SAFE -/* Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. */ -err_t pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l); -#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ - -/* PPP over Serial: this is the input function to be called for received data. */ -void pppos_input(ppp_pcb *ppp, u8_t* data, int len); - - -/* - * Functions called from lwIP - * DO NOT CALL FROM lwIP USER APPLICATION. - */ -#if !NO_SYS && !PPP_INPROC_IRQ_SAFE -err_t pppos_input_sys(struct pbuf *p, struct netif *inp); -#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ - -#endif /* PPPOS_H */ -#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ +/** + * @file + * Network Point to Point Protocol over Serial header file. + * + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef PPPOS_H +#define PPPOS_H + +#include "lwip/sys.h" + +#include "ppp.h" +#include "vj.h" + +/* PPP packet parser states. Current state indicates operation yet to be + * completed. */ +enum { + PDIDLE = 0, /* Idle state - waiting. */ + PDSTART, /* Process start flag. */ + PDADDRESS, /* Process address field. */ + PDCONTROL, /* Process control field. */ + PDPROTOCOL1, /* Process protocol field 1. */ + PDPROTOCOL2, /* Process protocol field 2. */ + PDDATA /* Process data byte. */ +}; + +/* PPPoS serial output callback function prototype */ +typedef u32_t (*pppos_output_cb_fn)(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx); + +/* + * Extended asyncmap - allows any character to be escaped. + */ +typedef u8_t ext_accm[32]; + +/* + * PPPoS interface control block. + */ +typedef struct pppos_pcb_s pppos_pcb; +struct pppos_pcb_s { + /* -- below are data that will NOT be cleared between two sessions */ + ppp_pcb *ppp; /* PPP PCB */ + pppos_output_cb_fn output_cb; /* PPP serial output callback */ + + /* -- below are data that will be cleared between two sessions + * + * last_xmit must be the first member of cleared members, because it is + * used to know which part must not be cleared. + */ + u32_t last_xmit; /* Time of last transmission. */ + ext_accm out_accm; /* Async-Ctl-Char-Map for output. */ + + /* flags */ + unsigned int open :1; /* Set if PPPoS is open */ + unsigned int pcomp :1; /* Does peer accept protocol compression? */ + unsigned int accomp :1; /* Does peer accept addr/ctl compression? */ + + /* PPPoS rx */ + ext_accm in_accm; /* Async-Ctl-Char-Map for input. */ + struct pbuf *in_head, *in_tail; /* The input packet. */ + u16_t in_protocol; /* The input protocol code. */ + u16_t in_fcs; /* Input Frame Check Sequence value. */ + u8_t in_state; /* The input process state. */ + u8_t in_escaped; /* Escape next character. */ +}; + +/* Create a new PPPoS session. */ +ppp_pcb *pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb); + +#if !NO_SYS && !PPP_INPROC_IRQ_SAFE +/* Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. */ +err_t pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l); +#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ + +/* PPP over Serial: this is the input function to be called for received data. */ +void pppos_input(ppp_pcb *ppp, u8_t* data, int len); + + +/* + * Functions called from lwIP + * DO NOT CALL FROM lwIP USER APPLICATION. + */ +#if !NO_SYS && !PPP_INPROC_IRQ_SAFE +err_t pppos_input_sys(struct pbuf *p, struct netif *inp); +#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ + +#endif /* PPPOS_H */ +#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/upap.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/upap.h index 7da792e..36592a5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/upap.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/upap.h @@ -1,123 +1,123 @@ -/* - * upap.h - User/Password Authentication Protocol definitions. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: upap.h,v 1.8 2002/12/04 23:03:33 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef UPAP_H -#define UPAP_H - -#include "ppp.h" - -/* - * Packet header = Code, id, length. - */ -#define UPAP_HEADERLEN 4 - - -/* - * UPAP codes. - */ -#define UPAP_AUTHREQ 1 /* Authenticate-Request */ -#define UPAP_AUTHACK 2 /* Authenticate-Ack */ -#define UPAP_AUTHNAK 3 /* Authenticate-Nak */ - - -/* - * Client states. - */ -#define UPAPCS_INITIAL 0 /* Connection down */ -#define UPAPCS_CLOSED 1 /* Connection up, haven't requested auth */ -#define UPAPCS_PENDING 2 /* Connection down, have requested auth */ -#define UPAPCS_AUTHREQ 3 /* We've sent an Authenticate-Request */ -#define UPAPCS_OPEN 4 /* We've received an Ack */ -#define UPAPCS_BADAUTH 5 /* We've received a Nak */ - -/* - * Server states. - */ -#define UPAPSS_INITIAL 0 /* Connection down */ -#define UPAPSS_CLOSED 1 /* Connection up, haven't requested auth */ -#define UPAPSS_PENDING 2 /* Connection down, have requested auth */ -#define UPAPSS_LISTEN 3 /* Listening for an Authenticate */ -#define UPAPSS_OPEN 4 /* We've sent an Ack */ -#define UPAPSS_BADAUTH 5 /* We've sent a Nak */ - - -/* - * Timeouts. - */ -#if 0 /* moved to ppp_opts.h */ -#define UPAP_DEFTIMEOUT 3 /* Timeout (seconds) for retransmitting req */ -#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ -#endif /* moved to ppp_opts.h */ - -/* - * Each interface is described by upap structure. - */ -#if PAP_SUPPORT -typedef struct upap_state { - const char *us_user; /* User */ - u8_t us_userlen; /* User length */ - const char *us_passwd; /* Password */ - u8_t us_passwdlen; /* Password length */ - u8_t us_clientstate; /* Client state */ -#if PPP_SERVER - u8_t us_serverstate; /* Server state */ -#endif /* PPP_SERVER */ - u8_t us_id; /* Current id */ - u8_t us_transmits; /* Number of auth-reqs sent */ -} upap_state; -#endif /* PAP_SUPPORT */ - - -void upap_authwithpeer(ppp_pcb *pcb, const char *user, const char *password); -#if PPP_SERVER -void upap_authpeer(ppp_pcb *pcb); -#endif /* PPP_SERVER */ - -extern const struct protent pap_protent; - -#endif /* UPAP_H */ -#endif /* PPP_SUPPORT && PAP_SUPPORT */ +/* + * upap.h - User/Password Authentication Protocol definitions. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: upap.h,v 1.8 2002/12/04 23:03:33 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef UPAP_H +#define UPAP_H + +#include "ppp.h" + +/* + * Packet header = Code, id, length. + */ +#define UPAP_HEADERLEN 4 + + +/* + * UPAP codes. + */ +#define UPAP_AUTHREQ 1 /* Authenticate-Request */ +#define UPAP_AUTHACK 2 /* Authenticate-Ack */ +#define UPAP_AUTHNAK 3 /* Authenticate-Nak */ + + +/* + * Client states. + */ +#define UPAPCS_INITIAL 0 /* Connection down */ +#define UPAPCS_CLOSED 1 /* Connection up, haven't requested auth */ +#define UPAPCS_PENDING 2 /* Connection down, have requested auth */ +#define UPAPCS_AUTHREQ 3 /* We've sent an Authenticate-Request */ +#define UPAPCS_OPEN 4 /* We've received an Ack */ +#define UPAPCS_BADAUTH 5 /* We've received a Nak */ + +/* + * Server states. + */ +#define UPAPSS_INITIAL 0 /* Connection down */ +#define UPAPSS_CLOSED 1 /* Connection up, haven't requested auth */ +#define UPAPSS_PENDING 2 /* Connection down, have requested auth */ +#define UPAPSS_LISTEN 3 /* Listening for an Authenticate */ +#define UPAPSS_OPEN 4 /* We've sent an Ack */ +#define UPAPSS_BADAUTH 5 /* We've sent a Nak */ + + +/* + * Timeouts. + */ +#if 0 /* moved to ppp_opts.h */ +#define UPAP_DEFTIMEOUT 3 /* Timeout (seconds) for retransmitting req */ +#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */ +#endif /* moved to ppp_opts.h */ + +/* + * Each interface is described by upap structure. + */ +#if PAP_SUPPORT +typedef struct upap_state { + const char *us_user; /* User */ + u8_t us_userlen; /* User length */ + const char *us_passwd; /* Password */ + u8_t us_passwdlen; /* Password length */ + u8_t us_clientstate; /* Client state */ +#if PPP_SERVER + u8_t us_serverstate; /* Server state */ +#endif /* PPP_SERVER */ + u8_t us_id; /* Current id */ + u8_t us_transmits; /* Number of auth-reqs sent */ +} upap_state; +#endif /* PAP_SUPPORT */ + + +void upap_authwithpeer(ppp_pcb *pcb, const char *user, const char *password); +#if PPP_SERVER +void upap_authpeer(ppp_pcb *pcb); +#endif /* PPP_SERVER */ + +extern const struct protent pap_protent; + +#endif /* UPAP_H */ +#endif /* PPP_SUPPORT && PAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/vj.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/vj.h index 7f389c8..17c33ee 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/vj.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/ppp/vj.h @@ -1,161 +1,161 @@ -/* - * Definitions for tcp compression routines. - * - * $Id: vj.h,v 1.7 2010/02/22 17:52:09 goldsimon Exp $ - * - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: - * - Initial distribution. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#ifndef VJ_H -#define VJ_H - -#include "lwip/ip.h" -#include "lwip/priv/tcp_priv.h" - -#define MAX_SLOTS 16 /* must be > 2 and < 256 */ -#define MAX_HDR 128 - -/* - * Compressed packet format: - * - * The first octet contains the packet type (top 3 bits), TCP - * 'push' bit, and flags that indicate which of the 4 TCP sequence - * numbers have changed (bottom 5 bits). The next octet is a - * conversation number that associates a saved IP/TCP header with - * the compressed packet. The next two octets are the TCP checksum - * from the original datagram. The next 0 to 15 octets are - * sequence number changes, one change per bit set in the header - * (there may be no changes and there are two special cases where - * the receiver implicitly knows what changed -- see below). - * - * There are 5 numbers which can change (they are always inserted - * in the following order): TCP urgent pointer, window, - * acknowlegement, sequence number and IP ID. (The urgent pointer - * is different from the others in that its value is sent, not the - * change in value.) Since typical use of SLIP links is biased - * toward small packets (see comments on MTU/MSS below), changes - * use a variable length coding with one octet for numbers in the - * range 1 - 255 and 3 octets (0, MSB, LSB) for numbers in the - * range 256 - 65535 or 0. (If the change in sequence number or - * ack is more than 65535, an uncompressed packet is sent.) - */ - -/* - * Packet types (must not conflict with IP protocol version) - * - * The top nibble of the first octet is the packet type. There are - * three possible types: IP (not proto TCP or tcp with one of the - * control flags set); uncompressed TCP (a normal IP/TCP packet but - * with the 8-bit protocol field replaced by an 8-bit connection id -- - * this type of packet syncs the sender & receiver); and compressed - * TCP (described above). - * - * LSB of 4-bit field is TCP "PUSH" bit (a worthless anachronism) and - * is logically part of the 4-bit "changes" field that follows. Top - * three bits are actual packet type. For backward compatibility - * and in the interest of conserving bits, numbers are chosen so the - * IP protocol version number (4) which normally appears in this nibble - * means "IP packet". - */ - -/* packet types */ -#define TYPE_IP 0x40 -#define TYPE_UNCOMPRESSED_TCP 0x70 -#define TYPE_COMPRESSED_TCP 0x80 -#define TYPE_ERROR 0x00 - -/* Bits in first octet of compressed packet */ -#define NEW_C 0x40 /* flag bits for what changed in a packet */ -#define NEW_I 0x20 -#define NEW_S 0x08 -#define NEW_A 0x04 -#define NEW_W 0x02 -#define NEW_U 0x01 - -/* reserved, special-case values of above */ -#define SPECIAL_I (NEW_S|NEW_W|NEW_U) /* echoed interactive traffic */ -#define SPECIAL_D (NEW_S|NEW_A|NEW_W|NEW_U) /* unidirectional data */ -#define SPECIALS_MASK (NEW_S|NEW_A|NEW_W|NEW_U) - -#define TCP_PUSH_BIT 0x10 - - -/* - * "state" data for each active tcp conversation on the wire. This is - * basically a copy of the entire IP/TCP header from the last packet - * we saw from the conversation together with a small identifier - * the transmit & receive ends of the line use to locate saved header. - */ -struct cstate { - struct cstate *cs_next; /* next most recently used state (xmit only) */ - u16_t cs_hlen; /* size of hdr (receive only) */ - u8_t cs_id; /* connection # associated with this state */ - u8_t cs_filler; - union { - char csu_hdr[MAX_HDR]; - struct ip_hdr csu_ip; /* ip/tcp hdr from most recent packet */ - } vjcs_u; -}; -#define cs_ip vjcs_u.csu_ip -#define cs_hdr vjcs_u.csu_hdr - - -struct vjstat { - u32_t vjs_packets; /* outbound packets */ - u32_t vjs_compressed; /* outbound compressed packets */ - u32_t vjs_searches; /* searches for connection state */ - u32_t vjs_misses; /* times couldn't find conn. state */ - u32_t vjs_uncompressedin; /* inbound uncompressed packets */ - u32_t vjs_compressedin; /* inbound compressed packets */ - u32_t vjs_errorin; /* inbound unknown type packets */ - u32_t vjs_tossed; /* inbound packets tossed because of error */ -}; - -/* - * all the state data for one serial line (we need one of these per line). - */ -struct vjcompress { - struct cstate *last_cs; /* most recently used tstate */ - u8_t last_recv; /* last rcvd conn. id */ - u8_t last_xmit; /* last sent conn. id */ - u16_t flags; - u8_t maxSlotIndex; - u8_t compressSlot; /* Flag indicating OK to compress slot ID. */ -#if LINK_STATS - struct vjstat stats; -#endif - struct cstate tstate[MAX_SLOTS]; /* xmit connection states */ - struct cstate rstate[MAX_SLOTS]; /* receive connection states */ -}; - -/* flag values */ -#define VJF_TOSS 1U /* tossing rcvd frames because of input err */ - -extern void vj_compress_init (struct vjcompress *comp); -extern u8_t vj_compress_tcp (struct vjcompress *comp, struct pbuf **pb); -extern void vj_uncompress_err (struct vjcompress *comp); -extern int vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp); -extern int vj_uncompress_tcp (struct pbuf **nb, struct vjcompress *comp); - -#endif /* VJ_H */ - -#endif /* PPP_SUPPORT && VJ_SUPPORT */ +/* + * Definitions for tcp compression routines. + * + * $Id: vj.h,v 1.7 2010/02/22 17:52:09 goldsimon Exp $ + * + * Copyright (c) 1989 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: + * - Initial distribution. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#ifndef VJ_H +#define VJ_H + +#include "lwip/ip.h" +#include "lwip/priv/tcp_priv.h" + +#define MAX_SLOTS 16 /* must be > 2 and < 256 */ +#define MAX_HDR 128 + +/* + * Compressed packet format: + * + * The first octet contains the packet type (top 3 bits), TCP + * 'push' bit, and flags that indicate which of the 4 TCP sequence + * numbers have changed (bottom 5 bits). The next octet is a + * conversation number that associates a saved IP/TCP header with + * the compressed packet. The next two octets are the TCP checksum + * from the original datagram. The next 0 to 15 octets are + * sequence number changes, one change per bit set in the header + * (there may be no changes and there are two special cases where + * the receiver implicitly knows what changed -- see below). + * + * There are 5 numbers which can change (they are always inserted + * in the following order): TCP urgent pointer, window, + * acknowlegement, sequence number and IP ID. (The urgent pointer + * is different from the others in that its value is sent, not the + * change in value.) Since typical use of SLIP links is biased + * toward small packets (see comments on MTU/MSS below), changes + * use a variable length coding with one octet for numbers in the + * range 1 - 255 and 3 octets (0, MSB, LSB) for numbers in the + * range 256 - 65535 or 0. (If the change in sequence number or + * ack is more than 65535, an uncompressed packet is sent.) + */ + +/* + * Packet types (must not conflict with IP protocol version) + * + * The top nibble of the first octet is the packet type. There are + * three possible types: IP (not proto TCP or tcp with one of the + * control flags set); uncompressed TCP (a normal IP/TCP packet but + * with the 8-bit protocol field replaced by an 8-bit connection id -- + * this type of packet syncs the sender & receiver); and compressed + * TCP (described above). + * + * LSB of 4-bit field is TCP "PUSH" bit (a worthless anachronism) and + * is logically part of the 4-bit "changes" field that follows. Top + * three bits are actual packet type. For backward compatibility + * and in the interest of conserving bits, numbers are chosen so the + * IP protocol version number (4) which normally appears in this nibble + * means "IP packet". + */ + +/* packet types */ +#define TYPE_IP 0x40 +#define TYPE_UNCOMPRESSED_TCP 0x70 +#define TYPE_COMPRESSED_TCP 0x80 +#define TYPE_ERROR 0x00 + +/* Bits in first octet of compressed packet */ +#define NEW_C 0x40 /* flag bits for what changed in a packet */ +#define NEW_I 0x20 +#define NEW_S 0x08 +#define NEW_A 0x04 +#define NEW_W 0x02 +#define NEW_U 0x01 + +/* reserved, special-case values of above */ +#define SPECIAL_I (NEW_S|NEW_W|NEW_U) /* echoed interactive traffic */ +#define SPECIAL_D (NEW_S|NEW_A|NEW_W|NEW_U) /* unidirectional data */ +#define SPECIALS_MASK (NEW_S|NEW_A|NEW_W|NEW_U) + +#define TCP_PUSH_BIT 0x10 + + +/* + * "state" data for each active tcp conversation on the wire. This is + * basically a copy of the entire IP/TCP header from the last packet + * we saw from the conversation together with a small identifier + * the transmit & receive ends of the line use to locate saved header. + */ +struct cstate { + struct cstate *cs_next; /* next most recently used state (xmit only) */ + u16_t cs_hlen; /* size of hdr (receive only) */ + u8_t cs_id; /* connection # associated with this state */ + u8_t cs_filler; + union { + char csu_hdr[MAX_HDR]; + struct ip_hdr csu_ip; /* ip/tcp hdr from most recent packet */ + } vjcs_u; +}; +#define cs_ip vjcs_u.csu_ip +#define cs_hdr vjcs_u.csu_hdr + + +struct vjstat { + u32_t vjs_packets; /* outbound packets */ + u32_t vjs_compressed; /* outbound compressed packets */ + u32_t vjs_searches; /* searches for connection state */ + u32_t vjs_misses; /* times couldn't find conn. state */ + u32_t vjs_uncompressedin; /* inbound uncompressed packets */ + u32_t vjs_compressedin; /* inbound compressed packets */ + u32_t vjs_errorin; /* inbound unknown type packets */ + u32_t vjs_tossed; /* inbound packets tossed because of error */ +}; + +/* + * all the state data for one serial line (we need one of these per line). + */ +struct vjcompress { + struct cstate *last_cs; /* most recently used tstate */ + u8_t last_recv; /* last rcvd conn. id */ + u8_t last_xmit; /* last sent conn. id */ + u16_t flags; + u8_t maxSlotIndex; + u8_t compressSlot; /* Flag indicating OK to compress slot ID. */ +#if LINK_STATS + struct vjstat stats; +#endif + struct cstate tstate[MAX_SLOTS]; /* xmit connection states */ + struct cstate rstate[MAX_SLOTS]; /* receive connection states */ +}; + +/* flag values */ +#define VJF_TOSS 1U /* tossing rcvd frames because of input err */ + +extern void vj_compress_init (struct vjcompress *comp); +extern u8_t vj_compress_tcp (struct vjcompress *comp, struct pbuf **pb); +extern void vj_uncompress_err (struct vjcompress *comp); +extern int vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp); +extern int vj_uncompress_tcp (struct pbuf **nb, struct vjcompress *comp); + +#endif /* VJ_H */ + +#endif /* PPP_SUPPORT && VJ_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/slipif.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/slipif.h index 65ba31f..4e68c94 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/slipif.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/netif/slipif.h @@ -1,87 +1,87 @@ -/** - * @file - * - * SLIP netif API - */ - -/* - * Copyright (c) 2001, Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef LWIP_HDR_NETIF_SLIPIF_H -#define LWIP_HDR_NETIF_SLIPIF_H - -#include "lwip/opt.h" -#include "lwip/netif.h" - -/** Set this to 1 to start a thread that blocks reading on the serial line - * (using sio_read()). - */ -#ifndef SLIP_USE_RX_THREAD -#define SLIP_USE_RX_THREAD !NO_SYS -#endif - -/** Set this to 1 to enable functions to pass in RX bytes from ISR context. - * If enabled, slipif_received_byte[s]() process incoming bytes and put assembled - * packets on a queue, which is fed into lwIP from slipif_poll(). - * If disabled, slipif_poll() polls the serial line (using sio_tryread()). - */ -#ifndef SLIP_RX_FROM_ISR -#define SLIP_RX_FROM_ISR 0 -#endif - -/** Set this to 1 (default for SLIP_RX_FROM_ISR) to queue incoming packets - * received by slipif_received_byte[s]() as long as PBUF_POOL pbufs are available. - * If disabled, packets will be dropped if more than one packet is received. - */ -#ifndef SLIP_RX_QUEUE -#define SLIP_RX_QUEUE SLIP_RX_FROM_ISR -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -err_t slipif_init(struct netif * netif); -void slipif_poll(struct netif *netif); -#if SLIP_RX_FROM_ISR -void slipif_process_rxqueue(struct netif *netif); -void slipif_received_byte(struct netif *netif, u8_t data); -void slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len); -#endif /* SLIP_RX_FROM_ISR */ - -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_HDR_NETIF_SLIPIF_H */ - +/** + * @file + * + * SLIP netif API + */ + +/* + * Copyright (c) 2001, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef LWIP_HDR_NETIF_SLIPIF_H +#define LWIP_HDR_NETIF_SLIPIF_H + +#include "lwip/opt.h" +#include "lwip/netif.h" + +/** Set this to 1 to start a thread that blocks reading on the serial line + * (using sio_read()). + */ +#ifndef SLIP_USE_RX_THREAD +#define SLIP_USE_RX_THREAD !NO_SYS +#endif + +/** Set this to 1 to enable functions to pass in RX bytes from ISR context. + * If enabled, slipif_received_byte[s]() process incoming bytes and put assembled + * packets on a queue, which is fed into lwIP from slipif_poll(). + * If disabled, slipif_poll() polls the serial line (using sio_tryread()). + */ +#ifndef SLIP_RX_FROM_ISR +#define SLIP_RX_FROM_ISR 0 +#endif + +/** Set this to 1 (default for SLIP_RX_FROM_ISR) to queue incoming packets + * received by slipif_received_byte[s]() as long as PBUF_POOL pbufs are available. + * If disabled, packets will be dropped if more than one packet is received. + */ +#ifndef SLIP_RX_QUEUE +#define SLIP_RX_QUEUE SLIP_RX_FROM_ISR +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +err_t slipif_init(struct netif * netif); +void slipif_poll(struct netif *netif); +#if SLIP_RX_FROM_ISR +void slipif_process_rxqueue(struct netif *netif); +void slipif_received_byte(struct netif *netif, u8_t data); +void slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len); +#endif /* SLIP_RX_FROM_ISR */ + +#ifdef __cplusplus +} +#endif + +#endif /* LWIP_HDR_NETIF_SLIPIF_H */ + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/errno.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/errno.h index 5917c75..420f554 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/errno.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/errno.h @@ -1,33 +1,33 @@ -/** - * @file - * This file is a posix wrapper for lwip/errno.h. - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "lwip/errno.h" +/** + * @file + * This file is a posix wrapper for lwip/errno.h. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/errno.h" diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/netdb.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/netdb.h index 12d4c7f..29abbaf 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/netdb.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/netdb.h @@ -1,33 +1,33 @@ -/** - * @file - * This file is a posix wrapper for lwip/netdb.h. - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "lwip/netdb.h" +/** + * @file + * This file is a posix wrapper for lwip/netdb.h. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/netdb.h" diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/sys/socket.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/sys/socket.h index 0ed9baf..68267e5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/sys/socket.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/include/posix/sys/socket.h @@ -1,33 +1,33 @@ -/** - * @file - * This file is a posix wrapper for lwip/sockets.h. - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "lwip/sockets.h" +/** + * @file + * This file is a posix wrapper for lwip/sockets.h. + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/sockets.h" diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ethernet.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ethernet.c index 52ea423..97a15d3 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ethernet.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ethernet.c @@ -1,314 +1,314 @@ -/** - * @file - * Ethernet common functions - * - * @defgroup ethernet Ethernet - * @ingroup callbackstyle_api - */ - -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * Copyright (c) 2003-2004 Leon Woestenberg - * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "lwip/opt.h" - -#if LWIP_ARP || LWIP_ETHERNET - -#include "netif/ethernet.h" -#include "lwip/def.h" -#include "lwip/stats.h" -#include "lwip/etharp.h" -#include "lwip/ip.h" -#include "lwip/snmp.h" - -#include - -#include "netif/ppp/ppp_opts.h" -#if PPPOE_SUPPORT -#include "netif/ppp/pppoe.h" -#endif /* PPPOE_SUPPORT */ - -#ifdef LWIP_HOOK_FILENAME -#include LWIP_HOOK_FILENAME -#endif - -const struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}}; -const struct eth_addr ethzero = {{0,0,0,0,0,0}}; - -/** - * @ingroup lwip_nosys - * Process received ethernet frames. Using this function instead of directly - * calling ip_input and passing ARP frames through etharp in ethernetif_input, - * the ARP cache is protected from concurrent access.\n - * Don't call directly, pass to netif_add() and call netif->input(). - * - * @param p the received packet, p->payload pointing to the ethernet header - * @param netif the network interface on which the packet was received - * - * @see LWIP_HOOK_UNKNOWN_ETH_PROTOCOL - * @see ETHARP_SUPPORT_VLAN - * @see LWIP_HOOK_VLAN_CHECK - */ -err_t -ethernet_input(struct pbuf *p, struct netif *netif) -{ - struct eth_hdr* ethhdr; - u16_t type; -#if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6 - s16_t ip_hdr_offset = SIZEOF_ETH_HDR; -#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ - - if (p->len <= SIZEOF_ETH_HDR) { - /* a packet with only an ethernet header (or less) is not valid for us */ - ETHARP_STATS_INC(etharp.proterr); - ETHARP_STATS_INC(etharp.drop); - MIB2_STATS_NETIF_INC(netif, ifinerrors); - goto free_and_return; - } - - /* points to packet payload, which starts with an Ethernet header */ - ethhdr = (struct eth_hdr *)p->payload; - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, - ("ethernet_input: dest:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", src:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", type:%"X16_F"\n", - (unsigned)ethhdr->dest.addr[0], (unsigned)ethhdr->dest.addr[1], (unsigned)ethhdr->dest.addr[2], - (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], - (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], - (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], - lwip_htons(ethhdr->type))); - - type = ethhdr->type; -#if ETHARP_SUPPORT_VLAN - if (type == PP_HTONS(ETHTYPE_VLAN)) { - struct eth_vlan_hdr *vlan = (struct eth_vlan_hdr*)(((char*)ethhdr) + SIZEOF_ETH_HDR); - if (p->len <= SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) { - /* a packet with only an ethernet/vlan header (or less) is not valid for us */ - ETHARP_STATS_INC(etharp.proterr); - ETHARP_STATS_INC(etharp.drop); - MIB2_STATS_NETIF_INC(netif, ifinerrors); - goto free_and_return; - } -#if defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) /* if not, allow all VLANs */ -#ifdef LWIP_HOOK_VLAN_CHECK - if (!LWIP_HOOK_VLAN_CHECK(netif, ethhdr, vlan)) { -#elif defined(ETHARP_VLAN_CHECK_FN) - if (!ETHARP_VLAN_CHECK_FN(ethhdr, vlan)) { -#elif defined(ETHARP_VLAN_CHECK) - if (VLAN_ID(vlan) != ETHARP_VLAN_CHECK) { -#endif - /* silently ignore this packet: not for our VLAN */ - pbuf_free(p); - return ERR_OK; - } -#endif /* defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) */ - type = vlan->tpid; - ip_hdr_offset = SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR; - } -#endif /* ETHARP_SUPPORT_VLAN */ - -#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) { - /* this might be a multicast or broadcast packet */ - if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { -#if LWIP_IPV4 - if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && - (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { - /* mark the pbuf as link-layer multicast */ - p->flags |= PBUF_FLAG_LLMCAST; - } -#endif /* LWIP_IPV4 */ - } -#if LWIP_IPV6 - else if ((ethhdr->dest.addr[0] == LL_IP6_MULTICAST_ADDR_0) && - (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)) { - /* mark the pbuf as link-layer broadcast */ - p->flags |= PBUF_FLAG_LLBCAST; - } - } - - switch (type) { -#if LWIP_IPV4 && LWIP_ARP - /* IP packet? */ - case PP_HTONS(ETHTYPE_IP): - if (!(netif->flags & NETIF_FLAG_ETHARP)) { - goto free_and_return; - } - /* skip Ethernet header */ - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("ethernet_input: IPv4 packet dropped, too short (%"S16_F"/%"S16_F")\n", - p->tot_len, ip_hdr_offset)); - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("Can't move over header in packet")); - goto free_and_return; - } else { - /* pass to IP layer */ - ip4_input(p, netif); - } - break; - - case PP_HTONS(ETHTYPE_ARP): - if (!(netif->flags & NETIF_FLAG_ETHARP)) { - goto free_and_return; - } - /* skip Ethernet header */ - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("ethernet_input: ARP response packet dropped, too short (%"S16_F"/%"S16_F")\n", - p->tot_len, ip_hdr_offset)); - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("Can't move over header in packet")); - ETHARP_STATS_INC(etharp.lenerr); - ETHARP_STATS_INC(etharp.drop); - goto free_and_return; - } else { - /* pass p to ARP module */ - etharp_input(p, netif); - } - break; -#endif /* LWIP_IPV4 && LWIP_ARP */ -#if PPPOE_SUPPORT - case PP_HTONS(ETHTYPE_PPPOEDISC): /* PPP Over Ethernet Discovery Stage */ - pppoe_disc_input(netif, p); - break; - - case PP_HTONS(ETHTYPE_PPPOE): /* PPP Over Ethernet Session Stage */ - pppoe_data_input(netif, p); - break; -#endif /* PPPOE_SUPPORT */ - -#if LWIP_IPV6 - case PP_HTONS(ETHTYPE_IPV6): /* IPv6 */ - /* skip Ethernet header */ - if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { - LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, - ("ethernet_input: IPv6 packet dropped, too short (%"S16_F"/%"S16_F")\n", - p->tot_len, ip_hdr_offset)); - goto free_and_return; - } else { - /* pass to IPv6 layer */ - ip6_input(p, netif); - } - break; -#endif /* LWIP_IPV6 */ - - default: -#ifdef LWIP_HOOK_UNKNOWN_ETH_PROTOCOL - if(LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(p, netif) == ERR_OK) { - break; - } -#endif - ETHARP_STATS_INC(etharp.proterr); - ETHARP_STATS_INC(etharp.drop); - MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); - goto free_and_return; - } - - /* 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); - return ERR_OK; -} - -/** - * @ingroup ethernet - * Send an ethernet packet on the network using netif->linkoutput(). - * The ethernet header is filled in before sending. - * - * @see LWIP_HOOK_VLAN_SET - * - * @param netif the lwIP network interface on which to send the packet - * @param p the packet to send. pbuf layer must be @ref PBUF_LINK. - * @param src the source MAC address to be copied into the ethernet header - * @param dst the destination MAC address to be copied into the ethernet header - * @param eth_type ethernet type (@ref eth_type) - * @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) -{ - struct eth_hdr* ethhdr; - u16_t eth_type_be = lwip_htons(eth_type); - -#if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) - s32_t vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type); - if (vlan_prio_vid >= 0) { - struct eth_vlan_hdr* vlanhdr; - - LWIP_ASSERT("prio_vid must be <= 0xFFFF", vlan_prio_vid <= 0xFFFF); - - if (pbuf_header(p, SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) != 0) { - goto pbuf_header_failed; - } - vlanhdr = (struct eth_vlan_hdr*)(((u8_t*)p->payload) + SIZEOF_ETH_HDR); - vlanhdr->tpid = eth_type_be; - vlanhdr->prio_vid = lwip_htons((u16_t)vlan_prio_vid); - - eth_type_be = PP_HTONS(ETHTYPE_VLAN); - } else -#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ - { - if (pbuf_header(p, SIZEOF_ETH_HDR) != 0) { - goto pbuf_header_failed; - } - } - - ethhdr = (struct eth_hdr*)p->payload; - ethhdr->type = eth_type_be; - ETHADDR32_COPY(ðhdr->dest, dst); - ETHADDR16_COPY(ðhdr->src, src); - - LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", - (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); - -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; -} - -#endif /* LWIP_ARP || LWIP_ETHERNET */ +/** + * @file + * Ethernet common functions + * + * @defgroup ethernet Ethernet + * @ingroup callbackstyle_api + */ + +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * Copyright (c) 2003-2004 Leon Woestenberg + * Copyright (c) 2003-2004 Axon Digital Design B.V., The Netherlands. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "lwip/opt.h" + +#if LWIP_ARP || LWIP_ETHERNET + +#include "netif/ethernet.h" +#include "lwip/def.h" +#include "lwip/stats.h" +#include "lwip/etharp.h" +#include "lwip/ip.h" +#include "lwip/snmp.h" + +#include + +#include "netif/ppp/ppp_opts.h" +#if PPPOE_SUPPORT +#include "netif/ppp/pppoe.h" +#endif /* PPPOE_SUPPORT */ + +#ifdef LWIP_HOOK_FILENAME +#include LWIP_HOOK_FILENAME +#endif + +const struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}}; +const struct eth_addr ethzero = {{0,0,0,0,0,0}}; + +/** + * @ingroup lwip_nosys + * Process received ethernet frames. Using this function instead of directly + * calling ip_input and passing ARP frames through etharp in ethernetif_input, + * the ARP cache is protected from concurrent access.\n + * Don't call directly, pass to netif_add() and call netif->input(). + * + * @param p the received packet, p->payload pointing to the ethernet header + * @param netif the network interface on which the packet was received + * + * @see LWIP_HOOK_UNKNOWN_ETH_PROTOCOL + * @see ETHARP_SUPPORT_VLAN + * @see LWIP_HOOK_VLAN_CHECK + */ +err_t +ethernet_input(struct pbuf *p, struct netif *netif) +{ + struct eth_hdr* ethhdr; + u16_t type; +#if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6 + s16_t ip_hdr_offset = SIZEOF_ETH_HDR; +#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ + + if (p->len <= SIZEOF_ETH_HDR) { + /* a packet with only an ethernet header (or less) is not valid for us */ + ETHARP_STATS_INC(etharp.proterr); + ETHARP_STATS_INC(etharp.drop); + MIB2_STATS_NETIF_INC(netif, ifinerrors); + goto free_and_return; + } + + /* points to packet payload, which starts with an Ethernet header */ + ethhdr = (struct eth_hdr *)p->payload; + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, + ("ethernet_input: dest:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", src:%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F":%"X8_F", type:%"X16_F"\n", + (unsigned)ethhdr->dest.addr[0], (unsigned)ethhdr->dest.addr[1], (unsigned)ethhdr->dest.addr[2], + (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], + (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], + (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], + lwip_htons(ethhdr->type))); + + type = ethhdr->type; +#if ETHARP_SUPPORT_VLAN + if (type == PP_HTONS(ETHTYPE_VLAN)) { + struct eth_vlan_hdr *vlan = (struct eth_vlan_hdr*)(((char*)ethhdr) + SIZEOF_ETH_HDR); + if (p->len <= SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) { + /* a packet with only an ethernet/vlan header (or less) is not valid for us */ + ETHARP_STATS_INC(etharp.proterr); + ETHARP_STATS_INC(etharp.drop); + MIB2_STATS_NETIF_INC(netif, ifinerrors); + goto free_and_return; + } +#if defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) /* if not, allow all VLANs */ +#ifdef LWIP_HOOK_VLAN_CHECK + if (!LWIP_HOOK_VLAN_CHECK(netif, ethhdr, vlan)) { +#elif defined(ETHARP_VLAN_CHECK_FN) + if (!ETHARP_VLAN_CHECK_FN(ethhdr, vlan)) { +#elif defined(ETHARP_VLAN_CHECK) + if (VLAN_ID(vlan) != ETHARP_VLAN_CHECK) { +#endif + /* silently ignore this packet: not for our VLAN */ + pbuf_free(p); + return ERR_OK; + } +#endif /* defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) */ + type = vlan->tpid; + ip_hdr_offset = SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR; + } +#endif /* ETHARP_SUPPORT_VLAN */ + +#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) { + /* this might be a multicast or broadcast packet */ + if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { +#if LWIP_IPV4 + if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && + (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { + /* mark the pbuf as link-layer multicast */ + p->flags |= PBUF_FLAG_LLMCAST; + } +#endif /* LWIP_IPV4 */ + } +#if LWIP_IPV6 + else if ((ethhdr->dest.addr[0] == LL_IP6_MULTICAST_ADDR_0) && + (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)) { + /* mark the pbuf as link-layer broadcast */ + p->flags |= PBUF_FLAG_LLBCAST; + } + } + + switch (type) { +#if LWIP_IPV4 && LWIP_ARP + /* IP packet? */ + case PP_HTONS(ETHTYPE_IP): + if (!(netif->flags & NETIF_FLAG_ETHARP)) { + goto free_and_return; + } + /* skip Ethernet header */ + if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("ethernet_input: IPv4 packet dropped, too short (%"S16_F"/%"S16_F")\n", + p->tot_len, ip_hdr_offset)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("Can't move over header in packet")); + goto free_and_return; + } else { + /* pass to IP layer */ + ip4_input(p, netif); + } + break; + + case PP_HTONS(ETHTYPE_ARP): + if (!(netif->flags & NETIF_FLAG_ETHARP)) { + goto free_and_return; + } + /* skip Ethernet header */ + if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("ethernet_input: ARP response packet dropped, too short (%"S16_F"/%"S16_F")\n", + p->tot_len, ip_hdr_offset)); + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("Can't move over header in packet")); + ETHARP_STATS_INC(etharp.lenerr); + ETHARP_STATS_INC(etharp.drop); + goto free_and_return; + } else { + /* pass p to ARP module */ + etharp_input(p, netif); + } + break; +#endif /* LWIP_IPV4 && LWIP_ARP */ +#if PPPOE_SUPPORT + case PP_HTONS(ETHTYPE_PPPOEDISC): /* PPP Over Ethernet Discovery Stage */ + pppoe_disc_input(netif, p); + break; + + case PP_HTONS(ETHTYPE_PPPOE): /* PPP Over Ethernet Session Stage */ + pppoe_data_input(netif, p); + break; +#endif /* PPPOE_SUPPORT */ + +#if LWIP_IPV6 + case PP_HTONS(ETHTYPE_IPV6): /* IPv6 */ + /* skip Ethernet header */ + if ((p->len < ip_hdr_offset) || pbuf_header(p, (s16_t)-ip_hdr_offset)) { + LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, + ("ethernet_input: IPv6 packet dropped, too short (%"S16_F"/%"S16_F")\n", + p->tot_len, ip_hdr_offset)); + goto free_and_return; + } else { + /* pass to IPv6 layer */ + ip6_input(p, netif); + } + break; +#endif /* LWIP_IPV6 */ + + default: +#ifdef LWIP_HOOK_UNKNOWN_ETH_PROTOCOL + if(LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(p, netif) == ERR_OK) { + break; + } +#endif + ETHARP_STATS_INC(etharp.proterr); + ETHARP_STATS_INC(etharp.drop); + MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); + goto free_and_return; + } + + /* 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); + return ERR_OK; +} + +/** + * @ingroup ethernet + * Send an ethernet packet on the network using netif->linkoutput(). + * The ethernet header is filled in before sending. + * + * @see LWIP_HOOK_VLAN_SET + * + * @param netif the lwIP network interface on which to send the packet + * @param p the packet to send. pbuf layer must be @ref PBUF_LINK. + * @param src the source MAC address to be copied into the ethernet header + * @param dst the destination MAC address to be copied into the ethernet header + * @param eth_type ethernet type (@ref eth_type) + * @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) +{ + struct eth_hdr* ethhdr; + u16_t eth_type_be = lwip_htons(eth_type); + +#if ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) + s32_t vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type); + if (vlan_prio_vid >= 0) { + struct eth_vlan_hdr* vlanhdr; + + LWIP_ASSERT("prio_vid must be <= 0xFFFF", vlan_prio_vid <= 0xFFFF); + + if (pbuf_header(p, SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR) != 0) { + goto pbuf_header_failed; + } + vlanhdr = (struct eth_vlan_hdr*)(((u8_t*)p->payload) + SIZEOF_ETH_HDR); + vlanhdr->tpid = eth_type_be; + vlanhdr->prio_vid = lwip_htons((u16_t)vlan_prio_vid); + + eth_type_be = PP_HTONS(ETHTYPE_VLAN); + } else +#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ + { + if (pbuf_header(p, SIZEOF_ETH_HDR) != 0) { + goto pbuf_header_failed; + } + } + + ethhdr = (struct eth_hdr*)p->payload; + ethhdr->type = eth_type_be; + ETHADDR32_COPY(ðhdr->dest, dst); + ETHADDR16_COPY(ðhdr->src, src); + + LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", + (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); + +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; +} + +#endif /* LWIP_ARP || LWIP_ETHERNET */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/lowpan6.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/lowpan6.c index cb1c688..5f2cd04 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/lowpan6.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/lowpan6.c @@ -1,1193 +1,1193 @@ -/** - * @file - * - * 6LowPAN output for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units. - */ - -/* - * Copyright (c) 2015 Inico Technologies Ltd. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Ivan Delamer - * - * - * Please coordinate changes and requests with Ivan Delamer - * - */ - -/** - * @defgroup sixlowpan 6LowPAN netif - * @ingroup addons - * 6LowPAN netif implementation - */ - -#include "netif/lowpan6.h" - -#if LWIP_IPV6 && LWIP_6LOWPAN - -#include "lwip/ip.h" -#include "lwip/pbuf.h" -#include "lwip/ip_addr.h" -#include "lwip/netif.h" -#include "lwip/nd6.h" -#include "lwip/mem.h" -#include "lwip/udp.h" -#include "lwip/tcpip.h" -#include "lwip/snmp.h" - -#include - -struct ieee_802154_addr { - u8_t addr_len; - u8_t addr[8]; -}; - -/** This is a helper struct. - */ -struct lowpan6_reass_helper { - struct pbuf *pbuf; - struct lowpan6_reass_helper *next_packet; - u8_t timer; - struct ieee_802154_addr sender_addr; - u16_t datagram_size; - u16_t datagram_tag; -}; - -static struct lowpan6_reass_helper * reass_list; - -#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 -static ip6_addr_t lowpan6_context[LWIP_6LOWPAN_NUM_CONTEXTS]; -#endif - -static u16_t ieee_802154_pan_id; - -static const struct ieee_802154_addr ieee_802154_broadcast = {2, {0xff, 0xff}}; - -#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS -static struct ieee_802154_addr short_mac_addr = {2, {0,0}}; -#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ - -static err_t dequeue_datagram(struct lowpan6_reass_helper *lrh); - -/** - * Periodic timer for 6LowPAN functions: - * - * - Remove incomplete/old packets - */ -void -lowpan6_tmr(void) -{ - struct lowpan6_reass_helper *lrh, *lrh_temp; - - lrh = reass_list; - while (lrh != NULL) { - lrh_temp = lrh->next_packet; - if ((--lrh->timer) == 0) { - dequeue_datagram(lrh); - pbuf_free(lrh->pbuf); - mem_free(lrh); - } - lrh = lrh_temp; - } -} - -/** - * Removes a datagram from the reassembly queue. - **/ -static err_t -dequeue_datagram(struct lowpan6_reass_helper *lrh) -{ - struct lowpan6_reass_helper *lrh_temp; - - if (reass_list == lrh) { - reass_list = reass_list->next_packet; - } else { - lrh_temp = reass_list; - while (lrh_temp != NULL) { - if (lrh_temp->next_packet == lrh) { - lrh_temp->next_packet = lrh->next_packet; - break; - } - lrh_temp = lrh_temp->next_packet; - } - } - - return ERR_OK; -} - -static s8_t -lowpan6_context_lookup(const ip6_addr_t *ip6addr) -{ - s8_t i; - - for (i = 0; i < LWIP_6LOWPAN_NUM_CONTEXTS; i++) { - if (ip6_addr_netcmp(&lowpan6_context[i], ip6addr)) { - return i; - } - } - - return -1; -} - -/* Determine compression mode for unicast address. */ -static s8_t -lowpan6_get_address_mode(const ip6_addr_t *ip6addr, const struct ieee_802154_addr *mac_addr) -{ - if (mac_addr->addr_len == 2) { - if ((ip6addr->addr[2] == (u32_t)PP_HTONL(0x000000ff)) && - ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000))) { - if ((ip6addr->addr[3] & PP_HTONL(0x0000ffff)) == lwip_ntohl((mac_addr->addr[0] << 8) | mac_addr->addr[1])) { - return 3; - } - } - } else if (mac_addr->addr_len == 8) { - if ((ip6addr->addr[2] == lwip_ntohl(((mac_addr->addr[0] ^ 2) << 24) | (mac_addr->addr[1] << 16) | mac_addr->addr[2] << 8 | mac_addr->addr[3])) && - (ip6addr->addr[3] == lwip_ntohl((mac_addr->addr[4] << 24) | (mac_addr->addr[5] << 16) | mac_addr->addr[6] << 8 | mac_addr->addr[7]))) { - return 3; - } - } - - if ((ip6addr->addr[2] == PP_HTONL(0x000000ffUL)) && - ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000UL))) { - return 2; - } - - return 1; -} - -/* Determine compression mode for multicast address. */ -static s8_t -lowpan6_get_address_mode_mc(const ip6_addr_t *ip6addr) -{ - if ((ip6addr->addr[0] == PP_HTONL(0xff020000)) && - (ip6addr->addr[1] == 0) && - (ip6addr->addr[2] == 0) && - ((ip6addr->addr[3] & PP_HTONL(0xffffff00)) == 0)) { - return 3; - } else if (((ip6addr->addr[0] & PP_HTONL(0xff00ffff)) == PP_HTONL(0xff000000)) && - (ip6addr->addr[1] == 0)) { - if ((ip6addr->addr[2] == 0) && - ((ip6addr->addr[3] & PP_HTONL(0xff000000)) == 0)) { - return 2; - } else if ((ip6addr->addr[2] & PP_HTONL(0xffffff00)) == 0) { - return 1; - } - } - - return 0; -} - -/* - * Encapsulates data into IEEE 802.15.4 frames. - * Fragments an IPv6 datagram into 6LowPAN units, which fit into IEEE 802.15.4 frames. - * If configured, will compress IPv6 and or UDP headers. - * */ -static err_t -lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr *src, const struct ieee_802154_addr *dst) -{ - struct pbuf * p_frag; - u16_t frag_len, remaining_len; - u8_t * buffer; - u8_t ieee_header_len; - u8_t lowpan6_header_len; - s8_t i; - static u8_t frame_seq_num; - static u16_t datagram_tag; - u16_t datagram_offset; - err_t err = ERR_IF; - - /* We'll use a dedicated pbuf for building 6LowPAN fragments. */ - p_frag = pbuf_alloc(PBUF_RAW, 127, PBUF_RAM); - if (p_frag == NULL) { - MIB2_STATS_NETIF_INC(netif, ifoutdiscards); - return ERR_MEM; - } - - /* Write IEEE 802.15.4 header. */ - buffer = (u8_t*)p_frag->payload; - ieee_header_len = 0; - if (dst == &ieee_802154_broadcast) { - buffer[ieee_header_len++] = 0x01; /* data packet, no ack required. */ - } else { - buffer[ieee_header_len++] = 0x21; /* data packet, ack required. */ - } - buffer[ieee_header_len] = (0x00 << 4); /* 2003 frame version */ - buffer[ieee_header_len] |= (dst->addr_len == 2) ? (0x02 << 2) : (0x03 << 2); /* destination addressing mode */ - buffer[ieee_header_len] |= (src->addr_len == 2) ? (0x02 << 6) : (0x03 << 6); /* source addressing mode */ - ieee_header_len++; - buffer[ieee_header_len++] = frame_seq_num++; - - buffer[ieee_header_len++] = ieee_802154_pan_id & 0xff; /* pan id */ - buffer[ieee_header_len++] = (ieee_802154_pan_id >> 8) & 0xff; /* pan id */ - i = dst->addr_len; - while (i-- > 0) { - buffer[ieee_header_len++] = dst->addr[i]; - } - - buffer[ieee_header_len++] = ieee_802154_pan_id & 0xff; /* pan id */ - buffer[ieee_header_len++] = (ieee_802154_pan_id >> 8) & 0xff; /* pan id */ - i = src->addr_len; - while (i-- > 0) { - buffer[ieee_header_len++] = src->addr[i]; - } - -#if LWIP_6LOWPAN_IPHC - /* Perform 6LowPAN IPv6 header compression according to RFC 6282 */ - { - struct ip6_hdr *ip6hdr; - - /* Point to ip6 header and align copies of src/dest addresses. */ - ip6hdr = (struct ip6_hdr *)p->payload; - ip_addr_copy_from_ip6(ip_data.current_iphdr_dest, ip6hdr->dest); - ip_addr_copy_from_ip6(ip_data.current_iphdr_src, ip6hdr->src); - - /* Basic length of 6LowPAN header, set dispatch and clear fields. */ - lowpan6_header_len = 2; - buffer[ieee_header_len] = 0x60; - buffer[ieee_header_len + 1] = 0; - - /* Determine whether there will be a Context Identifier Extension byte or not. - * If so, set it already. */ -#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 - buffer[ieee_header_len + 2] = 0; - - i = lowpan6_context_lookup(ip_2_ip6(&ip_data.current_iphdr_src)); - if (i >= 0) { - /* Stateful source address compression. */ - buffer[ieee_header_len + 1] |= 0x40; - buffer[ieee_header_len + 2] |= (i & 0x0f) << 4; - } - - i = lowpan6_context_lookup(ip_2_ip6(&ip_data.current_iphdr_dest)); - if (i >= 0) { - /* Stateful destination address compression. */ - buffer[ieee_header_len + 1] |= 0x04; - buffer[ieee_header_len + 2] |= i & 0x0f; - } - - if (buffer[ieee_header_len + 2] != 0x00) { - /* Context identifier extension byte is appended. */ - buffer[ieee_header_len + 1] |= 0x80; - lowpan6_header_len++; - } -#endif /* LWIP_6LOWPAN_NUM_CONTEXTS > 0 */ - - /* Determine TF field: Traffic Class, Flow Label */ - if (IP6H_FL(ip6hdr) == 0) { - /* Flow label is elided. */ - buffer[ieee_header_len] |= 0x10; - if (IP6H_TC(ip6hdr) == 0) { - /* Traffic class (ECN+DSCP) elided too. */ - buffer[ieee_header_len] |= 0x08; - } else { - /* Traffic class (ECN+DSCP) appended. */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_TC(ip6hdr); - } - } else { - if (((IP6H_TC(ip6hdr) & 0x3f) == 0)) { - /* DSCP portion of Traffic Class is elided, ECN and FL are appended (3 bytes) */ - buffer[ieee_header_len] |= 0x08; - - buffer[ieee_header_len + lowpan6_header_len] = IP6H_TC(ip6hdr) & 0xc0; - buffer[ieee_header_len + lowpan6_header_len++] |= (IP6H_FL(ip6hdr) >> 16) & 0x0f; - buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; - } else { - /* Traffic class and flow label are appended (4 bytes) */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_TC(ip6hdr); - buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 16) & 0x0f; - buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; - } - } - - /* Compress NH? - * Only if UDP for now. @todo support other NH compression. */ - if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { - buffer[ieee_header_len] |= 0x04; - } else { - /* append nexth. */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_NEXTH(ip6hdr); - } - - /* Compress hop limit? */ - if (IP6H_HOPLIM(ip6hdr) == 255) { - buffer[ieee_header_len] |= 0x03; - } else if (IP6H_HOPLIM(ip6hdr) == 64) { - buffer[ieee_header_len] |= 0x02; - } else if (IP6H_HOPLIM(ip6hdr) == 1) { - buffer[ieee_header_len] |= 0x01; - } else { - /* append hop limit */ - buffer[ieee_header_len + lowpan6_header_len++] = IP6H_HOPLIM(ip6hdr); - } - - /* Compress source address */ - if (((buffer[ieee_header_len + 1] & 0x40) != 0) || - (ip6_addr_islinklocal(ip_2_ip6(&ip_data.current_iphdr_src)))) { - /* Context-based or link-local source address compression. */ - i = lowpan6_get_address_mode(ip_2_ip6(&ip_data.current_iphdr_src), src); - buffer[ieee_header_len + 1] |= (i & 0x03) << 4; - if (i == 1) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 16, 8); - lowpan6_header_len += 8; - } else if (i == 2) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 22, 2); - lowpan6_header_len += 2; - } - } else if (ip6_addr_isany(ip_2_ip6(&ip_data.current_iphdr_src))) { - /* Special case: mark SAC and leave SAM=0 */ - buffer[ieee_header_len + 1] |= 0x40; - } else { - /* Append full address. */ - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 8, 16); - lowpan6_header_len += 16; - } - - /* Compress destination address */ - if (ip6_addr_ismulticast(ip_2_ip6(&ip_data.current_iphdr_dest))) { - /* @todo support stateful multicast address compression */ - - buffer[ieee_header_len + 1] |= 0x08; - - i = lowpan6_get_address_mode_mc(ip_2_ip6(&ip_data.current_iphdr_dest)); - buffer[ieee_header_len + 1] |= i & 0x03; - if (i == 0) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 24, 16); - lowpan6_header_len += 16; - } else if (i == 1) { - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 35, 5); - lowpan6_header_len += 5; - } else if (i == 2) { - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 37, 3); - lowpan6_header_len += 3; - } else if (i == 3) { - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[39]; - } - } else if (((buffer[ieee_header_len + 1] & 0x04) != 0) || - (ip6_addr_islinklocal(ip_2_ip6(&ip_data.current_iphdr_dest)))) { - /* Context-based or link-local destination address compression. */ - i = lowpan6_get_address_mode(ip_2_ip6(&ip_data.current_iphdr_dest), dst); - buffer[ieee_header_len + 1] |= i & 0x03; - if (i == 1) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 32, 8); - lowpan6_header_len += 8; - } else if (i == 2) { - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 38, 2); - lowpan6_header_len += 2; - } - } else { - /* Append full address. */ - MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 24, 16); - lowpan6_header_len += 16; - } - - /* Move to payload. */ - pbuf_header(p, -IP6_HLEN); - - /* Compress UDP header? */ - if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { - /* @todo support optional checksum compression */ - - buffer[ieee_header_len + lowpan6_header_len] = 0xf0; - - /* determine port compression mode. */ - if ((((u8_t *)p->payload)[0] == 0xf0) && ((((u8_t *)p->payload)[1] & 0xf0) == 0xb0) && - (((u8_t *)p->payload)[2] == 0xf0) && ((((u8_t *)p->payload)[3] & 0xf0) == 0xb0)) { - /* Compress source and dest ports. */ - buffer[ieee_header_len + lowpan6_header_len++] |= 0x03; - buffer[ieee_header_len + lowpan6_header_len++] = ((((u8_t *)p->payload)[1] & 0x0f) << 4) | (((u8_t *)p->payload)[3] & 0x0f); - } else if (((u8_t *)p->payload)[0] == 0xf0) { - /* Compress source port. */ - buffer[ieee_header_len + lowpan6_header_len++] |= 0x02; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[2]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; - } else if (((u8_t *)p->payload)[2] == 0xf0) { - /* Compress dest port. */ - buffer[ieee_header_len + lowpan6_header_len++] |= 0x01; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[0]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; - } else { - /* append full ports. */ - lowpan6_header_len++; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[0]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[2]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; - } - - /* elide length and copy checksum */ - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[6]; - buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[7]; - - pbuf_header(p, -UDP_HLEN); - } - } - -#else /* LWIP_6LOWPAN_HC */ - /* Send uncompressed IPv6 header with appropriate dispatch byte. */ - lowpan6_header_len = 1; - buffer[ieee_header_len] = 0x41; /* IPv6 dispatch */ -#endif /* LWIP_6LOWPAN_HC */ - - /* Calculate remaining packet length */ - remaining_len = p->tot_len; - - if (remaining_len > 0x7FF) { - MIB2_STATS_NETIF_INC(netif, ifoutdiscards); - /* datagram_size must fit into 11 bit */ - pbuf_free(p_frag); - return ERR_VAL; - } - - /* Fragment, or 1 packet? */ - if (remaining_len > (127 - ieee_header_len - lowpan6_header_len - 3)) { /* 127 - header - 1 byte dispatch - 2 bytes CRC */ - /* We must move the 6LowPAN header to make room for the FRAG header. */ - i = lowpan6_header_len; - while (i-- != 0) { - buffer[ieee_header_len + i + 4] = buffer[ieee_header_len + i]; - } - - /* Now we need to fragment the packet. FRAG1 header first */ - buffer[ieee_header_len] = 0xc0 | (((p->tot_len + lowpan6_header_len) >> 8) & 0x7); - buffer[ieee_header_len + 1] = (p->tot_len + lowpan6_header_len) & 0xff; - - datagram_tag++; - buffer[ieee_header_len + 2] = datagram_tag & 0xff; - buffer[ieee_header_len + 3] = (datagram_tag >> 8) & 0xff; - - /* Fragment follows. */ - frag_len = (127 - ieee_header_len - 4 - 2) & 0xf8; - - pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len + 4, frag_len - lowpan6_header_len, 0); - remaining_len -= frag_len - lowpan6_header_len; - datagram_offset = frag_len; - - /* 2 bytes CRC */ -#if LWIP_6LOWPAN_HW_CRC - /* Leave blank, will be filled by HW. */ -#else /* LWIP_6LOWPAN_HW_CRC */ - /* @todo calculate CRC */ -#endif /* LWIP_6LOWPAN_HW_CRC */ - - /* Calculate frame length */ - p_frag->len = p_frag->tot_len = ieee_header_len + 4 + frag_len + 2; /* add 2 dummy bytes for crc*/ - - /* send the packet */ - MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); - LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); - err = netif->linkoutput(netif, p_frag); - - while ((remaining_len > 0) && (err == ERR_OK)) { - /* new frame, new seq num for ACK */ - buffer[2] = frame_seq_num++; - - buffer[ieee_header_len] |= 0x20; /* Change FRAG1 to FRAGN */ - - buffer[ieee_header_len + 4] = (u8_t)(datagram_offset >> 3); /* datagram offset in FRAGN header (datagram_offset is max. 11 bit) */ - - frag_len = (127 - ieee_header_len - 5 - 2) & 0xf8; - if (frag_len > remaining_len) { - frag_len = remaining_len; - } - - pbuf_copy_partial(p, buffer + ieee_header_len + 5, frag_len, p->tot_len - remaining_len); - remaining_len -= frag_len; - datagram_offset += frag_len; - - /* 2 bytes CRC */ -#if LWIP_6LOWPAN_HW_CRC - /* Leave blank, will be filled by HW. */ -#else /* LWIP_6LOWPAN_HW_CRC */ - /* @todo calculate CRC */ -#endif /* LWIP_6LOWPAN_HW_CRC */ - - /* Calculate frame length */ - p_frag->len = p_frag->tot_len = frag_len + 5 + ieee_header_len + 2; - - /* send the packet */ - MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); - LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); - err = netif->linkoutput(netif, p_frag); - } - } else { - /* It fits in one frame. */ - frag_len = remaining_len; - - /* Copy IPv6 packet */ - pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len, frag_len, 0); - remaining_len = 0; - - /* 2 bytes CRC */ -#if LWIP_6LOWPAN_HW_CRC - /* Leave blank, will be filled by HW. */ -#else /* LWIP_6LOWPAN_HW_CRC */ - /* @todo calculate CRC */ -#endif /* LWIP_6LOWPAN_HW_CRC */ - - /* Calculate frame length */ - p_frag->len = p_frag->tot_len = frag_len + lowpan6_header_len + ieee_header_len + 2; - - /* send the packet */ - MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); - LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); - err = netif->linkoutput(netif, p_frag); - } - - pbuf_free(p_frag); - - return err; -} - -err_t -lowpan6_set_context(u8_t idx, const ip6_addr_t * context) -{ - if (idx >= LWIP_6LOWPAN_NUM_CONTEXTS) { - return ERR_ARG; - } - - ip6_addr_set(&lowpan6_context[idx], context); - - return ERR_OK; -} - -#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS -err_t -lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low) -{ - short_mac_addr.addr[0] = addr_high; - short_mac_addr.addr[1] = addr_low; - - return ERR_OK; -} -#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ - -#if LWIP_IPV4 -err_t -lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) -{ - (void)netif; - (void)q; - (void)ipaddr; - - return ERR_IF; -} -#endif /* LWIP_IPV4 */ - -/** - * Resolve and fill-in IEEE 802.15.4 address header for outgoing IPv6 packet. - * - * Perform Header Compression and fragment if necessary. - * - * @param netif The lwIP network interface which the IP packet will be sent on. - * @param q The pbuf(s) containing the IP packet to be sent. - * @param ip6addr The IP address of the packet destination. - * - * @return err_t - */ -err_t -lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) -{ - err_t result; - const u8_t *hwaddr; - struct ieee_802154_addr src, dest; -#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS - ip6_addr_t ip6_src; - struct ip6_hdr * ip6_hdr; -#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ - -#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS - /* Check if we can compress source address (use aligned copy) */ - ip6_hdr = (struct ip6_hdr *)q->payload; - ip6_addr_set(&ip6_src, &ip6_hdr->src); - if (lowpan6_get_address_mode(&ip6_src, &short_mac_addr) == 3) { - src.addr_len = 2; - src.addr[0] = short_mac_addr.addr[0]; - src.addr[1] = short_mac_addr.addr[1]; - } else -#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ - { - src.addr_len = netif->hwaddr_len; - SMEMCPY(src.addr, netif->hwaddr, netif->hwaddr_len); - } - - /* multicast destination IP address? */ - if (ip6_addr_ismulticast(ip6addr)) { - MIB2_STATS_NETIF_INC(netif, ifoutnucastpkts); - /* We need to send to the broadcast address.*/ - return lowpan6_frag(netif, q, &src, &ieee_802154_broadcast); - } - - /* We have a unicast destination IP address */ - /* @todo anycast? */ - -#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS - if (src.addr_len == 2) { - /* If source address was compressable to short_mac_addr, and dest has same subnet and - * is also compressable to 2-bytes, assume we can infer dest as a short address too. */ - dest.addr_len = 2; - dest.addr[0] = ((u8_t *)q->payload)[38]; - dest.addr[1] = ((u8_t *)q->payload)[39]; - if ((src.addr_len == 2) && (ip6_addr_netcmp(&ip6_hdr->src, &ip6_hdr->dest)) && - (lowpan6_get_address_mode(ip6addr, &dest) == 3)) { - MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); - return lowpan6_frag(netif, q, &src, &dest); - } - } -#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ - - /* Ask ND6 what to do with the packet. */ - result = nd6_get_next_hop_addr_or_queue(netif, q, ip6addr, &hwaddr); - if (result != ERR_OK) { - MIB2_STATS_NETIF_INC(netif, ifoutdiscards); - return result; - } - - /* If no hardware address is returned, nd6 has queued the packet for later. */ - if (hwaddr == NULL) { - return ERR_OK; - } - - /* Send out the packet using the returned hardware address. */ - dest.addr_len = netif->hwaddr_len; - SMEMCPY(dest.addr, hwaddr, netif->hwaddr_len); - MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); - return lowpan6_frag(netif, q, &src, &dest); -} - -static struct pbuf * -lowpan6_decompress(struct pbuf * p, struct ieee_802154_addr * src, struct ieee_802154_addr * dest) -{ - struct pbuf * q; - u8_t * lowpan6_buffer; - s8_t lowpan6_offset; - struct ip6_hdr *ip6hdr; - s8_t i; - s8_t ip6_offset = IP6_HLEN; - - - q = pbuf_alloc(PBUF_IP, p->len + IP6_HLEN + UDP_HLEN, PBUF_POOL); - if (q == NULL) { - pbuf_free(p); - return NULL; - } - - lowpan6_buffer = (u8_t *)p->payload; - ip6hdr = (struct ip6_hdr *)q->payload; - - lowpan6_offset = 2; - if (lowpan6_buffer[1] & 0x80) { - lowpan6_offset++; - } - - /* Set IPv6 version, traffic class and flow label. */ - if ((lowpan6_buffer[0] & 0x18) == 0x00) { - IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset], ((lowpan6_buffer[lowpan6_offset+1] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset+3]); - lowpan6_offset += 4; - } else if ((lowpan6_buffer[0] & 0x18) == 0x08) { - IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset] & 0xc0, ((lowpan6_buffer[lowpan6_offset] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset+2]); - lowpan6_offset += 3; - } else if ((lowpan6_buffer[0] & 0x18) == 0x10) { - IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset],0); - lowpan6_offset += 1; - } else if ((lowpan6_buffer[0] & 0x18) == 0x18) { - IP6H_VTCFL_SET(ip6hdr, 6, 0, 0); - } - - /* Set Next Header */ - if ((lowpan6_buffer[0] & 0x04) == 0x00) { - IP6H_NEXTH_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); - } else { - /* We should fill this later with NHC decoding */ - IP6H_NEXTH_SET(ip6hdr, 0); - } - - /* Set Hop Limit */ - if ((lowpan6_buffer[0] & 0x03) == 0x00) { - IP6H_HOPLIM_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); - } else if ((lowpan6_buffer[0] & 0x03) == 0x01) { - IP6H_HOPLIM_SET(ip6hdr, 1); - } else if ((lowpan6_buffer[0] & 0x03) == 0x02) { - IP6H_HOPLIM_SET(ip6hdr, 64); - } else if ((lowpan6_buffer[0] & 0x03) == 0x03) { - IP6H_HOPLIM_SET(ip6hdr, 255); - } - - /* Source address decoding. */ - if ((lowpan6_buffer[1] & 0x40) == 0x00) { - /* Stateless compression */ - if ((lowpan6_buffer[1] & 0x30) == 0x00) { - /* copy full address */ - MEMCPY((void *)&ip6hdr->src.addr[0], lowpan6_buffer + lowpan6_offset, 16); - lowpan6_offset += 16; - } else if ((lowpan6_buffer[1] & 0x30) == 0x10) { - ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->src.addr[1] = 0; - MEMCPY((void *)&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); - lowpan6_offset += 8; - } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { - ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->src.addr[1] = 0; - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | - lowpan6_buffer[lowpan6_offset+1]); - lowpan6_offset += 2; - } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { - ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->src.addr[1] = 0; - if (src->addr_len == 2) { - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); - } else { - ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | - (src->addr[2] << 8) | src->addr[3]); - ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | - (src->addr[6] << 8) | src->addr[7]); - } - } - } else { - /* Stateful compression */ - if ((lowpan6_buffer[1] & 0x30) == 0x00) { - /* ANY address */ - ip6hdr->src.addr[0] = 0; - ip6hdr->src.addr[1] = 0; - ip6hdr->src.addr[2] = 0; - ip6hdr->src.addr[3] = 0; - } else { - /* Set prefix from context info */ - if (lowpan6_buffer[1] & 0x80) { - i = (lowpan6_buffer[2] >> 4) & 0x0f; - } else { - i = 0; - } - if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { - /* Error */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - ip6hdr->src.addr[0] = lowpan6_context[i].addr[0]; - ip6hdr->src.addr[1] = lowpan6_context[i].addr[1]; - } - - if ((lowpan6_buffer[1] & 0x30) == 0x10) { - MEMCPY((void *)&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); - lowpan6_offset += 8; - } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset+1]); - lowpan6_offset += 2; - } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { - if (src->addr_len == 2) { - ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); - } else { - ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | (src->addr[2] << 8) | src->addr[3]); - ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | (src->addr[6] << 8) | src->addr[7]); - } - } - } - - /* Destination address decoding. */ - if (lowpan6_buffer[1] & 0x08) { - /* Multicast destination */ - if (lowpan6_buffer[1] & 0x04) { - /* @todo support stateful multicast addressing */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - if ((lowpan6_buffer[1] & 0x03) == 0x00) { - /* copy full address */ - MEMCPY((void *)&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); - lowpan6_offset += 16; - } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { - ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | (lowpan6_buffer[lowpan6_offset++] << 16)); - ip6hdr->dest.addr[1] = 0; - ip6hdr->dest.addr[2] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); - ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 24) | (lowpan6_buffer[lowpan6_offset + 1] << 16) | (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset + 3]); - lowpan6_offset += 4; - } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { - ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | lowpan6_buffer[lowpan6_offset++]); - ip6hdr->dest.addr[1] = 0; - ip6hdr->dest.addr[2] = 0; - ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset + 2]); - lowpan6_offset += 3; - } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { - ip6hdr->dest.addr[0] = PP_HTONL(0xff020000UL); - ip6hdr->dest.addr[1] = 0; - ip6hdr->dest.addr[2] = 0; - ip6hdr->dest.addr[3] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); - } - - } else { - if (lowpan6_buffer[1] & 0x04) { - /* Stateful destination compression */ - /* Set prefix from context info */ - if (lowpan6_buffer[1] & 0x80) { - i = lowpan6_buffer[2] & 0x0f; - } else { - i = 0; - } - if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { - /* Error */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - ip6hdr->dest.addr[0] = lowpan6_context[i].addr[0]; - ip6hdr->dest.addr[1] = lowpan6_context[i].addr[1]; - } else { - /* Link local address compression */ - ip6hdr->dest.addr[0] = PP_HTONL(0xfe800000UL); - ip6hdr->dest.addr[1] = 0; - } - - if ((lowpan6_buffer[1] & 0x03) == 0x00) { - /* copy full address */ - MEMCPY((void *)&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); - lowpan6_offset += 16; - } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { - MEMCPY((void *)&ip6hdr->dest.addr[2], lowpan6_buffer + lowpan6_offset, 8); - lowpan6_offset += 8; - } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { - ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset + 1]); - lowpan6_offset += 2; - } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { - if (dest->addr_len == 2) { - ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); - ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (dest->addr[0] << 8) | dest->addr[1]); - } else { - ip6hdr->dest.addr[2] = lwip_htonl(((dest->addr[0] ^ 2) << 24) | (dest->addr[1] << 16) | dest->addr[2] << 8 | dest->addr[3]); - ip6hdr->dest.addr[3] = lwip_htonl((dest->addr[4] << 24) | (dest->addr[5] << 16) | dest->addr[6] << 8 | dest->addr[7]); - } - } - } - - - /* Next Header Compression (NHC) decoding? */ - if (lowpan6_buffer[0] & 0x04) { - if ((lowpan6_buffer[lowpan6_offset] & 0xf8) == 0xf0) { - struct udp_hdr *udphdr; - - /* UDP compression */ - IP6H_NEXTH_SET(ip6hdr, IP6_NEXTH_UDP); - udphdr = (struct udp_hdr *)((u8_t *)q->payload + ip6_offset); - - if (lowpan6_buffer[lowpan6_offset] & 0x04) { - /* @todo support checksum decompress */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - - /* Decompress ports */ - i = lowpan6_buffer[lowpan6_offset++] & 0x03; - if (i == 0) { - udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); - udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 2] << 8 | lowpan6_buffer[lowpan6_offset + 3]); - lowpan6_offset += 4; - } else if (i == 0x01) { - udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); - udphdr->dest = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset + 2]); - lowpan6_offset += 3; - } else if (i == 0x02) { - udphdr->src = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset]); - udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 1] << 8 | lowpan6_buffer[lowpan6_offset + 2]); - lowpan6_offset += 3; - } else if (i == 0x03) { - udphdr->src = lwip_htons(0xf0b0 | ((lowpan6_buffer[lowpan6_offset] >> 4) & 0x0f)); - udphdr->dest = lwip_htons(0xf0b0 | (lowpan6_buffer[lowpan6_offset] & 0x0f)); - lowpan6_offset += 1; - } - - udphdr->chksum = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); - lowpan6_offset += 2; - udphdr->len = lwip_htons(p->tot_len - lowpan6_offset + UDP_HLEN); - - ip6_offset += UDP_HLEN; - } else { - /* @todo support NHC other than UDP */ - pbuf_free(p); - pbuf_free(q); - return NULL; - } - } - - /* Now we copy leftover contents from p to q, so we have all L2 and L3 headers (and L4?) in a single PBUF. - * Replace p with q, and free p */ - pbuf_header(p, -lowpan6_offset); - MEMCPY((u8_t*)q->payload + ip6_offset, p->payload, p->len); - q->len = q->tot_len = ip6_offset + p->len; - if (p->next != NULL) { - pbuf_cat(q, p->next); - } - p->next = NULL; - pbuf_free(p); - - /* Infer IPv6 payload length for header */ - IP6H_PLEN_SET(ip6hdr, q->tot_len - IP6_HLEN); - - /* all done */ - return q; -} - -err_t -lowpan6_input(struct pbuf * p, struct netif *netif) -{ - u8_t * puc; - s8_t i; - struct ieee_802154_addr src, dest; - u16_t datagram_size, datagram_offset, datagram_tag; - struct lowpan6_reass_helper *lrh, *lrh_temp; - - MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); - - /* Analyze header. @todo validate. */ - puc = (u8_t*)p->payload; - datagram_offset = 5; - if ((puc[1] & 0x0c) == 0x0c) { - dest.addr_len = 8; - for (i = 0; i < 8; i++) { - dest.addr[i] = puc[datagram_offset + 7 - i]; - } - datagram_offset += 8; - } else { - dest.addr_len = 2; - dest.addr[0] = puc[datagram_offset + 1]; - dest.addr[1] = puc[datagram_offset]; - datagram_offset += 2; - } - - datagram_offset += 2; /* skip PAN ID. */ - - if ((puc[1] & 0xc0) == 0xc0) { - src.addr_len = 8; - for (i = 0; i < 8; i++) { - src.addr[i] = puc[datagram_offset + 7 - i]; - } - datagram_offset += 8; - } else { - src.addr_len = 2; - src.addr[0] = puc[datagram_offset + 1]; - src.addr[1] = puc[datagram_offset]; - datagram_offset += 2; - } - - pbuf_header(p, -datagram_offset); /* hide IEEE802.15.4 header. */ - - /* Check dispatch. */ - puc = (u8_t*)p->payload; - - if ((*puc & 0xf8) == 0xc0) { - /* FRAG1 dispatch. add this packet to reassembly list. */ - datagram_size = ((u16_t)(puc[0] & 0x07) << 8) | (u16_t)puc[1]; - datagram_tag = ((u16_t)puc[2] << 8) | (u16_t)puc[3]; - - /* check for duplicate */ - lrh = reass_list; - while (lrh != NULL) { - if ((lrh->sender_addr.addr_len == src.addr_len) && - (memcmp(lrh->sender_addr.addr, src.addr, src.addr_len) == 0)) { - /* address match with packet in reassembly. */ - if ((datagram_tag == lrh->datagram_tag) && (datagram_size == lrh->datagram_size)) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - /* duplicate fragment. */ - pbuf_free(p); - return ERR_OK; - } else { - /* We are receiving the start of a new datagram. Discard old one (incomplete). */ - lrh_temp = lrh->next_packet; - dequeue_datagram(lrh); - pbuf_free(lrh->pbuf); - mem_free(lrh); - - /* Check next datagram in queue. */ - lrh = lrh_temp; - } - } else { - /* Check next datagram in queue. */ - lrh = lrh->next_packet; - } - } - - pbuf_header(p, -4); /* hide frag1 dispatch */ - - lrh = (struct lowpan6_reass_helper *) mem_malloc(sizeof(struct lowpan6_reass_helper)); - if (lrh == NULL) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - pbuf_free(p); - return ERR_MEM; - } - - lrh->sender_addr.addr_len = src.addr_len; - for (i = 0; i < src.addr_len; i++) { - lrh->sender_addr.addr[i] = src.addr[i]; - } - lrh->datagram_size = datagram_size; - lrh->datagram_tag = datagram_tag; - lrh->pbuf = p; - lrh->next_packet = reass_list; - lrh->timer = 2; - reass_list = lrh; - - return ERR_OK; - } else if ((*puc & 0xf8) == 0xe0) { - /* FRAGN dispatch, find packet being reassembled. */ - datagram_size = ((u16_t)(puc[0] & 0x07) << 8) | (u16_t)puc[1]; - datagram_tag = ((u16_t)puc[2] << 8) | (u16_t)puc[3]; - datagram_offset = (u16_t)puc[4] << 3; - pbuf_header(p, -5); /* hide frag1 dispatch */ - - for (lrh = reass_list; lrh != NULL; lrh = lrh->next_packet) { - if ((lrh->sender_addr.addr_len == src.addr_len) && - (memcmp(lrh->sender_addr.addr, src.addr, src.addr_len) == 0) && - (datagram_tag == lrh->datagram_tag) && - (datagram_size == lrh->datagram_size)) { - break; - } - } - if (lrh == NULL) { - /* rogue fragment */ - MIB2_STATS_NETIF_INC(netif, ifindiscards); - pbuf_free(p); - return ERR_OK; - } - - if (lrh->pbuf->tot_len < datagram_offset) { - /* duplicate, ignore. */ - pbuf_free(p); - return ERR_OK; - } else if (lrh->pbuf->tot_len > datagram_offset) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - /* We have missed a fragment. Delete whole reassembly. */ - dequeue_datagram(lrh); - pbuf_free(lrh->pbuf); - mem_free(lrh); - pbuf_free(p); - return ERR_OK; - } - pbuf_cat(lrh->pbuf, p); - p = NULL; - - /* is packet now complete?*/ - if (lrh->pbuf->tot_len >= lrh->datagram_size) { - /* dequeue from reass list. */ - dequeue_datagram(lrh); - - /* get pbuf */ - p = lrh->pbuf; - - /* release helper */ - mem_free(lrh); - } else { - return ERR_OK; - } - } - - if (p == NULL) { - return ERR_OK; - } - - /* We have a complete packet, check dispatch for headers. */ - puc = (u8_t*)p->payload; - - if (*puc == 0x41) { - /* This is a complete IPv6 packet, just skip dispatch byte. */ - pbuf_header(p, -1); /* hide dispatch byte. */ - } else if ((*puc & 0xe0 )== 0x60) { - /* IPv6 headers are compressed using IPHC. */ - p = lowpan6_decompress(p, &src, &dest); - if (p == NULL) { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - return ERR_OK; - } - } else { - MIB2_STATS_NETIF_INC(netif, ifindiscards); - pbuf_free(p); - return ERR_OK; - } - - /* @todo: distinguish unicast/multicast */ - MIB2_STATS_NETIF_INC(netif, ifinucastpkts); - - return ip6_input(p, netif); -} - -err_t -lowpan6_if_init(struct netif *netif) -{ - netif->name[0] = 'L'; - netif->name[1] = '6'; -#if LWIP_IPV4 - netif->output = lowpan4_output; -#endif /* LWIP_IPV4 */ - netif->output_ip6 = lowpan6_output; - - MIB2_INIT_NETIF(netif, snmp_ifType_other, 0); - - /* maximum transfer unit */ - netif->mtu = 1280; - - /* broadcast capability */ - netif->flags = NETIF_FLAG_BROADCAST /* | NETIF_FLAG_LOWPAN6 */; - - return ERR_OK; -} - -err_t -lowpan6_set_pan_id(u16_t pan_id) -{ - ieee_802154_pan_id = pan_id; - - return ERR_OK; -} - -#if !NO_SYS -/** - * Pass a received packet to tcpip_thread for input processing - * - * @param p the received packet, p->payload pointing to the - * IEEE 802.15.4 header. - * @param inp the network interface on which the packet was received - */ -err_t -tcpip_6lowpan_input(struct pbuf *p, struct netif *inp) -{ - return tcpip_inpkt(p, inp, lowpan6_input); -} -#endif /* !NO_SYS */ - -#endif /* LWIP_IPV6 && LWIP_6LOWPAN */ +/** + * @file + * + * 6LowPAN output for IPv6. Uses ND tables for link-layer addressing. Fragments packets to 6LowPAN units. + */ + +/* + * Copyright (c) 2015 Inico Technologies Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Ivan Delamer + * + * + * Please coordinate changes and requests with Ivan Delamer + * + */ + +/** + * @defgroup sixlowpan 6LowPAN netif + * @ingroup addons + * 6LowPAN netif implementation + */ + +#include "netif/lowpan6.h" + +#if LWIP_IPV6 && LWIP_6LOWPAN + +#include "lwip/ip.h" +#include "lwip/pbuf.h" +#include "lwip/ip_addr.h" +#include "lwip/netif.h" +#include "lwip/nd6.h" +#include "lwip/mem.h" +#include "lwip/udp.h" +#include "lwip/tcpip.h" +#include "lwip/snmp.h" + +#include + +struct ieee_802154_addr { + u8_t addr_len; + u8_t addr[8]; +}; + +/** This is a helper struct. + */ +struct lowpan6_reass_helper { + struct pbuf *pbuf; + struct lowpan6_reass_helper *next_packet; + u8_t timer; + struct ieee_802154_addr sender_addr; + u16_t datagram_size; + u16_t datagram_tag; +}; + +static struct lowpan6_reass_helper * reass_list; + +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 +static ip6_addr_t lowpan6_context[LWIP_6LOWPAN_NUM_CONTEXTS]; +#endif + +static u16_t ieee_802154_pan_id; + +static const struct ieee_802154_addr ieee_802154_broadcast = {2, {0xff, 0xff}}; + +#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS +static struct ieee_802154_addr short_mac_addr = {2, {0,0}}; +#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ + +static err_t dequeue_datagram(struct lowpan6_reass_helper *lrh); + +/** + * Periodic timer for 6LowPAN functions: + * + * - Remove incomplete/old packets + */ +void +lowpan6_tmr(void) +{ + struct lowpan6_reass_helper *lrh, *lrh_temp; + + lrh = reass_list; + while (lrh != NULL) { + lrh_temp = lrh->next_packet; + if ((--lrh->timer) == 0) { + dequeue_datagram(lrh); + pbuf_free(lrh->pbuf); + mem_free(lrh); + } + lrh = lrh_temp; + } +} + +/** + * Removes a datagram from the reassembly queue. + **/ +static err_t +dequeue_datagram(struct lowpan6_reass_helper *lrh) +{ + struct lowpan6_reass_helper *lrh_temp; + + if (reass_list == lrh) { + reass_list = reass_list->next_packet; + } else { + lrh_temp = reass_list; + while (lrh_temp != NULL) { + if (lrh_temp->next_packet == lrh) { + lrh_temp->next_packet = lrh->next_packet; + break; + } + lrh_temp = lrh_temp->next_packet; + } + } + + return ERR_OK; +} + +static s8_t +lowpan6_context_lookup(const ip6_addr_t *ip6addr) +{ + s8_t i; + + for (i = 0; i < LWIP_6LOWPAN_NUM_CONTEXTS; i++) { + if (ip6_addr_netcmp(&lowpan6_context[i], ip6addr)) { + return i; + } + } + + return -1; +} + +/* Determine compression mode for unicast address. */ +static s8_t +lowpan6_get_address_mode(const ip6_addr_t *ip6addr, const struct ieee_802154_addr *mac_addr) +{ + if (mac_addr->addr_len == 2) { + if ((ip6addr->addr[2] == (u32_t)PP_HTONL(0x000000ff)) && + ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000))) { + if ((ip6addr->addr[3] & PP_HTONL(0x0000ffff)) == lwip_ntohl((mac_addr->addr[0] << 8) | mac_addr->addr[1])) { + return 3; + } + } + } else if (mac_addr->addr_len == 8) { + if ((ip6addr->addr[2] == lwip_ntohl(((mac_addr->addr[0] ^ 2) << 24) | (mac_addr->addr[1] << 16) | mac_addr->addr[2] << 8 | mac_addr->addr[3])) && + (ip6addr->addr[3] == lwip_ntohl((mac_addr->addr[4] << 24) | (mac_addr->addr[5] << 16) | mac_addr->addr[6] << 8 | mac_addr->addr[7]))) { + return 3; + } + } + + if ((ip6addr->addr[2] == PP_HTONL(0x000000ffUL)) && + ((ip6addr->addr[3] & PP_HTONL(0xffff0000)) == PP_NTOHL(0xfe000000UL))) { + return 2; + } + + return 1; +} + +/* Determine compression mode for multicast address. */ +static s8_t +lowpan6_get_address_mode_mc(const ip6_addr_t *ip6addr) +{ + if ((ip6addr->addr[0] == PP_HTONL(0xff020000)) && + (ip6addr->addr[1] == 0) && + (ip6addr->addr[2] == 0) && + ((ip6addr->addr[3] & PP_HTONL(0xffffff00)) == 0)) { + return 3; + } else if (((ip6addr->addr[0] & PP_HTONL(0xff00ffff)) == PP_HTONL(0xff000000)) && + (ip6addr->addr[1] == 0)) { + if ((ip6addr->addr[2] == 0) && + ((ip6addr->addr[3] & PP_HTONL(0xff000000)) == 0)) { + return 2; + } else if ((ip6addr->addr[2] & PP_HTONL(0xffffff00)) == 0) { + return 1; + } + } + + return 0; +} + +/* + * Encapsulates data into IEEE 802.15.4 frames. + * Fragments an IPv6 datagram into 6LowPAN units, which fit into IEEE 802.15.4 frames. + * If configured, will compress IPv6 and or UDP headers. + * */ +static err_t +lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr *src, const struct ieee_802154_addr *dst) +{ + struct pbuf * p_frag; + u16_t frag_len, remaining_len; + u8_t * buffer; + u8_t ieee_header_len; + u8_t lowpan6_header_len; + s8_t i; + static u8_t frame_seq_num; + static u16_t datagram_tag; + u16_t datagram_offset; + err_t err = ERR_IF; + + /* We'll use a dedicated pbuf for building 6LowPAN fragments. */ + p_frag = pbuf_alloc(PBUF_RAW, 127, PBUF_RAM); + if (p_frag == NULL) { + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + return ERR_MEM; + } + + /* Write IEEE 802.15.4 header. */ + buffer = (u8_t*)p_frag->payload; + ieee_header_len = 0; + if (dst == &ieee_802154_broadcast) { + buffer[ieee_header_len++] = 0x01; /* data packet, no ack required. */ + } else { + buffer[ieee_header_len++] = 0x21; /* data packet, ack required. */ + } + buffer[ieee_header_len] = (0x00 << 4); /* 2003 frame version */ + buffer[ieee_header_len] |= (dst->addr_len == 2) ? (0x02 << 2) : (0x03 << 2); /* destination addressing mode */ + buffer[ieee_header_len] |= (src->addr_len == 2) ? (0x02 << 6) : (0x03 << 6); /* source addressing mode */ + ieee_header_len++; + buffer[ieee_header_len++] = frame_seq_num++; + + buffer[ieee_header_len++] = ieee_802154_pan_id & 0xff; /* pan id */ + buffer[ieee_header_len++] = (ieee_802154_pan_id >> 8) & 0xff; /* pan id */ + i = dst->addr_len; + while (i-- > 0) { + buffer[ieee_header_len++] = dst->addr[i]; + } + + buffer[ieee_header_len++] = ieee_802154_pan_id & 0xff; /* pan id */ + buffer[ieee_header_len++] = (ieee_802154_pan_id >> 8) & 0xff; /* pan id */ + i = src->addr_len; + while (i-- > 0) { + buffer[ieee_header_len++] = src->addr[i]; + } + +#if LWIP_6LOWPAN_IPHC + /* Perform 6LowPAN IPv6 header compression according to RFC 6282 */ + { + struct ip6_hdr *ip6hdr; + + /* Point to ip6 header and align copies of src/dest addresses. */ + ip6hdr = (struct ip6_hdr *)p->payload; + ip_addr_copy_from_ip6(ip_data.current_iphdr_dest, ip6hdr->dest); + ip_addr_copy_from_ip6(ip_data.current_iphdr_src, ip6hdr->src); + + /* Basic length of 6LowPAN header, set dispatch and clear fields. */ + lowpan6_header_len = 2; + buffer[ieee_header_len] = 0x60; + buffer[ieee_header_len + 1] = 0; + + /* Determine whether there will be a Context Identifier Extension byte or not. + * If so, set it already. */ +#if LWIP_6LOWPAN_NUM_CONTEXTS > 0 + buffer[ieee_header_len + 2] = 0; + + i = lowpan6_context_lookup(ip_2_ip6(&ip_data.current_iphdr_src)); + if (i >= 0) { + /* Stateful source address compression. */ + buffer[ieee_header_len + 1] |= 0x40; + buffer[ieee_header_len + 2] |= (i & 0x0f) << 4; + } + + i = lowpan6_context_lookup(ip_2_ip6(&ip_data.current_iphdr_dest)); + if (i >= 0) { + /* Stateful destination address compression. */ + buffer[ieee_header_len + 1] |= 0x04; + buffer[ieee_header_len + 2] |= i & 0x0f; + } + + if (buffer[ieee_header_len + 2] != 0x00) { + /* Context identifier extension byte is appended. */ + buffer[ieee_header_len + 1] |= 0x80; + lowpan6_header_len++; + } +#endif /* LWIP_6LOWPAN_NUM_CONTEXTS > 0 */ + + /* Determine TF field: Traffic Class, Flow Label */ + if (IP6H_FL(ip6hdr) == 0) { + /* Flow label is elided. */ + buffer[ieee_header_len] |= 0x10; + if (IP6H_TC(ip6hdr) == 0) { + /* Traffic class (ECN+DSCP) elided too. */ + buffer[ieee_header_len] |= 0x08; + } else { + /* Traffic class (ECN+DSCP) appended. */ + buffer[ieee_header_len + lowpan6_header_len++] = IP6H_TC(ip6hdr); + } + } else { + if (((IP6H_TC(ip6hdr) & 0x3f) == 0)) { + /* DSCP portion of Traffic Class is elided, ECN and FL are appended (3 bytes) */ + buffer[ieee_header_len] |= 0x08; + + buffer[ieee_header_len + lowpan6_header_len] = IP6H_TC(ip6hdr) & 0xc0; + buffer[ieee_header_len + lowpan6_header_len++] |= (IP6H_FL(ip6hdr) >> 16) & 0x0f; + buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; + buffer[ieee_header_len + lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; + } else { + /* Traffic class and flow label are appended (4 bytes) */ + buffer[ieee_header_len + lowpan6_header_len++] = IP6H_TC(ip6hdr); + buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 16) & 0x0f; + buffer[ieee_header_len + lowpan6_header_len++] = (IP6H_FL(ip6hdr) >> 8) & 0xff; + buffer[ieee_header_len + lowpan6_header_len++] = IP6H_FL(ip6hdr) & 0xff; + } + } + + /* Compress NH? + * Only if UDP for now. @todo support other NH compression. */ + if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { + buffer[ieee_header_len] |= 0x04; + } else { + /* append nexth. */ + buffer[ieee_header_len + lowpan6_header_len++] = IP6H_NEXTH(ip6hdr); + } + + /* Compress hop limit? */ + if (IP6H_HOPLIM(ip6hdr) == 255) { + buffer[ieee_header_len] |= 0x03; + } else if (IP6H_HOPLIM(ip6hdr) == 64) { + buffer[ieee_header_len] |= 0x02; + } else if (IP6H_HOPLIM(ip6hdr) == 1) { + buffer[ieee_header_len] |= 0x01; + } else { + /* append hop limit */ + buffer[ieee_header_len + lowpan6_header_len++] = IP6H_HOPLIM(ip6hdr); + } + + /* Compress source address */ + if (((buffer[ieee_header_len + 1] & 0x40) != 0) || + (ip6_addr_islinklocal(ip_2_ip6(&ip_data.current_iphdr_src)))) { + /* Context-based or link-local source address compression. */ + i = lowpan6_get_address_mode(ip_2_ip6(&ip_data.current_iphdr_src), src); + buffer[ieee_header_len + 1] |= (i & 0x03) << 4; + if (i == 1) { + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 16, 8); + lowpan6_header_len += 8; + } else if (i == 2) { + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 22, 2); + lowpan6_header_len += 2; + } + } else if (ip6_addr_isany(ip_2_ip6(&ip_data.current_iphdr_src))) { + /* Special case: mark SAC and leave SAM=0 */ + buffer[ieee_header_len + 1] |= 0x40; + } else { + /* Append full address. */ + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 8, 16); + lowpan6_header_len += 16; + } + + /* Compress destination address */ + if (ip6_addr_ismulticast(ip_2_ip6(&ip_data.current_iphdr_dest))) { + /* @todo support stateful multicast address compression */ + + buffer[ieee_header_len + 1] |= 0x08; + + i = lowpan6_get_address_mode_mc(ip_2_ip6(&ip_data.current_iphdr_dest)); + buffer[ieee_header_len + 1] |= i & 0x03; + if (i == 0) { + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 24, 16); + lowpan6_header_len += 16; + } else if (i == 1) { + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 35, 5); + lowpan6_header_len += 5; + } else if (i == 2) { + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[25]; + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 37, 3); + lowpan6_header_len += 3; + } else if (i == 3) { + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[39]; + } + } else if (((buffer[ieee_header_len + 1] & 0x04) != 0) || + (ip6_addr_islinklocal(ip_2_ip6(&ip_data.current_iphdr_dest)))) { + /* Context-based or link-local destination address compression. */ + i = lowpan6_get_address_mode(ip_2_ip6(&ip_data.current_iphdr_dest), dst); + buffer[ieee_header_len + 1] |= i & 0x03; + if (i == 1) { + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 32, 8); + lowpan6_header_len += 8; + } else if (i == 2) { + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 38, 2); + lowpan6_header_len += 2; + } + } else { + /* Append full address. */ + MEMCPY(buffer + ieee_header_len + lowpan6_header_len, (u8_t*)p->payload + 24, 16); + lowpan6_header_len += 16; + } + + /* Move to payload. */ + pbuf_header(p, -IP6_HLEN); + + /* Compress UDP header? */ + if (IP6H_NEXTH(ip6hdr) == IP6_NEXTH_UDP) { + /* @todo support optional checksum compression */ + + buffer[ieee_header_len + lowpan6_header_len] = 0xf0; + + /* determine port compression mode. */ + if ((((u8_t *)p->payload)[0] == 0xf0) && ((((u8_t *)p->payload)[1] & 0xf0) == 0xb0) && + (((u8_t *)p->payload)[2] == 0xf0) && ((((u8_t *)p->payload)[3] & 0xf0) == 0xb0)) { + /* Compress source and dest ports. */ + buffer[ieee_header_len + lowpan6_header_len++] |= 0x03; + buffer[ieee_header_len + lowpan6_header_len++] = ((((u8_t *)p->payload)[1] & 0x0f) << 4) | (((u8_t *)p->payload)[3] & 0x0f); + } else if (((u8_t *)p->payload)[0] == 0xf0) { + /* Compress source port. */ + buffer[ieee_header_len + lowpan6_header_len++] |= 0x02; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[2]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; + } else if (((u8_t *)p->payload)[2] == 0xf0) { + /* Compress dest port. */ + buffer[ieee_header_len + lowpan6_header_len++] |= 0x01; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[0]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; + } else { + /* append full ports. */ + lowpan6_header_len++; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[0]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[1]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[2]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[3]; + } + + /* elide length and copy checksum */ + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[6]; + buffer[ieee_header_len + lowpan6_header_len++] = ((u8_t *)p->payload)[7]; + + pbuf_header(p, -UDP_HLEN); + } + } + +#else /* LWIP_6LOWPAN_HC */ + /* Send uncompressed IPv6 header with appropriate dispatch byte. */ + lowpan6_header_len = 1; + buffer[ieee_header_len] = 0x41; /* IPv6 dispatch */ +#endif /* LWIP_6LOWPAN_HC */ + + /* Calculate remaining packet length */ + remaining_len = p->tot_len; + + if (remaining_len > 0x7FF) { + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + /* datagram_size must fit into 11 bit */ + pbuf_free(p_frag); + return ERR_VAL; + } + + /* Fragment, or 1 packet? */ + if (remaining_len > (127 - ieee_header_len - lowpan6_header_len - 3)) { /* 127 - header - 1 byte dispatch - 2 bytes CRC */ + /* We must move the 6LowPAN header to make room for the FRAG header. */ + i = lowpan6_header_len; + while (i-- != 0) { + buffer[ieee_header_len + i + 4] = buffer[ieee_header_len + i]; + } + + /* Now we need to fragment the packet. FRAG1 header first */ + buffer[ieee_header_len] = 0xc0 | (((p->tot_len + lowpan6_header_len) >> 8) & 0x7); + buffer[ieee_header_len + 1] = (p->tot_len + lowpan6_header_len) & 0xff; + + datagram_tag++; + buffer[ieee_header_len + 2] = datagram_tag & 0xff; + buffer[ieee_header_len + 3] = (datagram_tag >> 8) & 0xff; + + /* Fragment follows. */ + frag_len = (127 - ieee_header_len - 4 - 2) & 0xf8; + + pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len + 4, frag_len - lowpan6_header_len, 0); + remaining_len -= frag_len - lowpan6_header_len; + datagram_offset = frag_len; + + /* 2 bytes CRC */ +#if LWIP_6LOWPAN_HW_CRC + /* Leave blank, will be filled by HW. */ +#else /* LWIP_6LOWPAN_HW_CRC */ + /* @todo calculate CRC */ +#endif /* LWIP_6LOWPAN_HW_CRC */ + + /* Calculate frame length */ + p_frag->len = p_frag->tot_len = ieee_header_len + 4 + frag_len + 2; /* add 2 dummy bytes for crc*/ + + /* send the packet */ + MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); + LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); + err = netif->linkoutput(netif, p_frag); + + while ((remaining_len > 0) && (err == ERR_OK)) { + /* new frame, new seq num for ACK */ + buffer[2] = frame_seq_num++; + + buffer[ieee_header_len] |= 0x20; /* Change FRAG1 to FRAGN */ + + buffer[ieee_header_len + 4] = (u8_t)(datagram_offset >> 3); /* datagram offset in FRAGN header (datagram_offset is max. 11 bit) */ + + frag_len = (127 - ieee_header_len - 5 - 2) & 0xf8; + if (frag_len > remaining_len) { + frag_len = remaining_len; + } + + pbuf_copy_partial(p, buffer + ieee_header_len + 5, frag_len, p->tot_len - remaining_len); + remaining_len -= frag_len; + datagram_offset += frag_len; + + /* 2 bytes CRC */ +#if LWIP_6LOWPAN_HW_CRC + /* Leave blank, will be filled by HW. */ +#else /* LWIP_6LOWPAN_HW_CRC */ + /* @todo calculate CRC */ +#endif /* LWIP_6LOWPAN_HW_CRC */ + + /* Calculate frame length */ + p_frag->len = p_frag->tot_len = frag_len + 5 + ieee_header_len + 2; + + /* send the packet */ + MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); + LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); + err = netif->linkoutput(netif, p_frag); + } + } else { + /* It fits in one frame. */ + frag_len = remaining_len; + + /* Copy IPv6 packet */ + pbuf_copy_partial(p, buffer + ieee_header_len + lowpan6_header_len, frag_len, 0); + remaining_len = 0; + + /* 2 bytes CRC */ +#if LWIP_6LOWPAN_HW_CRC + /* Leave blank, will be filled by HW. */ +#else /* LWIP_6LOWPAN_HW_CRC */ + /* @todo calculate CRC */ +#endif /* LWIP_6LOWPAN_HW_CRC */ + + /* Calculate frame length */ + p_frag->len = p_frag->tot_len = frag_len + lowpan6_header_len + ieee_header_len + 2; + + /* send the packet */ + MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p_frag->tot_len); + LWIP_DEBUGF(LOWPAN6_DEBUG | LWIP_DBG_TRACE, ("lowpan6_send: sending packet %p\n", (void *)p)); + err = netif->linkoutput(netif, p_frag); + } + + pbuf_free(p_frag); + + return err; +} + +err_t +lowpan6_set_context(u8_t idx, const ip6_addr_t * context) +{ + if (idx >= LWIP_6LOWPAN_NUM_CONTEXTS) { + return ERR_ARG; + } + + ip6_addr_set(&lowpan6_context[idx], context); + + return ERR_OK; +} + +#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS +err_t +lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low) +{ + short_mac_addr.addr[0] = addr_high; + short_mac_addr.addr[1] = addr_low; + + return ERR_OK; +} +#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ + +#if LWIP_IPV4 +err_t +lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) +{ + (void)netif; + (void)q; + (void)ipaddr; + + return ERR_IF; +} +#endif /* LWIP_IPV4 */ + +/** + * Resolve and fill-in IEEE 802.15.4 address header for outgoing IPv6 packet. + * + * Perform Header Compression and fragment if necessary. + * + * @param netif The lwIP network interface which the IP packet will be sent on. + * @param q The pbuf(s) containing the IP packet to be sent. + * @param ip6addr The IP address of the packet destination. + * + * @return err_t + */ +err_t +lowpan6_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) +{ + err_t result; + const u8_t *hwaddr; + struct ieee_802154_addr src, dest; +#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS + ip6_addr_t ip6_src; + struct ip6_hdr * ip6_hdr; +#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ + +#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS + /* Check if we can compress source address (use aligned copy) */ + ip6_hdr = (struct ip6_hdr *)q->payload; + ip6_addr_set(&ip6_src, &ip6_hdr->src); + if (lowpan6_get_address_mode(&ip6_src, &short_mac_addr) == 3) { + src.addr_len = 2; + src.addr[0] = short_mac_addr.addr[0]; + src.addr[1] = short_mac_addr.addr[1]; + } else +#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ + { + src.addr_len = netif->hwaddr_len; + SMEMCPY(src.addr, netif->hwaddr, netif->hwaddr_len); + } + + /* multicast destination IP address? */ + if (ip6_addr_ismulticast(ip6addr)) { + MIB2_STATS_NETIF_INC(netif, ifoutnucastpkts); + /* We need to send to the broadcast address.*/ + return lowpan6_frag(netif, q, &src, &ieee_802154_broadcast); + } + + /* We have a unicast destination IP address */ + /* @todo anycast? */ + +#if LWIP_6LOWPAN_INFER_SHORT_ADDRESS + if (src.addr_len == 2) { + /* If source address was compressable to short_mac_addr, and dest has same subnet and + * is also compressable to 2-bytes, assume we can infer dest as a short address too. */ + dest.addr_len = 2; + dest.addr[0] = ((u8_t *)q->payload)[38]; + dest.addr[1] = ((u8_t *)q->payload)[39]; + if ((src.addr_len == 2) && (ip6_addr_netcmp(&ip6_hdr->src, &ip6_hdr->dest)) && + (lowpan6_get_address_mode(ip6addr, &dest) == 3)) { + MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); + return lowpan6_frag(netif, q, &src, &dest); + } + } +#endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ + + /* Ask ND6 what to do with the packet. */ + result = nd6_get_next_hop_addr_or_queue(netif, q, ip6addr, &hwaddr); + if (result != ERR_OK) { + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + return result; + } + + /* If no hardware address is returned, nd6 has queued the packet for later. */ + if (hwaddr == NULL) { + return ERR_OK; + } + + /* Send out the packet using the returned hardware address. */ + dest.addr_len = netif->hwaddr_len; + SMEMCPY(dest.addr, hwaddr, netif->hwaddr_len); + MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); + return lowpan6_frag(netif, q, &src, &dest); +} + +static struct pbuf * +lowpan6_decompress(struct pbuf * p, struct ieee_802154_addr * src, struct ieee_802154_addr * dest) +{ + struct pbuf * q; + u8_t * lowpan6_buffer; + s8_t lowpan6_offset; + struct ip6_hdr *ip6hdr; + s8_t i; + s8_t ip6_offset = IP6_HLEN; + + + q = pbuf_alloc(PBUF_IP, p->len + IP6_HLEN + UDP_HLEN, PBUF_POOL); + if (q == NULL) { + pbuf_free(p); + return NULL; + } + + lowpan6_buffer = (u8_t *)p->payload; + ip6hdr = (struct ip6_hdr *)q->payload; + + lowpan6_offset = 2; + if (lowpan6_buffer[1] & 0x80) { + lowpan6_offset++; + } + + /* Set IPv6 version, traffic class and flow label. */ + if ((lowpan6_buffer[0] & 0x18) == 0x00) { + IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset], ((lowpan6_buffer[lowpan6_offset+1] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset+3]); + lowpan6_offset += 4; + } else if ((lowpan6_buffer[0] & 0x18) == 0x08) { + IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset] & 0xc0, ((lowpan6_buffer[lowpan6_offset] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset+2]); + lowpan6_offset += 3; + } else if ((lowpan6_buffer[0] & 0x18) == 0x10) { + IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset],0); + lowpan6_offset += 1; + } else if ((lowpan6_buffer[0] & 0x18) == 0x18) { + IP6H_VTCFL_SET(ip6hdr, 6, 0, 0); + } + + /* Set Next Header */ + if ((lowpan6_buffer[0] & 0x04) == 0x00) { + IP6H_NEXTH_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); + } else { + /* We should fill this later with NHC decoding */ + IP6H_NEXTH_SET(ip6hdr, 0); + } + + /* Set Hop Limit */ + if ((lowpan6_buffer[0] & 0x03) == 0x00) { + IP6H_HOPLIM_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); + } else if ((lowpan6_buffer[0] & 0x03) == 0x01) { + IP6H_HOPLIM_SET(ip6hdr, 1); + } else if ((lowpan6_buffer[0] & 0x03) == 0x02) { + IP6H_HOPLIM_SET(ip6hdr, 64); + } else if ((lowpan6_buffer[0] & 0x03) == 0x03) { + IP6H_HOPLIM_SET(ip6hdr, 255); + } + + /* Source address decoding. */ + if ((lowpan6_buffer[1] & 0x40) == 0x00) { + /* Stateless compression */ + if ((lowpan6_buffer[1] & 0x30) == 0x00) { + /* copy full address */ + MEMCPY((void *)&ip6hdr->src.addr[0], lowpan6_buffer + lowpan6_offset, 16); + lowpan6_offset += 16; + } else if ((lowpan6_buffer[1] & 0x30) == 0x10) { + ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->src.addr[1] = 0; + MEMCPY((void *)&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); + lowpan6_offset += 8; + } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { + ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->src.addr[1] = 0; + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | + lowpan6_buffer[lowpan6_offset+1]); + lowpan6_offset += 2; + } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { + ip6hdr->src.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->src.addr[1] = 0; + if (src->addr_len == 2) { + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); + } else { + ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | + (src->addr[2] << 8) | src->addr[3]); + ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | + (src->addr[6] << 8) | src->addr[7]); + } + } + } else { + /* Stateful compression */ + if ((lowpan6_buffer[1] & 0x30) == 0x00) { + /* ANY address */ + ip6hdr->src.addr[0] = 0; + ip6hdr->src.addr[1] = 0; + ip6hdr->src.addr[2] = 0; + ip6hdr->src.addr[3] = 0; + } else { + /* Set prefix from context info */ + if (lowpan6_buffer[1] & 0x80) { + i = (lowpan6_buffer[2] >> 4) & 0x0f; + } else { + i = 0; + } + if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { + /* Error */ + pbuf_free(p); + pbuf_free(q); + return NULL; + } + + ip6hdr->src.addr[0] = lowpan6_context[i].addr[0]; + ip6hdr->src.addr[1] = lowpan6_context[i].addr[1]; + } + + if ((lowpan6_buffer[1] & 0x30) == 0x10) { + MEMCPY((void *)&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); + lowpan6_offset += 8; + } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset+1]); + lowpan6_offset += 2; + } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { + if (src->addr_len == 2) { + ip6hdr->src.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (src->addr[0] << 8) | src->addr[1]); + } else { + ip6hdr->src.addr[2] = lwip_htonl(((src->addr[0] ^ 2) << 24) | (src->addr[1] << 16) | (src->addr[2] << 8) | src->addr[3]); + ip6hdr->src.addr[3] = lwip_htonl((src->addr[4] << 24) | (src->addr[5] << 16) | (src->addr[6] << 8) | src->addr[7]); + } + } + } + + /* Destination address decoding. */ + if (lowpan6_buffer[1] & 0x08) { + /* Multicast destination */ + if (lowpan6_buffer[1] & 0x04) { + /* @todo support stateful multicast addressing */ + pbuf_free(p); + pbuf_free(q); + return NULL; + } + + if ((lowpan6_buffer[1] & 0x03) == 0x00) { + /* copy full address */ + MEMCPY((void *)&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); + lowpan6_offset += 16; + } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { + ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | (lowpan6_buffer[lowpan6_offset++] << 16)); + ip6hdr->dest.addr[1] = 0; + ip6hdr->dest.addr[2] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); + ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 24) | (lowpan6_buffer[lowpan6_offset + 1] << 16) | (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset + 3]); + lowpan6_offset += 4; + } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { + ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | lowpan6_buffer[lowpan6_offset++]); + ip6hdr->dest.addr[1] = 0; + ip6hdr->dest.addr[2] = 0; + ip6hdr->dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 16) | (lowpan6_buffer[lowpan6_offset + 1] << 8) | lowpan6_buffer[lowpan6_offset + 2]); + lowpan6_offset += 3; + } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { + ip6hdr->dest.addr[0] = PP_HTONL(0xff020000UL); + ip6hdr->dest.addr[1] = 0; + ip6hdr->dest.addr[2] = 0; + ip6hdr->dest.addr[3] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); + } + + } else { + if (lowpan6_buffer[1] & 0x04) { + /* Stateful destination compression */ + /* Set prefix from context info */ + if (lowpan6_buffer[1] & 0x80) { + i = lowpan6_buffer[2] & 0x0f; + } else { + i = 0; + } + if (i >= LWIP_6LOWPAN_NUM_CONTEXTS) { + /* Error */ + pbuf_free(p); + pbuf_free(q); + return NULL; + } + + ip6hdr->dest.addr[0] = lowpan6_context[i].addr[0]; + ip6hdr->dest.addr[1] = lowpan6_context[i].addr[1]; + } else { + /* Link local address compression */ + ip6hdr->dest.addr[0] = PP_HTONL(0xfe800000UL); + ip6hdr->dest.addr[1] = 0; + } + + if ((lowpan6_buffer[1] & 0x03) == 0x00) { + /* copy full address */ + MEMCPY((void *)&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); + lowpan6_offset += 16; + } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { + MEMCPY((void *)&ip6hdr->dest.addr[2], lowpan6_buffer + lowpan6_offset, 8); + lowpan6_offset += 8; + } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { + ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_buffer[lowpan6_offset + 1]); + lowpan6_offset += 2; + } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { + if (dest->addr_len == 2) { + ip6hdr->dest.addr[2] = PP_HTONL(0x000000ffUL); + ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (dest->addr[0] << 8) | dest->addr[1]); + } else { + ip6hdr->dest.addr[2] = lwip_htonl(((dest->addr[0] ^ 2) << 24) | (dest->addr[1] << 16) | dest->addr[2] << 8 | dest->addr[3]); + ip6hdr->dest.addr[3] = lwip_htonl((dest->addr[4] << 24) | (dest->addr[5] << 16) | dest->addr[6] << 8 | dest->addr[7]); + } + } + } + + + /* Next Header Compression (NHC) decoding? */ + if (lowpan6_buffer[0] & 0x04) { + if ((lowpan6_buffer[lowpan6_offset] & 0xf8) == 0xf0) { + struct udp_hdr *udphdr; + + /* UDP compression */ + IP6H_NEXTH_SET(ip6hdr, IP6_NEXTH_UDP); + udphdr = (struct udp_hdr *)((u8_t *)q->payload + ip6_offset); + + if (lowpan6_buffer[lowpan6_offset] & 0x04) { + /* @todo support checksum decompress */ + pbuf_free(p); + pbuf_free(q); + return NULL; + } + + /* Decompress ports */ + i = lowpan6_buffer[lowpan6_offset++] & 0x03; + if (i == 0) { + udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); + udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 2] << 8 | lowpan6_buffer[lowpan6_offset + 3]); + lowpan6_offset += 4; + } else if (i == 0x01) { + udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); + udphdr->dest = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset + 2]); + lowpan6_offset += 3; + } else if (i == 0x02) { + udphdr->src = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset]); + udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 1] << 8 | lowpan6_buffer[lowpan6_offset + 2]); + lowpan6_offset += 3; + } else if (i == 0x03) { + udphdr->src = lwip_htons(0xf0b0 | ((lowpan6_buffer[lowpan6_offset] >> 4) & 0x0f)); + udphdr->dest = lwip_htons(0xf0b0 | (lowpan6_buffer[lowpan6_offset] & 0x0f)); + lowpan6_offset += 1; + } + + udphdr->chksum = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); + lowpan6_offset += 2; + udphdr->len = lwip_htons(p->tot_len - lowpan6_offset + UDP_HLEN); + + ip6_offset += UDP_HLEN; + } else { + /* @todo support NHC other than UDP */ + pbuf_free(p); + pbuf_free(q); + return NULL; + } + } + + /* Now we copy leftover contents from p to q, so we have all L2 and L3 headers (and L4?) in a single PBUF. + * Replace p with q, and free p */ + pbuf_header(p, -lowpan6_offset); + MEMCPY((u8_t*)q->payload + ip6_offset, p->payload, p->len); + q->len = q->tot_len = ip6_offset + p->len; + if (p->next != NULL) { + pbuf_cat(q, p->next); + } + p->next = NULL; + pbuf_free(p); + + /* Infer IPv6 payload length for header */ + IP6H_PLEN_SET(ip6hdr, q->tot_len - IP6_HLEN); + + /* all done */ + return q; +} + +err_t +lowpan6_input(struct pbuf * p, struct netif *netif) +{ + u8_t * puc; + s8_t i; + struct ieee_802154_addr src, dest; + u16_t datagram_size, datagram_offset, datagram_tag; + struct lowpan6_reass_helper *lrh, *lrh_temp; + + MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); + + /* Analyze header. @todo validate. */ + puc = (u8_t*)p->payload; + datagram_offset = 5; + if ((puc[1] & 0x0c) == 0x0c) { + dest.addr_len = 8; + for (i = 0; i < 8; i++) { + dest.addr[i] = puc[datagram_offset + 7 - i]; + } + datagram_offset += 8; + } else { + dest.addr_len = 2; + dest.addr[0] = puc[datagram_offset + 1]; + dest.addr[1] = puc[datagram_offset]; + datagram_offset += 2; + } + + datagram_offset += 2; /* skip PAN ID. */ + + if ((puc[1] & 0xc0) == 0xc0) { + src.addr_len = 8; + for (i = 0; i < 8; i++) { + src.addr[i] = puc[datagram_offset + 7 - i]; + } + datagram_offset += 8; + } else { + src.addr_len = 2; + src.addr[0] = puc[datagram_offset + 1]; + src.addr[1] = puc[datagram_offset]; + datagram_offset += 2; + } + + pbuf_header(p, -datagram_offset); /* hide IEEE802.15.4 header. */ + + /* Check dispatch. */ + puc = (u8_t*)p->payload; + + if ((*puc & 0xf8) == 0xc0) { + /* FRAG1 dispatch. add this packet to reassembly list. */ + datagram_size = ((u16_t)(puc[0] & 0x07) << 8) | (u16_t)puc[1]; + datagram_tag = ((u16_t)puc[2] << 8) | (u16_t)puc[3]; + + /* check for duplicate */ + lrh = reass_list; + while (lrh != NULL) { + if ((lrh->sender_addr.addr_len == src.addr_len) && + (memcmp(lrh->sender_addr.addr, src.addr, src.addr_len) == 0)) { + /* address match with packet in reassembly. */ + if ((datagram_tag == lrh->datagram_tag) && (datagram_size == lrh->datagram_size)) { + MIB2_STATS_NETIF_INC(netif, ifindiscards); + /* duplicate fragment. */ + pbuf_free(p); + return ERR_OK; + } else { + /* We are receiving the start of a new datagram. Discard old one (incomplete). */ + lrh_temp = lrh->next_packet; + dequeue_datagram(lrh); + pbuf_free(lrh->pbuf); + mem_free(lrh); + + /* Check next datagram in queue. */ + lrh = lrh_temp; + } + } else { + /* Check next datagram in queue. */ + lrh = lrh->next_packet; + } + } + + pbuf_header(p, -4); /* hide frag1 dispatch */ + + lrh = (struct lowpan6_reass_helper *) mem_malloc(sizeof(struct lowpan6_reass_helper)); + if (lrh == NULL) { + MIB2_STATS_NETIF_INC(netif, ifindiscards); + pbuf_free(p); + return ERR_MEM; + } + + lrh->sender_addr.addr_len = src.addr_len; + for (i = 0; i < src.addr_len; i++) { + lrh->sender_addr.addr[i] = src.addr[i]; + } + lrh->datagram_size = datagram_size; + lrh->datagram_tag = datagram_tag; + lrh->pbuf = p; + lrh->next_packet = reass_list; + lrh->timer = 2; + reass_list = lrh; + + return ERR_OK; + } else if ((*puc & 0xf8) == 0xe0) { + /* FRAGN dispatch, find packet being reassembled. */ + datagram_size = ((u16_t)(puc[0] & 0x07) << 8) | (u16_t)puc[1]; + datagram_tag = ((u16_t)puc[2] << 8) | (u16_t)puc[3]; + datagram_offset = (u16_t)puc[4] << 3; + pbuf_header(p, -5); /* hide frag1 dispatch */ + + for (lrh = reass_list; lrh != NULL; lrh = lrh->next_packet) { + if ((lrh->sender_addr.addr_len == src.addr_len) && + (memcmp(lrh->sender_addr.addr, src.addr, src.addr_len) == 0) && + (datagram_tag == lrh->datagram_tag) && + (datagram_size == lrh->datagram_size)) { + break; + } + } + if (lrh == NULL) { + /* rogue fragment */ + MIB2_STATS_NETIF_INC(netif, ifindiscards); + pbuf_free(p); + return ERR_OK; + } + + if (lrh->pbuf->tot_len < datagram_offset) { + /* duplicate, ignore. */ + pbuf_free(p); + return ERR_OK; + } else if (lrh->pbuf->tot_len > datagram_offset) { + MIB2_STATS_NETIF_INC(netif, ifindiscards); + /* We have missed a fragment. Delete whole reassembly. */ + dequeue_datagram(lrh); + pbuf_free(lrh->pbuf); + mem_free(lrh); + pbuf_free(p); + return ERR_OK; + } + pbuf_cat(lrh->pbuf, p); + p = NULL; + + /* is packet now complete?*/ + if (lrh->pbuf->tot_len >= lrh->datagram_size) { + /* dequeue from reass list. */ + dequeue_datagram(lrh); + + /* get pbuf */ + p = lrh->pbuf; + + /* release helper */ + mem_free(lrh); + } else { + return ERR_OK; + } + } + + if (p == NULL) { + return ERR_OK; + } + + /* We have a complete packet, check dispatch for headers. */ + puc = (u8_t*)p->payload; + + if (*puc == 0x41) { + /* This is a complete IPv6 packet, just skip dispatch byte. */ + pbuf_header(p, -1); /* hide dispatch byte. */ + } else if ((*puc & 0xe0 )== 0x60) { + /* IPv6 headers are compressed using IPHC. */ + p = lowpan6_decompress(p, &src, &dest); + if (p == NULL) { + MIB2_STATS_NETIF_INC(netif, ifindiscards); + return ERR_OK; + } + } else { + MIB2_STATS_NETIF_INC(netif, ifindiscards); + pbuf_free(p); + return ERR_OK; + } + + /* @todo: distinguish unicast/multicast */ + MIB2_STATS_NETIF_INC(netif, ifinucastpkts); + + return ip6_input(p, netif); +} + +err_t +lowpan6_if_init(struct netif *netif) +{ + netif->name[0] = 'L'; + netif->name[1] = '6'; +#if LWIP_IPV4 + netif->output = lowpan4_output; +#endif /* LWIP_IPV4 */ + netif->output_ip6 = lowpan6_output; + + MIB2_INIT_NETIF(netif, snmp_ifType_other, 0); + + /* maximum transfer unit */ + netif->mtu = 1280; + + /* broadcast capability */ + netif->flags = NETIF_FLAG_BROADCAST /* | NETIF_FLAG_LOWPAN6 */; + + return ERR_OK; +} + +err_t +lowpan6_set_pan_id(u16_t pan_id) +{ + ieee_802154_pan_id = pan_id; + + return ERR_OK; +} + +#if !NO_SYS +/** + * Pass a received packet to tcpip_thread for input processing + * + * @param p the received packet, p->payload pointing to the + * IEEE 802.15.4 header. + * @param inp the network interface on which the packet was received + */ +err_t +tcpip_6lowpan_input(struct pbuf *p, struct netif *inp) +{ + return tcpip_inpkt(p, inp, lowpan6_input); +} +#endif /* !NO_SYS */ + +#endif /* LWIP_IPV6 && LWIP_6LOWPAN */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/auth.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/auth.c index c8673ad..fee01ae 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/auth.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/auth.c @@ -1,2510 +1,2510 @@ -/* - * auth.c - PPP authentication and phase control. - * - * Copyright (c) 1993-2002 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Derived from main.c, which is: - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#if 0 /* UNUSED */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if defined(_PATH_LASTLOG) && defined(__linux__) -#include -#endif - -#include -#include -#include - -#ifdef HAS_SHADOW -#include -#ifndef PW_PPP -#define PW_PPP PW_LOGIN -#endif -#endif - -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/lcp.h" -#if CCP_SUPPORT -#include "netif/ppp/ccp.h" -#endif /* CCP_SUPPORT */ -#if ECP_SUPPORT -#include "netif/ppp/ecp.h" -#endif /* ECP_SUPPORT */ -#include "netif/ppp/ipcp.h" -#if PAP_SUPPORT -#include "netif/ppp/upap.h" -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT -#include "netif/ppp/chap-new.h" -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT -#include "netif/ppp/eap.h" -#endif /* EAP_SUPPORT */ -#if CBCP_SUPPORT -#include "netif/ppp/cbcp.h" -#endif - -#if 0 /* UNUSED */ -#include "session.h" -#endif /* UNUSED */ - -#if 0 /* UNUSED */ -/* Bits in scan_authfile return value */ -#define NONWILD_SERVER 1 -#define NONWILD_CLIENT 2 - -#define ISWILD(word) (word[0] == '*' && word[1] == 0) -#endif /* UNUSED */ - -#if 0 /* UNUSED */ -/* List of addresses which the peer may use. */ -static struct permitted_ip *addresses[NUM_PPP]; - -/* Wordlist giving addresses which the peer may use - without authenticating itself. */ -static struct wordlist *noauth_addrs; - -/* Remote telephone number, if available */ -char remote_number[MAXNAMELEN]; - -/* Wordlist giving remote telephone numbers which may connect. */ -static struct wordlist *permitted_numbers; - -/* Extra options to apply, from the secrets file entry for the peer. */ -static struct wordlist *extra_options; -#endif /* UNUSED */ - -#if 0 /* UNUSED */ -/* Set if we require authentication only because we have a default route. */ -static bool default_auth; - -/* Hook to enable a plugin to control the idle time limit */ -int (*idle_time_hook) (struct ppp_idle *) = NULL; - -/* Hook for a plugin to say whether we can possibly authenticate any peer */ -int (*pap_check_hook) (void) = NULL; - -/* Hook for a plugin to check the PAP user and password */ -int (*pap_auth_hook) (char *user, char *passwd, char **msgp, - struct wordlist **paddrs, - struct wordlist **popts) = NULL; - -/* Hook for a plugin to know about the PAP user logout */ -void (*pap_logout_hook) (void) = NULL; - -/* Hook for a plugin to get the PAP password for authenticating us */ -int (*pap_passwd_hook) (char *user, char *passwd) = NULL; - -/* Hook for a plugin to say if we can possibly authenticate a peer using CHAP */ -int (*chap_check_hook) (void) = NULL; - -/* Hook for a plugin to get the CHAP password for authenticating us */ -int (*chap_passwd_hook) (char *user, char *passwd) = NULL; - -/* Hook for a plugin to say whether it is OK if the peer - refuses to authenticate. */ -int (*null_auth_hook) (struct wordlist **paddrs, - struct wordlist **popts) = NULL; - -int (*allowed_address_hook) (u32_t addr) = NULL; -#endif /* UNUSED */ - -#ifdef HAVE_MULTILINK -/* Hook for plugin to hear when an interface joins a multilink bundle */ -void (*multilink_join_hook) (void) = NULL; -#endif - -#if PPP_NOTIFY -/* A notifier for when the peer has authenticated itself, - and we are proceeding to the network phase. */ -struct notifier *auth_up_notifier = NULL; - -/* A notifier for when the link goes down. */ -struct notifier *link_down_notifier = NULL; -#endif /* PPP_NOTIFY */ - -/* - * Option variables. - */ -#if 0 /* MOVED TO ppp_settings */ -bool uselogin = 0; /* Use /etc/passwd for checking PAP */ -bool session_mgmt = 0; /* Do session management (login records) */ -bool cryptpap = 0; /* Passwords in pap-secrets are encrypted */ -bool refuse_pap = 0; /* Don't wanna auth. ourselves with PAP */ -bool refuse_chap = 0; /* Don't wanna auth. ourselves with CHAP */ -bool refuse_eap = 0; /* Don't wanna auth. ourselves with EAP */ -#if MSCHAP_SUPPORT -bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */ -bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */ -#else /* MSCHAP_SUPPORT */ -bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */ -bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */ -#endif /* MSCHAP_SUPPORT */ -bool usehostname = 0; /* Use hostname for our_name */ -bool auth_required = 0; /* Always require authentication from peer */ -bool allow_any_ip = 0; /* Allow peer to use any IP address */ -bool explicit_remote = 0; /* User specified explicit remote name */ -bool explicit_user = 0; /* Set if "user" option supplied */ -bool explicit_passwd = 0; /* Set if "password" option supplied */ -char remote_name[MAXNAMELEN]; /* Peer's name for authentication */ -static char *uafname; /* name of most recent +ua file */ - -extern char *crypt (const char *, const char *); -#endif /* UNUSED */ -/* Prototypes for procedures local to this file. */ - -static void network_phase(ppp_pcb *pcb); -#if PPP_IDLETIMELIMIT -static void check_idle(void *arg); -#endif /* PPP_IDLETIMELIMIT */ -#if PPP_MAXCONNECT -static void connect_time_expired(void *arg); -#endif /* PPP_MAXCONNECT */ -#if 0 /* UNUSED */ -static int null_login (int); -/* static int get_pap_passwd (char *); */ -static int have_pap_secret (int *); -static int have_chap_secret (char *, char *, int, int *); -static int have_srp_secret (char *client, char *server, int need_ip, - int *lacks_ipp); -static int ip_addr_check (u32_t, struct permitted_ip *); -static int scan_authfile (FILE *, char *, char *, char *, - struct wordlist **, struct wordlist **, - char *, int); -static void free_wordlist (struct wordlist *); -static void set_allowed_addrs (int, struct wordlist *, struct wordlist *); -static int some_ip_ok (struct wordlist *); -static int setupapfile (char **); -static int privgroup (char **); -static int set_noauth_addr (char **); -static int set_permitted_number (char **); -static void check_access (FILE *, char *); -static int wordlist_count (struct wordlist *); -#endif /* UNUSED */ - -#ifdef MAXOCTETS -static void check_maxoctets (void *); -#endif - -#if PPP_OPTIONS -/* - * Authentication-related options. - */ -option_t auth_options[] = { - { "auth", o_bool, &auth_required, - "Require authentication from peer", OPT_PRIO | 1 }, - { "noauth", o_bool, &auth_required, - "Don't require peer to authenticate", OPT_PRIOSUB | OPT_PRIV, - &allow_any_ip }, - { "require-pap", o_bool, &lcp_wantoptions[0].neg_upap, - "Require PAP authentication from peer", - OPT_PRIOSUB | 1, &auth_required }, - { "+pap", o_bool, &lcp_wantoptions[0].neg_upap, - "Require PAP authentication from peer", - OPT_ALIAS | OPT_PRIOSUB | 1, &auth_required }, - { "require-chap", o_bool, &auth_required, - "Require CHAP authentication from peer", - OPT_PRIOSUB | OPT_A2OR | MDTYPE_MD5, - &lcp_wantoptions[0].chap_mdtype }, - { "+chap", o_bool, &auth_required, - "Require CHAP authentication from peer", - OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MD5, - &lcp_wantoptions[0].chap_mdtype }, -#if MSCHAP_SUPPORT - { "require-mschap", o_bool, &auth_required, - "Require MS-CHAP authentication from peer", - OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT, - &lcp_wantoptions[0].chap_mdtype }, - { "+mschap", o_bool, &auth_required, - "Require MS-CHAP authentication from peer", - OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT, - &lcp_wantoptions[0].chap_mdtype }, - { "require-mschap-v2", o_bool, &auth_required, - "Require MS-CHAPv2 authentication from peer", - OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2, - &lcp_wantoptions[0].chap_mdtype }, - { "+mschap-v2", o_bool, &auth_required, - "Require MS-CHAPv2 authentication from peer", - OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2, - &lcp_wantoptions[0].chap_mdtype }, -#endif /* MSCHAP_SUPPORT */ -#if 0 - { "refuse-pap", o_bool, &refuse_pap, - "Don't agree to auth to peer with PAP", 1 }, - { "-pap", o_bool, &refuse_pap, - "Don't allow PAP authentication with peer", OPT_ALIAS | 1 }, - { "refuse-chap", o_bool, &refuse_chap, - "Don't agree to auth to peer with CHAP", - OPT_A2CLRB | MDTYPE_MD5, - &lcp_allowoptions[0].chap_mdtype }, - { "-chap", o_bool, &refuse_chap, - "Don't allow CHAP authentication with peer", - OPT_ALIAS | OPT_A2CLRB | MDTYPE_MD5, - &lcp_allowoptions[0].chap_mdtype }, -#endif -#if MSCHAP_SUPPORT -#if 0 - { "refuse-mschap", o_bool, &refuse_mschap, - "Don't agree to auth to peer with MS-CHAP", - OPT_A2CLRB | MDTYPE_MICROSOFT, - &lcp_allowoptions[0].chap_mdtype }, - { "-mschap", o_bool, &refuse_mschap, - "Don't allow MS-CHAP authentication with peer", - OPT_ALIAS | OPT_A2CLRB | MDTYPE_MICROSOFT, - &lcp_allowoptions[0].chap_mdtype }, - { "refuse-mschap-v2", o_bool, &refuse_mschap_v2, - "Don't agree to auth to peer with MS-CHAPv2", - OPT_A2CLRB | MDTYPE_MICROSOFT_V2, - &lcp_allowoptions[0].chap_mdtype }, - { "-mschap-v2", o_bool, &refuse_mschap_v2, - "Don't allow MS-CHAPv2 authentication with peer", - OPT_ALIAS | OPT_A2CLRB | MDTYPE_MICROSOFT_V2, - &lcp_allowoptions[0].chap_mdtype }, -#endif -#endif /* MSCHAP_SUPPORT*/ -#if EAP_SUPPORT - { "require-eap", o_bool, &lcp_wantoptions[0].neg_eap, - "Require EAP authentication from peer", OPT_PRIOSUB | 1, - &auth_required }, -#if 0 - { "refuse-eap", o_bool, &refuse_eap, - "Don't agree to authenticate to peer with EAP", 1 }, -#endif -#endif /* EAP_SUPPORT */ - { "name", o_string, our_name, - "Set local name for authentication", - OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, MAXNAMELEN }, - - { "+ua", o_special, (void *)setupapfile, - "Get PAP user and password from file", - OPT_PRIO | OPT_A2STRVAL, &uafname }, - -#if 0 - { "user", o_string, user, - "Set name for auth with peer", OPT_PRIO | OPT_STATIC, - &explicit_user, MAXNAMELEN }, - - { "password", o_string, passwd, - "Password for authenticating us to the peer", - OPT_PRIO | OPT_STATIC | OPT_HIDE, - &explicit_passwd, MAXSECRETLEN }, -#endif - - { "usehostname", o_bool, &usehostname, - "Must use hostname for authentication", 1 }, - - { "remotename", o_string, remote_name, - "Set remote name for authentication", OPT_PRIO | OPT_STATIC, - &explicit_remote, MAXNAMELEN }, - - { "login", o_bool, &uselogin, - "Use system password database for PAP", OPT_A2COPY | 1 , - &session_mgmt }, - { "enable-session", o_bool, &session_mgmt, - "Enable session accounting for remote peers", OPT_PRIV | 1 }, - - { "papcrypt", o_bool, &cryptpap, - "PAP passwords are encrypted", 1 }, - - { "privgroup", o_special, (void *)privgroup, - "Allow group members to use privileged options", OPT_PRIV | OPT_A2LIST }, - - { "allow-ip", o_special, (void *)set_noauth_addr, - "Set IP address(es) which can be used without authentication", - OPT_PRIV | OPT_A2LIST }, - - { "remotenumber", o_string, remote_number, - "Set remote telephone number for authentication", OPT_PRIO | OPT_STATIC, - NULL, MAXNAMELEN }, - - { "allow-number", o_special, (void *)set_permitted_number, - "Set telephone number(s) which are allowed to connect", - OPT_PRIV | OPT_A2LIST }, - - { NULL } -}; -#endif /* PPP_OPTIONS */ - -#if 0 /* UNUSED */ -/* - * setupapfile - specifies UPAP info for authenticating with peer. - */ -static int -setupapfile(argv) - char **argv; -{ - FILE *ufile; - int l; - uid_t euid; - char u[MAXNAMELEN], p[MAXSECRETLEN]; - char *fname; - - lcp_allowoptions[0].neg_upap = 1; - - /* open user info file */ - fname = strdup(*argv); - if (fname == NULL) - novm("+ua file name"); - euid = geteuid(); - if (seteuid(getuid()) == -1) { - option_error("unable to reset uid before opening %s: %m", fname); - return 0; - } - ufile = fopen(fname, "r"); - if (seteuid(euid) == -1) - fatal("unable to regain privileges: %m"); - if (ufile == NULL) { - option_error("unable to open user login data file %s", fname); - return 0; - } - check_access(ufile, fname); - uafname = fname; - - /* get username */ - if (fgets(u, MAXNAMELEN - 1, ufile) == NULL - || fgets(p, MAXSECRETLEN - 1, ufile) == NULL) { - fclose(ufile); - option_error("unable to read user login data file %s", fname); - return 0; - } - fclose(ufile); - - /* get rid of newlines */ - l = strlen(u); - if (l > 0 && u[l-1] == '\n') - u[l-1] = 0; - l = strlen(p); - if (l > 0 && p[l-1] == '\n') - p[l-1] = 0; - - if (override_value("user", option_priority, fname)) { - strlcpy(ppp_settings.user, u, sizeof(ppp_settings.user)); - explicit_user = 1; - } - if (override_value("passwd", option_priority, fname)) { - strlcpy(ppp_settings.passwd, p, sizeof(ppp_settings.passwd)); - explicit_passwd = 1; - } - - return (1); -} - -/* - * privgroup - allow members of the group to have privileged access. - */ -static int -privgroup(argv) - char **argv; -{ - struct group *g; - int i; - - g = getgrnam(*argv); - if (g == 0) { - option_error("group %s is unknown", *argv); - return 0; - } - for (i = 0; i < ngroups; ++i) { - if (groups[i] == g->gr_gid) { - privileged = 1; - break; - } - } - return 1; -} - - -/* - * set_noauth_addr - set address(es) that can be used without authentication. - * Equivalent to specifying an entry like `"" * "" addr' in pap-secrets. - */ -static int -set_noauth_addr(argv) - char **argv; -{ - char *addr = *argv; - int l = strlen(addr) + 1; - struct wordlist *wp; - - wp = (struct wordlist *) malloc(sizeof(struct wordlist) + l); - if (wp == NULL) - novm("allow-ip argument"); - wp->word = (char *) (wp + 1); - wp->next = noauth_addrs; - MEMCPY(wp->word, addr, l); - noauth_addrs = wp; - return 1; -} - - -/* - * set_permitted_number - set remote telephone number(s) that may connect. - */ -static int -set_permitted_number(argv) - char **argv; -{ - char *number = *argv; - int l = strlen(number) + 1; - struct wordlist *wp; - - wp = (struct wordlist *) malloc(sizeof(struct wordlist) + l); - if (wp == NULL) - novm("allow-number argument"); - wp->word = (char *) (wp + 1); - wp->next = permitted_numbers; - MEMCPY(wp->word, number, l); - permitted_numbers = wp; - return 1; -} -#endif - -/* - * An Open on LCP has requested a change from Dead to Establish phase. - */ -void link_required(ppp_pcb *pcb) { - LWIP_UNUSED_ARG(pcb); -} - -#if 0 -/* - * Bring the link up to the point of being able to do ppp. - */ -void start_link(unit) - int unit; -{ - ppp_pcb *pcb = &ppp_pcb_list[unit]; - char *msg; - - status = EXIT_NEGOTIATION_FAILED; - new_phase(pcb, PPP_PHASE_SERIALCONN); - - hungup = 0; - devfd = the_channel->connect(); - msg = "Connect script failed"; - if (devfd < 0) - goto fail; - - /* set up the serial device as a ppp interface */ - /* - * N.B. we used to do tdb_writelock/tdb_writeunlock around this - * (from establish_ppp to set_ifunit). However, we won't be - * doing the set_ifunit in multilink mode, which is the only time - * we need the atomicity that the tdb_writelock/tdb_writeunlock - * gives us. Thus we don't need the tdb_writelock/tdb_writeunlock. - */ - fd_ppp = the_channel->establish_ppp(devfd); - msg = "ppp establishment failed"; - if (fd_ppp < 0) { - status = EXIT_FATAL_ERROR; - goto disconnect; - } - - if (!demand && ifunit >= 0) - set_ifunit(1); - - /* - * Start opening the connection and wait for - * incoming events (reply, timeout, etc.). - */ - if (ifunit >= 0) - ppp_notice("Connect: %s <--> %s", ifname, ppp_devnam); - else - ppp_notice("Starting negotiation on %s", ppp_devnam); - add_fd(fd_ppp); - - new_phase(pcb, PPP_PHASE_ESTABLISH); - - lcp_lowerup(pcb); - return; - - disconnect: - new_phase(pcb, PPP_PHASE_DISCONNECT); - if (the_channel->disconnect) - the_channel->disconnect(); - - fail: - new_phase(pcb, PPP_PHASE_DEAD); - if (the_channel->cleanup) - (*the_channel->cleanup)(); -} -#endif - -/* - * LCP has terminated the link; go to the Dead phase and take the - * physical layer down. - */ -void link_terminated(ppp_pcb *pcb) { - if (pcb->phase == PPP_PHASE_DEAD -#ifdef HAVE_MULTILINK - || pcb->phase == PPP_PHASE_MASTER -#endif /* HAVE_MULTILINK */ - ) - return; - new_phase(pcb, PPP_PHASE_DISCONNECT); - -#if 0 /* UNUSED */ - if (pap_logout_hook) { - pap_logout_hook(); - } - session_end(devnam); -#endif /* UNUSED */ - - if (!doing_multilink) { - ppp_notice("Connection terminated."); -#if PPP_STATS_SUPPORT - print_link_stats(); -#endif /* PPP_STATS_SUPPORT */ - } else - ppp_notice("Link terminated."); - - lcp_lowerdown(pcb); - - ppp_link_terminated(pcb); -#if 0 - /* - * Delete pid files before disestablishing ppp. Otherwise it - * can happen that another pppd gets the same unit and then - * we delete its pid file. - */ - if (!doing_multilink && !demand) - remove_pidfiles(); - - /* - * If we may want to bring the link up again, transfer - * the ppp unit back to the loopback. Set the - * real serial device back to its normal mode of operation. - */ - if (fd_ppp >= 0) { - remove_fd(fd_ppp); - clean_check(); - the_channel->disestablish_ppp(devfd); - if (doing_multilink) - mp_exit_bundle(); - fd_ppp = -1; - } - if (!hungup) - lcp_lowerdown(pcb); - if (!doing_multilink && !demand) - script_unsetenv("IFNAME"); - - /* - * Run disconnector script, if requested. - * XXX we may not be able to do this if the line has hung up! - */ - if (devfd >= 0 && the_channel->disconnect) { - the_channel->disconnect(); - devfd = -1; - } - if (the_channel->cleanup) - (*the_channel->cleanup)(); - - if (doing_multilink && multilink_master) { - if (!bundle_terminating) - new_phase(pcb, PPP_PHASE_MASTER); - else - mp_bundle_terminated(); - } else - new_phase(pcb, PPP_PHASE_DEAD); -#endif -} - -/* - * LCP has gone down; it will either die or try to re-establish. - */ -void link_down(ppp_pcb *pcb) { -#if PPP_NOTIFY - notify(link_down_notifier, 0); -#endif /* PPP_NOTIFY */ - - if (!doing_multilink) { - upper_layers_down(pcb); - if (pcb->phase != PPP_PHASE_DEAD -#ifdef HAVE_MULTILINK - && pcb->phase != PPP_PHASE_MASTER -#endif /* HAVE_MULTILINK */ - ) - new_phase(pcb, PPP_PHASE_ESTABLISH); - } - /* XXX if doing_multilink, should do something to stop - network-layer traffic on the link */ -} - -void upper_layers_down(ppp_pcb *pcb) { - int i; - const struct protent *protp; - - for (i = 0; (protp = protocols[i]) != NULL; ++i) { - if (protp->protocol != PPP_LCP && protp->lowerdown != NULL) - (*protp->lowerdown)(pcb); - if (protp->protocol < 0xC000 && protp->close != NULL) - (*protp->close)(pcb, "LCP down"); - } - pcb->num_np_open = 0; - pcb->num_np_up = 0; -} - -/* - * The link is established. - * Proceed to the Dead, Authenticate or Network phase as appropriate. - */ -void link_established(ppp_pcb *pcb) { -#if PPP_AUTH_SUPPORT - int auth; -#if PPP_SERVER -#if PAP_SUPPORT - lcp_options *wo = &pcb->lcp_wantoptions; -#endif /* PAP_SUPPORT */ - lcp_options *go = &pcb->lcp_gotoptions; -#endif /* PPP_SERVER */ - lcp_options *ho = &pcb->lcp_hisoptions; -#endif /* PPP_AUTH_SUPPORT */ - int i; - const struct protent *protp; - - /* - * Tell higher-level protocols that LCP is up. - */ - if (!doing_multilink) { - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->protocol != PPP_LCP - && protp->lowerup != NULL) - (*protp->lowerup)(pcb); - } - -#if PPP_AUTH_SUPPORT -#if PPP_SERVER -#if PPP_ALLOWED_ADDRS - if (!auth_required && noauth_addrs != NULL) - set_allowed_addrs(unit, NULL, NULL); -#endif /* PPP_ALLOWED_ADDRS */ - - if (pcb->settings.auth_required && !(0 -#if PAP_SUPPORT - || go->neg_upap -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - || go->neg_chap -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - || go->neg_eap -#endif /* EAP_SUPPORT */ - )) { - -#if PPP_ALLOWED_ADDRS - /* - * We wanted the peer to authenticate itself, and it refused: - * if we have some address(es) it can use without auth, fine, - * otherwise treat it as though it authenticated with PAP using - * a username of "" and a password of "". If that's not OK, - * boot it out. - */ - if (noauth_addrs != NULL) { - set_allowed_addrs(unit, NULL, NULL); - } else -#endif /* PPP_ALLOWED_ADDRS */ - if (!pcb->settings.null_login -#if PAP_SUPPORT - || !wo->neg_upap -#endif /* PAP_SUPPORT */ - ) { - ppp_warn("peer refused to authenticate: terminating link"); -#if 0 /* UNUSED */ - status = EXIT_PEER_AUTH_FAILED; -#endif /* UNUSED */ - pcb->err_code = PPPERR_AUTHFAIL; - lcp_close(pcb, "peer refused to authenticate"); - return; - } - } -#endif /* PPP_SERVER */ - - new_phase(pcb, PPP_PHASE_AUTHENTICATE); - auth = 0; -#if PPP_SERVER -#if EAP_SUPPORT - if (go->neg_eap) { - eap_authpeer(pcb, PPP_OUR_NAME); - auth |= EAP_PEER; - } else -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT - if (go->neg_chap) { - chap_auth_peer(pcb, PPP_OUR_NAME, CHAP_DIGEST(go->chap_mdtype)); - auth |= CHAP_PEER; - } else -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - if (go->neg_upap) { - upap_authpeer(pcb); - auth |= PAP_PEER; - } else -#endif /* PAP_SUPPORT */ - {} -#endif /* PPP_SERVER */ - -#if EAP_SUPPORT - if (ho->neg_eap) { - eap_authwithpeer(pcb, pcb->settings.user); - auth |= EAP_WITHPEER; - } else -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT - if (ho->neg_chap) { - chap_auth_with_peer(pcb, pcb->settings.user, CHAP_DIGEST(ho->chap_mdtype)); - auth |= CHAP_WITHPEER; - } else -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - if (ho->neg_upap) { - upap_authwithpeer(pcb, pcb->settings.user, pcb->settings.passwd); - auth |= PAP_WITHPEER; - } else -#endif /* PAP_SUPPORT */ - {} - - pcb->auth_pending = auth; - pcb->auth_done = 0; - - if (!auth) -#endif /* PPP_AUTH_SUPPORT */ - network_phase(pcb); -} - -/* - * Proceed to the network phase. - */ -static void network_phase(ppp_pcb *pcb) { -#if CBCP_SUPPORT - ppp_pcb *pcb = &ppp_pcb_list[unit]; -#endif -#if 0 /* UNUSED */ - lcp_options *go = &lcp_gotoptions[unit]; -#endif /* UNUSED */ - -#if 0 /* UNUSED */ - /* Log calling number. */ - if (*remote_number) - ppp_notice("peer from calling number %q authorized", remote_number); -#endif /* UNUSED */ - -#if PPP_NOTIFY - /* - * If the peer had to authenticate, notify it now. - */ - if (0 -#if CHAP_SUPPORT - || go->neg_chap -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - || go->neg_upap -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - || go->neg_eap -#endif /* EAP_SUPPORT */ - ) { - notify(auth_up_notifier, 0); - } -#endif /* PPP_NOTIFY */ - -#if CBCP_SUPPORT - /* - * If we negotiated callback, do it now. - */ - if (go->neg_cbcp) { - new_phase(pcb, PPP_PHASE_CALLBACK); - (*cbcp_protent.open)(pcb); - return; - } -#endif - -#if PPP_OPTIONS - /* - * Process extra options from the secrets file - */ - if (extra_options) { - options_from_list(extra_options, 1); - free_wordlist(extra_options); - extra_options = 0; - } -#endif /* PPP_OPTIONS */ - start_networks(pcb); -} - -void start_networks(ppp_pcb *pcb) { -#if CCP_SUPPORT || ECP_SUPPORT - int i; - const struct protent *protp; -#endif /* CCP_SUPPORT || ECP_SUPPORT */ - - new_phase(pcb, PPP_PHASE_NETWORK); - -#ifdef HAVE_MULTILINK - if (multilink) { - if (mp_join_bundle()) { - if (multilink_join_hook) - (*multilink_join_hook)(); - if (updetach && !nodetach) - detach(); - return; - } - } -#endif /* HAVE_MULTILINK */ - -#ifdef PPP_FILTER - if (!demand) - set_filters(&pass_filter, &active_filter); -#endif -#if CCP_SUPPORT || ECP_SUPPORT - /* Start CCP and ECP */ - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if ( - (0 -#if ECP_SUPPORT - || protp->protocol == PPP_ECP -#endif /* ECP_SUPPORT */ -#if CCP_SUPPORT - || protp->protocol == PPP_CCP -#endif /* CCP_SUPPORT */ - ) - && protp->open != NULL) - (*protp->open)(pcb); -#endif /* CCP_SUPPORT || ECP_SUPPORT */ - - /* - * Bring up other network protocols iff encryption is not required. - */ - if (1 -#if ECP_SUPPORT - && !ecp_gotoptions[unit].required -#endif /* ECP_SUPPORT */ -#if MPPE_SUPPORT - && !pcb->ccp_gotoptions.mppe -#endif /* MPPE_SUPPORT */ - ) - continue_networks(pcb); -} - -void continue_networks(ppp_pcb *pcb) { - int i; - const struct protent *protp; - - /* - * Start the "real" network protocols. - */ - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->protocol < 0xC000 -#if CCP_SUPPORT - && protp->protocol != PPP_CCP -#endif /* CCP_SUPPORT */ -#if ECP_SUPPORT - && protp->protocol != PPP_ECP -#endif /* ECP_SUPPORT */ - && protp->open != NULL) { - (*protp->open)(pcb); - ++pcb->num_np_open; - } - - if (pcb->num_np_open == 0) - /* nothing to do */ - lcp_close(pcb, "No network protocols running"); -} - -#if PPP_AUTH_SUPPORT -#if PPP_SERVER -/* - * auth_check_passwd - Check the user name and passwd against configuration. - * - * returns: - * 0: Authentication failed. - * 1: Authentication succeeded. - * In either case, msg points to an appropriate message and msglen to the message len. - */ -int auth_check_passwd(ppp_pcb *pcb, char *auser, int userlen, char *apasswd, int passwdlen, const char **msg, int *msglen) { - int secretuserlen; - int secretpasswdlen; - - if (pcb->settings.user && pcb->settings.passwd) { - secretuserlen = (int)strlen(pcb->settings.user); - secretpasswdlen = (int)strlen(pcb->settings.passwd); - if (secretuserlen == userlen - && secretpasswdlen == passwdlen - && !memcmp(auser, pcb->settings.user, userlen) - && !memcmp(apasswd, pcb->settings.passwd, passwdlen) ) { - *msg = "Login ok"; - *msglen = sizeof("Login ok")-1; - return 1; - } - } - - *msg = "Login incorrect"; - *msglen = sizeof("Login incorrect")-1; - return 0; -} - -/* - * The peer has failed to authenticate himself using `protocol'. - */ -void auth_peer_fail(ppp_pcb *pcb, int protocol) { - LWIP_UNUSED_ARG(protocol); - /* - * Authentication failure: take the link down - */ -#if 0 /* UNUSED */ - status = EXIT_PEER_AUTH_FAILED; -#endif /* UNUSED */ - pcb->err_code = PPPERR_AUTHFAIL; - lcp_close(pcb, "Authentication failed"); -} - -/* - * The peer has been successfully authenticated using `protocol'. - */ -void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char *name, int namelen) { - int bit; -#ifndef HAVE_MULTILINK - LWIP_UNUSED_ARG(name); - LWIP_UNUSED_ARG(namelen); -#endif /* HAVE_MULTILINK */ - - switch (protocol) { -#if CHAP_SUPPORT - case PPP_CHAP: - bit = CHAP_PEER; - switch (prot_flavor) { - case CHAP_MD5: - bit |= CHAP_MD5_PEER; - break; -#if MSCHAP_SUPPORT - case CHAP_MICROSOFT: - bit |= CHAP_MS_PEER; - break; - case CHAP_MICROSOFT_V2: - bit |= CHAP_MS2_PEER; - break; -#endif /* MSCHAP_SUPPORT */ - default: - break; - } - break; -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - case PPP_PAP: - bit = PAP_PEER; - break; -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - case PPP_EAP: - bit = EAP_PEER; - break; -#endif /* EAP_SUPPORT */ - default: - ppp_warn("auth_peer_success: unknown protocol %x", protocol); - return; - } - -#ifdef HAVE_MULTILINK - /* - * Save the authenticated name of the peer for later. - */ - if (namelen > (int)sizeof(pcb->peer_authname) - 1) - namelen = (int)sizeof(pcb->peer_authname) - 1; - MEMCPY(pcb->peer_authname, name, namelen); - pcb->peer_authname[namelen] = 0; -#endif /* HAVE_MULTILINK */ -#if 0 /* UNUSED */ - script_setenv("PEERNAME", , 0); -#endif /* UNUSED */ - - /* Save the authentication method for later. */ - pcb->auth_done |= bit; - - /* - * If there is no more authentication still to be done, - * proceed to the network (or callback) phase. - */ - if ((pcb->auth_pending &= ~bit) == 0) - network_phase(pcb); -} -#endif /* PPP_SERVER */ - -/* - * We have failed to authenticate ourselves to the peer using `protocol'. - */ -void auth_withpeer_fail(ppp_pcb *pcb, int protocol) { - LWIP_UNUSED_ARG(protocol); - /* - * We've failed to authenticate ourselves to our peer. - * - * Some servers keep sending CHAP challenges, but there - * is no point in persisting without any way to get updated - * authentication secrets. - * - * He'll probably take the link down, and there's not much - * we can do except wait for that. - */ - pcb->err_code = PPPERR_AUTHFAIL; - lcp_close(pcb, "Failed to authenticate ourselves to peer"); -} - -/* - * We have successfully authenticated ourselves with the peer using `protocol'. - */ -void auth_withpeer_success(ppp_pcb *pcb, int protocol, int prot_flavor) { - int bit; - const char *prot = ""; - - switch (protocol) { -#if CHAP_SUPPORT - case PPP_CHAP: - bit = CHAP_WITHPEER; - prot = "CHAP"; - switch (prot_flavor) { - case CHAP_MD5: - bit |= CHAP_MD5_WITHPEER; - break; -#if MSCHAP_SUPPORT - case CHAP_MICROSOFT: - bit |= CHAP_MS_WITHPEER; - break; - case CHAP_MICROSOFT_V2: - bit |= CHAP_MS2_WITHPEER; - break; -#endif /* MSCHAP_SUPPORT */ - default: - break; - } - break; -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - case PPP_PAP: - bit = PAP_WITHPEER; - prot = "PAP"; - break; -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - case PPP_EAP: - bit = EAP_WITHPEER; - prot = "EAP"; - break; -#endif /* EAP_SUPPORT */ - default: - ppp_warn("auth_withpeer_success: unknown protocol %x", protocol); - bit = 0; - /* no break */ - } - - ppp_notice("%s authentication succeeded", prot); - - /* Save the authentication method for later. */ - pcb->auth_done |= bit; - - /* - * If there is no more authentication still being done, - * proceed to the network (or callback) phase. - */ - if ((pcb->auth_pending &= ~bit) == 0) - network_phase(pcb); -} -#endif /* PPP_AUTH_SUPPORT */ - - -/* - * np_up - a network protocol has come up. - */ -void np_up(ppp_pcb *pcb, int proto) { -#if PPP_IDLETIMELIMIT - int tlim; -#endif /* PPP_IDLETIMELIMIT */ - LWIP_UNUSED_ARG(proto); - - if (pcb->num_np_up == 0) { - /* - * At this point we consider that the link has come up successfully. - */ - new_phase(pcb, PPP_PHASE_RUNNING); - -#if PPP_IDLETIMELIMIT -#if 0 /* UNUSED */ - if (idle_time_hook != 0) - tlim = (*idle_time_hook)(NULL); - else -#endif /* UNUSED */ - tlim = pcb->settings.idle_time_limit; - if (tlim > 0) - TIMEOUT(check_idle, (void*)pcb, tlim); -#endif /* PPP_IDLETIMELIMIT */ - -#if PPP_MAXCONNECT - /* - * Set a timeout to close the connection once the maximum - * connect time has expired. - */ - if (pcb->settings.maxconnect > 0) - TIMEOUT(connect_time_expired, (void*)pcb, pcb->settings.maxconnect); -#endif /* PPP_MAXCONNECT */ - -#ifdef MAXOCTETS - if (maxoctets > 0) - TIMEOUT(check_maxoctets, NULL, maxoctets_timeout); -#endif - -#if 0 /* Unused */ - /* - * Detach now, if the updetach option was given. - */ - if (updetach && !nodetach) - detach(); -#endif /* Unused */ - } - ++pcb->num_np_up; -} - -/* - * np_down - a network protocol has gone down. - */ -void np_down(ppp_pcb *pcb, int proto) { - LWIP_UNUSED_ARG(proto); - if (--pcb->num_np_up == 0) { -#if PPP_IDLETIMELIMIT - UNTIMEOUT(check_idle, (void*)pcb); -#endif /* PPP_IDLETIMELIMIT */ -#if PPP_MAXCONNECT - UNTIMEOUT(connect_time_expired, NULL); -#endif /* PPP_MAXCONNECT */ -#ifdef MAXOCTETS - UNTIMEOUT(check_maxoctets, NULL); -#endif - new_phase(pcb, PPP_PHASE_NETWORK); - } -} - -/* - * np_finished - a network protocol has finished using the link. - */ -void np_finished(ppp_pcb *pcb, int proto) { - LWIP_UNUSED_ARG(proto); - if (--pcb->num_np_open <= 0) { - /* no further use for the link: shut up shop. */ - lcp_close(pcb, "No network protocols running"); - } -} - -#ifdef MAXOCTETS -static void -check_maxoctets(arg) - void *arg; -{ -#if PPP_STATS_SUPPORT - unsigned int used; - - update_link_stats(ifunit); - link_stats_valid=0; - - switch(maxoctets_dir) { - case PPP_OCTETS_DIRECTION_IN: - used = link_stats.bytes_in; - break; - case PPP_OCTETS_DIRECTION_OUT: - used = link_stats.bytes_out; - break; - case PPP_OCTETS_DIRECTION_MAXOVERAL: - case PPP_OCTETS_DIRECTION_MAXSESSION: - used = (link_stats.bytes_in > link_stats.bytes_out) ? link_stats.bytes_in : link_stats.bytes_out; - break; - default: - used = link_stats.bytes_in+link_stats.bytes_out; - break; - } - if (used > maxoctets) { - ppp_notice("Traffic limit reached. Limit: %u Used: %u", maxoctets, used); - status = EXIT_TRAFFIC_LIMIT; - lcp_close(pcb, "Traffic limit"); -#if 0 /* UNUSED */ - need_holdoff = 0; -#endif /* UNUSED */ - } else { - TIMEOUT(check_maxoctets, NULL, maxoctets_timeout); - } -#endif /* PPP_STATS_SUPPORT */ -} -#endif /* MAXOCTETS */ - -#if PPP_IDLETIMELIMIT -/* - * check_idle - check whether the link has been idle for long - * enough that we can shut it down. - */ -static void check_idle(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - struct ppp_idle idle; - time_t itime; - int tlim; - - if (!get_idle_time(pcb, &idle)) - return; -#if 0 /* UNUSED */ - if (idle_time_hook != 0) { - tlim = idle_time_hook(&idle); - } else { -#endif /* UNUSED */ - itime = LWIP_MIN(idle.xmit_idle, idle.recv_idle); - tlim = pcb->settings.idle_time_limit - itime; -#if 0 /* UNUSED */ - } -#endif /* UNUSED */ - if (tlim <= 0) { - /* link is idle: shut it down. */ - ppp_notice("Terminating connection due to lack of activity."); - pcb->err_code = PPPERR_IDLETIMEOUT; - lcp_close(pcb, "Link inactive"); -#if 0 /* UNUSED */ - need_holdoff = 0; -#endif /* UNUSED */ - } else { - TIMEOUT(check_idle, (void*)pcb, tlim); - } -} -#endif /* PPP_IDLETIMELIMIT */ - -#if PPP_MAXCONNECT -/* - * connect_time_expired - log a message and close the connection. - */ -static void connect_time_expired(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - ppp_info("Connect time expired"); - pcb->err_code = PPPERR_CONNECTTIME; - lcp_close(pcb, "Connect time expired"); /* Close connection */ -} -#endif /* PPP_MAXCONNECT */ - -#if PPP_OPTIONS -/* - * auth_check_options - called to check authentication options. - */ -void -auth_check_options() -{ - lcp_options *wo = &lcp_wantoptions[0]; - int can_auth; - int lacks_ip; - - /* Default our_name to hostname, and user to our_name */ - if (our_name[0] == 0 || usehostname) - strlcpy(our_name, hostname, sizeof(our_name)); - /* If a blank username was explicitly given as an option, trust - the user and don't use our_name */ - if (ppp_settings.user[0] == 0 && !explicit_user) - strlcpy(ppp_settings.user, our_name, sizeof(ppp_settings.user)); - - /* - * If we have a default route, require the peer to authenticate - * unless the noauth option was given or the real user is root. - */ - if (!auth_required && !allow_any_ip && have_route_to(0) && !privileged) { - auth_required = 1; - default_auth = 1; - } - -#if CHAP_SUPPORT - /* If we selected any CHAP flavors, we should probably negotiate it. :-) */ - if (wo->chap_mdtype) - wo->neg_chap = 1; -#endif /* CHAP_SUPPORT */ - - /* If authentication is required, ask peer for CHAP, PAP, or EAP. */ - if (auth_required) { - allow_any_ip = 0; - if (1 -#if CHAP_SUPPORT - && !wo->neg_chap -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - && !wo->neg_upap -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - && !wo->neg_eap -#endif /* EAP_SUPPORT */ - ) { -#if CHAP_SUPPORT - wo->neg_chap = CHAP_MDTYPE_SUPPORTED != MDTYPE_NONE; - wo->chap_mdtype = CHAP_MDTYPE_SUPPORTED; -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - wo->neg_upap = 1; -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - wo->neg_eap = 1; -#endif /* EAP_SUPPORT */ - } - } else { -#if CHAP_SUPPORT - wo->neg_chap = 0; - wo->chap_mdtype = MDTYPE_NONE; -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - wo->neg_upap = 0; -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - wo->neg_eap = 0; -#endif /* EAP_SUPPORT */ - } - - /* - * Check whether we have appropriate secrets to use - * to authenticate the peer. Note that EAP can authenticate by way - * of a CHAP-like exchanges as well as SRP. - */ - lacks_ip = 0; -#if PAP_SUPPORT - can_auth = wo->neg_upap && (uselogin || have_pap_secret(&lacks_ip)); -#else - can_auth = 0; -#endif /* PAP_SUPPORT */ - if (!can_auth && (0 -#if CHAP_SUPPORT - || wo->neg_chap -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - || wo->neg_eap -#endif /* EAP_SUPPORT */ - )) { -#if CHAP_SUPPORT - can_auth = have_chap_secret((explicit_remote? remote_name: NULL), - our_name, 1, &lacks_ip); -#else - can_auth = 0; -#endif - } - if (!can_auth -#if EAP_SUPPORT - && wo->neg_eap -#endif /* EAP_SUPPORT */ - ) { - can_auth = have_srp_secret((explicit_remote? remote_name: NULL), - our_name, 1, &lacks_ip); - } - - if (auth_required && !can_auth && noauth_addrs == NULL) { - if (default_auth) { - option_error( -"By default the remote system is required to authenticate itself"); - option_error( -"(because this system has a default route to the internet)"); - } else if (explicit_remote) - option_error( -"The remote system (%s) is required to authenticate itself", - remote_name); - else - option_error( -"The remote system is required to authenticate itself"); - option_error( -"but I couldn't find any suitable secret (password) for it to use to do so."); - if (lacks_ip) - option_error( -"(None of the available passwords would let it use an IP address.)"); - - exit(1); - } - - /* - * Early check for remote number authorization. - */ - if (!auth_number()) { - ppp_warn("calling number %q is not authorized", remote_number); - exit(EXIT_CNID_AUTH_FAILED); - } -} -#endif /* PPP_OPTIONS */ - -#if 0 /* UNUSED */ -/* - * auth_reset - called when LCP is starting negotiations to recheck - * authentication options, i.e. whether we have appropriate secrets - * to use for authenticating ourselves and/or the peer. - */ -void -auth_reset(unit) - int unit; -{ - lcp_options *go = &lcp_gotoptions[unit]; - lcp_options *ao = &lcp_allowoptions[unit]; - int hadchap; - - hadchap = -1; - ao->neg_upap = !refuse_pap && (passwd[0] != 0 || get_pap_passwd(NULL)); - ao->neg_chap = (!refuse_chap || !refuse_mschap || !refuse_mschap_v2) - && (passwd[0] != 0 || - (hadchap = have_chap_secret(user, (explicit_remote? remote_name: - NULL), 0, NULL))); - ao->neg_eap = !refuse_eap && ( - passwd[0] != 0 || - (hadchap == 1 || (hadchap == -1 && have_chap_secret(user, - (explicit_remote? remote_name: NULL), 0, NULL))) || - have_srp_secret(user, (explicit_remote? remote_name: NULL), 0, NULL)); - - hadchap = -1; - if (go->neg_upap && !uselogin && !have_pap_secret(NULL)) - go->neg_upap = 0; - if (go->neg_chap) { - if (!(hadchap = have_chap_secret((explicit_remote? remote_name: NULL), - our_name, 1, NULL))) - go->neg_chap = 0; - } - if (go->neg_eap && - (hadchap == 0 || (hadchap == -1 && - !have_chap_secret((explicit_remote? remote_name: NULL), our_name, - 1, NULL))) && - !have_srp_secret((explicit_remote? remote_name: NULL), our_name, 1, - NULL)) - go->neg_eap = 0; -} - -/* - * check_passwd - Check the user name and passwd against the PAP secrets - * file. If requested, also check against the system password database, - * and login the user if OK. - * - * returns: - * UPAP_AUTHNAK: Authentication failed. - * UPAP_AUTHACK: Authentication succeeded. - * In either case, msg points to an appropriate message. - */ -int -check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) - int unit; - char *auser; - int userlen; - char *apasswd; - int passwdlen; - char **msg; -{ - return UPAP_AUTHNAK; - int ret; - char *filename; - FILE *f; - struct wordlist *addrs = NULL, *opts = NULL; - char passwd[256], user[256]; - char secret[MAXWORDLEN]; - static int attempts = 0; - - /* - * Make copies of apasswd and auser, then null-terminate them. - * If there are unprintable characters in the password, make - * them visible. - */ - slprintf(ppp_settings.passwd, sizeof(ppp_settings.passwd), "%.*v", passwdlen, apasswd); - slprintf(ppp_settings.user, sizeof(ppp_settings.user), "%.*v", userlen, auser); - *msg = ""; - - /* - * Check if a plugin wants to handle this. - */ - if (pap_auth_hook) { - ret = (*pap_auth_hook)(ppp_settings.user, ppp_settings.passwd, msg, &addrs, &opts); - if (ret >= 0) { - /* note: set_allowed_addrs() saves opts (but not addrs): - don't free it! */ - if (ret) - set_allowed_addrs(unit, addrs, opts); - else if (opts != 0) - free_wordlist(opts); - if (addrs != 0) - free_wordlist(addrs); - BZERO(ppp_settings.passwd, sizeof(ppp_settings.passwd)); - return ret? UPAP_AUTHACK: UPAP_AUTHNAK; - } - } - - /* - * Open the file of pap secrets and scan for a suitable secret - * for authenticating this user. - */ - filename = _PATH_UPAPFILE; - addrs = opts = NULL; - ret = UPAP_AUTHNAK; - f = fopen(filename, "r"); - if (f == NULL) { - ppp_error("Can't open PAP password file %s: %m", filename); - - } else { - check_access(f, filename); - if (scan_authfile(f, ppp_settings.user, our_name, secret, &addrs, &opts, filename, 0) < 0) { - ppp_warn("no PAP secret found for %s", user); - } else { - /* - * If the secret is "@login", it means to check - * the password against the login database. - */ - int login_secret = strcmp(secret, "@login") == 0; - ret = UPAP_AUTHACK; - if (uselogin || login_secret) { - /* login option or secret is @login */ - if (session_full(ppp_settings.user, ppp_settings.passwd, devnam, msg) == 0) { - ret = UPAP_AUTHNAK; - } - } else if (session_mgmt) { - if (session_check(ppp_settings.user, NULL, devnam, NULL) == 0) { - ppp_warn("Peer %q failed PAP Session verification", user); - ret = UPAP_AUTHNAK; - } - } - if (secret[0] != 0 && !login_secret) { - /* password given in pap-secrets - must match */ - if ((cryptpap || strcmp(ppp_settings.passwd, secret) != 0) - && strcmp(crypt(ppp_settings.passwd, secret), secret) != 0) - ret = UPAP_AUTHNAK; - } - } - fclose(f); - } - - if (ret == UPAP_AUTHNAK) { - if (**msg == 0) - *msg = "Login incorrect"; - /* - * XXX can we ever get here more than once?? - * Frustrate passwd stealer programs. - * Allow 10 tries, but start backing off after 3 (stolen from login). - * On 10'th, drop the connection. - */ - if (attempts++ >= 10) { - ppp_warn("%d LOGIN FAILURES ON %s, %s", attempts, devnam, user); - lcp_close(pcb, "login failed"); - } - if (attempts > 3) - sleep((u_int) (attempts - 3) * 5); - if (opts != NULL) - free_wordlist(opts); - - } else { - attempts = 0; /* Reset count */ - if (**msg == 0) - *msg = "Login ok"; - set_allowed_addrs(unit, addrs, opts); - } - - if (addrs != NULL) - free_wordlist(addrs); - BZERO(ppp_settings.passwd, sizeof(ppp_settings.passwd)); - BZERO(secret, sizeof(secret)); - - return ret; -} - -/* - * null_login - Check if a username of "" and a password of "" are - * acceptable, and iff so, set the list of acceptable IP addresses - * and return 1. - */ -static int -null_login(unit) - int unit; -{ - char *filename; - FILE *f; - int i, ret; - struct wordlist *addrs, *opts; - char secret[MAXWORDLEN]; - - /* - * Check if a plugin wants to handle this. - */ - ret = -1; - if (null_auth_hook) - ret = (*null_auth_hook)(&addrs, &opts); - - /* - * Open the file of pap secrets and scan for a suitable secret. - */ - if (ret <= 0) { - filename = _PATH_UPAPFILE; - addrs = NULL; - f = fopen(filename, "r"); - if (f == NULL) - return 0; - check_access(f, filename); - - i = scan_authfile(f, "", our_name, secret, &addrs, &opts, filename, 0); - ret = i >= 0 && secret[0] == 0; - BZERO(secret, sizeof(secret)); - fclose(f); - } - - if (ret) - set_allowed_addrs(unit, addrs, opts); - else if (opts != 0) - free_wordlist(opts); - if (addrs != 0) - free_wordlist(addrs); - - return ret; -} - -/* - * get_pap_passwd - get a password for authenticating ourselves with - * our peer using PAP. Returns 1 on success, 0 if no suitable password - * could be found. - * Assumes passwd points to MAXSECRETLEN bytes of space (if non-null). - */ -static int -get_pap_passwd(passwd) - char *passwd; -{ - char *filename; - FILE *f; - int ret; - char secret[MAXWORDLEN]; - - /* - * Check whether a plugin wants to supply this. - */ - if (pap_passwd_hook) { - ret = (*pap_passwd_hook)(ppp_settings,user, ppp_settings.passwd); - if (ret >= 0) - return ret; - } - - filename = _PATH_UPAPFILE; - f = fopen(filename, "r"); - if (f == NULL) - return 0; - check_access(f, filename); - ret = scan_authfile(f, user, - (remote_name[0]? remote_name: NULL), - secret, NULL, NULL, filename, 0); - fclose(f); - if (ret < 0) - return 0; - if (passwd != NULL) - strlcpy(passwd, secret, MAXSECRETLEN); - BZERO(secret, sizeof(secret)); - return 1; -} - -/* - * have_pap_secret - check whether we have a PAP file with any - * secrets that we could possibly use for authenticating the peer. - */ -static int -have_pap_secret(lacks_ipp) - int *lacks_ipp; -{ - FILE *f; - int ret; - char *filename; - struct wordlist *addrs; - - /* let the plugin decide, if there is one */ - if (pap_check_hook) { - ret = (*pap_check_hook)(); - if (ret >= 0) - return ret; - } - - filename = _PATH_UPAPFILE; - f = fopen(filename, "r"); - if (f == NULL) - return 0; - - ret = scan_authfile(f, (explicit_remote? remote_name: NULL), our_name, - NULL, &addrs, NULL, filename, 0); - fclose(f); - if (ret >= 0 && !some_ip_ok(addrs)) { - if (lacks_ipp != 0) - *lacks_ipp = 1; - ret = -1; - } - if (addrs != 0) - free_wordlist(addrs); - - return ret >= 0; -} - -/* - * have_chap_secret - check whether we have a CHAP file with a - * secret that we could possibly use for authenticating `client' - * on `server'. Either can be the null string, meaning we don't - * know the identity yet. - */ -static int -have_chap_secret(client, server, need_ip, lacks_ipp) - char *client; - char *server; - int need_ip; - int *lacks_ipp; -{ - FILE *f; - int ret; - char *filename; - struct wordlist *addrs; - - if (chap_check_hook) { - ret = (*chap_check_hook)(); - if (ret >= 0) { - return ret; - } - } - - filename = _PATH_CHAPFILE; - f = fopen(filename, "r"); - if (f == NULL) - return 0; - - if (client != NULL && client[0] == 0) - client = NULL; - else if (server != NULL && server[0] == 0) - server = NULL; - - ret = scan_authfile(f, client, server, NULL, &addrs, NULL, filename, 0); - fclose(f); - if (ret >= 0 && need_ip && !some_ip_ok(addrs)) { - if (lacks_ipp != 0) - *lacks_ipp = 1; - ret = -1; - } - if (addrs != 0) - free_wordlist(addrs); - - return ret >= 0; -} - -/* - * have_srp_secret - check whether we have a SRP file with a - * secret that we could possibly use for authenticating `client' - * on `server'. Either can be the null string, meaning we don't - * know the identity yet. - */ -static int -have_srp_secret(client, server, need_ip, lacks_ipp) - char *client; - char *server; - int need_ip; - int *lacks_ipp; -{ - FILE *f; - int ret; - char *filename; - struct wordlist *addrs; - - filename = _PATH_SRPFILE; - f = fopen(filename, "r"); - if (f == NULL) - return 0; - - if (client != NULL && client[0] == 0) - client = NULL; - else if (server != NULL && server[0] == 0) - server = NULL; - - ret = scan_authfile(f, client, server, NULL, &addrs, NULL, filename, 0); - fclose(f); - if (ret >= 0 && need_ip && !some_ip_ok(addrs)) { - if (lacks_ipp != 0) - *lacks_ipp = 1; - ret = -1; - } - if (addrs != 0) - free_wordlist(addrs); - - return ret >= 0; -} -#endif /* UNUSED */ - -#if PPP_AUTH_SUPPORT -/* - * get_secret - open the CHAP secret file and return the secret - * for authenticating the given client on the given server. - * (We could be either client or server). - */ -int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secret, int *secret_len, int am_server) { - int len; - LWIP_UNUSED_ARG(server); - LWIP_UNUSED_ARG(am_server); - - if (!client || !client[0] || !pcb->settings.user || !pcb->settings.passwd || strcmp(client, pcb->settings.user)) { - return 0; - } - - len = (int)strlen(pcb->settings.passwd); - if (len > MAXSECRETLEN) { - ppp_error("Secret for %s on %s is too long", client, server); - len = MAXSECRETLEN; - } - - MEMCPY(secret, pcb->settings.passwd, len); - *secret_len = len; - return 1; - -#if 0 /* UNUSED */ - FILE *f; - int ret, len; - char *filename; - struct wordlist *addrs, *opts; - char secbuf[MAXWORDLEN]; - struct wordlist *addrs; - addrs = NULL; - - if (!am_server && ppp_settings.passwd[0] != 0) { - strlcpy(secbuf, ppp_settings.passwd, sizeof(secbuf)); - } else if (!am_server && chap_passwd_hook) { - if ( (*chap_passwd_hook)(client, secbuf) < 0) { - ppp_error("Unable to obtain CHAP password for %s on %s from plugin", - client, server); - return 0; - } - } else { - filename = _PATH_CHAPFILE; - addrs = NULL; - secbuf[0] = 0; - - f = fopen(filename, "r"); - if (f == NULL) { - ppp_error("Can't open chap secret file %s: %m", filename); - return 0; - } - check_access(f, filename); - - ret = scan_authfile(f, client, server, secbuf, &addrs, &opts, filename, 0); - fclose(f); - if (ret < 0) - return 0; - - if (am_server) - set_allowed_addrs(unit, addrs, opts); - else if (opts != 0) - free_wordlist(opts); - if (addrs != 0) - free_wordlist(addrs); - } - - len = strlen(secbuf); - if (len > MAXSECRETLEN) { - ppp_error("Secret for %s on %s is too long", client, server); - len = MAXSECRETLEN; - } - MEMCPY(secret, secbuf, len); - BZERO(secbuf, sizeof(secbuf)); - *secret_len = len; - - return 1; -#endif /* UNUSED */ -} -#endif /* PPP_AUTH_SUPPORT */ - - -#if 0 /* UNUSED */ -/* - * get_srp_secret - open the SRP secret file and return the secret - * for authenticating the given client on the given server. - * (We could be either client or server). - */ -int -get_srp_secret(unit, client, server, secret, am_server) - int unit; - char *client; - char *server; - char *secret; - int am_server; -{ - FILE *fp; - int ret; - char *filename; - struct wordlist *addrs, *opts; - - if (!am_server && ppp_settings.passwd[0] != '\0') { - strlcpy(secret, ppp_settings.passwd, MAXWORDLEN); - } else { - filename = _PATH_SRPFILE; - addrs = NULL; - - fp = fopen(filename, "r"); - if (fp == NULL) { - ppp_error("Can't open srp secret file %s: %m", filename); - return 0; - } - check_access(fp, filename); - - secret[0] = '\0'; - ret = scan_authfile(fp, client, server, secret, &addrs, &opts, - filename, am_server); - fclose(fp); - if (ret < 0) - return 0; - - if (am_server) - set_allowed_addrs(unit, addrs, opts); - else if (opts != NULL) - free_wordlist(opts); - if (addrs != NULL) - free_wordlist(addrs); - } - - return 1; -} - -/* - * set_allowed_addrs() - set the list of allowed addresses. - * Also looks for `--' indicating options to apply for this peer - * and leaves the following words in extra_options. - */ -static void -set_allowed_addrs(unit, addrs, opts) - int unit; - struct wordlist *addrs; - struct wordlist *opts; -{ - int n; - struct wordlist *ap, **plink; - struct permitted_ip *ip; - char *ptr_word, *ptr_mask; - struct hostent *hp; - struct netent *np; - u32_t a, mask, ah, offset; - struct ipcp_options *wo = &ipcp_wantoptions[unit]; - u32_t suggested_ip = 0; - - if (addresses[unit] != NULL) - free(addresses[unit]); - addresses[unit] = NULL; - if (extra_options != NULL) - free_wordlist(extra_options); - extra_options = opts; - - /* - * Count the number of IP addresses given. - */ - n = wordlist_count(addrs) + wordlist_count(noauth_addrs); - if (n == 0) - return; - ip = (struct permitted_ip *) malloc((n + 1) * sizeof(struct permitted_ip)); - if (ip == 0) - return; - - /* temporarily append the noauth_addrs list to addrs */ - for (plink = &addrs; *plink != NULL; plink = &(*plink)->next) - ; - *plink = noauth_addrs; - - n = 0; - for (ap = addrs; ap != NULL; ap = ap->next) { - /* "-" means no addresses authorized, "*" means any address allowed */ - ptr_word = ap->word; - if (strcmp(ptr_word, "-") == 0) - break; - if (strcmp(ptr_word, "*") == 0) { - ip[n].permit = 1; - ip[n].base = ip[n].mask = 0; - ++n; - break; - } - - ip[n].permit = 1; - if (*ptr_word == '!') { - ip[n].permit = 0; - ++ptr_word; - } - - mask = ~ (u32_t) 0; - offset = 0; - ptr_mask = strchr (ptr_word, '/'); - if (ptr_mask != NULL) { - int bit_count; - char *endp; - - bit_count = (int) strtol (ptr_mask+1, &endp, 10); - if (bit_count <= 0 || bit_count > 32) { - ppp_warn("invalid address length %v in auth. address list", - ptr_mask+1); - continue; - } - bit_count = 32 - bit_count; /* # bits in host part */ - if (*endp == '+') { - offset = ifunit + 1; - ++endp; - } - if (*endp != 0) { - ppp_warn("invalid address length syntax: %v", ptr_mask+1); - continue; - } - *ptr_mask = '\0'; - mask <<= bit_count; - } - - hp = gethostbyname(ptr_word); - if (hp != NULL && hp->h_addrtype == AF_INET) { - a = *(u32_t *)hp->h_addr; - } else { - np = getnetbyname (ptr_word); - if (np != NULL && np->n_addrtype == AF_INET) { - a = lwip_htonl ((u32_t)np->n_net); - if (ptr_mask == NULL) { - /* calculate appropriate mask for net */ - ah = lwip_ntohl(a); - if (IN_CLASSA(ah)) - mask = IN_CLASSA_NET; - else if (IN_CLASSB(ah)) - mask = IN_CLASSB_NET; - else if (IN_CLASSC(ah)) - mask = IN_CLASSC_NET; - } - } else { - a = inet_addr (ptr_word); - } - } - - if (ptr_mask != NULL) - *ptr_mask = '/'; - - if (a == (u32_t)-1L) { - ppp_warn("unknown host %s in auth. address list", ap->word); - continue; - } - if (offset != 0) { - if (offset >= ~mask) { - ppp_warn("interface unit %d too large for subnet %v", - ifunit, ptr_word); - continue; - } - a = lwip_htonl((lwip_ntohl(a) & mask) + offset); - mask = ~(u32_t)0; - } - ip[n].mask = lwip_htonl(mask); - ip[n].base = a & ip[n].mask; - ++n; - if (~mask == 0 && suggested_ip == 0) - suggested_ip = a; - } - *plink = NULL; - - ip[n].permit = 0; /* make the last entry forbid all addresses */ - ip[n].base = 0; /* to terminate the list */ - ip[n].mask = 0; - - addresses[unit] = ip; - - /* - * If the address given for the peer isn't authorized, or if - * the user hasn't given one, AND there is an authorized address - * which is a single host, then use that if we find one. - */ - if (suggested_ip != 0 - && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr))) { - wo->hisaddr = suggested_ip; - /* - * Do we insist on this address? No, if there are other - * addresses authorized than the suggested one. - */ - if (n > 1) - wo->accept_remote = 1; - } -} - -/* - * auth_ip_addr - check whether the peer is authorized to use - * a given IP address. Returns 1 if authorized, 0 otherwise. - */ -int -auth_ip_addr(unit, addr) - int unit; - u32_t addr; -{ - int ok; - - /* don't allow loopback or multicast address */ - if (bad_ip_adrs(addr)) - return 0; - - if (allowed_address_hook) { - ok = allowed_address_hook(addr); - if (ok >= 0) return ok; - } - - if (addresses[unit] != NULL) { - ok = ip_addr_check(addr, addresses[unit]); - if (ok >= 0) - return ok; - } - - if (auth_required) - return 0; /* no addresses authorized */ - return allow_any_ip || privileged || !have_route_to(addr); -} - -static int -ip_addr_check(addr, addrs) - u32_t addr; - struct permitted_ip *addrs; -{ - for (; ; ++addrs) - if ((addr & addrs->mask) == addrs->base) - return addrs->permit; -} - -/* - * bad_ip_adrs - return 1 if the IP address is one we don't want - * to use, such as an address in the loopback net or a multicast address. - * addr is in network byte order. - */ -int -bad_ip_adrs(addr) - u32_t addr; -{ - addr = lwip_ntohl(addr); - return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET - || IN_MULTICAST(addr) || IN_BADCLASS(addr); -} - -/* - * some_ip_ok - check a wordlist to see if it authorizes any - * IP address(es). - */ -static int -some_ip_ok(addrs) - struct wordlist *addrs; -{ - for (; addrs != 0; addrs = addrs->next) { - if (addrs->word[0] == '-') - break; - if (addrs->word[0] != '!') - return 1; /* some IP address is allowed */ - } - return 0; -} - -/* - * auth_number - check whether the remote number is allowed to connect. - * Returns 1 if authorized, 0 otherwise. - */ -int -auth_number() -{ - struct wordlist *wp = permitted_numbers; - int l; - - /* Allow all if no authorization list. */ - if (!wp) - return 1; - - /* Allow if we have a match in the authorization list. */ - while (wp) { - /* trailing '*' wildcard */ - l = strlen(wp->word); - if ((wp->word)[l - 1] == '*') - l--; - if (!strncasecmp(wp->word, remote_number, l)) - return 1; - wp = wp->next; - } - - return 0; -} - -/* - * check_access - complain if a secret file has too-liberal permissions. - */ -static void -check_access(f, filename) - FILE *f; - char *filename; -{ - struct stat sbuf; - - if (fstat(fileno(f), &sbuf) < 0) { - ppp_warn("cannot stat secret file %s: %m", filename); - } else if ((sbuf.st_mode & (S_IRWXG | S_IRWXO)) != 0) { - ppp_warn("Warning - secret file %s has world and/or group access", - filename); - } -} - -/* - * scan_authfile - Scan an authorization file for a secret suitable - * for authenticating `client' on `server'. The return value is -1 - * if no secret is found, otherwise >= 0. The return value has - * NONWILD_CLIENT set if the secret didn't have "*" for the client, and - * NONWILD_SERVER set if the secret didn't have "*" for the server. - * Any following words on the line up to a "--" (i.e. address authorization - * info) are placed in a wordlist and returned in *addrs. Any - * following words (extra options) are placed in a wordlist and - * returned in *opts. - * We assume secret is NULL or points to MAXWORDLEN bytes of space. - * Flags are non-zero if we need two colons in the secret in order to - * match. - */ -static int -scan_authfile(f, client, server, secret, addrs, opts, filename, flags) - FILE *f; - char *client; - char *server; - char *secret; - struct wordlist **addrs; - struct wordlist **opts; - char *filename; - int flags; -{ - int newline, xxx; - int got_flag, best_flag; - FILE *sf; - struct wordlist *ap, *addr_list, *alist, **app; - char word[MAXWORDLEN]; - char atfile[MAXWORDLEN]; - char lsecret[MAXWORDLEN]; - char *cp; - - if (addrs != NULL) - *addrs = NULL; - if (opts != NULL) - *opts = NULL; - addr_list = NULL; - if (!getword(f, word, &newline, filename)) - return -1; /* file is empty??? */ - newline = 1; - best_flag = -1; - for (;;) { - /* - * Skip until we find a word at the start of a line. - */ - while (!newline && getword(f, word, &newline, filename)) - ; - if (!newline) - break; /* got to end of file */ - - /* - * Got a client - check if it's a match or a wildcard. - */ - got_flag = 0; - if (client != NULL && strcmp(word, client) != 0 && !ISWILD(word)) { - newline = 0; - continue; - } - if (!ISWILD(word)) - got_flag = NONWILD_CLIENT; - - /* - * Now get a server and check if it matches. - */ - if (!getword(f, word, &newline, filename)) - break; - if (newline) - continue; - if (!ISWILD(word)) { - if (server != NULL && strcmp(word, server) != 0) - continue; - got_flag |= NONWILD_SERVER; - } - - /* - * Got some sort of a match - see if it's better than what - * we have already. - */ - if (got_flag <= best_flag) - continue; - - /* - * Get the secret. - */ - if (!getword(f, word, &newline, filename)) - break; - if (newline) - continue; - - /* - * SRP-SHA1 authenticator should never be reading secrets from - * a file. (Authenticatee may, though.) - */ - if (flags && ((cp = strchr(word, ':')) == NULL || - strchr(cp + 1, ':') == NULL)) - continue; - - if (secret != NULL) { - /* - * Special syntax: @/pathname means read secret from file. - */ - if (word[0] == '@' && word[1] == '/') { - strlcpy(atfile, word+1, sizeof(atfile)); - if ((sf = fopen(atfile, "r")) == NULL) { - ppp_warn("can't open indirect secret file %s", atfile); - continue; - } - check_access(sf, atfile); - if (!getword(sf, word, &xxx, atfile)) { - ppp_warn("no secret in indirect secret file %s", atfile); - fclose(sf); - continue; - } - fclose(sf); - } - strlcpy(lsecret, word, sizeof(lsecret)); - } - - /* - * Now read address authorization info and make a wordlist. - */ - app = &alist; - for (;;) { - if (!getword(f, word, &newline, filename) || newline) - break; - ap = (struct wordlist *) - malloc(sizeof(struct wordlist) + strlen(word) + 1); - if (ap == NULL) - novm("authorized addresses"); - ap->word = (char *) (ap + 1); - strcpy(ap->word, word); - *app = ap; - app = &ap->next; - } - *app = NULL; - - /* - * This is the best so far; remember it. - */ - best_flag = got_flag; - if (addr_list) - free_wordlist(addr_list); - addr_list = alist; - if (secret != NULL) - strlcpy(secret, lsecret, MAXWORDLEN); - - if (!newline) - break; - } - - /* scan for a -- word indicating the start of options */ - for (app = &addr_list; (ap = *app) != NULL; app = &ap->next) - if (strcmp(ap->word, "--") == 0) - break; - /* ap = start of options */ - if (ap != NULL) { - ap = ap->next; /* first option */ - free(*app); /* free the "--" word */ - *app = NULL; /* terminate addr list */ - } - if (opts != NULL) - *opts = ap; - else if (ap != NULL) - free_wordlist(ap); - if (addrs != NULL) - *addrs = addr_list; - else if (addr_list != NULL) - free_wordlist(addr_list); - - return best_flag; -} - -/* - * wordlist_count - return the number of items in a wordlist - */ -static int -wordlist_count(wp) - struct wordlist *wp; -{ - int n; - - for (n = 0; wp != NULL; wp = wp->next) - ++n; - return n; -} - -/* - * free_wordlist - release memory allocated for a wordlist. - */ -static void -free_wordlist(wp) - struct wordlist *wp; -{ - struct wordlist *next; - - while (wp != NULL) { - next = wp->next; - free(wp); - wp = next; - } -} -#endif /* UNUSED */ - -#endif /* PPP_SUPPORT */ +/* + * auth.c - PPP authentication and phase control. + * + * Copyright (c) 1993-2002 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Derived from main.c, which is: + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#if 0 /* UNUSED */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(_PATH_LASTLOG) && defined(__linux__) +#include +#endif + +#include +#include +#include + +#ifdef HAS_SHADOW +#include +#ifndef PW_PPP +#define PW_PPP PW_LOGIN +#endif +#endif + +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/lcp.h" +#if CCP_SUPPORT +#include "netif/ppp/ccp.h" +#endif /* CCP_SUPPORT */ +#if ECP_SUPPORT +#include "netif/ppp/ecp.h" +#endif /* ECP_SUPPORT */ +#include "netif/ppp/ipcp.h" +#if PAP_SUPPORT +#include "netif/ppp/upap.h" +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT +#include "netif/ppp/chap-new.h" +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT +#include "netif/ppp/eap.h" +#endif /* EAP_SUPPORT */ +#if CBCP_SUPPORT +#include "netif/ppp/cbcp.h" +#endif + +#if 0 /* UNUSED */ +#include "session.h" +#endif /* UNUSED */ + +#if 0 /* UNUSED */ +/* Bits in scan_authfile return value */ +#define NONWILD_SERVER 1 +#define NONWILD_CLIENT 2 + +#define ISWILD(word) (word[0] == '*' && word[1] == 0) +#endif /* UNUSED */ + +#if 0 /* UNUSED */ +/* List of addresses which the peer may use. */ +static struct permitted_ip *addresses[NUM_PPP]; + +/* Wordlist giving addresses which the peer may use + without authenticating itself. */ +static struct wordlist *noauth_addrs; + +/* Remote telephone number, if available */ +char remote_number[MAXNAMELEN]; + +/* Wordlist giving remote telephone numbers which may connect. */ +static struct wordlist *permitted_numbers; + +/* Extra options to apply, from the secrets file entry for the peer. */ +static struct wordlist *extra_options; +#endif /* UNUSED */ + +#if 0 /* UNUSED */ +/* Set if we require authentication only because we have a default route. */ +static bool default_auth; + +/* Hook to enable a plugin to control the idle time limit */ +int (*idle_time_hook) (struct ppp_idle *) = NULL; + +/* Hook for a plugin to say whether we can possibly authenticate any peer */ +int (*pap_check_hook) (void) = NULL; + +/* Hook for a plugin to check the PAP user and password */ +int (*pap_auth_hook) (char *user, char *passwd, char **msgp, + struct wordlist **paddrs, + struct wordlist **popts) = NULL; + +/* Hook for a plugin to know about the PAP user logout */ +void (*pap_logout_hook) (void) = NULL; + +/* Hook for a plugin to get the PAP password for authenticating us */ +int (*pap_passwd_hook) (char *user, char *passwd) = NULL; + +/* Hook for a plugin to say if we can possibly authenticate a peer using CHAP */ +int (*chap_check_hook) (void) = NULL; + +/* Hook for a plugin to get the CHAP password for authenticating us */ +int (*chap_passwd_hook) (char *user, char *passwd) = NULL; + +/* Hook for a plugin to say whether it is OK if the peer + refuses to authenticate. */ +int (*null_auth_hook) (struct wordlist **paddrs, + struct wordlist **popts) = NULL; + +int (*allowed_address_hook) (u32_t addr) = NULL; +#endif /* UNUSED */ + +#ifdef HAVE_MULTILINK +/* Hook for plugin to hear when an interface joins a multilink bundle */ +void (*multilink_join_hook) (void) = NULL; +#endif + +#if PPP_NOTIFY +/* A notifier for when the peer has authenticated itself, + and we are proceeding to the network phase. */ +struct notifier *auth_up_notifier = NULL; + +/* A notifier for when the link goes down. */ +struct notifier *link_down_notifier = NULL; +#endif /* PPP_NOTIFY */ + +/* + * Option variables. + */ +#if 0 /* MOVED TO ppp_settings */ +bool uselogin = 0; /* Use /etc/passwd for checking PAP */ +bool session_mgmt = 0; /* Do session management (login records) */ +bool cryptpap = 0; /* Passwords in pap-secrets are encrypted */ +bool refuse_pap = 0; /* Don't wanna auth. ourselves with PAP */ +bool refuse_chap = 0; /* Don't wanna auth. ourselves with CHAP */ +bool refuse_eap = 0; /* Don't wanna auth. ourselves with EAP */ +#if MSCHAP_SUPPORT +bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */ +bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */ +#else /* MSCHAP_SUPPORT */ +bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */ +bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */ +#endif /* MSCHAP_SUPPORT */ +bool usehostname = 0; /* Use hostname for our_name */ +bool auth_required = 0; /* Always require authentication from peer */ +bool allow_any_ip = 0; /* Allow peer to use any IP address */ +bool explicit_remote = 0; /* User specified explicit remote name */ +bool explicit_user = 0; /* Set if "user" option supplied */ +bool explicit_passwd = 0; /* Set if "password" option supplied */ +char remote_name[MAXNAMELEN]; /* Peer's name for authentication */ +static char *uafname; /* name of most recent +ua file */ + +extern char *crypt (const char *, const char *); +#endif /* UNUSED */ +/* Prototypes for procedures local to this file. */ + +static void network_phase(ppp_pcb *pcb); +#if PPP_IDLETIMELIMIT +static void check_idle(void *arg); +#endif /* PPP_IDLETIMELIMIT */ +#if PPP_MAXCONNECT +static void connect_time_expired(void *arg); +#endif /* PPP_MAXCONNECT */ +#if 0 /* UNUSED */ +static int null_login (int); +/* static int get_pap_passwd (char *); */ +static int have_pap_secret (int *); +static int have_chap_secret (char *, char *, int, int *); +static int have_srp_secret (char *client, char *server, int need_ip, + int *lacks_ipp); +static int ip_addr_check (u32_t, struct permitted_ip *); +static int scan_authfile (FILE *, char *, char *, char *, + struct wordlist **, struct wordlist **, + char *, int); +static void free_wordlist (struct wordlist *); +static void set_allowed_addrs (int, struct wordlist *, struct wordlist *); +static int some_ip_ok (struct wordlist *); +static int setupapfile (char **); +static int privgroup (char **); +static int set_noauth_addr (char **); +static int set_permitted_number (char **); +static void check_access (FILE *, char *); +static int wordlist_count (struct wordlist *); +#endif /* UNUSED */ + +#ifdef MAXOCTETS +static void check_maxoctets (void *); +#endif + +#if PPP_OPTIONS +/* + * Authentication-related options. + */ +option_t auth_options[] = { + { "auth", o_bool, &auth_required, + "Require authentication from peer", OPT_PRIO | 1 }, + { "noauth", o_bool, &auth_required, + "Don't require peer to authenticate", OPT_PRIOSUB | OPT_PRIV, + &allow_any_ip }, + { "require-pap", o_bool, &lcp_wantoptions[0].neg_upap, + "Require PAP authentication from peer", + OPT_PRIOSUB | 1, &auth_required }, + { "+pap", o_bool, &lcp_wantoptions[0].neg_upap, + "Require PAP authentication from peer", + OPT_ALIAS | OPT_PRIOSUB | 1, &auth_required }, + { "require-chap", o_bool, &auth_required, + "Require CHAP authentication from peer", + OPT_PRIOSUB | OPT_A2OR | MDTYPE_MD5, + &lcp_wantoptions[0].chap_mdtype }, + { "+chap", o_bool, &auth_required, + "Require CHAP authentication from peer", + OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MD5, + &lcp_wantoptions[0].chap_mdtype }, +#if MSCHAP_SUPPORT + { "require-mschap", o_bool, &auth_required, + "Require MS-CHAP authentication from peer", + OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT, + &lcp_wantoptions[0].chap_mdtype }, + { "+mschap", o_bool, &auth_required, + "Require MS-CHAP authentication from peer", + OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT, + &lcp_wantoptions[0].chap_mdtype }, + { "require-mschap-v2", o_bool, &auth_required, + "Require MS-CHAPv2 authentication from peer", + OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2, + &lcp_wantoptions[0].chap_mdtype }, + { "+mschap-v2", o_bool, &auth_required, + "Require MS-CHAPv2 authentication from peer", + OPT_ALIAS | OPT_PRIOSUB | OPT_A2OR | MDTYPE_MICROSOFT_V2, + &lcp_wantoptions[0].chap_mdtype }, +#endif /* MSCHAP_SUPPORT */ +#if 0 + { "refuse-pap", o_bool, &refuse_pap, + "Don't agree to auth to peer with PAP", 1 }, + { "-pap", o_bool, &refuse_pap, + "Don't allow PAP authentication with peer", OPT_ALIAS | 1 }, + { "refuse-chap", o_bool, &refuse_chap, + "Don't agree to auth to peer with CHAP", + OPT_A2CLRB | MDTYPE_MD5, + &lcp_allowoptions[0].chap_mdtype }, + { "-chap", o_bool, &refuse_chap, + "Don't allow CHAP authentication with peer", + OPT_ALIAS | OPT_A2CLRB | MDTYPE_MD5, + &lcp_allowoptions[0].chap_mdtype }, +#endif +#if MSCHAP_SUPPORT +#if 0 + { "refuse-mschap", o_bool, &refuse_mschap, + "Don't agree to auth to peer with MS-CHAP", + OPT_A2CLRB | MDTYPE_MICROSOFT, + &lcp_allowoptions[0].chap_mdtype }, + { "-mschap", o_bool, &refuse_mschap, + "Don't allow MS-CHAP authentication with peer", + OPT_ALIAS | OPT_A2CLRB | MDTYPE_MICROSOFT, + &lcp_allowoptions[0].chap_mdtype }, + { "refuse-mschap-v2", o_bool, &refuse_mschap_v2, + "Don't agree to auth to peer with MS-CHAPv2", + OPT_A2CLRB | MDTYPE_MICROSOFT_V2, + &lcp_allowoptions[0].chap_mdtype }, + { "-mschap-v2", o_bool, &refuse_mschap_v2, + "Don't allow MS-CHAPv2 authentication with peer", + OPT_ALIAS | OPT_A2CLRB | MDTYPE_MICROSOFT_V2, + &lcp_allowoptions[0].chap_mdtype }, +#endif +#endif /* MSCHAP_SUPPORT*/ +#if EAP_SUPPORT + { "require-eap", o_bool, &lcp_wantoptions[0].neg_eap, + "Require EAP authentication from peer", OPT_PRIOSUB | 1, + &auth_required }, +#if 0 + { "refuse-eap", o_bool, &refuse_eap, + "Don't agree to authenticate to peer with EAP", 1 }, +#endif +#endif /* EAP_SUPPORT */ + { "name", o_string, our_name, + "Set local name for authentication", + OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, MAXNAMELEN }, + + { "+ua", o_special, (void *)setupapfile, + "Get PAP user and password from file", + OPT_PRIO | OPT_A2STRVAL, &uafname }, + +#if 0 + { "user", o_string, user, + "Set name for auth with peer", OPT_PRIO | OPT_STATIC, + &explicit_user, MAXNAMELEN }, + + { "password", o_string, passwd, + "Password for authenticating us to the peer", + OPT_PRIO | OPT_STATIC | OPT_HIDE, + &explicit_passwd, MAXSECRETLEN }, +#endif + + { "usehostname", o_bool, &usehostname, + "Must use hostname for authentication", 1 }, + + { "remotename", o_string, remote_name, + "Set remote name for authentication", OPT_PRIO | OPT_STATIC, + &explicit_remote, MAXNAMELEN }, + + { "login", o_bool, &uselogin, + "Use system password database for PAP", OPT_A2COPY | 1 , + &session_mgmt }, + { "enable-session", o_bool, &session_mgmt, + "Enable session accounting for remote peers", OPT_PRIV | 1 }, + + { "papcrypt", o_bool, &cryptpap, + "PAP passwords are encrypted", 1 }, + + { "privgroup", o_special, (void *)privgroup, + "Allow group members to use privileged options", OPT_PRIV | OPT_A2LIST }, + + { "allow-ip", o_special, (void *)set_noauth_addr, + "Set IP address(es) which can be used without authentication", + OPT_PRIV | OPT_A2LIST }, + + { "remotenumber", o_string, remote_number, + "Set remote telephone number for authentication", OPT_PRIO | OPT_STATIC, + NULL, MAXNAMELEN }, + + { "allow-number", o_special, (void *)set_permitted_number, + "Set telephone number(s) which are allowed to connect", + OPT_PRIV | OPT_A2LIST }, + + { NULL } +}; +#endif /* PPP_OPTIONS */ + +#if 0 /* UNUSED */ +/* + * setupapfile - specifies UPAP info for authenticating with peer. + */ +static int +setupapfile(argv) + char **argv; +{ + FILE *ufile; + int l; + uid_t euid; + char u[MAXNAMELEN], p[MAXSECRETLEN]; + char *fname; + + lcp_allowoptions[0].neg_upap = 1; + + /* open user info file */ + fname = strdup(*argv); + if (fname == NULL) + novm("+ua file name"); + euid = geteuid(); + if (seteuid(getuid()) == -1) { + option_error("unable to reset uid before opening %s: %m", fname); + return 0; + } + ufile = fopen(fname, "r"); + if (seteuid(euid) == -1) + fatal("unable to regain privileges: %m"); + if (ufile == NULL) { + option_error("unable to open user login data file %s", fname); + return 0; + } + check_access(ufile, fname); + uafname = fname; + + /* get username */ + if (fgets(u, MAXNAMELEN - 1, ufile) == NULL + || fgets(p, MAXSECRETLEN - 1, ufile) == NULL) { + fclose(ufile); + option_error("unable to read user login data file %s", fname); + return 0; + } + fclose(ufile); + + /* get rid of newlines */ + l = strlen(u); + if (l > 0 && u[l-1] == '\n') + u[l-1] = 0; + l = strlen(p); + if (l > 0 && p[l-1] == '\n') + p[l-1] = 0; + + if (override_value("user", option_priority, fname)) { + strlcpy(ppp_settings.user, u, sizeof(ppp_settings.user)); + explicit_user = 1; + } + if (override_value("passwd", option_priority, fname)) { + strlcpy(ppp_settings.passwd, p, sizeof(ppp_settings.passwd)); + explicit_passwd = 1; + } + + return (1); +} + +/* + * privgroup - allow members of the group to have privileged access. + */ +static int +privgroup(argv) + char **argv; +{ + struct group *g; + int i; + + g = getgrnam(*argv); + if (g == 0) { + option_error("group %s is unknown", *argv); + return 0; + } + for (i = 0; i < ngroups; ++i) { + if (groups[i] == g->gr_gid) { + privileged = 1; + break; + } + } + return 1; +} + + +/* + * set_noauth_addr - set address(es) that can be used without authentication. + * Equivalent to specifying an entry like `"" * "" addr' in pap-secrets. + */ +static int +set_noauth_addr(argv) + char **argv; +{ + char *addr = *argv; + int l = strlen(addr) + 1; + struct wordlist *wp; + + wp = (struct wordlist *) malloc(sizeof(struct wordlist) + l); + if (wp == NULL) + novm("allow-ip argument"); + wp->word = (char *) (wp + 1); + wp->next = noauth_addrs; + MEMCPY(wp->word, addr, l); + noauth_addrs = wp; + return 1; +} + + +/* + * set_permitted_number - set remote telephone number(s) that may connect. + */ +static int +set_permitted_number(argv) + char **argv; +{ + char *number = *argv; + int l = strlen(number) + 1; + struct wordlist *wp; + + wp = (struct wordlist *) malloc(sizeof(struct wordlist) + l); + if (wp == NULL) + novm("allow-number argument"); + wp->word = (char *) (wp + 1); + wp->next = permitted_numbers; + MEMCPY(wp->word, number, l); + permitted_numbers = wp; + return 1; +} +#endif + +/* + * An Open on LCP has requested a change from Dead to Establish phase. + */ +void link_required(ppp_pcb *pcb) { + LWIP_UNUSED_ARG(pcb); +} + +#if 0 +/* + * Bring the link up to the point of being able to do ppp. + */ +void start_link(unit) + int unit; +{ + ppp_pcb *pcb = &ppp_pcb_list[unit]; + char *msg; + + status = EXIT_NEGOTIATION_FAILED; + new_phase(pcb, PPP_PHASE_SERIALCONN); + + hungup = 0; + devfd = the_channel->connect(); + msg = "Connect script failed"; + if (devfd < 0) + goto fail; + + /* set up the serial device as a ppp interface */ + /* + * N.B. we used to do tdb_writelock/tdb_writeunlock around this + * (from establish_ppp to set_ifunit). However, we won't be + * doing the set_ifunit in multilink mode, which is the only time + * we need the atomicity that the tdb_writelock/tdb_writeunlock + * gives us. Thus we don't need the tdb_writelock/tdb_writeunlock. + */ + fd_ppp = the_channel->establish_ppp(devfd); + msg = "ppp establishment failed"; + if (fd_ppp < 0) { + status = EXIT_FATAL_ERROR; + goto disconnect; + } + + if (!demand && ifunit >= 0) + set_ifunit(1); + + /* + * Start opening the connection and wait for + * incoming events (reply, timeout, etc.). + */ + if (ifunit >= 0) + ppp_notice("Connect: %s <--> %s", ifname, ppp_devnam); + else + ppp_notice("Starting negotiation on %s", ppp_devnam); + add_fd(fd_ppp); + + new_phase(pcb, PPP_PHASE_ESTABLISH); + + lcp_lowerup(pcb); + return; + + disconnect: + new_phase(pcb, PPP_PHASE_DISCONNECT); + if (the_channel->disconnect) + the_channel->disconnect(); + + fail: + new_phase(pcb, PPP_PHASE_DEAD); + if (the_channel->cleanup) + (*the_channel->cleanup)(); +} +#endif + +/* + * LCP has terminated the link; go to the Dead phase and take the + * physical layer down. + */ +void link_terminated(ppp_pcb *pcb) { + if (pcb->phase == PPP_PHASE_DEAD +#ifdef HAVE_MULTILINK + || pcb->phase == PPP_PHASE_MASTER +#endif /* HAVE_MULTILINK */ + ) + return; + new_phase(pcb, PPP_PHASE_DISCONNECT); + +#if 0 /* UNUSED */ + if (pap_logout_hook) { + pap_logout_hook(); + } + session_end(devnam); +#endif /* UNUSED */ + + if (!doing_multilink) { + ppp_notice("Connection terminated."); +#if PPP_STATS_SUPPORT + print_link_stats(); +#endif /* PPP_STATS_SUPPORT */ + } else + ppp_notice("Link terminated."); + + lcp_lowerdown(pcb); + + ppp_link_terminated(pcb); +#if 0 + /* + * Delete pid files before disestablishing ppp. Otherwise it + * can happen that another pppd gets the same unit and then + * we delete its pid file. + */ + if (!doing_multilink && !demand) + remove_pidfiles(); + + /* + * If we may want to bring the link up again, transfer + * the ppp unit back to the loopback. Set the + * real serial device back to its normal mode of operation. + */ + if (fd_ppp >= 0) { + remove_fd(fd_ppp); + clean_check(); + the_channel->disestablish_ppp(devfd); + if (doing_multilink) + mp_exit_bundle(); + fd_ppp = -1; + } + if (!hungup) + lcp_lowerdown(pcb); + if (!doing_multilink && !demand) + script_unsetenv("IFNAME"); + + /* + * Run disconnector script, if requested. + * XXX we may not be able to do this if the line has hung up! + */ + if (devfd >= 0 && the_channel->disconnect) { + the_channel->disconnect(); + devfd = -1; + } + if (the_channel->cleanup) + (*the_channel->cleanup)(); + + if (doing_multilink && multilink_master) { + if (!bundle_terminating) + new_phase(pcb, PPP_PHASE_MASTER); + else + mp_bundle_terminated(); + } else + new_phase(pcb, PPP_PHASE_DEAD); +#endif +} + +/* + * LCP has gone down; it will either die or try to re-establish. + */ +void link_down(ppp_pcb *pcb) { +#if PPP_NOTIFY + notify(link_down_notifier, 0); +#endif /* PPP_NOTIFY */ + + if (!doing_multilink) { + upper_layers_down(pcb); + if (pcb->phase != PPP_PHASE_DEAD +#ifdef HAVE_MULTILINK + && pcb->phase != PPP_PHASE_MASTER +#endif /* HAVE_MULTILINK */ + ) + new_phase(pcb, PPP_PHASE_ESTABLISH); + } + /* XXX if doing_multilink, should do something to stop + network-layer traffic on the link */ +} + +void upper_layers_down(ppp_pcb *pcb) { + int i; + const struct protent *protp; + + for (i = 0; (protp = protocols[i]) != NULL; ++i) { + if (protp->protocol != PPP_LCP && protp->lowerdown != NULL) + (*protp->lowerdown)(pcb); + if (protp->protocol < 0xC000 && protp->close != NULL) + (*protp->close)(pcb, "LCP down"); + } + pcb->num_np_open = 0; + pcb->num_np_up = 0; +} + +/* + * The link is established. + * Proceed to the Dead, Authenticate or Network phase as appropriate. + */ +void link_established(ppp_pcb *pcb) { +#if PPP_AUTH_SUPPORT + int auth; +#if PPP_SERVER +#if PAP_SUPPORT + lcp_options *wo = &pcb->lcp_wantoptions; +#endif /* PAP_SUPPORT */ + lcp_options *go = &pcb->lcp_gotoptions; +#endif /* PPP_SERVER */ + lcp_options *ho = &pcb->lcp_hisoptions; +#endif /* PPP_AUTH_SUPPORT */ + int i; + const struct protent *protp; + + /* + * Tell higher-level protocols that LCP is up. + */ + if (!doing_multilink) { + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->protocol != PPP_LCP + && protp->lowerup != NULL) + (*protp->lowerup)(pcb); + } + +#if PPP_AUTH_SUPPORT +#if PPP_SERVER +#if PPP_ALLOWED_ADDRS + if (!auth_required && noauth_addrs != NULL) + set_allowed_addrs(unit, NULL, NULL); +#endif /* PPP_ALLOWED_ADDRS */ + + if (pcb->settings.auth_required && !(0 +#if PAP_SUPPORT + || go->neg_upap +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + || go->neg_chap +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + || go->neg_eap +#endif /* EAP_SUPPORT */ + )) { + +#if PPP_ALLOWED_ADDRS + /* + * We wanted the peer to authenticate itself, and it refused: + * if we have some address(es) it can use without auth, fine, + * otherwise treat it as though it authenticated with PAP using + * a username of "" and a password of "". If that's not OK, + * boot it out. + */ + if (noauth_addrs != NULL) { + set_allowed_addrs(unit, NULL, NULL); + } else +#endif /* PPP_ALLOWED_ADDRS */ + if (!pcb->settings.null_login +#if PAP_SUPPORT + || !wo->neg_upap +#endif /* PAP_SUPPORT */ + ) { + ppp_warn("peer refused to authenticate: terminating link"); +#if 0 /* UNUSED */ + status = EXIT_PEER_AUTH_FAILED; +#endif /* UNUSED */ + pcb->err_code = PPPERR_AUTHFAIL; + lcp_close(pcb, "peer refused to authenticate"); + return; + } + } +#endif /* PPP_SERVER */ + + new_phase(pcb, PPP_PHASE_AUTHENTICATE); + auth = 0; +#if PPP_SERVER +#if EAP_SUPPORT + if (go->neg_eap) { + eap_authpeer(pcb, PPP_OUR_NAME); + auth |= EAP_PEER; + } else +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT + if (go->neg_chap) { + chap_auth_peer(pcb, PPP_OUR_NAME, CHAP_DIGEST(go->chap_mdtype)); + auth |= CHAP_PEER; + } else +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + if (go->neg_upap) { + upap_authpeer(pcb); + auth |= PAP_PEER; + } else +#endif /* PAP_SUPPORT */ + {} +#endif /* PPP_SERVER */ + +#if EAP_SUPPORT + if (ho->neg_eap) { + eap_authwithpeer(pcb, pcb->settings.user); + auth |= EAP_WITHPEER; + } else +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT + if (ho->neg_chap) { + chap_auth_with_peer(pcb, pcb->settings.user, CHAP_DIGEST(ho->chap_mdtype)); + auth |= CHAP_WITHPEER; + } else +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + if (ho->neg_upap) { + upap_authwithpeer(pcb, pcb->settings.user, pcb->settings.passwd); + auth |= PAP_WITHPEER; + } else +#endif /* PAP_SUPPORT */ + {} + + pcb->auth_pending = auth; + pcb->auth_done = 0; + + if (!auth) +#endif /* PPP_AUTH_SUPPORT */ + network_phase(pcb); +} + +/* + * Proceed to the network phase. + */ +static void network_phase(ppp_pcb *pcb) { +#if CBCP_SUPPORT + ppp_pcb *pcb = &ppp_pcb_list[unit]; +#endif +#if 0 /* UNUSED */ + lcp_options *go = &lcp_gotoptions[unit]; +#endif /* UNUSED */ + +#if 0 /* UNUSED */ + /* Log calling number. */ + if (*remote_number) + ppp_notice("peer from calling number %q authorized", remote_number); +#endif /* UNUSED */ + +#if PPP_NOTIFY + /* + * If the peer had to authenticate, notify it now. + */ + if (0 +#if CHAP_SUPPORT + || go->neg_chap +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + || go->neg_upap +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + || go->neg_eap +#endif /* EAP_SUPPORT */ + ) { + notify(auth_up_notifier, 0); + } +#endif /* PPP_NOTIFY */ + +#if CBCP_SUPPORT + /* + * If we negotiated callback, do it now. + */ + if (go->neg_cbcp) { + new_phase(pcb, PPP_PHASE_CALLBACK); + (*cbcp_protent.open)(pcb); + return; + } +#endif + +#if PPP_OPTIONS + /* + * Process extra options from the secrets file + */ + if (extra_options) { + options_from_list(extra_options, 1); + free_wordlist(extra_options); + extra_options = 0; + } +#endif /* PPP_OPTIONS */ + start_networks(pcb); +} + +void start_networks(ppp_pcb *pcb) { +#if CCP_SUPPORT || ECP_SUPPORT + int i; + const struct protent *protp; +#endif /* CCP_SUPPORT || ECP_SUPPORT */ + + new_phase(pcb, PPP_PHASE_NETWORK); + +#ifdef HAVE_MULTILINK + if (multilink) { + if (mp_join_bundle()) { + if (multilink_join_hook) + (*multilink_join_hook)(); + if (updetach && !nodetach) + detach(); + return; + } + } +#endif /* HAVE_MULTILINK */ + +#ifdef PPP_FILTER + if (!demand) + set_filters(&pass_filter, &active_filter); +#endif +#if CCP_SUPPORT || ECP_SUPPORT + /* Start CCP and ECP */ + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if ( + (0 +#if ECP_SUPPORT + || protp->protocol == PPP_ECP +#endif /* ECP_SUPPORT */ +#if CCP_SUPPORT + || protp->protocol == PPP_CCP +#endif /* CCP_SUPPORT */ + ) + && protp->open != NULL) + (*protp->open)(pcb); +#endif /* CCP_SUPPORT || ECP_SUPPORT */ + + /* + * Bring up other network protocols iff encryption is not required. + */ + if (1 +#if ECP_SUPPORT + && !ecp_gotoptions[unit].required +#endif /* ECP_SUPPORT */ +#if MPPE_SUPPORT + && !pcb->ccp_gotoptions.mppe +#endif /* MPPE_SUPPORT */ + ) + continue_networks(pcb); +} + +void continue_networks(ppp_pcb *pcb) { + int i; + const struct protent *protp; + + /* + * Start the "real" network protocols. + */ + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->protocol < 0xC000 +#if CCP_SUPPORT + && protp->protocol != PPP_CCP +#endif /* CCP_SUPPORT */ +#if ECP_SUPPORT + && protp->protocol != PPP_ECP +#endif /* ECP_SUPPORT */ + && protp->open != NULL) { + (*protp->open)(pcb); + ++pcb->num_np_open; + } + + if (pcb->num_np_open == 0) + /* nothing to do */ + lcp_close(pcb, "No network protocols running"); +} + +#if PPP_AUTH_SUPPORT +#if PPP_SERVER +/* + * auth_check_passwd - Check the user name and passwd against configuration. + * + * returns: + * 0: Authentication failed. + * 1: Authentication succeeded. + * In either case, msg points to an appropriate message and msglen to the message len. + */ +int auth_check_passwd(ppp_pcb *pcb, char *auser, int userlen, char *apasswd, int passwdlen, const char **msg, int *msglen) { + int secretuserlen; + int secretpasswdlen; + + if (pcb->settings.user && pcb->settings.passwd) { + secretuserlen = (int)strlen(pcb->settings.user); + secretpasswdlen = (int)strlen(pcb->settings.passwd); + if (secretuserlen == userlen + && secretpasswdlen == passwdlen + && !memcmp(auser, pcb->settings.user, userlen) + && !memcmp(apasswd, pcb->settings.passwd, passwdlen) ) { + *msg = "Login ok"; + *msglen = sizeof("Login ok")-1; + return 1; + } + } + + *msg = "Login incorrect"; + *msglen = sizeof("Login incorrect")-1; + return 0; +} + +/* + * The peer has failed to authenticate himself using `protocol'. + */ +void auth_peer_fail(ppp_pcb *pcb, int protocol) { + LWIP_UNUSED_ARG(protocol); + /* + * Authentication failure: take the link down + */ +#if 0 /* UNUSED */ + status = EXIT_PEER_AUTH_FAILED; +#endif /* UNUSED */ + pcb->err_code = PPPERR_AUTHFAIL; + lcp_close(pcb, "Authentication failed"); +} + +/* + * The peer has been successfully authenticated using `protocol'. + */ +void auth_peer_success(ppp_pcb *pcb, int protocol, int prot_flavor, const char *name, int namelen) { + int bit; +#ifndef HAVE_MULTILINK + LWIP_UNUSED_ARG(name); + LWIP_UNUSED_ARG(namelen); +#endif /* HAVE_MULTILINK */ + + switch (protocol) { +#if CHAP_SUPPORT + case PPP_CHAP: + bit = CHAP_PEER; + switch (prot_flavor) { + case CHAP_MD5: + bit |= CHAP_MD5_PEER; + break; +#if MSCHAP_SUPPORT + case CHAP_MICROSOFT: + bit |= CHAP_MS_PEER; + break; + case CHAP_MICROSOFT_V2: + bit |= CHAP_MS2_PEER; + break; +#endif /* MSCHAP_SUPPORT */ + default: + break; + } + break; +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + case PPP_PAP: + bit = PAP_PEER; + break; +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + case PPP_EAP: + bit = EAP_PEER; + break; +#endif /* EAP_SUPPORT */ + default: + ppp_warn("auth_peer_success: unknown protocol %x", protocol); + return; + } + +#ifdef HAVE_MULTILINK + /* + * Save the authenticated name of the peer for later. + */ + if (namelen > (int)sizeof(pcb->peer_authname) - 1) + namelen = (int)sizeof(pcb->peer_authname) - 1; + MEMCPY(pcb->peer_authname, name, namelen); + pcb->peer_authname[namelen] = 0; +#endif /* HAVE_MULTILINK */ +#if 0 /* UNUSED */ + script_setenv("PEERNAME", , 0); +#endif /* UNUSED */ + + /* Save the authentication method for later. */ + pcb->auth_done |= bit; + + /* + * If there is no more authentication still to be done, + * proceed to the network (or callback) phase. + */ + if ((pcb->auth_pending &= ~bit) == 0) + network_phase(pcb); +} +#endif /* PPP_SERVER */ + +/* + * We have failed to authenticate ourselves to the peer using `protocol'. + */ +void auth_withpeer_fail(ppp_pcb *pcb, int protocol) { + LWIP_UNUSED_ARG(protocol); + /* + * We've failed to authenticate ourselves to our peer. + * + * Some servers keep sending CHAP challenges, but there + * is no point in persisting without any way to get updated + * authentication secrets. + * + * He'll probably take the link down, and there's not much + * we can do except wait for that. + */ + pcb->err_code = PPPERR_AUTHFAIL; + lcp_close(pcb, "Failed to authenticate ourselves to peer"); +} + +/* + * We have successfully authenticated ourselves with the peer using `protocol'. + */ +void auth_withpeer_success(ppp_pcb *pcb, int protocol, int prot_flavor) { + int bit; + const char *prot = ""; + + switch (protocol) { +#if CHAP_SUPPORT + case PPP_CHAP: + bit = CHAP_WITHPEER; + prot = "CHAP"; + switch (prot_flavor) { + case CHAP_MD5: + bit |= CHAP_MD5_WITHPEER; + break; +#if MSCHAP_SUPPORT + case CHAP_MICROSOFT: + bit |= CHAP_MS_WITHPEER; + break; + case CHAP_MICROSOFT_V2: + bit |= CHAP_MS2_WITHPEER; + break; +#endif /* MSCHAP_SUPPORT */ + default: + break; + } + break; +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + case PPP_PAP: + bit = PAP_WITHPEER; + prot = "PAP"; + break; +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + case PPP_EAP: + bit = EAP_WITHPEER; + prot = "EAP"; + break; +#endif /* EAP_SUPPORT */ + default: + ppp_warn("auth_withpeer_success: unknown protocol %x", protocol); + bit = 0; + /* no break */ + } + + ppp_notice("%s authentication succeeded", prot); + + /* Save the authentication method for later. */ + pcb->auth_done |= bit; + + /* + * If there is no more authentication still being done, + * proceed to the network (or callback) phase. + */ + if ((pcb->auth_pending &= ~bit) == 0) + network_phase(pcb); +} +#endif /* PPP_AUTH_SUPPORT */ + + +/* + * np_up - a network protocol has come up. + */ +void np_up(ppp_pcb *pcb, int proto) { +#if PPP_IDLETIMELIMIT + int tlim; +#endif /* PPP_IDLETIMELIMIT */ + LWIP_UNUSED_ARG(proto); + + if (pcb->num_np_up == 0) { + /* + * At this point we consider that the link has come up successfully. + */ + new_phase(pcb, PPP_PHASE_RUNNING); + +#if PPP_IDLETIMELIMIT +#if 0 /* UNUSED */ + if (idle_time_hook != 0) + tlim = (*idle_time_hook)(NULL); + else +#endif /* UNUSED */ + tlim = pcb->settings.idle_time_limit; + if (tlim > 0) + TIMEOUT(check_idle, (void*)pcb, tlim); +#endif /* PPP_IDLETIMELIMIT */ + +#if PPP_MAXCONNECT + /* + * Set a timeout to close the connection once the maximum + * connect time has expired. + */ + if (pcb->settings.maxconnect > 0) + TIMEOUT(connect_time_expired, (void*)pcb, pcb->settings.maxconnect); +#endif /* PPP_MAXCONNECT */ + +#ifdef MAXOCTETS + if (maxoctets > 0) + TIMEOUT(check_maxoctets, NULL, maxoctets_timeout); +#endif + +#if 0 /* Unused */ + /* + * Detach now, if the updetach option was given. + */ + if (updetach && !nodetach) + detach(); +#endif /* Unused */ + } + ++pcb->num_np_up; +} + +/* + * np_down - a network protocol has gone down. + */ +void np_down(ppp_pcb *pcb, int proto) { + LWIP_UNUSED_ARG(proto); + if (--pcb->num_np_up == 0) { +#if PPP_IDLETIMELIMIT + UNTIMEOUT(check_idle, (void*)pcb); +#endif /* PPP_IDLETIMELIMIT */ +#if PPP_MAXCONNECT + UNTIMEOUT(connect_time_expired, NULL); +#endif /* PPP_MAXCONNECT */ +#ifdef MAXOCTETS + UNTIMEOUT(check_maxoctets, NULL); +#endif + new_phase(pcb, PPP_PHASE_NETWORK); + } +} + +/* + * np_finished - a network protocol has finished using the link. + */ +void np_finished(ppp_pcb *pcb, int proto) { + LWIP_UNUSED_ARG(proto); + if (--pcb->num_np_open <= 0) { + /* no further use for the link: shut up shop. */ + lcp_close(pcb, "No network protocols running"); + } +} + +#ifdef MAXOCTETS +static void +check_maxoctets(arg) + void *arg; +{ +#if PPP_STATS_SUPPORT + unsigned int used; + + update_link_stats(ifunit); + link_stats_valid=0; + + switch(maxoctets_dir) { + case PPP_OCTETS_DIRECTION_IN: + used = link_stats.bytes_in; + break; + case PPP_OCTETS_DIRECTION_OUT: + used = link_stats.bytes_out; + break; + case PPP_OCTETS_DIRECTION_MAXOVERAL: + case PPP_OCTETS_DIRECTION_MAXSESSION: + used = (link_stats.bytes_in > link_stats.bytes_out) ? link_stats.bytes_in : link_stats.bytes_out; + break; + default: + used = link_stats.bytes_in+link_stats.bytes_out; + break; + } + if (used > maxoctets) { + ppp_notice("Traffic limit reached. Limit: %u Used: %u", maxoctets, used); + status = EXIT_TRAFFIC_LIMIT; + lcp_close(pcb, "Traffic limit"); +#if 0 /* UNUSED */ + need_holdoff = 0; +#endif /* UNUSED */ + } else { + TIMEOUT(check_maxoctets, NULL, maxoctets_timeout); + } +#endif /* PPP_STATS_SUPPORT */ +} +#endif /* MAXOCTETS */ + +#if PPP_IDLETIMELIMIT +/* + * check_idle - check whether the link has been idle for long + * enough that we can shut it down. + */ +static void check_idle(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + struct ppp_idle idle; + time_t itime; + int tlim; + + if (!get_idle_time(pcb, &idle)) + return; +#if 0 /* UNUSED */ + if (idle_time_hook != 0) { + tlim = idle_time_hook(&idle); + } else { +#endif /* UNUSED */ + itime = LWIP_MIN(idle.xmit_idle, idle.recv_idle); + tlim = pcb->settings.idle_time_limit - itime; +#if 0 /* UNUSED */ + } +#endif /* UNUSED */ + if (tlim <= 0) { + /* link is idle: shut it down. */ + ppp_notice("Terminating connection due to lack of activity."); + pcb->err_code = PPPERR_IDLETIMEOUT; + lcp_close(pcb, "Link inactive"); +#if 0 /* UNUSED */ + need_holdoff = 0; +#endif /* UNUSED */ + } else { + TIMEOUT(check_idle, (void*)pcb, tlim); + } +} +#endif /* PPP_IDLETIMELIMIT */ + +#if PPP_MAXCONNECT +/* + * connect_time_expired - log a message and close the connection. + */ +static void connect_time_expired(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + ppp_info("Connect time expired"); + pcb->err_code = PPPERR_CONNECTTIME; + lcp_close(pcb, "Connect time expired"); /* Close connection */ +} +#endif /* PPP_MAXCONNECT */ + +#if PPP_OPTIONS +/* + * auth_check_options - called to check authentication options. + */ +void +auth_check_options() +{ + lcp_options *wo = &lcp_wantoptions[0]; + int can_auth; + int lacks_ip; + + /* Default our_name to hostname, and user to our_name */ + if (our_name[0] == 0 || usehostname) + strlcpy(our_name, hostname, sizeof(our_name)); + /* If a blank username was explicitly given as an option, trust + the user and don't use our_name */ + if (ppp_settings.user[0] == 0 && !explicit_user) + strlcpy(ppp_settings.user, our_name, sizeof(ppp_settings.user)); + + /* + * If we have a default route, require the peer to authenticate + * unless the noauth option was given or the real user is root. + */ + if (!auth_required && !allow_any_ip && have_route_to(0) && !privileged) { + auth_required = 1; + default_auth = 1; + } + +#if CHAP_SUPPORT + /* If we selected any CHAP flavors, we should probably negotiate it. :-) */ + if (wo->chap_mdtype) + wo->neg_chap = 1; +#endif /* CHAP_SUPPORT */ + + /* If authentication is required, ask peer for CHAP, PAP, or EAP. */ + if (auth_required) { + allow_any_ip = 0; + if (1 +#if CHAP_SUPPORT + && !wo->neg_chap +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + && !wo->neg_upap +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + && !wo->neg_eap +#endif /* EAP_SUPPORT */ + ) { +#if CHAP_SUPPORT + wo->neg_chap = CHAP_MDTYPE_SUPPORTED != MDTYPE_NONE; + wo->chap_mdtype = CHAP_MDTYPE_SUPPORTED; +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + wo->neg_upap = 1; +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + wo->neg_eap = 1; +#endif /* EAP_SUPPORT */ + } + } else { +#if CHAP_SUPPORT + wo->neg_chap = 0; + wo->chap_mdtype = MDTYPE_NONE; +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + wo->neg_upap = 0; +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + wo->neg_eap = 0; +#endif /* EAP_SUPPORT */ + } + + /* + * Check whether we have appropriate secrets to use + * to authenticate the peer. Note that EAP can authenticate by way + * of a CHAP-like exchanges as well as SRP. + */ + lacks_ip = 0; +#if PAP_SUPPORT + can_auth = wo->neg_upap && (uselogin || have_pap_secret(&lacks_ip)); +#else + can_auth = 0; +#endif /* PAP_SUPPORT */ + if (!can_auth && (0 +#if CHAP_SUPPORT + || wo->neg_chap +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + || wo->neg_eap +#endif /* EAP_SUPPORT */ + )) { +#if CHAP_SUPPORT + can_auth = have_chap_secret((explicit_remote? remote_name: NULL), + our_name, 1, &lacks_ip); +#else + can_auth = 0; +#endif + } + if (!can_auth +#if EAP_SUPPORT + && wo->neg_eap +#endif /* EAP_SUPPORT */ + ) { + can_auth = have_srp_secret((explicit_remote? remote_name: NULL), + our_name, 1, &lacks_ip); + } + + if (auth_required && !can_auth && noauth_addrs == NULL) { + if (default_auth) { + option_error( +"By default the remote system is required to authenticate itself"); + option_error( +"(because this system has a default route to the internet)"); + } else if (explicit_remote) + option_error( +"The remote system (%s) is required to authenticate itself", + remote_name); + else + option_error( +"The remote system is required to authenticate itself"); + option_error( +"but I couldn't find any suitable secret (password) for it to use to do so."); + if (lacks_ip) + option_error( +"(None of the available passwords would let it use an IP address.)"); + + exit(1); + } + + /* + * Early check for remote number authorization. + */ + if (!auth_number()) { + ppp_warn("calling number %q is not authorized", remote_number); + exit(EXIT_CNID_AUTH_FAILED); + } +} +#endif /* PPP_OPTIONS */ + +#if 0 /* UNUSED */ +/* + * auth_reset - called when LCP is starting negotiations to recheck + * authentication options, i.e. whether we have appropriate secrets + * to use for authenticating ourselves and/or the peer. + */ +void +auth_reset(unit) + int unit; +{ + lcp_options *go = &lcp_gotoptions[unit]; + lcp_options *ao = &lcp_allowoptions[unit]; + int hadchap; + + hadchap = -1; + ao->neg_upap = !refuse_pap && (passwd[0] != 0 || get_pap_passwd(NULL)); + ao->neg_chap = (!refuse_chap || !refuse_mschap || !refuse_mschap_v2) + && (passwd[0] != 0 || + (hadchap = have_chap_secret(user, (explicit_remote? remote_name: + NULL), 0, NULL))); + ao->neg_eap = !refuse_eap && ( + passwd[0] != 0 || + (hadchap == 1 || (hadchap == -1 && have_chap_secret(user, + (explicit_remote? remote_name: NULL), 0, NULL))) || + have_srp_secret(user, (explicit_remote? remote_name: NULL), 0, NULL)); + + hadchap = -1; + if (go->neg_upap && !uselogin && !have_pap_secret(NULL)) + go->neg_upap = 0; + if (go->neg_chap) { + if (!(hadchap = have_chap_secret((explicit_remote? remote_name: NULL), + our_name, 1, NULL))) + go->neg_chap = 0; + } + if (go->neg_eap && + (hadchap == 0 || (hadchap == -1 && + !have_chap_secret((explicit_remote? remote_name: NULL), our_name, + 1, NULL))) && + !have_srp_secret((explicit_remote? remote_name: NULL), our_name, 1, + NULL)) + go->neg_eap = 0; +} + +/* + * check_passwd - Check the user name and passwd against the PAP secrets + * file. If requested, also check against the system password database, + * and login the user if OK. + * + * returns: + * UPAP_AUTHNAK: Authentication failed. + * UPAP_AUTHACK: Authentication succeeded. + * In either case, msg points to an appropriate message. + */ +int +check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) + int unit; + char *auser; + int userlen; + char *apasswd; + int passwdlen; + char **msg; +{ + return UPAP_AUTHNAK; + int ret; + char *filename; + FILE *f; + struct wordlist *addrs = NULL, *opts = NULL; + char passwd[256], user[256]; + char secret[MAXWORDLEN]; + static int attempts = 0; + + /* + * Make copies of apasswd and auser, then null-terminate them. + * If there are unprintable characters in the password, make + * them visible. + */ + slprintf(ppp_settings.passwd, sizeof(ppp_settings.passwd), "%.*v", passwdlen, apasswd); + slprintf(ppp_settings.user, sizeof(ppp_settings.user), "%.*v", userlen, auser); + *msg = ""; + + /* + * Check if a plugin wants to handle this. + */ + if (pap_auth_hook) { + ret = (*pap_auth_hook)(ppp_settings.user, ppp_settings.passwd, msg, &addrs, &opts); + if (ret >= 0) { + /* note: set_allowed_addrs() saves opts (but not addrs): + don't free it! */ + if (ret) + set_allowed_addrs(unit, addrs, opts); + else if (opts != 0) + free_wordlist(opts); + if (addrs != 0) + free_wordlist(addrs); + BZERO(ppp_settings.passwd, sizeof(ppp_settings.passwd)); + return ret? UPAP_AUTHACK: UPAP_AUTHNAK; + } + } + + /* + * Open the file of pap secrets and scan for a suitable secret + * for authenticating this user. + */ + filename = _PATH_UPAPFILE; + addrs = opts = NULL; + ret = UPAP_AUTHNAK; + f = fopen(filename, "r"); + if (f == NULL) { + ppp_error("Can't open PAP password file %s: %m", filename); + + } else { + check_access(f, filename); + if (scan_authfile(f, ppp_settings.user, our_name, secret, &addrs, &opts, filename, 0) < 0) { + ppp_warn("no PAP secret found for %s", user); + } else { + /* + * If the secret is "@login", it means to check + * the password against the login database. + */ + int login_secret = strcmp(secret, "@login") == 0; + ret = UPAP_AUTHACK; + if (uselogin || login_secret) { + /* login option or secret is @login */ + if (session_full(ppp_settings.user, ppp_settings.passwd, devnam, msg) == 0) { + ret = UPAP_AUTHNAK; + } + } else if (session_mgmt) { + if (session_check(ppp_settings.user, NULL, devnam, NULL) == 0) { + ppp_warn("Peer %q failed PAP Session verification", user); + ret = UPAP_AUTHNAK; + } + } + if (secret[0] != 0 && !login_secret) { + /* password given in pap-secrets - must match */ + if ((cryptpap || strcmp(ppp_settings.passwd, secret) != 0) + && strcmp(crypt(ppp_settings.passwd, secret), secret) != 0) + ret = UPAP_AUTHNAK; + } + } + fclose(f); + } + + if (ret == UPAP_AUTHNAK) { + if (**msg == 0) + *msg = "Login incorrect"; + /* + * XXX can we ever get here more than once?? + * Frustrate passwd stealer programs. + * Allow 10 tries, but start backing off after 3 (stolen from login). + * On 10'th, drop the connection. + */ + if (attempts++ >= 10) { + ppp_warn("%d LOGIN FAILURES ON %s, %s", attempts, devnam, user); + lcp_close(pcb, "login failed"); + } + if (attempts > 3) + sleep((u_int) (attempts - 3) * 5); + if (opts != NULL) + free_wordlist(opts); + + } else { + attempts = 0; /* Reset count */ + if (**msg == 0) + *msg = "Login ok"; + set_allowed_addrs(unit, addrs, opts); + } + + if (addrs != NULL) + free_wordlist(addrs); + BZERO(ppp_settings.passwd, sizeof(ppp_settings.passwd)); + BZERO(secret, sizeof(secret)); + + return ret; +} + +/* + * null_login - Check if a username of "" and a password of "" are + * acceptable, and iff so, set the list of acceptable IP addresses + * and return 1. + */ +static int +null_login(unit) + int unit; +{ + char *filename; + FILE *f; + int i, ret; + struct wordlist *addrs, *opts; + char secret[MAXWORDLEN]; + + /* + * Check if a plugin wants to handle this. + */ + ret = -1; + if (null_auth_hook) + ret = (*null_auth_hook)(&addrs, &opts); + + /* + * Open the file of pap secrets and scan for a suitable secret. + */ + if (ret <= 0) { + filename = _PATH_UPAPFILE; + addrs = NULL; + f = fopen(filename, "r"); + if (f == NULL) + return 0; + check_access(f, filename); + + i = scan_authfile(f, "", our_name, secret, &addrs, &opts, filename, 0); + ret = i >= 0 && secret[0] == 0; + BZERO(secret, sizeof(secret)); + fclose(f); + } + + if (ret) + set_allowed_addrs(unit, addrs, opts); + else if (opts != 0) + free_wordlist(opts); + if (addrs != 0) + free_wordlist(addrs); + + return ret; +} + +/* + * get_pap_passwd - get a password for authenticating ourselves with + * our peer using PAP. Returns 1 on success, 0 if no suitable password + * could be found. + * Assumes passwd points to MAXSECRETLEN bytes of space (if non-null). + */ +static int +get_pap_passwd(passwd) + char *passwd; +{ + char *filename; + FILE *f; + int ret; + char secret[MAXWORDLEN]; + + /* + * Check whether a plugin wants to supply this. + */ + if (pap_passwd_hook) { + ret = (*pap_passwd_hook)(ppp_settings,user, ppp_settings.passwd); + if (ret >= 0) + return ret; + } + + filename = _PATH_UPAPFILE; + f = fopen(filename, "r"); + if (f == NULL) + return 0; + check_access(f, filename); + ret = scan_authfile(f, user, + (remote_name[0]? remote_name: NULL), + secret, NULL, NULL, filename, 0); + fclose(f); + if (ret < 0) + return 0; + if (passwd != NULL) + strlcpy(passwd, secret, MAXSECRETLEN); + BZERO(secret, sizeof(secret)); + return 1; +} + +/* + * have_pap_secret - check whether we have a PAP file with any + * secrets that we could possibly use for authenticating the peer. + */ +static int +have_pap_secret(lacks_ipp) + int *lacks_ipp; +{ + FILE *f; + int ret; + char *filename; + struct wordlist *addrs; + + /* let the plugin decide, if there is one */ + if (pap_check_hook) { + ret = (*pap_check_hook)(); + if (ret >= 0) + return ret; + } + + filename = _PATH_UPAPFILE; + f = fopen(filename, "r"); + if (f == NULL) + return 0; + + ret = scan_authfile(f, (explicit_remote? remote_name: NULL), our_name, + NULL, &addrs, NULL, filename, 0); + fclose(f); + if (ret >= 0 && !some_ip_ok(addrs)) { + if (lacks_ipp != 0) + *lacks_ipp = 1; + ret = -1; + } + if (addrs != 0) + free_wordlist(addrs); + + return ret >= 0; +} + +/* + * have_chap_secret - check whether we have a CHAP file with a + * secret that we could possibly use for authenticating `client' + * on `server'. Either can be the null string, meaning we don't + * know the identity yet. + */ +static int +have_chap_secret(client, server, need_ip, lacks_ipp) + char *client; + char *server; + int need_ip; + int *lacks_ipp; +{ + FILE *f; + int ret; + char *filename; + struct wordlist *addrs; + + if (chap_check_hook) { + ret = (*chap_check_hook)(); + if (ret >= 0) { + return ret; + } + } + + filename = _PATH_CHAPFILE; + f = fopen(filename, "r"); + if (f == NULL) + return 0; + + if (client != NULL && client[0] == 0) + client = NULL; + else if (server != NULL && server[0] == 0) + server = NULL; + + ret = scan_authfile(f, client, server, NULL, &addrs, NULL, filename, 0); + fclose(f); + if (ret >= 0 && need_ip && !some_ip_ok(addrs)) { + if (lacks_ipp != 0) + *lacks_ipp = 1; + ret = -1; + } + if (addrs != 0) + free_wordlist(addrs); + + return ret >= 0; +} + +/* + * have_srp_secret - check whether we have a SRP file with a + * secret that we could possibly use for authenticating `client' + * on `server'. Either can be the null string, meaning we don't + * know the identity yet. + */ +static int +have_srp_secret(client, server, need_ip, lacks_ipp) + char *client; + char *server; + int need_ip; + int *lacks_ipp; +{ + FILE *f; + int ret; + char *filename; + struct wordlist *addrs; + + filename = _PATH_SRPFILE; + f = fopen(filename, "r"); + if (f == NULL) + return 0; + + if (client != NULL && client[0] == 0) + client = NULL; + else if (server != NULL && server[0] == 0) + server = NULL; + + ret = scan_authfile(f, client, server, NULL, &addrs, NULL, filename, 0); + fclose(f); + if (ret >= 0 && need_ip && !some_ip_ok(addrs)) { + if (lacks_ipp != 0) + *lacks_ipp = 1; + ret = -1; + } + if (addrs != 0) + free_wordlist(addrs); + + return ret >= 0; +} +#endif /* UNUSED */ + +#if PPP_AUTH_SUPPORT +/* + * get_secret - open the CHAP secret file and return the secret + * for authenticating the given client on the given server. + * (We could be either client or server). + */ +int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secret, int *secret_len, int am_server) { + int len; + LWIP_UNUSED_ARG(server); + LWIP_UNUSED_ARG(am_server); + + if (!client || !client[0] || !pcb->settings.user || !pcb->settings.passwd || strcmp(client, pcb->settings.user)) { + return 0; + } + + len = (int)strlen(pcb->settings.passwd); + if (len > MAXSECRETLEN) { + ppp_error("Secret for %s on %s is too long", client, server); + len = MAXSECRETLEN; + } + + MEMCPY(secret, pcb->settings.passwd, len); + *secret_len = len; + return 1; + +#if 0 /* UNUSED */ + FILE *f; + int ret, len; + char *filename; + struct wordlist *addrs, *opts; + char secbuf[MAXWORDLEN]; + struct wordlist *addrs; + addrs = NULL; + + if (!am_server && ppp_settings.passwd[0] != 0) { + strlcpy(secbuf, ppp_settings.passwd, sizeof(secbuf)); + } else if (!am_server && chap_passwd_hook) { + if ( (*chap_passwd_hook)(client, secbuf) < 0) { + ppp_error("Unable to obtain CHAP password for %s on %s from plugin", + client, server); + return 0; + } + } else { + filename = _PATH_CHAPFILE; + addrs = NULL; + secbuf[0] = 0; + + f = fopen(filename, "r"); + if (f == NULL) { + ppp_error("Can't open chap secret file %s: %m", filename); + return 0; + } + check_access(f, filename); + + ret = scan_authfile(f, client, server, secbuf, &addrs, &opts, filename, 0); + fclose(f); + if (ret < 0) + return 0; + + if (am_server) + set_allowed_addrs(unit, addrs, opts); + else if (opts != 0) + free_wordlist(opts); + if (addrs != 0) + free_wordlist(addrs); + } + + len = strlen(secbuf); + if (len > MAXSECRETLEN) { + ppp_error("Secret for %s on %s is too long", client, server); + len = MAXSECRETLEN; + } + MEMCPY(secret, secbuf, len); + BZERO(secbuf, sizeof(secbuf)); + *secret_len = len; + + return 1; +#endif /* UNUSED */ +} +#endif /* PPP_AUTH_SUPPORT */ + + +#if 0 /* UNUSED */ +/* + * get_srp_secret - open the SRP secret file and return the secret + * for authenticating the given client on the given server. + * (We could be either client or server). + */ +int +get_srp_secret(unit, client, server, secret, am_server) + int unit; + char *client; + char *server; + char *secret; + int am_server; +{ + FILE *fp; + int ret; + char *filename; + struct wordlist *addrs, *opts; + + if (!am_server && ppp_settings.passwd[0] != '\0') { + strlcpy(secret, ppp_settings.passwd, MAXWORDLEN); + } else { + filename = _PATH_SRPFILE; + addrs = NULL; + + fp = fopen(filename, "r"); + if (fp == NULL) { + ppp_error("Can't open srp secret file %s: %m", filename); + return 0; + } + check_access(fp, filename); + + secret[0] = '\0'; + ret = scan_authfile(fp, client, server, secret, &addrs, &opts, + filename, am_server); + fclose(fp); + if (ret < 0) + return 0; + + if (am_server) + set_allowed_addrs(unit, addrs, opts); + else if (opts != NULL) + free_wordlist(opts); + if (addrs != NULL) + free_wordlist(addrs); + } + + return 1; +} + +/* + * set_allowed_addrs() - set the list of allowed addresses. + * Also looks for `--' indicating options to apply for this peer + * and leaves the following words in extra_options. + */ +static void +set_allowed_addrs(unit, addrs, opts) + int unit; + struct wordlist *addrs; + struct wordlist *opts; +{ + int n; + struct wordlist *ap, **plink; + struct permitted_ip *ip; + char *ptr_word, *ptr_mask; + struct hostent *hp; + struct netent *np; + u32_t a, mask, ah, offset; + struct ipcp_options *wo = &ipcp_wantoptions[unit]; + u32_t suggested_ip = 0; + + if (addresses[unit] != NULL) + free(addresses[unit]); + addresses[unit] = NULL; + if (extra_options != NULL) + free_wordlist(extra_options); + extra_options = opts; + + /* + * Count the number of IP addresses given. + */ + n = wordlist_count(addrs) + wordlist_count(noauth_addrs); + if (n == 0) + return; + ip = (struct permitted_ip *) malloc((n + 1) * sizeof(struct permitted_ip)); + if (ip == 0) + return; + + /* temporarily append the noauth_addrs list to addrs */ + for (plink = &addrs; *plink != NULL; plink = &(*plink)->next) + ; + *plink = noauth_addrs; + + n = 0; + for (ap = addrs; ap != NULL; ap = ap->next) { + /* "-" means no addresses authorized, "*" means any address allowed */ + ptr_word = ap->word; + if (strcmp(ptr_word, "-") == 0) + break; + if (strcmp(ptr_word, "*") == 0) { + ip[n].permit = 1; + ip[n].base = ip[n].mask = 0; + ++n; + break; + } + + ip[n].permit = 1; + if (*ptr_word == '!') { + ip[n].permit = 0; + ++ptr_word; + } + + mask = ~ (u32_t) 0; + offset = 0; + ptr_mask = strchr (ptr_word, '/'); + if (ptr_mask != NULL) { + int bit_count; + char *endp; + + bit_count = (int) strtol (ptr_mask+1, &endp, 10); + if (bit_count <= 0 || bit_count > 32) { + ppp_warn("invalid address length %v in auth. address list", + ptr_mask+1); + continue; + } + bit_count = 32 - bit_count; /* # bits in host part */ + if (*endp == '+') { + offset = ifunit + 1; + ++endp; + } + if (*endp != 0) { + ppp_warn("invalid address length syntax: %v", ptr_mask+1); + continue; + } + *ptr_mask = '\0'; + mask <<= bit_count; + } + + hp = gethostbyname(ptr_word); + if (hp != NULL && hp->h_addrtype == AF_INET) { + a = *(u32_t *)hp->h_addr; + } else { + np = getnetbyname (ptr_word); + if (np != NULL && np->n_addrtype == AF_INET) { + a = lwip_htonl ((u32_t)np->n_net); + if (ptr_mask == NULL) { + /* calculate appropriate mask for net */ + ah = lwip_ntohl(a); + if (IN_CLASSA(ah)) + mask = IN_CLASSA_NET; + else if (IN_CLASSB(ah)) + mask = IN_CLASSB_NET; + else if (IN_CLASSC(ah)) + mask = IN_CLASSC_NET; + } + } else { + a = inet_addr (ptr_word); + } + } + + if (ptr_mask != NULL) + *ptr_mask = '/'; + + if (a == (u32_t)-1L) { + ppp_warn("unknown host %s in auth. address list", ap->word); + continue; + } + if (offset != 0) { + if (offset >= ~mask) { + ppp_warn("interface unit %d too large for subnet %v", + ifunit, ptr_word); + continue; + } + a = lwip_htonl((lwip_ntohl(a) & mask) + offset); + mask = ~(u32_t)0; + } + ip[n].mask = lwip_htonl(mask); + ip[n].base = a & ip[n].mask; + ++n; + if (~mask == 0 && suggested_ip == 0) + suggested_ip = a; + } + *plink = NULL; + + ip[n].permit = 0; /* make the last entry forbid all addresses */ + ip[n].base = 0; /* to terminate the list */ + ip[n].mask = 0; + + addresses[unit] = ip; + + /* + * If the address given for the peer isn't authorized, or if + * the user hasn't given one, AND there is an authorized address + * which is a single host, then use that if we find one. + */ + if (suggested_ip != 0 + && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr))) { + wo->hisaddr = suggested_ip; + /* + * Do we insist on this address? No, if there are other + * addresses authorized than the suggested one. + */ + if (n > 1) + wo->accept_remote = 1; + } +} + +/* + * auth_ip_addr - check whether the peer is authorized to use + * a given IP address. Returns 1 if authorized, 0 otherwise. + */ +int +auth_ip_addr(unit, addr) + int unit; + u32_t addr; +{ + int ok; + + /* don't allow loopback or multicast address */ + if (bad_ip_adrs(addr)) + return 0; + + if (allowed_address_hook) { + ok = allowed_address_hook(addr); + if (ok >= 0) return ok; + } + + if (addresses[unit] != NULL) { + ok = ip_addr_check(addr, addresses[unit]); + if (ok >= 0) + return ok; + } + + if (auth_required) + return 0; /* no addresses authorized */ + return allow_any_ip || privileged || !have_route_to(addr); +} + +static int +ip_addr_check(addr, addrs) + u32_t addr; + struct permitted_ip *addrs; +{ + for (; ; ++addrs) + if ((addr & addrs->mask) == addrs->base) + return addrs->permit; +} + +/* + * bad_ip_adrs - return 1 if the IP address is one we don't want + * to use, such as an address in the loopback net or a multicast address. + * addr is in network byte order. + */ +int +bad_ip_adrs(addr) + u32_t addr; +{ + addr = lwip_ntohl(addr); + return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET + || IN_MULTICAST(addr) || IN_BADCLASS(addr); +} + +/* + * some_ip_ok - check a wordlist to see if it authorizes any + * IP address(es). + */ +static int +some_ip_ok(addrs) + struct wordlist *addrs; +{ + for (; addrs != 0; addrs = addrs->next) { + if (addrs->word[0] == '-') + break; + if (addrs->word[0] != '!') + return 1; /* some IP address is allowed */ + } + return 0; +} + +/* + * auth_number - check whether the remote number is allowed to connect. + * Returns 1 if authorized, 0 otherwise. + */ +int +auth_number() +{ + struct wordlist *wp = permitted_numbers; + int l; + + /* Allow all if no authorization list. */ + if (!wp) + return 1; + + /* Allow if we have a match in the authorization list. */ + while (wp) { + /* trailing '*' wildcard */ + l = strlen(wp->word); + if ((wp->word)[l - 1] == '*') + l--; + if (!strncasecmp(wp->word, remote_number, l)) + return 1; + wp = wp->next; + } + + return 0; +} + +/* + * check_access - complain if a secret file has too-liberal permissions. + */ +static void +check_access(f, filename) + FILE *f; + char *filename; +{ + struct stat sbuf; + + if (fstat(fileno(f), &sbuf) < 0) { + ppp_warn("cannot stat secret file %s: %m", filename); + } else if ((sbuf.st_mode & (S_IRWXG | S_IRWXO)) != 0) { + ppp_warn("Warning - secret file %s has world and/or group access", + filename); + } +} + +/* + * scan_authfile - Scan an authorization file for a secret suitable + * for authenticating `client' on `server'. The return value is -1 + * if no secret is found, otherwise >= 0. The return value has + * NONWILD_CLIENT set if the secret didn't have "*" for the client, and + * NONWILD_SERVER set if the secret didn't have "*" for the server. + * Any following words on the line up to a "--" (i.e. address authorization + * info) are placed in a wordlist and returned in *addrs. Any + * following words (extra options) are placed in a wordlist and + * returned in *opts. + * We assume secret is NULL or points to MAXWORDLEN bytes of space. + * Flags are non-zero if we need two colons in the secret in order to + * match. + */ +static int +scan_authfile(f, client, server, secret, addrs, opts, filename, flags) + FILE *f; + char *client; + char *server; + char *secret; + struct wordlist **addrs; + struct wordlist **opts; + char *filename; + int flags; +{ + int newline, xxx; + int got_flag, best_flag; + FILE *sf; + struct wordlist *ap, *addr_list, *alist, **app; + char word[MAXWORDLEN]; + char atfile[MAXWORDLEN]; + char lsecret[MAXWORDLEN]; + char *cp; + + if (addrs != NULL) + *addrs = NULL; + if (opts != NULL) + *opts = NULL; + addr_list = NULL; + if (!getword(f, word, &newline, filename)) + return -1; /* file is empty??? */ + newline = 1; + best_flag = -1; + for (;;) { + /* + * Skip until we find a word at the start of a line. + */ + while (!newline && getword(f, word, &newline, filename)) + ; + if (!newline) + break; /* got to end of file */ + + /* + * Got a client - check if it's a match or a wildcard. + */ + got_flag = 0; + if (client != NULL && strcmp(word, client) != 0 && !ISWILD(word)) { + newline = 0; + continue; + } + if (!ISWILD(word)) + got_flag = NONWILD_CLIENT; + + /* + * Now get a server and check if it matches. + */ + if (!getword(f, word, &newline, filename)) + break; + if (newline) + continue; + if (!ISWILD(word)) { + if (server != NULL && strcmp(word, server) != 0) + continue; + got_flag |= NONWILD_SERVER; + } + + /* + * Got some sort of a match - see if it's better than what + * we have already. + */ + if (got_flag <= best_flag) + continue; + + /* + * Get the secret. + */ + if (!getword(f, word, &newline, filename)) + break; + if (newline) + continue; + + /* + * SRP-SHA1 authenticator should never be reading secrets from + * a file. (Authenticatee may, though.) + */ + if (flags && ((cp = strchr(word, ':')) == NULL || + strchr(cp + 1, ':') == NULL)) + continue; + + if (secret != NULL) { + /* + * Special syntax: @/pathname means read secret from file. + */ + if (word[0] == '@' && word[1] == '/') { + strlcpy(atfile, word+1, sizeof(atfile)); + if ((sf = fopen(atfile, "r")) == NULL) { + ppp_warn("can't open indirect secret file %s", atfile); + continue; + } + check_access(sf, atfile); + if (!getword(sf, word, &xxx, atfile)) { + ppp_warn("no secret in indirect secret file %s", atfile); + fclose(sf); + continue; + } + fclose(sf); + } + strlcpy(lsecret, word, sizeof(lsecret)); + } + + /* + * Now read address authorization info and make a wordlist. + */ + app = &alist; + for (;;) { + if (!getword(f, word, &newline, filename) || newline) + break; + ap = (struct wordlist *) + malloc(sizeof(struct wordlist) + strlen(word) + 1); + if (ap == NULL) + novm("authorized addresses"); + ap->word = (char *) (ap + 1); + strcpy(ap->word, word); + *app = ap; + app = &ap->next; + } + *app = NULL; + + /* + * This is the best so far; remember it. + */ + best_flag = got_flag; + if (addr_list) + free_wordlist(addr_list); + addr_list = alist; + if (secret != NULL) + strlcpy(secret, lsecret, MAXWORDLEN); + + if (!newline) + break; + } + + /* scan for a -- word indicating the start of options */ + for (app = &addr_list; (ap = *app) != NULL; app = &ap->next) + if (strcmp(ap->word, "--") == 0) + break; + /* ap = start of options */ + if (ap != NULL) { + ap = ap->next; /* first option */ + free(*app); /* free the "--" word */ + *app = NULL; /* terminate addr list */ + } + if (opts != NULL) + *opts = ap; + else if (ap != NULL) + free_wordlist(ap); + if (addrs != NULL) + *addrs = addr_list; + else if (addr_list != NULL) + free_wordlist(addr_list); + + return best_flag; +} + +/* + * wordlist_count - return the number of items in a wordlist + */ +static int +wordlist_count(wp) + struct wordlist *wp; +{ + int n; + + for (n = 0; wp != NULL; wp = wp->next) + ++n; + return n; +} + +/* + * free_wordlist - release memory allocated for a wordlist. + */ +static void +free_wordlist(wp) + struct wordlist *wp; +{ + struct wordlist *next; + + while (wp != NULL) { + next = wp->next; + free(wp); + wp = next; + } +} +#endif /* UNUSED */ + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.c index f8519eb..b354a3f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.c @@ -1,1740 +1,1740 @@ -/* - * ccp.c - PPP Compression Control Protocol. - * - * Copyright (c) 1994-2002 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include -#include - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/ccp.h" - -#if MPPE_SUPPORT -#include "netif/ppp/lcp.h" /* lcp_close(), lcp_fsm */ -#include "netif/ppp/mppe.h" /* mppe_init() */ -#endif /* MPPE_SUPPORT */ - -/* - * Unfortunately there is a bug in zlib which means that using a - * size of 8 (window size = 256) for Deflate compression will cause - * buffer overruns and kernel crashes in the deflate module. - * Until this is fixed we only accept sizes in the range 9 .. 15. - * Thanks to James Carlson for pointing this out. - */ -#define DEFLATE_MIN_WORKS 9 - -/* - * Command-line options. - */ -#if PPP_OPTIONS -static int setbsdcomp (char **); -static int setdeflate (char **); -static char bsd_value[8]; -static char deflate_value[8]; - -/* - * Option variables. - */ -#if MPPE_SUPPORT -bool refuse_mppe_stateful = 1; /* Allow stateful mode? */ -#endif /* MPPE_SUPPORT */ - -static option_t ccp_option_list[] = { - { "noccp", o_bool, &ccp_protent.enabled_flag, - "Disable CCP negotiation" }, - { "-ccp", o_bool, &ccp_protent.enabled_flag, - "Disable CCP negotiation", OPT_ALIAS }, - - { "bsdcomp", o_special, (void *)setbsdcomp, - "Request BSD-Compress packet compression", - OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, bsd_value }, - { "nobsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress, - "don't allow BSD-Compress", OPT_PRIOSUB | OPT_A2CLR, - &ccp_allowoptions[0].bsd_compress }, - { "-bsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress, - "don't allow BSD-Compress", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, - &ccp_allowoptions[0].bsd_compress }, - - { "deflate", o_special, (void *)setdeflate, - "request Deflate compression", - OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, deflate_value }, - { "nodeflate", o_bool, &ccp_wantoptions[0].deflate, - "don't allow Deflate compression", OPT_PRIOSUB | OPT_A2CLR, - &ccp_allowoptions[0].deflate }, - { "-deflate", o_bool, &ccp_wantoptions[0].deflate, - "don't allow Deflate compression", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, - &ccp_allowoptions[0].deflate }, - - { "nodeflatedraft", o_bool, &ccp_wantoptions[0].deflate_draft, - "don't use draft deflate #", OPT_A2COPY, - &ccp_allowoptions[0].deflate_draft }, - - { "predictor1", o_bool, &ccp_wantoptions[0].predictor_1, - "request Predictor-1", OPT_PRIO | 1 }, - { "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1, - "don't allow Predictor-1", OPT_PRIOSUB | OPT_A2CLR, - &ccp_allowoptions[0].predictor_1 }, - { "-predictor1", o_bool, &ccp_wantoptions[0].predictor_1, - "don't allow Predictor-1", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, - &ccp_allowoptions[0].predictor_1 }, - -#if MPPE_SUPPORT - /* MPPE options are symmetrical ... we only set wantoptions here */ - { "require-mppe", o_bool, &ccp_wantoptions[0].mppe, - "require MPPE encryption", - OPT_PRIO | MPPE_OPT_40 | MPPE_OPT_128 }, - { "+mppe", o_bool, &ccp_wantoptions[0].mppe, - "require MPPE encryption", - OPT_ALIAS | OPT_PRIO | MPPE_OPT_40 | MPPE_OPT_128 }, - { "nomppe", o_bool, &ccp_wantoptions[0].mppe, - "don't allow MPPE encryption", OPT_PRIO }, - { "-mppe", o_bool, &ccp_wantoptions[0].mppe, - "don't allow MPPE encryption", OPT_ALIAS | OPT_PRIO }, - - /* We use ccp_allowoptions[0].mppe as a junk var ... it is reset later */ - { "require-mppe-40", o_bool, &ccp_allowoptions[0].mppe, - "require MPPE 40-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_40, - &ccp_wantoptions[0].mppe }, - { "+mppe-40", o_bool, &ccp_allowoptions[0].mppe, - "require MPPE 40-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_40, - &ccp_wantoptions[0].mppe }, - { "nomppe-40", o_bool, &ccp_allowoptions[0].mppe, - "don't allow MPPE 40-bit encryption", - OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_40, &ccp_wantoptions[0].mppe }, - { "-mppe-40", o_bool, &ccp_allowoptions[0].mppe, - "don't allow MPPE 40-bit encryption", - OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_40, - &ccp_wantoptions[0].mppe }, - - { "require-mppe-128", o_bool, &ccp_allowoptions[0].mppe, - "require MPPE 128-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_128, - &ccp_wantoptions[0].mppe }, - { "+mppe-128", o_bool, &ccp_allowoptions[0].mppe, - "require MPPE 128-bit encryption", - OPT_ALIAS | OPT_PRIO | OPT_A2OR | MPPE_OPT_128, - &ccp_wantoptions[0].mppe }, - { "nomppe-128", o_bool, &ccp_allowoptions[0].mppe, - "don't allow MPPE 128-bit encryption", - OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_128, &ccp_wantoptions[0].mppe }, - { "-mppe-128", o_bool, &ccp_allowoptions[0].mppe, - "don't allow MPPE 128-bit encryption", - OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_128, - &ccp_wantoptions[0].mppe }, - - /* strange one; we always request stateless, but will we allow stateful? */ - { "mppe-stateful", o_bool, &refuse_mppe_stateful, - "allow MPPE stateful mode", OPT_PRIO }, - { "nomppe-stateful", o_bool, &refuse_mppe_stateful, - "disallow MPPE stateful mode", OPT_PRIO | 1 }, -#endif /* MPPE_SUPPORT */ - - { NULL } -}; -#endif /* PPP_OPTIONS */ - -/* - * Protocol entry points from main code. - */ -static void ccp_init(ppp_pcb *pcb); -static void ccp_open(ppp_pcb *pcb); -static void ccp_close(ppp_pcb *pcb, const char *reason); -static void ccp_lowerup(ppp_pcb *pcb); -static void ccp_lowerdown(ppp_pcb *pcb); -static void ccp_input(ppp_pcb *pcb, u_char *pkt, int len); -static void ccp_protrej(ppp_pcb *pcb); -#if PRINTPKT_SUPPORT -static int ccp_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg); -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT -static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len); -#endif /* PPP_DATAINPUT */ - -const struct protent ccp_protent = { - PPP_CCP, - ccp_init, - ccp_input, - ccp_protrej, - ccp_lowerup, - ccp_lowerdown, - ccp_open, - ccp_close, -#if PRINTPKT_SUPPORT - ccp_printpkt, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - ccp_datainput, -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "CCP", - "Compressed", -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - ccp_option_list, - NULL, -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - NULL, - NULL -#endif /* DEMAND_SUPPORT */ -}; - -/* - * Callbacks for fsm code. - */ -static void ccp_resetci (fsm *); -static int ccp_cilen (fsm *); -static void ccp_addci (fsm *, u_char *, int *); -static int ccp_ackci (fsm *, u_char *, int); -static int ccp_nakci (fsm *, u_char *, int, int); -static int ccp_rejci (fsm *, u_char *, int); -static int ccp_reqci (fsm *, u_char *, int *, int); -static void ccp_up (fsm *); -static void ccp_down (fsm *); -static int ccp_extcode (fsm *, int, int, u_char *, int); -static void ccp_rack_timeout (void *); -static const char *method_name (ccp_options *, ccp_options *); - -static const fsm_callbacks ccp_callbacks = { - ccp_resetci, - ccp_cilen, - ccp_addci, - ccp_ackci, - ccp_nakci, - ccp_rejci, - ccp_reqci, - ccp_up, - ccp_down, - NULL, - NULL, - NULL, - NULL, - ccp_extcode, - "CCP" -}; - -/* - * Do we want / did we get any compression? - */ -static int ccp_anycompress(ccp_options *opt) { - return (0 -#if DEFLATE_SUPPORT - || (opt)->deflate -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - || (opt)->bsd_compress -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - || (opt)->predictor_1 || (opt)->predictor_2 -#endif /* PREDICTOR_SUPPORT */ -#if MPPE_SUPPORT - || (opt)->mppe -#endif /* MPPE_SUPPORT */ - ); -} - -/* - * Local state (mainly for handling reset-reqs and reset-acks). - */ -#define RACK_PENDING 1 /* waiting for reset-ack */ -#define RREQ_REPEAT 2 /* send another reset-req if no reset-ack */ - -#define RACKTIMEOUT 1 /* second */ - -#if PPP_OPTIONS -/* - * Option parsing - */ -static int -setbsdcomp(argv) - char **argv; -{ - int rbits, abits; - char *str, *endp; - - str = *argv; - abits = rbits = strtol(str, &endp, 0); - if (endp != str && *endp == ',') { - str = endp + 1; - abits = strtol(str, &endp, 0); - } - if (*endp != 0 || endp == str) { - option_error("invalid parameter '%s' for bsdcomp option", *argv); - return 0; - } - if ((rbits != 0 && (rbits < BSD_MIN_BITS || rbits > BSD_MAX_BITS)) - || (abits != 0 && (abits < BSD_MIN_BITS || abits > BSD_MAX_BITS))) { - option_error("bsdcomp option values must be 0 or %d .. %d", - BSD_MIN_BITS, BSD_MAX_BITS); - return 0; - } - if (rbits > 0) { - ccp_wantoptions[0].bsd_compress = 1; - ccp_wantoptions[0].bsd_bits = rbits; - } else - ccp_wantoptions[0].bsd_compress = 0; - if (abits > 0) { - ccp_allowoptions[0].bsd_compress = 1; - ccp_allowoptions[0].bsd_bits = abits; - } else - ccp_allowoptions[0].bsd_compress = 0; - ppp_slprintf(bsd_value, sizeof(bsd_value), - rbits == abits? "%d": "%d,%d", rbits, abits); - - return 1; -} - -static int -setdeflate(argv) - char **argv; -{ - int rbits, abits; - char *str, *endp; - - str = *argv; - abits = rbits = strtol(str, &endp, 0); - if (endp != str && *endp == ',') { - str = endp + 1; - abits = strtol(str, &endp, 0); - } - if (*endp != 0 || endp == str) { - option_error("invalid parameter '%s' for deflate option", *argv); - return 0; - } - if ((rbits != 0 && (rbits < DEFLATE_MIN_SIZE || rbits > DEFLATE_MAX_SIZE)) - || (abits != 0 && (abits < DEFLATE_MIN_SIZE - || abits > DEFLATE_MAX_SIZE))) { - option_error("deflate option values must be 0 or %d .. %d", - DEFLATE_MIN_SIZE, DEFLATE_MAX_SIZE); - return 0; - } - if (rbits == DEFLATE_MIN_SIZE || abits == DEFLATE_MIN_SIZE) { - if (rbits == DEFLATE_MIN_SIZE) - rbits = DEFLATE_MIN_WORKS; - if (abits == DEFLATE_MIN_SIZE) - abits = DEFLATE_MIN_WORKS; - warn("deflate option value of %d changed to %d to avoid zlib bug", - DEFLATE_MIN_SIZE, DEFLATE_MIN_WORKS); - } - if (rbits > 0) { - ccp_wantoptions[0].deflate = 1; - ccp_wantoptions[0].deflate_size = rbits; - } else - ccp_wantoptions[0].deflate = 0; - if (abits > 0) { - ccp_allowoptions[0].deflate = 1; - ccp_allowoptions[0].deflate_size = abits; - } else - ccp_allowoptions[0].deflate = 0; - ppp_slprintf(deflate_value, sizeof(deflate_value), - rbits == abits? "%d": "%d,%d", rbits, abits); - - return 1; -} -#endif /* PPP_OPTIONS */ - -/* - * ccp_init - initialize CCP. - */ -static void ccp_init(ppp_pcb *pcb) { - fsm *f = &pcb->ccp_fsm; - - f->pcb = pcb; - f->protocol = PPP_CCP; - f->callbacks = &ccp_callbacks; - fsm_init(f); - -#if 0 /* Not necessary, everything is cleared in ppp_new() */ - memset(wo, 0, sizeof(*wo)); - memset(go, 0, sizeof(*go)); - memset(ao, 0, sizeof(*ao)); - memset(ho, 0, sizeof(*ho)); -#endif /* 0 */ - -#if DEFLATE_SUPPORT - wo->deflate = 1; - wo->deflate_size = DEFLATE_MAX_SIZE; - wo->deflate_correct = 1; - wo->deflate_draft = 1; - ao->deflate = 1; - ao->deflate_size = DEFLATE_MAX_SIZE; - ao->deflate_correct = 1; - ao->deflate_draft = 1; -#endif /* DEFLATE_SUPPORT */ - -#if BSDCOMPRESS_SUPPORT - wo->bsd_compress = 1; - wo->bsd_bits = BSD_MAX_BITS; - ao->bsd_compress = 1; - ao->bsd_bits = BSD_MAX_BITS; -#endif /* BSDCOMPRESS_SUPPORT */ - -#if PREDICTOR_SUPPORT - ao->predictor_1 = 1; -#endif /* PREDICTOR_SUPPORT */ -} - -/* - * ccp_open - CCP is allowed to come up. - */ -static void ccp_open(ppp_pcb *pcb) { - fsm *f = &pcb->ccp_fsm; - ccp_options *go = &pcb->ccp_gotoptions; - - if (f->state != PPP_FSM_OPENED) - ccp_set(pcb, 1, 0, 0, 0); - - /* - * Find out which compressors the kernel supports before - * deciding whether to open in silent mode. - */ - ccp_resetci(f); - if (!ccp_anycompress(go)) - f->flags |= OPT_SILENT; - - fsm_open(f); -} - -/* - * ccp_close - Terminate CCP. - */ -static void ccp_close(ppp_pcb *pcb, const char *reason) { - fsm *f = &pcb->ccp_fsm; - ccp_set(pcb, 0, 0, 0, 0); - fsm_close(f, reason); -} - -/* - * ccp_lowerup - we may now transmit CCP packets. - */ -static void ccp_lowerup(ppp_pcb *pcb) { - fsm *f = &pcb->ccp_fsm; - fsm_lowerup(f); -} - -/* - * ccp_lowerdown - we may not transmit CCP packets. - */ -static void ccp_lowerdown(ppp_pcb *pcb) { - fsm *f = &pcb->ccp_fsm; - fsm_lowerdown(f); -} - -/* - * ccp_input - process a received CCP packet. - */ -static void ccp_input(ppp_pcb *pcb, u_char *p, int len) { - fsm *f = &pcb->ccp_fsm; - ccp_options *go = &pcb->ccp_gotoptions; - int oldstate; - - /* - * Check for a terminate-request so we can print a message. - */ - oldstate = f->state; - fsm_input(f, p, len); - if (oldstate == PPP_FSM_OPENED && p[0] == TERMREQ && f->state != PPP_FSM_OPENED) { - ppp_notice("Compression disabled by peer."); -#if MPPE_SUPPORT - if (go->mppe) { - ppp_error("MPPE disabled, closing LCP"); - lcp_close(pcb, "MPPE disabled by peer"); - } -#endif /* MPPE_SUPPORT */ - } - - /* - * If we get a terminate-ack and we're not asking for compression, - * close CCP. - */ - if (oldstate == PPP_FSM_REQSENT && p[0] == TERMACK - && !ccp_anycompress(go)) - ccp_close(pcb, "No compression negotiated"); -} - -/* - * Handle a CCP-specific code. - */ -static int ccp_extcode(fsm *f, int code, int id, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(len); - - switch (code) { - case CCP_RESETREQ: - if (f->state != PPP_FSM_OPENED) - break; - ccp_reset_comp(pcb); - /* send a reset-ack, which the transmitter will see and - reset its compression state. */ - fsm_sdata(f, CCP_RESETACK, id, NULL, 0); - break; - - case CCP_RESETACK: - if ((pcb->ccp_localstate & RACK_PENDING) && id == f->reqid) { - pcb->ccp_localstate &= ~(RACK_PENDING | RREQ_REPEAT); - UNTIMEOUT(ccp_rack_timeout, f); - ccp_reset_decomp(pcb); - } - break; - - default: - return 0; - } - - return 1; -} - -/* - * ccp_protrej - peer doesn't talk CCP. - */ -static void ccp_protrej(ppp_pcb *pcb) { - fsm *f = &pcb->ccp_fsm; -#if MPPE_SUPPORT - ccp_options *go = &pcb->ccp_gotoptions; -#endif /* MPPE_SUPPORT */ - - ccp_set(pcb, 0, 0, 0, 0); - fsm_lowerdown(f); - -#if MPPE_SUPPORT - if (go->mppe) { - ppp_error("MPPE required but peer negotiation failed"); - lcp_close(pcb, "MPPE required but peer negotiation failed"); - } -#endif /* MPPE_SUPPORT */ - -} - -/* - * ccp_resetci - initialize at start of negotiation. - */ -static void ccp_resetci(fsm *f) { - ppp_pcb *pcb = f->pcb; - ccp_options *go = &pcb->ccp_gotoptions; - ccp_options *wo = &pcb->ccp_wantoptions; -#if MPPE_SUPPORT - ccp_options *ao = &pcb->ccp_allowoptions; -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT - u_char opt_buf[CCP_MAX_OPTION_LENGTH]; -#endif /* DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT */ -#if DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT - int res; -#endif /* DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT */ - -#if MPPE_SUPPORT - if (pcb->settings.require_mppe) { - wo->mppe = ao->mppe = - (pcb->settings.refuse_mppe_40 ? 0 : MPPE_OPT_40) - | (pcb->settings.refuse_mppe_128 ? 0 : MPPE_OPT_128); - } -#endif /* MPPE_SUPPORT */ - - *go = *wo; - pcb->ccp_all_rejected = 0; - -#if MPPE_SUPPORT - if (go->mppe) { - int auth_mschap_bits = pcb->auth_done; - int numbits; - - /* - * Start with a basic sanity check: mschap[v2] auth must be in - * exactly one direction. RFC 3079 says that the keys are - * 'derived from the credentials of the peer that initiated the call', - * however the PPP protocol doesn't have such a concept, and pppd - * cannot get this info externally. Instead we do the best we can. - * NB: If MPPE is required, all other compression opts are invalid. - * So, we return right away if we can't do it. - */ - - /* Leave only the mschap auth bits set */ - auth_mschap_bits &= (CHAP_MS_WITHPEER | CHAP_MS_PEER | - CHAP_MS2_WITHPEER | CHAP_MS2_PEER); - /* Count the mschap auths */ - auth_mschap_bits >>= CHAP_MS_SHIFT; - numbits = 0; - do { - numbits += auth_mschap_bits & 1; - auth_mschap_bits >>= 1; - } while (auth_mschap_bits); - if (numbits > 1) { - ppp_error("MPPE required, but auth done in both directions."); - lcp_close(pcb, "MPPE required but not available"); - return; - } - if (!numbits) { - ppp_error("MPPE required, but MS-CHAP[v2] auth not performed."); - lcp_close(pcb, "MPPE required but not available"); - return; - } - - /* A plugin (eg radius) may not have obtained key material. */ - if (!pcb->mppe_keys_set) { - ppp_error("MPPE required, but keys are not available. " - "Possible plugin problem?"); - lcp_close(pcb, "MPPE required but not available"); - return; - } - - /* LM auth not supported for MPPE */ - if (pcb->auth_done & (CHAP_MS_WITHPEER | CHAP_MS_PEER)) { - /* This might be noise */ - if (go->mppe & MPPE_OPT_40) { - ppp_notice("Disabling 40-bit MPPE; MS-CHAP LM not supported"); - go->mppe &= ~MPPE_OPT_40; - wo->mppe &= ~MPPE_OPT_40; - } - } - - /* Last check: can we actually negotiate something? */ - if (!(go->mppe & (MPPE_OPT_40 | MPPE_OPT_128))) { - /* Could be misconfig, could be 40-bit disabled above. */ - ppp_error("MPPE required, but both 40-bit and 128-bit disabled."); - lcp_close(pcb, "MPPE required but not available"); - return; - } - - /* sync options */ - ao->mppe = go->mppe; - /* MPPE is not compatible with other compression types */ -#if BSDCOMPRESS_SUPPORT - ao->bsd_compress = go->bsd_compress = 0; -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - ao->predictor_1 = go->predictor_1 = 0; - ao->predictor_2 = go->predictor_2 = 0; -#endif /* PREDICTOR_SUPPORT */ -#if DEFLATE_SUPPORT - ao->deflate = go->deflate = 0; -#endif /* DEFLATE_SUPPORT */ - } -#endif /* MPPE_SUPPORT */ - - /* - * Check whether the kernel knows about the various - * compression methods we might request. - */ -#if BSDCOMPRESS_SUPPORT - /* FIXME: we don't need to test if BSD compress is available - * if BSDCOMPRESS_SUPPORT is set, it is. - */ - if (go->bsd_compress) { - opt_buf[0] = CI_BSD_COMPRESS; - opt_buf[1] = CILEN_BSD_COMPRESS; - for (;;) { - if (go->bsd_bits < BSD_MIN_BITS) { - go->bsd_compress = 0; - break; - } - opt_buf[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); - res = ccp_test(pcb, opt_buf, CILEN_BSD_COMPRESS, 0); - if (res > 0) { - break; - } else if (res < 0) { - go->bsd_compress = 0; - break; - } - go->bsd_bits--; - } - } -#endif /* BSDCOMPRESS_SUPPORT */ -#if DEFLATE_SUPPORT - /* FIXME: we don't need to test if deflate is available - * if DEFLATE_SUPPORT is set, it is. - */ - if (go->deflate) { - if (go->deflate_correct) { - opt_buf[0] = CI_DEFLATE; - opt_buf[1] = CILEN_DEFLATE; - opt_buf[3] = DEFLATE_CHK_SEQUENCE; - for (;;) { - if (go->deflate_size < DEFLATE_MIN_WORKS) { - go->deflate_correct = 0; - break; - } - opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); - res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); - if (res > 0) { - break; - } else if (res < 0) { - go->deflate_correct = 0; - break; - } - go->deflate_size--; - } - } - if (go->deflate_draft) { - opt_buf[0] = CI_DEFLATE_DRAFT; - opt_buf[1] = CILEN_DEFLATE; - opt_buf[3] = DEFLATE_CHK_SEQUENCE; - for (;;) { - if (go->deflate_size < DEFLATE_MIN_WORKS) { - go->deflate_draft = 0; - break; - } - opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); - res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); - if (res > 0) { - break; - } else if (res < 0) { - go->deflate_draft = 0; - break; - } - go->deflate_size--; - } - } - if (!go->deflate_correct && !go->deflate_draft) - go->deflate = 0; - } -#endif /* DEFLATE_SUPPORT */ -#if PREDICTOR_SUPPORT - /* FIXME: we don't need to test if predictor is available, - * if PREDICTOR_SUPPORT is set, it is. - */ - if (go->predictor_1) { - opt_buf[0] = CI_PREDICTOR_1; - opt_buf[1] = CILEN_PREDICTOR_1; - if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_1, 0) <= 0) - go->predictor_1 = 0; - } - if (go->predictor_2) { - opt_buf[0] = CI_PREDICTOR_2; - opt_buf[1] = CILEN_PREDICTOR_2; - if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_2, 0) <= 0) - go->predictor_2 = 0; - } -#endif /* PREDICTOR_SUPPORT */ -} - -/* - * ccp_cilen - Return total length of our configuration info. - */ -static int ccp_cilen(fsm *f) { - ppp_pcb *pcb = f->pcb; - ccp_options *go = &pcb->ccp_gotoptions; - - return 0 -#if BSDCOMPRESS_SUPPORT - + (go->bsd_compress? CILEN_BSD_COMPRESS: 0) -#endif /* BSDCOMPRESS_SUPPORT */ -#if DEFLATE_SUPPORT - + (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0) - + (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0) -#endif /* DEFLATE_SUPPORT */ -#if PREDICTOR_SUPPORT - + (go->predictor_1? CILEN_PREDICTOR_1: 0) - + (go->predictor_2? CILEN_PREDICTOR_2: 0) -#endif /* PREDICTOR_SUPPORT */ -#if MPPE_SUPPORT - + (go->mppe? CILEN_MPPE: 0) -#endif /* MPPE_SUPPORT */ - ; -} - -/* - * ccp_addci - put our requests in a packet. - */ -static void ccp_addci(fsm *f, u_char *p, int *lenp) { - ppp_pcb *pcb = f->pcb; - ccp_options *go = &pcb->ccp_gotoptions; - u_char *p0 = p; - - /* - * Add the compression types that we can receive, in decreasing - * preference order. - */ -#if MPPE_SUPPORT - if (go->mppe) { - p[0] = CI_MPPE; - p[1] = CILEN_MPPE; - MPPE_OPTS_TO_CI(go->mppe, &p[2]); - mppe_init(pcb, &pcb->mppe_decomp, go->mppe); - p += CILEN_MPPE; - } -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT - if (go->deflate) { - if (go->deflate_correct) { - p[0] = CI_DEFLATE; - p[1] = CILEN_DEFLATE; - p[2] = DEFLATE_MAKE_OPT(go->deflate_size); - p[3] = DEFLATE_CHK_SEQUENCE; - p += CILEN_DEFLATE; - } - if (go->deflate_draft) { - p[0] = CI_DEFLATE_DRAFT; - p[1] = CILEN_DEFLATE; - p[2] = p[2 - CILEN_DEFLATE]; - p[3] = DEFLATE_CHK_SEQUENCE; - p += CILEN_DEFLATE; - } - } -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - if (go->bsd_compress) { - p[0] = CI_BSD_COMPRESS; - p[1] = CILEN_BSD_COMPRESS; - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); - p += CILEN_BSD_COMPRESS; - } -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - /* XXX Should Predictor 2 be preferable to Predictor 1? */ - if (go->predictor_1) { - p[0] = CI_PREDICTOR_1; - p[1] = CILEN_PREDICTOR_1; - p += CILEN_PREDICTOR_1; - } - if (go->predictor_2) { - p[0] = CI_PREDICTOR_2; - p[1] = CILEN_PREDICTOR_2; - p += CILEN_PREDICTOR_2; - } -#endif /* PREDICTOR_SUPPORT */ - - go->method = (p > p0)? p0[0]: 0; - - *lenp = p - p0; -} - -/* - * ccp_ackci - process a received configure-ack, and return - * 1 iff the packet was OK. - */ -static int ccp_ackci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - ccp_options *go = &pcb->ccp_gotoptions; -#if BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT - u_char *p0 = p; -#endif /* BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT */ - -#if MPPE_SUPPORT - if (go->mppe) { - u_char opt_buf[CILEN_MPPE]; - - opt_buf[0] = CI_MPPE; - opt_buf[1] = CILEN_MPPE; - MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]); - if (len < CILEN_MPPE || memcmp(opt_buf, p, CILEN_MPPE)) - return 0; - p += CILEN_MPPE; - len -= CILEN_MPPE; - /* XXX Cope with first/fast ack */ - if (len == 0) - return 1; - } -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT - if (go->deflate) { - if (len < CILEN_DEFLATE - || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) - || p[1] != CILEN_DEFLATE - || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - /* XXX Cope with first/fast ack */ - if (len == 0) - return 1; - if (go->deflate_correct && go->deflate_draft) { - if (len < CILEN_DEFLATE - || p[0] != CI_DEFLATE_DRAFT - || p[1] != CILEN_DEFLATE - || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - } - } -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - if (go->bsd_compress) { - if (len < CILEN_BSD_COMPRESS - || p[0] != CI_BSD_COMPRESS || p[1] != CILEN_BSD_COMPRESS - || p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) - return 0; - p += CILEN_BSD_COMPRESS; - len -= CILEN_BSD_COMPRESS; - /* XXX Cope with first/fast ack */ - if (p == p0 && len == 0) - return 1; - } -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - if (go->predictor_1) { - if (len < CILEN_PREDICTOR_1 - || p[0] != CI_PREDICTOR_1 || p[1] != CILEN_PREDICTOR_1) - return 0; - p += CILEN_PREDICTOR_1; - len -= CILEN_PREDICTOR_1; - /* XXX Cope with first/fast ack */ - if (p == p0 && len == 0) - return 1; - } - if (go->predictor_2) { - if (len < CILEN_PREDICTOR_2 - || p[0] != CI_PREDICTOR_2 || p[1] != CILEN_PREDICTOR_2) - return 0; - p += CILEN_PREDICTOR_2; - len -= CILEN_PREDICTOR_2; - /* XXX Cope with first/fast ack */ - if (p == p0 && len == 0) - return 1; - } -#endif /* PREDICTOR_SUPPORT */ - - if (len != 0) - return 0; - return 1; -} - -/* - * ccp_nakci - process received configure-nak. - * Returns 1 iff the nak was OK. - */ -static int ccp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { - ppp_pcb *pcb = f->pcb; - ccp_options *go = &pcb->ccp_gotoptions; - ccp_options no; /* options we've seen already */ - ccp_options try_; /* options to ask for next time */ - LWIP_UNUSED_ARG(treat_as_reject); -#if !MPPE_SUPPORT && !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT - LWIP_UNUSED_ARG(p); - LWIP_UNUSED_ARG(len); -#endif /* !MPPE_SUPPORT && !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT */ - - memset(&no, 0, sizeof(no)); - try_ = *go; - -#if MPPE_SUPPORT - if (go->mppe && len >= CILEN_MPPE - && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { - no.mppe = 1; - /* - * Peer wants us to use a different strength or other setting. - * Fail if we aren't willing to use his suggestion. - */ - MPPE_CI_TO_OPTS(&p[2], try_.mppe); - if ((try_.mppe & MPPE_OPT_STATEFUL) && pcb->settings.refuse_mppe_stateful) { - ppp_error("Refusing MPPE stateful mode offered by peer"); - try_.mppe = 0; - } else if (((go->mppe | MPPE_OPT_STATEFUL) & try_.mppe) != try_.mppe) { - /* Peer must have set options we didn't request (suggest) */ - try_.mppe = 0; - } - - if (!try_.mppe) { - ppp_error("MPPE required but peer negotiation failed"); - lcp_close(pcb, "MPPE required but peer negotiation failed"); - } - } -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT - if (go->deflate && len >= CILEN_DEFLATE - && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) - && p[1] == CILEN_DEFLATE) { - no.deflate = 1; - /* - * Peer wants us to use a different code size or something. - * Stop asking for Deflate if we don't understand his suggestion. - */ - if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL - || DEFLATE_SIZE(p[2]) < DEFLATE_MIN_WORKS - || p[3] != DEFLATE_CHK_SEQUENCE) - try_.deflate = 0; - else if (DEFLATE_SIZE(p[2]) < go->deflate_size) - try_.deflate_size = DEFLATE_SIZE(p[2]); - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - if (go->deflate_correct && go->deflate_draft - && len >= CILEN_DEFLATE && p[0] == CI_DEFLATE_DRAFT - && p[1] == CILEN_DEFLATE) { - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - } - } -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - if (go->bsd_compress && len >= CILEN_BSD_COMPRESS - && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { - no.bsd_compress = 1; - /* - * Peer wants us to use a different number of bits - * or a different version. - */ - if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION) - try_.bsd_compress = 0; - else if (BSD_NBITS(p[2]) < go->bsd_bits) - try_.bsd_bits = BSD_NBITS(p[2]); - p += CILEN_BSD_COMPRESS; - len -= CILEN_BSD_COMPRESS; - } -#endif /* BSDCOMPRESS_SUPPORT */ - - /* - * Predictor-1 and 2 have no options, so they can't be Naked. - * - * There may be remaining options but we ignore them. - */ - - if (f->state != PPP_FSM_OPENED) - *go = try_; - return 1; -} - -/* - * ccp_rejci - reject some of our suggested compression methods. - */ -static int ccp_rejci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - ccp_options *go = &pcb->ccp_gotoptions; - ccp_options try_; /* options to request next time */ - - try_ = *go; - - /* - * Cope with empty configure-rejects by ceasing to send - * configure-requests. - */ - if (len == 0 && pcb->ccp_all_rejected) - return -1; - -#if MPPE_SUPPORT - if (go->mppe && len >= CILEN_MPPE - && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { - ppp_error("MPPE required but peer refused"); - lcp_close(pcb, "MPPE required but peer refused"); - p += CILEN_MPPE; - len -= CILEN_MPPE; - } -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT - if (go->deflate_correct && len >= CILEN_DEFLATE - && p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) { - if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; /* Rej is bad */ - try_.deflate_correct = 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - } - if (go->deflate_draft && len >= CILEN_DEFLATE - && p[0] == CI_DEFLATE_DRAFT && p[1] == CILEN_DEFLATE) { - if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) - || p[3] != DEFLATE_CHK_SEQUENCE) - return 0; /* Rej is bad */ - try_.deflate_draft = 0; - p += CILEN_DEFLATE; - len -= CILEN_DEFLATE; - } - if (!try_.deflate_correct && !try_.deflate_draft) - try_.deflate = 0; -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - if (go->bsd_compress && len >= CILEN_BSD_COMPRESS - && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { - if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) - return 0; - try_.bsd_compress = 0; - p += CILEN_BSD_COMPRESS; - len -= CILEN_BSD_COMPRESS; - } -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - if (go->predictor_1 && len >= CILEN_PREDICTOR_1 - && p[0] == CI_PREDICTOR_1 && p[1] == CILEN_PREDICTOR_1) { - try_.predictor_1 = 0; - p += CILEN_PREDICTOR_1; - len -= CILEN_PREDICTOR_1; - } - if (go->predictor_2 && len >= CILEN_PREDICTOR_2 - && p[0] == CI_PREDICTOR_2 && p[1] == CILEN_PREDICTOR_2) { - try_.predictor_2 = 0; - p += CILEN_PREDICTOR_2; - len -= CILEN_PREDICTOR_2; - } -#endif /* PREDICTOR_SUPPORT */ - - if (len != 0) - return 0; - - if (f->state != PPP_FSM_OPENED) - *go = try_; - - return 1; -} - -/* - * ccp_reqci - processed a received configure-request. - * Returns CONFACK, CONFNAK or CONFREJ and the packet modified - * appropriately. - */ -static int ccp_reqci(fsm *f, u_char *p, int *lenp, int dont_nak) { - ppp_pcb *pcb = f->pcb; - ccp_options *ho = &pcb->ccp_hisoptions; - ccp_options *ao = &pcb->ccp_allowoptions; - int ret, newret; -#if DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT - int res; - int nb; -#endif /* DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT */ - u_char *p0, *retp; - int len, clen, type; -#if MPPE_SUPPORT - u8_t rej_for_ci_mppe = 1; /* Are we rejecting based on a bad/missing */ - /* CI_MPPE, or due to other options? */ -#endif /* MPPE_SUPPORT */ - - ret = CONFACK; - retp = p0 = p; - len = *lenp; - - memset(ho, 0, sizeof(ccp_options)); - ho->method = (len > 0)? p[0]: 0; - - while (len > 0) { - newret = CONFACK; - if (len < 2 || p[1] < 2 || p[1] > len) { - /* length is bad */ - clen = len; - newret = CONFREJ; - - } else { - type = p[0]; - clen = p[1]; - - switch (type) { -#if MPPE_SUPPORT - case CI_MPPE: - if (!ao->mppe || clen != CILEN_MPPE) { - newret = CONFREJ; - break; - } - MPPE_CI_TO_OPTS(&p[2], ho->mppe); - - /* Nak if anything unsupported or unknown are set. */ - if (ho->mppe & MPPE_OPT_UNSUPPORTED) { - newret = CONFNAK; - ho->mppe &= ~MPPE_OPT_UNSUPPORTED; - } - if (ho->mppe & MPPE_OPT_UNKNOWN) { - newret = CONFNAK; - ho->mppe &= ~MPPE_OPT_UNKNOWN; - } - - /* Check state opt */ - if (ho->mppe & MPPE_OPT_STATEFUL) { - /* - * We can Nak and request stateless, but it's a - * lot easier to just assume the peer will request - * it if he can do it; stateful mode is bad over - * the Internet -- which is where we expect MPPE. - */ - if (pcb->settings.refuse_mppe_stateful) { - ppp_error("Refusing MPPE stateful mode offered by peer"); - newret = CONFREJ; - break; - } - } - - /* Find out which of {S,L} are set. */ - if ((ho->mppe & MPPE_OPT_128) - && (ho->mppe & MPPE_OPT_40)) { - /* Both are set, negotiate the strongest. */ - newret = CONFNAK; - if (ao->mppe & MPPE_OPT_128) - ho->mppe &= ~MPPE_OPT_40; - else if (ao->mppe & MPPE_OPT_40) - ho->mppe &= ~MPPE_OPT_128; - else { - newret = CONFREJ; - break; - } - } else if (ho->mppe & MPPE_OPT_128) { - if (!(ao->mppe & MPPE_OPT_128)) { - newret = CONFREJ; - break; - } - } else if (ho->mppe & MPPE_OPT_40) { - if (!(ao->mppe & MPPE_OPT_40)) { - newret = CONFREJ; - break; - } - } else { - /* Neither are set. */ - /* We cannot accept this. */ - newret = CONFNAK; - /* Give the peer our idea of what can be used, - so it can choose and confirm */ - ho->mppe = ao->mppe; - } - - /* rebuild the opts */ - MPPE_OPTS_TO_CI(ho->mppe, &p[2]); - if (newret == CONFACK) { - int mtu; - - mppe_init(pcb, &pcb->mppe_comp, ho->mppe); - /* - * We need to decrease the interface MTU by MPPE_PAD - * because MPPE frames **grow**. The kernel [must] - * allocate MPPE_PAD extra bytes in xmit buffers. - */ - mtu = netif_get_mtu(pcb); - if (mtu) - netif_set_mtu(pcb, mtu - MPPE_PAD); - else - newret = CONFREJ; - } - - /* - * We have accepted MPPE or are willing to negotiate - * MPPE parameters. A CONFREJ is due to subsequent - * (non-MPPE) processing. - */ - rej_for_ci_mppe = 0; - break; -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT - case CI_DEFLATE: - case CI_DEFLATE_DRAFT: - if (!ao->deflate || clen != CILEN_DEFLATE - || (!ao->deflate_correct && type == CI_DEFLATE) - || (!ao->deflate_draft && type == CI_DEFLATE_DRAFT)) { - newret = CONFREJ; - break; - } - - ho->deflate = 1; - ho->deflate_size = nb = DEFLATE_SIZE(p[2]); - if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL - || p[3] != DEFLATE_CHK_SEQUENCE - || nb > ao->deflate_size || nb < DEFLATE_MIN_WORKS) { - newret = CONFNAK; - if (!dont_nak) { - p[2] = DEFLATE_MAKE_OPT(ao->deflate_size); - p[3] = DEFLATE_CHK_SEQUENCE; - /* fall through to test this #bits below */ - } else - break; - } - - /* - * Check whether we can do Deflate with the window - * size they want. If the window is too big, reduce - * it until the kernel can cope and nak with that. - * We only check this for the first option. - */ - if (p == p0) { - for (;;) { - res = ccp_test(pcb, p, CILEN_DEFLATE, 1); - if (res > 0) - break; /* it's OK now */ - if (res < 0 || nb == DEFLATE_MIN_WORKS || dont_nak) { - newret = CONFREJ; - p[2] = DEFLATE_MAKE_OPT(ho->deflate_size); - break; - } - newret = CONFNAK; - --nb; - p[2] = DEFLATE_MAKE_OPT(nb); - } - } - break; -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - case CI_BSD_COMPRESS: - if (!ao->bsd_compress || clen != CILEN_BSD_COMPRESS) { - newret = CONFREJ; - break; - } - - ho->bsd_compress = 1; - ho->bsd_bits = nb = BSD_NBITS(p[2]); - if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION - || nb > ao->bsd_bits || nb < BSD_MIN_BITS) { - newret = CONFNAK; - if (!dont_nak) { - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, ao->bsd_bits); - /* fall through to test this #bits below */ - } else - break; - } - - /* - * Check whether we can do BSD-Compress with the code - * size they want. If the code size is too big, reduce - * it until the kernel can cope and nak with that. - * We only check this for the first option. - */ - if (p == p0) { - for (;;) { - res = ccp_test(pcb, p, CILEN_BSD_COMPRESS, 1); - if (res > 0) - break; - if (res < 0 || nb == BSD_MIN_BITS || dont_nak) { - newret = CONFREJ; - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, - ho->bsd_bits); - break; - } - newret = CONFNAK; - --nb; - p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, nb); - } - } - break; -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - case CI_PREDICTOR_1: - if (!ao->predictor_1 || clen != CILEN_PREDICTOR_1) { - newret = CONFREJ; - break; - } - - ho->predictor_1 = 1; - if (p == p0 - && ccp_test(pcb, p, CILEN_PREDICTOR_1, 1) <= 0) { - newret = CONFREJ; - } - break; - - case CI_PREDICTOR_2: - if (!ao->predictor_2 || clen != CILEN_PREDICTOR_2) { - newret = CONFREJ; - break; - } - - ho->predictor_2 = 1; - if (p == p0 - && ccp_test(pcb, p, CILEN_PREDICTOR_2, 1) <= 0) { - newret = CONFREJ; - } - break; -#endif /* PREDICTOR_SUPPORT */ - - default: - newret = CONFREJ; - } - } - - if (newret == CONFNAK && dont_nak) - newret = CONFREJ; - if (!(newret == CONFACK || (newret == CONFNAK && ret == CONFREJ))) { - /* we're returning this option */ - if (newret == CONFREJ && ret == CONFNAK) - retp = p0; - ret = newret; - if (p != retp) - MEMCPY(retp, p, clen); - retp += clen; - } - - p += clen; - len -= clen; - } - - if (ret != CONFACK) { - if (ret == CONFREJ && *lenp == retp - p0) - pcb->ccp_all_rejected = 1; - else - *lenp = retp - p0; - } -#if MPPE_SUPPORT - if (ret == CONFREJ && ao->mppe && rej_for_ci_mppe) { - ppp_error("MPPE required but peer negotiation failed"); - lcp_close(pcb, "MPPE required but peer negotiation failed"); - } -#endif /* MPPE_SUPPORT */ - return ret; -} - -/* - * Make a string name for a compression method (or 2). - */ -static const char *method_name(ccp_options *opt, ccp_options *opt2) { - static char result[64]; -#if !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT - LWIP_UNUSED_ARG(opt2); -#endif /* !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT */ - - if (!ccp_anycompress(opt)) - return "(none)"; - switch (opt->method) { -#if MPPE_SUPPORT - case CI_MPPE: - { - char *p = result; - char *q = result + sizeof(result); /* 1 past result */ - - ppp_slprintf(p, q - p, "MPPE "); - p += 5; - if (opt->mppe & MPPE_OPT_128) { - ppp_slprintf(p, q - p, "128-bit "); - p += 8; - } - if (opt->mppe & MPPE_OPT_40) { - ppp_slprintf(p, q - p, "40-bit "); - p += 7; - } - if (opt->mppe & MPPE_OPT_STATEFUL) - ppp_slprintf(p, q - p, "stateful"); - else - ppp_slprintf(p, q - p, "stateless"); - - break; - } -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT - case CI_DEFLATE: - case CI_DEFLATE_DRAFT: - if (opt2 != NULL && opt2->deflate_size != opt->deflate_size) - ppp_slprintf(result, sizeof(result), "Deflate%s (%d/%d)", - (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), - opt->deflate_size, opt2->deflate_size); - else - ppp_slprintf(result, sizeof(result), "Deflate%s (%d)", - (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), - opt->deflate_size); - break; -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - case CI_BSD_COMPRESS: - if (opt2 != NULL && opt2->bsd_bits != opt->bsd_bits) - ppp_slprintf(result, sizeof(result), "BSD-Compress (%d/%d)", - opt->bsd_bits, opt2->bsd_bits); - else - ppp_slprintf(result, sizeof(result), "BSD-Compress (%d)", - opt->bsd_bits); - break; -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - case CI_PREDICTOR_1: - return "Predictor 1"; - case CI_PREDICTOR_2: - return "Predictor 2"; -#endif /* PREDICTOR_SUPPORT */ - default: - ppp_slprintf(result, sizeof(result), "Method %d", opt->method); - } - return result; -} - -/* - * CCP has come up - inform the kernel driver and log a message. - */ -static void ccp_up(fsm *f) { - ppp_pcb *pcb = f->pcb; - ccp_options *go = &pcb->ccp_gotoptions; - ccp_options *ho = &pcb->ccp_hisoptions; - char method1[64]; - - ccp_set(pcb, 1, 1, go->method, ho->method); - if (ccp_anycompress(go)) { - if (ccp_anycompress(ho)) { - if (go->method == ho->method) { - ppp_notice("%s compression enabled", method_name(go, ho)); - } else { - ppp_strlcpy(method1, method_name(go, NULL), sizeof(method1)); - ppp_notice("%s / %s compression enabled", - method1, method_name(ho, NULL)); - } - } else - ppp_notice("%s receive compression enabled", method_name(go, NULL)); - } else if (ccp_anycompress(ho)) - ppp_notice("%s transmit compression enabled", method_name(ho, NULL)); -#if MPPE_SUPPORT - if (go->mppe) { - continue_networks(pcb); /* Bring up IP et al */ - } -#endif /* MPPE_SUPPORT */ -} - -/* - * CCP has gone down - inform the kernel driver. - */ -static void ccp_down(fsm *f) { - ppp_pcb *pcb = f->pcb; -#if MPPE_SUPPORT - ccp_options *go = &pcb->ccp_gotoptions; -#endif /* MPPE_SUPPORT */ - - if (pcb->ccp_localstate & RACK_PENDING) - UNTIMEOUT(ccp_rack_timeout, f); - pcb->ccp_localstate = 0; - ccp_set(pcb, 1, 0, 0, 0); -#if MPPE_SUPPORT - if (go->mppe) { - go->mppe = 0; - if (pcb->lcp_fsm.state == PPP_FSM_OPENED) { - /* If LCP is not already going down, make sure it does. */ - ppp_error("MPPE disabled"); - lcp_close(pcb, "MPPE disabled"); - } - } -#endif /* MPPE_SUPPORT */ -} - -#if PRINTPKT_SUPPORT -/* - * Print the contents of a CCP packet. - */ -static const char* const ccp_codenames[] = { - "ConfReq", "ConfAck", "ConfNak", "ConfRej", - "TermReq", "TermAck", "CodeRej", - NULL, NULL, NULL, NULL, NULL, NULL, - "ResetReq", "ResetAck", -}; - -static int ccp_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg) { - const u_char *p0, *optend; - int code, id, len; - int optlen; - - p0 = p; - if (plen < HEADERLEN) - return 0; - code = p[0]; - id = p[1]; - len = (p[2] << 8) + p[3]; - if (len < HEADERLEN || len > plen) - return 0; - - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ccp_codenames) && ccp_codenames[code-1] != NULL) - printer(arg, " %s", ccp_codenames[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= HEADERLEN; - p += HEADERLEN; - - switch (code) { - case CONFREQ: - case CONFACK: - case CONFNAK: - case CONFREJ: - /* print list of possible compression methods */ - while (len >= 2) { - code = p[0]; - optlen = p[1]; - if (optlen < 2 || optlen > len) - break; - printer(arg, " <"); - len -= optlen; - optend = p + optlen; - switch (code) { -#if MPPE_SUPPORT - case CI_MPPE: - if (optlen >= CILEN_MPPE) { - u_char mppe_opts; - - MPPE_CI_TO_OPTS(&p[2], mppe_opts); - printer(arg, "mppe %s %s %s %s %s %s%s", - (p[2] & MPPE_H_BIT)? "+H": "-H", - (p[5] & MPPE_M_BIT)? "+M": "-M", - (p[5] & MPPE_S_BIT)? "+S": "-S", - (p[5] & MPPE_L_BIT)? "+L": "-L", - (p[5] & MPPE_D_BIT)? "+D": "-D", - (p[5] & MPPE_C_BIT)? "+C": "-C", - (mppe_opts & MPPE_OPT_UNKNOWN)? " +U": ""); - if (mppe_opts & MPPE_OPT_UNKNOWN) - printer(arg, " (%.2x %.2x %.2x %.2x)", - p[2], p[3], p[4], p[5]); - p += CILEN_MPPE; - } - break; -#endif /* MPPE_SUPPORT */ -#if DEFLATE_SUPPORT - case CI_DEFLATE: - case CI_DEFLATE_DRAFT: - if (optlen >= CILEN_DEFLATE) { - printer(arg, "deflate%s %d", - (code == CI_DEFLATE_DRAFT? "(old#)": ""), - DEFLATE_SIZE(p[2])); - if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL) - printer(arg, " method %d", DEFLATE_METHOD(p[2])); - if (p[3] != DEFLATE_CHK_SEQUENCE) - printer(arg, " check %d", p[3]); - p += CILEN_DEFLATE; - } - break; -#endif /* DEFLATE_SUPPORT */ -#if BSDCOMPRESS_SUPPORT - case CI_BSD_COMPRESS: - if (optlen >= CILEN_BSD_COMPRESS) { - printer(arg, "bsd v%d %d", BSD_VERSION(p[2]), - BSD_NBITS(p[2])); - p += CILEN_BSD_COMPRESS; - } - break; -#endif /* BSDCOMPRESS_SUPPORT */ -#if PREDICTOR_SUPPORT - case CI_PREDICTOR_1: - if (optlen >= CILEN_PREDICTOR_1) { - printer(arg, "predictor 1"); - p += CILEN_PREDICTOR_1; - } - break; - case CI_PREDICTOR_2: - if (optlen >= CILEN_PREDICTOR_2) { - printer(arg, "predictor 2"); - p += CILEN_PREDICTOR_2; - } - break; -#endif /* PREDICTOR_SUPPORT */ - default: - break; - } - while (p < optend) - printer(arg, " %.2x", *p++); - printer(arg, ">"); - } - break; - - case TERMACK: - case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; - default: - break; - } - - /* dump out the rest of the packet in hex */ - while (--len >= 0) - printer(arg, " %.2x", *p++); - - return p - p0; -} -#endif /* PRINTPKT_SUPPORT */ - -#if PPP_DATAINPUT -/* - * We have received a packet that the decompressor failed to - * decompress. Here we would expect to issue a reset-request, but - * Motorola has a patent on resetting the compressor as a result of - * detecting an error in the decompressed data after decompression. - * (See US patent 5,130,993; international patent publication number - * WO 91/10289; Australian patent 73296/91.) - * - * So we ask the kernel whether the error was detected after - * decompression; if it was, we take CCP down, thus disabling - * compression :-(, otherwise we issue the reset-request. - */ -static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len) { - fsm *f; -#if MPPE_SUPPORT - ccp_options *go = &pcb->ccp_gotoptions; -#endif /* MPPE_SUPPORT */ - LWIP_UNUSED_ARG(pkt); - LWIP_UNUSED_ARG(len); - - f = &pcb->ccp_fsm; - if (f->state == PPP_FSM_OPENED) { - if (ccp_fatal_error(pcb)) { - /* - * Disable compression by taking CCP down. - */ - ppp_error("Lost compression sync: disabling compression"); - ccp_close(pcb, "Lost compression sync"); -#if MPPE_SUPPORT - /* - * If we were doing MPPE, we must also take the link down. - */ - if (go->mppe) { - ppp_error("Too many MPPE errors, closing LCP"); - lcp_close(pcb, "Too many MPPE errors"); - } -#endif /* MPPE_SUPPORT */ - } else { - /* - * Send a reset-request to reset the peer's compressor. - * We don't do that if we are still waiting for an - * acknowledgement to a previous reset-request. - */ - if (!(pcb->ccp_localstate & RACK_PENDING)) { - fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); - TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); - pcb->ccp_localstate |= RACK_PENDING; - } else - pcb->ccp_localstate |= RREQ_REPEAT; - } - } -} -#endif /* PPP_DATAINPUT */ - -/* - * We have received a packet that the decompressor failed to - * decompress. Issue a reset-request. - */ -void ccp_resetrequest(ppp_pcb *pcb) { - fsm *f = &pcb->ccp_fsm; - - if (f->state != PPP_FSM_OPENED) - return; - - /* - * Send a reset-request to reset the peer's compressor. - * We don't do that if we are still waiting for an - * acknowledgement to a previous reset-request. - */ - if (!(pcb->ccp_localstate & RACK_PENDING)) { - fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); - TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); - pcb->ccp_localstate |= RACK_PENDING; - } else - pcb->ccp_localstate |= RREQ_REPEAT; -} - -/* - * Timeout waiting for reset-ack. - */ -static void ccp_rack_timeout(void *arg) { - fsm *f = (fsm*)arg; - ppp_pcb *pcb = f->pcb; - - if (f->state == PPP_FSM_OPENED && (pcb->ccp_localstate & RREQ_REPEAT)) { - fsm_sdata(f, CCP_RESETREQ, f->reqid, NULL, 0); - TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); - pcb->ccp_localstate &= ~RREQ_REPEAT; - } else - pcb->ccp_localstate &= ~RACK_PENDING; -} - -#endif /* PPP_SUPPORT && CCP_SUPPORT */ +/* + * ccp.c - PPP Compression Control Protocol. + * + * Copyright (c) 1994-2002 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include +#include + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/ccp.h" + +#if MPPE_SUPPORT +#include "netif/ppp/lcp.h" /* lcp_close(), lcp_fsm */ +#include "netif/ppp/mppe.h" /* mppe_init() */ +#endif /* MPPE_SUPPORT */ + +/* + * Unfortunately there is a bug in zlib which means that using a + * size of 8 (window size = 256) for Deflate compression will cause + * buffer overruns and kernel crashes in the deflate module. + * Until this is fixed we only accept sizes in the range 9 .. 15. + * Thanks to James Carlson for pointing this out. + */ +#define DEFLATE_MIN_WORKS 9 + +/* + * Command-line options. + */ +#if PPP_OPTIONS +static int setbsdcomp (char **); +static int setdeflate (char **); +static char bsd_value[8]; +static char deflate_value[8]; + +/* + * Option variables. + */ +#if MPPE_SUPPORT +bool refuse_mppe_stateful = 1; /* Allow stateful mode? */ +#endif /* MPPE_SUPPORT */ + +static option_t ccp_option_list[] = { + { "noccp", o_bool, &ccp_protent.enabled_flag, + "Disable CCP negotiation" }, + { "-ccp", o_bool, &ccp_protent.enabled_flag, + "Disable CCP negotiation", OPT_ALIAS }, + + { "bsdcomp", o_special, (void *)setbsdcomp, + "Request BSD-Compress packet compression", + OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, bsd_value }, + { "nobsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress, + "don't allow BSD-Compress", OPT_PRIOSUB | OPT_A2CLR, + &ccp_allowoptions[0].bsd_compress }, + { "-bsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress, + "don't allow BSD-Compress", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, + &ccp_allowoptions[0].bsd_compress }, + + { "deflate", o_special, (void *)setdeflate, + "request Deflate compression", + OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, deflate_value }, + { "nodeflate", o_bool, &ccp_wantoptions[0].deflate, + "don't allow Deflate compression", OPT_PRIOSUB | OPT_A2CLR, + &ccp_allowoptions[0].deflate }, + { "-deflate", o_bool, &ccp_wantoptions[0].deflate, + "don't allow Deflate compression", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, + &ccp_allowoptions[0].deflate }, + + { "nodeflatedraft", o_bool, &ccp_wantoptions[0].deflate_draft, + "don't use draft deflate #", OPT_A2COPY, + &ccp_allowoptions[0].deflate_draft }, + + { "predictor1", o_bool, &ccp_wantoptions[0].predictor_1, + "request Predictor-1", OPT_PRIO | 1 }, + { "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1, + "don't allow Predictor-1", OPT_PRIOSUB | OPT_A2CLR, + &ccp_allowoptions[0].predictor_1 }, + { "-predictor1", o_bool, &ccp_wantoptions[0].predictor_1, + "don't allow Predictor-1", OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, + &ccp_allowoptions[0].predictor_1 }, + +#if MPPE_SUPPORT + /* MPPE options are symmetrical ... we only set wantoptions here */ + { "require-mppe", o_bool, &ccp_wantoptions[0].mppe, + "require MPPE encryption", + OPT_PRIO | MPPE_OPT_40 | MPPE_OPT_128 }, + { "+mppe", o_bool, &ccp_wantoptions[0].mppe, + "require MPPE encryption", + OPT_ALIAS | OPT_PRIO | MPPE_OPT_40 | MPPE_OPT_128 }, + { "nomppe", o_bool, &ccp_wantoptions[0].mppe, + "don't allow MPPE encryption", OPT_PRIO }, + { "-mppe", o_bool, &ccp_wantoptions[0].mppe, + "don't allow MPPE encryption", OPT_ALIAS | OPT_PRIO }, + + /* We use ccp_allowoptions[0].mppe as a junk var ... it is reset later */ + { "require-mppe-40", o_bool, &ccp_allowoptions[0].mppe, + "require MPPE 40-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_40, + &ccp_wantoptions[0].mppe }, + { "+mppe-40", o_bool, &ccp_allowoptions[0].mppe, + "require MPPE 40-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_40, + &ccp_wantoptions[0].mppe }, + { "nomppe-40", o_bool, &ccp_allowoptions[0].mppe, + "don't allow MPPE 40-bit encryption", + OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_40, &ccp_wantoptions[0].mppe }, + { "-mppe-40", o_bool, &ccp_allowoptions[0].mppe, + "don't allow MPPE 40-bit encryption", + OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_40, + &ccp_wantoptions[0].mppe }, + + { "require-mppe-128", o_bool, &ccp_allowoptions[0].mppe, + "require MPPE 128-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_128, + &ccp_wantoptions[0].mppe }, + { "+mppe-128", o_bool, &ccp_allowoptions[0].mppe, + "require MPPE 128-bit encryption", + OPT_ALIAS | OPT_PRIO | OPT_A2OR | MPPE_OPT_128, + &ccp_wantoptions[0].mppe }, + { "nomppe-128", o_bool, &ccp_allowoptions[0].mppe, + "don't allow MPPE 128-bit encryption", + OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_128, &ccp_wantoptions[0].mppe }, + { "-mppe-128", o_bool, &ccp_allowoptions[0].mppe, + "don't allow MPPE 128-bit encryption", + OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_128, + &ccp_wantoptions[0].mppe }, + + /* strange one; we always request stateless, but will we allow stateful? */ + { "mppe-stateful", o_bool, &refuse_mppe_stateful, + "allow MPPE stateful mode", OPT_PRIO }, + { "nomppe-stateful", o_bool, &refuse_mppe_stateful, + "disallow MPPE stateful mode", OPT_PRIO | 1 }, +#endif /* MPPE_SUPPORT */ + + { NULL } +}; +#endif /* PPP_OPTIONS */ + +/* + * Protocol entry points from main code. + */ +static void ccp_init(ppp_pcb *pcb); +static void ccp_open(ppp_pcb *pcb); +static void ccp_close(ppp_pcb *pcb, const char *reason); +static void ccp_lowerup(ppp_pcb *pcb); +static void ccp_lowerdown(ppp_pcb *pcb); +static void ccp_input(ppp_pcb *pcb, u_char *pkt, int len); +static void ccp_protrej(ppp_pcb *pcb); +#if PRINTPKT_SUPPORT +static int ccp_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg); +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT +static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len); +#endif /* PPP_DATAINPUT */ + +const struct protent ccp_protent = { + PPP_CCP, + ccp_init, + ccp_input, + ccp_protrej, + ccp_lowerup, + ccp_lowerdown, + ccp_open, + ccp_close, +#if PRINTPKT_SUPPORT + ccp_printpkt, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + ccp_datainput, +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "CCP", + "Compressed", +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + ccp_option_list, + NULL, +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + NULL, + NULL +#endif /* DEMAND_SUPPORT */ +}; + +/* + * Callbacks for fsm code. + */ +static void ccp_resetci (fsm *); +static int ccp_cilen (fsm *); +static void ccp_addci (fsm *, u_char *, int *); +static int ccp_ackci (fsm *, u_char *, int); +static int ccp_nakci (fsm *, u_char *, int, int); +static int ccp_rejci (fsm *, u_char *, int); +static int ccp_reqci (fsm *, u_char *, int *, int); +static void ccp_up (fsm *); +static void ccp_down (fsm *); +static int ccp_extcode (fsm *, int, int, u_char *, int); +static void ccp_rack_timeout (void *); +static const char *method_name (ccp_options *, ccp_options *); + +static const fsm_callbacks ccp_callbacks = { + ccp_resetci, + ccp_cilen, + ccp_addci, + ccp_ackci, + ccp_nakci, + ccp_rejci, + ccp_reqci, + ccp_up, + ccp_down, + NULL, + NULL, + NULL, + NULL, + ccp_extcode, + "CCP" +}; + +/* + * Do we want / did we get any compression? + */ +static int ccp_anycompress(ccp_options *opt) { + return (0 +#if DEFLATE_SUPPORT + || (opt)->deflate +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + || (opt)->bsd_compress +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + || (opt)->predictor_1 || (opt)->predictor_2 +#endif /* PREDICTOR_SUPPORT */ +#if MPPE_SUPPORT + || (opt)->mppe +#endif /* MPPE_SUPPORT */ + ); +} + +/* + * Local state (mainly for handling reset-reqs and reset-acks). + */ +#define RACK_PENDING 1 /* waiting for reset-ack */ +#define RREQ_REPEAT 2 /* send another reset-req if no reset-ack */ + +#define RACKTIMEOUT 1 /* second */ + +#if PPP_OPTIONS +/* + * Option parsing + */ +static int +setbsdcomp(argv) + char **argv; +{ + int rbits, abits; + char *str, *endp; + + str = *argv; + abits = rbits = strtol(str, &endp, 0); + if (endp != str && *endp == ',') { + str = endp + 1; + abits = strtol(str, &endp, 0); + } + if (*endp != 0 || endp == str) { + option_error("invalid parameter '%s' for bsdcomp option", *argv); + return 0; + } + if ((rbits != 0 && (rbits < BSD_MIN_BITS || rbits > BSD_MAX_BITS)) + || (abits != 0 && (abits < BSD_MIN_BITS || abits > BSD_MAX_BITS))) { + option_error("bsdcomp option values must be 0 or %d .. %d", + BSD_MIN_BITS, BSD_MAX_BITS); + return 0; + } + if (rbits > 0) { + ccp_wantoptions[0].bsd_compress = 1; + ccp_wantoptions[0].bsd_bits = rbits; + } else + ccp_wantoptions[0].bsd_compress = 0; + if (abits > 0) { + ccp_allowoptions[0].bsd_compress = 1; + ccp_allowoptions[0].bsd_bits = abits; + } else + ccp_allowoptions[0].bsd_compress = 0; + ppp_slprintf(bsd_value, sizeof(bsd_value), + rbits == abits? "%d": "%d,%d", rbits, abits); + + return 1; +} + +static int +setdeflate(argv) + char **argv; +{ + int rbits, abits; + char *str, *endp; + + str = *argv; + abits = rbits = strtol(str, &endp, 0); + if (endp != str && *endp == ',') { + str = endp + 1; + abits = strtol(str, &endp, 0); + } + if (*endp != 0 || endp == str) { + option_error("invalid parameter '%s' for deflate option", *argv); + return 0; + } + if ((rbits != 0 && (rbits < DEFLATE_MIN_SIZE || rbits > DEFLATE_MAX_SIZE)) + || (abits != 0 && (abits < DEFLATE_MIN_SIZE + || abits > DEFLATE_MAX_SIZE))) { + option_error("deflate option values must be 0 or %d .. %d", + DEFLATE_MIN_SIZE, DEFLATE_MAX_SIZE); + return 0; + } + if (rbits == DEFLATE_MIN_SIZE || abits == DEFLATE_MIN_SIZE) { + if (rbits == DEFLATE_MIN_SIZE) + rbits = DEFLATE_MIN_WORKS; + if (abits == DEFLATE_MIN_SIZE) + abits = DEFLATE_MIN_WORKS; + warn("deflate option value of %d changed to %d to avoid zlib bug", + DEFLATE_MIN_SIZE, DEFLATE_MIN_WORKS); + } + if (rbits > 0) { + ccp_wantoptions[0].deflate = 1; + ccp_wantoptions[0].deflate_size = rbits; + } else + ccp_wantoptions[0].deflate = 0; + if (abits > 0) { + ccp_allowoptions[0].deflate = 1; + ccp_allowoptions[0].deflate_size = abits; + } else + ccp_allowoptions[0].deflate = 0; + ppp_slprintf(deflate_value, sizeof(deflate_value), + rbits == abits? "%d": "%d,%d", rbits, abits); + + return 1; +} +#endif /* PPP_OPTIONS */ + +/* + * ccp_init - initialize CCP. + */ +static void ccp_init(ppp_pcb *pcb) { + fsm *f = &pcb->ccp_fsm; + + f->pcb = pcb; + f->protocol = PPP_CCP; + f->callbacks = &ccp_callbacks; + fsm_init(f); + +#if 0 /* Not necessary, everything is cleared in ppp_new() */ + memset(wo, 0, sizeof(*wo)); + memset(go, 0, sizeof(*go)); + memset(ao, 0, sizeof(*ao)); + memset(ho, 0, sizeof(*ho)); +#endif /* 0 */ + +#if DEFLATE_SUPPORT + wo->deflate = 1; + wo->deflate_size = DEFLATE_MAX_SIZE; + wo->deflate_correct = 1; + wo->deflate_draft = 1; + ao->deflate = 1; + ao->deflate_size = DEFLATE_MAX_SIZE; + ao->deflate_correct = 1; + ao->deflate_draft = 1; +#endif /* DEFLATE_SUPPORT */ + +#if BSDCOMPRESS_SUPPORT + wo->bsd_compress = 1; + wo->bsd_bits = BSD_MAX_BITS; + ao->bsd_compress = 1; + ao->bsd_bits = BSD_MAX_BITS; +#endif /* BSDCOMPRESS_SUPPORT */ + +#if PREDICTOR_SUPPORT + ao->predictor_1 = 1; +#endif /* PREDICTOR_SUPPORT */ +} + +/* + * ccp_open - CCP is allowed to come up. + */ +static void ccp_open(ppp_pcb *pcb) { + fsm *f = &pcb->ccp_fsm; + ccp_options *go = &pcb->ccp_gotoptions; + + if (f->state != PPP_FSM_OPENED) + ccp_set(pcb, 1, 0, 0, 0); + + /* + * Find out which compressors the kernel supports before + * deciding whether to open in silent mode. + */ + ccp_resetci(f); + if (!ccp_anycompress(go)) + f->flags |= OPT_SILENT; + + fsm_open(f); +} + +/* + * ccp_close - Terminate CCP. + */ +static void ccp_close(ppp_pcb *pcb, const char *reason) { + fsm *f = &pcb->ccp_fsm; + ccp_set(pcb, 0, 0, 0, 0); + fsm_close(f, reason); +} + +/* + * ccp_lowerup - we may now transmit CCP packets. + */ +static void ccp_lowerup(ppp_pcb *pcb) { + fsm *f = &pcb->ccp_fsm; + fsm_lowerup(f); +} + +/* + * ccp_lowerdown - we may not transmit CCP packets. + */ +static void ccp_lowerdown(ppp_pcb *pcb) { + fsm *f = &pcb->ccp_fsm; + fsm_lowerdown(f); +} + +/* + * ccp_input - process a received CCP packet. + */ +static void ccp_input(ppp_pcb *pcb, u_char *p, int len) { + fsm *f = &pcb->ccp_fsm; + ccp_options *go = &pcb->ccp_gotoptions; + int oldstate; + + /* + * Check for a terminate-request so we can print a message. + */ + oldstate = f->state; + fsm_input(f, p, len); + if (oldstate == PPP_FSM_OPENED && p[0] == TERMREQ && f->state != PPP_FSM_OPENED) { + ppp_notice("Compression disabled by peer."); +#if MPPE_SUPPORT + if (go->mppe) { + ppp_error("MPPE disabled, closing LCP"); + lcp_close(pcb, "MPPE disabled by peer"); + } +#endif /* MPPE_SUPPORT */ + } + + /* + * If we get a terminate-ack and we're not asking for compression, + * close CCP. + */ + if (oldstate == PPP_FSM_REQSENT && p[0] == TERMACK + && !ccp_anycompress(go)) + ccp_close(pcb, "No compression negotiated"); +} + +/* + * Handle a CCP-specific code. + */ +static int ccp_extcode(fsm *f, int code, int id, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(len); + + switch (code) { + case CCP_RESETREQ: + if (f->state != PPP_FSM_OPENED) + break; + ccp_reset_comp(pcb); + /* send a reset-ack, which the transmitter will see and + reset its compression state. */ + fsm_sdata(f, CCP_RESETACK, id, NULL, 0); + break; + + case CCP_RESETACK: + if ((pcb->ccp_localstate & RACK_PENDING) && id == f->reqid) { + pcb->ccp_localstate &= ~(RACK_PENDING | RREQ_REPEAT); + UNTIMEOUT(ccp_rack_timeout, f); + ccp_reset_decomp(pcb); + } + break; + + default: + return 0; + } + + return 1; +} + +/* + * ccp_protrej - peer doesn't talk CCP. + */ +static void ccp_protrej(ppp_pcb *pcb) { + fsm *f = &pcb->ccp_fsm; +#if MPPE_SUPPORT + ccp_options *go = &pcb->ccp_gotoptions; +#endif /* MPPE_SUPPORT */ + + ccp_set(pcb, 0, 0, 0, 0); + fsm_lowerdown(f); + +#if MPPE_SUPPORT + if (go->mppe) { + ppp_error("MPPE required but peer negotiation failed"); + lcp_close(pcb, "MPPE required but peer negotiation failed"); + } +#endif /* MPPE_SUPPORT */ + +} + +/* + * ccp_resetci - initialize at start of negotiation. + */ +static void ccp_resetci(fsm *f) { + ppp_pcb *pcb = f->pcb; + ccp_options *go = &pcb->ccp_gotoptions; + ccp_options *wo = &pcb->ccp_wantoptions; +#if MPPE_SUPPORT + ccp_options *ao = &pcb->ccp_allowoptions; +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT + u_char opt_buf[CCP_MAX_OPTION_LENGTH]; +#endif /* DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT */ +#if DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT + int res; +#endif /* DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT */ + +#if MPPE_SUPPORT + if (pcb->settings.require_mppe) { + wo->mppe = ao->mppe = + (pcb->settings.refuse_mppe_40 ? 0 : MPPE_OPT_40) + | (pcb->settings.refuse_mppe_128 ? 0 : MPPE_OPT_128); + } +#endif /* MPPE_SUPPORT */ + + *go = *wo; + pcb->ccp_all_rejected = 0; + +#if MPPE_SUPPORT + if (go->mppe) { + int auth_mschap_bits = pcb->auth_done; + int numbits; + + /* + * Start with a basic sanity check: mschap[v2] auth must be in + * exactly one direction. RFC 3079 says that the keys are + * 'derived from the credentials of the peer that initiated the call', + * however the PPP protocol doesn't have such a concept, and pppd + * cannot get this info externally. Instead we do the best we can. + * NB: If MPPE is required, all other compression opts are invalid. + * So, we return right away if we can't do it. + */ + + /* Leave only the mschap auth bits set */ + auth_mschap_bits &= (CHAP_MS_WITHPEER | CHAP_MS_PEER | + CHAP_MS2_WITHPEER | CHAP_MS2_PEER); + /* Count the mschap auths */ + auth_mschap_bits >>= CHAP_MS_SHIFT; + numbits = 0; + do { + numbits += auth_mschap_bits & 1; + auth_mschap_bits >>= 1; + } while (auth_mschap_bits); + if (numbits > 1) { + ppp_error("MPPE required, but auth done in both directions."); + lcp_close(pcb, "MPPE required but not available"); + return; + } + if (!numbits) { + ppp_error("MPPE required, but MS-CHAP[v2] auth not performed."); + lcp_close(pcb, "MPPE required but not available"); + return; + } + + /* A plugin (eg radius) may not have obtained key material. */ + if (!pcb->mppe_keys_set) { + ppp_error("MPPE required, but keys are not available. " + "Possible plugin problem?"); + lcp_close(pcb, "MPPE required but not available"); + return; + } + + /* LM auth not supported for MPPE */ + if (pcb->auth_done & (CHAP_MS_WITHPEER | CHAP_MS_PEER)) { + /* This might be noise */ + if (go->mppe & MPPE_OPT_40) { + ppp_notice("Disabling 40-bit MPPE; MS-CHAP LM not supported"); + go->mppe &= ~MPPE_OPT_40; + wo->mppe &= ~MPPE_OPT_40; + } + } + + /* Last check: can we actually negotiate something? */ + if (!(go->mppe & (MPPE_OPT_40 | MPPE_OPT_128))) { + /* Could be misconfig, could be 40-bit disabled above. */ + ppp_error("MPPE required, but both 40-bit and 128-bit disabled."); + lcp_close(pcb, "MPPE required but not available"); + return; + } + + /* sync options */ + ao->mppe = go->mppe; + /* MPPE is not compatible with other compression types */ +#if BSDCOMPRESS_SUPPORT + ao->bsd_compress = go->bsd_compress = 0; +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + ao->predictor_1 = go->predictor_1 = 0; + ao->predictor_2 = go->predictor_2 = 0; +#endif /* PREDICTOR_SUPPORT */ +#if DEFLATE_SUPPORT + ao->deflate = go->deflate = 0; +#endif /* DEFLATE_SUPPORT */ + } +#endif /* MPPE_SUPPORT */ + + /* + * Check whether the kernel knows about the various + * compression methods we might request. + */ +#if BSDCOMPRESS_SUPPORT + /* FIXME: we don't need to test if BSD compress is available + * if BSDCOMPRESS_SUPPORT is set, it is. + */ + if (go->bsd_compress) { + opt_buf[0] = CI_BSD_COMPRESS; + opt_buf[1] = CILEN_BSD_COMPRESS; + for (;;) { + if (go->bsd_bits < BSD_MIN_BITS) { + go->bsd_compress = 0; + break; + } + opt_buf[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); + res = ccp_test(pcb, opt_buf, CILEN_BSD_COMPRESS, 0); + if (res > 0) { + break; + } else if (res < 0) { + go->bsd_compress = 0; + break; + } + go->bsd_bits--; + } + } +#endif /* BSDCOMPRESS_SUPPORT */ +#if DEFLATE_SUPPORT + /* FIXME: we don't need to test if deflate is available + * if DEFLATE_SUPPORT is set, it is. + */ + if (go->deflate) { + if (go->deflate_correct) { + opt_buf[0] = CI_DEFLATE; + opt_buf[1] = CILEN_DEFLATE; + opt_buf[3] = DEFLATE_CHK_SEQUENCE; + for (;;) { + if (go->deflate_size < DEFLATE_MIN_WORKS) { + go->deflate_correct = 0; + break; + } + opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); + res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); + if (res > 0) { + break; + } else if (res < 0) { + go->deflate_correct = 0; + break; + } + go->deflate_size--; + } + } + if (go->deflate_draft) { + opt_buf[0] = CI_DEFLATE_DRAFT; + opt_buf[1] = CILEN_DEFLATE; + opt_buf[3] = DEFLATE_CHK_SEQUENCE; + for (;;) { + if (go->deflate_size < DEFLATE_MIN_WORKS) { + go->deflate_draft = 0; + break; + } + opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); + res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); + if (res > 0) { + break; + } else if (res < 0) { + go->deflate_draft = 0; + break; + } + go->deflate_size--; + } + } + if (!go->deflate_correct && !go->deflate_draft) + go->deflate = 0; + } +#endif /* DEFLATE_SUPPORT */ +#if PREDICTOR_SUPPORT + /* FIXME: we don't need to test if predictor is available, + * if PREDICTOR_SUPPORT is set, it is. + */ + if (go->predictor_1) { + opt_buf[0] = CI_PREDICTOR_1; + opt_buf[1] = CILEN_PREDICTOR_1; + if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_1, 0) <= 0) + go->predictor_1 = 0; + } + if (go->predictor_2) { + opt_buf[0] = CI_PREDICTOR_2; + opt_buf[1] = CILEN_PREDICTOR_2; + if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_2, 0) <= 0) + go->predictor_2 = 0; + } +#endif /* PREDICTOR_SUPPORT */ +} + +/* + * ccp_cilen - Return total length of our configuration info. + */ +static int ccp_cilen(fsm *f) { + ppp_pcb *pcb = f->pcb; + ccp_options *go = &pcb->ccp_gotoptions; + + return 0 +#if BSDCOMPRESS_SUPPORT + + (go->bsd_compress? CILEN_BSD_COMPRESS: 0) +#endif /* BSDCOMPRESS_SUPPORT */ +#if DEFLATE_SUPPORT + + (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0) + + (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0) +#endif /* DEFLATE_SUPPORT */ +#if PREDICTOR_SUPPORT + + (go->predictor_1? CILEN_PREDICTOR_1: 0) + + (go->predictor_2? CILEN_PREDICTOR_2: 0) +#endif /* PREDICTOR_SUPPORT */ +#if MPPE_SUPPORT + + (go->mppe? CILEN_MPPE: 0) +#endif /* MPPE_SUPPORT */ + ; +} + +/* + * ccp_addci - put our requests in a packet. + */ +static void ccp_addci(fsm *f, u_char *p, int *lenp) { + ppp_pcb *pcb = f->pcb; + ccp_options *go = &pcb->ccp_gotoptions; + u_char *p0 = p; + + /* + * Add the compression types that we can receive, in decreasing + * preference order. + */ +#if MPPE_SUPPORT + if (go->mppe) { + p[0] = CI_MPPE; + p[1] = CILEN_MPPE; + MPPE_OPTS_TO_CI(go->mppe, &p[2]); + mppe_init(pcb, &pcb->mppe_decomp, go->mppe); + p += CILEN_MPPE; + } +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT + if (go->deflate) { + if (go->deflate_correct) { + p[0] = CI_DEFLATE; + p[1] = CILEN_DEFLATE; + p[2] = DEFLATE_MAKE_OPT(go->deflate_size); + p[3] = DEFLATE_CHK_SEQUENCE; + p += CILEN_DEFLATE; + } + if (go->deflate_draft) { + p[0] = CI_DEFLATE_DRAFT; + p[1] = CILEN_DEFLATE; + p[2] = p[2 - CILEN_DEFLATE]; + p[3] = DEFLATE_CHK_SEQUENCE; + p += CILEN_DEFLATE; + } + } +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + if (go->bsd_compress) { + p[0] = CI_BSD_COMPRESS; + p[1] = CILEN_BSD_COMPRESS; + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); + p += CILEN_BSD_COMPRESS; + } +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + /* XXX Should Predictor 2 be preferable to Predictor 1? */ + if (go->predictor_1) { + p[0] = CI_PREDICTOR_1; + p[1] = CILEN_PREDICTOR_1; + p += CILEN_PREDICTOR_1; + } + if (go->predictor_2) { + p[0] = CI_PREDICTOR_2; + p[1] = CILEN_PREDICTOR_2; + p += CILEN_PREDICTOR_2; + } +#endif /* PREDICTOR_SUPPORT */ + + go->method = (p > p0)? p0[0]: 0; + + *lenp = p - p0; +} + +/* + * ccp_ackci - process a received configure-ack, and return + * 1 iff the packet was OK. + */ +static int ccp_ackci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + ccp_options *go = &pcb->ccp_gotoptions; +#if BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT + u_char *p0 = p; +#endif /* BSDCOMPRESS_SUPPORT || PREDICTOR_SUPPORT */ + +#if MPPE_SUPPORT + if (go->mppe) { + u_char opt_buf[CILEN_MPPE]; + + opt_buf[0] = CI_MPPE; + opt_buf[1] = CILEN_MPPE; + MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]); + if (len < CILEN_MPPE || memcmp(opt_buf, p, CILEN_MPPE)) + return 0; + p += CILEN_MPPE; + len -= CILEN_MPPE; + /* XXX Cope with first/fast ack */ + if (len == 0) + return 1; + } +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT + if (go->deflate) { + if (len < CILEN_DEFLATE + || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) + || p[1] != CILEN_DEFLATE + || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + /* XXX Cope with first/fast ack */ + if (len == 0) + return 1; + if (go->deflate_correct && go->deflate_draft) { + if (len < CILEN_DEFLATE + || p[0] != CI_DEFLATE_DRAFT + || p[1] != CILEN_DEFLATE + || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + } + } +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + if (go->bsd_compress) { + if (len < CILEN_BSD_COMPRESS + || p[0] != CI_BSD_COMPRESS || p[1] != CILEN_BSD_COMPRESS + || p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) + return 0; + p += CILEN_BSD_COMPRESS; + len -= CILEN_BSD_COMPRESS; + /* XXX Cope with first/fast ack */ + if (p == p0 && len == 0) + return 1; + } +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + if (go->predictor_1) { + if (len < CILEN_PREDICTOR_1 + || p[0] != CI_PREDICTOR_1 || p[1] != CILEN_PREDICTOR_1) + return 0; + p += CILEN_PREDICTOR_1; + len -= CILEN_PREDICTOR_1; + /* XXX Cope with first/fast ack */ + if (p == p0 && len == 0) + return 1; + } + if (go->predictor_2) { + if (len < CILEN_PREDICTOR_2 + || p[0] != CI_PREDICTOR_2 || p[1] != CILEN_PREDICTOR_2) + return 0; + p += CILEN_PREDICTOR_2; + len -= CILEN_PREDICTOR_2; + /* XXX Cope with first/fast ack */ + if (p == p0 && len == 0) + return 1; + } +#endif /* PREDICTOR_SUPPORT */ + + if (len != 0) + return 0; + return 1; +} + +/* + * ccp_nakci - process received configure-nak. + * Returns 1 iff the nak was OK. + */ +static int ccp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { + ppp_pcb *pcb = f->pcb; + ccp_options *go = &pcb->ccp_gotoptions; + ccp_options no; /* options we've seen already */ + ccp_options try_; /* options to ask for next time */ + LWIP_UNUSED_ARG(treat_as_reject); +#if !MPPE_SUPPORT && !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT + LWIP_UNUSED_ARG(p); + LWIP_UNUSED_ARG(len); +#endif /* !MPPE_SUPPORT && !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT */ + + memset(&no, 0, sizeof(no)); + try_ = *go; + +#if MPPE_SUPPORT + if (go->mppe && len >= CILEN_MPPE + && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { + no.mppe = 1; + /* + * Peer wants us to use a different strength or other setting. + * Fail if we aren't willing to use his suggestion. + */ + MPPE_CI_TO_OPTS(&p[2], try_.mppe); + if ((try_.mppe & MPPE_OPT_STATEFUL) && pcb->settings.refuse_mppe_stateful) { + ppp_error("Refusing MPPE stateful mode offered by peer"); + try_.mppe = 0; + } else if (((go->mppe | MPPE_OPT_STATEFUL) & try_.mppe) != try_.mppe) { + /* Peer must have set options we didn't request (suggest) */ + try_.mppe = 0; + } + + if (!try_.mppe) { + ppp_error("MPPE required but peer negotiation failed"); + lcp_close(pcb, "MPPE required but peer negotiation failed"); + } + } +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT + if (go->deflate && len >= CILEN_DEFLATE + && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) + && p[1] == CILEN_DEFLATE) { + no.deflate = 1; + /* + * Peer wants us to use a different code size or something. + * Stop asking for Deflate if we don't understand his suggestion. + */ + if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL + || DEFLATE_SIZE(p[2]) < DEFLATE_MIN_WORKS + || p[3] != DEFLATE_CHK_SEQUENCE) + try_.deflate = 0; + else if (DEFLATE_SIZE(p[2]) < go->deflate_size) + try_.deflate_size = DEFLATE_SIZE(p[2]); + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + if (go->deflate_correct && go->deflate_draft + && len >= CILEN_DEFLATE && p[0] == CI_DEFLATE_DRAFT + && p[1] == CILEN_DEFLATE) { + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + } + } +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + if (go->bsd_compress && len >= CILEN_BSD_COMPRESS + && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { + no.bsd_compress = 1; + /* + * Peer wants us to use a different number of bits + * or a different version. + */ + if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION) + try_.bsd_compress = 0; + else if (BSD_NBITS(p[2]) < go->bsd_bits) + try_.bsd_bits = BSD_NBITS(p[2]); + p += CILEN_BSD_COMPRESS; + len -= CILEN_BSD_COMPRESS; + } +#endif /* BSDCOMPRESS_SUPPORT */ + + /* + * Predictor-1 and 2 have no options, so they can't be Naked. + * + * There may be remaining options but we ignore them. + */ + + if (f->state != PPP_FSM_OPENED) + *go = try_; + return 1; +} + +/* + * ccp_rejci - reject some of our suggested compression methods. + */ +static int ccp_rejci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + ccp_options *go = &pcb->ccp_gotoptions; + ccp_options try_; /* options to request next time */ + + try_ = *go; + + /* + * Cope with empty configure-rejects by ceasing to send + * configure-requests. + */ + if (len == 0 && pcb->ccp_all_rejected) + return -1; + +#if MPPE_SUPPORT + if (go->mppe && len >= CILEN_MPPE + && p[0] == CI_MPPE && p[1] == CILEN_MPPE) { + ppp_error("MPPE required but peer refused"); + lcp_close(pcb, "MPPE required but peer refused"); + p += CILEN_MPPE; + len -= CILEN_MPPE; + } +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT + if (go->deflate_correct && len >= CILEN_DEFLATE + && p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) { + if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; /* Rej is bad */ + try_.deflate_correct = 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + } + if (go->deflate_draft && len >= CILEN_DEFLATE + && p[0] == CI_DEFLATE_DRAFT && p[1] == CILEN_DEFLATE) { + if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) + || p[3] != DEFLATE_CHK_SEQUENCE) + return 0; /* Rej is bad */ + try_.deflate_draft = 0; + p += CILEN_DEFLATE; + len -= CILEN_DEFLATE; + } + if (!try_.deflate_correct && !try_.deflate_draft) + try_.deflate = 0; +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + if (go->bsd_compress && len >= CILEN_BSD_COMPRESS + && p[0] == CI_BSD_COMPRESS && p[1] == CILEN_BSD_COMPRESS) { + if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) + return 0; + try_.bsd_compress = 0; + p += CILEN_BSD_COMPRESS; + len -= CILEN_BSD_COMPRESS; + } +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + if (go->predictor_1 && len >= CILEN_PREDICTOR_1 + && p[0] == CI_PREDICTOR_1 && p[1] == CILEN_PREDICTOR_1) { + try_.predictor_1 = 0; + p += CILEN_PREDICTOR_1; + len -= CILEN_PREDICTOR_1; + } + if (go->predictor_2 && len >= CILEN_PREDICTOR_2 + && p[0] == CI_PREDICTOR_2 && p[1] == CILEN_PREDICTOR_2) { + try_.predictor_2 = 0; + p += CILEN_PREDICTOR_2; + len -= CILEN_PREDICTOR_2; + } +#endif /* PREDICTOR_SUPPORT */ + + if (len != 0) + return 0; + + if (f->state != PPP_FSM_OPENED) + *go = try_; + + return 1; +} + +/* + * ccp_reqci - processed a received configure-request. + * Returns CONFACK, CONFNAK or CONFREJ and the packet modified + * appropriately. + */ +static int ccp_reqci(fsm *f, u_char *p, int *lenp, int dont_nak) { + ppp_pcb *pcb = f->pcb; + ccp_options *ho = &pcb->ccp_hisoptions; + ccp_options *ao = &pcb->ccp_allowoptions; + int ret, newret; +#if DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT + int res; + int nb; +#endif /* DEFLATE_SUPPORT || BSDCOMPRESS_SUPPORT */ + u_char *p0, *retp; + int len, clen, type; +#if MPPE_SUPPORT + u8_t rej_for_ci_mppe = 1; /* Are we rejecting based on a bad/missing */ + /* CI_MPPE, or due to other options? */ +#endif /* MPPE_SUPPORT */ + + ret = CONFACK; + retp = p0 = p; + len = *lenp; + + memset(ho, 0, sizeof(ccp_options)); + ho->method = (len > 0)? p[0]: 0; + + while (len > 0) { + newret = CONFACK; + if (len < 2 || p[1] < 2 || p[1] > len) { + /* length is bad */ + clen = len; + newret = CONFREJ; + + } else { + type = p[0]; + clen = p[1]; + + switch (type) { +#if MPPE_SUPPORT + case CI_MPPE: + if (!ao->mppe || clen != CILEN_MPPE) { + newret = CONFREJ; + break; + } + MPPE_CI_TO_OPTS(&p[2], ho->mppe); + + /* Nak if anything unsupported or unknown are set. */ + if (ho->mppe & MPPE_OPT_UNSUPPORTED) { + newret = CONFNAK; + ho->mppe &= ~MPPE_OPT_UNSUPPORTED; + } + if (ho->mppe & MPPE_OPT_UNKNOWN) { + newret = CONFNAK; + ho->mppe &= ~MPPE_OPT_UNKNOWN; + } + + /* Check state opt */ + if (ho->mppe & MPPE_OPT_STATEFUL) { + /* + * We can Nak and request stateless, but it's a + * lot easier to just assume the peer will request + * it if he can do it; stateful mode is bad over + * the Internet -- which is where we expect MPPE. + */ + if (pcb->settings.refuse_mppe_stateful) { + ppp_error("Refusing MPPE stateful mode offered by peer"); + newret = CONFREJ; + break; + } + } + + /* Find out which of {S,L} are set. */ + if ((ho->mppe & MPPE_OPT_128) + && (ho->mppe & MPPE_OPT_40)) { + /* Both are set, negotiate the strongest. */ + newret = CONFNAK; + if (ao->mppe & MPPE_OPT_128) + ho->mppe &= ~MPPE_OPT_40; + else if (ao->mppe & MPPE_OPT_40) + ho->mppe &= ~MPPE_OPT_128; + else { + newret = CONFREJ; + break; + } + } else if (ho->mppe & MPPE_OPT_128) { + if (!(ao->mppe & MPPE_OPT_128)) { + newret = CONFREJ; + break; + } + } else if (ho->mppe & MPPE_OPT_40) { + if (!(ao->mppe & MPPE_OPT_40)) { + newret = CONFREJ; + break; + } + } else { + /* Neither are set. */ + /* We cannot accept this. */ + newret = CONFNAK; + /* Give the peer our idea of what can be used, + so it can choose and confirm */ + ho->mppe = ao->mppe; + } + + /* rebuild the opts */ + MPPE_OPTS_TO_CI(ho->mppe, &p[2]); + if (newret == CONFACK) { + int mtu; + + mppe_init(pcb, &pcb->mppe_comp, ho->mppe); + /* + * We need to decrease the interface MTU by MPPE_PAD + * because MPPE frames **grow**. The kernel [must] + * allocate MPPE_PAD extra bytes in xmit buffers. + */ + mtu = netif_get_mtu(pcb); + if (mtu) + netif_set_mtu(pcb, mtu - MPPE_PAD); + else + newret = CONFREJ; + } + + /* + * We have accepted MPPE or are willing to negotiate + * MPPE parameters. A CONFREJ is due to subsequent + * (non-MPPE) processing. + */ + rej_for_ci_mppe = 0; + break; +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT + case CI_DEFLATE: + case CI_DEFLATE_DRAFT: + if (!ao->deflate || clen != CILEN_DEFLATE + || (!ao->deflate_correct && type == CI_DEFLATE) + || (!ao->deflate_draft && type == CI_DEFLATE_DRAFT)) { + newret = CONFREJ; + break; + } + + ho->deflate = 1; + ho->deflate_size = nb = DEFLATE_SIZE(p[2]); + if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL + || p[3] != DEFLATE_CHK_SEQUENCE + || nb > ao->deflate_size || nb < DEFLATE_MIN_WORKS) { + newret = CONFNAK; + if (!dont_nak) { + p[2] = DEFLATE_MAKE_OPT(ao->deflate_size); + p[3] = DEFLATE_CHK_SEQUENCE; + /* fall through to test this #bits below */ + } else + break; + } + + /* + * Check whether we can do Deflate with the window + * size they want. If the window is too big, reduce + * it until the kernel can cope and nak with that. + * We only check this for the first option. + */ + if (p == p0) { + for (;;) { + res = ccp_test(pcb, p, CILEN_DEFLATE, 1); + if (res > 0) + break; /* it's OK now */ + if (res < 0 || nb == DEFLATE_MIN_WORKS || dont_nak) { + newret = CONFREJ; + p[2] = DEFLATE_MAKE_OPT(ho->deflate_size); + break; + } + newret = CONFNAK; + --nb; + p[2] = DEFLATE_MAKE_OPT(nb); + } + } + break; +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + case CI_BSD_COMPRESS: + if (!ao->bsd_compress || clen != CILEN_BSD_COMPRESS) { + newret = CONFREJ; + break; + } + + ho->bsd_compress = 1; + ho->bsd_bits = nb = BSD_NBITS(p[2]); + if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION + || nb > ao->bsd_bits || nb < BSD_MIN_BITS) { + newret = CONFNAK; + if (!dont_nak) { + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, ao->bsd_bits); + /* fall through to test this #bits below */ + } else + break; + } + + /* + * Check whether we can do BSD-Compress with the code + * size they want. If the code size is too big, reduce + * it until the kernel can cope and nak with that. + * We only check this for the first option. + */ + if (p == p0) { + for (;;) { + res = ccp_test(pcb, p, CILEN_BSD_COMPRESS, 1); + if (res > 0) + break; + if (res < 0 || nb == BSD_MIN_BITS || dont_nak) { + newret = CONFREJ; + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, + ho->bsd_bits); + break; + } + newret = CONFNAK; + --nb; + p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, nb); + } + } + break; +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + case CI_PREDICTOR_1: + if (!ao->predictor_1 || clen != CILEN_PREDICTOR_1) { + newret = CONFREJ; + break; + } + + ho->predictor_1 = 1; + if (p == p0 + && ccp_test(pcb, p, CILEN_PREDICTOR_1, 1) <= 0) { + newret = CONFREJ; + } + break; + + case CI_PREDICTOR_2: + if (!ao->predictor_2 || clen != CILEN_PREDICTOR_2) { + newret = CONFREJ; + break; + } + + ho->predictor_2 = 1; + if (p == p0 + && ccp_test(pcb, p, CILEN_PREDICTOR_2, 1) <= 0) { + newret = CONFREJ; + } + break; +#endif /* PREDICTOR_SUPPORT */ + + default: + newret = CONFREJ; + } + } + + if (newret == CONFNAK && dont_nak) + newret = CONFREJ; + if (!(newret == CONFACK || (newret == CONFNAK && ret == CONFREJ))) { + /* we're returning this option */ + if (newret == CONFREJ && ret == CONFNAK) + retp = p0; + ret = newret; + if (p != retp) + MEMCPY(retp, p, clen); + retp += clen; + } + + p += clen; + len -= clen; + } + + if (ret != CONFACK) { + if (ret == CONFREJ && *lenp == retp - p0) + pcb->ccp_all_rejected = 1; + else + *lenp = retp - p0; + } +#if MPPE_SUPPORT + if (ret == CONFREJ && ao->mppe && rej_for_ci_mppe) { + ppp_error("MPPE required but peer negotiation failed"); + lcp_close(pcb, "MPPE required but peer negotiation failed"); + } +#endif /* MPPE_SUPPORT */ + return ret; +} + +/* + * Make a string name for a compression method (or 2). + */ +static const char *method_name(ccp_options *opt, ccp_options *opt2) { + static char result[64]; +#if !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT + LWIP_UNUSED_ARG(opt2); +#endif /* !DEFLATE_SUPPORT && !BSDCOMPRESS_SUPPORT */ + + if (!ccp_anycompress(opt)) + return "(none)"; + switch (opt->method) { +#if MPPE_SUPPORT + case CI_MPPE: + { + char *p = result; + char *q = result + sizeof(result); /* 1 past result */ + + ppp_slprintf(p, q - p, "MPPE "); + p += 5; + if (opt->mppe & MPPE_OPT_128) { + ppp_slprintf(p, q - p, "128-bit "); + p += 8; + } + if (opt->mppe & MPPE_OPT_40) { + ppp_slprintf(p, q - p, "40-bit "); + p += 7; + } + if (opt->mppe & MPPE_OPT_STATEFUL) + ppp_slprintf(p, q - p, "stateful"); + else + ppp_slprintf(p, q - p, "stateless"); + + break; + } +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT + case CI_DEFLATE: + case CI_DEFLATE_DRAFT: + if (opt2 != NULL && opt2->deflate_size != opt->deflate_size) + ppp_slprintf(result, sizeof(result), "Deflate%s (%d/%d)", + (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), + opt->deflate_size, opt2->deflate_size); + else + ppp_slprintf(result, sizeof(result), "Deflate%s (%d)", + (opt->method == CI_DEFLATE_DRAFT? "(old#)": ""), + opt->deflate_size); + break; +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + case CI_BSD_COMPRESS: + if (opt2 != NULL && opt2->bsd_bits != opt->bsd_bits) + ppp_slprintf(result, sizeof(result), "BSD-Compress (%d/%d)", + opt->bsd_bits, opt2->bsd_bits); + else + ppp_slprintf(result, sizeof(result), "BSD-Compress (%d)", + opt->bsd_bits); + break; +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + case CI_PREDICTOR_1: + return "Predictor 1"; + case CI_PREDICTOR_2: + return "Predictor 2"; +#endif /* PREDICTOR_SUPPORT */ + default: + ppp_slprintf(result, sizeof(result), "Method %d", opt->method); + } + return result; +} + +/* + * CCP has come up - inform the kernel driver and log a message. + */ +static void ccp_up(fsm *f) { + ppp_pcb *pcb = f->pcb; + ccp_options *go = &pcb->ccp_gotoptions; + ccp_options *ho = &pcb->ccp_hisoptions; + char method1[64]; + + ccp_set(pcb, 1, 1, go->method, ho->method); + if (ccp_anycompress(go)) { + if (ccp_anycompress(ho)) { + if (go->method == ho->method) { + ppp_notice("%s compression enabled", method_name(go, ho)); + } else { + ppp_strlcpy(method1, method_name(go, NULL), sizeof(method1)); + ppp_notice("%s / %s compression enabled", + method1, method_name(ho, NULL)); + } + } else + ppp_notice("%s receive compression enabled", method_name(go, NULL)); + } else if (ccp_anycompress(ho)) + ppp_notice("%s transmit compression enabled", method_name(ho, NULL)); +#if MPPE_SUPPORT + if (go->mppe) { + continue_networks(pcb); /* Bring up IP et al */ + } +#endif /* MPPE_SUPPORT */ +} + +/* + * CCP has gone down - inform the kernel driver. + */ +static void ccp_down(fsm *f) { + ppp_pcb *pcb = f->pcb; +#if MPPE_SUPPORT + ccp_options *go = &pcb->ccp_gotoptions; +#endif /* MPPE_SUPPORT */ + + if (pcb->ccp_localstate & RACK_PENDING) + UNTIMEOUT(ccp_rack_timeout, f); + pcb->ccp_localstate = 0; + ccp_set(pcb, 1, 0, 0, 0); +#if MPPE_SUPPORT + if (go->mppe) { + go->mppe = 0; + if (pcb->lcp_fsm.state == PPP_FSM_OPENED) { + /* If LCP is not already going down, make sure it does. */ + ppp_error("MPPE disabled"); + lcp_close(pcb, "MPPE disabled"); + } + } +#endif /* MPPE_SUPPORT */ +} + +#if PRINTPKT_SUPPORT +/* + * Print the contents of a CCP packet. + */ +static const char* const ccp_codenames[] = { + "ConfReq", "ConfAck", "ConfNak", "ConfRej", + "TermReq", "TermAck", "CodeRej", + NULL, NULL, NULL, NULL, NULL, NULL, + "ResetReq", "ResetAck", +}; + +static int ccp_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg) { + const u_char *p0, *optend; + int code, id, len; + int optlen; + + p0 = p; + if (plen < HEADERLEN) + return 0; + code = p[0]; + id = p[1]; + len = (p[2] << 8) + p[3]; + if (len < HEADERLEN || len > plen) + return 0; + + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ccp_codenames) && ccp_codenames[code-1] != NULL) + printer(arg, " %s", ccp_codenames[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= HEADERLEN; + p += HEADERLEN; + + switch (code) { + case CONFREQ: + case CONFACK: + case CONFNAK: + case CONFREJ: + /* print list of possible compression methods */ + while (len >= 2) { + code = p[0]; + optlen = p[1]; + if (optlen < 2 || optlen > len) + break; + printer(arg, " <"); + len -= optlen; + optend = p + optlen; + switch (code) { +#if MPPE_SUPPORT + case CI_MPPE: + if (optlen >= CILEN_MPPE) { + u_char mppe_opts; + + MPPE_CI_TO_OPTS(&p[2], mppe_opts); + printer(arg, "mppe %s %s %s %s %s %s%s", + (p[2] & MPPE_H_BIT)? "+H": "-H", + (p[5] & MPPE_M_BIT)? "+M": "-M", + (p[5] & MPPE_S_BIT)? "+S": "-S", + (p[5] & MPPE_L_BIT)? "+L": "-L", + (p[5] & MPPE_D_BIT)? "+D": "-D", + (p[5] & MPPE_C_BIT)? "+C": "-C", + (mppe_opts & MPPE_OPT_UNKNOWN)? " +U": ""); + if (mppe_opts & MPPE_OPT_UNKNOWN) + printer(arg, " (%.2x %.2x %.2x %.2x)", + p[2], p[3], p[4], p[5]); + p += CILEN_MPPE; + } + break; +#endif /* MPPE_SUPPORT */ +#if DEFLATE_SUPPORT + case CI_DEFLATE: + case CI_DEFLATE_DRAFT: + if (optlen >= CILEN_DEFLATE) { + printer(arg, "deflate%s %d", + (code == CI_DEFLATE_DRAFT? "(old#)": ""), + DEFLATE_SIZE(p[2])); + if (DEFLATE_METHOD(p[2]) != DEFLATE_METHOD_VAL) + printer(arg, " method %d", DEFLATE_METHOD(p[2])); + if (p[3] != DEFLATE_CHK_SEQUENCE) + printer(arg, " check %d", p[3]); + p += CILEN_DEFLATE; + } + break; +#endif /* DEFLATE_SUPPORT */ +#if BSDCOMPRESS_SUPPORT + case CI_BSD_COMPRESS: + if (optlen >= CILEN_BSD_COMPRESS) { + printer(arg, "bsd v%d %d", BSD_VERSION(p[2]), + BSD_NBITS(p[2])); + p += CILEN_BSD_COMPRESS; + } + break; +#endif /* BSDCOMPRESS_SUPPORT */ +#if PREDICTOR_SUPPORT + case CI_PREDICTOR_1: + if (optlen >= CILEN_PREDICTOR_1) { + printer(arg, "predictor 1"); + p += CILEN_PREDICTOR_1; + } + break; + case CI_PREDICTOR_2: + if (optlen >= CILEN_PREDICTOR_2) { + printer(arg, "predictor 2"); + p += CILEN_PREDICTOR_2; + } + break; +#endif /* PREDICTOR_SUPPORT */ + default: + break; + } + while (p < optend) + printer(arg, " %.2x", *p++); + printer(arg, ">"); + } + break; + + case TERMACK: + case TERMREQ: + if (len > 0 && *p >= ' ' && *p < 0x7f) { + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; + default: + break; + } + + /* dump out the rest of the packet in hex */ + while (--len >= 0) + printer(arg, " %.2x", *p++); + + return p - p0; +} +#endif /* PRINTPKT_SUPPORT */ + +#if PPP_DATAINPUT +/* + * We have received a packet that the decompressor failed to + * decompress. Here we would expect to issue a reset-request, but + * Motorola has a patent on resetting the compressor as a result of + * detecting an error in the decompressed data after decompression. + * (See US patent 5,130,993; international patent publication number + * WO 91/10289; Australian patent 73296/91.) + * + * So we ask the kernel whether the error was detected after + * decompression; if it was, we take CCP down, thus disabling + * compression :-(, otherwise we issue the reset-request. + */ +static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len) { + fsm *f; +#if MPPE_SUPPORT + ccp_options *go = &pcb->ccp_gotoptions; +#endif /* MPPE_SUPPORT */ + LWIP_UNUSED_ARG(pkt); + LWIP_UNUSED_ARG(len); + + f = &pcb->ccp_fsm; + if (f->state == PPP_FSM_OPENED) { + if (ccp_fatal_error(pcb)) { + /* + * Disable compression by taking CCP down. + */ + ppp_error("Lost compression sync: disabling compression"); + ccp_close(pcb, "Lost compression sync"); +#if MPPE_SUPPORT + /* + * If we were doing MPPE, we must also take the link down. + */ + if (go->mppe) { + ppp_error("Too many MPPE errors, closing LCP"); + lcp_close(pcb, "Too many MPPE errors"); + } +#endif /* MPPE_SUPPORT */ + } else { + /* + * Send a reset-request to reset the peer's compressor. + * We don't do that if we are still waiting for an + * acknowledgement to a previous reset-request. + */ + if (!(pcb->ccp_localstate & RACK_PENDING)) { + fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); + TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); + pcb->ccp_localstate |= RACK_PENDING; + } else + pcb->ccp_localstate |= RREQ_REPEAT; + } + } +} +#endif /* PPP_DATAINPUT */ + +/* + * We have received a packet that the decompressor failed to + * decompress. Issue a reset-request. + */ +void ccp_resetrequest(ppp_pcb *pcb) { + fsm *f = &pcb->ccp_fsm; + + if (f->state != PPP_FSM_OPENED) + return; + + /* + * Send a reset-request to reset the peer's compressor. + * We don't do that if we are still waiting for an + * acknowledgement to a previous reset-request. + */ + if (!(pcb->ccp_localstate & RACK_PENDING)) { + fsm_sdata(f, CCP_RESETREQ, f->reqid = ++f->id, NULL, 0); + TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); + pcb->ccp_localstate |= RACK_PENDING; + } else + pcb->ccp_localstate |= RREQ_REPEAT; +} + +/* + * Timeout waiting for reset-ack. + */ +static void ccp_rack_timeout(void *arg) { + fsm *f = (fsm*)arg; + ppp_pcb *pcb = f->pcb; + + if (f->state == PPP_FSM_OPENED && (pcb->ccp_localstate & RREQ_REPEAT)) { + fsm_sdata(f, CCP_RESETREQ, f->reqid, NULL, 0); + TIMEOUT(ccp_rack_timeout, f, RACKTIMEOUT); + pcb->ccp_localstate &= ~RREQ_REPEAT; + } else + pcb->ccp_localstate &= ~RACK_PENDING; +} + +#endif /* PPP_SUPPORT && CCP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.c index 88f069f..5a78944 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-md5.c @@ -1,126 +1,126 @@ -/* - * chap-md5.c - New CHAP/MD5 implementation. - * - * Copyright (c) 2003 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#if 0 /* UNUSED */ -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/chap-new.h" -#include "netif/ppp/chap-md5.h" -#include "netif/ppp/magic.h" -#include "netif/ppp/pppcrypt.h" - -#define MD5_HASH_SIZE 16 -#define MD5_MIN_CHALLENGE 17 -#define MD5_MAX_CHALLENGE 24 -#define MD5_MIN_MAX_POWER_OF_TWO_CHALLENGE 3 /* 2^3-1 = 7, 17+7 = 24 */ - -#if PPP_SERVER -static void chap_md5_generate_challenge(ppp_pcb *pcb, unsigned char *cp) { - int clen; - LWIP_UNUSED_ARG(pcb); - - clen = MD5_MIN_CHALLENGE + magic_pow(MD5_MIN_MAX_POWER_OF_TWO_CHALLENGE); - *cp++ = clen; - magic_random_bytes(cp, clen); -} - -static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - lwip_md5_context ctx; - unsigned char idbyte = id; - unsigned char hash[MD5_HASH_SIZE]; - int challenge_len, response_len; - LWIP_UNUSED_ARG(name); - LWIP_UNUSED_ARG(pcb); - - challenge_len = *challenge++; - response_len = *response++; - if (response_len == MD5_HASH_SIZE) { - /* Generate hash of ID, secret, challenge */ - lwip_md5_init(&ctx); - lwip_md5_starts(&ctx); - lwip_md5_update(&ctx, &idbyte, 1); - lwip_md5_update(&ctx, secret, secret_len); - lwip_md5_update(&ctx, challenge, challenge_len); - lwip_md5_finish(&ctx, hash); - lwip_md5_free(&ctx); - - /* Test if our hash matches the peer's response */ - if (memcmp(hash, response, MD5_HASH_SIZE) == 0) { - ppp_slprintf(message, message_space, "Access granted"); - return 1; - } - } - ppp_slprintf(message, message_space, "Access denied"); - return 0; -} -#endif /* PPP_SERVER */ - -static void chap_md5_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *private_) { - lwip_md5_context ctx; - unsigned char idbyte = id; - int challenge_len = *challenge++; - LWIP_UNUSED_ARG(our_name); - LWIP_UNUSED_ARG(private_); - LWIP_UNUSED_ARG(pcb); - - lwip_md5_init(&ctx); - lwip_md5_starts(&ctx); - lwip_md5_update(&ctx, &idbyte, 1); - lwip_md5_update(&ctx, (const u_char *)secret, secret_len); - lwip_md5_update(&ctx, challenge, challenge_len); - lwip_md5_finish(&ctx, &response[1]); - lwip_md5_free(&ctx); - response[0] = MD5_HASH_SIZE; -} - -const struct chap_digest_type md5_digest = { - CHAP_MD5, /* code */ -#if PPP_SERVER - chap_md5_generate_challenge, - chap_md5_verify_response, -#endif /* PPP_SERVER */ - chap_md5_make_response, - NULL, /* check_success */ - NULL, /* handle_failure */ -}; - -#endif /* PPP_SUPPORT && CHAP_SUPPORT */ +/* + * chap-md5.c - New CHAP/MD5 implementation. + * + * Copyright (c) 2003 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#if 0 /* UNUSED */ +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/chap-new.h" +#include "netif/ppp/chap-md5.h" +#include "netif/ppp/magic.h" +#include "netif/ppp/pppcrypt.h" + +#define MD5_HASH_SIZE 16 +#define MD5_MIN_CHALLENGE 17 +#define MD5_MAX_CHALLENGE 24 +#define MD5_MIN_MAX_POWER_OF_TWO_CHALLENGE 3 /* 2^3-1 = 7, 17+7 = 24 */ + +#if PPP_SERVER +static void chap_md5_generate_challenge(ppp_pcb *pcb, unsigned char *cp) { + int clen; + LWIP_UNUSED_ARG(pcb); + + clen = MD5_MIN_CHALLENGE + magic_pow(MD5_MIN_MAX_POWER_OF_TWO_CHALLENGE); + *cp++ = clen; + magic_random_bytes(cp, clen); +} + +static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name, + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + lwip_md5_context ctx; + unsigned char idbyte = id; + unsigned char hash[MD5_HASH_SIZE]; + int challenge_len, response_len; + LWIP_UNUSED_ARG(name); + LWIP_UNUSED_ARG(pcb); + + challenge_len = *challenge++; + response_len = *response++; + if (response_len == MD5_HASH_SIZE) { + /* Generate hash of ID, secret, challenge */ + lwip_md5_init(&ctx); + lwip_md5_starts(&ctx); + lwip_md5_update(&ctx, &idbyte, 1); + lwip_md5_update(&ctx, secret, secret_len); + lwip_md5_update(&ctx, challenge, challenge_len); + lwip_md5_finish(&ctx, hash); + lwip_md5_free(&ctx); + + /* Test if our hash matches the peer's response */ + if (memcmp(hash, response, MD5_HASH_SIZE) == 0) { + ppp_slprintf(message, message_space, "Access granted"); + return 1; + } + } + ppp_slprintf(message, message_space, "Access denied"); + return 0; +} +#endif /* PPP_SERVER */ + +static void chap_md5_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *private_) { + lwip_md5_context ctx; + unsigned char idbyte = id; + int challenge_len = *challenge++; + LWIP_UNUSED_ARG(our_name); + LWIP_UNUSED_ARG(private_); + LWIP_UNUSED_ARG(pcb); + + lwip_md5_init(&ctx); + lwip_md5_starts(&ctx); + lwip_md5_update(&ctx, &idbyte, 1); + lwip_md5_update(&ctx, (const u_char *)secret, secret_len); + lwip_md5_update(&ctx, challenge, challenge_len); + lwip_md5_finish(&ctx, &response[1]); + lwip_md5_free(&ctx); + response[0] = MD5_HASH_SIZE; +} + +const struct chap_digest_type md5_digest = { + CHAP_MD5, /* code */ +#if PPP_SERVER + chap_md5_generate_challenge, + chap_md5_verify_response, +#endif /* PPP_SERVER */ + chap_md5_make_response, + NULL, /* check_success */ + NULL, /* handle_failure */ +}; + +#endif /* PPP_SUPPORT && CHAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.c index 485122d..486d7e1 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap-new.c @@ -1,677 +1,677 @@ -/* - * chap-new.c - New CHAP implementation. - * - * Copyright (c) 2003 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#if 0 /* UNUSED */ -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#if 0 /* UNUSED */ -#include "session.h" -#endif /* UNUSED */ - -#include "netif/ppp/chap-new.h" -#include "netif/ppp/chap-md5.h" -#if MSCHAP_SUPPORT -#include "netif/ppp/chap_ms.h" -#endif -#include "netif/ppp/magic.h" - -#if 0 /* UNUSED */ -/* Hook for a plugin to validate CHAP challenge */ -int (*chap_verify_hook)(const char *name, const char *ourname, int id, - const struct chap_digest_type *digest, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) = NULL; -#endif /* UNUSED */ - -#if PPP_OPTIONS -/* - * Command-line options. - */ -static option_t chap_option_list[] = { - { "chap-restart", o_int, &chap_timeout_time, - "Set timeout for CHAP", OPT_PRIO }, - { "chap-max-challenge", o_int, &pcb->settings.chap_max_transmits, - "Set max #xmits for challenge", OPT_PRIO }, - { "chap-interval", o_int, &pcb->settings.chap_rechallenge_time, - "Set interval for rechallenge", OPT_PRIO }, - { NULL } -}; -#endif /* PPP_OPTIONS */ - - -/* Values for flags in chap_client_state and chap_server_state */ -#define LOWERUP 1 -#define AUTH_STARTED 2 -#define AUTH_DONE 4 -#define AUTH_FAILED 8 -#define TIMEOUT_PENDING 0x10 -#define CHALLENGE_VALID 0x20 - -/* - * Prototypes. - */ -static void chap_init(ppp_pcb *pcb); -static void chap_lowerup(ppp_pcb *pcb); -static void chap_lowerdown(ppp_pcb *pcb); -#if PPP_SERVER -static void chap_timeout(void *arg); -static void chap_generate_challenge(ppp_pcb *pcb); -static void chap_handle_response(ppp_pcb *pcb, int code, - unsigned char *pkt, int len); -static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourname, int id, - const struct chap_digest_type *digest, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space); -#endif /* PPP_SERVER */ -static void chap_respond(ppp_pcb *pcb, int id, - unsigned char *pkt, int len); -static void chap_handle_status(ppp_pcb *pcb, int code, int id, - unsigned char *pkt, int len); -static void chap_protrej(ppp_pcb *pcb); -static void chap_input(ppp_pcb *pcb, unsigned char *pkt, int pktlen); -#if PRINTPKT_SUPPORT -static int chap_print_pkt(const unsigned char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg); -#endif /* PRINTPKT_SUPPORT */ - -/* List of digest types that we know about */ -static const struct chap_digest_type* const chap_digests[] = { - &md5_digest, -#if MSCHAP_SUPPORT - &chapms_digest, - &chapms2_digest, -#endif /* MSCHAP_SUPPORT */ - NULL -}; - -/* - * chap_init - reset to initial state. - */ -static void chap_init(ppp_pcb *pcb) { - LWIP_UNUSED_ARG(pcb); - -#if 0 /* Not necessary, everything is cleared in ppp_new() */ - memset(&pcb->chap_client, 0, sizeof(chap_client_state)); -#if PPP_SERVER - memset(&pcb->chap_server, 0, sizeof(chap_server_state)); -#endif /* PPP_SERVER */ -#endif /* 0 */ -} - -/* - * chap_lowerup - we can start doing stuff now. - */ -static void chap_lowerup(ppp_pcb *pcb) { - - pcb->chap_client.flags |= LOWERUP; -#if PPP_SERVER - pcb->chap_server.flags |= LOWERUP; - if (pcb->chap_server.flags & AUTH_STARTED) - chap_timeout(pcb); -#endif /* PPP_SERVER */ -} - -static void chap_lowerdown(ppp_pcb *pcb) { - - pcb->chap_client.flags = 0; -#if PPP_SERVER - if (pcb->chap_server.flags & TIMEOUT_PENDING) - UNTIMEOUT(chap_timeout, pcb); - pcb->chap_server.flags = 0; -#endif /* PPP_SERVER */ -} - -#if PPP_SERVER -/* - * chap_auth_peer - Start authenticating the peer. - * If the lower layer is already up, we start sending challenges, - * otherwise we wait for the lower layer to come up. - */ -void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { - const struct chap_digest_type *dp; - int i; - - if (pcb->chap_server.flags & AUTH_STARTED) { - ppp_error("CHAP: peer authentication already started!"); - return; - } - for (i = 0; (dp = chap_digests[i]) != NULL; ++i) - if (dp->code == digest_code) - break; - if (dp == NULL) - ppp_fatal("CHAP digest 0x%x requested but not available", - digest_code); - - pcb->chap_server.digest = dp; - pcb->chap_server.name = our_name; - /* Start with a random ID value */ - pcb->chap_server.id = magic(); - pcb->chap_server.flags |= AUTH_STARTED; - if (pcb->chap_server.flags & LOWERUP) - chap_timeout(pcb); -} -#endif /* PPP_SERVER */ - -/* - * chap_auth_with_peer - Prepare to authenticate ourselves to the peer. - * There isn't much to do until we receive a challenge. - */ -void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { - const struct chap_digest_type *dp; - int i; - - if(NULL == our_name) - return; - - if (pcb->chap_client.flags & AUTH_STARTED) { - ppp_error("CHAP: authentication with peer already started!"); - return; - } - for (i = 0; (dp = chap_digests[i]) != NULL; ++i) - if (dp->code == digest_code) - break; - - if (dp == NULL) - ppp_fatal("CHAP digest 0x%x requested but not available", - digest_code); - - pcb->chap_client.digest = dp; - pcb->chap_client.name = our_name; - pcb->chap_client.flags |= AUTH_STARTED; -} - -#if PPP_SERVER -/* - * chap_timeout - It's time to send another challenge to the peer. - * This could be either a retransmission of a previous challenge, - * or a new challenge to start re-authentication. - */ -static void chap_timeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - struct pbuf *p; - - pcb->chap_server.flags &= ~TIMEOUT_PENDING; - if ((pcb->chap_server.flags & CHALLENGE_VALID) == 0) { - pcb->chap_server.challenge_xmits = 0; - chap_generate_challenge(pcb); - pcb->chap_server.flags |= CHALLENGE_VALID; - } else if (pcb->chap_server.challenge_xmits >= pcb->settings.chap_max_transmits) { - pcb->chap_server.flags &= ~CHALLENGE_VALID; - pcb->chap_server.flags |= AUTH_DONE | AUTH_FAILED; - auth_peer_fail(pcb, PPP_CHAP); - return; - } - - p = pbuf_alloc(PBUF_RAW, (u16_t)(pcb->chap_server.challenge_pktlen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - MEMCPY(p->payload, pcb->chap_server.challenge, pcb->chap_server.challenge_pktlen); - ppp_write(pcb, p); - ++pcb->chap_server.challenge_xmits; - pcb->chap_server.flags |= TIMEOUT_PENDING; - TIMEOUT(chap_timeout, arg, pcb->settings.chap_timeout_time); -} - -/* - * chap_generate_challenge - generate a challenge string and format - * the challenge packet in pcb->chap_server.challenge_pkt. - */ -static void chap_generate_challenge(ppp_pcb *pcb) { - int clen = 1, nlen, len; - unsigned char *p; - - p = pcb->chap_server.challenge; - MAKEHEADER(p, PPP_CHAP); - p += CHAP_HDRLEN; - pcb->chap_server.digest->generate_challenge(pcb, p); - clen = *p; - nlen = strlen(pcb->chap_server.name); - memcpy(p + 1 + clen, pcb->chap_server.name, nlen); - - len = CHAP_HDRLEN + 1 + clen + nlen; - pcb->chap_server.challenge_pktlen = PPP_HDRLEN + len; - - p = pcb->chap_server.challenge + PPP_HDRLEN; - p[0] = CHAP_CHALLENGE; - p[1] = ++pcb->chap_server.id; - p[2] = len >> 8; - p[3] = len; -} - -/* - * chap_handle_response - check the response to our challenge. - */ -static void chap_handle_response(ppp_pcb *pcb, int id, - unsigned char *pkt, int len) { - int response_len, ok, mlen; - const unsigned char *response; - unsigned char *outp; - struct pbuf *p; - const char *name = NULL; /* initialized to shut gcc up */ -#if 0 /* UNUSED */ - int (*verifier)(const char *, const char *, int, const struct chap_digest_type *, - const unsigned char *, const unsigned char *, char *, int); -#endif /* UNUSED */ - char rname[MAXNAMELEN+1]; - char message[256]; - - if ((pcb->chap_server.flags & LOWERUP) == 0) - return; - if (id != pcb->chap_server.challenge[PPP_HDRLEN+1] || len < 2) - return; - if (pcb->chap_server.flags & CHALLENGE_VALID) { - response = pkt; - GETCHAR(response_len, pkt); - len -= response_len + 1; /* length of name */ - name = (char *)pkt + response_len; - if (len < 0) - return; - - if (pcb->chap_server.flags & TIMEOUT_PENDING) { - pcb->chap_server.flags &= ~TIMEOUT_PENDING; - UNTIMEOUT(chap_timeout, pcb); - } -#if PPP_REMOTENAME - if (pcb->settings.explicit_remote) { - name = pcb->remote_name; - } else -#endif /* PPP_REMOTENAME */ - { - /* Null terminate and clean remote name. */ - ppp_slprintf(rname, sizeof(rname), "%.*v", len, name); - name = rname; - } - -#if 0 /* UNUSED */ - if (chap_verify_hook) - verifier = chap_verify_hook; - else - verifier = chap_verify_response; - ok = (*verifier)(name, pcb->chap_server.name, id, pcb->chap_server.digest, - pcb->chap_server.challenge + PPP_HDRLEN + CHAP_HDRLEN, - response, pcb->chap_server.message, sizeof(pcb->chap_server.message)); -#endif /* UNUSED */ - ok = chap_verify_response(pcb, name, pcb->chap_server.name, id, pcb->chap_server.digest, - pcb->chap_server.challenge + PPP_HDRLEN + CHAP_HDRLEN, - response, message, sizeof(message)); -#if 0 /* UNUSED */ - if (!ok || !auth_number()) { -#endif /* UNUSED */ - if (!ok) { - pcb->chap_server.flags |= AUTH_FAILED; - ppp_warn("Peer %q failed CHAP authentication", name); - } - } else if ((pcb->chap_server.flags & AUTH_DONE) == 0) - return; - - /* send the response */ - mlen = strlen(message); - len = CHAP_HDRLEN + mlen; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +len), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (unsigned char *)p->payload; - MAKEHEADER(outp, PPP_CHAP); - - outp[0] = (pcb->chap_server.flags & AUTH_FAILED)? CHAP_FAILURE: CHAP_SUCCESS; - outp[1] = id; - outp[2] = len >> 8; - outp[3] = len; - if (mlen > 0) - memcpy(outp + CHAP_HDRLEN, message, mlen); - ppp_write(pcb, p); - - if (pcb->chap_server.flags & CHALLENGE_VALID) { - pcb->chap_server.flags &= ~CHALLENGE_VALID; - if (!(pcb->chap_server.flags & AUTH_DONE) && !(pcb->chap_server.flags & AUTH_FAILED)) { - -#if 0 /* UNUSED */ - /* - * Auth is OK, so now we need to check session restrictions - * to ensure everything is OK, but only if we used a - * plugin, and only if we're configured to check. This - * allows us to do PAM checks on PPP servers that - * authenticate against ActiveDirectory, and use AD for - * account info (like when using Winbind integrated with - * PAM). - */ - if (session_mgmt && - session_check(name, NULL, devnam, NULL) == 0) { - pcb->chap_server.flags |= AUTH_FAILED; - ppp_warn("Peer %q failed CHAP Session verification", name); - } -#endif /* UNUSED */ - - } - if (pcb->chap_server.flags & AUTH_FAILED) { - auth_peer_fail(pcb, PPP_CHAP); - } else { - if ((pcb->chap_server.flags & AUTH_DONE) == 0) - auth_peer_success(pcb, PPP_CHAP, - pcb->chap_server.digest->code, - name, strlen(name)); - if (pcb->settings.chap_rechallenge_time) { - pcb->chap_server.flags |= TIMEOUT_PENDING; - TIMEOUT(chap_timeout, pcb, - pcb->settings.chap_rechallenge_time); - } - } - pcb->chap_server.flags |= AUTH_DONE; - } -} - -/* - * chap_verify_response - check whether the peer's response matches - * what we think it should be. Returns 1 if it does (authentication - * succeeded), or 0 if it doesn't. - */ -static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourname, int id, - const struct chap_digest_type *digest, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - int ok; - unsigned char secret[MAXSECRETLEN]; - int secret_len; - - /* Get the secret that the peer is supposed to know */ - if (!get_secret(pcb, name, ourname, (char *)secret, &secret_len, 1)) { - ppp_error("No CHAP secret found for authenticating %q", name); - return 0; - } - ok = digest->verify_response(pcb, id, name, secret, secret_len, challenge, - response, message, message_space); - memset(secret, 0, sizeof(secret)); - - return ok; -} -#endif /* PPP_SERVER */ - -/* - * chap_respond - Generate and send a response to a challenge. - */ -static void chap_respond(ppp_pcb *pcb, int id, - unsigned char *pkt, int len) { - int clen, nlen; - int secret_len; - struct pbuf *p; - u_char *outp; - char rname[MAXNAMELEN+1]; - char secret[MAXSECRETLEN+1]; - - p = pbuf_alloc(PBUF_RAW, (u16_t)(RESP_MAX_PKTLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - if ((pcb->chap_client.flags & (LOWERUP | AUTH_STARTED)) != (LOWERUP | AUTH_STARTED)) - return; /* not ready */ - if (len < 2 || len < pkt[0] + 1) - return; /* too short */ - clen = pkt[0]; - nlen = len - (clen + 1); - - /* Null terminate and clean remote name. */ - ppp_slprintf(rname, sizeof(rname), "%.*v", nlen, pkt + clen + 1); - -#if PPP_REMOTENAME - /* Microsoft doesn't send their name back in the PPP packet */ - if (pcb->settings.explicit_remote || (pcb->settings.remote_name[0] != 0 && rname[0] == 0)) - strlcpy(rname, pcb->settings.remote_name, sizeof(rname)); -#endif /* PPP_REMOTENAME */ - - /* get secret for authenticating ourselves with the specified host */ - if (!get_secret(pcb, pcb->chap_client.name, rname, secret, &secret_len, 0)) { - secret_len = 0; /* assume null secret if can't find one */ - ppp_warn("No CHAP secret found for authenticating us to %q", rname); - } - - outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_CHAP); - outp += CHAP_HDRLEN; - - pcb->chap_client.digest->make_response(pcb, outp, id, pcb->chap_client.name, pkt, - secret, secret_len, pcb->chap_client.priv); - memset(secret, 0, secret_len); - - clen = *outp; - nlen = strlen(pcb->chap_client.name); - memcpy(outp + clen + 1, pcb->chap_client.name, nlen); - - outp = (u_char*)p->payload + PPP_HDRLEN; - len = CHAP_HDRLEN + clen + 1 + nlen; - outp[0] = CHAP_RESPONSE; - outp[1] = id; - outp[2] = len >> 8; - outp[3] = len; - - pbuf_realloc(p, PPP_HDRLEN + len); - ppp_write(pcb, p); -} - -static void chap_handle_status(ppp_pcb *pcb, int code, int id, - unsigned char *pkt, int len) { - const char *msg = NULL; - LWIP_UNUSED_ARG(id); - - if ((pcb->chap_client.flags & (AUTH_DONE|AUTH_STARTED|LOWERUP)) - != (AUTH_STARTED|LOWERUP)) - return; - pcb->chap_client.flags |= AUTH_DONE; - - if (code == CHAP_SUCCESS) { - /* used for MS-CHAP v2 mutual auth, yuck */ - if (pcb->chap_client.digest->check_success != NULL) { - if (!(*pcb->chap_client.digest->check_success)(pcb, pkt, len, pcb->chap_client.priv)) - code = CHAP_FAILURE; - } else - msg = "CHAP authentication succeeded"; - } else { - if (pcb->chap_client.digest->handle_failure != NULL) - (*pcb->chap_client.digest->handle_failure)(pcb, pkt, len); - else - msg = "CHAP authentication failed"; - } - if (msg) { - if (len > 0) - ppp_info("%s: %.*v", msg, len, pkt); - else - ppp_info("%s", msg); - } - if (code == CHAP_SUCCESS) - auth_withpeer_success(pcb, PPP_CHAP, pcb->chap_client.digest->code); - else { - pcb->chap_client.flags |= AUTH_FAILED; - ppp_error("CHAP authentication failed"); - auth_withpeer_fail(pcb, PPP_CHAP); - } -} - -static void chap_input(ppp_pcb *pcb, unsigned char *pkt, int pktlen) { - unsigned char code, id; - int len; - - if (pktlen < CHAP_HDRLEN) - return; - GETCHAR(code, pkt); - GETCHAR(id, pkt); - GETSHORT(len, pkt); - if (len < CHAP_HDRLEN || len > pktlen) - return; - len -= CHAP_HDRLEN; - - switch (code) { - case CHAP_CHALLENGE: - chap_respond(pcb, id, pkt, len); - break; -#if PPP_SERVER - case CHAP_RESPONSE: - chap_handle_response(pcb, id, pkt, len); - break; -#endif /* PPP_SERVER */ - case CHAP_FAILURE: - case CHAP_SUCCESS: - chap_handle_status(pcb, code, id, pkt, len); - break; - default: - break; - } -} - -static void chap_protrej(ppp_pcb *pcb) { - -#if PPP_SERVER - if (pcb->chap_server.flags & TIMEOUT_PENDING) { - pcb->chap_server.flags &= ~TIMEOUT_PENDING; - UNTIMEOUT(chap_timeout, pcb); - } - if (pcb->chap_server.flags & AUTH_STARTED) { - pcb->chap_server.flags = 0; - auth_peer_fail(pcb, PPP_CHAP); - } -#endif /* PPP_SERVER */ - if ((pcb->chap_client.flags & (AUTH_STARTED|AUTH_DONE)) == AUTH_STARTED) { - pcb->chap_client.flags &= ~AUTH_STARTED; - ppp_error("CHAP authentication failed due to protocol-reject"); - auth_withpeer_fail(pcb, PPP_CHAP); - } -} - -#if PRINTPKT_SUPPORT -/* - * chap_print_pkt - print the contents of a CHAP packet. - */ -static const char* const chap_code_names[] = { - "Challenge", "Response", "Success", "Failure" -}; - -static int chap_print_pkt(const unsigned char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg) { - int code, id, len; - int clen, nlen; - unsigned char x; - - if (plen < CHAP_HDRLEN) - return 0; - GETCHAR(code, p); - GETCHAR(id, p); - GETSHORT(len, p); - if (len < CHAP_HDRLEN || len > plen) - return 0; - - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(chap_code_names)) - printer(arg, " %s", chap_code_names[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= CHAP_HDRLEN; - switch (code) { - case CHAP_CHALLENGE: - case CHAP_RESPONSE: - if (len < 1) - break; - clen = p[0]; - if (len < clen + 1) - break; - ++p; - nlen = len - clen - 1; - printer(arg, " <"); - for (; clen > 0; --clen) { - GETCHAR(x, p); - printer(arg, "%.2x", x); - } - printer(arg, ">, name = "); - ppp_print_string(p, nlen, printer, arg); - break; - case CHAP_FAILURE: - case CHAP_SUCCESS: - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - break; - default: - for (clen = len; clen > 0; --clen) { - GETCHAR(x, p); - printer(arg, " %.2x", x); - } - /* no break */ - } - - return len + CHAP_HDRLEN; -} -#endif /* PRINTPKT_SUPPORT */ - -const struct protent chap_protent = { - PPP_CHAP, - chap_init, - chap_input, - chap_protrej, - chap_lowerup, - chap_lowerdown, - NULL, /* open */ - NULL, /* close */ -#if PRINTPKT_SUPPORT - chap_print_pkt, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - NULL, /* datainput */ -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "CHAP", /* name */ - NULL, /* data_name */ -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - chap_option_list, - NULL, /* check_options */ -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - NULL, - NULL -#endif /* DEMAND_SUPPORT */ -}; - -#endif /* PPP_SUPPORT && CHAP_SUPPORT */ +/* + * chap-new.c - New CHAP implementation. + * + * Copyright (c) 2003 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#if 0 /* UNUSED */ +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#if 0 /* UNUSED */ +#include "session.h" +#endif /* UNUSED */ + +#include "netif/ppp/chap-new.h" +#include "netif/ppp/chap-md5.h" +#if MSCHAP_SUPPORT +#include "netif/ppp/chap_ms.h" +#endif +#include "netif/ppp/magic.h" + +#if 0 /* UNUSED */ +/* Hook for a plugin to validate CHAP challenge */ +int (*chap_verify_hook)(const char *name, const char *ourname, int id, + const struct chap_digest_type *digest, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) = NULL; +#endif /* UNUSED */ + +#if PPP_OPTIONS +/* + * Command-line options. + */ +static option_t chap_option_list[] = { + { "chap-restart", o_int, &chap_timeout_time, + "Set timeout for CHAP", OPT_PRIO }, + { "chap-max-challenge", o_int, &pcb->settings.chap_max_transmits, + "Set max #xmits for challenge", OPT_PRIO }, + { "chap-interval", o_int, &pcb->settings.chap_rechallenge_time, + "Set interval for rechallenge", OPT_PRIO }, + { NULL } +}; +#endif /* PPP_OPTIONS */ + + +/* Values for flags in chap_client_state and chap_server_state */ +#define LOWERUP 1 +#define AUTH_STARTED 2 +#define AUTH_DONE 4 +#define AUTH_FAILED 8 +#define TIMEOUT_PENDING 0x10 +#define CHALLENGE_VALID 0x20 + +/* + * Prototypes. + */ +static void chap_init(ppp_pcb *pcb); +static void chap_lowerup(ppp_pcb *pcb); +static void chap_lowerdown(ppp_pcb *pcb); +#if PPP_SERVER +static void chap_timeout(void *arg); +static void chap_generate_challenge(ppp_pcb *pcb); +static void chap_handle_response(ppp_pcb *pcb, int code, + unsigned char *pkt, int len); +static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourname, int id, + const struct chap_digest_type *digest, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space); +#endif /* PPP_SERVER */ +static void chap_respond(ppp_pcb *pcb, int id, + unsigned char *pkt, int len); +static void chap_handle_status(ppp_pcb *pcb, int code, int id, + unsigned char *pkt, int len); +static void chap_protrej(ppp_pcb *pcb); +static void chap_input(ppp_pcb *pcb, unsigned char *pkt, int pktlen); +#if PRINTPKT_SUPPORT +static int chap_print_pkt(const unsigned char *p, int plen, + void (*printer) (void *, const char *, ...), void *arg); +#endif /* PRINTPKT_SUPPORT */ + +/* List of digest types that we know about */ +static const struct chap_digest_type* const chap_digests[] = { + &md5_digest, +#if MSCHAP_SUPPORT + &chapms_digest, + &chapms2_digest, +#endif /* MSCHAP_SUPPORT */ + NULL +}; + +/* + * chap_init - reset to initial state. + */ +static void chap_init(ppp_pcb *pcb) { + LWIP_UNUSED_ARG(pcb); + +#if 0 /* Not necessary, everything is cleared in ppp_new() */ + memset(&pcb->chap_client, 0, sizeof(chap_client_state)); +#if PPP_SERVER + memset(&pcb->chap_server, 0, sizeof(chap_server_state)); +#endif /* PPP_SERVER */ +#endif /* 0 */ +} + +/* + * chap_lowerup - we can start doing stuff now. + */ +static void chap_lowerup(ppp_pcb *pcb) { + + pcb->chap_client.flags |= LOWERUP; +#if PPP_SERVER + pcb->chap_server.flags |= LOWERUP; + if (pcb->chap_server.flags & AUTH_STARTED) + chap_timeout(pcb); +#endif /* PPP_SERVER */ +} + +static void chap_lowerdown(ppp_pcb *pcb) { + + pcb->chap_client.flags = 0; +#if PPP_SERVER + if (pcb->chap_server.flags & TIMEOUT_PENDING) + UNTIMEOUT(chap_timeout, pcb); + pcb->chap_server.flags = 0; +#endif /* PPP_SERVER */ +} + +#if PPP_SERVER +/* + * chap_auth_peer - Start authenticating the peer. + * If the lower layer is already up, we start sending challenges, + * otherwise we wait for the lower layer to come up. + */ +void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { + const struct chap_digest_type *dp; + int i; + + if (pcb->chap_server.flags & AUTH_STARTED) { + ppp_error("CHAP: peer authentication already started!"); + return; + } + for (i = 0; (dp = chap_digests[i]) != NULL; ++i) + if (dp->code == digest_code) + break; + if (dp == NULL) + ppp_fatal("CHAP digest 0x%x requested but not available", + digest_code); + + pcb->chap_server.digest = dp; + pcb->chap_server.name = our_name; + /* Start with a random ID value */ + pcb->chap_server.id = magic(); + pcb->chap_server.flags |= AUTH_STARTED; + if (pcb->chap_server.flags & LOWERUP) + chap_timeout(pcb); +} +#endif /* PPP_SERVER */ + +/* + * chap_auth_with_peer - Prepare to authenticate ourselves to the peer. + * There isn't much to do until we receive a challenge. + */ +void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { + const struct chap_digest_type *dp; + int i; + + if(NULL == our_name) + return; + + if (pcb->chap_client.flags & AUTH_STARTED) { + ppp_error("CHAP: authentication with peer already started!"); + return; + } + for (i = 0; (dp = chap_digests[i]) != NULL; ++i) + if (dp->code == digest_code) + break; + + if (dp == NULL) + ppp_fatal("CHAP digest 0x%x requested but not available", + digest_code); + + pcb->chap_client.digest = dp; + pcb->chap_client.name = our_name; + pcb->chap_client.flags |= AUTH_STARTED; +} + +#if PPP_SERVER +/* + * chap_timeout - It's time to send another challenge to the peer. + * This could be either a retransmission of a previous challenge, + * or a new challenge to start re-authentication. + */ +static void chap_timeout(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + struct pbuf *p; + + pcb->chap_server.flags &= ~TIMEOUT_PENDING; + if ((pcb->chap_server.flags & CHALLENGE_VALID) == 0) { + pcb->chap_server.challenge_xmits = 0; + chap_generate_challenge(pcb); + pcb->chap_server.flags |= CHALLENGE_VALID; + } else if (pcb->chap_server.challenge_xmits >= pcb->settings.chap_max_transmits) { + pcb->chap_server.flags &= ~CHALLENGE_VALID; + pcb->chap_server.flags |= AUTH_DONE | AUTH_FAILED; + auth_peer_fail(pcb, PPP_CHAP); + return; + } + + p = pbuf_alloc(PBUF_RAW, (u16_t)(pcb->chap_server.challenge_pktlen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + MEMCPY(p->payload, pcb->chap_server.challenge, pcb->chap_server.challenge_pktlen); + ppp_write(pcb, p); + ++pcb->chap_server.challenge_xmits; + pcb->chap_server.flags |= TIMEOUT_PENDING; + TIMEOUT(chap_timeout, arg, pcb->settings.chap_timeout_time); +} + +/* + * chap_generate_challenge - generate a challenge string and format + * the challenge packet in pcb->chap_server.challenge_pkt. + */ +static void chap_generate_challenge(ppp_pcb *pcb) { + int clen = 1, nlen, len; + unsigned char *p; + + p = pcb->chap_server.challenge; + MAKEHEADER(p, PPP_CHAP); + p += CHAP_HDRLEN; + pcb->chap_server.digest->generate_challenge(pcb, p); + clen = *p; + nlen = strlen(pcb->chap_server.name); + memcpy(p + 1 + clen, pcb->chap_server.name, nlen); + + len = CHAP_HDRLEN + 1 + clen + nlen; + pcb->chap_server.challenge_pktlen = PPP_HDRLEN + len; + + p = pcb->chap_server.challenge + PPP_HDRLEN; + p[0] = CHAP_CHALLENGE; + p[1] = ++pcb->chap_server.id; + p[2] = len >> 8; + p[3] = len; +} + +/* + * chap_handle_response - check the response to our challenge. + */ +static void chap_handle_response(ppp_pcb *pcb, int id, + unsigned char *pkt, int len) { + int response_len, ok, mlen; + const unsigned char *response; + unsigned char *outp; + struct pbuf *p; + const char *name = NULL; /* initialized to shut gcc up */ +#if 0 /* UNUSED */ + int (*verifier)(const char *, const char *, int, const struct chap_digest_type *, + const unsigned char *, const unsigned char *, char *, int); +#endif /* UNUSED */ + char rname[MAXNAMELEN+1]; + char message[256]; + + if ((pcb->chap_server.flags & LOWERUP) == 0) + return; + if (id != pcb->chap_server.challenge[PPP_HDRLEN+1] || len < 2) + return; + if (pcb->chap_server.flags & CHALLENGE_VALID) { + response = pkt; + GETCHAR(response_len, pkt); + len -= response_len + 1; /* length of name */ + name = (char *)pkt + response_len; + if (len < 0) + return; + + if (pcb->chap_server.flags & TIMEOUT_PENDING) { + pcb->chap_server.flags &= ~TIMEOUT_PENDING; + UNTIMEOUT(chap_timeout, pcb); + } +#if PPP_REMOTENAME + if (pcb->settings.explicit_remote) { + name = pcb->remote_name; + } else +#endif /* PPP_REMOTENAME */ + { + /* Null terminate and clean remote name. */ + ppp_slprintf(rname, sizeof(rname), "%.*v", len, name); + name = rname; + } + +#if 0 /* UNUSED */ + if (chap_verify_hook) + verifier = chap_verify_hook; + else + verifier = chap_verify_response; + ok = (*verifier)(name, pcb->chap_server.name, id, pcb->chap_server.digest, + pcb->chap_server.challenge + PPP_HDRLEN + CHAP_HDRLEN, + response, pcb->chap_server.message, sizeof(pcb->chap_server.message)); +#endif /* UNUSED */ + ok = chap_verify_response(pcb, name, pcb->chap_server.name, id, pcb->chap_server.digest, + pcb->chap_server.challenge + PPP_HDRLEN + CHAP_HDRLEN, + response, message, sizeof(message)); +#if 0 /* UNUSED */ + if (!ok || !auth_number()) { +#endif /* UNUSED */ + if (!ok) { + pcb->chap_server.flags |= AUTH_FAILED; + ppp_warn("Peer %q failed CHAP authentication", name); + } + } else if ((pcb->chap_server.flags & AUTH_DONE) == 0) + return; + + /* send the response */ + mlen = strlen(message); + len = CHAP_HDRLEN + mlen; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +len), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (unsigned char *)p->payload; + MAKEHEADER(outp, PPP_CHAP); + + outp[0] = (pcb->chap_server.flags & AUTH_FAILED)? CHAP_FAILURE: CHAP_SUCCESS; + outp[1] = id; + outp[2] = len >> 8; + outp[3] = len; + if (mlen > 0) + memcpy(outp + CHAP_HDRLEN, message, mlen); + ppp_write(pcb, p); + + if (pcb->chap_server.flags & CHALLENGE_VALID) { + pcb->chap_server.flags &= ~CHALLENGE_VALID; + if (!(pcb->chap_server.flags & AUTH_DONE) && !(pcb->chap_server.flags & AUTH_FAILED)) { + +#if 0 /* UNUSED */ + /* + * Auth is OK, so now we need to check session restrictions + * to ensure everything is OK, but only if we used a + * plugin, and only if we're configured to check. This + * allows us to do PAM checks on PPP servers that + * authenticate against ActiveDirectory, and use AD for + * account info (like when using Winbind integrated with + * PAM). + */ + if (session_mgmt && + session_check(name, NULL, devnam, NULL) == 0) { + pcb->chap_server.flags |= AUTH_FAILED; + ppp_warn("Peer %q failed CHAP Session verification", name); + } +#endif /* UNUSED */ + + } + if (pcb->chap_server.flags & AUTH_FAILED) { + auth_peer_fail(pcb, PPP_CHAP); + } else { + if ((pcb->chap_server.flags & AUTH_DONE) == 0) + auth_peer_success(pcb, PPP_CHAP, + pcb->chap_server.digest->code, + name, strlen(name)); + if (pcb->settings.chap_rechallenge_time) { + pcb->chap_server.flags |= TIMEOUT_PENDING; + TIMEOUT(chap_timeout, pcb, + pcb->settings.chap_rechallenge_time); + } + } + pcb->chap_server.flags |= AUTH_DONE; + } +} + +/* + * chap_verify_response - check whether the peer's response matches + * what we think it should be. Returns 1 if it does (authentication + * succeeded), or 0 if it doesn't. + */ +static int chap_verify_response(ppp_pcb *pcb, const char *name, const char *ourname, int id, + const struct chap_digest_type *digest, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + int ok; + unsigned char secret[MAXSECRETLEN]; + int secret_len; + + /* Get the secret that the peer is supposed to know */ + if (!get_secret(pcb, name, ourname, (char *)secret, &secret_len, 1)) { + ppp_error("No CHAP secret found for authenticating %q", name); + return 0; + } + ok = digest->verify_response(pcb, id, name, secret, secret_len, challenge, + response, message, message_space); + memset(secret, 0, sizeof(secret)); + + return ok; +} +#endif /* PPP_SERVER */ + +/* + * chap_respond - Generate and send a response to a challenge. + */ +static void chap_respond(ppp_pcb *pcb, int id, + unsigned char *pkt, int len) { + int clen, nlen; + int secret_len; + struct pbuf *p; + u_char *outp; + char rname[MAXNAMELEN+1]; + char secret[MAXSECRETLEN+1]; + + p = pbuf_alloc(PBUF_RAW, (u16_t)(RESP_MAX_PKTLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + if ((pcb->chap_client.flags & (LOWERUP | AUTH_STARTED)) != (LOWERUP | AUTH_STARTED)) + return; /* not ready */ + if (len < 2 || len < pkt[0] + 1) + return; /* too short */ + clen = pkt[0]; + nlen = len - (clen + 1); + + /* Null terminate and clean remote name. */ + ppp_slprintf(rname, sizeof(rname), "%.*v", nlen, pkt + clen + 1); + +#if PPP_REMOTENAME + /* Microsoft doesn't send their name back in the PPP packet */ + if (pcb->settings.explicit_remote || (pcb->settings.remote_name[0] != 0 && rname[0] == 0)) + strlcpy(rname, pcb->settings.remote_name, sizeof(rname)); +#endif /* PPP_REMOTENAME */ + + /* get secret for authenticating ourselves with the specified host */ + if (!get_secret(pcb, pcb->chap_client.name, rname, secret, &secret_len, 0)) { + secret_len = 0; /* assume null secret if can't find one */ + ppp_warn("No CHAP secret found for authenticating us to %q", rname); + } + + outp = (u_char*)p->payload; + MAKEHEADER(outp, PPP_CHAP); + outp += CHAP_HDRLEN; + + pcb->chap_client.digest->make_response(pcb, outp, id, pcb->chap_client.name, pkt, + secret, secret_len, pcb->chap_client.priv); + memset(secret, 0, secret_len); + + clen = *outp; + nlen = strlen(pcb->chap_client.name); + memcpy(outp + clen + 1, pcb->chap_client.name, nlen); + + outp = (u_char*)p->payload + PPP_HDRLEN; + len = CHAP_HDRLEN + clen + 1 + nlen; + outp[0] = CHAP_RESPONSE; + outp[1] = id; + outp[2] = len >> 8; + outp[3] = len; + + pbuf_realloc(p, PPP_HDRLEN + len); + ppp_write(pcb, p); +} + +static void chap_handle_status(ppp_pcb *pcb, int code, int id, + unsigned char *pkt, int len) { + const char *msg = NULL; + LWIP_UNUSED_ARG(id); + + if ((pcb->chap_client.flags & (AUTH_DONE|AUTH_STARTED|LOWERUP)) + != (AUTH_STARTED|LOWERUP)) + return; + pcb->chap_client.flags |= AUTH_DONE; + + if (code == CHAP_SUCCESS) { + /* used for MS-CHAP v2 mutual auth, yuck */ + if (pcb->chap_client.digest->check_success != NULL) { + if (!(*pcb->chap_client.digest->check_success)(pcb, pkt, len, pcb->chap_client.priv)) + code = CHAP_FAILURE; + } else + msg = "CHAP authentication succeeded"; + } else { + if (pcb->chap_client.digest->handle_failure != NULL) + (*pcb->chap_client.digest->handle_failure)(pcb, pkt, len); + else + msg = "CHAP authentication failed"; + } + if (msg) { + if (len > 0) + ppp_info("%s: %.*v", msg, len, pkt); + else + ppp_info("%s", msg); + } + if (code == CHAP_SUCCESS) + auth_withpeer_success(pcb, PPP_CHAP, pcb->chap_client.digest->code); + else { + pcb->chap_client.flags |= AUTH_FAILED; + ppp_error("CHAP authentication failed"); + auth_withpeer_fail(pcb, PPP_CHAP); + } +} + +static void chap_input(ppp_pcb *pcb, unsigned char *pkt, int pktlen) { + unsigned char code, id; + int len; + + if (pktlen < CHAP_HDRLEN) + return; + GETCHAR(code, pkt); + GETCHAR(id, pkt); + GETSHORT(len, pkt); + if (len < CHAP_HDRLEN || len > pktlen) + return; + len -= CHAP_HDRLEN; + + switch (code) { + case CHAP_CHALLENGE: + chap_respond(pcb, id, pkt, len); + break; +#if PPP_SERVER + case CHAP_RESPONSE: + chap_handle_response(pcb, id, pkt, len); + break; +#endif /* PPP_SERVER */ + case CHAP_FAILURE: + case CHAP_SUCCESS: + chap_handle_status(pcb, code, id, pkt, len); + break; + default: + break; + } +} + +static void chap_protrej(ppp_pcb *pcb) { + +#if PPP_SERVER + if (pcb->chap_server.flags & TIMEOUT_PENDING) { + pcb->chap_server.flags &= ~TIMEOUT_PENDING; + UNTIMEOUT(chap_timeout, pcb); + } + if (pcb->chap_server.flags & AUTH_STARTED) { + pcb->chap_server.flags = 0; + auth_peer_fail(pcb, PPP_CHAP); + } +#endif /* PPP_SERVER */ + if ((pcb->chap_client.flags & (AUTH_STARTED|AUTH_DONE)) == AUTH_STARTED) { + pcb->chap_client.flags &= ~AUTH_STARTED; + ppp_error("CHAP authentication failed due to protocol-reject"); + auth_withpeer_fail(pcb, PPP_CHAP); + } +} + +#if PRINTPKT_SUPPORT +/* + * chap_print_pkt - print the contents of a CHAP packet. + */ +static const char* const chap_code_names[] = { + "Challenge", "Response", "Success", "Failure" +}; + +static int chap_print_pkt(const unsigned char *p, int plen, + void (*printer) (void *, const char *, ...), void *arg) { + int code, id, len; + int clen, nlen; + unsigned char x; + + if (plen < CHAP_HDRLEN) + return 0; + GETCHAR(code, p); + GETCHAR(id, p); + GETSHORT(len, p); + if (len < CHAP_HDRLEN || len > plen) + return 0; + + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(chap_code_names)) + printer(arg, " %s", chap_code_names[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= CHAP_HDRLEN; + switch (code) { + case CHAP_CHALLENGE: + case CHAP_RESPONSE: + if (len < 1) + break; + clen = p[0]; + if (len < clen + 1) + break; + ++p; + nlen = len - clen - 1; + printer(arg, " <"); + for (; clen > 0; --clen) { + GETCHAR(x, p); + printer(arg, "%.2x", x); + } + printer(arg, ">, name = "); + ppp_print_string(p, nlen, printer, arg); + break; + case CHAP_FAILURE: + case CHAP_SUCCESS: + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + break; + default: + for (clen = len; clen > 0; --clen) { + GETCHAR(x, p); + printer(arg, " %.2x", x); + } + /* no break */ + } + + return len + CHAP_HDRLEN; +} +#endif /* PRINTPKT_SUPPORT */ + +const struct protent chap_protent = { + PPP_CHAP, + chap_init, + chap_input, + chap_protrej, + chap_lowerup, + chap_lowerdown, + NULL, /* open */ + NULL, /* close */ +#if PRINTPKT_SUPPORT + chap_print_pkt, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + NULL, /* datainput */ +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "CHAP", /* name */ + NULL, /* data_name */ +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + chap_option_list, + NULL, /* check_options */ +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + NULL, + NULL +#endif /* DEMAND_SUPPORT */ +}; + +#endif /* PPP_SUPPORT && CHAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.c index 5a989c9..c1533e0 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/chap_ms.c @@ -1,962 +1,962 @@ -/* - * chap_ms.c - Microsoft MS-CHAP compatible implementation. - * - * Copyright (c) 1995 Eric Rosenquist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Modifications by Lauri Pesonen / lpesonen@clinet.fi, april 1997 - * - * Implemented LANManager type password response to MS-CHAP challenges. - * Now pppd provides both NT style and LANMan style blocks, and the - * prefered is set by option "ms-lanman". Default is to use NT. - * The hash text (StdText) was taken from Win95 RASAPI32.DLL. - * - * You should also use DOMAIN\\USERNAME as described in README.MSCHAP80 - */ - -/* - * Modifications by Frank Cusack, frank@google.com, March 2002. - * - * Implemented MS-CHAPv2 functionality, heavily based on sample - * implementation in RFC 2759. Implemented MPPE functionality, - * heavily based on sample implementation in RFC 3079. - * - * Copyright (c) 2002 Google, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#if 0 /* UNUSED */ -#include -#include -#include -#include -#include -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/chap-new.h" -#include "netif/ppp/chap_ms.h" -#include "netif/ppp/pppcrypt.h" -#include "netif/ppp/magic.h" -#if MPPE_SUPPORT -#include "netif/ppp/mppe.h" /* For mppe_sha1_pad*, mppe_set_key() */ -#endif /* MPPE_SUPPORT */ - -#define SHA1_SIGNATURE_SIZE 20 -#define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */ -#define MAX_NT_PASSWORD 256 /* Max (Unicode) chars in an NT pass */ - -#define MS_CHAP_RESPONSE_LEN 49 /* Response length for MS-CHAP */ -#define MS_CHAP2_RESPONSE_LEN 49 /* Response length for MS-CHAPv2 */ -#define MS_AUTH_RESPONSE_LENGTH 40 /* MS-CHAPv2 authenticator response, */ - /* as ASCII */ - -/* Error codes for MS-CHAP failure messages. */ -#define MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS 646 -#define MS_CHAP_ERROR_ACCT_DISABLED 647 -#define MS_CHAP_ERROR_PASSWD_EXPIRED 648 -#define MS_CHAP_ERROR_NO_DIALIN_PERMISSION 649 -#define MS_CHAP_ERROR_AUTHENTICATION_FAILURE 691 -#define MS_CHAP_ERROR_CHANGING_PASSWORD 709 - -/* - * Offsets within the response field for MS-CHAP - */ -#define MS_CHAP_LANMANRESP 0 -#define MS_CHAP_LANMANRESP_LEN 24 -#define MS_CHAP_NTRESP 24 -#define MS_CHAP_NTRESP_LEN 24 -#define MS_CHAP_USENT 48 - -/* - * Offsets within the response field for MS-CHAP2 - */ -#define MS_CHAP2_PEER_CHALLENGE 0 -#define MS_CHAP2_PEER_CHAL_LEN 16 -#define MS_CHAP2_RESERVED_LEN 8 -#define MS_CHAP2_NTRESP 24 -#define MS_CHAP2_NTRESP_LEN 24 -#define MS_CHAP2_FLAGS 48 - -#if MPPE_SUPPORT -#if 0 /* UNUSED */ -/* These values are the RADIUS attribute values--see RFC 2548. */ -#define MPPE_ENC_POL_ENC_ALLOWED 1 -#define MPPE_ENC_POL_ENC_REQUIRED 2 -#define MPPE_ENC_TYPES_RC4_40 2 -#define MPPE_ENC_TYPES_RC4_128 4 - -/* used by plugins (using above values) */ -extern void set_mppe_enc_types(int, int); -#endif /* UNUSED */ -#endif /* MPPE_SUPPORT */ - -/* Are we the authenticator or authenticatee? For MS-CHAPv2 key derivation. */ -#define MS_CHAP2_AUTHENTICATEE 0 -#define MS_CHAP2_AUTHENTICATOR 1 - -static void ascii2unicode (const char[], int, u_char[]); -static void NTPasswordHash (u_char *, int, u_char[MD4_SIGNATURE_SIZE]); -static void ChallengeResponse (const u_char *, const u_char *, u_char[24]); -static void ChallengeHash (const u_char[16], const u_char *, const char *, u_char[8]); -static void ChapMS_NT (const u_char *, const char *, int, u_char[24]); -static void ChapMS2_NT (const u_char *, const u_char[16], const char *, const char *, int, - u_char[24]); -static void GenerateAuthenticatorResponsePlain - (const char*, int, u_char[24], const u_char[16], const u_char *, - const char *, u_char[41]); -#ifdef MSLANMAN -static void ChapMS_LANMan (u_char *, char *, int, u_char *); -#endif - -static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE], - u_char NTResponse[24], const u_char PeerChallenge[16], - const u_char *rchallenge, const char *username, - u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]); - -#if MPPE_SUPPORT -static void Set_Start_Key (ppp_pcb *pcb, const u_char *, const char *, int); -static void SetMasterKeys (ppp_pcb *pcb, const char *, int, u_char[24], int); -#endif /* MPPE_SUPPORT */ - -static void ChapMS (ppp_pcb *pcb, const u_char *, const char *, int, u_char *); -static void ChapMS2 (ppp_pcb *pcb, const u_char *, const u_char *, const char *, const char *, int, - u_char *, u_char[MS_AUTH_RESPONSE_LENGTH+1], int); - -#ifdef MSLANMAN -bool ms_lanman = 0; /* Use LanMan password instead of NT */ - /* Has meaning only with MS-CHAP challenges */ -#endif - -#if MPPE_SUPPORT -#ifdef DEBUGMPPEKEY -/* For MPPE debug */ -/* Use "[]|}{?/><,`!2&&(" (sans quotes) for RFC 3079 MS-CHAPv2 test value */ -static char *mschap_challenge = NULL; -/* Use "!@\#$%^&*()_+:3|~" (sans quotes, backslash is to escape #) for ... */ -static char *mschap2_peer_challenge = NULL; -#endif - -#include "netif/ppp/fsm.h" /* Need to poke MPPE options */ -#include "netif/ppp/ccp.h" -#endif /* MPPE_SUPPORT */ - -#if PPP_OPTIONS -/* - * Command-line options. - */ -static option_t chapms_option_list[] = { -#ifdef MSLANMAN - { "ms-lanman", o_bool, &ms_lanman, - "Use LanMan passwd when using MS-CHAP", 1 }, -#endif -#ifdef DEBUGMPPEKEY - { "mschap-challenge", o_string, &mschap_challenge, - "specify CHAP challenge" }, - { "mschap2-peer-challenge", o_string, &mschap2_peer_challenge, - "specify CHAP peer challenge" }, -#endif - { NULL } -}; -#endif /* PPP_OPTIONS */ - -#if PPP_SERVER -/* - * chapms_generate_challenge - generate a challenge for MS-CHAP. - * For MS-CHAP the challenge length is fixed at 8 bytes. - * The length goes in challenge[0] and the actual challenge starts - * at challenge[1]. - */ -static void chapms_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) { - LWIP_UNUSED_ARG(pcb); - - *challenge++ = 8; -#ifdef DEBUGMPPEKEY - if (mschap_challenge && strlen(mschap_challenge) == 8) - memcpy(challenge, mschap_challenge, 8); - else -#endif - magic_random_bytes(challenge, 8); -} - -static void chapms2_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) { - LWIP_UNUSED_ARG(pcb); - - *challenge++ = 16; -#ifdef DEBUGMPPEKEY - if (mschap_challenge && strlen(mschap_challenge) == 16) - memcpy(challenge, mschap_challenge, 16); - else -#endif - magic_random_bytes(challenge, 16); -} - -static int chapms_verify_response(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - unsigned char md[MS_CHAP_RESPONSE_LEN]; - int diff; - int challenge_len, response_len; - LWIP_UNUSED_ARG(id); - LWIP_UNUSED_ARG(name); - - challenge_len = *challenge++; /* skip length, is 8 */ - response_len = *response++; - if (response_len != MS_CHAP_RESPONSE_LEN) - goto bad; - -#ifndef MSLANMAN - if (!response[MS_CHAP_USENT]) { - /* Should really propagate this into the error packet. */ - ppp_notice("Peer request for LANMAN auth not supported"); - goto bad; - } -#endif - - /* Generate the expected response. */ - ChapMS(pcb, (const u_char *)challenge, (const char *)secret, secret_len, md); - -#ifdef MSLANMAN - /* Determine which part of response to verify against */ - if (!response[MS_CHAP_USENT]) - diff = memcmp(&response[MS_CHAP_LANMANRESP], - &md[MS_CHAP_LANMANRESP], MS_CHAP_LANMANRESP_LEN); - else -#endif - diff = memcmp(&response[MS_CHAP_NTRESP], &md[MS_CHAP_NTRESP], - MS_CHAP_NTRESP_LEN); - - if (diff == 0) { - ppp_slprintf(message, message_space, "Access granted"); - return 1; - } - - bad: - /* See comments below for MS-CHAP V2 */ - ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0", - challenge_len, challenge); - return 0; -} - -static int chapms2_verify_response(ppp_pcb *pcb, int id, const char *name, - const unsigned char *secret, int secret_len, - const unsigned char *challenge, const unsigned char *response, - char *message, int message_space) { - unsigned char md[MS_CHAP2_RESPONSE_LEN]; - char saresponse[MS_AUTH_RESPONSE_LENGTH+1]; - int challenge_len, response_len; - LWIP_UNUSED_ARG(id); - - challenge_len = *challenge++; /* skip length, is 16 */ - response_len = *response++; - if (response_len != MS_CHAP2_RESPONSE_LEN) - goto bad; /* not even the right length */ - - /* Generate the expected response and our mutual auth. */ - ChapMS2(pcb, (const u_char*)challenge, (const u_char*)&response[MS_CHAP2_PEER_CHALLENGE], name, - (const char *)secret, secret_len, md, - (unsigned char *)saresponse, MS_CHAP2_AUTHENTICATOR); - - /* compare MDs and send the appropriate status */ - /* - * Per RFC 2759, success message must be formatted as - * "S= M=" - * where - * is the Authenticator Response (mutual auth) - * is a text message - * - * However, some versions of Windows (win98 tested) do not know - * about the M= part (required per RFC 2759) and flag - * it as an error (reported incorrectly as an encryption error - * to the user). Since the RFC requires it, and it can be - * useful information, we supply it if the peer is a conforming - * system. Luckily (?), win98 sets the Flags field to 0x04 - * (contrary to RFC requirements) so we can use that to - * distinguish between conforming and non-conforming systems. - * - * Special thanks to Alex Swiridov for - * help debugging this. - */ - if (memcmp(&md[MS_CHAP2_NTRESP], &response[MS_CHAP2_NTRESP], - MS_CHAP2_NTRESP_LEN) == 0) { - if (response[MS_CHAP2_FLAGS]) - ppp_slprintf(message, message_space, "S=%s", saresponse); - else - ppp_slprintf(message, message_space, "S=%s M=%s", - saresponse, "Access granted"); - return 1; - } - - bad: - /* - * Failure message must be formatted as - * "E=e R=r C=c V=v M=m" - * where - * e = error code (we use 691, ERROR_AUTHENTICATION_FAILURE) - * r = retry (we use 1, ok to retry) - * c = challenge to use for next response, we reuse previous - * v = Change Password version supported, we use 0 - * m = text message - * - * The M=m part is only for MS-CHAPv2. Neither win2k nor - * win98 (others untested) display the message to the user anyway. - * They also both ignore the E=e code. - * - * Note that it's safe to reuse the same challenge as we don't - * actually accept another response based on the error message - * (and no clients try to resend a response anyway). - * - * Basically, this whole bit is useless code, even the small - * implementation here is only because of overspecification. - */ - ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0 M=%s", - challenge_len, challenge, "Access denied"); - return 0; -} -#endif /* PPP_SERVER */ - -static void chapms_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *private_) { - LWIP_UNUSED_ARG(id); - LWIP_UNUSED_ARG(our_name); - LWIP_UNUSED_ARG(private_); - challenge++; /* skip length, should be 8 */ - *response++ = MS_CHAP_RESPONSE_LEN; - ChapMS(pcb, challenge, secret, secret_len, response); -} - -static void chapms2_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, - const unsigned char *challenge, const char *secret, int secret_len, - unsigned char *private_) { - LWIP_UNUSED_ARG(id); - challenge++; /* skip length, should be 16 */ - *response++ = MS_CHAP2_RESPONSE_LEN; - ChapMS2(pcb, challenge, -#ifdef DEBUGMPPEKEY - mschap2_peer_challenge, -#else - NULL, -#endif - our_name, secret, secret_len, response, private_, - MS_CHAP2_AUTHENTICATEE); -} - -static int chapms2_check_success(ppp_pcb *pcb, unsigned char *msg, int len, unsigned char *private_) { - LWIP_UNUSED_ARG(pcb); - - if ((len < MS_AUTH_RESPONSE_LENGTH + 2) || - strncmp((char *)msg, "S=", 2) != 0) { - /* Packet does not start with "S=" */ - ppp_error("MS-CHAPv2 Success packet is badly formed."); - return 0; - } - msg += 2; - len -= 2; - if (len < MS_AUTH_RESPONSE_LENGTH - || memcmp(msg, private_, MS_AUTH_RESPONSE_LENGTH)) { - /* Authenticator Response did not match expected. */ - ppp_error("MS-CHAPv2 mutual authentication failed."); - return 0; - } - /* Authenticator Response matches. */ - msg += MS_AUTH_RESPONSE_LENGTH; /* Eat it */ - len -= MS_AUTH_RESPONSE_LENGTH; - if ((len >= 3) && !strncmp((char *)msg, " M=", 3)) { - msg += 3; /* Eat the delimiter */ - } else if (len) { - /* Packet has extra text which does not begin " M=" */ - ppp_error("MS-CHAPv2 Success packet is badly formed."); - return 0; - } - return 1; -} - -static void chapms_handle_failure(ppp_pcb *pcb, unsigned char *inp, int len) { - int err; - const char *p; - char msg[64]; - LWIP_UNUSED_ARG(pcb); - - /* We want a null-terminated string for strxxx(). */ - len = LWIP_MIN(len, 63); - MEMCPY(msg, inp, len); - msg[len] = 0; - p = msg; - - /* - * Deal with MS-CHAP formatted failure messages; just print the - * M= part (if any). For MS-CHAP we're not really supposed - * to use M=, but it shouldn't hurt. See - * chapms[2]_verify_response. - */ - if (!strncmp(p, "E=", 2)) - err = strtol(p+2, NULL, 10); /* Remember the error code. */ - else - goto print_msg; /* Message is badly formatted. */ - - if (len && ((p = strstr(p, " M=")) != NULL)) { - /* M= field found. */ - p += 3; - } else { - /* No M=; use the error code. */ - switch (err) { - case MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS: - p = "E=646 Restricted logon hours"; - break; - - case MS_CHAP_ERROR_ACCT_DISABLED: - p = "E=647 Account disabled"; - break; - - case MS_CHAP_ERROR_PASSWD_EXPIRED: - p = "E=648 Password expired"; - break; - - case MS_CHAP_ERROR_NO_DIALIN_PERMISSION: - p = "E=649 No dialin permission"; - break; - - case MS_CHAP_ERROR_AUTHENTICATION_FAILURE: - p = "E=691 Authentication failure"; - break; - - case MS_CHAP_ERROR_CHANGING_PASSWORD: - /* Should never see this, we don't support Change Password. */ - p = "E=709 Error changing password"; - break; - - default: - ppp_error("Unknown MS-CHAP authentication failure: %.*v", - len, inp); - return; - } - } -print_msg: - if (p != NULL) - ppp_error("MS-CHAP authentication failed: %v", p); -} - -static void ChallengeResponse(const u_char *challenge, - const u_char PasswordHash[MD4_SIGNATURE_SIZE], - u_char response[24]) { - u_char ZPasswordHash[21]; - lwip_des_context des; - u_char des_key[8]; - - BZERO(ZPasswordHash, sizeof(ZPasswordHash)); - MEMCPY(ZPasswordHash, PasswordHash, MD4_SIGNATURE_SIZE); - -#if 0 - dbglog("ChallengeResponse - ZPasswordHash %.*B", - sizeof(ZPasswordHash), ZPasswordHash); -#endif - - pppcrypt_56_to_64_bit_key(ZPasswordHash + 0, des_key); - lwip_des_init(&des); - lwip_des_setkey_enc(&des, des_key); - lwip_des_crypt_ecb(&des, challenge, response +0); - lwip_des_free(&des); - - pppcrypt_56_to_64_bit_key(ZPasswordHash + 7, des_key); - lwip_des_init(&des); - lwip_des_setkey_enc(&des, des_key); - lwip_des_crypt_ecb(&des, challenge, response +8); - lwip_des_free(&des); - - pppcrypt_56_to_64_bit_key(ZPasswordHash + 14, des_key); - lwip_des_init(&des); - lwip_des_setkey_enc(&des, des_key); - lwip_des_crypt_ecb(&des, challenge, response +16); - lwip_des_free(&des); - -#if 0 - dbglog("ChallengeResponse - response %.24B", response); -#endif -} - -static void ChallengeHash(const u_char PeerChallenge[16], const u_char *rchallenge, - const char *username, u_char Challenge[8]) { - lwip_sha1_context sha1Context; - u_char sha1Hash[SHA1_SIGNATURE_SIZE]; - const char *user; - - /* remove domain from "domain\username" */ - if ((user = strrchr(username, '\\')) != NULL) - ++user; - else - user = username; - - lwip_sha1_init(&sha1Context); - lwip_sha1_starts(&sha1Context); - lwip_sha1_update(&sha1Context, PeerChallenge, 16); - lwip_sha1_update(&sha1Context, rchallenge, 16); - lwip_sha1_update(&sha1Context, (const unsigned char*)user, strlen(user)); - lwip_sha1_finish(&sha1Context, sha1Hash); - lwip_sha1_free(&sha1Context); - - MEMCPY(Challenge, sha1Hash, 8); -} - -/* - * Convert the ASCII version of the password to Unicode. - * This implicitly supports 8-bit ISO8859/1 characters. - * This gives us the little-endian representation, which - * is assumed by all M$ CHAP RFCs. (Unicode byte ordering - * is machine-dependent.) - */ -static void ascii2unicode(const char ascii[], int ascii_len, u_char unicode[]) { - int i; - - BZERO(unicode, ascii_len * 2); - for (i = 0; i < ascii_len; i++) - unicode[i * 2] = (u_char) ascii[i]; -} - -static void NTPasswordHash(u_char *secret, int secret_len, u_char hash[MD4_SIGNATURE_SIZE]) { - lwip_md4_context md4Context; - - lwip_md4_init(&md4Context); - lwip_md4_starts(&md4Context); - lwip_md4_update(&md4Context, secret, secret_len); - lwip_md4_finish(&md4Context, hash); - lwip_md4_free(&md4Context); -} - -static void ChapMS_NT(const u_char *rchallenge, const char *secret, int secret_len, - u_char NTResponse[24]) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - - /* Hash the Unicode version of the secret (== password). */ - ascii2unicode(secret, secret_len, unicodePassword); - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); - - ChallengeResponse(rchallenge, PasswordHash, NTResponse); -} - -static void ChapMS2_NT(const u_char *rchallenge, const u_char PeerChallenge[16], const char *username, - const char *secret, int secret_len, u_char NTResponse[24]) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char Challenge[8]; - - ChallengeHash(PeerChallenge, rchallenge, username, Challenge); - - /* Hash the Unicode version of the secret (== password). */ - ascii2unicode(secret, secret_len, unicodePassword); - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); - - ChallengeResponse(Challenge, PasswordHash, NTResponse); -} - -#ifdef MSLANMAN -static u_char *StdText = (u_char *)"KGS!@#$%"; /* key from rasapi32.dll */ - -static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len, - unsigned char *response) { - int i; - u_char UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */ - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - lwip_des_context des; - u_char des_key[8]; - - /* LANMan password is case insensitive */ - BZERO(UcasePassword, sizeof(UcasePassword)); - for (i = 0; i < secret_len; i++) - UcasePassword[i] = (u_char)toupper(secret[i]); - - pppcrypt_56_to_64_bit_key(UcasePassword +0, des_key); - lwip_des_init(&des); - lwip_des_setkey_enc(&des, des_key); - lwip_des_crypt_ecb(&des, StdText, PasswordHash +0); - lwip_des_free(&des); - - pppcrypt_56_to_64_bit_key(UcasePassword +7, des_key); - lwip_des_init(&des); - lwip_des_setkey_enc(&des, des_key); - lwip_des_crypt_ecb(&des, StdText, PasswordHash +8); - lwip_des_free(&des); - - ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]); -} -#endif - - -static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE], - u_char NTResponse[24], const u_char PeerChallenge[16], - const u_char *rchallenge, const char *username, - u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { - /* - * "Magic" constants used in response generation, from RFC 2759. - */ - static const u_char Magic1[39] = /* "Magic server to client signing constant" */ - { 0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65, - 0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67, - 0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74 }; - static const u_char Magic2[41] = /* "Pad to make it do more than one iteration" */ - { 0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B, - 0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F, - 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E, - 0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F, - 0x6E }; - - int i; - lwip_sha1_context sha1Context; - u_char Digest[SHA1_SIGNATURE_SIZE]; - u_char Challenge[8]; - - lwip_sha1_init(&sha1Context); - lwip_sha1_starts(&sha1Context); - lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - lwip_sha1_update(&sha1Context, NTResponse, 24); - lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); - lwip_sha1_finish(&sha1Context, Digest); - lwip_sha1_free(&sha1Context); - - ChallengeHash(PeerChallenge, rchallenge, username, Challenge); - - lwip_sha1_init(&sha1Context); - lwip_sha1_starts(&sha1Context); - lwip_sha1_update(&sha1Context, Digest, sizeof(Digest)); - lwip_sha1_update(&sha1Context, Challenge, sizeof(Challenge)); - lwip_sha1_update(&sha1Context, Magic2, sizeof(Magic2)); - lwip_sha1_finish(&sha1Context, Digest); - lwip_sha1_free(&sha1Context); - - /* Convert to ASCII hex string. */ - for (i = 0; i < LWIP_MAX((MS_AUTH_RESPONSE_LENGTH / 2), (int)sizeof(Digest)); i++) - sprintf((char *)&authResponse[i * 2], "%02X", Digest[i]); -} - - -static void GenerateAuthenticatorResponsePlain( - const char *secret, int secret_len, - u_char NTResponse[24], const u_char PeerChallenge[16], - const u_char *rchallenge, const char *username, - u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; - - /* Hash (x2) the Unicode version of the secret (== password). */ - ascii2unicode(secret, secret_len, unicodePassword); - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); - NTPasswordHash(PasswordHash, sizeof(PasswordHash), - PasswordHashHash); - - GenerateAuthenticatorResponse(PasswordHashHash, NTResponse, PeerChallenge, - rchallenge, username, authResponse); -} - - -#if MPPE_SUPPORT -/* - * Set mppe_xxxx_key from MS-CHAP credentials. (see RFC 3079) - */ -static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, int secret_len) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; - lwip_sha1_context sha1Context; - u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ - - /* Hash (x2) the Unicode version of the secret (== password). */ - ascii2unicode(secret, secret_len, unicodePassword); - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); - NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); - - lwip_sha1_init(&sha1Context); - lwip_sha1_starts(&sha1Context); - lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - lwip_sha1_update(&sha1Context, rchallenge, 8); - lwip_sha1_finish(&sha1Context, Digest); - lwip_sha1_free(&sha1Context); - - /* Same key in both directions. */ - mppe_set_key(pcb, &pcb->mppe_comp, Digest); - mppe_set_key(pcb, &pcb->mppe_decomp, Digest); - - pcb->mppe_keys_set = 1; -} - -/* - * Set mppe_xxxx_key from MS-CHAPv2 credentials. (see RFC 3079) - */ -static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_char NTResponse[24], int IsServer) { - u_char unicodePassword[MAX_NT_PASSWORD * 2]; - u_char PasswordHash[MD4_SIGNATURE_SIZE]; - u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; - lwip_sha1_context sha1Context; - u_char MasterKey[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ - u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ - const u_char *s; - - /* "This is the MPPE Master Key" */ - static const u_char Magic1[27] = - { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x4d, 0x50, 0x50, 0x45, 0x20, 0x4d, - 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4b, 0x65, 0x79 }; - /* "On the client side, this is the send key; " - "on the server side, it is the receive key." */ - static const u_char Magic2[84] = - { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, - 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x6b, 0x65, 0x79, - 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x69, 0x64, 0x65, - 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, - 0x6b, 0x65, 0x79, 0x2e }; - /* "On the client side, this is the receive key; " - "on the server side, it is the send key." */ - static const u_char Magic3[84] = - { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, - 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, - 0x6b, 0x65, 0x79, 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, - 0x69, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, - 0x6b, 0x65, 0x79, 0x2e }; - - /* Hash (x2) the Unicode version of the secret (== password). */ - ascii2unicode(secret, secret_len, unicodePassword); - NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); - NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); - - lwip_sha1_init(&sha1Context); - lwip_sha1_starts(&sha1Context); - lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - lwip_sha1_update(&sha1Context, NTResponse, 24); - lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); - lwip_sha1_finish(&sha1Context, MasterKey); - lwip_sha1_free(&sha1Context); - - /* - * generate send key - */ - if (IsServer) - s = Magic3; - else - s = Magic2; - lwip_sha1_init(&sha1Context); - lwip_sha1_starts(&sha1Context); - lwip_sha1_update(&sha1Context, MasterKey, 16); - lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); - lwip_sha1_update(&sha1Context, s, 84); - lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); - lwip_sha1_finish(&sha1Context, Digest); - lwip_sha1_free(&sha1Context); - - mppe_set_key(pcb, &pcb->mppe_comp, Digest); - - /* - * generate recv key - */ - if (IsServer) - s = Magic2; - else - s = Magic3; - lwip_sha1_init(&sha1Context); - lwip_sha1_starts(&sha1Context); - lwip_sha1_update(&sha1Context, MasterKey, 16); - lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); - lwip_sha1_update(&sha1Context, s, 84); - lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); - lwip_sha1_finish(&sha1Context, Digest); - lwip_sha1_free(&sha1Context); - - mppe_set_key(pcb, &pcb->mppe_decomp, Digest); - - pcb->mppe_keys_set = 1; -} - -#endif /* MPPE_SUPPORT */ - - -static void ChapMS(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, int secret_len, - unsigned char *response) { -#if !MPPE_SUPPORT - LWIP_UNUSED_ARG(pcb); -#endif /* !MPPE_SUPPORT */ - BZERO(response, MS_CHAP_RESPONSE_LEN); - - ChapMS_NT(rchallenge, secret, secret_len, &response[MS_CHAP_NTRESP]); - -#ifdef MSLANMAN - ChapMS_LANMan(rchallenge, secret, secret_len, - &response[MS_CHAP_LANMANRESP]); - - /* preferred method is set by option */ - response[MS_CHAP_USENT] = !ms_lanman; -#else - response[MS_CHAP_USENT] = 1; -#endif - -#if MPPE_SUPPORT - Set_Start_Key(pcb, rchallenge, secret, secret_len); -#endif /* MPPE_SUPPORT */ -} - - -/* - * If PeerChallenge is NULL, one is generated and the PeerChallenge - * field of response is filled in. Call this way when generating a response. - * If PeerChallenge is supplied, it is copied into the PeerChallenge field. - * Call this way when verifying a response (or debugging). - * Do not call with PeerChallenge = response. - * - * The PeerChallenge field of response is then used for calculation of the - * Authenticator Response. - */ -static void ChapMS2(ppp_pcb *pcb, const u_char *rchallenge, const u_char *PeerChallenge, - const char *user, const char *secret, int secret_len, unsigned char *response, - u_char authResponse[], int authenticator) { - /* ARGSUSED */ - LWIP_UNUSED_ARG(authenticator); -#if !MPPE_SUPPORT - LWIP_UNUSED_ARG(pcb); -#endif /* !MPPE_SUPPORT */ - - BZERO(response, MS_CHAP2_RESPONSE_LEN); - - /* Generate the Peer-Challenge if requested, or copy it if supplied. */ - if (!PeerChallenge) - magic_random_bytes(&response[MS_CHAP2_PEER_CHALLENGE], MS_CHAP2_PEER_CHAL_LEN); - else - MEMCPY(&response[MS_CHAP2_PEER_CHALLENGE], PeerChallenge, - MS_CHAP2_PEER_CHAL_LEN); - - /* Generate the NT-Response */ - ChapMS2_NT(rchallenge, &response[MS_CHAP2_PEER_CHALLENGE], user, - secret, secret_len, &response[MS_CHAP2_NTRESP]); - - /* Generate the Authenticator Response. */ - GenerateAuthenticatorResponsePlain(secret, secret_len, - &response[MS_CHAP2_NTRESP], - &response[MS_CHAP2_PEER_CHALLENGE], - rchallenge, user, authResponse); - -#if MPPE_SUPPORT - SetMasterKeys(pcb, secret, secret_len, - &response[MS_CHAP2_NTRESP], authenticator); -#endif /* MPPE_SUPPORT */ -} - -#if 0 /* UNUSED */ -#if MPPE_SUPPORT -/* - * Set MPPE options from plugins. - */ -void set_mppe_enc_types(int policy, int types) { - /* Early exit for unknown policies. */ - if (policy != MPPE_ENC_POL_ENC_ALLOWED || - policy != MPPE_ENC_POL_ENC_REQUIRED) - return; - - /* Don't modify MPPE if it's optional and wasn't already configured. */ - if (policy == MPPE_ENC_POL_ENC_ALLOWED && !ccp_wantoptions[0].mppe) - return; - - /* - * Disable undesirable encryption types. Note that we don't ENABLE - * any encryption types, to avoid overriding manual configuration. - */ - switch(types) { - case MPPE_ENC_TYPES_RC4_40: - ccp_wantoptions[0].mppe &= ~MPPE_OPT_128; /* disable 128-bit */ - break; - case MPPE_ENC_TYPES_RC4_128: - ccp_wantoptions[0].mppe &= ~MPPE_OPT_40; /* disable 40-bit */ - break; - default: - break; - } -} -#endif /* MPPE_SUPPORT */ -#endif /* UNUSED */ - -const struct chap_digest_type chapms_digest = { - CHAP_MICROSOFT, /* code */ -#if PPP_SERVER - chapms_generate_challenge, - chapms_verify_response, -#endif /* PPP_SERVER */ - chapms_make_response, - NULL, /* check_success */ - chapms_handle_failure, -}; - -const struct chap_digest_type chapms2_digest = { - CHAP_MICROSOFT_V2, /* code */ -#if PPP_SERVER - chapms2_generate_challenge, - chapms2_verify_response, -#endif /* PPP_SERVER */ - chapms2_make_response, - chapms2_check_success, - chapms_handle_failure, -}; - -#endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ +/* + * chap_ms.c - Microsoft MS-CHAP compatible implementation. + * + * Copyright (c) 1995 Eric Rosenquist. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Modifications by Lauri Pesonen / lpesonen@clinet.fi, april 1997 + * + * Implemented LANManager type password response to MS-CHAP challenges. + * Now pppd provides both NT style and LANMan style blocks, and the + * prefered is set by option "ms-lanman". Default is to use NT. + * The hash text (StdText) was taken from Win95 RASAPI32.DLL. + * + * You should also use DOMAIN\\USERNAME as described in README.MSCHAP80 + */ + +/* + * Modifications by Frank Cusack, frank@google.com, March 2002. + * + * Implemented MS-CHAPv2 functionality, heavily based on sample + * implementation in RFC 2759. Implemented MPPE functionality, + * heavily based on sample implementation in RFC 3079. + * + * Copyright (c) 2002 Google, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#if 0 /* UNUSED */ +#include +#include +#include +#include +#include +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/chap-new.h" +#include "netif/ppp/chap_ms.h" +#include "netif/ppp/pppcrypt.h" +#include "netif/ppp/magic.h" +#if MPPE_SUPPORT +#include "netif/ppp/mppe.h" /* For mppe_sha1_pad*, mppe_set_key() */ +#endif /* MPPE_SUPPORT */ + +#define SHA1_SIGNATURE_SIZE 20 +#define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */ +#define MAX_NT_PASSWORD 256 /* Max (Unicode) chars in an NT pass */ + +#define MS_CHAP_RESPONSE_LEN 49 /* Response length for MS-CHAP */ +#define MS_CHAP2_RESPONSE_LEN 49 /* Response length for MS-CHAPv2 */ +#define MS_AUTH_RESPONSE_LENGTH 40 /* MS-CHAPv2 authenticator response, */ + /* as ASCII */ + +/* Error codes for MS-CHAP failure messages. */ +#define MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS 646 +#define MS_CHAP_ERROR_ACCT_DISABLED 647 +#define MS_CHAP_ERROR_PASSWD_EXPIRED 648 +#define MS_CHAP_ERROR_NO_DIALIN_PERMISSION 649 +#define MS_CHAP_ERROR_AUTHENTICATION_FAILURE 691 +#define MS_CHAP_ERROR_CHANGING_PASSWORD 709 + +/* + * Offsets within the response field for MS-CHAP + */ +#define MS_CHAP_LANMANRESP 0 +#define MS_CHAP_LANMANRESP_LEN 24 +#define MS_CHAP_NTRESP 24 +#define MS_CHAP_NTRESP_LEN 24 +#define MS_CHAP_USENT 48 + +/* + * Offsets within the response field for MS-CHAP2 + */ +#define MS_CHAP2_PEER_CHALLENGE 0 +#define MS_CHAP2_PEER_CHAL_LEN 16 +#define MS_CHAP2_RESERVED_LEN 8 +#define MS_CHAP2_NTRESP 24 +#define MS_CHAP2_NTRESP_LEN 24 +#define MS_CHAP2_FLAGS 48 + +#if MPPE_SUPPORT +#if 0 /* UNUSED */ +/* These values are the RADIUS attribute values--see RFC 2548. */ +#define MPPE_ENC_POL_ENC_ALLOWED 1 +#define MPPE_ENC_POL_ENC_REQUIRED 2 +#define MPPE_ENC_TYPES_RC4_40 2 +#define MPPE_ENC_TYPES_RC4_128 4 + +/* used by plugins (using above values) */ +extern void set_mppe_enc_types(int, int); +#endif /* UNUSED */ +#endif /* MPPE_SUPPORT */ + +/* Are we the authenticator or authenticatee? For MS-CHAPv2 key derivation. */ +#define MS_CHAP2_AUTHENTICATEE 0 +#define MS_CHAP2_AUTHENTICATOR 1 + +static void ascii2unicode (const char[], int, u_char[]); +static void NTPasswordHash (u_char *, int, u_char[MD4_SIGNATURE_SIZE]); +static void ChallengeResponse (const u_char *, const u_char *, u_char[24]); +static void ChallengeHash (const u_char[16], const u_char *, const char *, u_char[8]); +static void ChapMS_NT (const u_char *, const char *, int, u_char[24]); +static void ChapMS2_NT (const u_char *, const u_char[16], const char *, const char *, int, + u_char[24]); +static void GenerateAuthenticatorResponsePlain + (const char*, int, u_char[24], const u_char[16], const u_char *, + const char *, u_char[41]); +#ifdef MSLANMAN +static void ChapMS_LANMan (u_char *, char *, int, u_char *); +#endif + +static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE], + u_char NTResponse[24], const u_char PeerChallenge[16], + const u_char *rchallenge, const char *username, + u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]); + +#if MPPE_SUPPORT +static void Set_Start_Key (ppp_pcb *pcb, const u_char *, const char *, int); +static void SetMasterKeys (ppp_pcb *pcb, const char *, int, u_char[24], int); +#endif /* MPPE_SUPPORT */ + +static void ChapMS (ppp_pcb *pcb, const u_char *, const char *, int, u_char *); +static void ChapMS2 (ppp_pcb *pcb, const u_char *, const u_char *, const char *, const char *, int, + u_char *, u_char[MS_AUTH_RESPONSE_LENGTH+1], int); + +#ifdef MSLANMAN +bool ms_lanman = 0; /* Use LanMan password instead of NT */ + /* Has meaning only with MS-CHAP challenges */ +#endif + +#if MPPE_SUPPORT +#ifdef DEBUGMPPEKEY +/* For MPPE debug */ +/* Use "[]|}{?/><,`!2&&(" (sans quotes) for RFC 3079 MS-CHAPv2 test value */ +static char *mschap_challenge = NULL; +/* Use "!@\#$%^&*()_+:3|~" (sans quotes, backslash is to escape #) for ... */ +static char *mschap2_peer_challenge = NULL; +#endif + +#include "netif/ppp/fsm.h" /* Need to poke MPPE options */ +#include "netif/ppp/ccp.h" +#endif /* MPPE_SUPPORT */ + +#if PPP_OPTIONS +/* + * Command-line options. + */ +static option_t chapms_option_list[] = { +#ifdef MSLANMAN + { "ms-lanman", o_bool, &ms_lanman, + "Use LanMan passwd when using MS-CHAP", 1 }, +#endif +#ifdef DEBUGMPPEKEY + { "mschap-challenge", o_string, &mschap_challenge, + "specify CHAP challenge" }, + { "mschap2-peer-challenge", o_string, &mschap2_peer_challenge, + "specify CHAP peer challenge" }, +#endif + { NULL } +}; +#endif /* PPP_OPTIONS */ + +#if PPP_SERVER +/* + * chapms_generate_challenge - generate a challenge for MS-CHAP. + * For MS-CHAP the challenge length is fixed at 8 bytes. + * The length goes in challenge[0] and the actual challenge starts + * at challenge[1]. + */ +static void chapms_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) { + LWIP_UNUSED_ARG(pcb); + + *challenge++ = 8; +#ifdef DEBUGMPPEKEY + if (mschap_challenge && strlen(mschap_challenge) == 8) + memcpy(challenge, mschap_challenge, 8); + else +#endif + magic_random_bytes(challenge, 8); +} + +static void chapms2_generate_challenge(ppp_pcb *pcb, unsigned char *challenge) { + LWIP_UNUSED_ARG(pcb); + + *challenge++ = 16; +#ifdef DEBUGMPPEKEY + if (mschap_challenge && strlen(mschap_challenge) == 16) + memcpy(challenge, mschap_challenge, 16); + else +#endif + magic_random_bytes(challenge, 16); +} + +static int chapms_verify_response(ppp_pcb *pcb, int id, const char *name, + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + unsigned char md[MS_CHAP_RESPONSE_LEN]; + int diff; + int challenge_len, response_len; + LWIP_UNUSED_ARG(id); + LWIP_UNUSED_ARG(name); + + challenge_len = *challenge++; /* skip length, is 8 */ + response_len = *response++; + if (response_len != MS_CHAP_RESPONSE_LEN) + goto bad; + +#ifndef MSLANMAN + if (!response[MS_CHAP_USENT]) { + /* Should really propagate this into the error packet. */ + ppp_notice("Peer request for LANMAN auth not supported"); + goto bad; + } +#endif + + /* Generate the expected response. */ + ChapMS(pcb, (const u_char *)challenge, (const char *)secret, secret_len, md); + +#ifdef MSLANMAN + /* Determine which part of response to verify against */ + if (!response[MS_CHAP_USENT]) + diff = memcmp(&response[MS_CHAP_LANMANRESP], + &md[MS_CHAP_LANMANRESP], MS_CHAP_LANMANRESP_LEN); + else +#endif + diff = memcmp(&response[MS_CHAP_NTRESP], &md[MS_CHAP_NTRESP], + MS_CHAP_NTRESP_LEN); + + if (diff == 0) { + ppp_slprintf(message, message_space, "Access granted"); + return 1; + } + + bad: + /* See comments below for MS-CHAP V2 */ + ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0", + challenge_len, challenge); + return 0; +} + +static int chapms2_verify_response(ppp_pcb *pcb, int id, const char *name, + const unsigned char *secret, int secret_len, + const unsigned char *challenge, const unsigned char *response, + char *message, int message_space) { + unsigned char md[MS_CHAP2_RESPONSE_LEN]; + char saresponse[MS_AUTH_RESPONSE_LENGTH+1]; + int challenge_len, response_len; + LWIP_UNUSED_ARG(id); + + challenge_len = *challenge++; /* skip length, is 16 */ + response_len = *response++; + if (response_len != MS_CHAP2_RESPONSE_LEN) + goto bad; /* not even the right length */ + + /* Generate the expected response and our mutual auth. */ + ChapMS2(pcb, (const u_char*)challenge, (const u_char*)&response[MS_CHAP2_PEER_CHALLENGE], name, + (const char *)secret, secret_len, md, + (unsigned char *)saresponse, MS_CHAP2_AUTHENTICATOR); + + /* compare MDs and send the appropriate status */ + /* + * Per RFC 2759, success message must be formatted as + * "S= M=" + * where + * is the Authenticator Response (mutual auth) + * is a text message + * + * However, some versions of Windows (win98 tested) do not know + * about the M= part (required per RFC 2759) and flag + * it as an error (reported incorrectly as an encryption error + * to the user). Since the RFC requires it, and it can be + * useful information, we supply it if the peer is a conforming + * system. Luckily (?), win98 sets the Flags field to 0x04 + * (contrary to RFC requirements) so we can use that to + * distinguish between conforming and non-conforming systems. + * + * Special thanks to Alex Swiridov for + * help debugging this. + */ + if (memcmp(&md[MS_CHAP2_NTRESP], &response[MS_CHAP2_NTRESP], + MS_CHAP2_NTRESP_LEN) == 0) { + if (response[MS_CHAP2_FLAGS]) + ppp_slprintf(message, message_space, "S=%s", saresponse); + else + ppp_slprintf(message, message_space, "S=%s M=%s", + saresponse, "Access granted"); + return 1; + } + + bad: + /* + * Failure message must be formatted as + * "E=e R=r C=c V=v M=m" + * where + * e = error code (we use 691, ERROR_AUTHENTICATION_FAILURE) + * r = retry (we use 1, ok to retry) + * c = challenge to use for next response, we reuse previous + * v = Change Password version supported, we use 0 + * m = text message + * + * The M=m part is only for MS-CHAPv2. Neither win2k nor + * win98 (others untested) display the message to the user anyway. + * They also both ignore the E=e code. + * + * Note that it's safe to reuse the same challenge as we don't + * actually accept another response based on the error message + * (and no clients try to resend a response anyway). + * + * Basically, this whole bit is useless code, even the small + * implementation here is only because of overspecification. + */ + ppp_slprintf(message, message_space, "E=691 R=1 C=%0.*B V=0 M=%s", + challenge_len, challenge, "Access denied"); + return 0; +} +#endif /* PPP_SERVER */ + +static void chapms_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *private_) { + LWIP_UNUSED_ARG(id); + LWIP_UNUSED_ARG(our_name); + LWIP_UNUSED_ARG(private_); + challenge++; /* skip length, should be 8 */ + *response++ = MS_CHAP_RESPONSE_LEN; + ChapMS(pcb, challenge, secret, secret_len, response); +} + +static void chapms2_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, + const unsigned char *challenge, const char *secret, int secret_len, + unsigned char *private_) { + LWIP_UNUSED_ARG(id); + challenge++; /* skip length, should be 16 */ + *response++ = MS_CHAP2_RESPONSE_LEN; + ChapMS2(pcb, challenge, +#ifdef DEBUGMPPEKEY + mschap2_peer_challenge, +#else + NULL, +#endif + our_name, secret, secret_len, response, private_, + MS_CHAP2_AUTHENTICATEE); +} + +static int chapms2_check_success(ppp_pcb *pcb, unsigned char *msg, int len, unsigned char *private_) { + LWIP_UNUSED_ARG(pcb); + + if ((len < MS_AUTH_RESPONSE_LENGTH + 2) || + strncmp((char *)msg, "S=", 2) != 0) { + /* Packet does not start with "S=" */ + ppp_error("MS-CHAPv2 Success packet is badly formed."); + return 0; + } + msg += 2; + len -= 2; + if (len < MS_AUTH_RESPONSE_LENGTH + || memcmp(msg, private_, MS_AUTH_RESPONSE_LENGTH)) { + /* Authenticator Response did not match expected. */ + ppp_error("MS-CHAPv2 mutual authentication failed."); + return 0; + } + /* Authenticator Response matches. */ + msg += MS_AUTH_RESPONSE_LENGTH; /* Eat it */ + len -= MS_AUTH_RESPONSE_LENGTH; + if ((len >= 3) && !strncmp((char *)msg, " M=", 3)) { + msg += 3; /* Eat the delimiter */ + } else if (len) { + /* Packet has extra text which does not begin " M=" */ + ppp_error("MS-CHAPv2 Success packet is badly formed."); + return 0; + } + return 1; +} + +static void chapms_handle_failure(ppp_pcb *pcb, unsigned char *inp, int len) { + int err; + const char *p; + char msg[64]; + LWIP_UNUSED_ARG(pcb); + + /* We want a null-terminated string for strxxx(). */ + len = LWIP_MIN(len, 63); + MEMCPY(msg, inp, len); + msg[len] = 0; + p = msg; + + /* + * Deal with MS-CHAP formatted failure messages; just print the + * M= part (if any). For MS-CHAP we're not really supposed + * to use M=, but it shouldn't hurt. See + * chapms[2]_verify_response. + */ + if (!strncmp(p, "E=", 2)) + err = strtol(p+2, NULL, 10); /* Remember the error code. */ + else + goto print_msg; /* Message is badly formatted. */ + + if (len && ((p = strstr(p, " M=")) != NULL)) { + /* M= field found. */ + p += 3; + } else { + /* No M=; use the error code. */ + switch (err) { + case MS_CHAP_ERROR_RESTRICTED_LOGON_HOURS: + p = "E=646 Restricted logon hours"; + break; + + case MS_CHAP_ERROR_ACCT_DISABLED: + p = "E=647 Account disabled"; + break; + + case MS_CHAP_ERROR_PASSWD_EXPIRED: + p = "E=648 Password expired"; + break; + + case MS_CHAP_ERROR_NO_DIALIN_PERMISSION: + p = "E=649 No dialin permission"; + break; + + case MS_CHAP_ERROR_AUTHENTICATION_FAILURE: + p = "E=691 Authentication failure"; + break; + + case MS_CHAP_ERROR_CHANGING_PASSWORD: + /* Should never see this, we don't support Change Password. */ + p = "E=709 Error changing password"; + break; + + default: + ppp_error("Unknown MS-CHAP authentication failure: %.*v", + len, inp); + return; + } + } +print_msg: + if (p != NULL) + ppp_error("MS-CHAP authentication failed: %v", p); +} + +static void ChallengeResponse(const u_char *challenge, + const u_char PasswordHash[MD4_SIGNATURE_SIZE], + u_char response[24]) { + u_char ZPasswordHash[21]; + lwip_des_context des; + u_char des_key[8]; + + BZERO(ZPasswordHash, sizeof(ZPasswordHash)); + MEMCPY(ZPasswordHash, PasswordHash, MD4_SIGNATURE_SIZE); + +#if 0 + dbglog("ChallengeResponse - ZPasswordHash %.*B", + sizeof(ZPasswordHash), ZPasswordHash); +#endif + + pppcrypt_56_to_64_bit_key(ZPasswordHash + 0, des_key); + lwip_des_init(&des); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, challenge, response +0); + lwip_des_free(&des); + + pppcrypt_56_to_64_bit_key(ZPasswordHash + 7, des_key); + lwip_des_init(&des); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, challenge, response +8); + lwip_des_free(&des); + + pppcrypt_56_to_64_bit_key(ZPasswordHash + 14, des_key); + lwip_des_init(&des); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, challenge, response +16); + lwip_des_free(&des); + +#if 0 + dbglog("ChallengeResponse - response %.24B", response); +#endif +} + +static void ChallengeHash(const u_char PeerChallenge[16], const u_char *rchallenge, + const char *username, u_char Challenge[8]) { + lwip_sha1_context sha1Context; + u_char sha1Hash[SHA1_SIGNATURE_SIZE]; + const char *user; + + /* remove domain from "domain\username" */ + if ((user = strrchr(username, '\\')) != NULL) + ++user; + else + user = username; + + lwip_sha1_init(&sha1Context); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PeerChallenge, 16); + lwip_sha1_update(&sha1Context, rchallenge, 16); + lwip_sha1_update(&sha1Context, (const unsigned char*)user, strlen(user)); + lwip_sha1_finish(&sha1Context, sha1Hash); + lwip_sha1_free(&sha1Context); + + MEMCPY(Challenge, sha1Hash, 8); +} + +/* + * Convert the ASCII version of the password to Unicode. + * This implicitly supports 8-bit ISO8859/1 characters. + * This gives us the little-endian representation, which + * is assumed by all M$ CHAP RFCs. (Unicode byte ordering + * is machine-dependent.) + */ +static void ascii2unicode(const char ascii[], int ascii_len, u_char unicode[]) { + int i; + + BZERO(unicode, ascii_len * 2); + for (i = 0; i < ascii_len; i++) + unicode[i * 2] = (u_char) ascii[i]; +} + +static void NTPasswordHash(u_char *secret, int secret_len, u_char hash[MD4_SIGNATURE_SIZE]) { + lwip_md4_context md4Context; + + lwip_md4_init(&md4Context); + lwip_md4_starts(&md4Context); + lwip_md4_update(&md4Context, secret, secret_len); + lwip_md4_finish(&md4Context, hash); + lwip_md4_free(&md4Context); +} + +static void ChapMS_NT(const u_char *rchallenge, const char *secret, int secret_len, + u_char NTResponse[24]) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + + /* Hash the Unicode version of the secret (== password). */ + ascii2unicode(secret, secret_len, unicodePassword); + NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); + + ChallengeResponse(rchallenge, PasswordHash, NTResponse); +} + +static void ChapMS2_NT(const u_char *rchallenge, const u_char PeerChallenge[16], const char *username, + const char *secret, int secret_len, u_char NTResponse[24]) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char Challenge[8]; + + ChallengeHash(PeerChallenge, rchallenge, username, Challenge); + + /* Hash the Unicode version of the secret (== password). */ + ascii2unicode(secret, secret_len, unicodePassword); + NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); + + ChallengeResponse(Challenge, PasswordHash, NTResponse); +} + +#ifdef MSLANMAN +static u_char *StdText = (u_char *)"KGS!@#$%"; /* key from rasapi32.dll */ + +static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len, + unsigned char *response) { + int i; + u_char UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */ + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + lwip_des_context des; + u_char des_key[8]; + + /* LANMan password is case insensitive */ + BZERO(UcasePassword, sizeof(UcasePassword)); + for (i = 0; i < secret_len; i++) + UcasePassword[i] = (u_char)toupper(secret[i]); + + pppcrypt_56_to_64_bit_key(UcasePassword +0, des_key); + lwip_des_init(&des); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, StdText, PasswordHash +0); + lwip_des_free(&des); + + pppcrypt_56_to_64_bit_key(UcasePassword +7, des_key); + lwip_des_init(&des); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, StdText, PasswordHash +8); + lwip_des_free(&des); + + ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]); +} +#endif + + +static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGNATURE_SIZE], + u_char NTResponse[24], const u_char PeerChallenge[16], + const u_char *rchallenge, const char *username, + u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { + /* + * "Magic" constants used in response generation, from RFC 2759. + */ + static const u_char Magic1[39] = /* "Magic server to client signing constant" */ + { 0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65, + 0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67, + 0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74 }; + static const u_char Magic2[41] = /* "Pad to make it do more than one iteration" */ + { 0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B, + 0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F, + 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E, + 0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F, + 0x6E }; + + int i; + lwip_sha1_context sha1Context; + u_char Digest[SHA1_SIGNATURE_SIZE]; + u_char Challenge[8]; + + lwip_sha1_init(&sha1Context); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, NTResponse, 24); + lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); + lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); + + ChallengeHash(PeerChallenge, rchallenge, username, Challenge); + + lwip_sha1_init(&sha1Context); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, Digest, sizeof(Digest)); + lwip_sha1_update(&sha1Context, Challenge, sizeof(Challenge)); + lwip_sha1_update(&sha1Context, Magic2, sizeof(Magic2)); + lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); + + /* Convert to ASCII hex string. */ + for (i = 0; i < LWIP_MAX((MS_AUTH_RESPONSE_LENGTH / 2), (int)sizeof(Digest)); i++) + sprintf((char *)&authResponse[i * 2], "%02X", Digest[i]); +} + + +static void GenerateAuthenticatorResponsePlain( + const char *secret, int secret_len, + u_char NTResponse[24], const u_char PeerChallenge[16], + const u_char *rchallenge, const char *username, + u_char authResponse[MS_AUTH_RESPONSE_LENGTH+1]) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; + + /* Hash (x2) the Unicode version of the secret (== password). */ + ascii2unicode(secret, secret_len, unicodePassword); + NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); + NTPasswordHash(PasswordHash, sizeof(PasswordHash), + PasswordHashHash); + + GenerateAuthenticatorResponse(PasswordHashHash, NTResponse, PeerChallenge, + rchallenge, username, authResponse); +} + + +#if MPPE_SUPPORT +/* + * Set mppe_xxxx_key from MS-CHAP credentials. (see RFC 3079) + */ +static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, int secret_len) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; + lwip_sha1_context sha1Context; + u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ + + /* Hash (x2) the Unicode version of the secret (== password). */ + ascii2unicode(secret, secret_len, unicodePassword); + NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); + NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); + + lwip_sha1_init(&sha1Context); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, rchallenge, 8); + lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); + + /* Same key in both directions. */ + mppe_set_key(pcb, &pcb->mppe_comp, Digest); + mppe_set_key(pcb, &pcb->mppe_decomp, Digest); + + pcb->mppe_keys_set = 1; +} + +/* + * Set mppe_xxxx_key from MS-CHAPv2 credentials. (see RFC 3079) + */ +static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_char NTResponse[24], int IsServer) { + u_char unicodePassword[MAX_NT_PASSWORD * 2]; + u_char PasswordHash[MD4_SIGNATURE_SIZE]; + u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; + lwip_sha1_context sha1Context; + u_char MasterKey[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ + u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ + const u_char *s; + + /* "This is the MPPE Master Key" */ + static const u_char Magic1[27] = + { 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x4d, 0x50, 0x50, 0x45, 0x20, 0x4d, + 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4b, 0x65, 0x79 }; + /* "On the client side, this is the send key; " + "on the server side, it is the receive key." */ + static const u_char Magic2[84] = + { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x6b, 0x65, 0x79, + 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x69, 0x64, 0x65, + 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, + 0x6b, 0x65, 0x79, 0x2e }; + /* "On the client side, this is the receive key; " + "on the server side, it is the send key." */ + static const u_char Magic3[84] = + { 0x4f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, + 0x6b, 0x65, 0x79, 0x3b, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, + 0x69, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, + 0x6b, 0x65, 0x79, 0x2e }; + + /* Hash (x2) the Unicode version of the secret (== password). */ + ascii2unicode(secret, secret_len, unicodePassword); + NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); + NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); + + lwip_sha1_init(&sha1Context); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, NTResponse, 24); + lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); + lwip_sha1_finish(&sha1Context, MasterKey); + lwip_sha1_free(&sha1Context); + + /* + * generate send key + */ + if (IsServer) + s = Magic3; + else + s = Magic2; + lwip_sha1_init(&sha1Context); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, MasterKey, 16); + lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); + lwip_sha1_update(&sha1Context, s, 84); + lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); + lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); + + mppe_set_key(pcb, &pcb->mppe_comp, Digest); + + /* + * generate recv key + */ + if (IsServer) + s = Magic2; + else + s = Magic3; + lwip_sha1_init(&sha1Context); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, MasterKey, 16); + lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); + lwip_sha1_update(&sha1Context, s, 84); + lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); + lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); + + mppe_set_key(pcb, &pcb->mppe_decomp, Digest); + + pcb->mppe_keys_set = 1; +} + +#endif /* MPPE_SUPPORT */ + + +static void ChapMS(ppp_pcb *pcb, const u_char *rchallenge, const char *secret, int secret_len, + unsigned char *response) { +#if !MPPE_SUPPORT + LWIP_UNUSED_ARG(pcb); +#endif /* !MPPE_SUPPORT */ + BZERO(response, MS_CHAP_RESPONSE_LEN); + + ChapMS_NT(rchallenge, secret, secret_len, &response[MS_CHAP_NTRESP]); + +#ifdef MSLANMAN + ChapMS_LANMan(rchallenge, secret, secret_len, + &response[MS_CHAP_LANMANRESP]); + + /* preferred method is set by option */ + response[MS_CHAP_USENT] = !ms_lanman; +#else + response[MS_CHAP_USENT] = 1; +#endif + +#if MPPE_SUPPORT + Set_Start_Key(pcb, rchallenge, secret, secret_len); +#endif /* MPPE_SUPPORT */ +} + + +/* + * If PeerChallenge is NULL, one is generated and the PeerChallenge + * field of response is filled in. Call this way when generating a response. + * If PeerChallenge is supplied, it is copied into the PeerChallenge field. + * Call this way when verifying a response (or debugging). + * Do not call with PeerChallenge = response. + * + * The PeerChallenge field of response is then used for calculation of the + * Authenticator Response. + */ +static void ChapMS2(ppp_pcb *pcb, const u_char *rchallenge, const u_char *PeerChallenge, + const char *user, const char *secret, int secret_len, unsigned char *response, + u_char authResponse[], int authenticator) { + /* ARGSUSED */ + LWIP_UNUSED_ARG(authenticator); +#if !MPPE_SUPPORT + LWIP_UNUSED_ARG(pcb); +#endif /* !MPPE_SUPPORT */ + + BZERO(response, MS_CHAP2_RESPONSE_LEN); + + /* Generate the Peer-Challenge if requested, or copy it if supplied. */ + if (!PeerChallenge) + magic_random_bytes(&response[MS_CHAP2_PEER_CHALLENGE], MS_CHAP2_PEER_CHAL_LEN); + else + MEMCPY(&response[MS_CHAP2_PEER_CHALLENGE], PeerChallenge, + MS_CHAP2_PEER_CHAL_LEN); + + /* Generate the NT-Response */ + ChapMS2_NT(rchallenge, &response[MS_CHAP2_PEER_CHALLENGE], user, + secret, secret_len, &response[MS_CHAP2_NTRESP]); + + /* Generate the Authenticator Response. */ + GenerateAuthenticatorResponsePlain(secret, secret_len, + &response[MS_CHAP2_NTRESP], + &response[MS_CHAP2_PEER_CHALLENGE], + rchallenge, user, authResponse); + +#if MPPE_SUPPORT + SetMasterKeys(pcb, secret, secret_len, + &response[MS_CHAP2_NTRESP], authenticator); +#endif /* MPPE_SUPPORT */ +} + +#if 0 /* UNUSED */ +#if MPPE_SUPPORT +/* + * Set MPPE options from plugins. + */ +void set_mppe_enc_types(int policy, int types) { + /* Early exit for unknown policies. */ + if (policy != MPPE_ENC_POL_ENC_ALLOWED || + policy != MPPE_ENC_POL_ENC_REQUIRED) + return; + + /* Don't modify MPPE if it's optional and wasn't already configured. */ + if (policy == MPPE_ENC_POL_ENC_ALLOWED && !ccp_wantoptions[0].mppe) + return; + + /* + * Disable undesirable encryption types. Note that we don't ENABLE + * any encryption types, to avoid overriding manual configuration. + */ + switch(types) { + case MPPE_ENC_TYPES_RC4_40: + ccp_wantoptions[0].mppe &= ~MPPE_OPT_128; /* disable 128-bit */ + break; + case MPPE_ENC_TYPES_RC4_128: + ccp_wantoptions[0].mppe &= ~MPPE_OPT_40; /* disable 40-bit */ + break; + default: + break; + } +} +#endif /* MPPE_SUPPORT */ +#endif /* UNUSED */ + +const struct chap_digest_type chapms_digest = { + CHAP_MICROSOFT, /* code */ +#if PPP_SERVER + chapms_generate_challenge, + chapms_verify_response, +#endif /* PPP_SERVER */ + chapms_make_response, + NULL, /* check_success */ + chapms_handle_failure, +}; + +const struct chap_digest_type chapms2_digest = { + CHAP_MICROSOFT_V2, /* code */ +#if PPP_SERVER + chapms2_generate_challenge, + chapms2_verify_response, +#endif /* PPP_SERVER */ + chapms2_make_response, + chapms2_check_success, + chapms_handle_failure, +}; + +#endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/demand.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/demand.c index 26c6c30..0bd3598 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/demand.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/demand.c @@ -1,465 +1,465 @@ -/* - * demand.c - Support routines for demand-dialling. - * - * Copyright (c) 1996-2002 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && DEMAND_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef PPP_FILTER -#include -#endif - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/ipcp.h" -#include "netif/ppp/lcp.h" - -char *frame; -int framelen; -int framemax; -int escape_flag; -int flush_flag; -int fcs; - -struct packet { - int length; - struct packet *next; - unsigned char data[1]; -}; - -struct packet *pend_q; -struct packet *pend_qtail; - -static int active_packet (unsigned char *, int); - -/* - * demand_conf - configure the interface for doing dial-on-demand. - */ -void -demand_conf() -{ - int i; - const struct protent *protp; - -/* framemax = lcp_allowoptions[0].mru; - if (framemax < PPP_MRU) */ - framemax = PPP_MRU; - framemax += PPP_HDRLEN + PPP_FCSLEN; - frame = malloc(framemax); - if (frame == NULL) - novm("demand frame"); - framelen = 0; - pend_q = NULL; - escape_flag = 0; - flush_flag = 0; - fcs = PPP_INITFCS; - - netif_set_mtu(pcb, LWIP_MIN(lcp_allowoptions[0].mru, PPP_MRU)); - if (ppp_send_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0 - || ppp_recv_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0) - fatal("Couldn't set up demand-dialled PPP interface: %m"); - -#ifdef PPP_FILTER - set_filters(&pass_filter, &active_filter); -#endif - - /* - * Call the demand_conf procedure for each protocol that's got one. - */ - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - ((*protp->demand_conf)(pcb)); -/* FIXME: find a way to die() here */ -#if 0 - if (!((*protp->demand_conf)(pcb))) - die(1); -#endif -} - - -/* - * demand_block - set each network protocol to block further packets. - */ -void -demand_block() -{ - int i; - const struct protent *protp; - - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_QUEUE); - get_loop_output(); -} - -/* - * demand_discard - set each network protocol to discard packets - * with an error. - */ -void -demand_discard() -{ - struct packet *pkt, *nextpkt; - int i; - const struct protent *protp; - - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_ERROR); - get_loop_output(); - - /* discard all saved packets */ - for (pkt = pend_q; pkt != NULL; pkt = nextpkt) { - nextpkt = pkt->next; - free(pkt); - } - pend_q = NULL; - framelen = 0; - flush_flag = 0; - escape_flag = 0; - fcs = PPP_INITFCS; -} - -/* - * demand_unblock - set each enabled network protocol to pass packets. - */ -void -demand_unblock() -{ - int i; - const struct protent *protp; - - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->demand_conf != NULL) - sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_PASS); -} - -/* - * FCS lookup table as calculated by genfcstab. - */ -static u_short fcstab[256] = { - 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, - 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, - 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, - 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, - 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, - 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, - 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, - 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, - 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, - 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, - 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, - 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, - 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, - 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, - 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, - 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, - 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, - 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, - 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, - 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, - 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, - 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, - 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, - 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, - 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, - 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, - 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, - 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, - 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, - 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, - 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, - 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 -}; - -/* - * loop_chars - process characters received from the loopback. - * Calls loop_frame when a complete frame has been accumulated. - * Return value is 1 if we need to bring up the link, 0 otherwise. - */ -int -loop_chars(p, n) - unsigned char *p; - int n; -{ - int c, rv; - - rv = 0; - -/* check for synchronous connection... */ - - if ( (p[0] == 0xFF) && (p[1] == 0x03) ) { - rv = loop_frame(p,n); - return rv; - } - - for (; n > 0; --n) { - c = *p++; - if (c == PPP_FLAG) { - if (!escape_flag && !flush_flag - && framelen > 2 && fcs == PPP_GOODFCS) { - framelen -= 2; - if (loop_frame((unsigned char *)frame, framelen)) - rv = 1; - } - framelen = 0; - flush_flag = 0; - escape_flag = 0; - fcs = PPP_INITFCS; - continue; - } - if (flush_flag) - continue; - if (escape_flag) { - c ^= PPP_TRANS; - escape_flag = 0; - } else if (c == PPP_ESCAPE) { - escape_flag = 1; - continue; - } - if (framelen >= framemax) { - flush_flag = 1; - continue; - } - frame[framelen++] = c; - fcs = PPP_FCS(fcs, c); - } - return rv; -} - -/* - * loop_frame - given a frame obtained from the loopback, - * decide whether to bring up the link or not, and, if we want - * to transmit this frame later, put it on the pending queue. - * Return value is 1 if we need to bring up the link, 0 otherwise. - * We assume that the kernel driver has already applied the - * pass_filter, so we won't get packets it rejected. - * We apply the active_filter to see if we want this packet to - * bring up the link. - */ -int -loop_frame(frame, len) - unsigned char *frame; - int len; -{ - struct packet *pkt; - - /* dbglog("from loop: %P", frame, len); */ - if (len < PPP_HDRLEN) - return 0; - if ((PPP_PROTOCOL(frame) & 0x8000) != 0) - return 0; /* shouldn't get any of these anyway */ - if (!active_packet(frame, len)) - return 0; - - pkt = (struct packet *) malloc(sizeof(struct packet) + len); - if (pkt != NULL) { - pkt->length = len; - pkt->next = NULL; - memcpy(pkt->data, frame, len); - if (pend_q == NULL) - pend_q = pkt; - else - pend_qtail->next = pkt; - pend_qtail = pkt; - } - return 1; -} - -/* - * demand_rexmit - Resend all those frames which we got via the - * loopback, now that the real serial link is up. - */ -void -demand_rexmit(proto, newip) - int proto; - u32_t newip; -{ - struct packet *pkt, *prev, *nextpkt; - unsigned short checksum; - unsigned short pkt_checksum = 0; - unsigned iphdr; - struct timeval tv; - char cv = 0; - char ipstr[16]; - - prev = NULL; - pkt = pend_q; - pend_q = NULL; - tv.tv_sec = 1; - tv.tv_usec = 0; - select(0,NULL,NULL,NULL,&tv); /* Sleep for 1 Seconds */ - for (; pkt != NULL; pkt = nextpkt) { - nextpkt = pkt->next; - if (PPP_PROTOCOL(pkt->data) == proto) { - if ( (proto == PPP_IP) && newip ) { - /* Get old checksum */ - - iphdr = (pkt->data[4] & 15) << 2; - checksum = *((unsigned short *) (pkt->data+14)); - if (checksum == 0xFFFF) { - checksum = 0; - } - - - if (pkt->data[13] == 17) { - pkt_checksum = *((unsigned short *) (pkt->data+10+iphdr)); - if (pkt_checksum) { - cv = 1; - if (pkt_checksum == 0xFFFF) { - pkt_checksum = 0; - } - } - else { - cv = 0; - } - } - - if (pkt->data[13] == 6) { - pkt_checksum = *((unsigned short *) (pkt->data+20+iphdr)); - cv = 1; - if (pkt_checksum == 0xFFFF) { - pkt_checksum = 0; - } - } - - /* Delete old Source-IP-Address */ - checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; - checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; - - pkt_checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; - pkt_checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; - - /* Change Source-IP-Address */ - * ((u32_t *) (pkt->data + 16)) = newip; - - /* Add new Source-IP-Address */ - checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; - checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; - - pkt_checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; - pkt_checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; - - /* Write new checksum */ - if (!checksum) { - checksum = 0xFFFF; - } - *((unsigned short *) (pkt->data+14)) = checksum; - if (pkt->data[13] == 6) { - *((unsigned short *) (pkt->data+20+iphdr)) = pkt_checksum; - } - if (cv && (pkt->data[13] == 17) ) { - *((unsigned short *) (pkt->data+10+iphdr)) = pkt_checksum; - } - - /* Log Packet */ - strcpy(ipstr,inet_ntoa(*( (struct in_addr *) (pkt->data+16)))); - if (pkt->data[13] == 1) { - syslog(LOG_INFO,"Open ICMP %s -> %s\n", - ipstr, - inet_ntoa(*( (struct in_addr *) (pkt->data+20)))); - } else { - syslog(LOG_INFO,"Open %s %s:%d -> %s:%d\n", - pkt->data[13] == 6 ? "TCP" : "UDP", - ipstr, - ntohs(*( (short *) (pkt->data+iphdr+4))), - inet_ntoa(*( (struct in_addr *) (pkt->data+20))), - ntohs(*( (short *) (pkt->data+iphdr+6)))); - } - } - output(pcb, pkt->data, pkt->length); - free(pkt); - } else { - if (prev == NULL) - pend_q = pkt; - else - prev->next = pkt; - prev = pkt; - } - } - pend_qtail = prev; - if (prev != NULL) - prev->next = NULL; -} - -/* - * Scan a packet to decide whether it is an "active" packet, - * that is, whether it is worth bringing up the link for. - */ -static int -active_packet(p, len) - unsigned char *p; - int len; -{ - int proto, i; - const struct protent *protp; - - if (len < PPP_HDRLEN) - return 0; - proto = PPP_PROTOCOL(p); -#ifdef PPP_FILTER - p[0] = 1; /* outbound packet indicator */ - if ((pass_filter.bf_len != 0 - && bpf_filter(pass_filter.bf_insns, p, len, len) == 0) - || (active_filter.bf_len != 0 - && bpf_filter(active_filter.bf_insns, p, len, len) == 0)) { - p[0] = 0xff; - return 0; - } - p[0] = 0xff; -#endif - for (i = 0; (protp = protocols[i]) != NULL; ++i) { - if (protp->protocol < 0xC000 && (protp->protocol & ~0x8000) == proto) { - if (protp->active_pkt == NULL) - return 1; - return (*protp->active_pkt)(p, len); - } - } - return 0; /* not a supported protocol !!?? */ -} - -#endif /* PPP_SUPPORT && DEMAND_SUPPORT */ +/* + * demand.c - Support routines for demand-dialling. + * + * Copyright (c) 1996-2002 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && DEMAND_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef PPP_FILTER +#include +#endif + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/ipcp.h" +#include "netif/ppp/lcp.h" + +char *frame; +int framelen; +int framemax; +int escape_flag; +int flush_flag; +int fcs; + +struct packet { + int length; + struct packet *next; + unsigned char data[1]; +}; + +struct packet *pend_q; +struct packet *pend_qtail; + +static int active_packet (unsigned char *, int); + +/* + * demand_conf - configure the interface for doing dial-on-demand. + */ +void +demand_conf() +{ + int i; + const struct protent *protp; + +/* framemax = lcp_allowoptions[0].mru; + if (framemax < PPP_MRU) */ + framemax = PPP_MRU; + framemax += PPP_HDRLEN + PPP_FCSLEN; + frame = malloc(framemax); + if (frame == NULL) + novm("demand frame"); + framelen = 0; + pend_q = NULL; + escape_flag = 0; + flush_flag = 0; + fcs = PPP_INITFCS; + + netif_set_mtu(pcb, LWIP_MIN(lcp_allowoptions[0].mru, PPP_MRU)); + if (ppp_send_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0 + || ppp_recv_config(pcb, PPP_MRU, (u32_t) 0, 0, 0) < 0) + fatal("Couldn't set up demand-dialled PPP interface: %m"); + +#ifdef PPP_FILTER + set_filters(&pass_filter, &active_filter); +#endif + + /* + * Call the demand_conf procedure for each protocol that's got one. + */ + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->demand_conf != NULL) + ((*protp->demand_conf)(pcb)); +/* FIXME: find a way to die() here */ +#if 0 + if (!((*protp->demand_conf)(pcb))) + die(1); +#endif +} + + +/* + * demand_block - set each network protocol to block further packets. + */ +void +demand_block() +{ + int i; + const struct protent *protp; + + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->demand_conf != NULL) + sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_QUEUE); + get_loop_output(); +} + +/* + * demand_discard - set each network protocol to discard packets + * with an error. + */ +void +demand_discard() +{ + struct packet *pkt, *nextpkt; + int i; + const struct protent *protp; + + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->demand_conf != NULL) + sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_ERROR); + get_loop_output(); + + /* discard all saved packets */ + for (pkt = pend_q; pkt != NULL; pkt = nextpkt) { + nextpkt = pkt->next; + free(pkt); + } + pend_q = NULL; + framelen = 0; + flush_flag = 0; + escape_flag = 0; + fcs = PPP_INITFCS; +} + +/* + * demand_unblock - set each enabled network protocol to pass packets. + */ +void +demand_unblock() +{ + int i; + const struct protent *protp; + + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->demand_conf != NULL) + sifnpmode(pcb, protp->protocol & ~0x8000, NPMODE_PASS); +} + +/* + * FCS lookup table as calculated by genfcstab. + */ +static u_short fcstab[256] = { + 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, + 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, + 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, + 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, + 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, + 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, + 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, + 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, + 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, + 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, + 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, + 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, + 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, + 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, + 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, + 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, + 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, + 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, + 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, + 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, + 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, + 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, + 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, + 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, + 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, + 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, + 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, + 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, + 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, + 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, + 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, + 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 +}; + +/* + * loop_chars - process characters received from the loopback. + * Calls loop_frame when a complete frame has been accumulated. + * Return value is 1 if we need to bring up the link, 0 otherwise. + */ +int +loop_chars(p, n) + unsigned char *p; + int n; +{ + int c, rv; + + rv = 0; + +/* check for synchronous connection... */ + + if ( (p[0] == 0xFF) && (p[1] == 0x03) ) { + rv = loop_frame(p,n); + return rv; + } + + for (; n > 0; --n) { + c = *p++; + if (c == PPP_FLAG) { + if (!escape_flag && !flush_flag + && framelen > 2 && fcs == PPP_GOODFCS) { + framelen -= 2; + if (loop_frame((unsigned char *)frame, framelen)) + rv = 1; + } + framelen = 0; + flush_flag = 0; + escape_flag = 0; + fcs = PPP_INITFCS; + continue; + } + if (flush_flag) + continue; + if (escape_flag) { + c ^= PPP_TRANS; + escape_flag = 0; + } else if (c == PPP_ESCAPE) { + escape_flag = 1; + continue; + } + if (framelen >= framemax) { + flush_flag = 1; + continue; + } + frame[framelen++] = c; + fcs = PPP_FCS(fcs, c); + } + return rv; +} + +/* + * loop_frame - given a frame obtained from the loopback, + * decide whether to bring up the link or not, and, if we want + * to transmit this frame later, put it on the pending queue. + * Return value is 1 if we need to bring up the link, 0 otherwise. + * We assume that the kernel driver has already applied the + * pass_filter, so we won't get packets it rejected. + * We apply the active_filter to see if we want this packet to + * bring up the link. + */ +int +loop_frame(frame, len) + unsigned char *frame; + int len; +{ + struct packet *pkt; + + /* dbglog("from loop: %P", frame, len); */ + if (len < PPP_HDRLEN) + return 0; + if ((PPP_PROTOCOL(frame) & 0x8000) != 0) + return 0; /* shouldn't get any of these anyway */ + if (!active_packet(frame, len)) + return 0; + + pkt = (struct packet *) malloc(sizeof(struct packet) + len); + if (pkt != NULL) { + pkt->length = len; + pkt->next = NULL; + memcpy(pkt->data, frame, len); + if (pend_q == NULL) + pend_q = pkt; + else + pend_qtail->next = pkt; + pend_qtail = pkt; + } + return 1; +} + +/* + * demand_rexmit - Resend all those frames which we got via the + * loopback, now that the real serial link is up. + */ +void +demand_rexmit(proto, newip) + int proto; + u32_t newip; +{ + struct packet *pkt, *prev, *nextpkt; + unsigned short checksum; + unsigned short pkt_checksum = 0; + unsigned iphdr; + struct timeval tv; + char cv = 0; + char ipstr[16]; + + prev = NULL; + pkt = pend_q; + pend_q = NULL; + tv.tv_sec = 1; + tv.tv_usec = 0; + select(0,NULL,NULL,NULL,&tv); /* Sleep for 1 Seconds */ + for (; pkt != NULL; pkt = nextpkt) { + nextpkt = pkt->next; + if (PPP_PROTOCOL(pkt->data) == proto) { + if ( (proto == PPP_IP) && newip ) { + /* Get old checksum */ + + iphdr = (pkt->data[4] & 15) << 2; + checksum = *((unsigned short *) (pkt->data+14)); + if (checksum == 0xFFFF) { + checksum = 0; + } + + + if (pkt->data[13] == 17) { + pkt_checksum = *((unsigned short *) (pkt->data+10+iphdr)); + if (pkt_checksum) { + cv = 1; + if (pkt_checksum == 0xFFFF) { + pkt_checksum = 0; + } + } + else { + cv = 0; + } + } + + if (pkt->data[13] == 6) { + pkt_checksum = *((unsigned short *) (pkt->data+20+iphdr)); + cv = 1; + if (pkt_checksum == 0xFFFF) { + pkt_checksum = 0; + } + } + + /* Delete old Source-IP-Address */ + checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; + checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; + + pkt_checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; + pkt_checksum -= *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; + + /* Change Source-IP-Address */ + * ((u32_t *) (pkt->data + 16)) = newip; + + /* Add new Source-IP-Address */ + checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; + checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; + + pkt_checksum += *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; + pkt_checksum += *((unsigned short *) (pkt->data+18)) ^ 0xFFFF; + + /* Write new checksum */ + if (!checksum) { + checksum = 0xFFFF; + } + *((unsigned short *) (pkt->data+14)) = checksum; + if (pkt->data[13] == 6) { + *((unsigned short *) (pkt->data+20+iphdr)) = pkt_checksum; + } + if (cv && (pkt->data[13] == 17) ) { + *((unsigned short *) (pkt->data+10+iphdr)) = pkt_checksum; + } + + /* Log Packet */ + strcpy(ipstr,inet_ntoa(*( (struct in_addr *) (pkt->data+16)))); + if (pkt->data[13] == 1) { + syslog(LOG_INFO,"Open ICMP %s -> %s\n", + ipstr, + inet_ntoa(*( (struct in_addr *) (pkt->data+20)))); + } else { + syslog(LOG_INFO,"Open %s %s:%d -> %s:%d\n", + pkt->data[13] == 6 ? "TCP" : "UDP", + ipstr, + ntohs(*( (short *) (pkt->data+iphdr+4))), + inet_ntoa(*( (struct in_addr *) (pkt->data+20))), + ntohs(*( (short *) (pkt->data+iphdr+6)))); + } + } + output(pcb, pkt->data, pkt->length); + free(pkt); + } else { + if (prev == NULL) + pend_q = pkt; + else + prev->next = pkt; + prev = pkt; + } + } + pend_qtail = prev; + if (prev != NULL) + prev->next = NULL; +} + +/* + * Scan a packet to decide whether it is an "active" packet, + * that is, whether it is worth bringing up the link for. + */ +static int +active_packet(p, len) + unsigned char *p; + int len; +{ + int proto, i; + const struct protent *protp; + + if (len < PPP_HDRLEN) + return 0; + proto = PPP_PROTOCOL(p); +#ifdef PPP_FILTER + p[0] = 1; /* outbound packet indicator */ + if ((pass_filter.bf_len != 0 + && bpf_filter(pass_filter.bf_insns, p, len, len) == 0) + || (active_filter.bf_len != 0 + && bpf_filter(active_filter.bf_insns, p, len, len) == 0)) { + p[0] = 0xff; + return 0; + } + p[0] = 0xff; +#endif + for (i = 0; (protp = protocols[i]) != NULL; ++i) { + if (protp->protocol < 0xC000 && (protp->protocol & ~0x8000) == proto) { + if (protp->active_pkt == NULL) + return 1; + return (*protp->active_pkt)(p, len); + } + } + return 0; /* not a supported protocol !!?? */ +} + +#endif /* PPP_SUPPORT && DEMAND_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eap.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eap.c index 8fb5636..5000e26 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eap.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eap.c @@ -1,2423 +1,2423 @@ -/* - * eap.c - Extensible Authentication Protocol for PPP (RFC 2284) - * - * Copyright (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * Non-exclusive rights to redistribute, modify, translate, and use - * this software in source and binary forms, in whole or in part, is - * hereby granted, provided that the above copyright notice is - * duplicated in any source form, and that neither the name of the - * copyright holder nor the author is used to endorse or promote - * products derived from this software. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Original version by James Carlson - * - * This implementation of EAP supports MD5-Challenge and SRP-SHA1 - * authentication styles. Note that support of MD5-Challenge is a - * requirement of RFC 2284, and that it's essentially just a - * reimplementation of regular RFC 1994 CHAP using EAP messages. - * - * As an authenticator ("server"), there are multiple phases for each - * style. In the first phase of each style, the unauthenticated peer - * name is queried using the EAP Identity request type. If the - * "remotename" option is used, then this phase is skipped, because - * the peer's name is presumed to be known. - * - * For MD5-Challenge, there are two phases, and the second phase - * consists of sending the challenge itself and handling the - * associated response. - * - * For SRP-SHA1, there are four phases. The second sends 's', 'N', - * and 'g'. The reply contains 'A'. The third sends 'B', and the - * reply contains 'M1'. The forth sends the 'M2' value. - * - * As an authenticatee ("client"), there's just a single phase -- - * responding to the queries generated by the peer. EAP is an - * authenticator-driven protocol. - * - * Based on draft-ietf-pppext-eap-srp-03.txt. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/eap.h" -#include "netif/ppp/magic.h" -#include "netif/ppp/pppcrypt.h" - -#ifdef USE_SRP -#include -#include -#include -#endif /* USE_SRP */ - -#ifndef SHA_DIGESTSIZE -#define SHA_DIGESTSIZE 20 -#endif - -#ifdef USE_SRP -static char *pn_secret = NULL; /* Pseudonym generating secret */ -#endif - -#if PPP_OPTIONS -/* - * Command-line options. - */ -static option_t eap_option_list[] = { - { "eap-restart", o_int, &eap_states[0].es_server.ea_timeout, - "Set retransmit timeout for EAP Requests (server)" }, - { "eap-max-sreq", o_int, &eap_states[0].es_server.ea_maxrequests, - "Set max number of EAP Requests sent (server)" }, - { "eap-timeout", o_int, &eap_states[0].es_client.ea_timeout, - "Set time limit for peer EAP authentication" }, - { "eap-max-rreq", o_int, &eap_states[0].es_client.ea_maxrequests, - "Set max number of EAP Requests allows (client)" }, - { "eap-interval", o_int, &eap_states[0].es_rechallenge, - "Set interval for EAP rechallenge" }, -#ifdef USE_SRP - { "srp-interval", o_int, &eap_states[0].es_lwrechallenge, - "Set interval for SRP lightweight rechallenge" }, - { "srp-pn-secret", o_string, &pn_secret, - "Long term pseudonym generation secret" }, - { "srp-use-pseudonym", o_bool, &eap_states[0].es_usepseudo, - "Use pseudonym if offered one by server", 1 }, -#endif - { NULL } -}; -#endif /* PPP_OPTIONS */ - -/* - * Protocol entry points. - */ -static void eap_init(ppp_pcb *pcb); -static void eap_input(ppp_pcb *pcb, u_char *inp, int inlen); -static void eap_protrej(ppp_pcb *pcb); -static void eap_lowerup(ppp_pcb *pcb); -static void eap_lowerdown(ppp_pcb *pcb); -#if PRINTPKT_SUPPORT -static int eap_printpkt(const u_char *inp, int inlen, - void (*)(void *arg, const char *fmt, ...), void *arg); -#endif /* PRINTPKT_SUPPORT */ - -const struct protent eap_protent = { - PPP_EAP, /* protocol number */ - eap_init, /* initialization procedure */ - eap_input, /* process a received packet */ - eap_protrej, /* process a received protocol-reject */ - eap_lowerup, /* lower layer has gone up */ - eap_lowerdown, /* lower layer has gone down */ - NULL, /* open the protocol */ - NULL, /* close the protocol */ -#if PRINTPKT_SUPPORT - eap_printpkt, /* print a packet in readable form */ -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - NULL, /* process a received data packet */ -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "EAP", /* text name of protocol */ - NULL, /* text name of corresponding data protocol */ -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - eap_option_list, /* list of command-line options */ - NULL, /* check requested options; assign defaults */ -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - NULL, /* configure interface for demand-dial */ - NULL /* say whether to bring up link for this pkt */ -#endif /* DEMAND_SUPPORT */ -}; - -#ifdef USE_SRP -/* - * A well-known 2048 bit modulus. - */ -static const u_char wkmodulus[] = { - 0xAC, 0x6B, 0xDB, 0x41, 0x32, 0x4A, 0x9A, 0x9B, - 0xF1, 0x66, 0xDE, 0x5E, 0x13, 0x89, 0x58, 0x2F, - 0xAF, 0x72, 0xB6, 0x65, 0x19, 0x87, 0xEE, 0x07, - 0xFC, 0x31, 0x92, 0x94, 0x3D, 0xB5, 0x60, 0x50, - 0xA3, 0x73, 0x29, 0xCB, 0xB4, 0xA0, 0x99, 0xED, - 0x81, 0x93, 0xE0, 0x75, 0x77, 0x67, 0xA1, 0x3D, - 0xD5, 0x23, 0x12, 0xAB, 0x4B, 0x03, 0x31, 0x0D, - 0xCD, 0x7F, 0x48, 0xA9, 0xDA, 0x04, 0xFD, 0x50, - 0xE8, 0x08, 0x39, 0x69, 0xED, 0xB7, 0x67, 0xB0, - 0xCF, 0x60, 0x95, 0x17, 0x9A, 0x16, 0x3A, 0xB3, - 0x66, 0x1A, 0x05, 0xFB, 0xD5, 0xFA, 0xAA, 0xE8, - 0x29, 0x18, 0xA9, 0x96, 0x2F, 0x0B, 0x93, 0xB8, - 0x55, 0xF9, 0x79, 0x93, 0xEC, 0x97, 0x5E, 0xEA, - 0xA8, 0x0D, 0x74, 0x0A, 0xDB, 0xF4, 0xFF, 0x74, - 0x73, 0x59, 0xD0, 0x41, 0xD5, 0xC3, 0x3E, 0xA7, - 0x1D, 0x28, 0x1E, 0x44, 0x6B, 0x14, 0x77, 0x3B, - 0xCA, 0x97, 0xB4, 0x3A, 0x23, 0xFB, 0x80, 0x16, - 0x76, 0xBD, 0x20, 0x7A, 0x43, 0x6C, 0x64, 0x81, - 0xF1, 0xD2, 0xB9, 0x07, 0x87, 0x17, 0x46, 0x1A, - 0x5B, 0x9D, 0x32, 0xE6, 0x88, 0xF8, 0x77, 0x48, - 0x54, 0x45, 0x23, 0xB5, 0x24, 0xB0, 0xD5, 0x7D, - 0x5E, 0xA7, 0x7A, 0x27, 0x75, 0xD2, 0xEC, 0xFA, - 0x03, 0x2C, 0xFB, 0xDB, 0xF5, 0x2F, 0xB3, 0x78, - 0x61, 0x60, 0x27, 0x90, 0x04, 0xE5, 0x7A, 0xE6, - 0xAF, 0x87, 0x4E, 0x73, 0x03, 0xCE, 0x53, 0x29, - 0x9C, 0xCC, 0x04, 0x1C, 0x7B, 0xC3, 0x08, 0xD8, - 0x2A, 0x56, 0x98, 0xF3, 0xA8, 0xD0, 0xC3, 0x82, - 0x71, 0xAE, 0x35, 0xF8, 0xE9, 0xDB, 0xFB, 0xB6, - 0x94, 0xB5, 0xC8, 0x03, 0xD8, 0x9F, 0x7A, 0xE4, - 0x35, 0xDE, 0x23, 0x6D, 0x52, 0x5F, 0x54, 0x75, - 0x9B, 0x65, 0xE3, 0x72, 0xFC, 0xD6, 0x8E, 0xF2, - 0x0F, 0xA7, 0x11, 0x1F, 0x9E, 0x4A, 0xFF, 0x73 -}; -#endif - -#if PPP_SERVER -/* Local forward declarations. */ -static void eap_server_timeout(void *arg); -#endif /* PPP_SERVER */ - -/* - * Convert EAP state code to printable string for debug. - */ -static const char * eap_state_name(enum eap_state_code esc) -{ - static const char *state_names[] = { EAP_STATES }; - - return (state_names[(int)esc]); -} - -/* - * eap_init - Initialize state for an EAP user. This is currently - * called once by main() during start-up. - */ -static void eap_init(ppp_pcb *pcb) { - - BZERO(&pcb->eap, sizeof(eap_state)); -#if PPP_SERVER - pcb->eap.es_server.ea_id = magic(); -#endif /* PPP_SERVER */ -} - -/* - * eap_client_timeout - Give up waiting for the peer to send any - * Request messages. - */ -static void eap_client_timeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - - if (!eap_client_active(pcb)) - return; - - ppp_error("EAP: timeout waiting for Request from peer"); - auth_withpeer_fail(pcb, PPP_EAP); - pcb->eap.es_client.ea_state = eapBadAuth; -} - -/* - * eap_authwithpeer - Authenticate to our peer (behave as client). - * - * Start client state and wait for requests. This is called only - * after eap_lowerup. - */ -void eap_authwithpeer(ppp_pcb *pcb, const char *localname) { - - if(NULL == localname) - return; - - /* Save the peer name we're given */ - pcb->eap.es_client.ea_name = localname; - pcb->eap.es_client.ea_namelen = strlen(localname); - - pcb->eap.es_client.ea_state = eapListen; - - /* - * Start a timer so that if the other end just goes - * silent, we don't sit here waiting forever. - */ - if (pcb->settings.eap_req_time > 0) - TIMEOUT(eap_client_timeout, pcb, - pcb->settings.eap_req_time); -} - -#if PPP_SERVER -/* - * Format a standard EAP Failure message and send it to the peer. - * (Server operation) - */ -static void eap_send_failure(ppp_pcb *pcb) { - struct pbuf *p; - u_char *outp; - - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_FAILURE, outp); - pcb->eap.es_server.ea_id++; - PUTCHAR(pcb->eap.es_server.ea_id, outp); - PUTSHORT(EAP_HEADERLEN, outp); - - ppp_write(pcb, p); - - pcb->eap.es_server.ea_state = eapBadAuth; - auth_peer_fail(pcb, PPP_EAP); -} - -/* - * Format a standard EAP Success message and send it to the peer. - * (Server operation) - */ -static void eap_send_success(ppp_pcb *pcb) { - struct pbuf *p; - u_char *outp; - - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_SUCCESS, outp); - pcb->eap.es_server.ea_id++; - PUTCHAR(pcb->eap.es_server.ea_id, outp); - PUTSHORT(EAP_HEADERLEN, outp); - - ppp_write(pcb, p); - - auth_peer_success(pcb, PPP_EAP, 0, - pcb->eap.es_server.ea_peer, pcb->eap.es_server.ea_peerlen); -} -#endif /* PPP_SERVER */ - -#ifdef USE_SRP -/* - * Set DES key according to pseudonym-generating secret and current - * date. - */ -static bool -pncrypt_setkey(int timeoffs) -{ - struct tm *tp; - char tbuf[9]; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; - time_t reftime; - - if (pn_secret == NULL) - return (0); - reftime = time(NULL) + timeoffs; - tp = localtime(&reftime); - SHA1Init(&ctxt); - SHA1Update(&ctxt, pn_secret, strlen(pn_secret)); - strftime(tbuf, sizeof (tbuf), "%Y%m%d", tp); - SHA1Update(&ctxt, tbuf, strlen(tbuf)); - SHA1Final(dig, &ctxt); - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - return (DesSetkey(dig)); -} - -static char base64[] = -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -struct b64state { - u32_t bs_bits; - int bs_offs; -}; - -static int -b64enc(bs, inp, inlen, outp) -struct b64state *bs; -u_char *inp; -int inlen; -u_char *outp; -{ - int outlen = 0; - - while (inlen > 0) { - bs->bs_bits = (bs->bs_bits << 8) | *inp++; - inlen--; - bs->bs_offs += 8; - if (bs->bs_offs >= 24) { - *outp++ = base64[(bs->bs_bits >> 18) & 0x3F]; - *outp++ = base64[(bs->bs_bits >> 12) & 0x3F]; - *outp++ = base64[(bs->bs_bits >> 6) & 0x3F]; - *outp++ = base64[bs->bs_bits & 0x3F]; - outlen += 4; - bs->bs_offs = 0; - bs->bs_bits = 0; - } - } - return (outlen); -} - -static int -b64flush(bs, outp) -struct b64state *bs; -u_char *outp; -{ - int outlen = 0; - - if (bs->bs_offs == 8) { - *outp++ = base64[(bs->bs_bits >> 2) & 0x3F]; - *outp++ = base64[(bs->bs_bits << 4) & 0x3F]; - outlen = 2; - } else if (bs->bs_offs == 16) { - *outp++ = base64[(bs->bs_bits >> 10) & 0x3F]; - *outp++ = base64[(bs->bs_bits >> 4) & 0x3F]; - *outp++ = base64[(bs->bs_bits << 2) & 0x3F]; - outlen = 3; - } - bs->bs_offs = 0; - bs->bs_bits = 0; - return (outlen); -} - -static int -b64dec(bs, inp, inlen, outp) -struct b64state *bs; -u_char *inp; -int inlen; -u_char *outp; -{ - int outlen = 0; - char *cp; - - while (inlen > 0) { - if ((cp = strchr(base64, *inp++)) == NULL) - break; - bs->bs_bits = (bs->bs_bits << 6) | (cp - base64); - inlen--; - bs->bs_offs += 6; - if (bs->bs_offs >= 8) { - *outp++ = bs->bs_bits >> (bs->bs_offs - 8); - outlen++; - bs->bs_offs -= 8; - } - } - return (outlen); -} -#endif /* USE_SRP */ - -#if PPP_SERVER -/* - * Assume that current waiting server state is complete and figure - * next state to use based on available authentication data. 'status' - * indicates if there was an error in handling the last query. It is - * 0 for success and non-zero for failure. - */ -static void eap_figure_next_state(ppp_pcb *pcb, int status) { -#ifdef USE_SRP - unsigned char secbuf[MAXSECRETLEN], clear[8], *sp, *dp; - struct t_pw tpw; - struct t_confent *tce, mytce; - char *cp, *cp2; - struct t_server *ts; - int id, i, plen, toffs; - u_char vals[2]; - struct b64state bs; -#endif /* USE_SRP */ - - pcb->settings.eap_timeout_time = pcb->eap.es_savedtime; - switch (pcb->eap.es_server.ea_state) { - case eapBadAuth: - return; - - case eapIdentify: -#ifdef USE_SRP - /* Discard any previous session. */ - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } -#endif /* USE_SRP */ - if (status != 0) { - pcb->eap.es_server.ea_state = eapBadAuth; - break; - } -#ifdef USE_SRP - /* If we've got a pseudonym, try to decode to real name. */ - if (pcb->eap.es_server.ea_peerlen > SRP_PSEUDO_LEN && - strncmp(pcb->eap.es_server.ea_peer, SRP_PSEUDO_ID, - SRP_PSEUDO_LEN) == 0 && - (pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN) * 3 / 4 < - sizeof (secbuf)) { - BZERO(&bs, sizeof (bs)); - plen = b64dec(&bs, - pcb->eap.es_server.ea_peer + SRP_PSEUDO_LEN, - pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN, - secbuf); - toffs = 0; - for (i = 0; i < 5; i++) { - pncrypt_setkey(toffs); - toffs -= 86400; - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - if (!DesDecrypt(secbuf, clear)) { - ppp_dbglog("no DES here; cannot decode " - "pseudonym"); - return; - } - id = *(unsigned char *)clear; - if (id + 1 <= plen && id + 9 > plen) - break; - } - if (plen % 8 == 0 && i < 5) { - /* - * Note that this is always shorter than the - * original stored string, so there's no need - * to realloc. - */ - if ((i = plen = *(unsigned char *)clear) > 7) - i = 7; - pcb->eap.es_server.ea_peerlen = plen; - dp = (unsigned char *)pcb->eap.es_server.ea_peer; - MEMCPY(dp, clear + 1, i); - plen -= i; - dp += i; - sp = secbuf + 8; - while (plen > 0) { - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - (void) DesDecrypt(sp, dp); - sp += 8; - dp += 8; - plen -= 8; - } - pcb->eap.es_server.ea_peer[ - pcb->eap.es_server.ea_peerlen] = '\0'; - ppp_dbglog("decoded pseudonym to \"%.*q\"", - pcb->eap.es_server.ea_peerlen, - pcb->eap.es_server.ea_peer); - } else { - ppp_dbglog("failed to decode real name"); - /* Stay in eapIdentfy state; requery */ - break; - } - } - /* Look up user in secrets database. */ - if (get_srp_secret(pcb->eap.es_unit, pcb->eap.es_server.ea_peer, - pcb->eap.es_server.ea_name, (char *)secbuf, 1) != 0) { - /* Set up default in case SRP entry is bad */ - pcb->eap.es_server.ea_state = eapMD5Chall; - /* Get t_confent based on index in srp-secrets */ - id = strtol((char *)secbuf, &cp, 10); - if (*cp++ != ':' || id < 0) - break; - if (id == 0) { - mytce.index = 0; - mytce.modulus.data = (u_char *)wkmodulus; - mytce.modulus.len = sizeof (wkmodulus); - mytce.generator.data = (u_char *)"\002"; - mytce.generator.len = 1; - tce = &mytce; - } else if ((tce = gettcid(id)) != NULL) { - /* - * Client will have to verify this modulus/ - * generator combination, and that will take - * a while. Lengthen the timeout here. - */ - if (pcb->settings.eap_timeout_time > 0 && - pcb->settings.eap_timeout_time < 30) - pcb->settings.eap_timeout_time = 30; - } else { - break; - } - if ((cp2 = strchr(cp, ':')) == NULL) - break; - *cp2++ = '\0'; - tpw.pebuf.name = pcb->eap.es_server.ea_peer; - tpw.pebuf.password.len = t_fromb64((char *)tpw.pwbuf, - cp); - tpw.pebuf.password.data = tpw.pwbuf; - tpw.pebuf.salt.len = t_fromb64((char *)tpw.saltbuf, - cp2); - tpw.pebuf.salt.data = tpw.saltbuf; - if ((ts = t_serveropenraw(&tpw.pebuf, tce)) == NULL) - break; - pcb->eap.es_server.ea_session = (void *)ts; - pcb->eap.es_server.ea_state = eapSRP1; - vals[0] = pcb->eap.es_server.ea_id + 1; - vals[1] = EAPT_SRP; - t_serveraddexdata(ts, vals, 2); - /* Generate B; must call before t_servergetkey() */ - t_servergenexp(ts); - break; - } -#endif /* USE_SRP */ - pcb->eap.es_server.ea_state = eapMD5Chall; - break; - - case eapSRP1: -#ifdef USE_SRP - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL && status != 0) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } -#endif /* USE_SRP */ - if (status == 1) { - pcb->eap.es_server.ea_state = eapMD5Chall; - } else if (status != 0 || pcb->eap.es_server.ea_session == NULL) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapSRP2; - } - break; - - case eapSRP2: -#ifdef USE_SRP - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL && status != 0) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } -#endif /* USE_SRP */ - if (status != 0 || pcb->eap.es_server.ea_session == NULL) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapSRP3; - } - break; - - case eapSRP3: - case eapSRP4: -#ifdef USE_SRP - ts = (struct t_server *)pcb->eap.es_server.ea_session; - if (ts != NULL && status != 0) { - t_serverclose(ts); - pcb->eap.es_server.ea_session = NULL; - pcb->eap.es_server.ea_skey = NULL; - } -#endif /* USE_SRP */ - if (status != 0 || pcb->eap.es_server.ea_session == NULL) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapOpen; - } - break; - - case eapMD5Chall: - if (status != 0) { - pcb->eap.es_server.ea_state = eapBadAuth; - } else { - pcb->eap.es_server.ea_state = eapOpen; - } - break; - - default: - pcb->eap.es_server.ea_state = eapBadAuth; - break; - } - if (pcb->eap.es_server.ea_state == eapBadAuth) - eap_send_failure(pcb); -} - -/* - * Format an EAP Request message and send it to the peer. Message - * type depends on current state. (Server operation) - */ -static void eap_send_request(ppp_pcb *pcb) { - struct pbuf *p; - u_char *outp; - u_char *lenloc; - int outlen; - int len; - const char *str; -#ifdef USE_SRP - struct t_server *ts; - u_char clear[8], cipher[8], dig[SHA_DIGESTSIZE], *optr, *cp; - int i, j; - struct b64state b64; - SHA1_CTX ctxt; -#endif /* USE_SRP */ - - /* Handle both initial auth and restart */ - if (pcb->eap.es_server.ea_state < eapIdentify && - pcb->eap.es_server.ea_state != eapInitial) { - pcb->eap.es_server.ea_state = eapIdentify; -#if PPP_REMOTENAME - if (pcb->settings.explicit_remote && pcb->remote_name) { - /* - * If we already know the peer's - * unauthenticated name, then there's no - * reason to ask. Go to next state instead. - */ - int len = (int)strlen(pcb->remote_name); - if (len > MAXNAMELEN) { - len = MAXNAMELEN; - } - MEMCPY(pcb->eap.es_server.ea_peer, pcb->remote_name, len); - pcb->eap.es_server.ea_peer[len] = '\0'; - pcb->eap.es_server.ea_peerlen = len; - eap_figure_next_state(pcb, 0); - } -#endif /* PPP_REMOTENAME */ - } - - if (pcb->settings.eap_max_transmits > 0 && - pcb->eap.es_server.ea_requests >= pcb->settings.eap_max_transmits) { - if (pcb->eap.es_server.ea_responses > 0) - ppp_error("EAP: too many Requests sent"); - else - ppp_error("EAP: no response to Requests"); - eap_send_failure(pcb); - return; - } - - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_CTRL_PBUF_MAX_SIZE), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_REQUEST, outp); - PUTCHAR(pcb->eap.es_server.ea_id, outp); - lenloc = outp; - INCPTR(2, outp); - - switch (pcb->eap.es_server.ea_state) { - case eapIdentify: - PUTCHAR(EAPT_IDENTITY, outp); - str = "Name"; - len = strlen(str); - MEMCPY(outp, str, len); - INCPTR(len, outp); - break; - - case eapMD5Chall: - PUTCHAR(EAPT_MD5CHAP, outp); - /* - * pick a random challenge length between - * EAP_MIN_CHALLENGE_LENGTH and EAP_MAX_CHALLENGE_LENGTH - */ - pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + - magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); - PUTCHAR(pcb->eap.es_challen, outp); - magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); - MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); - INCPTR(pcb->eap.es_challen, outp); - MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); - INCPTR(pcb->eap.es_server.ea_namelen, outp); - break; - -#ifdef USE_SRP - case eapSRP1: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_CHALLENGE, outp); - - PUTCHAR(pcb->eap.es_server.ea_namelen, outp); - MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); - INCPTR(pcb->eap.es_server.ea_namelen, outp); - - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - PUTCHAR(ts->s.len, outp); - MEMCPY(outp, ts->s.data, ts->s.len); - INCPTR(ts->s.len, outp); - - if (ts->g.len == 1 && ts->g.data[0] == 2) { - PUTCHAR(0, outp); - } else { - PUTCHAR(ts->g.len, outp); - MEMCPY(outp, ts->g.data, ts->g.len); - INCPTR(ts->g.len, outp); - } - - if (ts->n.len != sizeof (wkmodulus) || - BCMP(ts->n.data, wkmodulus, sizeof (wkmodulus)) != 0) { - MEMCPY(outp, ts->n.data, ts->n.len); - INCPTR(ts->n.len, outp); - } - break; - - case eapSRP2: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_SKEY, outp); - - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - MEMCPY(outp, ts->B.data, ts->B.len); - INCPTR(ts->B.len, outp); - break; - - case eapSRP3: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_SVALIDATOR, outp); - PUTLONG(SRPVAL_EBIT, outp); - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - MEMCPY(outp, t_serverresponse(ts), SHA_DIGESTSIZE); - INCPTR(SHA_DIGESTSIZE, outp); - - if (pncrypt_setkey(0)) { - /* Generate pseudonym */ - optr = outp; - cp = (unsigned char *)pcb->eap.es_server.ea_peer; - if ((j = i = pcb->eap.es_server.ea_peerlen) > 7) - j = 7; - clear[0] = i; - MEMCPY(clear + 1, cp, j); - i -= j; - cp += j; - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - if (!DesEncrypt(clear, cipher)) { - ppp_dbglog("no DES here; not generating pseudonym"); - break; - } - BZERO(&b64, sizeof (b64)); - outp++; /* space for pseudonym length */ - outp += b64enc(&b64, cipher, 8, outp); - while (i >= 8) { - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - (void) DesEncrypt(cp, cipher); - outp += b64enc(&b64, cipher, 8, outp); - cp += 8; - i -= 8; - } - if (i > 0) { - MEMCPY(clear, cp, i); - cp += i; - magic_random_bytes(cp, 8-i); - /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ - (void) DesEncrypt(clear, cipher); - outp += b64enc(&b64, cipher, 8, outp); - } - outp += b64flush(&b64, outp); - - /* Set length and pad out to next 20 octet boundary */ - i = outp - optr - 1; - *optr = i; - i %= SHA_DIGESTSIZE; - if (i != 0) { - magic_random_bytes(outp, SHA_DIGESTSIZE-i); - INCPTR(SHA_DIGESTSIZE-i, outp); - } - - /* Obscure the pseudonym with SHA1 hash */ - SHA1Init(&ctxt); - SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); - SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, - pcb->eap.es_server.ea_peerlen); - while (optr < outp) { - SHA1Final(dig, &ctxt); - cp = dig; - while (cp < dig + SHA_DIGESTSIZE) - *optr++ ^= *cp++; - SHA1Init(&ctxt); - SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); - SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, optr - SHA_DIGESTSIZE, - SHA_DIGESTSIZE); - } - } - break; - - case eapSRP4: - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_LWRECHALLENGE, outp); - pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + - magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); - magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); - MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); - INCPTR(pcb->eap.es_challen, outp); - break; -#endif /* USE_SRP */ - - default: - return; - } - - outlen = (outp - (unsigned char*)p->payload) - PPP_HDRLEN; - PUTSHORT(outlen, lenloc); - - pbuf_realloc(p, outlen + PPP_HDRLEN); - ppp_write(pcb, p); - - pcb->eap.es_server.ea_requests++; - - if (pcb->settings.eap_timeout_time > 0) - TIMEOUT(eap_server_timeout, pcb, pcb->settings.eap_timeout_time); -} - -/* - * eap_authpeer - Authenticate our peer (behave as server). - * - * Start server state and send first request. This is called only - * after eap_lowerup. - */ -void eap_authpeer(ppp_pcb *pcb, const char *localname) { - - /* Save the name we're given. */ - pcb->eap.es_server.ea_name = localname; - pcb->eap.es_server.ea_namelen = strlen(localname); - - pcb->eap.es_savedtime = pcb->settings.eap_timeout_time; - - /* Lower layer up yet? */ - if (pcb->eap.es_server.ea_state == eapInitial || - pcb->eap.es_server.ea_state == eapPending) { - pcb->eap.es_server.ea_state = eapPending; - return; - } - - pcb->eap.es_server.ea_state = eapPending; - - /* ID number not updated here intentionally; hashed into M1 */ - eap_send_request(pcb); -} - -/* - * eap_server_timeout - Retransmission timer for sending Requests - * expired. - */ -static void eap_server_timeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - - if (!eap_server_active(pcb)) - return; - - /* EAP ID number must not change on timeout. */ - eap_send_request(pcb); -} - -/* - * When it's time to send rechallenge the peer, this timeout is - * called. Once the rechallenge is successful, the response handler - * will restart the timer. If it fails, then the link is dropped. - */ -static void eap_rechallenge(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - - if (pcb->eap.es_server.ea_state != eapOpen && - pcb->eap.es_server.ea_state != eapSRP4) - return; - - pcb->eap.es_server.ea_requests = 0; - pcb->eap.es_server.ea_state = eapIdentify; - eap_figure_next_state(pcb, 0); - pcb->eap.es_server.ea_id++; - eap_send_request(pcb); -} - -static void srp_lwrechallenge(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - - if (pcb->eap.es_server.ea_state != eapOpen || - pcb->eap.es_server.ea_type != EAPT_SRP) - return; - - pcb->eap.es_server.ea_requests = 0; - pcb->eap.es_server.ea_state = eapSRP4; - pcb->eap.es_server.ea_id++; - eap_send_request(pcb); -} -#endif /* PPP_SERVER */ - -/* - * eap_lowerup - The lower layer is now up. - * - * This is called before either eap_authpeer or eap_authwithpeer. See - * link_established() in auth.c. All that's necessary here is to - * return to closed state so that those two routines will do the right - * thing. - */ -static void eap_lowerup(ppp_pcb *pcb) { - pcb->eap.es_client.ea_state = eapClosed; -#if PPP_SERVER - pcb->eap.es_server.ea_state = eapClosed; -#endif /* PPP_SERVER */ -} - -/* - * eap_lowerdown - The lower layer is now down. - * - * Cancel all timeouts and return to initial state. - */ -static void eap_lowerdown(ppp_pcb *pcb) { - - if (eap_client_active(pcb) && pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } -#if PPP_SERVER - if (eap_server_active(pcb)) { - if (pcb->settings.eap_timeout_time > 0) { - UNTIMEOUT(eap_server_timeout, pcb); - } - } else { - if ((pcb->eap.es_server.ea_state == eapOpen || - pcb->eap.es_server.ea_state == eapSRP4) && - pcb->eap.es_rechallenge > 0) { - UNTIMEOUT(eap_rechallenge, (void *)pcb); - } - if (pcb->eap.es_server.ea_state == eapOpen && - pcb->eap.es_lwrechallenge > 0) { - UNTIMEOUT(srp_lwrechallenge, (void *)pcb); - } - } - - pcb->eap.es_client.ea_state = pcb->eap.es_server.ea_state = eapInitial; - pcb->eap.es_client.ea_requests = pcb->eap.es_server.ea_requests = 0; -#endif /* PPP_SERVER */ -} - -/* - * eap_protrej - Peer doesn't speak this protocol. - * - * This shouldn't happen. If it does, it represents authentication - * failure. - */ -static void eap_protrej(ppp_pcb *pcb) { - - if (eap_client_active(pcb)) { - ppp_error("EAP authentication failed due to Protocol-Reject"); - auth_withpeer_fail(pcb, PPP_EAP); - } -#if PPP_SERVER - if (eap_server_active(pcb)) { - ppp_error("EAP authentication of peer failed on Protocol-Reject"); - auth_peer_fail(pcb, PPP_EAP); - } -#endif /* PPP_SERVER */ - eap_lowerdown(pcb); -} - -/* - * Format and send a regular EAP Response message. - */ -static void eap_send_response(ppp_pcb *pcb, u_char id, u_char typenum, const u_char *str, int lenstr) { - struct pbuf *p; - u_char *outp; - int msglen; - - msglen = EAP_HEADERLEN + sizeof (u_char) + lenstr; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(typenum, outp); - if (lenstr > 0) { - MEMCPY(outp, str, lenstr); - } - - ppp_write(pcb, p); -} - -/* - * Format and send an MD5-Challenge EAP Response message. - */ -static void eap_chap_response(ppp_pcb *pcb, u_char id, u_char *hash, const char *name, int namelen) { - struct pbuf *p; - u_char *outp; - int msglen; - - msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + MD5_SIGNATURE_SIZE + - namelen; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_MD5CHAP, outp); - PUTCHAR(MD5_SIGNATURE_SIZE, outp); - MEMCPY(outp, hash, MD5_SIGNATURE_SIZE); - INCPTR(MD5_SIGNATURE_SIZE, outp); - if (namelen > 0) { - MEMCPY(outp, name, namelen); - } - - ppp_write(pcb, p); -} - -#ifdef USE_SRP -/* - * Format and send a SRP EAP Response message. - */ -static void -eap_srp_response(esp, id, subtypenum, str, lenstr) -eap_state *esp; -u_char id; -u_char subtypenum; -u_char *str; -int lenstr; -{ - ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; - struct pbuf *p; - u_char *outp; - int msglen; - - msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + lenstr; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(subtypenum, outp); - if (lenstr > 0) { - MEMCPY(outp, str, lenstr); - } - - ppp_write(pcb, p); -} - -/* - * Format and send a SRP EAP Client Validator Response message. - */ -static void -eap_srpval_response(esp, id, flags, str) -eap_state *esp; -u_char id; -u32_t flags; -u_char *str; -{ - ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; - struct pbuf *p; - u_char *outp; - int msglen; - - msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + sizeof (u32_t) + - SHA_DIGESTSIZE; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_SRP, outp); - PUTCHAR(EAPSRP_CVALIDATOR, outp); - PUTLONG(flags, outp); - MEMCPY(outp, str, SHA_DIGESTSIZE); - - ppp_write(pcb, p); -} -#endif /* USE_SRP */ - -static void eap_send_nak(ppp_pcb *pcb, u_char id, u_char type) { - struct pbuf *p; - u_char *outp; - int msglen; - - msglen = EAP_HEADERLEN + 2 * sizeof (u_char); - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - - MAKEHEADER(outp, PPP_EAP); - - PUTCHAR(EAP_RESPONSE, outp); - PUTCHAR(id, outp); - pcb->eap.es_client.ea_id = id; - PUTSHORT(msglen, outp); - PUTCHAR(EAPT_NAK, outp); - PUTCHAR(type, outp); - - ppp_write(pcb, p); -} - -#ifdef USE_SRP -static char * -name_of_pn_file() -{ - char *user, *path, *file; - struct passwd *pw; - size_t pl; - static bool pnlogged = 0; - - pw = getpwuid(getuid()); - if (pw == NULL || (user = pw->pw_dir) == NULL || user[0] == 0) { - errno = EINVAL; - return (NULL); - } - file = _PATH_PSEUDONYM; - pl = strlen(user) + strlen(file) + 2; - path = malloc(pl); - if (path == NULL) - return (NULL); - (void) slprintf(path, pl, "%s/%s", user, file); - if (!pnlogged) { - ppp_dbglog("pseudonym file: %s", path); - pnlogged = 1; - } - return (path); -} - -static int -open_pn_file(modebits) -mode_t modebits; -{ - char *path; - int fd, err; - - if ((path = name_of_pn_file()) == NULL) - return (-1); - fd = open(path, modebits, S_IRUSR | S_IWUSR); - err = errno; - free(path); - errno = err; - return (fd); -} - -static void -remove_pn_file() -{ - char *path; - - if ((path = name_of_pn_file()) != NULL) { - (void) unlink(path); - (void) free(path); - } -} - -static void -write_pseudonym(esp, inp, len, id) -eap_state *esp; -u_char *inp; -int len, id; -{ - u_char val; - u_char *datp, *digp; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; - int dsize, fd, olen = len; - - /* - * Do the decoding by working backwards. This eliminates the need - * to save the decoded output in a separate buffer. - */ - val = id; - while (len > 0) { - if ((dsize = len % SHA_DIGESTSIZE) == 0) - dsize = SHA_DIGESTSIZE; - len -= dsize; - datp = inp + len; - SHA1Init(&ctxt); - SHA1Update(&ctxt, &val, 1); - SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, SESSION_KEY_LEN); - if (len > 0) { - SHA1Update(&ctxt, datp, SHA_DIGESTSIZE); - } else { - SHA1Update(&ctxt, pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - } - SHA1Final(dig, &ctxt); - for (digp = dig; digp < dig + SHA_DIGESTSIZE; digp++) - *datp++ ^= *digp; - } - - /* Now check that the result is sane */ - if (olen <= 0 || *inp + 1 > olen) { - ppp_dbglog("EAP: decoded pseudonym is unusable <%.*B>", olen, inp); - return; - } - - /* Save it away */ - fd = open_pn_file(O_WRONLY | O_CREAT | O_TRUNC); - if (fd < 0) { - ppp_dbglog("EAP: error saving pseudonym: %m"); - return; - } - len = write(fd, inp + 1, *inp); - if (close(fd) != -1 && len == *inp) { - ppp_dbglog("EAP: saved pseudonym"); - pcb->eap.es_usedpseudo = 0; - } else { - ppp_dbglog("EAP: failed to save pseudonym"); - remove_pn_file(); - } -} -#endif /* USE_SRP */ - -/* - * eap_request - Receive EAP Request message (client mode). - */ -static void eap_request(ppp_pcb *pcb, u_char *inp, int id, int len) { - u_char typenum; - u_char vallen; - int secret_len; - char secret[MAXSECRETLEN]; - char rhostname[MAXNAMELEN]; - lwip_md5_context mdContext; - u_char hash[MD5_SIGNATURE_SIZE]; -#ifdef USE_SRP - struct t_client *tc; - struct t_num sval, gval, Nval, *Ap, Bval; - u_char vals[2]; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; - int fd; -#endif /* USE_SRP */ - - /* - * Note: we update es_client.ea_id *only if* a Response - * message is being generated. Otherwise, we leave it the - * same for duplicate detection purposes. - */ - - pcb->eap.es_client.ea_requests++; - if (pcb->settings.eap_allow_req != 0 && - pcb->eap.es_client.ea_requests > pcb->settings.eap_allow_req) { - ppp_info("EAP: received too many Request messages"); - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } - auth_withpeer_fail(pcb, PPP_EAP); - return; - } - - if (len <= 0) { - ppp_error("EAP: empty Request message discarded"); - return; - } - - GETCHAR(typenum, inp); - len--; - - switch (typenum) { - case EAPT_IDENTITY: - if (len > 0) - ppp_info("EAP: Identity prompt \"%.*q\"", len, inp); -#ifdef USE_SRP - if (pcb->eap.es_usepseudo && - (pcb->eap.es_usedpseudo == 0 || - (pcb->eap.es_usedpseudo == 1 && - id == pcb->eap.es_client.ea_id))) { - pcb->eap.es_usedpseudo = 1; - /* Try to get a pseudonym */ - if ((fd = open_pn_file(O_RDONLY)) >= 0) { - strcpy(rhostname, SRP_PSEUDO_ID); - len = read(fd, rhostname + SRP_PSEUDO_LEN, - sizeof (rhostname) - SRP_PSEUDO_LEN); - /* XXX NAI unsupported */ - if (len > 0) { - eap_send_response(pcb, id, typenum, - rhostname, len + SRP_PSEUDO_LEN); - } - (void) close(fd); - if (len > 0) - break; - } - } - /* Stop using pseudonym now. */ - if (pcb->eap.es_usepseudo && pcb->eap.es_usedpseudo != 2) { - remove_pn_file(); - pcb->eap.es_usedpseudo = 2; - } -#endif /* USE_SRP */ - eap_send_response(pcb, id, typenum, (const u_char*)pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - break; - - case EAPT_NOTIFICATION: - if (len > 0) - ppp_info("EAP: Notification \"%.*q\"", len, inp); - eap_send_response(pcb, id, typenum, NULL, 0); - break; - - case EAPT_NAK: - /* - * Avoid the temptation to send Response Nak in reply - * to Request Nak here. It can only lead to trouble. - */ - ppp_warn("EAP: unexpected Nak in Request; ignored"); - /* Return because we're waiting for something real. */ - return; - - case EAPT_MD5CHAP: - if (len < 1) { - ppp_error("EAP: received MD5-Challenge with no data"); - /* Bogus request; wait for something real. */ - return; - } - GETCHAR(vallen, inp); - len--; - if (vallen < 8 || vallen > len) { - ppp_error("EAP: MD5-Challenge with bad length %d (8..%d)", - vallen, len); - /* Try something better. */ - eap_send_nak(pcb, id, EAPT_SRP); - break; - } - - /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { - ppp_dbglog("EAP: trimming really long peer name down"); - MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); - rhostname[sizeof (rhostname) - 1] = '\0'; - } else { - MEMCPY(rhostname, inp + vallen, len - vallen); - rhostname[len - vallen] = '\0'; - } - -#if PPP_REMOTENAME - /* In case the remote doesn't give us his name. */ - if (pcb->settings.explicit_remote || - (pcb->settings.remote_name[0] != '\0' && vallen == len)) - strlcpy(rhostname, pcb->settings.remote_name, sizeof (rhostname)); -#endif /* PPP_REMOTENAME */ - - /* - * Get the secret for authenticating ourselves with - * the specified host. - */ - if (!get_secret(pcb, pcb->eap.es_client.ea_name, - rhostname, secret, &secret_len, 0)) { - ppp_dbglog("EAP: no MD5 secret for auth to %q", rhostname); - eap_send_nak(pcb, id, EAPT_SRP); - break; - } - lwip_md5_init(&mdContext); - lwip_md5_starts(&mdContext); - typenum = id; - lwip_md5_update(&mdContext, &typenum, 1); - lwip_md5_update(&mdContext, (u_char *)secret, secret_len); - BZERO(secret, sizeof (secret)); - lwip_md5_update(&mdContext, inp, vallen); - lwip_md5_finish(&mdContext, hash); - lwip_md5_free(&mdContext); - eap_chap_response(pcb, id, hash, pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - break; - -#ifdef USE_SRP - case EAPT_SRP: - if (len < 1) { - ppp_error("EAP: received empty SRP Request"); - /* Bogus request; wait for something real. */ - return; - } - - /* Get subtype */ - GETCHAR(vallen, inp); - len--; - switch (vallen) { - case EAPSRP_CHALLENGE: - tc = NULL; - if (pcb->eap.es_client.ea_session != NULL) { - tc = (struct t_client *)pcb->eap.es_client. - ea_session; - /* - * If this is a new challenge, then start - * over with a new client session context. - * Otherwise, just resend last response. - */ - if (id != pcb->eap.es_client.ea_id) { - t_clientclose(tc); - pcb->eap.es_client.ea_session = NULL; - tc = NULL; - } - } - /* No session key just yet */ - pcb->eap.es_client.ea_skey = NULL; - if (tc == NULL) { - int rhostnamelen; - - GETCHAR(vallen, inp); - len--; - if (vallen >= len) { - ppp_error("EAP: badly-formed SRP Challenge" - " (name)"); - /* Ignore badly-formed messages */ - return; - } - MEMCPY(rhostname, inp, vallen); - rhostname[vallen] = '\0'; - INCPTR(vallen, inp); - len -= vallen; - - /* - * In case the remote doesn't give us his name, - * use configured name. - */ - if (explicit_remote || - (remote_name[0] != '\0' && vallen == 0)) { - strlcpy(rhostname, remote_name, - sizeof (rhostname)); - } - - rhostnamelen = (int)strlen(rhostname); - if (rhostnamelen > MAXNAMELEN) { - rhostnamelen = MAXNAMELEN; - } - MEMCPY(pcb->eap.es_client.ea_peer, rhostname, rhostnamelen); - pcb->eap.es_client.ea_peer[rhostnamelen] = '\0'; - pcb->eap.es_client.ea_peerlen = rhostnamelen; - - GETCHAR(vallen, inp); - len--; - if (vallen >= len) { - ppp_error("EAP: badly-formed SRP Challenge" - " (s)"); - /* Ignore badly-formed messages */ - return; - } - sval.data = inp; - sval.len = vallen; - INCPTR(vallen, inp); - len -= vallen; - - GETCHAR(vallen, inp); - len--; - if (vallen > len) { - ppp_error("EAP: badly-formed SRP Challenge" - " (g)"); - /* Ignore badly-formed messages */ - return; - } - /* If no generator present, then use value 2 */ - if (vallen == 0) { - gval.data = (u_char *)"\002"; - gval.len = 1; - } else { - gval.data = inp; - gval.len = vallen; - } - INCPTR(vallen, inp); - len -= vallen; - - /* - * If no modulus present, then use well-known - * value. - */ - if (len == 0) { - Nval.data = (u_char *)wkmodulus; - Nval.len = sizeof (wkmodulus); - } else { - Nval.data = inp; - Nval.len = len; - } - tc = t_clientopen(pcb->eap.es_client.ea_name, - &Nval, &gval, &sval); - if (tc == NULL) { - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - pcb->eap.es_client.ea_session = (void *)tc; - - /* Add Challenge ID & type to verifier */ - vals[0] = id; - vals[1] = EAPT_SRP; - t_clientaddexdata(tc, vals, 2); - } - Ap = t_clientgenexp(tc); - eap_srp_response(esp, id, EAPSRP_CKEY, Ap->data, - Ap->len); - break; - - case EAPSRP_SKEY: - tc = (struct t_client *)pcb->eap.es_client.ea_session; - if (tc == NULL) { - ppp_warn("EAP: peer sent Subtype 2 without 1"); - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - if (pcb->eap.es_client.ea_skey != NULL) { - /* - * ID number should not change here. Warn - * if it does (but otherwise ignore). - */ - if (id != pcb->eap.es_client.ea_id) { - ppp_warn("EAP: ID changed from %d to %d " - "in SRP Subtype 2 rexmit", - pcb->eap.es_client.ea_id, id); - } - } else { - if (get_srp_secret(pcb->eap.es_unit, - pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_peer, secret, 0) == 0) { - /* - * Can't work with this peer because - * the secret is missing. Just give - * up. - */ - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - Bval.data = inp; - Bval.len = len; - t_clientpasswd(tc, secret); - BZERO(secret, sizeof (secret)); - pcb->eap.es_client.ea_skey = - t_clientgetkey(tc, &Bval); - if (pcb->eap.es_client.ea_skey == NULL) { - /* Server is rogue; stop now */ - ppp_error("EAP: SRP server is rogue"); - goto client_failure; - } - } - eap_srpval_response(esp, id, SRPVAL_EBIT, - t_clientresponse(tc)); - break; - - case EAPSRP_SVALIDATOR: - tc = (struct t_client *)pcb->eap.es_client.ea_session; - if (tc == NULL || pcb->eap.es_client.ea_skey == NULL) { - ppp_warn("EAP: peer sent Subtype 3 without 1/2"); - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - /* - * If we're already open, then this ought to be a - * duplicate. Otherwise, check that the server is - * who we think it is. - */ - if (pcb->eap.es_client.ea_state == eapOpen) { - if (id != pcb->eap.es_client.ea_id) { - ppp_warn("EAP: ID changed from %d to %d " - "in SRP Subtype 3 rexmit", - pcb->eap.es_client.ea_id, id); - } - } else { - len -= sizeof (u32_t) + SHA_DIGESTSIZE; - if (len < 0 || t_clientverify(tc, inp + - sizeof (u32_t)) != 0) { - ppp_error("EAP: SRP server verification " - "failed"); - goto client_failure; - } - GETLONG(pcb->eap.es_client.ea_keyflags, inp); - /* Save pseudonym if user wants it. */ - if (len > 0 && pcb->eap.es_usepseudo) { - INCPTR(SHA_DIGESTSIZE, inp); - write_pseudonym(esp, inp, len, id); - } - } - /* - * We've verified our peer. We're now mostly done, - * except for waiting on the regular EAP Success - * message. - */ - eap_srp_response(esp, id, EAPSRP_ACK, NULL, 0); - break; - - case EAPSRP_LWRECHALLENGE: - if (len < 4) { - ppp_warn("EAP: malformed Lightweight rechallenge"); - return; - } - SHA1Init(&ctxt); - vals[0] = id; - SHA1Update(&ctxt, vals, 1); - SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, inp, len); - SHA1Update(&ctxt, pcb->eap.es_client.ea_name, - pcb->eap.es_client.ea_namelen); - SHA1Final(dig, &ctxt); - eap_srp_response(esp, id, EAPSRP_LWRECHALLENGE, dig, - SHA_DIGESTSIZE); - break; - - default: - ppp_error("EAP: unknown SRP Subtype %d", vallen); - eap_send_nak(pcb, id, EAPT_MD5CHAP); - break; - } - break; -#endif /* USE_SRP */ - - default: - ppp_info("EAP: unknown authentication type %d; Naking", typenum); - eap_send_nak(pcb, id, EAPT_SRP); - break; - } - - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - TIMEOUT(eap_client_timeout, pcb, - pcb->settings.eap_req_time); - } - return; - -#ifdef USE_SRP -client_failure: - pcb->eap.es_client.ea_state = eapBadAuth; - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, (void *)esp); - } - pcb->eap.es_client.ea_session = NULL; - t_clientclose(tc); - auth_withpeer_fail(pcb, PPP_EAP); -#endif /* USE_SRP */ -} - -#if PPP_SERVER -/* - * eap_response - Receive EAP Response message (server mode). - */ -static void eap_response(ppp_pcb *pcb, u_char *inp, int id, int len) { - u_char typenum; - u_char vallen; - int secret_len; - char secret[MAXSECRETLEN]; - char rhostname[MAXNAMELEN]; - lwip_md5_context mdContext; - u_char hash[MD5_SIGNATURE_SIZE]; -#ifdef USE_SRP - struct t_server *ts; - struct t_num A; - SHA1_CTX ctxt; - u_char dig[SHA_DIGESTSIZE]; -#endif /* USE_SRP */ - - if (pcb->eap.es_server.ea_id != id) { - ppp_dbglog("EAP: discarding Response %d; expected ID %d", id, - pcb->eap.es_server.ea_id); - return; - } - - pcb->eap.es_server.ea_responses++; - - if (len <= 0) { - ppp_error("EAP: empty Response message discarded"); - return; - } - - GETCHAR(typenum, inp); - len--; - - switch (typenum) { - case EAPT_IDENTITY: - if (pcb->eap.es_server.ea_state != eapIdentify) { - ppp_dbglog("EAP discarding unwanted Identify \"%.q\"", len, - inp); - break; - } - ppp_info("EAP: unauthenticated peer name \"%.*q\"", len, inp); - if (len > MAXNAMELEN) { - len = MAXNAMELEN; - } - MEMCPY(pcb->eap.es_server.ea_peer, inp, len); - pcb->eap.es_server.ea_peer[len] = '\0'; - pcb->eap.es_server.ea_peerlen = len; - eap_figure_next_state(pcb, 0); - break; - - case EAPT_NOTIFICATION: - ppp_dbglog("EAP unexpected Notification; response discarded"); - break; - - case EAPT_NAK: - if (len < 1) { - ppp_info("EAP: Nak Response with no suggested protocol"); - eap_figure_next_state(pcb, 1); - break; - } - - GETCHAR(vallen, inp); - len--; - - if ( -#if PPP_REMOTENAME - !pcb->explicit_remote && -#endif /* PPP_REMOTENAME */ - pcb->eap.es_server.ea_state == eapIdentify){ - /* Peer cannot Nak Identify Request */ - eap_figure_next_state(pcb, 1); - break; - } - - switch (vallen) { - case EAPT_SRP: - /* Run through SRP validator selection again. */ - pcb->eap.es_server.ea_state = eapIdentify; - eap_figure_next_state(pcb, 0); - break; - - case EAPT_MD5CHAP: - pcb->eap.es_server.ea_state = eapMD5Chall; - break; - - default: - ppp_dbglog("EAP: peer requesting unknown Type %d", vallen); - switch (pcb->eap.es_server.ea_state) { - case eapSRP1: - case eapSRP2: - case eapSRP3: - pcb->eap.es_server.ea_state = eapMD5Chall; - break; - case eapMD5Chall: - case eapSRP4: - pcb->eap.es_server.ea_state = eapIdentify; - eap_figure_next_state(pcb, 0); - break; - default: - break; - } - break; - } - break; - - case EAPT_MD5CHAP: - if (pcb->eap.es_server.ea_state != eapMD5Chall) { - ppp_error("EAP: unexpected MD5-Response"); - eap_figure_next_state(pcb, 1); - break; - } - if (len < 1) { - ppp_error("EAP: received MD5-Response with no data"); - eap_figure_next_state(pcb, 1); - break; - } - GETCHAR(vallen, inp); - len--; - if (vallen != 16 || vallen > len) { - ppp_error("EAP: MD5-Response with bad length %d", vallen); - eap_figure_next_state(pcb, 1); - break; - } - - /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { - ppp_dbglog("EAP: trimming really long peer name down"); - MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); - rhostname[sizeof (rhostname) - 1] = '\0'; - } else { - MEMCPY(rhostname, inp + vallen, len - vallen); - rhostname[len - vallen] = '\0'; - } - -#if PPP_REMOTENAME - /* In case the remote doesn't give us his name. */ - if (explicit_remote || - (remote_name[0] != '\0' && vallen == len)) - strlcpy(rhostname, remote_name, sizeof (rhostname)); -#endif /* PPP_REMOTENAME */ - - /* - * Get the secret for authenticating the specified - * host. - */ - if (!get_secret(pcb, rhostname, - pcb->eap.es_server.ea_name, secret, &secret_len, 1)) { - ppp_dbglog("EAP: no MD5 secret for auth of %q", rhostname); - eap_send_failure(pcb); - break; - } - lwip_md5_init(&mdContext); - lwip_md5_starts(&mdContext); - lwip_md5_update(&mdContext, &pcb->eap.es_server.ea_id, 1); - lwip_md5_update(&mdContext, (u_char *)secret, secret_len); - BZERO(secret, sizeof (secret)); - lwip_md5_update(&mdContext, pcb->eap.es_challenge, pcb->eap.es_challen); - lwip_md5_finish(&mdContext, hash); - lwip_md5_free(&mdContext); - if (BCMP(hash, inp, MD5_SIGNATURE_SIZE) != 0) { - eap_send_failure(pcb); - break; - } - pcb->eap.es_server.ea_type = EAPT_MD5CHAP; - eap_send_success(pcb); - eap_figure_next_state(pcb, 0); - if (pcb->eap.es_rechallenge != 0) - TIMEOUT(eap_rechallenge, pcb, pcb->eap.es_rechallenge); - break; - -#ifdef USE_SRP - case EAPT_SRP: - if (len < 1) { - ppp_error("EAP: empty SRP Response"); - eap_figure_next_state(pcb, 1); - break; - } - GETCHAR(typenum, inp); - len--; - switch (typenum) { - case EAPSRP_CKEY: - if (pcb->eap.es_server.ea_state != eapSRP1) { - ppp_error("EAP: unexpected SRP Subtype 1 Response"); - eap_figure_next_state(pcb, 1); - break; - } - A.data = inp; - A.len = len; - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - pcb->eap.es_server.ea_skey = t_servergetkey(ts, &A); - if (pcb->eap.es_server.ea_skey == NULL) { - /* Client's A value is bogus; terminate now */ - ppp_error("EAP: bogus A value from client"); - eap_send_failure(pcb); - } else { - eap_figure_next_state(pcb, 0); - } - break; - - case EAPSRP_CVALIDATOR: - if (pcb->eap.es_server.ea_state != eapSRP2) { - ppp_error("EAP: unexpected SRP Subtype 2 Response"); - eap_figure_next_state(pcb, 1); - break; - } - if (len < sizeof (u32_t) + SHA_DIGESTSIZE) { - ppp_error("EAP: M1 length %d < %d", len, - sizeof (u32_t) + SHA_DIGESTSIZE); - eap_figure_next_state(pcb, 1); - break; - } - GETLONG(pcb->eap.es_server.ea_keyflags, inp); - ts = (struct t_server *)pcb->eap.es_server.ea_session; - assert(ts != NULL); - if (t_serververify(ts, inp)) { - ppp_info("EAP: unable to validate client identity"); - eap_send_failure(pcb); - break; - } - eap_figure_next_state(pcb, 0); - break; - - case EAPSRP_ACK: - if (pcb->eap.es_server.ea_state != eapSRP3) { - ppp_error("EAP: unexpected SRP Subtype 3 Response"); - eap_send_failure(esp); - break; - } - pcb->eap.es_server.ea_type = EAPT_SRP; - eap_send_success(pcb, esp); - eap_figure_next_state(pcb, 0); - if (pcb->eap.es_rechallenge != 0) - TIMEOUT(eap_rechallenge, pcb, - pcb->eap.es_rechallenge); - if (pcb->eap.es_lwrechallenge != 0) - TIMEOUT(srp_lwrechallenge, pcb, - pcb->eap.es_lwrechallenge); - break; - - case EAPSRP_LWRECHALLENGE: - if (pcb->eap.es_server.ea_state != eapSRP4) { - ppp_info("EAP: unexpected SRP Subtype 4 Response"); - return; - } - if (len != SHA_DIGESTSIZE) { - ppp_error("EAP: bad Lightweight rechallenge " - "response"); - return; - } - SHA1Init(&ctxt); - vallen = id; - SHA1Update(&ctxt, &vallen, 1); - SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, - SESSION_KEY_LEN); - SHA1Update(&ctxt, pcb->eap.es_challenge, pcb->eap.es_challen); - SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, - pcb->eap.es_server.ea_peerlen); - SHA1Final(dig, &ctxt); - if (BCMP(dig, inp, SHA_DIGESTSIZE) != 0) { - ppp_error("EAP: failed Lightweight rechallenge"); - eap_send_failure(pcb); - break; - } - pcb->eap.es_server.ea_state = eapOpen; - if (pcb->eap.es_lwrechallenge != 0) - TIMEOUT(srp_lwrechallenge, esp, - pcb->eap.es_lwrechallenge); - break; - } - break; -#endif /* USE_SRP */ - - default: - /* This can't happen. */ - ppp_error("EAP: unknown Response type %d; ignored", typenum); - return; - } - - if (pcb->settings.eap_timeout_time > 0) { - UNTIMEOUT(eap_server_timeout, pcb); - } - - if (pcb->eap.es_server.ea_state != eapBadAuth && - pcb->eap.es_server.ea_state != eapOpen) { - pcb->eap.es_server.ea_id++; - eap_send_request(pcb); - } -} -#endif /* PPP_SERVER */ - -/* - * eap_success - Receive EAP Success message (client mode). - */ -static void eap_success(ppp_pcb *pcb, u_char *inp, int id, int len) { - LWIP_UNUSED_ARG(id); - - if (pcb->eap.es_client.ea_state != eapOpen && !eap_client_active(pcb)) { - ppp_dbglog("EAP unexpected success message in state %s (%d)", - eap_state_name(pcb->eap.es_client.ea_state), - pcb->eap.es_client.ea_state); - return; - } - - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } - - if (len > 0) { - /* This is odd. The spec doesn't allow for this. */ - PRINTMSG(inp, len); - } - - pcb->eap.es_client.ea_state = eapOpen; - auth_withpeer_success(pcb, PPP_EAP, 0); -} - -/* - * eap_failure - Receive EAP Failure message (client mode). - */ -static void eap_failure(ppp_pcb *pcb, u_char *inp, int id, int len) { - LWIP_UNUSED_ARG(id); - - if (!eap_client_active(pcb)) { - ppp_dbglog("EAP unexpected failure message in state %s (%d)", - eap_state_name(pcb->eap.es_client.ea_state), - pcb->eap.es_client.ea_state); - } - - if (pcb->settings.eap_req_time > 0) { - UNTIMEOUT(eap_client_timeout, pcb); - } - - if (len > 0) { - /* This is odd. The spec doesn't allow for this. */ - PRINTMSG(inp, len); - } - - pcb->eap.es_client.ea_state = eapBadAuth; - - ppp_error("EAP: peer reports authentication failure"); - auth_withpeer_fail(pcb, PPP_EAP); -} - -/* - * eap_input - Handle received EAP message. - */ -static void eap_input(ppp_pcb *pcb, u_char *inp, int inlen) { - u_char code, id; - int len; - - /* - * Parse header (code, id and length). If packet too short, - * drop it. - */ - if (inlen < EAP_HEADERLEN) { - ppp_error("EAP: packet too short: %d < %d", inlen, EAP_HEADERLEN); - return; - } - GETCHAR(code, inp); - GETCHAR(id, inp); - GETSHORT(len, inp); - if (len < EAP_HEADERLEN || len > inlen) { - ppp_error("EAP: packet has illegal length field %d (%d..%d)", len, - EAP_HEADERLEN, inlen); - return; - } - len -= EAP_HEADERLEN; - - /* Dispatch based on message code */ - switch (code) { - case EAP_REQUEST: - eap_request(pcb, inp, id, len); - break; - -#if PPP_SERVER - case EAP_RESPONSE: - eap_response(pcb, inp, id, len); - break; -#endif /* PPP_SERVER */ - - case EAP_SUCCESS: - eap_success(pcb, inp, id, len); - break; - - case EAP_FAILURE: - eap_failure(pcb, inp, id, len); - break; - - default: /* XXX Need code reject */ - /* Note: it's not legal to send EAP Nak here. */ - ppp_warn("EAP: unknown code %d received", code); - break; - } -} - -#if PRINTPKT_SUPPORT -/* - * eap_printpkt - print the contents of an EAP packet. - */ -static const char* const eap_codenames[] = { - "Request", "Response", "Success", "Failure" -}; - -static const char* const eap_typenames[] = { - "Identity", "Notification", "Nak", "MD5-Challenge", - "OTP", "Generic-Token", NULL, NULL, - "RSA", "DSS", "KEA", "KEA-Validate", - "TLS", "Defender", "Windows 2000", "Arcot", - "Cisco", "Nokia", "SRP" -}; - -static int eap_printpkt(const u_char *inp, int inlen, void (*printer) (void *, const char *, ...), void *arg) { - int code, id, len, rtype, vallen; - const u_char *pstart; - u32_t uval; - - if (inlen < EAP_HEADERLEN) - return (0); - pstart = inp; - GETCHAR(code, inp); - GETCHAR(id, inp); - GETSHORT(len, inp); - if (len < EAP_HEADERLEN || len > inlen) - return (0); - - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(eap_codenames)) - printer(arg, " %s", eap_codenames[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= EAP_HEADERLEN; - switch (code) { - case EAP_REQUEST: - if (len < 1) { - printer(arg, " "); - break; - } - GETCHAR(rtype, inp); - len--; - if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) - printer(arg, " %s", eap_typenames[rtype-1]); - else - printer(arg, " type=0x%x", rtype); - switch (rtype) { - case EAPT_IDENTITY: - case EAPT_NOTIFICATION: - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } else { - printer(arg, " "); - } - break; - - case EAPT_MD5CHAP: - if (len <= 0) - break; - GETCHAR(vallen, inp); - len--; - if (vallen > len) - goto truncated; - printer(arg, " ", vallen, inp); - INCPTR(vallen, inp); - len -= vallen; - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } else { - printer(arg, " "); - } - break; - - case EAPT_SRP: - if (len < 3) - goto truncated; - GETCHAR(vallen, inp); - len--; - printer(arg, "-%d", vallen); - switch (vallen) { - case EAPSRP_CHALLENGE: - GETCHAR(vallen, inp); - len--; - if (vallen >= len) - goto truncated; - if (vallen > 0) { - printer(arg, " "); - } else { - printer(arg, " "); - } - INCPTR(vallen, inp); - len -= vallen; - GETCHAR(vallen, inp); - len--; - if (vallen >= len) - goto truncated; - printer(arg, " ", vallen, inp); - INCPTR(vallen, inp); - len -= vallen; - GETCHAR(vallen, inp); - len--; - if (vallen > len) - goto truncated; - if (vallen == 0) { - printer(arg, " "); - } else { - printer(arg, " ", vallen, inp); - } - INCPTR(vallen, inp); - len -= vallen; - if (len == 0) { - printer(arg, " "); - } else { - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - } - break; - - case EAPSRP_SKEY: - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - break; - - case EAPSRP_SVALIDATOR: - if (len < (int)sizeof (u32_t)) - break; - GETLONG(uval, inp); - len -= sizeof (u32_t); - if (uval & SRPVAL_EBIT) { - printer(arg, " E"); - uval &= ~SRPVAL_EBIT; - } - if (uval != 0) { - printer(arg, " f<%X>", uval); - } - if ((vallen = len) > SHA_DIGESTSIZE) - vallen = SHA_DIGESTSIZE; - printer(arg, " ", len, inp, - len < SHA_DIGESTSIZE ? "?" : ""); - INCPTR(vallen, inp); - len -= vallen; - if (len > 0) { - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - } - break; - - case EAPSRP_LWRECHALLENGE: - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - break; - default: - break; - } - break; - default: - break; - } - break; - - case EAP_RESPONSE: - if (len < 1) - break; - GETCHAR(rtype, inp); - len--; - if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) - printer(arg, " %s", eap_typenames[rtype-1]); - else - printer(arg, " type=0x%x", rtype); - switch (rtype) { - case EAPT_IDENTITY: - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } - break; - - case EAPT_NAK: - if (len <= 0) { - printer(arg, " "); - break; - } - GETCHAR(rtype, inp); - len--; - printer(arg, " = 1 && rtype < (int)LWIP_ARRAYSIZE(eap_typenames)) - printer(arg, " (%s)", eap_typenames[rtype-1]); - printer(arg, ">"); - break; - - case EAPT_MD5CHAP: - if (len <= 0) { - printer(arg, " "); - break; - } - GETCHAR(vallen, inp); - len--; - if (vallen > len) - goto truncated; - printer(arg, " ", vallen, inp); - INCPTR(vallen, inp); - len -= vallen; - if (len > 0) { - printer(arg, " "); - INCPTR(len, inp); - len = 0; - } else { - printer(arg, " "); - } - break; - - case EAPT_SRP: - if (len < 1) - goto truncated; - GETCHAR(vallen, inp); - len--; - printer(arg, "-%d", vallen); - switch (vallen) { - case EAPSRP_CKEY: - printer(arg, " ", len, inp); - INCPTR(len, inp); - len = 0; - break; - - case EAPSRP_CVALIDATOR: - if (len < (int)sizeof (u32_t)) - break; - GETLONG(uval, inp); - len -= sizeof (u32_t); - if (uval & SRPVAL_EBIT) { - printer(arg, " E"); - uval &= ~SRPVAL_EBIT; - } - if (uval != 0) { - printer(arg, " f<%X>", uval); - } - printer(arg, " ", len, inp, - len == SHA_DIGESTSIZE ? "" : "?"); - INCPTR(len, inp); - len = 0; - break; - - case EAPSRP_ACK: - break; - - case EAPSRP_LWRECHALLENGE: - printer(arg, " ", len, inp, - len == SHA_DIGESTSIZE ? "" : "?"); - if ((vallen = len) > SHA_DIGESTSIZE) - vallen = SHA_DIGESTSIZE; - INCPTR(vallen, inp); - len -= vallen; - break; - default: - break; - } - break; - default: - break; - } - break; - - case EAP_SUCCESS: /* No payload expected for these! */ - case EAP_FAILURE: - default: - break; - - truncated: - printer(arg, " "); - break; - } - - if (len > 8) - printer(arg, "%8B...", inp); - else if (len > 0) - printer(arg, "%.*B", len, inp); - INCPTR(len, inp); - - return (inp - pstart); -} -#endif /* PRINTPKT_SUPPORT */ - -#endif /* PPP_SUPPORT && EAP_SUPPORT */ +/* + * eap.c - Extensible Authentication Protocol for PPP (RFC 2284) + * + * Copyright (c) 2001 by Sun Microsystems, Inc. + * All rights reserved. + * + * Non-exclusive rights to redistribute, modify, translate, and use + * this software in source and binary forms, in whole or in part, is + * hereby granted, provided that the above copyright notice is + * duplicated in any source form, and that neither the name of the + * copyright holder nor the author is used to endorse or promote + * products derived from this software. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * Original version by James Carlson + * + * This implementation of EAP supports MD5-Challenge and SRP-SHA1 + * authentication styles. Note that support of MD5-Challenge is a + * requirement of RFC 2284, and that it's essentially just a + * reimplementation of regular RFC 1994 CHAP using EAP messages. + * + * As an authenticator ("server"), there are multiple phases for each + * style. In the first phase of each style, the unauthenticated peer + * name is queried using the EAP Identity request type. If the + * "remotename" option is used, then this phase is skipped, because + * the peer's name is presumed to be known. + * + * For MD5-Challenge, there are two phases, and the second phase + * consists of sending the challenge itself and handling the + * associated response. + * + * For SRP-SHA1, there are four phases. The second sends 's', 'N', + * and 'g'. The reply contains 'A'. The third sends 'B', and the + * reply contains 'M1'. The forth sends the 'M2' value. + * + * As an authenticatee ("client"), there's just a single phase -- + * responding to the queries generated by the peer. EAP is an + * authenticator-driven protocol. + * + * Based on draft-ietf-pppext-eap-srp-03.txt. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/eap.h" +#include "netif/ppp/magic.h" +#include "netif/ppp/pppcrypt.h" + +#ifdef USE_SRP +#include +#include +#include +#endif /* USE_SRP */ + +#ifndef SHA_DIGESTSIZE +#define SHA_DIGESTSIZE 20 +#endif + +#ifdef USE_SRP +static char *pn_secret = NULL; /* Pseudonym generating secret */ +#endif + +#if PPP_OPTIONS +/* + * Command-line options. + */ +static option_t eap_option_list[] = { + { "eap-restart", o_int, &eap_states[0].es_server.ea_timeout, + "Set retransmit timeout for EAP Requests (server)" }, + { "eap-max-sreq", o_int, &eap_states[0].es_server.ea_maxrequests, + "Set max number of EAP Requests sent (server)" }, + { "eap-timeout", o_int, &eap_states[0].es_client.ea_timeout, + "Set time limit for peer EAP authentication" }, + { "eap-max-rreq", o_int, &eap_states[0].es_client.ea_maxrequests, + "Set max number of EAP Requests allows (client)" }, + { "eap-interval", o_int, &eap_states[0].es_rechallenge, + "Set interval for EAP rechallenge" }, +#ifdef USE_SRP + { "srp-interval", o_int, &eap_states[0].es_lwrechallenge, + "Set interval for SRP lightweight rechallenge" }, + { "srp-pn-secret", o_string, &pn_secret, + "Long term pseudonym generation secret" }, + { "srp-use-pseudonym", o_bool, &eap_states[0].es_usepseudo, + "Use pseudonym if offered one by server", 1 }, +#endif + { NULL } +}; +#endif /* PPP_OPTIONS */ + +/* + * Protocol entry points. + */ +static void eap_init(ppp_pcb *pcb); +static void eap_input(ppp_pcb *pcb, u_char *inp, int inlen); +static void eap_protrej(ppp_pcb *pcb); +static void eap_lowerup(ppp_pcb *pcb); +static void eap_lowerdown(ppp_pcb *pcb); +#if PRINTPKT_SUPPORT +static int eap_printpkt(const u_char *inp, int inlen, + void (*)(void *arg, const char *fmt, ...), void *arg); +#endif /* PRINTPKT_SUPPORT */ + +const struct protent eap_protent = { + PPP_EAP, /* protocol number */ + eap_init, /* initialization procedure */ + eap_input, /* process a received packet */ + eap_protrej, /* process a received protocol-reject */ + eap_lowerup, /* lower layer has gone up */ + eap_lowerdown, /* lower layer has gone down */ + NULL, /* open the protocol */ + NULL, /* close the protocol */ +#if PRINTPKT_SUPPORT + eap_printpkt, /* print a packet in readable form */ +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + NULL, /* process a received data packet */ +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "EAP", /* text name of protocol */ + NULL, /* text name of corresponding data protocol */ +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + eap_option_list, /* list of command-line options */ + NULL, /* check requested options; assign defaults */ +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + NULL, /* configure interface for demand-dial */ + NULL /* say whether to bring up link for this pkt */ +#endif /* DEMAND_SUPPORT */ +}; + +#ifdef USE_SRP +/* + * A well-known 2048 bit modulus. + */ +static const u_char wkmodulus[] = { + 0xAC, 0x6B, 0xDB, 0x41, 0x32, 0x4A, 0x9A, 0x9B, + 0xF1, 0x66, 0xDE, 0x5E, 0x13, 0x89, 0x58, 0x2F, + 0xAF, 0x72, 0xB6, 0x65, 0x19, 0x87, 0xEE, 0x07, + 0xFC, 0x31, 0x92, 0x94, 0x3D, 0xB5, 0x60, 0x50, + 0xA3, 0x73, 0x29, 0xCB, 0xB4, 0xA0, 0x99, 0xED, + 0x81, 0x93, 0xE0, 0x75, 0x77, 0x67, 0xA1, 0x3D, + 0xD5, 0x23, 0x12, 0xAB, 0x4B, 0x03, 0x31, 0x0D, + 0xCD, 0x7F, 0x48, 0xA9, 0xDA, 0x04, 0xFD, 0x50, + 0xE8, 0x08, 0x39, 0x69, 0xED, 0xB7, 0x67, 0xB0, + 0xCF, 0x60, 0x95, 0x17, 0x9A, 0x16, 0x3A, 0xB3, + 0x66, 0x1A, 0x05, 0xFB, 0xD5, 0xFA, 0xAA, 0xE8, + 0x29, 0x18, 0xA9, 0x96, 0x2F, 0x0B, 0x93, 0xB8, + 0x55, 0xF9, 0x79, 0x93, 0xEC, 0x97, 0x5E, 0xEA, + 0xA8, 0x0D, 0x74, 0x0A, 0xDB, 0xF4, 0xFF, 0x74, + 0x73, 0x59, 0xD0, 0x41, 0xD5, 0xC3, 0x3E, 0xA7, + 0x1D, 0x28, 0x1E, 0x44, 0x6B, 0x14, 0x77, 0x3B, + 0xCA, 0x97, 0xB4, 0x3A, 0x23, 0xFB, 0x80, 0x16, + 0x76, 0xBD, 0x20, 0x7A, 0x43, 0x6C, 0x64, 0x81, + 0xF1, 0xD2, 0xB9, 0x07, 0x87, 0x17, 0x46, 0x1A, + 0x5B, 0x9D, 0x32, 0xE6, 0x88, 0xF8, 0x77, 0x48, + 0x54, 0x45, 0x23, 0xB5, 0x24, 0xB0, 0xD5, 0x7D, + 0x5E, 0xA7, 0x7A, 0x27, 0x75, 0xD2, 0xEC, 0xFA, + 0x03, 0x2C, 0xFB, 0xDB, 0xF5, 0x2F, 0xB3, 0x78, + 0x61, 0x60, 0x27, 0x90, 0x04, 0xE5, 0x7A, 0xE6, + 0xAF, 0x87, 0x4E, 0x73, 0x03, 0xCE, 0x53, 0x29, + 0x9C, 0xCC, 0x04, 0x1C, 0x7B, 0xC3, 0x08, 0xD8, + 0x2A, 0x56, 0x98, 0xF3, 0xA8, 0xD0, 0xC3, 0x82, + 0x71, 0xAE, 0x35, 0xF8, 0xE9, 0xDB, 0xFB, 0xB6, + 0x94, 0xB5, 0xC8, 0x03, 0xD8, 0x9F, 0x7A, 0xE4, + 0x35, 0xDE, 0x23, 0x6D, 0x52, 0x5F, 0x54, 0x75, + 0x9B, 0x65, 0xE3, 0x72, 0xFC, 0xD6, 0x8E, 0xF2, + 0x0F, 0xA7, 0x11, 0x1F, 0x9E, 0x4A, 0xFF, 0x73 +}; +#endif + +#if PPP_SERVER +/* Local forward declarations. */ +static void eap_server_timeout(void *arg); +#endif /* PPP_SERVER */ + +/* + * Convert EAP state code to printable string for debug. + */ +static const char * eap_state_name(enum eap_state_code esc) +{ + static const char *state_names[] = { EAP_STATES }; + + return (state_names[(int)esc]); +} + +/* + * eap_init - Initialize state for an EAP user. This is currently + * called once by main() during start-up. + */ +static void eap_init(ppp_pcb *pcb) { + + BZERO(&pcb->eap, sizeof(eap_state)); +#if PPP_SERVER + pcb->eap.es_server.ea_id = magic(); +#endif /* PPP_SERVER */ +} + +/* + * eap_client_timeout - Give up waiting for the peer to send any + * Request messages. + */ +static void eap_client_timeout(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + + if (!eap_client_active(pcb)) + return; + + ppp_error("EAP: timeout waiting for Request from peer"); + auth_withpeer_fail(pcb, PPP_EAP); + pcb->eap.es_client.ea_state = eapBadAuth; +} + +/* + * eap_authwithpeer - Authenticate to our peer (behave as client). + * + * Start client state and wait for requests. This is called only + * after eap_lowerup. + */ +void eap_authwithpeer(ppp_pcb *pcb, const char *localname) { + + if(NULL == localname) + return; + + /* Save the peer name we're given */ + pcb->eap.es_client.ea_name = localname; + pcb->eap.es_client.ea_namelen = strlen(localname); + + pcb->eap.es_client.ea_state = eapListen; + + /* + * Start a timer so that if the other end just goes + * silent, we don't sit here waiting forever. + */ + if (pcb->settings.eap_req_time > 0) + TIMEOUT(eap_client_timeout, pcb, + pcb->settings.eap_req_time); +} + +#if PPP_SERVER +/* + * Format a standard EAP Failure message and send it to the peer. + * (Server operation) + */ +static void eap_send_failure(ppp_pcb *pcb) { + struct pbuf *p; + u_char *outp; + + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_FAILURE, outp); + pcb->eap.es_server.ea_id++; + PUTCHAR(pcb->eap.es_server.ea_id, outp); + PUTSHORT(EAP_HEADERLEN, outp); + + ppp_write(pcb, p); + + pcb->eap.es_server.ea_state = eapBadAuth; + auth_peer_fail(pcb, PPP_EAP); +} + +/* + * Format a standard EAP Success message and send it to the peer. + * (Server operation) + */ +static void eap_send_success(ppp_pcb *pcb) { + struct pbuf *p; + u_char *outp; + + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + EAP_HEADERLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_SUCCESS, outp); + pcb->eap.es_server.ea_id++; + PUTCHAR(pcb->eap.es_server.ea_id, outp); + PUTSHORT(EAP_HEADERLEN, outp); + + ppp_write(pcb, p); + + auth_peer_success(pcb, PPP_EAP, 0, + pcb->eap.es_server.ea_peer, pcb->eap.es_server.ea_peerlen); +} +#endif /* PPP_SERVER */ + +#ifdef USE_SRP +/* + * Set DES key according to pseudonym-generating secret and current + * date. + */ +static bool +pncrypt_setkey(int timeoffs) +{ + struct tm *tp; + char tbuf[9]; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; + time_t reftime; + + if (pn_secret == NULL) + return (0); + reftime = time(NULL) + timeoffs; + tp = localtime(&reftime); + SHA1Init(&ctxt); + SHA1Update(&ctxt, pn_secret, strlen(pn_secret)); + strftime(tbuf, sizeof (tbuf), "%Y%m%d", tp); + SHA1Update(&ctxt, tbuf, strlen(tbuf)); + SHA1Final(dig, &ctxt); + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + return (DesSetkey(dig)); +} + +static char base64[] = +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +struct b64state { + u32_t bs_bits; + int bs_offs; +}; + +static int +b64enc(bs, inp, inlen, outp) +struct b64state *bs; +u_char *inp; +int inlen; +u_char *outp; +{ + int outlen = 0; + + while (inlen > 0) { + bs->bs_bits = (bs->bs_bits << 8) | *inp++; + inlen--; + bs->bs_offs += 8; + if (bs->bs_offs >= 24) { + *outp++ = base64[(bs->bs_bits >> 18) & 0x3F]; + *outp++ = base64[(bs->bs_bits >> 12) & 0x3F]; + *outp++ = base64[(bs->bs_bits >> 6) & 0x3F]; + *outp++ = base64[bs->bs_bits & 0x3F]; + outlen += 4; + bs->bs_offs = 0; + bs->bs_bits = 0; + } + } + return (outlen); +} + +static int +b64flush(bs, outp) +struct b64state *bs; +u_char *outp; +{ + int outlen = 0; + + if (bs->bs_offs == 8) { + *outp++ = base64[(bs->bs_bits >> 2) & 0x3F]; + *outp++ = base64[(bs->bs_bits << 4) & 0x3F]; + outlen = 2; + } else if (bs->bs_offs == 16) { + *outp++ = base64[(bs->bs_bits >> 10) & 0x3F]; + *outp++ = base64[(bs->bs_bits >> 4) & 0x3F]; + *outp++ = base64[(bs->bs_bits << 2) & 0x3F]; + outlen = 3; + } + bs->bs_offs = 0; + bs->bs_bits = 0; + return (outlen); +} + +static int +b64dec(bs, inp, inlen, outp) +struct b64state *bs; +u_char *inp; +int inlen; +u_char *outp; +{ + int outlen = 0; + char *cp; + + while (inlen > 0) { + if ((cp = strchr(base64, *inp++)) == NULL) + break; + bs->bs_bits = (bs->bs_bits << 6) | (cp - base64); + inlen--; + bs->bs_offs += 6; + if (bs->bs_offs >= 8) { + *outp++ = bs->bs_bits >> (bs->bs_offs - 8); + outlen++; + bs->bs_offs -= 8; + } + } + return (outlen); +} +#endif /* USE_SRP */ + +#if PPP_SERVER +/* + * Assume that current waiting server state is complete and figure + * next state to use based on available authentication data. 'status' + * indicates if there was an error in handling the last query. It is + * 0 for success and non-zero for failure. + */ +static void eap_figure_next_state(ppp_pcb *pcb, int status) { +#ifdef USE_SRP + unsigned char secbuf[MAXSECRETLEN], clear[8], *sp, *dp; + struct t_pw tpw; + struct t_confent *tce, mytce; + char *cp, *cp2; + struct t_server *ts; + int id, i, plen, toffs; + u_char vals[2]; + struct b64state bs; +#endif /* USE_SRP */ + + pcb->settings.eap_timeout_time = pcb->eap.es_savedtime; + switch (pcb->eap.es_server.ea_state) { + case eapBadAuth: + return; + + case eapIdentify: +#ifdef USE_SRP + /* Discard any previous session. */ + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } +#endif /* USE_SRP */ + if (status != 0) { + pcb->eap.es_server.ea_state = eapBadAuth; + break; + } +#ifdef USE_SRP + /* If we've got a pseudonym, try to decode to real name. */ + if (pcb->eap.es_server.ea_peerlen > SRP_PSEUDO_LEN && + strncmp(pcb->eap.es_server.ea_peer, SRP_PSEUDO_ID, + SRP_PSEUDO_LEN) == 0 && + (pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN) * 3 / 4 < + sizeof (secbuf)) { + BZERO(&bs, sizeof (bs)); + plen = b64dec(&bs, + pcb->eap.es_server.ea_peer + SRP_PSEUDO_LEN, + pcb->eap.es_server.ea_peerlen - SRP_PSEUDO_LEN, + secbuf); + toffs = 0; + for (i = 0; i < 5; i++) { + pncrypt_setkey(toffs); + toffs -= 86400; + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + if (!DesDecrypt(secbuf, clear)) { + ppp_dbglog("no DES here; cannot decode " + "pseudonym"); + return; + } + id = *(unsigned char *)clear; + if (id + 1 <= plen && id + 9 > plen) + break; + } + if (plen % 8 == 0 && i < 5) { + /* + * Note that this is always shorter than the + * original stored string, so there's no need + * to realloc. + */ + if ((i = plen = *(unsigned char *)clear) > 7) + i = 7; + pcb->eap.es_server.ea_peerlen = plen; + dp = (unsigned char *)pcb->eap.es_server.ea_peer; + MEMCPY(dp, clear + 1, i); + plen -= i; + dp += i; + sp = secbuf + 8; + while (plen > 0) { + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + (void) DesDecrypt(sp, dp); + sp += 8; + dp += 8; + plen -= 8; + } + pcb->eap.es_server.ea_peer[ + pcb->eap.es_server.ea_peerlen] = '\0'; + ppp_dbglog("decoded pseudonym to \"%.*q\"", + pcb->eap.es_server.ea_peerlen, + pcb->eap.es_server.ea_peer); + } else { + ppp_dbglog("failed to decode real name"); + /* Stay in eapIdentfy state; requery */ + break; + } + } + /* Look up user in secrets database. */ + if (get_srp_secret(pcb->eap.es_unit, pcb->eap.es_server.ea_peer, + pcb->eap.es_server.ea_name, (char *)secbuf, 1) != 0) { + /* Set up default in case SRP entry is bad */ + pcb->eap.es_server.ea_state = eapMD5Chall; + /* Get t_confent based on index in srp-secrets */ + id = strtol((char *)secbuf, &cp, 10); + if (*cp++ != ':' || id < 0) + break; + if (id == 0) { + mytce.index = 0; + mytce.modulus.data = (u_char *)wkmodulus; + mytce.modulus.len = sizeof (wkmodulus); + mytce.generator.data = (u_char *)"\002"; + mytce.generator.len = 1; + tce = &mytce; + } else if ((tce = gettcid(id)) != NULL) { + /* + * Client will have to verify this modulus/ + * generator combination, and that will take + * a while. Lengthen the timeout here. + */ + if (pcb->settings.eap_timeout_time > 0 && + pcb->settings.eap_timeout_time < 30) + pcb->settings.eap_timeout_time = 30; + } else { + break; + } + if ((cp2 = strchr(cp, ':')) == NULL) + break; + *cp2++ = '\0'; + tpw.pebuf.name = pcb->eap.es_server.ea_peer; + tpw.pebuf.password.len = t_fromb64((char *)tpw.pwbuf, + cp); + tpw.pebuf.password.data = tpw.pwbuf; + tpw.pebuf.salt.len = t_fromb64((char *)tpw.saltbuf, + cp2); + tpw.pebuf.salt.data = tpw.saltbuf; + if ((ts = t_serveropenraw(&tpw.pebuf, tce)) == NULL) + break; + pcb->eap.es_server.ea_session = (void *)ts; + pcb->eap.es_server.ea_state = eapSRP1; + vals[0] = pcb->eap.es_server.ea_id + 1; + vals[1] = EAPT_SRP; + t_serveraddexdata(ts, vals, 2); + /* Generate B; must call before t_servergetkey() */ + t_servergenexp(ts); + break; + } +#endif /* USE_SRP */ + pcb->eap.es_server.ea_state = eapMD5Chall; + break; + + case eapSRP1: +#ifdef USE_SRP + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL && status != 0) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } +#endif /* USE_SRP */ + if (status == 1) { + pcb->eap.es_server.ea_state = eapMD5Chall; + } else if (status != 0 || pcb->eap.es_server.ea_session == NULL) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapSRP2; + } + break; + + case eapSRP2: +#ifdef USE_SRP + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL && status != 0) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } +#endif /* USE_SRP */ + if (status != 0 || pcb->eap.es_server.ea_session == NULL) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapSRP3; + } + break; + + case eapSRP3: + case eapSRP4: +#ifdef USE_SRP + ts = (struct t_server *)pcb->eap.es_server.ea_session; + if (ts != NULL && status != 0) { + t_serverclose(ts); + pcb->eap.es_server.ea_session = NULL; + pcb->eap.es_server.ea_skey = NULL; + } +#endif /* USE_SRP */ + if (status != 0 || pcb->eap.es_server.ea_session == NULL) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapOpen; + } + break; + + case eapMD5Chall: + if (status != 0) { + pcb->eap.es_server.ea_state = eapBadAuth; + } else { + pcb->eap.es_server.ea_state = eapOpen; + } + break; + + default: + pcb->eap.es_server.ea_state = eapBadAuth; + break; + } + if (pcb->eap.es_server.ea_state == eapBadAuth) + eap_send_failure(pcb); +} + +/* + * Format an EAP Request message and send it to the peer. Message + * type depends on current state. (Server operation) + */ +static void eap_send_request(ppp_pcb *pcb) { + struct pbuf *p; + u_char *outp; + u_char *lenloc; + int outlen; + int len; + const char *str; +#ifdef USE_SRP + struct t_server *ts; + u_char clear[8], cipher[8], dig[SHA_DIGESTSIZE], *optr, *cp; + int i, j; + struct b64state b64; + SHA1_CTX ctxt; +#endif /* USE_SRP */ + + /* Handle both initial auth and restart */ + if (pcb->eap.es_server.ea_state < eapIdentify && + pcb->eap.es_server.ea_state != eapInitial) { + pcb->eap.es_server.ea_state = eapIdentify; +#if PPP_REMOTENAME + if (pcb->settings.explicit_remote && pcb->remote_name) { + /* + * If we already know the peer's + * unauthenticated name, then there's no + * reason to ask. Go to next state instead. + */ + int len = (int)strlen(pcb->remote_name); + if (len > MAXNAMELEN) { + len = MAXNAMELEN; + } + MEMCPY(pcb->eap.es_server.ea_peer, pcb->remote_name, len); + pcb->eap.es_server.ea_peer[len] = '\0'; + pcb->eap.es_server.ea_peerlen = len; + eap_figure_next_state(pcb, 0); + } +#endif /* PPP_REMOTENAME */ + } + + if (pcb->settings.eap_max_transmits > 0 && + pcb->eap.es_server.ea_requests >= pcb->settings.eap_max_transmits) { + if (pcb->eap.es_server.ea_responses > 0) + ppp_error("EAP: too many Requests sent"); + else + ppp_error("EAP: no response to Requests"); + eap_send_failure(pcb); + return; + } + + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_CTRL_PBUF_MAX_SIZE), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_REQUEST, outp); + PUTCHAR(pcb->eap.es_server.ea_id, outp); + lenloc = outp; + INCPTR(2, outp); + + switch (pcb->eap.es_server.ea_state) { + case eapIdentify: + PUTCHAR(EAPT_IDENTITY, outp); + str = "Name"; + len = strlen(str); + MEMCPY(outp, str, len); + INCPTR(len, outp); + break; + + case eapMD5Chall: + PUTCHAR(EAPT_MD5CHAP, outp); + /* + * pick a random challenge length between + * EAP_MIN_CHALLENGE_LENGTH and EAP_MAX_CHALLENGE_LENGTH + */ + pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + + magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); + PUTCHAR(pcb->eap.es_challen, outp); + magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); + MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); + INCPTR(pcb->eap.es_challen, outp); + MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); + INCPTR(pcb->eap.es_server.ea_namelen, outp); + break; + +#ifdef USE_SRP + case eapSRP1: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_CHALLENGE, outp); + + PUTCHAR(pcb->eap.es_server.ea_namelen, outp); + MEMCPY(outp, pcb->eap.es_server.ea_name, pcb->eap.es_server.ea_namelen); + INCPTR(pcb->eap.es_server.ea_namelen, outp); + + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + PUTCHAR(ts->s.len, outp); + MEMCPY(outp, ts->s.data, ts->s.len); + INCPTR(ts->s.len, outp); + + if (ts->g.len == 1 && ts->g.data[0] == 2) { + PUTCHAR(0, outp); + } else { + PUTCHAR(ts->g.len, outp); + MEMCPY(outp, ts->g.data, ts->g.len); + INCPTR(ts->g.len, outp); + } + + if (ts->n.len != sizeof (wkmodulus) || + BCMP(ts->n.data, wkmodulus, sizeof (wkmodulus)) != 0) { + MEMCPY(outp, ts->n.data, ts->n.len); + INCPTR(ts->n.len, outp); + } + break; + + case eapSRP2: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_SKEY, outp); + + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + MEMCPY(outp, ts->B.data, ts->B.len); + INCPTR(ts->B.len, outp); + break; + + case eapSRP3: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_SVALIDATOR, outp); + PUTLONG(SRPVAL_EBIT, outp); + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + MEMCPY(outp, t_serverresponse(ts), SHA_DIGESTSIZE); + INCPTR(SHA_DIGESTSIZE, outp); + + if (pncrypt_setkey(0)) { + /* Generate pseudonym */ + optr = outp; + cp = (unsigned char *)pcb->eap.es_server.ea_peer; + if ((j = i = pcb->eap.es_server.ea_peerlen) > 7) + j = 7; + clear[0] = i; + MEMCPY(clear + 1, cp, j); + i -= j; + cp += j; + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + if (!DesEncrypt(clear, cipher)) { + ppp_dbglog("no DES here; not generating pseudonym"); + break; + } + BZERO(&b64, sizeof (b64)); + outp++; /* space for pseudonym length */ + outp += b64enc(&b64, cipher, 8, outp); + while (i >= 8) { + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + (void) DesEncrypt(cp, cipher); + outp += b64enc(&b64, cipher, 8, outp); + cp += 8; + i -= 8; + } + if (i > 0) { + MEMCPY(clear, cp, i); + cp += i; + magic_random_bytes(cp, 8-i); + /* FIXME: if we want to do SRP, we need to find a way to pass the PolarSSL des_context instead of using static memory */ + (void) DesEncrypt(clear, cipher); + outp += b64enc(&b64, cipher, 8, outp); + } + outp += b64flush(&b64, outp); + + /* Set length and pad out to next 20 octet boundary */ + i = outp - optr - 1; + *optr = i; + i %= SHA_DIGESTSIZE; + if (i != 0) { + magic_random_bytes(outp, SHA_DIGESTSIZE-i); + INCPTR(SHA_DIGESTSIZE-i, outp); + } + + /* Obscure the pseudonym with SHA1 hash */ + SHA1Init(&ctxt); + SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); + SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, + pcb->eap.es_server.ea_peerlen); + while (optr < outp) { + SHA1Final(dig, &ctxt); + cp = dig; + while (cp < dig + SHA_DIGESTSIZE) + *optr++ ^= *cp++; + SHA1Init(&ctxt); + SHA1Update(&ctxt, &pcb->eap.es_server.ea_id, 1); + SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, optr - SHA_DIGESTSIZE, + SHA_DIGESTSIZE); + } + } + break; + + case eapSRP4: + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_LWRECHALLENGE, outp); + pcb->eap.es_challen = EAP_MIN_CHALLENGE_LENGTH + + magic_pow(EAP_MIN_MAX_POWER_OF_TWO_CHALLENGE_LENGTH); + magic_random_bytes(pcb->eap.es_challenge, pcb->eap.es_challen); + MEMCPY(outp, pcb->eap.es_challenge, pcb->eap.es_challen); + INCPTR(pcb->eap.es_challen, outp); + break; +#endif /* USE_SRP */ + + default: + return; + } + + outlen = (outp - (unsigned char*)p->payload) - PPP_HDRLEN; + PUTSHORT(outlen, lenloc); + + pbuf_realloc(p, outlen + PPP_HDRLEN); + ppp_write(pcb, p); + + pcb->eap.es_server.ea_requests++; + + if (pcb->settings.eap_timeout_time > 0) + TIMEOUT(eap_server_timeout, pcb, pcb->settings.eap_timeout_time); +} + +/* + * eap_authpeer - Authenticate our peer (behave as server). + * + * Start server state and send first request. This is called only + * after eap_lowerup. + */ +void eap_authpeer(ppp_pcb *pcb, const char *localname) { + + /* Save the name we're given. */ + pcb->eap.es_server.ea_name = localname; + pcb->eap.es_server.ea_namelen = strlen(localname); + + pcb->eap.es_savedtime = pcb->settings.eap_timeout_time; + + /* Lower layer up yet? */ + if (pcb->eap.es_server.ea_state == eapInitial || + pcb->eap.es_server.ea_state == eapPending) { + pcb->eap.es_server.ea_state = eapPending; + return; + } + + pcb->eap.es_server.ea_state = eapPending; + + /* ID number not updated here intentionally; hashed into M1 */ + eap_send_request(pcb); +} + +/* + * eap_server_timeout - Retransmission timer for sending Requests + * expired. + */ +static void eap_server_timeout(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + + if (!eap_server_active(pcb)) + return; + + /* EAP ID number must not change on timeout. */ + eap_send_request(pcb); +} + +/* + * When it's time to send rechallenge the peer, this timeout is + * called. Once the rechallenge is successful, the response handler + * will restart the timer. If it fails, then the link is dropped. + */ +static void eap_rechallenge(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + + if (pcb->eap.es_server.ea_state != eapOpen && + pcb->eap.es_server.ea_state != eapSRP4) + return; + + pcb->eap.es_server.ea_requests = 0; + pcb->eap.es_server.ea_state = eapIdentify; + eap_figure_next_state(pcb, 0); + pcb->eap.es_server.ea_id++; + eap_send_request(pcb); +} + +static void srp_lwrechallenge(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + + if (pcb->eap.es_server.ea_state != eapOpen || + pcb->eap.es_server.ea_type != EAPT_SRP) + return; + + pcb->eap.es_server.ea_requests = 0; + pcb->eap.es_server.ea_state = eapSRP4; + pcb->eap.es_server.ea_id++; + eap_send_request(pcb); +} +#endif /* PPP_SERVER */ + +/* + * eap_lowerup - The lower layer is now up. + * + * This is called before either eap_authpeer or eap_authwithpeer. See + * link_established() in auth.c. All that's necessary here is to + * return to closed state so that those two routines will do the right + * thing. + */ +static void eap_lowerup(ppp_pcb *pcb) { + pcb->eap.es_client.ea_state = eapClosed; +#if PPP_SERVER + pcb->eap.es_server.ea_state = eapClosed; +#endif /* PPP_SERVER */ +} + +/* + * eap_lowerdown - The lower layer is now down. + * + * Cancel all timeouts and return to initial state. + */ +static void eap_lowerdown(ppp_pcb *pcb) { + + if (eap_client_active(pcb) && pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } +#if PPP_SERVER + if (eap_server_active(pcb)) { + if (pcb->settings.eap_timeout_time > 0) { + UNTIMEOUT(eap_server_timeout, pcb); + } + } else { + if ((pcb->eap.es_server.ea_state == eapOpen || + pcb->eap.es_server.ea_state == eapSRP4) && + pcb->eap.es_rechallenge > 0) { + UNTIMEOUT(eap_rechallenge, (void *)pcb); + } + if (pcb->eap.es_server.ea_state == eapOpen && + pcb->eap.es_lwrechallenge > 0) { + UNTIMEOUT(srp_lwrechallenge, (void *)pcb); + } + } + + pcb->eap.es_client.ea_state = pcb->eap.es_server.ea_state = eapInitial; + pcb->eap.es_client.ea_requests = pcb->eap.es_server.ea_requests = 0; +#endif /* PPP_SERVER */ +} + +/* + * eap_protrej - Peer doesn't speak this protocol. + * + * This shouldn't happen. If it does, it represents authentication + * failure. + */ +static void eap_protrej(ppp_pcb *pcb) { + + if (eap_client_active(pcb)) { + ppp_error("EAP authentication failed due to Protocol-Reject"); + auth_withpeer_fail(pcb, PPP_EAP); + } +#if PPP_SERVER + if (eap_server_active(pcb)) { + ppp_error("EAP authentication of peer failed on Protocol-Reject"); + auth_peer_fail(pcb, PPP_EAP); + } +#endif /* PPP_SERVER */ + eap_lowerdown(pcb); +} + +/* + * Format and send a regular EAP Response message. + */ +static void eap_send_response(ppp_pcb *pcb, u_char id, u_char typenum, const u_char *str, int lenstr) { + struct pbuf *p; + u_char *outp; + int msglen; + + msglen = EAP_HEADERLEN + sizeof (u_char) + lenstr; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(typenum, outp); + if (lenstr > 0) { + MEMCPY(outp, str, lenstr); + } + + ppp_write(pcb, p); +} + +/* + * Format and send an MD5-Challenge EAP Response message. + */ +static void eap_chap_response(ppp_pcb *pcb, u_char id, u_char *hash, const char *name, int namelen) { + struct pbuf *p; + u_char *outp; + int msglen; + + msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + MD5_SIGNATURE_SIZE + + namelen; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_MD5CHAP, outp); + PUTCHAR(MD5_SIGNATURE_SIZE, outp); + MEMCPY(outp, hash, MD5_SIGNATURE_SIZE); + INCPTR(MD5_SIGNATURE_SIZE, outp); + if (namelen > 0) { + MEMCPY(outp, name, namelen); + } + + ppp_write(pcb, p); +} + +#ifdef USE_SRP +/* + * Format and send a SRP EAP Response message. + */ +static void +eap_srp_response(esp, id, subtypenum, str, lenstr) +eap_state *esp; +u_char id; +u_char subtypenum; +u_char *str; +int lenstr; +{ + ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; + struct pbuf *p; + u_char *outp; + int msglen; + + msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + lenstr; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(subtypenum, outp); + if (lenstr > 0) { + MEMCPY(outp, str, lenstr); + } + + ppp_write(pcb, p); +} + +/* + * Format and send a SRP EAP Client Validator Response message. + */ +static void +eap_srpval_response(esp, id, flags, str) +eap_state *esp; +u_char id; +u32_t flags; +u_char *str; +{ + ppp_pcb *pcb = &ppp_pcb_list[pcb->eap.es_unit]; + struct pbuf *p; + u_char *outp; + int msglen; + + msglen = EAP_HEADERLEN + 2 * sizeof (u_char) + sizeof (u32_t) + + SHA_DIGESTSIZE; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_SRP, outp); + PUTCHAR(EAPSRP_CVALIDATOR, outp); + PUTLONG(flags, outp); + MEMCPY(outp, str, SHA_DIGESTSIZE); + + ppp_write(pcb, p); +} +#endif /* USE_SRP */ + +static void eap_send_nak(ppp_pcb *pcb, u_char id, u_char type) { + struct pbuf *p; + u_char *outp; + int msglen; + + msglen = EAP_HEADERLEN + 2 * sizeof (u_char); + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN + msglen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + + MAKEHEADER(outp, PPP_EAP); + + PUTCHAR(EAP_RESPONSE, outp); + PUTCHAR(id, outp); + pcb->eap.es_client.ea_id = id; + PUTSHORT(msglen, outp); + PUTCHAR(EAPT_NAK, outp); + PUTCHAR(type, outp); + + ppp_write(pcb, p); +} + +#ifdef USE_SRP +static char * +name_of_pn_file() +{ + char *user, *path, *file; + struct passwd *pw; + size_t pl; + static bool pnlogged = 0; + + pw = getpwuid(getuid()); + if (pw == NULL || (user = pw->pw_dir) == NULL || user[0] == 0) { + errno = EINVAL; + return (NULL); + } + file = _PATH_PSEUDONYM; + pl = strlen(user) + strlen(file) + 2; + path = malloc(pl); + if (path == NULL) + return (NULL); + (void) slprintf(path, pl, "%s/%s", user, file); + if (!pnlogged) { + ppp_dbglog("pseudonym file: %s", path); + pnlogged = 1; + } + return (path); +} + +static int +open_pn_file(modebits) +mode_t modebits; +{ + char *path; + int fd, err; + + if ((path = name_of_pn_file()) == NULL) + return (-1); + fd = open(path, modebits, S_IRUSR | S_IWUSR); + err = errno; + free(path); + errno = err; + return (fd); +} + +static void +remove_pn_file() +{ + char *path; + + if ((path = name_of_pn_file()) != NULL) { + (void) unlink(path); + (void) free(path); + } +} + +static void +write_pseudonym(esp, inp, len, id) +eap_state *esp; +u_char *inp; +int len, id; +{ + u_char val; + u_char *datp, *digp; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; + int dsize, fd, olen = len; + + /* + * Do the decoding by working backwards. This eliminates the need + * to save the decoded output in a separate buffer. + */ + val = id; + while (len > 0) { + if ((dsize = len % SHA_DIGESTSIZE) == 0) + dsize = SHA_DIGESTSIZE; + len -= dsize; + datp = inp + len; + SHA1Init(&ctxt); + SHA1Update(&ctxt, &val, 1); + SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, SESSION_KEY_LEN); + if (len > 0) { + SHA1Update(&ctxt, datp, SHA_DIGESTSIZE); + } else { + SHA1Update(&ctxt, pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + } + SHA1Final(dig, &ctxt); + for (digp = dig; digp < dig + SHA_DIGESTSIZE; digp++) + *datp++ ^= *digp; + } + + /* Now check that the result is sane */ + if (olen <= 0 || *inp + 1 > olen) { + ppp_dbglog("EAP: decoded pseudonym is unusable <%.*B>", olen, inp); + return; + } + + /* Save it away */ + fd = open_pn_file(O_WRONLY | O_CREAT | O_TRUNC); + if (fd < 0) { + ppp_dbglog("EAP: error saving pseudonym: %m"); + return; + } + len = write(fd, inp + 1, *inp); + if (close(fd) != -1 && len == *inp) { + ppp_dbglog("EAP: saved pseudonym"); + pcb->eap.es_usedpseudo = 0; + } else { + ppp_dbglog("EAP: failed to save pseudonym"); + remove_pn_file(); + } +} +#endif /* USE_SRP */ + +/* + * eap_request - Receive EAP Request message (client mode). + */ +static void eap_request(ppp_pcb *pcb, u_char *inp, int id, int len) { + u_char typenum; + u_char vallen; + int secret_len; + char secret[MAXSECRETLEN]; + char rhostname[MAXNAMELEN]; + lwip_md5_context mdContext; + u_char hash[MD5_SIGNATURE_SIZE]; +#ifdef USE_SRP + struct t_client *tc; + struct t_num sval, gval, Nval, *Ap, Bval; + u_char vals[2]; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; + int fd; +#endif /* USE_SRP */ + + /* + * Note: we update es_client.ea_id *only if* a Response + * message is being generated. Otherwise, we leave it the + * same for duplicate detection purposes. + */ + + pcb->eap.es_client.ea_requests++; + if (pcb->settings.eap_allow_req != 0 && + pcb->eap.es_client.ea_requests > pcb->settings.eap_allow_req) { + ppp_info("EAP: received too many Request messages"); + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } + auth_withpeer_fail(pcb, PPP_EAP); + return; + } + + if (len <= 0) { + ppp_error("EAP: empty Request message discarded"); + return; + } + + GETCHAR(typenum, inp); + len--; + + switch (typenum) { + case EAPT_IDENTITY: + if (len > 0) + ppp_info("EAP: Identity prompt \"%.*q\"", len, inp); +#ifdef USE_SRP + if (pcb->eap.es_usepseudo && + (pcb->eap.es_usedpseudo == 0 || + (pcb->eap.es_usedpseudo == 1 && + id == pcb->eap.es_client.ea_id))) { + pcb->eap.es_usedpseudo = 1; + /* Try to get a pseudonym */ + if ((fd = open_pn_file(O_RDONLY)) >= 0) { + strcpy(rhostname, SRP_PSEUDO_ID); + len = read(fd, rhostname + SRP_PSEUDO_LEN, + sizeof (rhostname) - SRP_PSEUDO_LEN); + /* XXX NAI unsupported */ + if (len > 0) { + eap_send_response(pcb, id, typenum, + rhostname, len + SRP_PSEUDO_LEN); + } + (void) close(fd); + if (len > 0) + break; + } + } + /* Stop using pseudonym now. */ + if (pcb->eap.es_usepseudo && pcb->eap.es_usedpseudo != 2) { + remove_pn_file(); + pcb->eap.es_usedpseudo = 2; + } +#endif /* USE_SRP */ + eap_send_response(pcb, id, typenum, (const u_char*)pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + break; + + case EAPT_NOTIFICATION: + if (len > 0) + ppp_info("EAP: Notification \"%.*q\"", len, inp); + eap_send_response(pcb, id, typenum, NULL, 0); + break; + + case EAPT_NAK: + /* + * Avoid the temptation to send Response Nak in reply + * to Request Nak here. It can only lead to trouble. + */ + ppp_warn("EAP: unexpected Nak in Request; ignored"); + /* Return because we're waiting for something real. */ + return; + + case EAPT_MD5CHAP: + if (len < 1) { + ppp_error("EAP: received MD5-Challenge with no data"); + /* Bogus request; wait for something real. */ + return; + } + GETCHAR(vallen, inp); + len--; + if (vallen < 8 || vallen > len) { + ppp_error("EAP: MD5-Challenge with bad length %d (8..%d)", + vallen, len); + /* Try something better. */ + eap_send_nak(pcb, id, EAPT_SRP); + break; + } + + /* Not so likely to happen. */ + if (vallen >= len + sizeof (rhostname)) { + ppp_dbglog("EAP: trimming really long peer name down"); + MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); + rhostname[sizeof (rhostname) - 1] = '\0'; + } else { + MEMCPY(rhostname, inp + vallen, len - vallen); + rhostname[len - vallen] = '\0'; + } + +#if PPP_REMOTENAME + /* In case the remote doesn't give us his name. */ + if (pcb->settings.explicit_remote || + (pcb->settings.remote_name[0] != '\0' && vallen == len)) + strlcpy(rhostname, pcb->settings.remote_name, sizeof (rhostname)); +#endif /* PPP_REMOTENAME */ + + /* + * Get the secret for authenticating ourselves with + * the specified host. + */ + if (!get_secret(pcb, pcb->eap.es_client.ea_name, + rhostname, secret, &secret_len, 0)) { + ppp_dbglog("EAP: no MD5 secret for auth to %q", rhostname); + eap_send_nak(pcb, id, EAPT_SRP); + break; + } + lwip_md5_init(&mdContext); + lwip_md5_starts(&mdContext); + typenum = id; + lwip_md5_update(&mdContext, &typenum, 1); + lwip_md5_update(&mdContext, (u_char *)secret, secret_len); + BZERO(secret, sizeof (secret)); + lwip_md5_update(&mdContext, inp, vallen); + lwip_md5_finish(&mdContext, hash); + lwip_md5_free(&mdContext); + eap_chap_response(pcb, id, hash, pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + break; + +#ifdef USE_SRP + case EAPT_SRP: + if (len < 1) { + ppp_error("EAP: received empty SRP Request"); + /* Bogus request; wait for something real. */ + return; + } + + /* Get subtype */ + GETCHAR(vallen, inp); + len--; + switch (vallen) { + case EAPSRP_CHALLENGE: + tc = NULL; + if (pcb->eap.es_client.ea_session != NULL) { + tc = (struct t_client *)pcb->eap.es_client. + ea_session; + /* + * If this is a new challenge, then start + * over with a new client session context. + * Otherwise, just resend last response. + */ + if (id != pcb->eap.es_client.ea_id) { + t_clientclose(tc); + pcb->eap.es_client.ea_session = NULL; + tc = NULL; + } + } + /* No session key just yet */ + pcb->eap.es_client.ea_skey = NULL; + if (tc == NULL) { + int rhostnamelen; + + GETCHAR(vallen, inp); + len--; + if (vallen >= len) { + ppp_error("EAP: badly-formed SRP Challenge" + " (name)"); + /* Ignore badly-formed messages */ + return; + } + MEMCPY(rhostname, inp, vallen); + rhostname[vallen] = '\0'; + INCPTR(vallen, inp); + len -= vallen; + + /* + * In case the remote doesn't give us his name, + * use configured name. + */ + if (explicit_remote || + (remote_name[0] != '\0' && vallen == 0)) { + strlcpy(rhostname, remote_name, + sizeof (rhostname)); + } + + rhostnamelen = (int)strlen(rhostname); + if (rhostnamelen > MAXNAMELEN) { + rhostnamelen = MAXNAMELEN; + } + MEMCPY(pcb->eap.es_client.ea_peer, rhostname, rhostnamelen); + pcb->eap.es_client.ea_peer[rhostnamelen] = '\0'; + pcb->eap.es_client.ea_peerlen = rhostnamelen; + + GETCHAR(vallen, inp); + len--; + if (vallen >= len) { + ppp_error("EAP: badly-formed SRP Challenge" + " (s)"); + /* Ignore badly-formed messages */ + return; + } + sval.data = inp; + sval.len = vallen; + INCPTR(vallen, inp); + len -= vallen; + + GETCHAR(vallen, inp); + len--; + if (vallen > len) { + ppp_error("EAP: badly-formed SRP Challenge" + " (g)"); + /* Ignore badly-formed messages */ + return; + } + /* If no generator present, then use value 2 */ + if (vallen == 0) { + gval.data = (u_char *)"\002"; + gval.len = 1; + } else { + gval.data = inp; + gval.len = vallen; + } + INCPTR(vallen, inp); + len -= vallen; + + /* + * If no modulus present, then use well-known + * value. + */ + if (len == 0) { + Nval.data = (u_char *)wkmodulus; + Nval.len = sizeof (wkmodulus); + } else { + Nval.data = inp; + Nval.len = len; + } + tc = t_clientopen(pcb->eap.es_client.ea_name, + &Nval, &gval, &sval); + if (tc == NULL) { + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + pcb->eap.es_client.ea_session = (void *)tc; + + /* Add Challenge ID & type to verifier */ + vals[0] = id; + vals[1] = EAPT_SRP; + t_clientaddexdata(tc, vals, 2); + } + Ap = t_clientgenexp(tc); + eap_srp_response(esp, id, EAPSRP_CKEY, Ap->data, + Ap->len); + break; + + case EAPSRP_SKEY: + tc = (struct t_client *)pcb->eap.es_client.ea_session; + if (tc == NULL) { + ppp_warn("EAP: peer sent Subtype 2 without 1"); + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + if (pcb->eap.es_client.ea_skey != NULL) { + /* + * ID number should not change here. Warn + * if it does (but otherwise ignore). + */ + if (id != pcb->eap.es_client.ea_id) { + ppp_warn("EAP: ID changed from %d to %d " + "in SRP Subtype 2 rexmit", + pcb->eap.es_client.ea_id, id); + } + } else { + if (get_srp_secret(pcb->eap.es_unit, + pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_peer, secret, 0) == 0) { + /* + * Can't work with this peer because + * the secret is missing. Just give + * up. + */ + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + Bval.data = inp; + Bval.len = len; + t_clientpasswd(tc, secret); + BZERO(secret, sizeof (secret)); + pcb->eap.es_client.ea_skey = + t_clientgetkey(tc, &Bval); + if (pcb->eap.es_client.ea_skey == NULL) { + /* Server is rogue; stop now */ + ppp_error("EAP: SRP server is rogue"); + goto client_failure; + } + } + eap_srpval_response(esp, id, SRPVAL_EBIT, + t_clientresponse(tc)); + break; + + case EAPSRP_SVALIDATOR: + tc = (struct t_client *)pcb->eap.es_client.ea_session; + if (tc == NULL || pcb->eap.es_client.ea_skey == NULL) { + ppp_warn("EAP: peer sent Subtype 3 without 1/2"); + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + /* + * If we're already open, then this ought to be a + * duplicate. Otherwise, check that the server is + * who we think it is. + */ + if (pcb->eap.es_client.ea_state == eapOpen) { + if (id != pcb->eap.es_client.ea_id) { + ppp_warn("EAP: ID changed from %d to %d " + "in SRP Subtype 3 rexmit", + pcb->eap.es_client.ea_id, id); + } + } else { + len -= sizeof (u32_t) + SHA_DIGESTSIZE; + if (len < 0 || t_clientverify(tc, inp + + sizeof (u32_t)) != 0) { + ppp_error("EAP: SRP server verification " + "failed"); + goto client_failure; + } + GETLONG(pcb->eap.es_client.ea_keyflags, inp); + /* Save pseudonym if user wants it. */ + if (len > 0 && pcb->eap.es_usepseudo) { + INCPTR(SHA_DIGESTSIZE, inp); + write_pseudonym(esp, inp, len, id); + } + } + /* + * We've verified our peer. We're now mostly done, + * except for waiting on the regular EAP Success + * message. + */ + eap_srp_response(esp, id, EAPSRP_ACK, NULL, 0); + break; + + case EAPSRP_LWRECHALLENGE: + if (len < 4) { + ppp_warn("EAP: malformed Lightweight rechallenge"); + return; + } + SHA1Init(&ctxt); + vals[0] = id; + SHA1Update(&ctxt, vals, 1); + SHA1Update(&ctxt, pcb->eap.es_client.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, inp, len); + SHA1Update(&ctxt, pcb->eap.es_client.ea_name, + pcb->eap.es_client.ea_namelen); + SHA1Final(dig, &ctxt); + eap_srp_response(esp, id, EAPSRP_LWRECHALLENGE, dig, + SHA_DIGESTSIZE); + break; + + default: + ppp_error("EAP: unknown SRP Subtype %d", vallen); + eap_send_nak(pcb, id, EAPT_MD5CHAP); + break; + } + break; +#endif /* USE_SRP */ + + default: + ppp_info("EAP: unknown authentication type %d; Naking", typenum); + eap_send_nak(pcb, id, EAPT_SRP); + break; + } + + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + TIMEOUT(eap_client_timeout, pcb, + pcb->settings.eap_req_time); + } + return; + +#ifdef USE_SRP +client_failure: + pcb->eap.es_client.ea_state = eapBadAuth; + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, (void *)esp); + } + pcb->eap.es_client.ea_session = NULL; + t_clientclose(tc); + auth_withpeer_fail(pcb, PPP_EAP); +#endif /* USE_SRP */ +} + +#if PPP_SERVER +/* + * eap_response - Receive EAP Response message (server mode). + */ +static void eap_response(ppp_pcb *pcb, u_char *inp, int id, int len) { + u_char typenum; + u_char vallen; + int secret_len; + char secret[MAXSECRETLEN]; + char rhostname[MAXNAMELEN]; + lwip_md5_context mdContext; + u_char hash[MD5_SIGNATURE_SIZE]; +#ifdef USE_SRP + struct t_server *ts; + struct t_num A; + SHA1_CTX ctxt; + u_char dig[SHA_DIGESTSIZE]; +#endif /* USE_SRP */ + + if (pcb->eap.es_server.ea_id != id) { + ppp_dbglog("EAP: discarding Response %d; expected ID %d", id, + pcb->eap.es_server.ea_id); + return; + } + + pcb->eap.es_server.ea_responses++; + + if (len <= 0) { + ppp_error("EAP: empty Response message discarded"); + return; + } + + GETCHAR(typenum, inp); + len--; + + switch (typenum) { + case EAPT_IDENTITY: + if (pcb->eap.es_server.ea_state != eapIdentify) { + ppp_dbglog("EAP discarding unwanted Identify \"%.q\"", len, + inp); + break; + } + ppp_info("EAP: unauthenticated peer name \"%.*q\"", len, inp); + if (len > MAXNAMELEN) { + len = MAXNAMELEN; + } + MEMCPY(pcb->eap.es_server.ea_peer, inp, len); + pcb->eap.es_server.ea_peer[len] = '\0'; + pcb->eap.es_server.ea_peerlen = len; + eap_figure_next_state(pcb, 0); + break; + + case EAPT_NOTIFICATION: + ppp_dbglog("EAP unexpected Notification; response discarded"); + break; + + case EAPT_NAK: + if (len < 1) { + ppp_info("EAP: Nak Response with no suggested protocol"); + eap_figure_next_state(pcb, 1); + break; + } + + GETCHAR(vallen, inp); + len--; + + if ( +#if PPP_REMOTENAME + !pcb->explicit_remote && +#endif /* PPP_REMOTENAME */ + pcb->eap.es_server.ea_state == eapIdentify){ + /* Peer cannot Nak Identify Request */ + eap_figure_next_state(pcb, 1); + break; + } + + switch (vallen) { + case EAPT_SRP: + /* Run through SRP validator selection again. */ + pcb->eap.es_server.ea_state = eapIdentify; + eap_figure_next_state(pcb, 0); + break; + + case EAPT_MD5CHAP: + pcb->eap.es_server.ea_state = eapMD5Chall; + break; + + default: + ppp_dbglog("EAP: peer requesting unknown Type %d", vallen); + switch (pcb->eap.es_server.ea_state) { + case eapSRP1: + case eapSRP2: + case eapSRP3: + pcb->eap.es_server.ea_state = eapMD5Chall; + break; + case eapMD5Chall: + case eapSRP4: + pcb->eap.es_server.ea_state = eapIdentify; + eap_figure_next_state(pcb, 0); + break; + default: + break; + } + break; + } + break; + + case EAPT_MD5CHAP: + if (pcb->eap.es_server.ea_state != eapMD5Chall) { + ppp_error("EAP: unexpected MD5-Response"); + eap_figure_next_state(pcb, 1); + break; + } + if (len < 1) { + ppp_error("EAP: received MD5-Response with no data"); + eap_figure_next_state(pcb, 1); + break; + } + GETCHAR(vallen, inp); + len--; + if (vallen != 16 || vallen > len) { + ppp_error("EAP: MD5-Response with bad length %d", vallen); + eap_figure_next_state(pcb, 1); + break; + } + + /* Not so likely to happen. */ + if (vallen >= len + sizeof (rhostname)) { + ppp_dbglog("EAP: trimming really long peer name down"); + MEMCPY(rhostname, inp + vallen, sizeof (rhostname) - 1); + rhostname[sizeof (rhostname) - 1] = '\0'; + } else { + MEMCPY(rhostname, inp + vallen, len - vallen); + rhostname[len - vallen] = '\0'; + } + +#if PPP_REMOTENAME + /* In case the remote doesn't give us his name. */ + if (explicit_remote || + (remote_name[0] != '\0' && vallen == len)) + strlcpy(rhostname, remote_name, sizeof (rhostname)); +#endif /* PPP_REMOTENAME */ + + /* + * Get the secret for authenticating the specified + * host. + */ + if (!get_secret(pcb, rhostname, + pcb->eap.es_server.ea_name, secret, &secret_len, 1)) { + ppp_dbglog("EAP: no MD5 secret for auth of %q", rhostname); + eap_send_failure(pcb); + break; + } + lwip_md5_init(&mdContext); + lwip_md5_starts(&mdContext); + lwip_md5_update(&mdContext, &pcb->eap.es_server.ea_id, 1); + lwip_md5_update(&mdContext, (u_char *)secret, secret_len); + BZERO(secret, sizeof (secret)); + lwip_md5_update(&mdContext, pcb->eap.es_challenge, pcb->eap.es_challen); + lwip_md5_finish(&mdContext, hash); + lwip_md5_free(&mdContext); + if (BCMP(hash, inp, MD5_SIGNATURE_SIZE) != 0) { + eap_send_failure(pcb); + break; + } + pcb->eap.es_server.ea_type = EAPT_MD5CHAP; + eap_send_success(pcb); + eap_figure_next_state(pcb, 0); + if (pcb->eap.es_rechallenge != 0) + TIMEOUT(eap_rechallenge, pcb, pcb->eap.es_rechallenge); + break; + +#ifdef USE_SRP + case EAPT_SRP: + if (len < 1) { + ppp_error("EAP: empty SRP Response"); + eap_figure_next_state(pcb, 1); + break; + } + GETCHAR(typenum, inp); + len--; + switch (typenum) { + case EAPSRP_CKEY: + if (pcb->eap.es_server.ea_state != eapSRP1) { + ppp_error("EAP: unexpected SRP Subtype 1 Response"); + eap_figure_next_state(pcb, 1); + break; + } + A.data = inp; + A.len = len; + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + pcb->eap.es_server.ea_skey = t_servergetkey(ts, &A); + if (pcb->eap.es_server.ea_skey == NULL) { + /* Client's A value is bogus; terminate now */ + ppp_error("EAP: bogus A value from client"); + eap_send_failure(pcb); + } else { + eap_figure_next_state(pcb, 0); + } + break; + + case EAPSRP_CVALIDATOR: + if (pcb->eap.es_server.ea_state != eapSRP2) { + ppp_error("EAP: unexpected SRP Subtype 2 Response"); + eap_figure_next_state(pcb, 1); + break; + } + if (len < sizeof (u32_t) + SHA_DIGESTSIZE) { + ppp_error("EAP: M1 length %d < %d", len, + sizeof (u32_t) + SHA_DIGESTSIZE); + eap_figure_next_state(pcb, 1); + break; + } + GETLONG(pcb->eap.es_server.ea_keyflags, inp); + ts = (struct t_server *)pcb->eap.es_server.ea_session; + assert(ts != NULL); + if (t_serververify(ts, inp)) { + ppp_info("EAP: unable to validate client identity"); + eap_send_failure(pcb); + break; + } + eap_figure_next_state(pcb, 0); + break; + + case EAPSRP_ACK: + if (pcb->eap.es_server.ea_state != eapSRP3) { + ppp_error("EAP: unexpected SRP Subtype 3 Response"); + eap_send_failure(esp); + break; + } + pcb->eap.es_server.ea_type = EAPT_SRP; + eap_send_success(pcb, esp); + eap_figure_next_state(pcb, 0); + if (pcb->eap.es_rechallenge != 0) + TIMEOUT(eap_rechallenge, pcb, + pcb->eap.es_rechallenge); + if (pcb->eap.es_lwrechallenge != 0) + TIMEOUT(srp_lwrechallenge, pcb, + pcb->eap.es_lwrechallenge); + break; + + case EAPSRP_LWRECHALLENGE: + if (pcb->eap.es_server.ea_state != eapSRP4) { + ppp_info("EAP: unexpected SRP Subtype 4 Response"); + return; + } + if (len != SHA_DIGESTSIZE) { + ppp_error("EAP: bad Lightweight rechallenge " + "response"); + return; + } + SHA1Init(&ctxt); + vallen = id; + SHA1Update(&ctxt, &vallen, 1); + SHA1Update(&ctxt, pcb->eap.es_server.ea_skey, + SESSION_KEY_LEN); + SHA1Update(&ctxt, pcb->eap.es_challenge, pcb->eap.es_challen); + SHA1Update(&ctxt, pcb->eap.es_server.ea_peer, + pcb->eap.es_server.ea_peerlen); + SHA1Final(dig, &ctxt); + if (BCMP(dig, inp, SHA_DIGESTSIZE) != 0) { + ppp_error("EAP: failed Lightweight rechallenge"); + eap_send_failure(pcb); + break; + } + pcb->eap.es_server.ea_state = eapOpen; + if (pcb->eap.es_lwrechallenge != 0) + TIMEOUT(srp_lwrechallenge, esp, + pcb->eap.es_lwrechallenge); + break; + } + break; +#endif /* USE_SRP */ + + default: + /* This can't happen. */ + ppp_error("EAP: unknown Response type %d; ignored", typenum); + return; + } + + if (pcb->settings.eap_timeout_time > 0) { + UNTIMEOUT(eap_server_timeout, pcb); + } + + if (pcb->eap.es_server.ea_state != eapBadAuth && + pcb->eap.es_server.ea_state != eapOpen) { + pcb->eap.es_server.ea_id++; + eap_send_request(pcb); + } +} +#endif /* PPP_SERVER */ + +/* + * eap_success - Receive EAP Success message (client mode). + */ +static void eap_success(ppp_pcb *pcb, u_char *inp, int id, int len) { + LWIP_UNUSED_ARG(id); + + if (pcb->eap.es_client.ea_state != eapOpen && !eap_client_active(pcb)) { + ppp_dbglog("EAP unexpected success message in state %s (%d)", + eap_state_name(pcb->eap.es_client.ea_state), + pcb->eap.es_client.ea_state); + return; + } + + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } + + if (len > 0) { + /* This is odd. The spec doesn't allow for this. */ + PRINTMSG(inp, len); + } + + pcb->eap.es_client.ea_state = eapOpen; + auth_withpeer_success(pcb, PPP_EAP, 0); +} + +/* + * eap_failure - Receive EAP Failure message (client mode). + */ +static void eap_failure(ppp_pcb *pcb, u_char *inp, int id, int len) { + LWIP_UNUSED_ARG(id); + + if (!eap_client_active(pcb)) { + ppp_dbglog("EAP unexpected failure message in state %s (%d)", + eap_state_name(pcb->eap.es_client.ea_state), + pcb->eap.es_client.ea_state); + } + + if (pcb->settings.eap_req_time > 0) { + UNTIMEOUT(eap_client_timeout, pcb); + } + + if (len > 0) { + /* This is odd. The spec doesn't allow for this. */ + PRINTMSG(inp, len); + } + + pcb->eap.es_client.ea_state = eapBadAuth; + + ppp_error("EAP: peer reports authentication failure"); + auth_withpeer_fail(pcb, PPP_EAP); +} + +/* + * eap_input - Handle received EAP message. + */ +static void eap_input(ppp_pcb *pcb, u_char *inp, int inlen) { + u_char code, id; + int len; + + /* + * Parse header (code, id and length). If packet too short, + * drop it. + */ + if (inlen < EAP_HEADERLEN) { + ppp_error("EAP: packet too short: %d < %d", inlen, EAP_HEADERLEN); + return; + } + GETCHAR(code, inp); + GETCHAR(id, inp); + GETSHORT(len, inp); + if (len < EAP_HEADERLEN || len > inlen) { + ppp_error("EAP: packet has illegal length field %d (%d..%d)", len, + EAP_HEADERLEN, inlen); + return; + } + len -= EAP_HEADERLEN; + + /* Dispatch based on message code */ + switch (code) { + case EAP_REQUEST: + eap_request(pcb, inp, id, len); + break; + +#if PPP_SERVER + case EAP_RESPONSE: + eap_response(pcb, inp, id, len); + break; +#endif /* PPP_SERVER */ + + case EAP_SUCCESS: + eap_success(pcb, inp, id, len); + break; + + case EAP_FAILURE: + eap_failure(pcb, inp, id, len); + break; + + default: /* XXX Need code reject */ + /* Note: it's not legal to send EAP Nak here. */ + ppp_warn("EAP: unknown code %d received", code); + break; + } +} + +#if PRINTPKT_SUPPORT +/* + * eap_printpkt - print the contents of an EAP packet. + */ +static const char* const eap_codenames[] = { + "Request", "Response", "Success", "Failure" +}; + +static const char* const eap_typenames[] = { + "Identity", "Notification", "Nak", "MD5-Challenge", + "OTP", "Generic-Token", NULL, NULL, + "RSA", "DSS", "KEA", "KEA-Validate", + "TLS", "Defender", "Windows 2000", "Arcot", + "Cisco", "Nokia", "SRP" +}; + +static int eap_printpkt(const u_char *inp, int inlen, void (*printer) (void *, const char *, ...), void *arg) { + int code, id, len, rtype, vallen; + const u_char *pstart; + u32_t uval; + + if (inlen < EAP_HEADERLEN) + return (0); + pstart = inp; + GETCHAR(code, inp); + GETCHAR(id, inp); + GETSHORT(len, inp); + if (len < EAP_HEADERLEN || len > inlen) + return (0); + + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(eap_codenames)) + printer(arg, " %s", eap_codenames[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= EAP_HEADERLEN; + switch (code) { + case EAP_REQUEST: + if (len < 1) { + printer(arg, " "); + break; + } + GETCHAR(rtype, inp); + len--; + if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) + printer(arg, " %s", eap_typenames[rtype-1]); + else + printer(arg, " type=0x%x", rtype); + switch (rtype) { + case EAPT_IDENTITY: + case EAPT_NOTIFICATION: + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } else { + printer(arg, " "); + } + break; + + case EAPT_MD5CHAP: + if (len <= 0) + break; + GETCHAR(vallen, inp); + len--; + if (vallen > len) + goto truncated; + printer(arg, " ", vallen, inp); + INCPTR(vallen, inp); + len -= vallen; + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } else { + printer(arg, " "); + } + break; + + case EAPT_SRP: + if (len < 3) + goto truncated; + GETCHAR(vallen, inp); + len--; + printer(arg, "-%d", vallen); + switch (vallen) { + case EAPSRP_CHALLENGE: + GETCHAR(vallen, inp); + len--; + if (vallen >= len) + goto truncated; + if (vallen > 0) { + printer(arg, " "); + } else { + printer(arg, " "); + } + INCPTR(vallen, inp); + len -= vallen; + GETCHAR(vallen, inp); + len--; + if (vallen >= len) + goto truncated; + printer(arg, " ", vallen, inp); + INCPTR(vallen, inp); + len -= vallen; + GETCHAR(vallen, inp); + len--; + if (vallen > len) + goto truncated; + if (vallen == 0) { + printer(arg, " "); + } else { + printer(arg, " ", vallen, inp); + } + INCPTR(vallen, inp); + len -= vallen; + if (len == 0) { + printer(arg, " "); + } else { + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + } + break; + + case EAPSRP_SKEY: + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + break; + + case EAPSRP_SVALIDATOR: + if (len < (int)sizeof (u32_t)) + break; + GETLONG(uval, inp); + len -= sizeof (u32_t); + if (uval & SRPVAL_EBIT) { + printer(arg, " E"); + uval &= ~SRPVAL_EBIT; + } + if (uval != 0) { + printer(arg, " f<%X>", uval); + } + if ((vallen = len) > SHA_DIGESTSIZE) + vallen = SHA_DIGESTSIZE; + printer(arg, " ", len, inp, + len < SHA_DIGESTSIZE ? "?" : ""); + INCPTR(vallen, inp); + len -= vallen; + if (len > 0) { + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + } + break; + + case EAPSRP_LWRECHALLENGE: + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + break; + default: + break; + } + break; + default: + break; + } + break; + + case EAP_RESPONSE: + if (len < 1) + break; + GETCHAR(rtype, inp); + len--; + if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) + printer(arg, " %s", eap_typenames[rtype-1]); + else + printer(arg, " type=0x%x", rtype); + switch (rtype) { + case EAPT_IDENTITY: + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } + break; + + case EAPT_NAK: + if (len <= 0) { + printer(arg, " "); + break; + } + GETCHAR(rtype, inp); + len--; + printer(arg, " = 1 && rtype < (int)LWIP_ARRAYSIZE(eap_typenames)) + printer(arg, " (%s)", eap_typenames[rtype-1]); + printer(arg, ">"); + break; + + case EAPT_MD5CHAP: + if (len <= 0) { + printer(arg, " "); + break; + } + GETCHAR(vallen, inp); + len--; + if (vallen > len) + goto truncated; + printer(arg, " ", vallen, inp); + INCPTR(vallen, inp); + len -= vallen; + if (len > 0) { + printer(arg, " "); + INCPTR(len, inp); + len = 0; + } else { + printer(arg, " "); + } + break; + + case EAPT_SRP: + if (len < 1) + goto truncated; + GETCHAR(vallen, inp); + len--; + printer(arg, "-%d", vallen); + switch (vallen) { + case EAPSRP_CKEY: + printer(arg, " ", len, inp); + INCPTR(len, inp); + len = 0; + break; + + case EAPSRP_CVALIDATOR: + if (len < (int)sizeof (u32_t)) + break; + GETLONG(uval, inp); + len -= sizeof (u32_t); + if (uval & SRPVAL_EBIT) { + printer(arg, " E"); + uval &= ~SRPVAL_EBIT; + } + if (uval != 0) { + printer(arg, " f<%X>", uval); + } + printer(arg, " ", len, inp, + len == SHA_DIGESTSIZE ? "" : "?"); + INCPTR(len, inp); + len = 0; + break; + + case EAPSRP_ACK: + break; + + case EAPSRP_LWRECHALLENGE: + printer(arg, " ", len, inp, + len == SHA_DIGESTSIZE ? "" : "?"); + if ((vallen = len) > SHA_DIGESTSIZE) + vallen = SHA_DIGESTSIZE; + INCPTR(vallen, inp); + len -= vallen; + break; + default: + break; + } + break; + default: + break; + } + break; + + case EAP_SUCCESS: /* No payload expected for these! */ + case EAP_FAILURE: + default: + break; + + truncated: + printer(arg, " "); + break; + } + + if (len > 8) + printer(arg, "%8B...", inp); + else if (len > 0) + printer(arg, "%.*B", len, inp); + INCPTR(len, inp); + + return (inp - pstart); +} +#endif /* PRINTPKT_SUPPORT */ + +#endif /* PPP_SUPPORT && EAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.c index 4d84f60..a22eda8 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ecp.c @@ -1,191 +1,191 @@ -/* - * ecp.c - PPP Encryption Control Protocol. - * - * Copyright (c) 2002 Google, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Derived from ccp.c, which is: - * - * Copyright (c) 1994-2002 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/ecp.h" - -#if PPP_OPTIONS -static option_t ecp_option_list[] = { - { "noecp", o_bool, &ecp_protent.enabled_flag, - "Disable ECP negotiation" }, - { "-ecp", o_bool, &ecp_protent.enabled_flag, - "Disable ECP negotiation", OPT_ALIAS }, - - { NULL } -}; -#endif /* PPP_OPTIONS */ - -/* - * Protocol entry points from main code. - */ -static void ecp_init (int unit); -/* -static void ecp_open (int unit); -static void ecp_close (int unit, char *); -static void ecp_lowerup (int unit); -static void ecp_lowerdown (int); -static void ecp_input (int unit, u_char *pkt, int len); -static void ecp_protrej (int unit); -*/ -#if PRINTPKT_SUPPORT -static int ecp_printpkt (const u_char *pkt, int len, - void (*printer) (void *, char *, ...), - void *arg); -#endif /* PRINTPKT_SUPPORT */ -/* -static void ecp_datainput (int unit, u_char *pkt, int len); -*/ - -const struct protent ecp_protent = { - PPP_ECP, - ecp_init, - NULL, /* ecp_input, */ - NULL, /* ecp_protrej, */ - NULL, /* ecp_lowerup, */ - NULL, /* ecp_lowerdown, */ - NULL, /* ecp_open, */ - NULL, /* ecp_close, */ -#if PRINTPKT_SUPPORT - ecp_printpkt, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - NULL, /* ecp_datainput, */ -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "ECP", - "Encrypted", -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - ecp_option_list, - NULL, -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - NULL, - NULL -#endif /* DEMAND_SUPPORT */ -}; - -fsm ecp_fsm[NUM_PPP]; -ecp_options ecp_wantoptions[NUM_PPP]; /* what to request the peer to use */ -ecp_options ecp_gotoptions[NUM_PPP]; /* what the peer agreed to do */ -ecp_options ecp_allowoptions[NUM_PPP]; /* what we'll agree to do */ -ecp_options ecp_hisoptions[NUM_PPP]; /* what we agreed to do */ - -static const fsm_callbacks ecp_callbacks = { - NULL, /* ecp_resetci, */ - NULL, /* ecp_cilen, */ - NULL, /* ecp_addci, */ - NULL, /* ecp_ackci, */ - NULL, /* ecp_nakci, */ - NULL, /* ecp_rejci, */ - NULL, /* ecp_reqci, */ - NULL, /* ecp_up, */ - NULL, /* ecp_down, */ - NULL, - NULL, - NULL, - NULL, - NULL, /* ecp_extcode, */ - "ECP" -}; - -/* - * ecp_init - initialize ECP. - */ -static void -ecp_init(unit) - int unit; -{ - fsm *f = &ecp_fsm[unit]; - - f->unit = unit; - f->protocol = PPP_ECP; - f->callbacks = &ecp_callbacks; - fsm_init(f); - -#if 0 /* Not necessary, everything is cleared in ppp_new() */ - memset(&ecp_wantoptions[unit], 0, sizeof(ecp_options)); - memset(&ecp_gotoptions[unit], 0, sizeof(ecp_options)); - memset(&ecp_allowoptions[unit], 0, sizeof(ecp_options)); - memset(&ecp_hisoptions[unit], 0, sizeof(ecp_options)); -#endif /* 0 */ - -} - - -#if PRINTPKT_SUPPORT -static int -ecp_printpkt(p, plen, printer, arg) - const u_char *p; - int plen; - void (*printer) (void *, char *, ...); - void *arg; -{ - return 0; -} -#endif /* PRINTPKT_SUPPORT */ - -#endif /* PPP_SUPPORT && ECP_SUPPORT */ +/* + * ecp.c - PPP Encryption Control Protocol. + * + * Copyright (c) 2002 Google, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Derived from ccp.c, which is: + * + * Copyright (c) 1994-2002 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/ecp.h" + +#if PPP_OPTIONS +static option_t ecp_option_list[] = { + { "noecp", o_bool, &ecp_protent.enabled_flag, + "Disable ECP negotiation" }, + { "-ecp", o_bool, &ecp_protent.enabled_flag, + "Disable ECP negotiation", OPT_ALIAS }, + + { NULL } +}; +#endif /* PPP_OPTIONS */ + +/* + * Protocol entry points from main code. + */ +static void ecp_init (int unit); +/* +static void ecp_open (int unit); +static void ecp_close (int unit, char *); +static void ecp_lowerup (int unit); +static void ecp_lowerdown (int); +static void ecp_input (int unit, u_char *pkt, int len); +static void ecp_protrej (int unit); +*/ +#if PRINTPKT_SUPPORT +static int ecp_printpkt (const u_char *pkt, int len, + void (*printer) (void *, char *, ...), + void *arg); +#endif /* PRINTPKT_SUPPORT */ +/* +static void ecp_datainput (int unit, u_char *pkt, int len); +*/ + +const struct protent ecp_protent = { + PPP_ECP, + ecp_init, + NULL, /* ecp_input, */ + NULL, /* ecp_protrej, */ + NULL, /* ecp_lowerup, */ + NULL, /* ecp_lowerdown, */ + NULL, /* ecp_open, */ + NULL, /* ecp_close, */ +#if PRINTPKT_SUPPORT + ecp_printpkt, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + NULL, /* ecp_datainput, */ +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "ECP", + "Encrypted", +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + ecp_option_list, + NULL, +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + NULL, + NULL +#endif /* DEMAND_SUPPORT */ +}; + +fsm ecp_fsm[NUM_PPP]; +ecp_options ecp_wantoptions[NUM_PPP]; /* what to request the peer to use */ +ecp_options ecp_gotoptions[NUM_PPP]; /* what the peer agreed to do */ +ecp_options ecp_allowoptions[NUM_PPP]; /* what we'll agree to do */ +ecp_options ecp_hisoptions[NUM_PPP]; /* what we agreed to do */ + +static const fsm_callbacks ecp_callbacks = { + NULL, /* ecp_resetci, */ + NULL, /* ecp_cilen, */ + NULL, /* ecp_addci, */ + NULL, /* ecp_ackci, */ + NULL, /* ecp_nakci, */ + NULL, /* ecp_rejci, */ + NULL, /* ecp_reqci, */ + NULL, /* ecp_up, */ + NULL, /* ecp_down, */ + NULL, + NULL, + NULL, + NULL, + NULL, /* ecp_extcode, */ + "ECP" +}; + +/* + * ecp_init - initialize ECP. + */ +static void +ecp_init(unit) + int unit; +{ + fsm *f = &ecp_fsm[unit]; + + f->unit = unit; + f->protocol = PPP_ECP; + f->callbacks = &ecp_callbacks; + fsm_init(f); + +#if 0 /* Not necessary, everything is cleared in ppp_new() */ + memset(&ecp_wantoptions[unit], 0, sizeof(ecp_options)); + memset(&ecp_gotoptions[unit], 0, sizeof(ecp_options)); + memset(&ecp_allowoptions[unit], 0, sizeof(ecp_options)); + memset(&ecp_hisoptions[unit], 0, sizeof(ecp_options)); +#endif /* 0 */ + +} + + +#if PRINTPKT_SUPPORT +static int +ecp_printpkt(p, plen, printer, arg) + const u_char *p; + int plen; + void (*printer) (void *, char *, ...); + void *arg; +{ + return 0; +} +#endif /* PRINTPKT_SUPPORT */ + +#endif /* PPP_SUPPORT && ECP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.c index 01493bc..15af855 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/eui64.c @@ -1,56 +1,56 @@ -/* - * eui64.c - EUI64 routines for IPv6CP. - * - * Copyright (c) 1999 Tommi Komulainen. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Tommi Komulainen - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $ - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/eui64.h" - -/* - * eui64_ntoa - Make an ascii representation of an interface identifier - */ -char *eui64_ntoa(eui64_t e) { - static char buf[20]; - - sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x", - e.e8[0], e.e8[1], e.e8[2], e.e8[3], - e.e8[4], e.e8[5], e.e8[6], e.e8[7]); - return buf; -} - -#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ +/* + * eui64.c - EUI64 routines for IPv6CP. + * + * Copyright (c) 1999 Tommi Komulainen. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Tommi Komulainen + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $ + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/eui64.h" + +/* + * eui64_ntoa - Make an ascii representation of an interface identifier + */ +char *eui64_ntoa(eui64_t e) { + static char buf[20]; + + sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x", + e.e8[0], e.e8[1], e.e8[2], e.e8[3], + e.e8[4], e.e8[5], e.e8[6], e.e8[7]); + return buf; +} + +#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.c index 81eba11..9e59723 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/fsm.c @@ -1,799 +1,799 @@ -/* - * fsm.c - {Link, IP} Control Protocol Finite State Machine. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -/* - * @todo: - * Randomize fsm id on link/init. - * Deal with variable outgoing MTU. - */ - -#if 0 /* UNUSED */ -#include -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" - -static void fsm_timeout (void *); -static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len); -static void fsm_rconfack(fsm *f, int id, u_char *inp, int len); -static void fsm_rconfnakrej(fsm *f, int code, int id, u_char *inp, int len); -static void fsm_rtermreq(fsm *f, int id, u_char *p, int len); -static void fsm_rtermack(fsm *f); -static void fsm_rcoderej(fsm *f, u_char *inp, int len); -static void fsm_sconfreq(fsm *f, int retransmit); - -#define PROTO_NAME(f) ((f)->callbacks->proto_name) - -/* - * fsm_init - Initialize fsm. - * - * Initialize fsm state. - */ -void fsm_init(fsm *f) { - ppp_pcb *pcb = f->pcb; - f->state = PPP_FSM_INITIAL; - f->flags = 0; - f->id = 0; /* XXX Start with random id? */ - f->maxnakloops = pcb->settings.fsm_max_nak_loops; - f->term_reason_len = 0; -} - - -/* - * fsm_lowerup - The lower layer is up. - */ -void fsm_lowerup(fsm *f) { - switch( f->state ){ - case PPP_FSM_INITIAL: - f->state = PPP_FSM_CLOSED; - break; - - case PPP_FSM_STARTING: - if( f->flags & OPT_SILENT ) - f->state = PPP_FSM_STOPPED; - else { - /* Send an initial configure-request */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - } - break; - - default: - FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state)); - /* no break */ - } -} - - -/* - * fsm_lowerdown - The lower layer is down. - * - * Cancel all timeouts and inform upper layers. - */ -void fsm_lowerdown(fsm *f) { - switch( f->state ){ - case PPP_FSM_CLOSED: - f->state = PPP_FSM_INITIAL; - break; - - case PPP_FSM_STOPPED: - f->state = PPP_FSM_STARTING; - if( f->callbacks->starting ) - (*f->callbacks->starting)(f); - break; - - case PPP_FSM_CLOSING: - f->state = PPP_FSM_INITIAL; - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - break; - - case PPP_FSM_STOPPING: - case PPP_FSM_REQSENT: - case PPP_FSM_ACKRCVD: - case PPP_FSM_ACKSENT: - f->state = PPP_FSM_STARTING; - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - break; - - case PPP_FSM_OPENED: - if( f->callbacks->down ) - (*f->callbacks->down)(f); - f->state = PPP_FSM_STARTING; - break; - - default: - FSMDEBUG(("%s: Down event in state %d!", PROTO_NAME(f), f->state)); - /* no break */ - } -} - - -/* - * fsm_open - Link is allowed to come up. - */ -void fsm_open(fsm *f) { - switch( f->state ){ - case PPP_FSM_INITIAL: - f->state = PPP_FSM_STARTING; - if( f->callbacks->starting ) - (*f->callbacks->starting)(f); - break; - - case PPP_FSM_CLOSED: - if( f->flags & OPT_SILENT ) - f->state = PPP_FSM_STOPPED; - else { - /* Send an initial configure-request */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - } - break; - - case PPP_FSM_CLOSING: - f->state = PPP_FSM_STOPPING; - /* fall through */ - /* no break */ - case PPP_FSM_STOPPED: - case PPP_FSM_OPENED: - if( f->flags & OPT_RESTART ){ - fsm_lowerdown(f); - fsm_lowerup(f); - } - break; - default: - break; - } -} - -/* - * terminate_layer - Start process of shutting down the FSM - * - * Cancel any timeout running, notify upper layers we're done, and - * send a terminate-request message as configured. - */ -static void terminate_layer(fsm *f, int nextstate) { - ppp_pcb *pcb = f->pcb; - - if( f->state != PPP_FSM_OPENED ) - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - else if( f->callbacks->down ) - (*f->callbacks->down)(f); /* Inform upper layers we're down */ - - /* Init restart counter and send Terminate-Request */ - f->retransmits = pcb->settings.fsm_max_term_transmits; - fsm_sdata(f, TERMREQ, f->reqid = ++f->id, - (const u_char *) f->term_reason, f->term_reason_len); - - if (f->retransmits == 0) { - /* - * User asked for no terminate requests at all; just close it. - * We've already fired off one Terminate-Request just to be nice - * to the peer, but we're not going to wait for a reply. - */ - f->state = nextstate == PPP_FSM_CLOSING ? PPP_FSM_CLOSED : PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - return; - } - - TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); - --f->retransmits; - - f->state = nextstate; -} - -/* - * fsm_close - Start closing connection. - * - * Cancel timeouts and either initiate close or possibly go directly to - * the PPP_FSM_CLOSED state. - */ -void fsm_close(fsm *f, const char *reason) { - f->term_reason = reason; - f->term_reason_len = (reason == NULL? 0: LWIP_MIN(strlen(reason), 0xFF) ); - switch( f->state ){ - case PPP_FSM_STARTING: - f->state = PPP_FSM_INITIAL; - break; - case PPP_FSM_STOPPED: - f->state = PPP_FSM_CLOSED; - break; - case PPP_FSM_STOPPING: - f->state = PPP_FSM_CLOSING; - break; - - case PPP_FSM_REQSENT: - case PPP_FSM_ACKRCVD: - case PPP_FSM_ACKSENT: - case PPP_FSM_OPENED: - terminate_layer(f, PPP_FSM_CLOSING); - break; - default: - break; - } -} - - -/* - * fsm_timeout - Timeout expired. - */ -static void fsm_timeout(void *arg) { - fsm *f = (fsm *) arg; - ppp_pcb *pcb = f->pcb; - - switch (f->state) { - case PPP_FSM_CLOSING: - case PPP_FSM_STOPPING: - if( f->retransmits <= 0 ){ - /* - * We've waited for an ack long enough. Peer probably heard us. - */ - f->state = (f->state == PPP_FSM_CLOSING)? PPP_FSM_CLOSED: PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - } else { - /* Send Terminate-Request */ - fsm_sdata(f, TERMREQ, f->reqid = ++f->id, - (const u_char *) f->term_reason, f->term_reason_len); - TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); - --f->retransmits; - } - break; - - case PPP_FSM_REQSENT: - case PPP_FSM_ACKRCVD: - case PPP_FSM_ACKSENT: - if (f->retransmits <= 0) { - ppp_warn("%s: timeout sending Config-Requests", PROTO_NAME(f)); - f->state = PPP_FSM_STOPPED; - if( (f->flags & OPT_PASSIVE) == 0 && f->callbacks->finished ) - (*f->callbacks->finished)(f); - - } else { - /* Retransmit the configure-request */ - if (f->callbacks->retransmit) - (*f->callbacks->retransmit)(f); - fsm_sconfreq(f, 1); /* Re-send Configure-Request */ - if( f->state == PPP_FSM_ACKRCVD ) - f->state = PPP_FSM_REQSENT; - } - break; - - default: - FSMDEBUG(("%s: Timeout event in state %d!", PROTO_NAME(f), f->state)); - /* no break */ - } -} - - -/* - * fsm_input - Input packet. - */ -void fsm_input(fsm *f, u_char *inpacket, int l) { - u_char *inp; - u_char code, id; - int len; - - /* - * Parse header (code, id and length). - * If packet too short, drop it. - */ - inp = inpacket; - if (l < HEADERLEN) { - FSMDEBUG(("fsm_input(%x): Rcvd short header.", f->protocol)); - return; - } - GETCHAR(code, inp); - GETCHAR(id, inp); - GETSHORT(len, inp); - if (len < HEADERLEN) { - FSMDEBUG(("fsm_input(%x): Rcvd illegal length.", f->protocol)); - return; - } - if (len > l) { - FSMDEBUG(("fsm_input(%x): Rcvd short packet.", f->protocol)); - return; - } - len -= HEADERLEN; /* subtract header length */ - - if( f->state == PPP_FSM_INITIAL || f->state == PPP_FSM_STARTING ){ - FSMDEBUG(("fsm_input(%x): Rcvd packet in state %d.", - f->protocol, f->state)); - return; - } - - /* - * Action depends on code. - */ - switch (code) { - case CONFREQ: - fsm_rconfreq(f, id, inp, len); - break; - - case CONFACK: - fsm_rconfack(f, id, inp, len); - break; - - case CONFNAK: - case CONFREJ: - fsm_rconfnakrej(f, code, id, inp, len); - break; - - case TERMREQ: - fsm_rtermreq(f, id, inp, len); - break; - - case TERMACK: - fsm_rtermack(f); - break; - - case CODEREJ: - fsm_rcoderej(f, inp, len); - break; - - default: - if( !f->callbacks->extcode - || !(*f->callbacks->extcode)(f, code, id, inp, len) ) - fsm_sdata(f, CODEREJ, ++f->id, inpacket, len + HEADERLEN); - break; - } -} - - -/* - * fsm_rconfreq - Receive Configure-Request. - */ -static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len) { - int code, reject_if_disagree; - - switch( f->state ){ - case PPP_FSM_CLOSED: - /* Go away, we're closed */ - fsm_sdata(f, TERMACK, id, NULL, 0); - return; - case PPP_FSM_CLOSING: - case PPP_FSM_STOPPING: - return; - - case PPP_FSM_OPENED: - /* Go down and restart negotiation */ - if( f->callbacks->down ) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; - - case PPP_FSM_STOPPED: - /* Negotiation started by our peer */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; - default: - break; - } - - /* - * Pass the requested configuration options - * to protocol-specific code for checking. - */ - if (f->callbacks->reqci){ /* Check CI */ - reject_if_disagree = (f->nakloops >= f->maxnakloops); - code = (*f->callbacks->reqci)(f, inp, &len, reject_if_disagree); - } else if (len) - code = CONFREJ; /* Reject all CI */ - else - code = CONFACK; - - /* send the Ack, Nak or Rej to the peer */ - fsm_sdata(f, code, id, inp, len); - - if (code == CONFACK) { - if (f->state == PPP_FSM_ACKRCVD) { - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - f->state = PPP_FSM_OPENED; - if (f->callbacks->up) - (*f->callbacks->up)(f); /* Inform upper layers */ - } else - f->state = PPP_FSM_ACKSENT; - f->nakloops = 0; - - } else { - /* we sent CONFACK or CONFREJ */ - if (f->state != PPP_FSM_ACKRCVD) - f->state = PPP_FSM_REQSENT; - if( code == CONFNAK ) - ++f->nakloops; - } -} - - -/* - * fsm_rconfack - Receive Configure-Ack. - */ -static void fsm_rconfack(fsm *f, int id, u_char *inp, int len) { - ppp_pcb *pcb = f->pcb; - - if (id != f->reqid || f->seen_ack) /* Expected id? */ - return; /* Nope, toss... */ - if( !(f->callbacks->ackci? (*f->callbacks->ackci)(f, inp, len): - (len == 0)) ){ - /* Ack is bad - ignore it */ - ppp_error("Received bad configure-ack: %P", inp, len); - return; - } - f->seen_ack = 1; - f->rnakloops = 0; - - switch (f->state) { - case PPP_FSM_CLOSED: - case PPP_FSM_STOPPED: - fsm_sdata(f, TERMACK, id, NULL, 0); - break; - - case PPP_FSM_REQSENT: - f->state = PPP_FSM_ACKRCVD; - f->retransmits = pcb->settings.fsm_max_conf_req_transmits; - break; - - case PPP_FSM_ACKRCVD: - /* Huh? an extra valid Ack? oh well... */ - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - break; - - case PPP_FSM_ACKSENT: - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - f->state = PPP_FSM_OPENED; - f->retransmits = pcb->settings.fsm_max_conf_req_transmits; - if (f->callbacks->up) - (*f->callbacks->up)(f); /* Inform upper layers */ - break; - - case PPP_FSM_OPENED: - /* Go down and restart negotiation */ - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; - default: - break; - } -} - - -/* - * fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject. - */ -static void fsm_rconfnakrej(fsm *f, int code, int id, u_char *inp, int len) { - int ret; - int treat_as_reject; - - if (id != f->reqid || f->seen_ack) /* Expected id? */ - return; /* Nope, toss... */ - - if (code == CONFNAK) { - ++f->rnakloops; - treat_as_reject = (f->rnakloops >= f->maxnakloops); - if (f->callbacks->nakci == NULL - || !(ret = f->callbacks->nakci(f, inp, len, treat_as_reject))) { - ppp_error("Received bad configure-nak: %P", inp, len); - return; - } - } else { - f->rnakloops = 0; - if (f->callbacks->rejci == NULL - || !(ret = f->callbacks->rejci(f, inp, len))) { - ppp_error("Received bad configure-rej: %P", inp, len); - return; - } - } - - f->seen_ack = 1; - - switch (f->state) { - case PPP_FSM_CLOSED: - case PPP_FSM_STOPPED: - fsm_sdata(f, TERMACK, id, NULL, 0); - break; - - case PPP_FSM_REQSENT: - case PPP_FSM_ACKSENT: - /* They didn't agree to what we wanted - try another request */ - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - if (ret < 0) - f->state = PPP_FSM_STOPPED; /* kludge for stopping CCP */ - else - fsm_sconfreq(f, 0); /* Send Configure-Request */ - break; - - case PPP_FSM_ACKRCVD: - /* Got a Nak/reject when we had already had an Ack?? oh well... */ - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - break; - - case PPP_FSM_OPENED: - /* Go down and restart negotiation */ - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); /* Send initial Configure-Request */ - f->state = PPP_FSM_REQSENT; - break; - default: - break; - } -} - - -/* - * fsm_rtermreq - Receive Terminate-Req. - */ -static void fsm_rtermreq(fsm *f, int id, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - - switch (f->state) { - case PPP_FSM_ACKRCVD: - case PPP_FSM_ACKSENT: - f->state = PPP_FSM_REQSENT; /* Start over but keep trying */ - break; - - case PPP_FSM_OPENED: - if (len > 0) { - ppp_info("%s terminated by peer (%0.*v)", PROTO_NAME(f), len, p); - } else - ppp_info("%s terminated by peer", PROTO_NAME(f)); - f->retransmits = 0; - f->state = PPP_FSM_STOPPING; - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); - break; - default: - break; - } - - fsm_sdata(f, TERMACK, id, NULL, 0); -} - - -/* - * fsm_rtermack - Receive Terminate-Ack. - */ -static void fsm_rtermack(fsm *f) { - switch (f->state) { - case PPP_FSM_CLOSING: - UNTIMEOUT(fsm_timeout, f); - f->state = PPP_FSM_CLOSED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; - case PPP_FSM_STOPPING: - UNTIMEOUT(fsm_timeout, f); - f->state = PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; - - case PPP_FSM_ACKRCVD: - f->state = PPP_FSM_REQSENT; - break; - - case PPP_FSM_OPENED: - if (f->callbacks->down) - (*f->callbacks->down)(f); /* Inform upper layers */ - fsm_sconfreq(f, 0); - f->state = PPP_FSM_REQSENT; - break; - default: - break; - } -} - - -/* - * fsm_rcoderej - Receive an Code-Reject. - */ -static void fsm_rcoderej(fsm *f, u_char *inp, int len) { - u_char code, id; - - if (len < HEADERLEN) { - FSMDEBUG(("fsm_rcoderej: Rcvd short Code-Reject packet!")); - return; - } - GETCHAR(code, inp); - GETCHAR(id, inp); - ppp_warn("%s: Rcvd Code-Reject for code %d, id %d", PROTO_NAME(f), code, id); - - if( f->state == PPP_FSM_ACKRCVD ) - f->state = PPP_FSM_REQSENT; -} - - -/* - * fsm_protreject - Peer doesn't speak this protocol. - * - * Treat this as a catastrophic error (RXJ-). - */ -void fsm_protreject(fsm *f) { - switch( f->state ){ - case PPP_FSM_CLOSING: - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - /* fall through */ - /* no break */ - case PPP_FSM_CLOSED: - f->state = PPP_FSM_CLOSED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; - - case PPP_FSM_STOPPING: - case PPP_FSM_REQSENT: - case PPP_FSM_ACKRCVD: - case PPP_FSM_ACKSENT: - UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ - /* fall through */ - /* no break */ - case PPP_FSM_STOPPED: - f->state = PPP_FSM_STOPPED; - if( f->callbacks->finished ) - (*f->callbacks->finished)(f); - break; - - case PPP_FSM_OPENED: - terminate_layer(f, PPP_FSM_STOPPING); - break; - - default: - FSMDEBUG(("%s: Protocol-reject event in state %d!", - PROTO_NAME(f), f->state)); - /* no break */ - } -} - - -/* - * fsm_sconfreq - Send a Configure-Request. - */ -static void fsm_sconfreq(fsm *f, int retransmit) { - ppp_pcb *pcb = f->pcb; - struct pbuf *p; - u_char *outp; - int cilen; - - if( f->state != PPP_FSM_REQSENT && f->state != PPP_FSM_ACKRCVD && f->state != PPP_FSM_ACKSENT ){ - /* Not currently negotiating - reset options */ - if( f->callbacks->resetci ) - (*f->callbacks->resetci)(f); - f->nakloops = 0; - f->rnakloops = 0; - } - - if( !retransmit ){ - /* New request - reset retransmission counter, use new ID */ - f->retransmits = pcb->settings.fsm_max_conf_req_transmits; - f->reqid = ++f->id; - } - - f->seen_ack = 0; - - /* - * Make up the request packet - */ - if( f->callbacks->cilen && f->callbacks->addci ){ - cilen = (*f->callbacks->cilen)(f); - if( cilen > pcb->peer_mru - HEADERLEN ) - cilen = pcb->peer_mru - HEADERLEN; - } else - cilen = 0; - - p = pbuf_alloc(PBUF_RAW, (u16_t)(cilen + HEADERLEN + PPP_HDRLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - /* send the request to our peer */ - outp = (u_char*)p->payload; - MAKEHEADER(outp, f->protocol); - PUTCHAR(CONFREQ, outp); - PUTCHAR(f->reqid, outp); - PUTSHORT(cilen + HEADERLEN, outp); - if (cilen != 0) { - (*f->callbacks->addci)(f, outp, &cilen); - LWIP_ASSERT("cilen == p->len - HEADERLEN - PPP_HDRLEN", cilen == p->len - HEADERLEN - PPP_HDRLEN); - } - - ppp_write(pcb, p); - - /* start the retransmit timer */ - --f->retransmits; - TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); -} - - -/* - * fsm_sdata - Send some data. - * - * Used for all packets sent to our peer by this module. - */ -void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen) { - ppp_pcb *pcb = f->pcb; - struct pbuf *p; - u_char *outp; - int outlen; - - /* Adjust length to be smaller than MTU */ - if (datalen > pcb->peer_mru - HEADERLEN) - datalen = pcb->peer_mru - HEADERLEN; - outlen = datalen + HEADERLEN; - - p = pbuf_alloc(PBUF_RAW, (u16_t)(outlen + PPP_HDRLEN), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - if (datalen) /* && data != outp + PPP_HDRLEN + HEADERLEN) -- was only for fsm_sconfreq() */ - MEMCPY(outp + PPP_HDRLEN + HEADERLEN, data, datalen); - MAKEHEADER(outp, f->protocol); - PUTCHAR(code, outp); - PUTCHAR(id, outp); - PUTSHORT(outlen, outp); - ppp_write(pcb, p); -} - -#endif /* PPP_SUPPORT */ +/* + * fsm.c - {Link, IP} Control Protocol Finite State Machine. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +/* + * @todo: + * Randomize fsm id on link/init. + * Deal with variable outgoing MTU. + */ + +#if 0 /* UNUSED */ +#include +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" + +static void fsm_timeout (void *); +static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len); +static void fsm_rconfack(fsm *f, int id, u_char *inp, int len); +static void fsm_rconfnakrej(fsm *f, int code, int id, u_char *inp, int len); +static void fsm_rtermreq(fsm *f, int id, u_char *p, int len); +static void fsm_rtermack(fsm *f); +static void fsm_rcoderej(fsm *f, u_char *inp, int len); +static void fsm_sconfreq(fsm *f, int retransmit); + +#define PROTO_NAME(f) ((f)->callbacks->proto_name) + +/* + * fsm_init - Initialize fsm. + * + * Initialize fsm state. + */ +void fsm_init(fsm *f) { + ppp_pcb *pcb = f->pcb; + f->state = PPP_FSM_INITIAL; + f->flags = 0; + f->id = 0; /* XXX Start with random id? */ + f->maxnakloops = pcb->settings.fsm_max_nak_loops; + f->term_reason_len = 0; +} + + +/* + * fsm_lowerup - The lower layer is up. + */ +void fsm_lowerup(fsm *f) { + switch( f->state ){ + case PPP_FSM_INITIAL: + f->state = PPP_FSM_CLOSED; + break; + + case PPP_FSM_STARTING: + if( f->flags & OPT_SILENT ) + f->state = PPP_FSM_STOPPED; + else { + /* Send an initial configure-request */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + } + break; + + default: + FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state)); + /* no break */ + } +} + + +/* + * fsm_lowerdown - The lower layer is down. + * + * Cancel all timeouts and inform upper layers. + */ +void fsm_lowerdown(fsm *f) { + switch( f->state ){ + case PPP_FSM_CLOSED: + f->state = PPP_FSM_INITIAL; + break; + + case PPP_FSM_STOPPED: + f->state = PPP_FSM_STARTING; + if( f->callbacks->starting ) + (*f->callbacks->starting)(f); + break; + + case PPP_FSM_CLOSING: + f->state = PPP_FSM_INITIAL; + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + break; + + case PPP_FSM_STOPPING: + case PPP_FSM_REQSENT: + case PPP_FSM_ACKRCVD: + case PPP_FSM_ACKSENT: + f->state = PPP_FSM_STARTING; + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + break; + + case PPP_FSM_OPENED: + if( f->callbacks->down ) + (*f->callbacks->down)(f); + f->state = PPP_FSM_STARTING; + break; + + default: + FSMDEBUG(("%s: Down event in state %d!", PROTO_NAME(f), f->state)); + /* no break */ + } +} + + +/* + * fsm_open - Link is allowed to come up. + */ +void fsm_open(fsm *f) { + switch( f->state ){ + case PPP_FSM_INITIAL: + f->state = PPP_FSM_STARTING; + if( f->callbacks->starting ) + (*f->callbacks->starting)(f); + break; + + case PPP_FSM_CLOSED: + if( f->flags & OPT_SILENT ) + f->state = PPP_FSM_STOPPED; + else { + /* Send an initial configure-request */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + } + break; + + case PPP_FSM_CLOSING: + f->state = PPP_FSM_STOPPING; + /* fall through */ + /* no break */ + case PPP_FSM_STOPPED: + case PPP_FSM_OPENED: + if( f->flags & OPT_RESTART ){ + fsm_lowerdown(f); + fsm_lowerup(f); + } + break; + default: + break; + } +} + +/* + * terminate_layer - Start process of shutting down the FSM + * + * Cancel any timeout running, notify upper layers we're done, and + * send a terminate-request message as configured. + */ +static void terminate_layer(fsm *f, int nextstate) { + ppp_pcb *pcb = f->pcb; + + if( f->state != PPP_FSM_OPENED ) + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + else if( f->callbacks->down ) + (*f->callbacks->down)(f); /* Inform upper layers we're down */ + + /* Init restart counter and send Terminate-Request */ + f->retransmits = pcb->settings.fsm_max_term_transmits; + fsm_sdata(f, TERMREQ, f->reqid = ++f->id, + (const u_char *) f->term_reason, f->term_reason_len); + + if (f->retransmits == 0) { + /* + * User asked for no terminate requests at all; just close it. + * We've already fired off one Terminate-Request just to be nice + * to the peer, but we're not going to wait for a reply. + */ + f->state = nextstate == PPP_FSM_CLOSING ? PPP_FSM_CLOSED : PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + return; + } + + TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); + --f->retransmits; + + f->state = nextstate; +} + +/* + * fsm_close - Start closing connection. + * + * Cancel timeouts and either initiate close or possibly go directly to + * the PPP_FSM_CLOSED state. + */ +void fsm_close(fsm *f, const char *reason) { + f->term_reason = reason; + f->term_reason_len = (reason == NULL? 0: LWIP_MIN(strlen(reason), 0xFF) ); + switch( f->state ){ + case PPP_FSM_STARTING: + f->state = PPP_FSM_INITIAL; + break; + case PPP_FSM_STOPPED: + f->state = PPP_FSM_CLOSED; + break; + case PPP_FSM_STOPPING: + f->state = PPP_FSM_CLOSING; + break; + + case PPP_FSM_REQSENT: + case PPP_FSM_ACKRCVD: + case PPP_FSM_ACKSENT: + case PPP_FSM_OPENED: + terminate_layer(f, PPP_FSM_CLOSING); + break; + default: + break; + } +} + + +/* + * fsm_timeout - Timeout expired. + */ +static void fsm_timeout(void *arg) { + fsm *f = (fsm *) arg; + ppp_pcb *pcb = f->pcb; + + switch (f->state) { + case PPP_FSM_CLOSING: + case PPP_FSM_STOPPING: + if( f->retransmits <= 0 ){ + /* + * We've waited for an ack long enough. Peer probably heard us. + */ + f->state = (f->state == PPP_FSM_CLOSING)? PPP_FSM_CLOSED: PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + } else { + /* Send Terminate-Request */ + fsm_sdata(f, TERMREQ, f->reqid = ++f->id, + (const u_char *) f->term_reason, f->term_reason_len); + TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); + --f->retransmits; + } + break; + + case PPP_FSM_REQSENT: + case PPP_FSM_ACKRCVD: + case PPP_FSM_ACKSENT: + if (f->retransmits <= 0) { + ppp_warn("%s: timeout sending Config-Requests", PROTO_NAME(f)); + f->state = PPP_FSM_STOPPED; + if( (f->flags & OPT_PASSIVE) == 0 && f->callbacks->finished ) + (*f->callbacks->finished)(f); + + } else { + /* Retransmit the configure-request */ + if (f->callbacks->retransmit) + (*f->callbacks->retransmit)(f); + fsm_sconfreq(f, 1); /* Re-send Configure-Request */ + if( f->state == PPP_FSM_ACKRCVD ) + f->state = PPP_FSM_REQSENT; + } + break; + + default: + FSMDEBUG(("%s: Timeout event in state %d!", PROTO_NAME(f), f->state)); + /* no break */ + } +} + + +/* + * fsm_input - Input packet. + */ +void fsm_input(fsm *f, u_char *inpacket, int l) { + u_char *inp; + u_char code, id; + int len; + + /* + * Parse header (code, id and length). + * If packet too short, drop it. + */ + inp = inpacket; + if (l < HEADERLEN) { + FSMDEBUG(("fsm_input(%x): Rcvd short header.", f->protocol)); + return; + } + GETCHAR(code, inp); + GETCHAR(id, inp); + GETSHORT(len, inp); + if (len < HEADERLEN) { + FSMDEBUG(("fsm_input(%x): Rcvd illegal length.", f->protocol)); + return; + } + if (len > l) { + FSMDEBUG(("fsm_input(%x): Rcvd short packet.", f->protocol)); + return; + } + len -= HEADERLEN; /* subtract header length */ + + if( f->state == PPP_FSM_INITIAL || f->state == PPP_FSM_STARTING ){ + FSMDEBUG(("fsm_input(%x): Rcvd packet in state %d.", + f->protocol, f->state)); + return; + } + + /* + * Action depends on code. + */ + switch (code) { + case CONFREQ: + fsm_rconfreq(f, id, inp, len); + break; + + case CONFACK: + fsm_rconfack(f, id, inp, len); + break; + + case CONFNAK: + case CONFREJ: + fsm_rconfnakrej(f, code, id, inp, len); + break; + + case TERMREQ: + fsm_rtermreq(f, id, inp, len); + break; + + case TERMACK: + fsm_rtermack(f); + break; + + case CODEREJ: + fsm_rcoderej(f, inp, len); + break; + + default: + if( !f->callbacks->extcode + || !(*f->callbacks->extcode)(f, code, id, inp, len) ) + fsm_sdata(f, CODEREJ, ++f->id, inpacket, len + HEADERLEN); + break; + } +} + + +/* + * fsm_rconfreq - Receive Configure-Request. + */ +static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len) { + int code, reject_if_disagree; + + switch( f->state ){ + case PPP_FSM_CLOSED: + /* Go away, we're closed */ + fsm_sdata(f, TERMACK, id, NULL, 0); + return; + case PPP_FSM_CLOSING: + case PPP_FSM_STOPPING: + return; + + case PPP_FSM_OPENED: + /* Go down and restart negotiation */ + if( f->callbacks->down ) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; + + case PPP_FSM_STOPPED: + /* Negotiation started by our peer */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; + default: + break; + } + + /* + * Pass the requested configuration options + * to protocol-specific code for checking. + */ + if (f->callbacks->reqci){ /* Check CI */ + reject_if_disagree = (f->nakloops >= f->maxnakloops); + code = (*f->callbacks->reqci)(f, inp, &len, reject_if_disagree); + } else if (len) + code = CONFREJ; /* Reject all CI */ + else + code = CONFACK; + + /* send the Ack, Nak or Rej to the peer */ + fsm_sdata(f, code, id, inp, len); + + if (code == CONFACK) { + if (f->state == PPP_FSM_ACKRCVD) { + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + f->state = PPP_FSM_OPENED; + if (f->callbacks->up) + (*f->callbacks->up)(f); /* Inform upper layers */ + } else + f->state = PPP_FSM_ACKSENT; + f->nakloops = 0; + + } else { + /* we sent CONFACK or CONFREJ */ + if (f->state != PPP_FSM_ACKRCVD) + f->state = PPP_FSM_REQSENT; + if( code == CONFNAK ) + ++f->nakloops; + } +} + + +/* + * fsm_rconfack - Receive Configure-Ack. + */ +static void fsm_rconfack(fsm *f, int id, u_char *inp, int len) { + ppp_pcb *pcb = f->pcb; + + if (id != f->reqid || f->seen_ack) /* Expected id? */ + return; /* Nope, toss... */ + if( !(f->callbacks->ackci? (*f->callbacks->ackci)(f, inp, len): + (len == 0)) ){ + /* Ack is bad - ignore it */ + ppp_error("Received bad configure-ack: %P", inp, len); + return; + } + f->seen_ack = 1; + f->rnakloops = 0; + + switch (f->state) { + case PPP_FSM_CLOSED: + case PPP_FSM_STOPPED: + fsm_sdata(f, TERMACK, id, NULL, 0); + break; + + case PPP_FSM_REQSENT: + f->state = PPP_FSM_ACKRCVD; + f->retransmits = pcb->settings.fsm_max_conf_req_transmits; + break; + + case PPP_FSM_ACKRCVD: + /* Huh? an extra valid Ack? oh well... */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + break; + + case PPP_FSM_ACKSENT: + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + f->state = PPP_FSM_OPENED; + f->retransmits = pcb->settings.fsm_max_conf_req_transmits; + if (f->callbacks->up) + (*f->callbacks->up)(f); /* Inform upper layers */ + break; + + case PPP_FSM_OPENED: + /* Go down and restart negotiation */ + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; + default: + break; + } +} + + +/* + * fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject. + */ +static void fsm_rconfnakrej(fsm *f, int code, int id, u_char *inp, int len) { + int ret; + int treat_as_reject; + + if (id != f->reqid || f->seen_ack) /* Expected id? */ + return; /* Nope, toss... */ + + if (code == CONFNAK) { + ++f->rnakloops; + treat_as_reject = (f->rnakloops >= f->maxnakloops); + if (f->callbacks->nakci == NULL + || !(ret = f->callbacks->nakci(f, inp, len, treat_as_reject))) { + ppp_error("Received bad configure-nak: %P", inp, len); + return; + } + } else { + f->rnakloops = 0; + if (f->callbacks->rejci == NULL + || !(ret = f->callbacks->rejci(f, inp, len))) { + ppp_error("Received bad configure-rej: %P", inp, len); + return; + } + } + + f->seen_ack = 1; + + switch (f->state) { + case PPP_FSM_CLOSED: + case PPP_FSM_STOPPED: + fsm_sdata(f, TERMACK, id, NULL, 0); + break; + + case PPP_FSM_REQSENT: + case PPP_FSM_ACKSENT: + /* They didn't agree to what we wanted - try another request */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + if (ret < 0) + f->state = PPP_FSM_STOPPED; /* kludge for stopping CCP */ + else + fsm_sconfreq(f, 0); /* Send Configure-Request */ + break; + + case PPP_FSM_ACKRCVD: + /* Got a Nak/reject when we had already had an Ack?? oh well... */ + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + break; + + case PPP_FSM_OPENED: + /* Go down and restart negotiation */ + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); /* Send initial Configure-Request */ + f->state = PPP_FSM_REQSENT; + break; + default: + break; + } +} + + +/* + * fsm_rtermreq - Receive Terminate-Req. + */ +static void fsm_rtermreq(fsm *f, int id, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + + switch (f->state) { + case PPP_FSM_ACKRCVD: + case PPP_FSM_ACKSENT: + f->state = PPP_FSM_REQSENT; /* Start over but keep trying */ + break; + + case PPP_FSM_OPENED: + if (len > 0) { + ppp_info("%s terminated by peer (%0.*v)", PROTO_NAME(f), len, p); + } else + ppp_info("%s terminated by peer", PROTO_NAME(f)); + f->retransmits = 0; + f->state = PPP_FSM_STOPPING; + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); + break; + default: + break; + } + + fsm_sdata(f, TERMACK, id, NULL, 0); +} + + +/* + * fsm_rtermack - Receive Terminate-Ack. + */ +static void fsm_rtermack(fsm *f) { + switch (f->state) { + case PPP_FSM_CLOSING: + UNTIMEOUT(fsm_timeout, f); + f->state = PPP_FSM_CLOSED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; + case PPP_FSM_STOPPING: + UNTIMEOUT(fsm_timeout, f); + f->state = PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; + + case PPP_FSM_ACKRCVD: + f->state = PPP_FSM_REQSENT; + break; + + case PPP_FSM_OPENED: + if (f->callbacks->down) + (*f->callbacks->down)(f); /* Inform upper layers */ + fsm_sconfreq(f, 0); + f->state = PPP_FSM_REQSENT; + break; + default: + break; + } +} + + +/* + * fsm_rcoderej - Receive an Code-Reject. + */ +static void fsm_rcoderej(fsm *f, u_char *inp, int len) { + u_char code, id; + + if (len < HEADERLEN) { + FSMDEBUG(("fsm_rcoderej: Rcvd short Code-Reject packet!")); + return; + } + GETCHAR(code, inp); + GETCHAR(id, inp); + ppp_warn("%s: Rcvd Code-Reject for code %d, id %d", PROTO_NAME(f), code, id); + + if( f->state == PPP_FSM_ACKRCVD ) + f->state = PPP_FSM_REQSENT; +} + + +/* + * fsm_protreject - Peer doesn't speak this protocol. + * + * Treat this as a catastrophic error (RXJ-). + */ +void fsm_protreject(fsm *f) { + switch( f->state ){ + case PPP_FSM_CLOSING: + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + /* fall through */ + /* no break */ + case PPP_FSM_CLOSED: + f->state = PPP_FSM_CLOSED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; + + case PPP_FSM_STOPPING: + case PPP_FSM_REQSENT: + case PPP_FSM_ACKRCVD: + case PPP_FSM_ACKSENT: + UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */ + /* fall through */ + /* no break */ + case PPP_FSM_STOPPED: + f->state = PPP_FSM_STOPPED; + if( f->callbacks->finished ) + (*f->callbacks->finished)(f); + break; + + case PPP_FSM_OPENED: + terminate_layer(f, PPP_FSM_STOPPING); + break; + + default: + FSMDEBUG(("%s: Protocol-reject event in state %d!", + PROTO_NAME(f), f->state)); + /* no break */ + } +} + + +/* + * fsm_sconfreq - Send a Configure-Request. + */ +static void fsm_sconfreq(fsm *f, int retransmit) { + ppp_pcb *pcb = f->pcb; + struct pbuf *p; + u_char *outp; + int cilen; + + if( f->state != PPP_FSM_REQSENT && f->state != PPP_FSM_ACKRCVD && f->state != PPP_FSM_ACKSENT ){ + /* Not currently negotiating - reset options */ + if( f->callbacks->resetci ) + (*f->callbacks->resetci)(f); + f->nakloops = 0; + f->rnakloops = 0; + } + + if( !retransmit ){ + /* New request - reset retransmission counter, use new ID */ + f->retransmits = pcb->settings.fsm_max_conf_req_transmits; + f->reqid = ++f->id; + } + + f->seen_ack = 0; + + /* + * Make up the request packet + */ + if( f->callbacks->cilen && f->callbacks->addci ){ + cilen = (*f->callbacks->cilen)(f); + if( cilen > pcb->peer_mru - HEADERLEN ) + cilen = pcb->peer_mru - HEADERLEN; + } else + cilen = 0; + + p = pbuf_alloc(PBUF_RAW, (u16_t)(cilen + HEADERLEN + PPP_HDRLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + /* send the request to our peer */ + outp = (u_char*)p->payload; + MAKEHEADER(outp, f->protocol); + PUTCHAR(CONFREQ, outp); + PUTCHAR(f->reqid, outp); + PUTSHORT(cilen + HEADERLEN, outp); + if (cilen != 0) { + (*f->callbacks->addci)(f, outp, &cilen); + LWIP_ASSERT("cilen == p->len - HEADERLEN - PPP_HDRLEN", cilen == p->len - HEADERLEN - PPP_HDRLEN); + } + + ppp_write(pcb, p); + + /* start the retransmit timer */ + --f->retransmits; + TIMEOUT(fsm_timeout, f, pcb->settings.fsm_timeout_time); +} + + +/* + * fsm_sdata - Send some data. + * + * Used for all packets sent to our peer by this module. + */ +void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen) { + ppp_pcb *pcb = f->pcb; + struct pbuf *p; + u_char *outp; + int outlen; + + /* Adjust length to be smaller than MTU */ + if (datalen > pcb->peer_mru - HEADERLEN) + datalen = pcb->peer_mru - HEADERLEN; + outlen = datalen + HEADERLEN; + + p = pbuf_alloc(PBUF_RAW, (u16_t)(outlen + PPP_HDRLEN), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + if (datalen) /* && data != outp + PPP_HDRLEN + HEADERLEN) -- was only for fsm_sconfreq() */ + MEMCPY(outp + PPP_HDRLEN + HEADERLEN, data, datalen); + MAKEHEADER(outp, f->protocol); + PUTCHAR(code, outp); + PUTCHAR(id, outp); + PUTSHORT(outlen, outp); + ppp_write(pcb, p); +} + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.c index b7c766e..3fba320 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipcp.c @@ -1,2418 +1,2418 @@ -/* - * ipcp.c - PPP IP Control Protocol. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -/* - * @todo: - */ - -#if 0 /* UNUSED */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/ipcp.h" - -#if 0 /* UNUSED */ -/* global vars */ -u32_t netmask = 0; /* IP netmask to set on interface */ -#endif /* UNUSED */ - -#if 0 /* UNUSED */ -bool disable_defaultip = 0; /* Don't use hostname for default IP adrs */ -#endif /* UNUSED */ - -#if 0 /* moved to ppp_settings */ -bool noremoteip = 0; /* Let him have no IP address */ -#endif /* moved to ppp_setting */ - -#if 0 /* UNUSED */ -/* Hook for a plugin to know when IP protocol has come up */ -void (*ip_up_hook) (void) = NULL; - -/* Hook for a plugin to know when IP protocol has come down */ -void (*ip_down_hook) (void) = NULL; - -/* Hook for a plugin to choose the remote IP address */ -void (*ip_choose_hook) (u32_t *) = NULL; -#endif /* UNUSED */ - -#if PPP_NOTIFY -/* Notifiers for when IPCP goes up and down */ -struct notifier *ip_up_notifier = NULL; -struct notifier *ip_down_notifier = NULL; -#endif /* PPP_NOTIFY */ - -/* local vars */ -#if 0 /* moved to ppp_pcb */ -static int default_route_set[NUM_PPP]; /* Have set up a default route */ -static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */ -static int ipcp_is_up; /* have called np_up() */ -static int ipcp_is_open; /* haven't called np_finished() */ -static bool ask_for_local; /* request our address from peer */ -#endif /* moved to ppp_pcb */ -#if 0 /* UNUSED */ -static char vj_value[8]; /* string form of vj option value */ -static char netmask_str[20]; /* string form of netmask value */ -#endif /* UNUSED */ - -/* - * Callbacks for fsm code. (CI = Configuration Information) - */ -static void ipcp_resetci(fsm *f); /* Reset our CI */ -static int ipcp_cilen(fsm *f); /* Return length of our CI */ -static void ipcp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI */ -static int ipcp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ -static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject);/* Peer nak'd our CI */ -static int ipcp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ -static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree); /* Rcv CI */ -static void ipcp_up(fsm *f); /* We're UP */ -static void ipcp_down(fsm *f); /* We're DOWN */ -static void ipcp_finished(fsm *f); /* Don't need lower layer */ - -static const fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */ - ipcp_resetci, /* Reset our Configuration Information */ - ipcp_cilen, /* Length of our Configuration Information */ - ipcp_addci, /* Add our Configuration Information */ - ipcp_ackci, /* ACK our Configuration Information */ - ipcp_nakci, /* NAK our Configuration Information */ - ipcp_rejci, /* Reject our Configuration Information */ - ipcp_reqci, /* Request peer's Configuration Information */ - ipcp_up, /* Called when fsm reaches OPENED state */ - ipcp_down, /* Called when fsm leaves OPENED state */ - NULL, /* Called when we want the lower layer up */ - ipcp_finished, /* Called when we want the lower layer down */ - NULL, /* Called when Protocol-Reject received */ - NULL, /* Retransmission is necessary */ - NULL, /* Called to handle protocol-specific codes */ - "IPCP" /* String name of protocol */ -}; - -/* - * Command-line options. - */ -#if PPP_OPTIONS -static int setvjslots (char **); -static int setdnsaddr (char **); -static int setwinsaddr (char **); -static int setnetmask (char **); -int setipaddr (char *, char **, int); - -static void printipaddr (option_t *, void (*)(void *, char *,...),void *); - -static option_t ipcp_option_list[] = { - { "noip", o_bool, &ipcp_protent.enabled_flag, - "Disable IP and IPCP" }, - { "-ip", o_bool, &ipcp_protent.enabled_flag, - "Disable IP and IPCP", OPT_ALIAS }, - - { "novj", o_bool, &ipcp_wantoptions[0].neg_vj, - "Disable VJ compression", OPT_A2CLR, &ipcp_allowoptions[0].neg_vj }, - { "-vj", o_bool, &ipcp_wantoptions[0].neg_vj, - "Disable VJ compression", OPT_ALIAS | OPT_A2CLR, - &ipcp_allowoptions[0].neg_vj }, - - { "novjccomp", o_bool, &ipcp_wantoptions[0].cflag, - "Disable VJ connection-ID compression", OPT_A2CLR, - &ipcp_allowoptions[0].cflag }, - { "-vjccomp", o_bool, &ipcp_wantoptions[0].cflag, - "Disable VJ connection-ID compression", OPT_ALIAS | OPT_A2CLR, - &ipcp_allowoptions[0].cflag }, - - { "vj-max-slots", o_special, (void *)setvjslots, - "Set maximum VJ header slots", - OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, vj_value }, - - { "ipcp-accept-local", o_bool, &ipcp_wantoptions[0].accept_local, - "Accept peer's address for us", 1 }, - { "ipcp-accept-remote", o_bool, &ipcp_wantoptions[0].accept_remote, - "Accept peer's address for it", 1 }, - - { "ipparam", o_string, &ipparam, - "Set ip script parameter", OPT_PRIO }, - - { "noipdefault", o_bool, &disable_defaultip, - "Don't use name for default IP adrs", 1 }, - - { "ms-dns", 1, (void *)setdnsaddr, - "DNS address for the peer's use" }, - { "ms-wins", 1, (void *)setwinsaddr, - "Nameserver for SMB over TCP/IP for peer" }, - - { "ipcp-restart", o_int, &ipcp_fsm[0].timeouttime, - "Set timeout for IPCP", OPT_PRIO }, - { "ipcp-max-terminate", o_int, &ipcp_fsm[0].maxtermtransmits, - "Set max #xmits for term-reqs", OPT_PRIO }, - { "ipcp-max-configure", o_int, &ipcp_fsm[0].maxconfreqtransmits, - "Set max #xmits for conf-reqs", OPT_PRIO }, - { "ipcp-max-failure", o_int, &ipcp_fsm[0].maxnakloops, - "Set max #conf-naks for IPCP", OPT_PRIO }, - - { "defaultroute", o_bool, &ipcp_wantoptions[0].default_route, - "Add default route", OPT_ENABLE|1, &ipcp_allowoptions[0].default_route }, - { "nodefaultroute", o_bool, &ipcp_allowoptions[0].default_route, - "disable defaultroute option", OPT_A2CLR, - &ipcp_wantoptions[0].default_route }, - { "-defaultroute", o_bool, &ipcp_allowoptions[0].default_route, - "disable defaultroute option", OPT_ALIAS | OPT_A2CLR, - &ipcp_wantoptions[0].default_route }, - - { "replacedefaultroute", o_bool, - &ipcp_wantoptions[0].replace_default_route, - "Replace default route", 1 - }, - { "noreplacedefaultroute", o_bool, - &ipcp_allowoptions[0].replace_default_route, - "Never replace default route", OPT_A2COPY, - &ipcp_wantoptions[0].replace_default_route }, - { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, - "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, - { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, - "disable proxyarp option", OPT_A2CLR, - &ipcp_wantoptions[0].proxy_arp }, - { "-proxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, - "disable proxyarp option", OPT_ALIAS | OPT_A2CLR, - &ipcp_wantoptions[0].proxy_arp }, - - { "usepeerdns", o_bool, &usepeerdns, - "Ask peer for DNS address(es)", 1 }, - - { "netmask", o_special, (void *)setnetmask, - "set netmask", OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, netmask_str }, - - { "ipcp-no-addresses", o_bool, &ipcp_wantoptions[0].old_addrs, - "Disable old-style IP-Addresses usage", OPT_A2CLR, - &ipcp_allowoptions[0].old_addrs }, - { "ipcp-no-address", o_bool, &ipcp_wantoptions[0].neg_addr, - "Disable IP-Address usage", OPT_A2CLR, - &ipcp_allowoptions[0].neg_addr }, - - { "noremoteip", o_bool, &noremoteip, - "Allow peer to have no IP address", 1 }, - - { "nosendip", o_bool, &ipcp_wantoptions[0].neg_addr, - "Don't send our IP address to peer", OPT_A2CLR, - &ipcp_wantoptions[0].old_addrs}, - - { "IP addresses", o_wild, (void *) &setipaddr, - "set local and remote IP addresses", - OPT_NOARG | OPT_A2PRINTER, (void *) &printipaddr }, - - { NULL } -}; -#endif /* PPP_OPTIONS */ - -/* - * Protocol entry points from main code. - */ -static void ipcp_init(ppp_pcb *pcb); -static void ipcp_open(ppp_pcb *pcb); -static void ipcp_close(ppp_pcb *pcb, const char *reason); -static void ipcp_lowerup(ppp_pcb *pcb); -static void ipcp_lowerdown(ppp_pcb *pcb); -static void ipcp_input(ppp_pcb *pcb, u_char *p, int len); -static void ipcp_protrej(ppp_pcb *pcb); -#if PRINTPKT_SUPPORT -static int ipcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg); -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS -static void ip_check_options (void); -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT -static int ip_demand_conf (int); -static int ip_active_pkt (u_char *, int); -#endif /* DEMAND_SUPPORT */ -#if 0 /* UNUSED */ -static void create_resolv (u32_t, u32_t); -#endif /* UNUSED */ - -const struct protent ipcp_protent = { - PPP_IPCP, - ipcp_init, - ipcp_input, - ipcp_protrej, - ipcp_lowerup, - ipcp_lowerdown, - ipcp_open, - ipcp_close, -#if PRINTPKT_SUPPORT - ipcp_printpkt, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - NULL, -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "IPCP", - "IP", -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - ipcp_option_list, - ip_check_options, -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - ip_demand_conf, - ip_active_pkt -#endif /* DEMAND_SUPPORT */ -}; - -static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t replacedefaultroute); - -/* - * Lengths of configuration options. - */ -#define CILEN_VOID 2 -#define CILEN_COMPRESS 4 /* min length for compression protocol opt. */ -#define CILEN_VJ 6 /* length for RFC1332 Van-Jacobson opt. */ -#define CILEN_ADDR 6 /* new-style single address option */ -#define CILEN_ADDRS 10 /* old-style dual address option */ - - -#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ - (x) == CONFNAK ? "NAK" : "REJ") - -#if 0 /* UNUSED, already defined by lwIP */ -/* - * Make a string representation of a network IP address. - */ -char * -ip_ntoa(ipaddr) -u32_t ipaddr; -{ - static char b[64]; - - slprintf(b, sizeof(b), "%I", ipaddr); - return b; -} -#endif /* UNUSED, already defined by lwIP */ - -/* - * Option parsing. - */ -#if PPP_OPTIONS -/* - * setvjslots - set maximum number of connection slots for VJ compression - */ -static int -setvjslots(argv) - char **argv; -{ - int value; - - if (!int_option(*argv, &value)) - return 0; - - if (value < 2 || value > 16) { - option_error("vj-max-slots value must be between 2 and 16"); - return 0; - } - ipcp_wantoptions [0].maxslotindex = - ipcp_allowoptions[0].maxslotindex = value - 1; - slprintf(vj_value, sizeof(vj_value), "%d", value); - return 1; -} - -/* - * setdnsaddr - set the dns address(es) - */ -static int -setdnsaddr(argv) - char **argv; -{ - u32_t dns; - struct hostent *hp; - - dns = inet_addr(*argv); - if (dns == (u32_t) -1) { - if ((hp = gethostbyname(*argv)) == NULL) { - option_error("invalid address parameter '%s' for ms-dns option", - *argv); - return 0; - } - dns = *(u32_t *)hp->h_addr; - } - - /* We take the last 2 values given, the 2nd-last as the primary - and the last as the secondary. If only one is given it - becomes both primary and secondary. */ - if (ipcp_allowoptions[0].dnsaddr[1] == 0) - ipcp_allowoptions[0].dnsaddr[0] = dns; - else - ipcp_allowoptions[0].dnsaddr[0] = ipcp_allowoptions[0].dnsaddr[1]; - - /* always set the secondary address value. */ - ipcp_allowoptions[0].dnsaddr[1] = dns; - - return (1); -} - -/* - * setwinsaddr - set the wins address(es) - * This is primrarly used with the Samba package under UNIX or for pointing - * the caller to the existing WINS server on a Windows NT platform. - */ -static int -setwinsaddr(argv) - char **argv; -{ - u32_t wins; - struct hostent *hp; - - wins = inet_addr(*argv); - if (wins == (u32_t) -1) { - if ((hp = gethostbyname(*argv)) == NULL) { - option_error("invalid address parameter '%s' for ms-wins option", - *argv); - return 0; - } - wins = *(u32_t *)hp->h_addr; - } - - /* We take the last 2 values given, the 2nd-last as the primary - and the last as the secondary. If only one is given it - becomes both primary and secondary. */ - if (ipcp_allowoptions[0].winsaddr[1] == 0) - ipcp_allowoptions[0].winsaddr[0] = wins; - else - ipcp_allowoptions[0].winsaddr[0] = ipcp_allowoptions[0].winsaddr[1]; - - /* always set the secondary address value. */ - ipcp_allowoptions[0].winsaddr[1] = wins; - - return (1); -} - -/* - * setipaddr - Set the IP address - * If doit is 0, the call is to check whether this option is - * potentially an IP address specification. - * Not static so that plugins can call it to set the addresses - */ -int -setipaddr(arg, argv, doit) - char *arg; - char **argv; - int doit; -{ - struct hostent *hp; - char *colon; - u32_t local, remote; - ipcp_options *wo = &ipcp_wantoptions[0]; - static int prio_local = 0, prio_remote = 0; - - /* - * IP address pair separated by ":". - */ - if ((colon = strchr(arg, ':')) == NULL) - return 0; - if (!doit) - return 1; - - /* - * If colon first character, then no local addr. - */ - if (colon != arg && option_priority >= prio_local) { - *colon = '\0'; - if ((local = inet_addr(arg)) == (u32_t) -1) { - if ((hp = gethostbyname(arg)) == NULL) { - option_error("unknown host: %s", arg); - return 0; - } - local = *(u32_t *)hp->h_addr; - } - if (bad_ip_adrs(local)) { - option_error("bad local IP address %s", ip_ntoa(local)); - return 0; - } - if (local != 0) - wo->ouraddr = local; - *colon = ':'; - prio_local = option_priority; - } - - /* - * If colon last character, then no remote addr. - */ - if (*++colon != '\0' && option_priority >= prio_remote) { - if ((remote = inet_addr(colon)) == (u32_t) -1) { - if ((hp = gethostbyname(colon)) == NULL) { - option_error("unknown host: %s", colon); - return 0; - } - remote = *(u32_t *)hp->h_addr; - if (remote_name[0] == 0) - strlcpy(remote_name, colon, sizeof(remote_name)); - } - if (bad_ip_adrs(remote)) { - option_error("bad remote IP address %s", ip_ntoa(remote)); - return 0; - } - if (remote != 0) - wo->hisaddr = remote; - prio_remote = option_priority; - } - - return 1; -} - -static void -printipaddr(opt, printer, arg) - option_t *opt; - void (*printer) (void *, char *, ...); - void *arg; -{ - ipcp_options *wo = &ipcp_wantoptions[0]; - - if (wo->ouraddr != 0) - printer(arg, "%I", wo->ouraddr); - printer(arg, ":"); - if (wo->hisaddr != 0) - printer(arg, "%I", wo->hisaddr); -} - -/* - * setnetmask - set the netmask to be used on the interface. - */ -static int -setnetmask(argv) - char **argv; -{ - u32_t mask; - int n; - char *p; - - /* - * Unfortunately, if we use inet_addr, we can't tell whether - * a result of all 1s is an error or a valid 255.255.255.255. - */ - p = *argv; - n = parse_dotted_ip(p, &mask); - - mask = lwip_htonl(mask); - - if (n == 0 || p[n] != 0 || (netmask & ~mask) != 0) { - option_error("invalid netmask value '%s'", *argv); - return 0; - } - - netmask = mask; - slprintf(netmask_str, sizeof(netmask_str), "%I", mask); - - return (1); -} - -int -parse_dotted_ip(p, vp) - char *p; - u32_t *vp; -{ - int n; - u32_t v, b; - char *endp, *p0 = p; - - v = 0; - for (n = 3;; --n) { - b = strtoul(p, &endp, 0); - if (endp == p) - return 0; - if (b > 255) { - if (n < 3) - return 0; - /* accept e.g. 0xffffff00 */ - *vp = b; - return endp - p0; - } - v |= b << (n * 8); - p = endp; - if (n == 0) - break; - if (*p != '.') - return 0; - ++p; - } - *vp = v; - return p - p0; -} -#endif /* PPP_OPTIONS */ - -/* - * ipcp_init - Initialize IPCP. - */ -static void ipcp_init(ppp_pcb *pcb) { - fsm *f = &pcb->ipcp_fsm; - - ipcp_options *wo = &pcb->ipcp_wantoptions; - ipcp_options *ao = &pcb->ipcp_allowoptions; - - f->pcb = pcb; - f->protocol = PPP_IPCP; - f->callbacks = &ipcp_callbacks; - fsm_init(f); - - /* - * Some 3G modems use repeated IPCP NAKs as a way of stalling - * until they can contact a server on the network, so we increase - * the default number of NAKs we accept before we start treating - * them as rejects. - */ - f->maxnakloops = 100; - -#if 0 /* Not necessary, everything is cleared in ppp_new() */ - memset(wo, 0, sizeof(*wo)); - memset(ao, 0, sizeof(*ao)); -#endif /* 0 */ - - wo->neg_addr = wo->old_addrs = 1; -#if VJ_SUPPORT - wo->neg_vj = 1; - wo->vj_protocol = IPCP_VJ_COMP; - wo->maxslotindex = MAX_STATES - 1; /* really max index */ - wo->cflag = 1; -#endif /* VJ_SUPPORT */ - -#if 0 /* UNUSED */ - /* wanting default route by default */ - wo->default_route = 1; -#endif /* UNUSED */ - - ao->neg_addr = ao->old_addrs = 1; -#if VJ_SUPPORT - /* max slots and slot-id compression are currently hardwired in */ - /* ppp_if.c to 16 and 1, this needs to be changed (among other */ - /* things) gmc */ - - ao->neg_vj = 1; - ao->maxslotindex = MAX_STATES - 1; - ao->cflag = 1; -#endif /* #if VJ_SUPPORT */ - -#if 0 /* UNUSED */ - /* - * XXX These control whether the user may use the proxyarp - * and defaultroute options. - */ - ao->proxy_arp = 1; - ao->default_route = 1; -#endif /* UNUSED */ -} - - -/* - * ipcp_open - IPCP is allowed to come up. - */ -static void ipcp_open(ppp_pcb *pcb) { - fsm *f = &pcb->ipcp_fsm; - fsm_open(f); - pcb->ipcp_is_open = 1; -} - - -/* - * ipcp_close - Take IPCP down. - */ -static void ipcp_close(ppp_pcb *pcb, const char *reason) { - fsm *f = &pcb->ipcp_fsm; - fsm_close(f, reason); -} - - -/* - * ipcp_lowerup - The lower layer is up. - */ -static void ipcp_lowerup(ppp_pcb *pcb) { - fsm *f = &pcb->ipcp_fsm; - fsm_lowerup(f); -} - - -/* - * ipcp_lowerdown - The lower layer is down. - */ -static void ipcp_lowerdown(ppp_pcb *pcb) { - fsm *f = &pcb->ipcp_fsm; - fsm_lowerdown(f); -} - - -/* - * ipcp_input - Input IPCP packet. - */ -static void ipcp_input(ppp_pcb *pcb, u_char *p, int len) { - fsm *f = &pcb->ipcp_fsm; - fsm_input(f, p, len); -} - - -/* - * ipcp_protrej - A Protocol-Reject was received for IPCP. - * - * Pretend the lower layer went down, so we shut up. - */ -static void ipcp_protrej(ppp_pcb *pcb) { - fsm *f = &pcb->ipcp_fsm; - fsm_lowerdown(f); -} - - -/* - * ipcp_resetci - Reset our CI. - * Called by fsm_sconfreq, Send Configure Request. - */ -static void ipcp_resetci(fsm *f) { - ppp_pcb *pcb = f->pcb; - ipcp_options *wo = &pcb->ipcp_wantoptions; - ipcp_options *go = &pcb->ipcp_gotoptions; - ipcp_options *ao = &pcb->ipcp_allowoptions; - - wo->req_addr = (wo->neg_addr || wo->old_addrs) && - (ao->neg_addr || ao->old_addrs); - if (wo->ouraddr == 0) - wo->accept_local = 1; - if (wo->hisaddr == 0) - wo->accept_remote = 1; -#if LWIP_DNS - wo->req_dns1 = wo->req_dns2 = pcb->settings.usepeerdns; /* Request DNS addresses from the peer */ -#endif /* LWIP_DNS */ - *go = *wo; - if (!pcb->ask_for_local) - go->ouraddr = 0; -#if 0 /* UNUSED */ - if (ip_choose_hook) { - ip_choose_hook(&wo->hisaddr); - if (wo->hisaddr) { - wo->accept_remote = 0; - } - } -#endif /* UNUSED */ - BZERO(&pcb->ipcp_hisoptions, sizeof(ipcp_options)); -} - - -/* - * ipcp_cilen - Return length of our CI. - * Called by fsm_sconfreq, Send Configure Request. - */ -static int ipcp_cilen(fsm *f) { - ppp_pcb *pcb = f->pcb; - ipcp_options *go = &pcb->ipcp_gotoptions; -#if VJ_SUPPORT - ipcp_options *wo = &pcb->ipcp_wantoptions; -#endif /* VJ_SUPPORT */ - ipcp_options *ho = &pcb->ipcp_hisoptions; - -#define LENCIADDRS(neg) (neg ? CILEN_ADDRS : 0) -#if VJ_SUPPORT -#define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0) -#endif /* VJ_SUPPORT */ -#define LENCIADDR(neg) (neg ? CILEN_ADDR : 0) -#if LWIP_DNS -#define LENCIDNS(neg) LENCIADDR(neg) -#endif /* LWIP_DNS */ -#if 0 /* UNUSED - WINS */ -#define LENCIWINS(neg) LENCIADDR(neg) -#endif /* UNUSED - WINS */ - - /* - * First see if we want to change our options to the old - * forms because we have received old forms from the peer. - */ - if (go->neg_addr && go->old_addrs && !ho->neg_addr && ho->old_addrs) - go->neg_addr = 0; - -#if VJ_SUPPORT - if (wo->neg_vj && !go->neg_vj && !go->old_vj) { - /* try an older style of VJ negotiation */ - /* use the old style only if the peer did */ - if (ho->neg_vj && ho->old_vj) { - go->neg_vj = 1; - go->old_vj = 1; - go->vj_protocol = ho->vj_protocol; - } - } -#endif /* VJ_SUPPORT */ - - return (LENCIADDRS(!go->neg_addr && go->old_addrs) + -#if VJ_SUPPORT - LENCIVJ(go->neg_vj, go->old_vj) + -#endif /* VJ_SUPPORT */ - LENCIADDR(go->neg_addr) + -#if LWIP_DNS - LENCIDNS(go->req_dns1) + - LENCIDNS(go->req_dns2) + -#endif /* LWIP_DNS */ -#if 0 /* UNUSED - WINS */ - LENCIWINS(go->winsaddr[0]) + - LENCIWINS(go->winsaddr[1]) + -#endif /* UNUSED - WINS */ - 0); -} - - -/* - * ipcp_addci - Add our desired CIs to a packet. - * Called by fsm_sconfreq, Send Configure Request. - */ -static void ipcp_addci(fsm *f, u_char *ucp, int *lenp) { - ppp_pcb *pcb = f->pcb; - ipcp_options *go = &pcb->ipcp_gotoptions; - int len = *lenp; - -#define ADDCIADDRS(opt, neg, val1, val2) \ - if (neg) { \ - if (len >= CILEN_ADDRS) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDRS, ucp); \ - l = lwip_ntohl(val1); \ - PUTLONG(l, ucp); \ - l = lwip_ntohl(val2); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDRS; \ - } else \ - go->old_addrs = 0; \ - } - -#if VJ_SUPPORT -#define ADDCIVJ(opt, neg, val, old, maxslotindex, cflag) \ - if (neg) { \ - int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ - if (len >= vjlen) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(vjlen, ucp); \ - PUTSHORT(val, ucp); \ - if (!old) { \ - PUTCHAR(maxslotindex, ucp); \ - PUTCHAR(cflag, ucp); \ - } \ - len -= vjlen; \ - } else \ - neg = 0; \ - } -#endif /* VJ_SUPPORT */ - -#define ADDCIADDR(opt, neg, val) \ - if (neg) { \ - if (len >= CILEN_ADDR) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDR, ucp); \ - l = lwip_ntohl(val); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDR; \ - } else \ - neg = 0; \ - } - -#if LWIP_DNS -#define ADDCIDNS(opt, neg, addr) \ - if (neg) { \ - if (len >= CILEN_ADDR) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDR, ucp); \ - l = lwip_ntohl(addr); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDR; \ - } else \ - neg = 0; \ - } -#endif /* LWIP_DNS */ - -#if 0 /* UNUSED - WINS */ -#define ADDCIWINS(opt, addr) \ - if (addr) { \ - if (len >= CILEN_ADDR) { \ - u32_t l; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_ADDR, ucp); \ - l = lwip_ntohl(addr); \ - PUTLONG(l, ucp); \ - len -= CILEN_ADDR; \ - } else \ - addr = 0; \ - } -#endif /* UNUSED - WINS */ - - ADDCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr, - go->hisaddr); - -#if VJ_SUPPORT - ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj, - go->maxslotindex, go->cflag); -#endif /* VJ_SUPPORT */ - - ADDCIADDR(CI_ADDR, go->neg_addr, go->ouraddr); - -#if LWIP_DNS - ADDCIDNS(CI_MS_DNS1, go->req_dns1, go->dnsaddr[0]); - - ADDCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]); -#endif /* LWIP_DNS */ - -#if 0 /* UNUSED - WINS */ - ADDCIWINS(CI_MS_WINS1, go->winsaddr[0]); - - ADDCIWINS(CI_MS_WINS2, go->winsaddr[1]); -#endif /* UNUSED - WINS */ - - *lenp -= len; -} - - -/* - * ipcp_ackci - Ack our CIs. - * Called by fsm_rconfack, Receive Configure ACK. - * - * Returns: - * 0 - Ack was bad. - * 1 - Ack was good. - */ -static int ipcp_ackci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - ipcp_options *go = &pcb->ipcp_gotoptions; - u_short cilen, citype; - u32_t cilong; -#if VJ_SUPPORT - u_short cishort; - u_char cimaxslotindex, cicflag; -#endif /* VJ_SUPPORT */ - - /* - * CIs must be in exactly the same order that we sent... - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ - -#define ACKCIADDRS(opt, neg, val1, val2) \ - if (neg) { \ - u32_t l; \ - if ((len -= CILEN_ADDRS) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDRS || \ - citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (val1 != cilong) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (val2 != cilong) \ - goto bad; \ - } - -#if VJ_SUPPORT -#define ACKCIVJ(opt, neg, val, old, maxslotindex, cflag) \ - if (neg) { \ - int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ - if ((len -= vjlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != vjlen || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != val) \ - goto bad; \ - if (!old) { \ - GETCHAR(cimaxslotindex, p); \ - if (cimaxslotindex != maxslotindex) \ - goto bad; \ - GETCHAR(cicflag, p); \ - if (cicflag != cflag) \ - goto bad; \ - } \ - } -#endif /* VJ_SUPPORT */ - -#define ACKCIADDR(opt, neg, val) \ - if (neg) { \ - u32_t l; \ - if ((len -= CILEN_ADDR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDR || \ - citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (val != cilong) \ - goto bad; \ - } - -#if LWIP_DNS -#define ACKCIDNS(opt, neg, addr) \ - if (neg) { \ - u32_t l; \ - if ((len -= CILEN_ADDR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDR || citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (addr != cilong) \ - goto bad; \ - } -#endif /* LWIP_DNS */ - -#if 0 /* UNUSED - WINS */ -#define ACKCIWINS(opt, addr) \ - if (addr) { \ - u32_t l; \ - if ((len -= CILEN_ADDR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_ADDR || citype != opt) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - if (addr != cilong) \ - goto bad; \ - } -#endif /* UNUSED - WINS */ - - ACKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr, - go->hisaddr); - -#if VJ_SUPPORT - ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj, - go->maxslotindex, go->cflag); -#endif /* VJ_SUPPORT */ - - ACKCIADDR(CI_ADDR, go->neg_addr, go->ouraddr); - -#if LWIP_DNS - ACKCIDNS(CI_MS_DNS1, go->req_dns1, go->dnsaddr[0]); - - ACKCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]); -#endif /* LWIP_DNS */ - -#if 0 /* UNUSED - WINS */ - ACKCIWINS(CI_MS_WINS1, go->winsaddr[0]); - - ACKCIWINS(CI_MS_WINS2, go->winsaddr[1]); -#endif /* UNUSED - WINS */ - - /* - * If there are any remaining CIs, then this packet is bad. - */ - if (len != 0) - goto bad; - return (1); - -bad: - IPCPDEBUG(("ipcp_ackci: received bad Ack!")); - return (0); -} - -/* - * ipcp_nakci - Peer has sent a NAK for some of our CIs. - * This should not modify any state if the Nak is bad - * or if IPCP is in the OPENED state. - * Calback from fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject. - * - * Returns: - * 0 - Nak was bad. - * 1 - Nak was good. - */ -static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { - ppp_pcb *pcb = f->pcb; - ipcp_options *go = &pcb->ipcp_gotoptions; - u_char citype, cilen, *next; -#if VJ_SUPPORT - u_char cimaxslotindex, cicflag; - u_short cishort; -#endif /* VJ_SUPPORT */ - u32_t ciaddr1, ciaddr2, l; -#if LWIP_DNS - u32_t cidnsaddr; -#endif /* LWIP_DNS */ - ipcp_options no; /* options we've seen Naks for */ - ipcp_options try_; /* options to request next time */ - - BZERO(&no, sizeof(no)); - try_ = *go; - - /* - * Any Nak'd CIs must be in exactly the same order that we sent. - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ -#define NAKCIADDRS(opt, neg, code) \ - if ((neg) && \ - (cilen = p[1]) == CILEN_ADDRS && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - ciaddr1 = lwip_htonl(l); \ - GETLONG(l, p); \ - ciaddr2 = lwip_htonl(l); \ - no.old_addrs = 1; \ - code \ - } - -#if VJ_SUPPORT -#define NAKCIVJ(opt, neg, code) \ - if (go->neg && \ - ((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - no.neg = 1; \ - code \ - } -#endif /* VJ_SUPPORT */ - -#define NAKCIADDR(opt, neg, code) \ - if (go->neg && \ - (cilen = p[1]) == CILEN_ADDR && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - ciaddr1 = lwip_htonl(l); \ - no.neg = 1; \ - code \ - } - -#if LWIP_DNS -#define NAKCIDNS(opt, neg, code) \ - if (go->neg && \ - ((cilen = p[1]) == CILEN_ADDR) && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cidnsaddr = lwip_htonl(l); \ - no.neg = 1; \ - code \ - } -#endif /* LWIP_DNS */ - - /* - * Accept the peer's idea of {our,his} address, if different - * from our idea, only if the accept_{local,remote} flag is set. - */ - NAKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, - if (treat_as_reject) { - try_.old_addrs = 0; - } else { - if (go->accept_local && ciaddr1) { - /* take his idea of our address */ - try_.ouraddr = ciaddr1; - } - if (go->accept_remote && ciaddr2) { - /* take his idea of his address */ - try_.hisaddr = ciaddr2; - } - } - ); - -#if VJ_SUPPORT - /* - * Accept the peer's value of maxslotindex provided that it - * is less than what we asked for. Turn off slot-ID compression - * if the peer wants. Send old-style compress-type option if - * the peer wants. - */ - NAKCIVJ(CI_COMPRESSTYPE, neg_vj, - if (treat_as_reject) { - try_.neg_vj = 0; - } else if (cilen == CILEN_VJ) { - GETCHAR(cimaxslotindex, p); - GETCHAR(cicflag, p); - if (cishort == IPCP_VJ_COMP) { - try_.old_vj = 0; - if (cimaxslotindex < go->maxslotindex) - try_.maxslotindex = cimaxslotindex; - if (!cicflag) - try_.cflag = 0; - } else { - try_.neg_vj = 0; - } - } else { - if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) { - try_.old_vj = 1; - try_.vj_protocol = cishort; - } else { - try_.neg_vj = 0; - } - } - ); -#endif /* VJ_SUPPORT */ - - NAKCIADDR(CI_ADDR, neg_addr, - if (treat_as_reject) { - try_.neg_addr = 0; - try_.old_addrs = 0; - } else if (go->accept_local && ciaddr1) { - /* take his idea of our address */ - try_.ouraddr = ciaddr1; - } - ); - -#if LWIP_DNS - NAKCIDNS(CI_MS_DNS1, req_dns1, - if (treat_as_reject) { - try_.req_dns1 = 0; - } else { - try_.dnsaddr[0] = cidnsaddr; - } - ); - - NAKCIDNS(CI_MS_DNS2, req_dns2, - if (treat_as_reject) { - try_.req_dns2 = 0; - } else { - try_.dnsaddr[1] = cidnsaddr; - } - ); -#endif /* #if LWIP_DNS */ - - /* - * There may be remaining CIs, if the peer is requesting negotiation - * on an option that we didn't include in our request packet. - * If they want to negotiate about IP addresses, we comply. - * If they want us to ask for compression, we refuse. - * If they want us to ask for ms-dns, we do that, since some - * peers get huffy if we don't. - */ - while (len >= CILEN_VOID) { - GETCHAR(citype, p); - GETCHAR(cilen, p); - if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) - goto bad; - next = p + cilen - 2; - - switch (citype) { -#if VJ_SUPPORT - case CI_COMPRESSTYPE: - if (go->neg_vj || no.neg_vj || - (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) - goto bad; - no.neg_vj = 1; - break; -#endif /* VJ_SUPPORT */ - case CI_ADDRS: - if ((!go->neg_addr && go->old_addrs) || no.old_addrs - || cilen != CILEN_ADDRS) - goto bad; - try_.neg_addr = 0; - GETLONG(l, p); - ciaddr1 = lwip_htonl(l); - if (ciaddr1 && go->accept_local) - try_.ouraddr = ciaddr1; - GETLONG(l, p); - ciaddr2 = lwip_htonl(l); - if (ciaddr2 && go->accept_remote) - try_.hisaddr = ciaddr2; - no.old_addrs = 1; - break; - case CI_ADDR: - if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR) - goto bad; - try_.old_addrs = 0; - GETLONG(l, p); - ciaddr1 = lwip_htonl(l); - if (ciaddr1 && go->accept_local) - try_.ouraddr = ciaddr1; - if (try_.ouraddr != 0) - try_.neg_addr = 1; - no.neg_addr = 1; - break; -#if LWIP_DNS - case CI_MS_DNS1: - if (go->req_dns1 || no.req_dns1 || cilen != CILEN_ADDR) - goto bad; - GETLONG(l, p); - try_.dnsaddr[0] = lwip_htonl(l); - try_.req_dns1 = 1; - no.req_dns1 = 1; - break; - case CI_MS_DNS2: - if (go->req_dns2 || no.req_dns2 || cilen != CILEN_ADDR) - goto bad; - GETLONG(l, p); - try_.dnsaddr[1] = lwip_htonl(l); - try_.req_dns2 = 1; - no.req_dns2 = 1; - break; -#endif /* LWIP_DNS */ -#if 0 /* UNUSED - WINS */ - case CI_MS_WINS1: - case CI_MS_WINS2: - if (cilen != CILEN_ADDR) - goto bad; - GETLONG(l, p); - ciaddr1 = lwip_htonl(l); - if (ciaddr1) - try_.winsaddr[citype == CI_MS_WINS2] = ciaddr1; - break; -#endif /* UNUSED - WINS */ - default: - break; - } - p = next; - } - - /* - * OK, the Nak is good. Now we can update state. - * If there are any remaining options, we ignore them. - */ - if (f->state != PPP_FSM_OPENED) - *go = try_; - - return 1; - -bad: - IPCPDEBUG(("ipcp_nakci: received bad Nak!")); - return 0; -} - - -/* - * ipcp_rejci - Reject some of our CIs. - * Callback from fsm_rconfnakrej. - */ -static int ipcp_rejci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - ipcp_options *go = &pcb->ipcp_gotoptions; - u_char cilen; -#if VJ_SUPPORT - u_char cimaxslotindex, ciflag; - u_short cishort; -#endif /* VJ_SUPPORT */ - u32_t cilong; - ipcp_options try_; /* options to request next time */ - - try_ = *go; - /* - * Any Rejected CIs must be in exactly the same order that we sent. - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ -#define REJCIADDRS(opt, neg, val1, val2) \ - if ((neg) && \ - (cilen = p[1]) == CILEN_ADDRS && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != val1) \ - goto bad; \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != val2) \ - goto bad; \ - try_.old_addrs = 0; \ - } - -#if VJ_SUPPORT -#define REJCIVJ(opt, neg, val, old, maxslot, cflag) \ - if (go->neg && \ - p[1] == (old? CILEN_COMPRESS : CILEN_VJ) && \ - len >= p[1] && \ - p[0] == opt) { \ - len -= p[1]; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - /* Check rejected value. */ \ - if (cishort != val) \ - goto bad; \ - if (!old) { \ - GETCHAR(cimaxslotindex, p); \ - if (cimaxslotindex != maxslot) \ - goto bad; \ - GETCHAR(ciflag, p); \ - if (ciflag != cflag) \ - goto bad; \ - } \ - try_.neg = 0; \ - } -#endif /* VJ_SUPPORT */ - -#define REJCIADDR(opt, neg, val) \ - if (go->neg && \ - (cilen = p[1]) == CILEN_ADDR && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != val) \ - goto bad; \ - try_.neg = 0; \ - } - -#if LWIP_DNS -#define REJCIDNS(opt, neg, dnsaddr) \ - if (go->neg && \ - ((cilen = p[1]) == CILEN_ADDR) && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != dnsaddr) \ - goto bad; \ - try_.neg = 0; \ - } -#endif /* LWIP_DNS */ - -#if 0 /* UNUSED - WINS */ -#define REJCIWINS(opt, addr) \ - if (addr && \ - ((cilen = p[1]) == CILEN_ADDR) && \ - len >= cilen && \ - p[0] == opt) { \ - u32_t l; \ - len -= cilen; \ - INCPTR(2, p); \ - GETLONG(l, p); \ - cilong = lwip_htonl(l); \ - /* Check rejected value. */ \ - if (cilong != addr) \ - goto bad; \ - try_.winsaddr[opt == CI_MS_WINS2] = 0; \ - } -#endif /* UNUSED - WINS */ - - REJCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, - go->ouraddr, go->hisaddr); - -#if VJ_SUPPORT - REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol, go->old_vj, - go->maxslotindex, go->cflag); -#endif /* VJ_SUPPORT */ - - REJCIADDR(CI_ADDR, neg_addr, go->ouraddr); - -#if LWIP_DNS - REJCIDNS(CI_MS_DNS1, req_dns1, go->dnsaddr[0]); - - REJCIDNS(CI_MS_DNS2, req_dns2, go->dnsaddr[1]); -#endif /* LWIP_DNS */ - -#if 0 /* UNUSED - WINS */ - REJCIWINS(CI_MS_WINS1, go->winsaddr[0]); - - REJCIWINS(CI_MS_WINS2, go->winsaddr[1]); -#endif /* UNUSED - WINS */ - - /* - * If there are any remaining CIs, then this packet is bad. - */ - if (len != 0) - goto bad; - /* - * Now we can update state. - */ - if (f->state != PPP_FSM_OPENED) - *go = try_; - return 1; - -bad: - IPCPDEBUG(("ipcp_rejci: received bad Reject!")); - return 0; -} - - -/* - * ipcp_reqci - Check the peer's requested CIs and send appropriate response. - * Callback from fsm_rconfreq, Receive Configure Request - * - * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified - * appropriately. If reject_if_disagree is non-zero, doesn't return - * CONFNAK; returns CONFREJ if it can't return CONFACK. - * - * inp = Requested CIs - * len = Length of requested CIs - */ -static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { - ppp_pcb *pcb = f->pcb; - ipcp_options *wo = &pcb->ipcp_wantoptions; - ipcp_options *ho = &pcb->ipcp_hisoptions; - ipcp_options *ao = &pcb->ipcp_allowoptions; - u_char *cip, *next; /* Pointer to current and next CIs */ - u_short cilen, citype; /* Parsed len, type */ -#if VJ_SUPPORT - u_short cishort; /* Parsed short value */ -#endif /* VJ_SUPPORT */ - u32_t tl, ciaddr1, ciaddr2;/* Parsed address values */ - int rc = CONFACK; /* Final packet return code */ - int orc; /* Individual option return code */ - u_char *p; /* Pointer to next char to parse */ - u_char *ucp = inp; /* Pointer to current output char */ - int l = *len; /* Length left */ -#if VJ_SUPPORT - u_char maxslotindex, cflag; -#endif /* VJ_SUPPORT */ -#if LWIP_DNS - int d; -#endif /* LWIP_DNS */ - - /* - * Reset all his options. - */ - BZERO(ho, sizeof(*ho)); - - /* - * Process all his options. - */ - next = inp; - while (l) { - orc = CONFACK; /* Assume success */ - cip = p = next; /* Remember begining of CI */ - if (l < 2 || /* Not enough data for CI header or */ - p[1] < 2 || /* CI length too small or */ - p[1] > l) { /* CI length too big? */ - IPCPDEBUG(("ipcp_reqci: bad CI length!")); - orc = CONFREJ; /* Reject bad CI */ - cilen = l; /* Reject till end of packet */ - l = 0; /* Don't loop again */ - goto endswitch; - } - GETCHAR(citype, p); /* Parse CI type */ - GETCHAR(cilen, p); /* Parse CI length */ - l -= cilen; /* Adjust remaining length */ - next += cilen; /* Step to next CI */ - - switch (citype) { /* Check CI type */ - case CI_ADDRS: - if (!ao->old_addrs || ho->neg_addr || - cilen != CILEN_ADDRS) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - - /* - * If he has no address, or if we both have his address but - * disagree about it, then NAK it with our idea. - * In particular, if we don't know his address, but he does, - * then accept it. - */ - GETLONG(tl, p); /* Parse source address (his) */ - ciaddr1 = lwip_htonl(tl); - if (ciaddr1 != wo->hisaddr - && (ciaddr1 == 0 || !wo->accept_remote)) { - orc = CONFNAK; - if (!reject_if_disagree) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(wo->hisaddr); - PUTLONG(tl, p); - } - } else if (ciaddr1 == 0 && wo->hisaddr == 0) { - /* - * If neither we nor he knows his address, reject the option. - */ - orc = CONFREJ; - wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ - break; - } - - /* - * If he doesn't know our address, or if we both have our address - * but disagree about it, then NAK it with our idea. - */ - GETLONG(tl, p); /* Parse desination address (ours) */ - ciaddr2 = lwip_htonl(tl); - if (ciaddr2 != wo->ouraddr) { - if (ciaddr2 == 0 || !wo->accept_local) { - orc = CONFNAK; - if (!reject_if_disagree) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(wo->ouraddr); - PUTLONG(tl, p); - } - } else { - wo->ouraddr = ciaddr2; /* accept peer's idea */ - } - } - - ho->old_addrs = 1; - ho->hisaddr = ciaddr1; - ho->ouraddr = ciaddr2; - break; - - case CI_ADDR: - if (!ao->neg_addr || ho->old_addrs || - cilen != CILEN_ADDR) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - - /* - * If he has no address, or if we both have his address but - * disagree about it, then NAK it with our idea. - * In particular, if we don't know his address, but he does, - * then accept it. - */ - GETLONG(tl, p); /* Parse source address (his) */ - ciaddr1 = lwip_htonl(tl); - if (ciaddr1 != wo->hisaddr - && (ciaddr1 == 0 || !wo->accept_remote)) { - orc = CONFNAK; - if (!reject_if_disagree) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(wo->hisaddr); - PUTLONG(tl, p); - } - } else if (ciaddr1 == 0 && wo->hisaddr == 0) { - /* - * Don't ACK an address of 0.0.0.0 - reject it instead. - */ - orc = CONFREJ; - wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ - break; - } - - ho->neg_addr = 1; - ho->hisaddr = ciaddr1; - break; - -#if LWIP_DNS - case CI_MS_DNS1: - case CI_MS_DNS2: - /* Microsoft primary or secondary DNS request */ - d = citype == CI_MS_DNS2; - - /* If we do not have a DNS address then we cannot send it */ - if (ao->dnsaddr[d] == 0 || - cilen != CILEN_ADDR) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - GETLONG(tl, p); - if (lwip_htonl(tl) != ao->dnsaddr[d]) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(ao->dnsaddr[d]); - PUTLONG(tl, p); - orc = CONFNAK; - } - break; -#endif /* LWIP_DNS */ - -#if 0 /* UNUSED - WINS */ - case CI_MS_WINS1: - case CI_MS_WINS2: - /* Microsoft primary or secondary WINS request */ - d = citype == CI_MS_WINS2; - - /* If we do not have a DNS address then we cannot send it */ - if (ao->winsaddr[d] == 0 || - cilen != CILEN_ADDR) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - GETLONG(tl, p); - if (lwip_htonl(tl) != ao->winsaddr[d]) { - DECPTR(sizeof(u32_t), p); - tl = lwip_ntohl(ao->winsaddr[d]); - PUTLONG(tl, p); - orc = CONFNAK; - } - break; -#endif /* UNUSED - WINS */ - -#if VJ_SUPPORT - case CI_COMPRESSTYPE: - if (!ao->neg_vj || - (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) { - orc = CONFREJ; - break; - } - GETSHORT(cishort, p); - - if (!(cishort == IPCP_VJ_COMP || - (cishort == IPCP_VJ_COMP_OLD && cilen == CILEN_COMPRESS))) { - orc = CONFREJ; - break; - } - - ho->neg_vj = 1; - ho->vj_protocol = cishort; - if (cilen == CILEN_VJ) { - GETCHAR(maxslotindex, p); - if (maxslotindex > ao->maxslotindex) { - orc = CONFNAK; - if (!reject_if_disagree){ - DECPTR(1, p); - PUTCHAR(ao->maxslotindex, p); - } - } - GETCHAR(cflag, p); - if (cflag && !ao->cflag) { - orc = CONFNAK; - if (!reject_if_disagree){ - DECPTR(1, p); - PUTCHAR(wo->cflag, p); - } - } - ho->maxslotindex = maxslotindex; - ho->cflag = cflag; - } else { - ho->old_vj = 1; - ho->maxslotindex = MAX_STATES - 1; - ho->cflag = 1; - } - break; -#endif /* VJ_SUPPORT */ - - default: - orc = CONFREJ; - break; - } -endswitch: - if (orc == CONFACK && /* Good CI */ - rc != CONFACK) /* but prior CI wasnt? */ - continue; /* Don't send this one */ - - if (orc == CONFNAK) { /* Nak this CI? */ - if (reject_if_disagree) /* Getting fed up with sending NAKs? */ - orc = CONFREJ; /* Get tough if so */ - else { - if (rc == CONFREJ) /* Rejecting prior CI? */ - continue; /* Don't send this one */ - if (rc == CONFACK) { /* Ack'd all prior CIs? */ - rc = CONFNAK; /* Not anymore... */ - ucp = inp; /* Backup */ - } - } - } - - if (orc == CONFREJ && /* Reject this CI */ - rc != CONFREJ) { /* but no prior ones? */ - rc = CONFREJ; - ucp = inp; /* Backup */ - } - - /* Need to move CI? */ - if (ucp != cip) - MEMCPY(ucp, cip, cilen); /* Move it */ - - /* Update output pointer */ - INCPTR(cilen, ucp); - } - - /* - * If we aren't rejecting this packet, and we want to negotiate - * their address, and they didn't send their address, then we - * send a NAK with a CI_ADDR option appended. We assume the - * input buffer is long enough that we can append the extra - * option safely. - */ - if (rc != CONFREJ && !ho->neg_addr && !ho->old_addrs && - wo->req_addr && !reject_if_disagree && !pcb->settings.noremoteip) { - if (rc == CONFACK) { - rc = CONFNAK; - ucp = inp; /* reset pointer */ - wo->req_addr = 0; /* don't ask again */ - } - PUTCHAR(CI_ADDR, ucp); - PUTCHAR(CILEN_ADDR, ucp); - tl = lwip_ntohl(wo->hisaddr); - PUTLONG(tl, ucp); - } - - *len = ucp - inp; /* Compute output length */ - IPCPDEBUG(("ipcp: returning Configure-%s", CODENAME(rc))); - return (rc); /* Return final code */ -} - - -#if 0 /* UNUSED */ -/* - * ip_check_options - check that any IP-related options are OK, - * and assign appropriate defaults. - */ -static void -ip_check_options() -{ - struct hostent *hp; - u32_t local; - ipcp_options *wo = &ipcp_wantoptions[0]; - - /* - * Default our local IP address based on our hostname. - * If local IP address already given, don't bother. - */ - if (wo->ouraddr == 0 && !disable_defaultip) { - /* - * Look up our hostname (possibly with domain name appended) - * and take the first IP address as our local IP address. - * If there isn't an IP address for our hostname, too bad. - */ - wo->accept_local = 1; /* don't insist on this default value */ - if ((hp = gethostbyname(hostname)) != NULL) { - local = *(u32_t *)hp->h_addr; - if (local != 0 && !bad_ip_adrs(local)) - wo->ouraddr = local; - } - } - ask_for_local = wo->ouraddr != 0 || !disable_defaultip; -} -#endif /* UNUSED */ - -#if DEMAND_SUPPORT -/* - * ip_demand_conf - configure the interface as though - * IPCP were up, for use with dial-on-demand. - */ -static int -ip_demand_conf(u) - int u; -{ - ppp_pcb *pcb = &ppp_pcb_list[u]; - ipcp_options *wo = &ipcp_wantoptions[u]; - - if (wo->hisaddr == 0 && !pcb->settings.noremoteip) { - /* make up an arbitrary address for the peer */ - wo->hisaddr = lwip_htonl(0x0a707070 + ifunit); - wo->accept_remote = 1; - } - if (wo->ouraddr == 0) { - /* make up an arbitrary address for us */ - wo->ouraddr = lwip_htonl(0x0a404040 + ifunit); - wo->accept_local = 1; - ask_for_local = 0; /* don't tell the peer this address */ - } - if (!sifaddr(pcb, wo->ouraddr, wo->hisaddr, get_mask(wo->ouraddr))) - return 0; - if (!sifup(pcb)) - return 0; - if (!sifnpmode(pcb, PPP_IP, NPMODE_QUEUE)) - return 0; -#if 0 /* UNUSED */ - if (wo->default_route) - if (sifdefaultroute(pcb, wo->ouraddr, wo->hisaddr, - wo->replace_default_route)) - default_route_set[u] = 1; -#endif /* UNUSED */ -#if 0 /* UNUSED - PROXY ARP */ - if (wo->proxy_arp) - if (sifproxyarp(pcb, wo->hisaddr)) - proxy_arp_set[u] = 1; -#endif /* UNUSED - PROXY ARP */ - - ppp_notice("local IP address %I", wo->ouraddr); - if (wo->hisaddr) - ppp_notice("remote IP address %I", wo->hisaddr); - - return 1; -} -#endif /* DEMAND_SUPPORT */ - -/* - * ipcp_up - IPCP has come UP. - * - * Configure the IP network interface appropriately and bring it up. - */ -static void ipcp_up(fsm *f) { - ppp_pcb *pcb = f->pcb; - u32_t mask; - ipcp_options *ho = &pcb->ipcp_hisoptions; - ipcp_options *go = &pcb->ipcp_gotoptions; - ipcp_options *wo = &pcb->ipcp_wantoptions; - - IPCPDEBUG(("ipcp: up")); - - /* - * We must have a non-zero IP address for both ends of the link. - */ - if (!ho->neg_addr && !ho->old_addrs) - ho->hisaddr = wo->hisaddr; - - if (!(go->neg_addr || go->old_addrs) && (wo->neg_addr || wo->old_addrs) - && wo->ouraddr != 0) { - ppp_error("Peer refused to agree to our IP address"); - ipcp_close(f->pcb, "Refused our IP address"); - return; - } - if (go->ouraddr == 0) { - ppp_error("Could not determine local IP address"); - ipcp_close(f->pcb, "Could not determine local IP address"); - return; - } - if (ho->hisaddr == 0 && !pcb->settings.noremoteip) { - ho->hisaddr = lwip_htonl(0x0a404040); - ppp_warn("Could not determine remote IP address: defaulting to %I", - ho->hisaddr); - } -#if 0 /* UNUSED */ - script_setenv("IPLOCAL", ip_ntoa(go->ouraddr), 0); - if (ho->hisaddr != 0) - script_setenv("IPREMOTE", ip_ntoa(ho->hisaddr), 1); -#endif /* UNUSED */ - -#if LWIP_DNS - if (!go->req_dns1) - go->dnsaddr[0] = 0; - if (!go->req_dns2) - go->dnsaddr[1] = 0; -#if 0 /* UNUSED */ - if (go->dnsaddr[0]) - script_setenv("DNS1", ip_ntoa(go->dnsaddr[0]), 0); - if (go->dnsaddr[1]) - script_setenv("DNS2", ip_ntoa(go->dnsaddr[1]), 0); -#endif /* UNUSED */ - if (pcb->settings.usepeerdns && (go->dnsaddr[0] || go->dnsaddr[1])) { - sdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); -#if 0 /* UNUSED */ - script_setenv("USEPEERDNS", "1", 0); - create_resolv(go->dnsaddr[0], go->dnsaddr[1]); -#endif /* UNUSED */ - } -#endif /* LWIP_DNS */ - - /* - * Check that the peer is allowed to use the IP address it wants. - */ - if (ho->hisaddr != 0) { - u32_t addr = lwip_ntohl(ho->hisaddr); - if ((addr >> IP_CLASSA_NSHIFT) == IP_LOOPBACKNET - || IP_MULTICAST(addr) || IP_BADCLASS(addr) - /* - * For now, consider that PPP in server mode with peer required - * to authenticate must provide the peer IP address, reject any - * IP address wanted by peer different than the one we wanted. - */ -#if PPP_SERVER && PPP_AUTH_SUPPORT - || (pcb->settings.auth_required && wo->hisaddr != ho->hisaddr) -#endif /* PPP_SERVER && PPP_AUTH_SUPPORT */ - ) { - ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); - ipcp_close(pcb, "Unauthorized remote IP address"); - return; - } - } -#if 0 /* Unused */ - /* Upstream checking code */ - if (ho->hisaddr != 0 && !auth_ip_addr(f->unit, ho->hisaddr)) { - ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); - ipcp_close(f->unit, "Unauthorized remote IP address"); - return; - } -#endif /* Unused */ - -#if VJ_SUPPORT - /* set tcp compression */ - sifvjcomp(pcb, ho->neg_vj, ho->cflag, ho->maxslotindex); -#endif /* VJ_SUPPORT */ - -#if DEMAND_SUPPORT - /* - * If we are doing dial-on-demand, the interface is already - * configured, so we put out any saved-up packets, then set the - * interface to pass IP packets. - */ - if (demand) { - if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { - ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr, - wo->replace_default_route); - if (go->ouraddr != wo->ouraddr) { - ppp_warn("Local IP address changed to %I", go->ouraddr); - script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); - wo->ouraddr = go->ouraddr; - } else - script_unsetenv("OLDIPLOCAL"); - if (ho->hisaddr != wo->hisaddr && wo->hisaddr != 0) { - ppp_warn("Remote IP address changed to %I", ho->hisaddr); - script_setenv("OLDIPREMOTE", ip_ntoa(wo->hisaddr), 0); - wo->hisaddr = ho->hisaddr; - } else - script_unsetenv("OLDIPREMOTE"); - - /* Set the interface to the new addresses */ - mask = get_mask(go->ouraddr); - if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { -#if PPP_DEBUG - ppp_warn("Interface configuration failed"); -#endif /* PPP_DEBUG */ - ipcp_close(f->unit, "Interface configuration failed"); - return; - } - - /* assign a default route through the interface if required */ - if (ipcp_wantoptions[f->unit].default_route) - if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, - wo->replace_default_route)) - default_route_set[f->unit] = 1; - -#if 0 /* UNUSED - PROXY ARP */ - /* Make a proxy ARP entry if requested. */ - if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp) - if (sifproxyarp(pcb, ho->hisaddr)) - proxy_arp_set[f->unit] = 1; -#endif /* UNUSED - PROXY ARP */ - - } - demand_rexmit(PPP_IP,go->ouraddr); - sifnpmode(pcb, PPP_IP, NPMODE_PASS); - - } else -#endif /* DEMAND_SUPPORT */ - { - /* - * Set IP addresses and (if specified) netmask. - */ - mask = get_mask(go->ouraddr); - -#if !(defined(SVR4) && (defined(SNI) || defined(__USLC__))) - if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { -#if PPP_DEBUG - ppp_warn("Interface configuration failed"); -#endif /* PPP_DEBUG */ - ipcp_close(f->pcb, "Interface configuration failed"); - return; - } -#endif - - /* bring the interface up for IP */ - if (!sifup(pcb)) { -#if PPP_DEBUG - ppp_warn("Interface failed to come up"); -#endif /* PPP_DEBUG */ - ipcp_close(f->pcb, "Interface configuration failed"); - return; - } - -#if (defined(SVR4) && (defined(SNI) || defined(__USLC__))) - if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { -#if PPP_DEBUG - ppp_warn("Interface configuration failed"); -#endif /* PPP_DEBUG */ - ipcp_close(f->unit, "Interface configuration failed"); - return; - } -#endif -#if DEMAND_SUPPORT - sifnpmode(pcb, PPP_IP, NPMODE_PASS); -#endif /* DEMAND_SUPPORT */ - -#if 0 /* UNUSED */ - /* assign a default route through the interface if required */ - if (wo->default_route) - if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, - wo->replace_default_route)) - pcb->default_route_set = 1; -#endif /* UNUSED */ - -#if 0 /* UNUSED - PROXY ARP */ - /* Make a proxy ARP entry if requested. */ - if (ho->hisaddr != 0 && wo->proxy_arp) - if (sifproxyarp(pcb, ho->hisaddr)) - pcb->proxy_arp_set = 1; -#endif /* UNUSED - PROXY ARP */ - - wo->ouraddr = go->ouraddr; - - ppp_notice("local IP address %I", go->ouraddr); - if (ho->hisaddr != 0) - ppp_notice("remote IP address %I", ho->hisaddr); -#if LWIP_DNS - if (go->dnsaddr[0]) - ppp_notice("primary DNS address %I", go->dnsaddr[0]); - if (go->dnsaddr[1]) - ppp_notice("secondary DNS address %I", go->dnsaddr[1]); -#endif /* LWIP_DNS */ - } - -#if PPP_STATS_SUPPORT - reset_link_stats(f->unit); -#endif /* PPP_STATS_SUPPORT */ - - np_up(pcb, PPP_IP); - pcb->ipcp_is_up = 1; - -#if PPP_NOTIFY - notify(ip_up_notifier, 0); -#endif /* PPP_NOTIFY */ -#if 0 /* UNUSED */ - if (ip_up_hook) - ip_up_hook(); -#endif /* UNUSED */ -} - - -/* - * ipcp_down - IPCP has gone DOWN. - * - * Take the IP network interface down, clear its addresses - * and delete routes through it. - */ -static void ipcp_down(fsm *f) { - ppp_pcb *pcb = f->pcb; - ipcp_options *ho = &pcb->ipcp_hisoptions; - ipcp_options *go = &pcb->ipcp_gotoptions; - - IPCPDEBUG(("ipcp: down")); -#if PPP_STATS_SUPPORT - /* XXX a bit IPv4-centric here, we only need to get the stats - * before the interface is marked down. */ - /* XXX more correct: we must get the stats before running the notifiers, - * at least for the radius plugin */ - update_link_stats(f->unit); -#endif /* PPP_STATS_SUPPORT */ -#if PPP_NOTIFY - notify(ip_down_notifier, 0); -#endif /* PPP_NOTIFY */ -#if 0 /* UNUSED */ - if (ip_down_hook) - ip_down_hook(); -#endif /* UNUSED */ - if (pcb->ipcp_is_up) { - pcb->ipcp_is_up = 0; - np_down(pcb, PPP_IP); - } -#if VJ_SUPPORT - sifvjcomp(pcb, 0, 0, 0); -#endif /* VJ_SUPPORT */ - -#if PPP_STATS_SUPPORT - print_link_stats(); /* _after_ running the notifiers and ip_down_hook(), - * because print_link_stats() sets link_stats_valid - * to 0 (zero) */ -#endif /* PPP_STATS_SUPPORT */ - -#if DEMAND_SUPPORT - /* - * If we are doing dial-on-demand, set the interface - * to queue up outgoing packets (for now). - */ - if (demand) { - sifnpmode(pcb, PPP_IP, NPMODE_QUEUE); - } else -#endif /* DEMAND_SUPPORT */ - { -#if DEMAND_SUPPORT - sifnpmode(pcb, PPP_IP, NPMODE_DROP); -#endif /* DEMAND_SUPPORT */ - sifdown(pcb); - ipcp_clear_addrs(pcb, go->ouraddr, - ho->hisaddr, 0); -#if LWIP_DNS - cdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); -#endif /* LWIP_DNS */ - } -} - - -/* - * ipcp_clear_addrs() - clear the interface addresses, routes, - * proxy arp entries, etc. - */ -static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t replacedefaultroute) { - LWIP_UNUSED_ARG(replacedefaultroute); - -#if 0 /* UNUSED - PROXY ARP */ - if (pcb->proxy_arp_set) { - cifproxyarp(pcb, hisaddr); - pcb->proxy_arp_set = 0; - } -#endif /* UNUSED - PROXY ARP */ -#if 0 /* UNUSED */ - /* If replacedefaultroute, sifdefaultroute will be called soon - * with replacedefaultroute set and that will overwrite the current - * default route. This is the case only when doing demand, otherwise - * during demand, this cifdefaultroute would restore the old default - * route which is not what we want in this case. In the non-demand - * case, we'll delete the default route and restore the old if there - * is one saved by an sifdefaultroute with replacedefaultroute. - */ - if (!replacedefaultroute && pcb->default_route_set) { - cifdefaultroute(pcb, ouraddr, hisaddr); - pcb->default_route_set = 0; - } -#endif /* UNUSED */ - cifaddr(pcb, ouraddr, hisaddr); -} - - -/* - * ipcp_finished - possibly shut down the lower layers. - */ -static void ipcp_finished(fsm *f) { - ppp_pcb *pcb = f->pcb; - if (pcb->ipcp_is_open) { - pcb->ipcp_is_open = 0; - np_finished(pcb, PPP_IP); - } -} - - -#if 0 /* UNUSED */ -/* - * create_resolv - create the replacement resolv.conf file - */ -static void -create_resolv(peerdns1, peerdns2) - u32_t peerdns1, peerdns2; -{ - -} -#endif /* UNUSED */ - -#if PRINTPKT_SUPPORT -/* - * ipcp_printpkt - print the contents of an IPCP packet. - */ -static const char* const ipcp_codenames[] = { - "ConfReq", "ConfAck", "ConfNak", "ConfRej", - "TermReq", "TermAck", "CodeRej" -}; - -static int ipcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg) { - int code, id, len, olen; - const u_char *pstart, *optend; -#if VJ_SUPPORT - u_short cishort; -#endif /* VJ_SUPPORT */ - u32_t cilong; - - if (plen < HEADERLEN) - return 0; - pstart = p; - GETCHAR(code, p); - GETCHAR(id, p); - GETSHORT(len, p); - if (len < HEADERLEN || len > plen) - return 0; - - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipcp_codenames)) - printer(arg, " %s", ipcp_codenames[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= HEADERLEN; - switch (code) { - case CONFREQ: - case CONFACK: - case CONFNAK: - case CONFREJ: - /* print option list */ - while (len >= 2) { - GETCHAR(code, p); - GETCHAR(olen, p); - p -= 2; - if (olen < 2 || olen > len) { - break; - } - printer(arg, " <"); - len -= olen; - optend = p + olen; - switch (code) { - case CI_ADDRS: - if (olen == CILEN_ADDRS) { - p += 2; - GETLONG(cilong, p); - printer(arg, "addrs %I", lwip_htonl(cilong)); - GETLONG(cilong, p); - printer(arg, " %I", lwip_htonl(cilong)); - } - break; -#if VJ_SUPPORT - case CI_COMPRESSTYPE: - if (olen >= CILEN_COMPRESS) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "compress "); - switch (cishort) { - case IPCP_VJ_COMP: - printer(arg, "VJ"); - break; - case IPCP_VJ_COMP_OLD: - printer(arg, "old-VJ"); - break; - default: - printer(arg, "0x%x", cishort); - } - } - break; -#endif /* VJ_SUPPORT */ - case CI_ADDR: - if (olen == CILEN_ADDR) { - p += 2; - GETLONG(cilong, p); - printer(arg, "addr %I", lwip_htonl(cilong)); - } - break; -#if LWIP_DNS - case CI_MS_DNS1: - case CI_MS_DNS2: - p += 2; - GETLONG(cilong, p); - printer(arg, "ms-dns%d %I", (code == CI_MS_DNS1? 1: 2), - htonl(cilong)); - break; -#endif /* LWIP_DNS */ -#if 0 /* UNUSED - WINS */ - case CI_MS_WINS1: - case CI_MS_WINS2: - p += 2; - GETLONG(cilong, p); - printer(arg, "ms-wins %I", lwip_htonl(cilong)); - break; -#endif /* UNUSED - WINS */ - default: - break; - } - while (p < optend) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - printer(arg, ">"); - } - break; - - case TERMACK: - case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; - default: - break; - } - - /* print the rest of the bytes in the packet */ - for (; len > 0; --len) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - - return p - pstart; -} -#endif /* PRINTPKT_SUPPORT */ - -#if DEMAND_SUPPORT -/* - * ip_active_pkt - see if this IP packet is worth bringing the link up for. - * We don't bring the link up for IP fragments or for TCP FIN packets - * with no data. - */ -#define IP_HDRLEN 20 /* bytes */ -#define IP_OFFMASK 0x1fff -#ifndef IPPROTO_TCP -#define IPPROTO_TCP 6 -#endif -#define TCP_HDRLEN 20 -#define TH_FIN 0x01 - -/* - * We use these macros because the IP header may be at an odd address, - * and some compilers might use word loads to get th_off or ip_hl. - */ - -#define net_short(x) (((x)[0] << 8) + (x)[1]) -#define get_iphl(x) (((unsigned char *)(x))[0] & 0xF) -#define get_ipoff(x) net_short((unsigned char *)(x) + 6) -#define get_ipproto(x) (((unsigned char *)(x))[9]) -#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) -#define get_tcpflags(x) (((unsigned char *)(x))[13]) - -static int -ip_active_pkt(pkt, len) - u_char *pkt; - int len; -{ - u_char *tcp; - int hlen; - - len -= PPP_HDRLEN; - pkt += PPP_HDRLEN; - if (len < IP_HDRLEN) - return 0; - if ((get_ipoff(pkt) & IP_OFFMASK) != 0) - return 0; - if (get_ipproto(pkt) != IPPROTO_TCP) - return 1; - hlen = get_iphl(pkt) * 4; - if (len < hlen + TCP_HDRLEN) - return 0; - tcp = pkt + hlen; - if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == hlen + get_tcpoff(tcp) * 4) - return 0; - return 1; -} -#endif /* DEMAND_SUPPORT */ - -#endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */ +/* + * ipcp.c - PPP IP Control Protocol. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +/* + * @todo: + */ + +#if 0 /* UNUSED */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/ipcp.h" + +#if 0 /* UNUSED */ +/* global vars */ +u32_t netmask = 0; /* IP netmask to set on interface */ +#endif /* UNUSED */ + +#if 0 /* UNUSED */ +bool disable_defaultip = 0; /* Don't use hostname for default IP adrs */ +#endif /* UNUSED */ + +#if 0 /* moved to ppp_settings */ +bool noremoteip = 0; /* Let him have no IP address */ +#endif /* moved to ppp_setting */ + +#if 0 /* UNUSED */ +/* Hook for a plugin to know when IP protocol has come up */ +void (*ip_up_hook) (void) = NULL; + +/* Hook for a plugin to know when IP protocol has come down */ +void (*ip_down_hook) (void) = NULL; + +/* Hook for a plugin to choose the remote IP address */ +void (*ip_choose_hook) (u32_t *) = NULL; +#endif /* UNUSED */ + +#if PPP_NOTIFY +/* Notifiers for when IPCP goes up and down */ +struct notifier *ip_up_notifier = NULL; +struct notifier *ip_down_notifier = NULL; +#endif /* PPP_NOTIFY */ + +/* local vars */ +#if 0 /* moved to ppp_pcb */ +static int default_route_set[NUM_PPP]; /* Have set up a default route */ +static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */ +static int ipcp_is_up; /* have called np_up() */ +static int ipcp_is_open; /* haven't called np_finished() */ +static bool ask_for_local; /* request our address from peer */ +#endif /* moved to ppp_pcb */ +#if 0 /* UNUSED */ +static char vj_value[8]; /* string form of vj option value */ +static char netmask_str[20]; /* string form of netmask value */ +#endif /* UNUSED */ + +/* + * Callbacks for fsm code. (CI = Configuration Information) + */ +static void ipcp_resetci(fsm *f); /* Reset our CI */ +static int ipcp_cilen(fsm *f); /* Return length of our CI */ +static void ipcp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI */ +static int ipcp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ +static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject);/* Peer nak'd our CI */ +static int ipcp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ +static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree); /* Rcv CI */ +static void ipcp_up(fsm *f); /* We're UP */ +static void ipcp_down(fsm *f); /* We're DOWN */ +static void ipcp_finished(fsm *f); /* Don't need lower layer */ + +static const fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */ + ipcp_resetci, /* Reset our Configuration Information */ + ipcp_cilen, /* Length of our Configuration Information */ + ipcp_addci, /* Add our Configuration Information */ + ipcp_ackci, /* ACK our Configuration Information */ + ipcp_nakci, /* NAK our Configuration Information */ + ipcp_rejci, /* Reject our Configuration Information */ + ipcp_reqci, /* Request peer's Configuration Information */ + ipcp_up, /* Called when fsm reaches OPENED state */ + ipcp_down, /* Called when fsm leaves OPENED state */ + NULL, /* Called when we want the lower layer up */ + ipcp_finished, /* Called when we want the lower layer down */ + NULL, /* Called when Protocol-Reject received */ + NULL, /* Retransmission is necessary */ + NULL, /* Called to handle protocol-specific codes */ + "IPCP" /* String name of protocol */ +}; + +/* + * Command-line options. + */ +#if PPP_OPTIONS +static int setvjslots (char **); +static int setdnsaddr (char **); +static int setwinsaddr (char **); +static int setnetmask (char **); +int setipaddr (char *, char **, int); + +static void printipaddr (option_t *, void (*)(void *, char *,...),void *); + +static option_t ipcp_option_list[] = { + { "noip", o_bool, &ipcp_protent.enabled_flag, + "Disable IP and IPCP" }, + { "-ip", o_bool, &ipcp_protent.enabled_flag, + "Disable IP and IPCP", OPT_ALIAS }, + + { "novj", o_bool, &ipcp_wantoptions[0].neg_vj, + "Disable VJ compression", OPT_A2CLR, &ipcp_allowoptions[0].neg_vj }, + { "-vj", o_bool, &ipcp_wantoptions[0].neg_vj, + "Disable VJ compression", OPT_ALIAS | OPT_A2CLR, + &ipcp_allowoptions[0].neg_vj }, + + { "novjccomp", o_bool, &ipcp_wantoptions[0].cflag, + "Disable VJ connection-ID compression", OPT_A2CLR, + &ipcp_allowoptions[0].cflag }, + { "-vjccomp", o_bool, &ipcp_wantoptions[0].cflag, + "Disable VJ connection-ID compression", OPT_ALIAS | OPT_A2CLR, + &ipcp_allowoptions[0].cflag }, + + { "vj-max-slots", o_special, (void *)setvjslots, + "Set maximum VJ header slots", + OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, vj_value }, + + { "ipcp-accept-local", o_bool, &ipcp_wantoptions[0].accept_local, + "Accept peer's address for us", 1 }, + { "ipcp-accept-remote", o_bool, &ipcp_wantoptions[0].accept_remote, + "Accept peer's address for it", 1 }, + + { "ipparam", o_string, &ipparam, + "Set ip script parameter", OPT_PRIO }, + + { "noipdefault", o_bool, &disable_defaultip, + "Don't use name for default IP adrs", 1 }, + + { "ms-dns", 1, (void *)setdnsaddr, + "DNS address for the peer's use" }, + { "ms-wins", 1, (void *)setwinsaddr, + "Nameserver for SMB over TCP/IP for peer" }, + + { "ipcp-restart", o_int, &ipcp_fsm[0].timeouttime, + "Set timeout for IPCP", OPT_PRIO }, + { "ipcp-max-terminate", o_int, &ipcp_fsm[0].maxtermtransmits, + "Set max #xmits for term-reqs", OPT_PRIO }, + { "ipcp-max-configure", o_int, &ipcp_fsm[0].maxconfreqtransmits, + "Set max #xmits for conf-reqs", OPT_PRIO }, + { "ipcp-max-failure", o_int, &ipcp_fsm[0].maxnakloops, + "Set max #conf-naks for IPCP", OPT_PRIO }, + + { "defaultroute", o_bool, &ipcp_wantoptions[0].default_route, + "Add default route", OPT_ENABLE|1, &ipcp_allowoptions[0].default_route }, + { "nodefaultroute", o_bool, &ipcp_allowoptions[0].default_route, + "disable defaultroute option", OPT_A2CLR, + &ipcp_wantoptions[0].default_route }, + { "-defaultroute", o_bool, &ipcp_allowoptions[0].default_route, + "disable defaultroute option", OPT_ALIAS | OPT_A2CLR, + &ipcp_wantoptions[0].default_route }, + + { "replacedefaultroute", o_bool, + &ipcp_wantoptions[0].replace_default_route, + "Replace default route", 1 + }, + { "noreplacedefaultroute", o_bool, + &ipcp_allowoptions[0].replace_default_route, + "Never replace default route", OPT_A2COPY, + &ipcp_wantoptions[0].replace_default_route }, + { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, + "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, + { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, + "disable proxyarp option", OPT_A2CLR, + &ipcp_wantoptions[0].proxy_arp }, + { "-proxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, + "disable proxyarp option", OPT_ALIAS | OPT_A2CLR, + &ipcp_wantoptions[0].proxy_arp }, + + { "usepeerdns", o_bool, &usepeerdns, + "Ask peer for DNS address(es)", 1 }, + + { "netmask", o_special, (void *)setnetmask, + "set netmask", OPT_PRIO | OPT_A2STRVAL | OPT_STATIC, netmask_str }, + + { "ipcp-no-addresses", o_bool, &ipcp_wantoptions[0].old_addrs, + "Disable old-style IP-Addresses usage", OPT_A2CLR, + &ipcp_allowoptions[0].old_addrs }, + { "ipcp-no-address", o_bool, &ipcp_wantoptions[0].neg_addr, + "Disable IP-Address usage", OPT_A2CLR, + &ipcp_allowoptions[0].neg_addr }, + + { "noremoteip", o_bool, &noremoteip, + "Allow peer to have no IP address", 1 }, + + { "nosendip", o_bool, &ipcp_wantoptions[0].neg_addr, + "Don't send our IP address to peer", OPT_A2CLR, + &ipcp_wantoptions[0].old_addrs}, + + { "IP addresses", o_wild, (void *) &setipaddr, + "set local and remote IP addresses", + OPT_NOARG | OPT_A2PRINTER, (void *) &printipaddr }, + + { NULL } +}; +#endif /* PPP_OPTIONS */ + +/* + * Protocol entry points from main code. + */ +static void ipcp_init(ppp_pcb *pcb); +static void ipcp_open(ppp_pcb *pcb); +static void ipcp_close(ppp_pcb *pcb, const char *reason); +static void ipcp_lowerup(ppp_pcb *pcb); +static void ipcp_lowerdown(ppp_pcb *pcb); +static void ipcp_input(ppp_pcb *pcb, u_char *p, int len); +static void ipcp_protrej(ppp_pcb *pcb); +#if PRINTPKT_SUPPORT +static int ipcp_printpkt(const u_char *p, int plen, + void (*printer) (void *, const char *, ...), void *arg); +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS +static void ip_check_options (void); +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT +static int ip_demand_conf (int); +static int ip_active_pkt (u_char *, int); +#endif /* DEMAND_SUPPORT */ +#if 0 /* UNUSED */ +static void create_resolv (u32_t, u32_t); +#endif /* UNUSED */ + +const struct protent ipcp_protent = { + PPP_IPCP, + ipcp_init, + ipcp_input, + ipcp_protrej, + ipcp_lowerup, + ipcp_lowerdown, + ipcp_open, + ipcp_close, +#if PRINTPKT_SUPPORT + ipcp_printpkt, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + NULL, +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "IPCP", + "IP", +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + ipcp_option_list, + ip_check_options, +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + ip_demand_conf, + ip_active_pkt +#endif /* DEMAND_SUPPORT */ +}; + +static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t replacedefaultroute); + +/* + * Lengths of configuration options. + */ +#define CILEN_VOID 2 +#define CILEN_COMPRESS 4 /* min length for compression protocol opt. */ +#define CILEN_VJ 6 /* length for RFC1332 Van-Jacobson opt. */ +#define CILEN_ADDR 6 /* new-style single address option */ +#define CILEN_ADDRS 10 /* old-style dual address option */ + + +#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ + (x) == CONFNAK ? "NAK" : "REJ") + +#if 0 /* UNUSED, already defined by lwIP */ +/* + * Make a string representation of a network IP address. + */ +char * +ip_ntoa(ipaddr) +u32_t ipaddr; +{ + static char b[64]; + + slprintf(b, sizeof(b), "%I", ipaddr); + return b; +} +#endif /* UNUSED, already defined by lwIP */ + +/* + * Option parsing. + */ +#if PPP_OPTIONS +/* + * setvjslots - set maximum number of connection slots for VJ compression + */ +static int +setvjslots(argv) + char **argv; +{ + int value; + + if (!int_option(*argv, &value)) + return 0; + + if (value < 2 || value > 16) { + option_error("vj-max-slots value must be between 2 and 16"); + return 0; + } + ipcp_wantoptions [0].maxslotindex = + ipcp_allowoptions[0].maxslotindex = value - 1; + slprintf(vj_value, sizeof(vj_value), "%d", value); + return 1; +} + +/* + * setdnsaddr - set the dns address(es) + */ +static int +setdnsaddr(argv) + char **argv; +{ + u32_t dns; + struct hostent *hp; + + dns = inet_addr(*argv); + if (dns == (u32_t) -1) { + if ((hp = gethostbyname(*argv)) == NULL) { + option_error("invalid address parameter '%s' for ms-dns option", + *argv); + return 0; + } + dns = *(u32_t *)hp->h_addr; + } + + /* We take the last 2 values given, the 2nd-last as the primary + and the last as the secondary. If only one is given it + becomes both primary and secondary. */ + if (ipcp_allowoptions[0].dnsaddr[1] == 0) + ipcp_allowoptions[0].dnsaddr[0] = dns; + else + ipcp_allowoptions[0].dnsaddr[0] = ipcp_allowoptions[0].dnsaddr[1]; + + /* always set the secondary address value. */ + ipcp_allowoptions[0].dnsaddr[1] = dns; + + return (1); +} + +/* + * setwinsaddr - set the wins address(es) + * This is primrarly used with the Samba package under UNIX or for pointing + * the caller to the existing WINS server on a Windows NT platform. + */ +static int +setwinsaddr(argv) + char **argv; +{ + u32_t wins; + struct hostent *hp; + + wins = inet_addr(*argv); + if (wins == (u32_t) -1) { + if ((hp = gethostbyname(*argv)) == NULL) { + option_error("invalid address parameter '%s' for ms-wins option", + *argv); + return 0; + } + wins = *(u32_t *)hp->h_addr; + } + + /* We take the last 2 values given, the 2nd-last as the primary + and the last as the secondary. If only one is given it + becomes both primary and secondary. */ + if (ipcp_allowoptions[0].winsaddr[1] == 0) + ipcp_allowoptions[0].winsaddr[0] = wins; + else + ipcp_allowoptions[0].winsaddr[0] = ipcp_allowoptions[0].winsaddr[1]; + + /* always set the secondary address value. */ + ipcp_allowoptions[0].winsaddr[1] = wins; + + return (1); +} + +/* + * setipaddr - Set the IP address + * If doit is 0, the call is to check whether this option is + * potentially an IP address specification. + * Not static so that plugins can call it to set the addresses + */ +int +setipaddr(arg, argv, doit) + char *arg; + char **argv; + int doit; +{ + struct hostent *hp; + char *colon; + u32_t local, remote; + ipcp_options *wo = &ipcp_wantoptions[0]; + static int prio_local = 0, prio_remote = 0; + + /* + * IP address pair separated by ":". + */ + if ((colon = strchr(arg, ':')) == NULL) + return 0; + if (!doit) + return 1; + + /* + * If colon first character, then no local addr. + */ + if (colon != arg && option_priority >= prio_local) { + *colon = '\0'; + if ((local = inet_addr(arg)) == (u32_t) -1) { + if ((hp = gethostbyname(arg)) == NULL) { + option_error("unknown host: %s", arg); + return 0; + } + local = *(u32_t *)hp->h_addr; + } + if (bad_ip_adrs(local)) { + option_error("bad local IP address %s", ip_ntoa(local)); + return 0; + } + if (local != 0) + wo->ouraddr = local; + *colon = ':'; + prio_local = option_priority; + } + + /* + * If colon last character, then no remote addr. + */ + if (*++colon != '\0' && option_priority >= prio_remote) { + if ((remote = inet_addr(colon)) == (u32_t) -1) { + if ((hp = gethostbyname(colon)) == NULL) { + option_error("unknown host: %s", colon); + return 0; + } + remote = *(u32_t *)hp->h_addr; + if (remote_name[0] == 0) + strlcpy(remote_name, colon, sizeof(remote_name)); + } + if (bad_ip_adrs(remote)) { + option_error("bad remote IP address %s", ip_ntoa(remote)); + return 0; + } + if (remote != 0) + wo->hisaddr = remote; + prio_remote = option_priority; + } + + return 1; +} + +static void +printipaddr(opt, printer, arg) + option_t *opt; + void (*printer) (void *, char *, ...); + void *arg; +{ + ipcp_options *wo = &ipcp_wantoptions[0]; + + if (wo->ouraddr != 0) + printer(arg, "%I", wo->ouraddr); + printer(arg, ":"); + if (wo->hisaddr != 0) + printer(arg, "%I", wo->hisaddr); +} + +/* + * setnetmask - set the netmask to be used on the interface. + */ +static int +setnetmask(argv) + char **argv; +{ + u32_t mask; + int n; + char *p; + + /* + * Unfortunately, if we use inet_addr, we can't tell whether + * a result of all 1s is an error or a valid 255.255.255.255. + */ + p = *argv; + n = parse_dotted_ip(p, &mask); + + mask = lwip_htonl(mask); + + if (n == 0 || p[n] != 0 || (netmask & ~mask) != 0) { + option_error("invalid netmask value '%s'", *argv); + return 0; + } + + netmask = mask; + slprintf(netmask_str, sizeof(netmask_str), "%I", mask); + + return (1); +} + +int +parse_dotted_ip(p, vp) + char *p; + u32_t *vp; +{ + int n; + u32_t v, b; + char *endp, *p0 = p; + + v = 0; + for (n = 3;; --n) { + b = strtoul(p, &endp, 0); + if (endp == p) + return 0; + if (b > 255) { + if (n < 3) + return 0; + /* accept e.g. 0xffffff00 */ + *vp = b; + return endp - p0; + } + v |= b << (n * 8); + p = endp; + if (n == 0) + break; + if (*p != '.') + return 0; + ++p; + } + *vp = v; + return p - p0; +} +#endif /* PPP_OPTIONS */ + +/* + * ipcp_init - Initialize IPCP. + */ +static void ipcp_init(ppp_pcb *pcb) { + fsm *f = &pcb->ipcp_fsm; + + ipcp_options *wo = &pcb->ipcp_wantoptions; + ipcp_options *ao = &pcb->ipcp_allowoptions; + + f->pcb = pcb; + f->protocol = PPP_IPCP; + f->callbacks = &ipcp_callbacks; + fsm_init(f); + + /* + * Some 3G modems use repeated IPCP NAKs as a way of stalling + * until they can contact a server on the network, so we increase + * the default number of NAKs we accept before we start treating + * them as rejects. + */ + f->maxnakloops = 100; + +#if 0 /* Not necessary, everything is cleared in ppp_new() */ + memset(wo, 0, sizeof(*wo)); + memset(ao, 0, sizeof(*ao)); +#endif /* 0 */ + + wo->neg_addr = wo->old_addrs = 1; +#if VJ_SUPPORT + wo->neg_vj = 1; + wo->vj_protocol = IPCP_VJ_COMP; + wo->maxslotindex = MAX_STATES - 1; /* really max index */ + wo->cflag = 1; +#endif /* VJ_SUPPORT */ + +#if 0 /* UNUSED */ + /* wanting default route by default */ + wo->default_route = 1; +#endif /* UNUSED */ + + ao->neg_addr = ao->old_addrs = 1; +#if VJ_SUPPORT + /* max slots and slot-id compression are currently hardwired in */ + /* ppp_if.c to 16 and 1, this needs to be changed (among other */ + /* things) gmc */ + + ao->neg_vj = 1; + ao->maxslotindex = MAX_STATES - 1; + ao->cflag = 1; +#endif /* #if VJ_SUPPORT */ + +#if 0 /* UNUSED */ + /* + * XXX These control whether the user may use the proxyarp + * and defaultroute options. + */ + ao->proxy_arp = 1; + ao->default_route = 1; +#endif /* UNUSED */ +} + + +/* + * ipcp_open - IPCP is allowed to come up. + */ +static void ipcp_open(ppp_pcb *pcb) { + fsm *f = &pcb->ipcp_fsm; + fsm_open(f); + pcb->ipcp_is_open = 1; +} + + +/* + * ipcp_close - Take IPCP down. + */ +static void ipcp_close(ppp_pcb *pcb, const char *reason) { + fsm *f = &pcb->ipcp_fsm; + fsm_close(f, reason); +} + + +/* + * ipcp_lowerup - The lower layer is up. + */ +static void ipcp_lowerup(ppp_pcb *pcb) { + fsm *f = &pcb->ipcp_fsm; + fsm_lowerup(f); +} + + +/* + * ipcp_lowerdown - The lower layer is down. + */ +static void ipcp_lowerdown(ppp_pcb *pcb) { + fsm *f = &pcb->ipcp_fsm; + fsm_lowerdown(f); +} + + +/* + * ipcp_input - Input IPCP packet. + */ +static void ipcp_input(ppp_pcb *pcb, u_char *p, int len) { + fsm *f = &pcb->ipcp_fsm; + fsm_input(f, p, len); +} + + +/* + * ipcp_protrej - A Protocol-Reject was received for IPCP. + * + * Pretend the lower layer went down, so we shut up. + */ +static void ipcp_protrej(ppp_pcb *pcb) { + fsm *f = &pcb->ipcp_fsm; + fsm_lowerdown(f); +} + + +/* + * ipcp_resetci - Reset our CI. + * Called by fsm_sconfreq, Send Configure Request. + */ +static void ipcp_resetci(fsm *f) { + ppp_pcb *pcb = f->pcb; + ipcp_options *wo = &pcb->ipcp_wantoptions; + ipcp_options *go = &pcb->ipcp_gotoptions; + ipcp_options *ao = &pcb->ipcp_allowoptions; + + wo->req_addr = (wo->neg_addr || wo->old_addrs) && + (ao->neg_addr || ao->old_addrs); + if (wo->ouraddr == 0) + wo->accept_local = 1; + if (wo->hisaddr == 0) + wo->accept_remote = 1; +#if LWIP_DNS + wo->req_dns1 = wo->req_dns2 = pcb->settings.usepeerdns; /* Request DNS addresses from the peer */ +#endif /* LWIP_DNS */ + *go = *wo; + if (!pcb->ask_for_local) + go->ouraddr = 0; +#if 0 /* UNUSED */ + if (ip_choose_hook) { + ip_choose_hook(&wo->hisaddr); + if (wo->hisaddr) { + wo->accept_remote = 0; + } + } +#endif /* UNUSED */ + BZERO(&pcb->ipcp_hisoptions, sizeof(ipcp_options)); +} + + +/* + * ipcp_cilen - Return length of our CI. + * Called by fsm_sconfreq, Send Configure Request. + */ +static int ipcp_cilen(fsm *f) { + ppp_pcb *pcb = f->pcb; + ipcp_options *go = &pcb->ipcp_gotoptions; +#if VJ_SUPPORT + ipcp_options *wo = &pcb->ipcp_wantoptions; +#endif /* VJ_SUPPORT */ + ipcp_options *ho = &pcb->ipcp_hisoptions; + +#define LENCIADDRS(neg) (neg ? CILEN_ADDRS : 0) +#if VJ_SUPPORT +#define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0) +#endif /* VJ_SUPPORT */ +#define LENCIADDR(neg) (neg ? CILEN_ADDR : 0) +#if LWIP_DNS +#define LENCIDNS(neg) LENCIADDR(neg) +#endif /* LWIP_DNS */ +#if 0 /* UNUSED - WINS */ +#define LENCIWINS(neg) LENCIADDR(neg) +#endif /* UNUSED - WINS */ + + /* + * First see if we want to change our options to the old + * forms because we have received old forms from the peer. + */ + if (go->neg_addr && go->old_addrs && !ho->neg_addr && ho->old_addrs) + go->neg_addr = 0; + +#if VJ_SUPPORT + if (wo->neg_vj && !go->neg_vj && !go->old_vj) { + /* try an older style of VJ negotiation */ + /* use the old style only if the peer did */ + if (ho->neg_vj && ho->old_vj) { + go->neg_vj = 1; + go->old_vj = 1; + go->vj_protocol = ho->vj_protocol; + } + } +#endif /* VJ_SUPPORT */ + + return (LENCIADDRS(!go->neg_addr && go->old_addrs) + +#if VJ_SUPPORT + LENCIVJ(go->neg_vj, go->old_vj) + +#endif /* VJ_SUPPORT */ + LENCIADDR(go->neg_addr) + +#if LWIP_DNS + LENCIDNS(go->req_dns1) + + LENCIDNS(go->req_dns2) + +#endif /* LWIP_DNS */ +#if 0 /* UNUSED - WINS */ + LENCIWINS(go->winsaddr[0]) + + LENCIWINS(go->winsaddr[1]) + +#endif /* UNUSED - WINS */ + 0); +} + + +/* + * ipcp_addci - Add our desired CIs to a packet. + * Called by fsm_sconfreq, Send Configure Request. + */ +static void ipcp_addci(fsm *f, u_char *ucp, int *lenp) { + ppp_pcb *pcb = f->pcb; + ipcp_options *go = &pcb->ipcp_gotoptions; + int len = *lenp; + +#define ADDCIADDRS(opt, neg, val1, val2) \ + if (neg) { \ + if (len >= CILEN_ADDRS) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDRS, ucp); \ + l = lwip_ntohl(val1); \ + PUTLONG(l, ucp); \ + l = lwip_ntohl(val2); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDRS; \ + } else \ + go->old_addrs = 0; \ + } + +#if VJ_SUPPORT +#define ADDCIVJ(opt, neg, val, old, maxslotindex, cflag) \ + if (neg) { \ + int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ + if (len >= vjlen) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(vjlen, ucp); \ + PUTSHORT(val, ucp); \ + if (!old) { \ + PUTCHAR(maxslotindex, ucp); \ + PUTCHAR(cflag, ucp); \ + } \ + len -= vjlen; \ + } else \ + neg = 0; \ + } +#endif /* VJ_SUPPORT */ + +#define ADDCIADDR(opt, neg, val) \ + if (neg) { \ + if (len >= CILEN_ADDR) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDR, ucp); \ + l = lwip_ntohl(val); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDR; \ + } else \ + neg = 0; \ + } + +#if LWIP_DNS +#define ADDCIDNS(opt, neg, addr) \ + if (neg) { \ + if (len >= CILEN_ADDR) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDR, ucp); \ + l = lwip_ntohl(addr); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDR; \ + } else \ + neg = 0; \ + } +#endif /* LWIP_DNS */ + +#if 0 /* UNUSED - WINS */ +#define ADDCIWINS(opt, addr) \ + if (addr) { \ + if (len >= CILEN_ADDR) { \ + u32_t l; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_ADDR, ucp); \ + l = lwip_ntohl(addr); \ + PUTLONG(l, ucp); \ + len -= CILEN_ADDR; \ + } else \ + addr = 0; \ + } +#endif /* UNUSED - WINS */ + + ADDCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr, + go->hisaddr); + +#if VJ_SUPPORT + ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj, + go->maxslotindex, go->cflag); +#endif /* VJ_SUPPORT */ + + ADDCIADDR(CI_ADDR, go->neg_addr, go->ouraddr); + +#if LWIP_DNS + ADDCIDNS(CI_MS_DNS1, go->req_dns1, go->dnsaddr[0]); + + ADDCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]); +#endif /* LWIP_DNS */ + +#if 0 /* UNUSED - WINS */ + ADDCIWINS(CI_MS_WINS1, go->winsaddr[0]); + + ADDCIWINS(CI_MS_WINS2, go->winsaddr[1]); +#endif /* UNUSED - WINS */ + + *lenp -= len; +} + + +/* + * ipcp_ackci - Ack our CIs. + * Called by fsm_rconfack, Receive Configure ACK. + * + * Returns: + * 0 - Ack was bad. + * 1 - Ack was good. + */ +static int ipcp_ackci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + ipcp_options *go = &pcb->ipcp_gotoptions; + u_short cilen, citype; + u32_t cilong; +#if VJ_SUPPORT + u_short cishort; + u_char cimaxslotindex, cicflag; +#endif /* VJ_SUPPORT */ + + /* + * CIs must be in exactly the same order that we sent... + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ + +#define ACKCIADDRS(opt, neg, val1, val2) \ + if (neg) { \ + u32_t l; \ + if ((len -= CILEN_ADDRS) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDRS || \ + citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (val1 != cilong) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (val2 != cilong) \ + goto bad; \ + } + +#if VJ_SUPPORT +#define ACKCIVJ(opt, neg, val, old, maxslotindex, cflag) \ + if (neg) { \ + int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \ + if ((len -= vjlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != vjlen || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != val) \ + goto bad; \ + if (!old) { \ + GETCHAR(cimaxslotindex, p); \ + if (cimaxslotindex != maxslotindex) \ + goto bad; \ + GETCHAR(cicflag, p); \ + if (cicflag != cflag) \ + goto bad; \ + } \ + } +#endif /* VJ_SUPPORT */ + +#define ACKCIADDR(opt, neg, val) \ + if (neg) { \ + u32_t l; \ + if ((len -= CILEN_ADDR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDR || \ + citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (val != cilong) \ + goto bad; \ + } + +#if LWIP_DNS +#define ACKCIDNS(opt, neg, addr) \ + if (neg) { \ + u32_t l; \ + if ((len -= CILEN_ADDR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDR || citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (addr != cilong) \ + goto bad; \ + } +#endif /* LWIP_DNS */ + +#if 0 /* UNUSED - WINS */ +#define ACKCIWINS(opt, addr) \ + if (addr) { \ + u32_t l; \ + if ((len -= CILEN_ADDR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_ADDR || citype != opt) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + if (addr != cilong) \ + goto bad; \ + } +#endif /* UNUSED - WINS */ + + ACKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr, + go->hisaddr); + +#if VJ_SUPPORT + ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj, + go->maxslotindex, go->cflag); +#endif /* VJ_SUPPORT */ + + ACKCIADDR(CI_ADDR, go->neg_addr, go->ouraddr); + +#if LWIP_DNS + ACKCIDNS(CI_MS_DNS1, go->req_dns1, go->dnsaddr[0]); + + ACKCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]); +#endif /* LWIP_DNS */ + +#if 0 /* UNUSED - WINS */ + ACKCIWINS(CI_MS_WINS1, go->winsaddr[0]); + + ACKCIWINS(CI_MS_WINS2, go->winsaddr[1]); +#endif /* UNUSED - WINS */ + + /* + * If there are any remaining CIs, then this packet is bad. + */ + if (len != 0) + goto bad; + return (1); + +bad: + IPCPDEBUG(("ipcp_ackci: received bad Ack!")); + return (0); +} + +/* + * ipcp_nakci - Peer has sent a NAK for some of our CIs. + * This should not modify any state if the Nak is bad + * or if IPCP is in the OPENED state. + * Calback from fsm_rconfnakrej - Receive Configure-Nak or Configure-Reject. + * + * Returns: + * 0 - Nak was bad. + * 1 - Nak was good. + */ +static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { + ppp_pcb *pcb = f->pcb; + ipcp_options *go = &pcb->ipcp_gotoptions; + u_char citype, cilen, *next; +#if VJ_SUPPORT + u_char cimaxslotindex, cicflag; + u_short cishort; +#endif /* VJ_SUPPORT */ + u32_t ciaddr1, ciaddr2, l; +#if LWIP_DNS + u32_t cidnsaddr; +#endif /* LWIP_DNS */ + ipcp_options no; /* options we've seen Naks for */ + ipcp_options try_; /* options to request next time */ + + BZERO(&no, sizeof(no)); + try_ = *go; + + /* + * Any Nak'd CIs must be in exactly the same order that we sent. + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ +#define NAKCIADDRS(opt, neg, code) \ + if ((neg) && \ + (cilen = p[1]) == CILEN_ADDRS && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + ciaddr1 = lwip_htonl(l); \ + GETLONG(l, p); \ + ciaddr2 = lwip_htonl(l); \ + no.old_addrs = 1; \ + code \ + } + +#if VJ_SUPPORT +#define NAKCIVJ(opt, neg, code) \ + if (go->neg && \ + ((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + no.neg = 1; \ + code \ + } +#endif /* VJ_SUPPORT */ + +#define NAKCIADDR(opt, neg, code) \ + if (go->neg && \ + (cilen = p[1]) == CILEN_ADDR && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + ciaddr1 = lwip_htonl(l); \ + no.neg = 1; \ + code \ + } + +#if LWIP_DNS +#define NAKCIDNS(opt, neg, code) \ + if (go->neg && \ + ((cilen = p[1]) == CILEN_ADDR) && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cidnsaddr = lwip_htonl(l); \ + no.neg = 1; \ + code \ + } +#endif /* LWIP_DNS */ + + /* + * Accept the peer's idea of {our,his} address, if different + * from our idea, only if the accept_{local,remote} flag is set. + */ + NAKCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, + if (treat_as_reject) { + try_.old_addrs = 0; + } else { + if (go->accept_local && ciaddr1) { + /* take his idea of our address */ + try_.ouraddr = ciaddr1; + } + if (go->accept_remote && ciaddr2) { + /* take his idea of his address */ + try_.hisaddr = ciaddr2; + } + } + ); + +#if VJ_SUPPORT + /* + * Accept the peer's value of maxslotindex provided that it + * is less than what we asked for. Turn off slot-ID compression + * if the peer wants. Send old-style compress-type option if + * the peer wants. + */ + NAKCIVJ(CI_COMPRESSTYPE, neg_vj, + if (treat_as_reject) { + try_.neg_vj = 0; + } else if (cilen == CILEN_VJ) { + GETCHAR(cimaxslotindex, p); + GETCHAR(cicflag, p); + if (cishort == IPCP_VJ_COMP) { + try_.old_vj = 0; + if (cimaxslotindex < go->maxslotindex) + try_.maxslotindex = cimaxslotindex; + if (!cicflag) + try_.cflag = 0; + } else { + try_.neg_vj = 0; + } + } else { + if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) { + try_.old_vj = 1; + try_.vj_protocol = cishort; + } else { + try_.neg_vj = 0; + } + } + ); +#endif /* VJ_SUPPORT */ + + NAKCIADDR(CI_ADDR, neg_addr, + if (treat_as_reject) { + try_.neg_addr = 0; + try_.old_addrs = 0; + } else if (go->accept_local && ciaddr1) { + /* take his idea of our address */ + try_.ouraddr = ciaddr1; + } + ); + +#if LWIP_DNS + NAKCIDNS(CI_MS_DNS1, req_dns1, + if (treat_as_reject) { + try_.req_dns1 = 0; + } else { + try_.dnsaddr[0] = cidnsaddr; + } + ); + + NAKCIDNS(CI_MS_DNS2, req_dns2, + if (treat_as_reject) { + try_.req_dns2 = 0; + } else { + try_.dnsaddr[1] = cidnsaddr; + } + ); +#endif /* #if LWIP_DNS */ + + /* + * There may be remaining CIs, if the peer is requesting negotiation + * on an option that we didn't include in our request packet. + * If they want to negotiate about IP addresses, we comply. + * If they want us to ask for compression, we refuse. + * If they want us to ask for ms-dns, we do that, since some + * peers get huffy if we don't. + */ + while (len >= CILEN_VOID) { + GETCHAR(citype, p); + GETCHAR(cilen, p); + if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) + goto bad; + next = p + cilen - 2; + + switch (citype) { +#if VJ_SUPPORT + case CI_COMPRESSTYPE: + if (go->neg_vj || no.neg_vj || + (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) + goto bad; + no.neg_vj = 1; + break; +#endif /* VJ_SUPPORT */ + case CI_ADDRS: + if ((!go->neg_addr && go->old_addrs) || no.old_addrs + || cilen != CILEN_ADDRS) + goto bad; + try_.neg_addr = 0; + GETLONG(l, p); + ciaddr1 = lwip_htonl(l); + if (ciaddr1 && go->accept_local) + try_.ouraddr = ciaddr1; + GETLONG(l, p); + ciaddr2 = lwip_htonl(l); + if (ciaddr2 && go->accept_remote) + try_.hisaddr = ciaddr2; + no.old_addrs = 1; + break; + case CI_ADDR: + if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR) + goto bad; + try_.old_addrs = 0; + GETLONG(l, p); + ciaddr1 = lwip_htonl(l); + if (ciaddr1 && go->accept_local) + try_.ouraddr = ciaddr1; + if (try_.ouraddr != 0) + try_.neg_addr = 1; + no.neg_addr = 1; + break; +#if LWIP_DNS + case CI_MS_DNS1: + if (go->req_dns1 || no.req_dns1 || cilen != CILEN_ADDR) + goto bad; + GETLONG(l, p); + try_.dnsaddr[0] = lwip_htonl(l); + try_.req_dns1 = 1; + no.req_dns1 = 1; + break; + case CI_MS_DNS2: + if (go->req_dns2 || no.req_dns2 || cilen != CILEN_ADDR) + goto bad; + GETLONG(l, p); + try_.dnsaddr[1] = lwip_htonl(l); + try_.req_dns2 = 1; + no.req_dns2 = 1; + break; +#endif /* LWIP_DNS */ +#if 0 /* UNUSED - WINS */ + case CI_MS_WINS1: + case CI_MS_WINS2: + if (cilen != CILEN_ADDR) + goto bad; + GETLONG(l, p); + ciaddr1 = lwip_htonl(l); + if (ciaddr1) + try_.winsaddr[citype == CI_MS_WINS2] = ciaddr1; + break; +#endif /* UNUSED - WINS */ + default: + break; + } + p = next; + } + + /* + * OK, the Nak is good. Now we can update state. + * If there are any remaining options, we ignore them. + */ + if (f->state != PPP_FSM_OPENED) + *go = try_; + + return 1; + +bad: + IPCPDEBUG(("ipcp_nakci: received bad Nak!")); + return 0; +} + + +/* + * ipcp_rejci - Reject some of our CIs. + * Callback from fsm_rconfnakrej. + */ +static int ipcp_rejci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + ipcp_options *go = &pcb->ipcp_gotoptions; + u_char cilen; +#if VJ_SUPPORT + u_char cimaxslotindex, ciflag; + u_short cishort; +#endif /* VJ_SUPPORT */ + u32_t cilong; + ipcp_options try_; /* options to request next time */ + + try_ = *go; + /* + * Any Rejected CIs must be in exactly the same order that we sent. + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ +#define REJCIADDRS(opt, neg, val1, val2) \ + if ((neg) && \ + (cilen = p[1]) == CILEN_ADDRS && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != val1) \ + goto bad; \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != val2) \ + goto bad; \ + try_.old_addrs = 0; \ + } + +#if VJ_SUPPORT +#define REJCIVJ(opt, neg, val, old, maxslot, cflag) \ + if (go->neg && \ + p[1] == (old? CILEN_COMPRESS : CILEN_VJ) && \ + len >= p[1] && \ + p[0] == opt) { \ + len -= p[1]; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + /* Check rejected value. */ \ + if (cishort != val) \ + goto bad; \ + if (!old) { \ + GETCHAR(cimaxslotindex, p); \ + if (cimaxslotindex != maxslot) \ + goto bad; \ + GETCHAR(ciflag, p); \ + if (ciflag != cflag) \ + goto bad; \ + } \ + try_.neg = 0; \ + } +#endif /* VJ_SUPPORT */ + +#define REJCIADDR(opt, neg, val) \ + if (go->neg && \ + (cilen = p[1]) == CILEN_ADDR && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != val) \ + goto bad; \ + try_.neg = 0; \ + } + +#if LWIP_DNS +#define REJCIDNS(opt, neg, dnsaddr) \ + if (go->neg && \ + ((cilen = p[1]) == CILEN_ADDR) && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != dnsaddr) \ + goto bad; \ + try_.neg = 0; \ + } +#endif /* LWIP_DNS */ + +#if 0 /* UNUSED - WINS */ +#define REJCIWINS(opt, addr) \ + if (addr && \ + ((cilen = p[1]) == CILEN_ADDR) && \ + len >= cilen && \ + p[0] == opt) { \ + u32_t l; \ + len -= cilen; \ + INCPTR(2, p); \ + GETLONG(l, p); \ + cilong = lwip_htonl(l); \ + /* Check rejected value. */ \ + if (cilong != addr) \ + goto bad; \ + try_.winsaddr[opt == CI_MS_WINS2] = 0; \ + } +#endif /* UNUSED - WINS */ + + REJCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, + go->ouraddr, go->hisaddr); + +#if VJ_SUPPORT + REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol, go->old_vj, + go->maxslotindex, go->cflag); +#endif /* VJ_SUPPORT */ + + REJCIADDR(CI_ADDR, neg_addr, go->ouraddr); + +#if LWIP_DNS + REJCIDNS(CI_MS_DNS1, req_dns1, go->dnsaddr[0]); + + REJCIDNS(CI_MS_DNS2, req_dns2, go->dnsaddr[1]); +#endif /* LWIP_DNS */ + +#if 0 /* UNUSED - WINS */ + REJCIWINS(CI_MS_WINS1, go->winsaddr[0]); + + REJCIWINS(CI_MS_WINS2, go->winsaddr[1]); +#endif /* UNUSED - WINS */ + + /* + * If there are any remaining CIs, then this packet is bad. + */ + if (len != 0) + goto bad; + /* + * Now we can update state. + */ + if (f->state != PPP_FSM_OPENED) + *go = try_; + return 1; + +bad: + IPCPDEBUG(("ipcp_rejci: received bad Reject!")); + return 0; +} + + +/* + * ipcp_reqci - Check the peer's requested CIs and send appropriate response. + * Callback from fsm_rconfreq, Receive Configure Request + * + * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified + * appropriately. If reject_if_disagree is non-zero, doesn't return + * CONFNAK; returns CONFREJ if it can't return CONFACK. + * + * inp = Requested CIs + * len = Length of requested CIs + */ +static int ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { + ppp_pcb *pcb = f->pcb; + ipcp_options *wo = &pcb->ipcp_wantoptions; + ipcp_options *ho = &pcb->ipcp_hisoptions; + ipcp_options *ao = &pcb->ipcp_allowoptions; + u_char *cip, *next; /* Pointer to current and next CIs */ + u_short cilen, citype; /* Parsed len, type */ +#if VJ_SUPPORT + u_short cishort; /* Parsed short value */ +#endif /* VJ_SUPPORT */ + u32_t tl, ciaddr1, ciaddr2;/* Parsed address values */ + int rc = CONFACK; /* Final packet return code */ + int orc; /* Individual option return code */ + u_char *p; /* Pointer to next char to parse */ + u_char *ucp = inp; /* Pointer to current output char */ + int l = *len; /* Length left */ +#if VJ_SUPPORT + u_char maxslotindex, cflag; +#endif /* VJ_SUPPORT */ +#if LWIP_DNS + int d; +#endif /* LWIP_DNS */ + + /* + * Reset all his options. + */ + BZERO(ho, sizeof(*ho)); + + /* + * Process all his options. + */ + next = inp; + while (l) { + orc = CONFACK; /* Assume success */ + cip = p = next; /* Remember begining of CI */ + if (l < 2 || /* Not enough data for CI header or */ + p[1] < 2 || /* CI length too small or */ + p[1] > l) { /* CI length too big? */ + IPCPDEBUG(("ipcp_reqci: bad CI length!")); + orc = CONFREJ; /* Reject bad CI */ + cilen = l; /* Reject till end of packet */ + l = 0; /* Don't loop again */ + goto endswitch; + } + GETCHAR(citype, p); /* Parse CI type */ + GETCHAR(cilen, p); /* Parse CI length */ + l -= cilen; /* Adjust remaining length */ + next += cilen; /* Step to next CI */ + + switch (citype) { /* Check CI type */ + case CI_ADDRS: + if (!ao->old_addrs || ho->neg_addr || + cilen != CILEN_ADDRS) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + + /* + * If he has no address, or if we both have his address but + * disagree about it, then NAK it with our idea. + * In particular, if we don't know his address, but he does, + * then accept it. + */ + GETLONG(tl, p); /* Parse source address (his) */ + ciaddr1 = lwip_htonl(tl); + if (ciaddr1 != wo->hisaddr + && (ciaddr1 == 0 || !wo->accept_remote)) { + orc = CONFNAK; + if (!reject_if_disagree) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(wo->hisaddr); + PUTLONG(tl, p); + } + } else if (ciaddr1 == 0 && wo->hisaddr == 0) { + /* + * If neither we nor he knows his address, reject the option. + */ + orc = CONFREJ; + wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ + break; + } + + /* + * If he doesn't know our address, or if we both have our address + * but disagree about it, then NAK it with our idea. + */ + GETLONG(tl, p); /* Parse desination address (ours) */ + ciaddr2 = lwip_htonl(tl); + if (ciaddr2 != wo->ouraddr) { + if (ciaddr2 == 0 || !wo->accept_local) { + orc = CONFNAK; + if (!reject_if_disagree) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(wo->ouraddr); + PUTLONG(tl, p); + } + } else { + wo->ouraddr = ciaddr2; /* accept peer's idea */ + } + } + + ho->old_addrs = 1; + ho->hisaddr = ciaddr1; + ho->ouraddr = ciaddr2; + break; + + case CI_ADDR: + if (!ao->neg_addr || ho->old_addrs || + cilen != CILEN_ADDR) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + + /* + * If he has no address, or if we both have his address but + * disagree about it, then NAK it with our idea. + * In particular, if we don't know his address, but he does, + * then accept it. + */ + GETLONG(tl, p); /* Parse source address (his) */ + ciaddr1 = lwip_htonl(tl); + if (ciaddr1 != wo->hisaddr + && (ciaddr1 == 0 || !wo->accept_remote)) { + orc = CONFNAK; + if (!reject_if_disagree) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(wo->hisaddr); + PUTLONG(tl, p); + } + } else if (ciaddr1 == 0 && wo->hisaddr == 0) { + /* + * Don't ACK an address of 0.0.0.0 - reject it instead. + */ + orc = CONFREJ; + wo->req_addr = 0; /* don't NAK with 0.0.0.0 later */ + break; + } + + ho->neg_addr = 1; + ho->hisaddr = ciaddr1; + break; + +#if LWIP_DNS + case CI_MS_DNS1: + case CI_MS_DNS2: + /* Microsoft primary or secondary DNS request */ + d = citype == CI_MS_DNS2; + + /* If we do not have a DNS address then we cannot send it */ + if (ao->dnsaddr[d] == 0 || + cilen != CILEN_ADDR) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + GETLONG(tl, p); + if (lwip_htonl(tl) != ao->dnsaddr[d]) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(ao->dnsaddr[d]); + PUTLONG(tl, p); + orc = CONFNAK; + } + break; +#endif /* LWIP_DNS */ + +#if 0 /* UNUSED - WINS */ + case CI_MS_WINS1: + case CI_MS_WINS2: + /* Microsoft primary or secondary WINS request */ + d = citype == CI_MS_WINS2; + + /* If we do not have a DNS address then we cannot send it */ + if (ao->winsaddr[d] == 0 || + cilen != CILEN_ADDR) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + GETLONG(tl, p); + if (lwip_htonl(tl) != ao->winsaddr[d]) { + DECPTR(sizeof(u32_t), p); + tl = lwip_ntohl(ao->winsaddr[d]); + PUTLONG(tl, p); + orc = CONFNAK; + } + break; +#endif /* UNUSED - WINS */ + +#if VJ_SUPPORT + case CI_COMPRESSTYPE: + if (!ao->neg_vj || + (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) { + orc = CONFREJ; + break; + } + GETSHORT(cishort, p); + + if (!(cishort == IPCP_VJ_COMP || + (cishort == IPCP_VJ_COMP_OLD && cilen == CILEN_COMPRESS))) { + orc = CONFREJ; + break; + } + + ho->neg_vj = 1; + ho->vj_protocol = cishort; + if (cilen == CILEN_VJ) { + GETCHAR(maxslotindex, p); + if (maxslotindex > ao->maxslotindex) { + orc = CONFNAK; + if (!reject_if_disagree){ + DECPTR(1, p); + PUTCHAR(ao->maxslotindex, p); + } + } + GETCHAR(cflag, p); + if (cflag && !ao->cflag) { + orc = CONFNAK; + if (!reject_if_disagree){ + DECPTR(1, p); + PUTCHAR(wo->cflag, p); + } + } + ho->maxslotindex = maxslotindex; + ho->cflag = cflag; + } else { + ho->old_vj = 1; + ho->maxslotindex = MAX_STATES - 1; + ho->cflag = 1; + } + break; +#endif /* VJ_SUPPORT */ + + default: + orc = CONFREJ; + break; + } +endswitch: + if (orc == CONFACK && /* Good CI */ + rc != CONFACK) /* but prior CI wasnt? */ + continue; /* Don't send this one */ + + if (orc == CONFNAK) { /* Nak this CI? */ + if (reject_if_disagree) /* Getting fed up with sending NAKs? */ + orc = CONFREJ; /* Get tough if so */ + else { + if (rc == CONFREJ) /* Rejecting prior CI? */ + continue; /* Don't send this one */ + if (rc == CONFACK) { /* Ack'd all prior CIs? */ + rc = CONFNAK; /* Not anymore... */ + ucp = inp; /* Backup */ + } + } + } + + if (orc == CONFREJ && /* Reject this CI */ + rc != CONFREJ) { /* but no prior ones? */ + rc = CONFREJ; + ucp = inp; /* Backup */ + } + + /* Need to move CI? */ + if (ucp != cip) + MEMCPY(ucp, cip, cilen); /* Move it */ + + /* Update output pointer */ + INCPTR(cilen, ucp); + } + + /* + * If we aren't rejecting this packet, and we want to negotiate + * their address, and they didn't send their address, then we + * send a NAK with a CI_ADDR option appended. We assume the + * input buffer is long enough that we can append the extra + * option safely. + */ + if (rc != CONFREJ && !ho->neg_addr && !ho->old_addrs && + wo->req_addr && !reject_if_disagree && !pcb->settings.noremoteip) { + if (rc == CONFACK) { + rc = CONFNAK; + ucp = inp; /* reset pointer */ + wo->req_addr = 0; /* don't ask again */ + } + PUTCHAR(CI_ADDR, ucp); + PUTCHAR(CILEN_ADDR, ucp); + tl = lwip_ntohl(wo->hisaddr); + PUTLONG(tl, ucp); + } + + *len = ucp - inp; /* Compute output length */ + IPCPDEBUG(("ipcp: returning Configure-%s", CODENAME(rc))); + return (rc); /* Return final code */ +} + + +#if 0 /* UNUSED */ +/* + * ip_check_options - check that any IP-related options are OK, + * and assign appropriate defaults. + */ +static void +ip_check_options() +{ + struct hostent *hp; + u32_t local; + ipcp_options *wo = &ipcp_wantoptions[0]; + + /* + * Default our local IP address based on our hostname. + * If local IP address already given, don't bother. + */ + if (wo->ouraddr == 0 && !disable_defaultip) { + /* + * Look up our hostname (possibly with domain name appended) + * and take the first IP address as our local IP address. + * If there isn't an IP address for our hostname, too bad. + */ + wo->accept_local = 1; /* don't insist on this default value */ + if ((hp = gethostbyname(hostname)) != NULL) { + local = *(u32_t *)hp->h_addr; + if (local != 0 && !bad_ip_adrs(local)) + wo->ouraddr = local; + } + } + ask_for_local = wo->ouraddr != 0 || !disable_defaultip; +} +#endif /* UNUSED */ + +#if DEMAND_SUPPORT +/* + * ip_demand_conf - configure the interface as though + * IPCP were up, for use with dial-on-demand. + */ +static int +ip_demand_conf(u) + int u; +{ + ppp_pcb *pcb = &ppp_pcb_list[u]; + ipcp_options *wo = &ipcp_wantoptions[u]; + + if (wo->hisaddr == 0 && !pcb->settings.noremoteip) { + /* make up an arbitrary address for the peer */ + wo->hisaddr = lwip_htonl(0x0a707070 + ifunit); + wo->accept_remote = 1; + } + if (wo->ouraddr == 0) { + /* make up an arbitrary address for us */ + wo->ouraddr = lwip_htonl(0x0a404040 + ifunit); + wo->accept_local = 1; + ask_for_local = 0; /* don't tell the peer this address */ + } + if (!sifaddr(pcb, wo->ouraddr, wo->hisaddr, get_mask(wo->ouraddr))) + return 0; + if (!sifup(pcb)) + return 0; + if (!sifnpmode(pcb, PPP_IP, NPMODE_QUEUE)) + return 0; +#if 0 /* UNUSED */ + if (wo->default_route) + if (sifdefaultroute(pcb, wo->ouraddr, wo->hisaddr, + wo->replace_default_route)) + default_route_set[u] = 1; +#endif /* UNUSED */ +#if 0 /* UNUSED - PROXY ARP */ + if (wo->proxy_arp) + if (sifproxyarp(pcb, wo->hisaddr)) + proxy_arp_set[u] = 1; +#endif /* UNUSED - PROXY ARP */ + + ppp_notice("local IP address %I", wo->ouraddr); + if (wo->hisaddr) + ppp_notice("remote IP address %I", wo->hisaddr); + + return 1; +} +#endif /* DEMAND_SUPPORT */ + +/* + * ipcp_up - IPCP has come UP. + * + * Configure the IP network interface appropriately and bring it up. + */ +static void ipcp_up(fsm *f) { + ppp_pcb *pcb = f->pcb; + u32_t mask; + ipcp_options *ho = &pcb->ipcp_hisoptions; + ipcp_options *go = &pcb->ipcp_gotoptions; + ipcp_options *wo = &pcb->ipcp_wantoptions; + + IPCPDEBUG(("ipcp: up")); + + /* + * We must have a non-zero IP address for both ends of the link. + */ + if (!ho->neg_addr && !ho->old_addrs) + ho->hisaddr = wo->hisaddr; + + if (!(go->neg_addr || go->old_addrs) && (wo->neg_addr || wo->old_addrs) + && wo->ouraddr != 0) { + ppp_error("Peer refused to agree to our IP address"); + ipcp_close(f->pcb, "Refused our IP address"); + return; + } + if (go->ouraddr == 0) { + ppp_error("Could not determine local IP address"); + ipcp_close(f->pcb, "Could not determine local IP address"); + return; + } + if (ho->hisaddr == 0 && !pcb->settings.noremoteip) { + ho->hisaddr = lwip_htonl(0x0a404040); + ppp_warn("Could not determine remote IP address: defaulting to %I", + ho->hisaddr); + } +#if 0 /* UNUSED */ + script_setenv("IPLOCAL", ip_ntoa(go->ouraddr), 0); + if (ho->hisaddr != 0) + script_setenv("IPREMOTE", ip_ntoa(ho->hisaddr), 1); +#endif /* UNUSED */ + +#if LWIP_DNS + if (!go->req_dns1) + go->dnsaddr[0] = 0; + if (!go->req_dns2) + go->dnsaddr[1] = 0; +#if 0 /* UNUSED */ + if (go->dnsaddr[0]) + script_setenv("DNS1", ip_ntoa(go->dnsaddr[0]), 0); + if (go->dnsaddr[1]) + script_setenv("DNS2", ip_ntoa(go->dnsaddr[1]), 0); +#endif /* UNUSED */ + if (pcb->settings.usepeerdns && (go->dnsaddr[0] || go->dnsaddr[1])) { + sdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); +#if 0 /* UNUSED */ + script_setenv("USEPEERDNS", "1", 0); + create_resolv(go->dnsaddr[0], go->dnsaddr[1]); +#endif /* UNUSED */ + } +#endif /* LWIP_DNS */ + + /* + * Check that the peer is allowed to use the IP address it wants. + */ + if (ho->hisaddr != 0) { + u32_t addr = lwip_ntohl(ho->hisaddr); + if ((addr >> IP_CLASSA_NSHIFT) == IP_LOOPBACKNET + || IP_MULTICAST(addr) || IP_BADCLASS(addr) + /* + * For now, consider that PPP in server mode with peer required + * to authenticate must provide the peer IP address, reject any + * IP address wanted by peer different than the one we wanted. + */ +#if PPP_SERVER && PPP_AUTH_SUPPORT + || (pcb->settings.auth_required && wo->hisaddr != ho->hisaddr) +#endif /* PPP_SERVER && PPP_AUTH_SUPPORT */ + ) { + ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); + ipcp_close(pcb, "Unauthorized remote IP address"); + return; + } + } +#if 0 /* Unused */ + /* Upstream checking code */ + if (ho->hisaddr != 0 && !auth_ip_addr(f->unit, ho->hisaddr)) { + ppp_error("Peer is not authorized to use remote address %I", ho->hisaddr); + ipcp_close(f->unit, "Unauthorized remote IP address"); + return; + } +#endif /* Unused */ + +#if VJ_SUPPORT + /* set tcp compression */ + sifvjcomp(pcb, ho->neg_vj, ho->cflag, ho->maxslotindex); +#endif /* VJ_SUPPORT */ + +#if DEMAND_SUPPORT + /* + * If we are doing dial-on-demand, the interface is already + * configured, so we put out any saved-up packets, then set the + * interface to pass IP packets. + */ + if (demand) { + if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) { + ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr, + wo->replace_default_route); + if (go->ouraddr != wo->ouraddr) { + ppp_warn("Local IP address changed to %I", go->ouraddr); + script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0); + wo->ouraddr = go->ouraddr; + } else + script_unsetenv("OLDIPLOCAL"); + if (ho->hisaddr != wo->hisaddr && wo->hisaddr != 0) { + ppp_warn("Remote IP address changed to %I", ho->hisaddr); + script_setenv("OLDIPREMOTE", ip_ntoa(wo->hisaddr), 0); + wo->hisaddr = ho->hisaddr; + } else + script_unsetenv("OLDIPREMOTE"); + + /* Set the interface to the new addresses */ + mask = get_mask(go->ouraddr); + if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { +#if PPP_DEBUG + ppp_warn("Interface configuration failed"); +#endif /* PPP_DEBUG */ + ipcp_close(f->unit, "Interface configuration failed"); + return; + } + + /* assign a default route through the interface if required */ + if (ipcp_wantoptions[f->unit].default_route) + if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, + wo->replace_default_route)) + default_route_set[f->unit] = 1; + +#if 0 /* UNUSED - PROXY ARP */ + /* Make a proxy ARP entry if requested. */ + if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp) + if (sifproxyarp(pcb, ho->hisaddr)) + proxy_arp_set[f->unit] = 1; +#endif /* UNUSED - PROXY ARP */ + + } + demand_rexmit(PPP_IP,go->ouraddr); + sifnpmode(pcb, PPP_IP, NPMODE_PASS); + + } else +#endif /* DEMAND_SUPPORT */ + { + /* + * Set IP addresses and (if specified) netmask. + */ + mask = get_mask(go->ouraddr); + +#if !(defined(SVR4) && (defined(SNI) || defined(__USLC__))) + if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { +#if PPP_DEBUG + ppp_warn("Interface configuration failed"); +#endif /* PPP_DEBUG */ + ipcp_close(f->pcb, "Interface configuration failed"); + return; + } +#endif + + /* bring the interface up for IP */ + if (!sifup(pcb)) { +#if PPP_DEBUG + ppp_warn("Interface failed to come up"); +#endif /* PPP_DEBUG */ + ipcp_close(f->pcb, "Interface configuration failed"); + return; + } + +#if (defined(SVR4) && (defined(SNI) || defined(__USLC__))) + if (!sifaddr(pcb, go->ouraddr, ho->hisaddr, mask)) { +#if PPP_DEBUG + ppp_warn("Interface configuration failed"); +#endif /* PPP_DEBUG */ + ipcp_close(f->unit, "Interface configuration failed"); + return; + } +#endif +#if DEMAND_SUPPORT + sifnpmode(pcb, PPP_IP, NPMODE_PASS); +#endif /* DEMAND_SUPPORT */ + +#if 0 /* UNUSED */ + /* assign a default route through the interface if required */ + if (wo->default_route) + if (sifdefaultroute(pcb, go->ouraddr, ho->hisaddr, + wo->replace_default_route)) + pcb->default_route_set = 1; +#endif /* UNUSED */ + +#if 0 /* UNUSED - PROXY ARP */ + /* Make a proxy ARP entry if requested. */ + if (ho->hisaddr != 0 && wo->proxy_arp) + if (sifproxyarp(pcb, ho->hisaddr)) + pcb->proxy_arp_set = 1; +#endif /* UNUSED - PROXY ARP */ + + wo->ouraddr = go->ouraddr; + + ppp_notice("local IP address %I", go->ouraddr); + if (ho->hisaddr != 0) + ppp_notice("remote IP address %I", ho->hisaddr); +#if LWIP_DNS + if (go->dnsaddr[0]) + ppp_notice("primary DNS address %I", go->dnsaddr[0]); + if (go->dnsaddr[1]) + ppp_notice("secondary DNS address %I", go->dnsaddr[1]); +#endif /* LWIP_DNS */ + } + +#if PPP_STATS_SUPPORT + reset_link_stats(f->unit); +#endif /* PPP_STATS_SUPPORT */ + + np_up(pcb, PPP_IP); + pcb->ipcp_is_up = 1; + +#if PPP_NOTIFY + notify(ip_up_notifier, 0); +#endif /* PPP_NOTIFY */ +#if 0 /* UNUSED */ + if (ip_up_hook) + ip_up_hook(); +#endif /* UNUSED */ +} + + +/* + * ipcp_down - IPCP has gone DOWN. + * + * Take the IP network interface down, clear its addresses + * and delete routes through it. + */ +static void ipcp_down(fsm *f) { + ppp_pcb *pcb = f->pcb; + ipcp_options *ho = &pcb->ipcp_hisoptions; + ipcp_options *go = &pcb->ipcp_gotoptions; + + IPCPDEBUG(("ipcp: down")); +#if PPP_STATS_SUPPORT + /* XXX a bit IPv4-centric here, we only need to get the stats + * before the interface is marked down. */ + /* XXX more correct: we must get the stats before running the notifiers, + * at least for the radius plugin */ + update_link_stats(f->unit); +#endif /* PPP_STATS_SUPPORT */ +#if PPP_NOTIFY + notify(ip_down_notifier, 0); +#endif /* PPP_NOTIFY */ +#if 0 /* UNUSED */ + if (ip_down_hook) + ip_down_hook(); +#endif /* UNUSED */ + if (pcb->ipcp_is_up) { + pcb->ipcp_is_up = 0; + np_down(pcb, PPP_IP); + } +#if VJ_SUPPORT + sifvjcomp(pcb, 0, 0, 0); +#endif /* VJ_SUPPORT */ + +#if PPP_STATS_SUPPORT + print_link_stats(); /* _after_ running the notifiers and ip_down_hook(), + * because print_link_stats() sets link_stats_valid + * to 0 (zero) */ +#endif /* PPP_STATS_SUPPORT */ + +#if DEMAND_SUPPORT + /* + * If we are doing dial-on-demand, set the interface + * to queue up outgoing packets (for now). + */ + if (demand) { + sifnpmode(pcb, PPP_IP, NPMODE_QUEUE); + } else +#endif /* DEMAND_SUPPORT */ + { +#if DEMAND_SUPPORT + sifnpmode(pcb, PPP_IP, NPMODE_DROP); +#endif /* DEMAND_SUPPORT */ + sifdown(pcb); + ipcp_clear_addrs(pcb, go->ouraddr, + ho->hisaddr, 0); +#if LWIP_DNS + cdns(pcb, go->dnsaddr[0], go->dnsaddr[1]); +#endif /* LWIP_DNS */ + } +} + + +/* + * ipcp_clear_addrs() - clear the interface addresses, routes, + * proxy arp entries, etc. + */ +static void ipcp_clear_addrs(ppp_pcb *pcb, u32_t ouraddr, u32_t hisaddr, u8_t replacedefaultroute) { + LWIP_UNUSED_ARG(replacedefaultroute); + +#if 0 /* UNUSED - PROXY ARP */ + if (pcb->proxy_arp_set) { + cifproxyarp(pcb, hisaddr); + pcb->proxy_arp_set = 0; + } +#endif /* UNUSED - PROXY ARP */ +#if 0 /* UNUSED */ + /* If replacedefaultroute, sifdefaultroute will be called soon + * with replacedefaultroute set and that will overwrite the current + * default route. This is the case only when doing demand, otherwise + * during demand, this cifdefaultroute would restore the old default + * route which is not what we want in this case. In the non-demand + * case, we'll delete the default route and restore the old if there + * is one saved by an sifdefaultroute with replacedefaultroute. + */ + if (!replacedefaultroute && pcb->default_route_set) { + cifdefaultroute(pcb, ouraddr, hisaddr); + pcb->default_route_set = 0; + } +#endif /* UNUSED */ + cifaddr(pcb, ouraddr, hisaddr); +} + + +/* + * ipcp_finished - possibly shut down the lower layers. + */ +static void ipcp_finished(fsm *f) { + ppp_pcb *pcb = f->pcb; + if (pcb->ipcp_is_open) { + pcb->ipcp_is_open = 0; + np_finished(pcb, PPP_IP); + } +} + + +#if 0 /* UNUSED */ +/* + * create_resolv - create the replacement resolv.conf file + */ +static void +create_resolv(peerdns1, peerdns2) + u32_t peerdns1, peerdns2; +{ + +} +#endif /* UNUSED */ + +#if PRINTPKT_SUPPORT +/* + * ipcp_printpkt - print the contents of an IPCP packet. + */ +static const char* const ipcp_codenames[] = { + "ConfReq", "ConfAck", "ConfNak", "ConfRej", + "TermReq", "TermAck", "CodeRej" +}; + +static int ipcp_printpkt(const u_char *p, int plen, + void (*printer) (void *, const char *, ...), void *arg) { + int code, id, len, olen; + const u_char *pstart, *optend; +#if VJ_SUPPORT + u_short cishort; +#endif /* VJ_SUPPORT */ + u32_t cilong; + + if (plen < HEADERLEN) + return 0; + pstart = p; + GETCHAR(code, p); + GETCHAR(id, p); + GETSHORT(len, p); + if (len < HEADERLEN || len > plen) + return 0; + + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipcp_codenames)) + printer(arg, " %s", ipcp_codenames[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= HEADERLEN; + switch (code) { + case CONFREQ: + case CONFACK: + case CONFNAK: + case CONFREJ: + /* print option list */ + while (len >= 2) { + GETCHAR(code, p); + GETCHAR(olen, p); + p -= 2; + if (olen < 2 || olen > len) { + break; + } + printer(arg, " <"); + len -= olen; + optend = p + olen; + switch (code) { + case CI_ADDRS: + if (olen == CILEN_ADDRS) { + p += 2; + GETLONG(cilong, p); + printer(arg, "addrs %I", lwip_htonl(cilong)); + GETLONG(cilong, p); + printer(arg, " %I", lwip_htonl(cilong)); + } + break; +#if VJ_SUPPORT + case CI_COMPRESSTYPE: + if (olen >= CILEN_COMPRESS) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "compress "); + switch (cishort) { + case IPCP_VJ_COMP: + printer(arg, "VJ"); + break; + case IPCP_VJ_COMP_OLD: + printer(arg, "old-VJ"); + break; + default: + printer(arg, "0x%x", cishort); + } + } + break; +#endif /* VJ_SUPPORT */ + case CI_ADDR: + if (olen == CILEN_ADDR) { + p += 2; + GETLONG(cilong, p); + printer(arg, "addr %I", lwip_htonl(cilong)); + } + break; +#if LWIP_DNS + case CI_MS_DNS1: + case CI_MS_DNS2: + p += 2; + GETLONG(cilong, p); + printer(arg, "ms-dns%d %I", (code == CI_MS_DNS1? 1: 2), + htonl(cilong)); + break; +#endif /* LWIP_DNS */ +#if 0 /* UNUSED - WINS */ + case CI_MS_WINS1: + case CI_MS_WINS2: + p += 2; + GETLONG(cilong, p); + printer(arg, "ms-wins %I", lwip_htonl(cilong)); + break; +#endif /* UNUSED - WINS */ + default: + break; + } + while (p < optend) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + printer(arg, ">"); + } + break; + + case TERMACK: + case TERMREQ: + if (len > 0 && *p >= ' ' && *p < 0x7f) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; + default: + break; + } + + /* print the rest of the bytes in the packet */ + for (; len > 0; --len) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + + return p - pstart; +} +#endif /* PRINTPKT_SUPPORT */ + +#if DEMAND_SUPPORT +/* + * ip_active_pkt - see if this IP packet is worth bringing the link up for. + * We don't bring the link up for IP fragments or for TCP FIN packets + * with no data. + */ +#define IP_HDRLEN 20 /* bytes */ +#define IP_OFFMASK 0x1fff +#ifndef IPPROTO_TCP +#define IPPROTO_TCP 6 +#endif +#define TCP_HDRLEN 20 +#define TH_FIN 0x01 + +/* + * We use these macros because the IP header may be at an odd address, + * and some compilers might use word loads to get th_off or ip_hl. + */ + +#define net_short(x) (((x)[0] << 8) + (x)[1]) +#define get_iphl(x) (((unsigned char *)(x))[0] & 0xF) +#define get_ipoff(x) net_short((unsigned char *)(x) + 6) +#define get_ipproto(x) (((unsigned char *)(x))[9]) +#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) +#define get_tcpflags(x) (((unsigned char *)(x))[13]) + +static int +ip_active_pkt(pkt, len) + u_char *pkt; + int len; +{ + u_char *tcp; + int hlen; + + len -= PPP_HDRLEN; + pkt += PPP_HDRLEN; + if (len < IP_HDRLEN) + return 0; + if ((get_ipoff(pkt) & IP_OFFMASK) != 0) + return 0; + if (get_ipproto(pkt) != IPPROTO_TCP) + return 1; + hlen = get_iphl(pkt) * 4; + if (len < hlen + TCP_HDRLEN) + return 0; + tcp = pkt + hlen; + if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == hlen + get_tcpoff(tcp) * 4) + return 0; + return 1; +} +#endif /* DEMAND_SUPPORT */ + +#endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.c index 11c18df..e7d81c9 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ipv6cp.c @@ -1,1533 +1,1533 @@ -/* - * ipv6cp.c - PPP IPV6 Control Protocol. - * - * Copyright (c) 1999 Tommi Komulainen. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Tommi Komulainen - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -/* Original version, based on RFC2023 : - - Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt, - Alain.Durand@imag.fr, IMAG, - Jean-Luc.Richier@imag.fr, IMAG-LSR. - - Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE, - Alain.Durand@imag.fr, IMAG, - Jean-Luc.Richier@imag.fr, IMAG-LSR. - - Ce travail a été fait au sein du GIE DYADE (Groupement d'Intérêt - Économique ayant pour membres BULL S.A. et l'INRIA). - - Ce logiciel informatique est disponible aux conditions - usuelles dans la recherche, c'est-à-dire qu'il peut - être utilisé, copié, modifié, distribué à l'unique - condition que ce texte soit conservé afin que - l'origine de ce logiciel soit reconnue. - - Le nom de l'Institut National de Recherche en Informatique - et en Automatique (INRIA), de l'IMAG, ou d'une personne morale - ou physique ayant participé à l'élaboration de ce logiciel ne peut - être utilisé sans son accord préalable explicite. - - Ce logiciel est fourni tel quel sans aucune garantie, - support ou responsabilité d'aucune sorte. - Ce logiciel est dérivé de sources d'origine - "University of California at Berkeley" et - "Digital Equipment Corporation" couvertes par des copyrights. - - L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG) - est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National - Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant - sept laboratoires dont le laboratoire Logiciels, Systèmes, Réseaux (LSR). - - This work has been done in the context of GIE DYADE (joint R & D venture - between BULL S.A. and INRIA). - - This software is available with usual "research" terms - with the aim of retain credits of the software. - Permission to use, copy, modify and distribute this software for any - purpose and without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies, - and the name of INRIA, IMAG, or any contributor not be used in advertising - or publicity pertaining to this material without the prior explicit - permission. The software is provided "as is" without any - warranties, support or liabilities of any kind. - This software is derived from source code from - "University of California at Berkeley" and - "Digital Equipment Corporation" protected by copyrights. - - Grenoble's Institute of Computer Science and Applied Mathematics (IMAG) - is a federation of seven research units funded by the CNRS, National - Polytechnic Institute of Grenoble and University Joseph Fourier. - The research unit in Software, Systems, Networks (LSR) is member of IMAG. -*/ - -/* - * Derived from : - * - * - * ipcp.c - PPP IP Control Protocol. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * $Id: ipv6cp.c,v 1.21 2005/08/25 23:59:34 paulus Exp $ - */ - -/* - * @todo: - * - * Proxy Neighbour Discovery. - * - * Better defines for selecting the ordering of - * interface up / set address. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#if 0 /* UNUSED */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/fsm.h" -#include "netif/ppp/ipcp.h" -#include "netif/ppp/ipv6cp.h" -#include "netif/ppp/magic.h" - -/* global vars */ -#if 0 /* UNUSED */ -int no_ifaceid_neg = 0; -#endif /* UNUSED */ - -/* - * Callbacks for fsm code. (CI = Configuration Information) - */ -static void ipv6cp_resetci(fsm *f); /* Reset our CI */ -static int ipv6cp_cilen(fsm *f); /* Return length of our CI */ -static void ipv6cp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI */ -static int ipv6cp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ -static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject); /* Peer nak'd our CI */ -static int ipv6cp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ -static int ipv6cp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree); /* Rcv CI */ -static void ipv6cp_up(fsm *f); /* We're UP */ -static void ipv6cp_down(fsm *f); /* We're DOWN */ -static void ipv6cp_finished(fsm *f); /* Don't need lower layer */ - -static const fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */ - ipv6cp_resetci, /* Reset our Configuration Information */ - ipv6cp_cilen, /* Length of our Configuration Information */ - ipv6cp_addci, /* Add our Configuration Information */ - ipv6cp_ackci, /* ACK our Configuration Information */ - ipv6cp_nakci, /* NAK our Configuration Information */ - ipv6cp_rejci, /* Reject our Configuration Information */ - ipv6cp_reqci, /* Request peer's Configuration Information */ - ipv6cp_up, /* Called when fsm reaches OPENED state */ - ipv6cp_down, /* Called when fsm leaves OPENED state */ - NULL, /* Called when we want the lower layer up */ - ipv6cp_finished, /* Called when we want the lower layer down */ - NULL, /* Called when Protocol-Reject received */ - NULL, /* Retransmission is necessary */ - NULL, /* Called to handle protocol-specific codes */ - "IPV6CP" /* String name of protocol */ -}; - -#if PPP_OPTIONS -/* - * Command-line options. - */ -static int setifaceid(char **arg)); -static void printifaceid(option_t *, - void (*)(void *, char *, ...), void *)); - -static option_t ipv6cp_option_list[] = { - { "ipv6", o_special, (void *)setifaceid, - "Set interface identifiers for IPV6", - OPT_A2PRINTER, (void *)printifaceid }, - - { "+ipv6", o_bool, &ipv6cp_protent.enabled_flag, - "Enable IPv6 and IPv6CP", OPT_PRIO | 1 }, - { "noipv6", o_bool, &ipv6cp_protent.enabled_flag, - "Disable IPv6 and IPv6CP", OPT_PRIOSUB }, - { "-ipv6", o_bool, &ipv6cp_protent.enabled_flag, - "Disable IPv6 and IPv6CP", OPT_PRIOSUB | OPT_ALIAS }, - - { "ipv6cp-accept-local", o_bool, &ipv6cp_allowoptions[0].accept_local, - "Accept peer's interface identifier for us", 1 }, - - { "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip, - "Use (default) IPv4 address as interface identifier", 1 }, - - { "ipv6cp-use-persistent", o_bool, &ipv6cp_wantoptions[0].use_persistent, - "Use uniquely-available persistent value for link local address", 1 }, - - { "ipv6cp-restart", o_int, &ipv6cp_fsm[0].timeouttime, - "Set timeout for IPv6CP", OPT_PRIO }, - { "ipv6cp-max-terminate", o_int, &ipv6cp_fsm[0].maxtermtransmits, - "Set max #xmits for term-reqs", OPT_PRIO }, - { "ipv6cp-max-configure", o_int, &ipv6cp_fsm[0].maxconfreqtransmits, - "Set max #xmits for conf-reqs", OPT_PRIO }, - { "ipv6cp-max-failure", o_int, &ipv6cp_fsm[0].maxnakloops, - "Set max #conf-naks for IPv6CP", OPT_PRIO }, - - { NULL } -}; -#endif /* PPP_OPTIONS */ - -/* - * Protocol entry points from main code. - */ -static void ipv6cp_init(ppp_pcb *pcb); -static void ipv6cp_open(ppp_pcb *pcb); -static void ipv6cp_close(ppp_pcb *pcb, const char *reason); -static void ipv6cp_lowerup(ppp_pcb *pcb); -static void ipv6cp_lowerdown(ppp_pcb *pcb); -static void ipv6cp_input(ppp_pcb *pcb, u_char *p, int len); -static void ipv6cp_protrej(ppp_pcb *pcb); -#if PPP_OPTIONS -static void ipv6_check_options(void); -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT -static int ipv6_demand_conf(int u); -#endif /* DEMAND_SUPPORT */ -#if PRINTPKT_SUPPORT -static int ipv6cp_printpkt(const u_char *p, int plen, - void (*printer)(void *, const char *, ...), void *arg); -#endif /* PRINTPKT_SUPPORT */ -#if DEMAND_SUPPORT -static int ipv6_active_pkt(u_char *pkt, int len); -#endif /* DEMAND_SUPPORT */ - -const struct protent ipv6cp_protent = { - PPP_IPV6CP, - ipv6cp_init, - ipv6cp_input, - ipv6cp_protrej, - ipv6cp_lowerup, - ipv6cp_lowerdown, - ipv6cp_open, - ipv6cp_close, -#if PRINTPKT_SUPPORT - ipv6cp_printpkt, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - NULL, -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "IPV6CP", - "IPV6", -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - ipv6cp_option_list, - ipv6_check_options, -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - ipv6_demand_conf, - ipv6_active_pkt -#endif /* DEMAND_SUPPORT */ -}; - -static void ipv6cp_clear_addrs(ppp_pcb *pcb, eui64_t ourid, eui64_t hisid); -#if 0 /* UNUSED */ -static void ipv6cp_script(char *)); -static void ipv6cp_script_done(void *)); -#endif /* UNUSED */ - -/* - * Lengths of configuration options. - */ -#define CILEN_VOID 2 -#define CILEN_COMPRESS 4 /* length for RFC2023 compress opt. */ -#define CILEN_IFACEID 10 /* RFC2472, interface identifier */ - -#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ - (x) == CONFNAK ? "NAK" : "REJ") - -#if 0 /* UNUSED */ -/* - * This state variable is used to ensure that we don't - * run an ipcp-up/down script while one is already running. - */ -static enum script_state { - s_down, - s_up, -} ipv6cp_script_state; -static pid_t ipv6cp_script_pid; -#endif /* UNUSED */ - -static char *llv6_ntoa(eui64_t ifaceid); - -#if PPP_OPTIONS -/* - * setifaceid - set the interface identifiers manually - */ -static int -setifaceid(argv) - char **argv; -{ - char *comma, *arg, c; - ipv6cp_options *wo = &ipv6cp_wantoptions[0]; - struct in6_addr addr; - static int prio_local, prio_remote; - -#define VALIDID(a) ( (((a).s6_addr32[0] == 0) && ((a).s6_addr32[1] == 0)) && \ - (((a).s6_addr32[2] != 0) || ((a).s6_addr32[3] != 0)) ) - - arg = *argv; - if ((comma = strchr(arg, ',')) == NULL) - comma = arg + strlen(arg); - - /* - * If comma first character, then no local identifier - */ - if (comma != arg) { - c = *comma; - *comma = '\0'; - - if (inet_pton(AF_INET6, arg, &addr) == 0 || !VALIDID(addr)) { - option_error("Illegal interface identifier (local): %s", arg); - return 0; - } - - if (option_priority >= prio_local) { - eui64_copy(addr.s6_addr32[2], wo->ourid); - wo->opt_local = 1; - prio_local = option_priority; - } - *comma = c; - } - - /* - * If comma last character, the no remote identifier - */ - if (*comma != 0 && *++comma != '\0') { - if (inet_pton(AF_INET6, comma, &addr) == 0 || !VALIDID(addr)) { - option_error("Illegal interface identifier (remote): %s", comma); - return 0; - } - if (option_priority >= prio_remote) { - eui64_copy(addr.s6_addr32[2], wo->hisid); - wo->opt_remote = 1; - prio_remote = option_priority; - } - } - - if (override_value("+ipv6", option_priority, option_source)) - ipv6cp_protent.enabled_flag = 1; - return 1; -} - -static void -printifaceid(opt, printer, arg) - option_t *opt; - void (*printer)(void *, char *, ...)); - void *arg; -{ - ipv6cp_options *wo = &ipv6cp_wantoptions[0]; - - if (wo->opt_local) - printer(arg, "%s", llv6_ntoa(wo->ourid)); - printer(arg, ","); - if (wo->opt_remote) - printer(arg, "%s", llv6_ntoa(wo->hisid)); -} -#endif /* PPP_OPTIONS */ - -/* - * Make a string representation of a network address. - */ -static char * -llv6_ntoa(eui64_t ifaceid) -{ - static char b[26]; - - sprintf(b, "fe80::%02x%02x:%02x%02x:%02x%02x:%02x%02x", - ifaceid.e8[0], ifaceid.e8[1], ifaceid.e8[2], ifaceid.e8[3], - ifaceid.e8[4], ifaceid.e8[5], ifaceid.e8[6], ifaceid.e8[7]); - - return b; -} - - -/* - * ipv6cp_init - Initialize IPV6CP. - */ -static void ipv6cp_init(ppp_pcb *pcb) { - fsm *f = &pcb->ipv6cp_fsm; - ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; - ipv6cp_options *ao = &pcb->ipv6cp_allowoptions; - - f->pcb = pcb; - f->protocol = PPP_IPV6CP; - f->callbacks = &ipv6cp_callbacks; - fsm_init(f); - -#if 0 /* Not necessary, everything is cleared in ppp_new() */ - memset(wo, 0, sizeof(*wo)); - memset(ao, 0, sizeof(*ao)); -#endif /* 0 */ - - wo->accept_local = 1; - wo->neg_ifaceid = 1; - ao->neg_ifaceid = 1; - -#ifdef IPV6CP_COMP - wo->neg_vj = 1; - ao->neg_vj = 1; - wo->vj_protocol = IPV6CP_COMP; -#endif - -} - - -/* - * ipv6cp_open - IPV6CP is allowed to come up. - */ -static void ipv6cp_open(ppp_pcb *pcb) { - fsm_open(&pcb->ipv6cp_fsm); -} - - -/* - * ipv6cp_close - Take IPV6CP down. - */ -static void ipv6cp_close(ppp_pcb *pcb, const char *reason) { - fsm_close(&pcb->ipv6cp_fsm, reason); -} - - -/* - * ipv6cp_lowerup - The lower layer is up. - */ -static void ipv6cp_lowerup(ppp_pcb *pcb) { - fsm_lowerup(&pcb->ipv6cp_fsm); -} - - -/* - * ipv6cp_lowerdown - The lower layer is down. - */ -static void ipv6cp_lowerdown(ppp_pcb *pcb) { - fsm_lowerdown(&pcb->ipv6cp_fsm); -} - - -/* - * ipv6cp_input - Input IPV6CP packet. - */ -static void ipv6cp_input(ppp_pcb *pcb, u_char *p, int len) { - fsm_input(&pcb->ipv6cp_fsm, p, len); -} - - -/* - * ipv6cp_protrej - A Protocol-Reject was received for IPV6CP. - * - * Pretend the lower layer went down, so we shut up. - */ -static void ipv6cp_protrej(ppp_pcb *pcb) { - fsm_lowerdown(&pcb->ipv6cp_fsm); -} - - -/* - * ipv6cp_resetci - Reset our CI. - */ -static void ipv6cp_resetci(fsm *f) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - ipv6cp_options *ao = &pcb->ipv6cp_allowoptions; - - wo->req_ifaceid = wo->neg_ifaceid && ao->neg_ifaceid; - - if (!wo->opt_local) { - eui64_magic_nz(wo->ourid); - } - - *go = *wo; - eui64_zero(go->hisid); /* last proposed interface identifier */ -} - - -/* - * ipv6cp_cilen - Return length of our CI. - */ -static int ipv6cp_cilen(fsm *f) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - -#ifdef IPV6CP_COMP -#define LENCIVJ(neg) (neg ? CILEN_COMPRESS : 0) -#endif /* IPV6CP_COMP */ -#define LENCIIFACEID(neg) (neg ? CILEN_IFACEID : 0) - - return (LENCIIFACEID(go->neg_ifaceid) + -#ifdef IPV6CP_COMP - LENCIVJ(go->neg_vj) + -#endif /* IPV6CP_COMP */ - 0); -} - - -/* - * ipv6cp_addci - Add our desired CIs to a packet. - */ -static void ipv6cp_addci(fsm *f, u_char *ucp, int *lenp) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - int len = *lenp; - -#ifdef IPV6CP_COMP -#define ADDCIVJ(opt, neg, val) \ - if (neg) { \ - int vjlen = CILEN_COMPRESS; \ - if (len >= vjlen) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(vjlen, ucp); \ - PUTSHORT(val, ucp); \ - len -= vjlen; \ - } else \ - neg = 0; \ - } -#endif /* IPV6CP_COMP */ - -#define ADDCIIFACEID(opt, neg, val1) \ - if (neg) { \ - int idlen = CILEN_IFACEID; \ - if (len >= idlen) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(idlen, ucp); \ - eui64_put(val1, ucp); \ - len -= idlen; \ - } else \ - neg = 0; \ - } - - ADDCIIFACEID(CI_IFACEID, go->neg_ifaceid, go->ourid); - -#ifdef IPV6CP_COMP - ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol); -#endif /* IPV6CP_COMP */ - - *lenp -= len; -} - - -/* - * ipv6cp_ackci - Ack our CIs. - * - * Returns: - * 0 - Ack was bad. - * 1 - Ack was good. - */ -static int ipv6cp_ackci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - u_short cilen, citype; -#ifdef IPV6CP_COMP - u_short cishort; -#endif /* IPV6CP_COMP */ - eui64_t ifaceid; - - /* - * CIs must be in exactly the same order that we sent... - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ - -#ifdef IPV6CP_COMP -#define ACKCIVJ(opt, neg, val) \ - if (neg) { \ - int vjlen = CILEN_COMPRESS; \ - if ((len -= vjlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != vjlen || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != val) \ - goto bad; \ - } -#endif /* IPV6CP_COMP */ - -#define ACKCIIFACEID(opt, neg, val1) \ - if (neg) { \ - int idlen = CILEN_IFACEID; \ - if ((len -= idlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != idlen || \ - citype != opt) \ - goto bad; \ - eui64_get(ifaceid, p); \ - if (! eui64_equals(val1, ifaceid)) \ - goto bad; \ - } - - ACKCIIFACEID(CI_IFACEID, go->neg_ifaceid, go->ourid); - -#ifdef IPV6CP_COMP - ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol); -#endif /* IPV6CP_COMP */ - - /* - * If there are any remaining CIs, then this packet is bad. - */ - if (len != 0) - goto bad; - return (1); - -bad: - IPV6CPDEBUG(("ipv6cp_ackci: received bad Ack!")); - return (0); -} - -/* - * ipv6cp_nakci - Peer has sent a NAK for some of our CIs. - * This should not modify any state if the Nak is bad - * or if IPV6CP is in the OPENED state. - * - * Returns: - * 0 - Nak was bad. - * 1 - Nak was good. - */ -static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - u_char citype, cilen, *next; -#ifdef IPV6CP_COMP - u_short cishort; -#endif /* IPV6CP_COMP */ - eui64_t ifaceid; - ipv6cp_options no; /* options we've seen Naks for */ - ipv6cp_options try_; /* options to request next time */ - - BZERO(&no, sizeof(no)); - try_ = *go; - - /* - * Any Nak'd CIs must be in exactly the same order that we sent. - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ -#define NAKCIIFACEID(opt, neg, code) \ - if (go->neg && \ - len >= (cilen = CILEN_IFACEID) && \ - p[1] == cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - eui64_get(ifaceid, p); \ - no.neg = 1; \ - code \ - } - -#ifdef IPV6CP_COMP -#define NAKCIVJ(opt, neg, code) \ - if (go->neg && \ - ((cilen = p[1]) == CILEN_COMPRESS) && \ - len >= cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - no.neg = 1; \ - code \ - } -#endif /* IPV6CP_COMP */ - - /* - * Accept the peer's idea of {our,his} interface identifier, if different - * from our idea, only if the accept_{local,remote} flag is set. - */ - NAKCIIFACEID(CI_IFACEID, neg_ifaceid, - if (treat_as_reject) { - try_.neg_ifaceid = 0; - } else if (go->accept_local) { - while (eui64_iszero(ifaceid) || - eui64_equals(ifaceid, go->hisid)) /* bad luck */ - eui64_magic(ifaceid); - try_.ourid = ifaceid; - IPV6CPDEBUG(("local LL address %s", llv6_ntoa(ifaceid))); - } - ); - -#ifdef IPV6CP_COMP - NAKCIVJ(CI_COMPRESSTYPE, neg_vj, - { - if (cishort == IPV6CP_COMP && !treat_as_reject) { - try_.vj_protocol = cishort; - } else { - try_.neg_vj = 0; - } - } - ); -#endif /* IPV6CP_COMP */ - - /* - * There may be remaining CIs, if the peer is requesting negotiation - * on an option that we didn't include in our request packet. - * If they want to negotiate about interface identifier, we comply. - * If they want us to ask for compression, we refuse. - */ - while (len >= CILEN_VOID) { - GETCHAR(citype, p); - GETCHAR(cilen, p); - if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) - goto bad; - next = p + cilen - 2; - - switch (citype) { -#ifdef IPV6CP_COMP - case CI_COMPRESSTYPE: - if (go->neg_vj || no.neg_vj || - (cilen != CILEN_COMPRESS)) - goto bad; - no.neg_vj = 1; - break; -#endif /* IPV6CP_COMP */ - case CI_IFACEID: - if (go->neg_ifaceid || no.neg_ifaceid || cilen != CILEN_IFACEID) - goto bad; - try_.neg_ifaceid = 1; - eui64_get(ifaceid, p); - if (go->accept_local) { - while (eui64_iszero(ifaceid) || - eui64_equals(ifaceid, go->hisid)) /* bad luck */ - eui64_magic(ifaceid); - try_.ourid = ifaceid; - } - no.neg_ifaceid = 1; - break; - default: - break; - } - p = next; - } - - /* If there is still anything left, this packet is bad. */ - if (len != 0) - goto bad; - - /* - * OK, the Nak is good. Now we can update state. - */ - if (f->state != PPP_FSM_OPENED) - *go = try_; - - return 1; - -bad: - IPV6CPDEBUG(("ipv6cp_nakci: received bad Nak!")); - return 0; -} - - -/* - * ipv6cp_rejci - Reject some of our CIs. - */ -static int ipv6cp_rejci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - u_char cilen; -#ifdef IPV6CP_COMP - u_short cishort; -#endif /* IPV6CP_COMP */ - eui64_t ifaceid; - ipv6cp_options try_; /* options to request next time */ - - try_ = *go; - /* - * Any Rejected CIs must be in exactly the same order that we sent. - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ -#define REJCIIFACEID(opt, neg, val1) \ - if (go->neg && \ - len >= (cilen = CILEN_IFACEID) && \ - p[1] == cilen && \ - p[0] == opt) { \ - len -= cilen; \ - INCPTR(2, p); \ - eui64_get(ifaceid, p); \ - /* Check rejected value. */ \ - if (! eui64_equals(ifaceid, val1)) \ - goto bad; \ - try_.neg = 0; \ - } - -#ifdef IPV6CP_COMP -#define REJCIVJ(opt, neg, val) \ - if (go->neg && \ - p[1] == CILEN_COMPRESS && \ - len >= p[1] && \ - p[0] == opt) { \ - len -= p[1]; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - /* Check rejected value. */ \ - if (cishort != val) \ - goto bad; \ - try_.neg = 0; \ - } -#endif /* IPV6CP_COMP */ - - REJCIIFACEID(CI_IFACEID, neg_ifaceid, go->ourid); - -#ifdef IPV6CP_COMP - REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol); -#endif /* IPV6CP_COMP */ - - /* - * If there are any remaining CIs, then this packet is bad. - */ - if (len != 0) - goto bad; - /* - * Now we can update state. - */ - if (f->state != PPP_FSM_OPENED) - *go = try_; - return 1; - -bad: - IPV6CPDEBUG(("ipv6cp_rejci: received bad Reject!")); - return 0; -} - - -/* - * ipv6cp_reqci - Check the peer's requested CIs and send appropriate response. - * - * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified - * appropriately. If reject_if_disagree is non-zero, doesn't return - * CONFNAK; returns CONFREJ if it can't return CONFACK. - * - * inp = Requested CIs - * len = Length of requested CIs - * - */ -static int ipv6cp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; - ipv6cp_options *ho = &pcb->ipv6cp_hisoptions; - ipv6cp_options *ao = &pcb->ipv6cp_allowoptions; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - u_char *cip, *next; /* Pointer to current and next CIs */ - u_short cilen, citype; /* Parsed len, type */ -#ifdef IPV6CP_COMP - u_short cishort; /* Parsed short value */ -#endif /* IPV6CP_COMP */ - eui64_t ifaceid; /* Parsed interface identifier */ - int rc = CONFACK; /* Final packet return code */ - int orc; /* Individual option return code */ - u_char *p; /* Pointer to next char to parse */ - u_char *ucp = inp; /* Pointer to current output char */ - int l = *len; /* Length left */ - - /* - * Reset all his options. - */ - BZERO(ho, sizeof(*ho)); - - /* - * Process all his options. - */ - next = inp; - while (l) { - orc = CONFACK; /* Assume success */ - cip = p = next; /* Remember begining of CI */ - if (l < 2 || /* Not enough data for CI header or */ - p[1] < 2 || /* CI length too small or */ - p[1] > l) { /* CI length too big? */ - IPV6CPDEBUG(("ipv6cp_reqci: bad CI length!")); - orc = CONFREJ; /* Reject bad CI */ - cilen = l; /* Reject till end of packet */ - l = 0; /* Don't loop again */ - goto endswitch; - } - GETCHAR(citype, p); /* Parse CI type */ - GETCHAR(cilen, p); /* Parse CI length */ - l -= cilen; /* Adjust remaining length */ - next += cilen; /* Step to next CI */ - - switch (citype) { /* Check CI type */ - case CI_IFACEID: - IPV6CPDEBUG(("ipv6cp: received interface identifier ")); - - if (!ao->neg_ifaceid || - cilen != CILEN_IFACEID) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - - /* - * If he has no interface identifier, or if we both have same - * identifier then NAK it with new idea. - * In particular, if we don't know his identifier, but he does, - * then accept it. - */ - eui64_get(ifaceid, p); - IPV6CPDEBUG(("(%s)", llv6_ntoa(ifaceid))); - if (eui64_iszero(ifaceid) && eui64_iszero(go->ourid)) { - orc = CONFREJ; /* Reject CI */ - break; - } - if (!eui64_iszero(wo->hisid) && - !eui64_equals(ifaceid, wo->hisid) && - eui64_iszero(go->hisid)) { - - orc = CONFNAK; - ifaceid = wo->hisid; - go->hisid = ifaceid; - DECPTR(sizeof(ifaceid), p); - eui64_put(ifaceid, p); - } else - if (eui64_iszero(ifaceid) || eui64_equals(ifaceid, go->ourid)) { - orc = CONFNAK; - if (eui64_iszero(go->hisid)) /* first time, try option */ - ifaceid = wo->hisid; - while (eui64_iszero(ifaceid) || - eui64_equals(ifaceid, go->ourid)) /* bad luck */ - eui64_magic(ifaceid); - go->hisid = ifaceid; - DECPTR(sizeof(ifaceid), p); - eui64_put(ifaceid, p); - } - - ho->neg_ifaceid = 1; - ho->hisid = ifaceid; - break; - -#ifdef IPV6CP_COMP - case CI_COMPRESSTYPE: - IPV6CPDEBUG(("ipv6cp: received COMPRESSTYPE ")); - if (!ao->neg_vj || - (cilen != CILEN_COMPRESS)) { - orc = CONFREJ; - break; - } - GETSHORT(cishort, p); - IPV6CPDEBUG(("(%d)", cishort)); - - if (!(cishort == IPV6CP_COMP)) { - orc = CONFREJ; - break; - } - - ho->neg_vj = 1; - ho->vj_protocol = cishort; - break; -#endif /* IPV6CP_COMP */ - - default: - orc = CONFREJ; - break; - } - -endswitch: - IPV6CPDEBUG((" (%s)\n", CODENAME(orc))); - - if (orc == CONFACK && /* Good CI */ - rc != CONFACK) /* but prior CI wasnt? */ - continue; /* Don't send this one */ - - if (orc == CONFNAK) { /* Nak this CI? */ - if (reject_if_disagree) /* Getting fed up with sending NAKs? */ - orc = CONFREJ; /* Get tough if so */ - else { - if (rc == CONFREJ) /* Rejecting prior CI? */ - continue; /* Don't send this one */ - if (rc == CONFACK) { /* Ack'd all prior CIs? */ - rc = CONFNAK; /* Not anymore... */ - ucp = inp; /* Backup */ - } - } - } - - if (orc == CONFREJ && /* Reject this CI */ - rc != CONFREJ) { /* but no prior ones? */ - rc = CONFREJ; - ucp = inp; /* Backup */ - } - - /* Need to move CI? */ - if (ucp != cip) - MEMCPY(ucp, cip, cilen); /* Move it */ - - /* Update output pointer */ - INCPTR(cilen, ucp); - } - - /* - * If we aren't rejecting this packet, and we want to negotiate - * their identifier and they didn't send their identifier, then we - * send a NAK with a CI_IFACEID option appended. We assume the - * input buffer is long enough that we can append the extra - * option safely. - */ - if (rc != CONFREJ && !ho->neg_ifaceid && - wo->req_ifaceid && !reject_if_disagree) { - if (rc == CONFACK) { - rc = CONFNAK; - ucp = inp; /* reset pointer */ - wo->req_ifaceid = 0; /* don't ask again */ - } - PUTCHAR(CI_IFACEID, ucp); - PUTCHAR(CILEN_IFACEID, ucp); - eui64_put(wo->hisid, ucp); - } - - *len = ucp - inp; /* Compute output length */ - IPV6CPDEBUG(("ipv6cp: returning Configure-%s", CODENAME(rc))); - return (rc); /* Return final code */ -} - -#if PPP_OPTIONS -/* - * ipv6_check_options - check that any IP-related options are OK, - * and assign appropriate defaults. - */ -static void ipv6_check_options() { - ipv6cp_options *wo = &ipv6cp_wantoptions[0]; - - if (!ipv6cp_protent.enabled_flag) - return; - - /* - * Persistent link-local id is only used when user has not explicitly - * configure/hard-code the id - */ - if ((wo->use_persistent) && (!wo->opt_local) && (!wo->opt_remote)) { - - /* - * On systems where there are no Ethernet interfaces used, there - * may be other ways to obtain a persistent id. Right now, it - * will fall back to using magic [see eui64_magic] below when - * an EUI-48 from MAC address can't be obtained. Other possibilities - * include obtaining EEPROM serial numbers, or some other unique - * yet persistent number. On Sparc platforms, this is possible, - * but too bad there's no standards yet for x86 machines. - */ - if (ether_to_eui64(&wo->ourid)) { - wo->opt_local = 1; - } - } - - if (!wo->opt_local) { /* init interface identifier */ - if (wo->use_ip && eui64_iszero(wo->ourid)) { - eui64_setlo32(wo->ourid, lwip_ntohl(ipcp_wantoptions[0].ouraddr)); - if (!eui64_iszero(wo->ourid)) - wo->opt_local = 1; - } - - while (eui64_iszero(wo->ourid)) - eui64_magic(wo->ourid); - } - - if (!wo->opt_remote) { - if (wo->use_ip && eui64_iszero(wo->hisid)) { - eui64_setlo32(wo->hisid, lwip_ntohl(ipcp_wantoptions[0].hisaddr)); - if (!eui64_iszero(wo->hisid)) - wo->opt_remote = 1; - } - } - - if (demand && (eui64_iszero(wo->ourid) || eui64_iszero(wo->hisid))) { - option_error("local/remote LL address required for demand-dialling\n"); - exit(1); - } -} -#endif /* PPP_OPTIONS */ - -#if DEMAND_SUPPORT -/* - * ipv6_demand_conf - configure the interface as though - * IPV6CP were up, for use with dial-on-demand. - */ -static int ipv6_demand_conf(int u) { - ipv6cp_options *wo = &ipv6cp_wantoptions[u]; - - if (!sif6up(u)) - return 0; - - if (!sif6addr(u, wo->ourid, wo->hisid)) - return 0; - - if (!sifnpmode(u, PPP_IPV6, NPMODE_QUEUE)) - return 0; - - ppp_notice("ipv6_demand_conf"); - ppp_notice("local LL address %s", llv6_ntoa(wo->ourid)); - ppp_notice("remote LL address %s", llv6_ntoa(wo->hisid)); - - return 1; -} -#endif /* DEMAND_SUPPORT */ - - -/* - * ipv6cp_up - IPV6CP has come UP. - * - * Configure the IPv6 network interface appropriately and bring it up. - */ -static void ipv6cp_up(fsm *f) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; - ipv6cp_options *ho = &pcb->ipv6cp_hisoptions; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - - IPV6CPDEBUG(("ipv6cp: up")); - - /* - * We must have a non-zero LL address for both ends of the link. - */ - if (!ho->neg_ifaceid) - ho->hisid = wo->hisid; - -#if 0 /* UNUSED */ - if(!no_ifaceid_neg) { -#endif /* UNUSED */ - if (eui64_iszero(ho->hisid)) { - ppp_error("Could not determine remote LL address"); - ipv6cp_close(f->pcb, "Could not determine remote LL address"); - return; - } - if (eui64_iszero(go->ourid)) { - ppp_error("Could not determine local LL address"); - ipv6cp_close(f->pcb, "Could not determine local LL address"); - return; - } - if (eui64_equals(go->ourid, ho->hisid)) { - ppp_error("local and remote LL addresses are equal"); - ipv6cp_close(f->pcb, "local and remote LL addresses are equal"); - return; - } -#if 0 /* UNUSED */ - } -#endif /* UNUSED */ -#if 0 /* UNUSED */ - script_setenv("LLLOCAL", llv6_ntoa(go->ourid), 0); - script_setenv("LLREMOTE", llv6_ntoa(ho->hisid), 0); -#endif /* UNUSED */ - -#ifdef IPV6CP_COMP - /* set tcp compression */ - sif6comp(f->unit, ho->neg_vj); -#endif - -#if DEMAND_SUPPORT - /* - * If we are doing dial-on-demand, the interface is already - * configured, so we put out any saved-up packets, then set the - * interface to pass IPv6 packets. - */ - if (demand) { - if (! eui64_equals(go->ourid, wo->ourid) || - ! eui64_equals(ho->hisid, wo->hisid)) { - if (! eui64_equals(go->ourid, wo->ourid)) - warn("Local LL address changed to %s", - llv6_ntoa(go->ourid)); - if (! eui64_equals(ho->hisid, wo->hisid)) - warn("Remote LL address changed to %s", - llv6_ntoa(ho->hisid)); - ipv6cp_clear_addrs(f->pcb, go->ourid, ho->hisid); - - /* Set the interface to the new addresses */ - if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { - if (debug) - warn("sif6addr failed"); - ipv6cp_close(f->unit, "Interface configuration failed"); - return; - } - - } - demand_rexmit(PPP_IPV6); - sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS); - - } else -#endif /* DEMAND_SUPPORT */ - { - /* - * Set LL addresses - */ - if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { - PPPDEBUG(LOG_DEBUG, ("sif6addr failed")); - ipv6cp_close(f->pcb, "Interface configuration failed"); - return; - } - - /* bring the interface up for IPv6 */ - if (!sif6up(f->pcb)) { - PPPDEBUG(LOG_DEBUG, ("sif6up failed (IPV6)")); - ipv6cp_close(f->pcb, "Interface configuration failed"); - return; - } -#if DEMAND_SUPPORT - sifnpmode(f->pcb, PPP_IPV6, NPMODE_PASS); -#endif /* DEMAND_SUPPORT */ - - ppp_notice("local LL address %s", llv6_ntoa(go->ourid)); - ppp_notice("remote LL address %s", llv6_ntoa(ho->hisid)); - } - - np_up(f->pcb, PPP_IPV6); - pcb->ipv6cp_is_up = 1; - -#if 0 /* UNUSED */ - /* - * Execute the ipv6-up script, like this: - * /etc/ppp/ipv6-up interface tty speed local-LL remote-LL - */ - if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) { - ipv6cp_script_state = s_up; - ipv6cp_script(_PATH_IPV6UP); - } -#endif /* UNUSED */ -} - - -/* - * ipv6cp_down - IPV6CP has gone DOWN. - * - * Take the IPv6 network interface down, clear its addresses - * and delete routes through it. - */ -static void ipv6cp_down(fsm *f) { - ppp_pcb *pcb = f->pcb; - ipv6cp_options *go = &pcb->ipv6cp_gotoptions; - ipv6cp_options *ho = &pcb->ipv6cp_hisoptions; - - IPV6CPDEBUG(("ipv6cp: down")); -#if PPP_STATS_SUPPORT - update_link_stats(f->unit); -#endif /* PPP_STATS_SUPPORT */ - if (pcb->ipv6cp_is_up) { - pcb->ipv6cp_is_up = 0; - np_down(f->pcb, PPP_IPV6); - } -#ifdef IPV6CP_COMP - sif6comp(f->unit, 0); -#endif - -#if DEMAND_SUPPORT - /* - * If we are doing dial-on-demand, set the interface - * to queue up outgoing packets (for now). - */ - if (demand) { - sifnpmode(f->pcb, PPP_IPV6, NPMODE_QUEUE); - } else -#endif /* DEMAND_SUPPORT */ - { -#if DEMAND_SUPPORT - sifnpmode(f->pcb, PPP_IPV6, NPMODE_DROP); -#endif /* DEMAND_SUPPORT */ - ipv6cp_clear_addrs(f->pcb, - go->ourid, - ho->hisid); - sif6down(f->pcb); - } - -#if 0 /* UNUSED */ - /* Execute the ipv6-down script */ - if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) { - ipv6cp_script_state = s_down; - ipv6cp_script(_PATH_IPV6DOWN); - } -#endif /* UNUSED */ -} - - -/* - * ipv6cp_clear_addrs() - clear the interface addresses, routes, - * proxy neighbour discovery entries, etc. - */ -static void ipv6cp_clear_addrs(ppp_pcb *pcb, eui64_t ourid, eui64_t hisid) { - cif6addr(pcb, ourid, hisid); -} - - -/* - * ipv6cp_finished - possibly shut down the lower layers. - */ -static void ipv6cp_finished(fsm *f) { - np_finished(f->pcb, PPP_IPV6); -} - - -#if 0 /* UNUSED */ -/* - * ipv6cp_script_done - called when the ipv6-up or ipv6-down script - * has finished. - */ -static void -ipv6cp_script_done(arg) - void *arg; -{ - ipv6cp_script_pid = 0; - switch (ipv6cp_script_state) { - case s_up: - if (ipv6cp_fsm[0].state != PPP_FSM_OPENED) { - ipv6cp_script_state = s_down; - ipv6cp_script(_PATH_IPV6DOWN); - } - break; - case s_down: - if (ipv6cp_fsm[0].state == PPP_FSM_OPENED) { - ipv6cp_script_state = s_up; - ipv6cp_script(_PATH_IPV6UP); - } - break; - } -} - - -/* - * ipv6cp_script - Execute a script with arguments - * interface-name tty-name speed local-LL remote-LL. - */ -static void -ipv6cp_script(script) - char *script; -{ - char strspeed[32], strlocal[32], strremote[32]; - char *argv[8]; - - sprintf(strspeed, "%d", baud_rate); - strcpy(strlocal, llv6_ntoa(ipv6cp_gotoptions[0].ourid)); - strcpy(strremote, llv6_ntoa(ipv6cp_hisoptions[0].hisid)); - - argv[0] = script; - argv[1] = ifname; - argv[2] = devnam; - argv[3] = strspeed; - argv[4] = strlocal; - argv[5] = strremote; - argv[6] = ipparam; - argv[7] = NULL; - - ipv6cp_script_pid = run_program(script, argv, 0, ipv6cp_script_done, - NULL, 0); -} -#endif /* UNUSED */ - -#if PRINTPKT_SUPPORT -/* - * ipv6cp_printpkt - print the contents of an IPV6CP packet. - */ -static const char* const ipv6cp_codenames[] = { - "ConfReq", "ConfAck", "ConfNak", "ConfRej", - "TermReq", "TermAck", "CodeRej" -}; - -static int ipv6cp_printpkt(const u_char *p, int plen, - void (*printer)(void *, const char *, ...), void *arg) { - int code, id, len, olen; - const u_char *pstart, *optend; -#ifdef IPV6CP_COMP - u_short cishort; -#endif /* IPV6CP_COMP */ - eui64_t ifaceid; - - if (plen < HEADERLEN) - return 0; - pstart = p; - GETCHAR(code, p); - GETCHAR(id, p); - GETSHORT(len, p); - if (len < HEADERLEN || len > plen) - return 0; - - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipv6cp_codenames)) - printer(arg, " %s", ipv6cp_codenames[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= HEADERLEN; - switch (code) { - case CONFREQ: - case CONFACK: - case CONFNAK: - case CONFREJ: - /* print option list */ - while (len >= 2) { - GETCHAR(code, p); - GETCHAR(olen, p); - p -= 2; - if (olen < 2 || olen > len) { - break; - } - printer(arg, " <"); - len -= olen; - optend = p + olen; - switch (code) { -#ifdef IPV6CP_COMP - case CI_COMPRESSTYPE: - if (olen >= CILEN_COMPRESS) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "compress "); - printer(arg, "0x%x", cishort); - } - break; -#endif /* IPV6CP_COMP */ - case CI_IFACEID: - if (olen == CILEN_IFACEID) { - p += 2; - eui64_get(ifaceid, p); - printer(arg, "addr %s", llv6_ntoa(ifaceid)); - } - break; - default: - break; - } - while (p < optend) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - printer(arg, ">"); - } - break; - - case TERMACK: - case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; - default: - break; - } - - /* print the rest of the bytes in the packet */ - for (; len > 0; --len) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - - return p - pstart; -} -#endif /* PRINTPKT_SUPPORT */ - -#if DEMAND_SUPPORT -/* - * ipv6_active_pkt - see if this IP packet is worth bringing the link up for. - * We don't bring the link up for IP fragments or for TCP FIN packets - * with no data. - */ -#define IP6_HDRLEN 40 /* bytes */ -#define IP6_NHDR_FRAG 44 /* fragment IPv6 header */ -#define TCP_HDRLEN 20 -#define TH_FIN 0x01 - -/* - * We use these macros because the IP header may be at an odd address, - * and some compilers might use word loads to get th_off or ip_hl. - */ - -#define get_ip6nh(x) (((unsigned char *)(x))[6]) -#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) -#define get_tcpflags(x) (((unsigned char *)(x))[13]) - -static int ipv6_active_pkt(u_char *pkt, int len) { - u_char *tcp; - - len -= PPP_HDRLEN; - pkt += PPP_HDRLEN; - if (len < IP6_HDRLEN) - return 0; - if (get_ip6nh(pkt) == IP6_NHDR_FRAG) - return 0; - if (get_ip6nh(pkt) != IPPROTO_TCP) - return 1; - if (len < IP6_HDRLEN + TCP_HDRLEN) - return 0; - tcp = pkt + IP6_HDRLEN; - if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == IP6_HDRLEN + get_tcpoff(tcp) * 4) - return 0; - return 1; -} -#endif /* DEMAND_SUPPORT */ - -#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ +/* + * ipv6cp.c - PPP IPV6 Control Protocol. + * + * Copyright (c) 1999 Tommi Komulainen. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Tommi Komulainen + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/* Original version, based on RFC2023 : + + Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt, + Alain.Durand@imag.fr, IMAG, + Jean-Luc.Richier@imag.fr, IMAG-LSR. + + Copyright (c) 1998, 1999 Francis.Dupont@inria.fr, GIE DYADE, + Alain.Durand@imag.fr, IMAG, + Jean-Luc.Richier@imag.fr, IMAG-LSR. + + Ce travail a été fait au sein du GIE DYADE (Groupement d'Intérêt + Économique ayant pour membres BULL S.A. et l'INRIA). + + Ce logiciel informatique est disponible aux conditions + usuelles dans la recherche, c'est-à-dire qu'il peut + être utilisé, copié, modifié, distribué à l'unique + condition que ce texte soit conservé afin que + l'origine de ce logiciel soit reconnue. + + Le nom de l'Institut National de Recherche en Informatique + et en Automatique (INRIA), de l'IMAG, ou d'une personne morale + ou physique ayant participé à l'élaboration de ce logiciel ne peut + être utilisé sans son accord préalable explicite. + + Ce logiciel est fourni tel quel sans aucune garantie, + support ou responsabilité d'aucune sorte. + Ce logiciel est dérivé de sources d'origine + "University of California at Berkeley" et + "Digital Equipment Corporation" couvertes par des copyrights. + + L'Institut d'Informatique et de Mathématiques Appliquées de Grenoble (IMAG) + est une fédération d'unités mixtes de recherche du CNRS, de l'Institut National + Polytechnique de Grenoble et de l'Université Joseph Fourier regroupant + sept laboratoires dont le laboratoire Logiciels, Systèmes, Réseaux (LSR). + + This work has been done in the context of GIE DYADE (joint R & D venture + between BULL S.A. and INRIA). + + This software is available with usual "research" terms + with the aim of retain credits of the software. + Permission to use, copy, modify and distribute this software for any + purpose and without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies, + and the name of INRIA, IMAG, or any contributor not be used in advertising + or publicity pertaining to this material without the prior explicit + permission. The software is provided "as is" without any + warranties, support or liabilities of any kind. + This software is derived from source code from + "University of California at Berkeley" and + "Digital Equipment Corporation" protected by copyrights. + + Grenoble's Institute of Computer Science and Applied Mathematics (IMAG) + is a federation of seven research units funded by the CNRS, National + Polytechnic Institute of Grenoble and University Joseph Fourier. + The research unit in Software, Systems, Networks (LSR) is member of IMAG. +*/ + +/* + * Derived from : + * + * + * ipcp.c - PPP IP Control Protocol. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $Id: ipv6cp.c,v 1.21 2005/08/25 23:59:34 paulus Exp $ + */ + +/* + * @todo: + * + * Proxy Neighbour Discovery. + * + * Better defines for selecting the ordering of + * interface up / set address. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#if 0 /* UNUSED */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/fsm.h" +#include "netif/ppp/ipcp.h" +#include "netif/ppp/ipv6cp.h" +#include "netif/ppp/magic.h" + +/* global vars */ +#if 0 /* UNUSED */ +int no_ifaceid_neg = 0; +#endif /* UNUSED */ + +/* + * Callbacks for fsm code. (CI = Configuration Information) + */ +static void ipv6cp_resetci(fsm *f); /* Reset our CI */ +static int ipv6cp_cilen(fsm *f); /* Return length of our CI */ +static void ipv6cp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI */ +static int ipv6cp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ +static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject); /* Peer nak'd our CI */ +static int ipv6cp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ +static int ipv6cp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree); /* Rcv CI */ +static void ipv6cp_up(fsm *f); /* We're UP */ +static void ipv6cp_down(fsm *f); /* We're DOWN */ +static void ipv6cp_finished(fsm *f); /* Don't need lower layer */ + +static const fsm_callbacks ipv6cp_callbacks = { /* IPV6CP callback routines */ + ipv6cp_resetci, /* Reset our Configuration Information */ + ipv6cp_cilen, /* Length of our Configuration Information */ + ipv6cp_addci, /* Add our Configuration Information */ + ipv6cp_ackci, /* ACK our Configuration Information */ + ipv6cp_nakci, /* NAK our Configuration Information */ + ipv6cp_rejci, /* Reject our Configuration Information */ + ipv6cp_reqci, /* Request peer's Configuration Information */ + ipv6cp_up, /* Called when fsm reaches OPENED state */ + ipv6cp_down, /* Called when fsm leaves OPENED state */ + NULL, /* Called when we want the lower layer up */ + ipv6cp_finished, /* Called when we want the lower layer down */ + NULL, /* Called when Protocol-Reject received */ + NULL, /* Retransmission is necessary */ + NULL, /* Called to handle protocol-specific codes */ + "IPV6CP" /* String name of protocol */ +}; + +#if PPP_OPTIONS +/* + * Command-line options. + */ +static int setifaceid(char **arg)); +static void printifaceid(option_t *, + void (*)(void *, char *, ...), void *)); + +static option_t ipv6cp_option_list[] = { + { "ipv6", o_special, (void *)setifaceid, + "Set interface identifiers for IPV6", + OPT_A2PRINTER, (void *)printifaceid }, + + { "+ipv6", o_bool, &ipv6cp_protent.enabled_flag, + "Enable IPv6 and IPv6CP", OPT_PRIO | 1 }, + { "noipv6", o_bool, &ipv6cp_protent.enabled_flag, + "Disable IPv6 and IPv6CP", OPT_PRIOSUB }, + { "-ipv6", o_bool, &ipv6cp_protent.enabled_flag, + "Disable IPv6 and IPv6CP", OPT_PRIOSUB | OPT_ALIAS }, + + { "ipv6cp-accept-local", o_bool, &ipv6cp_allowoptions[0].accept_local, + "Accept peer's interface identifier for us", 1 }, + + { "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip, + "Use (default) IPv4 address as interface identifier", 1 }, + + { "ipv6cp-use-persistent", o_bool, &ipv6cp_wantoptions[0].use_persistent, + "Use uniquely-available persistent value for link local address", 1 }, + + { "ipv6cp-restart", o_int, &ipv6cp_fsm[0].timeouttime, + "Set timeout for IPv6CP", OPT_PRIO }, + { "ipv6cp-max-terminate", o_int, &ipv6cp_fsm[0].maxtermtransmits, + "Set max #xmits for term-reqs", OPT_PRIO }, + { "ipv6cp-max-configure", o_int, &ipv6cp_fsm[0].maxconfreqtransmits, + "Set max #xmits for conf-reqs", OPT_PRIO }, + { "ipv6cp-max-failure", o_int, &ipv6cp_fsm[0].maxnakloops, + "Set max #conf-naks for IPv6CP", OPT_PRIO }, + + { NULL } +}; +#endif /* PPP_OPTIONS */ + +/* + * Protocol entry points from main code. + */ +static void ipv6cp_init(ppp_pcb *pcb); +static void ipv6cp_open(ppp_pcb *pcb); +static void ipv6cp_close(ppp_pcb *pcb, const char *reason); +static void ipv6cp_lowerup(ppp_pcb *pcb); +static void ipv6cp_lowerdown(ppp_pcb *pcb); +static void ipv6cp_input(ppp_pcb *pcb, u_char *p, int len); +static void ipv6cp_protrej(ppp_pcb *pcb); +#if PPP_OPTIONS +static void ipv6_check_options(void); +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT +static int ipv6_demand_conf(int u); +#endif /* DEMAND_SUPPORT */ +#if PRINTPKT_SUPPORT +static int ipv6cp_printpkt(const u_char *p, int plen, + void (*printer)(void *, const char *, ...), void *arg); +#endif /* PRINTPKT_SUPPORT */ +#if DEMAND_SUPPORT +static int ipv6_active_pkt(u_char *pkt, int len); +#endif /* DEMAND_SUPPORT */ + +const struct protent ipv6cp_protent = { + PPP_IPV6CP, + ipv6cp_init, + ipv6cp_input, + ipv6cp_protrej, + ipv6cp_lowerup, + ipv6cp_lowerdown, + ipv6cp_open, + ipv6cp_close, +#if PRINTPKT_SUPPORT + ipv6cp_printpkt, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + NULL, +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "IPV6CP", + "IPV6", +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + ipv6cp_option_list, + ipv6_check_options, +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + ipv6_demand_conf, + ipv6_active_pkt +#endif /* DEMAND_SUPPORT */ +}; + +static void ipv6cp_clear_addrs(ppp_pcb *pcb, eui64_t ourid, eui64_t hisid); +#if 0 /* UNUSED */ +static void ipv6cp_script(char *)); +static void ipv6cp_script_done(void *)); +#endif /* UNUSED */ + +/* + * Lengths of configuration options. + */ +#define CILEN_VOID 2 +#define CILEN_COMPRESS 4 /* length for RFC2023 compress opt. */ +#define CILEN_IFACEID 10 /* RFC2472, interface identifier */ + +#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ + (x) == CONFNAK ? "NAK" : "REJ") + +#if 0 /* UNUSED */ +/* + * This state variable is used to ensure that we don't + * run an ipcp-up/down script while one is already running. + */ +static enum script_state { + s_down, + s_up, +} ipv6cp_script_state; +static pid_t ipv6cp_script_pid; +#endif /* UNUSED */ + +static char *llv6_ntoa(eui64_t ifaceid); + +#if PPP_OPTIONS +/* + * setifaceid - set the interface identifiers manually + */ +static int +setifaceid(argv) + char **argv; +{ + char *comma, *arg, c; + ipv6cp_options *wo = &ipv6cp_wantoptions[0]; + struct in6_addr addr; + static int prio_local, prio_remote; + +#define VALIDID(a) ( (((a).s6_addr32[0] == 0) && ((a).s6_addr32[1] == 0)) && \ + (((a).s6_addr32[2] != 0) || ((a).s6_addr32[3] != 0)) ) + + arg = *argv; + if ((comma = strchr(arg, ',')) == NULL) + comma = arg + strlen(arg); + + /* + * If comma first character, then no local identifier + */ + if (comma != arg) { + c = *comma; + *comma = '\0'; + + if (inet_pton(AF_INET6, arg, &addr) == 0 || !VALIDID(addr)) { + option_error("Illegal interface identifier (local): %s", arg); + return 0; + } + + if (option_priority >= prio_local) { + eui64_copy(addr.s6_addr32[2], wo->ourid); + wo->opt_local = 1; + prio_local = option_priority; + } + *comma = c; + } + + /* + * If comma last character, the no remote identifier + */ + if (*comma != 0 && *++comma != '\0') { + if (inet_pton(AF_INET6, comma, &addr) == 0 || !VALIDID(addr)) { + option_error("Illegal interface identifier (remote): %s", comma); + return 0; + } + if (option_priority >= prio_remote) { + eui64_copy(addr.s6_addr32[2], wo->hisid); + wo->opt_remote = 1; + prio_remote = option_priority; + } + } + + if (override_value("+ipv6", option_priority, option_source)) + ipv6cp_protent.enabled_flag = 1; + return 1; +} + +static void +printifaceid(opt, printer, arg) + option_t *opt; + void (*printer)(void *, char *, ...)); + void *arg; +{ + ipv6cp_options *wo = &ipv6cp_wantoptions[0]; + + if (wo->opt_local) + printer(arg, "%s", llv6_ntoa(wo->ourid)); + printer(arg, ","); + if (wo->opt_remote) + printer(arg, "%s", llv6_ntoa(wo->hisid)); +} +#endif /* PPP_OPTIONS */ + +/* + * Make a string representation of a network address. + */ +static char * +llv6_ntoa(eui64_t ifaceid) +{ + static char b[26]; + + sprintf(b, "fe80::%02x%02x:%02x%02x:%02x%02x:%02x%02x", + ifaceid.e8[0], ifaceid.e8[1], ifaceid.e8[2], ifaceid.e8[3], + ifaceid.e8[4], ifaceid.e8[5], ifaceid.e8[6], ifaceid.e8[7]); + + return b; +} + + +/* + * ipv6cp_init - Initialize IPV6CP. + */ +static void ipv6cp_init(ppp_pcb *pcb) { + fsm *f = &pcb->ipv6cp_fsm; + ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; + ipv6cp_options *ao = &pcb->ipv6cp_allowoptions; + + f->pcb = pcb; + f->protocol = PPP_IPV6CP; + f->callbacks = &ipv6cp_callbacks; + fsm_init(f); + +#if 0 /* Not necessary, everything is cleared in ppp_new() */ + memset(wo, 0, sizeof(*wo)); + memset(ao, 0, sizeof(*ao)); +#endif /* 0 */ + + wo->accept_local = 1; + wo->neg_ifaceid = 1; + ao->neg_ifaceid = 1; + +#ifdef IPV6CP_COMP + wo->neg_vj = 1; + ao->neg_vj = 1; + wo->vj_protocol = IPV6CP_COMP; +#endif + +} + + +/* + * ipv6cp_open - IPV6CP is allowed to come up. + */ +static void ipv6cp_open(ppp_pcb *pcb) { + fsm_open(&pcb->ipv6cp_fsm); +} + + +/* + * ipv6cp_close - Take IPV6CP down. + */ +static void ipv6cp_close(ppp_pcb *pcb, const char *reason) { + fsm_close(&pcb->ipv6cp_fsm, reason); +} + + +/* + * ipv6cp_lowerup - The lower layer is up. + */ +static void ipv6cp_lowerup(ppp_pcb *pcb) { + fsm_lowerup(&pcb->ipv6cp_fsm); +} + + +/* + * ipv6cp_lowerdown - The lower layer is down. + */ +static void ipv6cp_lowerdown(ppp_pcb *pcb) { + fsm_lowerdown(&pcb->ipv6cp_fsm); +} + + +/* + * ipv6cp_input - Input IPV6CP packet. + */ +static void ipv6cp_input(ppp_pcb *pcb, u_char *p, int len) { + fsm_input(&pcb->ipv6cp_fsm, p, len); +} + + +/* + * ipv6cp_protrej - A Protocol-Reject was received for IPV6CP. + * + * Pretend the lower layer went down, so we shut up. + */ +static void ipv6cp_protrej(ppp_pcb *pcb) { + fsm_lowerdown(&pcb->ipv6cp_fsm); +} + + +/* + * ipv6cp_resetci - Reset our CI. + */ +static void ipv6cp_resetci(fsm *f) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + ipv6cp_options *ao = &pcb->ipv6cp_allowoptions; + + wo->req_ifaceid = wo->neg_ifaceid && ao->neg_ifaceid; + + if (!wo->opt_local) { + eui64_magic_nz(wo->ourid); + } + + *go = *wo; + eui64_zero(go->hisid); /* last proposed interface identifier */ +} + + +/* + * ipv6cp_cilen - Return length of our CI. + */ +static int ipv6cp_cilen(fsm *f) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + +#ifdef IPV6CP_COMP +#define LENCIVJ(neg) (neg ? CILEN_COMPRESS : 0) +#endif /* IPV6CP_COMP */ +#define LENCIIFACEID(neg) (neg ? CILEN_IFACEID : 0) + + return (LENCIIFACEID(go->neg_ifaceid) + +#ifdef IPV6CP_COMP + LENCIVJ(go->neg_vj) + +#endif /* IPV6CP_COMP */ + 0); +} + + +/* + * ipv6cp_addci - Add our desired CIs to a packet. + */ +static void ipv6cp_addci(fsm *f, u_char *ucp, int *lenp) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + int len = *lenp; + +#ifdef IPV6CP_COMP +#define ADDCIVJ(opt, neg, val) \ + if (neg) { \ + int vjlen = CILEN_COMPRESS; \ + if (len >= vjlen) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(vjlen, ucp); \ + PUTSHORT(val, ucp); \ + len -= vjlen; \ + } else \ + neg = 0; \ + } +#endif /* IPV6CP_COMP */ + +#define ADDCIIFACEID(opt, neg, val1) \ + if (neg) { \ + int idlen = CILEN_IFACEID; \ + if (len >= idlen) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(idlen, ucp); \ + eui64_put(val1, ucp); \ + len -= idlen; \ + } else \ + neg = 0; \ + } + + ADDCIIFACEID(CI_IFACEID, go->neg_ifaceid, go->ourid); + +#ifdef IPV6CP_COMP + ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol); +#endif /* IPV6CP_COMP */ + + *lenp -= len; +} + + +/* + * ipv6cp_ackci - Ack our CIs. + * + * Returns: + * 0 - Ack was bad. + * 1 - Ack was good. + */ +static int ipv6cp_ackci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + u_short cilen, citype; +#ifdef IPV6CP_COMP + u_short cishort; +#endif /* IPV6CP_COMP */ + eui64_t ifaceid; + + /* + * CIs must be in exactly the same order that we sent... + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ + +#ifdef IPV6CP_COMP +#define ACKCIVJ(opt, neg, val) \ + if (neg) { \ + int vjlen = CILEN_COMPRESS; \ + if ((len -= vjlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != vjlen || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != val) \ + goto bad; \ + } +#endif /* IPV6CP_COMP */ + +#define ACKCIIFACEID(opt, neg, val1) \ + if (neg) { \ + int idlen = CILEN_IFACEID; \ + if ((len -= idlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != idlen || \ + citype != opt) \ + goto bad; \ + eui64_get(ifaceid, p); \ + if (! eui64_equals(val1, ifaceid)) \ + goto bad; \ + } + + ACKCIIFACEID(CI_IFACEID, go->neg_ifaceid, go->ourid); + +#ifdef IPV6CP_COMP + ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol); +#endif /* IPV6CP_COMP */ + + /* + * If there are any remaining CIs, then this packet is bad. + */ + if (len != 0) + goto bad; + return (1); + +bad: + IPV6CPDEBUG(("ipv6cp_ackci: received bad Ack!")); + return (0); +} + +/* + * ipv6cp_nakci - Peer has sent a NAK for some of our CIs. + * This should not modify any state if the Nak is bad + * or if IPV6CP is in the OPENED state. + * + * Returns: + * 0 - Nak was bad. + * 1 - Nak was good. + */ +static int ipv6cp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + u_char citype, cilen, *next; +#ifdef IPV6CP_COMP + u_short cishort; +#endif /* IPV6CP_COMP */ + eui64_t ifaceid; + ipv6cp_options no; /* options we've seen Naks for */ + ipv6cp_options try_; /* options to request next time */ + + BZERO(&no, sizeof(no)); + try_ = *go; + + /* + * Any Nak'd CIs must be in exactly the same order that we sent. + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ +#define NAKCIIFACEID(opt, neg, code) \ + if (go->neg && \ + len >= (cilen = CILEN_IFACEID) && \ + p[1] == cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + eui64_get(ifaceid, p); \ + no.neg = 1; \ + code \ + } + +#ifdef IPV6CP_COMP +#define NAKCIVJ(opt, neg, code) \ + if (go->neg && \ + ((cilen = p[1]) == CILEN_COMPRESS) && \ + len >= cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + no.neg = 1; \ + code \ + } +#endif /* IPV6CP_COMP */ + + /* + * Accept the peer's idea of {our,his} interface identifier, if different + * from our idea, only if the accept_{local,remote} flag is set. + */ + NAKCIIFACEID(CI_IFACEID, neg_ifaceid, + if (treat_as_reject) { + try_.neg_ifaceid = 0; + } else if (go->accept_local) { + while (eui64_iszero(ifaceid) || + eui64_equals(ifaceid, go->hisid)) /* bad luck */ + eui64_magic(ifaceid); + try_.ourid = ifaceid; + IPV6CPDEBUG(("local LL address %s", llv6_ntoa(ifaceid))); + } + ); + +#ifdef IPV6CP_COMP + NAKCIVJ(CI_COMPRESSTYPE, neg_vj, + { + if (cishort == IPV6CP_COMP && !treat_as_reject) { + try_.vj_protocol = cishort; + } else { + try_.neg_vj = 0; + } + } + ); +#endif /* IPV6CP_COMP */ + + /* + * There may be remaining CIs, if the peer is requesting negotiation + * on an option that we didn't include in our request packet. + * If they want to negotiate about interface identifier, we comply. + * If they want us to ask for compression, we refuse. + */ + while (len >= CILEN_VOID) { + GETCHAR(citype, p); + GETCHAR(cilen, p); + if ( cilen < CILEN_VOID || (len -= cilen) < 0 ) + goto bad; + next = p + cilen - 2; + + switch (citype) { +#ifdef IPV6CP_COMP + case CI_COMPRESSTYPE: + if (go->neg_vj || no.neg_vj || + (cilen != CILEN_COMPRESS)) + goto bad; + no.neg_vj = 1; + break; +#endif /* IPV6CP_COMP */ + case CI_IFACEID: + if (go->neg_ifaceid || no.neg_ifaceid || cilen != CILEN_IFACEID) + goto bad; + try_.neg_ifaceid = 1; + eui64_get(ifaceid, p); + if (go->accept_local) { + while (eui64_iszero(ifaceid) || + eui64_equals(ifaceid, go->hisid)) /* bad luck */ + eui64_magic(ifaceid); + try_.ourid = ifaceid; + } + no.neg_ifaceid = 1; + break; + default: + break; + } + p = next; + } + + /* If there is still anything left, this packet is bad. */ + if (len != 0) + goto bad; + + /* + * OK, the Nak is good. Now we can update state. + */ + if (f->state != PPP_FSM_OPENED) + *go = try_; + + return 1; + +bad: + IPV6CPDEBUG(("ipv6cp_nakci: received bad Nak!")); + return 0; +} + + +/* + * ipv6cp_rejci - Reject some of our CIs. + */ +static int ipv6cp_rejci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + u_char cilen; +#ifdef IPV6CP_COMP + u_short cishort; +#endif /* IPV6CP_COMP */ + eui64_t ifaceid; + ipv6cp_options try_; /* options to request next time */ + + try_ = *go; + /* + * Any Rejected CIs must be in exactly the same order that we sent. + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ +#define REJCIIFACEID(opt, neg, val1) \ + if (go->neg && \ + len >= (cilen = CILEN_IFACEID) && \ + p[1] == cilen && \ + p[0] == opt) { \ + len -= cilen; \ + INCPTR(2, p); \ + eui64_get(ifaceid, p); \ + /* Check rejected value. */ \ + if (! eui64_equals(ifaceid, val1)) \ + goto bad; \ + try_.neg = 0; \ + } + +#ifdef IPV6CP_COMP +#define REJCIVJ(opt, neg, val) \ + if (go->neg && \ + p[1] == CILEN_COMPRESS && \ + len >= p[1] && \ + p[0] == opt) { \ + len -= p[1]; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + /* Check rejected value. */ \ + if (cishort != val) \ + goto bad; \ + try_.neg = 0; \ + } +#endif /* IPV6CP_COMP */ + + REJCIIFACEID(CI_IFACEID, neg_ifaceid, go->ourid); + +#ifdef IPV6CP_COMP + REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol); +#endif /* IPV6CP_COMP */ + + /* + * If there are any remaining CIs, then this packet is bad. + */ + if (len != 0) + goto bad; + /* + * Now we can update state. + */ + if (f->state != PPP_FSM_OPENED) + *go = try_; + return 1; + +bad: + IPV6CPDEBUG(("ipv6cp_rejci: received bad Reject!")); + return 0; +} + + +/* + * ipv6cp_reqci - Check the peer's requested CIs and send appropriate response. + * + * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified + * appropriately. If reject_if_disagree is non-zero, doesn't return + * CONFNAK; returns CONFREJ if it can't return CONFACK. + * + * inp = Requested CIs + * len = Length of requested CIs + * + */ +static int ipv6cp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; + ipv6cp_options *ho = &pcb->ipv6cp_hisoptions; + ipv6cp_options *ao = &pcb->ipv6cp_allowoptions; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + u_char *cip, *next; /* Pointer to current and next CIs */ + u_short cilen, citype; /* Parsed len, type */ +#ifdef IPV6CP_COMP + u_short cishort; /* Parsed short value */ +#endif /* IPV6CP_COMP */ + eui64_t ifaceid; /* Parsed interface identifier */ + int rc = CONFACK; /* Final packet return code */ + int orc; /* Individual option return code */ + u_char *p; /* Pointer to next char to parse */ + u_char *ucp = inp; /* Pointer to current output char */ + int l = *len; /* Length left */ + + /* + * Reset all his options. + */ + BZERO(ho, sizeof(*ho)); + + /* + * Process all his options. + */ + next = inp; + while (l) { + orc = CONFACK; /* Assume success */ + cip = p = next; /* Remember begining of CI */ + if (l < 2 || /* Not enough data for CI header or */ + p[1] < 2 || /* CI length too small or */ + p[1] > l) { /* CI length too big? */ + IPV6CPDEBUG(("ipv6cp_reqci: bad CI length!")); + orc = CONFREJ; /* Reject bad CI */ + cilen = l; /* Reject till end of packet */ + l = 0; /* Don't loop again */ + goto endswitch; + } + GETCHAR(citype, p); /* Parse CI type */ + GETCHAR(cilen, p); /* Parse CI length */ + l -= cilen; /* Adjust remaining length */ + next += cilen; /* Step to next CI */ + + switch (citype) { /* Check CI type */ + case CI_IFACEID: + IPV6CPDEBUG(("ipv6cp: received interface identifier ")); + + if (!ao->neg_ifaceid || + cilen != CILEN_IFACEID) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + + /* + * If he has no interface identifier, or if we both have same + * identifier then NAK it with new idea. + * In particular, if we don't know his identifier, but he does, + * then accept it. + */ + eui64_get(ifaceid, p); + IPV6CPDEBUG(("(%s)", llv6_ntoa(ifaceid))); + if (eui64_iszero(ifaceid) && eui64_iszero(go->ourid)) { + orc = CONFREJ; /* Reject CI */ + break; + } + if (!eui64_iszero(wo->hisid) && + !eui64_equals(ifaceid, wo->hisid) && + eui64_iszero(go->hisid)) { + + orc = CONFNAK; + ifaceid = wo->hisid; + go->hisid = ifaceid; + DECPTR(sizeof(ifaceid), p); + eui64_put(ifaceid, p); + } else + if (eui64_iszero(ifaceid) || eui64_equals(ifaceid, go->ourid)) { + orc = CONFNAK; + if (eui64_iszero(go->hisid)) /* first time, try option */ + ifaceid = wo->hisid; + while (eui64_iszero(ifaceid) || + eui64_equals(ifaceid, go->ourid)) /* bad luck */ + eui64_magic(ifaceid); + go->hisid = ifaceid; + DECPTR(sizeof(ifaceid), p); + eui64_put(ifaceid, p); + } + + ho->neg_ifaceid = 1; + ho->hisid = ifaceid; + break; + +#ifdef IPV6CP_COMP + case CI_COMPRESSTYPE: + IPV6CPDEBUG(("ipv6cp: received COMPRESSTYPE ")); + if (!ao->neg_vj || + (cilen != CILEN_COMPRESS)) { + orc = CONFREJ; + break; + } + GETSHORT(cishort, p); + IPV6CPDEBUG(("(%d)", cishort)); + + if (!(cishort == IPV6CP_COMP)) { + orc = CONFREJ; + break; + } + + ho->neg_vj = 1; + ho->vj_protocol = cishort; + break; +#endif /* IPV6CP_COMP */ + + default: + orc = CONFREJ; + break; + } + +endswitch: + IPV6CPDEBUG((" (%s)\n", CODENAME(orc))); + + if (orc == CONFACK && /* Good CI */ + rc != CONFACK) /* but prior CI wasnt? */ + continue; /* Don't send this one */ + + if (orc == CONFNAK) { /* Nak this CI? */ + if (reject_if_disagree) /* Getting fed up with sending NAKs? */ + orc = CONFREJ; /* Get tough if so */ + else { + if (rc == CONFREJ) /* Rejecting prior CI? */ + continue; /* Don't send this one */ + if (rc == CONFACK) { /* Ack'd all prior CIs? */ + rc = CONFNAK; /* Not anymore... */ + ucp = inp; /* Backup */ + } + } + } + + if (orc == CONFREJ && /* Reject this CI */ + rc != CONFREJ) { /* but no prior ones? */ + rc = CONFREJ; + ucp = inp; /* Backup */ + } + + /* Need to move CI? */ + if (ucp != cip) + MEMCPY(ucp, cip, cilen); /* Move it */ + + /* Update output pointer */ + INCPTR(cilen, ucp); + } + + /* + * If we aren't rejecting this packet, and we want to negotiate + * their identifier and they didn't send their identifier, then we + * send a NAK with a CI_IFACEID option appended. We assume the + * input buffer is long enough that we can append the extra + * option safely. + */ + if (rc != CONFREJ && !ho->neg_ifaceid && + wo->req_ifaceid && !reject_if_disagree) { + if (rc == CONFACK) { + rc = CONFNAK; + ucp = inp; /* reset pointer */ + wo->req_ifaceid = 0; /* don't ask again */ + } + PUTCHAR(CI_IFACEID, ucp); + PUTCHAR(CILEN_IFACEID, ucp); + eui64_put(wo->hisid, ucp); + } + + *len = ucp - inp; /* Compute output length */ + IPV6CPDEBUG(("ipv6cp: returning Configure-%s", CODENAME(rc))); + return (rc); /* Return final code */ +} + +#if PPP_OPTIONS +/* + * ipv6_check_options - check that any IP-related options are OK, + * and assign appropriate defaults. + */ +static void ipv6_check_options() { + ipv6cp_options *wo = &ipv6cp_wantoptions[0]; + + if (!ipv6cp_protent.enabled_flag) + return; + + /* + * Persistent link-local id is only used when user has not explicitly + * configure/hard-code the id + */ + if ((wo->use_persistent) && (!wo->opt_local) && (!wo->opt_remote)) { + + /* + * On systems where there are no Ethernet interfaces used, there + * may be other ways to obtain a persistent id. Right now, it + * will fall back to using magic [see eui64_magic] below when + * an EUI-48 from MAC address can't be obtained. Other possibilities + * include obtaining EEPROM serial numbers, or some other unique + * yet persistent number. On Sparc platforms, this is possible, + * but too bad there's no standards yet for x86 machines. + */ + if (ether_to_eui64(&wo->ourid)) { + wo->opt_local = 1; + } + } + + if (!wo->opt_local) { /* init interface identifier */ + if (wo->use_ip && eui64_iszero(wo->ourid)) { + eui64_setlo32(wo->ourid, lwip_ntohl(ipcp_wantoptions[0].ouraddr)); + if (!eui64_iszero(wo->ourid)) + wo->opt_local = 1; + } + + while (eui64_iszero(wo->ourid)) + eui64_magic(wo->ourid); + } + + if (!wo->opt_remote) { + if (wo->use_ip && eui64_iszero(wo->hisid)) { + eui64_setlo32(wo->hisid, lwip_ntohl(ipcp_wantoptions[0].hisaddr)); + if (!eui64_iszero(wo->hisid)) + wo->opt_remote = 1; + } + } + + if (demand && (eui64_iszero(wo->ourid) || eui64_iszero(wo->hisid))) { + option_error("local/remote LL address required for demand-dialling\n"); + exit(1); + } +} +#endif /* PPP_OPTIONS */ + +#if DEMAND_SUPPORT +/* + * ipv6_demand_conf - configure the interface as though + * IPV6CP were up, for use with dial-on-demand. + */ +static int ipv6_demand_conf(int u) { + ipv6cp_options *wo = &ipv6cp_wantoptions[u]; + + if (!sif6up(u)) + return 0; + + if (!sif6addr(u, wo->ourid, wo->hisid)) + return 0; + + if (!sifnpmode(u, PPP_IPV6, NPMODE_QUEUE)) + return 0; + + ppp_notice("ipv6_demand_conf"); + ppp_notice("local LL address %s", llv6_ntoa(wo->ourid)); + ppp_notice("remote LL address %s", llv6_ntoa(wo->hisid)); + + return 1; +} +#endif /* DEMAND_SUPPORT */ + + +/* + * ipv6cp_up - IPV6CP has come UP. + * + * Configure the IPv6 network interface appropriately and bring it up. + */ +static void ipv6cp_up(fsm *f) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *wo = &pcb->ipv6cp_wantoptions; + ipv6cp_options *ho = &pcb->ipv6cp_hisoptions; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + + IPV6CPDEBUG(("ipv6cp: up")); + + /* + * We must have a non-zero LL address for both ends of the link. + */ + if (!ho->neg_ifaceid) + ho->hisid = wo->hisid; + +#if 0 /* UNUSED */ + if(!no_ifaceid_neg) { +#endif /* UNUSED */ + if (eui64_iszero(ho->hisid)) { + ppp_error("Could not determine remote LL address"); + ipv6cp_close(f->pcb, "Could not determine remote LL address"); + return; + } + if (eui64_iszero(go->ourid)) { + ppp_error("Could not determine local LL address"); + ipv6cp_close(f->pcb, "Could not determine local LL address"); + return; + } + if (eui64_equals(go->ourid, ho->hisid)) { + ppp_error("local and remote LL addresses are equal"); + ipv6cp_close(f->pcb, "local and remote LL addresses are equal"); + return; + } +#if 0 /* UNUSED */ + } +#endif /* UNUSED */ +#if 0 /* UNUSED */ + script_setenv("LLLOCAL", llv6_ntoa(go->ourid), 0); + script_setenv("LLREMOTE", llv6_ntoa(ho->hisid), 0); +#endif /* UNUSED */ + +#ifdef IPV6CP_COMP + /* set tcp compression */ + sif6comp(f->unit, ho->neg_vj); +#endif + +#if DEMAND_SUPPORT + /* + * If we are doing dial-on-demand, the interface is already + * configured, so we put out any saved-up packets, then set the + * interface to pass IPv6 packets. + */ + if (demand) { + if (! eui64_equals(go->ourid, wo->ourid) || + ! eui64_equals(ho->hisid, wo->hisid)) { + if (! eui64_equals(go->ourid, wo->ourid)) + warn("Local LL address changed to %s", + llv6_ntoa(go->ourid)); + if (! eui64_equals(ho->hisid, wo->hisid)) + warn("Remote LL address changed to %s", + llv6_ntoa(ho->hisid)); + ipv6cp_clear_addrs(f->pcb, go->ourid, ho->hisid); + + /* Set the interface to the new addresses */ + if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { + if (debug) + warn("sif6addr failed"); + ipv6cp_close(f->unit, "Interface configuration failed"); + return; + } + + } + demand_rexmit(PPP_IPV6); + sifnpmode(f->unit, PPP_IPV6, NPMODE_PASS); + + } else +#endif /* DEMAND_SUPPORT */ + { + /* + * Set LL addresses + */ + if (!sif6addr(f->pcb, go->ourid, ho->hisid)) { + PPPDEBUG(LOG_DEBUG, ("sif6addr failed")); + ipv6cp_close(f->pcb, "Interface configuration failed"); + return; + } + + /* bring the interface up for IPv6 */ + if (!sif6up(f->pcb)) { + PPPDEBUG(LOG_DEBUG, ("sif6up failed (IPV6)")); + ipv6cp_close(f->pcb, "Interface configuration failed"); + return; + } +#if DEMAND_SUPPORT + sifnpmode(f->pcb, PPP_IPV6, NPMODE_PASS); +#endif /* DEMAND_SUPPORT */ + + ppp_notice("local LL address %s", llv6_ntoa(go->ourid)); + ppp_notice("remote LL address %s", llv6_ntoa(ho->hisid)); + } + + np_up(f->pcb, PPP_IPV6); + pcb->ipv6cp_is_up = 1; + +#if 0 /* UNUSED */ + /* + * Execute the ipv6-up script, like this: + * /etc/ppp/ipv6-up interface tty speed local-LL remote-LL + */ + if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) { + ipv6cp_script_state = s_up; + ipv6cp_script(_PATH_IPV6UP); + } +#endif /* UNUSED */ +} + + +/* + * ipv6cp_down - IPV6CP has gone DOWN. + * + * Take the IPv6 network interface down, clear its addresses + * and delete routes through it. + */ +static void ipv6cp_down(fsm *f) { + ppp_pcb *pcb = f->pcb; + ipv6cp_options *go = &pcb->ipv6cp_gotoptions; + ipv6cp_options *ho = &pcb->ipv6cp_hisoptions; + + IPV6CPDEBUG(("ipv6cp: down")); +#if PPP_STATS_SUPPORT + update_link_stats(f->unit); +#endif /* PPP_STATS_SUPPORT */ + if (pcb->ipv6cp_is_up) { + pcb->ipv6cp_is_up = 0; + np_down(f->pcb, PPP_IPV6); + } +#ifdef IPV6CP_COMP + sif6comp(f->unit, 0); +#endif + +#if DEMAND_SUPPORT + /* + * If we are doing dial-on-demand, set the interface + * to queue up outgoing packets (for now). + */ + if (demand) { + sifnpmode(f->pcb, PPP_IPV6, NPMODE_QUEUE); + } else +#endif /* DEMAND_SUPPORT */ + { +#if DEMAND_SUPPORT + sifnpmode(f->pcb, PPP_IPV6, NPMODE_DROP); +#endif /* DEMAND_SUPPORT */ + ipv6cp_clear_addrs(f->pcb, + go->ourid, + ho->hisid); + sif6down(f->pcb); + } + +#if 0 /* UNUSED */ + /* Execute the ipv6-down script */ + if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) { + ipv6cp_script_state = s_down; + ipv6cp_script(_PATH_IPV6DOWN); + } +#endif /* UNUSED */ +} + + +/* + * ipv6cp_clear_addrs() - clear the interface addresses, routes, + * proxy neighbour discovery entries, etc. + */ +static void ipv6cp_clear_addrs(ppp_pcb *pcb, eui64_t ourid, eui64_t hisid) { + cif6addr(pcb, ourid, hisid); +} + + +/* + * ipv6cp_finished - possibly shut down the lower layers. + */ +static void ipv6cp_finished(fsm *f) { + np_finished(f->pcb, PPP_IPV6); +} + + +#if 0 /* UNUSED */ +/* + * ipv6cp_script_done - called when the ipv6-up or ipv6-down script + * has finished. + */ +static void +ipv6cp_script_done(arg) + void *arg; +{ + ipv6cp_script_pid = 0; + switch (ipv6cp_script_state) { + case s_up: + if (ipv6cp_fsm[0].state != PPP_FSM_OPENED) { + ipv6cp_script_state = s_down; + ipv6cp_script(_PATH_IPV6DOWN); + } + break; + case s_down: + if (ipv6cp_fsm[0].state == PPP_FSM_OPENED) { + ipv6cp_script_state = s_up; + ipv6cp_script(_PATH_IPV6UP); + } + break; + } +} + + +/* + * ipv6cp_script - Execute a script with arguments + * interface-name tty-name speed local-LL remote-LL. + */ +static void +ipv6cp_script(script) + char *script; +{ + char strspeed[32], strlocal[32], strremote[32]; + char *argv[8]; + + sprintf(strspeed, "%d", baud_rate); + strcpy(strlocal, llv6_ntoa(ipv6cp_gotoptions[0].ourid)); + strcpy(strremote, llv6_ntoa(ipv6cp_hisoptions[0].hisid)); + + argv[0] = script; + argv[1] = ifname; + argv[2] = devnam; + argv[3] = strspeed; + argv[4] = strlocal; + argv[5] = strremote; + argv[6] = ipparam; + argv[7] = NULL; + + ipv6cp_script_pid = run_program(script, argv, 0, ipv6cp_script_done, + NULL, 0); +} +#endif /* UNUSED */ + +#if PRINTPKT_SUPPORT +/* + * ipv6cp_printpkt - print the contents of an IPV6CP packet. + */ +static const char* const ipv6cp_codenames[] = { + "ConfReq", "ConfAck", "ConfNak", "ConfRej", + "TermReq", "TermAck", "CodeRej" +}; + +static int ipv6cp_printpkt(const u_char *p, int plen, + void (*printer)(void *, const char *, ...), void *arg) { + int code, id, len, olen; + const u_char *pstart, *optend; +#ifdef IPV6CP_COMP + u_short cishort; +#endif /* IPV6CP_COMP */ + eui64_t ifaceid; + + if (plen < HEADERLEN) + return 0; + pstart = p; + GETCHAR(code, p); + GETCHAR(id, p); + GETSHORT(len, p); + if (len < HEADERLEN || len > plen) + return 0; + + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipv6cp_codenames)) + printer(arg, " %s", ipv6cp_codenames[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= HEADERLEN; + switch (code) { + case CONFREQ: + case CONFACK: + case CONFNAK: + case CONFREJ: + /* print option list */ + while (len >= 2) { + GETCHAR(code, p); + GETCHAR(olen, p); + p -= 2; + if (olen < 2 || olen > len) { + break; + } + printer(arg, " <"); + len -= olen; + optend = p + olen; + switch (code) { +#ifdef IPV6CP_COMP + case CI_COMPRESSTYPE: + if (olen >= CILEN_COMPRESS) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "compress "); + printer(arg, "0x%x", cishort); + } + break; +#endif /* IPV6CP_COMP */ + case CI_IFACEID: + if (olen == CILEN_IFACEID) { + p += 2; + eui64_get(ifaceid, p); + printer(arg, "addr %s", llv6_ntoa(ifaceid)); + } + break; + default: + break; + } + while (p < optend) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + printer(arg, ">"); + } + break; + + case TERMACK: + case TERMREQ: + if (len > 0 && *p >= ' ' && *p < 0x7f) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; + default: + break; + } + + /* print the rest of the bytes in the packet */ + for (; len > 0; --len) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + + return p - pstart; +} +#endif /* PRINTPKT_SUPPORT */ + +#if DEMAND_SUPPORT +/* + * ipv6_active_pkt - see if this IP packet is worth bringing the link up for. + * We don't bring the link up for IP fragments or for TCP FIN packets + * with no data. + */ +#define IP6_HDRLEN 40 /* bytes */ +#define IP6_NHDR_FRAG 44 /* fragment IPv6 header */ +#define TCP_HDRLEN 20 +#define TH_FIN 0x01 + +/* + * We use these macros because the IP header may be at an odd address, + * and some compilers might use word loads to get th_off or ip_hl. + */ + +#define get_ip6nh(x) (((unsigned char *)(x))[6]) +#define get_tcpoff(x) (((unsigned char *)(x))[12] >> 4) +#define get_tcpflags(x) (((unsigned char *)(x))[13]) + +static int ipv6_active_pkt(u_char *pkt, int len) { + u_char *tcp; + + len -= PPP_HDRLEN; + pkt += PPP_HDRLEN; + if (len < IP6_HDRLEN) + return 0; + if (get_ip6nh(pkt) == IP6_NHDR_FRAG) + return 0; + if (get_ip6nh(pkt) != IPPROTO_TCP) + return 1; + if (len < IP6_HDRLEN + TCP_HDRLEN) + return 0; + tcp = pkt + IP6_HDRLEN; + if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == IP6_HDRLEN + get_tcpoff(tcp) * 4) + return 0; + return 1; +} +#endif /* DEMAND_SUPPORT */ + +#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.c index 90ed183..1316918 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/lcp.c @@ -1,2790 +1,2790 @@ -/* - * lcp.c - PPP Link Control Protocol. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -/* - * @todo: - */ - -#if 0 /* UNUSED */ -#include -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/lcp.h" -#if CHAP_SUPPORT -#include "netif/ppp/chap-new.h" -#endif /* CHAP_SUPPORT */ -#include "netif/ppp/magic.h" - -/* - * When the link comes up we want to be able to wait for a short while, - * or until seeing some input from the peer, before starting to send - * configure-requests. We do this by delaying the fsm_lowerup call. - */ -/* steal a bit in fsm flags word */ -#define DELAYED_UP 0x80 - -static void lcp_delayed_up(void *arg); - -/* - * LCP-related command-line options. - */ -#if 0 /* UNUSED */ -int lcp_echo_interval = 0; /* Interval between LCP echo-requests */ -int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */ -#endif /* UNUSED */ - -#if 0 /* UNUSED */ -/* options */ -static u_int lcp_echo_interval = LCP_ECHOINTERVAL; /* Interval between LCP echo-requests */ -static u_int lcp_echo_fails = LCP_MAXECHOFAILS; /* Tolerance to unanswered echo-requests */ -#endif /* UNUSED */ - -#if 0 /* UNUSED */ -#if PPP_LCP_ADAPTIVE -bool lcp_echo_adaptive = 0; /* request echo only if the link was idle */ -#endif -bool lax_recv = 0; /* accept control chars in asyncmap */ -bool noendpoint = 0; /* don't send/accept endpoint discriminator */ -#endif /* UNUSED */ - -#if PPP_OPTIONS -static int noopt (char **); -#endif /* PPP_OPTIONS */ - -#ifdef HAVE_MULTILINK -static int setendpoint (char **); -static void printendpoint (option_t *, void (*)(void *, char *, ...), - void *); -#endif /* HAVE_MULTILINK */ - -#if PPP_OPTIONS -static option_t lcp_option_list[] = { - /* LCP options */ - { "-all", o_special_noarg, (void *)noopt, - "Don't request/allow any LCP options" }, - - { "noaccomp", o_bool, &lcp_wantoptions[0].neg_accompression, - "Disable address/control compression", - OPT_A2CLR, &lcp_allowoptions[0].neg_accompression }, - { "-ac", o_bool, &lcp_wantoptions[0].neg_accompression, - "Disable address/control compression", - OPT_ALIAS | OPT_A2CLR, &lcp_allowoptions[0].neg_accompression }, - - { "asyncmap", o_uint32, &lcp_wantoptions[0].asyncmap, - "Set asyncmap (for received packets)", - OPT_OR, &lcp_wantoptions[0].neg_asyncmap }, - { "-as", o_uint32, &lcp_wantoptions[0].asyncmap, - "Set asyncmap (for received packets)", - OPT_ALIAS | OPT_OR, &lcp_wantoptions[0].neg_asyncmap }, - { "default-asyncmap", o_uint32, &lcp_wantoptions[0].asyncmap, - "Disable asyncmap negotiation", - OPT_OR | OPT_NOARG | OPT_VAL(~0U) | OPT_A2CLR, - &lcp_allowoptions[0].neg_asyncmap }, - { "-am", o_uint32, &lcp_wantoptions[0].asyncmap, - "Disable asyncmap negotiation", - OPT_ALIAS | OPT_OR | OPT_NOARG | OPT_VAL(~0U) | OPT_A2CLR, - &lcp_allowoptions[0].neg_asyncmap }, - - { "nomagic", o_bool, &lcp_wantoptions[0].neg_magicnumber, - "Disable magic number negotiation (looped-back line detection)", - OPT_A2CLR, &lcp_allowoptions[0].neg_magicnumber }, - { "-mn", o_bool, &lcp_wantoptions[0].neg_magicnumber, - "Disable magic number negotiation (looped-back line detection)", - OPT_ALIAS | OPT_A2CLR, &lcp_allowoptions[0].neg_magicnumber }, - - { "mru", o_int, &lcp_wantoptions[0].mru, - "Set MRU (maximum received packet size) for negotiation", - OPT_PRIO, &lcp_wantoptions[0].neg_mru }, - { "default-mru", o_bool, &lcp_wantoptions[0].neg_mru, - "Disable MRU negotiation (use default 1500)", - OPT_PRIOSUB | OPT_A2CLR, &lcp_allowoptions[0].neg_mru }, - { "-mru", o_bool, &lcp_wantoptions[0].neg_mru, - "Disable MRU negotiation (use default 1500)", - OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, &lcp_allowoptions[0].neg_mru }, - - { "mtu", o_int, &lcp_allowoptions[0].mru, - "Set our MTU", OPT_LIMITS, NULL, MAXMRU, MINMRU }, - - { "nopcomp", o_bool, &lcp_wantoptions[0].neg_pcompression, - "Disable protocol field compression", - OPT_A2CLR, &lcp_allowoptions[0].neg_pcompression }, - { "-pc", o_bool, &lcp_wantoptions[0].neg_pcompression, - "Disable protocol field compression", - OPT_ALIAS | OPT_A2CLR, &lcp_allowoptions[0].neg_pcompression }, - - { "passive", o_bool, &lcp_wantoptions[0].passive, - "Set passive mode", 1 }, - { "-p", o_bool, &lcp_wantoptions[0].passive, - "Set passive mode", OPT_ALIAS | 1 }, - - { "silent", o_bool, &lcp_wantoptions[0].silent, - "Set silent mode", 1 }, - - { "lcp-echo-failure", o_int, &lcp_echo_fails, - "Set number of consecutive echo failures to indicate link failure", - OPT_PRIO }, - { "lcp-echo-interval", o_int, &lcp_echo_interval, - "Set time in seconds between LCP echo requests", OPT_PRIO }, -#if PPP_LCP_ADAPTIVE - { "lcp-echo-adaptive", o_bool, &lcp_echo_adaptive, - "Suppress LCP echo requests if traffic was received", 1 }, -#endif - { "lcp-restart", o_int, &lcp_fsm[0].timeouttime, - "Set time in seconds between LCP retransmissions", OPT_PRIO }, - { "lcp-max-terminate", o_int, &lcp_fsm[0].maxtermtransmits, - "Set maximum number of LCP terminate-request transmissions", OPT_PRIO }, - { "lcp-max-configure", o_int, &lcp_fsm[0].maxconfreqtransmits, - "Set maximum number of LCP configure-request transmissions", OPT_PRIO }, - { "lcp-max-failure", o_int, &lcp_fsm[0].maxnakloops, - "Set limit on number of LCP configure-naks", OPT_PRIO }, - - { "receive-all", o_bool, &lax_recv, - "Accept all received control characters", 1 }, - -#ifdef HAVE_MULTILINK - { "mrru", o_int, &lcp_wantoptions[0].mrru, - "Maximum received packet size for multilink bundle", - OPT_PRIO, &lcp_wantoptions[0].neg_mrru }, - - { "mpshortseq", o_bool, &lcp_wantoptions[0].neg_ssnhf, - "Use short sequence numbers in multilink headers", - OPT_PRIO | 1, &lcp_allowoptions[0].neg_ssnhf }, - { "nompshortseq", o_bool, &lcp_wantoptions[0].neg_ssnhf, - "Don't use short sequence numbers in multilink headers", - OPT_PRIOSUB | OPT_A2CLR, &lcp_allowoptions[0].neg_ssnhf }, - - { "endpoint", o_special, (void *) setendpoint, - "Endpoint discriminator for multilink", - OPT_PRIO | OPT_A2PRINTER, (void *) printendpoint }, -#endif /* HAVE_MULTILINK */ - - { "noendpoint", o_bool, &noendpoint, - "Don't send or accept multilink endpoint discriminator", 1 }, - - {NULL} -}; -#endif /* PPP_OPTIONS */ - -/* - * Callbacks for fsm code. (CI = Configuration Information) - */ -static void lcp_resetci(fsm *f); /* Reset our CI */ -static int lcp_cilen(fsm *f); /* Return length of our CI */ -static void lcp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI to pkt */ -static int lcp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ -static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject); /* Peer nak'd our CI */ -static int lcp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ -static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree); /* Rcv peer CI */ -static void lcp_up(fsm *f); /* We're UP */ -static void lcp_down(fsm *f); /* We're DOWN */ -static void lcp_starting (fsm *); /* We need lower layer up */ -static void lcp_finished (fsm *); /* We need lower layer down */ -static int lcp_extcode(fsm *f, int code, int id, u_char *inp, int len); -static void lcp_rprotrej(fsm *f, u_char *inp, int len); - -/* - * routines to send LCP echos to peer - */ - -static void lcp_echo_lowerup(ppp_pcb *pcb); -static void lcp_echo_lowerdown(ppp_pcb *pcb); -static void LcpEchoTimeout(void *arg); -static void lcp_received_echo_reply(fsm *f, int id, u_char *inp, int len); -static void LcpSendEchoRequest(fsm *f); -static void LcpLinkFailure(fsm *f); -static void LcpEchoCheck(fsm *f); - -static const fsm_callbacks lcp_callbacks = { /* LCP callback routines */ - lcp_resetci, /* Reset our Configuration Information */ - lcp_cilen, /* Length of our Configuration Information */ - lcp_addci, /* Add our Configuration Information */ - lcp_ackci, /* ACK our Configuration Information */ - lcp_nakci, /* NAK our Configuration Information */ - lcp_rejci, /* Reject our Configuration Information */ - lcp_reqci, /* Request peer's Configuration Information */ - lcp_up, /* Called when fsm reaches OPENED state */ - lcp_down, /* Called when fsm leaves OPENED state */ - lcp_starting, /* Called when we want the lower layer up */ - lcp_finished, /* Called when we want the lower layer down */ - NULL, /* Called when Protocol-Reject received */ - NULL, /* Retransmission is necessary */ - lcp_extcode, /* Called to handle LCP-specific codes */ - "LCP" /* String name of protocol */ -}; - -/* - * Protocol entry points. - * Some of these are called directly. - */ - -static void lcp_init(ppp_pcb *pcb); -static void lcp_input(ppp_pcb *pcb, u_char *p, int len); -static void lcp_protrej(ppp_pcb *pcb); -#if PRINTPKT_SUPPORT -static int lcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg); -#endif /* PRINTPKT_SUPPORT */ - -const struct protent lcp_protent = { - PPP_LCP, - lcp_init, - lcp_input, - lcp_protrej, - lcp_lowerup, - lcp_lowerdown, - lcp_open, - lcp_close, -#if PRINTPKT_SUPPORT - lcp_printpkt, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - NULL, -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "LCP", - NULL, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - lcp_option_list, - NULL, -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - NULL, - NULL -#endif /* DEMAND_SUPPORT */ -}; - -/* - * Length of each type of configuration option (in octets) - */ -#define CILEN_VOID 2 -#define CILEN_CHAR 3 -#define CILEN_SHORT 4 /* CILEN_VOID + 2 */ -#if CHAP_SUPPORT -#define CILEN_CHAP 5 /* CILEN_VOID + 2 + 1 */ -#endif /* CHAP_SUPPORT */ -#define CILEN_LONG 6 /* CILEN_VOID + 4 */ -#if LQR_SUPPORT -#define CILEN_LQR 8 /* CILEN_VOID + 2 + 4 */ -#endif /* LQR_SUPPORT */ -#define CILEN_CBCP 3 - -#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ - (x) == CONFNAK ? "NAK" : "REJ") - -#if PPP_OPTIONS -/* - * noopt - Disable all options (why?). - */ -static int -noopt(argv) - char **argv; -{ - BZERO((char *) &lcp_wantoptions[0], sizeof (struct lcp_options)); - BZERO((char *) &lcp_allowoptions[0], sizeof (struct lcp_options)); - - return (1); -} -#endif /* PPP_OPTIONS */ - -#ifdef HAVE_MULTILINK -static int -setendpoint(argv) - char **argv; -{ - if (str_to_epdisc(&lcp_wantoptions[0].endpoint, *argv)) { - lcp_wantoptions[0].neg_endpoint = 1; - return 1; - } - option_error("Can't parse '%s' as an endpoint discriminator", *argv); - return 0; -} - -static void -printendpoint(opt, printer, arg) - option_t *opt; - void (*printer) (void *, char *, ...); - void *arg; -{ - printer(arg, "%s", epdisc_to_str(&lcp_wantoptions[0].endpoint)); -} -#endif /* HAVE_MULTILINK */ - -/* - * lcp_init - Initialize LCP. - */ -static void lcp_init(ppp_pcb *pcb) { - fsm *f = &pcb->lcp_fsm; - lcp_options *wo = &pcb->lcp_wantoptions; - lcp_options *ao = &pcb->lcp_allowoptions; - - f->pcb = pcb; - f->protocol = PPP_LCP; - f->callbacks = &lcp_callbacks; - - fsm_init(f); - - BZERO(wo, sizeof(*wo)); - wo->neg_mru = 1; - wo->mru = PPP_DEFMRU; - wo->neg_asyncmap = 1; - wo->neg_magicnumber = 1; - wo->neg_pcompression = 1; - wo->neg_accompression = 1; - - BZERO(ao, sizeof(*ao)); - ao->neg_mru = 1; - ao->mru = PPP_MAXMRU; - ao->neg_asyncmap = 1; -#if CHAP_SUPPORT - ao->neg_chap = 1; - ao->chap_mdtype = CHAP_MDTYPE_SUPPORTED; -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - ao->neg_upap = 1; -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - ao->neg_eap = 1; -#endif /* EAP_SUPPORT */ - ao->neg_magicnumber = 1; - ao->neg_pcompression = 1; - ao->neg_accompression = 1; - ao->neg_endpoint = 1; -} - - -/* - * lcp_open - LCP is allowed to come up. - */ -void lcp_open(ppp_pcb *pcb) { - fsm *f = &pcb->lcp_fsm; - lcp_options *wo = &pcb->lcp_wantoptions; - - f->flags &= ~(OPT_PASSIVE | OPT_SILENT); - if (wo->passive) - f->flags |= OPT_PASSIVE; - if (wo->silent) - f->flags |= OPT_SILENT; - fsm_open(f); -} - - -/* - * lcp_close - Take LCP down. - */ -void lcp_close(ppp_pcb *pcb, const char *reason) { - fsm *f = &pcb->lcp_fsm; - int oldstate; - - if (pcb->phase != PPP_PHASE_DEAD -#ifdef HAVE_MULTILINK - && pcb->phase != PPP_PHASE_MASTER -#endif /* HAVE_MULTILINK */ - ) - new_phase(pcb, PPP_PHASE_TERMINATE); - - if (f->flags & DELAYED_UP) { - UNTIMEOUT(lcp_delayed_up, f); - f->state = PPP_FSM_STOPPED; - } - oldstate = f->state; - - fsm_close(f, reason); - if (oldstate == PPP_FSM_STOPPED && (f->flags & (OPT_PASSIVE|OPT_SILENT|DELAYED_UP))) { - /* - * This action is not strictly according to the FSM in RFC1548, - * but it does mean that the program terminates if you do a - * lcp_close() when a connection hasn't been established - * because we are in passive/silent mode or because we have - * delayed the fsm_lowerup() call and it hasn't happened yet. - */ - f->flags &= ~DELAYED_UP; - lcp_finished(f); - } -} - - -/* - * lcp_lowerup - The lower layer is up. - */ -void lcp_lowerup(ppp_pcb *pcb) { - lcp_options *wo = &pcb->lcp_wantoptions; - fsm *f = &pcb->lcp_fsm; - /* - * Don't use A/C or protocol compression on transmission, - * but accept A/C and protocol compressed packets - * if we are going to ask for A/C and protocol compression. - */ - if (ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0) < 0 - || ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff), - wo->neg_pcompression, wo->neg_accompression) < 0) - return; - pcb->peer_mru = PPP_MRU; - - if (pcb->settings.listen_time != 0) { - f->flags |= DELAYED_UP; - TIMEOUTMS(lcp_delayed_up, f, pcb->settings.listen_time); - } else - fsm_lowerup(f); -} - - -/* - * lcp_lowerdown - The lower layer is down. - */ -void lcp_lowerdown(ppp_pcb *pcb) { - fsm *f = &pcb->lcp_fsm; - - if (f->flags & DELAYED_UP) { - f->flags &= ~DELAYED_UP; - UNTIMEOUT(lcp_delayed_up, f); - } else - fsm_lowerdown(f); -} - - -/* - * lcp_delayed_up - Bring the lower layer up now. - */ -static void lcp_delayed_up(void *arg) { - fsm *f = (fsm*)arg; - - if (f->flags & DELAYED_UP) { - f->flags &= ~DELAYED_UP; - fsm_lowerup(f); - } -} - - -/* - * lcp_input - Input LCP packet. - */ -static void lcp_input(ppp_pcb *pcb, u_char *p, int len) { - fsm *f = &pcb->lcp_fsm; - - if (f->flags & DELAYED_UP) { - f->flags &= ~DELAYED_UP; - UNTIMEOUT(lcp_delayed_up, f); - fsm_lowerup(f); - } - fsm_input(f, p, len); -} - -/* - * lcp_extcode - Handle a LCP-specific code. - */ -static int lcp_extcode(fsm *f, int code, int id, u_char *inp, int len) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - u_char *magp; - - switch( code ){ - case PROTREJ: - lcp_rprotrej(f, inp, len); - break; - - case ECHOREQ: - if (f->state != PPP_FSM_OPENED) - break; - magp = inp; - PUTLONG(go->magicnumber, magp); - fsm_sdata(f, ECHOREP, id, inp, len); - break; - - case ECHOREP: - lcp_received_echo_reply(f, id, inp, len); - break; - - case DISCREQ: - case IDENTIF: - case TIMEREM: - break; - - default: - return 0; - } - return 1; -} - - -/* - * lcp_rprotrej - Receive an Protocol-Reject. - * - * Figure out which protocol is rejected and inform it. - */ -static void lcp_rprotrej(fsm *f, u_char *inp, int len) { - int i; - const struct protent *protp; - u_short prot; -#if PPP_PROTOCOLNAME - const char *pname; -#endif /* PPP_PROTOCOLNAME */ - - if (len < 2) { - LCPDEBUG(("lcp_rprotrej: Rcvd short Protocol-Reject packet!")); - return; - } - - GETSHORT(prot, inp); - - /* - * Protocol-Reject packets received in any state other than the LCP - * OPENED state SHOULD be silently discarded. - */ - if( f->state != PPP_FSM_OPENED ){ - LCPDEBUG(("Protocol-Reject discarded: LCP in state %d", f->state)); - return; - } - -#if PPP_PROTOCOLNAME - pname = protocol_name(prot); -#endif /* PPP_PROTOCOLNAME */ - - /* - * Upcall the proper Protocol-Reject routine. - */ - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (protp->protocol == prot) { -#if PPP_PROTOCOLNAME - if (pname != NULL) - ppp_dbglog("Protocol-Reject for '%s' (0x%x) received", pname, - prot); - else -#endif /* PPP_PROTOCOLNAME */ - ppp_dbglog("Protocol-Reject for 0x%x received", prot); - (*protp->protrej)(f->pcb); - return; - } - -#if PPP_PROTOCOLNAME - if (pname != NULL) - ppp_warn("Protocol-Reject for unsupported protocol '%s' (0x%x)", pname, - prot); - else -#endif /* #if PPP_PROTOCOLNAME */ - ppp_warn("Protocol-Reject for unsupported protocol 0x%x", prot); -} - - -/* - * lcp_protrej - A Protocol-Reject was received. - */ -/*ARGSUSED*/ -static void lcp_protrej(ppp_pcb *pcb) { - /* - * Can't reject LCP! - */ - ppp_error("Received Protocol-Reject for LCP!"); - fsm_protreject(&pcb->lcp_fsm); -} - - -/* - * lcp_sprotrej - Send a Protocol-Reject for some protocol. - */ -void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len) { - fsm *f = &pcb->lcp_fsm; - /* - * Send back the protocol and the information field of the - * rejected packet. We only get here if LCP is in the OPENED state. - */ -#if 0 - p += 2; - len -= 2; -#endif - - fsm_sdata(f, PROTREJ, ++f->id, - p, len); -} - - -/* - * lcp_resetci - Reset our CI. - */ -static void lcp_resetci(fsm *f) { - ppp_pcb *pcb = f->pcb; - lcp_options *wo = &pcb->lcp_wantoptions; - lcp_options *go = &pcb->lcp_gotoptions; - lcp_options *ao = &pcb->lcp_allowoptions; - -#if PPP_AUTH_SUPPORT - - /* note: default value is true for allow options */ - if (pcb->settings.user && pcb->settings.passwd) { -#if PAP_SUPPORT - if (pcb->settings.refuse_pap) { - ao->neg_upap = 0; - } -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - if (pcb->settings.refuse_chap) { - ao->chap_mdtype &= ~MDTYPE_MD5; - } -#if MSCHAP_SUPPORT - if (pcb->settings.refuse_mschap) { - ao->chap_mdtype &= ~MDTYPE_MICROSOFT; - } - if (pcb->settings.refuse_mschap_v2) { - ao->chap_mdtype &= ~MDTYPE_MICROSOFT_V2; - } -#endif /* MSCHAP_SUPPORT */ - ao->neg_chap = (ao->chap_mdtype != MDTYPE_NONE); -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - if (pcb->settings.refuse_eap) { - ao->neg_eap = 0; - } -#endif /* EAP_SUPPORT */ - -#if PPP_SERVER - /* note: default value is false for wanted options */ - if (pcb->settings.auth_required) { -#if PAP_SUPPORT - if (!pcb->settings.refuse_pap) { - wo->neg_upap = 1; - } -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - if (!pcb->settings.refuse_chap) { - wo->chap_mdtype |= MDTYPE_MD5; - } -#if MSCHAP_SUPPORT - if (!pcb->settings.refuse_mschap) { - wo->chap_mdtype |= MDTYPE_MICROSOFT; - } - if (!pcb->settings.refuse_mschap_v2) { - wo->chap_mdtype |= MDTYPE_MICROSOFT_V2; - } -#endif /* MSCHAP_SUPPORT */ - wo->neg_chap = (wo->chap_mdtype != MDTYPE_NONE); -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - if (!pcb->settings.refuse_eap) { - wo->neg_eap = 1; - } -#endif /* EAP_SUPPORT */ - } -#endif /* PPP_SERVER */ - - } else { -#if PAP_SUPPORT - ao->neg_upap = 0; -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - ao->neg_chap = 0; - ao->chap_mdtype = MDTYPE_NONE; -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - ao->neg_eap = 0; -#endif /* EAP_SUPPORT */ - } - - PPPDEBUG(LOG_DEBUG, ("ppp: auth protocols:")); -#if PAP_SUPPORT - PPPDEBUG(LOG_DEBUG, (" PAP=%d", ao->neg_upap)); -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - PPPDEBUG(LOG_DEBUG, (" CHAP=%d CHAP_MD5=%d", ao->neg_chap, !!(ao->chap_mdtype&MDTYPE_MD5))); -#if MSCHAP_SUPPORT - PPPDEBUG(LOG_DEBUG, (" CHAP_MS=%d CHAP_MS2=%d", !!(ao->chap_mdtype&MDTYPE_MICROSOFT), !!(ao->chap_mdtype&MDTYPE_MICROSOFT_V2))); -#endif /* MSCHAP_SUPPORT */ -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - PPPDEBUG(LOG_DEBUG, (" EAP=%d", ao->neg_eap)); -#endif /* EAP_SUPPORT */ - PPPDEBUG(LOG_DEBUG, ("\n")); - -#endif /* PPP_AUTH_SUPPORT */ - - wo->magicnumber = magic(); - wo->numloops = 0; - *go = *wo; -#ifdef HAVE_MULTILINK - if (!multilink) { - go->neg_mrru = 0; -#endif /* HAVE_MULTILINK */ - go->neg_ssnhf = 0; - go->neg_endpoint = 0; -#ifdef HAVE_MULTILINK - } -#endif /* HAVE_MULTILINK */ - if (pcb->settings.noendpoint) - ao->neg_endpoint = 0; - pcb->peer_mru = PPP_MRU; -#if 0 /* UNUSED */ - auth_reset(pcb); -#endif /* UNUSED */ -} - - -/* - * lcp_cilen - Return length of our CI. - */ -static int lcp_cilen(fsm *f) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - -#define LENCIVOID(neg) ((neg) ? CILEN_VOID : 0) -#if CHAP_SUPPORT -#define LENCICHAP(neg) ((neg) ? CILEN_CHAP : 0) -#endif /* CHAP_SUPPORT */ -#define LENCISHORT(neg) ((neg) ? CILEN_SHORT : 0) -#define LENCILONG(neg) ((neg) ? CILEN_LONG : 0) -#if LQR_SUPPORT -#define LENCILQR(neg) ((neg) ? CILEN_LQR: 0) -#endif /* LQR_SUPPORT */ -#define LENCICBCP(neg) ((neg) ? CILEN_CBCP: 0) - /* - * NB: we only ask for one of CHAP, UPAP, or EAP, even if we will - * accept more than one. We prefer EAP first, then CHAP, then - * PAP. - */ - return (LENCISHORT(go->neg_mru && go->mru != PPP_DEFMRU) + - LENCILONG(go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) + -#if EAP_SUPPORT - LENCISHORT(go->neg_eap) + -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ -#if EAP_SUPPORT - LENCICHAP(!go->neg_eap && go->neg_chap) + -#endif /* EAP_SUPPORT */ -#if !EAP_SUPPORT - LENCICHAP(go->neg_chap) + -#endif /* !EAP_SUPPORT */ -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ -#if EAP_SUPPORT && CHAP_SUPPORT - LENCISHORT(!go->neg_eap && !go->neg_chap && go->neg_upap) + -#endif /* EAP_SUPPORT && CHAP_SUPPORT */ -#if EAP_SUPPORT && !CHAP_SUPPORT - LENCISHORT(!go->neg_eap && go->neg_upap) + -#endif /* EAP_SUPPORT && !CHAP_SUPPORT */ -#if !EAP_SUPPORT && CHAP_SUPPORT - LENCISHORT(!go->neg_chap && go->neg_upap) + -#endif /* !EAP_SUPPORT && CHAP_SUPPORT */ -#if !EAP_SUPPORT && !CHAP_SUPPORT - LENCISHORT(go->neg_upap) + -#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */ -#endif /* PAP_SUPPORT */ -#if LQR_SUPPORT - LENCILQR(go->neg_lqr) + -#endif /* LQR_SUPPORT */ - LENCICBCP(go->neg_cbcp) + - LENCILONG(go->neg_magicnumber) + - LENCIVOID(go->neg_pcompression) + - LENCIVOID(go->neg_accompression) + -#ifdef HAVE_MULTILINK - LENCISHORT(go->neg_mrru) + -#endif /* HAVE_MULTILINK */ - LENCIVOID(go->neg_ssnhf) + - (go->neg_endpoint? CILEN_CHAR + go->endpoint.length: 0)); -} - - -/* - * lcp_addci - Add our desired CIs to a packet. - */ -static void lcp_addci(fsm *f, u_char *ucp, int *lenp) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - u_char *start_ucp = ucp; - -#define ADDCIVOID(opt, neg) \ - if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_VOID, ucp); \ - } -#define ADDCISHORT(opt, neg, val) \ - if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_SHORT, ucp); \ - PUTSHORT(val, ucp); \ - } -#if CHAP_SUPPORT -#define ADDCICHAP(opt, neg, val) \ - if (neg) { \ - PUTCHAR((opt), ucp); \ - PUTCHAR(CILEN_CHAP, ucp); \ - PUTSHORT(PPP_CHAP, ucp); \ - PUTCHAR((CHAP_DIGEST(val)), ucp); \ - } -#endif /* CHAP_SUPPORT */ -#define ADDCILONG(opt, neg, val) \ - if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_LONG, ucp); \ - PUTLONG(val, ucp); \ - } -#if LQR_SUPPORT -#define ADDCILQR(opt, neg, val) \ - if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_LQR, ucp); \ - PUTSHORT(PPP_LQR, ucp); \ - PUTLONG(val, ucp); \ - } -#endif /* LQR_SUPPORT */ -#define ADDCICHAR(opt, neg, val) \ - if (neg) { \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_CHAR, ucp); \ - PUTCHAR(val, ucp); \ - } -#define ADDCIENDP(opt, neg, class, val, len) \ - if (neg) { \ - int i; \ - PUTCHAR(opt, ucp); \ - PUTCHAR(CILEN_CHAR + len, ucp); \ - PUTCHAR(class, ucp); \ - for (i = 0; i < len; ++i) \ - PUTCHAR(val[i], ucp); \ - } - - ADDCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru); - ADDCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF, - go->asyncmap); -#if EAP_SUPPORT - ADDCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP); -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ -#if EAP_SUPPORT - ADDCICHAP(CI_AUTHTYPE, !go->neg_eap && go->neg_chap, go->chap_mdtype); -#endif /* EAP_SUPPORT */ -#if !EAP_SUPPORT - ADDCICHAP(CI_AUTHTYPE, go->neg_chap, go->chap_mdtype); -#endif /* !EAP_SUPPORT */ -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ -#if EAP_SUPPORT && CHAP_SUPPORT - ADDCISHORT(CI_AUTHTYPE, !go->neg_eap && !go->neg_chap && go->neg_upap, PPP_PAP); -#endif /* EAP_SUPPORT && CHAP_SUPPORT */ -#if EAP_SUPPORT && !CHAP_SUPPORT - ADDCISHORT(CI_AUTHTYPE, !go->neg_eap && go->neg_upap, PPP_PAP); -#endif /* EAP_SUPPORT && !CHAP_SUPPORT */ -#if !EAP_SUPPORT && CHAP_SUPPORT - ADDCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP); -#endif /* !EAP_SUPPORT && CHAP_SUPPORT */ -#if !EAP_SUPPORT && !CHAP_SUPPORT - ADDCISHORT(CI_AUTHTYPE, go->neg_upap, PPP_PAP); -#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */ -#endif /* PAP_SUPPORT */ -#if LQR_SUPPORT - ADDCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period); -#endif /* LQR_SUPPORT */ - ADDCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT); - ADDCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber); - ADDCIVOID(CI_PCOMPRESSION, go->neg_pcompression); - ADDCIVOID(CI_ACCOMPRESSION, go->neg_accompression); -#ifdef HAVE_MULTILINK - ADDCISHORT(CI_MRRU, go->neg_mrru, go->mrru); -#endif - ADDCIVOID(CI_SSNHF, go->neg_ssnhf); - ADDCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_, - go->endpoint.value, go->endpoint.length); - - if (ucp - start_ucp != *lenp) { - /* this should never happen, because peer_mtu should be 1500 */ - ppp_error("Bug in lcp_addci: wrong length"); - } -} - - -/* - * lcp_ackci - Ack our CIs. - * This should not modify any state if the Ack is bad. - * - * Returns: - * 0 - Ack was bad. - * 1 - Ack was good. - */ -static int lcp_ackci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - u_char cilen, citype, cichar; - u_short cishort; - u32_t cilong; - - /* - * CIs must be in exactly the same order that we sent. - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ -#define ACKCIVOID(opt, neg) \ - if (neg) { \ - if ((len -= CILEN_VOID) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_VOID || \ - citype != opt) \ - goto bad; \ - } -#define ACKCISHORT(opt, neg, val) \ - if (neg) { \ - if ((len -= CILEN_SHORT) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_SHORT || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != val) \ - goto bad; \ - } -#define ACKCICHAR(opt, neg, val) \ - if (neg) { \ - if ((len -= CILEN_CHAR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_CHAR || \ - citype != opt) \ - goto bad; \ - GETCHAR(cichar, p); \ - if (cichar != val) \ - goto bad; \ - } -#if CHAP_SUPPORT -#define ACKCICHAP(opt, neg, val) \ - if (neg) { \ - if ((len -= CILEN_CHAP) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_CHAP || \ - citype != (opt)) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != PPP_CHAP) \ - goto bad; \ - GETCHAR(cichar, p); \ - if (cichar != (CHAP_DIGEST(val))) \ - goto bad; \ - } -#endif /* CHAP_SUPPORT */ -#define ACKCILONG(opt, neg, val) \ - if (neg) { \ - if ((len -= CILEN_LONG) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_LONG || \ - citype != opt) \ - goto bad; \ - GETLONG(cilong, p); \ - if (cilong != val) \ - goto bad; \ - } -#if LQR_SUPPORT -#define ACKCILQR(opt, neg, val) \ - if (neg) { \ - if ((len -= CILEN_LQR) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_LQR || \ - citype != opt) \ - goto bad; \ - GETSHORT(cishort, p); \ - if (cishort != PPP_LQR) \ - goto bad; \ - GETLONG(cilong, p); \ - if (cilong != val) \ - goto bad; \ - } -#endif /* LQR_SUPPORT */ -#define ACKCIENDP(opt, neg, class, val, vlen) \ - if (neg) { \ - int i; \ - if ((len -= CILEN_CHAR + vlen) < 0) \ - goto bad; \ - GETCHAR(citype, p); \ - GETCHAR(cilen, p); \ - if (cilen != CILEN_CHAR + vlen || \ - citype != opt) \ - goto bad; \ - GETCHAR(cichar, p); \ - if (cichar != class) \ - goto bad; \ - for (i = 0; i < vlen; ++i) { \ - GETCHAR(cichar, p); \ - if (cichar != val[i]) \ - goto bad; \ - } \ - } - - ACKCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru); - ACKCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF, - go->asyncmap); -#if EAP_SUPPORT - ACKCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP); -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ -#if EAP_SUPPORT - ACKCICHAP(CI_AUTHTYPE, !go->neg_eap && go->neg_chap, go->chap_mdtype); -#endif /* EAP_SUPPORT */ -#if !EAP_SUPPORT - ACKCICHAP(CI_AUTHTYPE, go->neg_chap, go->chap_mdtype); -#endif /* !EAP_SUPPORT */ -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ -#if EAP_SUPPORT && CHAP_SUPPORT - ACKCISHORT(CI_AUTHTYPE, !go->neg_eap && !go->neg_chap && go->neg_upap, PPP_PAP); -#endif /* EAP_SUPPORT && CHAP_SUPPORT */ -#if EAP_SUPPORT && !CHAP_SUPPORT - ACKCISHORT(CI_AUTHTYPE, !go->neg_eap && go->neg_upap, PPP_PAP); -#endif /* EAP_SUPPORT && !CHAP_SUPPORT */ -#if !EAP_SUPPORT && CHAP_SUPPORT - ACKCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP); -#endif /* !EAP_SUPPORT && CHAP_SUPPORT */ -#if !EAP_SUPPORT && !CHAP_SUPPORT - ACKCISHORT(CI_AUTHTYPE, go->neg_upap, PPP_PAP); -#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */ -#endif /* PAP_SUPPORT */ -#if LQR_SUPPORT - ACKCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period); -#endif /* LQR_SUPPORT */ - ACKCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT); - ACKCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber); - ACKCIVOID(CI_PCOMPRESSION, go->neg_pcompression); - ACKCIVOID(CI_ACCOMPRESSION, go->neg_accompression); -#ifdef HAVE_MULTILINK - ACKCISHORT(CI_MRRU, go->neg_mrru, go->mrru); -#endif /* HAVE_MULTILINK */ - ACKCIVOID(CI_SSNHF, go->neg_ssnhf); - ACKCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_, - go->endpoint.value, go->endpoint.length); - - /* - * If there are any remaining CIs, then this packet is bad. - */ - if (len != 0) - goto bad; - return (1); -bad: - LCPDEBUG(("lcp_acki: received bad Ack!")); - return (0); -} - - -/* - * lcp_nakci - Peer has sent a NAK for some of our CIs. - * This should not modify any state if the Nak is bad - * or if LCP is in the OPENED state. - * - * Returns: - * 0 - Nak was bad. - * 1 - Nak was good. - */ -static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - lcp_options *wo = &pcb->lcp_wantoptions; - u_char citype, cichar, *next; - u_short cishort; - u32_t cilong; - lcp_options no; /* options we've seen Naks for */ - lcp_options try_; /* options to request next time */ - int looped_back = 0; - int cilen; - - BZERO(&no, sizeof(no)); - try_ = *go; - - /* - * Any Nak'd CIs must be in exactly the same order that we sent. - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ -#define NAKCIVOID(opt, neg) \ - if (go->neg && \ - len >= CILEN_VOID && \ - p[1] == CILEN_VOID && \ - p[0] == opt) { \ - len -= CILEN_VOID; \ - INCPTR(CILEN_VOID, p); \ - no.neg = 1; \ - try_.neg = 0; \ - } -#if CHAP_SUPPORT -#define NAKCICHAP(opt, neg, code) \ - if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - no.neg = 1; \ - code \ - } -#endif /* CHAP_SUPPORT */ -#define NAKCICHAR(opt, neg, code) \ - if (go->neg && \ - len >= CILEN_CHAR && \ - p[1] == CILEN_CHAR && \ - p[0] == opt) { \ - len -= CILEN_CHAR; \ - INCPTR(2, p); \ - GETCHAR(cichar, p); \ - no.neg = 1; \ - code \ - } -#define NAKCISHORT(opt, neg, code) \ - if (go->neg && \ - len >= CILEN_SHORT && \ - p[1] == CILEN_SHORT && \ - p[0] == opt) { \ - len -= CILEN_SHORT; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - no.neg = 1; \ - code \ - } -#define NAKCILONG(opt, neg, code) \ - if (go->neg && \ - len >= CILEN_LONG && \ - p[1] == CILEN_LONG && \ - p[0] == opt) { \ - len -= CILEN_LONG; \ - INCPTR(2, p); \ - GETLONG(cilong, p); \ - no.neg = 1; \ - code \ - } -#if LQR_SUPPORT -#define NAKCILQR(opt, neg, code) \ - if (go->neg && \ - len >= CILEN_LQR && \ - p[1] == CILEN_LQR && \ - p[0] == opt) { \ - len -= CILEN_LQR; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETLONG(cilong, p); \ - no.neg = 1; \ - code \ - } -#endif /* LQR_SUPPORT */ -#define NAKCIENDP(opt, neg) \ - if (go->neg && \ - len >= CILEN_CHAR && \ - p[0] == opt && \ - p[1] >= CILEN_CHAR && \ - p[1] <= len) { \ - len -= p[1]; \ - INCPTR(p[1], p); \ - no.neg = 1; \ - try_.neg = 0; \ - } - - /* - * NOTE! There must be no assignments to individual fields of *go in - * the code below. Any such assignment is a BUG! - */ - /* - * We don't care if they want to send us smaller packets than - * we want. Therefore, accept any MRU less than what we asked for, - * but then ignore the new value when setting the MRU in the kernel. - * If they send us a bigger MRU than what we asked, accept it, up to - * the limit of the default MRU we'd get if we didn't negotiate. - */ - if (go->neg_mru && go->mru != PPP_DEFMRU) { - NAKCISHORT(CI_MRU, neg_mru, - if (cishort <= wo->mru || cishort <= PPP_DEFMRU) - try_.mru = cishort; - ); - } - - /* - * Add any characters they want to our (receive-side) asyncmap. - */ - if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) { - NAKCILONG(CI_ASYNCMAP, neg_asyncmap, - try_.asyncmap = go->asyncmap | cilong; - ); - } - - /* - * If they've nak'd our authentication-protocol, check whether - * they are proposing a different protocol, or a different - * hash algorithm for CHAP. - */ - if ((0 -#if CHAP_SUPPORT - || go->neg_chap -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - || go->neg_upap -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - || go->neg_eap -#endif /* EAP_SUPPORT */ - ) - && len >= CILEN_SHORT - && p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) { - cilen = p[1]; - len -= cilen; -#if CHAP_SUPPORT - no.neg_chap = go->neg_chap; -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - no.neg_upap = go->neg_upap; -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - no.neg_eap = go->neg_eap; -#endif /* EAP_SUPPORT */ - INCPTR(2, p); - GETSHORT(cishort, p); - -#if PAP_SUPPORT - if (cishort == PPP_PAP && cilen == CILEN_SHORT) { -#if EAP_SUPPORT - /* If we were asking for EAP, then we need to stop that. */ - if (go->neg_eap) - try_.neg_eap = 0; - else -#endif /* EAP_SUPPORT */ - -#if CHAP_SUPPORT - /* If we were asking for CHAP, then we need to stop that. */ - if (go->neg_chap) - try_.neg_chap = 0; - else -#endif /* CHAP_SUPPORT */ - - /* - * If we weren't asking for CHAP or EAP, then we were asking for - * PAP, in which case this Nak is bad. - */ - goto bad; - } else -#endif /* PAP_SUPPORT */ - -#if CHAP_SUPPORT - if (cishort == PPP_CHAP && cilen == CILEN_CHAP) { - GETCHAR(cichar, p); -#if EAP_SUPPORT - /* Stop asking for EAP, if we were. */ - if (go->neg_eap) { - try_.neg_eap = 0; - /* Try to set up to use their suggestion, if possible */ - if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) - try_.chap_mdtype = CHAP_MDTYPE_D(cichar); - } else -#endif /* EAP_SUPPORT */ - if (go->neg_chap) { - /* - * We were asking for our preferred algorithm, they must - * want something different. - */ - if (cichar != CHAP_DIGEST(go->chap_mdtype)) { - if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) { - /* Use their suggestion if we support it ... */ - try_.chap_mdtype = CHAP_MDTYPE_D(cichar); - } else { - /* ... otherwise, try our next-preferred algorithm. */ - try_.chap_mdtype &= ~(CHAP_MDTYPE(try_.chap_mdtype)); - if (try_.chap_mdtype == MDTYPE_NONE) /* out of algos */ - try_.neg_chap = 0; - } - } else { - /* - * Whoops, they Nak'd our algorithm of choice - * but then suggested it back to us. - */ - goto bad; - } - } else { - /* - * Stop asking for PAP if we were asking for it. - */ -#if PAP_SUPPORT - try_.neg_upap = 0; -#endif /* PAP_SUPPORT */ - } - - } else -#endif /* CHAP_SUPPORT */ - { - -#if EAP_SUPPORT - /* - * If we were asking for EAP, and they're Conf-Naking EAP, - * well, that's just strange. Nobody should do that. - */ - if (cishort == PPP_EAP && cilen == CILEN_SHORT && go->neg_eap) - ppp_dbglog("Unexpected Conf-Nak for EAP"); - - /* - * We don't recognize what they're suggesting. - * Stop asking for what we were asking for. - */ - if (go->neg_eap) - try_.neg_eap = 0; - else -#endif /* EAP_SUPPORT */ - -#if CHAP_SUPPORT - if (go->neg_chap) - try_.neg_chap = 0; - else -#endif /* CHAP_SUPPORT */ - -#if PAP_SUPPORT - if(1) - try_.neg_upap = 0; - else -#endif /* PAP_SUPPORT */ - {} - - p += cilen - CILEN_SHORT; - } - } - -#if LQR_SUPPORT - /* - * If they can't cope with our link quality protocol, we'll have - * to stop asking for LQR. We haven't got any other protocol. - * If they Nak the reporting period, take their value XXX ? - */ - NAKCILQR(CI_QUALITY, neg_lqr, - if (cishort != PPP_LQR) - try_.neg_lqr = 0; - else - try_.lqr_period = cilong; - ); -#endif /* LQR_SUPPORT */ - - /* - * Only implementing CBCP...not the rest of the callback options - */ - NAKCICHAR(CI_CALLBACK, neg_cbcp, - try_.neg_cbcp = 0; - (void)cichar; /* if CHAP support is not compiled, cichar is set but not used, which makes some compilers complaining */ - ); - - /* - * Check for a looped-back line. - */ - NAKCILONG(CI_MAGICNUMBER, neg_magicnumber, - try_.magicnumber = magic(); - looped_back = 1; - ); - - /* - * Peer shouldn't send Nak for protocol compression or - * address/control compression requests; they should send - * a Reject instead. If they send a Nak, treat it as a Reject. - */ - NAKCIVOID(CI_PCOMPRESSION, neg_pcompression); - NAKCIVOID(CI_ACCOMPRESSION, neg_accompression); - -#ifdef HAVE_MULTILINK - /* - * Nak for MRRU option - accept their value if it is smaller - * than the one we want. - */ - if (go->neg_mrru) { - NAKCISHORT(CI_MRRU, neg_mrru, - if (treat_as_reject) - try_.neg_mrru = 0; - else if (cishort <= wo->mrru) - try_.mrru = cishort; - ); - } -#else /* HAVE_MULTILINK */ - LWIP_UNUSED_ARG(treat_as_reject); -#endif /* HAVE_MULTILINK */ - - /* - * Nak for short sequence numbers shouldn't be sent, treat it - * like a reject. - */ - NAKCIVOID(CI_SSNHF, neg_ssnhf); - - /* - * Nak of the endpoint discriminator option is not permitted, - * treat it like a reject. - */ - NAKCIENDP(CI_EPDISC, neg_endpoint); - - /* - * There may be remaining CIs, if the peer is requesting negotiation - * on an option that we didn't include in our request packet. - * If we see an option that we requested, or one we've already seen - * in this packet, then this packet is bad. - * If we wanted to respond by starting to negotiate on the requested - * option(s), we could, but we don't, because except for the - * authentication type and quality protocol, if we are not negotiating - * an option, it is because we were told not to. - * For the authentication type, the Nak from the peer means - * `let me authenticate myself with you' which is a bit pointless. - * For the quality protocol, the Nak means `ask me to send you quality - * reports', but if we didn't ask for them, we don't want them. - * An option we don't recognize represents the peer asking to - * negotiate some option we don't support, so ignore it. - */ - while (len >= CILEN_VOID) { - GETCHAR(citype, p); - GETCHAR(cilen, p); - if (cilen < CILEN_VOID || (len -= cilen) < 0) - goto bad; - next = p + cilen - 2; - - switch (citype) { - case CI_MRU: - if ((go->neg_mru && go->mru != PPP_DEFMRU) - || no.neg_mru || cilen != CILEN_SHORT) - goto bad; - GETSHORT(cishort, p); - if (cishort < PPP_DEFMRU) { - try_.neg_mru = 1; - try_.mru = cishort; - } - break; - case CI_ASYNCMAP: - if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) - || no.neg_asyncmap || cilen != CILEN_LONG) - goto bad; - break; - case CI_AUTHTYPE: - if (0 -#if CHAP_SUPPORT - || go->neg_chap || no.neg_chap -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - || go->neg_upap || no.neg_upap -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - || go->neg_eap || no.neg_eap -#endif /* EAP_SUPPORT */ - ) - goto bad; - break; - case CI_MAGICNUMBER: - if (go->neg_magicnumber || no.neg_magicnumber || - cilen != CILEN_LONG) - goto bad; - break; - case CI_PCOMPRESSION: - if (go->neg_pcompression || no.neg_pcompression - || cilen != CILEN_VOID) - goto bad; - break; - case CI_ACCOMPRESSION: - if (go->neg_accompression || no.neg_accompression - || cilen != CILEN_VOID) - goto bad; - break; -#if LQR_SUPPORT - case CI_QUALITY: - if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR) - goto bad; - break; -#endif /* LQR_SUPPORT */ -#ifdef HAVE_MULTILINK - case CI_MRRU: - if (go->neg_mrru || no.neg_mrru || cilen != CILEN_SHORT) - goto bad; - break; -#endif /* HAVE_MULTILINK */ - case CI_SSNHF: - if (go->neg_ssnhf || no.neg_ssnhf || cilen != CILEN_VOID) - goto bad; - try_.neg_ssnhf = 1; - break; - case CI_EPDISC: - if (go->neg_endpoint || no.neg_endpoint || cilen < CILEN_CHAR) - goto bad; - break; - default: - break; - } - p = next; - } - - /* - * OK, the Nak is good. Now we can update state. - * If there are any options left we ignore them. - */ - if (f->state != PPP_FSM_OPENED) { - if (looped_back) { - if (++try_.numloops >= pcb->settings.lcp_loopbackfail) { - ppp_notice("Serial line is looped back."); - pcb->err_code = PPPERR_LOOPBACK; - lcp_close(f->pcb, "Loopback detected"); - } - } else - try_.numloops = 0; - *go = try_; - } - - return 1; - -bad: - LCPDEBUG(("lcp_nakci: received bad Nak!")); - return 0; -} - - -/* - * lcp_rejci - Peer has Rejected some of our CIs. - * This should not modify any state if the Reject is bad - * or if LCP is in the OPENED state. - * - * Returns: - * 0 - Reject was bad. - * 1 - Reject was good. - */ -static int lcp_rejci(fsm *f, u_char *p, int len) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - u_char cichar; - u_short cishort; - u32_t cilong; - lcp_options try_; /* options to request next time */ - - try_ = *go; - - /* - * Any Rejected CIs must be in exactly the same order that we sent. - * Check packet length and CI length at each step. - * If we find any deviations, then this packet is bad. - */ -#define REJCIVOID(opt, neg) \ - if (go->neg && \ - len >= CILEN_VOID && \ - p[1] == CILEN_VOID && \ - p[0] == opt) { \ - len -= CILEN_VOID; \ - INCPTR(CILEN_VOID, p); \ - try_.neg = 0; \ - } -#define REJCISHORT(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_SHORT && \ - p[1] == CILEN_SHORT && \ - p[0] == opt) { \ - len -= CILEN_SHORT; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - /* Check rejected value. */ \ - if (cishort != val) \ - goto bad; \ - try_.neg = 0; \ - } - -#if CHAP_SUPPORT && EAP_SUPPORT && PAP_SUPPORT -#define REJCICHAP(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ - try_.neg_eap = try_.neg_upap = 0; \ - } -#endif /* CHAP_SUPPORT && EAP_SUPPORT && PAP_SUPPORT */ - -#if CHAP_SUPPORT && !EAP_SUPPORT && PAP_SUPPORT -#define REJCICHAP(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ - try_.neg_upap = 0; \ - } -#endif /* CHAP_SUPPORT && !EAP_SUPPORT && PAP_SUPPORT */ - -#if CHAP_SUPPORT && EAP_SUPPORT && !PAP_SUPPORT -#define REJCICHAP(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ - try_.neg_eap = 0; \ - } -#endif /* CHAP_SUPPORT && EAP_SUPPORT && !PAP_SUPPORT */ - -#if CHAP_SUPPORT && !EAP_SUPPORT && !PAP_SUPPORT -#define REJCICHAP(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_CHAP && \ - p[1] == CILEN_CHAP && \ - p[0] == opt) { \ - len -= CILEN_CHAP; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ - goto bad; \ - try_.neg = 0; \ - } -#endif /* CHAP_SUPPORT && !EAP_SUPPORT && !PAP_SUPPORT */ - -#define REJCILONG(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_LONG && \ - p[1] == CILEN_LONG && \ - p[0] == opt) { \ - len -= CILEN_LONG; \ - INCPTR(2, p); \ - GETLONG(cilong, p); \ - /* Check rejected value. */ \ - if (cilong != val) \ - goto bad; \ - try_.neg = 0; \ - } -#if LQR_SUPPORT -#define REJCILQR(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_LQR && \ - p[1] == CILEN_LQR && \ - p[0] == opt) { \ - len -= CILEN_LQR; \ - INCPTR(2, p); \ - GETSHORT(cishort, p); \ - GETLONG(cilong, p); \ - /* Check rejected value. */ \ - if (cishort != PPP_LQR || cilong != val) \ - goto bad; \ - try_.neg = 0; \ - } -#endif /* LQR_SUPPORT */ -#define REJCICBCP(opt, neg, val) \ - if (go->neg && \ - len >= CILEN_CBCP && \ - p[1] == CILEN_CBCP && \ - p[0] == opt) { \ - len -= CILEN_CBCP; \ - INCPTR(2, p); \ - GETCHAR(cichar, p); \ - /* Check rejected value. */ \ - if (cichar != val) \ - goto bad; \ - try_.neg = 0; \ - } -#define REJCIENDP(opt, neg, class, val, vlen) \ - if (go->neg && \ - len >= CILEN_CHAR + vlen && \ - p[0] == opt && \ - p[1] == CILEN_CHAR + vlen) { \ - int i; \ - len -= CILEN_CHAR + vlen; \ - INCPTR(2, p); \ - GETCHAR(cichar, p); \ - if (cichar != class) \ - goto bad; \ - for (i = 0; i < vlen; ++i) { \ - GETCHAR(cichar, p); \ - if (cichar != val[i]) \ - goto bad; \ - } \ - try_.neg = 0; \ - } - - REJCISHORT(CI_MRU, neg_mru, go->mru); - REJCILONG(CI_ASYNCMAP, neg_asyncmap, go->asyncmap); -#if EAP_SUPPORT - REJCISHORT(CI_AUTHTYPE, neg_eap, PPP_EAP); - if (!go->neg_eap) { -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT - REJCICHAP(CI_AUTHTYPE, neg_chap, go->chap_mdtype); - if (!go->neg_chap) { -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - REJCISHORT(CI_AUTHTYPE, neg_upap, PPP_PAP); -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - } -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - } -#endif /* EAP_SUPPORT */ -#if LQR_SUPPORT - REJCILQR(CI_QUALITY, neg_lqr, go->lqr_period); -#endif /* LQR_SUPPORT */ - REJCICBCP(CI_CALLBACK, neg_cbcp, CBCP_OPT); - REJCILONG(CI_MAGICNUMBER, neg_magicnumber, go->magicnumber); - REJCIVOID(CI_PCOMPRESSION, neg_pcompression); - REJCIVOID(CI_ACCOMPRESSION, neg_accompression); -#ifdef HAVE_MULTILINK - REJCISHORT(CI_MRRU, neg_mrru, go->mrru); -#endif /* HAVE_MULTILINK */ - REJCIVOID(CI_SSNHF, neg_ssnhf); - REJCIENDP(CI_EPDISC, neg_endpoint, go->endpoint.class_, - go->endpoint.value, go->endpoint.length); - - /* - * If there are any remaining CIs, then this packet is bad. - */ - if (len != 0) - goto bad; - /* - * Now we can update state. - */ - if (f->state != PPP_FSM_OPENED) - *go = try_; - return 1; - -bad: - LCPDEBUG(("lcp_rejci: received bad Reject!")); - return 0; -} - - -/* - * lcp_reqci - Check the peer's requested CIs and send appropriate response. - * - * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified - * appropriately. If reject_if_disagree is non-zero, doesn't return - * CONFNAK; returns CONFREJ if it can't return CONFACK. - * - * inp = Requested CIs - * lenp = Length of requested CIs - */ -static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - lcp_options *ho = &pcb->lcp_hisoptions; - lcp_options *ao = &pcb->lcp_allowoptions; - u_char *cip, *next; /* Pointer to current and next CIs */ - int cilen, citype, cichar; /* Parsed len, type, char value */ - u_short cishort; /* Parsed short value */ - u32_t cilong; /* Parse long value */ - int rc = CONFACK; /* Final packet return code */ - int orc; /* Individual option return code */ - u_char *p; /* Pointer to next char to parse */ - u_char *rejp; /* Pointer to next char in reject frame */ - struct pbuf *nakp; /* Nak buffer */ - u_char *nakoutp; /* Pointer to next char in Nak frame */ - int l = *lenp; /* Length left */ - - /* - * Reset all his options. - */ - BZERO(ho, sizeof(*ho)); - - /* - * Process all his options. - */ - next = inp; - nakp = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_CTRL_PBUF_MAX_SIZE), PPP_CTRL_PBUF_TYPE); - if(NULL == nakp) - return 0; - if(nakp->tot_len != nakp->len) { - pbuf_free(nakp); - return 0; - } - - nakoutp = (u_char*)nakp->payload; - rejp = inp; - while (l) { - orc = CONFACK; /* Assume success */ - cip = p = next; /* Remember begining of CI */ - if (l < 2 || /* Not enough data for CI header or */ - p[1] < 2 || /* CI length too small or */ - p[1] > l) { /* CI length too big? */ - LCPDEBUG(("lcp_reqci: bad CI length!")); - orc = CONFREJ; /* Reject bad CI */ - cilen = l; /* Reject till end of packet */ - l = 0; /* Don't loop again */ - citype = 0; - goto endswitch; - } - GETCHAR(citype, p); /* Parse CI type */ - GETCHAR(cilen, p); /* Parse CI length */ - l -= cilen; /* Adjust remaining length */ - next += cilen; /* Step to next CI */ - - switch (citype) { /* Check CI type */ - case CI_MRU: - if (!ao->neg_mru || /* Allow option? */ - cilen != CILEN_SHORT) { /* Check CI length */ - orc = CONFREJ; /* Reject CI */ - break; - } - GETSHORT(cishort, p); /* Parse MRU */ - - /* - * He must be able to receive at least our minimum. - * No need to check a maximum. If he sends a large number, - * we'll just ignore it. - */ - if (cishort < PPP_MINMRU) { - orc = CONFNAK; /* Nak CI */ - PUTCHAR(CI_MRU, nakoutp); - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_MINMRU, nakoutp); /* Give him a hint */ - break; - } - ho->neg_mru = 1; /* Remember he sent MRU */ - ho->mru = cishort; /* And remember value */ - break; - - case CI_ASYNCMAP: - if (!ao->neg_asyncmap || - cilen != CILEN_LONG) { - orc = CONFREJ; - break; - } - GETLONG(cilong, p); - - /* - * Asyncmap must have set at least the bits - * which are set in lcp_allowoptions[unit].asyncmap. - */ - if ((ao->asyncmap & ~cilong) != 0) { - orc = CONFNAK; - PUTCHAR(CI_ASYNCMAP, nakoutp); - PUTCHAR(CILEN_LONG, nakoutp); - PUTLONG(ao->asyncmap | cilong, nakoutp); - break; - } - ho->neg_asyncmap = 1; - ho->asyncmap = cilong; - break; - - case CI_AUTHTYPE: - if (cilen < CILEN_SHORT || - !(0 -#if PAP_SUPPORT - || ao->neg_upap -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - || ao->neg_chap -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - || ao->neg_eap -#endif /* EAP_SUPPORT */ - )) { - /* - * Reject the option if we're not willing to authenticate. - */ - ppp_dbglog("No auth is possible"); - orc = CONFREJ; - break; - } - GETSHORT(cishort, p); - - /* - * Authtype must be PAP, CHAP, or EAP. - * - * Note: if more than one of ao->neg_upap, ao->neg_chap, and - * ao->neg_eap are set, and the peer sends a Configure-Request - * with two or more authenticate-protocol requests, then we will - * reject the second request. - * Whether we end up doing CHAP, UPAP, or EAP depends then on - * the ordering of the CIs in the peer's Configure-Request. - */ - -#if PAP_SUPPORT - if (cishort == PPP_PAP) { - /* we've already accepted CHAP or EAP */ - if (0 -#if CHAP_SUPPORT - || ho->neg_chap -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - || ho->neg_eap -#endif /* EAP_SUPPORT */ - || cilen != CILEN_SHORT) { - LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE PAP, rejecting...")); - orc = CONFREJ; - break; - } - if (!ao->neg_upap) { /* we don't want to do PAP */ - orc = CONFNAK; /* NAK it and suggest CHAP or EAP */ - PUTCHAR(CI_AUTHTYPE, nakoutp); -#if EAP_SUPPORT - if (ao->neg_eap) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_EAP, nakoutp); - } else { -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - } -#endif /* EAP_SUPPORT */ - break; - } - ho->neg_upap = 1; - break; - } -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - if (cishort == PPP_CHAP) { - /* we've already accepted PAP or EAP */ - if ( -#if PAP_SUPPORT - ho->neg_upap || -#endif /* PAP_SUPPORT */ -#if EAP_SUPPORT - ho->neg_eap || -#endif /* EAP_SUPPORT */ - cilen != CILEN_CHAP) { - LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE CHAP, rejecting...")); - orc = CONFREJ; - break; - } - if (!ao->neg_chap) { /* we don't want to do CHAP */ - orc = CONFNAK; /* NAK it and suggest EAP or PAP */ - PUTCHAR(CI_AUTHTYPE, nakoutp); - PUTCHAR(CILEN_SHORT, nakoutp); -#if EAP_SUPPORT - if (ao->neg_eap) { - PUTSHORT(PPP_EAP, nakoutp); - } else -#endif /* EAP_SUPPORT */ -#if PAP_SUPPORT - if(1) { - PUTSHORT(PPP_PAP, nakoutp); - } - else -#endif /* PAP_SUPPORT */ - {} - break; - } - GETCHAR(cichar, p); /* get digest type */ - if (!(CHAP_CANDIGEST(ao->chap_mdtype, cichar))) { - /* - * We can't/won't do the requested type, - * suggest something else. - */ - orc = CONFNAK; - PUTCHAR(CI_AUTHTYPE, nakoutp); - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); - break; - } - ho->chap_mdtype = CHAP_MDTYPE_D(cichar); /* save md type */ - ho->neg_chap = 1; - break; - } -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - if (cishort == PPP_EAP) { - /* we've already accepted CHAP or PAP */ - if ( -#if CHAP_SUPPORT - ho->neg_chap || -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - ho->neg_upap || -#endif /* PAP_SUPPORT */ - cilen != CILEN_SHORT) { - LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE EAP, rejecting...")); - orc = CONFREJ; - break; - } - if (!ao->neg_eap) { /* we don't want to do EAP */ - orc = CONFNAK; /* NAK it and suggest CHAP or PAP */ - PUTCHAR(CI_AUTHTYPE, nakoutp); -#if CHAP_SUPPORT - if (ao->neg_chap) { - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); - } else -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - if(1) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_PAP, nakoutp); - } else -#endif /* PAP_SUPPORT */ - {} - break; - } - ho->neg_eap = 1; - break; - } -#endif /* EAP_SUPPORT */ - - /* - * We don't recognize the protocol they're asking for. - * Nak it with something we're willing to do. - * (At this point we know ao->neg_upap || ao->neg_chap || - * ao->neg_eap.) - */ - orc = CONFNAK; - PUTCHAR(CI_AUTHTYPE, nakoutp); - -#if EAP_SUPPORT - if (ao->neg_eap) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_EAP, nakoutp); - } else -#endif /* EAP_SUPPORT */ -#if CHAP_SUPPORT - if (ao->neg_chap) { - PUTCHAR(CILEN_CHAP, nakoutp); - PUTSHORT(PPP_CHAP, nakoutp); - PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); - } else -#endif /* CHAP_SUPPORT */ -#if PAP_SUPPORT - if(1) { - PUTCHAR(CILEN_SHORT, nakoutp); - PUTSHORT(PPP_PAP, nakoutp); - } else -#endif /* PAP_SUPPORT */ - {} - break; - -#if LQR_SUPPORT - case CI_QUALITY: - if (!ao->neg_lqr || - cilen != CILEN_LQR) { - orc = CONFREJ; - break; - } - - GETSHORT(cishort, p); - GETLONG(cilong, p); - - /* - * Check the protocol and the reporting period. - * XXX When should we Nak this, and what with? - */ - if (cishort != PPP_LQR) { - orc = CONFNAK; - PUTCHAR(CI_QUALITY, nakoutp); - PUTCHAR(CILEN_LQR, nakoutp); - PUTSHORT(PPP_LQR, nakoutp); - PUTLONG(ao->lqr_period, nakoutp); - break; - } - break; -#endif /* LQR_SUPPORT */ - - case CI_MAGICNUMBER: - if (!(ao->neg_magicnumber || go->neg_magicnumber) || - cilen != CILEN_LONG) { - orc = CONFREJ; - break; - } - GETLONG(cilong, p); - - /* - * He must have a different magic number. - */ - if (go->neg_magicnumber && - cilong == go->magicnumber) { - cilong = magic(); /* Don't put magic() inside macro! */ - orc = CONFNAK; - PUTCHAR(CI_MAGICNUMBER, nakoutp); - PUTCHAR(CILEN_LONG, nakoutp); - PUTLONG(cilong, nakoutp); - break; - } - ho->neg_magicnumber = 1; - ho->magicnumber = cilong; - break; - - - case CI_PCOMPRESSION: - if (!ao->neg_pcompression || - cilen != CILEN_VOID) { - orc = CONFREJ; - break; - } - ho->neg_pcompression = 1; - break; - - case CI_ACCOMPRESSION: - if (!ao->neg_accompression || - cilen != CILEN_VOID) { - orc = CONFREJ; - break; - } - ho->neg_accompression = 1; - break; - -#ifdef HAVE_MULTILINK - case CI_MRRU: - if (!ao->neg_mrru - || !multilink - || cilen != CILEN_SHORT) { - orc = CONFREJ; - break; - } - - GETSHORT(cishort, p); - /* possibly should insist on a minimum/maximum MRRU here */ - ho->neg_mrru = 1; - ho->mrru = cishort; - break; -#endif /* HAVE_MULTILINK */ - - case CI_SSNHF: - if (!ao->neg_ssnhf -#ifdef HAVE_MULTILINK - || !multilink -#endif /* HAVE_MULTILINK */ - || cilen != CILEN_VOID) { - orc = CONFREJ; - break; - } - ho->neg_ssnhf = 1; - break; - - case CI_EPDISC: - if (!ao->neg_endpoint || - cilen < CILEN_CHAR || - cilen > CILEN_CHAR + MAX_ENDP_LEN) { - orc = CONFREJ; - break; - } - GETCHAR(cichar, p); - cilen -= CILEN_CHAR; - ho->neg_endpoint = 1; - ho->endpoint.class_ = cichar; - ho->endpoint.length = cilen; - MEMCPY(ho->endpoint.value, p, cilen); - INCPTR(cilen, p); - break; - - default: - LCPDEBUG(("lcp_reqci: rcvd unknown option %d", citype)); - orc = CONFREJ; - break; - } - -endswitch: - if (orc == CONFACK && /* Good CI */ - rc != CONFACK) /* but prior CI wasnt? */ - continue; /* Don't send this one */ - - if (orc == CONFNAK) { /* Nak this CI? */ - if (reject_if_disagree /* Getting fed up with sending NAKs? */ - && citype != CI_MAGICNUMBER) { - orc = CONFREJ; /* Get tough if so */ - } else { - if (rc == CONFREJ) /* Rejecting prior CI? */ - continue; /* Don't send this one */ - rc = CONFNAK; - } - } - if (orc == CONFREJ) { /* Reject this CI */ - rc = CONFREJ; - if (cip != rejp) /* Need to move rejected CI? */ - MEMCPY(rejp, cip, cilen); /* Move it */ - INCPTR(cilen, rejp); /* Update output pointer */ - } - } - - /* - * If we wanted to send additional NAKs (for unsent CIs), the - * code would go here. The extra NAKs would go at *nakoutp. - * At present there are no cases where we want to ask the - * peer to negotiate an option. - */ - - switch (rc) { - case CONFACK: - *lenp = next - inp; - break; - case CONFNAK: - /* - * Copy the Nak'd options from the nak buffer to the caller's buffer. - */ - *lenp = nakoutp - (u_char*)nakp->payload; - MEMCPY(inp, nakp->payload, *lenp); - break; - case CONFREJ: - *lenp = rejp - inp; - break; - default: - break; - } - - pbuf_free(nakp); - LCPDEBUG(("lcp_reqci: returning CONF%s.", CODENAME(rc))); - return (rc); /* Return final code */ -} - - -/* - * lcp_up - LCP has come UP. - */ -static void lcp_up(fsm *f) { - ppp_pcb *pcb = f->pcb; - lcp_options *wo = &pcb->lcp_wantoptions; - lcp_options *ho = &pcb->lcp_hisoptions; - lcp_options *go = &pcb->lcp_gotoptions; - lcp_options *ao = &pcb->lcp_allowoptions; - int mtu, mru; - - if (!go->neg_magicnumber) - go->magicnumber = 0; - if (!ho->neg_magicnumber) - ho->magicnumber = 0; - - /* - * Set our MTU to the smaller of the MTU we wanted and - * the MRU our peer wanted. If we negotiated an MRU, - * set our MRU to the larger of value we wanted and - * the value we got in the negotiation. - * Note on the MTU: the link MTU can be the MRU the peer wanted, - * the interface MTU is set to the lowest of that, the - * MTU we want to use, and our link MRU. - */ - mtu = ho->neg_mru? ho->mru: PPP_MRU; - mru = go->neg_mru? LWIP_MAX(wo->mru, go->mru): PPP_MRU; -#ifdef HAVE_MULTILINK - if (!(multilink && go->neg_mrru && ho->neg_mrru)) -#endif /* HAVE_MULTILINK */ - netif_set_mtu(pcb, LWIP_MIN(LWIP_MIN(mtu, mru), ao->mru)); - ppp_send_config(pcb, mtu, - (ho->neg_asyncmap? ho->asyncmap: 0xffffffff), - ho->neg_pcompression, ho->neg_accompression); - ppp_recv_config(pcb, mru, - (pcb->settings.lax_recv? 0: go->neg_asyncmap? go->asyncmap: 0xffffffff), - go->neg_pcompression, go->neg_accompression); - - if (ho->neg_mru) - pcb->peer_mru = ho->mru; - - lcp_echo_lowerup(f->pcb); /* Enable echo messages */ - - link_established(pcb); -} - - -/* - * lcp_down - LCP has gone DOWN. - * - * Alert other protocols. - */ -static void lcp_down(fsm *f) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - - lcp_echo_lowerdown(f->pcb); - - link_down(pcb); - - ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0); - ppp_recv_config(pcb, PPP_MRU, - (go->neg_asyncmap? go->asyncmap: 0xffffffff), - go->neg_pcompression, go->neg_accompression); - pcb->peer_mru = PPP_MRU; -} - - -/* - * lcp_starting - LCP needs the lower layer up. - */ -static void lcp_starting(fsm *f) { - ppp_pcb *pcb = f->pcb; - link_required(pcb); -} - - -/* - * lcp_finished - LCP has finished with the lower layer. - */ -static void lcp_finished(fsm *f) { - ppp_pcb *pcb = f->pcb; - link_terminated(pcb); -} - - -#if PRINTPKT_SUPPORT -/* - * lcp_printpkt - print the contents of an LCP packet. - */ -static const char* const lcp_codenames[] = { - "ConfReq", "ConfAck", "ConfNak", "ConfRej", - "TermReq", "TermAck", "CodeRej", "ProtRej", - "EchoReq", "EchoRep", "DiscReq", "Ident", - "TimeRem" -}; - -static int lcp_printpkt(const u_char *p, int plen, - void (*printer) (void *, const char *, ...), void *arg) { - int code, id, len, olen, i; - const u_char *pstart, *optend; - u_short cishort; - u32_t cilong; - - if (plen < HEADERLEN) - return 0; - pstart = p; - GETCHAR(code, p); - GETCHAR(id, p); - GETSHORT(len, p); - if (len < HEADERLEN || len > plen) - return 0; - - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(lcp_codenames)) - printer(arg, " %s", lcp_codenames[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= HEADERLEN; - switch (code) { - case CONFREQ: - case CONFACK: - case CONFNAK: - case CONFREJ: - /* print option list */ - while (len >= 2) { - GETCHAR(code, p); - GETCHAR(olen, p); - p -= 2; - if (olen < 2 || olen > len) { - break; - } - printer(arg, " <"); - len -= olen; - optend = p + olen; - switch (code) { - case CI_MRU: - if (olen == CILEN_SHORT) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "mru %d", cishort); - } - break; - case CI_ASYNCMAP: - if (olen == CILEN_LONG) { - p += 2; - GETLONG(cilong, p); - printer(arg, "asyncmap 0x%x", cilong); - } - break; - case CI_AUTHTYPE: - if (olen >= CILEN_SHORT) { - p += 2; - printer(arg, "auth "); - GETSHORT(cishort, p); - switch (cishort) { -#if PAP_SUPPORT - case PPP_PAP: - printer(arg, "pap"); - break; -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - case PPP_CHAP: - printer(arg, "chap"); - if (p < optend) { - switch (*p) { - case CHAP_MD5: - printer(arg, " MD5"); - ++p; - break; -#if MSCHAP_SUPPORT - case CHAP_MICROSOFT: - printer(arg, " MS"); - ++p; - break; - - case CHAP_MICROSOFT_V2: - printer(arg, " MS-v2"); - ++p; - break; -#endif /* MSCHAP_SUPPORT */ - default: - break; - } - } - break; -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - case PPP_EAP: - printer(arg, "eap"); - break; -#endif /* EAP_SUPPORT */ - default: - printer(arg, "0x%x", cishort); - } - } - break; -#if LQR_SUPPORT - case CI_QUALITY: - if (olen >= CILEN_SHORT) { - p += 2; - printer(arg, "quality "); - GETSHORT(cishort, p); - switch (cishort) { - case PPP_LQR: - printer(arg, "lqr"); - break; - default: - printer(arg, "0x%x", cishort); - } - } - break; -#endif /* LQR_SUPPORT */ - case CI_CALLBACK: - if (olen >= CILEN_CHAR) { - p += 2; - printer(arg, "callback "); - GETCHAR(cishort, p); - switch (cishort) { - case CBCP_OPT: - printer(arg, "CBCP"); - break; - default: - printer(arg, "0x%x", cishort); - } - } - break; - case CI_MAGICNUMBER: - if (olen == CILEN_LONG) { - p += 2; - GETLONG(cilong, p); - printer(arg, "magic 0x%x", cilong); - } - break; - case CI_PCOMPRESSION: - if (olen == CILEN_VOID) { - p += 2; - printer(arg, "pcomp"); - } - break; - case CI_ACCOMPRESSION: - if (olen == CILEN_VOID) { - p += 2; - printer(arg, "accomp"); - } - break; - case CI_MRRU: - if (olen == CILEN_SHORT) { - p += 2; - GETSHORT(cishort, p); - printer(arg, "mrru %d", cishort); - } - break; - case CI_SSNHF: - if (olen == CILEN_VOID) { - p += 2; - printer(arg, "ssnhf"); - } - break; - case CI_EPDISC: -#ifdef HAVE_MULTILINK - if (olen >= CILEN_CHAR) { - struct epdisc epd; - p += 2; - GETCHAR(epd.class, p); - epd.length = olen - CILEN_CHAR; - if (epd.length > MAX_ENDP_LEN) - epd.length = MAX_ENDP_LEN; - if (epd.length > 0) { - MEMCPY(epd.value, p, epd.length); - p += epd.length; - } - printer(arg, "endpoint [%s]", epdisc_to_str(&epd)); - } -#else - printer(arg, "endpoint"); -#endif - break; - default: - break; - } - while (p < optend) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - printer(arg, ">"); - } - break; - - case TERMACK: - case TERMREQ: - if (len > 0 && *p >= ' ' && *p < 0x7f) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; - - case ECHOREQ: - case ECHOREP: - case DISCREQ: - if (len >= 4) { - GETLONG(cilong, p); - printer(arg, " magic=0x%x", cilong); - len -= 4; - } - break; - - case IDENTIF: - case TIMEREM: - if (len >= 4) { - GETLONG(cilong, p); - printer(arg, " magic=0x%x", cilong); - len -= 4; - } - if (code == TIMEREM) { - if (len < 4) - break; - GETLONG(cilong, p); - printer(arg, " seconds=%u", cilong); - len -= 4; - } - if (len > 0) { - printer(arg, " "); - ppp_print_string(p, len, printer, arg); - p += len; - len = 0; - } - break; - default: - break; - } - - /* print the rest of the bytes in the packet */ - for (i = 0; i < len && i < 32; ++i) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - if (i < len) { - printer(arg, " ..."); - p += len - i; - } - - return p - pstart; -} -#endif /* PRINTPKT_SUPPORT */ - -/* - * Time to shut down the link because there is nothing out there. - */ - -static void LcpLinkFailure(fsm *f) { - ppp_pcb *pcb = f->pcb; - if (f->state == PPP_FSM_OPENED) { - ppp_info("No response to %d echo-requests", pcb->lcp_echos_pending); - ppp_notice("Serial link appears to be disconnected."); - pcb->err_code = PPPERR_PEERDEAD; - lcp_close(pcb, "Peer not responding"); - } -} - -/* - * Timer expired for the LCP echo requests from this process. - */ - -static void LcpEchoCheck(fsm *f) { - ppp_pcb *pcb = f->pcb; - - LcpSendEchoRequest (f); - if (f->state != PPP_FSM_OPENED) - return; - - /* - * Start the timer for the next interval. - */ - if (pcb->lcp_echo_timer_running) - ppp_warn("assertion lcp_echo_timer_running==0 failed"); - TIMEOUT (LcpEchoTimeout, f, pcb->settings.lcp_echo_interval); - pcb->lcp_echo_timer_running = 1; -} - -/* - * LcpEchoTimeout - Timer expired on the LCP echo - */ - -static void LcpEchoTimeout(void *arg) { - fsm *f = (fsm*)arg; - ppp_pcb *pcb = f->pcb; - if (pcb->lcp_echo_timer_running != 0) { - pcb->lcp_echo_timer_running = 0; - LcpEchoCheck ((fsm *) arg); - } -} - -/* - * LcpEchoReply - LCP has received a reply to the echo - */ - -static void lcp_received_echo_reply(fsm *f, int id, u_char *inp, int len) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - u32_t magic_val; - LWIP_UNUSED_ARG(id); - - /* Check the magic number - don't count replies from ourselves. */ - if (len < 4) { - ppp_dbglog("lcp: received short Echo-Reply, length %d", len); - return; - } - GETLONG(magic_val, inp); - if (go->neg_magicnumber - && magic_val == go->magicnumber) { - ppp_warn("appear to have received our own echo-reply!"); - return; - } - - /* Reset the number of outstanding echo frames */ - pcb->lcp_echos_pending = 0; -} - -/* - * LcpSendEchoRequest - Send an echo request frame to the peer - */ - -static void LcpSendEchoRequest(fsm *f) { - ppp_pcb *pcb = f->pcb; - lcp_options *go = &pcb->lcp_gotoptions; - u32_t lcp_magic; - u_char pkt[4], *pktp; - - /* - * Detect the failure of the peer at this point. - */ - if (pcb->settings.lcp_echo_fails != 0) { - if (pcb->lcp_echos_pending >= pcb->settings.lcp_echo_fails) { - LcpLinkFailure(f); - pcb->lcp_echos_pending = 0; - } - } - -#if PPP_LCP_ADAPTIVE - /* - * If adaptive echos have been enabled, only send the echo request if - * no traffic was received since the last one. - */ - if (pcb->settings.lcp_echo_adaptive) { - static unsigned int last_pkts_in = 0; - -#if PPP_STATS_SUPPORT - update_link_stats(f->unit); - link_stats_valid = 0; -#endif /* PPP_STATS_SUPPORT */ - - if (link_stats.pkts_in != last_pkts_in) { - last_pkts_in = link_stats.pkts_in; - return; - } - } -#endif - - /* - * Make and send the echo request frame. - */ - if (f->state == PPP_FSM_OPENED) { - lcp_magic = go->magicnumber; - pktp = pkt; - PUTLONG(lcp_magic, pktp); - fsm_sdata(f, ECHOREQ, pcb->lcp_echo_number++, pkt, pktp - pkt); - ++pcb->lcp_echos_pending; - } -} - -/* - * lcp_echo_lowerup - Start the timer for the LCP frame - */ - -static void lcp_echo_lowerup(ppp_pcb *pcb) { - fsm *f = &pcb->lcp_fsm; - - /* Clear the parameters for generating echo frames */ - pcb->lcp_echos_pending = 0; - pcb->lcp_echo_number = 0; - pcb->lcp_echo_timer_running = 0; - - /* If a timeout interval is specified then start the timer */ - if (pcb->settings.lcp_echo_interval != 0) - LcpEchoCheck (f); -} - -/* - * lcp_echo_lowerdown - Stop the timer for the LCP frame - */ - -static void lcp_echo_lowerdown(ppp_pcb *pcb) { - fsm *f = &pcb->lcp_fsm; - - if (pcb->lcp_echo_timer_running != 0) { - UNTIMEOUT (LcpEchoTimeout, f); - pcb->lcp_echo_timer_running = 0; - } -} - -#endif /* PPP_SUPPORT */ +/* + * lcp.c - PPP Link Control Protocol. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +/* + * @todo: + */ + +#if 0 /* UNUSED */ +#include +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/lcp.h" +#if CHAP_SUPPORT +#include "netif/ppp/chap-new.h" +#endif /* CHAP_SUPPORT */ +#include "netif/ppp/magic.h" + +/* + * When the link comes up we want to be able to wait for a short while, + * or until seeing some input from the peer, before starting to send + * configure-requests. We do this by delaying the fsm_lowerup call. + */ +/* steal a bit in fsm flags word */ +#define DELAYED_UP 0x80 + +static void lcp_delayed_up(void *arg); + +/* + * LCP-related command-line options. + */ +#if 0 /* UNUSED */ +int lcp_echo_interval = 0; /* Interval between LCP echo-requests */ +int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */ +#endif /* UNUSED */ + +#if 0 /* UNUSED */ +/* options */ +static u_int lcp_echo_interval = LCP_ECHOINTERVAL; /* Interval between LCP echo-requests */ +static u_int lcp_echo_fails = LCP_MAXECHOFAILS; /* Tolerance to unanswered echo-requests */ +#endif /* UNUSED */ + +#if 0 /* UNUSED */ +#if PPP_LCP_ADAPTIVE +bool lcp_echo_adaptive = 0; /* request echo only if the link was idle */ +#endif +bool lax_recv = 0; /* accept control chars in asyncmap */ +bool noendpoint = 0; /* don't send/accept endpoint discriminator */ +#endif /* UNUSED */ + +#if PPP_OPTIONS +static int noopt (char **); +#endif /* PPP_OPTIONS */ + +#ifdef HAVE_MULTILINK +static int setendpoint (char **); +static void printendpoint (option_t *, void (*)(void *, char *, ...), + void *); +#endif /* HAVE_MULTILINK */ + +#if PPP_OPTIONS +static option_t lcp_option_list[] = { + /* LCP options */ + { "-all", o_special_noarg, (void *)noopt, + "Don't request/allow any LCP options" }, + + { "noaccomp", o_bool, &lcp_wantoptions[0].neg_accompression, + "Disable address/control compression", + OPT_A2CLR, &lcp_allowoptions[0].neg_accompression }, + { "-ac", o_bool, &lcp_wantoptions[0].neg_accompression, + "Disable address/control compression", + OPT_ALIAS | OPT_A2CLR, &lcp_allowoptions[0].neg_accompression }, + + { "asyncmap", o_uint32, &lcp_wantoptions[0].asyncmap, + "Set asyncmap (for received packets)", + OPT_OR, &lcp_wantoptions[0].neg_asyncmap }, + { "-as", o_uint32, &lcp_wantoptions[0].asyncmap, + "Set asyncmap (for received packets)", + OPT_ALIAS | OPT_OR, &lcp_wantoptions[0].neg_asyncmap }, + { "default-asyncmap", o_uint32, &lcp_wantoptions[0].asyncmap, + "Disable asyncmap negotiation", + OPT_OR | OPT_NOARG | OPT_VAL(~0U) | OPT_A2CLR, + &lcp_allowoptions[0].neg_asyncmap }, + { "-am", o_uint32, &lcp_wantoptions[0].asyncmap, + "Disable asyncmap negotiation", + OPT_ALIAS | OPT_OR | OPT_NOARG | OPT_VAL(~0U) | OPT_A2CLR, + &lcp_allowoptions[0].neg_asyncmap }, + + { "nomagic", o_bool, &lcp_wantoptions[0].neg_magicnumber, + "Disable magic number negotiation (looped-back line detection)", + OPT_A2CLR, &lcp_allowoptions[0].neg_magicnumber }, + { "-mn", o_bool, &lcp_wantoptions[0].neg_magicnumber, + "Disable magic number negotiation (looped-back line detection)", + OPT_ALIAS | OPT_A2CLR, &lcp_allowoptions[0].neg_magicnumber }, + + { "mru", o_int, &lcp_wantoptions[0].mru, + "Set MRU (maximum received packet size) for negotiation", + OPT_PRIO, &lcp_wantoptions[0].neg_mru }, + { "default-mru", o_bool, &lcp_wantoptions[0].neg_mru, + "Disable MRU negotiation (use default 1500)", + OPT_PRIOSUB | OPT_A2CLR, &lcp_allowoptions[0].neg_mru }, + { "-mru", o_bool, &lcp_wantoptions[0].neg_mru, + "Disable MRU negotiation (use default 1500)", + OPT_ALIAS | OPT_PRIOSUB | OPT_A2CLR, &lcp_allowoptions[0].neg_mru }, + + { "mtu", o_int, &lcp_allowoptions[0].mru, + "Set our MTU", OPT_LIMITS, NULL, MAXMRU, MINMRU }, + + { "nopcomp", o_bool, &lcp_wantoptions[0].neg_pcompression, + "Disable protocol field compression", + OPT_A2CLR, &lcp_allowoptions[0].neg_pcompression }, + { "-pc", o_bool, &lcp_wantoptions[0].neg_pcompression, + "Disable protocol field compression", + OPT_ALIAS | OPT_A2CLR, &lcp_allowoptions[0].neg_pcompression }, + + { "passive", o_bool, &lcp_wantoptions[0].passive, + "Set passive mode", 1 }, + { "-p", o_bool, &lcp_wantoptions[0].passive, + "Set passive mode", OPT_ALIAS | 1 }, + + { "silent", o_bool, &lcp_wantoptions[0].silent, + "Set silent mode", 1 }, + + { "lcp-echo-failure", o_int, &lcp_echo_fails, + "Set number of consecutive echo failures to indicate link failure", + OPT_PRIO }, + { "lcp-echo-interval", o_int, &lcp_echo_interval, + "Set time in seconds between LCP echo requests", OPT_PRIO }, +#if PPP_LCP_ADAPTIVE + { "lcp-echo-adaptive", o_bool, &lcp_echo_adaptive, + "Suppress LCP echo requests if traffic was received", 1 }, +#endif + { "lcp-restart", o_int, &lcp_fsm[0].timeouttime, + "Set time in seconds between LCP retransmissions", OPT_PRIO }, + { "lcp-max-terminate", o_int, &lcp_fsm[0].maxtermtransmits, + "Set maximum number of LCP terminate-request transmissions", OPT_PRIO }, + { "lcp-max-configure", o_int, &lcp_fsm[0].maxconfreqtransmits, + "Set maximum number of LCP configure-request transmissions", OPT_PRIO }, + { "lcp-max-failure", o_int, &lcp_fsm[0].maxnakloops, + "Set limit on number of LCP configure-naks", OPT_PRIO }, + + { "receive-all", o_bool, &lax_recv, + "Accept all received control characters", 1 }, + +#ifdef HAVE_MULTILINK + { "mrru", o_int, &lcp_wantoptions[0].mrru, + "Maximum received packet size for multilink bundle", + OPT_PRIO, &lcp_wantoptions[0].neg_mrru }, + + { "mpshortseq", o_bool, &lcp_wantoptions[0].neg_ssnhf, + "Use short sequence numbers in multilink headers", + OPT_PRIO | 1, &lcp_allowoptions[0].neg_ssnhf }, + { "nompshortseq", o_bool, &lcp_wantoptions[0].neg_ssnhf, + "Don't use short sequence numbers in multilink headers", + OPT_PRIOSUB | OPT_A2CLR, &lcp_allowoptions[0].neg_ssnhf }, + + { "endpoint", o_special, (void *) setendpoint, + "Endpoint discriminator for multilink", + OPT_PRIO | OPT_A2PRINTER, (void *) printendpoint }, +#endif /* HAVE_MULTILINK */ + + { "noendpoint", o_bool, &noendpoint, + "Don't send or accept multilink endpoint discriminator", 1 }, + + {NULL} +}; +#endif /* PPP_OPTIONS */ + +/* + * Callbacks for fsm code. (CI = Configuration Information) + */ +static void lcp_resetci(fsm *f); /* Reset our CI */ +static int lcp_cilen(fsm *f); /* Return length of our CI */ +static void lcp_addci(fsm *f, u_char *ucp, int *lenp); /* Add our CI to pkt */ +static int lcp_ackci(fsm *f, u_char *p, int len); /* Peer ack'd our CI */ +static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject); /* Peer nak'd our CI */ +static int lcp_rejci(fsm *f, u_char *p, int len); /* Peer rej'd our CI */ +static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree); /* Rcv peer CI */ +static void lcp_up(fsm *f); /* We're UP */ +static void lcp_down(fsm *f); /* We're DOWN */ +static void lcp_starting (fsm *); /* We need lower layer up */ +static void lcp_finished (fsm *); /* We need lower layer down */ +static int lcp_extcode(fsm *f, int code, int id, u_char *inp, int len); +static void lcp_rprotrej(fsm *f, u_char *inp, int len); + +/* + * routines to send LCP echos to peer + */ + +static void lcp_echo_lowerup(ppp_pcb *pcb); +static void lcp_echo_lowerdown(ppp_pcb *pcb); +static void LcpEchoTimeout(void *arg); +static void lcp_received_echo_reply(fsm *f, int id, u_char *inp, int len); +static void LcpSendEchoRequest(fsm *f); +static void LcpLinkFailure(fsm *f); +static void LcpEchoCheck(fsm *f); + +static const fsm_callbacks lcp_callbacks = { /* LCP callback routines */ + lcp_resetci, /* Reset our Configuration Information */ + lcp_cilen, /* Length of our Configuration Information */ + lcp_addci, /* Add our Configuration Information */ + lcp_ackci, /* ACK our Configuration Information */ + lcp_nakci, /* NAK our Configuration Information */ + lcp_rejci, /* Reject our Configuration Information */ + lcp_reqci, /* Request peer's Configuration Information */ + lcp_up, /* Called when fsm reaches OPENED state */ + lcp_down, /* Called when fsm leaves OPENED state */ + lcp_starting, /* Called when we want the lower layer up */ + lcp_finished, /* Called when we want the lower layer down */ + NULL, /* Called when Protocol-Reject received */ + NULL, /* Retransmission is necessary */ + lcp_extcode, /* Called to handle LCP-specific codes */ + "LCP" /* String name of protocol */ +}; + +/* + * Protocol entry points. + * Some of these are called directly. + */ + +static void lcp_init(ppp_pcb *pcb); +static void lcp_input(ppp_pcb *pcb, u_char *p, int len); +static void lcp_protrej(ppp_pcb *pcb); +#if PRINTPKT_SUPPORT +static int lcp_printpkt(const u_char *p, int plen, + void (*printer) (void *, const char *, ...), void *arg); +#endif /* PRINTPKT_SUPPORT */ + +const struct protent lcp_protent = { + PPP_LCP, + lcp_init, + lcp_input, + lcp_protrej, + lcp_lowerup, + lcp_lowerdown, + lcp_open, + lcp_close, +#if PRINTPKT_SUPPORT + lcp_printpkt, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + NULL, +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "LCP", + NULL, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + lcp_option_list, + NULL, +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + NULL, + NULL +#endif /* DEMAND_SUPPORT */ +}; + +/* + * Length of each type of configuration option (in octets) + */ +#define CILEN_VOID 2 +#define CILEN_CHAR 3 +#define CILEN_SHORT 4 /* CILEN_VOID + 2 */ +#if CHAP_SUPPORT +#define CILEN_CHAP 5 /* CILEN_VOID + 2 + 1 */ +#endif /* CHAP_SUPPORT */ +#define CILEN_LONG 6 /* CILEN_VOID + 4 */ +#if LQR_SUPPORT +#define CILEN_LQR 8 /* CILEN_VOID + 2 + 4 */ +#endif /* LQR_SUPPORT */ +#define CILEN_CBCP 3 + +#define CODENAME(x) ((x) == CONFACK ? "ACK" : \ + (x) == CONFNAK ? "NAK" : "REJ") + +#if PPP_OPTIONS +/* + * noopt - Disable all options (why?). + */ +static int +noopt(argv) + char **argv; +{ + BZERO((char *) &lcp_wantoptions[0], sizeof (struct lcp_options)); + BZERO((char *) &lcp_allowoptions[0], sizeof (struct lcp_options)); + + return (1); +} +#endif /* PPP_OPTIONS */ + +#ifdef HAVE_MULTILINK +static int +setendpoint(argv) + char **argv; +{ + if (str_to_epdisc(&lcp_wantoptions[0].endpoint, *argv)) { + lcp_wantoptions[0].neg_endpoint = 1; + return 1; + } + option_error("Can't parse '%s' as an endpoint discriminator", *argv); + return 0; +} + +static void +printendpoint(opt, printer, arg) + option_t *opt; + void (*printer) (void *, char *, ...); + void *arg; +{ + printer(arg, "%s", epdisc_to_str(&lcp_wantoptions[0].endpoint)); +} +#endif /* HAVE_MULTILINK */ + +/* + * lcp_init - Initialize LCP. + */ +static void lcp_init(ppp_pcb *pcb) { + fsm *f = &pcb->lcp_fsm; + lcp_options *wo = &pcb->lcp_wantoptions; + lcp_options *ao = &pcb->lcp_allowoptions; + + f->pcb = pcb; + f->protocol = PPP_LCP; + f->callbacks = &lcp_callbacks; + + fsm_init(f); + + BZERO(wo, sizeof(*wo)); + wo->neg_mru = 1; + wo->mru = PPP_DEFMRU; + wo->neg_asyncmap = 1; + wo->neg_magicnumber = 1; + wo->neg_pcompression = 1; + wo->neg_accompression = 1; + + BZERO(ao, sizeof(*ao)); + ao->neg_mru = 1; + ao->mru = PPP_MAXMRU; + ao->neg_asyncmap = 1; +#if CHAP_SUPPORT + ao->neg_chap = 1; + ao->chap_mdtype = CHAP_MDTYPE_SUPPORTED; +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + ao->neg_upap = 1; +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + ao->neg_eap = 1; +#endif /* EAP_SUPPORT */ + ao->neg_magicnumber = 1; + ao->neg_pcompression = 1; + ao->neg_accompression = 1; + ao->neg_endpoint = 1; +} + + +/* + * lcp_open - LCP is allowed to come up. + */ +void lcp_open(ppp_pcb *pcb) { + fsm *f = &pcb->lcp_fsm; + lcp_options *wo = &pcb->lcp_wantoptions; + + f->flags &= ~(OPT_PASSIVE | OPT_SILENT); + if (wo->passive) + f->flags |= OPT_PASSIVE; + if (wo->silent) + f->flags |= OPT_SILENT; + fsm_open(f); +} + + +/* + * lcp_close - Take LCP down. + */ +void lcp_close(ppp_pcb *pcb, const char *reason) { + fsm *f = &pcb->lcp_fsm; + int oldstate; + + if (pcb->phase != PPP_PHASE_DEAD +#ifdef HAVE_MULTILINK + && pcb->phase != PPP_PHASE_MASTER +#endif /* HAVE_MULTILINK */ + ) + new_phase(pcb, PPP_PHASE_TERMINATE); + + if (f->flags & DELAYED_UP) { + UNTIMEOUT(lcp_delayed_up, f); + f->state = PPP_FSM_STOPPED; + } + oldstate = f->state; + + fsm_close(f, reason); + if (oldstate == PPP_FSM_STOPPED && (f->flags & (OPT_PASSIVE|OPT_SILENT|DELAYED_UP))) { + /* + * This action is not strictly according to the FSM in RFC1548, + * but it does mean that the program terminates if you do a + * lcp_close() when a connection hasn't been established + * because we are in passive/silent mode or because we have + * delayed the fsm_lowerup() call and it hasn't happened yet. + */ + f->flags &= ~DELAYED_UP; + lcp_finished(f); + } +} + + +/* + * lcp_lowerup - The lower layer is up. + */ +void lcp_lowerup(ppp_pcb *pcb) { + lcp_options *wo = &pcb->lcp_wantoptions; + fsm *f = &pcb->lcp_fsm; + /* + * Don't use A/C or protocol compression on transmission, + * but accept A/C and protocol compressed packets + * if we are going to ask for A/C and protocol compression. + */ + if (ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0) < 0 + || ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff), + wo->neg_pcompression, wo->neg_accompression) < 0) + return; + pcb->peer_mru = PPP_MRU; + + if (pcb->settings.listen_time != 0) { + f->flags |= DELAYED_UP; + TIMEOUTMS(lcp_delayed_up, f, pcb->settings.listen_time); + } else + fsm_lowerup(f); +} + + +/* + * lcp_lowerdown - The lower layer is down. + */ +void lcp_lowerdown(ppp_pcb *pcb) { + fsm *f = &pcb->lcp_fsm; + + if (f->flags & DELAYED_UP) { + f->flags &= ~DELAYED_UP; + UNTIMEOUT(lcp_delayed_up, f); + } else + fsm_lowerdown(f); +} + + +/* + * lcp_delayed_up - Bring the lower layer up now. + */ +static void lcp_delayed_up(void *arg) { + fsm *f = (fsm*)arg; + + if (f->flags & DELAYED_UP) { + f->flags &= ~DELAYED_UP; + fsm_lowerup(f); + } +} + + +/* + * lcp_input - Input LCP packet. + */ +static void lcp_input(ppp_pcb *pcb, u_char *p, int len) { + fsm *f = &pcb->lcp_fsm; + + if (f->flags & DELAYED_UP) { + f->flags &= ~DELAYED_UP; + UNTIMEOUT(lcp_delayed_up, f); + fsm_lowerup(f); + } + fsm_input(f, p, len); +} + +/* + * lcp_extcode - Handle a LCP-specific code. + */ +static int lcp_extcode(fsm *f, int code, int id, u_char *inp, int len) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + u_char *magp; + + switch( code ){ + case PROTREJ: + lcp_rprotrej(f, inp, len); + break; + + case ECHOREQ: + if (f->state != PPP_FSM_OPENED) + break; + magp = inp; + PUTLONG(go->magicnumber, magp); + fsm_sdata(f, ECHOREP, id, inp, len); + break; + + case ECHOREP: + lcp_received_echo_reply(f, id, inp, len); + break; + + case DISCREQ: + case IDENTIF: + case TIMEREM: + break; + + default: + return 0; + } + return 1; +} + + +/* + * lcp_rprotrej - Receive an Protocol-Reject. + * + * Figure out which protocol is rejected and inform it. + */ +static void lcp_rprotrej(fsm *f, u_char *inp, int len) { + int i; + const struct protent *protp; + u_short prot; +#if PPP_PROTOCOLNAME + const char *pname; +#endif /* PPP_PROTOCOLNAME */ + + if (len < 2) { + LCPDEBUG(("lcp_rprotrej: Rcvd short Protocol-Reject packet!")); + return; + } + + GETSHORT(prot, inp); + + /* + * Protocol-Reject packets received in any state other than the LCP + * OPENED state SHOULD be silently discarded. + */ + if( f->state != PPP_FSM_OPENED ){ + LCPDEBUG(("Protocol-Reject discarded: LCP in state %d", f->state)); + return; + } + +#if PPP_PROTOCOLNAME + pname = protocol_name(prot); +#endif /* PPP_PROTOCOLNAME */ + + /* + * Upcall the proper Protocol-Reject routine. + */ + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (protp->protocol == prot) { +#if PPP_PROTOCOLNAME + if (pname != NULL) + ppp_dbglog("Protocol-Reject for '%s' (0x%x) received", pname, + prot); + else +#endif /* PPP_PROTOCOLNAME */ + ppp_dbglog("Protocol-Reject for 0x%x received", prot); + (*protp->protrej)(f->pcb); + return; + } + +#if PPP_PROTOCOLNAME + if (pname != NULL) + ppp_warn("Protocol-Reject for unsupported protocol '%s' (0x%x)", pname, + prot); + else +#endif /* #if PPP_PROTOCOLNAME */ + ppp_warn("Protocol-Reject for unsupported protocol 0x%x", prot); +} + + +/* + * lcp_protrej - A Protocol-Reject was received. + */ +/*ARGSUSED*/ +static void lcp_protrej(ppp_pcb *pcb) { + /* + * Can't reject LCP! + */ + ppp_error("Received Protocol-Reject for LCP!"); + fsm_protreject(&pcb->lcp_fsm); +} + + +/* + * lcp_sprotrej - Send a Protocol-Reject for some protocol. + */ +void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len) { + fsm *f = &pcb->lcp_fsm; + /* + * Send back the protocol and the information field of the + * rejected packet. We only get here if LCP is in the OPENED state. + */ +#if 0 + p += 2; + len -= 2; +#endif + + fsm_sdata(f, PROTREJ, ++f->id, + p, len); +} + + +/* + * lcp_resetci - Reset our CI. + */ +static void lcp_resetci(fsm *f) { + ppp_pcb *pcb = f->pcb; + lcp_options *wo = &pcb->lcp_wantoptions; + lcp_options *go = &pcb->lcp_gotoptions; + lcp_options *ao = &pcb->lcp_allowoptions; + +#if PPP_AUTH_SUPPORT + + /* note: default value is true for allow options */ + if (pcb->settings.user && pcb->settings.passwd) { +#if PAP_SUPPORT + if (pcb->settings.refuse_pap) { + ao->neg_upap = 0; + } +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + if (pcb->settings.refuse_chap) { + ao->chap_mdtype &= ~MDTYPE_MD5; + } +#if MSCHAP_SUPPORT + if (pcb->settings.refuse_mschap) { + ao->chap_mdtype &= ~MDTYPE_MICROSOFT; + } + if (pcb->settings.refuse_mschap_v2) { + ao->chap_mdtype &= ~MDTYPE_MICROSOFT_V2; + } +#endif /* MSCHAP_SUPPORT */ + ao->neg_chap = (ao->chap_mdtype != MDTYPE_NONE); +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + if (pcb->settings.refuse_eap) { + ao->neg_eap = 0; + } +#endif /* EAP_SUPPORT */ + +#if PPP_SERVER + /* note: default value is false for wanted options */ + if (pcb->settings.auth_required) { +#if PAP_SUPPORT + if (!pcb->settings.refuse_pap) { + wo->neg_upap = 1; + } +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + if (!pcb->settings.refuse_chap) { + wo->chap_mdtype |= MDTYPE_MD5; + } +#if MSCHAP_SUPPORT + if (!pcb->settings.refuse_mschap) { + wo->chap_mdtype |= MDTYPE_MICROSOFT; + } + if (!pcb->settings.refuse_mschap_v2) { + wo->chap_mdtype |= MDTYPE_MICROSOFT_V2; + } +#endif /* MSCHAP_SUPPORT */ + wo->neg_chap = (wo->chap_mdtype != MDTYPE_NONE); +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + if (!pcb->settings.refuse_eap) { + wo->neg_eap = 1; + } +#endif /* EAP_SUPPORT */ + } +#endif /* PPP_SERVER */ + + } else { +#if PAP_SUPPORT + ao->neg_upap = 0; +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + ao->neg_chap = 0; + ao->chap_mdtype = MDTYPE_NONE; +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + ao->neg_eap = 0; +#endif /* EAP_SUPPORT */ + } + + PPPDEBUG(LOG_DEBUG, ("ppp: auth protocols:")); +#if PAP_SUPPORT + PPPDEBUG(LOG_DEBUG, (" PAP=%d", ao->neg_upap)); +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + PPPDEBUG(LOG_DEBUG, (" CHAP=%d CHAP_MD5=%d", ao->neg_chap, !!(ao->chap_mdtype&MDTYPE_MD5))); +#if MSCHAP_SUPPORT + PPPDEBUG(LOG_DEBUG, (" CHAP_MS=%d CHAP_MS2=%d", !!(ao->chap_mdtype&MDTYPE_MICROSOFT), !!(ao->chap_mdtype&MDTYPE_MICROSOFT_V2))); +#endif /* MSCHAP_SUPPORT */ +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + PPPDEBUG(LOG_DEBUG, (" EAP=%d", ao->neg_eap)); +#endif /* EAP_SUPPORT */ + PPPDEBUG(LOG_DEBUG, ("\n")); + +#endif /* PPP_AUTH_SUPPORT */ + + wo->magicnumber = magic(); + wo->numloops = 0; + *go = *wo; +#ifdef HAVE_MULTILINK + if (!multilink) { + go->neg_mrru = 0; +#endif /* HAVE_MULTILINK */ + go->neg_ssnhf = 0; + go->neg_endpoint = 0; +#ifdef HAVE_MULTILINK + } +#endif /* HAVE_MULTILINK */ + if (pcb->settings.noendpoint) + ao->neg_endpoint = 0; + pcb->peer_mru = PPP_MRU; +#if 0 /* UNUSED */ + auth_reset(pcb); +#endif /* UNUSED */ +} + + +/* + * lcp_cilen - Return length of our CI. + */ +static int lcp_cilen(fsm *f) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + +#define LENCIVOID(neg) ((neg) ? CILEN_VOID : 0) +#if CHAP_SUPPORT +#define LENCICHAP(neg) ((neg) ? CILEN_CHAP : 0) +#endif /* CHAP_SUPPORT */ +#define LENCISHORT(neg) ((neg) ? CILEN_SHORT : 0) +#define LENCILONG(neg) ((neg) ? CILEN_LONG : 0) +#if LQR_SUPPORT +#define LENCILQR(neg) ((neg) ? CILEN_LQR: 0) +#endif /* LQR_SUPPORT */ +#define LENCICBCP(neg) ((neg) ? CILEN_CBCP: 0) + /* + * NB: we only ask for one of CHAP, UPAP, or EAP, even if we will + * accept more than one. We prefer EAP first, then CHAP, then + * PAP. + */ + return (LENCISHORT(go->neg_mru && go->mru != PPP_DEFMRU) + + LENCILONG(go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) + +#if EAP_SUPPORT + LENCISHORT(go->neg_eap) + +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ +#if EAP_SUPPORT + LENCICHAP(!go->neg_eap && go->neg_chap) + +#endif /* EAP_SUPPORT */ +#if !EAP_SUPPORT + LENCICHAP(go->neg_chap) + +#endif /* !EAP_SUPPORT */ +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ +#if EAP_SUPPORT && CHAP_SUPPORT + LENCISHORT(!go->neg_eap && !go->neg_chap && go->neg_upap) + +#endif /* EAP_SUPPORT && CHAP_SUPPORT */ +#if EAP_SUPPORT && !CHAP_SUPPORT + LENCISHORT(!go->neg_eap && go->neg_upap) + +#endif /* EAP_SUPPORT && !CHAP_SUPPORT */ +#if !EAP_SUPPORT && CHAP_SUPPORT + LENCISHORT(!go->neg_chap && go->neg_upap) + +#endif /* !EAP_SUPPORT && CHAP_SUPPORT */ +#if !EAP_SUPPORT && !CHAP_SUPPORT + LENCISHORT(go->neg_upap) + +#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */ +#endif /* PAP_SUPPORT */ +#if LQR_SUPPORT + LENCILQR(go->neg_lqr) + +#endif /* LQR_SUPPORT */ + LENCICBCP(go->neg_cbcp) + + LENCILONG(go->neg_magicnumber) + + LENCIVOID(go->neg_pcompression) + + LENCIVOID(go->neg_accompression) + +#ifdef HAVE_MULTILINK + LENCISHORT(go->neg_mrru) + +#endif /* HAVE_MULTILINK */ + LENCIVOID(go->neg_ssnhf) + + (go->neg_endpoint? CILEN_CHAR + go->endpoint.length: 0)); +} + + +/* + * lcp_addci - Add our desired CIs to a packet. + */ +static void lcp_addci(fsm *f, u_char *ucp, int *lenp) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + u_char *start_ucp = ucp; + +#define ADDCIVOID(opt, neg) \ + if (neg) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_VOID, ucp); \ + } +#define ADDCISHORT(opt, neg, val) \ + if (neg) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_SHORT, ucp); \ + PUTSHORT(val, ucp); \ + } +#if CHAP_SUPPORT +#define ADDCICHAP(opt, neg, val) \ + if (neg) { \ + PUTCHAR((opt), ucp); \ + PUTCHAR(CILEN_CHAP, ucp); \ + PUTSHORT(PPP_CHAP, ucp); \ + PUTCHAR((CHAP_DIGEST(val)), ucp); \ + } +#endif /* CHAP_SUPPORT */ +#define ADDCILONG(opt, neg, val) \ + if (neg) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_LONG, ucp); \ + PUTLONG(val, ucp); \ + } +#if LQR_SUPPORT +#define ADDCILQR(opt, neg, val) \ + if (neg) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_LQR, ucp); \ + PUTSHORT(PPP_LQR, ucp); \ + PUTLONG(val, ucp); \ + } +#endif /* LQR_SUPPORT */ +#define ADDCICHAR(opt, neg, val) \ + if (neg) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_CHAR, ucp); \ + PUTCHAR(val, ucp); \ + } +#define ADDCIENDP(opt, neg, class, val, len) \ + if (neg) { \ + int i; \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_CHAR + len, ucp); \ + PUTCHAR(class, ucp); \ + for (i = 0; i < len; ++i) \ + PUTCHAR(val[i], ucp); \ + } + + ADDCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru); + ADDCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF, + go->asyncmap); +#if EAP_SUPPORT + ADDCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP); +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ +#if EAP_SUPPORT + ADDCICHAP(CI_AUTHTYPE, !go->neg_eap && go->neg_chap, go->chap_mdtype); +#endif /* EAP_SUPPORT */ +#if !EAP_SUPPORT + ADDCICHAP(CI_AUTHTYPE, go->neg_chap, go->chap_mdtype); +#endif /* !EAP_SUPPORT */ +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ +#if EAP_SUPPORT && CHAP_SUPPORT + ADDCISHORT(CI_AUTHTYPE, !go->neg_eap && !go->neg_chap && go->neg_upap, PPP_PAP); +#endif /* EAP_SUPPORT && CHAP_SUPPORT */ +#if EAP_SUPPORT && !CHAP_SUPPORT + ADDCISHORT(CI_AUTHTYPE, !go->neg_eap && go->neg_upap, PPP_PAP); +#endif /* EAP_SUPPORT && !CHAP_SUPPORT */ +#if !EAP_SUPPORT && CHAP_SUPPORT + ADDCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP); +#endif /* !EAP_SUPPORT && CHAP_SUPPORT */ +#if !EAP_SUPPORT && !CHAP_SUPPORT + ADDCISHORT(CI_AUTHTYPE, go->neg_upap, PPP_PAP); +#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */ +#endif /* PAP_SUPPORT */ +#if LQR_SUPPORT + ADDCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period); +#endif /* LQR_SUPPORT */ + ADDCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT); + ADDCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber); + ADDCIVOID(CI_PCOMPRESSION, go->neg_pcompression); + ADDCIVOID(CI_ACCOMPRESSION, go->neg_accompression); +#ifdef HAVE_MULTILINK + ADDCISHORT(CI_MRRU, go->neg_mrru, go->mrru); +#endif + ADDCIVOID(CI_SSNHF, go->neg_ssnhf); + ADDCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_, + go->endpoint.value, go->endpoint.length); + + if (ucp - start_ucp != *lenp) { + /* this should never happen, because peer_mtu should be 1500 */ + ppp_error("Bug in lcp_addci: wrong length"); + } +} + + +/* + * lcp_ackci - Ack our CIs. + * This should not modify any state if the Ack is bad. + * + * Returns: + * 0 - Ack was bad. + * 1 - Ack was good. + */ +static int lcp_ackci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + u_char cilen, citype, cichar; + u_short cishort; + u32_t cilong; + + /* + * CIs must be in exactly the same order that we sent. + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ +#define ACKCIVOID(opt, neg) \ + if (neg) { \ + if ((len -= CILEN_VOID) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_VOID || \ + citype != opt) \ + goto bad; \ + } +#define ACKCISHORT(opt, neg, val) \ + if (neg) { \ + if ((len -= CILEN_SHORT) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_SHORT || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != val) \ + goto bad; \ + } +#define ACKCICHAR(opt, neg, val) \ + if (neg) { \ + if ((len -= CILEN_CHAR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_CHAR || \ + citype != opt) \ + goto bad; \ + GETCHAR(cichar, p); \ + if (cichar != val) \ + goto bad; \ + } +#if CHAP_SUPPORT +#define ACKCICHAP(opt, neg, val) \ + if (neg) { \ + if ((len -= CILEN_CHAP) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_CHAP || \ + citype != (opt)) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != PPP_CHAP) \ + goto bad; \ + GETCHAR(cichar, p); \ + if (cichar != (CHAP_DIGEST(val))) \ + goto bad; \ + } +#endif /* CHAP_SUPPORT */ +#define ACKCILONG(opt, neg, val) \ + if (neg) { \ + if ((len -= CILEN_LONG) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_LONG || \ + citype != opt) \ + goto bad; \ + GETLONG(cilong, p); \ + if (cilong != val) \ + goto bad; \ + } +#if LQR_SUPPORT +#define ACKCILQR(opt, neg, val) \ + if (neg) { \ + if ((len -= CILEN_LQR) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_LQR || \ + citype != opt) \ + goto bad; \ + GETSHORT(cishort, p); \ + if (cishort != PPP_LQR) \ + goto bad; \ + GETLONG(cilong, p); \ + if (cilong != val) \ + goto bad; \ + } +#endif /* LQR_SUPPORT */ +#define ACKCIENDP(opt, neg, class, val, vlen) \ + if (neg) { \ + int i; \ + if ((len -= CILEN_CHAR + vlen) < 0) \ + goto bad; \ + GETCHAR(citype, p); \ + GETCHAR(cilen, p); \ + if (cilen != CILEN_CHAR + vlen || \ + citype != opt) \ + goto bad; \ + GETCHAR(cichar, p); \ + if (cichar != class) \ + goto bad; \ + for (i = 0; i < vlen; ++i) { \ + GETCHAR(cichar, p); \ + if (cichar != val[i]) \ + goto bad; \ + } \ + } + + ACKCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru); + ACKCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF, + go->asyncmap); +#if EAP_SUPPORT + ACKCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP); +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ +#if EAP_SUPPORT + ACKCICHAP(CI_AUTHTYPE, !go->neg_eap && go->neg_chap, go->chap_mdtype); +#endif /* EAP_SUPPORT */ +#if !EAP_SUPPORT + ACKCICHAP(CI_AUTHTYPE, go->neg_chap, go->chap_mdtype); +#endif /* !EAP_SUPPORT */ +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */ +#if EAP_SUPPORT && CHAP_SUPPORT + ACKCISHORT(CI_AUTHTYPE, !go->neg_eap && !go->neg_chap && go->neg_upap, PPP_PAP); +#endif /* EAP_SUPPORT && CHAP_SUPPORT */ +#if EAP_SUPPORT && !CHAP_SUPPORT + ACKCISHORT(CI_AUTHTYPE, !go->neg_eap && go->neg_upap, PPP_PAP); +#endif /* EAP_SUPPORT && !CHAP_SUPPORT */ +#if !EAP_SUPPORT && CHAP_SUPPORT + ACKCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP); +#endif /* !EAP_SUPPORT && CHAP_SUPPORT */ +#if !EAP_SUPPORT && !CHAP_SUPPORT + ACKCISHORT(CI_AUTHTYPE, go->neg_upap, PPP_PAP); +#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */ +#endif /* PAP_SUPPORT */ +#if LQR_SUPPORT + ACKCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period); +#endif /* LQR_SUPPORT */ + ACKCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT); + ACKCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber); + ACKCIVOID(CI_PCOMPRESSION, go->neg_pcompression); + ACKCIVOID(CI_ACCOMPRESSION, go->neg_accompression); +#ifdef HAVE_MULTILINK + ACKCISHORT(CI_MRRU, go->neg_mrru, go->mrru); +#endif /* HAVE_MULTILINK */ + ACKCIVOID(CI_SSNHF, go->neg_ssnhf); + ACKCIENDP(CI_EPDISC, go->neg_endpoint, go->endpoint.class_, + go->endpoint.value, go->endpoint.length); + + /* + * If there are any remaining CIs, then this packet is bad. + */ + if (len != 0) + goto bad; + return (1); +bad: + LCPDEBUG(("lcp_acki: received bad Ack!")); + return (0); +} + + +/* + * lcp_nakci - Peer has sent a NAK for some of our CIs. + * This should not modify any state if the Nak is bad + * or if LCP is in the OPENED state. + * + * Returns: + * 0 - Nak was bad. + * 1 - Nak was good. + */ +static int lcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + lcp_options *wo = &pcb->lcp_wantoptions; + u_char citype, cichar, *next; + u_short cishort; + u32_t cilong; + lcp_options no; /* options we've seen Naks for */ + lcp_options try_; /* options to request next time */ + int looped_back = 0; + int cilen; + + BZERO(&no, sizeof(no)); + try_ = *go; + + /* + * Any Nak'd CIs must be in exactly the same order that we sent. + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ +#define NAKCIVOID(opt, neg) \ + if (go->neg && \ + len >= CILEN_VOID && \ + p[1] == CILEN_VOID && \ + p[0] == opt) { \ + len -= CILEN_VOID; \ + INCPTR(CILEN_VOID, p); \ + no.neg = 1; \ + try_.neg = 0; \ + } +#if CHAP_SUPPORT +#define NAKCICHAP(opt, neg, code) \ + if (go->neg && \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + no.neg = 1; \ + code \ + } +#endif /* CHAP_SUPPORT */ +#define NAKCICHAR(opt, neg, code) \ + if (go->neg && \ + len >= CILEN_CHAR && \ + p[1] == CILEN_CHAR && \ + p[0] == opt) { \ + len -= CILEN_CHAR; \ + INCPTR(2, p); \ + GETCHAR(cichar, p); \ + no.neg = 1; \ + code \ + } +#define NAKCISHORT(opt, neg, code) \ + if (go->neg && \ + len >= CILEN_SHORT && \ + p[1] == CILEN_SHORT && \ + p[0] == opt) { \ + len -= CILEN_SHORT; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + no.neg = 1; \ + code \ + } +#define NAKCILONG(opt, neg, code) \ + if (go->neg && \ + len >= CILEN_LONG && \ + p[1] == CILEN_LONG && \ + p[0] == opt) { \ + len -= CILEN_LONG; \ + INCPTR(2, p); \ + GETLONG(cilong, p); \ + no.neg = 1; \ + code \ + } +#if LQR_SUPPORT +#define NAKCILQR(opt, neg, code) \ + if (go->neg && \ + len >= CILEN_LQR && \ + p[1] == CILEN_LQR && \ + p[0] == opt) { \ + len -= CILEN_LQR; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETLONG(cilong, p); \ + no.neg = 1; \ + code \ + } +#endif /* LQR_SUPPORT */ +#define NAKCIENDP(opt, neg) \ + if (go->neg && \ + len >= CILEN_CHAR && \ + p[0] == opt && \ + p[1] >= CILEN_CHAR && \ + p[1] <= len) { \ + len -= p[1]; \ + INCPTR(p[1], p); \ + no.neg = 1; \ + try_.neg = 0; \ + } + + /* + * NOTE! There must be no assignments to individual fields of *go in + * the code below. Any such assignment is a BUG! + */ + /* + * We don't care if they want to send us smaller packets than + * we want. Therefore, accept any MRU less than what we asked for, + * but then ignore the new value when setting the MRU in the kernel. + * If they send us a bigger MRU than what we asked, accept it, up to + * the limit of the default MRU we'd get if we didn't negotiate. + */ + if (go->neg_mru && go->mru != PPP_DEFMRU) { + NAKCISHORT(CI_MRU, neg_mru, + if (cishort <= wo->mru || cishort <= PPP_DEFMRU) + try_.mru = cishort; + ); + } + + /* + * Add any characters they want to our (receive-side) asyncmap. + */ + if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) { + NAKCILONG(CI_ASYNCMAP, neg_asyncmap, + try_.asyncmap = go->asyncmap | cilong; + ); + } + + /* + * If they've nak'd our authentication-protocol, check whether + * they are proposing a different protocol, or a different + * hash algorithm for CHAP. + */ + if ((0 +#if CHAP_SUPPORT + || go->neg_chap +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + || go->neg_upap +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + || go->neg_eap +#endif /* EAP_SUPPORT */ + ) + && len >= CILEN_SHORT + && p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) { + cilen = p[1]; + len -= cilen; +#if CHAP_SUPPORT + no.neg_chap = go->neg_chap; +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + no.neg_upap = go->neg_upap; +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + no.neg_eap = go->neg_eap; +#endif /* EAP_SUPPORT */ + INCPTR(2, p); + GETSHORT(cishort, p); + +#if PAP_SUPPORT + if (cishort == PPP_PAP && cilen == CILEN_SHORT) { +#if EAP_SUPPORT + /* If we were asking for EAP, then we need to stop that. */ + if (go->neg_eap) + try_.neg_eap = 0; + else +#endif /* EAP_SUPPORT */ + +#if CHAP_SUPPORT + /* If we were asking for CHAP, then we need to stop that. */ + if (go->neg_chap) + try_.neg_chap = 0; + else +#endif /* CHAP_SUPPORT */ + + /* + * If we weren't asking for CHAP or EAP, then we were asking for + * PAP, in which case this Nak is bad. + */ + goto bad; + } else +#endif /* PAP_SUPPORT */ + +#if CHAP_SUPPORT + if (cishort == PPP_CHAP && cilen == CILEN_CHAP) { + GETCHAR(cichar, p); +#if EAP_SUPPORT + /* Stop asking for EAP, if we were. */ + if (go->neg_eap) { + try_.neg_eap = 0; + /* Try to set up to use their suggestion, if possible */ + if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) + try_.chap_mdtype = CHAP_MDTYPE_D(cichar); + } else +#endif /* EAP_SUPPORT */ + if (go->neg_chap) { + /* + * We were asking for our preferred algorithm, they must + * want something different. + */ + if (cichar != CHAP_DIGEST(go->chap_mdtype)) { + if (CHAP_CANDIGEST(go->chap_mdtype, cichar)) { + /* Use their suggestion if we support it ... */ + try_.chap_mdtype = CHAP_MDTYPE_D(cichar); + } else { + /* ... otherwise, try our next-preferred algorithm. */ + try_.chap_mdtype &= ~(CHAP_MDTYPE(try_.chap_mdtype)); + if (try_.chap_mdtype == MDTYPE_NONE) /* out of algos */ + try_.neg_chap = 0; + } + } else { + /* + * Whoops, they Nak'd our algorithm of choice + * but then suggested it back to us. + */ + goto bad; + } + } else { + /* + * Stop asking for PAP if we were asking for it. + */ +#if PAP_SUPPORT + try_.neg_upap = 0; +#endif /* PAP_SUPPORT */ + } + + } else +#endif /* CHAP_SUPPORT */ + { + +#if EAP_SUPPORT + /* + * If we were asking for EAP, and they're Conf-Naking EAP, + * well, that's just strange. Nobody should do that. + */ + if (cishort == PPP_EAP && cilen == CILEN_SHORT && go->neg_eap) + ppp_dbglog("Unexpected Conf-Nak for EAP"); + + /* + * We don't recognize what they're suggesting. + * Stop asking for what we were asking for. + */ + if (go->neg_eap) + try_.neg_eap = 0; + else +#endif /* EAP_SUPPORT */ + +#if CHAP_SUPPORT + if (go->neg_chap) + try_.neg_chap = 0; + else +#endif /* CHAP_SUPPORT */ + +#if PAP_SUPPORT + if(1) + try_.neg_upap = 0; + else +#endif /* PAP_SUPPORT */ + {} + + p += cilen - CILEN_SHORT; + } + } + +#if LQR_SUPPORT + /* + * If they can't cope with our link quality protocol, we'll have + * to stop asking for LQR. We haven't got any other protocol. + * If they Nak the reporting period, take their value XXX ? + */ + NAKCILQR(CI_QUALITY, neg_lqr, + if (cishort != PPP_LQR) + try_.neg_lqr = 0; + else + try_.lqr_period = cilong; + ); +#endif /* LQR_SUPPORT */ + + /* + * Only implementing CBCP...not the rest of the callback options + */ + NAKCICHAR(CI_CALLBACK, neg_cbcp, + try_.neg_cbcp = 0; + (void)cichar; /* if CHAP support is not compiled, cichar is set but not used, which makes some compilers complaining */ + ); + + /* + * Check for a looped-back line. + */ + NAKCILONG(CI_MAGICNUMBER, neg_magicnumber, + try_.magicnumber = magic(); + looped_back = 1; + ); + + /* + * Peer shouldn't send Nak for protocol compression or + * address/control compression requests; they should send + * a Reject instead. If they send a Nak, treat it as a Reject. + */ + NAKCIVOID(CI_PCOMPRESSION, neg_pcompression); + NAKCIVOID(CI_ACCOMPRESSION, neg_accompression); + +#ifdef HAVE_MULTILINK + /* + * Nak for MRRU option - accept their value if it is smaller + * than the one we want. + */ + if (go->neg_mrru) { + NAKCISHORT(CI_MRRU, neg_mrru, + if (treat_as_reject) + try_.neg_mrru = 0; + else if (cishort <= wo->mrru) + try_.mrru = cishort; + ); + } +#else /* HAVE_MULTILINK */ + LWIP_UNUSED_ARG(treat_as_reject); +#endif /* HAVE_MULTILINK */ + + /* + * Nak for short sequence numbers shouldn't be sent, treat it + * like a reject. + */ + NAKCIVOID(CI_SSNHF, neg_ssnhf); + + /* + * Nak of the endpoint discriminator option is not permitted, + * treat it like a reject. + */ + NAKCIENDP(CI_EPDISC, neg_endpoint); + + /* + * There may be remaining CIs, if the peer is requesting negotiation + * on an option that we didn't include in our request packet. + * If we see an option that we requested, or one we've already seen + * in this packet, then this packet is bad. + * If we wanted to respond by starting to negotiate on the requested + * option(s), we could, but we don't, because except for the + * authentication type and quality protocol, if we are not negotiating + * an option, it is because we were told not to. + * For the authentication type, the Nak from the peer means + * `let me authenticate myself with you' which is a bit pointless. + * For the quality protocol, the Nak means `ask me to send you quality + * reports', but if we didn't ask for them, we don't want them. + * An option we don't recognize represents the peer asking to + * negotiate some option we don't support, so ignore it. + */ + while (len >= CILEN_VOID) { + GETCHAR(citype, p); + GETCHAR(cilen, p); + if (cilen < CILEN_VOID || (len -= cilen) < 0) + goto bad; + next = p + cilen - 2; + + switch (citype) { + case CI_MRU: + if ((go->neg_mru && go->mru != PPP_DEFMRU) + || no.neg_mru || cilen != CILEN_SHORT) + goto bad; + GETSHORT(cishort, p); + if (cishort < PPP_DEFMRU) { + try_.neg_mru = 1; + try_.mru = cishort; + } + break; + case CI_ASYNCMAP: + if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFF) + || no.neg_asyncmap || cilen != CILEN_LONG) + goto bad; + break; + case CI_AUTHTYPE: + if (0 +#if CHAP_SUPPORT + || go->neg_chap || no.neg_chap +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + || go->neg_upap || no.neg_upap +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + || go->neg_eap || no.neg_eap +#endif /* EAP_SUPPORT */ + ) + goto bad; + break; + case CI_MAGICNUMBER: + if (go->neg_magicnumber || no.neg_magicnumber || + cilen != CILEN_LONG) + goto bad; + break; + case CI_PCOMPRESSION: + if (go->neg_pcompression || no.neg_pcompression + || cilen != CILEN_VOID) + goto bad; + break; + case CI_ACCOMPRESSION: + if (go->neg_accompression || no.neg_accompression + || cilen != CILEN_VOID) + goto bad; + break; +#if LQR_SUPPORT + case CI_QUALITY: + if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR) + goto bad; + break; +#endif /* LQR_SUPPORT */ +#ifdef HAVE_MULTILINK + case CI_MRRU: + if (go->neg_mrru || no.neg_mrru || cilen != CILEN_SHORT) + goto bad; + break; +#endif /* HAVE_MULTILINK */ + case CI_SSNHF: + if (go->neg_ssnhf || no.neg_ssnhf || cilen != CILEN_VOID) + goto bad; + try_.neg_ssnhf = 1; + break; + case CI_EPDISC: + if (go->neg_endpoint || no.neg_endpoint || cilen < CILEN_CHAR) + goto bad; + break; + default: + break; + } + p = next; + } + + /* + * OK, the Nak is good. Now we can update state. + * If there are any options left we ignore them. + */ + if (f->state != PPP_FSM_OPENED) { + if (looped_back) { + if (++try_.numloops >= pcb->settings.lcp_loopbackfail) { + ppp_notice("Serial line is looped back."); + pcb->err_code = PPPERR_LOOPBACK; + lcp_close(f->pcb, "Loopback detected"); + } + } else + try_.numloops = 0; + *go = try_; + } + + return 1; + +bad: + LCPDEBUG(("lcp_nakci: received bad Nak!")); + return 0; +} + + +/* + * lcp_rejci - Peer has Rejected some of our CIs. + * This should not modify any state if the Reject is bad + * or if LCP is in the OPENED state. + * + * Returns: + * 0 - Reject was bad. + * 1 - Reject was good. + */ +static int lcp_rejci(fsm *f, u_char *p, int len) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + u_char cichar; + u_short cishort; + u32_t cilong; + lcp_options try_; /* options to request next time */ + + try_ = *go; + + /* + * Any Rejected CIs must be in exactly the same order that we sent. + * Check packet length and CI length at each step. + * If we find any deviations, then this packet is bad. + */ +#define REJCIVOID(opt, neg) \ + if (go->neg && \ + len >= CILEN_VOID && \ + p[1] == CILEN_VOID && \ + p[0] == opt) { \ + len -= CILEN_VOID; \ + INCPTR(CILEN_VOID, p); \ + try_.neg = 0; \ + } +#define REJCISHORT(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_SHORT && \ + p[1] == CILEN_SHORT && \ + p[0] == opt) { \ + len -= CILEN_SHORT; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + /* Check rejected value. */ \ + if (cishort != val) \ + goto bad; \ + try_.neg = 0; \ + } + +#if CHAP_SUPPORT && EAP_SUPPORT && PAP_SUPPORT +#define REJCICHAP(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ + try_.neg_eap = try_.neg_upap = 0; \ + } +#endif /* CHAP_SUPPORT && EAP_SUPPORT && PAP_SUPPORT */ + +#if CHAP_SUPPORT && !EAP_SUPPORT && PAP_SUPPORT +#define REJCICHAP(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ + try_.neg_upap = 0; \ + } +#endif /* CHAP_SUPPORT && !EAP_SUPPORT && PAP_SUPPORT */ + +#if CHAP_SUPPORT && EAP_SUPPORT && !PAP_SUPPORT +#define REJCICHAP(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ + try_.neg_eap = 0; \ + } +#endif /* CHAP_SUPPORT && EAP_SUPPORT && !PAP_SUPPORT */ + +#if CHAP_SUPPORT && !EAP_SUPPORT && !PAP_SUPPORT +#define REJCICHAP(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_CHAP && \ + p[1] == CILEN_CHAP && \ + p[0] == opt) { \ + len -= CILEN_CHAP; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if ((cishort != PPP_CHAP) || (cichar != (CHAP_DIGEST(val)))) \ + goto bad; \ + try_.neg = 0; \ + } +#endif /* CHAP_SUPPORT && !EAP_SUPPORT && !PAP_SUPPORT */ + +#define REJCILONG(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_LONG && \ + p[1] == CILEN_LONG && \ + p[0] == opt) { \ + len -= CILEN_LONG; \ + INCPTR(2, p); \ + GETLONG(cilong, p); \ + /* Check rejected value. */ \ + if (cilong != val) \ + goto bad; \ + try_.neg = 0; \ + } +#if LQR_SUPPORT +#define REJCILQR(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_LQR && \ + p[1] == CILEN_LQR && \ + p[0] == opt) { \ + len -= CILEN_LQR; \ + INCPTR(2, p); \ + GETSHORT(cishort, p); \ + GETLONG(cilong, p); \ + /* Check rejected value. */ \ + if (cishort != PPP_LQR || cilong != val) \ + goto bad; \ + try_.neg = 0; \ + } +#endif /* LQR_SUPPORT */ +#define REJCICBCP(opt, neg, val) \ + if (go->neg && \ + len >= CILEN_CBCP && \ + p[1] == CILEN_CBCP && \ + p[0] == opt) { \ + len -= CILEN_CBCP; \ + INCPTR(2, p); \ + GETCHAR(cichar, p); \ + /* Check rejected value. */ \ + if (cichar != val) \ + goto bad; \ + try_.neg = 0; \ + } +#define REJCIENDP(opt, neg, class, val, vlen) \ + if (go->neg && \ + len >= CILEN_CHAR + vlen && \ + p[0] == opt && \ + p[1] == CILEN_CHAR + vlen) { \ + int i; \ + len -= CILEN_CHAR + vlen; \ + INCPTR(2, p); \ + GETCHAR(cichar, p); \ + if (cichar != class) \ + goto bad; \ + for (i = 0; i < vlen; ++i) { \ + GETCHAR(cichar, p); \ + if (cichar != val[i]) \ + goto bad; \ + } \ + try_.neg = 0; \ + } + + REJCISHORT(CI_MRU, neg_mru, go->mru); + REJCILONG(CI_ASYNCMAP, neg_asyncmap, go->asyncmap); +#if EAP_SUPPORT + REJCISHORT(CI_AUTHTYPE, neg_eap, PPP_EAP); + if (!go->neg_eap) { +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT + REJCICHAP(CI_AUTHTYPE, neg_chap, go->chap_mdtype); + if (!go->neg_chap) { +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + REJCISHORT(CI_AUTHTYPE, neg_upap, PPP_PAP); +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + } +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + } +#endif /* EAP_SUPPORT */ +#if LQR_SUPPORT + REJCILQR(CI_QUALITY, neg_lqr, go->lqr_period); +#endif /* LQR_SUPPORT */ + REJCICBCP(CI_CALLBACK, neg_cbcp, CBCP_OPT); + REJCILONG(CI_MAGICNUMBER, neg_magicnumber, go->magicnumber); + REJCIVOID(CI_PCOMPRESSION, neg_pcompression); + REJCIVOID(CI_ACCOMPRESSION, neg_accompression); +#ifdef HAVE_MULTILINK + REJCISHORT(CI_MRRU, neg_mrru, go->mrru); +#endif /* HAVE_MULTILINK */ + REJCIVOID(CI_SSNHF, neg_ssnhf); + REJCIENDP(CI_EPDISC, neg_endpoint, go->endpoint.class_, + go->endpoint.value, go->endpoint.length); + + /* + * If there are any remaining CIs, then this packet is bad. + */ + if (len != 0) + goto bad; + /* + * Now we can update state. + */ + if (f->state != PPP_FSM_OPENED) + *go = try_; + return 1; + +bad: + LCPDEBUG(("lcp_rejci: received bad Reject!")); + return 0; +} + + +/* + * lcp_reqci - Check the peer's requested CIs and send appropriate response. + * + * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified + * appropriately. If reject_if_disagree is non-zero, doesn't return + * CONFNAK; returns CONFREJ if it can't return CONFACK. + * + * inp = Requested CIs + * lenp = Length of requested CIs + */ +static int lcp_reqci(fsm *f, u_char *inp, int *lenp, int reject_if_disagree) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + lcp_options *ho = &pcb->lcp_hisoptions; + lcp_options *ao = &pcb->lcp_allowoptions; + u_char *cip, *next; /* Pointer to current and next CIs */ + int cilen, citype, cichar; /* Parsed len, type, char value */ + u_short cishort; /* Parsed short value */ + u32_t cilong; /* Parse long value */ + int rc = CONFACK; /* Final packet return code */ + int orc; /* Individual option return code */ + u_char *p; /* Pointer to next char to parse */ + u_char *rejp; /* Pointer to next char in reject frame */ + struct pbuf *nakp; /* Nak buffer */ + u_char *nakoutp; /* Pointer to next char in Nak frame */ + int l = *lenp; /* Length left */ + + /* + * Reset all his options. + */ + BZERO(ho, sizeof(*ho)); + + /* + * Process all his options. + */ + next = inp; + nakp = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_CTRL_PBUF_MAX_SIZE), PPP_CTRL_PBUF_TYPE); + if(NULL == nakp) + return 0; + if(nakp->tot_len != nakp->len) { + pbuf_free(nakp); + return 0; + } + + nakoutp = (u_char*)nakp->payload; + rejp = inp; + while (l) { + orc = CONFACK; /* Assume success */ + cip = p = next; /* Remember begining of CI */ + if (l < 2 || /* Not enough data for CI header or */ + p[1] < 2 || /* CI length too small or */ + p[1] > l) { /* CI length too big? */ + LCPDEBUG(("lcp_reqci: bad CI length!")); + orc = CONFREJ; /* Reject bad CI */ + cilen = l; /* Reject till end of packet */ + l = 0; /* Don't loop again */ + citype = 0; + goto endswitch; + } + GETCHAR(citype, p); /* Parse CI type */ + GETCHAR(cilen, p); /* Parse CI length */ + l -= cilen; /* Adjust remaining length */ + next += cilen; /* Step to next CI */ + + switch (citype) { /* Check CI type */ + case CI_MRU: + if (!ao->neg_mru || /* Allow option? */ + cilen != CILEN_SHORT) { /* Check CI length */ + orc = CONFREJ; /* Reject CI */ + break; + } + GETSHORT(cishort, p); /* Parse MRU */ + + /* + * He must be able to receive at least our minimum. + * No need to check a maximum. If he sends a large number, + * we'll just ignore it. + */ + if (cishort < PPP_MINMRU) { + orc = CONFNAK; /* Nak CI */ + PUTCHAR(CI_MRU, nakoutp); + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_MINMRU, nakoutp); /* Give him a hint */ + break; + } + ho->neg_mru = 1; /* Remember he sent MRU */ + ho->mru = cishort; /* And remember value */ + break; + + case CI_ASYNCMAP: + if (!ao->neg_asyncmap || + cilen != CILEN_LONG) { + orc = CONFREJ; + break; + } + GETLONG(cilong, p); + + /* + * Asyncmap must have set at least the bits + * which are set in lcp_allowoptions[unit].asyncmap. + */ + if ((ao->asyncmap & ~cilong) != 0) { + orc = CONFNAK; + PUTCHAR(CI_ASYNCMAP, nakoutp); + PUTCHAR(CILEN_LONG, nakoutp); + PUTLONG(ao->asyncmap | cilong, nakoutp); + break; + } + ho->neg_asyncmap = 1; + ho->asyncmap = cilong; + break; + + case CI_AUTHTYPE: + if (cilen < CILEN_SHORT || + !(0 +#if PAP_SUPPORT + || ao->neg_upap +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + || ao->neg_chap +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + || ao->neg_eap +#endif /* EAP_SUPPORT */ + )) { + /* + * Reject the option if we're not willing to authenticate. + */ + ppp_dbglog("No auth is possible"); + orc = CONFREJ; + break; + } + GETSHORT(cishort, p); + + /* + * Authtype must be PAP, CHAP, or EAP. + * + * Note: if more than one of ao->neg_upap, ao->neg_chap, and + * ao->neg_eap are set, and the peer sends a Configure-Request + * with two or more authenticate-protocol requests, then we will + * reject the second request. + * Whether we end up doing CHAP, UPAP, or EAP depends then on + * the ordering of the CIs in the peer's Configure-Request. + */ + +#if PAP_SUPPORT + if (cishort == PPP_PAP) { + /* we've already accepted CHAP or EAP */ + if (0 +#if CHAP_SUPPORT + || ho->neg_chap +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + || ho->neg_eap +#endif /* EAP_SUPPORT */ + || cilen != CILEN_SHORT) { + LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE PAP, rejecting...")); + orc = CONFREJ; + break; + } + if (!ao->neg_upap) { /* we don't want to do PAP */ + orc = CONFNAK; /* NAK it and suggest CHAP or EAP */ + PUTCHAR(CI_AUTHTYPE, nakoutp); +#if EAP_SUPPORT + if (ao->neg_eap) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_EAP, nakoutp); + } else { +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + } +#endif /* EAP_SUPPORT */ + break; + } + ho->neg_upap = 1; + break; + } +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + if (cishort == PPP_CHAP) { + /* we've already accepted PAP or EAP */ + if ( +#if PAP_SUPPORT + ho->neg_upap || +#endif /* PAP_SUPPORT */ +#if EAP_SUPPORT + ho->neg_eap || +#endif /* EAP_SUPPORT */ + cilen != CILEN_CHAP) { + LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE CHAP, rejecting...")); + orc = CONFREJ; + break; + } + if (!ao->neg_chap) { /* we don't want to do CHAP */ + orc = CONFNAK; /* NAK it and suggest EAP or PAP */ + PUTCHAR(CI_AUTHTYPE, nakoutp); + PUTCHAR(CILEN_SHORT, nakoutp); +#if EAP_SUPPORT + if (ao->neg_eap) { + PUTSHORT(PPP_EAP, nakoutp); + } else +#endif /* EAP_SUPPORT */ +#if PAP_SUPPORT + if(1) { + PUTSHORT(PPP_PAP, nakoutp); + } + else +#endif /* PAP_SUPPORT */ + {} + break; + } + GETCHAR(cichar, p); /* get digest type */ + if (!(CHAP_CANDIGEST(ao->chap_mdtype, cichar))) { + /* + * We can't/won't do the requested type, + * suggest something else. + */ + orc = CONFNAK; + PUTCHAR(CI_AUTHTYPE, nakoutp); + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); + break; + } + ho->chap_mdtype = CHAP_MDTYPE_D(cichar); /* save md type */ + ho->neg_chap = 1; + break; + } +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + if (cishort == PPP_EAP) { + /* we've already accepted CHAP or PAP */ + if ( +#if CHAP_SUPPORT + ho->neg_chap || +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + ho->neg_upap || +#endif /* PAP_SUPPORT */ + cilen != CILEN_SHORT) { + LCPDEBUG(("lcp_reqci: rcvd AUTHTYPE EAP, rejecting...")); + orc = CONFREJ; + break; + } + if (!ao->neg_eap) { /* we don't want to do EAP */ + orc = CONFNAK; /* NAK it and suggest CHAP or PAP */ + PUTCHAR(CI_AUTHTYPE, nakoutp); +#if CHAP_SUPPORT + if (ao->neg_chap) { + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); + } else +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + if(1) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_PAP, nakoutp); + } else +#endif /* PAP_SUPPORT */ + {} + break; + } + ho->neg_eap = 1; + break; + } +#endif /* EAP_SUPPORT */ + + /* + * We don't recognize the protocol they're asking for. + * Nak it with something we're willing to do. + * (At this point we know ao->neg_upap || ao->neg_chap || + * ao->neg_eap.) + */ + orc = CONFNAK; + PUTCHAR(CI_AUTHTYPE, nakoutp); + +#if EAP_SUPPORT + if (ao->neg_eap) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_EAP, nakoutp); + } else +#endif /* EAP_SUPPORT */ +#if CHAP_SUPPORT + if (ao->neg_chap) { + PUTCHAR(CILEN_CHAP, nakoutp); + PUTSHORT(PPP_CHAP, nakoutp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakoutp); + } else +#endif /* CHAP_SUPPORT */ +#if PAP_SUPPORT + if(1) { + PUTCHAR(CILEN_SHORT, nakoutp); + PUTSHORT(PPP_PAP, nakoutp); + } else +#endif /* PAP_SUPPORT */ + {} + break; + +#if LQR_SUPPORT + case CI_QUALITY: + if (!ao->neg_lqr || + cilen != CILEN_LQR) { + orc = CONFREJ; + break; + } + + GETSHORT(cishort, p); + GETLONG(cilong, p); + + /* + * Check the protocol and the reporting period. + * XXX When should we Nak this, and what with? + */ + if (cishort != PPP_LQR) { + orc = CONFNAK; + PUTCHAR(CI_QUALITY, nakoutp); + PUTCHAR(CILEN_LQR, nakoutp); + PUTSHORT(PPP_LQR, nakoutp); + PUTLONG(ao->lqr_period, nakoutp); + break; + } + break; +#endif /* LQR_SUPPORT */ + + case CI_MAGICNUMBER: + if (!(ao->neg_magicnumber || go->neg_magicnumber) || + cilen != CILEN_LONG) { + orc = CONFREJ; + break; + } + GETLONG(cilong, p); + + /* + * He must have a different magic number. + */ + if (go->neg_magicnumber && + cilong == go->magicnumber) { + cilong = magic(); /* Don't put magic() inside macro! */ + orc = CONFNAK; + PUTCHAR(CI_MAGICNUMBER, nakoutp); + PUTCHAR(CILEN_LONG, nakoutp); + PUTLONG(cilong, nakoutp); + break; + } + ho->neg_magicnumber = 1; + ho->magicnumber = cilong; + break; + + + case CI_PCOMPRESSION: + if (!ao->neg_pcompression || + cilen != CILEN_VOID) { + orc = CONFREJ; + break; + } + ho->neg_pcompression = 1; + break; + + case CI_ACCOMPRESSION: + if (!ao->neg_accompression || + cilen != CILEN_VOID) { + orc = CONFREJ; + break; + } + ho->neg_accompression = 1; + break; + +#ifdef HAVE_MULTILINK + case CI_MRRU: + if (!ao->neg_mrru + || !multilink + || cilen != CILEN_SHORT) { + orc = CONFREJ; + break; + } + + GETSHORT(cishort, p); + /* possibly should insist on a minimum/maximum MRRU here */ + ho->neg_mrru = 1; + ho->mrru = cishort; + break; +#endif /* HAVE_MULTILINK */ + + case CI_SSNHF: + if (!ao->neg_ssnhf +#ifdef HAVE_MULTILINK + || !multilink +#endif /* HAVE_MULTILINK */ + || cilen != CILEN_VOID) { + orc = CONFREJ; + break; + } + ho->neg_ssnhf = 1; + break; + + case CI_EPDISC: + if (!ao->neg_endpoint || + cilen < CILEN_CHAR || + cilen > CILEN_CHAR + MAX_ENDP_LEN) { + orc = CONFREJ; + break; + } + GETCHAR(cichar, p); + cilen -= CILEN_CHAR; + ho->neg_endpoint = 1; + ho->endpoint.class_ = cichar; + ho->endpoint.length = cilen; + MEMCPY(ho->endpoint.value, p, cilen); + INCPTR(cilen, p); + break; + + default: + LCPDEBUG(("lcp_reqci: rcvd unknown option %d", citype)); + orc = CONFREJ; + break; + } + +endswitch: + if (orc == CONFACK && /* Good CI */ + rc != CONFACK) /* but prior CI wasnt? */ + continue; /* Don't send this one */ + + if (orc == CONFNAK) { /* Nak this CI? */ + if (reject_if_disagree /* Getting fed up with sending NAKs? */ + && citype != CI_MAGICNUMBER) { + orc = CONFREJ; /* Get tough if so */ + } else { + if (rc == CONFREJ) /* Rejecting prior CI? */ + continue; /* Don't send this one */ + rc = CONFNAK; + } + } + if (orc == CONFREJ) { /* Reject this CI */ + rc = CONFREJ; + if (cip != rejp) /* Need to move rejected CI? */ + MEMCPY(rejp, cip, cilen); /* Move it */ + INCPTR(cilen, rejp); /* Update output pointer */ + } + } + + /* + * If we wanted to send additional NAKs (for unsent CIs), the + * code would go here. The extra NAKs would go at *nakoutp. + * At present there are no cases where we want to ask the + * peer to negotiate an option. + */ + + switch (rc) { + case CONFACK: + *lenp = next - inp; + break; + case CONFNAK: + /* + * Copy the Nak'd options from the nak buffer to the caller's buffer. + */ + *lenp = nakoutp - (u_char*)nakp->payload; + MEMCPY(inp, nakp->payload, *lenp); + break; + case CONFREJ: + *lenp = rejp - inp; + break; + default: + break; + } + + pbuf_free(nakp); + LCPDEBUG(("lcp_reqci: returning CONF%s.", CODENAME(rc))); + return (rc); /* Return final code */ +} + + +/* + * lcp_up - LCP has come UP. + */ +static void lcp_up(fsm *f) { + ppp_pcb *pcb = f->pcb; + lcp_options *wo = &pcb->lcp_wantoptions; + lcp_options *ho = &pcb->lcp_hisoptions; + lcp_options *go = &pcb->lcp_gotoptions; + lcp_options *ao = &pcb->lcp_allowoptions; + int mtu, mru; + + if (!go->neg_magicnumber) + go->magicnumber = 0; + if (!ho->neg_magicnumber) + ho->magicnumber = 0; + + /* + * Set our MTU to the smaller of the MTU we wanted and + * the MRU our peer wanted. If we negotiated an MRU, + * set our MRU to the larger of value we wanted and + * the value we got in the negotiation. + * Note on the MTU: the link MTU can be the MRU the peer wanted, + * the interface MTU is set to the lowest of that, the + * MTU we want to use, and our link MRU. + */ + mtu = ho->neg_mru? ho->mru: PPP_MRU; + mru = go->neg_mru? LWIP_MAX(wo->mru, go->mru): PPP_MRU; +#ifdef HAVE_MULTILINK + if (!(multilink && go->neg_mrru && ho->neg_mrru)) +#endif /* HAVE_MULTILINK */ + netif_set_mtu(pcb, LWIP_MIN(LWIP_MIN(mtu, mru), ao->mru)); + ppp_send_config(pcb, mtu, + (ho->neg_asyncmap? ho->asyncmap: 0xffffffff), + ho->neg_pcompression, ho->neg_accompression); + ppp_recv_config(pcb, mru, + (pcb->settings.lax_recv? 0: go->neg_asyncmap? go->asyncmap: 0xffffffff), + go->neg_pcompression, go->neg_accompression); + + if (ho->neg_mru) + pcb->peer_mru = ho->mru; + + lcp_echo_lowerup(f->pcb); /* Enable echo messages */ + + link_established(pcb); +} + + +/* + * lcp_down - LCP has gone DOWN. + * + * Alert other protocols. + */ +static void lcp_down(fsm *f) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + + lcp_echo_lowerdown(f->pcb); + + link_down(pcb); + + ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0); + ppp_recv_config(pcb, PPP_MRU, + (go->neg_asyncmap? go->asyncmap: 0xffffffff), + go->neg_pcompression, go->neg_accompression); + pcb->peer_mru = PPP_MRU; +} + + +/* + * lcp_starting - LCP needs the lower layer up. + */ +static void lcp_starting(fsm *f) { + ppp_pcb *pcb = f->pcb; + link_required(pcb); +} + + +/* + * lcp_finished - LCP has finished with the lower layer. + */ +static void lcp_finished(fsm *f) { + ppp_pcb *pcb = f->pcb; + link_terminated(pcb); +} + + +#if PRINTPKT_SUPPORT +/* + * lcp_printpkt - print the contents of an LCP packet. + */ +static const char* const lcp_codenames[] = { + "ConfReq", "ConfAck", "ConfNak", "ConfRej", + "TermReq", "TermAck", "CodeRej", "ProtRej", + "EchoReq", "EchoRep", "DiscReq", "Ident", + "TimeRem" +}; + +static int lcp_printpkt(const u_char *p, int plen, + void (*printer) (void *, const char *, ...), void *arg) { + int code, id, len, olen, i; + const u_char *pstart, *optend; + u_short cishort; + u32_t cilong; + + if (plen < HEADERLEN) + return 0; + pstart = p; + GETCHAR(code, p); + GETCHAR(id, p); + GETSHORT(len, p); + if (len < HEADERLEN || len > plen) + return 0; + + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(lcp_codenames)) + printer(arg, " %s", lcp_codenames[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= HEADERLEN; + switch (code) { + case CONFREQ: + case CONFACK: + case CONFNAK: + case CONFREJ: + /* print option list */ + while (len >= 2) { + GETCHAR(code, p); + GETCHAR(olen, p); + p -= 2; + if (olen < 2 || olen > len) { + break; + } + printer(arg, " <"); + len -= olen; + optend = p + olen; + switch (code) { + case CI_MRU: + if (olen == CILEN_SHORT) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "mru %d", cishort); + } + break; + case CI_ASYNCMAP: + if (olen == CILEN_LONG) { + p += 2; + GETLONG(cilong, p); + printer(arg, "asyncmap 0x%x", cilong); + } + break; + case CI_AUTHTYPE: + if (olen >= CILEN_SHORT) { + p += 2; + printer(arg, "auth "); + GETSHORT(cishort, p); + switch (cishort) { +#if PAP_SUPPORT + case PPP_PAP: + printer(arg, "pap"); + break; +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + case PPP_CHAP: + printer(arg, "chap"); + if (p < optend) { + switch (*p) { + case CHAP_MD5: + printer(arg, " MD5"); + ++p; + break; +#if MSCHAP_SUPPORT + case CHAP_MICROSOFT: + printer(arg, " MS"); + ++p; + break; + + case CHAP_MICROSOFT_V2: + printer(arg, " MS-v2"); + ++p; + break; +#endif /* MSCHAP_SUPPORT */ + default: + break; + } + } + break; +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + case PPP_EAP: + printer(arg, "eap"); + break; +#endif /* EAP_SUPPORT */ + default: + printer(arg, "0x%x", cishort); + } + } + break; +#if LQR_SUPPORT + case CI_QUALITY: + if (olen >= CILEN_SHORT) { + p += 2; + printer(arg, "quality "); + GETSHORT(cishort, p); + switch (cishort) { + case PPP_LQR: + printer(arg, "lqr"); + break; + default: + printer(arg, "0x%x", cishort); + } + } + break; +#endif /* LQR_SUPPORT */ + case CI_CALLBACK: + if (olen >= CILEN_CHAR) { + p += 2; + printer(arg, "callback "); + GETCHAR(cishort, p); + switch (cishort) { + case CBCP_OPT: + printer(arg, "CBCP"); + break; + default: + printer(arg, "0x%x", cishort); + } + } + break; + case CI_MAGICNUMBER: + if (olen == CILEN_LONG) { + p += 2; + GETLONG(cilong, p); + printer(arg, "magic 0x%x", cilong); + } + break; + case CI_PCOMPRESSION: + if (olen == CILEN_VOID) { + p += 2; + printer(arg, "pcomp"); + } + break; + case CI_ACCOMPRESSION: + if (olen == CILEN_VOID) { + p += 2; + printer(arg, "accomp"); + } + break; + case CI_MRRU: + if (olen == CILEN_SHORT) { + p += 2; + GETSHORT(cishort, p); + printer(arg, "mrru %d", cishort); + } + break; + case CI_SSNHF: + if (olen == CILEN_VOID) { + p += 2; + printer(arg, "ssnhf"); + } + break; + case CI_EPDISC: +#ifdef HAVE_MULTILINK + if (olen >= CILEN_CHAR) { + struct epdisc epd; + p += 2; + GETCHAR(epd.class, p); + epd.length = olen - CILEN_CHAR; + if (epd.length > MAX_ENDP_LEN) + epd.length = MAX_ENDP_LEN; + if (epd.length > 0) { + MEMCPY(epd.value, p, epd.length); + p += epd.length; + } + printer(arg, "endpoint [%s]", epdisc_to_str(&epd)); + } +#else + printer(arg, "endpoint"); +#endif + break; + default: + break; + } + while (p < optend) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + printer(arg, ">"); + } + break; + + case TERMACK: + case TERMREQ: + if (len > 0 && *p >= ' ' && *p < 0x7f) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; + + case ECHOREQ: + case ECHOREP: + case DISCREQ: + if (len >= 4) { + GETLONG(cilong, p); + printer(arg, " magic=0x%x", cilong); + len -= 4; + } + break; + + case IDENTIF: + case TIMEREM: + if (len >= 4) { + GETLONG(cilong, p); + printer(arg, " magic=0x%x", cilong); + len -= 4; + } + if (code == TIMEREM) { + if (len < 4) + break; + GETLONG(cilong, p); + printer(arg, " seconds=%u", cilong); + len -= 4; + } + if (len > 0) { + printer(arg, " "); + ppp_print_string(p, len, printer, arg); + p += len; + len = 0; + } + break; + default: + break; + } + + /* print the rest of the bytes in the packet */ + for (i = 0; i < len && i < 32; ++i) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + if (i < len) { + printer(arg, " ..."); + p += len - i; + } + + return p - pstart; +} +#endif /* PRINTPKT_SUPPORT */ + +/* + * Time to shut down the link because there is nothing out there. + */ + +static void LcpLinkFailure(fsm *f) { + ppp_pcb *pcb = f->pcb; + if (f->state == PPP_FSM_OPENED) { + ppp_info("No response to %d echo-requests", pcb->lcp_echos_pending); + ppp_notice("Serial link appears to be disconnected."); + pcb->err_code = PPPERR_PEERDEAD; + lcp_close(pcb, "Peer not responding"); + } +} + +/* + * Timer expired for the LCP echo requests from this process. + */ + +static void LcpEchoCheck(fsm *f) { + ppp_pcb *pcb = f->pcb; + + LcpSendEchoRequest (f); + if (f->state != PPP_FSM_OPENED) + return; + + /* + * Start the timer for the next interval. + */ + if (pcb->lcp_echo_timer_running) + ppp_warn("assertion lcp_echo_timer_running==0 failed"); + TIMEOUT (LcpEchoTimeout, f, pcb->settings.lcp_echo_interval); + pcb->lcp_echo_timer_running = 1; +} + +/* + * LcpEchoTimeout - Timer expired on the LCP echo + */ + +static void LcpEchoTimeout(void *arg) { + fsm *f = (fsm*)arg; + ppp_pcb *pcb = f->pcb; + if (pcb->lcp_echo_timer_running != 0) { + pcb->lcp_echo_timer_running = 0; + LcpEchoCheck ((fsm *) arg); + } +} + +/* + * LcpEchoReply - LCP has received a reply to the echo + */ + +static void lcp_received_echo_reply(fsm *f, int id, u_char *inp, int len) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + u32_t magic_val; + LWIP_UNUSED_ARG(id); + + /* Check the magic number - don't count replies from ourselves. */ + if (len < 4) { + ppp_dbglog("lcp: received short Echo-Reply, length %d", len); + return; + } + GETLONG(magic_val, inp); + if (go->neg_magicnumber + && magic_val == go->magicnumber) { + ppp_warn("appear to have received our own echo-reply!"); + return; + } + + /* Reset the number of outstanding echo frames */ + pcb->lcp_echos_pending = 0; +} + +/* + * LcpSendEchoRequest - Send an echo request frame to the peer + */ + +static void LcpSendEchoRequest(fsm *f) { + ppp_pcb *pcb = f->pcb; + lcp_options *go = &pcb->lcp_gotoptions; + u32_t lcp_magic; + u_char pkt[4], *pktp; + + /* + * Detect the failure of the peer at this point. + */ + if (pcb->settings.lcp_echo_fails != 0) { + if (pcb->lcp_echos_pending >= pcb->settings.lcp_echo_fails) { + LcpLinkFailure(f); + pcb->lcp_echos_pending = 0; + } + } + +#if PPP_LCP_ADAPTIVE + /* + * If adaptive echos have been enabled, only send the echo request if + * no traffic was received since the last one. + */ + if (pcb->settings.lcp_echo_adaptive) { + static unsigned int last_pkts_in = 0; + +#if PPP_STATS_SUPPORT + update_link_stats(f->unit); + link_stats_valid = 0; +#endif /* PPP_STATS_SUPPORT */ + + if (link_stats.pkts_in != last_pkts_in) { + last_pkts_in = link_stats.pkts_in; + return; + } + } +#endif + + /* + * Make and send the echo request frame. + */ + if (f->state == PPP_FSM_OPENED) { + lcp_magic = go->magicnumber; + pktp = pkt; + PUTLONG(lcp_magic, pktp); + fsm_sdata(f, ECHOREQ, pcb->lcp_echo_number++, pkt, pktp - pkt); + ++pcb->lcp_echos_pending; + } +} + +/* + * lcp_echo_lowerup - Start the timer for the LCP frame + */ + +static void lcp_echo_lowerup(ppp_pcb *pcb) { + fsm *f = &pcb->lcp_fsm; + + /* Clear the parameters for generating echo frames */ + pcb->lcp_echos_pending = 0; + pcb->lcp_echo_number = 0; + pcb->lcp_echo_timer_running = 0; + + /* If a timeout interval is specified then start the timer */ + if (pcb->settings.lcp_echo_interval != 0) + LcpEchoCheck (f); +} + +/* + * lcp_echo_lowerdown - Stop the timer for the LCP frame + */ + +static void lcp_echo_lowerdown(ppp_pcb *pcb) { + fsm *f = &pcb->lcp_fsm; + + if (pcb->lcp_echo_timer_running != 0) { + UNTIMEOUT (LcpEchoTimeout, f); + pcb->lcp_echo_timer_running = 0; + } +} + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/magic.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/magic.c index d0d87c5..32cfa26 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/magic.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/magic.c @@ -1,294 +1,294 @@ -/* - * magic.c - PPP Magic Number routines. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/***************************************************************************** -* randm.c - Random number generator program file. -* -* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. -* Copyright (c) 1998 by Global Election Systems Inc. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY -* -* 03-01-01 Marc Boucher -* Ported to lwIP. -* 98-06-03 Guy Lancaster , Global Election Systems Inc. -* Extracted from avos. -*****************************************************************************/ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/magic.h" - -#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */ - -#include "netif/ppp/pppcrypt.h" - -#define MD5_HASH_SIZE 16 -static char magic_randpool[MD5_HASH_SIZE]; /* Pool of randomness. */ -static long magic_randcount; /* Pseudo-random incrementer */ -static u32_t magic_randomseed; /* Seed used for random number generation. */ - -/* - * Churn the randomness pool on a random event. Call this early and often - * on random and semi-random system events to build randomness in time for - * usage. For randomly timed events, pass a null pointer and a zero length - * and this will use the system timer and other sources to add randomness. - * If new random data is available, pass a pointer to that and it will be - * included. - * - * Ref: Applied Cryptography 2nd Ed. by Bruce Schneier p. 427 - */ -static void magic_churnrand(char *rand_data, u32_t rand_len) { - lwip_md5_context md5_ctx; - - /* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: %u@%P\n", rand_len, rand_data)); */ - lwip_md5_init(&md5_ctx); - lwip_md5_starts(&md5_ctx); - lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); - if (rand_data) { - lwip_md5_update(&md5_ctx, (u_char *)rand_data, rand_len); - } else { - struct { - /* INCLUDE fields for any system sources of randomness */ - u32_t jiffies; -#ifdef LWIP_RAND - u32_t rand; -#endif /* LWIP_RAND */ - } sys_data; - magic_randomseed += sys_jiffies(); - sys_data.jiffies = magic_randomseed; -#ifdef LWIP_RAND - sys_data.rand = LWIP_RAND(); -#endif /* LWIP_RAND */ - /* Load sys_data fields here. */ - lwip_md5_update(&md5_ctx, (u_char *)&sys_data, sizeof(sys_data)); - } - lwip_md5_finish(&md5_ctx, (u_char *)magic_randpool); - lwip_md5_free(&md5_ctx); -/* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: -> 0\n")); */ -} - -/* - * Initialize the random number generator. - */ -void magic_init(void) { - magic_churnrand(NULL, 0); -} - -/* - * Randomize our random seed value. - */ -void magic_randomize(void) { - magic_churnrand(NULL, 0); -} - -/* - * magic_random_bytes - Fill a buffer with random bytes. - * - * Use the random pool to generate random data. This degrades to pseudo - * random when used faster than randomness is supplied using magic_churnrand(). - * Note: It's important that there be sufficient randomness in magic_randpool - * before this is called for otherwise the range of the result may be - * narrow enough to make a search feasible. - * - * Ref: Applied Cryptography 2nd Ed. by Bruce Schneier p. 427 - * - * XXX Why does he not just call magic_churnrand() for each block? Probably - * so that you don't ever publish the seed which could possibly help - * predict future values. - * XXX Why don't we preserve md5 between blocks and just update it with - * magic_randcount each time? Probably there is a weakness but I wish that - * it was documented. - */ -void magic_random_bytes(unsigned char *buf, u32_t buf_len) { - lwip_md5_context md5_ctx; - u_char tmp[MD5_HASH_SIZE]; - u32_t n; - - while (buf_len > 0) { - lwip_md5_init(&md5_ctx); - lwip_md5_starts(&md5_ctx); - lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); - lwip_md5_update(&md5_ctx, (u_char *)&magic_randcount, sizeof(magic_randcount)); - lwip_md5_finish(&md5_ctx, tmp); - lwip_md5_free(&md5_ctx); - magic_randcount++; - n = LWIP_MIN(buf_len, MD5_HASH_SIZE); - MEMCPY(buf, tmp, n); - buf += n; - buf_len -= n; - } -} - -/* - * Return a new random number. - */ -u32_t magic(void) { - u32_t new_rand; - - magic_random_bytes((unsigned char *)&new_rand, sizeof(new_rand)); - - return new_rand; -} - -#else /* PPP_MD5_RANDM */ - -/*****************************/ -/*** LOCAL DATA STRUCTURES ***/ -/*****************************/ -#ifndef LWIP_RAND -static int magic_randomized; /* Set when truely randomized. */ -#endif /* LWIP_RAND */ -static u32_t magic_randomseed; /* Seed used for random number generation. */ - - -/***********************************/ -/*** PUBLIC FUNCTION DEFINITIONS ***/ -/***********************************/ - -/* - * Initialize the random number generator. - * - * Here we attempt to compute a random number seed but even if - * it isn't random, we'll randomize it later. - * - * The current method uses the fields from the real time clock, - * the idle process counter, the millisecond counter, and the - * hardware timer tick counter. When this is invoked - * in startup(), then the idle counter and timer values may - * repeat after each boot and the real time clock may not be - * operational. Thus we call it again on the first random - * event. - */ -void magic_init(void) { - magic_randomseed += sys_jiffies(); -#ifndef LWIP_RAND - /* Initialize the Borland random number generator. */ - srand((unsigned)magic_randomseed); -#endif /* LWIP_RAND */ -} - -/* - * magic_init - Initialize the magic number generator. - * - * Randomize our random seed value. Here we use the fact that - * this function is called at *truely random* times by the polling - * and network functions. Here we only get 16 bits of new random - * value but we use the previous value to randomize the other 16 - * bits. - */ -void magic_randomize(void) { -#ifndef LWIP_RAND - if (!magic_randomized) { - magic_randomized = !0; - magic_init(); - /* The initialization function also updates the seed. */ - } else { -#endif /* LWIP_RAND */ - magic_randomseed += sys_jiffies(); -#ifndef LWIP_RAND - } -#endif /* LWIP_RAND */ -} - -/* - * Return a new random number. - * - * Here we use the Borland rand() function to supply a pseudo random - * number which we make truely random by combining it with our own - * seed which is randomized by truely random events. - * Thus the numbers will be truely random unless there have been no - * operator or network events in which case it will be pseudo random - * seeded by the real time clock. - */ -u32_t magic(void) { -#ifdef LWIP_RAND - return LWIP_RAND() + magic_randomseed; -#else /* LWIP_RAND */ - return ((u32_t)rand() << 16) + (u32_t)rand() + magic_randomseed; -#endif /* LWIP_RAND */ -} - -/* - * magic_random_bytes - Fill a buffer with random bytes. - */ -void magic_random_bytes(unsigned char *buf, u32_t buf_len) { - u32_t new_rand, n; - - while (buf_len > 0) { - new_rand = magic(); - n = LWIP_MIN(buf_len, sizeof(new_rand)); - MEMCPY(buf, &new_rand, n); - buf += n; - buf_len -= n; - } -} -#endif /* PPP_MD5_RANDM */ - -/* - * Return a new random number between 0 and (2^pow)-1 included. - */ -u32_t magic_pow(u8_t pow) { - return magic() & ~(~0UL< +* Ported to lwIP. +* 98-06-03 Guy Lancaster , Global Election Systems Inc. +* Extracted from avos. +*****************************************************************************/ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/magic.h" + +#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */ + +#include "netif/ppp/pppcrypt.h" + +#define MD5_HASH_SIZE 16 +static char magic_randpool[MD5_HASH_SIZE]; /* Pool of randomness. */ +static long magic_randcount; /* Pseudo-random incrementer */ +static u32_t magic_randomseed; /* Seed used for random number generation. */ + +/* + * Churn the randomness pool on a random event. Call this early and often + * on random and semi-random system events to build randomness in time for + * usage. For randomly timed events, pass a null pointer and a zero length + * and this will use the system timer and other sources to add randomness. + * If new random data is available, pass a pointer to that and it will be + * included. + * + * Ref: Applied Cryptography 2nd Ed. by Bruce Schneier p. 427 + */ +static void magic_churnrand(char *rand_data, u32_t rand_len) { + lwip_md5_context md5_ctx; + + /* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: %u@%P\n", rand_len, rand_data)); */ + lwip_md5_init(&md5_ctx); + lwip_md5_starts(&md5_ctx); + lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); + if (rand_data) { + lwip_md5_update(&md5_ctx, (u_char *)rand_data, rand_len); + } else { + struct { + /* INCLUDE fields for any system sources of randomness */ + u32_t jiffies; +#ifdef LWIP_RAND + u32_t rand; +#endif /* LWIP_RAND */ + } sys_data; + magic_randomseed += sys_jiffies(); + sys_data.jiffies = magic_randomseed; +#ifdef LWIP_RAND + sys_data.rand = LWIP_RAND(); +#endif /* LWIP_RAND */ + /* Load sys_data fields here. */ + lwip_md5_update(&md5_ctx, (u_char *)&sys_data, sizeof(sys_data)); + } + lwip_md5_finish(&md5_ctx, (u_char *)magic_randpool); + lwip_md5_free(&md5_ctx); +/* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: -> 0\n")); */ +} + +/* + * Initialize the random number generator. + */ +void magic_init(void) { + magic_churnrand(NULL, 0); +} + +/* + * Randomize our random seed value. + */ +void magic_randomize(void) { + magic_churnrand(NULL, 0); +} + +/* + * magic_random_bytes - Fill a buffer with random bytes. + * + * Use the random pool to generate random data. This degrades to pseudo + * random when used faster than randomness is supplied using magic_churnrand(). + * Note: It's important that there be sufficient randomness in magic_randpool + * before this is called for otherwise the range of the result may be + * narrow enough to make a search feasible. + * + * Ref: Applied Cryptography 2nd Ed. by Bruce Schneier p. 427 + * + * XXX Why does he not just call magic_churnrand() for each block? Probably + * so that you don't ever publish the seed which could possibly help + * predict future values. + * XXX Why don't we preserve md5 between blocks and just update it with + * magic_randcount each time? Probably there is a weakness but I wish that + * it was documented. + */ +void magic_random_bytes(unsigned char *buf, u32_t buf_len) { + lwip_md5_context md5_ctx; + u_char tmp[MD5_HASH_SIZE]; + u32_t n; + + while (buf_len > 0) { + lwip_md5_init(&md5_ctx); + lwip_md5_starts(&md5_ctx); + lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); + lwip_md5_update(&md5_ctx, (u_char *)&magic_randcount, sizeof(magic_randcount)); + lwip_md5_finish(&md5_ctx, tmp); + lwip_md5_free(&md5_ctx); + magic_randcount++; + n = LWIP_MIN(buf_len, MD5_HASH_SIZE); + MEMCPY(buf, tmp, n); + buf += n; + buf_len -= n; + } +} + +/* + * Return a new random number. + */ +u32_t magic(void) { + u32_t new_rand; + + magic_random_bytes((unsigned char *)&new_rand, sizeof(new_rand)); + + return new_rand; +} + +#else /* PPP_MD5_RANDM */ + +/*****************************/ +/*** LOCAL DATA STRUCTURES ***/ +/*****************************/ +#ifndef LWIP_RAND +static int magic_randomized; /* Set when truely randomized. */ +#endif /* LWIP_RAND */ +static u32_t magic_randomseed; /* Seed used for random number generation. */ + + +/***********************************/ +/*** PUBLIC FUNCTION DEFINITIONS ***/ +/***********************************/ + +/* + * Initialize the random number generator. + * + * Here we attempt to compute a random number seed but even if + * it isn't random, we'll randomize it later. + * + * The current method uses the fields from the real time clock, + * the idle process counter, the millisecond counter, and the + * hardware timer tick counter. When this is invoked + * in startup(), then the idle counter and timer values may + * repeat after each boot and the real time clock may not be + * operational. Thus we call it again on the first random + * event. + */ +void magic_init(void) { + magic_randomseed += sys_jiffies(); +#ifndef LWIP_RAND + /* Initialize the Borland random number generator. */ + srand((unsigned)magic_randomseed); +#endif /* LWIP_RAND */ +} + +/* + * magic_init - Initialize the magic number generator. + * + * Randomize our random seed value. Here we use the fact that + * this function is called at *truely random* times by the polling + * and network functions. Here we only get 16 bits of new random + * value but we use the previous value to randomize the other 16 + * bits. + */ +void magic_randomize(void) { +#ifndef LWIP_RAND + if (!magic_randomized) { + magic_randomized = !0; + magic_init(); + /* The initialization function also updates the seed. */ + } else { +#endif /* LWIP_RAND */ + magic_randomseed += sys_jiffies(); +#ifndef LWIP_RAND + } +#endif /* LWIP_RAND */ +} + +/* + * Return a new random number. + * + * Here we use the Borland rand() function to supply a pseudo random + * number which we make truely random by combining it with our own + * seed which is randomized by truely random events. + * Thus the numbers will be truely random unless there have been no + * operator or network events in which case it will be pseudo random + * seeded by the real time clock. + */ +u32_t magic(void) { +#ifdef LWIP_RAND + return LWIP_RAND() + magic_randomseed; +#else /* LWIP_RAND */ + return ((u32_t)rand() << 16) + (u32_t)rand() + magic_randomseed; +#endif /* LWIP_RAND */ +} + +/* + * magic_random_bytes - Fill a buffer with random bytes. + */ +void magic_random_bytes(unsigned char *buf, u32_t buf_len) { + u32_t new_rand, n; + + while (buf_len > 0) { + new_rand = magic(); + n = LWIP_MIN(buf_len, sizeof(new_rand)); + MEMCPY(buf, &new_rand, n); + buf += n; + buf_len -= n; + } +} +#endif /* PPP_MD5_RANDM */ + +/* + * Return a new random number between 0 and (2^pow)-1 included. + */ +u32_t magic_pow(u8_t pow) { + return magic() & ~(~0UL<. - * Copyright (c) 2002,2003,2004 Google, Inc. - * All rights reserved. - * - * License: - * Permission to use, copy, modify, and distribute this software and its - * documentation is hereby granted, provided that the above copyright - * notice appears in all copies. This software is provided without any - * warranty, express or implied. - * - * Changelog: - * 08/12/05 - Matt Domsch - * Only need extra skb padding on transmit, not receive. - * 06/18/04 - Matt Domsch , Oleg Makarenko - * Use Linux kernel 2.6 arc4 and sha1 routines rather than - * providing our own. - * 2/15/04 - TS: added #include and testing for Kernel - * version before using - * MOD_DEC_USAGE_COUNT/MOD_INC_USAGE_COUNT which are - * deprecated in 2.6 - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include - -#include "lwip/err.h" - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/ccp.h" -#include "netif/ppp/mppe.h" -#include "netif/ppp/pppdebug.h" -#include "netif/ppp/pppcrypt.h" - -#define SHA1_SIGNATURE_SIZE 20 - -/* ppp_mppe_state.bits definitions */ -#define MPPE_BIT_A 0x80 /* Encryption table were (re)inititalized */ -#define MPPE_BIT_B 0x40 /* MPPC only (not implemented) */ -#define MPPE_BIT_C 0x20 /* MPPC only (not implemented) */ -#define MPPE_BIT_D 0x10 /* This is an encrypted frame */ - -#define MPPE_BIT_FLUSHED MPPE_BIT_A -#define MPPE_BIT_ENCRYPTED MPPE_BIT_D - -#define MPPE_BITS(p) ((p)[0] & 0xf0) -#define MPPE_CCOUNT(p) ((((p)[0] & 0x0f) << 8) + (p)[1]) -#define MPPE_CCOUNT_SPACE 0x1000 /* The size of the ccount space */ - -#define MPPE_OVHD 2 /* MPPE overhead/packet */ -#define SANITY_MAX 1600 /* Max bogon factor we will tolerate */ - -/* - * Perform the MPPE rekey algorithm, from RFC 3078, sec. 7.3. - * Well, not what's written there, but rather what they meant. - */ -static void mppe_rekey(ppp_mppe_state * state, int initial_key) -{ - lwip_sha1_context sha1_ctx; - u8_t sha1_digest[SHA1_SIGNATURE_SIZE]; - - /* - * Key Derivation, from RFC 3078, RFC 3079. - * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. - */ - lwip_sha1_init(&sha1_ctx); - lwip_sha1_starts(&sha1_ctx); - lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); - lwip_sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE); - lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); - lwip_sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE); - lwip_sha1_finish(&sha1_ctx, sha1_digest); - lwip_sha1_free(&sha1_ctx); - MEMCPY(state->session_key, sha1_digest, state->keylen); - - if (!initial_key) { - lwip_arc4_init(&state->arc4); - lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); - lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); - lwip_arc4_free(&state->arc4); - } - if (state->keylen == 8) { - /* See RFC 3078 */ - state->session_key[0] = 0xd1; - state->session_key[1] = 0x26; - state->session_key[2] = 0x9e; - } - lwip_arc4_init(&state->arc4); - lwip_arc4_setup(&state->arc4, state->session_key, state->keylen); -} - -/* - * Set key, used by MSCHAP before mppe_init() is actually called by CCP so we - * don't have to keep multiple copies of keys. - */ -void mppe_set_key(ppp_pcb *pcb, ppp_mppe_state *state, u8_t *key) { - LWIP_UNUSED_ARG(pcb); - MEMCPY(state->master_key, key, MPPE_MAX_KEY_LEN); -} - -/* - * Initialize (de)compressor state. - */ -void -mppe_init(ppp_pcb *pcb, ppp_mppe_state *state, u8_t options) -{ -#if PPP_DEBUG - const u8_t *debugstr = (const u8_t*)"mppe_comp_init"; - if (&pcb->mppe_decomp == state) { - debugstr = (const u8_t*)"mppe_decomp_init"; - } -#endif /* PPP_DEBUG */ - - /* Save keys. */ - MEMCPY(state->session_key, state->master_key, sizeof(state->master_key)); - - if (options & MPPE_OPT_128) - state->keylen = 16; - else if (options & MPPE_OPT_40) - state->keylen = 8; - else { - PPPDEBUG(LOG_DEBUG, ("%s[%d]: unknown key length\n", debugstr, - pcb->netif->num)); - lcp_close(pcb, "MPPE required but peer negotiation failed"); - return; - } - if (options & MPPE_OPT_STATEFUL) - state->stateful = 1; - - /* Generate the initial session key. */ - mppe_rekey(state, 1); - -#if PPP_DEBUG - { - int i; - char mkey[sizeof(state->master_key) * 2 + 1]; - char skey[sizeof(state->session_key) * 2 + 1]; - - PPPDEBUG(LOG_DEBUG, ("%s[%d]: initialized with %d-bit %s mode\n", - debugstr, pcb->netif->num, (state->keylen == 16) ? 128 : 40, - (state->stateful) ? "stateful" : "stateless")); - - for (i = 0; i < (int)sizeof(state->master_key); i++) - sprintf(mkey + i * 2, "%02x", state->master_key[i]); - for (i = 0; i < (int)sizeof(state->session_key); i++) - sprintf(skey + i * 2, "%02x", state->session_key[i]); - PPPDEBUG(LOG_DEBUG, - ("%s[%d]: keys: master: %s initial session: %s\n", - debugstr, pcb->netif->num, mkey, skey)); - } -#endif /* PPP_DEBUG */ - - /* - * Initialize the coherency count. The initial value is not specified - * in RFC 3078, but we can make a reasonable assumption that it will - * start at 0. Setting it to the max here makes the comp/decomp code - * do the right thing (determined through experiment). - */ - state->ccount = MPPE_CCOUNT_SPACE - 1; - - /* - * Note that even though we have initialized the key table, we don't - * set the FLUSHED bit. This is contrary to RFC 3078, sec. 3.1. - */ - state->bits = MPPE_BIT_ENCRYPTED; -} - -/* - * We received a CCP Reset-Request (actually, we are sending a Reset-Ack), - * tell the compressor to rekey. Note that we MUST NOT rekey for - * every CCP Reset-Request; we only rekey on the next xmit packet. - * We might get multiple CCP Reset-Requests if our CCP Reset-Ack is lost. - * So, rekeying for every CCP Reset-Request is broken as the peer will not - * know how many times we've rekeyed. (If we rekey and THEN get another - * CCP Reset-Request, we must rekey again.) - */ -void mppe_comp_reset(ppp_pcb *pcb, ppp_mppe_state *state) -{ - LWIP_UNUSED_ARG(pcb); - state->bits |= MPPE_BIT_FLUSHED; -} - -/* - * Compress (encrypt) a packet. - * It's strange to call this a compressor, since the output is always - * MPPE_OVHD + 2 bytes larger than the input. - */ -err_t -mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t protocol) -{ - struct pbuf *n, *np; - u8_t *pl; - err_t err; - - LWIP_UNUSED_ARG(pcb); - - /* TCP stack requires that we don't change the packet payload, therefore we copy - * the whole packet before encryption. - */ - np = pbuf_alloc(PBUF_RAW, MPPE_OVHD + sizeof(protocol) + (*pb)->tot_len, PBUF_POOL); - if (!np) { - return ERR_MEM; - } - - /* Hide MPPE header + protocol */ - pbuf_header(np, -(s16_t)(MPPE_OVHD + sizeof(protocol))); - - if ((err = pbuf_copy(np, *pb)) != ERR_OK) { - pbuf_free(np); - return err; - } - - /* Reveal MPPE header + protocol */ - pbuf_header(np, (s16_t)(MPPE_OVHD + sizeof(protocol))); - - *pb = np; - pl = (u8_t*)np->payload; - - state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; - PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: ccount %d\n", pcb->netif->num, state->ccount)); - /* FIXME: use PUT* macros */ - pl[0] = state->ccount>>8; - pl[1] = state->ccount; - - if (!state->stateful || /* stateless mode */ - ((state->ccount & 0xff) == 0xff) || /* "flag" packet */ - (state->bits & MPPE_BIT_FLUSHED)) { /* CCP Reset-Request */ - /* We must rekey */ - if (state->stateful) { - PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: rekeying\n", pcb->netif->num)); - } - mppe_rekey(state, 0); - state->bits |= MPPE_BIT_FLUSHED; - } - pl[0] |= state->bits; - state->bits &= ~MPPE_BIT_FLUSHED; /* reset for next xmit */ - pl += MPPE_OVHD; - - /* Add protocol */ - /* FIXME: add PFC support */ - pl[0] = protocol >> 8; - pl[1] = protocol; - - /* Hide MPPE header */ - pbuf_header(np, -(s16_t)MPPE_OVHD); - - /* Encrypt packet */ - for (n = np; n != NULL; n = n->next) { - lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); - if (n->tot_len == n->len) { - break; - } - } - - /* Reveal MPPE header */ - pbuf_header(np, (s16_t)MPPE_OVHD); - - return ERR_OK; -} - -/* - * We received a CCP Reset-Ack. Just ignore it. - */ -void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state) -{ - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(state); - return; -} - -/* - * Decompress (decrypt) an MPPE packet. - */ -err_t -mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb) -{ - struct pbuf *n0 = *pb, *n; - u8_t *pl; - u16_t ccount; - u8_t flushed; - - /* MPPE Header */ - if (n0->len < MPPE_OVHD) { - PPPDEBUG(LOG_DEBUG, - ("mppe_decompress[%d]: short pkt (%d)\n", - pcb->netif->num, n0->len)); - state->sanity_errors += 100; - goto sanity_error; - } - - pl = (u8_t*)n0->payload; - flushed = MPPE_BITS(pl) & MPPE_BIT_FLUSHED; - ccount = MPPE_CCOUNT(pl); - PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: ccount %d\n", - pcb->netif->num, ccount)); - - /* sanity checks -- terminate with extreme prejudice */ - if (!(MPPE_BITS(pl) & MPPE_BIT_ENCRYPTED)) { - PPPDEBUG(LOG_DEBUG, - ("mppe_decompress[%d]: ENCRYPTED bit not set!\n", - pcb->netif->num)); - state->sanity_errors += 100; - goto sanity_error; - } - if (!state->stateful && !flushed) { - PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set in " - "stateless mode!\n", pcb->netif->num)); - state->sanity_errors += 100; - goto sanity_error; - } - if (state->stateful && ((ccount & 0xff) == 0xff) && !flushed) { - PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set on " - "flag packet!\n", pcb->netif->num)); - state->sanity_errors += 100; - goto sanity_error; - } - - /* - * Check the coherency count. - */ - - if (!state->stateful) { - /* Discard late packet */ - if ((ccount - state->ccount) % MPPE_CCOUNT_SPACE > MPPE_CCOUNT_SPACE / 2) { - state->sanity_errors++; - goto sanity_error; - } - - /* RFC 3078, sec 8.1. Rekey for every packet. */ - while (state->ccount != ccount) { - mppe_rekey(state, 0); - state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; - } - } else { - /* RFC 3078, sec 8.2. */ - if (!state->discard) { - /* normal state */ - state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; - if (ccount != state->ccount) { - /* - * (ccount > state->ccount) - * Packet loss detected, enter the discard state. - * Signal the peer to rekey (by sending a CCP Reset-Request). - */ - state->discard = 1; - ccp_resetrequest(pcb); - return ERR_BUF; - } - } else { - /* discard state */ - if (!flushed) { - /* ccp.c will be silent (no additional CCP Reset-Requests). */ - return ERR_BUF; - } else { - /* Rekey for every missed "flag" packet. */ - while ((ccount & ~0xff) != - (state->ccount & ~0xff)) { - mppe_rekey(state, 0); - state->ccount = - (state->ccount + - 256) % MPPE_CCOUNT_SPACE; - } - - /* reset */ - state->discard = 0; - state->ccount = ccount; - /* - * Another problem with RFC 3078 here. It implies that the - * peer need not send a Reset-Ack packet. But RFC 1962 - * requires it. Hopefully, M$ does send a Reset-Ack; even - * though it isn't required for MPPE synchronization, it is - * required to reset CCP state. - */ - } - } - if (flushed) - mppe_rekey(state, 0); - } - - /* Hide MPPE header */ - pbuf_header(n0, -(s16_t)(MPPE_OVHD)); - - /* Decrypt the packet. */ - for (n = n0; n != NULL; n = n->next) { - lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); - if (n->tot_len == n->len) { - break; - } - } - - /* good packet credit */ - state->sanity_errors >>= 1; - - return ERR_OK; - -sanity_error: - if (state->sanity_errors >= SANITY_MAX) { - /* - * Take LCP down if the peer is sending too many bogons. - * We don't want to do this for a single or just a few - * instances since it could just be due to packet corruption. - */ - lcp_close(pcb, "Too many MPPE errors"); - } - return ERR_BUF; -} - -#endif /* PPP_SUPPORT && MPPE_SUPPORT */ +/* + * mppe.c - interface MPPE to the PPP code. + * + * By Frank Cusack . + * Copyright (c) 2002,2003,2004 Google, Inc. + * All rights reserved. + * + * License: + * Permission to use, copy, modify, and distribute this software and its + * documentation is hereby granted, provided that the above copyright + * notice appears in all copies. This software is provided without any + * warranty, express or implied. + * + * Changelog: + * 08/12/05 - Matt Domsch + * Only need extra skb padding on transmit, not receive. + * 06/18/04 - Matt Domsch , Oleg Makarenko + * Use Linux kernel 2.6 arc4 and sha1 routines rather than + * providing our own. + * 2/15/04 - TS: added #include and testing for Kernel + * version before using + * MOD_DEC_USAGE_COUNT/MOD_INC_USAGE_COUNT which are + * deprecated in 2.6 + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include + +#include "lwip/err.h" + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/ccp.h" +#include "netif/ppp/mppe.h" +#include "netif/ppp/pppdebug.h" +#include "netif/ppp/pppcrypt.h" + +#define SHA1_SIGNATURE_SIZE 20 + +/* ppp_mppe_state.bits definitions */ +#define MPPE_BIT_A 0x80 /* Encryption table were (re)inititalized */ +#define MPPE_BIT_B 0x40 /* MPPC only (not implemented) */ +#define MPPE_BIT_C 0x20 /* MPPC only (not implemented) */ +#define MPPE_BIT_D 0x10 /* This is an encrypted frame */ + +#define MPPE_BIT_FLUSHED MPPE_BIT_A +#define MPPE_BIT_ENCRYPTED MPPE_BIT_D + +#define MPPE_BITS(p) ((p)[0] & 0xf0) +#define MPPE_CCOUNT(p) ((((p)[0] & 0x0f) << 8) + (p)[1]) +#define MPPE_CCOUNT_SPACE 0x1000 /* The size of the ccount space */ + +#define MPPE_OVHD 2 /* MPPE overhead/packet */ +#define SANITY_MAX 1600 /* Max bogon factor we will tolerate */ + +/* + * Perform the MPPE rekey algorithm, from RFC 3078, sec. 7.3. + * Well, not what's written there, but rather what they meant. + */ +static void mppe_rekey(ppp_mppe_state * state, int initial_key) +{ + lwip_sha1_context sha1_ctx; + u8_t sha1_digest[SHA1_SIGNATURE_SIZE]; + + /* + * Key Derivation, from RFC 3078, RFC 3079. + * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. + */ + lwip_sha1_init(&sha1_ctx); + lwip_sha1_starts(&sha1_ctx); + lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); + lwip_sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE); + lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); + lwip_sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE); + lwip_sha1_finish(&sha1_ctx, sha1_digest); + lwip_sha1_free(&sha1_ctx); + MEMCPY(state->session_key, sha1_digest, state->keylen); + + if (!initial_key) { + lwip_arc4_init(&state->arc4); + lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); + lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); + lwip_arc4_free(&state->arc4); + } + if (state->keylen == 8) { + /* See RFC 3078 */ + state->session_key[0] = 0xd1; + state->session_key[1] = 0x26; + state->session_key[2] = 0x9e; + } + lwip_arc4_init(&state->arc4); + lwip_arc4_setup(&state->arc4, state->session_key, state->keylen); +} + +/* + * Set key, used by MSCHAP before mppe_init() is actually called by CCP so we + * don't have to keep multiple copies of keys. + */ +void mppe_set_key(ppp_pcb *pcb, ppp_mppe_state *state, u8_t *key) { + LWIP_UNUSED_ARG(pcb); + MEMCPY(state->master_key, key, MPPE_MAX_KEY_LEN); +} + +/* + * Initialize (de)compressor state. + */ +void +mppe_init(ppp_pcb *pcb, ppp_mppe_state *state, u8_t options) +{ +#if PPP_DEBUG + const u8_t *debugstr = (const u8_t*)"mppe_comp_init"; + if (&pcb->mppe_decomp == state) { + debugstr = (const u8_t*)"mppe_decomp_init"; + } +#endif /* PPP_DEBUG */ + + /* Save keys. */ + MEMCPY(state->session_key, state->master_key, sizeof(state->master_key)); + + if (options & MPPE_OPT_128) + state->keylen = 16; + else if (options & MPPE_OPT_40) + state->keylen = 8; + else { + PPPDEBUG(LOG_DEBUG, ("%s[%d]: unknown key length\n", debugstr, + pcb->netif->num)); + lcp_close(pcb, "MPPE required but peer negotiation failed"); + return; + } + if (options & MPPE_OPT_STATEFUL) + state->stateful = 1; + + /* Generate the initial session key. */ + mppe_rekey(state, 1); + +#if PPP_DEBUG + { + int i; + char mkey[sizeof(state->master_key) * 2 + 1]; + char skey[sizeof(state->session_key) * 2 + 1]; + + PPPDEBUG(LOG_DEBUG, ("%s[%d]: initialized with %d-bit %s mode\n", + debugstr, pcb->netif->num, (state->keylen == 16) ? 128 : 40, + (state->stateful) ? "stateful" : "stateless")); + + for (i = 0; i < (int)sizeof(state->master_key); i++) + sprintf(mkey + i * 2, "%02x", state->master_key[i]); + for (i = 0; i < (int)sizeof(state->session_key); i++) + sprintf(skey + i * 2, "%02x", state->session_key[i]); + PPPDEBUG(LOG_DEBUG, + ("%s[%d]: keys: master: %s initial session: %s\n", + debugstr, pcb->netif->num, mkey, skey)); + } +#endif /* PPP_DEBUG */ + + /* + * Initialize the coherency count. The initial value is not specified + * in RFC 3078, but we can make a reasonable assumption that it will + * start at 0. Setting it to the max here makes the comp/decomp code + * do the right thing (determined through experiment). + */ + state->ccount = MPPE_CCOUNT_SPACE - 1; + + /* + * Note that even though we have initialized the key table, we don't + * set the FLUSHED bit. This is contrary to RFC 3078, sec. 3.1. + */ + state->bits = MPPE_BIT_ENCRYPTED; +} + +/* + * We received a CCP Reset-Request (actually, we are sending a Reset-Ack), + * tell the compressor to rekey. Note that we MUST NOT rekey for + * every CCP Reset-Request; we only rekey on the next xmit packet. + * We might get multiple CCP Reset-Requests if our CCP Reset-Ack is lost. + * So, rekeying for every CCP Reset-Request is broken as the peer will not + * know how many times we've rekeyed. (If we rekey and THEN get another + * CCP Reset-Request, we must rekey again.) + */ +void mppe_comp_reset(ppp_pcb *pcb, ppp_mppe_state *state) +{ + LWIP_UNUSED_ARG(pcb); + state->bits |= MPPE_BIT_FLUSHED; +} + +/* + * Compress (encrypt) a packet. + * It's strange to call this a compressor, since the output is always + * MPPE_OVHD + 2 bytes larger than the input. + */ +err_t +mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t protocol) +{ + struct pbuf *n, *np; + u8_t *pl; + err_t err; + + LWIP_UNUSED_ARG(pcb); + + /* TCP stack requires that we don't change the packet payload, therefore we copy + * the whole packet before encryption. + */ + np = pbuf_alloc(PBUF_RAW, MPPE_OVHD + sizeof(protocol) + (*pb)->tot_len, PBUF_POOL); + if (!np) { + return ERR_MEM; + } + + /* Hide MPPE header + protocol */ + pbuf_header(np, -(s16_t)(MPPE_OVHD + sizeof(protocol))); + + if ((err = pbuf_copy(np, *pb)) != ERR_OK) { + pbuf_free(np); + return err; + } + + /* Reveal MPPE header + protocol */ + pbuf_header(np, (s16_t)(MPPE_OVHD + sizeof(protocol))); + + *pb = np; + pl = (u8_t*)np->payload; + + state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; + PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: ccount %d\n", pcb->netif->num, state->ccount)); + /* FIXME: use PUT* macros */ + pl[0] = state->ccount>>8; + pl[1] = state->ccount; + + if (!state->stateful || /* stateless mode */ + ((state->ccount & 0xff) == 0xff) || /* "flag" packet */ + (state->bits & MPPE_BIT_FLUSHED)) { /* CCP Reset-Request */ + /* We must rekey */ + if (state->stateful) { + PPPDEBUG(LOG_DEBUG, ("mppe_compress[%d]: rekeying\n", pcb->netif->num)); + } + mppe_rekey(state, 0); + state->bits |= MPPE_BIT_FLUSHED; + } + pl[0] |= state->bits; + state->bits &= ~MPPE_BIT_FLUSHED; /* reset for next xmit */ + pl += MPPE_OVHD; + + /* Add protocol */ + /* FIXME: add PFC support */ + pl[0] = protocol >> 8; + pl[1] = protocol; + + /* Hide MPPE header */ + pbuf_header(np, -(s16_t)MPPE_OVHD); + + /* Encrypt packet */ + for (n = np; n != NULL; n = n->next) { + lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); + if (n->tot_len == n->len) { + break; + } + } + + /* Reveal MPPE header */ + pbuf_header(np, (s16_t)MPPE_OVHD); + + return ERR_OK; +} + +/* + * We received a CCP Reset-Ack. Just ignore it. + */ +void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state) +{ + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(state); + return; +} + +/* + * Decompress (decrypt) an MPPE packet. + */ +err_t +mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb) +{ + struct pbuf *n0 = *pb, *n; + u8_t *pl; + u16_t ccount; + u8_t flushed; + + /* MPPE Header */ + if (n0->len < MPPE_OVHD) { + PPPDEBUG(LOG_DEBUG, + ("mppe_decompress[%d]: short pkt (%d)\n", + pcb->netif->num, n0->len)); + state->sanity_errors += 100; + goto sanity_error; + } + + pl = (u8_t*)n0->payload; + flushed = MPPE_BITS(pl) & MPPE_BIT_FLUSHED; + ccount = MPPE_CCOUNT(pl); + PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: ccount %d\n", + pcb->netif->num, ccount)); + + /* sanity checks -- terminate with extreme prejudice */ + if (!(MPPE_BITS(pl) & MPPE_BIT_ENCRYPTED)) { + PPPDEBUG(LOG_DEBUG, + ("mppe_decompress[%d]: ENCRYPTED bit not set!\n", + pcb->netif->num)); + state->sanity_errors += 100; + goto sanity_error; + } + if (!state->stateful && !flushed) { + PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set in " + "stateless mode!\n", pcb->netif->num)); + state->sanity_errors += 100; + goto sanity_error; + } + if (state->stateful && ((ccount & 0xff) == 0xff) && !flushed) { + PPPDEBUG(LOG_DEBUG, ("mppe_decompress[%d]: FLUSHED bit not set on " + "flag packet!\n", pcb->netif->num)); + state->sanity_errors += 100; + goto sanity_error; + } + + /* + * Check the coherency count. + */ + + if (!state->stateful) { + /* Discard late packet */ + if ((ccount - state->ccount) % MPPE_CCOUNT_SPACE > MPPE_CCOUNT_SPACE / 2) { + state->sanity_errors++; + goto sanity_error; + } + + /* RFC 3078, sec 8.1. Rekey for every packet. */ + while (state->ccount != ccount) { + mppe_rekey(state, 0); + state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; + } + } else { + /* RFC 3078, sec 8.2. */ + if (!state->discard) { + /* normal state */ + state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE; + if (ccount != state->ccount) { + /* + * (ccount > state->ccount) + * Packet loss detected, enter the discard state. + * Signal the peer to rekey (by sending a CCP Reset-Request). + */ + state->discard = 1; + ccp_resetrequest(pcb); + return ERR_BUF; + } + } else { + /* discard state */ + if (!flushed) { + /* ccp.c will be silent (no additional CCP Reset-Requests). */ + return ERR_BUF; + } else { + /* Rekey for every missed "flag" packet. */ + while ((ccount & ~0xff) != + (state->ccount & ~0xff)) { + mppe_rekey(state, 0); + state->ccount = + (state->ccount + + 256) % MPPE_CCOUNT_SPACE; + } + + /* reset */ + state->discard = 0; + state->ccount = ccount; + /* + * Another problem with RFC 3078 here. It implies that the + * peer need not send a Reset-Ack packet. But RFC 1962 + * requires it. Hopefully, M$ does send a Reset-Ack; even + * though it isn't required for MPPE synchronization, it is + * required to reset CCP state. + */ + } + } + if (flushed) + mppe_rekey(state, 0); + } + + /* Hide MPPE header */ + pbuf_header(n0, -(s16_t)(MPPE_OVHD)); + + /* Decrypt the packet. */ + for (n = n0; n != NULL; n = n->next) { + lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); + if (n->tot_len == n->len) { + break; + } + } + + /* good packet credit */ + state->sanity_errors >>= 1; + + return ERR_OK; + +sanity_error: + if (state->sanity_errors >= SANITY_MAX) { + /* + * Take LCP down if the peer is sending too many bogons. + * We don't want to do this for a single or just a few + * instances since it could just be due to packet corruption. + */ + lcp_close(pcb, "Too many MPPE errors"); + } + return ERR_BUF; +} + +#endif /* PPP_SUPPORT && MPPE_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.c index 62014e8..9153dea 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/multilink.c @@ -1,609 +1,609 @@ -/* - * multilink.c - support routines for multilink. - * - * Copyright (c) 2000-2002 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && defined(HAVE_MULTILINK) /* don't build if not configured for use in lwipopts.h */ - -/* Multilink support - * - * Multilink uses Samba TDB (Trivial Database Library), which - * we cannot port, because it needs a filesystem. - * - * We have to choose between doing a memory-shared TDB-clone, - * or dropping multilink support at all. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/lcp.h" -#include "netif/ppp/tdb.h" - -bool endpoint_specified; /* user gave explicit endpoint discriminator */ -char *bundle_id; /* identifier for our bundle */ -char *blinks_id; /* key for the list of links */ -bool doing_multilink; /* multilink was enabled and agreed to */ -bool multilink_master; /* we own the multilink bundle */ - -extern TDB_CONTEXT *pppdb; -extern char db_key[]; - -static void make_bundle_links (int append); -static void remove_bundle_link (void); -static void iterate_bundle_links (void (*func) (char *)); - -static int get_default_epdisc (struct epdisc *); -static int parse_num (char *str, const char *key, int *valp); -static int owns_unit (TDB_DATA pid, int unit); - -#define set_ip_epdisc(ep, addr) do { \ - ep->length = 4; \ - ep->value[0] = addr >> 24; \ - ep->value[1] = addr >> 16; \ - ep->value[2] = addr >> 8; \ - ep->value[3] = addr; \ -} while (0) - -#define LOCAL_IP_ADDR(addr) \ - (((addr) & 0xff000000) == 0x0a000000 /* 10.x.x.x */ \ - || ((addr) & 0xfff00000) == 0xac100000 /* 172.16.x.x */ \ - || ((addr) & 0xffff0000) == 0xc0a80000) /* 192.168.x.x */ - -#define process_exists(n) (kill((n), 0) == 0 || errno != ESRCH) - -void -mp_check_options() -{ - lcp_options *wo = &lcp_wantoptions[0]; - lcp_options *ao = &lcp_allowoptions[0]; - - doing_multilink = 0; - if (!multilink) - return; - /* if we're doing multilink, we have to negotiate MRRU */ - if (!wo->neg_mrru) { - /* mrru not specified, default to mru */ - wo->mrru = wo->mru; - wo->neg_mrru = 1; - } - ao->mrru = ao->mru; - ao->neg_mrru = 1; - - if (!wo->neg_endpoint && !noendpoint) { - /* get a default endpoint value */ - wo->neg_endpoint = get_default_epdisc(&wo->endpoint); - } -} - -/* - * Make a new bundle or join us to an existing bundle - * if we are doing multilink. - */ -int -mp_join_bundle() -{ - lcp_options *go = &lcp_gotoptions[0]; - lcp_options *ho = &lcp_hisoptions[0]; - lcp_options *ao = &lcp_allowoptions[0]; - int unit, pppd_pid; - int l, mtu; - char *p; - TDB_DATA key, pid, rec; - - if (doing_multilink) { - /* have previously joined a bundle */ - if (!go->neg_mrru || !ho->neg_mrru) { - notice("oops, didn't get multilink on renegotiation"); - lcp_close(pcb, "multilink required"); - return 0; - } - /* XXX should check the peer_authname and ho->endpoint - are the same as previously */ - return 0; - } - - if (!go->neg_mrru || !ho->neg_mrru) { - /* not doing multilink */ - if (go->neg_mrru) - notice("oops, multilink negotiated only for receive"); - mtu = ho->neg_mru? ho->mru: PPP_MRU; - if (mtu > ao->mru) - mtu = ao->mru; - if (demand) { - /* already have a bundle */ - cfg_bundle(0, 0, 0, 0); - netif_set_mtu(pcb, mtu); - return 0; - } - make_new_bundle(0, 0, 0, 0); - set_ifunit(1); - netif_set_mtu(pcb, mtu); - return 0; - } - - doing_multilink = 1; - - /* - * Find the appropriate bundle or join a new one. - * First we make up a name for the bundle. - * The length estimate is worst-case assuming every - * character has to be quoted. - */ - l = 4 * strlen(peer_authname) + 10; - if (ho->neg_endpoint) - l += 3 * ho->endpoint.length + 8; - if (bundle_name) - l += 3 * strlen(bundle_name) + 2; - bundle_id = malloc(l); - if (bundle_id == 0) - novm("bundle identifier"); - - p = bundle_id; - p += slprintf(p, l-1, "BUNDLE=\"%q\"", peer_authname); - if (ho->neg_endpoint || bundle_name) - *p++ = '/'; - if (ho->neg_endpoint) - p += slprintf(p, bundle_id+l-p, "%s", - epdisc_to_str(&ho->endpoint)); - if (bundle_name) - p += slprintf(p, bundle_id+l-p, "/%v", bundle_name); - - /* Make the key for the list of links belonging to the bundle */ - l = p - bundle_id; - blinks_id = malloc(l + 7); - if (blinks_id == NULL) - novm("bundle links key"); - slprintf(blinks_id, l + 7, "BUNDLE_LINKS=%s", bundle_id + 7); - - /* - * For demand mode, we only need to configure the bundle - * and attach the link. - */ - mtu = LWIP_MIN(ho->mrru, ao->mru); - if (demand) { - cfg_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); - netif_set_mtu(pcb, mtu); - script_setenv("BUNDLE", bundle_id + 7, 1); - return 0; - } - - /* - * Check if the bundle ID is already in the database. - */ - unit = -1; - lock_db(); - key.dptr = bundle_id; - key.dsize = p - bundle_id; - pid = tdb_fetch(pppdb, key); - if (pid.dptr != NULL) { - /* bundle ID exists, see if the pppd record exists */ - rec = tdb_fetch(pppdb, pid); - if (rec.dptr != NULL && rec.dsize > 0) { - /* make sure the string is null-terminated */ - rec.dptr[rec.dsize-1] = 0; - /* parse the interface number */ - parse_num(rec.dptr, "IFNAME=ppp", &unit); - /* check the pid value */ - if (!parse_num(rec.dptr, "PPPD_PID=", &pppd_pid) - || !process_exists(pppd_pid) - || !owns_unit(pid, unit)) - unit = -1; - free(rec.dptr); - } - free(pid.dptr); - } - - if (unit >= 0) { - /* attach to existing unit */ - if (bundle_attach(unit)) { - set_ifunit(0); - script_setenv("BUNDLE", bundle_id + 7, 0); - make_bundle_links(1); - unlock_db(); - info("Link attached to %s", ifname); - return 1; - } - /* attach failed because bundle doesn't exist */ - } - - /* we have to make a new bundle */ - make_new_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); - set_ifunit(1); - netif_set_mtu(pcb, mtu); - script_setenv("BUNDLE", bundle_id + 7, 1); - make_bundle_links(pcb); - unlock_db(); - info("New bundle %s created", ifname); - multilink_master = 1; - return 0; -} - -void mp_exit_bundle() -{ - lock_db(); - remove_bundle_link(); - unlock_db(); -} - -static void sendhup(char *str) -{ - int pid; - - if (parse_num(str, "PPPD_PID=", &pid) && pid != getpid()) { - if (debug) - dbglog("sending SIGHUP to process %d", pid); - kill(pid, SIGHUP); - } -} - -void mp_bundle_terminated() -{ - TDB_DATA key; - - bundle_terminating = 1; - upper_layers_down(pcb); - notice("Connection terminated."); -#if PPP_STATS_SUPPORT - print_link_stats(); -#endif /* PPP_STATS_SUPPORT */ - if (!demand) { - remove_pidfiles(); - script_unsetenv("IFNAME"); - } - - lock_db(); - destroy_bundle(); - iterate_bundle_links(sendhup); - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - tdb_delete(pppdb, key); - unlock_db(); - - new_phase(PPP_PHASE_DEAD); - - doing_multilink = 0; - multilink_master = 0; -} - -static void make_bundle_links(int append) -{ - TDB_DATA key, rec; - char *p; - char entry[32]; - int l; - - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - slprintf(entry, sizeof(entry), "%s;", db_key); - p = entry; - if (append) { - rec = tdb_fetch(pppdb, key); - if (rec.dptr != NULL && rec.dsize > 0) { - rec.dptr[rec.dsize-1] = 0; - if (strstr(rec.dptr, db_key) != NULL) { - /* already in there? strange */ - warn("link entry already exists in tdb"); - return; - } - l = rec.dsize + strlen(entry); - p = malloc(l); - if (p == NULL) - novm("bundle link list"); - slprintf(p, l, "%s%s", rec.dptr, entry); - } else { - warn("bundle link list not found"); - } - if (rec.dptr != NULL) - free(rec.dptr); - } - rec.dptr = p; - rec.dsize = strlen(p) + 1; - if (tdb_store(pppdb, key, rec, TDB_REPLACE)) - error("couldn't %s bundle link list", - append? "update": "create"); - if (p != entry) - free(p); -} - -static void remove_bundle_link() -{ - TDB_DATA key, rec; - char entry[32]; - char *p, *q; - int l; - - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - slprintf(entry, sizeof(entry), "%s;", db_key); - - rec = tdb_fetch(pppdb, key); - if (rec.dptr == NULL || rec.dsize <= 0) { - if (rec.dptr != NULL) - free(rec.dptr); - return; - } - rec.dptr[rec.dsize-1] = 0; - p = strstr(rec.dptr, entry); - if (p != NULL) { - q = p + strlen(entry); - l = strlen(q) + 1; - memmove(p, q, l); - rec.dsize = p - rec.dptr + l; - if (tdb_store(pppdb, key, rec, TDB_REPLACE)) - error("couldn't update bundle link list (removal)"); - } - free(rec.dptr); -} - -static void iterate_bundle_links(void (*func)(char *)) -{ - TDB_DATA key, rec, pp; - char *p, *q; - - key.dptr = blinks_id; - key.dsize = strlen(blinks_id); - rec = tdb_fetch(pppdb, key); - if (rec.dptr == NULL || rec.dsize <= 0) { - error("bundle link list not found (iterating list)"); - if (rec.dptr != NULL) - free(rec.dptr); - return; - } - p = rec.dptr; - p[rec.dsize-1] = 0; - while ((q = strchr(p, ';')) != NULL) { - *q = 0; - key.dptr = p; - key.dsize = q - p; - pp = tdb_fetch(pppdb, key); - if (pp.dptr != NULL && pp.dsize > 0) { - pp.dptr[pp.dsize-1] = 0; - func(pp.dptr); - } - if (pp.dptr != NULL) - free(pp.dptr); - p = q + 1; - } - free(rec.dptr); -} - -static int -parse_num(str, key, valp) - char *str; - const char *key; - int *valp; -{ - char *p, *endp; - int i; - - p = strstr(str, key); - if (p != 0) { - p += strlen(key); - i = strtol(p, &endp, 10); - if (endp != p && (*endp == 0 || *endp == ';')) { - *valp = i; - return 1; - } - } - return 0; -} - -/* - * Check whether the pppd identified by `key' still owns ppp unit `unit'. - */ -static int -owns_unit(key, unit) - TDB_DATA key; - int unit; -{ - char ifkey[32]; - TDB_DATA kd, vd; - int ret = 0; - - slprintf(ifkey, sizeof(ifkey), "IFNAME=ppp%d", unit); - kd.dptr = ifkey; - kd.dsize = strlen(ifkey); - vd = tdb_fetch(pppdb, kd); - if (vd.dptr != NULL) { - ret = vd.dsize == key.dsize - && memcmp(vd.dptr, key.dptr, vd.dsize) == 0; - free(vd.dptr); - } - return ret; -} - -static int -get_default_epdisc(ep) - struct epdisc *ep; -{ - char *p; - struct hostent *hp; - u32_t addr; - - /* First try for an ethernet MAC address */ - p = get_first_ethernet(); - if (p != 0 && get_if_hwaddr(ep->value, p) >= 0) { - ep->class = EPD_MAC; - ep->length = 6; - return 1; - } - - /* see if our hostname corresponds to a reasonable IP address */ - hp = gethostbyname(hostname); - if (hp != NULL) { - addr = *(u32_t *)hp->h_addr; - if (!bad_ip_adrs(addr)) { - addr = lwip_ntohl(addr); - if (!LOCAL_IP_ADDR(addr)) { - ep->class = EPD_IP; - set_ip_epdisc(ep, addr); - return 1; - } - } - } - - return 0; -} - -/* - * epdisc_to_str - make a printable string from an endpoint discriminator. - */ - -static char *endp_class_names[] = { - "null", "local", "IP", "MAC", "magic", "phone" -}; - -char * -epdisc_to_str(ep) - struct epdisc *ep; -{ - static char str[MAX_ENDP_LEN*3+8]; - u_char *p = ep->value; - int i, mask = 0; - char *q, c, c2; - - if (ep->class == EPD_NULL && ep->length == 0) - return "null"; - if (ep->class == EPD_IP && ep->length == 4) { - u32_t addr; - - GETLONG(addr, p); - slprintf(str, sizeof(str), "IP:%I", lwip_htonl(addr)); - return str; - } - - c = ':'; - c2 = '.'; - if (ep->class == EPD_MAC && ep->length == 6) - c2 = ':'; - else if (ep->class == EPD_MAGIC && (ep->length % 4) == 0) - mask = 3; - q = str; - if (ep->class <= EPD_PHONENUM) - q += slprintf(q, sizeof(str)-1, "%s", - endp_class_names[ep->class]); - else - q += slprintf(q, sizeof(str)-1, "%d", ep->class); - c = ':'; - for (i = 0; i < ep->length && i < MAX_ENDP_LEN; ++i) { - if ((i & mask) == 0) { - *q++ = c; - c = c2; - } - q += slprintf(q, str + sizeof(str) - q, "%.2x", ep->value[i]); - } - return str; -} - -static int hexc_val(int c) -{ - if (c >= 'a') - return c - 'a' + 10; - if (c >= 'A') - return c - 'A' + 10; - return c - '0'; -} - -int -str_to_epdisc(ep, str) - struct epdisc *ep; - char *str; -{ - int i, l; - char *p, *endp; - - for (i = EPD_NULL; i <= EPD_PHONENUM; ++i) { - int sl = strlen(endp_class_names[i]); - if (strncasecmp(str, endp_class_names[i], sl) == 0) { - str += sl; - break; - } - } - if (i > EPD_PHONENUM) { - /* not a class name, try a decimal class number */ - i = strtol(str, &endp, 10); - if (endp == str) - return 0; /* can't parse class number */ - str = endp; - } - ep->class = i; - if (*str == 0) { - ep->length = 0; - return 1; - } - if (*str != ':' && *str != '.') - return 0; - ++str; - - if (i == EPD_IP) { - u32_t addr; - i = parse_dotted_ip(str, &addr); - if (i == 0 || str[i] != 0) - return 0; - set_ip_epdisc(ep, addr); - return 1; - } - if (i == EPD_MAC && get_if_hwaddr(ep->value, str) >= 0) { - ep->length = 6; - return 1; - } - - p = str; - for (l = 0; l < MAX_ENDP_LEN; ++l) { - if (*str == 0) - break; - if (p <= str) - for (p = str; isxdigit(*p); ++p) - ; - i = p - str; - if (i == 0) - return 0; - ep->value[l] = hexc_val(*str++); - if ((i & 1) == 0) - ep->value[l] = (ep->value[l] << 4) + hexc_val(*str++); - if (*str == ':' || *str == '.') - ++str; - } - if (*str != 0 || (ep->class == EPD_MAC && l != 6)) - return 0; - ep->length = l; - return 1; -} - -#endif /* PPP_SUPPORT && HAVE_MULTILINK */ +/* + * multilink.c - support routines for multilink. + * + * Copyright (c) 2000-2002 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && defined(HAVE_MULTILINK) /* don't build if not configured for use in lwipopts.h */ + +/* Multilink support + * + * Multilink uses Samba TDB (Trivial Database Library), which + * we cannot port, because it needs a filesystem. + * + * We have to choose between doing a memory-shared TDB-clone, + * or dropping multilink support at all. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/lcp.h" +#include "netif/ppp/tdb.h" + +bool endpoint_specified; /* user gave explicit endpoint discriminator */ +char *bundle_id; /* identifier for our bundle */ +char *blinks_id; /* key for the list of links */ +bool doing_multilink; /* multilink was enabled and agreed to */ +bool multilink_master; /* we own the multilink bundle */ + +extern TDB_CONTEXT *pppdb; +extern char db_key[]; + +static void make_bundle_links (int append); +static void remove_bundle_link (void); +static void iterate_bundle_links (void (*func) (char *)); + +static int get_default_epdisc (struct epdisc *); +static int parse_num (char *str, const char *key, int *valp); +static int owns_unit (TDB_DATA pid, int unit); + +#define set_ip_epdisc(ep, addr) do { \ + ep->length = 4; \ + ep->value[0] = addr >> 24; \ + ep->value[1] = addr >> 16; \ + ep->value[2] = addr >> 8; \ + ep->value[3] = addr; \ +} while (0) + +#define LOCAL_IP_ADDR(addr) \ + (((addr) & 0xff000000) == 0x0a000000 /* 10.x.x.x */ \ + || ((addr) & 0xfff00000) == 0xac100000 /* 172.16.x.x */ \ + || ((addr) & 0xffff0000) == 0xc0a80000) /* 192.168.x.x */ + +#define process_exists(n) (kill((n), 0) == 0 || errno != ESRCH) + +void +mp_check_options() +{ + lcp_options *wo = &lcp_wantoptions[0]; + lcp_options *ao = &lcp_allowoptions[0]; + + doing_multilink = 0; + if (!multilink) + return; + /* if we're doing multilink, we have to negotiate MRRU */ + if (!wo->neg_mrru) { + /* mrru not specified, default to mru */ + wo->mrru = wo->mru; + wo->neg_mrru = 1; + } + ao->mrru = ao->mru; + ao->neg_mrru = 1; + + if (!wo->neg_endpoint && !noendpoint) { + /* get a default endpoint value */ + wo->neg_endpoint = get_default_epdisc(&wo->endpoint); + } +} + +/* + * Make a new bundle or join us to an existing bundle + * if we are doing multilink. + */ +int +mp_join_bundle() +{ + lcp_options *go = &lcp_gotoptions[0]; + lcp_options *ho = &lcp_hisoptions[0]; + lcp_options *ao = &lcp_allowoptions[0]; + int unit, pppd_pid; + int l, mtu; + char *p; + TDB_DATA key, pid, rec; + + if (doing_multilink) { + /* have previously joined a bundle */ + if (!go->neg_mrru || !ho->neg_mrru) { + notice("oops, didn't get multilink on renegotiation"); + lcp_close(pcb, "multilink required"); + return 0; + } + /* XXX should check the peer_authname and ho->endpoint + are the same as previously */ + return 0; + } + + if (!go->neg_mrru || !ho->neg_mrru) { + /* not doing multilink */ + if (go->neg_mrru) + notice("oops, multilink negotiated only for receive"); + mtu = ho->neg_mru? ho->mru: PPP_MRU; + if (mtu > ao->mru) + mtu = ao->mru; + if (demand) { + /* already have a bundle */ + cfg_bundle(0, 0, 0, 0); + netif_set_mtu(pcb, mtu); + return 0; + } + make_new_bundle(0, 0, 0, 0); + set_ifunit(1); + netif_set_mtu(pcb, mtu); + return 0; + } + + doing_multilink = 1; + + /* + * Find the appropriate bundle or join a new one. + * First we make up a name for the bundle. + * The length estimate is worst-case assuming every + * character has to be quoted. + */ + l = 4 * strlen(peer_authname) + 10; + if (ho->neg_endpoint) + l += 3 * ho->endpoint.length + 8; + if (bundle_name) + l += 3 * strlen(bundle_name) + 2; + bundle_id = malloc(l); + if (bundle_id == 0) + novm("bundle identifier"); + + p = bundle_id; + p += slprintf(p, l-1, "BUNDLE=\"%q\"", peer_authname); + if (ho->neg_endpoint || bundle_name) + *p++ = '/'; + if (ho->neg_endpoint) + p += slprintf(p, bundle_id+l-p, "%s", + epdisc_to_str(&ho->endpoint)); + if (bundle_name) + p += slprintf(p, bundle_id+l-p, "/%v", bundle_name); + + /* Make the key for the list of links belonging to the bundle */ + l = p - bundle_id; + blinks_id = malloc(l + 7); + if (blinks_id == NULL) + novm("bundle links key"); + slprintf(blinks_id, l + 7, "BUNDLE_LINKS=%s", bundle_id + 7); + + /* + * For demand mode, we only need to configure the bundle + * and attach the link. + */ + mtu = LWIP_MIN(ho->mrru, ao->mru); + if (demand) { + cfg_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); + netif_set_mtu(pcb, mtu); + script_setenv("BUNDLE", bundle_id + 7, 1); + return 0; + } + + /* + * Check if the bundle ID is already in the database. + */ + unit = -1; + lock_db(); + key.dptr = bundle_id; + key.dsize = p - bundle_id; + pid = tdb_fetch(pppdb, key); + if (pid.dptr != NULL) { + /* bundle ID exists, see if the pppd record exists */ + rec = tdb_fetch(pppdb, pid); + if (rec.dptr != NULL && rec.dsize > 0) { + /* make sure the string is null-terminated */ + rec.dptr[rec.dsize-1] = 0; + /* parse the interface number */ + parse_num(rec.dptr, "IFNAME=ppp", &unit); + /* check the pid value */ + if (!parse_num(rec.dptr, "PPPD_PID=", &pppd_pid) + || !process_exists(pppd_pid) + || !owns_unit(pid, unit)) + unit = -1; + free(rec.dptr); + } + free(pid.dptr); + } + + if (unit >= 0) { + /* attach to existing unit */ + if (bundle_attach(unit)) { + set_ifunit(0); + script_setenv("BUNDLE", bundle_id + 7, 0); + make_bundle_links(1); + unlock_db(); + info("Link attached to %s", ifname); + return 1; + } + /* attach failed because bundle doesn't exist */ + } + + /* we have to make a new bundle */ + make_new_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); + set_ifunit(1); + netif_set_mtu(pcb, mtu); + script_setenv("BUNDLE", bundle_id + 7, 1); + make_bundle_links(pcb); + unlock_db(); + info("New bundle %s created", ifname); + multilink_master = 1; + return 0; +} + +void mp_exit_bundle() +{ + lock_db(); + remove_bundle_link(); + unlock_db(); +} + +static void sendhup(char *str) +{ + int pid; + + if (parse_num(str, "PPPD_PID=", &pid) && pid != getpid()) { + if (debug) + dbglog("sending SIGHUP to process %d", pid); + kill(pid, SIGHUP); + } +} + +void mp_bundle_terminated() +{ + TDB_DATA key; + + bundle_terminating = 1; + upper_layers_down(pcb); + notice("Connection terminated."); +#if PPP_STATS_SUPPORT + print_link_stats(); +#endif /* PPP_STATS_SUPPORT */ + if (!demand) { + remove_pidfiles(); + script_unsetenv("IFNAME"); + } + + lock_db(); + destroy_bundle(); + iterate_bundle_links(sendhup); + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + tdb_delete(pppdb, key); + unlock_db(); + + new_phase(PPP_PHASE_DEAD); + + doing_multilink = 0; + multilink_master = 0; +} + +static void make_bundle_links(int append) +{ + TDB_DATA key, rec; + char *p; + char entry[32]; + int l; + + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + slprintf(entry, sizeof(entry), "%s;", db_key); + p = entry; + if (append) { + rec = tdb_fetch(pppdb, key); + if (rec.dptr != NULL && rec.dsize > 0) { + rec.dptr[rec.dsize-1] = 0; + if (strstr(rec.dptr, db_key) != NULL) { + /* already in there? strange */ + warn("link entry already exists in tdb"); + return; + } + l = rec.dsize + strlen(entry); + p = malloc(l); + if (p == NULL) + novm("bundle link list"); + slprintf(p, l, "%s%s", rec.dptr, entry); + } else { + warn("bundle link list not found"); + } + if (rec.dptr != NULL) + free(rec.dptr); + } + rec.dptr = p; + rec.dsize = strlen(p) + 1; + if (tdb_store(pppdb, key, rec, TDB_REPLACE)) + error("couldn't %s bundle link list", + append? "update": "create"); + if (p != entry) + free(p); +} + +static void remove_bundle_link() +{ + TDB_DATA key, rec; + char entry[32]; + char *p, *q; + int l; + + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + slprintf(entry, sizeof(entry), "%s;", db_key); + + rec = tdb_fetch(pppdb, key); + if (rec.dptr == NULL || rec.dsize <= 0) { + if (rec.dptr != NULL) + free(rec.dptr); + return; + } + rec.dptr[rec.dsize-1] = 0; + p = strstr(rec.dptr, entry); + if (p != NULL) { + q = p + strlen(entry); + l = strlen(q) + 1; + memmove(p, q, l); + rec.dsize = p - rec.dptr + l; + if (tdb_store(pppdb, key, rec, TDB_REPLACE)) + error("couldn't update bundle link list (removal)"); + } + free(rec.dptr); +} + +static void iterate_bundle_links(void (*func)(char *)) +{ + TDB_DATA key, rec, pp; + char *p, *q; + + key.dptr = blinks_id; + key.dsize = strlen(blinks_id); + rec = tdb_fetch(pppdb, key); + if (rec.dptr == NULL || rec.dsize <= 0) { + error("bundle link list not found (iterating list)"); + if (rec.dptr != NULL) + free(rec.dptr); + return; + } + p = rec.dptr; + p[rec.dsize-1] = 0; + while ((q = strchr(p, ';')) != NULL) { + *q = 0; + key.dptr = p; + key.dsize = q - p; + pp = tdb_fetch(pppdb, key); + if (pp.dptr != NULL && pp.dsize > 0) { + pp.dptr[pp.dsize-1] = 0; + func(pp.dptr); + } + if (pp.dptr != NULL) + free(pp.dptr); + p = q + 1; + } + free(rec.dptr); +} + +static int +parse_num(str, key, valp) + char *str; + const char *key; + int *valp; +{ + char *p, *endp; + int i; + + p = strstr(str, key); + if (p != 0) { + p += strlen(key); + i = strtol(p, &endp, 10); + if (endp != p && (*endp == 0 || *endp == ';')) { + *valp = i; + return 1; + } + } + return 0; +} + +/* + * Check whether the pppd identified by `key' still owns ppp unit `unit'. + */ +static int +owns_unit(key, unit) + TDB_DATA key; + int unit; +{ + char ifkey[32]; + TDB_DATA kd, vd; + int ret = 0; + + slprintf(ifkey, sizeof(ifkey), "IFNAME=ppp%d", unit); + kd.dptr = ifkey; + kd.dsize = strlen(ifkey); + vd = tdb_fetch(pppdb, kd); + if (vd.dptr != NULL) { + ret = vd.dsize == key.dsize + && memcmp(vd.dptr, key.dptr, vd.dsize) == 0; + free(vd.dptr); + } + return ret; +} + +static int +get_default_epdisc(ep) + struct epdisc *ep; +{ + char *p; + struct hostent *hp; + u32_t addr; + + /* First try for an ethernet MAC address */ + p = get_first_ethernet(); + if (p != 0 && get_if_hwaddr(ep->value, p) >= 0) { + ep->class = EPD_MAC; + ep->length = 6; + return 1; + } + + /* see if our hostname corresponds to a reasonable IP address */ + hp = gethostbyname(hostname); + if (hp != NULL) { + addr = *(u32_t *)hp->h_addr; + if (!bad_ip_adrs(addr)) { + addr = lwip_ntohl(addr); + if (!LOCAL_IP_ADDR(addr)) { + ep->class = EPD_IP; + set_ip_epdisc(ep, addr); + return 1; + } + } + } + + return 0; +} + +/* + * epdisc_to_str - make a printable string from an endpoint discriminator. + */ + +static char *endp_class_names[] = { + "null", "local", "IP", "MAC", "magic", "phone" +}; + +char * +epdisc_to_str(ep) + struct epdisc *ep; +{ + static char str[MAX_ENDP_LEN*3+8]; + u_char *p = ep->value; + int i, mask = 0; + char *q, c, c2; + + if (ep->class == EPD_NULL && ep->length == 0) + return "null"; + if (ep->class == EPD_IP && ep->length == 4) { + u32_t addr; + + GETLONG(addr, p); + slprintf(str, sizeof(str), "IP:%I", lwip_htonl(addr)); + return str; + } + + c = ':'; + c2 = '.'; + if (ep->class == EPD_MAC && ep->length == 6) + c2 = ':'; + else if (ep->class == EPD_MAGIC && (ep->length % 4) == 0) + mask = 3; + q = str; + if (ep->class <= EPD_PHONENUM) + q += slprintf(q, sizeof(str)-1, "%s", + endp_class_names[ep->class]); + else + q += slprintf(q, sizeof(str)-1, "%d", ep->class); + c = ':'; + for (i = 0; i < ep->length && i < MAX_ENDP_LEN; ++i) { + if ((i & mask) == 0) { + *q++ = c; + c = c2; + } + q += slprintf(q, str + sizeof(str) - q, "%.2x", ep->value[i]); + } + return str; +} + +static int hexc_val(int c) +{ + if (c >= 'a') + return c - 'a' + 10; + if (c >= 'A') + return c - 'A' + 10; + return c - '0'; +} + +int +str_to_epdisc(ep, str) + struct epdisc *ep; + char *str; +{ + int i, l; + char *p, *endp; + + for (i = EPD_NULL; i <= EPD_PHONENUM; ++i) { + int sl = strlen(endp_class_names[i]); + if (strncasecmp(str, endp_class_names[i], sl) == 0) { + str += sl; + break; + } + } + if (i > EPD_PHONENUM) { + /* not a class name, try a decimal class number */ + i = strtol(str, &endp, 10); + if (endp == str) + return 0; /* can't parse class number */ + str = endp; + } + ep->class = i; + if (*str == 0) { + ep->length = 0; + return 1; + } + if (*str != ':' && *str != '.') + return 0; + ++str; + + if (i == EPD_IP) { + u32_t addr; + i = parse_dotted_ip(str, &addr); + if (i == 0 || str[i] != 0) + return 0; + set_ip_epdisc(ep, addr); + return 1; + } + if (i == EPD_MAC && get_if_hwaddr(ep->value, str) >= 0) { + ep->length = 6; + return 1; + } + + p = str; + for (l = 0; l < MAX_ENDP_LEN; ++l) { + if (*str == 0) + break; + if (p <= str) + for (p = str; isxdigit(*p); ++p) + ; + i = p - str; + if (i == 0) + return 0; + ep->value[l] = hexc_val(*str++); + if ((i & 1) == 0) + ep->value[l] = (ep->value[l] << 4) + hexc_val(*str++); + if (*str == ':' || *str == '.') + ++str; + } + if (*str != 0 || (ep->class == EPD_MAC && l != 6)) + return 0; + ep->length = l; + return 1; +} + +#endif /* PPP_SUPPORT && HAVE_MULTILINK */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.c index 8b77765..e3e4298 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/ppp.c @@ -1,1647 +1,1647 @@ -/***************************************************************************** -* ppp.c - Network Point to Point Protocol program file. -* -* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. -* portions Copyright (c) 1997 by Global Election Systems Inc. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY -* -* 03-01-01 Marc Boucher -* Ported to lwIP. -* 97-11-05 Guy Lancaster , Global Election Systems Inc. -* Original. -*****************************************************************************/ - -/* - * ppp_defs.h - PPP definitions. - * - * if_pppvar.h - private structures and declarations for PPP. - * - * Copyright (c) 1994 The Australian National University. - * All rights reserved. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation is hereby granted, provided that the above copyright - * notice appears in all copies. This software is provided without any - * warranty, express or implied. The Australian National University - * makes no representations about the suitability of this software for - * any purpose. - * - * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY - * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES - * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF - * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO - * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, - * OR MODIFICATIONS. - */ - -/* - * if_ppp.h - Point-to-Point Protocol definitions. - * - * Copyright (c) 1989 Carnegie Mellon University. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by Carnegie Mellon University. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * @defgroup ppp PPP netif - * @ingroup addons - * @verbinclude "ppp.txt" - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/pbuf.h" -#include "lwip/stats.h" -#include "lwip/sys.h" -#include "lwip/tcpip.h" -#include "lwip/api.h" -#include "lwip/snmp.h" -#include "lwip/ip4.h" /* for ip4_input() */ -#if PPP_IPV6_SUPPORT -#include "lwip/ip6.h" /* for ip6_input() */ -#endif /* PPP_IPV6_SUPPORT */ -#include "lwip/dns.h" - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/pppos.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/lcp.h" -#include "netif/ppp/magic.h" - -#if PAP_SUPPORT -#include "netif/ppp/upap.h" -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT -#include "netif/ppp/chap-new.h" -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT -#include "netif/ppp/eap.h" -#endif /* EAP_SUPPORT */ -#if CCP_SUPPORT -#include "netif/ppp/ccp.h" -#endif /* CCP_SUPPORT */ -#if MPPE_SUPPORT -#include "netif/ppp/mppe.h" -#endif /* MPPE_SUPPORT */ -#if ECP_SUPPORT -#include "netif/ppp/ecp.h" -#endif /* EAP_SUPPORT */ -#if VJ_SUPPORT -#include "netif/ppp/vj.h" -#endif /* VJ_SUPPORT */ -#if PPP_IPV4_SUPPORT -#include "netif/ppp/ipcp.h" -#endif /* PPP_IPV4_SUPPORT */ -#if PPP_IPV6_SUPPORT -#include "netif/ppp/ipv6cp.h" -#endif /* PPP_IPV6_SUPPORT */ - -/*************************/ -/*** LOCAL DEFINITIONS ***/ -/*************************/ - -/* Memory pools */ -#if PPPOS_SUPPORT -LWIP_MEMPOOL_PROTOTYPE(PPPOS_PCB); -#endif -#if PPPOE_SUPPORT -LWIP_MEMPOOL_PROTOTYPE(PPPOE_IF); -#endif -#if PPPOL2TP_SUPPORT -LWIP_MEMPOOL_PROTOTYPE(PPPOL2TP_PCB); -#endif -#if LWIP_PPP_API && LWIP_MPU_COMPATIBLE -LWIP_MEMPOOL_PROTOTYPE(PPPAPI_MSG); -#endif -LWIP_MEMPOOL_DECLARE(PPP_PCB, MEMP_NUM_PPP_PCB, sizeof(ppp_pcb), "PPP_PCB") - -/* FIXME: add stats per PPP session */ -#if PPP_STATS_SUPPORT -static struct timeval start_time; /* Time when link was started. */ -static struct pppd_stats old_link_stats; -struct pppd_stats link_stats; -unsigned link_connect_time; -int link_stats_valid; -#endif /* PPP_STATS_SUPPORT */ - -/* - * PPP Data Link Layer "protocol" table. - * One entry per supported protocol. - * The last entry must be NULL. - */ -const struct protent* const protocols[] = { - &lcp_protent, -#if PAP_SUPPORT - &pap_protent, -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - &chap_protent, -#endif /* CHAP_SUPPORT */ -#if CBCP_SUPPORT - &cbcp_protent, -#endif /* CBCP_SUPPORT */ -#if PPP_IPV4_SUPPORT - &ipcp_protent, -#endif /* PPP_IPV4_SUPPORT */ -#if PPP_IPV6_SUPPORT - &ipv6cp_protent, -#endif /* PPP_IPV6_SUPPORT */ -#if CCP_SUPPORT - &ccp_protent, -#endif /* CCP_SUPPORT */ -#if ECP_SUPPORT - &ecp_protent, -#endif /* ECP_SUPPORT */ -#ifdef AT_CHANGE - &atcp_protent, -#endif /* AT_CHANGE */ -#if EAP_SUPPORT - &eap_protent, -#endif /* EAP_SUPPORT */ - NULL -}; - -/* Prototypes for procedures local to this file. */ -static void ppp_do_connect(void *arg); -static err_t ppp_netif_init_cb(struct netif *netif); -#if LWIP_IPV4 -static err_t ppp_netif_output_ip4(struct netif *netif, struct pbuf *pb, const ip4_addr_t *ipaddr); -#endif /* LWIP_IPV4 */ -#if PPP_IPV6_SUPPORT -static err_t ppp_netif_output_ip6(struct netif *netif, struct pbuf *pb, const ip6_addr_t *ipaddr); -#endif /* PPP_IPV6_SUPPORT */ -static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protocol); - -/***********************************/ -/*** PUBLIC FUNCTION DEFINITIONS ***/ -/***********************************/ -#if PPP_AUTH_SUPPORT -void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) { -#if PAP_SUPPORT - pcb->settings.refuse_pap = !(authtype & PPPAUTHTYPE_PAP); -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - pcb->settings.refuse_chap = !(authtype & PPPAUTHTYPE_CHAP); -#if MSCHAP_SUPPORT - pcb->settings.refuse_mschap = !(authtype & PPPAUTHTYPE_MSCHAP); - pcb->settings.refuse_mschap_v2 = !(authtype & PPPAUTHTYPE_MSCHAP_V2); -#endif /* MSCHAP_SUPPORT */ -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - pcb->settings.refuse_eap = !(authtype & PPPAUTHTYPE_EAP); -#endif /* EAP_SUPPORT */ - pcb->settings.user = user; - pcb->settings.passwd = passwd; -} -#endif /* PPP_AUTH_SUPPORT */ - -#if MPPE_SUPPORT -/* Set MPPE configuration */ -void ppp_set_mppe(ppp_pcb *pcb, u8_t flags) { - if (flags == PPP_MPPE_DISABLE) { - pcb->settings.require_mppe = 0; - return; - } - - pcb->settings.require_mppe = 1; - pcb->settings.refuse_mppe_stateful = !(flags & PPP_MPPE_ALLOW_STATEFUL); - pcb->settings.refuse_mppe_40 = !!(flags & PPP_MPPE_REFUSE_40); - pcb->settings.refuse_mppe_128 = !!(flags & PPP_MPPE_REFUSE_128); -} -#endif /* MPPE_SUPPORT */ - -#if PPP_NOTIFY_PHASE -void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb) { - pcb->notify_phase_cb = notify_phase_cb; - notify_phase_cb(pcb, pcb->phase, pcb->ctx_cb); -} -#endif /* PPP_NOTIFY_PHASE */ - -/* - * Initiate a PPP connection. - * - * This can only be called if PPP is in the dead phase. - * - * Holdoff is the time to wait (in seconds) before initiating - * the connection. - * - * If this port connects to a modem, the modem connection must be - * established before calling this. - */ -err_t ppp_connect(ppp_pcb *pcb, u16_t holdoff) { - if (pcb->phase != PPP_PHASE_DEAD) { - return ERR_ALREADY; - } - - PPPDEBUG(LOG_DEBUG, ("ppp_connect[%d]: holdoff=%d\n", pcb->netif->num, holdoff)); - - if (holdoff == 0) { - ppp_do_connect(pcb); - return ERR_OK; - } - - new_phase(pcb, PPP_PHASE_HOLDOFF); - sys_timeout((u32_t)(holdoff*1000), ppp_do_connect, pcb); - return ERR_OK; -} - -#if PPP_SERVER -/* - * Listen for an incoming PPP connection. - * - * This can only be called if PPP is in the dead phase. - * - * If this port connects to a modem, the modem connection must be - * established before calling this. - */ -err_t ppp_listen(ppp_pcb *pcb) { - if (pcb->phase != PPP_PHASE_DEAD) { - return ERR_ALREADY; - } - - PPPDEBUG(LOG_DEBUG, ("ppp_listen[%d]\n", pcb->netif->num)); - - if (pcb->link_cb->listen) { - new_phase(pcb, PPP_PHASE_INITIALIZE); - pcb->link_cb->listen(pcb, pcb->link_ctx_cb); - return ERR_OK; - } - return ERR_IF; -} -#endif /* PPP_SERVER */ - -/* - * Initiate the end of a PPP connection. - * Any outstanding packets in the queues are dropped. - * - * Setting nocarrier to 1 close the PPP connection without initiating the - * shutdown procedure. Always using nocarrier = 0 is still recommended, - * this is going to take a little longer time if your link is down, but - * is a safer choice for the PPP state machine. - * - * Return 0 on success, an error code on failure. - */ -err_t -ppp_close(ppp_pcb *pcb, u8_t nocarrier) -{ - pcb->err_code = PPPERR_USER; - - /* holdoff phase, cancel the reconnection */ - if (pcb->phase == PPP_PHASE_HOLDOFF) { - sys_untimeout(ppp_do_connect, pcb); - new_phase(pcb, PPP_PHASE_DEAD); - } - - /* dead phase, nothing to do, call the status callback to be consistent */ - if (pcb->phase == PPP_PHASE_DEAD) { - pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); - return ERR_OK; - } - - /* Already terminating, nothing to do */ - if (pcb->phase >= PPP_PHASE_TERMINATE) { - return ERR_INPROGRESS; - } - - /* LCP not open, close link protocol */ - if (pcb->phase < PPP_PHASE_ESTABLISH) { - new_phase(pcb, PPP_PHASE_DISCONNECT); - ppp_link_terminated(pcb); - return ERR_OK; - } - - /* - * Only accept carrier lost signal on the stable running phase in order - * to prevent changing the PPP phase FSM in transition phases. - * - * Always using nocarrier = 0 is still recommended, this is going to - * take a little longer time, but is a safer choice from FSM point of view. - */ - if (nocarrier && pcb->phase == PPP_PHASE_RUNNING) { - PPPDEBUG(LOG_DEBUG, ("ppp_close[%d]: carrier lost -> lcp_lowerdown\n", pcb->netif->num)); - lcp_lowerdown(pcb); - /* forced link termination, this will force link protocol to disconnect. */ - link_terminated(pcb); - return ERR_OK; - } - - /* Disconnect */ - PPPDEBUG(LOG_DEBUG, ("ppp_close[%d]: kill_link -> lcp_close\n", pcb->netif->num)); - /* LCP soft close request. */ - lcp_close(pcb, "User request"); - return ERR_OK; -} - -/* - * Release the control block. - * - * This can only be called if PPP is in the dead phase. - * - * You must use ppp_close() before if you wish to terminate - * an established PPP session. - * - * Return 0 on success, an error code on failure. - */ -err_t ppp_free(ppp_pcb *pcb) { - err_t err; - if (pcb->phase != PPP_PHASE_DEAD) { - return ERR_CONN; - } - - PPPDEBUG(LOG_DEBUG, ("ppp_free[%d]\n", pcb->netif->num)); - - netif_remove(pcb->netif); - - err = pcb->link_cb->free(pcb, pcb->link_ctx_cb); - - LWIP_MEMPOOL_FREE(PPP_PCB, pcb); - return err; -} - -/* Get and set parameters for the given connection. - * Return 0 on success, an error code on failure. */ -err_t -ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg) -{ - if (pcb == NULL) { - return ERR_VAL; - } - - switch(cmd) { - case PPPCTLG_UPSTATUS: /* Get the PPP up status. */ - if (!arg) { - goto fail; - } - *(int *)arg = (int)(0 -#if PPP_IPV4_SUPPORT - || pcb->if4_up -#endif /* PPP_IPV4_SUPPORT */ -#if PPP_IPV6_SUPPORT - || pcb->if6_up -#endif /* PPP_IPV6_SUPPORT */ - ); - return ERR_OK; - - case PPPCTLG_ERRCODE: /* Get the PPP error code. */ - if (!arg) { - goto fail; - } - *(int *)arg = (int)(pcb->err_code); - return ERR_OK; - - default: - goto fail; - } - -fail: - return ERR_VAL; -} - - -/**********************************/ -/*** LOCAL FUNCTION DEFINITIONS ***/ -/**********************************/ - -static void ppp_do_connect(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - - LWIP_ASSERT("pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_HOLDOFF", pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_HOLDOFF); - - new_phase(pcb, PPP_PHASE_INITIALIZE); - pcb->link_cb->connect(pcb, pcb->link_ctx_cb); -} - -/* - * ppp_netif_init_cb - netif init callback - */ -static err_t ppp_netif_init_cb(struct netif *netif) { - netif->name[0] = 'p'; - netif->name[1] = 'p'; -#if LWIP_IPV4 - /* FIXME: change that when netif_null_output_ip4() will materialize */ - netif->output = ppp_netif_output_ip4; -#endif /* LWIP_IPV4 */ -#if PPP_IPV6_SUPPORT - netif->output_ip6 = ppp_netif_output_ip6; -#endif /* PPP_IPV6_SUPPORT */ - netif->flags = NETIF_FLAG_UP; -#if LWIP_NETIF_HOSTNAME - /* @todo: Initialize interface hostname */ - /* netif_set_hostname(netif, "lwip"); */ -#endif /* LWIP_NETIF_HOSTNAME */ - return ERR_OK; -} - -#if LWIP_IPV4 -/* - * Send an IPv4 packet on the given connection. - */ -static err_t ppp_netif_output_ip4(struct netif *netif, struct pbuf *pb, const ip4_addr_t *ipaddr) { - LWIP_UNUSED_ARG(ipaddr); -#if PPP_IPV4_SUPPORT - return ppp_netif_output(netif, pb, PPP_IP); -#else /* PPP_IPV4_SUPPORT */ - LWIP_UNUSED_ARG(netif); - LWIP_UNUSED_ARG(pb); - return ERR_IF; -#endif /* PPP_IPV4_SUPPORT */ -} -#endif /* LWIP_IPV4 */ - -#if PPP_IPV6_SUPPORT -/* - * Send an IPv6 packet on the given connection. - */ -static err_t ppp_netif_output_ip6(struct netif *netif, struct pbuf *pb, const ip6_addr_t *ipaddr) { - LWIP_UNUSED_ARG(ipaddr); - return ppp_netif_output(netif, pb, PPP_IPV6); -} -#endif /* PPP_IPV6_SUPPORT */ - -static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protocol) { - ppp_pcb *pcb = (ppp_pcb*)netif->state; - err_t err; - struct pbuf *fpb = NULL; - - /* Check that the link is up. */ - if (0 -#if PPP_IPV4_SUPPORT - || (protocol == PPP_IP && !pcb->if4_up) -#endif /* PPP_IPV4_SUPPORT */ -#if PPP_IPV6_SUPPORT - || (protocol == PPP_IPV6 && !pcb->if6_up) -#endif /* PPP_IPV6_SUPPORT */ - ) { - PPPDEBUG(LOG_ERR, ("ppp_netif_output[%d]: link not up\n", pcb->netif->num)); - goto err_rte_drop; - } - -#if MPPE_SUPPORT - /* If MPPE is required, refuse any IP packet until we are able to crypt them. */ - if (pcb->settings.require_mppe && pcb->ccp_transmit_method != CI_MPPE) { - PPPDEBUG(LOG_ERR, ("ppp_netif_output[%d]: MPPE required, not up\n", pcb->netif->num)); - goto err_rte_drop; - } -#endif /* MPPE_SUPPORT */ - -#if VJ_SUPPORT - /* - * Attempt Van Jacobson header compression if VJ is configured and - * this is an IP packet. - */ - if (protocol == PPP_IP && pcb->vj_enabled) { - switch (vj_compress_tcp(&pcb->vj_comp, &pb)) { - case TYPE_IP: - /* No change... - protocol = PPP_IP; */ - break; - case TYPE_COMPRESSED_TCP: - /* vj_compress_tcp() returns a new allocated pbuf, indicate we should free - * our duplicated pbuf later */ - fpb = pb; - protocol = PPP_VJC_COMP; - break; - case TYPE_UNCOMPRESSED_TCP: - /* vj_compress_tcp() returns a new allocated pbuf, indicate we should free - * our duplicated pbuf later */ - fpb = pb; - protocol = PPP_VJC_UNCOMP; - break; - default: - PPPDEBUG(LOG_WARNING, ("ppp_netif_output[%d]: bad IP packet\n", pcb->netif->num)); - LINK_STATS_INC(link.proterr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(pcb->netif, ifoutdiscards); - return ERR_VAL; - } - } -#endif /* VJ_SUPPORT */ - -#if CCP_SUPPORT - switch (pcb->ccp_transmit_method) { - case 0: - break; /* Don't compress */ -#if MPPE_SUPPORT - case CI_MPPE: - if ((err = mppe_compress(pcb, &pcb->mppe_comp, &pb, protocol)) != ERR_OK) { - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(netif, ifoutdiscards); - goto err; - } - /* if VJ compressor returned a new allocated pbuf, free it */ - if (fpb) { - pbuf_free(fpb); - } - /* mppe_compress() returns a new allocated pbuf, indicate we should free - * our duplicated pbuf later */ - fpb = pb; - protocol = PPP_COMP; - break; -#endif /* MPPE_SUPPORT */ - default: - PPPDEBUG(LOG_ERR, ("ppp_netif_output[%d]: bad CCP transmit method\n", pcb->netif->num)); - goto err_rte_drop; /* Cannot really happen, we only negotiate what we are able to do */ - } -#endif /* CCP_SUPPORT */ - - err = pcb->link_cb->netif_output(pcb, pcb->link_ctx_cb, pb, protocol); - goto err; - -err_rte_drop: - err = ERR_RTE; - LINK_STATS_INC(link.rterr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(netif, ifoutdiscards); -err: - if (fpb) { - pbuf_free(fpb); - } - return err; -} - -/************************************/ -/*** PRIVATE FUNCTION DEFINITIONS ***/ -/************************************/ - -/* Initialize the PPP subsystem. */ -int ppp_init(void) -{ -#if PPPOS_SUPPORT - LWIP_MEMPOOL_INIT(PPPOS_PCB); -#endif -#if PPPOE_SUPPORT - LWIP_MEMPOOL_INIT(PPPOE_IF); -#endif -#if PPPOL2TP_SUPPORT - LWIP_MEMPOOL_INIT(PPPOL2TP_PCB); -#endif -#if LWIP_PPP_API && LWIP_MPU_COMPATIBLE - LWIP_MEMPOOL_INIT(PPPAPI_MSG); -#endif - - LWIP_MEMPOOL_INIT(PPP_PCB); - - /* - * Initialize magic number generator now so that protocols may - * use magic numbers in initialization. - */ - magic_init(); - - return 0; -} - -/* - * Create a new PPP control block. - * - * This initializes the PPP control block but does not - * attempt to negotiate the LCP session. - * - * Return a new PPP connection control block pointer - * on success or a null pointer on failure. - */ -ppp_pcb *ppp_new(struct netif *pppif, const struct link_callbacks *callbacks, void *link_ctx_cb, ppp_link_status_cb_fn link_status_cb, void *ctx_cb) { - ppp_pcb *pcb; - const struct protent *protp; - int i; - - /* PPP is single-threaded: without a callback, - * there is no way to know when the link is up. */ - if (link_status_cb == NULL) { - return NULL; - } - - pcb = (ppp_pcb*)LWIP_MEMPOOL_ALLOC(PPP_PCB); - if (pcb == NULL) { - return NULL; - } - - memset(pcb, 0, sizeof(ppp_pcb)); - - /* default configuration */ -#if PAP_SUPPORT - pcb->settings.pap_timeout_time = UPAP_DEFTIMEOUT; - pcb->settings.pap_max_transmits = UPAP_DEFTRANSMITS; -#if PPP_SERVER - pcb->settings.pap_req_timeout = UPAP_DEFREQTIME; -#endif /* PPP_SERVER */ -#endif /* PAP_SUPPORT */ - -#if CHAP_SUPPORT - pcb->settings.chap_timeout_time = CHAP_DEFTIMEOUT; - pcb->settings.chap_max_transmits = CHAP_DEFTRANSMITS; -#if PPP_SERVER - pcb->settings.chap_rechallenge_time = CHAP_DEFRECHALLENGETIME; -#endif /* PPP_SERVER */ -#endif /* CHAP_SUPPPORT */ - -#if EAP_SUPPORT - pcb->settings.eap_req_time = EAP_DEFREQTIME; - pcb->settings.eap_allow_req = EAP_DEFALLOWREQ; -#if PPP_SERVER - pcb->settings.eap_timeout_time = EAP_DEFTIMEOUT; - pcb->settings.eap_max_transmits = EAP_DEFTRANSMITS; -#endif /* PPP_SERVER */ -#endif /* EAP_SUPPORT */ - - pcb->settings.lcp_loopbackfail = LCP_DEFLOOPBACKFAIL; - pcb->settings.lcp_echo_interval = LCP_ECHOINTERVAL; - pcb->settings.lcp_echo_fails = LCP_MAXECHOFAILS; - - pcb->settings.fsm_timeout_time = FSM_DEFTIMEOUT; - pcb->settings.fsm_max_conf_req_transmits = FSM_DEFMAXCONFREQS; - pcb->settings.fsm_max_term_transmits = FSM_DEFMAXTERMREQS; - pcb->settings.fsm_max_nak_loops = FSM_DEFMAXNAKLOOPS; - - pcb->netif = pppif; - MIB2_INIT_NETIF(pppif, snmp_ifType_ppp, 0); - if (!netif_add(pcb->netif, -#if LWIP_IPV4 - IP4_ADDR_ANY4, IP4_ADDR_BROADCAST, IP4_ADDR_ANY4, -#endif /* LWIP_IPV4 */ - (void *)pcb, ppp_netif_init_cb, NULL)) { - LWIP_MEMPOOL_FREE(PPP_PCB, pcb); - PPPDEBUG(LOG_ERR, ("ppp_new: netif_add failed\n")); - return NULL; - } - - pcb->link_cb = callbacks; - pcb->link_ctx_cb = link_ctx_cb; - pcb->link_status_cb = link_status_cb; - pcb->ctx_cb = ctx_cb; - - /* - * Initialize each protocol. - */ - for (i = 0; (protp = protocols[i]) != NULL; ++i) { - (*protp->init)(pcb); - } - - new_phase(pcb, PPP_PHASE_DEAD); - return pcb; -} - -/** Initiate LCP open request */ -void ppp_start(ppp_pcb *pcb) { - PPPDEBUG(LOG_DEBUG, ("ppp_start[%d]\n", pcb->netif->num)); - - /* Clean data not taken care by anything else, mostly shared data. */ -#if PPP_STATS_SUPPORT - link_stats_valid = 0; -#endif /* PPP_STATS_SUPPORT */ -#if MPPE_SUPPORT - pcb->mppe_keys_set = 0; - memset(&pcb->mppe_comp, 0, sizeof(pcb->mppe_comp)); - memset(&pcb->mppe_decomp, 0, sizeof(pcb->mppe_decomp)); -#endif /* MPPE_SUPPORT */ -#if VJ_SUPPORT - vj_compress_init(&pcb->vj_comp); -#endif /* VJ_SUPPORT */ - - /* Start protocol */ - new_phase(pcb, PPP_PHASE_ESTABLISH); - lcp_open(pcb); - lcp_lowerup(pcb); - PPPDEBUG(LOG_DEBUG, ("ppp_start[%d]: finished\n", pcb->netif->num)); -} - -/** Called when link failed to setup */ -void ppp_link_failed(ppp_pcb *pcb) { - PPPDEBUG(LOG_DEBUG, ("ppp_link_failed[%d]\n", pcb->netif->num)); - new_phase(pcb, PPP_PHASE_DEAD); - pcb->err_code = PPPERR_OPEN; - pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); -} - -/** Called when link is normally down (i.e. it was asked to end) */ -void ppp_link_end(ppp_pcb *pcb) { - PPPDEBUG(LOG_DEBUG, ("ppp_link_end[%d]\n", pcb->netif->num)); - new_phase(pcb, PPP_PHASE_DEAD); - if (pcb->err_code == PPPERR_NONE) { - pcb->err_code = PPPERR_CONNECT; - } - pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); -} - -/* - * Pass the processed input packet to the appropriate handler. - * This function and all handlers run in the context of the tcpip_thread - */ -void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { - u16_t protocol; -#if PPP_DEBUG && PPP_PROTOCOLNAME - const char *pname; -#endif /* PPP_DEBUG && PPP_PROTOCOLNAME */ - - magic_randomize(); - - if (pb->len < 2) { - PPPDEBUG(LOG_ERR, ("ppp_input[%d]: packet too short\n", pcb->netif->num)); - goto drop; - } - protocol = (((u8_t *)pb->payload)[0] << 8) | ((u8_t*)pb->payload)[1]; - -#if PRINTPKT_SUPPORT - ppp_dump_packet(pcb, "rcvd", (unsigned char *)pb->payload, pb->len); -#endif /* PRINTPKT_SUPPORT */ - - pbuf_header(pb, -(s16_t)sizeof(protocol)); - - LINK_STATS_INC(link.recv); - MIB2_STATS_NETIF_INC(pcb->netif, ifinucastpkts); - MIB2_STATS_NETIF_ADD(pcb->netif, ifinoctets, pb->tot_len); - - /* - * Toss all non-LCP packets unless LCP is OPEN. - */ - if (protocol != PPP_LCP && pcb->lcp_fsm.state != PPP_FSM_OPENED) { - ppp_dbglog("Discarded non-LCP packet when LCP not open"); - goto drop; - } - - /* - * Until we get past the authentication phase, toss all packets - * except LCP, LQR and authentication packets. - */ - if (pcb->phase <= PPP_PHASE_AUTHENTICATE - && !(protocol == PPP_LCP -#if LQR_SUPPORT - || protocol == PPP_LQR -#endif /* LQR_SUPPORT */ -#if PAP_SUPPORT - || protocol == PPP_PAP -#endif /* PAP_SUPPORT */ -#if CHAP_SUPPORT - || protocol == PPP_CHAP -#endif /* CHAP_SUPPORT */ -#if EAP_SUPPORT - || protocol == PPP_EAP -#endif /* EAP_SUPPORT */ - )) { - ppp_dbglog("discarding proto 0x%x in phase %d", protocol, pcb->phase); - goto drop; - } - -#if CCP_SUPPORT -#if MPPE_SUPPORT - /* - * MPPE is required and unencrypted data has arrived (this - * should never happen!). We should probably drop the link if - * the protocol is in the range of what should be encrypted. - * At the least, we drop this packet. - */ - if (pcb->settings.require_mppe && protocol != PPP_COMP && protocol < 0x8000) { - PPPDEBUG(LOG_ERR, ("ppp_input[%d]: MPPE required, received unencrypted data!\n", pcb->netif->num)); - goto drop; - } -#endif /* MPPE_SUPPORT */ - - if (protocol == PPP_COMP) { - u8_t *pl; - - switch (pcb->ccp_receive_method) { -#if MPPE_SUPPORT - case CI_MPPE: - if (mppe_decompress(pcb, &pcb->mppe_decomp, &pb) != ERR_OK) { - goto drop; - } - break; -#endif /* MPPE_SUPPORT */ - default: - PPPDEBUG(LOG_ERR, ("ppp_input[%d]: bad CCP receive method\n", pcb->netif->num)); - goto drop; /* Cannot really happen, we only negotiate what we are able to do */ - } - - /* Assume no PFC */ - if (pb->len < 2) { - goto drop; - } - - /* Extract and hide protocol (do PFC decompression if necessary) */ - pl = (u8_t*)pb->payload; - if (pl[0] & 0x01) { - protocol = pl[0]; - pbuf_header(pb, -(s16_t)1); - } else { - protocol = (pl[0] << 8) | pl[1]; - pbuf_header(pb, -(s16_t)2); - } - } -#endif /* CCP_SUPPORT */ - - switch(protocol) { - -#if PPP_IPV4_SUPPORT - case PPP_IP: /* Internet Protocol */ - PPPDEBUG(LOG_INFO, ("ppp_input[%d]: ip in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); - ip4_input(pb, pcb->netif); - return; -#endif /* PPP_IPV4_SUPPORT */ - -#if PPP_IPV6_SUPPORT - case PPP_IPV6: /* Internet Protocol Version 6 */ - PPPDEBUG(LOG_INFO, ("ppp_input[%d]: ip6 in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); - ip6_input(pb, pcb->netif); - return; -#endif /* PPP_IPV6_SUPPORT */ - -#if VJ_SUPPORT - case PPP_VJC_COMP: /* VJ compressed TCP */ - /* - * Clip off the VJ header and prepend the rebuilt TCP/IP header and - * pass the result to IP. - */ - PPPDEBUG(LOG_INFO, ("ppp_input[%d]: vj_comp in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); - if (pcb->vj_enabled && vj_uncompress_tcp(&pb, &pcb->vj_comp) >= 0) { - ip4_input(pb, pcb->netif); - return; - } - /* Something's wrong so drop it. */ - PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping VJ compressed\n", pcb->netif->num)); - break; - - case PPP_VJC_UNCOMP: /* VJ uncompressed TCP */ - /* - * Process the TCP/IP header for VJ header compression and then pass - * the packet to IP. - */ - PPPDEBUG(LOG_INFO, ("ppp_input[%d]: vj_un in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); - if (pcb->vj_enabled && vj_uncompress_uncomp(pb, &pcb->vj_comp) >= 0) { - ip4_input(pb, pcb->netif); - return; - } - /* Something's wrong so drop it. */ - PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping VJ uncompressed\n", pcb->netif->num)); - break; -#endif /* VJ_SUPPORT */ - - default: { - int i; - const struct protent *protp; - - /* - * Upcall the proper protocol input routine. - */ - for (i = 0; (protp = protocols[i]) != NULL; ++i) { - if (protp->protocol == protocol) { - pb = ppp_singlebuf(pb); - (*protp->input)(pcb, (u8_t*)pb->payload, pb->len); - goto out; - } -#if 0 /* UNUSED - * - * This is actually a (hacked?) way for the Linux kernel to pass a data - * packet to pppd. pppd in normal condition only do signaling - * (LCP, PAP, CHAP, IPCP, ...) and does not handle any data packet at all. - * - * We don't even need this interface, which is only there because of PPP - * interface limitation between Linux kernel and pppd. For MPPE, which uses - * CCP to negotiate although it is not really a (de)compressor, we added - * ccp_resetrequest() in CCP and MPPE input data flow is calling either - * ccp_resetrequest() or lcp_close() if the issue is, respectively, non-fatal - * or fatal, this is what ccp_datainput() really do. - */ - if (protocol == (protp->protocol & ~0x8000) - && protp->datainput != NULL) { - (*protp->datainput)(pcb, pb->payload, pb->len); - goto out; - } -#endif /* UNUSED */ - } - -#if PPP_DEBUG -#if PPP_PROTOCOLNAME - pname = protocol_name(protocol); - if (pname != NULL) { - ppp_warn("Unsupported protocol '%s' (0x%x) received", pname, protocol); - } else -#endif /* PPP_PROTOCOLNAME */ - ppp_warn("Unsupported protocol 0x%x received", protocol); -#endif /* PPP_DEBUG */ - pbuf_header(pb, (s16_t)sizeof(protocol)); - lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len); - } - break; - } - -drop: - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(pcb->netif, ifindiscards); - -out: - pbuf_free(pb); -} - -/* merge a pbuf chain into one pbuf */ -struct pbuf *ppp_singlebuf(struct pbuf *p) { - struct pbuf *q, *b; - u8_t *pl; - - if(p->tot_len == p->len) { - return p; - } - - q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); - if(!q) { - PPPDEBUG(LOG_ERR, - ("ppp_singlebuf: unable to alloc new buf (%d)\n", p->tot_len)); - return p; /* live dangerously */ - } - - for(b = p, pl = (u8_t*)q->payload; b != NULL; b = b->next) { - MEMCPY(pl, b->payload, b->len); - pl += b->len; - } - - pbuf_free(p); - - return q; -} - -/* - * Write a pbuf to a ppp link, only used from PPP functions - * to send PPP packets. - * - * IPv4 and IPv6 packets from lwIP are sent, respectively, - * with ppp_netif_output_ip4() and ppp_netif_output_ip6() - * functions (which are callbacks of the netif PPP interface). - */ -err_t ppp_write(ppp_pcb *pcb, struct pbuf *p) { -#if PRINTPKT_SUPPORT - ppp_dump_packet(pcb, "sent", (unsigned char *)p->payload+2, p->len-2); -#endif /* PRINTPKT_SUPPORT */ - return pcb->link_cb->write(pcb, pcb->link_ctx_cb, p); -} - -void ppp_link_terminated(ppp_pcb *pcb) { - PPPDEBUG(LOG_DEBUG, ("ppp_link_terminated[%d]\n", pcb->netif->num)); - pcb->link_cb->disconnect(pcb, pcb->link_ctx_cb); - PPPDEBUG(LOG_DEBUG, ("ppp_link_terminated[%d]: finished.\n", pcb->netif->num)); -} - - -/************************************************************************ - * Functions called by various PPP subsystems to configure - * the PPP interface or change the PPP phase. - */ - -/* - * new_phase - signal the start of a new phase of pppd's operation. - */ -void new_phase(ppp_pcb *pcb, int p) { - pcb->phase = p; - PPPDEBUG(LOG_DEBUG, ("ppp phase changed[%d]: phase=%d\n", pcb->netif->num, pcb->phase)); -#if PPP_NOTIFY_PHASE - if (pcb->notify_phase_cb != NULL) { - pcb->notify_phase_cb(pcb, p, pcb->ctx_cb); - } -#endif /* PPP_NOTIFY_PHASE */ -} - -/* - * ppp_send_config - configure the transmit-side characteristics of - * the ppp interface. - */ -int ppp_send_config(ppp_pcb *pcb, int mtu, u32_t accm, int pcomp, int accomp) { - LWIP_UNUSED_ARG(mtu); - /* pcb->mtu = mtu; -- set correctly with netif_set_mtu */ - - if (pcb->link_cb->send_config) { - pcb->link_cb->send_config(pcb, pcb->link_ctx_cb, accm, pcomp, accomp); - } - - PPPDEBUG(LOG_INFO, ("ppp_send_config[%d]\n", pcb->netif->num) ); - return 0; -} - -/* - * ppp_recv_config - configure the receive-side characteristics of - * the ppp interface. - */ -int ppp_recv_config(ppp_pcb *pcb, int mru, u32_t accm, int pcomp, int accomp) { - LWIP_UNUSED_ARG(mru); - - if (pcb->link_cb->recv_config) { - pcb->link_cb->recv_config(pcb, pcb->link_ctx_cb, accm, pcomp, accomp); - } - - PPPDEBUG(LOG_INFO, ("ppp_recv_config[%d]\n", pcb->netif->num)); - return 0; -} - -#if PPP_IPV4_SUPPORT -/* - * sifaddr - Config the interface IP addresses and netmask. - */ -int sifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr, u32_t netmask) { - ip4_addr_t ip, nm, gw; - - ip4_addr_set_u32(&ip, our_adr); - ip4_addr_set_u32(&nm, netmask); - ip4_addr_set_u32(&gw, his_adr); - netif_set_addr(pcb->netif, &ip, &nm, &gw); - return 1; -} - -/******************************************************************** - * - * cifaddr - Clear the interface IP addresses, and delete routes - * through the interface if possible. - */ -int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr) { - LWIP_UNUSED_ARG(our_adr); - LWIP_UNUSED_ARG(his_adr); - - netif_set_addr(pcb->netif, IP4_ADDR_ANY4, IP4_ADDR_BROADCAST, IP4_ADDR_ANY4); - return 1; -} - -#if 0 /* UNUSED - PROXY ARP */ -/******************************************************************** - * - * sifproxyarp - Make a proxy ARP entry for the peer. - */ - -int sifproxyarp(ppp_pcb *pcb, u32_t his_adr) { - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(his_adr); - return 0; -} - -/******************************************************************** - * - * cifproxyarp - Delete the proxy ARP entry for the peer. - */ - -int cifproxyarp(ppp_pcb *pcb, u32_t his_adr) { - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(his_adr); - return 0; -} -#endif /* UNUSED - PROXY ARP */ - -#if LWIP_DNS -/* - * sdns - Config the DNS servers - */ -int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) { - ip_addr_t ns; - LWIP_UNUSED_ARG(pcb); - - ip_addr_set_ip4_u32(&ns, ns1); - dns_setserver(0, &ns); - ip_addr_set_ip4_u32(&ns, ns2); - dns_setserver(1, &ns); - return 1; -} - -/******************************************************************** - * - * cdns - Clear the DNS servers - */ -int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) { - const ip_addr_t *nsa; - ip_addr_t nsb; - LWIP_UNUSED_ARG(pcb); - - nsa = dns_getserver(0); - ip_addr_set_ip4_u32(&nsb, ns1); - if (ip_addr_cmp(nsa, &nsb)) { - dns_setserver(0, IP_ADDR_ANY); - } - nsa = dns_getserver(1); - ip_addr_set_ip4_u32(&nsb, ns2); - if (ip_addr_cmp(nsa, &nsb)) { - dns_setserver(1, IP_ADDR_ANY); - } - return 1; -} -#endif /* LWIP_DNS */ - -#if VJ_SUPPORT -/******************************************************************** - * - * sifvjcomp - config tcp header compression - */ -int sifvjcomp(ppp_pcb *pcb, int vjcomp, int cidcomp, int maxcid) { - pcb->vj_enabled = vjcomp; - pcb->vj_comp.compressSlot = cidcomp; - pcb->vj_comp.maxSlotIndex = maxcid; - PPPDEBUG(LOG_INFO, ("sifvjcomp[%d]: VJ compress enable=%d slot=%d max slot=%d\n", - pcb->netif->num, vjcomp, cidcomp, maxcid)); - return 0; -} -#endif /* VJ_SUPPORT */ - -/* - * sifup - Config the interface up and enable IP packets to pass. - */ -int sifup(ppp_pcb *pcb) { - pcb->if4_up = 1; - pcb->err_code = PPPERR_NONE; - netif_set_link_up(pcb->netif); - - PPPDEBUG(LOG_DEBUG, ("sifup[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); - pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); - return 1; -} - -/******************************************************************** - * - * sifdown - Disable the indicated protocol and config the interface - * down if there are no remaining protocols. - */ -int sifdown(ppp_pcb *pcb) { - - pcb->if4_up = 0; - - if (1 -#if PPP_IPV6_SUPPORT - /* set the interface down if IPv6 is down as well */ - && !pcb->if6_up -#endif /* PPP_IPV6_SUPPORT */ - ) { - /* make sure the netif link callback is called */ - netif_set_link_down(pcb->netif); - } - PPPDEBUG(LOG_DEBUG, ("sifdown[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); - return 1; -} - -/******************************************************************** - * - * Return user specified netmask, modified by any mask we might determine - * for address `addr' (in network byte order). - * Here we scan through the system's list of interfaces, looking for - * any non-point-to-point interfaces which might appear to be on the same - * network as `addr'. If we find any, we OR in their netmask to the - * user-specified netmask. - */ -u32_t get_mask(u32_t addr) { -#if 0 - u32_t mask, nmask; - - addr = lwip_htonl(addr); - if (IP_CLASSA(addr)) { /* determine network mask for address class */ - nmask = IP_CLASSA_NET; - } else if (IP_CLASSB(addr)) { - nmask = IP_CLASSB_NET; - } else { - nmask = IP_CLASSC_NET; - } - - /* class D nets are disallowed by bad_ip_adrs */ - mask = PP_HTONL(0xffffff00UL) | lwip_htonl(nmask); - - /* XXX - * Scan through the system's network interfaces. - * Get each netmask and OR them into our mask. - */ - /* return mask; */ - return mask; -#endif /* 0 */ - LWIP_UNUSED_ARG(addr); - return IPADDR_BROADCAST; -} -#endif /* PPP_IPV4_SUPPORT */ - -#if PPP_IPV6_SUPPORT -#define IN6_LLADDR_FROM_EUI64(ip6, eui64) do { \ - ip6.addr[0] = PP_HTONL(0xfe800000); \ - ip6.addr[1] = 0; \ - eui64_copy(eui64, ip6.addr[2]); \ - } while (0) - -/******************************************************************** - * - * sif6addr - Config the interface with an IPv6 link-local address - */ -int sif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) { - ip6_addr_t ip6; - LWIP_UNUSED_ARG(his_eui64); - - IN6_LLADDR_FROM_EUI64(ip6, our_eui64); - netif_ip6_addr_set(pcb->netif, 0, &ip6); - netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_PREFERRED); - /* FIXME: should we add an IPv6 static neighbor using his_eui64 ? */ - return 1; -} - -/******************************************************************** - * - * cif6addr - Remove IPv6 address from interface - */ -int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) { - LWIP_UNUSED_ARG(our_eui64); - LWIP_UNUSED_ARG(his_eui64); - - netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6); - netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_INVALID); - return 1; -} - -/* - * sif6up - Config the interface up and enable IPv6 packets to pass. - */ -int sif6up(ppp_pcb *pcb) { - - pcb->if6_up = 1; - pcb->err_code = PPPERR_NONE; - netif_set_link_up(pcb->netif); - - PPPDEBUG(LOG_DEBUG, ("sif6up[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); - pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); - return 1; -} - -/******************************************************************** - * - * sif6down - Disable the indicated protocol and config the interface - * down if there are no remaining protocols. - */ -int sif6down(ppp_pcb *pcb) { - - pcb->if6_up = 0; - - if (1 -#if PPP_IPV4_SUPPORT - /* set the interface down if IPv4 is down as well */ - && !pcb->if4_up -#endif /* PPP_IPV4_SUPPORT */ - ) { - /* make sure the netif link callback is called */ - netif_set_link_down(pcb->netif); - } - PPPDEBUG(LOG_DEBUG, ("sif6down[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); - return 1; -} -#endif /* PPP_IPV6_SUPPORT */ - -#if DEMAND_SUPPORT -/* - * sifnpmode - Set the mode for handling packets for a given NP. - */ -int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode) { - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(proto); - LWIP_UNUSED_ARG(mode); - return 0; -} -#endif /* DEMAND_SUPPORT */ - -/* - * netif_set_mtu - set the MTU on the PPP network interface. - */ -void netif_set_mtu(ppp_pcb *pcb, int mtu) { - - pcb->netif->mtu = mtu; - PPPDEBUG(LOG_INFO, ("netif_set_mtu[%d]: mtu=%d\n", pcb->netif->num, mtu)); -} - -/* - * netif_get_mtu - get PPP interface MTU - */ -int netif_get_mtu(ppp_pcb *pcb) { - - return pcb->netif->mtu; -} - -#if CCP_SUPPORT -#if 0 /* unused */ -/* - * ccp_test - whether a given compression method is acceptable for use. - */ -int -ccp_test(ppp_pcb *pcb, u_char *opt_ptr, int opt_len, int for_transmit) -{ - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(opt_ptr); - LWIP_UNUSED_ARG(opt_len); - LWIP_UNUSED_ARG(for_transmit); - return -1; -} -#endif /* unused */ - -/* - * ccp_set - inform about the current state of CCP. - */ -void -ccp_set(ppp_pcb *pcb, u8_t isopen, u8_t isup, u8_t receive_method, u8_t transmit_method) -{ - LWIP_UNUSED_ARG(isopen); - LWIP_UNUSED_ARG(isup); - pcb->ccp_receive_method = receive_method; - pcb->ccp_transmit_method = transmit_method; - PPPDEBUG(LOG_DEBUG, ("ccp_set[%d]: is_open=%d, is_up=%d, receive_method=%u, transmit_method=%u\n", - pcb->netif->num, isopen, isup, receive_method, transmit_method)); -} - -void -ccp_reset_comp(ppp_pcb *pcb) -{ - switch (pcb->ccp_transmit_method) { -#if MPPE_SUPPORT - case CI_MPPE: - mppe_comp_reset(pcb, &pcb->mppe_comp); - break; -#endif /* MPPE_SUPPORT */ - default: - break; - } -} - -void -ccp_reset_decomp(ppp_pcb *pcb) -{ - switch (pcb->ccp_receive_method) { -#if MPPE_SUPPORT - case CI_MPPE: - mppe_decomp_reset(pcb, &pcb->mppe_decomp); - break; -#endif /* MPPE_SUPPORT */ - default: - break; - } -} - -#if 0 /* unused */ -/* - * ccp_fatal_error - returns 1 if decompression was disabled as a - * result of an error detected after decompression of a packet, - * 0 otherwise. This is necessary because of patent nonsense. - */ -int -ccp_fatal_error(ppp_pcb *pcb) -{ - LWIP_UNUSED_ARG(pcb); - return 1; -} -#endif /* unused */ -#endif /* CCP_SUPPORT */ - -#if PPP_IDLETIMELIMIT -/******************************************************************** - * - * get_idle_time - return how long the link has been idle. - */ -int get_idle_time(ppp_pcb *pcb, struct ppp_idle *ip) { - /* FIXME: add idle time support and make it optional */ - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(ip); - return 1; -} -#endif /* PPP_IDLETIMELIMIT */ - -#if DEMAND_SUPPORT -/******************************************************************** - * - * get_loop_output - get outgoing packets from the ppp device, - * and detect when we want to bring the real link up. - * Return value is 1 if we need to bring up the link, 0 otherwise. - */ -int get_loop_output(void) { - return 0; -} -#endif /* DEMAND_SUPPORT */ - -#if PPP_PROTOCOLNAME -/* List of protocol names, to make our messages a little more informative. */ -struct protocol_list { - u_short proto; - const char *name; -} const protocol_list[] = { - { 0x21, "IP" }, - { 0x23, "OSI Network Layer" }, - { 0x25, "Xerox NS IDP" }, - { 0x27, "DECnet Phase IV" }, - { 0x29, "Appletalk" }, - { 0x2b, "Novell IPX" }, - { 0x2d, "VJ compressed TCP/IP" }, - { 0x2f, "VJ uncompressed TCP/IP" }, - { 0x31, "Bridging PDU" }, - { 0x33, "Stream Protocol ST-II" }, - { 0x35, "Banyan Vines" }, - { 0x39, "AppleTalk EDDP" }, - { 0x3b, "AppleTalk SmartBuffered" }, - { 0x3d, "Multi-Link" }, - { 0x3f, "NETBIOS Framing" }, - { 0x41, "Cisco Systems" }, - { 0x43, "Ascom Timeplex" }, - { 0x45, "Fujitsu Link Backup and Load Balancing (LBLB)" }, - { 0x47, "DCA Remote Lan" }, - { 0x49, "Serial Data Transport Protocol (PPP-SDTP)" }, - { 0x4b, "SNA over 802.2" }, - { 0x4d, "SNA" }, - { 0x4f, "IP6 Header Compression" }, - { 0x51, "KNX Bridging Data" }, - { 0x53, "Encryption" }, - { 0x55, "Individual Link Encryption" }, - { 0x57, "IPv6" }, - { 0x59, "PPP Muxing" }, - { 0x5b, "Vendor-Specific Network Protocol" }, - { 0x61, "RTP IPHC Full Header" }, - { 0x63, "RTP IPHC Compressed TCP" }, - { 0x65, "RTP IPHC Compressed non-TCP" }, - { 0x67, "RTP IPHC Compressed UDP 8" }, - { 0x69, "RTP IPHC Compressed RTP 8" }, - { 0x6f, "Stampede Bridging" }, - { 0x73, "MP+" }, - { 0xc1, "NTCITS IPI" }, - { 0xfb, "single-link compression" }, - { 0xfd, "Compressed Datagram" }, - { 0x0201, "802.1d Hello Packets" }, - { 0x0203, "IBM Source Routing BPDU" }, - { 0x0205, "DEC LANBridge100 Spanning Tree" }, - { 0x0207, "Cisco Discovery Protocol" }, - { 0x0209, "Netcs Twin Routing" }, - { 0x020b, "STP - Scheduled Transfer Protocol" }, - { 0x020d, "EDP - Extreme Discovery Protocol" }, - { 0x0211, "Optical Supervisory Channel Protocol" }, - { 0x0213, "Optical Supervisory Channel Protocol" }, - { 0x0231, "Luxcom" }, - { 0x0233, "Sigma Network Systems" }, - { 0x0235, "Apple Client Server Protocol" }, - { 0x0281, "MPLS Unicast" }, - { 0x0283, "MPLS Multicast" }, - { 0x0285, "IEEE p1284.4 standard - data packets" }, - { 0x0287, "ETSI TETRA Network Protocol Type 1" }, - { 0x0289, "Multichannel Flow Treatment Protocol" }, - { 0x2063, "RTP IPHC Compressed TCP No Delta" }, - { 0x2065, "RTP IPHC Context State" }, - { 0x2067, "RTP IPHC Compressed UDP 16" }, - { 0x2069, "RTP IPHC Compressed RTP 16" }, - { 0x4001, "Cray Communications Control Protocol" }, - { 0x4003, "CDPD Mobile Network Registration Protocol" }, - { 0x4005, "Expand accelerator protocol" }, - { 0x4007, "ODSICP NCP" }, - { 0x4009, "DOCSIS DLL" }, - { 0x400B, "Cetacean Network Detection Protocol" }, - { 0x4021, "Stacker LZS" }, - { 0x4023, "RefTek Protocol" }, - { 0x4025, "Fibre Channel" }, - { 0x4027, "EMIT Protocols" }, - { 0x405b, "Vendor-Specific Protocol (VSP)" }, - { 0x8021, "Internet Protocol Control Protocol" }, - { 0x8023, "OSI Network Layer Control Protocol" }, - { 0x8025, "Xerox NS IDP Control Protocol" }, - { 0x8027, "DECnet Phase IV Control Protocol" }, - { 0x8029, "Appletalk Control Protocol" }, - { 0x802b, "Novell IPX Control Protocol" }, - { 0x8031, "Bridging NCP" }, - { 0x8033, "Stream Protocol Control Protocol" }, - { 0x8035, "Banyan Vines Control Protocol" }, - { 0x803d, "Multi-Link Control Protocol" }, - { 0x803f, "NETBIOS Framing Control Protocol" }, - { 0x8041, "Cisco Systems Control Protocol" }, - { 0x8043, "Ascom Timeplex" }, - { 0x8045, "Fujitsu LBLB Control Protocol" }, - { 0x8047, "DCA Remote Lan Network Control Protocol (RLNCP)" }, - { 0x8049, "Serial Data Control Protocol (PPP-SDCP)" }, - { 0x804b, "SNA over 802.2 Control Protocol" }, - { 0x804d, "SNA Control Protocol" }, - { 0x804f, "IP6 Header Compression Control Protocol" }, - { 0x8051, "KNX Bridging Control Protocol" }, - { 0x8053, "Encryption Control Protocol" }, - { 0x8055, "Individual Link Encryption Control Protocol" }, - { 0x8057, "IPv6 Control Protocol" }, - { 0x8059, "PPP Muxing Control Protocol" }, - { 0x805b, "Vendor-Specific Network Control Protocol (VSNCP)" }, - { 0x806f, "Stampede Bridging Control Protocol" }, - { 0x8073, "MP+ Control Protocol" }, - { 0x80c1, "NTCITS IPI Control Protocol" }, - { 0x80fb, "Single Link Compression Control Protocol" }, - { 0x80fd, "Compression Control Protocol" }, - { 0x8207, "Cisco Discovery Protocol Control" }, - { 0x8209, "Netcs Twin Routing" }, - { 0x820b, "STP - Control Protocol" }, - { 0x820d, "EDPCP - Extreme Discovery Protocol Ctrl Prtcl" }, - { 0x8235, "Apple Client Server Protocol Control" }, - { 0x8281, "MPLSCP" }, - { 0x8285, "IEEE p1284.4 standard - Protocol Control" }, - { 0x8287, "ETSI TETRA TNP1 Control Protocol" }, - { 0x8289, "Multichannel Flow Treatment Protocol" }, - { 0xc021, "Link Control Protocol" }, - { 0xc023, "Password Authentication Protocol" }, - { 0xc025, "Link Quality Report" }, - { 0xc027, "Shiva Password Authentication Protocol" }, - { 0xc029, "CallBack Control Protocol (CBCP)" }, - { 0xc02b, "BACP Bandwidth Allocation Control Protocol" }, - { 0xc02d, "BAP" }, - { 0xc05b, "Vendor-Specific Authentication Protocol (VSAP)" }, - { 0xc081, "Container Control Protocol" }, - { 0xc223, "Challenge Handshake Authentication Protocol" }, - { 0xc225, "RSA Authentication Protocol" }, - { 0xc227, "Extensible Authentication Protocol" }, - { 0xc229, "Mitsubishi Security Info Exch Ptcl (SIEP)" }, - { 0xc26f, "Stampede Bridging Authorization Protocol" }, - { 0xc281, "Proprietary Authentication Protocol" }, - { 0xc283, "Proprietary Authentication Protocol" }, - { 0xc481, "Proprietary Node ID Authentication Protocol" }, - { 0, NULL }, -}; - -/* - * protocol_name - find a name for a PPP protocol. - */ -const char * protocol_name(int proto) { - const struct protocol_list *lp; - - for (lp = protocol_list; lp->proto != 0; ++lp) { - if (proto == lp->proto) { - return lp->name; - } - } - return NULL; -} -#endif /* PPP_PROTOCOLNAME */ - -#if PPP_STATS_SUPPORT - -/* ---- Note on PPP Stats support ---- - * - * The one willing link stats support should add the get_ppp_stats() - * to fetch statistics from lwIP. - */ - -/* - * reset_link_stats - "reset" stats when link goes up. - */ -void reset_link_stats(int u) { - if (!get_ppp_stats(u, &old_link_stats)) { - return; - } - gettimeofday(&start_time, NULL); -} - -/* - * update_link_stats - get stats at link termination. - */ -void update_link_stats(int u) { - struct timeval now; - char numbuf[32]; - - if (!get_ppp_stats(u, &link_stats) || gettimeofday(&now, NULL) < 0) { - return; - } - link_connect_time = now.tv_sec - start_time.tv_sec; - link_stats_valid = 1; - - link_stats.bytes_in -= old_link_stats.bytes_in; - link_stats.bytes_out -= old_link_stats.bytes_out; - link_stats.pkts_in -= old_link_stats.pkts_in; - link_stats.pkts_out -= old_link_stats.pkts_out; -} - -void print_link_stats() { - /* - * Print connect time and statistics. - */ - if (link_stats_valid) { - int t = (link_connect_time + 5) / 6; /* 1/10ths of minutes */ - info("Connect time %d.%d minutes.", t/10, t%10); - info("Sent %u bytes, received %u bytes.", link_stats.bytes_out, link_stats.bytes_in); - link_stats_valid = 0; - } -} -#endif /* PPP_STATS_SUPPORT */ - -#endif /* PPP_SUPPORT */ +/***************************************************************************** +* ppp.c - Network Point to Point Protocol program file. +* +* Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. +* portions Copyright (c) 1997 by Global Election Systems Inc. +* +* The authors hereby grant permission to use, copy, modify, distribute, +* and license this software and its documentation for any purpose, provided +* that existing copyright notices are retained in all copies and that this +* notice and the following disclaimer are included verbatim in any +* distributions. No written agreement, license, or royalty fee is required +* for any of the authorized uses. +* +* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +****************************************************************************** +* REVISION HISTORY +* +* 03-01-01 Marc Boucher +* Ported to lwIP. +* 97-11-05 Guy Lancaster , Global Election Systems Inc. +* Original. +*****************************************************************************/ + +/* + * ppp_defs.h - PPP definitions. + * + * if_pppvar.h - private structures and declarations for PPP. + * + * Copyright (c) 1994 The Australian National University. + * All rights reserved. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation is hereby granted, provided that the above copyright + * notice appears in all copies. This software is provided without any + * warranty, express or implied. The Australian National University + * makes no representations about the suitability of this software for + * any purpose. + * + * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY + * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF + * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO + * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, + * OR MODIFICATIONS. + */ + +/* + * if_ppp.h - Point-to-Point Protocol definitions. + * + * Copyright (c) 1989 Carnegie Mellon University. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by Carnegie Mellon University. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @defgroup ppp PPP netif + * @ingroup addons + * @verbinclude "ppp.txt" + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/pbuf.h" +#include "lwip/stats.h" +#include "lwip/sys.h" +#include "lwip/tcpip.h" +#include "lwip/api.h" +#include "lwip/snmp.h" +#include "lwip/ip4.h" /* for ip4_input() */ +#if PPP_IPV6_SUPPORT +#include "lwip/ip6.h" /* for ip6_input() */ +#endif /* PPP_IPV6_SUPPORT */ +#include "lwip/dns.h" + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/pppos.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/lcp.h" +#include "netif/ppp/magic.h" + +#if PAP_SUPPORT +#include "netif/ppp/upap.h" +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT +#include "netif/ppp/chap-new.h" +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT +#include "netif/ppp/eap.h" +#endif /* EAP_SUPPORT */ +#if CCP_SUPPORT +#include "netif/ppp/ccp.h" +#endif /* CCP_SUPPORT */ +#if MPPE_SUPPORT +#include "netif/ppp/mppe.h" +#endif /* MPPE_SUPPORT */ +#if ECP_SUPPORT +#include "netif/ppp/ecp.h" +#endif /* EAP_SUPPORT */ +#if VJ_SUPPORT +#include "netif/ppp/vj.h" +#endif /* VJ_SUPPORT */ +#if PPP_IPV4_SUPPORT +#include "netif/ppp/ipcp.h" +#endif /* PPP_IPV4_SUPPORT */ +#if PPP_IPV6_SUPPORT +#include "netif/ppp/ipv6cp.h" +#endif /* PPP_IPV6_SUPPORT */ + +/*************************/ +/*** LOCAL DEFINITIONS ***/ +/*************************/ + +/* Memory pools */ +#if PPPOS_SUPPORT +LWIP_MEMPOOL_PROTOTYPE(PPPOS_PCB); +#endif +#if PPPOE_SUPPORT +LWIP_MEMPOOL_PROTOTYPE(PPPOE_IF); +#endif +#if PPPOL2TP_SUPPORT +LWIP_MEMPOOL_PROTOTYPE(PPPOL2TP_PCB); +#endif +#if LWIP_PPP_API && LWIP_MPU_COMPATIBLE +LWIP_MEMPOOL_PROTOTYPE(PPPAPI_MSG); +#endif +LWIP_MEMPOOL_DECLARE(PPP_PCB, MEMP_NUM_PPP_PCB, sizeof(ppp_pcb), "PPP_PCB") + +/* FIXME: add stats per PPP session */ +#if PPP_STATS_SUPPORT +static struct timeval start_time; /* Time when link was started. */ +static struct pppd_stats old_link_stats; +struct pppd_stats link_stats; +unsigned link_connect_time; +int link_stats_valid; +#endif /* PPP_STATS_SUPPORT */ + +/* + * PPP Data Link Layer "protocol" table. + * One entry per supported protocol. + * The last entry must be NULL. + */ +const struct protent* const protocols[] = { + &lcp_protent, +#if PAP_SUPPORT + &pap_protent, +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + &chap_protent, +#endif /* CHAP_SUPPORT */ +#if CBCP_SUPPORT + &cbcp_protent, +#endif /* CBCP_SUPPORT */ +#if PPP_IPV4_SUPPORT + &ipcp_protent, +#endif /* PPP_IPV4_SUPPORT */ +#if PPP_IPV6_SUPPORT + &ipv6cp_protent, +#endif /* PPP_IPV6_SUPPORT */ +#if CCP_SUPPORT + &ccp_protent, +#endif /* CCP_SUPPORT */ +#if ECP_SUPPORT + &ecp_protent, +#endif /* ECP_SUPPORT */ +#ifdef AT_CHANGE + &atcp_protent, +#endif /* AT_CHANGE */ +#if EAP_SUPPORT + &eap_protent, +#endif /* EAP_SUPPORT */ + NULL +}; + +/* Prototypes for procedures local to this file. */ +static void ppp_do_connect(void *arg); +static err_t ppp_netif_init_cb(struct netif *netif); +#if LWIP_IPV4 +static err_t ppp_netif_output_ip4(struct netif *netif, struct pbuf *pb, const ip4_addr_t *ipaddr); +#endif /* LWIP_IPV4 */ +#if PPP_IPV6_SUPPORT +static err_t ppp_netif_output_ip6(struct netif *netif, struct pbuf *pb, const ip6_addr_t *ipaddr); +#endif /* PPP_IPV6_SUPPORT */ +static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protocol); + +/***********************************/ +/*** PUBLIC FUNCTION DEFINITIONS ***/ +/***********************************/ +#if PPP_AUTH_SUPPORT +void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) { +#if PAP_SUPPORT + pcb->settings.refuse_pap = !(authtype & PPPAUTHTYPE_PAP); +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + pcb->settings.refuse_chap = !(authtype & PPPAUTHTYPE_CHAP); +#if MSCHAP_SUPPORT + pcb->settings.refuse_mschap = !(authtype & PPPAUTHTYPE_MSCHAP); + pcb->settings.refuse_mschap_v2 = !(authtype & PPPAUTHTYPE_MSCHAP_V2); +#endif /* MSCHAP_SUPPORT */ +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + pcb->settings.refuse_eap = !(authtype & PPPAUTHTYPE_EAP); +#endif /* EAP_SUPPORT */ + pcb->settings.user = user; + pcb->settings.passwd = passwd; +} +#endif /* PPP_AUTH_SUPPORT */ + +#if MPPE_SUPPORT +/* Set MPPE configuration */ +void ppp_set_mppe(ppp_pcb *pcb, u8_t flags) { + if (flags == PPP_MPPE_DISABLE) { + pcb->settings.require_mppe = 0; + return; + } + + pcb->settings.require_mppe = 1; + pcb->settings.refuse_mppe_stateful = !(flags & PPP_MPPE_ALLOW_STATEFUL); + pcb->settings.refuse_mppe_40 = !!(flags & PPP_MPPE_REFUSE_40); + pcb->settings.refuse_mppe_128 = !!(flags & PPP_MPPE_REFUSE_128); +} +#endif /* MPPE_SUPPORT */ + +#if PPP_NOTIFY_PHASE +void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb) { + pcb->notify_phase_cb = notify_phase_cb; + notify_phase_cb(pcb, pcb->phase, pcb->ctx_cb); +} +#endif /* PPP_NOTIFY_PHASE */ + +/* + * Initiate a PPP connection. + * + * This can only be called if PPP is in the dead phase. + * + * Holdoff is the time to wait (in seconds) before initiating + * the connection. + * + * If this port connects to a modem, the modem connection must be + * established before calling this. + */ +err_t ppp_connect(ppp_pcb *pcb, u16_t holdoff) { + if (pcb->phase != PPP_PHASE_DEAD) { + return ERR_ALREADY; + } + + PPPDEBUG(LOG_DEBUG, ("ppp_connect[%d]: holdoff=%d\n", pcb->netif->num, holdoff)); + + if (holdoff == 0) { + ppp_do_connect(pcb); + return ERR_OK; + } + + new_phase(pcb, PPP_PHASE_HOLDOFF); + sys_timeout((u32_t)(holdoff*1000), ppp_do_connect, pcb); + return ERR_OK; +} + +#if PPP_SERVER +/* + * Listen for an incoming PPP connection. + * + * This can only be called if PPP is in the dead phase. + * + * If this port connects to a modem, the modem connection must be + * established before calling this. + */ +err_t ppp_listen(ppp_pcb *pcb) { + if (pcb->phase != PPP_PHASE_DEAD) { + return ERR_ALREADY; + } + + PPPDEBUG(LOG_DEBUG, ("ppp_listen[%d]\n", pcb->netif->num)); + + if (pcb->link_cb->listen) { + new_phase(pcb, PPP_PHASE_INITIALIZE); + pcb->link_cb->listen(pcb, pcb->link_ctx_cb); + return ERR_OK; + } + return ERR_IF; +} +#endif /* PPP_SERVER */ + +/* + * Initiate the end of a PPP connection. + * Any outstanding packets in the queues are dropped. + * + * Setting nocarrier to 1 close the PPP connection without initiating the + * shutdown procedure. Always using nocarrier = 0 is still recommended, + * this is going to take a little longer time if your link is down, but + * is a safer choice for the PPP state machine. + * + * Return 0 on success, an error code on failure. + */ +err_t +ppp_close(ppp_pcb *pcb, u8_t nocarrier) +{ + pcb->err_code = PPPERR_USER; + + /* holdoff phase, cancel the reconnection */ + if (pcb->phase == PPP_PHASE_HOLDOFF) { + sys_untimeout(ppp_do_connect, pcb); + new_phase(pcb, PPP_PHASE_DEAD); + } + + /* dead phase, nothing to do, call the status callback to be consistent */ + if (pcb->phase == PPP_PHASE_DEAD) { + pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); + return ERR_OK; + } + + /* Already terminating, nothing to do */ + if (pcb->phase >= PPP_PHASE_TERMINATE) { + return ERR_INPROGRESS; + } + + /* LCP not open, close link protocol */ + if (pcb->phase < PPP_PHASE_ESTABLISH) { + new_phase(pcb, PPP_PHASE_DISCONNECT); + ppp_link_terminated(pcb); + return ERR_OK; + } + + /* + * Only accept carrier lost signal on the stable running phase in order + * to prevent changing the PPP phase FSM in transition phases. + * + * Always using nocarrier = 0 is still recommended, this is going to + * take a little longer time, but is a safer choice from FSM point of view. + */ + if (nocarrier && pcb->phase == PPP_PHASE_RUNNING) { + PPPDEBUG(LOG_DEBUG, ("ppp_close[%d]: carrier lost -> lcp_lowerdown\n", pcb->netif->num)); + lcp_lowerdown(pcb); + /* forced link termination, this will force link protocol to disconnect. */ + link_terminated(pcb); + return ERR_OK; + } + + /* Disconnect */ + PPPDEBUG(LOG_DEBUG, ("ppp_close[%d]: kill_link -> lcp_close\n", pcb->netif->num)); + /* LCP soft close request. */ + lcp_close(pcb, "User request"); + return ERR_OK; +} + +/* + * Release the control block. + * + * This can only be called if PPP is in the dead phase. + * + * You must use ppp_close() before if you wish to terminate + * an established PPP session. + * + * Return 0 on success, an error code on failure. + */ +err_t ppp_free(ppp_pcb *pcb) { + err_t err; + if (pcb->phase != PPP_PHASE_DEAD) { + return ERR_CONN; + } + + PPPDEBUG(LOG_DEBUG, ("ppp_free[%d]\n", pcb->netif->num)); + + netif_remove(pcb->netif); + + err = pcb->link_cb->free(pcb, pcb->link_ctx_cb); + + LWIP_MEMPOOL_FREE(PPP_PCB, pcb); + return err; +} + +/* Get and set parameters for the given connection. + * Return 0 on success, an error code on failure. */ +err_t +ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg) +{ + if (pcb == NULL) { + return ERR_VAL; + } + + switch(cmd) { + case PPPCTLG_UPSTATUS: /* Get the PPP up status. */ + if (!arg) { + goto fail; + } + *(int *)arg = (int)(0 +#if PPP_IPV4_SUPPORT + || pcb->if4_up +#endif /* PPP_IPV4_SUPPORT */ +#if PPP_IPV6_SUPPORT + || pcb->if6_up +#endif /* PPP_IPV6_SUPPORT */ + ); + return ERR_OK; + + case PPPCTLG_ERRCODE: /* Get the PPP error code. */ + if (!arg) { + goto fail; + } + *(int *)arg = (int)(pcb->err_code); + return ERR_OK; + + default: + goto fail; + } + +fail: + return ERR_VAL; +} + + +/**********************************/ +/*** LOCAL FUNCTION DEFINITIONS ***/ +/**********************************/ + +static void ppp_do_connect(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + + LWIP_ASSERT("pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_HOLDOFF", pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_HOLDOFF); + + new_phase(pcb, PPP_PHASE_INITIALIZE); + pcb->link_cb->connect(pcb, pcb->link_ctx_cb); +} + +/* + * ppp_netif_init_cb - netif init callback + */ +static err_t ppp_netif_init_cb(struct netif *netif) { + netif->name[0] = 'p'; + netif->name[1] = 'p'; +#if LWIP_IPV4 + /* FIXME: change that when netif_null_output_ip4() will materialize */ + netif->output = ppp_netif_output_ip4; +#endif /* LWIP_IPV4 */ +#if PPP_IPV6_SUPPORT + netif->output_ip6 = ppp_netif_output_ip6; +#endif /* PPP_IPV6_SUPPORT */ + netif->flags = NETIF_FLAG_UP; +#if LWIP_NETIF_HOSTNAME + /* @todo: Initialize interface hostname */ + /* netif_set_hostname(netif, "lwip"); */ +#endif /* LWIP_NETIF_HOSTNAME */ + return ERR_OK; +} + +#if LWIP_IPV4 +/* + * Send an IPv4 packet on the given connection. + */ +static err_t ppp_netif_output_ip4(struct netif *netif, struct pbuf *pb, const ip4_addr_t *ipaddr) { + LWIP_UNUSED_ARG(ipaddr); +#if PPP_IPV4_SUPPORT + return ppp_netif_output(netif, pb, PPP_IP); +#else /* PPP_IPV4_SUPPORT */ + LWIP_UNUSED_ARG(netif); + LWIP_UNUSED_ARG(pb); + return ERR_IF; +#endif /* PPP_IPV4_SUPPORT */ +} +#endif /* LWIP_IPV4 */ + +#if PPP_IPV6_SUPPORT +/* + * Send an IPv6 packet on the given connection. + */ +static err_t ppp_netif_output_ip6(struct netif *netif, struct pbuf *pb, const ip6_addr_t *ipaddr) { + LWIP_UNUSED_ARG(ipaddr); + return ppp_netif_output(netif, pb, PPP_IPV6); +} +#endif /* PPP_IPV6_SUPPORT */ + +static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protocol) { + ppp_pcb *pcb = (ppp_pcb*)netif->state; + err_t err; + struct pbuf *fpb = NULL; + + /* Check that the link is up. */ + if (0 +#if PPP_IPV4_SUPPORT + || (protocol == PPP_IP && !pcb->if4_up) +#endif /* PPP_IPV4_SUPPORT */ +#if PPP_IPV6_SUPPORT + || (protocol == PPP_IPV6 && !pcb->if6_up) +#endif /* PPP_IPV6_SUPPORT */ + ) { + PPPDEBUG(LOG_ERR, ("ppp_netif_output[%d]: link not up\n", pcb->netif->num)); + goto err_rte_drop; + } + +#if MPPE_SUPPORT + /* If MPPE is required, refuse any IP packet until we are able to crypt them. */ + if (pcb->settings.require_mppe && pcb->ccp_transmit_method != CI_MPPE) { + PPPDEBUG(LOG_ERR, ("ppp_netif_output[%d]: MPPE required, not up\n", pcb->netif->num)); + goto err_rte_drop; + } +#endif /* MPPE_SUPPORT */ + +#if VJ_SUPPORT + /* + * Attempt Van Jacobson header compression if VJ is configured and + * this is an IP packet. + */ + if (protocol == PPP_IP && pcb->vj_enabled) { + switch (vj_compress_tcp(&pcb->vj_comp, &pb)) { + case TYPE_IP: + /* No change... + protocol = PPP_IP; */ + break; + case TYPE_COMPRESSED_TCP: + /* vj_compress_tcp() returns a new allocated pbuf, indicate we should free + * our duplicated pbuf later */ + fpb = pb; + protocol = PPP_VJC_COMP; + break; + case TYPE_UNCOMPRESSED_TCP: + /* vj_compress_tcp() returns a new allocated pbuf, indicate we should free + * our duplicated pbuf later */ + fpb = pb; + protocol = PPP_VJC_UNCOMP; + break; + default: + PPPDEBUG(LOG_WARNING, ("ppp_netif_output[%d]: bad IP packet\n", pcb->netif->num)); + LINK_STATS_INC(link.proterr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(pcb->netif, ifoutdiscards); + return ERR_VAL; + } + } +#endif /* VJ_SUPPORT */ + +#if CCP_SUPPORT + switch (pcb->ccp_transmit_method) { + case 0: + break; /* Don't compress */ +#if MPPE_SUPPORT + case CI_MPPE: + if ((err = mppe_compress(pcb, &pcb->mppe_comp, &pb, protocol)) != ERR_OK) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); + goto err; + } + /* if VJ compressor returned a new allocated pbuf, free it */ + if (fpb) { + pbuf_free(fpb); + } + /* mppe_compress() returns a new allocated pbuf, indicate we should free + * our duplicated pbuf later */ + fpb = pb; + protocol = PPP_COMP; + break; +#endif /* MPPE_SUPPORT */ + default: + PPPDEBUG(LOG_ERR, ("ppp_netif_output[%d]: bad CCP transmit method\n", pcb->netif->num)); + goto err_rte_drop; /* Cannot really happen, we only negotiate what we are able to do */ + } +#endif /* CCP_SUPPORT */ + + err = pcb->link_cb->netif_output(pcb, pcb->link_ctx_cb, pb, protocol); + goto err; + +err_rte_drop: + err = ERR_RTE; + LINK_STATS_INC(link.rterr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(netif, ifoutdiscards); +err: + if (fpb) { + pbuf_free(fpb); + } + return err; +} + +/************************************/ +/*** PRIVATE FUNCTION DEFINITIONS ***/ +/************************************/ + +/* Initialize the PPP subsystem. */ +int ppp_init(void) +{ +#if PPPOS_SUPPORT + LWIP_MEMPOOL_INIT(PPPOS_PCB); +#endif +#if PPPOE_SUPPORT + LWIP_MEMPOOL_INIT(PPPOE_IF); +#endif +#if PPPOL2TP_SUPPORT + LWIP_MEMPOOL_INIT(PPPOL2TP_PCB); +#endif +#if LWIP_PPP_API && LWIP_MPU_COMPATIBLE + LWIP_MEMPOOL_INIT(PPPAPI_MSG); +#endif + + LWIP_MEMPOOL_INIT(PPP_PCB); + + /* + * Initialize magic number generator now so that protocols may + * use magic numbers in initialization. + */ + magic_init(); + + return 0; +} + +/* + * Create a new PPP control block. + * + * This initializes the PPP control block but does not + * attempt to negotiate the LCP session. + * + * Return a new PPP connection control block pointer + * on success or a null pointer on failure. + */ +ppp_pcb *ppp_new(struct netif *pppif, const struct link_callbacks *callbacks, void *link_ctx_cb, ppp_link_status_cb_fn link_status_cb, void *ctx_cb) { + ppp_pcb *pcb; + const struct protent *protp; + int i; + + /* PPP is single-threaded: without a callback, + * there is no way to know when the link is up. */ + if (link_status_cb == NULL) { + return NULL; + } + + pcb = (ppp_pcb*)LWIP_MEMPOOL_ALLOC(PPP_PCB); + if (pcb == NULL) { + return NULL; + } + + memset(pcb, 0, sizeof(ppp_pcb)); + + /* default configuration */ +#if PAP_SUPPORT + pcb->settings.pap_timeout_time = UPAP_DEFTIMEOUT; + pcb->settings.pap_max_transmits = UPAP_DEFTRANSMITS; +#if PPP_SERVER + pcb->settings.pap_req_timeout = UPAP_DEFREQTIME; +#endif /* PPP_SERVER */ +#endif /* PAP_SUPPORT */ + +#if CHAP_SUPPORT + pcb->settings.chap_timeout_time = CHAP_DEFTIMEOUT; + pcb->settings.chap_max_transmits = CHAP_DEFTRANSMITS; +#if PPP_SERVER + pcb->settings.chap_rechallenge_time = CHAP_DEFRECHALLENGETIME; +#endif /* PPP_SERVER */ +#endif /* CHAP_SUPPPORT */ + +#if EAP_SUPPORT + pcb->settings.eap_req_time = EAP_DEFREQTIME; + pcb->settings.eap_allow_req = EAP_DEFALLOWREQ; +#if PPP_SERVER + pcb->settings.eap_timeout_time = EAP_DEFTIMEOUT; + pcb->settings.eap_max_transmits = EAP_DEFTRANSMITS; +#endif /* PPP_SERVER */ +#endif /* EAP_SUPPORT */ + + pcb->settings.lcp_loopbackfail = LCP_DEFLOOPBACKFAIL; + pcb->settings.lcp_echo_interval = LCP_ECHOINTERVAL; + pcb->settings.lcp_echo_fails = LCP_MAXECHOFAILS; + + pcb->settings.fsm_timeout_time = FSM_DEFTIMEOUT; + pcb->settings.fsm_max_conf_req_transmits = FSM_DEFMAXCONFREQS; + pcb->settings.fsm_max_term_transmits = FSM_DEFMAXTERMREQS; + pcb->settings.fsm_max_nak_loops = FSM_DEFMAXNAKLOOPS; + + pcb->netif = pppif; + MIB2_INIT_NETIF(pppif, snmp_ifType_ppp, 0); + if (!netif_add(pcb->netif, +#if LWIP_IPV4 + IP4_ADDR_ANY4, IP4_ADDR_BROADCAST, IP4_ADDR_ANY4, +#endif /* LWIP_IPV4 */ + (void *)pcb, ppp_netif_init_cb, NULL)) { + LWIP_MEMPOOL_FREE(PPP_PCB, pcb); + PPPDEBUG(LOG_ERR, ("ppp_new: netif_add failed\n")); + return NULL; + } + + pcb->link_cb = callbacks; + pcb->link_ctx_cb = link_ctx_cb; + pcb->link_status_cb = link_status_cb; + pcb->ctx_cb = ctx_cb; + + /* + * Initialize each protocol. + */ + for (i = 0; (protp = protocols[i]) != NULL; ++i) { + (*protp->init)(pcb); + } + + new_phase(pcb, PPP_PHASE_DEAD); + return pcb; +} + +/** Initiate LCP open request */ +void ppp_start(ppp_pcb *pcb) { + PPPDEBUG(LOG_DEBUG, ("ppp_start[%d]\n", pcb->netif->num)); + + /* Clean data not taken care by anything else, mostly shared data. */ +#if PPP_STATS_SUPPORT + link_stats_valid = 0; +#endif /* PPP_STATS_SUPPORT */ +#if MPPE_SUPPORT + pcb->mppe_keys_set = 0; + memset(&pcb->mppe_comp, 0, sizeof(pcb->mppe_comp)); + memset(&pcb->mppe_decomp, 0, sizeof(pcb->mppe_decomp)); +#endif /* MPPE_SUPPORT */ +#if VJ_SUPPORT + vj_compress_init(&pcb->vj_comp); +#endif /* VJ_SUPPORT */ + + /* Start protocol */ + new_phase(pcb, PPP_PHASE_ESTABLISH); + lcp_open(pcb); + lcp_lowerup(pcb); + PPPDEBUG(LOG_DEBUG, ("ppp_start[%d]: finished\n", pcb->netif->num)); +} + +/** Called when link failed to setup */ +void ppp_link_failed(ppp_pcb *pcb) { + PPPDEBUG(LOG_DEBUG, ("ppp_link_failed[%d]\n", pcb->netif->num)); + new_phase(pcb, PPP_PHASE_DEAD); + pcb->err_code = PPPERR_OPEN; + pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); +} + +/** Called when link is normally down (i.e. it was asked to end) */ +void ppp_link_end(ppp_pcb *pcb) { + PPPDEBUG(LOG_DEBUG, ("ppp_link_end[%d]\n", pcb->netif->num)); + new_phase(pcb, PPP_PHASE_DEAD); + if (pcb->err_code == PPPERR_NONE) { + pcb->err_code = PPPERR_CONNECT; + } + pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); +} + +/* + * Pass the processed input packet to the appropriate handler. + * This function and all handlers run in the context of the tcpip_thread + */ +void ppp_input(ppp_pcb *pcb, struct pbuf *pb) { + u16_t protocol; +#if PPP_DEBUG && PPP_PROTOCOLNAME + const char *pname; +#endif /* PPP_DEBUG && PPP_PROTOCOLNAME */ + + magic_randomize(); + + if (pb->len < 2) { + PPPDEBUG(LOG_ERR, ("ppp_input[%d]: packet too short\n", pcb->netif->num)); + goto drop; + } + protocol = (((u8_t *)pb->payload)[0] << 8) | ((u8_t*)pb->payload)[1]; + +#if PRINTPKT_SUPPORT + ppp_dump_packet(pcb, "rcvd", (unsigned char *)pb->payload, pb->len); +#endif /* PRINTPKT_SUPPORT */ + + pbuf_header(pb, -(s16_t)sizeof(protocol)); + + LINK_STATS_INC(link.recv); + MIB2_STATS_NETIF_INC(pcb->netif, ifinucastpkts); + MIB2_STATS_NETIF_ADD(pcb->netif, ifinoctets, pb->tot_len); + + /* + * Toss all non-LCP packets unless LCP is OPEN. + */ + if (protocol != PPP_LCP && pcb->lcp_fsm.state != PPP_FSM_OPENED) { + ppp_dbglog("Discarded non-LCP packet when LCP not open"); + goto drop; + } + + /* + * Until we get past the authentication phase, toss all packets + * except LCP, LQR and authentication packets. + */ + if (pcb->phase <= PPP_PHASE_AUTHENTICATE + && !(protocol == PPP_LCP +#if LQR_SUPPORT + || protocol == PPP_LQR +#endif /* LQR_SUPPORT */ +#if PAP_SUPPORT + || protocol == PPP_PAP +#endif /* PAP_SUPPORT */ +#if CHAP_SUPPORT + || protocol == PPP_CHAP +#endif /* CHAP_SUPPORT */ +#if EAP_SUPPORT + || protocol == PPP_EAP +#endif /* EAP_SUPPORT */ + )) { + ppp_dbglog("discarding proto 0x%x in phase %d", protocol, pcb->phase); + goto drop; + } + +#if CCP_SUPPORT +#if MPPE_SUPPORT + /* + * MPPE is required and unencrypted data has arrived (this + * should never happen!). We should probably drop the link if + * the protocol is in the range of what should be encrypted. + * At the least, we drop this packet. + */ + if (pcb->settings.require_mppe && protocol != PPP_COMP && protocol < 0x8000) { + PPPDEBUG(LOG_ERR, ("ppp_input[%d]: MPPE required, received unencrypted data!\n", pcb->netif->num)); + goto drop; + } +#endif /* MPPE_SUPPORT */ + + if (protocol == PPP_COMP) { + u8_t *pl; + + switch (pcb->ccp_receive_method) { +#if MPPE_SUPPORT + case CI_MPPE: + if (mppe_decompress(pcb, &pcb->mppe_decomp, &pb) != ERR_OK) { + goto drop; + } + break; +#endif /* MPPE_SUPPORT */ + default: + PPPDEBUG(LOG_ERR, ("ppp_input[%d]: bad CCP receive method\n", pcb->netif->num)); + goto drop; /* Cannot really happen, we only negotiate what we are able to do */ + } + + /* Assume no PFC */ + if (pb->len < 2) { + goto drop; + } + + /* Extract and hide protocol (do PFC decompression if necessary) */ + pl = (u8_t*)pb->payload; + if (pl[0] & 0x01) { + protocol = pl[0]; + pbuf_header(pb, -(s16_t)1); + } else { + protocol = (pl[0] << 8) | pl[1]; + pbuf_header(pb, -(s16_t)2); + } + } +#endif /* CCP_SUPPORT */ + + switch(protocol) { + +#if PPP_IPV4_SUPPORT + case PPP_IP: /* Internet Protocol */ + PPPDEBUG(LOG_INFO, ("ppp_input[%d]: ip in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); + ip4_input(pb, pcb->netif); + return; +#endif /* PPP_IPV4_SUPPORT */ + +#if PPP_IPV6_SUPPORT + case PPP_IPV6: /* Internet Protocol Version 6 */ + PPPDEBUG(LOG_INFO, ("ppp_input[%d]: ip6 in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); + ip6_input(pb, pcb->netif); + return; +#endif /* PPP_IPV6_SUPPORT */ + +#if VJ_SUPPORT + case PPP_VJC_COMP: /* VJ compressed TCP */ + /* + * Clip off the VJ header and prepend the rebuilt TCP/IP header and + * pass the result to IP. + */ + PPPDEBUG(LOG_INFO, ("ppp_input[%d]: vj_comp in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); + if (pcb->vj_enabled && vj_uncompress_tcp(&pb, &pcb->vj_comp) >= 0) { + ip4_input(pb, pcb->netif); + return; + } + /* Something's wrong so drop it. */ + PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping VJ compressed\n", pcb->netif->num)); + break; + + case PPP_VJC_UNCOMP: /* VJ uncompressed TCP */ + /* + * Process the TCP/IP header for VJ header compression and then pass + * the packet to IP. + */ + PPPDEBUG(LOG_INFO, ("ppp_input[%d]: vj_un in pbuf len=%d\n", pcb->netif->num, pb->tot_len)); + if (pcb->vj_enabled && vj_uncompress_uncomp(pb, &pcb->vj_comp) >= 0) { + ip4_input(pb, pcb->netif); + return; + } + /* Something's wrong so drop it. */ + PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping VJ uncompressed\n", pcb->netif->num)); + break; +#endif /* VJ_SUPPORT */ + + default: { + int i; + const struct protent *protp; + + /* + * Upcall the proper protocol input routine. + */ + for (i = 0; (protp = protocols[i]) != NULL; ++i) { + if (protp->protocol == protocol) { + pb = ppp_singlebuf(pb); + (*protp->input)(pcb, (u8_t*)pb->payload, pb->len); + goto out; + } +#if 0 /* UNUSED + * + * This is actually a (hacked?) way for the Linux kernel to pass a data + * packet to pppd. pppd in normal condition only do signaling + * (LCP, PAP, CHAP, IPCP, ...) and does not handle any data packet at all. + * + * We don't even need this interface, which is only there because of PPP + * interface limitation between Linux kernel and pppd. For MPPE, which uses + * CCP to negotiate although it is not really a (de)compressor, we added + * ccp_resetrequest() in CCP and MPPE input data flow is calling either + * ccp_resetrequest() or lcp_close() if the issue is, respectively, non-fatal + * or fatal, this is what ccp_datainput() really do. + */ + if (protocol == (protp->protocol & ~0x8000) + && protp->datainput != NULL) { + (*protp->datainput)(pcb, pb->payload, pb->len); + goto out; + } +#endif /* UNUSED */ + } + +#if PPP_DEBUG +#if PPP_PROTOCOLNAME + pname = protocol_name(protocol); + if (pname != NULL) { + ppp_warn("Unsupported protocol '%s' (0x%x) received", pname, protocol); + } else +#endif /* PPP_PROTOCOLNAME */ + ppp_warn("Unsupported protocol 0x%x received", protocol); +#endif /* PPP_DEBUG */ + pbuf_header(pb, (s16_t)sizeof(protocol)); + lcp_sprotrej(pcb, (u8_t*)pb->payload, pb->len); + } + break; + } + +drop: + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(pcb->netif, ifindiscards); + +out: + pbuf_free(pb); +} + +/* merge a pbuf chain into one pbuf */ +struct pbuf *ppp_singlebuf(struct pbuf *p) { + struct pbuf *q, *b; + u8_t *pl; + + if(p->tot_len == p->len) { + return p; + } + + q = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); + if(!q) { + PPPDEBUG(LOG_ERR, + ("ppp_singlebuf: unable to alloc new buf (%d)\n", p->tot_len)); + return p; /* live dangerously */ + } + + for(b = p, pl = (u8_t*)q->payload; b != NULL; b = b->next) { + MEMCPY(pl, b->payload, b->len); + pl += b->len; + } + + pbuf_free(p); + + return q; +} + +/* + * Write a pbuf to a ppp link, only used from PPP functions + * to send PPP packets. + * + * IPv4 and IPv6 packets from lwIP are sent, respectively, + * with ppp_netif_output_ip4() and ppp_netif_output_ip6() + * functions (which are callbacks of the netif PPP interface). + */ +err_t ppp_write(ppp_pcb *pcb, struct pbuf *p) { +#if PRINTPKT_SUPPORT + ppp_dump_packet(pcb, "sent", (unsigned char *)p->payload+2, p->len-2); +#endif /* PRINTPKT_SUPPORT */ + return pcb->link_cb->write(pcb, pcb->link_ctx_cb, p); +} + +void ppp_link_terminated(ppp_pcb *pcb) { + PPPDEBUG(LOG_DEBUG, ("ppp_link_terminated[%d]\n", pcb->netif->num)); + pcb->link_cb->disconnect(pcb, pcb->link_ctx_cb); + PPPDEBUG(LOG_DEBUG, ("ppp_link_terminated[%d]: finished.\n", pcb->netif->num)); +} + + +/************************************************************************ + * Functions called by various PPP subsystems to configure + * the PPP interface or change the PPP phase. + */ + +/* + * new_phase - signal the start of a new phase of pppd's operation. + */ +void new_phase(ppp_pcb *pcb, int p) { + pcb->phase = p; + PPPDEBUG(LOG_DEBUG, ("ppp phase changed[%d]: phase=%d\n", pcb->netif->num, pcb->phase)); +#if PPP_NOTIFY_PHASE + if (pcb->notify_phase_cb != NULL) { + pcb->notify_phase_cb(pcb, p, pcb->ctx_cb); + } +#endif /* PPP_NOTIFY_PHASE */ +} + +/* + * ppp_send_config - configure the transmit-side characteristics of + * the ppp interface. + */ +int ppp_send_config(ppp_pcb *pcb, int mtu, u32_t accm, int pcomp, int accomp) { + LWIP_UNUSED_ARG(mtu); + /* pcb->mtu = mtu; -- set correctly with netif_set_mtu */ + + if (pcb->link_cb->send_config) { + pcb->link_cb->send_config(pcb, pcb->link_ctx_cb, accm, pcomp, accomp); + } + + PPPDEBUG(LOG_INFO, ("ppp_send_config[%d]\n", pcb->netif->num) ); + return 0; +} + +/* + * ppp_recv_config - configure the receive-side characteristics of + * the ppp interface. + */ +int ppp_recv_config(ppp_pcb *pcb, int mru, u32_t accm, int pcomp, int accomp) { + LWIP_UNUSED_ARG(mru); + + if (pcb->link_cb->recv_config) { + pcb->link_cb->recv_config(pcb, pcb->link_ctx_cb, accm, pcomp, accomp); + } + + PPPDEBUG(LOG_INFO, ("ppp_recv_config[%d]\n", pcb->netif->num)); + return 0; +} + +#if PPP_IPV4_SUPPORT +/* + * sifaddr - Config the interface IP addresses and netmask. + */ +int sifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr, u32_t netmask) { + ip4_addr_t ip, nm, gw; + + ip4_addr_set_u32(&ip, our_adr); + ip4_addr_set_u32(&nm, netmask); + ip4_addr_set_u32(&gw, his_adr); + netif_set_addr(pcb->netif, &ip, &nm, &gw); + return 1; +} + +/******************************************************************** + * + * cifaddr - Clear the interface IP addresses, and delete routes + * through the interface if possible. + */ +int cifaddr(ppp_pcb *pcb, u32_t our_adr, u32_t his_adr) { + LWIP_UNUSED_ARG(our_adr); + LWIP_UNUSED_ARG(his_adr); + + netif_set_addr(pcb->netif, IP4_ADDR_ANY4, IP4_ADDR_BROADCAST, IP4_ADDR_ANY4); + return 1; +} + +#if 0 /* UNUSED - PROXY ARP */ +/******************************************************************** + * + * sifproxyarp - Make a proxy ARP entry for the peer. + */ + +int sifproxyarp(ppp_pcb *pcb, u32_t his_adr) { + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(his_adr); + return 0; +} + +/******************************************************************** + * + * cifproxyarp - Delete the proxy ARP entry for the peer. + */ + +int cifproxyarp(ppp_pcb *pcb, u32_t his_adr) { + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(his_adr); + return 0; +} +#endif /* UNUSED - PROXY ARP */ + +#if LWIP_DNS +/* + * sdns - Config the DNS servers + */ +int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) { + ip_addr_t ns; + LWIP_UNUSED_ARG(pcb); + + ip_addr_set_ip4_u32(&ns, ns1); + dns_setserver(0, &ns); + ip_addr_set_ip4_u32(&ns, ns2); + dns_setserver(1, &ns); + return 1; +} + +/******************************************************************** + * + * cdns - Clear the DNS servers + */ +int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) { + const ip_addr_t *nsa; + ip_addr_t nsb; + LWIP_UNUSED_ARG(pcb); + + nsa = dns_getserver(0); + ip_addr_set_ip4_u32(&nsb, ns1); + if (ip_addr_cmp(nsa, &nsb)) { + dns_setserver(0, IP_ADDR_ANY); + } + nsa = dns_getserver(1); + ip_addr_set_ip4_u32(&nsb, ns2); + if (ip_addr_cmp(nsa, &nsb)) { + dns_setserver(1, IP_ADDR_ANY); + } + return 1; +} +#endif /* LWIP_DNS */ + +#if VJ_SUPPORT +/******************************************************************** + * + * sifvjcomp - config tcp header compression + */ +int sifvjcomp(ppp_pcb *pcb, int vjcomp, int cidcomp, int maxcid) { + pcb->vj_enabled = vjcomp; + pcb->vj_comp.compressSlot = cidcomp; + pcb->vj_comp.maxSlotIndex = maxcid; + PPPDEBUG(LOG_INFO, ("sifvjcomp[%d]: VJ compress enable=%d slot=%d max slot=%d\n", + pcb->netif->num, vjcomp, cidcomp, maxcid)); + return 0; +} +#endif /* VJ_SUPPORT */ + +/* + * sifup - Config the interface up and enable IP packets to pass. + */ +int sifup(ppp_pcb *pcb) { + pcb->if4_up = 1; + pcb->err_code = PPPERR_NONE; + netif_set_link_up(pcb->netif); + + PPPDEBUG(LOG_DEBUG, ("sifup[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); + pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); + return 1; +} + +/******************************************************************** + * + * sifdown - Disable the indicated protocol and config the interface + * down if there are no remaining protocols. + */ +int sifdown(ppp_pcb *pcb) { + + pcb->if4_up = 0; + + if (1 +#if PPP_IPV6_SUPPORT + /* set the interface down if IPv6 is down as well */ + && !pcb->if6_up +#endif /* PPP_IPV6_SUPPORT */ + ) { + /* make sure the netif link callback is called */ + netif_set_link_down(pcb->netif); + } + PPPDEBUG(LOG_DEBUG, ("sifdown[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); + return 1; +} + +/******************************************************************** + * + * Return user specified netmask, modified by any mask we might determine + * for address `addr' (in network byte order). + * Here we scan through the system's list of interfaces, looking for + * any non-point-to-point interfaces which might appear to be on the same + * network as `addr'. If we find any, we OR in their netmask to the + * user-specified netmask. + */ +u32_t get_mask(u32_t addr) { +#if 0 + u32_t mask, nmask; + + addr = lwip_htonl(addr); + if (IP_CLASSA(addr)) { /* determine network mask for address class */ + nmask = IP_CLASSA_NET; + } else if (IP_CLASSB(addr)) { + nmask = IP_CLASSB_NET; + } else { + nmask = IP_CLASSC_NET; + } + + /* class D nets are disallowed by bad_ip_adrs */ + mask = PP_HTONL(0xffffff00UL) | lwip_htonl(nmask); + + /* XXX + * Scan through the system's network interfaces. + * Get each netmask and OR them into our mask. + */ + /* return mask; */ + return mask; +#endif /* 0 */ + LWIP_UNUSED_ARG(addr); + return IPADDR_BROADCAST; +} +#endif /* PPP_IPV4_SUPPORT */ + +#if PPP_IPV6_SUPPORT +#define IN6_LLADDR_FROM_EUI64(ip6, eui64) do { \ + ip6.addr[0] = PP_HTONL(0xfe800000); \ + ip6.addr[1] = 0; \ + eui64_copy(eui64, ip6.addr[2]); \ + } while (0) + +/******************************************************************** + * + * sif6addr - Config the interface with an IPv6 link-local address + */ +int sif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) { + ip6_addr_t ip6; + LWIP_UNUSED_ARG(his_eui64); + + IN6_LLADDR_FROM_EUI64(ip6, our_eui64); + netif_ip6_addr_set(pcb->netif, 0, &ip6); + netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_PREFERRED); + /* FIXME: should we add an IPv6 static neighbor using his_eui64 ? */ + return 1; +} + +/******************************************************************** + * + * cif6addr - Remove IPv6 address from interface + */ +int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) { + LWIP_UNUSED_ARG(our_eui64); + LWIP_UNUSED_ARG(his_eui64); + + netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6); + netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_INVALID); + return 1; +} + +/* + * sif6up - Config the interface up and enable IPv6 packets to pass. + */ +int sif6up(ppp_pcb *pcb) { + + pcb->if6_up = 1; + pcb->err_code = PPPERR_NONE; + netif_set_link_up(pcb->netif); + + PPPDEBUG(LOG_DEBUG, ("sif6up[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); + pcb->link_status_cb(pcb, pcb->err_code, pcb->ctx_cb); + return 1; +} + +/******************************************************************** + * + * sif6down - Disable the indicated protocol and config the interface + * down if there are no remaining protocols. + */ +int sif6down(ppp_pcb *pcb) { + + pcb->if6_up = 0; + + if (1 +#if PPP_IPV4_SUPPORT + /* set the interface down if IPv4 is down as well */ + && !pcb->if4_up +#endif /* PPP_IPV4_SUPPORT */ + ) { + /* make sure the netif link callback is called */ + netif_set_link_down(pcb->netif); + } + PPPDEBUG(LOG_DEBUG, ("sif6down[%d]: err_code=%d\n", pcb->netif->num, pcb->err_code)); + return 1; +} +#endif /* PPP_IPV6_SUPPORT */ + +#if DEMAND_SUPPORT +/* + * sifnpmode - Set the mode for handling packets for a given NP. + */ +int sifnpmode(ppp_pcb *pcb, int proto, enum NPmode mode) { + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(proto); + LWIP_UNUSED_ARG(mode); + return 0; +} +#endif /* DEMAND_SUPPORT */ + +/* + * netif_set_mtu - set the MTU on the PPP network interface. + */ +void netif_set_mtu(ppp_pcb *pcb, int mtu) { + + pcb->netif->mtu = mtu; + PPPDEBUG(LOG_INFO, ("netif_set_mtu[%d]: mtu=%d\n", pcb->netif->num, mtu)); +} + +/* + * netif_get_mtu - get PPP interface MTU + */ +int netif_get_mtu(ppp_pcb *pcb) { + + return pcb->netif->mtu; +} + +#if CCP_SUPPORT +#if 0 /* unused */ +/* + * ccp_test - whether a given compression method is acceptable for use. + */ +int +ccp_test(ppp_pcb *pcb, u_char *opt_ptr, int opt_len, int for_transmit) +{ + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(opt_ptr); + LWIP_UNUSED_ARG(opt_len); + LWIP_UNUSED_ARG(for_transmit); + return -1; +} +#endif /* unused */ + +/* + * ccp_set - inform about the current state of CCP. + */ +void +ccp_set(ppp_pcb *pcb, u8_t isopen, u8_t isup, u8_t receive_method, u8_t transmit_method) +{ + LWIP_UNUSED_ARG(isopen); + LWIP_UNUSED_ARG(isup); + pcb->ccp_receive_method = receive_method; + pcb->ccp_transmit_method = transmit_method; + PPPDEBUG(LOG_DEBUG, ("ccp_set[%d]: is_open=%d, is_up=%d, receive_method=%u, transmit_method=%u\n", + pcb->netif->num, isopen, isup, receive_method, transmit_method)); +} + +void +ccp_reset_comp(ppp_pcb *pcb) +{ + switch (pcb->ccp_transmit_method) { +#if MPPE_SUPPORT + case CI_MPPE: + mppe_comp_reset(pcb, &pcb->mppe_comp); + break; +#endif /* MPPE_SUPPORT */ + default: + break; + } +} + +void +ccp_reset_decomp(ppp_pcb *pcb) +{ + switch (pcb->ccp_receive_method) { +#if MPPE_SUPPORT + case CI_MPPE: + mppe_decomp_reset(pcb, &pcb->mppe_decomp); + break; +#endif /* MPPE_SUPPORT */ + default: + break; + } +} + +#if 0 /* unused */ +/* + * ccp_fatal_error - returns 1 if decompression was disabled as a + * result of an error detected after decompression of a packet, + * 0 otherwise. This is necessary because of patent nonsense. + */ +int +ccp_fatal_error(ppp_pcb *pcb) +{ + LWIP_UNUSED_ARG(pcb); + return 1; +} +#endif /* unused */ +#endif /* CCP_SUPPORT */ + +#if PPP_IDLETIMELIMIT +/******************************************************************** + * + * get_idle_time - return how long the link has been idle. + */ +int get_idle_time(ppp_pcb *pcb, struct ppp_idle *ip) { + /* FIXME: add idle time support and make it optional */ + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(ip); + return 1; +} +#endif /* PPP_IDLETIMELIMIT */ + +#if DEMAND_SUPPORT +/******************************************************************** + * + * get_loop_output - get outgoing packets from the ppp device, + * and detect when we want to bring the real link up. + * Return value is 1 if we need to bring up the link, 0 otherwise. + */ +int get_loop_output(void) { + return 0; +} +#endif /* DEMAND_SUPPORT */ + +#if PPP_PROTOCOLNAME +/* List of protocol names, to make our messages a little more informative. */ +struct protocol_list { + u_short proto; + const char *name; +} const protocol_list[] = { + { 0x21, "IP" }, + { 0x23, "OSI Network Layer" }, + { 0x25, "Xerox NS IDP" }, + { 0x27, "DECnet Phase IV" }, + { 0x29, "Appletalk" }, + { 0x2b, "Novell IPX" }, + { 0x2d, "VJ compressed TCP/IP" }, + { 0x2f, "VJ uncompressed TCP/IP" }, + { 0x31, "Bridging PDU" }, + { 0x33, "Stream Protocol ST-II" }, + { 0x35, "Banyan Vines" }, + { 0x39, "AppleTalk EDDP" }, + { 0x3b, "AppleTalk SmartBuffered" }, + { 0x3d, "Multi-Link" }, + { 0x3f, "NETBIOS Framing" }, + { 0x41, "Cisco Systems" }, + { 0x43, "Ascom Timeplex" }, + { 0x45, "Fujitsu Link Backup and Load Balancing (LBLB)" }, + { 0x47, "DCA Remote Lan" }, + { 0x49, "Serial Data Transport Protocol (PPP-SDTP)" }, + { 0x4b, "SNA over 802.2" }, + { 0x4d, "SNA" }, + { 0x4f, "IP6 Header Compression" }, + { 0x51, "KNX Bridging Data" }, + { 0x53, "Encryption" }, + { 0x55, "Individual Link Encryption" }, + { 0x57, "IPv6" }, + { 0x59, "PPP Muxing" }, + { 0x5b, "Vendor-Specific Network Protocol" }, + { 0x61, "RTP IPHC Full Header" }, + { 0x63, "RTP IPHC Compressed TCP" }, + { 0x65, "RTP IPHC Compressed non-TCP" }, + { 0x67, "RTP IPHC Compressed UDP 8" }, + { 0x69, "RTP IPHC Compressed RTP 8" }, + { 0x6f, "Stampede Bridging" }, + { 0x73, "MP+" }, + { 0xc1, "NTCITS IPI" }, + { 0xfb, "single-link compression" }, + { 0xfd, "Compressed Datagram" }, + { 0x0201, "802.1d Hello Packets" }, + { 0x0203, "IBM Source Routing BPDU" }, + { 0x0205, "DEC LANBridge100 Spanning Tree" }, + { 0x0207, "Cisco Discovery Protocol" }, + { 0x0209, "Netcs Twin Routing" }, + { 0x020b, "STP - Scheduled Transfer Protocol" }, + { 0x020d, "EDP - Extreme Discovery Protocol" }, + { 0x0211, "Optical Supervisory Channel Protocol" }, + { 0x0213, "Optical Supervisory Channel Protocol" }, + { 0x0231, "Luxcom" }, + { 0x0233, "Sigma Network Systems" }, + { 0x0235, "Apple Client Server Protocol" }, + { 0x0281, "MPLS Unicast" }, + { 0x0283, "MPLS Multicast" }, + { 0x0285, "IEEE p1284.4 standard - data packets" }, + { 0x0287, "ETSI TETRA Network Protocol Type 1" }, + { 0x0289, "Multichannel Flow Treatment Protocol" }, + { 0x2063, "RTP IPHC Compressed TCP No Delta" }, + { 0x2065, "RTP IPHC Context State" }, + { 0x2067, "RTP IPHC Compressed UDP 16" }, + { 0x2069, "RTP IPHC Compressed RTP 16" }, + { 0x4001, "Cray Communications Control Protocol" }, + { 0x4003, "CDPD Mobile Network Registration Protocol" }, + { 0x4005, "Expand accelerator protocol" }, + { 0x4007, "ODSICP NCP" }, + { 0x4009, "DOCSIS DLL" }, + { 0x400B, "Cetacean Network Detection Protocol" }, + { 0x4021, "Stacker LZS" }, + { 0x4023, "RefTek Protocol" }, + { 0x4025, "Fibre Channel" }, + { 0x4027, "EMIT Protocols" }, + { 0x405b, "Vendor-Specific Protocol (VSP)" }, + { 0x8021, "Internet Protocol Control Protocol" }, + { 0x8023, "OSI Network Layer Control Protocol" }, + { 0x8025, "Xerox NS IDP Control Protocol" }, + { 0x8027, "DECnet Phase IV Control Protocol" }, + { 0x8029, "Appletalk Control Protocol" }, + { 0x802b, "Novell IPX Control Protocol" }, + { 0x8031, "Bridging NCP" }, + { 0x8033, "Stream Protocol Control Protocol" }, + { 0x8035, "Banyan Vines Control Protocol" }, + { 0x803d, "Multi-Link Control Protocol" }, + { 0x803f, "NETBIOS Framing Control Protocol" }, + { 0x8041, "Cisco Systems Control Protocol" }, + { 0x8043, "Ascom Timeplex" }, + { 0x8045, "Fujitsu LBLB Control Protocol" }, + { 0x8047, "DCA Remote Lan Network Control Protocol (RLNCP)" }, + { 0x8049, "Serial Data Control Protocol (PPP-SDCP)" }, + { 0x804b, "SNA over 802.2 Control Protocol" }, + { 0x804d, "SNA Control Protocol" }, + { 0x804f, "IP6 Header Compression Control Protocol" }, + { 0x8051, "KNX Bridging Control Protocol" }, + { 0x8053, "Encryption Control Protocol" }, + { 0x8055, "Individual Link Encryption Control Protocol" }, + { 0x8057, "IPv6 Control Protocol" }, + { 0x8059, "PPP Muxing Control Protocol" }, + { 0x805b, "Vendor-Specific Network Control Protocol (VSNCP)" }, + { 0x806f, "Stampede Bridging Control Protocol" }, + { 0x8073, "MP+ Control Protocol" }, + { 0x80c1, "NTCITS IPI Control Protocol" }, + { 0x80fb, "Single Link Compression Control Protocol" }, + { 0x80fd, "Compression Control Protocol" }, + { 0x8207, "Cisco Discovery Protocol Control" }, + { 0x8209, "Netcs Twin Routing" }, + { 0x820b, "STP - Control Protocol" }, + { 0x820d, "EDPCP - Extreme Discovery Protocol Ctrl Prtcl" }, + { 0x8235, "Apple Client Server Protocol Control" }, + { 0x8281, "MPLSCP" }, + { 0x8285, "IEEE p1284.4 standard - Protocol Control" }, + { 0x8287, "ETSI TETRA TNP1 Control Protocol" }, + { 0x8289, "Multichannel Flow Treatment Protocol" }, + { 0xc021, "Link Control Protocol" }, + { 0xc023, "Password Authentication Protocol" }, + { 0xc025, "Link Quality Report" }, + { 0xc027, "Shiva Password Authentication Protocol" }, + { 0xc029, "CallBack Control Protocol (CBCP)" }, + { 0xc02b, "BACP Bandwidth Allocation Control Protocol" }, + { 0xc02d, "BAP" }, + { 0xc05b, "Vendor-Specific Authentication Protocol (VSAP)" }, + { 0xc081, "Container Control Protocol" }, + { 0xc223, "Challenge Handshake Authentication Protocol" }, + { 0xc225, "RSA Authentication Protocol" }, + { 0xc227, "Extensible Authentication Protocol" }, + { 0xc229, "Mitsubishi Security Info Exch Ptcl (SIEP)" }, + { 0xc26f, "Stampede Bridging Authorization Protocol" }, + { 0xc281, "Proprietary Authentication Protocol" }, + { 0xc283, "Proprietary Authentication Protocol" }, + { 0xc481, "Proprietary Node ID Authentication Protocol" }, + { 0, NULL }, +}; + +/* + * protocol_name - find a name for a PPP protocol. + */ +const char * protocol_name(int proto) { + const struct protocol_list *lp; + + for (lp = protocol_list; lp->proto != 0; ++lp) { + if (proto == lp->proto) { + return lp->name; + } + } + return NULL; +} +#endif /* PPP_PROTOCOLNAME */ + +#if PPP_STATS_SUPPORT + +/* ---- Note on PPP Stats support ---- + * + * The one willing link stats support should add the get_ppp_stats() + * to fetch statistics from lwIP. + */ + +/* + * reset_link_stats - "reset" stats when link goes up. + */ +void reset_link_stats(int u) { + if (!get_ppp_stats(u, &old_link_stats)) { + return; + } + gettimeofday(&start_time, NULL); +} + +/* + * update_link_stats - get stats at link termination. + */ +void update_link_stats(int u) { + struct timeval now; + char numbuf[32]; + + if (!get_ppp_stats(u, &link_stats) || gettimeofday(&now, NULL) < 0) { + return; + } + link_connect_time = now.tv_sec - start_time.tv_sec; + link_stats_valid = 1; + + link_stats.bytes_in -= old_link_stats.bytes_in; + link_stats.bytes_out -= old_link_stats.bytes_out; + link_stats.pkts_in -= old_link_stats.pkts_in; + link_stats.pkts_out -= old_link_stats.pkts_out; +} + +void print_link_stats() { + /* + * Print connect time and statistics. + */ + if (link_stats_valid) { + int t = (link_connect_time + 5) / 6; /* 1/10ths of minutes */ + info("Connect time %d.%d minutes.", t/10, t%10); + info("Sent %u bytes, received %u bytes.", link_stats.bytes_out, link_stats.bytes_in); + link_stats_valid = 0; + } +} +#endif /* PPP_STATS_SUPPORT */ + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.c index 947f7ba..5d19f00 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppapi.c @@ -1,427 +1,427 @@ -/** - * @file - * Point To Point Protocol Sequential API module - * - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "netif/ppp/ppp_opts.h" - -#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */ - -#include "netif/ppp/pppapi.h" -#include "lwip/priv/tcpip_priv.h" -#include "netif/ppp/pppoe.h" -#include "netif/ppp/pppol2tp.h" -#include "netif/ppp/pppos.h" - -#if LWIP_MPU_COMPATIBLE -LWIP_MEMPOOL_DECLARE(PPPAPI_MSG, MEMP_NUM_PPP_API_MSG, sizeof(struct pppapi_msg), "PPPAPI_MSG") -#endif - -#define PPPAPI_VAR_REF(name) API_VAR_REF(name) -#define PPPAPI_VAR_DECLARE(name) API_VAR_DECLARE(struct pppapi_msg, name) -#define PPPAPI_VAR_ALLOC(name) API_VAR_ALLOC_POOL(struct pppapi_msg, PPPAPI_MSG, name, ERR_MEM) -#define PPPAPI_VAR_ALLOC_RETURN_NULL(name) API_VAR_ALLOC_POOL(struct pppapi_msg, PPPAPI_MSG, name, NULL) -#define PPPAPI_VAR_FREE(name) API_VAR_FREE_POOL(PPPAPI_MSG, name) - -/** - * Call ppp_set_default() inside the tcpip_thread context. - */ -static err_t -pppapi_do_ppp_set_default(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - ppp_set_default(msg->msg.ppp); - return ERR_OK; -} - -/** - * Call ppp_set_default() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -err_t -pppapi_set_default(ppp_pcb *pcb) -{ - err_t err; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = pcb; - err = tcpip_api_call(pppapi_do_ppp_set_default, &PPPAPI_VAR_REF(msg).call); - PPPAPI_VAR_FREE(msg); - return err; -} - - -#if PPP_NOTIFY_PHASE -/** - * Call ppp_set_notify_phase_callback() inside the tcpip_thread context. - */ -static err_t -pppapi_do_ppp_set_notify_phase_callback(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - ppp_set_notify_phase_callback(msg->msg.ppp, msg->msg.msg.setnotifyphasecb.notify_phase_cb); - return ERR_OK; -} - -/** - * Call ppp_set_notify_phase_callback() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -err_t -pppapi_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb) -{ - err_t err; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = pcb; - PPPAPI_VAR_REF(msg).msg.msg.setnotifyphasecb.notify_phase_cb = notify_phase_cb; - err = tcpip_api_call(pppapi_do_ppp_set_notify_phase_callback, &PPPAPI_VAR_REF(msg).call); - PPPAPI_VAR_FREE(msg); - return err; -} -#endif /* PPP_NOTIFY_PHASE */ - - -#if PPPOS_SUPPORT -/** - * Call pppos_create() inside the tcpip_thread context. - */ -static err_t -pppapi_do_pppos_create(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - msg->msg.ppp = pppos_create(msg->msg.msg.serialcreate.pppif, msg->msg.msg.serialcreate.output_cb, - msg->msg.msg.serialcreate.link_status_cb, msg->msg.msg.serialcreate.ctx_cb); - return ERR_OK; -} - -/** - * Call pppos_create() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -ppp_pcb* -pppapi_pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb) -{ - ppp_pcb* result; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC_RETURN_NULL(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = NULL; - PPPAPI_VAR_REF(msg).msg.msg.serialcreate.pppif = pppif; - PPPAPI_VAR_REF(msg).msg.msg.serialcreate.output_cb = output_cb; - PPPAPI_VAR_REF(msg).msg.msg.serialcreate.link_status_cb = link_status_cb; - PPPAPI_VAR_REF(msg).msg.msg.serialcreate.ctx_cb = ctx_cb; - tcpip_api_call(pppapi_do_pppos_create, &PPPAPI_VAR_REF(msg).call); - result = PPPAPI_VAR_REF(msg).msg.ppp; - PPPAPI_VAR_FREE(msg); - return result; -} -#endif /* PPPOS_SUPPORT */ - - -#if PPPOE_SUPPORT -/** - * Call pppoe_create() inside the tcpip_thread context. - */ -static err_t -pppapi_do_pppoe_create(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - msg->msg.ppp = pppoe_create(msg->msg.msg.ethernetcreate.pppif, msg->msg.msg.ethernetcreate.ethif, - msg->msg.msg.ethernetcreate.service_name, msg->msg.msg.ethernetcreate.concentrator_name, - msg->msg.msg.ethernetcreate.link_status_cb, msg->msg.msg.ethernetcreate.ctx_cb); - return ERR_OK; -} - -/** - * Call pppoe_create() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -ppp_pcb* -pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const char *service_name, - const char *concentrator_name, ppp_link_status_cb_fn link_status_cb, - void *ctx_cb) -{ - ppp_pcb* result; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC_RETURN_NULL(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = NULL; - PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.pppif = pppif; - PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.ethif = ethif; - PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.service_name = service_name; - PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.concentrator_name = concentrator_name; - PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.link_status_cb = link_status_cb; - PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.ctx_cb = ctx_cb; - tcpip_api_call(pppapi_do_pppoe_create, &PPPAPI_VAR_REF(msg).call); - result = PPPAPI_VAR_REF(msg).msg.ppp; - PPPAPI_VAR_FREE(msg); - return result; -} -#endif /* PPPOE_SUPPORT */ - - -#if PPPOL2TP_SUPPORT -/** - * Call pppol2tp_create() inside the tcpip_thread context. - */ -static err_t -pppapi_do_pppol2tp_create(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - msg->msg.ppp = pppol2tp_create(msg->msg.msg.l2tpcreate.pppif, - msg->msg.msg.l2tpcreate.netif, API_EXPR_REF(msg->msg.msg.l2tpcreate.ipaddr), msg->msg.msg.l2tpcreate.port, -#if PPPOL2TP_AUTH_SUPPORT - msg->msg.msg.l2tpcreate.secret, - msg->msg.msg.l2tpcreate.secret_len, -#else /* PPPOL2TP_AUTH_SUPPORT */ - NULL, - 0, -#endif /* PPPOL2TP_AUTH_SUPPORT */ - msg->msg.msg.l2tpcreate.link_status_cb, msg->msg.msg.l2tpcreate.ctx_cb); - return ERR_OK; -} - -/** - * Call pppol2tp_create() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -ppp_pcb* -pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip_addr_t *ipaddr, u16_t port, - const u8_t *secret, u8_t secret_len, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb) -{ - ppp_pcb* result; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC_RETURN_NULL(msg); -#if !PPPOL2TP_AUTH_SUPPORT - LWIP_UNUSED_ARG(secret); - LWIP_UNUSED_ARG(secret_len); -#endif /* !PPPOL2TP_AUTH_SUPPORT */ - - PPPAPI_VAR_REF(msg).msg.ppp = NULL; - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.pppif = pppif; - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.netif = netif; - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.ipaddr = PPPAPI_VAR_REF(ipaddr); - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.port = port; -#if PPPOL2TP_AUTH_SUPPORT - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.secret = secret; - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.secret_len = secret_len; -#endif /* PPPOL2TP_AUTH_SUPPORT */ - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.link_status_cb = link_status_cb; - PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.ctx_cb = ctx_cb; - tcpip_api_call(pppapi_do_pppol2tp_create, &PPPAPI_VAR_REF(msg).call); - result = PPPAPI_VAR_REF(msg).msg.ppp; - PPPAPI_VAR_FREE(msg); - return result; -} -#endif /* PPPOL2TP_SUPPORT */ - - -/** - * Call ppp_connect() inside the tcpip_thread context. - */ -static err_t -pppapi_do_ppp_connect(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - return ppp_connect(msg->msg.ppp, msg->msg.msg.connect.holdoff); -} - -/** - * Call ppp_connect() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -err_t -pppapi_connect(ppp_pcb *pcb, u16_t holdoff) -{ - err_t err; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = pcb; - PPPAPI_VAR_REF(msg).msg.msg.connect.holdoff = holdoff; - err = tcpip_api_call(pppapi_do_ppp_connect, &PPPAPI_VAR_REF(msg).call); - PPPAPI_VAR_FREE(msg); - return err; -} - - -#if PPP_SERVER -/** - * Call ppp_listen() inside the tcpip_thread context. - */ -static err_t -pppapi_do_ppp_listen(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - return ppp_listen(msg->msg.ppp); -} - -/** - * Call ppp_listen() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -err_t -pppapi_listen(ppp_pcb *pcb) -{ - err_t err; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = pcb; - err = tcpip_api_call(pppapi_do_ppp_listen, &PPPAPI_VAR_REF(msg).call); - PPPAPI_VAR_FREE(msg); - return err; -} -#endif /* PPP_SERVER */ - - -/** - * Call ppp_close() inside the tcpip_thread context. - */ -static err_t -pppapi_do_ppp_close(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - return ppp_close(msg->msg.ppp, msg->msg.msg.close.nocarrier); -} - -/** - * Call ppp_close() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -err_t -pppapi_close(ppp_pcb *pcb, u8_t nocarrier) -{ - err_t err; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = pcb; - PPPAPI_VAR_REF(msg).msg.msg.close.nocarrier = nocarrier; - err = tcpip_api_call(pppapi_do_ppp_close, &PPPAPI_VAR_REF(msg).call); - PPPAPI_VAR_FREE(msg); - return err; -} - - -/** - * Call ppp_free() inside the tcpip_thread context. - */ -static err_t -pppapi_do_ppp_free(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - return ppp_free(msg->msg.ppp); -} - -/** - * Call ppp_free() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -err_t -pppapi_free(ppp_pcb *pcb) -{ - err_t err; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = pcb; - err = tcpip_api_call(pppapi_do_ppp_free, &PPPAPI_VAR_REF(msg).call); - PPPAPI_VAR_FREE(msg); - return err; -} - - -/** - * Call ppp_ioctl() inside the tcpip_thread context. - */ -static err_t -pppapi_do_ppp_ioctl(struct tcpip_api_call_data *m) -{ - /* cast through void* to silence alignment warnings. - * We know it works because the structs have been instantiated as struct pppapi_msg */ - struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; - - return ppp_ioctl(msg->msg.ppp, msg->msg.msg.ioctl.cmd, msg->msg.msg.ioctl.arg); -} - -/** - * Call ppp_ioctl() in a thread-safe way by running that function inside the - * tcpip_thread context. - */ -err_t -pppapi_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg) -{ - err_t err; - PPPAPI_VAR_DECLARE(msg); - PPPAPI_VAR_ALLOC(msg); - - PPPAPI_VAR_REF(msg).msg.ppp = pcb; - PPPAPI_VAR_REF(msg).msg.msg.ioctl.cmd = cmd; - PPPAPI_VAR_REF(msg).msg.msg.ioctl.arg = arg; - err = tcpip_api_call(pppapi_do_ppp_ioctl, &PPPAPI_VAR_REF(msg).call); - PPPAPI_VAR_FREE(msg); - return err; -} - -#endif /* LWIP_PPP_API */ +/** + * @file + * Point To Point Protocol Sequential API module + * + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "netif/ppp/ppp_opts.h" + +#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */ + +#include "netif/ppp/pppapi.h" +#include "lwip/priv/tcpip_priv.h" +#include "netif/ppp/pppoe.h" +#include "netif/ppp/pppol2tp.h" +#include "netif/ppp/pppos.h" + +#if LWIP_MPU_COMPATIBLE +LWIP_MEMPOOL_DECLARE(PPPAPI_MSG, MEMP_NUM_PPP_API_MSG, sizeof(struct pppapi_msg), "PPPAPI_MSG") +#endif + +#define PPPAPI_VAR_REF(name) API_VAR_REF(name) +#define PPPAPI_VAR_DECLARE(name) API_VAR_DECLARE(struct pppapi_msg, name) +#define PPPAPI_VAR_ALLOC(name) API_VAR_ALLOC_POOL(struct pppapi_msg, PPPAPI_MSG, name, ERR_MEM) +#define PPPAPI_VAR_ALLOC_RETURN_NULL(name) API_VAR_ALLOC_POOL(struct pppapi_msg, PPPAPI_MSG, name, NULL) +#define PPPAPI_VAR_FREE(name) API_VAR_FREE_POOL(PPPAPI_MSG, name) + +/** + * Call ppp_set_default() inside the tcpip_thread context. + */ +static err_t +pppapi_do_ppp_set_default(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + ppp_set_default(msg->msg.ppp); + return ERR_OK; +} + +/** + * Call ppp_set_default() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +err_t +pppapi_set_default(ppp_pcb *pcb) +{ + err_t err; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = pcb; + err = tcpip_api_call(pppapi_do_ppp_set_default, &PPPAPI_VAR_REF(msg).call); + PPPAPI_VAR_FREE(msg); + return err; +} + + +#if PPP_NOTIFY_PHASE +/** + * Call ppp_set_notify_phase_callback() inside the tcpip_thread context. + */ +static err_t +pppapi_do_ppp_set_notify_phase_callback(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + ppp_set_notify_phase_callback(msg->msg.ppp, msg->msg.msg.setnotifyphasecb.notify_phase_cb); + return ERR_OK; +} + +/** + * Call ppp_set_notify_phase_callback() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +err_t +pppapi_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb) +{ + err_t err; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = pcb; + PPPAPI_VAR_REF(msg).msg.msg.setnotifyphasecb.notify_phase_cb = notify_phase_cb; + err = tcpip_api_call(pppapi_do_ppp_set_notify_phase_callback, &PPPAPI_VAR_REF(msg).call); + PPPAPI_VAR_FREE(msg); + return err; +} +#endif /* PPP_NOTIFY_PHASE */ + + +#if PPPOS_SUPPORT +/** + * Call pppos_create() inside the tcpip_thread context. + */ +static err_t +pppapi_do_pppos_create(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + msg->msg.ppp = pppos_create(msg->msg.msg.serialcreate.pppif, msg->msg.msg.serialcreate.output_cb, + msg->msg.msg.serialcreate.link_status_cb, msg->msg.msg.serialcreate.ctx_cb); + return ERR_OK; +} + +/** + * Call pppos_create() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +ppp_pcb* +pppapi_pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb) +{ + ppp_pcb* result; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC_RETURN_NULL(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = NULL; + PPPAPI_VAR_REF(msg).msg.msg.serialcreate.pppif = pppif; + PPPAPI_VAR_REF(msg).msg.msg.serialcreate.output_cb = output_cb; + PPPAPI_VAR_REF(msg).msg.msg.serialcreate.link_status_cb = link_status_cb; + PPPAPI_VAR_REF(msg).msg.msg.serialcreate.ctx_cb = ctx_cb; + tcpip_api_call(pppapi_do_pppos_create, &PPPAPI_VAR_REF(msg).call); + result = PPPAPI_VAR_REF(msg).msg.ppp; + PPPAPI_VAR_FREE(msg); + return result; +} +#endif /* PPPOS_SUPPORT */ + + +#if PPPOE_SUPPORT +/** + * Call pppoe_create() inside the tcpip_thread context. + */ +static err_t +pppapi_do_pppoe_create(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + msg->msg.ppp = pppoe_create(msg->msg.msg.ethernetcreate.pppif, msg->msg.msg.ethernetcreate.ethif, + msg->msg.msg.ethernetcreate.service_name, msg->msg.msg.ethernetcreate.concentrator_name, + msg->msg.msg.ethernetcreate.link_status_cb, msg->msg.msg.ethernetcreate.ctx_cb); + return ERR_OK; +} + +/** + * Call pppoe_create() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +ppp_pcb* +pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const char *service_name, + const char *concentrator_name, ppp_link_status_cb_fn link_status_cb, + void *ctx_cb) +{ + ppp_pcb* result; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC_RETURN_NULL(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = NULL; + PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.pppif = pppif; + PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.ethif = ethif; + PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.service_name = service_name; + PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.concentrator_name = concentrator_name; + PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.link_status_cb = link_status_cb; + PPPAPI_VAR_REF(msg).msg.msg.ethernetcreate.ctx_cb = ctx_cb; + tcpip_api_call(pppapi_do_pppoe_create, &PPPAPI_VAR_REF(msg).call); + result = PPPAPI_VAR_REF(msg).msg.ppp; + PPPAPI_VAR_FREE(msg); + return result; +} +#endif /* PPPOE_SUPPORT */ + + +#if PPPOL2TP_SUPPORT +/** + * Call pppol2tp_create() inside the tcpip_thread context. + */ +static err_t +pppapi_do_pppol2tp_create(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + msg->msg.ppp = pppol2tp_create(msg->msg.msg.l2tpcreate.pppif, + msg->msg.msg.l2tpcreate.netif, API_EXPR_REF(msg->msg.msg.l2tpcreate.ipaddr), msg->msg.msg.l2tpcreate.port, +#if PPPOL2TP_AUTH_SUPPORT + msg->msg.msg.l2tpcreate.secret, + msg->msg.msg.l2tpcreate.secret_len, +#else /* PPPOL2TP_AUTH_SUPPORT */ + NULL, + 0, +#endif /* PPPOL2TP_AUTH_SUPPORT */ + msg->msg.msg.l2tpcreate.link_status_cb, msg->msg.msg.l2tpcreate.ctx_cb); + return ERR_OK; +} + +/** + * Call pppol2tp_create() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +ppp_pcb* +pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip_addr_t *ipaddr, u16_t port, + const u8_t *secret, u8_t secret_len, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb) +{ + ppp_pcb* result; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC_RETURN_NULL(msg); +#if !PPPOL2TP_AUTH_SUPPORT + LWIP_UNUSED_ARG(secret); + LWIP_UNUSED_ARG(secret_len); +#endif /* !PPPOL2TP_AUTH_SUPPORT */ + + PPPAPI_VAR_REF(msg).msg.ppp = NULL; + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.pppif = pppif; + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.netif = netif; + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.ipaddr = PPPAPI_VAR_REF(ipaddr); + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.port = port; +#if PPPOL2TP_AUTH_SUPPORT + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.secret = secret; + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.secret_len = secret_len; +#endif /* PPPOL2TP_AUTH_SUPPORT */ + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.link_status_cb = link_status_cb; + PPPAPI_VAR_REF(msg).msg.msg.l2tpcreate.ctx_cb = ctx_cb; + tcpip_api_call(pppapi_do_pppol2tp_create, &PPPAPI_VAR_REF(msg).call); + result = PPPAPI_VAR_REF(msg).msg.ppp; + PPPAPI_VAR_FREE(msg); + return result; +} +#endif /* PPPOL2TP_SUPPORT */ + + +/** + * Call ppp_connect() inside the tcpip_thread context. + */ +static err_t +pppapi_do_ppp_connect(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + return ppp_connect(msg->msg.ppp, msg->msg.msg.connect.holdoff); +} + +/** + * Call ppp_connect() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +err_t +pppapi_connect(ppp_pcb *pcb, u16_t holdoff) +{ + err_t err; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = pcb; + PPPAPI_VAR_REF(msg).msg.msg.connect.holdoff = holdoff; + err = tcpip_api_call(pppapi_do_ppp_connect, &PPPAPI_VAR_REF(msg).call); + PPPAPI_VAR_FREE(msg); + return err; +} + + +#if PPP_SERVER +/** + * Call ppp_listen() inside the tcpip_thread context. + */ +static err_t +pppapi_do_ppp_listen(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + return ppp_listen(msg->msg.ppp); +} + +/** + * Call ppp_listen() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +err_t +pppapi_listen(ppp_pcb *pcb) +{ + err_t err; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = pcb; + err = tcpip_api_call(pppapi_do_ppp_listen, &PPPAPI_VAR_REF(msg).call); + PPPAPI_VAR_FREE(msg); + return err; +} +#endif /* PPP_SERVER */ + + +/** + * Call ppp_close() inside the tcpip_thread context. + */ +static err_t +pppapi_do_ppp_close(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + return ppp_close(msg->msg.ppp, msg->msg.msg.close.nocarrier); +} + +/** + * Call ppp_close() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +err_t +pppapi_close(ppp_pcb *pcb, u8_t nocarrier) +{ + err_t err; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = pcb; + PPPAPI_VAR_REF(msg).msg.msg.close.nocarrier = nocarrier; + err = tcpip_api_call(pppapi_do_ppp_close, &PPPAPI_VAR_REF(msg).call); + PPPAPI_VAR_FREE(msg); + return err; +} + + +/** + * Call ppp_free() inside the tcpip_thread context. + */ +static err_t +pppapi_do_ppp_free(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + return ppp_free(msg->msg.ppp); +} + +/** + * Call ppp_free() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +err_t +pppapi_free(ppp_pcb *pcb) +{ + err_t err; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = pcb; + err = tcpip_api_call(pppapi_do_ppp_free, &PPPAPI_VAR_REF(msg).call); + PPPAPI_VAR_FREE(msg); + return err; +} + + +/** + * Call ppp_ioctl() inside the tcpip_thread context. + */ +static err_t +pppapi_do_ppp_ioctl(struct tcpip_api_call_data *m) +{ + /* cast through void* to silence alignment warnings. + * We know it works because the structs have been instantiated as struct pppapi_msg */ + struct pppapi_msg *msg = (struct pppapi_msg *)(void*)m; + + return ppp_ioctl(msg->msg.ppp, msg->msg.msg.ioctl.cmd, msg->msg.msg.ioctl.arg); +} + +/** + * Call ppp_ioctl() in a thread-safe way by running that function inside the + * tcpip_thread context. + */ +err_t +pppapi_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg) +{ + err_t err; + PPPAPI_VAR_DECLARE(msg); + PPPAPI_VAR_ALLOC(msg); + + PPPAPI_VAR_REF(msg).msg.ppp = pcb; + PPPAPI_VAR_REF(msg).msg.msg.ioctl.cmd = cmd; + PPPAPI_VAR_REF(msg).msg.msg.ioctl.arg = arg; + err = tcpip_api_call(pppapi_do_ppp_ioctl, &PPPAPI_VAR_REF(msg).call); + PPPAPI_VAR_FREE(msg); + return err; +} + +#endif /* LWIP_PPP_API */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.c index 82d78c1..f2f36aa 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppcrypt.c @@ -1,66 +1,66 @@ -/* - * pppcrypt.c - PPP/DES linkage for MS-CHAP and EAP SRP-SHA1 - * - * Extracted from chap_ms.c by James Carlson. - * - * Copyright (c) 1995 Eric Rosenquist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not necessary */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/pppcrypt.h" - - -static u_char pppcrypt_get_7bits(u_char *input, int startBit) { - unsigned int word; - - word = (unsigned)input[startBit / 8] << 8; - word |= (unsigned)input[startBit / 8 + 1]; - - word >>= 15 - (startBit % 8 + 7); - - return word & 0xFE; -} - -/* IN 56 bit DES key missing parity bits - * OUT 64 bit DES key with parity bits added - */ -void pppcrypt_56_to_64_bit_key(u_char *key, u_char * des_key) { - des_key[0] = pppcrypt_get_7bits(key, 0); - des_key[1] = pppcrypt_get_7bits(key, 7); - des_key[2] = pppcrypt_get_7bits(key, 14); - des_key[3] = pppcrypt_get_7bits(key, 21); - des_key[4] = pppcrypt_get_7bits(key, 28); - des_key[5] = pppcrypt_get_7bits(key, 35); - des_key[6] = pppcrypt_get_7bits(key, 42); - des_key[7] = pppcrypt_get_7bits(key, 49); -} - -#endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ +/* + * pppcrypt.c - PPP/DES linkage for MS-CHAP and EAP SRP-SHA1 + * + * Extracted from chap_ms.c by James Carlson. + * + * Copyright (c) 1995 Eric Rosenquist. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not necessary */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/pppcrypt.h" + + +static u_char pppcrypt_get_7bits(u_char *input, int startBit) { + unsigned int word; + + word = (unsigned)input[startBit / 8] << 8; + word |= (unsigned)input[startBit / 8 + 1]; + + word >>= 15 - (startBit % 8 + 7); + + return word & 0xFE; +} + +/* IN 56 bit DES key missing parity bits + * OUT 64 bit DES key with parity bits added + */ +void pppcrypt_56_to_64_bit_key(u_char *key, u_char * des_key) { + des_key[0] = pppcrypt_get_7bits(key, 0); + des_key[1] = pppcrypt_get_7bits(key, 7); + des_key[2] = pppcrypt_get_7bits(key, 14); + des_key[3] = pppcrypt_get_7bits(key, 21); + des_key[4] = pppcrypt_get_7bits(key, 28); + des_key[5] = pppcrypt_get_7bits(key, 35); + des_key[6] = pppcrypt_get_7bits(key, 42); + des_key[7] = pppcrypt_get_7bits(key, 49); +} + +#endif /* PPP_SUPPORT && MSCHAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.c index 3fcd190..c7e2a48 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppoe.c @@ -1,1221 +1,1221 @@ -/***************************************************************************** -* pppoe.c - PPP Over Ethernet implementation for lwIP. -* -* Copyright (c) 2006 by Marc Boucher, Services Informatiques (MBSI) inc. -* -* The authors hereby grant permission to use, copy, modify, distribute, -* and license this software and its documentation for any purpose, provided -* that existing copyright notices are retained in all copies and that this -* notice and the following disclaimer are included verbatim in any -* distributions. No written agreement, license, or royalty fee is required -* for any of the authorized uses. -* -* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -****************************************************************************** -* REVISION HISTORY -* -* 06-01-01 Marc Boucher -* Ported to lwIP. -*****************************************************************************/ - - - -/* based on NetBSD: if_pppoe.c,v 1.64 2006/01/31 23:50:15 martin Exp */ - -/*- - * Copyright (c) 2002 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Martin Husemann . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#if 0 /* UNUSED */ -#include -#include -#endif /* UNUSED */ - -#include "lwip/timeouts.h" -#include "lwip/memp.h" -#include "lwip/stats.h" -#include "lwip/snmp.h" - -#include "netif/ethernet.h" -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/lcp.h" -#include "netif/ppp/ipcp.h" -#include "netif/ppp/pppoe.h" - -/* Memory pool */ -LWIP_MEMPOOL_DECLARE(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES, sizeof(struct pppoe_softc), "PPPOE_IF") - -/* Add a 16 bit unsigned value to a buffer pointed to by PTR */ -#define PPPOE_ADD_16(PTR, VAL) \ - *(PTR)++ = (u8_t)((VAL) / 256); \ - *(PTR)++ = (u8_t)((VAL) % 256) - -/* Add a complete PPPoE header to the buffer pointed to by PTR */ -#define PPPOE_ADD_HEADER(PTR, CODE, SESS, LEN) \ - *(PTR)++ = PPPOE_VERTYPE; \ - *(PTR)++ = (CODE); \ - PPPOE_ADD_16(PTR, SESS); \ - PPPOE_ADD_16(PTR, LEN) - -#define PPPOE_DISC_TIMEOUT (5*1000) /* base for quick timeout calculation */ -#define PPPOE_SLOW_RETRY (60*1000) /* persistent retry interval */ -#define PPPOE_DISC_MAXPADI 4 /* retry PADI four times (quickly) */ -#define PPPOE_DISC_MAXPADR 2 /* retry PADR twice */ - -#ifdef PPPOE_SERVER -#error "PPPOE_SERVER is not yet supported under lwIP!" -/* from if_spppsubr.c */ -#define IFF_PASSIVE IFF_LINK0 /* wait passively for connection */ -#endif - -#define PPPOE_ERRORSTRING_LEN 64 - - -/* callbacks called from PPP core */ -static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p); -static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol); -static void pppoe_connect(ppp_pcb *ppp, void *ctx); -static void pppoe_disconnect(ppp_pcb *ppp, void *ctx); -static err_t pppoe_destroy(ppp_pcb *ppp, void *ctx); - -/* management routines */ -static void pppoe_abort_connect(struct pppoe_softc *); -#if 0 /* UNUSED */ -static void pppoe_clear_softc(struct pppoe_softc *, const char *); -#endif /* UNUSED */ - -/* internal timeout handling */ -static void pppoe_timeout(void *); - -/* sending actual protocol controll packets */ -static err_t pppoe_send_padi(struct pppoe_softc *); -static err_t pppoe_send_padr(struct pppoe_softc *); -#ifdef PPPOE_SERVER -static err_t pppoe_send_pado(struct pppoe_softc *); -static err_t pppoe_send_pads(struct pppoe_softc *); -#endif -static err_t pppoe_send_padt(struct netif *, u_int, const u8_t *); - -/* internal helper functions */ -static err_t pppoe_xmit(struct pppoe_softc *sc, struct pbuf *pb); -static struct pppoe_softc* pppoe_find_softc_by_session(u_int session, struct netif *rcvif); -static struct pppoe_softc* pppoe_find_softc_by_hunique(u8_t *token, size_t len, struct netif *rcvif); - -/** linked list of created pppoe interfaces */ -static struct pppoe_softc *pppoe_softc_list; - -/* Callbacks structure for PPP core */ -static const struct link_callbacks pppoe_callbacks = { - pppoe_connect, -#if PPP_SERVER - NULL, -#endif /* PPP_SERVER */ - pppoe_disconnect, - pppoe_destroy, - pppoe_write, - pppoe_netif_output, - NULL, - NULL -}; - -/* - * Create a new PPP Over Ethernet (PPPoE) connection. - * - * Return 0 on success, an error code on failure. - */ -ppp_pcb *pppoe_create(struct netif *pppif, - struct netif *ethif, - const char *service_name, const char *concentrator_name, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb) -{ - ppp_pcb *ppp; - struct pppoe_softc *sc; - LWIP_UNUSED_ARG(service_name); - LWIP_UNUSED_ARG(concentrator_name); - - sc = (struct pppoe_softc *)LWIP_MEMPOOL_ALLOC(PPPOE_IF); - if (sc == NULL) { - return NULL; - } - - ppp = ppp_new(pppif, &pppoe_callbacks, sc, link_status_cb, ctx_cb); - if (ppp == NULL) { - LWIP_MEMPOOL_FREE(PPPOE_IF, sc); - return NULL; - } - - memset(sc, 0, sizeof(struct pppoe_softc)); - sc->pcb = ppp; - sc->sc_ethif = ethif; - /* put the new interface at the head of the list */ - sc->next = pppoe_softc_list; - pppoe_softc_list = sc; - return ppp; -} - -/* Called by PPP core */ -static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { - struct pppoe_softc *sc = (struct pppoe_softc *)ctx; - struct pbuf *ph; /* Ethernet + PPPoE header */ - err_t ret; -#if MIB2_STATS - u16_t tot_len; -#else /* MIB2_STATS */ - LWIP_UNUSED_ARG(ppp); -#endif /* MIB2_STATS */ - - /* skip address & flags */ - pbuf_header(p, -(s16_t)2); - - ph = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN), PBUF_RAM); - if(!ph) { - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.proterr); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - pbuf_free(p); - return ERR_MEM; - } - - pbuf_header(ph, -(s16_t)PPPOE_HEADERLEN); /* hide PPPoE header */ - pbuf_cat(ph, p); -#if MIB2_STATS - tot_len = ph->tot_len; -#endif /* MIB2_STATS */ - - ret = pppoe_xmit(sc, ph); - if (ret != ERR_OK) { - LINK_STATS_INC(link.err); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - return ret; - } - - MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, (u16_t)tot_len); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); - LINK_STATS_INC(link.xmit); - return ERR_OK; -} - -/* Called by PPP core */ -static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) { - struct pppoe_softc *sc = (struct pppoe_softc *)ctx; - struct pbuf *pb; - u8_t *pl; - err_t err; -#if MIB2_STATS - u16_t tot_len; -#else /* MIB2_STATS */ - LWIP_UNUSED_ARG(ppp); -#endif /* MIB2_STATS */ - - /* @todo: try to use pbuf_header() here! */ - pb = pbuf_alloc(PBUF_LINK, PPPOE_HEADERLEN + sizeof(protocol), PBUF_RAM); - if(!pb) { - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.proterr); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - return ERR_MEM; - } - - pbuf_header(pb, -(s16_t)PPPOE_HEADERLEN); - - pl = (u8_t*)pb->payload; - PUTSHORT(protocol, pl); - - pbuf_chain(pb, p); -#if MIB2_STATS - tot_len = pb->tot_len; -#endif /* MIB2_STATS */ - - if( (err = pppoe_xmit(sc, pb)) != ERR_OK) { - LINK_STATS_INC(link.err); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - return err; - } - - MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, tot_len); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); - LINK_STATS_INC(link.xmit); - return ERR_OK; -} - -static err_t -pppoe_destroy(ppp_pcb *ppp, void *ctx) -{ - struct pppoe_softc *sc = (struct pppoe_softc *)ctx; - struct pppoe_softc **copp, *freep; - LWIP_UNUSED_ARG(ppp); - - sys_untimeout(pppoe_timeout, sc); - - /* remove interface from list */ - for (copp = &pppoe_softc_list; (freep = *copp); copp = &freep->next) { - if (freep == sc) { - *copp = freep->next; - break; - } - } - -#ifdef PPPOE_TODO - if (sc->sc_concentrator_name) { - mem_free(sc->sc_concentrator_name); - } - if (sc->sc_service_name) { - mem_free(sc->sc_service_name); - } -#endif /* PPPOE_TODO */ - LWIP_MEMPOOL_FREE(PPPOE_IF, sc); - - return ERR_OK; -} - -/* - * Find the interface handling the specified session. - * Note: O(number of sessions open), this is a client-side only, mean - * and lean implementation, so number of open sessions typically should - * be 1. - */ -static struct pppoe_softc* pppoe_find_softc_by_session(u_int session, struct netif *rcvif) { - struct pppoe_softc *sc; - - for (sc = pppoe_softc_list; sc != NULL; sc = sc->next) { - if (sc->sc_state == PPPOE_STATE_SESSION - && sc->sc_session == session - && sc->sc_ethif == rcvif) { - return sc; - } - } - return NULL; -} - -/* Check host unique token passed and return appropriate softc pointer, - * or NULL if token is bogus. */ -static struct pppoe_softc* pppoe_find_softc_by_hunique(u8_t *token, size_t len, struct netif *rcvif) { - struct pppoe_softc *sc, *t; - - if (len != sizeof sc) { - return NULL; - } - MEMCPY(&t, token, len); - - for (sc = pppoe_softc_list; sc != NULL; sc = sc->next) { - if (sc == t) { - break; - } - } - - if (sc == NULL) { - PPPDEBUG(LOG_DEBUG, ("pppoe: alien host unique tag, no session found\n")); - return NULL; - } - - /* should be safe to access *sc now */ - if (sc->sc_state < PPPOE_STATE_PADI_SENT || sc->sc_state >= PPPOE_STATE_SESSION) { - PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": host unique tag found, but it belongs to a connection in state %d\n", - sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, sc->sc_state)); - return NULL; - } - if (sc->sc_ethif != rcvif) { - PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": wrong interface, not accepting host unique\n", - sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - return NULL; - } - return sc; -} - -/* analyze and handle a single received packet while not in session state */ -void -pppoe_disc_input(struct netif *netif, struct pbuf *pb) -{ - u16_t tag, len; - u16_t session, plen; - struct pppoe_softc *sc; -#if PPP_DEBUG - const char *err_msg = NULL; -#endif /* PPP_DEBUG */ - u8_t *ac_cookie; - u16_t ac_cookie_len; -#ifdef PPPOE_SERVER - u8_t *hunique; - size_t hunique_len; -#endif - struct pppoehdr *ph; - struct pppoetag pt; - int off; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - int err; -#endif - struct eth_hdr *ethhdr; - - /* don't do anything if there is not a single PPPoE instance */ - if (pppoe_softc_list == NULL) { - pbuf_free(pb); - return; - } - - pb = ppp_singlebuf(pb); - - if (pb->len < sizeof(*ethhdr)) { - goto done; - } - ethhdr = (struct eth_hdr *)pb->payload; - off = sizeof(*ethhdr); - - ac_cookie = NULL; - ac_cookie_len = 0; -#ifdef PPPOE_SERVER - hunique = NULL; - hunique_len = 0; -#endif - session = 0; - if (pb->len - off < (u16_t)PPPOE_HEADERLEN) { - PPPDEBUG(LOG_DEBUG, ("pppoe: packet too short: %d\n", pb->len)); - goto done; - } - - ph = (struct pppoehdr *) (ethhdr + 1); - if (ph->vertype != PPPOE_VERTYPE) { - PPPDEBUG(LOG_DEBUG, ("pppoe: unknown version/type packet: 0x%x\n", ph->vertype)); - goto done; - } - session = lwip_ntohs(ph->session); - plen = lwip_ntohs(ph->plen); - off += sizeof(*ph); - - if (plen + off > pb->len) { - PPPDEBUG(LOG_DEBUG, ("pppoe: packet content does not fit: data available = %d, packet size = %u\n", - pb->len - off, plen)); - goto done; - } - if(pb->tot_len == pb->len) { - pb->tot_len = pb->len = (u16_t)off + plen; /* ignore trailing garbage */ - } - tag = 0; - len = 0; - sc = NULL; - while (off + sizeof(pt) <= pb->len) { - MEMCPY(&pt, (u8_t*)pb->payload + off, sizeof(pt)); - tag = lwip_ntohs(pt.tag); - len = lwip_ntohs(pt.len); - if (off + sizeof(pt) + len > pb->len) { - PPPDEBUG(LOG_DEBUG, ("pppoe: tag 0x%x len 0x%x is too long\n", tag, len)); - goto done; - } - switch (tag) { - case PPPOE_TAG_EOL: - goto breakbreak; - case PPPOE_TAG_SNAME: - break; /* ignored */ - case PPPOE_TAG_ACNAME: - break; /* ignored */ - case PPPOE_TAG_HUNIQUE: - if (sc != NULL) { - break; - } -#ifdef PPPOE_SERVER - hunique = (u8_t*)pb->payload + off + sizeof(pt); - hunique_len = len; -#endif - sc = pppoe_find_softc_by_hunique((u8_t*)pb->payload + off + sizeof(pt), len, netif); - break; - case PPPOE_TAG_ACCOOKIE: - if (ac_cookie == NULL) { - if (len > PPPOE_MAX_AC_COOKIE_LEN) { - PPPDEBUG(LOG_DEBUG, ("pppoe: AC cookie is too long: len = %d, max = %d\n", len, PPPOE_MAX_AC_COOKIE_LEN)); - goto done; - } - ac_cookie = (u8_t*)pb->payload + off + sizeof(pt); - ac_cookie_len = len; - } - break; -#if PPP_DEBUG - case PPPOE_TAG_SNAME_ERR: - err_msg = "SERVICE NAME ERROR"; - break; - case PPPOE_TAG_ACSYS_ERR: - err_msg = "AC SYSTEM ERROR"; - break; - case PPPOE_TAG_GENERIC_ERR: - err_msg = "GENERIC ERROR"; - break; -#endif /* PPP_DEBUG */ - default: - break; - } -#if PPP_DEBUG - if (err_msg != NULL) { - char error_tmp[PPPOE_ERRORSTRING_LEN]; - u16_t error_len = LWIP_MIN(len, sizeof(error_tmp)-1); - strncpy(error_tmp, (char*)pb->payload + off + sizeof(pt), error_len); - error_tmp[error_len] = '\0'; - if (sc) { - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": %s: %s\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err_msg, error_tmp)); - } else { - PPPDEBUG(LOG_DEBUG, ("pppoe: %s: %s\n", err_msg, error_tmp)); - } - } -#endif /* PPP_DEBUG */ - off += sizeof(pt) + len; - } - -breakbreak:; - switch (ph->code) { - case PPPOE_CODE_PADI: -#ifdef PPPOE_SERVER - /* - * got service name, concentrator name, and/or host unique. - * ignore if we have no interfaces with IFF_PASSIVE|IFF_UP. - */ - if (LIST_EMPTY(&pppoe_softc_list)) { - goto done; - } - LIST_FOREACH(sc, &pppoe_softc_list, sc_list) { - if (!(sc->sc_sppp.pp_if.if_flags & IFF_UP)) { - continue; - } - if (!(sc->sc_sppp.pp_if.if_flags & IFF_PASSIVE)) { - continue; - } - if (sc->sc_state == PPPOE_STATE_INITIAL) { - break; - } - } - if (sc == NULL) { - /* PPPDEBUG(LOG_DEBUG, ("pppoe: free passive interface is not found\n")); */ - goto done; - } - if (hunique) { - if (sc->sc_hunique) { - mem_free(sc->sc_hunique); - } - sc->sc_hunique = mem_malloc(hunique_len); - if (sc->sc_hunique == NULL) { - goto done; - } - sc->sc_hunique_len = hunique_len; - MEMCPY(sc->sc_hunique, hunique, hunique_len); - } - MEMCPY(&sc->sc_dest, eh->ether_shost, sizeof sc->sc_dest); - sc->sc_state = PPPOE_STATE_PADO_SENT; - pppoe_send_pado(sc); - break; -#endif /* PPPOE_SERVER */ - case PPPOE_CODE_PADR: -#ifdef PPPOE_SERVER - /* - * get sc from ac_cookie if IFF_PASSIVE - */ - if (ac_cookie == NULL) { - /* be quiet if there is not a single pppoe instance */ - PPPDEBUG(LOG_DEBUG, ("pppoe: received PADR but not includes ac_cookie\n")); - goto done; - } - sc = pppoe_find_softc_by_hunique(ac_cookie, ac_cookie_len, netif); - if (sc == NULL) { - /* be quiet if there is not a single pppoe instance */ - if (!LIST_EMPTY(&pppoe_softc_list)) { - PPPDEBUG(LOG_DEBUG, ("pppoe: received PADR but could not find request for it\n")); - } - goto done; - } - if (sc->sc_state != PPPOE_STATE_PADO_SENT) { - PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": received unexpected PADR\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - goto done; - } - if (hunique) { - if (sc->sc_hunique) { - mem_free(sc->sc_hunique); - } - sc->sc_hunique = mem_malloc(hunique_len); - if (sc->sc_hunique == NULL) { - goto done; - } - sc->sc_hunique_len = hunique_len; - MEMCPY(sc->sc_hunique, hunique, hunique_len); - } - pppoe_send_pads(sc); - sc->sc_state = PPPOE_STATE_SESSION; - ppp_start(sc->pcb); /* notify upper layers */ - break; -#else - /* ignore, we are no access concentrator */ - goto done; -#endif /* PPPOE_SERVER */ - case PPPOE_CODE_PADO: - if (sc == NULL) { - /* be quiet if there is not a single pppoe instance */ - if (pppoe_softc_list != NULL) { - PPPDEBUG(LOG_DEBUG, ("pppoe: received PADO but could not find request for it\n")); - } - goto done; - } - if (sc->sc_state != PPPOE_STATE_PADI_SENT) { - PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": received unexpected PADO\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - goto done; - } - if (ac_cookie) { - sc->sc_ac_cookie_len = ac_cookie_len; - MEMCPY(sc->sc_ac_cookie, ac_cookie, ac_cookie_len); - } - MEMCPY(&sc->sc_dest, ethhdr->src.addr, sizeof(sc->sc_dest.addr)); - sys_untimeout(pppoe_timeout, sc); - sc->sc_padr_retried = 0; - sc->sc_state = PPPOE_STATE_PADR_SENT; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppoe_send_padr(sc)) != 0) - { - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADR, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); - } -#else - pppoe_send_padr(sc); -#endif /*defined(LWIP_DEBUG) && (DEBUG_LOG == LWIP_DEBUG_ON) */ - sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), pppoe_timeout, sc); - break; - case PPPOE_CODE_PADS: - if (sc == NULL) { - goto done; - } - sc->sc_session = session; - sys_untimeout(pppoe_timeout, sc); - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": session 0x%x connected\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, session)); - sc->sc_state = PPPOE_STATE_SESSION; - ppp_start(sc->pcb); /* notify upper layers */ - break; - case PPPOE_CODE_PADT: - /* Don't disconnect here, we let the LCP Echo/Reply find the fact - * that PPP session is down. Asking the PPP stack to end the session - * require strict checking about the PPP phase to prevent endless - * disconnection loops. - */ -#if 0 /* UNUSED */ - if (sc == NULL) { /* PADT frames are rarely sent with a hunique tag, this is actually almost always true */ - goto done; - } - pppoe_clear_softc(sc, "received PADT"); -#endif /* UNUSED */ - break; - default: - if(sc) { - PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": unknown code (0x%"X16_F") session = 0x%"X16_F"\n", - sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, - (u16_t)ph->code, session)); - } else { - PPPDEBUG(LOG_DEBUG, ("pppoe: unknown code (0x%"X16_F") session = 0x%"X16_F"\n", (u16_t)ph->code, session)); - } - break; - } - -done: - pbuf_free(pb); - return; -} - -void -pppoe_data_input(struct netif *netif, struct pbuf *pb) -{ - u16_t session, plen; - struct pppoe_softc *sc; - struct pppoehdr *ph; -#ifdef PPPOE_TERM_UNKNOWN_SESSIONS - u8_t shost[ETHER_ADDR_LEN]; -#endif - -#ifdef PPPOE_TERM_UNKNOWN_SESSIONS - MEMCPY(shost, ((struct eth_hdr *)pb->payload)->src.addr, sizeof(shost)); -#endif - if (pbuf_header(pb, -(s16_t)sizeof(struct eth_hdr)) != 0) { - /* bail out */ - PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_header failed\n")); - LINK_STATS_INC(link.lenerr); - goto drop; - } - - if (pb->len < sizeof(*ph)) { - PPPDEBUG(LOG_DEBUG, ("pppoe_data_input: could not get PPPoE header\n")); - goto drop; - } - ph = (struct pppoehdr *)pb->payload; - - if (ph->vertype != PPPOE_VERTYPE) { - PPPDEBUG(LOG_DEBUG, ("pppoe (data): unknown version/type packet: 0x%x\n", ph->vertype)); - goto drop; - } - if (ph->code != 0) { - goto drop; - } - - session = lwip_ntohs(ph->session); - sc = pppoe_find_softc_by_session(session, netif); - if (sc == NULL) { -#ifdef PPPOE_TERM_UNKNOWN_SESSIONS - PPPDEBUG(LOG_DEBUG, ("pppoe: input for unknown session 0x%x, sending PADT\n", session)); - pppoe_send_padt(netif, session, shost); -#endif - goto drop; - } - - plen = lwip_ntohs(ph->plen); - - if (pbuf_header(pb, -(s16_t)(PPPOE_HEADERLEN)) != 0) { - /* bail out */ - PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_header PPPOE_HEADERLEN failed\n")); - LINK_STATS_INC(link.lenerr); - goto drop; - } - - PPPDEBUG(LOG_DEBUG, ("pppoe_data_input: %c%c%"U16_F": pkthdr.len=%d, pppoe.len=%d\n", - sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, - pb->len, plen)); - - if (pb->tot_len < plen) { - goto drop; - } - - /* Dispatch the packet thereby consuming it. */ - ppp_input(sc->pcb, pb); - return; - -drop: - pbuf_free(pb); -} - -static err_t -pppoe_output(struct pppoe_softc *sc, struct pbuf *pb) -{ - struct eth_hdr *ethhdr; - u16_t etype; - err_t res; - - /* make room for Ethernet header - should not fail */ - if (pbuf_header(pb, (s16_t)(sizeof(struct eth_hdr))) != 0) { - /* bail out */ - PPPDEBUG(LOG_ERR, ("pppoe: %c%c%"U16_F": pppoe_output: could not allocate room for Ethernet header\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - LINK_STATS_INC(link.lenerr); - pbuf_free(pb); - return ERR_BUF; - } - ethhdr = (struct eth_hdr *)pb->payload; - etype = sc->sc_state == PPPOE_STATE_SESSION ? ETHTYPE_PPPOE : ETHTYPE_PPPOEDISC; - ethhdr->type = lwip_htons(etype); - MEMCPY(ðhdr->dest.addr, &sc->sc_dest.addr, sizeof(ethhdr->dest.addr)); - MEMCPY(ðhdr->src.addr, &sc->sc_ethif->hwaddr, sizeof(ethhdr->src.addr)); - - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F" (%x) state=%d, session=0x%x output -> %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F", len=%d\n", - sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, etype, - sc->sc_state, sc->sc_session, - sc->sc_dest.addr[0], sc->sc_dest.addr[1], sc->sc_dest.addr[2], sc->sc_dest.addr[3], sc->sc_dest.addr[4], sc->sc_dest.addr[5], - pb->tot_len)); - - res = sc->sc_ethif->linkoutput(sc->sc_ethif, pb); - - pbuf_free(pb); - - return res; -} - -static err_t -pppoe_send_padi(struct pppoe_softc *sc) -{ - struct pbuf *pb; - u8_t *p; - int len; -#ifdef PPPOE_TODO - int l1 = 0, l2 = 0; /* XXX: gcc */ -#endif /* PPPOE_TODO */ - - /* calculate length of frame (excluding ethernet header + pppoe header) */ - len = 2 + 2 + 2 + 2 + sizeof sc; /* service name tag is required, host unique is send too */ -#ifdef PPPOE_TODO - if (sc->sc_service_name != NULL) { - l1 = (int)strlen(sc->sc_service_name); - len += l1; - } - if (sc->sc_concentrator_name != NULL) { - l2 = (int)strlen(sc->sc_concentrator_name); - len += 2 + 2 + l2; - } -#endif /* PPPOE_TODO */ - LWIP_ASSERT("sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff", - sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff); - - /* allocate a buffer */ - pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); - if (!pb) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - p = (u8_t*)pb->payload; - /* fill in pkt */ - PPPOE_ADD_HEADER(p, PPPOE_CODE_PADI, 0, (u16_t)len); - PPPOE_ADD_16(p, PPPOE_TAG_SNAME); -#ifdef PPPOE_TODO - if (sc->sc_service_name != NULL) { - PPPOE_ADD_16(p, l1); - MEMCPY(p, sc->sc_service_name, l1); - p += l1; - } else -#endif /* PPPOE_TODO */ - { - PPPOE_ADD_16(p, 0); - } -#ifdef PPPOE_TODO - if (sc->sc_concentrator_name != NULL) { - PPPOE_ADD_16(p, PPPOE_TAG_ACNAME); - PPPOE_ADD_16(p, l2); - MEMCPY(p, sc->sc_concentrator_name, l2); - p += l2; - } -#endif /* PPPOE_TODO */ - PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); - PPPOE_ADD_16(p, sizeof(sc)); - MEMCPY(p, &sc, sizeof sc); - - /* send pkt */ - return pppoe_output(sc, pb); -} - -static void -pppoe_timeout(void *arg) -{ - u32_t retry_wait; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - int err; -#endif - struct pppoe_softc *sc = (struct pppoe_softc*)arg; - - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": timeout\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - - switch (sc->sc_state) { - case PPPOE_STATE_PADI_SENT: - /* - * We have two basic ways of retrying: - * - Quick retry mode: try a few times in short sequence - * - Slow retry mode: we already had a connection successfully - * established and will try infinitely (without user - * intervention) - * We only enter slow retry mode if IFF_LINK1 (aka autodial) - * is not set. - */ - if (sc->sc_padi_retried < 0xff) { - sc->sc_padi_retried++; - } - if (!sc->pcb->settings.persist && sc->sc_padi_retried >= PPPOE_DISC_MAXPADI) { -#if 0 - if ((sc->sc_sppp.pp_if.if_flags & IFF_LINK1) == 0) { - /* slow retry mode */ - retry_wait = PPPOE_SLOW_RETRY; - } else -#endif - { - pppoe_abort_connect(sc); - return; - } - } - /* initialize for quick retry mode */ - retry_wait = LWIP_MIN(PPPOE_DISC_TIMEOUT * sc->sc_padi_retried, PPPOE_SLOW_RETRY); -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppoe_send_padi(sc)) != 0) { - sc->sc_padi_retried--; - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to transmit PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); - } -#else - pppoe_send_padi(sc); -#endif - sys_timeout(retry_wait, pppoe_timeout, sc); - break; - - case PPPOE_STATE_PADR_SENT: - sc->sc_padr_retried++; - if (sc->sc_padr_retried >= PPPOE_DISC_MAXPADR) { - MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); - sc->sc_state = PPPOE_STATE_PADI_SENT; - sc->sc_padr_retried = 0; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppoe_send_padi(sc)) != 0) { - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); - } -#else - pppoe_send_padi(sc); -#endif - sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padi_retried), pppoe_timeout, sc); - return; - } -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppoe_send_padr(sc)) != 0) { - sc->sc_padr_retried--; - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADR, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); - } -#else - if (pppoe_send_padr(sc) != 0) { - sc->sc_padr_retried--; - } -#endif - sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), pppoe_timeout, sc); - break; - default: - return; /* all done, work in peace */ - } -} - -/* Start a connection (i.e. initiate discovery phase) */ -static void -pppoe_connect(ppp_pcb *ppp, void *ctx) -{ -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - err_t err; -#endif - struct pppoe_softc *sc = (struct pppoe_softc *)ctx; - lcp_options *lcp_wo; - lcp_options *lcp_ao; -#if PPP_IPV4_SUPPORT && VJ_SUPPORT - ipcp_options *ipcp_wo; - ipcp_options *ipcp_ao; -#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ - - sc->sc_session = 0; - sc->sc_ac_cookie_len = 0; - sc->sc_padi_retried = 0; - sc->sc_padr_retried = 0; - /* changed to real address later */ - MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); -#ifdef PPPOE_SERVER - /* wait PADI if IFF_PASSIVE */ - if ((sc->sc_sppp.pp_if.if_flags & IFF_PASSIVE)) { - return 0; - } -#endif - - lcp_wo = &ppp->lcp_wantoptions; - lcp_wo->mru = sc->sc_ethif->mtu-PPPOE_HEADERLEN-2; /* two byte PPP protocol discriminator, then IP data */ - lcp_wo->neg_asyncmap = 0; - lcp_wo->neg_pcompression = 0; - lcp_wo->neg_accompression = 0; - lcp_wo->passive = 0; - lcp_wo->silent = 0; - - lcp_ao = &ppp->lcp_allowoptions; - lcp_ao->mru = sc->sc_ethif->mtu-PPPOE_HEADERLEN-2; /* two byte PPP protocol discriminator, then IP data */ - lcp_ao->neg_asyncmap = 0; - lcp_ao->neg_pcompression = 0; - lcp_ao->neg_accompression = 0; - -#if PPP_IPV4_SUPPORT && VJ_SUPPORT - ipcp_wo = &ppp->ipcp_wantoptions; - ipcp_wo->neg_vj = 0; - ipcp_wo->old_vj = 0; - - ipcp_ao = &ppp->ipcp_allowoptions; - ipcp_ao->neg_vj = 0; - ipcp_ao->old_vj = 0; -#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ - - /* save state, in case we fail to send PADI */ - sc->sc_state = PPPOE_STATE_PADI_SENT; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppoe_send_padi(sc)) != 0) { - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); - } -#else - pppoe_send_padi(sc); -#endif - sys_timeout(PPPOE_DISC_TIMEOUT, pppoe_timeout, sc); -} - -/* disconnect */ -static void -pppoe_disconnect(ppp_pcb *ppp, void *ctx) -{ - struct pppoe_softc *sc = (struct pppoe_softc *)ctx; - - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": disconnecting\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - if (sc->sc_state == PPPOE_STATE_SESSION) { - pppoe_send_padt(sc->sc_ethif, sc->sc_session, (const u8_t *)&sc->sc_dest); - } - - /* stop any timer, disconnect can be called while initiating is in progress */ - sys_untimeout(pppoe_timeout, sc); - sc->sc_state = PPPOE_STATE_INITIAL; -#ifdef PPPOE_SERVER - if (sc->sc_hunique) { - mem_free(sc->sc_hunique); - sc->sc_hunique = NULL; /* probably not necessary, if state is initial we shouldn't have to access hunique anyway */ - } - sc->sc_hunique_len = 0; /* probably not necessary, if state is initial we shouldn't have to access hunique anyway */ -#endif - ppp_link_end(ppp); /* notify upper layers */ - return; -} - -/* Connection attempt aborted */ -static void -pppoe_abort_connect(struct pppoe_softc *sc) -{ - PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": could not establish connection\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - sc->sc_state = PPPOE_STATE_INITIAL; - ppp_link_failed(sc->pcb); /* notify upper layers */ -} - -/* Send a PADR packet */ -static err_t -pppoe_send_padr(struct pppoe_softc *sc) -{ - struct pbuf *pb; - u8_t *p; - size_t len; -#ifdef PPPOE_TODO - size_t l1 = 0; /* XXX: gcc */ -#endif /* PPPOE_TODO */ - - len = 2 + 2 + 2 + 2 + sizeof(sc); /* service name, host unique */ -#ifdef PPPOE_TODO - if (sc->sc_service_name != NULL) { /* service name tag maybe empty */ - l1 = strlen(sc->sc_service_name); - len += l1; - } -#endif /* PPPOE_TODO */ - if (sc->sc_ac_cookie_len > 0) { - len += 2 + 2 + sc->sc_ac_cookie_len; /* AC cookie */ - } - LWIP_ASSERT("sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff", - sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff); - pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); - if (!pb) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - p = (u8_t*)pb->payload; - PPPOE_ADD_HEADER(p, PPPOE_CODE_PADR, 0, len); - PPPOE_ADD_16(p, PPPOE_TAG_SNAME); -#ifdef PPPOE_TODO - if (sc->sc_service_name != NULL) { - PPPOE_ADD_16(p, l1); - MEMCPY(p, sc->sc_service_name, l1); - p += l1; - } else -#endif /* PPPOE_TODO */ - { - PPPOE_ADD_16(p, 0); - } - if (sc->sc_ac_cookie_len > 0) { - PPPOE_ADD_16(p, PPPOE_TAG_ACCOOKIE); - PPPOE_ADD_16(p, sc->sc_ac_cookie_len); - MEMCPY(p, sc->sc_ac_cookie, sc->sc_ac_cookie_len); - p += sc->sc_ac_cookie_len; - } - PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); - PPPOE_ADD_16(p, sizeof(sc)); - MEMCPY(p, &sc, sizeof sc); - - return pppoe_output(sc, pb); -} - -/* send a PADT packet */ -static err_t -pppoe_send_padt(struct netif *outgoing_if, u_int session, const u8_t *dest) -{ - struct pbuf *pb; - struct eth_hdr *ethhdr; - err_t res; - u8_t *p; - - pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN), PBUF_RAM); - if (!pb) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - pbuf_header(pb, (s16_t)sizeof(struct eth_hdr)); - ethhdr = (struct eth_hdr *)pb->payload; - ethhdr->type = PP_HTONS(ETHTYPE_PPPOEDISC); - MEMCPY(ðhdr->dest.addr, dest, sizeof(ethhdr->dest.addr)); - MEMCPY(ðhdr->src.addr, &outgoing_if->hwaddr, sizeof(ethhdr->src.addr)); - - p = (u8_t*)(ethhdr + 1); - PPPOE_ADD_HEADER(p, PPPOE_CODE_PADT, session, 0); - - res = outgoing_if->linkoutput(outgoing_if, pb); - - pbuf_free(pb); - - return res; -} - -#ifdef PPPOE_SERVER -static err_t -pppoe_send_pado(struct pppoe_softc *sc) -{ - struct pbuf *pb; - u8_t *p; - size_t len; - - /* calc length */ - len = 0; - /* include ac_cookie */ - len += 2 + 2 + sizeof(sc); - /* include hunique */ - len += 2 + 2 + sc->sc_hunique_len; - pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); - if (!pb) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - p = (u8_t*)pb->payload; - PPPOE_ADD_HEADER(p, PPPOE_CODE_PADO, 0, len); - PPPOE_ADD_16(p, PPPOE_TAG_ACCOOKIE); - PPPOE_ADD_16(p, sizeof(sc)); - MEMCPY(p, &sc, sizeof(sc)); - p += sizeof(sc); - PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); - PPPOE_ADD_16(p, sc->sc_hunique_len); - MEMCPY(p, sc->sc_hunique, sc->sc_hunique_len); - return pppoe_output(sc, pb); -} - -static err_t -pppoe_send_pads(struct pppoe_softc *sc) -{ - struct pbuf *pb; - u8_t *p; - size_t len, l1 = 0; /* XXX: gcc */ - - sc->sc_session = mono_time.tv_sec % 0xff + 1; - /* calc length */ - len = 0; - /* include hunique */ - len += 2 + 2 + 2 + 2 + sc->sc_hunique_len; /* service name, host unique*/ - if (sc->sc_service_name != NULL) { /* service name tag maybe empty */ - l1 = strlen(sc->sc_service_name); - len += l1; - } - pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); - if (!pb) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - p = (u8_t*)pb->payload; - PPPOE_ADD_HEADER(p, PPPOE_CODE_PADS, sc->sc_session, len); - PPPOE_ADD_16(p, PPPOE_TAG_SNAME); - if (sc->sc_service_name != NULL) { - PPPOE_ADD_16(p, l1); - MEMCPY(p, sc->sc_service_name, l1); - p += l1; - } else { - PPPOE_ADD_16(p, 0); - } - PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); - PPPOE_ADD_16(p, sc->sc_hunique_len); - MEMCPY(p, sc->sc_hunique, sc->sc_hunique_len); - return pppoe_output(sc, pb); -} -#endif - -static err_t -pppoe_xmit(struct pppoe_softc *sc, struct pbuf *pb) -{ - u8_t *p; - size_t len; - - len = pb->tot_len; - - /* make room for PPPoE header - should not fail */ - if (pbuf_header(pb, (s16_t)(PPPOE_HEADERLEN)) != 0) { - /* bail out */ - PPPDEBUG(LOG_ERR, ("pppoe: %c%c%"U16_F": pppoe_xmit: could not allocate room for PPPoE header\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - LINK_STATS_INC(link.lenerr); - pbuf_free(pb); - return ERR_BUF; - } - - p = (u8_t*)pb->payload; - PPPOE_ADD_HEADER(p, 0, sc->sc_session, len); - - return pppoe_output(sc, pb); -} - -#if 0 /*def PFIL_HOOKS*/ -static int -pppoe_ifattach_hook(void *arg, struct pbuf **mp, struct netif *ifp, int dir) -{ - struct pppoe_softc *sc; - int s; - - if (mp != (struct pbuf **)PFIL_IFNET_DETACH) { - return 0; - } - - LIST_FOREACH(sc, &pppoe_softc_list, sc_list) { - if (sc->sc_ethif != ifp) { - continue; - } - if (sc->sc_sppp.pp_if.if_flags & IFF_UP) { - sc->sc_sppp.pp_if.if_flags &= ~(IFF_UP|IFF_RUNNING); - PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": ethernet interface detached, going down\n", - sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); - } - sc->sc_ethif = NULL; - pppoe_clear_softc(sc, "ethernet interface detached"); - } - - return 0; -} -#endif - -#if 0 /* UNUSED */ -static void -pppoe_clear_softc(struct pppoe_softc *sc, const char *message) -{ - LWIP_UNUSED_ARG(message); - - /* stop timer */ - sys_untimeout(pppoe_timeout, sc); - PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": session 0x%x terminated, %s\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, sc->sc_session, message)); - sc->sc_state = PPPOE_STATE_INITIAL; - ppp_link_end(sc->pcb); /* notify upper layers - /!\ dangerous /!\ - see pppoe_disc_input() */ -} -#endif /* UNUSED */ -#endif /* PPP_SUPPORT && PPPOE_SUPPORT */ +/***************************************************************************** +* pppoe.c - PPP Over Ethernet implementation for lwIP. +* +* Copyright (c) 2006 by Marc Boucher, Services Informatiques (MBSI) inc. +* +* The authors hereby grant permission to use, copy, modify, distribute, +* and license this software and its documentation for any purpose, provided +* that existing copyright notices are retained in all copies and that this +* notice and the following disclaimer are included verbatim in any +* distributions. No written agreement, license, or royalty fee is required +* for any of the authorized uses. +* +* THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +****************************************************************************** +* REVISION HISTORY +* +* 06-01-01 Marc Boucher +* Ported to lwIP. +*****************************************************************************/ + + + +/* based on NetBSD: if_pppoe.c,v 1.64 2006/01/31 23:50:15 martin Exp */ + +/*- + * Copyright (c) 2002 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Martin Husemann . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#if 0 /* UNUSED */ +#include +#include +#endif /* UNUSED */ + +#include "lwip/timeouts.h" +#include "lwip/memp.h" +#include "lwip/stats.h" +#include "lwip/snmp.h" + +#include "netif/ethernet.h" +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/lcp.h" +#include "netif/ppp/ipcp.h" +#include "netif/ppp/pppoe.h" + +/* Memory pool */ +LWIP_MEMPOOL_DECLARE(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES, sizeof(struct pppoe_softc), "PPPOE_IF") + +/* Add a 16 bit unsigned value to a buffer pointed to by PTR */ +#define PPPOE_ADD_16(PTR, VAL) \ + *(PTR)++ = (u8_t)((VAL) / 256); \ + *(PTR)++ = (u8_t)((VAL) % 256) + +/* Add a complete PPPoE header to the buffer pointed to by PTR */ +#define PPPOE_ADD_HEADER(PTR, CODE, SESS, LEN) \ + *(PTR)++ = PPPOE_VERTYPE; \ + *(PTR)++ = (CODE); \ + PPPOE_ADD_16(PTR, SESS); \ + PPPOE_ADD_16(PTR, LEN) + +#define PPPOE_DISC_TIMEOUT (5*1000) /* base for quick timeout calculation */ +#define PPPOE_SLOW_RETRY (60*1000) /* persistent retry interval */ +#define PPPOE_DISC_MAXPADI 4 /* retry PADI four times (quickly) */ +#define PPPOE_DISC_MAXPADR 2 /* retry PADR twice */ + +#ifdef PPPOE_SERVER +#error "PPPOE_SERVER is not yet supported under lwIP!" +/* from if_spppsubr.c */ +#define IFF_PASSIVE IFF_LINK0 /* wait passively for connection */ +#endif + +#define PPPOE_ERRORSTRING_LEN 64 + + +/* callbacks called from PPP core */ +static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p); +static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol); +static void pppoe_connect(ppp_pcb *ppp, void *ctx); +static void pppoe_disconnect(ppp_pcb *ppp, void *ctx); +static err_t pppoe_destroy(ppp_pcb *ppp, void *ctx); + +/* management routines */ +static void pppoe_abort_connect(struct pppoe_softc *); +#if 0 /* UNUSED */ +static void pppoe_clear_softc(struct pppoe_softc *, const char *); +#endif /* UNUSED */ + +/* internal timeout handling */ +static void pppoe_timeout(void *); + +/* sending actual protocol controll packets */ +static err_t pppoe_send_padi(struct pppoe_softc *); +static err_t pppoe_send_padr(struct pppoe_softc *); +#ifdef PPPOE_SERVER +static err_t pppoe_send_pado(struct pppoe_softc *); +static err_t pppoe_send_pads(struct pppoe_softc *); +#endif +static err_t pppoe_send_padt(struct netif *, u_int, const u8_t *); + +/* internal helper functions */ +static err_t pppoe_xmit(struct pppoe_softc *sc, struct pbuf *pb); +static struct pppoe_softc* pppoe_find_softc_by_session(u_int session, struct netif *rcvif); +static struct pppoe_softc* pppoe_find_softc_by_hunique(u8_t *token, size_t len, struct netif *rcvif); + +/** linked list of created pppoe interfaces */ +static struct pppoe_softc *pppoe_softc_list; + +/* Callbacks structure for PPP core */ +static const struct link_callbacks pppoe_callbacks = { + pppoe_connect, +#if PPP_SERVER + NULL, +#endif /* PPP_SERVER */ + pppoe_disconnect, + pppoe_destroy, + pppoe_write, + pppoe_netif_output, + NULL, + NULL +}; + +/* + * Create a new PPP Over Ethernet (PPPoE) connection. + * + * Return 0 on success, an error code on failure. + */ +ppp_pcb *pppoe_create(struct netif *pppif, + struct netif *ethif, + const char *service_name, const char *concentrator_name, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb) +{ + ppp_pcb *ppp; + struct pppoe_softc *sc; + LWIP_UNUSED_ARG(service_name); + LWIP_UNUSED_ARG(concentrator_name); + + sc = (struct pppoe_softc *)LWIP_MEMPOOL_ALLOC(PPPOE_IF); + if (sc == NULL) { + return NULL; + } + + ppp = ppp_new(pppif, &pppoe_callbacks, sc, link_status_cb, ctx_cb); + if (ppp == NULL) { + LWIP_MEMPOOL_FREE(PPPOE_IF, sc); + return NULL; + } + + memset(sc, 0, sizeof(struct pppoe_softc)); + sc->pcb = ppp; + sc->sc_ethif = ethif; + /* put the new interface at the head of the list */ + sc->next = pppoe_softc_list; + pppoe_softc_list = sc; + return ppp; +} + +/* Called by PPP core */ +static err_t pppoe_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { + struct pppoe_softc *sc = (struct pppoe_softc *)ctx; + struct pbuf *ph; /* Ethernet + PPPoE header */ + err_t ret; +#if MIB2_STATS + u16_t tot_len; +#else /* MIB2_STATS */ + LWIP_UNUSED_ARG(ppp); +#endif /* MIB2_STATS */ + + /* skip address & flags */ + pbuf_header(p, -(s16_t)2); + + ph = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN), PBUF_RAM); + if(!ph) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.proterr); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + pbuf_free(p); + return ERR_MEM; + } + + pbuf_header(ph, -(s16_t)PPPOE_HEADERLEN); /* hide PPPoE header */ + pbuf_cat(ph, p); +#if MIB2_STATS + tot_len = ph->tot_len; +#endif /* MIB2_STATS */ + + ret = pppoe_xmit(sc, ph); + if (ret != ERR_OK) { + LINK_STATS_INC(link.err); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + return ret; + } + + MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, (u16_t)tot_len); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); + LINK_STATS_INC(link.xmit); + return ERR_OK; +} + +/* Called by PPP core */ +static err_t pppoe_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) { + struct pppoe_softc *sc = (struct pppoe_softc *)ctx; + struct pbuf *pb; + u8_t *pl; + err_t err; +#if MIB2_STATS + u16_t tot_len; +#else /* MIB2_STATS */ + LWIP_UNUSED_ARG(ppp); +#endif /* MIB2_STATS */ + + /* @todo: try to use pbuf_header() here! */ + pb = pbuf_alloc(PBUF_LINK, PPPOE_HEADERLEN + sizeof(protocol), PBUF_RAM); + if(!pb) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.proterr); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + return ERR_MEM; + } + + pbuf_header(pb, -(s16_t)PPPOE_HEADERLEN); + + pl = (u8_t*)pb->payload; + PUTSHORT(protocol, pl); + + pbuf_chain(pb, p); +#if MIB2_STATS + tot_len = pb->tot_len; +#endif /* MIB2_STATS */ + + if( (err = pppoe_xmit(sc, pb)) != ERR_OK) { + LINK_STATS_INC(link.err); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + return err; + } + + MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, tot_len); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); + LINK_STATS_INC(link.xmit); + return ERR_OK; +} + +static err_t +pppoe_destroy(ppp_pcb *ppp, void *ctx) +{ + struct pppoe_softc *sc = (struct pppoe_softc *)ctx; + struct pppoe_softc **copp, *freep; + LWIP_UNUSED_ARG(ppp); + + sys_untimeout(pppoe_timeout, sc); + + /* remove interface from list */ + for (copp = &pppoe_softc_list; (freep = *copp); copp = &freep->next) { + if (freep == sc) { + *copp = freep->next; + break; + } + } + +#ifdef PPPOE_TODO + if (sc->sc_concentrator_name) { + mem_free(sc->sc_concentrator_name); + } + if (sc->sc_service_name) { + mem_free(sc->sc_service_name); + } +#endif /* PPPOE_TODO */ + LWIP_MEMPOOL_FREE(PPPOE_IF, sc); + + return ERR_OK; +} + +/* + * Find the interface handling the specified session. + * Note: O(number of sessions open), this is a client-side only, mean + * and lean implementation, so number of open sessions typically should + * be 1. + */ +static struct pppoe_softc* pppoe_find_softc_by_session(u_int session, struct netif *rcvif) { + struct pppoe_softc *sc; + + for (sc = pppoe_softc_list; sc != NULL; sc = sc->next) { + if (sc->sc_state == PPPOE_STATE_SESSION + && sc->sc_session == session + && sc->sc_ethif == rcvif) { + return sc; + } + } + return NULL; +} + +/* Check host unique token passed and return appropriate softc pointer, + * or NULL if token is bogus. */ +static struct pppoe_softc* pppoe_find_softc_by_hunique(u8_t *token, size_t len, struct netif *rcvif) { + struct pppoe_softc *sc, *t; + + if (len != sizeof sc) { + return NULL; + } + MEMCPY(&t, token, len); + + for (sc = pppoe_softc_list; sc != NULL; sc = sc->next) { + if (sc == t) { + break; + } + } + + if (sc == NULL) { + PPPDEBUG(LOG_DEBUG, ("pppoe: alien host unique tag, no session found\n")); + return NULL; + } + + /* should be safe to access *sc now */ + if (sc->sc_state < PPPOE_STATE_PADI_SENT || sc->sc_state >= PPPOE_STATE_SESSION) { + PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": host unique tag found, but it belongs to a connection in state %d\n", + sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, sc->sc_state)); + return NULL; + } + if (sc->sc_ethif != rcvif) { + PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": wrong interface, not accepting host unique\n", + sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + return NULL; + } + return sc; +} + +/* analyze and handle a single received packet while not in session state */ +void +pppoe_disc_input(struct netif *netif, struct pbuf *pb) +{ + u16_t tag, len; + u16_t session, plen; + struct pppoe_softc *sc; +#if PPP_DEBUG + const char *err_msg = NULL; +#endif /* PPP_DEBUG */ + u8_t *ac_cookie; + u16_t ac_cookie_len; +#ifdef PPPOE_SERVER + u8_t *hunique; + size_t hunique_len; +#endif + struct pppoehdr *ph; + struct pppoetag pt; + int off; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + int err; +#endif + struct eth_hdr *ethhdr; + + /* don't do anything if there is not a single PPPoE instance */ + if (pppoe_softc_list == NULL) { + pbuf_free(pb); + return; + } + + pb = ppp_singlebuf(pb); + + if (pb->len < sizeof(*ethhdr)) { + goto done; + } + ethhdr = (struct eth_hdr *)pb->payload; + off = sizeof(*ethhdr); + + ac_cookie = NULL; + ac_cookie_len = 0; +#ifdef PPPOE_SERVER + hunique = NULL; + hunique_len = 0; +#endif + session = 0; + if (pb->len - off < (u16_t)PPPOE_HEADERLEN) { + PPPDEBUG(LOG_DEBUG, ("pppoe: packet too short: %d\n", pb->len)); + goto done; + } + + ph = (struct pppoehdr *) (ethhdr + 1); + if (ph->vertype != PPPOE_VERTYPE) { + PPPDEBUG(LOG_DEBUG, ("pppoe: unknown version/type packet: 0x%x\n", ph->vertype)); + goto done; + } + session = lwip_ntohs(ph->session); + plen = lwip_ntohs(ph->plen); + off += sizeof(*ph); + + if (plen + off > pb->len) { + PPPDEBUG(LOG_DEBUG, ("pppoe: packet content does not fit: data available = %d, packet size = %u\n", + pb->len - off, plen)); + goto done; + } + if(pb->tot_len == pb->len) { + pb->tot_len = pb->len = (u16_t)off + plen; /* ignore trailing garbage */ + } + tag = 0; + len = 0; + sc = NULL; + while (off + sizeof(pt) <= pb->len) { + MEMCPY(&pt, (u8_t*)pb->payload + off, sizeof(pt)); + tag = lwip_ntohs(pt.tag); + len = lwip_ntohs(pt.len); + if (off + sizeof(pt) + len > pb->len) { + PPPDEBUG(LOG_DEBUG, ("pppoe: tag 0x%x len 0x%x is too long\n", tag, len)); + goto done; + } + switch (tag) { + case PPPOE_TAG_EOL: + goto breakbreak; + case PPPOE_TAG_SNAME: + break; /* ignored */ + case PPPOE_TAG_ACNAME: + break; /* ignored */ + case PPPOE_TAG_HUNIQUE: + if (sc != NULL) { + break; + } +#ifdef PPPOE_SERVER + hunique = (u8_t*)pb->payload + off + sizeof(pt); + hunique_len = len; +#endif + sc = pppoe_find_softc_by_hunique((u8_t*)pb->payload + off + sizeof(pt), len, netif); + break; + case PPPOE_TAG_ACCOOKIE: + if (ac_cookie == NULL) { + if (len > PPPOE_MAX_AC_COOKIE_LEN) { + PPPDEBUG(LOG_DEBUG, ("pppoe: AC cookie is too long: len = %d, max = %d\n", len, PPPOE_MAX_AC_COOKIE_LEN)); + goto done; + } + ac_cookie = (u8_t*)pb->payload + off + sizeof(pt); + ac_cookie_len = len; + } + break; +#if PPP_DEBUG + case PPPOE_TAG_SNAME_ERR: + err_msg = "SERVICE NAME ERROR"; + break; + case PPPOE_TAG_ACSYS_ERR: + err_msg = "AC SYSTEM ERROR"; + break; + case PPPOE_TAG_GENERIC_ERR: + err_msg = "GENERIC ERROR"; + break; +#endif /* PPP_DEBUG */ + default: + break; + } +#if PPP_DEBUG + if (err_msg != NULL) { + char error_tmp[PPPOE_ERRORSTRING_LEN]; + u16_t error_len = LWIP_MIN(len, sizeof(error_tmp)-1); + strncpy(error_tmp, (char*)pb->payload + off + sizeof(pt), error_len); + error_tmp[error_len] = '\0'; + if (sc) { + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": %s: %s\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err_msg, error_tmp)); + } else { + PPPDEBUG(LOG_DEBUG, ("pppoe: %s: %s\n", err_msg, error_tmp)); + } + } +#endif /* PPP_DEBUG */ + off += sizeof(pt) + len; + } + +breakbreak:; + switch (ph->code) { + case PPPOE_CODE_PADI: +#ifdef PPPOE_SERVER + /* + * got service name, concentrator name, and/or host unique. + * ignore if we have no interfaces with IFF_PASSIVE|IFF_UP. + */ + if (LIST_EMPTY(&pppoe_softc_list)) { + goto done; + } + LIST_FOREACH(sc, &pppoe_softc_list, sc_list) { + if (!(sc->sc_sppp.pp_if.if_flags & IFF_UP)) { + continue; + } + if (!(sc->sc_sppp.pp_if.if_flags & IFF_PASSIVE)) { + continue; + } + if (sc->sc_state == PPPOE_STATE_INITIAL) { + break; + } + } + if (sc == NULL) { + /* PPPDEBUG(LOG_DEBUG, ("pppoe: free passive interface is not found\n")); */ + goto done; + } + if (hunique) { + if (sc->sc_hunique) { + mem_free(sc->sc_hunique); + } + sc->sc_hunique = mem_malloc(hunique_len); + if (sc->sc_hunique == NULL) { + goto done; + } + sc->sc_hunique_len = hunique_len; + MEMCPY(sc->sc_hunique, hunique, hunique_len); + } + MEMCPY(&sc->sc_dest, eh->ether_shost, sizeof sc->sc_dest); + sc->sc_state = PPPOE_STATE_PADO_SENT; + pppoe_send_pado(sc); + break; +#endif /* PPPOE_SERVER */ + case PPPOE_CODE_PADR: +#ifdef PPPOE_SERVER + /* + * get sc from ac_cookie if IFF_PASSIVE + */ + if (ac_cookie == NULL) { + /* be quiet if there is not a single pppoe instance */ + PPPDEBUG(LOG_DEBUG, ("pppoe: received PADR but not includes ac_cookie\n")); + goto done; + } + sc = pppoe_find_softc_by_hunique(ac_cookie, ac_cookie_len, netif); + if (sc == NULL) { + /* be quiet if there is not a single pppoe instance */ + if (!LIST_EMPTY(&pppoe_softc_list)) { + PPPDEBUG(LOG_DEBUG, ("pppoe: received PADR but could not find request for it\n")); + } + goto done; + } + if (sc->sc_state != PPPOE_STATE_PADO_SENT) { + PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": received unexpected PADR\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + goto done; + } + if (hunique) { + if (sc->sc_hunique) { + mem_free(sc->sc_hunique); + } + sc->sc_hunique = mem_malloc(hunique_len); + if (sc->sc_hunique == NULL) { + goto done; + } + sc->sc_hunique_len = hunique_len; + MEMCPY(sc->sc_hunique, hunique, hunique_len); + } + pppoe_send_pads(sc); + sc->sc_state = PPPOE_STATE_SESSION; + ppp_start(sc->pcb); /* notify upper layers */ + break; +#else + /* ignore, we are no access concentrator */ + goto done; +#endif /* PPPOE_SERVER */ + case PPPOE_CODE_PADO: + if (sc == NULL) { + /* be quiet if there is not a single pppoe instance */ + if (pppoe_softc_list != NULL) { + PPPDEBUG(LOG_DEBUG, ("pppoe: received PADO but could not find request for it\n")); + } + goto done; + } + if (sc->sc_state != PPPOE_STATE_PADI_SENT) { + PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": received unexpected PADO\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + goto done; + } + if (ac_cookie) { + sc->sc_ac_cookie_len = ac_cookie_len; + MEMCPY(sc->sc_ac_cookie, ac_cookie, ac_cookie_len); + } + MEMCPY(&sc->sc_dest, ethhdr->src.addr, sizeof(sc->sc_dest.addr)); + sys_untimeout(pppoe_timeout, sc); + sc->sc_padr_retried = 0; + sc->sc_state = PPPOE_STATE_PADR_SENT; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppoe_send_padr(sc)) != 0) + { + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADR, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + } +#else + pppoe_send_padr(sc); +#endif /*defined(LWIP_DEBUG) && (DEBUG_LOG == LWIP_DEBUG_ON) */ + sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), pppoe_timeout, sc); + break; + case PPPOE_CODE_PADS: + if (sc == NULL) { + goto done; + } + sc->sc_session = session; + sys_untimeout(pppoe_timeout, sc); + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": session 0x%x connected\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, session)); + sc->sc_state = PPPOE_STATE_SESSION; + ppp_start(sc->pcb); /* notify upper layers */ + break; + case PPPOE_CODE_PADT: + /* Don't disconnect here, we let the LCP Echo/Reply find the fact + * that PPP session is down. Asking the PPP stack to end the session + * require strict checking about the PPP phase to prevent endless + * disconnection loops. + */ +#if 0 /* UNUSED */ + if (sc == NULL) { /* PADT frames are rarely sent with a hunique tag, this is actually almost always true */ + goto done; + } + pppoe_clear_softc(sc, "received PADT"); +#endif /* UNUSED */ + break; + default: + if(sc) { + PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": unknown code (0x%"X16_F") session = 0x%"X16_F"\n", + sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, + (u16_t)ph->code, session)); + } else { + PPPDEBUG(LOG_DEBUG, ("pppoe: unknown code (0x%"X16_F") session = 0x%"X16_F"\n", (u16_t)ph->code, session)); + } + break; + } + +done: + pbuf_free(pb); + return; +} + +void +pppoe_data_input(struct netif *netif, struct pbuf *pb) +{ + u16_t session, plen; + struct pppoe_softc *sc; + struct pppoehdr *ph; +#ifdef PPPOE_TERM_UNKNOWN_SESSIONS + u8_t shost[ETHER_ADDR_LEN]; +#endif + +#ifdef PPPOE_TERM_UNKNOWN_SESSIONS + MEMCPY(shost, ((struct eth_hdr *)pb->payload)->src.addr, sizeof(shost)); +#endif + if (pbuf_header(pb, -(s16_t)sizeof(struct eth_hdr)) != 0) { + /* bail out */ + PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_header failed\n")); + LINK_STATS_INC(link.lenerr); + goto drop; + } + + if (pb->len < sizeof(*ph)) { + PPPDEBUG(LOG_DEBUG, ("pppoe_data_input: could not get PPPoE header\n")); + goto drop; + } + ph = (struct pppoehdr *)pb->payload; + + if (ph->vertype != PPPOE_VERTYPE) { + PPPDEBUG(LOG_DEBUG, ("pppoe (data): unknown version/type packet: 0x%x\n", ph->vertype)); + goto drop; + } + if (ph->code != 0) { + goto drop; + } + + session = lwip_ntohs(ph->session); + sc = pppoe_find_softc_by_session(session, netif); + if (sc == NULL) { +#ifdef PPPOE_TERM_UNKNOWN_SESSIONS + PPPDEBUG(LOG_DEBUG, ("pppoe: input for unknown session 0x%x, sending PADT\n", session)); + pppoe_send_padt(netif, session, shost); +#endif + goto drop; + } + + plen = lwip_ntohs(ph->plen); + + if (pbuf_header(pb, -(s16_t)(PPPOE_HEADERLEN)) != 0) { + /* bail out */ + PPPDEBUG(LOG_ERR, ("pppoe_data_input: pbuf_header PPPOE_HEADERLEN failed\n")); + LINK_STATS_INC(link.lenerr); + goto drop; + } + + PPPDEBUG(LOG_DEBUG, ("pppoe_data_input: %c%c%"U16_F": pkthdr.len=%d, pppoe.len=%d\n", + sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, + pb->len, plen)); + + if (pb->tot_len < plen) { + goto drop; + } + + /* Dispatch the packet thereby consuming it. */ + ppp_input(sc->pcb, pb); + return; + +drop: + pbuf_free(pb); +} + +static err_t +pppoe_output(struct pppoe_softc *sc, struct pbuf *pb) +{ + struct eth_hdr *ethhdr; + u16_t etype; + err_t res; + + /* make room for Ethernet header - should not fail */ + if (pbuf_header(pb, (s16_t)(sizeof(struct eth_hdr))) != 0) { + /* bail out */ + PPPDEBUG(LOG_ERR, ("pppoe: %c%c%"U16_F": pppoe_output: could not allocate room for Ethernet header\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + LINK_STATS_INC(link.lenerr); + pbuf_free(pb); + return ERR_BUF; + } + ethhdr = (struct eth_hdr *)pb->payload; + etype = sc->sc_state == PPPOE_STATE_SESSION ? ETHTYPE_PPPOE : ETHTYPE_PPPOEDISC; + ethhdr->type = lwip_htons(etype); + MEMCPY(ðhdr->dest.addr, &sc->sc_dest.addr, sizeof(ethhdr->dest.addr)); + MEMCPY(ðhdr->src.addr, &sc->sc_ethif->hwaddr, sizeof(ethhdr->src.addr)); + + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F" (%x) state=%d, session=0x%x output -> %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F", len=%d\n", + sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, etype, + sc->sc_state, sc->sc_session, + sc->sc_dest.addr[0], sc->sc_dest.addr[1], sc->sc_dest.addr[2], sc->sc_dest.addr[3], sc->sc_dest.addr[4], sc->sc_dest.addr[5], + pb->tot_len)); + + res = sc->sc_ethif->linkoutput(sc->sc_ethif, pb); + + pbuf_free(pb); + + return res; +} + +static err_t +pppoe_send_padi(struct pppoe_softc *sc) +{ + struct pbuf *pb; + u8_t *p; + int len; +#ifdef PPPOE_TODO + int l1 = 0, l2 = 0; /* XXX: gcc */ +#endif /* PPPOE_TODO */ + + /* calculate length of frame (excluding ethernet header + pppoe header) */ + len = 2 + 2 + 2 + 2 + sizeof sc; /* service name tag is required, host unique is send too */ +#ifdef PPPOE_TODO + if (sc->sc_service_name != NULL) { + l1 = (int)strlen(sc->sc_service_name); + len += l1; + } + if (sc->sc_concentrator_name != NULL) { + l2 = (int)strlen(sc->sc_concentrator_name); + len += 2 + 2 + l2; + } +#endif /* PPPOE_TODO */ + LWIP_ASSERT("sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff", + sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff); + + /* allocate a buffer */ + pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); + if (!pb) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + p = (u8_t*)pb->payload; + /* fill in pkt */ + PPPOE_ADD_HEADER(p, PPPOE_CODE_PADI, 0, (u16_t)len); + PPPOE_ADD_16(p, PPPOE_TAG_SNAME); +#ifdef PPPOE_TODO + if (sc->sc_service_name != NULL) { + PPPOE_ADD_16(p, l1); + MEMCPY(p, sc->sc_service_name, l1); + p += l1; + } else +#endif /* PPPOE_TODO */ + { + PPPOE_ADD_16(p, 0); + } +#ifdef PPPOE_TODO + if (sc->sc_concentrator_name != NULL) { + PPPOE_ADD_16(p, PPPOE_TAG_ACNAME); + PPPOE_ADD_16(p, l2); + MEMCPY(p, sc->sc_concentrator_name, l2); + p += l2; + } +#endif /* PPPOE_TODO */ + PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); + PPPOE_ADD_16(p, sizeof(sc)); + MEMCPY(p, &sc, sizeof sc); + + /* send pkt */ + return pppoe_output(sc, pb); +} + +static void +pppoe_timeout(void *arg) +{ + u32_t retry_wait; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + int err; +#endif + struct pppoe_softc *sc = (struct pppoe_softc*)arg; + + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": timeout\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + + switch (sc->sc_state) { + case PPPOE_STATE_PADI_SENT: + /* + * We have two basic ways of retrying: + * - Quick retry mode: try a few times in short sequence + * - Slow retry mode: we already had a connection successfully + * established and will try infinitely (without user + * intervention) + * We only enter slow retry mode if IFF_LINK1 (aka autodial) + * is not set. + */ + if (sc->sc_padi_retried < 0xff) { + sc->sc_padi_retried++; + } + if (!sc->pcb->settings.persist && sc->sc_padi_retried >= PPPOE_DISC_MAXPADI) { +#if 0 + if ((sc->sc_sppp.pp_if.if_flags & IFF_LINK1) == 0) { + /* slow retry mode */ + retry_wait = PPPOE_SLOW_RETRY; + } else +#endif + { + pppoe_abort_connect(sc); + return; + } + } + /* initialize for quick retry mode */ + retry_wait = LWIP_MIN(PPPOE_DISC_TIMEOUT * sc->sc_padi_retried, PPPOE_SLOW_RETRY); +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppoe_send_padi(sc)) != 0) { + sc->sc_padi_retried--; + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to transmit PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + } +#else + pppoe_send_padi(sc); +#endif + sys_timeout(retry_wait, pppoe_timeout, sc); + break; + + case PPPOE_STATE_PADR_SENT: + sc->sc_padr_retried++; + if (sc->sc_padr_retried >= PPPOE_DISC_MAXPADR) { + MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); + sc->sc_state = PPPOE_STATE_PADI_SENT; + sc->sc_padr_retried = 0; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppoe_send_padi(sc)) != 0) { + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + } +#else + pppoe_send_padi(sc); +#endif + sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padi_retried), pppoe_timeout, sc); + return; + } +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppoe_send_padr(sc)) != 0) { + sc->sc_padr_retried--; + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADR, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + } +#else + if (pppoe_send_padr(sc) != 0) { + sc->sc_padr_retried--; + } +#endif + sys_timeout(PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), pppoe_timeout, sc); + break; + default: + return; /* all done, work in peace */ + } +} + +/* Start a connection (i.e. initiate discovery phase) */ +static void +pppoe_connect(ppp_pcb *ppp, void *ctx) +{ +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + err_t err; +#endif + struct pppoe_softc *sc = (struct pppoe_softc *)ctx; + lcp_options *lcp_wo; + lcp_options *lcp_ao; +#if PPP_IPV4_SUPPORT && VJ_SUPPORT + ipcp_options *ipcp_wo; + ipcp_options *ipcp_ao; +#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ + + sc->sc_session = 0; + sc->sc_ac_cookie_len = 0; + sc->sc_padi_retried = 0; + sc->sc_padr_retried = 0; + /* changed to real address later */ + MEMCPY(&sc->sc_dest, ethbroadcast.addr, sizeof(sc->sc_dest)); +#ifdef PPPOE_SERVER + /* wait PADI if IFF_PASSIVE */ + if ((sc->sc_sppp.pp_if.if_flags & IFF_PASSIVE)) { + return 0; + } +#endif + + lcp_wo = &ppp->lcp_wantoptions; + lcp_wo->mru = sc->sc_ethif->mtu-PPPOE_HEADERLEN-2; /* two byte PPP protocol discriminator, then IP data */ + lcp_wo->neg_asyncmap = 0; + lcp_wo->neg_pcompression = 0; + lcp_wo->neg_accompression = 0; + lcp_wo->passive = 0; + lcp_wo->silent = 0; + + lcp_ao = &ppp->lcp_allowoptions; + lcp_ao->mru = sc->sc_ethif->mtu-PPPOE_HEADERLEN-2; /* two byte PPP protocol discriminator, then IP data */ + lcp_ao->neg_asyncmap = 0; + lcp_ao->neg_pcompression = 0; + lcp_ao->neg_accompression = 0; + +#if PPP_IPV4_SUPPORT && VJ_SUPPORT + ipcp_wo = &ppp->ipcp_wantoptions; + ipcp_wo->neg_vj = 0; + ipcp_wo->old_vj = 0; + + ipcp_ao = &ppp->ipcp_allowoptions; + ipcp_ao->neg_vj = 0; + ipcp_ao->old_vj = 0; +#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ + + /* save state, in case we fail to send PADI */ + sc->sc_state = PPPOE_STATE_PADI_SENT; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppoe_send_padi(sc)) != 0) { + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": failed to send PADI, error=%d\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, err)); + } +#else + pppoe_send_padi(sc); +#endif + sys_timeout(PPPOE_DISC_TIMEOUT, pppoe_timeout, sc); +} + +/* disconnect */ +static void +pppoe_disconnect(ppp_pcb *ppp, void *ctx) +{ + struct pppoe_softc *sc = (struct pppoe_softc *)ctx; + + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": disconnecting\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + if (sc->sc_state == PPPOE_STATE_SESSION) { + pppoe_send_padt(sc->sc_ethif, sc->sc_session, (const u8_t *)&sc->sc_dest); + } + + /* stop any timer, disconnect can be called while initiating is in progress */ + sys_untimeout(pppoe_timeout, sc); + sc->sc_state = PPPOE_STATE_INITIAL; +#ifdef PPPOE_SERVER + if (sc->sc_hunique) { + mem_free(sc->sc_hunique); + sc->sc_hunique = NULL; /* probably not necessary, if state is initial we shouldn't have to access hunique anyway */ + } + sc->sc_hunique_len = 0; /* probably not necessary, if state is initial we shouldn't have to access hunique anyway */ +#endif + ppp_link_end(ppp); /* notify upper layers */ + return; +} + +/* Connection attempt aborted */ +static void +pppoe_abort_connect(struct pppoe_softc *sc) +{ + PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": could not establish connection\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + sc->sc_state = PPPOE_STATE_INITIAL; + ppp_link_failed(sc->pcb); /* notify upper layers */ +} + +/* Send a PADR packet */ +static err_t +pppoe_send_padr(struct pppoe_softc *sc) +{ + struct pbuf *pb; + u8_t *p; + size_t len; +#ifdef PPPOE_TODO + size_t l1 = 0; /* XXX: gcc */ +#endif /* PPPOE_TODO */ + + len = 2 + 2 + 2 + 2 + sizeof(sc); /* service name, host unique */ +#ifdef PPPOE_TODO + if (sc->sc_service_name != NULL) { /* service name tag maybe empty */ + l1 = strlen(sc->sc_service_name); + len += l1; + } +#endif /* PPPOE_TODO */ + if (sc->sc_ac_cookie_len > 0) { + len += 2 + 2 + sc->sc_ac_cookie_len; /* AC cookie */ + } + LWIP_ASSERT("sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff", + sizeof(struct eth_hdr) + PPPOE_HEADERLEN + len <= 0xffff); + pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); + if (!pb) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + p = (u8_t*)pb->payload; + PPPOE_ADD_HEADER(p, PPPOE_CODE_PADR, 0, len); + PPPOE_ADD_16(p, PPPOE_TAG_SNAME); +#ifdef PPPOE_TODO + if (sc->sc_service_name != NULL) { + PPPOE_ADD_16(p, l1); + MEMCPY(p, sc->sc_service_name, l1); + p += l1; + } else +#endif /* PPPOE_TODO */ + { + PPPOE_ADD_16(p, 0); + } + if (sc->sc_ac_cookie_len > 0) { + PPPOE_ADD_16(p, PPPOE_TAG_ACCOOKIE); + PPPOE_ADD_16(p, sc->sc_ac_cookie_len); + MEMCPY(p, sc->sc_ac_cookie, sc->sc_ac_cookie_len); + p += sc->sc_ac_cookie_len; + } + PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); + PPPOE_ADD_16(p, sizeof(sc)); + MEMCPY(p, &sc, sizeof sc); + + return pppoe_output(sc, pb); +} + +/* send a PADT packet */ +static err_t +pppoe_send_padt(struct netif *outgoing_if, u_int session, const u8_t *dest) +{ + struct pbuf *pb; + struct eth_hdr *ethhdr; + err_t res; + u8_t *p; + + pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN), PBUF_RAM); + if (!pb) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + pbuf_header(pb, (s16_t)sizeof(struct eth_hdr)); + ethhdr = (struct eth_hdr *)pb->payload; + ethhdr->type = PP_HTONS(ETHTYPE_PPPOEDISC); + MEMCPY(ðhdr->dest.addr, dest, sizeof(ethhdr->dest.addr)); + MEMCPY(ðhdr->src.addr, &outgoing_if->hwaddr, sizeof(ethhdr->src.addr)); + + p = (u8_t*)(ethhdr + 1); + PPPOE_ADD_HEADER(p, PPPOE_CODE_PADT, session, 0); + + res = outgoing_if->linkoutput(outgoing_if, pb); + + pbuf_free(pb); + + return res; +} + +#ifdef PPPOE_SERVER +static err_t +pppoe_send_pado(struct pppoe_softc *sc) +{ + struct pbuf *pb; + u8_t *p; + size_t len; + + /* calc length */ + len = 0; + /* include ac_cookie */ + len += 2 + 2 + sizeof(sc); + /* include hunique */ + len += 2 + 2 + sc->sc_hunique_len; + pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); + if (!pb) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + p = (u8_t*)pb->payload; + PPPOE_ADD_HEADER(p, PPPOE_CODE_PADO, 0, len); + PPPOE_ADD_16(p, PPPOE_TAG_ACCOOKIE); + PPPOE_ADD_16(p, sizeof(sc)); + MEMCPY(p, &sc, sizeof(sc)); + p += sizeof(sc); + PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); + PPPOE_ADD_16(p, sc->sc_hunique_len); + MEMCPY(p, sc->sc_hunique, sc->sc_hunique_len); + return pppoe_output(sc, pb); +} + +static err_t +pppoe_send_pads(struct pppoe_softc *sc) +{ + struct pbuf *pb; + u8_t *p; + size_t len, l1 = 0; /* XXX: gcc */ + + sc->sc_session = mono_time.tv_sec % 0xff + 1; + /* calc length */ + len = 0; + /* include hunique */ + len += 2 + 2 + 2 + 2 + sc->sc_hunique_len; /* service name, host unique*/ + if (sc->sc_service_name != NULL) { /* service name tag maybe empty */ + l1 = strlen(sc->sc_service_name); + len += l1; + } + pb = pbuf_alloc(PBUF_LINK, (u16_t)(PPPOE_HEADERLEN + len), PBUF_RAM); + if (!pb) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + p = (u8_t*)pb->payload; + PPPOE_ADD_HEADER(p, PPPOE_CODE_PADS, sc->sc_session, len); + PPPOE_ADD_16(p, PPPOE_TAG_SNAME); + if (sc->sc_service_name != NULL) { + PPPOE_ADD_16(p, l1); + MEMCPY(p, sc->sc_service_name, l1); + p += l1; + } else { + PPPOE_ADD_16(p, 0); + } + PPPOE_ADD_16(p, PPPOE_TAG_HUNIQUE); + PPPOE_ADD_16(p, sc->sc_hunique_len); + MEMCPY(p, sc->sc_hunique, sc->sc_hunique_len); + return pppoe_output(sc, pb); +} +#endif + +static err_t +pppoe_xmit(struct pppoe_softc *sc, struct pbuf *pb) +{ + u8_t *p; + size_t len; + + len = pb->tot_len; + + /* make room for PPPoE header - should not fail */ + if (pbuf_header(pb, (s16_t)(PPPOE_HEADERLEN)) != 0) { + /* bail out */ + PPPDEBUG(LOG_ERR, ("pppoe: %c%c%"U16_F": pppoe_xmit: could not allocate room for PPPoE header\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + LINK_STATS_INC(link.lenerr); + pbuf_free(pb); + return ERR_BUF; + } + + p = (u8_t*)pb->payload; + PPPOE_ADD_HEADER(p, 0, sc->sc_session, len); + + return pppoe_output(sc, pb); +} + +#if 0 /*def PFIL_HOOKS*/ +static int +pppoe_ifattach_hook(void *arg, struct pbuf **mp, struct netif *ifp, int dir) +{ + struct pppoe_softc *sc; + int s; + + if (mp != (struct pbuf **)PFIL_IFNET_DETACH) { + return 0; + } + + LIST_FOREACH(sc, &pppoe_softc_list, sc_list) { + if (sc->sc_ethif != ifp) { + continue; + } + if (sc->sc_sppp.pp_if.if_flags & IFF_UP) { + sc->sc_sppp.pp_if.if_flags &= ~(IFF_UP|IFF_RUNNING); + PPPDEBUG(LOG_DEBUG, ("%c%c%"U16_F": ethernet interface detached, going down\n", + sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num)); + } + sc->sc_ethif = NULL; + pppoe_clear_softc(sc, "ethernet interface detached"); + } + + return 0; +} +#endif + +#if 0 /* UNUSED */ +static void +pppoe_clear_softc(struct pppoe_softc *sc, const char *message) +{ + LWIP_UNUSED_ARG(message); + + /* stop timer */ + sys_untimeout(pppoe_timeout, sc); + PPPDEBUG(LOG_DEBUG, ("pppoe: %c%c%"U16_F": session 0x%x terminated, %s\n", sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num, sc->sc_session, message)); + sc->sc_state = PPPOE_STATE_INITIAL; + ppp_link_end(sc->pcb); /* notify upper layers - /!\ dangerous /!\ - see pppoe_disc_input() */ +} +#endif /* UNUSED */ +#endif /* PPP_SUPPORT && PPPOE_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.c index 846a21e..b5d0d47 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppol2tp.c @@ -1,1179 +1,1179 @@ -/** - * @file - * Network Point to Point Protocol over Layer 2 Tunneling Protocol program file. - * - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -/* - * L2TP Support status: - * - * Supported: - * - L2TPv2 (PPP over L2TP, a.k.a. UDP tunnels) - * - LAC - * - * Not supported: - * - LNS (require PPP server support) - * - L2TPv3 ethernet pseudowires - * - L2TPv3 VLAN pseudowire - * - L2TPv3 PPP pseudowires - * - L2TPv3 IP encapsulation - * - L2TPv3 IP pseudowire - * - L2TP tunnel switching - http://tools.ietf.org/html/draft-ietf-l2tpext-tunnel-switching-08 - * - Multiple tunnels per UDP socket, as well as multiple sessions per tunnel - * - Hidden AVPs - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include "lwip/err.h" -#include "lwip/memp.h" -#include "lwip/netif.h" -#include "lwip/udp.h" -#include "lwip/snmp.h" - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/lcp.h" -#include "netif/ppp/ipcp.h" -#include "netif/ppp/pppol2tp.h" -#include "netif/ppp/pppcrypt.h" -#include "netif/ppp/magic.h" - -/* Memory pool */ -LWIP_MEMPOOL_DECLARE(PPPOL2TP_PCB, MEMP_NUM_PPPOL2TP_INTERFACES, sizeof(pppol2tp_pcb), "PPPOL2TP_PCB") - -/* callbacks called from PPP core */ -static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p); -static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol); -static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx); /* Destroy a L2TP control block */ -static void pppol2tp_connect(ppp_pcb *ppp, void *ctx); /* Be a LAC, connect to a LNS. */ -static void pppol2tp_disconnect(ppp_pcb *ppp, void *ctx); /* Disconnect */ - - /* Prototypes for procedures local to this file. */ -static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); -static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, struct pbuf *p, u16_t ns, u16_t nr); -static void pppol2tp_timeout(void *arg); -static void pppol2tp_abort_connect(pppol2tp_pcb *l2tp); -static err_t pppol2tp_send_sccrq(pppol2tp_pcb *l2tp); -static err_t pppol2tp_send_scccn(pppol2tp_pcb *l2tp, u16_t ns); -static err_t pppol2tp_send_icrq(pppol2tp_pcb *l2tp, u16_t ns); -static err_t pppol2tp_send_iccn(pppol2tp_pcb *l2tp, u16_t ns); -static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns); -static err_t pppol2tp_send_stopccn(pppol2tp_pcb *l2tp, u16_t ns); -static err_t pppol2tp_xmit(pppol2tp_pcb *l2tp, struct pbuf *pb); -static err_t pppol2tp_udp_send(pppol2tp_pcb *l2tp, struct pbuf *pb); - -/* Callbacks structure for PPP core */ -static const struct link_callbacks pppol2tp_callbacks = { - pppol2tp_connect, -#if PPP_SERVER - NULL, -#endif /* PPP_SERVER */ - pppol2tp_disconnect, - pppol2tp_destroy, - pppol2tp_write, - pppol2tp_netif_output, - NULL, - NULL -}; - - -/* Create a new L2TP session. */ -ppp_pcb *pppol2tp_create(struct netif *pppif, - struct netif *netif, const ip_addr_t *ipaddr, u16_t port, - const u8_t *secret, u8_t secret_len, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb) { - ppp_pcb *ppp; - pppol2tp_pcb *l2tp; - struct udp_pcb *udp; -#if !PPPOL2TP_AUTH_SUPPORT - LWIP_UNUSED_ARG(secret); - LWIP_UNUSED_ARG(secret_len); -#endif /* !PPPOL2TP_AUTH_SUPPORT */ - - if (ipaddr == NULL) { - goto ipaddr_check_failed; - } - - l2tp = (pppol2tp_pcb *)LWIP_MEMPOOL_ALLOC(PPPOL2TP_PCB); - if (l2tp == NULL) { - goto memp_malloc_l2tp_failed; - } - - udp = udp_new_ip_type(IP_GET_TYPE(ipaddr)); - if (udp == NULL) { - goto udp_new_failed; - } - udp_recv(udp, pppol2tp_input, l2tp); - - ppp = ppp_new(pppif, &pppol2tp_callbacks, l2tp, link_status_cb, ctx_cb); - if (ppp == NULL) { - goto ppp_new_failed; - } - - memset(l2tp, 0, sizeof(pppol2tp_pcb)); - l2tp->phase = PPPOL2TP_STATE_INITIAL; - l2tp->ppp = ppp; - l2tp->udp = udp; - l2tp->netif = netif; - ip_addr_copy(l2tp->remote_ip, *ipaddr); - l2tp->remote_port = port; -#if PPPOL2TP_AUTH_SUPPORT - l2tp->secret = secret; - l2tp->secret_len = secret_len; -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - return ppp; - -ppp_new_failed: - udp_remove(udp); -udp_new_failed: - LWIP_MEMPOOL_FREE(PPPOL2TP_PCB, l2tp); -memp_malloc_l2tp_failed: -ipaddr_check_failed: - return NULL; -} - -/* Called by PPP core */ -static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { - pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; - struct pbuf *ph; /* UDP + L2TP header */ - err_t ret; -#if MIB2_STATS - u16_t tot_len; -#else /* MIB2_STATS */ - LWIP_UNUSED_ARG(ppp); -#endif /* MIB2_STATS */ - - ph = pbuf_alloc(PBUF_TRANSPORT, (u16_t)(PPPOL2TP_OUTPUT_DATA_HEADER_LEN), PBUF_RAM); - if(!ph) { - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.proterr); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - pbuf_free(p); - return ERR_MEM; - } - - pbuf_header(ph, -(s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN); /* hide L2TP header */ - pbuf_cat(ph, p); -#if MIB2_STATS - tot_len = ph->tot_len; -#endif /* MIB2_STATS */ - - ret = pppol2tp_xmit(l2tp, ph); - if (ret != ERR_OK) { - LINK_STATS_INC(link.err); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - return ret; - } - - MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, (u16_t)tot_len); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); - LINK_STATS_INC(link.xmit); - return ERR_OK; -} - -/* Called by PPP core */ -static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) { - pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; - struct pbuf *pb; - u8_t *pl; - err_t err; -#if MIB2_STATS - u16_t tot_len; -#else /* MIB2_STATS */ - LWIP_UNUSED_ARG(ppp); -#endif /* MIB2_STATS */ - - /* @todo: try to use pbuf_header() here! */ - pb = pbuf_alloc(PBUF_TRANSPORT, PPPOL2TP_OUTPUT_DATA_HEADER_LEN + sizeof(protocol), PBUF_RAM); - if(!pb) { - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.proterr); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - return ERR_MEM; - } - - pbuf_header(pb, -(s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN); - - pl = (u8_t*)pb->payload; - PUTSHORT(protocol, pl); - - pbuf_chain(pb, p); -#if MIB2_STATS - tot_len = pb->tot_len; -#endif /* MIB2_STATS */ - - if( (err = pppol2tp_xmit(l2tp, pb)) != ERR_OK) { - LINK_STATS_INC(link.err); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - return err; - } - - MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, tot_len); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); - LINK_STATS_INC(link.xmit); - return ERR_OK; -} - -/* Destroy a L2TP control block */ -static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx) { - pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; - LWIP_UNUSED_ARG(ppp); - - sys_untimeout(pppol2tp_timeout, l2tp); - udp_remove(l2tp->udp); - LWIP_MEMPOOL_FREE(PPPOL2TP_PCB, l2tp); - return ERR_OK; -} - -/* Be a LAC, connect to a LNS. */ -static void pppol2tp_connect(ppp_pcb *ppp, void *ctx) { -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - err_t err; -#endif - pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; - lcp_options *lcp_wo; - lcp_options *lcp_ao; -#if PPP_IPV4_SUPPORT && VJ_SUPPORT - ipcp_options *ipcp_wo; - ipcp_options *ipcp_ao; -#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ - - l2tp->tunnel_port = l2tp->remote_port; - l2tp->our_ns = 0; - l2tp->peer_nr = 0; - l2tp->peer_ns = 0; - l2tp->source_tunnel_id = 0; - l2tp->remote_tunnel_id = 0; - l2tp->source_session_id = 0; - l2tp->remote_session_id = 0; - /* l2tp->*_retried are cleared when used */ - - lcp_wo = &ppp->lcp_wantoptions; - lcp_wo->mru = PPPOL2TP_DEFMRU; - lcp_wo->neg_asyncmap = 0; - lcp_wo->neg_pcompression = 0; - lcp_wo->neg_accompression = 0; - lcp_wo->passive = 0; - lcp_wo->silent = 0; - - lcp_ao = &ppp->lcp_allowoptions; - lcp_ao->mru = PPPOL2TP_DEFMRU; - lcp_ao->neg_asyncmap = 0; - lcp_ao->neg_pcompression = 0; - lcp_ao->neg_accompression = 0; - -#if PPP_IPV4_SUPPORT && VJ_SUPPORT - ipcp_wo = &ppp->ipcp_wantoptions; - ipcp_wo->neg_vj = 0; - ipcp_wo->old_vj = 0; - - ipcp_ao = &ppp->ipcp_allowoptions; - ipcp_ao->neg_vj = 0; - ipcp_ao->old_vj = 0; -#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ - - /* Listen to a random source port, we need to do that instead of using udp_connect() - * because the L2TP LNS might answer with its own random source port (!= 1701) - */ -#if LWIP_IPV6 - if (IP_IS_V6_VAL(l2tp->udp->local_ip)) { - udp_bind(l2tp->udp, IP6_ADDR_ANY, 0); - } else -#endif /* LWIP_IPV6 */ - udp_bind(l2tp->udp, IP_ADDR_ANY, 0); - -#if PPPOL2TP_AUTH_SUPPORT - /* Generate random vector */ - if (l2tp->secret != NULL) { - magic_random_bytes(l2tp->secret_rv, sizeof(l2tp->secret_rv)); - } -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - do { - l2tp->remote_tunnel_id = magic(); - } while(l2tp->remote_tunnel_id == 0); - /* save state, in case we fail to send SCCRQ */ - l2tp->sccrq_retried = 0; - l2tp->phase = PPPOL2TP_STATE_SCCRQ_SENT; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_sccrq(l2tp)) != 0) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCRQ, error=%d\n", err)); - } -#else - pppol2tp_send_sccrq(l2tp); -#endif - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); -} - -/* Disconnect */ -static void pppol2tp_disconnect(ppp_pcb *ppp, void *ctx) { - pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; - - l2tp->our_ns++; - pppol2tp_send_stopccn(l2tp, l2tp->our_ns); - - /* stop any timer, disconnect can be called while initiating is in progress */ - sys_untimeout(pppol2tp_timeout, l2tp); - l2tp->phase = PPPOL2TP_STATE_INITIAL; - ppp_link_end(ppp); /* notify upper layers */ -} - -/* UDP Callback for incoming IPv4 L2TP frames */ -static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { - pppol2tp_pcb *l2tp = (pppol2tp_pcb*)arg; - u16_t hflags, hlen, len=0, tunnel_id=0, session_id=0, ns=0, nr=0, offset=0; - u8_t *inp; - LWIP_UNUSED_ARG(pcb); - - /* we can't unbound a UDP pcb, thus we can still receive UDP frames after the link is closed */ - if (l2tp->phase < PPPOL2TP_STATE_SCCRQ_SENT) { - goto free_and_return; - } - - if (!ip_addr_cmp(&l2tp->remote_ip, addr)) { - goto free_and_return; - } - - /* discard packet if port mismatch, but only if we received a SCCRP */ - if (l2tp->phase > PPPOL2TP_STATE_SCCRQ_SENT && l2tp->tunnel_port != port) { - goto free_and_return; - } - - /* printf("-----------\nL2TP INPUT, %d\n", p->len); */ - - /* L2TP header */ - if (p->len < sizeof(hflags) + sizeof(tunnel_id) + sizeof(session_id) ) { - goto packet_too_short; - } - - inp = (u8_t*)p->payload; - GETSHORT(hflags, inp); - - if (hflags & PPPOL2TP_HEADERFLAG_CONTROL) { - /* check mandatory flags for a control packet */ - if ( (hflags & PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY) != PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY ) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: mandatory header flags for control packet not set\n")); - goto free_and_return; - } - /* check forbidden flags for a control packet */ - if (hflags & PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: forbidden header flags for control packet found\n")); - goto free_and_return; - } - } else { - /* check mandatory flags for a data packet */ - if ( (hflags & PPPOL2TP_HEADERFLAG_DATA_MANDATORY) != PPPOL2TP_HEADERFLAG_DATA_MANDATORY) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: mandatory header flags for data packet not set\n")); - goto free_and_return; - } - } - - /* Expected header size */ - hlen = sizeof(hflags) + sizeof(tunnel_id) + sizeof(session_id); - if (hflags & PPPOL2TP_HEADERFLAG_LENGTH) { - hlen += sizeof(len); - } - if (hflags & PPPOL2TP_HEADERFLAG_SEQUENCE) { - hlen += sizeof(ns) + sizeof(nr); - } - if (hflags & PPPOL2TP_HEADERFLAG_OFFSET) { - hlen += sizeof(offset); - } - if (p->len < hlen) { - goto packet_too_short; - } - - if (hflags & PPPOL2TP_HEADERFLAG_LENGTH) { - GETSHORT(len, inp); - if (p->len < len || len < hlen) { - goto packet_too_short; - } - } - GETSHORT(tunnel_id, inp); - GETSHORT(session_id, inp); - if (hflags & PPPOL2TP_HEADERFLAG_SEQUENCE) { - GETSHORT(ns, inp); - GETSHORT(nr, inp); - } - if (hflags & PPPOL2TP_HEADERFLAG_OFFSET) { - GETSHORT(offset, inp) - if (offset > 4096) { /* don't be fooled with large offset which might overflow hlen */ - PPPDEBUG(LOG_DEBUG, ("pppol2tp: strange packet received, offset=%d\n", offset)); - goto free_and_return; - } - hlen += offset; - if (p->len < hlen) { - goto packet_too_short; - } - INCPTR(offset, inp); - } - - /* printf("HLEN = %d\n", hlen); */ - - /* skip L2TP header */ - if (pbuf_header(p, -(s16_t)hlen) != 0) { - goto free_and_return; - } - - /* printf("LEN=%d, TUNNEL_ID=%d, SESSION_ID=%d, NS=%d, NR=%d, OFFSET=%d\n", len, tunnel_id, session_id, ns, nr, offset); */ - PPPDEBUG(LOG_DEBUG, ("pppol2tp: input packet, len=%"U16_F", tunnel=%"U16_F", session=%"U16_F", ns=%"U16_F", nr=%"U16_F"\n", - len, tunnel_id, session_id, ns, nr)); - - /* Control packet */ - if (hflags & PPPOL2TP_HEADERFLAG_CONTROL) { - pppol2tp_dispatch_control_packet(l2tp, port, p, ns, nr); - goto free_and_return; - } - - /* Data packet */ - if(l2tp->phase != PPPOL2TP_STATE_DATA) { - goto free_and_return; - } - if(tunnel_id != l2tp->remote_tunnel_id) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: tunnel ID mismatch, assigned=%d, received=%d\n", l2tp->remote_tunnel_id, tunnel_id)); - goto free_and_return; - } - if(session_id != l2tp->remote_session_id) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: session ID mismatch, assigned=%d, received=%d\n", l2tp->remote_session_id, session_id)); - goto free_and_return; - } - /* - * skip address & flags if necessary - * - * RFC 2661 does not specify whether the PPP frame in the L2TP payload should - * have a HDLC header or not. We handle both cases for compatibility. - */ - if (p->len >= 2) { - GETSHORT(hflags, inp); - if (hflags == 0xff03) { - pbuf_header(p, -(s16_t)2); - } - } - /* Dispatch the packet thereby consuming it. */ - ppp_input(l2tp->ppp, p); - return; - -packet_too_short: - PPPDEBUG(LOG_DEBUG, ("pppol2tp: packet too short: %d\n", p->len)); -free_and_return: - pbuf_free(p); -} - -/* L2TP Control packet entry point */ -static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, struct pbuf *p, u16_t ns, u16_t nr) { - u8_t *inp; - u16_t avplen, avpflags, vendorid, attributetype, messagetype=0; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - err_t err; -#endif -#if PPPOL2TP_AUTH_SUPPORT - lwip_md5_context md5_ctx; - u8_t md5_hash[16]; - u8_t challenge_id = 0; -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - l2tp->peer_nr = nr; - l2tp->peer_ns = ns; - /* printf("L2TP CTRL INPUT, ns=%d, nr=%d, len=%d\n", ns, nr, p->len); */ - - /* Handle the special case of the ICCN acknowledge */ - if (l2tp->phase == PPPOL2TP_STATE_ICCN_SENT && l2tp->peer_nr > l2tp->our_ns) { - l2tp->phase = PPPOL2TP_STATE_DATA; - } - - /* ZLB packets */ - if (p->tot_len == 0) { - return; - } - - p = ppp_singlebuf(p); - inp = (u8_t*)p->payload; - /* Decode AVPs */ - while (p->len > 0) { - if (p->len < sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype) ) { - goto packet_too_short; - } - GETSHORT(avpflags, inp); - avplen = avpflags & PPPOL2TP_AVPHEADERFLAG_LENGTHMASK; - /* printf("AVPLEN = %d\n", avplen); */ - if (p->len < avplen || avplen < sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype)) { - goto packet_too_short; - } - GETSHORT(vendorid, inp); - GETSHORT(attributetype, inp); - avplen -= sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype); - - /* Message type must be the first AVP */ - if (messagetype == 0) { - if (attributetype != 0 || vendorid != 0 || avplen != sizeof(messagetype) ) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: message type must be the first AVP\n")); - return; - } - GETSHORT(messagetype, inp); - /* printf("Message type = %d\n", messagetype); */ - switch(messagetype) { - /* Start Control Connection Reply */ - case PPPOL2TP_MESSAGETYPE_SCCRP: - /* Only accept SCCRP packet if we sent a SCCRQ */ - if (l2tp->phase != PPPOL2TP_STATE_SCCRQ_SENT) { - goto send_zlb; - } - break; - /* Incoming Call Reply */ - case PPPOL2TP_MESSAGETYPE_ICRP: - /* Only accept ICRP packet if we sent a IRCQ */ - if (l2tp->phase != PPPOL2TP_STATE_ICRQ_SENT) { - goto send_zlb; - } - break; - /* Stop Control Connection Notification */ - case PPPOL2TP_MESSAGETYPE_STOPCCN: - pppol2tp_send_zlb(l2tp, l2tp->our_ns); /* Ack the StopCCN before we switch to down state */ - if (l2tp->phase < PPPOL2TP_STATE_DATA) { - pppol2tp_abort_connect(l2tp); - } else if (l2tp->phase == PPPOL2TP_STATE_DATA) { - /* Don't disconnect here, we let the LCP Echo/Reply find the fact - * that PPP session is down. Asking the PPP stack to end the session - * require strict checking about the PPP phase to prevent endless - * disconnection loops. - */ - } - return; - default: - break; - } - goto nextavp; - } - - /* Skip proprietary L2TP extensions */ - if (vendorid != 0) { - goto skipavp; - } - - switch (messagetype) { - /* Start Control Connection Reply */ - case PPPOL2TP_MESSAGETYPE_SCCRP: - switch (attributetype) { - case PPPOL2TP_AVPTYPE_TUNNELID: - if (avplen != sizeof(l2tp->source_tunnel_id) ) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: AVP Assign tunnel ID length check failed\n")); - return; - } - GETSHORT(l2tp->source_tunnel_id, inp); - PPPDEBUG(LOG_DEBUG, ("pppol2tp: Assigned tunnel ID %"U16_F"\n", l2tp->source_tunnel_id)); - goto nextavp; -#if PPPOL2TP_AUTH_SUPPORT - case PPPOL2TP_AVPTYPE_CHALLENGE: - if (avplen == 0) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: Challenge length check failed\n")); - return; - } - if (l2tp->secret == NULL) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: Received challenge from peer and no secret key available\n")); - pppol2tp_abort_connect(l2tp); - return; - } - /* Generate hash of ID, secret, challenge */ - lwip_md5_init(&md5_ctx); - lwip_md5_starts(&md5_ctx); - challenge_id = PPPOL2TP_MESSAGETYPE_SCCCN; - lwip_md5_update(&md5_ctx, &challenge_id, 1); - lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); - lwip_md5_update(&md5_ctx, inp, avplen); - lwip_md5_finish(&md5_ctx, l2tp->challenge_hash); - lwip_md5_free(&md5_ctx); - l2tp->send_challenge = 1; - goto skipavp; - case PPPOL2TP_AVPTYPE_CHALLENGERESPONSE: - if (avplen != PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: AVP Challenge Response length check failed\n")); - return; - } - /* Generate hash of ID, secret, challenge */ - lwip_md5_init(&md5_ctx); - lwip_md5_starts(&md5_ctx); - challenge_id = PPPOL2TP_MESSAGETYPE_SCCRP; - lwip_md5_update(&md5_ctx, &challenge_id, 1); - lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); - lwip_md5_update(&md5_ctx, l2tp->secret_rv, sizeof(l2tp->secret_rv)); - lwip_md5_finish(&md5_ctx, md5_hash); - lwip_md5_free(&md5_ctx); - if ( memcmp(inp, md5_hash, sizeof(md5_hash)) ) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: Received challenge response from peer and secret key do not match\n")); - pppol2tp_abort_connect(l2tp); - return; - } - goto skipavp; -#endif /* PPPOL2TP_AUTH_SUPPORT */ - default: - break; - } - break; - /* Incoming Call Reply */ - case PPPOL2TP_MESSAGETYPE_ICRP: - switch (attributetype) { - case PPPOL2TP_AVPTYPE_SESSIONID: - if (avplen != sizeof(l2tp->source_session_id) ) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: AVP Assign session ID length check failed\n")); - return; - } - GETSHORT(l2tp->source_session_id, inp); - PPPDEBUG(LOG_DEBUG, ("pppol2tp: Assigned session ID %"U16_F"\n", l2tp->source_session_id)); - goto nextavp; - default: - break; - } - break; - default: - break; - } - -skipavp: - INCPTR(avplen, inp); -nextavp: - /* printf("AVP Found, vendor=%d, attribute=%d, len=%d\n", vendorid, attributetype, avplen); */ - /* next AVP */ - if (pbuf_header(p, -(s16_t)(avplen + sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype)) ) != 0) { - return; - } - } - - switch(messagetype) { - /* Start Control Connection Reply */ - case PPPOL2TP_MESSAGETYPE_SCCRP: - do { - l2tp->remote_session_id = magic(); - } while(l2tp->remote_session_id == 0); - l2tp->tunnel_port = port; /* LNS server might have chosen its own local port */ - l2tp->icrq_retried = 0; - l2tp->phase = PPPOL2TP_STATE_ICRQ_SENT; - l2tp->our_ns++; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_scccn(l2tp, l2tp->our_ns)) != 0) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCCN, error=%d\n", err)); - } -#else - pppol2tp_send_scccn(l2tp, l2tp->our_ns); -#endif - l2tp->our_ns++; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_icrq(l2tp, l2tp->our_ns)) != 0) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICRQ, error=%d\n", err)); - } -#else - pppol2tp_send_icrq(l2tp, l2tp->our_ns); -#endif - sys_untimeout(pppol2tp_timeout, l2tp); - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - /* Incoming Call Reply */ - case PPPOL2TP_MESSAGETYPE_ICRP: - l2tp->iccn_retried = 0; - l2tp->phase = PPPOL2TP_STATE_ICCN_SENT; - l2tp->our_ns++; - ppp_start(l2tp->ppp); /* notify upper layers */ -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_iccn(l2tp, l2tp->our_ns)) != 0) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICCN, error=%d\n", err)); - } -#else - pppol2tp_send_iccn(l2tp, l2tp->our_ns); -#endif - sys_untimeout(pppol2tp_timeout, l2tp); - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - /* Unhandled packet, send ZLB ACK */ - default: - goto send_zlb; - } - return; - -send_zlb: - pppol2tp_send_zlb(l2tp, l2tp->our_ns); - return; -packet_too_short: - PPPDEBUG(LOG_DEBUG, ("pppol2tp: packet too short: %d\n", p->len)); -} - -/* L2TP Timeout handler */ -static void pppol2tp_timeout(void *arg) { - pppol2tp_pcb *l2tp = (pppol2tp_pcb*)arg; -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - err_t err; -#endif - u32_t retry_wait; - - PPPDEBUG(LOG_DEBUG, ("pppol2tp: timeout\n")); - - switch (l2tp->phase) { - case PPPOL2TP_STATE_SCCRQ_SENT: - /* backoff wait */ - if (l2tp->sccrq_retried < 0xff) { - l2tp->sccrq_retried++; - } - if (!l2tp->ppp->settings.persist && l2tp->sccrq_retried >= PPPOL2TP_MAXSCCRQ) { - pppol2tp_abort_connect(l2tp); - return; - } - retry_wait = LWIP_MIN(PPPOL2TP_CONTROL_TIMEOUT * l2tp->sccrq_retried, PPPOL2TP_SLOW_RETRY); - PPPDEBUG(LOG_DEBUG, ("pppol2tp: sccrq_retried=%d\n", l2tp->sccrq_retried)); -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_sccrq(l2tp)) != 0) { - l2tp->sccrq_retried--; - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCRQ, error=%d\n", err)); - } -#else - if(pppol2tp_send_sccrq(l2tp) !=0) { - l2tp->sccrq_retried--; - } -#endif - sys_timeout(retry_wait, pppol2tp_timeout, l2tp); - break; - - case PPPOL2TP_STATE_ICRQ_SENT: - l2tp->icrq_retried++; - if (l2tp->icrq_retried >= PPPOL2TP_MAXICRQ) { - pppol2tp_abort_connect(l2tp); - return; - } - PPPDEBUG(LOG_DEBUG, ("pppol2tp: icrq_retried=%d\n", l2tp->icrq_retried)); - if (l2tp->peer_nr <= l2tp->our_ns -1) { /* the SCCCN was not acknowledged */ -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_scccn(l2tp, l2tp->our_ns -1)) != 0) { - l2tp->icrq_retried--; - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCCN, error=%d\n", err)); - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - } -#else - if (pppol2tp_send_scccn(l2tp, l2tp->our_ns -1) != 0) { - l2tp->icrq_retried--; - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - } -#endif - } -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_icrq(l2tp, l2tp->our_ns)) != 0) { - l2tp->icrq_retried--; - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICRQ, error=%d\n", err)); - } -#else - if (pppol2tp_send_icrq(l2tp, l2tp->our_ns) != 0) { - l2tp->icrq_retried--; - } -#endif - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - - case PPPOL2TP_STATE_ICCN_SENT: - l2tp->iccn_retried++; - if (l2tp->iccn_retried >= PPPOL2TP_MAXICCN) { - pppol2tp_abort_connect(l2tp); - return; - } - PPPDEBUG(LOG_DEBUG, ("pppol2tp: iccn_retried=%d\n", l2tp->iccn_retried)); -#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) - if ((err = pppol2tp_send_iccn(l2tp, l2tp->our_ns)) != 0) { - l2tp->iccn_retried--; - PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICCN, error=%d\n", err)); - } -#else - if (pppol2tp_send_iccn(l2tp, l2tp->our_ns) != 0) { - l2tp->iccn_retried--; - } -#endif - sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); - break; - - default: - return; /* all done, work in peace */ - } -} - -/* Connection attempt aborted */ -static void pppol2tp_abort_connect(pppol2tp_pcb *l2tp) { - PPPDEBUG(LOG_DEBUG, ("pppol2tp: could not establish connection\n")); - l2tp->phase = PPPOL2TP_STATE_INITIAL; - ppp_link_failed(l2tp->ppp); /* notify upper layers */ -} - -/* Initiate a new tunnel */ -static err_t pppol2tp_send_sccrq(pppol2tp_pcb *l2tp) { - struct pbuf *pb; - u8_t *p; - u16_t len; - - /* calculate UDP packet length */ - len = 12 +8 +8 +10 +10 +6+sizeof(PPPOL2TP_HOSTNAME)-1 +6+sizeof(PPPOL2TP_VENDORNAME)-1 +8 +8; -#if PPPOL2TP_AUTH_SUPPORT - if (l2tp->secret != NULL) { - len += 6 + sizeof(l2tp->secret_rv); - } -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - /* allocate a buffer */ - pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); - if (pb == NULL) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - p = (u8_t*)pb->payload; - /* fill in pkt */ - /* L2TP control header */ - PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); - PUTSHORT(len, p); /* Length */ - PUTSHORT(0, p); /* Tunnel Id */ - PUTSHORT(0, p); /* Session Id */ - PUTSHORT(0, p); /* NS Sequence number - to peer */ - PUTSHORT(0, p); /* NR Sequence number - expected for peer */ - - /* AVP - Message type */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ - PUTSHORT(PPPOL2TP_MESSAGETYPE_SCCRQ, p); /* Attribute value: Message type: SCCRQ */ - - /* AVP - L2TP Version */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_VERSION, p); /* Attribute type: Version */ - PUTSHORT(PPPOL2TP_VERSION, p); /* Attribute value: L2TP Version */ - - /* AVP - Framing capabilities */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES, p); /* Attribute type: Framing capabilities */ - PUTLONG(PPPOL2TP_FRAMINGCAPABILITIES, p); /* Attribute value: Framing capabilities */ - - /* AVP - Bearer capabilities */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_BEARERCAPABILITIES, p); /* Attribute type: Bearer capabilities */ - PUTLONG(PPPOL2TP_BEARERCAPABILITIES, p); /* Attribute value: Bearer capabilities */ - - /* AVP - Host name */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 6+sizeof(PPPOL2TP_HOSTNAME)-1, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_HOSTNAME, p); /* Attribute type: Hostname */ - MEMCPY(p, PPPOL2TP_HOSTNAME, sizeof(PPPOL2TP_HOSTNAME)-1); /* Attribute value: Hostname */ - INCPTR(sizeof(PPPOL2TP_HOSTNAME)-1, p); - - /* AVP - Vendor name */ - PUTSHORT(6+sizeof(PPPOL2TP_VENDORNAME)-1, p); /* len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_VENDORNAME, p); /* Attribute type: Vendor name */ - MEMCPY(p, PPPOL2TP_VENDORNAME, sizeof(PPPOL2TP_VENDORNAME)-1); /* Attribute value: Vendor name */ - INCPTR(sizeof(PPPOL2TP_VENDORNAME)-1, p); - - /* AVP - Assign tunnel ID */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_TUNNELID, p); /* Attribute type: Tunnel ID */ - PUTSHORT(l2tp->remote_tunnel_id, p); /* Attribute value: Tunnel ID */ - - /* AVP - Receive window size */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE, p); /* Attribute type: Receive window size */ - PUTSHORT(PPPOL2TP_RECEIVEWINDOWSIZE, p); /* Attribute value: Receive window size */ - -#if PPPOL2TP_AUTH_SUPPORT - /* AVP - Challenge */ - if (l2tp->secret != NULL) { - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 6 + sizeof(l2tp->secret_rv), p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_CHALLENGE, p); /* Attribute type: Challenge */ - MEMCPY(p, l2tp->secret_rv, sizeof(l2tp->secret_rv)); /* Attribute value: Random vector */ - INCPTR(sizeof(l2tp->secret_rv), p); - } -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - return pppol2tp_udp_send(l2tp, pb); -} - -/* Complete tunnel establishment */ -static err_t pppol2tp_send_scccn(pppol2tp_pcb *l2tp, u16_t ns) { - struct pbuf *pb; - u8_t *p; - u16_t len; - - /* calculate UDP packet length */ - len = 12 +8; -#if PPPOL2TP_AUTH_SUPPORT - if (l2tp->send_challenge) { - len += 6 + sizeof(l2tp->challenge_hash); - } -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - /* allocate a buffer */ - pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); - if (pb == NULL) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - p = (u8_t*)pb->payload; - /* fill in pkt */ - /* L2TP control header */ - PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); - PUTSHORT(len, p); /* Length */ - PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ - PUTSHORT(0, p); /* Session Id */ - PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ - - /* AVP - Message type */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ - PUTSHORT(PPPOL2TP_MESSAGETYPE_SCCCN, p); /* Attribute value: Message type: SCCCN */ - -#if PPPOL2TP_AUTH_SUPPORT - /* AVP - Challenge response */ - if (l2tp->send_challenge) { - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 6 + sizeof(l2tp->challenge_hash), p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_CHALLENGERESPONSE, p); /* Attribute type: Challenge response */ - MEMCPY(p, l2tp->challenge_hash, sizeof(l2tp->challenge_hash)); /* Attribute value: Computed challenge */ - INCPTR(sizeof(l2tp->challenge_hash), p); - } -#endif /* PPPOL2TP_AUTH_SUPPORT */ - - return pppol2tp_udp_send(l2tp, pb); -} - -/* Initiate a new session */ -static err_t pppol2tp_send_icrq(pppol2tp_pcb *l2tp, u16_t ns) { - struct pbuf *pb; - u8_t *p; - u16_t len; - u32_t serialnumber; - - /* calculate UDP packet length */ - len = 12 +8 +8 +10; - - /* allocate a buffer */ - pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); - if (pb == NULL) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - p = (u8_t*)pb->payload; - /* fill in pkt */ - /* L2TP control header */ - PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); - PUTSHORT(len, p); /* Length */ - PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ - PUTSHORT(0, p); /* Session Id */ - PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ - - /* AVP - Message type */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ - PUTSHORT(PPPOL2TP_MESSAGETYPE_ICRQ, p); /* Attribute value: Message type: ICRQ */ - - /* AVP - Assign session ID */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_SESSIONID, p); /* Attribute type: Session ID */ - PUTSHORT(l2tp->remote_session_id, p); /* Attribute value: Session ID */ - - /* AVP - Call Serial Number */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_CALLSERIALNUMBER, p); /* Attribute type: Serial number */ - serialnumber = magic(); - PUTLONG(serialnumber, p); /* Attribute value: Serial number */ - - return pppol2tp_udp_send(l2tp, pb); -} - -/* Complete tunnel establishment */ -static err_t pppol2tp_send_iccn(pppol2tp_pcb *l2tp, u16_t ns) { - struct pbuf *pb; - u8_t *p; - u16_t len; - - /* calculate UDP packet length */ - len = 12 +8 +10 +10; - - /* allocate a buffer */ - pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); - if (pb == NULL) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - p = (u8_t*)pb->payload; - /* fill in pkt */ - /* L2TP control header */ - PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); - PUTSHORT(len, p); /* Length */ - PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ - PUTSHORT(l2tp->source_session_id, p); /* Session Id */ - PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ - - /* AVP - Message type */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ - PUTSHORT(PPPOL2TP_MESSAGETYPE_ICCN, p); /* Attribute value: Message type: ICCN */ - - /* AVP - Framing type */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_FRAMINGTYPE, p); /* Attribute type: Framing type */ - PUTLONG(PPPOL2TP_FRAMINGTYPE, p); /* Attribute value: Framing type */ - - /* AVP - TX Connect speed */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_TXCONNECTSPEED, p); /* Attribute type: TX Connect speed */ - PUTLONG(PPPOL2TP_TXCONNECTSPEED, p); /* Attribute value: TX Connect speed */ - - return pppol2tp_udp_send(l2tp, pb); -} - -/* Send a ZLB ACK packet */ -static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns) { - struct pbuf *pb; - u8_t *p; - u16_t len; - - /* calculate UDP packet length */ - len = 12; - - /* allocate a buffer */ - pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); - if (pb == NULL) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - p = (u8_t*)pb->payload; - /* fill in pkt */ - /* L2TP control header */ - PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); - PUTSHORT(len, p); /* Length */ - PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ - PUTSHORT(0, p); /* Session Id */ - PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ - - return pppol2tp_udp_send(l2tp, pb); -} - -/* Send a StopCCN packet */ -static err_t pppol2tp_send_stopccn(pppol2tp_pcb *l2tp, u16_t ns) { - struct pbuf *pb; - u8_t *p; - u16_t len; - - /* calculate UDP packet length */ - len = 12 +8 +8 +8; - - /* allocate a buffer */ - pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); - if (pb == NULL) { - return ERR_MEM; - } - LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); - - p = (u8_t*)pb->payload; - /* fill in pkt */ - /* L2TP control header */ - PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); - PUTSHORT(len, p); /* Length */ - PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ - PUTSHORT(0, p); /* Session Id */ - PUTSHORT(ns, p); /* NS Sequence number - to peer */ - PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ - - /* AVP - Message type */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ - PUTSHORT(PPPOL2TP_MESSAGETYPE_STOPCCN, p); /* Attribute value: Message type: StopCCN */ - - /* AVP - Assign tunnel ID */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_TUNNELID, p); /* Attribute type: Tunnel ID */ - PUTSHORT(l2tp->remote_tunnel_id, p); /* Attribute value: Tunnel ID */ - - /* AVP - Result code */ - PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ - PUTSHORT(0, p); /* Vendor ID */ - PUTSHORT(PPPOL2TP_AVPTYPE_RESULTCODE, p); /* Attribute type: Result code */ - PUTSHORT(PPPOL2TP_RESULTCODE, p); /* Attribute value: Result code */ - - return pppol2tp_udp_send(l2tp, pb); -} - -static err_t pppol2tp_xmit(pppol2tp_pcb *l2tp, struct pbuf *pb) { - u8_t *p; - - /* make room for L2TP header - should not fail */ - if (pbuf_header(pb, (s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN) != 0) { - /* bail out */ - PPPDEBUG(LOG_ERR, ("pppol2tp: pppol2tp_pcb: could not allocate room for L2TP header\n")); - LINK_STATS_INC(link.lenerr); - pbuf_free(pb); - return ERR_BUF; - } - - p = (u8_t*)pb->payload; - PUTSHORT(PPPOL2TP_HEADERFLAG_DATA_MANDATORY, p); - PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ - PUTSHORT(l2tp->source_session_id, p); /* Session Id */ - - return pppol2tp_udp_send(l2tp, pb); -} - -static err_t pppol2tp_udp_send(pppol2tp_pcb *l2tp, struct pbuf *pb) { - err_t err; - if (l2tp->netif) { - err = udp_sendto_if(l2tp->udp, pb, &l2tp->remote_ip, l2tp->tunnel_port, l2tp->netif); - } else { - err = udp_sendto(l2tp->udp, pb, &l2tp->remote_ip, l2tp->tunnel_port); - } - pbuf_free(pb); - return err; -} - -#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ +/** + * @file + * Network Point to Point Protocol over Layer 2 Tunneling Protocol program file. + * + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +/* + * L2TP Support status: + * + * Supported: + * - L2TPv2 (PPP over L2TP, a.k.a. UDP tunnels) + * - LAC + * + * Not supported: + * - LNS (require PPP server support) + * - L2TPv3 ethernet pseudowires + * - L2TPv3 VLAN pseudowire + * - L2TPv3 PPP pseudowires + * - L2TPv3 IP encapsulation + * - L2TPv3 IP pseudowire + * - L2TP tunnel switching - http://tools.ietf.org/html/draft-ietf-l2tpext-tunnel-switching-08 + * - Multiple tunnels per UDP socket, as well as multiple sessions per tunnel + * - Hidden AVPs + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include "lwip/err.h" +#include "lwip/memp.h" +#include "lwip/netif.h" +#include "lwip/udp.h" +#include "lwip/snmp.h" + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/lcp.h" +#include "netif/ppp/ipcp.h" +#include "netif/ppp/pppol2tp.h" +#include "netif/ppp/pppcrypt.h" +#include "netif/ppp/magic.h" + +/* Memory pool */ +LWIP_MEMPOOL_DECLARE(PPPOL2TP_PCB, MEMP_NUM_PPPOL2TP_INTERFACES, sizeof(pppol2tp_pcb), "PPPOL2TP_PCB") + +/* callbacks called from PPP core */ +static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p); +static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol); +static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx); /* Destroy a L2TP control block */ +static void pppol2tp_connect(ppp_pcb *ppp, void *ctx); /* Be a LAC, connect to a LNS. */ +static void pppol2tp_disconnect(ppp_pcb *ppp, void *ctx); /* Disconnect */ + + /* Prototypes for procedures local to this file. */ +static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port); +static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, struct pbuf *p, u16_t ns, u16_t nr); +static void pppol2tp_timeout(void *arg); +static void pppol2tp_abort_connect(pppol2tp_pcb *l2tp); +static err_t pppol2tp_send_sccrq(pppol2tp_pcb *l2tp); +static err_t pppol2tp_send_scccn(pppol2tp_pcb *l2tp, u16_t ns); +static err_t pppol2tp_send_icrq(pppol2tp_pcb *l2tp, u16_t ns); +static err_t pppol2tp_send_iccn(pppol2tp_pcb *l2tp, u16_t ns); +static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns); +static err_t pppol2tp_send_stopccn(pppol2tp_pcb *l2tp, u16_t ns); +static err_t pppol2tp_xmit(pppol2tp_pcb *l2tp, struct pbuf *pb); +static err_t pppol2tp_udp_send(pppol2tp_pcb *l2tp, struct pbuf *pb); + +/* Callbacks structure for PPP core */ +static const struct link_callbacks pppol2tp_callbacks = { + pppol2tp_connect, +#if PPP_SERVER + NULL, +#endif /* PPP_SERVER */ + pppol2tp_disconnect, + pppol2tp_destroy, + pppol2tp_write, + pppol2tp_netif_output, + NULL, + NULL +}; + + +/* Create a new L2TP session. */ +ppp_pcb *pppol2tp_create(struct netif *pppif, + struct netif *netif, const ip_addr_t *ipaddr, u16_t port, + const u8_t *secret, u8_t secret_len, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb) { + ppp_pcb *ppp; + pppol2tp_pcb *l2tp; + struct udp_pcb *udp; +#if !PPPOL2TP_AUTH_SUPPORT + LWIP_UNUSED_ARG(secret); + LWIP_UNUSED_ARG(secret_len); +#endif /* !PPPOL2TP_AUTH_SUPPORT */ + + if (ipaddr == NULL) { + goto ipaddr_check_failed; + } + + l2tp = (pppol2tp_pcb *)LWIP_MEMPOOL_ALLOC(PPPOL2TP_PCB); + if (l2tp == NULL) { + goto memp_malloc_l2tp_failed; + } + + udp = udp_new_ip_type(IP_GET_TYPE(ipaddr)); + if (udp == NULL) { + goto udp_new_failed; + } + udp_recv(udp, pppol2tp_input, l2tp); + + ppp = ppp_new(pppif, &pppol2tp_callbacks, l2tp, link_status_cb, ctx_cb); + if (ppp == NULL) { + goto ppp_new_failed; + } + + memset(l2tp, 0, sizeof(pppol2tp_pcb)); + l2tp->phase = PPPOL2TP_STATE_INITIAL; + l2tp->ppp = ppp; + l2tp->udp = udp; + l2tp->netif = netif; + ip_addr_copy(l2tp->remote_ip, *ipaddr); + l2tp->remote_port = port; +#if PPPOL2TP_AUTH_SUPPORT + l2tp->secret = secret; + l2tp->secret_len = secret_len; +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + return ppp; + +ppp_new_failed: + udp_remove(udp); +udp_new_failed: + LWIP_MEMPOOL_FREE(PPPOL2TP_PCB, l2tp); +memp_malloc_l2tp_failed: +ipaddr_check_failed: + return NULL; +} + +/* Called by PPP core */ +static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { + pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; + struct pbuf *ph; /* UDP + L2TP header */ + err_t ret; +#if MIB2_STATS + u16_t tot_len; +#else /* MIB2_STATS */ + LWIP_UNUSED_ARG(ppp); +#endif /* MIB2_STATS */ + + ph = pbuf_alloc(PBUF_TRANSPORT, (u16_t)(PPPOL2TP_OUTPUT_DATA_HEADER_LEN), PBUF_RAM); + if(!ph) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.proterr); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + pbuf_free(p); + return ERR_MEM; + } + + pbuf_header(ph, -(s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN); /* hide L2TP header */ + pbuf_cat(ph, p); +#if MIB2_STATS + tot_len = ph->tot_len; +#endif /* MIB2_STATS */ + + ret = pppol2tp_xmit(l2tp, ph); + if (ret != ERR_OK) { + LINK_STATS_INC(link.err); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + return ret; + } + + MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, (u16_t)tot_len); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); + LINK_STATS_INC(link.xmit); + return ERR_OK; +} + +/* Called by PPP core */ +static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) { + pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; + struct pbuf *pb; + u8_t *pl; + err_t err; +#if MIB2_STATS + u16_t tot_len; +#else /* MIB2_STATS */ + LWIP_UNUSED_ARG(ppp); +#endif /* MIB2_STATS */ + + /* @todo: try to use pbuf_header() here! */ + pb = pbuf_alloc(PBUF_TRANSPORT, PPPOL2TP_OUTPUT_DATA_HEADER_LEN + sizeof(protocol), PBUF_RAM); + if(!pb) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.proterr); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + return ERR_MEM; + } + + pbuf_header(pb, -(s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN); + + pl = (u8_t*)pb->payload; + PUTSHORT(protocol, pl); + + pbuf_chain(pb, p); +#if MIB2_STATS + tot_len = pb->tot_len; +#endif /* MIB2_STATS */ + + if( (err = pppol2tp_xmit(l2tp, pb)) != ERR_OK) { + LINK_STATS_INC(link.err); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + return err; + } + + MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, tot_len); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); + LINK_STATS_INC(link.xmit); + return ERR_OK; +} + +/* Destroy a L2TP control block */ +static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx) { + pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; + LWIP_UNUSED_ARG(ppp); + + sys_untimeout(pppol2tp_timeout, l2tp); + udp_remove(l2tp->udp); + LWIP_MEMPOOL_FREE(PPPOL2TP_PCB, l2tp); + return ERR_OK; +} + +/* Be a LAC, connect to a LNS. */ +static void pppol2tp_connect(ppp_pcb *ppp, void *ctx) { +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + err_t err; +#endif + pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; + lcp_options *lcp_wo; + lcp_options *lcp_ao; +#if PPP_IPV4_SUPPORT && VJ_SUPPORT + ipcp_options *ipcp_wo; + ipcp_options *ipcp_ao; +#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ + + l2tp->tunnel_port = l2tp->remote_port; + l2tp->our_ns = 0; + l2tp->peer_nr = 0; + l2tp->peer_ns = 0; + l2tp->source_tunnel_id = 0; + l2tp->remote_tunnel_id = 0; + l2tp->source_session_id = 0; + l2tp->remote_session_id = 0; + /* l2tp->*_retried are cleared when used */ + + lcp_wo = &ppp->lcp_wantoptions; + lcp_wo->mru = PPPOL2TP_DEFMRU; + lcp_wo->neg_asyncmap = 0; + lcp_wo->neg_pcompression = 0; + lcp_wo->neg_accompression = 0; + lcp_wo->passive = 0; + lcp_wo->silent = 0; + + lcp_ao = &ppp->lcp_allowoptions; + lcp_ao->mru = PPPOL2TP_DEFMRU; + lcp_ao->neg_asyncmap = 0; + lcp_ao->neg_pcompression = 0; + lcp_ao->neg_accompression = 0; + +#if PPP_IPV4_SUPPORT && VJ_SUPPORT + ipcp_wo = &ppp->ipcp_wantoptions; + ipcp_wo->neg_vj = 0; + ipcp_wo->old_vj = 0; + + ipcp_ao = &ppp->ipcp_allowoptions; + ipcp_ao->neg_vj = 0; + ipcp_ao->old_vj = 0; +#endif /* PPP_IPV4_SUPPORT && VJ_SUPPORT */ + + /* Listen to a random source port, we need to do that instead of using udp_connect() + * because the L2TP LNS might answer with its own random source port (!= 1701) + */ +#if LWIP_IPV6 + if (IP_IS_V6_VAL(l2tp->udp->local_ip)) { + udp_bind(l2tp->udp, IP6_ADDR_ANY, 0); + } else +#endif /* LWIP_IPV6 */ + udp_bind(l2tp->udp, IP_ADDR_ANY, 0); + +#if PPPOL2TP_AUTH_SUPPORT + /* Generate random vector */ + if (l2tp->secret != NULL) { + magic_random_bytes(l2tp->secret_rv, sizeof(l2tp->secret_rv)); + } +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + do { + l2tp->remote_tunnel_id = magic(); + } while(l2tp->remote_tunnel_id == 0); + /* save state, in case we fail to send SCCRQ */ + l2tp->sccrq_retried = 0; + l2tp->phase = PPPOL2TP_STATE_SCCRQ_SENT; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_sccrq(l2tp)) != 0) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCRQ, error=%d\n", err)); + } +#else + pppol2tp_send_sccrq(l2tp); +#endif + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); +} + +/* Disconnect */ +static void pppol2tp_disconnect(ppp_pcb *ppp, void *ctx) { + pppol2tp_pcb *l2tp = (pppol2tp_pcb *)ctx; + + l2tp->our_ns++; + pppol2tp_send_stopccn(l2tp, l2tp->our_ns); + + /* stop any timer, disconnect can be called while initiating is in progress */ + sys_untimeout(pppol2tp_timeout, l2tp); + l2tp->phase = PPPOL2TP_STATE_INITIAL; + ppp_link_end(ppp); /* notify upper layers */ +} + +/* UDP Callback for incoming IPv4 L2TP frames */ +static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { + pppol2tp_pcb *l2tp = (pppol2tp_pcb*)arg; + u16_t hflags, hlen, len=0, tunnel_id=0, session_id=0, ns=0, nr=0, offset=0; + u8_t *inp; + LWIP_UNUSED_ARG(pcb); + + /* we can't unbound a UDP pcb, thus we can still receive UDP frames after the link is closed */ + if (l2tp->phase < PPPOL2TP_STATE_SCCRQ_SENT) { + goto free_and_return; + } + + if (!ip_addr_cmp(&l2tp->remote_ip, addr)) { + goto free_and_return; + } + + /* discard packet if port mismatch, but only if we received a SCCRP */ + if (l2tp->phase > PPPOL2TP_STATE_SCCRQ_SENT && l2tp->tunnel_port != port) { + goto free_and_return; + } + + /* printf("-----------\nL2TP INPUT, %d\n", p->len); */ + + /* L2TP header */ + if (p->len < sizeof(hflags) + sizeof(tunnel_id) + sizeof(session_id) ) { + goto packet_too_short; + } + + inp = (u8_t*)p->payload; + GETSHORT(hflags, inp); + + if (hflags & PPPOL2TP_HEADERFLAG_CONTROL) { + /* check mandatory flags for a control packet */ + if ( (hflags & PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY) != PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY ) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: mandatory header flags for control packet not set\n")); + goto free_and_return; + } + /* check forbidden flags for a control packet */ + if (hflags & PPPOL2TP_HEADERFLAG_CONTROL_FORBIDDEN) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: forbidden header flags for control packet found\n")); + goto free_and_return; + } + } else { + /* check mandatory flags for a data packet */ + if ( (hflags & PPPOL2TP_HEADERFLAG_DATA_MANDATORY) != PPPOL2TP_HEADERFLAG_DATA_MANDATORY) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: mandatory header flags for data packet not set\n")); + goto free_and_return; + } + } + + /* Expected header size */ + hlen = sizeof(hflags) + sizeof(tunnel_id) + sizeof(session_id); + if (hflags & PPPOL2TP_HEADERFLAG_LENGTH) { + hlen += sizeof(len); + } + if (hflags & PPPOL2TP_HEADERFLAG_SEQUENCE) { + hlen += sizeof(ns) + sizeof(nr); + } + if (hflags & PPPOL2TP_HEADERFLAG_OFFSET) { + hlen += sizeof(offset); + } + if (p->len < hlen) { + goto packet_too_short; + } + + if (hflags & PPPOL2TP_HEADERFLAG_LENGTH) { + GETSHORT(len, inp); + if (p->len < len || len < hlen) { + goto packet_too_short; + } + } + GETSHORT(tunnel_id, inp); + GETSHORT(session_id, inp); + if (hflags & PPPOL2TP_HEADERFLAG_SEQUENCE) { + GETSHORT(ns, inp); + GETSHORT(nr, inp); + } + if (hflags & PPPOL2TP_HEADERFLAG_OFFSET) { + GETSHORT(offset, inp) + if (offset > 4096) { /* don't be fooled with large offset which might overflow hlen */ + PPPDEBUG(LOG_DEBUG, ("pppol2tp: strange packet received, offset=%d\n", offset)); + goto free_and_return; + } + hlen += offset; + if (p->len < hlen) { + goto packet_too_short; + } + INCPTR(offset, inp); + } + + /* printf("HLEN = %d\n", hlen); */ + + /* skip L2TP header */ + if (pbuf_header(p, -(s16_t)hlen) != 0) { + goto free_and_return; + } + + /* printf("LEN=%d, TUNNEL_ID=%d, SESSION_ID=%d, NS=%d, NR=%d, OFFSET=%d\n", len, tunnel_id, session_id, ns, nr, offset); */ + PPPDEBUG(LOG_DEBUG, ("pppol2tp: input packet, len=%"U16_F", tunnel=%"U16_F", session=%"U16_F", ns=%"U16_F", nr=%"U16_F"\n", + len, tunnel_id, session_id, ns, nr)); + + /* Control packet */ + if (hflags & PPPOL2TP_HEADERFLAG_CONTROL) { + pppol2tp_dispatch_control_packet(l2tp, port, p, ns, nr); + goto free_and_return; + } + + /* Data packet */ + if(l2tp->phase != PPPOL2TP_STATE_DATA) { + goto free_and_return; + } + if(tunnel_id != l2tp->remote_tunnel_id) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: tunnel ID mismatch, assigned=%d, received=%d\n", l2tp->remote_tunnel_id, tunnel_id)); + goto free_and_return; + } + if(session_id != l2tp->remote_session_id) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: session ID mismatch, assigned=%d, received=%d\n", l2tp->remote_session_id, session_id)); + goto free_and_return; + } + /* + * skip address & flags if necessary + * + * RFC 2661 does not specify whether the PPP frame in the L2TP payload should + * have a HDLC header or not. We handle both cases for compatibility. + */ + if (p->len >= 2) { + GETSHORT(hflags, inp); + if (hflags == 0xff03) { + pbuf_header(p, -(s16_t)2); + } + } + /* Dispatch the packet thereby consuming it. */ + ppp_input(l2tp->ppp, p); + return; + +packet_too_short: + PPPDEBUG(LOG_DEBUG, ("pppol2tp: packet too short: %d\n", p->len)); +free_and_return: + pbuf_free(p); +} + +/* L2TP Control packet entry point */ +static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, struct pbuf *p, u16_t ns, u16_t nr) { + u8_t *inp; + u16_t avplen, avpflags, vendorid, attributetype, messagetype=0; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + err_t err; +#endif +#if PPPOL2TP_AUTH_SUPPORT + lwip_md5_context md5_ctx; + u8_t md5_hash[16]; + u8_t challenge_id = 0; +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + l2tp->peer_nr = nr; + l2tp->peer_ns = ns; + /* printf("L2TP CTRL INPUT, ns=%d, nr=%d, len=%d\n", ns, nr, p->len); */ + + /* Handle the special case of the ICCN acknowledge */ + if (l2tp->phase == PPPOL2TP_STATE_ICCN_SENT && l2tp->peer_nr > l2tp->our_ns) { + l2tp->phase = PPPOL2TP_STATE_DATA; + } + + /* ZLB packets */ + if (p->tot_len == 0) { + return; + } + + p = ppp_singlebuf(p); + inp = (u8_t*)p->payload; + /* Decode AVPs */ + while (p->len > 0) { + if (p->len < sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype) ) { + goto packet_too_short; + } + GETSHORT(avpflags, inp); + avplen = avpflags & PPPOL2TP_AVPHEADERFLAG_LENGTHMASK; + /* printf("AVPLEN = %d\n", avplen); */ + if (p->len < avplen || avplen < sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype)) { + goto packet_too_short; + } + GETSHORT(vendorid, inp); + GETSHORT(attributetype, inp); + avplen -= sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype); + + /* Message type must be the first AVP */ + if (messagetype == 0) { + if (attributetype != 0 || vendorid != 0 || avplen != sizeof(messagetype) ) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: message type must be the first AVP\n")); + return; + } + GETSHORT(messagetype, inp); + /* printf("Message type = %d\n", messagetype); */ + switch(messagetype) { + /* Start Control Connection Reply */ + case PPPOL2TP_MESSAGETYPE_SCCRP: + /* Only accept SCCRP packet if we sent a SCCRQ */ + if (l2tp->phase != PPPOL2TP_STATE_SCCRQ_SENT) { + goto send_zlb; + } + break; + /* Incoming Call Reply */ + case PPPOL2TP_MESSAGETYPE_ICRP: + /* Only accept ICRP packet if we sent a IRCQ */ + if (l2tp->phase != PPPOL2TP_STATE_ICRQ_SENT) { + goto send_zlb; + } + break; + /* Stop Control Connection Notification */ + case PPPOL2TP_MESSAGETYPE_STOPCCN: + pppol2tp_send_zlb(l2tp, l2tp->our_ns); /* Ack the StopCCN before we switch to down state */ + if (l2tp->phase < PPPOL2TP_STATE_DATA) { + pppol2tp_abort_connect(l2tp); + } else if (l2tp->phase == PPPOL2TP_STATE_DATA) { + /* Don't disconnect here, we let the LCP Echo/Reply find the fact + * that PPP session is down. Asking the PPP stack to end the session + * require strict checking about the PPP phase to prevent endless + * disconnection loops. + */ + } + return; + default: + break; + } + goto nextavp; + } + + /* Skip proprietary L2TP extensions */ + if (vendorid != 0) { + goto skipavp; + } + + switch (messagetype) { + /* Start Control Connection Reply */ + case PPPOL2TP_MESSAGETYPE_SCCRP: + switch (attributetype) { + case PPPOL2TP_AVPTYPE_TUNNELID: + if (avplen != sizeof(l2tp->source_tunnel_id) ) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: AVP Assign tunnel ID length check failed\n")); + return; + } + GETSHORT(l2tp->source_tunnel_id, inp); + PPPDEBUG(LOG_DEBUG, ("pppol2tp: Assigned tunnel ID %"U16_F"\n", l2tp->source_tunnel_id)); + goto nextavp; +#if PPPOL2TP_AUTH_SUPPORT + case PPPOL2TP_AVPTYPE_CHALLENGE: + if (avplen == 0) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: Challenge length check failed\n")); + return; + } + if (l2tp->secret == NULL) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: Received challenge from peer and no secret key available\n")); + pppol2tp_abort_connect(l2tp); + return; + } + /* Generate hash of ID, secret, challenge */ + lwip_md5_init(&md5_ctx); + lwip_md5_starts(&md5_ctx); + challenge_id = PPPOL2TP_MESSAGETYPE_SCCCN; + lwip_md5_update(&md5_ctx, &challenge_id, 1); + lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); + lwip_md5_update(&md5_ctx, inp, avplen); + lwip_md5_finish(&md5_ctx, l2tp->challenge_hash); + lwip_md5_free(&md5_ctx); + l2tp->send_challenge = 1; + goto skipavp; + case PPPOL2TP_AVPTYPE_CHALLENGERESPONSE: + if (avplen != PPPOL2TP_AVPTYPE_CHALLENGERESPONSE_SIZE) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: AVP Challenge Response length check failed\n")); + return; + } + /* Generate hash of ID, secret, challenge */ + lwip_md5_init(&md5_ctx); + lwip_md5_starts(&md5_ctx); + challenge_id = PPPOL2TP_MESSAGETYPE_SCCRP; + lwip_md5_update(&md5_ctx, &challenge_id, 1); + lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); + lwip_md5_update(&md5_ctx, l2tp->secret_rv, sizeof(l2tp->secret_rv)); + lwip_md5_finish(&md5_ctx, md5_hash); + lwip_md5_free(&md5_ctx); + if ( memcmp(inp, md5_hash, sizeof(md5_hash)) ) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: Received challenge response from peer and secret key do not match\n")); + pppol2tp_abort_connect(l2tp); + return; + } + goto skipavp; +#endif /* PPPOL2TP_AUTH_SUPPORT */ + default: + break; + } + break; + /* Incoming Call Reply */ + case PPPOL2TP_MESSAGETYPE_ICRP: + switch (attributetype) { + case PPPOL2TP_AVPTYPE_SESSIONID: + if (avplen != sizeof(l2tp->source_session_id) ) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: AVP Assign session ID length check failed\n")); + return; + } + GETSHORT(l2tp->source_session_id, inp); + PPPDEBUG(LOG_DEBUG, ("pppol2tp: Assigned session ID %"U16_F"\n", l2tp->source_session_id)); + goto nextavp; + default: + break; + } + break; + default: + break; + } + +skipavp: + INCPTR(avplen, inp); +nextavp: + /* printf("AVP Found, vendor=%d, attribute=%d, len=%d\n", vendorid, attributetype, avplen); */ + /* next AVP */ + if (pbuf_header(p, -(s16_t)(avplen + sizeof(avpflags) + sizeof(vendorid) + sizeof(attributetype)) ) != 0) { + return; + } + } + + switch(messagetype) { + /* Start Control Connection Reply */ + case PPPOL2TP_MESSAGETYPE_SCCRP: + do { + l2tp->remote_session_id = magic(); + } while(l2tp->remote_session_id == 0); + l2tp->tunnel_port = port; /* LNS server might have chosen its own local port */ + l2tp->icrq_retried = 0; + l2tp->phase = PPPOL2TP_STATE_ICRQ_SENT; + l2tp->our_ns++; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_scccn(l2tp, l2tp->our_ns)) != 0) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCCN, error=%d\n", err)); + } +#else + pppol2tp_send_scccn(l2tp, l2tp->our_ns); +#endif + l2tp->our_ns++; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_icrq(l2tp, l2tp->our_ns)) != 0) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICRQ, error=%d\n", err)); + } +#else + pppol2tp_send_icrq(l2tp, l2tp->our_ns); +#endif + sys_untimeout(pppol2tp_timeout, l2tp); + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); + break; + /* Incoming Call Reply */ + case PPPOL2TP_MESSAGETYPE_ICRP: + l2tp->iccn_retried = 0; + l2tp->phase = PPPOL2TP_STATE_ICCN_SENT; + l2tp->our_ns++; + ppp_start(l2tp->ppp); /* notify upper layers */ +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_iccn(l2tp, l2tp->our_ns)) != 0) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICCN, error=%d\n", err)); + } +#else + pppol2tp_send_iccn(l2tp, l2tp->our_ns); +#endif + sys_untimeout(pppol2tp_timeout, l2tp); + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); + break; + /* Unhandled packet, send ZLB ACK */ + default: + goto send_zlb; + } + return; + +send_zlb: + pppol2tp_send_zlb(l2tp, l2tp->our_ns); + return; +packet_too_short: + PPPDEBUG(LOG_DEBUG, ("pppol2tp: packet too short: %d\n", p->len)); +} + +/* L2TP Timeout handler */ +static void pppol2tp_timeout(void *arg) { + pppol2tp_pcb *l2tp = (pppol2tp_pcb*)arg; +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + err_t err; +#endif + u32_t retry_wait; + + PPPDEBUG(LOG_DEBUG, ("pppol2tp: timeout\n")); + + switch (l2tp->phase) { + case PPPOL2TP_STATE_SCCRQ_SENT: + /* backoff wait */ + if (l2tp->sccrq_retried < 0xff) { + l2tp->sccrq_retried++; + } + if (!l2tp->ppp->settings.persist && l2tp->sccrq_retried >= PPPOL2TP_MAXSCCRQ) { + pppol2tp_abort_connect(l2tp); + return; + } + retry_wait = LWIP_MIN(PPPOL2TP_CONTROL_TIMEOUT * l2tp->sccrq_retried, PPPOL2TP_SLOW_RETRY); + PPPDEBUG(LOG_DEBUG, ("pppol2tp: sccrq_retried=%d\n", l2tp->sccrq_retried)); +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_sccrq(l2tp)) != 0) { + l2tp->sccrq_retried--; + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCRQ, error=%d\n", err)); + } +#else + if(pppol2tp_send_sccrq(l2tp) !=0) { + l2tp->sccrq_retried--; + } +#endif + sys_timeout(retry_wait, pppol2tp_timeout, l2tp); + break; + + case PPPOL2TP_STATE_ICRQ_SENT: + l2tp->icrq_retried++; + if (l2tp->icrq_retried >= PPPOL2TP_MAXICRQ) { + pppol2tp_abort_connect(l2tp); + return; + } + PPPDEBUG(LOG_DEBUG, ("pppol2tp: icrq_retried=%d\n", l2tp->icrq_retried)); + if (l2tp->peer_nr <= l2tp->our_ns -1) { /* the SCCCN was not acknowledged */ +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_scccn(l2tp, l2tp->our_ns -1)) != 0) { + l2tp->icrq_retried--; + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send SCCCN, error=%d\n", err)); + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); + break; + } +#else + if (pppol2tp_send_scccn(l2tp, l2tp->our_ns -1) != 0) { + l2tp->icrq_retried--; + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); + break; + } +#endif + } +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_icrq(l2tp, l2tp->our_ns)) != 0) { + l2tp->icrq_retried--; + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICRQ, error=%d\n", err)); + } +#else + if (pppol2tp_send_icrq(l2tp, l2tp->our_ns) != 0) { + l2tp->icrq_retried--; + } +#endif + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); + break; + + case PPPOL2TP_STATE_ICCN_SENT: + l2tp->iccn_retried++; + if (l2tp->iccn_retried >= PPPOL2TP_MAXICCN) { + pppol2tp_abort_connect(l2tp); + return; + } + PPPDEBUG(LOG_DEBUG, ("pppol2tp: iccn_retried=%d\n", l2tp->iccn_retried)); +#if defined(LWIP_DEBUG) && (LOG_DEBUG == LWIP_DBG_ON) + if ((err = pppol2tp_send_iccn(l2tp, l2tp->our_ns)) != 0) { + l2tp->iccn_retried--; + PPPDEBUG(LOG_DEBUG, ("pppol2tp: failed to send ICCN, error=%d\n", err)); + } +#else + if (pppol2tp_send_iccn(l2tp, l2tp->our_ns) != 0) { + l2tp->iccn_retried--; + } +#endif + sys_timeout(PPPOL2TP_CONTROL_TIMEOUT, pppol2tp_timeout, l2tp); + break; + + default: + return; /* all done, work in peace */ + } +} + +/* Connection attempt aborted */ +static void pppol2tp_abort_connect(pppol2tp_pcb *l2tp) { + PPPDEBUG(LOG_DEBUG, ("pppol2tp: could not establish connection\n")); + l2tp->phase = PPPOL2TP_STATE_INITIAL; + ppp_link_failed(l2tp->ppp); /* notify upper layers */ +} + +/* Initiate a new tunnel */ +static err_t pppol2tp_send_sccrq(pppol2tp_pcb *l2tp) { + struct pbuf *pb; + u8_t *p; + u16_t len; + + /* calculate UDP packet length */ + len = 12 +8 +8 +10 +10 +6+sizeof(PPPOL2TP_HOSTNAME)-1 +6+sizeof(PPPOL2TP_VENDORNAME)-1 +8 +8; +#if PPPOL2TP_AUTH_SUPPORT + if (l2tp->secret != NULL) { + len += 6 + sizeof(l2tp->secret_rv); + } +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + /* allocate a buffer */ + pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); + if (pb == NULL) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + p = (u8_t*)pb->payload; + /* fill in pkt */ + /* L2TP control header */ + PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); + PUTSHORT(len, p); /* Length */ + PUTSHORT(0, p); /* Tunnel Id */ + PUTSHORT(0, p); /* Session Id */ + PUTSHORT(0, p); /* NS Sequence number - to peer */ + PUTSHORT(0, p); /* NR Sequence number - expected for peer */ + + /* AVP - Message type */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ + PUTSHORT(PPPOL2TP_MESSAGETYPE_SCCRQ, p); /* Attribute value: Message type: SCCRQ */ + + /* AVP - L2TP Version */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_VERSION, p); /* Attribute type: Version */ + PUTSHORT(PPPOL2TP_VERSION, p); /* Attribute value: L2TP Version */ + + /* AVP - Framing capabilities */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_FRAMINGCAPABILITIES, p); /* Attribute type: Framing capabilities */ + PUTLONG(PPPOL2TP_FRAMINGCAPABILITIES, p); /* Attribute value: Framing capabilities */ + + /* AVP - Bearer capabilities */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_BEARERCAPABILITIES, p); /* Attribute type: Bearer capabilities */ + PUTLONG(PPPOL2TP_BEARERCAPABILITIES, p); /* Attribute value: Bearer capabilities */ + + /* AVP - Host name */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 6+sizeof(PPPOL2TP_HOSTNAME)-1, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_HOSTNAME, p); /* Attribute type: Hostname */ + MEMCPY(p, PPPOL2TP_HOSTNAME, sizeof(PPPOL2TP_HOSTNAME)-1); /* Attribute value: Hostname */ + INCPTR(sizeof(PPPOL2TP_HOSTNAME)-1, p); + + /* AVP - Vendor name */ + PUTSHORT(6+sizeof(PPPOL2TP_VENDORNAME)-1, p); /* len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_VENDORNAME, p); /* Attribute type: Vendor name */ + MEMCPY(p, PPPOL2TP_VENDORNAME, sizeof(PPPOL2TP_VENDORNAME)-1); /* Attribute value: Vendor name */ + INCPTR(sizeof(PPPOL2TP_VENDORNAME)-1, p); + + /* AVP - Assign tunnel ID */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_TUNNELID, p); /* Attribute type: Tunnel ID */ + PUTSHORT(l2tp->remote_tunnel_id, p); /* Attribute value: Tunnel ID */ + + /* AVP - Receive window size */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_RECEIVEWINDOWSIZE, p); /* Attribute type: Receive window size */ + PUTSHORT(PPPOL2TP_RECEIVEWINDOWSIZE, p); /* Attribute value: Receive window size */ + +#if PPPOL2TP_AUTH_SUPPORT + /* AVP - Challenge */ + if (l2tp->secret != NULL) { + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 6 + sizeof(l2tp->secret_rv), p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_CHALLENGE, p); /* Attribute type: Challenge */ + MEMCPY(p, l2tp->secret_rv, sizeof(l2tp->secret_rv)); /* Attribute value: Random vector */ + INCPTR(sizeof(l2tp->secret_rv), p); + } +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + return pppol2tp_udp_send(l2tp, pb); +} + +/* Complete tunnel establishment */ +static err_t pppol2tp_send_scccn(pppol2tp_pcb *l2tp, u16_t ns) { + struct pbuf *pb; + u8_t *p; + u16_t len; + + /* calculate UDP packet length */ + len = 12 +8; +#if PPPOL2TP_AUTH_SUPPORT + if (l2tp->send_challenge) { + len += 6 + sizeof(l2tp->challenge_hash); + } +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + /* allocate a buffer */ + pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); + if (pb == NULL) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + p = (u8_t*)pb->payload; + /* fill in pkt */ + /* L2TP control header */ + PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); + PUTSHORT(len, p); /* Length */ + PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ + PUTSHORT(0, p); /* Session Id */ + PUTSHORT(ns, p); /* NS Sequence number - to peer */ + PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + + /* AVP - Message type */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ + PUTSHORT(PPPOL2TP_MESSAGETYPE_SCCCN, p); /* Attribute value: Message type: SCCCN */ + +#if PPPOL2TP_AUTH_SUPPORT + /* AVP - Challenge response */ + if (l2tp->send_challenge) { + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 6 + sizeof(l2tp->challenge_hash), p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_CHALLENGERESPONSE, p); /* Attribute type: Challenge response */ + MEMCPY(p, l2tp->challenge_hash, sizeof(l2tp->challenge_hash)); /* Attribute value: Computed challenge */ + INCPTR(sizeof(l2tp->challenge_hash), p); + } +#endif /* PPPOL2TP_AUTH_SUPPORT */ + + return pppol2tp_udp_send(l2tp, pb); +} + +/* Initiate a new session */ +static err_t pppol2tp_send_icrq(pppol2tp_pcb *l2tp, u16_t ns) { + struct pbuf *pb; + u8_t *p; + u16_t len; + u32_t serialnumber; + + /* calculate UDP packet length */ + len = 12 +8 +8 +10; + + /* allocate a buffer */ + pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); + if (pb == NULL) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + p = (u8_t*)pb->payload; + /* fill in pkt */ + /* L2TP control header */ + PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); + PUTSHORT(len, p); /* Length */ + PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ + PUTSHORT(0, p); /* Session Id */ + PUTSHORT(ns, p); /* NS Sequence number - to peer */ + PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + + /* AVP - Message type */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ + PUTSHORT(PPPOL2TP_MESSAGETYPE_ICRQ, p); /* Attribute value: Message type: ICRQ */ + + /* AVP - Assign session ID */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_SESSIONID, p); /* Attribute type: Session ID */ + PUTSHORT(l2tp->remote_session_id, p); /* Attribute value: Session ID */ + + /* AVP - Call Serial Number */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_CALLSERIALNUMBER, p); /* Attribute type: Serial number */ + serialnumber = magic(); + PUTLONG(serialnumber, p); /* Attribute value: Serial number */ + + return pppol2tp_udp_send(l2tp, pb); +} + +/* Complete tunnel establishment */ +static err_t pppol2tp_send_iccn(pppol2tp_pcb *l2tp, u16_t ns) { + struct pbuf *pb; + u8_t *p; + u16_t len; + + /* calculate UDP packet length */ + len = 12 +8 +10 +10; + + /* allocate a buffer */ + pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); + if (pb == NULL) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + p = (u8_t*)pb->payload; + /* fill in pkt */ + /* L2TP control header */ + PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); + PUTSHORT(len, p); /* Length */ + PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ + PUTSHORT(l2tp->source_session_id, p); /* Session Id */ + PUTSHORT(ns, p); /* NS Sequence number - to peer */ + PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + + /* AVP - Message type */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ + PUTSHORT(PPPOL2TP_MESSAGETYPE_ICCN, p); /* Attribute value: Message type: ICCN */ + + /* AVP - Framing type */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_FRAMINGTYPE, p); /* Attribute type: Framing type */ + PUTLONG(PPPOL2TP_FRAMINGTYPE, p); /* Attribute value: Framing type */ + + /* AVP - TX Connect speed */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 10, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_TXCONNECTSPEED, p); /* Attribute type: TX Connect speed */ + PUTLONG(PPPOL2TP_TXCONNECTSPEED, p); /* Attribute value: TX Connect speed */ + + return pppol2tp_udp_send(l2tp, pb); +} + +/* Send a ZLB ACK packet */ +static err_t pppol2tp_send_zlb(pppol2tp_pcb *l2tp, u16_t ns) { + struct pbuf *pb; + u8_t *p; + u16_t len; + + /* calculate UDP packet length */ + len = 12; + + /* allocate a buffer */ + pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); + if (pb == NULL) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + p = (u8_t*)pb->payload; + /* fill in pkt */ + /* L2TP control header */ + PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); + PUTSHORT(len, p); /* Length */ + PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ + PUTSHORT(0, p); /* Session Id */ + PUTSHORT(ns, p); /* NS Sequence number - to peer */ + PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + + return pppol2tp_udp_send(l2tp, pb); +} + +/* Send a StopCCN packet */ +static err_t pppol2tp_send_stopccn(pppol2tp_pcb *l2tp, u16_t ns) { + struct pbuf *pb; + u8_t *p; + u16_t len; + + /* calculate UDP packet length */ + len = 12 +8 +8 +8; + + /* allocate a buffer */ + pb = pbuf_alloc(PBUF_TRANSPORT, len, PBUF_RAM); + if (pb == NULL) { + return ERR_MEM; + } + LWIP_ASSERT("pb->tot_len == pb->len", pb->tot_len == pb->len); + + p = (u8_t*)pb->payload; + /* fill in pkt */ + /* L2TP control header */ + PUTSHORT(PPPOL2TP_HEADERFLAG_CONTROL_MANDATORY, p); + PUTSHORT(len, p); /* Length */ + PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ + PUTSHORT(0, p); /* Session Id */ + PUTSHORT(ns, p); /* NS Sequence number - to peer */ + PUTSHORT(l2tp->peer_ns+1, p); /* NR Sequence number - expected for peer */ + + /* AVP - Message type */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_MESSAGE, p); /* Attribute type: Message Type */ + PUTSHORT(PPPOL2TP_MESSAGETYPE_STOPCCN, p); /* Attribute value: Message type: StopCCN */ + + /* AVP - Assign tunnel ID */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_TUNNELID, p); /* Attribute type: Tunnel ID */ + PUTSHORT(l2tp->remote_tunnel_id, p); /* Attribute value: Tunnel ID */ + + /* AVP - Result code */ + PUTSHORT(PPPOL2TP_AVPHEADERFLAG_MANDATORY + 8, p); /* Mandatory flag + len field */ + PUTSHORT(0, p); /* Vendor ID */ + PUTSHORT(PPPOL2TP_AVPTYPE_RESULTCODE, p); /* Attribute type: Result code */ + PUTSHORT(PPPOL2TP_RESULTCODE, p); /* Attribute value: Result code */ + + return pppol2tp_udp_send(l2tp, pb); +} + +static err_t pppol2tp_xmit(pppol2tp_pcb *l2tp, struct pbuf *pb) { + u8_t *p; + + /* make room for L2TP header - should not fail */ + if (pbuf_header(pb, (s16_t)PPPOL2TP_OUTPUT_DATA_HEADER_LEN) != 0) { + /* bail out */ + PPPDEBUG(LOG_ERR, ("pppol2tp: pppol2tp_pcb: could not allocate room for L2TP header\n")); + LINK_STATS_INC(link.lenerr); + pbuf_free(pb); + return ERR_BUF; + } + + p = (u8_t*)pb->payload; + PUTSHORT(PPPOL2TP_HEADERFLAG_DATA_MANDATORY, p); + PUTSHORT(l2tp->source_tunnel_id, p); /* Tunnel Id */ + PUTSHORT(l2tp->source_session_id, p); /* Session Id */ + + return pppol2tp_udp_send(l2tp, pb); +} + +static err_t pppol2tp_udp_send(pppol2tp_pcb *l2tp, struct pbuf *pb) { + err_t err; + if (l2tp->netif) { + err = udp_sendto_if(l2tp->udp, pb, &l2tp->remote_ip, l2tp->tunnel_port, l2tp->netif); + } else { + err = udp_sendto(l2tp->udp, pb, &l2tp->remote_ip, l2tp->tunnel_port); + } + pbuf_free(pb); + return err; +} + +#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.c index fb48df4..5a7edae 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/pppos.c @@ -1,875 +1,875 @@ -/** - * @file - * Network Point to Point Protocol over Serial file. - * - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include - -#include "lwip/arch.h" -#include "lwip/err.h" -#include "lwip/pbuf.h" -#include "lwip/sys.h" -#include "lwip/memp.h" -#include "lwip/netif.h" -#include "lwip/snmp.h" -#include "lwip/priv/tcpip_priv.h" -#include "lwip/api.h" -#include "lwip/ip4.h" /* for ip4_input() */ - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/pppos.h" -#include "netif/ppp/vj.h" - -/* Memory pool */ -LWIP_MEMPOOL_DECLARE(PPPOS_PCB, MEMP_NUM_PPPOS_INTERFACES, sizeof(pppos_pcb), "PPPOS_PCB") - -/* callbacks called from PPP core */ -static err_t pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p); -static err_t pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol); -static void pppos_connect(ppp_pcb *ppp, void *ctx); -#if PPP_SERVER -static void pppos_listen(ppp_pcb *ppp, void *ctx); -#endif /* PPP_SERVER */ -static void pppos_disconnect(ppp_pcb *ppp, void *ctx); -static err_t pppos_destroy(ppp_pcb *ppp, void *ctx); -static void pppos_send_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp); -static void pppos_recv_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp); - -/* Prototypes for procedures local to this file. */ -#if PPP_INPROC_IRQ_SAFE -static void pppos_input_callback(void *arg); -#endif /* PPP_INPROC_IRQ_SAFE */ -static void pppos_input_free_current_packet(pppos_pcb *pppos); -static void pppos_input_drop(pppos_pcb *pppos); -static err_t pppos_output_append(pppos_pcb *pppos, err_t err, struct pbuf *nb, u8_t c, u8_t accm, u16_t *fcs); -static err_t pppos_output_last(pppos_pcb *pppos, err_t err, struct pbuf *nb, u16_t *fcs); - -/* Callbacks structure for PPP core */ -static const struct link_callbacks pppos_callbacks = { - pppos_connect, -#if PPP_SERVER - pppos_listen, -#endif /* PPP_SERVER */ - pppos_disconnect, - pppos_destroy, - pppos_write, - pppos_netif_output, - pppos_send_config, - pppos_recv_config -}; - -/* PPP's Asynchronous-Control-Character-Map. The mask array is used - * to select the specific bit for a character. */ -#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & 1 << (c & 0x07)) - -#if PPP_FCS_TABLE -/* - * FCS lookup table as calculated by genfcstab. - */ -static const u16_t fcstab[256] = { - 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, - 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, - 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, - 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, - 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, - 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, - 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, - 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, - 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, - 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, - 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, - 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, - 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, - 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, - 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, - 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, - 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, - 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, - 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, - 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, - 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, - 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, - 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, - 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, - 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, - 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, - 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, - 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, - 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, - 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, - 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, - 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 -}; -#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff]) -#else /* PPP_FCS_TABLE */ -/* The HDLC polynomial: X**0 + X**5 + X**12 + X**16 (0x8408) */ -#define PPP_FCS_POLYNOMIAL 0x8408 -static u16_t -ppp_get_fcs(u8_t byte) -{ - unsigned int octet; - int bit; - octet = byte; - for (bit = 8; bit-- > 0; ) { - octet = (octet & 0x01) ? ((octet >> 1) ^ PPP_FCS_POLYNOMIAL) : (octet >> 1); - } - return octet & 0xffff; -} -#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ ppp_get_fcs(((fcs) ^ (c)) & 0xff)) -#endif /* PPP_FCS_TABLE */ - -/* - * Values for FCS calculations. - */ -#define PPP_INITFCS 0xffff /* Initial FCS value */ -#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ - -#if PPP_INPROC_IRQ_SAFE -#define PPPOS_DECL_PROTECT(lev) SYS_ARCH_DECL_PROTECT(lev) -#define PPPOS_PROTECT(lev) SYS_ARCH_PROTECT(lev) -#define PPPOS_UNPROTECT(lev) SYS_ARCH_UNPROTECT(lev) -#else -#define PPPOS_DECL_PROTECT(lev) -#define PPPOS_PROTECT(lev) -#define PPPOS_UNPROTECT(lev) -#endif /* PPP_INPROC_IRQ_SAFE */ - - -/* - * Create a new PPP connection using the given serial I/O device. - * - * Return 0 on success, an error code on failure. - */ -ppp_pcb *pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, - ppp_link_status_cb_fn link_status_cb, void *ctx_cb) -{ - pppos_pcb *pppos; - ppp_pcb *ppp; - - pppos = (pppos_pcb *)LWIP_MEMPOOL_ALLOC(PPPOS_PCB); - if (pppos == NULL) { - return NULL; - } - - ppp = ppp_new(pppif, &pppos_callbacks, pppos, link_status_cb, ctx_cb); - if (ppp == NULL) { - LWIP_MEMPOOL_FREE(PPPOS_PCB, pppos); - return NULL; - } - - memset(pppos, 0, sizeof(pppos_pcb)); - pppos->ppp = ppp; - pppos->output_cb = output_cb; - return ppp; -} - -/* Called by PPP core */ -static err_t -pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) -{ - pppos_pcb *pppos = (pppos_pcb *)ctx; - u8_t *s; - struct pbuf *nb; - u16_t n; - u16_t fcs_out; - err_t err; - LWIP_UNUSED_ARG(ppp); - - /* Grab an output buffer. */ - nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL); - if (nb == NULL) { - PPPDEBUG(LOG_WARNING, ("pppos_write[%d]: alloc fail\n", ppp->netif->num)); - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - pbuf_free(p); - return ERR_MEM; - } - - /* If the link has been idle, we'll send a fresh flag character to - * flush any noise. */ - err = ERR_OK; - if ((sys_now() - pppos->last_xmit) >= PPP_MAXIDLEFLAG) { - err = pppos_output_append(pppos, err, nb, PPP_FLAG, 0, NULL); - } - - /* Load output buffer. */ - fcs_out = PPP_INITFCS; - s = (u8_t*)p->payload; - n = p->len; - while (n-- > 0) { - err = pppos_output_append(pppos, err, nb, *s++, 1, &fcs_out); - } - - err = pppos_output_last(pppos, err, nb, &fcs_out); - if (err == ERR_OK) { - PPPDEBUG(LOG_INFO, ("pppos_write[%d]: len=%d\n", ppp->netif->num, p->len)); - } else { - PPPDEBUG(LOG_WARNING, ("pppos_write[%d]: output failed len=%d\n", ppp->netif->num, p->len)); - } - pbuf_free(p); - return err; -} - -/* Called by PPP core */ -static err_t -pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol) -{ - pppos_pcb *pppos = (pppos_pcb *)ctx; - struct pbuf *nb, *p; - u16_t fcs_out; - err_t err; - LWIP_UNUSED_ARG(ppp); - - /* Grab an output buffer. */ - nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL); - if (nb == NULL) { - PPPDEBUG(LOG_WARNING, ("pppos_netif_output[%d]: alloc fail\n", ppp->netif->num)); - LINK_STATS_INC(link.memerr); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - return ERR_MEM; - } - - /* If the link has been idle, we'll send a fresh flag character to - * flush any noise. */ - err = ERR_OK; - if ((sys_now() - pppos->last_xmit) >= PPP_MAXIDLEFLAG) { - err = pppos_output_append(pppos, err, nb, PPP_FLAG, 0, NULL); - } - - fcs_out = PPP_INITFCS; - if (!pppos->accomp) { - err = pppos_output_append(pppos, err, nb, PPP_ALLSTATIONS, 1, &fcs_out); - err = pppos_output_append(pppos, err, nb, PPP_UI, 1, &fcs_out); - } - if (!pppos->pcomp || protocol > 0xFF) { - err = pppos_output_append(pppos, err, nb, (protocol >> 8) & 0xFF, 1, &fcs_out); - } - err = pppos_output_append(pppos, err, nb, protocol & 0xFF, 1, &fcs_out); - - /* Load packet. */ - for(p = pb; p; p = p->next) { - u16_t n = p->len; - u8_t *s = (u8_t*)p->payload; - - while (n-- > 0) { - err = pppos_output_append(pppos, err, nb, *s++, 1, &fcs_out); - } - } - - err = pppos_output_last(pppos, err, nb, &fcs_out); - if (err == ERR_OK) { - PPPDEBUG(LOG_INFO, ("pppos_netif_output[%d]: proto=0x%"X16_F", len = %d\n", ppp->netif->num, protocol, pb->tot_len)); - } else { - PPPDEBUG(LOG_WARNING, ("pppos_netif_output[%d]: output failed proto=0x%"X16_F", len = %d\n", ppp->netif->num, protocol, pb->tot_len)); - } - return err; -} - -static void -pppos_connect(ppp_pcb *ppp, void *ctx) -{ - pppos_pcb *pppos = (pppos_pcb *)ctx; - PPPOS_DECL_PROTECT(lev); - -#if PPP_INPROC_IRQ_SAFE - /* input pbuf left over from last session? */ - pppos_input_free_current_packet(pppos); -#endif /* PPP_INPROC_IRQ_SAFE */ - - /* reset PPPoS control block to its initial state */ - memset(&pppos->last_xmit, 0, sizeof(pppos_pcb) - offsetof(pppos_pcb, last_xmit)); - - /* - * Default the in and out accm so that escape and flag characters - * are always escaped. - */ - pppos->in_accm[15] = 0x60; /* no need to protect since RX is not running */ - pppos->out_accm[15] = 0x60; - PPPOS_PROTECT(lev); - pppos->open = 1; - PPPOS_UNPROTECT(lev); - - /* - * Start the connection and handle incoming events (packet or timeout). - */ - PPPDEBUG(LOG_INFO, ("pppos_connect: unit %d: connecting\n", ppp->netif->num)); - ppp_start(ppp); /* notify upper layers */ -} - -#if PPP_SERVER -static void -pppos_listen(ppp_pcb *ppp, void *ctx) -{ - pppos_pcb *pppos = (pppos_pcb *)ctx; - PPPOS_DECL_PROTECT(lev); - -#if PPP_INPROC_IRQ_SAFE - /* input pbuf left over from last session? */ - pppos_input_free_current_packet(pppos); -#endif /* PPP_INPROC_IRQ_SAFE */ - - /* reset PPPoS control block to its initial state */ - memset(&pppos->last_xmit, 0, sizeof(pppos_pcb) - offsetof(pppos_pcb, last_xmit)); - - /* - * Default the in and out accm so that escape and flag characters - * are always escaped. - */ - pppos->in_accm[15] = 0x60; /* no need to protect since RX is not running */ - pppos->out_accm[15] = 0x60; - PPPOS_PROTECT(lev); - pppos->open = 1; - PPPOS_UNPROTECT(lev); - - /* - * Wait for something to happen. - */ - PPPDEBUG(LOG_INFO, ("pppos_listen: unit %d: listening\n", ppp->netif->num)); - ppp_start(ppp); /* notify upper layers */ -} -#endif /* PPP_SERVER */ - -static void -pppos_disconnect(ppp_pcb *ppp, void *ctx) -{ - pppos_pcb *pppos = (pppos_pcb *)ctx; - PPPOS_DECL_PROTECT(lev); - - PPPOS_PROTECT(lev); - pppos->open = 0; - PPPOS_UNPROTECT(lev); - - /* If PPP_INPROC_IRQ_SAFE is used we cannot call - * pppos_input_free_current_packet() here because - * rx IRQ might still call pppos_input(). - */ -#if !PPP_INPROC_IRQ_SAFE - /* input pbuf left ? */ - pppos_input_free_current_packet(pppos); -#endif /* !PPP_INPROC_IRQ_SAFE */ - - ppp_link_end(ppp); /* notify upper layers */ -} - -static err_t -pppos_destroy(ppp_pcb *ppp, void *ctx) -{ - pppos_pcb *pppos = (pppos_pcb *)ctx; - LWIP_UNUSED_ARG(ppp); - -#if PPP_INPROC_IRQ_SAFE - /* input pbuf left ? */ - pppos_input_free_current_packet(pppos); -#endif /* PPP_INPROC_IRQ_SAFE */ - - LWIP_MEMPOOL_FREE(PPPOS_PCB, pppos); - return ERR_OK; -} - -#if !NO_SYS && !PPP_INPROC_IRQ_SAFE -/** Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. - * - * @param ppp PPP descriptor index, returned by pppos_create() - * @param s received data - * @param l length of received data - */ -err_t -pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l) -{ - struct pbuf *p; - err_t err; - - p = pbuf_alloc(PBUF_RAW, l, PBUF_POOL); - if (!p) { - return ERR_MEM; - } - pbuf_take(p, s, l); - - err = tcpip_inpkt(p, ppp_netif(ppp), pppos_input_sys); - if (err != ERR_OK) { - pbuf_free(p); - } - return err; -} - -/* called from TCPIP thread */ -err_t pppos_input_sys(struct pbuf *p, struct netif *inp) { - ppp_pcb *ppp = (ppp_pcb*)inp->state; - struct pbuf *n; - - for (n = p; n; n = n->next) { - pppos_input(ppp, (u8_t*)n->payload, n->len); - } - pbuf_free(p); - return ERR_OK; -} -#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ - -/** PPPoS input helper struct, must be packed since it is stored - * to pbuf->payload, which might be unaligned. */ -#if PPP_INPROC_IRQ_SAFE -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct pppos_input_header { - PACK_STRUCT_FIELD(ppp_pcb *ppp); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif -#endif /* PPP_INPROC_IRQ_SAFE */ - -/** Pass received raw characters to PPPoS to be decoded. - * - * @param ppp PPP descriptor index, returned by pppos_create() - * @param s received data - * @param l length of received data - */ -void -pppos_input(ppp_pcb *ppp, u8_t *s, int l) -{ - pppos_pcb *pppos = (pppos_pcb *)ppp->link_ctx_cb; - struct pbuf *next_pbuf; - u8_t cur_char; - u8_t escaped; - PPPOS_DECL_PROTECT(lev); - - PPPDEBUG(LOG_DEBUG, ("pppos_input[%d]: got %d bytes\n", ppp->netif->num, l)); - while (l-- > 0) { - cur_char = *s++; - - PPPOS_PROTECT(lev); - /* ppp_input can disconnect the interface, we need to abort to prevent a memory - * leak if there are remaining bytes because pppos_connect and pppos_listen - * functions expect input buffer to be free. Furthermore there are no real - * reason to continue reading bytes if we are disconnected. - */ - if (!pppos->open) { - PPPOS_UNPROTECT(lev); - return; - } - escaped = ESCAPE_P(pppos->in_accm, cur_char); - PPPOS_UNPROTECT(lev); - /* Handle special characters. */ - if (escaped) { - /* Check for escape sequences. */ - /* XXX Note that this does not handle an escaped 0x5d character which - * would appear as an escape character. Since this is an ASCII ']' - * and there is no reason that I know of to escape it, I won't complicate - * the code to handle this case. GLL */ - if (cur_char == PPP_ESCAPE) { - pppos->in_escaped = 1; - /* Check for the flag character. */ - } else if (cur_char == PPP_FLAG) { - /* If this is just an extra flag character, ignore it. */ - if (pppos->in_state <= PDADDRESS) { - /* ignore it */; - /* If we haven't received the packet header, drop what has come in. */ - } else if (pppos->in_state < PDDATA) { - PPPDEBUG(LOG_WARNING, - ("pppos_input[%d]: Dropping incomplete packet %d\n", - ppp->netif->num, pppos->in_state)); - LINK_STATS_INC(link.lenerr); - pppos_input_drop(pppos); - /* If the fcs is invalid, drop the packet. */ - } else if (pppos->in_fcs != PPP_GOODFCS) { - PPPDEBUG(LOG_INFO, - ("pppos_input[%d]: Dropping bad fcs 0x%"X16_F" proto=0x%"X16_F"\n", - ppp->netif->num, pppos->in_fcs, pppos->in_protocol)); - /* Note: If you get lots of these, check for UART frame errors or try different baud rate */ - LINK_STATS_INC(link.chkerr); - pppos_input_drop(pppos); - /* Otherwise it's a good packet so pass it on. */ - } else { - struct pbuf *inp; - /* Trim off the checksum. */ - if(pppos->in_tail->len > 2) { - pppos->in_tail->len -= 2; - - pppos->in_tail->tot_len = pppos->in_tail->len; - if (pppos->in_tail != pppos->in_head) { - pbuf_cat(pppos->in_head, pppos->in_tail); - } - } else { - pppos->in_tail->tot_len = pppos->in_tail->len; - if (pppos->in_tail != pppos->in_head) { - pbuf_cat(pppos->in_head, pppos->in_tail); - } - - pbuf_realloc(pppos->in_head, pppos->in_head->tot_len - 2); - } - - /* Dispatch the packet thereby consuming it. */ - inp = pppos->in_head; - /* Packet consumed, release our references. */ - pppos->in_head = NULL; - pppos->in_tail = NULL; -#if IP_FORWARD || LWIP_IPV6_FORWARD - /* hide the room for Ethernet forwarding header */ - pbuf_header(inp, -(s16_t)(PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN)); -#endif /* IP_FORWARD || LWIP_IPV6_FORWARD */ -#if PPP_INPROC_IRQ_SAFE - if(tcpip_callback_with_block(pppos_input_callback, inp, 0) != ERR_OK) { - PPPDEBUG(LOG_ERR, ("pppos_input[%d]: tcpip_callback() failed, dropping packet\n", ppp->netif->num)); - pbuf_free(inp); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(ppp->netif, ifindiscards); - } -#else /* PPP_INPROC_IRQ_SAFE */ - ppp_input(ppp, inp); -#endif /* PPP_INPROC_IRQ_SAFE */ - } - - /* Prepare for a new packet. */ - pppos->in_fcs = PPP_INITFCS; - pppos->in_state = PDADDRESS; - pppos->in_escaped = 0; - /* Other characters are usually control characters that may have - * been inserted by the physical layer so here we just drop them. */ - } else { - PPPDEBUG(LOG_WARNING, - ("pppos_input[%d]: Dropping ACCM char <%d>\n", ppp->netif->num, cur_char)); - } - /* Process other characters. */ - } else { - /* Unencode escaped characters. */ - if (pppos->in_escaped) { - pppos->in_escaped = 0; - cur_char ^= PPP_TRANS; - } - - /* Process character relative to current state. */ - switch(pppos->in_state) { - case PDIDLE: /* Idle state - waiting. */ - /* Drop the character if it's not 0xff - * we would have processed a flag character above. */ - if (cur_char != PPP_ALLSTATIONS) { - break; - } - /* no break */ - /* Fall through */ - - case PDSTART: /* Process start flag. */ - /* Prepare for a new packet. */ - pppos->in_fcs = PPP_INITFCS; - /* no break */ - /* Fall through */ - - case PDADDRESS: /* Process address field. */ - if (cur_char == PPP_ALLSTATIONS) { - pppos->in_state = PDCONTROL; - break; - } - /* no break */ - - /* Else assume compressed address and control fields so - * fall through to get the protocol... */ - case PDCONTROL: /* Process control field. */ - /* If we don't get a valid control code, restart. */ - if (cur_char == PPP_UI) { - pppos->in_state = PDPROTOCOL1; - break; - } - /* no break */ - -#if 0 - else { - PPPDEBUG(LOG_WARNING, - ("pppos_input[%d]: Invalid control <%d>\n", ppp->netif->num, cur_char)); - pppos->in_state = PDSTART; - } -#endif - case PDPROTOCOL1: /* Process protocol field 1. */ - /* If the lower bit is set, this is the end of the protocol - * field. */ - if (cur_char & 1) { - pppos->in_protocol = cur_char; - pppos->in_state = PDDATA; - } else { - pppos->in_protocol = (u16_t)cur_char << 8; - pppos->in_state = PDPROTOCOL2; - } - break; - case PDPROTOCOL2: /* Process protocol field 2. */ - pppos->in_protocol |= cur_char; - pppos->in_state = PDDATA; - break; - case PDDATA: /* Process data byte. */ - /* Make space to receive processed data. */ - if (pppos->in_tail == NULL || pppos->in_tail->len == PBUF_POOL_BUFSIZE) { - u16_t pbuf_alloc_len; - if (pppos->in_tail != NULL) { - pppos->in_tail->tot_len = pppos->in_tail->len; - if (pppos->in_tail != pppos->in_head) { - pbuf_cat(pppos->in_head, pppos->in_tail); - /* give up the in_tail reference now */ - pppos->in_tail = NULL; - } - } - /* If we haven't started a packet, we need a packet header. */ - pbuf_alloc_len = 0; -#if IP_FORWARD || LWIP_IPV6_FORWARD - /* If IP forwarding is enabled we are reserving PBUF_LINK_ENCAPSULATION_HLEN - * + PBUF_LINK_HLEN bytes so the packet is being allocated with enough header - * space to be forwarded (to Ethernet for example). - */ - if (pppos->in_head == NULL) { - pbuf_alloc_len = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; - } -#endif /* IP_FORWARD || LWIP_IPV6_FORWARD */ - next_pbuf = pbuf_alloc(PBUF_RAW, pbuf_alloc_len, PBUF_POOL); - if (next_pbuf == NULL) { - /* No free buffers. Drop the input packet and let the - * higher layers deal with it. Continue processing - * the received pbuf chain in case a new packet starts. */ - PPPDEBUG(LOG_ERR, ("pppos_input[%d]: NO FREE PBUFS!\n", ppp->netif->num)); - LINK_STATS_INC(link.memerr); - pppos_input_drop(pppos); - pppos->in_state = PDSTART; /* Wait for flag sequence. */ - break; - } - if (pppos->in_head == NULL) { - u8_t *payload = ((u8_t*)next_pbuf->payload) + pbuf_alloc_len; -#if PPP_INPROC_IRQ_SAFE - ((struct pppos_input_header*)payload)->ppp = ppp; - payload += sizeof(struct pppos_input_header); - next_pbuf->len += sizeof(struct pppos_input_header); -#endif /* PPP_INPROC_IRQ_SAFE */ - next_pbuf->len += sizeof(pppos->in_protocol); - *(payload++) = pppos->in_protocol >> 8; - *(payload) = pppos->in_protocol & 0xFF; - pppos->in_head = next_pbuf; - } - pppos->in_tail = next_pbuf; - } - /* Load character into buffer. */ - ((u8_t*)pppos->in_tail->payload)[pppos->in_tail->len++] = cur_char; - break; - default: - break; - } - - /* update the frame check sequence number. */ - pppos->in_fcs = PPP_FCS(pppos->in_fcs, cur_char); - } - } /* while (l-- > 0), all bytes processed */ -} - -#if PPP_INPROC_IRQ_SAFE -/* PPPoS input callback using one input pointer - */ -static void pppos_input_callback(void *arg) { - struct pbuf *pb = (struct pbuf*)arg; - ppp_pcb *ppp; - - ppp = ((struct pppos_input_header*)pb->payload)->ppp; - if(pbuf_header(pb, -(s16_t)sizeof(struct pppos_input_header))) { - LWIP_ASSERT("pbuf_header failed\n", 0); - goto drop; - } - - /* Dispatch the packet thereby consuming it. */ - ppp_input(ppp, pb); - return; - -drop: - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(ppp->netif, ifindiscards); - pbuf_free(pb); -} -#endif /* PPP_INPROC_IRQ_SAFE */ - -static void -pppos_send_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp) -{ - int i; - pppos_pcb *pppos = (pppos_pcb *)ctx; - LWIP_UNUSED_ARG(ppp); - - pppos->pcomp = pcomp; - pppos->accomp = accomp; - - /* Load the ACCM bits for the 32 control codes. */ - for (i = 0; i < 32/8; i++) { - pppos->out_accm[i] = (u8_t)((accm >> (8 * i)) & 0xFF); - } - - PPPDEBUG(LOG_INFO, ("pppos_send_config[%d]: out_accm=%X %X %X %X\n", - pppos->ppp->netif->num, - pppos->out_accm[0], pppos->out_accm[1], pppos->out_accm[2], pppos->out_accm[3])); -} - -static void -pppos_recv_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp) -{ - int i; - pppos_pcb *pppos = (pppos_pcb *)ctx; - PPPOS_DECL_PROTECT(lev); - LWIP_UNUSED_ARG(ppp); - LWIP_UNUSED_ARG(pcomp); - LWIP_UNUSED_ARG(accomp); - - /* Load the ACCM bits for the 32 control codes. */ - PPPOS_PROTECT(lev); - for (i = 0; i < 32 / 8; i++) { - pppos->in_accm[i] = (u8_t)(accm >> (i * 8)); - } - PPPOS_UNPROTECT(lev); - - PPPDEBUG(LOG_INFO, ("pppos_recv_config[%d]: in_accm=%X %X %X %X\n", - pppos->ppp->netif->num, - pppos->in_accm[0], pppos->in_accm[1], pppos->in_accm[2], pppos->in_accm[3])); -} - -/* - * Drop the input packet. - */ -static void -pppos_input_free_current_packet(pppos_pcb *pppos) -{ - if (pppos->in_head != NULL) { - if (pppos->in_tail && (pppos->in_tail != pppos->in_head)) { - pbuf_free(pppos->in_tail); - } - pbuf_free(pppos->in_head); - pppos->in_head = NULL; - } - pppos->in_tail = NULL; -} - -/* - * Drop the input packet and increase error counters. - */ -static void -pppos_input_drop(pppos_pcb *pppos) -{ - if (pppos->in_head != NULL) { -#if 0 - PPPDEBUG(LOG_INFO, ("pppos_input_drop: %d:%.*H\n", pppos->in_head->len, min(60, pppos->in_head->len * 2), pppos->in_head->payload)); -#endif - PPPDEBUG(LOG_INFO, ("pppos_input_drop: pbuf len=%d, addr %p\n", pppos->in_head->len, (void*)pppos->in_head)); - } - pppos_input_free_current_packet(pppos); -#if VJ_SUPPORT - vj_uncompress_err(&pppos->ppp->vj_comp); -#endif /* VJ_SUPPORT */ - - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(pppos->ppp->netif, ifindiscards); -} - -/* - * pppos_output_append - append given character to end of given pbuf. - * If out_accm is not 0 and the character needs to be escaped, do so. - * If pbuf is full, send the pbuf and reuse it. - * Return the current pbuf. - */ -static err_t -pppos_output_append(pppos_pcb *pppos, err_t err, struct pbuf *nb, u8_t c, u8_t accm, u16_t *fcs) -{ - if (err != ERR_OK) { - return err; - } - - /* Make sure there is room for the character and an escape code. - * Sure we don't quite fill the buffer if the character doesn't - * get escaped but is one character worth complicating this? */ - if ((PBUF_POOL_BUFSIZE - nb->len) < 2) { - u32_t l = pppos->output_cb(pppos->ppp, (u8_t*)nb->payload, nb->len, pppos->ppp->ctx_cb); - if (l != nb->len) { - return ERR_IF; - } - nb->len = 0; - } - - /* Update FCS before checking for special characters. */ - if (fcs) { - *fcs = PPP_FCS(*fcs, c); - } - - /* Copy to output buffer escaping special characters. */ - if (accm && ESCAPE_P(pppos->out_accm, c)) { - *((u8_t*)nb->payload + nb->len++) = PPP_ESCAPE; - *((u8_t*)nb->payload + nb->len++) = c ^ PPP_TRANS; - } else { - *((u8_t*)nb->payload + nb->len++) = c; - } - - return ERR_OK; -} - -static err_t -pppos_output_last(pppos_pcb *pppos, err_t err, struct pbuf *nb, u16_t *fcs) -{ - ppp_pcb *ppp = pppos->ppp; - - /* Add FCS and trailing flag. */ - err = pppos_output_append(pppos, err, nb, ~(*fcs) & 0xFF, 1, NULL); - err = pppos_output_append(pppos, err, nb, (~(*fcs) >> 8) & 0xFF, 1, NULL); - err = pppos_output_append(pppos, err, nb, PPP_FLAG, 0, NULL); - - if (err != ERR_OK) { - goto failed; - } - - /* Send remaining buffer if not empty */ - if (nb->len > 0) { - u32_t l = pppos->output_cb(ppp, (u8_t*)nb->payload, nb->len, ppp->ctx_cb); - if (l != nb->len) { - err = ERR_IF; - goto failed; - } - } - - pppos->last_xmit = sys_now(); - MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, nb->tot_len); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); - LINK_STATS_INC(link.xmit); - pbuf_free(nb); - return ERR_OK; - -failed: - pppos->last_xmit = 0; /* prepend PPP_FLAG to next packet */ - LINK_STATS_INC(link.err); - LINK_STATS_INC(link.drop); - MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); - pbuf_free(nb); - return err; -} - -#endif /* PPP_SUPPORT && PPPOS_SUPPORT */ +/** + * @file + * Network Point to Point Protocol over Serial file. + * + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include + +#include "lwip/arch.h" +#include "lwip/err.h" +#include "lwip/pbuf.h" +#include "lwip/sys.h" +#include "lwip/memp.h" +#include "lwip/netif.h" +#include "lwip/snmp.h" +#include "lwip/priv/tcpip_priv.h" +#include "lwip/api.h" +#include "lwip/ip4.h" /* for ip4_input() */ + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/pppos.h" +#include "netif/ppp/vj.h" + +/* Memory pool */ +LWIP_MEMPOOL_DECLARE(PPPOS_PCB, MEMP_NUM_PPPOS_INTERFACES, sizeof(pppos_pcb), "PPPOS_PCB") + +/* callbacks called from PPP core */ +static err_t pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p); +static err_t pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol); +static void pppos_connect(ppp_pcb *ppp, void *ctx); +#if PPP_SERVER +static void pppos_listen(ppp_pcb *ppp, void *ctx); +#endif /* PPP_SERVER */ +static void pppos_disconnect(ppp_pcb *ppp, void *ctx); +static err_t pppos_destroy(ppp_pcb *ppp, void *ctx); +static void pppos_send_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp); +static void pppos_recv_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp); + +/* Prototypes for procedures local to this file. */ +#if PPP_INPROC_IRQ_SAFE +static void pppos_input_callback(void *arg); +#endif /* PPP_INPROC_IRQ_SAFE */ +static void pppos_input_free_current_packet(pppos_pcb *pppos); +static void pppos_input_drop(pppos_pcb *pppos); +static err_t pppos_output_append(pppos_pcb *pppos, err_t err, struct pbuf *nb, u8_t c, u8_t accm, u16_t *fcs); +static err_t pppos_output_last(pppos_pcb *pppos, err_t err, struct pbuf *nb, u16_t *fcs); + +/* Callbacks structure for PPP core */ +static const struct link_callbacks pppos_callbacks = { + pppos_connect, +#if PPP_SERVER + pppos_listen, +#endif /* PPP_SERVER */ + pppos_disconnect, + pppos_destroy, + pppos_write, + pppos_netif_output, + pppos_send_config, + pppos_recv_config +}; + +/* PPP's Asynchronous-Control-Character-Map. The mask array is used + * to select the specific bit for a character. */ +#define ESCAPE_P(accm, c) ((accm)[(c) >> 3] & 1 << (c & 0x07)) + +#if PPP_FCS_TABLE +/* + * FCS lookup table as calculated by genfcstab. + */ +static const u16_t fcstab[256] = { + 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, + 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, + 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, + 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, + 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, + 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, + 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, + 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, + 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, + 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, + 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, + 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, + 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, + 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, + 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, + 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, + 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, + 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, + 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, + 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, + 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, + 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, + 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, + 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, + 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, + 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, + 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, + 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, + 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, + 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, + 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, + 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 +}; +#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff]) +#else /* PPP_FCS_TABLE */ +/* The HDLC polynomial: X**0 + X**5 + X**12 + X**16 (0x8408) */ +#define PPP_FCS_POLYNOMIAL 0x8408 +static u16_t +ppp_get_fcs(u8_t byte) +{ + unsigned int octet; + int bit; + octet = byte; + for (bit = 8; bit-- > 0; ) { + octet = (octet & 0x01) ? ((octet >> 1) ^ PPP_FCS_POLYNOMIAL) : (octet >> 1); + } + return octet & 0xffff; +} +#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ ppp_get_fcs(((fcs) ^ (c)) & 0xff)) +#endif /* PPP_FCS_TABLE */ + +/* + * Values for FCS calculations. + */ +#define PPP_INITFCS 0xffff /* Initial FCS value */ +#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ + +#if PPP_INPROC_IRQ_SAFE +#define PPPOS_DECL_PROTECT(lev) SYS_ARCH_DECL_PROTECT(lev) +#define PPPOS_PROTECT(lev) SYS_ARCH_PROTECT(lev) +#define PPPOS_UNPROTECT(lev) SYS_ARCH_UNPROTECT(lev) +#else +#define PPPOS_DECL_PROTECT(lev) +#define PPPOS_PROTECT(lev) +#define PPPOS_UNPROTECT(lev) +#endif /* PPP_INPROC_IRQ_SAFE */ + + +/* + * Create a new PPP connection using the given serial I/O device. + * + * Return 0 on success, an error code on failure. + */ +ppp_pcb *pppos_create(struct netif *pppif, pppos_output_cb_fn output_cb, + ppp_link_status_cb_fn link_status_cb, void *ctx_cb) +{ + pppos_pcb *pppos; + ppp_pcb *ppp; + + pppos = (pppos_pcb *)LWIP_MEMPOOL_ALLOC(PPPOS_PCB); + if (pppos == NULL) { + return NULL; + } + + ppp = ppp_new(pppif, &pppos_callbacks, pppos, link_status_cb, ctx_cb); + if (ppp == NULL) { + LWIP_MEMPOOL_FREE(PPPOS_PCB, pppos); + return NULL; + } + + memset(pppos, 0, sizeof(pppos_pcb)); + pppos->ppp = ppp; + pppos->output_cb = output_cb; + return ppp; +} + +/* Called by PPP core */ +static err_t +pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) +{ + pppos_pcb *pppos = (pppos_pcb *)ctx; + u8_t *s; + struct pbuf *nb; + u16_t n; + u16_t fcs_out; + err_t err; + LWIP_UNUSED_ARG(ppp); + + /* Grab an output buffer. */ + nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL); + if (nb == NULL) { + PPPDEBUG(LOG_WARNING, ("pppos_write[%d]: alloc fail\n", ppp->netif->num)); + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + pbuf_free(p); + return ERR_MEM; + } + + /* If the link has been idle, we'll send a fresh flag character to + * flush any noise. */ + err = ERR_OK; + if ((sys_now() - pppos->last_xmit) >= PPP_MAXIDLEFLAG) { + err = pppos_output_append(pppos, err, nb, PPP_FLAG, 0, NULL); + } + + /* Load output buffer. */ + fcs_out = PPP_INITFCS; + s = (u8_t*)p->payload; + n = p->len; + while (n-- > 0) { + err = pppos_output_append(pppos, err, nb, *s++, 1, &fcs_out); + } + + err = pppos_output_last(pppos, err, nb, &fcs_out); + if (err == ERR_OK) { + PPPDEBUG(LOG_INFO, ("pppos_write[%d]: len=%d\n", ppp->netif->num, p->len)); + } else { + PPPDEBUG(LOG_WARNING, ("pppos_write[%d]: output failed len=%d\n", ppp->netif->num, p->len)); + } + pbuf_free(p); + return err; +} + +/* Called by PPP core */ +static err_t +pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol) +{ + pppos_pcb *pppos = (pppos_pcb *)ctx; + struct pbuf *nb, *p; + u16_t fcs_out; + err_t err; + LWIP_UNUSED_ARG(ppp); + + /* Grab an output buffer. */ + nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL); + if (nb == NULL) { + PPPDEBUG(LOG_WARNING, ("pppos_netif_output[%d]: alloc fail\n", ppp->netif->num)); + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + return ERR_MEM; + } + + /* If the link has been idle, we'll send a fresh flag character to + * flush any noise. */ + err = ERR_OK; + if ((sys_now() - pppos->last_xmit) >= PPP_MAXIDLEFLAG) { + err = pppos_output_append(pppos, err, nb, PPP_FLAG, 0, NULL); + } + + fcs_out = PPP_INITFCS; + if (!pppos->accomp) { + err = pppos_output_append(pppos, err, nb, PPP_ALLSTATIONS, 1, &fcs_out); + err = pppos_output_append(pppos, err, nb, PPP_UI, 1, &fcs_out); + } + if (!pppos->pcomp || protocol > 0xFF) { + err = pppos_output_append(pppos, err, nb, (protocol >> 8) & 0xFF, 1, &fcs_out); + } + err = pppos_output_append(pppos, err, nb, protocol & 0xFF, 1, &fcs_out); + + /* Load packet. */ + for(p = pb; p; p = p->next) { + u16_t n = p->len; + u8_t *s = (u8_t*)p->payload; + + while (n-- > 0) { + err = pppos_output_append(pppos, err, nb, *s++, 1, &fcs_out); + } + } + + err = pppos_output_last(pppos, err, nb, &fcs_out); + if (err == ERR_OK) { + PPPDEBUG(LOG_INFO, ("pppos_netif_output[%d]: proto=0x%"X16_F", len = %d\n", ppp->netif->num, protocol, pb->tot_len)); + } else { + PPPDEBUG(LOG_WARNING, ("pppos_netif_output[%d]: output failed proto=0x%"X16_F", len = %d\n", ppp->netif->num, protocol, pb->tot_len)); + } + return err; +} + +static void +pppos_connect(ppp_pcb *ppp, void *ctx) +{ + pppos_pcb *pppos = (pppos_pcb *)ctx; + PPPOS_DECL_PROTECT(lev); + +#if PPP_INPROC_IRQ_SAFE + /* input pbuf left over from last session? */ + pppos_input_free_current_packet(pppos); +#endif /* PPP_INPROC_IRQ_SAFE */ + + /* reset PPPoS control block to its initial state */ + memset(&pppos->last_xmit, 0, sizeof(pppos_pcb) - offsetof(pppos_pcb, last_xmit)); + + /* + * Default the in and out accm so that escape and flag characters + * are always escaped. + */ + pppos->in_accm[15] = 0x60; /* no need to protect since RX is not running */ + pppos->out_accm[15] = 0x60; + PPPOS_PROTECT(lev); + pppos->open = 1; + PPPOS_UNPROTECT(lev); + + /* + * Start the connection and handle incoming events (packet or timeout). + */ + PPPDEBUG(LOG_INFO, ("pppos_connect: unit %d: connecting\n", ppp->netif->num)); + ppp_start(ppp); /* notify upper layers */ +} + +#if PPP_SERVER +static void +pppos_listen(ppp_pcb *ppp, void *ctx) +{ + pppos_pcb *pppos = (pppos_pcb *)ctx; + PPPOS_DECL_PROTECT(lev); + +#if PPP_INPROC_IRQ_SAFE + /* input pbuf left over from last session? */ + pppos_input_free_current_packet(pppos); +#endif /* PPP_INPROC_IRQ_SAFE */ + + /* reset PPPoS control block to its initial state */ + memset(&pppos->last_xmit, 0, sizeof(pppos_pcb) - offsetof(pppos_pcb, last_xmit)); + + /* + * Default the in and out accm so that escape and flag characters + * are always escaped. + */ + pppos->in_accm[15] = 0x60; /* no need to protect since RX is not running */ + pppos->out_accm[15] = 0x60; + PPPOS_PROTECT(lev); + pppos->open = 1; + PPPOS_UNPROTECT(lev); + + /* + * Wait for something to happen. + */ + PPPDEBUG(LOG_INFO, ("pppos_listen: unit %d: listening\n", ppp->netif->num)); + ppp_start(ppp); /* notify upper layers */ +} +#endif /* PPP_SERVER */ + +static void +pppos_disconnect(ppp_pcb *ppp, void *ctx) +{ + pppos_pcb *pppos = (pppos_pcb *)ctx; + PPPOS_DECL_PROTECT(lev); + + PPPOS_PROTECT(lev); + pppos->open = 0; + PPPOS_UNPROTECT(lev); + + /* If PPP_INPROC_IRQ_SAFE is used we cannot call + * pppos_input_free_current_packet() here because + * rx IRQ might still call pppos_input(). + */ +#if !PPP_INPROC_IRQ_SAFE + /* input pbuf left ? */ + pppos_input_free_current_packet(pppos); +#endif /* !PPP_INPROC_IRQ_SAFE */ + + ppp_link_end(ppp); /* notify upper layers */ +} + +static err_t +pppos_destroy(ppp_pcb *ppp, void *ctx) +{ + pppos_pcb *pppos = (pppos_pcb *)ctx; + LWIP_UNUSED_ARG(ppp); + +#if PPP_INPROC_IRQ_SAFE + /* input pbuf left ? */ + pppos_input_free_current_packet(pppos); +#endif /* PPP_INPROC_IRQ_SAFE */ + + LWIP_MEMPOOL_FREE(PPPOS_PCB, pppos); + return ERR_OK; +} + +#if !NO_SYS && !PPP_INPROC_IRQ_SAFE +/** Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. + * + * @param ppp PPP descriptor index, returned by pppos_create() + * @param s received data + * @param l length of received data + */ +err_t +pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l) +{ + struct pbuf *p; + err_t err; + + p = pbuf_alloc(PBUF_RAW, l, PBUF_POOL); + if (!p) { + return ERR_MEM; + } + pbuf_take(p, s, l); + + err = tcpip_inpkt(p, ppp_netif(ppp), pppos_input_sys); + if (err != ERR_OK) { + pbuf_free(p); + } + return err; +} + +/* called from TCPIP thread */ +err_t pppos_input_sys(struct pbuf *p, struct netif *inp) { + ppp_pcb *ppp = (ppp_pcb*)inp->state; + struct pbuf *n; + + for (n = p; n; n = n->next) { + pppos_input(ppp, (u8_t*)n->payload, n->len); + } + pbuf_free(p); + return ERR_OK; +} +#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */ + +/** PPPoS input helper struct, must be packed since it is stored + * to pbuf->payload, which might be unaligned. */ +#if PPP_INPROC_IRQ_SAFE +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct pppos_input_header { + PACK_STRUCT_FIELD(ppp_pcb *ppp); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +#endif /* PPP_INPROC_IRQ_SAFE */ + +/** Pass received raw characters to PPPoS to be decoded. + * + * @param ppp PPP descriptor index, returned by pppos_create() + * @param s received data + * @param l length of received data + */ +void +pppos_input(ppp_pcb *ppp, u8_t *s, int l) +{ + pppos_pcb *pppos = (pppos_pcb *)ppp->link_ctx_cb; + struct pbuf *next_pbuf; + u8_t cur_char; + u8_t escaped; + PPPOS_DECL_PROTECT(lev); + + PPPDEBUG(LOG_DEBUG, ("pppos_input[%d]: got %d bytes\n", ppp->netif->num, l)); + while (l-- > 0) { + cur_char = *s++; + + PPPOS_PROTECT(lev); + /* ppp_input can disconnect the interface, we need to abort to prevent a memory + * leak if there are remaining bytes because pppos_connect and pppos_listen + * functions expect input buffer to be free. Furthermore there are no real + * reason to continue reading bytes if we are disconnected. + */ + if (!pppos->open) { + PPPOS_UNPROTECT(lev); + return; + } + escaped = ESCAPE_P(pppos->in_accm, cur_char); + PPPOS_UNPROTECT(lev); + /* Handle special characters. */ + if (escaped) { + /* Check for escape sequences. */ + /* XXX Note that this does not handle an escaped 0x5d character which + * would appear as an escape character. Since this is an ASCII ']' + * and there is no reason that I know of to escape it, I won't complicate + * the code to handle this case. GLL */ + if (cur_char == PPP_ESCAPE) { + pppos->in_escaped = 1; + /* Check for the flag character. */ + } else if (cur_char == PPP_FLAG) { + /* If this is just an extra flag character, ignore it. */ + if (pppos->in_state <= PDADDRESS) { + /* ignore it */; + /* If we haven't received the packet header, drop what has come in. */ + } else if (pppos->in_state < PDDATA) { + PPPDEBUG(LOG_WARNING, + ("pppos_input[%d]: Dropping incomplete packet %d\n", + ppp->netif->num, pppos->in_state)); + LINK_STATS_INC(link.lenerr); + pppos_input_drop(pppos); + /* If the fcs is invalid, drop the packet. */ + } else if (pppos->in_fcs != PPP_GOODFCS) { + PPPDEBUG(LOG_INFO, + ("pppos_input[%d]: Dropping bad fcs 0x%"X16_F" proto=0x%"X16_F"\n", + ppp->netif->num, pppos->in_fcs, pppos->in_protocol)); + /* Note: If you get lots of these, check for UART frame errors or try different baud rate */ + LINK_STATS_INC(link.chkerr); + pppos_input_drop(pppos); + /* Otherwise it's a good packet so pass it on. */ + } else { + struct pbuf *inp; + /* Trim off the checksum. */ + if(pppos->in_tail->len > 2) { + pppos->in_tail->len -= 2; + + pppos->in_tail->tot_len = pppos->in_tail->len; + if (pppos->in_tail != pppos->in_head) { + pbuf_cat(pppos->in_head, pppos->in_tail); + } + } else { + pppos->in_tail->tot_len = pppos->in_tail->len; + if (pppos->in_tail != pppos->in_head) { + pbuf_cat(pppos->in_head, pppos->in_tail); + } + + pbuf_realloc(pppos->in_head, pppos->in_head->tot_len - 2); + } + + /* Dispatch the packet thereby consuming it. */ + inp = pppos->in_head; + /* Packet consumed, release our references. */ + pppos->in_head = NULL; + pppos->in_tail = NULL; +#if IP_FORWARD || LWIP_IPV6_FORWARD + /* hide the room for Ethernet forwarding header */ + pbuf_header(inp, -(s16_t)(PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN)); +#endif /* IP_FORWARD || LWIP_IPV6_FORWARD */ +#if PPP_INPROC_IRQ_SAFE + if(tcpip_callback_with_block(pppos_input_callback, inp, 0) != ERR_OK) { + PPPDEBUG(LOG_ERR, ("pppos_input[%d]: tcpip_callback() failed, dropping packet\n", ppp->netif->num)); + pbuf_free(inp); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(ppp->netif, ifindiscards); + } +#else /* PPP_INPROC_IRQ_SAFE */ + ppp_input(ppp, inp); +#endif /* PPP_INPROC_IRQ_SAFE */ + } + + /* Prepare for a new packet. */ + pppos->in_fcs = PPP_INITFCS; + pppos->in_state = PDADDRESS; + pppos->in_escaped = 0; + /* Other characters are usually control characters that may have + * been inserted by the physical layer so here we just drop them. */ + } else { + PPPDEBUG(LOG_WARNING, + ("pppos_input[%d]: Dropping ACCM char <%d>\n", ppp->netif->num, cur_char)); + } + /* Process other characters. */ + } else { + /* Unencode escaped characters. */ + if (pppos->in_escaped) { + pppos->in_escaped = 0; + cur_char ^= PPP_TRANS; + } + + /* Process character relative to current state. */ + switch(pppos->in_state) { + case PDIDLE: /* Idle state - waiting. */ + /* Drop the character if it's not 0xff + * we would have processed a flag character above. */ + if (cur_char != PPP_ALLSTATIONS) { + break; + } + /* no break */ + /* Fall through */ + + case PDSTART: /* Process start flag. */ + /* Prepare for a new packet. */ + pppos->in_fcs = PPP_INITFCS; + /* no break */ + /* Fall through */ + + case PDADDRESS: /* Process address field. */ + if (cur_char == PPP_ALLSTATIONS) { + pppos->in_state = PDCONTROL; + break; + } + /* no break */ + + /* Else assume compressed address and control fields so + * fall through to get the protocol... */ + case PDCONTROL: /* Process control field. */ + /* If we don't get a valid control code, restart. */ + if (cur_char == PPP_UI) { + pppos->in_state = PDPROTOCOL1; + break; + } + /* no break */ + +#if 0 + else { + PPPDEBUG(LOG_WARNING, + ("pppos_input[%d]: Invalid control <%d>\n", ppp->netif->num, cur_char)); + pppos->in_state = PDSTART; + } +#endif + case PDPROTOCOL1: /* Process protocol field 1. */ + /* If the lower bit is set, this is the end of the protocol + * field. */ + if (cur_char & 1) { + pppos->in_protocol = cur_char; + pppos->in_state = PDDATA; + } else { + pppos->in_protocol = (u16_t)cur_char << 8; + pppos->in_state = PDPROTOCOL2; + } + break; + case PDPROTOCOL2: /* Process protocol field 2. */ + pppos->in_protocol |= cur_char; + pppos->in_state = PDDATA; + break; + case PDDATA: /* Process data byte. */ + /* Make space to receive processed data. */ + if (pppos->in_tail == NULL || pppos->in_tail->len == PBUF_POOL_BUFSIZE) { + u16_t pbuf_alloc_len; + if (pppos->in_tail != NULL) { + pppos->in_tail->tot_len = pppos->in_tail->len; + if (pppos->in_tail != pppos->in_head) { + pbuf_cat(pppos->in_head, pppos->in_tail); + /* give up the in_tail reference now */ + pppos->in_tail = NULL; + } + } + /* If we haven't started a packet, we need a packet header. */ + pbuf_alloc_len = 0; +#if IP_FORWARD || LWIP_IPV6_FORWARD + /* If IP forwarding is enabled we are reserving PBUF_LINK_ENCAPSULATION_HLEN + * + PBUF_LINK_HLEN bytes so the packet is being allocated with enough header + * space to be forwarded (to Ethernet for example). + */ + if (pppos->in_head == NULL) { + pbuf_alloc_len = PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN; + } +#endif /* IP_FORWARD || LWIP_IPV6_FORWARD */ + next_pbuf = pbuf_alloc(PBUF_RAW, pbuf_alloc_len, PBUF_POOL); + if (next_pbuf == NULL) { + /* No free buffers. Drop the input packet and let the + * higher layers deal with it. Continue processing + * the received pbuf chain in case a new packet starts. */ + PPPDEBUG(LOG_ERR, ("pppos_input[%d]: NO FREE PBUFS!\n", ppp->netif->num)); + LINK_STATS_INC(link.memerr); + pppos_input_drop(pppos); + pppos->in_state = PDSTART; /* Wait for flag sequence. */ + break; + } + if (pppos->in_head == NULL) { + u8_t *payload = ((u8_t*)next_pbuf->payload) + pbuf_alloc_len; +#if PPP_INPROC_IRQ_SAFE + ((struct pppos_input_header*)payload)->ppp = ppp; + payload += sizeof(struct pppos_input_header); + next_pbuf->len += sizeof(struct pppos_input_header); +#endif /* PPP_INPROC_IRQ_SAFE */ + next_pbuf->len += sizeof(pppos->in_protocol); + *(payload++) = pppos->in_protocol >> 8; + *(payload) = pppos->in_protocol & 0xFF; + pppos->in_head = next_pbuf; + } + pppos->in_tail = next_pbuf; + } + /* Load character into buffer. */ + ((u8_t*)pppos->in_tail->payload)[pppos->in_tail->len++] = cur_char; + break; + default: + break; + } + + /* update the frame check sequence number. */ + pppos->in_fcs = PPP_FCS(pppos->in_fcs, cur_char); + } + } /* while (l-- > 0), all bytes processed */ +} + +#if PPP_INPROC_IRQ_SAFE +/* PPPoS input callback using one input pointer + */ +static void pppos_input_callback(void *arg) { + struct pbuf *pb = (struct pbuf*)arg; + ppp_pcb *ppp; + + ppp = ((struct pppos_input_header*)pb->payload)->ppp; + if(pbuf_header(pb, -(s16_t)sizeof(struct pppos_input_header))) { + LWIP_ASSERT("pbuf_header failed\n", 0); + goto drop; + } + + /* Dispatch the packet thereby consuming it. */ + ppp_input(ppp, pb); + return; + +drop: + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(ppp->netif, ifindiscards); + pbuf_free(pb); +} +#endif /* PPP_INPROC_IRQ_SAFE */ + +static void +pppos_send_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp) +{ + int i; + pppos_pcb *pppos = (pppos_pcb *)ctx; + LWIP_UNUSED_ARG(ppp); + + pppos->pcomp = pcomp; + pppos->accomp = accomp; + + /* Load the ACCM bits for the 32 control codes. */ + for (i = 0; i < 32/8; i++) { + pppos->out_accm[i] = (u8_t)((accm >> (8 * i)) & 0xFF); + } + + PPPDEBUG(LOG_INFO, ("pppos_send_config[%d]: out_accm=%X %X %X %X\n", + pppos->ppp->netif->num, + pppos->out_accm[0], pppos->out_accm[1], pppos->out_accm[2], pppos->out_accm[3])); +} + +static void +pppos_recv_config(ppp_pcb *ppp, void *ctx, u32_t accm, int pcomp, int accomp) +{ + int i; + pppos_pcb *pppos = (pppos_pcb *)ctx; + PPPOS_DECL_PROTECT(lev); + LWIP_UNUSED_ARG(ppp); + LWIP_UNUSED_ARG(pcomp); + LWIP_UNUSED_ARG(accomp); + + /* Load the ACCM bits for the 32 control codes. */ + PPPOS_PROTECT(lev); + for (i = 0; i < 32 / 8; i++) { + pppos->in_accm[i] = (u8_t)(accm >> (i * 8)); + } + PPPOS_UNPROTECT(lev); + + PPPDEBUG(LOG_INFO, ("pppos_recv_config[%d]: in_accm=%X %X %X %X\n", + pppos->ppp->netif->num, + pppos->in_accm[0], pppos->in_accm[1], pppos->in_accm[2], pppos->in_accm[3])); +} + +/* + * Drop the input packet. + */ +static void +pppos_input_free_current_packet(pppos_pcb *pppos) +{ + if (pppos->in_head != NULL) { + if (pppos->in_tail && (pppos->in_tail != pppos->in_head)) { + pbuf_free(pppos->in_tail); + } + pbuf_free(pppos->in_head); + pppos->in_head = NULL; + } + pppos->in_tail = NULL; +} + +/* + * Drop the input packet and increase error counters. + */ +static void +pppos_input_drop(pppos_pcb *pppos) +{ + if (pppos->in_head != NULL) { +#if 0 + PPPDEBUG(LOG_INFO, ("pppos_input_drop: %d:%.*H\n", pppos->in_head->len, min(60, pppos->in_head->len * 2), pppos->in_head->payload)); +#endif + PPPDEBUG(LOG_INFO, ("pppos_input_drop: pbuf len=%d, addr %p\n", pppos->in_head->len, (void*)pppos->in_head)); + } + pppos_input_free_current_packet(pppos); +#if VJ_SUPPORT + vj_uncompress_err(&pppos->ppp->vj_comp); +#endif /* VJ_SUPPORT */ + + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(pppos->ppp->netif, ifindiscards); +} + +/* + * pppos_output_append - append given character to end of given pbuf. + * If out_accm is not 0 and the character needs to be escaped, do so. + * If pbuf is full, send the pbuf and reuse it. + * Return the current pbuf. + */ +static err_t +pppos_output_append(pppos_pcb *pppos, err_t err, struct pbuf *nb, u8_t c, u8_t accm, u16_t *fcs) +{ + if (err != ERR_OK) { + return err; + } + + /* Make sure there is room for the character and an escape code. + * Sure we don't quite fill the buffer if the character doesn't + * get escaped but is one character worth complicating this? */ + if ((PBUF_POOL_BUFSIZE - nb->len) < 2) { + u32_t l = pppos->output_cb(pppos->ppp, (u8_t*)nb->payload, nb->len, pppos->ppp->ctx_cb); + if (l != nb->len) { + return ERR_IF; + } + nb->len = 0; + } + + /* Update FCS before checking for special characters. */ + if (fcs) { + *fcs = PPP_FCS(*fcs, c); + } + + /* Copy to output buffer escaping special characters. */ + if (accm && ESCAPE_P(pppos->out_accm, c)) { + *((u8_t*)nb->payload + nb->len++) = PPP_ESCAPE; + *((u8_t*)nb->payload + nb->len++) = c ^ PPP_TRANS; + } else { + *((u8_t*)nb->payload + nb->len++) = c; + } + + return ERR_OK; +} + +static err_t +pppos_output_last(pppos_pcb *pppos, err_t err, struct pbuf *nb, u16_t *fcs) +{ + ppp_pcb *ppp = pppos->ppp; + + /* Add FCS and trailing flag. */ + err = pppos_output_append(pppos, err, nb, ~(*fcs) & 0xFF, 1, NULL); + err = pppos_output_append(pppos, err, nb, (~(*fcs) >> 8) & 0xFF, 1, NULL); + err = pppos_output_append(pppos, err, nb, PPP_FLAG, 0, NULL); + + if (err != ERR_OK) { + goto failed; + } + + /* Send remaining buffer if not empty */ + if (nb->len > 0) { + u32_t l = pppos->output_cb(ppp, (u8_t*)nb->payload, nb->len, ppp->ctx_cb); + if (l != nb->len) { + err = ERR_IF; + goto failed; + } + } + + pppos->last_xmit = sys_now(); + MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, nb->tot_len); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); + LINK_STATS_INC(link.xmit); + pbuf_free(nb); + return ERR_OK; + +failed: + pppos->last_xmit = 0; /* prepend PPP_FLAG to next packet */ + LINK_STATS_INC(link.err); + LINK_STATS_INC(link.drop); + MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); + pbuf_free(nb); + return err; +} + +#endif /* PPP_SUPPORT && PPPOS_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/upap.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/upap.c index d00c2d7..6491f60 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/upap.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/upap.c @@ -1,677 +1,677 @@ -/* - * upap.c - User/Password Authentication Protocol. - * - * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name "Carnegie Mellon University" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For permission or any legal - * details, please contact - * Office of Technology Transfer - * Carnegie Mellon University - * 5000 Forbes Avenue - * Pittsburgh, PA 15213-3890 - * (412) 268-4387, fax: (412) 268-7395 - * tech-transfer@andrew.cmu.edu - * - * 4. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Computing Services - * at Carnegie Mellon University (http://www.cmu.edu/computing/)." - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -/* - * @todo: - */ - -#if 0 /* UNUSED */ -#include -#include -#endif /* UNUSED */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/upap.h" - -#if PPP_OPTIONS -/* - * Command-line options. - */ -static option_t pap_option_list[] = { - { "hide-password", o_bool, &hide_password, - "Don't output passwords to log", OPT_PRIO | 1 }, - { "show-password", o_bool, &hide_password, - "Show password string in debug log messages", OPT_PRIOSUB | 0 }, - - { "pap-restart", o_int, &upap[0].us_timeouttime, - "Set retransmit timeout for PAP", OPT_PRIO }, - { "pap-max-authreq", o_int, &upap[0].us_maxtransmits, - "Set max number of transmissions for auth-reqs", OPT_PRIO }, - { "pap-timeout", o_int, &upap[0].us_reqtimeout, - "Set time limit for peer PAP authentication", OPT_PRIO }, - - { NULL } -}; -#endif /* PPP_OPTIONS */ - -/* - * Protocol entry points. - */ -static void upap_init(ppp_pcb *pcb); -static void upap_lowerup(ppp_pcb *pcb); -static void upap_lowerdown(ppp_pcb *pcb); -static void upap_input(ppp_pcb *pcb, u_char *inpacket, int l); -static void upap_protrej(ppp_pcb *pcb); -#if PRINTPKT_SUPPORT -static int upap_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg); -#endif /* PRINTPKT_SUPPORT */ - -const struct protent pap_protent = { - PPP_PAP, - upap_init, - upap_input, - upap_protrej, - upap_lowerup, - upap_lowerdown, - NULL, - NULL, -#if PRINTPKT_SUPPORT - upap_printpkt, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_DATAINPUT - NULL, -#endif /* PPP_DATAINPUT */ -#if PRINTPKT_SUPPORT - "PAP", - NULL, -#endif /* PRINTPKT_SUPPORT */ -#if PPP_OPTIONS - pap_option_list, - NULL, -#endif /* PPP_OPTIONS */ -#if DEMAND_SUPPORT - NULL, - NULL -#endif /* DEMAND_SUPPORT */ -}; - -static void upap_timeout(void *arg); -#if PPP_SERVER -static void upap_reqtimeout(void *arg); -static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len); -#endif /* PPP_SERVER */ -static void upap_rauthack(ppp_pcb *pcb, u_char *inp, int id, int len); -static void upap_rauthnak(ppp_pcb *pcb, u_char *inp, int id, int len); -static void upap_sauthreq(ppp_pcb *pcb); -#if PPP_SERVER -static void upap_sresp(ppp_pcb *pcb, u_char code, u_char id, const char *msg, int msglen); -#endif /* PPP_SERVER */ - - -/* - * upap_init - Initialize a UPAP unit. - */ -static void upap_init(ppp_pcb *pcb) { - pcb->upap.us_user = NULL; - pcb->upap.us_userlen = 0; - pcb->upap.us_passwd = NULL; - pcb->upap.us_passwdlen = 0; - pcb->upap.us_clientstate = UPAPCS_INITIAL; -#if PPP_SERVER - pcb->upap.us_serverstate = UPAPSS_INITIAL; -#endif /* PPP_SERVER */ - pcb->upap.us_id = 0; -} - - -/* - * upap_authwithpeer - Authenticate us with our peer (start client). - * - * Set new state and send authenticate's. - */ -void upap_authwithpeer(ppp_pcb *pcb, const char *user, const char *password) { - - if(!user || !password) - return; - - /* Save the username and password we're given */ - pcb->upap.us_user = user; - pcb->upap.us_userlen = LWIP_MIN(strlen(user), 0xff); - pcb->upap.us_passwd = password; - pcb->upap.us_passwdlen = LWIP_MIN(strlen(password), 0xff); - pcb->upap.us_transmits = 0; - - /* Lower layer up yet? */ - if (pcb->upap.us_clientstate == UPAPCS_INITIAL || - pcb->upap.us_clientstate == UPAPCS_PENDING) { - pcb->upap.us_clientstate = UPAPCS_PENDING; - return; - } - - upap_sauthreq(pcb); /* Start protocol */ -} - -#if PPP_SERVER -/* - * upap_authpeer - Authenticate our peer (start server). - * - * Set new state. - */ -void upap_authpeer(ppp_pcb *pcb) { - - /* Lower layer up yet? */ - if (pcb->upap.us_serverstate == UPAPSS_INITIAL || - pcb->upap.us_serverstate == UPAPSS_PENDING) { - pcb->upap.us_serverstate = UPAPSS_PENDING; - return; - } - - pcb->upap.us_serverstate = UPAPSS_LISTEN; - if (pcb->settings.pap_req_timeout > 0) - TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); -} -#endif /* PPP_SERVER */ - -/* - * upap_timeout - Retransmission timer for sending auth-reqs expired. - */ -static void upap_timeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - - if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) - return; - - if (pcb->upap.us_transmits >= pcb->settings.pap_max_transmits) { - /* give up in disgust */ - ppp_error("No response to PAP authenticate-requests"); - pcb->upap.us_clientstate = UPAPCS_BADAUTH; - auth_withpeer_fail(pcb, PPP_PAP); - return; - } - - upap_sauthreq(pcb); /* Send Authenticate-Request */ -} - - -#if PPP_SERVER -/* - * upap_reqtimeout - Give up waiting for the peer to send an auth-req. - */ -static void upap_reqtimeout(void *arg) { - ppp_pcb *pcb = (ppp_pcb*)arg; - - if (pcb->upap.us_serverstate != UPAPSS_LISTEN) - return; /* huh?? */ - - auth_peer_fail(pcb, PPP_PAP); - pcb->upap.us_serverstate = UPAPSS_BADAUTH; -} -#endif /* PPP_SERVER */ - - -/* - * upap_lowerup - The lower layer is up. - * - * Start authenticating if pending. - */ -static void upap_lowerup(ppp_pcb *pcb) { - - if (pcb->upap.us_clientstate == UPAPCS_INITIAL) - pcb->upap.us_clientstate = UPAPCS_CLOSED; - else if (pcb->upap.us_clientstate == UPAPCS_PENDING) { - upap_sauthreq(pcb); /* send an auth-request */ - } - -#if PPP_SERVER - if (pcb->upap.us_serverstate == UPAPSS_INITIAL) - pcb->upap.us_serverstate = UPAPSS_CLOSED; - else if (pcb->upap.us_serverstate == UPAPSS_PENDING) { - pcb->upap.us_serverstate = UPAPSS_LISTEN; - if (pcb->settings.pap_req_timeout > 0) - TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); - } -#endif /* PPP_SERVER */ -} - - -/* - * upap_lowerdown - The lower layer is down. - * - * Cancel all timeouts. - */ -static void upap_lowerdown(ppp_pcb *pcb) { - - if (pcb->upap.us_clientstate == UPAPCS_AUTHREQ) /* Timeout pending? */ - UNTIMEOUT(upap_timeout, pcb); /* Cancel timeout */ -#if PPP_SERVER - if (pcb->upap.us_serverstate == UPAPSS_LISTEN && pcb->settings.pap_req_timeout > 0) - UNTIMEOUT(upap_reqtimeout, pcb); -#endif /* PPP_SERVER */ - - pcb->upap.us_clientstate = UPAPCS_INITIAL; -#if PPP_SERVER - pcb->upap.us_serverstate = UPAPSS_INITIAL; -#endif /* PPP_SERVER */ -} - - -/* - * upap_protrej - Peer doesn't speak this protocol. - * - * This shouldn't happen. In any case, pretend lower layer went down. - */ -static void upap_protrej(ppp_pcb *pcb) { - - if (pcb->upap.us_clientstate == UPAPCS_AUTHREQ) { - ppp_error("PAP authentication failed due to protocol-reject"); - auth_withpeer_fail(pcb, PPP_PAP); - } -#if PPP_SERVER - if (pcb->upap.us_serverstate == UPAPSS_LISTEN) { - ppp_error("PAP authentication of peer failed (protocol-reject)"); - auth_peer_fail(pcb, PPP_PAP); - } -#endif /* PPP_SERVER */ - upap_lowerdown(pcb); -} - - -/* - * upap_input - Input UPAP packet. - */ -static void upap_input(ppp_pcb *pcb, u_char *inpacket, int l) { - u_char *inp; - u_char code, id; - int len; - - /* - * Parse header (code, id and length). - * If packet too short, drop it. - */ - inp = inpacket; - if (l < UPAP_HEADERLEN) { - UPAPDEBUG(("pap_input: rcvd short header.")); - return; - } - GETCHAR(code, inp); - GETCHAR(id, inp); - GETSHORT(len, inp); - if (len < UPAP_HEADERLEN) { - UPAPDEBUG(("pap_input: rcvd illegal length.")); - return; - } - if (len > l) { - UPAPDEBUG(("pap_input: rcvd short packet.")); - return; - } - len -= UPAP_HEADERLEN; - - /* - * Action depends on code. - */ - switch (code) { - case UPAP_AUTHREQ: -#if PPP_SERVER - upap_rauthreq(pcb, inp, id, len); -#endif /* PPP_SERVER */ - break; - - case UPAP_AUTHACK: - upap_rauthack(pcb, inp, id, len); - break; - - case UPAP_AUTHNAK: - upap_rauthnak(pcb, inp, id, len); - break; - - default: /* XXX Need code reject */ - break; - } -} - -#if PPP_SERVER -/* - * upap_rauth - Receive Authenticate. - */ -static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len) { - u_char ruserlen, rpasswdlen; - char *ruser; - char *rpasswd; - char rhostname[256]; - int retcode; - const char *msg; - int msglen; - - if (pcb->upap.us_serverstate < UPAPSS_LISTEN) - return; - - /* - * If we receive a duplicate authenticate-request, we are - * supposed to return the same status as for the first request. - */ - if (pcb->upap.us_serverstate == UPAPSS_OPEN) { - upap_sresp(pcb, UPAP_AUTHACK, id, "", 0); /* return auth-ack */ - return; - } - if (pcb->upap.us_serverstate == UPAPSS_BADAUTH) { - upap_sresp(pcb, UPAP_AUTHNAK, id, "", 0); /* return auth-nak */ - return; - } - - /* - * Parse user/passwd. - */ - if (len < 1) { - UPAPDEBUG(("pap_rauth: rcvd short packet.")); - return; - } - GETCHAR(ruserlen, inp); - len -= sizeof (u_char) + ruserlen + sizeof (u_char); - if (len < 0) { - UPAPDEBUG(("pap_rauth: rcvd short packet.")); - return; - } - ruser = (char *) inp; - INCPTR(ruserlen, inp); - GETCHAR(rpasswdlen, inp); - if (len < rpasswdlen) { - UPAPDEBUG(("pap_rauth: rcvd short packet.")); - return; - } - - rpasswd = (char *) inp; - - /* - * Check the username and password given. - */ - retcode = UPAP_AUTHNAK; - if (auth_check_passwd(pcb, ruser, ruserlen, rpasswd, rpasswdlen, &msg, &msglen)) { - retcode = UPAP_AUTHACK; - } - BZERO(rpasswd, rpasswdlen); - -#if 0 /* UNUSED */ - /* - * Check remote number authorization. A plugin may have filled in - * the remote number or added an allowed number, and rather than - * return an authenticate failure, is leaving it for us to verify. - */ - if (retcode == UPAP_AUTHACK) { - if (!auth_number()) { - /* We do not want to leak info about the pap result. */ - retcode = UPAP_AUTHNAK; /* XXX exit value will be "wrong" */ - warn("calling number %q is not authorized", remote_number); - } - } - - msglen = strlen(msg); - if (msglen > 255) - msglen = 255; -#endif /* UNUSED */ - - upap_sresp(pcb, retcode, id, msg, msglen); - - /* Null terminate and clean remote name. */ - ppp_slprintf(rhostname, sizeof(rhostname), "%.*v", ruserlen, ruser); - - if (retcode == UPAP_AUTHACK) { - pcb->upap.us_serverstate = UPAPSS_OPEN; - ppp_notice("PAP peer authentication succeeded for %q", rhostname); - auth_peer_success(pcb, PPP_PAP, 0, ruser, ruserlen); - } else { - pcb->upap.us_serverstate = UPAPSS_BADAUTH; - ppp_warn("PAP peer authentication failed for %q", rhostname); - auth_peer_fail(pcb, PPP_PAP); - } - - if (pcb->settings.pap_req_timeout > 0) - UNTIMEOUT(upap_reqtimeout, pcb); -} -#endif /* PPP_SERVER */ - -/* - * upap_rauthack - Receive Authenticate-Ack. - */ -static void upap_rauthack(ppp_pcb *pcb, u_char *inp, int id, int len) { - u_char msglen; - char *msg; - LWIP_UNUSED_ARG(id); - - if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) /* XXX */ - return; - - /* - * Parse message. - */ - if (len < 1) { - UPAPDEBUG(("pap_rauthack: ignoring missing msg-length.")); - } else { - GETCHAR(msglen, inp); - if (msglen > 0) { - len -= sizeof (u_char); - if (len < msglen) { - UPAPDEBUG(("pap_rauthack: rcvd short packet.")); - return; - } - msg = (char *) inp; - PRINTMSG(msg, msglen); - } - } - - pcb->upap.us_clientstate = UPAPCS_OPEN; - - auth_withpeer_success(pcb, PPP_PAP, 0); -} - - -/* - * upap_rauthnak - Receive Authenticate-Nak. - */ -static void upap_rauthnak(ppp_pcb *pcb, u_char *inp, int id, int len) { - u_char msglen; - char *msg; - LWIP_UNUSED_ARG(id); - - if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) /* XXX */ - return; - - /* - * Parse message. - */ - if (len < 1) { - UPAPDEBUG(("pap_rauthnak: ignoring missing msg-length.")); - } else { - GETCHAR(msglen, inp); - if (msglen > 0) { - len -= sizeof (u_char); - if (len < msglen) { - UPAPDEBUG(("pap_rauthnak: rcvd short packet.")); - return; - } - msg = (char *) inp; - PRINTMSG(msg, msglen); - } - } - - pcb->upap.us_clientstate = UPAPCS_BADAUTH; - - ppp_error("PAP authentication failed"); - auth_withpeer_fail(pcb, PPP_PAP); -} - - -/* - * upap_sauthreq - Send an Authenticate-Request. - */ -static void upap_sauthreq(ppp_pcb *pcb) { - struct pbuf *p; - u_char *outp; - int outlen; - - outlen = UPAP_HEADERLEN + 2 * sizeof (u_char) + - pcb->upap.us_userlen + pcb->upap.us_passwdlen; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +outlen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_PAP); - - PUTCHAR(UPAP_AUTHREQ, outp); - PUTCHAR(++pcb->upap.us_id, outp); - PUTSHORT(outlen, outp); - PUTCHAR(pcb->upap.us_userlen, outp); - MEMCPY(outp, pcb->upap.us_user, pcb->upap.us_userlen); - INCPTR(pcb->upap.us_userlen, outp); - PUTCHAR(pcb->upap.us_passwdlen, outp); - MEMCPY(outp, pcb->upap.us_passwd, pcb->upap.us_passwdlen); - - ppp_write(pcb, p); - - TIMEOUT(upap_timeout, pcb, pcb->settings.pap_timeout_time); - ++pcb->upap.us_transmits; - pcb->upap.us_clientstate = UPAPCS_AUTHREQ; -} - -#if PPP_SERVER -/* - * upap_sresp - Send a response (ack or nak). - */ -static void upap_sresp(ppp_pcb *pcb, u_char code, u_char id, const char *msg, int msglen) { - struct pbuf *p; - u_char *outp; - int outlen; - - outlen = UPAP_HEADERLEN + sizeof (u_char) + msglen; - p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +outlen), PPP_CTRL_PBUF_TYPE); - if(NULL == p) - return; - if(p->tot_len != p->len) { - pbuf_free(p); - return; - } - - outp = (u_char*)p->payload; - MAKEHEADER(outp, PPP_PAP); - - PUTCHAR(code, outp); - PUTCHAR(id, outp); - PUTSHORT(outlen, outp); - PUTCHAR(msglen, outp); - MEMCPY(outp, msg, msglen); - - ppp_write(pcb, p); -} -#endif /* PPP_SERVER */ - -#if PRINTPKT_SUPPORT -/* - * upap_printpkt - print the contents of a PAP packet. - */ -static const char* const upap_codenames[] = { - "AuthReq", "AuthAck", "AuthNak" -}; - -static int upap_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg) { - int code, id, len; - int mlen, ulen, wlen; - const u_char *user, *pwd, *msg; - const u_char *pstart; - - if (plen < UPAP_HEADERLEN) - return 0; - pstart = p; - GETCHAR(code, p); - GETCHAR(id, p); - GETSHORT(len, p); - if (len < UPAP_HEADERLEN || len > plen) - return 0; - - if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(upap_codenames)) - printer(arg, " %s", upap_codenames[code-1]); - else - printer(arg, " code=0x%x", code); - printer(arg, " id=0x%x", id); - len -= UPAP_HEADERLEN; - switch (code) { - case UPAP_AUTHREQ: - if (len < 1) - break; - ulen = p[0]; - if (len < ulen + 2) - break; - wlen = p[ulen + 1]; - if (len < ulen + wlen + 2) - break; - user = (const u_char *) (p + 1); - pwd = (const u_char *) (p + ulen + 2); - p += ulen + wlen + 2; - len -= ulen + wlen + 2; - printer(arg, " user="); - ppp_print_string(user, ulen, printer, arg); - printer(arg, " password="); -/* FIXME: require ppp_pcb struct as printpkt() argument */ -#if 0 - if (!pcb->settings.hide_password) -#endif - ppp_print_string(pwd, wlen, printer, arg); -#if 0 - else - printer(arg, ""); -#endif - break; - case UPAP_AUTHACK: - case UPAP_AUTHNAK: - if (len < 1) - break; - mlen = p[0]; - if (len < mlen + 1) - break; - msg = (const u_char *) (p + 1); - p += mlen + 1; - len -= mlen + 1; - printer(arg, " "); - ppp_print_string(msg, mlen, printer, arg); - break; - default: - break; - } - - /* print the rest of the bytes in the packet */ - for (; len > 0; --len) { - GETCHAR(code, p); - printer(arg, " %.2x", code); - } - - return p - pstart; -} -#endif /* PRINTPKT_SUPPORT */ - -#endif /* PPP_SUPPORT && PAP_SUPPORT */ +/* + * upap.c - User/Password Authentication Protocol. + * + * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The name "Carnegie Mellon University" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For permission or any legal + * details, please contact + * Office of Technology Transfer + * Carnegie Mellon University + * 5000 Forbes Avenue + * Pittsburgh, PA 15213-3890 + * (412) 268-4387, fax: (412) 268-7395 + * tech-transfer@andrew.cmu.edu + * + * 4. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Computing Services + * at Carnegie Mellon University (http://www.cmu.edu/computing/)." + * + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +/* + * @todo: + */ + +#if 0 /* UNUSED */ +#include +#include +#endif /* UNUSED */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/upap.h" + +#if PPP_OPTIONS +/* + * Command-line options. + */ +static option_t pap_option_list[] = { + { "hide-password", o_bool, &hide_password, + "Don't output passwords to log", OPT_PRIO | 1 }, + { "show-password", o_bool, &hide_password, + "Show password string in debug log messages", OPT_PRIOSUB | 0 }, + + { "pap-restart", o_int, &upap[0].us_timeouttime, + "Set retransmit timeout for PAP", OPT_PRIO }, + { "pap-max-authreq", o_int, &upap[0].us_maxtransmits, + "Set max number of transmissions for auth-reqs", OPT_PRIO }, + { "pap-timeout", o_int, &upap[0].us_reqtimeout, + "Set time limit for peer PAP authentication", OPT_PRIO }, + + { NULL } +}; +#endif /* PPP_OPTIONS */ + +/* + * Protocol entry points. + */ +static void upap_init(ppp_pcb *pcb); +static void upap_lowerup(ppp_pcb *pcb); +static void upap_lowerdown(ppp_pcb *pcb); +static void upap_input(ppp_pcb *pcb, u_char *inpacket, int l); +static void upap_protrej(ppp_pcb *pcb); +#if PRINTPKT_SUPPORT +static int upap_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg); +#endif /* PRINTPKT_SUPPORT */ + +const struct protent pap_protent = { + PPP_PAP, + upap_init, + upap_input, + upap_protrej, + upap_lowerup, + upap_lowerdown, + NULL, + NULL, +#if PRINTPKT_SUPPORT + upap_printpkt, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_DATAINPUT + NULL, +#endif /* PPP_DATAINPUT */ +#if PRINTPKT_SUPPORT + "PAP", + NULL, +#endif /* PRINTPKT_SUPPORT */ +#if PPP_OPTIONS + pap_option_list, + NULL, +#endif /* PPP_OPTIONS */ +#if DEMAND_SUPPORT + NULL, + NULL +#endif /* DEMAND_SUPPORT */ +}; + +static void upap_timeout(void *arg); +#if PPP_SERVER +static void upap_reqtimeout(void *arg); +static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len); +#endif /* PPP_SERVER */ +static void upap_rauthack(ppp_pcb *pcb, u_char *inp, int id, int len); +static void upap_rauthnak(ppp_pcb *pcb, u_char *inp, int id, int len); +static void upap_sauthreq(ppp_pcb *pcb); +#if PPP_SERVER +static void upap_sresp(ppp_pcb *pcb, u_char code, u_char id, const char *msg, int msglen); +#endif /* PPP_SERVER */ + + +/* + * upap_init - Initialize a UPAP unit. + */ +static void upap_init(ppp_pcb *pcb) { + pcb->upap.us_user = NULL; + pcb->upap.us_userlen = 0; + pcb->upap.us_passwd = NULL; + pcb->upap.us_passwdlen = 0; + pcb->upap.us_clientstate = UPAPCS_INITIAL; +#if PPP_SERVER + pcb->upap.us_serverstate = UPAPSS_INITIAL; +#endif /* PPP_SERVER */ + pcb->upap.us_id = 0; +} + + +/* + * upap_authwithpeer - Authenticate us with our peer (start client). + * + * Set new state and send authenticate's. + */ +void upap_authwithpeer(ppp_pcb *pcb, const char *user, const char *password) { + + if(!user || !password) + return; + + /* Save the username and password we're given */ + pcb->upap.us_user = user; + pcb->upap.us_userlen = LWIP_MIN(strlen(user), 0xff); + pcb->upap.us_passwd = password; + pcb->upap.us_passwdlen = LWIP_MIN(strlen(password), 0xff); + pcb->upap.us_transmits = 0; + + /* Lower layer up yet? */ + if (pcb->upap.us_clientstate == UPAPCS_INITIAL || + pcb->upap.us_clientstate == UPAPCS_PENDING) { + pcb->upap.us_clientstate = UPAPCS_PENDING; + return; + } + + upap_sauthreq(pcb); /* Start protocol */ +} + +#if PPP_SERVER +/* + * upap_authpeer - Authenticate our peer (start server). + * + * Set new state. + */ +void upap_authpeer(ppp_pcb *pcb) { + + /* Lower layer up yet? */ + if (pcb->upap.us_serverstate == UPAPSS_INITIAL || + pcb->upap.us_serverstate == UPAPSS_PENDING) { + pcb->upap.us_serverstate = UPAPSS_PENDING; + return; + } + + pcb->upap.us_serverstate = UPAPSS_LISTEN; + if (pcb->settings.pap_req_timeout > 0) + TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); +} +#endif /* PPP_SERVER */ + +/* + * upap_timeout - Retransmission timer for sending auth-reqs expired. + */ +static void upap_timeout(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + + if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) + return; + + if (pcb->upap.us_transmits >= pcb->settings.pap_max_transmits) { + /* give up in disgust */ + ppp_error("No response to PAP authenticate-requests"); + pcb->upap.us_clientstate = UPAPCS_BADAUTH; + auth_withpeer_fail(pcb, PPP_PAP); + return; + } + + upap_sauthreq(pcb); /* Send Authenticate-Request */ +} + + +#if PPP_SERVER +/* + * upap_reqtimeout - Give up waiting for the peer to send an auth-req. + */ +static void upap_reqtimeout(void *arg) { + ppp_pcb *pcb = (ppp_pcb*)arg; + + if (pcb->upap.us_serverstate != UPAPSS_LISTEN) + return; /* huh?? */ + + auth_peer_fail(pcb, PPP_PAP); + pcb->upap.us_serverstate = UPAPSS_BADAUTH; +} +#endif /* PPP_SERVER */ + + +/* + * upap_lowerup - The lower layer is up. + * + * Start authenticating if pending. + */ +static void upap_lowerup(ppp_pcb *pcb) { + + if (pcb->upap.us_clientstate == UPAPCS_INITIAL) + pcb->upap.us_clientstate = UPAPCS_CLOSED; + else if (pcb->upap.us_clientstate == UPAPCS_PENDING) { + upap_sauthreq(pcb); /* send an auth-request */ + } + +#if PPP_SERVER + if (pcb->upap.us_serverstate == UPAPSS_INITIAL) + pcb->upap.us_serverstate = UPAPSS_CLOSED; + else if (pcb->upap.us_serverstate == UPAPSS_PENDING) { + pcb->upap.us_serverstate = UPAPSS_LISTEN; + if (pcb->settings.pap_req_timeout > 0) + TIMEOUT(upap_reqtimeout, pcb, pcb->settings.pap_req_timeout); + } +#endif /* PPP_SERVER */ +} + + +/* + * upap_lowerdown - The lower layer is down. + * + * Cancel all timeouts. + */ +static void upap_lowerdown(ppp_pcb *pcb) { + + if (pcb->upap.us_clientstate == UPAPCS_AUTHREQ) /* Timeout pending? */ + UNTIMEOUT(upap_timeout, pcb); /* Cancel timeout */ +#if PPP_SERVER + if (pcb->upap.us_serverstate == UPAPSS_LISTEN && pcb->settings.pap_req_timeout > 0) + UNTIMEOUT(upap_reqtimeout, pcb); +#endif /* PPP_SERVER */ + + pcb->upap.us_clientstate = UPAPCS_INITIAL; +#if PPP_SERVER + pcb->upap.us_serverstate = UPAPSS_INITIAL; +#endif /* PPP_SERVER */ +} + + +/* + * upap_protrej - Peer doesn't speak this protocol. + * + * This shouldn't happen. In any case, pretend lower layer went down. + */ +static void upap_protrej(ppp_pcb *pcb) { + + if (pcb->upap.us_clientstate == UPAPCS_AUTHREQ) { + ppp_error("PAP authentication failed due to protocol-reject"); + auth_withpeer_fail(pcb, PPP_PAP); + } +#if PPP_SERVER + if (pcb->upap.us_serverstate == UPAPSS_LISTEN) { + ppp_error("PAP authentication of peer failed (protocol-reject)"); + auth_peer_fail(pcb, PPP_PAP); + } +#endif /* PPP_SERVER */ + upap_lowerdown(pcb); +} + + +/* + * upap_input - Input UPAP packet. + */ +static void upap_input(ppp_pcb *pcb, u_char *inpacket, int l) { + u_char *inp; + u_char code, id; + int len; + + /* + * Parse header (code, id and length). + * If packet too short, drop it. + */ + inp = inpacket; + if (l < UPAP_HEADERLEN) { + UPAPDEBUG(("pap_input: rcvd short header.")); + return; + } + GETCHAR(code, inp); + GETCHAR(id, inp); + GETSHORT(len, inp); + if (len < UPAP_HEADERLEN) { + UPAPDEBUG(("pap_input: rcvd illegal length.")); + return; + } + if (len > l) { + UPAPDEBUG(("pap_input: rcvd short packet.")); + return; + } + len -= UPAP_HEADERLEN; + + /* + * Action depends on code. + */ + switch (code) { + case UPAP_AUTHREQ: +#if PPP_SERVER + upap_rauthreq(pcb, inp, id, len); +#endif /* PPP_SERVER */ + break; + + case UPAP_AUTHACK: + upap_rauthack(pcb, inp, id, len); + break; + + case UPAP_AUTHNAK: + upap_rauthnak(pcb, inp, id, len); + break; + + default: /* XXX Need code reject */ + break; + } +} + +#if PPP_SERVER +/* + * upap_rauth - Receive Authenticate. + */ +static void upap_rauthreq(ppp_pcb *pcb, u_char *inp, int id, int len) { + u_char ruserlen, rpasswdlen; + char *ruser; + char *rpasswd; + char rhostname[256]; + int retcode; + const char *msg; + int msglen; + + if (pcb->upap.us_serverstate < UPAPSS_LISTEN) + return; + + /* + * If we receive a duplicate authenticate-request, we are + * supposed to return the same status as for the first request. + */ + if (pcb->upap.us_serverstate == UPAPSS_OPEN) { + upap_sresp(pcb, UPAP_AUTHACK, id, "", 0); /* return auth-ack */ + return; + } + if (pcb->upap.us_serverstate == UPAPSS_BADAUTH) { + upap_sresp(pcb, UPAP_AUTHNAK, id, "", 0); /* return auth-nak */ + return; + } + + /* + * Parse user/passwd. + */ + if (len < 1) { + UPAPDEBUG(("pap_rauth: rcvd short packet.")); + return; + } + GETCHAR(ruserlen, inp); + len -= sizeof (u_char) + ruserlen + sizeof (u_char); + if (len < 0) { + UPAPDEBUG(("pap_rauth: rcvd short packet.")); + return; + } + ruser = (char *) inp; + INCPTR(ruserlen, inp); + GETCHAR(rpasswdlen, inp); + if (len < rpasswdlen) { + UPAPDEBUG(("pap_rauth: rcvd short packet.")); + return; + } + + rpasswd = (char *) inp; + + /* + * Check the username and password given. + */ + retcode = UPAP_AUTHNAK; + if (auth_check_passwd(pcb, ruser, ruserlen, rpasswd, rpasswdlen, &msg, &msglen)) { + retcode = UPAP_AUTHACK; + } + BZERO(rpasswd, rpasswdlen); + +#if 0 /* UNUSED */ + /* + * Check remote number authorization. A plugin may have filled in + * the remote number or added an allowed number, and rather than + * return an authenticate failure, is leaving it for us to verify. + */ + if (retcode == UPAP_AUTHACK) { + if (!auth_number()) { + /* We do not want to leak info about the pap result. */ + retcode = UPAP_AUTHNAK; /* XXX exit value will be "wrong" */ + warn("calling number %q is not authorized", remote_number); + } + } + + msglen = strlen(msg); + if (msglen > 255) + msglen = 255; +#endif /* UNUSED */ + + upap_sresp(pcb, retcode, id, msg, msglen); + + /* Null terminate and clean remote name. */ + ppp_slprintf(rhostname, sizeof(rhostname), "%.*v", ruserlen, ruser); + + if (retcode == UPAP_AUTHACK) { + pcb->upap.us_serverstate = UPAPSS_OPEN; + ppp_notice("PAP peer authentication succeeded for %q", rhostname); + auth_peer_success(pcb, PPP_PAP, 0, ruser, ruserlen); + } else { + pcb->upap.us_serverstate = UPAPSS_BADAUTH; + ppp_warn("PAP peer authentication failed for %q", rhostname); + auth_peer_fail(pcb, PPP_PAP); + } + + if (pcb->settings.pap_req_timeout > 0) + UNTIMEOUT(upap_reqtimeout, pcb); +} +#endif /* PPP_SERVER */ + +/* + * upap_rauthack - Receive Authenticate-Ack. + */ +static void upap_rauthack(ppp_pcb *pcb, u_char *inp, int id, int len) { + u_char msglen; + char *msg; + LWIP_UNUSED_ARG(id); + + if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) /* XXX */ + return; + + /* + * Parse message. + */ + if (len < 1) { + UPAPDEBUG(("pap_rauthack: ignoring missing msg-length.")); + } else { + GETCHAR(msglen, inp); + if (msglen > 0) { + len -= sizeof (u_char); + if (len < msglen) { + UPAPDEBUG(("pap_rauthack: rcvd short packet.")); + return; + } + msg = (char *) inp; + PRINTMSG(msg, msglen); + } + } + + pcb->upap.us_clientstate = UPAPCS_OPEN; + + auth_withpeer_success(pcb, PPP_PAP, 0); +} + + +/* + * upap_rauthnak - Receive Authenticate-Nak. + */ +static void upap_rauthnak(ppp_pcb *pcb, u_char *inp, int id, int len) { + u_char msglen; + char *msg; + LWIP_UNUSED_ARG(id); + + if (pcb->upap.us_clientstate != UPAPCS_AUTHREQ) /* XXX */ + return; + + /* + * Parse message. + */ + if (len < 1) { + UPAPDEBUG(("pap_rauthnak: ignoring missing msg-length.")); + } else { + GETCHAR(msglen, inp); + if (msglen > 0) { + len -= sizeof (u_char); + if (len < msglen) { + UPAPDEBUG(("pap_rauthnak: rcvd short packet.")); + return; + } + msg = (char *) inp; + PRINTMSG(msg, msglen); + } + } + + pcb->upap.us_clientstate = UPAPCS_BADAUTH; + + ppp_error("PAP authentication failed"); + auth_withpeer_fail(pcb, PPP_PAP); +} + + +/* + * upap_sauthreq - Send an Authenticate-Request. + */ +static void upap_sauthreq(ppp_pcb *pcb) { + struct pbuf *p; + u_char *outp; + int outlen; + + outlen = UPAP_HEADERLEN + 2 * sizeof (u_char) + + pcb->upap.us_userlen + pcb->upap.us_passwdlen; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +outlen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + MAKEHEADER(outp, PPP_PAP); + + PUTCHAR(UPAP_AUTHREQ, outp); + PUTCHAR(++pcb->upap.us_id, outp); + PUTSHORT(outlen, outp); + PUTCHAR(pcb->upap.us_userlen, outp); + MEMCPY(outp, pcb->upap.us_user, pcb->upap.us_userlen); + INCPTR(pcb->upap.us_userlen, outp); + PUTCHAR(pcb->upap.us_passwdlen, outp); + MEMCPY(outp, pcb->upap.us_passwd, pcb->upap.us_passwdlen); + + ppp_write(pcb, p); + + TIMEOUT(upap_timeout, pcb, pcb->settings.pap_timeout_time); + ++pcb->upap.us_transmits; + pcb->upap.us_clientstate = UPAPCS_AUTHREQ; +} + +#if PPP_SERVER +/* + * upap_sresp - Send a response (ack or nak). + */ +static void upap_sresp(ppp_pcb *pcb, u_char code, u_char id, const char *msg, int msglen) { + struct pbuf *p; + u_char *outp; + int outlen; + + outlen = UPAP_HEADERLEN + sizeof (u_char) + msglen; + p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_HDRLEN +outlen), PPP_CTRL_PBUF_TYPE); + if(NULL == p) + return; + if(p->tot_len != p->len) { + pbuf_free(p); + return; + } + + outp = (u_char*)p->payload; + MAKEHEADER(outp, PPP_PAP); + + PUTCHAR(code, outp); + PUTCHAR(id, outp); + PUTSHORT(outlen, outp); + PUTCHAR(msglen, outp); + MEMCPY(outp, msg, msglen); + + ppp_write(pcb, p); +} +#endif /* PPP_SERVER */ + +#if PRINTPKT_SUPPORT +/* + * upap_printpkt - print the contents of a PAP packet. + */ +static const char* const upap_codenames[] = { + "AuthReq", "AuthAck", "AuthNak" +}; + +static int upap_printpkt(const u_char *p, int plen, void (*printer) (void *, const char *, ...), void *arg) { + int code, id, len; + int mlen, ulen, wlen; + const u_char *user, *pwd, *msg; + const u_char *pstart; + + if (plen < UPAP_HEADERLEN) + return 0; + pstart = p; + GETCHAR(code, p); + GETCHAR(id, p); + GETSHORT(len, p); + if (len < UPAP_HEADERLEN || len > plen) + return 0; + + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(upap_codenames)) + printer(arg, " %s", upap_codenames[code-1]); + else + printer(arg, " code=0x%x", code); + printer(arg, " id=0x%x", id); + len -= UPAP_HEADERLEN; + switch (code) { + case UPAP_AUTHREQ: + if (len < 1) + break; + ulen = p[0]; + if (len < ulen + 2) + break; + wlen = p[ulen + 1]; + if (len < ulen + wlen + 2) + break; + user = (const u_char *) (p + 1); + pwd = (const u_char *) (p + ulen + 2); + p += ulen + wlen + 2; + len -= ulen + wlen + 2; + printer(arg, " user="); + ppp_print_string(user, ulen, printer, arg); + printer(arg, " password="); +/* FIXME: require ppp_pcb struct as printpkt() argument */ +#if 0 + if (!pcb->settings.hide_password) +#endif + ppp_print_string(pwd, wlen, printer, arg); +#if 0 + else + printer(arg, ""); +#endif + break; + case UPAP_AUTHACK: + case UPAP_AUTHNAK: + if (len < 1) + break; + mlen = p[0]; + if (len < mlen + 1) + break; + msg = (const u_char *) (p + 1); + p += mlen + 1; + len -= mlen + 1; + printer(arg, " "); + ppp_print_string(msg, mlen, printer, arg); + break; + default: + break; + } + + /* print the rest of the bytes in the packet */ + for (; len > 0; --len) { + GETCHAR(code, p); + printer(arg, " %.2x", code); + } + + return p - pstart; +} +#endif /* PRINTPKT_SUPPORT */ + +#endif /* PPP_SUPPORT && PAP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/utils.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/utils.c index 008c633..f1fa820 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/utils.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/utils.c @@ -1,959 +1,959 @@ -/* - * utils.c - various utility functions used in pppd. - * - * Copyright (c) 1999-2002 Paul Mackerras. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". - * - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#if 0 /* UNUSED */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef SVR4 -#include -#endif -#endif /* UNUSED */ - -#include /* isdigit() */ - -#include "netif/ppp/ppp_impl.h" - -#include "netif/ppp/fsm.h" -#include "netif/ppp/lcp.h" - -#if defined(SUNOS4) -extern char *strerror(); -#endif - -static void ppp_logit(int level, const char *fmt, va_list args); -static void ppp_log_write(int level, char *buf); -#if PRINTPKT_SUPPORT -static void ppp_vslp_printer(void *arg, const char *fmt, ...); -static void ppp_format_packet(const u_char *p, int len, - void (*printer) (void *, const char *, ...), void *arg); - -struct buffer_info { - char *ptr; - int len; -}; -#endif /* PRINTPKT_SUPPORT */ - -/* - * ppp_strlcpy - like strcpy/strncpy, doesn't overflow destination buffer, - * always leaves destination null-terminated (for len > 0). - */ -size_t ppp_strlcpy(char *dest, const char *src, size_t len) { - size_t ret = strlen(src); - - if (len != 0) { - if (ret < len) - strcpy(dest, src); - else { - strncpy(dest, src, len - 1); - dest[len-1] = 0; - } - } - return ret; -} - -/* - * ppp_strlcat - like strcat/strncat, doesn't overflow destination buffer, - * always leaves destination null-terminated (for len > 0). - */ -size_t ppp_strlcat(char *dest, const char *src, size_t len) { - size_t dlen = strlen(dest); - - return dlen + ppp_strlcpy(dest + dlen, src, (len > dlen? len - dlen: 0)); -} - - -/* - * ppp_slprintf - format a message into a buffer. Like sprintf except we - * also specify the length of the output buffer, and we handle - * %m (error message), %v (visible string), - * %q (quoted string), %t (current time) and %I (IP address) formats. - * Doesn't do floating-point formats. - * Returns the number of chars put into buf. - */ -int ppp_slprintf(char *buf, int buflen, const char *fmt, ...) { - va_list args; - int n; - - va_start(args, fmt); - n = ppp_vslprintf(buf, buflen, fmt, args); - va_end(args); - return n; -} - -/* - * ppp_vslprintf - like ppp_slprintf, takes a va_list instead of a list of args. - */ -#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0) - -int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args) { - int c, i, n; - int width, prec, fillch; - int base, len, neg, quoted; - unsigned long val = 0; - const char *f; - char *str, *buf0; - const unsigned char *p; - char num[32]; -#if 0 /* need port */ - time_t t; -#endif /* need port */ - u32_t ip; - static char hexchars[] = "0123456789abcdef"; -#if PRINTPKT_SUPPORT - struct buffer_info bufinfo; -#endif /* PRINTPKT_SUPPORT */ - - buf0 = buf; - --buflen; - while (buflen > 0) { - for (f = fmt; *f != '%' && *f != 0; ++f) - ; - if (f > fmt) { - len = f - fmt; - if (len > buflen) - len = buflen; - memcpy(buf, fmt, len); - buf += len; - buflen -= len; - fmt = f; - } - if (*fmt == 0) - break; - c = *++fmt; - width = 0; - prec = -1; - fillch = ' '; - if (c == '0') { - fillch = '0'; - c = *++fmt; - } - if (c == '*') { - width = va_arg(args, int); - c = *++fmt; - } else { - while (isdigit(c)) { - width = width * 10 + c - '0'; - c = *++fmt; - } - } - if (c == '.') { - c = *++fmt; - if (c == '*') { - prec = va_arg(args, int); - c = *++fmt; - } else { - prec = 0; - while (isdigit(c)) { - prec = prec * 10 + c - '0'; - c = *++fmt; - } - } - } - str = 0; - base = 0; - neg = 0; - ++fmt; - switch (c) { - case 'l': - c = *fmt++; - switch (c) { - case 'd': - val = va_arg(args, long); - if ((long)val < 0) { - neg = 1; - val = (unsigned long)-(long)val; - } - base = 10; - break; - case 'u': - val = va_arg(args, unsigned long); - base = 10; - break; - default: - OUTCHAR('%'); - OUTCHAR('l'); - --fmt; /* so %lz outputs %lz etc. */ - continue; - } - break; - case 'd': - i = va_arg(args, int); - if (i < 0) { - neg = 1; - val = -i; - } else - val = i; - base = 10; - break; - case 'u': - val = va_arg(args, unsigned int); - base = 10; - break; - case 'o': - val = va_arg(args, unsigned int); - base = 8; - break; - case 'x': - case 'X': - val = va_arg(args, unsigned int); - base = 16; - break; -#if 0 /* unused (and wrong on LLP64 systems) */ - case 'p': - val = (unsigned long) va_arg(args, void *); - base = 16; - neg = 2; - break; -#endif /* unused (and wrong on LLP64 systems) */ - case 's': - str = va_arg(args, char *); - break; - case 'c': - num[0] = va_arg(args, int); - num[1] = 0; - str = num; - break; -#if 0 /* do we always have strerror() in embedded ? */ - case 'm': - str = strerror(errno); - break; -#endif /* do we always have strerror() in embedded ? */ - case 'I': - ip = va_arg(args, u32_t); - ip = lwip_ntohl(ip); - ppp_slprintf(num, sizeof(num), "%d.%d.%d.%d", (ip >> 24) & 0xff, - (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff); - str = num; - break; -#if 0 /* need port */ - case 't': - time(&t); - str = ctime(&t); - str += 4; /* chop off the day name */ - str[15] = 0; /* chop off year and newline */ - break; -#endif /* need port */ - case 'v': /* "visible" string */ - case 'q': /* quoted string */ - quoted = c == 'q'; - p = va_arg(args, unsigned char *); - if (p == NULL) - p = (const unsigned char *)""; - if (fillch == '0' && prec >= 0) { - n = prec; - } else { - n = strlen((const char *)p); - if (prec >= 0 && n > prec) - n = prec; - } - while (n > 0 && buflen > 0) { - c = *p++; - --n; - if (!quoted && c >= 0x80) { - OUTCHAR('M'); - OUTCHAR('-'); - c -= 0x80; - } - if (quoted && (c == '"' || c == '\\')) - OUTCHAR('\\'); - if (c < 0x20 || (0x7f <= c && c < 0xa0)) { - if (quoted) { - OUTCHAR('\\'); - switch (c) { - case '\t': OUTCHAR('t'); break; - case '\n': OUTCHAR('n'); break; - case '\b': OUTCHAR('b'); break; - case '\f': OUTCHAR('f'); break; - default: - OUTCHAR('x'); - OUTCHAR(hexchars[c >> 4]); - OUTCHAR(hexchars[c & 0xf]); - } - } else { - if (c == '\t') - OUTCHAR(c); - else { - OUTCHAR('^'); - OUTCHAR(c ^ 0x40); - } - } - } else - OUTCHAR(c); - } - continue; -#if PRINTPKT_SUPPORT - case 'P': /* print PPP packet */ - bufinfo.ptr = buf; - bufinfo.len = buflen + 1; - p = va_arg(args, unsigned char *); - n = va_arg(args, int); - ppp_format_packet(p, n, ppp_vslp_printer, &bufinfo); - buf = bufinfo.ptr; - buflen = bufinfo.len - 1; - continue; -#endif /* PRINTPKT_SUPPORT */ - case 'B': - p = va_arg(args, unsigned char *); - for (n = prec; n > 0; --n) { - c = *p++; - if (fillch == ' ') - OUTCHAR(' '); - OUTCHAR(hexchars[(c >> 4) & 0xf]); - OUTCHAR(hexchars[c & 0xf]); - } - continue; - default: - *buf++ = '%'; - if (c != '%') - --fmt; /* so %z outputs %z etc. */ - --buflen; - continue; - } - if (base != 0) { - str = num + sizeof(num); - *--str = 0; - while (str > num + neg) { - *--str = hexchars[val % base]; - val = val / base; - if (--prec <= 0 && val == 0) - break; - } - switch (neg) { - case 1: - *--str = '-'; - break; - case 2: - *--str = 'x'; - *--str = '0'; - break; - default: - break; - } - len = num + sizeof(num) - 1 - str; - } else { - len = strlen(str); - if (prec >= 0 && len > prec) - len = prec; - } - if (width > 0) { - if (width > buflen) - width = buflen; - if ((n = width - len) > 0) { - buflen -= n; - for (; n > 0; --n) - *buf++ = fillch; - } - } - if (len > buflen) - len = buflen; - memcpy(buf, str, len); - buf += len; - buflen -= len; - } - *buf = 0; - return buf - buf0; -} - -#if PRINTPKT_SUPPORT -/* - * vslp_printer - used in processing a %P format - */ -static void ppp_vslp_printer(void *arg, const char *fmt, ...) { - int n; - va_list pvar; - struct buffer_info *bi; - - va_start(pvar, fmt); - bi = (struct buffer_info *) arg; - n = ppp_vslprintf(bi->ptr, bi->len, fmt, pvar); - va_end(pvar); - - bi->ptr += n; - bi->len -= n; -} -#endif /* PRINTPKT_SUPPORT */ - -#if 0 /* UNUSED */ -/* - * log_packet - format a packet and log it. - */ - -void -log_packet(p, len, prefix, level) - u_char *p; - int len; - char *prefix; - int level; -{ - init_pr_log(prefix, level); - ppp_format_packet(p, len, pr_log, &level); - end_pr_log(); -} -#endif /* UNUSED */ - -#if PRINTPKT_SUPPORT -/* - * ppp_format_packet - make a readable representation of a packet, - * calling `printer(arg, format, ...)' to output it. - */ -static void ppp_format_packet(const u_char *p, int len, - void (*printer) (void *, const char *, ...), void *arg) { - int i, n; - u_short proto; - const struct protent *protp; - - if (len >= 2) { - GETSHORT(proto, p); - len -= 2; - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (proto == protp->protocol) - break; - if (protp != NULL) { - printer(arg, "[%s", protp->name); - n = (*protp->printpkt)(p, len, printer, arg); - printer(arg, "]"); - p += n; - len -= n; - } else { - for (i = 0; (protp = protocols[i]) != NULL; ++i) - if (proto == (protp->protocol & ~0x8000)) - break; - if (protp != 0 && protp->data_name != 0) { - printer(arg, "[%s data]", protp->data_name); - if (len > 8) - printer(arg, "%.8B ...", p); - else - printer(arg, "%.*B", len, p); - len = 0; - } else - printer(arg, "[proto=0x%x]", proto); - } - } - - if (len > 32) - printer(arg, "%.32B ...", p); - else - printer(arg, "%.*B", len, p); -} -#endif /* PRINTPKT_SUPPORT */ - -#if 0 /* UNUSED */ -/* - * init_pr_log, end_pr_log - initialize and finish use of pr_log. - */ - -static char line[256]; /* line to be logged accumulated here */ -static char *linep; /* current pointer within line */ -static int llevel; /* level for logging */ - -void -init_pr_log(prefix, level) - const char *prefix; - int level; -{ - linep = line; - if (prefix != NULL) { - ppp_strlcpy(line, prefix, sizeof(line)); - linep = line + strlen(line); - } - llevel = level; -} - -void -end_pr_log() -{ - if (linep != line) { - *linep = 0; - ppp_log_write(llevel, line); - } -} - -/* - * pr_log - printer routine for outputting to log - */ -void -pr_log (void *arg, const char *fmt, ...) -{ - int l, n; - va_list pvar; - char *p, *eol; - char buf[256]; - - va_start(pvar, fmt); - n = ppp_vslprintf(buf, sizeof(buf), fmt, pvar); - va_end(pvar); - - p = buf; - eol = strchr(buf, '\n'); - if (linep != line) { - l = (eol == NULL)? n: eol - buf; - if (linep + l < line + sizeof(line)) { - if (l > 0) { - memcpy(linep, buf, l); - linep += l; - } - if (eol == NULL) - return; - p = eol + 1; - eol = strchr(p, '\n'); - } - *linep = 0; - ppp_log_write(llevel, line); - linep = line; - } - - while (eol != NULL) { - *eol = 0; - ppp_log_write(llevel, p); - p = eol + 1; - eol = strchr(p, '\n'); - } - - /* assumes sizeof(buf) <= sizeof(line) */ - l = buf + n - p; - if (l > 0) { - memcpy(line, p, n); - linep = line + l; - } -} -#endif /* UNUSED */ - -/* - * ppp_print_string - print a readable representation of a string using - * printer. - */ -void ppp_print_string(const u_char *p, int len, void (*printer) (void *, const char *, ...), void *arg) { - int c; - - printer(arg, "\""); - for (; len > 0; --len) { - c = *p++; - if (' ' <= c && c <= '~') { - if (c == '\\' || c == '"') - printer(arg, "\\"); - printer(arg, "%c", c); - } else { - switch (c) { - case '\n': - printer(arg, "\\n"); - break; - case '\r': - printer(arg, "\\r"); - break; - case '\t': - printer(arg, "\\t"); - break; - default: - printer(arg, "\\%.3o", (u8_t)c); - /* no break */ - } - } - } - printer(arg, "\""); -} - -/* - * ppp_logit - does the hard work for fatal et al. - */ -static void ppp_logit(int level, const char *fmt, va_list args) { - char buf[1024]; - - ppp_vslprintf(buf, sizeof(buf), fmt, args); - ppp_log_write(level, buf); -} - -static void ppp_log_write(int level, char *buf) { - LWIP_UNUSED_ARG(level); /* necessary if PPPDEBUG is defined to an empty function */ - LWIP_UNUSED_ARG(buf); - PPPDEBUG(level, ("%s\n", buf) ); -#if 0 - if (log_to_fd >= 0 && (level != LOG_DEBUG || debug)) { - int n = strlen(buf); - - if (n > 0 && buf[n-1] == '\n') - --n; - if (write(log_to_fd, buf, n) != n - || write(log_to_fd, "\n", 1) != 1) - log_to_fd = -1; - } -#endif -} - -/* - * ppp_fatal - log an error message and die horribly. - */ -void ppp_fatal(const char *fmt, ...) { - va_list pvar; - - va_start(pvar, fmt); - ppp_logit(LOG_ERR, fmt, pvar); - va_end(pvar); - - LWIP_ASSERT("ppp_fatal", 0); /* as promised */ -} - -/* - * ppp_error - log an error message. - */ -void ppp_error(const char *fmt, ...) { - va_list pvar; - - va_start(pvar, fmt); - ppp_logit(LOG_ERR, fmt, pvar); - va_end(pvar); -#if 0 /* UNUSED */ - ++error_count; -#endif /* UNUSED */ -} - -/* - * ppp_warn - log a warning message. - */ -void ppp_warn(const char *fmt, ...) { - va_list pvar; - - va_start(pvar, fmt); - ppp_logit(LOG_WARNING, fmt, pvar); - va_end(pvar); -} - -/* - * ppp_notice - log a notice-level message. - */ -void ppp_notice(const char *fmt, ...) { - va_list pvar; - - va_start(pvar, fmt); - ppp_logit(LOG_NOTICE, fmt, pvar); - va_end(pvar); -} - -/* - * ppp_info - log an informational message. - */ -void ppp_info(const char *fmt, ...) { - va_list pvar; - - va_start(pvar, fmt); - ppp_logit(LOG_INFO, fmt, pvar); - va_end(pvar); -} - -/* - * ppp_dbglog - log a debug message. - */ -void ppp_dbglog(const char *fmt, ...) { - va_list pvar; - - va_start(pvar, fmt); - ppp_logit(LOG_DEBUG, fmt, pvar); - va_end(pvar); -} - -#if PRINTPKT_SUPPORT -/* - * ppp_dump_packet - print out a packet in readable form if it is interesting. - * Assumes len >= PPP_HDRLEN. - */ -void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len) { - int proto; - - /* - * don't print data packets, i.e. IPv4, IPv6, VJ, and compressed packets. - */ - proto = (p[0] << 8) + p[1]; - if (proto < 0xC000 && (proto & ~0x8000) == proto) - return; - - /* - * don't print valid LCP echo request/reply packets if the link is up. - */ - if (proto == PPP_LCP && pcb->phase == PPP_PHASE_RUNNING && len >= 2 + HEADERLEN) { - unsigned char *lcp = p + 2; - int l = (lcp[2] << 8) + lcp[3]; - - if ((lcp[0] == ECHOREQ || lcp[0] == ECHOREP) - && l >= HEADERLEN && l <= len - 2) - return; - } - - ppp_dbglog("%s %P", tag, p, len); -} -#endif /* PRINTPKT_SUPPORT */ - -#if 0 /* Unused */ - -/* - * complete_read - read a full `count' bytes from fd, - * unless end-of-file or an error other than EINTR is encountered. - */ -ssize_t -complete_read(int fd, void *buf, size_t count) -{ - size_t done; - ssize_t nb; - char *ptr = buf; - - for (done = 0; done < count; ) { - nb = read(fd, ptr, count - done); - if (nb < 0) { - if (errno == EINTR) - continue; - return -1; - } - if (nb == 0) - break; - done += nb; - ptr += nb; - } - return done; -} - -/* Procedures for locking the serial device using a lock file. */ -#ifndef LOCK_DIR -#ifdef __linux__ -#define LOCK_DIR "/var/lock" -#else -#ifdef SVR4 -#define LOCK_DIR "/var/spool/locks" -#else -#define LOCK_DIR "/var/spool/lock" -#endif -#endif -#endif /* LOCK_DIR */ - -static char lock_file[MAXPATHLEN]; - -/* - * lock - create a lock file for the named device - */ -int -lock(dev) - char *dev; -{ -#ifdef LOCKLIB - int result; - - result = mklock (dev, (void *) 0); - if (result == 0) { - ppp_strlcpy(lock_file, dev, sizeof(lock_file)); - return 0; - } - - if (result > 0) - ppp_notice("Device %s is locked by pid %d", dev, result); - else - ppp_error("Can't create lock file %s", lock_file); - return -1; - -#else /* LOCKLIB */ - - char lock_buffer[12]; - int fd, pid, n; - -#ifdef SVR4 - struct stat sbuf; - - if (stat(dev, &sbuf) < 0) { - ppp_error("Can't get device number for %s: %m", dev); - return -1; - } - if ((sbuf.st_mode & S_IFMT) != S_IFCHR) { - ppp_error("Can't lock %s: not a character device", dev); - return -1; - } - ppp_slprintf(lock_file, sizeof(lock_file), "%s/LK.%03d.%03d.%03d", - LOCK_DIR, major(sbuf.st_dev), - major(sbuf.st_rdev), minor(sbuf.st_rdev)); -#else - char *p; - char lockdev[MAXPATHLEN]; - - if ((p = strstr(dev, "dev/")) != NULL) { - dev = p + 4; - strncpy(lockdev, dev, MAXPATHLEN-1); - lockdev[MAXPATHLEN-1] = 0; - while ((p = strrchr(lockdev, '/')) != NULL) { - *p = '_'; - } - dev = lockdev; - } else - if ((p = strrchr(dev, '/')) != NULL) - dev = p + 1; - - ppp_slprintf(lock_file, sizeof(lock_file), "%s/LCK..%s", LOCK_DIR, dev); -#endif - - while ((fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) < 0) { - if (errno != EEXIST) { - ppp_error("Can't create lock file %s: %m", lock_file); - break; - } - - /* Read the lock file to find out who has the device locked. */ - fd = open(lock_file, O_RDONLY, 0); - if (fd < 0) { - if (errno == ENOENT) /* This is just a timing problem. */ - continue; - ppp_error("Can't open existing lock file %s: %m", lock_file); - break; - } -#ifndef LOCK_BINARY - n = read(fd, lock_buffer, 11); -#else - n = read(fd, &pid, sizeof(pid)); -#endif /* LOCK_BINARY */ - close(fd); - fd = -1; - if (n <= 0) { - ppp_error("Can't read pid from lock file %s", lock_file); - break; - } - - /* See if the process still exists. */ -#ifndef LOCK_BINARY - lock_buffer[n] = 0; - pid = atoi(lock_buffer); -#endif /* LOCK_BINARY */ - if (pid == getpid()) - return 1; /* somebody else locked it for us */ - if (pid == 0 - || (kill(pid, 0) == -1 && errno == ESRCH)) { - if (unlink (lock_file) == 0) { - ppp_notice("Removed stale lock on %s (pid %d)", dev, pid); - continue; - } - ppp_warn("Couldn't remove stale lock on %s", dev); - } else - ppp_notice("Device %s is locked by pid %d", dev, pid); - break; - } - - if (fd < 0) { - lock_file[0] = 0; - return -1; - } - - pid = getpid(); -#ifndef LOCK_BINARY - ppp_slprintf(lock_buffer, sizeof(lock_buffer), "%10d\n", pid); - write (fd, lock_buffer, 11); -#else - write(fd, &pid, sizeof (pid)); -#endif - close(fd); - return 0; - -#endif -} - -/* - * relock - called to update our lockfile when we are about to detach, - * thus changing our pid (we fork, the child carries on, and the parent dies). - * Note that this is called by the parent, with pid equal to the pid - * of the child. This avoids a potential race which would exist if - * we had the child rewrite the lockfile (the parent might die first, - * and another process could think the lock was stale if it checked - * between when the parent died and the child rewrote the lockfile). - */ -int -relock(pid) - int pid; -{ -#ifdef LOCKLIB - /* XXX is there a way to do this? */ - return -1; -#else /* LOCKLIB */ - - int fd; - char lock_buffer[12]; - - if (lock_file[0] == 0) - return -1; - fd = open(lock_file, O_WRONLY, 0); - if (fd < 0) { - ppp_error("Couldn't reopen lock file %s: %m", lock_file); - lock_file[0] = 0; - return -1; - } - -#ifndef LOCK_BINARY - ppp_slprintf(lock_buffer, sizeof(lock_buffer), "%10d\n", pid); - write (fd, lock_buffer, 11); -#else - write(fd, &pid, sizeof(pid)); -#endif /* LOCK_BINARY */ - close(fd); - return 0; - -#endif /* LOCKLIB */ -} - -/* - * unlock - remove our lockfile - */ -void -unlock() -{ - if (lock_file[0]) { -#ifdef LOCKLIB - (void) rmlock(lock_file, (void *) 0); -#else - unlink(lock_file); -#endif - lock_file[0] = 0; - } -} - -#endif /* Unused */ - -#endif /* PPP_SUPPORT */ +/* + * utils.c - various utility functions used in pppd. + * + * Copyright (c) 1999-2002 Paul Mackerras. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. The name(s) of the authors of this software must not be used to + * endorse or promote products derived from this software without + * prior written permission. + * + * 3. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by Paul Mackerras + * ". + * + * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#if 0 /* UNUSED */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef SVR4 +#include +#endif +#endif /* UNUSED */ + +#include /* isdigit() */ + +#include "netif/ppp/ppp_impl.h" + +#include "netif/ppp/fsm.h" +#include "netif/ppp/lcp.h" + +#if defined(SUNOS4) +extern char *strerror(); +#endif + +static void ppp_logit(int level, const char *fmt, va_list args); +static void ppp_log_write(int level, char *buf); +#if PRINTPKT_SUPPORT +static void ppp_vslp_printer(void *arg, const char *fmt, ...); +static void ppp_format_packet(const u_char *p, int len, + void (*printer) (void *, const char *, ...), void *arg); + +struct buffer_info { + char *ptr; + int len; +}; +#endif /* PRINTPKT_SUPPORT */ + +/* + * ppp_strlcpy - like strcpy/strncpy, doesn't overflow destination buffer, + * always leaves destination null-terminated (for len > 0). + */ +size_t ppp_strlcpy(char *dest, const char *src, size_t len) { + size_t ret = strlen(src); + + if (len != 0) { + if (ret < len) + strcpy(dest, src); + else { + strncpy(dest, src, len - 1); + dest[len-1] = 0; + } + } + return ret; +} + +/* + * ppp_strlcat - like strcat/strncat, doesn't overflow destination buffer, + * always leaves destination null-terminated (for len > 0). + */ +size_t ppp_strlcat(char *dest, const char *src, size_t len) { + size_t dlen = strlen(dest); + + return dlen + ppp_strlcpy(dest + dlen, src, (len > dlen? len - dlen: 0)); +} + + +/* + * ppp_slprintf - format a message into a buffer. Like sprintf except we + * also specify the length of the output buffer, and we handle + * %m (error message), %v (visible string), + * %q (quoted string), %t (current time) and %I (IP address) formats. + * Doesn't do floating-point formats. + * Returns the number of chars put into buf. + */ +int ppp_slprintf(char *buf, int buflen, const char *fmt, ...) { + va_list args; + int n; + + va_start(args, fmt); + n = ppp_vslprintf(buf, buflen, fmt, args); + va_end(args); + return n; +} + +/* + * ppp_vslprintf - like ppp_slprintf, takes a va_list instead of a list of args. + */ +#define OUTCHAR(c) (buflen > 0? (--buflen, *buf++ = (c)): 0) + +int ppp_vslprintf(char *buf, int buflen, const char *fmt, va_list args) { + int c, i, n; + int width, prec, fillch; + int base, len, neg, quoted; + unsigned long val = 0; + const char *f; + char *str, *buf0; + const unsigned char *p; + char num[32]; +#if 0 /* need port */ + time_t t; +#endif /* need port */ + u32_t ip; + static char hexchars[] = "0123456789abcdef"; +#if PRINTPKT_SUPPORT + struct buffer_info bufinfo; +#endif /* PRINTPKT_SUPPORT */ + + buf0 = buf; + --buflen; + while (buflen > 0) { + for (f = fmt; *f != '%' && *f != 0; ++f) + ; + if (f > fmt) { + len = f - fmt; + if (len > buflen) + len = buflen; + memcpy(buf, fmt, len); + buf += len; + buflen -= len; + fmt = f; + } + if (*fmt == 0) + break; + c = *++fmt; + width = 0; + prec = -1; + fillch = ' '; + if (c == '0') { + fillch = '0'; + c = *++fmt; + } + if (c == '*') { + width = va_arg(args, int); + c = *++fmt; + } else { + while (isdigit(c)) { + width = width * 10 + c - '0'; + c = *++fmt; + } + } + if (c == '.') { + c = *++fmt; + if (c == '*') { + prec = va_arg(args, int); + c = *++fmt; + } else { + prec = 0; + while (isdigit(c)) { + prec = prec * 10 + c - '0'; + c = *++fmt; + } + } + } + str = 0; + base = 0; + neg = 0; + ++fmt; + switch (c) { + case 'l': + c = *fmt++; + switch (c) { + case 'd': + val = va_arg(args, long); + if ((long)val < 0) { + neg = 1; + val = (unsigned long)-(long)val; + } + base = 10; + break; + case 'u': + val = va_arg(args, unsigned long); + base = 10; + break; + default: + OUTCHAR('%'); + OUTCHAR('l'); + --fmt; /* so %lz outputs %lz etc. */ + continue; + } + break; + case 'd': + i = va_arg(args, int); + if (i < 0) { + neg = 1; + val = -i; + } else + val = i; + base = 10; + break; + case 'u': + val = va_arg(args, unsigned int); + base = 10; + break; + case 'o': + val = va_arg(args, unsigned int); + base = 8; + break; + case 'x': + case 'X': + val = va_arg(args, unsigned int); + base = 16; + break; +#if 0 /* unused (and wrong on LLP64 systems) */ + case 'p': + val = (unsigned long) va_arg(args, void *); + base = 16; + neg = 2; + break; +#endif /* unused (and wrong on LLP64 systems) */ + case 's': + str = va_arg(args, char *); + break; + case 'c': + num[0] = va_arg(args, int); + num[1] = 0; + str = num; + break; +#if 0 /* do we always have strerror() in embedded ? */ + case 'm': + str = strerror(errno); + break; +#endif /* do we always have strerror() in embedded ? */ + case 'I': + ip = va_arg(args, u32_t); + ip = lwip_ntohl(ip); + ppp_slprintf(num, sizeof(num), "%d.%d.%d.%d", (ip >> 24) & 0xff, + (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff); + str = num; + break; +#if 0 /* need port */ + case 't': + time(&t); + str = ctime(&t); + str += 4; /* chop off the day name */ + str[15] = 0; /* chop off year and newline */ + break; +#endif /* need port */ + case 'v': /* "visible" string */ + case 'q': /* quoted string */ + quoted = c == 'q'; + p = va_arg(args, unsigned char *); + if (p == NULL) + p = (const unsigned char *)""; + if (fillch == '0' && prec >= 0) { + n = prec; + } else { + n = strlen((const char *)p); + if (prec >= 0 && n > prec) + n = prec; + } + while (n > 0 && buflen > 0) { + c = *p++; + --n; + if (!quoted && c >= 0x80) { + OUTCHAR('M'); + OUTCHAR('-'); + c -= 0x80; + } + if (quoted && (c == '"' || c == '\\')) + OUTCHAR('\\'); + if (c < 0x20 || (0x7f <= c && c < 0xa0)) { + if (quoted) { + OUTCHAR('\\'); + switch (c) { + case '\t': OUTCHAR('t'); break; + case '\n': OUTCHAR('n'); break; + case '\b': OUTCHAR('b'); break; + case '\f': OUTCHAR('f'); break; + default: + OUTCHAR('x'); + OUTCHAR(hexchars[c >> 4]); + OUTCHAR(hexchars[c & 0xf]); + } + } else { + if (c == '\t') + OUTCHAR(c); + else { + OUTCHAR('^'); + OUTCHAR(c ^ 0x40); + } + } + } else + OUTCHAR(c); + } + continue; +#if PRINTPKT_SUPPORT + case 'P': /* print PPP packet */ + bufinfo.ptr = buf; + bufinfo.len = buflen + 1; + p = va_arg(args, unsigned char *); + n = va_arg(args, int); + ppp_format_packet(p, n, ppp_vslp_printer, &bufinfo); + buf = bufinfo.ptr; + buflen = bufinfo.len - 1; + continue; +#endif /* PRINTPKT_SUPPORT */ + case 'B': + p = va_arg(args, unsigned char *); + for (n = prec; n > 0; --n) { + c = *p++; + if (fillch == ' ') + OUTCHAR(' '); + OUTCHAR(hexchars[(c >> 4) & 0xf]); + OUTCHAR(hexchars[c & 0xf]); + } + continue; + default: + *buf++ = '%'; + if (c != '%') + --fmt; /* so %z outputs %z etc. */ + --buflen; + continue; + } + if (base != 0) { + str = num + sizeof(num); + *--str = 0; + while (str > num + neg) { + *--str = hexchars[val % base]; + val = val / base; + if (--prec <= 0 && val == 0) + break; + } + switch (neg) { + case 1: + *--str = '-'; + break; + case 2: + *--str = 'x'; + *--str = '0'; + break; + default: + break; + } + len = num + sizeof(num) - 1 - str; + } else { + len = strlen(str); + if (prec >= 0 && len > prec) + len = prec; + } + if (width > 0) { + if (width > buflen) + width = buflen; + if ((n = width - len) > 0) { + buflen -= n; + for (; n > 0; --n) + *buf++ = fillch; + } + } + if (len > buflen) + len = buflen; + memcpy(buf, str, len); + buf += len; + buflen -= len; + } + *buf = 0; + return buf - buf0; +} + +#if PRINTPKT_SUPPORT +/* + * vslp_printer - used in processing a %P format + */ +static void ppp_vslp_printer(void *arg, const char *fmt, ...) { + int n; + va_list pvar; + struct buffer_info *bi; + + va_start(pvar, fmt); + bi = (struct buffer_info *) arg; + n = ppp_vslprintf(bi->ptr, bi->len, fmt, pvar); + va_end(pvar); + + bi->ptr += n; + bi->len -= n; +} +#endif /* PRINTPKT_SUPPORT */ + +#if 0 /* UNUSED */ +/* + * log_packet - format a packet and log it. + */ + +void +log_packet(p, len, prefix, level) + u_char *p; + int len; + char *prefix; + int level; +{ + init_pr_log(prefix, level); + ppp_format_packet(p, len, pr_log, &level); + end_pr_log(); +} +#endif /* UNUSED */ + +#if PRINTPKT_SUPPORT +/* + * ppp_format_packet - make a readable representation of a packet, + * calling `printer(arg, format, ...)' to output it. + */ +static void ppp_format_packet(const u_char *p, int len, + void (*printer) (void *, const char *, ...), void *arg) { + int i, n; + u_short proto; + const struct protent *protp; + + if (len >= 2) { + GETSHORT(proto, p); + len -= 2; + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (proto == protp->protocol) + break; + if (protp != NULL) { + printer(arg, "[%s", protp->name); + n = (*protp->printpkt)(p, len, printer, arg); + printer(arg, "]"); + p += n; + len -= n; + } else { + for (i = 0; (protp = protocols[i]) != NULL; ++i) + if (proto == (protp->protocol & ~0x8000)) + break; + if (protp != 0 && protp->data_name != 0) { + printer(arg, "[%s data]", protp->data_name); + if (len > 8) + printer(arg, "%.8B ...", p); + else + printer(arg, "%.*B", len, p); + len = 0; + } else + printer(arg, "[proto=0x%x]", proto); + } + } + + if (len > 32) + printer(arg, "%.32B ...", p); + else + printer(arg, "%.*B", len, p); +} +#endif /* PRINTPKT_SUPPORT */ + +#if 0 /* UNUSED */ +/* + * init_pr_log, end_pr_log - initialize and finish use of pr_log. + */ + +static char line[256]; /* line to be logged accumulated here */ +static char *linep; /* current pointer within line */ +static int llevel; /* level for logging */ + +void +init_pr_log(prefix, level) + const char *prefix; + int level; +{ + linep = line; + if (prefix != NULL) { + ppp_strlcpy(line, prefix, sizeof(line)); + linep = line + strlen(line); + } + llevel = level; +} + +void +end_pr_log() +{ + if (linep != line) { + *linep = 0; + ppp_log_write(llevel, line); + } +} + +/* + * pr_log - printer routine for outputting to log + */ +void +pr_log (void *arg, const char *fmt, ...) +{ + int l, n; + va_list pvar; + char *p, *eol; + char buf[256]; + + va_start(pvar, fmt); + n = ppp_vslprintf(buf, sizeof(buf), fmt, pvar); + va_end(pvar); + + p = buf; + eol = strchr(buf, '\n'); + if (linep != line) { + l = (eol == NULL)? n: eol - buf; + if (linep + l < line + sizeof(line)) { + if (l > 0) { + memcpy(linep, buf, l); + linep += l; + } + if (eol == NULL) + return; + p = eol + 1; + eol = strchr(p, '\n'); + } + *linep = 0; + ppp_log_write(llevel, line); + linep = line; + } + + while (eol != NULL) { + *eol = 0; + ppp_log_write(llevel, p); + p = eol + 1; + eol = strchr(p, '\n'); + } + + /* assumes sizeof(buf) <= sizeof(line) */ + l = buf + n - p; + if (l > 0) { + memcpy(line, p, n); + linep = line + l; + } +} +#endif /* UNUSED */ + +/* + * ppp_print_string - print a readable representation of a string using + * printer. + */ +void ppp_print_string(const u_char *p, int len, void (*printer) (void *, const char *, ...), void *arg) { + int c; + + printer(arg, "\""); + for (; len > 0; --len) { + c = *p++; + if (' ' <= c && c <= '~') { + if (c == '\\' || c == '"') + printer(arg, "\\"); + printer(arg, "%c", c); + } else { + switch (c) { + case '\n': + printer(arg, "\\n"); + break; + case '\r': + printer(arg, "\\r"); + break; + case '\t': + printer(arg, "\\t"); + break; + default: + printer(arg, "\\%.3o", (u8_t)c); + /* no break */ + } + } + } + printer(arg, "\""); +} + +/* + * ppp_logit - does the hard work for fatal et al. + */ +static void ppp_logit(int level, const char *fmt, va_list args) { + char buf[1024]; + + ppp_vslprintf(buf, sizeof(buf), fmt, args); + ppp_log_write(level, buf); +} + +static void ppp_log_write(int level, char *buf) { + LWIP_UNUSED_ARG(level); /* necessary if PPPDEBUG is defined to an empty function */ + LWIP_UNUSED_ARG(buf); + PPPDEBUG(level, ("%s\n", buf) ); +#if 0 + if (log_to_fd >= 0 && (level != LOG_DEBUG || debug)) { + int n = strlen(buf); + + if (n > 0 && buf[n-1] == '\n') + --n; + if (write(log_to_fd, buf, n) != n + || write(log_to_fd, "\n", 1) != 1) + log_to_fd = -1; + } +#endif +} + +/* + * ppp_fatal - log an error message and die horribly. + */ +void ppp_fatal(const char *fmt, ...) { + va_list pvar; + + va_start(pvar, fmt); + ppp_logit(LOG_ERR, fmt, pvar); + va_end(pvar); + + LWIP_ASSERT("ppp_fatal", 0); /* as promised */ +} + +/* + * ppp_error - log an error message. + */ +void ppp_error(const char *fmt, ...) { + va_list pvar; + + va_start(pvar, fmt); + ppp_logit(LOG_ERR, fmt, pvar); + va_end(pvar); +#if 0 /* UNUSED */ + ++error_count; +#endif /* UNUSED */ +} + +/* + * ppp_warn - log a warning message. + */ +void ppp_warn(const char *fmt, ...) { + va_list pvar; + + va_start(pvar, fmt); + ppp_logit(LOG_WARNING, fmt, pvar); + va_end(pvar); +} + +/* + * ppp_notice - log a notice-level message. + */ +void ppp_notice(const char *fmt, ...) { + va_list pvar; + + va_start(pvar, fmt); + ppp_logit(LOG_NOTICE, fmt, pvar); + va_end(pvar); +} + +/* + * ppp_info - log an informational message. + */ +void ppp_info(const char *fmt, ...) { + va_list pvar; + + va_start(pvar, fmt); + ppp_logit(LOG_INFO, fmt, pvar); + va_end(pvar); +} + +/* + * ppp_dbglog - log a debug message. + */ +void ppp_dbglog(const char *fmt, ...) { + va_list pvar; + + va_start(pvar, fmt); + ppp_logit(LOG_DEBUG, fmt, pvar); + va_end(pvar); +} + +#if PRINTPKT_SUPPORT +/* + * ppp_dump_packet - print out a packet in readable form if it is interesting. + * Assumes len >= PPP_HDRLEN. + */ +void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len) { + int proto; + + /* + * don't print data packets, i.e. IPv4, IPv6, VJ, and compressed packets. + */ + proto = (p[0] << 8) + p[1]; + if (proto < 0xC000 && (proto & ~0x8000) == proto) + return; + + /* + * don't print valid LCP echo request/reply packets if the link is up. + */ + if (proto == PPP_LCP && pcb->phase == PPP_PHASE_RUNNING && len >= 2 + HEADERLEN) { + unsigned char *lcp = p + 2; + int l = (lcp[2] << 8) + lcp[3]; + + if ((lcp[0] == ECHOREQ || lcp[0] == ECHOREP) + && l >= HEADERLEN && l <= len - 2) + return; + } + + ppp_dbglog("%s %P", tag, p, len); +} +#endif /* PRINTPKT_SUPPORT */ + +#if 0 /* Unused */ + +/* + * complete_read - read a full `count' bytes from fd, + * unless end-of-file or an error other than EINTR is encountered. + */ +ssize_t +complete_read(int fd, void *buf, size_t count) +{ + size_t done; + ssize_t nb; + char *ptr = buf; + + for (done = 0; done < count; ) { + nb = read(fd, ptr, count - done); + if (nb < 0) { + if (errno == EINTR) + continue; + return -1; + } + if (nb == 0) + break; + done += nb; + ptr += nb; + } + return done; +} + +/* Procedures for locking the serial device using a lock file. */ +#ifndef LOCK_DIR +#ifdef __linux__ +#define LOCK_DIR "/var/lock" +#else +#ifdef SVR4 +#define LOCK_DIR "/var/spool/locks" +#else +#define LOCK_DIR "/var/spool/lock" +#endif +#endif +#endif /* LOCK_DIR */ + +static char lock_file[MAXPATHLEN]; + +/* + * lock - create a lock file for the named device + */ +int +lock(dev) + char *dev; +{ +#ifdef LOCKLIB + int result; + + result = mklock (dev, (void *) 0); + if (result == 0) { + ppp_strlcpy(lock_file, dev, sizeof(lock_file)); + return 0; + } + + if (result > 0) + ppp_notice("Device %s is locked by pid %d", dev, result); + else + ppp_error("Can't create lock file %s", lock_file); + return -1; + +#else /* LOCKLIB */ + + char lock_buffer[12]; + int fd, pid, n; + +#ifdef SVR4 + struct stat sbuf; + + if (stat(dev, &sbuf) < 0) { + ppp_error("Can't get device number for %s: %m", dev); + return -1; + } + if ((sbuf.st_mode & S_IFMT) != S_IFCHR) { + ppp_error("Can't lock %s: not a character device", dev); + return -1; + } + ppp_slprintf(lock_file, sizeof(lock_file), "%s/LK.%03d.%03d.%03d", + LOCK_DIR, major(sbuf.st_dev), + major(sbuf.st_rdev), minor(sbuf.st_rdev)); +#else + char *p; + char lockdev[MAXPATHLEN]; + + if ((p = strstr(dev, "dev/")) != NULL) { + dev = p + 4; + strncpy(lockdev, dev, MAXPATHLEN-1); + lockdev[MAXPATHLEN-1] = 0; + while ((p = strrchr(lockdev, '/')) != NULL) { + *p = '_'; + } + dev = lockdev; + } else + if ((p = strrchr(dev, '/')) != NULL) + dev = p + 1; + + ppp_slprintf(lock_file, sizeof(lock_file), "%s/LCK..%s", LOCK_DIR, dev); +#endif + + while ((fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) < 0) { + if (errno != EEXIST) { + ppp_error("Can't create lock file %s: %m", lock_file); + break; + } + + /* Read the lock file to find out who has the device locked. */ + fd = open(lock_file, O_RDONLY, 0); + if (fd < 0) { + if (errno == ENOENT) /* This is just a timing problem. */ + continue; + ppp_error("Can't open existing lock file %s: %m", lock_file); + break; + } +#ifndef LOCK_BINARY + n = read(fd, lock_buffer, 11); +#else + n = read(fd, &pid, sizeof(pid)); +#endif /* LOCK_BINARY */ + close(fd); + fd = -1; + if (n <= 0) { + ppp_error("Can't read pid from lock file %s", lock_file); + break; + } + + /* See if the process still exists. */ +#ifndef LOCK_BINARY + lock_buffer[n] = 0; + pid = atoi(lock_buffer); +#endif /* LOCK_BINARY */ + if (pid == getpid()) + return 1; /* somebody else locked it for us */ + if (pid == 0 + || (kill(pid, 0) == -1 && errno == ESRCH)) { + if (unlink (lock_file) == 0) { + ppp_notice("Removed stale lock on %s (pid %d)", dev, pid); + continue; + } + ppp_warn("Couldn't remove stale lock on %s", dev); + } else + ppp_notice("Device %s is locked by pid %d", dev, pid); + break; + } + + if (fd < 0) { + lock_file[0] = 0; + return -1; + } + + pid = getpid(); +#ifndef LOCK_BINARY + ppp_slprintf(lock_buffer, sizeof(lock_buffer), "%10d\n", pid); + write (fd, lock_buffer, 11); +#else + write(fd, &pid, sizeof (pid)); +#endif + close(fd); + return 0; + +#endif +} + +/* + * relock - called to update our lockfile when we are about to detach, + * thus changing our pid (we fork, the child carries on, and the parent dies). + * Note that this is called by the parent, with pid equal to the pid + * of the child. This avoids a potential race which would exist if + * we had the child rewrite the lockfile (the parent might die first, + * and another process could think the lock was stale if it checked + * between when the parent died and the child rewrote the lockfile). + */ +int +relock(pid) + int pid; +{ +#ifdef LOCKLIB + /* XXX is there a way to do this? */ + return -1; +#else /* LOCKLIB */ + + int fd; + char lock_buffer[12]; + + if (lock_file[0] == 0) + return -1; + fd = open(lock_file, O_WRONLY, 0); + if (fd < 0) { + ppp_error("Couldn't reopen lock file %s: %m", lock_file); + lock_file[0] = 0; + return -1; + } + +#ifndef LOCK_BINARY + ppp_slprintf(lock_buffer, sizeof(lock_buffer), "%10d\n", pid); + write (fd, lock_buffer, 11); +#else + write(fd, &pid, sizeof(pid)); +#endif /* LOCK_BINARY */ + close(fd); + return 0; + +#endif /* LOCKLIB */ +} + +/* + * unlock - remove our lockfile + */ +void +unlock() +{ + if (lock_file[0]) { +#ifdef LOCKLIB + (void) rmlock(lock_file, (void *) 0); +#else + unlink(lock_file); +#endif + lock_file[0] = 0; + } +} + +#endif /* Unused */ + +#endif /* PPP_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/vj.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/vj.c index 168c340..0cef43f 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/vj.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/ppp/vj.c @@ -1,695 +1,695 @@ -/* - * Routines to compress and uncompess tcp packets (for transmission - * over low speed serial lines. - * - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: - * Initial distribution. - * - * Modified June 1993 by Paul Mackerras, paulus@cs.anu.edu.au, - * so that the entire packet being decompressed doesn't have - * to be in contiguous memory (just the compressed header). - * - * Modified March 1998 by Guy Lancaster, glanca@gesn.com, - * for a 16 bit processor. - */ - -#include "netif/ppp/ppp_opts.h" -#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */ - -#include "netif/ppp/ppp_impl.h" -#include "netif/ppp/pppdebug.h" - -#include "netif/ppp/vj.h" - -#include - -#if LINK_STATS -#define INCR(counter) ++comp->stats.counter -#else -#define INCR(counter) -#endif - -void -vj_compress_init(struct vjcompress *comp) -{ - u8_t i; - struct cstate *tstate = comp->tstate; - -#if MAX_SLOTS == 0 - memset((char *)comp, 0, sizeof(*comp)); -#endif - comp->maxSlotIndex = MAX_SLOTS - 1; - comp->compressSlot = 0; /* Disable slot ID compression by default. */ - for (i = MAX_SLOTS - 1; i > 0; --i) { - tstate[i].cs_id = i; - tstate[i].cs_next = &tstate[i - 1]; - } - tstate[0].cs_next = &tstate[MAX_SLOTS - 1]; - tstate[0].cs_id = 0; - comp->last_cs = &tstate[0]; - comp->last_recv = 255; - comp->last_xmit = 255; - comp->flags = VJF_TOSS; -} - - -/* ENCODE encodes a number that is known to be non-zero. ENCODEZ - * checks for zero (since zero has to be encoded in the long, 3 byte - * form). - */ -#define ENCODE(n) { \ - if ((u16_t)(n) >= 256) { \ - *cp++ = 0; \ - cp[1] = (u8_t)(n); \ - cp[0] = (u8_t)((n) >> 8); \ - cp += 2; \ - } else { \ - *cp++ = (u8_t)(n); \ - } \ -} -#define ENCODEZ(n) { \ - if ((u16_t)(n) >= 256 || (u16_t)(n) == 0) { \ - *cp++ = 0; \ - cp[1] = (u8_t)(n); \ - cp[0] = (u8_t)((n) >> 8); \ - cp += 2; \ - } else { \ - *cp++ = (u8_t)(n); \ - } \ -} - -#define DECODEL(f) { \ - if (*cp == 0) {\ - u32_t tmp_ = lwip_ntohl(f) + ((cp[1] << 8) | cp[2]); \ - (f) = lwip_htonl(tmp_); \ - cp += 3; \ - } else { \ - u32_t tmp_ = lwip_ntohl(f) + (u32_t)*cp++; \ - (f) = lwip_htonl(tmp_); \ - } \ -} - -#define DECODES(f) { \ - if (*cp == 0) {\ - u16_t tmp_ = lwip_ntohs(f) + (((u16_t)cp[1] << 8) | cp[2]); \ - (f) = lwip_htons(tmp_); \ - cp += 3; \ - } else { \ - u16_t tmp_ = lwip_ntohs(f) + (u16_t)*cp++; \ - (f) = lwip_htons(tmp_); \ - } \ -} - -#define DECODEU(f) { \ - if (*cp == 0) {\ - (f) = lwip_htons(((u16_t)cp[1] << 8) | cp[2]); \ - cp += 3; \ - } else { \ - (f) = lwip_htons((u16_t)*cp++); \ - } \ -} - -/* Helper structures for unaligned *u32_t and *u16_t accesses */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct vj_u32_t { - PACK_STRUCT_FIELD(u32_t v); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct vj_u16_t { - PACK_STRUCT_FIELD(u16_t v); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - -/* - * vj_compress_tcp - Attempt to do Van Jacobson header compression on a - * packet. This assumes that nb and comp are not null and that the first - * buffer of the chain contains a valid IP header. - * Return the VJ type code indicating whether or not the packet was - * compressed. - */ -u8_t -vj_compress_tcp(struct vjcompress *comp, struct pbuf **pb) -{ - struct pbuf *np = *pb; - struct ip_hdr *ip = (struct ip_hdr *)np->payload; - struct cstate *cs = comp->last_cs->cs_next; - u16_t ilen = IPH_HL(ip); - u16_t hlen; - struct tcp_hdr *oth; - struct tcp_hdr *th; - u16_t deltaS, deltaA = 0; - u32_t deltaL; - u32_t changes = 0; - u8_t new_seq[16]; - u8_t *cp = new_seq; - - /* - * Check that the packet is IP proto TCP. - */ - if (IPH_PROTO(ip) != IP_PROTO_TCP) { - return (TYPE_IP); - } - - /* - * Bail if this is an IP fragment or if the TCP packet isn't - * `compressible' (i.e., ACK isn't set or some other control bit is - * set). - */ - if ((IPH_OFFSET(ip) & PP_HTONS(0x3fff)) || np->tot_len < 40) { - return (TYPE_IP); - } - th = (struct tcp_hdr *)&((struct vj_u32_t*)ip)[ilen]; - if ((TCPH_FLAGS(th) & (TCP_SYN|TCP_FIN|TCP_RST|TCP_ACK)) != TCP_ACK) { - return (TYPE_IP); - } - - /* Check that the TCP/IP headers are contained in the first buffer. */ - hlen = ilen + TCPH_HDRLEN(th); - hlen <<= 2; - if (np->len < hlen) { - PPPDEBUG(LOG_INFO, ("vj_compress_tcp: header len %d spans buffers\n", hlen)); - return (TYPE_IP); - } - - /* TCP stack requires that we don't change the packet payload, therefore we copy - * the whole packet before compression. */ - np = pbuf_alloc(PBUF_RAW, np->tot_len, PBUF_POOL); - if (!np) { - return (TYPE_IP); - } - - if (pbuf_copy(np, *pb) != ERR_OK) { - pbuf_free(np); - return (TYPE_IP); - } - - *pb = np; - ip = (struct ip_hdr *)np->payload; - - /* - * Packet is compressible -- we're going to send either a - * COMPRESSED_TCP or UNCOMPRESSED_TCP packet. Either way we need - * to locate (or create) the connection state. Special case the - * most recently used connection since it's most likely to be used - * again & we don't have to do any reordering if it's used. - */ - INCR(vjs_packets); - if (!ip4_addr_cmp(&ip->src, &cs->cs_ip.src) - || !ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest) - || (*(struct vj_u32_t*)th).v != (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) { - /* - * Wasn't the first -- search for it. - * - * States are kept in a circularly linked list with - * last_cs pointing to the end of the list. The - * list is kept in lru order by moving a state to the - * head of the list whenever it is referenced. Since - * the list is short and, empirically, the connection - * we want is almost always near the front, we locate - * states via linear search. If we don't find a state - * for the datagram, the oldest state is (re-)used. - */ - struct cstate *lcs; - struct cstate *lastcs = comp->last_cs; - - do { - lcs = cs; cs = cs->cs_next; - INCR(vjs_searches); - if (ip4_addr_cmp(&ip->src, &cs->cs_ip.src) - && ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest) - && (*(struct vj_u32_t*)th).v == (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) { - goto found; - } - } while (cs != lastcs); - - /* - * Didn't find it -- re-use oldest cstate. Send an - * uncompressed packet that tells the other side what - * connection number we're using for this conversation. - * Note that since the state list is circular, the oldest - * state points to the newest and we only need to set - * last_cs to update the lru linkage. - */ - INCR(vjs_misses); - comp->last_cs = lcs; - goto uncompressed; - - found: - /* - * Found it -- move to the front on the connection list. - */ - if (cs == lastcs) { - comp->last_cs = lcs; - } else { - lcs->cs_next = cs->cs_next; - cs->cs_next = lastcs->cs_next; - lastcs->cs_next = cs; - } - } - - oth = (struct tcp_hdr *)&((struct vj_u32_t*)&cs->cs_ip)[ilen]; - deltaS = ilen; - - /* - * Make sure that only what we expect to change changed. The first - * line of the `if' checks the IP protocol version, header length & - * type of service. The 2nd line checks the "Don't fragment" bit. - * The 3rd line checks the time-to-live and protocol (the protocol - * check is unnecessary but costless). The 4th line checks the TCP - * header length. The 5th line checks IP options, if any. The 6th - * line checks TCP options, if any. If any of these things are - * different between the previous & current datagram, we send the - * current datagram `uncompressed'. - */ - if ((((struct vj_u16_t*)ip)[0]).v != (((struct vj_u16_t*)&cs->cs_ip)[0]).v - || (((struct vj_u16_t*)ip)[3]).v != (((struct vj_u16_t*)&cs->cs_ip)[3]).v - || (((struct vj_u16_t*)ip)[4]).v != (((struct vj_u16_t*)&cs->cs_ip)[4]).v - || TCPH_HDRLEN(th) != TCPH_HDRLEN(oth) - || (deltaS > 5 && BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2)) - || (TCPH_HDRLEN(th) > 5 && BCMP(th + 1, oth + 1, (TCPH_HDRLEN(th) - 5) << 2))) { - goto uncompressed; - } - - /* - * Figure out which of the changing fields changed. The - * receiver expects changes in the order: urgent, window, - * ack, seq (the order minimizes the number of temporaries - * needed in this section of code). - */ - if (TCPH_FLAGS(th) & TCP_URG) { - deltaS = lwip_ntohs(th->urgp); - ENCODEZ(deltaS); - changes |= NEW_U; - } else if (th->urgp != oth->urgp) { - /* argh! URG not set but urp changed -- a sensible - * implementation should never do this but RFC793 - * doesn't prohibit the change so we have to deal - * with it. */ - goto uncompressed; - } - - if ((deltaS = (u16_t)(lwip_ntohs(th->wnd) - lwip_ntohs(oth->wnd))) != 0) { - ENCODE(deltaS); - changes |= NEW_W; - } - - if ((deltaL = lwip_ntohl(th->ackno) - lwip_ntohl(oth->ackno)) != 0) { - if (deltaL > 0xffff) { - goto uncompressed; - } - deltaA = (u16_t)deltaL; - ENCODE(deltaA); - changes |= NEW_A; - } - - if ((deltaL = lwip_ntohl(th->seqno) - lwip_ntohl(oth->seqno)) != 0) { - if (deltaL > 0xffff) { - goto uncompressed; - } - deltaS = (u16_t)deltaL; - ENCODE(deltaS); - changes |= NEW_S; - } - - switch(changes) { - case 0: - /* - * Nothing changed. If this packet contains data and the - * last one didn't, this is probably a data packet following - * an ack (normal on an interactive connection) and we send - * it compressed. Otherwise it's probably a retransmit, - * retransmitted ack or window probe. Send it uncompressed - * in case the other side missed the compressed version. - */ - if (IPH_LEN(ip) != IPH_LEN(&cs->cs_ip) && - lwip_ntohs(IPH_LEN(&cs->cs_ip)) == hlen) { - break; - } - /* no break */ - /* fall through */ - - case SPECIAL_I: - case SPECIAL_D: - /* - * actual changes match one of our special case encodings -- - * send packet uncompressed. - */ - goto uncompressed; - - case NEW_S|NEW_A: - if (deltaS == deltaA && deltaS == lwip_ntohs(IPH_LEN(&cs->cs_ip)) - hlen) { - /* special case for echoed terminal traffic */ - changes = SPECIAL_I; - cp = new_seq; - } - break; - - case NEW_S: - if (deltaS == lwip_ntohs(IPH_LEN(&cs->cs_ip)) - hlen) { - /* special case for data xfer */ - changes = SPECIAL_D; - cp = new_seq; - } - break; - default: - break; - } - - deltaS = (u16_t)(lwip_ntohs(IPH_ID(ip)) - lwip_ntohs(IPH_ID(&cs->cs_ip))); - if (deltaS != 1) { - ENCODEZ(deltaS); - changes |= NEW_I; - } - if (TCPH_FLAGS(th) & TCP_PSH) { - changes |= TCP_PUSH_BIT; - } - /* - * Grab the cksum before we overwrite it below. Then update our - * state with this packet's header. - */ - deltaA = lwip_ntohs(th->chksum); - MEMCPY(&cs->cs_ip, ip, hlen); - - /* - * We want to use the original packet as our compressed packet. - * (cp - new_seq) is the number of bytes we need for compressed - * sequence numbers. In addition we need one byte for the change - * mask, one for the connection id and two for the tcp checksum. - * So, (cp - new_seq) + 4 bytes of header are needed. hlen is how - * many bytes of the original packet to toss so subtract the two to - * get the new packet size. - */ - deltaS = (u16_t)(cp - new_seq); - if (!comp->compressSlot || comp->last_xmit != cs->cs_id) { - comp->last_xmit = cs->cs_id; - hlen -= deltaS + 4; - if (pbuf_header(np, -(s16_t)hlen)){ - /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); - } - cp = (u8_t*)np->payload; - *cp++ = (u8_t)(changes | NEW_C); - *cp++ = cs->cs_id; - } else { - hlen -= deltaS + 3; - if (pbuf_header(np, -(s16_t)hlen)) { - /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); - } - cp = (u8_t*)np->payload; - *cp++ = (u8_t)changes; - } - *cp++ = (u8_t)(deltaA >> 8); - *cp++ = (u8_t)deltaA; - MEMCPY(cp, new_seq, deltaS); - INCR(vjs_compressed); - return (TYPE_COMPRESSED_TCP); - - /* - * Update connection state cs & send uncompressed packet (that is, - * a regular ip/tcp packet but with the 'conversation id' we hope - * to use on future compressed packets in the protocol field). - */ -uncompressed: - MEMCPY(&cs->cs_ip, ip, hlen); - IPH_PROTO_SET(ip, cs->cs_id); - comp->last_xmit = cs->cs_id; - return (TYPE_UNCOMPRESSED_TCP); -} - -/* - * Called when we may have missed a packet. - */ -void -vj_uncompress_err(struct vjcompress *comp) -{ - comp->flags |= VJF_TOSS; - INCR(vjs_errorin); -} - -/* - * "Uncompress" a packet of type TYPE_UNCOMPRESSED_TCP. - * Return 0 on success, -1 on failure. - */ -int -vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp) -{ - u32_t hlen; - struct cstate *cs; - struct ip_hdr *ip; - - ip = (struct ip_hdr *)nb->payload; - hlen = IPH_HL(ip) << 2; - if (IPH_PROTO(ip) >= MAX_SLOTS - || hlen + sizeof(struct tcp_hdr) > nb->len - || (hlen += TCPH_HDRLEN(((struct tcp_hdr *)&((char *)ip)[hlen])) << 2) - > nb->len - || hlen > MAX_HDR) { - PPPDEBUG(LOG_INFO, ("vj_uncompress_uncomp: bad cid=%d, hlen=%d buflen=%d\n", - IPH_PROTO(ip), hlen, nb->len)); - comp->flags |= VJF_TOSS; - INCR(vjs_errorin); - return -1; - } - cs = &comp->rstate[comp->last_recv = IPH_PROTO(ip)]; - comp->flags &=~ VJF_TOSS; - IPH_PROTO_SET(ip, IP_PROTO_TCP); - MEMCPY(&cs->cs_ip, ip, hlen); - cs->cs_hlen = (u16_t)hlen; - INCR(vjs_uncompressedin); - return 0; -} - -/* - * Uncompress a packet of type TYPE_COMPRESSED_TCP. - * The packet is composed of a buffer chain and the first buffer - * must contain an accurate chain length. - * The first buffer must include the entire compressed TCP/IP header. - * This procedure replaces the compressed header with the uncompressed - * header and returns the length of the VJ header. - */ -int -vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp) -{ - u8_t *cp; - struct tcp_hdr *th; - struct cstate *cs; - struct vj_u16_t *bp; - struct pbuf *n0 = *nb; - u32_t tmp; - u32_t vjlen, hlen, changes; - - INCR(vjs_compressedin); - cp = (u8_t*)n0->payload; - changes = *cp++; - if (changes & NEW_C) { - /* - * Make sure the state index is in range, then grab the state. - * If we have a good state index, clear the 'discard' flag. - */ - if (*cp >= MAX_SLOTS) { - PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: bad cid=%d\n", *cp)); - goto bad; - } - - comp->flags &=~ VJF_TOSS; - comp->last_recv = *cp++; - } else { - /* - * this packet has an implicit state index. If we've - * had a line error since the last time we got an - * explicit state index, we have to toss the packet. - */ - if (comp->flags & VJF_TOSS) { - PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: tossing\n")); - INCR(vjs_tossed); - return (-1); - } - } - cs = &comp->rstate[comp->last_recv]; - hlen = IPH_HL(&cs->cs_ip) << 2; - th = (struct tcp_hdr *)&((u8_t*)&cs->cs_ip)[hlen]; - th->chksum = lwip_htons((*cp << 8) | cp[1]); - cp += 2; - if (changes & TCP_PUSH_BIT) { - TCPH_SET_FLAG(th, TCP_PSH); - } else { - TCPH_UNSET_FLAG(th, TCP_PSH); - } - - switch (changes & SPECIALS_MASK) { - case SPECIAL_I: - { - u32_t i = lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen; - /* some compilers can't nest inline assembler.. */ - tmp = lwip_ntohl(th->ackno) + i; - th->ackno = lwip_htonl(tmp); - tmp = lwip_ntohl(th->seqno) + i; - th->seqno = lwip_htonl(tmp); - } - break; - - case SPECIAL_D: - /* some compilers can't nest inline assembler.. */ - tmp = lwip_ntohl(th->seqno) + lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen; - th->seqno = lwip_htonl(tmp); - break; - - default: - if (changes & NEW_U) { - TCPH_SET_FLAG(th, TCP_URG); - DECODEU(th->urgp); - } else { - TCPH_UNSET_FLAG(th, TCP_URG); - } - if (changes & NEW_W) { - DECODES(th->wnd); - } - if (changes & NEW_A) { - DECODEL(th->ackno); - } - if (changes & NEW_S) { - DECODEL(th->seqno); - } - break; - } - if (changes & NEW_I) { - DECODES(cs->cs_ip._id); - } else { - IPH_ID_SET(&cs->cs_ip, lwip_ntohs(IPH_ID(&cs->cs_ip)) + 1); - IPH_ID_SET(&cs->cs_ip, lwip_htons(IPH_ID(&cs->cs_ip))); - } - - /* - * At this point, cp points to the first byte of data in the - * packet. Fill in the IP total length and update the IP - * header checksum. - */ - vjlen = (u16_t)(cp - (u8_t*)n0->payload); - if (n0->len < vjlen) { - /* - * We must have dropped some characters (crc should detect - * this but the old slip framing won't) - */ - PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: head buffer %d too short %d\n", - n0->len, vjlen)); - goto bad; - } - -#if BYTE_ORDER == LITTLE_ENDIAN - tmp = n0->tot_len - vjlen + cs->cs_hlen; - IPH_LEN_SET(&cs->cs_ip, lwip_htons((u16_t)tmp)); -#else - IPH_LEN_SET(&cs->cs_ip, lwip_htons(n0->tot_len - vjlen + cs->cs_hlen)); -#endif - - /* recompute the ip header checksum */ - bp = (struct vj_u16_t*) &cs->cs_ip; - IPH_CHKSUM_SET(&cs->cs_ip, 0); - for (tmp = 0; hlen > 0; hlen -= 2) { - tmp += (*bp++).v; - } - tmp = (tmp & 0xffff) + (tmp >> 16); - tmp = (tmp & 0xffff) + (tmp >> 16); - IPH_CHKSUM_SET(&cs->cs_ip, (u16_t)(~tmp)); - - /* Remove the compressed header and prepend the uncompressed header. */ - if (pbuf_header(n0, -(s16_t)vjlen)) { - /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); - goto bad; - } - - if(LWIP_MEM_ALIGN(n0->payload) != n0->payload) { - struct pbuf *np, *q; - u8_t *bufptr; - -#if IP_FORWARD - /* If IP forwarding is enabled we are using a PBUF_LINK packet type so - * the packet is being allocated with enough header space to be - * forwarded (to Ethernet for example). - */ - np = pbuf_alloc(PBUF_LINK, n0->len + cs->cs_hlen, PBUF_POOL); -#else /* IP_FORWARD */ - np = pbuf_alloc(PBUF_RAW, n0->len + cs->cs_hlen, PBUF_POOL); -#endif /* IP_FORWARD */ - if(!np) { - PPPDEBUG(LOG_WARNING, ("vj_uncompress_tcp: realign failed\n")); - goto bad; - } - - if (pbuf_header(np, -(s16_t)cs->cs_hlen)) { - /* Can we cope with this failing? Just assert for now */ - LWIP_ASSERT("pbuf_header failed\n", 0); - goto bad; - } - - bufptr = (u8_t*)n0->payload; - for(q = np; q != NULL; q = q->next) { - MEMCPY(q->payload, bufptr, q->len); - bufptr += q->len; - } - - if(n0->next) { - pbuf_chain(np, n0->next); - pbuf_dechain(n0); - } - pbuf_free(n0); - n0 = np; - } - - if (pbuf_header(n0, (s16_t)cs->cs_hlen)) { - struct pbuf *np; - - LWIP_ASSERT("vj_uncompress_tcp: cs->cs_hlen <= PBUF_POOL_BUFSIZE", cs->cs_hlen <= PBUF_POOL_BUFSIZE); - np = pbuf_alloc(PBUF_RAW, cs->cs_hlen, PBUF_POOL); - if(!np) { - PPPDEBUG(LOG_WARNING, ("vj_uncompress_tcp: prepend failed\n")); - goto bad; - } - pbuf_cat(np, n0); - n0 = np; - } - LWIP_ASSERT("n0->len >= cs->cs_hlen", n0->len >= cs->cs_hlen); - MEMCPY(n0->payload, &cs->cs_ip, cs->cs_hlen); - - *nb = n0; - - return vjlen; - -bad: - comp->flags |= VJF_TOSS; - INCR(vjs_errorin); - return (-1); -} - -#endif /* PPP_SUPPORT && VJ_SUPPORT */ +/* + * Routines to compress and uncompess tcp packets (for transmission + * over low speed serial lines. + * + * Copyright (c) 1989 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: + * Initial distribution. + * + * Modified June 1993 by Paul Mackerras, paulus@cs.anu.edu.au, + * so that the entire packet being decompressed doesn't have + * to be in contiguous memory (just the compressed header). + * + * Modified March 1998 by Guy Lancaster, glanca@gesn.com, + * for a 16 bit processor. + */ + +#include "netif/ppp/ppp_opts.h" +#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */ + +#include "netif/ppp/ppp_impl.h" +#include "netif/ppp/pppdebug.h" + +#include "netif/ppp/vj.h" + +#include + +#if LINK_STATS +#define INCR(counter) ++comp->stats.counter +#else +#define INCR(counter) +#endif + +void +vj_compress_init(struct vjcompress *comp) +{ + u8_t i; + struct cstate *tstate = comp->tstate; + +#if MAX_SLOTS == 0 + memset((char *)comp, 0, sizeof(*comp)); +#endif + comp->maxSlotIndex = MAX_SLOTS - 1; + comp->compressSlot = 0; /* Disable slot ID compression by default. */ + for (i = MAX_SLOTS - 1; i > 0; --i) { + tstate[i].cs_id = i; + tstate[i].cs_next = &tstate[i - 1]; + } + tstate[0].cs_next = &tstate[MAX_SLOTS - 1]; + tstate[0].cs_id = 0; + comp->last_cs = &tstate[0]; + comp->last_recv = 255; + comp->last_xmit = 255; + comp->flags = VJF_TOSS; +} + + +/* ENCODE encodes a number that is known to be non-zero. ENCODEZ + * checks for zero (since zero has to be encoded in the long, 3 byte + * form). + */ +#define ENCODE(n) { \ + if ((u16_t)(n) >= 256) { \ + *cp++ = 0; \ + cp[1] = (u8_t)(n); \ + cp[0] = (u8_t)((n) >> 8); \ + cp += 2; \ + } else { \ + *cp++ = (u8_t)(n); \ + } \ +} +#define ENCODEZ(n) { \ + if ((u16_t)(n) >= 256 || (u16_t)(n) == 0) { \ + *cp++ = 0; \ + cp[1] = (u8_t)(n); \ + cp[0] = (u8_t)((n) >> 8); \ + cp += 2; \ + } else { \ + *cp++ = (u8_t)(n); \ + } \ +} + +#define DECODEL(f) { \ + if (*cp == 0) {\ + u32_t tmp_ = lwip_ntohl(f) + ((cp[1] << 8) | cp[2]); \ + (f) = lwip_htonl(tmp_); \ + cp += 3; \ + } else { \ + u32_t tmp_ = lwip_ntohl(f) + (u32_t)*cp++; \ + (f) = lwip_htonl(tmp_); \ + } \ +} + +#define DECODES(f) { \ + if (*cp == 0) {\ + u16_t tmp_ = lwip_ntohs(f) + (((u16_t)cp[1] << 8) | cp[2]); \ + (f) = lwip_htons(tmp_); \ + cp += 3; \ + } else { \ + u16_t tmp_ = lwip_ntohs(f) + (u16_t)*cp++; \ + (f) = lwip_htons(tmp_); \ + } \ +} + +#define DECODEU(f) { \ + if (*cp == 0) {\ + (f) = lwip_htons(((u16_t)cp[1] << 8) | cp[2]); \ + cp += 3; \ + } else { \ + (f) = lwip_htons((u16_t)*cp++); \ + } \ +} + +/* Helper structures for unaligned *u32_t and *u16_t accesses */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct vj_u32_t { + PACK_STRUCT_FIELD(u32_t v); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct vj_u16_t { + PACK_STRUCT_FIELD(u16_t v); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif + +/* + * vj_compress_tcp - Attempt to do Van Jacobson header compression on a + * packet. This assumes that nb and comp are not null and that the first + * buffer of the chain contains a valid IP header. + * Return the VJ type code indicating whether or not the packet was + * compressed. + */ +u8_t +vj_compress_tcp(struct vjcompress *comp, struct pbuf **pb) +{ + struct pbuf *np = *pb; + struct ip_hdr *ip = (struct ip_hdr *)np->payload; + struct cstate *cs = comp->last_cs->cs_next; + u16_t ilen = IPH_HL(ip); + u16_t hlen; + struct tcp_hdr *oth; + struct tcp_hdr *th; + u16_t deltaS, deltaA = 0; + u32_t deltaL; + u32_t changes = 0; + u8_t new_seq[16]; + u8_t *cp = new_seq; + + /* + * Check that the packet is IP proto TCP. + */ + if (IPH_PROTO(ip) != IP_PROTO_TCP) { + return (TYPE_IP); + } + + /* + * Bail if this is an IP fragment or if the TCP packet isn't + * `compressible' (i.e., ACK isn't set or some other control bit is + * set). + */ + if ((IPH_OFFSET(ip) & PP_HTONS(0x3fff)) || np->tot_len < 40) { + return (TYPE_IP); + } + th = (struct tcp_hdr *)&((struct vj_u32_t*)ip)[ilen]; + if ((TCPH_FLAGS(th) & (TCP_SYN|TCP_FIN|TCP_RST|TCP_ACK)) != TCP_ACK) { + return (TYPE_IP); + } + + /* Check that the TCP/IP headers are contained in the first buffer. */ + hlen = ilen + TCPH_HDRLEN(th); + hlen <<= 2; + if (np->len < hlen) { + PPPDEBUG(LOG_INFO, ("vj_compress_tcp: header len %d spans buffers\n", hlen)); + return (TYPE_IP); + } + + /* TCP stack requires that we don't change the packet payload, therefore we copy + * the whole packet before compression. */ + np = pbuf_alloc(PBUF_RAW, np->tot_len, PBUF_POOL); + if (!np) { + return (TYPE_IP); + } + + if (pbuf_copy(np, *pb) != ERR_OK) { + pbuf_free(np); + return (TYPE_IP); + } + + *pb = np; + ip = (struct ip_hdr *)np->payload; + + /* + * Packet is compressible -- we're going to send either a + * COMPRESSED_TCP or UNCOMPRESSED_TCP packet. Either way we need + * to locate (or create) the connection state. Special case the + * most recently used connection since it's most likely to be used + * again & we don't have to do any reordering if it's used. + */ + INCR(vjs_packets); + if (!ip4_addr_cmp(&ip->src, &cs->cs_ip.src) + || !ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest) + || (*(struct vj_u32_t*)th).v != (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) { + /* + * Wasn't the first -- search for it. + * + * States are kept in a circularly linked list with + * last_cs pointing to the end of the list. The + * list is kept in lru order by moving a state to the + * head of the list whenever it is referenced. Since + * the list is short and, empirically, the connection + * we want is almost always near the front, we locate + * states via linear search. If we don't find a state + * for the datagram, the oldest state is (re-)used. + */ + struct cstate *lcs; + struct cstate *lastcs = comp->last_cs; + + do { + lcs = cs; cs = cs->cs_next; + INCR(vjs_searches); + if (ip4_addr_cmp(&ip->src, &cs->cs_ip.src) + && ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest) + && (*(struct vj_u32_t*)th).v == (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) { + goto found; + } + } while (cs != lastcs); + + /* + * Didn't find it -- re-use oldest cstate. Send an + * uncompressed packet that tells the other side what + * connection number we're using for this conversation. + * Note that since the state list is circular, the oldest + * state points to the newest and we only need to set + * last_cs to update the lru linkage. + */ + INCR(vjs_misses); + comp->last_cs = lcs; + goto uncompressed; + + found: + /* + * Found it -- move to the front on the connection list. + */ + if (cs == lastcs) { + comp->last_cs = lcs; + } else { + lcs->cs_next = cs->cs_next; + cs->cs_next = lastcs->cs_next; + lastcs->cs_next = cs; + } + } + + oth = (struct tcp_hdr *)&((struct vj_u32_t*)&cs->cs_ip)[ilen]; + deltaS = ilen; + + /* + * Make sure that only what we expect to change changed. The first + * line of the `if' checks the IP protocol version, header length & + * type of service. The 2nd line checks the "Don't fragment" bit. + * The 3rd line checks the time-to-live and protocol (the protocol + * check is unnecessary but costless). The 4th line checks the TCP + * header length. The 5th line checks IP options, if any. The 6th + * line checks TCP options, if any. If any of these things are + * different between the previous & current datagram, we send the + * current datagram `uncompressed'. + */ + if ((((struct vj_u16_t*)ip)[0]).v != (((struct vj_u16_t*)&cs->cs_ip)[0]).v + || (((struct vj_u16_t*)ip)[3]).v != (((struct vj_u16_t*)&cs->cs_ip)[3]).v + || (((struct vj_u16_t*)ip)[4]).v != (((struct vj_u16_t*)&cs->cs_ip)[4]).v + || TCPH_HDRLEN(th) != TCPH_HDRLEN(oth) + || (deltaS > 5 && BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2)) + || (TCPH_HDRLEN(th) > 5 && BCMP(th + 1, oth + 1, (TCPH_HDRLEN(th) - 5) << 2))) { + goto uncompressed; + } + + /* + * Figure out which of the changing fields changed. The + * receiver expects changes in the order: urgent, window, + * ack, seq (the order minimizes the number of temporaries + * needed in this section of code). + */ + if (TCPH_FLAGS(th) & TCP_URG) { + deltaS = lwip_ntohs(th->urgp); + ENCODEZ(deltaS); + changes |= NEW_U; + } else if (th->urgp != oth->urgp) { + /* argh! URG not set but urp changed -- a sensible + * implementation should never do this but RFC793 + * doesn't prohibit the change so we have to deal + * with it. */ + goto uncompressed; + } + + if ((deltaS = (u16_t)(lwip_ntohs(th->wnd) - lwip_ntohs(oth->wnd))) != 0) { + ENCODE(deltaS); + changes |= NEW_W; + } + + if ((deltaL = lwip_ntohl(th->ackno) - lwip_ntohl(oth->ackno)) != 0) { + if (deltaL > 0xffff) { + goto uncompressed; + } + deltaA = (u16_t)deltaL; + ENCODE(deltaA); + changes |= NEW_A; + } + + if ((deltaL = lwip_ntohl(th->seqno) - lwip_ntohl(oth->seqno)) != 0) { + if (deltaL > 0xffff) { + goto uncompressed; + } + deltaS = (u16_t)deltaL; + ENCODE(deltaS); + changes |= NEW_S; + } + + switch(changes) { + case 0: + /* + * Nothing changed. If this packet contains data and the + * last one didn't, this is probably a data packet following + * an ack (normal on an interactive connection) and we send + * it compressed. Otherwise it's probably a retransmit, + * retransmitted ack or window probe. Send it uncompressed + * in case the other side missed the compressed version. + */ + if (IPH_LEN(ip) != IPH_LEN(&cs->cs_ip) && + lwip_ntohs(IPH_LEN(&cs->cs_ip)) == hlen) { + break; + } + /* no break */ + /* fall through */ + + case SPECIAL_I: + case SPECIAL_D: + /* + * actual changes match one of our special case encodings -- + * send packet uncompressed. + */ + goto uncompressed; + + case NEW_S|NEW_A: + if (deltaS == deltaA && deltaS == lwip_ntohs(IPH_LEN(&cs->cs_ip)) - hlen) { + /* special case for echoed terminal traffic */ + changes = SPECIAL_I; + cp = new_seq; + } + break; + + case NEW_S: + if (deltaS == lwip_ntohs(IPH_LEN(&cs->cs_ip)) - hlen) { + /* special case for data xfer */ + changes = SPECIAL_D; + cp = new_seq; + } + break; + default: + break; + } + + deltaS = (u16_t)(lwip_ntohs(IPH_ID(ip)) - lwip_ntohs(IPH_ID(&cs->cs_ip))); + if (deltaS != 1) { + ENCODEZ(deltaS); + changes |= NEW_I; + } + if (TCPH_FLAGS(th) & TCP_PSH) { + changes |= TCP_PUSH_BIT; + } + /* + * Grab the cksum before we overwrite it below. Then update our + * state with this packet's header. + */ + deltaA = lwip_ntohs(th->chksum); + MEMCPY(&cs->cs_ip, ip, hlen); + + /* + * We want to use the original packet as our compressed packet. + * (cp - new_seq) is the number of bytes we need for compressed + * sequence numbers. In addition we need one byte for the change + * mask, one for the connection id and two for the tcp checksum. + * So, (cp - new_seq) + 4 bytes of header are needed. hlen is how + * many bytes of the original packet to toss so subtract the two to + * get the new packet size. + */ + deltaS = (u16_t)(cp - new_seq); + if (!comp->compressSlot || comp->last_xmit != cs->cs_id) { + comp->last_xmit = cs->cs_id; + hlen -= deltaS + 4; + if (pbuf_header(np, -(s16_t)hlen)){ + /* Can we cope with this failing? Just assert for now */ + LWIP_ASSERT("pbuf_header failed\n", 0); + } + cp = (u8_t*)np->payload; + *cp++ = (u8_t)(changes | NEW_C); + *cp++ = cs->cs_id; + } else { + hlen -= deltaS + 3; + if (pbuf_header(np, -(s16_t)hlen)) { + /* Can we cope with this failing? Just assert for now */ + LWIP_ASSERT("pbuf_header failed\n", 0); + } + cp = (u8_t*)np->payload; + *cp++ = (u8_t)changes; + } + *cp++ = (u8_t)(deltaA >> 8); + *cp++ = (u8_t)deltaA; + MEMCPY(cp, new_seq, deltaS); + INCR(vjs_compressed); + return (TYPE_COMPRESSED_TCP); + + /* + * Update connection state cs & send uncompressed packet (that is, + * a regular ip/tcp packet but with the 'conversation id' we hope + * to use on future compressed packets in the protocol field). + */ +uncompressed: + MEMCPY(&cs->cs_ip, ip, hlen); + IPH_PROTO_SET(ip, cs->cs_id); + comp->last_xmit = cs->cs_id; + return (TYPE_UNCOMPRESSED_TCP); +} + +/* + * Called when we may have missed a packet. + */ +void +vj_uncompress_err(struct vjcompress *comp) +{ + comp->flags |= VJF_TOSS; + INCR(vjs_errorin); +} + +/* + * "Uncompress" a packet of type TYPE_UNCOMPRESSED_TCP. + * Return 0 on success, -1 on failure. + */ +int +vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp) +{ + u32_t hlen; + struct cstate *cs; + struct ip_hdr *ip; + + ip = (struct ip_hdr *)nb->payload; + hlen = IPH_HL(ip) << 2; + if (IPH_PROTO(ip) >= MAX_SLOTS + || hlen + sizeof(struct tcp_hdr) > nb->len + || (hlen += TCPH_HDRLEN(((struct tcp_hdr *)&((char *)ip)[hlen])) << 2) + > nb->len + || hlen > MAX_HDR) { + PPPDEBUG(LOG_INFO, ("vj_uncompress_uncomp: bad cid=%d, hlen=%d buflen=%d\n", + IPH_PROTO(ip), hlen, nb->len)); + comp->flags |= VJF_TOSS; + INCR(vjs_errorin); + return -1; + } + cs = &comp->rstate[comp->last_recv = IPH_PROTO(ip)]; + comp->flags &=~ VJF_TOSS; + IPH_PROTO_SET(ip, IP_PROTO_TCP); + MEMCPY(&cs->cs_ip, ip, hlen); + cs->cs_hlen = (u16_t)hlen; + INCR(vjs_uncompressedin); + return 0; +} + +/* + * Uncompress a packet of type TYPE_COMPRESSED_TCP. + * The packet is composed of a buffer chain and the first buffer + * must contain an accurate chain length. + * The first buffer must include the entire compressed TCP/IP header. + * This procedure replaces the compressed header with the uncompressed + * header and returns the length of the VJ header. + */ +int +vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp) +{ + u8_t *cp; + struct tcp_hdr *th; + struct cstate *cs; + struct vj_u16_t *bp; + struct pbuf *n0 = *nb; + u32_t tmp; + u32_t vjlen, hlen, changes; + + INCR(vjs_compressedin); + cp = (u8_t*)n0->payload; + changes = *cp++; + if (changes & NEW_C) { + /* + * Make sure the state index is in range, then grab the state. + * If we have a good state index, clear the 'discard' flag. + */ + if (*cp >= MAX_SLOTS) { + PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: bad cid=%d\n", *cp)); + goto bad; + } + + comp->flags &=~ VJF_TOSS; + comp->last_recv = *cp++; + } else { + /* + * this packet has an implicit state index. If we've + * had a line error since the last time we got an + * explicit state index, we have to toss the packet. + */ + if (comp->flags & VJF_TOSS) { + PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: tossing\n")); + INCR(vjs_tossed); + return (-1); + } + } + cs = &comp->rstate[comp->last_recv]; + hlen = IPH_HL(&cs->cs_ip) << 2; + th = (struct tcp_hdr *)&((u8_t*)&cs->cs_ip)[hlen]; + th->chksum = lwip_htons((*cp << 8) | cp[1]); + cp += 2; + if (changes & TCP_PUSH_BIT) { + TCPH_SET_FLAG(th, TCP_PSH); + } else { + TCPH_UNSET_FLAG(th, TCP_PSH); + } + + switch (changes & SPECIALS_MASK) { + case SPECIAL_I: + { + u32_t i = lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen; + /* some compilers can't nest inline assembler.. */ + tmp = lwip_ntohl(th->ackno) + i; + th->ackno = lwip_htonl(tmp); + tmp = lwip_ntohl(th->seqno) + i; + th->seqno = lwip_htonl(tmp); + } + break; + + case SPECIAL_D: + /* some compilers can't nest inline assembler.. */ + tmp = lwip_ntohl(th->seqno) + lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen; + th->seqno = lwip_htonl(tmp); + break; + + default: + if (changes & NEW_U) { + TCPH_SET_FLAG(th, TCP_URG); + DECODEU(th->urgp); + } else { + TCPH_UNSET_FLAG(th, TCP_URG); + } + if (changes & NEW_W) { + DECODES(th->wnd); + } + if (changes & NEW_A) { + DECODEL(th->ackno); + } + if (changes & NEW_S) { + DECODEL(th->seqno); + } + break; + } + if (changes & NEW_I) { + DECODES(cs->cs_ip._id); + } else { + IPH_ID_SET(&cs->cs_ip, lwip_ntohs(IPH_ID(&cs->cs_ip)) + 1); + IPH_ID_SET(&cs->cs_ip, lwip_htons(IPH_ID(&cs->cs_ip))); + } + + /* + * At this point, cp points to the first byte of data in the + * packet. Fill in the IP total length and update the IP + * header checksum. + */ + vjlen = (u16_t)(cp - (u8_t*)n0->payload); + if (n0->len < vjlen) { + /* + * We must have dropped some characters (crc should detect + * this but the old slip framing won't) + */ + PPPDEBUG(LOG_INFO, ("vj_uncompress_tcp: head buffer %d too short %d\n", + n0->len, vjlen)); + goto bad; + } + +#if BYTE_ORDER == LITTLE_ENDIAN + tmp = n0->tot_len - vjlen + cs->cs_hlen; + IPH_LEN_SET(&cs->cs_ip, lwip_htons((u16_t)tmp)); +#else + IPH_LEN_SET(&cs->cs_ip, lwip_htons(n0->tot_len - vjlen + cs->cs_hlen)); +#endif + + /* recompute the ip header checksum */ + bp = (struct vj_u16_t*) &cs->cs_ip; + IPH_CHKSUM_SET(&cs->cs_ip, 0); + for (tmp = 0; hlen > 0; hlen -= 2) { + tmp += (*bp++).v; + } + tmp = (tmp & 0xffff) + (tmp >> 16); + tmp = (tmp & 0xffff) + (tmp >> 16); + IPH_CHKSUM_SET(&cs->cs_ip, (u16_t)(~tmp)); + + /* Remove the compressed header and prepend the uncompressed header. */ + if (pbuf_header(n0, -(s16_t)vjlen)) { + /* Can we cope with this failing? Just assert for now */ + LWIP_ASSERT("pbuf_header failed\n", 0); + goto bad; + } + + if(LWIP_MEM_ALIGN(n0->payload) != n0->payload) { + struct pbuf *np, *q; + u8_t *bufptr; + +#if IP_FORWARD + /* If IP forwarding is enabled we are using a PBUF_LINK packet type so + * the packet is being allocated with enough header space to be + * forwarded (to Ethernet for example). + */ + np = pbuf_alloc(PBUF_LINK, n0->len + cs->cs_hlen, PBUF_POOL); +#else /* IP_FORWARD */ + np = pbuf_alloc(PBUF_RAW, n0->len + cs->cs_hlen, PBUF_POOL); +#endif /* IP_FORWARD */ + if(!np) { + PPPDEBUG(LOG_WARNING, ("vj_uncompress_tcp: realign failed\n")); + goto bad; + } + + if (pbuf_header(np, -(s16_t)cs->cs_hlen)) { + /* Can we cope with this failing? Just assert for now */ + LWIP_ASSERT("pbuf_header failed\n", 0); + goto bad; + } + + bufptr = (u8_t*)n0->payload; + for(q = np; q != NULL; q = q->next) { + MEMCPY(q->payload, bufptr, q->len); + bufptr += q->len; + } + + if(n0->next) { + pbuf_chain(np, n0->next); + pbuf_dechain(n0); + } + pbuf_free(n0); + n0 = np; + } + + if (pbuf_header(n0, (s16_t)cs->cs_hlen)) { + struct pbuf *np; + + LWIP_ASSERT("vj_uncompress_tcp: cs->cs_hlen <= PBUF_POOL_BUFSIZE", cs->cs_hlen <= PBUF_POOL_BUFSIZE); + np = pbuf_alloc(PBUF_RAW, cs->cs_hlen, PBUF_POOL); + if(!np) { + PPPDEBUG(LOG_WARNING, ("vj_uncompress_tcp: prepend failed\n")); + goto bad; + } + pbuf_cat(np, n0); + n0 = np; + } + LWIP_ASSERT("n0->len >= cs->cs_hlen", n0->len >= cs->cs_hlen); + MEMCPY(n0->payload, &cs->cs_ip, cs->cs_hlen); + + *nb = n0; + + return vjlen; + +bad: + comp->flags |= VJF_TOSS; + INCR(vjs_errorin); + return (-1); +} + +#endif /* PPP_SUPPORT && VJ_SUPPORT */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/slipif.c b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/slipif.c index 6eb83c3..6df8d21 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/slipif.c +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/src/netif/slipif.c @@ -1,555 +1,555 @@ -/** - * @file - * SLIP Interface - * - */ - -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is built upon the file: src/arch/rtxc/netif/sioslip.c - * - * Author: Magnus Ivarsson - * Simon Goldschmidt - */ - - -/** - * @defgroup slipif SLIP netif - * @ingroup addons - * - * This is an arch independent SLIP netif. The specific serial hooks must be - * provided by another file. They are sio_open, sio_read/sio_tryread and sio_send - * - * Usage: This netif can be used in three ways:\n - * 1) For NO_SYS==0, an RX thread can be used which blocks on sio_read() - * until data is received.\n - * 2) In your main loop, call slipif_poll() to check for new RX bytes, - * completed packets are fed into netif->input().\n - * 3) Call slipif_received_byte[s]() from your serial RX ISR and - * slipif_process_rxqueue() from your main loop. ISR level decodes - * packets and puts completed packets on a queue which is fed into - * the stack from the main loop (needs SYS_LIGHTWEIGHT_PROT for - * pbuf_alloc to work on ISR level!). - * - */ - -#include "netif/slipif.h" -#include "lwip/opt.h" - -#include "lwip/def.h" -#include "lwip/pbuf.h" -#include "lwip/stats.h" -#include "lwip/snmp.h" -#include "lwip/sys.h" -#include "lwip/sio.h" - -#define SLIP_END 0xC0 /* 0300: start and end of every packet */ -#define SLIP_ESC 0xDB /* 0333: escape start (one byte escaped data follows) */ -#define SLIP_ESC_END 0xDC /* 0334: following escape: original byte is 0xC0 (END) */ -#define SLIP_ESC_ESC 0xDD /* 0335: following escape: original byte is 0xDB (ESC) */ - -/** Maximum packet size that is received by this netif */ -#ifndef SLIP_MAX_SIZE -#define SLIP_MAX_SIZE 1500 -#endif - -/** Define this to the interface speed for SNMP - * (sio_fd is the sio_fd_t returned by sio_open). - * The default value of zero means 'unknown'. - */ -#ifndef SLIP_SIO_SPEED -#define SLIP_SIO_SPEED(sio_fd) 0 -#endif - -enum slipif_recv_state { - SLIP_RECV_NORMAL, - SLIP_RECV_ESCAPE -}; - -struct slipif_priv { - sio_fd_t sd; - /* q is the whole pbuf chain for a packet, p is the current pbuf in the chain */ - struct pbuf *p, *q; - u8_t state; - u16_t i, recved; -#if SLIP_RX_FROM_ISR - struct pbuf *rxpackets; -#endif -}; - -/** - * Send a pbuf doing the necessary SLIP encapsulation - * - * Uses the serial layer's sio_send() - * - * @param netif the lwip network interface structure for this slipif - * @param p the pbuf chain packet to send - * @return always returns ERR_OK since the serial layer does not provide return values - */ -static err_t -slipif_output(struct netif *netif, struct pbuf *p) -{ - struct slipif_priv *priv; - struct pbuf *q; - u16_t i; - u8_t c; - - LWIP_ASSERT("netif != NULL", (netif != NULL)); - LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); - LWIP_ASSERT("p != NULL", (p != NULL)); - - LWIP_DEBUGF(SLIP_DEBUG, ("slipif_output(%"U16_F"): sending %"U16_F" bytes\n", (u16_t)netif->num, p->tot_len)); - priv = (struct slipif_priv *)netif->state; - - /* Send pbuf out on the serial I/O device. */ - /* Start with packet delimiter. */ - sio_send(SLIP_END, priv->sd); - - for (q = p; q != NULL; q = q->next) { - for (i = 0; i < q->len; i++) { - c = ((u8_t *)q->payload)[i]; - switch (c) { - case SLIP_END: - /* need to escape this byte (0xC0 -> 0xDB, 0xDC) */ - sio_send(SLIP_ESC, priv->sd); - sio_send(SLIP_ESC_END, priv->sd); - break; - case SLIP_ESC: - /* need to escape this byte (0xDB -> 0xDB, 0xDD) */ - sio_send(SLIP_ESC, priv->sd); - sio_send(SLIP_ESC_ESC, priv->sd); - break; - default: - /* normal byte - no need for escaping */ - sio_send(c, priv->sd); - break; - } - } - } - /* End with packet delimiter. */ - sio_send(SLIP_END, priv->sd); - return ERR_OK; -} - -#if LWIP_IPV4 -/** - * Send a pbuf doing the necessary SLIP encapsulation - * - * Uses the serial layer's sio_send() - * - * @param netif the lwip network interface structure for this slipif - * @param p the pbuf chain packet to send - * @param ipaddr the ip address to send the packet to (not used for slipif) - * @return always returns ERR_OK since the serial layer does not provide return values - */ -static err_t -slipif_output_v4(struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr) -{ - LWIP_UNUSED_ARG(ipaddr); - return slipif_output(netif, p); -} -#endif /* LWIP_IPV4 */ - -#if LWIP_IPV6 -/** - * Send a pbuf doing the necessary SLIP encapsulation - * - * Uses the serial layer's sio_send() - * - * @param netif the lwip network interface structure for this slipif - * @param p the pbuf chain packet to send - * @param ipaddr the ip address to send the packet to (not used for slipif) - * @return always returns ERR_OK since the serial layer does not provide return values - */ -static err_t -slipif_output_v6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr) -{ - LWIP_UNUSED_ARG(ipaddr); - return slipif_output(netif, p); -} -#endif /* LWIP_IPV6 */ - -/** - * Handle the incoming SLIP stream character by character - * - * @param netif the lwip network interface structure for this slipif - * @param c received character (multiple calls to this function will - * return a complete packet, NULL is returned before - used for polling) - * @return The IP packet when SLIP_END is received - */ -static struct pbuf* -slipif_rxbyte(struct netif *netif, u8_t c) -{ - struct slipif_priv *priv; - struct pbuf *t; - - LWIP_ASSERT("netif != NULL", (netif != NULL)); - LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); - - priv = (struct slipif_priv *)netif->state; - - switch (priv->state) { - case SLIP_RECV_NORMAL: - switch (c) { - case SLIP_END: - if (priv->recved > 0) { - /* Received whole packet. */ - /* Trim the pbuf to the size of the received packet. */ - pbuf_realloc(priv->q, priv->recved); - - LINK_STATS_INC(link.recv); - - LWIP_DEBUGF(SLIP_DEBUG, ("slipif: Got packet (%"U16_F" bytes)\n", priv->recved)); - t = priv->q; - priv->p = priv->q = NULL; - priv->i = priv->recved = 0; - return t; - } - return NULL; - case SLIP_ESC: - priv->state = SLIP_RECV_ESCAPE; - return NULL; - default: - break; - } /* end switch (c) */ - break; - case SLIP_RECV_ESCAPE: - /* un-escape END or ESC bytes, leave other bytes - (although that would be a protocol error) */ - switch (c) { - case SLIP_ESC_END: - c = SLIP_END; - break; - case SLIP_ESC_ESC: - c = SLIP_ESC; - break; - default: - break; - } - priv->state = SLIP_RECV_NORMAL; - break; - default: - break; - } /* end switch (priv->state) */ - - /* byte received, packet not yet completely received */ - if (priv->p == NULL) { - /* allocate a new pbuf */ - LWIP_DEBUGF(SLIP_DEBUG, ("slipif_input: alloc\n")); - priv->p = pbuf_alloc(PBUF_LINK, (PBUF_POOL_BUFSIZE - PBUF_LINK_HLEN - PBUF_LINK_ENCAPSULATION_HLEN), PBUF_POOL); - - if (priv->p == NULL) { - LINK_STATS_INC(link.drop); - LWIP_DEBUGF(SLIP_DEBUG, ("slipif_input: no new pbuf! (DROP)\n")); - /* don't process any further since we got no pbuf to receive to */ - return NULL; - } - - if (priv->q != NULL) { - /* 'chain' the pbuf to the existing chain */ - pbuf_cat(priv->q, priv->p); - } else { - /* p is the first pbuf in the chain */ - priv->q = priv->p; - } - } - - /* this automatically drops bytes if > SLIP_MAX_SIZE */ - if ((priv->p != NULL) && (priv->recved <= SLIP_MAX_SIZE)) { - ((u8_t *)priv->p->payload)[priv->i] = c; - priv->recved++; - priv->i++; - if (priv->i >= priv->p->len) { - /* on to the next pbuf */ - priv->i = 0; - if (priv->p->next != NULL && priv->p->next->len > 0) { - /* p is a chain, on to the next in the chain */ - priv->p = priv->p->next; - } else { - /* p is a single pbuf, set it to NULL so next time a new - * pbuf is allocated */ - priv->p = NULL; - } - } - } - return NULL; -} - -/** Like slipif_rxbyte, but passes completed packets to netif->input - * - * @param netif The lwip network interface structure for this slipif - * @param c received character - */ -static void -slipif_rxbyte_input(struct netif *netif, u8_t c) -{ - struct pbuf *p; - p = slipif_rxbyte(netif, c); - if (p != NULL) { - if (netif->input(p, netif) != ERR_OK) { - pbuf_free(p); - } - } -} - -#if SLIP_USE_RX_THREAD -/** - * The SLIP input thread. - * - * Feed the IP layer with incoming packets - * - * @param nf the lwip network interface structure for this slipif - */ -static void -slipif_loop_thread(void *nf) -{ - u8_t c; - struct netif *netif = (struct netif *)nf; - struct slipif_priv *priv = (struct slipif_priv *)netif->state; - - while (1) { - if (sio_read(priv->sd, &c, 1) > 0) { - slipif_rxbyte_input(netif, c); - } - } -} -#endif /* SLIP_USE_RX_THREAD */ - -/** - * SLIP netif initialization - * - * Call the arch specific sio_open and remember - * the opened device in the state field of the netif. - * - * @param netif the lwip network interface structure for this slipif - * @return ERR_OK if serial line could be opened, - * ERR_MEM if no memory could be allocated, - * ERR_IF is serial line couldn't be opened - * - * @note netif->num must contain the number of the serial port to open - * (0 by default). If netif->state is != NULL, it is interpreted as an - * u8_t pointer pointing to the serial port number instead of netif->num. - * - */ -err_t -slipif_init(struct netif *netif) -{ - struct slipif_priv *priv; - u8_t sio_num; - - LWIP_DEBUGF(SLIP_DEBUG, ("slipif_init: netif->num=%"U16_F"\n", (u16_t)netif->num)); - - /* Allocate private data */ - priv = (struct slipif_priv *)mem_malloc(sizeof(struct slipif_priv)); - if (!priv) { - return ERR_MEM; - } - - netif->name[0] = 's'; - netif->name[1] = 'l'; -#if LWIP_IPV4 - netif->output = slipif_output_v4; -#endif /* LWIP_IPV4 */ -#if LWIP_IPV6 - netif->output_ip6 = slipif_output_v6; -#endif /* LWIP_IPV6 */ - netif->mtu = SLIP_MAX_SIZE; - - /* netif->state or netif->num contain the port number */ - if (netif->state != NULL) { - sio_num = *(u8_t*)netif->state; - } else { - sio_num = netif->num; - } - /* Try to open the serial port. */ - priv->sd = sio_open(sio_num); - if (!priv->sd) { - /* Opening the serial port failed. */ - mem_free(priv); - return ERR_IF; - } - - /* Initialize private data */ - priv->p = NULL; - priv->q = NULL; - priv->state = SLIP_RECV_NORMAL; - priv->i = 0; - priv->recved = 0; -#if SLIP_RX_FROM_ISR - priv->rxpackets = NULL; -#endif - - netif->state = priv; - - /* initialize the snmp variables and counters inside the struct netif */ - MIB2_INIT_NETIF(netif, snmp_ifType_slip, SLIP_SIO_SPEED(priv->sd)); - -#if SLIP_USE_RX_THREAD - /* Create a thread to poll the serial line. */ - sys_thread_new(SLIPIF_THREAD_NAME, slipif_loop_thread, netif, - SLIPIF_THREAD_STACKSIZE, SLIPIF_THREAD_PRIO); -#endif /* SLIP_USE_RX_THREAD */ - return ERR_OK; -} - -/** - * Polls the serial device and feeds the IP layer with incoming packets. - * - * @param netif The lwip network interface structure for this slipif - */ -void -slipif_poll(struct netif *netif) -{ - u8_t c; - struct slipif_priv *priv; - - LWIP_ASSERT("netif != NULL", (netif != NULL)); - LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); - - priv = (struct slipif_priv *)netif->state; - - while (sio_tryread(priv->sd, &c, 1) > 0) { - slipif_rxbyte_input(netif, c); - } -} - -#if SLIP_RX_FROM_ISR -/** - * Feeds the IP layer with incoming packets that were receive - * - * @param netif The lwip network interface structure for this slipif - */ -void -slipif_process_rxqueue(struct netif *netif) -{ - struct slipif_priv *priv; - SYS_ARCH_DECL_PROTECT(old_level); - - LWIP_ASSERT("netif != NULL", (netif != NULL)); - LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); - - priv = (struct slipif_priv *)netif->state; - - SYS_ARCH_PROTECT(old_level); - while (priv->rxpackets != NULL) { - struct pbuf *p = priv->rxpackets; -#if SLIP_RX_QUEUE - /* dequeue packet */ - struct pbuf *q = p; - while ((q->len != q->tot_len) && (q->next != NULL)) { - q = q->next; - } - priv->rxpackets = q->next; - q->next = NULL; -#else /* SLIP_RX_QUEUE */ - priv->rxpackets = NULL; -#endif /* SLIP_RX_QUEUE */ - SYS_ARCH_UNPROTECT(old_level); - if (netif->input(p, netif) != ERR_OK) { - pbuf_free(p); - } - SYS_ARCH_PROTECT(old_level); - } -} - -/** Like slipif_rxbyte, but queues completed packets. - * - * @param netif The lwip network interface structure for this slipif - * @param data Received serial byte - */ -static void -slipif_rxbyte_enqueue(struct netif *netif, u8_t data) -{ - struct pbuf *p; - struct slipif_priv *priv = (struct slipif_priv *)netif->state; - SYS_ARCH_DECL_PROTECT(old_level); - - p = slipif_rxbyte(netif, data); - if (p != NULL) { - SYS_ARCH_PROTECT(old_level); - if (priv->rxpackets != NULL) { -#if SLIP_RX_QUEUE - /* queue multiple pbufs */ - struct pbuf *q = p; - while (q->next != NULL) { - q = q->next; - } - q->next = p; - } else { -#else /* SLIP_RX_QUEUE */ - pbuf_free(priv->rxpackets); - } - { -#endif /* SLIP_RX_QUEUE */ - priv->rxpackets = p; - } - SYS_ARCH_UNPROTECT(old_level); - } -} - -/** - * Process a received byte, completed packets are put on a queue that is - * fed into IP through slipif_process_rxqueue(). - * - * This function can be called from ISR if SYS_LIGHTWEIGHT_PROT is enabled. - * - * @param netif The lwip network interface structure for this slipif - * @param data received character - */ -void -slipif_received_byte(struct netif *netif, u8_t data) -{ - LWIP_ASSERT("netif != NULL", (netif != NULL)); - LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); - slipif_rxbyte_enqueue(netif, data); -} - -/** - * Process multiple received byte, completed packets are put on a queue that is - * fed into IP through slipif_process_rxqueue(). - * - * This function can be called from ISR if SYS_LIGHTWEIGHT_PROT is enabled. - * - * @param netif The lwip network interface structure for this slipif - * @param data received character - * @param len Number of received characters - */ -void -slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len) -{ - u8_t i; - u8_t *rxdata = data; - LWIP_ASSERT("netif != NULL", (netif != NULL)); - LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); - - for (i = 0; i < len; i++, rxdata++) { - slipif_rxbyte_enqueue(netif, *rxdata); - } -} -#endif /* SLIP_RX_FROM_ISR */ +/** + * @file + * SLIP Interface + * + */ + +/* + * Copyright (c) 2001-2004 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is built upon the file: src/arch/rtxc/netif/sioslip.c + * + * Author: Magnus Ivarsson + * Simon Goldschmidt + */ + + +/** + * @defgroup slipif SLIP netif + * @ingroup addons + * + * This is an arch independent SLIP netif. The specific serial hooks must be + * provided by another file. They are sio_open, sio_read/sio_tryread and sio_send + * + * Usage: This netif can be used in three ways:\n + * 1) For NO_SYS==0, an RX thread can be used which blocks on sio_read() + * until data is received.\n + * 2) In your main loop, call slipif_poll() to check for new RX bytes, + * completed packets are fed into netif->input().\n + * 3) Call slipif_received_byte[s]() from your serial RX ISR and + * slipif_process_rxqueue() from your main loop. ISR level decodes + * packets and puts completed packets on a queue which is fed into + * the stack from the main loop (needs SYS_LIGHTWEIGHT_PROT for + * pbuf_alloc to work on ISR level!). + * + */ + +#include "netif/slipif.h" +#include "lwip/opt.h" + +#include "lwip/def.h" +#include "lwip/pbuf.h" +#include "lwip/stats.h" +#include "lwip/snmp.h" +#include "lwip/sys.h" +#include "lwip/sio.h" + +#define SLIP_END 0xC0 /* 0300: start and end of every packet */ +#define SLIP_ESC 0xDB /* 0333: escape start (one byte escaped data follows) */ +#define SLIP_ESC_END 0xDC /* 0334: following escape: original byte is 0xC0 (END) */ +#define SLIP_ESC_ESC 0xDD /* 0335: following escape: original byte is 0xDB (ESC) */ + +/** Maximum packet size that is received by this netif */ +#ifndef SLIP_MAX_SIZE +#define SLIP_MAX_SIZE 1500 +#endif + +/** Define this to the interface speed for SNMP + * (sio_fd is the sio_fd_t returned by sio_open). + * The default value of zero means 'unknown'. + */ +#ifndef SLIP_SIO_SPEED +#define SLIP_SIO_SPEED(sio_fd) 0 +#endif + +enum slipif_recv_state { + SLIP_RECV_NORMAL, + SLIP_RECV_ESCAPE +}; + +struct slipif_priv { + sio_fd_t sd; + /* q is the whole pbuf chain for a packet, p is the current pbuf in the chain */ + struct pbuf *p, *q; + u8_t state; + u16_t i, recved; +#if SLIP_RX_FROM_ISR + struct pbuf *rxpackets; +#endif +}; + +/** + * Send a pbuf doing the necessary SLIP encapsulation + * + * Uses the serial layer's sio_send() + * + * @param netif the lwip network interface structure for this slipif + * @param p the pbuf chain packet to send + * @return always returns ERR_OK since the serial layer does not provide return values + */ +static err_t +slipif_output(struct netif *netif, struct pbuf *p) +{ + struct slipif_priv *priv; + struct pbuf *q; + u16_t i; + u8_t c; + + LWIP_ASSERT("netif != NULL", (netif != NULL)); + LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); + LWIP_ASSERT("p != NULL", (p != NULL)); + + LWIP_DEBUGF(SLIP_DEBUG, ("slipif_output(%"U16_F"): sending %"U16_F" bytes\n", (u16_t)netif->num, p->tot_len)); + priv = (struct slipif_priv *)netif->state; + + /* Send pbuf out on the serial I/O device. */ + /* Start with packet delimiter. */ + sio_send(SLIP_END, priv->sd); + + for (q = p; q != NULL; q = q->next) { + for (i = 0; i < q->len; i++) { + c = ((u8_t *)q->payload)[i]; + switch (c) { + case SLIP_END: + /* need to escape this byte (0xC0 -> 0xDB, 0xDC) */ + sio_send(SLIP_ESC, priv->sd); + sio_send(SLIP_ESC_END, priv->sd); + break; + case SLIP_ESC: + /* need to escape this byte (0xDB -> 0xDB, 0xDD) */ + sio_send(SLIP_ESC, priv->sd); + sio_send(SLIP_ESC_ESC, priv->sd); + break; + default: + /* normal byte - no need for escaping */ + sio_send(c, priv->sd); + break; + } + } + } + /* End with packet delimiter. */ + sio_send(SLIP_END, priv->sd); + return ERR_OK; +} + +#if LWIP_IPV4 +/** + * Send a pbuf doing the necessary SLIP encapsulation + * + * Uses the serial layer's sio_send() + * + * @param netif the lwip network interface structure for this slipif + * @param p the pbuf chain packet to send + * @param ipaddr the ip address to send the packet to (not used for slipif) + * @return always returns ERR_OK since the serial layer does not provide return values + */ +static err_t +slipif_output_v4(struct netif *netif, struct pbuf *p, const ip4_addr_t *ipaddr) +{ + LWIP_UNUSED_ARG(ipaddr); + return slipif_output(netif, p); +} +#endif /* LWIP_IPV4 */ + +#if LWIP_IPV6 +/** + * Send a pbuf doing the necessary SLIP encapsulation + * + * Uses the serial layer's sio_send() + * + * @param netif the lwip network interface structure for this slipif + * @param p the pbuf chain packet to send + * @param ipaddr the ip address to send the packet to (not used for slipif) + * @return always returns ERR_OK since the serial layer does not provide return values + */ +static err_t +slipif_output_v6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ipaddr) +{ + LWIP_UNUSED_ARG(ipaddr); + return slipif_output(netif, p); +} +#endif /* LWIP_IPV6 */ + +/** + * Handle the incoming SLIP stream character by character + * + * @param netif the lwip network interface structure for this slipif + * @param c received character (multiple calls to this function will + * return a complete packet, NULL is returned before - used for polling) + * @return The IP packet when SLIP_END is received + */ +static struct pbuf* +slipif_rxbyte(struct netif *netif, u8_t c) +{ + struct slipif_priv *priv; + struct pbuf *t; + + LWIP_ASSERT("netif != NULL", (netif != NULL)); + LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); + + priv = (struct slipif_priv *)netif->state; + + switch (priv->state) { + case SLIP_RECV_NORMAL: + switch (c) { + case SLIP_END: + if (priv->recved > 0) { + /* Received whole packet. */ + /* Trim the pbuf to the size of the received packet. */ + pbuf_realloc(priv->q, priv->recved); + + LINK_STATS_INC(link.recv); + + LWIP_DEBUGF(SLIP_DEBUG, ("slipif: Got packet (%"U16_F" bytes)\n", priv->recved)); + t = priv->q; + priv->p = priv->q = NULL; + priv->i = priv->recved = 0; + return t; + } + return NULL; + case SLIP_ESC: + priv->state = SLIP_RECV_ESCAPE; + return NULL; + default: + break; + } /* end switch (c) */ + break; + case SLIP_RECV_ESCAPE: + /* un-escape END or ESC bytes, leave other bytes + (although that would be a protocol error) */ + switch (c) { + case SLIP_ESC_END: + c = SLIP_END; + break; + case SLIP_ESC_ESC: + c = SLIP_ESC; + break; + default: + break; + } + priv->state = SLIP_RECV_NORMAL; + break; + default: + break; + } /* end switch (priv->state) */ + + /* byte received, packet not yet completely received */ + if (priv->p == NULL) { + /* allocate a new pbuf */ + LWIP_DEBUGF(SLIP_DEBUG, ("slipif_input: alloc\n")); + priv->p = pbuf_alloc(PBUF_LINK, (PBUF_POOL_BUFSIZE - PBUF_LINK_HLEN - PBUF_LINK_ENCAPSULATION_HLEN), PBUF_POOL); + + if (priv->p == NULL) { + LINK_STATS_INC(link.drop); + LWIP_DEBUGF(SLIP_DEBUG, ("slipif_input: no new pbuf! (DROP)\n")); + /* don't process any further since we got no pbuf to receive to */ + return NULL; + } + + if (priv->q != NULL) { + /* 'chain' the pbuf to the existing chain */ + pbuf_cat(priv->q, priv->p); + } else { + /* p is the first pbuf in the chain */ + priv->q = priv->p; + } + } + + /* this automatically drops bytes if > SLIP_MAX_SIZE */ + if ((priv->p != NULL) && (priv->recved <= SLIP_MAX_SIZE)) { + ((u8_t *)priv->p->payload)[priv->i] = c; + priv->recved++; + priv->i++; + if (priv->i >= priv->p->len) { + /* on to the next pbuf */ + priv->i = 0; + if (priv->p->next != NULL && priv->p->next->len > 0) { + /* p is a chain, on to the next in the chain */ + priv->p = priv->p->next; + } else { + /* p is a single pbuf, set it to NULL so next time a new + * pbuf is allocated */ + priv->p = NULL; + } + } + } + return NULL; +} + +/** Like slipif_rxbyte, but passes completed packets to netif->input + * + * @param netif The lwip network interface structure for this slipif + * @param c received character + */ +static void +slipif_rxbyte_input(struct netif *netif, u8_t c) +{ + struct pbuf *p; + p = slipif_rxbyte(netif, c); + if (p != NULL) { + if (netif->input(p, netif) != ERR_OK) { + pbuf_free(p); + } + } +} + +#if SLIP_USE_RX_THREAD +/** + * The SLIP input thread. + * + * Feed the IP layer with incoming packets + * + * @param nf the lwip network interface structure for this slipif + */ +static void +slipif_loop_thread(void *nf) +{ + u8_t c; + struct netif *netif = (struct netif *)nf; + struct slipif_priv *priv = (struct slipif_priv *)netif->state; + + while (1) { + if (sio_read(priv->sd, &c, 1) > 0) { + slipif_rxbyte_input(netif, c); + } + } +} +#endif /* SLIP_USE_RX_THREAD */ + +/** + * SLIP netif initialization + * + * Call the arch specific sio_open and remember + * the opened device in the state field of the netif. + * + * @param netif the lwip network interface structure for this slipif + * @return ERR_OK if serial line could be opened, + * ERR_MEM if no memory could be allocated, + * ERR_IF is serial line couldn't be opened + * + * @note netif->num must contain the number of the serial port to open + * (0 by default). If netif->state is != NULL, it is interpreted as an + * u8_t pointer pointing to the serial port number instead of netif->num. + * + */ +err_t +slipif_init(struct netif *netif) +{ + struct slipif_priv *priv; + u8_t sio_num; + + LWIP_DEBUGF(SLIP_DEBUG, ("slipif_init: netif->num=%"U16_F"\n", (u16_t)netif->num)); + + /* Allocate private data */ + priv = (struct slipif_priv *)mem_malloc(sizeof(struct slipif_priv)); + if (!priv) { + return ERR_MEM; + } + + netif->name[0] = 's'; + netif->name[1] = 'l'; +#if LWIP_IPV4 + netif->output = slipif_output_v4; +#endif /* LWIP_IPV4 */ +#if LWIP_IPV6 + netif->output_ip6 = slipif_output_v6; +#endif /* LWIP_IPV6 */ + netif->mtu = SLIP_MAX_SIZE; + + /* netif->state or netif->num contain the port number */ + if (netif->state != NULL) { + sio_num = *(u8_t*)netif->state; + } else { + sio_num = netif->num; + } + /* Try to open the serial port. */ + priv->sd = sio_open(sio_num); + if (!priv->sd) { + /* Opening the serial port failed. */ + mem_free(priv); + return ERR_IF; + } + + /* Initialize private data */ + priv->p = NULL; + priv->q = NULL; + priv->state = SLIP_RECV_NORMAL; + priv->i = 0; + priv->recved = 0; +#if SLIP_RX_FROM_ISR + priv->rxpackets = NULL; +#endif + + netif->state = priv; + + /* initialize the snmp variables and counters inside the struct netif */ + MIB2_INIT_NETIF(netif, snmp_ifType_slip, SLIP_SIO_SPEED(priv->sd)); + +#if SLIP_USE_RX_THREAD + /* Create a thread to poll the serial line. */ + sys_thread_new(SLIPIF_THREAD_NAME, slipif_loop_thread, netif, + SLIPIF_THREAD_STACKSIZE, SLIPIF_THREAD_PRIO); +#endif /* SLIP_USE_RX_THREAD */ + return ERR_OK; +} + +/** + * Polls the serial device and feeds the IP layer with incoming packets. + * + * @param netif The lwip network interface structure for this slipif + */ +void +slipif_poll(struct netif *netif) +{ + u8_t c; + struct slipif_priv *priv; + + LWIP_ASSERT("netif != NULL", (netif != NULL)); + LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); + + priv = (struct slipif_priv *)netif->state; + + while (sio_tryread(priv->sd, &c, 1) > 0) { + slipif_rxbyte_input(netif, c); + } +} + +#if SLIP_RX_FROM_ISR +/** + * Feeds the IP layer with incoming packets that were receive + * + * @param netif The lwip network interface structure for this slipif + */ +void +slipif_process_rxqueue(struct netif *netif) +{ + struct slipif_priv *priv; + SYS_ARCH_DECL_PROTECT(old_level); + + LWIP_ASSERT("netif != NULL", (netif != NULL)); + LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); + + priv = (struct slipif_priv *)netif->state; + + SYS_ARCH_PROTECT(old_level); + while (priv->rxpackets != NULL) { + struct pbuf *p = priv->rxpackets; +#if SLIP_RX_QUEUE + /* dequeue packet */ + struct pbuf *q = p; + while ((q->len != q->tot_len) && (q->next != NULL)) { + q = q->next; + } + priv->rxpackets = q->next; + q->next = NULL; +#else /* SLIP_RX_QUEUE */ + priv->rxpackets = NULL; +#endif /* SLIP_RX_QUEUE */ + SYS_ARCH_UNPROTECT(old_level); + if (netif->input(p, netif) != ERR_OK) { + pbuf_free(p); + } + SYS_ARCH_PROTECT(old_level); + } +} + +/** Like slipif_rxbyte, but queues completed packets. + * + * @param netif The lwip network interface structure for this slipif + * @param data Received serial byte + */ +static void +slipif_rxbyte_enqueue(struct netif *netif, u8_t data) +{ + struct pbuf *p; + struct slipif_priv *priv = (struct slipif_priv *)netif->state; + SYS_ARCH_DECL_PROTECT(old_level); + + p = slipif_rxbyte(netif, data); + if (p != NULL) { + SYS_ARCH_PROTECT(old_level); + if (priv->rxpackets != NULL) { +#if SLIP_RX_QUEUE + /* queue multiple pbufs */ + struct pbuf *q = p; + while (q->next != NULL) { + q = q->next; + } + q->next = p; + } else { +#else /* SLIP_RX_QUEUE */ + pbuf_free(priv->rxpackets); + } + { +#endif /* SLIP_RX_QUEUE */ + priv->rxpackets = p; + } + SYS_ARCH_UNPROTECT(old_level); + } +} + +/** + * Process a received byte, completed packets are put on a queue that is + * fed into IP through slipif_process_rxqueue(). + * + * This function can be called from ISR if SYS_LIGHTWEIGHT_PROT is enabled. + * + * @param netif The lwip network interface structure for this slipif + * @param data received character + */ +void +slipif_received_byte(struct netif *netif, u8_t data) +{ + LWIP_ASSERT("netif != NULL", (netif != NULL)); + LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); + slipif_rxbyte_enqueue(netif, data); +} + +/** + * Process multiple received byte, completed packets are put on a queue that is + * fed into IP through slipif_process_rxqueue(). + * + * This function can be called from ISR if SYS_LIGHTWEIGHT_PROT is enabled. + * + * @param netif The lwip network interface structure for this slipif + * @param data received character + * @param len Number of received characters + */ +void +slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len) +{ + u8_t i; + u8_t *rxdata = data; + LWIP_ASSERT("netif != NULL", (netif != NULL)); + LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); + + for (i = 0; i < len; i++, rxdata++) { + slipif_rxbyte_enqueue(netif, *rxdata); + } +} +#endif /* SLIP_RX_FROM_ISR */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/bpstruct.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/bpstruct.h index 177758c..1e0dde0 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/bpstruct.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/bpstruct.h @@ -1,36 +1,36 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#if defined(__IAR_SYSTEMS_ICC__) -#pragma pack(1) -#endif - +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#if defined(__IAR_SYSTEMS_ICC__) +#pragma pack(1) +#endif + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cc.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cc.h index 3065318..05e26c5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cc.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cc.h @@ -1,88 +1,88 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __CC_H__ -#define __CC_H__ - -#include "cpu.h" -#include -#include - -typedef int sys_prot_t; - -#define LWIP_PROVIDE_ERRNO - -#if defined (__GNUC__) & !defined (__CC_ARM) - -#define LWIP_TIMEVAL_PRIVATE 0 -#include - -#endif - -/* define compiler specific symbols */ -#if defined (__ICCARM__) - -#define PACK_STRUCT_BEGIN -#define PACK_STRUCT_STRUCT -#define PACK_STRUCT_END -#define PACK_STRUCT_FIELD(x) x -#define PACK_STRUCT_USE_INCLUDES - -#elif defined (__GNUC__) - -#define PACK_STRUCT_BEGIN -#define PACK_STRUCT_STRUCT __attribute__ ((__packed__)) -#define PACK_STRUCT_END -#define PACK_STRUCT_FIELD(x) x - -#elif defined (__CC_ARM) - -#define PACK_STRUCT_BEGIN __packed -#define PACK_STRUCT_STRUCT -#define PACK_STRUCT_END -#define PACK_STRUCT_FIELD(x) x - -#elif defined (__TASKING__) - -#define PACK_STRUCT_BEGIN -#define PACK_STRUCT_STRUCT -#define PACK_STRUCT_END -#define PACK_STRUCT_FIELD(x) x - -#endif - -#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ - x, __LINE__, __FILE__); } while(0) - -/* Define random number generator function */ -#define LWIP_RAND() ((u32_t)rand()) - -#endif /* __CC_H__ */ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __CC_H__ +#define __CC_H__ + +#include "cpu.h" +#include +#include + +typedef int sys_prot_t; + +#define LWIP_PROVIDE_ERRNO + +#if defined (__GNUC__) & !defined (__CC_ARM) + +#define LWIP_TIMEVAL_PRIVATE 0 +#include + +#endif + +/* define compiler specific symbols */ +#if defined (__ICCARM__) + +#define PACK_STRUCT_BEGIN +#define PACK_STRUCT_STRUCT +#define PACK_STRUCT_END +#define PACK_STRUCT_FIELD(x) x +#define PACK_STRUCT_USE_INCLUDES + +#elif defined (__GNUC__) + +#define PACK_STRUCT_BEGIN +#define PACK_STRUCT_STRUCT __attribute__ ((__packed__)) +#define PACK_STRUCT_END +#define PACK_STRUCT_FIELD(x) x + +#elif defined (__CC_ARM) + +#define PACK_STRUCT_BEGIN __packed +#define PACK_STRUCT_STRUCT +#define PACK_STRUCT_END +#define PACK_STRUCT_FIELD(x) x + +#elif defined (__TASKING__) + +#define PACK_STRUCT_BEGIN +#define PACK_STRUCT_STRUCT +#define PACK_STRUCT_END +#define PACK_STRUCT_FIELD(x) x + +#endif + +#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); } while(0) + +/* Define random number generator function */ +#define LWIP_RAND() ((u32_t)rand()) + +#endif /* __CC_H__ */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cpu.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cpu.h index bfdf881..f0bfba9 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cpu.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/cpu.h @@ -1,39 +1,39 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __CPU_H__ -#define __CPU_H__ - -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN -#endif - -#endif /* __CPU_H__ */ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __CPU_H__ +#define __CPU_H__ + +#ifndef BYTE_ORDER +#define BYTE_ORDER LITTLE_ENDIAN +#endif + +#endif /* __CPU_H__ */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/epstruct.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/epstruct.h index 1e1a049..41951f7 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/epstruct.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/epstruct.h @@ -1,36 +1,36 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - -#if defined(__IAR_SYSTEMS_ICC__) -#pragma pack() -#endif - +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ + +#if defined(__IAR_SYSTEMS_ICC__) +#pragma pack() +#endif + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/init.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/init.h index e622c73..14b9515 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/init.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/init.h @@ -1,44 +1,44 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __ARCH_INIT_H__ -#define __ARCH_INIT_H__ - -#define TCPIP_INIT_DONE(arg) tcpip_init_done(arg) - -void tcpip_init_done(void *); -int wait_for_tcpip_init(void); - -#endif /* __ARCH_INIT_H__ */ - - - - +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __ARCH_INIT_H__ +#define __ARCH_INIT_H__ + +#define TCPIP_INIT_DONE(arg) tcpip_init_done(arg) + +void tcpip_init_done(void *); +int wait_for_tcpip_init(void); + +#endif /* __ARCH_INIT_H__ */ + + + + diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/lib.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/lib.h index 378f25b..9726dee 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/lib.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/lib.h @@ -1,38 +1,38 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __LIB_H__ -#define __LIB_H__ - -#include - - -#endif /* __LIB_H__ */ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __LIB_H__ +#define __LIB_H__ + +#include + + +#endif /* __LIB_H__ */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/perf.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/perf.h index 334d42a..68afdb5 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/perf.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/perf.h @@ -1,38 +1,38 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __PERF_H__ -#define __PERF_H__ - -#define PERF_START /* null definition */ -#define PERF_STOP(x) /* null definition */ - -#endif /* __PERF_H__ */ +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __PERF_H__ +#define __PERF_H__ + +#define PERF_START /* null definition */ +#define PERF_STOP(x) /* null definition */ + +#endif /* __PERF_H__ */ diff --git a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/sys_arch.h b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/sys_arch.h index 49bfd4e..c0000fa 100644 --- a/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/sys_arch.h +++ b/STM32_Nucleo207ZG/Middlewares/Third_Party/LwIP/system/arch/sys_arch.h @@ -1,72 +1,72 @@ -/* - * Copyright (c) 2001-2003 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ -#ifndef __SYS_ARCH_H__ -#define __SYS_ARCH_H__ - -#include "lwip/opt.h" - -#if (NO_SYS != 0) -#error "NO_SYS need to be set to 0 to use threaded API" -#endif - -#include "cmsis_os.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if (osCMSIS < 0x20000U) - -#define SYS_MBOX_NULL (osMessageQId)0 -#define SYS_SEM_NULL (osSemaphoreId)0 - -typedef osSemaphoreId sys_sem_t; -typedef osSemaphoreId sys_mutex_t; -typedef osMessageQId sys_mbox_t; -typedef osThreadId sys_thread_t; -#else - -#define SYS_MBOX_NULL (osMessageQueueId_t)0 -#define SYS_SEM_NULL (osSemaphoreId_t)0 - -typedef osSemaphoreId_t sys_sem_t; -typedef osSemaphoreId_t sys_mutex_t; -typedef osMessageQueueId_t sys_mbox_t; -typedef osThreadId_t sys_thread_t; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_ARCH_H__ */ - +/* + * Copyright (c) 2001-2003 Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + */ +#ifndef __SYS_ARCH_H__ +#define __SYS_ARCH_H__ + +#include "lwip/opt.h" + +#if (NO_SYS != 0) +#error "NO_SYS need to be set to 0 to use threaded API" +#endif + +#include "cmsis_os.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if (osCMSIS < 0x20000U) + +#define SYS_MBOX_NULL (osMessageQId)0 +#define SYS_SEM_NULL (osSemaphoreId)0 + +typedef osSemaphoreId sys_sem_t; +typedef osSemaphoreId sys_mutex_t; +typedef osMessageQId sys_mbox_t; +typedef osThreadId sys_thread_t; +#else + +#define SYS_MBOX_NULL (osMessageQueueId_t)0 +#define SYS_SEM_NULL (osSemaphoreId_t)0 + +typedef osSemaphoreId_t sys_sem_t; +typedef osSemaphoreId_t sys_mutex_t; +typedef osMessageQueueId_t sys_mbox_t; +typedef osThreadId_t sys_thread_t; +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __SYS_ARCH_H__ */ + -- GitLab